diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 46328feeb7de..519943094947 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -15,7 +15,7 @@ ] }, "microsoft.dotnet.xharness.cli": { - "version": "1.0.0-prerelease.20303.2", + "version": "1.0.0-prerelease.20352.2", "commands": [ "xharness" ] diff --git a/.editorconfig b/.editorconfig index 4b75cbf9ed14..e8c010f6a2e1 100644 --- a/.editorconfig +++ b/.editorconfig @@ -155,7 +155,10 @@ csharp_space_between_square_brackets = false # Analyzers dotnet_code_quality.ca1802.api_surface = private, internal -dotnet_code_quality.CA2208.api_surface = public +dotnet_code_quality.ca2208.api_surface = public + +# License header +file_header_template = Licensed to the .NET Foundation under one or more agreements.\nThe .NET Foundation licenses this file to you under the MIT license.\n # C++ Files [*.{cpp,h,in}] diff --git a/.github/ISSUE_TEMPLATE/02_api_proposal.md b/.github/ISSUE_TEMPLATE/02_api_proposal.md index 4ba85d6256ab..0e03fbdaf0ba 100644 --- a/.github/ISSUE_TEMPLATE/02_api_proposal.md +++ b/.github/ISSUE_TEMPLATE/02_api_proposal.md @@ -43,6 +43,7 @@ You can use code blocks like this: ## Risks diff --git a/.gitignore b/.gitignore index 88165cf3073f..bfe14adb6c04 100644 --- a/.gitignore +++ b/.gitignore @@ -3,10 +3,12 @@ syntax: glob ### VisualStudio ### # Tool Runtime Dir -.dotnet/ -.dotnet-mono/ -.packages/ -.tools/ +# note: there is no trailing slash so if these are symlinks (which are seen as files, +# instead of directories), git will still ignore them. +.dotnet +.dotnet-mono +.packages +.tools # User-specific files *.suo diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 065a190dc743..9bf82879aa5b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -109,7 +109,6 @@ The following file header is the used for .NET Core. Please use it for new files ``` // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. ``` - See [class.cpp](./src/coreclr/src/vm/class.cpp) for an example of the header in a C++ file. diff --git a/Directory.Build.props b/Directory.Build.props index 13aff82cb772..e8f9a65ba217 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -76,12 +76,14 @@ true + $(MSBuildProjectName.Contains('Experimental')) + - true - false + true + false - false + false diff --git a/Directory.Solution.props b/Directory.Solution.props new file mode 100644 index 000000000000..ebd67c8bde03 --- /dev/null +++ b/Directory.Solution.props @@ -0,0 +1,6 @@ + + + + true + + diff --git a/docs/README.md b/docs/README.md index 26ad475c3ef9..130c5fa144fc 100644 --- a/docs/README.md +++ b/docs/README.md @@ -58,7 +58,6 @@ Coding Guidelines - [Breaking Change Rules](coding-guidelines/breaking-change-rules.md) - [Project Guidelines](coding-guidelines/project-guidelines.md) - [Adding APIs Guidelines](coding-guidelines/adding-api-guidelines.md) -- [Legal Native calls](coding-guidelines/pinvoke-checker.md) Project Docs ================= diff --git a/docs/area-owners.md b/docs/area-owners.md index 29d9c9db64bf..e696729861df 100644 --- a/docs/area-owners.md +++ b/docs/area-owners.md @@ -2,7 +2,7 @@ If you need to tag folks on an issue or PR, you will generally want to tag the o | Area | Lead | Owners (area experts to tag in PR's and issues) | Description | |------------------------------------------------|---------------|-----------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| area-AssemblyLoader-coreclr | @jeffschwMSFT | @jeffschwMSFT @vitek-karas | | +| area-AssemblyLoader-coreclr | @agocke | @agocke @vitek-karas | | | area-AssemblyLoader-mono | @SamMonoRT | @CoffeeFlux | | | area-Build-mono | @steveisok | @akoeplinger | | | area-Codegen-AOT-mono | @SamMonoRT | @vargaz | | @@ -18,19 +18,19 @@ If you need to tag folks on an issue or PR, you will generally want to tag the o | area-DependencyModel | @eerhardt | @eerhardt | Microsoft.Extensions.DependencyModel | | area-Diagnostics-coreclr | @tommcdon | @tommcdon | | | area-ExceptionHandling-coreclr | @mangod9 | @janvorli | | -| area-Extensions-Caching | @ericstj | @maryamariyan | | -| area-Extensions-Configuration | @ericstj | @maryamariyan | | -| area-Extensions-DependencyInjection | @ericstj | @maryamariyan | | -| area-Extensions-FileSystem | @ericstj | @maryamariyan | | -| area-Extensions-Hosting | @ericstj | @maryamariyan | | -| area-Extensions-HttpClientFactory | @ericstj | @maryamariyan | | -| area-Extensions-Logging | @ericstj | @maryamariyan | | -| area-Extensions-Options | @ericstj | @maryamariyan | | -| area-Extensions-Primitives | @ericstj | @maryamariyan | | +| area-Extensions-Caching | @ericstj | @maryamariyan @eerhardt | | +| area-Extensions-Configuration | @ericstj | @maryamariyan @safern | | +| area-Extensions-DependencyInjection | @ericstj | @maryamariyan @eerhardt | | +| area-Extensions-FileSystem | @ericstj | @maryamariyan @carlossanlop | | +| area-Extensions-Hosting | @ericstj | @maryamariyan @eerhardt | | +| area-Extensions-HttpClientFactory | @ericstj | @dotnet/ncl @maryamariyan | | +| area-Extensions-Logging | @ericstj | @maryamariyan @tarekgh | | +| area-Extensions-Options | @ericstj | @maryamariyan @ViktorHofer | | +| area-Extensions-Primitives | @ericstj | @maryamariyan @eerhardt | | | area-GC-coreclr | @jeffschwMSFT | @Maoni0 | | | area-GC-mono | @SamMonoRT | @BrzVlad | | -| area-Host | @jeffschwMSFT | @jeffschwMSFT @vitek-karas @swaroop-sridhar | Issues with dotnet.exe including bootstrapping, framework detection, hostfxr.dll and hostpolicy.dll | -| area-HostModel | @jeffschwMSFT | @vitek-karas @swaroop-sridhar | | +| area-Host | @agocke | @jeffschwMSFT @vitek-karas @swaroop-sridhar | Issues with dotnet.exe including bootstrapping, framework detection, hostfxr.dll and hostpolicy.dll | +| area-HostModel | @agocke | @vitek-karas @swaroop-sridhar | | | area-ILTools-coreclr | @JulieLeeMSFT | @BruceForstall @dotnet/jit-contrib | | | area-ILVerification | @JulieLeeMSFT | @BruceForstall @dotnet/jit-contrib | | | area-Infrastructure | @ericstj | @ViktorHofer @jeffschwMSFT @dleeapho | | @@ -48,11 +48,10 @@ If you need to tag folks on an issue or PR, you will generally want to tag the o | area-PAL-coreclr | @mangod9 | @janvorli | | | area-Performance-mono | @SamMonoRT | @SamMonoRT | | | area-R2RDump-coreclr | @mangod9 | @nattress | | -| area-ReadyToRun-coreclr | @mangod9 | @nattress | | -| area-SDK | @marcpopMSFT | @KathleenDollard | General development issues and overlap with the SDK and CLI | +| area-ReadyToRun-coreclr | @mangod9 | @nattress | | | area-Serialization | @HongGit | @StephenMolloy @HongGit | Packages: Excluded: | | area-Setup | @dleeapho | @NikolaMilosavljevic @dleeapho | Distro-specific (Linux, Mac and Windows) setup packages and msi files | -| area-Single-File | @jeffschwMSFT | @swaroop-sridhar | | +| area-Single-File | @agocke | @swaroop-sridhar | | | area-Snap | @dleeapho | @dleeapho @leecow @MichaelSimons | | | area-System.Buffers | @jeffhandley | @tannergooding @GrabYourPitchforks @pgovind | | | area-System.CodeDom | @jeffhandley | @buyaa-n @krwq | | @@ -62,7 +61,7 @@ If you need to tag folks on an issue or PR, you will generally want to tag the o | area-System.ComponentModel.DataAnnotations | @ajcvickers | @lajones @ajcvickers | | | area-System.Composition | @ericstj | @maryamariyan @ViktorHofer | | | area-System.Configuration | @ericstj | @maryamariyan @safern | | -| area-System.Console | @jeffhandley | @carlossanlop @eiriktsarpalis | | +| area-System.Console | @jeffhandley | @adamsitnik @eiriktsarpalis | | | area-System.Data | @ajcvickers | @ajcvickers @cheenamalhotra @david-engel | | | area-System.Data.Odbc | @ajcvickers | @ajcvickers | | | area-System.Data.OleDB | @ajcvickers | @ajcvickers | | @@ -117,6 +116,6 @@ If you need to tag folks on an issue or PR, you will generally want to tag the o | area-Tracing-coreclr | @tommcdon | @sywhang @josalem | | | area-Tracing-mono | @steveisok | @lateralusX | | | area-TypeSystem-coreclr | @mangod9 | @davidwrighton @MichalStrehovsky @janvorli @mangod9 | | -| area-UWP | @tommcdon | @nattress | UWP-specific issues including Microsoft.NETCore.UniversalWindowsPlatform and Microsoft.Net.UWPCoreRuntimeSdk | +| area-UWP | @tommcdon | @jashook | UWP-specific issues including Microsoft.NETCore.UniversalWindowsPlatform and Microsoft.Net.UWPCoreRuntimeSdk | | area-VM-coreclr | @mangod9 | @mangod9 | | | area-VM-meta-mono | @SamMonoRT | @lambdageek | | diff --git a/docs/coding-guidelines/api-guidelines/nullability.md b/docs/coding-guidelines/api-guidelines/nullability.md index 997c2b38ac79..8c029d01fcce 100644 --- a/docs/coding-guidelines/api-guidelines/nullability.md +++ b/docs/coding-guidelines/api-guidelines/nullability.md @@ -35,6 +35,7 @@ The majority of reference type usage in our APIs is fairly clear as to whether i - **DO** define a parameter as nullable if the parameter is explicitly documented to accept `null`. - **DO** define a parameter as nullable if the method checks the parameter for `null` and does something other than throw. This may include normalizing the input, e.g. treating `null` as `string.Empty`. - **DO** define a parameter as nullable if the parameter is optional and has a default value of `null`. +- **DO** define `string message` and `Exception innerException` arguments to `Exception`-derived types as nullable. Additional reference type arguments to `Exception`-derived types should, in general, also be nullable unless not doing so is required for compatibility. - **DO** prefer nullable over non-nullable if there's any disagreement between the previous guidelines. For example, if a non-virtual method has documentation that suggests `null` isn't accepted but the implementation explicitly checks for, normalizes, and accepts a `null` input, the parameter should be defined nullable. However, there are some gray areas that require case-by-case analysis to determine intent. In particular, if a parameter isn't validated nor sanitized nor documented regarding `null`, but in some cases simply ignored such that a `null` doesn't currently cause any problems, several factors should be considered when determining whether to annotate it as `null`. @@ -97,7 +98,7 @@ The C# compiler respects a set of attributes that impact its flow analysis. We - **DO** add `[NotNullWhen(true)]` to nullable arguments of `Try` methods that will definitively be non-`null` if the method returns `true`. For example, if `Int32.TryParse(string? s)` returns `true`, `s` is known to not be `null`, and so the method should be `public static bool TryParse([NotNullWhen(true)] string? s, out int result)`. - **DO** add `[NotNullIfNotNull(string)]` if nullable ref argument will be non-`null` upon exit, when an other argument passed evaluated to non-`null`, pass that argument name as string. Example: `public void Exchange([NotNullIfNotNull("value")] ref object? location, object? value);`. - **DO** add `[return: NotNullIfNotNull(string)]` if a method would not return `null` in case an argument passed evaluated to non-`null`, pass that argument name as string. Example: `[return: NotNullIfNotNull("name")] public string? FormatName(string? name);` -- **DO** add `[MemberNotNull(params string[])]` for a helper method which initializes member field(s), pass the field name. Example: `[MemberNotNull("_buffer")] private void InitializeBuffer()` +- **DO** add `[MemberNotNull(string fieldName)]` to a helper method which initializes member field(s), passing in the field name. Example: `[MemberNotNull("_buffer")] private void InitializeBuffer()`. This will help to avoid spurious warnings at call sites that call the initialization method and then proceed to use the specified field. Note that there are two constructors to `MemberNotNull`; one that takes a single `string`, and one that takes a `params string[]`. When the number of fields initialized is small (e.g. <= 3), it's preferable to use multiple `[MemberNotNull(string)]` attributes on the method rather than one `[MemberNotNull(string, string, string, ...)]` attribute, as the latter is not CLS compliant and will likely require `#pragma warning disable` and `#pragma warning restore` around the line to suppress warnings. ## Code Review Guidance diff --git a/docs/coding-guidelines/clr-code-guide.md b/docs/coding-guidelines/clr-code-guide.md index ba46662d7765..9818c1163f84 100644 --- a/docs/coding-guidelines/clr-code-guide.md +++ b/docs/coding-guidelines/clr-code-guide.md @@ -85,7 +85,7 @@ Written in 2006, by: * [2.10.6 For more details...](#2.10.6) * [2.11 Is your code DAC compliant?](#2.11) -# 1 Why you must read this document +# 1 Why you must read this document Like most large codebases, the CLR codebase has many internal invariants and an extensive debug build infrastructure for detecting problems. Clearly, it is important that developers working on the CLR understand these rules and conventions. @@ -93,7 +93,7 @@ The information contained here is considered the minimum set of knowledge requir This document is divided into the following sections. -## 1.1 Rules of the Code +## 1.1 Rules of the Code This is the most important section. Think of the chapter headings as a checklist to use while designing and writing your code. This section is divided into sections for managed and unmanaged code as they face quite different issues. @@ -113,17 +113,17 @@ One type of rule you won't find here are purely syntactic "code formatting" rule - Significantly increase the risk of a serious bug slipping through. - Frustrate our automated bug-detection infrastructure. -## 1.2 How do I <insert common task>? +## 1.2 How do I <insert common task>? The chapter headings in this section can be regarded as a FAQ. If you have a specific need, look here for "best practices" guidance on how to get something. Also, if you're thinking of adding yet another hash table implementation to the code base, check here first as there's a good chance there's already existing code that can be adapted or used as is. This section will also be divided into managed and unmanaged sections. -# 2 Rules of the Code (Unmanaged) +# 2 Rules of the Code (Unmanaged) -## 2.1 Is your code GC-safe? +## 2.1 Is your code GC-safe? -### 2.1.1 How GC holes are created +### 2.1.1 How GC holes are created The term "GC hole" refers to a special class of bugs that bedevils the CLR. The GC hole is a pernicious bug because it is easy to introduce by accident, repros rarely and is very tedious to debug. A single GC hole can suck up weeks of dev and test time. @@ -137,7 +137,7 @@ Any time a new object is allocated, a GC may occur. GC can also be explicitly re A GC hole occurs when code inside the CLR creates a reference to a GC object, neglects to tell the GC about that reference, performs some operation that directly or indirectly triggers a GC, then tries to use the original reference. At this point, the reference points to garbage memory and the CLR will either read out a wrong value or corrupt whatever that reference is pointing to. -### 2.1.2 Your First GC hole +### 2.1.2 Your First GC hole The code fragment below is the simplest way to introduce a GC hole into the system. @@ -162,7 +162,7 @@ Why? If the second call to AllocateObject() triggers a GC, that GC discards the This point is worth repeating. The GC has no intrinsic knowledge of root references stored in local variables or non-GC data structures maintained by the CLR itself. You must explicitly tell the GC about them. -### 2.1.3 Use GCPROTECT_BEGIN to keep your references up to date +### 2.1.3 Use GCPROTECT_BEGIN to keep your references up to date Here's how to fix our buggy code fragment. @@ -194,7 +194,7 @@ Having said that, no one should complain if you play it safe and GCPROTECT "b" a Every GCPROTECT_BEGIN must have a matching GCPROTECT_END, which terminates the protected status of "a". As an additional safeguard, GCPROTECT_END overwrites "a" with garbage so that any attempt to use "a" afterward will fault. GCPROTECT_BEGIN introduces a new C scoping level that GCPROTECT_END closes, so if you use one without the other, you'll probably experience severe build errors. -### 2.1.4 Don't do nonlocal returns from within GCPROTECT blocks +### 2.1.4 Don't do nonlocal returns from within GCPROTECT blocks Never do a "return", "goto" or other non-local return from between a GCPROTECT_BEGIN/END pair. This will leave the thread's frame chain corrupted. @@ -202,7 +202,7 @@ One exception: it is explicitly allowed to leave a GCPROTECT block by throwing a Why is GCPROTECT not implemented via a C++ smart pointer? The GCPROTECT macro originates in .NET Framework v1. All error handling was done explicitly at that time, without any use C++ exception handling or stack allocated holders. -### 2.1.5 Do not GCPROTECT the same location twice +### 2.1.5 Do not GCPROTECT the same location twice The following is illegal and will cause some sort of crash: @@ -226,11 +226,11 @@ Don't confuse the reference with a copy of the reference. It's not illegal to pr GCPROTECT_END(); } -### 2.1.6 Protecting multiple OBJECTREF's +### 2.1.6 Protecting multiple OBJECTREF's You can protect multiple OBJECTREF locations using one GCPROTECT. Group them all into a structure and pass the structure to GCPROTECT_BEGIN. GCPROTECT_BEGIN applies a sizeof to determine how many locations you want to protect. Do not mix any non-OBJECTREF fields into the struct! -### 2.1.7 Use OBJECTHANDLES for non-scoped protection +### 2.1.7 Use OBJECTHANDLES for non-scoped protection GCPROTECT_BEGIN is very handy, as we've seen, but its protection is limited to a C++ nesting scope. Suppose you need to store a root reference inside a non-GC data structure that lives for an arbitrary amount of time? @@ -271,7 +271,7 @@ There are actually several flavors of handles. This section lists the most commo NOTE: PINNING AN OBJECT IS EXPENSIVE AS IT PREVENTS THE GC FROM ACHIEVING OPTIMAL PACKING OF OBJECTS DURING EPHEMERAL COLLECTIONS. THIS TYPE OF HANDLE SHOULD BE USED SPARINGLY! -### 2.1.8 Use the right GC Mode – Preemptive vs. Cooperative +### 2.1.8 Use the right GC Mode – Preemptive vs. Cooperative Earlier, we implied that GC doesn't occur spontaneously. This is true... for a given thread. But the CLR is multithreaded. Even if your thread does all the right things, it has no control over other threads. @@ -371,7 +371,7 @@ There are also standalone versions: You'll notice that the standalone versions are actually holders rather than simple statements. The intention was that these holders would assert again on scope exit to ensure that any backout holders are correctly restoring the mode. However, that exit check was disabled initially with the idea of enabling it eventually once all the backout code was clean. Unfortunately, the "eventually" has yet to arrive. As long as you use the GCX holders to manage mode changes, this shouldn't really be a problem. -### 2.1.9 Use OBJECTREF to refer to object references as it does automatic sanity checking +### 2.1.9 Use OBJECTREF to refer to object references as it does automatic sanity checking The checked build inserts automatic sanity-checking every single time an OBJECTREF is manipulated. Under the retail build, OBJECTREF is defined as a pointer exactly as you'd expect. But under the checked build, OBJECTREF is defined as a "smart-pointer" class that sanity-checks the pointer on every operation. Also, the current thread is validated to be in cooperative GC mode. @@ -396,7 +396,7 @@ compiles fine under retail but breaks under checked. The usual workaround is som pv = (LPVOID)OBJECTREFToObject(o); -### 2.1.10 How to know if a function can trigger a GC +### 2.1.10 How to know if a function can trigger a GC The GC behavior of every function in the source base must be documented in its contract. Every function must have a contract that declares one of the following: @@ -445,7 +445,7 @@ Why do we use GC_NOTRIGGERS rather than GC_FORBID? Because forcing every functio **Important:** The notrigger thread state is implemented as a counter rather than boolean. This is unfortunate as this should not be necessary and exposes us to nasty ref-counting style bugs. What is important that contracts intentionally do not support unscoped trigger/notrigger transitions. That is, a GC_NOTRIGGER inside a contract will **increment** the thread's notrigger count on entry to the function but on exit, **it will not decrement the count , instead it will restore the count from a saved value.** Thus, any _net_ changes in the trigger state caused within the body of the function will be wiped out. This is good unless your function was designed to make a net change to the trigger state. If you have such a need, you'll just have to work around it somehow because we actively discourage such things in the first place. Ideally, we'd love to replace that counter with a Boolean at sometime. -#### 2.1.10.1 GC_NOTRIGGER/TRIGGERSGC on a scope +#### 2.1.10.1 GC_NOTRIGGER/TRIGGERSGC on a scope Sometimes you want to mark a scope rather than a function. For that purpose, GC_TRIGGERS and TRIGGERSGC also exist as standalone holders. These holders are also visible to the static contract scanner. @@ -459,9 +459,9 @@ Sometimes you want to mark a scope rather than a function. For that purpose, GC_ One difference between the standalone TRIGGERSGC and the contract GC_TRIGGERS: the standalone version also performs a "phantom" GC that poisons all unreachable OBJECTREFs. The contract version does not do this mainly for checked build perf concerns. -## 2.2 Are you using holders to track your resources? +## 2.2 Are you using holders to track your resources? -### 2.2.1 What are holders and why are they important? +### 2.2.1 What are holders and why are they important? The CLR team has coined the name **holder** to refer to the infrastructure that encapsulates the common grunt work of writing robust **backout code**. **Backout code** is code that deallocate resources or restore CLR data structure consistency when we abort an operation due to an error or an asynchronous event. Oftentimes, the same backout code will execute in non-error paths for resources allocated for use of a single scope, but error-time backout is still needed even for longer lived resources. @@ -471,7 +471,7 @@ Due to the no-compromise robustness requirements that the CLR Hosting model (wit Thus, we have centralized cleanup around C++ destructor technology. Instead of declaring a HANDLE, you declare a HandleHolder. The holder wraps a HANDLE and its destructor closes the handle no matter how control leaves the scope. We have already implemented standard holders for common resources (arrays, memory allocated with C++ new, Win32 handles and locks.) The Holder mechanism is extensible so you can add new types of holders as you need them. -### 2.2.2 An example of holder usage +### 2.2.2 An example of holder usage The following shows explicit backout vs. holders: @@ -533,7 +533,7 @@ Suppose you want to auto-close the handle if an error occurs but keep the handle hFile.SuppressRelease(); return hFile; -### 2.2.3 Common Features of Holders +### 2.2.3 Common Features of Holders All holders, no matter how complex or simple, offer these basic services: @@ -545,7 +545,7 @@ All holders, no matter how complex or simple, offer these basic services: In addition, some holders derive from the Wrapper class. Wrappers are like holders but also implement operator overloads for type casting, assignment, comparison, etc. so that the holder proxies the object smart-pointer style. The HandleHolder object is actually a wrapper. -### 2.2.4 Where do I find a holder? +### 2.2.4 Where do I find a holder? First, look for a prebaked holder that does what you want. Some common ones are described below. @@ -557,13 +557,13 @@ Instantiate the holder or wrapper template with the required parameters. You mus Publish the holder in the most global header file possible. [src\inc\holder.h][holder.h] is ideal for OS-type resources. Otherwise, put it in the header file that owns the type being managed. -### 2.2.5 Can I bake my own holder? +### 2.2.5 Can I bake my own holder? When we first put holders into the code, we encouraged developers to inherit from the base holder class rather than writing their own. But the reality has been that many holders only need destruction and SuppressRelease() and it's proven easier for developers to write them from scratch rather than try to master the formidable C++ template magic that goes on in [holder.h][holder.h] It is better that you write your own holders than give up the design pattern altogether because you don't want to tackle [holder.h]. But however you decide to implement it, if you call your object a "holder", please make sure its external behavior conforms to the conventions listed above in "Common Features of Holders." -### 2.2.6 What if my backout code throws an exception? +### 2.2.6 What if my backout code throws an exception? All holders wrap an implicit NOTHROW contract around your backout code. Thus, you must write your backout code only using primitives that are guaranteed not to throw. If you absolutely have no choice but to violate this (say, you're calling Release() on a COM object that you didn't write), you must catch the exception yourself. @@ -571,13 +571,13 @@ This may sound draconian but consider the real implications of throwing out of y Often, you can avoid failures in backout code by designing a better data structure. For example, implementers of common data structures such as hash tables and collections should provide backout holders for undoing operations as inserts. When creating globally visible data structures such as EEClass objects, you should initialize the object in private and allocate everything needed before "publishing it." In some cases, this may require significant rethinking of your data structures and code. But the upshot is that you won't have to undo global data structure changes in backout code. -### 2.2.7 Pay attention to holder initialization semantics +### 2.2.7 Pay attention to holder initialization semantics Holders consistently release on destruction – that's their whole purpose. Sadly, we are not so consistent when it comes the initialization semantics. Some holders, such as the Crst holder, do an implicit Acquire on initialization. Others, such as the ComHolder do not (initializing a ComHolder does _not_ do an AddRef.) The BaseHolder class constructor leaves it up to the holder designer to make the choice. This is an easy source of bugs so pay attention to this. -### 2.2.8 Some generally useful prebaked holders +### 2.2.8 Some generally useful prebaked holders -#### 2.2.8.1 New'ed memory +#### 2.2.8.1 New'ed memory **Wrong:** @@ -588,7 +588,7 @@ Holders consistently release on destruction – that's their whole purpose. Sadl NewHolder pFoo = new Foo(); -#### 2.2.8.2 New'ed array +#### 2.2.8.2 New'ed array **Wrong:** @@ -599,7 +599,7 @@ Holders consistently release on destruction – that's their whole purpose. Sadl NewArrayHolder pFoo = new Foo[30]; -#### 2.2.8.3 COM Interface Holder +#### 2.2.8.3 COM Interface Holder **Wrong:** @@ -612,7 +612,7 @@ Holders consistently release on destruction – that's their whole purpose. Sadl ComHolder pFoo; // declaring ComHolder does not insert AddRef! FunctionToGetRefOfFoo(&pFoo); -#### 2.2.8.4 Critical Section Holder +#### 2.2.8.4 Critical Section Holder **Wrong:** @@ -625,9 +625,9 @@ Holders consistently release on destruction – that's their whole purpose. Sadl CrstHolder(pCrst); //implicit Enter } //implicit Leave -## 2.3 Does your code follow our OOM rules? +## 2.3 Does your code follow our OOM rules? -### 2.3.1 What is OOM and why is it important? +### 2.3.1 What is OOM and why is it important? OOM stands for "Out of Memory." The CLR must be fully robust in the face of OOM errors. For us, OOM is not an obscure corner case. SQL Server runs its processes in low-memory conditions as normal practice. OOM exceptions are a regular occurrence when hosted under SQL Server and we are required to handle every single one correctly. @@ -637,7 +637,7 @@ This means that: - OOM failures must be distinguishable from other error results. OOM's must never be transformed into some other error code. Doing so may cause some operations to cache the error and return the same error on each retry. - Every function must declare whether or not it can generate an OOM error. We cannot write OOM-safe code if we have no way to know what calls can generate OOM's. This declaration is done by the INJECT_FAULT and FORBID_FAULT contract annotations. -### 2.3.2 Documenting where OOM's can happen +### 2.3.2 Documenting where OOM's can happen Sometimes, a code sequence requires that no opportunities for OOM occur. Backout code is the most common example. This can become hard to maintain if the code calls out to other functions. Because of this, it is very important that every function document in its contract whether or not it can fail due to OOM. We do this using the (poorly named) INJECT_FAULT and FORBID_FAULT annotations. @@ -685,7 +685,7 @@ INJECT_FAULT()'s argument is the code that executes when the function reports an The CLR asserts if you invoke an INJECT_FAULT function under the scope of a FORBID_FAULT. All our allocation functions, including the C++ new operator, are declared INJECT_FAULT. -#### 2.3.2.1 Functions that handle OOM's internally +#### 2.3.2.1 Functions that handle OOM's internally Sometimes, a function handles an internal OOM without needing to notify the caller. For example, perhaps the additional memory was used to implement an internal cache but your function can still do its job without it. Or perhaps the function is a logging function in which case, it can silently NOP – the caller doesn't care. In such cases, wrap the allocation in the FAULT_NOT_FATAL holder which temporarily lifts the FORBID_FAULT state. @@ -696,21 +696,21 @@ Sometimes, a function handles an internal OOM without needing to notify the call FAULT_NOT_FATAL() is almost identical to a CONTRACT_VIOLATION() but the name indicates that it is by design, not a bug. It is analogous to TRY/CATCH for exceptions. -#### 2.3.2.2 OOM state control outside of contracts +#### 2.3.2.2 OOM state control outside of contracts If you wish to set the OOM state for a scope rather than a function, use the FAULT_FORBID() holder. To test the current state, use the ARE_FAULTS_FORBIDDEN() predicate. -#### 2.3.2.3 Remember... +#### 2.3.2.3 Remember... - Do not use INJECT_FAULT to indicate the possibility of non-OOM errors such as entries not existing in a hash table or a COM object not supporting an interface. INJECT_FAULT indicates OOM errors and no other type. - Be very suspicious if your INJECT_FAULT() argument is anything other than throwing an OOM exception or returning E_OUTOFMEMORY. OOM errors must distinguishable from other types of errors so if you're merely returning NULL without indicating the type of error, you'd better be a simple memory allocator or some other function that will never fail for any reason other than an OOM. - THROWS and INJECT_FAULT correlate strongly but are independent. A NOTHROW/INJECT_FAULT combo might indicate a function that returns HRESULTs including E_OUTOFMEMORY. A THROWS/FORBID_FAULT however indicate a function that can throw an exception but not an OutOfMemoryException. While theoretically possible, such a contract is probably a bug. -## 2.4 Are you using SString and/or the safe string manipulation functions? +## 2.4 Are you using SString and/or the safe string manipulation functions? The native C implementation of strings as raw char* buffers is a well-known breeding ground for buffer overflow bugs. While acknowledging that there's still a ton of legacy char*'s in the code, new code and new data structures should use the SString class rather than raw C strings whenever possible. -### 2.4.1 SString +### 2.4.1 SString SString is the abstraction to use for unmanaged strings in CLR code. It is important that as much code is possible uses the SString abstraction rather than raw character arrays, because of the danger of buffer overrun related to direct manipulation of arrays. Code which does not use SString must be manually reviewed for the possibility of buffer overrun or corruption during every security review. @@ -736,7 +736,7 @@ If you need to use the string in the context of an external API (either to get t For easy creation of an SString for a string literal, use the SL macro. This can be used around either a normal (ASCII characters only) or wide string constant. -## 2.5 Are you using safemath.h for pointer and memory size allocations? +## 2.5 Are you using safemath.h for pointer and memory size allocations? Integer overflow bugs are an insidious source of buffer overrun vulnerabilities.Here is a simple example of how such a bug can occur: @@ -789,14 +789,14 @@ Currently, the "S_" types are available only for unsigned ints and SIZE_T. Check **Note:** If you've worked on other projects that use the SafeInt class, you might be wondering why we don't do that here. The reason is that we needed something that could be used easily from exception-intolerant code. -## 2.6 Are you using the right type of Critical Section? +## 2.6 Are you using the right type of Critical Section? Synchronization in the CLR is challenging because we must support the strong requirements of the CLR Hosting API. This has two implications: - Hosting availability goals require that we eliminate all races and deadlocks. We need to maintain a healthy process under significant load for weeks and months at a time. Miniscule races will eventually be revealed. - Hosting requires that we often execute on non-preemptively scheduled threads. If we block a non-preemptively scheduled thread, we idle a CPU and possibly deadlock the process. -### 2.6.1 Use only the official synchronization mechanisms +### 2.6.1 Use only the official synchronization mechanisms First, the most important rule. If you learn nothing else here, learn this: @@ -812,7 +812,7 @@ We have the following approved synchronization mechanisms in the CLR: Make sure you aren't using events to build the equivalent of a critical section. The problem with this is that we cannot identify the thread that "owns" the critical section and hence, the host cannot trace and break deadlocks. In general, if you're creating a situation that could result in a deadlock, even if only due to bad user code, you must ensure that a CLR host can detect and break the deadlock. -### 2.6.2 Using Crsts +### 2.6.2 Using Crsts The Crst class ([crst.h][crst.h]) is a replacement for the standard Win32 CRITICAL_SECTION. It has all the properties and features of a CRITICAL_SECTION, plus a few extra nice features. We should be using Crst's pretty much everywhere we need a lock in the CLR. @@ -824,7 +824,7 @@ Instead we now record the explicit dependencies as a set of rules in the src\inc [crst.h]: https://github.com/dotnet/runtime/blob/master/src/coreclr/src/vm/crst.h -### 2.6.3 Creating Crsts +### 2.6.3 Creating Crsts To create a Crst: @@ -844,7 +844,7 @@ A CrstStatic must be destroyed with the Destroy() method as follows: [2]: In fact, you should generally avoid use of static instances that require construction and destruction. This can have an impact on startup time, it can affect our shutdown robustness, and it will eventually limit our ability to recycle the CLR within a running process. -### 2.6.4 Entering and Leaving Crsts +### 2.6.4 Entering and Leaving Crsts To enter or leave a crst, you must wrap the crst inside a CrstHolder. All operations on crsts are available only through the CrstHolder. To enter the crst, create a local CrstHolder and pass the crst as an argument. The crst is automatically released by the CrstHolder's destructor when control leaves the scope either normally or via an exception: @@ -888,7 +888,7 @@ If you want to exit the scope without leaving the Crst, call SuppressRelease() o ch.SuppressRelease(); } // no implicit leave -### 2.6.5 Other Crst Operations +### 2.6.5 Other Crst Operations If you want to validate that you own no other locks at the same or lower level, assert the debug-only IsSafeToTake() method: @@ -896,7 +896,7 @@ If you want to validate that you own no other locks at the same or lower level, Entering a crst always calls IsSafeToTake() for you but calling it manually is useful for functions that acquire a lock only some of the time. -### 2.6.6 Advice on picking a level for your Crst +### 2.6.6 Advice on picking a level for your Crst The point of giving your critical section a level is to help us prevent deadlocks by detecting cycles early in the development process. We try to group critical sections that protect low-level data structures and don't use other services into the lower levels, and ones that protect higher-level data structures and broad code paths into higher levels. @@ -906,7 +906,7 @@ If your lock is protecting large sections of code that call into many other part Add a new definition for your level rather than using an existing definition, even if there is an existing definition with the level you need. Giving each lock its own level in the enum will allow us to easily change the levels of specific locks at a later time. -### 2.6.7 Can waiting on a Crst generate an exception? +### 2.6.7 Can waiting on a Crst generate an exception? It depends. @@ -921,7 +921,7 @@ There are several ways we enforce this. You may be wondering why we invest so much effort into the discipline of deadlock avoidance, and then also require everyone to tolerate deadlock breaking by the host. Sometimes we are unhosted, so we must avoid deadlocks. Some deadlocks involve user code (like class constructors) and cannot be avoided. Some exceptions from lock attempts are due to resource constraints, rather than deadlocks. -### 2.6.8 CRITSECT_UNSAFE Flags +### 2.6.8 CRITSECT_UNSAFE Flags By default, Crsts can only be acquired and released in preemptive GC mode and threads can only own one lock at any given level at a given time. Some locks need to bypass these restrictions. To do so, you must pass the appropriate flag when you create the critical section. (This is the optional third parameter to the Crst constructor.) @@ -955,11 +955,11 @@ Under no circumstances may you use CRST_UNSAFE_SAMELEVEL for a non-host-breakabl [3] More precisely, you cannot allow a GC to block your thread at a GC-safe point. If it does, the GC could deadlock because the GC thread itself blocks waiting for a third cooperative mode thread to reach its GC-safe point... which it can't do because it's trying to acquire the very lock that your first thread owns. This wouldn't be an issue if acquiring a coop-mode lock was itself a GC-safe point. But too much code relies on this not being a GC-safe point to fix this easily -### 2.6.9 Bypassing leveling (CRSTUNORDEREDnordered) +### 2.6.9 Bypassing leveling (CRSTUNORDEREDnordered) CrstUnordered (used in rules inside CrstTypes.def) is a special level that says that the lock does not participate in any of the leveling required for deadlock avoidance. This is the most heinous of the ways you can construct a Crst. Though there are still some uses of this in the CLR, it should be avoided by any means possible. -### 2.6.10 So what _are_ the prerequisites and side-effects of entering a Crst? +### 2.6.10 So what _are_ the prerequisites and side-effects of entering a Crst? The following matrix lists the effective contract and side-effects of entering a crst for all combinations of CRST_HOST_BREAKABLE and CRST_UNSAFE_\* flags. The SAMELEVEL flag has no effect on any of these parameters. @@ -969,7 +969,7 @@ The following matrix lists the effective contract and side-effects of entering a | CRST_UNSAFE_COOPGC | NOTHROW
FORBID_FAULT
GC_NOTRIGGER
MODE_COOP
(puts thread in GCNoTrigger mode) | THROWS
INJECT_FAULT
GC_NOTRIGGER
MODE_COOP
(puts thread in GCNoTrigger mode) | | CRST_UNSAFE_ANYMODE | NOTHROW
FORBID_FAULT
GC_NOTRIGGER
MODE_ANY
(puts thread in GCNoTrigger mode) | THROWS
INJECT_FAULT
GC_NOTRIGGER
MODE_ANY
(puts thread in GCNoTrigger mode) | -### 2.6.11 Using Events and Waitable Handles +### 2.6.11 Using Events and Waitable Handles In typical managed app scenarios, services like WszCreateEvent are thin wrappers over OS services like ::CreateEvent. But in hosted scenarios, these calls may be redirected through an abstraction layer to the host. If that's the case, they may return handles that behave somewhat like OS events, but do not support coordination with unmanaged code. Nor can we provide WaitForMultipleHandles support on these handles. You are strictly limited to waiting on a single handle. @@ -977,7 +977,7 @@ If you need to coordinate with unmanaged code, or if you need to do WaitForMulti Sometimes you might find yourself building the equivalent of a critical section, but using an event directly. The problem here is that we cannot identify the thread that owns the lock, because the owner isn't identified until they "leave'" the lock by calling SetEvent or Pulse. Consider whether a Crst might be more appropriate. -### 2.6.12 Do not get clever with "lockless" reader-writer data structures +### 2.6.12 Do not get clever with "lockless" reader-writer data structures Earlier, we had several hashtable structures that attempted to be "clever" and allow lockless reading. Of course, these structures didn't take into account multiprocessors and the other memory models. Even on single-proc x86, stress uncovered exotic race conditions. This wasted a lot of developer time debugging stress crashes. @@ -985,13 +985,13 @@ We finally stopped being clever and added proper synchronization, with no seriou So if you are tempted to get clever in this way again, **stop and do something else until the urge passes.** -### 2.6.13 Yes, your thread could be running non-preemptively! +### 2.6.13 Yes, your thread could be running non-preemptively! Under hosted scenarios, your thread could actually be scheduled non-preemptively (do not confuse this with "GC preemptive mode.".) Blocking a thread without yielding back to the host could have consequences ranging from CPU starvation (perf) to an actual deadlock. You are particularly vulnerable when calling OS apis that block. Unfortunately, there is no official list of "safe" OS apis. The safest approach is to stick to the officially approved synchronization mechanisms documented in this chapter and be extra careful when invoking OS api. -### 2.6.14 Dos and Don'ts for Synchronization +### 2.6.14 Dos and Don'ts for Synchronization - Don't build your own lock or use OS locks. Only use Crst or host events and waitable handles. A host must know who owns what to detect and break deadlocks. - Don't use events to simulate locks or any other synchronization mechanism that could lead to deadlocks. Again, if a host doesn't know about a deadlock situation, it can't break it. @@ -1005,11 +1005,11 @@ Unfortunately, there is no official list of "safe" OS apis. The safest approach - Don't block a thread without yielding back to the host. Your "thread" may actually be a nonpreemptive thread. Always stick to the approved synchronization primitives. - Do document your locking model. If your locking model involves protecting a resource with a critical section, maybe you don't have to mention that in a comment. But if you have an elaborate mechanism where half your synchronization comes from GC guarantees and being in cooperative mode, while the other half is based on taking a spin lock in preemptive mode – then you really need to write this down. Nobody (not even you) can debug or maintain your code unless you have left a detailed comment. -## 2.7 Are you making hidden assumptions about the order of memory writes? +## 2.7 Are you making hidden assumptions about the order of memory writes? _Issues: X86 processors have a very predictable memory order that 64-bit chips or multiprocs don't observe. We've gotten burned in the past because of attempts to be clever at writing thread-safe data structures without crsts. The best advice here is "don't be so clever, the perf improvements usually don't justify the risk." (look for Vance's writeup on memory models for a start.) _ -## 2.8 Is your code compatible with managed debugging? +## 2.8 Is your code compatible with managed debugging? The managed debugging services have some very unique properties in the CLR, and take a heavy dependency on the rest of the system. This makes it very easy to break managed debugging without even touching a line of debugger code. Here are some key trivia and tips to help you play well with the managed-debugging services. @@ -1051,9 +1051,9 @@ Here are some immediate tips for working well with the managed-debugging service - Step-in through a stub: Any time you add a new stub or new way of calling managed code, you might break stepping. - Versioning: You could write a debugger in managed code targeting CLR version X, but debugging a process that's loaded CLR version Y. Now that's some versioning nightmares. -## 2.9 Does your code work on 64-bit? +## 2.9 Does your code work on 64-bit? -### 2.9.1 Primitive Types +### 2.9.1 Primitive Types Because the CLR is ultimately compiled on several different platforms, we have to be careful about the primitive types which are used in our code. Some compilers can have slightly different declarations in standard header files, and different processor word sizes can require values to have different representations on different platforms. @@ -1070,7 +1070,7 @@ The types are grouped into several categories. All standard integral types have *_MIN and *_MAX values declared as well. -## 2.10 Does your function declare a CONTRACT? +## 2.10 Does your function declare a CONTRACT? Every function in the CLR must declare a contract. A contract enumerates important behavioral facts such as whether a function throws or whether it can trigger gc. It also a general container for expressing preconditions and postconditions specific to that function. @@ -1109,35 +1109,35 @@ At the start of Foo(), it validates that it's safe to throw, safe to generate an On a retail build, CONTRACT expands to nothing. -### 2.10.1 What can be said in a contract? +### 2.10.1 What can be said in a contract? As you can see, a contract is a laundry list of "items" that either assert some requirement on the current thread state or impose a requirement on downstream callees. The following is a whirlwind tour of the supported annotations. The nuances of each one are explained in more detail in their individual chapters. -#### 2.10.1.1 THROWS/NOTHROW +#### 2.10.1.1 THROWS/NOTHROW Declares whether an exception can be thrown out of this function. Declaring **NOTHROW** puts the thread in a NOTHROW state for the duration of the function call. You will get an assert if you throw an exception or call a function declared THROWS. An EX_TRY/EX_CATCH construct however will lift the NOTHROW state for the duration of the TRY body. -#### 2.10.1.2 INJECT_FAULT(_handler-stmt_)/FORBID_FAULT +#### 2.10.1.2 INJECT_FAULT(_handler-stmt_)/FORBID_FAULT This is a poorly named item. INJECT_FAULT declares that the function can **fail** due to an out of memory (OOM) condition. FORBID_FAULT means that the function promises never to fail due to OOM. FORBID_FAULT puts the thread in a FORBID_FAULT state for the duration of the function call. You will get an assert if you allocate memory (even with the C++ new operator) or call a function declared INJECT_FAULT. -#### 2.10.1.3 GC_TRIGGERS/GC_NOTRIGGER +#### 2.10.1.3 GC_TRIGGERS/GC_NOTRIGGER Declares whether the function is allowed to trigger a GC. GC_NOTRIGGER puts the thread in a NOTRIGGER state where any call to a GC_TRIGGERS function will assert. **Observation:** THROWS does not necessarily imply GC_TRIGGERS. COMPlusThrow does not trigger GC. -#### 2.10.1.4 MODE_PREEMPTIVE/ MODE_COOPERATIVE/ MODE_ANY +#### 2.10.1.4 MODE_PREEMPTIVE/ MODE_COOPERATIVE/ MODE_ANY This item asserts that the thread is in a particular mode or declares that the function is mode-agnostic. It does not change the state of the thread in any way. -#### 2.10.1.5 LOADS_TYPE(_loadlevel_) +#### 2.10.1.5 LOADS_TYPE(_loadlevel_) This item asserts that the function may invoke the loader and cause a type to loaded up to (and including) the indicated loadlevel. Valid load levels are taken from ClassLoadLevel enumerationin [classLoadLevel.h](https://github.com/dotnet/runtime/blob/master/src/coreclr/src/vm/classloadlevel.h). The CLR asserts if any attempt is made to load a type past the current limit set by LOADS_TYPE. A call to any function that has a LOADS_TYPE contract is treated as an attempt to load a type up to that limit. -#### 2.10.1.6 CAN_TAKE_LOCK / CANNOT_TAKE_LOCK +#### 2.10.1.6 CAN_TAKE_LOCK / CANNOT_TAKE_LOCK These declare whether a function or callee takes any kind of EE or user lock: Crst, SpinLock, readerwriter, clr critical section, or even your own home-grown spin lock (e.g., ExecutionManager::IncrementReader). @@ -1156,7 +1156,7 @@ In TLS we keep track of the current intent (whether to lock), and actual reality - Remembers stack of lock pointers for diagnosis - ASSERT_NO_EE_LOCKS_HELD(): Handy way for you to verify no locks are held right now on this thread (i.e., lock count == 0) -#### 2.10.1.7 EE_THREAD_REQUIRED / EE_THREAD_NOT_REQUIRED +#### 2.10.1.7 EE_THREAD_REQUIRED / EE_THREAD_NOT_REQUIRED These declare whether a function or callee deals with the case "GetThread() == NULL". @@ -1206,21 +1206,21 @@ You should only use BEGIN/END_GETTHREAD_ALLOWED(_IN_NO_THROW_REGION) if: If the latter is true, it's generally best to push BEGIN/END_GETTHREAD_ALLOWED down the callee chain so all callers benefit. -#### 2.10.1.8 PRECONDITION(_expr_) +#### 2.10.1.8 PRECONDITION(_expr_) This is pretty self-explanatory. It is basically an **_ASSERTE.** Both _ASSERTE's and PRECONDITIONS are used widely in the codebase. The expression can evaluate to either a Boolean or a Check. -#### 2.10.1.9 POSTCONDITION(_expr_) +#### 2.10.1.9 POSTCONDITION(_expr_) This is an expression that's tested on a _normal_ function exit. It will not be tested if an exception is thrown out of the function. Postconditions can access the function's locals provided that the locals were declared at the top level scope of the function. C++ objects will not have been destructed yet. Because of the limitations of our macro infrastructure, this item imposes some syntactic ugliness into the function. More on this below. -### 2.10.2 Is order important? +### 2.10.2 Is order important? Preconditions and postconditions will execute in the order declared. The "intrinsic" items will execute before any preconditions regardless of where they appear. -### 2.10.3 Using the right form of contract. +### 2.10.3 Using the right form of contract. Contracts come in several forms: @@ -1231,7 +1231,7 @@ Contracts come in several forms: - LIMITED_METHOD_CONTRACT: A static contract equivalent to NOTHROW/GC_NOTRIGGER/FORBID_FAULT/MODE_ANY/CANNOT_TAKE_LOCK. Use this form only for trivial one-liner functions. Remember it does not do runtime checks so it should not be used for complex functions. - WRAPPER_NO_CONTRACT: A static no-op contract for functions that trivially wrap another. This was invented back when we didn't have static contracts and we now wish it hadn't been invented. Please don't use this in new code. -### 2.10.4 When is it safe to use a runtime contract? +### 2.10.4 When is it safe to use a runtime contract? Contracts do not require that current thread have a Thread structure. Even those annotations that explicitly check Thread bits (the GC and MODE annotations) will correctly handle the NULL ThreadState case. @@ -1242,17 +1242,17 @@ You cannot use runtime contracts if: - Your code is callable from the implementation of FLS (Fiber Local Storage). This may result in an infinite recursion as the contract infrastructure itself uses FLS. - Your code makes a net change to the ClrDebugState. Only the contract infrastructure should be doing this but see below for more details. -### 2.10.5 Do not make unscoped changes to the ClrDebugState. +### 2.10.5 Do not make unscoped changes to the ClrDebugState. The ClrDebugState is the per-thread data structure that houses all of the flag bits set and tested by contracts (i.e. NOTHROW, NOTRIGGER.). You should never modify this data directly. Always go through contracts or the specific holders (such as GCX_NOTRIGGER.) This data is meant to be changed in a scoped manner only. In particular, the CONTRACT destructor always restores the _entire_ ClrDebugState from a copy saved on function entry. This means that any net changes made by the function body itself will be wiped out when the function exits via local _or_ non-local control. The same caveat is true for holders such as GCX_NOTRIGGER. -### 2.10.6 For more details... +### 2.10.6 For more details... See the big block comment at the start of [src\inc\contract.h][contract.h]. -## 2.11 Is your code DAC compliant? +## 2.11 Is your code DAC compliant? At a high level, DAC is a technique to enable execution of CLR algorithms from out-of-process (eg. on a memory dump). Core CLR code is compiled in a special mode (with DACCESS_COMPILE defined) where all pointer dereferences are intercepted. diff --git a/docs/coding-guidelines/clr-jit-coding-conventions.md b/docs/coding-guidelines/clr-jit-coding-conventions.md index 50d95fdf6208..300ccfc914b9 100644 --- a/docs/coding-guidelines/clr-jit-coding-conventions.md +++ b/docs/coding-guidelines/clr-jit-coding-conventions.md @@ -128,13 +128,13 @@ Note that these conventions are different from the CLR C++ Coding Conventions, d * [15.8 Memory allocation](#15.8) * [15.9 Obsoleting functions, classes and macros](#15.9) -# 4 Principles +# 4 Principles As stated above, the primary purpose of these conventions is to improve readability and understandability of the source code, by making it easier for any developer, now or in the future, to easily read, understand, and modify any portion of the source code. It is assumed that developers should be able to use the Visual Studio editor and debugger to the fullest extent possible. Thus, the conventions should allow us to leverage Visual Studio IntelliSense, editing and formatting, debugging, and so forth. The conventions will not preclude the use of other editors. For example, function declaration commenting style should be such that IntelliSense will automatically display that comment when typing that function name at a use site. Indenting style should be such that using Visual Studio automatic formatting rules creates correctly formatted code. -# 5 Spaces, not tabs +# 5 Spaces, not tabs Use spaces, not tabs. Files should not contain tab characters. @@ -142,7 +142,7 @@ Indenting is 4 characters per indent level. In Visual Studio, go to "Tools | Options ... | Text Editor | All Languages | Tabs", edit the tab size setting to be 4 spaces, and select the "Insert spaces" radio-button to enable conversion of tabs to spaces. -# 6 Source code line width +# 6 Source code line width A source code line should be limited to a reasonable length, so it fits in a reasonably-sized editor window without scrolling or wrapping. Consider 120 characters the baseline of reasonable, adjusted for per-site judgment. @@ -155,25 +155,25 @@ A source code line should be limited to a reasonable length, so it fits in a rea Many editors support display of a vertical line at a specified column position. Enable this in your editor to easily know when you write past the specified maximum column position. Visual Studio has this feature if you install the "Productivity Power Tools": https://visualstudiogallery.msdn.microsoft.com/3a96a4dc-ba9c-4589-92c5-640e07332afd. -# 7 Commenting +# 7 Commenting -## 7.1 General +## 7.1 General A comment should never just restate what the code does. Instead it should answer a question about the code, such as why, when, or how. Comments that say we must do something need to also state why we must do this. Avoid using abbreviations or acronyms; it harms readability. -### 7.1.1 Comment style +### 7.1.1 Comment style We prefer end-of-line style `//` comments to original C `/* */` comments. One important exception is when adding a small comment within an argument list to help document the argument, e.g., `PrintIt(/* AlignIt */ true);` (However, see section FIXTHIS for the suggested alternative to the form.) -### 7.1.2 Spelling and grammar +### 7.1.2 Spelling and grammar Check for spelling and grammar errors in your comments: just because you can understand the comment when you write it doesn't mean somebody else will parse it in the same way. Carefully consider the poor reader, especially those for whom English is not their first language. -### 7.1.3 Bug IDs +### 7.1.3 Bug IDs Don't put the bug or issue identifier (ID) of a fixed bug or completed feature in the source code comments. Such IDs become obsolete when (and not if) the bug tracking system changes, and are an indirect source of information. Also, understanding the bug report might be difficult in the absence of fresh context. Rather, the essence of the bug fix should be distilled into an appropriate comment. The precise condition that a case covers should be specified in the comment, as for all code. @@ -183,11 +183,11 @@ Bug IDs of active bugs may be used in the source code to prevent other people fr One thing that would be useful is for a particular case in code to be associated with a test case that exercises the case. This only makes sense if the case in question is localized to one or a few locations in the code, not pervasive and spread throughout the code. However, we don't currently have a good mechanism for referencing test cases (or other external metadata). -### 7.1.4 Email names +### 7.1.4 Email names Email names or full names should not be used in the source code as people move on to other projects, leave the company, leave another company when working on the JIT in the open source world, or simply stop working on the JIT for some reason. For example, a comment that states, "Talk to JohnDoe to understand this code" isn't helpful after JohnDoe has left the company or is otherwise not available. -### 7.1.5 TODO +### 7.1.5 TODO "TODO" comments in the code should be used to identify areas in the code that: @@ -220,11 +220,11 @@ Examples: // case above: if (arm_Valid_Imm_For_Instr(ins, val)) ... ``` -### 7.1.6 Performance +### 7.1.6 Performance Be sure to comment the performance characteristics (memory and time) of an API, class, sensitive block of code, line of code that looks simple but actually does something complex, etc. -## 7.2 File header comment +## 7.2 File header comment C and C++ source files (header files and implementation files) must include a file header comment at the beginning of the file that describes the file, gives the file owner, and gives some basic information about the purpose of the file, related documents, etc. The format of this header is as follows: @@ -239,7 +239,7 @@ C and C++ source files (header files and implementation files) must include a fi Major components usually occupy their own file. The top of the file is a good place to document the design of that component, including any information that would be helpful to a new reader of the code. A reference can be made to an actual design and implementation document (specification), but that document must be co-located with the source code, and not on some server that is unlikely to remain active for as long as the source will live. -## 7.3 Commenting code blocks +## 7.3 Commenting code blocks Properly commented code blocks allow code to be scanned through and read like a book. There are a number of different commenting conventions that can be used for blocks of code, ranging from comments with significant whitespace to help visually distinguish major code segments to follow, down to single end-of-line comments to annotate individual statements or expressions. Choose the comment style that creates the most readable code. @@ -311,7 +311,7 @@ CorElementType MetaSig::NextArgNormalized() } ``` -## 7.4 Commenting variables +## 7.4 Commenting variables All global variables and C++ class data members must be commented at the point of declaration. @@ -344,7 +344,7 @@ class Thread }; ``` -## 7.5 Commenting `#ifdefs` +## 7.5 Commenting `#ifdefs` Do specify the macro name in a comment at the end of the closing `#endif` of a long or nested `#if`/`#ifdef`. @@ -405,11 +405,11 @@ Wrong: #endif // _TARGET_ARM_ ``` -# 8 Naming Conventions +# 8 Naming Conventions Names should be sufficiently descriptive to immediately indicate the purpose of the function or variable. -## 8.1 General +## 8.1 General It is useful for names to be unique, to make it easier to search for them in the code. For example, it might make sense for every class to implement a debug-only `dump()` function. It's a simple name, and descriptive. However, if you do a simple textual search ("grep" or "findstr", or "Find in Files" in Visual Studio) for "dump", you will find far too many to be useful. Additionally, Visual Studio IntelliSense often gets confused when using "Go To Reference" or "Find All References" for such a common word that appears in many places (especially for our imprecise IntelliSense projects), rendering IntelliSense browsing also less useful. @@ -437,7 +437,7 @@ Bad: bool isVerificationDisabled, dontStressHeap; ``` -## 8.2 Hungarian or other prefix/postfix naming +## 8.2 Hungarian or other prefix/postfix naming We do not follow "Hungarian" naming, with a detailed set of name prefix requirements. We do suggest or require prefixes in a few cases, described below. @@ -452,7 +452,7 @@ Two common Hungarian conventions that we do not encourage are: It is often helpful to choose a short, descriptive prefix for all members of a class, e.g. "lv" for local variables, or "emit" for the emitter. This short prefix also helps make the name unique, and easier to find with "grep". Thus, you might have "m_lvFoo" for a non-static member variable of a class that is using a "lv" prefix. -## 8.3 Macro names +## 8.3 Macro names All macros and macro constants should have uppercase names. Words within a name must be separated by underscores. The following statements illustrate some macro and macro constant names: @@ -479,7 +479,7 @@ All macro parameter names should be surrounded by parentheses in the macro defin All this being said, there still are some cases where macros are useful, such as the JIT phase list or instruction table, where data is defined in a header file by a series of macro functions that must be defined before #including the header file. This allows the macro function to be defined in different ways and the header file to be included multiple times to create different definitions from the same data. Look, for example, at instrsxarch.h. (Unfortunately, this technique confuses Visual Studio Intellisense.) -## 8.4 Local variables +## 8.4 Local variables Local function variables should be named using camelCasing: @@ -496,7 +496,7 @@ TypeHandle thConstraintType; // constraint for the type argument MethodDesc* pOverridingMD; // the override for the given method ``` -## 8.5 Global variables +## 8.5 Global variables Global variables follow the same rules as local variable names, but should be prefixed by a "g_". The following global variable declarations illustrate variable names that adhere to this convention: @@ -505,7 +505,7 @@ EEConfig* g_Config; // Configuration manager interface bool g_isVerifierEnabled; // Is the verifier enabled? ``` -## 8.6 Function parameters +## 8.6 Function parameters Function parameters follow the same rules as local variables @@ -513,7 +513,7 @@ Function parameters follow the same rules as local variables int Point(int x, int y) : m_x(x), m_y(y) {} ``` -## 8.7 Non-static C++ member variables +## 8.7 Non-static C++ member variables Non-static C++ member variables should follow the same rules as local variable names, but should be prefixed by "m_". @@ -534,7 +534,7 @@ class MetaSig }; ``` -## 8.8 Static member variables +## 8.8 Static member variables Static C++ member variables should follow the same rules as non-static member variable names, but should be prefixed by "s_" instead of "m_". @@ -546,7 +546,7 @@ class Thread }; ``` -## 8.9 Functions, including member functions +## 8.9 Functions, including member functions Functions should be named in PascalCasing format: @@ -570,7 +570,7 @@ bool lvaIsPreSpilled(unsigned lclNum, regMaskTP preSpillMask); This makes it more likely that the names are globally unique. The tag can start either with a lower or upper case. -## 8.10 Classes +## 8.10 Classes C++ class names should be named in PascalCasing format. A "C" prefix should not be used (thus, use `FooBar`, not `CFooBar` as is used in some conventions). The following C++ class declaration demonstrates proper adherence to this convention: @@ -590,7 +590,7 @@ class ICorStaticInfo : public virtual ICorMethodInfo }; ``` -## 8.11 Enums +## 8.11 Enums Enum type names are PascalCased, like function names. @@ -611,7 +611,7 @@ enum RoundLevel > The JIT is currently very inconsistent with respect to enum type and element naming standards. Perhaps we should adopt the VM standard of prefixing enum names with "k", and using PascalCasing for names, with a Hungarian-style per-enum prefix. For example, kRoundLevelNever or kRLNever / kRLCmpConst. -# 9 Function Structure +# 9 Function Structure The term "function" here refers to both C-style functions as well as C++ member functions, unless otherwise specified. @@ -624,7 +624,7 @@ Some code uses a third type of file, an "implementation header file" (or .hpp fi It is acceptable to put very small inline member function implementations directly in the header file, at the point of declaration. -## 9.1 In a header file +## 9.1 In a header file This is the format for the declaration of a function in a header file. @@ -670,7 +670,7 @@ void Foo(int i); T Min(T a, T b); ``` -### 9.1.1 Comments for function declarations +### 9.1.1 Comments for function declarations Function declarations in a header file should have a few lines of documentation using single-line comments, indicating the intent of the prototyped function. @@ -702,7 +702,7 @@ public: }; ``` -## 9.2 In an implementation file +## 9.2 In an implementation file Typically for each header file in the project there will be an implementation file that contains the function implementations and it is named using the .cpp suffix. @@ -710,13 +710,13 @@ The signature of a function definition in the implementation file should use the Generally the order of the functions in the implementation file should match to the order in the header file. -### 9.2.1 Function size +### 9.2.1 Function size It is recommended that functions bodies (from the opening brace to the closing brace) are no more than 200 lines of text (including any empty lines and lines with just a single brace in the function body). A large function is difficult to scan and understand. Use your best judgment here. -## 9.3 Function definitions +## 9.3 Function definitions If the header file uses simple comments for the function prototypes, then the function definition in the implementation file should include a full, descriptive function header. If the header file uses a full function header comments for the function prototypes, then the function definition in the implementation file can use a few descriptive lines of comments. That is, there should be a full descriptive comment for the function, but only in one place. The recommendation is to place the detailed comments at the definition site. One primary reason for this choice is that most code readers spend much more time looking at the implementation files than they do looking at the header files. @@ -744,7 +744,7 @@ BOOL IsVarArg(Module* pModule, } ``` -## 9.4 Function header comment +## 9.4 Function header comment All functions, except trivial accessors and wrappers, should have a function header comment which describes the behavior and the implementation details of the function. The format of the function header in an implementation file is as shown below. @@ -781,7 +781,7 @@ If you can formulate any assumptions as asserts in the code itself, you should d ``` -### 9.4.1 Example +### 9.4.1 Example The following is a sample of a completed function definition: @@ -814,9 +814,9 @@ BOOL MetaSig::IsVarArg(Module* pModule, } ``` -## 9.5 Specific function information +## 9.5 Specific function information -### 9.5.1 Constructor with member initialization list +### 9.5.1 Constructor with member initialization list This is the format to use for specifying the member initialization list @@ -835,7 +835,7 @@ ClassName::ClassName(* , Note that the order of the initializers is defined by C++ to be member declaration order, and some compilers will report an error if the order is incorrect. -# 10 Local Variable Declarations +# 10 Local Variable Declarations Generally, variables should be declared at or close to the location of their first initialization, especially for large functions. For small functions, it is fine to declare all the locals at the start of the method. @@ -856,7 +856,7 @@ int errorCode = 0; FindIllegalCharacter(name, &iPosition, &errorCode); ``` -## 10.1 Pointer declarations +## 10.1 Pointer declarations For pointer declaration, there should be no space between the type and the `*`, and one or more spaces between the `*` and the following symbol being declared. This emphasizes that the `*` is logically part of the type declaration (even though the C/C++ parser binds the `*` to the name). @@ -926,9 +926,9 @@ int ** ppi; int * * ppi; ``` -# 11 Spacing +# 11 Spacing -## 11.1 Logical and arithmetic expressions +## 11.1 Logical and arithmetic expressions The following example illustrates correct spacing of parentheses for expressions: @@ -960,7 +960,7 @@ if (a < b + c) // binary expression "b + c" is not parenthesized x = sizeof f; // "sizeof" requires parentheses: sizeof(f) ``` -## 11.2 Continuing statements on multiple lines +## 11.2 Continuing statements on multiple lines When wrapping statements, binary operators are left hanging after the left expression, so that the continuation is obvious. The right expression is indented to match the left expression. Additional spaces between the parentheses may be inserted as necessary in order to clarify how a complex conditional expression is expected to be evaluated. In fact, additional spaces are encouraged so that it is easy to read the condition. @@ -989,7 +989,7 @@ if ((condition1) && (condition2B))) ``` -## 11.3 Function call +## 11.3 Function call When calling a function, use the following formatting: @@ -1054,7 +1054,7 @@ GenTreePtr asgStmt = gtNewStmt(asg, ilOffset); *pAfterStmt = fgInsertStmtAfter(block, *pAfterStmt, asgStmt); ``` -## 11.4 Arrays +## 11.4 Arrays Array indices should not have spaces around them. @@ -1068,7 +1068,7 @@ Wrong: int val = array[ i ] + array[ j * k ]; ``` -# 12 Control Structures +# 12 Control Structures The structure for control-flow structures like `if`, `while`, and `do-while` blocks is as follows: @@ -1088,7 +1088,7 @@ Each distinct statement must be on a separate line. While this improves readabil It is generally a good idea to leave a blank line after a control structure, for readability. -## 12.1 Braces for `if` +## 12.1 Braces for `if` Braces are required for all `else` blocks of all `if` statements. However, "then" blocks (the true case of an `if` statement) may omit braces if: @@ -1155,7 +1155,7 @@ if (x != 5) } ``` -## 12.3 Braces for looping structures +## 12.3 Braces for looping structures Similar spacing should be used for `for`, `while` and `do-while` statements. These examples show correct placement of braces: @@ -1209,7 +1209,7 @@ Foo* p; for (p = start; p != q; p = p->Next); ``` -## 12.4 `switch` statements +## 12.4 `switch` statements For `switch` statements, each `case` label must be aligned to the same column as the `switch` (and the opening brace). The code body for each `case` label should be indented one level. Note that this implies that each case label must exist on its own line; do not place multiple case labels on the same line. @@ -1253,7 +1253,7 @@ default: } ``` -## 12.5 Examples +## 12.5 Examples The following skeletal statements illustrate the proper indentation and placement of braces for control structures. In all cases, indentations consist of four spaces each. @@ -1293,7 +1293,7 @@ int MyClass::FooBar(int iArgumentOne /* = 0 */, } ``` -# 13 C++ Classes +# 13 C++ Classes The format for a C++ class declaration is as follows. @@ -1413,9 +1413,9 @@ private: }; ``` -# 14 Preprocessor +# 14 Preprocessor -## 14.1 Conditional compilation +## 14.1 Conditional compilation Prefer `#if` over `#ifdef` for conditional compilation. This allows setting the macro to 0 to disable it. `#ifdef` will not work in this case, and instead requires ensuring that the macro is not defined. @@ -1439,7 +1439,7 @@ If you have conditional `#if`/`#ifdef` in the source, explain what they do, just Minimize conditional compilation by defining good abstractions, partitioning files better, or defining appropriate constants or macros. -### 14.1.1 `#if FEATURE` +### 14.1.1 `#if FEATURE` If a new or existing feature is being added or modified then use a `#define FEATURE_XXX` to both highlight the code used to implement this and to allow the JIT to be compiled both with and without the feature. @@ -1453,13 +1453,13 @@ void Compiler::optValnumCSEinit() Note that periodically we do need to go through and remove FEATURE_* defines that are always enabled, and will never be disabled. -### 14.1.2 Disabling code +### 14.1.2 Disabling code It is generally discouraged to permanently disable code by commenting it out or by putting `#if 0` around it, in an attempt to keep it around for reference. This reduces the hygiene of the code base over time and such disabled code is rarely actually useful. Instead, such disabled code should be entirely deleted. If you do disable code without deleting it, then you must add a comment as to why the code is disabled, and why it is better to leave the code disabled than it is to delete it. One exception is that it is often useful to `#if 0` code that is useful for debugging an area, but is not otherwise useful. Even in this case, however, it is probably better to introduce a COMPlus_* variable to enable the special debugging mode. -### 14.1.3 Debug code +### 14.1.3 Debug code Use `#ifdef DEBUG` for debug-only code. Do not use `#ifdef _DEBUG` (with a leading underscore). @@ -1513,7 +1513,7 @@ if (verbose) Always put debug-only code under `#ifdef DEBUG` (or the equivalent). Do not assume the compiler will get rid of your debug-only code in a non-debug build flavor. This also documents more clearly that you intend the code to be debug-only. -## 14.2 `#define` constants +## 14.2 `#define` constants Use `const` or `enum` instead of `#define` for constants when possible. The value will still be constant-folded, but the `const` adds type safety. @@ -1525,7 +1525,7 @@ If you do use `#define` constants, the values of multiple constant defines shoul #define DEVICE_NAME L"MyDevice" ``` -## 14.3 Macro functions +## 14.3 Macro functions Expressions (except very simple constants) should be enclosed in parentheses to prevent incorrect multiple expansion of the macro arguments. @@ -1533,17 +1533,17 @@ Enclose all argument instances in parentheses. Macro arguments should be named with two leading underscores, to prevent their names from being confused with normal source code names, such as variable or function names. -### 14.3.1 Macro functions versus C++ inline functions +### 14.3.1 Macro functions versus C++ inline functions All macro functions should be replaced with a C++ inline function or C++ inline template function if possible. This allows type checking of arguments, and avoids the problem of macro-expansion of macro arguments. -### 14.3.2 Line continuation +### 14.3.2 Line continuation All the `\` at the end of a multi-line macro definition should be aligned with each other. There must be no `\` on the last line of a multi-line macro definition. -### 14.3.3 Multi-statement macro functions +### 14.3.3 Multi-statement macro functions Functional macro definitions with multiple statements or with `if` statements should use `do { } while(0)` to ensure that the statements will always be compiled together as a single statement block. This ensures that those who mistake the macro for a function don't accidentally split the statements into multiple scopes when the macro is used. Example: consider a macro used like this: @@ -1571,11 +1571,11 @@ Right: The braces ensure the statement block isn't split. The `do { ... } while(0)` ensures that uses of the macro always end with a semicolon. -### 14.3.4 Control flow +### 14.3.4 Control flow Avoid using control flow inside of preprocessor functions. Since these read like function calls in the source it is best if they also act like function calls. The expectation should be that all arguments will get evaluated one time and we should avoid strange behavior such as only evaluating an argument if a prior argument evaluates to true or evaluating some argument multiple times. -### 14.3.5 Scope +### 14.3.5 Scope Macros that require a pair of macros due to the introduction of a scope are strongly discouraged in the JIT. These do exist in the VM and the convention there is to have a _BEGIN and _END suffix at the end of a common all caps macro name. @@ -1584,7 +1584,7 @@ Macros that require a pair of macros due to the introduction of a scope are stro #define PAL_CPP_EHUNWIND_END } ``` -### 14.3.6 Examples +### 14.3.6 Examples ```c++ #define MIN(_x, _y) (((__x) < (__y)) ? (__x) : (__y)) @@ -1602,21 +1602,21 @@ Macros that require a pair of macros due to the introduction of a scope are stro while(0) ``` -# 15 Language Usage Rules +# 15 Language Usage Rules The following rules are not related to formatting; they provide guidance to improve semantic clarity. -## 15.1 C/C++ general +## 15.1 C/C++ general -### 15.1.1 Casts +### 15.1.1 Casts Instead of C-style casts, use `static_cast<>`, `const_cast<>` and `reinterpret_cast<>` for pointers as they are more expressive and type-safe. -### 15.1.2 Globals +### 15.1.2 Globals Avoid global variables as they pollute the global namespace and require careful handling to ensure thread safety. Prefer static class variables. -### 15.1.3 `bool` versus `BOOL` +### 15.1.3 `bool` versus `BOOL` `bool` is a built-in C++ language type. `bool` variables contain the value `true` or `false`. When stored (such as a member of a struct), it is one byte in size, and `true` is stored as one, `false` as zero. @@ -1634,7 +1634,7 @@ Wrong: BOOL isComplete = TRUE; ``` -### 15.1.4 `NULL` and `nullptr` +### 15.1.4 `NULL` and `nullptr` Use the C++11 `nullptr` keyword when assigning a "null" to a pointer variable, or comparing a pointer variable against "null". Do not use `NULL`. @@ -1655,7 +1655,7 @@ if (p == 0) ... ``` -### 15.1.5 Use of zero +### 15.1.5 Use of zero Integers should be explicitly checked against 0. Pointers should be explicitly checked against `nullptr`. Types that have a legal zero value should use a named zero value, not an explicit zero. For example, `regMaskTP` is a register mask type. Use `RBM_NONE` instead of a constant zero for it. @@ -1691,7 +1691,7 @@ if (i) ... ``` -### 15.1.6 Nested assignment +### 15.1.6 Nested assignment Do not use assignments within `if` or other control-flow statements. @@ -1706,7 +1706,7 @@ Wrong: if ((x = strlen(szMethodName)) > 5) ``` -### 15.1.7 `if` conditions +### 15.1.7 `if` conditions Do not place constants first in comparison checks (unless that reads more naturally), as a trick to avoid accidental assignment in a condition, as assignment within a condition will be a compiler error in our builds. @@ -1720,7 +1720,7 @@ Wrong: if (5 == x) ``` -### 15.1.8 `const` +### 15.1.8 `const` Use of the `const` qualifier is encouraged. @@ -1730,7 +1730,7 @@ It is specifically encouraged to mark class member function as `const`, especial var_types TypeGet() const { return gtType; } ``` -### 15.1.9 Ternary operators +### 15.1.9 Ternary operators Ternary operators `?:` are best used to make quick and simple decisions inside function invocations. Don't use it as a replacement for the `if` statement. Note that putting individual statements on their own line makes it easy to set debugging breakpoints on them. Use of nested ternary operators is strongly discouraged. Using it for simple assignment of a single condition is fine. It's recommended that the "then" and "else" conditions of the ternary operator do not have side-effects. @@ -1762,7 +1762,7 @@ Wrong: x = (a == b) ? ((c == d) ? 1 : 2) : 3; // nested ?: disallowed ``` -### 15.1.10 Use of `goto` +### 15.1.10 Use of `goto` The `goto` statement should be avoided. @@ -1779,7 +1779,7 @@ SHIFT: You should think very hard about other ways to code this to avoid using a `goto`. One of the biggest problems is that the `goto` label can be targeted from anyplace in the function, which makes understanding the code very difficult. -## 15.2 Source file organization +## 15.2 Source file organization The general guideline is that header files should not be bigger than 1000 lines and implementation files should not be bigger than 5000 lines of code (including comments, function headers, etc.). Files larger than this should be split up and organized in some better logical fashion. @@ -1795,19 +1795,19 @@ Maintain clear visual separation and identification of "segments" of API, and in ``` -## 15.3 Function declarations +## 15.3 Function declarations -### 15.3.1 Default arguments +### 15.3.1 Default arguments Avoid default arguments values unless the argument has very little semantic impact, especially when adding a new argument to an existing method. Avoiding default values forces all call sites to think about the argument value to use, and prevents call sites from silently opting into unexpected behavior. -### 15.3.2 Overloading +### 15.3.2 Overloading Never overload functions on a primitive type (e.g. `Foo(int i)` and `Foo(long l)`). Avoid operator overloading unless the overload matches the "natural" semantics of the operator when applied to integral types. -### 15.3.3 Enums versus primitive parameter types +### 15.3.3 Enums versus primitive parameter types Use enums rather than primitive types for function arguments as it promotes type-safety, and the function signature is more descriptive. @@ -1843,15 +1843,15 @@ Good: Bar(DS_ALLOW_DUPS, FORMAT_FIT_TO_SCREEN); ``` -### 15.3.4 Functions returning pointers +### 15.3.4 Functions returning pointers Functions that return pointers must think carefully about whether a `nullptr` return value could be ambiguous between success with a `nullptr` return value and failure. -### 15.3.5 Reference arguments +### 15.3.5 Reference arguments Never use non-const reference arguments as the call-site has no indication that the argument may change. Const reference arguments may be used as they do not have the above problem, and are also required for operators. -### 15.3.6 Resource release +### 15.3.6 Resource release If you call a function to release a resource and pass it a pointer or handle, you must set the pointer to `nullptr` or handle to `INVALID_HANDLE`. This ensures that the pointer or handle will not be accidentally used in code that follows. @@ -1860,33 +1860,33 @@ CloseHandle(hMyFile); hMyFile = INVALID_HANDLE; ``` -### 15.3.7 OUT parameters +### 15.3.7 OUT parameters Functions with OUT parameters must initialize them (e.g., to 0 or `nullptr`) on entry to the function. If the function fails, this protects the caller from accidental use of potentially uninitialized values. -## 15.4 STL usage +## 15.4 STL usage > JIT STL usage rules need to be specified. -## 15.5 C++ class design +## 15.5 C++ class design -### 15.5.1 Public data members +### 15.5.1 Public data members Do not declare public data members. Instead, public accessor functions should be exposed to access class members. -### 15.5.2 Friend functions +### 15.5.2 Friend functions Avoid friend functions - they expose internals of the class to the friend function, making subsequent changes to the class more fragile. However, it is notably worse to make everything public. -### 15.5.3 Constructors +### 15.5.3 Constructors If you declare a constructor, make sure to initialize all the class data members. -### 15.5.4 Destructors +### 15.5.4 Destructors The JIT uses a specialized memory allocator that does not release memory until compilation is complete. Thus, it is generally bad to declare or require destructors and the calling of `delete`, since memory will never be reclaimed, and JIT developers used to never dealing with deallocation are also likely to omit calls to `delete`. -### 15.5.5 Operator overloading +### 15.5.5 Operator overloading Define operators such as `=`, `==`, and `!=` only if you really want and use this capability, and can make them super-efficient. @@ -1894,7 +1894,7 @@ Never define an operator to do anything other than the standard semantics for bu Never hide expensive work behind an operator. If it's not super efficient then make it an explicit method call. -### 15.5.6 Copy constructor and assignment operator +### 15.5.6 Copy constructor and assignment operator The compiler will automatically create a default copy constructor and assignment operator for a class. If that is undesirable, use the C++11 delete functions feature to prevent that, as so: @@ -1905,7 +1905,7 @@ private: MyClass& operator=(const MyClass&) = delete; ``` -### 15.5.7 Virtual functions +### 15.5.7 Virtual functions An overridden virtual method is explicitly declared virtual for clarity. @@ -1913,7 +1913,7 @@ Virtual functions have overhead, so don't use them unless you need polymorphism. However, note that virtual functions are often a cleaner, clearer, and faster solution than alternatives. -### 15.5.8 Inheritance +### 15.5.8 Inheritance Don't use inheritance just because it will work. Use it sparingly and judiciously, when it makes sense to the situation. Deeply nested hierarchies can be confusing to understand. @@ -1921,11 +1921,11 @@ Be careful with inheritance vs. containment. When in doubt, use containment. Don't use multiple implementation inheritance. -### 15.5.9 Global class objects +### 15.5.9 Global class objects Never declare a global instance of a class that has a constructor. Such constructors run in a non-deterministic order which is bad for reliability, and they have to be executed during process startup which is bad for startup performance. It is better to use lazy initialization in such a case. -## 15.6 Exceptions +## 15.6 Exceptions Exceptions should be thrown only on true error paths, not in the general execution of a function. Exceptions are quite expensive on some platforms. What is an error path is a subjective choice depending on the scenario. @@ -1933,13 +1933,13 @@ Do not catch all exceptions blindly. Catching all exceptions may mask a genuine Use care when referencing local variables within the "catch" and "finally" blocks, as their values may be an undefined state if an exception occurs. -## 15.7 Code tuning for performance optimization +## 15.7 Code tuning for performance optimization In general, code should be written to be readable first, and optimized for performance second. Don't optimize for the compiler! This will help to keep the code understandable, maintainable, and less prone to bugs. In the case of tight loops and code that has been analyzed to be a performance bottleneck, performance optimizations take a higher priority. Talk to the performance team if in doubt. -## 15.8 Memory allocation +## 15.8 Memory allocation All memory required during the compilation of a method must be allocated using the `Compiler`'s arena allocator. This allocator takes care of deallocating all the memory when compilation ends, avoiding memory leaks and simplifying memory management. @@ -1977,7 +1977,7 @@ Note that certain classes (e.g. `GenTree`) provide their own `new` operator over Debug/checked code that needs to allocate memory outside of method compilation can use the `HostAllocator` class and the associated `new` operator. This is a normal memory allocator that requires manual memory deallocation. -## 15.9 Obsoleting functions, classes and macros +## 15.9 Obsoleting functions, classes and macros The Visual C++ compiler has support built in for marking various user defined constructs as deprecated. This functionality is accessed via one of two mechanisms: diff --git a/docs/coding-guidelines/framework-design-guidelines-digest.md b/docs/coding-guidelines/framework-design-guidelines-digest.md index 337acdd0b762..9fbc987e914e 100644 --- a/docs/coding-guidelines/framework-design-guidelines-digest.md +++ b/docs/coding-guidelines/framework-design-guidelines-digest.md @@ -227,7 +227,7 @@ generic collections are only supported in the Framework version 2.0 and above. ✓ **DO** prefer throwing existing common general purpose exceptions like `ArgumentNullException`, `ArgumentOutOfRangeException`, -`InvalidOperationException` instead of defining custom exceptions. throw the +`InvalidOperationException` instead of defining custom exceptions. Throw the most specific exception possible. ✓ **DO** ensure that exception messages are clear and actionable. diff --git a/docs/coding-guidelines/pinvoke-checker.md b/docs/coding-guidelines/pinvoke-checker.md deleted file mode 100644 index 17c2d05c2e3c..000000000000 --- a/docs/coding-guidelines/pinvoke-checker.md +++ /dev/null @@ -1,39 +0,0 @@ -# PInvoke Analyzer - -During the build of any product library in dotnet/runtime, we use a Roslyn code analyzer to look for disallowed native calls (PInvokes). When there is a violation, it will fail the build. To fix the build, either find an alternative to the PInvoke or baseline the failure temporarily. To baseline it, add the function name in the format `module!entrypoint` to a file named PInvokeAnalyzerExceptionList.analyzerdata in the same folder as the project. [Here](https://github.com/dotnet/runtime/blob/master/src/libraries/System.Diagnostics.Process/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp) is an example. - -If you baseline a violation, please open an issue to fix it because the library likely cannot ship in this situation. It is better to not introduce the violation. We want to clean out any baselines. There are situations where a violation may be acceptable. One situation is where we are shipping the native implementation of the API. An example of this situation is `sni.dll` which is used by SqlClient. - -Each project is analyzed against one of two possible lists we maintain. - -## Legal UWP API's - -### Applies to -This applies to product libraries that are being built for use in a modern Windows app (aka UWP app, or app running on UAP). When building the `uap` configurations we will apply this check. If the library does not have a `uap` configuration explicitly listed in `Configuration.props` in the project folder, when targeting `uap` we will build the `netstandard` configuration, and apply this check. - -We do not currently apply this check to test binaries. Although when testing UWP libraries the tests must run within a test app, they do not need to pass through the store validation process. It is still possible they may call an API that does not work correctly within an app's security boundary and that call would have to be avoided. - -### Motivation -Not all PInvokes are legal within a UWP app. An allow-list is enforced when the Windows store ingests an app, and also in a build step in the Visual Studio build process for apps. If we produce a library for UWP use, any PInvokes it performs must be to API's that are on the allow-list or the app using the library will fail validation. - -### Implementation -To enforce this the analyzer consults the list [here](https://github.com/dotnet/buildtools/blob/master/src/Microsoft.DotNet.CodeAnalysis/PackageFiles/PinvokeAnalyzer_Win32UWPApis.txt). - -The analyzer is enabled by default in the configurations below by the setting of the MSBuild property `UWPCompatible`. We aim to make all our `netstandard` compliant libraries work within a UWP app, but in rare cases where a library cannot, the check can be disabled with `false` in the project file. - -There is also a more fine grained property `false` for temporary use. - -## Legal OneCore API's - -### Applies to -This applies to all other product libraries in all other configurations targeted at Windows. - -We do not currently apply this check to test binaries as they do not need to run on Windows Nano. - -### Motivation -.NET Core supports execution on Windows Nano, which has a reduced API surface area known as OneCore. To run on Windows Nano we cannot invoke any platform API that is not available on OneCore. - -### Implementation -To enforce this the analyzer consults the list [here](https://github.com/dotnet/buildtools/blob/master/src/Microsoft.DotNet.CodeAnalysis/PackageFiles/PinvokeAnalyzer_Win32Apis.txt). - -The analyzer is enabled by default when building for Windows, not a test, and not building for UWP. We aim to make all such configurations OneCore compliant, but in the rare cases where a library cannot be, the check can be disabled with `false` in the project file. diff --git a/docs/deep-dive-blog-posts.md b/docs/deep-dive-blog-posts.md index 34d0b406eb99..01278693e80e 100644 --- a/docs/deep-dive-blog-posts.md +++ b/docs/deep-dive-blog-posts.md @@ -6,6 +6,7 @@ - [Performance improvements in .NET Core 2.0](https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-core/) - [Performance improvements in .NET Core 2.1](https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-core-2-1/) - [Performance improvements in .NET Core 3.0](https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-core-3-0/) +- [Performance improvements in .NET 5](https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-5/) ### Posts that take a high-level look at the entire source: diff --git a/docs/design/coreclr/botr/corelib.md b/docs/design/coreclr/botr/corelib.md index 9b6f5dbb7f4c..b23ddba8143a 100644 --- a/docs/design/coreclr/botr/corelib.md +++ b/docs/design/coreclr/botr/corelib.md @@ -175,7 +175,7 @@ FCalls require a lot of boilerplate code, too much to describe here. Refer to [f [fcall]: https://github.com/dotnet/runtime/blob/master/src/coreclr/src/vm/fcall.h -### GC holes, FCall, and QCall +### GC holes, FCall, and QCall A more complete discussion on GC holes can be found in the [CLR Code Guide](../../../coding-guidelines/clr-code-guide.md). Look for ["Is your code GC-safe?"](../../../coding-guidelines/clr-code-guide.md#2.1). This tailored discussion motivates some of the reasons why FCall and QCall have some of their strange conventions. @@ -248,7 +248,7 @@ FCIMPL1(Object*, AppDomainNative::IsStringInterned, StringObject* pStringUNSAFE) FCIMPLEND ``` -## Registering your QCall or FCall method +## Registering your QCall or FCall method The CLR must know the name of your QCall and FCall methods, both in terms of the managed class and method names, as well as which native methods to call. That is done in [ecalllist.h][ecalllist], with two arrays. The first array maps namespace and class names to an array of function elements. That array of function elements then maps individual method names and signatures to function pointers. diff --git a/docs/design/coreclr/jit/first-class-structs.md b/docs/design/coreclr/jit/first-class-structs.md index 85fe060b8fb9..2153b8cb96aa 100644 --- a/docs/design/coreclr/jit/first-class-structs.md +++ b/docs/design/coreclr/jit/first-class-structs.md @@ -195,7 +195,7 @@ These work items are organized in priority order. Each work item should be able proceed independently, though the aggregate effect of multiple work items may be greater than the individual work items alone. -### Defer ABI-specific transformations to Lowering +### Defer ABI-specific transformations to Lowering This includes all copies and IR transformations that are only required to pass or return the arguments as required by the ABI. @@ -273,7 +273,7 @@ This would be enabled first by [Defer ABI-specific transformations to Lowering]( * Related: #6839, #9477, #16887 * Also, #11888, which suggests adding a struct promotion stress mode. -### Improve and Simplify Block and Block Assignment Morphing +### Improve and Simplify Block and Block Assignment Morphing * `fgMorphOneAsgBlockOp` should probably be eliminated, and its functionality either moved to `Lowering` or simply subsumed by the combination of the addition of fixed-size struct types and diff --git a/docs/design/coreclr/jit/lsra-detail.md b/docs/design/coreclr/jit/lsra-detail.md index 760657409ffb..7a35d1947adf 100644 --- a/docs/design/coreclr/jit/lsra-detail.md +++ b/docs/design/coreclr/jit/lsra-detail.md @@ -386,7 +386,7 @@ critical edges. This also captured in the `LsraBlockInfo` and is used by the res ### Building Intervals and RefPositions -`Interval`s are built for lclVars up-front. These are maintained in an array, +`Interval`s are built for lclVars up-front. These are maintained in an array, `localVarIntervals` which is indexed by the `lvVarIndex` (not the `varNum`, since we never allocate registers for non-tracked lclVars). Other intervals (for tree temps and internal registers) are constructed as the relevant node is encountered. @@ -402,7 +402,7 @@ node, which builds `RefPositions` according to the liveness model described abov - Then we create `RefPosition`s for each use in the instruction. - - A use of a register candidate lclVar becomes a `RefTypeUse` `RefPosition` on the + - A use of a register candidate lclVar becomes a `RefTypeUse` `RefPosition` on the `Interval` associated with the lclVar. - For tree-temp operands (including non-register-candidate lclVars), we may have one @@ -451,7 +451,7 @@ node, which builds `RefPositions` according to the liveness model described abov During this phase, preferences are set: -- Cross-interval preferences are expressed via the `relatedInterval` field of `Interval` +- Cross-interval preferences are expressed via the `relatedInterval` field of `Interval` - When a use is encountered, it is preferenced to the target `Interval` for the node, if that is deemed to be profitable. During register selection, it tries to @@ -469,7 +469,7 @@ During this phase, preferences are set: - Issue [#22374](https://github.com/dotnet/coreclr/issues/22374) also has a pointer to some methods that could benefit from improved preferencing. - + - Register preferences are set: - When the use or definition of a value must use a fixed register, due to instruction @@ -540,10 +540,10 @@ LinearScanAllocation(List refPositions) `Interval` to which it is preferenced, if any - Whether it is in the register preference set for the - `Interval` + `Interval` - Whether it is not only available but currently unassigned - (i.e. this register is NOT currently assigned to an `Interval` + (i.e. this register is NOT currently assigned to an `Interval` which is not currently live, but which previously occupied that register). @@ -756,7 +756,7 @@ enregisterable variable or temporary or physical register. It contains - `RefTypeZeroInit` is an `Interval` `RefPosition` that represents the position at entry at which a variable will be initialized to zero. - + - `RefTypeUpperVectorSave` is a `RefPosition` for an upper vector `Interval` that is inserted prior to a call that will kill the upper vector if it is currently occupying a register. The `Interval` is then marked with @@ -928,7 +928,7 @@ The potential enhancements to the JIT, some of which are referenced in this docu ## Code Quality Enhancements -### Merge Allocation of Free and Busy Registers +### Merge Allocation of Free and Busy Registers This is captured as [\#15408](https://github.com/dotnet/coreclr/issues/15408) Consider merging allocating free & busy regs. @@ -1012,8 +1012,8 @@ One strategy would be to do something along the lines of (appropriate hand-wavin the predecessor `varToRegMap`, iterate over the most frequently lclVars in the union of the live-in, uses and defs, and displace any `Intervals` that are occupying registers that would be more profitably used by the high-frequencly lclVars, weighing spill costs. - -### Avoid Splitting Loop Backedges + +### Avoid Splitting Loop Backedges This is captured as Issue [\#16857](https://github.com/dotnet/coreclr/issues/16857). @@ -1050,7 +1050,7 @@ investigating whether it would be worthwhile and cheaper to simply track this in ### Support Reg-Optional Defs Issues [\#7752](https://github.com/dotnet/coreclr/issues/7752) and -[\#7753](https://github.com/dotnet/coreclr/issues/7753) track the +[\#7753](https://github.com/dotnet/coreclr/issues/7753) track the proposal to support "folding" of operations using a tree temp when the defining operation supports read-modify-write (RMW) to memory. This involves supporting the possibility @@ -1059,14 +1059,14 @@ never occupy a register. ### Don't Pre-determine Reg-Optional Operand -Issue [\#6361](https://github.com/dotnet/coreclr/issues/6361) +Issue [\#6361](https://github.com/dotnet/coreclr/issues/6361) tracks the problem that `Lowering` currently has to select a single operand to be reg-optional, even if either operand could be. This requires some additional state because LSRA can't easily navigate from one use to the other to communicate whether the first operand has been assigned a register. - + ### Leveraging SSA form This has not yet been opened as a github issue. @@ -1129,30 +1129,30 @@ performance. This would also improve JIT throughput only for optimized code. References ---------- -1. Boissinot, B. et +1. Boissinot, B. et al "Fast liveness checking for ssa-form programs," CGO 2008, pp. 35-44. http://portal.acm.org/citation.cfm?id=1356058.1356064&coll=ACM&dl=ACM&CFID=105967773&CFTOKEN=80545349 -2. Boissinot, B. et al, "Revisiting +2. Boissinot, B. et al, "Revisiting Out-of-SSA Translation for Correctness, Code Quality and Efficiency," CGO 2009, pp. 114-125. -3. Wimmer, C. and Mössenböck, D. "Optimized +3. Wimmer, C. and Mössenböck, D. "Optimized Interval Splitting in a Linear Scan Register Allocator," ACM VEE 2005, pp. 132-141. -4. Wimmer, C. and Franz, M. "Linear Scan +4. Wimmer, C. and Franz, M. "Linear Scan Register Allocation on SSA Form," ACM CGO 2010, pp. 170-179. -5. Traub, O. et al "Quality and Speed in Linear-scan Register +5. Traub, O. et al "Quality and Speed in Linear-scan Register Allocation," SIGPLAN '98, pp. 142-151. -6. Olesen, J. "Greedy Register Allocation in LLVM 3.0," LLVM Project Blog, Sept. 2011. +6. Olesen, J. "Greedy Register Allocation in LLVM 3.0," LLVM Project Blog, Sept. 2011. (Last retrieved Feb. 2012) diff --git a/docs/design/coreclr/jit/ryujit-overview.md b/docs/design/coreclr/jit/ryujit-overview.md index 433043fd27e3..5288417a33d1 100644 --- a/docs/design/coreclr/jit/ryujit-overview.md +++ b/docs/design/coreclr/jit/ryujit-overview.md @@ -224,12 +224,12 @@ The top-level function of interest is `Compiler::compCompile`. It invokes the fo | [Register allocation](#reg-alloc) | Registers are assigned (`gtRegNum` and/or `gtRsvdRegs`), and the number of spill temps calculated. | | [Code Generation](#code-generation) | Determines frame layout. Generates code for each `BasicBlock`. Generates prolog & epilog code for the method. Emit EH, GC and Debug info. | -## Pre-import +## Pre-import Prior to reading in the IL for the method, the JIT initializes the local variable table, and scans the IL to find branch targets and form BasicBlocks. -## Importation +## Importation Importation is the phase that creates the IR for the method, reading in one IL instruction at a time, and building up the statements. During this process, it may need to generate IR with multiple, nested expressions. This is the @@ -245,7 +245,7 @@ and flagged. They are further validated, and possibly unmarked, during morphing. The `fgMorph` phase includes a number of transformations: -### Inlining +### Inlining The `fgInline` phase determines whether each call site is a candidate for inlining. The initial determination is made via a state machine that runs over the candidate method's IL. It estimates the native code size corresponding to the @@ -256,7 +256,7 @@ encountered that indicate that it may be unprofitable (or otherwise incorrect). inlinee compiler's trees are incorporated into the inliner compiler (the "parent"), with arguments and return values appropriately transformed. -### Struct Promotion +### Struct Promotion Struct promotion (`fgPromoteStructs()`) analyzes the local variables and temps, and determines if their fields are candidates for tracking (and possibly enregistering) separately. It first determines whether it is possible to @@ -269,14 +269,14 @@ individually referenced. When a lclVar is promoted, there are now N+1 lclVars for the struct, where N is the number of fields. The original struct lclVar is not considered to be tracked, but its fields may be. -### Mark Address-Exposed Locals +### Mark Address-Exposed Locals This phase traverses the expression trees, propagating the context (e.g. taking the address, indirecting) to determine which lclVars have their address taken, and which therefore will not be register candidates. If a struct lclVar has been promoted, and is then found to be address-taken, it will be considered "dependently promoted", which is an odd way of saying that the fields will still be separately tracked, but they will not be register candidates. -### Morph Blocks +### Morph Blocks What is often thought of as "morph" involves localized transformations to the trees. In addition to performing simple optimizing transformations, it performs some normalization that is required, such as converting field and array @@ -284,11 +284,11 @@ accesses into pointer arithmetic. It can (and must) be called by subsequent phas During the main Morph phase, the boolean `fgGlobalMorph` is set on the `Compiler` argument, which governs which transformations are permissible. -### Eliminate Qmarks +### Eliminate Qmarks This expands most `GT_QMARK`/`GT_COLON` trees into blocks, except for the case that is instantiating a condition. -## Flowgraph Analysis +## Flowgraph Analysis At this point, a number of analyses and transformations are done on the flowgraph: @@ -298,7 +298,7 @@ At this point, a number of analyses and transformations are done on the flowgrap * Identifying and normalizing loops (transforming while loops to "do while") * Cloning and unrolling of loops -## Normalize IR for Optimization +## Normalize IR for Optimization At this point, a number of properties are computed on the IR, and must remain valid for the remaining phases. We will call this "normalization" @@ -310,12 +310,12 @@ counts are needed. * `optOptimizeBools` – this optimizes Boolean expressions, and may change the flowgraph (why is it not done prior to reachability and dominators?) * Link the trees in evaluation order (setting `gtNext` and `gtPrev` fields): and `fgFindOperOrder()` and `fgSetBlockOrder()`. -## SSA and Value Numbering Optimizations +## SSA and Value Numbering Optimizations The next set of optimizations are built on top of SSA and value numbering. First, the SSA representation is built (during which dataflow analysis, aka liveness, is computed on the lclVars), then value numbering is done using SSA. -### Loop Invariant Code Hoisting +### Loop Invariant Code Hoisting This phase traverses all the loop nests, in outer-to-inner order (thus hoisting expressions outside the largest loop in which they are invariant). It traverses all of the statements in the blocks in the loop that are always executed. @@ -326,7 +326,7 @@ If the statement is: * Does not raise an exception OR occurs in the loop prior to any side-effects * Has a valid value number, and it is a lclVar defined outside the loop, or its children (the value numbers from which it was computed) are invariant. -### Copy Propagation +### Copy Propagation This phase walks each block in the graph (in dominator-first order, maintaining context between dominator and child) keeping track of every live definition. When it encounters a variable that shares the VN with a live definition, it @@ -335,20 +335,20 @@ is replaced with the variable in the live definition. The JIT currently requires that the IR be maintained in conventional SSA form, as there is no "out of SSA" translation (see the comments on `optVnCopyProp()` for more information). -### Common Subexpression Elimination (CSE) +### Common Subexpression Elimination (CSE) Utilizes value numbers to identify redundant computations, which are then evaluated to a new temp lclVar, and then reused. -### Assertion Propagation +### Assertion Propagation Utilizes value numbers to propagate and transform based on properties such as non-nullness. -### Range analysis +### Range analysis Optimize array index range checks based on value numbers and assertions. -## Rationalization +## Rationalization As the JIT has evolved, changes have been made to improve the ability to reason over the tree in both "tree order" and "linear order". These changes have been termed the "rationalization" of the IR. In the spirit of reuse and @@ -473,7 +473,7 @@ t0 = LCL_VAR byref V03 arg3 u:1 (last use) $c0 RETURN void $200 ``` -## Lowering +## Lowering Lowering is responsible for transforming the IR in such a way that the control flow, and any register requirements, are fully exposed. @@ -529,7 +529,7 @@ In such cases, it must ensure that they themselves are properly lowered. This in After all nodes are lowered, liveness is run in preparation for register allocation. -## Register allocation +## Register allocation The RyuJIT register allocator uses a Linear Scan algorithm, with an approach similar to [[2]](#[2]). In discussion it is referred to as either `LinearScan` (the name of the implementing class), or LSRA (Linear Scan Register @@ -622,7 +622,7 @@ Post-conditions: * `lvSpilled` flag is set if it is ever spilled * The maximum number of simultaneously-live spill locations of each type (used for spilling expression trees) has been communicated via calls to `compiler->tmpPreAllocateTemps(type)`. -## Code Generation +## Code Generation The process of code generation is relatively straightforward, as Lowering has done some of the work already. Code generation proceeds roughly as follows: @@ -858,8 +858,8 @@ a 'T'. ## References - + [1] P. Briggs, K. D. Cooper, T. J. Harvey, and L. T. Simpson, "Practical improvements to the construction and destruction of static single assignment form," Software --- Practice and Experience, vol. 28, no. 8, pp. 859---881, Jul. 1998. - + [2] Wimmer, C. and Mössenböck, D. "Optimized Interval Splitting in a Linear Scan Register Allocator," ACM VEE 2005, pp. 132-141. [http://portal.acm.org/citation.cfm?id=1064998&dl=ACM&coll=ACM&CFID=105967773&CFTOKEN=80545349](http://portal.acm.org/citation.cfm?id=1064998&dl=ACM&coll=ACM&CFID=105967773&CFTOKEN=80545349) diff --git a/docs/design/features/Linux-Hugepage-Crossgen2.md b/docs/design/features/Linux-Hugepage-Crossgen2.md index 28f219b592c0..dcc37774b398 100644 --- a/docs/design/features/Linux-Hugepage-Crossgen2.md +++ b/docs/design/features/Linux-Hugepage-Crossgen2.md @@ -28,7 +28,6 @@ Appendix A - Source for a simple copy into hugetlbfs program. ``` // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include #include @@ -99,4 +98,4 @@ int main(int argc, char** argv) close(fdDest); return 0; } -``` \ No newline at end of file +``` diff --git a/docs/design/features/source-generator-pinvokes.md b/docs/design/features/source-generator-pinvokes.md index dcd0944e8d44..1efec51604bc 100644 --- a/docs/design/features/source-generator-pinvokes.md +++ b/docs/design/features/source-generator-pinvokes.md @@ -214,7 +214,6 @@ namespace System.Runtime.InteropServices [IL Stubs description][il_stub_link] -[dotnet_link]: https://docs.microsoft.com/dotnet/core/tools/dotnet [typemarshal_link]: https://docs.microsoft.com/dotnet/standard/native-interop/type-marshaling [pinvoke_link]: https://docs.microsoft.com/dotnet/standard/native-interop/pinvoke [comwrappers_link]: https://github.com/dotnet/runtime/issues/1845 diff --git a/docs/project/api-review-process.md b/docs/project/api-review-process.md index aeaebb375616..e958896f9c1f 100644 --- a/docs/project/api-review-process.md +++ b/docs/project/api-review-process.md @@ -12,7 +12,7 @@ The rule of thumb is that we (**dotnet/runtime**) review every API that is being ## Steps -1. **Requester files an issue**. The issue description should contain a speclet that represents a sketch of the new APIs, including samples on how the APIs are being used. The goal isn't to get a complete API list, but a good handle on how the new APIs would roughly look like and in what scenarios they are being used. Here is [a good example](https://github.com/dotnet/corefx/issues/271). +1. **Requester files an issue**. The issue description should contain a speclet that represents a sketch of the new APIs, including samples on how the APIs are being used. The goal isn't to get a complete API list, but a good handle on how the new APIs would roughly look like and in what scenarios they are being used. Please use [this template](https://github.com/dotnet/runtime/issues/new?assignees=&labels=api-suggestion&template=02_api_proposal.md&title=). The issue should have the label `api-suggestion`. Here is [a good example](https://github.com/dotnet/runtime/issues/38344) of an issue following that template. 2. **We assign an owner**. We'll assign a dedicated owner from our side that sponsors the issue. This is usually [the area owner](issue-guide.md#areas) for which the API proposal or design change request was filed for. @@ -21,7 +21,7 @@ sponsors the issue. This is usually [the area owner](issue-guide.md#areas) for w decision whether we want to pursue the proposal or not. In this phase, the goal isn't necessarily to perform an in-depth review; rather, we want to make sure that the proposal is actionable, i.e. has a concrete design, a sketch of the -APIs and some code samples that show how it should be used. If changes are necessary, the requester is encouraged to edit the issue description. This allows folks joining later to understand the most recent proposal. To avoid confusion, the requester should maintain a tiny change log, like a bolded "Updates:" followed by a bullet point list of the updates that were being made. +APIs and some code samples that show how it should be used. If changes are necessary, the owner will set the label `api-needs-work`. To make the changes, the requester should edit the top-most issue description. This allows folks joining later to understand the most recent proposal. To avoid confusion, the requester can maintain a tiny change log, like a bolded "Updates:" followed by a bullet point list of the updates that were being made. When you the feedback is addressed, the requester should notify the owner to re-review the changes. 4. **Owner makes decision**. When the owner believes enough information is available to make a decision, they will update the issue accordingly: @@ -30,7 +30,7 @@ APIs and some code samples that show how it should be used. If changes are neces * **Close as won't fix as proposed**. Sometimes, the issue that is raised is a good one but the owner thinks the concrete proposal is not the right way to tackle the problem. In most cases, the owner will try to steer the discussion in a direction that results in a design that we believe is appropriate. However, for some proposals the problem is at the heart of the design which can't easily be changed without starting a new proposal. In those cases, the owner will close the issue and explain the issue the design has. * **Close as won't fix**. Similarly, if proposal is taking the product in a direction we simply don't want to go, the issue might also get closed. In that case, the problem isn't the proposed design but in the issue itself. -5. **API gets reviewed**. The group conducting the review is called *FXDC*, which stands for *framework design core*. In the review, we'll take notes and provide feedback. After the review, we'll publish the notes in the [API Review repository](https://github.com/dotnet/apireviews). A good example is the [review of immutable collections](https://github.com/dotnet/apireviews/tree/master/2015/01-07-immutable). Multiple outcomes are possible: +5. **API gets reviewed**. The group conducting the review is called *FXDC*, which stands for *framework design core*. In the review, we'll take notes and provide feedback. Reviews are streamed live on [YouTube](https://www.youtube.com/playlist?list=PL1rZQsJPBU2S49OQPjupSJF-qeIEz9_ju). After the review, we'll publish the notes in the [API Review repository](https://github.com/dotnet/apireviews) and at the end of the relevant issue. A good example is the [review of immutable collections](https://github.com/dotnet/apireviews/tree/master/2015/01-07-immutable). Multiple outcomes are possible: * **Approved**. In this case the label `api-ready-for-review` is replaced with `api-approved`. @@ -42,7 +42,7 @@ APIs and some code samples that show how it should be used. If changes are neces There are three methods to get an API review: -* **Get into the backlog**. Generally speaking, filing an issue in `dotnet/runtime` and applying the label `api-ready-for-review` on it will make your issue show up during API reviews. The downside is that we generally walk the backlog oldest-newest, so your issue might not be looked at for a while. +* **Get into the backlog**. Generally speaking, filing an issue in `dotnet/runtime` and applying the label `api-ready-for-review` on it will make your issue show up during API reviews. The downside is that we generally walk the backlog oldest-newest, so your issue might not be looked at for a while. Progress of issues can be tracked via http://aka.ms/ready-for-api-review. * **Fast track**. If you need to bypass the backlog apply both `api-ready-for-review` and `blocking`. All blocking issues are looked at before we walk the backlog. * **Dedicated review**. This only applies to area owners. If an issue you are the area owner for needs an hour or longer, send an email to FXDC and we book dedicated time. Rule of thumb: if the API proposal has more than a dozen APIs and/or the APIs have complex policy, then you need 60 min or more. When in doubt, send mail to FXDC. @@ -50,13 +50,13 @@ Unfortunately, we have throughput issues and try our best to get more stuff done ## Pull requests -Pull requests against **dotnet/runtime** shouldn't be submitted before getting approval. Also, we don't want to get work in progress (WIP). The reason being that we want to reduce the number pending PRs so that we can focus on the work the community expects we take action on. +Pull requests against **dotnet/runtime** shouldn't be submitted before getting approval. Also, we don't want to get work in progress (WIP) PR's. The reason being that we want to reduce the number pending PRs so that we can focus on the work the community expects we take action on. If you want to collaborate with other people on the design, feel free to perform the work in a branch in your own fork. If you want to track your TODOs in the description of a PR, you can always submit a PR against your own fork. Also, feel free to advertise your PR by linking it from the issue you filed against **dotnet/runtime** in the first step above. ## API Design Guidelines -The .NET design guidelines are captured in the famous book [Framework Design Guidelines](http://amazon.com/dp/0321545613) by Krzysztof Cwalina and Brad Abrams. +The .NET design guidelines are captured in the famous book [Framework Design Guidelines](https://www.amazon.com/dp/0135896460) by Krzysztof Cwalina, Jeremy Barton and Brad Abrams. A digest with the most important guidelines are available in our [documentation](../coding-guidelines/framework-design-guidelines-digest.md). Long term, we'd like to publish the individual guidelines in standalone repo on which we can also accept PRs and -- more importantly for API reviews -- link to. diff --git a/docs/project/glossary.md b/docs/project/glossary.md index 8e4a99983b39..f69d3749938b 100644 --- a/docs/project/glossary.md +++ b/docs/project/glossary.md @@ -350,8 +350,6 @@ and enabling support for running WPF on .NET Core (Windows Only). [corefx]: http://github.com/dotnet/corefx [referencesource]: https://github.com/microsoft/referencesource [mono-supported-platforms]: http://www.mono-project.com/docs/about-mono/supported-platforms/ -[JamesNK]: https://twitter.com/JamesNK -[Newtonsoft.Json]: https://github.com/JamesNK/Newtonsoft.Json [mono-winforms]: http://www.mono-project.com/docs/gui/winforms/ [xunit]: https://github.com/xunit [mc.dot.net]: https://mc.dot.net/ diff --git a/docs/project/list-of-obsoletions.md b/docs/project/list-of-obsoletions.md index 5083069cb799..40e833ae20f8 100644 --- a/docs/project/list-of-obsoletions.md +++ b/docs/project/list-of-obsoletions.md @@ -13,5 +13,5 @@ Currently the identifiers `MSLIB0001` through `MSLIB0999` are carved out for obs | Diagnostic ID | Description | | :--------------- | :---------- | -| __`MSLIB0001`__ | (Reserved for `Encoding.UTF7`.) | +| __`MSLIB0001`__ | The UTF-7 encoding is insecure and should not be used. Consider using UTF-8 instead. | | __`MSLIB0002`__ | `PrincipalPermissionAttribute` is not honored by the runtime and must not be used. | diff --git a/docs/workflow/building/coreclr/linux-instructions.md b/docs/workflow/building/coreclr/linux-instructions.md index b2c5e611682f..30bfb72f9d71 100644 --- a/docs/workflow/building/coreclr/linux-instructions.md +++ b/docs/workflow/building/coreclr/linux-instructions.md @@ -51,7 +51,6 @@ This table of images might often become stale as we change our images as our req | --------------------------- | --------------- | ---------------------------------------------------------------------------------------------------- | -------------------- | ------------- | | Ubuntu 16.04 | x64 | `mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-a50a721-20191120200116` | - | -clang9 | | Alpine | x64 | `mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.9-WithNode-0fc54a3-20190918214015` | - | -clang9 | -| CentOS 6 (build for RHEL 6) | x64 | `mcr.microsoft.com/dotnet-buildtools/prereqs:centos-6-f39df28-20191023143802` | - | -clang9 | | CentOS 7 (build for RHEL 7) | x64 | `mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-359e48e-20200313130914` | - | -clang9 | | Ubuntu 16.04 | arm32 (armhf) | `mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-20200413125008-09ec757` | `/crossrootfs/arm` | -clang9 | | Ubuntu 16.04 | arm64 (arm64v8) | `mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-20200413125008-cfdd435` | `/crossrootfs/arm64` | -clang9 | diff --git a/docs/workflow/building/libraries/README.md b/docs/workflow/building/libraries/README.md index c64f34d70547..44eb0eb209ee 100644 --- a/docs/workflow/building/libraries/README.md +++ b/docs/workflow/building/libraries/README.md @@ -176,6 +176,25 @@ dotnet build System.Net.NetworkInformation.csproj /p:TargetOS=Linux dotnet build -c Release System.Net.NetworkInformation.csproj ``` +### Iterating on System.Private.CoreLib changes +When changing `System.Private.CoreLib` after a full build, in order to test against those changes, you will need an updated `System.Private.CoreLib` in the testhost. In order to achieve that, you can build the `libs.pretest` subset which does testhost setup including copying over `System.Private.CoreLib`. + +After doing a build of the runtime: + +``` +build.cmd clr -rc Release +``` + +You can iterate on `System.Private.CoreLib` by running: + +``` +build.cmd clr.corelib+clr.nativecorelib+libs.pretest -rc Release +``` + +When this `System.Private.CoreLib` will be built in Release mode, then it will be crossgen'd and we will update the testhost to the latest version of corelib. + +You can use the same workflow for mono runtime by using `mono.corelib+libs.pretest` subsets. + ### Building for Mono By default the libraries will attempt to build using the CoreCLR version of `System.Private.CoreLib.dll`. In order to build against the Mono version you need to use the `/p:RuntimeFlavor=Mono` argument. diff --git a/docs/workflow/building/libraries/webassembly-instructions.md b/docs/workflow/building/libraries/webassembly-instructions.md index f2b1150dd597..c3195a30665e 100644 --- a/docs/workflow/building/libraries/webassembly-instructions.md +++ b/docs/workflow/building/libraries/webassembly-instructions.md @@ -91,7 +91,31 @@ The WebAssembly implementation files are built and made available in the artifac For Linux and MacOSX: ```bash -./dotnet.sh build --configuration release /p:TargetArchitecture=wasm /p:TargetOS=Browser src/libraries/src.proj /t:NativeBinPlace +./dotnet.sh build /p:Configuration=Debug|Release /p:TargetArchitecture=wasm /p:TargetOS=Browser src/libraries/src.proj /t:NativeBinPlace +``` + +__Note__: A `Debug` build sets the following environment variables by default. When built from the command line this way the `Configuration` value is case sensitive. + +- debugging and logging which will log garbage collection information to the console. + +``` + monoeg_g_setenv ("MONO_LOG_LEVEL", "debug", 0); + monoeg_g_setenv ("MONO_LOG_MASK", "gc", 0); +``` + + #### Example: +``` +L: GC_MAJOR_SWEEP: major size: 752K in use: 39K +L: GC_MAJOR: (user request) time 3.00ms, stw 3.00ms los size: 0K in use: 0K +``` + +- Redirects the `System.Diagnostics.Debug` output to `stderr` which will show up on the console. + +``` + // Setting this env var allows Diagnostic.Debug to write to stderr. In a browser environment this + // output will be sent to the console. Right now this is the only way to emit debug logging from + // corlib assemblies. + monoeg_g_setenv ("COMPlus_DebugWriteToStdErr", "1", 0); ``` ## Updating Emscripten version in Docker image diff --git a/docs/workflow/ci/coreclr-ci-health.md b/docs/workflow/ci/coreclr-ci-health.md index d978e106b634..5e095b6af444 100644 --- a/docs/workflow/ci/coreclr-ci-health.md +++ b/docs/workflow/ci/coreclr-ci-health.md @@ -9,10 +9,9 @@ https://github.com/dotnet/coreclr/issues/27231 was opened as a way to simply vie ## TOC 1. [Terminology](#Terminology) -2. [CI Overview](#CI\ Overview) +2. [CI Overview](#CI-Overview) 3. [Analytics](#Analytics) 4. [Resources](#Resources) -5. [Sample Investigations](#Sample\ Investigations) #### Terminology diff --git a/docs/workflow/debugging/libraries/windows-instructions.md b/docs/workflow/debugging/libraries/windows-instructions.md index aaa5667fe5ec..ec075d8b10bd 100644 --- a/docs/workflow/debugging/libraries/windows-instructions.md +++ b/docs/workflow/debugging/libraries/windows-instructions.md @@ -162,9 +162,6 @@ Helper scripts are available at https://github.com/dotnet/runtime/tree/master/sr * `*Microsoft-System-Net-Requests {3763dc7e-7046-5576-9041-5616e21cc2cf}`: WebRequest-related traces. * `*Microsoft-System-Net-Sockets {e03c0352-f9c9-56ff-0ea7-b94ba8cabc6b}`: Sockets-related traces. * `*Microsoft-System-Net-Security {066c0e27-a02d-5a98-9a4d-078cc3b1a896}`: Security-related traces. -* `*Microsoft-System-Net-WebHeaderCollection {fd36452f-9f2b-5850-d212-6c436231e3dc}`: WebHeaderCollection-related traces. -* `*Microsoft-System-Net-WebSockets-Client {71cddde3-cf58-52d5-094f-927828a09337}`: ClientWebSocket-related traces. -* `*Microsoft-System-Net-TestLogging {18579866-5c03-5954-91ff-bdc63681458c}`: [__TestCode__] Test-code tracing (I/O async completions, performance test reporting). #### System.Threading * `*System.Threading.SynchronizationEventSource {EC631D38-466B-4290-9306-834971BA0217}`: Provides an event source for tracing Coordination Data Structure synchronization information. diff --git a/docs/workflow/requirements/windows-requirements.md b/docs/workflow/requirements/windows-requirements.md index 5753ccf266a9..35229d2a3ea8 100644 --- a/docs/workflow/requirements/windows-requirements.md +++ b/docs/workflow/requirements/windows-requirements.md @@ -19,22 +19,22 @@ git config --system core.longpaths true ## Visual Studio -- Install [Visual Studio 2019](https://visualstudio.microsoft.com/downloads/). The Community version is completely free. +- Install [Visual Studio 2019](https://visualstudio.microsoft.com/downloads/). The Community edition is available free of charge. Visual Studio 2019 installation process: - It's recommended to use 'Workloads' installation approach. The following are the minimum requirements: - .NET Desktop Development with all default components. - Desktop Development with C++ with all default components. -- To build for Arm32 or Arm64, make sure that you have the right architecture specific compilers installed: - - In addition, ensure you install the ARM tools. In the "Individual components" window, in the "Compilers, build tools, and runtimes" section, check the box for "MSVC v142 - VS 2019 C++ ARM build tools" (v14.23 or newer). - - Also, ensure you install the ARM64 tools. In the "Individual components" window, in the "Compilers, build tools, and runtimes" section, check the box for "MSVC v142 - VS 2019 C++ ARM64 build tools (v14.23 or newer)". +- To build for Arm32 or Arm64, make sure that you have the right architecture-specific compilers installed. In the "Individual components" window, in the "Compilers, build tools, and runtimes" section: + - For Arm32, check the box for "MSVC v142 - VS 2019 C++ ARM build tools (v14.23 or newer)". + - For Arm64, check the box for "MSVC v142 - VS 2019 C++ ARM64 build tools (v14.23 or newer)". - To build the tests, you will need some additional components: - Windows 10 SDK component version 10.0.18362 or newer. This component is installed by default as a part of 'Desktop Development with C++' workload. - C++/CLI support for v142 build tools (v14.23 or newer) A `.vsconfig` file is included in the root of the dotnet/runtime repository that includes all components needed to build the dotnet/runtime repository. You can [import `.vsconfig` in your Visual Studio installer](https://docs.microsoft.com/en-us/visualstudio/install/import-export-installation-configurations?view=vs-2019#import-a-configuration) to install all necessary components. -The dotnet/runtime repository requires at least Visual Studio 2019 16.6 Preview 2. +The dotnet/runtime repository requires at least Visual Studio 2019 16.6. ## CMake diff --git a/docs/workflow/testing/coreclr/running-aspnet-benchmarks-with-crossgen2.md b/docs/workflow/testing/coreclr/running-aspnet-benchmarks-with-crossgen2.md new file mode 100644 index 000000000000..55ffc5f7459a --- /dev/null +++ b/docs/workflow/testing/coreclr/running-aspnet-benchmarks-with-crossgen2.md @@ -0,0 +1,231 @@ +# Working with Benchmarks Driver 2 + +This document describes how to run the ASP.NET Benchmarks with _crossgen2_ +using the latest driver and servers. + +## Requirements + +* A clone of the [ASP.NET Benchmarks repo](https://github.com/aspnet/benchmarks). +* A clone of the [runtime repo](https://github.com/dotnet/runtime). +* A code editor of your choice. + +## Setup + +Before using the remote servers for the benchmarks, you will need to follow the +steps described in the next sections. + +### Build CoreCLR and generate the Core_Root + +In the runtime repo, you will need the CoreCLR binaries and the Core_Root to do +the crossgen'ing of the ASP.NET application. The simplest steps you can do for +this are below. + +For Windows: + +```powershell +.\build.cmd -subset clr+libs -c release +cd src\coreclr +.\build-test.cmd Release generatelayoutonly +``` + +For Linux: + +```bash +./build.sh -subset clr+libs -c release +cd src/coreclr +./build-test.sh -release -generatelayoutonly +``` + +### Generate a Configuration File for ASP.NET Benchmarking Runs + +The ASP.NET Benchmarks are configured by means of profiles, which are specified +in `yml` files. Here is a simple example of a configuration file, which we will +be using throughout this document. + +```yml +imports: + - https://raw.githubusercontent.com/aspnet/Benchmarks/master/src/WrkClient/wrk.yml + +jobs: + aspnetbenchmarks: + source: + repository: https://github.com/aspnet/benchmarks.git + branchOrCommit: master + project: src/Benchmarks/Benchmarks.csproj + readyStateText: Application started. + variables: + protocol: http + server: Kestrel + transport: Sockets + scenario: plaintext + channel: edge + framework: netcoreapp5.0 + arguments: "--nonInteractive true --scenarios {{scenario}} --server-urls {{protocol}}://[*]:{{serverPort}} --server {{server}} --kestrelTransport {{transport}} --protocol {{protocol}}" + +scenarios: + json: + application: + job: aspnetbenchmarks + variables: + scenario: json + load: + job: wrk + variables: + presetHeaders: json + path: /json + duration: 60 + warmup: 5 + serverPort: 5000 + +profiles: + aspnet-physical-win: + variables: + serverUri: http://10.0.0.110 + cores: 12 + jobs: + application: + endpoints: + - http://asp-perf-win:5001 + load: + endpoints: + - http://asp-perf-load:5001 + + aspnet-physical-lin: + variables: + serverUri: http://10.0.0.102 + cores: 12 + jobs: + application: + endpoints: + - http://asp-perf-lin:5001 + load: + endpoints: + - http://asp-perf-load:5001 +``` + +Now, what does this configuration mean and how is it applied? Let's go over +the most important fields to understand its main functionality. + +* **Imports**: These are external tools hosted in the Benchmarks repo. +In this case, we only need `wrk`, which is a tool that loads and tests +performance in Web applications. + +* **Jobs**: Here go the job descriptions. A job in this context is the set of +server configuration, launch arguments, .NET version, etc. + * _Source_: This shows the repo where the Benchmarking application is hosted. + * _Variables_: These define how the communication with the server and the + information exchange will take place. + * _Channel_: Resolves the runtime versions. In this example, `edge` means it + will use the latest nightly build. + * _Framework_: Which .NET version will be used to build the application. + * _Arguments_: Command-line arguments to call onto the server. + +* **Scenarios**: The scenarios describe how each job will be run (from the ones +described in the previous section). + * _Application_: Here we choose which job will be selected as the application + to run the benchmarks on, as well as other variables. + * _Load_: This is the tool that will generate and send the requests to + benchmark the web application. In this example, we are using `wrk` with a + warmup of 5 seconds and running the test for 60 seconds. In this example, + we are using the `json` headers for the load generation. There are various + headers that can be used, and these are defined in `wrk.yml`, which is + referenced at the top of this configuration file. + +* **Profiles**: The profiles describe the machines where the benchmarks will +be run. This information was provided by the ASP.NET team, who is in charge +of these servers. In our example, there are two profiles, one for Windows, +and one for Linux. + +## Run the Benchmarks + +Once you have your configuration file and CoreCLR built, it's time to run the +initial benchmarks. + +### Initial Application + +From the `BenchmarksDriver2` folder, run the following command. + +On Windows: + +```powershell +dotnet run -- --config crossgen2-benchmarks.yml --scenario json --profile aspnet-physical-win +--application.options.fetch true +``` + +On Linux: + +```bash +dotnet run -- --config crossgen2-benchmarks.yml --scenario json --profile aspnet-physical-lin +--application.options.fetch true +``` + +Splitting and analyzing the previous command: + +* `--config crossgen2-benchmarks.yml`: This selects the configuration file to use. +* `--scenario json`: This runs the scenario labelled as _json_ in the configuration file. +* `--profile aspnet-physical-win`: This chooses the Windows profile from the configuration file. +* `--application.options.fetch true`: This downloads the built application used for +the benchmarks. We need these files to apply _crossgen2_ and then compare the benchmarks. +Note that `application` is just the label given in the configuration file. + +At the end of the run, the tool will print a summary of statistics regarding +how the performance went. + +### Crossgen2 + +Grab the downloaded zip file with the application and extract it somewhere else. +This is to avoid mixing up stuff or losing it when running `git clean` or the like. + +In this example, we will be using a new folder called `results` outside of the +repos. Here, extract the zip into a folder we will refer to as `application`. +Next, create another folder within `results` called `composite`. This is where +the crossgen2'd assemblies will be stored. + +Now, go to your _Core\_Root_ inside the _runtime_ repo. From there, apply _crossgen2_ +using the following command. + +On Windows: + +```powershell +CoreRun.exe \runtime\artifacts\bin\coreclr\Windows_NT.x64.Release\crossgen2\crossgen2.dll +--Os --composite -o \path\to\results\composite\TotalComposite.dll \path\to\results\application\*.dll +``` + +On Linux: + +```bash +./corerun /runtime/artifacts/bin/coreclr/Linux.x64.Release/crossgen2/crossgen2.dll +--Os --composite -o /path/to/results/composite/TotalComposite.dll /path/to/results/application/*.dll +``` + +This will generate new assemblies within the `composite` folder that you will +want to copy into the downloaded `application` one. Replace all those that +already exist there. + +### Optimized Application + +To run the optimized version of the application, go back to the `BenchmarksDriver2` +folder, and run the driver with this other command line. + +On Windows: + +```powershell +dotnet run -- --config crossgen2-benchmarks.yml --scenario json --profile aspnet-physical-win +--application.options.outputFile \path\to\results\application\* +``` + +On Linux: + +```bash +dotnet run -- --config crossgen2-benchmarks.yml --scenario json --profile aspnet-physical-lin +--application.options.outputFile /path/to/results/application/*.dll +``` + +This is the same command as in the initial run, with one difference: + +* `--application.options.outputFile`: This instructs the tool to upload your +crossgen2'd application and build and test with that one. + +Same as before, once the test finishes running, it will display a summary of the +performance statistics, which you can compare to the original one and do some +analysis later. diff --git a/docs/workflow/testing/coreclr/test-configuration.md b/docs/workflow/testing/coreclr/test-configuration.md index 627fac2bf110..51a56ab289f9 100644 --- a/docs/workflow/testing/coreclr/test-configuration.md +++ b/docs/workflow/testing/coreclr/test-configuration.md @@ -35,7 +35,6 @@ Test cases are categorized by priority level. The most important subset should b ``` // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - // See the LICENSE file in the project root for more information. ``` * The managed portion of all tests should be able to build on any platform. In fact in CI the managed portion of all tests will be built on OSX. diff --git a/docs/workflow/testing/libraries/testing-wasm.md b/docs/workflow/testing/libraries/testing-wasm.md index f636ad0999c3..8e067e9f6e49 100644 --- a/docs/workflow/testing/libraries/testing-wasm.md +++ b/docs/workflow/testing/libraries/testing-wasm.md @@ -35,14 +35,14 @@ and even run tests one by one for each library: ### Running individual test suites The following shows how to run tests for a specific library ``` -./dotnet.sh build /t:Test src/Common/tests /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=release +./dotnet.sh build /t:Test src/libraries/System.AppContext/tests /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=release ``` ### Running tests using different JavaScript engines It's possible to set a JavaScript engine explicitly by adding `/p:JSEngine` property: ``` -./dotnet.sh build /t:Test src/Common/tests /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=release /p:JSEngine=SpiderMonkey +./dotnet.sh build /t:Test src/libraries/System.AppContext/tests /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=release /p:JSEngine=SpiderMonkey ``` At the moment supported values are: @@ -59,4 +59,4 @@ TBD TBD ### Existing Limitations -TBD \ No newline at end of file +TBD diff --git a/docs/workflow/trimming/feature-switches.md b/docs/workflow/trimming/feature-switches.md new file mode 100644 index 000000000000..2f05e5ba121d --- /dev/null +++ b/docs/workflow/trimming/feature-switches.md @@ -0,0 +1,56 @@ +# Libraries Feature Switches + +Starting with .NET 5 there are several [feature-switches](https://github.com/dotnet/designs/blob/master/accepted/2020/feature-switch.md) available which +can be used to control the size of the final binary. They are available in all +configurations but their defaults might vary as any SDK can set the defaults differently. + +## Available Feature Switches + +| MSBuild Property Name | AppContext Setting | Description | +|-|-|-| +| DebuggerSupport | System.Diagnostics.Debugger.IsSupported | Any dependency that enables better debugging experience to be trimmed when set to false | +| EnableUnsafeUTF7Encoding | System.Text.Encoding.EnableUnsafeUTF7Encoding | Insecure UTF-7 encoding is trimmed when set to false | +| EventSourceSupport | System.Diagnostics.Tracing.EventSource.IsSupported | Any EventSource related code or logic is trimmed when set to false | +| InvariantGlobalization | System.Globalization.Invariant | All globalization specific code and data is trimmed when set to true | +| UseSystemResourceKeys | System.Resources.UseSystemResourceKeys | Any localizable resources for system assemblies is trimmed when set to true | +| - | System.Net.Http.EnableActivityPropagation | Any dependency related to diagnostics support for System.Net.Http is trimmed when set to false | + +Any feature-switch which defines property can be set in csproj file or +on the command line as any other MSBuild property. Those without predefined property name +the value can be set with following XML tag in csproj file. + +```xml + +``` + +## Adding New Feature Switch + +The primary goal of features switches is to produce smaller output by removing code which is +unreachable under feature condition. The typical approach is to introduce static bool like +property which is used to guard the dependencies which can be trimmed when the value is flipped. +Ideally, the static property should be located in type which does not have any static constructor +logic. Once you are done with the code changes following steps connects the code with trimming +settings. + +Add XML settings for the features switch to assembly substitution. It's usually located in +`src/ILLink/ILLink.Substitutions.xml` file for each library. The example of the syntax used to control +`EnableUnsafeUTF7Encoding` property is following. + +```xml + +``` + +Add MSBuild integration by adding new RuntimeHostConfigurationOption entry. The file is located in +[Microsoft.NET.Sdk.targets](https://github.com/dotnet/sdk/blob/33ce6234e6bf45bce16f610c441679252d309189/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets#L348-L401) file and includes all +other public feature-switches. You can add a new one by simply adding a new XML tag + +```xml + +``` + +Please don't forget to update the table with available features-switches when you are done. diff --git a/eng/Analyzers.props b/eng/Analyzers.props index 4ed7e3cb9a96..8d2a67cde8e1 100644 --- a/eng/Analyzers.props +++ b/eng/Analyzers.props @@ -6,7 +6,7 @@ - + diff --git a/eng/CodeAnalysis.ruleset b/eng/CodeAnalysis.ruleset index 0a84dcdbdffd..e88f8fc3bd83 100644 --- a/eng/CodeAnalysis.ruleset +++ b/eng/CodeAnalysis.ruleset @@ -1,8 +1,18 @@  - + + + + + + + + + + + @@ -25,6 +35,9 @@ + + + @@ -38,10 +51,11 @@ - + + @@ -57,21 +71,22 @@ + - + - + @@ -90,23 +105,33 @@ + + + + + + + - + + + + - + @@ -131,6 +156,9 @@ + + + @@ -165,11 +193,11 @@ - + - + @@ -211,7 +239,6 @@ - @@ -286,7 +313,7 @@ - + diff --git a/eng/DiaSymReaderNative.targets b/eng/DiaSymReaderNative.targets index 5836a781dfa8..caa482f4b6e8 100644 --- a/eng/DiaSymReaderNative.targets +++ b/eng/DiaSymReaderNative.targets @@ -1,4 +1,4 @@ - + @@ -32,4 +32,4 @@ - \ No newline at end of file + diff --git a/eng/ILLink.Substitutions.Resources.template b/eng/ILLink.Substitutions.Resources.template new file mode 100644 index 000000000000..9381443ba391 --- /dev/null +++ b/eng/ILLink.Substitutions.Resources.template @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/eng/LicenseHeader.txt b/eng/LicenseHeader.txt index 94ec97db2fac..8369fa2425a4 100644 --- a/eng/LicenseHeader.txt +++ b/eng/LicenseHeader.txt @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ------------------------------------------------------------------------------ // Changes to this file must follow the https://aka.ms/api-review process. // ------------------------------------------------------------------------------ diff --git a/eng/Signing.props b/eng/Signing.props index 81179505a9e3..34821db7fc4e 100644 --- a/eng/Signing.props +++ b/eng/Signing.props @@ -5,114 +5,119 @@ Windows arm/arm64 jobs don't have MSIs to sign. Keep it simple: allow not finding any matches here and rely on overall signing validation. --> - true + true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eng/Subsets.props b/eng/Subsets.props index a058a944b993..b27d1e55a8bd 100644 --- a/eng/Subsets.props +++ b/eng/Subsets.props @@ -150,6 +150,7 @@ $(CoreClrProjectRoot)src\tools\dotnet-pgo\dotnet-pgo.csproj; $(CoreClrProjectRoot)src\tools\r2rtest\R2RTest.csproj" Category="clr" BuildInParallel="true" /> + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 442156328906..46f4d5a99b09 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -6,61 +6,61 @@ - + https://github.com/dotnet/arcade - 71b580038fb704df63e03c6b7ae7d2c6a4fdd71d + 243cc92161ad44c2a07464425892daee19121c99 - + https://github.com/dotnet/arcade - 71b580038fb704df63e03c6b7ae7d2c6a4fdd71d + 243cc92161ad44c2a07464425892daee19121c99 - + https://github.com/dotnet/arcade - 71b580038fb704df63e03c6b7ae7d2c6a4fdd71d + 243cc92161ad44c2a07464425892daee19121c99 - + https://github.com/dotnet/arcade - 71b580038fb704df63e03c6b7ae7d2c6a4fdd71d + 243cc92161ad44c2a07464425892daee19121c99 - + https://github.com/dotnet/arcade - 71b580038fb704df63e03c6b7ae7d2c6a4fdd71d + 243cc92161ad44c2a07464425892daee19121c99 - + https://github.com/dotnet/arcade - 71b580038fb704df63e03c6b7ae7d2c6a4fdd71d + 243cc92161ad44c2a07464425892daee19121c99 - + https://github.com/dotnet/arcade - 71b580038fb704df63e03c6b7ae7d2c6a4fdd71d + 243cc92161ad44c2a07464425892daee19121c99 - + https://github.com/dotnet/arcade - 71b580038fb704df63e03c6b7ae7d2c6a4fdd71d + 243cc92161ad44c2a07464425892daee19121c99 - + https://github.com/dotnet/arcade - 71b580038fb704df63e03c6b7ae7d2c6a4fdd71d + 243cc92161ad44c2a07464425892daee19121c99 - + https://github.com/dotnet/arcade - 71b580038fb704df63e03c6b7ae7d2c6a4fdd71d + 243cc92161ad44c2a07464425892daee19121c99 - + https://github.com/dotnet/arcade - 71b580038fb704df63e03c6b7ae7d2c6a4fdd71d + 243cc92161ad44c2a07464425892daee19121c99 - + https://github.com/dotnet/arcade - 71b580038fb704df63e03c6b7ae7d2c6a4fdd71d + 243cc92161ad44c2a07464425892daee19121c99 - + https://github.com/dotnet/arcade - 71b580038fb704df63e03c6b7ae7d2c6a4fdd71d + 243cc92161ad44c2a07464425892daee19121c99 - + https://github.com/dotnet/arcade - 71b580038fb704df63e03c6b7ae7d2c6a4fdd71d + 243cc92161ad44c2a07464425892daee19121c99 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization @@ -82,65 +82,77 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-optimization d0bb63d2ec7060714e63ee4082fac48f2e57f3e2 - + https://github.com/microsoft/vstest - df62aca07cacc5c018dc8e828f03a0cd79ee52da + b9296fc900e2f2d717d507b4ee2a4306521796d4 - + https://github.com/dotnet/runtime-assets - 7d3354c883065ddd323bde266115c321ba54f98d + 629993236116221fba87fe1de6d7893dd02c3722 - + https://github.com/dotnet/runtime-assets - 7d3354c883065ddd323bde266115c321ba54f98d + 629993236116221fba87fe1de6d7893dd02c3722 - + https://github.com/dotnet/runtime-assets - 7d3354c883065ddd323bde266115c321ba54f98d + 629993236116221fba87fe1de6d7893dd02c3722 - + https://github.com/dotnet/runtime-assets - 7d3354c883065ddd323bde266115c321ba54f98d + 629993236116221fba87fe1de6d7893dd02c3722 - + https://github.com/dotnet/runtime-assets - 7d3354c883065ddd323bde266115c321ba54f98d + 629993236116221fba87fe1de6d7893dd02c3722 - + https://github.com/dotnet/runtime-assets - 7d3354c883065ddd323bde266115c321ba54f98d + 629993236116221fba87fe1de6d7893dd02c3722 - + https://github.com/dotnet/runtime-assets - 7d3354c883065ddd323bde266115c321ba54f98d + 629993236116221fba87fe1de6d7893dd02c3722 - + https://github.com/dotnet/runtime-assets - 7d3354c883065ddd323bde266115c321ba54f98d + 629993236116221fba87fe1de6d7893dd02c3722 - + + https://github.com/dotnet/icu + + + + https://github.com/dotnet/llvm-project + 266c9f5b5c1e94333e01ca77fa74d76563969842 + + https://github.com/dotnet/llvm-project - 6a1a12b7d7c0f0c09cf92fcf7e816670ee6b5862 + 266c9f5b5c1e94333e01ca77fa74d76563969842 - + https://github.com/dotnet/llvm-project - 6a1a12b7d7c0f0c09cf92fcf7e816670ee6b5862 + 266c9f5b5c1e94333e01ca77fa74d76563969842 - + https://github.com/dotnet/llvm-project - 6a1a12b7d7c0f0c09cf92fcf7e816670ee6b5862 + 266c9f5b5c1e94333e01ca77fa74d76563969842 - + https://github.com/dotnet/llvm-project - 6a1a12b7d7c0f0c09cf92fcf7e816670ee6b5862 + 266c9f5b5c1e94333e01ca77fa74d76563969842 - + https://github.com/dotnet/llvm-project - 6a1a12b7d7c0f0c09cf92fcf7e816670ee6b5862 + 266c9f5b5c1e94333e01ca77fa74d76563969842 - + https://github.com/dotnet/llvm-project - 6a1a12b7d7c0f0c09cf92fcf7e816670ee6b5862 + 266c9f5b5c1e94333e01ca77fa74d76563969842 + + + https://github.com/dotnet/llvm-project + 266c9f5b5c1e94333e01ca77fa74d76563969842 https://github.com/dotnet/runtime @@ -158,25 +170,29 @@ https://github.com/dotnet/runtime cf64918877d98577363bb40d5eafac52beb80a79 - + https://github.com/dotnet/runtime - 382dce3b4d205dd00f43564727d838404141e5e6 + bdfbf0cf85878673a80d7822cc11bde5c9fda30c - + https://github.com/dotnet/runtime - 382dce3b4d205dd00f43564727d838404141e5e6 + bdfbf0cf85878673a80d7822cc11bde5c9fda30c https://github.com/dotnet/runtime 0375524a91a47ca4db3ee1be548f74bab7e26e76 - + https://github.com/mono/linker - b68b74fa3814e49db4b4743014f0adc468e45700 + 095f30a37d740e5166d71ab2d2157c5bb2041efa + + + https://github.com/dotnet/xharness + 5c95b40b725e1aa9d596411c453900385cf6f84c - + https://github.com/dotnet/xharness - 85fe607102620e73e290c1a93e2c0ce80938c3bb + 5c95b40b725e1aa9d596411c453900385cf6f84c diff --git a/eng/Versions.props b/eng/Versions.props index 9cf7f5a06a92..d3ae88f4bf15 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -7,7 +7,7 @@ 0 0 preview - 7 + 8 $(MajorVersion).$(MinorVersion).0.0 @@ -51,35 +51,35 @@ - 5.0.0-beta.20316.1 - 5.0.0-beta.20316.1 - 5.0.0-beta.20316.1 - 5.0.0-beta.20316.1 - 5.0.0-beta.20316.1 - 5.0.0-beta.20316.1 - 2.5.1-beta.20316.1 - 5.0.0-beta.20316.1 - 5.0.0-beta.20316.1 - 5.0.0-beta.20316.1 + 5.0.0-beta.20330.3 + 5.0.0-beta.20330.3 + 5.0.0-beta.20330.3 + 5.0.0-beta.20330.3 + 5.0.0-beta.20330.3 + 5.0.0-beta.20353.2 + 2.5.1-beta.20330.3 + 5.0.0-beta.20358.2 + 5.0.0-beta.20330.3 + 5.0.0-beta.20330.3 5.0.0-preview.4.20202.18 5.0.0-preview.4.20202.18 5.0.0-preview.4.20202.18 3.1.0 - 5.0.0-preview.7.20316.4 + 5.0.0-preview.8.20359.4 5.0.0-preview.4.20202.18 5.0.0-alpha.1.19563.3 - 5.0.0-beta.20312.1 - 5.0.0-beta.20312.1 - 5.0.0-beta.20312.1 - 5.0.0-beta.20312.1 - 5.0.0-beta.20312.1 - 5.0.0-beta.20312.1 - 5.0.0-beta.20312.1 - 5.0.0-beta.20312.1 + 5.0.0-beta.20319.2 + 5.0.0-beta.20319.2 + 5.0.0-beta.20319.2 + 5.0.0-beta.20319.2 + 5.0.0-beta.20319.2 + 5.0.0-beta.20319.2 + 5.0.0-beta.20319.2 + 5.0.0-beta.20319.2 2.2.0-prerelease.19564.1 @@ -104,8 +104,9 @@ 4.8.0 - 16.7.0-release-20200612-02 - 1.0.0-prerelease.20318.2 + 16.8.0-preview-20200708-01 + 1.0.0-prerelease.20352.3 + 1.0.0-prerelease.20352.3 2.4.1 2.4.2 1.3.0 @@ -113,16 +114,20 @@ 12.0.3 4.12.0 - 3.1.0-preview-20200129.1 + 3.0.0-preview-20200602.3 - 5.0.0-preview.3.20317.2 + 5.0.0-preview.3.20360.3 + + 5.0.0-preview.8.20359.5 - 9.0.1-alpha.1.20315.1 - 9.0.1-alpha.1.20315.1 - 9.0.1-alpha.1.20315.1 - 9.0.1-alpha.1.20315.1 - 9.0.1-alpha.1.20315.1 - 9.0.1-alpha.1.20315.1 + 9.0.1-alpha.1.20356.1 + 9.0.1-alpha.1.20356.1 + 9.0.1-alpha.1.20356.1 + 9.0.1-alpha.1.20356.1 + 9.0.1-alpha.1.20356.1 + 9.0.1-alpha.1.20356.1 + 9.0.1-alpha.1.20356.1 + 9.0.1-alpha.1.20356.1 @@ -138,6 +143,13 @@ Microsoft.DotNet.Build.Tasks.Feed Microsoft.NETCore.Targets Microsoft.NETCore.Runtime.CoreCLR + Microsoft.NETCore.Runtime.ICU.Transport + + + $([MSBuild]::NormalizeDirectory('$(NuGetPackageRoot)', '$(MicrosoftPrivateIntellisensePackage)', '$(MicrosoftPrivateIntellisenseVersion)', 'IntellisenseFiles', 'net')) diff --git a/eng/build.ps1 b/eng/build.ps1 index bfce8766eced..f8b205bd3930 100644 --- a/eng/build.ps1 +++ b/eng/build.ps1 @@ -93,9 +93,12 @@ function Get-Help() { Write-Host "* Build Mono runtime for Windows x64 on Release configuration." Write-Host ".\build.cmd mono -c release" Write-Host "" - Write-Host "It's important to mention that to build Mono for the first time," - Write-Host "you need to build the CLR and Libs subsets beforehand." - Write-Host "This is done automatically if a full build is performed at first." + Write-Host "* Build Release coreclr corelib, crossgen corelib and update Debug libraries testhost to run test on an updated corelib." + Write-Host ".\build.cmd clr.corelib+clr.nativecorelib+libs.pretest -rc release" + Write-Host "" + Write-Host "* Build Debug mono corelib and update Release libraries testhost to run test on an updated corelib." + Write-Host ".\build.cmd mono.corelib+libs.pretest -rc debug -c release" + Write-Host "" Write-Host "" Write-Host "For more information, check out https://github.com/dotnet/runtime/blob/master/docs/workflow/README.md" } diff --git a/eng/build.sh b/eng/build.sh index 6fb8f9010609..eb0cb586ebf3 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -73,6 +73,7 @@ usage() echo " --cmakeargs User-settable additional arguments passed to CMake." echo " --gcc Optional argument to build using gcc in PATH (default)." echo " --gccx.y Optional argument to build using gcc version x.y." + echo " --portablebuild Optional argument: set to false to force a non-portable build." echo "" echo "Command line arguments starting with '/p:' are passed through to MSBuild." @@ -106,9 +107,12 @@ usage() echo "* Build Mono runtime for Linux x64 on Release configuration." echo "./build.sh mono -c release" echo "" - echo "It's important to mention that to build Mono for the first time," - echo "you need to build the CLR and Libs subsets beforehand." - echo "This is done automatically if a full build is performed at first." + echo "* Build Release coreclr corelib, crossgen corelib and update Debug libraries testhost to run test on an updated corelib." + echo "./build.sh clr.corelib+clr.nativecorelib+libs.pretest -rc release" + echo "" + echo "* Build Debug mono corelib and update Release libraries testhost to run test on an updated corelib." + echo "./build.sh mono.corelib+libs.pretest -rc debug -c release" + echo "" echo "" echo "For more general information, check out https://github.com/dotnet/runtime/blob/master/docs/workflow/README.md" } @@ -121,9 +125,7 @@ initDistroRid() local targetOs="$1" local buildArch="$2" local isCrossBuild="$3" - # For RID calculation purposes, say we are always a portable build - # All of our packages that use the distro rid (CoreCLR packages) are portable. - local isPortableBuild=1 + local isPortableBuild="$4" # Only pass ROOTFS_DIR if __DoCrossArchBuild is specified. if (( isCrossBuild == 1 )); then @@ -141,6 +143,7 @@ arguments='' cmakeargs='' extraargs='' crossBuild=0 +portableBuild=1 source $scriptroot/native/init-os-and-arch.sh @@ -361,6 +364,19 @@ while [[ $# > 0 ]]; do shift 1 ;; + -portablebuild) + if [ -z ${2+x} ]; then + echo "No value for portablebuild is supplied. See help (--help) for supported values." 1>&2 + exit 1 + fi + passedPortable="$(echo "$2" | awk '{print tolower($0)}')" + if [ "$passedPortable" = false ]; then + portableBuild=0 + arguments="$arguments /p:PortableBuild=false" + fi + shift 2 + ;; + *) extraargs="$extraargs $1" shift 1 @@ -372,7 +388,7 @@ if [ ${#actInt[@]} -eq 0 ]; then arguments="-restore -build $arguments" fi -initDistroRid $os $arch $crossBuild +initDistroRid $os $arch $crossBuild $portableBuild # URL-encode space (%20) to avoid quoting issues until the msbuild call in /eng/common/tools.sh. # In *proj files (XML docs), URL-encoded string are rendered in their decoded form. diff --git a/eng/common/cross/arm64/tizen-build-rootfs.sh b/eng/common/cross/arm64/tizen-build-rootfs.sh new file mode 100644 index 000000000000..13bfddb5e2a7 --- /dev/null +++ b/eng/common/cross/arm64/tizen-build-rootfs.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash +set -e + +__CrossDir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) +__TIZEN_CROSSDIR="$__CrossDir/tizen" + +if [[ -z "$ROOTFS_DIR" ]]; then + echo "ROOTFS_DIR is not defined." + exit 1; +fi + +TIZEN_TMP_DIR=$ROOTFS_DIR/tizen_tmp +mkdir -p $TIZEN_TMP_DIR + +# Download files +echo ">>Start downloading files" +VERBOSE=1 $__CrossDir/tizen-fetch.sh $TIZEN_TMP_DIR +echo "<>Start constructing Tizen rootfs" +TIZEN_RPM_FILES=`ls $TIZEN_TMP_DIR/*.rpm` +cd $ROOTFS_DIR +for f in $TIZEN_RPM_FILES; do + rpm2cpio $f | cpio -idm --quiet +done +echo "<>Start configuring Tizen rootfs" +ln -sfn asm-arm64 ./usr/include/asm +patch -p1 < $__TIZEN_CROSSDIR/tizen.patch +echo "</dev/null; then + VERBOSE=0 +fi + +Log() +{ + if [ $VERBOSE -ge $1 ]; then + echo ${@:2} + fi +} + +Inform() +{ + Log 1 -e "\x1B[0;34m$@\x1B[m" +} + +Debug() +{ + Log 2 -e "\x1B[0;32m$@\x1B[m" +} + +Error() +{ + >&2 Log 0 -e "\x1B[0;31m$@\x1B[m" +} + +Fetch() +{ + URL=$1 + FILE=$2 + PROGRESS=$3 + if [ $VERBOSE -ge 1 ] && [ $PROGRESS ]; then + CURL_OPT="--progress-bar" + else + CURL_OPT="--silent" + fi + curl $CURL_OPT $URL > $FILE +} + +hash curl 2> /dev/null || { Error "Require 'curl' Aborting."; exit 1; } +hash xmllint 2> /dev/null || { Error "Require 'xmllint' Aborting."; exit 1; } +hash sha256sum 2> /dev/null || { Error "Require 'sha256sum' Aborting."; exit 1; } + +TMPDIR=$1 +if [ ! -d $TMPDIR ]; then + TMPDIR=./tizen_tmp + Debug "Create temporary directory : $TMPDIR" + mkdir -p $TMPDIR +fi + +TIZEN_URL=http://download.tizen.org/snapshots/tizen/ +BUILD_XML=build.xml +REPOMD_XML=repomd.xml +PRIMARY_XML=primary.xml +TARGET_URL="http://__not_initialized" + +Xpath_get() +{ + XPATH_RESULT='' + XPATH=$1 + XML_FILE=$2 + RESULT=$(xmllint --xpath $XPATH $XML_FILE) + if [[ -z ${RESULT// } ]]; then + Error "Can not find target from $XML_FILE" + Debug "Xpath = $XPATH" + exit 1 + fi + XPATH_RESULT=$RESULT +} + +fetch_tizen_pkgs_init() +{ + TARGET=$1 + PROFILE=$2 + Debug "Initialize TARGET=$TARGET, PROFILE=$PROFILE" + + TMP_PKG_DIR=$TMPDIR/tizen_${PROFILE}_pkgs + if [ -d $TMP_PKG_DIR ]; then rm -rf $TMP_PKG_DIR; fi + mkdir -p $TMP_PKG_DIR + + PKG_URL=$TIZEN_URL/$PROFILE/latest + + BUILD_XML_URL=$PKG_URL/$BUILD_XML + TMP_BUILD=$TMP_PKG_DIR/$BUILD_XML + TMP_REPOMD=$TMP_PKG_DIR/$REPOMD_XML + TMP_PRIMARY=$TMP_PKG_DIR/$PRIMARY_XML + TMP_PRIMARYGZ=${TMP_PRIMARY}.gz + + Fetch $BUILD_XML_URL $TMP_BUILD + + Debug "fetch $BUILD_XML_URL to $TMP_BUILD" + + TARGET_XPATH="//build/buildtargets/buildtarget[@name=\"$TARGET\"]/repo[@type=\"binary\"]/text()" + Xpath_get $TARGET_XPATH $TMP_BUILD + TARGET_PATH=$XPATH_RESULT + TARGET_URL=$PKG_URL/$TARGET_PATH + + REPOMD_URL=$TARGET_URL/repodata/repomd.xml + PRIMARY_XPATH='string(//*[local-name()="data"][@type="primary"]/*[local-name()="location"]/@href)' + + Fetch $REPOMD_URL $TMP_REPOMD + + Debug "fetch $REPOMD_URL to $TMP_REPOMD" + + Xpath_get $PRIMARY_XPATH $TMP_REPOMD + PRIMARY_XML_PATH=$XPATH_RESULT + PRIMARY_URL=$TARGET_URL/$PRIMARY_XML_PATH + + Fetch $PRIMARY_URL $TMP_PRIMARYGZ + + Debug "fetch $PRIMARY_URL to $TMP_PRIMARYGZ" + + gunzip $TMP_PRIMARYGZ + + Debug "unzip $TMP_PRIMARYGZ to $TMP_PRIMARY" +} + +fetch_tizen_pkgs() +{ + ARCH=$1 + PACKAGE_XPATH_TPL='string(//*[local-name()="metadata"]/*[local-name()="package"][*[local-name()="name"][text()="_PKG_"]][*[local-name()="arch"][text()="_ARCH_"]]/*[local-name()="location"]/@href)' + + PACKAGE_CHECKSUM_XPATH_TPL='string(//*[local-name()="metadata"]/*[local-name()="package"][*[local-name()="name"][text()="_PKG_"]][*[local-name()="arch"][text()="_ARCH_"]]/*[local-name()="checksum"]/text())' + + for pkg in ${@:2} + do + Inform "Fetching... $pkg" + XPATH=${PACKAGE_XPATH_TPL/_PKG_/$pkg} + XPATH=${XPATH/_ARCH_/$ARCH} + Xpath_get $XPATH $TMP_PRIMARY + PKG_PATH=$XPATH_RESULT + + XPATH=${PACKAGE_CHECKSUM_XPATH_TPL/_PKG_/$pkg} + XPATH=${XPATH/_ARCH_/$ARCH} + Xpath_get $XPATH $TMP_PRIMARY + CHECKSUM=$XPATH_RESULT + + PKG_URL=$TARGET_URL/$PKG_PATH + PKG_FILE=$(basename $PKG_PATH) + PKG_PATH=$TMPDIR/$PKG_FILE + + Debug "Download $PKG_URL to $PKG_PATH" + Fetch $PKG_URL $PKG_PATH true + + echo "$CHECKSUM $PKG_PATH" | sha256sum -c - > /dev/null + if [ $? -ne 0 ]; then + Error "Fail to fetch $PKG_URL to $PKG_PATH" + Debug "Checksum = $CHECKSUM" + exit 1 + fi + done +} + +Inform "Initialize arm base" +fetch_tizen_pkgs_init standard base +Inform "fetch common packages" +fetch_tizen_pkgs aarch64 gcc glibc glibc-devel libicu libicu-devel libatomic linux-glibc-devel +Inform "fetch coreclr packages" +fetch_tizen_pkgs aarch64 lldb lldb-devel libgcc libstdc++ libstdc++-devel libunwind libunwind-devel lttng-ust-devel lttng-ust userspace-rcu-devel userspace-rcu +Inform "fetch corefx packages" +fetch_tizen_pkgs aarch64 libcom_err libcom_err-devel zlib zlib-devel libopenssl libopenssl1.1-devel krb5 krb5-devel + +Inform "Initialize standard unified" +fetch_tizen_pkgs_init standard unified +Inform "fetch corefx packages" +fetch_tizen_pkgs aarch64 gssdp gssdp-devel tizen-release + diff --git a/eng/common/cross/arm64/tizen/tizen.patch b/eng/common/cross/arm64/tizen/tizen.patch new file mode 100644 index 000000000000..af7c8be05906 --- /dev/null +++ b/eng/common/cross/arm64/tizen/tizen.patch @@ -0,0 +1,9 @@ +diff -u -r a/usr/lib/libc.so b/usr/lib/libc.so +--- a/usr/lib64/libc.so 2016-12-30 23:00:08.284951863 +0900 ++++ b/usr/lib64/libc.so 2016-12-30 23:00:32.140951815 +0900 +@@ -2,4 +2,4 @@ + Use the shared library, but some functions are only in + the static library, so try that secondarily. */ + OUTPUT_FORMAT(elf64-littleaarch64) +-GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib/ld-linux-aarch64.so.1 ) ) ++GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ld-linux-aarch64.so.1 ) ) diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh index d6ec94b73e06..ffdff38542e1 100755 --- a/eng/common/cross/build-rootfs.sh +++ b/eng/common/cross/build-rootfs.sh @@ -167,8 +167,8 @@ while :; do __LLDB_Package="liblldb-6.0-dev" ;; tizen) - if [ "$__BuildArch" != "armel" ]; then - echo "Tizen is available only for armel." + if [ "$__BuildArch" != "armel" ] && [ "$__BuildArch" != "arm64" ]; then + echo "Tizen is available only for armel and arm64." usage; exit 1; fi diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake index ec512d012a1c..88a758afb19c 100644 --- a/eng/common/cross/toolchain.cmake +++ b/eng/common/cross/toolchain.cmake @@ -31,6 +31,9 @@ elseif(TARGET_ARCH_NAME STREQUAL "arm64") else() set(TOOLCHAIN "aarch64-linux-gnu") endif() + if("$ENV{__DistroRid}" MATCHES "tizen.*") + set(TIZEN_TOOLCHAIN "aarch64-tizen-linux-gnu/9.2.0") + endif() elseif(TARGET_ARCH_NAME STREQUAL "x86") set(CMAKE_SYSTEM_PROCESSOR i686) set(TOOLCHAIN "i686-linux-gnu") @@ -49,11 +52,15 @@ if(DEFINED ENV{TOOLCHAIN}) endif() # Specify include paths -if(TARGET_ARCH_NAME STREQUAL "armel") - if(DEFINED TIZEN_TOOLCHAIN) +if(DEFINED TIZEN_TOOLCHAIN) + if(TARGET_ARCH_NAME STREQUAL "armel") include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/) include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/armv7l-tizen-linux-gnueabi) endif() + if(TARGET_ARCH_NAME STREQUAL "arm64") + include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/) + include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/aarch64-tizen-linux-gnu) + endif() endif() if("$ENV{__DistroRid}" MATCHES "android.*") @@ -127,6 +134,17 @@ if(TARGET_ARCH_NAME STREQUAL "armel") add_link_options("-L${CROSS_ROOTFS}/usr/lib") add_link_options("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") endif() +elseif(TARGET_ARCH_NAME STREQUAL "arm64") + if(DEFINED TIZEN_TOOLCHAIN) # For Tizen only + add_link_options("-B${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + add_link_options("-L${CROSS_ROOTFS}/lib64") + add_link_options("-L${CROSS_ROOTFS}/usr/lib64") + add_link_options("-L${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + + add_link_options("-Wl,--rpath-link=${CROSS_ROOTFS}/lib64") + add_link_options("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64") + add_link_options("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + endif() elseif(TARGET_ARCH_NAME STREQUAL "x86") add_link_options(-m32) elseif(ILLUMOS) @@ -157,16 +175,19 @@ if(TARGET_ARCH_NAME MATCHES "^(arm|armel)$") if(TARGET_ARCH_NAME STREQUAL "armel") add_compile_options(-mfloat-abi=softfp) - if(DEFINED TIZEN_TOOLCHAIN) - add_compile_options(-Wno-deprecated-declarations) # compile-time option - add_compile_options(-D__extern_always_inline=inline) # compile-time option - endif() endif() elseif(TARGET_ARCH_NAME STREQUAL "x86") add_compile_options(-m32) add_compile_options(-Wno-error=unused-command-line-argument) endif() +if(DEFINED TIZEN_TOOLCHAIN) + if(TARGET_ARCH_NAME MATCHES "^(armel|arm64)$") + add_compile_options(-Wno-deprecated-declarations) # compile-time option + add_compile_options(-D__extern_always_inline=inline) # compile-time option + endif() +endif() + # Set LLDB include and library paths for builds that need lldb. if(TARGET_ARCH_NAME MATCHES "^(arm|armel|x86)$") if(TARGET_ARCH_NAME STREQUAL "x86") diff --git a/eng/common/internal-feed-operations.ps1 b/eng/common/internal-feed-operations.ps1 index db0baac9a445..b8f6529fdc87 100644 --- a/eng/common/internal-feed-operations.ps1 +++ b/eng/common/internal-feed-operations.ps1 @@ -63,6 +63,7 @@ function SetupCredProvider { } if (($endpoints | Measure-Object).Count -gt 0) { + # [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Endpoint code example with no real credentials.")] # Create the JSON object. It should look like '{"endpointCredentials": [{"endpoint":"http://example.index.json", "username":"optional", "password":"accesstoken"}]}' $endpointCredentials = @{endpointCredentials=$endpoints} | ConvertTo-Json -Compress diff --git a/eng/common/internal-feed-operations.sh b/eng/common/internal-feed-operations.sh index 5941ea283358..9ed225e7e559 100755 --- a/eng/common/internal-feed-operations.sh +++ b/eng/common/internal-feed-operations.sh @@ -62,6 +62,7 @@ function SetupCredProvider { endpoints+=']' if [ ${#endpoints} -gt 2 ]; then + # [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Endpoint code example with no real credentials.")] # Create the JSON object. It should look like '{"endpointCredentials": [{"endpoint":"http://example.index.json", "username":"optional", "password":"accesstoken"}]}' local endpointCredentials="{\"endpointCredentials\": "$endpoints"}" diff --git a/eng/common/performance/perfhelixpublish.proj b/eng/common/performance/perfhelixpublish.proj index 47d3ba00f3f2..272366da95fc 100644 --- a/eng/common/performance/perfhelixpublish.proj +++ b/eng/common/performance/perfhelixpublish.proj @@ -63,6 +63,11 @@ $(WorkItemCommand) $(CliArguments) + + + 2:30 + 0:15 + @@ -71,7 +76,7 @@ - 5 + 30 @@ -79,6 +84,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + @@ -94,7 +124,7 @@ $(WorkItemCommand) --bdn-artifacts $(BaselineArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(BaselineCoreRunArgument) --partition-count $(PartitionCount) --partition-index %(HelixWorkItem.Index)" $(WorkItemCommand) --bdn-artifacts $(ArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(CoreRunArgument) --partition-count $(PartitionCount) --partition-index %(HelixWorkItem.Index)" $(DotnetExe) run -f $(_Framework) -p $(ResultsComparer) --base $(BaselineArtifactsDirectory) --diff $(ArtifactsDirectory) --threshold 2$(Percent) --xml $(XMLResults);$(FinalCommand) - 4:00 + $(WorkItemTimeout) @@ -152,6 +182,11 @@ $(WorkItemDirectory)\ScenarioCorrelation $(Python) %HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\crossgen2\test.py crossgen2 --single System.Private.CoreLib.dll --core-root %HELIX_CORRELATION_PAYLOAD%\Core_Root + + $(WorkItemDirectory)\ScenarioCorrelation + $(Python) %HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\crossgen2\test.py crossgen2 --composite %HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\crossgen2\framework-r2r.dll.rsp --core-root %HELIX_CORRELATION_PAYLOAD%\Core_Root + 1:00 + \ No newline at end of file diff --git a/eng/common/post-build/check-channel-consistency.ps1 b/eng/common/post-build/check-channel-consistency.ps1 index 38abc5392dc7..63f3464c986a 100644 --- a/eng/common/post-build/check-channel-consistency.ps1 +++ b/eng/common/post-build/check-channel-consistency.ps1 @@ -15,12 +15,22 @@ try { # is available in YAML $PromoteToChannelsIds = $PromoteToChannels -split "\D" | Where-Object { $_ } + $hasErrors = $false + foreach ($id in $PromoteToChannelsIds) { if (($id -ne 0) -and ($id -notin $AvailableChannelIds)) { Write-PipelineTaskError -Message "Channel $id is not present in the post-build YAML configuration! This is an error scenario. Please contact @dnceng." + $hasErrors = $true } } + # The `Write-PipelineTaskError` doesn't error the script and we might report several errors + # in the previous lines. The check below makes sure that we return an error state from the + # script if we reported any validation error + if ($hasErrors) { + ExitWithExitCode 1 + } + Write-Host 'done.' } catch { diff --git a/eng/common/post-build/symbols-validation.ps1 b/eng/common/post-build/symbols-validation.ps1 index bf7c15e79de1..495428ea2b51 100644 --- a/eng/common/post-build/symbols-validation.ps1 +++ b/eng/common/post-build/symbols-validation.ps1 @@ -24,7 +24,7 @@ $CountMissingSymbols = { # Ensure input file exist if (!(Test-Path $PackagePath)) { Write-PipelineTaskError "Input file does not exist: $PackagePath" - return 1 + return -2 } # Extensions for which we'll look for symbols @@ -44,7 +44,10 @@ $CountMissingSymbols = { catch { Write-Host "Something went wrong extracting $PackagePath" Write-Host $_ - return -1 + return [pscustomobject]@{ + result = -1 + packagePath = $PackagePath + } } Get-ChildItem -Recurse $ExtractPath | @@ -146,7 +149,24 @@ $CountMissingSymbols = { Pop-Location - return $MissingSymbols + return [pscustomobject]@{ + result = $MissingSymbols + packagePath = $PackagePath + } +} + +function CheckJobResult( + $result, + $packagePath, + [ref]$DupedSymbols, + [ref]$TotalFailures) { + if ($result -eq '-1') { + Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "$packagePath has duplicated symbol files" + $DupedSymbols.Value++ + } + elseif ($jobResult.result -ne '0') { + $TotalFailures.Value++ + } } function CheckSymbolsAvailable { @@ -155,6 +175,7 @@ function CheckSymbolsAvailable { } $TotalFailures = 0 + $DupedSymbols = 0 Get-ChildItem "$InputPath\*.nupkg" | ForEach-Object { @@ -190,9 +211,7 @@ function CheckSymbolsAvailable { foreach ($Job in @(Get-Job -State 'Completed')) { $jobResult = Wait-Job -Id $Job.Id | Receive-Job - if ($jobResult -ne '0') { - $TotalFailures++ - } + CheckJobResult $jobResult.result $jobResult.packagePath ([ref]$DupedSymbols) ([ref]$TotalFailures) Remove-Job -Id $Job.Id } Write-Host @@ -200,14 +219,18 @@ function CheckSymbolsAvailable { foreach ($Job in @(Get-Job)) { $jobResult = Wait-Job -Id $Job.Id | Receive-Job + CheckJobResult $jobResult.result $jobResult.packagePath ([ref]$DupedSymbols) ([ref]$TotalFailures) + } - if ($jobResult -ne '0') { - $TotalFailures++ + if ($TotalFailures -gt 0 -or $DupedSymbols -gt 0) { + if ($TotalFailures -gt 0) { + Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "Symbols missing for $TotalFailures packages" } - } - if ($TotalFailures -gt 0) { - Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "Symbols missing for $TotalFailures packages" + if ($DupedSymbols -gt 0) { + Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "$DupedSymbols packages had duplicated symbol files" + } + ExitWithExitCode 1 } else { diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index 514bfaa5ea0a..07fc2e982df1 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -114,7 +114,7 @@ stages: inputs: filePath: $(Build.SourcesDirectory)/eng/common/post-build/check-channel-consistency.ps1 arguments: -PromoteToChannels "$(TargetChannels)" - -AvailableChannelIds ${{parameters.NetEngLatestChannelId}},${{parameters.NetEngValidationChannelId}},${{parameters.NetDev5ChannelId}},${{parameters.GeneralTestingChannelId}},${{parameters.NETCoreToolingDevChannelId}},${{parameters.NETCoreToolingReleaseChannelId}},${{parameters.NETInternalToolingChannelId}},${{parameters.NETCoreExperimentalChannelId}},${{parameters.NetEngServicesIntChannelId}},${{parameters.NetEngServicesProdChannelId}},${{parameters.Net5Preview5ChannelId}},${{parameters.Net5Preview6ChannelId}},${{parameters.Net5Preview7ChannelId}},${{parameters.NetCoreSDK313xxChannelId}},${{parameters.NetCoreSDK313xxInternalChannelId}},${{parameters.NetCoreSDK314xxChannelId}},${{parameters.NetCoreSDK314xxInternalChannelId}},${{parameters.VS166ChannelId}}${{parameters.VS167ChannelId}},${{parameters.VSMasterChannelId}} + -AvailableChannelIds ${{parameters.NetEngLatestChannelId}},${{parameters.NetEngValidationChannelId}},${{parameters.NetDev5ChannelId}},${{parameters.GeneralTestingChannelId}},${{parameters.NETCoreToolingDevChannelId}},${{parameters.NETCoreToolingReleaseChannelId}},${{parameters.NETInternalToolingChannelId}},${{parameters.NETCoreExperimentalChannelId}},${{parameters.NetEngServicesIntChannelId}},${{parameters.NetEngServicesProdChannelId}},${{parameters.Net5Preview5ChannelId}},${{parameters.Net5Preview6ChannelId}},${{parameters.Net5Preview7ChannelId}},${{parameters.NetCoreSDK313xxChannelId}},${{parameters.NetCoreSDK313xxInternalChannelId}},${{parameters.NetCoreSDK314xxChannelId}},${{parameters.NetCoreSDK314xxInternalChannelId}},${{parameters.VS166ChannelId}},${{parameters.VS167ChannelId}},${{parameters.VSMasterChannelId}} - job: displayName: NuGet Validation @@ -520,4 +520,4 @@ stages: channelId: ${{ parameters.VSMasterChannelId }} transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-transport/nuget/v3/index.json' shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' - symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json' \ No newline at end of file + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json' diff --git a/eng/depProj.common.targets b/eng/depProj.common.targets index 5fe0cd3b480f..b6d73606c388 100644 --- a/eng/depProj.common.targets +++ b/eng/depProj.common.targets @@ -1,4 +1,4 @@ - + diff --git a/eng/depProj.targets b/eng/depProj.targets index f132155c011d..7cb63b0fca25 100644 --- a/eng/depProj.targets +++ b/eng/depProj.targets @@ -12,7 +12,6 @@ which is imported by this file. Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. -See the LICENSE file in the project root for more information. *********************************************************************************************** --> diff --git a/eng/illink.targets b/eng/illink.targets index 082d7e85c589..7914b6cfaba8 100644 --- a/eng/illink.targets +++ b/eng/illink.targets @@ -40,8 +40,8 @@ $(MSBuildProjectDirectory)/ILLinkTrim_LibraryBuild.xml $(IntermediateOutputPath)ILLink.Descriptors.xml - $(MSBuildProjectDirectory)/ILLink.Substitutions.xml $(IntermediateOutputPath)ILLink.Substitutions.xml + $(IntermediateOutputPath)ILLink.LinkAttributes.xml true @@ -49,13 +49,12 @@ - - + --> $(ArtifactsBinDir)ILLinkTrimAssembly/$(BuildSettings)/trimmed @@ -72,7 +71,7 @@ + DependsOnTargets="_CombineILLinkDescriptorsXmls;_CombineILLinkSubstitutionsXmls;_CombineILLinkLinkAttributesXmls"> @@ -86,6 +85,12 @@ + + + ILLink.LinkAttributes.xml + + + @@ -105,8 +110,41 @@ + + $(IntermediateOutputPath)ILLink.Resources.Substitutions.xml + true + + + + + + + + + + + $(MSBuildThisFileDirectory)ILLink.Substitutions.Resources.template + + + + + + + + + @@ -121,7 +159,23 @@ - + + $(ILLinkLinkAttributesXmlIntermediatePath) + + + + + + + + + + @@ -155,6 +209,9 @@ $(ILLinkArgs) -x "$(ILLinkTrimXmlLibraryBuild)" $(ILLinkArgs) --strip-substitutions false + + + $(ILLinkArgs) --strip-link-attributes false --ignore-link-attributes true $(ILLinkArgs) --skip-unresolved true @@ -204,7 +261,7 @@ <_DotNetHostFileName>dotnet <_DotNetHostFileName Condition=" '$(OS)' == 'Windows_NT' ">dotnet.exe - + - - - diff --git a/eng/liveBuilds.targets b/eng/liveBuilds.targets index 75edb9846cf0..763b369167db 100644 --- a/eng/liveBuilds.targets +++ b/eng/liveBuilds.targets @@ -22,6 +22,7 @@ but we need to point to the AllArtifacts locations when building the platform manifest. --> @@ -189,7 +190,8 @@ @@ -199,6 +201,6 @@ $(RuntimeIdGraphDefinitionFile) - $(LiveRuntimeIdentifierGraphPath) + $(LiveRuntimeIdentifierGraphPath) diff --git a/eng/native/configurecompiler.cmake b/eng/native/configurecompiler.cmake index a6e6ba45808d..9d1b88f08011 100644 --- a/eng/native/configurecompiler.cmake +++ b/eng/native/configurecompiler.cmake @@ -226,7 +226,13 @@ if (CLR_CMAKE_HOST_UNIX) add_definitions(-DHOST_UNIX) if(CLR_CMAKE_HOST_OSX) - message("Detected OSX x86_64") + if(CLR_CMAKE_HOST_UNIX_AMD64) + message("Detected OSX x86_64") + elseif(CLR_CMAKE_HOST_UNIX_ARM64) + message("Detected OSX ARM64") + else() + clr_unknown_arch() + endif() elseif(CLR_CMAKE_HOST_FREEBSD) message("Detected FreeBSD amd64") elseif(CLR_CMAKE_HOST_NETBSD) @@ -454,7 +460,8 @@ if (MSVC) # 4132: Const object should be initialized. # 4212: Function declaration used ellipsis. # 4530: C++ exception handler used, but unwind semantics are not enabled. Specify -GX. - add_compile_options(/w34092 /w34121 /w34125 /w34130 /w34132 /w34212 /w34530) + # 35038: data member 'member1' will be initialized after data member 'member2'. + add_compile_options(/w34092 /w34121 /w34125 /w34130 /w34132 /w34212 /w34530 /w35038) # Set Warning Level 4: # 4177: Pragma data_seg s/b at global scope. @@ -577,4 +584,18 @@ else (CLR_CMAKE_HOST_WIN32) if (AWK STREQUAL "AWK-NOTFOUND") message(FATAL_ERROR "AWK not found") endif() + + # detect linker + set(ldVersion ${CMAKE_C_COMPILER};-Wl,--version) + execute_process(COMMAND ${ldVersion} + ERROR_QUIET + OUTPUT_VARIABLE ldVersionOutput) + + if("${ldVersionOutput}" MATCHES "GNU ld" OR "${ldVersionOutput}" MATCHES "GNU gold") + set(LD_GNU 1) + elseif("${ldVersionOutput}" MATCHES "Solaris Link") + set(LD_SOLARIS 1) + else(CLR_CMAKE_HOST_OSX) + set(LD_OSX 1) + endif() endif(CLR_CMAKE_HOST_WIN32) diff --git a/eng/native/configureplatform.cmake b/eng/native/configureplatform.cmake index bbc7877e8f9f..c65274141dd4 100644 --- a/eng/native/configureplatform.cmake +++ b/eng/native/configureplatform.cmake @@ -78,8 +78,14 @@ endif(CLR_CMAKE_HOST_OS STREQUAL Linux) if(CLR_CMAKE_HOST_OS STREQUAL Darwin) set(CLR_CMAKE_HOST_UNIX 1) - set(CLR_CMAKE_HOST_UNIX_AMD64 1) set(CLR_CMAKE_HOST_OSX 1) + if(CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64) + set(CLR_CMAKE_HOST_UNIX_AMD64 1) + elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL arm64) + set(CLR_CMAKE_HOST_UNIX_ARM64 1) + else() + clr_unknown_arch() + endif() set(CMAKE_ASM_COMPILE_OBJECT "${CMAKE_C_COMPILER} -o -c ") endif(CLR_CMAKE_HOST_OS STREQUAL Darwin) @@ -152,7 +158,7 @@ if(CLR_CMAKE_HOST_OS STREQUAL SunOS) COMMAND isainfo -n OUTPUT_VARIABLE SUNOS_NATIVE_INSTRUCTION_SET) - if(SUNOS_NATIVE_INSTRUCTION_SET MATCHES "amd64") + if(SUNOS_NATIVE_INSTRUCTION_SET MATCHES "amd64" OR CMAKE_CROSSCOMPILING) set(CLR_CMAKE_HOST_UNIX_AMD64 1) set(CMAKE_SYSTEM_PROCESSOR "amd64") else() @@ -165,11 +171,11 @@ if(CLR_CMAKE_HOST_OS STREQUAL SunOS) ERROR_QUIET) set(CLR_CMAKE_HOST_SUNOS 1) - if(SUNOS_KERNEL_KIND STREQUAL illumos) + if(SUNOS_KERNEL_KIND STREQUAL illumos OR CMAKE_CROSSCOMPILING) set(CLR_CMAKE_HOST_OS_ILLUMOS 1) - else(SUNOS_KERNEL_KIND STREQUAL illumos) + else(SUNOS_KERNEL_KIND STREQUAL illumos OR CMAKE_CROSSCOMPILING) set(CLR_CMAKE_HOST_OS_SOLARIS 1) - endif(SUNOS_KERNEL_KIND STREQUAL illumos) + endif(SUNOS_KERNEL_KIND STREQUAL illumos OR CMAKE_CROSSCOMPILING) endif(CLR_CMAKE_HOST_OS STREQUAL SunOS) if(CLR_CMAKE_HOST_OS STREQUAL Windows) diff --git a/eng/native/configuretools.cmake b/eng/native/configuretools.cmake index 4fb94531d769..0edbe2ee6d02 100644 --- a/eng/native/configuretools.cmake +++ b/eng/native/configuretools.cmake @@ -34,17 +34,18 @@ if(NOT WIN32 AND NOT CLR_CMAKE_TARGET_BROWSER) "${TOOLSET_PREFIX}${exec}") if (EXEC_LOCATION_${exec} STREQUAL "EXEC_LOCATION_${exec}-NOTFOUND") - message(FATAL_ERROR "Unable to find toolchain executable for: ${exec}.") + message(FATAL_ERROR "Unable to find toolchain executable. Name: ${exec}, Prefix: ${TOOLSET_PREFIX}.") endif() set(${var} ${EXEC_LOCATION_${exec}} PARENT_SCOPE) endfunction() locate_toolchain_exec(ar CMAKE_AR) - locate_toolchain_exec(link CMAKE_LINKER) locate_toolchain_exec(nm CMAKE_NM) - if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") + if(CMAKE_C_COMPILER_ID MATCHES "GNU") locate_toolchain_exec(ranlib CMAKE_RANLIB) + else() + locate_toolchain_exec(link CMAKE_LINKER) endif() if(NOT CLR_CMAKE_TARGET_OSX AND NOT CLR_CMAKE_TARGET_IOS AND NOT CLR_CMAKE_TARGET_TVOS AND (NOT CLR_CMAKE_TARGET_ANDROID OR CROSS_ROOTFS)) diff --git a/eng/native/functions.cmake b/eng/native/functions.cmake index 49b0064499eb..8b73581ed142 100644 --- a/eng/native/functions.cmake +++ b/eng/native/functions.cmake @@ -68,21 +68,46 @@ endfunction(get_include_directories) function(get_include_directories_asm IncludeDirectories) get_directory_property(dirs INCLUDE_DIRECTORIES) - if (CLR_CMAKE_HOST_ARCH_ARM AND WIN32) - list(APPEND INC_DIRECTORIES "-I ") - endif() - foreach(dir IN LISTS dirs) - if (CLR_CMAKE_HOST_ARCH_ARM AND WIN32) - list(APPEND INC_DIRECTORIES ${dir};) - else() - list(APPEND INC_DIRECTORIES -I${dir}) - endif() + list(APPEND INC_DIRECTORIES -I${dir};) endforeach() set(${IncludeDirectories} ${INC_DIRECTORIES} PARENT_SCOPE) endfunction(get_include_directories_asm) +# Finds and returns unwind libs +function(find_unwind_libs UnwindLibs) + if(CLR_CMAKE_HOST_ARCH_ARM) + find_library(UNWIND_ARCH NAMES unwind-arm) + endif() + + if(CLR_CMAKE_HOST_ARCH_ARM64) + find_library(UNWIND_ARCH NAMES unwind-aarch64) + endif() + + if(CLR_CMAKE_HOST_ARCH_AMD64) + find_library(UNWIND_ARCH NAMES unwind-x86_64) + endif() + + if(NOT UNWIND_ARCH STREQUAL UNWIND_ARCH-NOTFOUND) + set(UNWIND_LIBS ${UNWIND_ARCH}) + endif() + + find_library(UNWIND_GENERIC NAMES unwind-generic) + + if(NOT UNWIND_GENERIC STREQUAL UNWIND_GENERIC-NOTFOUND) + set(UNWIND_LIBS ${UNWIND_LIBS} ${UNWIND_GENERIC}) + endif() + + find_library(UNWIND NAMES unwind) + + if(UNWIND STREQUAL UNWIND-NOTFOUND) + message(FATAL_ERROR "Cannot find libunwind. Try installing libunwind8-dev or libunwind-devel.") + endif() + + set(${UnwindLibs} ${UNWIND_LIBS} ${UNWIND} PARENT_SCOPE) +endfunction(find_unwind_libs) + # Set the passed in RetSources variable to the list of sources with added current source directory # to form absolute paths. # The parameters after the RetSources are the input files. @@ -118,10 +143,10 @@ function(preprocess_file inputFilename outputFilename) PROPERTIES GENERATED TRUE) endfunction() -# preprocess_compile_asm(ASM_FILES file1 [file2 ...] OUTPUT_OBJECTS [variableName]) +# preprocess_compile_asm(TARGET target ASM_FILES file1 [file2 ...] OUTPUT_OBJECTS [variableName]) function(preprocess_compile_asm) set(options "") - set(oneValueArgs OUTPUT_OBJECTS) + set(oneValueArgs TARGET OUTPUT_OBJECTS) set(multiValueArgs ASM_FILES) cmake_parse_arguments(PARSE_ARGV 0 COMPILE_ASM "${options}" "${oneValueArgs}" "${multiValueArgs}") @@ -135,33 +160,40 @@ function(preprocess_compile_asm) file(TO_CMAKE_PATH "${CMAKE_CURRENT_BINARY_DIR}/${name}.asm" ASM_PREPROCESSED_FILE) preprocess_file(${ASM_FILE} ${ASM_PREPROCESSED_FILE}) - # We do not pass any defines since we have already done pre-processing above - set (ASM_CMDLINE "-o ${CMAKE_CURRENT_BINARY_DIR}/${name}.obj ${ASM_PREPROCESSED_FILE}") - - # Generate the batch file that will invoke the assembler - file(TO_CMAKE_PATH "${CMAKE_CURRENT_BINARY_DIR}/runasm_${name}.cmd" ASM_SCRIPT_FILE) - - file(GENERATE OUTPUT "${ASM_SCRIPT_FILE}" - CONTENT "\"${CMAKE_ASM_MASM_COMPILER}\" -g ${ASM_INCLUDE_DIRECTORIES} ${ASM_CMDLINE}") - - message("Generated - ${ASM_SCRIPT_FILE}") + # Produce object file where CMake would store .obj files for an OBJECT library. + # ex: artifacts\obj\coreclr\Windows_NT.arm64.Debug\src\vm\wks\cee_wks.dir\Debug\AsmHelpers.obj + set (OBJ_FILE "${CMAKE_CURRENT_BINARY_DIR}/${COMPILE_ASM_TARGET}.dir/${CMAKE_CFG_INTDIR}/${name}.obj") # Need to compile asm file using custom command as include directories are not provided to asm compiler - add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${name}.obj - COMMAND ${ASM_SCRIPT_FILE} + add_custom_command(OUTPUT ${OBJ_FILE} + COMMAND "${CMAKE_ASM_MASM_COMPILER}" -g ${ASM_INCLUDE_DIRECTORIES} -o ${OBJ_FILE} ${ASM_PREPROCESSED_FILE} DEPENDS ${ASM_PREPROCESSED_FILE} - COMMENT "Assembling ${ASM_PREPROCESSED_FILE} - ${ASM_SCRIPT_FILE}") + COMMENT "Assembling ${ASM_PREPROCESSED_FILE} ---> \"${CMAKE_ASM_MASM_COMPILER}\" -g ${ASM_INCLUDE_DIRECTORIES} -o ${OBJ_FILE} ${ASM_PREPROCESSED_FILE}") # mark obj as source that does not require compile - set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${name}.obj PROPERTIES EXTERNAL_OBJECT TRUE) + set_source_files_properties(${OBJ_FILE} PROPERTIES EXTERNAL_OBJECT TRUE) # Add the generated OBJ in the dependency list so that it gets consumed during linkage - list(APPEND ASSEMBLED_OBJECTS ${CMAKE_CURRENT_BINARY_DIR}/${name}.obj) + list(APPEND ASSEMBLED_OBJECTS ${OBJ_FILE}) endforeach() set(${COMPILE_ASM_OUTPUT_OBJECTS} ${ASSEMBLED_OBJECTS} PARENT_SCOPE) endfunction() +function(set_exports_linker_option exports_filename) + if(LD_GNU OR LD_SOLARIS) + # Add linker exports file option + if(LD_SOLARIS) + set(EXPORTS_LINKER_OPTION -Wl,-M,${exports_filename} PARENT_SCOPE) + else() + set(EXPORTS_LINKER_OPTION -Wl,--version-script=${exports_filename} PARENT_SCOPE) + endif() + elseif(LD_OSX) + # Add linker exports file option + set(EXPORTS_LINKER_OPTION -Wl,-exported_symbols_list,${exports_filename} PARENT_SCOPE) + endif() +endfunction() + function(generate_exports_file) set(INPUT_LIST ${ARGN}) list(GET INPUT_LIST -1 outputFilename) diff --git a/eng/native/init-os-and-arch.sh b/eng/native/init-os-and-arch.sh index 46c128de93c9..0a6018386575 100644 --- a/eng/native/init-os-and-arch.sh +++ b/eng/native/init-os-and-arch.sh @@ -33,7 +33,7 @@ else fi case "$CPUName" in - aarch64) + arm64|aarch64) arch=arm64 ;; diff --git a/eng/packaging.props b/eng/packaging.props index eea246c09808..9db71c397b49 100644 --- a/eng/packaging.props +++ b/eng/packaging.props @@ -12,9 +12,6 @@ $(Platform) x64 - - $(NuGetPackageRoot)$(MicrosoftPrivateIntellisensePackage)/$(MicrosoftPrivateIntellisenseVersion)/IntellisenseFiles/netcoreapp - false diff --git a/eng/pipelines/common/global-build-job.yml b/eng/pipelines/common/global-build-job.yml index b5b8b47b66fb..8f02954c8703 100644 --- a/eng/pipelines/common/global-build-job.yml +++ b/eng/pipelines/common/global-build-job.yml @@ -12,6 +12,8 @@ parameters: pool: '' condition: true isOfficialBuild: false + runtimeFlavor: 'coreclr' + helixQueues: '' extraStepsTemplate: '' extraStepsParameters: {} @@ -40,6 +42,12 @@ jobs: - name: _crossBuildPropertyArg value: /p:CrossBuild=${{ ne(parameters.crossrootfsDir, '') }} + - name: _cxx11Parameter + ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.archType, 'arm64')) }}: + value: /p:MonoLLVMUseCxx11Abi=true + ${{ if and(eq(parameters.osGroup, 'Linux'), not(eq(parameters.archType, 'arm64'))) }}: + value: /p:MonoLLVMUseCxx11Abi=false + - name: _officialBuildParameter ${{ if eq(parameters.isOfficialBuild, true) }}: value: /p:OfficialBuildId=$(Build.BuildNumber) @@ -64,7 +72,7 @@ jobs: displayName: Disk Usage before Build # Build - - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -ci -arch ${{ parameters.archType }} $(_osParameter) ${{ parameters.buildArgs }} $(_officialBuildParameter) $(_crossBuildPropertyArg) + - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -ci -arch ${{ parameters.archType }} $(_osParameter) ${{ parameters.buildArgs }} $(_officialBuildParameter) $(_crossBuildPropertyArg) $(_cxx11Parameter) displayName: Build product - ${{ if in(parameters.osGroup, 'OSX', 'iOS','tvOS') }}: @@ -81,6 +89,8 @@ jobs: osSubgroup: ${{ parameters.osSubgroup }} archType: ${{ parameters.archType }} buildConfig: ${{ parameters.buildConfig }} + runtimeFlavor: ${{ parameters.runtimeFlavor }} + helixQueues: ${{ parameters.helixQueues }} ${{ insert }}: ${{ parameters.extraStepsParameters }} - task: PublishBuildArtifacts@1 diff --git a/eng/pipelines/common/platform-matrix.yml b/eng/pipelines/common/platform-matrix.yml index ecb21d568655..bf9c4a2fc976 100644 --- a/eng/pipelines/common/platform-matrix.yml +++ b/eng/pipelines/common/platform-matrix.yml @@ -465,7 +465,7 @@ jobs: # Windows arm64 -- ${{ if or(containsValue(parameters.platforms, 'Windows_NT_arm64'), eq(parameters.platformGroup, 'all')) }}: +- ${{ if or(containsValue(parameters.platforms, 'Windows_NT_arm64'), in(parameters.platformGroup, 'all', 'gcstress')) }}: - template: xplat-setup.yml parameters: jobTemplate: ${{ parameters.jobTemplate }} diff --git a/eng/pipelines/common/templates/runtimes/build-test-job.yml b/eng/pipelines/common/templates/runtimes/build-test-job.yml index 45840c940223..56fa8dffddc1 100644 --- a/eng/pipelines/common/templates/runtimes/build-test-job.yml +++ b/eng/pipelines/common/templates/runtimes/build-test-job.yml @@ -53,10 +53,10 @@ jobs: continueOnError: true # Compute job name from template parameters - ${{ if eq(parameters.testGroup, 'innerloop') }}: + ${{ if in(parameters.testGroup, 'innerloop', 'clrinterpreter') }}: name: '${{ parameters.runtimeFlavor }}_common_test_build_p0_AnyOS_AnyCPU_${{ parameters.buildConfig }}' displayName: '${{ parameters.runtimeFlavorDisplayName }} Common Pri0 Test Build AnyOS AnyCPU ${{ parameters.buildConfig }}' - ${{ if ne(parameters.testGroup, 'innerloop') }}: + ${{ if notIn(parameters.testGroup, 'innerloop', 'clrinterpreter') }}: name: '${{ parameters.runtimeFlavor }}_common_test_build_p1_AnyOS_AnyCPU_${{ parameters.buildConfig }}' displayName: '${{ parameters.runtimeFlavorDisplayName }} Common Pri1 Test Build AnyOS AnyCPU ${{ parameters.buildConfig }}' @@ -77,10 +77,10 @@ jobs: - ${{ format('libraries_build_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.liveLibrariesBuildConfig) }} - ${{ if eq(parameters.testGroup, 'innerloop') }}: + ${{ if in(parameters.testGroup, 'innerloop', 'clrinterpreter') }}: timeoutInMinutes: 90 - ${{ if ne(parameters.testGroup, 'innerloop') }}: + ${{ if notIn(parameters.testGroup, 'innerloop', 'clrinterpreter') }}: timeoutInMinutes: 160 steps: diff --git a/eng/pipelines/common/templates/runtimes/run-test-job.yml b/eng/pipelines/common/templates/runtimes/run-test-job.yml index 02043c361c0f..8035fb9039e6 100644 --- a/eng/pipelines/common/templates/runtimes/run-test-job.yml +++ b/eng/pipelines/common/templates/runtimes/run-test-job.yml @@ -53,9 +53,9 @@ jobs: ${{ if eq(parameters.dependsOn[0], '') }}: dependsOn: - - ${{ if eq(parameters.testGroup, 'innerloop') }}: + - ${{ if in(parameters.testGroup, 'innerloop', 'clrinterpreter') }}: - '${{ parameters.runtimeFlavor }}_common_test_build_p0_AnyOS_AnyCPU_${{parameters.buildConfig }}' - - ${{ if ne(parameters.testGroup, 'innerloop') }}: + - ${{ if notIn(parameters.testGroup, 'innerloop', 'clrinterpreter') }}: - '${{ parameters.runtimeFlavor }}_common_test_build_p1_AnyOS_AnyCPU_${{parameters.buildConfig }}' - ${{ if ne(parameters.stagedBuild, true) }}: - ${{ format('{0}_{1}_product_build_{2}{3}_{4}_{5}', parameters.runtimeFlavor, parameters.runtimeVariant, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }} @@ -63,11 +63,10 @@ jobs: - ${{ format('libraries_build_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.liveLibrariesBuildConfig) }} # Compute job name from template parameters - ${{ if eq(parameters.testGroup, 'innerloop') }}: + ${{ if in(parameters.testGroup, 'innerloop', 'clrinterpreter') }}: name: 'run_test_p0_${{ parameters.runtimeFlavor }}${{ parameters.runtimeVariant }}_${{ parameters.displayNameArgs }}_${{ parameters.osGroup }}${{ parameters.osSubgroup }}_${{ parameters.archType }}_${{ parameters.buildConfig }}' displayName: '${{ parameters.runtimeFlavorDisplayName }} ${{ parameters.runtimeVariant}} Pri0 Runtime Tests Run ${{ parameters.displayNameArgs }} ${{ parameters.osGroup }}${{ parameters.osSubgroup }} ${{ parameters.archType }} ${{ parameters.buildConfig }}' - - ${{ if ne(parameters.testGroup, 'innerloop') }}: + ${{ if notIn(parameters.testGroup, 'innerloop', 'clrinterpreter') }}: name: 'run_test_p1_${{ parameters.displayNameArgs }}_${{ parameters.osGroup }}${{ parameters.osSubgroup }}_${{ parameters.archType }}_${{ parameters.buildConfig }}' displayName: '${{ parameters.runtimeFlavorDisplayName }} ${{ parameters.runtimeVariant }} Pri1 Runtime Tests Run ${{ parameters.displayNameArgs }} ${{ parameters.osGroup }}${{ parameters.osSubgroup }} ${{ parameters.archType }} ${{ parameters.buildConfig }}' @@ -108,6 +107,9 @@ jobs: # the __TestTimeout variable, which is later read by the coreclr xunit test wrapper code (the code in the # xunit test dlls that invokes the actual tests). # + # Note that "timeoutInMinutes" is an Azure DevOps Pipelines parameter for a "job" that specifies the + # total time allowed for a job, and is specified lower down. Make sure you set it properly for any new testGroup. + # # Please note that for Crossgen / Crossgen2 R2R runs, the "test running time" also includes the # time needed to compile the test into native code with the Crossgen compiler. @@ -144,6 +146,17 @@ jobs: value: 300 - name: timeoutPerTestInMinutes value: 90 + - ${{ if eq(parameters.testGroup, 'ilasm') }}: + # ilasm-ildasm round trip testing runs every test twice, plus runs ilasm and ildasm, so double the 'outerloop' timeout numbers. + - name: timeoutPerTestInMinutes + value: 20 + - name: timeoutPerTestCollectionInMinutes + value: 240 + - ${{ if in(parameters.testGroup, 'clrinterpreter') }}: + - name: timeoutPerTestCollectionInMinutes + value: 180 + - name: timeoutPerTestInMinutes + value: 30 - ${{ if eq(parameters.compositeBuildMode, true) }}: - name: crossgenArg @@ -161,9 +174,9 @@ jobs: timeoutInMinutes: 270 ${{ if in(parameters.testGroup, 'gc-longrunning', 'gc-simulator') }}: timeoutInMinutes: 480 - ${{ if in(parameters.testGroup, 'jitstress', 'jitstress-isas-arm', 'jitstressregs-x86', 'jitstressregs', 'jitstress2-jitstressregs', 'gcstress0x3-gcstress0xc') }}: + ${{ if in(parameters.testGroup, 'jitstress', 'jitstress-isas-arm', 'jitstressregs-x86', 'jitstressregs', 'jitstress2-jitstressregs', 'gcstress0x3-gcstress0xc', 'ilasm') }}: timeoutInMinutes: 390 - ${{ if in(parameters.testGroup, 'jitstress-isas-x86', 'gcstress-extra', 'r2r-extra') }}: + ${{ if in(parameters.testGroup, 'jitstress-isas-x86', 'gcstress-extra', 'r2r-extra', 'clrinterpreter') }}: timeoutInMinutes: 510 steps: @@ -432,6 +445,12 @@ jobs: - jitehwritethru - jitobjectstackallocation - jitpgo + ${{ if in(parameters.testGroup, 'ilasm') }}: + scenarios: + - ilasmroundtrip + ${{ if in(parameters.testGroup, 'clrinterpreter') }}: + scenarios: + - clrinterpreter # Publish Logs - task: PublishPipelineArtifact@1 diff --git a/eng/pipelines/coreclr/clrinterpreter.yml b/eng/pipelines/coreclr/clrinterpreter.yml new file mode 100644 index 000000000000..9506af301012 --- /dev/null +++ b/eng/pipelines/coreclr/clrinterpreter.yml @@ -0,0 +1,59 @@ +trigger: none + +pr: none + +schedules: +- cron: "0 19 * * 6,0" + displayName: Sat and Sun at 11:00 AM (UTC-8:00) + branches: + include: + - master + always: true + +jobs: +# +# Checkout repository +# +- template: /eng/pipelines/common/checkout-job.yml + +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/build-coreclr-and-libraries-job.yml + buildConfig: checked + platforms: + - Linux_arm + - Linux_arm64 + - Linux_x64 + - Windows_NT_x64 + - Windows_NT_x86 + - Windows_NT_arm64 + - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 + jobParameters: + testGroup: clrinterpreter + +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/templates/runtimes/build-test-job.yml + buildConfig: checked + platforms: + - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 + jobParameters: + testGroup: clrinterpreter + liveLibrariesBuildConfig: Release + +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml + buildConfig: checked + platforms: + - Linux_arm + - Linux_arm64 + - Linux_x64 + - Windows_NT_x64 + - Windows_NT_x86 + - Windows_NT_arm64 + helixQueueGroup: ci + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + jobParameters: + testGroup: clrinterpreter + liveLibrariesBuildConfig: Release diff --git a/eng/pipelines/coreclr/crossgen2-outerloop.yml b/eng/pipelines/coreclr/crossgen2-outerloop.yml index c674469e411a..505e3ecc2d1d 100644 --- a/eng/pipelines/coreclr/crossgen2-outerloop.yml +++ b/eng/pipelines/coreclr/crossgen2-outerloop.yml @@ -3,8 +3,8 @@ trigger: none pr: none schedules: -- cron: "0 6 * * *" - displayName: Mon through Sun at 10:00 PM (UTC-8:00) +- cron: "0 7 * * 0,2,4" + displayName: Sun, Tue, Thu at 11:00 PM (UTC-8:00) branches: include: - master @@ -22,8 +22,10 @@ jobs: buildConfig: checked platforms: - Linux_x64 + - Linux_arm64 - OSX_x64 - Windows_NT_x64 + - Windows_NT_arm64 - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 jobParameters: testGroup: outerloop @@ -38,6 +40,7 @@ jobs: testGroup: outerloop liveLibrariesBuildConfig: Release +# Test most platforms in composite mode as the expected mainline shipping mode - template: /eng/pipelines/common/platform-matrix.yml parameters: jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml @@ -45,8 +48,26 @@ jobs: buildConfig: checked platforms: - Linux_x64 + - Linux_arm64 - OSX_x64 - Windows_NT_x64 + - Windows_NT_arm64 + jobParameters: + testGroup: outerloop + readyToRun: true + crossgen2: true + compositeBuildMode: true + displayNameArgs: Composite + liveLibrariesBuildConfig: Release + +# Limited outerloop testing in non-composite mode +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + buildConfig: checked + platforms: + - OSX_x64 jobParameters: testGroup: outerloop readyToRun: true diff --git a/eng/pipelines/coreclr/ilasm.yml b/eng/pipelines/coreclr/ilasm.yml new file mode 100644 index 000000000000..ffdd75e38838 --- /dev/null +++ b/eng/pipelines/coreclr/ilasm.yml @@ -0,0 +1,48 @@ +trigger: none + +pr: none + +schedules: +- cron: "0 19 * * 6" + displayName: Sat at 11:00 AM (UTC-8:00) + branches: + include: + - master + always: true + +jobs: +# +# Checkout repository +# +- template: /eng/pipelines/common/checkout-job.yml + +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/build-coreclr-and-libraries-job.yml + buildConfig: checked + platformGroup: all + platforms: + - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 + jobParameters: + testGroup: ilasm + +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/templates/runtimes/build-test-job.yml + buildConfig: checked + platforms: + - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 + jobParameters: + testGroup: ilasm + liveLibrariesBuildConfig: Release + +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml + buildConfig: checked + platformGroup: all + helixQueueGroup: ci + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + jobParameters: + testGroup: ilasm + liveLibrariesBuildConfig: Release diff --git a/eng/pipelines/coreclr/libraries-gcstress-extra.yml b/eng/pipelines/coreclr/libraries-gcstress-extra.yml new file mode 100644 index 000000000000..58b4370724df --- /dev/null +++ b/eng/pipelines/coreclr/libraries-gcstress-extra.yml @@ -0,0 +1,60 @@ +trigger: none + +pr: none + +# This pipeline currently has too many failures to be enabled by schedule. +# schedules: +# - cron: "0 10 * * 0" +# displayName: Sun at 2:00 AM (UTC-8:00) +# branches: +# include: +# - master +# always: true + +jobs: +# +# Checkout repository +# +- template: /eng/pipelines/common/checkout-job.yml + +# +# Build CoreCLR checked and libraries Release +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/build-coreclr-and-libraries-job.yml + buildConfig: checked + platformGroup: gcstress + +# +# Libraries Test Build - Release innerloop. All libraries are built on x64 and reused on all platforms. +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/libraries/build-test-job.yml + buildConfig: Release + platforms: + - Linux_x64 + - Windows_NT_x64 + jobParameters: + liveRuntimeBuildConfig: checked + testScope: innerloop + +# +# Libraries Test Run using Release libraries, Checked CoreCLR, and stress modes +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/libraries/run-test-job.yml + buildConfig: Release + platformGroup: gcstress + helixQueueGroup: libraries + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + jobParameters: + # Default timeout is 150 minutes (2.5 hours), which is not enough for stress. + timeoutInMinutes: 600 + testScope: innerloop + liveRuntimeBuildConfig: checked + dependsOnTestBuildConfiguration: Release + dependsOnTestArchitecture: x64 + coreclrTestGroup: gcstress-extra diff --git a/eng/pipelines/coreclr/libraries-gcstress0x3-gcstress0xc.yml b/eng/pipelines/coreclr/libraries-gcstress0x3-gcstress0xc.yml new file mode 100644 index 000000000000..b11e314a983e --- /dev/null +++ b/eng/pipelines/coreclr/libraries-gcstress0x3-gcstress0xc.yml @@ -0,0 +1,60 @@ +trigger: none + +pr: none + +# This pipeline currently has too many failures to be enabled by schedule. +# schedules: +# - cron: "0 10 * * 6" +# displayName: Sat at 2:00 AM (UTC-8:00) +# branches: +# include: +# - master +# always: true + +jobs: +# +# Checkout repository +# +- template: /eng/pipelines/common/checkout-job.yml + +# +# Build CoreCLR checked and libraries Release +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/build-coreclr-and-libraries-job.yml + buildConfig: checked + platformGroup: gcstress + +# +# Libraries Test Build - Release innerloop. All libraries are built on x64 and reused on all platforms. +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/libraries/build-test-job.yml + buildConfig: Release + platforms: + - Linux_x64 + - Windows_NT_x64 + jobParameters: + liveRuntimeBuildConfig: checked + testScope: innerloop + +# +# Libraries Test Run using Release libraries, Checked CoreCLR, and stress modes +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/libraries/run-test-job.yml + buildConfig: Release + platformGroup: gcstress + helixQueueGroup: libraries + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + jobParameters: + # Default timeout is 150 minutes (2.5 hours), which is not enough for stress. + timeoutInMinutes: 600 + testScope: innerloop + liveRuntimeBuildConfig: checked + dependsOnTestBuildConfiguration: Release + dependsOnTestArchitecture: x64 + coreclrTestGroup: gcstress0x3-gcstress0xc diff --git a/eng/pipelines/coreclr/runincontext.yml b/eng/pipelines/coreclr/runincontext.yml index 08fd6c74aeed..91fb9189a6d1 100644 --- a/eng/pipelines/coreclr/runincontext.yml +++ b/eng/pipelines/coreclr/runincontext.yml @@ -36,6 +36,7 @@ jobs: - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 jobParameters: testGroup: outerloop + liveLibrariesBuildConfig: Release - template: /eng/pipelines/common/platform-matrix.yml parameters: diff --git a/eng/pipelines/coreclr/templates/build-job.yml b/eng/pipelines/coreclr/templates/build-job.yml index cd52dad3b17b..9b7975156ab6 100644 --- a/eng/pipelines/coreclr/templates/build-job.yml +++ b/eng/pipelines/coreclr/templates/build-job.yml @@ -36,12 +36,15 @@ jobs: condition: ${{ parameters.condition }} # Compute job name from template parameters - ${{ if eq(parameters.compilerName, 'gcc') }}: + ${{ if and(ne(parameters.testGroup, 'clrTools'), eq(parameters.compilerName, 'gcc')) }}: name: ${{ format('coreclr_{0}_product_build_{1}{1}_{3}_{4}', parameters.compilerName, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }} displayName: ${{ format('CoreCLR GCC Product Build {0}{1} {2} {3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }} - ${{ if ne(parameters.compilerName, 'gcc') }}: + ${{ if and(ne(parameters.testGroup, 'clrTools'), ne(parameters.compilerName, 'gcc')) }}: name: ${{ format('coreclr_{0}_product_build_{1}{2}_{3}_{4}', parameters.runtimeVariant, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }} displayName: ${{ format('CoreCLR {0} Product Build {1}{2} {3} {4}', parameters.runtimeVariant, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }} + ${{ if eq(parameters.testGroup, 'clrTools') }}: + name: ${{ format('coreclr_{0}_tools_unittests_{1}{2}_{3}_{4}', parameters.runtimeVariant, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }} + displayName: ${{ format('CoreCLR {0} Tools Unit Tests {1}{2} {3} {4}', parameters.runtimeVariant, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }} # Run all steps in the container. # Note that the containers are defined in platform-matrix.yml @@ -61,6 +64,9 @@ jobs: value: '' - name: publishLogsArtifactPrefix value: 'BuildLogs_CoreCLR' + - ${{ if eq(parameters.testGroup, 'clrTools') }}: + - name: publishLogsArtifactPrefix + value: 'BuildLogs_CoreCLR_ToolsUnitTests' - ${{ if eq(parameters.compilerName, 'gcc') }}: - name: compilerArg value: '-gcc' @@ -98,6 +104,12 @@ jobs: - name: enforcePgoArg value: '-enforcepgo' + - name: clrInterpreterBuildArg + value: '' + - ${{ if eq(parameters.testGroup, 'clrinterpreter') }}: + - name: clrInterpreterBuildArg + value: '-cmakeargs "-DFEATURE_INTERPRETER=1"' + - ${{ parameters.variables }} steps: @@ -129,10 +141,10 @@ jobs: # Build CoreCLR Runtime - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: - - script: $(coreClrRepoRootDir)build-runtime$(scriptExt) $(buildConfig) $(archType) $(crossArg) $(osArg) -ci $(compilerArg) $(officialBuildIdArg) + - script: $(coreClrRepoRootDir)build-runtime$(scriptExt) $(buildConfig) $(archType) $(crossArg) $(osArg) -ci $(compilerArg) $(officialBuildIdArg) $(clrInterpreterBuildArg) displayName: Build CoreCLR Runtime - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: - - script: set __TestIntermediateDir=int&&$(coreClrRepoRootDir)build-runtime$(scriptExt) $(buildConfig) $(archType) -ci $(enforcePgoArg) $(officialBuildIdArg) + - script: set __TestIntermediateDir=int&&$(coreClrRepoRootDir)build-runtime$(scriptExt) $(buildConfig) $(archType) -ci $(enforcePgoArg) $(officialBuildIdArg) $(clrInterpreterBuildArg) displayName: Build CoreCLR Runtime - ${{ if in(parameters.osGroup, 'OSX', 'iOS','tvOS') }}: @@ -149,13 +161,18 @@ jobs: - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -subset clr.corelib+clr.nativecorelib+clr.tools+clr.packages $(crossArg) -arch $(archType) $(osArg) -c $(buildConfig) $(officialBuildIdArg) -ci displayName: Build managed product components and packages + # Run CoreCLR Tools unit tests + - ${{ if eq(parameters.testGroup, 'clrTools') }}: + - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -subset clr.tools $(crossArg) -arch $(archType) $(osArg) -c $(buildConfig) $(officialBuildIdArg) -ci -test + displayName: Run CoreCLR Tools unit tests + # Build native test components - ${{ if ne(parameters.isOfficialBuild, true) }}: - script: $(coreClrRepoRootDir)build-test$(scriptExt) skipstressdependencies skipmanaged skipgeneratelayout $(buildConfig) $(archType) $(crossArg) $(osArg) $(priorityArg) $(compilerArg) displayName: Build native test components # Sign on Windows - - ${{ if and(eq(parameters.osGroup, 'Windows_NT'), eq(parameters.signBinaries, 'true')) }}: + - ${{ if and(eq(parameters.osGroup, 'Windows_NT'), eq(parameters.signBinaries, 'true'), ne(parameters.testGroup, 'clrTools')) }}: - powershell: eng\common\build.ps1 -ci -sign -restore -configuration:$(buildConfig) -warnaserror:0 /p:ArcadeBuild=true /p:OfficialBuild=true /p:TargetOS=$(osGroup) /p:TargetArchitecture=$(archType) /p:Configuration=$(_BuildConfig) /p:DotNetSignType=$env:_SignType -projects $(Build.SourcesDirectory)\eng\empty.csproj displayName: Sign Binaries @@ -167,8 +184,8 @@ jobs: continueOnError: true condition: always() - # Builds using gcc are not tested. - - ${{ if ne(parameters.compilerName, 'gcc') }}: + # Builds using gcc are not tested, and clrTools unitests do not publish the build artifacts + - ${{ if and(ne(parameters.compilerName, 'gcc'), ne(parameters.testGroup, 'clrTools')) }}: # Publish product output directory for consumption by tests. - template: /eng/pipelines/common/upload-artifact-step.yml parameters: @@ -180,7 +197,7 @@ jobs: artifactName: $(buildProductArtifactName) displayName: 'product build' - - ${{ if and(ne(parameters.compilerName, 'gcc'), ne(parameters.testGroup, '')) }}: + - ${{ if and(ne(parameters.compilerName, 'gcc'), ne(parameters.testGroup, ''), ne(parameters.testGroup, 'clrTools')) }}: # Publish test native components for consumption by test execution. - ${{ if ne(parameters.isOfficialBuild, true) }}: - template: /eng/pipelines/common/upload-artifact-step.yml @@ -202,11 +219,22 @@ jobs: SecretsFilter: 'dotnetfeed-storage-access-key-1,microsoft-symbol-server-pat,symweb-symbol-server-pat' # Save packages using the prepare-signed-artifacts format. - - ${{ if eq(parameters.isOfficialBuild, true) }}: + - ${{ if and(eq(parameters.isOfficialBuild, true), ne(parameters.testGroup, 'clrTools')) }}: - template: /eng/pipelines/common/upload-unsigned-artifacts-step.yml parameters: name: ${{ parameters.platform }} + # Publish unit tests results if executing unit tests + - ${{ if eq(parameters.testGroup, 'clrTools') }}: + - task: PublishTestResults@2 + inputs: + testResultsFormat: 'xUnit' + testResultsFiles: '*.xml' + testRunTitle: CoreCLR-Tools-Unittests-$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig) + searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' + continueOnError: true + condition: always() + # Publish Logs - task: PublishPipelineArtifact@1 displayName: Publish Logs diff --git a/eng/pipelines/coreclr/templates/run-performance-job.yml b/eng/pipelines/coreclr/templates/run-performance-job.yml index b43fc5a33324..249ff6bd1a2f 100644 --- a/eng/pipelines/coreclr/templates/run-performance-job.yml +++ b/eng/pipelines/coreclr/templates/run-performance-job.yml @@ -52,15 +52,17 @@ jobs: - HelixApiAccessToken: '' - HelixPreCommandStemWindows: 'py -3 -m venv %HELIX_WORKITEM_PAYLOAD%\.venv;call %HELIX_WORKITEM_PAYLOAD%\.venv\Scripts\activate.bat;set PYTHONPATH=;py -3 -m pip install --user azure.storage.blob==12.0.0 --force-reinstall;py -3 -m pip install --user azure.storage.queue==12.0.0 --force-reinstall;set "PERFLAB_UPLOAD_TOKEN=$(PerfCommandUploadToken)"' - HelixPreCommandStemLinux: 'sudo apt-get -y install python3-venv;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/Scripts/activate;export PYTHONPATH=;pip3 install --user azure.storage.blob==12.0.0 --force-reinstall;pip3 install --user azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"' + - ExtraMSBuildLogsWindows: 'set MSBUILDDEBUGCOMM=1;set "MSBUILDDEBUGPATH=%HELIX_WORKITEM_UPLOAD_ROOT%"' + - ExtraMSBuildLogsLinux: 'export MSBUILDDEBUGCOMM=1;export "MSBUILDDEBUGPATH=$HELIX_WORKITEM_UPLOAD_ROOT"' - HelixPreCommand: '' - Interpreter: '' - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - ${{ if eq( parameters.osGroup, 'Windows_NT') }}: - - HelixPreCommand: $(HelixPreCommandStemWindows) + - HelixPreCommand: $(HelixPreCommandStemWindows);$(ExtraMSBuildLogsWindows) - IsInternal: -Internal - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: - - HelixPreCommand: $(HelixPreCommandStemLinux) + - HelixPreCommand: $(HelixPreCommandStemLinux);$(ExtraMSBuildLogsLinux) - IsInternal: --internal - group: DotNet-HelixApi-Access @@ -69,17 +71,17 @@ jobs: - ${{ if and(eq(parameters.codeGenType, 'Interpreter'), eq(parameters.runtimeType, 'mono')) }}: - ${{ if eq( parameters.osGroup, 'Windows_NT') }}: - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - HelixPreCommand: '$(HelixPreCommandStemWindows);set MONO_ENV_OPTIONS="--interpreter"' + - HelixPreCommand: '$(HelixPreCommandStemWindows);set MONO_ENV_OPTIONS="--interpreter";$(ExtraMSBuildLogsWindows)' - Interpreter: ' -MonoInterpreter' - ${{ if not(and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'))) }}: - - HelixPreCommand: 'set MONO_ENV_OPTIONS="--interpreter"' + - HelixPreCommand: 'set MONO_ENV_OPTIONS="--interpreter";$(ExtraMSBuildLogsWindows)' - Interpreter: ' -MonoInterpreter' - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - HelixPreCommand: '$(HelixPreCommandStemLinux);export MONO_ENV_OPTIONS="--interpreter"' + - HelixPreCommand: '$(HelixPreCommandStemLinux);export MONO_ENV_OPTIONS="--interpreter";$(ExtraMSBuildLogsLinux)' - Interpreter: ' --monointerpreter' - ${{ if not(and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'))) }}: - - HelixPreCommand: '$(HelixPreCommandStemLinux);export MONO_ENV_OPTIONS="--interpreter"' + - HelixPreCommand: 'export MONO_ENV_OPTIONS="--interpreter";$(ExtraMSBuildLogsLinux)' - Interpreter: ' --monointerpreter' workspace: diff --git a/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml b/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml index 115599a9669a..dfcf6652e25e 100644 --- a/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml +++ b/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml @@ -104,7 +104,8 @@ jobs: - name: priorityArg value: '' - - ${{ if ne(parameters.testGroup, 'innerloop') }}: + # 'innerloop' and 'clrinterpreter' jobs run the Priority 0 tests; everything else runs the Priority 1 tests. + - ${{ if and(ne(parameters.testGroup, 'innerloop'), ne(parameters.testGroup, 'clrinterpreter')) }}: - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: - name: priorityArg value: 'priority1' diff --git a/eng/pipelines/libraries/build-job.yml b/eng/pipelines/libraries/build-job.yml index 919eba8249a7..73d8e05708c1 100644 --- a/eng/pipelines/libraries/build-job.yml +++ b/eng/pipelines/libraries/build-job.yml @@ -128,14 +128,11 @@ jobs: - ${{ if eq(parameters.runTests, true) }}: - template: /eng/pipelines/libraries/helix.yml parameters: - targetOS: ${{ parameters.osGroup }} - archGroup: ${{ parameters.archType }} - configuration: ${{ parameters.buildConfig }} - helixQueues: ${{ join('+', parameters.helixQueues) }} - msbuildScript: $(_msbuildCommand) - framework: ${{ parameters.framework }} + osGroup: ${{ parameters.osGroup }} + archType: ${{ parameters.archType }} + buildConfig: ${{ parameters.buildConfig }} + helixQueues: ${{ parameters.helixQueues }} testScope: ${{ parameters.testScope }} creator: dotnet-bot - helixToken: '' testRunNamePrefixSuffix: $(_testRunNamePrefixSuffix) extraHelixArguments: $(_extraHelixArguments) diff --git a/eng/pipelines/libraries/helix-queues-setup.yml b/eng/pipelines/libraries/helix-queues-setup.yml index 3e10708044e2..2bdfc5715886 100644 --- a/eng/pipelines/libraries/helix-queues-setup.yml +++ b/eng/pipelines/libraries/helix-queues-setup.yml @@ -90,16 +90,12 @@ jobs: # netcoreapp - ${{ if notIn(parameters.jobParameters.framework, 'allConfigurations', 'net472') }}: - ${{ if eq(parameters.jobParameters.isFullMatrix, true) }}: - # Bring back once: https://github.com/dotnet/runtime/issues/35689 is fixed - # - Windows.7.Amd64.Open - Windows.81.Amd64.Open - Windows.10.Amd64.ServerRS5.Open - Windows.10.Amd64.Server19H1.Open - ${{ if ne(parameters.jobParameters.runtimeFlavor, 'mono') }}: - (Windows.Nano.1809.Amd64.Open)windows.10.amd64.serverrs5.open@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1809-helix-amd64-08e8e40-20200107182504 - ${{ if eq(parameters.jobParameters.isFullMatrix, false) }}: - # Bring back once: https://github.com/dotnet/runtime/issues/35689 is fixed - # - Windows.7.Amd64.Open - Windows.81.Amd64.Open - Windows.10.Amd64.Server19H1.ES.Open - ${{ if ne(parameters.jobParameters.runtimeFlavor, 'mono') }}: @@ -119,8 +115,6 @@ jobs: - ${{ if notIn(parameters.jobParameters.framework, 'allConfigurations', 'net472') }}: - ${{ if eq(parameters.jobParameters.isFullMatrix, true) }}: - Windows.7.Amd64.Open - # Bring back once: https://github.com/dotnet/runtime/issues/35689 is fixed - # - Windows.81.Amd64.Open - Windows.10.Amd64.ServerRS5.Open - Windows.10.Amd64.Server19H1.Open - ${{ if eq(parameters.jobParameters.isFullMatrix, false) }}: @@ -128,8 +122,6 @@ jobs: - Windows.10.Amd64.Server19H1.ES.Open - ${{ if eq(parameters.jobParameters.buildConfig, 'Debug') }}: - Windows.7.Amd64.Open - # Bring back once: https://github.com/dotnet/runtime/issues/35689 is fixed - # - Windows.81.Amd64.Open - Windows.10.Amd64.Server19H1.Open # NET472 @@ -144,4 +136,8 @@ jobs: - ${{ if eq(parameters.platform, 'Windows_NT_arm64') }}: - Windows.10.Arm64.Open + # WebAssembly + - ${{ if eq(parameters.platform, 'Browser_wasm') }}: + - Ubuntu.2004.Amd64.Open + ${{ insert }}: ${{ parameters.jobParameters }} diff --git a/eng/pipelines/libraries/helix.yml b/eng/pipelines/libraries/helix.yml index af5bdeab9e71..c0c5873d297d 100644 --- a/eng/pipelines/libraries/helix.yml +++ b/eng/pipelines/libraries/helix.yml @@ -1,12 +1,10 @@ parameters: runtimeFlavor: '' - archGroup: '' - configuration: '' + archType: '' + buildConfig: '' creator: '' - framework: '' helixQueues: '' - msbuildScript: '' - targetOS: '' + osGroup: '' testRunNamePrefixSuffix: '' testScope: 'innerloop' # innerloop | outerloop | all interpreter: '' @@ -15,12 +13,12 @@ parameters: scenarios: '' steps: - - script: ${{ parameters.msbuildScript }} + - script: $(_msbuildCommand) $(Build.SourcesDirectory)/src/libraries/sendtohelix.proj /p:RuntimeFlavor=${{ parameters.runtimeFlavor }} - /p:TargetArchitecture=${{ parameters.archGroup }} - /p:Configuration=${{ parameters.configuration }} - /p:TargetOS=${{ parameters.targetOS }} + /p:TargetArchitecture=${{ parameters.archType }} + /p:Configuration=${{ parameters.buildConfig }} + /p:TargetOS=${{ parameters.osGroup }} /p:MonoEnableInterpreter=${{ parameters.interpreter }} /p:TestScope=${{ parameters.testScope }} /p:TestRunNamePrefixSuffix=${{ parameters.testRunNamePrefixSuffix }} @@ -32,5 +30,5 @@ steps: condition: and(succeeded(), ${{ parameters.condition }}) env: SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops - HelixTargetQueues: ${{ parameters.helixQueues }} # Pass queues to MSBuild as env var to avoid need of escaping them + HelixTargetQueues: ${{ join('+', parameters.helixQueues) }} # Pass queues to MSBuild as env var to avoid need of escaping them _Scenarios: ${{ join(',', parameters.scenarios) }} # Pass scenarios to MSBuild as env var to avoid need of escaping comma separated list diff --git a/eng/pipelines/libraries/run-test-job.yml b/eng/pipelines/libraries/run-test-job.yml index 5980a2e2ef15..554fbcc17ed4 100644 --- a/eng/pipelines/libraries/run-test-job.yml +++ b/eng/pipelines/libraries/run-test-job.yml @@ -81,9 +81,24 @@ jobs: parameters: displayName: Test Assets cleanUnpackFolder: false - unpackFolder: $(Build.SourcesDirectory)/artifacts artifactName: $(librariesTestsArtifactName) artifactFileName: $(librariesTestsArtifactName)$(archiveExtension) + unpackFolder: $(Build.SourcesDirectory)/artifacts + + - ${{ if in(parameters.coreclrTestGroup, 'gcstress0x3-gcstress0xc', 'gcstress-extra') }}: + # We need to find and download the GC stress dependencies (namely, coredistools). Put them + # in the 'sharedFramework' directory where we unpacked the CoreCLR build artifacts. The 'sharedFramework' + # directory is what is copied into the testhost. + - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + - script: $(Build.SourcesDirectory)\src\coreclr\tests\setup-stress-dependencies.cmd + /arch ${{ parameters.archType }} + /outputdir $(_runtimeDownloadPath)/sharedFramework + displayName: Download GC stress dependencies + - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: + - script: $(Build.SourcesDirectory)/src/coreclr/tests/setup-stress-dependencies.sh + --arch=${{ parameters.archType }} + --outputDir=$(_runtimeDownloadPath)/sharedFramework + displayName: Download GC stress dependencies - ${{ if ne(parameters.liveRuntimeBuildConfig, '') }}: - script: $(_buildScript) @@ -96,16 +111,13 @@ jobs: - template: /eng/pipelines/libraries/helix.yml parameters: runtimeFlavor: ${{ parameters.runtimeFlavor }} - targetOS: ${{ parameters.osGroup }} - archGroup: ${{ parameters.archType }} - configuration: ${{ parameters.buildConfig }} - helixQueues: ${{ join('+', parameters.helixQueues) }} - msbuildScript: $(_msbuildCommand) - framework: ${{ parameters.framework }} + osGroup: ${{ parameters.osGroup }} + archType: ${{ parameters.archType }} + buildConfig: ${{ parameters.buildConfig }} + helixQueues: ${{ parameters.helixQueues }} testScope: ${{ parameters.testScope }} interpreter: ${{ parameters.interpreter }} creator: dotnet-bot - helixToken: '' testRunNamePrefixSuffix: $(_testRunNamePrefixSuffix) extraHelixArguments: $(_extraHelixArguments) @@ -113,7 +125,7 @@ jobs: # eng/pipelines/common/templates/runtimes/run-test-job.yml (with 'testGroup' replaced by 'coreclrTestGroup' # for clarity), and should remain in sync. This is only a subset; only the testGroups that are # used to test the libraries have been added here. More could be added if we decided to test the - # libraries with more stress modes (e.g., GCStress). The scenario tags are interpreted by + # libraries with more stress modes. The scenario tags are interpreted by # src\coreclr\tests\testenvironment.proj. # # The one difference here compared to eng/pipelines/common/templates/runtimes/run-test-job.yml is @@ -151,3 +163,18 @@ jobs: - jitstress2_jitstressregs0x10 - jitstress2_jitstressregs0x80 - jitstress2_jitstressregs0x1000 + ${{ if in(parameters.coreclrTestGroup, 'gcstress0x3-gcstress0xc') }}: + scenarios: + # Disable gcstress0x3 for now; it causes lots of test timeouts. Investigate this after + # gcstress0xc runs are clean. Tracking issue: https://github.com/dotnet/runtime/issues/38903. + # - gcstress0x3 + - gcstress0xc + ${{ if in(parameters.coreclrTestGroup, 'gcstress-extra') }}: + scenarios: + - heapverify1 + - gcstress0xc_zapdisable + - gcstress0xc_zapdisable_jitstress2 + - gcstress0xc_zapdisable_heapverify1 + - gcstress0xc_jitstress1 + - gcstress0xc_jitstress2 + - gcstress0xc_jitminopts_heapverify1 diff --git a/eng/pipelines/runtime-linker-tests.yml b/eng/pipelines/runtime-linker-tests.yml index ab65e1d88d07..ceffb1e237e7 100644 --- a/eng/pipelines/runtime-linker-tests.yml +++ b/eng/pipelines/runtime-linker-tests.yml @@ -7,13 +7,43 @@ trigger: branches: include: - master + - dev/infrastructure - release/*.* + paths: + include: + - '*' + exclude: + - eng/Version.Details.xml + - .github/* + - docs/* + - CODE-OF-CONDUCT.md + - CONTRIBUTING.md + - LICENSE.TXT + - PATENTS.TXT + - README.md + - SECURITY.md + - THIRD-PARTY-NOTICES.TXT pr: branches: include: - master + - dev/infrastructure - release/*.* + paths: + include: + - '*' + exclude: + - eng/Version.Details.xml + - .github/* + - docs/* + - CODE-OF-CONDUCT.md + - CONTRIBUTING.md + - LICENSE.TXT + - PATENTS.TXT + - README.md + - SECURITY.md + - THIRD-PARTY-NOTICES.TXT jobs: # diff --git a/eng/pipelines/runtime-official.yml b/eng/pipelines/runtime-official.yml index 0874ab60876c..3d335e198d7d 100644 --- a/eng/pipelines/runtime-official.yml +++ b/eng/pipelines/runtime-official.yml @@ -108,7 +108,7 @@ stages: - OSX_x64 - Linux_x64 # - Linux_arm - # - Linux_arm64 + - Linux_arm64 # - Linux_musl_x64 # - Linux_musl_arm64 # - Windows_NT_x64 diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index e94c1469ad80..32d7dc0e686f 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -109,7 +109,9 @@ jobs: - eng/pipelines/installer/* - subset: runtimetests include: + - src/tests/* - src/coreclr/tests/* + - src/coreclr/build-test.cmd - src/coreclr/build-test.sh - subset: installer include: @@ -151,6 +153,7 @@ jobs: condition: >- or( eq(dependencies.checkout.outputs['SetPathVars_coreclr.containsChange'], true), + eq(dependencies.checkout.outputs['SetPathVars_runtimetests.containsChange'], true), eq(variables['isFullMatrix'], true)) # @@ -187,6 +190,7 @@ jobs: or( eq(dependencies.checkout.outputs['SetPathVars_coreclr.containsChange'], true), eq(dependencies.checkout.outputs['SetPathVars_libraries.containsChange'], true), + eq(dependencies.checkout.outputs['SetPathVars_runtimetests.containsChange'], true), eq(variables['isFullMatrix'], true)) # @@ -233,6 +237,20 @@ jobs: eq(dependencies.checkout.outputs['SetPathVars_coreclr.containsChange'], true), eq(variables['isFullMatrix'], true))) +# Build and test clr tools +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml + buildConfig: checked + platforms: + - Linux_x64 + jobParameters: + testGroup: clrTools + condition: >- + or( + eq(dependencies.checkout.outputs['SetPathVars_coreclr.containsChange'], true), + eq(variables['isFullMatrix'], true)) + # Build the whole product using Mono runtime # Only when libraries, mono or installer are changed # @@ -247,7 +265,6 @@ jobs: - tvOS_x64 - iOS_arm64 - iOS_x86 - - Browser_wasm - Linux_arm jobParameters: testGroup: innerloop @@ -283,6 +300,33 @@ jobs: eq(dependencies.checkout.outputs['SetPathVars_installer.containsChange'], true), eq(variables['isFullMatrix'], true)) +# +# Build the whole product using Mono and run tests +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + buildConfig: Release + runtimeFlavor: mono + platforms: + - Browser_wasm + jobParameters: + testGroup: innerloop + nameSuffix: AllSubsets_Mono + buildArgs: -s mono+libs+installer+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true + timeoutInMinutes: 120 + extraStepsTemplate: /eng/pipelines/libraries/helix.yml + extraStepsParameters: + creator: dotnet-bot + testRunNamePrefixSuffix: Mono_$(_BuildConfig) + condition: >- + or( + eq(dependencies.checkout.outputs['SetPathVars_libraries.containsChange'], true), + eq(dependencies.checkout.outputs['SetPathVars_mono.containsChange'], true), + eq(dependencies.checkout.outputs['SetPathVars_installer.containsChange'], true), + eq(variables['isFullMatrix'], true)) + # # Build Mono and Installer on LLVMJIT mode # @@ -312,6 +356,7 @@ jobs: runtimeFlavor: mono platforms: - Linux_x64 + - Linux_arm64 jobParameters: testGroup: innerloop nameSuffix: AllSubsets_Mono_LLVMJIT @@ -334,6 +379,7 @@ jobs: runtimeFlavor: mono platforms: - Linux_x64 + - Linux_arm64 jobParameters: testGroup: innerloop nameSuffix: AllSubsets_Mono_LLVMAOT @@ -572,6 +618,7 @@ jobs: eq(dependencies.checkout.outputs['SetPathVars_libraries.containsChange'], true), eq(dependencies.checkout.outputs['SetPathVars_coreclr.containsChange'], true), eq(dependencies.checkout.outputs['SetPathVars_mono.containsChange'], true), + eq(dependencies.checkout.outputs['SetPathVars_runtimetests.containsChange'], true), eq(variables['isFullMatrix'], true)) # @@ -609,6 +656,7 @@ jobs: condition: >- or( eq(dependencies.checkout.outputs['SetPathVars_coreclr.containsChange'], true), + eq(dependencies.checkout.outputs['SetPathVars_runtimetests.containsChange'], true), eq(variables['isFullMatrix'], true)) # @@ -632,6 +680,7 @@ jobs: condition: >- or( eq(dependencies.checkout.outputs['SetPathVars_coreclr.containsChange'], true), + eq(dependencies.checkout.outputs['SetPathVars_runtimetests.containsChange'], true), eq(variables['isFullMatrix'], true)) - template: /eng/pipelines/common/platform-matrix.yml @@ -651,6 +700,7 @@ jobs: condition: >- or( eq(dependencies.checkout.outputs['SetPathVars_coreclr.containsChange'], true), + eq(dependencies.checkout.outputs['SetPathVars_runtimetests.containsChange'], true), eq(variables['isFullMatrix'], true)) # diff --git a/eng/referenceAssemblies.props b/eng/referenceAssemblies.props index 35131d5fdf60..a5e0e553f12f 100644 --- a/eng/referenceAssemblies.props +++ b/eng/referenceAssemblies.props @@ -1,7 +1,12 @@ - - $(AdditionalBuildTargetFrameworks);netstandard2.0;netstandard2.1 + + $(AdditionalBuildTargetFrameworks);netstandard2.0 + $(AdditionalBuildTargetFrameworks);netstandard2.1 + + $(NoWarn);CS0169;CS0649;CS8618 diff --git a/eng/restore/docs.targets b/eng/restore/docs.targets index 2437815a0f33..072564d9ac7a 100644 --- a/eng/restore/docs.targets +++ b/eng/restore/docs.targets @@ -9,7 +9,7 @@ AfterTargets="Restore"> - + $([System.String]::new('%(RecursiveDir)').TrimEnd('\/')) diff --git a/eng/targetframeworksuffix.props b/eng/targetframeworksuffix.props index 61e1f5511d44..96cd8db859c3 100644 --- a/eng/targetframeworksuffix.props +++ b/eng/targetframeworksuffix.props @@ -78,8 +78,8 @@ - true true + browser diff --git a/eng/testing/WasmRunnerTemplate.sh b/eng/testing/WasmRunnerTemplate.sh index 9ec16d23dceb..c9272caf8f18 100644 --- a/eng/testing/WasmRunnerTemplate.sh +++ b/eng/testing/WasmRunnerTemplate.sh @@ -1,19 +1,24 @@ #!/usr/bin/env bash EXECUTION_DIR=$(dirname $0) -JAVASCRIPT_ENGINE=$1 cd $EXECUTION_DIR XHARNESS_OUT="$EXECUTION_DIR/xharness-output" -dotnet xharness wasm test --engine=$JAVASCRIPT_ENGINE \ - --js-file=runtime.js -v \ - --output-directory=$XHARNESS_OUT \ - -- --enable-gc --run WasmTestRunner.dll ${@:2} +if [ ! -z "$XHARNESS_CLI_PATH" ]; then + # When running in CI, we only have the .NET runtime available + # We need to call the XHarness CLI DLL directly via dotnet exec + HARNESS_RUNNER="dotnet exec $XHARNESS_CLI_PATH" +else + HARNESS_RUNNER="dotnet xharness" +fi + +# RunCommands defined in tests.mobile.targets +[[RunCommands]] _exitCode=$? -echo "Xharness artifacts: $XHARNESS_OUT" +echo "XHarness artifacts: $XHARNESS_OUT" exit $_exitCode diff --git a/eng/testing/linker/SupportFiles/Directory.Build.props b/eng/testing/linker/SupportFiles/Directory.Build.props index f64aabfc4eac..3bec2264d6fd 100644 --- a/eng/testing/linker/SupportFiles/Directory.Build.props +++ b/eng/testing/linker/SupportFiles/Directory.Build.props @@ -2,6 +2,7 @@ true <_TrimmerDefaultAction>link + <_TrimmerLinkSymbols>true true false diff --git a/eng/testing/linker/project.csproj.template b/eng/testing/linker/project.csproj.template index 75c4bd26d573..ef63096e8019 100644 --- a/eng/testing/linker/project.csproj.template +++ b/eng/testing/linker/project.csproj.template @@ -6,6 +6,7 @@ {RuntimeIdentifier} {RuntimePackDir} {TargetingPackDir} + <_ExtraTrimmerArgs>{ExtraTrimmerArgs} $(_ExtraTrimmerArgs) + $HARNESS_RUNNER wasm test --engine=$(JSEngine) $(JSEngineArgs) --js-file=runtime.js -v --output-directory=$XHARNESS_OUT -- --enable-zoneinfo --run WasmTestRunner.dll $(AssemblyName).dll @@ -115,6 +125,20 @@ + + + + + + + + + + + + + + @@ -123,7 +147,7 @@ MicrosoftNetCoreAppRuntimePackDir="$(MicrosoftNetCoreAppRuntimePackRidDir)" MainAssembly="$(PublishDir)WasmTestRunner.dll" MainJS="$(MonoProjectRoot)\wasm\runtime-test.js" - ExtraAssemblies="$(PublishDir)$(AssemblyName).dll" + ExtraAssemblies="@(ExtraAssemblies)" FilesToIncludeInFileSystem="@(WasmFilesToIncludeInFileSystem)" AssemblySearchPaths="@(AssemblySearchPaths)" /> @@ -156,5 +180,5 @@ + DependsOnTargets="UpdateRuntimePack;Publish;BundleTestAppleApp;BundleTestAndroidApp;BundleTestWasmApp;ArchiveTests" /> diff --git a/eng/testing/tests.targets b/eng/testing/tests.targets index 5e44a3070192..1534c3aa0dad 100644 --- a/eng/testing/tests.targets +++ b/eng/testing/tests.targets @@ -24,15 +24,30 @@ + + PrepareForRun + + + + + + + $([MSBuild]::NormalizeDirectory('$(OutDir)', 'AppBundle')) + <_ZipSourceDirectory>$(OutDir) + <_ZipSourceDirectory Condition="'$(TargetOS)' == 'Browser'">$(BundleDir) + + - diff --git a/eng/testing/xunit/xunit.console.targets b/eng/testing/xunit/xunit.console.targets index 2824bd841078..837b432a99eb 100644 --- a/eng/testing/xunit/xunit.console.targets +++ b/eng/testing/xunit/xunit.console.targets @@ -4,7 +4,7 @@ testResults.xml - + <_depsFileArgument Condition="'$(GenerateDependencyFile)' == 'true'">--depsfile $(AssemblyName).deps.json "$(RunScriptHost)" exec --runtimeconfig $(AssemblyName).runtimeconfig.json $(_depsFileArgument) xunit.console.dll xunit.console.exe @@ -13,13 +13,15 @@ $(RunScriptCommand) -xml $(TestResultsName) $(RunScriptCommand) -nologo $(RunScriptCommand) -nocolor + $(RunScriptCommand) -noappdomain + $(RunScriptCommand) -maxthreads 1 + $(RunScriptCommand) -verbose + + - $(RunScriptCommand) -maxthreads 1 $(RunScriptCommand) -method $(XUnitMethodName) $(RunScriptCommand) -class $(XUnitClassName) - $(RunScriptCommand) -verbose - $(RunScriptCommand) -noappdomain $(RunScriptCommand)$(_withCategories.Replace(';', ' -trait category=')) diff --git a/global.json b/global.json index 8a5724046025..2cbc796534d7 100644 --- a/global.json +++ b/global.json @@ -12,12 +12,12 @@ "python3": "3.7.1" }, "msbuild-sdks": { - "Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "5.0.0-beta.20316.1", - "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20316.1", - "Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk": "5.0.0-beta.20316.1", - "Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.20316.1", + "Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "5.0.0-beta.20330.3", + "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20330.3", + "Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk": "5.0.0-beta.20330.3", + "Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.20330.3", "Microsoft.FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0", - "Microsoft.NET.Sdk.IL": "5.0.0-preview.7.20316.4", + "Microsoft.NET.Sdk.IL": "5.0.0-preview.8.20359.4", "Microsoft.Build.NoTargets": "1.0.53", "Microsoft.Build.Traversal": "2.0.34" } diff --git a/src/coreclr/build-runtime.cmd b/src/coreclr/build-runtime.cmd index 2c1d7db98ee7..aa9573d790cb 100644 --- a/src/coreclr/build-runtime.cmd +++ b/src/coreclr/build-runtime.cmd @@ -85,6 +85,7 @@ set __SkipGenerateVersion=0 set __RestoreOptData=1 set __CrossArch= set __PgoOptDataPath= +set __CMakeArgs= @REM CMD has a nasty habit of eating "=" on the argument list, so passing: @REM -priority=1 @@ -151,6 +152,7 @@ if [!__PassThroughArgs!]==[] ( if /i "%1" == "-alpinedac" (set __BuildNative=0&set __BuildCrossArchNative=1&set __CrossArch=x64&set __TargetOS=alpine&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) if /i "%1" == "-linuxdac" (set __BuildNative=0&set __BuildCrossArchNative=1&set __CrossArch=x64&set __TargetOS=Linux&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) +if /i "%1" == "-cmakeargs" (set __CMakeArgs=%2 %__CMakeArgs%&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop) if /i "%1" == "-configureonly" (set __ConfigureOnly=1&set __BuildNative=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) if /i "%1" == "-skipconfigure" (set __SkipConfigure=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) if /i "%1" == "-skipnative" (set __BuildNative=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) @@ -423,18 +425,18 @@ if %__BuildCrossArchNative% EQU 1 ( set __CMakeBinDir=%__CrossComponentBinDir% set "__CMakeBinDir=!__CMakeBinDir:\=/!" - set __ExtraCmakeArgs="-DCLR_CROSS_COMPONENTS_BUILD=1" "-DCLR_CMAKE_TARGET_ARCH=%__BuildArch%" "-DCLR_CMAKE_TARGET_OS=%__TargetOS%" "-DCLR_CMAKE_PGO_INSTRUMENT=%__PgoInstrument%" "-DCLR_CMAKE_OPTDATA_PATH=%__PgoOptDataPath%" "-DCLR_CMAKE_PGO_OPTIMIZE=%__PgoOptimize%" "-DCMAKE_SYSTEM_VERSION=10.0" "-DCLR_ENG_NATIVE_DIR=%__RepoRootDir%/eng/native" "-DCLR_REPO_ROOT_DIR=%__RepoRootDir%" + set __ExtraCmakeArgs="-DCLR_CROSS_COMPONENTS_BUILD=1" "-DCLR_CMAKE_TARGET_ARCH=%__BuildArch%" "-DCLR_CMAKE_TARGET_OS=%__TargetOS%" "-DCLR_CMAKE_PGO_INSTRUMENT=%__PgoInstrument%" "-DCLR_CMAKE_OPTDATA_PATH=%__PgoOptDataPath%" "-DCLR_CMAKE_PGO_OPTIMIZE=%__PgoOptimize%" "-DCMAKE_SYSTEM_VERSION=10.0" "-DCLR_ENG_NATIVE_DIR=%__RepoRootDir%/eng/native" "-DCLR_REPO_ROOT_DIR=%__RepoRootDir%" %__CMakeArgs% call "%__SourceDir%\pal\tools\gen-buildsys.cmd" "%__ProjectDir%" "%__CrossCompIntermediatesDir%" %__VSVersion% %__CrossArch% !__ExtraCmakeArgs! if not !errorlevel! == 0 ( - echo %__ErrMsgPrefix%%__MsgPrefix%Error: failed to generate native component build project! + echo %__ErrMsgPrefix%%__MsgPrefix%Error: failed to generate cross architecture native component build project! goto ExitWithError ) @if defined _echo @echo on :SkipConfigureCrossBuild if not exist "%__CrossCompIntermediatesDir%\CMakeCache.txt" ( - echo %__ErrMsgPrefix%%__MsgPrefix%Error: unable to find generated native component build project! + echo %__ErrMsgPrefix%%__MsgPrefix%Error: unable to find generated cross architecture native component build project! goto ExitWithError ) @@ -506,7 +508,7 @@ if %__BuildNative% EQU 1 ( echo %__MsgPrefix%Regenerating the Visual Studio solution - set __ExtraCmakeArgs="-DCMAKE_SYSTEM_VERSION=10.0" !___CrossBuildDefine! "-DCLR_CMAKE_PGO_INSTRUMENT=%__PgoInstrument%" "-DCLR_CMAKE_OPTDATA_PATH=%__PgoOptDataPath%" "-DCLR_CMAKE_PGO_OPTIMIZE=%__PgoOptimize%" "-DCLR_ENG_NATIVE_DIR=%__RepoRootDir%/eng/native" "-DCLR_REPO_ROOT_DIR=%__RepoRootDir%" + set __ExtraCmakeArgs="-DCMAKE_SYSTEM_VERSION=10.0" !___CrossBuildDefine! "-DCLR_CMAKE_PGO_INSTRUMENT=%__PgoInstrument%" "-DCLR_CMAKE_OPTDATA_PATH=%__PgoOptDataPath%" "-DCLR_CMAKE_PGO_OPTIMIZE=%__PgoOptimize%" "-DCLR_ENG_NATIVE_DIR=%__RepoRootDir%/eng/native" "-DCLR_REPO_ROOT_DIR=%__RepoRootDir%" %__CMakeArgs% call "%__SourceDir%\pal\tools\gen-buildsys.cmd" "%__ProjectDir%" "%__IntermediatesDir%" %__VSVersion% %__BuildArch% !__ExtraCmakeArgs! if not !errorlevel! == 0 ( echo %__ErrMsgPrefix%%__MsgPrefix%Error: failed to generate native component build project! @@ -691,6 +693,7 @@ echo Build type: one of -Debug, -Checked, -Release ^(default: -Debug^). echo -nopgooptimize: do not use profile guided optimizations. echo -enforcepgo: verify after the build that PGO was used for key DLLs, and fail the build if not echo -pgoinstrument: generate instrumented code for profile guided optimization enabled binaries. +echo -cmakeargs: user-settable additional arguments passed to CMake. echo -configureonly: skip all builds; only run CMake ^(default: CMake and builds are run^) echo -skipconfigure: skip CMake ^(default: CMake is run^) echo -skipnative: skip building native components ^(default: native components are built^). diff --git a/src/coreclr/build-test.cmd b/src/coreclr/build-test.cmd index ca0ad5384c58..62fe83149b50 100644 --- a/src/coreclr/build-test.cmd +++ b/src/coreclr/build-test.cmd @@ -34,7 +34,7 @@ if %__ProjectDir:~-1%==\ set "__ProjectDir=%__ProjectDir:~0,-1%" set "__RepoRootDir=%__ProjectDir%\..\.." for %%i in ("%__RepoRootDir%") do SET "__RepoRootDir=%%~fi" -set "__TestDir=%__ProjectDir%\tests" +set "__TestDir=%__RepoRootDir%\src\tests" set "__ProjectFilesDir=%__TestDir%" set "__SourceDir=%__ProjectDir%\src" set "__RootBinDir=%__RepoRootDir%\artifacts" @@ -42,7 +42,7 @@ set "__LogsDir=%__RootBinDir%\log" set "__MsbuildDebugLogsDir=%__LogsDir%\MsbuildDebugLogs" :: Default __Exclude to issues.targets -set __Exclude=%__TestDir%\issues.targets +set __Exclude=%__ProjectDir%\tests\issues.targets REM __UnprocessedBuildArgs are args that we pass to msbuild (e.g. /p:TargetArchitecture=x64) set "__args= %*" @@ -204,7 +204,7 @@ REM ============================================================================ if defined __SkipStressDependencies goto skipstressdependencies -call "%__TestDir%\setup-stress-dependencies.cmd" /arch %__BuildArch% /outputdir %__BinDir% +call "%__ProjectDir%\tests\setup-stress-dependencies.cmd" /arch %__BuildArch% /outputdir %__BinDir% if errorlevel 1 ( echo %__ErrMsgPrefix%%__MsgPrefix%Error: setup-stress-dependencies failed. goto :Exit_Failure diff --git a/src/coreclr/build-test.sh b/src/coreclr/build-test.sh index eefde5731cce..2de59c68c06c 100755 --- a/src/coreclr/build-test.sh +++ b/src/coreclr/build-test.sh @@ -32,7 +32,7 @@ build_test_wrappers() __MsbuildErr="/fileloggerparameters2:\"ErrorsOnly;LogFile=${__BuildErr}\"" __Logging="$__MsbuildLog $__MsbuildWrn $__MsbuildErr /consoleloggerparameters:$buildVerbosity" - nextCommand="\"${__DotNetCli}\" msbuild \"${__ProjectDir}/tests/src/runtest.proj\" /nodereuse:false /p:BuildWrappers=true /p:TestBuildMode=$__TestBuildMode /p:TargetsWindows=false $__Logging /p:TargetOS=$__TargetOS /p:Configuration=$__BuildType /p:TargetArchitecture=$__BuildArch /p:RuntimeFlavor=$__RuntimeFlavor \"/bl:${__RepoRootDir}/artifacts/log/${__BuildType}/build_test_wrappers_${__RuntimeFlavor}.binlog\"" + nextCommand="\"${__DotNetCli}\" msbuild \"${__ProjectDir}/tests/src/runtest.proj\" /nodereuse:false /p:BuildWrappers=true /p:TestBuildMode=$__TestBuildMode /p:TargetsWindows=false $__Logging /p:TargetOS=$__TargetOS /p:Configuration=$__BuildType /p:TargetArchitecture=$__BuildArch /p:RuntimeFlavor=$__RuntimeFlavor \"/bl:${__RepoRootDir}/artifacts/log/${__BuildType}/build_test_wrappers_${__RuntimeFlavor}.binlog\" ${__UnprocessedBuildArgs[@]}" eval $nextCommand local exitCode="$?" @@ -51,7 +51,6 @@ generate_layout() { echo "${__MsgPrefix}Creating test overlay..." - __TestDir="$__ProjectDir"/tests __ProjectFilesDir="$__TestDir" __TestBinDir="$__TestWorkingDir" @@ -125,7 +124,7 @@ generate_layout() build_MSBuild_projects "Tests_Overlay_Managed" "${__ProjectDir}/tests/src/runtest.proj" "Creating test overlay" "/t:CreateTestOverlay" if [[ "$__TargetOS" != "OSX" && "$__SkipStressDependencies" == 0 ]]; then - nextCommand="\"$__TestDir/setup-stress-dependencies.sh\" --arch=$__BuildArch --outputDir=$CORE_ROOT" + nextCommand="\"${__RepoRootDir}/src/coreclr/tests/setup-stress-dependencies.sh\" --arch=$__BuildArch --outputDir=$CORE_ROOT" echo "Resolve runtime dependences via $nextCommand" eval $nextCommand @@ -274,7 +273,6 @@ build_Tests() { echo "${__MsgPrefix}Building Tests..." - __TestDir="$__ProjectDir"/tests __ProjectFilesDir="$__TestDir" __TestBinDir="$__TestWorkingDir" @@ -678,7 +676,7 @@ __MsbuildDebugLogsDir="$__LogsDir/MsbuildDebugLogs" # Set the remaining variables based upon the determined build configuration __BinDir="$__RootBinDir/bin/coreclr/$__TargetOS.$__BuildArch.$__BuildType" __PackagesBinDir="$__BinDir/.nuget" -__TestDir="$__ProjectDir/tests" +__TestDir="${__RepoRootDir}/src/tests" __TestWorkingDir="$__RootBinDir/tests/coreclr/$__TargetOS.$__BuildArch.$__BuildType" __IntermediatesDir="$__RootBinDir/obj/coreclr/$__TargetOS.$__BuildArch.$__BuildType" __TestIntermediatesDir="$__RootBinDir/tests/coreclr/obj/$__TargetOS.$__BuildArch.$__BuildType" diff --git a/src/coreclr/clr.featuredefines.props b/src/coreclr/clr.featuredefines.props index e5f90fd0b522..b5979c8d2390 100644 --- a/src/coreclr/clr.featuredefines.props +++ b/src/coreclr/clr.featuredefines.props @@ -29,10 +29,8 @@ true true true - true true true - true true true true @@ -46,12 +44,10 @@ - $(DefineConstants);FEATURE_APPX $(DefineConstants);FEATURE_ARRAYSTUB_AS_IL $(DefineConstants);FEATURE_MULTICASTSTUB_AS_IL $(DefineConstants);FEATURE_INSTANTIATINGSTUB_AS_IL $(DefineConstants);FEATURE_STUBS_AS_IL - $(DefineConstants);FEATURE_CLASSIC_COMINTEROP $(DefineConstants);FEATURE_COLLECTIBLE_ALC $(DefineConstants);FEATURE_COMWRAPPERS $(DefineConstants);FEATURE_COMINTEROP diff --git a/src/coreclr/clrdefinitions.cmake b/src/coreclr/clrdefinitions.cmake index c77feb696f97..7be0a6915051 100644 --- a/src/coreclr/clrdefinitions.cmake +++ b/src/coreclr/clrdefinitions.cmake @@ -72,7 +72,6 @@ endif(CLR_CMAKE_TARGET_WIN32) # Features - please keep them alphabetically sorted if(CLR_CMAKE_TARGET_WIN32) - add_definitions(-DFEATURE_APPX) if(NOT CLR_CMAKE_TARGET_ARCH_I386) add_definitions(-DFEATURE_ARRAYSTUB_AS_IL) add_definitions(-DFEATURE_MULTICASTSTUB_AS_IL) @@ -95,7 +94,6 @@ add_definitions(-DFEATURE_COLLECTIBLE_TYPES) if(CLR_CMAKE_TARGET_WIN32) add_definitions(-DFEATURE_COMWRAPPERS) - add_definitions(-DFEATURE_CLASSIC_COMINTEROP) add_definitions(-DFEATURE_COMINTEROP) add_definitions(-DFEATURE_COMINTEROP_APARTMENT_SUPPORT) add_definitions(-DFEATURE_COMINTEROP_UNMANAGED_ACTIVATION) diff --git a/src/coreclr/crossgen-corelib.proj b/src/coreclr/crossgen-corelib.proj index 1027019a412c..bf26cd259a8c 100644 --- a/src/coreclr/crossgen-corelib.proj +++ b/src/coreclr/crossgen-corelib.proj @@ -7,6 +7,8 @@ <_CoreClrBuildArg Condition="'$(TargetArchitecture)' != ''" Include="-$(TargetArchitecture)" /> <_CoreClrBuildArg Include="-$(Configuration.ToLower())" /> <_CoreClrBuildArg Condition="!$([MSBuild]::IsOsPlatform(Windows))" Include="-os $(TargetOS)" /> + <_CoreClrBuildArg Condition="'$(CrossBuild)' == 'true'" Include="-cross" /> + <_CoreClrBuildArg Condition="'$(PortableBuild)' != 'true'" Include="-portablebuild=false" /> diff --git a/src/coreclr/runtime.proj b/src/coreclr/runtime.proj index a78af666926b..f0da8c09cd0d 100644 --- a/src/coreclr/runtime.proj +++ b/src/coreclr/runtime.proj @@ -10,6 +10,7 @@ <_CoreClrBuildArg Include="$(Compiler)" /> <_CoreClrBuildArg Condition="'$(ContinuousIntegrationBuild)' == 'true'" Include="-ci" /> <_CoreClrBuildArg Condition="'$(CrossBuild)' == 'true'" Include="-cross" /> + <_CoreClrBuildArg Condition="'$(PortableBuild)' != 'true'" Include="-portablebuild=false" /> <_CoreClrBuildArg Condition="!$([MSBuild]::IsOsPlatform(Windows))" Include="-os $(TargetOS)" /> <_CoreClrBuildArg Condition="$([MSBuild]::IsOsPlatform(Windows)) and diff --git a/src/coreclr/scripts/coreclr_arguments.py b/src/coreclr/scripts/coreclr_arguments.py index 55b11ab7dffd..6806446128c9 100644 --- a/src/coreclr/scripts/coreclr_arguments.py +++ b/src/coreclr/scripts/coreclr_arguments.py @@ -2,7 +2,6 @@ # ## Licensed to the .NET Foundation under one or more agreements. ## The .NET Foundation licenses this file to you under the MIT license. -## See the LICENSE file in the project root for more information. # ## # Title : coreclr_arguments.py @@ -74,7 +73,7 @@ def __init__(self, self.valid_arches = ["x64", "x86", "arm", "arm64"] self.valid_build_types = ["Debug", "Checked", "Release"] - self.valid_host_os = ["Windows_NT", "OSX", "Linux"] + self.valid_host_os = ["Windows_NT", "OSX", "Linux", "illumos", "Solaris"] self.__initialize__(args) @@ -183,8 +182,11 @@ def provide_default_host_os(): return "OSX" elif sys.platform == "win32": return "Windows_NT" + elif sys.platform.startswith("sunos"): + is_illumos = ('illumos' in subprocess.Popen(["uname", "-o"], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0].decode('utf-8')) + return 'illumos' if is_illumos else 'Solaris' else: - print("Unknown OS: %s" % self.host_os) + print("Unknown OS: %s" % sys.platform) sys.exit(1) @staticmethod diff --git a/src/coreclr/scripts/superpmi.py b/src/coreclr/scripts/superpmi.py index 8bef741ce723..fa0f3e2f165d 100755 --- a/src/coreclr/scripts/superpmi.py +++ b/src/coreclr/scripts/superpmi.py @@ -2,7 +2,6 @@ # ## Licensed to the .NET Foundation under one or more agreements. ## The .NET Foundation licenses this file to you under the MIT license. -## See the LICENSE file in the project root for more information. # ## # Title : superpmi.py diff --git a/src/coreclr/setup_vs_tools.cmd b/src/coreclr/setup_vs_tools.cmd index 23fab343809f..802038b0d8ca 100644 --- a/src/coreclr/setup_vs_tools.cmd +++ b/src/coreclr/setup_vs_tools.cmd @@ -21,16 +21,16 @@ if defined VisualStudioVersion ( goto skip_setup ) -echo %__MsgPrefix%Searching ^for Visual Studio 2017 or later installation +echo %__MsgPrefix%Searching ^for Visual Studio installation set _VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" if exist %_VSWHERE% ( for /f "usebackq tokens=*" %%i in (`%_VSWHERE% -latest -prerelease -property installationPath`) do set _VSCOMNTOOLS=%%i\Common7\Tools goto call_vs ) -echo Visual Studio 2017 or later not found + :call_vs if not exist "%_VSCOMNTOOLS%" ( - echo %__MsgPrefix%Error: Visual Studio 2017 or 2019 required. + echo %__MsgPrefix%Error: Visual Studio 2019 required. echo Please see https://github.com/dotnet/runtime/blob/master/docs/workflow/requirements/windows-requirements.md for build instructions. exit /b 1 ) diff --git a/src/coreclr/src/System.Private.CoreLib/ILLinkTrim.xml b/src/coreclr/src/System.Private.CoreLib/ILLinkTrim.xml index e5a4eeb311e5..11a67fdac313 100644 --- a/src/coreclr/src/System.Private.CoreLib/ILLinkTrim.xml +++ b/src/coreclr/src/System.Private.CoreLib/ILLinkTrim.xml @@ -5,5 +5,17 @@ + + + + + + + + + + + + diff --git a/src/coreclr/src/System.Private.CoreLib/PinvokeAnalyzerExceptionList.analyzerdata b/src/coreclr/src/System.Private.CoreLib/PinvokeAnalyzerExceptionList.analyzerdata deleted file mode 100644 index e1c58c0c5038..000000000000 --- a/src/coreclr/src/System.Private.CoreLib/PinvokeAnalyzerExceptionList.analyzerdata +++ /dev/null @@ -1,10 +0,0 @@ - -normaliz.dll!IsNormalizedString -normaliz.dll!NormalizeString - - -user32.dll!GetProcessWindowStation -user32.dll!GetUserObjectInformationW - - -kernel32.dll!GetGeoInfo \ No newline at end of file diff --git a/src/coreclr/src/System.Private.CoreLib/System.Private.CoreLib.csproj b/src/coreclr/src/System.Private.CoreLib/System.Private.CoreLib.csproj index 89de18d65eab..7d77fd31d77b 100644 --- a/src/coreclr/src/System.Private.CoreLib/System.Private.CoreLib.csproj +++ b/src/coreclr/src/System.Private.CoreLib/System.Private.CoreLib.csproj @@ -6,7 +6,7 @@ true false false - netcoreapp2.1 + $(NetCoreAppCurrent) Portable @@ -156,7 +156,6 @@ - @@ -168,7 +167,6 @@ - @@ -215,7 +213,6 @@ - @@ -291,19 +288,20 @@ Common\System\Runtime\InteropServices\IDispatch.cs - + Common\System\Runtime\InteropServices\ComEventsMethod.cs - + Common\System\Runtime\InteropServices\ComEventsSink.cs - + Common\System\Runtime\InteropServices\Variant.cs - + - - + + + @@ -324,7 +322,6 @@ Common\Interop\Windows\OleAut32\Interop.VariantClear.cs - diff --git a/src/coreclr/src/System.Private.CoreLib/Tools/GenUnicodeProp/CategoryCasingInfo.cs b/src/coreclr/src/System.Private.CoreLib/Tools/GenUnicodeProp/CategoryCasingInfo.cs index f889fad3d1d1..dd76e88d0ebd 100644 --- a/src/coreclr/src/System.Private.CoreLib/Tools/GenUnicodeProp/CategoryCasingInfo.cs +++ b/src/coreclr/src/System.Private.CoreLib/Tools/GenUnicodeProp/CategoryCasingInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Buffers.Binary; diff --git a/src/coreclr/src/System.Private.CoreLib/Tools/GenUnicodeProp/DataTable.cs b/src/coreclr/src/System.Private.CoreLib/Tools/GenUnicodeProp/DataTable.cs index c49c3660defc..a15ba2b4e9da 100644 --- a/src/coreclr/src/System.Private.CoreLib/Tools/GenUnicodeProp/DataTable.cs +++ b/src/coreclr/src/System.Private.CoreLib/Tools/GenUnicodeProp/DataTable.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/System.Private.CoreLib/Tools/GenUnicodeProp/NumericGraphemeInfo.cs b/src/coreclr/src/System.Private.CoreLib/Tools/GenUnicodeProp/NumericGraphemeInfo.cs index 9f0e4673914f..5496f213fdb4 100644 --- a/src/coreclr/src/System.Private.CoreLib/Tools/GenUnicodeProp/NumericGraphemeInfo.cs +++ b/src/coreclr/src/System.Private.CoreLib/Tools/GenUnicodeProp/NumericGraphemeInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Buffers.Binary; diff --git a/src/coreclr/src/System.Private.CoreLib/Tools/GenUnicodeProp/Program.cs b/src/coreclr/src/System.Private.CoreLib/Tools/GenUnicodeProp/Program.cs index 3c1156e7e35e..49a455467a51 100644 --- a/src/coreclr/src/System.Private.CoreLib/Tools/GenUnicodeProp/Program.cs +++ b/src/coreclr/src/System.Private.CoreLib/Tools/GenUnicodeProp/Program.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -102,7 +101,6 @@ private static void Main(string[] args) { file.Write("// Licensed to the .NET Foundation under one or more agreements.\n"); file.Write("// The .NET Foundation licenses this file to you under the MIT license.\n"); - file.Write("// See the LICENSE file in the project root for more information.\n\n"); file.Write("using System.Diagnostics;\n\n"); diff --git a/src/coreclr/src/System.Private.CoreLib/Tools/GenUnicodeProp/StrongBidiCategory.cs b/src/coreclr/src/System.Private.CoreLib/Tools/GenUnicodeProp/StrongBidiCategory.cs index e8c90c46b06b..44ffc7a2805f 100644 --- a/src/coreclr/src/System.Private.CoreLib/Tools/GenUnicodeProp/StrongBidiCategory.cs +++ b/src/coreclr/src/System.Private.CoreLib/Tools/GenUnicodeProp/StrongBidiCategory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace GenUnicodeProp { diff --git a/src/coreclr/src/System.Private.CoreLib/Tools/GenUnicodeProp/TableLevels.cs b/src/coreclr/src/System.Private.CoreLib/Tools/GenUnicodeProp/TableLevels.cs index 66a269307876..374044769327 100644 --- a/src/coreclr/src/System.Private.CoreLib/Tools/GenUnicodeProp/TableLevels.cs +++ b/src/coreclr/src/System.Private.CoreLib/Tools/GenUnicodeProp/TableLevels.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/System.Private.CoreLib/src/Internal/Console.cs b/src/coreclr/src/System.Private.CoreLib/src/Internal/Console.cs index f501d1f30c65..307fd9177a81 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/Internal/Console.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/Internal/Console.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Text; diff --git a/src/coreclr/src/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivator.cs b/src/coreclr/src/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivator.cs index e1c23856e99b..45f4d4839fb8 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivator.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivator.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComponentActivator.cs b/src/coreclr/src/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComponentActivator.cs index 023a96b55765..711e3cf0bab0 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComponentActivator.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComponentActivator.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable diff --git a/src/coreclr/src/System.Private.CoreLib/src/Internal/Runtime/InteropServices/InMemoryAssemblyLoader.cs b/src/coreclr/src/System.Private.CoreLib/src/Internal/Runtime/InteropServices/InMemoryAssemblyLoader.cs index aa0720e6fcec..59cd91545905 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/Internal/Runtime/InteropServices/InMemoryAssemblyLoader.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/Internal/Runtime/InteropServices/InMemoryAssemblyLoader.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/Internal/Runtime/InteropServices/IsolatedComponentLoadContext.cs b/src/coreclr/src/System.Private.CoreLib/src/Internal/Runtime/InteropServices/IsolatedComponentLoadContext.cs index 1a04d2e639c3..0cd2f504cc49 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/Internal/Runtime/InteropServices/IsolatedComponentLoadContext.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/Internal/Runtime/InteropServices/IsolatedComponentLoadContext.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Reflection; diff --git a/src/coreclr/src/System.Private.CoreLib/src/Interop/Unix/Interop.Libraries.cs b/src/coreclr/src/System.Private.CoreLib/src/Interop/Unix/Interop.Libraries.cs index f823276136ef..9a34b905608b 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/Interop/Unix/Interop.Libraries.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/Interop/Unix/Interop.Libraries.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/Microsoft/Win32/OAVariantLib.cs b/src/coreclr/src/System.Private.CoreLib/src/Microsoft/Win32/OAVariantLib.cs index b737b7dfff24..3886195966eb 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/Microsoft/Win32/OAVariantLib.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/Microsoft/Win32/OAVariantLib.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/ApplicationModel.Windows.cs b/src/coreclr/src/System.Private.CoreLib/src/System/ApplicationModel.Windows.cs deleted file mode 100644 index bf6c1ede165c..000000000000 --- a/src/coreclr/src/System.Private.CoreLib/src/System/ApplicationModel.Windows.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace System -{ - internal static class ApplicationModel - { -#if FEATURE_APPX - // Cache the value in readonly static that can be optimized out by the JIT - internal static readonly bool IsUap = IsAppXProcess() != Interop.BOOL.FALSE; - - [DllImport(RuntimeHelpers.QCall, CharSet = CharSet.Unicode)] - private static extern Interop.BOOL IsAppXProcess(); -#endif - } -} diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/ArgIterator.cs b/src/coreclr/src/System.Private.CoreLib/src/System/ArgIterator.cs index 8c7039e557b4..d9ed61c6c103 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/ArgIterator.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/ArgIterator.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Runtime.CompilerServices; @@ -25,7 +24,7 @@ public ref struct ArgIterator private IntPtr ArgPtr; // Pointer to remaining args. private int RemainingArgs; // # of remaining args. -#if TARGET_WINDOWS // Native Varargs are not supported on Unix +#if (TARGET_WINDOWS && !TARGET_ARM) // Native Varargs are not supported on Unix (all architectures) and Windows ARM [MethodImpl(MethodImplOptions.InternalCall)] private extern ArgIterator(IntPtr arglist); diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Array.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Array.CoreCLR.cs index 75f6aa40ce4d..ee2e02db3798 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Array.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Array.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections; using System.Collections.Generic; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs index 6b4c7a1155e8..9a6c6d44c509 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Reflection; using System.Collections.Generic; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/BadImageFormatException.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/BadImageFormatException.CoreCLR.cs index 8f29b3ed60b7..6e44e7e1cfdd 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/BadImageFormatException.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/BadImageFormatException.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Buffer.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Buffer.CoreCLR.cs index 36f6c0b9ba0f..081f1d6c05d5 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Buffer.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Buffer.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/CLRConfig.cs b/src/coreclr/src/System.Private.CoreLib/src/System/CLRConfig.cs index 2e12ae4b6737..9ac34e44182b 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/CLRConfig.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/CLRConfig.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Collections/EmptyReadOnlyDictionaryInternal.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Collections/EmptyReadOnlyDictionaryInternal.cs index e0f85d6b5345..bb9d40bc38db 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Collections/EmptyReadOnlyDictionaryInternal.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Collections/EmptyReadOnlyDictionaryInternal.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/ArraySortHelper.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/ArraySortHelper.CoreCLR.cs index 9cdc04e45f38..5e7dd7ddc453 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/ArraySortHelper.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/ArraySortHelper.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; using System.Diagnostics.CodeAnalysis; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/Comparer.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/Comparer.CoreCLR.cs index 13ac30cbe895..1af5fca47023 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/Comparer.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/Comparer.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/ComparerHelpers.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/ComparerHelpers.cs index eac248d2e5c7..7a49fad02133 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/ComparerHelpers.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/ComparerHelpers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using static System.RuntimeTypeHandle; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.CoreCLR.cs index 679be9d58299..2bc0e7ad5c91 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; using System.Diagnostics; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Collections/ObjectModel/ReadOnlyDictionary.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Collections/ObjectModel/ReadOnlyDictionary.cs index 18054d466482..287c18661d7f 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Collections/ObjectModel/ReadOnlyDictionary.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Collections/ObjectModel/ReadOnlyDictionary.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Currency.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Currency.cs index 1d2051d7a631..29f34dc5f048 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Currency.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Currency.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/DateTime.Unix.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/DateTime.Unix.CoreCLR.cs index a463a076ee76..3dc69ae32b1d 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/DateTime.Unix.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/DateTime.Unix.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/DateTime.Windows.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/DateTime.Windows.CoreCLR.cs index 0e3ef92d282f..1f77180f4787 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/DateTime.Windows.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/DateTime.Windows.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Delegate.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Delegate.CoreCLR.cs index c947666a7ce5..ab338cd0bc9c 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Delegate.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Delegate.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Diagnostics.CodeAnalysis; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/Debugger.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/Debugger.cs index d0b964778aaf..5e51ac062923 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/Debugger.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/Debugger.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // The Debugger class is a part of the System.Diagnostics package // and is used for communicating with a debugger. @@ -73,7 +72,7 @@ public static extern bool IsAttached // desired events are actually reported to the debugger. // // Constant representing the default category - public static readonly string? DefaultCategory = null; + public static readonly string? DefaultCategory; // Posts a message for the attached debugger. If there is no // debugger attached, has no effect. The debugger may or may not diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/EditAndContinueHelper.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/EditAndContinueHelper.cs index 92769abebf60..269bd2e5de34 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/EditAndContinueHelper.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/EditAndContinueHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/Eventing/EventPipe.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/Eventing/EventPipe.CoreCLR.cs index 7d3ab6c6af68..2523bff45014 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/Eventing/EventPipe.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/Eventing/EventPipe.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/ICustomDebuggerNotification.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/ICustomDebuggerNotification.cs index 2cb65f6c15c3..b70f0de2457c 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/ICustomDebuggerNotification.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/ICustomDebuggerNotification.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/StackFrame.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/StackFrame.CoreCLR.cs index e78734fece4f..cf60a806a9ce 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/StackFrame.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/StackFrame.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Text; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/StackFrameHelper.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/StackFrameHelper.cs index be31abad855c..1a1d2e6b960e 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/StackFrameHelper.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/StackFrameHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Threading; using System.Reflection; @@ -43,7 +42,7 @@ private delegate void GetSourceLineInfoDelegate(Assembly? assembly, string assem int loadedPeSize, IntPtr inMemoryPdbAddress, int inMemoryPdbSize, int methodToken, int ilOffset, out string? sourceFile, out int sourceLine, out int sourceColumn); - private static GetSourceLineInfoDelegate? s_getSourceLineInfo = null; + private static GetSourceLineInfoDelegate? s_getSourceLineInfo; [ThreadStatic] private static int t_reentrancy; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/StackTrace.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/StackTrace.CoreCLR.cs index b6e96deff622..9bef9fb72fae 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/StackTrace.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/StackTrace.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; using System.Reflection; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/SymbolStore/ISymWriter.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/SymbolStore/ISymWriter.cs index c6e709c06e92..f3ad88e9ef22 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/SymbolStore/ISymWriter.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/SymbolStore/ISymWriter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/SymbolStore/SymAddressKind.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/SymbolStore/SymAddressKind.cs index ba9f355b823f..dc2a0a05708c 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/SymbolStore/SymAddressKind.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/SymbolStore/SymAddressKind.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/SymbolStore/Token.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/SymbolStore/Token.cs index a0f3c997a850..74dd84c3ef37 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/SymbolStore/Token.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/SymbolStore/Token.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Enum.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Enum.CoreCLR.cs index d3cf21973948..3dded2f8d367 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Enum.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Enum.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Reflection; using System.Runtime.CompilerServices; @@ -28,21 +27,6 @@ public abstract partial class Enum [MethodImpl(MethodImplOptions.InternalCall)] private extern bool InternalHasFlag(Enum flags); - private class EnumInfo - { - public readonly bool HasFlagsAttribute; - public readonly ulong[] Values; - public readonly string[] Names; - - // Each entry contains a list of sorted pair of enum field names and values, sorted by values - public EnumInfo(bool hasFlagsAttribute, ulong[] values, string[] names) - { - HasFlagsAttribute = hasFlagsAttribute; - Values = values; - Names = names; - } - } - private static EnumInfo GetEnumInfo(RuntimeType enumType, bool getNames = true) { EnumInfo? entry = enumType.GenericCache as EnumInfo; @@ -65,82 +49,5 @@ private static EnumInfo GetEnumInfo(RuntimeType enumType, bool getNames = true) return entry; } - - internal static ulong[] InternalGetValues(RuntimeType enumType) - { - // Get all of the values - return GetEnumInfo(enumType, false).Values; - } - - internal static string[] InternalGetNames(RuntimeType enumType) - { - // Get all of the names - return GetEnumInfo(enumType, true).Names; - } - - [Intrinsic] - public bool HasFlag(Enum flag) - { - if (flag == null) - throw new ArgumentNullException(nameof(flag)); - - if (!this.GetType().IsEquivalentTo(flag.GetType())) - { - throw new ArgumentException(SR.Format(SR.Argument_EnumTypeDoesNotMatch, flag.GetType(), this.GetType())); - } - - return InternalHasFlag(flag); - } - - public static string? GetName(Type enumType, object value) - { - if (enumType == null) - throw new ArgumentNullException(nameof(enumType)); - - return enumType.GetEnumName(value); - } - - public static string[] GetNames(Type enumType) - { - if (enumType == null) - throw new ArgumentNullException(nameof(enumType)); - - return enumType.GetEnumNames(); - } - - public static Type GetUnderlyingType(Type enumType) - { - if (enumType == null) - throw new ArgumentNullException(nameof(enumType)); - - return enumType.GetEnumUnderlyingType(); - } - - public static Array GetValues(Type enumType) - { - if (enumType == null) - throw new ArgumentNullException(nameof(enumType)); - - return enumType.GetEnumValues(); - } - - public static bool IsDefined(Type enumType, object value) - { - if (enumType == null) - throw new ArgumentNullException(nameof(enumType)); - - return enumType.IsEnumDefined(value); - } - - private static RuntimeType ValidateRuntimeType(Type enumType) - { - if (enumType == null) - throw new ArgumentNullException(nameof(enumType)); - if (!enumType.IsEnum) - throw new ArgumentException(SR.Arg_MustBeEnum, nameof(enumType)); - if (!(enumType is RuntimeType rtType)) - throw new ArgumentException(SR.Arg_MustBeType, nameof(enumType)); - return rtType; - } } } diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Environment.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Environment.CoreCLR.cs index 8e2a9dccf8a2..d2ea1e3fbdd0 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Environment.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Environment.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Diagnostics.CodeAnalysis; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Exception.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Exception.CoreCLR.cs index 165811f913f1..c3f1e5b4fd43 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Exception.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Exception.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections; using System.Diagnostics; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/GC.cs b/src/coreclr/src/System.Private.CoreLib/src/System/GC.cs index 1ed6149584e1..865600fe8d2d 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/GC.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/GC.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** @@ -56,8 +55,13 @@ public static class GC [MethodImpl(MethodImplOptions.InternalCall)] private static extern void GetMemoryInfo(GCMemoryInfoData data, int kind); + /// Gets garbage collection memory information. + /// An object that contains information about the garbage collector's memory usage. public static GCMemoryInfo GetGCMemoryInfo() => GetGCMemoryInfo(GCKind.Any); + /// Gets garbage collection memory information. + /// The kind of collection for which to retrieve memory information. + /// An object that contains information about the garbage collector's memory usage. public static GCMemoryInfo GetGCMemoryInfo(GCKind kind) { if ((kind < GCKind.Any) || (kind > GCKind.Background)) diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/IO/FileLoadException.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/IO/FileLoadException.CoreCLR.cs index b426926a95e3..6aa4e0d82e1f 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/IO/FileLoadException.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/IO/FileLoadException.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/IO/FileNotFoundException.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/IO/FileNotFoundException.CoreCLR.cs index 0a753272df9c..fbd2a6d02e69 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/IO/FileNotFoundException.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/IO/FileNotFoundException.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.IO { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/IO/Stream.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/IO/Stream.CoreCLR.cs index ac0d79d1da44..742198465307 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/IO/Stream.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/IO/Stream.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Internal.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Internal.cs index 66dc46d0cd61..5c13161b4eb7 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Internal.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Internal.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Math.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Math.CoreCLR.cs index a05220724bb7..74aca4342ee3 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Math.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Math.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/MathF.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/MathF.CoreCLR.cs index 2c8acccddbe6..371780f6abe0 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/MathF.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/MathF.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/MissingMemberException.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/MissingMemberException.CoreCLR.cs index 6766240b5d92..7b1ea384319d 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/MissingMemberException.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/MissingMemberException.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.Serialization; using System.Runtime.CompilerServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/MulticastDelegate.cs b/src/coreclr/src/System.Private.CoreLib/src/System/MulticastDelegate.cs index 2b0110241164..a2598bd7779a 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/MulticastDelegate.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/MulticastDelegate.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Diagnostics.CodeAnalysis; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Object.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Object.CoreCLR.cs index a65358449ee8..76251e3239db 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Object.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Object.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/OleAutBinder.cs b/src/coreclr/src/System.Private.CoreLib/src/System/OleAutBinder.cs index 0f4050430db1..587738ba62c7 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/OleAutBinder.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/OleAutBinder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // This class represents the Ole Automation binder. diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Assembly.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Assembly.CoreCLR.cs index 8ef9d01d3ee7..15d27ce8bd3f 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Assembly.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Assembly.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; using System.Runtime.CompilerServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/AssemblyName.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/AssemblyName.CoreCLR.cs index f196c1cdad99..b7336964c2ce 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/AssemblyName.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/AssemblyName.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Configuration.Assemblies; using System.Globalization; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Associates.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Associates.cs index 589d349341be..8876fdabb881 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Associates.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Associates.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/ConstructorInfo.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/ConstructorInfo.CoreCLR.cs index c96bfb5ac1a8..ac3093adaa0a 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/ConstructorInfo.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/ConstructorInfo.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Reflection { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/CustomAttribute.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/CustomAttribute.cs index c0690fd56c18..a7625465c0e8 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/CustomAttribute.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/CustomAttribute.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/AssemblyBuilder.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/AssemblyBuilder.cs index 1407f8705246..b71b9aba4714 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/AssemblyBuilder.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/AssemblyBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // For each dynamic assembly there will be two AssemblyBuilder objects: the "internal" // AssemblyBuilder object and the "external" AssemblyBuilder object. diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/AssemblyBuilderData.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/AssemblyBuilderData.cs index 144dfd5ec4d5..1f948165a01c 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/AssemblyBuilderData.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/AssemblyBuilderData.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ConstructorBuilder.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ConstructorBuilder.cs index fb6b4c623eab..de668d586341 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ConstructorBuilder.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ConstructorBuilder.cs @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. +using System.Diagnostics.CodeAnalysis; using System.Globalization; namespace System.Reflection.Emit @@ -14,7 +14,7 @@ public sealed class ConstructorBuilder : ConstructorInfo #region Constructor internal ConstructorBuilder(string name, MethodAttributes attributes, CallingConventions callingConvention, - Type[]? parameterTypes, Type[][]? requiredCustomModifiers, Type[][]? optionalCustomModifiers, ModuleBuilder mod, TypeBuilder type) + Type[]? parameterTypes, Type[][]? requiredCustomModifiers, Type[][]? optionalCustomModifiers, ModuleBuilder mod, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TypeBuilder type) { m_methodBuilder = new MethodBuilder(name, attributes, callingConvention, null, null, null, parameterTypes, requiredCustomModifiers, optionalCustomModifiers, mod, type); @@ -40,6 +40,7 @@ internal override Type[] GetParameterTypes() return m_methodBuilder.GetParameterTypes(); } + [return: DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] private TypeBuilder GetTypeBuilder() { return m_methodBuilder.GetTypeBuilder(); diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/CustomAttributeBuilder.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/CustomAttributeBuilder.cs index d1e89aaf0c3b..2754a6e81216 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/CustomAttributeBuilder.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/CustomAttributeBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** @@ -63,10 +62,12 @@ public CustomAttributeBuilder(ConstructorInfo con, object?[] constructorArgs, Pr throw new ArgumentNullException(nameof(namedFields)); if (fieldValues == null) throw new ArgumentNullException(nameof(fieldValues)); +#pragma warning disable CA2208 // Instantiate argument exceptions correctly, combination of arguments used if (namedProperties.Length != propertyValues.Length) throw new ArgumentException(SR.Arg_ArrayLengthsDiffer, "namedProperties, propertyValues"); if (namedFields.Length != fieldValues.Length) throw new ArgumentException(SR.Arg_ArrayLengthsDiffer, "namedFields, fieldValues"); +#pragma warning restore CA2208 if ((con.Attributes & MethodAttributes.Static) == MethodAttributes.Static || (con.Attributes & MethodAttributes.MemberAccessMask) == MethodAttributes.Private) diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/DynamicILGenerator.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/DynamicILGenerator.cs index d8e330dd7f98..34d501c1363d 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/DynamicILGenerator.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/DynamicILGenerator.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics.SymbolStore; using System.Runtime.InteropServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.cs index c8c5468801d7..cd6be54ace1f 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Diagnostics.CodeAnalysis; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/EnumBuilder.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/EnumBuilder.cs index 3b0e0350bf9d..788969f72097 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/EnumBuilder.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/EnumBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** @@ -337,7 +336,9 @@ internal EnumBuilder( * private data members * */ + [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] internal TypeBuilder m_typeBuilder; + private FieldBuilder m_underlyingField; } } diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/EventBuilder.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/EventBuilder.cs index 479c4a9b6566..426d0af22887 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/EventBuilder.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/EventBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/FieldBuilder.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/FieldBuilder.cs index e7c3536d4002..3001b3df82de 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/FieldBuilder.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/FieldBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; using CultureInfo = System.Globalization.CultureInfo; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/GenericTypeParameterBuilder.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/GenericTypeParameterBuilder.cs index d0f930e4c763..ffa61eaa0a70 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/GenericTypeParameterBuilder.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/GenericTypeParameterBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -203,7 +202,7 @@ public void SetCustomAttribute(CustomAttributeBuilder customBuilder) m_type.SetGenParamCustomAttribute(customBuilder); } - public void SetBaseTypeConstraint(Type? baseTypeConstraint) + public void SetBaseTypeConstraint([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? baseTypeConstraint) { m_type.CheckContext(baseTypeConstraint); m_type.SetParent(baseTypeConstraint); diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ILGenerator.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ILGenerator.cs index 15ed61586508..c587b18c62ac 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ILGenerator.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ILGenerator.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Buffers.Binary; using System.Diagnostics; @@ -63,10 +62,10 @@ internal static T[] EnlargeArray(T[] incoming, int requiredSize) internal int m_localCount; internal SignatureHelper m_localSignature; - private int m_maxStackSize = 0; // Maximum stack size not counting the exceptions. + private int m_maxStackSize; // Maximum stack size not counting the exceptions. - private int m_maxMidStack = 0; // Maximum stack size for a given basic block. - private int m_maxMidStackCur = 0; // Running count of the maximum stack size for the current basic block. + private int m_maxMidStack; // Maximum stack size for a given basic block. + private int m_maxMidStackCur; // Running count of the maximum stack size for the current basic block. internal int CurrExcStackCount => m_currExcStackCount; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ISymWrapperCore.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ISymWrapperCore.cs index 62e7f6a6c478..0d38f64c7594 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ISymWrapperCore.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ISymWrapperCore.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Runtime.CompilerServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/LocalBuilder.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/LocalBuilder.cs index ba2de1b56255..eb82f5f58fcd 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/LocalBuilder.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/LocalBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Reflection.Emit { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/MethodBuilder.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/MethodBuilder.cs index e3c189f910be..65b5033e996e 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/MethodBuilder.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/MethodBuilder.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Diagnostics.SymbolStore; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -18,6 +18,8 @@ public sealed class MethodBuilder : MethodInfo internal string m_strName; // The name of the method private MethodToken m_tkMethod; // The token of this method private readonly ModuleBuilder m_module; + + [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] internal TypeBuilder m_containingType; // IL @@ -57,7 +59,7 @@ public sealed class MethodBuilder : MethodInfo internal MethodBuilder(string name, MethodAttributes attributes, CallingConventions callingConvention, Type? returnType, Type[]? returnTypeRequiredCustomModifiers, Type[]? returnTypeOptionalCustomModifiers, Type[]? parameterTypes, Type[][]? parameterTypeRequiredCustomModifiers, Type[][]? parameterTypeOptionalCustomModifiers, - ModuleBuilder mod, TypeBuilder type) + ModuleBuilder mod, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TypeBuilder type) { if (name == null) throw new ArgumentNullException(nameof(name)); @@ -400,6 +402,7 @@ internal bool IsTypeCreated() return m_containingType != null && m_containingType.IsCreated(); } + [return: DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] internal TypeBuilder GetTypeBuilder() { return m_containingType; @@ -843,8 +846,8 @@ private void ParseCA(ConstructorInfo con) } } - internal bool m_canBeRuntimeImpl = false; - internal bool m_isDllImport = false; + internal bool m_canBeRuntimeImpl; + internal bool m_isDllImport; #endregion } diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/MethodBuilderInstantiation.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/MethodBuilderInstantiation.cs index b7e1cf3917ad..a5c935ad9fb1 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/MethodBuilderInstantiation.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/MethodBuilderInstantiation.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Globalization; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.cs index 6763aea8e21f..4a719065ba42 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Diagnostics.SymbolStore; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -770,7 +770,7 @@ public TypeBuilder DefineType(string name, TypeAttributes attr) } } - public TypeBuilder DefineType(string name, TypeAttributes attr, Type? parent) + public TypeBuilder DefineType(string name, TypeAttributes attr, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent) { lock (SyncRoot) { @@ -780,7 +780,7 @@ public TypeBuilder DefineType(string name, TypeAttributes attr, Type? parent) } } - public TypeBuilder DefineType(string name, TypeAttributes attr, Type? parent, int typesize) + public TypeBuilder DefineType(string name, TypeAttributes attr, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent, int typesize) { lock (SyncRoot) { @@ -788,7 +788,7 @@ public TypeBuilder DefineType(string name, TypeAttributes attr, Type? parent, in } } - public TypeBuilder DefineType(string name, TypeAttributes attr, Type? parent, PackingSize packingSize, int typesize) + public TypeBuilder DefineType(string name, TypeAttributes attr, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent, PackingSize packingSize, int typesize) { lock (SyncRoot) { @@ -796,7 +796,7 @@ public TypeBuilder DefineType(string name, TypeAttributes attr, Type? parent, Pa } } - public TypeBuilder DefineType(string name, TypeAttributes attr, Type? parent, Type[]? interfaces) + public TypeBuilder DefineType(string name, TypeAttributes attr, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent, Type[]? interfaces) { lock (SyncRoot) { @@ -804,12 +804,12 @@ public TypeBuilder DefineType(string name, TypeAttributes attr, Type? parent, Ty } } - private TypeBuilder DefineTypeNoLock(string name, TypeAttributes attr, Type? parent, Type[]? interfaces, PackingSize packingSize, int typesize) + private TypeBuilder DefineTypeNoLock(string name, TypeAttributes attr, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent, Type[]? interfaces, PackingSize packingSize, int typesize) { return new TypeBuilder(name, attr, parent, interfaces, this, packingSize, typesize, null); } - public TypeBuilder DefineType(string name, TypeAttributes attr, Type? parent, PackingSize packsize) + public TypeBuilder DefineType(string name, TypeAttributes attr, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent, PackingSize packsize) { lock (SyncRoot) { @@ -817,7 +817,7 @@ public TypeBuilder DefineType(string name, TypeAttributes attr, Type? parent, Pa } } - private TypeBuilder DefineTypeNoLock(string name, TypeAttributes attr, Type? parent, PackingSize packsize) + private TypeBuilder DefineTypeNoLock(string name, TypeAttributes attr, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent, PackingSize packsize) { return new TypeBuilder(name, attr, parent, null, this, packsize, TypeBuilder.UnspecifiedTypeSize, null); } diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilderData.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilderData.cs index 02e945b261ec..c925625cb9d7 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilderData.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilderData.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Reflection.Emit { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ParameterBuilder.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ParameterBuilder.cs index 68d1d1600488..e50546e54bfc 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ParameterBuilder.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ParameterBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/PropertyBuilder.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/PropertyBuilder.cs index ec75ee6a2796..76b14a4cf813 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/PropertyBuilder.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/PropertyBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/SignatureHelper.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/SignatureHelper.cs index a9db943c8ae5..fc17ba8391c3 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/SignatureHelper.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/SignatureHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Buffers.Binary; using System.Diagnostics; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/SymbolMethod.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/SymbolMethod.cs index 6708b3e5b318..0eb874a7b1f1 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/SymbolMethod.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/SymbolMethod.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using CultureInfo = System.Globalization.CultureInfo; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/SymbolType.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/SymbolType.cs index 61064b06d4d4..fa49a2256681 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/SymbolType.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/SymbolType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics.CodeAnalysis; using CultureInfo = System.Globalization.CultureInfo; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilder.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilder.cs index 65d61ca28ade..47c3dea104ee 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilder.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics; @@ -400,7 +399,10 @@ internal static unsafe void SetConstantValue(ModuleBuilder module, int tk, Type private readonly string? m_strName; private readonly string? m_strNameSpace; private string? m_strFullQualName; + + [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] private Type? m_typeParent; + private List? m_typeInterfaces; private readonly TypeAttributes m_iAttr; private GenericParameterAttributes m_genParamAttributes; @@ -415,6 +417,8 @@ internal static unsafe void SetConstantValue(ModuleBuilder module, int tk, Type private Type? m_enumUnderlyingType; internal bool m_isHiddenGlobalType; private bool m_hasBeenCreated; + + [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] private RuntimeType m_bakedRuntimeType = null!; private readonly int m_genParamPos; @@ -465,7 +469,7 @@ private TypeBuilder(string szName, int genParamPos, TypeBuilder declType) } internal TypeBuilder( - string fullname, TypeAttributes attr, Type? parent, Type[]? interfaces, ModuleBuilder module, + string fullname, TypeAttributes attr, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent, Type[]? interfaces, ModuleBuilder module, PackingSize iPackingSize, int iTypeSize, TypeBuilder? enclosingType) { if (fullname == null) @@ -1588,7 +1592,7 @@ public TypeBuilder DefineNestedType(string name) } } - public TypeBuilder DefineNestedType(string name, TypeAttributes attr, Type? parent, Type[]? interfaces) + public TypeBuilder DefineNestedType(string name, TypeAttributes attr, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent, Type[]? interfaces) { lock (SyncRoot) { @@ -1600,7 +1604,7 @@ public TypeBuilder DefineNestedType(string name, TypeAttributes attr, Type? pare } } - public TypeBuilder DefineNestedType(string name, TypeAttributes attr, Type? parent) + public TypeBuilder DefineNestedType(string name, TypeAttributes attr, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent) { lock (SyncRoot) { @@ -1616,7 +1620,7 @@ public TypeBuilder DefineNestedType(string name, TypeAttributes attr) } } - public TypeBuilder DefineNestedType(string name, TypeAttributes attr, Type? parent, int typeSize) + public TypeBuilder DefineNestedType(string name, TypeAttributes attr, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent, int typeSize) { lock (SyncRoot) { @@ -1624,7 +1628,7 @@ public TypeBuilder DefineNestedType(string name, TypeAttributes attr, Type? pare } } - public TypeBuilder DefineNestedType(string name, TypeAttributes attr, Type? parent, PackingSize packSize) + public TypeBuilder DefineNestedType(string name, TypeAttributes attr, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent, PackingSize packSize) { lock (SyncRoot) { @@ -1632,7 +1636,7 @@ public TypeBuilder DefineNestedType(string name, TypeAttributes attr, Type? pare } } - public TypeBuilder DefineNestedType(string name, TypeAttributes attr, Type? parent, PackingSize packSize, int typeSize) + public TypeBuilder DefineNestedType(string name, TypeAttributes attr, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent, PackingSize packSize, int typeSize) { lock (SyncRoot) { @@ -1640,7 +1644,7 @@ public TypeBuilder DefineNestedType(string name, TypeAttributes attr, Type? pare } } - private TypeBuilder DefineNestedTypeNoLock(string name, TypeAttributes attr, Type? parent, Type[]? interfaces, PackingSize packSize, int typeSize) + private TypeBuilder DefineNestedTypeNoLock(string name, TypeAttributes attr, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent, Type[]? interfaces, PackingSize packSize, int typeSize) { return new TypeBuilder(name, attr, parent, interfaces, m_module, packSize, typeSize, this); } @@ -2061,7 +2065,7 @@ internal void CheckContext(params Type?[]? types) public PackingSize PackingSize => m_iPackingSize; - public void SetParent(Type? parent) + public void SetParent([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent) { ThrowIfCreated(); @@ -2091,7 +2095,7 @@ public void SetParent(Type? parent) } } - public void AddInterfaceImplementation(Type interfaceType) + public void AddInterfaceImplementation([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type interfaceType) { if (interfaceType == null) { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilderInstantiation.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilderInstantiation.cs index 3dac2b138f9c..1a6e10196af8 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilderInstantiation.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilderInstantiation.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections; using System.Globalization; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/XXXOnTypeBuilderInstantiation.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/XXXOnTypeBuilderInstantiation.cs index ef8c901fdc52..4443867b1b52 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/XXXOnTypeBuilderInstantiation.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/XXXOnTypeBuilderInstantiation.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Globalization; using System.Diagnostics; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/FieldInfo.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/FieldInfo.CoreCLR.cs index a1a729f3be0c..ee935a2be83b 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/FieldInfo.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/FieldInfo.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Reflection { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/INVOCATION_FLAGS.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/INVOCATION_FLAGS.cs index eb28f4e20912..e7d9b97ac5c6 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/INVOCATION_FLAGS.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/INVOCATION_FLAGS.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Reflection { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/LoaderAllocator.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/LoaderAllocator.cs index 512ae8b87ae5..2dd25ea5646c 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/LoaderAllocator.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/LoaderAllocator.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Runtime.CompilerServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/MdConstant.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/MdConstant.cs index 800cf371dcd4..498b6adf52e4 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/MdConstant.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/MdConstant.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Reflection { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/MdFieldInfo.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/MdFieldInfo.cs index 16da29b4f052..e4d240d598ba 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/MdFieldInfo.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/MdFieldInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Globalization; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/MdImport.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/MdImport.cs index c328adf462ed..d31c719182d0 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/MdImport.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/MdImport.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Globalization; using System.Diagnostics; @@ -23,7 +22,7 @@ internal enum MdSigCallingConvention : byte Field = 0x06, LocalSig = 0x07, Property = 0x08, - Unmgd = 0x09, + Unmanaged = 0x09, GenericInst = 0x0a, // generic method instantiation Generic = 0x10, // Generic method sig with explicit number of type arguments (precedes ordinary parameter count) diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/MemberInfo.Internal.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/MemberInfo.Internal.cs index 3f53913a2324..7d5736ee88de 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/MemberInfo.Internal.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/MemberInfo.Internal.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Reflection { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Metadata/AssemblyExtensions.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Metadata/AssemblyExtensions.cs index 4505c5cd6cd5..65fdaf409672 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Metadata/AssemblyExtensions.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Metadata/AssemblyExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/MethodBase.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/MethodBase.CoreCLR.cs index 7ab2a594ab52..973b8564dc2c 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/MethodBase.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/MethodBase.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Globalization; using System.Threading; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RtFieldInfo.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RtFieldInfo.cs index 0f602face5a5..9aac5488e60d 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RtFieldInfo.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RtFieldInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Globalization; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeAssembly.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeAssembly.cs index fd6eeb2bc23c..6387b7e42fa4 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeAssembly.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeAssembly.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeConstructorInfo.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeConstructorInfo.cs index 133f825dbcc0..9d0086ca4425 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeConstructorInfo.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeConstructorInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeEventInfo.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeEventInfo.cs index 2a14dc6b9a18..17721025b51e 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeEventInfo.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeEventInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeExceptionHandlingClause.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeExceptionHandlingClause.cs index 4a2f00542111..b8f5df8b4539 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeExceptionHandlingClause.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeExceptionHandlingClause.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Globalization; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeFieldInfo.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeFieldInfo.cs index fc64e1d9713a..85625ac3150a 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeFieldInfo.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeFieldInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using RuntimeTypeCache = System.RuntimeType.RuntimeTypeCache; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeLocalVariableInfo.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeLocalVariableInfo.cs index 6fcfa9f8e1ee..d9a7c16972dc 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeLocalVariableInfo.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeLocalVariableInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeMethodBody.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeMethodBody.cs index 9f5d741b11b5..8be4480cbb66 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeMethodBody.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeMethodBody.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.cs index 9a2779f2c211..d0441ffbfa8f 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeModule.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeModule.cs index 4852e3bb7776..3835866b99bf 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeModule.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeModule.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Runtime.Serialization; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeParameterInfo.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeParameterInfo.cs index f8a0ff0b329c..9fbf8f9c0837 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeParameterInfo.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeParameterInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics; @@ -114,10 +113,10 @@ internal static ParameterInfo[] GetParameters( private int m_tkParamDef; private MetadataImport m_scope; private Signature? m_signature; - private volatile bool m_nameIsCached = false; - private readonly bool m_noMetadata = false; - private bool m_noDefaultValue = false; - private MethodBase? m_originalMember = null; + private volatile bool m_nameIsCached; + private readonly bool m_noMetadata; + private bool m_noDefaultValue; + private MethodBase? m_originalMember; #endregion #region Internal Properties diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimePropertyInfo.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimePropertyInfo.cs index 1be1743f0fc5..ef1f82b58f36 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimePropertyInfo.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimePropertyInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Resources/ManifestBasedResourceGroveler.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Resources/ManifestBasedResourceGroveler.CoreCLR.cs index 641814fc9bbd..1a7444ebae8e 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Resources/ManifestBasedResourceGroveler.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Resources/ManifestBasedResourceGroveler.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Globalization; using System.Reflection; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/CastHelpers.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/CastHelpers.cs index 15cad5265955..80475901e1a0 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/CastHelpers.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/CastHelpers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using Internal.Runtime.CompilerServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/CrossLoaderAllocatorHashHelpers.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/CrossLoaderAllocatorHashHelpers.cs index 89d0773075d8..99b391172ddf 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/CrossLoaderAllocatorHashHelpers.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/CrossLoaderAllocatorHashHelpers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/DependentHandle.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/DependentHandle.cs index 4558fda35367..d0aff34f2bc7 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/DependentHandle.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/DependentHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Runtime.CompilerServices { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/GCHeapHash.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/GCHeapHash.cs index 396967048ff0..a5ce5ed1dc39 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/GCHeapHash.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/GCHeapHash.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/ICastableHelpers.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/ICastableHelpers.cs index 1006fd99f746..ca9f73a5c667 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/ICastableHelpers.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/ICastableHelpers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics.CodeAnalysis; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeFeature.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeFeature.CoreCLR.cs index 69a7465dcf20..2f98784fda9c 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeFeature.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeFeature.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Runtime.CompilerServices { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeHelpers.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeHelpers.CoreCLR.cs index b4495c9ebe4b..5c9a38e2a6f7 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeHelpers.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeHelpers.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Diagnostics.CodeAnalysis; @@ -11,9 +10,6 @@ namespace System.Runtime.CompilerServices { public static partial class RuntimeHelpers { - // The special dll name to be used for DllImport of QCalls - internal const string QCall = "QCall"; - [Intrinsic] [MethodImpl(MethodImplOptions.InternalCall)] public static extern void InitializeArray(Array array, RuntimeFieldHandle fldHandle); @@ -296,6 +292,40 @@ public static IntPtr AllocateTypeAssociatedMemory(Type type, int size) [MethodImpl(MethodImplOptions.InternalCall)] private static unsafe extern TailCallTls* GetTailCallInfo(IntPtr retAddrSlot, IntPtr* retAddr); + private static unsafe void DispatchTailCalls( + IntPtr callersRetAddrSlot, + delegate* callTarget, + IntPtr retVal) + { + IntPtr callersRetAddr; + TailCallTls* tls = GetTailCallInfo(callersRetAddrSlot, &callersRetAddr); + PortableTailCallFrame* prevFrame = tls->Frame; + if (callersRetAddr == prevFrame->TailCallAwareReturnAddress) + { + prevFrame->NextCall = callTarget; + return; + } + + PortableTailCallFrame newFrame; + newFrame.Prev = prevFrame; + + try + { + tls->Frame = &newFrame; + + do + { + newFrame.NextCall = null; + callTarget(tls->ArgBuffer, retVal, &newFrame.TailCallAwareReturnAddress); + callTarget = newFrame.NextCall; + } while (callTarget != null); + } + finally + { + tls->Frame = prevFrame; + } + } + [MethodImpl(MethodImplOptions.InternalCall)] internal static extern long GetILBytesJitted(); @@ -443,7 +473,7 @@ internal unsafe struct PortableTailCallFrame { public PortableTailCallFrame* Prev; public IntPtr TailCallAwareReturnAddress; - public IntPtr NextCall; + public delegate* NextCall; } [StructLayout(LayoutKind.Sequential)] diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/TypeDependencyAttribute.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/TypeDependencyAttribute.cs index 66128fc7910f..45807f72ab2c 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/TypeDependencyAttribute.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/TypeDependencyAttribute.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Runtime.CompilerServices { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/GCSettings.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/GCSettings.CoreCLR.cs index 1fbc1dc4f1de..faa8f5e884ad 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/GCSettings.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/GCSettings.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventsHelper.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventsHelper.cs index 650dc5b66ef4..368d942f403a 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventsHelper.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventsHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ComEventsFeature diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventsInfo.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventsInfo.cs index e65614b92fea..d8a0ea49e7d5 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventsInfo.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventsInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Runtime.InteropServices { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IEnumerable.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IEnumerable.cs index ec0061210ac7..bfe2ad30092c 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IEnumerable.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IEnumerable.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information namespace System.Runtime.InteropServices.ComTypes { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IEnumerator.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IEnumerator.cs index c3096b455aad..1e07dcc6dedb 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IEnumerator.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IEnumerator.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information namespace System.Runtime.InteropServices.ComTypes { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComWrappers.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComWrappers.cs index b404dc6c461e..1b0c1a717487 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComWrappers.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComWrappers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/ComDataHelpers.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/ComDataHelpers.cs index 3560409b3d2f..e871eca76361 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/ComDataHelpers.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/ComDataHelpers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Runtime.InteropServices.CustomMarshalers { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/EnumVariantViewOfEnumerator.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/EnumVariantViewOfEnumerator.cs index 6d888cc923e5..818b4b5bc11c 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/EnumVariantViewOfEnumerator.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/EnumVariantViewOfEnumerator.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections; using ComTypes = System.Runtime.InteropServices.ComTypes; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/EnumerableToDispatchMarshaler.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/EnumerableToDispatchMarshaler.cs index 0a758211b770..10034bae86a0 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/EnumerableToDispatchMarshaler.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/EnumerableToDispatchMarshaler.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/EnumerableViewOfDispatch.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/EnumerableViewOfDispatch.cs index 98723e519c81..06f1f083ce20 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/EnumerableViewOfDispatch.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/EnumerableViewOfDispatch.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices.ComTypes; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/EnumeratorToEnumVariantMarshaler.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/EnumeratorToEnumVariantMarshaler.cs index 6d8809ce3f76..61e65f833d89 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/EnumeratorToEnumVariantMarshaler.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/EnumeratorToEnumVariantMarshaler.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections; using ComTypes = System.Runtime.InteropServices.ComTypes; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/EnumeratorViewOfEnumVariant.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/EnumeratorViewOfEnumVariant.cs index ebb76e16ba3e..f0b725a7da0e 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/EnumeratorViewOfEnumVariant.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/EnumeratorViewOfEnumVariant.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices.ComTypes; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/ExpandoToDispatchExMarshaler.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/ExpandoToDispatchExMarshaler.cs index 04fc9ae8a279..07e7802e9d2e 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/ExpandoToDispatchExMarshaler.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/ExpandoToDispatchExMarshaler.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Runtime.InteropServices.CustomMarshalers { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/TypeToTypeInfoMarshaler.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/TypeToTypeInfoMarshaler.cs index d124bf238123..da82567e8c38 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/TypeToTypeInfoMarshaler.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/TypeToTypeInfoMarshaler.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Runtime.InteropServices.CustomMarshalers { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/DynamicInterfaceCastableHelpers.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/DynamicInterfaceCastableHelpers.cs index 4f2dae16b974..6ea1f1b444a5 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/DynamicInterfaceCastableHelpers.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/DynamicInterfaceCastableHelpers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Runtime.InteropServices { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/Expando/IExpando.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/Expando/IExpando.cs index 909aac1a69f1..bbe6e24b645b 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/Expando/IExpando.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/Expando/IExpando.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Reflection; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/GCHandle.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/GCHandle.CoreCLR.cs index 3e509ef953dc..0187c5e29ba0 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/GCHandle.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/GCHandle.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; #if !DEBUG diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/IException.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/IException.cs index 1478831a8a37..3f2d78d1f584 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/IException.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/IException.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.CoreCLR.cs index 82c9891fa160..513a96b668cf 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics.CodeAnalysis; using System.Reflection; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/MemoryMarshal.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/MemoryMarshal.CoreCLR.cs index d21e4b2bd8e1..021a0a2f52be 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/MemoryMarshal.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/MemoryMarshal.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; using System.Runtime.Versioning; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/NativeLibrary.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/NativeLibrary.CoreCLR.cs index cc99bec2f34b..879fe53aa0d1 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/NativeLibrary.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/NativeLibrary.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Reflection; using System.Runtime.CompilerServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/Loader/AssemblyLoadContext.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/Loader/AssemblyLoadContext.CoreCLR.cs index 308c0aa48080..c5fb0f234557 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/Loader/AssemblyLoadContext.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/Loader/AssemblyLoadContext.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics.CodeAnalysis; using System.Diagnostics.Tracing; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/Versioning/CompatibilitySwitch.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/Versioning/CompatibilitySwitch.cs index 6655fa8de961..3b69f789e61c 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/Versioning/CompatibilitySwitch.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/Versioning/CompatibilitySwitch.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/RuntimeArgumentHandle.cs b/src/coreclr/src/System.Private.CoreLib/src/System/RuntimeArgumentHandle.cs index d231ac940540..4422f4612078 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/RuntimeArgumentHandle.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/RuntimeArgumentHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/RuntimeHandles.cs b/src/coreclr/src/System.Private.CoreLib/src/System/RuntimeHandles.cs index 65d397514375..965df43cfaf3 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/RuntimeHandles.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/RuntimeHandles.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Diagnostics.CodeAnalysis; @@ -1367,7 +1366,7 @@ internal enum MdSigCallingConvention : byte Field = 0x06, LocalSig = 0x07, Property = 0x08, - Unmgd = 0x09, + Unmanaged = 0x09, GenericInst = 0x0A, Max = 0x0B, } diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs index 42ae53481814..f4e9ac982966 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections; using System.Collections.Generic; @@ -2314,6 +2313,11 @@ private static bool FilterApplyMethodBase( #region Private\Internal Members + internal IntPtr GetUnderlyingNativeHandle() + { + return m_handle; + } + internal override bool CacheEquals(object? o) { return (o is RuntimeType t) && (t.m_handle == m_handle); diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Security/DynamicSecurityMethodAttribute.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Security/DynamicSecurityMethodAttribute.cs index 140bfcf50e83..e3dae854517e 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Security/DynamicSecurityMethodAttribute.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Security/DynamicSecurityMethodAttribute.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Security { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/StartupHookProvider.cs b/src/coreclr/src/System.Private.CoreLib/src/System/StartupHookProvider.cs index 39bbc1ab9a19..ffdf388e43e3 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/StartupHookProvider.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/StartupHookProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.IO; @@ -34,7 +33,7 @@ private static void ProcessStartupHooks() return; } - char[] disallowedSimpleAssemblyNameChars = new char[] + ReadOnlySpan disallowedSimpleAssemblyNameChars = stackalloc char[4] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar, diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/String.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/String.CoreCLR.cs index c0035c66071d..e97cdaa3c9bc 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/String.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/String.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; using System.Text; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/StubHelpers.cs b/src/coreclr/src/System.Private.CoreLib/src/System/StubHelpers.cs index f6861b70ed4b..b507b28559da 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/StubHelpers.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/StubHelpers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Text; using System.Collections.Generic; @@ -1186,9 +1185,6 @@ public IntPtr AddRef() internal static class StubHelpers { - [MethodImpl(MethodImplOptions.InternalCall)] - internal static extern bool IsQCall(IntPtr pMD); - [MethodImpl(MethodImplOptions.InternalCall)] internal static extern void InitDeclaringType(IntPtr pMD); diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Text/StringBuilder.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Text/StringBuilder.CoreCLR.cs index e426e08b877f..d23263f57bc1 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Text/StringBuilder.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Text/StringBuilder.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/ClrThreadPoolBoundHandle.Unix.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/ClrThreadPoolBoundHandle.Unix.cs index b7cdaa801c50..6f809959dbca 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/ClrThreadPoolBoundHandle.Unix.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/ClrThreadPoolBoundHandle.Unix.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/ClrThreadPoolBoundHandle.Windows.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/ClrThreadPoolBoundHandle.Windows.cs index 6e3f995646b6..595051fd2160 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/ClrThreadPoolBoundHandle.Windows.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/ClrThreadPoolBoundHandle.Windows.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/ClrThreadPoolBoundHandle.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/ClrThreadPoolBoundHandle.cs index e9f89ab068de..eff292e58405 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/ClrThreadPoolBoundHandle.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/ClrThreadPoolBoundHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/ClrThreadPoolBoundHandleOverlapped.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/ClrThreadPoolBoundHandleOverlapped.cs index 11b2e0556cb7..bc2d08289617 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/ClrThreadPoolBoundHandleOverlapped.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/ClrThreadPoolBoundHandleOverlapped.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Threading { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/ClrThreadPoolPreAllocatedOverlapped.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/ClrThreadPoolPreAllocatedOverlapped.cs index 3e94950e67d2..06df433df466 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/ClrThreadPoolPreAllocatedOverlapped.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/ClrThreadPoolPreAllocatedOverlapped.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Threading { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/Interlocked.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/Interlocked.CoreCLR.cs index c9153f3cda75..4d7d84408592 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/Interlocked.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/Interlocked.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/Monitor.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/Monitor.cs index a76c11367210..80226acdbcec 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/Monitor.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/Monitor.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // /*============================================================================= diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/Overlapped.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/Overlapped.cs index fb4be5115033..e84d9621089f 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/Overlapped.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/Overlapped.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/ProcessorIdCache.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/ProcessorIdCache.cs index 7f11ab5efa8c..a31516c94f04 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/ProcessorIdCache.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/ProcessorIdCache.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/StackCrawlMark.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/StackCrawlMark.cs index 7323d1dced17..4755367f507e 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/StackCrawlMark.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/StackCrawlMark.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Threading { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/SynchronizationContext.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/SynchronizationContext.CoreCLR.cs index e26d9b7b70c1..c5db0eeabdc1 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/SynchronizationContext.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/SynchronizationContext.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Threading { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/Thread.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/Thread.CoreCLR.cs index f2d9fe66f9a5..9edaf81e8a87 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/Thread.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/Thread.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Globalization; @@ -15,8 +14,8 @@ internal sealed class ThreadHelper private Delegate _start; internal CultureInfo? _startCulture; internal CultureInfo? _startUICulture; - private object? _startArg = null; - private ExecutionContext? _executionContext = null; + private object? _startArg; + private ExecutionContext? _executionContext; internal ThreadHelper(Delegate start) { @@ -319,6 +318,8 @@ partial void ThreadNameChanged(string? value) [MethodImpl(MethodImplOptions.InternalCall)] internal static extern DeserializationTracker GetThreadDeserializationTracker(ref StackCrawlMark stackMark); + internal const bool IsThreadStartSupported = true; + /// Returns true if the thread has been started and is not dead. public extern bool IsAlive { @@ -388,17 +389,10 @@ public ApartmentState GetApartmentState() => /// An unstarted thread can be marked to indicate that it will host a /// single-threaded or multi-threaded apartment. /// - private bool TrySetApartmentStateUnchecked(ApartmentState state) => #if FEATURE_COMINTEROP_APARTMENT_SUPPORT - SetApartmentStateHelper(state, false); -#else // !FEATURE_COMINTEROP_APARTMENT_SUPPORT - state == ApartmentState.Unknown; -#endif // FEATURE_COMINTEROP_APARTMENT_SUPPORT - -#if FEATURE_COMINTEROP_APARTMENT_SUPPORT - internal bool SetApartmentStateHelper(ApartmentState state, bool fireMDAOnMismatch) + private bool TrySetApartmentStateUnchecked(ApartmentState state) { - ApartmentState retState = (ApartmentState)SetApartmentStateNative((int)state, fireMDAOnMismatch); + ApartmentState retState = (ApartmentState)SetApartmentStateNative((int)state); // Special case where we pass in Unknown and get back MTA. // Once we CoUninitialize the thread, the OS will still @@ -421,7 +415,12 @@ internal bool SetApartmentStateHelper(ApartmentState state, bool fireMDAOnMismat internal extern int GetApartmentStateNative(); [MethodImpl(MethodImplOptions.InternalCall)] - internal extern int SetApartmentStateNative(int state, bool fireMDAOnMismatch); + internal extern int SetApartmentStateNative(int state); +#else // FEATURE_COMINTEROP_APARTMENT_SUPPORT + private bool TrySetApartmentStateUnchecked(ApartmentState state) + { + return state == ApartmentState.Unknown; + } #endif // FEATURE_COMINTEROP_APARTMENT_SUPPORT #if FEATURE_COMINTEROP diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/ThreadPool.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/ThreadPool.CoreCLR.cs index 8f8b1b7b7ac6..59fecc735dd7 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/ThreadPool.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/ThreadPool.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** @@ -34,8 +33,8 @@ internal sealed class RegisteredWaitHandleSafe : CriticalFinalizerObject private static IntPtr InvalidHandle => new IntPtr(-1); private IntPtr registeredWaitHandle = InvalidHandle; private WaitHandle? m_internalWaitObject; - private bool bReleaseNeeded = false; - private volatile int m_lock = 0; + private bool bReleaseNeeded; + private volatile int m_lock; internal IntPtr GetHandle() => registeredWaitHandle; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/Timer.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/Timer.CoreCLR.cs index 9139163b7979..e13cd3afe247 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/Timer.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/Timer.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Diagnostics; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/WaitHandle.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/WaitHandle.CoreCLR.cs index e266ef8e5858..f25dd2c124f7 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/WaitHandle.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/WaitHandle.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Type.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Type.CoreCLR.cs index 22325c2cb295..c81b37a4db72 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Type.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Type.CoreCLR.cs @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. +using System.Diagnostics.CodeAnalysis; using System.Reflection; using System.Runtime.CompilerServices; using StackCrawlMark = System.Threading.StackCrawlMark; @@ -20,6 +20,7 @@ public bool IsInterface } } + [RequiresUnreferencedCode("The type might be removed")] [System.Security.DynamicSecurityMethod] // Methods containing StackCrawlMark local var has to be marked DynamicSecurityMethod public static Type? GetType(string typeName, bool throwOnError, bool ignoreCase) { @@ -27,6 +28,7 @@ public bool IsInterface return RuntimeType.GetType(typeName, throwOnError, ignoreCase, ref stackMark); } + [RequiresUnreferencedCode("The type might be removed")] [System.Security.DynamicSecurityMethod] // Methods containing StackCrawlMark local var has to be marked DynamicSecurityMethod public static Type? GetType(string typeName, bool throwOnError) { @@ -34,6 +36,7 @@ public bool IsInterface return RuntimeType.GetType(typeName, throwOnError, false, ref stackMark); } + [RequiresUnreferencedCode("The type might be removed")] [System.Security.DynamicSecurityMethod] // Methods containing StackCrawlMark local var has to be marked DynamicSecurityMethod public static Type? GetType(string typeName) { @@ -41,6 +44,7 @@ public bool IsInterface return RuntimeType.GetType(typeName, false, false, ref stackMark); } + [RequiresUnreferencedCode("The type might be removed")] [System.Security.DynamicSecurityMethod] // Methods containing StackCrawlMark local var has to be marked DynamicSecurityMethod public static Type? GetType( string typeName, @@ -51,6 +55,7 @@ public bool IsInterface return TypeNameParser.GetType(typeName, assemblyResolver, typeResolver, false, false, ref stackMark); } + [RequiresUnreferencedCode("The type might be removed")] [System.Security.DynamicSecurityMethod] // Methods containing StackCrawlMark local var has to be marked DynamicSecurityMethod public static Type? GetType( string typeName, @@ -62,6 +67,7 @@ public bool IsInterface return TypeNameParser.GetType(typeName, assemblyResolver, typeResolver, throwOnError, false, ref stackMark); } + [RequiresUnreferencedCode("The type might be removed")] [System.Security.DynamicSecurityMethod] // Methods containing StackCrawlMark local var has to be marked DynamicSecurityMethod public static Type? GetType( string typeName, diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/TypeLoadException.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/TypeLoadException.CoreCLR.cs index 5dc507731840..9d1e59821d4f 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/TypeLoadException.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/TypeLoadException.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Runtime.CompilerServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/TypeNameParser.cs b/src/coreclr/src/System.Private.CoreLib/src/System/TypeNameParser.cs index b5c57ec55a39..27f2cfd1671d 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/TypeNameParser.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/TypeNameParser.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.IO; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/TypedReference.cs b/src/coreclr/src/System.Private.CoreLib/src/System/TypedReference.cs index 9f4a39089afc..0d6ea9f65091 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/TypedReference.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/TypedReference.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // TypedReference is basically only ever seen on the call stack, and in param arrays. // These are blob that must be dealt with by the compiler. diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Utf8String.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Utf8String.CoreCLR.cs index f8ab2a5140b1..ce669f84ec9d 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Utf8String.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Utf8String.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.ComponentModel; using System.Runtime.CompilerServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/ValueType.cs b/src/coreclr/src/System.Private.CoreLib/src/System/ValueType.cs index 48f18864759c..646a4792e9ab 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/ValueType.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/ValueType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Variant.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Variant.cs index 402b993a01aa..8ab1589db965 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Variant.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Variant.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** @@ -104,7 +103,7 @@ internal struct Variant typeof(System.DBNull), }; - internal static readonly Variant Empty = default; + internal static readonly Variant Empty; internal static readonly Variant Missing = new Variant(Variant.CV_MISSING, Type.Missing, 0); internal static readonly Variant DBNull = new Variant(Variant.CV_NULL, System.DBNull.Value, 0); diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/WeakReference.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/WeakReference.CoreCLR.cs index c9e1da46bf29..0d2396862be3 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/WeakReference.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/WeakReference.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.Serialization; using System.Runtime.CompilerServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/WeakReference.T.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/WeakReference.T.CoreCLR.cs index eb164147bf08..dd5f0d900d3a 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/WeakReference.T.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/WeakReference.T.CoreCLR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics.CodeAnalysis; using System.Runtime.Serialization; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/__Canon.cs b/src/coreclr/src/System.Private.CoreLib/src/System/__Canon.cs index 7fbfa758bcfc..d888f96a3d1a 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/__Canon.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/__Canon.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/__ComObject.cs b/src/coreclr/src/System.Private.CoreLib/src/System/__ComObject.cs index 38b88b66c011..9015a016a7e9 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/__ComObject.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/__ComObject.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections; using System.Runtime.InteropServices; diff --git a/src/coreclr/src/ToolBox/SOS/DacTableGen/MapSymbolProvider.cs b/src/coreclr/src/ToolBox/SOS/DacTableGen/MapSymbolProvider.cs index 31863d44d258..70ce5a74c7aa 100644 --- a/src/coreclr/src/ToolBox/SOS/DacTableGen/MapSymbolProvider.cs +++ b/src/coreclr/src/ToolBox/SOS/DacTableGen/MapSymbolProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // #define DACTABLEGEN_DEBUG diff --git a/src/coreclr/src/ToolBox/SOS/DacTableGen/cvconst.cs b/src/coreclr/src/ToolBox/SOS/DacTableGen/cvconst.cs index fee66f0b5f63..c4fd68db93a0 100644 --- a/src/coreclr/src/ToolBox/SOS/DacTableGen/cvconst.cs +++ b/src/coreclr/src/ToolBox/SOS/DacTableGen/cvconst.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // cvconst.h - codeview constant definitions diff --git a/src/coreclr/src/ToolBox/SOS/DacTableGen/diautil.cs b/src/coreclr/src/ToolBox/SOS/DacTableGen/diautil.cs index e9e53494cf7b..8da9217b477b 100644 --- a/src/coreclr/src/ToolBox/SOS/DacTableGen/diautil.cs +++ b/src/coreclr/src/ToolBox/SOS/DacTableGen/diautil.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Text; diff --git a/src/coreclr/src/ToolBox/SOS/DacTableGen/main.cs b/src/coreclr/src/ToolBox/SOS/DacTableGen/main.cs index ab25537d7535..15bed1c0c0c3 100644 --- a/src/coreclr/src/ToolBox/SOS/DacTableGen/main.cs +++ b/src/coreclr/src/ToolBox/SOS/DacTableGen/main.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/coreclr/src/ToolBox/superpmi/superpmi-shared/icorjithostimpl.h b/src/coreclr/src/ToolBox/superpmi/superpmi-shared/icorjithostimpl.h index 687c6bfdb1b9..edcca2c79420 100644 --- a/src/coreclr/src/ToolBox/superpmi/superpmi-shared/icorjithostimpl.h +++ b/src/coreclr/src/ToolBox/superpmi/superpmi-shared/icorjithostimpl.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _ICorJitHostImpl #define _ICorJitHostImpl diff --git a/src/coreclr/src/ToolBox/superpmi/superpmi-shared/icorjitinfoimpl.h b/src/coreclr/src/ToolBox/superpmi/superpmi-shared/icorjitinfoimpl.h index 1e7d51988edd..0a2ea7b63f64 100644 --- a/src/coreclr/src/ToolBox/superpmi/superpmi-shared/icorjitinfoimpl.h +++ b/src/coreclr/src/ToolBox/superpmi/superpmi-shared/icorjitinfoimpl.h @@ -393,8 +393,7 @@ CorInfoInitClassResult initClass(CORINFO_FIELD_HANDLE field, // Non-NULL - inqui // field access NULL - inquire about cctor trigger in // method prolog CORINFO_METHOD_HANDLE method, // Method referencing the field or prolog - CORINFO_CONTEXT_HANDLE context, // Exact context of method - BOOL speculative = FALSE // TRUE means don't actually run it + CORINFO_CONTEXT_HANDLE context // Exact context of method ); // This used to be called "loadClass". This records the fact diff --git a/src/coreclr/src/ToolBox/superpmi/superpmi-shared/methodcontext.cpp b/src/coreclr/src/ToolBox/superpmi/superpmi-shared/methodcontext.cpp index ccd8a12caf85..d45c5e07942d 100644 --- a/src/coreclr/src/ToolBox/superpmi/superpmi-shared/methodcontext.cpp +++ b/src/coreclr/src/ToolBox/superpmi/superpmi-shared/methodcontext.cpp @@ -908,7 +908,6 @@ void MethodContext::repGetBoundaries(CORINFO_METHOD_HANDLE ftn, void MethodContext::recInitClass(CORINFO_FIELD_HANDLE field, CORINFO_METHOD_HANDLE method, CORINFO_CONTEXT_HANDLE context, - BOOL speculative, CorInfoInitClassResult result) { if (InitClass == nullptr) @@ -920,20 +919,18 @@ void MethodContext::recInitClass(CORINFO_FIELD_HANDLE field, key.field = (DWORDLONG)field; key.method = (DWORDLONG)method; key.context = (DWORDLONG)context; - key.speculative = (DWORD)speculative; InitClass->Add(key, (DWORD)result); DEBUG_REC(dmpInitClass(key, (DWORD)result)); } void MethodContext::dmpInitClass(const Agnostic_InitClass& key, DWORD value) { - printf("InitClass key fld-%016llX meth-%016llX con-%016llX spec-%u, value res-%u", key.field, key.method, - key.context, key.speculative, value); + printf("InitClass key fld-%016llX meth-%016llX con-%016llX, value res-%u", key.field, key.method, + key.context, value); } CorInfoInitClassResult MethodContext::repInitClass(CORINFO_FIELD_HANDLE field, CORINFO_METHOD_HANDLE method, - CORINFO_CONTEXT_HANDLE context, - BOOL speculative) + CORINFO_CONTEXT_HANDLE context) { Agnostic_InitClass key; ZeroMemory(&key, sizeof(Agnostic_InitClass)); // We use the input structs as a key and use memcmp to compare.. so we @@ -942,7 +939,6 @@ CorInfoInitClassResult MethodContext::repInitClass(CORINFO_FIELD_HANDLE field, key.field = (DWORDLONG)field; key.method = (DWORDLONG)method; key.context = (DWORDLONG)context; - key.speculative = (DWORD)speculative; AssertCodeMsg(InitClass != nullptr, EXCEPTIONCODE_MC, "Didn't find anything for %016llX", (DWORDLONG)key.method); AssertCodeMsg(InitClass->GetIndex(key) != -1, EXCEPTIONCODE_MC, "Didn't find %016llX", (DWORDLONG)key.method); diff --git a/src/coreclr/src/ToolBox/superpmi/superpmi-shared/methodcontext.h b/src/coreclr/src/ToolBox/superpmi/superpmi-shared/methodcontext.h index 2e2b4b9dc001..36c0fbb478bb 100644 --- a/src/coreclr/src/ToolBox/superpmi/superpmi-shared/methodcontext.h +++ b/src/coreclr/src/ToolBox/superpmi/superpmi-shared/methodcontext.h @@ -63,7 +63,6 @@ class MethodContext DWORDLONG field; DWORDLONG method; DWORDLONG context; - DWORD speculative; }; struct DLDL { @@ -631,13 +630,11 @@ class MethodContext void recInitClass(CORINFO_FIELD_HANDLE field, CORINFO_METHOD_HANDLE method, CORINFO_CONTEXT_HANDLE context, - BOOL speculative, CorInfoInitClassResult result); void dmpInitClass(const Agnostic_InitClass& key, DWORD value); CorInfoInitClassResult repInitClass(CORINFO_FIELD_HANDLE field, CORINFO_METHOD_HANDLE method, - CORINFO_CONTEXT_HANDLE context, - BOOL speculative); + CORINFO_CONTEXT_HANDLE context); void recGetMethodName(CORINFO_METHOD_HANDLE ftn, char* methodname, const char** moduleName); void dmpGetMethodName(DLD key, DD value); diff --git a/src/coreclr/src/ToolBox/superpmi/superpmi-shim-collector/icorjitinfo.cpp b/src/coreclr/src/ToolBox/superpmi/superpmi-shim-collector/icorjitinfo.cpp index ec7bfde1fd16..f5b69299113e 100644 --- a/src/coreclr/src/ToolBox/superpmi/superpmi-shim-collector/icorjitinfo.cpp +++ b/src/coreclr/src/ToolBox/superpmi/superpmi-shim-collector/icorjitinfo.cpp @@ -840,13 +840,12 @@ CorInfoInitClassResult interceptor_ICJI::initClass( CORINFO_FIELD_HANDLE field, // Non-nullptr - inquire about cctor trigger before static field access // nullptr - inquire about cctor trigger in method prolog CORINFO_METHOD_HANDLE method, // Method referencing the field or prolog - CORINFO_CONTEXT_HANDLE context, // Exact context of method - BOOL speculative // TRUE means don't actually run it + CORINFO_CONTEXT_HANDLE context // Exact context of method ) { mc->cr->AddCall("initClass"); - CorInfoInitClassResult temp = original_ICorJitInfo->initClass(field, method, context, speculative); - mc->recInitClass(field, method, context, speculative, temp); + CorInfoInitClassResult temp = original_ICorJitInfo->initClass(field, method, context); + mc->recInitClass(field, method, context, temp); return temp; } diff --git a/src/coreclr/src/ToolBox/superpmi/superpmi-shim-counter/icorjitinfo.cpp b/src/coreclr/src/ToolBox/superpmi/superpmi-shim-counter/icorjitinfo.cpp index 2b89a4a81df9..03a5643d6e6c 100644 --- a/src/coreclr/src/ToolBox/superpmi/superpmi-shim-counter/icorjitinfo.cpp +++ b/src/coreclr/src/ToolBox/superpmi/superpmi-shim-counter/icorjitinfo.cpp @@ -653,12 +653,11 @@ CorInfoInitClassResult interceptor_ICJI::initClass( CORINFO_FIELD_HANDLE field, // Non-nullptr - inquire about cctor trigger before static field access // nullptr - inquire about cctor trigger in method prolog CORINFO_METHOD_HANDLE method, // Method referencing the field or prolog - CORINFO_CONTEXT_HANDLE context, // Exact context of method - BOOL speculative // TRUE means don't actually run it + CORINFO_CONTEXT_HANDLE context // Exact context of method ) { mcs->AddCall("initClass"); - return original_ICorJitInfo->initClass(field, method, context, speculative); + return original_ICorJitInfo->initClass(field, method, context); } // This used to be called "loadClass". This records the fact diff --git a/src/coreclr/src/ToolBox/superpmi/superpmi-shim-simple/icorjitinfo.cpp b/src/coreclr/src/ToolBox/superpmi/superpmi-shim-simple/icorjitinfo.cpp index 4fc6c03ec439..139937e4c03f 100644 --- a/src/coreclr/src/ToolBox/superpmi/superpmi-shim-simple/icorjitinfo.cpp +++ b/src/coreclr/src/ToolBox/superpmi/superpmi-shim-simple/icorjitinfo.cpp @@ -577,11 +577,10 @@ CorInfoInitClassResult interceptor_ICJI::initClass( CORINFO_FIELD_HANDLE field, // Non-nullptr - inquire about cctor trigger before static field access // nullptr - inquire about cctor trigger in method prolog CORINFO_METHOD_HANDLE method, // Method referencing the field or prolog - CORINFO_CONTEXT_HANDLE context, // Exact context of method - BOOL speculative // TRUE means don't actually run it + CORINFO_CONTEXT_HANDLE context // Exact context of method ) { - return original_ICorJitInfo->initClass(field, method, context, speculative); + return original_ICorJitInfo->initClass(field, method, context); } // This used to be called "loadClass". This records the fact diff --git a/src/coreclr/src/ToolBox/superpmi/superpmi/icorjitinfo.cpp b/src/coreclr/src/ToolBox/superpmi/superpmi/icorjitinfo.cpp index 53df692f43de..f0e2114d992c 100644 --- a/src/coreclr/src/ToolBox/superpmi/superpmi/icorjitinfo.cpp +++ b/src/coreclr/src/ToolBox/superpmi/superpmi/icorjitinfo.cpp @@ -702,12 +702,11 @@ CorInfoInitClassResult MyICJI::initClass(CORINFO_FIELD_HANDLE field, // Non-null // static field access nullptr - inquire about // cctor trigger in method prolog CORINFO_METHOD_HANDLE method, // Method referencing the field or prolog - CORINFO_CONTEXT_HANDLE context, // Exact context of method - BOOL speculative // TRUE means don't actually run it + CORINFO_CONTEXT_HANDLE context // Exact context of method ) { jitInstance->mc->cr->AddCall("initClass"); - return jitInstance->mc->repInitClass(field, method, context, speculative); + return jitInstance->mc->repInitClass(field, method, context); } // This used to be called "loadClass". This records the fact diff --git a/src/coreclr/src/binder/CMakeLists.txt b/src/coreclr/src/binder/CMakeLists.txt index 3a66c81e10e8..9c242ed1518d 100644 --- a/src/coreclr/src/binder/CMakeLists.txt +++ b/src/coreclr/src/binder/CMakeLists.txt @@ -83,7 +83,7 @@ convert_to_absolute_path(BINDER_SOURCES ${BINDER_SOURCES}) convert_to_absolute_path(BINDER_CROSSGEN_SOURCES ${BINDER_CROSSGEN_SOURCES}) add_library_clr(v3binder - STATIC + OBJECT ${BINDER_SOURCES} ) add_dependencies(v3binder eventing_headers) diff --git a/src/coreclr/src/binder/activitytracker.cpp b/src/coreclr/src/binder/activitytracker.cpp index ea5dbd1555df..b7287d3afa91 100644 --- a/src/coreclr/src/binder/activitytracker.cpp +++ b/src/coreclr/src/binder/activitytracker.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // activitytracker.cpp @@ -40,4 +39,4 @@ void ActivityTracker::Stop(/*out*/ GUID *activityId) args[ARGNUM_0] = PTR_TO_ARGHOLDER(activityId); CALL_MANAGED_METHOD_NORET(args) -} \ No newline at end of file +} diff --git a/src/coreclr/src/binder/applicationcontext.cpp b/src/coreclr/src/binder/applicationcontext.cpp index e91ceb637e0a..d19029548541 100644 --- a/src/coreclr/src/binder/applicationcontext.cpp +++ b/src/coreclr/src/binder/applicationcontext.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // ApplicationContext.cpp diff --git a/src/coreclr/src/binder/assembly.cpp b/src/coreclr/src/binder/assembly.cpp index 9000e9095b3a..d4948c4d1ae8 100644 --- a/src/coreclr/src/binder/assembly.cpp +++ b/src/coreclr/src/binder/assembly.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // Assembly.cpp @@ -210,87 +209,5 @@ namespace BINDER_SPACE return S_OK; } - - HRESULT Assembly::GetImageResource( - DWORD dwImageType, - DWORD * pdwImageType, - ICLRPrivResource ** ppIResource) - { - HRESULT hr = S_OK; - if(ppIResource == nullptr) - return E_INVALIDARG; - - if ((dwImageType & ASSEMBLY_IMAGE_TYPE_ASSEMBLY) == ASSEMBLY_IMAGE_TYPE_ASSEMBLY) - { - *ppIResource = clr::SafeAddRef(&m_clrPrivRes); - if (pdwImageType != nullptr) - *pdwImageType = ASSEMBLY_IMAGE_TYPE_ASSEMBLY; - } - else - { - hr = CLR_E_BIND_IMAGE_UNAVAILABLE; - } - - return hr; - } - - // get parent pointer from nested type - #define GetPThis() ((BINDER_SPACE::Assembly*)(((PBYTE)this) - offsetof(BINDER_SPACE::Assembly, m_clrPrivRes))) - - HRESULT Assembly::CLRPrivResourceAssembly::QueryInterface(REFIID riid, void ** ppv) - { - HRESULT hr = S_OK; - VALIDATE_ARG_RET(ppv != NULL); - - if (IsEqualIID(riid, IID_IUnknown)) - { - AddRef(); - *ppv = this; - } - else if (IsEqualIID(riid, __uuidof(ICLRPrivResource))) - { - AddRef(); - // upcasting is safe - *ppv = static_cast(this); - } - else if (IsEqualIID(riid, __uuidof(ICLRPrivResourceAssembly))) - { - AddRef(); - *ppv = static_cast(this); - } - else - { - *ppv = NULL; - hr = E_NOINTERFACE; - } - - return hr; - } - - ULONG Assembly::CLRPrivResourceAssembly::AddRef() - { - return GetPThis()->AddRef(); - } - - ULONG Assembly::CLRPrivResourceAssembly::Release() - { - return GetPThis()->Release(); - } - - HRESULT Assembly::CLRPrivResourceAssembly::GetResourceType(IID *pIID) - { - VALIDATE_ARG_RET(pIID != nullptr); - *pIID = __uuidof(ICLRPrivResourceAssembly); - return S_OK; - } - - HRESULT Assembly::CLRPrivResourceAssembly::GetAssembly(LPVOID *ppAssembly) - { - VALIDATE_ARG_RET(ppAssembly != nullptr); - AddRef(); - *ppAssembly = GetPThis(); - return S_OK; - } - } diff --git a/src/coreclr/src/binder/assemblybinder.cpp b/src/coreclr/src/binder/assemblybinder.cpp index 0a68daec66a4..0b3c465fa5b7 100644 --- a/src/coreclr/src/binder/assemblybinder.cpp +++ b/src/coreclr/src/binder/assemblybinder.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // AssemblyBinder.cpp diff --git a/src/coreclr/src/binder/assemblyidentitycache.cpp b/src/coreclr/src/binder/assemblyidentitycache.cpp index 224f585d0137..bff89d1ad295 100644 --- a/src/coreclr/src/binder/assemblyidentitycache.cpp +++ b/src/coreclr/src/binder/assemblyidentitycache.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // AssemblyIdentityCache.cpp diff --git a/src/coreclr/src/binder/assemblyname.cpp b/src/coreclr/src/binder/assemblyname.cpp index 5cb9d7964c7c..b073dc66f88b 100644 --- a/src/coreclr/src/binder/assemblyname.cpp +++ b/src/coreclr/src/binder/assemblyname.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // AssemblyName.cpp diff --git a/src/coreclr/src/binder/bindertracing.cpp b/src/coreclr/src/binder/bindertracing.cpp index 5e943598585a..2e5c83d7b09b 100644 --- a/src/coreclr/src/binder/bindertracing.cpp +++ b/src/coreclr/src/binder/bindertracing.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // bindertracing.cpp diff --git a/src/coreclr/src/binder/clrprivbinderassemblyloadcontext.cpp b/src/coreclr/src/binder/clrprivbinderassemblyloadcontext.cpp index 8c1ae4060a61..f492adfab28b 100644 --- a/src/coreclr/src/binder/clrprivbinderassemblyloadcontext.cpp +++ b/src/coreclr/src/binder/clrprivbinderassemblyloadcontext.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "assemblybinder.hpp" diff --git a/src/coreclr/src/binder/clrprivbindercoreclr.cpp b/src/coreclr/src/binder/clrprivbindercoreclr.cpp index 62d5f867beea..1045cb93e76d 100644 --- a/src/coreclr/src/binder/clrprivbindercoreclr.cpp +++ b/src/coreclr/src/binder/clrprivbindercoreclr.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "assemblybinder.hpp" diff --git a/src/coreclr/src/binder/coreclrbindercommon.cpp b/src/coreclr/src/binder/coreclrbindercommon.cpp index e415b9067bb3..13ae1e52a577 100644 --- a/src/coreclr/src/binder/coreclrbindercommon.cpp +++ b/src/coreclr/src/binder/coreclrbindercommon.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" diff --git a/src/coreclr/src/binder/failurecache.cpp b/src/coreclr/src/binder/failurecache.cpp index 7e2bfb6ef087..c6e1f286fbb7 100644 --- a/src/coreclr/src/binder/failurecache.cpp +++ b/src/coreclr/src/binder/failurecache.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // FailureCache.cpp diff --git a/src/coreclr/src/binder/fusionassemblyname.cpp b/src/coreclr/src/binder/fusionassemblyname.cpp index 270c69642f9c..6da1cc3a3b2b 100644 --- a/src/coreclr/src/binder/fusionassemblyname.cpp +++ b/src/coreclr/src/binder/fusionassemblyname.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // FusionAssemblyName.cpp @@ -22,11 +21,6 @@ #include "assemblyidentity.hpp" #include "textualidentityparser.hpp" -#define DISPLAY_NAME_DELIMITER W(',') -#define DISPLAY_NAME_DELIMITER_STRING W(",") -#define VERSION_STRING_SEGMENTS 4 -#define REMAINING_BUFFER_SIZE ((*pccDisplayName) - (pszBuf - szDisplayName)) - // --------------------------------------------------------------------------- // CPropertyArray ctor // --------------------------------------------------------------------------- @@ -275,25 +269,6 @@ CAssemblyName::GetProperty(DWORD PropertyId, return hr; } -// --------------------------------------------------------------------------- -// CAssemblyName::GetName -// --------------------------------------------------------------------------- -STDMETHODIMP -CAssemblyName::GetName( - __inout LPDWORD lpcwBuffer, - __out_ecount_opt(*lpcwBuffer) LPOLESTR pwzBuffer) -{ - HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - - DWORD cbBuffer = *lpcwBuffer * sizeof(TCHAR); - hr = GetProperty(ASM_NAME_NAME, pwzBuffer, &cbBuffer); - *lpcwBuffer = cbBuffer / sizeof(TCHAR); - END_ENTRYPOINT_NOTHROW; - - return hr; -} - // --------------------------------------------------------------------------- // CAssemblyName::SetPropertyInternal // --------------------------------------------------------------------------- @@ -410,17 +385,6 @@ HRESULT CAssemblyName::SetPropertyInternal(DWORD PropertyId, hr = _rProp.Set(PropertyId, pvProperty, cbProperty); exit: - if (SUCCEEDED(hr)) { - LPWSTR pwzOld; - - // Clear cache - - pwzOld = InterlockedExchangeT(&_pwzTextualIdentity, NULL); - SAFEDELETEARRAY(pwzOld); - pwzOld = InterlockedExchangeT(&_pwzTextualIdentityILFull, NULL); - SAFEDELETEARRAY(pwzOld); - } - // Free memory allocated by crypto wrapper. if (pbSN) { StrongNameFreeBuffer(pbSN); @@ -437,8 +401,7 @@ HRESULT CAssemblyName::SetPropertyInternal(DWORD PropertyId, STDAPI CreateAssemblyNameObject( LPASSEMBLYNAME *ppAssemblyName, - LPCOLESTR szAssemblyName, - bool parseDisplayName) + LPCOLESTR szAssemblyName) { HRESULT hr = S_OK; @@ -460,15 +423,7 @@ CreateAssemblyNameObject( goto exit; } - if (parseDisplayName) - { - hr = pName->Parse((LPWSTR)szAssemblyName); - } - else - { - hr = pName->SetName(szAssemblyName); - } - + hr = pName->Parse((LPWSTR)szAssemblyName); if (FAILED(hr)) { SAFERELEASE(pName); @@ -491,31 +446,6 @@ CAssemblyName::CAssemblyName() _fPublicKeyToken = FALSE; _fCustom = TRUE; _cRef = 1; - _pwzPathModifier = NULL; - _pwzTextualIdentity = NULL; - _pwzTextualIdentityILFull = NULL; -} - -// --------------------------------------------------------------------------- -// CAssemblyName destructor -// --------------------------------------------------------------------------- -CAssemblyName::~CAssemblyName() -{ - SAFEDELETEARRAY(_pwzPathModifier); - SAFEDELETEARRAY(_pwzTextualIdentity); - SAFEDELETEARRAY(_pwzTextualIdentityILFull); -} - -// --------------------------------------------------------------------------- -// CAssemblyName::SetName -// --------------------------------------------------------------------------- -HRESULT CAssemblyName::SetName(LPCTSTR pszAssemblyName) -{ - if (pszAssemblyName == nullptr) - return E_INVALIDARG; - - return SetProperty(ASM_NAME_NAME, (LPTSTR) pszAssemblyName, - (DWORD)((wcslen(pszAssemblyName)+1) * sizeof(TCHAR))); } // --------------------------------------------------------------------------- @@ -681,35 +611,6 @@ namespace fusion dwProperty == ASM_NAME_NULL_PUBLIC_KEY || dwProperty == ASM_NAME_NULL_CUSTOM; } - - HRESULT ConvertToUtf8(PCWSTR wzStr, __deref_out UTF8** pszStr) - { - HRESULT hr = S_OK; - - _ASSERTE(wzStr != nullptr && pszStr != nullptr); - if (wzStr == nullptr || pszStr == nullptr) - { - return E_INVALIDARG; - } - - DWORD cbSize = WszWideCharToMultiByte(CP_UTF8, 0, wzStr, -1, NULL, 0, NULL, NULL); - if(cbSize == 0) - { - return SUCCEEDED(hr = HRESULT_FROM_GetLastError()) ? E_UNEXPECTED : hr; - } - - NewArrayHolder szStr = new (nothrow) UTF8[cbSize]; - IfNullRet(szStr); - - cbSize = WszWideCharToMultiByte(CP_UTF8, 0, wzStr, -1, static_cast(szStr), cbSize, NULL, NULL); - if(cbSize == 0) - { - return SUCCEEDED(hr = HRESULT_FROM_GetLastError()) ? E_UNEXPECTED : hr; - } - - *pszStr = szStr.Extract(); - return S_OK; - } } // Non-allocating helper. @@ -808,48 +709,6 @@ namespace fusion return hr; } - - HRESULT GetProperty(IAssemblyName * pName, DWORD dwProperty, __deref_out WCHAR ** pwzVal) - { - LIMITED_METHOD_CONTRACT; - HRESULT hr = S_OK; - - _ASSERTE(pName != nullptr && pwzVal != nullptr); - if (pName == nullptr || pwzVal == nullptr) - { - return E_INVALIDARG; - } - - DWORD cbSize = 0; - hr = pName->GetProperty(dwProperty, NULL, &cbSize); - - if (hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)) - { - NewArrayHolder wzVal = reinterpret_cast(new (nothrow) BYTE[cbSize]); - IfNullRet(wzVal); - hr = pName->GetProperty(dwProperty, reinterpret_cast(static_cast(wzVal)), &cbSize); - IfFailRet(hr); - *pwzVal = wzVal.Extract(); - } - - return hr; - } - - HRESULT GetProperty(IAssemblyName * pName, DWORD dwProperty, __deref_out UTF8 **pwzOut) - { - LIMITED_METHOD_CONTRACT; - HRESULT hr = S_OK; - - if (pwzOut == nullptr) - return E_INVALIDARG; - - SmallStackSString ssStr; - hr = GetProperty(pName, dwProperty, ssStr); - IfFailRet(hr); - hr = priv::ConvertToUtf8(ssStr, pwzOut); - IfFailRet(hr); - return hr; - } } } diff --git a/src/coreclr/src/binder/inc/activitytracker.h b/src/coreclr/src/binder/inc/activitytracker.h index 128664ce45b1..7ff8678a9f33 100644 --- a/src/coreclr/src/binder/inc/activitytracker.h +++ b/src/coreclr/src/binder/inc/activitytracker.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // activitytracker.h // diff --git a/src/coreclr/src/binder/inc/applicationcontext.hpp b/src/coreclr/src/binder/inc/applicationcontext.hpp index ba6cc42652c1..7bb3b3644416 100644 --- a/src/coreclr/src/binder/inc/applicationcontext.hpp +++ b/src/coreclr/src/binder/inc/applicationcontext.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // ApplicationContext.hpp @@ -46,8 +45,12 @@ namespace BINDER_SPACE key = e.m_wszSimpleName; return key; } - static count_t Hash(const key_t &str) { return HashiString(str); } - static BOOL Equals(const key_t &lhs, const key_t &rhs) { LIMITED_METHOD_CONTRACT; return (_wcsicmp(lhs, rhs) == 0); } + static count_t Hash(const key_t &str) + { + SString ssKey(SString::Literal, str); + return ssKey.HashCaseInsensitive(); + } + static BOOL Equals(const key_t &lhs, const key_t &rhs) { LIMITED_METHOD_CONTRACT; return (SString::_wcsicmp(lhs, rhs) == 0); } void OnDestructPerEntryCleanupAction(const SimpleNameToFileNameMapEntry & e) { diff --git a/src/coreclr/src/binder/inc/applicationcontext.inl b/src/coreclr/src/binder/inc/applicationcontext.inl index 2dc6adbf4c30..4d006d5be6bc 100644 --- a/src/coreclr/src/binder/inc/applicationcontext.inl +++ b/src/coreclr/src/binder/inc/applicationcontext.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // ApplicationContext.inl diff --git a/src/coreclr/src/binder/inc/assembly.hpp b/src/coreclr/src/binder/inc/assembly.hpp index f42cee4e6226..9ad7d4226e8b 100644 --- a/src/coreclr/src/binder/inc/assembly.hpp +++ b/src/coreclr/src/binder/inc/assembly.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // Assembly.hpp @@ -78,11 +77,6 @@ namespace BINDER_SPACE STDMETHOD(GetAvailableImageTypes)(PDWORD pdwImageTypes); - STDMETHOD(GetImageResource)( - DWORD dwImageType, - DWORD *pdwImageType, - ICLRPrivResource ** ppIResource); - STDMETHOD(GetBinderID)(UINT_PTR *pBinderId); STDMETHOD(GetLoaderAllocator)(LPVOID* pLoaderAllocator); @@ -150,18 +144,6 @@ namespace BINDER_SPACE DWORD m_dwAssemblyFlags; ICLRPrivBinder *m_pBinder; - // Nested class used to implement ICLRPriv binder related interfaces - class CLRPrivResourceAssembly : - public ICLRPrivResource, public ICLRPrivResourceAssembly - { -public: - STDMETHOD(QueryInterface)(REFIID riid, void ** ppv); - STDMETHOD_(ULONG, AddRef)(); - STDMETHOD_(ULONG, Release)(); - STDMETHOD(GetResourceType)(IID *pIID); - STDMETHOD(GetAssembly)(LPVOID *ppAssembly); - } m_clrPrivRes; - inline void SetBinder(ICLRPrivBinder *pBinder) { _ASSERTE(m_pBinder == NULL || m_pBinder == pBinder); diff --git a/src/coreclr/src/binder/inc/assembly.inl b/src/coreclr/src/binder/inc/assembly.inl index 42603cfae82e..ca0aa232e906 100644 --- a/src/coreclr/src/binder/inc/assembly.inl +++ b/src/coreclr/src/binder/inc/assembly.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // Assembly.inl diff --git a/src/coreclr/src/binder/inc/assemblybinder.hpp b/src/coreclr/src/binder/inc/assemblybinder.hpp index 5246676b1a47..6fc2f2dc4574 100644 --- a/src/coreclr/src/binder/inc/assemblybinder.hpp +++ b/src/coreclr/src/binder/inc/assemblybinder.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // AssemblyBinder.hpp diff --git a/src/coreclr/src/binder/inc/assemblyentry.hpp b/src/coreclr/src/binder/inc/assemblyentry.hpp index fdfb3bc8d14c..5a32e6f5cd97 100644 --- a/src/coreclr/src/binder/inc/assemblyentry.hpp +++ b/src/coreclr/src/binder/inc/assemblyentry.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // AssemblyEntry.hpp diff --git a/src/coreclr/src/binder/inc/assemblyhashtraits.hpp b/src/coreclr/src/binder/inc/assemblyhashtraits.hpp index b2123967f647..9c28151e1dbf 100644 --- a/src/coreclr/src/binder/inc/assemblyhashtraits.hpp +++ b/src/coreclr/src/binder/inc/assemblyhashtraits.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // AssemblyHashTraits.hpp diff --git a/src/coreclr/src/binder/inc/assemblyidentity.hpp b/src/coreclr/src/binder/inc/assemblyidentity.hpp index 05dfc4134694..e1fdec87b261 100644 --- a/src/coreclr/src/binder/inc/assemblyidentity.hpp +++ b/src/coreclr/src/binder/inc/assemblyidentity.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // AssemblyIdentity.hpp diff --git a/src/coreclr/src/binder/inc/assemblyidentitycache.hpp b/src/coreclr/src/binder/inc/assemblyidentitycache.hpp index 0cd8997f376f..bb70af109fd9 100644 --- a/src/coreclr/src/binder/inc/assemblyidentitycache.hpp +++ b/src/coreclr/src/binder/inc/assemblyidentitycache.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // AssemblyIdentityCache.hpp diff --git a/src/coreclr/src/binder/inc/assemblyname.hpp b/src/coreclr/src/binder/inc/assemblyname.hpp index 0c8c003137a9..38590e09f78a 100644 --- a/src/coreclr/src/binder/inc/assemblyname.hpp +++ b/src/coreclr/src/binder/inc/assemblyname.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // AssemblyName.hpp diff --git a/src/coreclr/src/binder/inc/assemblyname.inl b/src/coreclr/src/binder/inc/assemblyname.inl index 0352f9546187..11d5dbbe8690 100644 --- a/src/coreclr/src/binder/inc/assemblyname.inl +++ b/src/coreclr/src/binder/inc/assemblyname.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // AssemblyName.inl diff --git a/src/coreclr/src/binder/inc/assemblyversion.hpp b/src/coreclr/src/binder/inc/assemblyversion.hpp index a6be617a301f..ff8be72a11c4 100644 --- a/src/coreclr/src/binder/inc/assemblyversion.hpp +++ b/src/coreclr/src/binder/inc/assemblyversion.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // AssemblyVersion.hpp diff --git a/src/coreclr/src/binder/inc/assemblyversion.inl b/src/coreclr/src/binder/inc/assemblyversion.inl index d093808a1a05..b479c0e74fc2 100644 --- a/src/coreclr/src/binder/inc/assemblyversion.inl +++ b/src/coreclr/src/binder/inc/assemblyversion.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // AssemblyVersion.inl diff --git a/src/coreclr/src/binder/inc/bindertracing.h b/src/coreclr/src/binder/inc/bindertracing.h index 6fb5137349e0..5d82888158a3 100644 --- a/src/coreclr/src/binder/inc/bindertracing.h +++ b/src/coreclr/src/binder/inc/bindertracing.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // bindertracing.h // diff --git a/src/coreclr/src/binder/inc/bindertypes.hpp b/src/coreclr/src/binder/inc/bindertypes.hpp index 213b128af223..08159ebc8404 100644 --- a/src/coreclr/src/binder/inc/bindertypes.hpp +++ b/src/coreclr/src/binder/inc/bindertypes.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // BinderTypes.hpp diff --git a/src/coreclr/src/binder/inc/bindresult.hpp b/src/coreclr/src/binder/inc/bindresult.hpp index 69a26e0226bd..b305c525c3b3 100644 --- a/src/coreclr/src/binder/inc/bindresult.hpp +++ b/src/coreclr/src/binder/inc/bindresult.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // BindResult.hpp diff --git a/src/coreclr/src/binder/inc/bindresult.inl b/src/coreclr/src/binder/inc/bindresult.inl index 5e085e49697f..183c7807a489 100644 --- a/src/coreclr/src/binder/inc/bindresult.inl +++ b/src/coreclr/src/binder/inc/bindresult.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // BindResult.inl diff --git a/src/coreclr/src/binder/inc/clrprivbinderassemblyloadcontext.h b/src/coreclr/src/binder/inc/clrprivbinderassemblyloadcontext.h index 546779e3f435..3c1c40623020 100644 --- a/src/coreclr/src/binder/inc/clrprivbinderassemblyloadcontext.h +++ b/src/coreclr/src/binder/inc/clrprivbinderassemblyloadcontext.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __CLRPRIVBINDERASSEMBLYLOADCONTEXT_H__ @@ -59,11 +58,6 @@ class CLRPrivBinderAssemblyLoadContext : public AssemblyLoadContext return &m_appContext; } - inline INT_PTR GetManagedAssemblyLoadContext() - { - return m_ptrManagedAssemblyLoadContext; - } - HRESULT BindUsingPEImage( /* in */ PEImage *pPEImage, /* in */ BOOL fIsNativeImage, /* [retval][out] */ ICLRPrivAssembly **ppAssembly); @@ -78,8 +72,6 @@ class CLRPrivBinderAssemblyLoadContext : public AssemblyLoadContext CLRPrivBinderCoreCLR *m_pTPABinder; - // A long weak GC handle to the managed AssemblyLoadContext - INT_PTR m_ptrManagedAssemblyLoadContext; // A strong GC handle to the managed AssemblyLoadContext. This handle is set when the unload of the AssemblyLoadContext is initiated // to keep the managed AssemblyLoadContext alive until the unload is finished. // We still keep the weak handle pointing to the same managed AssemblyLoadContext so that native code can use the handle above diff --git a/src/coreclr/src/binder/inc/clrprivbindercoreclr.h b/src/coreclr/src/binder/inc/clrprivbindercoreclr.h index 3779e5bd63a2..bf11bcf113f9 100644 --- a/src/coreclr/src/binder/inc/clrprivbindercoreclr.h +++ b/src/coreclr/src/binder/inc/clrprivbindercoreclr.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __CLR_PRIV_BINDER_CORECLR_H__ @@ -59,23 +58,11 @@ class CLRPrivBinderCoreCLR : public AssemblyLoadContext BINDER_SPACE::Assembly **ppCoreCLRFoundAssembly, bool excludeAppPaths); - INT_PTR GetManagedAssemblyLoadContext() - { - return m_ptrManagedAssemblyLoadContext; - } - - void SetManagedAssemblyLoadContext(INT_PTR ptrManagedTPABinderInstance) - { - m_ptrManagedAssemblyLoadContext = ptrManagedTPABinderInstance; - } - //========================================================================= // Internal implementation details //------------------------------------------------------------------------- private: BINDER_SPACE::ApplicationContext m_appContext; - - INT_PTR m_ptrManagedAssemblyLoadContext; }; #endif // __CLR_PRIV_BINDER_CORECLR_H__ diff --git a/src/coreclr/src/binder/inc/contextentry.hpp b/src/coreclr/src/binder/inc/contextentry.hpp index 1e38ce5b4d2e..ff3c8dba83c7 100644 --- a/src/coreclr/src/binder/inc/contextentry.hpp +++ b/src/coreclr/src/binder/inc/contextentry.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // ContextEntry.hpp diff --git a/src/coreclr/src/binder/inc/coreclrbindercommon.h b/src/coreclr/src/binder/inc/coreclrbindercommon.h index 9ac86add24ac..4fe3249363b6 100644 --- a/src/coreclr/src/binder/inc/coreclrbindercommon.h +++ b/src/coreclr/src/binder/inc/coreclrbindercommon.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __CORECLR_BINDER_COMMON_H__ diff --git a/src/coreclr/src/binder/inc/failurecache.hpp b/src/coreclr/src/binder/inc/failurecache.hpp index 3dbc3f611ef8..bce67b33c50c 100644 --- a/src/coreclr/src/binder/inc/failurecache.hpp +++ b/src/coreclr/src/binder/inc/failurecache.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // FailureCache.hpp diff --git a/src/coreclr/src/binder/inc/failurecachehashtraits.hpp b/src/coreclr/src/binder/inc/failurecachehashtraits.hpp index 4482801889d2..0d9ad26156d1 100644 --- a/src/coreclr/src/binder/inc/failurecachehashtraits.hpp +++ b/src/coreclr/src/binder/inc/failurecachehashtraits.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // FailureCache.hpp diff --git a/src/coreclr/src/binder/inc/fusionassemblyname.hpp b/src/coreclr/src/binder/inc/fusionassemblyname.hpp index 3c2f238d6063..d5676c7c1c6f 100644 --- a/src/coreclr/src/binder/inc/fusionassemblyname.hpp +++ b/src/coreclr/src/binder/inc/fusionassemblyname.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // FusionAssemblyName.hpp @@ -39,7 +38,7 @@ class CPropertyArray inline FusionProperty operator [] (DWORD dwPropId); }; -class CAssemblyName : public IAssemblyName +class CAssemblyName final : public IAssemblyName { private: DWORD _dwSig; @@ -47,9 +46,6 @@ class CAssemblyName : public IAssemblyName CPropertyArray _rProp; BOOL _fPublicKeyToken; BOOL _fCustom; - LPWSTR _pwzPathModifier; - LPWSTR _pwzTextualIdentity; - LPWSTR _pwzTextualIdentityILFull; public: // IUnknown methods @@ -68,26 +64,19 @@ class CAssemblyName : public IAssemblyName /* out */ LPVOID pvProperty, /* in out */ LPDWORD pcbProperty); - STDMETHOD(GetName)( - __inout LPDWORD lpcwBuffer, - __out_ecount_opt(*lpcwBuffer) LPOLESTR pwzBuffer); - HRESULT SetPropertyInternal(/* in */ DWORD PropertyId, /* in */ LPCVOID pvProperty, /* in */ DWORD cbProperty); CAssemblyName(); - virtual ~CAssemblyName(); - HRESULT SetName(LPCTSTR pszAssemblyName); HRESULT Parse(LPCWSTR szDisplayName); }; STDAPI CreateAssemblyNameObject( LPASSEMBLYNAME *ppAssemblyName, - LPCOLESTR szAssemblyName, - bool parseDisplayName); + LPCOLESTR szAssemblyName); namespace fusion { @@ -113,33 +102,6 @@ namespace fusion // Returns S_FALSE if the property has not been set. HRESULT GetProperty(IAssemblyName * pName, DWORD dwProperty, SString & ssVal); - // Returns an allocated buffer with the contents of the property. - // - // Returns S_FALSE if the property has not been set. - HRESULT GetProperty(IAssemblyName * pName, DWORD dwProperty, __deref_out LPWSTR * pwzVal); - - inline HRESULT GetProperty(IAssemblyName * pName, DWORD dwProperty, LPCWSTR *pwzOut) - { return GetProperty(pName, dwProperty, const_cast(pwzOut)); } - - // Returns an allocated buffer with the contents of the property. - // - // Returns S_FALSE if the property has not been set. - HRESULT GetProperty(IAssemblyName * pName, DWORD dwProperty, __deref_out LPSTR *pwzOut); - - inline HRESULT GetProperty(IAssemblyName * pName, DWORD dwProperty, LPCSTR *pwzOut) - { return GetProperty(pName, dwProperty, const_cast(pwzOut)); } - - template inline - typename std::enable_if::type >::value, HRESULT>::type - GetProperty(IAssemblyName * pName, DWORD dwProperty, T * pVal) - { - DWORD cbBuf = sizeof(T); - HRESULT hr = GetProperty(pName, dwProperty, pVal, &cbBuf); - if (hr == S_OK && cbBuf != sizeof(T)) - hr = E_UNEXPECTED; - return hr; - } - inline HRESULT GetSimpleName(IAssemblyName * pName, SString & ssName) { return GetProperty(pName, ASM_NAME_NAME, ssName); } } // namespace fusion.util diff --git a/src/coreclr/src/binder/inc/fusionhelpers.hpp b/src/coreclr/src/binder/inc/fusionhelpers.hpp index 01e4384b8605..e3e31af84067 100644 --- a/src/coreclr/src/binder/inc/fusionhelpers.hpp +++ b/src/coreclr/src/binder/inc/fusionhelpers.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // FusionHelpers.hpp diff --git a/src/coreclr/src/binder/inc/loadcontext.hpp b/src/coreclr/src/binder/inc/loadcontext.hpp index 8a7090a5c73d..e840a405df0d 100644 --- a/src/coreclr/src/binder/inc/loadcontext.hpp +++ b/src/coreclr/src/binder/inc/loadcontext.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // LoadContext.hpp diff --git a/src/coreclr/src/binder/inc/loadcontext.inl b/src/coreclr/src/binder/inc/loadcontext.inl index fcde1df68075..fb463523ebb0 100644 --- a/src/coreclr/src/binder/inc/loadcontext.inl +++ b/src/coreclr/src/binder/inc/loadcontext.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // LoadContext.inl diff --git a/src/coreclr/src/binder/inc/stringlexer.hpp b/src/coreclr/src/binder/inc/stringlexer.hpp index e0fa24e1d6c3..41af7e7baa18 100644 --- a/src/coreclr/src/binder/inc/stringlexer.hpp +++ b/src/coreclr/src/binder/inc/stringlexer.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // StringLexer.hpp diff --git a/src/coreclr/src/binder/inc/stringlexer.inl b/src/coreclr/src/binder/inc/stringlexer.inl index 54703e99e90b..bfe4bddeaa4c 100644 --- a/src/coreclr/src/binder/inc/stringlexer.inl +++ b/src/coreclr/src/binder/inc/stringlexer.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // StringLexer.inl diff --git a/src/coreclr/src/binder/inc/textualidentityparser.hpp b/src/coreclr/src/binder/inc/textualidentityparser.hpp index aacaec31fd5f..a5187d254a65 100644 --- a/src/coreclr/src/binder/inc/textualidentityparser.hpp +++ b/src/coreclr/src/binder/inc/textualidentityparser.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // TextualIdentityParser.hpp diff --git a/src/coreclr/src/binder/inc/utils.hpp b/src/coreclr/src/binder/inc/utils.hpp index e6e72cf9aa79..6108d3aea22c 100644 --- a/src/coreclr/src/binder/inc/utils.hpp +++ b/src/coreclr/src/binder/inc/utils.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // Utils.hpp diff --git a/src/coreclr/src/binder/inc/variables.hpp b/src/coreclr/src/binder/inc/variables.hpp index 7208d6dc4a44..50f392d0366e 100644 --- a/src/coreclr/src/binder/inc/variables.hpp +++ b/src/coreclr/src/binder/inc/variables.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // Variables.hpp diff --git a/src/coreclr/src/binder/stringlexer.cpp b/src/coreclr/src/binder/stringlexer.cpp index 1bbe62b6dcf7..b6b722fa77ab 100644 --- a/src/coreclr/src/binder/stringlexer.cpp +++ b/src/coreclr/src/binder/stringlexer.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // StringLexer.cpp diff --git a/src/coreclr/src/binder/textualidentityparser.cpp b/src/coreclr/src/binder/textualidentityparser.cpp index 3863f105271a..939ffe9f468c 100644 --- a/src/coreclr/src/binder/textualidentityparser.cpp +++ b/src/coreclr/src/binder/textualidentityparser.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // TextualIdentityParser.cpp diff --git a/src/coreclr/src/binder/utils.cpp b/src/coreclr/src/binder/utils.cpp index 953da35d8ffa..c98d7f71bf83 100644 --- a/src/coreclr/src/binder/utils.cpp +++ b/src/coreclr/src/binder/utils.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // Utils.cpp diff --git a/src/coreclr/src/binder/variables.cpp b/src/coreclr/src/binder/variables.cpp index 6d07b5991d7c..d9c3f672657d 100644 --- a/src/coreclr/src/binder/variables.cpp +++ b/src/coreclr/src/binder/variables.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // Variables.cpp diff --git a/src/coreclr/src/classlibnative/bcltype/CMakeLists.txt b/src/coreclr/src/classlibnative/bcltype/CMakeLists.txt index 391f70eff438..c3122ec12ec3 100644 --- a/src/coreclr/src/classlibnative/bcltype/CMakeLists.txt +++ b/src/coreclr/src/classlibnative/bcltype/CMakeLists.txt @@ -11,7 +11,7 @@ set(BCLTYPE_SOURCES ) add_library_clr(bcltype - STATIC + OBJECT ${BCLTYPE_SOURCES} ) diff --git a/src/coreclr/src/classlibnative/bcltype/arraynative.cpp b/src/coreclr/src/classlibnative/bcltype/arraynative.cpp index 917908cedd2f..50e652b5b66e 100644 --- a/src/coreclr/src/classlibnative/bcltype/arraynative.cpp +++ b/src/coreclr/src/classlibnative/bcltype/arraynative.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: ArrayNative.cpp // diff --git a/src/coreclr/src/classlibnative/bcltype/arraynative.h b/src/coreclr/src/classlibnative/bcltype/arraynative.h index 0056d96f3aa3..c5be8403a8ef 100644 --- a/src/coreclr/src/classlibnative/bcltype/arraynative.h +++ b/src/coreclr/src/classlibnative/bcltype/arraynative.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: ArrayNative.h // diff --git a/src/coreclr/src/classlibnative/bcltype/arraynative.inl b/src/coreclr/src/classlibnative/bcltype/arraynative.inl index 516eb9235f0d..913b8c64939b 100644 --- a/src/coreclr/src/classlibnative/bcltype/arraynative.inl +++ b/src/coreclr/src/classlibnative/bcltype/arraynative.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: ArrayNative.cpp // diff --git a/src/coreclr/src/classlibnative/bcltype/oavariant.cpp b/src/coreclr/src/classlibnative/bcltype/oavariant.cpp index c9fec9193b3c..fd8a29488207 100644 --- a/src/coreclr/src/classlibnative/bcltype/oavariant.cpp +++ b/src/coreclr/src/classlibnative/bcltype/oavariant.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: OAVariant.cpp // diff --git a/src/coreclr/src/classlibnative/bcltype/oavariant.h b/src/coreclr/src/classlibnative/bcltype/oavariant.h index 30f7cb1958b5..de09ae7f8731 100644 --- a/src/coreclr/src/classlibnative/bcltype/oavariant.h +++ b/src/coreclr/src/classlibnative/bcltype/oavariant.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: OAVariant.h // diff --git a/src/coreclr/src/classlibnative/bcltype/objectnative.cpp b/src/coreclr/src/classlibnative/bcltype/objectnative.cpp index e285eeb69ecf..efa76170bada 100644 --- a/src/coreclr/src/classlibnative/bcltype/objectnative.cpp +++ b/src/coreclr/src/classlibnative/bcltype/objectnative.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: ObjectNative.cpp // diff --git a/src/coreclr/src/classlibnative/bcltype/objectnative.h b/src/coreclr/src/classlibnative/bcltype/objectnative.h index 0762298b5832..4091f2faa8fd 100644 --- a/src/coreclr/src/classlibnative/bcltype/objectnative.h +++ b/src/coreclr/src/classlibnative/bcltype/objectnative.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: ObjectNative.h // diff --git a/src/coreclr/src/classlibnative/bcltype/stringnative.cpp b/src/coreclr/src/classlibnative/bcltype/stringnative.cpp index 9e093d43a497..0c3ec4f8dc7e 100644 --- a/src/coreclr/src/classlibnative/bcltype/stringnative.cpp +++ b/src/coreclr/src/classlibnative/bcltype/stringnative.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: StringNative.cpp // diff --git a/src/coreclr/src/classlibnative/bcltype/stringnative.h b/src/coreclr/src/classlibnative/bcltype/stringnative.h index c8e1fcecc9f3..1396564aef9d 100644 --- a/src/coreclr/src/classlibnative/bcltype/stringnative.h +++ b/src/coreclr/src/classlibnative/bcltype/stringnative.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: StringNative.h // diff --git a/src/coreclr/src/classlibnative/bcltype/system.cpp b/src/coreclr/src/classlibnative/bcltype/system.cpp index 631a61d9462b..c037236f6959 100644 --- a/src/coreclr/src/classlibnative/bcltype/system.cpp +++ b/src/coreclr/src/classlibnative/bcltype/system.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: System.cpp // diff --git a/src/coreclr/src/classlibnative/bcltype/system.h b/src/coreclr/src/classlibnative/bcltype/system.h index d2132e22109f..20d357c17302 100644 --- a/src/coreclr/src/classlibnative/bcltype/system.h +++ b/src/coreclr/src/classlibnative/bcltype/system.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: System.h // diff --git a/src/coreclr/src/classlibnative/bcltype/varargsnative.cpp b/src/coreclr/src/classlibnative/bcltype/varargsnative.cpp index 23ba5e7ec901..fb2c1aefe3c7 100644 --- a/src/coreclr/src/classlibnative/bcltype/varargsnative.cpp +++ b/src/coreclr/src/classlibnative/bcltype/varargsnative.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: VarArgsNative.cpp // diff --git a/src/coreclr/src/classlibnative/bcltype/varargsnative.h b/src/coreclr/src/classlibnative/bcltype/varargsnative.h index c46e3dffaa8f..b36920150356 100644 --- a/src/coreclr/src/classlibnative/bcltype/varargsnative.h +++ b/src/coreclr/src/classlibnative/bcltype/varargsnative.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: VarArgsNative.h // diff --git a/src/coreclr/src/classlibnative/bcltype/variant.cpp b/src/coreclr/src/classlibnative/bcltype/variant.cpp index f0f1875d50bc..a269644d7970 100644 --- a/src/coreclr/src/classlibnative/bcltype/variant.cpp +++ b/src/coreclr/src/classlibnative/bcltype/variant.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: Variant.cpp // diff --git a/src/coreclr/src/classlibnative/bcltype/variant.h b/src/coreclr/src/classlibnative/bcltype/variant.h index 6ec0fe404333..aae0a5f9741a 100644 --- a/src/coreclr/src/classlibnative/bcltype/variant.h +++ b/src/coreclr/src/classlibnative/bcltype/variant.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: Variant.h // diff --git a/src/coreclr/src/classlibnative/float/CMakeLists.txt b/src/coreclr/src/classlibnative/float/CMakeLists.txt index 44d40c925921..2345ad0b9135 100644 --- a/src/coreclr/src/classlibnative/float/CMakeLists.txt +++ b/src/coreclr/src/classlibnative/float/CMakeLists.txt @@ -8,7 +8,7 @@ set(FLOAT_SOURCES ) add_library_clr(comfloat_wks - STATIC + OBJECT ${FLOAT_SOURCES} ) diff --git a/src/coreclr/src/classlibnative/float/floatdouble.cpp b/src/coreclr/src/classlibnative/float/floatdouble.cpp index cd38648bab4c..d3ef36c66a61 100644 --- a/src/coreclr/src/classlibnative/float/floatdouble.cpp +++ b/src/coreclr/src/classlibnative/float/floatdouble.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: FloatDouble.cpp // diff --git a/src/coreclr/src/classlibnative/float/floatsingle.cpp b/src/coreclr/src/classlibnative/float/floatsingle.cpp index f6c949f03f36..781badfc1f8a 100644 --- a/src/coreclr/src/classlibnative/float/floatsingle.cpp +++ b/src/coreclr/src/classlibnative/float/floatsingle.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: FloatSingle.cpp // diff --git a/src/coreclr/src/classlibnative/inc/floatdouble.h b/src/coreclr/src/classlibnative/inc/floatdouble.h index 40d5e2ee8a3f..eb430409b6fa 100644 --- a/src/coreclr/src/classlibnative/inc/floatdouble.h +++ b/src/coreclr/src/classlibnative/inc/floatdouble.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _FLOATDOUBLE_H_ #define _FLOATDOUBLE_H_ diff --git a/src/coreclr/src/classlibnative/inc/floatsingle.h b/src/coreclr/src/classlibnative/inc/floatsingle.h index b23aea3ee7eb..2658cb08edd8 100644 --- a/src/coreclr/src/classlibnative/inc/floatsingle.h +++ b/src/coreclr/src/classlibnative/inc/floatsingle.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _FLOATSINGLE_H_ #define _FLOATSINGLE_H_ diff --git a/src/coreclr/src/classlibnative/inc/nls.h b/src/coreclr/src/classlibnative/inc/nls.h index 872573982bec..b453aa843fc3 100644 --- a/src/coreclr/src/classlibnative/inc/nls.h +++ b/src/coreclr/src/classlibnative/inc/nls.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //////////////////////////////////////////////////////////////////////////// // // Module: NLS diff --git a/src/coreclr/src/debug/createdump/config.h.in b/src/coreclr/src/debug/createdump/config.h.in index 368627bbe50f..ee8701be0cf9 100644 --- a/src/coreclr/src/debug/createdump/config.h.in +++ b/src/coreclr/src/debug/createdump/config.h.in @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma once diff --git a/src/coreclr/src/debug/createdump/crashinfo.cpp b/src/coreclr/src/debug/createdump/crashinfo.cpp index f69d928912db..612fafb7c34e 100644 --- a/src/coreclr/src/debug/createdump/crashinfo.cpp +++ b/src/coreclr/src/debug/createdump/crashinfo.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "createdump.h" @@ -194,6 +193,8 @@ CrashInfo::EnumerateMemoryRegionsWithDAC(MINIDUMP_TYPE minidumpType) if (!m_coreclrPath.empty()) { + TRACE("EnumerateMemoryRegionsWithDAC: Memory enumeration STARTED\n"); + // We assume that the DAC is in the same location as the libcoreclr.so module std::string dacPath; dacPath.append(m_coreclrPath); @@ -234,6 +235,7 @@ CrashInfo::EnumerateMemoryRegionsWithDAC(MINIDUMP_TYPE minidumpType) fprintf(stderr, "CLRDataCreateInstance(IXCLRDataProcess) FAILED %08x\n", hr); goto exit; } + TRACE("EnumerateMemoryRegionsWithDAC: Memory enumeration FINISHED\n"); if (!EnumerateManagedModules(pClrDataProcess)) { goto exit; @@ -541,8 +543,8 @@ CrashInfo::ValidRegion(const MemoryRegion& region) void CrashInfo::CombineMemoryRegions() { + TRACE("CombineMemoryRegions: STARTED\n"); assert(!m_memoryRegions.empty()); - std::set memoryRegionsNew; // MEMORY_REGION_FLAG_SHARED and MEMORY_REGION_FLAG_PRIVATE are internal flags that @@ -578,6 +580,8 @@ CrashInfo::CombineMemoryRegions() m_memoryRegions = memoryRegionsNew; + TRACE("CombineMemoryRegions: FINISHED\n"); + if (g_diagnostics) { TRACE("Memory Regions:\n"); @@ -609,9 +613,10 @@ void CrashInfo::Trace(const char* format, ...) { if (g_diagnostics) { - va_list ap; - va_start(ap, format); - vprintf(format, ap); - va_end(ap); + va_list args; + va_start(args, format); + vfprintf(stdout, format, args); + fflush(stdout); + va_end(args); } } diff --git a/src/coreclr/src/debug/createdump/crashinfo.h b/src/coreclr/src/debug/createdump/crashinfo.h index 23a72fa3dd54..9bdf63be49e7 100644 --- a/src/coreclr/src/debug/createdump/crashinfo.h +++ b/src/coreclr/src/debug/createdump/crashinfo.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifdef __APPLE__ #include "../dbgutil/machoreader.h" diff --git a/src/coreclr/src/debug/createdump/crashinfomac.cpp b/src/coreclr/src/debug/createdump/crashinfomac.cpp index 63871412d99d..033f98d29037 100644 --- a/src/coreclr/src/debug/createdump/crashinfomac.cpp +++ b/src/coreclr/src/debug/createdump/crashinfomac.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "createdump.h" @@ -31,6 +30,45 @@ CrashInfo::CleanupAndResumeProcess() } } +static +kern_return_t +SuspendMachThread(thread_act_t thread, int tid) +{ + kern_return_t result; + + while (true) + { + result = thread_suspend(thread); + if (result != KERN_SUCCESS) + { + fprintf(stderr, "thread_suspend(%d) FAILED %x %s\n", tid, result, mach_error_string(result)); + break; + } + + // Ensure that if the thread was running in the kernel, the kernel operation + // is safely aborted so that it can be restarted later. + result = thread_abort_safely(thread); + if (result == KERN_SUCCESS) + { + break; + } + else + { + TRACE("thread_abort_safely(%d) FAILED %x %s\n", tid, result, mach_error_string(result)); + } + // The thread was running in the kernel executing a non-atomic operation + // that cannot be restarted, so we need to resume the thread and retry + result = thread_resume(thread); + if (result != KERN_SUCCESS) + { + fprintf(stderr, "thread_resume(%d) FAILED %x %s\n", tid, result, mach_error_string(result)); + break; + } + } + + return result; +} + // // Suspends all the threads and creating a list of them. Should be the before gathering any info about the process. // @@ -64,10 +102,9 @@ CrashInfo::EnumerateAndSuspendThreads() tid = tident.thread_id; } - result = ::thread_suspend(threadList[i]); + result = SuspendMachThread(threadList[i], tid); if (result != KERN_SUCCESS) { - fprintf(stderr, "thread_suspend(%d) FAILED %x %s\n", tid, result, mach_error_string(result)); return false; } // Add to the list of threads @@ -78,7 +115,8 @@ CrashInfo::EnumerateAndSuspendThreads() return true; } -uint32_t ConvertProtectionFlags(vm_prot_t prot) +uint32_t +ConvertProtectionFlags(vm_prot_t prot) { uint32_t regionFlags = 0; if (prot & VM_PROT_READ) { diff --git a/src/coreclr/src/debug/createdump/crashinfounix.cpp b/src/coreclr/src/debug/createdump/crashinfounix.cpp index 9cc0dc35be30..4c72cc78739f 100644 --- a/src/coreclr/src/debug/createdump/crashinfounix.cpp +++ b/src/coreclr/src/debug/createdump/crashinfounix.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "createdump.h" diff --git a/src/coreclr/src/debug/createdump/createdump.h b/src/coreclr/src/debug/createdump/createdump.h index 176952c12dd5..234cf09033fb 100644 --- a/src/coreclr/src/debug/createdump/createdump.h +++ b/src/coreclr/src/debug/createdump/createdump.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma once @@ -11,13 +10,11 @@ #define _countof(x) (sizeof(x)/sizeof(x[0])) #endif +extern void trace_printf(const char* format, ...); extern bool g_diagnostics; #ifdef HOST_UNIX -#define TRACE(args...) \ - if (g_diagnostics) { \ - printf(args); \ - } +#define TRACE(args...) trace_printf(args) #define TRACE_VERBOSE(args...) #else #define TRACE(args, ...) diff --git a/src/coreclr/src/debug/createdump/createdump.rc b/src/coreclr/src/debug/createdump/createdump.rc index f5319668e339..57cd32e7b64c 100644 --- a/src/coreclr/src/debug/createdump/createdump.rc +++ b/src/coreclr/src/debug/createdump/createdump.rc @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #define FX_VER_FILEDESCRIPTION_STR "Microsoft .NET Runtime Crash Dump Generator\0" diff --git a/src/coreclr/src/debug/createdump/createdumpunix.cpp b/src/coreclr/src/debug/createdump/createdumpunix.cpp index ac0ff0fe4259..156b58da6a46 100644 --- a/src/coreclr/src/debug/createdump/createdumpunix.cpp +++ b/src/coreclr/src/debug/createdump/createdumpunix.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "createdump.h" @@ -19,6 +18,8 @@ CreateDump(const char* dumpPath, int pid, MINIDUMP_TYPE minidumpType) { goto exit; } + printf("Process %d %s\n", crashInfo->Pid(), crashInfo->Name().c_str()); + // Suspend all the threads in the target process and build the list of threads if (!crashInfo->EnumerateAndSuspendThreads()) { diff --git a/src/coreclr/src/debug/createdump/createdumpwindows.cpp b/src/coreclr/src/debug/createdump/createdumpwindows.cpp index f468cfdadba1..51c6dbe87a91 100644 --- a/src/coreclr/src/debug/createdump/createdumpwindows.cpp +++ b/src/coreclr/src/debug/createdump/createdumpwindows.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "createdump.h" diff --git a/src/coreclr/src/debug/createdump/datatarget.cpp b/src/coreclr/src/debug/createdump/datatarget.cpp index c6784ba6b3e4..9051426c6f6c 100644 --- a/src/coreclr/src/debug/createdump/datatarget.cpp +++ b/src/coreclr/src/debug/createdump/datatarget.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "createdump.h" diff --git a/src/coreclr/src/debug/createdump/datatarget.h b/src/coreclr/src/debug/createdump/datatarget.h index 5753d8bb6d79..954ff5328b4e 100644 --- a/src/coreclr/src/debug/createdump/datatarget.h +++ b/src/coreclr/src/debug/createdump/datatarget.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. class CrashInfo; diff --git a/src/coreclr/src/debug/createdump/dumpwriter.cpp b/src/coreclr/src/debug/createdump/dumpwriter.cpp index 574c28857185..677a8b07118a 100644 --- a/src/coreclr/src/debug/createdump/dumpwriter.cpp +++ b/src/coreclr/src/debug/createdump/dumpwriter.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "createdump.h" @@ -218,6 +217,12 @@ DumpWriter::WriteDump() return false; } + // This can happen if the target process dies before createdump is finished + if (read == 0) { + TRACE("ReadProcessMemory(%" PRIA PRIx64 ", %08x) return 0 bytes read\n", address, bytesToRead); + break; + } + if (!WriteData(m_tempBuffer, read)) { return false; } diff --git a/src/coreclr/src/debug/createdump/dumpwriter.h b/src/coreclr/src/debug/createdump/dumpwriter.h index f3c5c0ada5e4..4bd885cefa83 100644 --- a/src/coreclr/src/debug/createdump/dumpwriter.h +++ b/src/coreclr/src/debug/createdump/dumpwriter.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifdef HOST_64BIT #define ELF_CLASS ELFCLASS64 diff --git a/src/coreclr/src/debug/createdump/mac.h b/src/coreclr/src/debug/createdump/mac.h index c83e04acca78..16b198e93551 100644 --- a/src/coreclr/src/debug/createdump/mac.h +++ b/src/coreclr/src/debug/createdump/mac.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include #include diff --git a/src/coreclr/src/debug/createdump/main.cpp b/src/coreclr/src/debug/createdump/main.cpp index 037ab5baf3a6..626175c2903c 100644 --- a/src/coreclr/src/debug/createdump/main.cpp +++ b/src/coreclr/src/debug/createdump/main.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "createdump.h" @@ -151,6 +150,8 @@ int __cdecl main(const int argc, const char* argv[]) { exitCode = -1; } + fflush(stdout); + fflush(stderr); } else { @@ -163,3 +164,17 @@ int __cdecl main(const int argc, const char* argv[]) #endif return exitCode; } + +void +trace_printf(const char* format, ...) +{ + if (g_diagnostics) + { + va_list args; + va_start(args, format); + vfprintf(stdout, format, args); + fflush(stdout); + va_end(args); + } +} + diff --git a/src/coreclr/src/debug/createdump/memoryregion.h b/src/coreclr/src/debug/createdump/memoryregion.h index 2697489c015f..c3085108ac7c 100644 --- a/src/coreclr/src/debug/createdump/memoryregion.h +++ b/src/coreclr/src/debug/createdump/memoryregion.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #if defined(__arm__) || defined(__aarch64__) #define PAGE_SIZE sysconf(_SC_PAGESIZE) diff --git a/src/coreclr/src/debug/createdump/threadinfo.cpp b/src/coreclr/src/debug/createdump/threadinfo.cpp index 3a61376b74d6..f9fd7bbc5a9a 100644 --- a/src/coreclr/src/debug/createdump/threadinfo.cpp +++ b/src/coreclr/src/debug/createdump/threadinfo.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "createdump.h" diff --git a/src/coreclr/src/debug/createdump/threadinfo.h b/src/coreclr/src/debug/createdump/threadinfo.h index 124a5c9ce42c..2931bcafd4fb 100644 --- a/src/coreclr/src/debug/createdump/threadinfo.h +++ b/src/coreclr/src/debug/createdump/threadinfo.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. class CrashInfo; diff --git a/src/coreclr/src/debug/createdump/threadinfomac.cpp b/src/coreclr/src/debug/createdump/threadinfomac.cpp index c0efa28cd42e..a33395f41dad 100644 --- a/src/coreclr/src/debug/createdump/threadinfomac.cpp +++ b/src/coreclr/src/debug/createdump/threadinfomac.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "createdump.h" diff --git a/src/coreclr/src/debug/createdump/threadinfounix.cpp b/src/coreclr/src/debug/createdump/threadinfounix.cpp index f45ae5174d35..2cb33adf1627 100644 --- a/src/coreclr/src/debug/createdump/threadinfounix.cpp +++ b/src/coreclr/src/debug/createdump/threadinfounix.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "createdump.h" diff --git a/src/coreclr/src/debug/daccess/amd64/primitives.cpp b/src/coreclr/src/debug/daccess/amd64/primitives.cpp index 8e820048fd80..bcbe852b1123 100644 --- a/src/coreclr/src/debug/daccess/amd64/primitives.cpp +++ b/src/coreclr/src/debug/daccess/amd64/primitives.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/debug/daccess/arm/primitives.cpp b/src/coreclr/src/debug/daccess/arm/primitives.cpp index c5d82ae72952..2e50a9e07f4c 100644 --- a/src/coreclr/src/debug/daccess/arm/primitives.cpp +++ b/src/coreclr/src/debug/daccess/arm/primitives.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/debug/daccess/arm64/primitives.cpp b/src/coreclr/src/debug/daccess/arm64/primitives.cpp index f35884d309bf..3e05cddcdbf1 100644 --- a/src/coreclr/src/debug/daccess/arm64/primitives.cpp +++ b/src/coreclr/src/debug/daccess/arm64/primitives.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/debug/daccess/daccess.cpp b/src/coreclr/src/debug/daccess/daccess.cpp index f3ef8217b763..1e40f07a5c5e 100644 --- a/src/coreclr/src/debug/daccess/daccess.cpp +++ b/src/coreclr/src/debug/daccess/daccess.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: daccess.cpp // diff --git a/src/coreclr/src/debug/daccess/dacdbiimpl.cpp b/src/coreclr/src/debug/daccess/dacdbiimpl.cpp index b37312b72f11..2f34a59c5d70 100644 --- a/src/coreclr/src/debug/daccess/dacdbiimpl.cpp +++ b/src/coreclr/src/debug/daccess/dacdbiimpl.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: DacDbiImpl.cpp // @@ -6381,7 +6380,8 @@ bool DacHeapWalker::GetSize(TADDR tMT, size_t &size) // The size is not guaranteed to be aligned, we have to // do that ourself. - if (mHeaps[mCurrHeap].Segments[mCurrSeg].Generation == 3) + if (mHeaps[mCurrHeap].Segments[mCurrSeg].Generation == 3 + || mHeaps[mCurrHeap].Segments[mCurrSeg].Generation == 4) size = AlignLarge(size); else size = Align(size); @@ -6604,6 +6604,8 @@ HRESULT DacHeapWalker::InitHeapDataWks(HeapData *&pHeaps, size_t &pCount) dac_generation gen1 = *GenerationTableIndex(g_gcDacGlobals->generation_table, 1); dac_generation gen2 = *GenerationTableIndex(g_gcDacGlobals->generation_table, 2); dac_generation loh = *GenerationTableIndex(g_gcDacGlobals->generation_table, 3); + dac_generation poh = *GenerationTableIndex(g_gcDacGlobals->generation_table, 4); + pHeaps[0].YoungestGenPtr = (CORDB_ADDRESS)gen0.allocation_context.alloc_ptr; pHeaps[0].YoungestGenLimit = (CORDB_ADDRESS)gen0.allocation_context.alloc_limit; @@ -6613,6 +6615,7 @@ HRESULT DacHeapWalker::InitHeapDataWks(HeapData *&pHeaps, size_t &pCount) // Segments int count = GetSegmentCount(loh.start_segment); + count += GetSegmentCount(poh.start_segment); count += GetSegmentCount(gen2.start_segment); pHeaps[0].SegmentCount = count; @@ -6652,6 +6655,17 @@ HRESULT DacHeapWalker::InitHeapDataWks(HeapData *&pHeaps, size_t &pCount) seg = seg->next; } + // Pinned object heap segments + seg = poh.start_segment; + for (; seg && (i < count); ++i) + { + pHeaps[0].Segments[i].Generation = 4; + pHeaps[0].Segments[i].Start = (CORDB_ADDRESS)seg->mem; + pHeaps[0].Segments[i].End = (CORDB_ADDRESS)seg->allocated; + + seg = seg->next; + } + return S_OK; } @@ -6815,7 +6829,7 @@ HRESULT DacDbiInterfaceImpl::GetHeapSegments(OUT DacDbiArrayList *p seg.start = heaps[i].Segments[j].Start; seg.end = heaps[i].Segments[j].End; - _ASSERTE(heaps[i].Segments[j].Generation <= CorDebug_LOH); + _ASSERTE(heaps[i].Segments[j].Generation <= CorDebug_POH); seg.type = (CorDebugGenerationTypes)heaps[i].Segments[j].Generation; seg.heap = (ULONG)i; } diff --git a/src/coreclr/src/debug/daccess/dacdbiimpl.h b/src/coreclr/src/debug/daccess/dacdbiimpl.h index 6c2a211472c7..1856e1949616 100644 --- a/src/coreclr/src/debug/daccess/dacdbiimpl.h +++ b/src/coreclr/src/debug/daccess/dacdbiimpl.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // DacDbiImpl.h // diff --git a/src/coreclr/src/debug/daccess/dacdbiimpl.inl b/src/coreclr/src/debug/daccess/dacdbiimpl.inl index 01b97c2d7843..e8f664ef68b2 100644 --- a/src/coreclr/src/debug/daccess/dacdbiimpl.inl +++ b/src/coreclr/src/debug/daccess/dacdbiimpl.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // DacDbiImpl.inl // diff --git a/src/coreclr/src/debug/daccess/dacdbiimpllocks.cpp b/src/coreclr/src/debug/daccess/dacdbiimpllocks.cpp index b252d37728ad..6c0d5a7e70e8 100644 --- a/src/coreclr/src/debug/daccess/dacdbiimpllocks.cpp +++ b/src/coreclr/src/debug/daccess/dacdbiimpllocks.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: DacDbiImplLocks.cpp // diff --git a/src/coreclr/src/debug/daccess/dacdbiimplstackwalk.cpp b/src/coreclr/src/debug/daccess/dacdbiimplstackwalk.cpp index c24ce1c96213..251b5dde74fd 100644 --- a/src/coreclr/src/debug/daccess/dacdbiimplstackwalk.cpp +++ b/src/coreclr/src/debug/daccess/dacdbiimplstackwalk.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // DacDbiImplStackWalk.cpp // diff --git a/src/coreclr/src/debug/daccess/dacfn.cpp b/src/coreclr/src/debug/daccess/dacfn.cpp index 1ef7bdf0ff2a..4e6989c118a2 100644 --- a/src/coreclr/src/debug/daccess/dacfn.cpp +++ b/src/coreclr/src/debug/daccess/dacfn.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: dacfn.cpp // @@ -22,7 +21,6 @@ #include "gcinterface.h" #include "gcinterface.dac.h" - DacTableInfo g_dacTableInfo; DacGlobals g_dacGlobals; diff --git a/src/coreclr/src/debug/daccess/dacimpl.h b/src/coreclr/src/debug/daccess/dacimpl.h index ec26f54e5d1d..9e20184e0549 100644 --- a/src/coreclr/src/debug/daccess/dacimpl.h +++ b/src/coreclr/src/debug/daccess/dacimpl.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: dacimpl.h // @@ -1204,6 +1203,8 @@ class ClrDataAccess virtual HRESULT STDMETHODCALLTYPE GetGenerationTableSvr(CLRDATA_ADDRESS heapAddr, unsigned int cGenerations, struct DacpGenerationData *pGenerationData, unsigned int *pNeeded); virtual HRESULT STDMETHODCALLTYPE GetFinalizationFillPointersSvr(CLRDATA_ADDRESS heapAddr, unsigned int cFillPointers, CLRDATA_ADDRESS *pFinalizationFillPointers, unsigned int *pNeeded); + virtual HRESULT STDMETHODCALLTYPE GetAssemblyLoadContext(CLRDATA_ADDRESS methodTable, CLRDATA_ADDRESS* assemblyLoadContext); + // // ClrDataAccess. // diff --git a/src/coreclr/src/debug/daccess/datatargetadapter.cpp b/src/coreclr/src/debug/daccess/datatargetadapter.cpp index be176ff75f1d..6a014604dffc 100644 --- a/src/coreclr/src/debug/daccess/datatargetadapter.cpp +++ b/src/coreclr/src/debug/daccess/datatargetadapter.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // DataTargetAdapter.cpp // diff --git a/src/coreclr/src/debug/daccess/datatargetadapter.h b/src/coreclr/src/debug/daccess/datatargetadapter.h index 43a11ead9ffa..8b5c038fafb1 100644 --- a/src/coreclr/src/debug/daccess/datatargetadapter.h +++ b/src/coreclr/src/debug/daccess/datatargetadapter.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // DataTargetAdapter.h // diff --git a/src/coreclr/src/debug/daccess/enummem.cpp b/src/coreclr/src/debug/daccess/enummem.cpp index 5c5f402b99ad..95909b89e3f8 100644 --- a/src/coreclr/src/debug/daccess/enummem.cpp +++ b/src/coreclr/src/debug/daccess/enummem.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: enummem.cpp // @@ -21,10 +20,6 @@ #include "binder.h" #include "win32threadpool.h" -#ifdef FEATURE_APPX -#include "appxutil.h" -#endif // FEATURE_APPX - extern HRESULT GetDacTableAddress(ICorDebugDataTarget* dataTarget, ULONG64 baseAddress, PULONG64 dacTableAddress); #if defined(DAC_MEASURE_PERF) @@ -487,13 +482,9 @@ HRESULT ClrDataAccess::DumpManagedExcepObject(CLRDataEnumMemoryFlags flags, OBJE // dump the exception's stack trace field DumpManagedStackTraceStringObject(flags, exceptRef->GetStackTraceString()); - // dump the exception's remote stack trace field only if we are not generating a triage dump, or - // if we are generating a triage dump of an AppX process, or the exception type does not override + // dump the exception's remote stack trace field only if we are not generating a triage dump, or the exception type does not override // the StackTrace getter (see Exception.InternalPreserveStackTrace to understand why) if (flags != CLRDATA_ENUM_MEM_TRIAGE || -#ifdef FEATURE_APPX - AppX::DacIsAppXProcess() || -#endif // FEATURE_APPX !ExceptionTypeOverridesStackTraceGetter(exceptRef->GetGCSafeMethodTable())) { DumpManagedStackTraceStringObject(flags, exceptRef->GetRemoteStackTraceString()); diff --git a/src/coreclr/src/debug/daccess/fntableaccess.cpp b/src/coreclr/src/debug/daccess/fntableaccess.cpp index 81f120eecd54..82867035be53 100644 --- a/src/coreclr/src/debug/daccess/fntableaccess.cpp +++ b/src/coreclr/src/debug/daccess/fntableaccess.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // diff --git a/src/coreclr/src/debug/daccess/fntableaccess.h b/src/coreclr/src/debug/daccess/fntableaccess.h index 4a6992b23aa4..b9b73e6fe3b3 100644 --- a/src/coreclr/src/debug/daccess/fntableaccess.h +++ b/src/coreclr/src/debug/daccess/fntableaccess.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/debug/daccess/gcinterface.dac.h b/src/coreclr/src/debug/daccess/gcinterface.dac.h index b5229495846f..ae0dbfd3632e 100644 --- a/src/coreclr/src/debug/daccess/gcinterface.dac.h +++ b/src/coreclr/src/debug/daccess/gcinterface.dac.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __DACCESS_GCINTERFACE_DAC_H__ #define __DACCESS_GCINTERFACE_DAC_H__ diff --git a/src/coreclr/src/debug/daccess/i386/primitives.cpp b/src/coreclr/src/debug/daccess/i386/primitives.cpp index 2225335cd13d..0b2f8f920003 100644 --- a/src/coreclr/src/debug/daccess/i386/primitives.cpp +++ b/src/coreclr/src/debug/daccess/i386/primitives.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/debug/daccess/inspect.cpp b/src/coreclr/src/debug/daccess/inspect.cpp index 40e9de0731d9..75cfcc3cadce 100644 --- a/src/coreclr/src/debug/daccess/inspect.cpp +++ b/src/coreclr/src/debug/daccess/inspect.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: inspect.cpp // diff --git a/src/coreclr/src/debug/daccess/nidump.cpp b/src/coreclr/src/debug/daccess/nidump.cpp index e647ffb765c0..5a0bbfd81006 100644 --- a/src/coreclr/src/debug/daccess/nidump.cpp +++ b/src/coreclr/src/debug/daccess/nidump.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // @@ -8590,7 +8589,7 @@ NativeImageDumper::EnumMnemonics s_CConv[] = CC_CALLCONV_ENTRY(IMAGE_CEE_CS_CALLCONV_FIELD), CC_CALLCONV_ENTRY(IMAGE_CEE_CS_CALLCONV_LOCAL_SIG), CC_CALLCONV_ENTRY(IMAGE_CEE_CS_CALLCONV_PROPERTY), - CC_CALLCONV_ENTRY(IMAGE_CEE_CS_CALLCONV_UNMGD), + CC_CALLCONV_ENTRY(IMAGE_CEE_CS_CALLCONV_UNMANAGED), CC_CALLCONV_ENTRY(IMAGE_CEE_CS_CALLCONV_GENERICINST), CC_CALLCONV_ENTRY(IMAGE_CEE_CS_CALLCONV_NATIVEVARARG), #undef CC_CALLCONV_ENTRY diff --git a/src/coreclr/src/debug/daccess/nidump.h b/src/coreclr/src/debug/daccess/nidump.h index ab07e53ee71d..b8c0a04ddb41 100644 --- a/src/coreclr/src/debug/daccess/nidump.h +++ b/src/coreclr/src/debug/daccess/nidump.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _NIDUMP_H_ diff --git a/src/coreclr/src/debug/daccess/nidump.inl b/src/coreclr/src/debug/daccess/nidump.inl index 541f4194e94a..5ec75847f021 100644 --- a/src/coreclr/src/debug/daccess/nidump.inl +++ b/src/coreclr/src/debug/daccess/nidump.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _NIDUMP_INL_ diff --git a/src/coreclr/src/debug/daccess/reimpl.cpp b/src/coreclr/src/debug/daccess/reimpl.cpp index e679a8aad1b9..832522fca7c9 100644 --- a/src/coreclr/src/debug/daccess/reimpl.cpp +++ b/src/coreclr/src/debug/daccess/reimpl.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: reimpl.cpp // diff --git a/src/coreclr/src/debug/daccess/request.cpp b/src/coreclr/src/debug/daccess/request.cpp index 8bd396e4f32b..072eba0e55ac 100644 --- a/src/coreclr/src/debug/daccess/request.cpp +++ b/src/coreclr/src/debug/daccess/request.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: request.cpp // @@ -4699,3 +4698,29 @@ HRESULT ClrDataAccess::GetFinalizationFillPointersSvr(CLRDATA_ADDRESS heapAddr, SOSDacLeave(); return hr; } + +HRESULT ClrDataAccess::GetAssemblyLoadContext(CLRDATA_ADDRESS methodTable, CLRDATA_ADDRESS* assemblyLoadContext) +{ + if (methodTable == 0 || assemblyLoadContext == NULL) + return E_INVALIDARG; + + SOSDacEnter(); + PTR_MethodTable pMT = PTR_MethodTable(CLRDATA_ADDRESS_TO_TADDR(methodTable)); + PTR_Module pModule = pMT->GetModule(); + + PTR_PEFile pPEFile = pModule->GetFile(); + PTR_AssemblyLoadContext pAssemblyLoadContext = pPEFile->GetAssemblyLoadContext(); + + INT_PTR managedAssemblyLoadContextHandle = pAssemblyLoadContext->GetManagedAssemblyLoadContext(); + + TADDR managedAssemblyLoadContextAddr = 0; + if (managedAssemblyLoadContextHandle != 0) + { + DacReadAll(managedAssemblyLoadContextHandle,&managedAssemblyLoadContextAddr,sizeof(TADDR),true); + } + + *assemblyLoadContext = TO_CDADDR(managedAssemblyLoadContextAddr); + + SOSDacLeave(); + return hr; +} diff --git a/src/coreclr/src/debug/daccess/request_common.h b/src/coreclr/src/debug/daccess/request_common.h index e9e663ff5826..d5f60df957c8 100644 --- a/src/coreclr/src/debug/daccess/request_common.h +++ b/src/coreclr/src/debug/daccess/request_common.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // This file contains functions used by both request.cpp and request_svr.cpp // to communicate with the debuggee's GC. diff --git a/src/coreclr/src/debug/daccess/request_svr.cpp b/src/coreclr/src/debug/daccess/request_svr.cpp index 562532438e2a..558ac0c33471 100644 --- a/src/coreclr/src/debug/daccess/request_svr.cpp +++ b/src/coreclr/src/debug/daccess/request_svr.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // @@ -275,7 +274,8 @@ HRESULT DacHeapWalker::InitHeapDataSvr(HeapData *&pHeaps, size_t &pCount) dac_generation gen0 = *ServerGenerationTableIndex(heap, 0); dac_generation gen1 = *ServerGenerationTableIndex(heap, 1); dac_generation gen2 = *ServerGenerationTableIndex(heap, 2); - dac_generation loh = *ServerGenerationTableIndex(heap, 3); + dac_generation loh = *ServerGenerationTableIndex(heap, 3); + dac_generation poh = *ServerGenerationTableIndex(heap, 4); pHeaps[i].YoungestGenPtr = (CORDB_ADDRESS)gen0.allocation_context.alloc_ptr; pHeaps[i].YoungestGenLimit = (CORDB_ADDRESS)gen0.allocation_context.alloc_limit; @@ -286,6 +286,7 @@ HRESULT DacHeapWalker::InitHeapDataSvr(HeapData *&pHeaps, size_t &pCount) // Segments int count = GetSegmentCount(loh.start_segment); + count += GetSegmentCount(poh.start_segment); count += GetSegmentCount(gen2.start_segment); pHeaps[i].SegmentCount = count; @@ -314,7 +315,6 @@ HRESULT DacHeapWalker::InitHeapDataSvr(HeapData *&pHeaps, size_t &pCount) seg = seg->next; } - // Large object heap segments seg = loh.start_segment; for (; seg && (j < count); ++j) @@ -325,6 +325,17 @@ HRESULT DacHeapWalker::InitHeapDataSvr(HeapData *&pHeaps, size_t &pCount) seg = seg->next; } + + // Pinned object heap segments + seg = poh.start_segment; + for (; seg && (j < count); ++j) + { + pHeaps[i].Segments[j].Generation = 4; + pHeaps[i].Segments[j].Start = (CORDB_ADDRESS)seg->mem; + pHeaps[i].Segments[j].End = (CORDB_ADDRESS)seg->allocated; + + seg = seg->next; + } } return S_OK; diff --git a/src/coreclr/src/debug/daccess/stack.cpp b/src/coreclr/src/debug/daccess/stack.cpp index 57aee6df2b6f..09e16b4979ab 100644 --- a/src/coreclr/src/debug/daccess/stack.cpp +++ b/src/coreclr/src/debug/daccess/stack.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: stack.cpp // diff --git a/src/coreclr/src/debug/daccess/stdafx.h b/src/coreclr/src/debug/daccess/stdafx.h index a8a826f61f30..050b4eac5137 100644 --- a/src/coreclr/src/debug/daccess/stdafx.h +++ b/src/coreclr/src/debug/daccess/stdafx.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: stdafx.h // diff --git a/src/coreclr/src/debug/daccess/task.cpp b/src/coreclr/src/debug/daccess/task.cpp index 565b8eb10693..b16f85d8773e 100644 --- a/src/coreclr/src/debug/daccess/task.cpp +++ b/src/coreclr/src/debug/daccess/task.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: task.cpp // diff --git a/src/coreclr/src/debug/dbgutil/dbgutil.cpp b/src/coreclr/src/debug/dbgutil/dbgutil.cpp index 0f30fdf55ff9..242bf65eb8ae 100644 --- a/src/coreclr/src/debug/dbgutil/dbgutil.cpp +++ b/src/coreclr/src/debug/dbgutil/dbgutil.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // dbgutil.cpp // diff --git a/src/coreclr/src/debug/dbgutil/elfreader.cpp b/src/coreclr/src/debug/dbgutil/elfreader.cpp index cd3b148f1ab4..5cbb4ca0efd6 100644 --- a/src/coreclr/src/debug/dbgutil/elfreader.cpp +++ b/src/coreclr/src/debug/dbgutil/elfreader.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include #include diff --git a/src/coreclr/src/debug/dbgutil/elfreader.h b/src/coreclr/src/debug/dbgutil/elfreader.h index 8002b77ac0f5..ac7d8a4b0f30 100644 --- a/src/coreclr/src/debug/dbgutil/elfreader.h +++ b/src/coreclr/src/debug/dbgutil/elfreader.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include #ifdef HOST_UNIX diff --git a/src/coreclr/src/debug/dbgutil/machoreader.cpp b/src/coreclr/src/debug/dbgutil/machoreader.cpp index 353060e797c2..155ec15a3af0 100644 --- a/src/coreclr/src/debug/dbgutil/machoreader.cpp +++ b/src/coreclr/src/debug/dbgutil/machoreader.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include #include @@ -225,12 +224,6 @@ MachOModule::ReadLoadCommands() segment->flags, segment->segname); - // TODO - remove - m_reader.Trace("CMD: base + fileoff %016llx vmaddr - fileoff %016llx base - vmaddr %016llx\n", - m_baseAddress + segment->fileoff, - segment->vmaddr - segment->fileoff, - m_baseAddress - segment->vmaddr); - section_64* section = (section_64*)((uint64_t)segment + sizeof(segment_command_64)); for (int s = 0; s < segment->nsects; s++, section++) { diff --git a/src/coreclr/src/debug/dbgutil/machoreader.h b/src/coreclr/src/debug/dbgutil/machoreader.h index 4f108c626460..f18a7950b18b 100644 --- a/src/coreclr/src/debug/dbgutil/machoreader.h +++ b/src/coreclr/src/debug/dbgutil/machoreader.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include #include diff --git a/src/coreclr/src/debug/debug-pal/CMakeLists.txt b/src/coreclr/src/debug/debug-pal/CMakeLists.txt index ac1e48fb5fb4..12a0005c0532 100644 --- a/src/coreclr/src/debug/debug-pal/CMakeLists.txt +++ b/src/coreclr/src/debug/debug-pal/CMakeLists.txt @@ -34,4 +34,4 @@ if(CLR_CMAKE_HOST_UNIX) endif(CLR_CMAKE_HOST_UNIX) -_add_library(debug-pal STATIC ${TWO_WAY_PIPE_SOURCES}) +_add_library(debug-pal OBJECT ${TWO_WAY_PIPE_SOURCES}) diff --git a/src/coreclr/src/debug/debug-pal/dummy/twowaypipe.cpp b/src/coreclr/src/debug/debug-pal/dummy/twowaypipe.cpp index ed73fd75cf17..3edd7cc241f5 100644 --- a/src/coreclr/src/debug/debug-pal/dummy/twowaypipe.cpp +++ b/src/coreclr/src/debug/debug-pal/dummy/twowaypipe.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include #include "twowaypipe.h" diff --git a/src/coreclr/src/debug/debug-pal/unix/diagnosticsipc.cpp b/src/coreclr/src/debug/debug-pal/unix/diagnosticsipc.cpp index 046350317cde..e8830422930a 100644 --- a/src/coreclr/src/debug/debug-pal/unix/diagnosticsipc.cpp +++ b/src/coreclr/src/debug/debug-pal/unix/diagnosticsipc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include #include diff --git a/src/coreclr/src/debug/debug-pal/unix/processdescriptor.cpp b/src/coreclr/src/debug/debug-pal/unix/processdescriptor.cpp index aa883cd3cf83..cdcabaae2c23 100644 --- a/src/coreclr/src/debug/debug-pal/unix/processdescriptor.cpp +++ b/src/coreclr/src/debug/debug-pal/unix/processdescriptor.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include #include diff --git a/src/coreclr/src/debug/debug-pal/unix/twowaypipe.cpp b/src/coreclr/src/debug/debug-pal/unix/twowaypipe.cpp index 942e98ff95b6..d867539610c2 100644 --- a/src/coreclr/src/debug/debug-pal/unix/twowaypipe.cpp +++ b/src/coreclr/src/debug/debug-pal/unix/twowaypipe.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include #include diff --git a/src/coreclr/src/debug/debug-pal/win/diagnosticsipc.cpp b/src/coreclr/src/debug/debug-pal/win/diagnosticsipc.cpp index f7b41b92fc1e..6c1b55e31118 100644 --- a/src/coreclr/src/debug/debug-pal/win/diagnosticsipc.cpp +++ b/src/coreclr/src/debug/debug-pal/win/diagnosticsipc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include #include diff --git a/src/coreclr/src/debug/debug-pal/win/processdescriptor.cpp b/src/coreclr/src/debug/debug-pal/win/processdescriptor.cpp index 7302a62cd5cd..974c632647a6 100644 --- a/src/coreclr/src/debug/debug-pal/win/processdescriptor.cpp +++ b/src/coreclr/src/debug/debug-pal/win/processdescriptor.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include #include diff --git a/src/coreclr/src/debug/debug-pal/win/twowaypipe.cpp b/src/coreclr/src/debug/debug-pal/win/twowaypipe.cpp index dda0cfba5ba9..faa28a525737 100644 --- a/src/coreclr/src/debug/debug-pal/win/twowaypipe.cpp +++ b/src/coreclr/src/debug/debug-pal/win/twowaypipe.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include #include diff --git a/src/coreclr/src/debug/di/CMakeLists.txt b/src/coreclr/src/debug/di/CMakeLists.txt index d600ad3dcd08..6cfedda1d899 100644 --- a/src/coreclr/src/debug/di/CMakeLists.txt +++ b/src/coreclr/src/debug/di/CMakeLists.txt @@ -59,7 +59,7 @@ if(CLR_CMAKE_HOST_WIN32) if ((CLR_CMAKE_TARGET_ARCH_ARM OR CLR_CMAKE_TARGET_ARCH_ARM64) AND NOT DEFINED CLR_CROSS_COMPONENTS_BUILD) convert_to_absolute_path(CORDBDI_SOURCES_ASM_FILE ${CORDBDI_SOURCES_ASM_FILE}) - preprocess_compile_asm(ASM_FILES ${CORDBDI_SOURCES_ASM_FILE} OUTPUT_OBJECTS CORDBDI_SOURCES_ASM_FILE) + preprocess_compile_asm(TARGET cordbdi ASM_FILES ${CORDBDI_SOURCES_ASM_FILE} OUTPUT_OBJECTS CORDBDI_SOURCES_ASM_FILE) endif() elseif(CLR_CMAKE_HOST_UNIX) diff --git a/src/coreclr/src/debug/di/amd64/FloatConversion.asm b/src/coreclr/src/debug/di/amd64/FloatConversion.asm index 5e7f2c2bde75..f47419abf5df 100644 --- a/src/coreclr/src/debug/di/amd64/FloatConversion.asm +++ b/src/coreclr/src/debug/di/amd64/FloatConversion.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ;// ==++== ;// diff --git a/src/coreclr/src/debug/di/amd64/cordbregisterset.cpp b/src/coreclr/src/debug/di/amd64/cordbregisterset.cpp index 912901450615..75c0a914633c 100644 --- a/src/coreclr/src/debug/di/amd64/cordbregisterset.cpp +++ b/src/coreclr/src/debug/di/amd64/cordbregisterset.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: CordbRegisterSet.cpp // diff --git a/src/coreclr/src/debug/di/amd64/floatconversion.S b/src/coreclr/src/debug/di/amd64/floatconversion.S index 70698d26ccb1..d43658175add 100644 --- a/src/coreclr/src/debug/di/amd64/floatconversion.S +++ b/src/coreclr/src/debug/di/amd64/floatconversion.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. .intel_syntax noprefix #include diff --git a/src/coreclr/src/debug/di/amd64/primitives.cpp b/src/coreclr/src/debug/di/amd64/primitives.cpp index d9c9e0469b87..2cb8599c80c6 100644 --- a/src/coreclr/src/debug/di/amd64/primitives.cpp +++ b/src/coreclr/src/debug/di/amd64/primitives.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/debug/di/arm/cordbregisterset.cpp b/src/coreclr/src/debug/di/arm/cordbregisterset.cpp index 14dc1af5df8f..507c6020d635 100644 --- a/src/coreclr/src/debug/di/arm/cordbregisterset.cpp +++ b/src/coreclr/src/debug/di/arm/cordbregisterset.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: CordbRegisterSet.cpp // diff --git a/src/coreclr/src/debug/di/arm/floatconversion.S b/src/coreclr/src/debug/di/arm/floatconversion.S index ff907af78970..91bfa29492c5 100644 --- a/src/coreclr/src/debug/di/arm/floatconversion.S +++ b/src/coreclr/src/debug/di/arm/floatconversion.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include @@ -12,4 +11,4 @@ LEAF_ENTRY FPFillR8, .TEXT .thumb vldr D0, [R0] bx lr -LEAF_END FPFillR8, .TEXT \ No newline at end of file +LEAF_END FPFillR8, .TEXT diff --git a/src/coreclr/src/debug/di/arm/floatconversion.asm b/src/coreclr/src/debug/di/arm/floatconversion.asm index 7cbc41fc7a1f..90f8e756e9af 100644 --- a/src/coreclr/src/debug/di/arm/floatconversion.asm +++ b/src/coreclr/src/debug/di/arm/floatconversion.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ;; ==++== ;; diff --git a/src/coreclr/src/debug/di/arm/primitives.cpp b/src/coreclr/src/debug/di/arm/primitives.cpp index 157a6fb9daaf..51b943b0e0ad 100644 --- a/src/coreclr/src/debug/di/arm/primitives.cpp +++ b/src/coreclr/src/debug/di/arm/primitives.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/debug/di/arm64/cordbregisterset.cpp b/src/coreclr/src/debug/di/arm64/cordbregisterset.cpp index ce964e0d16b2..1d470e39c420 100644 --- a/src/coreclr/src/debug/di/arm64/cordbregisterset.cpp +++ b/src/coreclr/src/debug/di/arm64/cordbregisterset.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: CordbRegisterSet.cpp // diff --git a/src/coreclr/src/debug/di/arm64/floatconversion.S b/src/coreclr/src/debug/di/arm64/floatconversion.S index 1b8b4800b6d9..c6370f28e8f8 100644 --- a/src/coreclr/src/debug/di/arm64/floatconversion.S +++ b/src/coreclr/src/debug/di/arm64/floatconversion.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include diff --git a/src/coreclr/src/debug/di/arm64/floatconversion.asm b/src/coreclr/src/debug/di/arm64/floatconversion.asm index e478fd10fd0f..4c00b96803b2 100644 --- a/src/coreclr/src/debug/di/arm64/floatconversion.asm +++ b/src/coreclr/src/debug/di/arm64/floatconversion.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ;; ==++== ;; diff --git a/src/coreclr/src/debug/di/arm64/primitives.cpp b/src/coreclr/src/debug/di/arm64/primitives.cpp index dd4fe8086667..0984c58fea68 100644 --- a/src/coreclr/src/debug/di/arm64/primitives.cpp +++ b/src/coreclr/src/debug/di/arm64/primitives.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/debug/di/breakpoint.cpp b/src/coreclr/src/debug/di/breakpoint.cpp index 2b01662e74dd..eb156c49e04d 100644 --- a/src/coreclr/src/debug/di/breakpoint.cpp +++ b/src/coreclr/src/debug/di/breakpoint.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: breakpoint.cpp // diff --git a/src/coreclr/src/debug/di/classfactory.h b/src/coreclr/src/debug/di/classfactory.h index 5cf44b252785..c6bc584741d5 100644 --- a/src/coreclr/src/debug/di/classfactory.h +++ b/src/coreclr/src/debug/di/classfactory.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // ClassFactory.h // diff --git a/src/coreclr/src/debug/di/cordb.cpp b/src/coreclr/src/debug/di/cordb.cpp index 71e19a4e4b39..673d48c8ab8f 100644 --- a/src/coreclr/src/debug/di/cordb.cpp +++ b/src/coreclr/src/debug/di/cordb.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // CorDB.cpp // diff --git a/src/coreclr/src/debug/di/dbgtransportmanager.cpp b/src/coreclr/src/debug/di/dbgtransportmanager.cpp index 9be01ccfcc9b..37734148d7e3 100644 --- a/src/coreclr/src/debug/di/dbgtransportmanager.cpp +++ b/src/coreclr/src/debug/di/dbgtransportmanager.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "stdafx.h" #include "dbgtransportsession.h" diff --git a/src/coreclr/src/debug/di/dbgtransportmanager.h b/src/coreclr/src/debug/di/dbgtransportmanager.h index 79de2b89c275..af25a16133a2 100644 --- a/src/coreclr/src/debug/di/dbgtransportmanager.h +++ b/src/coreclr/src/debug/di/dbgtransportmanager.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __DBG_TRANSPORT_MANAGER_INCLUDED diff --git a/src/coreclr/src/debug/di/dbgtransportpipeline.cpp b/src/coreclr/src/debug/di/dbgtransportpipeline.cpp index b305dcf06061..24c861aba0fa 100644 --- a/src/coreclr/src/debug/di/dbgtransportpipeline.cpp +++ b/src/coreclr/src/debug/di/dbgtransportpipeline.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: DbgTransportPipeline.cpp // diff --git a/src/coreclr/src/debug/di/divalue.cpp b/src/coreclr/src/debug/di/divalue.cpp index fcb45ebfe440..c85e188c16b4 100644 --- a/src/coreclr/src/debug/di/divalue.cpp +++ b/src/coreclr/src/debug/di/divalue.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: DIValue.cpp // diff --git a/src/coreclr/src/debug/di/eventchannel.h b/src/coreclr/src/debug/di/eventchannel.h index 3a36415c9d66..0376a8501027 100644 --- a/src/coreclr/src/debug/di/eventchannel.h +++ b/src/coreclr/src/debug/di/eventchannel.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // EventChannel.h // diff --git a/src/coreclr/src/debug/di/eventredirectionpipeline.cpp b/src/coreclr/src/debug/di/eventredirectionpipeline.cpp index c8e3c165bf9c..2332ec25e39c 100644 --- a/src/coreclr/src/debug/di/eventredirectionpipeline.cpp +++ b/src/coreclr/src/debug/di/eventredirectionpipeline.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: EventRedirectionPipeline.cpp // diff --git a/src/coreclr/src/debug/di/eventredirectionpipeline.h b/src/coreclr/src/debug/di/eventredirectionpipeline.h index 741efb970f53..f2b3c55d38ad 100644 --- a/src/coreclr/src/debug/di/eventredirectionpipeline.h +++ b/src/coreclr/src/debug/di/eventredirectionpipeline.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // EventRedirectionPipeline.h // diff --git a/src/coreclr/src/debug/di/hash.cpp b/src/coreclr/src/debug/di/hash.cpp index b546ea20e5f6..6a70025c095e 100644 --- a/src/coreclr/src/debug/di/hash.cpp +++ b/src/coreclr/src/debug/di/hash.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: hash.cpp // diff --git a/src/coreclr/src/debug/di/helpers.h b/src/coreclr/src/debug/di/helpers.h index 74a5120f26b5..7c6eed1d2368 100644 --- a/src/coreclr/src/debug/di/helpers.h +++ b/src/coreclr/src/debug/di/helpers.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // helpers.h // diff --git a/src/coreclr/src/debug/di/i386/cordbregisterset.cpp b/src/coreclr/src/debug/di/i386/cordbregisterset.cpp index 2ed71e4a279c..a1254f0b6087 100644 --- a/src/coreclr/src/debug/di/i386/cordbregisterset.cpp +++ b/src/coreclr/src/debug/di/i386/cordbregisterset.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: CordbRegisterSet.cpp // diff --git a/src/coreclr/src/debug/di/i386/primitives.cpp b/src/coreclr/src/debug/di/i386/primitives.cpp index 31397f68b82f..b2c02f739e3d 100644 --- a/src/coreclr/src/debug/di/i386/primitives.cpp +++ b/src/coreclr/src/debug/di/i386/primitives.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/debug/di/localeventchannel.cpp b/src/coreclr/src/debug/di/localeventchannel.cpp index d2d97af16fcb..a7eb5fd9a5c4 100644 --- a/src/coreclr/src/debug/di/localeventchannel.cpp +++ b/src/coreclr/src/debug/di/localeventchannel.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: LocalEventChannel.cpp // diff --git a/src/coreclr/src/debug/di/module.cpp b/src/coreclr/src/debug/di/module.cpp index 4bf2b09fe5eb..d02dfdd08146 100644 --- a/src/coreclr/src/debug/di/module.cpp +++ b/src/coreclr/src/debug/di/module.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: module.cpp diff --git a/src/coreclr/src/debug/di/nativepipeline.cpp b/src/coreclr/src/debug/di/nativepipeline.cpp index c71ab91f195c..4f801aa8f344 100644 --- a/src/coreclr/src/debug/di/nativepipeline.cpp +++ b/src/coreclr/src/debug/di/nativepipeline.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: NativePipeline.cpp // diff --git a/src/coreclr/src/debug/di/nativepipeline.h b/src/coreclr/src/debug/di/nativepipeline.h index 442262142fd4..f1b973ea5967 100644 --- a/src/coreclr/src/debug/di/nativepipeline.h +++ b/src/coreclr/src/debug/di/nativepipeline.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // NativePipeline.h // diff --git a/src/coreclr/src/debug/di/platformspecific.cpp b/src/coreclr/src/debug/di/platformspecific.cpp index ad5122bc346c..07652a305641 100644 --- a/src/coreclr/src/debug/di/platformspecific.cpp +++ b/src/coreclr/src/debug/di/platformspecific.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "stdafx.h" diff --git a/src/coreclr/src/debug/di/process.cpp b/src/coreclr/src/debug/di/process.cpp index a9656521473e..1b76753efcbe 100644 --- a/src/coreclr/src/debug/di/process.cpp +++ b/src/coreclr/src/debug/di/process.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: process.cpp // diff --git a/src/coreclr/src/debug/di/publish.cpp b/src/coreclr/src/debug/di/publish.cpp index 169858d4ecf9..23003b980ad9 100644 --- a/src/coreclr/src/debug/di/publish.cpp +++ b/src/coreclr/src/debug/di/publish.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: publish.cpp // diff --git a/src/coreclr/src/debug/di/remoteeventchannel.cpp b/src/coreclr/src/debug/di/remoteeventchannel.cpp index 6c7f5447eec6..f1a20e25588b 100644 --- a/src/coreclr/src/debug/di/remoteeventchannel.cpp +++ b/src/coreclr/src/debug/di/remoteeventchannel.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: RemoteEventChannel.cpp // diff --git a/src/coreclr/src/debug/di/rsappdomain.cpp b/src/coreclr/src/debug/di/rsappdomain.cpp index b9444560d8b2..6b4da4ee2060 100644 --- a/src/coreclr/src/debug/di/rsappdomain.cpp +++ b/src/coreclr/src/debug/di/rsappdomain.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: RsAppDomain.cpp // diff --git a/src/coreclr/src/debug/di/rsassembly.cpp b/src/coreclr/src/debug/di/rsassembly.cpp index 1eaec033a7fb..b7b7d6756391 100644 --- a/src/coreclr/src/debug/di/rsassembly.cpp +++ b/src/coreclr/src/debug/di/rsassembly.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: RsAssembly.cpp // diff --git a/src/coreclr/src/debug/di/rsclass.cpp b/src/coreclr/src/debug/di/rsclass.cpp index 33b7b39eea8b..70e64b63062b 100644 --- a/src/coreclr/src/debug/di/rsclass.cpp +++ b/src/coreclr/src/debug/di/rsclass.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // diff --git a/src/coreclr/src/debug/di/rsenumerator.hpp b/src/coreclr/src/debug/di/rsenumerator.hpp index 421fd855f9a0..569cf80289e6 100644 --- a/src/coreclr/src/debug/di/rsenumerator.hpp +++ b/src/coreclr/src/debug/di/rsenumerator.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // diff --git a/src/coreclr/src/debug/di/rsfunction.cpp b/src/coreclr/src/debug/di/rsfunction.cpp index 3baad6a483ca..164e40d08a77 100644 --- a/src/coreclr/src/debug/di/rsfunction.cpp +++ b/src/coreclr/src/debug/di/rsfunction.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: rsfunction.cpp // diff --git a/src/coreclr/src/debug/di/rsmain.cpp b/src/coreclr/src/debug/di/rsmain.cpp index 5ab2d7d685f9..11d5fcf4b1a8 100644 --- a/src/coreclr/src/debug/di/rsmain.cpp +++ b/src/coreclr/src/debug/di/rsmain.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: RsMain.cpp // diff --git a/src/coreclr/src/debug/di/rsmda.cpp b/src/coreclr/src/debug/di/rsmda.cpp index cdbd53dc105c..517e6dcfdeb0 100644 --- a/src/coreclr/src/debug/di/rsmda.cpp +++ b/src/coreclr/src/debug/di/rsmda.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: RsMda.cpp // diff --git a/src/coreclr/src/debug/di/rspriv.h b/src/coreclr/src/debug/di/rspriv.h index 9386c3af14e7..2831db5b86fe 100644 --- a/src/coreclr/src/debug/di/rspriv.h +++ b/src/coreclr/src/debug/di/rspriv.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // rspriv. // diff --git a/src/coreclr/src/debug/di/rspriv.inl b/src/coreclr/src/debug/di/rspriv.inl index 49334cd3ee4f..221bc87091e0 100644 --- a/src/coreclr/src/debug/di/rspriv.inl +++ b/src/coreclr/src/debug/di/rspriv.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: rspriv.inl // diff --git a/src/coreclr/src/debug/di/rsregsetcommon.cpp b/src/coreclr/src/debug/di/rsregsetcommon.cpp index 667843c3f86f..f86d852e4bd2 100644 --- a/src/coreclr/src/debug/di/rsregsetcommon.cpp +++ b/src/coreclr/src/debug/di/rsregsetcommon.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: RSRegSetCommon.cpp // diff --git a/src/coreclr/src/debug/di/rsstackwalk.cpp b/src/coreclr/src/debug/di/rsstackwalk.cpp index 63f555f7e130..42732435db40 100644 --- a/src/coreclr/src/debug/di/rsstackwalk.cpp +++ b/src/coreclr/src/debug/di/rsstackwalk.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // RsStackWalk.cpp // diff --git a/src/coreclr/src/debug/di/rsthread.cpp b/src/coreclr/src/debug/di/rsthread.cpp index e4da07df3a4a..600cd485e22d 100644 --- a/src/coreclr/src/debug/di/rsthread.cpp +++ b/src/coreclr/src/debug/di/rsthread.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // @@ -2779,6 +2778,8 @@ bool CordbThread::CreateEventWasQueued() CordbUnmanagedThread::CordbUnmanagedThread(CordbProcess *pProcess, DWORD dwThreadId, HANDLE hThread, void *lpThreadLocalBase) : CordbBase(pProcess, dwThreadId, enumCordbUnmanagedThread), + m_stackBase(0), + m_stackLimit(0), m_handle(hThread), m_threadLocalBase(lpThreadLocalBase), m_pTLSArray(NULL), @@ -2788,8 +2789,6 @@ CordbUnmanagedThread::CordbUnmanagedThread(CordbProcess *pProcess, DWORD dwThrea #ifdef TARGET_X86 m_pSavedLeafSeh(NULL), #endif - m_stackBase(0), - m_stackLimit(0), m_continueCountCached(0) { m_pLeftSideContext.Set(NULL); diff --git a/src/coreclr/src/debug/di/rstype.cpp b/src/coreclr/src/debug/di/rstype.cpp index ab3a6cd6e51d..36b137949664 100644 --- a/src/coreclr/src/debug/di/rstype.cpp +++ b/src/coreclr/src/debug/di/rstype.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: rstype.cpp // diff --git a/src/coreclr/src/debug/di/shared.cpp b/src/coreclr/src/debug/di/shared.cpp index 8a4e98d2dd80..0ea501673d59 100644 --- a/src/coreclr/src/debug/di/shared.cpp +++ b/src/coreclr/src/debug/di/shared.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/debug/di/shimcallback.cpp b/src/coreclr/src/debug/di/shimcallback.cpp index fab5fbfd60c8..ba5f0771fca4 100644 --- a/src/coreclr/src/debug/di/shimcallback.cpp +++ b/src/coreclr/src/debug/di/shimcallback.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: ShimCallback.cpp // diff --git a/src/coreclr/src/debug/di/shimdatatarget.cpp b/src/coreclr/src/debug/di/shimdatatarget.cpp index 2253f6f30d1e..a7eca2dacc40 100644 --- a/src/coreclr/src/debug/di/shimdatatarget.cpp +++ b/src/coreclr/src/debug/di/shimdatatarget.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // diff --git a/src/coreclr/src/debug/di/shimdatatarget.h b/src/coreclr/src/debug/di/shimdatatarget.h index 85905247e72b..c2e92c217dd6 100644 --- a/src/coreclr/src/debug/di/shimdatatarget.h +++ b/src/coreclr/src/debug/di/shimdatatarget.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // ShimDataTarget.h // diff --git a/src/coreclr/src/debug/di/shimevents.cpp b/src/coreclr/src/debug/di/shimevents.cpp index e5c2cb9a4552..28fa61cb8a51 100644 --- a/src/coreclr/src/debug/di/shimevents.cpp +++ b/src/coreclr/src/debug/di/shimevents.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: ShimEvents.cpp // diff --git a/src/coreclr/src/debug/di/shimlocaldatatarget.cpp b/src/coreclr/src/debug/di/shimlocaldatatarget.cpp index 194e10633fac..a6e8e7779f54 100644 --- a/src/coreclr/src/debug/di/shimlocaldatatarget.cpp +++ b/src/coreclr/src/debug/di/shimlocaldatatarget.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // diff --git a/src/coreclr/src/debug/di/shimpriv.h b/src/coreclr/src/debug/di/shimpriv.h index 0f67cd7bbd0c..89a0c0d0c793 100644 --- a/src/coreclr/src/debug/di/shimpriv.h +++ b/src/coreclr/src/debug/di/shimpriv.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // shimprivate.h // diff --git a/src/coreclr/src/debug/di/shimprocess.cpp b/src/coreclr/src/debug/di/shimprocess.cpp index c6f5ae3bf791..685c4f2b3018 100644 --- a/src/coreclr/src/debug/di/shimprocess.cpp +++ b/src/coreclr/src/debug/di/shimprocess.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: ShimProcess.cpp // diff --git a/src/coreclr/src/debug/di/shimremotedatatarget.cpp b/src/coreclr/src/debug/di/shimremotedatatarget.cpp index 261dd08f0c42..38bf162e430f 100644 --- a/src/coreclr/src/debug/di/shimremotedatatarget.cpp +++ b/src/coreclr/src/debug/di/shimremotedatatarget.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // diff --git a/src/coreclr/src/debug/di/shimstackwalk.cpp b/src/coreclr/src/debug/di/shimstackwalk.cpp index f123749218f9..c47620c7bc09 100644 --- a/src/coreclr/src/debug/di/shimstackwalk.cpp +++ b/src/coreclr/src/debug/di/shimstackwalk.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ShimStackWalk.cpp // diff --git a/src/coreclr/src/debug/di/stdafx.h b/src/coreclr/src/debug/di/stdafx.h index ade52e3a27b8..7286870b969b 100644 --- a/src/coreclr/src/debug/di/stdafx.h +++ b/src/coreclr/src/debug/di/stdafx.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // stdafx.h // diff --git a/src/coreclr/src/debug/di/symbolinfo.cpp b/src/coreclr/src/debug/di/symbolinfo.cpp index 057de829cd4e..452adbe71f3a 100644 --- a/src/coreclr/src/debug/di/symbolinfo.cpp +++ b/src/coreclr/src/debug/di/symbolinfo.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // callbacks for diasymreader when using SymConverter diff --git a/src/coreclr/src/debug/di/symbolinfo.h b/src/coreclr/src/debug/di/symbolinfo.h index 261dde432513..22deafaaf5d5 100644 --- a/src/coreclr/src/debug/di/symbolinfo.h +++ b/src/coreclr/src/debug/di/symbolinfo.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // callbacks for diasymreader when using SymConverter diff --git a/src/coreclr/src/debug/di/valuehome.cpp b/src/coreclr/src/debug/di/valuehome.cpp index 0b2f36bea579..c27c949cae25 100644 --- a/src/coreclr/src/debug/di/valuehome.cpp +++ b/src/coreclr/src/debug/di/valuehome.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: ValueHome.cpp // diff --git a/src/coreclr/src/debug/di/windowspipeline.cpp b/src/coreclr/src/debug/di/windowspipeline.cpp index a2127aed6bba..cea89e738740 100644 --- a/src/coreclr/src/debug/di/windowspipeline.cpp +++ b/src/coreclr/src/debug/di/windowspipeline.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: WindowsPipeline.cpp // diff --git a/src/coreclr/src/debug/ee/amd64/amd64InstrDecode.h b/src/coreclr/src/debug/ee/amd64/amd64InstrDecode.h index 1a40c26e9799..17f54fbbc1a3 100644 --- a/src/coreclr/src/debug/ee/amd64/amd64InstrDecode.h +++ b/src/coreclr/src/debug/ee/amd64/amd64InstrDecode.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // File machine generated. See gen_amd64InstrDecode/README.md diff --git a/src/coreclr/src/debug/ee/amd64/amd64walker.cpp b/src/coreclr/src/debug/ee/amd64/amd64walker.cpp index fb2ab1705642..5af7ec728946 100644 --- a/src/coreclr/src/debug/ee/amd64/amd64walker.cpp +++ b/src/coreclr/src/debug/ee/amd64/amd64walker.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: Amd64walker.cpp // diff --git a/src/coreclr/src/debug/ee/amd64/dbghelpers.S b/src/coreclr/src/debug/ee/amd64/dbghelpers.S index 4368090beea1..e92f03fa6a61 100644 --- a/src/coreclr/src/debug/ee/amd64/dbghelpers.S +++ b/src/coreclr/src/debug/ee/amd64/dbghelpers.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. .intel_syntax noprefix #include "unixasmmacros.inc" diff --git a/src/coreclr/src/debug/ee/amd64/dbghelpers.asm b/src/coreclr/src/debug/ee/amd64/dbghelpers.asm index 663793fdf178..49f01283829d 100644 --- a/src/coreclr/src/debug/ee/amd64/dbghelpers.asm +++ b/src/coreclr/src/debug/ee/amd64/dbghelpers.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. include AsmMacros.inc diff --git a/src/coreclr/src/debug/ee/amd64/debuggerregdisplayhelper.cpp b/src/coreclr/src/debug/ee/amd64/debuggerregdisplayhelper.cpp index 800ee9a72eff..4ca44c444117 100644 --- a/src/coreclr/src/debug/ee/amd64/debuggerregdisplayhelper.cpp +++ b/src/coreclr/src/debug/ee/amd64/debuggerregdisplayhelper.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* ------------------------------------------------------------------------- * * DebuggerRegDisplayHelper.cpp -- implementation of the platform-dependent // diff --git a/src/coreclr/src/debug/ee/amd64/gen_amd64InstrDecode/Amd64InstructionTableGenerator.cs b/src/coreclr/src/debug/ee/amd64/gen_amd64InstrDecode/Amd64InstructionTableGenerator.cs index ed1dc1c87fc7..7264cd24432c 100644 --- a/src/coreclr/src/debug/ee/amd64/gen_amd64InstrDecode/Amd64InstructionTableGenerator.cs +++ b/src/coreclr/src/debug/ee/amd64/gen_amd64InstrDecode/Amd64InstructionTableGenerator.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -805,7 +804,6 @@ void WriteCode() Console.WriteLine("// Licensed to the .NET Foundation under one or more agreements."); Console.WriteLine("// The .NET Foundation licenses this file to you under the MIT license."); - Console.WriteLine("// See the LICENSE file in the project root for more information."); Console.WriteLine(); Console.WriteLine(); Console.WriteLine("// File machine generated. See gen_amd64InstrDecode/README.md"); diff --git a/src/coreclr/src/debug/ee/amd64/gen_amd64InstrDecode/createOpcodes.cpp b/src/coreclr/src/debug/ee/amd64/gen_amd64InstrDecode/createOpcodes.cpp index de4abb70c07c..fb3f17c223fd 100644 --- a/src/coreclr/src/debug/ee/amd64/gen_amd64InstrDecode/createOpcodes.cpp +++ b/src/coreclr/src/debug/ee/amd64/gen_amd64InstrDecode/createOpcodes.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include diff --git a/src/coreclr/src/debug/ee/amd64/primitives.cpp b/src/coreclr/src/debug/ee/amd64/primitives.cpp index 8e820048fd80..bcbe852b1123 100644 --- a/src/coreclr/src/debug/ee/amd64/primitives.cpp +++ b/src/coreclr/src/debug/ee/amd64/primitives.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/debug/ee/arm/armwalker.cpp b/src/coreclr/src/debug/ee/arm/armwalker.cpp index 062e1de8b212..6963acd405ee 100644 --- a/src/coreclr/src/debug/ee/arm/armwalker.cpp +++ b/src/coreclr/src/debug/ee/arm/armwalker.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: armwalker.cpp // diff --git a/src/coreclr/src/debug/ee/arm/dbghelpers.S b/src/coreclr/src/debug/ee/arm/dbghelpers.S index 32948438d974..e88a5b0b5463 100644 --- a/src/coreclr/src/debug/ee/arm/dbghelpers.S +++ b/src/coreclr/src/debug/ee/arm/dbghelpers.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "unixasmmacros.inc" diff --git a/src/coreclr/src/debug/ee/arm/dbghelpers.asm b/src/coreclr/src/debug/ee/arm/dbghelpers.asm index 2003ce6af03a..0d1040859af4 100644 --- a/src/coreclr/src/debug/ee/arm/dbghelpers.asm +++ b/src/coreclr/src/debug/ee/arm/dbghelpers.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. #include "ksarm.h" #include "asmconstants.h" diff --git a/src/coreclr/src/debug/ee/arm/primitives.cpp b/src/coreclr/src/debug/ee/arm/primitives.cpp index a37ffa988028..4c085699e06b 100644 --- a/src/coreclr/src/debug/ee/arm/primitives.cpp +++ b/src/coreclr/src/debug/ee/arm/primitives.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/debug/ee/arm64/arm64walker.cpp b/src/coreclr/src/debug/ee/arm64/arm64walker.cpp index 955244676087..d46b07958b72 100644 --- a/src/coreclr/src/debug/ee/arm64/arm64walker.cpp +++ b/src/coreclr/src/debug/ee/arm64/arm64walker.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: Arm64walker.cpp // diff --git a/src/coreclr/src/debug/ee/arm64/dbghelpers.S b/src/coreclr/src/debug/ee/arm64/dbghelpers.S index 64932f322be1..8fc88fa25735 100644 --- a/src/coreclr/src/debug/ee/arm64/dbghelpers.S +++ b/src/coreclr/src/debug/ee/arm64/dbghelpers.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "asmconstants.h" #include "unixasmmacros.inc" diff --git a/src/coreclr/src/debug/ee/arm64/dbghelpers.asm b/src/coreclr/src/debug/ee/arm64/dbghelpers.asm index 08fe801ceaea..3ce1d8a207cb 100644 --- a/src/coreclr/src/debug/ee/arm64/dbghelpers.asm +++ b/src/coreclr/src/debug/ee/arm64/dbghelpers.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. #include "ksarm64.h" #include "asmconstants.h" diff --git a/src/coreclr/src/debug/ee/arm64/primitives.cpp b/src/coreclr/src/debug/ee/arm64/primitives.cpp index 2144a179bbc8..3cfee11c692b 100644 --- a/src/coreclr/src/debug/ee/arm64/primitives.cpp +++ b/src/coreclr/src/debug/ee/arm64/primitives.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/debug/ee/canary.cpp b/src/coreclr/src/debug/ee/canary.cpp index 554a3f16dd52..6ae9eafe5304 100644 --- a/src/coreclr/src/debug/ee/canary.cpp +++ b/src/coreclr/src/debug/ee/canary.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: Canary.cpp // diff --git a/src/coreclr/src/debug/ee/canary.h b/src/coreclr/src/debug/ee/canary.h index 54ad28e22892..225c7652e072 100644 --- a/src/coreclr/src/debug/ee/canary.h +++ b/src/coreclr/src/debug/ee/canary.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: Canary.h // diff --git a/src/coreclr/src/debug/ee/controller.cpp b/src/coreclr/src/debug/ee/controller.cpp index cd7dc03273ea..81d7ad6c6042 100644 --- a/src/coreclr/src/debug/ee/controller.cpp +++ b/src/coreclr/src/debug/ee/controller.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ==++== // @@ -8670,8 +8669,8 @@ DebuggerEnCBreakpoint::DebuggerEnCBreakpoint(SIZE_T offset, DebuggerEnCBreakpoint::TriggerType fTriggerType, AppDomain *pAppDomain) : DebuggerController(NULL, pAppDomain), - m_fTriggerType(fTriggerType), - m_jitInfo(jitInfo) + m_jitInfo(jitInfo), + m_fTriggerType(fTriggerType) { _ASSERTE( jitInfo != NULL ); // Add and activate the specified patch diff --git a/src/coreclr/src/debug/ee/controller.h b/src/coreclr/src/debug/ee/controller.h index 155b020b01c7..8d87e9dc2573 100644 --- a/src/coreclr/src/debug/ee/controller.h +++ b/src/coreclr/src/debug/ee/controller.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: controller.h // diff --git a/src/coreclr/src/debug/ee/controller.inl b/src/coreclr/src/debug/ee/controller.inl index 12355cdf12f1..059e9b255ece 100644 --- a/src/coreclr/src/debug/ee/controller.inl +++ b/src/coreclr/src/debug/ee/controller.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: controller.inl // diff --git a/src/coreclr/src/debug/ee/dactable.cpp b/src/coreclr/src/debug/ee/dactable.cpp index 5313761ad071..a5490ac144a0 100644 --- a/src/coreclr/src/debug/ee/dactable.cpp +++ b/src/coreclr/src/debug/ee/dactable.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: dacglobals.cpp // @@ -35,10 +34,6 @@ extern PCODE g_FCDynamicallyAssignedImplementations; extern DWORD gThreadTLSIndex; extern DWORD gAppDomainTLSIndex; -#ifdef FEATURE_APPX -extern BOOL g_fAppX; -#endif // FEATURE_APPX - DLLEXPORT DacGlobals g_dacTable; diff --git a/src/coreclr/src/debug/ee/datatest.h b/src/coreclr/src/debug/ee/datatest.h index 0c167b39ad0f..d0256a2ce5f5 100644 --- a/src/coreclr/src/debug/ee/datatest.h +++ b/src/coreclr/src/debug/ee/datatest.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: DataTest.h // diff --git a/src/coreclr/src/debug/ee/debugger.cpp b/src/coreclr/src/debug/ee/debugger.cpp index 19af1f2c940a..7b2cd48b22ed 100644 --- a/src/coreclr/src/debug/ee/debugger.cpp +++ b/src/coreclr/src/debug/ee/debugger.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: debugger.cpp // @@ -12896,8 +12895,8 @@ class EnCSequencePointHelper // is a valid Remap Breakpoint location (not in a special offset, must be empty stack, and not in a handler. // EnCSequencePointHelper::EnCSequencePointHelper(DebuggerJitInfo *pJitInfo) - : m_pOffsetToHandlerInfo(NULL), - m_pJitInfo(pJitInfo) + : m_pJitInfo(pJitInfo), + m_pOffsetToHandlerInfo(NULL) { CONTRACTL { diff --git a/src/coreclr/src/debug/ee/debugger.h b/src/coreclr/src/debug/ee/debugger.h index 8c59c4bc5bed..2450ab65d4f9 100644 --- a/src/coreclr/src/debug/ee/debugger.h +++ b/src/coreclr/src/debug/ee/debugger.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: debugger.h // diff --git a/src/coreclr/src/debug/ee/debugger.inl b/src/coreclr/src/debug/ee/debugger.inl index 7ae2a3512815..0eba7edccf87 100644 --- a/src/coreclr/src/debug/ee/debugger.inl +++ b/src/coreclr/src/debug/ee/debugger.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: debugger.inl // diff --git a/src/coreclr/src/debug/ee/debuggermodule.cpp b/src/coreclr/src/debug/ee/debuggermodule.cpp index 0c20531c478e..fb6fa53652fb 100644 --- a/src/coreclr/src/debug/ee/debuggermodule.cpp +++ b/src/coreclr/src/debug/ee/debuggermodule.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: DebuggerModule.cpp // diff --git a/src/coreclr/src/debug/ee/frameinfo.cpp b/src/coreclr/src/debug/ee/frameinfo.cpp index 1f043f710aed..011c7a1839c7 100644 --- a/src/coreclr/src/debug/ee/frameinfo.cpp +++ b/src/coreclr/src/debug/ee/frameinfo.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: frameinfo.cpp // diff --git a/src/coreclr/src/debug/ee/frameinfo.h b/src/coreclr/src/debug/ee/frameinfo.h index 36f34a12165d..9acb883d3b91 100644 --- a/src/coreclr/src/debug/ee/frameinfo.h +++ b/src/coreclr/src/debug/ee/frameinfo.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: frameinfo.h // diff --git a/src/coreclr/src/debug/ee/funceval.cpp b/src/coreclr/src/debug/ee/funceval.cpp index 3fe1b7fd917e..0febdcbaef7f 100644 --- a/src/coreclr/src/debug/ee/funceval.cpp +++ b/src/coreclr/src/debug/ee/funceval.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // **************************************************************************** // File: funceval.cpp // diff --git a/src/coreclr/src/debug/ee/functioninfo.cpp b/src/coreclr/src/debug/ee/functioninfo.cpp index 57424f62a6af..bba309422718 100644 --- a/src/coreclr/src/debug/ee/functioninfo.cpp +++ b/src/coreclr/src/debug/ee/functioninfo.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. -// See the LICENSE file in the project root for more information. //***************************************************************************** - // // File: DebuggerModule.cpp // diff --git a/src/coreclr/src/debug/ee/i386/dbghelpers.S b/src/coreclr/src/debug/ee/i386/dbghelpers.S index f15ca5abd8a2..16440fb1d0f6 100644 --- a/src/coreclr/src/debug/ee/i386/dbghelpers.S +++ b/src/coreclr/src/debug/ee/i386/dbghelpers.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. .intel_syntax noprefix #include "unixasmmacros.inc" diff --git a/src/coreclr/src/debug/ee/i386/dbghelpers.asm b/src/coreclr/src/debug/ee/i386/dbghelpers.asm index 2d403bf7bf28..7825dee6ab7e 100644 --- a/src/coreclr/src/debug/ee/i386/dbghelpers.asm +++ b/src/coreclr/src/debug/ee/i386/dbghelpers.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ; ==++== ; diff --git a/src/coreclr/src/debug/ee/i386/debuggerregdisplayhelper.cpp b/src/coreclr/src/debug/ee/i386/debuggerregdisplayhelper.cpp index 5bee1c34f7df..bda129a9b954 100644 --- a/src/coreclr/src/debug/ee/i386/debuggerregdisplayhelper.cpp +++ b/src/coreclr/src/debug/ee/i386/debuggerregdisplayhelper.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* ------------------------------------------------------------------------- * * DebuggerRegDisplayHelper.cpp -- implementation of the platform-dependent // diff --git a/src/coreclr/src/debug/ee/i386/primitives.cpp b/src/coreclr/src/debug/ee/i386/primitives.cpp index 2225335cd13d..0b2f8f920003 100644 --- a/src/coreclr/src/debug/ee/i386/primitives.cpp +++ b/src/coreclr/src/debug/ee/i386/primitives.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/debug/ee/i386/x86walker.cpp b/src/coreclr/src/debug/ee/i386/x86walker.cpp index fd6799c15ccd..ef7dabb3be4c 100644 --- a/src/coreclr/src/debug/ee/i386/x86walker.cpp +++ b/src/coreclr/src/debug/ee/i386/x86walker.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: x86walker.cpp // diff --git a/src/coreclr/src/debug/ee/rcthread.cpp b/src/coreclr/src/debug/ee/rcthread.cpp index c119dbcc2dda..29d2f57fbf00 100644 --- a/src/coreclr/src/debug/ee/rcthread.cpp +++ b/src/coreclr/src/debug/ee/rcthread.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: RCThread.cpp // diff --git a/src/coreclr/src/debug/ee/shared.cpp b/src/coreclr/src/debug/ee/shared.cpp index ee3d8c98e9b2..f6182eb17be1 100644 --- a/src/coreclr/src/debug/ee/shared.cpp +++ b/src/coreclr/src/debug/ee/shared.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/debug/ee/stdafx.h b/src/coreclr/src/debug/ee/stdafx.h index 874e4d34a7e4..59ec55faa9a7 100644 --- a/src/coreclr/src/debug/ee/stdafx.h +++ b/src/coreclr/src/debug/ee/stdafx.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: stdafx.h // diff --git a/src/coreclr/src/debug/ee/walker.h b/src/coreclr/src/debug/ee/walker.h index 123d39dbdf11..d16d4c740c89 100644 --- a/src/coreclr/src/debug/ee/walker.h +++ b/src/coreclr/src/debug/ee/walker.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: walker.h // diff --git a/src/coreclr/src/debug/ee/wks/CMakeLists.txt b/src/coreclr/src/debug/ee/wks/CMakeLists.txt index ee6c482ce761..a6891ebb052c 100644 --- a/src/coreclr/src/debug/ee/wks/CMakeLists.txt +++ b/src/coreclr/src/debug/ee/wks/CMakeLists.txt @@ -9,9 +9,9 @@ if (CLR_CMAKE_TARGET_WIN32) if(CLR_CMAKE_HOST_ARCH_ARM OR CLR_CMAKE_HOST_ARCH_ARM64) - preprocess_compile_asm(ASM_FILES ${ASM_FILE} OUTPUT_OBJECTS ASM_OBJECTS) + preprocess_compile_asm(TARGET cordbee_wks ASM_FILES ${ASM_FILE} OUTPUT_OBJECTS ASM_OBJECTS) - add_library_clr(cordbee_wks ${CORDBEE_SOURCES_WKS} ${ASM_OBJECTS}) + add_library_clr(cordbee_wks OBJECT ${CORDBEE_SOURCES_WKS} ${ASM_FILE} ${ASM_OBJECTS}) else () @@ -23,14 +23,14 @@ if (CLR_CMAKE_TARGET_WIN32) set_source_files_properties(${ASM_FILE} PROPERTIES COMPILE_OPTIONS "${ASM_OPTIONS}") - add_library_clr(cordbee_wks ${CORDBEE_SOURCES_WKS} ${ASM_FILE}) + add_library_clr(cordbee_wks OBJECT ${CORDBEE_SOURCES_WKS} ${ASM_FILE}) endif() else () if(CLR_CMAKE_HOST_ARCH_AMD64 OR CLR_CMAKE_HOST_ARCH_ARM OR CLR_CMAKE_HOST_ARCH_ARM64 OR CLR_CMAKE_HOST_ARCH_I386) - add_library_clr(cordbee_wks ${CORDBEE_SOURCES_WKS} ../${ARCH_SOURCES_DIR}/dbghelpers.S) + add_library_clr(cordbee_wks OBJECT ${CORDBEE_SOURCES_WKS} ../${ARCH_SOURCES_DIR}/dbghelpers.S) else() message(FATAL_ERROR "Unknown platform") endif() diff --git a/src/coreclr/src/debug/ildbsymlib/CMakeLists.txt b/src/coreclr/src/debug/ildbsymlib/CMakeLists.txt index 88364658f110..b5b249228d26 100644 --- a/src/coreclr/src/debug/ildbsymlib/CMakeLists.txt +++ b/src/coreclr/src/debug/ildbsymlib/CMakeLists.txt @@ -10,5 +10,5 @@ set( ILDBSYMLIB_SOURCES symwrite.cpp ) -add_library_clr(ildbsymlib ${ILDBSYMLIB_SOURCES}) +add_library_clr(ildbsymlib OBJECT ${ILDBSYMLIB_SOURCES}) diff --git a/src/coreclr/src/debug/ildbsymlib/classfactory.h b/src/coreclr/src/debug/ildbsymlib/classfactory.h index 5c02d0283cd2..6cdc80b462f6 100644 --- a/src/coreclr/src/debug/ildbsymlib/classfactory.h +++ b/src/coreclr/src/debug/ildbsymlib/classfactory.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: ClassFactory.h // diff --git a/src/coreclr/src/debug/ildbsymlib/ildbsymbols.cpp b/src/coreclr/src/debug/ildbsymlib/ildbsymbols.cpp index a7d459ce1cd1..789f1877c1d6 100644 --- a/src/coreclr/src/debug/ildbsymlib/ildbsymbols.cpp +++ b/src/coreclr/src/debug/ildbsymlib/ildbsymbols.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: ildbsymbols.cpp // diff --git a/src/coreclr/src/debug/ildbsymlib/pch.h b/src/coreclr/src/debug/ildbsymlib/pch.h index cde69f6df31e..59582eba8ec0 100644 --- a/src/coreclr/src/debug/ildbsymlib/pch.h +++ b/src/coreclr/src/debug/ildbsymlib/pch.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: pch.h // diff --git a/src/coreclr/src/debug/ildbsymlib/pdbdata.h b/src/coreclr/src/debug/ildbsymlib/pdbdata.h index cf09d782e760..97df443a3fac 100644 --- a/src/coreclr/src/debug/ildbsymlib/pdbdata.h +++ b/src/coreclr/src/debug/ildbsymlib/pdbdata.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: pdbdata.h // diff --git a/src/coreclr/src/debug/ildbsymlib/symbinder.cpp b/src/coreclr/src/debug/ildbsymlib/symbinder.cpp index 721d21b70595..c4c3146a60c6 100644 --- a/src/coreclr/src/debug/ildbsymlib/symbinder.cpp +++ b/src/coreclr/src/debug/ildbsymlib/symbinder.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: symbinder.cpp // diff --git a/src/coreclr/src/debug/ildbsymlib/symbinder.h b/src/coreclr/src/debug/ildbsymlib/symbinder.h index d1a21c0d9a4e..ff487314a5ff 100644 --- a/src/coreclr/src/debug/ildbsymlib/symbinder.h +++ b/src/coreclr/src/debug/ildbsymlib/symbinder.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: SymBinder.h // diff --git a/src/coreclr/src/debug/ildbsymlib/symread.cpp b/src/coreclr/src/debug/ildbsymlib/symread.cpp index 9c72a80a05d0..61588f9f6849 100644 --- a/src/coreclr/src/debug/ildbsymlib/symread.cpp +++ b/src/coreclr/src/debug/ildbsymlib/symread.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: symread.cpp // diff --git a/src/coreclr/src/debug/ildbsymlib/symread.h b/src/coreclr/src/debug/ildbsymlib/symread.h index 9bdcef0d11fd..a82af393f326 100644 --- a/src/coreclr/src/debug/ildbsymlib/symread.h +++ b/src/coreclr/src/debug/ildbsymlib/symread.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: SymRead.h // diff --git a/src/coreclr/src/debug/ildbsymlib/symwrite.cpp b/src/coreclr/src/debug/ildbsymlib/symwrite.cpp index 8f48bd31d191..1f19186c7b59 100644 --- a/src/coreclr/src/debug/ildbsymlib/symwrite.cpp +++ b/src/coreclr/src/debug/ildbsymlib/symwrite.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: symwrite.cpp // diff --git a/src/coreclr/src/debug/ildbsymlib/symwrite.h b/src/coreclr/src/debug/ildbsymlib/symwrite.h index 0ea114a41a33..b62407497c23 100644 --- a/src/coreclr/src/debug/ildbsymlib/symwrite.h +++ b/src/coreclr/src/debug/ildbsymlib/symwrite.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: SymWrite.h // diff --git a/src/coreclr/src/debug/ildbsymlib/umisc.h b/src/coreclr/src/debug/ildbsymlib/umisc.h index e34759363158..78c3ea3d5561 100644 --- a/src/coreclr/src/debug/ildbsymlib/umisc.h +++ b/src/coreclr/src/debug/ildbsymlib/umisc.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: umisc.h // diff --git a/src/coreclr/src/debug/inc/amd64/primitives.h b/src/coreclr/src/debug/inc/amd64/primitives.h index 0f9aa3e05847..d1e02238ece8 100644 --- a/src/coreclr/src/debug/inc/amd64/primitives.h +++ b/src/coreclr/src/debug/inc/amd64/primitives.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: primitives.h // diff --git a/src/coreclr/src/debug/inc/arm/primitives.h b/src/coreclr/src/debug/inc/arm/primitives.h index 81b23ebe2b93..a360737b8973 100644 --- a/src/coreclr/src/debug/inc/arm/primitives.h +++ b/src/coreclr/src/debug/inc/arm/primitives.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: primitives.h // diff --git a/src/coreclr/src/debug/inc/arm64/primitives.h b/src/coreclr/src/debug/inc/arm64/primitives.h index 1c6696870e91..b0ab65bac15e 100644 --- a/src/coreclr/src/debug/inc/arm64/primitives.h +++ b/src/coreclr/src/debug/inc/arm64/primitives.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: primitives.h // diff --git a/src/coreclr/src/debug/inc/arm_primitives.h b/src/coreclr/src/debug/inc/arm_primitives.h index 2b23ca79422d..bab960815529 100644 --- a/src/coreclr/src/debug/inc/arm_primitives.h +++ b/src/coreclr/src/debug/inc/arm_primitives.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: arm_primitives.h // diff --git a/src/coreclr/src/debug/inc/common.h b/src/coreclr/src/debug/inc/common.h index e31ac3aac6c3..2baec963e14f 100644 --- a/src/coreclr/src/debug/inc/common.h +++ b/src/coreclr/src/debug/inc/common.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef DEBUGGER_COMMON_H #define DEBUGGER_COMMON_H diff --git a/src/coreclr/src/debug/inc/coreclrremotedebugginginterfaces.h b/src/coreclr/src/debug/inc/coreclrremotedebugginginterfaces.h index ac7ddb68ab81..dc9a7294770d 100644 --- a/src/coreclr/src/debug/inc/coreclrremotedebugginginterfaces.h +++ b/src/coreclr/src/debug/inc/coreclrremotedebugginginterfaces.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/debug/inc/dacdbiinterface.h b/src/coreclr/src/debug/inc/dacdbiinterface.h index 54ee344f8508..b2a5c54fae09 100644 --- a/src/coreclr/src/debug/inc/dacdbiinterface.h +++ b/src/coreclr/src/debug/inc/dacdbiinterface.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // DacDbiInterface.h // diff --git a/src/coreclr/src/debug/inc/dacdbistructures.h b/src/coreclr/src/debug/inc/dacdbistructures.h index 82b96dd5bb60..b515cd7f1f38 100644 --- a/src/coreclr/src/debug/inc/dacdbistructures.h +++ b/src/coreclr/src/debug/inc/dacdbistructures.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: DacDbiStructures.h // diff --git a/src/coreclr/src/debug/inc/dacdbistructures.inl b/src/coreclr/src/debug/inc/dacdbistructures.inl index 1fa0c53717ee..13be2ef16bc7 100644 --- a/src/coreclr/src/debug/inc/dacdbistructures.inl +++ b/src/coreclr/src/debug/inc/dacdbistructures.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // diff --git a/src/coreclr/src/debug/inc/dbgappdomain.h b/src/coreclr/src/debug/inc/dbgappdomain.h index 0939dd0e2a5d..7b7c362d7af0 100644 --- a/src/coreclr/src/debug/inc/dbgappdomain.h +++ b/src/coreclr/src/debug/inc/dbgappdomain.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef DbgAppDomain_H #define DbgAppDomain_H diff --git a/src/coreclr/src/debug/inc/dbgipcevents.h b/src/coreclr/src/debug/inc/dbgipcevents.h index 45c6bf9ad100..5c433c2bf613 100644 --- a/src/coreclr/src/debug/inc/dbgipcevents.h +++ b/src/coreclr/src/debug/inc/dbgipcevents.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* ------------------------------------------------------------------------- * * DbgIPCEvents.h -- header file for private Debugger data shared by various // diff --git a/src/coreclr/src/debug/inc/dbgipceventtypes.h b/src/coreclr/src/debug/inc/dbgipceventtypes.h index 42f42be6b84b..e538f63e4c2d 100644 --- a/src/coreclr/src/debug/inc/dbgipceventtypes.h +++ b/src/coreclr/src/debug/inc/dbgipceventtypes.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // Events that go both ways diff --git a/src/coreclr/src/debug/inc/dbgtargetcontext.h b/src/coreclr/src/debug/inc/dbgtargetcontext.h index 9c370020ebff..c4640aa64395 100644 --- a/src/coreclr/src/debug/inc/dbgtargetcontext.h +++ b/src/coreclr/src/debug/inc/dbgtargetcontext.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __DBG_TARGET_CONTEXT_INCLUDED #define __DBG_TARGET_CONTEXT_INCLUDED diff --git a/src/coreclr/src/debug/inc/dbgtransportsession.h b/src/coreclr/src/debug/inc/dbgtransportsession.h index 8de3d78c463f..6eb202039ab2 100644 --- a/src/coreclr/src/debug/inc/dbgtransportsession.h +++ b/src/coreclr/src/debug/inc/dbgtransportsession.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __DBG_TRANSPORT_SESSION_INCLUDED diff --git a/src/coreclr/src/debug/inc/dbgutil.h b/src/coreclr/src/debug/inc/dbgutil.h index 5f94c7276265..2120cf0dfb07 100644 --- a/src/coreclr/src/debug/inc/dbgutil.h +++ b/src/coreclr/src/debug/inc/dbgutil.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // dbgutil.h // diff --git a/src/coreclr/src/debug/inc/ddmarshalutil.h b/src/coreclr/src/debug/inc/ddmarshalutil.h index 421d1a10f9d4..015bf4662e55 100644 --- a/src/coreclr/src/debug/inc/ddmarshalutil.h +++ b/src/coreclr/src/debug/inc/ddmarshalutil.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // DDMarshalUtil.cpp diff --git a/src/coreclr/src/debug/inc/diagnosticsipc.h b/src/coreclr/src/debug/inc/diagnosticsipc.h index 225299c2b899..57c0576b9447 100644 --- a/src/coreclr/src/debug/inc/diagnosticsipc.h +++ b/src/coreclr/src/debug/inc/diagnosticsipc.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __DIAGNOSTICS_IPC_H__ #define __DIAGNOSTICS_IPC_H__ diff --git a/src/coreclr/src/debug/inc/dump/dumpcommon.h b/src/coreclr/src/debug/inc/dump/dumpcommon.h index 7c6268d44032..83a0f447c4ec 100644 --- a/src/coreclr/src/debug/inc/dump/dumpcommon.h +++ b/src/coreclr/src/debug/inc/dump/dumpcommon.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef DEBUGGER_DUMPCOMMON_H #define DEBUGGER_DUMPCOMMON_H diff --git a/src/coreclr/src/debug/inc/eventredirection.h b/src/coreclr/src/debug/inc/eventredirection.h index 770bf961a3df..6a9cd63a0e89 100644 --- a/src/coreclr/src/debug/inc/eventredirection.h +++ b/src/coreclr/src/debug/inc/eventredirection.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // diff --git a/src/coreclr/src/debug/inc/i386/primitives.h b/src/coreclr/src/debug/inc/i386/primitives.h index 42269dabd762..05b696a4a0f6 100644 --- a/src/coreclr/src/debug/inc/i386/primitives.h +++ b/src/coreclr/src/debug/inc/i386/primitives.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: primitives.h // diff --git a/src/coreclr/src/debug/inc/processdescriptor.h b/src/coreclr/src/debug/inc/processdescriptor.h index 89840b26a823..2a5e29932b3b 100644 --- a/src/coreclr/src/debug/inc/processdescriptor.h +++ b/src/coreclr/src/debug/inc/processdescriptor.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** #ifndef _PROCESSCONTEXT_H @@ -35,4 +34,4 @@ struct ProcessDescriptor LPCSTR m_ApplicationGroupId; }; -#endif // _PROCESSCONTEXT_H \ No newline at end of file +#endif // _PROCESSCONTEXT_H diff --git a/src/coreclr/src/debug/inc/readonlydatatargetfacade.h b/src/coreclr/src/debug/inc/readonlydatatargetfacade.h index 6f40a20d2936..505592ec0af7 100644 --- a/src/coreclr/src/debug/inc/readonlydatatargetfacade.h +++ b/src/coreclr/src/debug/inc/readonlydatatargetfacade.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // ReadOnlyDataTargetFacade.h // diff --git a/src/coreclr/src/debug/inc/readonlydatatargetfacade.inl b/src/coreclr/src/debug/inc/readonlydatatargetfacade.inl index 7d3e8da56d9b..71322c90889b 100644 --- a/src/coreclr/src/debug/inc/readonlydatatargetfacade.inl +++ b/src/coreclr/src/debug/inc/readonlydatatargetfacade.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: ReadOnlyDataTargetFacade.inl // diff --git a/src/coreclr/src/debug/inc/runtimeinfo.h b/src/coreclr/src/debug/inc/runtimeinfo.h index 95d3a02caced..c66024e9eb3a 100644 --- a/src/coreclr/src/debug/inc/runtimeinfo.h +++ b/src/coreclr/src/debug/inc/runtimeinfo.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma once diff --git a/src/coreclr/src/debug/inc/stringcopyholder.h b/src/coreclr/src/debug/inc/stringcopyholder.h index c4ce013b1239..e5f8452e2497 100644 --- a/src/coreclr/src/debug/inc/stringcopyholder.h +++ b/src/coreclr/src/debug/inc/stringcopyholder.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/debug/inc/twowaypipe.h b/src/coreclr/src/debug/inc/twowaypipe.h index 5a3d78ea97f7..c8b41b16c7f3 100644 --- a/src/coreclr/src/debug/inc/twowaypipe.h +++ b/src/coreclr/src/debug/inc/twowaypipe.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef TwoWayPipe_H diff --git a/src/coreclr/src/debug/runtimeinfo/runtimeinfo.cpp b/src/coreclr/src/debug/runtimeinfo/runtimeinfo.cpp index bf9272137d00..6fd43d8c331b 100644 --- a/src/coreclr/src/debug/runtimeinfo/runtimeinfo.cpp +++ b/src/coreclr/src/debug/runtimeinfo/runtimeinfo.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: runtimeinfo.cpp diff --git a/src/coreclr/src/debug/shared/amd64/primitives.cpp b/src/coreclr/src/debug/shared/amd64/primitives.cpp index 4752c6f6a249..1e06e9b6b5fa 100644 --- a/src/coreclr/src/debug/shared/amd64/primitives.cpp +++ b/src/coreclr/src/debug/shared/amd64/primitives.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: primitives.cpp // diff --git a/src/coreclr/src/debug/shared/arm/primitives.cpp b/src/coreclr/src/debug/shared/arm/primitives.cpp index c612b8980463..522bc574e141 100644 --- a/src/coreclr/src/debug/shared/arm/primitives.cpp +++ b/src/coreclr/src/debug/shared/arm/primitives.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: primitives.cpp // diff --git a/src/coreclr/src/debug/shared/arm64/primitives.cpp b/src/coreclr/src/debug/shared/arm64/primitives.cpp index 82fd3656651f..9bbf0308319b 100644 --- a/src/coreclr/src/debug/shared/arm64/primitives.cpp +++ b/src/coreclr/src/debug/shared/arm64/primitives.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: primitives.cpp // diff --git a/src/coreclr/src/debug/shared/dbgtransportsession.cpp b/src/coreclr/src/debug/shared/dbgtransportsession.cpp index e719c1286876..d179288249d4 100644 --- a/src/coreclr/src/debug/shared/dbgtransportsession.cpp +++ b/src/coreclr/src/debug/shared/dbgtransportsession.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "dbgtransportsession.h" diff --git a/src/coreclr/src/debug/shared/i386/primitives.cpp b/src/coreclr/src/debug/shared/i386/primitives.cpp index e9d3baa4c14b..19f0c5d63c48 100644 --- a/src/coreclr/src/debug/shared/i386/primitives.cpp +++ b/src/coreclr/src/debug/shared/i386/primitives.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: primitives.cpp // diff --git a/src/coreclr/src/debug/shared/stringcopyholder.cpp b/src/coreclr/src/debug/shared/stringcopyholder.cpp index 1a15dbc8302c..561afcd388e0 100644 --- a/src/coreclr/src/debug/shared/stringcopyholder.cpp +++ b/src/coreclr/src/debug/shared/stringcopyholder.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // StringCopyHolder.cpp // diff --git a/src/coreclr/src/debug/shared/utils.cpp b/src/coreclr/src/debug/shared/utils.cpp index 170786672aaf..5363e30ee8a8 100644 --- a/src/coreclr/src/debug/shared/utils.cpp +++ b/src/coreclr/src/debug/shared/utils.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // Type-safe helper wrapper to get an EXCEPTION_RECORD slot as a CORDB_ADDRESS // diff --git a/src/coreclr/src/debug/shim/debugshim.cpp b/src/coreclr/src/debug/shim/debugshim.cpp index 3b1d9363864e..25e7a25d6764 100644 --- a/src/coreclr/src/debug/shim/debugshim.cpp +++ b/src/coreclr/src/debug/shim/debugshim.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // debugshim.cpp // diff --git a/src/coreclr/src/debug/shim/debugshim.h b/src/coreclr/src/debug/shim/debugshim.h index f081c4570cde..5055d5a11b47 100644 --- a/src/coreclr/src/debug/shim/debugshim.h +++ b/src/coreclr/src/debug/shim/debugshim.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // debugshim.h // diff --git a/src/coreclr/src/dlls/clretwrc/clretwrc.rc b/src/coreclr/src/dlls/clretwrc/clretwrc.rc index 3c6f69b9d034..e1099a578f2c 100644 --- a/src/coreclr/src/dlls/clretwrc/clretwrc.rc +++ b/src/coreclr/src/dlls/clretwrc/clretwrc.rc @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #define FX_VER_FILEDESCRIPTION_STR "Microsoft .NET Runtime resources\0" diff --git a/src/coreclr/src/dlls/dbgshim/CMakeLists.txt b/src/coreclr/src/dlls/dbgshim/CMakeLists.txt index ef2d0e360782..54cedfeb2c29 100644 --- a/src/coreclr/src/dlls/dbgshim/CMakeLists.txt +++ b/src/coreclr/src/dlls/dbgshim/CMakeLists.txt @@ -24,25 +24,16 @@ else(CLR_CMAKE_TARGET_WIN32) set(DEF_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/dbgshim_unixexports.src) set(EXPORTS_FILE ${CMAKE_CURRENT_BINARY_DIR}/dbgshim.exports) generate_exports_file(${DEF_SOURCES} ${EXPORTS_FILE}) -endif(CLR_CMAKE_TARGET_WIN32) -if(CLR_CMAKE_HOST_LINUX OR CLR_CMAKE_HOST_FREEBSD OR CLR_CMAKE_HOST_NETBSD OR CLR_CMAKE_HOST_SUNOS) - # This option is necessary to ensure that the overloaded delete operator defined inside - # of the utilcode will be used instead of the standard library delete operator. - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Xlinker -Bsymbolic") + if(CLR_CMAKE_HOST_LINUX OR CLR_CMAKE_HOST_FREEBSD OR CLR_CMAKE_HOST_NETBSD OR CLR_CMAKE_HOST_SUNOS) + # This option is necessary to ensure that the overloaded delete operator defined inside + # of the utilcode will be used instead of the standard library delete operator. + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Xlinker -Bsymbolic") + endif(CLR_CMAKE_HOST_LINUX OR CLR_CMAKE_HOST_FREEBSD OR CLR_CMAKE_HOST_NETBSD OR CLR_CMAKE_HOST_SUNOS) - # Add linker exports file option - if(CLR_CMAKE_HOST_SUNOS) - set(EXPORTS_LINKER_OPTION -Wl,-M,${EXPORTS_FILE}) - else(CLR_CMAKE_HOST_SUNOS) - set(EXPORTS_LINKER_OPTION -Wl,--version-script=${EXPORTS_FILE}) - endif(CLR_CMAKE_HOST_SUNOS) -endif(CLR_CMAKE_HOST_LINUX OR CLR_CMAKE_HOST_FREEBSD OR CLR_CMAKE_HOST_NETBSD OR CLR_CMAKE_HOST_SUNOS) + set_exports_linker_option(${EXPORTS_FILE}) -if(CLR_CMAKE_HOST_OSX) - # Add linker exports file option - set(EXPORTS_LINKER_OPTION -Wl,-exported_symbols_list,${EXPORTS_FILE}) -endif(CLR_CMAKE_HOST_OSX) +endif(CLR_CMAKE_TARGET_WIN32) add_library_clr(dbgshim SHARED ${DBGSHIM_SOURCES}) diff --git a/src/coreclr/src/dlls/dbgshim/dbgshim.cpp b/src/coreclr/src/dlls/dbgshim/dbgshim.cpp index d894e7b98ee9..c428707d2cf7 100644 --- a/src/coreclr/src/dlls/dbgshim/dbgshim.cpp +++ b/src/coreclr/src/dlls/dbgshim/dbgshim.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // DbgShim.cpp // diff --git a/src/coreclr/src/dlls/dbgshim/dbgshim.h b/src/coreclr/src/dlls/dbgshim/dbgshim.h index 289f30eab329..392cd7b9286a 100644 --- a/src/coreclr/src/dlls/dbgshim/dbgshim.h +++ b/src/coreclr/src/dlls/dbgshim/dbgshim.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // DbgShim.h // diff --git a/src/coreclr/src/dlls/dbgshim/dbgshim.ntdef b/src/coreclr/src/dlls/dbgshim/dbgshim.ntdef index 1376cbcfe83e..2e254ab9d5fe 100644 --- a/src/coreclr/src/dlls/dbgshim/dbgshim.ntdef +++ b/src/coreclr/src/dlls/dbgshim/dbgshim.ntdef @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. EXPORTS CreateProcessForLaunch diff --git a/src/coreclr/src/dlls/dbgshim/dbgshim.rc b/src/coreclr/src/dlls/dbgshim/dbgshim.rc index 9e4153871899..9b4ac3b91284 100644 --- a/src/coreclr/src/dlls/dbgshim/dbgshim.rc +++ b/src/coreclr/src/dlls/dbgshim/dbgshim.rc @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #define FX_VER_FILEDESCRIPTION_STR "Microsoft .NET Runtime Multi-CLR Debugging Helper\0" diff --git a/src/coreclr/src/dlls/dbgshim/dbgshim_unixexports.src b/src/coreclr/src/dlls/dbgshim/dbgshim_unixexports.src index 013b739e6aa5..b1daf52e54f5 100644 --- a/src/coreclr/src/dlls/dbgshim/dbgshim_unixexports.src +++ b/src/coreclr/src/dlls/dbgshim/dbgshim_unixexports.src @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. CreateProcessForLaunch ResumeProcess diff --git a/src/coreclr/src/dlls/mscordac/CMakeLists.txt b/src/coreclr/src/dlls/mscordac/CMakeLists.txt index c32c8d1cbe25..94b61b52692f 100644 --- a/src/coreclr/src/dlls/mscordac/CMakeLists.txt +++ b/src/coreclr/src/dlls/mscordac/CMakeLists.txt @@ -71,34 +71,24 @@ else(CLR_CMAKE_HOST_WIN32) # Add lib redefines file to DAC list(APPEND CLR_DAC_SOURCES libredefines.S) endif(CLR_CMAKE_HOST_LINUX) -endif(CLR_CMAKE_HOST_WIN32) -if(CLR_CMAKE_HOST_LINUX OR CLR_CMAKE_HOST_FREEBSD OR CLR_CMAKE_HOST_NETBSD OR CLR_CMAKE_HOST_SUNOS) - # This option is necessary to ensure that the overloaded delete operator defined inside - # of the utilcode will be used instead of the standard library delete operator. - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Xlinker -Bsymbolic") - - # The following linked options can be inserted into the linker libraries list to - # ensure proper resolving of circular references between a subset of the libraries. - set(START_LIBRARY_GROUP -Wl,--start-group) - set(END_LIBRARY_GROUP -Wl,--end-group) - - # These options are used to force every object to be included even if it's unused. - set(START_WHOLE_ARCHIVE -Wl,--whole-archive) - set(END_WHOLE_ARCHIVE -Wl,--no-whole-archive) - - # Add linker exports file option - if(CLR_CMAKE_HOST_SUNOS) - set(EXPORTS_LINKER_OPTION -Wl,-M,${EXPORTS_FILE}) - else(CLR_CMAKE_HOST_SUNOS) - set(EXPORTS_LINKER_OPTION -Wl,--version-script=${EXPORTS_FILE}) - endif(CLR_CMAKE_HOST_SUNOS) -endif(CLR_CMAKE_HOST_LINUX OR CLR_CMAKE_HOST_FREEBSD OR CLR_CMAKE_HOST_NETBSD OR CLR_CMAKE_HOST_SUNOS) - -if(CLR_CMAKE_HOST_OSX) - # Add linker exports file option - set(EXPORTS_LINKER_OPTION -Wl,-exported_symbols_list,${EXPORTS_FILE}) -endif(CLR_CMAKE_HOST_OSX) + if(CLR_CMAKE_HOST_LINUX OR CLR_CMAKE_HOST_FREEBSD OR CLR_CMAKE_HOST_NETBSD OR CLR_CMAKE_HOST_SUNOS) + # This option is necessary to ensure that the overloaded delete operator defined inside + # of the utilcode will be used instead of the standard library delete operator. + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Xlinker -Bsymbolic") + + # The following linked options can be inserted into the linker libraries list to + # ensure proper resolving of circular references between a subset of the libraries. + set(START_LIBRARY_GROUP -Wl,--start-group) + set(END_LIBRARY_GROUP -Wl,--end-group) + + # These options are used to force every object to be included even if it's unused. + set(START_WHOLE_ARCHIVE -Wl,--whole-archive) + set(END_WHOLE_ARCHIVE -Wl,--no-whole-archive) + endif(CLR_CMAKE_HOST_LINUX OR CLR_CMAKE_HOST_FREEBSD OR CLR_CMAKE_HOST_NETBSD OR CLR_CMAKE_HOST_SUNOS) + + set_exports_linker_option(${EXPORTS_FILE}) +endif(CLR_CMAKE_HOST_WIN32) # Create object library to enable creation of proper dependency of mscordaccore.exp on mscordac.obj and # mscordaccore on both the mscordaccore.exp and mscordac.obj. diff --git a/src/coreclr/src/dlls/mscordac/Native.rc b/src/coreclr/src/dlls/mscordac/Native.rc index b98bc187e656..c16246a3e0d2 100644 --- a/src/coreclr/src/dlls/mscordac/Native.rc +++ b/src/coreclr/src/dlls/mscordac/Native.rc @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #define FX_VER_FILEDESCRIPTION_STR "Microsoft .NET External Data Access Support\0" diff --git a/src/coreclr/src/dlls/mscordac/mscordac.cpp b/src/coreclr/src/dlls/mscordac/mscordac.cpp index 45274bad55e1..53616c226961 100644 --- a/src/coreclr/src/dlls/mscordac/mscordac.cpp +++ b/src/coreclr/src/dlls/mscordac/mscordac.cpp @@ -1,3 +1,2 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/dlls/mscordac/mscordac.src b/src/coreclr/src/dlls/mscordac/mscordac.src index fb4a25bb9464..d94a4d610373 100644 --- a/src/coreclr/src/dlls/mscordac/mscordac.src +++ b/src/coreclr/src/dlls/mscordac/mscordac.src @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. EXPORTS DacDbiInterfaceInstance diff --git a/src/coreclr/src/dlls/mscordac/mscordac_unixexports.src b/src/coreclr/src/dlls/mscordac/mscordac_unixexports.src index 8423cff692cc..29c010b9e849 100644 --- a/src/coreclr/src/dlls/mscordac/mscordac_unixexports.src +++ b/src/coreclr/src/dlls/mscordac/mscordac_unixexports.src @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. DacDbiInterfaceInstance CLRDataCreateInstance @@ -34,6 +33,8 @@ nativeStringResourceTable_mscorrc #PAL_GetPALDirectoryW #PAL_get_stdout #PAL_get_stderr +#PAL_GetApplicationGroupId +#PAL_GetTransportName #PAL_GetCurrentThread #PAL_GetCpuLimit #PAL_GetNativeExceptionHolderHead diff --git a/src/coreclr/src/dlls/mscordbi/CMakeLists.txt b/src/coreclr/src/dlls/mscordbi/CMakeLists.txt index 39561e10a038..b87b3eadb6a1 100644 --- a/src/coreclr/src/dlls/mscordbi/CMakeLists.txt +++ b/src/coreclr/src/dlls/mscordbi/CMakeLists.txt @@ -39,25 +39,15 @@ else(CLR_CMAKE_HOST_WIN32) set(DEF_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/mscordbi_unixexports.src) set(EXPORTS_FILE ${CMAKE_CURRENT_BINARY_DIR}/mscordbi.exports) generate_exports_file(${DEF_SOURCES} ${EXPORTS_FILE}) -endif(CLR_CMAKE_HOST_WIN32) -if(CLR_CMAKE_HOST_LINUX OR CLR_CMAKE_HOST_FREEBSD OR CLR_CMAKE_HOST_NETBSD OR CLR_CMAKE_HOST_SUNOS) - # This option is necessary to ensure that the overloaded new/delete operators defined inside - # of the utilcode will be used instead of the standard library delete operator. - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Xlinker -Bsymbolic") - - # Add linker exports file option - if(CLR_CMAKE_HOST_SUNOS) - set(EXPORTS_LINKER_OPTION -Wl,-M,${EXPORTS_FILE}) - else(CLR_CMAKE_HOST_SUNOS) - set(EXPORTS_LINKER_OPTION -Wl,--version-script=${EXPORTS_FILE}) - endif(CLR_CMAKE_HOST_SUNOS) -endif(CLR_CMAKE_HOST_LINUX OR CLR_CMAKE_HOST_FREEBSD OR CLR_CMAKE_HOST_NETBSD OR CLR_CMAKE_HOST_SUNOS) - -if(CLR_CMAKE_HOST_OSX) - # Add linker exports file option - set(EXPORTS_LINKER_OPTION -Wl,-exported_symbols_list,${EXPORTS_FILE}) -endif(CLR_CMAKE_HOST_OSX) + if(CLR_CMAKE_HOST_LINUX OR CLR_CMAKE_HOST_FREEBSD OR CLR_CMAKE_HOST_NETBSD OR CLR_CMAKE_HOST_SUNOS) + # This option is necessary to ensure that the overloaded new/delete operators defined inside + # of the utilcode will be used instead of the standard library delete operator. + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Xlinker -Bsymbolic") + endif(CLR_CMAKE_HOST_LINUX OR CLR_CMAKE_HOST_FREEBSD OR CLR_CMAKE_HOST_NETBSD OR CLR_CMAKE_HOST_SUNOS) + + set_exports_linker_option(${EXPORTS_FILE}) +endif(CLR_CMAKE_HOST_WIN32) add_library_clr(mscordbi SHARED ${MSCORDBI_SOURCES}) target_precompile_header(TARGET mscordbi HEADER stdafx.h) diff --git a/src/coreclr/src/dlls/mscordbi/Native.rc b/src/coreclr/src/dlls/mscordbi/Native.rc index 529ae06f6b64..b64e37ec4162 100644 --- a/src/coreclr/src/dlls/mscordbi/Native.rc +++ b/src/coreclr/src/dlls/mscordbi/Native.rc @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #define FX_VER_FILEDESCRIPTION_STR "Microsoft .NET Runtime Debugging Services\0" diff --git a/src/coreclr/src/dlls/mscordbi/mscordbi.cpp b/src/coreclr/src/dlls/mscordbi/mscordbi.cpp index e03cf76c9f91..afd2cfe80022 100644 --- a/src/coreclr/src/dlls/mscordbi/mscordbi.cpp +++ b/src/coreclr/src/dlls/mscordbi/mscordbi.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // MSCorDBI.cpp // diff --git a/src/coreclr/src/dlls/mscordbi/mscordbi.src b/src/coreclr/src/dlls/mscordbi/mscordbi.src index 5c69a1884b67..04f7c172b9bd 100644 --- a/src/coreclr/src/dlls/mscordbi/mscordbi.src +++ b/src/coreclr/src/dlls/mscordbi/mscordbi.src @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. LIBRARY mscordbi diff --git a/src/coreclr/src/dlls/mscordbi/mscordbi_unixexports.src b/src/coreclr/src/dlls/mscordbi/mscordbi_unixexports.src index aeb92368a0a6..1ff9d997a445 100644 --- a/src/coreclr/src/dlls/mscordbi/mscordbi_unixexports.src +++ b/src/coreclr/src/dlls/mscordbi/mscordbi_unixexports.src @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ; COM-instantiation DllGetClassObjectInternal diff --git a/src/coreclr/src/dlls/mscordbi/stdafx.h b/src/coreclr/src/dlls/mscordbi/stdafx.h index feb0145d556f..85496ff96326 100644 --- a/src/coreclr/src/dlls/mscordbi/stdafx.h +++ b/src/coreclr/src/dlls/mscordbi/stdafx.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // stdafx.h // diff --git a/src/coreclr/src/dlls/mscoree/Native.rc b/src/coreclr/src/dlls/mscoree/Native.rc index faa7ea16c23d..a0e4fe810a12 100644 --- a/src/coreclr/src/dlls/mscoree/Native.rc +++ b/src/coreclr/src/dlls/mscoree/Native.rc @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #define FX_VER_FILEDESCRIPTION_STR "Microsoft .NET Runtime\0" diff --git a/src/coreclr/src/dlls/mscoree/coreclr/CMakeLists.txt b/src/coreclr/src/dlls/mscoree/coreclr/CMakeLists.txt index 32fb9e26f5b8..f01133ce40ff 100644 --- a/src/coreclr/src/dlls/mscoree/coreclr/CMakeLists.txt +++ b/src/coreclr/src/dlls/mscoree/coreclr/CMakeLists.txt @@ -5,7 +5,8 @@ if (CLR_CMAKE_TARGET_WIN32) endif (CLR_CMAKE_TARGET_WIN32) if (CLR_CMAKE_HOST_WIN32) - preprocess_file(${DEF_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/coreclr.def) + set (DEF_FILE ${CMAKE_CURRENT_BINARY_DIR}/coreclr.def) + preprocess_file(${DEF_SOURCES} ${DEF_FILE}) list(APPEND CLR_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/coreclr.def) @@ -42,22 +43,16 @@ else(CLR_CMAKE_HOST_WIN32) # These options are used to force every object to be included even if it's unused. set(START_WHOLE_ARCHIVE -Wl,--whole-archive) set(END_WHOLE_ARCHIVE -Wl,--no-whole-archive) - - if(CLR_CMAKE_TARGET_SUNOS) - set(EXPORTS_LINKER_OPTION -Wl,-M,${EXPORTS_FILE}) - elseif(CLR_CMAKE_TARGET_SUNOS) - set(EXPORTS_LINKER_OPTION -Wl,--version-script=${EXPORTS_FILE}) - endif(CLR_CMAKE_TARGET_SUNOS) endif(CLR_CMAKE_TARGET_LINUX OR CLR_CMAKE_TARGET_FREEBSD OR CLR_CMAKE_TARGET_NETBSD OR CLR_CMAKE_TARGET_SUNOS) if(CLR_CMAKE_TARGET_OSX) # These options are used to force every object to be included even if it's unused. set(START_WHOLE_ARCHIVE -force_load) set(END_WHOLE_ARCHIVE ) - - set(EXPORTS_LINKER_OPTION -Wl,-exported_symbols_list,${EXPORTS_FILE}) endif(CLR_CMAKE_TARGET_OSX) + set_exports_linker_option(${EXPORTS_FILE}) + if(CLR_CMAKE_TARGET_ANDROID AND CLR_CMAKE_HOST_ARCH_ARM) set(EXPORTS_LINKER_OPTION "${EXPORTS_LINKER_OPTION} -Wl,--no-warn-shared-textrel") endif(CLR_CMAKE_TARGET_ANDROID AND CLR_CMAKE_HOST_ARCH_ARM) @@ -71,8 +66,18 @@ add_library_clr(coreclr ${CLR_SOURCES} ) +add_library_clr(coreclr_static + STATIC + ${CLR_SOURCES} +) + add_custom_target(coreclr_exports DEPENDS ${EXPORTS_FILE}) +add_custom_target(coreclr_def DEPENDS ${DEF_FILE}) + +add_dependencies(coreclr coreclr_def) add_dependencies(coreclr coreclr_exports) +add_dependencies(coreclr_static coreclr_def) +add_dependencies(coreclr_static coreclr_exports) set_property(TARGET coreclr APPEND_STRING PROPERTY LINK_FLAGS ${EXPORTS_LINKER_OPTION}) set_property(TARGET coreclr APPEND_STRING PROPERTY LINK_DEPENDS ${EXPORTS_FILE}) @@ -81,10 +86,6 @@ if (CLR_CMAKE_HOST_UNIX) set(LIB_UNWINDER unwinder_wks) endif (CLR_CMAKE_HOST_UNIX) -if(FEATURE_MERGE_JIT_AND_ENGINE) - set(CLRJIT_STATIC clrjit_static) -endif(FEATURE_MERGE_JIT_AND_ENGINE) - # IMPORTANT! Please do not rearrange the order of the libraries. The linker on Linux is # order dependent and changing the order can result in undefined symbols in the shared # library. @@ -94,7 +95,6 @@ set(CORECLR_LIBRARIES cordbee_wks debug-pal ${LIB_UNWINDER} - cee_wks v3binder ${END_LIBRARY_GROUP} # End group of libraries that have circular references mdcompiler_wks @@ -103,14 +103,12 @@ set(CORECLR_LIBRARIES mdhotdata_full bcltype ceefgen - ${CLRJIT_STATIC} comfloat_wks corguids gcinfo ildbsymlib utilcode v3binder - libraries-native System.Globalization.Native-Static interop ) @@ -166,7 +164,12 @@ if(FEATURE_EVENT_TRACE) endif(CLR_CMAKE_HOST_UNIX) endif(FEATURE_EVENT_TRACE) -target_link_libraries(coreclr ${CORECLR_LIBRARIES}) +if(FEATURE_MERGE_JIT_AND_ENGINE) + set(CLRJIT_STATIC clrjit_static) +endif(FEATURE_MERGE_JIT_AND_ENGINE) + +target_link_libraries(coreclr PUBLIC ${CORECLR_LIBRARIES} ${CLRJIT_STATIC} cee_wks cee_wks_core) +target_link_libraries(coreclr_static PUBLIC ${CORECLR_LIBRARIES} clrjit_static cee_wks_mergeable cee_wks_core) # Create the runtime module index header file containing the coreclr build id # for xplat and the timestamp/size on Windows. @@ -225,5 +228,8 @@ endif(CLR_CMAKE_TARGET_WIN32) # add the install targets install_clr(TARGETS coreclr ADDITIONAL_DESTINATION sharedFramework) +# publish coreclr_static lib +_install(TARGETS coreclr_static DESTINATION lib) + # Enable profile guided optimization add_pgo(coreclr) diff --git a/src/coreclr/src/dlls/mscoree/delayloadhook.cpp b/src/coreclr/src/dlls/mscoree/delayloadhook.cpp index 8f36d294fedf..b09cd75215a2 100644 --- a/src/coreclr/src/dlls/mscoree/delayloadhook.cpp +++ b/src/coreclr/src/dlls/mscoree/delayloadhook.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: delayloadhook.cpp // @@ -24,4 +23,4 @@ FARPROC WINAPI secureDelayHook(unsigned dliNotify, PDelayLoadInfo pdli) // This global hook is called prior to all the delay load LoadLibrary/GetProcAddress/etc. calls // Hooking this callback allows us to ensure that delay load LoadLibrary calls // specify the LOAD_LIBRARY_SEARCH_SYSTEM32 search path -const PfnDliHook __pfnDliNotifyHook2 = secureDelayHook; \ No newline at end of file +const PfnDliHook __pfnDliNotifyHook2 = secureDelayHook; diff --git a/src/coreclr/src/dlls/mscoree/mscoree.cpp b/src/coreclr/src/dlls/mscoree/mscoree.cpp index 2ad1e9d6f284..810a3e88f3fe 100644 --- a/src/coreclr/src/dlls/mscoree/mscoree.cpp +++ b/src/coreclr/src/dlls/mscoree/mscoree.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // MSCoree.cpp //***************************************************************************** diff --git a/src/coreclr/src/dlls/mscoree/mscorwks_ntdef.src b/src/coreclr/src/dlls/mscoree/mscorwks_ntdef.src index a93a787e35c6..987f67bc36af 100644 --- a/src/coreclr/src/dlls/mscoree/mscorwks_ntdef.src +++ b/src/coreclr/src/dlls/mscoree/mscorwks_ntdef.src @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. EXPORTS ; diff --git a/src/coreclr/src/dlls/mscoree/stdafx.cpp b/src/coreclr/src/dlls/mscoree/stdafx.cpp index a23e304c22e7..76cb42828ad2 100644 --- a/src/coreclr/src/dlls/mscoree/stdafx.cpp +++ b/src/coreclr/src/dlls/mscoree/stdafx.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // stdafx.cpp // diff --git a/src/coreclr/src/dlls/mscoree/stdafx.h b/src/coreclr/src/dlls/mscoree/stdafx.h index 4df1417ebf82..1573727298fe 100644 --- a/src/coreclr/src/dlls/mscoree/stdafx.h +++ b/src/coreclr/src/dlls/mscoree/stdafx.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // stdafx.h // diff --git a/src/coreclr/src/dlls/mscoree/unixinterface.cpp b/src/coreclr/src/dlls/mscoree/unixinterface.cpp index ca4d452a8eda..def877265312 100644 --- a/src/coreclr/src/dlls/mscoree/unixinterface.cpp +++ b/src/coreclr/src/dlls/mscoree/unixinterface.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** @@ -25,6 +24,9 @@ // Holder for const wide strings typedef NewArrayHolder ConstWStringHolder; +// Specifies whether coreclr is embedded or standalone +extern bool g_coreclr_embedded; + // Holder for array of wide strings class ConstWStringArrayHolder : public NewArrayHolder { @@ -171,8 +173,21 @@ int coreclr_initialize( unsigned int* domainId) { HRESULT hr; + + LPCWSTR* propertyKeysW; + LPCWSTR* propertyValuesW; + BundleProbe* bundleProbe = nullptr; + + ConvertConfigPropertiesToUnicode( + propertyKeys, + propertyValues, + propertyCount, + &propertyKeysW, + &propertyValuesW, + &bundleProbe); + #ifdef TARGET_UNIX - DWORD error = PAL_InitializeCoreCLR(exePath); + DWORD error = PAL_InitializeCoreCLR(exePath, g_coreclr_embedded); hr = HRESULT_FROM_WIN32(error); // If PAL initialization failed, then we should return right away and avoid @@ -190,18 +205,6 @@ int coreclr_initialize( ConstWStringHolder appDomainFriendlyNameW = StringToUnicode(appDomainFriendlyName); - LPCWSTR* propertyKeysW; - LPCWSTR* propertyValuesW; - BundleProbe* bundleProbe = nullptr; - - ConvertConfigPropertiesToUnicode( - propertyKeys, - propertyValues, - propertyCount, - &propertyKeysW, - &propertyValuesW, - &bundleProbe); - if (bundleProbe != nullptr) { static Bundle bundle(StringToUnicode(exePath), bundleProbe); diff --git a/src/coreclr/src/dlls/mscorpe/ceefilegenwriter.cpp b/src/coreclr/src/dlls/mscorpe/ceefilegenwriter.cpp index 1de4e817eab7..77afa5a83024 100644 --- a/src/coreclr/src/dlls/mscorpe/ceefilegenwriter.cpp +++ b/src/coreclr/src/dlls/mscorpe/ceefilegenwriter.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // Derived class from CCeeGen which handles writing out // the exe. All references to PEWriter pulled out of CCeeGen, // and moved here diff --git a/src/coreclr/src/dlls/mscorpe/ceefilegenwritertokens.cpp b/src/coreclr/src/dlls/mscorpe/ceefilegenwritertokens.cpp index 3503eaf67bd0..31b4d2041191 100644 --- a/src/coreclr/src/dlls/mscorpe/ceefilegenwritertokens.cpp +++ b/src/coreclr/src/dlls/mscorpe/ceefilegenwritertokens.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // CeeFileGenWriterTokens.cpp // diff --git a/src/coreclr/src/dlls/mscorpe/iceefilegen.cpp b/src/coreclr/src/dlls/mscorpe/iceefilegen.cpp index e6dbc1766264..a78f57a35475 100644 --- a/src/coreclr/src/dlls/mscorpe/iceefilegen.cpp +++ b/src/coreclr/src/dlls/mscorpe/iceefilegen.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: CEEGEN.CPP // =========================================================================== diff --git a/src/coreclr/src/dlls/mscorpe/pewriter.cpp b/src/coreclr/src/dlls/mscorpe/pewriter.cpp index e274bcf57137..dc8b7327f083 100644 --- a/src/coreclr/src/dlls/mscorpe/pewriter.cpp +++ b/src/coreclr/src/dlls/mscorpe/pewriter.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "stdafx.h" // Enable building with older SDKs that don't have IMAGE_FILE_MACHINE_ARM64 defined. diff --git a/src/coreclr/src/dlls/mscorpe/pewriter.h b/src/coreclr/src/dlls/mscorpe/pewriter.h index 487393612624..ee56061bedec 100644 --- a/src/coreclr/src/dlls/mscorpe/pewriter.h +++ b/src/coreclr/src/dlls/mscorpe/pewriter.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef PEWriter_H #define PEWriter_H diff --git a/src/coreclr/src/dlls/mscorpe/stdafx.cpp b/src/coreclr/src/dlls/mscorpe/stdafx.cpp index 6321e11d12a2..531fbf279d3b 100644 --- a/src/coreclr/src/dlls/mscorpe/stdafx.cpp +++ b/src/coreclr/src/dlls/mscorpe/stdafx.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // stdafx.cpp // diff --git a/src/coreclr/src/dlls/mscorpe/stdafx.h b/src/coreclr/src/dlls/mscorpe/stdafx.h index c97b552cdd81..996113b50015 100644 --- a/src/coreclr/src/dlls/mscorpe/stdafx.h +++ b/src/coreclr/src/dlls/mscorpe/stdafx.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // stdafx.h // diff --git a/src/coreclr/src/dlls/mscorpe/stubs.h b/src/coreclr/src/dlls/mscorpe/stubs.h index e1619884b3dc..893fc4783a27 100644 --- a/src/coreclr/src/dlls/mscorpe/stubs.h +++ b/src/coreclr/src/dlls/mscorpe/stubs.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // Stubs.h // diff --git a/src/coreclr/src/dlls/mscorrc/CMakeLists.txt b/src/coreclr/src/dlls/mscorrc/CMakeLists.txt index 08cf27aaf802..ed5ee8876508 100644 --- a/src/coreclr/src/dlls/mscorrc/CMakeLists.txt +++ b/src/coreclr/src/dlls/mscorrc/CMakeLists.txt @@ -19,7 +19,7 @@ if(CLR_CMAKE_HOST_WIN32) else() build_resources(${CMAKE_CURRENT_SOURCE_DIR}/include.rc mscorrc TARGET_CPP_FILE) - add_library_clr(mscorrc STATIC + add_library_clr(mscorrc OBJECT ${TARGET_CPP_FILE} ) endif(CLR_CMAKE_HOST_WIN32) diff --git a/src/coreclr/src/dlls/mscorrc/include.rc b/src/coreclr/src/dlls/mscorrc/include.rc index dfd5d0b379a8..7ca7481d7e83 100644 --- a/src/coreclr/src/dlls/mscorrc/include.rc +++ b/src/coreclr/src/dlls/mscorrc/include.rc @@ -1,5 +1,4 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "mscorrc.rc" diff --git a/src/coreclr/src/dlls/mscorrc/mscorrc.common.rc b/src/coreclr/src/dlls/mscorrc/mscorrc.common.rc index fd29c81e2410..ee8c730d444f 100644 --- a/src/coreclr/src/dlls/mscorrc/mscorrc.common.rc +++ b/src/coreclr/src/dlls/mscorrc/mscorrc.common.rc @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. STRINGTABLE DISCARDABLE BEGIN diff --git a/src/coreclr/src/dlls/mscorrc/mscorrc.rc b/src/coreclr/src/dlls/mscorrc/mscorrc.rc index c54d121ec9b6..a50f742cef00 100644 --- a/src/coreclr/src/dlls/mscorrc/mscorrc.rc +++ b/src/coreclr/src/dlls/mscorrc/mscorrc.rc @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //Microsoft Developer Studio generated resource script. // @@ -525,7 +524,6 @@ BEGIN IDS_EE_INVALIDCOMDEFITF "Type '%1' has an invalid default COM interface: '%2'." IDS_EE_COMDEFITFNOTSUPPORTED "Type '%1' does not support the specified default COM interface: '%2'" - IDS_EE_GUID_REPRESENTS_NON_VC "Type '%1' that has the requested GUID is not a value class." IDS_EE_CANNOT_MAP_TO_MANAGED_VC "The specified record cannot be mapped to a managed value class." IDS_EE_SAFEHANDLECLOSED "Safe handle has been closed" @@ -753,13 +751,6 @@ BEGIN STRINGTABLE DISCARDABLE BEGIN - IDS_EE_BADMARSHAL_TYPE_ANSIBSTR "Marshalling as AnsiBStr is not supported" - IDS_EE_BADMARSHAL_TYPE_VBBYVALSTR "Marshalling as VBByRefString is not supported" - IDS_EE_BADMARSHAL_TYPE_REFERENCECUSTOMMARSHALER "Custom marshalers are not supported" - IDS_EE_BADMARSHAL_TYPE_VARIANTASOBJECT "Marshalling between VARIANT and System.Object is not supported" - IDS_EE_BADMARSHAL_TYPE_ASANYA "Marshalling arbitrary types is not supported" - IDS_EE_BADMARSHAL_TYPE_IDISPATCH "Marshalling as IDispatch is not supported" - IDS_EE_ERROR_IDISPATCH "IDispatch and IDispatchEx are not supported" IDS_EE_ERROR_COM "COM is not supported" END diff --git a/src/coreclr/src/dlls/mscorrc/resource.h b/src/coreclr/src/dlls/mscorrc/resource.h index c1d09eadc428..738b751c7fae 100644 --- a/src/coreclr/src/dlls/mscorrc/resource.h +++ b/src/coreclr/src/dlls/mscorrc/resource.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //{{NO_DEPENDENCIES}} // Used by mscorrc.rc // @@ -272,7 +271,6 @@ #define IDS_EE_INVALIDCOMDEFITF 0x1a32 #define IDS_EE_COMDEFITFNOTSUPPORTED 0x1a33 -#define IDS_EE_GUID_REPRESENTS_NON_VC 0x1a35 #define IDS_EE_CANNOT_MAP_TO_MANAGED_VC 0x1a36 #define IDS_EE_MARSHAL_UNMAPPABLE_CHAR 0x1a37 @@ -571,14 +569,6 @@ #define IDS_EE_NATIVE_COM_WEAKREF_BAD_TYPE 0x262e #endif // FEATURE_COMINTEROP -#define IDS_EE_BADMARSHAL_TYPE_ANSIBSTR 0x262f -#define IDS_EE_BADMARSHAL_TYPE_VBBYVALSTR 0x2630 -#define IDS_EE_BADMARSHAL_TYPE_REFERENCECUSTOMMARSHALER 0x2631 -#define IDS_EE_BADMARSHAL_TYPE_VARIANTASOBJECT 0x2632 -#define IDS_EE_BADMARSHAL_TYPE_ASANYA 0x2633 -#define IDS_EE_BADMARSHAL_TYPE_IDISPATCH 0x2634 -#define IDS_EE_ERROR_IDISPATCH 0x2635 - #define IDS_HOST_ASSEMBLY_RESOLVER_ASSEMBLY_ALREADY_LOADED_IN_CONTEXT 0x2636 #define IDS_HOST_ASSEMBLY_RESOLVER_DYNAMICALLY_EMITTED_ASSEMBLIES_UNSUPPORTED 0x2637 #define IDS_HOST_ASSEMBLY_RESOLVER_INCOMPATIBLE_BINDING_CONTEXT 0x2638 diff --git a/src/coreclr/src/gc/env/common.cpp b/src/coreclr/src/gc/env/common.cpp index 313a4e48755c..1543e3f3e053 100644 --- a/src/coreclr/src/gc/env/common.cpp +++ b/src/coreclr/src/gc/env/common.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // common.cpp : source file that includes just the standard includes // GCSample.pch will be the pre-compiled header diff --git a/src/coreclr/src/gc/env/common.h b/src/coreclr/src/gc/env/common.h index 35a9fd1737db..02e142a23a60 100644 --- a/src/coreclr/src/gc/env/common.h +++ b/src/coreclr/src/gc/env/common.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // common.h : include file for standard system include files, // or project specific include files that are used frequently, but diff --git a/src/coreclr/src/gc/env/etmdummy.h b/src/coreclr/src/gc/env/etmdummy.h index ba4c4cf96a5d..3d0e220f436f 100644 --- a/src/coreclr/src/gc/env/etmdummy.h +++ b/src/coreclr/src/gc/env/etmdummy.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #define FireEtwGCStart(Count, Reason) 0 #define FireEtwGCStart_V1(Count, Depth, Reason, Type, ClrInstanceID) 0 diff --git a/src/coreclr/src/gc/env/gcenv.base.h b/src/coreclr/src/gc/env/gcenv.base.h index 70d66385c6ba..7132efae407c 100644 --- a/src/coreclr/src/gc/env/gcenv.base.h +++ b/src/coreclr/src/gc/env/gcenv.base.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __GCENV_BASE_INCLUDED__ #define __GCENV_BASE_INCLUDED__ // diff --git a/src/coreclr/src/gc/env/gcenv.ee.h b/src/coreclr/src/gc/env/gcenv.ee.h index fa4f2dcd7658..986acabacbec 100644 --- a/src/coreclr/src/gc/env/gcenv.ee.h +++ b/src/coreclr/src/gc/env/gcenv.ee.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // Interface between the GC and EE // diff --git a/src/coreclr/src/gc/env/gcenv.h b/src/coreclr/src/gc/env/gcenv.h index a3071a139789..d874d3013a09 100644 --- a/src/coreclr/src/gc/env/gcenv.h +++ b/src/coreclr/src/gc/env/gcenv.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __GCENV_H__ #define __GCENV_H__ diff --git a/src/coreclr/src/gc/env/gcenv.interlocked.h b/src/coreclr/src/gc/env/gcenv.interlocked.h index 5b4fab326f7b..f04b428e51bd 100644 --- a/src/coreclr/src/gc/env/gcenv.interlocked.h +++ b/src/coreclr/src/gc/env/gcenv.interlocked.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // Interlocked operations // diff --git a/src/coreclr/src/gc/env/gcenv.interlocked.inl b/src/coreclr/src/gc/env/gcenv.interlocked.inl index 02361463ff51..549b5d35909f 100644 --- a/src/coreclr/src/gc/env/gcenv.interlocked.inl +++ b/src/coreclr/src/gc/env/gcenv.interlocked.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // __forceinline implementation of the Interlocked class methods // diff --git a/src/coreclr/src/gc/env/gcenv.object.h b/src/coreclr/src/gc/env/gcenv.object.h index 7a9908a42f21..c5c6d42fd641 100644 --- a/src/coreclr/src/gc/env/gcenv.object.h +++ b/src/coreclr/src/gc/env/gcenv.object.h @@ -1,10 +1,16 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __GCENV_OBJECT_H__ #define __GCENV_OBJECT_H__ +// ARM requires that 64-bit primitive types are aligned at 64-bit boundaries for interlocked-like operations. +// Additionally the platform ABI requires these types and composite type containing them to be similarly +// aligned when passed as arguments. +#ifdef TARGET_ARM +#define FEATURE_64BIT_ALIGNMENT +#endif + //------------------------------------------------------------------------------------------------- // // Low-level types describing GC object layouts. @@ -36,18 +42,25 @@ class ObjHeader static_assert(sizeof(ObjHeader) == sizeof(uintptr_t), "this assumption is made by the VM!"); -#define MTFlag_ContainsPointers 0x0100 -#define MTFlag_HasCriticalFinalizer 0x0800 -#define MTFlag_HasFinalizer 0x0010 -#define MTFlag_IsArray 0x0008 -#define MTFlag_Collectible 0x1000 -#define MTFlag_HasComponentSize 0x8000 +#define MTFlag_RequireAlign8 0x00001000 +#define MTFlag_Category_ValueType 0x00040000 +#define MTFlag_Category_ValueType_Mask 0x000C0000 +#define MTFlag_ContainsPointers 0x01000000 +#define MTFlag_HasCriticalFinalizer 0x08000000 +#define MTFlag_HasFinalizer 0x00100000 +#define MTFlag_IsArray 0x00080000 +#define MTFlag_Collectible 0x10000000 +#define MTFlag_HasComponentSize 0x80000000 class MethodTable { public: - uint16_t m_componentSize; - uint16_t m_flags; + union + { + uint16_t m_componentSize; + uint32_t m_flags; + }; + uint32_t m_baseSize; MethodTable * m_pRelatedType; @@ -56,8 +69,8 @@ class MethodTable void InitializeFreeObject() { m_baseSize = 3 * sizeof(void *); - m_componentSize = 1; m_flags = MTFlag_HasComponentSize | MTFlag_IsArray; + m_componentSize = 1; } uint32_t GetBaseSize() @@ -85,6 +98,16 @@ class MethodTable return ContainsPointers() || Collectible(); } + bool RequiresAlign8() + { + return (m_flags & MTFlag_RequireAlign8) != 0; + } + + bool IsValueType() + { + return (m_flags & MTFlag_Category_ValueType_Mask) == MTFlag_Category_ValueType; + } + bool HasComponentSize() { // Note that we can't just check m_componentSize != 0 here. The VM diff --git a/src/coreclr/src/gc/env/gcenv.os.h b/src/coreclr/src/gc/env/gcenv.os.h index 6a6477f3c465..3dee37ad8e54 100644 --- a/src/coreclr/src/gc/env/gcenv.os.h +++ b/src/coreclr/src/gc/env/gcenv.os.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // Interface between GC and the OS specific functionality // diff --git a/src/coreclr/src/gc/env/gcenv.structs.h b/src/coreclr/src/gc/env/gcenv.structs.h index f7f8f4038d46..0019ae6c9886 100644 --- a/src/coreclr/src/gc/env/gcenv.structs.h +++ b/src/coreclr/src/gc/env/gcenv.structs.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __GCENV_STRUCTS_INCLUDED__ #define __GCENV_STRUCTS_INCLUDED__ // diff --git a/src/coreclr/src/gc/env/gcenv.sync.h b/src/coreclr/src/gc/env/gcenv.sync.h index 5b7b77ddd400..b27b50ee1b8e 100644 --- a/src/coreclr/src/gc/env/gcenv.sync.h +++ b/src/coreclr/src/gc/env/gcenv.sync.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __GCENV_SYNC_H__ #define __GCENV_SYNC_H__ diff --git a/src/coreclr/src/gc/env/gcenv.unix.inl b/src/coreclr/src/gc/env/gcenv.unix.inl index cc71651c57fc..d6e5ca796a14 100644 --- a/src/coreclr/src/gc/env/gcenv.unix.inl +++ b/src/coreclr/src/gc/env/gcenv.unix.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __GCENV_UNIX_INL__ #define __GCENV_UNIX_INL__ diff --git a/src/coreclr/src/gc/env/gcenv.windows.inl b/src/coreclr/src/gc/env/gcenv.windows.inl index 7e81016735a2..df34e1aaa7c7 100644 --- a/src/coreclr/src/gc/env/gcenv.windows.inl +++ b/src/coreclr/src/gc/env/gcenv.windows.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __GCENV_WINDOWS_INL__ #define __GCENV_WINDOWS_INL__ diff --git a/src/coreclr/src/gc/env/volatile.h b/src/coreclr/src/gc/env/volatile.h index 32b6fca3b6a7..b47ff3847d44 100644 --- a/src/coreclr/src/gc/env/volatile.h +++ b/src/coreclr/src/gc/env/volatile.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // Volatile.h // diff --git a/src/coreclr/src/gc/gc.cpp b/src/coreclr/src/gc/gc.cpp index 35ff30e89502..57e525843dfe 100644 --- a/src/coreclr/src/gc/gc.cpp +++ b/src/coreclr/src/gc/gc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // @@ -81,8 +80,6 @@ int compact_ratio = 0; // See comments in reset_memory. BOOL reset_mm_p = TRUE; -bool g_fFinalizerRunOnShutDown = false; - #ifdef FEATURE_SVR_GC bool g_built_with_svr_gc = true; #else @@ -12195,7 +12192,7 @@ BOOL gc_heap::a_fit_free_list_uoh_p (size_t size, #endif //FEATURE_LOH_COMPACTION // must fit exactly or leave formattable space - if ((diff == 0) || (diff > (ptrdiff_t)Align (min_obj_size, align_const))) + if ((diff == 0) || (diff >= (ptrdiff_t)Align (min_obj_size, align_const))) { #ifdef BACKGROUND_GC cookie = bgc_alloc_lock->uoh_alloc_set (free_list); @@ -12407,7 +12404,7 @@ BOOL gc_heap::a_fit_segment_end_p (int gen_number, return FALSE; } -BOOL gc_heap::loh_a_fit_segment_end_p (int gen_number, +BOOL gc_heap::uoh_a_fit_segment_end_p (int gen_number, size_t size, alloc_context* acontext, uint32_t flags, @@ -12974,7 +12971,7 @@ BOOL gc_heap::uoh_try_fit (int gen_number, if (!a_fit_free_list_uoh_p (size, acontext, flags, align_const, gen_number)) { - can_allocate = loh_a_fit_segment_end_p (gen_number, size, + can_allocate = uoh_a_fit_segment_end_p (gen_number, size, acontext, flags, align_const, commit_failed_p, oom_r); @@ -19872,10 +19869,10 @@ void gc_heap::process_mark_overflow_internal (int condemned_gen_number, int align_const = get_alignment_constant (i < uoh_start_generation); PREFIX_ASSUME(seg != NULL); - uint8_t* o = max (heap_segment_mem (seg), min_add); while (seg) { + uint8_t* o = max (heap_segment_mem (seg), min_add); uint8_t* end = heap_segment_allocated (seg); while ((o < end) && (o <= max_add)) @@ -24126,17 +24123,24 @@ void gc_heap::relocate_address (uint8_t** pold_address THREAD_NUMBER_DCL) } #ifdef FEATURE_LOH_COMPACTION - if (loh_compacted_p) + if (settings.loh_compaction) { heap_segment* pSegment = seg_mapping_table_segment_of ((uint8_t*)old_address); - size_t flags = pSegment->flags; - if ((flags & heap_segment_flags_loh) -#ifdef FEATURE_BASICFREEZE - && !(flags & heap_segment_flags_readonly) +#ifdef MULTIPLE_HEAPS + if (heap_segment_heap (pSegment)->loh_compacted_p) +#else + if (loh_compacted_p) #endif - ) { - *pold_address = old_address + loh_node_relocation_distance (old_address); + size_t flags = pSegment->flags; + if ((flags & heap_segment_flags_loh) +#ifdef FEATURE_BASICFREEZE + && !(flags & heap_segment_flags_readonly) +#endif + ) + { + *pold_address = old_address + loh_node_relocation_distance (old_address); + } } } #endif //FEATURE_LOH_COMPACTION @@ -35186,8 +35190,7 @@ HRESULT GCHeap::Initialize() { gc_heap::heap_hard_limit_oh[2] = min_segment_size_hard_limit; } - // This tells the system there is a hard limit, but otherwise we will not compare against this value. - gc_heap::heap_hard_limit = 1; + gc_heap::heap_hard_limit = gc_heap::heap_hard_limit_oh[0] + gc_heap::heap_hard_limit_oh[1] + gc_heap::heap_hard_limit_oh[2]; } else { @@ -35222,8 +35225,7 @@ HRESULT GCHeap::Initialize() { gc_heap::heap_hard_limit_oh[2] = (size_t)(gc_heap::total_physical_mem * (uint64_t)percent_of_mem_poh / (uint64_t)100); } - // This tells the system there is a hard limit, but otherwise we will not compare against this value. - gc_heap::heap_hard_limit = 1; + gc_heap::heap_hard_limit = gc_heap::heap_hard_limit_oh[0] + gc_heap::heap_hard_limit_oh[1] + gc_heap::heap_hard_limit_oh[2]; } } @@ -37825,26 +37827,6 @@ size_t GCHeap::GetFinalizablePromotedCount() #endif //MULTIPLE_HEAPS } -bool GCHeap::ShouldRestartFinalizerWatchDog() -{ - // This condition was historically used as part of the condition to detect finalizer thread timeouts - return gc_heap::gc_lock.lock != -1; -} - -void GCHeap::SetFinalizeQueueForShutdown(bool fHasLock) -{ -#ifdef MULTIPLE_HEAPS - for (int hn = 0; hn < gc_heap::n_heaps; hn++) - { - gc_heap* hp = gc_heap::g_heaps [hn]; - hp->finalize_queue->SetSegForShutDown(fHasLock); - } - -#else //MULTIPLE_HEAPS - pGenGCHeap->finalize_queue->SetSegForShutDown(fHasLock); -#endif //MULTIPLE_HEAPS -} - //--------------------------------------------------------------------------- // Finalized class tracking //--------------------------------------------------------------------------- @@ -37977,18 +37959,9 @@ CFinalize::RegisterForFinalization (int gen, Object* obj, size_t size) } CONTRACTL_END; EnterFinalizeLock(); - // Adjust gen - unsigned int dest = 0; - - if (g_fFinalizerRunOnShutDown) - { - //put it in the finalizer queue and sort out when - //dequeueing - dest = FinalizerListSeg; - } - else - dest = gen_segment (gen); + // Adjust gen + unsigned int dest = gen_segment (gen); // Adjust boundary for segments so that GC will keep objects alive. Object*** s_i = &SegQueue (FreeList); @@ -38044,24 +38017,9 @@ CFinalize::GetNextFinalizableObject (BOOL only_non_critical) Object* obj = 0; EnterFinalizeLock(); -retry: if (!IsSegEmpty(FinalizerListSeg)) { - if (g_fFinalizerRunOnShutDown) - { - obj = *(SegQueueLimit (FinalizerListSeg)-1); - if (method_table(obj)->HasCriticalFinalizer()) - { - MoveItem ((SegQueueLimit (FinalizerListSeg)-1), - FinalizerListSeg, CriticalFinalizerListSeg); - goto retry; - } - else - --SegQueueLimit (FinalizerListSeg); - } - else - obj = *(--SegQueueLimit (FinalizerListSeg)); - + obj = *(--SegQueueLimit (FinalizerListSeg)); } else if (!only_non_critical && !IsSegEmpty(CriticalFinalizerListSeg)) { @@ -38078,52 +38036,10 @@ CFinalize::GetNextFinalizableObject (BOOL only_non_critical) return obj; } -void -CFinalize::SetSegForShutDown(BOOL fHasLock) -{ - int i; - - if (!fHasLock) - EnterFinalizeLock(); - for (i = 0; i <= max_generation; i++) - { - unsigned int seg = gen_segment (i); - Object** startIndex = SegQueueLimit (seg)-1; - Object** stopIndex = SegQueue (seg); - for (Object** po = startIndex; po >= stopIndex; po--) - { - Object* obj = *po; - if (method_table(obj)->HasCriticalFinalizer()) - { - MoveItem (po, seg, CriticalFinalizerListSeg); - } - else - { - MoveItem (po, seg, FinalizerListSeg); - } - } - } - if (!fHasLock) - LeaveFinalizeLock(); -} - -void -CFinalize::DiscardNonCriticalObjects() -{ - //empty the finalization queue - Object** startIndex = SegQueueLimit (FinalizerListSeg)-1; - Object** stopIndex = SegQueue (FinalizerListSeg); - for (Object** po = startIndex; po >= stopIndex; po--) - { - MoveItem (po, FinalizerListSeg, FreeList); - } -} - size_t CFinalize::GetNumberFinalizableObjects() { - return SegQueueLimit (FinalizerListSeg) - - (g_fFinalizerRunOnShutDown ? m_Array : SegQueue(FinalizerListSeg)); + return SegQueueLimit(FinalizerListSeg) - SegQueue(FinalizerListSeg); } void @@ -38837,11 +38753,6 @@ bool GCHeap::IsConcurrentGCEnabled() #endif //BACKGROUND_GC } -void GCHeap::SetFinalizeRunOnShutdown(bool value) -{ - g_fFinalizerRunOnShutDown = value; -} - void PopulateDacVars(GcDacVars *gcDacVars) { #ifndef DACCESS_COMPILE diff --git a/src/coreclr/src/gc/gc.h b/src/coreclr/src/gc/gc.h index a811510b4770..52efaa454bae 100644 --- a/src/coreclr/src/gc/gc.h +++ b/src/coreclr/src/gc/gc.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/gc/gccommon.cpp b/src/coreclr/src/gc/gccommon.cpp index 742ae059da31..27eb8f935c33 100644 --- a/src/coreclr/src/gc/gccommon.cpp +++ b/src/coreclr/src/gc/gccommon.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* diff --git a/src/coreclr/src/gc/gcconfig.cpp b/src/coreclr/src/gc/gcconfig.cpp index 02004e3d4750..f33792f8a54a 100644 --- a/src/coreclr/src/gc/gcconfig.cpp +++ b/src/coreclr/src/gc/gcconfig.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "gcenv.h" diff --git a/src/coreclr/src/gc/gcconfig.h b/src/coreclr/src/gc/gcconfig.h index c1af6250342f..3ff7a1dc2926 100644 --- a/src/coreclr/src/gc/gcconfig.h +++ b/src/coreclr/src/gc/gcconfig.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __GCCONFIG_H__ #define __GCCONFIG_H__ diff --git a/src/coreclr/src/gc/gcdesc.h b/src/coreclr/src/gc/gcdesc.h index dee6c41480e4..3d9e76096c90 100644 --- a/src/coreclr/src/gc/gcdesc.h +++ b/src/coreclr/src/gc/gcdesc.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // // GC Object Pointer Location Series Stuff diff --git a/src/coreclr/src/gc/gcee.cpp b/src/coreclr/src/gc/gcee.cpp index dec75f0e2efe..2964b14190e9 100644 --- a/src/coreclr/src/gc/gcee.cpp +++ b/src/coreclr/src/gc/gcee.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/gc/gceesvr.cpp b/src/coreclr/src/gc/gceesvr.cpp index 811c2d7f6660..be7c129cc3fc 100644 --- a/src/coreclr/src/gc/gceesvr.cpp +++ b/src/coreclr/src/gc/gceesvr.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/gc/gceewks.cpp b/src/coreclr/src/gc/gceewks.cpp index 56727fb87599..203464ab6b53 100644 --- a/src/coreclr/src/gc/gceewks.cpp +++ b/src/coreclr/src/gc/gceewks.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/gc/gcenv.ee.standalone.inl b/src/coreclr/src/gc/gcenv.ee.standalone.inl index b91d0c4d5b89..650812644b01 100644 --- a/src/coreclr/src/gc/gcenv.ee.standalone.inl +++ b/src/coreclr/src/gc/gcenv.ee.standalone.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __GCTOENV_EE_STANDALONE_INL__ #define __GCTOENV_EE_STANDALONE_INL__ diff --git a/src/coreclr/src/gc/gcenv.inl b/src/coreclr/src/gc/gcenv.inl index f3d7d3292208..bce5935aa0b6 100644 --- a/src/coreclr/src/gc/gcenv.inl +++ b/src/coreclr/src/gc/gcenv.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifdef _WIN32 #include "gcenv.windows.inl" diff --git a/src/coreclr/src/gc/gcevent_serializers.h b/src/coreclr/src/gc/gcevent_serializers.h index 768a21fe71e6..0443d04c668e 100644 --- a/src/coreclr/src/gc/gcevent_serializers.h +++ b/src/coreclr/src/gc/gcevent_serializers.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __GCEVENT_SERIALIZERS_H__ #define __GCEVENT_SERIALIZERS_H__ diff --git a/src/coreclr/src/gc/gcevents.h b/src/coreclr/src/gc/gcevents.h index cb473eed9478..5f43fe6f4e43 100644 --- a/src/coreclr/src/gc/gcevents.h +++ b/src/coreclr/src/gc/gcevents.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef KNOWN_EVENT #define KNOWN_EVENT(name, provider, level, keyword) #endif // KNOWN_EVENT diff --git a/src/coreclr/src/gc/gceventstatus.cpp b/src/coreclr/src/gc/gceventstatus.cpp index 9c4f35bfde47..17f2b56019ae 100644 --- a/src/coreclr/src/gc/gceventstatus.cpp +++ b/src/coreclr/src/gc/gceventstatus.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "gceventstatus.h" diff --git a/src/coreclr/src/gc/gceventstatus.h b/src/coreclr/src/gc/gceventstatus.h index 1f31d424bec3..58d8b2e873a1 100644 --- a/src/coreclr/src/gc/gceventstatus.h +++ b/src/coreclr/src/gc/gceventstatus.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __GCEVENTSTATUS_H__ #define __GCEVENTSTATUS_H__ diff --git a/src/coreclr/src/gc/gchandletable.cpp b/src/coreclr/src/gc/gchandletable.cpp index d3f93b457521..9934889e58e4 100644 --- a/src/coreclr/src/gc/gchandletable.cpp +++ b/src/coreclr/src/gc/gchandletable.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // #include "common.h" diff --git a/src/coreclr/src/gc/gchandletableimpl.h b/src/coreclr/src/gc/gchandletableimpl.h index 48eb2ab17dfa..4b666bf80882 100644 --- a/src/coreclr/src/gc/gchandletableimpl.h +++ b/src/coreclr/src/gc/gchandletableimpl.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef GCHANDLETABLE_H_ #define GCHANDLETABLE_H_ diff --git a/src/coreclr/src/gc/gcimpl.h b/src/coreclr/src/gc/gcimpl.h index f3bba59e3152..d1f062efb44c 100644 --- a/src/coreclr/src/gc/gcimpl.h +++ b/src/coreclr/src/gc/gcimpl.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef GCIMPL_H_ @@ -215,12 +214,8 @@ class GCHeap : public IGCHeapInternal PER_HEAP_ISOLATED size_t GetNumberFinalizableObjects(); PER_HEAP_ISOLATED size_t GetFinalizablePromotedCount(); - void SetFinalizeQueueForShutdown(bool fHasLock); - bool ShouldRestartFinalizerWatchDog(); - void DiagWalkObject (Object* obj, walk_fn fn, void* context); void DiagWalkObject2 (Object* obj, walk_fn2 fn, void* context); - void SetFinalizeRunOnShutdown(bool value); public: // FIX diff --git a/src/coreclr/src/gc/gcinterface.dac.h b/src/coreclr/src/gc/gcinterface.dac.h index aa99d6155f48..348279b5b691 100644 --- a/src/coreclr/src/gc/gcinterface.dac.h +++ b/src/coreclr/src/gc/gcinterface.dac.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _GC_INTERFACE_DAC_H_ #define _GC_INTERFACE_DAC_H_ diff --git a/src/coreclr/src/gc/gcinterface.dacvars.def b/src/coreclr/src/gc/gcinterface.dacvars.def index 7b89045acbd8..b572e6cb3764 100644 --- a/src/coreclr/src/gc/gcinterface.dacvars.def +++ b/src/coreclr/src/gc/gcinterface.dacvars.def @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // This file contains the defintions of all DAC variables that the G // exports and that the DAC uses to interface with the GC. diff --git a/src/coreclr/src/gc/gcinterface.ee.h b/src/coreclr/src/gc/gcinterface.ee.h index bc9a0ab162c3..158da1867dbb 100644 --- a/src/coreclr/src/gc/gcinterface.ee.h +++ b/src/coreclr/src/gc/gcinterface.ee.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _GCINTERFACE_EE_H_ #define _GCINTERFACE_EE_H_ diff --git a/src/coreclr/src/gc/gcinterface.h b/src/coreclr/src/gc/gcinterface.h index 6442acb85ee7..331f8e122108 100644 --- a/src/coreclr/src/gc/gcinterface.h +++ b/src/coreclr/src/gc/gcinterface.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _GC_INTERFACE_H_ #define _GC_INTERFACE_H_ @@ -580,23 +579,12 @@ class IGCHeap { =========================================================================== */ - // Finalizes all registered objects for shutdown, even if they are still reachable. - virtual void SetFinalizeQueueForShutdown(bool fHasLock) = 0; - // Gets the number of finalizable objects. virtual size_t GetNumberOfFinalizable() = 0; - // Traditionally used by the finalizer thread on shutdown to determine - // whether or not to time out. Returns true if the GC lock has not been taken. - virtual bool ShouldRestartFinalizerWatchDog() = 0; - // Gets the next finalizable object. virtual Object* GetNextFinalizable() = 0; - // Sets whether or not the GC should report all finalizable objects as - // ready to be finalized, instead of only collectable objects. - virtual void SetFinalizeRunOnShutdown(bool value) = 0; - /* =========================================================================== BCL routines. These are routines that are directly exposed by mscorlib diff --git a/src/coreclr/src/gc/gcload.cpp b/src/coreclr/src/gc/gcload.cpp index 35db29d866c4..0549ca856a9b 100644 --- a/src/coreclr/src/gc/gcload.cpp +++ b/src/coreclr/src/gc/gcload.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* * gcload.cpp diff --git a/src/coreclr/src/gc/gcpriv.h b/src/coreclr/src/gc/gcpriv.h index 2609495c2f9d..62844b74eb50 100644 --- a/src/coreclr/src/gc/gcpriv.h +++ b/src/coreclr/src/gc/gcpriv.h @@ -1567,7 +1567,7 @@ class gc_heap int align_const, BOOL* commit_failed_p); PER_HEAP - BOOL loh_a_fit_segment_end_p (int gen_number, + BOOL uoh_a_fit_segment_end_p (int gen_number, size_t size, alloc_context* acontext, uint32_t flags, @@ -4400,9 +4400,7 @@ class CFinalize size_t GetPromotedCount(); //Methods used by the shutdown code to call every finalizer - void SetSegForShutDown(BOOL fHasLock); size_t GetNumberFinalizableObjects(); - void DiscardNonCriticalObjects(); void CheckFinalizerObjects(); }; diff --git a/src/coreclr/src/gc/gcrecord.h b/src/coreclr/src/gc/gcrecord.h index 7e623052f12c..68d0f4dfabe2 100644 --- a/src/coreclr/src/gc/gcrecord.h +++ b/src/coreclr/src/gc/gcrecord.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/gc/gcscan.cpp b/src/coreclr/src/gc/gcscan.cpp index 6e210b7da5d2..5b7b543681c6 100644 --- a/src/coreclr/src/gc/gcscan.cpp +++ b/src/coreclr/src/gc/gcscan.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* * GCSCAN.CPP diff --git a/src/coreclr/src/gc/gcscan.h b/src/coreclr/src/gc/gcscan.h index dc12fcd30844..5f0462ff8b02 100644 --- a/src/coreclr/src/gc/gcscan.h +++ b/src/coreclr/src/gc/gcscan.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* * GCSCAN.H diff --git a/src/coreclr/src/gc/gcsvr.cpp b/src/coreclr/src/gc/gcsvr.cpp index 1add45d271d3..15ec076c6c5d 100644 --- a/src/coreclr/src/gc/gcsvr.cpp +++ b/src/coreclr/src/gc/gcsvr.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/gc/gcwks.cpp b/src/coreclr/src/gc/gcwks.cpp index 3a6c7396c391..3977c5141b1b 100644 --- a/src/coreclr/src/gc/gcwks.cpp +++ b/src/coreclr/src/gc/gcwks.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/gc/handletable.cpp b/src/coreclr/src/gc/handletable.cpp index 1b56c74c791c..83eed63ad9da 100644 --- a/src/coreclr/src/gc/handletable.cpp +++ b/src/coreclr/src/gc/handletable.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* * Generational GC handle manager. Main Entrypoint Layer. diff --git a/src/coreclr/src/gc/handletable.h b/src/coreclr/src/gc/handletable.h index 3645d32676c5..339fcf92f508 100644 --- a/src/coreclr/src/gc/handletable.h +++ b/src/coreclr/src/gc/handletable.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* * Generational GC handle manager. Entrypoint Header. diff --git a/src/coreclr/src/gc/handletable.inl b/src/coreclr/src/gc/handletable.inl index eaf13c348621..cc16fd3c4ad9 100644 --- a/src/coreclr/src/gc/handletable.inl +++ b/src/coreclr/src/gc/handletable.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/gc/handletablecache.cpp b/src/coreclr/src/gc/handletablecache.cpp index 2ac886667832..1110d189c4d3 100644 --- a/src/coreclr/src/gc/handletablecache.cpp +++ b/src/coreclr/src/gc/handletablecache.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* * Generational GC handle manager. Handle Caching Routines. diff --git a/src/coreclr/src/gc/handletablecore.cpp b/src/coreclr/src/gc/handletablecore.cpp index 41e87787ee59..3df14f945e70 100644 --- a/src/coreclr/src/gc/handletablecore.cpp +++ b/src/coreclr/src/gc/handletablecore.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* * Generational GC handle manager. Core Table Implementation. diff --git a/src/coreclr/src/gc/handletablepriv.h b/src/coreclr/src/gc/handletablepriv.h index f3a3221aeb0b..52c8b2c21133 100644 --- a/src/coreclr/src/gc/handletablepriv.h +++ b/src/coreclr/src/gc/handletablepriv.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* * Generational GC handle manager. Internal Implementation Header. diff --git a/src/coreclr/src/gc/handletablescan.cpp b/src/coreclr/src/gc/handletablescan.cpp index cc2c55524dcc..9fde96a2c7be 100644 --- a/src/coreclr/src/gc/handletablescan.cpp +++ b/src/coreclr/src/gc/handletablescan.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* * Generational GC handle manager. Table Scanning Routines. diff --git a/src/coreclr/src/gc/objecthandle.cpp b/src/coreclr/src/gc/objecthandle.cpp index e6a5160d7ee5..52c31b49c5a8 100644 --- a/src/coreclr/src/gc/objecthandle.cpp +++ b/src/coreclr/src/gc/objecthandle.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* * Wraps handle table to implement various handle types (Strong, Weak, etc.) diff --git a/src/coreclr/src/gc/objecthandle.h b/src/coreclr/src/gc/objecthandle.h index f601e5cf8dbc..bfa7feb370ea 100644 --- a/src/coreclr/src/gc/objecthandle.h +++ b/src/coreclr/src/gc/objecthandle.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* * Wraps handle table to implement various handle types (Strong, Weak, etc.) diff --git a/src/coreclr/src/gc/sample/GCSample.cpp b/src/coreclr/src/gc/sample/GCSample.cpp index 91ffc2e11e97..c102efc4ae71 100644 --- a/src/coreclr/src/gc/sample/GCSample.cpp +++ b/src/coreclr/src/gc/sample/GCSample.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // GCSample.cpp diff --git a/src/coreclr/src/gc/sample/gcenv.ee.cpp b/src/coreclr/src/gc/sample/gcenv.ee.cpp index 6f5151ee1534..4ed20f07786e 100644 --- a/src/coreclr/src/gc/sample/gcenv.ee.cpp +++ b/src/coreclr/src/gc/sample/gcenv.ee.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" diff --git a/src/coreclr/src/gc/sample/gcenv.h b/src/coreclr/src/gc/sample/gcenv.h index dfafdffc14c6..2c8f5abbb8ed 100644 --- a/src/coreclr/src/gc/sample/gcenv.h +++ b/src/coreclr/src/gc/sample/gcenv.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __GCENV_H__ #define __GCENV_H__ diff --git a/src/coreclr/src/gc/softwarewritewatch.cpp b/src/coreclr/src/gc/softwarewritewatch.cpp index e1f305e76ff5..c72e2c6fcb9d 100644 --- a/src/coreclr/src/gc/softwarewritewatch.cpp +++ b/src/coreclr/src/gc/softwarewritewatch.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "gcenv.h" diff --git a/src/coreclr/src/gc/softwarewritewatch.h b/src/coreclr/src/gc/softwarewritewatch.h index 46105f35bf59..1c1c85e86aa5 100644 --- a/src/coreclr/src/gc/softwarewritewatch.h +++ b/src/coreclr/src/gc/softwarewritewatch.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __SOFTWARE_WRITE_WATCH_H__ #define __SOFTWARE_WRITE_WATCH_H__ diff --git a/src/coreclr/src/gc/unix/cgroup.cpp b/src/coreclr/src/gc/unix/cgroup.cpp index 9cdc5b14df02..00ebc14a9492 100644 --- a/src/coreclr/src/gc/unix/cgroup.cpp +++ b/src/coreclr/src/gc/unix/cgroup.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/gc/unix/cgroup.h b/src/coreclr/src/gc/unix/cgroup.h index 6e405ae6731c..21a604abb5fd 100644 --- a/src/coreclr/src/gc/unix/cgroup.h +++ b/src/coreclr/src/gc/unix/cgroup.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __CGROUP_H__ diff --git a/src/coreclr/src/gc/unix/config.gc.h.in b/src/coreclr/src/gc/unix/config.gc.h.in index ad33f95b6bdc..954176f74a34 100644 --- a/src/coreclr/src/gc/unix/config.gc.h.in +++ b/src/coreclr/src/gc/unix/config.gc.h.in @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __CONFIG_H__ #define __CONFIG_H__ diff --git a/src/coreclr/src/gc/unix/events.cpp b/src/coreclr/src/gc/unix/events.cpp index 820475c0df22..88797741fa7e 100644 --- a/src/coreclr/src/gc/unix/events.cpp +++ b/src/coreclr/src/gc/unix/events.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include #include diff --git a/src/coreclr/src/gc/unix/gcenv.unix.cpp b/src/coreclr/src/gc/unix/gcenv.unix.cpp index 9b78b70f53ab..e7a122498699 100644 --- a/src/coreclr/src/gc/unix/gcenv.unix.cpp +++ b/src/coreclr/src/gc/unix/gcenv.unix.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #define _WITH_GETLINE #include diff --git a/src/coreclr/src/gc/unix/globals.h b/src/coreclr/src/gc/unix/globals.h index bc3dc4991833..fe0d76a36a4c 100644 --- a/src/coreclr/src/gc/unix/globals.h +++ b/src/coreclr/src/gc/unix/globals.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __GLOBALS_H__ #define __GLOBALS_H__ diff --git a/src/coreclr/src/gc/windows/gcenv.windows.cpp b/src/coreclr/src/gc/windows/gcenv.windows.cpp index a9504bd4b69a..4b44ca9e8d5b 100644 --- a/src/coreclr/src/gc/windows/gcenv.windows.cpp +++ b/src/coreclr/src/gc/windows/gcenv.windows.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include #include diff --git a/src/coreclr/src/gcdump/gcdump.cpp b/src/coreclr/src/gcdump/gcdump.cpp index c6403b7c888a..04faf7819daf 100644 --- a/src/coreclr/src/gcdump/gcdump.cpp +++ b/src/coreclr/src/gcdump/gcdump.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /***************************************************************************** * GCDump.cpp * diff --git a/src/coreclr/src/gcdump/gcdumpnonx86.cpp b/src/coreclr/src/gcdump/gcdumpnonx86.cpp index d063e72838e9..84da4592e622 100644 --- a/src/coreclr/src/gcdump/gcdumpnonx86.cpp +++ b/src/coreclr/src/gcdump/gcdumpnonx86.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /***************************************************************************** * GCDumpNonX86.cpp */ diff --git a/src/coreclr/src/gcdump/i386/gcdumpx86.cpp b/src/coreclr/src/gcdump/i386/gcdumpx86.cpp index 14945e8746bc..0d221e1918db 100644 --- a/src/coreclr/src/gcdump/i386/gcdumpx86.cpp +++ b/src/coreclr/src/gcdump/i386/gcdumpx86.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /***************************************************************************** * GCDumpX86.cpp */ diff --git a/src/coreclr/src/gcinfo/CMakeLists.txt b/src/coreclr/src/gcinfo/CMakeLists.txt index b0b674625624..3862de8633d0 100644 --- a/src/coreclr/src/gcinfo/CMakeLists.txt +++ b/src/coreclr/src/gcinfo/CMakeLists.txt @@ -17,7 +17,7 @@ endif(CLR_CMAKE_TARGET_ARCH_I386) convert_to_absolute_path(GCINFO_SOURCES ${GCINFO_SOURCES}) add_library_clr(gcinfo - STATIC + OBJECT ${GCINFO_SOURCES} ) diff --git a/src/coreclr/src/gcinfo/arraylist.cpp b/src/coreclr/src/gcinfo/arraylist.cpp index 566304c7ac11..5071c483ba7f 100644 --- a/src/coreclr/src/gcinfo/arraylist.cpp +++ b/src/coreclr/src/gcinfo/arraylist.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include #include diff --git a/src/coreclr/src/gcinfo/gcinfodumper.cpp b/src/coreclr/src/gcinfo/gcinfodumper.cpp index 8fa31dbd28f7..3ea383832046 100644 --- a/src/coreclr/src/gcinfo/gcinfodumper.cpp +++ b/src/coreclr/src/gcinfo/gcinfodumper.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "gcinfodumper.h" diff --git a/src/coreclr/src/gcinfo/gcinfoencoder.cpp b/src/coreclr/src/gcinfo/gcinfoencoder.cpp index cc4359fd4754..ab89b90e5288 100644 --- a/src/coreclr/src/gcinfo/gcinfoencoder.cpp +++ b/src/coreclr/src/gcinfo/gcinfoencoder.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /***************************************************************************** * diff --git a/src/coreclr/src/hosts/coreconsole/coreconsole.cpp b/src/coreclr/src/hosts/coreconsole/coreconsole.cpp index da48d0274e80..406525f8d77d 100644 --- a/src/coreclr/src/hosts/coreconsole/coreconsole.cpp +++ b/src/coreclr/src/hosts/coreconsole/coreconsole.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // A simple CoreCLR host that runs a managed binary with the same name as this executable but with *.dll extension @@ -27,7 +26,7 @@ class StringBuffer { StringBuffer& operator =(const StringBuffer&); public: - StringBuffer() : m_capacity(0), m_buffer(nullptr), m_length(0) { + StringBuffer() : m_buffer(nullptr), m_capacity(0), m_length(0) { } ~StringBuffer() { @@ -116,7 +115,7 @@ class HostEnvironment wchar_t m_coreCLRDirectoryPath[MAX_LONGPATH]; HostEnvironment(Logger *logger) - : m_log(logger), m_CLRRuntimeHost(nullptr) { + : m_CLRRuntimeHost(nullptr), m_log(logger) { // Discover the path to this exe's module. All other files are expected to be in the same directory. DWORD thisModuleLength = ::GetModuleFileNameW(::GetModuleHandleW(nullptr), m_hostPath, MAX_LONGPATH); diff --git a/src/coreclr/src/hosts/coreconsole/logger.cpp b/src/coreclr/src/hosts/coreconsole/logger.cpp index 7c13c9b5473b..071305d00791 100644 --- a/src/coreclr/src/hosts/coreconsole/logger.cpp +++ b/src/coreclr/src/hosts/coreconsole/logger.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include #include diff --git a/src/coreclr/src/hosts/coreconsole/logger.h b/src/coreclr/src/hosts/coreconsole/logger.h index e6b854b1f363..4226e4a2e653 100644 --- a/src/coreclr/src/hosts/coreconsole/logger.h +++ b/src/coreclr/src/hosts/coreconsole/logger.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // Logger for the CoreCLR host. diff --git a/src/coreclr/src/hosts/coreconsole/native.rc b/src/coreclr/src/hosts/coreconsole/native.rc index 66900223e0e2..302e69dd4714 100644 --- a/src/coreclr/src/hosts/coreconsole/native.rc +++ b/src/coreclr/src/hosts/coreconsole/native.rc @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #define FX_VER_FILEDESCRIPTION_STR "Microsoft CoreCLR Program launcher\0" diff --git a/src/coreclr/src/hosts/corerun/corerun.cpp b/src/coreclr/src/hosts/corerun/corerun.cpp index 5095d747a1d7..2db9d3606765 100644 --- a/src/coreclr/src/hosts/corerun/corerun.cpp +++ b/src/coreclr/src/hosts/corerun/corerun.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // @@ -95,10 +94,10 @@ class HostEnvironment PathString m_coreCLRDirectoryPath; HostEnvironment(Logger *logger) - : m_log(logger) - , m_CLRRuntimeHostInitialize(nullptr) + : m_CLRRuntimeHostInitialize(nullptr) , m_CLRRuntimeHostExecute(nullptr) - , m_CLRRuntimeHostShutdown(nullptr) { + , m_CLRRuntimeHostShutdown(nullptr) + , m_log(logger) { // Discover the path to this exe's module. All other files are expected to be in the same directory. WszGetModuleFileName(::GetModuleHandleW(nullptr), m_hostPath); @@ -414,9 +413,9 @@ class ActivationContext // logger - Logger to record errors // assemblyPath - Assembly containing activation context manifest ActivationContext(Logger &logger, _In_z_ const WCHAR *assemblyPath) - : _actCookie{} + : _logger{ logger } , _actCxt{ INVALID_HANDLE_VALUE } - , _logger{ logger } + , _actCookie{} { ACTCTX cxt{}; cxt.cbSize = sizeof(cxt); diff --git a/src/coreclr/src/hosts/corerun/logger.cpp b/src/coreclr/src/hosts/corerun/logger.cpp index 540c3937a167..f3fd0477f1e6 100644 --- a/src/coreclr/src/hosts/corerun/logger.cpp +++ b/src/coreclr/src/hosts/corerun/logger.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/hosts/corerun/logger.h b/src/coreclr/src/hosts/corerun/logger.h index f9e691e23212..fe954f806303 100644 --- a/src/coreclr/src/hosts/corerun/logger.h +++ b/src/coreclr/src/hosts/corerun/logger.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/hosts/corerun/native.rc b/src/coreclr/src/hosts/corerun/native.rc index 5ad4f9893a5e..cc7e7da31044 100644 --- a/src/coreclr/src/hosts/corerun/native.rc +++ b/src/coreclr/src/hosts/corerun/native.rc @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #define FX_VER_FILEDESCRIPTION_STR "Microsoft CoreCLR EXE launcher\0" diff --git a/src/coreclr/src/hosts/coreshim/ComActivation.cpp b/src/coreclr/src/hosts/coreshim/ComActivation.cpp index 6c03be0f439b..33d316e13cca 100644 --- a/src/coreclr/src/hosts/coreshim/ComActivation.cpp +++ b/src/coreclr/src/hosts/coreshim/ComActivation.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "CoreShim.h" diff --git a/src/coreclr/src/hosts/coreshim/CoreShim.cpp b/src/coreclr/src/hosts/coreshim/CoreShim.cpp index 44ff77e4cab6..0648ef4f4e0e 100644 --- a/src/coreclr/src/hosts/coreshim/CoreShim.cpp +++ b/src/coreclr/src/hosts/coreshim/CoreShim.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "CoreShim.h" diff --git a/src/coreclr/src/hosts/coreshim/CoreShim.h b/src/coreclr/src/hosts/coreshim/CoreShim.h index 5875b457bc50..09bc0d77a109 100644 --- a/src/coreclr/src/hosts/coreshim/CoreShim.h +++ b/src/coreclr/src/hosts/coreshim/CoreShim.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _CORESHIM_H_ #define _CORESHIM_H_ diff --git a/src/coreclr/src/hosts/inc/coreclrhost.h b/src/coreclr/src/hosts/inc/coreclrhost.h index e0aff72dd264..4cb04b95693d 100644 --- a/src/coreclr/src/hosts/inc/coreclrhost.h +++ b/src/coreclr/src/hosts/inc/coreclrhost.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // APIs for hosting CoreCLR diff --git a/src/coreclr/src/hosts/osxbundlerun/osxbundlerun.cpp b/src/coreclr/src/hosts/osxbundlerun/osxbundlerun.cpp index a0e41208802a..6a0ea83db4db 100644 --- a/src/coreclr/src/hosts/osxbundlerun/osxbundlerun.cpp +++ b/src/coreclr/src/hosts/osxbundlerun/osxbundlerun.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // CoreCLR boot loader for OSX app packages. // diff --git a/src/coreclr/src/hosts/unixcoreconsole/coreconsole.cpp b/src/coreclr/src/hosts/unixcoreconsole/coreconsole.cpp index 8ad8c7189365..44a0ac339489 100644 --- a/src/coreclr/src/hosts/unixcoreconsole/coreconsole.cpp +++ b/src/coreclr/src/hosts/unixcoreconsole/coreconsole.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // A simple CoreCLR host that runs a managed binary with the same name as this executable but with the *.dll extension diff --git a/src/coreclr/src/hosts/unixcorerun/corerun.cpp b/src/coreclr/src/hosts/unixcorerun/corerun.cpp index 0a9e499e1e1a..c96ec8b059e4 100644 --- a/src/coreclr/src/hosts/unixcorerun/corerun.cpp +++ b/src/coreclr/src/hosts/unixcorerun/corerun.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include #include diff --git a/src/coreclr/src/hosts/unixcoreruncommon/config.h.in b/src/coreclr/src/hosts/unixcoreruncommon/config.h.in index 8adb7098ef11..0c2e459443b1 100644 --- a/src/coreclr/src/hosts/unixcoreruncommon/config.h.in +++ b/src/coreclr/src/hosts/unixcoreruncommon/config.h.in @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __CONFIG_H__ #define __CONFIG_H__ diff --git a/src/coreclr/src/hosts/unixcoreruncommon/coreruncommon.cpp b/src/coreclr/src/hosts/unixcoreruncommon/coreruncommon.cpp index 1b6e1fa82041..b95903062f37 100644 --- a/src/coreclr/src/hosts/unixcoreruncommon/coreruncommon.cpp +++ b/src/coreclr/src/hosts/unixcoreruncommon/coreruncommon.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // Code that is used by both the Unix corerun and coreconsole. diff --git a/src/coreclr/src/hosts/unixcoreruncommon/coreruncommon.h b/src/coreclr/src/hosts/unixcoreruncommon/coreruncommon.h index bc54e977746a..b6bc17bd4631 100644 --- a/src/coreclr/src/hosts/unixcoreruncommon/coreruncommon.h +++ b/src/coreclr/src/hosts/unixcoreruncommon/coreruncommon.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include diff --git a/src/coreclr/src/ilasm/CMakeLists.txt b/src/coreclr/src/ilasm/CMakeLists.txt index 0036ed4f908c..ae5419514df5 100644 --- a/src/coreclr/src/ilasm/CMakeLists.txt +++ b/src/coreclr/src/ilasm/CMakeLists.txt @@ -113,14 +113,8 @@ if(CLR_CMAKE_HOST_UNIX) mscorrc coreclrpal palrt + ${CMAKE_DL_LIBS} ) - - # FreeBSD and NetBSD implement dlopen(3) in libc - if(NOT CLR_CMAKE_TARGET_FREEBSD AND NOT CLR_CMAKE_TARGET_NETBSD) - target_link_libraries(ilasm - dl - ) - endif(NOT CLR_CMAKE_TARGET_FREEBSD AND NOT CLR_CMAKE_TARGET_NETBSD) else() target_link_libraries(ilasm ${ILASM_LINK_LIBRARIES} diff --git a/src/coreclr/src/ilasm/Native.rc b/src/coreclr/src/ilasm/Native.rc index 2164680d3ce2..b9622b6c47eb 100644 --- a/src/coreclr/src/ilasm/Native.rc +++ b/src/coreclr/src/ilasm/Native.rc @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #define FX_VER_FILEDESCRIPTION_STR "Microsoft .NET Framework IL assembler\0" diff --git a/src/coreclr/src/ilasm/asmenum.h b/src/coreclr/src/ilasm/asmenum.h index e16ee23dd0a3..f2e79c81eb9f 100644 --- a/src/coreclr/src/ilasm/asmenum.h +++ b/src/coreclr/src/ilasm/asmenum.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __asmenum_h__ #define __asmenum_h__ diff --git a/src/coreclr/src/ilasm/asmman.cpp b/src/coreclr/src/ilasm/asmman.cpp index 7d22c9ba5b44..4abb780e4be1 100644 --- a/src/coreclr/src/ilasm/asmman.cpp +++ b/src/coreclr/src/ilasm/asmman.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // asmman.cpp - manifest info handling (implementation of class AsmMan, see asmman.hpp) // diff --git a/src/coreclr/src/ilasm/asmman.hpp b/src/coreclr/src/ilasm/asmman.hpp index 38851bab0bc0..1290c9b2707c 100644 --- a/src/coreclr/src/ilasm/asmman.hpp +++ b/src/coreclr/src/ilasm/asmman.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // asmman.hpp - header file for manifest-related ILASM functions // diff --git a/src/coreclr/src/ilasm/asmparse.h b/src/coreclr/src/ilasm/asmparse.h index 3218e238f118..7585ec69f720 100644 --- a/src/coreclr/src/ilasm/asmparse.h +++ b/src/coreclr/src/ilasm/asmparse.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /**************************************************************************/ /* asmParse is basically a wrapper around a YACC grammer COM+ assembly */ diff --git a/src/coreclr/src/ilasm/asmparse.y b/src/coreclr/src/ilasm/asmparse.y index 159c54a75326..29179ffcec8a 100644 --- a/src/coreclr/src/ilasm/asmparse.y +++ b/src/coreclr/src/ilasm/asmparse.y @@ -2,7 +2,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File asmparse.y @@ -675,6 +674,7 @@ callKind : /* EMPTY */ { $$ = IMAGE_CEE_C | UNMANAGED_ STDCALL_ { $$ = IMAGE_CEE_CS_CALLCONV_STDCALL; } | UNMANAGED_ THISCALL_ { $$ = IMAGE_CEE_CS_CALLCONV_THISCALL; } | UNMANAGED_ FASTCALL_ { $$ = IMAGE_CEE_CS_CALLCONV_FASTCALL; } + | UNMANAGED_ { $$ = IMAGE_CEE_CS_CALLCONV_UNMANAGED; } ; mdtoken : MDTOKEN_ '(' int32 ')' { $$ = $3; } diff --git a/src/coreclr/src/ilasm/asmtemplates.h b/src/coreclr/src/ilasm/asmtemplates.h index 6b6ccd4e294d..0393c71a4f24 100644 --- a/src/coreclr/src/ilasm/asmtemplates.h +++ b/src/coreclr/src/ilasm/asmtemplates.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef ASMTEMPLATES_H #define ASMTEMPLATES_H diff --git a/src/coreclr/src/ilasm/assem.cpp b/src/coreclr/src/ilasm/assem.cpp index 99a4321d38df..cdfd302be2ef 100644 --- a/src/coreclr/src/ilasm/assem.cpp +++ b/src/coreclr/src/ilasm/assem.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: assem.cpp // diff --git a/src/coreclr/src/ilasm/assembler.cpp b/src/coreclr/src/ilasm/assembler.cpp index 252a07a30349..b1c9dd50d81b 100644 --- a/src/coreclr/src/ilasm/assembler.cpp +++ b/src/coreclr/src/ilasm/assembler.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: assembler.cpp // @@ -2021,7 +2020,6 @@ void Assembler::EmitInstrStringLiteral(Instr* instr, BinStr* literal, BOOL Conve } if(sz) report->error("Failed to convert string '%s' to Unicode: %s\n",(char*)pb,sz); else report->error("Failed to convert string '%s' to Unicode: error 0x%08X\n",(char*)pb,dw); - delete instr; goto OuttaHere; } L--; @@ -2052,7 +2050,6 @@ void Assembler::EmitInstrStringLiteral(Instr* instr, BinStr* literal, BOOL Conve { report->error("Failed to add user string using DefineUserString, hr=0x%08x, data: '%S'\n", hr, UnicodeString); - delete instr; } else { @@ -2077,7 +2074,6 @@ void Assembler::EmitInstrSig(Instr* instr, BinStr* sig) if (FAILED(m_pEmitter->GetTokenFromSig(mySig, cSig, &MetadataToken))) { report->error("Unable to convert signature to metadata token.\n"); - delete instr; } else { diff --git a/src/coreclr/src/ilasm/assembler.h b/src/coreclr/src/ilasm/assembler.h index 43cbf42bb651..39bacaf44213 100644 --- a/src/coreclr/src/ilasm/assembler.h +++ b/src/coreclr/src/ilasm/assembler.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /************************************************************************/ /* Assembler.h */ /************************************************************************/ diff --git a/src/coreclr/src/ilasm/binstr.h b/src/coreclr/src/ilasm/binstr.h index 275b810a5c7b..d0e8da1e4907 100644 --- a/src/coreclr/src/ilasm/binstr.h +++ b/src/coreclr/src/ilasm/binstr.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /**************************************************************************/ /* a binary string (blob) class */ diff --git a/src/coreclr/src/ilasm/class.hpp b/src/coreclr/src/ilasm/class.hpp index 6f3d8ec7a808..b86758957002 100644 --- a/src/coreclr/src/ilasm/class.hpp +++ b/src/coreclr/src/ilasm/class.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // class.hpp // diff --git a/src/coreclr/src/ilasm/extractGrammar.pl b/src/coreclr/src/ilasm/extractGrammar.pl index f4a8a451d6ea..0c2019ef98b2 100644 --- a/src/coreclr/src/ilasm/extractGrammar.pl +++ b/src/coreclr/src/ilasm/extractGrammar.pl @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. # # a simple script that extracts the grammar from a yacc file diff --git a/src/coreclr/src/ilasm/grammar_after.cpp b/src/coreclr/src/ilasm/grammar_after.cpp index 938eac15dd2b..96787774562f 100644 --- a/src/coreclr/src/ilasm/grammar_after.cpp +++ b/src/coreclr/src/ilasm/grammar_after.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /********************************************************************************/ /* Code goes here */ diff --git a/src/coreclr/src/ilasm/grammar_before.cpp b/src/coreclr/src/ilasm/grammar_before.cpp index 2d070ba26b33..43b45bf36b97 100644 --- a/src/coreclr/src/ilasm/grammar_before.cpp +++ b/src/coreclr/src/ilasm/grammar_before.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include #include diff --git a/src/coreclr/src/ilasm/ilasmpch.cpp b/src/coreclr/src/ilasm/ilasmpch.cpp index 96e6eb9bf0d2..282910d0f45d 100644 --- a/src/coreclr/src/ilasm/ilasmpch.cpp +++ b/src/coreclr/src/ilasm/ilasmpch.cpp @@ -1,5 +1,4 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "ilasmpch.h" diff --git a/src/coreclr/src/ilasm/ilasmpch.h b/src/coreclr/src/ilasm/ilasmpch.h index 31be491abc8a..d5f8cc2b158b 100644 --- a/src/coreclr/src/ilasm/ilasmpch.h +++ b/src/coreclr/src/ilasm/ilasmpch.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #if !defined(_ILASMPCH_H) #define _ILASMPCH_H diff --git a/src/coreclr/src/ilasm/main.cpp b/src/coreclr/src/ilasm/main.cpp index 3257323446d7..3942e8cecc99 100644 --- a/src/coreclr/src/ilasm/main.cpp +++ b/src/coreclr/src/ilasm/main.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // File: main.cpp // diff --git a/src/coreclr/src/ilasm/method.cpp b/src/coreclr/src/ilasm/method.cpp index a0e20d351d0f..41df30f510f6 100644 --- a/src/coreclr/src/ilasm/method.cpp +++ b/src/coreclr/src/ilasm/method.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // file: method.cpp // diff --git a/src/coreclr/src/ilasm/method.hpp b/src/coreclr/src/ilasm/method.hpp index e0bcd0c9e78d..47786f5d33c0 100644 --- a/src/coreclr/src/ilasm/method.hpp +++ b/src/coreclr/src/ilasm/method.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // method.hpp // diff --git a/src/coreclr/src/ilasm/nvpair.h b/src/coreclr/src/ilasm/nvpair.h index 8e0f4bd4accc..158df000aa49 100644 --- a/src/coreclr/src/ilasm/nvpair.h +++ b/src/coreclr/src/ilasm/nvpair.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /***************************************************************************/ /* Name value pair (both strings) which can be linked into a list of pairs */ diff --git a/src/coreclr/src/ilasm/prebuilt/asmparse.cpp b/src/coreclr/src/ilasm/prebuilt/asmparse.cpp index d9846398b6b3..bae2b0488be2 100644 --- a/src/coreclr/src/ilasm/prebuilt/asmparse.cpp +++ b/src/coreclr/src/ilasm/prebuilt/asmparse.cpp @@ -6,7 +6,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File asmparse.y @@ -47,291 +46,291 @@ typedef union { CustomDescr* cad; unsigned short opcode; } YYSTYPE; -# define ERROR_ 257 -# define BAD_COMMENT_ 258 -# define BAD_LITERAL_ 259 -# define ID 260 -# define DOTTEDNAME 261 -# define QSTRING 262 -# define SQSTRING 263 -# define INT32 264 -# define INT64 265 -# define FLOAT64 266 -# define HEXBYTE 267 -# define TYPEDEF_T 268 -# define TYPEDEF_M 269 -# define TYPEDEF_F 270 -# define TYPEDEF_TS 271 -# define TYPEDEF_MR 272 -# define TYPEDEF_CA 273 -# define DCOLON 274 -# define ELIPSIS 275 -# define VOID_ 276 -# define BOOL_ 277 -# define CHAR_ 278 -# define UNSIGNED_ 279 -# define INT_ 280 -# define INT8_ 281 -# define INT16_ 282 -# define INT32_ 283 -# define INT64_ 284 -# define FLOAT_ 285 -# define FLOAT32_ 286 -# define FLOAT64_ 287 -# define BYTEARRAY_ 288 -# define UINT_ 289 -# define UINT8_ 290 -# define UINT16_ 291 -# define UINT32_ 292 -# define UINT64_ 293 -# define FLAGS_ 294 -# define CALLCONV_ 295 -# define MDTOKEN_ 296 -# define OBJECT_ 297 -# define STRING_ 298 -# define NULLREF_ 299 -# define DEFAULT_ 300 -# define CDECL_ 301 -# define VARARG_ 302 -# define STDCALL_ 303 -# define THISCALL_ 304 -# define FASTCALL_ 305 -# define CLASS_ 306 -# define TYPEDREF_ 307 -# define UNMANAGED_ 308 -# define FINALLY_ 309 -# define HANDLER_ 310 -# define CATCH_ 311 -# define FILTER_ 312 -# define FAULT_ 313 -# define EXTENDS_ 314 -# define IMPLEMENTS_ 315 -# define TO_ 316 -# define AT_ 317 -# define TLS_ 318 -# define TRUE_ 319 -# define FALSE_ 320 -# define _INTERFACEIMPL 321 -# define VALUE_ 322 -# define VALUETYPE_ 323 -# define NATIVE_ 324 -# define INSTANCE_ 325 -# define SPECIALNAME_ 326 -# define FORWARDER_ 327 -# define STATIC_ 328 -# define PUBLIC_ 329 -# define PRIVATE_ 330 -# define FAMILY_ 331 -# define FINAL_ 332 -# define SYNCHRONIZED_ 333 -# define INTERFACE_ 334 -# define SEALED_ 335 -# define NESTED_ 336 -# define ABSTRACT_ 337 -# define AUTO_ 338 -# define SEQUENTIAL_ 339 -# define EXPLICIT_ 340 -# define ANSI_ 341 -# define UNICODE_ 342 -# define AUTOCHAR_ 343 -# define IMPORT_ 344 -# define ENUM_ 345 -# define VIRTUAL_ 346 -# define NOINLINING_ 347 -# define AGGRESSIVEINLINING_ 348 -# define NOOPTIMIZATION_ 349 -# define AGGRESSIVEOPTIMIZATION_ 350 -# define UNMANAGEDEXP_ 351 -# define BEFOREFIELDINIT_ 352 -# define STRICT_ 353 -# define RETARGETABLE_ 354 -# define WINDOWSRUNTIME_ 355 -# define NOPLATFORM_ 356 -# define METHOD_ 357 -# define FIELD_ 358 -# define PINNED_ 359 -# define MODREQ_ 360 -# define MODOPT_ 361 -# define SERIALIZABLE_ 362 -# define PROPERTY_ 363 -# define TYPE_ 364 -# define ASSEMBLY_ 365 -# define FAMANDASSEM_ 366 -# define FAMORASSEM_ 367 -# define PRIVATESCOPE_ 368 -# define HIDEBYSIG_ 369 -# define NEWSLOT_ 370 -# define RTSPECIALNAME_ 371 -# define PINVOKEIMPL_ 372 -# define _CTOR 373 -# define _CCTOR 374 -# define LITERAL_ 375 -# define NOTSERIALIZED_ 376 -# define INITONLY_ 377 -# define REQSECOBJ_ 378 -# define CIL_ 379 -# define OPTIL_ 380 -# define MANAGED_ 381 -# define FORWARDREF_ 382 -# define PRESERVESIG_ 383 -# define RUNTIME_ 384 -# define INTERNALCALL_ 385 -# define _IMPORT 386 -# define NOMANGLE_ 387 -# define LASTERR_ 388 -# define WINAPI_ 389 -# define AS_ 390 -# define BESTFIT_ 391 -# define ON_ 392 -# define OFF_ 393 -# define CHARMAPERROR_ 394 -# define INSTR_NONE 395 -# define INSTR_VAR 396 -# define INSTR_I 397 -# define INSTR_I8 398 -# define INSTR_R 399 -# define INSTR_BRTARGET 400 -# define INSTR_METHOD 401 -# define INSTR_FIELD 402 -# define INSTR_TYPE 403 -# define INSTR_STRING 404 -# define INSTR_SIG 405 -# define INSTR_TOK 406 -# define INSTR_SWITCH 407 -# define _CLASS 408 -# define _NAMESPACE 409 -# define _METHOD 410 -# define _FIELD 411 -# define _DATA 412 -# define _THIS 413 -# define _BASE 414 -# define _NESTER 415 -# define _EMITBYTE 416 -# define _TRY 417 -# define _MAXSTACK 418 -# define _LOCALS 419 -# define _ENTRYPOINT 420 -# define _ZEROINIT 421 -# define _EVENT 422 -# define _ADDON 423 -# define _REMOVEON 424 -# define _FIRE 425 -# define _OTHER 426 -# define _PROPERTY 427 -# define _SET 428 -# define _GET 429 -# define _PERMISSION 430 -# define _PERMISSIONSET 431 -# define REQUEST_ 432 -# define DEMAND_ 433 -# define ASSERT_ 434 -# define DENY_ 435 -# define PERMITONLY_ 436 -# define LINKCHECK_ 437 -# define INHERITCHECK_ 438 -# define REQMIN_ 439 -# define REQOPT_ 440 -# define REQREFUSE_ 441 -# define PREJITGRANT_ 442 -# define PREJITDENY_ 443 -# define NONCASDEMAND_ 444 -# define NONCASLINKDEMAND_ 445 -# define NONCASINHERITANCE_ 446 -# define _LINE 447 -# define P_LINE 448 -# define _LANGUAGE 449 -# define _CUSTOM 450 -# define INIT_ 451 -# define _SIZE 452 -# define _PACK 453 -# define _VTABLE 454 -# define _VTFIXUP 455 -# define FROMUNMANAGED_ 456 -# define CALLMOSTDERIVED_ 457 -# define _VTENTRY 458 -# define RETAINAPPDOMAIN_ 459 -# define _FILE 460 -# define NOMETADATA_ 461 -# define _HASH 462 -# define _ASSEMBLY 463 -# define _PUBLICKEY 464 -# define _PUBLICKEYTOKEN 465 -# define ALGORITHM_ 466 -# define _VER 467 -# define _LOCALE 468 -# define EXTERN_ 469 -# define _MRESOURCE 470 -# define _MODULE 471 -# define _EXPORT 472 -# define LEGACY_ 473 -# define LIBRARY_ 474 -# define X86_ 475 -# define AMD64_ 476 -# define ARM_ 477 -# define ARM64_ 478 -# define MARSHAL_ 479 -# define CUSTOM_ 480 -# define SYSSTRING_ 481 -# define FIXED_ 482 -# define VARIANT_ 483 -# define CURRENCY_ 484 -# define SYSCHAR_ 485 -# define DECIMAL_ 486 -# define DATE_ 487 -# define BSTR_ 488 -# define TBSTR_ 489 -# define LPSTR_ 490 -# define LPWSTR_ 491 -# define LPTSTR_ 492 -# define OBJECTREF_ 493 -# define IUNKNOWN_ 494 -# define IDISPATCH_ 495 -# define STRUCT_ 496 -# define SAFEARRAY_ 497 -# define BYVALSTR_ 498 -# define LPVOID_ 499 -# define ANY_ 500 -# define ARRAY_ 501 -# define LPSTRUCT_ 502 -# define IIDPARAM_ 503 -# define IN_ 504 -# define OUT_ 505 -# define OPT_ 506 -# define _PARAM 507 -# define _OVERRIDE 508 -# define WITH_ 509 -# define NULL_ 510 -# define HRESULT_ 511 -# define CARRAY_ 512 -# define USERDEFINED_ 513 -# define RECORD_ 514 -# define FILETIME_ 515 -# define BLOB_ 516 -# define STREAM_ 517 -# define STORAGE_ 518 -# define STREAMED_OBJECT_ 519 -# define STORED_OBJECT_ 520 -# define BLOB_OBJECT_ 521 -# define CF_ 522 -# define CLSID_ 523 -# define VECTOR_ 524 -# define _SUBSYSTEM 525 -# define _CORFLAGS 526 -# define ALIGNMENT_ 527 -# define _IMAGEBASE 528 -# define _STACKRESERVE 529 -# define _TYPEDEF 530 -# define _TEMPLATE 531 -# define _TYPELIST 532 -# define _MSCORLIB 533 -# define P_DEFINE 534 -# define P_UNDEF 535 -# define P_IFDEF 536 -# define P_IFNDEF 537 -# define P_ELSE 538 -# define P_ENDIF 539 -# define P_INCLUDE 540 -# define CONSTRAINT_ 541 +# define ERROR_ 257 +# define BAD_COMMENT_ 258 +# define BAD_LITERAL_ 259 +# define ID 260 +# define DOTTEDNAME 261 +# define QSTRING 262 +# define SQSTRING 263 +# define INT32 264 +# define INT64 265 +# define FLOAT64 266 +# define HEXBYTE 267 +# define TYPEDEF_T 268 +# define TYPEDEF_M 269 +# define TYPEDEF_F 270 +# define TYPEDEF_TS 271 +# define TYPEDEF_MR 272 +# define TYPEDEF_CA 273 +# define DCOLON 274 +# define ELIPSIS 275 +# define VOID_ 276 +# define BOOL_ 277 +# define CHAR_ 278 +# define UNSIGNED_ 279 +# define INT_ 280 +# define INT8_ 281 +# define INT16_ 282 +# define INT32_ 283 +# define INT64_ 284 +# define FLOAT_ 285 +# define FLOAT32_ 286 +# define FLOAT64_ 287 +# define BYTEARRAY_ 288 +# define UINT_ 289 +# define UINT8_ 290 +# define UINT16_ 291 +# define UINT32_ 292 +# define UINT64_ 293 +# define FLAGS_ 294 +# define CALLCONV_ 295 +# define MDTOKEN_ 296 +# define OBJECT_ 297 +# define STRING_ 298 +# define NULLREF_ 299 +# define DEFAULT_ 300 +# define CDECL_ 301 +# define VARARG_ 302 +# define STDCALL_ 303 +# define THISCALL_ 304 +# define FASTCALL_ 305 +# define CLASS_ 306 +# define TYPEDREF_ 307 +# define UNMANAGED_ 308 +# define FINALLY_ 309 +# define HANDLER_ 310 +# define CATCH_ 311 +# define FILTER_ 312 +# define FAULT_ 313 +# define EXTENDS_ 314 +# define IMPLEMENTS_ 315 +# define TO_ 316 +# define AT_ 317 +# define TLS_ 318 +# define TRUE_ 319 +# define FALSE_ 320 +# define _INTERFACEIMPL 321 +# define VALUE_ 322 +# define VALUETYPE_ 323 +# define NATIVE_ 324 +# define INSTANCE_ 325 +# define SPECIALNAME_ 326 +# define FORWARDER_ 327 +# define STATIC_ 328 +# define PUBLIC_ 329 +# define PRIVATE_ 330 +# define FAMILY_ 331 +# define FINAL_ 332 +# define SYNCHRONIZED_ 333 +# define INTERFACE_ 334 +# define SEALED_ 335 +# define NESTED_ 336 +# define ABSTRACT_ 337 +# define AUTO_ 338 +# define SEQUENTIAL_ 339 +# define EXPLICIT_ 340 +# define ANSI_ 341 +# define UNICODE_ 342 +# define AUTOCHAR_ 343 +# define IMPORT_ 344 +# define ENUM_ 345 +# define VIRTUAL_ 346 +# define NOINLINING_ 347 +# define AGGRESSIVEINLINING_ 348 +# define NOOPTIMIZATION_ 349 +# define AGGRESSIVEOPTIMIZATION_ 350 +# define UNMANAGEDEXP_ 351 +# define BEFOREFIELDINIT_ 352 +# define STRICT_ 353 +# define RETARGETABLE_ 354 +# define WINDOWSRUNTIME_ 355 +# define NOPLATFORM_ 356 +# define METHOD_ 357 +# define FIELD_ 358 +# define PINNED_ 359 +# define MODREQ_ 360 +# define MODOPT_ 361 +# define SERIALIZABLE_ 362 +# define PROPERTY_ 363 +# define TYPE_ 364 +# define ASSEMBLY_ 365 +# define FAMANDASSEM_ 366 +# define FAMORASSEM_ 367 +# define PRIVATESCOPE_ 368 +# define HIDEBYSIG_ 369 +# define NEWSLOT_ 370 +# define RTSPECIALNAME_ 371 +# define PINVOKEIMPL_ 372 +# define _CTOR 373 +# define _CCTOR 374 +# define LITERAL_ 375 +# define NOTSERIALIZED_ 376 +# define INITONLY_ 377 +# define REQSECOBJ_ 378 +# define CIL_ 379 +# define OPTIL_ 380 +# define MANAGED_ 381 +# define FORWARDREF_ 382 +# define PRESERVESIG_ 383 +# define RUNTIME_ 384 +# define INTERNALCALL_ 385 +# define _IMPORT 386 +# define NOMANGLE_ 387 +# define LASTERR_ 388 +# define WINAPI_ 389 +# define AS_ 390 +# define BESTFIT_ 391 +# define ON_ 392 +# define OFF_ 393 +# define CHARMAPERROR_ 394 +# define INSTR_NONE 395 +# define INSTR_VAR 396 +# define INSTR_I 397 +# define INSTR_I8 398 +# define INSTR_R 399 +# define INSTR_BRTARGET 400 +# define INSTR_METHOD 401 +# define INSTR_FIELD 402 +# define INSTR_TYPE 403 +# define INSTR_STRING 404 +# define INSTR_SIG 405 +# define INSTR_TOK 406 +# define INSTR_SWITCH 407 +# define _CLASS 408 +# define _NAMESPACE 409 +# define _METHOD 410 +# define _FIELD 411 +# define _DATA 412 +# define _THIS 413 +# define _BASE 414 +# define _NESTER 415 +# define _EMITBYTE 416 +# define _TRY 417 +# define _MAXSTACK 418 +# define _LOCALS 419 +# define _ENTRYPOINT 420 +# define _ZEROINIT 421 +# define _EVENT 422 +# define _ADDON 423 +# define _REMOVEON 424 +# define _FIRE 425 +# define _OTHER 426 +# define _PROPERTY 427 +# define _SET 428 +# define _GET 429 +# define _PERMISSION 430 +# define _PERMISSIONSET 431 +# define REQUEST_ 432 +# define DEMAND_ 433 +# define ASSERT_ 434 +# define DENY_ 435 +# define PERMITONLY_ 436 +# define LINKCHECK_ 437 +# define INHERITCHECK_ 438 +# define REQMIN_ 439 +# define REQOPT_ 440 +# define REQREFUSE_ 441 +# define PREJITGRANT_ 442 +# define PREJITDENY_ 443 +# define NONCASDEMAND_ 444 +# define NONCASLINKDEMAND_ 445 +# define NONCASINHERITANCE_ 446 +# define _LINE 447 +# define P_LINE 448 +# define _LANGUAGE 449 +# define _CUSTOM 450 +# define INIT_ 451 +# define _SIZE 452 +# define _PACK 453 +# define _VTABLE 454 +# define _VTFIXUP 455 +# define FROMUNMANAGED_ 456 +# define CALLMOSTDERIVED_ 457 +# define _VTENTRY 458 +# define RETAINAPPDOMAIN_ 459 +# define _FILE 460 +# define NOMETADATA_ 461 +# define _HASH 462 +# define _ASSEMBLY 463 +# define _PUBLICKEY 464 +# define _PUBLICKEYTOKEN 465 +# define ALGORITHM_ 466 +# define _VER 467 +# define _LOCALE 468 +# define EXTERN_ 469 +# define _MRESOURCE 470 +# define _MODULE 471 +# define _EXPORT 472 +# define LEGACY_ 473 +# define LIBRARY_ 474 +# define X86_ 475 +# define AMD64_ 476 +# define ARM_ 477 +# define ARM64_ 478 +# define MARSHAL_ 479 +# define CUSTOM_ 480 +# define SYSSTRING_ 481 +# define FIXED_ 482 +# define VARIANT_ 483 +# define CURRENCY_ 484 +# define SYSCHAR_ 485 +# define DECIMAL_ 486 +# define DATE_ 487 +# define BSTR_ 488 +# define TBSTR_ 489 +# define LPSTR_ 490 +# define LPWSTR_ 491 +# define LPTSTR_ 492 +# define OBJECTREF_ 493 +# define IUNKNOWN_ 494 +# define IDISPATCH_ 495 +# define STRUCT_ 496 +# define SAFEARRAY_ 497 +# define BYVALSTR_ 498 +# define LPVOID_ 499 +# define ANY_ 500 +# define ARRAY_ 501 +# define LPSTRUCT_ 502 +# define IIDPARAM_ 503 +# define IN_ 504 +# define OUT_ 505 +# define OPT_ 506 +# define _PARAM 507 +# define _OVERRIDE 508 +# define WITH_ 509 +# define NULL_ 510 +# define HRESULT_ 511 +# define CARRAY_ 512 +# define USERDEFINED_ 513 +# define RECORD_ 514 +# define FILETIME_ 515 +# define BLOB_ 516 +# define STREAM_ 517 +# define STORAGE_ 518 +# define STREAMED_OBJECT_ 519 +# define STORED_OBJECT_ 520 +# define BLOB_OBJECT_ 521 +# define CF_ 522 +# define CLSID_ 523 +# define VECTOR_ 524 +# define _SUBSYSTEM 525 +# define _CORFLAGS 526 +# define ALIGNMENT_ 527 +# define _IMAGEBASE 528 +# define _STACKRESERVE 529 +# define _TYPEDEF 530 +# define _TEMPLATE 531 +# define _TYPELIST 532 +# define _MSCORLIB 533 +# define P_DEFINE 534 +# define P_UNDEF 535 +# define P_IFDEF 536 +# define P_IFNDEF 537 +# define P_ELSE 538 +# define P_ENDIF 539 +# define P_INCLUDE 540 +# define CONSTRAINT_ 541 #define yyclearin yychar = -1 #define yyerrok yyerrflag = 0 #ifndef YYMAXDEPTH @@ -390,7 +389,7 @@ typedef YYEXIND_T yyexind_t; #endif # define YYERRCODE 256 -#line 2061 "asmparse.y" +#line 2062 "asmparse.y" #include "grammar_after.cpp" @@ -403,100 +402,100 @@ YYSTATIC YYCONST short yyexca[] = { #if !(YYOPTTIME) -1, 452, #endif - 41, 537, - -2, 310, + 41, 538, + -2, 311, #if !(YYOPTTIME) -1, 622, #endif - 274, 554, - 47, 554, - -2, 229, + 274, 555, + 47, 555, + -2, 230, #if !(YYOPTTIME) -1, 643, #endif - 40, 309, - 60, 309, - -2, 554, + 40, 310, + 60, 310, + -2, 555, #if !(YYOPTTIME) -1, 665, #endif - 41, 537, - -2, 310, + 41, 538, + -2, 311, #if !(YYOPTTIME) -1, 690, #endif - 274, 554, - 47, 554, - -2, 515, + 274, 555, + 47, 555, + -2, 516, #if !(YYOPTTIME) -1, 809, #endif - 123, 234, - -2, 554, + 123, 235, + -2, 555, #if !(YYOPTTIME) -1, 836, #endif - 41, 537, - -2, 310, + 41, 538, + -2, 311, #if !(YYOPTTIME) -1, 961, #endif - 41, 537, - -2, 310, + 41, 538, + -2, 311, #if !(YYOPTTIME) -1, 994, #endif - 41, 537, - -2, 310, + 41, 538, + -2, 311, #if !(YYOPTTIME) -1, 995, #endif - 41, 537, - -2, 310, + 41, 538, + -2, 311, #if !(YYOPTTIME) -1, 1323, #endif - 41, 537, - -2, 310, + 41, 538, + -2, 311, #if !(YYOPTTIME) -1, 1324, #endif - 41, 537, - -2, 310, + 41, 538, + -2, 311, #if !(YYOPTTIME) -1, 1331, #endif - 41, 537, - -2, 310, + 41, 538, + -2, 311, #if !(YYOPTTIME) -1, 1339, #endif - 41, 537, - -2, 310, + 41, 538, + -2, 311, #if !(YYOPTTIME) -1, 1465, #endif - 41, 537, - -2, 310, + 41, 538, + -2, 311, #if !(YYOPTTIME) -1, 1497, #endif - 41, 537, - -2, 310, + 41, 538, + -2, 311, #if !(YYOPTTIME) -1, 1564, #endif - 41, 537, - -2, 310, + 41, 538, + -2, 311, #if !(YYOPTTIME) -1, 1581, #endif - 41, 537, - -2, 310, + 41, 538, + -2, 311, }; -# define YYNPROD 843 +# define YYNPROD 844 #if YYOPTTIME YYSTATIC YYCONST yyexind_t yyexcaind[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1265,69 +1264,69 @@ YYSTATIC YYCONST yyr_t YYFARDATA YYR1[]={ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 4, 4, 35, 35, 16, 16, 75, 75, 75, 75, 75, 75, 75, 7, 7, 7, 7, 8, - 8, 8, 8, 8, 8, 8, 76, 74, 74, 74, - 74, 74, 74, 144, 144, 81, 81, 81, 145, 145, - 150, 150, 150, 150, 150, 150, 150, 150, 146, 82, - 82, 82, 147, 147, 151, 151, 151, 151, 151, 151, - 151, 152, 38, 38, 34, 34, 153, 114, 78, 78, + 8, 8, 8, 8, 8, 8, 8, 76, 74, 74, + 74, 74, 74, 74, 144, 144, 81, 81, 81, 145, + 145, 150, 150, 150, 150, 150, 150, 150, 150, 146, + 82, 82, 82, 147, 147, 151, 151, 151, 151, 151, + 151, 151, 152, 38, 38, 34, 34, 153, 114, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, - 78, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 3, 3, 3, - 13, 13, 13, 13, 13, 80, 80, 80, 80, 80, + 78, 78, 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, 3, 3, + 3, 13, 13, 13, 13, 13, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, - 80, 154, 115, 115, 155, 155, 155, 155, 155, 155, + 80, 80, 154, 115, 115, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, - 158, 159, 156, 161, 161, 160, 160, 160, 163, 162, - 162, 162, 162, 166, 166, 166, 169, 164, 167, 168, - 165, 165, 165, 117, 170, 170, 172, 172, 172, 171, - 171, 173, 173, 14, 14, 174, 174, 174, 174, 174, + 155, 158, 159, 156, 161, 161, 160, 160, 160, 163, + 162, 162, 162, 162, 166, 166, 166, 169, 164, 167, + 168, 165, 165, 165, 117, 170, 170, 172, 172, 172, + 171, 171, 173, 173, 14, 14, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, 41, 175, - 31, 31, 32, 32, 39, 39, 39, 40, 40, 40, + 175, 31, 31, 32, 32, 39, 39, 39, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, - 40, 40, 40, 42, 42, 42, 43, 43, 43, 47, - 47, 46, 46, 45, 45, 44, 44, 48, 48, 49, - 49, 49, 50, 50, 50, 50, 51, 51, 149, 95, - 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, - 106, 107, 108, 157, 157, 157, 157, 157, 157, 157, + 40, 40, 40, 40, 42, 42, 42, 43, 43, 43, + 47, 47, 46, 46, 45, 45, 44, 44, 48, 48, + 49, 49, 49, 50, 50, 50, 50, 51, 51, 149, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 6, 6, 6, 6, - 6, 53, 53, 54, 54, 55, 55, 25, 25, 26, - 26, 27, 27, 27, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 5, 5, 71, 71, 71, 71, + 157, 157, 157, 157, 157, 157, 157, 6, 6, 6, + 6, 6, 53, 53, 54, 54, 55, 55, 25, 25, + 26, 26, 27, 27, 27, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 5, 5, 71, 71, 71, + 71, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, - 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, - 33, 33, 33, 33, 33, 20, 20, 15, 15, 15, + 33, 33, 33, 33, 33, 33, 20, 20, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 28, 28, 28, 28, + 15, 15, 15, 15, 15, 15, 15, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 30, 30, - 29, 29, 29, 29, 29, 131, 131, 131, 131, 131, - 131, 64, 64, 64, 63, 63, 87, 87, 84, 84, - 85, 17, 17, 37, 37, 37, 37, 37, 37, 37, - 37, 86, 86, 86, 86, 86, 86, 86, 86, 86, - 86, 86, 86, 86, 86, 86, 176, 176, 120, 120, - 120, 120, 120, 120, 120, 120, 120, 120, 120, 121, - 121, 88, 88, 89, 89, 177, 122, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 123, 123, 178, - 178, 178, 66, 66, 179, 179, 179, 179, 179, 179, - 180, 182, 181, 124, 124, 125, 125, 183, 183, 183, - 183, 126, 148, 91, 91, 91, 91, 91, 91, 91, - 91, 91, 91, 127, 127, 184, 184, 184, 184, 184, - 184, 184, 128, 128, 92, 92, 92, 129, 129, 185, - 185, 185, 185 }; + 28, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 30, + 30, 29, 29, 29, 29, 29, 131, 131, 131, 131, + 131, 131, 64, 64, 64, 63, 63, 87, 87, 84, + 84, 85, 17, 17, 37, 37, 37, 37, 37, 37, + 37, 37, 86, 86, 86, 86, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 176, 176, 120, + 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, + 121, 121, 88, 88, 89, 89, 177, 122, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, 123, 123, + 178, 178, 178, 66, 66, 179, 179, 179, 179, 179, + 179, 180, 182, 181, 124, 124, 125, 125, 183, 183, + 183, 183, 126, 148, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 127, 127, 184, 184, 184, 184, + 184, 184, 184, 128, 128, 92, 92, 92, 129, 129, + 185, 185, 185, 185 }; YYSTATIC YYCONST yyr_t YYFARDATA YYR2[]={ 0, 0, 2, 4, 4, 3, 1, 1, 1, 1, @@ -1352,69 +1351,69 @@ YYSTATIC YYCONST yyr_t YYFARDATA YYR2[]={ 2, 2, 2, 2, 5, 2, 2, 2, 2, 2, 2, 5, 0, 2, 0, 2, 0, 3, 9, 9, 7, 7, 1, 1, 1, 2, 2, 1, 4, 0, - 1, 1, 2, 2, 2, 2, 4, 2, 5, 3, - 2, 2, 1, 4, 3, 0, 2, 2, 0, 2, - 2, 2, 2, 2, 1, 1, 1, 1, 9, 0, - 2, 2, 0, 2, 2, 2, 2, 1, 1, 1, - 1, 1, 0, 4, 1, 3, 1, 13, 0, 2, + 1, 1, 2, 2, 2, 2, 1, 4, 2, 5, + 3, 2, 2, 1, 4, 3, 0, 2, 2, 0, + 2, 2, 2, 2, 2, 1, 1, 1, 1, 9, + 0, 2, 2, 0, 2, 2, 2, 2, 1, 1, + 1, 1, 1, 0, 4, 1, 3, 1, 13, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 5, 8, 6, - 5, 0, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 4, 4, 4, 4, 5, 1, 1, 1, - 0, 4, 4, 4, 4, 0, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 5, 8, + 6, 5, 0, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 4, 4, 4, 4, 5, 1, 1, + 1, 0, 4, 4, 4, 4, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 5, 1, 0, 2, 2, 1, 2, 4, 5, 1, - 1, 1, 1, 2, 1, 1, 1, 1, 1, 4, - 6, 4, 4, 11, 1, 5, 3, 7, 5, 5, - 3, 1, 2, 2, 1, 2, 4, 4, 1, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 1, 1, - 1, 4, 4, 2, 4, 2, 0, 1, 1, 3, - 1, 3, 1, 0, 3, 5, 4, 3, 5, 5, - 5, 5, 5, 5, 2, 2, 2, 2, 2, 2, - 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, - 5, 5, 4, 4, 4, 4, 4, 4, 3, 2, - 0, 1, 1, 2, 1, 1, 1, 1, 4, 4, - 5, 4, 4, 4, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 8, 8, 8, 8, 7, 7, - 7, 7, 7, 0, 2, 2, 0, 2, 2, 0, - 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, - 2, 2, 0, 2, 3, 2, 0, 2, 1, 1, + 2, 5, 1, 0, 2, 2, 1, 2, 4, 5, + 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, + 4, 6, 4, 4, 11, 1, 5, 3, 7, 5, + 5, 3, 1, 2, 2, 1, 2, 4, 4, 1, + 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, + 1, 1, 4, 4, 2, 4, 2, 0, 1, 1, + 3, 1, 3, 1, 0, 3, 5, 4, 3, 5, + 5, 5, 5, 5, 5, 2, 2, 2, 2, 2, + 2, 4, 4, 4, 4, 4, 4, 4, 4, 5, + 5, 5, 5, 4, 4, 4, 4, 4, 4, 3, + 2, 0, 1, 1, 2, 1, 1, 1, 1, 4, + 4, 5, 4, 4, 4, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 8, 8, 8, 8, 7, + 7, 7, 7, 7, 0, 2, 2, 0, 2, 2, + 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, + 0, 2, 2, 0, 2, 3, 2, 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 2, 1, 2, 2, 2, 2, 2, 2, - 3, 2, 2, 2, 5, 3, 2, 2, 2, 2, - 2, 5, 4, 6, 2, 4, 0, 3, 3, 1, - 1, 0, 3, 0, 1, 1, 3, 0, 1, 1, - 3, 1, 3, 4, 4, 4, 4, 5, 1, 1, - 1, 1, 1, 1, 1, 3, 1, 3, 4, 1, - 0, 10, 6, 5, 6, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, - 2, 1, 1, 1, 1, 2, 3, 4, 6, 5, - 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, - 2, 2, 4, 1, 2, 1, 2, 1, 2, 1, - 2, 1, 2, 1, 1, 0, 5, 0, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 2, 2, 1, 1, 1, 1, 1, 3, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, + 2, 3, 2, 2, 2, 5, 3, 2, 2, 2, + 2, 2, 5, 4, 6, 2, 4, 0, 3, 3, + 1, 1, 0, 3, 0, 1, 1, 3, 0, 1, + 1, 3, 1, 3, 4, 4, 4, 4, 5, 1, + 1, 1, 1, 1, 1, 1, 3, 1, 3, 4, + 1, 0, 10, 6, 5, 6, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, + 2, 2, 1, 1, 1, 1, 2, 3, 4, 6, + 5, 1, 1, 1, 1, 1, 1, 1, 2, 2, + 1, 2, 2, 4, 1, 2, 1, 2, 1, 2, + 1, 2, 1, 2, 1, 1, 0, 5, 0, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 1, 1, 1, 1, 1, 3, + 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, + 2, 3, 4, 2, 2, 2, 5, 5, 7, 4, + 3, 2, 3, 2, 1, 1, 2, 3, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 2, 1, 3, 2, - 3, 4, 2, 2, 2, 5, 5, 7, 4, 3, - 2, 3, 2, 1, 1, 2, 3, 2, 1, 2, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 2, 2, 1, 1, 1, 1, 1, 1, 3, - 0, 1, 1, 3, 2, 6, 7, 3, 3, 3, - 6, 0, 1, 3, 5, 6, 4, 4, 1, 3, - 3, 1, 1, 1, 1, 4, 1, 6, 6, 6, - 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, - 5, 4, 7, 6, 7, 6, 9, 8, 3, 8, - 4, 0, 2, 0, 1, 3, 3, 0, 2, 2, - 2, 3, 2, 2, 2, 2, 2, 0, 2, 3, - 1, 1, 1, 1, 3, 8, 2, 3, 1, 1, - 3, 3, 3, 4, 6, 0, 2, 3, 1, 3, - 1, 4, 3, 0, 2, 2, 2, 3, 3, 3, - 3, 3, 3, 0, 2, 2, 3, 3, 4, 2, - 1, 1, 3, 5, 0, 2, 2, 0, 2, 4, - 3, 1, 1 }; + 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, + 3, 0, 1, 1, 3, 2, 6, 7, 3, 3, + 3, 6, 0, 1, 3, 5, 6, 4, 4, 1, + 3, 3, 1, 1, 1, 1, 4, 1, 6, 6, + 6, 4, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, + 2, 5, 4, 7, 6, 7, 6, 9, 8, 3, + 8, 4, 0, 2, 0, 1, 3, 3, 0, 2, + 2, 2, 3, 2, 2, 2, 2, 2, 0, 2, + 3, 1, 1, 1, 1, 3, 8, 2, 3, 1, + 1, 3, 3, 3, 4, 6, 0, 2, 3, 1, + 3, 1, 4, 3, 0, 2, 2, 2, 3, 3, + 3, 3, 3, 3, 0, 2, 2, 3, 3, 4, + 2, 1, 1, 3, 5, 0, 2, 2, 0, 2, + 4, 3, 1, 1 }; YYSTATIC YYCONST short YYFARDATA YYCHK[]={ -1000,-109,-110,-111,-113,-114,-116,-117,-118,-119, @@ -1578,164 +1577,164 @@ YYSTATIC YYCONST short YYFARDATA YYCHK[]={ -21, 40, -25, 41 }; YYSTATIC YYCONST short YYFARDATA YYDEF[]={ - 1, -2, 2, 0, 0, 332, 6, 7, 8, 9, + 1, -2, 2, 0, 0, 333, 6, 7, 8, 9, 10, 11, 0, 0, 0, 0, 16, 17, 18, 0, - 0, 771, 0, 0, 24, 25, 26, 0, 28, 135, - 0, 268, 206, 0, 430, 0, 0, 777, 105, 834, - 92, 0, 430, 0, 83, 84, 85, 0, 0, 0, - 0, 0, 0, 57, 58, 0, 60, 108, 261, 386, - 0, 756, 757, 219, 430, 430, 139, 1, 0, 787, - 805, 823, 837, 19, 41, 20, 0, 0, 22, 42, + 0, 772, 0, 0, 24, 25, 26, 0, 28, 135, + 0, 269, 206, 0, 431, 0, 0, 778, 105, 835, + 92, 0, 431, 0, 83, 84, 85, 0, 0, 0, + 0, 0, 0, 57, 58, 0, 60, 108, 262, 387, + 0, 757, 758, 219, 431, 431, 139, 1, 0, 788, + 806, 824, 838, 19, 41, 20, 0, 0, 22, 42, 43, 23, 29, 137, 0, 104, 38, 39, 36, 37, - 219, 186, 0, 383, 0, 390, 0, 0, 430, 393, - 393, 393, 393, 393, 393, 0, 0, 431, 432, 0, - 759, 0, 777, 813, 0, 93, 0, 0, 741, 742, - 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, - 753, 754, 755, 0, 0, 33, 0, 0, 0, 0, - 0, 0, 667, 0, 0, 219, 0, 683, 684, 0, - 688, 0, 0, 548, 232, 550, 551, 552, 553, 0, - 488, 690, 691, 692, 693, 694, 695, 696, 697, 698, - 0, 703, 704, 705, 706, 707, 554, 0, 52, 54, - 55, 56, 59, 0, 385, 387, 388, 0, 61, 0, + 219, 186, 0, 384, 0, 391, 0, 0, 431, 394, + 394, 394, 394, 394, 394, 0, 0, 432, 433, 0, + 760, 0, 778, 814, 0, 93, 0, 0, 742, 743, + 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, + 754, 755, 756, 0, 0, 33, 0, 0, 0, 0, + 0, 0, 668, 0, 0, 219, 0, 684, 685, 0, + 689, 0, 0, 549, 233, 551, 552, 553, 554, 0, + 489, 691, 692, 693, 694, 695, 696, 697, 698, 699, + 0, 704, 705, 706, 707, 708, 555, 0, 52, 54, + 55, 56, 59, 0, 386, 388, 389, 0, 61, 0, 71, 0, 212, 213, 214, 219, 219, 217, 0, 220, - 221, 0, 0, 0, 0, 0, 5, 333, 0, 335, - 0, 0, 339, 340, 341, 342, 0, 344, 345, 346, - 347, 348, 0, 0, 0, 354, 0, 0, 331, 503, - 0, 0, 0, 0, 430, 0, 219, 0, 0, 0, - 219, 0, 0, 332, 0, 489, 490, 491, 492, 493, - 494, 495, 496, 497, 498, 499, 500, 501, 361, 368, - 0, 0, 0, 0, 21, 773, 772, 0, 29, 549, - 107, 0, 136, 556, 0, 559, 219, 0, 310, 269, - 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, - 280, 281, 282, 283, 284, 285, 286, 0, 0, 0, - 0, 0, 392, 0, 0, 0, 0, 404, 0, 0, - 405, 0, 406, 0, 407, 0, 408, 0, 409, 429, - 102, 433, 0, 758, 0, 0, 768, 776, 778, 779, - 780, 0, 782, 783, 784, 785, 786, 0, 0, 832, - 835, 836, 94, 717, 718, 719, 0, 0, 31, 0, - 0, 710, 672, 673, 674, 0, 0, 533, 0, 0, - 0, 0, 666, 0, 669, 227, 0, 0, 680, 682, - 685, 0, 687, 689, 0, 0, 0, 0, 0, 0, - 230, 231, 699, 700, 701, 702, 0, 53, 147, 109, + 221, 226, 0, 0, 0, 0, 5, 334, 0, 336, + 0, 0, 340, 341, 342, 343, 0, 345, 346, 347, + 348, 349, 0, 0, 0, 355, 0, 0, 332, 504, + 0, 0, 0, 0, 431, 0, 219, 0, 0, 0, + 219, 0, 0, 333, 0, 490, 491, 492, 493, 494, + 495, 496, 497, 498, 499, 500, 501, 502, 362, 369, + 0, 0, 0, 0, 21, 774, 773, 0, 29, 550, + 107, 0, 136, 557, 0, 560, 219, 0, 311, 270, + 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, + 281, 282, 283, 284, 285, 286, 287, 0, 0, 0, + 0, 0, 393, 0, 0, 0, 0, 405, 0, 0, + 406, 0, 407, 0, 408, 0, 409, 0, 410, 430, + 102, 434, 0, 759, 0, 0, 769, 777, 779, 780, + 781, 0, 783, 784, 785, 786, 787, 0, 0, 833, + 836, 837, 94, 718, 719, 720, 0, 0, 31, 0, + 0, 711, 673, 674, 675, 0, 0, 534, 0, 0, + 0, 0, 667, 0, 670, 228, 0, 0, 681, 683, + 686, 0, 688, 690, 0, 0, 0, 0, 0, 0, + 231, 232, 700, 701, 702, 703, 0, 53, 147, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 0, 131, 132, 133, 0, 0, 103, 0, 0, 72, 73, 0, 215, 216, 0, - 222, 223, 224, 225, 64, 68, 3, 140, 332, 0, + 222, 223, 224, 225, 64, 68, 3, 140, 333, 0, 0, 0, 168, 169, 170, 171, 172, 0, 0, 0, - 0, 178, 179, 0, 0, 235, 249, 813, 105, 4, - 334, 336, -2, 0, 343, 0, 0, 0, 219, 0, - 0, 0, 362, 364, 0, 0, 0, 0, 0, 0, - 378, 379, 376, 504, 505, 506, 507, 502, 508, 509, - 44, 0, 0, 0, 511, 512, 513, 0, 516, 517, - 518, 519, 520, 0, 430, 0, 524, 526, 0, 365, - 0, 0, 12, 788, 0, 790, 791, 430, 0, 0, - 430, 798, 799, 0, 13, 806, 430, 808, 430, 810, - 0, 0, 14, 824, 0, 0, 0, 0, 830, 831, - 15, 838, 0, 0, 841, 842, 770, 774, 27, 30, - 138, 142, 0, 0, 0, 40, 0, 0, 291, 0, + 0, 178, 179, 0, 0, 236, 250, 814, 105, 4, + 335, 337, -2, 0, 344, 0, 0, 0, 219, 0, + 0, 0, 363, 365, 0, 0, 0, 0, 0, 0, + 379, 380, 377, 505, 506, 507, 508, 503, 509, 510, + 44, 0, 0, 0, 512, 513, 514, 0, 517, 518, + 519, 520, 521, 0, 431, 0, 525, 527, 0, 366, + 0, 0, 12, 789, 0, 791, 792, 431, 0, 0, + 431, 799, 800, 0, 13, 807, 431, 809, 431, 811, + 0, 0, 14, 825, 0, 0, 0, 0, 831, 832, + 15, 839, 0, 0, 842, 843, 771, 775, 27, 30, + 138, 142, 0, 0, 0, 40, 0, 0, 292, 0, 187, 188, 189, 190, 191, 192, 193, 0, 195, 196, - 197, 198, 199, 200, 0, 207, 389, 0, 0, 0, - 397, 0, 0, 0, 0, 0, 0, 0, 96, 761, - 0, 781, 803, 811, 814, 815, 816, 0, 0, 0, - 0, 0, 721, 726, 727, 34, 47, 670, 0, 708, - 711, 712, 0, 0, 0, 534, 535, 48, 49, 50, - 51, 668, 0, 679, 681, 686, 0, 0, 0, 0, - 555, 0, -2, 710, 0, 106, 154, 125, 126, 127, - 128, 129, 130, 0, 384, 62, 75, 69, 219, 0, - 531, 307, 308, -2, 0, 0, 139, 238, 252, 173, - 174, 823, 0, 219, 0, 0, 0, 0, 219, 0, - 0, 538, 539, 541, 0, -2, 0, 0, 0, 0, - 0, 356, 0, 0, 0, 363, 369, 380, 0, 370, - 371, 372, 377, 373, 374, 375, 0, 0, 510, 0, - -2, 0, 0, 0, 0, 529, 530, 360, 0, 0, - 0, 0, 0, 792, 793, 796, 0, 0, 0, 0, - 0, 0, 0, 825, 0, 829, 0, 0, 0, 0, - 430, 0, 557, 0, 0, 262, 0, 0, 291, 0, - 202, 560, 0, 391, 0, 396, 393, 394, 393, 393, - 393, 393, 393, 0, 760, 0, 0, 0, 817, 818, - 819, 820, 821, 822, 833, 0, 728, 0, 75, 32, - 0, 722, 0, 0, 0, 671, 710, 714, 0, 0, - 678, 0, 673, 544, 545, 546, 0, 0, 226, 0, + 197, 198, 199, 200, 0, 207, 390, 0, 0, 0, + 398, 0, 0, 0, 0, 0, 0, 0, 96, 762, + 0, 782, 804, 812, 815, 816, 817, 0, 0, 0, + 0, 0, 722, 727, 728, 34, 47, 671, 0, 709, + 712, 713, 0, 0, 0, 535, 536, 48, 49, 50, + 51, 669, 0, 680, 682, 687, 0, 0, 0, 0, + 556, 0, -2, 711, 0, 106, 154, 125, 126, 127, + 128, 129, 130, 0, 385, 62, 75, 69, 219, 0, + 532, 308, 309, -2, 0, 0, 139, 239, 253, 173, + 174, 824, 0, 219, 0, 0, 0, 0, 219, 0, + 0, 539, 540, 542, 0, -2, 0, 0, 0, 0, + 0, 357, 0, 0, 0, 364, 370, 381, 0, 371, + 372, 373, 378, 374, 375, 376, 0, 0, 511, 0, + -2, 0, 0, 0, 0, 530, 531, 361, 0, 0, + 0, 0, 0, 793, 794, 797, 0, 0, 0, 0, + 0, 0, 0, 826, 0, 830, 0, 0, 0, 0, + 431, 0, 558, 0, 0, 263, 0, 0, 292, 0, + 202, 561, 0, 392, 0, 397, 394, 395, 394, 394, + 394, 394, 394, 0, 761, 0, 0, 0, 818, 819, + 820, 821, 822, 823, 834, 0, 729, 0, 75, 32, + 0, 723, 0, 0, 0, 672, 711, 715, 0, 0, + 679, 0, 674, 545, 546, 547, 0, 0, 227, 0, 0, 154, 149, 150, 151, 152, 153, 0, 0, 78, - 65, 0, 0, 0, 533, 218, 164, 0, 0, 0, + 65, 0, 0, 0, 534, 218, 164, 0, 0, 0, 0, 0, 0, 0, 181, 0, 0, 0, 0, -2, - 236, 237, 0, 250, 251, 812, 337, 310, 262, 0, - 349, 351, 352, 309, 0, 0, 0, 0, 204, 0, - 0, 0, 0, 0, 0, 522, -2, 525, 526, 526, - 366, 367, 789, 794, 0, 802, 797, 800, 807, 809, - 775, 801, 826, 827, 0, 0, 840, 0, 141, 558, - 0, 0, 0, 0, 0, 0, 287, 0, 0, 290, - 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, - 0, 0, 0, 204, 0, 0, 264, 0, 0, 0, - 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, - 575, 576, 0, 581, 582, 583, 584, 590, 591, 592, - 593, 594, 595, 596, 615, 615, 599, 615, 617, 603, - 605, 0, 607, 0, 609, 611, 0, 613, 614, 266, - 0, 395, 398, 399, 400, 401, 402, 403, 0, 97, - 98, 99, 100, 101, 763, 765, 804, 715, 0, 0, - 0, 720, 721, 0, 37, 35, 709, 713, 675, 676, - 536, -2, 547, 228, 148, 0, 158, 143, 155, 134, - 63, 74, 76, 77, 437, 0, 0, 0, 0, 0, + 237, 238, 0, 251, 252, 813, 338, 311, 263, 0, + 350, 352, 353, 310, 0, 0, 0, 0, 204, 0, + 0, 0, 0, 0, 0, 523, -2, 526, 527, 527, + 367, 368, 790, 795, 0, 803, 798, 801, 808, 810, + 776, 802, 827, 828, 0, 0, 841, 0, 141, 559, + 0, 0, 0, 0, 0, 0, 288, 0, 0, 291, + 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, + 0, 0, 0, 204, 0, 0, 265, 0, 0, 0, + 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, + 576, 577, 0, 582, 583, 584, 585, 591, 592, 593, + 594, 595, 596, 597, 616, 616, 600, 616, 618, 604, + 606, 0, 608, 0, 610, 612, 0, 614, 615, 267, + 0, 396, 399, 400, 401, 402, 403, 404, 0, 97, + 98, 99, 100, 101, 764, 766, 805, 716, 0, 0, + 0, 721, 722, 0, 37, 35, 710, 714, 676, 677, + 537, -2, 548, 229, 148, 0, 158, 143, 155, 134, + 63, 74, 76, 77, 438, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 430, 0, 531, -2, -2, 0, 0, 165, 166, - 239, 219, 219, 219, 219, 244, 245, 246, 247, 167, - 253, 219, 219, 219, 257, 258, 259, 260, 175, 0, - 0, 0, 0, 0, 184, 219, 233, 0, 540, 542, - 338, 0, 0, 355, 0, 358, 359, 0, 0, 0, - 45, 46, 514, 521, 0, 527, 528, 0, 828, 839, - 773, 147, 560, 311, 312, 313, 314, 291, 289, 0, - 0, 0, 185, 203, 194, 585, 0, 0, 0, 0, - 0, 610, 577, 578, 579, 580, 604, 597, 0, 598, - 600, 601, 618, 619, 620, 621, 622, 623, 624, 625, - 626, 627, 628, 0, 633, 634, 635, 636, 637, 641, - 642, 643, 644, 645, 646, 647, 648, 649, 651, 652, - 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, - 663, 664, 665, 606, 608, 612, 201, 95, 762, 764, - 0, 729, 730, 733, 734, 0, 736, 0, 731, 732, - 716, 723, 78, 0, 0, 158, 157, 154, 0, 144, + 0, 431, 0, 532, -2, -2, 0, 0, 165, 166, + 240, 219, 219, 219, 219, 245, 246, 247, 248, 167, + 254, 219, 219, 219, 258, 259, 260, 261, 175, 0, + 0, 0, 0, 0, 184, 219, 234, 0, 541, 543, + 339, 0, 0, 356, 0, 359, 360, 0, 0, 0, + 45, 46, 515, 522, 0, 528, 529, 0, 829, 840, + 774, 147, 561, 312, 313, 314, 315, 292, 290, 0, + 0, 0, 185, 203, 194, 586, 0, 0, 0, 0, + 0, 611, 578, 579, 580, 581, 605, 598, 0, 599, + 601, 602, 619, 620, 621, 622, 623, 624, 625, 626, + 627, 628, 629, 0, 634, 635, 636, 637, 638, 642, + 643, 644, 645, 646, 647, 648, 649, 650, 652, 653, + 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, + 664, 665, 666, 607, 609, 613, 201, 95, 763, 765, + 0, 730, 731, 734, 735, 0, 737, 0, 732, 733, + 717, 724, 78, 0, 0, 158, 157, 154, 0, 144, 145, 0, 80, 81, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 66, 75, 70, 0, 0, 0, 0, 0, 532, 240, - 241, 242, 243, 254, 255, 256, 219, 0, 180, 0, - 183, 0, 543, 350, 0, 0, 205, 434, 435, 436, + 66, 75, 70, 0, 0, 0, 0, 0, 533, 241, + 242, 243, 244, 255, 256, 257, 219, 0, 180, 0, + 183, 0, 544, 351, 0, 0, 205, 435, 436, 437, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 381, 382, 523, 0, 769, 0, 0, - 0, 302, 303, 304, 305, 0, 586, 0, 0, 265, - 0, 0, 0, 0, 0, 0, 639, 640, 629, 630, - 631, 632, 650, 767, 0, 0, 0, 78, 677, 156, + 0, 0, 0, 382, 383, 524, 0, 770, 0, 0, + 0, 303, 304, 305, 306, 0, 587, 0, 0, 266, + 0, 0, 0, 0, 0, 0, 640, 641, 630, 631, + 632, 633, 651, 768, 0, 0, 0, 78, 678, 156, 159, 160, 0, 0, 86, 87, 88, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 428, 0, -2, -2, 210, 211, 0, 0, 0, - 0, -2, 161, 357, 0, 0, 0, 0, 0, -2, - 263, 288, 306, 587, 0, 0, 0, 0, 0, 0, - 602, 638, 766, 0, 0, 0, 0, 0, 724, 0, - 146, 0, 0, 0, 90, 438, 439, 0, 0, 441, - 442, 0, 443, 0, 410, 412, 0, 411, 413, 0, - 414, 0, 415, 0, 416, 0, 417, 0, 422, 0, - 423, 0, 424, 0, 425, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 426, 0, 427, 0, 67, 0, + 0, 429, 0, -2, -2, 210, 211, 0, 0, 0, + 0, -2, 161, 358, 0, 0, 0, 0, 0, -2, + 264, 289, 307, 588, 0, 0, 0, 0, 0, 0, + 603, 639, 767, 0, 0, 0, 0, 0, 725, 0, + 146, 0, 0, 0, 90, 439, 440, 0, 0, 442, + 443, 0, 444, 0, 411, 413, 0, 412, 414, 0, + 415, 0, 416, 0, 417, 0, 418, 0, 423, 0, + 424, 0, 425, 0, 426, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 427, 0, 428, 0, 67, 0, 0, 163, 0, 161, 182, 0, 0, 162, 0, 0, - 0, 0, 589, 0, 563, 560, 0, 735, 0, 0, - 0, 740, 725, 0, 91, 89, 479, 440, 482, 486, - 463, 466, 469, 471, 473, 475, 469, 471, 473, 475, - 418, 0, 419, 0, 420, 0, 421, 0, 473, 477, - 208, 209, 0, 0, 204, -2, 795, 315, 588, 0, - 562, 564, 616, 0, 0, 0, 79, 0, 0, 0, + 0, 0, 590, 0, 564, 561, 0, 736, 0, 0, + 0, 741, 726, 0, 91, 89, 480, 441, 483, 487, + 464, 467, 470, 472, 474, 476, 470, 472, 474, 476, + 419, 0, 420, 0, 421, 0, 422, 0, 474, 478, + 208, 209, 0, 0, 204, -2, 796, 316, 589, 0, + 563, 565, 617, 0, 0, 0, 79, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 469, 471, 473, 475, 0, 0, 0, -2, 248, 0, - 0, 0, 737, 738, 739, 460, 480, 481, 461, 483, - 0, 485, 462, 487, 444, 464, 465, 445, 467, 468, - 446, 470, 447, 472, 448, 474, 449, 476, 450, 451, - 452, 453, 0, 0, 0, 0, 458, 459, 478, 0, - 0, 353, 267, 316, 317, 318, 319, 320, 321, 322, - 323, 324, 325, 326, 327, 328, 329, 0, 0, 484, - 454, 455, 456, 457, -2, 0, 0, 0, 0, 0, - 0, 561, 176, 219, 330, 0, 0, 0, 0, 161, + 470, 472, 474, 476, 0, 0, 0, -2, 249, 0, + 0, 0, 738, 739, 740, 461, 481, 482, 462, 484, + 0, 486, 463, 488, 445, 465, 466, 446, 468, 469, + 447, 471, 448, 473, 449, 475, 450, 477, 451, 452, + 453, 454, 0, 0, 0, 0, 459, 460, 479, 0, + 0, 354, 268, 317, 318, 319, 320, 321, 322, 323, + 324, 325, 326, 327, 328, 329, 330, 0, 0, 485, + 455, 456, 457, 458, -2, 0, 0, 0, 0, 0, + 0, 562, 176, 219, 331, 0, 0, 0, 0, 161, 0, -2, 0, 177 }; #ifdef YYRECOVER YYSTATIC YYCONST short yyrecover[] = { @@ -1744,10 +1743,10 @@ YYSTATIC YYCONST short yyrecover[] = { #endif /* SCCSWHAT( "@(#)yypars.c 3.1 88/11/16 22:00:49 " ) */ -#line 3 "D:\\CodegenMirror\\src\\tools\\devdiv\\x86\\yypars.c" +#line 3 "F:\\NetFXDev1\\src\\tools\\devdiv\\amd64\\yypars.c" #if ! defined(YYAPI_PACKAGE) /* -** YYAPI_TOKENNAME : name used for return value of yylex +** YYAPI_TOKENNAME : name used for return value of yylex ** YYAPI_TOKENTYPE : type of the token ** YYAPI_TOKENEME(t) : the value of the token that the parser should see ** YYAPI_TOKENNONE : the representation when there is no token @@ -2080,7 +2079,7 @@ YYLOCAL YYNEAR YYPASCAL YYPARSER() yydumpinfo(); #endif switch(yym){ - + case 3: #line 194 "asmparse.y" { PASM->EndClass(); } break; @@ -2787,110 +2786,113 @@ case 225: #line 677 "asmparse.y" { yyval.int32 = IMAGE_CEE_CS_CALLCONV_FASTCALL; } break; case 226: -#line 680 "asmparse.y" -{ yyval.token = yypvt[-1].int32; } break; +#line 678 "asmparse.y" +{ yyval.int32 = IMAGE_CEE_CS_CALLCONV_UNMANAGED; } break; case 227: -#line 683 "asmparse.y" +#line 681 "asmparse.y" +{ yyval.token = yypvt[-1].int32; } break; +case 228: +#line 684 "asmparse.y" { yyval.token = yypvt[-0].token; PASM->delArgNameList(PASM->m_firstArgName); PASM->m_firstArgName = parser->m_ANSFirst.POP(); PASM->m_lastArgName = parser->m_ANSLast.POP(); PASM->SetMemberRefFixup(yypvt[-0].token,iOpcodeLen); } break; -case 228: -#line 689 "asmparse.y" +case 229: +#line 690 "asmparse.y" { yypvt[-3].binstr->insertInt8(IMAGE_CEE_CS_CALLCONV_FIELD); yyval.token = PASM->MakeMemberRef(yypvt[-2].token, yypvt[-0].string, yypvt[-3].binstr); PASM->SetMemberRefFixup(yyval.token,iOpcodeLen); } break; -case 229: -#line 693 "asmparse.y" +case 230: +#line 694 "asmparse.y" { yypvt[-1].binstr->insertInt8(IMAGE_CEE_CS_CALLCONV_FIELD); yyval.token = PASM->MakeMemberRef(NULL, yypvt[-0].string, yypvt[-1].binstr); PASM->SetMemberRefFixup(yyval.token,iOpcodeLen); } break; -case 230: -#line 696 "asmparse.y" -{ yyval.token = yypvt[-0].tdd->m_tkTypeSpec; - PASM->SetMemberRefFixup(yyval.token,iOpcodeLen); } break; case 231: -#line 698 "asmparse.y" +#line 697 "asmparse.y" { yyval.token = yypvt[-0].tdd->m_tkTypeSpec; PASM->SetMemberRefFixup(yyval.token,iOpcodeLen); } break; case 232: -#line 700 "asmparse.y" -{ yyval.token = yypvt[-0].token; +#line 699 "asmparse.y" +{ yyval.token = yypvt[-0].tdd->m_tkTypeSpec; PASM->SetMemberRefFixup(yyval.token,iOpcodeLen); } break; case 233: -#line 705 "asmparse.y" -{ PASM->ResetEvent(yypvt[-0].string, yypvt[-1].token, yypvt[-2].eventAttr); } break; +#line 701 "asmparse.y" +{ yyval.token = yypvt[-0].token; + PASM->SetMemberRefFixup(yyval.token,iOpcodeLen); } break; case 234: #line 706 "asmparse.y" -{ PASM->ResetEvent(yypvt[-0].string, mdTypeRefNil, yypvt[-1].eventAttr); } break; +{ PASM->ResetEvent(yypvt[-0].string, yypvt[-1].token, yypvt[-2].eventAttr); } break; case 235: -#line 710 "asmparse.y" -{ yyval.eventAttr = (CorEventAttr) 0; } break; +#line 707 "asmparse.y" +{ PASM->ResetEvent(yypvt[-0].string, mdTypeRefNil, yypvt[-1].eventAttr); } break; case 236: #line 711 "asmparse.y" -{ yyval.eventAttr = yypvt[-1].eventAttr; } break; +{ yyval.eventAttr = (CorEventAttr) 0; } break; case 237: #line 712 "asmparse.y" +{ yyval.eventAttr = yypvt[-1].eventAttr; } break; +case 238: +#line 713 "asmparse.y" { yyval.eventAttr = (CorEventAttr) (yypvt[-1].eventAttr | evSpecialName); } break; -case 240: -#line 719 "asmparse.y" -{ PASM->SetEventMethod(0, yypvt[-0].token); } break; case 241: #line 720 "asmparse.y" -{ PASM->SetEventMethod(1, yypvt[-0].token); } break; +{ PASM->SetEventMethod(0, yypvt[-0].token); } break; case 242: #line 721 "asmparse.y" -{ PASM->SetEventMethod(2, yypvt[-0].token); } break; +{ PASM->SetEventMethod(1, yypvt[-0].token); } break; case 243: #line 722 "asmparse.y" +{ PASM->SetEventMethod(2, yypvt[-0].token); } break; +case 244: +#line 723 "asmparse.y" { PASM->SetEventMethod(3, yypvt[-0].token); } break; -case 248: -#line 731 "asmparse.y" +case 249: +#line 732 "asmparse.y" { PASM->ResetProp(yypvt[-4].string, parser->MakeSig((IMAGE_CEE_CS_CALLCONV_PROPERTY | (yypvt[-6].int32 & IMAGE_CEE_CS_CALLCONV_HASTHIS)),yypvt[-5].binstr,yypvt[-2].binstr), yypvt[-7].propAttr, yypvt[-0].binstr);} break; -case 249: -#line 736 "asmparse.y" -{ yyval.propAttr = (CorPropertyAttr) 0; } break; case 250: #line 737 "asmparse.y" -{ yyval.propAttr = yypvt[-1].propAttr; } break; +{ yyval.propAttr = (CorPropertyAttr) 0; } break; case 251: #line 738 "asmparse.y" +{ yyval.propAttr = yypvt[-1].propAttr; } break; +case 252: +#line 739 "asmparse.y" { yyval.propAttr = (CorPropertyAttr) (yypvt[-1].propAttr | prSpecialName); } break; -case 254: -#line 746 "asmparse.y" -{ PASM->SetPropMethod(0, yypvt[-0].token); } break; case 255: #line 747 "asmparse.y" -{ PASM->SetPropMethod(1, yypvt[-0].token); } break; +{ PASM->SetPropMethod(0, yypvt[-0].token); } break; case 256: #line 748 "asmparse.y" +{ PASM->SetPropMethod(1, yypvt[-0].token); } break; +case 257: +#line 749 "asmparse.y" { PASM->SetPropMethod(2, yypvt[-0].token); } break; -case 261: -#line 756 "asmparse.y" +case 262: +#line 757 "asmparse.y" { PASM->ResetForNextMethod(); uMethodBeginLine = PASM->m_ulCurLine; uMethodBeginColumn=PASM->m_ulCurColumn; } break; -case 262: -#line 762 "asmparse.y" -{ yyval.binstr = NULL; } break; case 263: #line 763 "asmparse.y" -{ yyval.binstr = yypvt[-1].binstr; } break; +{ yyval.binstr = NULL; } break; case 264: -#line 766 "asmparse.y" -{ yyval.binstr = yypvt[-0].binstr; } break; +#line 764 "asmparse.y" +{ yyval.binstr = yypvt[-1].binstr; } break; case 265: #line 767 "asmparse.y" -{ yyval.binstr = yypvt[-1].binstr; } break; +{ yyval.binstr = yypvt[-0].binstr; } break; case 266: -#line 770 "asmparse.y" -{ bParsingByteArray = TRUE; } break; +#line 768 "asmparse.y" +{ yyval.binstr = yypvt[-1].binstr; } break; case 267: -#line 774 "asmparse.y" +#line 771 "asmparse.y" +{ bParsingByteArray = TRUE; } break; +case 268: +#line 775 "asmparse.y" { BinStr* sig; if (yypvt[-5].typarlist == NULL) sig = parser->MakeSig(yypvt[-10].int32, yypvt[-8].binstr, yypvt[-3].binstr); else { @@ -2904,231 +2906,231 @@ case 267: PASM->m_pCurMethod->m_ulLines[0] = uMethodBeginLine; PASM->m_pCurMethod->m_ulColumns[0]=uMethodBeginColumn; } break; -case 268: -#line 789 "asmparse.y" -{ yyval.methAttr = (CorMethodAttr) 0; } break; case 269: #line 790 "asmparse.y" -{ yyval.methAttr = (CorMethodAttr) (yypvt[-1].methAttr | mdStatic); } break; +{ yyval.methAttr = (CorMethodAttr) 0; } break; case 270: #line 791 "asmparse.y" -{ yyval.methAttr = (CorMethodAttr) ((yypvt[-1].methAttr & ~mdMemberAccessMask) | mdPublic); } break; +{ yyval.methAttr = (CorMethodAttr) (yypvt[-1].methAttr | mdStatic); } break; case 271: #line 792 "asmparse.y" -{ yyval.methAttr = (CorMethodAttr) ((yypvt[-1].methAttr & ~mdMemberAccessMask) | mdPrivate); } break; +{ yyval.methAttr = (CorMethodAttr) ((yypvt[-1].methAttr & ~mdMemberAccessMask) | mdPublic); } break; case 272: #line 793 "asmparse.y" -{ yyval.methAttr = (CorMethodAttr) ((yypvt[-1].methAttr & ~mdMemberAccessMask) | mdFamily); } break; +{ yyval.methAttr = (CorMethodAttr) ((yypvt[-1].methAttr & ~mdMemberAccessMask) | mdPrivate); } break; case 273: #line 794 "asmparse.y" -{ yyval.methAttr = (CorMethodAttr) (yypvt[-1].methAttr | mdFinal); } break; +{ yyval.methAttr = (CorMethodAttr) ((yypvt[-1].methAttr & ~mdMemberAccessMask) | mdFamily); } break; case 274: #line 795 "asmparse.y" -{ yyval.methAttr = (CorMethodAttr) (yypvt[-1].methAttr | mdSpecialName); } break; +{ yyval.methAttr = (CorMethodAttr) (yypvt[-1].methAttr | mdFinal); } break; case 275: #line 796 "asmparse.y" -{ yyval.methAttr = (CorMethodAttr) (yypvt[-1].methAttr | mdVirtual); } break; +{ yyval.methAttr = (CorMethodAttr) (yypvt[-1].methAttr | mdSpecialName); } break; case 276: #line 797 "asmparse.y" -{ yyval.methAttr = (CorMethodAttr) (yypvt[-1].methAttr | mdCheckAccessOnOverride); } break; +{ yyval.methAttr = (CorMethodAttr) (yypvt[-1].methAttr | mdVirtual); } break; case 277: #line 798 "asmparse.y" -{ yyval.methAttr = (CorMethodAttr) (yypvt[-1].methAttr | mdAbstract); } break; +{ yyval.methAttr = (CorMethodAttr) (yypvt[-1].methAttr | mdCheckAccessOnOverride); } break; case 278: #line 799 "asmparse.y" -{ yyval.methAttr = (CorMethodAttr) ((yypvt[-1].methAttr & ~mdMemberAccessMask) | mdAssem); } break; +{ yyval.methAttr = (CorMethodAttr) (yypvt[-1].methAttr | mdAbstract); } break; case 279: #line 800 "asmparse.y" -{ yyval.methAttr = (CorMethodAttr) ((yypvt[-1].methAttr & ~mdMemberAccessMask) | mdFamANDAssem); } break; +{ yyval.methAttr = (CorMethodAttr) ((yypvt[-1].methAttr & ~mdMemberAccessMask) | mdAssem); } break; case 280: #line 801 "asmparse.y" -{ yyval.methAttr = (CorMethodAttr) ((yypvt[-1].methAttr & ~mdMemberAccessMask) | mdFamORAssem); } break; +{ yyval.methAttr = (CorMethodAttr) ((yypvt[-1].methAttr & ~mdMemberAccessMask) | mdFamANDAssem); } break; case 281: #line 802 "asmparse.y" -{ yyval.methAttr = (CorMethodAttr) ((yypvt[-1].methAttr & ~mdMemberAccessMask) | mdPrivateScope); } break; +{ yyval.methAttr = (CorMethodAttr) ((yypvt[-1].methAttr & ~mdMemberAccessMask) | mdFamORAssem); } break; case 282: #line 803 "asmparse.y" -{ yyval.methAttr = (CorMethodAttr) (yypvt[-1].methAttr | mdHideBySig); } break; +{ yyval.methAttr = (CorMethodAttr) ((yypvt[-1].methAttr & ~mdMemberAccessMask) | mdPrivateScope); } break; case 283: #line 804 "asmparse.y" -{ yyval.methAttr = (CorMethodAttr) (yypvt[-1].methAttr | mdNewSlot); } break; +{ yyval.methAttr = (CorMethodAttr) (yypvt[-1].methAttr | mdHideBySig); } break; case 284: #line 805 "asmparse.y" -{ yyval.methAttr = yypvt[-1].methAttr; } break; +{ yyval.methAttr = (CorMethodAttr) (yypvt[-1].methAttr | mdNewSlot); } break; case 285: #line 806 "asmparse.y" -{ yyval.methAttr = (CorMethodAttr) (yypvt[-1].methAttr | mdUnmanagedExport); } break; +{ yyval.methAttr = yypvt[-1].methAttr; } break; case 286: #line 807 "asmparse.y" -{ yyval.methAttr = (CorMethodAttr) (yypvt[-1].methAttr | mdRequireSecObject); } break; +{ yyval.methAttr = (CorMethodAttr) (yypvt[-1].methAttr | mdUnmanagedExport); } break; case 287: #line 808 "asmparse.y" -{ yyval.methAttr = (CorMethodAttr) (yypvt[-1].int32); } break; +{ yyval.methAttr = (CorMethodAttr) (yypvt[-1].methAttr | mdRequireSecObject); } break; case 288: -#line 810 "asmparse.y" +#line 809 "asmparse.y" +{ yyval.methAttr = (CorMethodAttr) (yypvt[-1].int32); } break; +case 289: +#line 811 "asmparse.y" { PASM->SetPinvoke(yypvt[-4].binstr,0,yypvt[-2].binstr,yypvt[-1].pinvAttr); yyval.methAttr = (CorMethodAttr) (yypvt[-7].methAttr | mdPinvokeImpl); } break; -case 289: -#line 813 "asmparse.y" +case 290: +#line 814 "asmparse.y" { PASM->SetPinvoke(yypvt[-2].binstr,0,NULL,yypvt[-1].pinvAttr); yyval.methAttr = (CorMethodAttr) (yypvt[-5].methAttr | mdPinvokeImpl); } break; -case 290: -#line 816 "asmparse.y" +case 291: +#line 817 "asmparse.y" { PASM->SetPinvoke(new BinStr(),0,NULL,yypvt[-1].pinvAttr); yyval.methAttr = (CorMethodAttr) (yypvt[-4].methAttr | mdPinvokeImpl); } break; -case 291: -#line 820 "asmparse.y" -{ yyval.pinvAttr = (CorPinvokeMap) 0; } break; case 292: #line 821 "asmparse.y" -{ yyval.pinvAttr = (CorPinvokeMap) (yypvt[-1].pinvAttr | pmNoMangle); } break; +{ yyval.pinvAttr = (CorPinvokeMap) 0; } break; case 293: #line 822 "asmparse.y" -{ yyval.pinvAttr = (CorPinvokeMap) (yypvt[-1].pinvAttr | pmCharSetAnsi); } break; +{ yyval.pinvAttr = (CorPinvokeMap) (yypvt[-1].pinvAttr | pmNoMangle); } break; case 294: #line 823 "asmparse.y" -{ yyval.pinvAttr = (CorPinvokeMap) (yypvt[-1].pinvAttr | pmCharSetUnicode); } break; +{ yyval.pinvAttr = (CorPinvokeMap) (yypvt[-1].pinvAttr | pmCharSetAnsi); } break; case 295: #line 824 "asmparse.y" -{ yyval.pinvAttr = (CorPinvokeMap) (yypvt[-1].pinvAttr | pmCharSetAuto); } break; +{ yyval.pinvAttr = (CorPinvokeMap) (yypvt[-1].pinvAttr | pmCharSetUnicode); } break; case 296: #line 825 "asmparse.y" -{ yyval.pinvAttr = (CorPinvokeMap) (yypvt[-1].pinvAttr | pmSupportsLastError); } break; +{ yyval.pinvAttr = (CorPinvokeMap) (yypvt[-1].pinvAttr | pmCharSetAuto); } break; case 297: #line 826 "asmparse.y" -{ yyval.pinvAttr = (CorPinvokeMap) (yypvt[-1].pinvAttr | pmCallConvWinapi); } break; +{ yyval.pinvAttr = (CorPinvokeMap) (yypvt[-1].pinvAttr | pmSupportsLastError); } break; case 298: #line 827 "asmparse.y" -{ yyval.pinvAttr = (CorPinvokeMap) (yypvt[-1].pinvAttr | pmCallConvCdecl); } break; +{ yyval.pinvAttr = (CorPinvokeMap) (yypvt[-1].pinvAttr | pmCallConvWinapi); } break; case 299: #line 828 "asmparse.y" -{ yyval.pinvAttr = (CorPinvokeMap) (yypvt[-1].pinvAttr | pmCallConvStdcall); } break; +{ yyval.pinvAttr = (CorPinvokeMap) (yypvt[-1].pinvAttr | pmCallConvCdecl); } break; case 300: #line 829 "asmparse.y" -{ yyval.pinvAttr = (CorPinvokeMap) (yypvt[-1].pinvAttr | pmCallConvThiscall); } break; +{ yyval.pinvAttr = (CorPinvokeMap) (yypvt[-1].pinvAttr | pmCallConvStdcall); } break; case 301: #line 830 "asmparse.y" -{ yyval.pinvAttr = (CorPinvokeMap) (yypvt[-1].pinvAttr | pmCallConvFastcall); } break; +{ yyval.pinvAttr = (CorPinvokeMap) (yypvt[-1].pinvAttr | pmCallConvThiscall); } break; case 302: #line 831 "asmparse.y" -{ yyval.pinvAttr = (CorPinvokeMap) (yypvt[-3].pinvAttr | pmBestFitEnabled); } break; +{ yyval.pinvAttr = (CorPinvokeMap) (yypvt[-1].pinvAttr | pmCallConvFastcall); } break; case 303: #line 832 "asmparse.y" -{ yyval.pinvAttr = (CorPinvokeMap) (yypvt[-3].pinvAttr | pmBestFitDisabled); } break; +{ yyval.pinvAttr = (CorPinvokeMap) (yypvt[-3].pinvAttr | pmBestFitEnabled); } break; case 304: #line 833 "asmparse.y" -{ yyval.pinvAttr = (CorPinvokeMap) (yypvt[-3].pinvAttr | pmThrowOnUnmappableCharEnabled); } break; +{ yyval.pinvAttr = (CorPinvokeMap) (yypvt[-3].pinvAttr | pmBestFitDisabled); } break; case 305: #line 834 "asmparse.y" -{ yyval.pinvAttr = (CorPinvokeMap) (yypvt[-3].pinvAttr | pmThrowOnUnmappableCharDisabled); } break; +{ yyval.pinvAttr = (CorPinvokeMap) (yypvt[-3].pinvAttr | pmThrowOnUnmappableCharEnabled); } break; case 306: #line 835 "asmparse.y" -{ yyval.pinvAttr = (CorPinvokeMap) (yypvt[-1].int32); } break; +{ yyval.pinvAttr = (CorPinvokeMap) (yypvt[-3].pinvAttr | pmThrowOnUnmappableCharDisabled); } break; case 307: -#line 838 "asmparse.y" -{ yyval.string = newString(COR_CTOR_METHOD_NAME); } break; +#line 836 "asmparse.y" +{ yyval.pinvAttr = (CorPinvokeMap) (yypvt[-1].int32); } break; case 308: #line 839 "asmparse.y" -{ yyval.string = newString(COR_CCTOR_METHOD_NAME); } break; +{ yyval.string = newString(COR_CTOR_METHOD_NAME); } break; case 309: #line 840 "asmparse.y" -{ yyval.string = yypvt[-0].string; } break; +{ yyval.string = newString(COR_CCTOR_METHOD_NAME); } break; case 310: -#line 843 "asmparse.y" -{ yyval.int32 = 0; } break; +#line 841 "asmparse.y" +{ yyval.string = yypvt[-0].string; } break; case 311: #line 844 "asmparse.y" -{ yyval.int32 = yypvt[-3].int32 | pdIn; } break; +{ yyval.int32 = 0; } break; case 312: #line 845 "asmparse.y" -{ yyval.int32 = yypvt[-3].int32 | pdOut; } break; +{ yyval.int32 = yypvt[-3].int32 | pdIn; } break; case 313: #line 846 "asmparse.y" -{ yyval.int32 = yypvt[-3].int32 | pdOptional; } break; +{ yyval.int32 = yypvt[-3].int32 | pdOut; } break; case 314: #line 847 "asmparse.y" -{ yyval.int32 = yypvt[-1].int32 + 1; } break; +{ yyval.int32 = yypvt[-3].int32 | pdOptional; } break; case 315: -#line 850 "asmparse.y" -{ yyval.implAttr = (CorMethodImpl) (miIL | miManaged); } break; +#line 848 "asmparse.y" +{ yyval.int32 = yypvt[-1].int32 + 1; } break; case 316: #line 851 "asmparse.y" -{ yyval.implAttr = (CorMethodImpl) ((yypvt[-1].implAttr & 0xFFF4) | miNative); } break; +{ yyval.implAttr = (CorMethodImpl) (miIL | miManaged); } break; case 317: #line 852 "asmparse.y" -{ yyval.implAttr = (CorMethodImpl) ((yypvt[-1].implAttr & 0xFFF4) | miIL); } break; +{ yyval.implAttr = (CorMethodImpl) ((yypvt[-1].implAttr & 0xFFF4) | miNative); } break; case 318: #line 853 "asmparse.y" -{ yyval.implAttr = (CorMethodImpl) ((yypvt[-1].implAttr & 0xFFF4) | miOPTIL); } break; +{ yyval.implAttr = (CorMethodImpl) ((yypvt[-1].implAttr & 0xFFF4) | miIL); } break; case 319: #line 854 "asmparse.y" -{ yyval.implAttr = (CorMethodImpl) ((yypvt[-1].implAttr & 0xFFFB) | miManaged); } break; +{ yyval.implAttr = (CorMethodImpl) ((yypvt[-1].implAttr & 0xFFF4) | miOPTIL); } break; case 320: #line 855 "asmparse.y" -{ yyval.implAttr = (CorMethodImpl) ((yypvt[-1].implAttr & 0xFFFB) | miUnmanaged); } break; +{ yyval.implAttr = (CorMethodImpl) ((yypvt[-1].implAttr & 0xFFFB) | miManaged); } break; case 321: #line 856 "asmparse.y" -{ yyval.implAttr = (CorMethodImpl) (yypvt[-1].implAttr | miForwardRef); } break; +{ yyval.implAttr = (CorMethodImpl) ((yypvt[-1].implAttr & 0xFFFB) | miUnmanaged); } break; case 322: #line 857 "asmparse.y" -{ yyval.implAttr = (CorMethodImpl) (yypvt[-1].implAttr | miPreserveSig); } break; +{ yyval.implAttr = (CorMethodImpl) (yypvt[-1].implAttr | miForwardRef); } break; case 323: #line 858 "asmparse.y" -{ yyval.implAttr = (CorMethodImpl) (yypvt[-1].implAttr | miRuntime); } break; +{ yyval.implAttr = (CorMethodImpl) (yypvt[-1].implAttr | miPreserveSig); } break; case 324: #line 859 "asmparse.y" -{ yyval.implAttr = (CorMethodImpl) (yypvt[-1].implAttr | miInternalCall); } break; +{ yyval.implAttr = (CorMethodImpl) (yypvt[-1].implAttr | miRuntime); } break; case 325: #line 860 "asmparse.y" -{ yyval.implAttr = (CorMethodImpl) (yypvt[-1].implAttr | miSynchronized); } break; +{ yyval.implAttr = (CorMethodImpl) (yypvt[-1].implAttr | miInternalCall); } break; case 326: #line 861 "asmparse.y" -{ yyval.implAttr = (CorMethodImpl) (yypvt[-1].implAttr | miNoInlining); } break; +{ yyval.implAttr = (CorMethodImpl) (yypvt[-1].implAttr | miSynchronized); } break; case 327: #line 862 "asmparse.y" -{ yyval.implAttr = (CorMethodImpl) (yypvt[-1].implAttr | miAggressiveInlining); } break; +{ yyval.implAttr = (CorMethodImpl) (yypvt[-1].implAttr | miNoInlining); } break; case 328: #line 863 "asmparse.y" -{ yyval.implAttr = (CorMethodImpl) (yypvt[-1].implAttr | miNoOptimization); } break; +{ yyval.implAttr = (CorMethodImpl) (yypvt[-1].implAttr | miAggressiveInlining); } break; case 329: #line 864 "asmparse.y" -{ yyval.implAttr = (CorMethodImpl) (yypvt[-1].implAttr | miAggressiveOptimization); } break; +{ yyval.implAttr = (CorMethodImpl) (yypvt[-1].implAttr | miNoOptimization); } break; case 330: #line 865 "asmparse.y" -{ yyval.implAttr = (CorMethodImpl) (yypvt[-1].int32); } break; +{ yyval.implAttr = (CorMethodImpl) (yypvt[-1].implAttr | miAggressiveOptimization); } break; case 331: -#line 868 "asmparse.y" +#line 866 "asmparse.y" +{ yyval.implAttr = (CorMethodImpl) (yypvt[-1].int32); } break; +case 332: +#line 869 "asmparse.y" { PASM->delArgNameList(PASM->m_firstArgName); PASM->m_firstArgName = NULL;PASM->m_lastArgName = NULL; } break; -case 334: -#line 876 "asmparse.y" -{ PASM->EmitByte(yypvt[-0].int32); } break; case 335: #line 877 "asmparse.y" -{ delete PASM->m_SEHD; PASM->m_SEHD = PASM->m_SEHDstack.POP(); } break; +{ PASM->EmitByte(yypvt[-0].int32); } break; case 336: #line 878 "asmparse.y" -{ PASM->EmitMaxStack(yypvt[-0].int32); } break; +{ delete PASM->m_SEHD; PASM->m_SEHD = PASM->m_SEHDstack.POP(); } break; case 337: #line 879 "asmparse.y" +{ PASM->EmitMaxStack(yypvt[-0].int32); } break; +case 338: +#line 880 "asmparse.y" { PASM->EmitLocals(parser->MakeSig(IMAGE_CEE_CS_CALLCONV_LOCAL_SIG, 0, yypvt[-1].binstr)); } break; -case 338: -#line 881 "asmparse.y" +case 339: +#line 882 "asmparse.y" { PASM->EmitZeroInit(); PASM->EmitLocals(parser->MakeSig(IMAGE_CEE_CS_CALLCONV_LOCAL_SIG, 0, yypvt[-1].binstr)); } break; -case 339: -#line 884 "asmparse.y" -{ PASM->EmitEntryPoint(); } break; case 340: #line 885 "asmparse.y" +{ PASM->EmitEntryPoint(); } break; +case 341: +#line 886 "asmparse.y" { PASM->EmitZeroInit(); } break; -case 343: -#line 888 "asmparse.y" +case 344: +#line 889 "asmparse.y" { PASM->AddLabel(PASM->m_CurPC,yypvt[-1].string); /*PASM->EmitLabel($1);*/ } break; -case 349: -#line 894 "asmparse.y" +case 350: +#line 895 "asmparse.y" { if(PASM->m_pCurMethod->m_dwExportOrdinal == 0xFFFFFFFF) { PASM->m_pCurMethod->m_dwExportOrdinal = yypvt[-1].int32; @@ -3139,8 +3141,8 @@ case 349: else PASM->report->warn("Duplicate .export directive, ignored\n"); } break; -case 350: -#line 904 "asmparse.y" +case 351: +#line 905 "asmparse.y" { if(PASM->m_pCurMethod->m_dwExportOrdinal == 0xFFFFFFFF) { PASM->m_pCurMethod->m_dwExportOrdinal = yypvt[-3].int32; @@ -3151,44 +3153,44 @@ case 350: else PASM->report->warn("Duplicate .export directive, ignored\n"); } break; -case 351: -#line 914 "asmparse.y" +case 352: +#line 915 "asmparse.y" { PASM->m_pCurMethod->m_wVTEntry = (WORD)yypvt[-2].int32; PASM->m_pCurMethod->m_wVTSlot = (WORD)yypvt[-0].int32; } break; -case 352: -#line 917 "asmparse.y" -{ PASM->AddMethodImpl(yypvt[-2].token,yypvt[-0].string,NULL,NULL,NULL,NULL); } break; case 353: -#line 920 "asmparse.y" +#line 918 "asmparse.y" +{ PASM->AddMethodImpl(yypvt[-2].token,yypvt[-0].string,NULL,NULL,NULL,NULL); } break; +case 354: +#line 921 "asmparse.y" { PASM->AddMethodImpl(yypvt[-6].token,yypvt[-4].string, (yypvt[-3].int32==0 ? parser->MakeSig(yypvt[-8].int32,yypvt[-7].binstr,yypvt[-1].binstr) : parser->MakeSig(yypvt[-8].int32| IMAGE_CEE_CS_CALLCONV_GENERIC,yypvt[-7].binstr,yypvt[-1].binstr,yypvt[-3].int32)) ,NULL,NULL,NULL); PASM->ResetArgNameList(); } break; -case 355: -#line 927 "asmparse.y" +case 356: +#line 928 "asmparse.y" { if((yypvt[-1].int32 > 0) && (yypvt[-1].int32 <= (int)PASM->m_pCurMethod->m_NumTyPars)) PASM->m_pCustomDescrList = PASM->m_pCurMethod->m_TyPars[yypvt[-1].int32-1].CAList(); else PASM->report->error("Type parameter index out of range\n"); } break; -case 356: -#line 932 "asmparse.y" +case 357: +#line 933 "asmparse.y" { int n = PASM->m_pCurMethod->FindTyPar(yypvt[-0].string); if(n >= 0) PASM->m_pCustomDescrList = PASM->m_pCurMethod->m_TyPars[n].CAList(); else PASM->report->error("Type parameter '%s' undefined\n",yypvt[-0].string); } break; -case 357: -#line 938 "asmparse.y" -{ PASM->m_pCurMethod->AddGenericParamConstraint(yypvt[-3].int32, 0, yypvt[-0].token); } break; case 358: #line 939 "asmparse.y" -{ PASM->m_pCurMethod->AddGenericParamConstraint(0, yypvt[-2].string, yypvt[-0].token); } break; +{ PASM->m_pCurMethod->AddGenericParamConstraint(yypvt[-3].int32, 0, yypvt[-0].token); } break; case 359: -#line 942 "asmparse.y" +#line 940 "asmparse.y" +{ PASM->m_pCurMethod->AddGenericParamConstraint(0, yypvt[-2].string, yypvt[-0].token); } break; +case 360: +#line 943 "asmparse.y" { if( yypvt[-2].int32 ) { ARG_NAME_LIST* pAN=PASM->findArg(PASM->m_pCurMethod->m_firstArgName, yypvt[-2].int32 - 1); if(pAN) @@ -3207,29 +3209,26 @@ case 359: } PASM->m_tkCurrentCVOwner = 0; } break; -case 360: -#line 962 "asmparse.y" -{ PASM->m_pCurMethod->CloseScope(); } break; case 361: -#line 965 "asmparse.y" +#line 963 "asmparse.y" +{ PASM->m_pCurMethod->CloseScope(); } break; +case 362: +#line 966 "asmparse.y" { PASM->m_pCurMethod->OpenScope(); } break; -case 365: -#line 976 "asmparse.y" -{ PASM->m_SEHD->tryTo = PASM->m_CurPC; } break; case 366: #line 977 "asmparse.y" -{ PASM->SetTryLabels(yypvt[-2].string, yypvt[-0].string); } break; +{ PASM->m_SEHD->tryTo = PASM->m_CurPC; } break; case 367: #line 978 "asmparse.y" +{ PASM->SetTryLabels(yypvt[-2].string, yypvt[-0].string); } break; +case 368: +#line 979 "asmparse.y" { if(PASM->m_SEHD) {PASM->m_SEHD->tryFrom = yypvt[-2].int32; PASM->m_SEHD->tryTo = yypvt[-0].int32;} } break; -case 368: -#line 982 "asmparse.y" +case 369: +#line 983 "asmparse.y" { PASM->NewSEHDescriptor(); PASM->m_SEHD->tryFrom = PASM->m_CurPC; } break; -case 369: -#line 987 "asmparse.y" -{ PASM->EmitTry(); } break; case 370: #line 988 "asmparse.y" { PASM->EmitTry(); } break; @@ -3240,106 +3239,109 @@ case 372: #line 990 "asmparse.y" { PASM->EmitTry(); } break; case 373: -#line 994 "asmparse.y" -{ PASM->m_SEHD->sehHandler = PASM->m_CurPC; } break; +#line 991 "asmparse.y" +{ PASM->EmitTry(); } break; case 374: #line 995 "asmparse.y" +{ PASM->m_SEHD->sehHandler = PASM->m_CurPC; } break; +case 375: +#line 996 "asmparse.y" { PASM->SetFilterLabel(yypvt[-0].string); PASM->m_SEHD->sehHandler = PASM->m_CurPC; } break; -case 375: -#line 997 "asmparse.y" +case 376: +#line 998 "asmparse.y" { PASM->m_SEHD->sehFilter = yypvt[-0].int32; PASM->m_SEHD->sehHandler = PASM->m_CurPC; } break; -case 376: -#line 1001 "asmparse.y" +case 377: +#line 1002 "asmparse.y" { PASM->m_SEHD->sehClause = COR_ILEXCEPTION_CLAUSE_FILTER; PASM->m_SEHD->sehFilter = PASM->m_CurPC; } break; -case 377: -#line 1005 "asmparse.y" +case 378: +#line 1006 "asmparse.y" { PASM->m_SEHD->sehClause = COR_ILEXCEPTION_CLAUSE_NONE; PASM->SetCatchClass(yypvt[-0].token); PASM->m_SEHD->sehHandler = PASM->m_CurPC; } break; -case 378: -#line 1010 "asmparse.y" +case 379: +#line 1011 "asmparse.y" { PASM->m_SEHD->sehClause = COR_ILEXCEPTION_CLAUSE_FINALLY; PASM->m_SEHD->sehHandler = PASM->m_CurPC; } break; -case 379: -#line 1014 "asmparse.y" +case 380: +#line 1015 "asmparse.y" { PASM->m_SEHD->sehClause = COR_ILEXCEPTION_CLAUSE_FAULT; PASM->m_SEHD->sehHandler = PASM->m_CurPC; } break; -case 380: -#line 1018 "asmparse.y" -{ PASM->m_SEHD->sehHandlerTo = PASM->m_CurPC; } break; case 381: #line 1019 "asmparse.y" -{ PASM->SetHandlerLabels(yypvt[-2].string, yypvt[-0].string); } break; +{ PASM->m_SEHD->sehHandlerTo = PASM->m_CurPC; } break; case 382: #line 1020 "asmparse.y" +{ PASM->SetHandlerLabels(yypvt[-2].string, yypvt[-0].string); } break; +case 383: +#line 1021 "asmparse.y" { PASM->m_SEHD->sehHandler = yypvt[-2].int32; PASM->m_SEHD->sehHandlerTo = yypvt[-0].int32; } break; -case 384: -#line 1028 "asmparse.y" +case 385: +#line 1029 "asmparse.y" { PASM->EmitDataLabel(yypvt[-1].string); } break; -case 386: -#line 1032 "asmparse.y" -{ PASM->SetDataSection(); } break; case 387: #line 1033 "asmparse.y" -{ PASM->SetTLSSection(); } break; +{ PASM->SetDataSection(); } break; case 388: #line 1034 "asmparse.y" +{ PASM->SetTLSSection(); } break; +case 389: +#line 1035 "asmparse.y" { PASM->SetILSection(); } break; -case 393: -#line 1045 "asmparse.y" -{ yyval.int32 = 1; } break; case 394: #line 1046 "asmparse.y" +{ yyval.int32 = 1; } break; +case 395: +#line 1047 "asmparse.y" { yyval.int32 = yypvt[-1].int32; if(yypvt[-1].int32 <= 0) { PASM->report->error("Illegal item count: %d\n",yypvt[-1].int32); if(!PASM->OnErrGo) yyval.int32 = 1; }} break; -case 395: -#line 1051 "asmparse.y" -{ PASM->EmitDataString(yypvt[-1].binstr); } break; case 396: #line 1052 "asmparse.y" -{ PASM->EmitDD(yypvt[-1].string); } break; +{ PASM->EmitDataString(yypvt[-1].binstr); } break; case 397: #line 1053 "asmparse.y" -{ PASM->EmitData(yypvt[-1].binstr->ptr(),yypvt[-1].binstr->length()); } break; +{ PASM->EmitDD(yypvt[-1].string); } break; case 398: -#line 1055 "asmparse.y" -{ float f = (float) (*yypvt[-2].float64); float* p = new (nothrow) float[yypvt[-0].int32]; +#line 1054 "asmparse.y" +{ PASM->EmitData(yypvt[-1].binstr->ptr(),yypvt[-1].binstr->length()); } break; +case 399: +#line 1056 "asmparse.y" +{ float f = (float) (*yypvt[-2].float64); float* p = new (nothrow) float[yypvt[-0].int32]; if(p != NULL) { for(int i=0; i < yypvt[-0].int32; i++) p[i] = f; PASM->EmitData(p, sizeof(float)*yypvt[-0].int32); delete yypvt[-2].float64; delete [] p; } else PASM->report->error("Out of memory emitting data block %d bytes\n", sizeof(float)*yypvt[-0].int32); } break; -case 399: -#line 1062 "asmparse.y" +case 400: +#line 1063 "asmparse.y" { double* p = new (nothrow) double[yypvt[-0].int32]; if(p != NULL) { for(int i=0; iEmitData(p, sizeof(double)*yypvt[-0].int32); delete yypvt[-2].float64; delete [] p; } else PASM->report->error("Out of memory emitting data block %d bytes\n", sizeof(double)*yypvt[-0].int32); } break; -case 400: -#line 1069 "asmparse.y" +case 401: +#line 1070 "asmparse.y" { __int64* p = new (nothrow) __int64[yypvt[-0].int32]; if(p != NULL) { for(int i=0; iEmitData(p, sizeof(__int64)*yypvt[-0].int32); delete yypvt[-2].int64; delete [] p; } else PASM->report->error("Out of memory emitting data block %d bytes\n", sizeof(__int64)*yypvt[-0].int32); } break; -case 401: -#line 1076 "asmparse.y" +case 402: +#line 1077 "asmparse.y" { __int32* p = new (nothrow) __int32[yypvt[-0].int32]; if(p != NULL) { for(int i=0; iEmitData(p, sizeof(__int32)*yypvt[-0].int32); delete [] p; } else PASM->report->error("Out of memory emitting data block %d bytes\n", sizeof(__int32)*yypvt[-0].int32); } break; -case 402: -#line 1083 "asmparse.y" +case 403: +#line 1084 "asmparse.y" { __int16 i = (__int16) yypvt[-2].int32; FAIL_UNLESS(i == yypvt[-2].int32, ("Value %d too big\n", yypvt[-2].int32)); __int16* p = new (nothrow) __int16[yypvt[-0].int32]; if(p != NULL) { @@ -3347,8 +3349,8 @@ case 402: PASM->EmitData(p, sizeof(__int16)*yypvt[-0].int32); delete [] p; } else PASM->report->error("Out of memory emitting data block %d bytes\n", sizeof(__int16)*yypvt[-0].int32); } break; -case 403: -#line 1091 "asmparse.y" +case 404: +#line 1092 "asmparse.y" { __int8 i = (__int8) yypvt[-2].int32; FAIL_UNLESS(i == yypvt[-2].int32, ("Value %d too big\n", yypvt[-2].int32)); __int8* p = new (nothrow) __int8[yypvt[-0].int32]; if(p != NULL) { @@ -3356,405 +3358,405 @@ case 403: PASM->EmitData(p, sizeof(__int8)*yypvt[-0].int32); delete [] p; } else PASM->report->error("Out of memory emitting data block %d bytes\n", sizeof(__int8)*yypvt[-0].int32); } break; -case 404: -#line 1098 "asmparse.y" -{ PASM->EmitData(NULL, sizeof(float)*yypvt[-0].int32); } break; case 405: #line 1099 "asmparse.y" -{ PASM->EmitData(NULL, sizeof(double)*yypvt[-0].int32); } break; +{ PASM->EmitData(NULL, sizeof(float)*yypvt[-0].int32); } break; case 406: #line 1100 "asmparse.y" -{ PASM->EmitData(NULL, sizeof(__int64)*yypvt[-0].int32); } break; +{ PASM->EmitData(NULL, sizeof(double)*yypvt[-0].int32); } break; case 407: #line 1101 "asmparse.y" -{ PASM->EmitData(NULL, sizeof(__int32)*yypvt[-0].int32); } break; +{ PASM->EmitData(NULL, sizeof(__int64)*yypvt[-0].int32); } break; case 408: #line 1102 "asmparse.y" -{ PASM->EmitData(NULL, sizeof(__int16)*yypvt[-0].int32); } break; +{ PASM->EmitData(NULL, sizeof(__int32)*yypvt[-0].int32); } break; case 409: #line 1103 "asmparse.y" -{ PASM->EmitData(NULL, sizeof(__int8)*yypvt[-0].int32); } break; +{ PASM->EmitData(NULL, sizeof(__int16)*yypvt[-0].int32); } break; case 410: -#line 1107 "asmparse.y" +#line 1104 "asmparse.y" +{ PASM->EmitData(NULL, sizeof(__int8)*yypvt[-0].int32); } break; +case 411: +#line 1108 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_R4); float f = (float)(*yypvt[-1].float64); yyval.binstr->appendInt32(*((__int32*)&f)); delete yypvt[-1].float64; } break; -case 411: -#line 1110 "asmparse.y" +case 412: +#line 1111 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_R8); yyval.binstr->appendInt64((__int64 *)yypvt[-1].float64); delete yypvt[-1].float64; } break; -case 412: -#line 1112 "asmparse.y" +case 413: +#line 1113 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_R4); yyval.binstr->appendInt32(yypvt[-1].int32); } break; -case 413: -#line 1114 "asmparse.y" +case 414: +#line 1115 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_R8); yyval.binstr->appendInt64((__int64 *)yypvt[-1].int64); delete yypvt[-1].int64; } break; -case 414: -#line 1116 "asmparse.y" +case 415: +#line 1117 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_I8); yyval.binstr->appendInt64((__int64 *)yypvt[-1].int64); delete yypvt[-1].int64; } break; -case 415: -#line 1118 "asmparse.y" +case 416: +#line 1119 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_I4); yyval.binstr->appendInt32(yypvt[-1].int32); } break; -case 416: -#line 1120 "asmparse.y" +case 417: +#line 1121 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_I2); yyval.binstr->appendInt16(yypvt[-1].int32); } break; -case 417: -#line 1122 "asmparse.y" +case 418: +#line 1123 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_I1); yyval.binstr->appendInt8(yypvt[-1].int32); } break; -case 418: -#line 1124 "asmparse.y" +case 419: +#line 1125 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_U8); yyval.binstr->appendInt64((__int64 *)yypvt[-1].int64); delete yypvt[-1].int64; } break; -case 419: -#line 1126 "asmparse.y" +case 420: +#line 1127 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_U4); yyval.binstr->appendInt32(yypvt[-1].int32); } break; -case 420: -#line 1128 "asmparse.y" +case 421: +#line 1129 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_U2); yyval.binstr->appendInt16(yypvt[-1].int32); } break; -case 421: -#line 1130 "asmparse.y" +case 422: +#line 1131 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_U1); yyval.binstr->appendInt8(yypvt[-1].int32); } break; -case 422: -#line 1132 "asmparse.y" +case 423: +#line 1133 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_U8); yyval.binstr->appendInt64((__int64 *)yypvt[-1].int64); delete yypvt[-1].int64; } break; -case 423: -#line 1134 "asmparse.y" +case 424: +#line 1135 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_U4); yyval.binstr->appendInt32(yypvt[-1].int32); } break; -case 424: -#line 1136 "asmparse.y" +case 425: +#line 1137 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_U2); yyval.binstr->appendInt16(yypvt[-1].int32); } break; -case 425: -#line 1138 "asmparse.y" +case 426: +#line 1139 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_U1); yyval.binstr->appendInt8(yypvt[-1].int32); } break; -case 426: -#line 1140 "asmparse.y" +case 427: +#line 1141 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_CHAR); yyval.binstr->appendInt16(yypvt[-1].int32); } break; -case 427: -#line 1142 "asmparse.y" +case 428: +#line 1143 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_BOOLEAN); yyval.binstr->appendInt8(yypvt[-1].int32);} break; -case 428: -#line 1144 "asmparse.y" +case 429: +#line 1145 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_STRING); yyval.binstr->append(yypvt[-1].binstr); delete yypvt[-1].binstr;} break; -case 429: -#line 1148 "asmparse.y" -{ bParsingByteArray = TRUE; } break; case 430: -#line 1151 "asmparse.y" -{ yyval.binstr = new BinStr(); } break; +#line 1149 "asmparse.y" +{ bParsingByteArray = TRUE; } break; case 431: #line 1152 "asmparse.y" -{ yyval.binstr = yypvt[-0].binstr; } break; +{ yyval.binstr = new BinStr(); } break; case 432: -#line 1155 "asmparse.y" -{ __int8 i = (__int8) yypvt[-0].int32; yyval.binstr = new BinStr(); yyval.binstr->appendInt8(i); } break; +#line 1153 "asmparse.y" +{ yyval.binstr = yypvt[-0].binstr; } break; case 433: #line 1156 "asmparse.y" -{ __int8 i = (__int8) yypvt[-0].int32; yyval.binstr = yypvt[-1].binstr; yyval.binstr->appendInt8(i); } break; +{ __int8 i = (__int8) yypvt[-0].int32; yyval.binstr = new BinStr(); yyval.binstr->appendInt8(i); } break; case 434: -#line 1160 "asmparse.y" -{ yyval.binstr = yypvt[-0].binstr; } break; +#line 1157 "asmparse.y" +{ __int8 i = (__int8) yypvt[-0].int32; yyval.binstr = yypvt[-1].binstr; yyval.binstr->appendInt8(i); } break; case 435: #line 1161 "asmparse.y" -{ yyval.binstr = BinStrToUnicode(yypvt[-0].binstr,true); yyval.binstr->insertInt8(ELEMENT_TYPE_STRING);} break; +{ yyval.binstr = yypvt[-0].binstr; } break; case 436: #line 1162 "asmparse.y" +{ yyval.binstr = BinStrToUnicode(yypvt[-0].binstr,true); yyval.binstr->insertInt8(ELEMENT_TYPE_STRING);} break; +case 437: +#line 1163 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_CLASS); yyval.binstr->appendInt32(0); } break; -case 437: -#line 1167 "asmparse.y" -{ yyval.binstr = yypvt[-0].binstr; } break; case 438: #line 1168 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_STRING); yyval.binstr->appendInt8(0xFF); } break; +{ yyval.binstr = yypvt[-0].binstr; } break; case 439: #line 1169 "asmparse.y" +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_STRING); yyval.binstr->appendInt8(0xFF); } break; +case 440: +#line 1170 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_STRING); AppendStringWithLength(yyval.binstr,yypvt[-1].string); delete [] yypvt[-1].string;} break; -case 440: -#line 1171 "asmparse.y" +case 441: +#line 1172 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(SERIALIZATION_TYPE_TYPE); AppendStringWithLength(yyval.binstr,yypvt[-1].string); delete [] yypvt[-1].string;} break; -case 441: -#line 1173 "asmparse.y" +case 442: +#line 1174 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(SERIALIZATION_TYPE_TYPE); AppendStringWithLength(yyval.binstr,PASM->ReflectionNotation(yypvt[-1].token));} break; -case 442: -#line 1175 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(SERIALIZATION_TYPE_TYPE); yyval.binstr->appendInt8(0xFF); } break; case 443: #line 1176 "asmparse.y" -{ yyval.binstr = yypvt[-1].binstr; yyval.binstr->insertInt8(SERIALIZATION_TYPE_TAGGED_OBJECT);} break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(SERIALIZATION_TYPE_TYPE); yyval.binstr->appendInt8(0xFF); } break; case 444: -#line 1178 "asmparse.y" +#line 1177 "asmparse.y" +{ yyval.binstr = yypvt[-1].binstr; yyval.binstr->insertInt8(SERIALIZATION_TYPE_TAGGED_OBJECT);} break; +case 445: +#line 1179 "asmparse.y" { yyval.binstr = yypvt[-1].binstr; yyval.binstr->insertInt32(yypvt[-4].int32); yyval.binstr->insertInt8(ELEMENT_TYPE_R4); yyval.binstr->insertInt8(ELEMENT_TYPE_SZARRAY); } break; -case 445: -#line 1182 "asmparse.y" +case 446: +#line 1183 "asmparse.y" { yyval.binstr = yypvt[-1].binstr; yyval.binstr->insertInt32(yypvt[-4].int32); yyval.binstr->insertInt8(ELEMENT_TYPE_R8); yyval.binstr->insertInt8(ELEMENT_TYPE_SZARRAY); } break; -case 446: -#line 1186 "asmparse.y" +case 447: +#line 1187 "asmparse.y" { yyval.binstr = yypvt[-1].binstr; yyval.binstr->insertInt32(yypvt[-4].int32); yyval.binstr->insertInt8(ELEMENT_TYPE_I8); yyval.binstr->insertInt8(ELEMENT_TYPE_SZARRAY); } break; -case 447: -#line 1190 "asmparse.y" +case 448: +#line 1191 "asmparse.y" { yyval.binstr = yypvt[-1].binstr; yyval.binstr->insertInt32(yypvt[-4].int32); yyval.binstr->insertInt8(ELEMENT_TYPE_I4); yyval.binstr->insertInt8(ELEMENT_TYPE_SZARRAY); } break; -case 448: -#line 1194 "asmparse.y" +case 449: +#line 1195 "asmparse.y" { yyval.binstr = yypvt[-1].binstr; yyval.binstr->insertInt32(yypvt[-4].int32); yyval.binstr->insertInt8(ELEMENT_TYPE_I2); yyval.binstr->insertInt8(ELEMENT_TYPE_SZARRAY); } break; -case 449: -#line 1198 "asmparse.y" +case 450: +#line 1199 "asmparse.y" { yyval.binstr = yypvt[-1].binstr; yyval.binstr->insertInt32(yypvt[-4].int32); yyval.binstr->insertInt8(ELEMENT_TYPE_I1); yyval.binstr->insertInt8(ELEMENT_TYPE_SZARRAY); } break; -case 450: -#line 1202 "asmparse.y" +case 451: +#line 1203 "asmparse.y" { yyval.binstr = yypvt[-1].binstr; yyval.binstr->insertInt32(yypvt[-4].int32); yyval.binstr->insertInt8(ELEMENT_TYPE_U8); yyval.binstr->insertInt8(ELEMENT_TYPE_SZARRAY); } break; -case 451: -#line 1206 "asmparse.y" +case 452: +#line 1207 "asmparse.y" { yyval.binstr = yypvt[-1].binstr; yyval.binstr->insertInt32(yypvt[-4].int32); yyval.binstr->insertInt8(ELEMENT_TYPE_U4); yyval.binstr->insertInt8(ELEMENT_TYPE_SZARRAY); } break; -case 452: -#line 1210 "asmparse.y" +case 453: +#line 1211 "asmparse.y" { yyval.binstr = yypvt[-1].binstr; yyval.binstr->insertInt32(yypvt[-4].int32); yyval.binstr->insertInt8(ELEMENT_TYPE_U2); yyval.binstr->insertInt8(ELEMENT_TYPE_SZARRAY); } break; -case 453: -#line 1214 "asmparse.y" +case 454: +#line 1215 "asmparse.y" { yyval.binstr = yypvt[-1].binstr; yyval.binstr->insertInt32(yypvt[-4].int32); yyval.binstr->insertInt8(ELEMENT_TYPE_U1); yyval.binstr->insertInt8(ELEMENT_TYPE_SZARRAY); } break; -case 454: -#line 1218 "asmparse.y" +case 455: +#line 1219 "asmparse.y" { yyval.binstr = yypvt[-1].binstr; yyval.binstr->insertInt32(yypvt[-4].int32); yyval.binstr->insertInt8(ELEMENT_TYPE_U8); yyval.binstr->insertInt8(ELEMENT_TYPE_SZARRAY); } break; -case 455: -#line 1222 "asmparse.y" +case 456: +#line 1223 "asmparse.y" { yyval.binstr = yypvt[-1].binstr; yyval.binstr->insertInt32(yypvt[-4].int32); yyval.binstr->insertInt8(ELEMENT_TYPE_U4); yyval.binstr->insertInt8(ELEMENT_TYPE_SZARRAY); } break; -case 456: -#line 1226 "asmparse.y" +case 457: +#line 1227 "asmparse.y" { yyval.binstr = yypvt[-1].binstr; yyval.binstr->insertInt32(yypvt[-4].int32); yyval.binstr->insertInt8(ELEMENT_TYPE_U2); yyval.binstr->insertInt8(ELEMENT_TYPE_SZARRAY); } break; -case 457: -#line 1230 "asmparse.y" +case 458: +#line 1231 "asmparse.y" { yyval.binstr = yypvt[-1].binstr; yyval.binstr->insertInt32(yypvt[-4].int32); yyval.binstr->insertInt8(ELEMENT_TYPE_U1); yyval.binstr->insertInt8(ELEMENT_TYPE_SZARRAY); } break; -case 458: -#line 1234 "asmparse.y" +case 459: +#line 1235 "asmparse.y" { yyval.binstr = yypvt[-1].binstr; yyval.binstr->insertInt32(yypvt[-4].int32); yyval.binstr->insertInt8(ELEMENT_TYPE_CHAR); yyval.binstr->insertInt8(ELEMENT_TYPE_SZARRAY); } break; -case 459: -#line 1238 "asmparse.y" +case 460: +#line 1239 "asmparse.y" { yyval.binstr = yypvt[-1].binstr; yyval.binstr->insertInt32(yypvt[-4].int32); yyval.binstr->insertInt8(ELEMENT_TYPE_BOOLEAN); yyval.binstr->insertInt8(ELEMENT_TYPE_SZARRAY); } break; -case 460: -#line 1242 "asmparse.y" +case 461: +#line 1243 "asmparse.y" { yyval.binstr = yypvt[-1].binstr; yyval.binstr->insertInt32(yypvt[-4].int32); yyval.binstr->insertInt8(ELEMENT_TYPE_STRING); yyval.binstr->insertInt8(ELEMENT_TYPE_SZARRAY); } break; -case 461: -#line 1246 "asmparse.y" +case 462: +#line 1247 "asmparse.y" { yyval.binstr = yypvt[-1].binstr; yyval.binstr->insertInt32(yypvt[-4].int32); yyval.binstr->insertInt8(SERIALIZATION_TYPE_TYPE); yyval.binstr->insertInt8(ELEMENT_TYPE_SZARRAY); } break; -case 462: -#line 1250 "asmparse.y" +case 463: +#line 1251 "asmparse.y" { yyval.binstr = yypvt[-1].binstr; yyval.binstr->insertInt32(yypvt[-4].int32); yyval.binstr->insertInt8(SERIALIZATION_TYPE_TAGGED_OBJECT); yyval.binstr->insertInt8(ELEMENT_TYPE_SZARRAY); } break; -case 463: -#line 1256 "asmparse.y" -{ yyval.binstr = new BinStr(); } break; case 464: #line 1257 "asmparse.y" +{ yyval.binstr = new BinStr(); } break; +case 465: +#line 1258 "asmparse.y" { yyval.binstr = yypvt[-1].binstr; float f = (float) (*yypvt[-0].float64); yyval.binstr->appendInt32(*((__int32*)&f)); delete yypvt[-0].float64; } break; -case 465: -#line 1259 "asmparse.y" +case 466: +#line 1260 "asmparse.y" { yyval.binstr = yypvt[-1].binstr; yyval.binstr->appendInt32(yypvt[-0].int32); } break; -case 466: -#line 1263 "asmparse.y" -{ yyval.binstr = new BinStr(); } break; case 467: #line 1264 "asmparse.y" +{ yyval.binstr = new BinStr(); } break; +case 468: +#line 1265 "asmparse.y" { yyval.binstr = yypvt[-1].binstr; yyval.binstr->appendInt64((__int64 *)yypvt[-0].float64); delete yypvt[-0].float64; } break; -case 468: -#line 1266 "asmparse.y" +case 469: +#line 1267 "asmparse.y" { yyval.binstr = yypvt[-1].binstr; yyval.binstr->appendInt64((__int64 *)yypvt[-0].int64); delete yypvt[-0].int64; } break; -case 469: -#line 1270 "asmparse.y" -{ yyval.binstr = new BinStr(); } break; case 470: #line 1271 "asmparse.y" +{ yyval.binstr = new BinStr(); } break; +case 471: +#line 1272 "asmparse.y" { yyval.binstr = yypvt[-1].binstr; yyval.binstr->appendInt64((__int64 *)yypvt[-0].int64); delete yypvt[-0].int64; } break; -case 471: -#line 1275 "asmparse.y" -{ yyval.binstr = new BinStr(); } break; case 472: #line 1276 "asmparse.y" -{ yyval.binstr = yypvt[-1].binstr; yyval.binstr->appendInt32(yypvt[-0].int32);} break; -case 473: -#line 1279 "asmparse.y" { yyval.binstr = new BinStr(); } break; +case 473: +#line 1277 "asmparse.y" +{ yyval.binstr = yypvt[-1].binstr; yyval.binstr->appendInt32(yypvt[-0].int32);} break; case 474: #line 1280 "asmparse.y" -{ yyval.binstr = yypvt[-1].binstr; yyval.binstr->appendInt16(yypvt[-0].int32);} break; -case 475: -#line 1283 "asmparse.y" { yyval.binstr = new BinStr(); } break; +case 475: +#line 1281 "asmparse.y" +{ yyval.binstr = yypvt[-1].binstr; yyval.binstr->appendInt16(yypvt[-0].int32);} break; case 476: #line 1284 "asmparse.y" -{ yyval.binstr = yypvt[-1].binstr; yyval.binstr->appendInt8(yypvt[-0].int32); } break; -case 477: -#line 1287 "asmparse.y" { yyval.binstr = new BinStr(); } break; +case 477: +#line 1285 "asmparse.y" +{ yyval.binstr = yypvt[-1].binstr; yyval.binstr->appendInt8(yypvt[-0].int32); } break; case 478: #line 1288 "asmparse.y" +{ yyval.binstr = new BinStr(); } break; +case 479: +#line 1289 "asmparse.y" { yyval.binstr = yypvt[-1].binstr; yyval.binstr->appendInt8(yypvt[-0].int32);} break; -case 479: -#line 1292 "asmparse.y" -{ yyval.binstr = new BinStr(); } break; case 480: #line 1293 "asmparse.y" -{ yyval.binstr = yypvt[-1].binstr; yyval.binstr->appendInt8(0xFF); } break; +{ yyval.binstr = new BinStr(); } break; case 481: #line 1294 "asmparse.y" +{ yyval.binstr = yypvt[-1].binstr; yyval.binstr->appendInt8(0xFF); } break; +case 482: +#line 1295 "asmparse.y" { yyval.binstr = yypvt[-1].binstr; AppendStringWithLength(yyval.binstr,yypvt[-0].string); delete [] yypvt[-0].string;} break; -case 482: -#line 1298 "asmparse.y" -{ yyval.binstr = new BinStr(); } break; case 483: #line 1299 "asmparse.y" -{ yyval.binstr = yypvt[-1].binstr; yyval.binstr->appendInt8(0xFF); } break; +{ yyval.binstr = new BinStr(); } break; case 484: #line 1300 "asmparse.y" +{ yyval.binstr = yypvt[-1].binstr; yyval.binstr->appendInt8(0xFF); } break; +case 485: +#line 1301 "asmparse.y" { yyval.binstr = yypvt[-2].binstr; AppendStringWithLength(yyval.binstr,yypvt[-0].string); delete [] yypvt[-0].string;} break; -case 485: -#line 1302 "asmparse.y" +case 486: +#line 1303 "asmparse.y" { yyval.binstr = yypvt[-1].binstr; AppendStringWithLength(yyval.binstr,PASM->ReflectionNotation(yypvt[-0].token));} break; -case 486: -#line 1306 "asmparse.y" -{ yyval.binstr = new BinStr(); } break; case 487: #line 1307 "asmparse.y" -{ yyval.binstr = yypvt[-1].binstr; yyval.binstr->append(yypvt[-0].binstr); delete yypvt[-0].binstr; } break; +{ yyval.binstr = new BinStr(); } break; case 488: -#line 1311 "asmparse.y" +#line 1308 "asmparse.y" +{ yyval.binstr = yypvt[-1].binstr; yyval.binstr->append(yypvt[-0].binstr); delete yypvt[-0].binstr; } break; +case 489: +#line 1312 "asmparse.y" { parser->m_ANSFirst.PUSH(PASM->m_firstArgName); parser->m_ANSLast.PUSH(PASM->m_lastArgName); PASM->m_firstArgName = NULL; PASM->m_lastArgName = NULL; } break; -case 489: -#line 1317 "asmparse.y" -{ yyval.instr = SetupInstr(yypvt[-0].opcode); } break; case 490: -#line 1320 "asmparse.y" +#line 1318 "asmparse.y" { yyval.instr = SetupInstr(yypvt[-0].opcode); } break; case 491: -#line 1323 "asmparse.y" +#line 1321 "asmparse.y" { yyval.instr = SetupInstr(yypvt[-0].opcode); } break; case 492: -#line 1326 "asmparse.y" +#line 1324 "asmparse.y" { yyval.instr = SetupInstr(yypvt[-0].opcode); } break; case 493: -#line 1329 "asmparse.y" +#line 1327 "asmparse.y" { yyval.instr = SetupInstr(yypvt[-0].opcode); } break; case 494: -#line 1332 "asmparse.y" +#line 1330 "asmparse.y" { yyval.instr = SetupInstr(yypvt[-0].opcode); } break; case 495: -#line 1335 "asmparse.y" +#line 1333 "asmparse.y" +{ yyval.instr = SetupInstr(yypvt[-0].opcode); } break; +case 496: +#line 1336 "asmparse.y" { yyval.instr = SetupInstr(yypvt[-0].opcode); if((!PASM->OnErrGo)&& ((yypvt[-0].opcode == CEE_NEWOBJ)|| (yypvt[-0].opcode == CEE_CALLVIRT))) iCallConv = IMAGE_CEE_CS_CALLCONV_HASTHIS; } break; -case 496: -#line 1343 "asmparse.y" -{ yyval.instr = SetupInstr(yypvt[-0].opcode); } break; case 497: -#line 1346 "asmparse.y" +#line 1344 "asmparse.y" { yyval.instr = SetupInstr(yypvt[-0].opcode); } break; case 498: -#line 1349 "asmparse.y" +#line 1347 "asmparse.y" { yyval.instr = SetupInstr(yypvt[-0].opcode); } break; case 499: -#line 1352 "asmparse.y" +#line 1350 "asmparse.y" { yyval.instr = SetupInstr(yypvt[-0].opcode); } break; case 500: -#line 1355 "asmparse.y" -{ yyval.instr = SetupInstr(yypvt[-0].opcode); iOpcodeLen = PASM->OpcodeLen(yyval.instr); } break; -case 501: -#line 1358 "asmparse.y" +#line 1353 "asmparse.y" { yyval.instr = SetupInstr(yypvt[-0].opcode); } break; +case 501: +#line 1356 "asmparse.y" +{ yyval.instr = SetupInstr(yypvt[-0].opcode); iOpcodeLen = PASM->OpcodeLen(yyval.instr); } break; case 502: -#line 1361 "asmparse.y" -{ yyval.instr = yypvt[-1].instr; bParsingByteArray = TRUE; } break; +#line 1359 "asmparse.y" +{ yyval.instr = SetupInstr(yypvt[-0].opcode); } break; case 503: -#line 1365 "asmparse.y" -{ PASM->EmitOpcode(yypvt[-0].instr); } break; +#line 1362 "asmparse.y" +{ yyval.instr = yypvt[-1].instr; bParsingByteArray = TRUE; } break; case 504: #line 1366 "asmparse.y" -{ PASM->EmitInstrVar(yypvt[-1].instr, yypvt[-0].int32); } break; +{ PASM->EmitOpcode(yypvt[-0].instr); } break; case 505: #line 1367 "asmparse.y" -{ PASM->EmitInstrVarByName(yypvt[-1].instr, yypvt[-0].string); } break; +{ PASM->EmitInstrVar(yypvt[-1].instr, yypvt[-0].int32); } break; case 506: #line 1368 "asmparse.y" -{ PASM->EmitInstrI(yypvt[-1].instr, yypvt[-0].int32); } break; +{ PASM->EmitInstrVarByName(yypvt[-1].instr, yypvt[-0].string); } break; case 507: #line 1369 "asmparse.y" -{ PASM->EmitInstrI8(yypvt[-1].instr, yypvt[-0].int64); } break; +{ PASM->EmitInstrI(yypvt[-1].instr, yypvt[-0].int32); } break; case 508: #line 1370 "asmparse.y" -{ PASM->EmitInstrR(yypvt[-1].instr, yypvt[-0].float64); delete (yypvt[-0].float64);} break; +{ PASM->EmitInstrI8(yypvt[-1].instr, yypvt[-0].int64); } break; case 509: #line 1371 "asmparse.y" -{ double f = (double) (*yypvt[-0].int64); PASM->EmitInstrR(yypvt[-1].instr, &f); } break; +{ PASM->EmitInstrR(yypvt[-1].instr, yypvt[-0].float64); delete (yypvt[-0].float64);} break; case 510: #line 1372 "asmparse.y" +{ double f = (double) (*yypvt[-0].int64); PASM->EmitInstrR(yypvt[-1].instr, &f); } break; +case 511: +#line 1373 "asmparse.y" { unsigned L = yypvt[-1].binstr->length(); FAIL_UNLESS(L >= sizeof(float), ("%d hexbytes, must be at least %d\n", L,sizeof(float))); @@ -3764,22 +3766,22 @@ case 510: : (double)(*(float *)(yypvt[-1].binstr->ptr())); PASM->EmitInstrR(yypvt[-2].instr,&f); } delete yypvt[-1].binstr; } break; -case 511: -#line 1381 "asmparse.y" -{ PASM->EmitInstrBrOffset(yypvt[-1].instr, yypvt[-0].int32); } break; case 512: #line 1382 "asmparse.y" -{ PASM->EmitInstrBrTarget(yypvt[-1].instr, yypvt[-0].string); } break; +{ PASM->EmitInstrBrOffset(yypvt[-1].instr, yypvt[-0].int32); } break; case 513: -#line 1384 "asmparse.y" +#line 1383 "asmparse.y" +{ PASM->EmitInstrBrTarget(yypvt[-1].instr, yypvt[-0].string); } break; +case 514: +#line 1385 "asmparse.y" { PASM->SetMemberRefFixup(yypvt[-0].token,PASM->OpcodeLen(yypvt[-1].instr)); PASM->EmitInstrI(yypvt[-1].instr,yypvt[-0].token); PASM->m_tkCurrentCVOwner = yypvt[-0].token; PASM->m_pCustomDescrList = NULL; iCallConv = 0; } break; -case 514: -#line 1391 "asmparse.y" +case 515: +#line 1392 "asmparse.y" { yypvt[-3].binstr->insertInt8(IMAGE_CEE_CS_CALLCONV_FIELD); mdToken mr = PASM->MakeMemberRef(yypvt[-2].token, yypvt[-0].string, yypvt[-3].binstr); PASM->SetMemberRefFixup(mr, PASM->OpcodeLen(yypvt[-4].instr)); @@ -3787,8 +3789,8 @@ case 514: PASM->m_tkCurrentCVOwner = mr; PASM->m_pCustomDescrList = NULL; } break; -case 515: -#line 1399 "asmparse.y" +case 516: +#line 1400 "asmparse.y" { yypvt[-1].binstr->insertInt8(IMAGE_CEE_CS_CALLCONV_FIELD); mdToken mr = PASM->MakeMemberRef(mdTokenNil, yypvt[-0].string, yypvt[-1].binstr); PASM->SetMemberRefFixup(mr, PASM->OpcodeLen(yypvt[-2].instr)); @@ -3796,578 +3798,578 @@ case 515: PASM->m_tkCurrentCVOwner = mr; PASM->m_pCustomDescrList = NULL; } break; -case 516: -#line 1406 "asmparse.y" +case 517: +#line 1407 "asmparse.y" { mdToken mr = yypvt[-0].token; PASM->SetMemberRefFixup(mr, PASM->OpcodeLen(yypvt[-1].instr)); PASM->EmitInstrI(yypvt[-1].instr,mr); PASM->m_tkCurrentCVOwner = mr; PASM->m_pCustomDescrList = NULL; } break; -case 517: -#line 1412 "asmparse.y" +case 518: +#line 1413 "asmparse.y" { mdToken mr = yypvt[-0].tdd->m_tkTypeSpec; PASM->SetMemberRefFixup(mr, PASM->OpcodeLen(yypvt[-1].instr)); PASM->EmitInstrI(yypvt[-1].instr,mr); PASM->m_tkCurrentCVOwner = mr; PASM->m_pCustomDescrList = NULL; } break; -case 518: -#line 1418 "asmparse.y" +case 519: +#line 1419 "asmparse.y" { mdToken mr = yypvt[-0].tdd->m_tkTypeSpec; PASM->SetMemberRefFixup(mr, PASM->OpcodeLen(yypvt[-1].instr)); PASM->EmitInstrI(yypvt[-1].instr,mr); PASM->m_tkCurrentCVOwner = mr; PASM->m_pCustomDescrList = NULL; } break; -case 519: -#line 1424 "asmparse.y" +case 520: +#line 1425 "asmparse.y" { PASM->EmitInstrI(yypvt[-1].instr, yypvt[-0].token); PASM->m_tkCurrentCVOwner = yypvt[-0].token; PASM->m_pCustomDescrList = NULL; } break; -case 520: -#line 1428 "asmparse.y" -{ PASM->EmitInstrStringLiteral(yypvt[-1].instr, yypvt[-0].binstr,TRUE); } break; case 521: -#line 1430 "asmparse.y" -{ PASM->EmitInstrStringLiteral(yypvt[-4].instr, yypvt[-1].binstr,FALSE); } break; +#line 1429 "asmparse.y" +{ PASM->EmitInstrStringLiteral(yypvt[-1].instr, yypvt[-0].binstr,TRUE); } break; case 522: -#line 1432 "asmparse.y" -{ PASM->EmitInstrStringLiteral(yypvt[-3].instr, yypvt[-1].binstr,FALSE,TRUE); } break; +#line 1431 "asmparse.y" +{ PASM->EmitInstrStringLiteral(yypvt[-4].instr, yypvt[-1].binstr,FALSE); } break; case 523: -#line 1434 "asmparse.y" +#line 1433 "asmparse.y" +{ PASM->EmitInstrStringLiteral(yypvt[-3].instr, yypvt[-1].binstr,FALSE,TRUE); } break; +case 524: +#line 1435 "asmparse.y" { PASM->EmitInstrSig(yypvt[-5].instr, parser->MakeSig(yypvt[-4].int32, yypvt[-3].binstr, yypvt[-1].binstr)); PASM->ResetArgNameList(); } break; -case 524: -#line 1438 "asmparse.y" +case 525: +#line 1439 "asmparse.y" { PASM->EmitInstrI(yypvt[-1].instr,yypvt[-0].token); PASM->m_tkCurrentCVOwner = yypvt[-0].token; PASM->m_pCustomDescrList = NULL; iOpcodeLen = 0; } break; -case 525: -#line 1443 "asmparse.y" -{ PASM->EmitInstrSwitch(yypvt[-3].instr, yypvt[-1].labels); } break; case 526: -#line 1446 "asmparse.y" -{ yyval.labels = 0; } break; +#line 1444 "asmparse.y" +{ PASM->EmitInstrSwitch(yypvt[-3].instr, yypvt[-1].labels); } break; case 527: #line 1447 "asmparse.y" -{ yyval.labels = new Labels(yypvt[-2].string, yypvt[-0].labels, TRUE); } break; +{ yyval.labels = 0; } break; case 528: #line 1448 "asmparse.y" -{ yyval.labels = new Labels((char *)(UINT_PTR)yypvt[-2].int32, yypvt[-0].labels, FALSE); } break; +{ yyval.labels = new Labels(yypvt[-2].string, yypvt[-0].labels, TRUE); } break; case 529: #line 1449 "asmparse.y" -{ yyval.labels = new Labels(yypvt[-0].string, NULL, TRUE); } break; +{ yyval.labels = new Labels((char *)(UINT_PTR)yypvt[-2].int32, yypvt[-0].labels, FALSE); } break; case 530: #line 1450 "asmparse.y" -{ yyval.labels = new Labels((char *)(UINT_PTR)yypvt[-0].int32, NULL, FALSE); } break; +{ yyval.labels = new Labels(yypvt[-0].string, NULL, TRUE); } break; case 531: -#line 1454 "asmparse.y" -{ yyval.binstr = NULL; } break; +#line 1451 "asmparse.y" +{ yyval.labels = new Labels((char *)(UINT_PTR)yypvt[-0].int32, NULL, FALSE); } break; case 532: #line 1455 "asmparse.y" -{ yyval.binstr = yypvt[-1].binstr; } break; -case 533: -#line 1458 "asmparse.y" { yyval.binstr = NULL; } break; -case 534: +case 533: +#line 1456 "asmparse.y" +{ yyval.binstr = yypvt[-1].binstr; } break; +case 534: #line 1459 "asmparse.y" -{ yyval.binstr = yypvt[-0].binstr; } break; +{ yyval.binstr = NULL; } break; case 535: -#line 1462 "asmparse.y" +#line 1460 "asmparse.y" { yyval.binstr = yypvt[-0].binstr; } break; case 536: #line 1463 "asmparse.y" -{ yyval.binstr = yypvt[-2].binstr; yyval.binstr->append(yypvt[-0].binstr); delete yypvt[-0].binstr; } break; +{ yyval.binstr = yypvt[-0].binstr; } break; case 537: -#line 1467 "asmparse.y" -{ yyval.binstr = new BinStr(); } break; +#line 1464 "asmparse.y" +{ yyval.binstr = yypvt[-2].binstr; yyval.binstr->append(yypvt[-0].binstr); delete yypvt[-0].binstr; } break; case 538: #line 1468 "asmparse.y" -{ yyval.binstr = yypvt[-0].binstr;} break; +{ yyval.binstr = new BinStr(); } break; case 539: -#line 1471 "asmparse.y" -{ yyval.binstr = yypvt[-0].binstr; } break; +#line 1469 "asmparse.y" +{ yyval.binstr = yypvt[-0].binstr;} break; case 540: #line 1472 "asmparse.y" -{ yyval.binstr = yypvt[-2].binstr; yyval.binstr->append(yypvt[-0].binstr); delete yypvt[-0].binstr; } break; +{ yyval.binstr = yypvt[-0].binstr; } break; case 541: -#line 1475 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_SENTINEL); } break; +#line 1473 "asmparse.y" +{ yyval.binstr = yypvt[-2].binstr; yyval.binstr->append(yypvt[-0].binstr); delete yypvt[-0].binstr; } break; case 542: #line 1476 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->append(yypvt[-1].binstr); PASM->addArgName(NULL, yypvt[-1].binstr, yypvt[-0].binstr, yypvt[-2].int32); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_SENTINEL); } break; case 543: #line 1477 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->append(yypvt[-2].binstr); PASM->addArgName(yypvt[-0].string, yypvt[-2].binstr, yypvt[-1].binstr, yypvt[-3].int32);} break; +{ yyval.binstr = new BinStr(); yyval.binstr->append(yypvt[-1].binstr); PASM->addArgName(NULL, yypvt[-1].binstr, yypvt[-0].binstr, yypvt[-2].int32); } break; case 544: -#line 1481 "asmparse.y" -{ yyval.token = PASM->ResolveClassRef(PASM->GetAsmRef(yypvt[-2].string), yypvt[-0].string, NULL); delete[] yypvt[-2].string;} break; +#line 1478 "asmparse.y" +{ yyval.binstr = new BinStr(); yyval.binstr->append(yypvt[-2].binstr); PASM->addArgName(yypvt[-0].string, yypvt[-2].binstr, yypvt[-1].binstr, yypvt[-3].int32);} break; case 545: #line 1482 "asmparse.y" -{ yyval.token = PASM->ResolveClassRef(yypvt[-2].token, yypvt[-0].string, NULL); } break; +{ yyval.token = PASM->ResolveClassRef(PASM->GetAsmRef(yypvt[-2].string), yypvt[-0].string, NULL); delete[] yypvt[-2].string;} break; case 546: #line 1483 "asmparse.y" -{ yyval.token = PASM->ResolveClassRef(mdTokenNil, yypvt[-0].string, NULL); } break; +{ yyval.token = PASM->ResolveClassRef(yypvt[-2].token, yypvt[-0].string, NULL); } break; case 547: #line 1484 "asmparse.y" -{ yyval.token = PASM->ResolveClassRef(PASM->GetModRef(yypvt[-2].string),yypvt[-0].string, NULL); delete[] yypvt[-2].string;} break; +{ yyval.token = PASM->ResolveClassRef(mdTokenNil, yypvt[-0].string, NULL); } break; case 548: #line 1485 "asmparse.y" -{ yyval.token = PASM->ResolveClassRef(1,yypvt[-0].string,NULL); } break; +{ yyval.token = PASM->ResolveClassRef(PASM->GetModRef(yypvt[-2].string),yypvt[-0].string, NULL); delete[] yypvt[-2].string;} break; case 549: #line 1486 "asmparse.y" -{ yyval.token = yypvt[-0].token; } break; +{ yyval.token = PASM->ResolveClassRef(1,yypvt[-0].string,NULL); } break; case 550: #line 1487 "asmparse.y" -{ yyval.token = yypvt[-0].tdd->m_tkTypeSpec; } break; +{ yyval.token = yypvt[-0].token; } break; case 551: #line 1488 "asmparse.y" +{ yyval.token = yypvt[-0].tdd->m_tkTypeSpec; } break; +case 552: +#line 1489 "asmparse.y" { if(PASM->m_pCurClass != NULL) yyval.token = PASM->m_pCurClass->m_cl; else { yyval.token = 0; PASM->report->error(".this outside class scope\n"); } } break; -case 552: -#line 1491 "asmparse.y" +case 553: +#line 1492 "asmparse.y" { if(PASM->m_pCurClass != NULL) { yyval.token = PASM->m_pCurClass->m_crExtends; if(RidFromToken(yyval.token) == 0) PASM->report->error(".base undefined\n"); } else { yyval.token = 0; PASM->report->error(".base outside class scope\n"); } } break; -case 553: -#line 1497 "asmparse.y" +case 554: +#line 1498 "asmparse.y" { if(PASM->m_pCurClass != NULL) { if(PASM->m_pCurClass->m_pEncloser != NULL) yyval.token = PASM->m_pCurClass->m_pEncloser->m_cl; else { yyval.token = 0; PASM->report->error(".nester undefined\n"); } } else { yyval.token = 0; PASM->report->error(".nester outside class scope\n"); } } break; -case 554: -#line 1504 "asmparse.y" -{ yyval.string = yypvt[-0].string; } break; case 555: #line 1505 "asmparse.y" -{ yyval.string = newStringWDel(yypvt[-2].string, NESTING_SEP, yypvt[-0].string); } break; +{ yyval.string = yypvt[-0].string; } break; case 556: -#line 1508 "asmparse.y" -{ yyval.token = yypvt[-0].token;} break; +#line 1506 "asmparse.y" +{ yyval.string = newStringWDel(yypvt[-2].string, NESTING_SEP, yypvt[-0].string); } break; case 557: #line 1509 "asmparse.y" -{ yyval.token = PASM->GetAsmRef(yypvt[-1].string); delete[] yypvt[-1].string;} break; +{ yyval.token = yypvt[-0].token;} break; case 558: #line 1510 "asmparse.y" -{ yyval.token = PASM->GetModRef(yypvt[-1].string); delete[] yypvt[-1].string;} break; +{ yyval.token = PASM->GetAsmRef(yypvt[-1].string); delete[] yypvt[-1].string;} break; case 559: #line 1511 "asmparse.y" -{ yyval.token = PASM->ResolveTypeSpec(yypvt[-0].binstr); } break; +{ yyval.token = PASM->GetModRef(yypvt[-1].string); delete[] yypvt[-1].string;} break; case 560: -#line 1515 "asmparse.y" -{ yyval.binstr = new BinStr(); } break; +#line 1512 "asmparse.y" +{ yyval.token = PASM->ResolveTypeSpec(yypvt[-0].binstr); } break; case 561: -#line 1517 "asmparse.y" +#line 1516 "asmparse.y" +{ yyval.binstr = new BinStr(); } break; +case 562: +#line 1518 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_CUSTOMMARSHALER); corEmitInt(yyval.binstr,yypvt[-7].binstr->length()); yyval.binstr->append(yypvt[-7].binstr); corEmitInt(yyval.binstr,yypvt[-5].binstr->length()); yyval.binstr->append(yypvt[-5].binstr); corEmitInt(yyval.binstr,yypvt[-3].binstr->length()); yyval.binstr->append(yypvt[-3].binstr); corEmitInt(yyval.binstr,yypvt[-1].binstr->length()); yyval.binstr->append(yypvt[-1].binstr); PASM->report->warn("Deprecated 4-string form of custom marshaler, first two strings ignored\n");} break; -case 562: -#line 1524 "asmparse.y" +case 563: +#line 1525 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_CUSTOMMARSHALER); corEmitInt(yyval.binstr,0); corEmitInt(yyval.binstr,0); corEmitInt(yyval.binstr,yypvt[-3].binstr->length()); yyval.binstr->append(yypvt[-3].binstr); corEmitInt(yyval.binstr,yypvt[-1].binstr->length()); yyval.binstr->append(yypvt[-1].binstr); } break; -case 563: -#line 1529 "asmparse.y" +case 564: +#line 1530 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_FIXEDSYSSTRING); corEmitInt(yyval.binstr,yypvt[-1].int32); } break; -case 564: -#line 1532 "asmparse.y" +case 565: +#line 1533 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_FIXEDARRAY); corEmitInt(yyval.binstr,yypvt[-2].int32); yyval.binstr->append(yypvt[-0].binstr); } break; -case 565: -#line 1534 "asmparse.y" +case 566: +#line 1535 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_VARIANT); PASM->report->warn("Deprecated native type 'variant'\n"); } break; -case 566: -#line 1536 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_CURRENCY); } break; case 567: #line 1537 "asmparse.y" +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_CURRENCY); } break; +case 568: +#line 1538 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_SYSCHAR); PASM->report->warn("Deprecated native type 'syschar'\n"); } break; -case 568: -#line 1539 "asmparse.y" +case 569: +#line 1540 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_VOID); PASM->report->warn("Deprecated native type 'void'\n"); } break; -case 569: -#line 1541 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_BOOLEAN); } break; case 570: #line 1542 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_I1); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_BOOLEAN); } break; case 571: #line 1543 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_I2); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_I1); } break; case 572: #line 1544 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_I4); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_I2); } break; case 573: #line 1545 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_I8); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_I4); } break; case 574: #line 1546 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_R4); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_I8); } break; case 575: #line 1547 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_R8); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_R4); } break; case 576: #line 1548 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_ERROR); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_R8); } break; case 577: #line 1549 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_U1); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_ERROR); } break; case 578: #line 1550 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_U2); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_U1); } break; case 579: #line 1551 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_U4); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_U2); } break; case 580: #line 1552 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_U8); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_U4); } break; case 581: #line 1553 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_U1); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_U8); } break; case 582: #line 1554 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_U2); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_U1); } break; case 583: #line 1555 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_U4); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_U2); } break; case 584: #line 1556 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_U8); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_U4); } break; case 585: #line 1557 "asmparse.y" +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_U8); } break; +case 586: +#line 1558 "asmparse.y" { yyval.binstr = yypvt[-1].binstr; yyval.binstr->insertInt8(NATIVE_TYPE_PTR); PASM->report->warn("Deprecated native type '*'\n"); } break; -case 586: -#line 1559 "asmparse.y" +case 587: +#line 1560 "asmparse.y" { yyval.binstr = yypvt[-2].binstr; if(yyval.binstr->length()==0) yyval.binstr->appendInt8(NATIVE_TYPE_MAX); yyval.binstr->insertInt8(NATIVE_TYPE_ARRAY); } break; -case 587: -#line 1561 "asmparse.y" +case 588: +#line 1562 "asmparse.y" { yyval.binstr = yypvt[-3].binstr; if(yyval.binstr->length()==0) yyval.binstr->appendInt8(NATIVE_TYPE_MAX); yyval.binstr->insertInt8(NATIVE_TYPE_ARRAY); corEmitInt(yyval.binstr,0); corEmitInt(yyval.binstr,yypvt[-1].int32); corEmitInt(yyval.binstr,0); } break; -case 588: -#line 1566 "asmparse.y" +case 589: +#line 1567 "asmparse.y" { yyval.binstr = yypvt[-5].binstr; if(yyval.binstr->length()==0) yyval.binstr->appendInt8(NATIVE_TYPE_MAX); yyval.binstr->insertInt8(NATIVE_TYPE_ARRAY); corEmitInt(yyval.binstr,yypvt[-1].int32); corEmitInt(yyval.binstr,yypvt[-3].int32); corEmitInt(yyval.binstr,ntaSizeParamIndexSpecified); } break; -case 589: -#line 1571 "asmparse.y" +case 590: +#line 1572 "asmparse.y" { yyval.binstr = yypvt[-4].binstr; if(yyval.binstr->length()==0) yyval.binstr->appendInt8(NATIVE_TYPE_MAX); yyval.binstr->insertInt8(NATIVE_TYPE_ARRAY); corEmitInt(yyval.binstr,yypvt[-1].int32); } break; -case 590: -#line 1574 "asmparse.y" +case 591: +#line 1575 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_DECIMAL); PASM->report->warn("Deprecated native type 'decimal'\n"); } break; -case 591: -#line 1576 "asmparse.y" +case 592: +#line 1577 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_DATE); PASM->report->warn("Deprecated native type 'date'\n"); } break; -case 592: -#line 1578 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_BSTR); } break; case 593: #line 1579 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_LPSTR); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_BSTR); } break; case 594: #line 1580 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_LPWSTR); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_LPSTR); } break; case 595: #line 1581 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_LPTSTR); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_LPWSTR); } break; case 596: #line 1582 "asmparse.y" +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_LPTSTR); } break; +case 597: +#line 1583 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_OBJECTREF); PASM->report->warn("Deprecated native type 'objectref'\n"); } break; -case 597: -#line 1584 "asmparse.y" +case 598: +#line 1585 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_IUNKNOWN); if(yypvt[-0].int32 != -1) corEmitInt(yyval.binstr,yypvt[-0].int32); } break; -case 598: -#line 1586 "asmparse.y" +case 599: +#line 1587 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_IDISPATCH); if(yypvt[-0].int32 != -1) corEmitInt(yyval.binstr,yypvt[-0].int32); } break; -case 599: -#line 1588 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_STRUCT); } break; case 600: #line 1589 "asmparse.y" +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_STRUCT); } break; +case 601: +#line 1590 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_INTF); if(yypvt[-0].int32 != -1) corEmitInt(yyval.binstr,yypvt[-0].int32); } break; -case 601: -#line 1591 "asmparse.y" +case 602: +#line 1592 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_SAFEARRAY); corEmitInt(yyval.binstr,yypvt[-0].int32); corEmitInt(yyval.binstr,0);} break; -case 602: -#line 1594 "asmparse.y" +case 603: +#line 1595 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_SAFEARRAY); corEmitInt(yyval.binstr,yypvt[-2].int32); corEmitInt(yyval.binstr,yypvt[-0].binstr->length()); yyval.binstr->append(yypvt[-0].binstr); } break; -case 603: -#line 1598 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_INT); } break; case 604: #line 1599 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_UINT); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_INT); } break; case 605: #line 1600 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_UINT); } break; case 606: #line 1601 "asmparse.y" +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_UINT); } break; +case 607: +#line 1602 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_NESTEDSTRUCT); PASM->report->warn("Deprecated native type 'nested struct'\n"); } break; -case 607: -#line 1603 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_BYVALSTR); } break; case 608: #line 1604 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_ANSIBSTR); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_BYVALSTR); } break; case 609: #line 1605 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_TBSTR); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_ANSIBSTR); } break; case 610: #line 1606 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_VARIANTBOOL); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_TBSTR); } break; case 611: #line 1607 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_FUNC); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_VARIANTBOOL); } break; case 612: #line 1608 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_ASANY); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_FUNC); } break; case 613: #line 1609 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_LPSTRUCT); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_ASANY); } break; case 614: #line 1610 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->append(yypvt[-0].tdd->m_pbsTypeSpec); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(NATIVE_TYPE_LPSTRUCT); } break; case 615: -#line 1613 "asmparse.y" -{ yyval.int32 = -1; } break; +#line 1611 "asmparse.y" +{ yyval.binstr = new BinStr(); yyval.binstr->append(yypvt[-0].tdd->m_pbsTypeSpec); } break; case 616: #line 1614 "asmparse.y" -{ yyval.int32 = yypvt[-1].int32; } break; +{ yyval.int32 = -1; } break; case 617: -#line 1617 "asmparse.y" -{ yyval.int32 = VT_EMPTY; } break; +#line 1615 "asmparse.y" +{ yyval.int32 = yypvt[-1].int32; } break; case 618: #line 1618 "asmparse.y" -{ yyval.int32 = VT_NULL; } break; +{ yyval.int32 = VT_EMPTY; } break; case 619: #line 1619 "asmparse.y" -{ yyval.int32 = VT_VARIANT; } break; +{ yyval.int32 = VT_NULL; } break; case 620: #line 1620 "asmparse.y" -{ yyval.int32 = VT_CY; } break; +{ yyval.int32 = VT_VARIANT; } break; case 621: #line 1621 "asmparse.y" -{ yyval.int32 = VT_VOID; } break; +{ yyval.int32 = VT_CY; } break; case 622: #line 1622 "asmparse.y" -{ yyval.int32 = VT_BOOL; } break; +{ yyval.int32 = VT_VOID; } break; case 623: #line 1623 "asmparse.y" -{ yyval.int32 = VT_I1; } break; +{ yyval.int32 = VT_BOOL; } break; case 624: #line 1624 "asmparse.y" -{ yyval.int32 = VT_I2; } break; +{ yyval.int32 = VT_I1; } break; case 625: #line 1625 "asmparse.y" -{ yyval.int32 = VT_I4; } break; +{ yyval.int32 = VT_I2; } break; case 626: #line 1626 "asmparse.y" -{ yyval.int32 = VT_I8; } break; +{ yyval.int32 = VT_I4; } break; case 627: #line 1627 "asmparse.y" -{ yyval.int32 = VT_R4; } break; +{ yyval.int32 = VT_I8; } break; case 628: #line 1628 "asmparse.y" -{ yyval.int32 = VT_R8; } break; +{ yyval.int32 = VT_R4; } break; case 629: #line 1629 "asmparse.y" -{ yyval.int32 = VT_UI1; } break; +{ yyval.int32 = VT_R8; } break; case 630: #line 1630 "asmparse.y" -{ yyval.int32 = VT_UI2; } break; +{ yyval.int32 = VT_UI1; } break; case 631: #line 1631 "asmparse.y" -{ yyval.int32 = VT_UI4; } break; +{ yyval.int32 = VT_UI2; } break; case 632: #line 1632 "asmparse.y" -{ yyval.int32 = VT_UI8; } break; +{ yyval.int32 = VT_UI4; } break; case 633: #line 1633 "asmparse.y" -{ yyval.int32 = VT_UI1; } break; +{ yyval.int32 = VT_UI8; } break; case 634: #line 1634 "asmparse.y" -{ yyval.int32 = VT_UI2; } break; +{ yyval.int32 = VT_UI1; } break; case 635: #line 1635 "asmparse.y" -{ yyval.int32 = VT_UI4; } break; +{ yyval.int32 = VT_UI2; } break; case 636: #line 1636 "asmparse.y" -{ yyval.int32 = VT_UI8; } break; +{ yyval.int32 = VT_UI4; } break; case 637: #line 1637 "asmparse.y" -{ yyval.int32 = VT_PTR; } break; +{ yyval.int32 = VT_UI8; } break; case 638: #line 1638 "asmparse.y" -{ yyval.int32 = yypvt[-2].int32 | VT_ARRAY; } break; +{ yyval.int32 = VT_PTR; } break; case 639: #line 1639 "asmparse.y" -{ yyval.int32 = yypvt[-1].int32 | VT_VECTOR; } break; +{ yyval.int32 = yypvt[-2].int32 | VT_ARRAY; } break; case 640: #line 1640 "asmparse.y" -{ yyval.int32 = yypvt[-1].int32 | VT_BYREF; } break; +{ yyval.int32 = yypvt[-1].int32 | VT_VECTOR; } break; case 641: #line 1641 "asmparse.y" -{ yyval.int32 = VT_DECIMAL; } break; +{ yyval.int32 = yypvt[-1].int32 | VT_BYREF; } break; case 642: #line 1642 "asmparse.y" -{ yyval.int32 = VT_DATE; } break; +{ yyval.int32 = VT_DECIMAL; } break; case 643: #line 1643 "asmparse.y" -{ yyval.int32 = VT_BSTR; } break; +{ yyval.int32 = VT_DATE; } break; case 644: #line 1644 "asmparse.y" -{ yyval.int32 = VT_LPSTR; } break; +{ yyval.int32 = VT_BSTR; } break; case 645: #line 1645 "asmparse.y" -{ yyval.int32 = VT_LPWSTR; } break; +{ yyval.int32 = VT_LPSTR; } break; case 646: #line 1646 "asmparse.y" -{ yyval.int32 = VT_UNKNOWN; } break; +{ yyval.int32 = VT_LPWSTR; } break; case 647: #line 1647 "asmparse.y" -{ yyval.int32 = VT_DISPATCH; } break; +{ yyval.int32 = VT_UNKNOWN; } break; case 648: #line 1648 "asmparse.y" -{ yyval.int32 = VT_SAFEARRAY; } break; +{ yyval.int32 = VT_DISPATCH; } break; case 649: #line 1649 "asmparse.y" -{ yyval.int32 = VT_INT; } break; +{ yyval.int32 = VT_SAFEARRAY; } break; case 650: #line 1650 "asmparse.y" -{ yyval.int32 = VT_UINT; } break; +{ yyval.int32 = VT_INT; } break; case 651: #line 1651 "asmparse.y" { yyval.int32 = VT_UINT; } break; case 652: #line 1652 "asmparse.y" -{ yyval.int32 = VT_ERROR; } break; +{ yyval.int32 = VT_UINT; } break; case 653: #line 1653 "asmparse.y" -{ yyval.int32 = VT_HRESULT; } break; +{ yyval.int32 = VT_ERROR; } break; case 654: #line 1654 "asmparse.y" -{ yyval.int32 = VT_CARRAY; } break; +{ yyval.int32 = VT_HRESULT; } break; case 655: #line 1655 "asmparse.y" -{ yyval.int32 = VT_USERDEFINED; } break; +{ yyval.int32 = VT_CARRAY; } break; case 656: #line 1656 "asmparse.y" -{ yyval.int32 = VT_RECORD; } break; +{ yyval.int32 = VT_USERDEFINED; } break; case 657: #line 1657 "asmparse.y" -{ yyval.int32 = VT_FILETIME; } break; +{ yyval.int32 = VT_RECORD; } break; case 658: #line 1658 "asmparse.y" -{ yyval.int32 = VT_BLOB; } break; +{ yyval.int32 = VT_FILETIME; } break; case 659: #line 1659 "asmparse.y" -{ yyval.int32 = VT_STREAM; } break; +{ yyval.int32 = VT_BLOB; } break; case 660: #line 1660 "asmparse.y" -{ yyval.int32 = VT_STORAGE; } break; +{ yyval.int32 = VT_STREAM; } break; case 661: #line 1661 "asmparse.y" -{ yyval.int32 = VT_STREAMED_OBJECT; } break; +{ yyval.int32 = VT_STORAGE; } break; case 662: #line 1662 "asmparse.y" -{ yyval.int32 = VT_STORED_OBJECT; } break; +{ yyval.int32 = VT_STREAMED_OBJECT; } break; case 663: #line 1663 "asmparse.y" -{ yyval.int32 = VT_BLOB_OBJECT; } break; +{ yyval.int32 = VT_STORED_OBJECT; } break; case 664: #line 1664 "asmparse.y" -{ yyval.int32 = VT_CF; } break; +{ yyval.int32 = VT_BLOB_OBJECT; } break; case 665: #line 1665 "asmparse.y" -{ yyval.int32 = VT_CLSID; } break; +{ yyval.int32 = VT_CF; } break; case 666: -#line 1669 "asmparse.y" +#line 1666 "asmparse.y" +{ yyval.int32 = VT_CLSID; } break; +case 667: +#line 1670 "asmparse.y" { if(yypvt[-0].token == PASM->m_tkSysString) { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_STRING); } else if(yypvt[-0].token == PASM->m_tkSysObject) { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_OBJECT); } else yyval.binstr = parser->MakeTypeClass(ELEMENT_TYPE_CLASS, yypvt[-0].token); } break; -case 667: -#line 1675 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_OBJECT); } break; case 668: #line 1676 "asmparse.y" -{ yyval.binstr = parser->MakeTypeClass(ELEMENT_TYPE_VALUETYPE, yypvt[-0].token); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_OBJECT); } break; case 669: #line 1677 "asmparse.y" { yyval.binstr = parser->MakeTypeClass(ELEMENT_TYPE_VALUETYPE, yypvt[-0].token); } break; case 670: #line 1678 "asmparse.y" -{ yyval.binstr = yypvt[-2].binstr; yyval.binstr->insertInt8(ELEMENT_TYPE_SZARRAY); } break; +{ yyval.binstr = parser->MakeTypeClass(ELEMENT_TYPE_VALUETYPE, yypvt[-0].token); } break; case 671: #line 1679 "asmparse.y" -{ yyval.binstr = parser->MakeTypeArray(ELEMENT_TYPE_ARRAY, yypvt[-3].binstr, yypvt[-1].binstr); } break; +{ yyval.binstr = yypvt[-2].binstr; yyval.binstr->insertInt8(ELEMENT_TYPE_SZARRAY); } break; case 672: #line 1680 "asmparse.y" -{ yyval.binstr = yypvt[-1].binstr; yyval.binstr->insertInt8(ELEMENT_TYPE_BYREF); } break; +{ yyval.binstr = parser->MakeTypeArray(ELEMENT_TYPE_ARRAY, yypvt[-3].binstr, yypvt[-1].binstr); } break; case 673: #line 1681 "asmparse.y" -{ yyval.binstr = yypvt[-1].binstr; yyval.binstr->insertInt8(ELEMENT_TYPE_PTR); } break; +{ yyval.binstr = yypvt[-1].binstr; yyval.binstr->insertInt8(ELEMENT_TYPE_BYREF); } break; case 674: #line 1682 "asmparse.y" -{ yyval.binstr = yypvt[-1].binstr; yyval.binstr->insertInt8(ELEMENT_TYPE_PINNED); } break; +{ yyval.binstr = yypvt[-1].binstr; yyval.binstr->insertInt8(ELEMENT_TYPE_PTR); } break; case 675: #line 1683 "asmparse.y" +{ yyval.binstr = yypvt[-1].binstr; yyval.binstr->insertInt8(ELEMENT_TYPE_PINNED); } break; +case 676: +#line 1684 "asmparse.y" { yyval.binstr = parser->MakeTypeClass(ELEMENT_TYPE_CMOD_REQD, yypvt[-1].token); yyval.binstr->append(yypvt[-4].binstr); } break; -case 676: -#line 1685 "asmparse.y" +case 677: +#line 1686 "asmparse.y" { yyval.binstr = parser->MakeTypeClass(ELEMENT_TYPE_CMOD_OPT, yypvt[-1].token); yyval.binstr->append(yypvt[-4].binstr); } break; -case 677: -#line 1688 "asmparse.y" +case 678: +#line 1689 "asmparse.y" { yyval.binstr = parser->MakeSig(yypvt[-5].int32, yypvt[-4].binstr, yypvt[-1].binstr); yyval.binstr->insertInt8(ELEMENT_TYPE_FNPTR); PASM->delArgNameList(PASM->m_firstArgName); PASM->m_firstArgName = parser->m_ANSFirst.POP(); PASM->m_lastArgName = parser->m_ANSLast.POP(); } break; -case 678: -#line 1694 "asmparse.y" +case 679: +#line 1695 "asmparse.y" { if(yypvt[-1].binstr == NULL) yyval.binstr = yypvt[-3].binstr; else { yyval.binstr = new BinStr(); @@ -4375,24 +4377,24 @@ case 678: yyval.binstr->append(yypvt[-3].binstr); corEmitInt(yyval.binstr, corCountArgs(yypvt[-1].binstr)); yyval.binstr->append(yypvt[-1].binstr); delete yypvt[-3].binstr; delete yypvt[-1].binstr; }} break; -case 679: -#line 1701 "asmparse.y" +case 680: +#line 1702 "asmparse.y" { //if(PASM->m_pCurMethod) { // if(($3 < 0)||((DWORD)$3 >= PASM->m_pCurMethod->m_NumTyPars)) // PASM->report->error("Invalid method type parameter '%d'\n",$3); yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_MVAR); corEmitInt(yyval.binstr, yypvt[-0].int32); //} else PASM->report->error("Method type parameter '%d' outside method scope\n",$3); } break; -case 680: -#line 1707 "asmparse.y" +case 681: +#line 1708 "asmparse.y" { //if(PASM->m_pCurClass) { // if(($2 < 0)||((DWORD)$2 >= PASM->m_pCurClass->m_NumTyPars)) // PASM->report->error("Invalid type parameter '%d'\n",$2); yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_VAR); corEmitInt(yyval.binstr, yypvt[-0].int32); //} else PASM->report->error("Type parameter '%d' outside class scope\n",$2); } break; -case 681: -#line 1713 "asmparse.y" +case 682: +#line 1714 "asmparse.y" { int eltype = ELEMENT_TYPE_MVAR; int n=-1; if(PASM->m_pCurMethod) n = PASM->m_pCurMethod->FindTyPar(yypvt[-0].string); @@ -4408,8 +4410,8 @@ case 681: n = 0x1FFFFFFF; } yyval.binstr = new BinStr(); yyval.binstr->appendInt8(eltype); corEmitInt(yyval.binstr,n); } break; -case 682: -#line 1728 "asmparse.y" +case 683: +#line 1729 "asmparse.y" { int eltype = ELEMENT_TYPE_VAR; int n=-1; if(PASM->m_pCurClass && !newclass) n = PASM->m_pCurClass->FindTyPar(yypvt[-0].string); @@ -4425,493 +4427,493 @@ case 682: n = 0x1FFFFFFF; } yyval.binstr = new BinStr(); yyval.binstr->appendInt8(eltype); corEmitInt(yyval.binstr,n); } break; -case 683: -#line 1743 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_TYPEDBYREF); } break; case 684: #line 1744 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_VOID); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_TYPEDBYREF); } break; case 685: #line 1745 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_I); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_VOID); } break; case 686: #line 1746 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_U); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_I); } break; case 687: #line 1747 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_U); } break; case 688: #line 1748 "asmparse.y" -{ yyval.binstr = yypvt[-0].binstr; } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_U); } break; case 689: #line 1749 "asmparse.y" -{ yyval.binstr = yypvt[-0].binstr; yyval.binstr->insertInt8(ELEMENT_TYPE_SENTINEL); } break; +{ yyval.binstr = yypvt[-0].binstr; } break; case 690: -#line 1752 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_CHAR); } break; +#line 1750 "asmparse.y" +{ yyval.binstr = yypvt[-0].binstr; yyval.binstr->insertInt8(ELEMENT_TYPE_SENTINEL); } break; case 691: #line 1753 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_STRING); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_CHAR); } break; case 692: #line 1754 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_BOOLEAN); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_STRING); } break; case 693: #line 1755 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_I1); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_BOOLEAN); } break; case 694: #line 1756 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_I2); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_I1); } break; case 695: #line 1757 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_I4); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_I2); } break; case 696: #line 1758 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_I8); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_I4); } break; case 697: #line 1759 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_R4); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_I8); } break; case 698: #line 1760 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_R8); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_R4); } break; case 699: #line 1761 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_U1); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_R8); } break; case 700: #line 1762 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_U2); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_U1); } break; case 701: #line 1763 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_U4); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_U2); } break; case 702: #line 1764 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_U8); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_U4); } break; case 703: #line 1765 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_U1); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_U8); } break; case 704: #line 1766 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_U2); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_U1); } break; case 705: #line 1767 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_U4); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_U2); } break; case 706: #line 1768 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_U8); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_U4); } break; case 707: #line 1769 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->append(yypvt[-0].tdd->m_pbsTypeSpec); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt8(ELEMENT_TYPE_U8); } break; case 708: -#line 1772 "asmparse.y" -{ yyval.binstr = yypvt[-0].binstr; } break; +#line 1770 "asmparse.y" +{ yyval.binstr = new BinStr(); yyval.binstr->append(yypvt[-0].tdd->m_pbsTypeSpec); } break; case 709: #line 1773 "asmparse.y" -{ yyval.binstr = yypvt[-2].binstr; yypvt[-2].binstr->append(yypvt[-0].binstr); delete yypvt[-0].binstr; } break; +{ yyval.binstr = yypvt[-0].binstr; } break; case 710: -#line 1776 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt32(0x7FFFFFFF); yyval.binstr->appendInt32(0x7FFFFFFF); } break; +#line 1774 "asmparse.y" +{ yyval.binstr = yypvt[-2].binstr; yypvt[-2].binstr->append(yypvt[-0].binstr); delete yypvt[-0].binstr; } break; case 711: #line 1777 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt32(0x7FFFFFFF); yyval.binstr->appendInt32(0x7FFFFFFF); } break; case 712: #line 1778 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt32(0); yyval.binstr->appendInt32(yypvt[-0].int32); } break; +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt32(0x7FFFFFFF); yyval.binstr->appendInt32(0x7FFFFFFF); } break; case 713: #line 1779 "asmparse.y" +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt32(0); yyval.binstr->appendInt32(yypvt[-0].int32); } break; +case 714: +#line 1780 "asmparse.y" { FAIL_UNLESS(yypvt[-2].int32 <= yypvt[-0].int32, ("lower bound %d must be <= upper bound %d\n", yypvt[-2].int32, yypvt[-0].int32)); if (yypvt[-2].int32 > yypvt[-0].int32) { YYERROR; }; yyval.binstr = new BinStr(); yyval.binstr->appendInt32(yypvt[-2].int32); yyval.binstr->appendInt32(yypvt[-0].int32-yypvt[-2].int32+1); } break; -case 714: -#line 1782 "asmparse.y" -{ yyval.binstr = new BinStr(); yyval.binstr->appendInt32(yypvt[-1].int32); yyval.binstr->appendInt32(0x7FFFFFFF); } break; case 715: -#line 1787 "asmparse.y" -{ PASM->AddPermissionDecl(yypvt[-4].secAct, yypvt[-3].token, yypvt[-1].pair); } break; +#line 1783 "asmparse.y" +{ yyval.binstr = new BinStr(); yyval.binstr->appendInt32(yypvt[-1].int32); yyval.binstr->appendInt32(0x7FFFFFFF); } break; case 716: -#line 1789 "asmparse.y" -{ PASM->AddPermissionDecl(yypvt[-5].secAct, yypvt[-4].token, yypvt[-1].binstr); } break; +#line 1788 "asmparse.y" +{ PASM->AddPermissionDecl(yypvt[-4].secAct, yypvt[-3].token, yypvt[-1].pair); } break; case 717: #line 1790 "asmparse.y" -{ PASM->AddPermissionDecl(yypvt[-1].secAct, yypvt[-0].token, (NVPair *)NULL); } break; +{ PASM->AddPermissionDecl(yypvt[-5].secAct, yypvt[-4].token, yypvt[-1].binstr); } break; case 718: #line 1791 "asmparse.y" -{ PASM->AddPermissionSetDecl(yypvt[-2].secAct, yypvt[-1].binstr); } break; +{ PASM->AddPermissionDecl(yypvt[-1].secAct, yypvt[-0].token, (NVPair *)NULL); } break; case 719: -#line 1793 "asmparse.y" -{ PASM->AddPermissionSetDecl(yypvt[-1].secAct,BinStrToUnicode(yypvt[-0].binstr,true));} break; +#line 1792 "asmparse.y" +{ PASM->AddPermissionSetDecl(yypvt[-2].secAct, yypvt[-1].binstr); } break; case 720: -#line 1795 "asmparse.y" +#line 1794 "asmparse.y" +{ PASM->AddPermissionSetDecl(yypvt[-1].secAct,BinStrToUnicode(yypvt[-0].binstr,true));} break; +case 721: +#line 1796 "asmparse.y" { BinStr* ret = new BinStr(); ret->insertInt8('.'); corEmitInt(ret, nSecAttrBlobs); ret->append(yypvt[-1].binstr); PASM->AddPermissionSetDecl(yypvt[-4].secAct,ret); nSecAttrBlobs = 0; } break; -case 721: -#line 1803 "asmparse.y" -{ yyval.binstr = new BinStr(); nSecAttrBlobs = 0;} break; case 722: #line 1804 "asmparse.y" -{ yyval.binstr = yypvt[-0].binstr; nSecAttrBlobs = 1; } break; +{ yyval.binstr = new BinStr(); nSecAttrBlobs = 0;} break; case 723: #line 1805 "asmparse.y" -{ yyval.binstr = yypvt[-2].binstr; yyval.binstr->append(yypvt[-0].binstr); nSecAttrBlobs++; } break; +{ yyval.binstr = yypvt[-0].binstr; nSecAttrBlobs = 1; } break; case 724: -#line 1809 "asmparse.y" +#line 1806 "asmparse.y" +{ yyval.binstr = yypvt[-2].binstr; yyval.binstr->append(yypvt[-0].binstr); nSecAttrBlobs++; } break; +case 725: +#line 1810 "asmparse.y" { yyval.binstr = PASM->EncodeSecAttr(PASM->ReflectionNotation(yypvt[-4].token),yypvt[-1].binstr,nCustomBlobNVPairs); nCustomBlobNVPairs = 0; } break; -case 725: -#line 1812 "asmparse.y" +case 726: +#line 1813 "asmparse.y" { yyval.binstr = PASM->EncodeSecAttr(yypvt[-4].string,yypvt[-1].binstr,nCustomBlobNVPairs); nCustomBlobNVPairs = 0; } break; -case 726: -#line 1816 "asmparse.y" -{ yyval.secAct = yypvt[-2].secAct; bParsingByteArray = TRUE; } break; case 727: -#line 1818 "asmparse.y" +#line 1817 "asmparse.y" { yyval.secAct = yypvt[-2].secAct; bParsingByteArray = TRUE; } break; case 728: -#line 1821 "asmparse.y" -{ yyval.pair = yypvt[-0].pair; } break; +#line 1819 "asmparse.y" +{ yyval.secAct = yypvt[-2].secAct; bParsingByteArray = TRUE; } break; case 729: #line 1822 "asmparse.y" -{ yyval.pair = yypvt[-2].pair->Concat(yypvt[-0].pair); } break; +{ yyval.pair = yypvt[-0].pair; } break; case 730: -#line 1825 "asmparse.y" -{ yypvt[-2].binstr->appendInt8(0); yyval.pair = new NVPair(yypvt[-2].binstr, yypvt[-0].binstr); } break; +#line 1823 "asmparse.y" +{ yyval.pair = yypvt[-2].pair->Concat(yypvt[-0].pair); } break; case 731: -#line 1828 "asmparse.y" -{ yyval.int32 = 1; } break; +#line 1826 "asmparse.y" +{ yypvt[-2].binstr->appendInt8(0); yyval.pair = new NVPair(yypvt[-2].binstr, yypvt[-0].binstr); } break; case 732: #line 1829 "asmparse.y" -{ yyval.int32 = 0; } break; +{ yyval.int32 = 1; } break; case 733: -#line 1832 "asmparse.y" +#line 1830 "asmparse.y" +{ yyval.int32 = 0; } break; +case 734: +#line 1833 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(SERIALIZATION_TYPE_BOOLEAN); yyval.binstr->appendInt8(yypvt[-0].int32); } break; -case 734: -#line 1835 "asmparse.y" +case 735: +#line 1836 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(SERIALIZATION_TYPE_I4); yyval.binstr->appendInt32(yypvt[-0].int32); } break; -case 735: -#line 1838 "asmparse.y" +case 736: +#line 1839 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(SERIALIZATION_TYPE_I4); yyval.binstr->appendInt32(yypvt[-1].int32); } break; -case 736: -#line 1841 "asmparse.y" +case 737: +#line 1842 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(SERIALIZATION_TYPE_STRING); yyval.binstr->append(yypvt[-0].binstr); delete yypvt[-0].binstr; yyval.binstr->appendInt8(0); } break; -case 737: -#line 1845 "asmparse.y" +case 738: +#line 1846 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(SERIALIZATION_TYPE_ENUM); char* sz = PASM->ReflectionNotation(yypvt[-5].token); strcpy_s((char *)yyval.binstr->getBuff((unsigned)strlen(sz) + 1), strlen(sz) + 1,sz); yyval.binstr->appendInt8(1); yyval.binstr->appendInt32(yypvt[-1].int32); } break; -case 738: -#line 1851 "asmparse.y" +case 739: +#line 1852 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(SERIALIZATION_TYPE_ENUM); char* sz = PASM->ReflectionNotation(yypvt[-5].token); strcpy_s((char *)yyval.binstr->getBuff((unsigned)strlen(sz) + 1), strlen(sz) + 1,sz); yyval.binstr->appendInt8(2); yyval.binstr->appendInt32(yypvt[-1].int32); } break; -case 739: -#line 1857 "asmparse.y" +case 740: +#line 1858 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(SERIALIZATION_TYPE_ENUM); char* sz = PASM->ReflectionNotation(yypvt[-5].token); strcpy_s((char *)yyval.binstr->getBuff((unsigned)strlen(sz) + 1), strlen(sz) + 1,sz); yyval.binstr->appendInt8(4); yyval.binstr->appendInt32(yypvt[-1].int32); } break; -case 740: -#line 1863 "asmparse.y" +case 741: +#line 1864 "asmparse.y" { yyval.binstr = new BinStr(); yyval.binstr->appendInt8(SERIALIZATION_TYPE_ENUM); char* sz = PASM->ReflectionNotation(yypvt[-3].token); strcpy_s((char *)yyval.binstr->getBuff((unsigned)strlen(sz) + 1), strlen(sz) + 1,sz); yyval.binstr->appendInt8(4); yyval.binstr->appendInt32(yypvt[-1].int32); } break; -case 741: -#line 1871 "asmparse.y" -{ yyval.secAct = dclRequest; } break; case 742: #line 1872 "asmparse.y" -{ yyval.secAct = dclDemand; } break; +{ yyval.secAct = dclRequest; } break; case 743: #line 1873 "asmparse.y" -{ yyval.secAct = dclAssert; } break; +{ yyval.secAct = dclDemand; } break; case 744: #line 1874 "asmparse.y" -{ yyval.secAct = dclDeny; } break; +{ yyval.secAct = dclAssert; } break; case 745: #line 1875 "asmparse.y" -{ yyval.secAct = dclPermitOnly; } break; +{ yyval.secAct = dclDeny; } break; case 746: #line 1876 "asmparse.y" -{ yyval.secAct = dclLinktimeCheck; } break; +{ yyval.secAct = dclPermitOnly; } break; case 747: #line 1877 "asmparse.y" -{ yyval.secAct = dclInheritanceCheck; } break; +{ yyval.secAct = dclLinktimeCheck; } break; case 748: #line 1878 "asmparse.y" -{ yyval.secAct = dclRequestMinimum; } break; +{ yyval.secAct = dclInheritanceCheck; } break; case 749: #line 1879 "asmparse.y" -{ yyval.secAct = dclRequestOptional; } break; +{ yyval.secAct = dclRequestMinimum; } break; case 750: #line 1880 "asmparse.y" -{ yyval.secAct = dclRequestRefuse; } break; +{ yyval.secAct = dclRequestOptional; } break; case 751: #line 1881 "asmparse.y" -{ yyval.secAct = dclPrejitGrant; } break; +{ yyval.secAct = dclRequestRefuse; } break; case 752: #line 1882 "asmparse.y" -{ yyval.secAct = dclPrejitDenied; } break; +{ yyval.secAct = dclPrejitGrant; } break; case 753: #line 1883 "asmparse.y" -{ yyval.secAct = dclNonCasDemand; } break; +{ yyval.secAct = dclPrejitDenied; } break; case 754: #line 1884 "asmparse.y" -{ yyval.secAct = dclNonCasLinkDemand; } break; +{ yyval.secAct = dclNonCasDemand; } break; case 755: #line 1885 "asmparse.y" -{ yyval.secAct = dclNonCasInheritance; } break; +{ yyval.secAct = dclNonCasLinkDemand; } break; case 756: -#line 1889 "asmparse.y" -{ PASM->ResetLineNumbers(); nCurrPC = PASM->m_CurPC; PENV->bExternSource = TRUE; PENV->bExternSourceAutoincrement = FALSE; } break; +#line 1886 "asmparse.y" +{ yyval.secAct = dclNonCasInheritance; } break; case 757: #line 1890 "asmparse.y" -{ PASM->ResetLineNumbers(); nCurrPC = PASM->m_CurPC; PENV->bExternSource = TRUE; PENV->bExternSourceAutoincrement = TRUE; } break; +{ PASM->ResetLineNumbers(); nCurrPC = PASM->m_CurPC; PENV->bExternSource = TRUE; PENV->bExternSourceAutoincrement = FALSE; } break; case 758: -#line 1893 "asmparse.y" +#line 1891 "asmparse.y" +{ PASM->ResetLineNumbers(); nCurrPC = PASM->m_CurPC; PENV->bExternSource = TRUE; PENV->bExternSourceAutoincrement = TRUE; } break; +case 759: +#line 1894 "asmparse.y" { PENV->nExtLine = PENV->nExtLineEnd = yypvt[-1].int32; PENV->nExtCol = 0; PENV->nExtColEnd = static_cast(-1); PASM->SetSourceFileName(yypvt[-0].string);} break; -case 759: -#line 1896 "asmparse.y" +case 760: +#line 1897 "asmparse.y" { PENV->nExtLine = PENV->nExtLineEnd = yypvt[-0].int32; PENV->nExtCol = 0; PENV->nExtColEnd = static_cast(-1); } break; -case 760: -#line 1898 "asmparse.y" +case 761: +#line 1899 "asmparse.y" { PENV->nExtLine = PENV->nExtLineEnd = yypvt[-3].int32; PENV->nExtCol=yypvt[-1].int32; PENV->nExtColEnd = static_cast(-1); PASM->SetSourceFileName(yypvt[-0].string);} break; -case 761: -#line 1901 "asmparse.y" +case 762: +#line 1902 "asmparse.y" { PENV->nExtLine = PENV->nExtLineEnd = yypvt[-2].int32; PENV->nExtCol=yypvt[-0].int32; PENV->nExtColEnd = static_cast(-1);} break; -case 762: -#line 1904 "asmparse.y" +case 763: +#line 1905 "asmparse.y" { PENV->nExtLine = PENV->nExtLineEnd = yypvt[-5].int32; PENV->nExtCol=yypvt[-3].int32; PENV->nExtColEnd = yypvt[-1].int32; PASM->SetSourceFileName(yypvt[-0].string);} break; -case 763: -#line 1908 "asmparse.y" +case 764: +#line 1909 "asmparse.y" { PENV->nExtLine = PENV->nExtLineEnd = yypvt[-4].int32; PENV->nExtCol=yypvt[-2].int32; PENV->nExtColEnd = yypvt[-0].int32; } break; -case 764: -#line 1911 "asmparse.y" +case 765: +#line 1912 "asmparse.y" { PENV->nExtLine = yypvt[-5].int32; PENV->nExtLineEnd = yypvt[-3].int32; PENV->nExtCol=yypvt[-1].int32; PENV->nExtColEnd = static_cast(-1); PASM->SetSourceFileName(yypvt[-0].string);} break; -case 765: -#line 1915 "asmparse.y" +case 766: +#line 1916 "asmparse.y" { PENV->nExtLine = yypvt[-4].int32; PENV->nExtLineEnd = yypvt[-2].int32; PENV->nExtCol=yypvt[-0].int32; PENV->nExtColEnd = static_cast(-1); } break; -case 766: -#line 1918 "asmparse.y" +case 767: +#line 1919 "asmparse.y" { PENV->nExtLine = yypvt[-7].int32; PENV->nExtLineEnd = yypvt[-5].int32; PENV->nExtCol=yypvt[-3].int32; PENV->nExtColEnd = yypvt[-1].int32; PASM->SetSourceFileName(yypvt[-0].string);} break; -case 767: -#line 1922 "asmparse.y" +case 768: +#line 1923 "asmparse.y" { PENV->nExtLine = yypvt[-6].int32; PENV->nExtLineEnd = yypvt[-4].int32; PENV->nExtCol=yypvt[-2].int32; PENV->nExtColEnd = yypvt[-0].int32; } break; -case 768: -#line 1924 "asmparse.y" +case 769: +#line 1925 "asmparse.y" { PENV->nExtLine = PENV->nExtLineEnd = yypvt[-1].int32 - 1; PENV->nExtCol = 0; PENV->nExtColEnd = static_cast(-1); PASM->SetSourceFileName(yypvt[-0].binstr);} break; -case 769: -#line 1931 "asmparse.y" -{ PASMM->AddFile(yypvt[-5].string, yypvt[-6].fileAttr|yypvt[-4].fileAttr|yypvt[-0].fileAttr, yypvt[-2].binstr); } break; case 770: #line 1932 "asmparse.y" -{ PASMM->AddFile(yypvt[-1].string, yypvt[-2].fileAttr|yypvt[-0].fileAttr, NULL); } break; +{ PASMM->AddFile(yypvt[-5].string, yypvt[-6].fileAttr|yypvt[-4].fileAttr|yypvt[-0].fileAttr, yypvt[-2].binstr); } break; case 771: -#line 1935 "asmparse.y" -{ yyval.fileAttr = (CorFileFlags) 0; } break; +#line 1933 "asmparse.y" +{ PASMM->AddFile(yypvt[-1].string, yypvt[-2].fileAttr|yypvt[-0].fileAttr, NULL); } break; case 772: #line 1936 "asmparse.y" -{ yyval.fileAttr = (CorFileFlags) (yypvt[-1].fileAttr | ffContainsNoMetaData); } break; -case 773: -#line 1939 "asmparse.y" { yyval.fileAttr = (CorFileFlags) 0; } break; +case 773: +#line 1937 "asmparse.y" +{ yyval.fileAttr = (CorFileFlags) (yypvt[-1].fileAttr | ffContainsNoMetaData); } break; case 774: #line 1940 "asmparse.y" -{ yyval.fileAttr = (CorFileFlags) 0x80000000; } break; +{ yyval.fileAttr = (CorFileFlags) 0; } break; case 775: -#line 1943 "asmparse.y" -{ bParsingByteArray = TRUE; } break; +#line 1941 "asmparse.y" +{ yyval.fileAttr = (CorFileFlags) 0x80000000; } break; case 776: -#line 1946 "asmparse.y" -{ PASMM->StartAssembly(yypvt[-0].string, NULL, (DWORD)yypvt[-1].asmAttr, FALSE); } break; +#line 1944 "asmparse.y" +{ bParsingByteArray = TRUE; } break; case 777: -#line 1949 "asmparse.y" -{ yyval.asmAttr = (CorAssemblyFlags) 0; } break; +#line 1947 "asmparse.y" +{ PASMM->StartAssembly(yypvt[-0].string, NULL, (DWORD)yypvt[-1].asmAttr, FALSE); } break; case 778: #line 1950 "asmparse.y" -{ yyval.asmAttr = (CorAssemblyFlags) (yypvt[-1].asmAttr | afRetargetable); } break; +{ yyval.asmAttr = (CorAssemblyFlags) 0; } break; case 779: #line 1951 "asmparse.y" -{ yyval.asmAttr = (CorAssemblyFlags) (yypvt[-1].asmAttr | afContentType_WindowsRuntime); } break; +{ yyval.asmAttr = (CorAssemblyFlags) (yypvt[-1].asmAttr | afRetargetable); } break; case 780: #line 1952 "asmparse.y" -{ yyval.asmAttr = (CorAssemblyFlags) (yypvt[-1].asmAttr | afPA_NoPlatform); } break; +{ yyval.asmAttr = (CorAssemblyFlags) (yypvt[-1].asmAttr | afContentType_WindowsRuntime); } break; case 781: #line 1953 "asmparse.y" -{ yyval.asmAttr = yypvt[-2].asmAttr; } break; +{ yyval.asmAttr = (CorAssemblyFlags) (yypvt[-1].asmAttr | afPA_NoPlatform); } break; case 782: #line 1954 "asmparse.y" -{ SET_PA(yyval.asmAttr,yypvt[-1].asmAttr,afPA_MSIL); } break; +{ yyval.asmAttr = yypvt[-2].asmAttr; } break; case 783: #line 1955 "asmparse.y" -{ SET_PA(yyval.asmAttr,yypvt[-1].asmAttr,afPA_x86); } break; +{ SET_PA(yyval.asmAttr,yypvt[-1].asmAttr,afPA_MSIL); } break; case 784: #line 1956 "asmparse.y" -{ SET_PA(yyval.asmAttr,yypvt[-1].asmAttr,afPA_AMD64); } break; +{ SET_PA(yyval.asmAttr,yypvt[-1].asmAttr,afPA_x86); } break; case 785: #line 1957 "asmparse.y" -{ SET_PA(yyval.asmAttr,yypvt[-1].asmAttr,afPA_ARM); } break; +{ SET_PA(yyval.asmAttr,yypvt[-1].asmAttr,afPA_AMD64); } break; case 786: #line 1958 "asmparse.y" +{ SET_PA(yyval.asmAttr,yypvt[-1].asmAttr,afPA_ARM); } break; +case 787: +#line 1959 "asmparse.y" { SET_PA(yyval.asmAttr,yypvt[-1].asmAttr,afPA_ARM64); } break; -case 789: -#line 1965 "asmparse.y" +case 790: +#line 1966 "asmparse.y" { PASMM->SetAssemblyHashAlg(yypvt[-0].int32); } break; -case 792: -#line 1970 "asmparse.y" -{ yyval.int32 = yypvt[-0].int32; } break; case 793: #line 1971 "asmparse.y" -{ yyval.int32 = 0xFFFF; } break; +{ yyval.int32 = yypvt[-0].int32; } break; case 794: -#line 1974 "asmparse.y" -{ PASMM->SetAssemblyPublicKey(yypvt[-1].binstr); } break; +#line 1972 "asmparse.y" +{ yyval.int32 = 0xFFFF; } break; case 795: -#line 1976 "asmparse.y" -{ PASMM->SetAssemblyVer((USHORT)yypvt[-6].int32, (USHORT)yypvt[-4].int32, (USHORT)yypvt[-2].int32, (USHORT)yypvt[-0].int32); } break; +#line 1975 "asmparse.y" +{ PASMM->SetAssemblyPublicKey(yypvt[-1].binstr); } break; case 796: #line 1977 "asmparse.y" -{ yypvt[-0].binstr->appendInt8(0); PASMM->SetAssemblyLocale(yypvt[-0].binstr,TRUE); } break; +{ PASMM->SetAssemblyVer((USHORT)yypvt[-6].int32, (USHORT)yypvt[-4].int32, (USHORT)yypvt[-2].int32, (USHORT)yypvt[-0].int32); } break; case 797: #line 1978 "asmparse.y" +{ yypvt[-0].binstr->appendInt8(0); PASMM->SetAssemblyLocale(yypvt[-0].binstr,TRUE); } break; +case 798: +#line 1979 "asmparse.y" { PASMM->SetAssemblyLocale(yypvt[-1].binstr,FALSE); } break; -case 800: -#line 1983 "asmparse.y" -{ bParsingByteArray = TRUE; } break; case 801: -#line 1986 "asmparse.y" +#line 1984 "asmparse.y" { bParsingByteArray = TRUE; } break; case 802: -#line 1989 "asmparse.y" +#line 1987 "asmparse.y" { bParsingByteArray = TRUE; } break; case 803: -#line 1993 "asmparse.y" -{ PASMM->StartAssembly(yypvt[-0].string, NULL, yypvt[-1].asmAttr, TRUE); } break; +#line 1990 "asmparse.y" +{ bParsingByteArray = TRUE; } break; case 804: -#line 1995 "asmparse.y" +#line 1994 "asmparse.y" +{ PASMM->StartAssembly(yypvt[-0].string, NULL, yypvt[-1].asmAttr, TRUE); } break; +case 805: +#line 1996 "asmparse.y" { PASMM->StartAssembly(yypvt[-2].string, yypvt[-0].string, yypvt[-3].asmAttr, TRUE); } break; -case 807: -#line 2002 "asmparse.y" +case 808: +#line 2003 "asmparse.y" { PASMM->SetAssemblyHashBlob(yypvt[-1].binstr); } break; -case 809: -#line 2004 "asmparse.y" -{ PASMM->SetAssemblyPublicKeyToken(yypvt[-1].binstr); } break; case 810: #line 2005 "asmparse.y" -{ PASMM->SetAssemblyAutodetect(); } break; +{ PASMM->SetAssemblyPublicKeyToken(yypvt[-1].binstr); } break; case 811: -#line 2008 "asmparse.y" -{ PASMM->StartComType(yypvt[-0].string, yypvt[-1].exptAttr);} break; +#line 2006 "asmparse.y" +{ PASMM->SetAssemblyAutodetect(); } break; case 812: -#line 2011 "asmparse.y" -{ PASMM->StartComType(yypvt[-0].string, yypvt[-1].exptAttr); } break; +#line 2009 "asmparse.y" +{ PASMM->StartComType(yypvt[-0].string, yypvt[-1].exptAttr);} break; case 813: -#line 2014 "asmparse.y" -{ yyval.exptAttr = (CorTypeAttr) 0; } break; +#line 2012 "asmparse.y" +{ PASMM->StartComType(yypvt[-0].string, yypvt[-1].exptAttr); } break; case 814: #line 2015 "asmparse.y" -{ yyval.exptAttr = (CorTypeAttr) (yypvt[-1].exptAttr | tdNotPublic); } break; +{ yyval.exptAttr = (CorTypeAttr) 0; } break; case 815: #line 2016 "asmparse.y" -{ yyval.exptAttr = (CorTypeAttr) (yypvt[-1].exptAttr | tdPublic); } break; +{ yyval.exptAttr = (CorTypeAttr) (yypvt[-1].exptAttr | tdNotPublic); } break; case 816: #line 2017 "asmparse.y" -{ yyval.exptAttr = (CorTypeAttr) (yypvt[-1].exptAttr | tdForwarder); } break; +{ yyval.exptAttr = (CorTypeAttr) (yypvt[-1].exptAttr | tdPublic); } break; case 817: #line 2018 "asmparse.y" -{ yyval.exptAttr = (CorTypeAttr) (yypvt[-2].exptAttr | tdNestedPublic); } break; +{ yyval.exptAttr = (CorTypeAttr) (yypvt[-1].exptAttr | tdForwarder); } break; case 818: #line 2019 "asmparse.y" -{ yyval.exptAttr = (CorTypeAttr) (yypvt[-2].exptAttr | tdNestedPrivate); } break; +{ yyval.exptAttr = (CorTypeAttr) (yypvt[-2].exptAttr | tdNestedPublic); } break; case 819: #line 2020 "asmparse.y" -{ yyval.exptAttr = (CorTypeAttr) (yypvt[-2].exptAttr | tdNestedFamily); } break; +{ yyval.exptAttr = (CorTypeAttr) (yypvt[-2].exptAttr | tdNestedPrivate); } break; case 820: #line 2021 "asmparse.y" -{ yyval.exptAttr = (CorTypeAttr) (yypvt[-2].exptAttr | tdNestedAssembly); } break; +{ yyval.exptAttr = (CorTypeAttr) (yypvt[-2].exptAttr | tdNestedFamily); } break; case 821: #line 2022 "asmparse.y" -{ yyval.exptAttr = (CorTypeAttr) (yypvt[-2].exptAttr | tdNestedFamANDAssem); } break; +{ yyval.exptAttr = (CorTypeAttr) (yypvt[-2].exptAttr | tdNestedAssembly); } break; case 822: #line 2023 "asmparse.y" +{ yyval.exptAttr = (CorTypeAttr) (yypvt[-2].exptAttr | tdNestedFamANDAssem); } break; +case 823: +#line 2024 "asmparse.y" { yyval.exptAttr = (CorTypeAttr) (yypvt[-2].exptAttr | tdNestedFamORAssem); } break; -case 825: -#line 2030 "asmparse.y" -{ PASMM->SetComTypeFile(yypvt[-0].string); } break; case 826: #line 2031 "asmparse.y" -{ PASMM->SetComTypeComType(yypvt[-0].string); } break; +{ PASMM->SetComTypeFile(yypvt[-0].string); } break; case 827: #line 2032 "asmparse.y" -{ PASMM->SetComTypeAsmRef(yypvt[-0].string); } break; +{ PASMM->SetComTypeComType(yypvt[-0].string); } break; case 828: #line 2033 "asmparse.y" +{ PASMM->SetComTypeAsmRef(yypvt[-0].string); } break; +case 829: +#line 2034 "asmparse.y" { if(!PASMM->SetComTypeImplementationTok(yypvt[-1].int32)) PASM->report->error("Invalid implementation of exported type\n"); } break; -case 829: -#line 2035 "asmparse.y" +case 830: +#line 2036 "asmparse.y" { if(!PASMM->SetComTypeClassTok(yypvt[-0].int32)) PASM->report->error("Invalid TypeDefID of exported type\n"); } break; -case 832: -#line 2041 "asmparse.y" -{ PASMM->StartManifestRes(yypvt[-0].string, yypvt[-0].string, yypvt[-1].manresAttr); } break; case 833: -#line 2043 "asmparse.y" -{ PASMM->StartManifestRes(yypvt[-2].string, yypvt[-0].string, yypvt[-3].manresAttr); } break; +#line 2042 "asmparse.y" +{ PASMM->StartManifestRes(yypvt[-0].string, yypvt[-0].string, yypvt[-1].manresAttr); } break; case 834: -#line 2046 "asmparse.y" -{ yyval.manresAttr = (CorManifestResourceFlags) 0; } break; +#line 2044 "asmparse.y" +{ PASMM->StartManifestRes(yypvt[-2].string, yypvt[-0].string, yypvt[-3].manresAttr); } break; case 835: #line 2047 "asmparse.y" -{ yyval.manresAttr = (CorManifestResourceFlags) (yypvt[-1].manresAttr | mrPublic); } break; +{ yyval.manresAttr = (CorManifestResourceFlags) 0; } break; case 836: #line 2048 "asmparse.y" +{ yyval.manresAttr = (CorManifestResourceFlags) (yypvt[-1].manresAttr | mrPublic); } break; +case 837: +#line 2049 "asmparse.y" { yyval.manresAttr = (CorManifestResourceFlags) (yypvt[-1].manresAttr | mrPrivate); } break; -case 839: -#line 2055 "asmparse.y" -{ PASMM->SetManifestResFile(yypvt[-2].string, (ULONG)yypvt[-0].int32); } break; case 840: #line 2056 "asmparse.y" +{ PASMM->SetManifestResFile(yypvt[-2].string, (ULONG)yypvt[-0].int32); } break; +case 841: +#line 2057 "asmparse.y" { PASMM->SetManifestResAsmRef(yypvt[-0].string); } break;/* End of actions */ -#line 329 "D:\\CodegenMirror\\src\\tools\\devdiv\\x86\\yypars.c" +#line 329 "F:\\NetFXDev1\\src\\tools\\devdiv\\amd64\\yypars.c" } } goto yystack; /* stack new state and value */ diff --git a/src/coreclr/src/ilasm/prebuilt/asmparse.grammar b/src/coreclr/src/ilasm/prebuilt/asmparse.grammar new file mode 100644 index 000000000000..82dac9517f7d --- /dev/null +++ b/src/coreclr/src/ilasm/prebuilt/asmparse.grammar @@ -0,0 +1,1280 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +Lexical tokens + ID - C style alphaNumeric identifier (e.g. Hello_There2) + DOTTEDNAME - Sequence of dot-separated IDs (e.g. System.Object) + QSTRING - C style quoted string (e.g. "hi\n") + SQSTRING - C style singlely quoted string(e.g. 'hi') + INT32 - C style 32 bit integer (e.g. 235, 03423, 0x34FFF) + INT64 - C style 64 bit integer (e.g. -2353453636235234, 0x34FFFFFFFFFF) + FLOAT64 - C style floating point number (e.g. -0.2323, 354.3423, 3435.34E-5) + INSTR_* - IL instructions of a particular class (see opcode.def). + HEXBYTE - 1- or 2-digit hexadecimal number (e.g., A2, F0). +Auxiliary lexical tokens + TYPEDEF_T - Aliased class (TypeDef or TypeRef). + TYPEDEF_M - Aliased method. + TYPEDEF_F - Aliased field. + TYPEDEF_TS - Aliased type specification (TypeSpec). + TYPEDEF_MR - Aliased field/method reference (MemberRef). + TYPEDEF_CA - Aliased Custom Attribute. +---------------------------------------------------------------------------------- +START : decls + ; + +decls : /* EMPTY */ + | decls decl + ; +/* Module-level declarations */ +decl : classHead '{' classDecls '}' + | nameSpaceHead '{' decls '}' + | methodHead methodDecls '}' + | fieldDecl + | dataDecl + | vtableDecl + | vtfixupDecl + | extSourceSpec + | fileDecl + | assemblyHead '{' assemblyDecls '}' + | assemblyRefHead '{' assemblyRefDecls '}' + | exptypeHead '{' exptypeDecls '}' + | manifestResHead '{' manifestResDecls '}' + | moduleHead + | secDecl + | customAttrDecl + | '.subsystem' int32 + | '.corflags' int32 + | '.file' 'alignment' int32 + | '.imagebase' int64 + | '.stackreserve' int64 + | languageDecl + | typedefDecl + | compControl + | '.typelist' '{' classNameSeq '}' + | '.mscorlib' + ; + +classNameSeq : /* EMPTY */ + | className classNameSeq + ; + +compQstring : QSTRING + | compQstring '+' QSTRING + ; + +languageDecl : '.language' SQSTRING + | '.language' SQSTRING ',' SQSTRING + | '.language' SQSTRING ',' SQSTRING ',' SQSTRING + ; +/* Basic tokens */ +id : ID + | SQSTRING + ; + +dottedName : id + | DOTTEDNAME + | dottedName '.' dottedName + ; + +int32 : INT32 + ; + +int64 : INT64 + | INT32 + ; + +float64 : FLOAT64 + | 'float32' '(' int32 ')' + | 'float64' '(' int64 ')' + ; + +/* Aliasing of types, type specs, methods, fields and custom attributes */ +typedefDecl : '.typedef' type 'as' dottedName + | '.typedef' className 'as' dottedName + | '.typedef' memberRef 'as' dottedName + | '.typedef' customDescr 'as' dottedName + | '.typedef' customDescrWithOwner 'as' dottedName + ; + +/* Compilation control directives are processed within yylex(), + displayed here just for grammar completeness */ +compControl : P_DEFINE dottedName + | P_DEFINE dottedName compQstring + | P_UNDEF dottedName + | P_IFDEF dottedName + | P_IFNDEF dottedName + | P_ELSE + | P_ENDIF + | P_INCLUDE QSTRING + | ';' + ; + +/* Custom attribute declarations */ +customDescr : '.custom' customType + | '.custom' customType '=' compQstring + | '.custom' customType '=' '{' customBlobDescr '}' + | customHead bytes ')' + ; + +customDescrWithOwner : '.custom' '(' ownerType ')' customType + | '.custom' '(' ownerType ')' customType '=' compQstring + | '.custom' '(' ownerType ')' customType '=' '{' customBlobDescr '}' + | customHeadWithOwner bytes ')' + ; + +customHead : '.custom' customType '=' '(' + ; + +customHeadWithOwner : '.custom' '(' ownerType ')' customType '=' '(' + ; + +customType : methodRef + ; + +ownerType : typeSpec + | memberRef + ; + +/* Verbal description of custom attribute initialization blob */ +customBlobDescr : customBlobArgs customBlobNVPairs + ; + +customBlobArgs : /* EMPTY */ + | customBlobArgs serInit + | customBlobArgs compControl + ; + +customBlobNVPairs : /* EMPTY */ + | customBlobNVPairs fieldOrProp serializType dottedName '=' serInit + | customBlobNVPairs compControl + ; + +fieldOrProp : 'field' + | 'property' + ; + +customAttrDecl : customDescr + | customDescrWithOwner + | TYPEDEF_CA + ; + +serializType : simpleType + | 'type' + | 'object' + | 'enum' 'class' SQSTRING + | 'enum' className + | serializType '[' ']' + ; + + +/* Module declaration */ +moduleHead : '.module' + | '.module' dottedName + | '.module' 'extern' dottedName + ; + +/* VTable Fixup table declaration */ +vtfixupDecl : '.vtfixup' '[' int32 ']' vtfixupAttr 'at' id + ; + +vtfixupAttr : /* EMPTY */ + | vtfixupAttr 'int32' + | vtfixupAttr 'int64' + | vtfixupAttr 'fromunmanaged' + | vtfixupAttr 'callmostderived' + | vtfixupAttr 'retainappdomain' + ; + +vtableDecl : vtableHead bytes ')' /* deprecated */ + ; + +vtableHead : '.vtable' '=' '(' /* deprecated */ + ; + +/* Namespace and class declaration */ +nameSpaceHead : '.namespace' dottedName + ; + +_class : '.class' + ; + +classHeadBegin : _class classAttr dottedName typarsClause + ; +classHead : classHeadBegin extendsClause implClause + ; + +classAttr : /* EMPTY */ + | classAttr 'public' + | classAttr 'private' + | classAttr 'value' + | classAttr 'enum' + | classAttr 'interface' + | classAttr 'sealed' + | classAttr 'abstract' + | classAttr 'auto' + | classAttr 'sequential' + | classAttr 'explicit' + | classAttr 'ansi' + | classAttr 'unicode' + | classAttr 'autochar' + | classAttr 'import' + | classAttr 'serializable' + | classAttr 'windowsruntime' + | classAttr 'nested' 'public' + | classAttr 'nested' 'private' + | classAttr 'nested' 'family' + | classAttr 'nested' 'assembly' + | classAttr 'nested' 'famandassem' + | classAttr 'nested' 'famorassem' + | classAttr 'beforefieldinit' + | classAttr 'specialname' + | classAttr 'rtspecialname' + | classAttr 'flags' '(' int32 ')' + ; + +extendsClause : /* EMPTY */ + | 'extends' typeSpec + ; + +implClause : /* EMPTY */ + | 'implements' implList + ; + +classDecls : /* EMPTY */ + | classDecls classDecl + ; + +implList : implList ',' typeSpec + | typeSpec + ; + +/* Generic type parameters declaration */ +typeList : /* EMPTY */ + | typeListNotEmpty + ; + +typeListNotEmpty : typeSpec + | typeListNotEmpty ',' typeSpec + ; + +typarsClause : /* EMPTY */ + | '<' typars '>' + ; + +typarAttrib : '+' + | '-' + | 'class' + | 'valuetype' + | '.ctor' + ; + +typarAttribs : /* EMPTY */ + | typarAttrib typarAttribs + ; + +typars : typarAttribs tyBound dottedName typarsRest + | typarAttribs dottedName typarsRest + ; + +typarsRest : /* EMPTY */ + | ',' typars + ; + +tyBound : '(' typeList ')' + ; + +genArity : /* EMPTY */ + | genArityNotEmpty + ; + +genArityNotEmpty : '<' '[' int32 ']' '>' + ; + +/* Class body declarations */ +classDecl : methodHead methodDecls '}' + | classHead '{' classDecls '}' + | eventHead '{' eventDecls '}' + | propHead '{' propDecls '}' + | fieldDecl + | dataDecl + | secDecl + | extSourceSpec + | customAttrDecl + | '.size' int32 + | '.pack' int32 + | exportHead '{' exptypeDecls '}' + | '.override' typeSpec '::' methodName 'with' callConv type typeSpec '::' methodName '(' sigArgs0 ')' + | '.override' 'method' callConv type typeSpec '::' methodName genArity '(' sigArgs0 ')' 'with' 'method' callConv type typeSpec '::' methodName genArity '(' sigArgs0 ')' + | languageDecl + | compControl + | '.param' 'type' '[' int32 ']' + | '.param' 'type' dottedName + | '.param' 'constraint' '[' int32 ']' ',' typeSpec + | '.param' 'constraint' dottedName ',' typeSpec + | '.interfaceimpl' 'type' typeSpec customDescr + ; + +/* Field declaration */ +fieldDecl : '.field' repeatOpt fieldAttr type dottedName atOpt initOpt + ; + +fieldAttr : /* EMPTY */ + | fieldAttr 'static' + | fieldAttr 'public' + | fieldAttr 'private' + | fieldAttr 'family' + | fieldAttr 'initonly' + | fieldAttr 'rtspecialname' /**/ + | fieldAttr 'specialname' + /* commented out because PInvoke for fields is not supported by EE + | fieldAttr 'pinvokeimpl' '(' compQstring 'as' compQstring pinvAttr ')' + | fieldAttr 'pinvokeimpl' '(' compQstring pinvAttr ')' + | fieldAttr 'pinvokeimpl' '(' pinvAttr ')' + */ + | fieldAttr 'marshal' '(' marshalBlob ')' + | fieldAttr 'assembly' + | fieldAttr 'famandassem' + | fieldAttr 'famorassem' + | fieldAttr 'privatescope' + | fieldAttr 'literal' + | fieldAttr 'notserialized' + | fieldAttr 'flags' '(' int32 ')' + ; + +atOpt : /* EMPTY */ + | 'at' id + ; + +initOpt : /* EMPTY */ + | '=' fieldInit + ; + +repeatOpt : /* EMPTY */ + | '[' int32 ']' + ; + +/* Method referencing */ +methodRef : callConv type typeSpec '::' methodName tyArgs0 '(' sigArgs0 ')' + | callConv type typeSpec '::' methodName genArityNotEmpty '(' sigArgs0 ')' + | callConv type methodName tyArgs0 '(' sigArgs0 ')' + | callConv type methodName genArityNotEmpty '(' sigArgs0 ')' + | mdtoken + | TYPEDEF_M + | TYPEDEF_MR + ; + +callConv : 'instance' callConv + | 'explicit' callConv + | callKind + | 'callconv' '(' int32 ')' + ; + +callKind : /* EMPTY */ + | 'default' + | 'vararg' + | 'unmanaged' 'cdecl' + | 'unmanaged' 'stdcall' + | 'unmanaged' 'thiscall' + | 'unmanaged' 'fastcall' + | 'unmanaged' + ; + +mdtoken : 'mdtoken' '(' int32 ')' + ; + +memberRef : methodSpec methodRef + | 'field' type typeSpec '::' dottedName + | 'field' type dottedName + | 'field' TYPEDEF_F + | 'field' TYPEDEF_MR + | mdtoken + ; + +/* Event declaration */ +eventHead : '.event' eventAttr typeSpec dottedName + | '.event' eventAttr dottedName + ; + + +eventAttr : /* EMPTY */ + | eventAttr 'rtspecialname' /**/ + | eventAttr 'specialname' + ; + +eventDecls : /* EMPTY */ + | eventDecls eventDecl + ; + +eventDecl : '.addon' methodRef + | '.removeon' methodRef + | '.fire' methodRef + | '.other' methodRef + | extSourceSpec + | customAttrDecl + | languageDecl + | compControl + ; + +/* Property declaration */ +propHead : '.property' propAttr callConv type dottedName '(' sigArgs0 ')' initOpt + ; + +propAttr : /* EMPTY */ + | propAttr 'rtspecialname' /**/ + | propAttr 'specialname' + ; + +propDecls : /* EMPTY */ + | propDecls propDecl + ; + + +propDecl : '.set' methodRef + | '.get' methodRef + | '.other' methodRef + | customAttrDecl + | extSourceSpec + | languageDecl + | compControl + ; + +/* Method declaration */ +methodHeadPart1 : '.method' + ; + +marshalClause : /* EMPTY */ + | 'marshal' '(' marshalBlob ')' + ; + +marshalBlob : nativeType + | marshalBlobHead hexbytes '}' + ; + +marshalBlobHead : '{' + ; + +methodHead : methodHeadPart1 methAttr callConv paramAttr type marshalClause methodName typarsClause'(' sigArgs0 ')' implAttr '{' + ; + +methAttr : /* EMPTY */ + | methAttr 'static' + | methAttr 'public' + | methAttr 'private' + | methAttr 'family' + | methAttr 'final' + | methAttr 'specialname' + | methAttr 'virtual' + | methAttr 'strict' + | methAttr 'abstract' + | methAttr 'assembly' + | methAttr 'famandassem' + | methAttr 'famorassem' + | methAttr 'privatescope' + | methAttr 'hidebysig' + | methAttr 'newslot' + | methAttr 'rtspecialname' /**/ + | methAttr 'unmanagedexp' + | methAttr 'reqsecobj' + | methAttr 'flags' '(' int32 ')' + | methAttr 'pinvokeimpl' '(' compQstring 'as' compQstring pinvAttr ')' + | methAttr 'pinvokeimpl' '(' compQstring pinvAttr ')' + | methAttr 'pinvokeimpl' '(' pinvAttr ')' + ; + +pinvAttr : /* EMPTY */ + | pinvAttr 'nomangle' + | pinvAttr 'ansi' + | pinvAttr 'unicode' + | pinvAttr 'autochar' + | pinvAttr 'lasterr' + | pinvAttr 'winapi' + | pinvAttr 'cdecl' + | pinvAttr 'stdcall' + | pinvAttr 'thiscall' + | pinvAttr 'fastcall' + | pinvAttr 'bestfit' ':' 'on' + | pinvAttr 'bestfit' ':' 'off' + | pinvAttr 'charmaperror' ':' 'on' + | pinvAttr 'charmaperror' ':' 'off' + | pinvAttr 'flags' '(' int32 ')' + ; + +methodName : '.ctor' + | '.cctor' + | dottedName + ; + +paramAttr : /* EMPTY */ + | paramAttr '[' 'in' ']' + | paramAttr '[' 'out' ']' + | paramAttr '[' 'opt' ']' + | paramAttr '[' int32 ']' + ; + +implAttr : /* EMPTY */ + | implAttr 'native' + | implAttr 'cil' + | implAttr 'optil' + | implAttr 'managed' + | implAttr 'unmanaged' + | implAttr 'forwardref' + | implAttr 'preservesig' + | implAttr 'runtime' + | implAttr 'internalcall' + | implAttr 'synchronized' + | implAttr 'noinlining' + | implAttr 'aggressiveinlining' + | implAttr 'nooptimization' + | implAttr 'aggressiveoptimization' + | implAttr 'flags' '(' int32 ')' + ; + +localsHead : '.locals' + ; + +methodDecls : /* EMPTY */ + | methodDecls methodDecl + ; + +methodDecl : '.emitbyte' int32 + | sehBlock + | '.maxstack' int32 + | localsHead '(' sigArgs0 ')' + | localsHead 'init' '(' sigArgs0 ')' + | '.entrypoint' + | '.zeroinit' + | dataDecl + | instr + | id ':' + | secDecl + | extSourceSpec + | languageDecl + | customAttrDecl + | compControl + | '.export' '[' int32 ']' + | '.export' '[' int32 ']' 'as' id + | '.vtentry' int32 ':' int32 + | '.override' typeSpec '::' methodName + + | '.override' 'method' callConv type typeSpec '::' methodName genArity '(' sigArgs0 ')' + | scopeBlock + | '.param' 'type' '[' int32 ']' + | '.param' 'type' dottedName + | '.param' 'constraint' '[' int32 ']' ',' typeSpec + | '.param' 'constraint' dottedName ',' typeSpec + + | '.param' '[' int32 ']' initOpt + ; + +scopeBlock : scopeOpen methodDecls '}' + ; + +scopeOpen : '{' + ; + +/* Structured exception handling directives */ +sehBlock : tryBlock sehClauses + ; + +sehClauses : sehClause sehClauses + | sehClause + ; + +tryBlock : tryHead scopeBlock + | tryHead id 'to' id + | tryHead int32 'to' int32 + ; + +tryHead : '.try' + ; + + +sehClause : catchClause handlerBlock + | filterClause handlerBlock + | finallyClause handlerBlock + | faultClause handlerBlock + ; + + +filterClause : filterHead scopeBlock + | filterHead id + | filterHead int32 + ; + +filterHead : 'filter' + ; + +catchClause : 'catch' typeSpec + ; + +finallyClause : 'finally' + ; + +faultClause : 'fault' + ; + +handlerBlock : scopeBlock + | 'handler' id 'to' id + | 'handler' int32 'to' int32 + ; + +/* Data declaration */ +dataDecl : ddHead ddBody + ; + +ddHead : '.data' tls id '=' + | '.data' tls + ; + +tls : /* EMPTY */ + | 'tls' + | 'cil' + ; + +ddBody : '{' ddItemList '}' + | ddItem + ; + +ddItemList : ddItem ',' ddItemList + | ddItem + ; + +ddItemCount : /* EMPTY */ + | '[' int32 ']' + ; + +ddItem : 'char' '*' '(' compQstring ')' + | '&' '(' id ')' + | bytearrayhead bytes ')' + | 'float32' '(' float64 ')' ddItemCount + | 'float64' '(' float64 ')' ddItemCount + | 'int64' '(' int64 ')' ddItemCount + | 'int32' '(' int32 ')' ddItemCount + | 'int16' '(' int32 ')' ddItemCount + | 'int8' '(' int32 ')' ddItemCount + | 'float32' ddItemCount + | 'float64' ddItemCount + | 'int64' ddItemCount + | 'int32' ddItemCount + | 'int16' ddItemCount + | 'int8' ddItemCount + ; + +/* Default values declaration for fields, parameters and verbal form of CA blob description */ +fieldSerInit : 'float32' '(' float64 ')' + | 'float64' '(' float64 ')' + | 'float32' '(' int32 ')' + | 'float64' '(' int64 ')' + | 'int64' '(' int64 ')' + | 'int32' '(' int32 ')' + | 'int16' '(' int32 ')' + | 'int8' '(' int32 ')' + | 'unsigned' 'int64' '(' int64 ')' + | 'unsigned' 'int32' '(' int32 ')' + | 'unsigned' 'int16' '(' int32 ')' + | 'unsigned' 'int8' '(' int32 ')' + | 'uint64' '(' int64 ')' + | 'uint32' '(' int32 ')' + | 'uint16' '(' int32 ')' + | 'uint8' '(' int32 ')' + | 'char' '(' int32 ')' + | 'bool' '(' truefalse ')' + | bytearrayhead bytes ')' + ; + +bytearrayhead : 'bytearray' '(' + ; + +bytes : /* EMPTY */ + | hexbytes + ; + +hexbytes : HEXBYTE + | hexbytes HEXBYTE + ; + +/* Field/parameter initialization */ +fieldInit : fieldSerInit + | compQstring + | 'nullref' + ; + +/* Values for verbal form of CA blob description */ +serInit : fieldSerInit + | 'string' '(' 'nullref' ')' + | 'string' '(' SQSTRING ')' + | 'type' '(' 'class' SQSTRING ')' + | 'type' '(' className ')' + | 'type' '(' 'nullref' ')' + | 'object' '(' serInit ')' + | 'float32' '[' int32 ']' '(' f32seq ')' + | 'float64' '[' int32 ']' '(' f64seq ')' + | 'int64' '[' int32 ']' '(' i64seq ')' + | 'int32' '[' int32 ']' '(' i32seq ')' + | 'int16' '[' int32 ']' '(' i16seq ')' + | 'int8' '[' int32 ']' '(' i8seq ')' + | 'uint64' '[' int32 ']' '(' i64seq ')' + | 'uint32' '[' int32 ']' '(' i32seq ')' + | 'uint16' '[' int32 ']' '(' i16seq ')' + | 'uint8' '[' int32 ']' '(' i8seq ')' + | 'unsigned' 'int64' '[' int32 ']' '(' i64seq ')' + | 'unsigned' 'int32' '[' int32 ']' '(' i32seq ')' + | 'unsigned' 'int16' '[' int32 ']' '(' i16seq ')' + | 'unsigned' 'int8' '[' int32 ']' '(' i8seq ')' + | 'char' '[' int32 ']' '(' i16seq ')' + | 'bool' '[' int32 ']' '(' boolSeq ')' + | 'string' '[' int32 ']' '(' sqstringSeq ')' + | 'type' '[' int32 ']' '(' classSeq ')' + | 'object' '[' int32 ']' '(' objSeq ')' + ; + + +f32seq : /* EMPTY */ + | f32seq float64 + | f32seq int32 + ; + +f64seq : /* EMPTY */ + | f64seq float64 + | f64seq int64 + ; + +i64seq : /* EMPTY */ + | i64seq int64 + ; + +i32seq : /* EMPTY */ + | i32seq int32 + ; + +i16seq : /* EMPTY */ + | i16seq int32 + ; + +i8seq : /* EMPTY */ + | i8seq int32 + ; + +boolSeq : /* EMPTY */ + | boolSeq truefalse + ; + +sqstringSeq : /* EMPTY */ + | sqstringSeq 'nullref' + | sqstringSeq SQSTRING + ; + +classSeq : /* EMPTY */ + | classSeq 'nullref' + | classSeq 'class' SQSTRING + | classSeq className + ; + +objSeq : /* EMPTY */ + | objSeq serInit + ; + +/* IL instructions and associated definitions */ +methodSpec : 'method' + ; + +instr_none : INSTR_NONE + ; + +instr_var : INSTR_VAR + ; + +instr_i : INSTR_I + ; + +instr_i8 : INSTR_I8 + ; + +instr_r : INSTR_R + ; + +instr_brtarget : INSTR_BRTARGET + ; + +instr_method : INSTR_METHOD + ; + +instr_field : INSTR_FIELD + ; + +instr_type : INSTR_TYPE + ; + +instr_string : INSTR_STRING + ; + +instr_sig : INSTR_SIG + ; + +instr_tok : INSTR_TOK + ; + +instr_switch : INSTR_SWITCH + ; + +instr_r_head : instr_r '(' + ; + + +instr : instr_none + | instr_var int32 + | instr_var id + | instr_i int32 + | instr_i8 int64 + | instr_r float64 + | instr_r int64 + | instr_r_head bytes ')' + | instr_brtarget int32 + | instr_brtarget id + | instr_method methodRef + | instr_field type typeSpec '::' dottedName + | instr_field type dottedName + | instr_field mdtoken + | instr_field TYPEDEF_F + | instr_field TYPEDEF_MR + | instr_type typeSpec + | instr_string compQstring + | instr_string 'ansi' '(' compQstring ')' + | instr_string bytearrayhead bytes ')' + | instr_sig callConv type '(' sigArgs0 ')' + | instr_tok ownerType /* ownerType ::= memberRef | typeSpec */ + | instr_switch '(' labels ')' + ; + +labels : /* empty */ + | id ',' labels + | int32 ',' labels + | id + | int32 + ; + +/* Signatures */ +tyArgs0 : /* EMPTY */ + | '<' tyArgs1 '>' + ; + +tyArgs1 : /* EMPTY */ + | tyArgs2 + ; + +tyArgs2 : type + | tyArgs2 ',' type + ; + + +sigArgs0 : /* EMPTY */ + | sigArgs1 + ; + +sigArgs1 : sigArg + | sigArgs1 ',' sigArg + ; + +sigArg : '...' + | paramAttr type marshalClause + | paramAttr type marshalClause id + ; + +/* Class referencing */ +className : '[' dottedName ']' slashedName + | '[' mdtoken ']' slashedName + | '[' '*' ']' slashedName + | '[' '.module' dottedName ']' slashedName + | slashedName + | mdtoken + | TYPEDEF_T + | '.this' + | '.base' + | '.nester' + ; + +slashedName : dottedName + | slashedName '/' dottedName + ; + +typeSpec : className + | '[' dottedName ']' + | '[' '.module' dottedName ']' + | type + ; + +/* Native types for marshaling signatures */ +nativeType : /* EMPTY */ + | 'custom' '(' compQstring ',' compQstring ',' compQstring ',' compQstring ')' + | 'custom' '(' compQstring ',' compQstring ')' + | 'fixed' 'sysstring' '[' int32 ']' + | 'fixed' 'array' '[' int32 ']' nativeType + | 'variant' + | 'currency' + | 'syschar' + | 'void' + | 'bool' + | 'int8' + | 'int16' + | 'int32' + | 'int64' + | 'float32' + | 'float64' + | 'error' + | 'unsigned' 'int8' + | 'unsigned' 'int16' + | 'unsigned' 'int32' + | 'unsigned' 'int64' + | 'uint8' + | 'uint16' + | 'uint32' + | 'uint64' + | nativeType '*' + | nativeType '[' ']' + | nativeType '[' int32 ']' + | nativeType '[' int32 '+' int32 ']' + | nativeType '[' '+' int32 ']' + | 'decimal' + | 'date' + | 'bstr' + | 'lpstr' + | 'lpwstr' + | 'lptstr' + | 'objectref' + | 'iunknown' iidParamIndex + | 'idispatch' iidParamIndex + | 'struct' + | 'interface' iidParamIndex + | 'safearray' variantType + | 'safearray' variantType ',' compQstring + + | 'int' + | 'unsigned' 'int' + | 'uint' + | 'nested' 'struct' + | 'byvalstr' + | 'ansi' 'bstr' + | 'tbstr' + | 'variant' 'bool' + | 'method' + | 'as' 'any' + | 'lpstruct' + | TYPEDEF_TS + ; + +iidParamIndex : /* EMPTY */ + | '(' 'iidparam' '=' int32 ')' + ; + +variantType : /* EMPTY */ + | 'null' + | 'variant' + | 'currency' + | 'void' + | 'bool' + | 'int8' + | 'int16' + | 'int32' + | 'int64' + | 'float32' + | 'float64' + | 'unsigned' 'int8' + | 'unsigned' 'int16' + | 'unsigned' 'int32' + | 'unsigned' 'int64' + | 'uint8' + | 'uint16' + | 'uint32' + | 'uint64' + | '*' + | variantType '[' ']' + | variantType 'vector' + | variantType '&' + | 'decimal' + | 'date' + | 'bstr' + | 'lpstr' + | 'lpwstr' + | 'iunknown' + | 'idispatch' + | 'safearray' + | 'int' + | 'unsigned' 'int' + | 'uint' + | 'error' + | 'hresult' + | 'carray' + | 'userdefined' + | 'record' + | 'filetime' + | 'blob' + | 'stream' + | 'storage' + | 'streamed_object' + | 'stored_object' + | 'blob_object' + | 'cf' + | 'clsid' + ; + +/* Managed types for signatures */ +type : 'class' className + | 'object' + | 'value' 'class' className + | 'valuetype' className + | type '[' ']' + | type '[' bounds1 ']' + | type '&' + | type '*' + | type 'pinned' + | type 'modreq' '(' typeSpec ')' + | type 'modopt' '(' typeSpec ')' + | methodSpec callConv type '*' '(' sigArgs0 ')' + | type '<' tyArgs1 '>' + | '!' '!' int32 + | '!' int32 + | '!' '!' dottedName + | '!' dottedName + | 'typedref' + | 'void' + | 'native' 'int' + | 'native' 'unsigned' 'int' + | 'native' 'uint' + | simpleType + | '...' type + ; + +simpleType : 'char' + | 'string' + | 'bool' + | 'int8' + | 'int16' + | 'int32' + | 'int64' + | 'float32' + | 'float64' + | 'unsigned' 'int8' + | 'unsigned' 'int16' + | 'unsigned' 'int32' + | 'unsigned' 'int64' + | 'uint8' + | 'uint16' + | 'uint32' + | 'uint64' + | TYPEDEF_TS + ; + +bounds1 : bound + | bounds1 ',' bound + ; + +bound : /* EMPTY */ + | '...' + | int32 + | int32 '...' int32 + | int32 '...' + ; + +/* Security declarations */ +secDecl : '.permission' secAction typeSpec '(' nameValPairs ')' + | '.permission' secAction typeSpec '=' '{' customBlobDescr '}' + | '.permission' secAction typeSpec + | psetHead bytes ')' + | '.permissionset' secAction compQstring + | '.permissionset' secAction '=' '{' secAttrSetBlob '}' + ; + +secAttrSetBlob : /* EMPTY */ + | secAttrBlob + | secAttrBlob ',' secAttrSetBlob + ; + +secAttrBlob : typeSpec '=' '{' customBlobNVPairs '}' + | 'class' SQSTRING '=' '{' customBlobNVPairs '}' + ; + +psetHead : '.permissionset' secAction '=' '(' + | '.permissionset' secAction 'bytearray' '(' + ; + +nameValPairs : nameValPair + | nameValPair ',' nameValPairs + ; + +nameValPair : compQstring '=' caValue + ; + +truefalse : 'true' + | 'false' + ; + +caValue : truefalse + | int32 + | 'int32' '(' int32 ')' + | compQstring + | className '(' 'int8' ':' int32 ')' + | className '(' 'int16' ':' int32 ')' + | className '(' 'int32' ':' int32 ')' + | className '(' int32 ')' + ; + +secAction : 'request' + | 'demand' + | 'assert' + | 'deny' + | 'permitonly' + | 'linkcheck' + | 'inheritcheck' + | 'reqmin' + | 'reqopt' + | 'reqrefuse' + | 'prejitgrant' + | 'prejitdeny' + | 'noncasdemand' + | 'noncaslinkdemand' + | 'noncasinheritance' + ; + +/* External source declarations */ +esHead : '.line' + | P_LINE + ; + +extSourceSpec : esHead int32 SQSTRING + | esHead int32 + | esHead int32 ':' int32 SQSTRING + | esHead int32 ':' int32 + | esHead int32 ':' int32 ',' int32 SQSTRING + | esHead int32 ':' int32 ',' int32 + | esHead int32 ',' int32 ':' int32 SQSTRING + | esHead int32 ',' int32 ':' int32 + | esHead int32 ',' int32 ':' int32 ',' int32 SQSTRING + | esHead int32 ',' int32 ':' int32 ',' int32 + | esHead int32 QSTRING + ; + +/* Manifest declarations */ +fileDecl : '.file' fileAttr dottedName fileEntry hashHead bytes ')' fileEntry + | '.file' fileAttr dottedName fileEntry + ; + +fileAttr : /* EMPTY */ + | fileAttr 'nometadata' + ; + +fileEntry : /* EMPTY */ + | '.entrypoint' + ; + +hashHead : '.hash' '=' '(' + ; + +assemblyHead : '.assembly' asmAttr dottedName + ; + +asmAttr : /* EMPTY */ + | asmAttr 'retargetable' + | asmAttr 'windowsruntime' + | asmAttr 'noplatform' + | asmAttr 'legacy' 'library' + | asmAttr 'cil' + | asmAttr 'x86' + | asmAttr 'amd64' + | asmAttr 'arm' + | asmAttr 'arm64' + ; + +assemblyDecls : /* EMPTY */ + | assemblyDecls assemblyDecl + ; + +assemblyDecl : '.hash' 'algorithm' int32 + | secDecl + | asmOrRefDecl + ; + +intOrWildcard : int32 + | '*' + ; + +asmOrRefDecl : publicKeyHead bytes ')' + | '.ver' intOrWildcard ':' intOrWildcard ':' intOrWildcard ':' intOrWildcard + | '.locale' compQstring + | localeHead bytes ')' + | customAttrDecl + | compControl + ; + +publicKeyHead : '.publickey' '=' '(' + ; + +publicKeyTokenHead : '.publickeytoken' '=' '(' + ; + +localeHead : '.locale' '=' '(' + ; + +assemblyRefHead : '.assembly' 'extern' asmAttr dottedName + | '.assembly' 'extern' asmAttr dottedName 'as' dottedName + ; + +assemblyRefDecls : /* EMPTY */ + | assemblyRefDecls assemblyRefDecl + ; + +assemblyRefDecl : hashHead bytes ')' + | asmOrRefDecl + | publicKeyTokenHead bytes ')' + | 'auto' + ; + +exptypeHead : '.class' 'extern' exptAttr dottedName + ; + +exportHead : '.export' exptAttr dottedName /* deprecated */ + ; + +exptAttr : /* EMPTY */ + | exptAttr 'private' + | exptAttr 'public' + | exptAttr 'forwarder' + | exptAttr 'nested' 'public' + | exptAttr 'nested' 'private' + | exptAttr 'nested' 'family' + | exptAttr 'nested' 'assembly' + | exptAttr 'nested' 'famandassem' + | exptAttr 'nested' 'famorassem' + ; + +exptypeDecls : /* EMPTY */ + | exptypeDecls exptypeDecl + ; + +exptypeDecl : '.file' dottedName + | '.class' 'extern' slashedName + | '.assembly' 'extern' dottedName + | 'mdtoken' '(' int32 ')' + | '.class' int32 + | customAttrDecl + | compControl + ; + +manifestResHead : '.mresource' manresAttr dottedName + | '.mresource' manresAttr dottedName 'as' dottedName + ; + +manresAttr : /* EMPTY */ + | manresAttr 'public' + | manresAttr 'private' + ; + +manifestResDecls : /* EMPTY */ + | manifestResDecls manifestResDecl + ; + +manifestResDecl : '.file' dottedName 'at' int32 + | '.assembly' 'extern' dottedName + | customAttrDecl + | compControl + ; + diff --git a/src/coreclr/src/ilasm/typar.hpp b/src/coreclr/src/ilasm/typar.hpp index 48d9e2091bc9..aee0c32c4526 100644 --- a/src/coreclr/src/ilasm/typar.hpp +++ b/src/coreclr/src/ilasm/typar.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /**************************************************************************/ /* a type parameter list */ diff --git a/src/coreclr/src/ilasm/writer.cpp b/src/coreclr/src/ilasm/writer.cpp index 94da077ad2b9..64b0054ec3e0 100644 --- a/src/coreclr/src/ilasm/writer.cpp +++ b/src/coreclr/src/ilasm/writer.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // writer.cpp // diff --git a/src/coreclr/src/ilasm/writer_enc.cpp b/src/coreclr/src/ilasm/writer_enc.cpp index 31f3e284a601..1888b563e6f8 100644 --- a/src/coreclr/src/ilasm/writer_enc.cpp +++ b/src/coreclr/src/ilasm/writer_enc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // writer_ENC.cpp // diff --git a/src/coreclr/src/ildasm/ceeload.cpp b/src/coreclr/src/ildasm/ceeload.cpp index d157585bd23a..13badcf9098e 100644 --- a/src/coreclr/src/ildasm/ceeload.cpp +++ b/src/coreclr/src/ildasm/ceeload.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // CEELOAD reads in the PE file format using LoadLibrary diff --git a/src/coreclr/src/ildasm/ceeload.h b/src/coreclr/src/ildasm/ceeload.h index f1f550dd8a87..f1c8ec7248b9 100644 --- a/src/coreclr/src/ildasm/ceeload.h +++ b/src/coreclr/src/ildasm/ceeload.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: CEELOAD.H // diff --git a/src/coreclr/src/ildasm/dasm.cpp b/src/coreclr/src/ildasm/dasm.cpp index 2a46f33548fe..da3d12f0f336 100644 --- a/src/coreclr/src/ildasm/dasm.cpp +++ b/src/coreclr/src/ildasm/dasm.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "ildasmpch.h" #include @@ -3475,19 +3474,10 @@ BOOL DumpMethod(mdToken FuncToken, const char *pszClassName, DWORD dwEntryPointT bool bRet = FALSE; PAL_CPP_TRY { - if((*pComSig & IMAGE_CEE_CS_CALLCONV_MASK) > IMAGE_CEE_CS_CALLCONV_VARARG) - { - sprintf_s(szString,SZSTRING_SIZE,"%sERROR: signature of method '%s' has invalid calling convention 0x%2.2X",g_szAsmCodeIndent,pszMemberName,*pComSig); - printError(GUICookie,ERRORMSG(szString)); - bRet = TRUE; - goto lDone; - } - g_tkMVarOwner = FuncToken; szString[0] = 0; DumpGenericPars(szString,FuncToken); //,NULL,FALSE); pszMemberSig = PrettyPrintSig(pComSig, cComSig, szString, &qbMemberSig, g_pImport,NULL); -lDone: ; } PAL_CPP_CATCH_ALL { printError(GUICookie,"INVALID DATA ADDRESS"); bRet = TRUE; diff --git a/src/coreclr/src/ildasm/dasm.rc b/src/coreclr/src/ildasm/dasm.rc index 1859d9283224..4ba4e758255f 100644 --- a/src/coreclr/src/ildasm/dasm.rc +++ b/src/coreclr/src/ildasm/dasm.rc @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "resource.h" diff --git a/src/coreclr/src/ildasm/dasm_formattype.cpp b/src/coreclr/src/ildasm/dasm_formattype.cpp index 9f6eeda84a8f..0e4007aa95ee 100644 --- a/src/coreclr/src/ildasm/dasm_formattype.cpp +++ b/src/coreclr/src/ildasm/dasm_formattype.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // /******************************************************************************/ diff --git a/src/coreclr/src/ildasm/dasm_mi.cpp b/src/coreclr/src/ildasm/dasm_mi.cpp index 38fee079cfe2..2162a27d2b3c 100644 --- a/src/coreclr/src/ildasm/dasm_mi.cpp +++ b/src/coreclr/src/ildasm/dasm_mi.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "ildasmpch.h" diff --git a/src/coreclr/src/ildasm/dasm_sz.cpp b/src/coreclr/src/ildasm/dasm_sz.cpp index cadd9986a4ef..17b54951f84b 100644 --- a/src/coreclr/src/ildasm/dasm_sz.cpp +++ b/src/coreclr/src/ildasm/dasm_sz.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "ildasmpch.h" diff --git a/src/coreclr/src/ildasm/dasm_sz.h b/src/coreclr/src/ildasm/dasm_sz.h index d13b36356cc3..164a7d456774 100644 --- a/src/coreclr/src/ildasm/dasm_sz.h +++ b/src/coreclr/src/ildasm/dasm_sz.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _DASM_SZ_H_ #define _DASM_SZ_H_ diff --git a/src/coreclr/src/ildasm/dasmenum.hpp b/src/coreclr/src/ildasm/dasmenum.hpp index 6c541031f8d2..76effbe0d990 100644 --- a/src/coreclr/src/ildasm/dasmenum.hpp +++ b/src/coreclr/src/ildasm/dasmenum.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "openum.h" diff --git a/src/coreclr/src/ildasm/dis.cpp b/src/coreclr/src/ildasm/dis.cpp index 71c289dc914d..e14e3c6f5315 100644 --- a/src/coreclr/src/ildasm/dis.cpp +++ b/src/coreclr/src/ildasm/dis.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // Disassembler @@ -2684,7 +2683,7 @@ bool IsLocalToQuote(const char *name) // No such thing as an empty name that doesn't require quoting (handled in IsNameToQuote) _ASSERTE(*name); // return true if there's a '.' anywhere in the name, after position 1 - return !!strchr(name + 1, '.'); + return strchr(name + 1, '.') != 0; } /********************************************************************/ diff --git a/src/coreclr/src/ildasm/dis.h b/src/coreclr/src/ildasm/dis.h index 6d2fac87ecb3..262ab3930f76 100644 --- a/src/coreclr/src/ildasm/dis.h +++ b/src/coreclr/src/ildasm/dis.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "formattype.h" diff --git a/src/coreclr/src/ildasm/dman.cpp b/src/coreclr/src/ildasm/dman.cpp index 61e50a5ab903..c1338d70150d 100644 --- a/src/coreclr/src/ildasm/dman.cpp +++ b/src/coreclr/src/ildasm/dman.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // Assembly and Manifest Disassembler diff --git a/src/coreclr/src/ildasm/dres.cpp b/src/coreclr/src/ildasm/dres.cpp index 438eb0a045b5..c7043fb45869 100644 --- a/src/coreclr/src/ildasm/dres.cpp +++ b/src/coreclr/src/ildasm/dres.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // Win32 Resource extractor diff --git a/src/coreclr/src/ildasm/dynamicarray.h b/src/coreclr/src/ildasm/dynamicarray.h index 3ba77d549fad..39f507a62728 100644 --- a/src/coreclr/src/ildasm/dynamicarray.h +++ b/src/coreclr/src/ildasm/dynamicarray.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef DYNAMICARRAY_H diff --git a/src/coreclr/src/ildasm/exe/CMakeLists.txt b/src/coreclr/src/ildasm/exe/CMakeLists.txt index 47531ebfad75..fe0892f6bd30 100644 --- a/src/coreclr/src/ildasm/exe/CMakeLists.txt +++ b/src/coreclr/src/ildasm/exe/CMakeLists.txt @@ -104,14 +104,8 @@ if(CLR_CMAKE_HOST_UNIX) mscorrc coreclrpal palrt + ${CMAKE_DL_LIBS} ) - - # FreeBSD and NetBSD implement dlopen(3) in libc - if(NOT CLR_CMAKE_TARGET_FREEBSD AND NOT CLR_CMAKE_TARGET_NETBSD) - target_link_libraries(ildasm - dl - ) - endif(NOT CLR_CMAKE_TARGET_FREEBSD AND NOT CLR_CMAKE_TARGET_NETBSD) else() target_link_libraries(ildasm ${ILDASM_LINK_LIBRARIES} diff --git a/src/coreclr/src/ildasm/ildasmpch.cpp b/src/coreclr/src/ildasm/ildasmpch.cpp index 1d476e9ff506..c78ec75520d2 100644 --- a/src/coreclr/src/ildasm/ildasmpch.cpp +++ b/src/coreclr/src/ildasm/ildasmpch.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // This is just to build the PCH for ildasm diff --git a/src/coreclr/src/ildasm/ildasmpch.h b/src/coreclr/src/ildasm/ildasmpch.h index 071bedbcb2c7..cfd05bf6551f 100644 --- a/src/coreclr/src/ildasm/ildasmpch.h +++ b/src/coreclr/src/ildasm/ildasmpch.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #if !defined(_ILDASMPCH_H) #define _ILDASMPCH_H diff --git a/src/coreclr/src/ildasm/resource.h b/src/coreclr/src/ildasm/resource.h index 3edd2183bb3b..dbd277c01b29 100644 --- a/src/coreclr/src/ildasm/resource.h +++ b/src/coreclr/src/ildasm/resource.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //{{NO_DEPENDENCIES}} // Microsoft Developer Studio generated include file. diff --git a/src/coreclr/src/ildasm/util.hpp b/src/coreclr/src/ildasm/util.hpp index c5c4c44a55da..596cc62b88b7 100644 --- a/src/coreclr/src/ildasm/util.hpp +++ b/src/coreclr/src/ildasm/util.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // util.hpp // diff --git a/src/coreclr/src/ildasm/windasm.cpp b/src/coreclr/src/ildasm/windasm.cpp index 41a7a67bed27..94abfcdb0d82 100644 --- a/src/coreclr/src/ildasm/windasm.cpp +++ b/src/coreclr/src/ildasm/windasm.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /************************************************************************************************ * * diff --git a/src/coreclr/src/inc/CMakeLists.txt b/src/coreclr/src/inc/CMakeLists.txt index 60fad88e77dd..817622012516 100644 --- a/src/coreclr/src/inc/CMakeLists.txt +++ b/src/coreclr/src/inc/CMakeLists.txt @@ -58,7 +58,7 @@ if(FEATURE_JIT_PITCHING) endif(FEATURE_JIT_PITCHING) # Compile *_i.cpp to lib -_add_library(corguids ${CORGUIDS_SOURCES}) +_add_library(corguids OBJECT ${CORGUIDS_SOURCES}) # Binplace the inc files for packaging later. diff --git a/src/coreclr/src/inc/CrstTypeTool.cs b/src/coreclr/src/inc/CrstTypeTool.cs index f32ade25f15f..dcfa4b6fe2a8 100644 --- a/src/coreclr/src/inc/CrstTypeTool.cs +++ b/src/coreclr/src/inc/CrstTypeTool.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // This tool exists to transform a high level description of Crst dependencies (i.e. which Crst type may be @@ -133,7 +132,6 @@ void WriteHeaderFile(string fileName) writer.WriteLine("//"); writer.WriteLine("// Licensed to the .NET Foundation under one or more agreements."); writer.WriteLine("// The .NET Foundation licenses this file to you under the MIT license."); - writer.WriteLine("// See the LICENSE file in the project root for more information."); writer.WriteLine("//"); writer.WriteLine(); writer.WriteLine("#ifndef __CRST_TYPES_INCLUDED"); diff --git a/src/coreclr/src/inc/CrstTypes.def b/src/coreclr/src/inc/CrstTypes.def index 58a5fe2daf52..46eb9eaccc5f 100644 --- a/src/coreclr/src/inc/CrstTypes.def +++ b/src/coreclr/src/inc/CrstTypes.def @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // This file is used to describe the different types of Crst and their dependencies on other Crst types (in diff --git a/src/coreclr/src/inc/MSCOREE.IDL b/src/coreclr/src/inc/MSCOREE.IDL index 6c2c5122bc83..1a5124ffbb2c 100644 --- a/src/coreclr/src/inc/MSCOREE.IDL +++ b/src/coreclr/src/inc/MSCOREE.IDL @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/inc/OpCodeGen.pl b/src/coreclr/src/inc/OpCodeGen.pl index 46155484f26e..952dd477ef68 100644 --- a/src/coreclr/src/inc/OpCodeGen.pl +++ b/src/coreclr/src/inc/OpCodeGen.pl @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. # # OpCodeGen.pl # @@ -39,7 +38,6 @@ $license = "// Licensed to the .NET Foundation under one or more agreements.\n"; $license .= "// The .NET Foundation licenses this file to you under the MIT license.\n"; -$license .= "// See the LICENSE file in the project root for more information.\n\n"; $startHeaderComment = "/*============================================================\n**\n"; $endHeaderComment = "**\n** THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT BY HAND!\n"; diff --git a/src/coreclr/src/inc/allocacheck.h b/src/coreclr/src/inc/allocacheck.h index 93d57d983f68..ca2a57a277cd 100644 --- a/src/coreclr/src/inc/allocacheck.h +++ b/src/coreclr/src/inc/allocacheck.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*********************************************************************/ /* AllocaCheck */ /*********************************************************************/ diff --git a/src/coreclr/src/inc/appxutil.h b/src/coreclr/src/inc/appxutil.h deleted file mode 100644 index 644d3b9fce04..000000000000 --- a/src/coreclr/src/inc/appxutil.h +++ /dev/null @@ -1,44 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - - -#pragma once - -#ifdef FEATURE_APPX - -#include "clrtypes.h" -#include "appmodel.h" - - -//--------------------------------------------------------------------------------------------- -// Forward declarations -BOOL WinRTSupported(); - - -namespace AppX -{ - // Returns true if process is immersive (or if running in mockup environment). - bool IsAppXProcess(); - - // On CoreCLR, the host is in charge of determining whether the process is AppX or not. - void SetIsAppXProcess(bool); - -#ifdef DACCESS_COMPILE - bool DacIsAppXProcess(); -#endif // DACCESS_COMPILE -}; - - -#else // FEATURE_APPX - -namespace AppX -{ - inline bool IsAppXProcess() - { - return false; - } -} - -#endif // FEATURE_APPX diff --git a/src/coreclr/src/inc/arrayholder.h b/src/coreclr/src/inc/arrayholder.h index 0523a412829c..1795ec56ab9d 100644 --- a/src/coreclr/src/inc/arrayholder.h +++ b/src/coreclr/src/inc/arrayholder.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. template class ArrayHolder diff --git a/src/coreclr/src/inc/arraylist.h b/src/coreclr/src/inc/arraylist.h index a4c6b2cb5c1a..e4e008214ac9 100644 --- a/src/coreclr/src/inc/arraylist.h +++ b/src/coreclr/src/inc/arraylist.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef ARRAYLIST_H_ diff --git a/src/coreclr/src/inc/bbsweep.h b/src/coreclr/src/inc/bbsweep.h index b24cf231db58..a65e9a94cbed 100644 --- a/src/coreclr/src/inc/bbsweep.h +++ b/src/coreclr/src/inc/bbsweep.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*****************************************************************************\ * * diff --git a/src/coreclr/src/inc/bitmask.h b/src/coreclr/src/inc/bitmask.h index 2e91295aec0e..f8dddb313398 100644 --- a/src/coreclr/src/inc/bitmask.h +++ b/src/coreclr/src/inc/bitmask.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/inc/bitmask.inl b/src/coreclr/src/inc/bitmask.inl index 7a69dd8a4f6b..9bdd60827f4f 100644 --- a/src/coreclr/src/inc/bitmask.inl +++ b/src/coreclr/src/inc/bitmask.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/inc/bitposition.h b/src/coreclr/src/inc/bitposition.h index 423c4ed24a6b..e1f05ffe9ca0 100644 --- a/src/coreclr/src/inc/bitposition.h +++ b/src/coreclr/src/inc/bitposition.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _BITPOSITION_H_ #define _BITPOSITION_H_ diff --git a/src/coreclr/src/inc/bitvector.h b/src/coreclr/src/inc/bitvector.h index 43fd2bca611c..0ef797f6e3c9 100644 --- a/src/coreclr/src/inc/bitvector.h +++ b/src/coreclr/src/inc/bitvector.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /***************************************************************************/ diff --git a/src/coreclr/src/inc/blobfetcher.h b/src/coreclr/src/inc/blobfetcher.h index a7f65c415092..9906f4dc9e79 100644 --- a/src/coreclr/src/inc/blobfetcher.h +++ b/src/coreclr/src/inc/blobfetcher.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // CBlobFetcher - it fetches binary chunks, similar to new, but more controlled // diff --git a/src/coreclr/src/inc/bundle.h b/src/coreclr/src/inc/bundle.h index 00fc186ab9ff..c669790350db 100644 --- a/src/coreclr/src/inc/bundle.h +++ b/src/coreclr/src/inc/bundle.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /***************************************************************************** ** ** diff --git a/src/coreclr/src/inc/cahlpr.h b/src/coreclr/src/inc/cahlpr.h index c35f64d33499..c5b4446b83cd 100644 --- a/src/coreclr/src/inc/cahlpr.h +++ b/src/coreclr/src/inc/cahlpr.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: CAHLPR.H // diff --git a/src/coreclr/src/inc/caparser.h b/src/coreclr/src/inc/caparser.h index a263dcbcde43..a6a153b21724 100644 --- a/src/coreclr/src/inc/caparser.h +++ b/src/coreclr/src/inc/caparser.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: caparser.h // diff --git a/src/coreclr/src/inc/ceefilegenwriter.h b/src/coreclr/src/inc/ceefilegenwriter.h index 331673811fcc..ab55bdc6a914 100644 --- a/src/coreclr/src/inc/ceefilegenwriter.h +++ b/src/coreclr/src/inc/ceefilegenwriter.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: CeeFileGenWriter.h // diff --git a/src/coreclr/src/inc/ceegen.h b/src/coreclr/src/inc/ceegen.h index 3bd729e43501..f770797d5e54 100644 --- a/src/coreclr/src/inc/ceegen.h +++ b/src/coreclr/src/inc/ceegen.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: CEEGEN.H // diff --git a/src/coreclr/src/inc/ceegentokenmapper.h b/src/coreclr/src/inc/ceegentokenmapper.h index a0b7680ef1c7..a1bb9b7ef4e4 100644 --- a/src/coreclr/src/inc/ceegentokenmapper.h +++ b/src/coreclr/src/inc/ceegentokenmapper.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // CeeGenTokenMapper.h // diff --git a/src/coreclr/src/inc/ceesectionstring.h b/src/coreclr/src/inc/ceesectionstring.h index 0ec466d741b1..1aec289f4b35 100644 --- a/src/coreclr/src/inc/ceesectionstring.h +++ b/src/coreclr/src/inc/ceesectionstring.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: CeeSectionString.h // diff --git a/src/coreclr/src/inc/cfi.h b/src/coreclr/src/inc/cfi.h index d5d77840ec77..3d7ec0f4cc11 100644 --- a/src/coreclr/src/inc/cfi.h +++ b/src/coreclr/src/inc/cfi.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef CFI_H_ #define CFI_H_ diff --git a/src/coreclr/src/inc/check.h b/src/coreclr/src/inc/check.h index 9e012de2a514..c033965d400f 100644 --- a/src/coreclr/src/inc/check.h +++ b/src/coreclr/src/inc/check.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // --------------------------------------------------------------------------- // Check.h // diff --git a/src/coreclr/src/inc/check.inl b/src/coreclr/src/inc/check.inl index 84a9be2483fe..f234e988faf0 100644 --- a/src/coreclr/src/inc/check.inl +++ b/src/coreclr/src/inc/check.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef CHECK_INL_ #define CHECK_INL_ diff --git a/src/coreclr/src/inc/clr/fs.h b/src/coreclr/src/inc/clr/fs.h index 6ff1750daf10..d7efac04cf5f 100644 --- a/src/coreclr/src/inc/clr/fs.h +++ b/src/coreclr/src/inc/clr/fs.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/inc/clr/fs/path.h b/src/coreclr/src/inc/clr/fs/path.h index dd4ed9e7489e..7f1d0e00d738 100644 --- a/src/coreclr/src/inc/clr/fs/path.h +++ b/src/coreclr/src/inc/clr/fs/path.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/inc/clr/stack.h b/src/coreclr/src/inc/clr/stack.h index f9741b274f69..97719c21c9eb 100644 --- a/src/coreclr/src/inc/clr/stack.h +++ b/src/coreclr/src/inc/clr/stack.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/inc/clr/str.h b/src/coreclr/src/inc/clr/str.h index 94c8ed46b56b..d09a965fed68 100644 --- a/src/coreclr/src/inc/clr/str.h +++ b/src/coreclr/src/inc/clr/str.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/inc/clr/win32.h b/src/coreclr/src/inc/clr/win32.h index a0e00c632132..0198a732da8c 100644 --- a/src/coreclr/src/inc/clr/win32.h +++ b/src/coreclr/src/inc/clr/win32.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // clr/win32.h // diff --git a/src/coreclr/src/inc/clr_std/algorithm b/src/coreclr/src/inc/clr_std/algorithm index 653d67e519bd..ebd21b09c5e5 100644 --- a/src/coreclr/src/inc/clr_std/algorithm +++ b/src/coreclr/src/inc/clr_std/algorithm @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // clr_std/algorithm diff --git a/src/coreclr/src/inc/clr_std/string b/src/coreclr/src/inc/clr_std/string index 66f219c8a878..59ac67b98653 100644 --- a/src/coreclr/src/inc/clr_std/string +++ b/src/coreclr/src/inc/clr_std/string @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // clr_std/string diff --git a/src/coreclr/src/inc/clr_std/type_traits b/src/coreclr/src/inc/clr_std/type_traits index 357fb1f292a9..47d4f241639c 100644 --- a/src/coreclr/src/inc/clr_std/type_traits +++ b/src/coreclr/src/inc/clr_std/type_traits @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // clr_std/utility diff --git a/src/coreclr/src/inc/clr_std/utility b/src/coreclr/src/inc/clr_std/utility index fa2267578ed5..1b6b5a7b72c1 100644 --- a/src/coreclr/src/inc/clr_std/utility +++ b/src/coreclr/src/inc/clr_std/utility @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // clr_std/utility diff --git a/src/coreclr/src/inc/clr_std/vector b/src/coreclr/src/inc/clr_std/vector index 447166c02700..0bed04182a4e 100644 --- a/src/coreclr/src/inc/clr_std/vector +++ b/src/coreclr/src/inc/clr_std/vector @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // clr_std/vector diff --git a/src/coreclr/src/inc/clrconfig.h b/src/coreclr/src/inc/clrconfig.h index 42d8a24efd8c..7ffa85435351 100644 --- a/src/coreclr/src/inc/clrconfig.h +++ b/src/coreclr/src/inc/clrconfig.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // -------------------------------------------------------------------------------------------------- // CLRConfig.h diff --git a/src/coreclr/src/inc/clrconfigvalues.h b/src/coreclr/src/inc/clrconfigvalues.h index 267dd0827ae7..ddb1db3ce647 100644 --- a/src/coreclr/src/inc/clrconfigvalues.h +++ b/src/coreclr/src/inc/clrconfigvalues.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // CLRConfigValues.h // @@ -395,6 +394,8 @@ RETAIL_CONFIG_DWORD_INFO(INTERNAL_TraceInterpreterIL, W("TraceInterpreterIL"), 0 RETAIL_CONFIG_DWORD_INFO(INTERNAL_TraceInterpreterOstack, W("TraceInterpreterOstack"), 0, "Logs operand stack after each IL instruction of interpreted methods to the console") CONFIG_DWORD_INFO(INTERNAL_TraceInterpreterVerbose, W("TraceInterpreterVerbose"), 0, "Logs interpreter progress with detailed messages to the console") CONFIG_DWORD_INFO(INTERNAL_TraceInterpreterJITTransition, W("TraceInterpreterJITTransition"), 0, "Logs when the interpreter determines a method should be JITted") +RETAIL_CONFIG_DWORD_INFO(INTERNAL_ForceInterpreter, W("ForceInterpreter"), 0, "If non-zero, force the interpreter to be used") +RETAIL_CONFIG_DWORD_INFO(INTERNAL_InterpreterHWIntrinsicsIsSupportedFalse, W("InterpreterHWIntrinsicsIsSupportedFalse"), 0, "If non-zero, force get_IsSupported to return false for hardware intrinsics") // for internal testing purposes #endif // The JIT queries this ConfigDWORD but it doesn't know if FEATURE_INTERPRETER is enabled RETAIL_CONFIG_DWORD_INFO(INTERNAL_InterpreterFallback, W("InterpreterFallback"), 0, "Fallback to the interpreter when the JIT compiler fails") diff --git a/src/coreclr/src/inc/clrdata.idl b/src/coreclr/src/inc/clrdata.idl index 95bc6c8da245..0ce58c6fa7d6 100644 --- a/src/coreclr/src/inc/clrdata.idl +++ b/src/coreclr/src/inc/clrdata.idl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /***************************************************************************** ** ** diff --git a/src/coreclr/src/inc/clrhost.h b/src/coreclr/src/inc/clrhost.h index 76523b06039f..8f5f3ff03fb7 100644 --- a/src/coreclr/src/inc/clrhost.h +++ b/src/coreclr/src/inc/clrhost.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/inc/clrinternal.idl b/src/coreclr/src/inc/clrinternal.idl index 27a3c0a45361..57ba59f8a5ab 100644 --- a/src/coreclr/src/inc/clrinternal.idl +++ b/src/coreclr/src/inc/clrinternal.idl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /************************************************************************************** ** ** diff --git a/src/coreclr/src/inc/clrnt.h b/src/coreclr/src/inc/clrnt.h index 26a33d53b0c0..1a1999938ead 100644 --- a/src/coreclr/src/inc/clrnt.h +++ b/src/coreclr/src/inc/clrnt.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef CLRNT_H_ diff --git a/src/coreclr/src/inc/clrprivbinderutil.h b/src/coreclr/src/inc/clrprivbinderutil.h index 6f65ea68261e..591e55c8e8ae 100644 --- a/src/coreclr/src/inc/clrprivbinderutil.h +++ b/src/coreclr/src/inc/clrprivbinderutil.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // @@ -9,23 +8,10 @@ #ifndef __CLRPRIVBINDERUTIL_H__ #define __CLRPRIVBINDERUTIL_H__ -#include "holder.h" -#include "internalunknownimpl.h" #include "clrprivbinding.h" -#include "slist.h" -#include "strongnameholders.h" - -//===================================================================================================================== -#define STANDARD_BIND_CONTRACT \ - CONTRACTL { \ - NOTHROW; \ - GC_TRIGGERS; \ - MODE_PREEMPTIVE; \ - } CONTRACTL_END //===================================================================================================================== // Forward declarations -interface ICLRPrivAssembly; typedef DPTR(ICLRPrivAssembly) PTR_ICLRPrivAssembly; typedef DPTR(ICLRPrivBinder) PTR_ICLRPrivBinder; @@ -37,47 +23,6 @@ typedef DPTR(ICLRPrivBinder) PTR_ICLRPrivBinder; fail_op; \ } while (false) -#define VALIDATE_PTR_RET(val) VALIDATE_CONDITION((val) != nullptr, return E_POINTER) -#define VALIDATE_PTR_THROW(val) VALIDATE_CONDITION((val) != nullptr, ThrowHR(E_POINTER)) #define VALIDATE_ARG_RET(condition) VALIDATE_CONDITION(condition, return E_INVALIDARG) -#define VALIDATE_ARG_THROW(condition) VALIDATE_CONDITION(condition, ThrowHR(E_INVALIDARG)) - -//===================================================================================================================== -namespace CLRPrivBinderUtil -{ - //================================================================================================================= - class CLRPrivResourcePathImpl : - public IUnknownCommon2 - { - public: - //--------------------------------------------------------------------------------------------- - CLRPrivResourcePathImpl(LPCWSTR wzPath); - - //--------------------------------------------------------------------------------------------- - LPCWSTR GetPath() - { return m_wzPath; } - - //--------------------------------------------------------------------------------------------- - STDMETHOD(GetResourceType)( - IID* pIID) - { - LIMITED_METHOD_CONTRACT; - if (pIID == nullptr) - return E_INVALIDARG; - *pIID = __uuidof(ICLRPrivResourcePath); - return S_OK; - } - - //--------------------------------------------------------------------------------------------- - STDMETHOD(GetPath)( - DWORD cchBuffer, - LPDWORD pcchBuffer, - __inout_ecount_part(cchBuffer, *pcchBuffer) LPWSTR wzBuffer); - - private: - //--------------------------------------------------------------------------------------------- - NewArrayHolder m_wzPath; - }; -} // namespace CLRPrivBinderUtil #endif // __CLRPRIVBINDERUTIL_H__ diff --git a/src/coreclr/src/inc/clrprivbinding.idl b/src/coreclr/src/inc/clrprivbinding.idl index d0df1e4b6e9b..08743d215cc3 100644 --- a/src/coreclr/src/inc/clrprivbinding.idl +++ b/src/coreclr/src/inc/clrprivbinding.idl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. import "unknwn.idl"; import "objidl.idl"; @@ -10,11 +9,6 @@ import "fusion.idl"; interface ICLRPrivBinder; interface ICLRPrivAssembly; -interface ICLRPrivResource; -interface ICLRPrivResourcePath; - -interface ICLRPrivAssemblyInfo; - typedef LPCSTR LPCUTF8; /************************************************************************************** @@ -105,101 +99,4 @@ interface ICLRPrivAssembly : ICLRPrivBinder **********************************************************************************/ HRESULT GetAvailableImageTypes( [out, retval] LPDWORD pdwImageTypes); - - /********************************************************************************** - ** GetImageResource - Returns the resource for the given image type. The returned - ** IUnknown interface is one of the ICLRPrivResource* interfaces defined below. - ** It is the binder's choice as to which resource type is returned. If - ** pdwImageType is non-null, then this will be set to indicate the image type - ** returned. - ** NOTE: This method is required to be idempotent. See general comment above. - **********************************************************************************/ - HRESULT GetImageResource( - [in] DWORD dwImageType, - [out] DWORD* pdwImageType, - [out, retval] ICLRPrivResource ** ppIResource); -}; - -/************************************************************************************** - ** ICLRPrivResource - Generic resource that must be queried for more specific - ** interface. - **************************************************************************************/ -[ - uuid(2601F621-E462-404C-B299-3E1DE72F8547), - version(1.0), - local -] -interface ICLRPrivResource : IUnknown -{ - /********************************************************************************** - ** GetResourceType - use to query the interface IID of the specific resource type. - ** - ** priid - set to the IID corresponding to the resource type. - **********************************************************************************/ - HRESULT GetResourceType( - [out, retval] IID *pIID); -}; - -/************************************************************************************** - ** ICLRPrivResourcePath - Encapsulates a resource identified by path. - **************************************************************************************/ -[ - uuid(2601F621-E462-404C-B299-3E1DE72F8544), - version(1.0), - local -] -interface ICLRPrivResourcePath : IUnknown -{ - /********************************************************************************** - ** GetPath - Use to retrieve the resource's absolute file path. - ** NOTE: This method is required to be idempotent. See general comment above. - ** - ** cchBuffer - the count of unicode characters available in the buffer. - **********************************************************************************/ - HRESULT GetPath( - [in] DWORD cchBuffer, - [out] LPDWORD pcchBuffer, - [out, size_is(cchBuffer), length_is(*pcchBuffer), string, optional] LPWSTR wzBuffer); -}; - -[ - uuid(8d2d3cc9-1249-4ad4-977d-b772bd4e8a94), - version(1.0), - local -] -interface ICLRPrivResourceAssembly : IUnknown -{ - /********************************************************************************** - ** GetAssembly - Use to retrieve the resource's BINDER_SPACE::Assembly value. - ** NOTE: This method is required to be idempotent. See general comment above. - **********************************************************************************/ - HRESULT GetAssembly( - [out, retval] LPVOID * pAssembly); -}; - -/************************************************************************************** - ** ICLRPrivAssemblyInfo - Encapsulates assembly image info. - **************************************************************************************/ -[ - uuid(5653946E-800B-48B7-8B09-B1B879B54F68), - version(1.0), - local -] -interface ICLRPrivAssemblyInfo : IUnknown -{ - HRESULT GetAssemblyName( - [in] DWORD cchBuffer, - [out] LPDWORD pcchBuffer, - [out, string, optional] LPWSTR wzBuffer); - - HRESULT GetAssemblyVersion( - [out] USHORT *pMajor, - [out] USHORT *pMinor, - [out] USHORT *pBuild, - [out] USHORT *pRevision); - - HRESULT GetAssemblyPublicKey( - [in] DWORD cbBuffer, - [out] LPDWORD pcbBuffer, - [out, size_is(cbBuffer), length_is(*pcbBuffer), optional] BYTE *pbBuffer); }; diff --git a/src/coreclr/src/inc/clrtypes.h b/src/coreclr/src/inc/clrtypes.h index a83fb9e1f656..6050936814e6 100644 --- a/src/coreclr/src/inc/clrtypes.h +++ b/src/coreclr/src/inc/clrtypes.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ================================================================================ // Standard primitive types for CLR code // diff --git a/src/coreclr/src/inc/clrversion.h b/src/coreclr/src/inc/clrversion.h index def05683a1a6..5058a47d6d38 100644 --- a/src/coreclr/src/inc/clrversion.h +++ b/src/coreclr/src/inc/clrversion.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "runtime_version.h" diff --git a/src/coreclr/src/inc/complex.h b/src/coreclr/src/inc/complex.h index 7af09fcbf753..eb208242662a 100644 --- a/src/coreclr/src/inc/complex.h +++ b/src/coreclr/src/inc/complex.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // complex.h // diff --git a/src/coreclr/src/inc/configuration.h b/src/coreclr/src/inc/configuration.h index 94f016888f5f..b609b9235441 100644 --- a/src/coreclr/src/inc/configuration.h +++ b/src/coreclr/src/inc/configuration.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // -------------------------------------------------------------------------------------------------- // configuration.h diff --git a/src/coreclr/src/inc/contract.h b/src/coreclr/src/inc/contract.h index 082d41d96019..68fea025a277 100644 --- a/src/coreclr/src/inc/contract.h +++ b/src/coreclr/src/inc/contract.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // --------------------------------------------------------------------------- // Contract.h // @@ -986,7 +985,7 @@ class BaseContract }; - NOTHROW_DECL BaseContract() : m_pClrDebugState(NULL), m_testmask(0) + NOTHROW_DECL BaseContract() : m_testmask(0), m_pClrDebugState(NULL) { } NOTHROW_DECL void Restore() diff --git a/src/coreclr/src/inc/contract.inl b/src/coreclr/src/inc/contract.inl index ee223b666a52..589cafdebcda 100644 --- a/src/coreclr/src/inc/contract.inl +++ b/src/coreclr/src/inc/contract.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // --------------------------------------------------------------------------- // Contract.inl // diff --git a/src/coreclr/src/inc/contxt.h b/src/coreclr/src/inc/contxt.h index b9b4121def38..1611e7616f5d 100644 --- a/src/coreclr/src/inc/contxt.h +++ b/src/coreclr/src/inc/contxt.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* this ALWAYS GENERATED file contains the definitions for the interfaces */ diff --git a/src/coreclr/src/inc/cor.h b/src/coreclr/src/inc/cor.h index ba0c9c3cb17a..9625641288ca 100644 --- a/src/coreclr/src/inc/cor.h +++ b/src/coreclr/src/inc/cor.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /***************************************************************************** ** ** diff --git a/src/coreclr/src/inc/corbbtprof.h b/src/coreclr/src/inc/corbbtprof.h index 35816bb01a30..78df6c6a79bd 100644 --- a/src/coreclr/src/inc/corbbtprof.h +++ b/src/coreclr/src/inc/corbbtprof.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*****************************************************************************\ * * diff --git a/src/coreclr/src/inc/corcompile.h b/src/coreclr/src/inc/corcompile.h index 2410a0a39c5a..f02a7a1475d0 100644 --- a/src/coreclr/src/inc/corcompile.h +++ b/src/coreclr/src/inc/corcompile.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*****************************************************************************\ * * @@ -693,6 +692,9 @@ enum CORCOMPILE_FIXUP_BLOB_KIND ENCODE_CHECK_INSTRUCTION_SET_SUPPORT, /* Define the set of instruction sets that must be supported/unsupported to use the fixup */ + ENCODE_VERIFY_FIELD_OFFSET, /* Used for the R2R compiler can generate a check against the real field offset used at runtime */ + ENCODE_VERIFY_TYPE_LAYOUT, /* Used for the R2R compiler can generate a check against the real type layout used at runtime */ + ENCODE_MODULE_HANDLE = 0x50, /* Module token */ ENCODE_STATIC_FIELD_ADDRESS, /* For accessing a static field */ ENCODE_MODULE_ID_FOR_STATICS, /* For accessing static fields */ diff --git a/src/coreclr/src/inc/cordbpriv.h b/src/coreclr/src/inc/cordbpriv.h index 30231d37880e..32a85c28b074 100644 --- a/src/coreclr/src/inc/cordbpriv.h +++ b/src/coreclr/src/inc/cordbpriv.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* ------------------------------------------------------------------------- * * cordbpriv.h -- header file for private Debugger data shared by various diff --git a/src/coreclr/src/inc/cordebug.idl b/src/coreclr/src/inc/cordebug.idl index be745368f2bb..857f0dee2ed0 100644 --- a/src/coreclr/src/inc/cordebug.idl +++ b/src/coreclr/src/inc/cordebug.idl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /***************************************************************************** ** ** @@ -2507,6 +2506,7 @@ typedef enum CorDebugGenerationTypes CorDebug_Gen1 = 1, CorDebug_Gen2 = 2, CorDebug_LOH = 3, + CorDebug_POH = 4, } CorDebugGenerationTypes; typedef struct _COR_SEGMENT diff --git a/src/coreclr/src/inc/cordebuginfo.h b/src/coreclr/src/inc/cordebuginfo.h index 32df25371c70..ae08b2a88545 100644 --- a/src/coreclr/src/inc/cordebuginfo.h +++ b/src/coreclr/src/inc/cordebuginfo.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // Keep in sync with https://github.com/dotnet/corert/blob/master/src/Native/ObjWriter/cordebuginfo.h diff --git a/src/coreclr/src/inc/coredistools.h b/src/coreclr/src/inc/coredistools.h index fbca14fd56c6..10e9687e67d4 100644 --- a/src/coreclr/src/inc/coredistools.h +++ b/src/coreclr/src/inc/coredistools.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //===--------- coredistools.h - Dissassembly tools for CoreClr ------------===// // diff --git a/src/coreclr/src/inc/coregen.h b/src/coreclr/src/inc/coregen.h index 0ab034a6dc1c..76889d766eb2 100644 --- a/src/coreclr/src/inc/coregen.h +++ b/src/coreclr/src/inc/coregen.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ngencommon.h - cross-compilation enablement structures. // diff --git a/src/coreclr/src/inc/corexcep.h b/src/coreclr/src/inc/corexcep.h index bdfa8cf5ebc7..faca6b49c593 100644 --- a/src/coreclr/src/inc/corexcep.h +++ b/src/coreclr/src/inc/corexcep.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /********************************************************************* ** ** diff --git a/src/coreclr/src/inc/corhdr.h b/src/coreclr/src/inc/corhdr.h index ce6b0ce1f3f1..c410f4026de6 100644 --- a/src/coreclr/src/inc/corhdr.h +++ b/src/coreclr/src/inc/corhdr.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /***************************************************************************** ** ** @@ -964,7 +963,7 @@ typedef enum CorCallingConvention IMAGE_CEE_CS_CALLCONV_FIELD = 0x6, IMAGE_CEE_CS_CALLCONV_LOCAL_SIG = 0x7, IMAGE_CEE_CS_CALLCONV_PROPERTY = 0x8, - IMAGE_CEE_CS_CALLCONV_UNMGD = 0x9, + IMAGE_CEE_CS_CALLCONV_UNMANAGED = 0x9, // Unmanaged calling convention encoded as modopts IMAGE_CEE_CS_CALLCONV_GENERICINST = 0xa, // generic method instantiation IMAGE_CEE_CS_CALLCONV_NATIVEVARARG = 0xb, // used ONLY for 64bit vararg PInvoke calls IMAGE_CEE_CS_CALLCONV_MAX = 0xc, // first invalid calling convention @@ -1939,4 +1938,3 @@ typedef struct COR_SECATTR { } COR_SECATTR; #endif // __CORHDR_H__ - diff --git a/src/coreclr/src/inc/corhlpr.cpp b/src/coreclr/src/inc/corhlpr.cpp index da6700c121bc..f9559cec6a70 100644 --- a/src/coreclr/src/inc/corhlpr.cpp +++ b/src/coreclr/src/inc/corhlpr.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /**************************************************************************** ** ** diff --git a/src/coreclr/src/inc/corhlpr.h b/src/coreclr/src/inc/corhlpr.h index 0ef8fbf0e92f..450514da95c1 100644 --- a/src/coreclr/src/inc/corhlpr.h +++ b/src/coreclr/src/inc/corhlpr.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /***************************************************************************** ** ** diff --git a/src/coreclr/src/inc/corhlprpriv.cpp b/src/coreclr/src/inc/corhlprpriv.cpp index 51f49e1d38a6..2360e416346d 100644 --- a/src/coreclr/src/inc/corhlprpriv.cpp +++ b/src/coreclr/src/inc/corhlprpriv.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /**************************************************************************** ** ** diff --git a/src/coreclr/src/inc/corhlprpriv.h b/src/coreclr/src/inc/corhlprpriv.h index 7b9e5f1f8856..056bca27f442 100644 --- a/src/coreclr/src/inc/corhlprpriv.h +++ b/src/coreclr/src/inc/corhlprpriv.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /***************************************************************************** ** ** diff --git a/src/coreclr/src/inc/corhost.h b/src/coreclr/src/inc/corhost.h index 4c920cae2266..57ffbe30c3a8 100644 --- a/src/coreclr/src/inc/corhost.h +++ b/src/coreclr/src/inc/corhost.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/inc/corimage.h b/src/coreclr/src/inc/corimage.h index 8ec275502d66..7304afb83f45 100644 --- a/src/coreclr/src/inc/corimage.h +++ b/src/coreclr/src/inc/corimage.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/inc/corinfo.h b/src/coreclr/src/inc/corinfo.h index d9d4f777eeca..f7f6d8ecf2ea 100644 --- a/src/coreclr/src/inc/corinfo.h +++ b/src/coreclr/src/inc/corinfo.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // @@ -217,12 +216,12 @@ TODO: Talk about initializing strutures before use #endif #endif -SELECTANY const GUID JITEEVersionIdentifier = { /* 2ca8d539-5db9-4831-8f1b-ade425f036bd */ - 0x2ca8d539, - 0x5db9, - 0x4831, - {0x8f, 0x1b, 0xad, 0xe4, 0x25, 0xf0, 0x36, 0xbd} - }; +SELECTANY const GUID JITEEVersionIdentifier = { /* 7af97117-55be-4c76-afb2-e26261cb140e */ + 0x7af97117, + 0x55be, + 0x4c76, + { 0xaf, 0xb2, 0xe2, 0x62, 0x61, 0xcb, 0x14, 0x0e } +}; ////////////////////////////////////////////////////////////////////////////////////////////////////////// // @@ -722,6 +721,7 @@ enum CorInfoCallConv CORINFO_CALLCONV_FIELD = 0x6, CORINFO_CALLCONV_LOCAL_SIG = 0x7, CORINFO_CALLCONV_PROPERTY = 0x8, + CORINFO_CALLCONV_UNMANAGED = 0x9, CORINFO_CALLCONV_NATIVEVARARG = 0xb, // used ONLY for IL stub PInvoke vararg calls CORINFO_CALLCONV_MASK = 0x0f, // Calling convention is bottom 4 bits @@ -1038,9 +1038,8 @@ enum CorInfoInitClassResult CORINFO_INITCLASS_NOT_REQUIRED = 0x00, // No class initialization required, but the class is not actually initialized yet // (e.g. we are guaranteed to run the static constructor in method prolog) CORINFO_INITCLASS_INITIALIZED = 0x01, // Class initialized - CORINFO_INITCLASS_SPECULATIVE = 0x02, // Class may be initialized speculatively - CORINFO_INITCLASS_USE_HELPER = 0x04, // The JIT must insert class initialization helper call. - CORINFO_INITCLASS_DONT_INLINE = 0x08, // The JIT should not inline the method requesting the class initialization. The class + CORINFO_INITCLASS_USE_HELPER = 0x02, // The JIT must insert class initialization helper call. + CORINFO_INITCLASS_DONT_INLINE = 0x04, // The JIT should not inline the method requesting the class initialization. The class // initialization requires helper class now, but will not require initialization // if the method is compiled standalone. Or the method cannot be inlined due to some // requirement around class initialization such as shared generics. @@ -1105,9 +1104,7 @@ typedef struct CORINFO_VarArgInfo * CORINFO_VARARGS_HANDLE; // Generic tokens are resolved with respect to a context, which is usually the method // being compiled. The CORINFO_CONTEXT_HANDLE indicates which exact instantiation // (or the open instantiation) is being referred to. -// CORINFO_CONTEXT_HANDLE is more tightly scoped than CORINFO_MODULE_HANDLE. For cases -// where the exact instantiation does not matter, CORINFO_MODULE_HANDLE is used. -typedef CORINFO_METHOD_HANDLE CORINFO_CONTEXT_HANDLE; +typedef struct CORINFO_CONTEXT_STRUCT_* CORINFO_CONTEXT_HANDLE; typedef struct CORINFO_DEPENDENCY_STRUCT_ { @@ -1124,6 +1121,7 @@ enum CorInfoContextFlags CORINFO_CONTEXTFLAGS_MASK = 0x01 }; +#define METHOD_BEING_COMPILED_CONTEXT() ((CORINFO_CONTEXT_HANDLE)1) #define MAKE_CLASSCONTEXT(c) (CORINFO_CONTEXT_HANDLE((size_t) (c) | CORINFO_CONTEXTFLAGS_CLASS)) #define MAKE_METHODCONTEXT(m) (CORINFO_CONTEXT_HANDLE((size_t) (m) | CORINFO_CONTEXTFLAGS_METHOD)) @@ -1254,6 +1252,7 @@ enum CORINFO_RUNTIME_LOOKUP_KIND CORINFO_LOOKUP_THISOBJ, CORINFO_LOOKUP_METHODPARAM, CORINFO_LOOKUP_CLASSPARAM, + CORINFO_LOOKUP_NOT_SUPPORTED, // Returned for attempts to inline dictionary lookups }; struct CORINFO_LOOKUP_KIND @@ -2462,8 +2461,8 @@ class ICorStaticInfo CORINFO_FIELD_HANDLE field, // Non-NULL - inquire about cctor trigger before static field access // NULL - inquire about cctor trigger in method prolog CORINFO_METHOD_HANDLE method, // Method referencing the field or prolog - CORINFO_CONTEXT_HANDLE context, // Exact context of method - BOOL speculative = FALSE // TRUE means don't actually run it + // NULL - method being compiled + CORINFO_CONTEXT_HANDLE context // Exact context of method ) = 0; // This used to be called "loadClass". This records the fact diff --git a/src/coreclr/src/inc/corinfoinstructionset.h b/src/coreclr/src/inc/corinfoinstructionset.h index 8e667bc29b07..c292403b9e1c 100644 --- a/src/coreclr/src/inc/corinfoinstructionset.h +++ b/src/coreclr/src/inc/corinfoinstructionset.h @@ -1,7 +1,5 @@ - // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // DO NOT EDIT THIS FILE! IT IS AUTOGENERATED // FROM /src/coreclr/src/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt @@ -19,17 +17,24 @@ enum CORINFO_InstructionSet InstructionSet_NONE = 63, #ifdef TARGET_ARM64 InstructionSet_ArmBase=1, - InstructionSet_ArmBase_Arm64=2, - InstructionSet_AdvSimd=3, - InstructionSet_AdvSimd_Arm64=4, - InstructionSet_Aes=5, - InstructionSet_Crc32=6, - InstructionSet_Crc32_Arm64=7, - InstructionSet_Sha1=8, - InstructionSet_Sha256=9, - InstructionSet_Atomics=10, - InstructionSet_Vector64=11, - InstructionSet_Vector128=12, + InstructionSet_AdvSimd=2, + InstructionSet_Aes=3, + InstructionSet_Crc32=4, + InstructionSet_Dp=5, + InstructionSet_Rdm=6, + InstructionSet_Sha1=7, + InstructionSet_Sha256=8, + InstructionSet_Atomics=9, + InstructionSet_Vector64=10, + InstructionSet_Vector128=11, + InstructionSet_ArmBase_Arm64=12, + InstructionSet_AdvSimd_Arm64=13, + InstructionSet_Aes_Arm64=14, + InstructionSet_Crc32_Arm64=15, + InstructionSet_Dp_Arm64=16, + InstructionSet_Rdm_Arm64=17, + InstructionSet_Sha1_Arm64=18, + InstructionSet_Sha256_Arm64=19, #endif // TARGET_ARM64 #ifdef TARGET_AMD64 InstructionSet_X86Base=1, @@ -51,14 +56,21 @@ enum CORINFO_InstructionSet InstructionSet_Vector128=17, InstructionSet_Vector256=18, InstructionSet_X86Base_X64=19, - InstructionSet_BMI1_X64=20, - InstructionSet_BMI2_X64=21, - InstructionSet_LZCNT_X64=22, - InstructionSet_POPCNT_X64=23, - InstructionSet_SSE_X64=24, - InstructionSet_SSE2_X64=25, - InstructionSet_SSE41_X64=26, - InstructionSet_SSE42_X64=27, + InstructionSet_SSE_X64=20, + InstructionSet_SSE2_X64=21, + InstructionSet_SSE3_X64=22, + InstructionSet_SSSE3_X64=23, + InstructionSet_SSE41_X64=24, + InstructionSet_SSE42_X64=25, + InstructionSet_AVX_X64=26, + InstructionSet_AVX2_X64=27, + InstructionSet_AES_X64=28, + InstructionSet_BMI1_X64=29, + InstructionSet_BMI2_X64=30, + InstructionSet_FMA_X64=31, + InstructionSet_LZCNT_X64=32, + InstructionSet_PCLMULQDQ_X64=33, + InstructionSet_POPCNT_X64=34, #endif // TARGET_AMD64 #ifdef TARGET_X86 InstructionSet_X86Base=1, @@ -80,14 +92,21 @@ enum CORINFO_InstructionSet InstructionSet_Vector128=17, InstructionSet_Vector256=18, InstructionSet_X86Base_X64=19, - InstructionSet_BMI1_X64=20, - InstructionSet_BMI2_X64=21, - InstructionSet_LZCNT_X64=22, - InstructionSet_POPCNT_X64=23, - InstructionSet_SSE_X64=24, - InstructionSet_SSE2_X64=25, - InstructionSet_SSE41_X64=26, - InstructionSet_SSE42_X64=27, + InstructionSet_SSE_X64=20, + InstructionSet_SSE2_X64=21, + InstructionSet_SSE3_X64=22, + InstructionSet_SSSE3_X64=23, + InstructionSet_SSE41_X64=24, + InstructionSet_SSE42_X64=25, + InstructionSet_AVX_X64=26, + InstructionSet_AVX2_X64=27, + InstructionSet_AES_X64=28, + InstructionSet_BMI1_X64=29, + InstructionSet_BMI2_X64=30, + InstructionSet_FMA_X64=31, + InstructionSet_LZCNT_X64=32, + InstructionSet_PCLMULQDQ_X64=33, + InstructionSet_POPCNT_X64=34, #endif // TARGET_X86 }; @@ -139,8 +158,18 @@ struct CORINFO_InstructionSetFlags AddInstructionSet(InstructionSet_ArmBase_Arm64); if (HasInstructionSet(InstructionSet_AdvSimd)) AddInstructionSet(InstructionSet_AdvSimd_Arm64); + if (HasInstructionSet(InstructionSet_Aes)) + AddInstructionSet(InstructionSet_Aes_Arm64); if (HasInstructionSet(InstructionSet_Crc32)) AddInstructionSet(InstructionSet_Crc32_Arm64); + if (HasInstructionSet(InstructionSet_Dp)) + AddInstructionSet(InstructionSet_Dp_Arm64); + if (HasInstructionSet(InstructionSet_Rdm)) + AddInstructionSet(InstructionSet_Rdm_Arm64); + if (HasInstructionSet(InstructionSet_Sha1)) + AddInstructionSet(InstructionSet_Sha1_Arm64); + if (HasInstructionSet(InstructionSet_Sha256)) + AddInstructionSet(InstructionSet_Sha256_Arm64); #endif // TARGET_ARM64 #ifdef TARGET_AMD64 if (HasInstructionSet(InstructionSet_X86Base)) @@ -149,16 +178,30 @@ struct CORINFO_InstructionSetFlags AddInstructionSet(InstructionSet_SSE_X64); if (HasInstructionSet(InstructionSet_SSE2)) AddInstructionSet(InstructionSet_SSE2_X64); + if (HasInstructionSet(InstructionSet_SSE3)) + AddInstructionSet(InstructionSet_SSE3_X64); + if (HasInstructionSet(InstructionSet_SSSE3)) + AddInstructionSet(InstructionSet_SSSE3_X64); if (HasInstructionSet(InstructionSet_SSE41)) AddInstructionSet(InstructionSet_SSE41_X64); if (HasInstructionSet(InstructionSet_SSE42)) AddInstructionSet(InstructionSet_SSE42_X64); + if (HasInstructionSet(InstructionSet_AVX)) + AddInstructionSet(InstructionSet_AVX_X64); + if (HasInstructionSet(InstructionSet_AVX2)) + AddInstructionSet(InstructionSet_AVX2_X64); + if (HasInstructionSet(InstructionSet_AES)) + AddInstructionSet(InstructionSet_AES_X64); if (HasInstructionSet(InstructionSet_BMI1)) AddInstructionSet(InstructionSet_BMI1_X64); if (HasInstructionSet(InstructionSet_BMI2)) AddInstructionSet(InstructionSet_BMI2_X64); + if (HasInstructionSet(InstructionSet_FMA)) + AddInstructionSet(InstructionSet_FMA_X64); if (HasInstructionSet(InstructionSet_LZCNT)) AddInstructionSet(InstructionSet_LZCNT_X64); + if (HasInstructionSet(InstructionSet_PCLMULQDQ)) + AddInstructionSet(InstructionSet_PCLMULQDQ_X64); if (HasInstructionSet(InstructionSet_POPCNT)) AddInstructionSet(InstructionSet_POPCNT_X64); #endif // TARGET_AMD64 @@ -194,16 +237,40 @@ inline CORINFO_InstructionSetFlags EnsureInstructionSetFlagsAreValid(CORINFO_Ins resultflags.RemoveInstructionSet(InstructionSet_AdvSimd); if (resultflags.HasInstructionSet(InstructionSet_AdvSimd_Arm64) && !resultflags.HasInstructionSet(InstructionSet_AdvSimd)) resultflags.RemoveInstructionSet(InstructionSet_AdvSimd_Arm64); + if (resultflags.HasInstructionSet(InstructionSet_Aes) && !resultflags.HasInstructionSet(InstructionSet_Aes_Arm64)) + resultflags.RemoveInstructionSet(InstructionSet_Aes); + if (resultflags.HasInstructionSet(InstructionSet_Aes_Arm64) && !resultflags.HasInstructionSet(InstructionSet_Aes)) + resultflags.RemoveInstructionSet(InstructionSet_Aes_Arm64); if (resultflags.HasInstructionSet(InstructionSet_Crc32) && !resultflags.HasInstructionSet(InstructionSet_Crc32_Arm64)) resultflags.RemoveInstructionSet(InstructionSet_Crc32); if (resultflags.HasInstructionSet(InstructionSet_Crc32_Arm64) && !resultflags.HasInstructionSet(InstructionSet_Crc32)) resultflags.RemoveInstructionSet(InstructionSet_Crc32_Arm64); + if (resultflags.HasInstructionSet(InstructionSet_Dp) && !resultflags.HasInstructionSet(InstructionSet_Dp_Arm64)) + resultflags.RemoveInstructionSet(InstructionSet_Dp); + if (resultflags.HasInstructionSet(InstructionSet_Dp_Arm64) && !resultflags.HasInstructionSet(InstructionSet_Dp)) + resultflags.RemoveInstructionSet(InstructionSet_Dp_Arm64); + if (resultflags.HasInstructionSet(InstructionSet_Rdm) && !resultflags.HasInstructionSet(InstructionSet_Rdm_Arm64)) + resultflags.RemoveInstructionSet(InstructionSet_Rdm); + if (resultflags.HasInstructionSet(InstructionSet_Rdm_Arm64) && !resultflags.HasInstructionSet(InstructionSet_Rdm)) + resultflags.RemoveInstructionSet(InstructionSet_Rdm_Arm64); + if (resultflags.HasInstructionSet(InstructionSet_Sha1) && !resultflags.HasInstructionSet(InstructionSet_Sha1_Arm64)) + resultflags.RemoveInstructionSet(InstructionSet_Sha1); + if (resultflags.HasInstructionSet(InstructionSet_Sha1_Arm64) && !resultflags.HasInstructionSet(InstructionSet_Sha1)) + resultflags.RemoveInstructionSet(InstructionSet_Sha1_Arm64); + if (resultflags.HasInstructionSet(InstructionSet_Sha256) && !resultflags.HasInstructionSet(InstructionSet_Sha256_Arm64)) + resultflags.RemoveInstructionSet(InstructionSet_Sha256); + if (resultflags.HasInstructionSet(InstructionSet_Sha256_Arm64) && !resultflags.HasInstructionSet(InstructionSet_Sha256)) + resultflags.RemoveInstructionSet(InstructionSet_Sha256_Arm64); if (resultflags.HasInstructionSet(InstructionSet_AdvSimd) && !resultflags.HasInstructionSet(InstructionSet_ArmBase)) resultflags.RemoveInstructionSet(InstructionSet_AdvSimd); if (resultflags.HasInstructionSet(InstructionSet_Aes) && !resultflags.HasInstructionSet(InstructionSet_ArmBase)) resultflags.RemoveInstructionSet(InstructionSet_Aes); if (resultflags.HasInstructionSet(InstructionSet_Crc32) && !resultflags.HasInstructionSet(InstructionSet_ArmBase)) resultflags.RemoveInstructionSet(InstructionSet_Crc32); + if (resultflags.HasInstructionSet(InstructionSet_Dp) && !resultflags.HasInstructionSet(InstructionSet_AdvSimd)) + resultflags.RemoveInstructionSet(InstructionSet_Dp); + if (resultflags.HasInstructionSet(InstructionSet_Rdm) && !resultflags.HasInstructionSet(InstructionSet_AdvSimd)) + resultflags.RemoveInstructionSet(InstructionSet_Rdm); if (resultflags.HasInstructionSet(InstructionSet_Sha1) && !resultflags.HasInstructionSet(InstructionSet_ArmBase)) resultflags.RemoveInstructionSet(InstructionSet_Sha1); if (resultflags.HasInstructionSet(InstructionSet_Sha256) && !resultflags.HasInstructionSet(InstructionSet_ArmBase)) @@ -222,6 +289,14 @@ inline CORINFO_InstructionSetFlags EnsureInstructionSetFlagsAreValid(CORINFO_Ins resultflags.RemoveInstructionSet(InstructionSet_SSE2); if (resultflags.HasInstructionSet(InstructionSet_SSE2_X64) && !resultflags.HasInstructionSet(InstructionSet_SSE2)) resultflags.RemoveInstructionSet(InstructionSet_SSE2_X64); + if (resultflags.HasInstructionSet(InstructionSet_SSE3) && !resultflags.HasInstructionSet(InstructionSet_SSE3_X64)) + resultflags.RemoveInstructionSet(InstructionSet_SSE3); + if (resultflags.HasInstructionSet(InstructionSet_SSE3_X64) && !resultflags.HasInstructionSet(InstructionSet_SSE3)) + resultflags.RemoveInstructionSet(InstructionSet_SSE3_X64); + if (resultflags.HasInstructionSet(InstructionSet_SSSE3) && !resultflags.HasInstructionSet(InstructionSet_SSSE3_X64)) + resultflags.RemoveInstructionSet(InstructionSet_SSSE3); + if (resultflags.HasInstructionSet(InstructionSet_SSSE3_X64) && !resultflags.HasInstructionSet(InstructionSet_SSSE3)) + resultflags.RemoveInstructionSet(InstructionSet_SSSE3_X64); if (resultflags.HasInstructionSet(InstructionSet_SSE41) && !resultflags.HasInstructionSet(InstructionSet_SSE41_X64)) resultflags.RemoveInstructionSet(InstructionSet_SSE41); if (resultflags.HasInstructionSet(InstructionSet_SSE41_X64) && !resultflags.HasInstructionSet(InstructionSet_SSE41)) @@ -230,6 +305,18 @@ inline CORINFO_InstructionSetFlags EnsureInstructionSetFlagsAreValid(CORINFO_Ins resultflags.RemoveInstructionSet(InstructionSet_SSE42); if (resultflags.HasInstructionSet(InstructionSet_SSE42_X64) && !resultflags.HasInstructionSet(InstructionSet_SSE42)) resultflags.RemoveInstructionSet(InstructionSet_SSE42_X64); + if (resultflags.HasInstructionSet(InstructionSet_AVX) && !resultflags.HasInstructionSet(InstructionSet_AVX_X64)) + resultflags.RemoveInstructionSet(InstructionSet_AVX); + if (resultflags.HasInstructionSet(InstructionSet_AVX_X64) && !resultflags.HasInstructionSet(InstructionSet_AVX)) + resultflags.RemoveInstructionSet(InstructionSet_AVX_X64); + if (resultflags.HasInstructionSet(InstructionSet_AVX2) && !resultflags.HasInstructionSet(InstructionSet_AVX2_X64)) + resultflags.RemoveInstructionSet(InstructionSet_AVX2); + if (resultflags.HasInstructionSet(InstructionSet_AVX2_X64) && !resultflags.HasInstructionSet(InstructionSet_AVX2)) + resultflags.RemoveInstructionSet(InstructionSet_AVX2_X64); + if (resultflags.HasInstructionSet(InstructionSet_AES) && !resultflags.HasInstructionSet(InstructionSet_AES_X64)) + resultflags.RemoveInstructionSet(InstructionSet_AES); + if (resultflags.HasInstructionSet(InstructionSet_AES_X64) && !resultflags.HasInstructionSet(InstructionSet_AES)) + resultflags.RemoveInstructionSet(InstructionSet_AES_X64); if (resultflags.HasInstructionSet(InstructionSet_BMI1) && !resultflags.HasInstructionSet(InstructionSet_BMI1_X64)) resultflags.RemoveInstructionSet(InstructionSet_BMI1); if (resultflags.HasInstructionSet(InstructionSet_BMI1_X64) && !resultflags.HasInstructionSet(InstructionSet_BMI1)) @@ -238,10 +325,18 @@ inline CORINFO_InstructionSetFlags EnsureInstructionSetFlagsAreValid(CORINFO_Ins resultflags.RemoveInstructionSet(InstructionSet_BMI2); if (resultflags.HasInstructionSet(InstructionSet_BMI2_X64) && !resultflags.HasInstructionSet(InstructionSet_BMI2)) resultflags.RemoveInstructionSet(InstructionSet_BMI2_X64); + if (resultflags.HasInstructionSet(InstructionSet_FMA) && !resultflags.HasInstructionSet(InstructionSet_FMA_X64)) + resultflags.RemoveInstructionSet(InstructionSet_FMA); + if (resultflags.HasInstructionSet(InstructionSet_FMA_X64) && !resultflags.HasInstructionSet(InstructionSet_FMA)) + resultflags.RemoveInstructionSet(InstructionSet_FMA_X64); if (resultflags.HasInstructionSet(InstructionSet_LZCNT) && !resultflags.HasInstructionSet(InstructionSet_LZCNT_X64)) resultflags.RemoveInstructionSet(InstructionSet_LZCNT); if (resultflags.HasInstructionSet(InstructionSet_LZCNT_X64) && !resultflags.HasInstructionSet(InstructionSet_LZCNT)) resultflags.RemoveInstructionSet(InstructionSet_LZCNT_X64); + if (resultflags.HasInstructionSet(InstructionSet_PCLMULQDQ) && !resultflags.HasInstructionSet(InstructionSet_PCLMULQDQ_X64)) + resultflags.RemoveInstructionSet(InstructionSet_PCLMULQDQ); + if (resultflags.HasInstructionSet(InstructionSet_PCLMULQDQ_X64) && !resultflags.HasInstructionSet(InstructionSet_PCLMULQDQ)) + resultflags.RemoveInstructionSet(InstructionSet_PCLMULQDQ_X64); if (resultflags.HasInstructionSet(InstructionSet_POPCNT) && !resultflags.HasInstructionSet(InstructionSet_POPCNT_X64)) resultflags.RemoveInstructionSet(InstructionSet_POPCNT); if (resultflags.HasInstructionSet(InstructionSet_POPCNT_X64) && !resultflags.HasInstructionSet(InstructionSet_POPCNT)) @@ -334,14 +429,28 @@ inline const char *InstructionSetToString(CORINFO_InstructionSet instructionSet) return "AdvSimd_Arm64"; case InstructionSet_Aes : return "Aes"; + case InstructionSet_Aes_Arm64 : + return "Aes_Arm64"; case InstructionSet_Crc32 : return "Crc32"; case InstructionSet_Crc32_Arm64 : return "Crc32_Arm64"; + case InstructionSet_Dp : + return "Dp"; + case InstructionSet_Dp_Arm64 : + return "Dp_Arm64"; + case InstructionSet_Rdm : + return "Rdm"; + case InstructionSet_Rdm_Arm64 : + return "Rdm_Arm64"; case InstructionSet_Sha1 : return "Sha1"; + case InstructionSet_Sha1_Arm64 : + return "Sha1_Arm64"; case InstructionSet_Sha256 : return "Sha256"; + case InstructionSet_Sha256_Arm64 : + return "Sha256_Arm64"; case InstructionSet_Atomics : return "Atomics"; case InstructionSet_Vector64 : @@ -364,8 +473,12 @@ inline const char *InstructionSetToString(CORINFO_InstructionSet instructionSet) return "SSE2_X64"; case InstructionSet_SSE3 : return "SSE3"; + case InstructionSet_SSE3_X64 : + return "SSE3_X64"; case InstructionSet_SSSE3 : return "SSSE3"; + case InstructionSet_SSSE3_X64 : + return "SSSE3_X64"; case InstructionSet_SSE41 : return "SSE41"; case InstructionSet_SSE41_X64 : @@ -376,10 +489,16 @@ inline const char *InstructionSetToString(CORINFO_InstructionSet instructionSet) return "SSE42_X64"; case InstructionSet_AVX : return "AVX"; + case InstructionSet_AVX_X64 : + return "AVX_X64"; case InstructionSet_AVX2 : return "AVX2"; + case InstructionSet_AVX2_X64 : + return "AVX2_X64"; case InstructionSet_AES : return "AES"; + case InstructionSet_AES_X64 : + return "AES_X64"; case InstructionSet_BMI1 : return "BMI1"; case InstructionSet_BMI1_X64 : @@ -390,12 +509,16 @@ inline const char *InstructionSetToString(CORINFO_InstructionSet instructionSet) return "BMI2_X64"; case InstructionSet_FMA : return "FMA"; + case InstructionSet_FMA_X64 : + return "FMA_X64"; case InstructionSet_LZCNT : return "LZCNT"; case InstructionSet_LZCNT_X64 : return "LZCNT_X64"; case InstructionSet_PCLMULQDQ : return "PCLMULQDQ"; + case InstructionSet_PCLMULQDQ_X64 : + return "PCLMULQDQ_X64"; case InstructionSet_POPCNT : return "POPCNT"; case InstructionSet_POPCNT_X64 : @@ -466,6 +589,8 @@ inline CORINFO_InstructionSet InstructionSetFromR2RInstructionSet(ReadyToRunInst case READYTORUN_INSTRUCTION_AdvSimd: return InstructionSet_AdvSimd; case READYTORUN_INSTRUCTION_Aes: return InstructionSet_Aes; case READYTORUN_INSTRUCTION_Crc32: return InstructionSet_Crc32; + case READYTORUN_INSTRUCTION_Dp: return InstructionSet_Dp; + case READYTORUN_INSTRUCTION_Rdm: return InstructionSet_Rdm; case READYTORUN_INSTRUCTION_Sha1: return InstructionSet_Sha1; case READYTORUN_INSTRUCTION_Sha256: return InstructionSet_Sha256; case READYTORUN_INSTRUCTION_Atomics: return InstructionSet_Atomics; diff --git a/src/coreclr/src/inc/corjit.h b/src/coreclr/src/inc/corjit.h index 857fa5bc2e11..06948e953430 100644 --- a/src/coreclr/src/inc/corjit.h +++ b/src/coreclr/src/inc/corjit.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*****************************************************************************\ * * diff --git a/src/coreclr/src/inc/corjitflags.h b/src/coreclr/src/inc/corjitflags.h index c363f7380e86..7ec09408b3da 100644 --- a/src/coreclr/src/inc/corjitflags.h +++ b/src/coreclr/src/inc/corjitflags.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. ////////////////////////////////////////////////////////////////////////////////////////////////////////// // diff --git a/src/coreclr/src/inc/corjithost.h b/src/coreclr/src/inc/corjithost.h index 9ed7f7ba5bf7..e70558f9e8e2 100644 --- a/src/coreclr/src/inc/corjithost.h +++ b/src/coreclr/src/inc/corjithost.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __CORJITHOST_H__ #define __CORJITHOST_H__ diff --git a/src/coreclr/src/inc/corpriv.h b/src/coreclr/src/inc/corpriv.h index 61722853d61d..52cf63a0ee07 100644 --- a/src/coreclr/src/inc/corpriv.h +++ b/src/coreclr/src/inc/corpriv.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: CORPRIV.H // diff --git a/src/coreclr/src/inc/corprof.idl b/src/coreclr/src/inc/corprof.idl index 5968e8c22648..74fb80992812 100644 --- a/src/coreclr/src/inc/corprof.idl +++ b/src/coreclr/src/inc/corprof.idl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /************************************************************************************** ** ** @@ -640,11 +639,14 @@ typedef enum // Enables the large object allocation monitoring according to the LOH threshold. COR_PRF_HIGH_MONITOR_LARGEOBJECT_ALLOCATED = 0x00000040, + COR_PRF_HIGH_MONITOR_EVENT_PIPE = 0x00000080, + COR_PRF_HIGH_ALLOWABLE_AFTER_ATTACH = COR_PRF_HIGH_IN_MEMORY_SYMBOLS_UPDATED | COR_PRF_HIGH_MONITOR_DYNAMIC_FUNCTION_UNLOADS | COR_PRF_HIGH_BASIC_GC | COR_PRF_HIGH_MONITOR_GC_MOVED_OBJECTS | - COR_PRF_HIGH_MONITOR_LARGEOBJECT_ALLOCATED, + COR_PRF_HIGH_MONITOR_LARGEOBJECT_ALLOCATED | + COR_PRF_HIGH_MONITOR_EVENT_PIPE, // MONITOR_IMMUTABLE represents all flags that may only be set during initialization. // Trying to change any of these flags elsewhere will result in a @@ -738,9 +740,11 @@ typedef enum typedef UINT_PTR EVENTPIPE_PROVIDER; typedef UINT_PTR EVENTPIPE_EVENT; +typedef UINT64 EVENTPIPE_SESSION; typedef enum { + COR_PRF_EVENTPIPE_OBJECT = 1, // Instance that isn't a value COR_PRF_EVENTPIPE_BOOLEAN = 3, // Boolean COR_PRF_EVENTPIPE_CHAR = 4, // Unicode character COR_PRF_EVENTPIPE_SBYTE = 5, // Signed 8-bit integer @@ -770,6 +774,18 @@ typedef enum COR_PRF_EVENTPIPE_VERBOSE = 5 } COR_PRF_EVENTPIPE_LEVEL; +typedef struct +{ + const WCHAR* providerName; + UINT64 keywords; + UINT32 loggingLevel; + // filterData expects a semicolon delimited string that defines key value pairs + // such as "key1=value1;key2=value2;". Quotes can be used to escape the '=' and ';' + // characters. These key value pairs will be passed in the enable callback to event + // providers + const WCHAR* filterData; +} COR_PRF_EVENTPIPE_PROVIDER_CONFIG; + typedef struct { UINT32 type; @@ -2510,6 +2526,34 @@ interface ICorProfilerCallback9 : ICorProfilerCallback8 HRESULT DynamicMethodUnloaded([in] FunctionID functionId); } +[ + object, + uuid(CEC5B60E-C69C-495F-87F6-84D28EE16FFB), + pointer_default(unique), + local +] +interface ICorProfilerCallback10 : ICorProfilerCallback9 +{ + // This event is triggered whenever an EventPipe event is configured to be delivered. + // + // Documentation Note: All pointers are only valid during the callback + + HRESULT EventPipeEventDelivered( + [in] EVENTPIPE_PROVIDER provider, + [in] DWORD eventId, + [in] DWORD eventVersion, + [in] ULONG cbMetadataBlob, + [in, size_is(cbMetadataBlob)] LPCBYTE metadataBlob, + [in] ULONG cbEventData, + [in, size_is(cbEventData)] LPCBYTE eventData, + [in] LPCGUID pActivityId, + [in] LPCGUID pRelatedActivityId, + [in] ThreadID eventThread, + [in] ULONG numStackFrames, + [in, length_is(numStackFrames)] UINT_PTR stackFrames[]); + + HRESULT EventPipeProviderCreated([in] EVENTPIPE_PROVIDER provider); +} /* * COR_PRF_CODEGEN_FLAGS controls various flags and hooks for a specific @@ -4076,13 +4120,34 @@ interface ICorProfilerInfo11 : ICorProfilerInfo10 ] interface ICorProfilerInfo12 : ICorProfilerInfo11 { + HRESULT EventPipeStartSession( + [in] UINT32 cProviderConfigs, + [in, size_is(cProviderConfigs)] + COR_PRF_EVENTPIPE_PROVIDER_CONFIG pProviderConfigs[], + [in] BOOL requestRundown, + [out] EVENTPIPE_SESSION* pSession); + + HRESULT EventPipeAddProviderToSession( + [in] EVENTPIPE_SESSION session, + [in] COR_PRF_EVENTPIPE_PROVIDER_CONFIG providerConfig); + + HRESULT EventPipeStopSession( + [in] EVENTPIPE_SESSION session); + HRESULT EventPipeCreateProvider( - [in, string] const WCHAR *szName, - [out] EVENTPIPE_PROVIDER *pProviderHandle); + [in, string] const WCHAR *providerName, + [out] EVENTPIPE_PROVIDER *pProvider); + + HRESULT EventPipeGetProviderInfo( + [in] EVENTPIPE_PROVIDER provider, + [in] ULONG cchName, + [out] ULONG *pcchName, + [out, annotation("_Out_writes_to_(cchName, *pcchName)")] + WCHAR providerName[]); HRESULT EventPipeDefineEvent( - [in] EVENTPIPE_PROVIDER provHandle, - [in, string] const WCHAR *szName, + [in] EVENTPIPE_PROVIDER provider, + [in, string] const WCHAR *eventName, [in] UINT32 eventID, [in] UINT64 keywords, [in] UINT32 eventVersion, @@ -4092,10 +4157,10 @@ interface ICorProfilerInfo12 : ICorProfilerInfo11 [in] UINT32 cParamDescs, [in, size_is(cParamDescs)] COR_PRF_EVENTPIPE_PARAM_DESC pParamDescs[], - [out] EVENTPIPE_EVENT *pEventHandle); + [out] EVENTPIPE_EVENT *pEvent); HRESULT EventPipeWriteEvent( - [in] EVENTPIPE_EVENT eventHandle, + [in] EVENTPIPE_EVENT event, [in] UINT32 cData, [in, size_is(cData)] COR_PRF_EVENT_DATA data[], diff --git a/src/coreclr/src/inc/corpub.idl b/src/coreclr/src/inc/corpub.idl index 35f820617bf1..c2563fd281ec 100644 --- a/src/coreclr/src/inc/corpub.idl +++ b/src/coreclr/src/inc/corpub.idl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* -------------------------------------------------------------------------- * * Common Language Runtime Process Publishing Interfaces diff --git a/src/coreclr/src/inc/corsym.idl b/src/coreclr/src/inc/corsym.idl index b8ab805e2a28..0afc1ea41e4a 100644 --- a/src/coreclr/src/inc/corsym.idl +++ b/src/coreclr/src/inc/corsym.idl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* ------------------------------------------------------------------------- * * Common Language Runtime Debugging Symbol Reader/Writer/Binder Interfaces diff --git a/src/coreclr/src/inc/cortypeinfo.h b/src/coreclr/src/inc/cortypeinfo.h index deff42f4c471..e67fdddbef31 100644 --- a/src/coreclr/src/inc/cortypeinfo.h +++ b/src/coreclr/src/inc/cortypeinfo.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // This describes information about the COM+ primitive types diff --git a/src/coreclr/src/inc/crosscomp.h b/src/coreclr/src/inc/crosscomp.h index 93a164c24924..5b6e932fd24f 100644 --- a/src/coreclr/src/inc/crosscomp.h +++ b/src/coreclr/src/inc/crosscomp.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // crosscomp.h - cross-compilation enablement structures. // @@ -374,6 +373,8 @@ typedef struct _T_KNONVOLATILE_CONTEXT_POINTERS { #define DAC_CS_NATIVE_DATA_SIZE 76 #elif defined(TARGET_OSX) && defined(TARGET_AMD64) #define DAC_CS_NATIVE_DATA_SIZE 120 +#elif defined(TARGET_OSX) && defined(TARGET_ARM64) +#define DAC_CS_NATIVE_DATA_SIZE 120 #elif defined(TARGET_FREEBSD) && defined(TARGET_X86) #define DAC_CS_NATIVE_DATA_SIZE 12 #elif defined(TARGET_FREEBSD) && defined(TARGET_AMD64) diff --git a/src/coreclr/src/inc/crsttypes.h b/src/coreclr/src/inc/crsttypes.h index 15ff9d8bfc55..98c38c831f34 100644 --- a/src/coreclr/src/inc/crsttypes.h +++ b/src/coreclr/src/inc/crsttypes.h @@ -1,8 +1,5 @@ -// // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// #ifndef __CRST_TYPES_INCLUDED #define __CRST_TYPES_INCLUDED diff --git a/src/coreclr/src/inc/crtwrap.h b/src/coreclr/src/inc/crtwrap.h index 4daa22f624ad..3a54ccfb803b 100644 --- a/src/coreclr/src/inc/crtwrap.h +++ b/src/coreclr/src/inc/crtwrap.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // CrtWrap.h // diff --git a/src/coreclr/src/inc/cvconst.h b/src/coreclr/src/inc/cvconst.h index 61d7971bd5df..3a0e3b98d92d 100644 --- a/src/coreclr/src/inc/cvconst.h +++ b/src/coreclr/src/inc/cvconst.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // cvconst.h - codeview constant definitions //----------------------------------------------------------------- diff --git a/src/coreclr/src/inc/cvinfo.h b/src/coreclr/src/inc/cvinfo.h index 1be6858ff5c9..1197012dca7f 100644 --- a/src/coreclr/src/inc/cvinfo.h +++ b/src/coreclr/src/inc/cvinfo.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** cvinfo.h - Generic CodeView information definitions * diff --git a/src/coreclr/src/inc/cycletimer.h b/src/coreclr/src/inc/cycletimer.h index 0afa85885cda..d2e897415dbf 100644 --- a/src/coreclr/src/inc/cycletimer.h +++ b/src/coreclr/src/inc/cycletimer.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // CycleTimer has methods related to getting cycle timer values. diff --git a/src/coreclr/src/inc/daccess.h b/src/coreclr/src/inc/daccess.h index f2b37c32db74..02aad3f7baff 100644 --- a/src/coreclr/src/inc/daccess.h +++ b/src/coreclr/src/inc/daccess.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: daccess.h // diff --git a/src/coreclr/src/inc/dacprivate.h b/src/coreclr/src/inc/dacprivate.h index eec8a372e434..2587609228e7 100644 --- a/src/coreclr/src/inc/dacprivate.h +++ b/src/coreclr/src/inc/dacprivate.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // // Internal data access functionality. diff --git a/src/coreclr/src/inc/dacvars.h b/src/coreclr/src/inc/dacvars.h index 8eb1e57a2e6c..f480851e1b27 100644 --- a/src/coreclr/src/inc/dacvars.h +++ b/src/coreclr/src/inc/dacvars.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // This file contains the globals and statics that are visible to DAC. // It is used for the following: // 1. in daccess.h to build the table of DAC globals @@ -135,10 +134,6 @@ DEFINE_DACVAR(ULONG, DWORD, dac__g_TlsIndex, g_TlsIndex) DEFINE_DACVAR(ULONG, PTR_SString, SString__s_Empty, SString::s_Empty) -#ifdef FEATURE_APPX -DEFINE_DACVAR(ULONG, BOOL, dac__g_fAppX, ::g_fAppX) -#endif // FEATURE_APPX - DEFINE_DACVAR(ULONG, INT32, ArrayBase__s_arrayBoundsZero, ArrayBase::s_arrayBoundsZero) DEFINE_DACVAR(ULONG, BOOL, StackwalkCache__s_Enabled, StackwalkCache::s_Enabled) diff --git a/src/coreclr/src/inc/dbgconfigstrings.h b/src/coreclr/src/inc/dbgconfigstrings.h index acbb7eb0acab..1c576c9d029b 100644 --- a/src/coreclr/src/inc/dbgconfigstrings.h +++ b/src/coreclr/src/inc/dbgconfigstrings.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // This header lists the names of the string resources used by the Windows portion of Mac CoreCLR debugging diff --git a/src/coreclr/src/inc/dbgenginemetrics.h b/src/coreclr/src/inc/dbgenginemetrics.h index 954d3b55d45c..ebb7fc140031 100644 --- a/src/coreclr/src/inc/dbgenginemetrics.h +++ b/src/coreclr/src/inc/dbgenginemetrics.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // DbgEngineMetrics.h // diff --git a/src/coreclr/src/inc/dbgmeta.h b/src/coreclr/src/inc/dbgmeta.h index ce7a3bbdf36a..ebe2d2ca55ac 100644 --- a/src/coreclr/src/inc/dbgmeta.h +++ b/src/coreclr/src/inc/dbgmeta.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* ------------------------------------------------------------------------- * * DbgMeta.h - header file for debugger metadata routines diff --git a/src/coreclr/src/inc/dbgportable.h b/src/coreclr/src/inc/dbgportable.h index 4a035642c2f8..b9306ca9b0ca 100644 --- a/src/coreclr/src/inc/dbgportable.h +++ b/src/coreclr/src/inc/dbgportable.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __DBG_PORTABLE_INCLUDED #define __DBG_PORTABLE_INCLUDED diff --git a/src/coreclr/src/inc/debugmacros.h b/src/coreclr/src/inc/debugmacros.h index 4fb4fb86711e..e6124828d769 100644 --- a/src/coreclr/src/inc/debugmacros.h +++ b/src/coreclr/src/inc/debugmacros.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // DebugMacros.h // diff --git a/src/coreclr/src/inc/debugmacrosext.h b/src/coreclr/src/inc/debugmacrosext.h index e1aade65b527..54622f5a45c8 100644 --- a/src/coreclr/src/inc/debugmacrosext.h +++ b/src/coreclr/src/inc/debugmacrosext.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // DebugMacrosExt.h // diff --git a/src/coreclr/src/inc/debugreturn.h b/src/coreclr/src/inc/debugreturn.h index b3531692ff18..00c30b62ca6d 100644 --- a/src/coreclr/src/inc/debugreturn.h +++ b/src/coreclr/src/inc/debugreturn.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _DEBUGRETURN_H_ diff --git a/src/coreclr/src/inc/defaultallocator.h b/src/coreclr/src/inc/defaultallocator.h index ee342dff8ba6..111fb5e7f94c 100644 --- a/src/coreclr/src/inc/defaultallocator.h +++ b/src/coreclr/src/inc/defaultallocator.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _DEFAULTALLOCATOR_H_ #define _DEFAULTALLOCATOR_H_ diff --git a/src/coreclr/src/inc/delayloadhelpers.h b/src/coreclr/src/inc/delayloadhelpers.h index 808172a40b7e..740999926a28 100644 --- a/src/coreclr/src/inc/delayloadhelpers.h +++ b/src/coreclr/src/inc/delayloadhelpers.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/inc/dlwrap.h b/src/coreclr/src/inc/dlwrap.h index 9cf926cb9817..822bd2d814db 100644 --- a/src/coreclr/src/inc/dlwrap.h +++ b/src/coreclr/src/inc/dlwrap.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/inc/ecmakey.h b/src/coreclr/src/inc/ecmakey.h index ecff9504511b..a4ec51be1958 100644 --- a/src/coreclr/src/inc/ecmakey.h +++ b/src/coreclr/src/inc/ecmakey.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma once // The byte values of the ECMA pseudo public key and its token. diff --git a/src/coreclr/src/inc/eetwain.h b/src/coreclr/src/inc/eetwain.h index e53f4a66e217..dd3e430f59d3 100644 --- a/src/coreclr/src/inc/eetwain.h +++ b/src/coreclr/src/inc/eetwain.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // // EETwain.h diff --git a/src/coreclr/src/inc/eexcp.h b/src/coreclr/src/inc/eexcp.h index d4052e11ef56..3bb4fde975f9 100644 --- a/src/coreclr/src/inc/eexcp.h +++ b/src/coreclr/src/inc/eexcp.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ==++== // diff --git a/src/coreclr/src/inc/entrypoints.h b/src/coreclr/src/inc/entrypoints.h index c552b664c396..dcd6cb5d0650 100644 --- a/src/coreclr/src/inc/entrypoints.h +++ b/src/coreclr/src/inc/entrypoints.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //----------------------------------------------------------------------------- // Entrypoint markers // Used to identify all external entrypoints into the CLR (via COM, exports, etc) diff --git a/src/coreclr/src/inc/eventtrace.h b/src/coreclr/src/inc/eventtrace.h index 9a4a8187daac..ef999a716c69 100644 --- a/src/coreclr/src/inc/eventtrace.h +++ b/src/coreclr/src/inc/eventtrace.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: eventtrace.h // Abstract: This module implements Event Tracing support. This includes diff --git a/src/coreclr/src/inc/eventtracebase.h b/src/coreclr/src/inc/eventtracebase.h index c11ef5f605fd..771460b2db14 100644 --- a/src/coreclr/src/inc/eventtracebase.h +++ b/src/coreclr/src/inc/eventtracebase.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: eventtracebase.h // Abstract: This module implements base Event Tracing support (excluding some of the diff --git a/src/coreclr/src/inc/ex.h b/src/coreclr/src/inc/ex.h index 6d008c6febec..d7d06781ace4 100644 --- a/src/coreclr/src/inc/ex.h +++ b/src/coreclr/src/inc/ex.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #if !defined(_EX_H_) diff --git a/src/coreclr/src/inc/factory.h b/src/coreclr/src/inc/factory.h index 36c6c81da32f..73b93b4b7481 100644 --- a/src/coreclr/src/inc/factory.h +++ b/src/coreclr/src/inc/factory.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _FACTORY_H_ diff --git a/src/coreclr/src/inc/factory.inl b/src/coreclr/src/inc/factory.inl index f7d0d887b63a..a9b3f97d30af 100644 --- a/src/coreclr/src/inc/factory.inl +++ b/src/coreclr/src/inc/factory.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _FACTORY_INL_ #define _FACTORY_INL_ diff --git a/src/coreclr/src/inc/fixuppointer.h b/src/coreclr/src/inc/fixuppointer.h index 22e02f2962db..920f61852780 100644 --- a/src/coreclr/src/inc/fixuppointer.h +++ b/src/coreclr/src/inc/fixuppointer.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*****************************************************************************\ * * * FixupPointer.h - Fixup pointer holder types * diff --git a/src/coreclr/src/inc/formattype.cpp b/src/coreclr/src/inc/formattype.cpp index 24da3ae5c1ea..1354d8745b31 100644 --- a/src/coreclr/src/inc/formattype.cpp +++ b/src/coreclr/src/inc/formattype.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // @@ -247,17 +246,37 @@ PCCOR_SIGNATURE PrettyPrintSignature( } else { - static const char* const callConvNames[8] = { + const char* const callConvUndefined = (const char*)-1; + static const char* const callConvNames[16] = { "", "unmanaged cdecl ", "unmanaged stdcall ", "unmanaged thiscall ", "unmanaged fastcall ", "vararg ", - " ", - " " + callConvUndefined, // field + callConvUndefined, // local sig + callConvUndefined, // property + "unmanaged ", + callConvUndefined, + callConvUndefined, + callConvUndefined, + callConvUndefined, + callConvUndefined, + callConvUndefined }; - appendStr(out, KEYWORD(callConvNames[callConv & 7])); + static_assert_no_msg(COUNTOF(callConvNames) == (IMAGE_CEE_CS_CALLCONV_MASK + 1)); + + char tmp[32]; + unsigned callConvIdx = callConv & IMAGE_CEE_CS_CALLCONV_MASK; + const char* name_cc = callConvNames[callConvIdx]; + if (name_cc == callConvUndefined) + { + sprintf_s(tmp, COUNTOF(tmp), "callconv(%u) ", callConvIdx); + name_cc = tmp; + } + + appendStr(out, KEYWORD(name_cc)); } if (callConv & IMAGE_CEE_CS_CALLCONV_GENERIC) diff --git a/src/coreclr/src/inc/formattype.h b/src/coreclr/src/inc/formattype.h index 16e72aecaf3a..00dab3a9303b 100644 --- a/src/coreclr/src/inc/formattype.h +++ b/src/coreclr/src/inc/formattype.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _formatType_h #define _formatType_h diff --git a/src/coreclr/src/inc/fstream.h b/src/coreclr/src/inc/fstream.h index ba55775aa5b4..4b43d9522869 100644 --- a/src/coreclr/src/inc/fstream.h +++ b/src/coreclr/src/inc/fstream.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __FSTREAM_H_INCLUDED__ diff --git a/src/coreclr/src/inc/fstring.h b/src/coreclr/src/inc/fstring.h index 88377a8f0019..208f1791f039 100644 --- a/src/coreclr/src/inc/fstring.h +++ b/src/coreclr/src/inc/fstring.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // --------------------------------------------------------------------------- // FString.h (Fast String) // diff --git a/src/coreclr/src/inc/fusion.idl b/src/coreclr/src/inc/fusion.idl index 742148f51fb0..7ffa9837bbd4 100644 --- a/src/coreclr/src/inc/fusion.idl +++ b/src/coreclr/src/inc/fusion.idl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //+--------------------------------------------------------------------------- // @@ -134,9 +133,5 @@ interface IAssemblyName: IUnknown [in] DWORD PropertyId, [out] LPVOID pvProperty, [in, out] LPDWORD pcbProperty); - - HRESULT GetName( - [in, out, annotation("_Inout_")] LPDWORD lpcwBuffer, - [out, annotation("_Out_writes_opt_(*lpcwBuffer)")] WCHAR *pwzName); } diff --git a/src/coreclr/src/inc/gcdecoder.cpp b/src/coreclr/src/inc/gcdecoder.cpp index 5b7dc5bbd06c..765cd098aedf 100644 --- a/src/coreclr/src/inc/gcdecoder.cpp +++ b/src/coreclr/src/inc/gcdecoder.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/src/coreclr/src/inc/gcdump.h b/src/coreclr/src/inc/gcdump.h index 7fada85f1224..49bc61e5bff2 100644 --- a/src/coreclr/src/inc/gcdump.h +++ b/src/coreclr/src/inc/gcdump.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /***************************************************************************** * GCDump.h diff --git a/src/coreclr/src/inc/gcinfo.h b/src/coreclr/src/inc/gcinfo.h index 6d623f2d497f..9a257a502b6f 100644 --- a/src/coreclr/src/inc/gcinfo.h +++ b/src/coreclr/src/inc/gcinfo.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ****************************************************************************** // WARNING!!!: These values are used by SOS in the diagnostics repo. Values should diff --git a/src/coreclr/src/inc/gcinfoarraylist.h b/src/coreclr/src/inc/gcinfoarraylist.h index aa9d85664b51..71664c47c6c9 100644 --- a/src/coreclr/src/inc/gcinfoarraylist.h +++ b/src/coreclr/src/inc/gcinfoarraylist.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _GCINFOARRAYLIST_H_ #define _GCINFOARRAYLIST_H_ diff --git a/src/coreclr/src/inc/gcinfodecoder.h b/src/coreclr/src/inc/gcinfodecoder.h index 8f63cf23715d..3eeeb005b1bd 100644 --- a/src/coreclr/src/inc/gcinfodecoder.h +++ b/src/coreclr/src/inc/gcinfodecoder.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /***************************************************************** * diff --git a/src/coreclr/src/inc/gcinfodumper.h b/src/coreclr/src/inc/gcinfodumper.h index 9b8d94149930..68ed944c1cac 100644 --- a/src/coreclr/src/inc/gcinfodumper.h +++ b/src/coreclr/src/inc/gcinfodumper.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __GCINFODUMPER_H__ #define __GCINFODUMPER_H__ diff --git a/src/coreclr/src/inc/gcinfoencoder.h b/src/coreclr/src/inc/gcinfoencoder.h index 1df36dbc8ba5..c914b71452d4 100644 --- a/src/coreclr/src/inc/gcinfoencoder.h +++ b/src/coreclr/src/inc/gcinfoencoder.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /***************************************************************** * * GC Information Encoding API diff --git a/src/coreclr/src/inc/gcinfotypes.h b/src/coreclr/src/inc/gcinfotypes.h index 91c577ce31c4..65506d5cbc17 100644 --- a/src/coreclr/src/inc/gcinfotypes.h +++ b/src/coreclr/src/inc/gcinfotypes.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __GCINFOTYPES_H__ diff --git a/src/coreclr/src/inc/gcrefmap.h b/src/coreclr/src/inc/gcrefmap.h index d2ba660f259c..8b9872e872a7 100644 --- a/src/coreclr/src/inc/gcrefmap.h +++ b/src/coreclr/src/inc/gcrefmap.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _GCREFMAP_H_ diff --git a/src/coreclr/src/inc/genheaders.cs b/src/coreclr/src/inc/genheaders.cs index 25b042e73cf7..ddd36d247399 100644 --- a/src/coreclr/src/inc/genheaders.cs +++ b/src/coreclr/src/inc/genheaders.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Xml; @@ -158,7 +157,6 @@ private static void ValidationCallBack(object sender, ValidationEventArgs e) { private static void PrintLicenseHeader(StreamWriter SW) { SW.WriteLine("// Licensed to the .NET Foundation under one or more agreements."); SW.WriteLine("// The .NET Foundation licenses this file to you under the MIT license."); - SW.WriteLine("// See the LICENSE file in the project root for more information."); SW.WriteLine(); } diff --git a/src/coreclr/src/inc/genrops.pl b/src/coreclr/src/inc/genrops.pl index adb6f1b87926..f90aee2817f3 100644 --- a/src/coreclr/src/inc/genrops.pl +++ b/src/coreclr/src/inc/genrops.pl @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. # # GENREFOPS.PL # diff --git a/src/coreclr/src/inc/getproductversionnumber.h b/src/coreclr/src/inc/getproductversionnumber.h index de90409db42c..068ed7849307 100644 --- a/src/coreclr/src/inc/getproductversionnumber.h +++ b/src/coreclr/src/inc/getproductversionnumber.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // GetProductVersionNumber.h // diff --git a/src/coreclr/src/inc/guidfromname.h b/src/coreclr/src/inc/guidfromname.h index 2974de44aa73..8f00fef4a181 100644 --- a/src/coreclr/src/inc/guidfromname.h +++ b/src/coreclr/src/inc/guidfromname.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef GUIDFROMNAME_H_ diff --git a/src/coreclr/src/inc/holder.h b/src/coreclr/src/inc/holder.h index a5781d5570dd..b0d7351ae707 100644 --- a/src/coreclr/src/inc/holder.h +++ b/src/coreclr/src/inc/holder.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __HOLDER_H_ @@ -85,12 +84,6 @@ struct AutoExpVisibleValue private: union { - // Only include a class name here if it is customarily referred to through an abstract interface. - -#if defined(FEATURE_APPX) - const class AppXBindResultImpl *_asAppXBindResultImpl; -#endif - const void *_pPreventEmptyUnion; }; }; diff --git a/src/coreclr/src/inc/holderinst.h b/src/coreclr/src/inc/holderinst.h index ee59da0842d3..f4e5e2c0e8bf 100644 --- a/src/coreclr/src/inc/holderinst.h +++ b/src/coreclr/src/inc/holderinst.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __HOLDERINST_H_ diff --git a/src/coreclr/src/inc/iallocator.h b/src/coreclr/src/inc/iallocator.h index 75b80a536732..a5b467a9905b 100644 --- a/src/coreclr/src/inc/iallocator.h +++ b/src/coreclr/src/inc/iallocator.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // We would like to allow "util" collection classes to be usable both // from the VM and from the JIT. The latter case presents a diff --git a/src/coreclr/src/inc/iceefilegen.h b/src/coreclr/src/inc/iceefilegen.h index fe825bab97c3..cb4b5ef868e0 100644 --- a/src/coreclr/src/inc/iceefilegen.h +++ b/src/coreclr/src/inc/iceefilegen.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /***************************************************************************** ** ** diff --git a/src/coreclr/src/inc/il_kywd.h b/src/coreclr/src/inc/il_kywd.h index b7ea4e5b0bf1..e2a2e5546561 100644 --- a/src/coreclr/src/inc/il_kywd.h +++ b/src/coreclr/src/inc/il_kywd.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // // COM+ IL keywords, symbols and values diff --git a/src/coreclr/src/inc/ildbsymlib.h b/src/coreclr/src/inc/ildbsymlib.h index 6c2d4d0edfa2..bc20a71d2e60 100644 --- a/src/coreclr/src/inc/ildbsymlib.h +++ b/src/coreclr/src/inc/ildbsymlib.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // IldbSymLib.h // diff --git a/src/coreclr/src/inc/ilformatter.h b/src/coreclr/src/inc/ilformatter.h index 949f3753b822..93852e6fb730 100644 --- a/src/coreclr/src/inc/ilformatter.h +++ b/src/coreclr/src/inc/ilformatter.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /***************************************************************************/ diff --git a/src/coreclr/src/inc/internalunknownimpl.h b/src/coreclr/src/inc/internalunknownimpl.h index 530b3d14551f..90b6036cd9d0 100644 --- a/src/coreclr/src/inc/internalunknownimpl.h +++ b/src/coreclr/src/inc/internalunknownimpl.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // // InternalUnknownImpl.h diff --git a/src/coreclr/src/inc/intrinsic.h b/src/coreclr/src/inc/intrinsic.h index 50bcd52b28f3..2a13a8f7fcf8 100644 --- a/src/coreclr/src/inc/intrinsic.h +++ b/src/coreclr/src/inc/intrinsic.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // Intrinsic.h // diff --git a/src/coreclr/src/inc/iterator.h b/src/coreclr/src/inc/iterator.h index 9026a680d48e..b7bb142665c4 100644 --- a/src/coreclr/src/inc/iterator.h +++ b/src/coreclr/src/inc/iterator.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // --------------------------------------------------------------------------- // Iterator.h // --------------------------------------------------------------------------- diff --git a/src/coreclr/src/inc/jithelpers.h b/src/coreclr/src/inc/jithelpers.h index 608398ac17ef..5e863e1ec071 100644 --- a/src/coreclr/src/inc/jithelpers.h +++ b/src/coreclr/src/inc/jithelpers.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // Allow multiple inclusion. diff --git a/src/coreclr/src/inc/livedatatarget.h b/src/coreclr/src/inc/livedatatarget.h index a2107c035808..a272b37693af 100644 --- a/src/coreclr/src/inc/livedatatarget.h +++ b/src/coreclr/src/inc/livedatatarget.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // // Define a Data-Target for a live process. diff --git a/src/coreclr/src/inc/llvm/Dwarf.def b/src/coreclr/src/inc/llvm/Dwarf.def index 2bc9ef8621fc..488ef9b04877 100644 --- a/src/coreclr/src/inc/llvm/Dwarf.def +++ b/src/coreclr/src/inc/llvm/Dwarf.def @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================================== // LLVM Release License diff --git a/src/coreclr/src/inc/llvm/Dwarf.h b/src/coreclr/src/inc/llvm/Dwarf.h index 5fa73e931ce8..e22c303ac641 100644 --- a/src/coreclr/src/inc/llvm/Dwarf.h +++ b/src/coreclr/src/inc/llvm/Dwarf.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================================== // LLVM Release License diff --git a/src/coreclr/src/inc/llvm/ELF.h b/src/coreclr/src/inc/llvm/ELF.h index 76c7824208b6..5cb3f82da214 100644 --- a/src/coreclr/src/inc/llvm/ELF.h +++ b/src/coreclr/src/inc/llvm/ELF.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================================== // LLVM Release License diff --git a/src/coreclr/src/inc/loaderheap.h b/src/coreclr/src/inc/loaderheap.h index 97d24f6cd73b..8008a3a829b8 100644 --- a/src/coreclr/src/inc/loaderheap.h +++ b/src/coreclr/src/inc/loaderheap.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // LoaderHeap.h // diff --git a/src/coreclr/src/inc/log.h b/src/coreclr/src/inc/log.h index b2ccce18f310..57d716b5c81f 100644 --- a/src/coreclr/src/inc/log.h +++ b/src/coreclr/src/inc/log.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // Logging Facility diff --git a/src/coreclr/src/inc/loglf.h b/src/coreclr/src/inc/loglf.h index 750de53de92a..f6dc5ce434dc 100644 --- a/src/coreclr/src/inc/loglf.h +++ b/src/coreclr/src/inc/loglf.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // The code in sos.DumpLog depends on the first 32 facility codes // being bit flags sorted in incresing order. diff --git a/src/coreclr/src/inc/longfilepathwrappers.h b/src/coreclr/src/inc/longfilepathwrappers.h index 23033c219663..c4c7700d704b 100644 --- a/src/coreclr/src/inc/longfilepathwrappers.h +++ b/src/coreclr/src/inc/longfilepathwrappers.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _WIN_PATH_APIS_WRAPPER_ #define _WIN_PATH_APIS_WRAPPER_ diff --git a/src/coreclr/src/inc/md5.h b/src/coreclr/src/inc/md5.h index dc82523c1e5f..7829a5998f87 100644 --- a/src/coreclr/src/inc/md5.h +++ b/src/coreclr/src/inc/md5.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // md5.h // diff --git a/src/coreclr/src/inc/mdcommon.h b/src/coreclr/src/inc/mdcommon.h index 45c6f0498f9c..4a375770d90c 100644 --- a/src/coreclr/src/inc/mdcommon.h +++ b/src/coreclr/src/inc/mdcommon.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // MDCommon.h // diff --git a/src/coreclr/src/inc/mdfileformat.h b/src/coreclr/src/inc/mdfileformat.h index b414b0cc1d33..1c306d975780 100644 --- a/src/coreclr/src/inc/mdfileformat.h +++ b/src/coreclr/src/inc/mdfileformat.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // MDFileFormat.h // diff --git a/src/coreclr/src/inc/memorypool.h b/src/coreclr/src/inc/memorypool.h index b398f002ec2a..9e4eb8e6ff9b 100644 --- a/src/coreclr/src/inc/memorypool.h +++ b/src/coreclr/src/inc/memorypool.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _MEMORYPOOL_ diff --git a/src/coreclr/src/inc/memoryrange.h b/src/coreclr/src/inc/memoryrange.h index b3d39aa32d64..ae1d440f6b70 100644 --- a/src/coreclr/src/inc/memoryrange.h +++ b/src/coreclr/src/inc/memoryrange.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // MemoryRange.h // diff --git a/src/coreclr/src/inc/metadata.h b/src/coreclr/src/inc/metadata.h index 662a77ea4d9d..92d1cbc8bae4 100644 --- a/src/coreclr/src/inc/metadata.h +++ b/src/coreclr/src/inc/metadata.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //**************************************************************************** // File: metadata.h // diff --git a/src/coreclr/src/inc/metadataexports.h b/src/coreclr/src/inc/metadataexports.h index 412834746f82..5c0031851591 100644 --- a/src/coreclr/src/inc/metadataexports.h +++ b/src/coreclr/src/inc/metadataexports.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // MDCommon.h // diff --git a/src/coreclr/src/inc/metadatatracker.h b/src/coreclr/src/inc/metadatatracker.h index 8a22bd71f376..6c732767862d 100644 --- a/src/coreclr/src/inc/metadatatracker.h +++ b/src/coreclr/src/inc/metadatatracker.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _METADATATRACKER_H_ #define _METADATATRACKER_H_ diff --git a/src/coreclr/src/inc/metahost.idl b/src/coreclr/src/inc/metahost.idl index 6aeef38f869c..5bc51f6d133e 100644 --- a/src/coreclr/src/inc/metahost.idl +++ b/src/coreclr/src/inc/metahost.idl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /************************************************************************************** ** Motivation for redesigning the shim APIs: ** diff --git a/src/coreclr/src/inc/metamodelpub.h b/src/coreclr/src/inc/metamodelpub.h index 83cc9c6a32f7..003902be696f 100644 --- a/src/coreclr/src/inc/metamodelpub.h +++ b/src/coreclr/src/inc/metamodelpub.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // MetaModelPub.h -- header file for Common Language Runtime metadata. // diff --git a/src/coreclr/src/inc/mpl/type_list b/src/coreclr/src/inc/mpl/type_list index 0e1140f112b0..23306f152d25 100644 --- a/src/coreclr/src/inc/mpl/type_list +++ b/src/coreclr/src/inc/mpl/type_list @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // Used in template metaprogramming, type lists consist of a series of diff --git a/src/coreclr/src/inc/mscorsvc.idl b/src/coreclr/src/inc/mscorsvc.idl index 6cfff8f7c9dc..a7eadbc37baf 100644 --- a/src/coreclr/src/inc/mscorsvc.idl +++ b/src/coreclr/src/inc/mscorsvc.idl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* -------------------------------------------------------------------------- * * Microsoft .NET Framework Service * -------------------------------------------------------------------------- */ @@ -220,24 +219,6 @@ library mscorsvc } -#ifdef FEATURE_APPX - //***************************************************************************** - // ICorSvcAppX contains AppX-related method - //*****************************************************************************[ - - [ - object, - uuid(5c814791-559e-4f7f-83ce-184a4ccbae24), - pointer_default(unique), - ] - interface ICorSvcAppX : IUnknown - { - HRESULT SetPackage([in] BSTR pPackageFullName); - - HRESULT SetLocalAppDataDirectory([in] BSTR pLocalAppDataDirectory); - } -#endif - //***************************************************************************** // ICorSvcLogger is used to log various messages to the service process //*****************************************************************************[ diff --git a/src/coreclr/src/inc/msodw.h b/src/coreclr/src/inc/msodw.h index a1acc2f16f6a..314a935fc019 100644 --- a/src/coreclr/src/inc/msodw.h +++ b/src/coreclr/src/inc/msodw.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma once /**************************************************************************** diff --git a/src/coreclr/src/inc/msodwwrap.h b/src/coreclr/src/inc/msodwwrap.h index 28c724750291..a021a5d43948 100644 --- a/src/coreclr/src/inc/msodwwrap.h +++ b/src/coreclr/src/inc/msodwwrap.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __msodwwrap_h__ #define __msodwwrap_h__ diff --git a/src/coreclr/src/inc/nativevaraccessors.h b/src/coreclr/src/inc/nativevaraccessors.h index 7a3583f8b8a9..d61b069be130 100644 --- a/src/coreclr/src/inc/nativevaraccessors.h +++ b/src/coreclr/src/inc/nativevaraccessors.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // The following are used to read and write data given NativeVarInfo // for primitive types. Don't use these for VALUECLASSes. diff --git a/src/coreclr/src/inc/new.hpp b/src/coreclr/src/inc/new.hpp index 3e6644d18471..09eec5d1ffcf 100644 --- a/src/coreclr/src/inc/new.hpp +++ b/src/coreclr/src/inc/new.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/inc/ngen.h b/src/coreclr/src/inc/ngen.h index 7e49349d2100..9e63b30d4b41 100644 --- a/src/coreclr/src/inc/ngen.h +++ b/src/coreclr/src/inc/ngen.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // This file is the interface to NGen (*N*ative code *G*eneration), // which compiles IL modules to machine code ahead-of-time. diff --git a/src/coreclr/src/inc/nibblemapmacros.h b/src/coreclr/src/inc/nibblemapmacros.h index 7153bc677612..9554b5d1dd9c 100644 --- a/src/coreclr/src/inc/nibblemapmacros.h +++ b/src/coreclr/src/inc/nibblemapmacros.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef NIBBLEMAPMACROS_H_ #define NIBBLEMAPMACROS_H_ diff --git a/src/coreclr/src/inc/nibblestream.h b/src/coreclr/src/inc/nibblestream.h index 7921e9f5117e..2cab74cbe952 100644 --- a/src/coreclr/src/inc/nibblestream.h +++ b/src/coreclr/src/inc/nibblestream.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // NibbleStream reader and writer. diff --git a/src/coreclr/src/inc/nsutilpriv.h b/src/coreclr/src/inc/nsutilpriv.h index 3891bbc3eb0c..519d0acc72f5 100644 --- a/src/coreclr/src/inc/nsutilpriv.h +++ b/src/coreclr/src/inc/nsutilpriv.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // NSUtilPriv.h // diff --git a/src/coreclr/src/inc/opcode.def b/src/coreclr/src/inc/opcode.def index 9d495c28954a..09e969f59fe4 100644 --- a/src/coreclr/src/inc/opcode.def +++ b/src/coreclr/src/inc/opcode.def @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /***************************************************************************** ** ** diff --git a/src/coreclr/src/inc/openum.h b/src/coreclr/src/inc/openum.h index e707da4af2e7..730dfb017703 100644 --- a/src/coreclr/src/inc/openum.h +++ b/src/coreclr/src/inc/openum.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __openum_h__ #define __openum_h__ diff --git a/src/coreclr/src/inc/opinfo.h b/src/coreclr/src/inc/opinfo.h index f19811e69fc9..d2d93f0b41ec 100644 --- a/src/coreclr/src/inc/opinfo.h +++ b/src/coreclr/src/inc/opinfo.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /***************************************************************************/ diff --git a/src/coreclr/src/inc/optdefault.h b/src/coreclr/src/inc/optdefault.h index dd0bd44c0472..af504b660d3e 100644 --- a/src/coreclr/src/inc/optdefault.h +++ b/src/coreclr/src/inc/optdefault.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // Revert optimizations back to default diff --git a/src/coreclr/src/inc/optsmallperfcritical.h b/src/coreclr/src/inc/optsmallperfcritical.h index 44f7c0fa485c..b366674a3c85 100644 --- a/src/coreclr/src/inc/optsmallperfcritical.h +++ b/src/coreclr/src/inc/optsmallperfcritical.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // Set optimizations settings for small performance critical methods diff --git a/src/coreclr/src/inc/ostype.h b/src/coreclr/src/inc/ostype.h index 18ed50a10c03..7ea7187eb1a9 100644 --- a/src/coreclr/src/inc/ostype.h +++ b/src/coreclr/src/inc/ostype.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "staticcontract.h" diff --git a/src/coreclr/src/inc/outstring.h b/src/coreclr/src/inc/outstring.h index 1d6688373495..165c6d8f3575 100644 --- a/src/coreclr/src/inc/outstring.h +++ b/src/coreclr/src/inc/outstring.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*****************************************************************/ diff --git a/src/coreclr/src/inc/palclr.h b/src/coreclr/src/inc/palclr.h index 5978ea167642..40a68dd91384 100644 --- a/src/coreclr/src/inc/palclr.h +++ b/src/coreclr/src/inc/palclr.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: palclr.h // diff --git a/src/coreclr/src/inc/palclr_win.h b/src/coreclr/src/inc/palclr_win.h index 4db25f6eab42..be0b725e1a68 100644 --- a/src/coreclr/src/inc/palclr_win.h +++ b/src/coreclr/src/inc/palclr_win.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: palclr.h // diff --git a/src/coreclr/src/inc/patchpointinfo.h b/src/coreclr/src/inc/patchpointinfo.h index 135ad0135a54..e01446beb429 100644 --- a/src/coreclr/src/inc/patchpointinfo.h +++ b/src/coreclr/src/inc/patchpointinfo.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // -------------------------------------------------------------------------------- // patchpointinfo.h diff --git a/src/coreclr/src/inc/pedecoder.h b/src/coreclr/src/inc/pedecoder.h index c4f4e92b6b61..da5643108acc 100644 --- a/src/coreclr/src/inc/pedecoder.h +++ b/src/coreclr/src/inc/pedecoder.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // -------------------------------------------------------------------------------- // PEDecoder.h // diff --git a/src/coreclr/src/inc/pedecoder.inl b/src/coreclr/src/inc/pedecoder.inl index 09bcfd76a146..1f4b3c513a4b 100644 --- a/src/coreclr/src/inc/pedecoder.inl +++ b/src/coreclr/src/inc/pedecoder.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // -------------------------------------------------------------------------------- // PEDecoder.inl // diff --git a/src/coreclr/src/inc/peinformation.h b/src/coreclr/src/inc/peinformation.h index 80e7f71d6782..48039fd9fe17 100644 --- a/src/coreclr/src/inc/peinformation.h +++ b/src/coreclr/src/inc/peinformation.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // -------------------------------------------------------------------------------- // PEInformation.h // diff --git a/src/coreclr/src/inc/pesectionman.h b/src/coreclr/src/inc/pesectionman.h index 184743d86786..085aef14fc82 100644 --- a/src/coreclr/src/inc/pesectionman.h +++ b/src/coreclr/src/inc/pesectionman.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // Section Manager for portable executables // Common to both Memory Only and Static (EXE making) code diff --git a/src/coreclr/src/inc/posterror.h b/src/coreclr/src/inc/posterror.h index 386295691370..4b02bb8b6b36 100644 --- a/src/coreclr/src/inc/posterror.h +++ b/src/coreclr/src/inc/posterror.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // UtilCode.h // diff --git a/src/coreclr/src/inc/predeftlsslot.h b/src/coreclr/src/inc/predeftlsslot.h index eba2dc1075df..6a8633a37624 100644 --- a/src/coreclr/src/inc/predeftlsslot.h +++ b/src/coreclr/src/inc/predeftlsslot.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/inc/prettyprintsig.h b/src/coreclr/src/inc/prettyprintsig.h index c5dd917e12e0..f3d4e8004927 100644 --- a/src/coreclr/src/inc/prettyprintsig.h +++ b/src/coreclr/src/inc/prettyprintsig.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // This code supports formatting a method and it's signature in a friendly diff --git a/src/coreclr/src/inc/profilepriv.h b/src/coreclr/src/inc/profilepriv.h index 8258b0517f49..13ea4791d18d 100644 --- a/src/coreclr/src/inc/profilepriv.h +++ b/src/coreclr/src/inc/profilepriv.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ProfilePriv.h // diff --git a/src/coreclr/src/inc/profilepriv.inl b/src/coreclr/src/inc/profilepriv.inl index 1d4d85931037..41e0bf3da96e 100644 --- a/src/coreclr/src/inc/profilepriv.inl +++ b/src/coreclr/src/inc/profilepriv.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ProfilePriv.inl // @@ -760,6 +759,20 @@ inline BOOL CORProfilerTrackGCMovedObjects() ((&g_profControlBlock)->dwEventMaskHigh & COR_PRF_HIGH_MONITOR_GC_MOVED_OBJECTS)); } +inline BOOL CORProfilerIsMonitoringEventPipe() +{ + CONTRACTL + { + NOTHROW; + GC_NOTRIGGER; + CANNOT_TAKE_LOCK; + } + CONTRACTL_END; + + return (CORProfilerPresent() && + ((&g_profControlBlock)->dwEventMaskHigh & COR_PRF_HIGH_MONITOR_EVENT_PIPE)); +} + #if defined(PROFILING_SUPPORTED) && !defined(CROSSGEN_COMPILE) #if defined(FEATURE_PROFAPI_ATTACH_DETACH) diff --git a/src/coreclr/src/inc/random.h b/src/coreclr/src/inc/random.h index 2c2f94aec527..53cc17d64908 100644 --- a/src/coreclr/src/inc/random.h +++ b/src/coreclr/src/inc/random.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // random.h // diff --git a/src/coreclr/src/inc/rangetree.h b/src/coreclr/src/inc/rangetree.h index 019df2e6a2d3..85a2d5ebad6b 100644 --- a/src/coreclr/src/inc/rangetree.h +++ b/src/coreclr/src/inc/rangetree.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _RANGETREE_ diff --git a/src/coreclr/src/inc/readytorun.h b/src/coreclr/src/inc/readytorun.h index 5427532169ad..f3bc01a878b9 100644 --- a/src/coreclr/src/inc/readytorun.h +++ b/src/coreclr/src/inc/readytorun.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // readytorun.h @@ -204,6 +203,9 @@ enum ReadyToRunFixupKind READYTORUN_FIXUP_PInvokeTarget = 0x2F, /* Target of an inlined pinvoke */ READYTORUN_FIXUP_Check_InstructionSetSupport= 0x30, /* Define the set of instruction sets that must be supported/unsupported to use the fixup */ + + READYTORUN_FIXUP_Verify_FieldOffset = 0x31, /* Generate a runtime check to ensure that the field offset matches between compile and runtime. Unlike Check_FieldOffset, this will generate a runtime failure instead of silently dropping the method */ + READYTORUN_FIXUP_Verify_TypeLayout = 0x32, /* Generate a runtime check to ensure that the type layout (size, alignment, HFA, reference map) matches between compile and runtime. Unlike Check_TypeLayout, this will generate a runtime failure instead of silently dropping the method */ }; // diff --git a/src/coreclr/src/inc/readytorunhelpers.h b/src/coreclr/src/inc/readytorunhelpers.h index 3703412b5f86..8c6e537def01 100644 --- a/src/coreclr/src/inc/readytorunhelpers.h +++ b/src/coreclr/src/inc/readytorunhelpers.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ReadyToRunHelpers.h diff --git a/src/coreclr/src/inc/readytoruninstructionset.h b/src/coreclr/src/inc/readytoruninstructionset.h index 77f1cd267672..670a66458ff7 100644 --- a/src/coreclr/src/inc/readytoruninstructionset.h +++ b/src/coreclr/src/inc/readytoruninstructionset.h @@ -1,7 +1,5 @@ - // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // DO NOT EDIT THIS FILE! IT IS AUTOGENERATED // FROM /src/coreclr/src/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt @@ -33,6 +31,8 @@ enum ReadyToRunInstructionSet READYTORUN_INSTRUCTION_Sha256=20, READYTORUN_INSTRUCTION_Atomics=21, READYTORUN_INSTRUCTION_X86Base=22, + READYTORUN_INSTRUCTION_Dp=23, + READYTORUN_INSTRUCTION_Rdm=24, }; diff --git a/src/coreclr/src/inc/regdisp.h b/src/coreclr/src/inc/regdisp.h index ef0aee78dd76..1c8c6d59fa08 100644 --- a/src/coreclr/src/inc/regdisp.h +++ b/src/coreclr/src/inc/regdisp.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __REGDISP_H #define __REGDISP_H diff --git a/src/coreclr/src/inc/regex_base.h b/src/coreclr/src/inc/regex_base.h index 1aaa1634e410..49384541d66a 100644 --- a/src/coreclr/src/inc/regex_base.h +++ b/src/coreclr/src/inc/regex_base.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // Provides basic interpreted regular expression matching. This is meant as a debugging tool, // and if regular expressions become necessary in a non-debug scenario great care should be diff --git a/src/coreclr/src/inc/regex_util.h b/src/coreclr/src/inc/regex_util.h index 438c8b133a97..d96c7423198b 100644 --- a/src/coreclr/src/inc/regex_util.h +++ b/src/coreclr/src/inc/regex_util.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // See regex_base.h for more information. // diff --git a/src/coreclr/src/inc/registrywrapper.h b/src/coreclr/src/inc/registrywrapper.h index 6e0264f39623..8504d9f820ae 100644 --- a/src/coreclr/src/inc/registrywrapper.h +++ b/src/coreclr/src/inc/registrywrapper.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: registrywrapper.h // diff --git a/src/coreclr/src/inc/releaseholder.h b/src/coreclr/src/inc/releaseholder.h index 672308e4b663..7b00c2953175 100644 --- a/src/coreclr/src/inc/releaseholder.h +++ b/src/coreclr/src/inc/releaseholder.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // This class acts a smart pointer which calls the Release method on any object // you place in it when the ReleaseHolder class falls out of scope. You may use it diff --git a/src/coreclr/src/inc/safemath.h b/src/coreclr/src/inc/safemath.h index 7369e24812da..84ea377c54b8 100644 --- a/src/coreclr/src/inc/safemath.h +++ b/src/coreclr/src/inc/safemath.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // --------------------------------------------------------------------------- // safemath.h // diff --git a/src/coreclr/src/inc/safewrap.h b/src/coreclr/src/inc/safewrap.h index 84d00e1c96bb..c2f260a4b4dd 100644 --- a/src/coreclr/src/inc/safewrap.h +++ b/src/coreclr/src/inc/safewrap.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // SafeWrap.h // diff --git a/src/coreclr/src/inc/sarray.h b/src/coreclr/src/inc/sarray.h index 1258ad5d15d6..29d02e68cbce 100644 --- a/src/coreclr/src/inc/sarray.h +++ b/src/coreclr/src/inc/sarray.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // -------------------------------------------------------------------------------- // SArray.h // -------------------------------------------------------------------------------- diff --git a/src/coreclr/src/inc/sarray.inl b/src/coreclr/src/inc/sarray.inl index 65f17ae07f7e..b375b6a633b2 100644 --- a/src/coreclr/src/inc/sarray.inl +++ b/src/coreclr/src/inc/sarray.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // -------------------------------------------------------------------------------- // SArray.inl // -------------------------------------------------------------------------------- diff --git a/src/coreclr/src/inc/sbuffer.h b/src/coreclr/src/inc/sbuffer.h index 4ab7d75adc89..4becfd90d38d 100644 --- a/src/coreclr/src/inc/sbuffer.h +++ b/src/coreclr/src/inc/sbuffer.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // -------------------------------------------------------------------------------- // SBuffer.h (Safe Buffer) // diff --git a/src/coreclr/src/inc/sbuffer.inl b/src/coreclr/src/inc/sbuffer.inl index 09c9c531bb90..8304b2e47f37 100644 --- a/src/coreclr/src/inc/sbuffer.inl +++ b/src/coreclr/src/inc/sbuffer.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/inc/securityutil.h b/src/coreclr/src/inc/securityutil.h index c49acf7bd15d..1cda814eb4b3 100644 --- a/src/coreclr/src/inc/securityutil.h +++ b/src/coreclr/src/inc/securityutil.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef SECURITYUTIL_H diff --git a/src/coreclr/src/inc/securitywrapper.h b/src/coreclr/src/inc/securitywrapper.h index 96882205c1d6..63d7e1743bfa 100644 --- a/src/coreclr/src/inc/securitywrapper.h +++ b/src/coreclr/src/inc/securitywrapper.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: SecurityWrapper.h // diff --git a/src/coreclr/src/inc/sha1.h b/src/coreclr/src/inc/sha1.h index 6b32d1e286b4..1c9c9cead440 100644 --- a/src/coreclr/src/inc/sha1.h +++ b/src/coreclr/src/inc/sha1.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // #ifndef SHA1_H_ diff --git a/src/coreclr/src/inc/shash.h b/src/coreclr/src/inc/shash.h index 8c1aeedbf0ae..82f3a2fac4f0 100644 --- a/src/coreclr/src/inc/shash.h +++ b/src/coreclr/src/inc/shash.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _SHASH_H_ diff --git a/src/coreclr/src/inc/shash.inl b/src/coreclr/src/inc/shash.inl index cdca15e3d819..a480cd617230 100644 --- a/src/coreclr/src/inc/shash.inl +++ b/src/coreclr/src/inc/shash.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _SHASH_INL_ #define _SHASH_INL_ diff --git a/src/coreclr/src/inc/shim/locationinfo.h b/src/coreclr/src/inc/shim/locationinfo.h index de05e3e4ecf2..e4f1a0d5558b 100644 --- a/src/coreclr/src/inc/shim/locationinfo.h +++ b/src/coreclr/src/inc/shim/locationinfo.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // locationinfo.h // diff --git a/src/coreclr/src/inc/shim/runtimeselector.h b/src/coreclr/src/inc/shim/runtimeselector.h index e4cce878aff6..bc5582ffd737 100644 --- a/src/coreclr/src/inc/shim/runtimeselector.h +++ b/src/coreclr/src/inc/shim/runtimeselector.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // runtimeselector.h // diff --git a/src/coreclr/src/inc/shim/runtimeselector.inl b/src/coreclr/src/inc/shim/runtimeselector.inl index 215630632486..de5f07f7cf42 100644 --- a/src/coreclr/src/inc/shim/runtimeselector.inl +++ b/src/coreclr/src/inc/shim/runtimeselector.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // runtimeselector.inl // diff --git a/src/coreclr/src/inc/shim/shimselector.h b/src/coreclr/src/inc/shim/shimselector.h index 0eaafd64dd25..5285fd4b694d 100644 --- a/src/coreclr/src/inc/shim/shimselector.h +++ b/src/coreclr/src/inc/shim/shimselector.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // shimselector.h // diff --git a/src/coreclr/src/inc/shim/shimselector.inl b/src/coreclr/src/inc/shim/shimselector.inl index 565a471d9faa..576bc4cec0bf 100644 --- a/src/coreclr/src/inc/shim/shimselector.inl +++ b/src/coreclr/src/inc/shim/shimselector.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // shimselector.inl // diff --git a/src/coreclr/src/inc/shim/versionandlocationinfo.h b/src/coreclr/src/inc/shim/versionandlocationinfo.h index feb4e318d7db..bf3ccb5c51ab 100644 --- a/src/coreclr/src/inc/shim/versionandlocationinfo.h +++ b/src/coreclr/src/inc/shim/versionandlocationinfo.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // versionandlocationinfo.h // diff --git a/src/coreclr/src/inc/shim/versionandlocationinfo.inl b/src/coreclr/src/inc/shim/versionandlocationinfo.inl index 91261bbaa595..faff2d1b38d3 100644 --- a/src/coreclr/src/inc/shim/versionandlocationinfo.inl +++ b/src/coreclr/src/inc/shim/versionandlocationinfo.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // versionandlocationinfo.inl // diff --git a/src/coreclr/src/inc/shim/versioninfo.h b/src/coreclr/src/inc/shim/versioninfo.h index 0a99180878a5..d0edc6470743 100644 --- a/src/coreclr/src/inc/shim/versioninfo.h +++ b/src/coreclr/src/inc/shim/versioninfo.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // versioninfo.h // diff --git a/src/coreclr/src/inc/shim/versioninfo.inl b/src/coreclr/src/inc/shim/versioninfo.inl index c572227d6836..d714ba5e6097 100644 --- a/src/coreclr/src/inc/shim/versioninfo.inl +++ b/src/coreclr/src/inc/shim/versioninfo.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // versioninfo.inl // diff --git a/src/coreclr/src/inc/shimload.h b/src/coreclr/src/inc/shimload.h index 576274b5328a..57d800d351c6 100644 --- a/src/coreclr/src/inc/shimload.h +++ b/src/coreclr/src/inc/shimload.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/inc/sigbuilder.h b/src/coreclr/src/inc/sigbuilder.h index c1ad67af0f2e..0097503d4c38 100644 --- a/src/coreclr/src/inc/sigbuilder.h +++ b/src/coreclr/src/inc/sigbuilder.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _SIGBUILDER_H_ diff --git a/src/coreclr/src/inc/sigparser.h b/src/coreclr/src/inc/sigparser.h index eb7a6352e651..8a385c1344fe 100644 --- a/src/coreclr/src/inc/sigparser.h +++ b/src/coreclr/src/inc/sigparser.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // sigparser.h // diff --git a/src/coreclr/src/inc/simplerhash.h b/src/coreclr/src/inc/simplerhash.h index ec43d93dcb02..ebd8a3e6871e 100644 --- a/src/coreclr/src/inc/simplerhash.h +++ b/src/coreclr/src/inc/simplerhash.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _SIMPLERHASHTABLE_H_ #define _SIMPLERHASHTABLE_H_ diff --git a/src/coreclr/src/inc/simplerhash.inl b/src/coreclr/src/inc/simplerhash.inl index e207ba6bce97..10a6b157ce99 100644 --- a/src/coreclr/src/inc/simplerhash.inl +++ b/src/coreclr/src/inc/simplerhash.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _SIMPLERHASHTABLE_INL_ #define _SIMPLERHASHTABLE_INL_ diff --git a/src/coreclr/src/inc/slist.h b/src/coreclr/src/inc/slist.h index 87dec1dcd0bb..805413fd3da3 100644 --- a/src/coreclr/src/inc/slist.h +++ b/src/coreclr/src/inc/slist.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //----------------------------------------------------------------------------- // @File: slist.h // diff --git a/src/coreclr/src/inc/sospriv.idl b/src/coreclr/src/inc/sospriv.idl index e29ef5692f0a..d5a5913f736f 100644 --- a/src/coreclr/src/inc/sospriv.idl +++ b/src/coreclr/src/inc/sospriv.idl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /***************************************************************************** ** ** ** sospriv.idl - The private interface that SOS uses to query the runtime ** @@ -407,4 +406,6 @@ interface ISOSDacInterface8 : IUnknown // SVR HRESULT GetGenerationTableSvr(CLRDATA_ADDRESS heapAddr, unsigned int cGenerations, struct DacpGenerationData *pGenerationData, unsigned int *pNeeded); HRESULT GetFinalizationFillPointersSvr(CLRDATA_ADDRESS heapAddr, unsigned int cFillPointers, CLRDATA_ADDRESS *pFinalizationFillPointers, unsigned int *pNeeded); + + HRESULT GetAssemblyLoadContext(CLRDATA_ADDRESS methodTable, CLRDATA_ADDRESS* assemblyLoadContext); } diff --git a/src/coreclr/src/inc/sstring.h b/src/coreclr/src/inc/sstring.h index 8de0cd3d4277..6f041658b8bf 100644 --- a/src/coreclr/src/inc/sstring.h +++ b/src/coreclr/src/inc/sstring.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // --------------------------------------------------------------------------- // SString.h (Safe String) // diff --git a/src/coreclr/src/inc/sstring.inl b/src/coreclr/src/inc/sstring.inl index 459226bf217b..03fc26fe9666 100644 --- a/src/coreclr/src/inc/sstring.inl +++ b/src/coreclr/src/inc/sstring.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/inc/stack.h b/src/coreclr/src/inc/stack.h index fd9af58ddd34..f69567ac94e4 100644 --- a/src/coreclr/src/inc/stack.h +++ b/src/coreclr/src/inc/stack.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- diff --git a/src/coreclr/src/inc/stackframe.h b/src/coreclr/src/inc/stackframe.h index 43ca11016c0c..12b047a6b4d7 100644 --- a/src/coreclr/src/inc/stackframe.h +++ b/src/coreclr/src/inc/stackframe.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __STACKFRAME_H #define __STACKFRAME_H diff --git a/src/coreclr/src/inc/stacktrace.h b/src/coreclr/src/inc/stacktrace.h index ef37dd9091c9..65f4d4cc481f 100644 --- a/src/coreclr/src/inc/stacktrace.h +++ b/src/coreclr/src/inc/stacktrace.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- diff --git a/src/coreclr/src/inc/static_assert.h b/src/coreclr/src/inc/static_assert.h index e5b542d6cb75..e344e83baca5 100644 --- a/src/coreclr/src/inc/static_assert.h +++ b/src/coreclr/src/inc/static_assert.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // --------------------------------------------------------------------------- // static_assert.h // diff --git a/src/coreclr/src/inc/staticcontract.h b/src/coreclr/src/inc/staticcontract.h index 3fe749de24ef..4cb71b7b5d30 100644 --- a/src/coreclr/src/inc/staticcontract.h +++ b/src/coreclr/src/inc/staticcontract.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // --------------------------------------------------------------------------- // StaticContract.h // --------------------------------------------------------------------------- diff --git a/src/coreclr/src/inc/stdmacros.h b/src/coreclr/src/inc/stdmacros.h index bd556a585647..6f1f884b2c7a 100644 --- a/src/coreclr/src/inc/stdmacros.h +++ b/src/coreclr/src/inc/stdmacros.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/inc/stgpool.h b/src/coreclr/src/inc/stgpool.h index d9a84c360b2a..688f1b9db2ac 100644 --- a/src/coreclr/src/inc/stgpool.h +++ b/src/coreclr/src/inc/stgpool.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // StgPool.h // diff --git a/src/coreclr/src/inc/stgpooli.h b/src/coreclr/src/inc/stgpooli.h index db4c049fc894..33e0b61d0812 100644 --- a/src/coreclr/src/inc/stgpooli.h +++ b/src/coreclr/src/inc/stgpooli.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // StgPooli.h // diff --git a/src/coreclr/src/inc/stresslog.h b/src/coreclr/src/inc/stresslog.h index 244cf74c2b0e..e162dae9bcea 100644 --- a/src/coreclr/src/inc/stresslog.h +++ b/src/coreclr/src/inc/stresslog.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*************************************************************************************/ diff --git a/src/coreclr/src/inc/stringarraylist.h b/src/coreclr/src/inc/stringarraylist.h index 248d41e1c7f0..5001ad7c4692 100644 --- a/src/coreclr/src/inc/stringarraylist.h +++ b/src/coreclr/src/inc/stringarraylist.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef STRINGARRAYLIST_H_ #define STRINGARRAYLIST_H_ diff --git a/src/coreclr/src/inc/stringarraylist.inl b/src/coreclr/src/inc/stringarraylist.inl index 9e19636c7842..b82f95735a4d 100644 --- a/src/coreclr/src/inc/stringarraylist.inl +++ b/src/coreclr/src/inc/stringarraylist.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "ex.h" diff --git a/src/coreclr/src/inc/strongnameholders.h b/src/coreclr/src/inc/strongnameholders.h index d684e9d3a032..2c26ed7b03ea 100644 --- a/src/coreclr/src/inc/strongnameholders.h +++ b/src/coreclr/src/inc/strongnameholders.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __STRONGNAME_HOLDERS_H__ #define __STRONGNAME_HOLDERS_H__ diff --git a/src/coreclr/src/inc/strongnameinternal.h b/src/coreclr/src/inc/strongnameinternal.h index a340c768d6a5..2b1c323a7d2e 100644 --- a/src/coreclr/src/inc/strongnameinternal.h +++ b/src/coreclr/src/inc/strongnameinternal.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // Strong name APIs which are not exposed publicly, but are built into StrongName.lib // diff --git a/src/coreclr/src/inc/switches.h b/src/coreclr/src/inc/switches.h index eaf1c578a45e..c334512e9572 100644 --- a/src/coreclr/src/inc/switches.h +++ b/src/coreclr/src/inc/switches.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // switches.h switch configuration of common runtime features // diff --git a/src/coreclr/src/inc/thekey.h b/src/coreclr/src/inc/thekey.h index dba313c3386b..a972e2ca561d 100644 --- a/src/coreclr/src/inc/thekey.h +++ b/src/coreclr/src/inc/thekey.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma once // This file allows customization of the strongname key used to replace the ECMA key diff --git a/src/coreclr/src/inc/tls.h b/src/coreclr/src/inc/tls.h index fb880ba07738..4ac5e9162e5d 100644 --- a/src/coreclr/src/inc/tls.h +++ b/src/coreclr/src/inc/tls.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // TLS.H - // diff --git a/src/coreclr/src/inc/unreachable.h b/src/coreclr/src/inc/unreachable.h index 0e2ae87337a7..3fcb1d3bb40e 100644 --- a/src/coreclr/src/inc/unreachable.h +++ b/src/coreclr/src/inc/unreachable.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // --------------------------------------------------------------------------- // unreachable.h // --------------------------------------------------------------------------- diff --git a/src/coreclr/src/inc/utilcode.h b/src/coreclr/src/inc/utilcode.h index 15902ef99e97..f02e58aeaf7d 100644 --- a/src/coreclr/src/inc/utilcode.h +++ b/src/coreclr/src/inc/utilcode.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // UtilCode.h // @@ -4924,28 +4923,15 @@ namespace Com }} -#if defined(FEATURE_APPX) && !defined(DACCESS_COMPILE) - // Forward declaration of AppX::IsAppXProcess - namespace AppX { bool IsAppXProcess(); } - - // LOAD_WITH_ALTERED_SEARCH_PATH is unsupported in AppX processes. - inline DWORD GetLoadWithAlteredSearchPathFlag() - { - WRAPPER_NO_CONTRACT; - return AppX::IsAppXProcess() ? 0 : LOAD_WITH_ALTERED_SEARCH_PATH; - } -#else // FEATURE_APPX && !DACCESS_COMPILE - // LOAD_WITH_ALTERED_SEARCH_PATH can be used unconditionally. - inline DWORD GetLoadWithAlteredSearchPathFlag() - { - LIMITED_METHOD_CONTRACT; - #ifdef LOAD_WITH_ALTERED_SEARCH_PATH - return LOAD_WITH_ALTERED_SEARCH_PATH; - #else - return 0; - #endif - } -#endif // FEATURE_APPX && !DACCESS_COMPILE +inline DWORD GetLoadWithAlteredSearchPathFlag() +{ + LIMITED_METHOD_CONTRACT; + #ifdef LOAD_WITH_ALTERED_SEARCH_PATH + return LOAD_WITH_ALTERED_SEARCH_PATH; + #else + return 0; + #endif +} // clr::SafeAddRef and clr::SafeRelease helpers. namespace clr diff --git a/src/coreclr/src/inc/utsem.h b/src/coreclr/src/inc/utsem.h index 0cacfcd940f6..a33cc0535d34 100644 --- a/src/coreclr/src/inc/utsem.h +++ b/src/coreclr/src/inc/utsem.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* ---------------------------------------------------------------------------- diff --git a/src/coreclr/src/inc/volatile.h b/src/coreclr/src/inc/volatile.h index 6c73dc4c6566..f5bb1f09f063 100644 --- a/src/coreclr/src/inc/volatile.h +++ b/src/coreclr/src/inc/volatile.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // Volatile.h // diff --git a/src/coreclr/src/inc/vptr_list.h b/src/coreclr/src/inc/vptr_list.h index f53bbac1edf1..1ca3b089fd68 100644 --- a/src/coreclr/src/inc/vptr_list.h +++ b/src/coreclr/src/inc/vptr_list.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // Any class with a vtable that needs to be instantiated // during debugging data access must be listed here. diff --git a/src/coreclr/src/inc/win64unwind.h b/src/coreclr/src/inc/win64unwind.h index d9477a9078ec..d9990a35144e 100644 --- a/src/coreclr/src/inc/win64unwind.h +++ b/src/coreclr/src/inc/win64unwind.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _WIN64UNWIND_H_ #define _WIN64UNWIND_H_ diff --git a/src/coreclr/src/inc/winwrap.h b/src/coreclr/src/inc/winwrap.h index e692ac782952..69dc19a5d413 100644 --- a/src/coreclr/src/inc/winwrap.h +++ b/src/coreclr/src/inc/winwrap.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // WinWrap.h // diff --git a/src/coreclr/src/inc/xclrdata.idl b/src/coreclr/src/inc/xclrdata.idl index 7054c7f11955..818915a29cce 100644 --- a/src/coreclr/src/inc/xclrdata.idl +++ b/src/coreclr/src/inc/xclrdata.idl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /***************************************************************************** ** ** ** clrdata.idl - Common Language Runtime data access interfaces for ** diff --git a/src/coreclr/src/inc/xcordebug.idl b/src/coreclr/src/inc/xcordebug.idl index 8f4b5bba2c6c..2ac09c173791 100644 --- a/src/coreclr/src/inc/xcordebug.idl +++ b/src/coreclr/src/inc/xcordebug.idl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /***************************************************************************** ** ** ** XCordebug.idl - Experimental (undocumented) Debugging interfaces. ** diff --git a/src/coreclr/src/inc/yieldprocessornormalized.h b/src/coreclr/src/inc/yieldprocessornormalized.h index ec90a9da8c35..ba349bb83ad5 100644 --- a/src/coreclr/src/inc/yieldprocessornormalized.h +++ b/src/coreclr/src/inc/yieldprocessornormalized.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma once diff --git a/src/coreclr/src/inc/zapper.h b/src/coreclr/src/inc/zapper.h index 74b98926fe89..ba4f65b15dd9 100644 --- a/src/coreclr/src/inc/zapper.h +++ b/src/coreclr/src/inc/zapper.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef ZAPPER_H_ #define ZAPPER_H_ diff --git a/src/coreclr/src/interop/CMakeLists.txt b/src/coreclr/src/interop/CMakeLists.txt index d7eaa1b04ae6..b8a0e769318d 100644 --- a/src/coreclr/src/interop/CMakeLists.txt +++ b/src/coreclr/src/interop/CMakeLists.txt @@ -31,6 +31,6 @@ endif(WIN32) convert_to_absolute_path(INTEROP_SOURCES ${INTEROP_SOURCES}) add_library_clr(interop - STATIC + OBJECT ${INTEROP_SOURCES} ) diff --git a/src/coreclr/src/interop/comwrappers.cpp b/src/coreclr/src/interop/comwrappers.cpp index 3fb1b7941ed7..a7d4db776980 100644 --- a/src/coreclr/src/interop/comwrappers.cpp +++ b/src/coreclr/src/interop/comwrappers.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "comwrappers.hpp" #include diff --git a/src/coreclr/src/interop/comwrappers.hpp b/src/coreclr/src/interop/comwrappers.hpp index 02e3b562069b..8535bd9f18e9 100644 --- a/src/coreclr/src/interop/comwrappers.hpp +++ b/src/coreclr/src/interop/comwrappers.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _INTEROP_COMWRAPPERS_H_ #define _INTEROP_COMWRAPPERS_H_ @@ -125,14 +124,13 @@ ABI_ASSERT(offsetof(ManagedObjectWrapper, Target) == 0); // Class for connecting a native COM object to a managed object instance class NativeObjectWrapperContext { -#ifdef _DEBUG - size_t _sentinel; -#endif - IReferenceTracker* _trackerObject; void* _runtimeContext; Volatile _isValidTracker; +#ifdef _DEBUG + size_t _sentinel; +#endif public: // static // Convert a context pointer into a NativeObjectWrapperContext. static NativeObjectWrapperContext* MapFromRuntimeContext(_In_ void* cxt); diff --git a/src/coreclr/src/interop/inc/interoplib.h b/src/coreclr/src/interop/inc/interoplib.h index fa0e0c3e2591..a1f32b99ecdb 100644 --- a/src/coreclr/src/interop/inc/interoplib.h +++ b/src/coreclr/src/interop/inc/interoplib.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _INTEROP_INC_INTEROPLIB_H_ #define _INTEROP_INC_INTEROPLIB_H_ diff --git a/src/coreclr/src/interop/inc/interoplibabi.h b/src/coreclr/src/interop/inc/interoplibabi.h index 19a1e0c01e75..46c33204e403 100644 --- a/src/coreclr/src/interop/inc/interoplibabi.h +++ b/src/coreclr/src/interop/inc/interoplibabi.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include diff --git a/src/coreclr/src/interop/inc/interoplibimports.h b/src/coreclr/src/interop/inc/interoplibimports.h index 692f749df1a5..deb3f196f96c 100644 --- a/src/coreclr/src/interop/inc/interoplibimports.h +++ b/src/coreclr/src/interop/inc/interoplibimports.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _INTEROP_INC_INTEROPLIBIMPORTS_H_ #define _INTEROP_INC_INTEROPLIBIMPORTS_H_ diff --git a/src/coreclr/src/interop/interoplib.cpp b/src/coreclr/src/interop/interoplib.cpp index fb7af5aa7ec6..f730817dea31 100644 --- a/src/coreclr/src/interop/interoplib.cpp +++ b/src/coreclr/src/interop/interoplib.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "platform.h" #include diff --git a/src/coreclr/src/interop/platform.h b/src/coreclr/src/interop/platform.h index b21ec99cd8ca..fef22a10085a 100644 --- a/src/coreclr/src/interop/platform.h +++ b/src/coreclr/src/interop/platform.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _INTEROP_PLATFORM_H_ #define _INTEROP_PLATFORM_H_ @@ -28,4 +27,4 @@ // Runtime headers #include -#endif // _INTEROP_PLATFORM_H_ \ No newline at end of file +#endif // _INTEROP_PLATFORM_H_ diff --git a/src/coreclr/src/interop/referencetrackertypes.hpp b/src/coreclr/src/interop/referencetrackertypes.hpp index b9802a48fa11..a5887df802dc 100644 --- a/src/coreclr/src/interop/referencetrackertypes.hpp +++ b/src/coreclr/src/interop/referencetrackertypes.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _INTEROP_REFERENCETRACKERTYPES_H_ #define _INTEROP_REFERENCETRACKERTYPES_H_ diff --git a/src/coreclr/src/interop/trackerobjectmanager.cpp b/src/coreclr/src/interop/trackerobjectmanager.cpp index 7d1cb1572219..91cc894c0eef 100644 --- a/src/coreclr/src/interop/trackerobjectmanager.cpp +++ b/src/coreclr/src/interop/trackerobjectmanager.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "comwrappers.hpp" #include diff --git a/src/coreclr/src/jit/CMakeLists.txt b/src/coreclr/src/jit/CMakeLists.txt index a3f0b1aeb2e0..15aa4d59b63c 100644 --- a/src/coreclr/src/jit/CMakeLists.txt +++ b/src/coreclr/src/jit/CMakeLists.txt @@ -305,13 +305,15 @@ convert_to_absolute_path(JIT_ARM_SOURCES ${JIT_ARM_SOURCES}) convert_to_absolute_path(JIT_I386_SOURCES ${JIT_I386_SOURCES}) convert_to_absolute_path(JIT_ARM64_SOURCES ${JIT_ARM64_SOURCES}) +set(JIT_DLL_MAIN_FILE ${CMAKE_CURRENT_LIST_DIR}/dllmain.cpp) if(CLR_CMAKE_TARGET_WIN32) set(CLRJIT_EXPORTS ${CMAKE_CURRENT_LIST_DIR}/ClrJit.exports) set(JIT_EXPORTS_FILE ${CMAKE_CURRENT_BINARY_DIR}/ClrJit.exports.def) preprocess_file (${CLRJIT_EXPORTS} ${JIT_EXPORTS_FILE}) - set(SHARED_LIB_SOURCES ${SOURCES} ${JIT_EXPORTS_FILE}) + set(JIT_CORE_SOURCES ${SOURCES}) + set(JIT_DEF_FILE ${JIT_EXPORTS_FILE}) else() set(CLRJIT_EXPORTS ${CMAKE_CURRENT_LIST_DIR}/ClrJit.PAL.exports) @@ -321,17 +323,11 @@ else() if(CLR_CMAKE_TARGET_LINUX OR CLR_CMAKE_TARGET_FREEBSD OR CLR_CMAKE_TARGET_NETBSD OR CLR_CMAKE_TARGET_SUNOS) # This is required to force using our own PAL, not one that we are loaded with. set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Xlinker -Bsymbolic") - - if(CLR_CMAKE_TARGET_SUNOS) - set(JIT_EXPORTS_LINKER_OPTION -Wl,-M,${JIT_EXPORTS_FILE}) - else(CLR_CMAKE_TARGET_SUNOS) - set(JIT_EXPORTS_LINKER_OPTION -Wl,--version-script=${JIT_EXPORTS_FILE}) - endif(CLR_CMAKE_TARGET_SUNOS) - elseif(CLR_CMAKE_TARGET_OSX) - set(JIT_EXPORTS_LINKER_OPTION -Wl,-exported_symbols_list,${JIT_EXPORTS_FILE}) endif() - set(SHARED_LIB_SOURCES ${SOURCES}) + set_exports_linker_option(${JIT_EXPORTS_FILE}) + set(JIT_EXPORTS_LINKER_OPTION ${EXPORTS_LINKER_OPTION}) + set(JIT_CORE_SOURCES ${SOURCES}) endif() add_custom_target(jit_exports DEPENDS ${JIT_EXPORTS_FILE}) @@ -379,8 +375,10 @@ function(add_jit jitName) add_library_clr(${jitName} SHARED - ${SHARED_LIB_SOURCES} + ${JIT_CORE_SOURCES} ${JIT_ARCH_SOURCES} + ${JIT_DEF_FILE} + ${JIT_DLL_MAIN_FILE} ) target_precompile_header(TARGET ${jitName} HEADER jitpch.h ADDITIONAL_INCLUDE_DIRECTORIES ${JIT_SOURCE_DIR}) @@ -402,11 +400,12 @@ endfunction() set(JIT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) if (FEATURE_MERGE_JIT_AND_ENGINE) - # Despite the directory being named "dll", it creates a static library "clrjit_static" to link into the VM. - add_subdirectory(dll) add_subdirectory(crossgen) endif (FEATURE_MERGE_JIT_AND_ENGINE) +# Creates a static library "clrjit_static" to link into the VM. +add_subdirectory(static) + add_subdirectory(standalone) if (CLR_CMAKE_HOST_ARCH_I386 OR CLR_CMAKE_HOST_ARCH_AMD64) diff --git a/src/coreclr/src/jit/ClrJit.exports b/src/coreclr/src/jit/ClrJit.exports index 41a37dbcf94e..e62cb2fec670 100644 --- a/src/coreclr/src/jit/ClrJit.exports +++ b/src/coreclr/src/jit/ClrJit.exports @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. EXPORTS getJit diff --git a/src/coreclr/src/jit/ICorJitInfo_API_names.h b/src/coreclr/src/jit/ICorJitInfo_API_names.h index b2f623ac96fb..ff5cd92a33d0 100644 --- a/src/coreclr/src/jit/ICorJitInfo_API_names.h +++ b/src/coreclr/src/jit/ICorJitInfo_API_names.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. DEF_CLR_API(getMethodAttribs) DEF_CLR_API(setMethodAttribs) diff --git a/src/coreclr/src/jit/ICorJitInfo_API_wrapper.hpp b/src/coreclr/src/jit/ICorJitInfo_API_wrapper.hpp index 44e4a3ea1055..9593be55b664 100644 --- a/src/coreclr/src/jit/ICorJitInfo_API_wrapper.hpp +++ b/src/coreclr/src/jit/ICorJitInfo_API_wrapper.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #define API_ENTER(name) wrapComp->CLR_API_Enter(API_##name); #define API_LEAVE(name) wrapComp->CLR_API_Leave(API_##name); @@ -655,11 +654,10 @@ CorInfoInitClassResult WrapICorJitInfo::initClass( CORINFO_FIELD_HANDLE field, CORINFO_METHOD_HANDLE method, - CORINFO_CONTEXT_HANDLE context, - BOOL speculative) + CORINFO_CONTEXT_HANDLE context) { API_ENTER(initClass); - CorInfoInitClassResult temp = wrapHnd->initClass(field, method, context, speculative); + CorInfoInitClassResult temp = wrapHnd->initClass(field, method, context); API_LEAVE(initClass); return temp; } diff --git a/src/coreclr/src/jit/Native.rc b/src/coreclr/src/jit/Native.rc index 9e01bcd6cc56..f145a7d071a0 100644 --- a/src/coreclr/src/jit/Native.rc +++ b/src/coreclr/src/jit/Native.rc @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #define FX_VER_FILEDESCRIPTION_STR "Microsoft .NET Runtime Just-In-Time Compiler\0" diff --git a/src/coreclr/src/jit/_typeinfo.h b/src/coreclr/src/jit/_typeinfo.h index d852cac6b020..4aa38c540b22 100644 --- a/src/coreclr/src/jit/_typeinfo.h +++ b/src/coreclr/src/jit/_typeinfo.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/src/coreclr/src/jit/alloc.cpp b/src/coreclr/src/jit/alloc.cpp index 62fa0e844564..6300376beeb6 100644 --- a/src/coreclr/src/jit/alloc.cpp +++ b/src/coreclr/src/jit/alloc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "jitpch.h" diff --git a/src/coreclr/src/jit/alloc.h b/src/coreclr/src/jit/alloc.h index f23ea225a105..bd148c78a34c 100644 --- a/src/coreclr/src/jit/alloc.h +++ b/src/coreclr/src/jit/alloc.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _ALLOC_H_ #define _ALLOC_H_ diff --git a/src/coreclr/src/jit/armelnonjit/armelnonjit.def b/src/coreclr/src/jit/armelnonjit/armelnonjit.def index e229be40aaab..0afb54dca77d 100644 --- a/src/coreclr/src/jit/armelnonjit/armelnonjit.def +++ b/src/coreclr/src/jit/armelnonjit/armelnonjit.def @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. EXPORTS getJit jitStartup diff --git a/src/coreclr/src/jit/arraystack.h b/src/coreclr/src/jit/arraystack.h index 5b62ce63fa27..eb8a17932ca6 100644 --- a/src/coreclr/src/jit/arraystack.h +++ b/src/coreclr/src/jit/arraystack.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ArrayStack: A stack, implemented as a growable array diff --git a/src/coreclr/src/jit/assertionprop.cpp b/src/coreclr/src/jit/assertionprop.cpp index 450f98018dbb..7bac5584bf92 100644 --- a/src/coreclr/src/jit/assertionprop.cpp +++ b/src/coreclr/src/jit/assertionprop.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -3237,7 +3236,8 @@ GenTree* Compiler::optAssertionPropGlobal_RelOp(ASSERT_VALARG_TP assertions, Gen return nullptr; } - AssertionDsc* curAssertion = optGetAssertion(index); + AssertionDsc* curAssertion = optGetAssertion(index); + bool assertionKindIsEqual = (curAssertion->assertionKind == OAK_EQUAL); // Allow or not to reverse condition for OAK_NOT_EQUAL assertions. bool allowReverse = true; @@ -3252,7 +3252,7 @@ GenTree* Compiler::optAssertionPropGlobal_RelOp(ASSERT_VALARG_TP assertions, Gen printf("\nVN relop based constant assertion prop in " FMT_BB ":\n", compCurBB->bbNum); printf("Assertion index=#%02u: ", index); printTreeID(op1); - printf(" %s ", (curAssertion->assertionKind == OAK_EQUAL) ? "==" : "!="); + printf(" %s ", assertionKindIsEqual ? "==" : "!="); if (genActualType(op1->TypeGet()) == TYP_INT) { printf("%d\n", vnStore->ConstantValue(vnCns)); @@ -3337,8 +3337,15 @@ GenTree* Compiler::optAssertionPropGlobal_RelOp(ASSERT_VALARG_TP assertions, Gen op1->gtVNPair.SetBoth(vnCns); // Preserve the ValueNumPair, as ChangeOperConst/SetOper will clear it. - // Also set the value number on the relop. - if (curAssertion->assertionKind == OAK_EQUAL) + // set foldResult to either 0 or 1 + bool foldResult = assertionKindIsEqual; + if (tree->gtOper == GT_NE) + { + foldResult = !foldResult; + } + + // Set the value number on the relop to 1 (true) or 0 (false) + if (foldResult) { tree->gtVNPair.SetBoth(vnStore->VNOneForType(TYP_INT)); } @@ -4948,6 +4955,12 @@ GenTree* Compiler::optVNConstantPropOnJTrue(BasicBlock* block, GenTree* test) // Compiler::fgWalkResult Compiler::optVNConstantPropCurStmt(BasicBlock* block, Statement* stmt, GenTree* tree) { + // Don't perform const prop on expressions marked with GTF_DONT_CSE + if (!tree->CanCSE()) + { + return WALK_CONTINUE; + } + // Don't propagate floating-point constants into a TYP_STRUCT LclVar // This can occur for HFA return values (see hfa_sf3E_r.exe) if (tree->TypeGet() == TYP_STRUCT) diff --git a/src/coreclr/src/jit/bitset.cpp b/src/coreclr/src/jit/bitset.cpp index 4a32d7111d55..506fe7210d4c 100644 --- a/src/coreclr/src/jit/bitset.cpp +++ b/src/coreclr/src/jit/bitset.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "jitpch.h" #ifdef _MSC_VER diff --git a/src/coreclr/src/jit/bitset.h b/src/coreclr/src/jit/bitset.h index 5a92bddecba7..eb29a133e299 100644 --- a/src/coreclr/src/jit/bitset.h +++ b/src/coreclr/src/jit/bitset.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // A set of integers in the range [0..N], for some given N. diff --git a/src/coreclr/src/jit/bitsetasshortlong.h b/src/coreclr/src/jit/bitsetasshortlong.h index d1588cdc0992..078cdc810e9d 100644 --- a/src/coreclr/src/jit/bitsetasshortlong.h +++ b/src/coreclr/src/jit/bitsetasshortlong.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // A set of integers in the range [0..N], for some N defined by the "Env" (via "BitSetTraits"). // diff --git a/src/coreclr/src/jit/bitsetasuint64.h b/src/coreclr/src/jit/bitsetasuint64.h index fe439ee937f7..f227d8ec8ecd 100644 --- a/src/coreclr/src/jit/bitsetasuint64.h +++ b/src/coreclr/src/jit/bitsetasuint64.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef bitSetAsUint64_DEFINED #define bitSetAsUint64_DEFINED 1 diff --git a/src/coreclr/src/jit/bitsetasuint64inclass.h b/src/coreclr/src/jit/bitsetasuint64inclass.h index fe5d73ad7e5e..0424a87ad8c4 100644 --- a/src/coreclr/src/jit/bitsetasuint64inclass.h +++ b/src/coreclr/src/jit/bitsetasuint64inclass.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef bitSetAsUint64InClass_DEFINED #define bitSetAsUint64InClass_DEFINED 1 diff --git a/src/coreclr/src/jit/bitsetops.h b/src/coreclr/src/jit/bitsetops.h index bb4db9d5fd97..932904bb7190 100644 --- a/src/coreclr/src/jit/bitsetops.h +++ b/src/coreclr/src/jit/bitsetops.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. BSOPNAME(BSOP_Assign) BSOPNAME(BSOP_AssignAllowUninitRhs) diff --git a/src/coreclr/src/jit/bitvec.h b/src/coreclr/src/jit/bitvec.h index e7e2d44a5c2a..1f89acde9b9d 100644 --- a/src/coreclr/src/jit/bitvec.h +++ b/src/coreclr/src/jit/bitvec.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // This include file determines how BitVec is implemented. diff --git a/src/coreclr/src/jit/block.cpp b/src/coreclr/src/jit/block.cpp index 3bd45dd1ca85..d8ca31c6662c 100644 --- a/src/coreclr/src/jit/block.cpp +++ b/src/coreclr/src/jit/block.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -310,6 +309,10 @@ void BasicBlock::dspFlags() { printf("jmp "); } + if (bbFlags & BBF_HAS_CALL) + { + printf("hascall "); + } if (bbFlags & BBF_GC_SAFE_POINT) { printf("gcsafe "); diff --git a/src/coreclr/src/jit/block.h b/src/coreclr/src/jit/block.h index 6a2c6e86435a..26ccbd80a42a 100644 --- a/src/coreclr/src/jit/block.h +++ b/src/coreclr/src/jit/block.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -446,6 +445,7 @@ struct BasicBlock : private LIR::Range #define BBF_DOMINATED_BY_EXCEPTIONAL_ENTRY 0x800000000 // Block is dominated by exceptional entry. #define BBF_BACKWARD_JUMP_TARGET 0x1000000000 // Block is a target of a backward jump #define BBF_PATCHPOINT 0x2000000000 // Block is a patchpoint +#define BBF_HAS_SUPPRESSGC_CALL 0x4000000000 // BB contains a call to a method with SuppressGCTransitionAttribute // clang-format on diff --git a/src/coreclr/src/jit/blockset.h b/src/coreclr/src/jit/blockset.h index 015f6a6695c8..83de7a5dad1e 100644 --- a/src/coreclr/src/jit/blockset.h +++ b/src/coreclr/src/jit/blockset.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // This include file determines how BlockSet is implemented. diff --git a/src/coreclr/src/jit/codegen.h b/src/coreclr/src/jit/codegen.h index 5c8a04c466d1..36f6842295f6 100644 --- a/src/coreclr/src/jit/codegen.h +++ b/src/coreclr/src/jit/codegen.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // This class contains all the data & functionality for code generation @@ -980,7 +979,6 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX void genSIMDIntrinsicUnOp(GenTreeSIMD* simdNode); void genSIMDIntrinsicBinOp(GenTreeSIMD* simdNode); void genSIMDIntrinsicRelOp(GenTreeSIMD* simdNode); - void genSIMDIntrinsicDotProduct(GenTreeSIMD* simdNode); void genSIMDIntrinsicSetItem(GenTreeSIMD* simdNode); void genSIMDIntrinsicGetItem(GenTreeSIMD* simdNode); void genSIMDIntrinsicShuffleSSE2(GenTreeSIMD* simdNode); @@ -1191,7 +1189,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX void genCodeForCpBlkHelper(GenTreeBlk* cpBlkNode); #endif void genCodeForPhysReg(GenTreePhysReg* tree); - void genCodeForNullCheck(GenTreeOp* tree); + void genCodeForNullCheck(GenTreeIndir* tree); void genCodeForCmpXchg(GenTreeCmpXchg* tree); void genAlignStackBeforeCall(GenTreePutArgStk* putArgStk); @@ -1407,8 +1405,6 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX void inst_SA_RV(instruction ins, unsigned ofs, regNumber reg, var_types type); void inst_SA_IV(instruction ins, unsigned ofs, int val, var_types type); - void inst_RV_ST( - instruction ins, regNumber reg, TempDsc* tmp, unsigned ofs, var_types type, emitAttr size = EA_UNKNOWN); void inst_FS_ST(instruction ins, emitAttr size, TempDsc* tmp, unsigned ofs); void inst_TT(instruction ins, GenTree* tree, unsigned offs = 0, int shfv = 0, emitAttr size = EA_UNKNOWN); @@ -1485,7 +1481,11 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX void instGen_Set_Reg_To_Zero(emitAttr size, regNumber reg, insFlags flags = INS_FLAGS_DONT_CARE); - void instGen_Set_Reg_To_Imm(emitAttr size, regNumber reg, ssize_t imm, insFlags flags = INS_FLAGS_DONT_CARE); + void instGen_Set_Reg_To_Imm(emitAttr size, + regNumber reg, + ssize_t imm, + insFlags flags = INS_FLAGS_DONT_CARE DEBUGARG(size_t targetHandle = 0) + DEBUGARG(unsigned gtFlags = 0)); void instGen_Compare_Reg_To_Zero(emitAttr size, regNumber reg); diff --git a/src/coreclr/src/jit/codegenarm.cpp b/src/coreclr/src/jit/codegenarm.cpp index 7acdf3fbab21..0407c710e404 100644 --- a/src/coreclr/src/jit/codegenarm.cpp +++ b/src/coreclr/src/jit/codegenarm.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -156,7 +155,10 @@ void CodeGen::genEHCatchRet(BasicBlock* block) //------------------------------------------------------------------------ // instGen_Set_Reg_To_Imm: Move an immediate value into an integer register. // -void CodeGen::instGen_Set_Reg_To_Imm(emitAttr size, regNumber reg, ssize_t imm, insFlags flags) +void CodeGen::instGen_Set_Reg_To_Imm(emitAttr size, + regNumber reg, + ssize_t imm, + insFlags flags DEBUGARG(size_t targetHandle) DEBUGARG(unsigned gtFlags)) { // reg cannot be a FP register assert(!genIsValidFloatReg(reg)); diff --git a/src/coreclr/src/jit/codegenarm64.cpp b/src/coreclr/src/jit/codegenarm64.cpp index 7c915890efdc..8ce7617de5d0 100644 --- a/src/coreclr/src/jit/codegenarm64.cpp +++ b/src/coreclr/src/jit/codegenarm64.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -1574,7 +1573,10 @@ void CodeGen::genEHCatchRet(BasicBlock* block) // move an immediate value into an integer register -void CodeGen::instGen_Set_Reg_To_Imm(emitAttr size, regNumber reg, ssize_t imm, insFlags flags) +void CodeGen::instGen_Set_Reg_To_Imm(emitAttr size, + regNumber reg, + ssize_t imm, + insFlags flags DEBUGARG(size_t targetHandle) DEBUGARG(unsigned gtFlags)) { // reg cannot be a FP register assert(!genIsValidFloatReg(reg)); @@ -1586,7 +1588,7 @@ void CodeGen::instGen_Set_Reg_To_Imm(emitAttr size, regNumber reg, ssize_t imm, if (EA_IS_RELOC(size)) { // This emits a pair of adrp/add (two instructions) with fix-ups. - GetEmitter()->emitIns_R_AI(INS_adrp, size, reg, imm); + GetEmitter()->emitIns_R_AI(INS_adrp, size, reg, imm DEBUGARG(targetHandle) DEBUGARG(gtFlags)); } else if (imm == 0) { @@ -1683,7 +1685,9 @@ void CodeGen::genSetRegToConst(regNumber targetReg, var_types targetType, GenTre if (con->ImmedValNeedsReloc(compiler)) { - instGen_Set_Reg_To_Imm(EA_HANDLE_CNS_RELOC, targetReg, cnsVal); + instGen_Set_Reg_To_Imm(EA_HANDLE_CNS_RELOC, targetReg, cnsVal, + INS_FLAGS_DONT_CARE DEBUGARG(tree->AsIntCon()->gtTargetHandle) + DEBUGARG(tree->AsIntCon()->gtFlags)); regSet.verifyRegUsed(targetReg); } else @@ -3775,7 +3779,9 @@ void CodeGen::genEmitHelperCall(unsigned helper, int argSize, emitAttr retSize, callTarget = callTargetReg; // adrp + add with relocations will be emitted - GetEmitter()->emitIns_R_AI(INS_adrp, EA_PTR_DSP_RELOC, callTarget, (ssize_t)pAddr); + GetEmitter()->emitIns_R_AI(INS_adrp, EA_PTR_DSP_RELOC, callTarget, + (ssize_t)pAddr DEBUGARG((size_t)compiler->eeFindHelper(helper)) + DEBUGARG(GTF_ICON_METHOD_HDL)); GetEmitter()->emitIns_R_R(INS_ldr, EA_PTRSIZE, callTarget, callTarget); callType = emitter::EC_INDIR_R; } @@ -3855,20 +3861,13 @@ void CodeGen::genSIMDIntrinsic(GenTreeSIMD* simdNode) genSIMDIntrinsicNarrow(simdNode); break; - case SIMDIntrinsicAdd: case SIMDIntrinsicSub: - case SIMDIntrinsicMul: - case SIMDIntrinsicDiv: case SIMDIntrinsicBitwiseAnd: case SIMDIntrinsicBitwiseOr: case SIMDIntrinsicEqual: genSIMDIntrinsicBinOp(simdNode); break; - case SIMDIntrinsicDotProduct: - genSIMDIntrinsicDotProduct(simdNode); - break; - case SIMDIntrinsicGetItem: genSIMDIntrinsicGetItem(simdNode); break; @@ -3945,9 +3944,6 @@ instruction CodeGen::getOpForSIMDIntrinsic(SIMDIntrinsicID intrinsicId, var_type { switch (intrinsicId) { - case SIMDIntrinsicAdd: - result = INS_fadd; - break; case SIMDIntrinsicBitwiseAnd: result = INS_and; break; @@ -3961,15 +3957,9 @@ instruction CodeGen::getOpForSIMDIntrinsic(SIMDIntrinsicID intrinsicId, var_type case SIMDIntrinsicConvertToInt64: result = INS_fcvtzs; break; - case SIMDIntrinsicDiv: - result = INS_fdiv; - break; case SIMDIntrinsicEqual: result = INS_fcmeq; break; - case SIMDIntrinsicMul: - result = INS_fmul; - break; case SIMDIntrinsicNarrow: // Use INS_fcvtn lower bytes of result followed by INS_fcvtn2 for upper bytes // Return lower bytes instruction here @@ -3995,9 +3985,6 @@ instruction CodeGen::getOpForSIMDIntrinsic(SIMDIntrinsicID intrinsicId, var_type switch (intrinsicId) { - case SIMDIntrinsicAdd: - result = INS_add; - break; case SIMDIntrinsicBitwiseAnd: result = INS_and; break; @@ -4014,9 +4001,6 @@ instruction CodeGen::getOpForSIMDIntrinsic(SIMDIntrinsicID intrinsicId, var_type case SIMDIntrinsicEqual: result = INS_cmeq; break; - case SIMDIntrinsicMul: - result = INS_mul; - break; case SIMDIntrinsicNarrow: // Use INS_xtn lower bytes of result followed by INS_xtn2 for upper bytes // Return lower bytes instruction here @@ -4326,9 +4310,7 @@ void CodeGen::genSIMDIntrinsicNarrow(GenTreeSIMD* simdNode) // void CodeGen::genSIMDIntrinsicBinOp(GenTreeSIMD* simdNode) { - assert(simdNode->gtSIMDIntrinsicID == SIMDIntrinsicAdd || simdNode->gtSIMDIntrinsicID == SIMDIntrinsicSub || - simdNode->gtSIMDIntrinsicID == SIMDIntrinsicMul || simdNode->gtSIMDIntrinsicID == SIMDIntrinsicDiv || - simdNode->gtSIMDIntrinsicID == SIMDIntrinsicBitwiseAnd || + assert(simdNode->gtSIMDIntrinsicID == SIMDIntrinsicSub || simdNode->gtSIMDIntrinsicID == SIMDIntrinsicBitwiseAnd || simdNode->gtSIMDIntrinsicID == SIMDIntrinsicBitwiseOr || simdNode->gtSIMDIntrinsicID == SIMDIntrinsicEqual); GenTree* op1 = simdNode->gtGetOp1(); @@ -4357,90 +4339,6 @@ void CodeGen::genSIMDIntrinsicBinOp(GenTreeSIMD* simdNode) genProduceReg(simdNode); } -//-------------------------------------------------------------------------------- -// genSIMDIntrinsicDotProduct: Generate code for SIMD Intrinsic Dot Product. -// -// Arguments: -// simdNode - The GT_SIMD node -// -// Return Value: -// None. -// -void CodeGen::genSIMDIntrinsicDotProduct(GenTreeSIMD* simdNode) -{ - assert(simdNode->gtSIMDIntrinsicID == SIMDIntrinsicDotProduct); - - GenTree* op1 = simdNode->gtGetOp1(); - GenTree* op2 = simdNode->gtGetOp2(); - var_types baseType = simdNode->gtSIMDBaseType; - var_types simdType = op1->TypeGet(); - - regNumber targetReg = simdNode->GetRegNum(); - assert(targetReg != REG_NA); - - var_types targetType = simdNode->TypeGet(); - assert(targetType == baseType); - - genConsumeOperands(simdNode); - regNumber op1Reg = op1->GetRegNum(); - regNumber op2Reg = op2->GetRegNum(); - regNumber tmpReg = targetReg; - - if (!varTypeIsFloating(baseType)) - { - tmpReg = simdNode->GetSingleTempReg(RBM_ALLFLOAT); - } - - instruction ins = getOpForSIMDIntrinsic(SIMDIntrinsicMul, baseType); - emitAttr attr = (simdNode->gtSIMDSize > 8) ? EA_16BYTE : EA_8BYTE; - insOpts opt = genGetSimdInsOpt(attr, baseType); - - // Vector multiply - GetEmitter()->emitIns_R_R_R(ins, attr, tmpReg, op1Reg, op2Reg, opt); - - if ((simdNode->gtFlags & GTF_SIMD12_OP) != 0) - { - // For 12Byte vectors we must zero upper bits to get correct dot product - // We do not assume upper bits are zero. - GetEmitter()->emitIns_R_R_I(INS_ins, EA_4BYTE, tmpReg, REG_ZR, 3); - } - - // Vector add horizontal - if (varTypeIsFloating(baseType)) - { - if (baseType == TYP_FLOAT) - { - if (opt == INS_OPTS_4S) - { - GetEmitter()->emitIns_R_R_R(INS_faddp, EA_16BYTE, tmpReg, tmpReg, tmpReg, INS_OPTS_4S); - } - GetEmitter()->emitIns_R_R(INS_faddp, EA_8BYTE, targetReg, tmpReg, INS_OPTS_2S); - } - else - { - GetEmitter()->emitIns_R_R(INS_faddp, EA_16BYTE, targetReg, tmpReg, INS_OPTS_2D); - } - } - else - { - ins = varTypeIsUnsigned(baseType) ? INS_uaddlv : INS_saddlv; - - GetEmitter()->emitIns_R_R(ins, attr, tmpReg, tmpReg, opt); - - // Mov to integer register - if (varTypeIsUnsigned(baseType) || (genTypeSize(baseType) < 4)) - { - GetEmitter()->emitIns_R_R_I(INS_mov, emitTypeSize(baseType), targetReg, tmpReg, 0); - } - else - { - GetEmitter()->emitIns_R_R_I(INS_smov, emitActualTypeSize(baseType), targetReg, tmpReg, 0); - } - } - - genProduceReg(simdNode); -} - //------------------------------------------------------------------------------------ // genSIMDIntrinsicGetItem: Generate code for SIMD Intrinsic get element at index i. // @@ -7604,6 +7502,70 @@ void CodeGen::genArm64EmitterUnitTests() theEmitter->emitIns_R_R(INS_fsqrt, EA_16BYTE, REG_V6, REG_V7, INS_OPTS_4S); theEmitter->emitIns_R_R(INS_fsqrt, EA_16BYTE, REG_V8, REG_V9, INS_OPTS_2D); + // faddp scalar + theEmitter->emitIns_R_R(INS_faddp, EA_8BYTE, REG_V0, REG_V1, INS_OPTS_2S); + theEmitter->emitIns_R_R(INS_faddp, EA_16BYTE, REG_V2, REG_V3, INS_OPTS_2D); + + // fcmeq Vd, Vn, #0.0 + theEmitter->emitIns_R_R(INS_fcmeq, EA_4BYTE, REG_V0, REG_V1); // scalar 4BYTE + theEmitter->emitIns_R_R(INS_fcmeq, EA_8BYTE, REG_V2, REG_V3); // scalar 8BYTE + + // fcmge Vd, Vn, #0.0 + theEmitter->emitIns_R_R(INS_fcmge, EA_4BYTE, REG_V0, REG_V1); // scalar 4BYTE + theEmitter->emitIns_R_R(INS_fcmge, EA_8BYTE, REG_V2, REG_V3); // scalar 8BYTE + + // fcmgt Vd, Vn, #0.0 + theEmitter->emitIns_R_R(INS_fcmgt, EA_4BYTE, REG_V0, REG_V1); // scalar 4BYTE + theEmitter->emitIns_R_R(INS_fcmgt, EA_8BYTE, REG_V2, REG_V3); // scalar 8BYTE + + // fcmle Vd, Vn, #0.0 + theEmitter->emitIns_R_R(INS_fcmle, EA_4BYTE, REG_V0, REG_V1); // scalar 4BYTE + theEmitter->emitIns_R_R(INS_fcmle, EA_8BYTE, REG_V2, REG_V3); // scalar 8BYTE + + // fcmlt Vd, Vn, #0.0 + theEmitter->emitIns_R_R(INS_fcmlt, EA_4BYTE, REG_V0, REG_V1); // scalar 4BYTE + theEmitter->emitIns_R_R(INS_fcmlt, EA_8BYTE, REG_V2, REG_V3); // scalar 8BYTE + + // frecpe scalar + theEmitter->emitIns_R_R(INS_frecpe, EA_4BYTE, REG_V0, REG_V1); // scalar 4BYTE + theEmitter->emitIns_R_R(INS_frecpe, EA_8BYTE, REG_V2, REG_V3); // scalar 8BYTE + theEmitter->emitIns_R_R(INS_frecpe, EA_8BYTE, REG_V4, REG_V5, INS_OPTS_2S); + theEmitter->emitIns_R_R(INS_frecpe, EA_16BYTE, REG_V6, REG_V7, INS_OPTS_4S); + theEmitter->emitIns_R_R(INS_frecpe, EA_16BYTE, REG_V8, REG_V9, INS_OPTS_2D); + + // frecpx scalar + theEmitter->emitIns_R_R(INS_frecpx, EA_4BYTE, REG_V0, REG_V1); + theEmitter->emitIns_R_R(INS_frecpx, EA_8BYTE, REG_V2, REG_V3); + + // frsqrte + theEmitter->emitIns_R_R(INS_frsqrte, EA_4BYTE, REG_V0, REG_V1); // scalar 4BYTE + theEmitter->emitIns_R_R(INS_frsqrte, EA_8BYTE, REG_V2, REG_V3); // scalar 8BYTE + theEmitter->emitIns_R_R(INS_frsqrte, EA_8BYTE, REG_V4, REG_V5, INS_OPTS_2S); + theEmitter->emitIns_R_R(INS_frsqrte, EA_16BYTE, REG_V6, REG_V7, INS_OPTS_4S); + theEmitter->emitIns_R_R(INS_frsqrte, EA_16BYTE, REG_V8, REG_V9, INS_OPTS_2D); + + // fcvtl{2} vector + theEmitter->emitIns_R_R(INS_fcvtl, EA_8BYTE, REG_V0, REG_V1, INS_OPTS_4H); + theEmitter->emitIns_R_R(INS_fcvtl2, EA_16BYTE, REG_V2, REG_V3, INS_OPTS_8H); + theEmitter->emitIns_R_R(INS_fcvtl, EA_8BYTE, REG_V4, REG_V5, INS_OPTS_2S); + theEmitter->emitIns_R_R(INS_fcvtl2, EA_16BYTE, REG_V5, REG_V6, INS_OPTS_4S); + + // fcvtn{2} vector + theEmitter->emitIns_R_R(INS_fcvtn, EA_8BYTE, REG_V0, REG_V1, INS_OPTS_4H); + theEmitter->emitIns_R_R(INS_fcvtn2, EA_16BYTE, REG_V2, REG_V3, INS_OPTS_8H); + theEmitter->emitIns_R_R(INS_fcvtn, EA_8BYTE, REG_V4, REG_V5, INS_OPTS_2S); + theEmitter->emitIns_R_R(INS_fcvtn2, EA_16BYTE, REG_V5, REG_V6, INS_OPTS_4S); + + // fcvtxn scalar + theEmitter->emitIns_R_R(INS_fcvtxn, EA_4BYTE, REG_V0, REG_V1); + + // fcvtxn{2} vector + theEmitter->emitIns_R_R(INS_fcvtxn, EA_8BYTE, REG_V0, REG_V1, INS_OPTS_2S); + theEmitter->emitIns_R_R(INS_fcvtxn2, EA_16BYTE, REG_V2, REG_V3, INS_OPTS_4S); + +#endif + +#ifdef ALL_ARM64_EMITTER_UNIT_TESTS genDefineTempLabel(genCreateTempLabel()); // abs scalar @@ -7618,34 +7580,17 @@ void CodeGen::genArm64EmitterUnitTests() theEmitter->emitIns_R_R(INS_abs, EA_16BYTE, REG_V14, REG_V15, INS_OPTS_4S); theEmitter->emitIns_R_R(INS_abs, EA_16BYTE, REG_V16, REG_V17, INS_OPTS_2D); - // neg scalar - theEmitter->emitIns_R_R(INS_neg, EA_8BYTE, REG_V2, REG_V3); - - // neg vector - theEmitter->emitIns_R_R(INS_neg, EA_8BYTE, REG_V4, REG_V5, INS_OPTS_8B); - theEmitter->emitIns_R_R(INS_neg, EA_16BYTE, REG_V6, REG_V7, INS_OPTS_16B); - theEmitter->emitIns_R_R(INS_neg, EA_8BYTE, REG_V8, REG_V9, INS_OPTS_4H); - theEmitter->emitIns_R_R(INS_neg, EA_16BYTE, REG_V10, REG_V11, INS_OPTS_8H); - theEmitter->emitIns_R_R(INS_neg, EA_8BYTE, REG_V12, REG_V13, INS_OPTS_2S); - theEmitter->emitIns_R_R(INS_neg, EA_16BYTE, REG_V14, REG_V15, INS_OPTS_4S); - theEmitter->emitIns_R_R(INS_neg, EA_16BYTE, REG_V16, REG_V17, INS_OPTS_2D); - - // mvn vector - theEmitter->emitIns_R_R(INS_mvn, EA_8BYTE, REG_V4, REG_V5); - theEmitter->emitIns_R_R(INS_mvn, EA_8BYTE, REG_V6, REG_V7, INS_OPTS_8B); - theEmitter->emitIns_R_R(INS_mvn, EA_16BYTE, REG_V8, REG_V9); - theEmitter->emitIns_R_R(INS_mvn, EA_16BYTE, REG_V10, REG_V11, INS_OPTS_16B); + // addv vector + theEmitter->emitIns_R_R(INS_addv, EA_8BYTE, REG_V4, REG_V5, INS_OPTS_8B); + theEmitter->emitIns_R_R(INS_addv, EA_16BYTE, REG_V6, REG_V7, INS_OPTS_16B); + theEmitter->emitIns_R_R(INS_addv, EA_8BYTE, REG_V8, REG_V9, INS_OPTS_4H); + theEmitter->emitIns_R_R(INS_addv, EA_16BYTE, REG_V10, REG_V11, INS_OPTS_8H); + theEmitter->emitIns_R_R(INS_addv, EA_16BYTE, REG_V14, REG_V15, INS_OPTS_4S); // cnt vector theEmitter->emitIns_R_R(INS_cnt, EA_8BYTE, REG_V22, REG_V23, INS_OPTS_8B); theEmitter->emitIns_R_R(INS_cnt, EA_16BYTE, REG_V24, REG_V25, INS_OPTS_16B); - // not vector (the same encoding as mvn) - theEmitter->emitIns_R_R(INS_not, EA_8BYTE, REG_V12, REG_V13); - theEmitter->emitIns_R_R(INS_not, EA_8BYTE, REG_V14, REG_V15, INS_OPTS_8B); - theEmitter->emitIns_R_R(INS_not, EA_16BYTE, REG_V16, REG_V17); - theEmitter->emitIns_R_R(INS_not, EA_16BYTE, REG_V18, REG_V19, INS_OPTS_16B); - // cls vector theEmitter->emitIns_R_R(INS_cls, EA_8BYTE, REG_V4, REG_V5, INS_OPTS_8B); theEmitter->emitIns_R_R(INS_cls, EA_16BYTE, REG_V6, REG_V7, INS_OPTS_16B); @@ -7662,6 +7607,30 @@ void CodeGen::genArm64EmitterUnitTests() theEmitter->emitIns_R_R(INS_clz, EA_8BYTE, REG_V12, REG_V13, INS_OPTS_2S); theEmitter->emitIns_R_R(INS_clz, EA_16BYTE, REG_V14, REG_V15, INS_OPTS_4S); + // mvn vector + theEmitter->emitIns_R_R(INS_mvn, EA_8BYTE, REG_V4, REG_V5); + theEmitter->emitIns_R_R(INS_mvn, EA_8BYTE, REG_V6, REG_V7, INS_OPTS_8B); + theEmitter->emitIns_R_R(INS_mvn, EA_16BYTE, REG_V8, REG_V9); + theEmitter->emitIns_R_R(INS_mvn, EA_16BYTE, REG_V10, REG_V11, INS_OPTS_16B); + + // neg scalar + theEmitter->emitIns_R_R(INS_neg, EA_8BYTE, REG_V2, REG_V3); + + // neg vector + theEmitter->emitIns_R_R(INS_neg, EA_8BYTE, REG_V4, REG_V5, INS_OPTS_8B); + theEmitter->emitIns_R_R(INS_neg, EA_16BYTE, REG_V6, REG_V7, INS_OPTS_16B); + theEmitter->emitIns_R_R(INS_neg, EA_8BYTE, REG_V8, REG_V9, INS_OPTS_4H); + theEmitter->emitIns_R_R(INS_neg, EA_16BYTE, REG_V10, REG_V11, INS_OPTS_8H); + theEmitter->emitIns_R_R(INS_neg, EA_8BYTE, REG_V12, REG_V13, INS_OPTS_2S); + theEmitter->emitIns_R_R(INS_neg, EA_16BYTE, REG_V14, REG_V15, INS_OPTS_4S); + theEmitter->emitIns_R_R(INS_neg, EA_16BYTE, REG_V16, REG_V17, INS_OPTS_2D); + + // not vector (the same encoding as mvn) + theEmitter->emitIns_R_R(INS_not, EA_8BYTE, REG_V12, REG_V13); + theEmitter->emitIns_R_R(INS_not, EA_8BYTE, REG_V14, REG_V15, INS_OPTS_8B); + theEmitter->emitIns_R_R(INS_not, EA_16BYTE, REG_V16, REG_V17); + theEmitter->emitIns_R_R(INS_not, EA_16BYTE, REG_V18, REG_V19, INS_OPTS_16B); + // rbit vector theEmitter->emitIns_R_R(INS_rbit, EA_8BYTE, REG_V0, REG_V1, INS_OPTS_8B); theEmitter->emitIns_R_R(INS_rbit, EA_16BYTE, REG_V2, REG_V3, INS_OPTS_16B); @@ -7684,12 +7653,21 @@ void CodeGen::genArm64EmitterUnitTests() theEmitter->emitIns_R_R(INS_rev64, EA_8BYTE, REG_V12, REG_V13, INS_OPTS_2S); theEmitter->emitIns_R_R(INS_rev64, EA_16BYTE, REG_V14, REG_V15, INS_OPTS_4S); - // addv vector - theEmitter->emitIns_R_R(INS_addv, EA_8BYTE, REG_V4, REG_V5, INS_OPTS_8B); - theEmitter->emitIns_R_R(INS_addv, EA_16BYTE, REG_V6, REG_V7, INS_OPTS_16B); - theEmitter->emitIns_R_R(INS_addv, EA_8BYTE, REG_V8, REG_V9, INS_OPTS_4H); - theEmitter->emitIns_R_R(INS_addv, EA_16BYTE, REG_V10, REG_V11, INS_OPTS_8H); - theEmitter->emitIns_R_R(INS_addv, EA_16BYTE, REG_V14, REG_V15, INS_OPTS_4S); + // sadalp vector + theEmitter->emitIns_R_R(INS_sadalp, EA_8BYTE, REG_V0, REG_V1, INS_OPTS_8B); + theEmitter->emitIns_R_R(INS_sadalp, EA_8BYTE, REG_V2, REG_V3, INS_OPTS_4H); + theEmitter->emitIns_R_R(INS_sadalp, EA_8BYTE, REG_V4, REG_V5, INS_OPTS_2S); + theEmitter->emitIns_R_R(INS_sadalp, EA_16BYTE, REG_V6, REG_V7, INS_OPTS_16B); + theEmitter->emitIns_R_R(INS_sadalp, EA_16BYTE, REG_V8, REG_V9, INS_OPTS_8H); + theEmitter->emitIns_R_R(INS_sadalp, EA_16BYTE, REG_V10, REG_V11, INS_OPTS_4S); + + // saddlp vector + theEmitter->emitIns_R_R(INS_saddlp, EA_8BYTE, REG_V0, REG_V1, INS_OPTS_8B); + theEmitter->emitIns_R_R(INS_saddlp, EA_8BYTE, REG_V2, REG_V3, INS_OPTS_4H); + theEmitter->emitIns_R_R(INS_saddlp, EA_8BYTE, REG_V4, REG_V5, INS_OPTS_2S); + theEmitter->emitIns_R_R(INS_saddlp, EA_16BYTE, REG_V6, REG_V7, INS_OPTS_16B); + theEmitter->emitIns_R_R(INS_saddlp, EA_16BYTE, REG_V8, REG_V9, INS_OPTS_8H); + theEmitter->emitIns_R_R(INS_saddlp, EA_16BYTE, REG_V10, REG_V11, INS_OPTS_4S); // saddlv vector theEmitter->emitIns_R_R(INS_saddlv, EA_8BYTE, REG_V4, REG_V5, INS_OPTS_8B); @@ -7712,6 +7690,97 @@ void CodeGen::genArm64EmitterUnitTests() theEmitter->emitIns_R_R(INS_sminv, EA_16BYTE, REG_V10, REG_V11, INS_OPTS_8H); theEmitter->emitIns_R_R(INS_sminv, EA_16BYTE, REG_V12, REG_V13, INS_OPTS_4S); + // sqabs scalar + theEmitter->emitIns_R_R(INS_sqabs, EA_1BYTE, REG_V0, REG_V1, INS_OPTS_NONE); + theEmitter->emitIns_R_R(INS_sqabs, EA_2BYTE, REG_V2, REG_V3, INS_OPTS_NONE); + theEmitter->emitIns_R_R(INS_sqabs, EA_4BYTE, REG_V4, REG_V5, INS_OPTS_NONE); + theEmitter->emitIns_R_R(INS_sqabs, EA_8BYTE, REG_V6, REG_V7, INS_OPTS_NONE); + + // sqabs vector + theEmitter->emitIns_R_R(INS_sqabs, EA_8BYTE, REG_V0, REG_V1, INS_OPTS_8B); + theEmitter->emitIns_R_R(INS_sqabs, EA_16BYTE, REG_V2, REG_V3, INS_OPTS_16B); + theEmitter->emitIns_R_R(INS_sqabs, EA_8BYTE, REG_V4, REG_V5, INS_OPTS_4H); + theEmitter->emitIns_R_R(INS_sqabs, EA_16BYTE, REG_V6, REG_V7, INS_OPTS_8H); + theEmitter->emitIns_R_R(INS_sqabs, EA_8BYTE, REG_V8, REG_V9, INS_OPTS_2S); + theEmitter->emitIns_R_R(INS_sqabs, EA_16BYTE, REG_V10, REG_V11, INS_OPTS_4S); + theEmitter->emitIns_R_R(INS_sqabs, EA_16BYTE, REG_V12, REG_V13, INS_OPTS_2D); + + // sqneg scalar + theEmitter->emitIns_R_R(INS_sqneg, EA_1BYTE, REG_V0, REG_V1, INS_OPTS_NONE); + theEmitter->emitIns_R_R(INS_sqneg, EA_2BYTE, REG_V2, REG_V3, INS_OPTS_NONE); + theEmitter->emitIns_R_R(INS_sqneg, EA_4BYTE, REG_V4, REG_V5, INS_OPTS_NONE); + theEmitter->emitIns_R_R(INS_sqneg, EA_8BYTE, REG_V6, REG_V7, INS_OPTS_NONE); + + // sqneg vector + theEmitter->emitIns_R_R(INS_sqneg, EA_8BYTE, REG_V0, REG_V1, INS_OPTS_8B); + theEmitter->emitIns_R_R(INS_sqneg, EA_16BYTE, REG_V2, REG_V3, INS_OPTS_16B); + theEmitter->emitIns_R_R(INS_sqneg, EA_8BYTE, REG_V4, REG_V5, INS_OPTS_4H); + theEmitter->emitIns_R_R(INS_sqneg, EA_16BYTE, REG_V6, REG_V7, INS_OPTS_8H); + theEmitter->emitIns_R_R(INS_sqneg, EA_8BYTE, REG_V8, REG_V9, INS_OPTS_2S); + theEmitter->emitIns_R_R(INS_sqneg, EA_16BYTE, REG_V10, REG_V11, INS_OPTS_4S); + theEmitter->emitIns_R_R(INS_sqneg, EA_16BYTE, REG_V12, REG_V13, INS_OPTS_2D); + + // sqxtn scalar + theEmitter->emitIns_R_R(INS_sqxtn, EA_1BYTE, REG_V0, REG_V1, INS_OPTS_NONE); + theEmitter->emitIns_R_R(INS_sqxtn, EA_2BYTE, REG_V2, REG_V3, INS_OPTS_NONE); + theEmitter->emitIns_R_R(INS_sqxtn, EA_4BYTE, REG_V4, REG_V5, INS_OPTS_NONE); + + // sqxtn vector + theEmitter->emitIns_R_R(INS_sqxtn, EA_8BYTE, REG_V0, REG_V6, INS_OPTS_8B); + theEmitter->emitIns_R_R(INS_sqxtn, EA_8BYTE, REG_V1, REG_V7, INS_OPTS_4H); + theEmitter->emitIns_R_R(INS_sqxtn, EA_8BYTE, REG_V2, REG_V8, INS_OPTS_2S); + + // sqxtn2 vector + theEmitter->emitIns_R_R(INS_sqxtn2, EA_16BYTE, REG_V3, REG_V9, INS_OPTS_16B); + theEmitter->emitIns_R_R(INS_sqxtn2, EA_16BYTE, REG_V4, REG_V10, INS_OPTS_8H); + theEmitter->emitIns_R_R(INS_sqxtn2, EA_16BYTE, REG_V5, REG_V11, INS_OPTS_4S); + + // sqxtun scalar + theEmitter->emitIns_R_R(INS_sqxtun, EA_1BYTE, REG_V0, REG_V1, INS_OPTS_NONE); + theEmitter->emitIns_R_R(INS_sqxtun, EA_2BYTE, REG_V2, REG_V3, INS_OPTS_NONE); + theEmitter->emitIns_R_R(INS_sqxtun, EA_4BYTE, REG_V4, REG_V5, INS_OPTS_NONE); + + // sqxtun vector + theEmitter->emitIns_R_R(INS_sqxtun, EA_8BYTE, REG_V0, REG_V6, INS_OPTS_8B); + theEmitter->emitIns_R_R(INS_sqxtun, EA_8BYTE, REG_V1, REG_V7, INS_OPTS_4H); + theEmitter->emitIns_R_R(INS_sqxtun, EA_8BYTE, REG_V2, REG_V8, INS_OPTS_2S); + + // sqxtun2 vector + theEmitter->emitIns_R_R(INS_sqxtun2, EA_16BYTE, REG_V3, REG_V9, INS_OPTS_16B); + theEmitter->emitIns_R_R(INS_sqxtun2, EA_16BYTE, REG_V4, REG_V10, INS_OPTS_8H); + theEmitter->emitIns_R_R(INS_sqxtun2, EA_16BYTE, REG_V5, REG_V11, INS_OPTS_4S); + + // suqadd scalar + theEmitter->emitIns_R_R(INS_suqadd, EA_1BYTE, REG_V0, REG_V1, INS_OPTS_NONE); + theEmitter->emitIns_R_R(INS_suqadd, EA_2BYTE, REG_V2, REG_V3, INS_OPTS_NONE); + theEmitter->emitIns_R_R(INS_suqadd, EA_4BYTE, REG_V4, REG_V5, INS_OPTS_NONE); + theEmitter->emitIns_R_R(INS_suqadd, EA_8BYTE, REG_V6, REG_V7, INS_OPTS_NONE); + + // suqadd vector + theEmitter->emitIns_R_R(INS_suqadd, EA_8BYTE, REG_V0, REG_V1, INS_OPTS_8B); + theEmitter->emitIns_R_R(INS_suqadd, EA_16BYTE, REG_V2, REG_V3, INS_OPTS_16B); + theEmitter->emitIns_R_R(INS_suqadd, EA_8BYTE, REG_V4, REG_V5, INS_OPTS_4H); + theEmitter->emitIns_R_R(INS_suqadd, EA_16BYTE, REG_V6, REG_V7, INS_OPTS_8H); + theEmitter->emitIns_R_R(INS_suqadd, EA_8BYTE, REG_V8, REG_V9, INS_OPTS_2S); + theEmitter->emitIns_R_R(INS_suqadd, EA_16BYTE, REG_V10, REG_V11, INS_OPTS_4S); + theEmitter->emitIns_R_R(INS_suqadd, EA_16BYTE, REG_V12, REG_V13, INS_OPTS_2D); + + // uadalp vector + theEmitter->emitIns_R_R(INS_uadalp, EA_8BYTE, REG_V0, REG_V1, INS_OPTS_8B); + theEmitter->emitIns_R_R(INS_uadalp, EA_8BYTE, REG_V2, REG_V3, INS_OPTS_4H); + theEmitter->emitIns_R_R(INS_uadalp, EA_8BYTE, REG_V4, REG_V5, INS_OPTS_2S); + theEmitter->emitIns_R_R(INS_uadalp, EA_16BYTE, REG_V6, REG_V7, INS_OPTS_16B); + theEmitter->emitIns_R_R(INS_uadalp, EA_16BYTE, REG_V8, REG_V9, INS_OPTS_8H); + theEmitter->emitIns_R_R(INS_uadalp, EA_16BYTE, REG_V10, REG_V11, INS_OPTS_4S); + + // uaddlp vector + theEmitter->emitIns_R_R(INS_uaddlp, EA_8BYTE, REG_V0, REG_V1, INS_OPTS_8B); + theEmitter->emitIns_R_R(INS_uaddlp, EA_8BYTE, REG_V2, REG_V3, INS_OPTS_4H); + theEmitter->emitIns_R_R(INS_uaddlp, EA_8BYTE, REG_V4, REG_V5, INS_OPTS_2S); + theEmitter->emitIns_R_R(INS_uaddlp, EA_16BYTE, REG_V6, REG_V7, INS_OPTS_16B); + theEmitter->emitIns_R_R(INS_uaddlp, EA_16BYTE, REG_V8, REG_V9, INS_OPTS_8H); + theEmitter->emitIns_R_R(INS_uaddlp, EA_16BYTE, REG_V10, REG_V11, INS_OPTS_4S); + // uaddlv vector theEmitter->emitIns_R_R(INS_uaddlv, EA_8BYTE, REG_V4, REG_V5, INS_OPTS_8B); theEmitter->emitIns_R_R(INS_uaddlv, EA_16BYTE, REG_V6, REG_V7, INS_OPTS_16B); @@ -7733,47 +7802,20 @@ void CodeGen::genArm64EmitterUnitTests() theEmitter->emitIns_R_R(INS_uminv, EA_16BYTE, REG_V10, REG_V11, INS_OPTS_8H); theEmitter->emitIns_R_R(INS_uminv, EA_16BYTE, REG_V12, REG_V13, INS_OPTS_4S); - // faddp scalar - theEmitter->emitIns_R_R(INS_faddp, EA_8BYTE, REG_V0, REG_V1, INS_OPTS_2S); - theEmitter->emitIns_R_R(INS_faddp, EA_16BYTE, REG_V2, REG_V3, INS_OPTS_2D); + // uqxtn scalar + theEmitter->emitIns_R_R(INS_uqxtn, EA_1BYTE, REG_V0, REG_V1, INS_OPTS_NONE); + theEmitter->emitIns_R_R(INS_uqxtn, EA_2BYTE, REG_V2, REG_V3, INS_OPTS_NONE); + theEmitter->emitIns_R_R(INS_uqxtn, EA_4BYTE, REG_V4, REG_V5, INS_OPTS_NONE); - // fcmeq Vd, Vn, #0.0 - theEmitter->emitIns_R_R(INS_fcmeq, EA_4BYTE, REG_V0, REG_V1); // scalar 4BYTE - theEmitter->emitIns_R_R(INS_fcmeq, EA_8BYTE, REG_V2, REG_V3); // scalar 8BYTE + // uqxtn vector + theEmitter->emitIns_R_R(INS_uqxtn, EA_8BYTE, REG_V0, REG_V6, INS_OPTS_8B); + theEmitter->emitIns_R_R(INS_uqxtn, EA_8BYTE, REG_V1, REG_V7, INS_OPTS_4H); + theEmitter->emitIns_R_R(INS_uqxtn, EA_8BYTE, REG_V2, REG_V8, INS_OPTS_2S); - // fcmge Vd, Vn, #0.0 - theEmitter->emitIns_R_R(INS_fcmge, EA_4BYTE, REG_V0, REG_V1); // scalar 4BYTE - theEmitter->emitIns_R_R(INS_fcmge, EA_8BYTE, REG_V2, REG_V3); // scalar 8BYTE - - // fcmgt Vd, Vn, #0.0 - theEmitter->emitIns_R_R(INS_fcmgt, EA_4BYTE, REG_V0, REG_V1); // scalar 4BYTE - theEmitter->emitIns_R_R(INS_fcmgt, EA_8BYTE, REG_V2, REG_V3); // scalar 8BYTE - - // fcmle Vd, Vn, #0.0 - theEmitter->emitIns_R_R(INS_fcmle, EA_4BYTE, REG_V0, REG_V1); // scalar 4BYTE - theEmitter->emitIns_R_R(INS_fcmle, EA_8BYTE, REG_V2, REG_V3); // scalar 8BYTE - - // fcmlt Vd, Vn, #0.0 - theEmitter->emitIns_R_R(INS_fcmlt, EA_4BYTE, REG_V0, REG_V1); // scalar 4BYTE - theEmitter->emitIns_R_R(INS_fcmlt, EA_8BYTE, REG_V2, REG_V3); // scalar 8BYTE - - // frecpe scalar - theEmitter->emitIns_R_R(INS_frecpe, EA_4BYTE, REG_V0, REG_V1); // scalar 4BYTE - theEmitter->emitIns_R_R(INS_frecpe, EA_8BYTE, REG_V2, REG_V3); // scalar 8BYTE - theEmitter->emitIns_R_R(INS_frecpe, EA_8BYTE, REG_V4, REG_V5, INS_OPTS_2S); - theEmitter->emitIns_R_R(INS_frecpe, EA_16BYTE, REG_V6, REG_V7, INS_OPTS_4S); - theEmitter->emitIns_R_R(INS_frecpe, EA_16BYTE, REG_V8, REG_V9, INS_OPTS_2D); - - // frecpx scalar - theEmitter->emitIns_R_R(INS_frecpx, EA_4BYTE, REG_V0, REG_V1); - theEmitter->emitIns_R_R(INS_frecpx, EA_8BYTE, REG_V2, REG_V3); - - // frsqrte - theEmitter->emitIns_R_R(INS_frsqrte, EA_4BYTE, REG_V0, REG_V1); // scalar 4BYTE - theEmitter->emitIns_R_R(INS_frsqrte, EA_8BYTE, REG_V2, REG_V3); // scalar 8BYTE - theEmitter->emitIns_R_R(INS_frsqrte, EA_8BYTE, REG_V4, REG_V5, INS_OPTS_2S); - theEmitter->emitIns_R_R(INS_frsqrte, EA_16BYTE, REG_V6, REG_V7, INS_OPTS_4S); - theEmitter->emitIns_R_R(INS_frsqrte, EA_16BYTE, REG_V8, REG_V9, INS_OPTS_2D); + // uqxtn2 vector + theEmitter->emitIns_R_R(INS_uqxtn2, EA_16BYTE, REG_V3, REG_V9, INS_OPTS_16B); + theEmitter->emitIns_R_R(INS_uqxtn2, EA_16BYTE, REG_V4, REG_V10, INS_OPTS_8H); + theEmitter->emitIns_R_R(INS_uqxtn2, EA_16BYTE, REG_V5, REG_V11, INS_OPTS_4S); // urecpe vector theEmitter->emitIns_R_R(INS_urecpe, EA_8BYTE, REG_V0, REG_V1, INS_OPTS_2S); @@ -7783,52 +7825,31 @@ void CodeGen::genArm64EmitterUnitTests() theEmitter->emitIns_R_R(INS_ursqrte, EA_8BYTE, REG_V0, REG_V1, INS_OPTS_2S); theEmitter->emitIns_R_R(INS_ursqrte, EA_16BYTE, REG_V2, REG_V3, INS_OPTS_4S); - // fcvtl{2} vector - theEmitter->emitIns_R_R(INS_fcvtl, EA_8BYTE, REG_V0, REG_V1, INS_OPTS_4H); - theEmitter->emitIns_R_R(INS_fcvtl2, EA_16BYTE, REG_V2, REG_V3, INS_OPTS_8H); - theEmitter->emitIns_R_R(INS_fcvtl, EA_8BYTE, REG_V4, REG_V5, INS_OPTS_2S); - theEmitter->emitIns_R_R(INS_fcvtl2, EA_16BYTE, REG_V5, REG_V6, INS_OPTS_4S); - - // fcvtn{2} vector - theEmitter->emitIns_R_R(INS_fcvtn, EA_8BYTE, REG_V0, REG_V1, INS_OPTS_4H); - theEmitter->emitIns_R_R(INS_fcvtn2, EA_16BYTE, REG_V2, REG_V3, INS_OPTS_8H); - theEmitter->emitIns_R_R(INS_fcvtn, EA_8BYTE, REG_V4, REG_V5, INS_OPTS_2S); - theEmitter->emitIns_R_R(INS_fcvtn2, EA_16BYTE, REG_V5, REG_V6, INS_OPTS_4S); - -#endif - -#ifdef ALL_ARM64_EMITTER_UNIT_TESTS - // sadalp vector - theEmitter->emitIns_R_R(INS_sadalp, EA_8BYTE, REG_V0, REG_V1, INS_OPTS_8B); - theEmitter->emitIns_R_R(INS_sadalp, EA_8BYTE, REG_V2, REG_V3, INS_OPTS_4H); - theEmitter->emitIns_R_R(INS_sadalp, EA_8BYTE, REG_V4, REG_V5, INS_OPTS_2S); - theEmitter->emitIns_R_R(INS_sadalp, EA_16BYTE, REG_V6, REG_V7, INS_OPTS_16B); - theEmitter->emitIns_R_R(INS_sadalp, EA_16BYTE, REG_V8, REG_V9, INS_OPTS_8H); - theEmitter->emitIns_R_R(INS_sadalp, EA_16BYTE, REG_V10, REG_V11, INS_OPTS_4S); - - // saddlp vector - theEmitter->emitIns_R_R(INS_saddlp, EA_8BYTE, REG_V0, REG_V1, INS_OPTS_8B); - theEmitter->emitIns_R_R(INS_saddlp, EA_8BYTE, REG_V2, REG_V3, INS_OPTS_4H); - theEmitter->emitIns_R_R(INS_saddlp, EA_8BYTE, REG_V4, REG_V5, INS_OPTS_2S); - theEmitter->emitIns_R_R(INS_saddlp, EA_16BYTE, REG_V6, REG_V7, INS_OPTS_16B); - theEmitter->emitIns_R_R(INS_saddlp, EA_16BYTE, REG_V8, REG_V9, INS_OPTS_8H); - theEmitter->emitIns_R_R(INS_saddlp, EA_16BYTE, REG_V10, REG_V11, INS_OPTS_4S); - - // uadalp vector - theEmitter->emitIns_R_R(INS_uadalp, EA_8BYTE, REG_V0, REG_V1, INS_OPTS_8B); - theEmitter->emitIns_R_R(INS_uadalp, EA_8BYTE, REG_V2, REG_V3, INS_OPTS_4H); - theEmitter->emitIns_R_R(INS_uadalp, EA_8BYTE, REG_V4, REG_V5, INS_OPTS_2S); - theEmitter->emitIns_R_R(INS_uadalp, EA_16BYTE, REG_V6, REG_V7, INS_OPTS_16B); - theEmitter->emitIns_R_R(INS_uadalp, EA_16BYTE, REG_V8, REG_V9, INS_OPTS_8H); - theEmitter->emitIns_R_R(INS_uadalp, EA_16BYTE, REG_V10, REG_V11, INS_OPTS_4S); + // usqadd scalar + theEmitter->emitIns_R_R(INS_usqadd, EA_1BYTE, REG_V0, REG_V1, INS_OPTS_NONE); + theEmitter->emitIns_R_R(INS_usqadd, EA_2BYTE, REG_V2, REG_V3, INS_OPTS_NONE); + theEmitter->emitIns_R_R(INS_usqadd, EA_4BYTE, REG_V4, REG_V5, INS_OPTS_NONE); + theEmitter->emitIns_R_R(INS_usqadd, EA_8BYTE, REG_V6, REG_V7, INS_OPTS_NONE); + + // usqadd vector + theEmitter->emitIns_R_R(INS_usqadd, EA_8BYTE, REG_V0, REG_V1, INS_OPTS_8B); + theEmitter->emitIns_R_R(INS_usqadd, EA_16BYTE, REG_V2, REG_V3, INS_OPTS_16B); + theEmitter->emitIns_R_R(INS_usqadd, EA_8BYTE, REG_V4, REG_V5, INS_OPTS_4H); + theEmitter->emitIns_R_R(INS_usqadd, EA_16BYTE, REG_V6, REG_V7, INS_OPTS_8H); + theEmitter->emitIns_R_R(INS_usqadd, EA_8BYTE, REG_V8, REG_V9, INS_OPTS_2S); + theEmitter->emitIns_R_R(INS_usqadd, EA_16BYTE, REG_V10, REG_V11, INS_OPTS_4S); + theEmitter->emitIns_R_R(INS_usqadd, EA_16BYTE, REG_V12, REG_V13, INS_OPTS_2D); + + // xtn vector + theEmitter->emitIns_R_R(INS_xtn, EA_8BYTE, REG_V0, REG_V6, INS_OPTS_8B); + theEmitter->emitIns_R_R(INS_xtn, EA_8BYTE, REG_V1, REG_V7, INS_OPTS_4H); + theEmitter->emitIns_R_R(INS_xtn, EA_8BYTE, REG_V2, REG_V8, INS_OPTS_2S); + + // xtn2 vector + theEmitter->emitIns_R_R(INS_xtn2, EA_16BYTE, REG_V3, REG_V9, INS_OPTS_16B); + theEmitter->emitIns_R_R(INS_xtn2, EA_16BYTE, REG_V4, REG_V10, INS_OPTS_8H); + theEmitter->emitIns_R_R(INS_xtn2, EA_16BYTE, REG_V5, REG_V11, INS_OPTS_4S); - // uaddlp vector - theEmitter->emitIns_R_R(INS_uaddlp, EA_8BYTE, REG_V0, REG_V1, INS_OPTS_8B); - theEmitter->emitIns_R_R(INS_uaddlp, EA_8BYTE, REG_V2, REG_V3, INS_OPTS_4H); - theEmitter->emitIns_R_R(INS_uaddlp, EA_8BYTE, REG_V4, REG_V5, INS_OPTS_2S); - theEmitter->emitIns_R_R(INS_uaddlp, EA_16BYTE, REG_V6, REG_V7, INS_OPTS_16B); - theEmitter->emitIns_R_R(INS_uaddlp, EA_16BYTE, REG_V8, REG_V9, INS_OPTS_8H); - theEmitter->emitIns_R_R(INS_uaddlp, EA_16BYTE, REG_V10, REG_V11, INS_OPTS_4S); #endif // ALL_ARM64_EMITTER_UNIT_TESTS #ifdef ALL_ARM64_EMITTER_UNIT_TESTS @@ -8006,8 +8027,8 @@ void CodeGen::genArm64EmitterUnitTests() theEmitter->emitIns_R_R_R(INS_fmul, EA_16BYTE, REG_V9, REG_V10, REG_V11, INS_OPTS_4S); theEmitter->emitIns_R_R_R(INS_fmul, EA_16BYTE, REG_V12, REG_V13, REG_V14, INS_OPTS_2D); - theEmitter->emitIns_R_R_R_I(INS_fmul, EA_4BYTE, REG_V15, REG_V16, REG_V17, 3); // scalar by elem 4BYTE - theEmitter->emitIns_R_R_R_I(INS_fmul, EA_8BYTE, REG_V18, REG_V19, REG_V20, 1); // scalar by elem 8BYTE + theEmitter->emitIns_R_R_R_I(INS_fmul, EA_4BYTE, REG_V15, REG_V16, REG_V17, 3); // scalar by element 4BYTE + theEmitter->emitIns_R_R_R_I(INS_fmul, EA_8BYTE, REG_V18, REG_V19, REG_V20, 1); // scalar by element 8BYTE theEmitter->emitIns_R_R_R_I(INS_fmul, EA_8BYTE, REG_V21, REG_V22, REG_V23, 0, INS_OPTS_2S); theEmitter->emitIns_R_R_R_I(INS_fmul, EA_16BYTE, REG_V24, REG_V25, REG_V26, 2, INS_OPTS_4S); theEmitter->emitIns_R_R_R_I(INS_fmul, EA_16BYTE, REG_V27, REG_V28, REG_V29, 0, INS_OPTS_2D); @@ -8018,8 +8039,8 @@ void CodeGen::genArm64EmitterUnitTests() theEmitter->emitIns_R_R_R(INS_fmulx, EA_16BYTE, REG_V9, REG_V10, REG_V11, INS_OPTS_4S); theEmitter->emitIns_R_R_R(INS_fmulx, EA_16BYTE, REG_V12, REG_V13, REG_V14, INS_OPTS_2D); - theEmitter->emitIns_R_R_R_I(INS_fmulx, EA_4BYTE, REG_V15, REG_V16, REG_V17, 3); // scalar by elem 4BYTE - theEmitter->emitIns_R_R_R_I(INS_fmulx, EA_8BYTE, REG_V18, REG_V19, REG_V20, 1); // scalar by elem 8BYTE + theEmitter->emitIns_R_R_R_I(INS_fmulx, EA_4BYTE, REG_V15, REG_V16, REG_V17, 3); // scalar by element 4BYTE + theEmitter->emitIns_R_R_R_I(INS_fmulx, EA_8BYTE, REG_V18, REG_V19, REG_V20, 1); // scalar by element 8BYTE theEmitter->emitIns_R_R_R_I(INS_fmulx, EA_8BYTE, REG_V21, REG_V22, REG_V23, 0, INS_OPTS_2S); theEmitter->emitIns_R_R_R_I(INS_fmulx, EA_16BYTE, REG_V24, REG_V25, REG_V26, 2, INS_OPTS_4S); theEmitter->emitIns_R_R_R_I(INS_fmulx, EA_16BYTE, REG_V27, REG_V28, REG_V29, 0, INS_OPTS_2D); @@ -8581,6 +8602,10 @@ void CodeGen::genArm64EmitterUnitTests() #endif // ALL_ARM64_EMITTER_UNIT_TESTS #ifdef ALL_ARM64_EMITTER_UNIT_TESTS + // sdot vector + theEmitter->emitIns_R_R_R(INS_sdot, EA_8BYTE, REG_V0, REG_V1, REG_V2, INS_OPTS_2S); + theEmitter->emitIns_R_R_R(INS_sdot, EA_16BYTE, REG_V3, REG_V4, REG_V5, INS_OPTS_4S); + // smax vector theEmitter->emitIns_R_R_R(INS_smax, EA_8BYTE, REG_V0, REG_V1, REG_V2, INS_OPTS_8B); theEmitter->emitIns_R_R_R(INS_smax, EA_16BYTE, REG_V3, REG_V4, REG_V5, INS_OPTS_16B); @@ -8613,6 +8638,10 @@ void CodeGen::genArm64EmitterUnitTests() theEmitter->emitIns_R_R_R(INS_sminp, EA_8BYTE, REG_V12, REG_V13, REG_V14, INS_OPTS_2S); theEmitter->emitIns_R_R_R(INS_sminp, EA_16BYTE, REG_V15, REG_V16, REG_V17, INS_OPTS_4S); + // udot vector + theEmitter->emitIns_R_R_R(INS_udot, EA_8BYTE, REG_V0, REG_V1, REG_V2, INS_OPTS_2S); + theEmitter->emitIns_R_R_R(INS_udot, EA_16BYTE, REG_V3, REG_V4, REG_V5, INS_OPTS_4S); + // umax vector theEmitter->emitIns_R_R_R(INS_umax, EA_8BYTE, REG_V0, REG_V1, REG_V2, INS_OPTS_8B); theEmitter->emitIns_R_R_R(INS_umax, EA_16BYTE, REG_V3, REG_V4, REG_V5, INS_OPTS_16B); @@ -9002,6 +9031,82 @@ void CodeGen::genArm64EmitterUnitTests() theEmitter->emitIns_R_R_R(INS_subhn, EA_8BYTE, REG_V3, REG_V4, REG_V5, INS_OPTS_4H); theEmitter->emitIns_R_R_R(INS_subhn, EA_8BYTE, REG_V6, REG_V7, REG_V8, INS_OPTS_2S); + // sqdmlal scalar + theEmitter->emitIns_R_R_R(INS_sqdmlal, EA_2BYTE, REG_V0, REG_V1, REG_V2, INS_OPTS_NONE); + theEmitter->emitIns_R_R_R(INS_sqdmlal, EA_4BYTE, REG_V3, REG_V4, REG_V5, INS_OPTS_NONE); + + // sqdmlal vector + theEmitter->emitIns_R_R_R(INS_sqdmlal, EA_8BYTE, REG_V0, REG_V1, REG_V2, INS_OPTS_4H); + theEmitter->emitIns_R_R_R(INS_sqdmlal, EA_8BYTE, REG_V3, REG_V4, REG_V5, INS_OPTS_2S); + + // sqdmlal2 vector + theEmitter->emitIns_R_R_R(INS_sqdmlal2, EA_16BYTE, REG_V6, REG_V7, REG_V8, INS_OPTS_8H); + theEmitter->emitIns_R_R_R(INS_sqdmlal2, EA_16BYTE, REG_V9, REG_V10, REG_V11, INS_OPTS_4S); + + // sqdmlsl scalar + theEmitter->emitIns_R_R_R(INS_sqdmlsl, EA_2BYTE, REG_V0, REG_V1, REG_V2, INS_OPTS_NONE); + theEmitter->emitIns_R_R_R(INS_sqdmlsl, EA_4BYTE, REG_V3, REG_V4, REG_V5, INS_OPTS_NONE); + + // sqdmlsl vector + theEmitter->emitIns_R_R_R(INS_sqdmlsl, EA_8BYTE, REG_V0, REG_V1, REG_V2, INS_OPTS_4H); + theEmitter->emitIns_R_R_R(INS_sqdmlsl, EA_8BYTE, REG_V3, REG_V4, REG_V5, INS_OPTS_2S); + + // sqdmlsl2 vector + theEmitter->emitIns_R_R_R(INS_sqdmlsl2, EA_16BYTE, REG_V6, REG_V7, REG_V8, INS_OPTS_8H); + theEmitter->emitIns_R_R_R(INS_sqdmlsl2, EA_16BYTE, REG_V9, REG_V10, REG_V11, INS_OPTS_4S); + + // sqdmulh scalar + theEmitter->emitIns_R_R_R(INS_sqdmulh, EA_2BYTE, REG_V0, REG_V1, REG_V2, INS_OPTS_NONE); + theEmitter->emitIns_R_R_R(INS_sqdmulh, EA_4BYTE, REG_V3, REG_V4, REG_V5, INS_OPTS_NONE); + + // sqdmulh vector + theEmitter->emitIns_R_R_R(INS_sqdmulh, EA_8BYTE, REG_V0, REG_V1, REG_V2, INS_OPTS_4H); + theEmitter->emitIns_R_R_R(INS_sqdmulh, EA_8BYTE, REG_V3, REG_V4, REG_V5, INS_OPTS_2S); + theEmitter->emitIns_R_R_R(INS_sqdmulh, EA_16BYTE, REG_V6, REG_V7, REG_V8, INS_OPTS_8H); + theEmitter->emitIns_R_R_R(INS_sqdmulh, EA_16BYTE, REG_V9, REG_V10, REG_V11, INS_OPTS_4S); + + // sqdmull scalar + theEmitter->emitIns_R_R_R(INS_sqdmull, EA_2BYTE, REG_V0, REG_V1, REG_V2, INS_OPTS_NONE); + theEmitter->emitIns_R_R_R(INS_sqdmull, EA_4BYTE, REG_V3, REG_V4, REG_V5, INS_OPTS_NONE); + + // sqdmull vector + theEmitter->emitIns_R_R_R(INS_sqdmull, EA_8BYTE, REG_V0, REG_V1, REG_V2, INS_OPTS_4H); + theEmitter->emitIns_R_R_R(INS_sqdmull, EA_8BYTE, REG_V3, REG_V4, REG_V5, INS_OPTS_2S); + + // sqdmull2 vector + theEmitter->emitIns_R_R_R(INS_sqdmull2, EA_16BYTE, REG_V6, REG_V7, REG_V8, INS_OPTS_8H); + theEmitter->emitIns_R_R_R(INS_sqdmull2, EA_16BYTE, REG_V9, REG_V10, REG_V11, INS_OPTS_4S); + + // sqrdmlah scalar + theEmitter->emitIns_R_R_R(INS_sqrdmlah, EA_2BYTE, REG_V0, REG_V1, REG_V2, INS_OPTS_NONE); + theEmitter->emitIns_R_R_R(INS_sqrdmlah, EA_4BYTE, REG_V3, REG_V4, REG_V5, INS_OPTS_NONE); + + // sqdrmlah vector + theEmitter->emitIns_R_R_R(INS_sqrdmlah, EA_8BYTE, REG_V0, REG_V1, REG_V2, INS_OPTS_4H); + theEmitter->emitIns_R_R_R(INS_sqrdmlah, EA_8BYTE, REG_V3, REG_V4, REG_V5, INS_OPTS_2S); + theEmitter->emitIns_R_R_R(INS_sqrdmlah, EA_16BYTE, REG_V6, REG_V7, REG_V8, INS_OPTS_8H); + theEmitter->emitIns_R_R_R(INS_sqrdmlah, EA_16BYTE, REG_V9, REG_V10, REG_V11, INS_OPTS_4S); + + // sqrdmlsh scalar + theEmitter->emitIns_R_R_R(INS_sqrdmlsh, EA_2BYTE, REG_V0, REG_V1, REG_V2, INS_OPTS_NONE); + theEmitter->emitIns_R_R_R(INS_sqrdmlsh, EA_4BYTE, REG_V3, REG_V4, REG_V5, INS_OPTS_NONE); + + // sqdrmlsh vector + theEmitter->emitIns_R_R_R(INS_sqrdmlsh, EA_8BYTE, REG_V0, REG_V1, REG_V2, INS_OPTS_4H); + theEmitter->emitIns_R_R_R(INS_sqrdmlsh, EA_8BYTE, REG_V3, REG_V4, REG_V5, INS_OPTS_2S); + theEmitter->emitIns_R_R_R(INS_sqrdmlsh, EA_16BYTE, REG_V6, REG_V7, REG_V8, INS_OPTS_8H); + theEmitter->emitIns_R_R_R(INS_sqrdmlsh, EA_16BYTE, REG_V9, REG_V10, REG_V11, INS_OPTS_4S); + + // sqrdmulh scalar + theEmitter->emitIns_R_R_R(INS_sqrdmulh, EA_2BYTE, REG_V0, REG_V1, REG_V2, INS_OPTS_NONE); + theEmitter->emitIns_R_R_R(INS_sqrdmulh, EA_4BYTE, REG_V3, REG_V4, REG_V5, INS_OPTS_NONE); + + // sqdrmulh vector + theEmitter->emitIns_R_R_R(INS_sqrdmulh, EA_8BYTE, REG_V0, REG_V1, REG_V2, INS_OPTS_4H); + theEmitter->emitIns_R_R_R(INS_sqrdmulh, EA_8BYTE, REG_V3, REG_V4, REG_V5, INS_OPTS_2S); + theEmitter->emitIns_R_R_R(INS_sqrdmulh, EA_16BYTE, REG_V6, REG_V7, REG_V8, INS_OPTS_8H); + theEmitter->emitIns_R_R_R(INS_sqrdmulh, EA_16BYTE, REG_V9, REG_V10, REG_V11, INS_OPTS_4S); + // subhn2 vector theEmitter->emitIns_R_R_R(INS_subhn2, EA_16BYTE, REG_V9, REG_V10, REG_V11, INS_OPTS_16B); theEmitter->emitIns_R_R_R(INS_subhn2, EA_16BYTE, REG_V12, REG_V13, REG_V14, INS_OPTS_8H); @@ -9167,7 +9272,7 @@ void CodeGen::genArm64EmitterUnitTests() theEmitter->emitIns_R_R_R(INS_pmul, EA_8BYTE, REG_V18, REG_V19, REG_V20, INS_OPTS_8B); theEmitter->emitIns_R_R_R(INS_pmul, EA_16BYTE, REG_V21, REG_V22, REG_V23, INS_OPTS_16B); - // 'mul' vector by elem + // 'mul' vector by element theEmitter->emitIns_R_R_R_I(INS_mul, EA_8BYTE, REG_V0, REG_V1, REG_V16, 0, INS_OPTS_2S); theEmitter->emitIns_R_R_R_I(INS_mul, EA_8BYTE, REG_V2, REG_V3, REG_V15, 1, INS_OPTS_2S); theEmitter->emitIns_R_R_R_I(INS_mul, EA_8BYTE, REG_V4, REG_V5, REG_V17, 3, INS_OPTS_2S); @@ -9181,7 +9286,7 @@ void CodeGen::genArm64EmitterUnitTests() theEmitter->emitIns_R_R_R_I(INS_mul, EA_16BYTE, REG_V20, REG_V21, REG_V4, 3, INS_OPTS_8H); theEmitter->emitIns_R_R_R_I(INS_mul, EA_16BYTE, REG_V22, REG_V23, REG_V5, 7, INS_OPTS_8H); - // 'mla' vector by elem + // 'mla' vector by element theEmitter->emitIns_R_R_R_I(INS_mla, EA_8BYTE, REG_V0, REG_V1, REG_V16, 0, INS_OPTS_2S); theEmitter->emitIns_R_R_R_I(INS_mla, EA_8BYTE, REG_V2, REG_V3, REG_V15, 1, INS_OPTS_2S); theEmitter->emitIns_R_R_R_I(INS_mla, EA_8BYTE, REG_V4, REG_V5, REG_V17, 3, INS_OPTS_2S); @@ -9195,7 +9300,7 @@ void CodeGen::genArm64EmitterUnitTests() theEmitter->emitIns_R_R_R_I(INS_mla, EA_16BYTE, REG_V20, REG_V21, REG_V4, 3, INS_OPTS_8H); theEmitter->emitIns_R_R_R_I(INS_mla, EA_16BYTE, REG_V22, REG_V23, REG_V5, 7, INS_OPTS_8H); - // 'mls' vector by elem + // 'mls' vector by element theEmitter->emitIns_R_R_R_I(INS_mls, EA_8BYTE, REG_V0, REG_V1, REG_V16, 0, INS_OPTS_2S); theEmitter->emitIns_R_R_R_I(INS_mls, EA_8BYTE, REG_V2, REG_V3, REG_V15, 1, INS_OPTS_2S); theEmitter->emitIns_R_R_R_I(INS_mls, EA_8BYTE, REG_V4, REG_V5, REG_V17, 3, INS_OPTS_2S); @@ -9219,6 +9324,10 @@ void CodeGen::genArm64EmitterUnitTests() theEmitter->emitIns_R_R_R(INS_pmull2, EA_16BYTE, REG_V3, REG_V4, REG_V5, INS_OPTS_16B); theEmitter->emitIns_R_R_R(INS_pmull2, EA_16BYTE, REG_V9, REG_V10, REG_V11, INS_OPTS_2D); + // sdot vector + theEmitter->emitIns_R_R_R_I(INS_sdot, EA_8BYTE, REG_V0, REG_V1, REG_V16, 3, INS_OPTS_2S); + theEmitter->emitIns_R_R_R_I(INS_sdot, EA_16BYTE, REG_V3, REG_V4, REG_V31, 1, INS_OPTS_4S); + // smlal vector theEmitter->emitIns_R_R_R(INS_smlal, EA_8BYTE, REG_V0, REG_V1, REG_V2, INS_OPTS_8B); theEmitter->emitIns_R_R_R(INS_smlal, EA_8BYTE, REG_V3, REG_V4, REG_V5, INS_OPTS_4H); @@ -9249,6 +9358,10 @@ void CodeGen::genArm64EmitterUnitTests() theEmitter->emitIns_R_R_R(INS_smull2, EA_16BYTE, REG_V12, REG_V13, REG_V14, INS_OPTS_8H); theEmitter->emitIns_R_R_R(INS_smull2, EA_16BYTE, REG_V15, REG_V16, REG_V17, INS_OPTS_4S); + // udot vector + theEmitter->emitIns_R_R_R_I(INS_udot, EA_8BYTE, REG_V0, REG_V1, REG_V16, 3, INS_OPTS_2S); + theEmitter->emitIns_R_R_R_I(INS_udot, EA_16BYTE, REG_V3, REG_V4, REG_V31, 1, INS_OPTS_4S); + // umlal vector theEmitter->emitIns_R_R_R(INS_umlal, EA_8BYTE, REG_V0, REG_V1, REG_V2, INS_OPTS_8B); theEmitter->emitIns_R_R_R(INS_umlal, EA_8BYTE, REG_V3, REG_V4, REG_V5, INS_OPTS_4H); @@ -9303,6 +9416,82 @@ void CodeGen::genArm64EmitterUnitTests() theEmitter->emitIns_R_R_R_I(INS_smull2, EA_16BYTE, REG_V6, REG_V7, REG_V8, 7, INS_OPTS_8H); theEmitter->emitIns_R_R_R_I(INS_smull2, EA_16BYTE, REG_V9, REG_V10, REG_V11, 3, INS_OPTS_4S); + // sqdmlal scalar, by element + theEmitter->emitIns_R_R_R_I(INS_sqdmlal, EA_2BYTE, REG_V0, REG_V1, REG_V2, 7, INS_OPTS_NONE); + theEmitter->emitIns_R_R_R_I(INS_sqdmlal, EA_4BYTE, REG_V3, REG_V4, REG_V5, 3, INS_OPTS_NONE); + + // sqdmlal vector, by element + theEmitter->emitIns_R_R_R_I(INS_sqdmlal, EA_8BYTE, REG_V0, REG_V1, REG_V2, 7, INS_OPTS_4H); + theEmitter->emitIns_R_R_R_I(INS_sqdmlal, EA_8BYTE, REG_V3, REG_V4, REG_V5, 3, INS_OPTS_2S); + + // sqdmlal2 vector, by element + theEmitter->emitIns_R_R_R_I(INS_sqdmlal2, EA_16BYTE, REG_V6, REG_V7, REG_V8, 7, INS_OPTS_8H); + theEmitter->emitIns_R_R_R_I(INS_sqdmlal2, EA_16BYTE, REG_V9, REG_V10, REG_V11, 3, INS_OPTS_4S); + + // sqdmlsl scalar, by element + theEmitter->emitIns_R_R_R_I(INS_sqdmlsl, EA_2BYTE, REG_V0, REG_V1, REG_V2, 7, INS_OPTS_NONE); + theEmitter->emitIns_R_R_R_I(INS_sqdmlsl, EA_4BYTE, REG_V3, REG_V4, REG_V5, 3, INS_OPTS_NONE); + + // sqdmlsl vector, by element + theEmitter->emitIns_R_R_R_I(INS_sqdmlsl, EA_8BYTE, REG_V0, REG_V1, REG_V2, 7, INS_OPTS_4H); + theEmitter->emitIns_R_R_R_I(INS_sqdmlsl, EA_8BYTE, REG_V3, REG_V4, REG_V5, 3, INS_OPTS_2S); + + // sqdmlsl2 vector, by element + theEmitter->emitIns_R_R_R_I(INS_sqdmlsl2, EA_16BYTE, REG_V6, REG_V7, REG_V8, 7, INS_OPTS_8H); + theEmitter->emitIns_R_R_R_I(INS_sqdmlsl2, EA_16BYTE, REG_V9, REG_V10, REG_V11, 3, INS_OPTS_4S); + + // sqdmulh scalar + theEmitter->emitIns_R_R_R_I(INS_sqdmulh, EA_2BYTE, REG_V0, REG_V1, REG_V2, 7, INS_OPTS_NONE); + theEmitter->emitIns_R_R_R_I(INS_sqdmulh, EA_4BYTE, REG_V3, REG_V4, REG_V5, 3, INS_OPTS_NONE); + + // sqdmulh vector + theEmitter->emitIns_R_R_R_I(INS_sqdmulh, EA_8BYTE, REG_V0, REG_V1, REG_V2, 7, INS_OPTS_4H); + theEmitter->emitIns_R_R_R_I(INS_sqdmulh, EA_8BYTE, REG_V3, REG_V4, REG_V5, 3, INS_OPTS_2S); + theEmitter->emitIns_R_R_R_I(INS_sqdmulh, EA_16BYTE, REG_V6, REG_V7, REG_V8, 7, INS_OPTS_8H); + theEmitter->emitIns_R_R_R_I(INS_sqdmulh, EA_16BYTE, REG_V9, REG_V10, REG_V11, 3, INS_OPTS_4S); + + // sqdmull scalar, by element + theEmitter->emitIns_R_R_R_I(INS_sqdmull, EA_2BYTE, REG_V0, REG_V1, REG_V2, 7, INS_OPTS_NONE); + theEmitter->emitIns_R_R_R_I(INS_sqdmull, EA_4BYTE, REG_V3, REG_V4, REG_V5, 3, INS_OPTS_NONE); + + // sqdmull vector, by element + theEmitter->emitIns_R_R_R_I(INS_sqdmull, EA_8BYTE, REG_V0, REG_V1, REG_V2, 7, INS_OPTS_4H); + theEmitter->emitIns_R_R_R_I(INS_sqdmull, EA_8BYTE, REG_V3, REG_V4, REG_V5, 3, INS_OPTS_2S); + + // sqdmull2 vector, by element + theEmitter->emitIns_R_R_R_I(INS_sqdmull2, EA_16BYTE, REG_V6, REG_V7, REG_V8, 7, INS_OPTS_8H); + theEmitter->emitIns_R_R_R_I(INS_sqdmull2, EA_16BYTE, REG_V9, REG_V10, REG_V11, 3, INS_OPTS_4S); + + // sqrdmlah scalar + theEmitter->emitIns_R_R_R_I(INS_sqrdmlah, EA_2BYTE, REG_V0, REG_V1, REG_V2, 7, INS_OPTS_NONE); + theEmitter->emitIns_R_R_R_I(INS_sqrdmlah, EA_4BYTE, REG_V3, REG_V4, REG_V5, 3, INS_OPTS_NONE); + + // sqdrmlah vector + theEmitter->emitIns_R_R_R_I(INS_sqrdmlah, EA_8BYTE, REG_V0, REG_V1, REG_V2, 7, INS_OPTS_4H); + theEmitter->emitIns_R_R_R_I(INS_sqrdmlah, EA_8BYTE, REG_V3, REG_V4, REG_V5, 3, INS_OPTS_2S); + theEmitter->emitIns_R_R_R_I(INS_sqrdmlah, EA_16BYTE, REG_V6, REG_V7, REG_V8, 7, INS_OPTS_8H); + theEmitter->emitIns_R_R_R_I(INS_sqrdmlah, EA_16BYTE, REG_V9, REG_V10, REG_V11, 3, INS_OPTS_4S); + + // sqrdmlsh scalar + theEmitter->emitIns_R_R_R_I(INS_sqrdmlsh, EA_2BYTE, REG_V0, REG_V1, REG_V2, 7, INS_OPTS_NONE); + theEmitter->emitIns_R_R_R_I(INS_sqrdmlsh, EA_4BYTE, REG_V3, REG_V4, REG_V5, 3, INS_OPTS_NONE); + + // sqdrmlsh vector + theEmitter->emitIns_R_R_R_I(INS_sqrdmlsh, EA_8BYTE, REG_V0, REG_V1, REG_V2, 7, INS_OPTS_4H); + theEmitter->emitIns_R_R_R_I(INS_sqrdmlsh, EA_8BYTE, REG_V3, REG_V4, REG_V5, 3, INS_OPTS_2S); + theEmitter->emitIns_R_R_R_I(INS_sqrdmlsh, EA_16BYTE, REG_V6, REG_V7, REG_V8, 7, INS_OPTS_8H); + theEmitter->emitIns_R_R_R_I(INS_sqrdmlsh, EA_16BYTE, REG_V9, REG_V10, REG_V11, 3, INS_OPTS_4S); + + // sqrdmulh scalar + theEmitter->emitIns_R_R_R_I(INS_sqrdmulh, EA_2BYTE, REG_V0, REG_V1, REG_V2, 7, INS_OPTS_NONE); + theEmitter->emitIns_R_R_R_I(INS_sqrdmulh, EA_4BYTE, REG_V3, REG_V4, REG_V5, 3, INS_OPTS_NONE); + + // sqdrmulh vector + theEmitter->emitIns_R_R_R_I(INS_sqrdmulh, EA_8BYTE, REG_V0, REG_V1, REG_V2, 7, INS_OPTS_4H); + theEmitter->emitIns_R_R_R_I(INS_sqrdmulh, EA_8BYTE, REG_V3, REG_V4, REG_V5, 3, INS_OPTS_2S); + theEmitter->emitIns_R_R_R_I(INS_sqrdmulh, EA_16BYTE, REG_V6, REG_V7, REG_V8, 7, INS_OPTS_8H); + theEmitter->emitIns_R_R_R_I(INS_sqrdmulh, EA_16BYTE, REG_V9, REG_V10, REG_V11, 3, INS_OPTS_4S); + // umlal vector, by element theEmitter->emitIns_R_R_R_I(INS_umlal, EA_8BYTE, REG_V0, REG_V1, REG_V2, 3, INS_OPTS_4H); theEmitter->emitIns_R_R_R_I(INS_umlal, EA_8BYTE, REG_V3, REG_V4, REG_V5, 1, INS_OPTS_2S); @@ -9325,6 +9514,7 @@ void CodeGen::genArm64EmitterUnitTests() // umull2 vector, by element theEmitter->emitIns_R_R_R_I(INS_umull2, EA_16BYTE, REG_V6, REG_V7, REG_V8, 7, INS_OPTS_8H); theEmitter->emitIns_R_R_R_I(INS_umull2, EA_16BYTE, REG_V9, REG_V10, REG_V11, 3, INS_OPTS_4S); + #endif // ALL_ARM64_EMITTER_UNIT_TESTS #ifdef ALL_ARM64_EMITTER_UNIT_TESTS @@ -9338,8 +9528,8 @@ void CodeGen::genArm64EmitterUnitTests() theEmitter->emitIns_R_R_R(INS_fmla, EA_16BYTE, REG_V9, REG_V10, REG_V11, INS_OPTS_4S); theEmitter->emitIns_R_R_R(INS_fmla, EA_16BYTE, REG_V12, REG_V13, REG_V14, INS_OPTS_2D); - theEmitter->emitIns_R_R_R_I(INS_fmla, EA_4BYTE, REG_V15, REG_V16, REG_V17, 3); // scalar by elem 4BYTE - theEmitter->emitIns_R_R_R_I(INS_fmla, EA_8BYTE, REG_V18, REG_V19, REG_V20, 1); // scalar by elem 8BYTE + theEmitter->emitIns_R_R_R_I(INS_fmla, EA_4BYTE, REG_V15, REG_V16, REG_V17, 3); // scalar by element 4BYTE + theEmitter->emitIns_R_R_R_I(INS_fmla, EA_8BYTE, REG_V18, REG_V19, REG_V20, 1); // scalar by element 8BYTE theEmitter->emitIns_R_R_R_I(INS_fmla, EA_8BYTE, REG_V21, REG_V22, REG_V23, 0, INS_OPTS_2S); theEmitter->emitIns_R_R_R_I(INS_fmla, EA_16BYTE, REG_V24, REG_V25, REG_V26, 2, INS_OPTS_4S); theEmitter->emitIns_R_R_R_I(INS_fmla, EA_16BYTE, REG_V27, REG_V28, REG_V29, 0, INS_OPTS_2D); @@ -9348,8 +9538,8 @@ void CodeGen::genArm64EmitterUnitTests() theEmitter->emitIns_R_R_R(INS_fmls, EA_16BYTE, REG_V9, REG_V10, REG_V11, INS_OPTS_4S); theEmitter->emitIns_R_R_R(INS_fmls, EA_16BYTE, REG_V12, REG_V13, REG_V14, INS_OPTS_2D); - theEmitter->emitIns_R_R_R_I(INS_fmls, EA_4BYTE, REG_V15, REG_V16, REG_V17, 3); // scalar by elem 4BYTE - theEmitter->emitIns_R_R_R_I(INS_fmls, EA_8BYTE, REG_V18, REG_V19, REG_V20, 1); // scalar by elem 8BYTE + theEmitter->emitIns_R_R_R_I(INS_fmls, EA_4BYTE, REG_V15, REG_V16, REG_V17, 3); // scalar by element 4BYTE + theEmitter->emitIns_R_R_R_I(INS_fmls, EA_8BYTE, REG_V18, REG_V19, REG_V20, 1); // scalar by element 8BYTE theEmitter->emitIns_R_R_R_I(INS_fmls, EA_8BYTE, REG_V21, REG_V22, REG_V23, 0, INS_OPTS_2S); theEmitter->emitIns_R_R_R_I(INS_fmls, EA_16BYTE, REG_V24, REG_V25, REG_V26, 2, INS_OPTS_4S); theEmitter->emitIns_R_R_R_I(INS_fmls, EA_16BYTE, REG_V27, REG_V28, REG_V29, 0, INS_OPTS_2D); diff --git a/src/coreclr/src/jit/codegenarmarch.cpp b/src/coreclr/src/jit/codegenarmarch.cpp index 7f7940a90317..7dd95d2fdab6 100644 --- a/src/coreclr/src/jit/codegenarmarch.cpp +++ b/src/coreclr/src/jit/codegenarmarch.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -457,7 +456,7 @@ void CodeGen::genCodeForTreeNode(GenTree* treeNode) break; case GT_NULLCHECK: - genCodeForNullCheck(treeNode->AsOp()); + genCodeForNullCheck(treeNode->AsIndir()); break; case GT_CATCH_ARG: @@ -587,7 +586,8 @@ void CodeGen::genSetGSSecurityCookie(regNumber initReg, bool* pInitRegModified) } else { - instGen_Set_Reg_To_Imm(EA_PTR_DSP_RELOC, initReg, (ssize_t)compiler->gsGlobalSecurityCookieAddr); + instGen_Set_Reg_To_Imm(EA_PTR_DSP_RELOC, initReg, (ssize_t)compiler->gsGlobalSecurityCookieAddr, + INS_FLAGS_DONT_CARE DEBUGARG((size_t)THT_SetGSCookie) DEBUGARG(0)); GetEmitter()->emitIns_R_R_I(INS_ldr, EA_PTRSIZE, initReg, initReg, 0); regSet.verifyRegUsed(initReg); GetEmitter()->emitIns_S_R(INS_str, EA_PTRSIZE, initReg, compiler->lvaGSSecurityCookie, 0); @@ -1107,7 +1107,7 @@ void CodeGen::genCodeForBitCast(GenTreeOp* treeNode) JITDUMP("Changing type of BITCAST source to load directly."); genCodeForTreeNode(op1); } - else if (varTypeIsFloating(treeNode) != varTypeIsFloating(op1)) + else if (varTypeUsesFloatReg(treeNode) != varTypeUsesFloatReg(op1)) { regNumber srcReg = op1->GetRegNum(); assert(genTypeSize(op1->TypeGet()) == genTypeSize(targetType)); @@ -1500,19 +1500,19 @@ void CodeGen::genCodeForPhysReg(GenTreePhysReg* tree) // Return value: // None // -void CodeGen::genCodeForNullCheck(GenTreeOp* tree) +void CodeGen::genCodeForNullCheck(GenTreeIndir* tree) { +#ifdef TARGET_ARM + assert(!"GT_NULLCHECK isn't supported for Arm32; use GT_IND."); +#else assert(tree->OperIs(GT_NULLCHECK)); - assert(!tree->gtOp1->isContained()); - regNumber addrReg = genConsumeReg(tree->gtOp1); + GenTree* op1 = tree->gtOp1; -#ifdef TARGET_ARM64 + genConsumeRegs(op1); regNumber targetReg = REG_ZR; -#else - regNumber targetReg = tree->GetSingleTempReg(); -#endif - GetEmitter()->emitIns_R_R_I(INS_ldr, EA_4BYTE, targetReg, addrReg, 0); + GetEmitter()->emitInsLoadStoreOp(INS_ldr, EA_4BYTE, targetReg, tree); +#endif } //------------------------------------------------------------------------ @@ -2477,8 +2477,10 @@ void CodeGen::genCallInstruction(GenTreeCall* call) { // Generate a direct call to a non-virtual user defined or helper method assert(callType == CT_HELPER || callType == CT_USER_FUNC); +#ifdef FEATURE_READYTORUN_COMPILER assert(((call->IsR2RRelativeIndir()) && (call->gtEntryPoint.accessType == IAT_PVALUE)) || ((call->IsVirtualStubRelativeIndir()) && (call->gtEntryPoint.accessType == IAT_VALUE))); +#endif // FEATURE_READYTORUN_COMPILER assert(call->gtControlExpr == nullptr); assert(!call->IsTailCall()); diff --git a/src/coreclr/src/jit/codegencommon.cpp b/src/coreclr/src/jit/codegencommon.cpp index dde9e43d0016..be4b08e9f436 100644 --- a/src/coreclr/src/jit/codegencommon.cpp +++ b/src/coreclr/src/jit/codegencommon.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -1752,7 +1751,8 @@ void CodeGen::genEmitGSCookieCheck(bool pushReg) else { // Ngen case - GS cookie constant needs to be accessed through an indirection. - instGen_Set_Reg_To_Imm(EA_HANDLE_CNS_RELOC, regGSConst, (ssize_t)compiler->gsGlobalSecurityCookieAddr); + instGen_Set_Reg_To_Imm(EA_HANDLE_CNS_RELOC, regGSConst, (ssize_t)compiler->gsGlobalSecurityCookieAddr, + INS_FLAGS_DONT_CARE DEBUGARG((size_t)THT_GSCookieCheck) DEBUGARG(0)); GetEmitter()->emitIns_R_R_I(INS_ldr, EA_PTRSIZE, regGSConst, regGSConst, 0); } // Load this method's GS value from the stack frame diff --git a/src/coreclr/src/jit/codegeninterface.h b/src/coreclr/src/jit/codegeninterface.h index 3e588b94ba8a..ec0090467836 100644 --- a/src/coreclr/src/jit/codegeninterface.h +++ b/src/coreclr/src/jit/codegeninterface.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // This file declares the types that constitute the interface between the diff --git a/src/coreclr/src/jit/codegenlinear.cpp b/src/coreclr/src/jit/codegenlinear.cpp index b4c3689ed984..0de6f0ecf297 100644 --- a/src/coreclr/src/jit/codegenlinear.cpp +++ b/src/coreclr/src/jit/codegenlinear.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -1532,7 +1531,7 @@ void CodeGen::genConsumeRegs(GenTree* tree) } else if (tree->isContained()) { - if (tree->isIndir()) + if (tree->OperIsIndir()) { genConsumeAddress(tree->AsIndir()->Addr()); } diff --git a/src/coreclr/src/jit/codegenxarch.cpp b/src/coreclr/src/jit/codegenxarch.cpp index d392137f89a5..b66c75b51f9c 100644 --- a/src/coreclr/src/jit/codegenxarch.cpp +++ b/src/coreclr/src/jit/codegenxarch.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -437,7 +436,10 @@ void CodeGen::genEHFinallyOrFilterRet(BasicBlock* block) // Move an immediate value into an integer register -void CodeGen::instGen_Set_Reg_To_Imm(emitAttr size, regNumber reg, ssize_t imm, insFlags flags) +void CodeGen::instGen_Set_Reg_To_Imm(emitAttr size, + regNumber reg, + ssize_t imm, + insFlags flags DEBUGARG(size_t targetHandle) DEBUGARG(unsigned gtFlags)) { // reg cannot be a FP register assert(!genIsValidFloatReg(reg)); @@ -1747,7 +1749,7 @@ void CodeGen::genCodeForTreeNode(GenTree* treeNode) break; case GT_NULLCHECK: - genCodeForNullCheck(treeNode->AsOp()); + genCodeForNullCheck(treeNode->AsIndir()); break; case GT_CATCH_ARG: @@ -3795,7 +3797,7 @@ void CodeGen::genCodeForPhysReg(GenTreePhysReg* tree) // Return value: // None // -void CodeGen::genCodeForNullCheck(GenTreeOp* tree) +void CodeGen::genCodeForNullCheck(GenTreeIndir* tree) { assert(tree->OperIs(GT_NULLCHECK)); diff --git a/src/coreclr/src/jit/compiler.cpp b/src/coreclr/src/jit/compiler.cpp index f94b5fba1f99..c78ee4477e0d 100644 --- a/src/coreclr/src/jit/compiler.cpp +++ b/src/coreclr/src/jit/compiler.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -1719,23 +1718,62 @@ void Compiler::compDisplayStaticSizes(FILE* fout) * * Constructor */ - -void Compiler::compInit(ArenaAllocator* pAlloc, InlineInfo* inlineInfo) +void Compiler::compInit(ArenaAllocator* pAlloc, + CORINFO_METHOD_HANDLE methodHnd, + COMP_HANDLE compHnd, + CORINFO_METHOD_INFO* methodInfo, + InlineInfo* inlineInfo) { assert(pAlloc); compArenaAllocator = pAlloc; + // Inlinee Compile object will only be allocated when needed for the 1st time. + InlineeCompiler = nullptr; + + // Set the inline info. + impInlineInfo = inlineInfo; + info.compCompHnd = compHnd; + info.compMethodHnd = methodHnd; + info.compMethodInfo = methodInfo; + +#ifdef DEBUG + bRangeAllowStress = false; +#endif + #if defined(DEBUG) || defined(LATE_DISASM) + // Initialize the method name and related info, as it is used early in determining whether to + // apply stress modes, and which ones to apply. + // Note that even allocating memory can invoke the stress mechanism, so ensure that both + // 'compMethodName' and 'compFullName' are either null or valid before we allocate. + // (The stress mode checks references these prior to checking bRangeAllowStress.) + // info.compMethodName = nullptr; info.compClassName = nullptr; info.compFullName = nullptr; -#endif // defined(DEBUG) || defined(LATE_DISASM) - // Inlinee Compile object will only be allocated when needed for the 1st time. - InlineeCompiler = nullptr; + const char* classNamePtr; + const char* methodName; - // Set the inline info. - impInlineInfo = inlineInfo; + methodName = eeGetMethodName(methodHnd, &classNamePtr); + unsigned len = (unsigned)roundUp(strlen(classNamePtr) + 1); + info.compClassName = getAllocator(CMK_DebugOnly).allocate(len); + info.compMethodName = methodName; + strcpy_s((char*)info.compClassName, len, classNamePtr); + + info.compFullName = eeGetMethodFullName(methodHnd); + info.compPerfScore = 0.0; +#endif // defined(DEBUG) || defined(LATE_DISASM) + +#ifdef DEBUG + // Opt-in to jit stress based on method hash ranges. + // + // Note the default (with JitStressRange not set) is that all + // methods will be subject to stress. + static ConfigMethodRange fJitStressRange; + fJitStressRange.EnsureInit(JitConfig.JitStressRange()); + assert(!fJitStressRange.Error()); + bRangeAllowStress = fJitStressRange.Contains(info.compMethodHash()); +#endif // DEBUG eeInfoInitialized = false; @@ -1771,10 +1809,6 @@ void Compiler::compInit(ArenaAllocator* pAlloc, InlineInfo* inlineInfo) compJitTelemetry.Initialize(this); #endif -#ifdef DEBUG - bRangeAllowStress = false; -#endif - fgInit(); lvaInit(); @@ -2682,6 +2716,9 @@ void Compiler::compInitOptions(JitFlags* jitFlags) setUsesSIMDTypes(false); #endif // FEATURE_SIMD + lvaEnregEHVars = (((opts.compFlags & CLFLG_REGVAR) != 0) && JitConfig.EnableEHWriteThru()); + lvaEnregMultiRegVars = (((opts.compFlags & CLFLG_REGVAR) != 0) && JitConfig.EnableMultiRegLocals()); + if (compIsForImportOnly()) { return; @@ -3376,7 +3413,7 @@ bool Compiler::compStressCompileHelper(compStressArea stressArea, unsigned weigh } // This stress mode name did not match anything in the stress - // mode whitelist. If user has requested only enable mode, + // mode allowlist. If user has requested only enable mode, // don't allow this stress mode to turn on. const bool onlyEnableMode = JitConfig.JitStressModeNamesOnly() != 0; @@ -4326,7 +4363,7 @@ void Compiler::compCompile(void** methodCodePtr, ULONG* methodCodeSize, JitFlags // Insert call to class constructor as the first basic block if // we were asked to do so. - if (info.compCompHnd->initClass(nullptr /* field */, info.compMethodHnd /* method */, + if (info.compCompHnd->initClass(nullptr /* field */, nullptr /* method */, impTokenLookupContextHandle /* context */) & CORINFO_INITCLASS_USE_HELPER) { @@ -4719,8 +4756,6 @@ void Compiler::compCompile(void** methodCodePtr, ULONG* methodCodeSize, JitFlags DoPhase(this, PHASE_BUILD_SSA, &Compiler::fgSsaBuild); } - DoPhase(this, PHASE_ZERO_INITS, &Compiler::optRemoveRedundantZeroInits); - if (doEarlyProp) { // Propagate array length and rewrite getType() method call @@ -4806,6 +4841,9 @@ void Compiler::compCompile(void** methodCodePtr, ULONG* methodCodeSize, JitFlags compQuirkForPPPflag = compQuirkForPPP(); #endif + // Insert GC Polls + DoPhase(this, PHASE_INSERT_GC_POLLS, &Compiler::fgInsertGCPolls); + // Determine start of cold region if we are hot/cold splitting // DoPhase(this, PHASE_DETERMINE_FIRST_COLD_BLOCK, &Compiler::fgDetermineFirstColdBlock); @@ -5209,14 +5247,16 @@ bool Compiler::skipMethod() /*****************************************************************************/ -int Compiler::compCompile(CORINFO_METHOD_HANDLE methodHnd, - CORINFO_MODULE_HANDLE classPtr, - COMP_HANDLE compHnd, - CORINFO_METHOD_INFO* methodInfo, +int Compiler::compCompile(CORINFO_MODULE_HANDLE classPtr, void** methodCodePtr, ULONG* methodCodeSize, JitFlags* compileFlags) { + // compInit should have set these already. + noway_assert(info.compMethodInfo != nullptr); + noway_assert(info.compCompHnd != nullptr); + noway_assert(info.compMethodHnd != nullptr); + #ifdef FEATURE_JIT_METHOD_PERF static bool checkedForJitTimeLog = false; @@ -5227,7 +5267,7 @@ int Compiler::compCompile(CORINFO_METHOD_HANDLE methodHnd, // Call into VM to get the config strings. FEATURE_JIT_METHOD_PERF is enabled for // retail builds. Do not call the regular Config helper here as it would pull // in a copy of the config parser into the clrjit.dll. - InterlockedCompareExchangeT(&Compiler::compJitTimeLogFilename, compHnd->getJitTimeLogFilename(), NULL); + InterlockedCompareExchangeT(&Compiler::compJitTimeLogFilename, info.compCompHnd->getJitTimeLogFilename(), NULL); // At a process or module boundary clear the file and start afresh. JitTimer::PrintCsvHeader(); @@ -5236,7 +5276,7 @@ int Compiler::compCompile(CORINFO_METHOD_HANDLE methodHnd, } if ((Compiler::compJitTimeLogFilename != nullptr) || (JitTimeLogCsv() != nullptr)) { - pCompJitTimer = JitTimer::Create(this, methodInfo->ILCodeSize); + pCompJitTimer = JitTimer::Create(this, info.compMethodInfo->ILCodeSize); } #endif // FEATURE_JIT_METHOD_PERF @@ -5274,10 +5314,6 @@ int Compiler::compCompile(CORINFO_METHOD_HANDLE methodHnd, // if (s_compMethodsCount==0) setvbuf(jitstdout, NULL, _IONBF, 0); - info.compCompHnd = compHnd; - info.compMethodHnd = methodHnd; - info.compMethodInfo = methodInfo; - if (compIsForInlining()) { compileFlags->Clear(JitFlags::JIT_FLAG_OSR); @@ -5346,7 +5382,7 @@ int Compiler::compCompile(CORINFO_METHOD_HANDLE methodHnd, { impTokenLookupContextHandle = impInlineInfo->tokenLookupContextHandle; - assert(impInlineInfo->inlineCandidateInfo->clsHandle == compHnd->getMethodClass(methodHnd)); + assert(impInlineInfo->inlineCandidateInfo->clsHandle == info.compCompHnd->getMethodClass(info.compMethodHnd)); info.compClassHnd = impInlineInfo->inlineCandidateInfo->clsHandle; assert(impInlineInfo->inlineCandidateInfo->clsAttr == info.compCompHnd->getClassAttribs(info.compClassHnd)); @@ -5356,9 +5392,9 @@ int Compiler::compCompile(CORINFO_METHOD_HANDLE methodHnd, } else { - impTokenLookupContextHandle = MAKE_METHODCONTEXT(info.compMethodHnd); + impTokenLookupContextHandle = METHOD_BEING_COMPILED_CONTEXT(); - info.compClassHnd = compHnd->getMethodClass(methodHnd); + info.compClassHnd = info.compCompHnd->getMethodClass(info.compMethodHnd); info.compClassAttr = info.compCompHnd->getClassAttribs(info.compClassHnd); } @@ -5367,12 +5403,12 @@ int Compiler::compCompile(CORINFO_METHOD_HANDLE methodHnd, #if defined(DEBUG) || defined(LATE_DISASM) const char* classNamePtr; - info.compMethodName = eeGetMethodName(methodHnd, &classNamePtr); + info.compMethodName = eeGetMethodName(info.compMethodHnd, &classNamePtr); unsigned len = (unsigned)roundUp(strlen(classNamePtr) + 1); info.compClassName = getAllocator(CMK_DebugOnly).allocate(len); strcpy_s((char*)info.compClassName, len, classNamePtr); - info.compFullName = eeGetMethodFullName(methodHnd); + info.compFullName = eeGetMethodFullName(info.compMethodHnd); info.compPerfScore = 0.0; #endif // defined(DEBUG) || defined(LATE_DISASM) @@ -5392,15 +5428,6 @@ int Compiler::compCompile(CORINFO_METHOD_HANDLE methodHnd, return CORJIT_SKIPPED; } - // Opt-in to jit stress based on method hash ranges. - // - // Note the default (with JitStressRange not set) is that all - // methods will be subject to stress. - static ConfigMethodRange fJitStressRange; - fJitStressRange.EnsureInit(JitConfig.JitStressRange()); - assert(!fJitStressRange.Error()); - bRangeAllowStress = fJitStressRange.Contains(info.compMethodHash()); - #endif // DEBUG // Set this before the first 'BADCODE' @@ -5427,14 +5454,14 @@ int Compiler::compCompile(CORINFO_METHOD_HANDLE methodHnd, } param; param.pThis = this; param.classPtr = classPtr; - param.compHnd = compHnd; - param.methodInfo = methodInfo; + param.compHnd = info.compCompHnd; + param.methodInfo = info.compMethodInfo; param.methodCodePtr = methodCodePtr; param.methodCodeSize = methodCodeSize; param.compileFlags = compileFlags; param.result = CORJIT_INTERNALERROR; - setErrorTrap(compHnd, Param*, pParam, ¶m) // ERROR TRAP: Start normal block + setErrorTrap(info.compCompHnd, Param*, pParam, ¶m) // ERROR TRAP: Start normal block { pParam->result = pParam->pThis->compCompileHelper(pParam->classPtr, pParam->compHnd, pParam->methodInfo, @@ -6732,16 +6759,16 @@ int jitNativeCode(CORINFO_METHOD_HANDLE methodHnd, assert(pParam->pComp != nullptr); #endif - pParam->pComp->compInit(pParam->pAlloc, pParam->inlineInfo); + pParam->pComp->compInit(pParam->pAlloc, pParam->methodHnd, pParam->compHnd, pParam->methodInfo, + pParam->inlineInfo); #ifdef DEBUG pParam->pComp->jitFallbackCompile = pParam->jitFallbackCompile; #endif // Now generate the code - pParam->result = - pParam->pComp->compCompile(pParam->methodHnd, pParam->classPtr, pParam->compHnd, pParam->methodInfo, - pParam->methodCodePtr, pParam->methodCodeSize, pParam->compileFlags); + pParam->result = pParam->pComp->compCompile(pParam->classPtr, pParam->methodCodePtr, pParam->methodCodeSize, + pParam->compileFlags); } finallyErrorTrap() { diff --git a/src/coreclr/src/jit/compiler.h b/src/coreclr/src/jit/compiler.h index 42111f6b52f5..f181fbe88aa4 100644 --- a/src/coreclr/src/jit/compiler.h +++ b/src/coreclr/src/jit/compiler.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -985,6 +984,8 @@ class LclVarDsc return GetLayout()->GetRegisterType(); } + bool CanBeReplacedWithItsField(Compiler* comp) const; + #ifdef DEBUG public: const char* lvReason; @@ -2542,7 +2543,6 @@ class Compiler #ifdef FEATURE_SIMD GenTree* gtNewSIMDVectorZero(var_types simdType, var_types baseType, unsigned size); - GenTree* gtNewSIMDVectorOne(var_types simdType, var_types baseType, unsigned size); #endif GenTree* gtNewBlkOpNode(GenTree* dst, GenTree* srcOrFillVal, bool isVolatile, bool isCopyBlock); @@ -2630,6 +2630,9 @@ class Compiler var_types baseType, unsigned size); + GenTreeHWIntrinsic* gtNewSimdCreateBroadcastNode( + var_types type, GenTree* op1, var_types baseType, unsigned size, bool isSimdAsHWIntrinsic); + GenTreeHWIntrinsic* gtNewSimdAsHWIntrinsicNode(var_types type, NamedIntrinsic hwIntrinsicID, var_types baseType, @@ -2686,7 +2689,7 @@ class Compiler GenTree* gtNewMustThrowException(unsigned helper, var_types type, CORINFO_CLASS_HANDLE clsHnd); GenTreeLclFld* gtNewLclFldNode(unsigned lnum, var_types type, unsigned offset); - GenTree* gtNewInlineCandidateReturnExpr(GenTree* inlineCandidate, var_types type); + GenTree* gtNewInlineCandidateReturnExpr(GenTree* inlineCandidate, var_types type, unsigned __int64 bbFlags); GenTree* gtNewFieldRef(var_types typ, CORINFO_FIELD_HANDLE fldHnd, GenTree* obj = nullptr, DWORD offset = 0); @@ -3649,7 +3652,7 @@ class Compiler }; bool impIsPrimitive(CorInfoType type); - bool impILConsumesAddr(const BYTE* codeAddr, CORINFO_METHOD_HANDLE fncHandle, CORINFO_MODULE_HANDLE scpHandle); + bool impILConsumesAddr(const BYTE* codeAddr); void impResolveToken(const BYTE* addr, CORINFO_RESOLVED_TOKEN* pResolvedToken, CorInfoTokenKind kind); @@ -3751,7 +3754,7 @@ class Compiler CORINFO_CLASS_HANDLE clsHnd, CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* sig, - bool mustExpand); + GenTree* newobjThis); protected: bool compSupportsHWIntrinsic(CORINFO_InstructionSet isa); @@ -3761,7 +3764,8 @@ class Compiler CORINFO_SIG_INFO* sig, var_types retType, var_types baseType, - unsigned simdSize); + unsigned simdSize, + GenTree* newobjThis); GenTree* impSimdAsHWIntrinsicCndSel(CORINFO_CLASS_HANDLE clsHnd, var_types retType, @@ -3779,7 +3783,10 @@ class Compiler var_types retType, unsigned simdSize); - GenTree* getArgForHWIntrinsic(var_types argType, CORINFO_CLASS_HANDLE argClass, bool expectAddr = false); + GenTree* getArgForHWIntrinsic(var_types argType, + CORINFO_CLASS_HANDLE argClass, + bool expectAddr = false, + GenTree* newobjThis = nullptr); GenTree* impNonConstFallback(NamedIntrinsic intrinsic, var_types simdType, var_types baseType); GenTree* addRangeCheckIfNeeded( NamedIntrinsic intrinsic, GenTree* immOp, bool mustExpand, int immLowerBound, int immUpperBound); @@ -4982,10 +4989,11 @@ class Compiler void fgInitBlockVarSets(); // true if we've gone through and created GC Poll calls. - bool fgGCPollsCreated; - void fgMarkGCPollBlocks(); - void fgCreateGCPolls(); - bool fgCreateGCPoll(GCPollType pollType, BasicBlock* block, Statement* stmt = nullptr); + bool fgGCPollsCreated; + void fgMarkGCPollBlocks(); + void fgCreateGCPolls(); + PhaseStatus fgInsertGCPolls(); + BasicBlock* fgCreateGCPoll(GCPollType pollType, BasicBlock* block); // Requires that "block" is a block that returns from // a finally. Returns the number of successors (jump targets of @@ -5602,6 +5610,7 @@ class Compiler GenTree* fgMorphCopyBlock(GenTree* tree); GenTree* fgMorphForRegisterFP(GenTree* tree); GenTree* fgMorphSmpOp(GenTree* tree, MorphAddrContext* mac = nullptr); + GenTree* fgMorphRetInd(GenTreeUnOp* tree); GenTree* fgMorphModToSubMulDiv(GenTreeOp* tree); GenTree* fgMorphSmpOpOptional(GenTreeOp* tree); @@ -6509,6 +6518,7 @@ class Compiler #define OMF_HAS_GUARDEDDEVIRT 0x00000080 // Method contains guarded devirtualization candidate #define OMF_HAS_EXPRUNTIMELOOKUP 0x00000100 // Method contains a runtime lookup to an expandable dictionary. #define OMF_HAS_PATCHPOINT 0x00000200 // Method contains patchpoints +#define OMF_NEEDS_GCPOLLS 0x00000400 // Method needs GC polls bool doesMethodHaveFatPointer() { @@ -7192,6 +7202,7 @@ class Compiler var_types eeGetArgType(CORINFO_ARG_LIST_HANDLE list, CORINFO_SIG_INFO* sig); var_types eeGetArgType(CORINFO_ARG_LIST_HANDLE list, CORINFO_SIG_INFO* sig, bool* isPinned); CORINFO_CLASS_HANDLE eeGetArgClass(CORINFO_SIG_INFO* sig, CORINFO_ARG_LIST_HANDLE list); + CORINFO_CLASS_HANDLE eeGetClassFromContext(CORINFO_CONTEXT_HANDLE context); unsigned eeGetArgSize(CORINFO_ARG_LIST_HANDLE list, CORINFO_SIG_INFO* sig); // VOM info, method sigs @@ -7633,7 +7644,7 @@ class Compiler bool LookupPromotedStructDeathVars(GenTree* tree, VARSET_TP** bits) { - bits = nullptr; + *bits = nullptr; bool result = false; if (m_promotedStructDeathVars != nullptr) @@ -7970,7 +7981,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX // vector type (i.e. do not analyze or promote its fields). // Note that all but the fixed vector types are opaque, even though they may // actually be declared as having fields. - bool isOpaqueSIMDType(CORINFO_CLASS_HANDLE structHandle) + bool isOpaqueSIMDType(CORINFO_CLASS_HANDLE structHandle) const { return ((m_simdHandleCache != nullptr) && (structHandle != m_simdHandleCache->SIMDVector2Handle) && (structHandle != m_simdHandleCache->SIMDVector3Handle) && @@ -7986,7 +7997,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX } // Returns true if the lclVar is an opaque SIMD type. - bool isOpaqueSIMDLclVar(LclVarDsc* varDsc) + bool isOpaqueSIMDLclVar(const LclVarDsc* varDsc) const { if (!varDsc->lvSIMDType) { @@ -9178,7 +9189,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX // Returns true if the method returns a value in more than one return register, // it should replace/be merged with compMethodReturnsMultiRegRetType when #36868 is fixed. - // The difference from original `compMethodReturnsMultiRegRetType` is in ARM64 SIMD16 handling, + // The difference from original `compMethodReturnsMultiRegRetType` is in ARM64 SIMD* handling, // this method correctly returns false for it (it is passed as HVA), when the original returns true. bool compMethodReturnsMultiRegRegTypeAlternate() { @@ -9188,8 +9199,8 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX return varTypeIsLong(info.compRetNativeType); #else // targets: X64-UNIX, ARM64 or ARM32 #if defined(TARGET_ARM64) - // TYP_SIMD16 is returned in one register. - if (info.compRetNativeType == TYP_SIMD16) + // TYP_SIMD* are returned in one register. + if (varTypeIsSIMD(info.compRetNativeType)) { return false; } @@ -9321,7 +9332,11 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX static void compStartup(); // One-time initialization static void compShutdown(); // One-time finalization - void compInit(ArenaAllocator* pAlloc, InlineInfo* inlineInfo); + void compInit(ArenaAllocator* pAlloc, + CORINFO_METHOD_HANDLE methodHnd, + COMP_HANDLE compHnd, + CORINFO_METHOD_INFO* methodInfo, + InlineInfo* inlineInfo); void compDone(); static void compDisplayStaticSizes(FILE* fout); @@ -9344,10 +9359,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX void compDoComponentUnitTestsOnce(); #endif // DEBUG - int compCompile(CORINFO_METHOD_HANDLE methodHnd, - CORINFO_MODULE_HANDLE classPtr, - COMP_HANDLE compHnd, - CORINFO_METHOD_INFO* methodInfo, + int compCompile(CORINFO_MODULE_HANDLE classPtr, void** methodCodePtr, ULONG* methodCodeSize, JitFlags* compileFlags); diff --git a/src/coreclr/src/jit/compiler.hpp b/src/coreclr/src/jit/compiler.hpp index 406562fd7a85..c12bacd94d7a 100644 --- a/src/coreclr/src/jit/compiler.hpp +++ b/src/coreclr/src/jit/compiler.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/src/coreclr/src/jit/compilerbitsettraits.h b/src/coreclr/src/jit/compilerbitsettraits.h index 0fdcb5110ffd..744eb30841da 100644 --- a/src/coreclr/src/jit/compilerbitsettraits.h +++ b/src/coreclr/src/jit/compilerbitsettraits.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef CompilerBitSetTraits_DEFINED #define CompilerBitSetTraits_DEFINED 1 diff --git a/src/coreclr/src/jit/compilerbitsettraits.hpp b/src/coreclr/src/jit/compilerbitsettraits.hpp index 79f7b5ee53af..c12db17b1cff 100644 --- a/src/coreclr/src/jit/compilerbitsettraits.hpp +++ b/src/coreclr/src/jit/compilerbitsettraits.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef CompilerBitSetTraits_HPP_DEFINED #define CompilerBitSetTraits_HPP_DEFINED 1 diff --git a/src/coreclr/src/jit/compmemkind.h b/src/coreclr/src/jit/compmemkind.h index 586e5f3ac3ca..44b856eded51 100644 --- a/src/coreclr/src/jit/compmemkind.h +++ b/src/coreclr/src/jit/compmemkind.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*****************************************************************************/ #ifndef CompMemKindMacro diff --git a/src/coreclr/src/jit/compphases.h b/src/coreclr/src/jit/compphases.h index ccda79c4cfe7..0fe78151c173 100644 --- a/src/coreclr/src/jit/compphases.h +++ b/src/coreclr/src/jit/compphases.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: CompPhases.h // @@ -87,6 +86,7 @@ CompPhaseNameMacro(PHASE_ASSERTION_PROP_MAIN, "Assertion prop", #endif CompPhaseNameMacro(PHASE_OPT_UPDATE_FLOW_GRAPH, "Update flow graph opt pass", "UPD-FG-O", false, -1, false) CompPhaseNameMacro(PHASE_COMPUTE_EDGE_WEIGHTS2, "Compute edge weights (2, false)", "EDG-WGT2", false, -1, false) +CompPhaseNameMacro(PHASE_INSERT_GC_POLLS, "Insert GC Polls", "GC-POLLS", false, -1, true) CompPhaseNameMacro(PHASE_DETERMINE_FIRST_COLD_BLOCK, "Determine first cold block", "COLD-BLK", false, -1, true) CompPhaseNameMacro(PHASE_RATIONALIZE, "Rationalize IR", "RAT", false, -1, false) CompPhaseNameMacro(PHASE_SIMPLE_LOWERING, "Do 'simple' lowering", "SMP-LWR", false, -1, false) diff --git a/src/coreclr/src/jit/copyprop.cpp b/src/coreclr/src/jit/copyprop.cpp index ece3f28b99d0..295fcb8cb8a7 100644 --- a/src/coreclr/src/jit/copyprop.cpp +++ b/src/coreclr/src/jit/copyprop.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/jit/dataflow.h b/src/coreclr/src/jit/dataflow.h index ff691e443bdd..307ce02770f9 100644 --- a/src/coreclr/src/jit/dataflow.h +++ b/src/coreclr/src/jit/dataflow.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // This class is used to perform data flow optimizations. diff --git a/src/coreclr/src/jit/decomposelongs.cpp b/src/coreclr/src/jit/decomposelongs.cpp index 855d60813ca0..064453daa916 100644 --- a/src/coreclr/src/jit/decomposelongs.cpp +++ b/src/coreclr/src/jit/decomposelongs.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/src/coreclr/src/jit/decomposelongs.h b/src/coreclr/src/jit/decomposelongs.h index 0388b5cea3d0..a9a75f5d3c33 100644 --- a/src/coreclr/src/jit/decomposelongs.h +++ b/src/coreclr/src/jit/decomposelongs.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/src/coreclr/src/jit/delayload.cpp b/src/coreclr/src/jit/delayload.cpp index 895a13a6bfbf..7342c78b1794 100644 --- a/src/coreclr/src/jit/delayload.cpp +++ b/src/coreclr/src/jit/delayload.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "jitpch.h" #pragma hdrstop diff --git a/src/coreclr/src/jit/disasm.cpp b/src/coreclr/src/jit/disasm.cpp index 5896454685f6..56c2ed622e8d 100644 --- a/src/coreclr/src/jit/disasm.cpp +++ b/src/coreclr/src/jit/disasm.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*********************************************************************** * * File: dis.cpp diff --git a/src/coreclr/src/jit/disasm.h b/src/coreclr/src/jit/disasm.h index f7cea20b5c41..7ddaaa9b0923 100644 --- a/src/coreclr/src/jit/disasm.h +++ b/src/coreclr/src/jit/disasm.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/src/coreclr/src/jit/dll/CMakeLists.txt b/src/coreclr/src/jit/dll/CMakeLists.txt deleted file mode 100644 index ec7cddc78eda..000000000000 --- a/src/coreclr/src/jit/dll/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ -project(ClrJit) - -set_source_files_properties(${JIT_EXPORTS_FILE} PROPERTIES GENERATED TRUE) - -if(CLR_CMAKE_HOST_UNIX) - add_library_clr(clrjit_static - STATIC - ${SHARED_LIB_SOURCES} - ${JIT_ARCH_SOURCES} - ) - add_dependencies(clrjit_static coreclrpal gcinfo) -else() - add_library_clr(clrjit_static - ${SHARED_LIB_SOURCES} - ${JIT_ARCH_SOURCES} - ) -endif(CLR_CMAKE_HOST_UNIX) -target_precompile_header(TARGET clrjit_static HEADER jitpch.h ADDITIONAL_INCLUDE_DIRECTORIES ${JIT_SOURCE_DIR}) diff --git a/src/coreclr/src/jit/dll/clrjit.def b/src/coreclr/src/jit/dll/clrjit.def deleted file mode 100644 index e229be40aaab..000000000000 --- a/src/coreclr/src/jit/dll/clrjit.def +++ /dev/null @@ -1,6 +0,0 @@ -; Licensed to the .NET Foundation under one or more agreements. -; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. -EXPORTS - getJit - jitStartup diff --git a/src/coreclr/src/jit/dllmain.cpp b/src/coreclr/src/jit/dllmain.cpp new file mode 100644 index 000000000000..7fcf274e5b64 --- /dev/null +++ b/src/coreclr/src/jit/dllmain.cpp @@ -0,0 +1,41 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +#include "jitpch.h" +#ifdef _MSC_VER +#pragma hdrstop +#endif +#include "emit.h" +#include "corexcep.h" + +#ifndef DLLEXPORT +#define DLLEXPORT +#endif // !DLLEXPORT + +extern void jitShutdown(bool processIsTerminating); + +HINSTANCE g_hInst = nullptr; + +/*****************************************************************************/ +extern "C" DLLEXPORT BOOL WINAPI DllMain(HANDLE hInstance, DWORD dwReason, LPVOID pvReserved) +{ + if (dwReason == DLL_PROCESS_ATTACH) + { + g_hInst = (HINSTANCE)hInstance; + DisableThreadLibraryCalls((HINSTANCE)hInstance); + } + else if (dwReason == DLL_PROCESS_DETACH) + { + // From MSDN: If fdwReason is DLL_PROCESS_DETACH, lpvReserved is NULL if FreeLibrary has + // been called or the DLL load failed and non-NULL if the process is terminating. + bool processIsTerminating = (pvReserved != nullptr); + jitShutdown(processIsTerminating); + } + + return TRUE; +} + +HINSTANCE GetModuleInst() +{ + return (g_hInst); +} diff --git a/src/coreclr/src/jit/earlyprop.cpp b/src/coreclr/src/jit/earlyprop.cpp index 48ccc669fa62..4a5205998827 100644 --- a/src/coreclr/src/jit/earlyprop.cpp +++ b/src/coreclr/src/jit/earlyprop.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // Early Value Propagation // @@ -446,6 +445,14 @@ GenTree* Compiler::optEarlyPropRewriteTree(GenTree* tree, LocalNumberToNullCheck // actualValClone has small tree node size, it is safe to use CopyFrom here. tree->ReplaceWith(actualValClone, this); + // Propagating a constant may create an opportunity to use a division by constant optimization + // + if ((tree->gtNext != nullptr) && tree->gtNext->OperIsBinary()) + { + // We need to mark the parent divide/mod operation when this occurs + tree->gtNext->AsOp()->CheckDivideByConstOptimized(this); + } + #ifdef DEBUG if (verbose) { diff --git a/src/coreclr/src/jit/ee_il_dll.cpp b/src/coreclr/src/jit/ee_il_dll.cpp index 78d3d8e59274..150efed411f6 100644 --- a/src/coreclr/src/jit/ee_il_dll.cpp +++ b/src/coreclr/src/jit/ee_il_dll.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -37,9 +36,6 @@ FILE* jitstdout = nullptr; ICorJitHost* g_jitHost = nullptr; static CILJit* ILJitter = nullptr; // The one and only JITTER I return bool g_jitInitialized = false; -#ifndef FEATURE_MERGE_JIT_AND_ENGINE -HINSTANCE g_hInst = nullptr; -#endif // FEATURE_MERGE_JIT_AND_ENGINE /*****************************************************************************/ @@ -154,33 +150,6 @@ void jitShutdown(bool processIsTerminating) g_jitInitialized = false; } -#ifndef FEATURE_MERGE_JIT_AND_ENGINE - -extern "C" DLLEXPORT BOOL WINAPI DllMain(HANDLE hInstance, DWORD dwReason, LPVOID pvReserved) -{ - if (dwReason == DLL_PROCESS_ATTACH) - { - g_hInst = (HINSTANCE)hInstance; - DisableThreadLibraryCalls((HINSTANCE)hInstance); - } - else if (dwReason == DLL_PROCESS_DETACH) - { - // From MSDN: If fdwReason is DLL_PROCESS_DETACH, lpvReserved is NULL if FreeLibrary has - // been called or the DLL load failed and non-NULL if the process is terminating. - bool processIsTerminating = (pvReserved != nullptr); - jitShutdown(processIsTerminating); - } - - return TRUE; -} - -HINSTANCE GetModuleInst() -{ - return (g_hInst); -} - -#endif // !FEATURE_MERGE_JIT_AND_ENGINE - /*****************************************************************************/ struct CILJitSingletonAllocator diff --git a/src/coreclr/src/jit/ee_il_dll.hpp b/src/coreclr/src/jit/ee_il_dll.hpp index 7cdc23e81981..731e1b2321ec 100644 --- a/src/coreclr/src/jit/ee_il_dll.hpp +++ b/src/coreclr/src/jit/ee_il_dll.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. extern ICorJitHost* g_jitHost; @@ -111,6 +110,24 @@ inline CORINFO_CLASS_HANDLE Compiler::eeGetArgClass(CORINFO_SIG_INFO* sig, CORIN return argClass; } +/*****************************************************************************/ +inline CORINFO_CLASS_HANDLE Compiler::eeGetClassFromContext(CORINFO_CONTEXT_HANDLE context) +{ + if (context == METHOD_BEING_COMPILED_CONTEXT()) + { + return impInlineRoot()->info.compClassHnd; + } + + if (((SIZE_T)context & CORINFO_CONTEXTFLAGS_MASK) == CORINFO_CONTEXTFLAGS_CLASS) + { + return CORINFO_CLASS_HANDLE((SIZE_T)context & ~CORINFO_CONTEXTFLAGS_MASK); + } + else + { + return info.compCompHnd->getMethodClass(CORINFO_METHOD_HANDLE((SIZE_T)context & ~CORINFO_CONTEXTFLAGS_MASK)); + } +} + /***************************************************************************** * * Native Direct Optimizations diff --git a/src/coreclr/src/jit/eeinterface.cpp b/src/coreclr/src/jit/eeinterface.cpp index d0a08959f43d..ca63935aaad8 100644 --- a/src/coreclr/src/jit/eeinterface.cpp +++ b/src/coreclr/src/jit/eeinterface.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/src/coreclr/src/jit/emit.cpp b/src/coreclr/src/jit/emit.cpp index 2613cd453e61..cc12dabc5492 100644 --- a/src/coreclr/src/jit/emit.cpp +++ b/src/coreclr/src/jit/emit.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/src/coreclr/src/jit/emit.h b/src/coreclr/src/jit/emit.h index cd1616b37eb8..2c7f0b073b5d 100644 --- a/src/coreclr/src/jit/emit.h +++ b/src/coreclr/src/jit/emit.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*****************************************************************************/ #ifndef _EMIT_H_ @@ -528,6 +527,7 @@ class emitter size_t idSize; // size of the instruction descriptor unsigned idVarRefOffs; // IL offset for LclVar reference size_t idMemCookie; // for display of method name (also used by switch table) + unsigned idFlags; // for determining type of handle in idMemCookie bool idFinallyCall; // Branch instruction is a call to finally bool idCatchRet; // Instruction is for a catch 'return' CORINFO_SIG_INFO* idCallSig; // Used to report native call site signatures to the EE diff --git a/src/coreclr/src/jit/emitarm.cpp b/src/coreclr/src/jit/emitarm.cpp index b5ed5e83e08a..cee6fde07293 100644 --- a/src/coreclr/src/jit/emitarm.cpp +++ b/src/coreclr/src/jit/emitarm.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -3510,11 +3509,22 @@ void emitter::emitIns_S(instruction ins, emitAttr attr, int varx, int offs) NYI("emitIns_S"); } -/***************************************************************************** - * - * Add an instruction referencing a register and a stack-based local variable. - */ -void emitter::emitIns_R_S(instruction ins, emitAttr attr, regNumber reg1, int varx, int offs) +//------------------------------------------------------------------------------------- +// emitIns_R_S: Add an instruction referencing a register and a stack-based local variable. +// +// Arguments: +// ins - The instruction to add. +// attr - Oeration size. +// varx - The variable to generate offset for. +// offs - The offset of variable or field in stack. +// pBaseReg - The base register that is used while calculating the offset. For example, if the offset +// with "stack pointer" can't be encoded in instruction, "frame pointer" can be used to get +// the offset of the field. In such case, pBaseReg will store the "fp". +// +// Return Value: +// The pBaseReg that holds the base register that was used to calculate the offset. +// +void emitter::emitIns_R_S(instruction ins, emitAttr attr, regNumber reg1, int varx, int offs, regNumber* pBaseReg) { if (ins == INS_mov) { @@ -3547,6 +3557,7 @@ void emitter::emitIns_R_S(instruction ins, emitAttr attr, regNumber reg1, int va insFormat fmt = IF_NONE; insFlags sf = INS_FLAGS_NOT_SET; regNumber reg2; + regNumber baseRegUsed; /* Figure out the variable's frame position */ int base; @@ -3555,6 +3566,10 @@ void emitter::emitIns_R_S(instruction ins, emitAttr attr, regNumber reg1, int va base = emitComp->lvaFrameAddress(varx, emitComp->funCurrentFunc()->funKind != FUNC_ROOT, ®2, offs, CodeGen::instIsFP(ins)); + if (pBaseReg != nullptr) + { + *pBaseReg = reg2; + } disp = base + offs; undisp = unsigned_abs(disp); @@ -3575,8 +3590,8 @@ void emitter::emitIns_R_S(instruction ins, emitAttr attr, regNumber reg1, int va else { regNumber rsvdReg = codeGen->rsGetRsvdReg(); - emitIns_genStackOffset(rsvdReg, varx, offs, /* isFloatUsage */ true); - emitIns_R_R(INS_add, EA_4BYTE, rsvdReg, reg2); + emitIns_genStackOffset(rsvdReg, varx, offs, /* isFloatUsage */ true, &baseRegUsed); + emitIns_R_R(INS_add, EA_4BYTE, rsvdReg, baseRegUsed); emitIns_R_R_I(ins, attr, reg1, rsvdReg, 0); return; } @@ -3599,8 +3614,11 @@ void emitter::emitIns_R_S(instruction ins, emitAttr attr, regNumber reg1, int va { // Load disp into a register regNumber rsvdReg = codeGen->rsGetRsvdReg(); - emitIns_genStackOffset(rsvdReg, varx, offs, /* isFloatUsage */ false); + emitIns_genStackOffset(rsvdReg, varx, offs, /* isFloatUsage */ false, &baseRegUsed); fmt = IF_T2_E0; + + // Ensure the baseReg calculated is correct. + assert(baseRegUsed == reg2); } } else if (ins == INS_add) @@ -3625,7 +3643,10 @@ void emitter::emitIns_R_S(instruction ins, emitAttr attr, regNumber reg1, int va { // Load disp into a register regNumber rsvdReg = codeGen->rsGetRsvdReg(); - emitIns_genStackOffset(rsvdReg, varx, offs, /* isFloatUsage */ false); + emitIns_genStackOffset(rsvdReg, varx, offs, /* isFloatUsage */ false, &baseRegUsed); + + // Ensure the baseReg calculated is correct. + assert(baseRegUsed == reg2); emitIns_R_R_R(ins, attr, reg1, reg2, rsvdReg); return; } @@ -3662,8 +3683,24 @@ void emitter::emitIns_R_S(instruction ins, emitAttr attr, regNumber reg1, int va appendToCurIG(id); } -// generate the offset of &varx + offs into a register -void emitter::emitIns_genStackOffset(regNumber r, int varx, int offs, bool isFloatUsage) +//------------------------------------------------------------------------------------- +// emitIns_genStackOffset: Generate the offset of &varx + offs into a register +// +// Arguments: +// r - Register in which offset calculation result is stored. +// varx - The variable to generate offset for. +// offs - The offset of variable or field in stack. +// isFloatUsage - True if the instruction being generated is a floating point instruction. This requires using +// floating-point offset restrictions. Note that a variable can be non-float, e.g., struct, but +// accessed as a float local field. +// pBaseReg - The base register that is used while calculating the offset. For example, if the offset with +// "stack pointer" can't be encoded in instruction, "frame pointer" can be used to get the offset +// of the field. In such case, pBaseReg will store the "fp". +// +// Return Value: +// The pBaseReg that holds the base register that was used to calculate the offset. +// +void emitter::emitIns_genStackOffset(regNumber r, int varx, int offs, bool isFloatUsage, regNumber* pBaseReg) { regNumber regBase; int base; @@ -3673,11 +3710,13 @@ void emitter::emitIns_genStackOffset(regNumber r, int varx, int offs, bool isFlo emitComp->lvaFrameAddress(varx, emitComp->funCurrentFunc()->funKind != FUNC_ROOT, ®Base, offs, isFloatUsage); disp = base + offs; - emitIns_R_S(INS_movw, EA_4BYTE, r, varx, offs); + emitIns_R_S(INS_movw, EA_4BYTE, r, varx, offs, pBaseReg); if ((disp & 0xffff) != disp) { - emitIns_R_S(INS_movt, EA_4BYTE, r, varx, offs); + regNumber regBaseUsedInMovT; + emitIns_R_S(INS_movt, EA_4BYTE, r, varx, offs, ®BaseUsedInMovT); + assert(*pBaseReg == regBaseUsedInMovT); } } @@ -3708,6 +3747,7 @@ void emitter::emitIns_S_R(instruction ins, emitAttr attr, regNumber reg1, int va insFormat fmt = IF_NONE; insFlags sf = INS_FLAGS_NOT_SET; regNumber reg2; + regNumber baseRegUsed; /* Figure out the variable's frame position */ int base; @@ -3736,7 +3776,10 @@ void emitter::emitIns_S_R(instruction ins, emitAttr attr, regNumber reg1, int va else { regNumber rsvdReg = codeGen->rsGetRsvdReg(); - emitIns_genStackOffset(rsvdReg, varx, offs, /* isFloatUsage */ true); + emitIns_genStackOffset(rsvdReg, varx, offs, /* isFloatUsage */ true, &baseRegUsed); + + // Ensure the baseReg calculated is correct. + assert(baseRegUsed == reg2); emitIns_R_R(INS_add, EA_4BYTE, rsvdReg, reg2); emitIns_R_R_I(ins, attr, reg1, rsvdReg, 0); return; @@ -3758,8 +3801,11 @@ void emitter::emitIns_S_R(instruction ins, emitAttr attr, regNumber reg1, int va { // Load disp into a register regNumber rsvdReg = codeGen->rsGetRsvdReg(); - emitIns_genStackOffset(rsvdReg, varx, offs, /* isFloatUsage */ false); + emitIns_genStackOffset(rsvdReg, varx, offs, /* isFloatUsage */ false, &baseRegUsed); fmt = IF_T2_E0; + + // Ensure the baseReg calculated is correct. + assert(baseRegUsed == reg2); } assert((fmt == IF_T1_J2) || (fmt == IF_T2_E0) || (fmt == IF_T2_H0) || (fmt == IF_T2_VLDST) || (fmt == IF_T2_K1)); assert(sf != INS_FLAGS_DONT_CARE); diff --git a/src/coreclr/src/jit/emitarm.h b/src/coreclr/src/jit/emitarm.h index fe6a7a0c0790..e663a953e7a1 100644 --- a/src/coreclr/src/jit/emitarm.h +++ b/src/coreclr/src/jit/emitarm.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #if defined(TARGET_ARM) @@ -267,11 +266,11 @@ void emitIns_C(instruction ins, emitAttr attr, CORINFO_FIELD_HANDLE fdlHnd, int void emitIns_S(instruction ins, emitAttr attr, int varx, int offs); -void emitIns_genStackOffset(regNumber r, int varx, int offs, bool isFloatUsage); +void emitIns_genStackOffset(regNumber r, int varx, int offs, bool isFloatUsage, regNumber* pBaseReg); void emitIns_S_R(instruction ins, emitAttr attr, regNumber ireg, int varx, int offs); -void emitIns_R_S(instruction ins, emitAttr attr, regNumber ireg, int varx, int offs); +void emitIns_R_S(instruction ins, emitAttr attr, regNumber ireg, int varx, int offs, regNumber* pBaseReg = nullptr); void emitIns_S_I(instruction ins, emitAttr attr, int varx, int offs, int val); diff --git a/src/coreclr/src/jit/emitarm64.cpp b/src/coreclr/src/jit/emitarm64.cpp index ced2297cbda2..9a82b01063b7 100644 --- a/src/coreclr/src/jit/emitarm64.cpp +++ b/src/coreclr/src/jit/emitarm64.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -685,8 +684,11 @@ void emitter::emitInsSanityCheck(instrDesc* id) break; case IF_DV_2L: // DV_2L ........XX...... ......nnnnnddddd Vd Vn (abs, neg - scalar) - assert(id->idOpSize() == EA_8BYTE); // only type D is supported - __fallthrough; + assert(insOptsNone(id->idInsOpt())); + assert(isValidVectorElemsize(id->idOpSize())); + assert(isVectorRegister(id->idReg1())); + assert(isVectorRegister(id->idReg2())); + break; case IF_DV_2G: // DV_2G .........X...... ......nnnnnddddd Vd Vn (fmov, fcvtXX - register) case IF_DV_2K: // DV_2K .........X.mmmmm ......nnnnn..... Vn Vm (fcmp) @@ -789,8 +791,7 @@ void emitter::emitInsSanityCheck(instrDesc* id) } break; - case IF_DV_3AI: // DV_3AI .Q......XXLMmmmm ....H.nnnnnddddd Vd Vn Vm[] (vector by elem) - case IF_DV_3HI: // DV_3HI ........XXLMmmmm ....H.nnnnnddddd Vd Vn Vm[] (smlal{2}, umlal{2} by element) + case IF_DV_3AI: // DV_3AI .Q......XXLMmmmm ....H.nnnnnddddd Vd Vn Vm[] (vector by element) assert(isValidVectorDatasize(id->idOpSize())); assert(isValidArrangement(id->idOpSize(), id->idInsOpt())); assert(isVectorRegister(id->idReg1())); @@ -810,7 +811,7 @@ void emitter::emitInsSanityCheck(instrDesc* id) assert(isVectorRegister(id->idReg3())); break; - case IF_DV_3BI: // DV_3BI .Q.......XLmmmmm ....H.nnnnnddddd Vd Vn Vm[] (vector by elem) + case IF_DV_3BI: // DV_3BI .Q.......XLmmmmm ....H.nnnnnddddd Vd Vn Vm[] (vector by element) assert(isValidVectorDatasize(id->idOpSize())); assert(isValidArrangement(id->idOpSize(), id->idInsOpt())); assert(isVectorRegister(id->idReg1())); @@ -852,7 +853,7 @@ void emitter::emitInsSanityCheck(instrDesc* id) assert(isVectorRegister(id->idReg3())); break; - case IF_DV_3DI: // DV_3DI .........XLmmmmm ....H.nnnnnddddd Vd Vn Vm[] (scalar by elem) + case IF_DV_3DI: // DV_3DI .........XLmmmmm ....H.nnnnnddddd Vd Vn Vm[] (scalar by element) assert(isValidScalarDatasize(id->idOpSize())); assert(insOptsNone(id->idInsOpt())); assert(isVectorRegister(id->idReg1())); @@ -863,32 +864,39 @@ void emitter::emitInsSanityCheck(instrDesc* id) break; case IF_DV_3E: // DV_3E ........XX.mmmmm ......nnnnnddddd Vd Vn Vm (scalar) + assert(isValidVectorElemsize(id->idOpSize())); assert(insOptsNone(id->idInsOpt())); assert(isVectorRegister(id->idReg1())); assert(isVectorRegister(id->idReg2())); assert(isVectorRegister(id->idReg3())); + elemsize = id->idOpSize(); + index = emitGetInsSC(id); + assert(isValidVectorIndex(EA_16BYTE, elemsize, index)); break; - case IF_DV_3F: // DV_3F ...........mmmmm ......nnnnnddddd Vd Vn Vm - assert(isValidVectorDatasize(id->idOpSize())); - assert(isValidArrangement(id->idOpSize(), id->idInsOpt())); + case IF_DV_3EI: // DV_3EI ........XXLMmmmm ....H.nnnnnddddd Vd Vn Vm[] (scalar by element) + assert(isValidVectorElemsize(id->idOpSize())); + assert(insOptsNone(id->idInsOpt())); assert(isVectorRegister(id->idReg1())); assert(isVectorRegister(id->idReg2())); assert(isVectorRegister(id->idReg3())); + elemsize = id->idOpSize(); + index = emitGetInsSC(id); + assert(isValidVectorIndex(EA_16BYTE, elemsize, index)); break; - case IF_DV_3G: // DV_3G .Q.........mmmmm .iiii.nnnnnddddd Vd Vn Vm imm (vector) + case IF_DV_3F: // DV_3F ...........mmmmm ......nnnnnddddd Vd Vn Vm assert(isValidVectorDatasize(id->idOpSize())); assert(isValidArrangement(id->idOpSize(), id->idInsOpt())); - assert(isValidVectorIndex(id->idOpSize(), EA_1BYTE, emitGetInsSC(id))); assert(isVectorRegister(id->idReg1())); assert(isVectorRegister(id->idReg2())); assert(isVectorRegister(id->idReg3())); break; - case IF_DV_3H: // DV_3H ........XX.mmmmm ......nnnnnddddd Vd Vn Vm (addhn{2}, raddhn{2}, rsubhn{2}, - // subhn{2}, pmull{2}) + case IF_DV_3G: // DV_3G .Q.........mmmmm .iiii.nnnnnddddd Vd Vn Vm imm (vector) + assert(isValidVectorDatasize(id->idOpSize())); assert(isValidArrangement(id->idOpSize(), id->idInsOpt())); + assert(isValidVectorIndex(id->idOpSize(), EA_1BYTE, emitGetInsSC(id))); assert(isVectorRegister(id->idReg1())); assert(isVectorRegister(id->idReg2())); assert(isVectorRegister(id->idReg3())); @@ -976,17 +984,14 @@ bool emitter::emitInsMayWriteToGCReg(instrDesc* id) case IF_DV_3A: // DV_3A .Q......XX.mmmmm ......nnnnnddddd Vd Vn Vm (vector) case IF_DV_3AI: // DV_3AI .Q......XXLMmmmm ....H.nnnnnddddd Vd Vn Vm[] (vector) case IF_DV_3B: // DV_3B .Q.......X.mmmmm ......nnnnnddddd Vd Vn Vm (vector) - case IF_DV_3BI: // DV_3BI .Q.......XLmmmmm ....H.nnnnnddddd Vd Vn Vm[] (vector by elem) + case IF_DV_3BI: // DV_3BI .Q.......XLmmmmm ....H.nnnnnddddd Vd Vn Vm[] (vector by element) case IF_DV_3C: // DV_3C .Q.........mmmmm ......nnnnnddddd Vd Vn Vm (vector) case IF_DV_3D: // DV_3D .........X.mmmmm ......nnnnnddddd Vd Vn Vm (scalar) - case IF_DV_3DI: // DV_3DI .........XLmmmmm ....H.nnnnnddddd Vd Vn Vm[] (scalar by elem) + case IF_DV_3DI: // DV_3DI .........XLmmmmm ....H.nnnnnddddd Vd Vn Vm[] (scalar by element) case IF_DV_3E: // DV_3E ........XX.mmmmm ......nnnnnddddd Vd Vn Vm (scalar) + case IF_DV_3EI: // DV_3EI ........XXLMmmmm ....H.nnnnnddddd Vd Vn Vm[] (scalar by element) case IF_DV_3F: // DV_3F .Q......XX.mmmmm ......nnnnnddddd Vd Vn Vm (vector) case IF_DV_3G: // DV_3G .Q.........mmmmm .iiii.nnnnnddddd Vd Vn Vm imm (vector) - case IF_DV_3H: // DV_3H ........XX.mmmmm ......nnnnnddddd Vd Vn Vm (addhn{2}, raddhn{2}, rsubhn{2}, - // subhn{2}, pmull{2}) - case IF_DV_3HI: // DV_3HI ........XXLMmmmm ....H.nnnnnddddd Vd Vn Vm[] (smlal{2}, smlsl{2}, smull{2}, - // umlal{2}, umlsl{2}, umull{2} vector by elem) case IF_DV_4A: // DV_4A .........X.mmmmm .aaaaannnnnddddd Vd Va Vn Vm (scalar) // Tracked GC pointers cannot be placed into the SIMD registers. return false; @@ -1400,6 +1405,9 @@ emitter::insFormat emitter::emitInsFormat(instruction ins) #define ST 2 #define CMP 4 #define RSH 8 +#define WID 16 +#define LNG 32 +#define NRW 64 // clang-format off /*static*/ const BYTE CodeGenInterface::instInfo[] = @@ -1475,10 +1483,49 @@ bool emitter::emitInsIsVectorRightShift(instruction ins) return false; } +//------------------------------------------------------------------------ +// emitInsIsVectorLong: Returns true if the instruction has the destination register that is double that of both source +// operands. Indicated by the suffix L. +// +bool emitter::emitInsIsVectorLong(instruction ins) +{ + if (ins < ArrLen(CodeGenInterface::instInfo)) + return (CodeGenInterface::instInfo[ins] & LNG) != 0; + else + return false; +} + +//------------------------------------------------------------------------ +// emitInsIsVectorNarrow: Returns true if the element width of the destination register of the instruction is half that +// of both source operands. Indicated by the suffix N. +// +bool emitter::emitInsIsVectorNarrow(instruction ins) +{ + if (ins < ArrLen(CodeGenInterface::instInfo)) + return (CodeGenInterface::instInfo[ins] & NRW) != 0; + else + return false; +} + +//------------------------------------------------------------------------ +// emitInsIsVectorWide: Returns true if the element width of the destination register and the first source operand of +// the instruction is double that of the second source operand. Indicated by the suffix W. +// +bool emitter::emitInsIsVectorWide(instruction ins) +{ + if (ins < ArrLen(CodeGenInterface::instInfo)) + return (CodeGenInterface::instInfo[ins] & WID) != 0; + else + return false; +} + #undef LD #undef ST #undef CMP #undef RHS +#undef WID +#undef LNG +#undef NRW /***************************************************************************** * @@ -1606,6 +1653,7 @@ emitter::code_t emitter::emitInsCode(instruction ins, insFormat fmt) const static insFormat formatEncode4H[4] = {IF_DV_3E, IF_DV_3A, IF_DV_2L, IF_DV_2M}; const static insFormat formatEncode4I[4] = {IF_DV_3D, IF_DV_3B, IF_DV_2G, IF_DV_2A}; const static insFormat formatEncode4J[4] = {IF_DV_2N, IF_DV_2O, IF_DV_3E, IF_DV_3A}; + const static insFormat formatEncode4K[4] = {IF_DV_3E, IF_DV_3A, IF_DV_3EI, IF_DV_3AI}; const static insFormat formatEncode3A[3] = {IF_DR_3A, IF_DR_3B, IF_DI_2C}; const static insFormat formatEncode3B[3] = {IF_DR_2A, IF_DR_2B, IF_DI_1C}; const static insFormat formatEncode3C[3] = {IF_DR_3A, IF_DR_3B, IF_DV_3C}; @@ -1616,7 +1664,6 @@ emitter::code_t emitter::emitInsCode(instruction ins, insFormat fmt) const static insFormat formatEncode3H[3] = {IF_DR_3A, IF_DV_3A, IF_DV_3AI}; const static insFormat formatEncode3I[3] = {IF_DR_2E, IF_DR_2F, IF_DV_2M}; const static insFormat formatEncode3J[3] = {IF_LS_2D, IF_LS_3F, IF_LS_2E}; - const static insFormat formatEncode3K[3] = {IF_DR_3A, IF_DV_3H, IF_DV_3HI}; const static insFormat formatEncode2A[2] = {IF_DR_2E, IF_DR_2F}; const static insFormat formatEncode2B[2] = {IF_DR_3A, IF_DR_3B}; const static insFormat formatEncode2C[2] = {IF_DR_3A, IF_DI_2D}; @@ -1634,7 +1681,6 @@ emitter::code_t emitter::emitInsCode(instruction ins, insFormat fmt) const static insFormat formatEncode2O[2] = {IF_DV_3E, IF_DV_3A}; const static insFormat formatEncode2P[2] = {IF_DV_2Q, IF_DV_3B}; const static insFormat formatEncode2Q[2] = {IF_DV_2S, IF_DV_3A}; - const static insFormat formatEncode2R[2] = {IF_DV_3H, IF_DV_3HI}; code_t code = BAD_CODE; insFormat insFmt = emitInsFormat(ins); @@ -1819,6 +1865,17 @@ emitter::code_t emitter::emitInsCode(instruction ins, insFormat fmt) } break; + case IF_EN4K: + for (index = 0; index < 4; index++) + { + if (fmt == formatEncode4K[index]) + { + encoding_found = true; + break; + } + } + break; + case IF_EN3A: for (index = 0; index < 3; index++) { @@ -1929,17 +1986,6 @@ emitter::code_t emitter::emitInsCode(instruction ins, insFormat fmt) } break; - case IF_EN3K: - for (index = 0; index < 3; index++) - { - if (fmt == formatEncode3K[index]) - { - encoding_found = true; - break; - } - } - break; - case IF_EN2A: for (index = 0; index < 2; index++) { @@ -2127,17 +2173,6 @@ emitter::code_t emitter::emitInsCode(instruction ins, insFormat fmt) } break; - case IF_EN2R: - for (index = 0; index < 2; index++) - { - if (fmt == formatEncode2R[index]) - { - encoding_found = true; - break; - } - } - break; - default: if (fmt == insFmt) { @@ -3361,10 +3396,7 @@ emitter::code_t emitter::emitInsCode(instruction ins, insFormat fmt) } } -// For the given 'arrangement' returns the 'widen-arrangement' specified by the vector register arrangement -// asserts and returns INS_OPTS_NONE if an invalid 'arrangement' value is passed -// -/*static*/ insOpts emitter::optWidenElemsize(insOpts arrangement) +/*static*/ insOpts emitter::optWidenElemsizeArrangement(insOpts arrangement) { if ((arrangement == INS_OPTS_8B) || (arrangement == INS_OPTS_16B)) { @@ -3385,6 +3417,27 @@ emitter::code_t emitter::emitInsCode(instruction ins, insFormat fmt) } } +/*static*/ emitAttr emitter::widenDatasize(emitAttr datasize) +{ + if (datasize == EA_1BYTE) + { + return EA_2BYTE; + } + else if (datasize == EA_2BYTE) + { + return EA_4BYTE; + } + else if (datasize == EA_4BYTE) + { + return EA_8BYTE; + } + else + { + assert(!" invalid 'datasize' value"); + return EA_UNKNOWN; + } +} + // For the given 'srcArrangement' returns the "widen" 'dstArrangement' specifying the destination vector register // arrangement // asserts and returns INS_OPTS_NONE if an invalid 'srcArrangement' value is passed @@ -4009,20 +4062,11 @@ void emitter::emitIns_R_R( { case INS_mov: assert(insOptsNone(opt)); + // Is the mov even necessary? - if (reg1 == reg2) + if (emitComp->opts.OptimizationEnabled() && IsRedundantMov(ins, size, reg1, reg2)) { - // A mov with a EA_4BYTE has the side-effect of clearing the upper bits - // So only eliminate mov instructions that are not clearing the upper bits - // - if (isGeneralRegisterOrSP(reg1) && (size == EA_8BYTE)) - { - return; - } - else if (isVectorRegister(reg1) && (size == EA_16BYTE)) - { - return; - } + return; } // Check for the 'mov' aliases for the vector registers @@ -4234,23 +4278,40 @@ void emitter::emitIns_R_R( fmt = IF_DV_2M; break; + case INS_sqxtn: + case INS_sqxtun: + case INS_uqxtn: + if (insOptsNone(opt)) + { + // Scalar operation + assert(isVectorRegister(reg1)); + assert(isVectorRegister(reg2)); + assert(isValidVectorElemsize(size)); + assert(size != EA_8BYTE); // The encoding size = 11 is reserved. + fmt = IF_DV_2L; + break; + } + __fallthrough; + case INS_xtn: + // Vector operation + assert(isVectorRegister(reg1)); + assert(isVectorRegister(reg2)); + assert(size == EA_8BYTE); + assert(isValidArrangement(size, opt)); + assert(opt != INS_OPTS_1D); // The encoding size = 11, Q = x is reserved + fmt = IF_DV_2M; + break; + + case INS_sqxtn2: + case INS_sqxtun2: + case INS_uqxtn2: case INS_xtn2: assert(isVectorRegister(reg1)); assert(isVectorRegister(reg2)); - assert(isValidVectorDatasize(size)); + assert(size == EA_16BYTE); assert(isValidArrangement(size, opt)); - elemsize = optGetElemsize(opt); - // size is determined by instruction - if (ins == INS_xtn) - { - assert(size == EA_8BYTE); - } - else // ins == INS_xtn2 - { - assert(size == EA_16BYTE); - } - assert(elemsize != EA_8BYTE); // Narrowing must not end with 8 byte data + assert(opt != INS_OPTS_2D); // The encoding size = 11, Q = x is reserved fmt = IF_DV_2M; break; @@ -4431,6 +4492,34 @@ void emitter::emitIns_R_R( fmt = IF_DV_2A; break; + case INS_fcvtxn: + assert(isVectorRegister(reg1)); + assert(isVectorRegister(reg2)); + + if (insOptsAnyArrangement(opt)) + { + // Vector operation + assert(size == EA_8BYTE); + assert(opt == INS_OPTS_2S); + fmt = IF_DV_2A; + } + else + { + // Scalar operation + assert(insOptsNone(opt)); + assert(size == EA_4BYTE); + fmt = IF_DV_2G; + } + break; + + case INS_fcvtxn2: + assert(isVectorRegister(reg1)); + assert(isVectorRegister(reg2)); + assert(size == EA_16BYTE); + assert(opt == INS_OPTS_4S); + fmt = IF_DV_2A; + break; + case INS_scvtf: case INS_ucvtf: if (insOptsAnyArrangement(opt)) @@ -4682,6 +4771,29 @@ void emitter::emitIns_R_R( fmt = IF_DV_2T; break; + case INS_sqabs: + case INS_sqneg: + case INS_suqadd: + case INS_usqadd: + assert(isVectorRegister(reg1)); + assert(isVectorRegister(reg2)); + + if (insOptsAnyArrangement(opt)) + { + // Vector operation + assert(isValidArrangement(size, opt)); + assert(opt != INS_OPTS_1D); // The encoding size = 11, Q = 0 is reserved + fmt = IF_DV_2M; + } + else + { + // Scalar operation + assert(insOptsNone(opt)); + assert(isValidVectorElemsize(size)); + fmt = IF_DV_2L; + } + break; + default: unreached(); break; @@ -5579,14 +5691,7 @@ void emitter::emitIns_R_R_R( assert(isVectorRegister(reg3)); assert(isValidArrangement(size, opt)); assert((opt != INS_OPTS_1D) && (opt != INS_OPTS_2D)); // The encoding size = 11, Q = x is reserved - if (ins == INS_mul) - { - fmt = IF_DV_3A; - } - else - { - fmt = IF_DV_3H; - } + fmt = IF_DV_3A; break; } // Base instruction @@ -6057,7 +6162,7 @@ void emitter::emitIns_R_R_R( assert(size == EA_8BYTE); assert(isValidArrangement(size, opt)); assert(opt != INS_OPTS_1D); // The encoding size = 11, Q = x is reserved. - fmt = IF_DV_3H; + fmt = IF_DV_3A; break; case INS_addhn2: @@ -6070,7 +6175,7 @@ void emitter::emitIns_R_R_R( assert(size == EA_16BYTE); assert(isValidArrangement(size, opt)); assert(opt != INS_OPTS_2D); // The encoding size = 11, Q = x is reserved. - fmt = IF_DV_3H; + fmt = IF_DV_3A; break; case INS_sabal: @@ -6094,7 +6199,7 @@ void emitter::emitIns_R_R_R( assert(isVectorRegister(reg3)); assert(size == EA_8BYTE); assert((opt == INS_OPTS_8B) || (opt == INS_OPTS_4H) || (opt == INS_OPTS_2S)); - fmt = IF_DV_3H; + fmt = IF_DV_3A; break; case INS_sabal2: @@ -6120,7 +6225,64 @@ void emitter::emitIns_R_R_R( assert(isVectorRegister(reg3)); assert(size == EA_16BYTE); assert((opt == INS_OPTS_16B) || (opt == INS_OPTS_8H) || (opt == INS_OPTS_4S)); - fmt = IF_DV_3H; + fmt = IF_DV_3A; + break; + + case INS_sqdmlal: + case INS_sqdmlsl: + case INS_sqdmull: + assert(isVectorRegister(reg1)); + assert(isVectorRegister(reg2)); + assert(isVectorRegister(reg3)); + if (insOptsAnyArrangement(opt)) + { + // Vector operation + assert(size == EA_8BYTE); + assert((opt == INS_OPTS_4H) || (opt == INS_OPTS_2S)); + fmt = IF_DV_3A; + } + else + { + // Scalar operation + assert(insOptsNone(opt)); + assert((size == EA_2BYTE) || (size == EA_4BYTE)); + fmt = IF_DV_3E; + } + break; + + case INS_sqdmulh: + case INS_sqrdmlah: + case INS_sqrdmlsh: + case INS_sqrdmulh: + assert(isVectorRegister(reg1)); + assert(isVectorRegister(reg2)); + assert(isVectorRegister(reg3)); + if (insOptsAnyArrangement(opt)) + { + // Vector operation + assert(isValidVectorDatasize(size)); + elemsize = optGetElemsize(opt); + assert((elemsize == EA_2BYTE) || (elemsize == EA_4BYTE)); + fmt = IF_DV_3A; + } + else + { + // Scalar operation + assert(insOptsNone(opt)); + assert((size == EA_2BYTE) || (size == EA_4BYTE)); + fmt = IF_DV_3E; + } + break; + + case INS_sqdmlal2: + case INS_sqdmlsl2: + case INS_sqdmull2: + assert(isVectorRegister(reg1)); + assert(isVectorRegister(reg2)); + assert(isVectorRegister(reg3)); + assert(size == EA_16BYTE); + assert((opt == INS_OPTS_8H) || (opt == INS_OPTS_4S)); + fmt = IF_DV_3A; break; case INS_pmul: @@ -6138,7 +6300,7 @@ void emitter::emitIns_R_R_R( assert(isVectorRegister(reg3)); assert(size == EA_8BYTE); assert((opt == INS_OPTS_8B) || (opt == INS_OPTS_1D)); - fmt = IF_DV_3H; + fmt = IF_DV_3A; break; case INS_pmull2: @@ -6147,7 +6309,16 @@ void emitter::emitIns_R_R_R( assert(isVectorRegister(reg3)); assert(size == EA_16BYTE); assert((opt == INS_OPTS_16B) || (opt == INS_OPTS_2D)); - fmt = IF_DV_3H; + fmt = IF_DV_3A; + break; + + case INS_sdot: + case INS_udot: + assert(isVectorRegister(reg1)); + assert(isVectorRegister(reg2)); + assert(isVectorRegister(reg3)); + assert(((size == EA_8BYTE) && (opt == INS_OPTS_2S)) || ((size == EA_16BYTE) && (opt == INS_OPTS_4S))); + fmt = IF_DV_3A; break; default: @@ -6367,34 +6538,108 @@ void emitter::emitIns_R_R_R_I(instruction ins, assert(size == EA_8BYTE); assert((opt == INS_OPTS_4H) || (opt == INS_OPTS_2S)); elemsize = optGetElemsize(opt); - assert(isValidVectorIndex(EA_16BYTE, elemsize, imm)); - // Restricted to V0-V15 when element size is H + // Restricted to V0-V15 when element size is H. if ((elemsize == EA_2BYTE) && ((genRegMask(reg3) & RBM_ASIMD_INDEXED_H_ELEMENT_ALLOWED_REGS) == 0)) { assert(!"Invalid reg3"); } - fmt = IF_DV_3HI; + assert(isValidVectorIndex(EA_16BYTE, elemsize, imm)); + fmt = IF_DV_3AI; break; - case INS_smlal2: - case INS_smlsl2: - case INS_smull2: - case INS_umlal2: - case INS_umlsl2: - case INS_umull2: + case INS_sqdmlal: + case INS_sqdmlsl: + case INS_sqdmull: assert(isVectorRegister(reg1)); assert(isVectorRegister(reg2)); assert(isVectorRegister(reg3)); - assert(size == EA_16BYTE); - assert((opt == INS_OPTS_8H) || (opt == INS_OPTS_4S)); - elemsize = optGetElemsize(opt); - assert(isValidVectorIndex(EA_16BYTE, elemsize, imm)); - // Restricted to V0-V15 when element size is H + if (insOptsAnyArrangement(opt)) + { + // Vector operation + assert(size == EA_8BYTE); + assert((opt == INS_OPTS_4H) || (opt == INS_OPTS_2S)); + elemsize = optGetElemsize(opt); + fmt = IF_DV_3AI; + } + else + { + // Scalar operation + assert(insOptsNone(opt)); + assert((size == EA_2BYTE) || (size == EA_4BYTE)); + elemsize = size; + fmt = IF_DV_3EI; + } + // Restricted to V0-V15 when element size is H. if ((elemsize == EA_2BYTE) && ((genRegMask(reg3) & RBM_ASIMD_INDEXED_H_ELEMENT_ALLOWED_REGS) == 0)) { assert(!"Invalid reg3"); } - fmt = IF_DV_3HI; + assert(isValidVectorIndex(EA_16BYTE, elemsize, imm)); + break; + + case INS_sqdmulh: + case INS_sqrdmlah: + case INS_sqrdmlsh: + case INS_sqrdmulh: + assert(isVectorRegister(reg1)); + assert(isVectorRegister(reg2)); + assert(isVectorRegister(reg3)); + if (insOptsAnyArrangement(opt)) + { + // Vector operation + assert(isValidVectorDatasize(size)); + elemsize = optGetElemsize(opt); + assert((elemsize == EA_2BYTE) || (elemsize == EA_4BYTE)); + fmt = IF_DV_3AI; + } + else + { + // Scalar operation + assert(insOptsNone(opt)); + assert((size == EA_2BYTE) || (size == EA_4BYTE)); + elemsize = size; + fmt = IF_DV_3EI; + } + // Restricted to V0-V15 when element size is H. + if ((elemsize == EA_2BYTE) && ((genRegMask(reg3) & RBM_ASIMD_INDEXED_H_ELEMENT_ALLOWED_REGS) == 0)) + { + assert(!"Invalid reg3"); + } + assert(isValidVectorIndex(EA_16BYTE, elemsize, imm)); + break; + + case INS_smlal2: + case INS_smlsl2: + case INS_smull2: + case INS_sqdmlal2: + case INS_sqdmlsl2: + case INS_sqdmull2: + case INS_umlal2: + case INS_umlsl2: + case INS_umull2: + assert(isVectorRegister(reg1)); + assert(isVectorRegister(reg2)); + assert(isVectorRegister(reg3)); + assert(size == EA_16BYTE); + assert((opt == INS_OPTS_8H) || (opt == INS_OPTS_4S)); + elemsize = optGetElemsize(opt); + assert(isValidVectorIndex(EA_16BYTE, elemsize, imm)); + // Restricted to V0-V15 when element size is H + if ((elemsize == EA_2BYTE) && ((genRegMask(reg3) & RBM_ASIMD_INDEXED_H_ELEMENT_ALLOWED_REGS) == 0)) + { + assert(!"Invalid reg3"); + } + fmt = IF_DV_3AI; + break; + + case INS_sdot: + case INS_udot: + assert(isVectorRegister(reg1)); + assert(isVectorRegister(reg2)); + assert(isVectorRegister(reg3)); + assert(((size == EA_8BYTE) && (opt == INS_OPTS_2S)) || ((size == EA_16BYTE) && (opt == INS_OPTS_4S))); + assert(isValidVectorIndex(EA_16BYTE, EA_4BYTE, imm)); + fmt = IF_DV_3AI; break; default: @@ -7753,7 +7998,10 @@ void emitter::emitIns_R_AR(instruction ins, emitAttr attr, regNumber ireg, regNu } // This computes address from the immediate which is relocatable. -void emitter::emitIns_R_AI(instruction ins, emitAttr attr, regNumber ireg, ssize_t addr) +void emitter::emitIns_R_AI(instruction ins, + emitAttr attr, + regNumber ireg, + ssize_t addr DEBUGARG(size_t targetHandle) DEBUGARG(unsigned gtFlags)) { assert(EA_IS_RELOC(attr)); emitAttr size = EA_SIZE(attr); @@ -7781,6 +8029,10 @@ void emitter::emitIns_R_AI(instruction ins, emitAttr attr, regNumber ireg, ssize id->idAddr()->iiaAddr = (BYTE*)addr; id->idReg1(ireg); id->idSetIsDspReloc(); +#ifdef DEBUG + id->idDebugOnlyInfo()->idMemCookie = targetHandle; + id->idDebugOnlyInfo()->idFlags = gtFlags; +#endif dispIns(id); appendToCurIG(id); @@ -8825,7 +9077,7 @@ void emitter::emitIns_Call(EmitCallType callType, /***************************************************************************** * - * Returns the encoding to select the 'index' for an Arm64 'mul' by elem instruction + * Returns the encoding to select the 'index' for an Arm64 'mul' by element instruction */ /*static*/ emitter::code_t emitter::insEncodeVectorIndexLMH(emitAttr elemsize, ssize_t index) { @@ -8934,7 +9186,7 @@ void emitter::emitIns_Call(EmitCallType callType, return 0x00000000; } -// Returns the encoding to select the index for an Arm64 float vector by elem instruction +// Returns the encoding to select the index for an Arm64 float vector by element instruction /*static*/ emitter::code_t emitter::insEncodeFloatIndex(emitAttr elemsize, ssize_t index) { code_t result = 0x00000000; @@ -9009,7 +9261,7 @@ void emitter::emitIns_Call(EmitCallType callType, /***************************************************************************** * - * Returns the encoding to select the index for an Arm64 ld/st# vector by elem instruction + * Returns the encoding to select the index for an Arm64 ld/st# vector by element instruction */ /*static*/ emitter::code_t emitter::insEncodeVLSIndex(emitAttr size, ssize_t index) @@ -10972,7 +11224,7 @@ size_t emitter::emitOutputInstr(insGroup* ig, instrDesc* id, BYTE** dp) dst += emitOutput_Instr(dst, code); break; - case IF_DV_3BI: // DV_3BI .Q.......XLmmmmm ....H.nnnnnddddd Vd Vn Vm[] (vector by elem) + case IF_DV_3BI: // DV_3BI .Q.......XLmmmmm ....H.nnnnnddddd Vd Vn Vm[] (vector by element) code = emitInsCode(ins, fmt); imm = emitGetInsSC(id); elemsize = optGetElemsize(id->idInsOpt()); @@ -11004,7 +11256,7 @@ size_t emitter::emitOutputInstr(insGroup* ig, instrDesc* id, BYTE** dp) dst += emitOutput_Instr(dst, code); break; - case IF_DV_3DI: // DV_3DI .........XLmmmmm ....H.nnnnnddddd Vd Vn Vm[] (scalar by elem) + case IF_DV_3DI: // DV_3DI .........XLmmmmm ....H.nnnnnddddd Vd Vn Vm[] (scalar by element) code = emitInsCode(ins, fmt); imm = emitGetInsSC(id); elemsize = id->idOpSize(); @@ -11027,6 +11279,19 @@ size_t emitter::emitOutputInstr(insGroup* ig, instrDesc* id, BYTE** dp) dst += emitOutput_Instr(dst, code); break; + case IF_DV_3EI: // DV_3EI ........XXLMmmmm ....H.nnnnnddddd Vd Vn Vm[] (scalar by element) + code = emitInsCode(ins, fmt); + imm = emitGetInsSC(id); + elemsize = id->idOpSize(); + assert(isValidVectorIndex(EA_16BYTE, elemsize, imm)); + code |= insEncodeElemsize(elemsize); // XX + code |= insEncodeVectorIndexLMH(elemsize, imm); // LM H + code |= insEncodeReg_Vd(id->idReg1()); // ddddd + code |= insEncodeReg_Vn(id->idReg2()); // nnnnn + code |= insEncodeReg_Vm(id->idReg3()); // mmmmm + dst += emitOutput_Instr(dst, code); + break; + case IF_DV_3F: // DV_3F ...........mmmmm ......nnnnnddddd Vd Vn Vm (vector) - source dest regs overlap code = emitInsCode(ins, fmt); code |= insEncodeReg_Vd(id->idReg1()); // ddddd @@ -11046,30 +11311,6 @@ size_t emitter::emitOutputInstr(insGroup* ig, instrDesc* id, BYTE** dp) dst += emitOutput_Instr(dst, code); break; - case IF_DV_3H: // DV_3H ........XX.mmmmm ......nnnnnddddd Vd Vn Vm (addhn{2}, raddhn{2}, rsubhn{2}, - // subhn{2}, pmull{2}) - code = emitInsCode(ins, fmt); - elemsize = optGetElemsize(id->idInsOpt()); - code |= insEncodeElemsize(elemsize); // XX - code |= insEncodeReg_Vm(id->idReg3()); // mmmmm - code |= insEncodeReg_Vn(id->idReg2()); // nnnnn - code |= insEncodeReg_Vd(id->idReg1()); // ddddd - dst += emitOutput_Instr(dst, code); - break; - - case IF_DV_3HI: // DV_3HI ........XXLMmmmm ....H.nnnnnddddd Vd Vn Vm[] (smlal{2}, umlal{2} by element) - code = emitInsCode(ins, fmt); - imm = emitGetInsSC(id); - elemsize = optGetElemsize(id->idInsOpt()); - assert(isValidVectorIndex(EA_16BYTE, elemsize, imm)); - code |= insEncodeElemsize(elemsize); // XX - code |= insEncodeVectorIndexLMH(elemsize, imm); // LM H - code |= insEncodeReg_Vd(id->idReg1()); // ddddd - code |= insEncodeReg_Vn(id->idReg2()); // nnnnn - code |= insEncodeReg_Vm(id->idReg3()); // mmmmm - dst += emitOutput_Instr(dst, code); - break; - case IF_DV_4A: // DV_4A .........X.mmmmm .aaaaannnnnddddd Vd Va Vn Vm (scalar) code = emitInsCode(ins, fmt); elemsize = id->idOpSize(); @@ -11873,10 +12114,8 @@ void emitter::emitDispIns( switch (fmt) { - code_t code; ssize_t imm; int doffs; - bool isExtendAlias; bitMaskImm bmi; halfwordImm hwi; condFlagsImm cfi; @@ -11892,6 +12131,8 @@ void emitter::emitDispIns( ssize_t index; ssize_t index2; unsigned registerListSize; + const char* targetName; + const WCHAR* stringLiteral; case IF_BI_0A: // BI_0A ......iiiiiiiiii iiiiiiiiiiiiiiii simm26:00 case IF_BI_0B: // BI_0B ......iiiiiiiiii iiiiiiiiiii..... simm19:00 @@ -11997,7 +12238,9 @@ void emitter::emitDispIns( case IF_LARGEADR: assert(insOptsNone(id->idInsOpt())); emitDispReg(id->idReg1(), size, true); - imm = emitGetInsSC(id); + imm = emitGetInsSC(id); + targetName = nullptr; + stringLiteral = nullptr; /* Is this actually a reference to a data section? */ if (fmt == IF_LARGEADR) @@ -12028,8 +12271,54 @@ void emitter::emitDispIns( assert(imm == 0); if (id->idIsReloc()) { - printf("RELOC "); + printf("HIGH RELOC "); emitDispImm((ssize_t)id->idAddr()->iiaAddr, false); + size_t targetHandle = id->idDebugOnlyInfo()->idMemCookie; + unsigned idFlags = id->idDebugOnlyInfo()->idFlags & GTF_ICON_HDL_MASK; + + if (targetHandle == THT_IntializeArrayIntrinsics) + { + targetName = "IntializeArrayIntrinsics"; + } + else if (targetHandle == THT_GSCookieCheck) + { + targetName = "GlobalSecurityCookieCheck"; + } + else if (targetHandle == THT_SetGSCookie) + { + targetName = "SetGlobalSecurityCookie"; + } + else if ((idFlags == GTF_ICON_STR_HDL) || (idFlags == GTF_ICON_PSTR_HDL)) + { + stringLiteral = emitComp->eeGetCPString(targetHandle); + // Note that eGetCPString isn't currently implemented on Linux/ARM + // and instead always returns nullptr. However, use it here, so in + // future, once it is is implemented, no changes will be needed here. + if (stringLiteral == nullptr) + { + targetName = "String handle"; + } + } + else if ((idFlags == GTF_ICON_FIELD_HDL) || (idFlags == GTF_ICON_STATIC_HDL)) + { + targetName = emitComp->eeGetFieldName((CORINFO_FIELD_HANDLE)targetHandle); + } + else if ((idFlags == GTF_ICON_METHOD_HDL) || (idFlags == GTF_ICON_FTN_ADDR)) + { + targetName = emitComp->eeGetMethodFullName((CORINFO_METHOD_HANDLE)targetHandle); + } + else if (idFlags == GTF_ICON_CLASS_HDL) + { + targetName = emitComp->eeGetClassName((CORINFO_CLASS_HANDLE)targetHandle); + } + else if (idFlags == GTF_ICON_TOKEN_HDL) + { + targetName = "Token handle"; + } + else + { + targetName = "Unknown"; + } } else if (id->idIsBound()) { @@ -12041,6 +12330,14 @@ void emitter::emitDispIns( } } printf("]"); + if (targetName != nullptr) + { + printf(" // [%s]", targetName); + } + else if (stringLiteral != nullptr) + { + printf(" // [%S]", stringLiteral); + } break; case IF_LS_2A: // LS_2A .X.......X...... ......nnnnnttttt Rt Rn @@ -12218,7 +12515,17 @@ void emitter::emitDispIns( emitDispReg(id->idReg1(), size, true); emitDispReg(id->idReg2(), size, true); } - emitDispImmOptsLSL12(emitGetInsSC(id), id->idInsOpt()); + if (id->idIsReloc()) + { + assert(ins == INS_add); + printf("[LOW RELOC "); + emitDispImm((ssize_t)id->idAddr()->iiaAddr, false); + printf("]"); + } + else + { + emitDispImmOptsLSL12(emitGetInsSC(id), id->idInsOpt()); + } break; case IF_DI_2B: // DI_2B X........X.nnnnn ssssssnnnnnddddd Rd Rn imm(0-63) @@ -12368,13 +12675,18 @@ void emitter::emitDispIns( emitDispReg(encodingZRtoSP(id->idReg1()), size, true); emitDispReg(encodingZRtoSP(id->idReg2()), size, true); } - else if ((ins == INS_smull) || (ins == INS_smulh)) + else if ((ins == INS_smulh) || (ins == INS_umulh)) + { + size = EA_8BYTE; + // smulh Xd, Xn, Xm + emitDispReg(id->idReg1(), size, true); + emitDispReg(id->idReg2(), size, true); + } + else if ((ins == INS_smull) || (ins == INS_umull) || (ins == INS_smnegl) || (ins == INS_umnegl)) { - // Rd is always 8 bytes + // smull Xd, Wn, Wm emitDispReg(id->idReg1(), EA_8BYTE, true); - - // Rn, Rm effective size depends on instruction type - size = (ins == INS_smulh) ? EA_8BYTE : EA_4BYTE; + size = EA_4BYTE; emitDispReg(id->idReg2(), size, true); } else @@ -12382,6 +12694,7 @@ void emitter::emitDispIns( emitDispReg(id->idReg1(), size, true); emitDispReg(id->idReg2(), size, true); } + if (id->idIsLclVar()) { emitDispReg(codeGen->rsGetRsvdReg(), size, false); @@ -12422,10 +12735,21 @@ void emitter::emitDispIns( break; case IF_DR_4A: // DR_4A X..........mmmmm .aaaaannnnnmmmmm Rd Rn Rm Ra - emitDispReg(id->idReg1(), size, true); - emitDispReg(id->idReg2(), size, true); - emitDispReg(id->idReg3(), size, true); - emitDispReg(id->idReg4(), size, false); + if ((ins == INS_smaddl) || (ins == INS_smsubl) || (ins == INS_umaddl) || (ins == INS_umsubl)) + { + // smaddl Xd, Wn, Wm, Xa + emitDispReg(id->idReg1(), EA_8BYTE, true); + emitDispReg(id->idReg2(), EA_4BYTE, true); + emitDispReg(id->idReg3(), EA_4BYTE, true); + emitDispReg(id->idReg4(), EA_8BYTE, false); + } + else + { + emitDispReg(id->idReg1(), size, true); + emitDispReg(id->idReg2(), size, true); + emitDispReg(id->idReg3(), size, true); + emitDispReg(id->idReg4(), size, false); + } break; case IF_DV_1A: // DV_1A .........X.iiiii iii........ddddd Vd imm8 (fmov - immediate scalar) @@ -12490,18 +12814,19 @@ void emitter::emitDispIns( break; case IF_DV_2A: // DV_2A .Q.......X...... ......nnnnnddddd Vd Vn (fabs, fcvt - vector) - if ((ins == INS_fcvtl) || (ins == INS_fcvtl2)) + if (emitInsIsVectorLong(ins)) { - emitDispVectorReg(id->idReg1(), optWidenElemsize(id->idInsOpt()), true); + emitDispVectorReg(id->idReg1(), optWidenElemsizeArrangement(id->idInsOpt()), true); emitDispVectorReg(id->idReg2(), id->idInsOpt(), false); } - else if ((ins == INS_fcvtn) || (ins == INS_fcvtn2)) + else if (emitInsIsVectorNarrow(ins)) { emitDispVectorReg(id->idReg1(), id->idInsOpt(), true); - emitDispVectorReg(id->idReg2(), optWidenElemsize(id->idInsOpt()), false); + emitDispVectorReg(id->idReg2(), optWidenElemsizeArrangement(id->idInsOpt()), false); } else { + assert(!emitInsIsVectorWide(ins)); emitDispVectorReg(id->idReg1(), id->idInsOpt(), true); emitDispVectorReg(id->idReg2(), id->idInsOpt(), false); } @@ -12513,43 +12838,68 @@ void emitter::emitDispIns( break; case IF_DV_2M: // DV_2M .Q......XX...... ......nnnnnddddd Vd Vn (abs, neg - vector) - emitDispVectorReg(id->idReg1(), id->idInsOpt(), true); - emitDispVectorReg(id->idReg2(), id->idInsOpt(), false); + if (emitInsIsVectorNarrow(ins)) + { + emitDispVectorReg(id->idReg1(), id->idInsOpt(), true); + emitDispVectorReg(id->idReg2(), optWidenElemsizeArrangement(id->idInsOpt()), false); + } + else + { + assert(!emitInsIsVectorLong(ins) && !emitInsIsVectorWide(ins)); + emitDispVectorReg(id->idReg1(), id->idInsOpt(), true); + emitDispVectorReg(id->idReg2(), id->idInsOpt(), false); + } break; case IF_DV_2N: // DV_2N .........iiiiiii ......nnnnnddddd Vd Vn imm (shift - scalar) elemsize = id->idOpSize(); - emitDispReg(id->idReg1(), elemsize, true); - emitDispReg(id->idReg2(), elemsize, true); - emitDispImm(emitGetInsSC(id), false); + if (emitInsIsVectorLong(ins)) + { + emitDispReg(id->idReg1(), widenDatasize(elemsize), true); + emitDispReg(id->idReg2(), elemsize, true); + } + else if (emitInsIsVectorNarrow(ins)) + { + emitDispReg(id->idReg1(), elemsize, true); + emitDispReg(id->idReg2(), widenDatasize(elemsize), true); + } + else + { + assert(!emitInsIsVectorWide(ins)); + emitDispReg(id->idReg1(), elemsize, true); + emitDispReg(id->idReg2(), elemsize, true); + } + imm = emitGetInsSC(id); + emitDispImm(imm, false); break; case IF_DV_2O: // DV_2O .Q.......iiiiiii ......nnnnnddddd Vd Vn imm (shift - vector) - imm = emitGetInsSC(id); - // Do we have a sxtl or uxtl instruction? - isExtendAlias = ((ins == INS_sxtl) || (ins == INS_sxtl2) || (ins == INS_uxtl) || (ins == INS_uxtl2)); - code = emitInsCode(ins, fmt); - if (code & 0x00008000) // widen/narrow opcodes + if ((ins == INS_sxtl) || (ins == INS_sxtl2) || (ins == INS_uxtl) || (ins == INS_uxtl2)) + { + assert((emitInsIsVectorLong(ins))); + emitDispVectorReg(id->idReg1(), optWidenElemsizeArrangement(id->idInsOpt()), true); + emitDispVectorReg(id->idReg2(), id->idInsOpt(), false); + } + else { - if (code & 0x00002000) // SHL opcodes + if (emitInsIsVectorLong(ins)) { - emitDispVectorReg(id->idReg1(), optWidenElemsize(id->idInsOpt()), true); - emitDispVectorReg(id->idReg2(), id->idInsOpt(), !isExtendAlias); + emitDispVectorReg(id->idReg1(), optWidenElemsizeArrangement(id->idInsOpt()), true); + emitDispVectorReg(id->idReg2(), id->idInsOpt(), true); } - else // SHR opcodes + else if (emitInsIsVectorNarrow(ins)) { emitDispVectorReg(id->idReg1(), id->idInsOpt(), true); - emitDispVectorReg(id->idReg2(), optWidenElemsize(id->idInsOpt()), !isExtendAlias); + emitDispVectorReg(id->idReg2(), optWidenElemsizeArrangement(id->idInsOpt()), true); } - } - else - { - emitDispVectorReg(id->idReg1(), id->idInsOpt(), true); - emitDispVectorReg(id->idReg2(), id->idInsOpt(), !isExtendAlias); - } - // Print the immediate unless we have a sxtl or uxtl instruction - if (!isExtendAlias) - { + else + { + assert(!emitInsIsVectorWide(ins)); + emitDispVectorReg(id->idReg1(), id->idInsOpt(), true); + emitDispVectorReg(id->idReg2(), id->idInsOpt(), true); + } + + imm = emitGetInsSC(id); emitDispImm(imm, false); } break; @@ -12617,17 +12967,23 @@ void emitter::emitDispIns( case IF_DV_2G: // DV_2G .........X...... ......nnnnnddddd Vd Vn (fmov, fcvtXX - register) case IF_DV_2K: // DV_2K .........X.mmmmm ......nnnnn..... Vn Vm (fcmp) case IF_DV_2L: // DV_2L ........XX...... ......nnnnnddddd Vd Vn (abs, neg - scalar) - elemsize = id->idOpSize(); - emitDispReg(id->idReg1(), elemsize, true); + size = id->idOpSize(); if ((ins == INS_fcmeq) || (ins == INS_fcmge) || (ins == INS_fcmgt) || (ins == INS_fcmle) || (ins == INS_fcmlt)) { - emitDispReg(id->idReg2(), elemsize, true); + emitDispReg(id->idReg1(), size, true); + emitDispReg(id->idReg2(), size, true); emitDispImm(0, false); } + else if (emitInsIsVectorNarrow(ins)) + { + emitDispReg(id->idReg1(), size, true); + emitDispReg(id->idReg2(), widenDatasize(size), false); + } else { - emitDispReg(id->idReg2(), elemsize, false); + emitDispReg(id->idReg1(), size, true); + emitDispReg(id->idReg2(), size, false); } break; @@ -12667,7 +13023,89 @@ void emitter::emitDispIns( } break; - case IF_DV_3A: // DV_3A .Q......XX.mmmmm ......nnnnnddddd Vd Vn Vm (vector) + case IF_DV_3A: // DV_3A .Q......XX.mmmmm ......nnnnnddddd Vd Vn Vm (vector) + if ((ins == INS_sdot) || (ins == INS_udot)) + { + // sdot/udot Vd.2s, Vn.8b, Vm.8b + // sdot/udot Vd.4s, Vn.16b, Vm.16b + emitDispVectorReg(id->idReg1(), id->idInsOpt(), true); + size = id->idOpSize(); + emitDispVectorReg(id->idReg2(), (size == EA_8BYTE) ? INS_OPTS_8B : INS_OPTS_16B, true); + emitDispVectorReg(id->idReg3(), (size == EA_8BYTE) ? INS_OPTS_8B : INS_OPTS_16B, false); + } + else if (((ins == INS_pmull) && (id->idInsOpt() == INS_OPTS_1D)) || + ((ins == INS_pmull2) && (id->idInsOpt() == INS_OPTS_2D))) + { + // pmull Vd.1q, Vn.1d, Vm.1d + // pmull2 Vd.1q, Vn.2d, Vm.2d + printf("%s.1q, ", emitVectorRegName(id->idReg1())); + emitDispVectorReg(id->idReg2(), id->idInsOpt(), true); + emitDispVectorReg(id->idReg3(), id->idInsOpt(), false); + } + else if (emitInsIsVectorNarrow(ins)) + { + emitDispVectorReg(id->idReg1(), id->idInsOpt(), true); + emitDispVectorReg(id->idReg2(), optWidenElemsizeArrangement(id->idInsOpt()), true); + emitDispVectorReg(id->idReg3(), optWidenElemsizeArrangement(id->idInsOpt()), false); + } + else + { + if (emitInsIsVectorLong(ins)) + { + emitDispVectorReg(id->idReg1(), optWidenElemsizeArrangement(id->idInsOpt()), true); + emitDispVectorReg(id->idReg2(), id->idInsOpt(), true); + } + else if (emitInsIsVectorWide(ins)) + { + emitDispVectorReg(id->idReg1(), optWidenElemsizeArrangement(id->idInsOpt()), true); + emitDispVectorReg(id->idReg2(), optWidenElemsizeArrangement(id->idInsOpt()), true); + } + else + { + emitDispVectorReg(id->idReg1(), id->idInsOpt(), true); + emitDispVectorReg(id->idReg2(), id->idInsOpt(), true); + } + + emitDispVectorReg(id->idReg3(), id->idInsOpt(), false); + } + break; + + case IF_DV_3AI: // DV_3AI .Q......XXLMmmmm ....H.nnnnnddddd Vd Vn Vm[] (vector by element) + if ((ins == INS_sdot) || (ins == INS_udot)) + { + // sdot/udot Vd.2s, Vn.8b, Vm.4b[index] + // sdot/udot Vd.4s, Vn.16b, Vm.4b[index] + emitDispVectorReg(id->idReg1(), id->idInsOpt(), true); + size = id->idOpSize(); + emitDispVectorReg(id->idReg2(), (size == EA_8BYTE) ? INS_OPTS_8B : INS_OPTS_16B, true); + index = emitGetInsSC(id); + printf("%s.4b[%d]", emitVectorRegName(id->idReg3()), index); + } + else + { + if (emitInsIsVectorLong(ins)) + { + emitDispVectorReg(id->idReg1(), optWidenElemsizeArrangement(id->idInsOpt()), true); + emitDispVectorReg(id->idReg2(), id->idInsOpt(), true); + } + else if (emitInsIsVectorWide(ins)) + { + emitDispVectorReg(id->idReg1(), optWidenElemsizeArrangement(id->idInsOpt()), true); + emitDispVectorReg(id->idReg2(), optWidenElemsizeArrangement(id->idInsOpt()), true); + } + else + { + assert(!emitInsIsVectorNarrow(ins)); + emitDispVectorReg(id->idReg1(), id->idInsOpt(), true); + emitDispVectorReg(id->idReg2(), id->idInsOpt(), true); + } + + elemsize = optGetElemsize(id->idInsOpt()); + index = emitGetInsSC(id); + emitDispVectorRegIndex(id->idReg3(), elemsize, index, false); + } + break; + case IF_DV_3B: // DV_3B .Q.........mmmmm ......nnnnnddddd Vd Vn Vm (vector) emitDispVectorReg(id->idReg1(), id->idInsOpt(), true); emitDispVectorReg(id->idReg2(), id->idInsOpt(), true); @@ -12698,8 +13136,7 @@ void emitter::emitDispIns( emitDispVectorReg(id->idReg3(), id->idInsOpt(), false); break; - case IF_DV_3AI: // DV_3AI .Q......XXLMmmmm ....H.nnnnnddddd Vd Vn Vm[] (vector by elem) - case IF_DV_3BI: // DV_3BI .Q........Lmmmmm ....H.nnnnnddddd Vd Vn Vm[] (vector by elem) + case IF_DV_3BI: // DV_3BI .Q........Lmmmmm ....H.nnnnnddddd Vd Vn Vm[] (vector by element) emitDispVectorReg(id->idReg1(), id->idInsOpt(), true); emitDispVectorReg(id->idReg2(), id->idInsOpt(), true); elemsize = optGetElemsize(id->idInsOpt()); @@ -12707,37 +13144,67 @@ void emitter::emitDispIns( break; case IF_DV_3D: // DV_3D .........X.mmmmm ......nnnnnddddd Vd Vn Vm (scalar) - case IF_DV_3E: // DV_3E ........XX.mmmmm ......nnnnnddddd Vd Vn Vm (scalar) emitDispReg(id->idReg1(), size, true); emitDispReg(id->idReg2(), size, true); emitDispReg(id->idReg3(), size, false); break; - case IF_DV_3F: // DV_3F ..........mmmmm ......nnnnnddddd Vd Vn Vm (vector) - if ((ins == INS_sha1c) || (ins == INS_sha1m) || (ins == INS_sha1p)) + case IF_DV_3E: // DV_3E ........XX.mmmmm ......nnnnnddddd Vd Vn Vm (scalar) + if (emitInsIsVectorLong(ins)) { - // Qd, Sn, Vm (vector) - emitDispReg(id->idReg1(), size, true); - emitDispReg(id->idReg2(), EA_4BYTE, true); - emitDispVectorReg(id->idReg3(), id->idInsOpt(), false); + emitDispReg(id->idReg1(), widenDatasize(size), true); } - else if ((ins == INS_sha256h) || (ins == INS_sha256h2)) + else { - // Qd Qn Vm (vector) + assert(!emitInsIsVectorNarrow(ins) && !emitInsIsVectorWide(ins)); emitDispReg(id->idReg1(), size, true); - emitDispReg(id->idReg2(), size, true); - emitDispVectorReg(id->idReg3(), id->idInsOpt(), false); } - else // INS_sha1su0, INS_sha256su1 - { - // Vd, Vn, Vm (vector) + + emitDispReg(id->idReg2(), size, true); + emitDispReg(id->idReg3(), size, false); + break; + + case IF_DV_3EI: // DV_3EI ........XXLMmmmm ....H.nnnnnddddd Vd Vn Vm[] (scalar by element) + if (emitInsIsVectorLong(ins)) + { + emitDispReg(id->idReg1(), widenDatasize(size), true); + } + else + { + assert(!emitInsIsVectorNarrow(ins) && !emitInsIsVectorWide(ins)); + emitDispReg(id->idReg1(), size, true); + } + emitDispReg(id->idReg2(), size, true); + elemsize = id->idOpSize(); + index = emitGetInsSC(id); + emitDispVectorRegIndex(id->idReg3(), elemsize, index, false); + break; + + case IF_DV_3F: // DV_3F ..........mmmmm ......nnnnnddddd Vd Vn Vm (vector) + if ((ins == INS_sha1c) || (ins == INS_sha1m) || (ins == INS_sha1p)) + { + // Qd, Sn, Vm (vector) + emitDispReg(id->idReg1(), size, true); + emitDispReg(id->idReg2(), EA_4BYTE, true); + emitDispVectorReg(id->idReg3(), id->idInsOpt(), false); + } + else if ((ins == INS_sha256h) || (ins == INS_sha256h2)) + { + // Qd Qn Vm (vector) + emitDispReg(id->idReg1(), size, true); + emitDispReg(id->idReg2(), size, true); + emitDispVectorReg(id->idReg3(), id->idInsOpt(), false); + } + else // INS_sha1su0, INS_sha256su1 + { + // Vd, Vn, Vm (vector) emitDispVectorReg(id->idReg1(), id->idInsOpt(), true); emitDispVectorReg(id->idReg2(), id->idInsOpt(), true); emitDispVectorReg(id->idReg3(), id->idInsOpt(), false); } break; - case IF_DV_3DI: // DV_3DI .........XLmmmmm ....H.nnnnnddddd Vd Vn Vm[] (scalar by elem) + case IF_DV_3DI: // DV_3DI .........XLmmmmm ....H.nnnnnddddd Vd Vn Vm[] (scalar by element) emitDispReg(id->idReg1(), size, true); emitDispReg(id->idReg2(), size, true); elemsize = size; @@ -12751,52 +13218,6 @@ void emitter::emitDispIns( emitDispImm(emitGetInsSC(id), false); break; - case IF_DV_3H: // DV_3H ........XX.mmmmm ......nnnnnddddd Vd Vn Vm (addhn{2}, raddhn{2}, rsubhn{2}, - // subhn{2}, pmull{2}) - if ((ins == INS_addhn) || (ins == INS_addhn2) || (ins == INS_raddhn) || (ins == INS_raddhn2) || - (ins == INS_subhn) || (ins == INS_subhn2) || (ins == INS_rsubhn) || (ins == INS_rsubhn2)) - { - // These are "high narrow" instruction i.e. their source registers are "wider" than the destination - // register. - emitDispVectorReg(id->idReg1(), id->idInsOpt(), true); - emitDispVectorReg(id->idReg2(), optWidenElemsize(id->idInsOpt()), true); - emitDispVectorReg(id->idReg3(), optWidenElemsize(id->idInsOpt()), false); - } - else - { - if (((ins == INS_pmull) && (id->idInsOpt() == INS_OPTS_1D)) || - (ins == (INS_pmull2) && (id->idInsOpt() == INS_OPTS_2D))) - { - // PMULL Vd.1Q, Vn.1D, Vm.1D - // PMULL2 Vd.1Q, Vn.2D, Vm.2D - printf("%s.1q, ", emitVectorRegName(id->idReg1())); - } - else - { - emitDispVectorReg(id->idReg1(), optWidenElemsize(id->idInsOpt()), true); - } - - if ((ins == INS_saddw) || (ins == INS_saddw2) || (ins == INS_uaddw) || (ins == INS_uaddw2) || - (ins == INS_ssubw) || (ins == INS_ssubw2) || (ins == INS_usubw) || (ins == INS_usubw2)) - { - emitDispVectorReg(id->idReg2(), optWidenElemsize(id->idInsOpt()), true); - } - else - { - emitDispVectorReg(id->idReg2(), id->idInsOpt(), true); - } - - emitDispVectorReg(id->idReg3(), id->idInsOpt(), false); - } - break; - - case IF_DV_3HI: - emitDispVectorReg(id->idReg1(), optWidenElemsize(id->idInsOpt()), true); - emitDispVectorReg(id->idReg2(), id->idInsOpt(), true); - elemsize = optGetElemsize(id->idInsOpt()); - emitDispVectorRegIndex(id->idReg3(), elemsize, emitGetInsSC(id), false); - break; - case IF_DV_4A: // DV_4A .........X.mmmmm .aaaaannnnnddddd Vd Va Vn Vm (scalar) emitDispReg(id->idReg1(), size, true); emitDispReg(id->idReg2(), size, true); @@ -12888,7 +13309,7 @@ void emitter::emitInsLoadStoreOp(instruction ins, emitAttr attr, regNumber dataR if (addr->isContained()) { - assert(addr->OperGet() == GT_CLS_VAR_ADDR || addr->OperGet() == GT_LCL_VAR_ADDR || addr->OperGet() == GT_LEA); + assert(addr->OperIs(GT_CLS_VAR_ADDR, GT_LCL_VAR_ADDR, GT_LCL_FLD_ADDR, GT_LEA)); int offset = 0; DWORD lsl = 0; @@ -12971,6 +13392,24 @@ void emitter::emitInsLoadStoreOp(instruction ins, emitAttr attr, regNumber dataR regNumber addrReg = indir->GetSingleTempReg(); emitIns_R_C(ins, attr, dataReg, addrReg, addr->AsClsVar()->gtClsVarHnd, 0); } + else if (addr->OperIs(GT_LCL_VAR_ADDR, GT_LCL_FLD_ADDR)) + { + GenTreeLclVarCommon* varNode = addr->AsLclVarCommon(); + unsigned lclNum = varNode->GetLclNum(); + unsigned offset = 0; + if (addr->OperIs(GT_LCL_FLD_ADDR)) + { + offset = varNode->AsLclFld()->GetLclOffs(); + } + if (emitInsIsStore(ins)) + { + emitIns_S_R(ins, attr, dataReg, lclNum, offset); + } + else + { + emitIns_R_S(ins, attr, dataReg, lclNum, offset); + } + } else if (emitIns_valid_imm_for_ldst_offset(offset, emitTypeSize(indir->TypeGet()))) { // Then load/store dataReg from/to [memBase + offset] @@ -14104,6 +14543,8 @@ emitter::insExecutionCharacteristics emitter::getInsExecutionCharacteristics(ins case INS_fcvtl2: case INS_fcvtn: case INS_fcvtn2: + case INS_fcvtxn: + case INS_fcvtxn2: result.insThroughput = PERFSCORE_THROUGHPUT_1C; result.insLatency = PERFSCORE_LATENCY_4C; break; @@ -14151,6 +14592,11 @@ emitter::insExecutionCharacteristics emitter::getInsExecutionCharacteristics(ins result.insLatency = PERFSCORE_LATENCY_3C; break; + case INS_fcvtxn: + result.insThroughput = PERFSCORE_THROUGHPUT_1C; + result.insLatency = PERFSCORE_LATENCY_4C; + break; + case INS_fcmeq: case INS_fcmge: case INS_fcmgt: @@ -14283,8 +14729,9 @@ emitter::insExecutionCharacteristics emitter::getInsExecutionCharacteristics(ins } break; - case IF_DV_3BI: // fmul, fmulx, fmla, fmls (vector by elem) - case IF_DV_3AI: // mul, mla, mls (vector by elem) + case IF_DV_3AI: // mul, mla, mls (vector by element) + case IF_DV_3BI: // fmul, fmulx, fmla, fmls (vector by element) + case IF_DV_3EI: // sqdmlal, sqdmlsl, sqdmulh, sqdmull (scalar by element) result.insThroughput = PERFSCORE_THROUGHPUT_1C; result.insLatency = PERFSCORE_LATENCY_4C; break; @@ -14516,11 +14963,13 @@ emitter::insExecutionCharacteristics emitter::getInsExecutionCharacteristics(ins result.insLatency = PERFSCORE_LATENCY_3C; break; - case INS_mul: case INS_mla: case INS_mls: - case INS_sqshl: + case INS_mul: + case INS_sqdmulh: + case INS_sqrdmulh: case INS_sqrshl: + case INS_sqshl: case INS_uqrshl: case INS_uqshl: result.insThroughput = PERFSCORE_THROUGHPUT_2X; @@ -14533,6 +14982,99 @@ emitter::insExecutionCharacteristics emitter::getInsExecutionCharacteristics(ins result.insLatency = PERFSCORE_LATENCY_4C; break; + case INS_sdot: + case INS_udot: + result.insLatency = PERFSCORE_LATENCY_4C; + if (id->idOpSize() == EA_16BYTE) + { + result.insThroughput = PERFSCORE_THROUGHPUT_1C; + } + else + { + result.insThroughput = PERFSCORE_THROUGHPUT_2X; + } + break; + + case INS_addhn: + case INS_addhn2: + case INS_sabdl: + case INS_sabdl2: + case INS_saddl2: + case INS_saddl: + case INS_saddw: + case INS_saddw2: + case INS_ssubl: + case INS_ssubl2: + case INS_ssubw: + case INS_ssubw2: + case INS_subhn: + case INS_subhn2: + case INS_uabdl: + case INS_uabdl2: + case INS_uaddl: + case INS_uaddl2: + case INS_uaddw: + case INS_uaddw2: + case INS_usubl: + case INS_usubl2: + case INS_usubw: + case INS_usubw2: + result.insThroughput = PERFSCORE_THROUGHPUT_1C; + result.insLatency = PERFSCORE_LATENCY_3C; + break; + + case INS_raddhn: + case INS_raddhn2: + case INS_rsubhn: + case INS_rsubhn2: + case INS_sabal: + case INS_sabal2: + case INS_uabal: + case INS_uabal2: + result.insThroughput = PERFSCORE_THROUGHPUT_2C; + result.insLatency = PERFSCORE_LATENCY_4C; + break; + + case INS_smlal: + case INS_smlal2: + case INS_smlsl: + case INS_smlsl2: + case INS_smull: + case INS_smull2: + case INS_sqdmlal: + case INS_sqdmlal2: + case INS_sqdmlsl: + case INS_sqdmlsl2: + case INS_sqdmull: + case INS_sqdmull2: + case INS_sqrdmlah: + case INS_sqrdmlsh: + case INS_umlal: + case INS_umlal2: + case INS_umlsl: + case INS_umlsl2: + case INS_umull: + case INS_umull2: + result.insThroughput = PERFSCORE_THROUGHPUT_1C; + result.insLatency = PERFSCORE_LATENCY_4C; + break; + + case INS_pmull: + case INS_pmull2: + if ((id->idInsOpt() == INS_OPTS_8B) || (id->idInsOpt() == INS_OPTS_16B)) + { + result.insThroughput = PERFSCORE_THROUGHPUT_1C; + result.insLatency = PERFSCORE_LATENCY_3C; + } + else + { + // Crypto polynomial (64x64) multiply long + assert((id->idInsOpt() == INS_OPTS_1D) || (id->idInsOpt() == INS_OPTS_2D)); + result.insThroughput = PERFSCORE_THROUGHPUT_1C; + result.insLatency = PERFSCORE_LATENCY_2C; + } + break; + default: // all other instructions perfScoreUnhandledInstruction(id, &result); @@ -14540,7 +15082,7 @@ emitter::insExecutionCharacteristics emitter::getInsExecutionCharacteristics(ins } break; - case IF_DV_3DI: // fmul, fmulx, fmla, fmls (scalar by elem) + case IF_DV_3DI: // fmul, fmulx, fmla, fmls (scalar by element) result.insThroughput = PERFSCORE_THROUGHPUT_1C; result.insLatency = PERFSCORE_LATENCY_4C; break; @@ -14564,8 +15106,19 @@ emitter::insExecutionCharacteristics emitter::getInsExecutionCharacteristics(ins switch (ins) { case INS_abs: - result.insThroughput = PERFSCORE_THROUGHPUT_2X; - result.insLatency = PERFSCORE_LATENCY_3C; + case INS_sqneg: + case INS_suqadd: + case INS_usqadd: + if (id->idOpSize() == EA_16BYTE) + { + result.insThroughput = PERFSCORE_THROUGHPUT_1C; + } + else + { + result.insThroughput = PERFSCORE_THROUGHPUT_2X; + } + + result.insLatency = PERFSCORE_LATENCY_3C; break; case INS_addv: @@ -14611,6 +15164,17 @@ emitter::insExecutionCharacteristics emitter::getInsExecutionCharacteristics(ins result.insLatency = PERFSCORE_LATENCY_1C; break; + case INS_sqabs: + case INS_sqxtn: + case INS_sqxtn2: + case INS_sqxtun: + case INS_sqxtun2: + case INS_uqxtn: + case INS_uqxtn2: + result.insThroughput = PERFSCORE_THROUGHPUT_2X; + result.insLatency = PERFSCORE_LATENCY_4C; + break; + default: // all other instructions perfScoreUnhandledInstruction(id, &result); @@ -14743,90 +15307,6 @@ emitter::insExecutionCharacteristics emitter::getInsExecutionCharacteristics(ins } break; - case IF_DV_3H: // addhn{2}, raddhn{2}, rsubhn{2}, sabal{2}, sabdl{2}, saddl{2}, saddw{2}, ssubl{2}, ssubw{2}, - // pmull{2} - case IF_DV_3HI: // subhn{2}, uabal{2}, uabdl{2}, uaddl{2}, uaddw{2}, usubl{2}, usubw{2} - switch (ins) - { - case INS_addhn: - case INS_addhn2: - case INS_sabdl: - case INS_sabdl2: - case INS_saddl: - case INS_saddl2: - case INS_saddw: - case INS_saddw2: - case INS_ssubl: - case INS_ssubl2: - case INS_ssubw: - case INS_ssubw2: - case INS_subhn: - case INS_subhn2: - case INS_uabdl: - case INS_uabdl2: - case INS_uaddl: - case INS_uaddl2: - case INS_uaddw: - case INS_uaddw2: - case INS_usubl: - case INS_usubl2: - case INS_usubw: - case INS_usubw2: - result.insThroughput = PERFSCORE_THROUGHPUT_1C; - result.insLatency = PERFSCORE_LATENCY_3C; - break; - - case INS_raddhn: - case INS_raddhn2: - case INS_rsubhn: - case INS_rsubhn2: - case INS_sabal: - case INS_sabal2: - case INS_uabal: - case INS_uabal2: - result.insThroughput = PERFSCORE_THROUGHPUT_2C; - result.insLatency = PERFSCORE_LATENCY_4C; - break; - - case INS_smlal: - case INS_smlal2: - case INS_smlsl: - case INS_smlsl2: - case INS_smull: - case INS_smull2: - case INS_umlal: - case INS_umlal2: - case INS_umlsl: - case INS_umlsl2: - case INS_umull: - case INS_umull2: - result.insThroughput = PERFSCORE_THROUGHPUT_1C; - result.insLatency = PERFSCORE_LATENCY_4C; - break; - - case INS_pmull: - case INS_pmull2: - if ((id->idInsOpt() == INS_OPTS_8B) || (id->idInsOpt() == INS_OPTS_16B)) - { - result.insThroughput = PERFSCORE_THROUGHPUT_1C; - result.insLatency = PERFSCORE_LATENCY_3C; - } - else - { - // Crypto polynomial (64x64) multiply long - assert((id->idInsOpt() == INS_OPTS_1D) || (id->idInsOpt() == INS_OPTS_2D)); - result.insThroughput = PERFSCORE_THROUGHPUT_1C; - result.insLatency = PERFSCORE_LATENCY_2C; - } - break; - - default: - // all other instructions - perfScoreUnhandledInstruction(id, &result); - break; - } - break; - case IF_SI_0A: // brk imm16 result.insThroughput = PERFSCORE_THROUGHPUT_1C; result.insLatency = PERFSCORE_LATENCY_1C; @@ -14882,4 +15362,107 @@ emitter::insExecutionCharacteristics emitter::getInsExecutionCharacteristics(ins #endif // defined(DEBUG) || defined(LATE_DISASM) +//---------------------------------------------------------------------------------------- +// IsRedundantMov: +// Check if the current `mov` instruction is redundant and can be omitted. +// A `mov` is redundant in following 3 cases: +// +// 1. Move to same register +// (Except 4-byte movement like "mov w1, w1" which zeros out upper bits of x1 register) +// +// mov Rx, Rx +// +// 2. Move that is identical to last instruction emitted. +// +// mov Rx, Ry # <-- last instruction +// mov Rx, Ry # <-- current instruction can be omitted. +// +// 3. Opposite Move as that of last instruction emitted. +// +// mov Rx, Ry # <-- last instruction +// mov Ry, Rx # <-- current instruction can be omitted. +// +// Arguments: +// ins - The current instruction +// size - Operand size of current instruction +// dst - The current destination +// src - The current source +// +// Return Value: +// true if previous instruction moved from current dst to src. + +bool emitter::IsRedundantMov(instruction ins, emitAttr size, regNumber dst, regNumber src) +{ + assert(ins == INS_mov); + + if (dst == src) + { + // A mov with a EA_4BYTE has the side-effect of clearing the upper bits + // So only eliminate mov instructions that are not clearing the upper bits + // + if (isGeneralRegisterOrSP(dst) && (size == EA_8BYTE)) + { + JITDUMP("\n -- suppressing mov because src and dst is same 8-byte register.\n"); + return true; + } + else if (isVectorRegister(dst) && (size == EA_16BYTE)) + { + JITDUMP("\n -- suppressing mov because src and dst is same 16-byte register.\n"); + return true; + } + } + + bool isFirstInstrInBlock = (emitCurIGinsCnt == 0) && ((emitCurIG->igFlags & IGF_EXTEND) == 0); + + if (!isFirstInstrInBlock && // Don't optimize if instruction is not the first instruction in IG. + (emitLastIns != nullptr) && + (emitLastIns->idIns() == INS_mov) && // Don't optimize if last instruction was not 'mov'. + (emitLastIns->idOpSize() == size)) // Don't optimize if operand size is different than previous instruction. + { + // Check if we did same move in prev instruction except dst/src were switched. + regNumber prevDst = emitLastIns->idReg1(); + regNumber prevSrc = emitLastIns->idReg2(); + insFormat lastInsfmt = emitLastIns->idInsFmt(); + + if ((prevDst == dst) && (prevSrc == src)) + { + assert(emitLastIns->idOpSize() == size); + JITDUMP("\n -- suppressing mov because previous instruction already moved from src to dst register.\n"); + return true; + } + + // Sometimes emitLastIns can be a mov with single register e.g. "mov reg, #imm". So ensure to + // optimize formats that does vector-to-vector or scalar-to-scalar register movs. + bool isValidLastInsFormats = ((lastInsfmt == IF_DV_3C) || (lastInsfmt == IF_DR_2G) || (lastInsfmt == IF_DR_2E)); + + if ((prevDst == src) && (prevSrc == dst) && isValidLastInsFormats) + { + // For mov with EA_8BYTE, ensure src/dst are both scalar or both vector. + if (size == EA_8BYTE) + { + if (isVectorRegister(src) == isVectorRegister(dst)) + { + JITDUMP("\n -- suppressing mov because previous instruction already did an opposite move from dst " + "to src register.\n"); + return true; + } + } + + // For mov with EA_16BYTE, both src/dst will be vector. + else if (size == EA_16BYTE) + { + assert(isVectorRegister(src) && isVectorRegister(dst)); + assert(lastInsfmt == IF_DV_3C); + + JITDUMP("\n -- suppressing mov because previous instruction already did an opposite move from dst to " + "src register.\n"); + return true; + } + + // For mov of other sizes, don't optimize because it has side-effect of clearing the upper bits. + } + } + + return false; +} #endif // defined(TARGET_ARM64) diff --git a/src/coreclr/src/jit/emitarm64.h b/src/coreclr/src/jit/emitarm64.h index 9c365c005d1f..94a3e6d7c32d 100644 --- a/src/coreclr/src/jit/emitarm64.h +++ b/src/coreclr/src/jit/emitarm64.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #if defined(TARGET_ARM64) @@ -88,6 +87,9 @@ bool emitInsIsLoad(instruction ins); bool emitInsIsStore(instruction ins); bool emitInsIsLoadOrStore(instruction ins); bool emitInsIsVectorRightShift(instruction ins); +bool emitInsIsVectorLong(instruction ins); +bool emitInsIsVectorNarrow(instruction ins); +bool emitInsIsVectorWide(instruction ins); emitAttr emitInsTargetRegSize(instrDesc* id); emitAttr emitInsLoadStoreSize(instrDesc* id); @@ -113,6 +115,10 @@ static UINT64 NOT_helper(UINT64 value, unsigned width); // A helper method to perform a bit Replicate operation static UINT64 Replicate_helper(UINT64 value, unsigned width, emitAttr size); +// Method to do check if mov is redundant with respect to the last instruction. +// If yes, the caller of this method can choose to omit current mov instruction. +bool IsRedundantMov(instruction ins, emitAttr size, regNumber dst, regNumber src); + /************************************************************************ * * This union is used to to encode/decode the special ARM64 immediate values @@ -310,13 +316,13 @@ static code_t insEncodeElemsize(emitAttr size); // Returns the encoding to select the 4/8 byte elemsize for an Arm64 float vector instruction static code_t insEncodeFloatElemsize(emitAttr size); -// Returns the encoding to select the index for an Arm64 float vector by elem instruction +// Returns the encoding to select the index for an Arm64 float vector by element instruction static code_t insEncodeFloatIndex(emitAttr elemsize, ssize_t index); // Returns the encoding to select the vector elemsize for an Arm64 ld/st# vector instruction static code_t insEncodeVLSElemsize(emitAttr size); -// Returns the encoding to select the index for an Arm64 ld/st# vector by elem instruction +// Returns the encoding to select the index for an Arm64 ld/st# vector by element instruction static code_t insEncodeVLSIndex(emitAttr elemsize, ssize_t index); // Returns the encoding to select the 'conversion' operation for a type 'fmt' Arm64 instruction @@ -436,8 +442,11 @@ static emitAttr optGetDatasize(insOpts arrangement); // For the given 'arrangement' returns the 'elemsize' specified by the vector register arrangement static emitAttr optGetElemsize(insOpts arrangement); -// For the given 'arrangement' returns the 'widen-arrangement' specified by the vector register arrangement -static insOpts optWidenElemsize(insOpts arrangement); +// For the given 'arrangement' returns the one with the element width that is double that of the 'arrangement' element. +static insOpts optWidenElemsizeArrangement(insOpts arrangement); + +// For the given 'datasize' returns the one that is double that of the 'datasize'. +static emitAttr widenDatasize(emitAttr datasize); // For the given 'srcArrangement' returns the "widen" 'dstArrangement' specifying the destination vector register // arrangement @@ -810,7 +819,10 @@ void emitIns_I_AR(instruction ins, emitAttr attr, int val, regNumber reg, int of void emitIns_R_AR(instruction ins, emitAttr attr, regNumber ireg, regNumber reg, int offs); -void emitIns_R_AI(instruction ins, emitAttr attr, regNumber ireg, ssize_t disp); +void emitIns_R_AI(instruction ins, + emitAttr attr, + regNumber ireg, + ssize_t disp DEBUGARG(size_t targetHandle = 0) DEBUGARG(unsigned gtFlags = 0)); void emitIns_AR_R(instruction ins, emitAttr attr, regNumber ireg, regNumber reg, int offs); diff --git a/src/coreclr/src/jit/emitdef.h b/src/coreclr/src/jit/emitdef.h index d148705dd16c..c9f003ccce1b 100644 --- a/src/coreclr/src/jit/emitdef.h +++ b/src/coreclr/src/jit/emitdef.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*****************************************************************************/ #ifndef _EMITDEF_H_ diff --git a/src/coreclr/src/jit/emitfmts.h b/src/coreclr/src/jit/emitfmts.h index db42ef16993a..c252c0b1237d 100644 --- a/src/coreclr/src/jit/emitfmts.h +++ b/src/coreclr/src/jit/emitfmts.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. ////////////////////////////////////////////////////////////////////////////// #if defined(TARGET_XARCH) diff --git a/src/coreclr/src/jit/emitfmtsarm.h b/src/coreclr/src/jit/emitfmtsarm.h index 36c480571d23..a5c97364e64d 100644 --- a/src/coreclr/src/jit/emitfmtsarm.h +++ b/src/coreclr/src/jit/emitfmtsarm.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. ////////////////////////////////////////////////////////////////////////////// // clang-format off diff --git a/src/coreclr/src/jit/emitfmtsarm64.h b/src/coreclr/src/jit/emitfmtsarm64.h index c39f85d99ae6..05d7d2c83d08 100644 --- a/src/coreclr/src/jit/emitfmtsarm64.h +++ b/src/coreclr/src/jit/emitfmtsarm64.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. ////////////////////////////////////////////////////////////////////////////// // clang-format off @@ -61,7 +60,8 @@ IF_DEF(EN4F, IS_NONE, NONE) // Instruction has 4 possible encoding types, type F IF_DEF(EN4G, IS_NONE, NONE) // Instruction has 4 possible encoding types, type G IF_DEF(EN4H, IS_NONE, NONE) // Instruction has 4 possible encoding types, type H IF_DEF(EN4I, IS_NONE, NONE) // Instruction has 4 possible encoding types, type I -IF_DEF(EN4J, IS_NONE, NONE) // Instruction has 3 possible encoding types, type J +IF_DEF(EN4J, IS_NONE, NONE) // Instruction has 4 possible encoding types, type J +IF_DEF(EN4K, IS_NONE, NONE) // Instruction has 4 possible encoding types, type K IF_DEF(EN3A, IS_NONE, NONE) // Instruction has 3 possible encoding types, type A IF_DEF(EN3B, IS_NONE, NONE) // Instruction has 3 possible encoding types, type B IF_DEF(EN3C, IS_NONE, NONE) // Instruction has 3 possible encoding types, type C @@ -72,7 +72,6 @@ IF_DEF(EN3G, IS_NONE, NONE) // Instruction has 3 possible encoding types, type G IF_DEF(EN3H, IS_NONE, NONE) // Instruction has 3 possible encoding types, type H IF_DEF(EN3I, IS_NONE, NONE) // Instruction has 3 possible encoding types, type I IF_DEF(EN3J, IS_NONE, NONE) // Instruction has 3 possible encoding types, type J -IF_DEF(EN3K, IS_NONE, NONE) // Instruction has 3 possible encoding types, type K IF_DEF(EN2A, IS_NONE, NONE) // Instruction has 2 possible encoding types, type A IF_DEF(EN2B, IS_NONE, NONE) // Instruction has 2 possible encoding types, type B IF_DEF(EN2C, IS_NONE, NONE) // Instruction has 2 possible encoding types, type C @@ -90,7 +89,6 @@ IF_DEF(EN2N, IS_NONE, NONE) // Instruction has 2 possible encoding types, type N IF_DEF(EN2O, IS_NONE, NONE) // Instruction has 2 possible encoding types, type O IF_DEF(EN2P, IS_NONE, NONE) // Instruction has 2 possible encoding types, type P IF_DEF(EN2Q, IS_NONE, NONE) // Instruction has 2 possible encoding types, type Q -IF_DEF(EN2R, IS_NONE, NONE) // Instruction has 2 possible encoding types, type R ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // @@ -121,7 +119,7 @@ IF_DEF(EN2R, IS_NONE, NONE) // Instruction has 2 possible encoding types, type R // # :: number of registers in the encoding // ? :: A unique letter A,B,C,... // -- optional third character -// I :: by elem immediate +// I :: by element immediate // ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -211,17 +209,16 @@ IF_DEF(DV_2T, IS_NONE, NONE) // DV_2T .Q......XX...... ......nnnnnddddd S IF_DEF(DV_2U, IS_NONE, NONE) // DV_2U ................ ......nnnnnddddd Sd Sn (sha1h) IF_DEF(DV_3A, IS_NONE, NONE) // DV_3A .Q......XX.mmmmm ......nnnnnddddd Vd Vn Vm (vector) -IF_DEF(DV_3AI, IS_NONE, NONE) // DV_3AI .Q......XXLMmmmm ....H.nnnnnddddd Vd Vn Vm[] (vector by elem) +IF_DEF(DV_3AI, IS_NONE, NONE) // DV_3AI .Q......XXLMmmmm ....H.nnnnnddddd Vd Vn Vm[] (vector by element) IF_DEF(DV_3B, IS_NONE, NONE) // DV_3B .Q.......X.mmmmm ......nnnnnddddd Vd Vn Vm (vector) -IF_DEF(DV_3BI, IS_NONE, NONE) // DV_3BI .Q.......XLmmmmm ....H.nnnnnddddd Vd Vn Vm[] (vector by elem) +IF_DEF(DV_3BI, IS_NONE, NONE) // DV_3BI .Q.......XLmmmmm ....H.nnnnnddddd Vd Vn Vm[] (vector by element) IF_DEF(DV_3C, IS_NONE, NONE) // DV_3C .Q.........mmmmm ......nnnnnddddd Vd Vn Vm (vector) IF_DEF(DV_3D, IS_NONE, NONE) // DV_3D .........X.mmmmm ......nnnnnddddd Vd Vn Vm (scalar) -IF_DEF(DV_3DI, IS_NONE, NONE) // DV_3DI .........XLmmmmm ....H.nnnnnddddd Vd Vn Vm[] (scalar by elem) +IF_DEF(DV_3DI, IS_NONE, NONE) // DV_3DI .........XLmmmmm ....H.nnnnnddddd Vd Vn Vm[] (scalar by element) IF_DEF(DV_3E, IS_NONE, NONE) // DV_3E ........XX.mmmmm ......nnnnnddddd Vd Vn Vm (scalar) +IF_DEF(DV_3EI, IS_NONE, NONE) // DV_3EI ........XXLMmmmm ....H.nnnnnddddd Vd Vn Vm[] (scalar by element) IF_DEF(DV_3F, IS_NONE, NONE) // DV_3F ...........mmmmm ......nnnnnddddd Qd Sn Vm (Qd used as both source and destination) IF_DEF(DV_3G, IS_NONE, NONE) // DV_3G .Q.........mmmmm .iiii.nnnnnddddd Vd Vn Vm imm (vector) -IF_DEF(DV_3H, IS_NONE, NONE) // DV_3H ........XX.mmmmm ......nnnnnddddd Vd Vn Vm (addhn{2}, raddhn{2}, rsubhn{2}, pmull{2}, smlal{2}, subhn{2}, umlal{2} vector) -IF_DEF(DV_3HI, IS_NONE, NONE) // DV_3HI ........XXLMmmmm ....H.nnnnnddddd Vd Vn Vm[] (smlal{2}, smlsl{2}, smull{2}, umlal{2}, umlsl{2}, umull{2} vector by elem) IF_DEF(DV_4A, IS_NONE, NONE) // DV_4A .........X.mmmmm .aaaaannnnnddddd Vd Vn Vm Va (scalar) diff --git a/src/coreclr/src/jit/emitfmtsxarch.h b/src/coreclr/src/jit/emitfmtsxarch.h index 02a5f190822a..7e90ca3b417d 100644 --- a/src/coreclr/src/jit/emitfmtsxarch.h +++ b/src/coreclr/src/jit/emitfmtsxarch.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. ////////////////////////////////////////////////////////////////////////////// // diff --git a/src/coreclr/src/jit/emitinl.h b/src/coreclr/src/jit/emitinl.h index 82ea2e4f4f8f..484eca3399b4 100644 --- a/src/coreclr/src/jit/emitinl.h +++ b/src/coreclr/src/jit/emitinl.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*****************************************************************************/ #ifndef _EMITINL_H_ diff --git a/src/coreclr/src/jit/emitjmps.h b/src/coreclr/src/jit/emitjmps.h index 363a5f336f3c..4ed340302119 100644 --- a/src/coreclr/src/jit/emitjmps.h +++ b/src/coreclr/src/jit/emitjmps.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // clang-format off #ifndef JMP_SMALL diff --git a/src/coreclr/src/jit/emitpub.h b/src/coreclr/src/jit/emitpub.h index e1f5e80b5295..3134bf54be5c 100644 --- a/src/coreclr/src/jit/emitpub.h +++ b/src/coreclr/src/jit/emitpub.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /************************************************************************/ /* Overall emitter control (including startup and shutdown) */ diff --git a/src/coreclr/src/jit/emitxarch.cpp b/src/coreclr/src/jit/emitxarch.cpp index 0167887f0c91..1321067fef64 100644 --- a/src/coreclr/src/jit/emitxarch.cpp +++ b/src/coreclr/src/jit/emitxarch.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -2944,7 +2943,7 @@ void emitter::spillIntArgRegsToShadowSlots() // void emitter::emitInsLoadInd(instruction ins, emitAttr attr, regNumber dstReg, GenTreeIndir* mem) { - assert(mem->OperIs(GT_IND)); + assert(mem->OperIs(GT_IND, GT_NULLCHECK)); GenTree* addr = mem->Addr(); @@ -2954,10 +2953,15 @@ void emitter::emitInsLoadInd(instruction ins, emitAttr attr, regNumber dstReg, G return; } - if (addr->OperGet() == GT_LCL_VAR_ADDR) + if (addr->OperIs(GT_LCL_VAR_ADDR, GT_LCL_FLD_ADDR)) { GenTreeLclVarCommon* varNode = addr->AsLclVarCommon(); - emitIns_R_S(ins, attr, dstReg, varNode->GetLclNum(), 0); + unsigned offset = 0; + if (addr->OperIs(GT_LCL_FLD_ADDR)) + { + offset = varNode->AsLclFld()->GetLclOffs(); + } + emitIns_R_S(ins, attr, dstReg, varNode->GetLclNum(), offset); // Updating variable liveness after instruction was emitted codeGen->genUpdateLife(varNode); @@ -3006,17 +3010,22 @@ void emitter::emitInsStoreInd(instruction ins, emitAttr attr, GenTreeStoreInd* m return; } - if (addr->OperGet() == GT_LCL_VAR_ADDR) + if (addr->OperIs(GT_LCL_VAR_ADDR, GT_LCL_FLD_ADDR)) { GenTreeLclVarCommon* varNode = addr->AsLclVarCommon(); + unsigned offset = 0; + if (addr->OperIs(GT_LCL_FLD_ADDR)) + { + offset = varNode->AsLclFld()->GetLclOffs(); + } if (data->isContainedIntOrIImmed()) { - emitIns_S_I(ins, attr, varNode->GetLclNum(), 0, (int)data->AsIntConCommon()->IconValue()); + emitIns_S_I(ins, attr, varNode->GetLclNum(), offset, (int)data->AsIntConCommon()->IconValue()); } else { assert(!data->isContained()); - emitIns_S_R(ins, attr, data->GetRegNum(), varNode->GetLclNum(), 0); + emitIns_S_R(ins, attr, data->GetRegNum(), varNode->GetLclNum(), offset); } // Updating variable liveness after instruction was emitted diff --git a/src/coreclr/src/jit/emitxarch.h b/src/coreclr/src/jit/emitxarch.h index 9c380e1451c3..fff3fd017ee7 100644 --- a/src/coreclr/src/jit/emitxarch.h +++ b/src/coreclr/src/jit/emitxarch.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #if defined(TARGET_XARCH) diff --git a/src/coreclr/src/jit/error.cpp b/src/coreclr/src/jit/error.cpp index 90a2a7662236..a77a217893aa 100644 --- a/src/coreclr/src/jit/error.cpp +++ b/src/coreclr/src/jit/error.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/src/coreclr/src/jit/error.h b/src/coreclr/src/jit/error.h index 053586fecca9..082ac2ec394d 100644 --- a/src/coreclr/src/jit/error.h +++ b/src/coreclr/src/jit/error.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*****************************************************************************/ #ifndef _ERROR_H_ diff --git a/src/coreclr/src/jit/flowgraph.cpp b/src/coreclr/src/jit/flowgraph.cpp index 03c7ba605a76..e0b7e630a965 100644 --- a/src/coreclr/src/jit/flowgraph.cpp +++ b/src/coreclr/src/jit/flowgraph.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -89,7 +88,8 @@ void Compiler::fgInit() fgCurBBEpochSize = 0; fgBBSetCountInSizeTUnits = 0; - genReturnBB = nullptr; + genReturnBB = nullptr; + genReturnLocal = BAD_VAR_NUM; /* We haven't reached the global morphing phase */ fgGlobalMorph = false; @@ -3070,6 +3070,14 @@ void Compiler::fgComputePreds() // Treat the initial block as a jump target fgFirstBB->bbFlags |= BBF_JMP_TARGET | BBF_HAS_LABEL; + // Under OSR, we may need to specially protect the original method entry. + // + if (opts.IsOSR() && (fgEntryBB != nullptr) && (fgEntryBB->bbFlags & BBF_IMPORTED)) + { + JITDUMP("OSR: protecting original method entry " FMT_BB "\n", fgEntryBB->bbNum); + fgEntryBB->bbRefs = 1; + } + for (block = fgFirstBB; block; block = block->bbNext) { switch (block->bbJumpKind) @@ -3549,10 +3557,177 @@ void Compiler::fgInitBlockVarSets() fgBBVarSetsInited = true; } +//------------------------------------------------------------------------------ +// fgInsertGCPolls : Insert GC polls for basic blocks containing calls to methods +// with SuppressGCTransitionAttribute. +// +// Notes: +// When not optimizing, the method relies on BBF_HAS_SUPPRESSGC_CALL flag to +// find the basic blocks that require GC polls; when optimizing the tree nodes +// are scanned to find calls to methods with SuppressGCTransitionAttribute. +// +// Returns: +// PhaseStatus indicating what, if anything, was changed. +// + +PhaseStatus Compiler::fgInsertGCPolls() +{ + PhaseStatus result = PhaseStatus::MODIFIED_NOTHING; + + if ((optMethodFlags & OMF_NEEDS_GCPOLLS) == 0) + { + return result; + } + + bool createdPollBlocks = false; + +#ifdef DEBUG + if (verbose) + { + printf("*************** In fgInsertGCPolls() for %s\n", info.compFullName); + fgDispBasicBlocks(false); + printf("\n"); + } +#endif // DEBUG + + BasicBlock* block; + + // Walk through the blocks and hunt for a block that has needs a GC Poll + for (block = fgFirstBB; block; block = block->bbNext) + { + bool blockNeedsGCPoll = false; + if (opts.OptimizationDisabled()) + { + if ((block->bbFlags & BBF_HAS_SUPPRESSGC_CALL) != 0) + { + blockNeedsGCPoll = true; + } + } + else + { + // When optimizations are enabled, we can't rely on BBF_HAS_SUPPRESSGC_CALL flag: + // the call could've been moved, e.g., hoisted from a loop, CSE'd, etc. + for (Statement* stmt = block->FirstNonPhiDef(); !blockNeedsGCPoll && (stmt != nullptr); + stmt = stmt->GetNextStmt()) + { + if ((stmt->GetRootNode()->gtFlags & GTF_CALL) != 0) + { + for (GenTree* tree = stmt->GetTreeList(); !blockNeedsGCPoll && (tree != nullptr); + tree = tree->gtNext) + { + if (tree->OperGet() == GT_CALL) + { + GenTreeCall* call = tree->AsCall(); + if (call->IsUnmanaged() && call->IsSuppressGCTransition()) + { + blockNeedsGCPoll = true; + } + } + } + } + } + } + + if (!blockNeedsGCPoll) + { + continue; + } + + result = PhaseStatus::MODIFIED_EVERYTHING; + + // This block needs a GC poll. We either just insert a callout or we split the block and inline part of + // the test. + + // If we're doing GCPOLL_CALL, just insert a GT_CALL node before the last node in the block. + CLANG_FORMAT_COMMENT_ANCHOR; + +#ifdef DEBUG + switch (block->bbJumpKind) + { + case BBJ_RETURN: + case BBJ_ALWAYS: + case BBJ_COND: + case BBJ_SWITCH: + case BBJ_NONE: + case BBJ_THROW: + break; + default: + assert(!"Unexpected block kind"); + } +#endif // DEBUG + + GCPollType pollType = GCPOLL_INLINE; + + // We'd like to inset an inline poll. Below is the list of places where we + // can't or don't want to emit an inline poll. Check all of those. If after all of that we still + // have INLINE, then emit an inline check. + + if (opts.OptimizationDisabled()) + { +#ifdef DEBUG + if (verbose) + { + printf("Selecting CALL poll in block " FMT_BB " because of debug/minopts\n", block->bbNum); + } +#endif // DEBUG + + // Don't split blocks and create inlined polls unless we're optimizing. + pollType = GCPOLL_CALL; + } + else if (genReturnBB == block) + { +#ifdef DEBUG + if (verbose) + { + printf("Selecting CALL poll in block " FMT_BB " because it is the single return block\n", block->bbNum); + } +#endif // DEBUG + + // we don't want to split the single return block + pollType = GCPOLL_CALL; + } + else if (BBJ_SWITCH == block->bbJumpKind) + { +#ifdef DEBUG + if (verbose) + { + printf("Selecting CALL poll in block " FMT_BB " because it is a SWITCH block\n", block->bbNum); + } +#endif // DEBUG + + // We don't want to deal with all the outgoing edges of a switch block. + pollType = GCPOLL_CALL; + } + + BasicBlock* curBasicBlock = fgCreateGCPoll(pollType, block); + createdPollBlocks |= (block != curBasicBlock); + block = curBasicBlock; + } + + // If we split a block to create a GC Poll, then rerun fgReorderBlocks to push the rarely run blocks out + // past the epilog. We should never split blocks unless we're optimizing. + if (createdPollBlocks) + { + noway_assert(opts.OptimizationEnabled()); + fgReorderBlocks(); + fgUpdateChangedFlowGraph(); + } +#ifdef DEBUG + if (verbose) + { + printf("*************** After fgInsertGCPolls()\n"); + fgDispBasicBlocks(true); + } +#endif // DEBUG + + return result; +} + /***************************************************************************** * * The following does the final pass on BBF_NEEDS_GCPOLL and then actually creates the GC Polls. */ + void Compiler::fgCreateGCPolls() { if (GCPOLL_NONE == opts.compGCPollType) @@ -3824,7 +3999,8 @@ void Compiler::fgCreateGCPolls() // TODO-Cleanup: potentially don't split if we're in an EH region. - createdPollBlocks |= fgCreateGCPoll(pollType, block); + BasicBlock* curBasicBlock = fgCreateGCPoll(pollType, block); + createdPollBlocks |= (block != curBasicBlock); } // If we split a block to create a GC Poll, then rerun fgReorderBlocks to push the rarely run blocks out @@ -3844,13 +4020,18 @@ void Compiler::fgCreateGCPolls() #endif // DEBUG } -/***************************************************************************** - * - * Actually create a GCPoll in the given block. Returns true if it created - * a basic block. - */ +//------------------------------------------------------------------------------ +// fgCreateGCPoll : Insert a GC poll of the specified type for the given basic block. +// +// Arguments: +// pollType - The type of GC poll to insert +// block - Basic block to insert the poll for +// +// Return Value: +// If new basic blocks are inserted, the last inserted block; otherwise, the input block. +// -bool Compiler::fgCreateGCPoll(GCPollType pollType, BasicBlock* block, Statement* stmt) +BasicBlock* Compiler::fgCreateGCPoll(GCPollType pollType, BasicBlock* block) { bool createdPollBlocks; @@ -3865,51 +4046,26 @@ bool Compiler::fgCreateGCPoll(GCPollType pollType, BasicBlock* block, Statement* pollType = GCPOLL_CALL; } -#ifdef DEBUG - // If a statment was supplied it should be contained in the block. - if (stmt != nullptr) - { - bool containsStmt = false; - for (Statement* stmtMaybe : block->Statements()) - { - containsStmt = (stmtMaybe == stmt); - if (containsStmt) - { - break; - } - } - - assert(containsStmt); - } -#endif // Create the GC_CALL node GenTree* call = gtNewHelperCallNode(CORINFO_HELP_POLL_GC, TYP_VOID); call = fgMorphCall(call->AsCall()); gtSetEvalOrder(call); + BasicBlock* bottom = nullptr; + if (pollType == GCPOLL_CALL) { createdPollBlocks = false; - if (stmt != nullptr) - { - // The GC_POLL should be inserted relative to the supplied statement. The safer - // location for the insertion is prior to the current statement since the supplied - // statement could be a GT_JTRUE (see fgNewStmtNearEnd() for more details). - Statement* newStmt = gtNewStmt(call); - - // Set the GC_POLL statement to have the same IL offset at the subsequent one. - newStmt->SetILOffsetX(stmt->GetILOffsetX()); - fgInsertStmtBefore(block, stmt, newStmt); - } - else if (block->bbJumpKind == BBJ_ALWAYS) + Statement* newStmt = nullptr; + if (block->bbJumpKind == BBJ_ALWAYS) { // for BBJ_ALWAYS I don't need to insert it before the condition. Just append it. - fgNewStmtAtEnd(block, call); + newStmt = fgNewStmtAtEnd(block, call); } else { - Statement* newStmt = fgNewStmtNearEnd(block, call); + newStmt = fgNewStmtNearEnd(block, call); // For DDB156656, we need to associate the GC Poll with the IL offset (and therefore sequence // point) of the tree before which we inserted the poll. One example of when this is a // problem: @@ -3937,6 +4093,12 @@ bool Compiler::fgCreateGCPoll(GCPollType pollType, BasicBlock* block, Statement* } } + if (fgStmtListThreaded) + { + gtSetStmtInfo(newStmt); + fgSetStmtSeq(newStmt); + } + block->bbFlags |= BBF_GC_SAFE_POINT; #ifdef DEBUG if (verbose) @@ -3966,8 +4128,8 @@ bool Compiler::fgCreateGCPoll(GCPollType pollType, BasicBlock* block, Statement* lpIndexFallThrough = topFallThrough->bbNatLoopNum; } - BasicBlock* poll = fgNewBBafter(BBJ_NONE, top, true); - BasicBlock* bottom = fgNewBBafter(top->bbJumpKind, poll, true); + BasicBlock* poll = fgNewBBafter(BBJ_NONE, top, true); + bottom = fgNewBBafter(top->bbJumpKind, poll, true); BBjumpKinds oldJumpKind = top->bbJumpKind; unsigned char lpIndex = top->bbNatLoopNum; @@ -4002,12 +4164,16 @@ bool Compiler::fgCreateGCPoll(GCPollType pollType, BasicBlock* block, Statement* } // Add the GC_CALL node to Poll. - fgNewStmtAtEnd(poll, call); + Statement* pollStmt = fgNewStmtAtEnd(poll, call); + if (fgStmtListThreaded) + { + gtSetStmtInfo(pollStmt); + fgSetStmtSeq(pollStmt); + } - // Remove the last statement from Top and add it to Bottom. - if (oldJumpKind != BBJ_ALWAYS) + // Remove the last statement from Top and add it to Bottom if necessary. + if ((oldJumpKind == BBJ_COND) || (oldJumpKind == BBJ_RETURN) || (oldJumpKind == BBJ_THROW)) { - // if I'm always jumping to the target, then this is not a condition that needs moving. Statement* stmt = top->firstStmt(); while (stmt->GetNextStmt() != nullptr) { @@ -4055,7 +4221,12 @@ bool Compiler::fgCreateGCPoll(GCPollType pollType, BasicBlock* block, Statement* trapRelop->gtFlags |= GTF_RELOP_JMP_USED | GTF_DONT_CSE; GenTree* trapCheck = gtNewOperNode(GT_JTRUE, TYP_VOID, trapRelop); gtSetEvalOrder(trapCheck); - fgNewStmtAtEnd(top, trapCheck); + Statement* trapCheckStmt = fgNewStmtAtEnd(top, trapCheck); + if (fgStmtListThreaded) + { + gtSetStmtInfo(trapCheckStmt); + fgSetStmtSeq(trapCheckStmt); + } #ifdef DEBUG if (verbose) @@ -4079,10 +4250,10 @@ bool Compiler::fgCreateGCPoll(GCPollType pollType, BasicBlock* block, Statement* switch (oldJumpKind) { case BBJ_NONE: - // nothing to update. This can happen when inserting a GC Poll - // when suppressing a GC transition during an unmanaged call. + fgReplacePred(bottom->bbNext, top, bottom); break; case BBJ_RETURN: + case BBJ_THROW: // no successors break; case BBJ_COND: @@ -4128,7 +4299,7 @@ bool Compiler::fgCreateGCPoll(GCPollType pollType, BasicBlock* block, Statement* #endif // DEBUG } - return createdPollBlocks; + return createdPollBlocks ? bottom : block; } /***************************************************************************** @@ -4878,8 +5049,7 @@ void Compiler::fgFindJumpTargets(const BYTE* codeAddr, IL_OFFSET codeSize, Fixed const bool notLastInstr = (codeAddr < codeEndp - sz); const bool notDebugCode = !opts.compDbgCode; - if (notStruct && notLastInstr && notDebugCode && - impILConsumesAddr(codeAddr + sz, impTokenLookupContextHandle, info.compScopeHnd)) + if (notStruct && notLastInstr && notDebugCode && impILConsumesAddr(codeAddr + sz)) { // We can skip the addrtaken, as next IL instruction consumes // the address. @@ -21216,7 +21386,8 @@ void Compiler::fgDebugCheckBBlist(bool checkBBNum /* = false */, bool checkBBRef assert(block->lastNode()->gtNext == nullptr && (block->lastNode()->gtOper == GT_SWITCH || block->lastNode()->gtOper == GT_SWITCH_TABLE)); } - else if (!(block->bbJumpKind == BBJ_ALWAYS || block->bbJumpKind == BBJ_RETURN)) + else if (!(block->bbJumpKind == BBJ_ALWAYS || block->bbJumpKind == BBJ_RETURN || + block->bbJumpKind == BBJ_NONE || block->bbJumpKind == BBJ_THROW)) { // this block cannot have a poll assert(!(block->bbFlags & BBF_NEEDS_GCPOLL)); @@ -21272,6 +21443,13 @@ void Compiler::fgDebugCheckBBlist(bool checkBBNum /* = false */, bool checkBBRef blockRefs += 1; } + // Under OSR, if we also are keeping the original method entry around, + // mark that as implicitly referenced as well. + if (opts.IsOSR() && (block == fgEntryBB)) + { + blockRefs += 1; + } + /* Check the bbRefs */ if (checkBBRefs) { @@ -23154,19 +23332,6 @@ void Compiler::fgInvokeInlineeCompiler(GenTreeCall* call, InlineResult* inlineRe return; } - if (inlineCandidateInfo->initClassResult & CORINFO_INITCLASS_SPECULATIVE) - { - // we defer the call to initClass() until inlining is completed in case it fails. If inlining succeeds, - // we will call initClass(). - if (!(info.compCompHnd->initClass(nullptr /* field */, fncHandle /* method */, - inlineCandidateInfo->exactContextHnd /* context */) & - CORINFO_INITCLASS_INITIALIZED)) - { - inlineResult->NoteFatal(InlineObservation::CALLEE_CLASS_INIT_FAILURE); - return; - } - } - // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // The inlining attempt cannot be failed starting from this point. // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -23498,6 +23663,8 @@ void Compiler::fgInsertInlineeBlocks(InlineInfo* pInlineInfo) compGSReorderStackLayout |= InlineeCompiler->compGSReorderStackLayout; compHasBackwardJump |= InlineeCompiler->compHasBackwardJump; + lvaGenericsContextInUse |= InlineeCompiler->lvaGenericsContextInUse; + #ifdef FEATURE_SIMD if (InlineeCompiler->usesSIMDTypes()) { @@ -23850,18 +24017,7 @@ Statement* Compiler::fgInlinePrependStatements(InlineInfo* inlineInfo) if (inlineInfo->inlineCandidateInfo->initClassResult & CORINFO_INITCLASS_USE_HELPER) { - CORINFO_CONTEXT_HANDLE exactContext = inlineInfo->inlineCandidateInfo->exactContextHnd; - CORINFO_CLASS_HANDLE exactClass; - - if (((SIZE_T)exactContext & CORINFO_CONTEXTFLAGS_MASK) == CORINFO_CONTEXTFLAGS_CLASS) - { - exactClass = CORINFO_CLASS_HANDLE((SIZE_T)exactContext & ~CORINFO_CONTEXTFLAGS_MASK); - } - else - { - exactClass = info.compCompHnd->getMethodClass( - CORINFO_METHOD_HANDLE((SIZE_T)exactContext & ~CORINFO_CONTEXTFLAGS_MASK)); - } + CORINFO_CLASS_HANDLE exactClass = eeGetClassFromContext(inlineInfo->inlineCandidateInfo->exactContextHnd); tree = fgGetSharedCCtor(exactClass); newStmt = gtNewStmt(tree, callILOffset); diff --git a/src/coreclr/src/jit/gcdecode.cpp b/src/coreclr/src/jit/gcdecode.cpp index 0722917490f5..1dfa85ddfd44 100644 --- a/src/coreclr/src/jit/gcdecode.cpp +++ b/src/coreclr/src/jit/gcdecode.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "jitpch.h" #ifdef _MSC_VER diff --git a/src/coreclr/src/jit/gcencode.cpp b/src/coreclr/src/jit/gcencode.cpp index a346b9fd1ab2..3c45137b0593 100644 --- a/src/coreclr/src/jit/gcencode.cpp +++ b/src/coreclr/src/jit/gcencode.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/src/coreclr/src/jit/gcinfo.cpp b/src/coreclr/src/jit/gcinfo.cpp index 450475d42274..a27c41c50e63 100644 --- a/src/coreclr/src/jit/gcinfo.cpp +++ b/src/coreclr/src/jit/gcinfo.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/src/coreclr/src/jit/gentree.cpp b/src/coreclr/src/jit/gentree.cpp index 363d1dc99d7b..98bea0eabc9c 100644 --- a/src/coreclr/src/jit/gentree.cpp +++ b/src/coreclr/src/jit/gentree.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -616,10 +615,6 @@ void GenTree::CopyReg(GenTree* from) // GT_COPY/GT_RELOAD is considered having a reg if it // has a reg assigned to any of its positions. // -// Assumption: -// In order for this to work properly, gtClearReg must be called -// prior to setting the register value. -// bool GenTree::gtHasReg() const { bool hasReg = false; @@ -746,7 +741,6 @@ regMaskTP GenTree::gtGetRegMask() const if (IsMultiRegCall()) { - // temporarily cast away const-ness as AsCall() method is not declared const resultMask = genRegMask(GetRegNum()); resultMask |= AsCall()->GetOtherRegMask(); } @@ -5922,17 +5916,26 @@ GenTree* Compiler::gtNewStringLiteralNode(InfoAccessType iat, void* pValue) case IAT_VALUE: // constructStringLiteral in CoreRT case can return IAT_VALUE tree = gtNewIconEmbHndNode(pValue, nullptr, GTF_ICON_STR_HDL, nullptr); tree->gtType = TYP_REF; - tree = gtNewOperNode(GT_NOP, TYP_REF, tree); // prevents constant folding +#ifdef DEBUG + tree->AsIntCon()->gtTargetHandle = (size_t)pValue; +#endif + tree = gtNewOperNode(GT_NOP, TYP_REF, tree); // prevents constant folding break; case IAT_PVALUE: // The value needs to be accessed via an indirection // Create an indirection tree = gtNewIndOfIconHandleNode(TYP_REF, (size_t)pValue, GTF_ICON_STR_HDL, false); +#ifdef DEBUG + tree->gtGetOp1()->AsIntCon()->gtTargetHandle = (size_t)pValue; +#endif break; case IAT_PPVALUE: // The value needs to be accessed via a double indirection // Create the first indirection tree = gtNewIndOfIconHandleNode(TYP_I_IMPL, (size_t)pValue, GTF_ICON_PSTR_HDL, true); +#ifdef DEBUG + tree->gtGetOp1()->AsIntCon()->gtTargetHandle = (size_t)pValue; +#endif // Create the second indirection tree = gtNewOperNode(GT_IND, TYP_REF, tree); @@ -6059,40 +6062,6 @@ GenTree* Compiler::gtNewSIMDVectorZero(var_types simdType, var_types baseType, u initVal->gtType = baseType; return gtNewSIMDNode(simdType, initVal, nullptr, SIMDIntrinsicInit, baseType, size); } - -//--------------------------------------------------------------------- -// gtNewSIMDVectorOne: create a GT_SIMD node for Vector.One -// -// Arguments: -// simdType - simd vector type -// baseType - element type of vector -// size - size of vector in bytes -GenTree* Compiler::gtNewSIMDVectorOne(var_types simdType, var_types baseType, unsigned size) -{ - GenTree* initVal; - if (varTypeIsSmallInt(baseType)) - { - unsigned baseSize = genTypeSize(baseType); - int val; - if (baseSize == 1) - { - val = 0x01010101; - } - else - { - val = 0x00010001; - } - initVal = gtNewIconNode(val); - } - else - { - initVal = gtNewOneConNode(baseType); - } - - baseType = genActualType(baseType); - initVal->gtType = baseType; - return gtNewSIMDNode(simdType, initVal, nullptr, SIMDIntrinsicInit, baseType, size); -} #endif // FEATURE_SIMD GenTreeCall* Compiler::gtNewIndCallNode(GenTree* addr, var_types type, GenTreeCall::Use* args, IL_OFFSETX ilOffset) @@ -6263,7 +6232,7 @@ GenTreeLclFld* Compiler::gtNewLclFldNode(unsigned lnum, var_types type, unsigned return node; } -GenTree* Compiler::gtNewInlineCandidateReturnExpr(GenTree* inlineCandidate, var_types type) +GenTree* Compiler::gtNewInlineCandidateReturnExpr(GenTree* inlineCandidate, var_types type, unsigned __int64 bbFlags) { assert(GenTree::s_gtNodeSizes[GT_RET_EXPR] == TREE_NODE_SZ_LARGE); @@ -6271,7 +6240,7 @@ GenTree* Compiler::gtNewInlineCandidateReturnExpr(GenTree* inlineCandidate, var_ node->gtInlineCandidate = inlineCandidate; - node->bbFlags = 0; + node->bbFlags = bbFlags; if (varTypeIsStruct(inlineCandidate) && !inlineCandidate->OperIsBlkOp()) { @@ -6701,6 +6670,173 @@ void GenTreeIntCon::FixupInitBlkValue(var_types asgType) } } +//---------------------------------------------------------------------------- +// UsesDivideByConstOptimized: +// returns true if rationalize will use the division by constant +// optimization for this node. +// +// Arguments: +// this - a GenTreeOp node +// comp - the compiler instance +// +// Return Value: +// Return true iff the node is a GT_DIV,GT_UDIV, GT_MOD or GT_UMOD with +// an integer constant and we can perform the division operation using +// a reciprocal multiply or a shift operation. +// +bool GenTreeOp::UsesDivideByConstOptimized(Compiler* comp) +{ + if (!comp->opts.OptimizationEnabled()) + { + return false; + } + + if (!OperIs(GT_DIV, GT_MOD, GT_UDIV, GT_UMOD)) + { + return false; + } +#if defined(TARGET_ARM64) + if (OperIs(GT_MOD, GT_UMOD)) + { + // MOD, UMOD not supported for ARM64 + return false; + } +#endif // TARGET_ARM64 + + bool isSignedDivide = OperIs(GT_DIV, GT_MOD); + GenTree* dividend = gtGetOp1()->gtEffectiveVal(/*commaOnly*/ true); + GenTree* divisor = gtGetOp2()->gtEffectiveVal(/*commaOnly*/ true); + +#if !defined(TARGET_64BIT) + if (dividend->OperIs(GT_LONG)) + { + return false; + } +#endif + + if (dividend->IsCnsIntOrI()) + { + // We shouldn't see a divmod with constant operands here but if we do then it's likely + // because optimizations are disabled or it's a case that's supposed to throw an exception. + // Don't optimize this. + return false; + } + + ssize_t divisorValue; + if (divisor->IsCnsIntOrI()) + { + divisorValue = static_cast(divisor->AsIntCon()->IconValue()); + } + else + { + ValueNum vn = divisor->gtVNPair.GetLiberal(); + if (comp->vnStore->IsVNConstant(vn)) + { + divisorValue = comp->vnStore->CoercedConstantValue(vn); + } + else + { + return false; + } + } + + const var_types divType = TypeGet(); + + if (divisorValue == 0) + { + // x / 0 and x % 0 can't be optimized because they are required to throw an exception. + return false; + } + else if (isSignedDivide) + { + if (divisorValue == -1) + { + // x / -1 can't be optimized because INT_MIN / -1 is required to throw an exception. + return false; + } + else if (isPow2(divisorValue)) + { + return true; + } + } + else // unsigned divide + { + if (divType == TYP_INT) + { + // Clear up the upper 32 bits of the value, they may be set to 1 because constants + // are treated as signed and stored in ssize_t which is 64 bit in size on 64 bit targets. + divisorValue &= UINT32_MAX; + } + + size_t unsignedDivisorValue = (size_t)divisorValue; + if (isPow2(unsignedDivisorValue)) + { + return true; + } + } + + const bool isDiv = OperIs(GT_DIV, GT_UDIV); + + if (isDiv) + { + if (isSignedDivide) + { + // If the divisor is the minimum representable integer value then the result is either 0 or 1 + if ((divType == TYP_INT && divisorValue == INT_MIN) || (divType == TYP_LONG && divisorValue == INT64_MIN)) + { + return true; + } + } + else + { + // If the divisor is greater or equal than 2^(N - 1) then the result is either 0 or 1 + if (((divType == TYP_INT) && (divisorValue > (UINT32_MAX / 2))) || + ((divType == TYP_LONG) && (divisorValue > (UINT64_MAX / 2)))) + { + return true; + } + } + } + +// TODO-ARM-CQ: Currently there's no GT_MULHI for ARM32 +#if defined(TARGET_XARCH) || defined(TARGET_ARM64) + if (!comp->opts.MinOpts() && ((divisorValue >= 3) || !isSignedDivide)) + { + // All checks pass we can perform the division operation using a reciprocal multiply. + return true; + } +#endif + + return false; +} + +//------------------------------------------------------------------------ +// CheckDivideByConstOptimized: +// Checks if we can use the division by constant optimization +// on this node +// and if so sets the flag GTF_DIV_BY_CNS_OPT and +// set GTF_DONT_CSE on the constant node +// +// Arguments: +// this - a GenTreeOp node +// comp - the compiler instance +// +void GenTreeOp::CheckDivideByConstOptimized(Compiler* comp) +{ + if (UsesDivideByConstOptimized(comp)) + { + gtFlags |= GTF_DIV_BY_CNS_OPT; + + // Now set DONT_CSE on the GT_CNS_INT divisor, note that + // with ValueNumbering we can have a non GT_CNS_INT divisior + GenTree* divisor = gtGetOp2()->gtEffectiveVal(/*commaOnly*/ true); + if (divisor->OperIs(GT_CNS_INT)) + { + divisor->gtFlags |= GTF_DONT_CSE; + } + } +} + // //------------------------------------------------------------------------ // gtBlockOpInit: Initializes a BlkOp GenTree @@ -7188,7 +7324,10 @@ GenTree* Compiler::gtCloneExpr( else #endif { - copy = gtNewIconNode(tree->AsIntCon()->gtIconVal, tree->gtType); + copy = gtNewIconNode(tree->AsIntCon()->gtIconVal, tree->gtType); +#ifdef DEBUG + copy->AsIntCon()->gtTargetHandle = tree->AsIntCon()->gtTargetHandle; +#endif copy->AsIntCon()->gtCompileTimeHandle = tree->AsIntCon()->gtCompileTimeHandle; copy->AsIntCon()->gtFieldSeq = tree->AsIntCon()->gtFieldSeq; } @@ -9923,6 +10062,18 @@ void Compiler::gtDispNode(GenTree* tree, IndentStack* indentStack, __in __in_z _ } goto DASH; + case GT_DIV: + case GT_MOD: + case GT_UDIV: + case GT_UMOD: + if (tree->gtFlags & GTF_DIV_BY_CNS_OPT) + { + printf("M"); // We will use a Multiply by reciprical + --msgLength; + break; + } + goto DASH; + case GT_LCL_FLD: case GT_LCL_VAR: case GT_LCL_VAR_ADDR: @@ -10590,16 +10741,30 @@ void Compiler::gtDispConst(GenTree* tree) else if ((tree->AsIntCon()->gtIconVal > -1000) && (tree->AsIntCon()->gtIconVal < 1000)) { printf(" %ld", dspIconVal); -#ifdef TARGET_64BIT } +#ifdef TARGET_64BIT else if ((tree->AsIntCon()->gtIconVal & 0xFFFFFFFF00000000LL) != 0) { - printf(" 0x%llx", dspIconVal); -#endif + if (dspIconVal >= 0) + { + printf(" 0x%llx", dspIconVal); + } + else + { + printf(" -0x%llx", -dspIconVal); + } } +#endif else { - printf(" 0x%X", dspIconVal); + if (dspIconVal >= 0) + { + printf(" 0x%X", dspIconVal); + } + else + { + printf(" -0x%X", -dspIconVal); + } } if (tree->IsIconHandle()) @@ -16568,12 +16733,12 @@ bool GenTree::isContained() const // return true if node is contained and an indir bool GenTree::isContainedIndir() const { - return isIndir() && isContained(); + return OperIsIndir() && isContained(); } bool GenTree::isIndirAddrMode() { - return isIndir() && AsIndir()->Addr()->OperIsAddrMode() && AsIndir()->Addr()->isContained(); + return OperIsIndir() && AsIndir()->Addr()->OperIsAddrMode() && AsIndir()->Addr()->isContained(); } bool GenTree::isIndir() const @@ -17463,18 +17628,7 @@ CORINFO_CLASS_HANDLE Compiler::gtGetClassHandle(GenTree* tree, bool* pIsExact, b if (context != nullptr) { - CORINFO_CLASS_HANDLE exactClass = nullptr; - - if (((size_t)context & CORINFO_CONTEXTFLAGS_MASK) == CORINFO_CONTEXTFLAGS_CLASS) - { - exactClass = (CORINFO_CLASS_HANDLE)((size_t)context & ~CORINFO_CONTEXTFLAGS_MASK); - } - else - { - CORINFO_METHOD_HANDLE exactMethod = - (CORINFO_METHOD_HANDLE)((size_t)context & ~CORINFO_CONTEXTFLAGS_MASK); - exactClass = info.compCompHnd->getMethodClass(exactMethod); - } + CORINFO_CLASS_HANDLE exactClass = eeGetClassFromContext(context); // Grab the signature in this context. CORINFO_SIG_INFO sig; @@ -18475,11 +18629,9 @@ bool GenTree::isCommutativeSIMDIntrinsic() assert(gtOper == GT_SIMD); switch (AsSIMD()->gtSIMDIntrinsicID) { - case SIMDIntrinsicAdd: case SIMDIntrinsicBitwiseAnd: case SIMDIntrinsicBitwiseOr: case SIMDIntrinsicEqual: - case SIMDIntrinsicMul: return true; default: return false; @@ -18642,6 +18794,43 @@ GenTreeHWIntrinsic* Compiler::gtNewSimdHWIntrinsicNode(var_types type, GenTreeHWIntrinsic(type, gtNewArgList(op1, op2, op3, op4), hwIntrinsicID, baseType, size); } +GenTreeHWIntrinsic* Compiler::gtNewSimdCreateBroadcastNode( + var_types type, GenTree* op1, var_types baseType, unsigned size, bool isSimdAsHWIntrinsic) +{ + NamedIntrinsic hwIntrinsicID = NI_Vector128_Create; + +#if defined(TARGET_XARCH) +#if defined(TARGET_X86) + if (varTypeIsLong(baseType) && !op1->IsIntegralConst()) + { + // TODO-XARCH-CQ: It may be beneficial to emit the movq + // instruction, which takes a 64-bit memory address and + // works on 32-bit x86 systems. + unreached(); + } +#endif // TARGET_X86 + + if (size == 32) + { + hwIntrinsicID = NI_Vector256_Create; + } +#elif defined(TARGET_ARM64) + if (size == 8) + { + hwIntrinsicID = NI_Vector64_Create; + } +#else +#error Unsupported platform +#endif // !TARGET_XARCH && !TARGET_ARM64 + + if (isSimdAsHWIntrinsic) + { + return gtNewSimdAsHWIntrinsicNode(type, op1, hwIntrinsicID, baseType, size); + } + + return gtNewSimdHWIntrinsicNode(type, op1, hwIntrinsicID, baseType, size); +} + GenTreeHWIntrinsic* Compiler::gtNewScalarHWIntrinsicNode(var_types type, GenTree* op1, NamedIntrinsic hwIntrinsicID) { SetOpLclRelatedToSIMDIntrinsic(op1); diff --git a/src/coreclr/src/jit/gentree.h b/src/coreclr/src/jit/gentree.h index ce4ccdf91be5..4f61fa7ef75b 100644 --- a/src/coreclr/src/jit/gentree.h +++ b/src/coreclr/src/jit/gentree.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -138,6 +137,20 @@ enum gtCallTypes : BYTE CT_COUNT // fake entry (must be last) }; +#ifdef DEBUG +/***************************************************************************** +* +* TargetHandleTypes are used to determine the type of handle present inside GenTreeIntCon node. +* The values are such that they don't overlap with helper's or user function's handle. +*/ +enum TargetHandleType : BYTE +{ + THT_Unknown = 2, + THT_GSCookieCheck = 4, + THT_SetGSCookie = 6, + THT_IntializeArrayIntrinsics = 8 +}; +#endif /*****************************************************************************/ struct BasicBlock; @@ -550,6 +563,9 @@ struct GenTree bool isIndirAddrMode(); + // This returns true only for GT_IND and GT_STOREIND, and is used in contexts where a "true" + // indirection is expected (i.e. either a load to or a store from a single register). + // OperIsIndir() returns true also for indirection nodes such as GT_BLK, etc. as well as GT_NULLCHECK. bool isIndir() const; bool isContainedIntOrIImmed() const @@ -617,6 +633,12 @@ struct GenTree assert(_gtRegNum == reg); } + void ClearRegNum() + { + _gtRegNum = REG_NA; + INDEBUG(gtRegTag = GT_REGTAG_NONE;) + } + // Copy the _gtRegNum/gtRegTag fields void CopyReg(GenTree* from); bool gtHasReg() const; @@ -766,7 +788,7 @@ struct GenTree //--------------------------------------------------------------------- // NB: GTF_VAR_* and GTF_REG_* share the same namespace of flags. -// These flags are also used by GT_LCL_FLD. +// These flags are also used by GT_LCL_FLD, and the last-use (DEATH) flags are also used by GenTreeCopyOrReload. #define GTF_VAR_DEF 0x80000000 // GT_LCL_VAR -- this is a definition #define GTF_VAR_USEASG 0x40000000 // GT_LCL_VAR -- this is a partial definition, a use of the previous definition is implied // A partial definition usually occurs when a struct field is assigned to (s.f = ...) or @@ -906,6 +928,8 @@ struct GenTree #define GTF_OVERFLOW 0x10000000 // Supported for: GT_ADD, GT_SUB, GT_MUL and GT_CAST. // Requires an overflow check. Use gtOverflow(Ex)() to check this flag. +#define GTF_DIV_BY_CNS_OPT 0x80000000 // GT_DIV -- Uses the division by constant optimization to compute this division + #define GTF_ARR_BOUND_INBND 0x80000000 // GT_ARR_BOUNDS_CHECK -- have proved this check is always in-bounds #define GTF_ARRLEN_ARR_IDX 0x80000000 // GT_ARR_LENGTH -- Length which feeds into an array index expression @@ -1465,6 +1489,9 @@ struct GenTree return OperMayOverflow(gtOper); } + // This returns true only for GT_IND and GT_STOREIND, and is used in contexts where a "true" + // indirection is expected (i.e. either a load to or a store from a single register). + // OperIsIndir() returns true also for indirection nodes such as GT_BLK, etc. as well as GT_NULLCHECK. static bool OperIsIndir(genTreeOps gtOper) { return gtOper == GT_IND || gtOper == GT_STOREIND || gtOper == GT_NULLCHECK || OperIsBlk(gtOper); @@ -1733,6 +1760,16 @@ struct GenTree // Returns the GTF flag equivalent for the regIndex'th register of a multi-reg node. unsigned int GetRegSpillFlagByIdx(int regIndex) const; + // Last-use information for either GenTreeLclVar or GenTreeCopyOrReload nodes. +private: + unsigned int GetLastUseBit(int regIndex); + +public: + bool IsLastUse(int regIndex); + bool HasLastUse(); + void SetLastUse(int regIndex); + void ClearLastUse(int regIndex); + // Returns true if it is a GT_COPY or GT_RELOAD node inline bool IsCopyOrReload() const; @@ -2824,6 +2861,19 @@ struct GenTreeOp : public GenTreeUnOp assert(oper == GT_NOP || oper == GT_RETURN || oper == GT_RETFILT || OperIsBlk(oper)); } + // returns true if we will use the division by constant optimization for this node. + bool UsesDivideByConstOptimized(Compiler* comp); + + // checks if we will use the division by constant optimization this node + // then sets the flag GTF_DIV_BY_CNS_OPT and GTF_DONT_CSE on the constant + void CheckDivideByConstOptimized(Compiler* comp); + + // True if this node is marked as using the division by constant optimization + bool MarkedDivideByConstOptimized() const + { + return (gtFlags & GTF_DIV_BY_CNS_OPT) != 0; + } + #if DEBUGGABLE_GENTREE GenTreeOp() : GenTreeUnOp(), gtOp2(nullptr) { @@ -2943,6 +2993,12 @@ struct GenTreeIntCon : public GenTreeIntConCommon // sequence of fields. FieldSeqNode* gtFieldSeq; +#ifdef DEBUG + // If the value represents target address, holds the method handle to that target which is used + // to fetch target method name and display in the disassembled code. + size_t gtTargetHandle = 0; +#endif + GenTreeIntCon(var_types type, ssize_t value DEBUGARG(bool largeNode = false)) : GenTreeIntConCommon(GT_CNS_INT, type DEBUGARG(largeNode)) , gtIconVal(value) @@ -3230,12 +3286,6 @@ struct GenTreeLclVar : public GenTreeLclVarCommon private: regNumberSmall gtOtherReg[MAX_MULTIREG_COUNT - 1]; MultiRegSpillFlags gtSpillFlags; - unsigned int GetLastUseBit(int regIndex) - { - assert(regIndex < 4); - static_assert_no_msg((1 << MULTIREG_LAST_USE_SHIFT) == GTF_VAR_MULTIREG_DEATH0); - return (1 << (MULTIREG_LAST_USE_SHIFT + regIndex)); - } public: INDEBUG(IL_OFFSET gtLclILoffs;) // instr offset of ref (only for JIT dumps) @@ -3274,26 +3324,6 @@ struct GenTreeLclVar : public GenTreeLclVarCommon } } - bool IsLastUse(int regIndex) - { - return (gtFlags & GetLastUseBit(regIndex)) != 0; - } - - bool HasLastUse() - { - return (gtFlags & (GTF_VAR_DEATH_MASK)) != 0; - } - - void SetLastUse(int regIndex) - { - unsigned int bitToSet = gtFlags |= GetLastUseBit(regIndex); - } - - void ClearLastUse(int regIndex) - { - gtFlags &= ~GetLastUseBit(regIndex); - } - unsigned GetRegSpillFlagByIdx(unsigned idx) const { return GetMultiRegSpillFlagsByIdx(gtSpillFlags, idx); @@ -7088,9 +7118,7 @@ inline bool GenTree::IsMultiRegCall() const { if (this->IsCall()) { - // We cannot use AsCall() as it is not declared const - const GenTreeCall* call = reinterpret_cast(this); - return call->HasMultiRegRetVal(); + return AsCall()->HasMultiRegRetVal(); } return false; @@ -7402,6 +7430,86 @@ inline unsigned int GenTree::GetRegSpillFlagByIdx(int regIndex) const return TYP_UNDEF; } +//----------------------------------------------------------------------------------- +// GetLastUseBit: Get the last use bit for regIndex +// +// Arguments: +// regIndex - the register index +// +// Return Value: +// The bit to set, clear or query for the last-use of the regIndex'th value. +// +// Notes: +// This must be a GenTreeLclVar or GenTreeCopyOrReload node. +// +inline unsigned int GenTree::GetLastUseBit(int regIndex) +{ + assert(regIndex < 4); + assert(OperIs(GT_LCL_VAR, GT_STORE_LCL_VAR, GT_COPY, GT_RELOAD)); + static_assert_no_msg((1 << MULTIREG_LAST_USE_SHIFT) == GTF_VAR_MULTIREG_DEATH0); + return (1 << (MULTIREG_LAST_USE_SHIFT + regIndex)); +} + +//----------------------------------------------------------------------------------- +// IsLastUse: Determine whether this node is a last use of the regIndex'th value +// +// Arguments: +// regIndex - the register index +// +// Return Value: +// true iff this is a last use. +// +// Notes: +// This must be a GenTreeLclVar or GenTreeCopyOrReload node. +// +inline bool GenTree::IsLastUse(int regIndex) +{ + assert(OperIs(GT_LCL_VAR, GT_STORE_LCL_VAR, GT_COPY, GT_RELOAD)); + return (gtFlags & GetLastUseBit(regIndex)) != 0; +} + +//----------------------------------------------------------------------------------- +// IsLastUse: Determine whether this node is a last use of any value +// +// Return Value: +// true iff this has any last uses (i.e. at any index). +// +// Notes: +// This must be a GenTreeLclVar or GenTreeCopyOrReload node. +// +inline bool GenTree::HasLastUse() +{ + return (gtFlags & (GTF_VAR_DEATH_MASK)) != 0; +} + +//----------------------------------------------------------------------------------- +// SetLastUse: Set the last use bit for the given index +// +// Arguments: +// regIndex - the register index +// +// Notes: +// This must be a GenTreeLclVar or GenTreeCopyOrReload node. +// +inline void GenTree::SetLastUse(int regIndex) +{ + unsigned int bitToSet = gtFlags |= GetLastUseBit(regIndex); +} + +//----------------------------------------------------------------------------------- +// ClearLastUse: Clear the last use bit for the given index +// +// Arguments: +// regIndex - the register index +// +// Notes: +// This must be a GenTreeLclVar or GenTreeCopyOrReload node. +// +inline void GenTree::ClearLastUse(int regIndex) +{ + gtFlags &= ~GetLastUseBit(regIndex); +} + //------------------------------------------------------------------------- // IsCopyOrReload: whether this is a GT_COPY or GT_RELOAD node. // diff --git a/src/coreclr/src/jit/gschecks.cpp b/src/coreclr/src/jit/gschecks.cpp index e31998d3b5a4..4022724d36bc 100644 --- a/src/coreclr/src/jit/gschecks.cpp +++ b/src/coreclr/src/jit/gschecks.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/src/coreclr/src/jit/gtlist.h b/src/coreclr/src/jit/gtlist.h index b4e9b82e46fc..640affba218b 100644 --- a/src/coreclr/src/jit/gtlist.h +++ b/src/coreclr/src/jit/gtlist.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // clang-format off /*****************************************************************************/ @@ -283,7 +282,7 @@ GTNODE(SWITCH_TABLE , GenTreeOp ,0, (GTK_BINOP|GTK_NOVALUE)) // Ju GTNODE(CLS_VAR , GenTreeClsVar ,0,GTK_LEAF) // static data member GTNODE(CLS_VAR_ADDR , GenTreeClsVar ,0,GTK_LEAF) // static data member address GTNODE(ARGPLACE , GenTreeArgPlace ,0,GTK_LEAF|GTK_NOVALUE|GTK_NOTLIR) // placeholder for a register arg -GTNODE(NULLCHECK , GenTreeOp ,0,GTK_UNOP|GTK_NOVALUE) // null checks the source +GTNODE(NULLCHECK , GenTreeIndir ,0,GTK_UNOP|GTK_NOVALUE) // null checks the source GTNODE(PHYSREG , GenTreePhysReg ,0,GTK_LEAF) // read from a physical register GTNODE(EMITNOP , GenTree ,0,GTK_LEAF|GTK_NOVALUE) // emitter-placed nop GTNODE(PINVOKE_PROLOG , GenTree ,0,GTK_LEAF|GTK_NOVALUE) // pinvoke prolog seq diff --git a/src/coreclr/src/jit/gtstructs.h b/src/coreclr/src/jit/gtstructs.h index 70c409b3b2e1..b4bad947fd90 100644 --- a/src/coreclr/src/jit/gtstructs.h +++ b/src/coreclr/src/jit/gtstructs.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // clang-format off diff --git a/src/coreclr/src/jit/hashbv.cpp b/src/coreclr/src/jit/hashbv.cpp index 57c93cf08673..5f996a96c222 100644 --- a/src/coreclr/src/jit/hashbv.cpp +++ b/src/coreclr/src/jit/hashbv.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "jitpch.h" #ifdef _MSC_VER diff --git a/src/coreclr/src/jit/hashbv.h b/src/coreclr/src/jit/hashbv.h index 9ebcb247b243..1ee3f35c9263 100644 --- a/src/coreclr/src/jit/hashbv.h +++ b/src/coreclr/src/jit/hashbv.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef HASHBV_H #define HASHBV_H diff --git a/src/coreclr/src/jit/host.h b/src/coreclr/src/jit/host.h index 436c3d1457c1..ea9abdddcc9c 100644 --- a/src/coreclr/src/jit/host.h +++ b/src/coreclr/src/jit/host.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*****************************************************************************/ diff --git a/src/coreclr/src/jit/hostallocator.cpp b/src/coreclr/src/jit/hostallocator.cpp index 112bf1c10738..2e88ebc628c2 100644 --- a/src/coreclr/src/jit/hostallocator.cpp +++ b/src/coreclr/src/jit/hostallocator.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "jitpch.h" #include "hostallocator.h" diff --git a/src/coreclr/src/jit/hostallocator.h b/src/coreclr/src/jit/hostallocator.h index 447fc67eb14d..a91f7f1fb4ab 100644 --- a/src/coreclr/src/jit/hostallocator.h +++ b/src/coreclr/src/jit/hostallocator.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma once diff --git a/src/coreclr/src/jit/hwintrinsic.cpp b/src/coreclr/src/jit/hwintrinsic.cpp index 86de1e44d760..5e7eda61c30d 100644 --- a/src/coreclr/src/jit/hwintrinsic.cpp +++ b/src/coreclr/src/jit/hwintrinsic.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "jitpch.h" #include "hwintrinsic.h" @@ -91,6 +90,10 @@ var_types Compiler::getBaseTypeFromArgIfNeeded(NamedIntrinsic intrinsic, CORINFO_CLASS_HANDLE Compiler::gtGetStructHandleForHWSIMD(var_types simdType, var_types simdBaseType) { + if (m_simdHandleCache == nullptr) + { + return NO_CLASS_HANDLE; + } if (simdType == TYP_SIMD16) { switch (simdBaseType) @@ -483,14 +486,19 @@ bool HWIntrinsicInfo::isImmOp(NamedIntrinsic id, const GenTree* op) // Arguments: // argType -- the required type of argument // argClass -- the class handle of argType -// expectAddr -- if true indicates we are expecting type stack entry to be a TYP_BYREF. +// expectAddr -- if true indicates we are expecting type stack entry to be a TYP_BYREF. +// newobjThis -- For CEE_NEWOBJ, this is the temp grabbed for the allocated uninitalized object. // // Return Value: // the validated argument // -GenTree* Compiler::getArgForHWIntrinsic(var_types argType, CORINFO_CLASS_HANDLE argClass, bool expectAddr) +GenTree* Compiler::getArgForHWIntrinsic(var_types argType, + CORINFO_CLASS_HANDLE argClass, + bool expectAddr, + GenTree* newobjThis) { GenTree* arg = nullptr; + if (varTypeIsStruct(argType)) { if (!varTypeIsSIMD(argType)) @@ -500,16 +508,32 @@ GenTree* Compiler::getArgForHWIntrinsic(var_types argType, CORINFO_CLASS_HANDLE argType = getSIMDTypeForSize(argSizeBytes); } assert(varTypeIsSIMD(argType)); - arg = impSIMDPopStack(argType, expectAddr); - assert(varTypeIsSIMD(arg->TypeGet())); + + if (newobjThis == nullptr) + { + arg = impSIMDPopStack(argType, expectAddr); + assert(varTypeIsSIMD(arg->TypeGet())); + } + else + { + assert((newobjThis->gtOper == GT_ADDR) && (newobjThis->AsOp()->gtOp1->gtOper == GT_LCL_VAR)); + arg = newobjThis; + + // push newobj result on type stack + unsigned tmp = arg->AsOp()->gtOp1->AsLclVarCommon()->GetLclNum(); + impPushOnStack(gtNewLclvNode(tmp, lvaGetRealType(tmp)), verMakeTypeInfo(argClass).NormaliseForStack()); + } } else { assert(varTypeIsArithmetic(argType)); + arg = impPopStack().val; assert(varTypeIsArithmetic(arg->TypeGet())); + assert(genActualType(arg->gtType) == genActualType(argType)); } + return arg; } @@ -803,7 +827,8 @@ GenTree* Compiler::impHWIntrinsic(NamedIntrinsic intrinsic, sigReader.Read(info.compCompHnd, sig); #ifdef TARGET_ARM64 - if ((intrinsic == NI_AdvSimd_Insert) || (intrinsic == NI_AdvSimd_LoadAndInsertScalar)) + if ((intrinsic == NI_AdvSimd_Insert) || (intrinsic == NI_AdvSimd_InsertScalar) || + (intrinsic == NI_AdvSimd_LoadAndInsertScalar)) { assert(sig->numArgs == 3); immOp = impStackTop(1).val; @@ -889,6 +914,14 @@ GenTree* Compiler::impHWIntrinsic(NamedIntrinsic intrinsic, { assert(numArgs == 4); indexedElementBaseType = getBaseTypeAndSizeOfSIMDType(sigReader.op3ClsHnd, &indexedElementSimdSize); + + if (intrinsic == NI_Dp_DotProductBySelectedQuadruplet) + { + assert(((baseType == TYP_INT) && (indexedElementBaseType == TYP_BYTE)) || + ((baseType == TYP_UINT) && (indexedElementBaseType == TYP_UBYTE))); + // The second source operand of sdot, udot instructions is an indexed 32-bit element. + indexedElementBaseType = baseType; + } } assert(indexedElementBaseType == baseType); @@ -1023,6 +1056,11 @@ GenTree* Compiler::impHWIntrinsic(NamedIntrinsic intrinsic, retNode->AsHWIntrinsic()->SetAuxiliaryType(getBaseTypeOfSIMDType(sigReader.op1ClsHnd)); break; + case NI_AdvSimd_Arm64_AddSaturateScalar: + assert(varTypeIsSIMD(op2->TypeGet())); + retNode->AsHWIntrinsic()->SetAuxiliaryType(getBaseTypeOfSIMDType(sigReader.op2ClsHnd)); + break; + default: break; } @@ -1049,7 +1087,7 @@ GenTree* Compiler::impHWIntrinsic(NamedIntrinsic intrinsic, } } } - else if (intrinsic == NI_AdvSimd_Insert) + else if ((intrinsic == NI_AdvSimd_Insert) || (intrinsic == NI_AdvSimd_InsertScalar)) { op2 = addRangeCheckIfNeeded(intrinsic, op2, mustExpand, immLowerBound, immUpperBound); } diff --git a/src/coreclr/src/jit/hwintrinsic.h b/src/coreclr/src/jit/hwintrinsic.h index c20cb0891128..ca527f14076e 100644 --- a/src/coreclr/src/jit/hwintrinsic.h +++ b/src/coreclr/src/jit/hwintrinsic.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _HW_INTRINSIC_H_ #define _HW_INTRINSIC_H_ diff --git a/src/coreclr/src/jit/hwintrinsicarm64.cpp b/src/coreclr/src/jit/hwintrinsicarm64.cpp index b6a7bd8c59df..c572f9bf0888 100644 --- a/src/coreclr/src/jit/hwintrinsicarm64.cpp +++ b/src/coreclr/src/jit/hwintrinsicarm64.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "jitpch.h" #include "hwintrinsic.h" @@ -21,10 +20,20 @@ static CORINFO_InstructionSet Arm64VersionOfIsa(CORINFO_InstructionSet isa) { case InstructionSet_AdvSimd: return InstructionSet_AdvSimd_Arm64; + case InstructionSet_Aes: + return InstructionSet_Aes_Arm64; case InstructionSet_ArmBase: return InstructionSet_ArmBase_Arm64; case InstructionSet_Crc32: return InstructionSet_Crc32_Arm64; + case InstructionSet_Dp: + return InstructionSet_Dp_Arm64; + case InstructionSet_Sha1: + return InstructionSet_Sha1_Arm64; + case InstructionSet_Sha256: + return InstructionSet_Sha256_Arm64; + case InstructionSet_Rdm: + return InstructionSet_Rdm_Arm64; default: return InstructionSet_NONE; } @@ -64,6 +73,20 @@ static CORINFO_InstructionSet lookupInstructionSet(const char* className) return InstructionSet_Crc32; } } + else if (className[0] == 'D') + { + if (strcmp(className, "Dp") == 0) + { + return InstructionSet_Dp; + } + } + else if (className[0] == 'R') + { + if (strcmp(className, "Rdm") == 0) + { + return InstructionSet_Rdm; + } + } else if (className[0] == 'S') { if (strcmp(className, "Sha1") == 0) @@ -130,22 +153,25 @@ bool HWIntrinsicInfo::isFullyImplementedIsa(CORINFO_InstructionSet isa) case InstructionSet_AdvSimd: case InstructionSet_AdvSimd_Arm64: case InstructionSet_Aes: + case InstructionSet_Aes_Arm64: case InstructionSet_ArmBase: case InstructionSet_ArmBase_Arm64: case InstructionSet_Crc32: case InstructionSet_Crc32_Arm64: + case InstructionSet_Dp: + case InstructionSet_Dp_Arm64: + case InstructionSet_Rdm: + case InstructionSet_Rdm_Arm64: case InstructionSet_Sha1: + case InstructionSet_Sha1_Arm64: case InstructionSet_Sha256: + case InstructionSet_Sha256_Arm64: case InstructionSet_Vector64: case InstructionSet_Vector128: - { return true; - } default: - { return false; - } } } @@ -225,6 +251,7 @@ void HWIntrinsicInfo::lookupImmBounds( case NI_AdvSimd_ExtractVector128: case NI_AdvSimd_ExtractVector64: case NI_AdvSimd_Insert: + case NI_AdvSimd_InsertScalar: case NI_AdvSimd_LoadAndInsertScalar: case NI_AdvSimd_StoreSelectedScalar: case NI_AdvSimd_Arm64_DuplicateSelectedScalarToVector128: diff --git a/src/coreclr/src/jit/hwintrinsiccodegenarm64.cpp b/src/coreclr/src/jit/hwintrinsiccodegenarm64.cpp index 50237b66e794..a6b3bf943388 100644 --- a/src/coreclr/src/jit/hwintrinsiccodegenarm64.cpp +++ b/src/coreclr/src/jit/hwintrinsiccodegenarm64.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "jitpch.h" #ifdef _MSC_VER @@ -644,6 +643,27 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node) } break; + case NI_AdvSimd_InsertScalar: + { + assert(isRMW); + assert(targetReg != op3Reg); + + if (targetReg != op1Reg) + { + GetEmitter()->emitIns_R_R(INS_mov, emitTypeSize(node), targetReg, op1Reg); + } + + HWIntrinsicImmOpHelper helper(this, intrin.op2, node); + + for (helper.EmitBegin(); !helper.Done(); helper.EmitCaseEnd()) + { + const int elementIndex = helper.ImmValue(); + + GetEmitter()->emitIns_R_R_I_I(ins, emitSize, targetReg, op3Reg, elementIndex, 0, opt); + } + } + break; + case NI_AdvSimd_Arm64_InsertSelectedScalar: { assert(isRMW); @@ -735,6 +755,24 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node) GetEmitter()->emitIns_R_R_R(ins, emitSize, targetReg, op1Reg, op2Reg, opt); break; + case NI_AdvSimd_Arm64_AddSaturateScalar: + if (varTypeIsUnsigned(node->GetAuxiliaryType()) != varTypeIsUnsigned(intrin.baseType)) + { + ins = varTypeIsUnsigned(intrin.baseType) ? INS_usqadd : INS_suqadd; + + if (targetReg != op1Reg) + { + GetEmitter()->emitIns_R_R(INS_mov, emitTypeSize(node), targetReg, op1Reg); + } + + GetEmitter()->emitIns_R_R(ins, emitSize, targetReg, op2Reg, opt); + } + else + { + GetEmitter()->emitIns_R_R_R(ins, emitSize, targetReg, op1Reg, op2Reg, opt); + } + break; + // mvni doesn't support the range of element types, so hard code the 'opts' value. case NI_Vector64_get_Zero: case NI_Vector64_get_AllBitsSet: @@ -815,6 +853,21 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node) } break; + case NI_AdvSimd_ReverseElement16: + GetEmitter()->emitIns_R_R(ins, emitSize, targetReg, op1Reg, + (emitSize == EA_8BYTE) ? INS_OPTS_4H : INS_OPTS_8H); + break; + + case NI_AdvSimd_ReverseElement32: + GetEmitter()->emitIns_R_R(ins, emitSize, targetReg, op1Reg, + (emitSize == EA_8BYTE) ? INS_OPTS_2S : INS_OPTS_4S); + break; + + case NI_AdvSimd_ReverseElement8: + GetEmitter()->emitIns_R_R(ins, emitSize, targetReg, op1Reg, + (emitSize == EA_8BYTE) ? INS_OPTS_8B : INS_OPTS_16B); + break; + default: unreached(); } diff --git a/src/coreclr/src/jit/hwintrinsiccodegenxarch.cpp b/src/coreclr/src/jit/hwintrinsiccodegenxarch.cpp index cd183a9563e9..574e8c48d15f 100644 --- a/src/coreclr/src/jit/hwintrinsiccodegenxarch.cpp +++ b/src/coreclr/src/jit/hwintrinsiccodegenxarch.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/src/coreclr/src/jit/hwintrinsiclistarm64.h b/src/coreclr/src/jit/hwintrinsiclistarm64.h index 04be7d5c8497..91399e4629f5 100644 --- a/src/coreclr/src/jit/hwintrinsiclistarm64.h +++ b/src/coreclr/src/jit/hwintrinsiclistarm64.h @@ -1,7 +1,5 @@ - // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*****************************************************************************/ #ifndef HARDWARE_INTRINSIC @@ -13,438 +11,588 @@ #ifdef FEATURE_HW_INTRINSICS // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** -// ISA Function name SIMD size Number of arguments Instructions Category Flags -// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} +// ISA Function name SIMD size Number of arguments Instructions Category Flags +// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** // Vector64 Intrinsics -HARDWARE_INTRINSIC(Vector64, As, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector64, AsByte, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector64, AsDouble, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector64, AsInt16, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector64, AsInt32, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector64, AsInt64, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector64, AsSByte, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector64, AsSingle, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector64, AsUInt16, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector64, AsUInt32, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector64, AsUInt64, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector64, Create, 8, -1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_mov, INS_mov, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_NoCodeGen|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector64, CreateScalarUnsafe, 8, 1, {INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_invalid, INS_invalid, INS_fmov, INS_invalid}, HW_Category_SIMD, HW_Flag_SpecialCodeGen|HW_Flag_SupportsContainment) -HARDWARE_INTRINSIC(Vector64, get_AllBitsSet, 8, 0, {INS_mvni, INS_mvni, INS_mvni, INS_mvni, INS_mvni, INS_mvni, INS_mvni, INS_mvni, INS_mvni, INS_mvni}, HW_Category_Helper, HW_Flag_SpecialCodeGen|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector64, get_Count, 8, 0, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_NoCodeGen|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector64, get_Zero, 8, 0, {INS_movi, INS_movi, INS_movi, INS_movi, INS_movi, INS_movi, INS_movi, INS_movi, INS_movi, INS_movi}, HW_Category_Helper, HW_Flag_SpecialCodeGen|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector64, GetElement, 8, 2, {INS_smov, INS_umov, INS_smov, INS_umov, INS_smov, INS_umov, INS_umov, INS_umov, INS_dup, INS_dup}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasImmediateOperand|HW_Flag_NoJmpTableIMM|HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(Vector64, op_Equality, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_NoCodeGen) -HARDWARE_INTRINSIC(Vector64, op_Inequality, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_NoCodeGen) -HARDWARE_INTRINSIC(Vector64, ToScalar, 8, 1, {INS_smov, INS_umov, INS_smov, INS_umov, INS_smov, INS_umov, INS_umov, INS_umov, INS_dup, INS_dup}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(Vector64, ToVector128, 8, 1, {INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov}, HW_Category_SIMD, HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(Vector64, ToVector128Unsafe, 8, 1, {INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov}, HW_Category_SIMD, HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(Vector64, WithElement, 8, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector64, As, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector64, AsByte, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector64, AsDouble, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector64, AsInt16, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector64, AsInt32, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector64, AsInt64, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector64, AsSByte, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector64, AsSingle, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector64, AsUInt16, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector64, AsUInt32, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector64, AsUInt64, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector64, Create, 8, -1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_mov, INS_mov, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_NoCodeGen|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector64, CreateScalarUnsafe, 8, 1, {INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_invalid, INS_invalid, INS_fmov, INS_invalid}, HW_Category_SIMD, HW_Flag_SpecialCodeGen|HW_Flag_SupportsContainment) +HARDWARE_INTRINSIC(Vector64, Dot, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_NoCodeGen) +HARDWARE_INTRINSIC(Vector64, get_AllBitsSet, 8, 0, {INS_mvni, INS_mvni, INS_mvni, INS_mvni, INS_mvni, INS_mvni, INS_mvni, INS_mvni, INS_mvni, INS_mvni}, HW_Category_Helper, HW_Flag_SpecialCodeGen|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector64, get_Count, 8, 0, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_NoCodeGen|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector64, get_Zero, 8, 0, {INS_movi, INS_movi, INS_movi, INS_movi, INS_movi, INS_movi, INS_movi, INS_movi, INS_movi, INS_movi}, HW_Category_Helper, HW_Flag_SpecialCodeGen|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector64, GetElement, 8, 2, {INS_smov, INS_umov, INS_smov, INS_umov, INS_smov, INS_umov, INS_umov, INS_umov, INS_dup, INS_dup}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasImmediateOperand|HW_Flag_NoJmpTableIMM|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(Vector64, op_Equality, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_NoCodeGen) +HARDWARE_INTRINSIC(Vector64, op_Inequality, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_NoCodeGen) +HARDWARE_INTRINSIC(Vector64, ToScalar, 8, 1, {INS_smov, INS_umov, INS_smov, INS_umov, INS_smov, INS_umov, INS_umov, INS_umov, INS_dup, INS_dup}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(Vector64, ToVector128, 8, 1, {INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov}, HW_Category_SIMD, HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(Vector64, ToVector128Unsafe, 8, 1, {INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov}, HW_Category_SIMD, HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(Vector64, WithElement, 8, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialImport) // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** -// ISA Function name SIMD size Number of arguments Instructions Category Flags -// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} +// ISA Function name SIMD size Number of arguments Instructions Category Flags +// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** // Vector128 Intrinsics -HARDWARE_INTRINSIC(Vector128, As, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector128, AsByte, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector128, AsDouble, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector128, AsInt16, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector128, AsInt32, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector128, AsInt64, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector128, AsSByte, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector128, AsSingle, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector128, AsUInt16, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector128, AsUInt32, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector128, AsUInt64, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector128, AsVector, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector128, AsVector4, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector128, AsVector128, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector128, Create, 16, -1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_NoCodeGen|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector128, CreateScalarUnsafe, 16, 1, {INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_fmov, INS_fmov}, HW_Category_SIMD, HW_Flag_SpecialCodeGen|HW_Flag_SupportsContainment) -HARDWARE_INTRINSIC(Vector128, get_AllBitsSet, 16, 0, {INS_mvni, INS_mvni, INS_mvni, INS_mvni, INS_mvni, INS_mvni, INS_mvni, INS_mvni, INS_mvni, INS_mvni}, HW_Category_Helper, HW_Flag_SpecialCodeGen|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector128, get_Count, 16, 0, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_NoCodeGen|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector128, get_Zero, 16, 0, {INS_movi, INS_movi, INS_movi, INS_movi, INS_movi, INS_movi, INS_movi, INS_movi, INS_movi, INS_movi}, HW_Category_Helper, HW_Flag_SpecialCodeGen|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector128, GetElement, 16, 2, {INS_smov, INS_umov, INS_smov, INS_umov, INS_smov, INS_umov, INS_umov, INS_umov, INS_dup, INS_dup}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasImmediateOperand|HW_Flag_NoJmpTableIMM|HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(Vector128, GetLower, 16, 1, {INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov}, HW_Category_SIMD, HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(Vector128, GetUpper, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector128, op_Equality, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_NoCodeGen) -HARDWARE_INTRINSIC(Vector128, op_Inequality, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_NoCodeGen) -HARDWARE_INTRINSIC(Vector128, ToScalar, 16, 1, {INS_smov, INS_umov, INS_smov, INS_umov, INS_smov, INS_umov, INS_umov, INS_umov, INS_dup, INS_dup}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(Vector128, WithElement, 16, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector128, As, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector128, AsByte, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector128, AsDouble, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector128, AsInt16, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector128, AsInt32, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector128, AsInt64, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector128, AsSByte, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector128, AsSingle, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector128, AsUInt16, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector128, AsUInt32, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector128, AsUInt64, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector128, AsVector, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector128, AsVector4, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector128, AsVector128, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector128, Create, 16, -1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_NoCodeGen|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector128, CreateScalarUnsafe, 16, 1, {INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_fmov, INS_fmov}, HW_Category_SIMD, HW_Flag_SpecialCodeGen|HW_Flag_SupportsContainment) +HARDWARE_INTRINSIC(Vector128, Dot, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_NoCodeGen) +HARDWARE_INTRINSIC(Vector128, get_AllBitsSet, 16, 0, {INS_mvni, INS_mvni, INS_mvni, INS_mvni, INS_mvni, INS_mvni, INS_mvni, INS_mvni, INS_mvni, INS_mvni}, HW_Category_Helper, HW_Flag_SpecialCodeGen|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector128, get_Count, 16, 0, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_NoCodeGen|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector128, get_Zero, 16, 0, {INS_movi, INS_movi, INS_movi, INS_movi, INS_movi, INS_movi, INS_movi, INS_movi, INS_movi, INS_movi}, HW_Category_Helper, HW_Flag_SpecialCodeGen|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector128, GetElement, 16, 2, {INS_smov, INS_umov, INS_smov, INS_umov, INS_smov, INS_umov, INS_umov, INS_umov, INS_dup, INS_dup}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasImmediateOperand|HW_Flag_NoJmpTableIMM|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(Vector128, GetLower, 16, 1, {INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov}, HW_Category_SIMD, HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(Vector128, GetUpper, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialImport) +HARDWARE_INTRINSIC(Vector128, op_Equality, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_NoCodeGen) +HARDWARE_INTRINSIC(Vector128, op_Inequality, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_NoCodeGen) +HARDWARE_INTRINSIC(Vector128, ToScalar, 16, 1, {INS_smov, INS_umov, INS_smov, INS_umov, INS_smov, INS_umov, INS_umov, INS_umov, INS_dup, INS_dup}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(Vector128, WithElement, 16, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialImport) // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** -// ISA Function name SIMD size Number of arguments Instructions Category Flags -// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} +// ISA Function name SIMD size Number of arguments Instructions Category Flags +// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** // AdvSimd Intrinsics -HARDWARE_INTRINSIC(AdvSimd, Abs, -1, 1, {INS_abs, INS_invalid, INS_abs, INS_invalid, INS_abs, INS_invalid, INS_invalid, INS_invalid, INS_fabs, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(AdvSimd, AbsScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fabs, INS_fabs}, HW_Category_SIMD, HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd, AbsoluteCompareGreaterThan, -1, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_facgt, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, AbsoluteCompareGreaterThanOrEqual, -1, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_facge, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, AbsoluteCompareLessThan, -1, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_facgt, INS_invalid}, HW_Category_SIMD, HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(AdvSimd, AbsoluteCompareLessThanOrEqual, -1, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_facge, INS_invalid}, HW_Category_SIMD, HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(AdvSimd, AbsoluteDifference, -1, 2, {INS_sabd, INS_uabd, INS_sabd, INS_uabd, INS_sabd, INS_uabd, INS_invalid, INS_invalid, INS_fabd, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd, AbsoluteDifferenceAdd, -1, 3, {INS_saba, INS_uaba, INS_saba, INS_uaba, INS_saba, INS_uaba, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, AbsoluteDifferenceWideningLower, 8, 2, {INS_sabdl, INS_uabdl, INS_sabdl, INS_uabdl, INS_sabdl, INS_uabdl, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd, AbsoluteDifferenceWideningLowerAndAdd, 8, 3, {INS_sabal, INS_uabal, INS_sabal, INS_uabal, INS_sabal, INS_uabal, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, AbsoluteDifferenceWideningUpper, 16, 2, {INS_sabdl2, INS_uabdl2, INS_sabdl2, INS_uabdl2, INS_sabdl2, INS_uabdl2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd, AbsoluteDifferenceWideningUpperAndAdd, 16, 3, {INS_sabal2, INS_uabal2, INS_sabal2, INS_uabal2, INS_sabal2, INS_uabal2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, Add, -1, 2, {INS_add, INS_add, INS_add, INS_add, INS_add, INS_add, INS_add, INS_add, INS_fadd, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd, AddHighNarrowingLower, 8, 2, {INS_addhn, INS_addhn, INS_addhn, INS_addhn, INS_addhn, INS_addhn, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd, AddHighNarrowingUpper, 16, 3, {INS_addhn2, INS_addhn2, INS_addhn2, INS_addhn2, INS_addhn2, INS_addhn2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, AddPairwise, 8, 2, {INS_addp, INS_addp, INS_addp, INS_addp, INS_addp, INS_addp, INS_invalid, INS_invalid, INS_faddp, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, AddPairwiseWidening, -1, 1, {INS_saddlp, INS_uaddlp, INS_saddlp, INS_uaddlp, INS_saddlp, INS_uaddlp, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(AdvSimd, AddPairwiseWideningAndAdd, -1, 2, {INS_sadalp, INS_uadalp, INS_sadalp, INS_uadalp, INS_sadalp, INS_uadalp, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, AddPairwiseWideningAndAddScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sadalp, INS_uadalp, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, AddPairwiseWideningScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_saddlp, INS_uaddlp, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(AdvSimd, AddRoundedHighNarrowingLower, 8, 2, {INS_raddhn, INS_raddhn, INS_raddhn, INS_raddhn, INS_raddhn, INS_raddhn, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd, AddRoundedHighNarrowingUpper, 16, 3, {INS_raddhn2, INS_raddhn2, INS_raddhn2, INS_raddhn2, INS_raddhn2, INS_raddhn2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, AddSaturate, -1, 2, {INS_sqadd, INS_uqadd, INS_sqadd, INS_uqadd, INS_sqadd, INS_uqadd, INS_sqadd, INS_uqadd, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd, AddSaturateScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sqadd, INS_uqadd, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd, AddScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_add, INS_add, INS_fadd, INS_fadd}, HW_Category_SIMD, HW_Flag_Commutative|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd, AddWideningLower, 8, 2, {INS_saddl, INS_uaddl, INS_saddl, INS_uaddl, INS_saddl, INS_uaddl, INS_saddw, INS_uaddw, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromSecondArg|HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(AdvSimd, AddWideningUpper, 16, 2, {INS_saddl2, INS_uaddl2, INS_saddl2, INS_uaddl2, INS_saddl2, INS_uaddl2, INS_saddw2, INS_uaddw2, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromSecondArg|HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(AdvSimd, And, -1, 2, {INS_and, INS_and, INS_and, INS_and, INS_and, INS_and, INS_and, INS_and, INS_and, INS_and}, HW_Category_SIMD, HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd, BitwiseClear, -1, 2, {INS_bic, INS_bic, INS_bic, INS_bic, INS_bic, INS_bic, INS_bic, INS_bic, INS_bic, INS_bic}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, BitwiseSelect, -1, 3, {INS_bsl, INS_bsl, INS_bsl, INS_bsl, INS_bsl, INS_bsl, INS_bsl, INS_bsl, INS_bsl, INS_bsl}, HW_Category_SIMD, HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(AdvSimd, Ceiling, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frintp, INS_frintp}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, CompareEqual, -1, 2, {INS_cmeq, INS_cmeq, INS_cmeq, INS_cmeq, INS_cmeq, INS_cmeq, INS_invalid, INS_invalid, INS_fcmeq, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd, CompareGreaterThan, -1, 2, {INS_cmgt, INS_cmhi, INS_cmgt, INS_cmhi, INS_cmgt, INS_cmhi, INS_invalid, INS_invalid, INS_fcmgt, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, CompareGreaterThanOrEqual, -1, 2, {INS_cmge, INS_cmhs, INS_cmge, INS_cmhs, INS_cmge, INS_cmhs, INS_invalid, INS_invalid, INS_fcmge, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, CompareLessThan, -1, 2, {INS_cmgt, INS_cmhi, INS_cmgt, INS_cmhi, INS_cmgt, INS_cmhi, INS_invalid, INS_invalid, INS_fcmgt, INS_invalid}, HW_Category_SIMD, HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(AdvSimd, CompareLessThanOrEqual, -1, 2, {INS_cmge, INS_cmhs, INS_cmge, INS_cmhs, INS_cmge, INS_cmhs, INS_invalid, INS_invalid, INS_fcmge, INS_invalid}, HW_Category_SIMD, HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(AdvSimd, CompareTest, -1, 2, {INS_cmtst, INS_cmtst, INS_cmtst, INS_cmtst, INS_cmtst, INS_cmtst, INS_invalid, INS_invalid, INS_cmtst, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd, DivideScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fdiv, INS_fdiv}, HW_Category_SIMD, HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd, DuplicateSelectedScalarToVector64, -1, 2, {INS_dup, INS_dup, INS_dup, INS_dup, INS_dup, INS_dup, INS_invalid, INS_invalid, INS_dup, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasImmediateOperand|HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(AdvSimd, DuplicateSelectedScalarToVector128, -1, 2, {INS_dup, INS_dup, INS_dup, INS_dup, INS_dup, INS_dup, INS_invalid, INS_invalid, INS_dup, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasImmediateOperand|HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(AdvSimd, DuplicateToVector64, 8, 1, {INS_dup, INS_dup, INS_dup, INS_dup, INS_dup, INS_dup, INS_invalid, INS_invalid, INS_dup, INS_invalid}, HW_Category_SIMD, HW_Flag_SpecialCodeGen|HW_Flag_SupportsContainment) -HARDWARE_INTRINSIC(AdvSimd, DuplicateToVector128, 16, 1, {INS_dup, INS_dup, INS_dup, INS_dup, INS_dup, INS_dup, INS_invalid, INS_invalid, INS_dup, INS_invalid}, HW_Category_SIMD, HW_Flag_SpecialCodeGen|HW_Flag_SupportsContainment) -HARDWARE_INTRINSIC(AdvSimd, Extract, -1, 2, {INS_smov, INS_umov, INS_smov, INS_umov, INS_smov, INS_umov, INS_umov, INS_umov, INS_dup, INS_dup}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasImmediateOperand|HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(AdvSimd, ExtractNarrowingUpper, 16, 2, {INS_xtn2, INS_xtn2, INS_xtn2, INS_xtn2, INS_xtn2, INS_xtn2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, ExtractNarrowingLower, 8, 1, {INS_xtn, INS_xtn, INS_xtn, INS_xtn, INS_xtn, INS_xtn, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, ExtractVector64, 8, 3, {INS_ext, INS_ext, INS_ext, INS_ext, INS_ext, INS_ext, INS_invalid, INS_invalid, INS_ext, INS_invalid}, HW_Category_SIMD, HW_Flag_HasImmediateOperand|HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(AdvSimd, ExtractVector128, 16, 3, {INS_ext, INS_ext, INS_ext, INS_ext, INS_ext, INS_ext, INS_ext, INS_ext, INS_ext, INS_ext}, HW_Category_SIMD, HW_Flag_HasImmediateOperand|HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(AdvSimd, Floor, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frintm, INS_frintm}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, FusedAddHalving, -1, 2, {INS_shadd, INS_uhadd, INS_shadd, INS_uhadd, INS_shadd, INS_uhadd, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd, FusedAddRoundedHalving, -1, 2, {INS_srhadd, INS_urhadd, INS_srhadd, INS_urhadd, INS_srhadd, INS_urhadd, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd, FusedMultiplyAdd, -1, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmla, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, FusedMultiplyAddScalar, 8, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmadd, INS_fmadd}, HW_Category_SIMD, HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(AdvSimd, FusedMultiplyAddNegatedScalar, 8, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fnmadd, INS_fnmadd}, HW_Category_SIMD, HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(AdvSimd, FusedMultiplySubtract, -1, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmls, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, FusedMultiplySubtractScalar, 8, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmsub, INS_fmsub}, HW_Category_SIMD, HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(AdvSimd, FusedMultiplySubtractNegatedScalar, 8, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fnmsub, INS_fnmsub}, HW_Category_SIMD, HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(AdvSimd, FusedSubtractHalving, -1, 2, {INS_shsub, INS_uhsub, INS_shsub, INS_uhsub, INS_shsub, INS_uhsub, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, Insert, -1, 3, {INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins}, HW_Category_SIMD, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics|HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen|HW_Flag_SupportsContainment) -HARDWARE_INTRINSIC(AdvSimd, LeadingSignCount, -1, 1, {INS_cls, INS_invalid, INS_cls, INS_invalid, INS_cls, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, LeadingZeroCount, -1, 1, {INS_clz, INS_clz, INS_clz, INS_clz, INS_clz, INS_clz, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, LoadAndInsertScalar, -1, 3, {INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1}, HW_Category_MemoryLoad, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics|HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(AdvSimd, LoadAndReplicateToVector64, 8, 1, {INS_ld1r, INS_ld1r, INS_ld1r, INS_ld1r, INS_ld1r, INS_ld1r, INS_invalid, INS_invalid, INS_ld1r, INS_invalid}, HW_Category_MemoryLoad, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, LoadAndReplicateToVector128, 16, 1, {INS_ld1r, INS_ld1r, INS_ld1r, INS_ld1r, INS_ld1r, INS_ld1r, INS_invalid, INS_invalid, INS_ld1r, INS_invalid}, HW_Category_MemoryLoad, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, LoadVector64, 8, 1, {INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1}, HW_Category_MemoryLoad, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, LoadVector128, 16, 1, {INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1}, HW_Category_MemoryLoad, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, Max, -1, 2, {INS_smax, INS_umax, INS_smax, INS_umax, INS_smax, INS_umax, INS_invalid, INS_invalid, INS_fmax, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd, MaxNumber, -1, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmaxnm, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd, MaxNumberScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmaxnm, INS_fmaxnm}, HW_Category_SIMD, HW_Flag_Commutative|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd, MaxPairwise, 8, 2, {INS_smaxp, INS_umaxp, INS_smaxp, INS_umaxp, INS_smaxp, INS_umaxp, INS_invalid, INS_invalid, INS_fmaxp, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, Min, -1, 2, {INS_smin, INS_umin, INS_smin, INS_umin, INS_smin, INS_umin, INS_invalid, INS_invalid, INS_fmin, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd, MinNumber, -1, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fminnm, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd, MinNumberScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fminnm, INS_fminnm}, HW_Category_SIMD, HW_Flag_Commutative|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd, MinPairwise, 8, 2, {INS_sminp, INS_uminp, INS_sminp, INS_uminp, INS_sminp, INS_uminp, INS_invalid, INS_invalid, INS_fminp, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, Multiply, -1, 2, {INS_mul, INS_mul, INS_mul, INS_mul, INS_mul, INS_mul, INS_invalid, INS_invalid, INS_fmul, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd, MultiplyAdd, -1, 3, {INS_mla, INS_mla, INS_mla, INS_mla, INS_mla, INS_mla, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, MultiplyAddByScalar, -1, 3, {INS_invalid, INS_invalid, INS_mla, INS_mla, INS_mla, INS_mla, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, MultiplyAddBySelectedScalar, -1, 4, {INS_invalid, INS_invalid, INS_mla, INS_mla, INS_mla, INS_mla, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, MultiplyByScalar, -1, 2, {INS_invalid, INS_invalid, INS_mul, INS_mul, INS_mul, INS_mul, INS_invalid, INS_invalid, INS_fmul, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, MultiplyBySelectedScalar, -1, 3, {INS_invalid, INS_invalid, INS_mul, INS_mul, INS_mul, INS_mul, INS_invalid, INS_invalid, INS_fmul, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_HasImmediateOperand) -HARDWARE_INTRINSIC(AdvSimd, MultiplyBySelectedScalarWideningLower, 8, 3, {INS_invalid, INS_invalid, INS_smull, INS_umull, INS_smull, INS_umull, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasImmediateOperand) -HARDWARE_INTRINSIC(AdvSimd, MultiplyBySelectedScalarWideningLowerAndAdd, 8, 4, {INS_invalid, INS_invalid, INS_smlal, INS_umlal, INS_smlal, INS_umlal, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, MultiplyBySelectedScalarWideningLowerAndSubtract, 8, 4, {INS_invalid, INS_invalid, INS_smlsl, INS_umlsl, INS_smlsl, INS_umlsl, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, MultiplyBySelectedScalarWideningUpper, 16, 3, {INS_invalid, INS_invalid, INS_smull2, INS_umull2, INS_smull2, INS_umull2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasImmediateOperand) -HARDWARE_INTRINSIC(AdvSimd, MultiplyBySelectedScalarWideningUpperAndAdd, 16, 4, {INS_invalid, INS_invalid, INS_smlal2, INS_umlal2, INS_smlal2, INS_umlal2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, MultiplyBySelectedScalarWideningUpperAndSubtract, 16, 4, {INS_invalid, INS_invalid, INS_smlsl2, INS_umlsl2, INS_smlsl2, INS_umlsl2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, MultiplyScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmul, INS_fmul}, HW_Category_SIMD, HW_Flag_Commutative|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd, MultiplyScalarBySelectedScalar, 8, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmul, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd, MultiplySubtract, -1, 3, {INS_mls, INS_mls, INS_mls, INS_mls, INS_mls, INS_mls, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, MultiplySubtractByScalar, -1, 3, {INS_invalid, INS_invalid, INS_mls, INS_mls, INS_mls, INS_mls, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, MultiplySubtractBySelectedScalar, -1, 4, {INS_invalid, INS_invalid, INS_mls, INS_mls, INS_mls, INS_mls, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, MultiplyWideningLower, 8, 2, {INS_smull, INS_umull, INS_smull, INS_umull, INS_smull, INS_umull, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd, MultiplyWideningLowerAndAdd, 8, 3, {INS_smlal, INS_umlal, INS_smlal, INS_umlal, INS_smlal, INS_umlal, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, MultiplyWideningLowerAndSubtract, 8, 3, {INS_smlsl, INS_umlsl, INS_smlsl, INS_umlsl, INS_smlsl, INS_umlsl, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, MultiplyWideningUpper, 16, 2, {INS_smull2, INS_umull2, INS_smull2, INS_umull2, INS_smull2, INS_umull2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd, MultiplyWideningUpperAndAdd, 16, 3, {INS_smlal2, INS_umlal2, INS_smlal2, INS_umlal2, INS_smlal2, INS_umlal2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, MultiplyWideningUpperAndSubtract, 16, 3, {INS_smlsl2, INS_umlsl2, INS_smlsl2, INS_umlsl2, INS_smlsl2, INS_umlsl2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, Negate, -1, 1, {INS_neg, INS_invalid, INS_neg, INS_invalid, INS_neg, INS_invalid, INS_invalid, INS_invalid, INS_fneg, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, NegateScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fneg, INS_fneg}, HW_Category_SIMD, HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd, Not, -1, 1, {INS_mvn, INS_mvn, INS_mvn, INS_mvn, INS_mvn, INS_mvn, INS_mvn, INS_mvn, INS_mvn, INS_mvn}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, Or, -1, 2, {INS_orr, INS_orr, INS_orr, INS_orr, INS_orr, INS_orr, INS_orr, INS_orr, INS_orr, INS_orr}, HW_Category_SIMD, HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd, OrNot, -1, 2, {INS_orn, INS_orn, INS_orn, INS_orn, INS_orn, INS_orn, INS_orn, INS_orn, INS_orn, INS_orn}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, PolynomialMultiply, -1, 2, {INS_pmul, INS_pmul, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd, PolynomialMultiplyWideningLower, 8, 2, {INS_pmull, INS_pmull, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd, PolynomialMultiplyWideningUpper, 16, 2, {INS_pmull2, INS_pmull2, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd, PopCount, -1, 1, {INS_cnt, INS_cnt, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, ReciprocalEstimate, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_urecpe, INS_invalid, INS_invalid, INS_frecpe, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, ReciprocalSquareRootEstimate, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_ursqrte, INS_invalid, INS_invalid, INS_frsqrte, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, ReciprocalSquareRootStep, -1, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frsqrts, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd, ReciprocalStep, -1, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frecps, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd, ShiftArithmetic, -1, 2, {INS_sshl, INS_invalid, INS_sshl, INS_invalid, INS_sshl, INS_invalid, INS_sshl, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, ShiftArithmeticRounded, -1, 2, {INS_srshl, INS_invalid, INS_srshl, INS_invalid, INS_srshl, INS_invalid, INS_srshl, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, ShiftArithmeticRoundedSaturate, -1, 2, {INS_sqrshl, INS_invalid, INS_sqrshl, INS_invalid, INS_sqrshl, INS_invalid, INS_sqrshl, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, ShiftArithmeticRoundedSaturateScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sqrshl, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd, ShiftArithmeticRoundedScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_srshl, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd, ShiftArithmeticSaturate, -1, 2, {INS_sqshl, INS_invalid, INS_sqshl, INS_invalid, INS_sqshl, INS_invalid, INS_sqshl, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, ShiftArithmeticSaturateScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sqshl, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd, ShiftArithmeticScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sshl, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd, ShiftLeftLogical, -1, 2, {INS_shl, INS_shl, INS_shl, INS_shl, INS_shl, INS_shl, INS_shl, INS_shl, INS_invalid, INS_invalid}, HW_Category_ShiftLeftByImmediate, HW_Flag_HasImmediateOperand) -HARDWARE_INTRINSIC(AdvSimd, ShiftLeftLogicalAndInsert, -1, 3, {INS_sli, INS_sli, INS_sli, INS_sli, INS_sli, INS_sli, INS_sli, INS_sli, INS_sli, INS_sli}, HW_Category_ShiftLeftByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, ShiftLeftLogicalAndInsertScalar, 8, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sli, INS_sli, INS_invalid, INS_invalid}, HW_Category_ShiftLeftByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd, ShiftLeftLogicalSaturate, -1, 2, {INS_sqshl, INS_uqshl, INS_sqshl, INS_uqshl, INS_sqshl, INS_uqshl, INS_sqshl, INS_uqshl, INS_invalid, INS_invalid}, HW_Category_ShiftLeftByImmediate, HW_Flag_HasImmediateOperand) -HARDWARE_INTRINSIC(AdvSimd, ShiftLeftLogicalSaturateScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sqshl, INS_uqshl, INS_invalid, INS_invalid}, HW_Category_ShiftLeftByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd, ShiftLeftLogicalSaturateUnsigned, -1, 2, {INS_sqshlu, INS_invalid, INS_sqshlu, INS_invalid, INS_sqshlu, INS_invalid, INS_sqshlu, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftLeftByImmediate, HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasImmediateOperand) -HARDWARE_INTRINSIC(AdvSimd, ShiftLeftLogicalSaturateUnsignedScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sqshlu, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftLeftByImmediate, HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd, ShiftLeftLogicalScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_shl, INS_shl, INS_invalid, INS_invalid}, HW_Category_ShiftLeftByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd, ShiftLeftLogicalWideningLower, 8, 2, {INS_sshll, INS_ushll, INS_sshll, INS_ushll, INS_sshll, INS_ushll, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftLeftByImmediate, HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasImmediateOperand) -HARDWARE_INTRINSIC(AdvSimd, ShiftLeftLogicalWideningUpper, 16, 2, {INS_sshll2, INS_ushll2, INS_sshll2, INS_ushll2, INS_sshll2, INS_ushll2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftLeftByImmediate, HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasImmediateOperand) -HARDWARE_INTRINSIC(AdvSimd, ShiftLogical, -1, 2, {INS_ushl, INS_ushl, INS_ushl, INS_ushl, INS_ushl, INS_ushl, INS_ushl, INS_ushl, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, ShiftLogicalRounded, -1, 2, {INS_urshl, INS_urshl, INS_urshl, INS_urshl, INS_urshl, INS_urshl, INS_urshl, INS_urshl, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, ShiftLogicalRoundedSaturate, -1, 2, {INS_uqrshl, INS_uqrshl, INS_uqrshl, INS_uqrshl, INS_uqrshl, INS_uqrshl, INS_uqrshl, INS_uqrshl, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, ShiftLogicalRoundedSaturateScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_uqrshl, INS_uqrshl, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd, ShiftLogicalRoundedScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_urshl, INS_urshl, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd, ShiftLogicalSaturate, -1, 2, {INS_uqshl, INS_uqshl, INS_uqshl, INS_uqshl, INS_uqshl, INS_uqshl, INS_uqshl, INS_uqshl, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, ShiftLogicalSaturateScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_uqshl, INS_uqshl, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd, ShiftLogicalScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_ushl, INS_ushl, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd, ShiftRightAndInsert, -1, 3, {INS_sri, INS_sri, INS_sri, INS_sri, INS_sri, INS_sri, INS_sri, INS_sri, INS_sri, INS_sri}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, ShiftRightLogicalAndInsertScalar, 8, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sri, INS_sri, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd, ShiftRightArithmetic, -1, 2, {INS_sshr, INS_invalid, INS_sshr, INS_invalid, INS_sshr, INS_invalid, INS_sshr, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand) -HARDWARE_INTRINSIC(AdvSimd, ShiftRightArithmeticAdd, -1, 3, {INS_ssra, INS_invalid, INS_ssra, INS_invalid, INS_ssra, INS_invalid, INS_ssra, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, ShiftRightArithmeticAddScalar, 8, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_ssra, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd, ShiftRightArithmeticNarrowingSaturateLower, 8, 2, {INS_sqshrn, INS_invalid, INS_sqshrn, INS_invalid, INS_sqshrn, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand) -HARDWARE_INTRINSIC(AdvSimd, ShiftRightArithmeticNarrowingSaturateUnsignedLower, 8, 2, {INS_invalid, INS_sqshrun, INS_invalid, INS_sqshrun, INS_invalid, INS_sqshrun, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand) -HARDWARE_INTRINSIC(AdvSimd, ShiftRightArithmeticNarrowingSaturateUnsignedUpper, 16, 3, {INS_invalid, INS_sqshrun2, INS_invalid, INS_sqshrun2, INS_invalid, INS_sqshrun2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, ShiftRightArithmeticNarrowingSaturateUpper, 16, 3, {INS_sqshrn2, INS_invalid, INS_sqshrn2, INS_invalid, INS_sqshrn2, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, ShiftRightArithmeticRounded, -1, 2, {INS_srshr, INS_invalid, INS_srshr, INS_invalid, INS_srshr, INS_invalid, INS_srshr, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand) -HARDWARE_INTRINSIC(AdvSimd, ShiftRightArithmeticRoundedAdd, -1, 3, {INS_srsra, INS_invalid, INS_srsra, INS_invalid, INS_srsra, INS_invalid, INS_srsra, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, ShiftRightArithmeticRoundedAddScalar, 8, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_srsra, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd, ShiftRightArithmeticRoundedNarrowingSaturateLower, 8, 2, {INS_sqrshrn, INS_invalid, INS_sqrshrn, INS_invalid, INS_sqrshrn, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand) -HARDWARE_INTRINSIC(AdvSimd, ShiftRightArithmeticRoundedNarrowingSaturateUnsignedLower, 8, 2, {INS_invalid, INS_sqrshrun, INS_invalid, INS_sqrshrun, INS_invalid, INS_sqrshrun, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand) -HARDWARE_INTRINSIC(AdvSimd, ShiftRightArithmeticRoundedNarrowingSaturateUnsignedUpper, 16, 3, {INS_invalid, INS_sqrshrun2, INS_invalid, INS_sqrshrun2, INS_invalid, INS_sqrshrun2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, ShiftRightArithmeticRoundedNarrowingSaturateUpper, 16, 3, {INS_sqrshrn2, INS_invalid, INS_sqrshrn2, INS_invalid, INS_sqrshrn2, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, ShiftRightArithmeticRoundedScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_srshr, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd, ShiftRightArithmeticScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sshr, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd, ShiftRightLogical, -1, 2, {INS_ushr, INS_ushr, INS_ushr, INS_ushr, INS_ushr, INS_ushr, INS_ushr, INS_ushr, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand) -HARDWARE_INTRINSIC(AdvSimd, ShiftRightLogicalAdd, -1, 3, {INS_usra, INS_usra, INS_usra, INS_usra, INS_usra, INS_usra, INS_usra, INS_usra, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, ShiftRightLogicalAddScalar, 8, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_usra, INS_usra, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd, ShiftRightLogicalNarrowingLower, 8, 2, {INS_shrn, INS_shrn, INS_shrn, INS_shrn, INS_shrn, INS_shrn, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand) -HARDWARE_INTRINSIC(AdvSimd, ShiftRightLogicalNarrowingSaturateLower, 8, 2, {INS_uqshrn, INS_uqshrn, INS_uqshrn, INS_uqshrn, INS_uqshrn, INS_uqshrn, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand) -HARDWARE_INTRINSIC(AdvSimd, ShiftRightLogicalNarrowingSaturateUpper, 16, 3, {INS_uqshrn2, INS_uqshrn2, INS_uqshrn2, INS_uqshrn2, INS_uqshrn2, INS_uqshrn2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, ShiftRightLogicalNarrowingUpper, 16, 3, {INS_shrn2, INS_shrn2, INS_shrn2, INS_shrn2, INS_shrn2, INS_shrn2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, ShiftRightLogicalRounded, -1, 2, {INS_urshr, INS_urshr, INS_urshr, INS_urshr, INS_urshr, INS_urshr, INS_urshr, INS_urshr, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand) -HARDWARE_INTRINSIC(AdvSimd, ShiftRightLogicalRoundedAdd, -1, 3, {INS_ursra, INS_ursra, INS_ursra, INS_ursra, INS_ursra, INS_ursra, INS_ursra, INS_ursra, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, ShiftRightLogicalRoundedAddScalar, 8, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_ursra, INS_ursra, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd, ShiftRightLogicalRoundedNarrowingLower, 8, 2, {INS_rshrn, INS_rshrn, INS_rshrn, INS_rshrn, INS_rshrn, INS_rshrn, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand) -HARDWARE_INTRINSIC(AdvSimd, ShiftRightLogicalRoundedNarrowingSaturateLower, 8, 2, {INS_uqrshrn, INS_uqrshrn, INS_uqrshrn, INS_uqrshrn, INS_uqrshrn, INS_uqrshrn, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand) -HARDWARE_INTRINSIC(AdvSimd, ShiftRightLogicalRoundedNarrowingSaturateUpper, 16, 3, {INS_uqrshrn2, INS_uqrshrn2, INS_uqrshrn2, INS_uqrshrn2, INS_uqrshrn2, INS_uqrshrn2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, ShiftRightLogicalRoundedNarrowingUpper, 16, 3, {INS_rshrn2, INS_rshrn2, INS_rshrn2, INS_rshrn2, INS_rshrn2, INS_rshrn2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, ShiftRightLogicalRoundedScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_urshr, INS_urshr, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd, ShiftRightLogicalScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_ushr, INS_ushr, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd, SignExtendWideningLower, 8, 1, {INS_sxtl, INS_invalid, INS_sxtl, INS_invalid, INS_sxtl, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(AdvSimd, SignExtendWideningUpper, 16, 1, {INS_sxtl2, INS_invalid, INS_sxtl2, INS_invalid, INS_sxtl2, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(AdvSimd, SqrtScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fsqrt, INS_fsqrt}, HW_Category_SIMD, HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd, Store, -1, 2, {INS_st1, INS_st1, INS_st1, INS_st1, INS_st1, INS_st1, INS_st1, INS_st1, INS_st1, INS_st1}, HW_Category_MemoryStore, HW_Flag_BaseTypeFromSecondArg|HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(AdvSimd, StoreSelectedScalar, -1, 3, {INS_st1, INS_st1, INS_st1, INS_st1, INS_st1, INS_st1, INS_st1, INS_st1, INS_st1, INS_st1}, HW_Category_MemoryStore, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(AdvSimd, Subtract, -1, 2, {INS_sub, INS_sub, INS_sub, INS_sub, INS_sub, INS_sub, INS_sub, INS_sub, INS_fsub, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, SubtractHighNarrowingLower, 8, 2, {INS_subhn, INS_subhn, INS_subhn, INS_subhn, INS_subhn, INS_subhn, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, SubtractHighNarrowingUpper, 16, 3, {INS_subhn2, INS_subhn2, INS_subhn2, INS_subhn2, INS_subhn2, INS_subhn2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, SubtractRoundedHighNarrowingLower, 8, 2, {INS_rsubhn, INS_rsubhn, INS_rsubhn, INS_rsubhn, INS_rsubhn, INS_rsubhn, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, SubtractRoundedHighNarrowingUpper, 16, 3, {INS_rsubhn2, INS_rsubhn2, INS_rsubhn2, INS_rsubhn2, INS_rsubhn2, INS_rsubhn2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, SubtractSaturate, -1, 2, {INS_sqsub, INS_uqsub, INS_sqsub, INS_uqsub, INS_sqsub, INS_uqsub, INS_sqsub, INS_uqsub, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, SubtractSaturateScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sqsub, INS_uqsub, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd, SubtractScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sub, INS_sub, INS_fsub, INS_fsub}, HW_Category_SIMD, HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd, SubtractWideningLower, 8, 2, {INS_ssubl, INS_usubl, INS_ssubl, INS_usubl, INS_ssubl, INS_usubl, INS_ssubw, INS_usubw, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromSecondArg|HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(AdvSimd, SubtractWideningUpper, 16, 2, {INS_ssubl2, INS_usubl2, INS_ssubl2, INS_usubl2, INS_ssubl2, INS_usubl2, INS_ssubw2, INS_usubw2, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromSecondArg|HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(AdvSimd, VectorTableLookup, 8, 2, {INS_tbl, INS_tbl, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd, VectorTableLookupExtension, 8, 3, {INS_tbx, INS_tbx, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd, Xor, -1, 2, {INS_eor, INS_eor, INS_eor, INS_eor, INS_eor, INS_eor, INS_eor, INS_eor, INS_eor, INS_eor}, HW_Category_SIMD, HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd, ZeroExtendWideningLower, 8, 1, {INS_uxtl, INS_uxtl, INS_uxtl, INS_uxtl, INS_uxtl, INS_uxtl, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(AdvSimd, ZeroExtendWideningUpper, 16, 1, {INS_uxtl2, INS_uxtl2, INS_uxtl2, INS_uxtl2, INS_uxtl2, INS_uxtl2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd, Abs, -1, 1, {INS_abs, INS_invalid, INS_abs, INS_invalid, INS_abs, INS_invalid, INS_invalid, INS_invalid, INS_fabs, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd, AbsSaturate, -1, 1, {INS_sqabs, INS_invalid, INS_sqabs, INS_invalid, INS_sqabs, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd, AbsScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fabs, INS_fabs}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, AbsoluteCompareGreaterThan, -1, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_facgt, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, AbsoluteCompareGreaterThanOrEqual, -1, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_facge, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, AbsoluteCompareLessThan, -1, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_facgt, INS_invalid}, HW_Category_SIMD, HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd, AbsoluteCompareLessThanOrEqual, -1, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_facge, INS_invalid}, HW_Category_SIMD, HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd, AbsoluteDifference, -1, 2, {INS_sabd, INS_uabd, INS_sabd, INS_uabd, INS_sabd, INS_uabd, INS_invalid, INS_invalid, INS_fabd, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd, AbsoluteDifferenceAdd, -1, 3, {INS_saba, INS_uaba, INS_saba, INS_uaba, INS_saba, INS_uaba, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, AbsoluteDifferenceWideningLower, 8, 2, {INS_sabdl, INS_uabdl, INS_sabdl, INS_uabdl, INS_sabdl, INS_uabdl, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd, AbsoluteDifferenceWideningLowerAndAdd, 8, 3, {INS_sabal, INS_uabal, INS_sabal, INS_uabal, INS_sabal, INS_uabal, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, AbsoluteDifferenceWideningUpper, 16, 2, {INS_sabdl2, INS_uabdl2, INS_sabdl2, INS_uabdl2, INS_sabdl2, INS_uabdl2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd, AbsoluteDifferenceWideningUpperAndAdd, 16, 3, {INS_sabal2, INS_uabal2, INS_sabal2, INS_uabal2, INS_sabal2, INS_uabal2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, Add, -1, 2, {INS_add, INS_add, INS_add, INS_add, INS_add, INS_add, INS_add, INS_add, INS_fadd, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd, AddHighNarrowingLower, 8, 2, {INS_addhn, INS_addhn, INS_addhn, INS_addhn, INS_addhn, INS_addhn, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd, AddHighNarrowingUpper, 16, 3, {INS_addhn2, INS_addhn2, INS_addhn2, INS_addhn2, INS_addhn2, INS_addhn2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, AddPairwise, 8, 2, {INS_addp, INS_addp, INS_addp, INS_addp, INS_addp, INS_addp, INS_invalid, INS_invalid, INS_faddp, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, AddPairwiseWidening, -1, 1, {INS_saddlp, INS_uaddlp, INS_saddlp, INS_uaddlp, INS_saddlp, INS_uaddlp, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd, AddPairwiseWideningAndAdd, -1, 2, {INS_sadalp, INS_uadalp, INS_sadalp, INS_uadalp, INS_sadalp, INS_uadalp, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, AddPairwiseWideningAndAddScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sadalp, INS_uadalp, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, AddPairwiseWideningScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_saddlp, INS_uaddlp, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd, AddRoundedHighNarrowingLower, 8, 2, {INS_raddhn, INS_raddhn, INS_raddhn, INS_raddhn, INS_raddhn, INS_raddhn, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd, AddRoundedHighNarrowingUpper, 16, 3, {INS_raddhn2, INS_raddhn2, INS_raddhn2, INS_raddhn2, INS_raddhn2, INS_raddhn2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, AddSaturate, -1, 2, {INS_sqadd, INS_uqadd, INS_sqadd, INS_uqadd, INS_sqadd, INS_uqadd, INS_sqadd, INS_uqadd, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd, AddSaturateScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sqadd, INS_uqadd, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, AddScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_add, INS_add, INS_fadd, INS_fadd}, HW_Category_SIMD, HW_Flag_Commutative|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, AddWideningLower, 8, 2, {INS_saddl, INS_uaddl, INS_saddl, INS_uaddl, INS_saddl, INS_uaddl, INS_saddw, INS_uaddw, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromSecondArg|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd, AddWideningUpper, 16, 2, {INS_saddl2, INS_uaddl2, INS_saddl2, INS_uaddl2, INS_saddl2, INS_uaddl2, INS_saddw2, INS_uaddw2, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromSecondArg|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd, And, -1, 2, {INS_and, INS_and, INS_and, INS_and, INS_and, INS_and, INS_and, INS_and, INS_and, INS_and}, HW_Category_SIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd, BitwiseClear, -1, 2, {INS_bic, INS_bic, INS_bic, INS_bic, INS_bic, INS_bic, INS_bic, INS_bic, INS_bic, INS_bic}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, BitwiseSelect, -1, 3, {INS_bsl, INS_bsl, INS_bsl, INS_bsl, INS_bsl, INS_bsl, INS_bsl, INS_bsl, INS_bsl, INS_bsl}, HW_Category_SIMD, HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd, Ceiling, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frintp, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, CeilingScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frintp, INS_frintp}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, CompareEqual, -1, 2, {INS_cmeq, INS_cmeq, INS_cmeq, INS_cmeq, INS_cmeq, INS_cmeq, INS_invalid, INS_invalid, INS_fcmeq, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd, CompareGreaterThan, -1, 2, {INS_cmgt, INS_cmhi, INS_cmgt, INS_cmhi, INS_cmgt, INS_cmhi, INS_invalid, INS_invalid, INS_fcmgt, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, CompareGreaterThanOrEqual, -1, 2, {INS_cmge, INS_cmhs, INS_cmge, INS_cmhs, INS_cmge, INS_cmhs, INS_invalid, INS_invalid, INS_fcmge, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, CompareLessThan, -1, 2, {INS_cmgt, INS_cmhi, INS_cmgt, INS_cmhi, INS_cmgt, INS_cmhi, INS_invalid, INS_invalid, INS_fcmgt, INS_invalid}, HW_Category_SIMD, HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd, CompareLessThanOrEqual, -1, 2, {INS_cmge, INS_cmhs, INS_cmge, INS_cmhs, INS_cmge, INS_cmhs, INS_invalid, INS_invalid, INS_fcmge, INS_invalid}, HW_Category_SIMD, HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd, CompareTest, -1, 2, {INS_cmtst, INS_cmtst, INS_cmtst, INS_cmtst, INS_cmtst, INS_cmtst, INS_invalid, INS_invalid, INS_cmtst, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd, ConvertToInt32RoundAwayFromZero, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtas, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd, ConvertToInt32RoundAwayFromZeroScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtas, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, ConvertToInt32RoundToEven, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtns, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd, ConvertToInt32RoundToEvenScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtns, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, ConvertToInt32RoundToNegativeInfinity, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtms, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd, ConvertToInt32RoundToNegativeInfinityScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtms, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, ConvertToInt32RoundToPositiveInfinity, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtps, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd, ConvertToInt32RoundToPositiveInfinityScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtps, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, ConvertToInt32RoundToZero, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtzs, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd, ConvertToInt32RoundToZeroScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtzs, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, ConvertToSingle, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_scvtf, INS_ucvtf, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd, ConvertToSingleScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_scvtf, INS_ucvtf, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, ConvertToUInt32RoundAwayFromZero, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtau, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd, ConvertToUInt32RoundAwayFromZeroScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtau, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, ConvertToUInt32RoundToEven, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtnu, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd, ConvertToUInt32RoundToEvenScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtnu, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, ConvertToUInt32RoundToNegativeInfinity, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtmu, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd, ConvertToUInt32RoundToNegativeInfinityScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtmu, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, ConvertToUInt32RoundToPositiveInfinity, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtpu, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd, ConvertToUInt32RoundToPositiveInfinityScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtpu, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, ConvertToUInt32RoundToZero, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtzu, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd, ConvertToUInt32RoundToZeroScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtzu, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, DivideScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fdiv, INS_fdiv}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, DuplicateSelectedScalarToVector64, -1, 2, {INS_dup, INS_dup, INS_dup, INS_dup, INS_dup, INS_dup, INS_invalid, INS_invalid, INS_dup, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasImmediateOperand|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd, DuplicateSelectedScalarToVector128, -1, 2, {INS_dup, INS_dup, INS_dup, INS_dup, INS_dup, INS_dup, INS_invalid, INS_invalid, INS_dup, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasImmediateOperand|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd, DuplicateToVector64, 8, 1, {INS_dup, INS_dup, INS_dup, INS_dup, INS_dup, INS_dup, INS_invalid, INS_invalid, INS_dup, INS_invalid}, HW_Category_SIMD, HW_Flag_SpecialCodeGen|HW_Flag_SupportsContainment) +HARDWARE_INTRINSIC(AdvSimd, DuplicateToVector128, 16, 1, {INS_dup, INS_dup, INS_dup, INS_dup, INS_dup, INS_dup, INS_invalid, INS_invalid, INS_dup, INS_invalid}, HW_Category_SIMD, HW_Flag_SpecialCodeGen|HW_Flag_SupportsContainment) +HARDWARE_INTRINSIC(AdvSimd, Extract, -1, 2, {INS_smov, INS_umov, INS_smov, INS_umov, INS_smov, INS_umov, INS_umov, INS_umov, INS_dup, INS_dup}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasImmediateOperand|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd, ExtractNarrowingLower, 8, 1, {INS_xtn, INS_xtn, INS_xtn, INS_xtn, INS_xtn, INS_xtn, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, ExtractNarrowingSaturateLower, 8, 1, {INS_sqxtn, INS_uqxtn, INS_sqxtn, INS_uqxtn, INS_sqxtn, INS_uqxtn, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, ExtractNarrowingSaturateUnsignedLower, 8, 1, {INS_invalid, INS_sqxtun, INS_invalid, INS_sqxtun, INS_invalid, INS_sqxtun, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, ExtractNarrowingSaturateUnsignedUpper, 16, 2, {INS_invalid, INS_sqxtun2, INS_invalid, INS_sqxtun2, INS_invalid, INS_sqxtun2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, ExtractNarrowingSaturateUpper, 16, 2, {INS_sqxtn2, INS_uqxtn2, INS_sqxtn2, INS_uqxtn2, INS_sqxtn2, INS_uqxtn2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, ExtractNarrowingUpper, 16, 2, {INS_xtn2, INS_xtn2, INS_xtn2, INS_xtn2, INS_xtn2, INS_xtn2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, ExtractVector64, 8, 3, {INS_ext, INS_ext, INS_ext, INS_ext, INS_ext, INS_ext, INS_invalid, INS_invalid, INS_ext, INS_invalid}, HW_Category_SIMD, HW_Flag_HasImmediateOperand|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd, ExtractVector128, 16, 3, {INS_ext, INS_ext, INS_ext, INS_ext, INS_ext, INS_ext, INS_ext, INS_ext, INS_ext, INS_ext}, HW_Category_SIMD, HW_Flag_HasImmediateOperand|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd, Floor, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frintm, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, FloorScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frintm, INS_frintm}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, FusedAddHalving, -1, 2, {INS_shadd, INS_uhadd, INS_shadd, INS_uhadd, INS_shadd, INS_uhadd, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd, FusedAddRoundedHalving, -1, 2, {INS_srhadd, INS_urhadd, INS_srhadd, INS_urhadd, INS_srhadd, INS_urhadd, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd, FusedMultiplyAdd, -1, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmla, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, FusedMultiplyAddScalar, 8, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmadd, INS_fmadd}, HW_Category_SIMD, HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd, FusedMultiplyAddNegatedScalar, 8, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fnmadd, INS_fnmadd}, HW_Category_SIMD, HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd, FusedMultiplySubtract, -1, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmls, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, FusedMultiplySubtractScalar, 8, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmsub, INS_fmsub}, HW_Category_SIMD, HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd, FusedMultiplySubtractNegatedScalar, 8, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fnmsub, INS_fnmsub}, HW_Category_SIMD, HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd, FusedSubtractHalving, -1, 2, {INS_shsub, INS_uhsub, INS_shsub, INS_uhsub, INS_shsub, INS_uhsub, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, Insert, -1, 3, {INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins}, HW_Category_SIMD, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics|HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen|HW_Flag_SupportsContainment) +HARDWARE_INTRINSIC(AdvSimd, InsertScalar, 16, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_ins, INS_ins, INS_invalid, INS_ins}, HW_Category_SIMD, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics|HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd, LeadingSignCount, -1, 1, {INS_cls, INS_invalid, INS_cls, INS_invalid, INS_cls, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, LeadingZeroCount, -1, 1, {INS_clz, INS_clz, INS_clz, INS_clz, INS_clz, INS_clz, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, LoadAndInsertScalar, -1, 3, {INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1}, HW_Category_MemoryLoad, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics|HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd, LoadAndReplicateToVector64, 8, 1, {INS_ld1r, INS_ld1r, INS_ld1r, INS_ld1r, INS_ld1r, INS_ld1r, INS_invalid, INS_invalid, INS_ld1r, INS_invalid}, HW_Category_MemoryLoad, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, LoadAndReplicateToVector128, 16, 1, {INS_ld1r, INS_ld1r, INS_ld1r, INS_ld1r, INS_ld1r, INS_ld1r, INS_invalid, INS_invalid, INS_ld1r, INS_invalid}, HW_Category_MemoryLoad, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, LoadVector64, 8, 1, {INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1}, HW_Category_MemoryLoad, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, LoadVector128, 16, 1, {INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1, INS_ld1}, HW_Category_MemoryLoad, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, Max, -1, 2, {INS_smax, INS_umax, INS_smax, INS_umax, INS_smax, INS_umax, INS_invalid, INS_invalid, INS_fmax, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd, MaxNumber, -1, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmaxnm, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd, MaxNumberScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmaxnm, INS_fmaxnm}, HW_Category_SIMD, HW_Flag_Commutative|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, MaxPairwise, 8, 2, {INS_smaxp, INS_umaxp, INS_smaxp, INS_umaxp, INS_smaxp, INS_umaxp, INS_invalid, INS_invalid, INS_fmaxp, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, Min, -1, 2, {INS_smin, INS_umin, INS_smin, INS_umin, INS_smin, INS_umin, INS_invalid, INS_invalid, INS_fmin, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd, MinNumber, -1, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fminnm, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd, MinNumberScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fminnm, INS_fminnm}, HW_Category_SIMD, HW_Flag_Commutative|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, MinPairwise, 8, 2, {INS_sminp, INS_uminp, INS_sminp, INS_uminp, INS_sminp, INS_uminp, INS_invalid, INS_invalid, INS_fminp, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, Multiply, -1, 2, {INS_mul, INS_mul, INS_mul, INS_mul, INS_mul, INS_mul, INS_invalid, INS_invalid, INS_fmul, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd, MultiplyAdd, -1, 3, {INS_mla, INS_mla, INS_mla, INS_mla, INS_mla, INS_mla, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, MultiplyAddByScalar, -1, 3, {INS_invalid, INS_invalid, INS_mla, INS_mla, INS_mla, INS_mla, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, MultiplyAddBySelectedScalar, -1, 4, {INS_invalid, INS_invalid, INS_mla, INS_mla, INS_mla, INS_mla, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, MultiplyByScalar, -1, 2, {INS_invalid, INS_invalid, INS_mul, INS_mul, INS_mul, INS_mul, INS_invalid, INS_invalid, INS_fmul, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, MultiplyBySelectedScalar, -1, 3, {INS_invalid, INS_invalid, INS_mul, INS_mul, INS_mul, INS_mul, INS_invalid, INS_invalid, INS_fmul, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_HasImmediateOperand) +HARDWARE_INTRINSIC(AdvSimd, MultiplyBySelectedScalarWideningLower, 8, 3, {INS_invalid, INS_invalid, INS_smull, INS_umull, INS_smull, INS_umull, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasImmediateOperand) +HARDWARE_INTRINSIC(AdvSimd, MultiplyBySelectedScalarWideningLowerAndAdd, 8, 4, {INS_invalid, INS_invalid, INS_smlal, INS_umlal, INS_smlal, INS_umlal, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, MultiplyBySelectedScalarWideningLowerAndSubtract, 8, 4, {INS_invalid, INS_invalid, INS_smlsl, INS_umlsl, INS_smlsl, INS_umlsl, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, MultiplyBySelectedScalarWideningUpper, 16, 3, {INS_invalid, INS_invalid, INS_smull2, INS_umull2, INS_smull2, INS_umull2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasImmediateOperand) +HARDWARE_INTRINSIC(AdvSimd, MultiplyBySelectedScalarWideningUpperAndAdd, 16, 4, {INS_invalid, INS_invalid, INS_smlal2, INS_umlal2, INS_smlal2, INS_umlal2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, MultiplyBySelectedScalarWideningUpperAndSubtract, 16, 4, {INS_invalid, INS_invalid, INS_smlsl2, INS_umlsl2, INS_smlsl2, INS_umlsl2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, MultiplyDoublingByScalarSaturateHigh, -1, 2, {INS_invalid, INS_invalid, INS_sqdmulh, INS_invalid, INS_sqdmulh, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, MultiplyDoublingBySelectedScalarSaturateHigh, -1, 3, {INS_invalid, INS_invalid, INS_sqdmulh, INS_invalid, INS_sqdmulh, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_HasImmediateOperand) +HARDWARE_INTRINSIC(AdvSimd, MultiplyDoublingSaturateHigh, -1, 2, {INS_invalid, INS_invalid, INS_sqdmulh, INS_invalid, INS_sqdmulh, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd, MultiplyDoublingWideningLowerAndAddSaturate, 8, 3, {INS_invalid, INS_invalid, INS_sqdmlal, INS_invalid, INS_sqdmlal, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, MultiplyDoublingWideningLowerAndSubtractSaturate, 8, 3, {INS_invalid, INS_invalid, INS_sqdmlsl, INS_invalid, INS_sqdmlsl, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, MultiplyDoublingWideningLowerByScalarAndAddSaturate, 8, 3, {INS_invalid, INS_invalid, INS_sqdmlal, INS_invalid, INS_sqdmlal, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, MultiplyDoublingWideningLowerByScalarAndSubtractSaturate, 8, 3, {INS_invalid, INS_invalid, INS_sqdmlsl, INS_invalid, INS_sqdmlsl, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, MultiplyDoublingWideningLowerBySelectedScalarAndAddSaturate, 8, 4, {INS_invalid, INS_invalid, INS_sqdmlal, INS_invalid, INS_sqdmlal, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, MultiplyDoublingWideningLowerBySelectedScalarAndSubtractSaturate, 8, 4, {INS_invalid, INS_invalid, INS_sqdmlsl, INS_invalid, INS_sqdmlsl, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, MultiplyDoublingWideningSaturateLower, 8, 2, {INS_invalid, INS_invalid, INS_sqdmull, INS_invalid, INS_sqdmull, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd, MultiplyDoublingWideningSaturateLowerByScalar, 8, 2, {INS_invalid, INS_invalid, INS_sqdmull, INS_invalid, INS_sqdmull, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd, MultiplyDoublingWideningSaturateLowerBySelectedScalar, 8, 3, {INS_invalid, INS_invalid, INS_sqdmull, INS_invalid, INS_sqdmull, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasImmediateOperand) +HARDWARE_INTRINSIC(AdvSimd, MultiplyDoublingWideningSaturateUpper, 16, 2, {INS_invalid, INS_invalid, INS_sqdmull2, INS_invalid, INS_sqdmull2, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd, MultiplyDoublingWideningSaturateUpperByScalar, 16, 2, {INS_invalid, INS_invalid, INS_sqdmull2, INS_invalid, INS_sqdmull2, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd, MultiplyDoublingWideningSaturateUpperBySelectedScalar, 16, 3, {INS_invalid, INS_invalid, INS_sqdmull2, INS_invalid, INS_sqdmull2, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasImmediateOperand) +HARDWARE_INTRINSIC(AdvSimd, MultiplyDoublingWideningUpperAndAddSaturate, 16, 3, {INS_invalid, INS_invalid, INS_sqdmlal2, INS_invalid, INS_sqdmlal2, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, MultiplyDoublingWideningUpperAndSubtractSaturate, 16, 3, {INS_invalid, INS_invalid, INS_sqdmlsl2, INS_invalid, INS_sqdmlsl2, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, MultiplyDoublingWideningUpperByScalarAndAddSaturate, 16, 3, {INS_invalid, INS_invalid, INS_sqdmlal2, INS_invalid, INS_sqdmlal2, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, MultiplyDoublingWideningUpperByScalarAndSubtractSaturate, 16, 3, {INS_invalid, INS_invalid, INS_sqdmlsl2, INS_invalid, INS_sqdmlsl2, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, MultiplyDoublingWideningUpperBySelectedScalarAndAddSaturate, 16, 4, {INS_invalid, INS_invalid, INS_sqdmlal2, INS_invalid, INS_sqdmlal2, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, MultiplyDoublingWideningUpperBySelectedScalarAndSubtractSaturate, 16, 4, {INS_invalid, INS_invalid, INS_sqdmlsl2, INS_invalid, INS_sqdmlsl2, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, MultiplyRoundedDoublingByScalarSaturateHigh, -1, 2, {INS_invalid, INS_invalid, INS_sqrdmulh, INS_invalid, INS_sqrdmulh, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, MultiplyRoundedDoublingBySelectedScalarSaturateHigh, -1, 3, {INS_invalid, INS_invalid, INS_sqrdmulh, INS_invalid, INS_sqrdmulh, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_HasImmediateOperand) +HARDWARE_INTRINSIC(AdvSimd, MultiplyRoundedDoublingSaturateHigh, -1, 2, {INS_invalid, INS_invalid, INS_sqrdmulh, INS_invalid, INS_sqrdmulh, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd, MultiplyScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmul, INS_fmul}, HW_Category_SIMD, HW_Flag_Commutative|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, MultiplyScalarBySelectedScalar, 8, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmul, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, MultiplySubtract, -1, 3, {INS_mls, INS_mls, INS_mls, INS_mls, INS_mls, INS_mls, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, MultiplySubtractByScalar, -1, 3, {INS_invalid, INS_invalid, INS_mls, INS_mls, INS_mls, INS_mls, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, MultiplySubtractBySelectedScalar, -1, 4, {INS_invalid, INS_invalid, INS_mls, INS_mls, INS_mls, INS_mls, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, MultiplyWideningLower, 8, 2, {INS_smull, INS_umull, INS_smull, INS_umull, INS_smull, INS_umull, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd, MultiplyWideningLowerAndAdd, 8, 3, {INS_smlal, INS_umlal, INS_smlal, INS_umlal, INS_smlal, INS_umlal, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, MultiplyWideningLowerAndSubtract, 8, 3, {INS_smlsl, INS_umlsl, INS_smlsl, INS_umlsl, INS_smlsl, INS_umlsl, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, MultiplyWideningUpper, 16, 2, {INS_smull2, INS_umull2, INS_smull2, INS_umull2, INS_smull2, INS_umull2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd, MultiplyWideningUpperAndAdd, 16, 3, {INS_smlal2, INS_umlal2, INS_smlal2, INS_umlal2, INS_smlal2, INS_umlal2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, MultiplyWideningUpperAndSubtract, 16, 3, {INS_smlsl2, INS_umlsl2, INS_smlsl2, INS_umlsl2, INS_smlsl2, INS_umlsl2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, Negate, -1, 1, {INS_neg, INS_invalid, INS_neg, INS_invalid, INS_neg, INS_invalid, INS_invalid, INS_invalid, INS_fneg, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, NegateSaturate, -1, 1, {INS_sqneg, INS_invalid, INS_sqneg, INS_invalid, INS_sqneg, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, NegateScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fneg, INS_fneg}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, Not, -1, 1, {INS_mvn, INS_mvn, INS_mvn, INS_mvn, INS_mvn, INS_mvn, INS_mvn, INS_mvn, INS_mvn, INS_mvn}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, Or, -1, 2, {INS_orr, INS_orr, INS_orr, INS_orr, INS_orr, INS_orr, INS_orr, INS_orr, INS_orr, INS_orr}, HW_Category_SIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd, OrNot, -1, 2, {INS_orn, INS_orn, INS_orn, INS_orn, INS_orn, INS_orn, INS_orn, INS_orn, INS_orn, INS_orn}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, PolynomialMultiply, -1, 2, {INS_pmul, INS_pmul, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd, PolynomialMultiplyWideningLower, 8, 2, {INS_pmull, INS_pmull, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd, PolynomialMultiplyWideningUpper, 16, 2, {INS_pmull2, INS_pmull2, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd, PopCount, -1, 1, {INS_cnt, INS_cnt, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, ReciprocalEstimate, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_urecpe, INS_invalid, INS_invalid, INS_frecpe, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, ReciprocalSquareRootEstimate, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_ursqrte, INS_invalid, INS_invalid, INS_frsqrte, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, ReciprocalSquareRootStep, -1, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frsqrts, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd, ReciprocalStep, -1, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frecps, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd, ReverseElement16, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_rev32, INS_rev32, INS_rev64, INS_rev64, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd, ReverseElement32, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_rev64, INS_rev64, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd, ReverseElement8, -1, 1, {INS_invalid, INS_invalid, INS_rev16, INS_rev16, INS_rev32, INS_rev32, INS_rev64, INS_rev64, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd, RoundAwayFromZero, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frinta, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, RoundAwayFromZeroScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frinta, INS_frinta}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, RoundToNearest, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frintn, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, RoundToNearestScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frintn, INS_frintn}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, RoundToNegativeInfinity, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frintm, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, RoundToNegativeInfinityScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frintm, INS_frintm}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, RoundToPositiveInfinity, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frintp, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, RoundToPositiveInfinityScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frintp, INS_frintp}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, RoundToZero, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frintz, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, RoundToZeroScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frintz, INS_frintz}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, ShiftArithmetic, -1, 2, {INS_sshl, INS_invalid, INS_sshl, INS_invalid, INS_sshl, INS_invalid, INS_sshl, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, ShiftArithmeticRounded, -1, 2, {INS_srshl, INS_invalid, INS_srshl, INS_invalid, INS_srshl, INS_invalid, INS_srshl, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, ShiftArithmeticRoundedSaturate, -1, 2, {INS_sqrshl, INS_invalid, INS_sqrshl, INS_invalid, INS_sqrshl, INS_invalid, INS_sqrshl, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, ShiftArithmeticRoundedSaturateScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sqrshl, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, ShiftArithmeticRoundedScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_srshl, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, ShiftArithmeticSaturate, -1, 2, {INS_sqshl, INS_invalid, INS_sqshl, INS_invalid, INS_sqshl, INS_invalid, INS_sqshl, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, ShiftArithmeticSaturateScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sqshl, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, ShiftArithmeticScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sshl, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, ShiftLeftAndInsert, -1, 3, {INS_sli, INS_sli, INS_sli, INS_sli, INS_sli, INS_sli, INS_sli, INS_sli, INS_sli, INS_sli}, HW_Category_ShiftLeftByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, ShiftLeftAndInsertScalar, 8, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sli, INS_sli, INS_invalid, INS_invalid}, HW_Category_ShiftLeftByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, ShiftLeftLogical, -1, 2, {INS_shl, INS_shl, INS_shl, INS_shl, INS_shl, INS_shl, INS_shl, INS_shl, INS_invalid, INS_invalid}, HW_Category_ShiftLeftByImmediate, HW_Flag_HasImmediateOperand) +HARDWARE_INTRINSIC(AdvSimd, ShiftLeftLogicalSaturate, -1, 2, {INS_sqshl, INS_uqshl, INS_sqshl, INS_uqshl, INS_sqshl, INS_uqshl, INS_sqshl, INS_uqshl, INS_invalid, INS_invalid}, HW_Category_ShiftLeftByImmediate, HW_Flag_HasImmediateOperand) +HARDWARE_INTRINSIC(AdvSimd, ShiftLeftLogicalSaturateScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sqshl, INS_uqshl, INS_invalid, INS_invalid}, HW_Category_ShiftLeftByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, ShiftLeftLogicalSaturateUnsigned, -1, 2, {INS_sqshlu, INS_invalid, INS_sqshlu, INS_invalid, INS_sqshlu, INS_invalid, INS_sqshlu, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftLeftByImmediate, HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasImmediateOperand) +HARDWARE_INTRINSIC(AdvSimd, ShiftLeftLogicalSaturateUnsignedScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sqshlu, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftLeftByImmediate, HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, ShiftLeftLogicalScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_shl, INS_shl, INS_invalid, INS_invalid}, HW_Category_ShiftLeftByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, ShiftLeftLogicalWideningLower, 8, 2, {INS_sshll, INS_ushll, INS_sshll, INS_ushll, INS_sshll, INS_ushll, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftLeftByImmediate, HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasImmediateOperand) +HARDWARE_INTRINSIC(AdvSimd, ShiftLeftLogicalWideningUpper, 16, 2, {INS_sshll2, INS_ushll2, INS_sshll2, INS_ushll2, INS_sshll2, INS_ushll2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftLeftByImmediate, HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasImmediateOperand) +HARDWARE_INTRINSIC(AdvSimd, ShiftLogical, -1, 2, {INS_ushl, INS_ushl, INS_ushl, INS_ushl, INS_ushl, INS_ushl, INS_ushl, INS_ushl, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, ShiftLogicalRounded, -1, 2, {INS_urshl, INS_urshl, INS_urshl, INS_urshl, INS_urshl, INS_urshl, INS_urshl, INS_urshl, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, ShiftLogicalRoundedSaturate, -1, 2, {INS_uqrshl, INS_uqrshl, INS_uqrshl, INS_uqrshl, INS_uqrshl, INS_uqrshl, INS_uqrshl, INS_uqrshl, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, ShiftLogicalRoundedSaturateScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_uqrshl, INS_uqrshl, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, ShiftLogicalRoundedScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_urshl, INS_urshl, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, ShiftLogicalSaturate, -1, 2, {INS_uqshl, INS_uqshl, INS_uqshl, INS_uqshl, INS_uqshl, INS_uqshl, INS_uqshl, INS_uqshl, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, ShiftLogicalSaturateScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_uqshl, INS_uqshl, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, ShiftLogicalScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_ushl, INS_ushl, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, ShiftRightAndInsert, -1, 3, {INS_sri, INS_sri, INS_sri, INS_sri, INS_sri, INS_sri, INS_sri, INS_sri, INS_sri, INS_sri}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, ShiftRightAndInsertScalar, 8, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sri, INS_sri, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, ShiftRightArithmetic, -1, 2, {INS_sshr, INS_invalid, INS_sshr, INS_invalid, INS_sshr, INS_invalid, INS_sshr, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand) +HARDWARE_INTRINSIC(AdvSimd, ShiftRightArithmeticAdd, -1, 3, {INS_ssra, INS_invalid, INS_ssra, INS_invalid, INS_ssra, INS_invalid, INS_ssra, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, ShiftRightArithmeticAddScalar, 8, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_ssra, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, ShiftRightArithmeticNarrowingSaturateLower, 8, 2, {INS_sqshrn, INS_invalid, INS_sqshrn, INS_invalid, INS_sqshrn, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand) +HARDWARE_INTRINSIC(AdvSimd, ShiftRightArithmeticNarrowingSaturateUnsignedLower, 8, 2, {INS_invalid, INS_sqshrun, INS_invalid, INS_sqshrun, INS_invalid, INS_sqshrun, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand) +HARDWARE_INTRINSIC(AdvSimd, ShiftRightArithmeticNarrowingSaturateUnsignedUpper, 16, 3, {INS_invalid, INS_sqshrun2, INS_invalid, INS_sqshrun2, INS_invalid, INS_sqshrun2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, ShiftRightArithmeticNarrowingSaturateUpper, 16, 3, {INS_sqshrn2, INS_invalid, INS_sqshrn2, INS_invalid, INS_sqshrn2, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, ShiftRightArithmeticRounded, -1, 2, {INS_srshr, INS_invalid, INS_srshr, INS_invalid, INS_srshr, INS_invalid, INS_srshr, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand) +HARDWARE_INTRINSIC(AdvSimd, ShiftRightArithmeticRoundedAdd, -1, 3, {INS_srsra, INS_invalid, INS_srsra, INS_invalid, INS_srsra, INS_invalid, INS_srsra, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, ShiftRightArithmeticRoundedAddScalar, 8, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_srsra, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, ShiftRightArithmeticRoundedNarrowingSaturateLower, 8, 2, {INS_sqrshrn, INS_invalid, INS_sqrshrn, INS_invalid, INS_sqrshrn, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand) +HARDWARE_INTRINSIC(AdvSimd, ShiftRightArithmeticRoundedNarrowingSaturateUnsignedLower, 8, 2, {INS_invalid, INS_sqrshrun, INS_invalid, INS_sqrshrun, INS_invalid, INS_sqrshrun, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand) +HARDWARE_INTRINSIC(AdvSimd, ShiftRightArithmeticRoundedNarrowingSaturateUnsignedUpper, 16, 3, {INS_invalid, INS_sqrshrun2, INS_invalid, INS_sqrshrun2, INS_invalid, INS_sqrshrun2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, ShiftRightArithmeticRoundedNarrowingSaturateUpper, 16, 3, {INS_sqrshrn2, INS_invalid, INS_sqrshrn2, INS_invalid, INS_sqrshrn2, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, ShiftRightArithmeticRoundedScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_srshr, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, ShiftRightArithmeticScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sshr, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, ShiftRightLogical, -1, 2, {INS_ushr, INS_ushr, INS_ushr, INS_ushr, INS_ushr, INS_ushr, INS_ushr, INS_ushr, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand) +HARDWARE_INTRINSIC(AdvSimd, ShiftRightLogicalAdd, -1, 3, {INS_usra, INS_usra, INS_usra, INS_usra, INS_usra, INS_usra, INS_usra, INS_usra, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, ShiftRightLogicalAddScalar, 8, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_usra, INS_usra, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, ShiftRightLogicalNarrowingLower, 8, 2, {INS_shrn, INS_shrn, INS_shrn, INS_shrn, INS_shrn, INS_shrn, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand) +HARDWARE_INTRINSIC(AdvSimd, ShiftRightLogicalNarrowingSaturateLower, 8, 2, {INS_uqshrn, INS_uqshrn, INS_uqshrn, INS_uqshrn, INS_uqshrn, INS_uqshrn, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand) +HARDWARE_INTRINSIC(AdvSimd, ShiftRightLogicalNarrowingSaturateUpper, 16, 3, {INS_uqshrn2, INS_uqshrn2, INS_uqshrn2, INS_uqshrn2, INS_uqshrn2, INS_uqshrn2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, ShiftRightLogicalNarrowingUpper, 16, 3, {INS_shrn2, INS_shrn2, INS_shrn2, INS_shrn2, INS_shrn2, INS_shrn2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, ShiftRightLogicalRounded, -1, 2, {INS_urshr, INS_urshr, INS_urshr, INS_urshr, INS_urshr, INS_urshr, INS_urshr, INS_urshr, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand) +HARDWARE_INTRINSIC(AdvSimd, ShiftRightLogicalRoundedAdd, -1, 3, {INS_ursra, INS_ursra, INS_ursra, INS_ursra, INS_ursra, INS_ursra, INS_ursra, INS_ursra, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, ShiftRightLogicalRoundedAddScalar, 8, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_ursra, INS_ursra, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, ShiftRightLogicalRoundedNarrowingLower, 8, 2, {INS_rshrn, INS_rshrn, INS_rshrn, INS_rshrn, INS_rshrn, INS_rshrn, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand) +HARDWARE_INTRINSIC(AdvSimd, ShiftRightLogicalRoundedNarrowingSaturateLower, 8, 2, {INS_uqrshrn, INS_uqrshrn, INS_uqrshrn, INS_uqrshrn, INS_uqrshrn, INS_uqrshrn, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand) +HARDWARE_INTRINSIC(AdvSimd, ShiftRightLogicalRoundedNarrowingSaturateUpper, 16, 3, {INS_uqrshrn2, INS_uqrshrn2, INS_uqrshrn2, INS_uqrshrn2, INS_uqrshrn2, INS_uqrshrn2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, ShiftRightLogicalRoundedNarrowingUpper, 16, 3, {INS_rshrn2, INS_rshrn2, INS_rshrn2, INS_rshrn2, INS_rshrn2, INS_rshrn2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, ShiftRightLogicalRoundedScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_urshr, INS_urshr, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, ShiftRightLogicalScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_ushr, INS_ushr, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, SignExtendWideningLower, 8, 1, {INS_sxtl, INS_invalid, INS_sxtl, INS_invalid, INS_sxtl, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd, SignExtendWideningUpper, 16, 1, {INS_sxtl2, INS_invalid, INS_sxtl2, INS_invalid, INS_sxtl2, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd, SqrtScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fsqrt, INS_fsqrt}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, Store, -1, 2, {INS_st1, INS_st1, INS_st1, INS_st1, INS_st1, INS_st1, INS_st1, INS_st1, INS_st1, INS_st1}, HW_Category_MemoryStore, HW_Flag_BaseTypeFromSecondArg|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd, StoreSelectedScalar, -1, 3, {INS_st1, INS_st1, INS_st1, INS_st1, INS_st1, INS_st1, INS_st1, INS_st1, INS_st1, INS_st1}, HW_Category_MemoryStore, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd, Subtract, -1, 2, {INS_sub, INS_sub, INS_sub, INS_sub, INS_sub, INS_sub, INS_sub, INS_sub, INS_fsub, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, SubtractHighNarrowingLower, 8, 2, {INS_subhn, INS_subhn, INS_subhn, INS_subhn, INS_subhn, INS_subhn, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, SubtractHighNarrowingUpper, 16, 3, {INS_subhn2, INS_subhn2, INS_subhn2, INS_subhn2, INS_subhn2, INS_subhn2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, SubtractRoundedHighNarrowingLower, 8, 2, {INS_rsubhn, INS_rsubhn, INS_rsubhn, INS_rsubhn, INS_rsubhn, INS_rsubhn, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, SubtractRoundedHighNarrowingUpper, 16, 3, {INS_rsubhn2, INS_rsubhn2, INS_rsubhn2, INS_rsubhn2, INS_rsubhn2, INS_rsubhn2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, SubtractSaturate, -1, 2, {INS_sqsub, INS_uqsub, INS_sqsub, INS_uqsub, INS_sqsub, INS_uqsub, INS_sqsub, INS_uqsub, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, SubtractSaturateScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sqsub, INS_uqsub, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, SubtractScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sub, INS_sub, INS_fsub, INS_fsub}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd, SubtractWideningLower, 8, 2, {INS_ssubl, INS_usubl, INS_ssubl, INS_usubl, INS_ssubl, INS_usubl, INS_ssubw, INS_usubw, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromSecondArg|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd, SubtractWideningUpper, 16, 2, {INS_ssubl2, INS_usubl2, INS_ssubl2, INS_usubl2, INS_ssubl2, INS_usubl2, INS_ssubw2, INS_usubw2, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromSecondArg|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd, VectorTableLookup, 8, 2, {INS_tbl, INS_tbl, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd, VectorTableLookupExtension, 8, 3, {INS_tbx, INS_tbx, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd, Xor, -1, 2, {INS_eor, INS_eor, INS_eor, INS_eor, INS_eor, INS_eor, INS_eor, INS_eor, INS_eor, INS_eor}, HW_Category_SIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd, ZeroExtendWideningLower, 8, 1, {INS_uxtl, INS_uxtl, INS_uxtl, INS_uxtl, INS_uxtl, INS_uxtl, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd, ZeroExtendWideningUpper, 16, 1, {INS_uxtl2, INS_uxtl2, INS_uxtl2, INS_uxtl2, INS_uxtl2, INS_uxtl2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** -// ISA Function name SIMD size Number of arguments Instructions Category Flags -// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} +// ISA Function name SIMD size Number of arguments Instructions Category Flags +// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** // AdvSimd 64-bit only Intrinsics -HARDWARE_INTRINSIC(AdvSimd_Arm64, Abs, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_abs, INS_invalid, INS_invalid, INS_fabs}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(AdvSimd_Arm64, AbsScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_abs, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, AbsoluteCompareGreaterThan, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_facgt}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd_Arm64, AbsoluteCompareGreaterThanOrEqual, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_facge}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd_Arm64, AbsoluteCompareGreaterThanOrEqualScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_facge, INS_facge}, HW_Category_SIMD, HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, AbsoluteCompareGreaterThanScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_facgt, INS_facgt}, HW_Category_SIMD, HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, AbsoluteCompareLessThan, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_facgt}, HW_Category_SIMD, HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(AdvSimd_Arm64, AbsoluteCompareLessThanOrEqual, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_facge}, HW_Category_SIMD, HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(AdvSimd_Arm64, AbsoluteCompareLessThanOrEqualScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_facge, INS_facge}, HW_Category_SIMD, HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(AdvSimd_Arm64, AbsoluteCompareLessThanScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_facgt, INS_facgt}, HW_Category_SIMD, HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(AdvSimd_Arm64, AbsoluteDifference, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fabd}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd_Arm64, AbsoluteDifferenceScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fabd, INS_fabd}, HW_Category_SIMD, HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, Add, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fadd}, HW_Category_SIMD, HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd_Arm64, AddAcross, -1, 1, {INS_addv, INS_addv, INS_addv, INS_addv, INS_addv, INS_addv, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(AdvSimd_Arm64, AddPairwise, 16, 2, {INS_addp, INS_addp, INS_addp, INS_addp, INS_addp, INS_addp, INS_addp, INS_addp, INS_faddp, INS_faddp}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd_Arm64, AddPairwiseScalar, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_addp, INS_addp, INS_faddp, INS_faddp}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(AdvSimd_Arm64, AddSaturateScalar, 8, 2, {INS_sqadd, INS_uqadd, INS_sqadd, INS_uqadd, INS_sqadd, INS_uqadd, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, CompareEqual, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cmeq, INS_cmeq, INS_invalid, INS_fcmeq}, HW_Category_SIMD, HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd_Arm64, CompareEqualScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cmeq, INS_cmeq, INS_fcmeq, INS_fcmeq}, HW_Category_SIMD, HW_Flag_Commutative|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, CompareGreaterThan, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cmgt, INS_cmhi, INS_invalid, INS_fcmgt}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd_Arm64, CompareGreaterThanOrEqual, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cmge, INS_cmhs, INS_invalid, INS_fcmge}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd_Arm64, CompareGreaterThanOrEqualScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cmge, INS_cmhs, INS_fcmge, INS_fcmge}, HW_Category_SIMD, HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, CompareGreaterThanScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cmgt, INS_cmhi, INS_fcmgt, INS_fcmgt}, HW_Category_SIMD, HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, CompareLessThan, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cmgt, INS_cmhi, INS_invalid, INS_fcmgt}, HW_Category_SIMD, HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(AdvSimd_Arm64, CompareLessThanOrEqual, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cmge, INS_cmhs, INS_invalid, INS_fcmge}, HW_Category_SIMD, HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(AdvSimd_Arm64, CompareLessThanOrEqualScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cmge, INS_cmhs, INS_fcmge, INS_fcmge}, HW_Category_SIMD, HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(AdvSimd_Arm64, CompareLessThanScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cmgt, INS_cmhi, INS_fcmgt, INS_fcmgt}, HW_Category_SIMD, HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(AdvSimd_Arm64, CompareTest, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cmtst, INS_cmtst, INS_invalid, INS_cmtst}, HW_Category_SIMD, HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd_Arm64, CompareTestScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cmtst, INS_cmtst, INS_invalid, INS_cmtst}, HW_Category_SIMD, HW_Flag_Commutative|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, Divide, -1, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fdiv, INS_fdiv}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd_Arm64, DuplicateSelectedScalarToVector128, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_dup, INS_dup, INS_invalid, INS_dup}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasImmediateOperand|HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(AdvSimd_Arm64, DuplicateToVector64, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_mov, INS_mov, INS_invalid, INS_fmov}, HW_Category_SIMD, HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen|HW_Flag_SupportsContainment) -HARDWARE_INTRINSIC(AdvSimd_Arm64, DuplicateToVector128, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_dup, INS_dup, INS_invalid, INS_dup}, HW_Category_SIMD, HW_Flag_SpecialCodeGen|HW_Flag_SupportsContainment) -HARDWARE_INTRINSIC(AdvSimd_Arm64, FusedMultiplyAdd, 16, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmla}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd_Arm64, FusedMultiplyAddByScalar, -1, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmla, INS_fmla}, HW_Category_SIMDByIndexedElement, HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd_Arm64, FusedMultiplyAddBySelectedScalar, -1, 4, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmla, INS_fmla}, HW_Category_SIMDByIndexedElement, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd_Arm64, FusedMultiplyAddScalarBySelectedScalar, 8, 4, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmla, INS_fmla}, HW_Category_SIMDByIndexedElement, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, FusedMultiplySubtract, 16, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmls}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd_Arm64, FusedMultiplySubtractByScalar, -1, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmls, INS_fmls}, HW_Category_SIMDByIndexedElement, HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd_Arm64, FusedMultiplySubtractBySelectedScalar, -1, 4, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmls, INS_fmls}, HW_Category_SIMDByIndexedElement, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd_Arm64, FusedMultiplySubtractScalarBySelectedScalar, 8, 4, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmls, INS_fmls}, HW_Category_SIMDByIndexedElement, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, InsertSelectedScalar, -1, 4, {INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins}, HW_Category_SIMD, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics|HW_Flag_NoJmpTableIMM|HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(AdvSimd_Arm64, LoadAndReplicateToVector128, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_ld1r, INS_ld1r, INS_invalid, INS_ld1r}, HW_Category_MemoryLoad, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd_Arm64, Max, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmax}, HW_Category_SIMD, HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd_Arm64, MaxAcross, -1, 1, {INS_smaxv, INS_umaxv, INS_smaxv, INS_umaxv, INS_smaxv, INS_umaxv, INS_invalid, INS_invalid, INS_fmaxv, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(AdvSimd_Arm64, MaxNumber, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmaxnm}, HW_Category_SIMD, HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd_Arm64, MaxNumberAcross, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmaxnmv, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(AdvSimd_Arm64, MaxNumberPairwise, -1, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmaxnmp, INS_fmaxnmp}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd_Arm64, MaxNumberPairwiseScalar, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmaxnmp, INS_fmaxnmp}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(AdvSimd_Arm64, MaxPairwise, 16, 2, {INS_smaxp, INS_umaxp, INS_smaxp, INS_umaxp, INS_smaxp, INS_umaxp, INS_invalid, INS_invalid, INS_fmaxp, INS_fmaxp}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd_Arm64, MaxPairwiseScalar, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmaxp, INS_fmaxp}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(AdvSimd_Arm64, MaxScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmax, INS_fmax}, HW_Category_SIMD, HW_Flag_Commutative|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, Min, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmin}, HW_Category_SIMD, HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd_Arm64, MinAcross, -1, 1, {INS_sminv, INS_uminv, INS_sminv, INS_uminv, INS_sminv, INS_uminv, INS_invalid, INS_invalid, INS_fminv, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(AdvSimd_Arm64, MinNumber, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fminnm}, HW_Category_SIMD, HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd_Arm64, MinNumberAcross, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fminnmv, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(AdvSimd_Arm64, MinNumberPairwise, -1, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fminnmp, INS_fminnmp}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd_Arm64, MinNumberPairwiseScalar, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fminnmp, INS_fminnmp}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(AdvSimd_Arm64, MinPairwise, 16, 2, {INS_sminp, INS_uminp, INS_sminp, INS_uminp, INS_sminp, INS_uminp, INS_invalid, INS_invalid, INS_fminp, INS_fminp}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd_Arm64, MinPairwiseScalar, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fminp, INS_fminp}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(AdvSimd_Arm64, MinScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmin, INS_fmin}, HW_Category_SIMD, HW_Flag_Commutative|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, Multiply, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmul}, HW_Category_SIMD, HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd_Arm64, MultiplyByScalar, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmul}, HW_Category_SIMDByIndexedElement, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd_Arm64, MultiplyBySelectedScalar, 16, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmul}, HW_Category_SIMDByIndexedElement, HW_Flag_HasImmediateOperand) -HARDWARE_INTRINSIC(AdvSimd_Arm64, MultiplyExtended, -1, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmulx, INS_fmulx}, HW_Category_SIMD, HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd_Arm64, MultiplyExtendedByScalar, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmulx}, HW_Category_SIMDByIndexedElement, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd_Arm64, MultiplyExtendedBySelectedScalar, -1, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmulx, INS_fmulx}, HW_Category_SIMDByIndexedElement, HW_Flag_HasImmediateOperand) -HARDWARE_INTRINSIC(AdvSimd_Arm64, MultiplyExtendedScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmulx, INS_fmulx}, HW_Category_SIMD, HW_Flag_Commutative|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, MultiplyExtendedScalarBySelectedScalar, 8, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmulx, INS_fmulx}, HW_Category_SIMDByIndexedElement, HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, MultiplyScalarBySelectedScalar, 8, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmul}, HW_Category_SIMDByIndexedElement, HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, Negate, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_neg, INS_invalid, INS_invalid, INS_fneg}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd_Arm64, NegateScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_neg, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, ReciprocalEstimate, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frecpe}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd_Arm64, ReciprocalEstimateScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frecpe, INS_frecpe}, HW_Category_SIMD, HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, ReciprocalExponentScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frecpx, INS_frecpx}, HW_Category_SIMD, HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, ReciprocalSquareRootEstimate, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frsqrte}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd_Arm64, ReciprocalSquareRootEstimateScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frsqrte, INS_frsqrte}, HW_Category_SIMD, HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, ReciprocalSquareRootStep, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frsqrts}, HW_Category_SIMD, HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd_Arm64, ReciprocalSquareRootStepScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frsqrts, INS_frsqrts}, HW_Category_SIMD, HW_Flag_Commutative|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, ReciprocalStep, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frecps}, HW_Category_SIMD, HW_Flag_Commutative) -HARDWARE_INTRINSIC(AdvSimd_Arm64, ReciprocalStepScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frecps, INS_frecps}, HW_Category_SIMD, HW_Flag_Commutative|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, ReverseElementBits, -1, 1, {INS_rbit, INS_rbit, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd_Arm64, ShiftArithmeticRoundedSaturateScalar, 8, 2, {INS_sqrshl, INS_invalid, INS_sqrshl, INS_invalid, INS_sqrshl, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, ShiftArithmeticSaturateScalar, 8, 2, {INS_sqshl, INS_invalid, INS_sqshl, INS_invalid, INS_sqshl, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, ShiftLeftLogicalSaturateScalar, 8, 2, {INS_sqshl, INS_uqshl, INS_sqshl, INS_uqshl, INS_sqshl, INS_uqshl, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftLeftByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, ShiftLeftLogicalSaturateUnsignedScalar, 8, 2, {INS_sqshlu, INS_invalid, INS_sqshlu, INS_invalid, INS_sqshlu, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftLeftByImmediate, HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, ShiftLogicalRoundedSaturateScalar, 8, 2, {INS_uqrshl, INS_uqrshl, INS_uqrshl, INS_uqrshl, INS_uqrshl, INS_uqrshl, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, ShiftLogicalSaturateScalar, 8, 2, {INS_uqshl, INS_uqshl, INS_uqshl, INS_uqshl, INS_uqshl, INS_uqshl, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, ShiftRightArithmeticNarrowingSaturateScalar, 8, 2, {INS_sqshrn, INS_invalid, INS_sqshrn, INS_invalid, INS_sqshrn, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, ShiftRightArithmeticNarrowingSaturateUnsignedScalar, 8, 2, {INS_invalid, INS_sqshrun, INS_invalid, INS_sqshrun, INS_invalid, INS_sqshrun, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, ShiftRightArithmeticRoundedNarrowingSaturateScalar, 8, 2, {INS_sqrshrn, INS_invalid, INS_sqrshrn, INS_invalid, INS_sqrshrn, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, ShiftRightArithmeticRoundedNarrowingSaturateUnsignedScalar, 8, 2, {INS_invalid, INS_sqrshrun, INS_invalid, INS_sqrshrun, INS_invalid, INS_sqrshrun, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, ShiftRightLogicalNarrowingSaturateScalar, 8, 2, {INS_uqshrn, INS_uqshrn, INS_uqshrn, INS_uqshrn, INS_uqshrn, INS_uqshrn, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, ShiftRightLogicalRoundedNarrowingSaturateScalar, 8, 2, {INS_uqrshrn, INS_uqrshrn, INS_uqrshrn, INS_uqrshrn, INS_uqrshrn, INS_uqrshrn, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, Sqrt, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fsqrt, INS_fsqrt}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd_Arm64, Subtract, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fsub}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd_Arm64, SubtractSaturateScalar, 8, 2, {INS_sqsub, INS_uqsub, INS_sqsub, INS_uqsub, INS_sqsub, INS_uqsub, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(AdvSimd_Arm64, TransposeEven, -1, 2, {INS_trn1, INS_trn1, INS_trn1, INS_trn1, INS_trn1, INS_trn1, INS_trn1, INS_trn1, INS_trn1, INS_trn1}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd_Arm64, TransposeOdd, -1, 2, {INS_trn2, INS_trn2, INS_trn2, INS_trn2, INS_trn2, INS_trn2, INS_trn2, INS_trn2, INS_trn2, INS_trn2}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd_Arm64, UnzipEven, -1, 2, {INS_uzp1, INS_uzp1, INS_uzp1, INS_uzp1, INS_uzp1, INS_uzp1, INS_uzp1, INS_uzp1, INS_uzp1, INS_uzp1}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd_Arm64, UnzipOdd, -1, 2, {INS_uzp2, INS_uzp2, INS_uzp2, INS_uzp2, INS_uzp2, INS_uzp2, INS_uzp2, INS_uzp2, INS_uzp2, INS_uzp2}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd_Arm64, VectorTableLookup, 16, 2, {INS_tbl, INS_tbl, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd_Arm64, VectorTableLookupExtension, 16, 3, {INS_tbx, INS_tbx, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(AdvSimd_Arm64, ZipHigh, -1, 2, {INS_zip2, INS_zip2, INS_zip2, INS_zip2, INS_zip2, INS_zip2, INS_zip2, INS_zip2, INS_zip2, INS_zip2}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(AdvSimd_Arm64, ZipLow, -1, 2, {INS_zip1, INS_zip1, INS_zip1, INS_zip1, INS_zip1, INS_zip1, INS_zip1, INS_zip1, INS_zip1, INS_zip1}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, Abs, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_abs, INS_invalid, INS_invalid, INS_fabs}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd_Arm64, AbsSaturate, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sqabs, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd_Arm64, AbsSaturateScalar, 8, 1, {INS_sqabs, INS_invalid, INS_sqabs, INS_invalid, INS_sqabs, INS_invalid, INS_sqabs, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, AbsScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_abs, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, AbsoluteCompareGreaterThan, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_facgt}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, AbsoluteCompareGreaterThanOrEqual, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_facge}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, AbsoluteCompareGreaterThanOrEqualScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_facge, INS_facge}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, AbsoluteCompareGreaterThanScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_facgt, INS_facgt}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, AbsoluteCompareLessThan, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_facgt}, HW_Category_SIMD, HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd_Arm64, AbsoluteCompareLessThanOrEqual, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_facge}, HW_Category_SIMD, HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd_Arm64, AbsoluteCompareLessThanOrEqualScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_facge, INS_facge}, HW_Category_SIMD, HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd_Arm64, AbsoluteCompareLessThanScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_facgt, INS_facgt}, HW_Category_SIMD, HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd_Arm64, AbsoluteDifference, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fabd}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, AbsoluteDifferenceScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fabd, INS_fabd}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, Add, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fadd}, HW_Category_SIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd_Arm64, AddAcross, -1, 1, {INS_addv, INS_addv, INS_addv, INS_addv, INS_addv, INS_addv, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd_Arm64, AddAcrossWidening, -1, 1, {INS_saddlv, INS_uaddlv, INS_saddlv, INS_uaddlv, INS_saddlv, INS_uaddlv, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd_Arm64, AddPairwise, 16, 2, {INS_addp, INS_addp, INS_addp, INS_addp, INS_addp, INS_addp, INS_addp, INS_addp, INS_faddp, INS_faddp}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, AddPairwiseScalar, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_addp, INS_addp, INS_faddp, INS_faddp}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd_Arm64, AddSaturate, -1, 2, {INS_suqadd, INS_usqadd, INS_suqadd, INS_usqadd, INS_suqadd, INS_usqadd, INS_suqadd, INS_usqadd, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd_Arm64, AddSaturateScalar, 8, 2, {INS_sqadd, INS_uqadd, INS_sqadd, INS_uqadd, INS_sqadd, INS_uqadd, INS_suqadd, INS_usqadd, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasRMWSemantics|HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd_Arm64, Ceiling, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frintp}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, CompareEqual, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cmeq, INS_cmeq, INS_invalid, INS_fcmeq}, HW_Category_SIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd_Arm64, CompareEqualScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cmeq, INS_cmeq, INS_fcmeq, INS_fcmeq}, HW_Category_SIMD, HW_Flag_Commutative|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, CompareGreaterThan, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cmgt, INS_cmhi, INS_invalid, INS_fcmgt}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, CompareGreaterThanOrEqual, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cmge, INS_cmhs, INS_invalid, INS_fcmge}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, CompareGreaterThanOrEqualScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cmge, INS_cmhs, INS_fcmge, INS_fcmge}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, CompareGreaterThanScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cmgt, INS_cmhi, INS_fcmgt, INS_fcmgt}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, CompareLessThan, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cmgt, INS_cmhi, INS_invalid, INS_fcmgt}, HW_Category_SIMD, HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd_Arm64, CompareLessThanOrEqual, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cmge, INS_cmhs, INS_invalid, INS_fcmge}, HW_Category_SIMD, HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd_Arm64, CompareLessThanOrEqualScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cmge, INS_cmhs, INS_fcmge, INS_fcmge}, HW_Category_SIMD, HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd_Arm64, CompareLessThanScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cmgt, INS_cmhi, INS_fcmgt, INS_fcmgt}, HW_Category_SIMD, HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd_Arm64, CompareTest, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cmtst, INS_cmtst, INS_invalid, INS_cmtst}, HW_Category_SIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd_Arm64, CompareTestScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cmtst, INS_cmtst, INS_invalid, INS_cmtst}, HW_Category_SIMD, HW_Flag_Commutative|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ConvertToDouble, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_scvtf, INS_ucvtf, INS_fcvtl, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ConvertToDoubleScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_scvtf, INS_ucvtf, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ConvertToDoubleUpper, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtl2, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ConvertToInt64RoundAwayFromZero, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtas}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ConvertToInt64RoundAwayFromZeroScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtas}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ConvertToInt64RoundToEven, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtns}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ConvertToInt64RoundToEvenScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtns}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ConvertToInt64RoundToNegativeInfinity, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtms}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ConvertToInt64RoundToNegativeInfinityScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtms}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ConvertToInt64RoundToPositiveInfinity, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtps}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ConvertToInt64RoundToPositiveInfinityScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtps}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ConvertToInt64RoundToZero, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtzs}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ConvertToInt64RoundToZeroScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtzs}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ConvertToSingleLower, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtn, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ConvertToSingleRoundToOddLower, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtxn, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ConvertToSingleRoundToOddUpper, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtxn2, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ConvertToSingleUpper, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtn2, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ConvertToUInt64RoundAwayFromZero, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtau}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ConvertToUInt64RoundAwayFromZeroScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtau}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ConvertToUInt64RoundToEven, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtnu}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ConvertToUInt64RoundToEvenScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtnu}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ConvertToUInt64RoundToNegativeInfinity, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtmu}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ConvertToUInt64RoundToNegativeInfinityScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtmu}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ConvertToUInt64RoundToPositiveInfinity, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtpu}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ConvertToUInt64RoundToPositiveInfinityScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtpu}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ConvertToUInt64RoundToZero, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtzu}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ConvertToUInt64RoundToZeroScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fcvtzu}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, Divide, -1, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fdiv, INS_fdiv}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, DuplicateSelectedScalarToVector128, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_dup, INS_dup, INS_invalid, INS_dup}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasImmediateOperand|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd_Arm64, DuplicateToVector64, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_mov, INS_mov, INS_invalid, INS_fmov}, HW_Category_SIMD, HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen|HW_Flag_SupportsContainment) +HARDWARE_INTRINSIC(AdvSimd_Arm64, DuplicateToVector128, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_dup, INS_dup, INS_invalid, INS_dup}, HW_Category_SIMD, HW_Flag_SpecialCodeGen|HW_Flag_SupportsContainment) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ExtractNarrowingSaturateScalar, 8, 1, {INS_sqxtn, INS_uqxtn, INS_sqxtn, INS_uqxtn, INS_sqxtn, INS_uqxtn, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ExtractNarrowingSaturateUnsignedScalar, 8, 1, {INS_invalid, INS_sqxtun, INS_invalid, INS_sqxtun, INS_invalid, INS_sqxtun, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, Floor, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frintm}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, FusedMultiplyAdd, 16, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmla}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd_Arm64, FusedMultiplyAddByScalar, -1, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmla, INS_fmla}, HW_Category_SIMDByIndexedElement, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd_Arm64, FusedMultiplyAddBySelectedScalar, -1, 4, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmla, INS_fmla}, HW_Category_SIMDByIndexedElement, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd_Arm64, FusedMultiplyAddScalarBySelectedScalar, 8, 4, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmla, INS_fmla}, HW_Category_SIMDByIndexedElement, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, FusedMultiplySubtract, 16, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmls}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd_Arm64, FusedMultiplySubtractByScalar, -1, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmls, INS_fmls}, HW_Category_SIMDByIndexedElement, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd_Arm64, FusedMultiplySubtractBySelectedScalar, -1, 4, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmls, INS_fmls}, HW_Category_SIMDByIndexedElement, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd_Arm64, FusedMultiplySubtractScalarBySelectedScalar, 8, 4, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmls, INS_fmls}, HW_Category_SIMDByIndexedElement, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, InsertSelectedScalar, -1, 4, {INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins}, HW_Category_SIMD, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics|HW_Flag_NoJmpTableIMM|HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd_Arm64, LoadAndReplicateToVector128, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_ld1r, INS_ld1r, INS_invalid, INS_ld1r}, HW_Category_MemoryLoad, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, Max, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmax}, HW_Category_SIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd_Arm64, MaxAcross, -1, 1, {INS_smaxv, INS_umaxv, INS_smaxv, INS_umaxv, INS_smaxv, INS_umaxv, INS_invalid, INS_invalid, INS_fmaxv, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd_Arm64, MaxNumber, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmaxnm}, HW_Category_SIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd_Arm64, MaxNumberAcross, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmaxnmv, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd_Arm64, MaxNumberPairwise, -1, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmaxnmp, INS_fmaxnmp}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, MaxNumberPairwiseScalar, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmaxnmp, INS_fmaxnmp}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd_Arm64, MaxPairwise, 16, 2, {INS_smaxp, INS_umaxp, INS_smaxp, INS_umaxp, INS_smaxp, INS_umaxp, INS_invalid, INS_invalid, INS_fmaxp, INS_fmaxp}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, MaxPairwiseScalar, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmaxp, INS_fmaxp}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd_Arm64, MaxScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmax, INS_fmax}, HW_Category_SIMD, HW_Flag_Commutative|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, Min, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmin}, HW_Category_SIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd_Arm64, MinAcross, -1, 1, {INS_sminv, INS_uminv, INS_sminv, INS_uminv, INS_sminv, INS_uminv, INS_invalid, INS_invalid, INS_fminv, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd_Arm64, MinNumber, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fminnm}, HW_Category_SIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd_Arm64, MinNumberAcross, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fminnmv, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd_Arm64, MinNumberPairwise, -1, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fminnmp, INS_fminnmp}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, MinNumberPairwiseScalar, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fminnmp, INS_fminnmp}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd_Arm64, MinPairwise, 16, 2, {INS_sminp, INS_uminp, INS_sminp, INS_uminp, INS_sminp, INS_uminp, INS_invalid, INS_invalid, INS_fminp, INS_fminp}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, MinPairwiseScalar, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fminp, INS_fminp}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AdvSimd_Arm64, MinScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmin, INS_fmin}, HW_Category_SIMD, HW_Flag_Commutative|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, Multiply, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmul}, HW_Category_SIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd_Arm64, MultiplyByScalar, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmul}, HW_Category_SIMDByIndexedElement, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, MultiplyBySelectedScalar, 16, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmul}, HW_Category_SIMDByIndexedElement, HW_Flag_HasImmediateOperand) +HARDWARE_INTRINSIC(AdvSimd_Arm64, MultiplyDoublingSaturateHighScalar, 8, 2, {INS_invalid, INS_invalid, INS_sqdmulh, INS_invalid, INS_sqdmulh, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, MultiplyDoublingScalarBySelectedScalarSaturateHigh, 8, 3, {INS_invalid, INS_invalid, INS_sqdmulh, INS_invalid, INS_sqdmulh, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, MultiplyDoublingWideningAndAddSaturateScalar, 8, 3, {INS_invalid, INS_invalid, INS_sqdmlal, INS_invalid, INS_sqdmlal, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasRMWSemantics|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, MultiplyDoublingWideningAndSubtractSaturateScalar, 8, 3, {INS_invalid, INS_invalid, INS_sqdmlsl, INS_invalid, INS_sqdmlsl, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasRMWSemantics|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, MultiplyDoublingWideningSaturateScalar, 8, 2, {INS_invalid, INS_invalid, INS_sqdmull, INS_invalid, INS_sqdmull, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_Commutative|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, MultiplyDoublingWideningSaturateScalarBySelectedScalar, 8, 3, {INS_invalid, INS_invalid, INS_sqdmull, INS_invalid, INS_sqdmull, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, MultiplyDoublingWideningScalarBySelectedScalarAndAddSaturate, 8, 4, {INS_invalid, INS_invalid, INS_sqdmlal, INS_invalid, INS_sqdmlal, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, MultiplyDoublingWideningScalarBySelectedScalarAndSubtractSaturate, 8, 4, {INS_invalid, INS_invalid, INS_sqdmlsl, INS_invalid, INS_sqdmlsl, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, MultiplyExtended, -1, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmulx, INS_fmulx}, HW_Category_SIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd_Arm64, MultiplyExtendedByScalar, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmulx}, HW_Category_SIMDByIndexedElement, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, MultiplyExtendedBySelectedScalar, -1, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmulx, INS_fmulx}, HW_Category_SIMDByIndexedElement, HW_Flag_HasImmediateOperand) +HARDWARE_INTRINSIC(AdvSimd_Arm64, MultiplyExtendedScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmulx, INS_fmulx}, HW_Category_SIMD, HW_Flag_Commutative|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, MultiplyExtendedScalarBySelectedScalar, 8, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmulx, INS_fmulx}, HW_Category_SIMDByIndexedElement, HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, MultiplyRoundedDoublingSaturateHighScalar, 8, 2, {INS_invalid, INS_invalid, INS_sqrdmulh, INS_invalid, INS_sqrdmulh, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, MultiplyRoundedDoublingScalarBySelectedScalarSaturateHigh, 8, 3, {INS_invalid, INS_invalid, INS_sqrdmulh, INS_invalid, INS_sqrdmulh, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, MultiplyScalarBySelectedScalar, 8, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fmul}, HW_Category_SIMDByIndexedElement, HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, Negate, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_neg, INS_invalid, INS_invalid, INS_fneg}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, NegateSaturate, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sqneg, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, NegateSaturateScalar, 8, 1, {INS_sqneg, INS_invalid, INS_sqneg, INS_invalid, INS_sqneg, INS_invalid, INS_sqneg, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, NegateScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_neg, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ReciprocalEstimate, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frecpe}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ReciprocalEstimateScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frecpe, INS_frecpe}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ReciprocalExponentScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frecpx, INS_frecpx}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ReciprocalSquareRootEstimate, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frsqrte}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ReciprocalSquareRootEstimateScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frsqrte, INS_frsqrte}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ReciprocalSquareRootStep, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frsqrts}, HW_Category_SIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ReciprocalSquareRootStepScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frsqrts, INS_frsqrts}, HW_Category_SIMD, HW_Flag_Commutative|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ReciprocalStep, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frecps}, HW_Category_SIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ReciprocalStepScalar, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frecps, INS_frecps}, HW_Category_SIMD, HW_Flag_Commutative|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ReverseElementBits, -1, 1, {INS_rbit, INS_rbit, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, RoundAwayFromZero, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frinta}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, RoundToNearest, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frintn}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, RoundToNegativeInfinity, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frintm}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, RoundToPositiveInfinity, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frintp}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, RoundToZero, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frintz}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ShiftArithmeticRoundedSaturateScalar, 8, 2, {INS_sqrshl, INS_invalid, INS_sqrshl, INS_invalid, INS_sqrshl, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ShiftArithmeticSaturateScalar, 8, 2, {INS_sqshl, INS_invalid, INS_sqshl, INS_invalid, INS_sqshl, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ShiftLeftLogicalSaturateScalar, 8, 2, {INS_sqshl, INS_uqshl, INS_sqshl, INS_uqshl, INS_sqshl, INS_uqshl, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftLeftByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ShiftLeftLogicalSaturateUnsignedScalar, 8, 2, {INS_sqshlu, INS_invalid, INS_sqshlu, INS_invalid, INS_sqshlu, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftLeftByImmediate, HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ShiftLogicalRoundedSaturateScalar, 8, 2, {INS_uqrshl, INS_uqrshl, INS_uqrshl, INS_uqrshl, INS_uqrshl, INS_uqrshl, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ShiftLogicalSaturateScalar, 8, 2, {INS_uqshl, INS_uqshl, INS_uqshl, INS_uqshl, INS_uqshl, INS_uqshl, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ShiftRightArithmeticNarrowingSaturateScalar, 8, 2, {INS_sqshrn, INS_invalid, INS_sqshrn, INS_invalid, INS_sqshrn, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ShiftRightArithmeticNarrowingSaturateUnsignedScalar, 8, 2, {INS_invalid, INS_sqshrun, INS_invalid, INS_sqshrun, INS_invalid, INS_sqshrun, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ShiftRightArithmeticRoundedNarrowingSaturateScalar, 8, 2, {INS_sqrshrn, INS_invalid, INS_sqrshrn, INS_invalid, INS_sqrshrn, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ShiftRightArithmeticRoundedNarrowingSaturateUnsignedScalar, 8, 2, {INS_invalid, INS_sqrshrun, INS_invalid, INS_sqrshrun, INS_invalid, INS_sqrshrun, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ShiftRightLogicalNarrowingSaturateScalar, 8, 2, {INS_uqshrn, INS_uqshrn, INS_uqshrn, INS_uqshrn, INS_uqshrn, INS_uqshrn, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ShiftRightLogicalRoundedNarrowingSaturateScalar, 8, 2, {INS_uqrshrn, INS_uqrshrn, INS_uqrshrn, INS_uqrshrn, INS_uqrshrn, INS_uqrshrn, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, Sqrt, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fsqrt, INS_fsqrt}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, Subtract, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fsub}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, SubtractSaturateScalar, 8, 2, {INS_sqsub, INS_uqsub, INS_sqsub, INS_uqsub, INS_sqsub, INS_uqsub, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(AdvSimd_Arm64, TransposeEven, -1, 2, {INS_trn1, INS_trn1, INS_trn1, INS_trn1, INS_trn1, INS_trn1, INS_trn1, INS_trn1, INS_trn1, INS_trn1}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, TransposeOdd, -1, 2, {INS_trn2, INS_trn2, INS_trn2, INS_trn2, INS_trn2, INS_trn2, INS_trn2, INS_trn2, INS_trn2, INS_trn2}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, UnzipEven, -1, 2, {INS_uzp1, INS_uzp1, INS_uzp1, INS_uzp1, INS_uzp1, INS_uzp1, INS_uzp1, INS_uzp1, INS_uzp1, INS_uzp1}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, UnzipOdd, -1, 2, {INS_uzp2, INS_uzp2, INS_uzp2, INS_uzp2, INS_uzp2, INS_uzp2, INS_uzp2, INS_uzp2, INS_uzp2, INS_uzp2}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, VectorTableLookup, 16, 2, {INS_tbl, INS_tbl, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, VectorTableLookupExtension, 16, 3, {INS_tbx, INS_tbx, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ZipHigh, -1, 2, {INS_zip2, INS_zip2, INS_zip2, INS_zip2, INS_zip2, INS_zip2, INS_zip2, INS_zip2, INS_zip2, INS_zip2}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AdvSimd_Arm64, ZipLow, -1, 2, {INS_zip1, INS_zip1, INS_zip1, INS_zip1, INS_zip1, INS_zip1, INS_zip1, INS_zip1, INS_zip1, INS_zip1}, HW_Category_SIMD, HW_Flag_NoFlag) // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** -// ISA Function name SIMD size Number of arguments Instructions Category Flags -// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} +// ISA Function name SIMD size Number of arguments Instructions Category Flags +// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** // AES Intrinsics -HARDWARE_INTRINSIC(Aes, Decrypt, 16, 2, {INS_invalid, INS_aesd, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(Aes, Encrypt, 16, 2, {INS_invalid, INS_aese, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(Aes, InverseMixColumns, 16, 1, {INS_invalid, INS_aesimc, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(Aes, MixColumns, 16, 1, {INS_invalid, INS_aesmc, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) -HARDWARE_INTRINSIC(Aes, PolynomialMultiplyWideningLower, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_pmull, INS_pmull, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_Commutative) -HARDWARE_INTRINSIC(Aes, PolynomialMultiplyWideningUpper, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_pmull2, INS_pmull2, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_Commutative) +HARDWARE_INTRINSIC(Aes, Decrypt, 16, 2, {INS_invalid, INS_aesd, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(Aes, Encrypt, 16, 2, {INS_invalid, INS_aese, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(Aes, InverseMixColumns, 16, 1, {INS_invalid, INS_aesimc, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(Aes, MixColumns, 16, 1, {INS_invalid, INS_aesmc, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(Aes, PolynomialMultiplyWideningLower, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_pmull, INS_pmull, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_Commutative) +HARDWARE_INTRINSIC(Aes, PolynomialMultiplyWideningUpper, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_pmull2, INS_pmull2, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_Commutative) // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** -// ISA Function name SIMD size Number of arguments Instructions Category Flags -// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} +// ISA Function name SIMD size Number of arguments Instructions Category Flags +// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** // Base Intrinsics -HARDWARE_INTRINSIC(ArmBase, LeadingZeroCount, 0, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_clz, INS_clz, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Scalar, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoFloatingPointUsed) -HARDWARE_INTRINSIC(ArmBase, ReverseElementBits, 0, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_rbit, INS_rbit, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Scalar, HW_Flag_NoFloatingPointUsed) +HARDWARE_INTRINSIC(ArmBase, LeadingZeroCount, 0, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_clz, INS_clz, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Scalar, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoFloatingPointUsed) +HARDWARE_INTRINSIC(ArmBase, ReverseElementBits, 0, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_rbit, INS_rbit, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Scalar, HW_Flag_NoFloatingPointUsed) // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** -// ISA Function name SIMD size Number of arguments Instructions Category Flags -// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} +// ISA Function name SIMD size Number of arguments Instructions Category Flags +// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** // Base 64-bit only Intrinsics -HARDWARE_INTRINSIC(ArmBase_Arm64, LeadingSignCount, 0, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cls, INS_invalid, INS_cls, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Scalar, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoFloatingPointUsed) -HARDWARE_INTRINSIC(ArmBase_Arm64, LeadingZeroCount, 0, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_clz, INS_clz, INS_invalid, INS_invalid}, HW_Category_Scalar, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoFloatingPointUsed) -HARDWARE_INTRINSIC(ArmBase_Arm64, ReverseElementBits, 0, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_rbit, INS_rbit, INS_invalid, INS_invalid}, HW_Category_Scalar, HW_Flag_NoFloatingPointUsed) +HARDWARE_INTRINSIC(ArmBase_Arm64, LeadingSignCount, 0, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cls, INS_invalid, INS_cls, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Scalar, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoFloatingPointUsed) +HARDWARE_INTRINSIC(ArmBase_Arm64, LeadingZeroCount, 0, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_clz, INS_clz, INS_invalid, INS_invalid}, HW_Category_Scalar, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoFloatingPointUsed) +HARDWARE_INTRINSIC(ArmBase_Arm64, ReverseElementBits, 0, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_rbit, INS_rbit, INS_invalid, INS_invalid}, HW_Category_Scalar, HW_Flag_NoFloatingPointUsed) // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** -// ISA Function name SIMD size Number of arguments Instructions Category Flags -// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} +// ISA Function name SIMD size Number of arguments Instructions Category Flags +// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** // CRC32 Intrinsics -HARDWARE_INTRINSIC(Crc32, ComputeCrc32, 0, 2, {INS_invalid, INS_crc32b, INS_invalid, INS_crc32h, INS_invalid, INS_crc32w, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Scalar, HW_Flag_BaseTypeFromSecondArg|HW_Flag_NoFloatingPointUsed|HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(Crc32, ComputeCrc32C, 0, 2, {INS_invalid, INS_crc32cb, INS_invalid, INS_crc32ch, INS_invalid, INS_crc32cw, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Scalar, HW_Flag_BaseTypeFromSecondArg|HW_Flag_NoFloatingPointUsed|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(Crc32, ComputeCrc32, 0, 2, {INS_invalid, INS_crc32b, INS_invalid, INS_crc32h, INS_invalid, INS_crc32w, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Scalar, HW_Flag_BaseTypeFromSecondArg|HW_Flag_NoFloatingPointUsed|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(Crc32, ComputeCrc32C, 0, 2, {INS_invalid, INS_crc32cb, INS_invalid, INS_crc32ch, INS_invalid, INS_crc32cw, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Scalar, HW_Flag_BaseTypeFromSecondArg|HW_Flag_NoFloatingPointUsed|HW_Flag_SpecialCodeGen) // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** -// ISA Function name SIMD size Number of arguments Instructions Category Flags -// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} +// ISA Function name SIMD size Number of arguments Instructions Category Flags +// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** // CRC32 64-bit only Intrinsics -HARDWARE_INTRINSIC(Crc32_Arm64, ComputeCrc32, 0, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_crc32x, INS_invalid, INS_invalid}, HW_Category_Scalar, HW_Flag_BaseTypeFromSecondArg|HW_Flag_NoFloatingPointUsed|HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(Crc32_Arm64, ComputeCrc32C, 0, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_crc32cx, INS_invalid, INS_invalid}, HW_Category_Scalar, HW_Flag_BaseTypeFromSecondArg|HW_Flag_NoFloatingPointUsed|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(Crc32_Arm64, ComputeCrc32, 0, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_crc32x, INS_invalid, INS_invalid}, HW_Category_Scalar, HW_Flag_BaseTypeFromSecondArg|HW_Flag_NoFloatingPointUsed|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(Crc32_Arm64, ComputeCrc32C, 0, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_crc32cx, INS_invalid, INS_invalid}, HW_Category_Scalar, HW_Flag_BaseTypeFromSecondArg|HW_Flag_NoFloatingPointUsed|HW_Flag_SpecialCodeGen) + +// *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** +// ISA Function name SIMD size Number of arguments Instructions Category Flags +// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} +// *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** +// DP Intrinsics +HARDWARE_INTRINSIC(Dp, DotProduct, -1, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sdot, INS_udot, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(Dp, DotProductBySelectedQuadruplet, -1, 4, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sdot, INS_udot, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) + +// *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** +// ISA Function name SIMD size Number of arguments Instructions Category Flags +// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} +// *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** +// RDM Intrinsics +HARDWARE_INTRINSIC(Rdm, MultiplyRoundedDoublingAndAddSaturateHigh, -1, 3, {INS_invalid, INS_invalid, INS_sqrdmlah, INS_invalid, INS_sqrdmlah, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(Rdm, MultiplyRoundedDoublingAndSubtractSaturateHigh, -1, 3, {INS_invalid, INS_invalid, INS_sqrdmlsh, INS_invalid, INS_sqrdmlsh, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(Rdm, MultiplyRoundedDoublingBySelectedScalarAndAddSaturateHigh, -1, 4, {INS_invalid, INS_invalid, INS_sqrdmlah, INS_invalid, INS_sqrdmlah, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(Rdm, MultiplyRoundedDoublingBySelectedScalarAndSubtractSaturateHigh, -1, 4, {INS_invalid, INS_invalid, INS_sqrdmlsh, INS_invalid, INS_sqrdmlsh, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) + +// *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** +// ISA Function name SIMD size Number of arguments Instructions Category Flags +// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} +// *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** +// RDM 64-bit only Intrinsics +HARDWARE_INTRINSIC(Rdm_Arm64, MultiplyRoundedDoublingAndAddSaturateHighScalar, 8, 3, {INS_invalid, INS_invalid, INS_sqrdmlah, INS_invalid, INS_sqrdmlah, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(Rdm_Arm64, MultiplyRoundedDoublingAndSubtractSaturateHighScalar, 8, 3, {INS_invalid, INS_invalid, INS_sqrdmlsh, INS_invalid, INS_sqrdmlsh, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(Rdm_Arm64, MultiplyRoundedDoublingScalarBySelectedScalarAndAddSaturateHigh, 8, 4, {INS_invalid, INS_invalid, INS_sqrdmlah, INS_invalid, INS_sqrdmlah, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics|HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(Rdm_Arm64, MultiplyRoundedDoublingScalarBySelectedScalarAndSubtractSaturateHigh, 8, 4, {INS_invalid, INS_invalid, INS_sqrdmlsh, INS_invalid, INS_sqrdmlsh, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDByIndexedElement, HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics|HW_Flag_SIMDScalar) // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** -// ISA Function name SIMD size Number of arguments Instructions Category Flags -// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} +// ISA Function name SIMD size Number of arguments Instructions Category Flags +// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** // SHA1 Intrinsics -HARDWARE_INTRINSIC(Sha1, FixedRotate, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sha1h, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) -HARDWARE_INTRINSIC(Sha1, HashUpdateChoose, 16, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sha1c, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(Sha1, HashUpdateMajority, 16, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sha1m, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(Sha1, HashUpdateParity, 16, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sha1p, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(Sha1, ScheduleUpdate0, 16, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sha1su0, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(Sha1, ScheduleUpdate1, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sha1su1, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(Sha1, FixedRotate, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sha1h, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SIMDScalar) +HARDWARE_INTRINSIC(Sha1, HashUpdateChoose, 16, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sha1c, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(Sha1, HashUpdateMajority, 16, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sha1m, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(Sha1, HashUpdateParity, 16, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sha1p, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(Sha1, ScheduleUpdate0, 16, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sha1su0, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(Sha1, ScheduleUpdate1, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sha1su1, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** -// ISA Function name SIMD size Number of arguments Instructions Category Flags -// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} +// ISA Function name SIMD size Number of arguments Instructions Category Flags +// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** // SHA256 Intrinsics -HARDWARE_INTRINSIC(Sha256, HashUpdate1, 16, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sha256h, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(Sha256, HashUpdate2, 16, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sha256h2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(Sha256, ScheduleUpdate0, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sha256su0, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(Sha256, ScheduleUpdate1, 16, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sha256su1, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(Sha256, HashUpdate1, 16, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sha256h, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(Sha256, HashUpdate2, 16, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sha256h2, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(Sha256, ScheduleUpdate0, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sha256su0, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(Sha256, ScheduleUpdate1, 16, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sha256su1, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_HasRMWSemantics) #endif // FEATURE_HW_INTRINSIC diff --git a/src/coreclr/src/jit/hwintrinsiclistxarch.h b/src/coreclr/src/jit/hwintrinsiclistxarch.h index c6017fb12c44..dde116ccfac7 100644 --- a/src/coreclr/src/jit/hwintrinsiclistxarch.h +++ b/src/coreclr/src/jit/hwintrinsiclistxarch.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*****************************************************************************/ #ifndef HARDWARE_INTRINSIC @@ -45,6 +44,7 @@ HARDWARE_INTRINSIC(Vector128, AsVector4, HARDWARE_INTRINSIC(Vector128, AsVector128, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoContainment|HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoRMWSemantics) HARDWARE_INTRINSIC(Vector128, Create, 16, -1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen) HARDWARE_INTRINSIC(Vector128, CreateScalarUnsafe, 16, 1, {INS_mov_i2xmm, INS_mov_i2xmm, INS_mov_i2xmm, INS_mov_i2xmm, INS_mov_i2xmm, INS_mov_i2xmm, INS_mov_i2xmm, INS_mov_i2xmm, INS_movss, INS_movsdsse2}, HW_Category_SIMDScalar, HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen|HW_Flag_NoRMWSemantics) +HARDWARE_INTRINSIC(Vector128, Dot, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_NoCodeGen) // The instruction generated for float/double depends on which ISAs are supported HARDWARE_INTRINSIC(Vector128, get_AllBitsSet, 16, 0, {INS_pcmpeqd, INS_pcmpeqd, INS_pcmpeqd, INS_pcmpeqd, INS_pcmpeqd, INS_pcmpeqd, INS_pcmpeqd, INS_pcmpeqd, INS_cmpps, INS_cmppd}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoContainment|HW_Flag_NoRMWSemantics) HARDWARE_INTRINSIC(Vector128, get_Count, 16, 0, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoContainment|HW_Flag_NoRMWSemantics) @@ -81,6 +81,7 @@ HARDWARE_INTRINSIC(Vector256, get_Count, HARDWARE_INTRINSIC(Vector256, get_Zero, 32, 0, {INS_xorps, INS_xorps, INS_xorps, INS_xorps, INS_xorps, INS_xorps, INS_xorps, INS_xorps, INS_xorps, INS_xorps}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoContainment|HW_Flag_NoRMWSemantics) HARDWARE_INTRINSIC(Vector256, Create, 32, -1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen) HARDWARE_INTRINSIC(Vector256, CreateScalarUnsafe, 32, 1, {INS_mov_i2xmm, INS_mov_i2xmm, INS_mov_i2xmm, INS_mov_i2xmm, INS_mov_i2xmm, INS_mov_i2xmm, INS_mov_i2xmm, INS_mov_i2xmm, INS_movss, INS_movsdsse2}, HW_Category_SIMDScalar, HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen|HW_Flag_NoRMWSemantics) +HARDWARE_INTRINSIC(Vector256, Dot, 32, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_NoCodeGen) HARDWARE_INTRINSIC(Vector256, GetElement, 32, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoContainment|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector256, GetLower, 32, 1, {INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_movups, INS_movupd}, HW_Category_SimpleSIMD, HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen|HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoRMWSemantics) HARDWARE_INTRINSIC(Vector256, op_Equality, 32, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_NoCodeGen) @@ -346,7 +347,7 @@ HARDWARE_INTRINSIC(SSE3, MoveLowAndDuplicate, // SSSE3 Intrinsics HARDWARE_INTRINSIC(SSSE3, Abs, 16, 1, {INS_pabsb, INS_invalid, INS_pabsw, INS_invalid, INS_pabsd, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_NoRMWSemantics|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(SSSE3, AlignRight, 16, 3, {INS_palignr, INS_palignr, INS_palignr, INS_palignr, INS_palignr, INS_palignr, INS_palignr, INS_palignr, INS_invalid, INS_invalid}, HW_Category_IMM, HW_Flag_FullRangeIMM) -HARDWARE_INTRINSIC(SSSE3, HorizontalAdd, 16, 2, {INS_invalid, INS_invalid, INS_phaddw, INS_invalid, INS_phaddd, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(SSSE3, HorizontalAdd, 16, 2, {INS_invalid, INS_invalid, INS_phaddw, INS_phaddw, INS_phaddd, INS_phaddd, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_NoFlag) HARDWARE_INTRINSIC(SSSE3, HorizontalAddSaturate, 16, 2, {INS_invalid, INS_invalid, INS_phaddsw, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_NoFlag) HARDWARE_INTRINSIC(SSSE3, HorizontalSubtract, 16, 2, {INS_invalid, INS_invalid, INS_phsubw, INS_invalid, INS_phsubd, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_NoFlag) HARDWARE_INTRINSIC(SSSE3, HorizontalSubtractSaturate, 16, 2, {INS_invalid, INS_invalid, INS_phsubsw, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_NoFlag) @@ -527,7 +528,7 @@ HARDWARE_INTRINSIC(AVX2, GatherVector128, HARDWARE_INTRINSIC(AVX2, GatherVector256, 32, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vpgatherdd, INS_vpgatherdd, INS_vpgatherdq, INS_vpgatherdq, INS_vgatherdps, INS_vgatherdpd}, HW_Category_IMM, HW_Flag_MaybeMemoryLoad|HW_Flag_SpecialCodeGen|HW_Flag_NoContainment) HARDWARE_INTRINSIC(AVX2, GatherMaskVector128, 16, 5, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vpgatherdd, INS_vpgatherdd, INS_vpgatherdq, INS_vpgatherdq, INS_vgatherdps, INS_vgatherdpd}, HW_Category_IMM, HW_Flag_MaybeMemoryLoad|HW_Flag_SpecialCodeGen|HW_Flag_SpecialImport|HW_Flag_NoContainment) HARDWARE_INTRINSIC(AVX2, GatherMaskVector256, 32, 5, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vpgatherdd, INS_vpgatherdd, INS_vpgatherdq, INS_vpgatherdq, INS_vgatherdps, INS_vgatherdpd}, HW_Category_IMM, HW_Flag_MaybeMemoryLoad|HW_Flag_SpecialCodeGen|HW_Flag_SpecialImport|HW_Flag_NoContainment) -HARDWARE_INTRINSIC(AVX2, HorizontalAdd, 32, 2, {INS_invalid, INS_invalid, INS_phaddw, INS_invalid, INS_phaddd, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AVX2, HorizontalAdd, 32, 2, {INS_invalid, INS_invalid, INS_phaddw, INS_phaddw, INS_phaddd, INS_phaddd, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_NoFlag) HARDWARE_INTRINSIC(AVX2, HorizontalAddSaturate, 32, 2, {INS_invalid, INS_invalid, INS_phaddsw, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_NoFlag) HARDWARE_INTRINSIC(AVX2, HorizontalSubtract, 32, 2, {INS_invalid, INS_invalid, INS_phsubw, INS_invalid, INS_phsubd, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_NoFlag) HARDWARE_INTRINSIC(AVX2, HorizontalSubtractSaturate, 32, 2, {INS_invalid, INS_invalid, INS_phsubsw, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_NoFlag) diff --git a/src/coreclr/src/jit/hwintrinsicxarch.cpp b/src/coreclr/src/jit/hwintrinsicxarch.cpp index c7dfaf5f7311..8d7824ea189b 100644 --- a/src/coreclr/src/jit/hwintrinsicxarch.cpp +++ b/src/coreclr/src/jit/hwintrinsicxarch.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "jitpch.h" #include "hwintrinsic.h" @@ -25,16 +24,30 @@ static CORINFO_InstructionSet X64VersionOfIsa(CORINFO_InstructionSet isa) return InstructionSet_SSE_X64; case InstructionSet_SSE2: return InstructionSet_SSE2_X64; + case InstructionSet_SSE3: + return InstructionSet_SSE3_X64; + case InstructionSet_SSSE3: + return InstructionSet_SSSE3_X64; case InstructionSet_SSE41: return InstructionSet_SSE41_X64; case InstructionSet_SSE42: return InstructionSet_SSE42_X64; + case InstructionSet_AVX: + return InstructionSet_AVX_X64; + case InstructionSet_AVX2: + return InstructionSet_AVX2_X64; + case InstructionSet_AES: + return InstructionSet_AES_X64; case InstructionSet_BMI1: return InstructionSet_BMI1_X64; case InstructionSet_BMI2: return InstructionSet_BMI2_X64; + case InstructionSet_FMA: + return InstructionSet_FMA_X64; case InstructionSet_LZCNT: return InstructionSet_LZCNT_X64; + case InstructionSet_PCLMULQDQ: + return InstructionSet_PCLMULQDQ_X64; case InstructionSet_POPCNT: return InstructionSet_POPCNT_X64; default: @@ -330,16 +343,21 @@ bool HWIntrinsicInfo::isFullyImplementedIsa(CORINFO_InstructionSet isa) { // These ISAs are fully implemented case InstructionSet_AES: + case InstructionSet_AES_X64: case InstructionSet_AVX: + case InstructionSet_AVX_X64: case InstructionSet_AVX2: + case InstructionSet_AVX2_X64: case InstructionSet_BMI1: - case InstructionSet_BMI2: case InstructionSet_BMI1_X64: + case InstructionSet_BMI2: case InstructionSet_BMI2_X64: case InstructionSet_FMA: + case InstructionSet_FMA_X64: case InstructionSet_LZCNT: case InstructionSet_LZCNT_X64: case InstructionSet_PCLMULQDQ: + case InstructionSet_PCLMULQDQ_X64: case InstructionSet_POPCNT: case InstructionSet_POPCNT_X64: case InstructionSet_SSE: @@ -347,7 +365,9 @@ bool HWIntrinsicInfo::isFullyImplementedIsa(CORINFO_InstructionSet isa) case InstructionSet_SSE2: case InstructionSet_SSE2_X64: case InstructionSet_SSE3: + case InstructionSet_SSE3_X64: case InstructionSet_SSSE3: + case InstructionSet_SSSE3_X64: case InstructionSet_SSE41: case InstructionSet_SSE41_X64: case InstructionSet_SSE42: @@ -380,8 +400,8 @@ bool HWIntrinsicInfo::isScalarIsa(CORINFO_InstructionSet isa) switch (isa) { case InstructionSet_BMI1: - case InstructionSet_BMI2: case InstructionSet_BMI1_X64: + case InstructionSet_BMI2: case InstructionSet_BMI2_X64: case InstructionSet_LZCNT: case InstructionSet_LZCNT_X64: @@ -790,10 +810,93 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, { assert(sig->numArgs == 1); - if (compExactlyDependsOn(InstructionSet_SSE) && varTypeIsFloating(baseType)) + bool isSupported = false; + + switch (baseType) + { + case TYP_BYTE: + case TYP_UBYTE: + case TYP_SHORT: + case TYP_USHORT: + case TYP_INT: + case TYP_UINT: + { + isSupported = compExactlyDependsOn(InstructionSet_SSE2); + break; + } + + case TYP_LONG: + case TYP_ULONG: + { + isSupported = compExactlyDependsOn(InstructionSet_SSE2_X64); + break; + } + + case TYP_FLOAT: + case TYP_DOUBLE: + { + isSupported = compExactlyDependsOn(InstructionSet_SSE); + break; + } + + default: + { + unreached(); + } + } + + if (isSupported) { op1 = impSIMDPopStack(getSIMDTypeForSize(simdSize)); - retNode = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, baseType, 16); + retNode = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, baseType, simdSize); + } + break; + } + + case NI_Vector256_ToScalar: + { + assert(sig->numArgs == 1); + + bool isSupported = false; + + switch (baseType) + { + case TYP_BYTE: + case TYP_UBYTE: + case TYP_SHORT: + case TYP_USHORT: + case TYP_INT: + case TYP_UINT: + { + isSupported = compExactlyDependsOn(InstructionSet_AVX); + break; + } + + case TYP_LONG: + case TYP_ULONG: + { + isSupported = + compExactlyDependsOn(InstructionSet_AVX) && compExactlyDependsOn(InstructionSet_SSE2_X64); + break; + } + + case TYP_FLOAT: + case TYP_DOUBLE: + { + isSupported = compExactlyDependsOn(InstructionSet_AVX); + break; + } + + default: + { + unreached(); + } + } + + if (isSupported) + { + op1 = impSIMDPopStack(getSIMDTypeForSize(simdSize)); + retNode = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, baseType, simdSize); } break; } @@ -846,18 +949,6 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, break; } - case NI_Vector256_ToScalar: - { - assert(sig->numArgs == 1); - - if (compExactlyDependsOn(InstructionSet_AVX) && varTypeIsFloating(baseType)) - { - op1 = impSIMDPopStack(getSIMDTypeForSize(simdSize)); - retNode = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, baseType, 32); - } - break; - } - case NI_Vector256_get_Zero: case NI_Vector256_get_AllBitsSet: { diff --git a/src/coreclr/src/jit/importer.cpp b/src/coreclr/src/jit/importer.cpp index 1caa1836cdd1..10b760702ccc 100644 --- a/src/coreclr/src/jit/importer.cpp +++ b/src/coreclr/src/jit/importer.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -199,7 +198,7 @@ inline void DECLSPEC_NORETURN Compiler::verRaiseVerifyException(INDEBUG(const ch // helper function that will tell us if the IL instruction at the addr passed // by param consumes an address at the top of the stack. We use it to save // us lvAddrTaken -bool Compiler::impILConsumesAddr(const BYTE* codeAddr, CORINFO_METHOD_HANDLE fncHandle, CORINFO_MODULE_HANDLE scpHandle) +bool Compiler::impILConsumesAddr(const BYTE* codeAddr) { assert(!compIsForInlining()); @@ -1888,22 +1887,43 @@ GenTree* Compiler::impLookupToTree(CORINFO_RESOLVED_TOKEN* pResolvedToken, { pIndirection = pLookup->constLookup.addr; } - return gtNewIconEmbHndNode(handle, pIndirection, handleFlags, compileTimeHandle); + GenTree* addr = gtNewIconEmbHndNode(handle, pIndirection, handleFlags, compileTimeHandle); + +#ifdef DEBUG + size_t handleToTrack; + if (handleFlags == GTF_ICON_TOKEN_HDL) + { + handleToTrack = 0; + } + else + { + handleToTrack = (size_t)compileTimeHandle; + } + + if (handle != nullptr) + { + addr->AsIntCon()->gtTargetHandle = handleToTrack; + } + else + { + addr->gtGetOp1()->AsIntCon()->gtTargetHandle = handleToTrack; + } +#endif + return addr; } - else if (compIsForInlining()) + + if (pLookup->lookupKind.runtimeLookupKind == CORINFO_LOOKUP_NOT_SUPPORTED) { - // Don't import runtime lookups when inlining + // Runtime does not support inlining of all shapes of runtime lookups // Inlining has to be aborted in such a case + assert(compIsForInlining()); compInlineResult->NoteFatal(InlineObservation::CALLSITE_GENERIC_DICTIONARY_LOOKUP); return nullptr; } - else - { - // Need to use dictionary-based access which depends on the typeContext - // which is only available at runtime, not at compile-time. - return impRuntimeLookupToTree(pResolvedToken, pLookup, compileTimeHandle); - } + // Need to use dictionary-based access which depends on the typeContext + // which is only available at runtime, not at compile-time. + return impRuntimeLookupToTree(pResolvedToken, pLookup, compileTimeHandle); } #ifdef FEATURE_READYTORUN_COMPILER @@ -1923,7 +1943,19 @@ GenTree* Compiler::impReadyToRunLookupToTree(CORINFO_CONST_LOOKUP* pLookup, { pIndirection = pLookup->addr; } - return gtNewIconEmbHndNode(handle, pIndirection, handleFlags, compileTimeHandle); + GenTree* addr = gtNewIconEmbHndNode(handle, pIndirection, handleFlags, compileTimeHandle); +#ifdef DEBUG + assert((handleFlags == GTF_ICON_CLASS_HDL) || (handleFlags == GTF_ICON_METHOD_HDL)); + if (handle != nullptr) + { + addr->AsIntCon()->gtTargetHandle = (size_t)compileTimeHandle; + } + else + { + addr->gtGetOp1()->AsIntCon()->gtTargetHandle = (size_t)compileTimeHandle; + } +#endif // DEBUG + return addr; } GenTreeCall* Compiler::impReadyToRunHelperToTree( @@ -1965,14 +1997,6 @@ GenTree* Compiler::impMethodPointer(CORINFO_RESOLVED_TOKEN* pResolvedToken, CORI break; case CORINFO_CALL_CODE_POINTER: - if (compIsForInlining()) - { - // Don't import runtime lookups when inlining - // Inlining has to be aborted in such a case - compInlineResult->NoteFatal(InlineObservation::CALLSITE_GENERIC_DICTIONARY_LOOKUP); - return nullptr; - } - op1 = impLookupToTree(pResolvedToken, &pCallInfo->codePointerLookup, GTF_ICON_FTN_ADDR, pCallInfo->hMethod); break; @@ -2005,10 +2029,12 @@ GenTree* Compiler::getRuntimeContextTree(CORINFO_RUNTIME_LOOKUP_KIND kind) // context parameter is this that we don't need the eager reporting logic.) lvaGenericsContextInUse = true; + Compiler* pRoot = impInlineRoot(); + if (kind == CORINFO_LOOKUP_THISOBJ) { // this Object - ctxTree = gtNewLclvNode(info.compThisArg, TYP_REF); + ctxTree = gtNewLclvNode(pRoot->info.compThisArg, TYP_REF); ctxTree->gtFlags |= GTF_VAR_CONTEXT; // Vtable pointer of this object @@ -2020,7 +2046,8 @@ GenTree* Compiler::getRuntimeContextTree(CORINFO_RUNTIME_LOOKUP_KIND kind) { assert(kind == CORINFO_LOOKUP_METHODPARAM || kind == CORINFO_LOOKUP_CLASSPARAM); - ctxTree = gtNewLclvNode(info.compTypeCtxtArg, TYP_I_IMPL); // Exact method descriptor as passed in as last arg + // Exact method descriptor as passed in + ctxTree = gtNewLclvNode(pRoot->info.compTypeCtxtArg, TYP_I_IMPL); ctxTree->gtFlags |= GTF_VAR_CONTEXT; } return ctxTree; @@ -2048,11 +2075,6 @@ GenTree* Compiler::impRuntimeLookupToTree(CORINFO_RESOLVED_TOKEN* pResolvedToken CORINFO_LOOKUP* pLookup, void* compileTimeHandle) { - - // This method can only be called from the importer instance of the Compiler. - // In other word, it cannot be called by the instance of the Compiler for the inlinee. - assert(!compIsForInlining()); - GenTree* ctxTree = getRuntimeContextTree(pLookup->lookupKind.runtimeLookupKind); CORINFO_RUNTIME_LOOKUP* pRuntimeLookup = &pLookup->runtimeLookup; @@ -3407,6 +3429,9 @@ GenTree* Compiler::impInitializeArrayIntrinsic(CORINFO_SIG_INFO* sig) GenTree* dstAddr = gtNewOperNode(GT_ADD, TYP_BYREF, arrayLocalNode, gtNewIconNode(dataOffset, TYP_I_IMPL)); GenTree* dst = new (this, GT_BLK) GenTreeBlk(GT_BLK, TYP_STRUCT, dstAddr, typGetBlkLayout(blkSize)); GenTree* src = gtNewIndOfIconHandleNode(TYP_STRUCT, (size_t)initData, GTF_ICON_STATIC_HDL, false); +#ifdef DEBUG + src->gtGetOp1()->AsIntCon()->gtTargetHandle = THT_IntializeArrayIntrinsics; +#endif return gtNewBlkOpNode(dst, // dst src, // src @@ -3530,7 +3555,11 @@ GenTree* Compiler::impIntrinsic(GenTree* newobjThis, if ((ni > NI_SIMD_AS_HWINTRINSIC_START) && (ni < NI_SIMD_AS_HWINTRINSIC_END)) { - return impSimdAsHWIntrinsic(ni, clsHnd, method, sig, mustExpand); + // These intrinsics aren't defined recursively and so they will never be mustExpand + // Instead, they provide software fallbacks that will be executed instead. + + assert(!mustExpand); + return impSimdAsHWIntrinsic(ni, clsHnd, method, sig, newobjThis); } #endif // FEATURE_HW_INTRINSICS } @@ -4010,7 +4039,7 @@ GenTree* Compiler::impIntrinsic(GenTree* newobjThis, { noway_assert(IsTargetAbi(CORINFO_CORERT_ABI)); // Only CoreRT supports it. CORINFO_RESOLVED_TOKEN resolvedToken; - resolvedToken.tokenContext = MAKE_METHODCONTEXT(info.compMethodHnd); + resolvedToken.tokenContext = impTokenLookupContextHandle; resolvedToken.tokenScope = info.compScopeHnd; resolvedToken.token = memberRef; resolvedToken.tokenType = CORINFO_TOKENKIND_Method; @@ -6892,14 +6921,27 @@ void Compiler::impPopArgsForUnmanagedCall(GenTree* call, CORINFO_SIG_INFO* sig) for (GenTreeCall::Use& argUse : GenTreeCall::UseList(args)) { - // We should not be passing gc typed args to an unmanaged call. GenTree* arg = argUse.GetNode(); + call->gtFlags |= arg->gtFlags & GTF_GLOB_EFFECT; + + // We should not be passing gc typed args to an unmanaged call. if (varTypeIsGC(arg->TypeGet())) { - assert(!"*** invalid IL: gc type passed to unmanaged call"); + // Tolerate byrefs by retyping to native int. + // + // This is needed or we'll generate inconsistent GC info + // for this arg at the call site (gc info says byref, + // pinvoke sig says native int). + // + if (arg->TypeGet() == TYP_BYREF) + { + arg->ChangeType(TYP_I_IMPL); + } + else + { + assert(!"*** invalid IL: gc ref passed to unmanaged call"); + } } - - call->gtFlags |= arg->gtFlags & GTF_GLOB_EFFECT; } } @@ -7086,7 +7128,8 @@ GenTree* Compiler::impImportStaticFieldAccess(CORINFO_RESOLVED_TOKEN* pResolvedT case CORINFO_FIELD_STATIC_READYTORUN_HELPER: { #ifdef FEATURE_READYTORUN_COMPILER - noway_assert(opts.IsReadyToRun()); + assert(opts.IsReadyToRun()); + assert(!compIsForInlining()); CORINFO_LOOKUP_KIND kind; info.compCompHnd->getLocationOfThisType(info.compMethodHnd, &kind); assert(kind.needsRuntimeLookup); @@ -7159,6 +7202,9 @@ GenTree* Compiler::impImportStaticFieldAccess(CORINFO_RESOLVED_TOKEN* pResolvedT /* Create the data member node */ op1 = gtNewIconHandleNode(pFldAddr == nullptr ? (size_t)fldAddr : (size_t)pFldAddr, GTF_ICON_STATIC_HDL, fldSeq); +#ifdef DEBUG + op1->AsIntCon()->gtTargetHandle = op1->AsIntCon()->gtIconVal; +#endif if (pFieldInfo->fieldFlags & CORINFO_FLG_FIELD_INITCLASS) { @@ -7630,14 +7676,6 @@ var_types Compiler::impImportCall(OPCODE opcode, return TYP_UNDEF; } - /* For now ignore delegate invoke */ - - if (mflags & CORINFO_FLG_DELEGATE_INVOKE) - { - compInlineResult->NoteFatal(InlineObservation::CALLEE_HAS_DELEGATE_INVOKE); - return TYP_UNDEF; - } - /* For now ignore varargs */ if ((sig->callConv & CORINFO_CALLCONV_MASK) == CORINFO_CALLCONV_NATIVEVARARG) { @@ -7759,20 +7797,10 @@ var_types Compiler::impImportCall(OPCODE opcode, assert(!(clsFlags & CORINFO_FLG_VALUECLASS)); if (callInfo->stubLookup.lookupKind.needsRuntimeLookup) { - - if (compIsForInlining()) + if (callInfo->stubLookup.lookupKind.runtimeLookupKind == CORINFO_LOOKUP_NOT_SUPPORTED) { - // Don't import runtime lookups when inlining + // Runtime does not support inlining of all shapes of runtime lookups // Inlining has to be aborted in such a case - /* XXX Fri 3/20/2009 - * By the way, this would never succeed. If the handle lookup is into the generic - * dictionary for a candidate, you'll generate different dictionary offsets and the - * inlined code will crash. - * - * To anyone code reviewing this, when could this ever succeed in the future? It'll - * always have a handle lookup. These lookups are safe intra-module, but we're just - * failing here. - */ compInlineResult->NoteFatal(InlineObservation::CALLSITE_HAS_COMPLEX_HANDLE); return TYP_UNDEF; } @@ -8004,7 +8032,6 @@ var_types Compiler::impImportCall(OPCODE opcode, if (mflags & CORINFO_FLG_DELEGATE_INVOKE) { - assert(!compIsForInlining()); assert(!(mflags & CORINFO_FLG_STATIC)); // can't call a static method assert(mflags & CORINFO_FLG_FINAL); @@ -8249,6 +8276,8 @@ var_types Compiler::impImportCall(OPCODE opcode, // Instantiated generic method if (((SIZE_T)exactContextHnd & CORINFO_CONTEXTFLAGS_MASK) == CORINFO_CONTEXTFLAGS_METHOD) { + assert(exactContextHnd != METHOD_BEING_COMPILED_CONTEXT()); + CORINFO_METHOD_HANDLE exactMethodHandle = (CORINFO_METHOD_HANDLE)((SIZE_T)exactContextHnd & ~CORINFO_CONTEXTFLAGS_MASK); @@ -8288,8 +8317,7 @@ var_types Compiler::impImportCall(OPCODE opcode, else { assert(((SIZE_T)exactContextHnd & CORINFO_CONTEXTFLAGS_MASK) == CORINFO_CONTEXTFLAGS_CLASS); - CORINFO_CLASS_HANDLE exactClassHandle = - (CORINFO_CLASS_HANDLE)((SIZE_T)exactContextHnd & ~CORINFO_CONTEXTFLAGS_MASK); + CORINFO_CLASS_HANDLE exactClassHandle = eeGetClassFromContext(exactContextHnd); if (compIsForInlining() && (clsFlags & CORINFO_FLG_ARRAY) != 0) { @@ -8350,17 +8378,6 @@ var_types Compiler::impImportCall(OPCODE opcode, extraArg = gtNewCallArgs(instParam); } - // Inlining may need the exact type context (exactContextHnd) if we're inlining shared generic code, in particular - // to inline 'polytypic' operations such as static field accesses, type tests and method calls which - // rely on the exact context. The exactContextHnd is passed back to the JitInterface at appropriate points. - // exactContextHnd is not currently required when inlining shared generic code into shared - // generic code, since the inliner aborts whenever shared code polytypic operations are encountered - // (e.g. anything marked needsRuntimeLookup) - if (exactContextNeedsRuntimeLookup) - { - exactContextHnd = nullptr; - } - if ((opcode == CEE_NEWOBJ) && ((clsFlags & CORINFO_FLG_DELEGATE) != 0)) { // Only verifiable cases are supported. @@ -8670,12 +8687,6 @@ var_types Compiler::impImportCall(OPCODE opcode, JITDUMP("\nOSR: found tail recursive call in the method, scheduling " FMT_BB " for importation\n", fgEntryBB->bbNum); impImportBlockPending(fgEntryBB); - - // Note there is no explicit flow to this block yet, - // make sure it stays around until we actually try - // the optimization. - fgEntryBB->bbFlags |= BBF_DONT_REMOVE; - loopHead = fgEntryBB; } else @@ -8809,7 +8820,7 @@ var_types Compiler::impImportCall(OPCODE opcode, impAppendTree(call, (unsigned)CHECK_SPILL_ALL, impCurStmtOffs); // TODO: Still using the widened type. - GenTree* retExpr = gtNewInlineCandidateReturnExpr(call, genActualType(callRetTyp)); + GenTree* retExpr = gtNewInlineCandidateReturnExpr(call, genActualType(callRetTyp), compCurBB->bbFlags); // Link the retExpr to the call so if necessary we can manipulate it later. origCall->gtInlineCandidateInfo->retExpr = retExpr; @@ -9282,7 +9293,8 @@ GenTree* Compiler::impFixupStructReturnType(GenTree* op, CORINFO_CLASS_HANDLE re { // It is possible that we now have a lclVar of scalar type. // If so, don't transform it to GT_LCL_FLD. - if (lvaTable[op->AsLclVar()->GetLclNum()].lvType != info.compRetNativeType) + LclVarDsc* varDsc = lvaGetDesc(op->AsLclVarCommon()); + if (genActualType(varDsc->TypeGet()) != genActualType(info.compRetNativeType)) { op->ChangeOper(GT_LCL_FLD); } @@ -18715,18 +18727,14 @@ void Compiler::impCheckCanInline(GenTreeCall* call, } // Speculatively check if initClass() can be done. - // If it can be done, we will try to inline the method. If inlining - // succeeds, then we will do the non-speculative initClass() and commit it. - // If this speculative call to initClass() fails, there is no point - // trying to inline this method. + // If it can be done, we will try to inline the method. initClassResult = pParam->pThis->info.compCompHnd->initClass(nullptr /* field */, pParam->fncHandle /* method */, - pParam->exactContextHnd /* context */, - TRUE /* speculative */); + pParam->exactContextHnd /* context */); if (initClassResult & CORINFO_INITCLASS_DONT_INLINE) { - pParam->result->NoteFatal(InlineObservation::CALLSITE_CLASS_INIT_FAILURE_SPEC); + pParam->result->NoteFatal(InlineObservation::CALLSITE_CANT_CLASS_INIT); goto _exit; } @@ -20675,7 +20683,8 @@ void Compiler::impDevirtualizeCall(GenTreeCall* call, // final method that objClass inherits. CORINFO_CLASS_HANDLE derivedClass = info.compCompHnd->getMethodClass(derivedMethod); - // Need to update call info too. This is fragile + // Need to update call info too. This is fragile and suboptimal + // https://github.com/dotnet/runtime/issues/38477 // but hopefully the derived method conforms to // the base in most other ways. *method = derivedMethod; diff --git a/src/coreclr/src/jit/indirectcalltransformer.cpp b/src/coreclr/src/jit/indirectcalltransformer.cpp index 219e12902642..ebbce239d168 100644 --- a/src/coreclr/src/jit/indirectcalltransformer.cpp +++ b/src/coreclr/src/jit/indirectcalltransformer.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "jitpch.h" #ifdef _MSC_VER @@ -738,7 +737,7 @@ class IndirectCallTransformer // we set all this up in FixupRetExpr(). if (oldRetExpr != nullptr) { - GenTree* retExpr = compiler->gtNewInlineCandidateReturnExpr(call, call->TypeGet()); + GenTree* retExpr = compiler->gtNewInlineCandidateReturnExpr(call, call->TypeGet(), thenBlock->bbFlags); inlineInfo->retExpr = retExpr; if (returnTemp != BAD_VAR_NUM) diff --git a/src/coreclr/src/jit/inline.cpp b/src/coreclr/src/jit/inline.cpp index d582c20b1448..9b4d6f168614 100644 --- a/src/coreclr/src/jit/inline.cpp +++ b/src/coreclr/src/jit/inline.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "jitpch.h" #ifdef _MSC_VER @@ -1151,8 +1150,16 @@ void InlineStrategy::NoteOutcome(InlineContext* context) bool InlineStrategy::BudgetCheck(unsigned ilSize) { - int timeDelta = EstimateInlineTime(ilSize); - return (timeDelta + m_CurrentTimeEstimate > m_CurrentTimeBudget); + const int timeDelta = EstimateInlineTime(ilSize); + const bool result = (timeDelta + m_CurrentTimeEstimate > m_CurrentTimeBudget); + + if (result) + { + JITDUMP("\nBudgetCheck: for IL Size %d, timeDelta %d + currentEstimate %d > currentBudget %d\n", ilSize, + timeDelta, m_CurrentTimeEstimate, m_CurrentTimeBudget); + } + + return result; } //------------------------------------------------------------------------ diff --git a/src/coreclr/src/jit/inline.def b/src/coreclr/src/jit/inline.def index 886572094c0c..639180246c3f 100644 --- a/src/coreclr/src/jit/inline.def +++ b/src/coreclr/src/jit/inline.def @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // Macro template for inline observations // @@ -28,10 +27,8 @@ INLINE_OBSERVATION(UNUSED_INITIAL, bool, "unused initial observatio INLINE_OBSERVATION(BAD_ARGUMENT_NUMBER, bool, "invalid argument number", FATAL, CALLEE) INLINE_OBSERVATION(BAD_LOCAL_NUMBER, bool, "invalid local number", FATAL, CALLEE) -INLINE_OBSERVATION(CLASS_INIT_FAILURE, bool, "class init failed", FATAL, CALLEE) INLINE_OBSERVATION(COMPILATION_ERROR, bool, "compilation error", FATAL, CALLEE) INLINE_OBSERVATION(EXCEEDS_THRESHOLD, bool, "exceeds profit threshold", FATAL, CALLEE) -INLINE_OBSERVATION(HAS_DELEGATE_INVOKE, bool, "delegate invoke", FATAL, CALLEE) INLINE_OBSERVATION(HAS_EH, bool, "has exception handling", FATAL, CALLEE) INLINE_OBSERVATION(HAS_ENDFILTER, bool, "has endfilter", FATAL, CALLEE) INLINE_OBSERVATION(HAS_ENDFINALLY, bool, "has endfinally", FATAL, CALLEE) @@ -120,7 +117,7 @@ INLINE_OBSERVATION(ARG_NO_BASH_TO_REF, bool, "argument can't bash to re INLINE_OBSERVATION(ARG_TYPES_INCOMPATIBLE, bool, "argument types incompatible", FATAL, CALLSITE) INLINE_OBSERVATION(CANT_EMBED_PINVOKE_COOKIE, bool, "can't embed pinvoke cookie", FATAL, CALLSITE) INLINE_OBSERVATION(CANT_EMBED_VARARGS_COOKIE, bool, "can't embed varargs cookie", FATAL, CALLSITE) -INLINE_OBSERVATION(CLASS_INIT_FAILURE_SPEC, bool, "speculative class init failed", FATAL, CALLSITE) +INLINE_OBSERVATION(CANT_CLASS_INIT, bool, "can't class init", FATAL, CALLSITE) INLINE_OBSERVATION(COMPILATION_ERROR, bool, "compilation error", FATAL, CALLSITE) INLINE_OBSERVATION(COMPILATION_FAILURE, bool, "failed to compile", FATAL, CALLSITE) INLINE_OBSERVATION(CROSS_BOUNDARY_CALLI, bool, "cross-boundary calli", FATAL, CALLSITE) diff --git a/src/coreclr/src/jit/inline.h b/src/coreclr/src/jit/inline.h index 4fd585de9ff8..1019341de999 100644 --- a/src/coreclr/src/jit/inline.h +++ b/src/coreclr/src/jit/inline.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // Inlining Support // diff --git a/src/coreclr/src/jit/inlinepolicy.cpp b/src/coreclr/src/jit/inlinepolicy.cpp index 28ab5dadffa1..8852991cf200 100644 --- a/src/coreclr/src/jit/inlinepolicy.cpp +++ b/src/coreclr/src/jit/inlinepolicy.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "jitpch.h" #ifdef _MSC_VER @@ -369,14 +368,33 @@ void DefaultPolicy::NoteBool(InlineObservation obs, bool value) // the candidate IL size during the inlining pass it // "reestablishes" candidacy rather than alters // candidacy ... so instead we bail out here. - + // if (!m_IsPrejitRoot) { InlineStrategy* strategy = m_RootCompiler->m_inlineStrategy; - bool overBudget = strategy->BudgetCheck(m_CodeSize); + const bool overBudget = strategy->BudgetCheck(m_CodeSize); + if (overBudget) { - SetFailure(InlineObservation::CALLSITE_OVER_BUDGET); + // If the candidate is a forceinline and the callsite is + // not too deep, allow the inline even if it goes over budget. + // + // For now, "not too deep" means a top-level inline. Note + // depth 0 is used for the root method, so inline candidate depth + // will be 1 or more. + // + assert(m_IsForceInlineKnown); + assert(m_CallsiteDepth > 0); + const bool allowOverBudget = m_IsForceInline && (m_CallsiteDepth == 1); + + if (allowOverBudget) + { + JITDUMP("Allowing over-budget top-level forceinline\n"); + } + else + { + SetFailure(InlineObservation::CALLSITE_OVER_BUDGET); + } } } @@ -531,9 +549,9 @@ void DefaultPolicy::NoteInt(InlineObservation obs, int value) case InlineObservation::CALLSITE_DEPTH: { - unsigned depth = static_cast(value); + m_CallsiteDepth = static_cast(value); - if (depth > m_RootCompiler->m_inlineStrategy->GetMaxInlineDepth()) + if (m_CallsiteDepth > m_RootCompiler->m_inlineStrategy->GetMaxInlineDepth()) { SetFailure(InlineObservation::CALLSITE_IS_TOO_DEEP); } @@ -1110,7 +1128,6 @@ void RandomPolicy::DetermineProfitability(CORINFO_METHOD_INFO* methodInfo) // clang-format off DiscretionaryPolicy::DiscretionaryPolicy(Compiler* compiler, bool isPrejitRoot) : DefaultPolicy(compiler, isPrejitRoot) - , m_Depth(0) , m_BlockCount(0) , m_Maxstack(0) , m_ArgCount(0) @@ -1253,10 +1270,6 @@ void DiscretionaryPolicy::NoteInt(InlineObservation obs, int value) m_BlockCount = value; break; - case InlineObservation::CALLSITE_DEPTH: - m_Depth = value; - break; - case InlineObservation::CALLSITE_WEIGHT: m_CallSiteWeight = static_cast(value); break; @@ -1791,7 +1804,6 @@ void DiscretionaryPolicy::DumpSchema(FILE* file) const fprintf(file, ",CallsiteFrequency"); fprintf(file, ",InstructionCount"); fprintf(file, ",LoadStoreCount"); - fprintf(file, ",Depth"); fprintf(file, ",BlockCount"); fprintf(file, ",Maxstack"); fprintf(file, ",ArgCount"); @@ -1858,6 +1870,7 @@ void DiscretionaryPolicy::DumpSchema(FILE* file) const fprintf(file, ",CallerHasNewObj"); fprintf(file, ",CalleeDoesNotReturn"); fprintf(file, ",CalleeHasGCStruct"); + fprintf(file, ",CallsiteDepth"); } //------------------------------------------------------------------------ @@ -1873,7 +1886,6 @@ void DiscretionaryPolicy::DumpData(FILE* file) const fprintf(file, ",%u", m_CallsiteFrequency); fprintf(file, ",%u", m_InstructionCount); fprintf(file, ",%u", m_LoadStoreCount); - fprintf(file, ",%u", m_Depth); fprintf(file, ",%u", m_BlockCount); fprintf(file, ",%u", m_Maxstack); fprintf(file, ",%u", m_ArgCount); @@ -1940,6 +1952,7 @@ void DiscretionaryPolicy::DumpData(FILE* file) const fprintf(file, ",%u", m_CallerHasNewObj ? 1 : 0); fprintf(file, ",%u", m_IsNoReturn ? 1 : 0); fprintf(file, ",%u", m_CalleeHasGCStruct ? 1 : 0); + fprintf(file, ",%u", m_CallsiteDepth); } #endif // defined(DEBUG) || defined(INLINE_DATA) @@ -2013,7 +2026,7 @@ void ModelPolicy::NoteInt(InlineObservation obs, int value) { unsigned depthLimit = m_RootCompiler->m_inlineStrategy->GetMaxInlineDepth(); - if (m_Depth > depthLimit) + if (m_CallsiteDepth > depthLimit) { SetFailure(InlineObservation::CALLSITE_IS_TOO_DEEP); return; @@ -2178,7 +2191,7 @@ void FullPolicy::DetermineProfitability(CORINFO_METHOD_INFO* methodInfo) unsigned depthLimit = m_RootCompiler->m_inlineStrategy->GetMaxInlineDepth(); - if (m_Depth > depthLimit) + if (m_CallsiteDepth > depthLimit) { SetFailure(InlineObservation::CALLSITE_IS_TOO_DEEP); return; diff --git a/src/coreclr/src/jit/inlinepolicy.h b/src/coreclr/src/jit/inlinepolicy.h index e831b9a7183e..9024996521a3 100644 --- a/src/coreclr/src/jit/inlinepolicy.h +++ b/src/coreclr/src/jit/inlinepolicy.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // Inlining Policies // @@ -89,6 +88,7 @@ class DefaultPolicy : public LegalPolicy , m_Multiplier(0.0) , m_CodeSize(0) , m_CallsiteFrequency(InlineCallsiteFrequency::UNUSED) + , m_CallsiteDepth(0) , m_InstructionCount(0) , m_LoadStoreCount(0) , m_ArgFeedsTest(0) @@ -154,6 +154,7 @@ class DefaultPolicy : public LegalPolicy double m_Multiplier; unsigned m_CodeSize; InlineCallsiteFrequency m_CallsiteFrequency; + unsigned m_CallsiteDepth; unsigned m_InstructionCount; unsigned m_LoadStoreCount; unsigned m_ArgFeedsTest; @@ -225,7 +226,6 @@ class DiscretionaryPolicy : public DefaultPolicy MAX_ARGS = 6 }; - unsigned m_Depth; unsigned m_BlockCount; unsigned m_Maxstack; unsigned m_ArgCount; diff --git a/src/coreclr/src/jit/instr.cpp b/src/coreclr/src/jit/instr.cpp index ec776cbea9a9..a13887baa0f6 100644 --- a/src/coreclr/src/jit/instr.cpp +++ b/src/coreclr/src/jit/instr.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -1308,40 +1307,6 @@ void CodeGen::inst_RV_ST(instruction ins, emitAttr size, regNumber reg, GenTree* inst_RV_TT(ins, reg, tree, 0, size); } -void CodeGen::inst_RV_ST(instruction ins, regNumber reg, TempDsc* tmp, unsigned ofs, var_types type, emitAttr size) -{ - if (size == EA_UNKNOWN) - { - size = emitActualTypeSize(type); - } - -#ifdef TARGET_ARM - switch (ins) - { - case INS_mov: - assert(!"Please call ins_Load(type) to get the load instruction"); - break; - - case INS_add: - case INS_ldr: - case INS_ldrh: - case INS_ldrb: - case INS_ldrsh: - case INS_ldrsb: - case INS_lea: - case INS_vldr: - GetEmitter()->emitIns_R_S(ins, size, reg, tmp->tdTempNum(), ofs); - break; - - default: - assert(!"Default inst_RV_ST case not supported for Arm"); - break; - } -#else // !TARGET_ARM - GetEmitter()->emitIns_R_S(ins, size, reg, tmp->tdTempNum(), ofs); -#endif // !TARGET_ARM -} - void CodeGen::inst_mov_RV_ST(regNumber reg, GenTree* tree) { /* Figure out the size of the value being loaded */ diff --git a/src/coreclr/src/jit/instr.h b/src/coreclr/src/jit/instr.h index 3c0404c6079e..ed001fdc1bc7 100644 --- a/src/coreclr/src/jit/instr.h +++ b/src/coreclr/src/jit/instr.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*****************************************************************************/ #ifndef _INSTR_H_ diff --git a/src/coreclr/src/jit/instrs.h b/src/coreclr/src/jit/instrs.h index 37b9fe3090b2..b543f781645f 100644 --- a/src/coreclr/src/jit/instrs.h +++ b/src/coreclr/src/jit/instrs.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #if defined(TARGET_XARCH) #include "instrsxarch.h" diff --git a/src/coreclr/src/jit/instrsarm.h b/src/coreclr/src/jit/instrsarm.h index 990414349a98..9356150d4b2e 100644 --- a/src/coreclr/src/jit/instrsarm.h +++ b/src/coreclr/src/jit/instrsarm.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /***************************************************************************** * Arm Thumb1/Thumb2 instructions for JIT compiler diff --git a/src/coreclr/src/jit/instrsarm64.h b/src/coreclr/src/jit/instrsarm64.h index 41d33443c68d..cddd9b0a986a 100644 --- a/src/coreclr/src/jit/instrsarm64.h +++ b/src/coreclr/src/jit/instrsarm64.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /***************************************************************************** * Arm64 instructions for JIT compiler @@ -68,7 +67,7 @@ INST9(mov, "mov", 0, IF_EN9, 0x2A0003E0, 0x11000000, // mov Vd,Vn DV_3C 0Q001110101nnnnn 000111nnnnnddddd 0EA0 1C00 Vd,Vn // mov Rd,Vn[0] DV_2B 0Q001110000iiiii 001111nnnnnddddd 0E00 3C00 Rd,Vn[] (to general) // mov Vd[],Rn DV_2C 01001110000iiiii 000111nnnnnddddd 4E00 1C00 Vd[],Rn (from general) - // mov Vd,Vn[] DV_2E 01011110000iiiii 000001nnnnnddddd 5E00 0400 Vd,Vn[] (scalar by elem) + // mov Vd,Vn[] DV_2E 01011110000iiiii 000001nnnnnddddd 5E00 0400 Vd,Vn[] (scalar by element) // mov Vd[],Vn[] DV_2F 01101110000iiiii 0jjjj1nnnnnddddd 6E00 0400 Vd[],Vn[] (from/to elem) // enum name info DR_3A DR_3B DR_3C DI_2A DV_3A DV_3E @@ -273,14 +272,14 @@ INST4(cmn, "cmn", CMP, IF_EN4C, 0x2B00001F, 0x2B00001F, INST4(fmul, "fmul", 0, IF_EN4D, 0x2E20DC00, 0x1E200800, 0x0F809000, 0x5F809000) // fmul Vd,Vn,Vm DV_3B 0Q1011100X1mmmmm 110111nnnnnddddd 2E20 DC00 Vd,Vn,Vm (vector) // fmul Vd,Vn,Vm DV_3D 000111100X1mmmmm 000010nnnnnddddd 1E20 0800 Vd,Vn,Vm (scalar) - // fmul Vd,Vn,Vm[] DV_3BI 0Q0011111XLmmmmm 1001H0nnnnnddddd 0F80 9000 Vd,Vn,Vm[] (vector by elem) - // fmul Vd,Vn,Vm[] DV_3DI 010111111XLmmmmm 1001H0nnnnnddddd 5F80 9000 Vd,Vn,Vm[] (scalar by elem) + // fmul Vd,Vn,Vm[] DV_3BI 0Q0011111XLmmmmm 1001H0nnnnnddddd 0F80 9000 Vd,Vn,Vm[] (vector by element) + // fmul Vd,Vn,Vm[] DV_3DI 010111111XLmmmmm 1001H0nnnnnddddd 5F80 9000 Vd,Vn,Vm[] (scalar by element) INST4(fmulx, "fmulx", 0, IF_EN4D, 0x0E20DC00, 0x5E20DC00, 0x2F809000, 0x7F809000) // fmulx Vd,Vn,Vm DV_3B 0Q0011100X1mmmmm 110111nnnnnddddd 0E20 DC00 Vd,Vn,Vm (vector) // fmulx Vd,Vn,Vm DV_3D 010111100X1mmmmm 110111nnnnnddddd 5E20 DC00 Vd,Vn,Vm (scalar) - // fmulx Vd,Vn,Vm[] DV_3BI 0Q1011111XLmmmmm 1001H0nnnnnddddd 2F80 9000 Vd,Vn,Vm[] (vector by elem) - // fmulx Vd,Vn,Vm[] DV_3DI 011111111XLmmmmm 1001H0nnnnnddddd 7F80 9000 Vd,Vn,Vm[] (scalar by elem) + // fmulx Vd,Vn,Vm[] DV_3BI 0Q1011111XLmmmmm 1001H0nnnnnddddd 2F80 9000 Vd,Vn,Vm[] (vector by element) + // fmulx Vd,Vn,Vm[] DV_3DI 011111111XLmmmmm 1001H0nnnnnddddd 7F80 9000 Vd,Vn,Vm[] (scalar by element) // enum name info DR_3A DR_3B DI_2C DV_3C INST4(and, "and", 0, IF_EN4E, 0x0A000000, 0x0A000000, 0x12000000, 0x0E201C00) @@ -360,6 +359,49 @@ INST4(uqshl, "uqshl", 0, IF_EN4J, 0x7F007400, 0x2F007400, // uqshl Vd,Vn,Vm DV_3E 01111110XX1mmmmm 010011nnnnnddddd 7E20 4C00 Vd Vn Vm (scalar) // uqshl Vd,Vn,Vm DV_3A 0Q101110XX1mmmmm 010011nnnnnddddd 2E20 4C00 Vd Vn Vm (vector) +// enum name info DV_3E DV_3A DV_3EI DV_3AI +INST4(sqdmlal, "sqdmlal", LNG, IF_EN4K, 0x5E209000, 0x0E209000, 0x5F003000, 0x0F003000) + // sqdmlal Vd,Vn,Vm DV_3E 01011110XX1mmmmm 100100nnnnnddddd 5E20 9000 Vd,Vn,Vm (scalar) + // sqdmlal Vd,Vn,Vm DV_3A 00001110XX1mmmmm 100100nnnnnddddd 0E20 9000 Vd,Vn,Vm (vector) + // sqdmlal Vd,Vn,Vm[] DV_3EI 01011111XXLMmmmm 0011H0nnnnnddddd 5F00 3000 Vd,Vn,Vm[] (scalar by element) + // sqdmlal Vd,Vn,Vm[] DV_3AI 00001111XXLMmmmm 0011H0nnnnnddddd 0F00 3000 Vd,Vn,Vm[] (vector by element) + +INST4(sqdmlsl, "sqdmlsl", LNG, IF_EN4K, 0x5E20B000, 0x0E20B000, 0x5F007000, 0x0F007000) + // sqdmlsl Vd,Vn,Vm DV_3E 01011110XX1mmmmm 101100nnnnnddddd 5E20 B000 Vd,Vn,Vm (scalar) + // sqdmlsl Vd,Vn,Vm DV_3A 00001110XX1mmmmm 101100nnnnnddddd 0E20 B000 Vd,Vn,Vm (vector) + // sqdmlsl Vd,Vn,Vm[] DV_3EI 01011111XXLMmmmm 0111H0nnnnnddddd 5F00 7000 Vd,Vn,Vm[] (scalar by element) + // sqdmlsl Vd,Vn,Vm[] DV_3AI 00001111XXLMmmmm 0111H0nnnnnddddd 0F00 7000 Vd,Vn,Vm[] (vector by element) + +INST4(sqdmulh, "sqdmulh", 0, IF_EN4K, 0x5E20B400, 0x0E20B400, 0x5F00C000, 0x0F00C000) + // sqdmulh Vd,Vn,Vm DV_3E 01011110XX1mmmmm 101101nnnnnddddd 5E20 B400 Vd,Vn,Vm (scalar) + // sqdmulh Vd,Vn,Vm DV_3A 0Q001110XX1mmmmm 101101nnnnnddddd 0E20 B400 Vd,Vn,Vm (vector) + // sqdmulh Vd,Vn,Vm[] DV_3EI 01011111XXLMmmmm 1100H0nnnnnddddd 5F00 C000 Vd,Vn,Vm[] (scalar by element) + // sqdmulh Vd,Vn,Vm[] DV_3AI 0Q001111XXLMmmmm 1100H0nnnnnddddd 0F00 C000 Vd,Vn,Vm[] (vector by element) + +INST4(sqdmull, "sqdmull", LNG, IF_EN4K, 0x5E20D000, 0x0E20D000, 0x5F00B000, 0x0F00B000) + // sqdmull Vd,Vn,Vm DV_3E 01011110XX1mmmmm 110100nnnnnddddd 5E20 D000 Vd,Vn,Vm (scalar) + // sqdmull Vd,Vn,Vm DV_3A 00001110XX1mmmmm 110100nnnnnddddd 0E20 D000 Vd,Vn,Vm (vector) + // sqdmull Vd,Vn,Vm[] DV_3EI 01011111XXLMmmmm 1011H0nnnnnddddd 5F00 B000 Vd,Vn,Vm[] (scalar by element) + // sqdmull Vd,Vn,Vm[] DV_3AI 00001111XXLMmmmm 1011H0nnnnnddddd 0F00 B000 Vd,Vn,Vm[] (vector by element) + +INST4(sqrdmlah, "sqrdmlah", 0, IF_EN4K, 0x7E008400, 0x2E008400, 0x7F00D000, 0x2F00D000) + // sqrdmlah Vd,Vn,Vm DV_3E 01111110XX0mmmmm 100001nnnnnddddd 7E00 8400 Vd,Vn,Vm (scalar) + // sqrdmlah Vd,Vn,Vm DV_3A 0Q101110XX0mmmmm 100001nnnnnddddd 2E00 8400 Vd,Vn,Vm (vector) + // sqrdmlah Vd,Vn,Vm[] DV_3EI 01111111XXLMmmmm 1101H0nnnnnddddd 7F00 D000 Vd,Vn,Vm[] (scalar by element) + // sqrdmlah Vd,Vn,Vm[] DV_3AI 0Q101111XXLMmmmm 1101H0nnnnnddddd 2F00 D000 Vd,Vn,Vm[] (vector by element) + +INST4(sqrdmlsh, "sqrdmlsh", 0, IF_EN4K, 0x7E008C00, 0x2E008C00, 0x7F00F000, 0x2F00F000) + // sqrdmlsh Vd,Vn,Vm DV_3E 01111110XX0mmmmm 100011nnnnnddddd 7E00 8C00 Vd,Vn,Vm (scalar) + // sqrdmlsh Vd,Vn,Vm DV_3A 0Q101110XX0mmmmm 100011nnnnnddddd 2E00 8C00 Vd,Vn,Vm (vector) + // sqrdmlsh Vd,Vn,Vm[] DV_3EI 01111111XXLMmmmm 1111H0nnnnnddddd 7F00 F000 Vd,Vn,Vm[] (scalar by element) + // sqrdmlsh Vd,Vn,Vm[] DV_3AI 0Q101111XXLMmmmm 1111H0nnnnnddddd 2F00 F000 Vd,Vn,Vm[] (vector by element) + +INST4(sqrdmulh, "sqrdmulh", 0, IF_EN4K, 0x7E20B400, 0x2E20B400, 0x5F00D000, 0x0F00D000) + // sqrdmulh Vd,Vn,Vm DV_3E 01111110XX1mmmmm 101101nnnnnddddd 7E20 B400 Vd,Vn,Vm (scalar) + // sqrdmulh Vd,Vn,Vm DV_3A 0Q101110XX1mmmmm 101101nnnnnddddd 2E20 B400 Vd,Vn,Vm (vector) + // sqrdmulh Vd,Vn,Vm[] DV_3EI 01011111XXLMmmmm 1101H0nnnnnddddd 5F00 D000 Vd,Vn,Vm[] (scalar by element) + // sqrdmulh Vd,Vn,Vm[] DV_3AI 0Q001111XXLMmmmm 1101H0nnnnnddddd 0F00 D000 Vd,Vn,Vm[] (vector by element) + // enum name info DR_3A DR_3B DI_2C INST3(ands, "ands", 0, IF_EN3A, 0x6A000000, 0x6A000000, 0x72000000) // ands Rd,Rn,Rm DR_3A X1101010000mmmmm 000000nnnnnddddd 6A00 0000 @@ -381,19 +423,19 @@ INST3(orn, "orn", 0, IF_EN3C, 0x2A200000, 0x2A200000, // enum name info DV_2C DV_2D DV_2E INST3(dup, "dup", 0, IF_EN3D, 0x0E000C00, 0x0E000400, 0x5E000400) // dup Vd,Rn DV_2C 0Q001110000iiiii 000011nnnnnddddd 0E00 0C00 Vd,Rn (vector from general) - // dup Vd,Vn[] DV_2D 0Q001110000iiiii 000001nnnnnddddd 0E00 0400 Vd,Vn[] (vector by elem) - // dup Vd,Vn[] DV_2E 01011110000iiiii 000001nnnnnddddd 5E00 0400 Vd,Vn[] (scalar by elem) + // dup Vd,Vn[] DV_2D 0Q001110000iiiii 000001nnnnnddddd 0E00 0400 Vd,Vn[] (vector by element) + // dup Vd,Vn[] DV_2E 01011110000iiiii 000001nnnnnddddd 5E00 0400 Vd,Vn[] (scalar by element) // enum name info DV_3B DV_3BI DV_3DI INST3(fmla, "fmla", 0, IF_EN3E, 0x0E20CC00, 0x0F801000, 0x5F801000) // fmla Vd,Vn,Vm DV_3B 0Q0011100X1mmmmm 110011nnnnnddddd 0E20 CC00 Vd,Vn,Vm (vector) - // fmla Vd,Vn,Vm[] DV_3BI 0Q0011111XLmmmmm 0001H0nnnnnddddd 0F80 1000 Vd,Vn,Vm[] (vector by elem) - // fmla Vd,Vn,Vm[] DV_3DI 010111111XLmmmmm 0001H0nnnnnddddd 5F80 1000 Vd,Vn,Vm[] (scalar by elem) + // fmla Vd,Vn,Vm[] DV_3BI 0Q0011111XLmmmmm 0001H0nnnnnddddd 0F80 1000 Vd,Vn,Vm[] (vector by element) + // fmla Vd,Vn,Vm[] DV_3DI 010111111XLmmmmm 0001H0nnnnnddddd 5F80 1000 Vd,Vn,Vm[] (scalar by element) INST3(fmls, "fmls", 0, IF_EN3E, 0x0EA0CC00, 0x0F805000, 0x5F805000) // fmls Vd,Vn,Vm DV_3B 0Q0011101X1mmmmm 110011nnnnnddddd 0EA0 CC00 Vd,Vn,Vm (vector) - // fmls Vd,Vn,Vm[] DV_3BI 0Q0011111XLmmmmm 0101H0nnnnnddddd 0F80 5000 Vd,Vn,Vm[] (vector by elem) - // fmls Vd,Vn,Vm[] DV_3DI 010111111XLmmmmm 0101H0nnnnnddddd 5F80 5000 Vd,Vn,Vm[] (scalar by elem) + // fmls Vd,Vn,Vm[] DV_3BI 0Q0011111XLmmmmm 0101H0nnnnnddddd 0F80 5000 Vd,Vn,Vm[] (vector by element) + // fmls Vd,Vn,Vm[] DV_3DI 010111111XLmmmmm 0101H0nnnnnddddd 5F80 5000 Vd,Vn,Vm[] (scalar by element) // enum name info DV_2A DV_2G DV_2H INST3(fcvtas, "fcvtas", 0, IF_EN3F, 0x0E21C800, 0x5E21C800, 0x1E240000) @@ -460,7 +502,17 @@ INST3(ucvtf, "ucvtf", 0, IF_EN3G, 0x2E21D800, 0x7E21D800, INST3(mul, "mul", 0, IF_EN3H, 0x1B007C00, 0x0E209C00, 0x0F008000) // mul Rd,Rn,Rm DR_3A X0011011000mmmmm 011111nnnnnddddd 1B00 7C00 // mul Vd,Vn,Vm DV_3A 0Q001110XX1mmmmm 100111nnnnnddddd 0E20 9C00 Vd,Vn,Vm (vector) - // mul Vd,Vn,Vm[] DV_3AI 0Q001111XXLMmmmm 1000H0nnnnnddddd 0F00 8000 Vd,Vn,Vm[] (vector by elem) + // mul Vd,Vn,Vm[] DV_3AI 0Q001111XXLMmmmm 1000H0nnnnnddddd 0F00 8000 Vd,Vn,Vm[] (vector by element) + +INST3(smull, "smull", LNG, IF_EN3H, 0x9B207C00, 0x0E20C000, 0x0F00A000) + // smull Rd,Rn,Rm DR_3A 10011011001mmmmm 011111nnnnnddddd 9B20 7C00 + // smull Vd,Vn,Vm DV_3A 0000111000100000 1100000000000000 0E20 C000 Vd,Vn,Vm (vector) + // smull Vd,Vn,Vm[] DV_3AI 00001111XXLMmmmm 1010H0nnnnnddddd 0F00 A000 Vd,Vn,Vm[] (vector by element) + +INST3(umull, "umull", LNG, IF_EN3H, 0x9BA07C00, 0x2E20C000, 0x2F00A000) + // umull Rd,Rn,Rm DR_3A 10011011101mmmmm 011111nnnnnddddd 9BA0 7C00 + // umull Vd,Vn,Vm DV_3A 00101110XX1mmmmm 110000nnnnnddddd 2E20 C000 Vd,Vn,Vm (vector) + // umull Vd,Vn,Vm[] DV_3AI 00101111XXLMmmmm 1010H0nnnnnddddd 2F00 A000 Vd,Vn,Vm[] (vector by element) // enum name info DR_2E DR_2F DV_2M INST3(mvn, "mvn", 0, IF_EN3I, 0x2A2003E0, 0x2A2003E0, 0x2E205800) @@ -525,16 +577,6 @@ INST3(ld4r, "ld4r", LD, IF_EN3J, 0x0D60E000, 0x0DE0E000, // ld4r {Vt-Vt4},[Xn],Xm LS_3F 0Q001101111mmmmm 1110ssnnnnnttttt 0DE0 E000 post-indexed by a register // ld4r {Vt-Vt4},[Xn],#8 LS_2E 0Q00110111111111 1110ssnnnnnttttt 0DFF E000 post-indexed by an immediate -INST3(smull, "smull", 0, IF_EN3K, 0x9B207C00, 0x0E20C000, 0x0F00A000) - // smull Rd,Rn,Rm DR_3A 10011011001mmmmm 011111nnnnnddddd 9B20 7C00 - // smull Vd,Vn,Vm DV_3H 0000111000100000 1100000000000000 0E20 C000 Vd,Vn,Vm (vector) - // smull Vd,Vn,Vm[] DV_3HI 00001111XXLMmmmm 1010H0nnnnnddddd 0F00 A000 Vd,Vn,Vm[] (vector by elem) - -INST3(umull, "umull", 0, IF_EN3K, 0x9BA07C00, 0x2E20C000, 0x2F00A000) - // umull Rd,Rn,Rm DR_3A 10011011101mmmmm 011111nnnnnddddd 9BA0 7C00 - // umull Vd,Vn,Vm DV_3H 00101110XX1mmmmm 110000nnnnnddddd 2E20 C000 Vd,Vn,Vm (vector) - // umull Vd,Vn,Vm[] DV_3HI 00101111XXLMmmmm 1010H0nnnnnddddd 2F00 A000 Vd,Vn,Vm[] (vector by elem) - // enum name info DR_2E DR_2F INST2(negs, "negs", 0, IF_EN2A, 0x6B0003E0, 0x6B0003E0) // negs Rd,Rm DR_2E X1101011000mmmmm 00000011111ddddd 6B00 03E0 @@ -672,6 +714,10 @@ INST2(fcmlt, "fcmlt", 0, IF_EN2J, 0x0EA0E800, 0x5EA0E800) // fcmlt Vd,Vn DV_2A 0Q0011101X100000 111110nnnnnddddd 0EA0 E800 Vd,Vn (vector) // fcmlt Vd,Vn DV_2G 010111101X100000 111010nnnnnddddd 5EA0 E800 Vd,Vn (scalar) +INST2(fcvtxn, "fcvtxn", NRW, IF_EN2J, 0x2E616800, 0x7E616800) + // fcvtxn Vd,Vn DV_2A 0010111001100001 011010nnnnnddddd 2E61 6800 Vd,Vn (vector) + // fcvtxn Vd,Vn DV_2G 0111111001100001 011010nnnnnddddd 7E61 6800 Vd,Vn (scalar) + INST2(fneg, "fneg", 0, IF_EN2J, 0x2EA0F800, 0x1E214000) // fneg Vd,Vn DV_2A 0Q1011101X100000 111110nnnnnddddd 2EA0 F800 Vd,Vn (vector) // fneg Vd,Vn DV_2G 000111100X100001 010000nnnnnddddd 1E21 4000 Vd,Vn (scalar) @@ -729,6 +775,34 @@ INST2(cmlt, "cmlt", 0, IF_EN2K, 0x0E20A800, 0x5E20A800) // cmlt Vd,Vn DV_2M 0Q101110XX100000 101010nnnnnddddd 0E20 A800 Vd,Vn (vector) // cmlt Vd,Vn DV_2L 01011110XX100000 101010nnnnnddddd 5E20 A800 Vd,Vn (scalar) +INST2(sqabs, "sqabs", 0, IF_EN2K, 0x0E207800, 0x5E207800) + // sqabs Vd,Vn DV_2M 0Q001110XX100000 011110nnnnnddddd 0E20 7800 Vd,Vn (vector) + // sqabs Vd,Vn DV_2L 01011110XX100000 011110nnnnnddddd 5E20 7800 Vd,Vn (scalar) + +INST2(sqneg, "sqneg", 0, IF_EN2K, 0x2E207800, 0x7E207800) + // sqneg Vd,Vn DV_2M 0Q101110XX100000 011110nnnnnddddd 2E20 7800 Vd,Vn (vector) + // sqneg Vd,Vn DV_2L 01111110XX100000 011110nnnnnddddd 7E20 7800 Vd,Vn (scalar) + +INST2(sqxtn, "sqxtn", NRW, IF_EN2K, 0x0E214800, 0x5E214800) + // sqxtn Vd,Vn DV_2M 0Q001110XX100001 010010nnnnnddddd 0E21 4800 Vd,Vn (vector) + // sqxtn Vd,Vn DV_2L 01011110XX100001 010010nnnnnddddd 5E21 4800 Vd,Vn (scalar) + +INST2(sqxtun, "sqxtun", NRW, IF_EN2K, 0x2E212800, 0x7E212800) + // sqxtun Vd,Vn DV_2M 0Q101110XX100001 001010nnnnnddddd 2E21 2800 Vd,Vn (vector) + // sqxtun Vd,Vn DV_2L 01111110XX100001 001010nnnnnddddd 7E21 2800 Vd,Vn (scalar) + +INST2(suqadd, "suqadd", 0, IF_EN2K, 0x0E203800, 0x5E203800) + // suqadd Vd,Vn DV_2M 0Q001110XX100000 001110nnnnnddddd 0E20 3800 Vd,Vn (vector) + // suqadd Vd,Vn DV_2L 01011110XX100000 001110nnnnnddddd 5E20 3800 Vd,Vn (scalar) + +INST2(usqadd, "usqadd", 0, IF_EN2K, 0x2E203800, 0x7E203800) + // usqadd Vd,Vn DV_2M 0Q101110XX100000 001110nnnnnddddd 2E20 3800 Vd,Vn (vector) + // usqadd Vd,Vn DV_2L 01111110XX100000 001110nnnnnddddd 7E20 3800 Vd,Vn (scalar) + +INST2(uqxtn, "uqxtn", NRW, IF_EN2K, 0x2E214800, 0x7E214800) + // uqxtn Vd,Vn DV_2M 0Q101110XX100001 010010nnnnnddddd 2E21 4800 Vd,Vn (vector) + // uqxtn Vd,Vn DV_2L 01111110XX100001 010010nnnnnddddd 7E21 4800 Vd,Vn (scalar) + // enum name info DR_2G DV_2M INST2(cls, "cls", 0, IF_EN2L, 0x5AC01400, 0x0E204800) // cls Rd,Rm DR_2G X101101011000000 000101nnnnnddddd 5AC0 1400 Rd Rn (general) @@ -753,51 +827,71 @@ INST2(rev32, "rev32", 0, IF_EN2L, 0xDAC00800, 0x2E200800) // enum name info DV_3A DV_3AI INST2(mla, "mla", 0, IF_EN2M, 0x0E209400, 0x2F000000) // mla Vd,Vn,Vm DV_3A 0Q001110XX1mmmmm 100101nnnnnddddd 0E20 9400 Vd,Vn,Vm (vector) - // mla Vd,Vn,Vm[] DV_3AI 0Q101111XXLMmmmm 0000H0nnnnnddddd 2F00 0000 Vd,Vn,Vm[] (vector by elem) + // mla Vd,Vn,Vm[] DV_3AI 0Q101111XXLMmmmm 0000H0nnnnnddddd 2F00 0000 Vd,Vn,Vm[] (vector by element) INST2(mls, "mls", 0, IF_EN2M, 0x2E209400, 0x2F004000) // mls Vd,Vn,Vm DV_3A 0Q101110XX1mmmmm 100101nnnnnddddd 2E20 9400 Vd,Vn,Vm (vector) - // mls Vd,Vn,Vm[] DV_3AI 0Q101111XXLMmmmm 0100H0nnnnnddddd 2F00 4000 Vd,Vn,Vm[] (vector by elem) + // mls Vd,Vn,Vm[] DV_3AI 0Q101111XXLMmmmm 0100H0nnnnnddddd 2F00 4000 Vd,Vn,Vm[] (vector by element) + +INST2(smlal, "smlal", LNG, IF_EN2M, 0x0E208000, 0x0F002000) + // smlal Vd,Vn,Vm DV_3A 00001110XX1mmmmm 100000nnnnnddddd 0E20 8000 Vd,Vn,Vm (vector) + // smlal Vd,Vn,Vm[] DV_3AI 00001111XXLMmmmm 0010H0nnnnnddddd 0F00 2000 Vd,Vn,Vm[] (vector by element) + +INST2(smlal2, "smlal2", LNG, IF_EN2M, 0x4E208000, 0x4F002000) + // smlal2 Vd,Vn,Vm DV_3A 01001110XX1mmmmm 100000nnnnnddddd 4E20 8000 Vd,Vn,Vm (vector) + // smlal2 Vd,Vn,Vm[] DV_3AI 01001111XXLMmmmm 0010H0nnnnnddddd 4F00 2000 Vd,Vn,Vm[] (vector by element) + +INST2(smlsl, "smlsl", LNG, IF_EN2M, 0x0E20A000, 0x0F006000) + // smlsl Vd,Vn,Vm DV_3A 00001110XX1mmmmm 101000nnnnnddddd 0E20 A000 Vd,Vn,Vm (vector) + // smlsl Vd,Vn,Vm[] DV_3AI 00001111XXLMmmmm 0110H0nnnnnddddd 0F00 6000 Vd,Vn,Vm[] (vector by element) -INST2(smlal, "smlal", 0, IF_EN2R, 0x0E208000, 0x0F002000) - // smlal Vd,Vn,Vm DV_3H 00001110XX1mmmmm 100000nnnnnddddd 0E20 8000 Vd,Vn,Vm (vector) - // smlal Vd,Vn,Vm[] DV_3HI 00001111XXLMmmmm 0010H0nnnnnddddd 0F00 2000 Vd,Vn,Vm[] (vector by elem) +INST2(smlsl2, "smlsl2", LNG, IF_EN2M, 0x4E20A000, 0x4F006000) + // smlsl2 Vd,Vn,Vm DV_3A 01001110XX1mmmmm 101000nnnnnddddd 4E20 A000 Vd,Vn,Vm (vector) + // smlsl2 Vd,Vn,Vm[] DV_3AI 01001111XXLMmmmm 0110H0nnnnnddddd 4F00 6000 Vd,Vn,Vm[] (vector by element) -INST2(smlal2, "smlal2", 0, IF_EN2R, 0x4E208000, 0x4F002000) - // smlal2 Vd,Vn,Vm DV_3H 01001110XX1mmmmm 100000nnnnnddddd 4E20 8000 Vd,Vn,Vm (vector) - // smlal2 Vd,Vn,Vm[] DV_3HI 01001111XXLMmmmm 0010H0nnnnnddddd 4F00 2000 Vd,Vn,Vm[] (vector by elem) +INST2(smull2, "smull2", LNG, IF_EN2M, 0x4E20C000, 0x4F00A000) + // smull2 Vd,Vn,Vm DV_3A 01001110XX1mmmmm 110000nnnnnddddd 4E20 C000 Vd,Vn,Vm (vector) + // smull2 Vd,Vn,Vm[] DV_3AI 01001111XXLMmmmm 1010H0nnnnnddddd 4F00 A000 Vd,Vn,Vm[] (vector by element) -INST2(smlsl, "smlsl", 0, IF_EN2R, 0x0E20A000, 0x0F006000) - // smlsl Vd,Vn,Vm DV_3H 00001110XX1mmmmm 101000nnnnnddddd 0E20 A000 Vd,Vn,Vm (vector) - // smlsl Vd,Vn,Vm[] DV_3HI 00001111XXLMmmmm 0110H0nnnnnddddd 0F00 6000 Vd,Vn,Vm[] (vector by elem) +INST2(sqdmlal2, "sqdmlal2", LNG, IF_EN2M, 0x4E209000, 0x4F003000) + // sqdmlal2 Vd,Vn,Vm DV_3A 01001110XX1mmmmm 100100nnnnnddddd 4E20 9000 Vd,Vn,Vm (vector) + // sqdmlal2 Vd,Vn,Vm[] DV_3AI 01001111XXLMmmmm 0011H0nnnnnddddd 4F00 3000 Vd,Vn,Vm[] (vector by element) -INST2(smlsl2, "smlsl2", 0, IF_EN2R, 0x4E20A000, 0x4F006000) - // smlsl2 Vd,Vn,Vm DV_3H 01001110XX1mmmmm 101000nnnnnddddd 4E20 A000 Vd,Vn,Vm (vector) - // smlsl2 Vd,Vn,Vm[] DV_3HI 01001111XXLMmmmm 0110H0nnnnnddddd 4F00 6000 Vd,Vn,Vm[] (vector by elem) +INST2(sqdmlsl2, "sqdmlsl2", LNG, IF_EN2M, 0x4E20B000, 0x4F007000) + // sqdmlsl2 Vd,Vn,Vm DV_3A 01001110XX1mmmmm 101100nnnnnddddd 4E20 B000 Vd,Vn,Vm (vector) + // sqdmlsl2 Vd,Vn,Vm[] DV_3AI 01001111XXLMmmmm 0111H0nnnnnddddd 4F00 7000 Vd,Vn,Vm[] (vector by element) -INST2(smull2, "smull2", 0, IF_EN2R, 0x4E20C000, 0x4F00A000) - // smull2 Vd,Vn,Vm DV_3H 01001110XX1mmmmm 110000nnnnnddddd 4E20 C000 Vd,Vn,Vm (vector) - // smull2 Vd,Vn,Vm[] DV_3HI 01001111XXLMmmmm 1010H0nnnnnddddd 4F00 A000 Vd,Vn,Vm[] (vector by elem) +INST2(sqdmull2, "sqdmull2", LNG, IF_EN2M, 0x4E20D000, 0x4F00B000) + // sqdmull2 Vd,Vn,Vm DV_3A 01001110XX1mmmmm 110100nnnnnddddd 4E20 D000 Vd,Vn,Vm (vector) + // sqdmull2 Vd,Vn,Vm[] DV_3AI 01001111XXLMmmmm 1011H0nnnnnddddd 4F00 B000 Vd,Vn,Vm[] (vector by element) -INST2(umlal, "umlal", 0, IF_EN2R, 0x2E208000, 0x2F002000) - // umlal Vd,Vn,Vm DV_3H 00101110XX1mmmmm 100000nnnnnddddd 2E20 8000 Vd,Vn,Vm (vector) - // umlal Vd,Vn,Vm[] DV_3HI 00101111XXLMmmmm 0010H0nnnnnddddd 2F00 2000 Vd,Vn,Vm[] (vector by elem) +INST2(sdot, "sdot", 0, IF_EN2M, 0x0E009400, 0x0F00E000) + // sdot Vd,Vn,Vm DV_3A 0Q001110XX0mmmmm 100101nnnnnddddd 0E00 9400 Vd,Vn,Vm (vector) + // sdot Vd,Vn,Vm[] DV_3AI 0Q001111XXLMmmmm 1110H0nnnnnddddd 0F00 E000 Vd,Vn,Vm[] (vector by element) -INST2(umlal2, "umlal2", 0, IF_EN2R, 0x6E208000, 0x6F002000) - // umlal2 Vd,Vn,Vm DV_3H 01101110XX1mmmmm 100000nnnnnddddd 6E20 8000 Vd,Vn,Vm (vector) - // umlal2 Vd,Vn,Vm[] DV_3HI 01101111XXLMmmmm 0010H0nnnnnddddd 6F00 2000 Vd,Vn,Vm[] (vector by elem) +INST2(udot, "udot", 0, IF_EN2M, 0x2E009400, 0x2F00E000) + // udot Vd,Vn,Vm DV_3A 0Q101110XX0mmmmm 100101nnnnnddddd 2E00 9400 Vd,Vn,Vm (vector) + // udot Vd,Vn,Vm[] DV_3AI 0Q101111XXLMmmmm 1110H0nnnnnddddd 2F00 E000 Vd,Vn,Vm[] (vector by element) -INST2(umlsl, "umlsl", 0, IF_EN2R, 0x2E20A000, 0x2F006000) - // umlsl Vd,Vn,Vm DV_3H 00101110XX1mmmmm 101000nnnnnddddd 2E20 A000 Vd,Vn,Vm (vector) - // umlsl Vd,Vn,Vm[] DV_3HI 00101111XXLMmmmm 0110H0nnnnnddddd 2F00 6000 Vd,Vn,Vm[] (vector by elem) +INST2(umlal, "umlal", LNG, IF_EN2M, 0x2E208000, 0x2F002000) + // umlal Vd,Vn,Vm DV_3A 00101110XX1mmmmm 100000nnnnnddddd 2E20 8000 Vd,Vn,Vm (vector) + // umlal Vd,Vn,Vm[] DV_3AI 00101111XXLMmmmm 0010H0nnnnnddddd 2F00 2000 Vd,Vn,Vm[] (vector by element) -INST2(umlsl2, "umlsl2", 0, IF_EN2R, 0x6E20A000, 0x6F006000) - // umlsl2 Vd,Vn,Vm DV_3H 01101110XX1mmmmm 101000nnnnnddddd 6E20 A000 Vd,Vn,Vm (vector) - // umlsl2 Vd,Vn,Vm[] DV_3HI 01101111XXLMmmmm 0110H0nnnnnddddd 6F00 6000 Vd,Vn,Vm[] (vector by elem) +INST2(umlal2, "umlal2", LNG, IF_EN2M, 0x6E208000, 0x6F002000) + // umlal2 Vd,Vn,Vm DV_3A 01101110XX1mmmmm 100000nnnnnddddd 6E20 8000 Vd,Vn,Vm (vector) + // umlal2 Vd,Vn,Vm[] DV_3AI 01101111XXLMmmmm 0010H0nnnnnddddd 6F00 2000 Vd,Vn,Vm[] (vector by element) -INST2(umull2, "umull2", 0, IF_EN2R, 0x6E20C000, 0x6F00A000) - // umull2 Vd,Vn,Vm DV_3H 01101110XX1mmmmm 110000nnnnnddddd 6E20 C000 Vd,Vn,Vm (vector) - // umull2 Vd,Vn,Vm[] DV_3HI 01101111XXLMmmmm 1010H0nnnnnddddd 6F00 A000 Vd,Vn,Vm[] (vector by elem) +INST2(umlsl, "umlsl", LNG, IF_EN2M, 0x2E20A000, 0x2F006000) + // umlsl Vd,Vn,Vm DV_3A 00101110XX1mmmmm 101000nnnnnddddd 2E20 A000 Vd,Vn,Vm (vector) + // umlsl Vd,Vn,Vm[] DV_3AI 00101111XXLMmmmm 0110H0nnnnnddddd 2F00 6000 Vd,Vn,Vm[] (vector by element) + +INST2(umlsl2, "umlsl2", LNG, IF_EN2M, 0x6E20A000, 0x6F006000) + // umlsl2 Vd,Vn,Vm DV_3A 01101110XX1mmmmm 101000nnnnnddddd 6E20 A000 Vd,Vn,Vm (vector) + // umlsl2 Vd,Vn,Vm[] DV_3AI 01101111XXLMmmmm 0110H0nnnnnddddd 6F00 6000 Vd,Vn,Vm[] (vector by element) + +INST2(umull2, "umull2", LNG, IF_EN2M, 0x6E20C000, 0x6F00A000) + // umull2 Vd,Vn,Vm DV_3A 01101110XX1mmmmm 110000nnnnnddddd 6E20 C000 Vd,Vn,Vm (vector) + // umull2 Vd,Vn,Vm[] DV_3AI 01101111XXLMmmmm 1010H0nnnnnddddd 6F00 A000 Vd,Vn,Vm[] (vector by element) // enum name info DV_2N DV_2O INST2(sshr, "sshr", RSH, IF_EN2N, 0x5F000400, 0x0F000400) @@ -848,27 +942,27 @@ INST2(sqshlu, "sqshlu", 0, IF_EN2N, 0x7F006400, 0x2F006400) // sqshlu Vd,Vn,imm DV_2N 011111110iiiiiii 011001nnnnnddddd 7F00 6400 Vd Vn imm (left shift - scalar) // sqshlu Vd,Vn,imm DV_2O 0Q1011110iiiiiii 011001nnnnnddddd 2F00 6400 Vd Vn imm (left shift - vector) -INST2(sqrshrn, "sqrshrn", RSH, IF_EN2N, 0x5F009C00, 0x0F009C00) +INST2(sqrshrn, "sqrshrn", RSH|NRW,IF_EN2N, 0x5F009C00, 0x0F009C00) // sqrshrn Vd,Vn,imm DV_2N 010111110iiiiiii 100111nnnnnddddd 5F00 9C00 Vd Vn imm (right shift - scalar) // sqrshrn Vd,Vn,imm DV_2O 0Q0011110iiiiiii 100111nnnnnddddd 0F00 9C00 Vd Vn imm (right shift - vector) -INST2(sqrshrun, "sqrshrun", RSH, IF_EN2N, 0x7F008C00, 0x2F008C00) +INST2(sqrshrun, "sqrshrun", RSH|NRW,IF_EN2N, 0x7F008C00, 0x2F008C00) // sqrshrun Vd,Vn,imm DV_2N 011111110iiiiiii 100011nnnnnddddd 7F00 8C00 Vd Vn imm (right shift - scalar) // sqrshrun Vd,Vn,imm DV_2O 0Q1011110iiiiiii 100011nnnnnddddd 2F00 8C00 Vd Vn imm (right shift - vector) -INST2(sqshrn, "sqshrn", RSH, IF_EN2N, 0x5F009400, 0x0F009400) +INST2(sqshrn, "sqshrn", RSH|NRW,IF_EN2N, 0x5F009400, 0x0F009400) // sqshrn Vd,Vn,imm DV_2N 010111110iiiiiii 100101nnnnnddddd 5F00 9400 Vd Vn imm (right shift - scalar) // sqshrn Vd,Vn,imm DV_2O 0Q0011110iiiiiii 100101nnnnnddddd 0F00 9400 Vd Vn imm (right shift - vector) -INST2(sqshrun, "sqshrun", RSH, IF_EN2N, 0x7F008400, 0x2F008400) +INST2(sqshrun, "sqshrun", RSH|NRW,IF_EN2N, 0x7F008400, 0x2F008400) // sqshrun Vd,Vn,imm DV_2N 011111110iiiiiii 100001nnnnnddddd 7F00 8400 Vd Vn imm (right shift - scalar) // sqshrun Vd,Vn,imm DV_2O 0Q1011110iiiiiii 100001nnnnnddddd 2F00 8400 Vd Vn imm (right shift - vector) -INST2(uqrshrn, "uqrshrn", RSH, IF_EN2N, 0x7F009C00, 0x2F009C00) +INST2(uqrshrn, "uqrshrn", RSH|NRW,IF_EN2N, 0x7F009C00, 0x2F009C00) // uqrshrn Vd,Vn,imm DV_2N 011111110iiiiiii 100111nnnnnddddd 7F00 9C00 Vd Vn imm (right shift - scalar) // uqrshrn Vd,Vn,imm DV_2O 0Q1011110iiiiiii 100111nnnnnddddd 2F00 9C00 Vd Vn imm (right shift - vector) -INST2(uqshrn, "uqshrn", RSH, IF_EN2N, 0x7F009400, 0x2F009400) +INST2(uqshrn, "uqshrn", RSH|NRW,IF_EN2N, 0x7F009400, 0x2F009400) // usqhrn Vd,Vn,imm DV_2N 011111110iiiiiii 100101nnnnnddddd 7F00 9400 Vd Vn imm (right shift - scalar) // usqhrn Vd,Vn,imm DV_2O 0Q1011110iiiiiii 100101nnnnnddddd 2F00 9400 Vd Vn imm (right shift - vector) @@ -1514,7 +1608,7 @@ INST1(cnt, "cnt", 0, IF_DV_2M, 0x0E205800) INST1(not, "not", 0, IF_DV_2M, 0x2E205800) // not Vd,Vn DV_2M 0Q10111000100000 010110nnnnnddddd 2E20 5800 Vd,Vn (vector) -INST1(saddlv, "saddlv", 0, IF_DV_2T, 0x0E303800) +INST1(saddlv, "saddlv", LNG, IF_DV_2T, 0x0E303800) // saddlv Vd,Vn DV_2T 0Q001110XX110000 001110nnnnnddddd 0E30 3800 Vd,Vn (vector) INST1(smaxv, "smaxv", 0, IF_DV_2T, 0x0E30A800) @@ -1562,10 +1656,19 @@ INST1(trn1, "trn1", 0, IF_DV_3A, 0x0E002800) INST1(trn2, "trn2", 0, IF_DV_3A, 0x0E006800) // trn2 Vd,Vn,Vm DV_3A 0Q001110XX0mmmmm 011010nnnnnddddd 0E00 6800 Vd,Vn,Vm (vector) -INST1(xtn, "xtn", 0, IF_DV_2M, 0x0E212800) +INST1(sqxtn2, "sqxtn2", NRW, IF_DV_2M, 0x0E214800) + // sqxtn2 Vd,Vn DV_2M 0Q001110XX100001 010010nnnnnddddd 0E21 4800 Vd,Vn (vector) + +INST1(sqxtun2, "sqxtun2", NRW, IF_DV_2M, 0x2E212800) + // sqxtnu2 Vd,Vn DV_2M 0Q101110XX100001 001010nnnnnddddd 2E21 2800 Vd,Vn (vector) + +INST1(uqxtn2, "uqxtn2", NRW, IF_DV_2M, 0x2E214800) + // uqxtn2 Vd,Vn DV_2M 0Q101110XX100001 010010nnnnnddddd 2E21 4800 Vd,Vn (vector) + +INST1(xtn, "xtn", NRW, IF_DV_2M, 0x0E212800) // xtn Vd,Vn DV_2M 00101110XX110000 001110nnnnnddddd 0E21 2800 Vd,Vn (vector) -INST1(xtn2, "xtn2", 0, IF_DV_2M, 0x4E212800) +INST1(xtn2, "xtn2", NRW, IF_DV_2M, 0x4E212800) // xtn2 Vd,Vn DV_2M 01101110XX110000 001110nnnnnddddd 4E21 2800 Vd,Vn (vector) INST1(fnmul, "fnmul", 0, IF_DV_3D, 0x1E208800) @@ -1625,74 +1728,77 @@ INST1(umin, "umin", 0, IF_DV_3A, 0x2E206C00) INST1(uminp, "uminp", 0, IF_DV_3A, 0x2E20AC00) // umin Vd,Vn,Vm DV_3A 0Q101110XX1mmmmm 101011nnnnnddddd 2E20 AC00 Vd,Vn,Vm (vector) -INST1(fcvtl, "fcvtl", 0, IF_DV_2A, 0x0E217800) +INST1(fcvtl, "fcvtl", LNG, IF_DV_2A, 0x0E217800) // fcvtl Vd,Vn DV_2A 000011100X100001 011110nnnnnddddd 0E21 7800 Vd,Vn (vector) -INST1(fcvtl2, "fcvtl2", 0, IF_DV_2A, 0x4E217800) +INST1(fcvtl2, "fcvtl2", LNG, IF_DV_2A, 0x4E217800) // fcvtl2 Vd,Vn DV_2A 040011100X100001 011110nnnnnddddd 4E21 7800 Vd,Vn (vector) -INST1(fcvtn, "fcvtn", 0, IF_DV_2A, 0x0E216800) +INST1(fcvtn, "fcvtn", NRW, IF_DV_2A, 0x0E216800) // fcvtn Vd,Vn DV_2A 000011100X100001 011010nnnnnddddd 0E21 6800 Vd,Vn (vector) -INST1(fcvtn2, "fcvtn2", 0, IF_DV_2A, 0x4E216800) +INST1(fcvtn2, "fcvtn2", NRW, IF_DV_2A, 0x4E216800) // fcvtn2 Vd,Vn DV_2A 040011100X100001 011010nnnnnddddd 4E21 6800 Vd,Vn (vector) +INST1(fcvtxn2, "fcvtxn2", NRW, IF_DV_2A, 0x6E616800) + // fcvtxn2 Vd,Vn DV_2A 0110111001100001 011010nnnnnddddd 6E61 6800 Vd,Vn (vector) + INST1(frecpx, "frecpx", 0, IF_DV_2G, 0x5EA1F800) // frecpx Vd,Vn DV_2G 010111101X100001 111110nnnnnddddd 5EA1 F800 Vd,Vn (scalar) -INST1(addhn, "addhn", 0, IF_DV_3H, 0x0E204000) - // addhn Vd,Vn,Vm DV_3H 00001110XX1mmmmm 010000nnnnnddddd 0E20 4000 Vd,Vn,Vm (vector) +INST1(addhn, "addhn", NRW, IF_DV_3A, 0x0E204000) + // addhn Vd,Vn,Vm DV_3A 00001110XX1mmmmm 010000nnnnnddddd 0E20 4000 Vd,Vn,Vm (vector) -INST1(addhn2, "addhn2", 0, IF_DV_3H, 0x4E204000) - // addhn2 Vd,Vn,Vm DV_3H 01001110XX1mmmmm 010000nnnnnddddd 4E20 4000 Vd,Vn,Vm (vector) +INST1(addhn2, "addhn2", NRW, IF_DV_3A, 0x4E204000) + // addhn2 Vd,Vn,Vm DV_3A 01001110XX1mmmmm 010000nnnnnddddd 4E20 4000 Vd,Vn,Vm (vector) -INST1(pmull, "pmull", 0, IF_DV_3H, 0x0E20E000) - // pmull Vd,Vn,Vm DV_3H 00001110XX1mmmmm 111000nnnnnddddd 0E20 E000 Vd,Vn,Vm (vector) +INST1(pmull, "pmull", LNG, IF_DV_3A, 0x0E20E000) + // pmull Vd,Vn,Vm DV_3A 00001110XX1mmmmm 111000nnnnnddddd 0E20 E000 Vd,Vn,Vm (vector) -INST1(pmull2, "pmull2", 0, IF_DV_3H, 0x4E20E000) - // pmull2 Vd,Vn,Vm DV_3H 01001110XX1mmmmm 111000nnnnnddddd 4E20 E000 Vd,Vn,Vm (vector) +INST1(pmull2, "pmull2", LNG, IF_DV_3A, 0x4E20E000) + // pmull2 Vd,Vn,Vm DV_3A 01001110XX1mmmmm 111000nnnnnddddd 4E20 E000 Vd,Vn,Vm (vector) -INST1(raddhn, "raddhn", 0, IF_DV_3H, 0x2E204000) - // raddhn Vd,Vn,Vm DV_3H 00101110XX1mmmmm 010000nnnnnddddd 2E20 4000 Vd,Vn,Vm (vector) +INST1(raddhn, "raddhn", NRW, IF_DV_3A, 0x2E204000) + // raddhn Vd,Vn,Vm DV_3A 00101110XX1mmmmm 010000nnnnnddddd 2E20 4000 Vd,Vn,Vm (vector) -INST1(raddhn2, "raddhn2", 0, IF_DV_3H, 0x6E204000) - // raddhn2 Vd,Vn,Vm DV_3H 01101110XX1mmmmm 010000nnnnnddddd 6E20 4000 Vd,Vn,Vm (vector) +INST1(raddhn2, "raddhn2", NRW, IF_DV_3A, 0x6E204000) + // raddhn2 Vd,Vn,Vm DV_3A 01101110XX1mmmmm 010000nnnnnddddd 6E20 4000 Vd,Vn,Vm (vector) -INST1(rsubhn, "rsubhn", 0, IF_DV_3H, 0x2E206000) - // rsubhn Vd,Vn,Vm DV_3H 00101110XX1mmmmm 011000nnnnnddddd 2E20 6000 Vd,Vn,Vm (vector) +INST1(rsubhn, "rsubhn", NRW, IF_DV_3A, 0x2E206000) + // rsubhn Vd,Vn,Vm DV_3A 00101110XX1mmmmm 011000nnnnnddddd 2E20 6000 Vd,Vn,Vm (vector) -INST1(rsubhn2, "rsubhn2", 0, IF_DV_3H, 0x6E206000) - // rsubhn2 Vd,Vn,Vm DV_3H 01101110XX1mmmmm 011000nnnnnddddd 6E20 6000 Vd,Vn,Vm (vector) +INST1(rsubhn2, "rsubhn2", NRW, IF_DV_3A, 0x6E206000) + // rsubhn2 Vd,Vn,Vm DV_3A 01101110XX1mmmmm 011000nnnnnddddd 6E20 6000 Vd,Vn,Vm (vector) -INST1(sabal, "sabal", 0, IF_DV_3H, 0x0E205000) - // sabal Vd,Vn,Vm DV_3H 00001110XX1mmmmm 010100nnnnnddddd 0E20 5000 Vd,Vn,Vm (vector) +INST1(sabal, "sabal", LNG, IF_DV_3A, 0x0E205000) + // sabal Vd,Vn,Vm DV_3A 00001110XX1mmmmm 010100nnnnnddddd 0E20 5000 Vd,Vn,Vm (vector) -INST1(sabal2, "sabal2", 0, IF_DV_3H, 0x4E205000) - // sabal2 Vd,Vn,Vm DV_3H 01001110XX1mmmmm 010100nnnnnddddd 4E20 5000 Vd,Vn,Vm (vector) +INST1(sabal2, "sabal2", LNG, IF_DV_3A, 0x4E205000) + // sabal2 Vd,Vn,Vm DV_3A 01001110XX1mmmmm 010100nnnnnddddd 4E20 5000 Vd,Vn,Vm (vector) -INST1(sabdl, "sabdl", 0, IF_DV_3H, 0x0E207000) - // sabdl Vd,Vn,Vm DV_3H 00001110XX1mmmmm 011100nnnnnddddd 0E20 7000 Vd,Vn,Vm (vector) +INST1(sabdl, "sabdl", LNG, IF_DV_3A, 0x0E207000) + // sabdl Vd,Vn,Vm DV_3A 00001110XX1mmmmm 011100nnnnnddddd 0E20 7000 Vd,Vn,Vm (vector) -INST1(sabdl2, "sabdl2", 0, IF_DV_3H, 0x4E207000) - // sabdl2 Vd,Vn,Vm DV_3H 01001110XX1mmmmm 011100nnnnnddddd 4E20 7000 Vd,Vn,Vm (vector) +INST1(sabdl2, "sabdl2", LNG, IF_DV_3A, 0x4E207000) + // sabdl2 Vd,Vn,Vm DV_3A 01001110XX1mmmmm 011100nnnnnddddd 4E20 7000 Vd,Vn,Vm (vector) -INST1(sadalp, "sadalp", 0, IF_DV_2T, 0x0E206800) +INST1(sadalp, "sadalp", LNG, IF_DV_2T, 0x0E206800) // sadalp Vd,Vn DV_2T 0Q001110XX100000 011010nnnnnddddd 0E20 6800 Vd,Vn (vector) -INST1(saddl, "saddl", 0, IF_DV_3H, 0x0E200000) - // saddl Vd,Vn,Vm DV_3H 00001110XX1mmmmm 000000nnnnnddddd 0E20 0000 Vd,Vn,Vm (vector) +INST1(saddl, "saddl", LNG, IF_DV_3A, 0x0E200000) + // saddl Vd,Vn,Vm DV_3A 00001110XX1mmmmm 000000nnnnnddddd 0E20 0000 Vd,Vn,Vm (vector) -INST1(saddl2, "saddl2", 0, IF_DV_3H, 0x4E200000) - // saddl2 Vd,Vn,Vm DV_3H 01001110XX1mmmmm 000000nnnnnddddd 4E20 0000 Vd,Vn,Vm (vector) +INST1(saddl2, "saddl2", LNG, IF_DV_3A, 0x4E200000) + // saddl2 Vd,Vn,Vm DV_3A 01001110XX1mmmmm 000000nnnnnddddd 4E20 0000 Vd,Vn,Vm (vector) -INST1(saddlp, "saddlp", 0, IF_DV_2T, 0x0E202800) +INST1(saddlp, "saddlp", LNG, IF_DV_2T, 0x0E202800) // saddlp Vd,Vn DV_2T 0Q001110XX100000 001010nnnnnddddd 0E20 2800 Vd,Vn (vector) -INST1(saddw, "saddw", 0, IF_DV_3H, 0x0E201000) - // saddw Vd,Vn,Vm DV_3H 00001110XX1mmmmm 000100nnnnnddddd 0E20 1000 Vd,Vn,Vm (vector) +INST1(saddw, "saddw", WID, IF_DV_3A, 0x0E201000) + // saddw Vd,Vn,Vm DV_3A 00001110XX1mmmmm 000100nnnnnddddd 0E20 1000 Vd,Vn,Vm (vector) -INST1(saddw2, "saddw2", 0, IF_DV_3H, 0x4E201000) - // saddw2 Vd,Vn,Vm DV_3H 01001110XX1mmmmm 000100nnnnnddddd 4E20 1000 Vd,Vn,Vm (vector) +INST1(saddw2, "saddw2", WID, IF_DV_3A, 0x4E201000) + // saddw2 Vd,Vn,Vm DV_3A 01001110XX1mmmmm 000100nnnnnddddd 4E20 1000 Vd,Vn,Vm (vector) INST1(shadd, "shadd", 0, IF_DV_3A, 0x0E200400) // shadd Vd,Vn,Vm DV_3A 0Q001110XX1mmmmm 000001nnnnnddddd 0E20 0400 Vd,Vn,Vm (vector) @@ -1703,53 +1809,53 @@ INST1(shsub, "shsub", 0, IF_DV_3A, 0x0E202400) INST1(srhadd, "srhadd", 0, IF_DV_3A, 0x0E201400) // srhadd Vd,Vn,Vm DV_3A 0Q001110XX1mmmmm 000101nnnnnddddd 0E20 1400 Vd,Vn,Vm (vector) -INST1(ssubl, "ssubl", 0, IF_DV_3H, 0x0E202000) - // ssubl Vd,Vn,Vm DV_3H 00001110XX1mmmmm 001000nnnnnddddd 0E20 2000 Vd,Vn,Vm (vector) +INST1(ssubl, "ssubl", LNG, IF_DV_3A, 0x0E202000) + // ssubl Vd,Vn,Vm DV_3A 00001110XX1mmmmm 001000nnnnnddddd 0E20 2000 Vd,Vn,Vm (vector) -INST1(ssubl2, "ssubl2", 0, IF_DV_3H, 0x4E202000) - // ssubl2 Vd,Vn,Vm DV_3H 01001110XX1mmmmm 001000nnnnnddddd 4E20 2000 Vd,Vn,Vm (vector) +INST1(ssubl2, "ssubl2", LNG, IF_DV_3A, 0x4E202000) + // ssubl2 Vd,Vn,Vm DV_3A 01001110XX1mmmmm 001000nnnnnddddd 4E20 2000 Vd,Vn,Vm (vector) -INST1(ssubw, "ssubw", 0, IF_DV_3H, 0x0E203000) - // ssubw Vd,Vn,Vm DV_3H 00001110XX1mmmmm 001100nnnnnddddd 0E20 3000 Vd,Vn,Vm (vector) +INST1(ssubw, "ssubw", WID, IF_DV_3A, 0x0E203000) + // ssubw Vd,Vn,Vm DV_3A 00001110XX1mmmmm 001100nnnnnddddd 0E20 3000 Vd,Vn,Vm (vector) -INST1(ssubw2, "ssubw2", 0, IF_DV_3H, 0x4E203000) - // ssubw2 Vd,Vn,Vm DV_3H 01001110XX1mmmmm 001100nnnnnddddd 4E20 3000 Vd,Vn,Vm (vector) +INST1(ssubw2, "ssubw2", WID, IF_DV_3A, 0x4E203000) + // ssubw2 Vd,Vn,Vm DV_3A 01001110XX1mmmmm 001100nnnnnddddd 4E20 3000 Vd,Vn,Vm (vector) -INST1(subhn, "subhn", 0, IF_DV_3H, 0x0E206000) - // subhn Vd,Vn,Vm DV_3H 00001110XX1mmmmm 011000nnnnnddddd 0E20 6000 Vd,Vn,Vm (vector) +INST1(subhn, "subhn", NRW, IF_DV_3A, 0x0E206000) + // subhn Vd,Vn,Vm DV_3A 00001110XX1mmmmm 011000nnnnnddddd 0E20 6000 Vd,Vn,Vm (vector) -INST1(subhn2, "subhn2", 0, IF_DV_3H, 0x4E206000) - // subhn2 Vd,Vn,Vm DV_3H 01001110XX1mmmmm 011000nnnnnddddd 4E20 6000 Vd,Vn,Vm (vector) +INST1(subhn2, "subhn2", NRW, IF_DV_3A, 0x4E206000) + // subhn2 Vd,Vn,Vm DV_3A 01001110XX1mmmmm 011000nnnnnddddd 4E20 6000 Vd,Vn,Vm (vector) -INST1(uabal, "uabal", 0, IF_DV_3H, 0x2E205000) - // uabal Vd,Vn,Vm DV_3H 00101110XX1mmmmm 010100nnnnnddddd 2E20 5000 Vd,Vn,Vm (vector) +INST1(uabal, "uabal", LNG, IF_DV_3A, 0x2E205000) + // uabal Vd,Vn,Vm DV_3A 00101110XX1mmmmm 010100nnnnnddddd 2E20 5000 Vd,Vn,Vm (vector) -INST1(uabal2, "uabal2", 0, IF_DV_3H, 0x6E205000) - // uabal2 Vd,Vn,Vm DV_3H 01101110XX1mmmmm 010100nnnnnddddd 6E20 5000 Vd,Vn,Vm (vector) +INST1(uabal2, "uabal2", LNG, IF_DV_3A, 0x6E205000) + // uabal2 Vd,Vn,Vm DV_3A 01101110XX1mmmmm 010100nnnnnddddd 6E20 5000 Vd,Vn,Vm (vector) -INST1(uabdl, "uabdl", 0, IF_DV_3H, 0x2E207000) - // uabdl Vd,Vn,Vm DV_3H 00101110XX1mmmmm 011100nnnnnddddd 2E20 7000 Vd,Vn,Vm (vector) +INST1(uabdl, "uabdl", LNG, IF_DV_3A, 0x2E207000) + // uabdl Vd,Vn,Vm DV_3A 00101110XX1mmmmm 011100nnnnnddddd 2E20 7000 Vd,Vn,Vm (vector) -INST1(uabdl2, "uabdl2", 0, IF_DV_3H, 0x6E207000) - // uabdl2 Vd,Vn,Vm DV_3H 01101110XX1mmmmm 011100nnnnnddddd 6E20 7000 Vd,Vn,Vm (vector) +INST1(uabdl2, "uabdl2", LNG, IF_DV_3A, 0x6E207000) + // uabdl2 Vd,Vn,Vm DV_3A 01101110XX1mmmmm 011100nnnnnddddd 6E20 7000 Vd,Vn,Vm (vector) -INST1(uadalp, "uadalp", 0, IF_DV_2T, 0x2E206800) +INST1(uadalp, "uadalp", LNG, IF_DV_2T, 0x2E206800) // uadalp Vd,Vn DV_2T 0Q101110XX100000 011010nnnnnddddd 2E20 6800 Vd,Vn (vector) -INST1(uaddl, "uaddl", 0, IF_DV_3H, 0x2E200000) - // uaddl Vd,Vn,Vm DV_3H 00101110XX1mmmmm 000000nnnnnddddd 2E20 0000 Vd,Vn,Vm (vector) +INST1(uaddl, "uaddl", LNG, IF_DV_3A, 0x2E200000) + // uaddl Vd,Vn,Vm DV_3A 00101110XX1mmmmm 000000nnnnnddddd 2E20 0000 Vd,Vn,Vm (vector) -INST1(uaddl2, "uaddl2", 0, IF_DV_3H, 0x6E200000) - // uaddl2 Vd,Vn,Vm DV_3H 01101110XX1mmmmm 000000nnnnnddddd 6E20 0000 Vd,Vn,Vm (vector) +INST1(uaddl2, "uaddl2", LNG, IF_DV_3A, 0x6E200000) + // uaddl2 Vd,Vn,Vm DV_3A 01101110XX1mmmmm 000000nnnnnddddd 6E20 0000 Vd,Vn,Vm (vector) -INST1(uaddlp, "uaddlp", 0, IF_DV_2T, 0x2E202800) +INST1(uaddlp, "uaddlp", LNG, IF_DV_2T, 0x2E202800) // uaddlp Vd,Vn DV_2T 0Q101110XX100000 001010nnnnnddddd 2E20 2800 Vd,Vn (vector) -INST1(uaddw, "uaddw", 0, IF_DV_3H, 0x2E201000) - // uaddw Vd,Vn,Vm DV_3H 00101110XX1mmmmm 000100nnnnnddddd 2E20 1000 Vd,Vn,Vm (vector) +INST1(uaddw, "uaddw", WID, IF_DV_3A, 0x2E201000) + // uaddw Vd,Vn,Vm DV_3A 00101110XX1mmmmm 000100nnnnnddddd 2E20 1000 Vd,Vn,Vm (vector) -INST1(uaddw2, "uaddw2", 0, IF_DV_3H, 0x6E201000) - // uaddw2 Vd,Vn,Vm DV_3H 01101110XX1mmmmm 000100nnnnnddddd 6E20 1000 Vd,Vn,Vm (vector) +INST1(uaddw2, "uaddw2", WID, IF_DV_3A, 0x6E201000) + // uaddw2 Vd,Vn,Vm DV_3A 01101110XX1mmmmm 000100nnnnnddddd 6E20 1000 Vd,Vn,Vm (vector) INST1(uhadd, "uhadd", 0, IF_DV_3A, 0x2E200400) // uhadd Vd,Vn,Vm DV_3A 0Q101110XX1mmmmm 000001nnnnnddddd 2E20 0400 Vd,Vn,Vm (vector) @@ -1760,76 +1866,76 @@ INST1(uhsub, "uhsub", 0, IF_DV_3A, 0x2E202400) INST1(urhadd, "urhadd", 0, IF_DV_3A, 0x2E201400) // urhadd Vd,Vn,Vm DV_3A 0Q101110XX1mmmmm 000101nnnnnddddd 2E20 1400 Vd,Vn,Vm (vector) -INST1(usubl, "usubl", 0, IF_DV_3H, 0x2E202000) - // usubl Vd,Vn,Vm DV_3H 00101110XX1mmmmm 001000nnnnnddddd 2E20 2000 Vd,Vn,Vm (vector) +INST1(usubl, "usubl", LNG, IF_DV_3A, 0x2E202000) + // usubl Vd,Vn,Vm DV_3A 00101110XX1mmmmm 001000nnnnnddddd 2E20 2000 Vd,Vn,Vm (vector) -INST1(usubl2, "usubl2", 0, IF_DV_3H, 0x6E202000) - // usubl2 Vd,Vn,Vm DV_3H 01101110XX1mmmmm 001000nnnnnddddd 6E20 2000 Vd,Vn,Vm (vector) +INST1(usubl2, "usubl2", LNG, IF_DV_3A, 0x6E202000) + // usubl2 Vd,Vn,Vm DV_3A 01101110XX1mmmmm 001000nnnnnddddd 6E20 2000 Vd,Vn,Vm (vector) -INST1(usubw, "usubw", 0, IF_DV_3H, 0x2E203000) - // usubw Vd,Vn,Vm DV_3H 00101110XX1mmmmm 001100nnnnnddddd 2E20 3000 Vd,Vn,Vm (vector) +INST1(usubw, "usubw", WID, IF_DV_3A, 0x2E203000) + // usubw Vd,Vn,Vm DV_3A 00101110XX1mmmmm 001100nnnnnddddd 2E20 3000 Vd,Vn,Vm (vector) -INST1(usubw2, "usubw2", 0, IF_DV_3H, 0x6E203000) - // usubw2 Vd,Vn,Vm DV_3H 01101110XX1mmmmm 001100nnnnnddddd 6E20 3000 Vd,Vn,Vm (vector) +INST1(usubw2, "usubw2", WID, IF_DV_3A, 0x6E203000) + // usubw2 Vd,Vn,Vm DV_3A 01101110XX1mmmmm 001100nnnnnddddd 6E20 3000 Vd,Vn,Vm (vector) -INST1(shll, "shll", 0, IF_DV_2M, 0x2F00A400) +INST1(shll, "shll", LNG, IF_DV_2M, 0x2F00A400) // shll Vd,Vn,imm DV_2M 0Q101110XX100001 001110nnnnnddddd 2E21 3800 Vd,Vn, {8/16/32} -INST1(shll2, "shll2", 0, IF_DV_2M, 0x6F00A400) +INST1(shll2, "shll2", LNG, IF_DV_2M, 0x6F00A400) // shll Vd,Vn,imm DV_2M 0Q101110XX100001 001110nnnnnddddd 2E21 3800 Vd,Vn, {8/16/32} -INST1(sshll, "sshll", 0, IF_DV_2O, 0x0F00A400) +INST1(sshll, "sshll", LNG, IF_DV_2O, 0x0F00A400) // sshll Vd,Vn,imm DV_2O 000011110iiiiiii 101001nnnnnddddd 0F00 A400 Vd,Vn imm (left shift - vector) -INST1(sshll2, "sshll2", 0, IF_DV_2O, 0x4F00A400) +INST1(sshll2, "sshll2", LNG, IF_DV_2O, 0x4F00A400) // sshll2 Vd,Vn,imm DV_2O 010011110iiiiiii 101001nnnnnddddd 4F00 A400 Vd,Vn imm (left shift - vector) -INST1(ushll, "ushll", 0, IF_DV_2O, 0x2F00A400) +INST1(ushll, "ushll", LNG, IF_DV_2O, 0x2F00A400) // ushll Vd,Vn,imm DV_2O 001011110iiiiiii 101001nnnnnddddd 2F00 A400 Vd,Vn imm (left shift - vector) -INST1(ushll2, "ushll2", 0, IF_DV_2O, 0x6F00A400) +INST1(ushll2, "ushll2", LNG, IF_DV_2O, 0x6F00A400) // ushll2 Vd,Vn,imm DV_2O 011011110iiiiiii 101001nnnnnddddd 6F00 A400 Vd,Vn imm (left shift - vector) -INST1(shrn, "shrn", RSH, IF_DV_2O, 0x0F008400) +INST1(shrn, "shrn", RSH|NRW,IF_DV_2O, 0x0F008400) // shrn Vd,Vn,imm DV_2O 000011110iiiiiii 100001nnnnnddddd 0F00 8400 Vd,Vn imm (right shift - vector) -INST1(shrn2, "shrn2", RSH, IF_DV_2O, 0x4F008400) +INST1(shrn2, "shrn2", RSH|NRW,IF_DV_2O, 0x4F008400) // shrn2 Vd,Vn,imm DV_2O 010011110iiiiiii 100001nnnnnddddd 4F00 8400 Vd,Vn imm (right shift - vector) -INST1(rshrn, "rshrn", RSH, IF_DV_2O, 0x0F008C00) +INST1(rshrn, "rshrn", RSH|NRW,IF_DV_2O, 0x0F008C00) // rshrn Vd,Vn,imm DV_2O 000011110iiiiiii 100011nnnnnddddd 0F00 8C00 Vd,Vn imm (right shift - vector) -INST1(rshrn2, "rshrn2", RSH, IF_DV_2O, 0x4F008C00) +INST1(rshrn2, "rshrn2", RSH|NRW,IF_DV_2O, 0x4F008C00) // rshrn2 Vd,Vn,imm DV_2O 010011110iiiiiii 100011nnnnnddddd 4F00 8C00 Vd,Vn imm (right shift - vector) -INST1(sqrshrn2, "sqrshrn2", RSH, IF_DV_2O, 0x0F009C00) +INST1(sqrshrn2, "sqrshrn2", RSH|NRW,IF_DV_2O, 0x0F009C00) // sqrshrn2 Vd,Vn,imm DV_2O 0Q0011110iiiiiii 100111nnnnnddddd 0F00 9C00 Vd Vn imm (right shift - vector) -INST1(sqrshrun2, "sqrshrun2", RSH, IF_DV_2O, 0x2F008C00) +INST1(sqrshrun2, "sqrshrun2", RSH|NRW,IF_DV_2O, 0x2F008C00) // sqrshrun2 Vd,Vn,imm DV_2O 0Q1011110iiiiiii 100011nnnnnddddd 2F00 8C00 Vd Vn imm (right shift - vector) -INST1(sqshrn2, "sqshrn2", RSH, IF_DV_2O, 0x0F009400) +INST1(sqshrn2, "sqshrn2", RSH|NRW,IF_DV_2O, 0x0F009400) // sqshrn2 Vd,Vn,imm DV_2O 0Q0011110iiiiiii 100101nnnnnddddd 0F00 9400 Vd Vn imm (right shift - vector) -INST1(sqshrun2, "sqshrun2", RSH, IF_DV_2O, 0x2F008400) +INST1(sqshrun2, "sqshrun2", RSH|NRW,IF_DV_2O, 0x2F008400) // sqshrun2 Vd,Vn,imm DV_2O 0Q1011110iiiiiii 100001nnnnnddddd 2F00 8400 Vd Vn imm (right shift - vector) -INST1(uqrshrn2, "uqrshrn2", RSH, IF_DV_2O, 0x2F009C00) +INST1(uqrshrn2, "uqrshrn2", RSH|NRW,IF_DV_2O, 0x2F009C00) // uqrshrn2 Vd,Vn,imm DV_2O 0Q1011110iiiiiii 100111nnnnnddddd 2F00 9C00 Vd Vn imm (right shift - vector) -INST1(uqshrn2, "uqshrn2", RSH, IF_DV_2O, 0x2F009400) +INST1(uqshrn2, "uqshrn2", RSH|NRW,IF_DV_2O, 0x2F009400) // uqshrn2 Vd,Vn,imm DV_2O 0Q1011110iiiiiii 100101nnnnnddddd 2F00 9400 Vd Vn imm (right shift - vector) -INST1(sxtl, "sxtl", 0, IF_DV_2O, 0x0F00A400) +INST1(sxtl, "sxtl", LNG, IF_DV_2O, 0x0F00A400) // sxtl Vd,Vn DV_2O 000011110iiiiiii 101001nnnnnddddd 0F00 A400 Vd,Vn (left shift - vector) -INST1(sxtl2, "sxtl2", 0, IF_DV_2O, 0x4F00A400) +INST1(sxtl2, "sxtl2", LNG, IF_DV_2O, 0x4F00A400) // sxtl2 Vd,Vn DV_2O 010011110iiiiiii 101001nnnnnddddd 4F00 A400 Vd,Vn (left shift - vector) -INST1(uxtl, "uxtl", 0, IF_DV_2O, 0x2F00A400) +INST1(uxtl, "uxtl", LNG, IF_DV_2O, 0x2F00A400) // uxtl Vd,Vn DV_2O 001011110iiiiiii 101001nnnnnddddd 2F00 A400 Vd,Vn (left shift - vector) -INST1(uxtl2, "uxtl2", 0, IF_DV_2O, 0x6F00A400) +INST1(uxtl2, "uxtl2", LNG, IF_DV_2O, 0x6F00A400) // uxtl2 Vd,Vn DV_2O 011011110iiiiiii 101001nnnnnddddd 6F00 A400 Vd,Vn (left shift - vector) INST1(tbl, "tbl", 0, IF_DV_3C, 0x0E000000) diff --git a/src/coreclr/src/jit/instrsxarch.h b/src/coreclr/src/jit/instrsxarch.h index cbb56aa04c43..60616c5177b5 100644 --- a/src/coreclr/src/jit/instrsxarch.h +++ b/src/coreclr/src/jit/instrsxarch.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // This file was previously known as instrs.h diff --git a/src/coreclr/src/jit/jit.h b/src/coreclr/src/jit/jit.h index 0e27e37c7b23..70296152db53 100644 --- a/src/coreclr/src/jit/jit.h +++ b/src/coreclr/src/jit/jit.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*****************************************************************************/ #ifndef _JIT_H_ diff --git a/src/coreclr/src/jit/jitconfig.cpp b/src/coreclr/src/jit/jitconfig.cpp index 69b36f2bf6b0..6fdbad427fe8 100644 --- a/src/coreclr/src/jit/jitconfig.cpp +++ b/src/coreclr/src/jit/jitconfig.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "jitpch.h" #ifdef _MSC_VER diff --git a/src/coreclr/src/jit/jitconfig.h b/src/coreclr/src/jit/jitconfig.h index 2b03287bd30a..12d327d292b3 100644 --- a/src/coreclr/src/jit/jitconfig.h +++ b/src/coreclr/src/jit/jitconfig.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _JITCONFIG_H_ #define _JITCONFIG_H_ diff --git a/src/coreclr/src/jit/jitconfigvalues.h b/src/coreclr/src/jit/jitconfigvalues.h index 92ad41c61188..e6c1ab307e46 100644 --- a/src/coreclr/src/jit/jitconfigvalues.h +++ b/src/coreclr/src/jit/jitconfigvalues.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #if !defined(CONFIG_INTEGER) || !defined(CONFIG_STRING) || !defined(CONFIG_METHODSET) #error CONFIG_INTEGER, CONFIG_STRING, and CONFIG_METHODSET must be defined before including this file. @@ -439,7 +438,7 @@ CONFIG_INTEGER(JitSaveFpLrWithCalleeSavedRegisters, W("JitSaveFpLrWithCalleeSave #endif // defined(TARGET_ARM64) #endif // DEBUG -CONFIG_INTEGER(JitDoOldStructRetyping, W("JitDoOldStructRetyping"), 1) // Allow Jit to retype structs as primitive types +CONFIG_INTEGER(JitDoOldStructRetyping, W("JitDoOldStructRetyping"), 0) // Allow Jit to retype structs as primitive types // when possible. #undef CONFIG_INTEGER diff --git a/src/coreclr/src/jit/jitee.h b/src/coreclr/src/jit/jitee.h index 405ef9a7d742..a12f7f29329b 100644 --- a/src/coreclr/src/jit/jitee.h +++ b/src/coreclr/src/jit/jitee.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // This class wraps the CORJIT_FLAGS type in the JIT-EE interface (in corjit.h) such that the JIT can // build with either the old flags (COR_JIT_EE_VERSION <= 460) or the new flags (COR_JIT_EE_VERSION > 460). diff --git a/src/coreclr/src/jit/jiteh.cpp b/src/coreclr/src/jit/jiteh.cpp index b9f7499cbe7b..d61d50df0e6d 100644 --- a/src/coreclr/src/jit/jiteh.cpp +++ b/src/coreclr/src/jit/jiteh.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/src/coreclr/src/jit/jiteh.h b/src/coreclr/src/jit/jiteh.h index 852dc4d2fe66..51dcad7d9094 100644 --- a/src/coreclr/src/jit/jiteh.h +++ b/src/coreclr/src/jit/jiteh.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/src/coreclr/src/jit/jitexpandarray.h b/src/coreclr/src/jit/jitexpandarray.h index abe086c33762..999fcdb683c2 100644 --- a/src/coreclr/src/jit/jitexpandarray.h +++ b/src/coreclr/src/jit/jitexpandarray.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma once diff --git a/src/coreclr/src/jit/jitgcinfo.h b/src/coreclr/src/jit/jitgcinfo.h index 6d6550aa0763..e9ef97c2a17e 100644 --- a/src/coreclr/src/jit/jitgcinfo.h +++ b/src/coreclr/src/jit/jitgcinfo.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // Garbage-collector information // Keeps track of which variables hold pointers. diff --git a/src/coreclr/src/jit/jithashtable.h b/src/coreclr/src/jit/jithashtable.h index 2ae55f8c2be1..4d2d19d1389f 100644 --- a/src/coreclr/src/jit/jithashtable.h +++ b/src/coreclr/src/jit/jithashtable.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma once diff --git a/src/coreclr/src/jit/jitpch.h b/src/coreclr/src/jit/jitpch.h index 1fe8f2730296..61954c4288e6 100644 --- a/src/coreclr/src/jit/jitpch.h +++ b/src/coreclr/src/jit/jitpch.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include #include diff --git a/src/coreclr/src/jit/jitstd.h b/src/coreclr/src/jit/jitstd.h index 09095a35ff02..3e2fed3861ee 100644 --- a/src/coreclr/src/jit/jitstd.h +++ b/src/coreclr/src/jit/jitstd.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "allocator.h" #include "list.h" diff --git a/src/coreclr/src/jit/jitstd/algorithm.h b/src/coreclr/src/jit/jitstd/algorithm.h index 460bf08529f5..000639a5a1de 100644 --- a/src/coreclr/src/jit/jitstd/algorithm.h +++ b/src/coreclr/src/jit/jitstd/algorithm.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/jit/jitstd/allocator.h b/src/coreclr/src/jit/jitstd/allocator.h index 933f9214a37a..b0f0c25293ba 100644 --- a/src/coreclr/src/jit/jitstd/allocator.h +++ b/src/coreclr/src/jit/jitstd/allocator.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma once diff --git a/src/coreclr/src/jit/jitstd/functional.h b/src/coreclr/src/jit/jitstd/functional.h index f9d4592e916b..05582014f34a 100644 --- a/src/coreclr/src/jit/jitstd/functional.h +++ b/src/coreclr/src/jit/jitstd/functional.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/jit/jitstd/iterator.h b/src/coreclr/src/jit/jitstd/iterator.h index 975755c59cad..b97a4e71b8bb 100644 --- a/src/coreclr/src/jit/jitstd/iterator.h +++ b/src/coreclr/src/jit/jitstd/iterator.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/jit/jitstd/list.h b/src/coreclr/src/jit/jitstd/list.h index 5f28bdfd4cee..070d94361f2a 100644 --- a/src/coreclr/src/jit/jitstd/list.h +++ b/src/coreclr/src/jit/jitstd/list.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ==++== // diff --git a/src/coreclr/src/jit/jitstd/new.h b/src/coreclr/src/jit/jitstd/new.h index 7054fbea0b14..7569a69b6bc8 100644 --- a/src/coreclr/src/jit/jitstd/new.h +++ b/src/coreclr/src/jit/jitstd/new.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/jit/jitstd/utility.h b/src/coreclr/src/jit/jitstd/utility.h index 119450ee388a..624bb7bc7c39 100644 --- a/src/coreclr/src/jit/jitstd/utility.h +++ b/src/coreclr/src/jit/jitstd/utility.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/jit/jitstd/vector.h b/src/coreclr/src/jit/jitstd/vector.h index 9ffde558b544..30a847717727 100644 --- a/src/coreclr/src/jit/jitstd/vector.h +++ b/src/coreclr/src/jit/jitstd/vector.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ==++== // diff --git a/src/coreclr/src/jit/jittelemetry.cpp b/src/coreclr/src/jit/jittelemetry.cpp index 386178941438..dbf350885e02 100644 --- a/src/coreclr/src/jit/jittelemetry.cpp +++ b/src/coreclr/src/jit/jittelemetry.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*****************************************************************************/ // clrjit diff --git a/src/coreclr/src/jit/jittelemetry.h b/src/coreclr/src/jit/jittelemetry.h index 24a0ce7b5db8..b8983e5b69ee 100644 --- a/src/coreclr/src/jit/jittelemetry.h +++ b/src/coreclr/src/jit/jittelemetry.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*****************************************************************************/ // clrjit diff --git a/src/coreclr/src/jit/lclmorph.cpp b/src/coreclr/src/jit/lclmorph.cpp index 176f1994d85a..1df49356c6ae 100644 --- a/src/coreclr/src/jit/lclmorph.cpp +++ b/src/coreclr/src/jit/lclmorph.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "jitpch.h" @@ -521,6 +520,37 @@ class LocalAddressVisitor final : public GenTreeVisitor PopValue(); break; + case GT_RETURN: + if (TopValue(0).Node() != node) + { + assert(TopValue(1).Node() == node); + assert(TopValue(0).Node() == node->gtGetOp1()); + GenTreeUnOp* ret = node->AsUnOp(); + GenTree* retVal = ret->gtGetOp1(); + if (!m_compiler->compDoOldStructRetyping() && retVal->OperIs(GT_LCL_VAR)) + { + // TODO-1stClassStructs: this block is a temporary workaround to keep diffs small, + // having `doNotEnreg` affect block init and copy transformations that affect many methods. + // I have a change that introduces more precise and effective solution for that, but it would + // be merged separatly. + GenTreeLclVar* lclVar = retVal->AsLclVar(); + unsigned lclNum = lclVar->GetLclNum(); + if (!m_compiler->compMethodReturnsMultiRegRegTypeAlternate() && + !m_compiler->lvaIsImplicitByRefLocal(lclVar->GetLclNum())) + { + LclVarDsc* varDsc = m_compiler->lvaGetDesc(lclNum); + if (varDsc->lvFieldCnt > 1) + { + m_compiler->lvaSetVarDoNotEnregister(lclNum DEBUGARG(Compiler::DNER_BlockOp)); + } + } + } + + EscapeValue(TopValue(0), node); + PopValue(); + } + break; + default: while (TopValue(0).Node() != node) { diff --git a/src/coreclr/src/jit/lclvars.cpp b/src/coreclr/src/jit/lclvars.cpp index b2c95af98915..ae8408df6e0c 100644 --- a/src/coreclr/src/jit/lclvars.cpp +++ b/src/coreclr/src/jit/lclvars.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -86,9 +85,6 @@ void Compiler::lvaInit() lvaCurEpoch = 0; structPromotionHelper = new (this, CMK_Generic) StructPromotionHelper(this); - - lvaEnregEHVars = (((opts.compFlags & CLFLG_REGVAR) != 0) && JitConfig.EnableEHWriteThru()); - lvaEnregMultiRegVars = (((opts.compFlags & CLFLG_REGVAR) != 0) && JitConfig.EnableMultiRegLocals()); } /*****************************************************************************/ @@ -1977,6 +1973,12 @@ bool Compiler::StructPromotionHelper::ShouldPromoteStructVar(unsigned lclNum) shouldPromote = false; } } + else if (!compiler->compDoOldStructRetyping() && (lclNum == compiler->genReturnLocal) && + (structPromotionInfo.fieldCnt > 1)) + { + // TODO-1stClassStructs: a temporary solution to keep diffs small, it will be fixed later. + shouldPromote = false; + } // // If the lvRefCnt is zero and we have a struct promoted parameter we can end up with an extra store of @@ -3414,23 +3416,8 @@ void Compiler::lvaSortByRefCount() lvaSetVarDoNotEnregister(lclNum DEBUGARG(DNER_IsStruct)); } } - else if (varDsc->lvIsStructField && (lvaGetParentPromotionType(lclNum) != PROMOTION_TYPE_INDEPENDENT) && - (lvaGetDesc(varDsc->lvParentLcl)->lvRefCnt() > 1)) + else if (varDsc->lvIsStructField && (lvaGetParentPromotionType(lclNum) != PROMOTION_TYPE_INDEPENDENT)) { - // SSA must exclude struct fields that are not independently promoted - // as dependent fields could be assigned using a CopyBlock - // resulting in a single node causing multiple SSA definitions - // which isn't currently supported by SSA - // - // If the parent struct local ref count is less than 2, then either the struct is no longer - // referenced or the field is no longer referenced: we increment the struct local ref count in incRefCnts - // for each field use when the struct is dependently promoted. This can happen, e.g, if we've removed - // a block initialization for the struct. In that case we can still track the local field. - // - // TODO-CQ: Consider using lvLclBlockOpAddr and only marking these LclVars - // untracked when a blockOp is used to assign the struct. - // - varDsc->lvTracked = 0; // so, don't mark as tracked lvaSetVarDoNotEnregister(lclNum DEBUGARG(DNER_DepField)); } else if (varDsc->lvPinned) @@ -3658,6 +3645,53 @@ var_types LclVarDsc::lvaArgType() return type; } +//---------------------------------------------------------------------------------------------- +// CanBeReplacedWithItsField: check if a whole struct reference could be replaced by a field. +// +// Arguments: +// comp - the compiler instance; +// +// Return Value: +// true if that can be replaced, false otherwise. +// +// Notes: +// The replacement can be made only for independently promoted structs +// with 1 field without holes. +// +bool LclVarDsc::CanBeReplacedWithItsField(Compiler* comp) const +{ + if (!lvPromoted) + { + return false; + } + + if (comp->lvaGetPromotionType(this) != Compiler::PROMOTION_TYPE_INDEPENDENT) + { + return false; + } + if (lvFieldCnt != 1) + { + return false; + } + if (lvContainsHoles) + { + return false; + } + +#if defined(FEATURE_SIMD) + // If we return `struct A { SIMD16 a; }` we split the struct into several fields. + // In order to do that we have to have its field `a` in memory. Right now lowering cannot + // handle RETURN struct(multiple registers)->SIMD16(one register), but it can be improved. + LclVarDsc* fieldDsc = comp->lvaGetDesc(lvFieldLclStart); + if (varTypeIsSIMD(fieldDsc)) + { + return false; + } +#endif // FEATURE_SIMD + + return true; +} + //------------------------------------------------------------------------ // lvaMarkLclRefs: increment local var references counts and more // diff --git a/src/coreclr/src/jit/lir.cpp b/src/coreclr/src/jit/lir.cpp index 87371ba25302..290b3fd58939 100644 --- a/src/coreclr/src/jit/lir.cpp +++ b/src/coreclr/src/jit/lir.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "jitpch.h" #include "smallhash.h" diff --git a/src/coreclr/src/jit/lir.h b/src/coreclr/src/jit/lir.h index 4785a2a37ca9..460a24e58e38 100644 --- a/src/coreclr/src/jit/lir.h +++ b/src/coreclr/src/jit/lir.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _LIR_H_ #define _LIR_H_ diff --git a/src/coreclr/src/jit/liveness.cpp b/src/coreclr/src/jit/liveness.cpp index dc24bdffc2ba..a99323084d2f 100644 --- a/src/coreclr/src/jit/liveness.cpp +++ b/src/coreclr/src/jit/liveness.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ================================================================================= // Code that works with liveness and related concepts (interference, debug scope) @@ -342,21 +341,21 @@ void Compiler::fgPerNodeLocalVarLiveness(GenTree* tree) fgCurMemoryDef |= memoryKindSet(GcHeap, ByrefExposed); fgCurMemoryHavoc |= memoryKindSet(GcHeap, ByrefExposed); } - } - // If this is a p/invoke unmanaged call or if this is a tail-call + // If this is a p/invoke unmanaged call or if this is a tail-call via helper, // and we have an unmanaged p/invoke call in the method, // then we're going to run the p/invoke epilog. // So we mark the FrameRoot as used by this instruction. // This ensures that the block->bbVarUse will contain // the FrameRoot local var if is it a tracked variable. - if ((tree->AsCall()->IsUnmanaged() || tree->AsCall()->IsTailCall()) && compMethodRequiresPInvokeFrame()) + if ((tree->AsCall()->IsUnmanaged() || tree->AsCall()->IsTailCallViaJitHelper()) && + compMethodRequiresPInvokeFrame()) { assert((!opts.ShouldUsePInvokeHelpers()) || (info.compLvFrameListRoot == BAD_VAR_NUM)); if (!opts.ShouldUsePInvokeHelpers()) { - /* Get the TCB local and mark it as used */ + // Get the FrameRoot local and mark it as used. noway_assert(info.compLvFrameListRoot < lvaCount); @@ -373,6 +372,7 @@ void Compiler::fgPerNodeLocalVarLiveness(GenTree* tree) } break; + } default: @@ -504,7 +504,7 @@ void Compiler::fgPerBlockLocalVarLiveness() } } - /* Get the TCB local and mark it as used */ + // Mark the FrameListRoot as used, if applicable. if (block->bbJumpKind == BBJ_RETURN && compMethodRequiresPInvokeFrame()) { @@ -513,13 +513,22 @@ void Compiler::fgPerBlockLocalVarLiveness() { noway_assert(info.compLvFrameListRoot < lvaCount); - LclVarDsc* varDsc = &lvaTable[info.compLvFrameListRoot]; - - if (varDsc->lvTracked) + // 32-bit targets always pop the frame in the epilog. + // For 64-bit targets, we only do this in the epilog for IL stubs; + // for non-IL stubs the frame is popped after every PInvoke call. + CLANG_FORMAT_COMMENT_ANCHOR; +#ifdef TARGET_64BIT + if (opts.jitFlags->IsSet(JitFlags::JIT_FLAG_IL_STUB)) +#endif { - if (!VarSetOps::IsMember(this, fgCurDefSet, varDsc->lvVarIndex)) + LclVarDsc* varDsc = &lvaTable[info.compLvFrameListRoot]; + + if (varDsc->lvTracked) { - VarSetOps::AddElemD(this, fgCurUseSet, varDsc->lvVarIndex); + if (!VarSetOps::IsMember(this, fgCurDefSet, varDsc->lvVarIndex)) + { + VarSetOps::AddElemD(this, fgCurUseSet, varDsc->lvVarIndex); + } } } } @@ -1437,16 +1446,16 @@ void Compiler::fgComputeLifeCall(VARSET_TP& life, GenTreeCall* call) { assert(call != nullptr); - // If this is a tail-call and we have any unmanaged p/invoke calls in - // the method then we're going to run the p/invoke epilog + // If this is a tail-call via helper, and we have any unmanaged p/invoke calls in + // the method, then we're going to run the p/invoke epilog // So we mark the FrameRoot as used by this instruction. // This ensure that this variable is kept alive at the tail-call - if (call->IsTailCall() && compMethodRequiresPInvokeFrame()) + if (call->IsTailCallViaJitHelper() && compMethodRequiresPInvokeFrame()) { assert((!opts.ShouldUsePInvokeHelpers()) || (info.compLvFrameListRoot == BAD_VAR_NUM)); if (!opts.ShouldUsePInvokeHelpers()) { - /* Get the TCB local and make it live */ + // Get the FrameListRoot local and make it live. noway_assert(info.compLvFrameListRoot < lvaCount); @@ -1465,7 +1474,7 @@ void Compiler::fgComputeLifeCall(VARSET_TP& life, GenTreeCall* call) /* Is this call to unmanaged code? */ if (call->IsUnmanaged() && compMethodRequiresPInvokeFrame()) { - /* Get the TCB local and make it live */ + // Get the FrameListRoot local and make it live. assert((!opts.ShouldUsePInvokeHelpers()) || (info.compLvFrameListRoot == BAD_VAR_NUM)); if (!opts.ShouldUsePInvokeHelpers()) { @@ -1634,6 +1643,33 @@ bool Compiler::fgComputeLifeUntrackedLocal(VARSET_TP& life, { assert(lclVarNode != nullptr); + bool isDef = ((lclVarNode->gtFlags & GTF_VAR_DEF) != 0); + + // We have accurate ref counts when running late liveness so we can eliminate + // some stores if the lhs local has a ref count of 1. + if (isDef && compRationalIRForm && (varDsc.lvRefCnt() == 1) && !varDsc.lvPinned) + { + if (varDsc.lvIsStructField) + { + if ((lvaGetDesc(varDsc.lvParentLcl)->lvRefCnt() == 1) && + (lvaGetParentPromotionType(&varDsc) == PROMOTION_TYPE_DEPENDENT)) + { + return true; + } + } + else if (varTypeIsStruct(varDsc.lvType)) + { + if (lvaGetPromotionType(&varDsc) != PROMOTION_TYPE_INDEPENDENT) + { + return true; + } + } + else + { + return true; + } + } + if (!varTypeIsStruct(varDsc.lvType) || (lvaGetPromotionType(&varDsc) == PROMOTION_TYPE_NONE)) { return false; @@ -1641,7 +1677,6 @@ bool Compiler::fgComputeLifeUntrackedLocal(VARSET_TP& life, VARSET_TP fieldSet(VarSetOps::MakeEmpty(this)); bool fieldsAreTracked = true; - bool isDef = ((lclVarNode->gtFlags & GTF_VAR_DEF) != 0); for (unsigned i = varDsc.lvFieldLclStart; i < varDsc.lvFieldLclStart + varDsc.lvFieldCnt; ++i) { @@ -1672,8 +1707,12 @@ bool Compiler::fgComputeLifeUntrackedLocal(VARSET_TP& life, if (isDef) { VARSET_TP liveFields(VarSetOps::Intersection(this, life, fieldSet)); - VarSetOps::DiffD(this, fieldSet, keepAliveVars); - VarSetOps::DiffD(this, life, fieldSet); + if ((lclVarNode->gtFlags & GTF_VAR_USEASG) == 0) + { + VarSetOps::DiffD(this, fieldSet, keepAliveVars); + VarSetOps::DiffD(this, life, fieldSet); + } + if (fieldsAreTracked && VarSetOps::IsEmpty(this, liveFields)) { // None of the fields were live, so this is a dead store. @@ -1683,12 +1722,14 @@ bool Compiler::fgComputeLifeUntrackedLocal(VARSET_TP& life, VARSET_TP keepAliveFields(VarSetOps::Intersection(this, fieldSet, keepAliveVars)); noway_assert(VarSetOps::IsEmpty(this, keepAliveFields)); - // Do not consider this store dead if the parent local variable is an address exposed local. - return !varDsc.lvAddrExposed; + // Do not consider this store dead if the parent local variable is an address exposed local or + // if the struct has a custom layout and holes. + return !(varDsc.lvAddrExposed || (varDsc.lvCustomLayout && varDsc.lvContainsHoles)); } } return false; } + // This is a use. // Are the variables already known to be alive? @@ -1707,12 +1748,12 @@ bool Compiler::fgComputeLifeUntrackedLocal(VARSET_TP& life, // Are all the variables becoming alive (in the backwards traversal), or just a subset? if (!VarSetOps::IsEmptyIntersection(this, fieldSet, life)) { - // Only a subset of the variables are become live; we must record that subset. + // Only a subset of the variables are becoming alive; we must record that subset. // (Lack of an entry for "lclVarNode" will be considered to imply all become dead in the // forward traversal.) VARSET_TP* deadVarSet = new (this, CMK_bitset) VARSET_TP; VarSetOps::AssignNoCopy(this, *deadVarSet, VarSetOps::Diff(this, fieldSet, life)); - GetPromotedStructDeathVars()->Set(lclVarNode, deadVarSet); + GetPromotedStructDeathVars()->Set(lclVarNode, deadVarSet, NodeToVarsetPtrMap::Overwrite); } // In any case, all the field vars are now live (in the backwards traversal). @@ -1924,10 +1965,11 @@ void Compiler::fgComputeLifeLIR(VARSET_TP& life, BasicBlock* block, VARSET_VALAR if (isDeadStore) { LIR::Use addrUse; - if (blockRange.TryGetUse(node, &addrUse) && (addrUse.User()->OperGet() == GT_STOREIND)) + if (blockRange.TryGetUse(node, &addrUse) && + (addrUse.User()->OperIs(GT_STOREIND, GT_STORE_BLK, GT_STORE_OBJ))) { // Remove the store. DCE will iteratively clean up any ununsed operands. - GenTreeStoreInd* const store = addrUse.User()->AsStoreInd(); + GenTreeIndir* const store = addrUse.User()->AsIndir(); JITDUMP("Removing dead indirect store:\n"); DISPNODE(store); @@ -1935,7 +1977,15 @@ void Compiler::fgComputeLifeLIR(VARSET_TP& life, BasicBlock* block, VARSET_VALAR assert(store->Addr() == node); blockRange.Delete(this, block, node); - store->Data()->SetUnusedValue(); + GenTree* data = + store->OperIs(GT_STOREIND) ? store->AsStoreInd()->Data() : store->AsBlk()->Data(); + data->SetUnusedValue(); + if (data->isIndir()) + { + // This is a block assignment. An indirection of the rhs is not considered + // to happen until the assignment so mark it as non-faulting. + data->gtFlags |= GTF_IND_NONFAULTING; + } blockRange.Remove(store); @@ -1955,39 +2005,41 @@ void Compiler::fgComputeLifeLIR(VARSET_TP& life, BasicBlock* block, VARSET_VALAR if (varDsc.lvTracked) { isDeadStore = fgComputeLifeTrackedLocalDef(life, keepAliveVars, varDsc, lclVarNode); - if (isDeadStore) - { - JITDUMP("Removing dead store:\n"); - DISPNODE(lclVarNode); + } + else + { + isDeadStore = fgComputeLifeUntrackedLocal(life, keepAliveVars, varDsc, lclVarNode); + } - // Remove the store. DCE will iteratively clean up any ununsed operands. - lclVarNode->gtOp1->SetUnusedValue(); + if (isDeadStore) + { + JITDUMP("Removing dead store:\n"); + DISPNODE(lclVarNode); - // If the store is marked as a late argument, it is referenced by a call. Instead of removing - // it, bash it to a NOP. - if ((node->gtFlags & GTF_LATE_ARG) != 0) - { - JITDUMP("node is a late arg; replacing with NOP\n"); - node->gtBashToNOP(); + // Remove the store. DCE will iteratively clean up any ununsed operands. + lclVarNode->gtOp1->SetUnusedValue(); - // NOTE: this is a bit of a hack. We need to keep these nodes around as they are - // referenced by the call, but they're considered side-effect-free non-value-producing - // nodes, so they will be removed if we don't do this. - node->gtFlags |= GTF_ORDER_SIDEEFF; - } - else - { - blockRange.Remove(node); - } + // If the store is marked as a late argument, it is referenced by a call. Instead of removing + // it, bash it to a NOP. + if ((node->gtFlags & GTF_LATE_ARG) != 0) + { + JITDUMP("node is a late arg; replacing with NOP\n"); + node->gtBashToNOP(); - assert(!opts.MinOpts()); - fgStmtRemoved = true; + // NOTE: this is a bit of a hack. We need to keep these nodes around as they are + // referenced by the call, but they're considered side-effect-free non-value-producing + // nodes, so they will be removed if we don't do this. + node->gtFlags |= GTF_ORDER_SIDEEFF; } + else + { + blockRange.Remove(node); + } + + assert(!opts.MinOpts()); + fgStmtRemoved = true; } - else - { - fgComputeLifeUntrackedLocal(life, keepAliveVars, varDsc, lclVarNode); - } + break; } @@ -2523,7 +2575,7 @@ void Compiler::fgInterBlockLocalVarLiveness() if (isFinallyVar) { // Set lvMustInit only if we have a non-arg, GC pointer. - if (!varDsc->lvIsParam && varTypeIsGC(varDsc->TypeGet()) && !fieldOfDependentlyPromotedStruct) + if (!varDsc->lvIsParam && varTypeIsGC(varDsc->TypeGet())) { varDsc->lvMustInit = true; } diff --git a/src/coreclr/src/jit/loopcloning.cpp b/src/coreclr/src/jit/loopcloning.cpp index 72ae9bc10070..51c0040a1f92 100644 --- a/src/coreclr/src/jit/loopcloning.cpp +++ b/src/coreclr/src/jit/loopcloning.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/src/coreclr/src/jit/loopcloning.h b/src/coreclr/src/jit/loopcloning.h index a6197f5d2a71..37d1b7466bdc 100644 --- a/src/coreclr/src/jit/loopcloning.h +++ b/src/coreclr/src/jit/loopcloning.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/src/coreclr/src/jit/loopcloningopts.h b/src/coreclr/src/jit/loopcloningopts.h index 9048a41a1416..f17b915c830a 100644 --- a/src/coreclr/src/jit/loopcloningopts.h +++ b/src/coreclr/src/jit/loopcloningopts.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // /*****************************************************************************/ diff --git a/src/coreclr/src/jit/lower.cpp b/src/coreclr/src/jit/lower.cpp index 0b4238078912..69cfbbe34a99 100644 --- a/src/coreclr/src/jit/lower.cpp +++ b/src/coreclr/src/jit/lower.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -111,26 +110,13 @@ GenTree* Lowering::LowerNode(GenTree* node) assert(node != nullptr); switch (node->gtOper) { + case GT_NULLCHECK: case GT_IND: - // Process struct typed indirs separately, they only appear as the source of - // a block copy operation or a return node. - if (node->TypeGet() != TYP_STRUCT) - { - // TODO-Cleanup: We're passing isContainable = true but ContainCheckIndir rejects - // address containment in some cases so we end up creating trivial (reg + offfset) - // or (reg + reg) LEAs that are not necessary. - TryCreateAddrMode(node->AsIndir()->Addr(), true); - ContainCheckIndir(node->AsIndir()); - } + LowerIndir(node->AsIndir()); break; case GT_STOREIND: - assert(node->TypeGet() != TYP_STRUCT); - TryCreateAddrMode(node->AsIndir()->Addr(), true); - if (!comp->codeGen->gcInfo.gcIsWriteBarrierStoreIndNode(node)) - { - LowerStoreIndir(node->AsIndir()); - } + LowerStoreIndirCommon(node->AsIndir()); break; case GT_ADD: @@ -258,12 +244,12 @@ GenTree* Lowering::LowerNode(GenTree* node) if (node->AsBlk()->Data()->IsCall()) { assert(!comp->compDoOldStructRetyping()); - LowerStoreCallStruct(node->AsBlk()); + LowerStoreSingleRegCallStruct(node->AsBlk()); break; } __fallthrough; case GT_STORE_DYN_BLK: - LowerBlockStore(node->AsBlk()); + LowerBlockStoreCommon(node->AsBlk()); break; case GT_LCLHEAP: @@ -1323,7 +1309,7 @@ void Lowering::LowerArg(GenTreeCall* call, GenTree** ppArg) // TYP_SIMD8 parameters that are passed as longs if (type == TYP_SIMD8 && genIsValidIntReg(info->GetRegNum())) { - GenTreeUnOp* bitcast = new (comp, GT_BITCAST) GenTreeOp(GT_BITCAST, TYP_LONG, arg, nullptr); + GenTree* bitcast = comp->gtNewBitCastNode(TYP_LONG, arg); BlockRange().InsertAfter(arg, bitcast); *ppArg = arg = bitcast; @@ -2951,65 +2937,113 @@ void Lowering::LowerRet(GenTreeUnOp* ret) DISPNODE(ret); JITDUMP("============"); - GenTree* op1 = ret->gtGetOp1(); - if ((ret->TypeGet() != TYP_VOID) && !varTypeIsStruct(ret) && - (varTypeUsesFloatReg(ret) != varTypeUsesFloatReg(ret->gtGetOp1()))) + GenTree* retVal = ret->gtGetOp1(); + // There are two kinds of retyping: + // - A simple bitcast can be inserted when: + // - We're returning a floating type as an integral type or vice-versa, or + // - We're returning a struct as a primitive type and using the old form of retyping. + // - If we're returning a struct as a primitive type and *not* using old retying, we change the type of + // 'retval' in 'LowerRetStructLclVar()' + bool needBitcast = + (ret->TypeGet() != TYP_VOID) && (varTypeUsesFloatReg(ret) != varTypeUsesFloatReg(ret->gtGetOp1())); + bool doPrimitiveBitcast = false; + if (needBitcast) + { + if (comp->compDoOldStructRetyping()) + { + // `struct A { SIMD12/16 }` on `UNIX_AMD64_ABI` is an example when + // `varTypeUsesFloatReg` returns different values for `ret` and `ret->gtGetOp1()`, + // but doesn't need a primitive bitcase. + doPrimitiveBitcast = !ret->TypeIs(TYP_STRUCT); + } + else + { + doPrimitiveBitcast = (!varTypeIsStruct(ret) && !varTypeIsStruct(retVal)); + } + } + + if (doPrimitiveBitcast) { - assert(comp->compDoOldStructRetyping()); - GenTreeUnOp* bitcast = new (comp, GT_BITCAST) GenTreeOp(GT_BITCAST, ret->TypeGet(), ret->gtGetOp1(), nullptr); - ret->gtOp1 = bitcast; +// Add a simple bitcast for an old retyping or when both types are not structs. +// If one type is a struct it will be handled below for !compDoOldStructRetyping. +#if defined(DEBUG) + if (comp->compDoOldStructRetyping()) + { + assert(varTypeIsSIMD(ret) || !varTypeIsStruct(ret)); + assert(varTypeIsSIMD(retVal) || !varTypeIsStruct(retVal)); + } + else + { + assert(!varTypeIsStruct(ret) && !varTypeIsStruct(retVal)); + } +#endif + + GenTree* bitcast = comp->gtNewBitCastNode(ret->TypeGet(), retVal); + ret->gtOp1 = bitcast; BlockRange().InsertBefore(ret, bitcast); ContainCheckBitCast(bitcast); } else if (ret->TypeGet() != TYP_VOID) { - GenTree* retVal = ret->gtGetOp1(); #if FEATURE_MULTIREG_RET - if (op1->OperIs(GT_LCL_VAR) && varTypeIsStruct(op1)) + if (retVal->OperIs(GT_LCL_VAR) && varTypeIsStruct(retVal)) { ReturnTypeDesc retTypeDesc; LclVarDsc* varDsc = nullptr; - varDsc = comp->lvaGetDesc(op1->AsLclVar()->GetLclNum()); + varDsc = comp->lvaGetDesc(retVal->AsLclVar()->GetLclNum()); retTypeDesc.InitializeStructReturnType(comp, varDsc->lvVerTypeInfo.GetClassHandle()); if (retTypeDesc.GetReturnRegCount() > 1) { - CheckMultiRegLclVar(op1->AsLclVar(), &retTypeDesc); + CheckMultiRegLclVar(retVal->AsLclVar(), &retTypeDesc); } } - else +#endif // FEATURE_MULTIREG_RET #ifdef DEBUG - if (varTypeIsStruct(ret->TypeGet()) != varTypeIsStruct(retVal->TypeGet())) + if (varTypeIsStruct(ret->TypeGet()) != varTypeIsStruct(retVal->TypeGet())) { - if (varTypeIsStruct(ret->TypeGet())) + if (!comp->compDoOldStructRetyping() && varTypeIsStruct(ret->TypeGet())) { assert(!comp->compDoOldStructRetyping()); - bool actualTypesMatch = false; - if (genActualType(comp->info.compRetNativeType) == genActualType(retVal->TypeGet())) - { - // This could happen if we have retyped op1 as a primitive type during struct promotion, - // check `retypedFieldsMap` for details. - actualTypesMatch = true; - } - bool constStructInit = retVal->IsConstInitVal(); - assert(actualTypesMatch || constStructInit); + assert(comp->info.compRetNativeType != TYP_STRUCT); + + var_types retActualType = genActualType(comp->info.compRetNativeType); + var_types retValActualType = genActualType(retVal->TypeGet()); + + bool constStructInit = retVal->IsConstInitVal(); + bool implicitCastFromSameOrBiggerSize = (genTypeSize(retActualType) <= genTypeSize(retValActualType)); + + // This could happen if we have retyped op1 as a primitive type during struct promotion, + // check `retypedFieldsMap` for details. + bool actualTypesMatch = (retActualType == retValActualType); + + assert(actualTypesMatch || constStructInit || implicitCastFromSameOrBiggerSize); } - else + } +#endif // DEBUG + + if (varTypeIsStruct(ret)) + { + LowerRetStruct(ret); + } + else if (!ret->TypeIs(TYP_VOID) && varTypeIsStruct(retVal)) + { + if (comp->compDoOldStructRetyping()) { #ifdef FEATURE_SIMD - assert(comp->compDoOldStructRetyping()); assert(ret->TypeIs(TYP_DOUBLE)); assert(retVal->TypeIs(TYP_SIMD8)); -#else // !FEATURE_SIMD +#else unreached(); -#endif // !FEATURE_SIMD +#endif + } + else + { + // Return struct as a primitive using Unsafe cast. + assert(!comp->compDoOldStructRetyping()); + assert(retVal->OperIs(GT_LCL_VAR)); + LowerRetSingleRegStructLclVar(ret); } } -#endif // DEBUG - if (varTypeIsStruct(ret)) - { - LowerRetStruct(ret); - } -#endif // !FEATURE_MULTIREG_RET } // Method doing PInvokes has exactly one return block unless it has tail calls. @@ -3029,16 +3063,44 @@ void Lowering::LowerRet(GenTreeUnOp* ret) void Lowering::LowerStoreLocCommon(GenTreeLclVarCommon* lclStore) { assert(lclStore->OperIs(GT_STORE_LCL_FLD, GT_STORE_LCL_VAR)); - GenTree* src = lclStore->gtGetOp1(); - LclVarDsc* varDsc = comp->lvaGetDesc(lclStore); + JITDUMP("lowering store lcl var/field (before):\n"); + DISPTREERANGE(BlockRange(), lclStore); + JITDUMP("\n"); + + GenTree* src = lclStore->gtGetOp1(); + LclVarDsc* varDsc = comp->lvaGetDesc(lclStore); + bool srcIsMultiReg = src->IsMultiRegNode(); + bool dstIsMultiReg = lclStore->IsMultiRegLclVar(); + + if (!dstIsMultiReg && varTypeIsStruct(varDsc)) + { + // TODO-Cleanup: we want to check `varDsc->lvRegStruct` as the last condition instead of `!varDsc->lvPromoted`, + // but we do not set it for `CSE` vars so it is currently failing. + assert(varDsc->CanBeReplacedWithItsField(comp) || varDsc->lvDoNotEnregister || !varDsc->lvPromoted); + if (varDsc->CanBeReplacedWithItsField(comp)) + { + assert(!comp->compDoOldStructRetyping()); + assert(varDsc->lvFieldCnt == 1); + unsigned fldNum = varDsc->lvFieldLclStart; + LclVarDsc* fldDsc = comp->lvaGetDesc(fldNum); + + JITDUMP("Replacing an independently promoted local var V%02u with its only field V%02u for the store " + "from a call [%06u]\n", + lclStore->GetLclNum(), fldNum, comp->dspTreeID(lclStore)); + lclStore->SetLclNum(fldNum); + lclStore->ChangeType(fldDsc->TypeGet()); + varDsc = fldDsc; + } + } + if ((varTypeUsesFloatReg(lclStore) != varTypeUsesFloatReg(src)) && !lclStore->IsPhiDefn() && (src->TypeGet() != TYP_STRUCT)) { if (m_lsra->isRegCandidate(varDsc)) { - GenTreeUnOp* bitcast = new (comp, GT_BITCAST) GenTreeOp(GT_BITCAST, lclStore->TypeGet(), src, nullptr); - lclStore->gtOp1 = bitcast; - src = lclStore->gtGetOp1(); + GenTree* bitcast = comp->gtNewBitCastNode(lclStore->TypeGet(), src); + lclStore->gtOp1 = bitcast; + src = lclStore->gtGetOp1(); BlockRange().InsertBefore(lclStore, bitcast); ContainCheckBitCast(bitcast); } @@ -3049,7 +3111,6 @@ void Lowering::LowerStoreLocCommon(GenTreeLclVarCommon* lclStore) } } - bool srcIsMultiReg = src->IsMultiRegNode(); if (srcIsMultiReg || lclStore->IsMultiRegLclVar()) { const ReturnTypeDesc* retTypeDesc = nullptr; @@ -3059,7 +3120,7 @@ void Lowering::LowerStoreLocCommon(GenTreeLclVarCommon* lclStore) } CheckMultiRegLclVar(lclStore->AsLclVar(), retTypeDesc); } - if (!srcIsMultiReg && (lclStore->TypeGet() == TYP_STRUCT) && (src->OperGet() != GT_PHI)) + if ((lclStore->TypeGet() == TYP_STRUCT) && !srcIsMultiReg && (src->OperGet() != GT_PHI)) { if (src->OperGet() == GT_CALL) { @@ -3103,12 +3164,13 @@ void Lowering::LowerStoreLocCommon(GenTreeLclVarCommon* lclStore) GenTreeLclVar* spilledCall = SpillStructCallResult(call); lclStore->gtOp1 = spilledCall; src = lclStore->gtOp1; + JITDUMP("lowering store lcl var/field has to spill call src.\n"); LowerStoreLocCommon(lclStore); return; } #endif // !WINDOWS_AMD64_ABI } - else if (!src->OperIs(GT_LCL_VAR) || varDsc->GetLayout()->GetRegisterType() == TYP_UNDEF) + else if (!src->OperIs(GT_LCL_VAR) || (varDsc->GetLayout()->GetRegisterType() == TYP_UNDEF)) { GenTreeLclVar* addr = comp->gtNewLclVarAddrNode(lclStore->GetLclNum(), TYP_BYREF); @@ -3128,11 +3190,15 @@ void Lowering::LowerStoreLocCommon(GenTreeLclVarCommon* lclStore) objStore->SetAddr(addr); objStore->SetData(src); BlockRange().InsertBefore(objStore, addr); - LowerBlockStore(objStore); + LowerBlockStoreCommon(objStore); return; } } + LowerStoreLoc(lclStore); + JITDUMP("lowering store lcl var/field (after):\n"); + DISPTREERANGE(BlockRange(), lclStore); + JITDUMP("\n"); } //---------------------------------------------------------------------------------------------- @@ -3144,11 +3210,11 @@ void Lowering::LowerStoreLocCommon(GenTreeLclVarCommon* lclStore) void Lowering::LowerRetStruct(GenTreeUnOp* ret) { #if defined(FEATURE_HFA) && defined(TARGET_ARM64) - if (ret->TypeIs(TYP_SIMD16)) + if (varTypeIsSIMD(ret)) { if (comp->info.compRetNativeType == TYP_STRUCT) { - assert(ret->gtGetOp1()->TypeIs(TYP_SIMD16)); + assert(varTypeIsSIMD(ret->gtGetOp1())); assert(comp->compMethodReturnsMultiRegRegTypeAlternate()); if (!comp->compDoOldStructRetyping()) { @@ -3157,13 +3223,20 @@ void Lowering::LowerRetStruct(GenTreeUnOp* ret) else { // With old struct retyping a value that is returned as HFA - // could have both SIMD16 or STRUCT types, keep it as it. + // could have both SIMD* or STRUCT types, keep it as it. return; } } else { - assert(comp->info.compRetNativeType == TYP_SIMD16); + assert(comp->info.compRetNativeType == ret->TypeGet()); + GenTree* retVal = ret->gtGetOp1(); + if (retVal->TypeGet() != ret->TypeGet()) + { + assert(retVal->OperIs(GT_LCL_VAR)); + assert(!comp->compDoOldStructRetyping()); + LowerRetSingleRegStructLclVar(ret); + } return; } } @@ -3190,10 +3263,13 @@ void Lowering::LowerRetStruct(GenTreeUnOp* ret) break; case GT_CNS_INT: - assert(retVal->TypeIs(TYP_INT)); - assert(retVal->AsIntCon()->IconValue() == 0); + // When we promote LCL_VAR single fields into return + // we could have all type of constans here. if (varTypeUsesFloatReg(nativeReturnType)) { + // Do not expect `initblock` for SIMD* types, + // only 'initobj'. + assert(retVal->AsIntCon()->IconValue() == 0); retVal->ChangeOperConst(GT_CNS_DBL); retVal->ChangeType(TYP_FLOAT); retVal->AsDblCon()->gtDconVal = 0; @@ -3205,10 +3281,11 @@ void Lowering::LowerRetStruct(GenTreeUnOp* ret) __fallthrough; case GT_IND: retVal->ChangeType(nativeReturnType); + LowerIndir(retVal->AsIndir()); break; case GT_LCL_VAR: - LowerRetStructLclVar(ret); + LowerRetSingleRegStructLclVar(ret); break; #if defined(FEATURE_SIMD) || defined(FEATURE_HW_INTRINSICS) @@ -3222,8 +3299,8 @@ void Lowering::LowerRetStruct(GenTreeUnOp* ret) assert(!retVal->TypeIs(TYP_STRUCT)); if (varTypeUsesFloatReg(ret) != varTypeUsesFloatReg(retVal)) { - GenTreeUnOp* bitcast = new (comp, GT_BITCAST) GenTreeOp(GT_BITCAST, ret->TypeGet(), retVal, nullptr); - ret->gtOp1 = bitcast; + GenTree* bitcast = comp->gtNewBitCastNode(ret->TypeGet(), retVal); + ret->gtOp1 = bitcast; BlockRange().InsertBefore(ret, bitcast); ContainCheckBitCast(bitcast); } @@ -3243,13 +3320,31 @@ void Lowering::LowerRetStruct(GenTreeUnOp* ret) } break; - default: +#if defined(TARGET_AMD64) || defined(TARGET_ARM64) || defined(TARGET_ARM) + case GT_CNS_DBL: + // Currently we are not promoting structs with a single float field, + // https://github.com/dotnet/runtime/issues/4323 + + // TODO-CQ: can improve `GT_CNS_DBL` handling for supported platforms, but + // because it is only x86 nowadays it is not worth it. unreached(); +#endif + + default: + assert(varTypeIsEnregisterable(retVal)); + if (varTypeUsesFloatReg(ret) != varTypeUsesFloatReg(retVal)) + { + GenTree* bitcast = comp->gtNewBitCastNode(ret->TypeGet(), retVal); + ret->gtOp1 = bitcast; + BlockRange().InsertBefore(ret, bitcast); + ContainCheckBitCast(bitcast); + } + break; } } //---------------------------------------------------------------------------------------------- -// LowerRetStructLclVar: Lowers a return node with a struct lclVar as a source. +// LowerRetSingleRegStructLclVar: Lowers a return node with a struct lclVar as a source. // // Arguments: // node - The return node to lower. @@ -3259,7 +3354,7 @@ void Lowering::LowerRetStruct(GenTreeUnOp* ret) // - if LclVar is allocated in memory then read it as return type; // - if LclVar can be enregistered read it as register type and add a bitcast if necessary; // -void Lowering::LowerRetStructLclVar(GenTreeUnOp* ret) +void Lowering::LowerRetSingleRegStructLclVar(GenTreeUnOp* ret) { assert(!comp->compMethodReturnsMultiRegRegTypeAlternate()); assert(!comp->compDoOldStructRetyping()); @@ -3269,37 +3364,27 @@ void Lowering::LowerRetStructLclVar(GenTreeUnOp* ret) unsigned lclNum = lclVar->GetLclNum(); LclVarDsc* varDsc = comp->lvaGetDesc(lclNum); -#ifdef DEBUG - if (comp->gtGetStructHandleIfPresent(lclVar) == NO_CLASS_HANDLE) + if (varDsc->CanBeReplacedWithItsField(comp)) { - // a promoted struct field was retyped as its only field. - assert(varDsc->lvIsStructField); + // We can replace the struct with its only field and keep the field on a register. + unsigned fieldLclNum = varDsc->lvFieldLclStart; + LclVarDsc* fieldDsc = comp->lvaGetDesc(fieldLclNum); + assert(varTypeIsSmallInt(fieldDsc->lvType)); // For a non-small type it had to be done in morph. + + lclVar->SetLclNum(fieldLclNum); + JITDUMP("Replacing an independently promoted local var V%02u with its only field V%02u for the return " + "[%06u]\n", + lclNum, fieldLclNum, comp->dspTreeID(ret)); + lclVar->ChangeType(fieldDsc->lvType); + lclNum = fieldLclNum; + varDsc = comp->lvaGetDesc(lclNum); } -#endif - if (varDsc->lvPromoted && (comp->lvaGetPromotionType(lclNum) == Compiler::PROMOTION_TYPE_INDEPENDENT)) + else if (!varDsc->lvRegStruct && !varTypeIsEnregisterable(varDsc)) + { - if (varDsc->lvFieldCnt == 1) - { - // We can replace the struct with its only field and keep the field on a register. - assert(varDsc->lvRefCnt() == 0); - unsigned fieldLclNum = varDsc->lvFieldLclStart; - LclVarDsc* fieldDsc = comp->lvaGetDesc(fieldLclNum); - if (fieldDsc->lvFldOffset == 0) - { - lclVar->SetLclNum(fieldLclNum); - JITDUMP("Replacing an independently promoted local var with its only field for the return %u, %u\n", - lclNum, fieldLclNum); - lclVar->ChangeType(fieldDsc->lvType); - lclNum = fieldLclNum; - varDsc = comp->lvaGetDesc(lclNum); - } - } - else - { - // TODO-1stClassStructs: We can no longer promote or enregister this struct, - // since it is referenced as a whole. - comp->lvaSetVarDoNotEnregister(lclNum DEBUGARG(Compiler::DNER_VMNeedsStackAddr)); - } + // TODO-1stClassStructs: We can no longer promote or enregister this struct, + // since it is referenced as a whole. + comp->lvaSetVarDoNotEnregister(lclNum DEBUGARG(Compiler::DNER_BlockOp)); } if (varDsc->lvDoNotEnregister) @@ -3316,8 +3401,8 @@ void Lowering::LowerRetStructLclVar(GenTreeUnOp* ret) if (varTypeUsesFloatReg(ret) != varTypeUsesFloatReg(lclVarType)) { - GenTreeUnOp* bitcast = new (comp, GT_BITCAST) GenTreeOp(GT_BITCAST, ret->TypeGet(), lclVar, nullptr); - ret->gtOp1 = bitcast; + GenTree* bitcast = comp->gtNewBitCastNode(ret->TypeGet(), lclVar); + ret->gtOp1 = bitcast; BlockRange().InsertBefore(ret, bitcast); ContainCheckBitCast(bitcast); } @@ -3412,20 +3497,22 @@ void Lowering::LowerCallStruct(GenTreeCall* call) } //---------------------------------------------------------------------------------------------- -// LowerStoreCallStruct: Lowers a store block where source is a struct typed call. +// LowerStoreSingleRegCallStruct: Lowers a store block where the source is a struct typed call. // // Arguments: // store - The store node to lower. // // Notes: -// - it spills the call's result if it can be retyped as a primitive type. +// - the function is only for calls that return one register; +// - it spills the call's result if it can be retyped as a primitive type; // -void Lowering::LowerStoreCallStruct(GenTreeBlk* store) +void Lowering::LowerStoreSingleRegCallStruct(GenTreeBlk* store) { assert(!comp->compDoOldStructRetyping()); assert(varTypeIsStruct(store)); assert(store->Data()->IsCall()); GenTreeCall* call = store->Data()->AsCall(); + assert(!call->HasMultiRegRetVal()); const ClassLayout* layout = store->GetLayout(); const var_types regType = layout->GetRegisterType(); @@ -3435,7 +3522,8 @@ void Lowering::LowerStoreCallStruct(GenTreeBlk* store) { store->ChangeType(regType); store->SetOper(GT_STOREIND); - LowerStoreIndir(store->AsIndir()); + LowerStoreIndirCommon(store); + return; } else { @@ -3452,7 +3540,7 @@ void Lowering::LowerStoreCallStruct(GenTreeBlk* store) GenTreeLclVar* spilledCall = SpillStructCallResult(call); store->SetData(spilledCall); - LowerBlockStore(store); + LowerBlockStoreCommon(store); #endif // WINDOWS_AMD64_ABI } } @@ -3588,8 +3676,11 @@ GenTree* Lowering::LowerDirectCall(GenTreeCall* call) // Non-virtual direct calls to addresses accessed by // a single indirection. GenTree* cellAddr = AddrGen(addr); - GenTree* indir = Ind(cellAddr); - result = indir; +#ifdef DEBUG + cellAddr->AsIntCon()->gtTargetHandle = (size_t)call->gtCallMethHnd; +#endif + GenTree* indir = Ind(cellAddr); + result = indir; } break; } @@ -3744,13 +3835,13 @@ GenTree* Lowering::CreateReturnTrapSeq() GenTree* testTree; if (addrOfCaptureThreadGlobal != nullptr) { - testTree = Ind(AddrGen(addrOfCaptureThreadGlobal)); + testTree = AddrGen(addrOfCaptureThreadGlobal); } else { - testTree = Ind(Ind(AddrGen(pAddrOfCaptureThreadGlobal))); + testTree = Ind(AddrGen(pAddrOfCaptureThreadGlobal)); } - return comp->gtNewOperNode(GT_RETURNTRAP, TYP_INT, testTree); + return comp->gtNewOperNode(GT_RETURNTRAP, TYP_INT, Ind(testTree, TYP_INT)); } //------------------------------------------------------------------------ @@ -4015,20 +4106,6 @@ void Lowering::InsertPInvokeMethodEpilog(BasicBlock* returnBB DEBUGARG(GenTree* // Example3: GT_JMP. After inserting PME execution order would be: PME, GT_JMP // That is after PME, args for GT_JMP call will be setup. - // TODO-Cleanup: setting GCState to 1 seems to be redundant as InsertPInvokeCallProlog will set it to zero before a - // PInvoke call and InsertPInvokeCallEpilog() will set it back to 1 after the PInvoke. Though this is redundant, - // it is harmeless. - // Note that liveness is artificially extending the life of compLvFrameListRoot var if the method being compiled has - // PInvokes. Deleting the below stmnt would cause an an assert in lsra.cpp::SetLastUses() since compLvFrameListRoot - // will be live-in to a BBJ_RETURN block without any uses. Long term we need to fix liveness for x64 case to - // properly extend the life of compLvFrameListRoot var. - // - // Thread.offsetOfGcState = 0/1 - // That is [tcb + offsetOfGcState] = 1 - GenTree* storeGCState = SetGCState(1); - returnBlockRange.InsertBefore(insertionPoint, LIR::SeqTree(comp, storeGCState)); - ContainCheckStoreIndir(storeGCState->AsIndir()); - // Pop the frame if necessary. This always happens in the epilog on 32-bit targets. For 64-bit targets, we only do // this in the epilog for IL stubs; for non-IL stubs the frame is popped after every PInvoke call. CLANG_FORMAT_COMMENT_ANCHOR; @@ -4379,7 +4456,8 @@ GenTree* Lowering::LowerNonvirtPinvokeCall(GenTreeCall* call) CORINFO_CONST_LOOKUP lookup; comp->info.compCompHnd->getAddressOfPInvokeTarget(methHnd, &lookup); - void* addr = lookup.addr; + void* addr = lookup.addr; + GenTree* addrTree; switch (lookup.accessType) { case IAT_VALUE: @@ -4400,11 +4478,19 @@ GenTree* Lowering::LowerNonvirtPinvokeCall(GenTreeCall* call) break; case IAT_PVALUE: - result = Ind(AddrGen(addr)); + addrTree = AddrGen(addr); +#ifdef DEBUG + addrTree->AsIntCon()->gtTargetHandle = (size_t)methHnd; +#endif + result = Ind(addrTree); break; case IAT_PPVALUE: - result = Ind(Ind(AddrGen(addr))); + addrTree = AddrGen(addr); +#ifdef DEBUG + addrTree->AsIntCon()->gtTargetHandle = (size_t)methHnd; +#endif + result = Ind(Ind(addrTree)); break; case IAT_RELPVALUE: @@ -5048,6 +5134,7 @@ bool Lowering::LowerUnsignedDivOrMod(GenTreeOp* divMod) unreached(); #endif } + assert(divMod->MarkedDivideByConstOptimized()); // Depending on the "add" flag returned by GetUnsignedMagicNumberForDivide we need to generate: // add == false (when divisor == 3 for example): @@ -5121,7 +5208,6 @@ bool Lowering::LowerUnsignedDivOrMod(GenTreeOp* divMod) BlockRange().InsertBefore(divMod, div, divisor, mul, dividend); } ContainCheckRange(firstNode, divMod); - return true; } #endif @@ -6253,7 +6339,7 @@ void Lowering::ContainCheckRet(GenTreeUnOp* ret) } #endif // !defined(TARGET_64BIT) #if FEATURE_MULTIREG_RET - if (varTypeIsStruct(ret)) + if (ret->TypeIs(TYP_STRUCT)) { GenTree* op1 = ret->gtGetOp1(); // op1 must be either a lclvar or a multi-reg returning call @@ -6325,3 +6411,193 @@ void Lowering::ContainCheckBitCast(GenTree* node) op1->SetContained(); } } + +//------------------------------------------------------------------------ +// LowerStoreIndirCommon: a common logic to lower StoreIndir. +// +// Arguments: +// ind - the store indirection node we are lowering. +// +void Lowering::LowerStoreIndirCommon(GenTreeIndir* ind) +{ + assert(ind->OperIs(GT_STOREIND)); + assert(ind->TypeGet() != TYP_STRUCT); + TryCreateAddrMode(ind->Addr(), true); + if (!comp->codeGen->gcInfo.gcIsWriteBarrierStoreIndNode(ind)) + { + LowerStoreIndir(ind); + } +} + +//------------------------------------------------------------------------ +// LowerIndir: a common logic to lower IND load or NullCheck. +// +// Arguments: +// ind - the ind node we are lowering. +// +void Lowering::LowerIndir(GenTreeIndir* ind) +{ + assert(ind->OperIs(GT_IND, GT_NULLCHECK)); + // Process struct typed indirs separately unless they are unused; + // they only appear as the source of a block copy operation or a return node. + if (!ind->TypeIs(TYP_STRUCT) || ind->IsUnusedValue()) + { + // TODO-Cleanup: We're passing isContainable = true but ContainCheckIndir rejects + // address containment in some cases so we end up creating trivial (reg + offfset) + // or (reg + reg) LEAs that are not necessary. + TryCreateAddrMode(ind->Addr(), true); + ContainCheckIndir(ind); + + if (ind->OperIs(GT_NULLCHECK) || ind->IsUnusedValue()) + { + // A nullcheck is essentially the same as an indirection with no use. + // The difference lies in whether a target register must be allocated. + // On XARCH we can generate a compare with no target register as long as the addresss + // is not contained. + // On ARM64 we can generate a load to REG_ZR in all cases. + // However, on ARM we must always generate a load to a register. + // In the case where we require a target register, it is better to use GT_IND, since + // GT_NULLCHECK is a non-value node and would therefore require an internal register + // to use as the target. That is non-optimal because it will be modeled as conflicting + // with the source register(s). + // So, to summarize: + // - On ARM64, always use GT_NULLCHECK for a dead indirection. + // - On ARM, always use GT_IND. + // - On XARCH, use GT_IND if we have a contained address, and GT_NULLCHECK otherwise. + // In all cases, change the type to TYP_INT. + // + ind->gtType = TYP_INT; +#ifdef TARGET_ARM64 + bool useNullCheck = true; +#elif TARGET_ARM + bool useNullCheck = false; +#else // TARGET_XARCH + bool useNullCheck = !ind->Addr()->isContained(); +#endif // !TARGET_XARCH + + if (useNullCheck && ind->OperIs(GT_IND)) + { + ind->ChangeOper(GT_NULLCHECK); + ind->ClearUnusedValue(); + } + else if (!useNullCheck && ind->OperIs(GT_NULLCHECK)) + { + ind->ChangeOper(GT_IND); + ind->SetUnusedValue(); + } + } + } + else + { + // If the `ADDR` node under `STORE_OBJ(dstAddr, IND(struct(ADDR))` + // is a complex one it could benefit from an `LEA` that is not contained. + const bool isContainable = false; + TryCreateAddrMode(ind->Addr(), isContainable); + } +} + +//------------------------------------------------------------------------ +// LowerBlockStoreCommon: a common logic to lower STORE_OBJ/BLK/DYN_BLK. +// +// Arguments: +// blkNode - the store blk/obj node we are lowering. +// +void Lowering::LowerBlockStoreCommon(GenTreeBlk* blkNode) +{ + assert(blkNode->OperIs(GT_STORE_BLK, GT_STORE_DYN_BLK, GT_STORE_OBJ)); + if (TryTransformStoreObjAsStoreInd(blkNode)) + { + return; + } + + LowerBlockStore(blkNode); +} + +//------------------------------------------------------------------------ +// TryTransformStoreObjAsStoreInd: try to replace STORE_OBJ/BLK as STOREIND. +// +// Arguments: +// blkNode - the store node. +// +// Return value: +// true if the replacement was made, false otherwise. +// +// Notes: +// TODO-CQ: this method should do the transformation when possible +// and STOREIND should always generate better or the same code as +// STORE_OBJ/BLK for the same copy. +// +bool Lowering::TryTransformStoreObjAsStoreInd(GenTreeBlk* blkNode) +{ + assert(blkNode->OperIs(GT_STORE_BLK, GT_STORE_DYN_BLK, GT_STORE_OBJ)); + return false; +#if 0 // the optimization is temporary disabled due to https://github.com/dotnet/wpf/issues/3226 issue. + if (blkNode->OperIs(GT_STORE_DYN_BLK)) + { + return false; + } + + ClassLayout* layout = blkNode->GetLayout(); + if (layout == nullptr) + { + return false; + } + + var_types regType = layout->GetRegisterType(); + if (regType == TYP_UNDEF) + { + return false; + } + if (varTypeIsSIMD(regType)) + { + // TODO-CQ: support STORE_IND SIMD16(SIMD16, CNT_INT 0). + return false; + } + + if (varTypeIsGC(regType)) + { + // TODO-CQ: STOREIND does not try to contain src if we need a barrier, + // STORE_OBJ generates better code currently. + return false; + } + + GenTree* src = blkNode->Data(); + if (src->OperIsInitVal() && !src->IsConstInitVal()) + { + return false; + } + + if (varTypeIsSmall(regType) && !src->IsConstInitVal()) + { + // source operand INDIR will use a widening instruction + // and generate worse code, like `movzx` instead of `mov` + // on x64. + return false; + } + + blkNode->ChangeOper(GT_STOREIND); + blkNode->ChangeType(regType); + + if ((blkNode->gtFlags & GTF_IND_TGT_NOT_HEAP) == 0) + { + blkNode->gtFlags |= GTF_IND_TGTANYWHERE; + } + + if (varTypeIsStruct(src)) + { + src->ChangeType(regType); + LowerNode(blkNode->Data()); + } + else if (src->OperIsInitVal()) + { + GenTreeUnOp* initVal = src->AsUnOp(); + src = src->gtGetOp1(); + assert(src->IsCnsIntOrI()); + src->AsIntCon()->FixupInitBlkValue(regType); + blkNode->SetData(src); + BlockRange().Remove(initVal); + } + LowerStoreIndirCommon(blkNode); + return true; +#endif +} diff --git a/src/coreclr/src/jit/lower.h b/src/coreclr/src/jit/lower.h index 5f3e13c9b831..0c620aebeb0f 100644 --- a/src/coreclr/src/jit/lower.h +++ b/src/coreclr/src/jit/lower.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -134,9 +133,9 @@ class Lowering final : public Phase void LowerRet(GenTreeUnOp* ret); void LowerStoreLocCommon(GenTreeLclVarCommon* lclVar); void LowerRetStruct(GenTreeUnOp* ret); - void LowerRetStructLclVar(GenTreeUnOp* ret); + void LowerRetSingleRegStructLclVar(GenTreeUnOp* ret); void LowerCallStruct(GenTreeCall* call); - void LowerStoreCallStruct(GenTreeBlk* store); + void LowerStoreSingleRegCallStruct(GenTreeBlk* store); #if !defined(WINDOWS_AMD64_ABI) GenTreeLclVar* SpillStructCallResult(GenTreeCall* call) const; #endif // WINDOWS_AMD64_ABI @@ -177,9 +176,9 @@ class Lowering final : public Phase GenTree* AddrGen(ssize_t addr); GenTree* AddrGen(void* addr); - GenTree* Ind(GenTree* tree) + GenTree* Ind(GenTree* tree, var_types type = TYP_I_IMPL) { - return comp->gtNewOperNode(GT_IND, TYP_I_IMPL, tree); + return comp->gtNewOperNode(GT_IND, type, tree); } GenTree* PhysReg(regNumber reg, var_types type = TYP_I_IMPL) @@ -283,17 +282,22 @@ class Lowering final : public Phase #endif // defined(TARGET_XARCH) // Per tree node member functions + void LowerStoreIndirCommon(GenTreeIndir* ind); + void LowerIndir(GenTreeIndir* ind); void LowerStoreIndir(GenTreeIndir* node); GenTree* LowerAdd(GenTreeOp* node); bool LowerUnsignedDivOrMod(GenTreeOp* divMod); GenTree* LowerConstIntDivOrMod(GenTree* node); GenTree* LowerSignedDivOrMod(GenTree* node); void LowerBlockStore(GenTreeBlk* blkNode); + void LowerBlockStoreCommon(GenTreeBlk* blkNode); void ContainBlockStoreAddress(GenTreeBlk* blkNode, unsigned size, GenTree* addr); void LowerPutArgStk(GenTreePutArgStk* tree); bool TryCreateAddrMode(GenTree* addr, bool isContainable); + bool TryTransformStoreObjAsStoreInd(GenTreeBlk* blkNode); + GenTree* LowerSwitch(GenTree* node); bool TryLowerSwitchToBitTest( BasicBlock* jumpTable[], unsigned jumpCount, unsigned targetCount, BasicBlock* bbSwitch, GenTree* switchValue); @@ -321,11 +325,14 @@ class Lowering final : public Phase void LowerHWIntrinsicCC(GenTreeHWIntrinsic* node, NamedIntrinsic newIntrinsicId, GenCondition condition); void LowerHWIntrinsicCmpOp(GenTreeHWIntrinsic* node, genTreeOps cmpOp); void LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node); + void LowerHWIntrinsicDot(GenTreeHWIntrinsic* node); void LowerFusedMultiplyAdd(GenTreeHWIntrinsic* node); -#ifdef TARGET_ARM64 +#if defined(TARGET_XARCH) + void LowerHWIntrinsicToScalar(GenTreeHWIntrinsic* node); +#elif defined(TARGET_ARM64) bool IsValidConstForMovImm(GenTreeHWIntrinsic* node); -#endif // TARGET_ARM64 +#endif // !TARGET_XARCH && !TARGET_ARM64 union VectorConstant { int8_t i8[32]; @@ -406,11 +413,26 @@ class Lowering final : public Phase case TYP_LONG: case TYP_ULONG: { - if (arg->OperIs(GT_CNS_LNG)) +#if defined(TARGET_64BIT) + if (arg->IsCnsIntOrI()) + { + vecCns.i64[argIdx] = static_cast(arg->AsIntCon()->gtIconVal); + return true; + } +#else + if (arg->OperIsLong() && arg->AsOp()->gtOp1->IsCnsIntOrI() && arg->AsOp()->gtOp2->IsCnsIntOrI()) { - vecCns.i64[argIdx] = static_cast(arg->AsLngCon()->gtLconVal); + // 32-bit targets will decompose GT_CNS_LNG into two GT_CNS_INT + // We need to reconstruct the 64-bit value in order to handle this + + INT64 gtLconVal = arg->AsOp()->gtOp2->AsIntCon()->gtIconVal; + gtLconVal <<= 32; + gtLconVal |= arg->AsOp()->gtOp1->AsIntCon()->gtIconVal; + + vecCns.i64[argIdx] = gtLconVal; return true; } +#endif // TARGET_64BIT else { // We expect the VectorConstant to have been already zeroed diff --git a/src/coreclr/src/jit/lowerarmarch.cpp b/src/coreclr/src/jit/lowerarmarch.cpp index 2dcca9956c9d..2ab6fa947822 100644 --- a/src/coreclr/src/jit/lowerarmarch.cpp +++ b/src/coreclr/src/jit/lowerarmarch.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -553,6 +552,13 @@ void Lowering::LowerHWIntrinsic(GenTreeHWIntrinsic* node) return; } + case NI_Vector64_Dot: + case NI_Vector128_Dot: + { + LowerHWIntrinsicDot(node); + return; + } + case NI_Vector64_op_Equality: case NI_Vector128_op_Equality: { @@ -773,6 +779,8 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) if ((simdSize == 8) && (simdType == TYP_DOUBLE)) { + // TODO-Cleanup: Struct retyping means we have the wrong type here. We need to + // manually fix it up so the simdType checks below are correct. simdType = TYP_SIMD8; } @@ -887,7 +895,30 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) assert((simdSize == 8) || (simdSize == 16)); - UNATIVE_OFFSET cnsSize = simdSize; + if ((argCnt == 1) || (simdSize == 8) || (vecCns.i64[0] == vecCns.i64[1])) + { + // If we are a single constant or if all parts are the same, we might be able to optimize + // this even further for certain values, such as Zero or AllBitsSet. + + if (vecCns.i64[0] == 0) + { + node->gtOp1 = nullptr; + node->gtOp2 = nullptr; + + node->gtHWIntrinsicId = NI_Vector128_get_Zero; + return; + } + else if (vecCns.i64[0] == -1) + { + node->gtOp1 = nullptr; + node->gtOp2 = nullptr; + + node->gtHWIntrinsicId = NI_Vector128_get_AllBitsSet; + return; + } + } + + UNATIVE_OFFSET cnsSize = (simdSize == 12) ? 16 : simdSize; UNATIVE_OFFSET cnsAlign = cnsSize; CORINFO_FIELD_HANDLE hnd = comp->GetEmitter()->emitAnyConst(&vecCns, cnsSize, cnsAlign); @@ -1013,6 +1044,230 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) node->gtHWIntrinsicId = NI_AdvSimd_Insert; } + +//---------------------------------------------------------------------------------------------- +// Lowering::LowerHWIntrinsicDot: Lowers a Vector64 or Vector128 Dot call +// +// Arguments: +// node - The hardware intrinsic node. +// +void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) +{ + NamedIntrinsic intrinsicId = node->gtHWIntrinsicId; + var_types baseType = node->gtSIMDBaseType; + unsigned simdSize = node->gtSIMDSize; + var_types simdType = Compiler::getSIMDTypeForSize(simdSize); + + assert((intrinsicId == NI_Vector64_Dot) || (intrinsicId == NI_Vector128_Dot)); + assert(varTypeIsSIMD(simdType)); + assert(varTypeIsArithmetic(baseType)); + assert(simdSize != 0); + + GenTree* op1 = node->gtGetOp1(); + GenTree* op2 = node->gtGetOp2(); + + assert(op1 != nullptr); + assert(op2 != nullptr); + assert(!op1->OperIsList()); + + // Spare GenTrees to be used for the lowering logic below + // Defined upfront to avoid naming conflicts, etc... + GenTree* idx = nullptr; + GenTree* tmp1 = nullptr; + GenTree* tmp2 = nullptr; + + if (simdSize == 12) + { + assert(baseType == TYP_FLOAT); + + // For 12 byte SIMD, we need to clear the upper 4 bytes: + // idx = CNS_INT int 0x03 + // tmp1 = * CNS_DLB float 0.0 + // /--* op1 simd16 + // +--* idx int + // +--* tmp1 simd16 + // op1 = * HWINTRINSIC simd16 T Insert + // ... + + // This is roughly the following managed code: + // op1 = AdvSimd.Insert(op1, 0x03, 0.0f); + // ... + + idx = comp->gtNewIconNode(0x03, TYP_INT); + BlockRange().InsertAfter(op1, idx); + + tmp1 = comp->gtNewZeroConNode(TYP_FLOAT); + BlockRange().InsertAfter(idx, tmp1); + LowerNode(tmp1); + + op1 = comp->gtNewSimdAsHWIntrinsicNode(simdType, op1, idx, tmp1, NI_AdvSimd_Insert, baseType, simdSize); + BlockRange().InsertAfter(tmp1, op1); + LowerNode(op1); + } + + // We will be constructing the following parts: + // ... + // /--* op1 simd16 + // +--* op2 simd16 + // tmp1 = * HWINTRINSIC simd16 T Multiply + // ... + + // This is roughly the following managed code: + // ... + // var tmp1 = AdvSimd.Multiply(op1, op2); + // ... + + NamedIntrinsic multiply = (baseType == TYP_DOUBLE) ? NI_AdvSimd_Arm64_Multiply : NI_AdvSimd_Multiply; + assert(!varTypeIsLong(baseType)); + + tmp1 = comp->gtNewSimdAsHWIntrinsicNode(simdType, op1, op2, multiply, baseType, simdSize); + BlockRange().InsertBefore(node, tmp1); + LowerNode(tmp1); + + if (varTypeIsFloating(baseType)) + { + // We will be constructing the following parts: + // ... + // /--* tmp1 simd16 + // * STORE_LCL_VAR simd16 + // tmp1 = LCL_VAR simd16 + // tmp2 = LCL_VAR simd16 + // ... + + // This is roughly the following managed code: + // ... + // var tmp2 = tmp1; + // ... + + node->gtOp1 = tmp1; + LIR::Use tmp1Use(BlockRange(), &node->gtOp1, node); + ReplaceWithLclVar(tmp1Use); + tmp1 = node->gtOp1; + + tmp2 = comp->gtClone(tmp1); + BlockRange().InsertAfter(tmp1, tmp2); + + if (simdSize == 8) + { + assert(baseType == TYP_FLOAT); + + // We will be constructing the following parts: + // ... + // /--* tmp1 simd8 + // +--* tmp2 simd8 + // tmp1 = * HWINTRINSIC simd8 T AddPairwise + // ... + + // This is roughly the following managed code: + // ... + // var tmp1 = AdvSimd.AddPairwise(tmp1, tmp2); + // ... + + tmp1 = comp->gtNewSimdAsHWIntrinsicNode(simdType, tmp1, tmp2, NI_AdvSimd_AddPairwise, baseType, simdSize); + BlockRange().InsertAfter(tmp2, tmp1); + LowerNode(tmp1); + } + else + { + assert((simdSize == 12) || (simdSize == 16)); + + // We will be constructing the following parts: + // ... + // /--* tmp1 simd16 + // +--* tmp2 simd16 + // tmp2 = * HWINTRINSIC simd16 T AddPairwise + // ... + + // This is roughly the following managed code: + // ... + // var tmp1 = AdvSimd.Arm64.AddPairwise(tmp1, tmp2); + // ... + + tmp1 = comp->gtNewSimdAsHWIntrinsicNode(simdType, tmp1, tmp2, NI_AdvSimd_Arm64_AddPairwise, baseType, + simdSize); + BlockRange().InsertAfter(tmp2, tmp1); + LowerNode(tmp1); + + if (baseType == TYP_FLOAT) + { + // Float needs an additional pairwise add to finish summing the parts + // The first will have summed e0 with e1 and e2 with e3 and then repeats that for the upper half + // So, we will have a vector that looks like this: + // < e0 + e1, e2 + e3, e0 + e1, e2 + e3> + // Doing a second horizontal add with itself will then give us + // e0 + e1 + e2 + e3 in all elements of the vector + + // We will be constructing the following parts: + // ... + // /--* tmp1 simd16 + // * STORE_LCL_VAR simd16 + // tmp1 = LCL_VAR simd16 + // tmp2 = LCL_VAR simd16 + // /--* tmp1 simd16 + // +--* tmp2 simd16 + // tmp2 = * HWINTRINSIC simd16 T AddPairwise + // ... + + // This is roughly the following managed code: + // ... + // var tmp2 = tmp1; + // var tmp1 = AdvSimd.Arm64.AddPairwise(tmp1, tmp2); + // ... + + node->gtOp1 = tmp1; + LIR::Use tmp1Use(BlockRange(), &node->gtOp1, node); + ReplaceWithLclVar(tmp1Use); + tmp1 = node->gtOp1; + + tmp2 = comp->gtClone(tmp1); + BlockRange().InsertAfter(tmp1, tmp2); + + tmp1 = comp->gtNewSimdAsHWIntrinsicNode(simdType, tmp1, tmp2, NI_AdvSimd_Arm64_AddPairwise, baseType, + simdSize); + BlockRange().InsertAfter(tmp2, tmp1); + LowerNode(tmp1); + } + } + + tmp2 = tmp1; + } + else + { + assert(varTypeIsIntegral(baseType)); + + // We will be constructing the following parts: + // ... + // /--* tmp1 simd16 + // tmp2 = * HWINTRINSIC simd16 T AddAcross + // ... + + // This is roughly the following managed code: + // ... + // var tmp2 = AdvSimd.Arm64.AddAcross(tmp1); + // ... + + tmp2 = comp->gtNewSimdAsHWIntrinsicNode(simdType, tmp1, NI_AdvSimd_Arm64_AddAcross, baseType, simdSize); + BlockRange().InsertAfter(tmp1, tmp2); + LowerNode(tmp2); + } + + // We will be constructing the following parts: + // ... + // /--* tmp2 simd16 + // node = * HWINTRINSIC simd16 T ToScalar + + // This is roughly the following managed code: + // ... + // return tmp2.ToScalar(); + + node->gtOp1 = tmp2; + node->gtOp2 = nullptr; + + node->gtHWIntrinsicId = (simdSize == 8) ? NI_Vector64_ToScalar : NI_Vector128_ToScalar; + LowerNode(node); + + return; +} #endif // FEATURE_HW_INTRINSICS //------------------------------------------------------------------------ @@ -1123,10 +1378,11 @@ void Lowering::ContainCheckIndir(GenTreeIndir* indirNode) } } #ifdef TARGET_ARM64 - else if (addr->OperGet() == GT_CLS_VAR_ADDR) + else if (addr->OperIs(GT_CLS_VAR_ADDR, GT_LCL_VAR_ADDR, GT_LCL_FLD_ADDR)) { // These nodes go into an addr mode: // - GT_CLS_VAR_ADDR turns into a constant. + // - GT_LCL_VAR_ADDR, GT_LCL_FLD_ADDR is a stack addr mode. // make this contained, it turns into a constant that goes into an addr mode MakeSrcContained(indirNode, addr); @@ -1415,6 +1671,7 @@ void Lowering::ContainCheckHWIntrinsic(GenTreeHWIntrinsic* node) case NI_AdvSimd_DuplicateSelectedScalarToVector64: case NI_AdvSimd_DuplicateSelectedScalarToVector128: case NI_AdvSimd_Extract: + case NI_AdvSimd_InsertScalar: case NI_AdvSimd_LoadAndInsertScalar: case NI_AdvSimd_Arm64_DuplicateSelectedScalarToVector128: case NI_Vector64_GetElement: diff --git a/src/coreclr/src/jit/lowerxarch.cpp b/src/coreclr/src/jit/lowerxarch.cpp index 03c49f65c21f..331c674eab9e 100644 --- a/src/coreclr/src/jit/lowerxarch.cpp +++ b/src/coreclr/src/jit/lowerxarch.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -943,6 +942,13 @@ void Lowering::LowerHWIntrinsic(GenTreeHWIntrinsic* node) return; } + case NI_Vector128_Dot: + case NI_Vector256_Dot: + { + LowerHWIntrinsicDot(node); + return; + } + case NI_Vector128_op_Equality: case NI_Vector256_op_Equality: { @@ -957,6 +963,13 @@ void Lowering::LowerHWIntrinsic(GenTreeHWIntrinsic* node) return; } + case NI_Vector128_ToScalar: + case NI_Vector256_ToScalar: + { + LowerHWIntrinsicToScalar(node); + break; + } + case NI_SSE2_Insert: case NI_SSE41_Insert: case NI_SSE41_X64_Insert: @@ -1350,7 +1363,7 @@ void Lowering::LowerHWIntrinsicCmpOp(GenTreeHWIntrinsic* node, genTreeOps cmpOp) GenTree* tmp = comp->gtNewOperNode(GT_AND, TYP_INT, msk, mskCns); BlockRange().InsertAfter(mskCns, tmp); - LowerNode(msk); + LowerNode(tmp); msk = tmp; @@ -1386,6 +1399,13 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) unsigned simdSize = node->gtSIMDSize; VectorConstant vecCns = {}; + if ((simdSize == 8) && (simdType == TYP_DOUBLE)) + { + // TODO-Cleanup: Struct retyping means we have the wrong type here. We need to + // manually fix it up so the simdType checks below are correct. + simdType = TYP_SIMD8; + } + assert(varTypeIsSIMD(simdType)); assert(varTypeIsArithmetic(baseType)); assert(simdSize != 0); @@ -1455,22 +1475,72 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) { for (argList = op1->AsArgList(); argList != nullptr; argList = argList->Rest()) { - BlockRange().Remove(argList->Current()); + GenTree* arg = argList->Current(); + +#if !defined(TARGET_64BIT) + if (arg->OperIsLong()) + { + BlockRange().Remove(arg->AsOp()->gtOp1); + BlockRange().Remove(arg->AsOp()->gtOp2); + } +#endif // !TARGET_64BIT + + BlockRange().Remove(arg); } } else { +#if !defined(TARGET_64BIT) + if (op1->OperIsLong()) + { + BlockRange().Remove(op1->AsOp()->gtOp1); + BlockRange().Remove(op1->AsOp()->gtOp2); + } +#endif // !TARGET_64BIT + BlockRange().Remove(op1); if (op2 != nullptr) { +#if defined(TARGET_64BIT) + if (op2->OperIsLong()) + { + BlockRange().Remove(op2->AsOp()->gtOp1); + BlockRange().Remove(op2->AsOp()->gtOp2); + } +#endif // !TARGET_64BIT + BlockRange().Remove(op2); } } - assert((simdSize == 16) || (simdSize == 32)); + assert((simdSize == 8) || (simdSize == 12) || (simdSize == 16) || (simdSize == 32)); - UNATIVE_OFFSET cnsSize = simdSize; + if ((argCnt == 1) || + ((vecCns.i64[0] == vecCns.i64[1]) && ((simdSize <= 16) || (vecCns.i64[2] == vecCns.i64[3])))) + { + // If we are a single constant or if all parts are the same, we might be able to optimize + // this even further for certain values, such as Zero or AllBitsSet. + + if (vecCns.i64[0] == 0) + { + node->gtOp1 = nullptr; + node->gtOp2 = nullptr; + + node->gtHWIntrinsicId = NI_Vector128_get_Zero; + return; + } + else if (vecCns.i64[0] == -1) + { + node->gtOp1 = nullptr; + node->gtOp2 = nullptr; + + node->gtHWIntrinsicId = NI_Vector128_get_AllBitsSet; + return; + } + } + + UNATIVE_OFFSET cnsSize = (simdSize != 12) ? simdSize : 16; UNATIVE_OFFSET cnsAlign = (comp->compCodeOpt() != Compiler::SMALL_CODE) ? cnsSize : 1; CORINFO_FIELD_HANDLE hnd = comp->GetEmitter()->emitAnyConst(&vecCns, cnsSize, cnsAlign); @@ -2244,7 +2314,7 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) // return Sse41.X64.Insert(tmp1, op2, 0x01); idx = comp->gtNewIconNode(0x01, TYP_INT); - BlockRange().InsertAfter(op2, idx); + BlockRange().InsertBefore(node, idx); node->gtOp1 = comp->gtNewArgList(tmp1, op2, idx); node->gtOp2 = nullptr; @@ -2451,6 +2521,703 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) } } } + +//---------------------------------------------------------------------------------------------- +// Lowering::LowerHWIntrinsicDot: Lowers a Vector128 or Vector256 Dot call +// +// Arguments: +// node - The hardware intrinsic node. +// +void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) +{ + NamedIntrinsic intrinsicId = node->gtHWIntrinsicId; + ; + var_types baseType = node->gtSIMDBaseType; + unsigned simdSize = node->gtSIMDSize; + var_types simdType = Compiler::getSIMDTypeForSize(simdSize); + unsigned simd16Count = comp->getSIMDVectorLength(16, baseType); + + assert((intrinsicId == NI_Vector128_Dot) || (intrinsicId == NI_Vector256_Dot)); + assert(varTypeIsSIMD(simdType)); + assert(varTypeIsArithmetic(baseType)); + assert(simdSize != 0); + + GenTree* op1 = node->gtGetOp1(); + GenTree* op2 = node->gtGetOp2(); + + assert(op1 != nullptr); + assert(op2 != nullptr); + assert(!op1->OperIsList()); + + // Spare GenTrees to be used for the lowering logic below + // Defined upfront to avoid naming conflicts, etc... + GenTree* idx = nullptr; + GenTree* tmp1 = nullptr; + GenTree* tmp2 = nullptr; + GenTree* tmp3 = nullptr; + + NamedIntrinsic multiply = NI_Illegal; + NamedIntrinsic horizontalAdd = NI_Illegal; + NamedIntrinsic add = NI_Illegal; + NamedIntrinsic shuffle = NI_Illegal; + + if (simdSize == 32) + { + assert(comp->compIsaSupportedDebugOnly(InstructionSet_AVX2)); + + switch (baseType) + { + case TYP_SHORT: + case TYP_USHORT: + case TYP_INT: + case TYP_UINT: + { + multiply = NI_AVX2_MultiplyLow; + horizontalAdd = NI_AVX2_HorizontalAdd; + add = NI_AVX2_Add; + break; + } + + case TYP_FLOAT: + { + // We will be constructing the following parts: + // idx = CNS_INT int 0xF1 + // /--* op1 simd16 + // +--* op2 simd16 + // +--* idx int + // tmp1 = * HWINTRINSIC simd16 T DotProduct + // /--* tmp1 simd16 + // * STORE_LCL_VAR simd16 + // tmp1 = LCL_VAR simd16 + // tmp2 = LCL_VAR simd16 + // idx = CNS_INT int 0x01 + // /--* tmp2 simd16 + // +--* idx int + // tmp2 = * HWINTRINSIC simd16 T ExtractVector128 + // /--* tmp1 simd16 + // +--* tmp2 simd16 + // tmp3 = * HWINTRINSIC simd16 T Add + // /--* tmp3 simd16 + // node = * HWINTRINSIC simd16 T ToScalar + + // This is roughly the following managed code: + // var tmp1 = Avx.DotProduct(op1, op2, 0xFF); + // var tmp2 = Avx.ExtractVector128(tmp1, 0x01); + // var tmp3 = Sse.Add(tmp1, tmp2); + // return tmp3.ToScalar(); + + idx = comp->gtNewIconNode(0xF1, TYP_INT); + BlockRange().InsertBefore(node, idx); + + tmp1 = comp->gtNewSimdHWIntrinsicNode(simdType, op1, op2, idx, NI_AVX_DotProduct, baseType, simdSize); + BlockRange().InsertAfter(idx, tmp1); + LowerNode(tmp1); + + node->gtOp1 = tmp1; + LIR::Use tmp1Use(BlockRange(), &node->gtOp1, node); + ReplaceWithLclVar(tmp1Use); + tmp1 = node->gtOp1; + + tmp2 = comp->gtClone(tmp1); + BlockRange().InsertAfter(tmp1, tmp2); + + idx = comp->gtNewIconNode(0x01, TYP_INT); + BlockRange().InsertAfter(tmp2, idx); + + tmp2 = + comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, tmp2, idx, NI_AVX_ExtractVector128, baseType, simdSize); + BlockRange().InsertAfter(idx, tmp2); + LowerNode(tmp2); + + tmp3 = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, tmp1, tmp2, NI_SSE_Add, baseType, 16); + BlockRange().InsertAfter(tmp2, tmp3); + LowerNode(tmp3); + + node->gtSIMDSize = 16; + + node->gtOp1 = tmp3; + node->gtOp2 = nullptr; + + node->gtHWIntrinsicId = NI_Vector128_ToScalar; + LowerNode(node); + + return; + } + + case TYP_DOUBLE: + { + multiply = NI_AVX_Multiply; + horizontalAdd = NI_AVX_HorizontalAdd; + add = NI_AVX_Add; + break; + } + + default: + { + unreached(); + } + } + } + else + { + assert(comp->compIsaSupportedDebugOnly(InstructionSet_SSE2)); + + switch (baseType) + { + case TYP_SHORT: + case TYP_USHORT: + { + multiply = NI_SSE2_MultiplyLow; + horizontalAdd = NI_SSSE3_HorizontalAdd; + add = NI_SSE2_Add; + + if (!comp->compOpportunisticallyDependsOn(InstructionSet_SSSE3)) + { + shuffle = NI_SSE2_ShuffleLow; + } + break; + } + + case TYP_INT: + case TYP_UINT: + { + multiply = NI_SSE41_MultiplyLow; + horizontalAdd = NI_SSSE3_HorizontalAdd; + add = NI_SSE2_Add; + + assert(comp->compIsaSupportedDebugOnly(InstructionSet_SSE41)); + break; + } + + case TYP_FLOAT: + { + if (comp->compOpportunisticallyDependsOn(InstructionSet_SSE41)) + { + // We will be constructing the following parts: + // idx = CNS_INT int 0xFF + // /--* op1 simd16 + // +--* op2 simd16 + // +--* idx int + // tmp3 = * HWINTRINSIC simd16 T DotProduct + // /--* tmp3 simd16 + // node = * HWINTRINSIC simd16 T ToScalar + + // This is roughly the following managed code: + // var tmp3 = Avx.DotProduct(op1, op2, 0xFF); + // return tmp3.ToScalar(); + + if (simdSize == 8) + { + idx = comp->gtNewIconNode(0x31, TYP_INT); + } + else if (simdSize == 12) + { + idx = comp->gtNewIconNode(0x71, TYP_INT); + } + else + { + assert(simdSize == 16); + idx = comp->gtNewIconNode(0xF1, TYP_INT); + } + BlockRange().InsertBefore(node, idx); + + tmp3 = comp->gtNewSimdHWIntrinsicNode(simdType, op1, op2, idx, NI_SSE41_DotProduct, baseType, + simdSize); + BlockRange().InsertAfter(idx, tmp3); + LowerNode(tmp3); + + node->gtOp1 = tmp3; + node->gtOp2 = nullptr; + + node->gtHWIntrinsicId = NI_Vector128_ToScalar; + LowerNode(node); + + return; + } + + multiply = NI_SSE_Multiply; + horizontalAdd = NI_SSE3_HorizontalAdd; + add = NI_SSE_Add; + + if (!comp->compOpportunisticallyDependsOn(InstructionSet_SSE3)) + { + shuffle = NI_SSE_Shuffle; + } + break; + } + + case TYP_DOUBLE: + { + if (comp->compOpportunisticallyDependsOn(InstructionSet_SSE41)) + { + // We will be constructing the following parts: + // idx = CNS_INT int 0x31 + // /--* op1 simd16 + // +--* op2 simd16 + // +--* idx int + // tmp3 = * HWINTRINSIC simd16 T DotProduct + // /--* tmp3 simd16 + // node = * HWINTRINSIC simd16 T ToScalar + + // This is roughly the following managed code: + // var tmp3 = Avx.DotProduct(op1, op2, 0x31); + // return tmp3.ToScalar(); + + idx = comp->gtNewIconNode(0x31, TYP_INT); + BlockRange().InsertBefore(node, idx); + + tmp3 = comp->gtNewSimdHWIntrinsicNode(simdType, op1, op2, idx, NI_SSE41_DotProduct, baseType, + simdSize); + BlockRange().InsertAfter(idx, tmp3); + LowerNode(tmp3); + + node->gtOp1 = tmp3; + node->gtOp2 = nullptr; + + node->gtHWIntrinsicId = NI_Vector128_ToScalar; + LowerNode(node); + + return; + } + + multiply = NI_SSE2_Multiply; + horizontalAdd = NI_SSE3_HorizontalAdd; + add = NI_SSE2_Add; + + if (!comp->compOpportunisticallyDependsOn(InstructionSet_SSE3)) + { + shuffle = NI_SSE2_Shuffle; + } + break; + } + + default: + { + unreached(); + } + } + + if (simdSize == 8) + { + assert(baseType == TYP_FLOAT); + + // If simdSize == 8 then we have only two elements, not the 4 that we got from getSIMDVectorLength, + // which we gave a simdSize of 16. So, we set the simd16Count to 2 so that only 1 hadd will + // be emitted rather than 2, so that the upper two elements will be ignored. + + simd16Count = 2; + } + else if (simdSize == 12) + { + assert(baseType == TYP_FLOAT); + + // We will be constructing the following parts: + // ... + // +--* CNS_INT int -1 + // +--* CNS_INT int -1 + // +--* CNS_INT int -1 + // +--* CNS_INT int 0 + // tmp1 = * HWINTRINSIC simd16 T Create + // /--* op2 simd16 + // +--* tmp1 simd16 + // op1 = * HWINTRINSIC simd16 T And + // ... + + // This is roughly the following managed code: + // ... + // tmp1 = Vector128.Create(-1, -1, -1, 0); + // op1 = Sse.And(op1, tmp2); + // ... + + GenTree* cns0 = comp->gtNewIconNode(-1, TYP_INT); + BlockRange().InsertAfter(op1, cns0); + + GenTree* cns1 = comp->gtNewIconNode(-1, TYP_INT); + BlockRange().InsertAfter(cns0, cns1); + + GenTree* cns2 = comp->gtNewIconNode(-1, TYP_INT); + BlockRange().InsertAfter(cns1, cns2); + + GenTree* cns3 = comp->gtNewIconNode(0, TYP_INT); + BlockRange().InsertAfter(cns2, cns3); + + tmp1 = comp->gtNewSimdHWIntrinsicNode(simdType, cns0, cns1, cns2, cns3, NI_Vector128_Create, TYP_INT, 16); + BlockRange().InsertAfter(cns3, tmp1); + LowerNode(tmp1); + + op1 = comp->gtNewSimdHWIntrinsicNode(simdType, op1, tmp1, NI_SSE_And, baseType, simdSize); + BlockRange().InsertAfter(tmp1, op1); + LowerNode(op1); + } + } + + // We will be constructing the following parts: + // /--* op1 simd16 + // +--* op2 simd16 + // tmp1 = * HWINTRINSIC simd16 T Multiply + // ... + + // This is roughly the following managed code: + // var tmp1 = Isa.Multiply(op1, op2); + // ... + + tmp1 = comp->gtNewSimdHWIntrinsicNode(simdType, op1, op2, multiply, baseType, simdSize); + BlockRange().InsertBefore(node, tmp1); + LowerNode(tmp1); + + // HorizontalAdd combines pairs so we need log2(simd16Count) passes to sum all elements together. + int haddCount = genLog2(simd16Count); + + for (int i = 0; i < haddCount; i++) + { + // We will be constructing the following parts: + // ... + // /--* tmp1 simd16 + // * STORE_LCL_VAR simd16 + // tmp1 = LCL_VAR simd16 + // tmp2 = LCL_VAR simd16 + // ... + + // This is roughly the following managed code: + // ... + // tmp2 = tmp1; + // ... + + node->gtOp1 = tmp1; + LIR::Use tmp1Use(BlockRange(), &node->gtOp1, node); + ReplaceWithLclVar(tmp1Use); + tmp1 = node->gtOp1; + + tmp2 = comp->gtClone(tmp1); + BlockRange().InsertAfter(tmp1, tmp2); + + if (shuffle == NI_Illegal) + { + // We will be constructing the following parts: + // ... + // /--* tmp1 simd16 + // +--* tmp2 simd16 + // tmp1 = * HWINTRINSIC simd16 T HorizontalAdd + // ... + + // This is roughly the following managed code: + // ... + // tmp1 = Isa.HorizontalAdd(tmp1, tmp2); + // ... + + tmp1 = comp->gtNewSimdHWIntrinsicNode(simdType, tmp1, tmp2, horizontalAdd, baseType, simdSize); + } + else + { + int shuffleConst = 0x00; + + switch (i) + { + case 0: + { + assert((baseType == TYP_SHORT) || (baseType == TYP_USHORT) || varTypeIsFloating(baseType)); + + // Adds (e0 + e1, e1 + e0, e2 + e3, e3 + e2), giving: + // e0, e1, e2, e3 | e4, e5, e6, e7 + // e1, e0, e3, e2 | e5, e4, e7, e6 + // ... + + shuffleConst = 0xB1; + break; + } + + case 1: + { + assert((baseType == TYP_SHORT) || (baseType == TYP_USHORT) || (baseType == TYP_FLOAT)); + + // Adds (e0 + e2, e1 + e3, e2 + e0, e3 + e1), giving: + // ... + // e2, e3, e0, e1 | e6, e7, e4, e5 + // e3, e2, e1, e0 | e7, e6, e5, e4 + + shuffleConst = 0x4E; + break; + } + + case 2: + { + assert((baseType == TYP_SHORT) || (baseType == TYP_USHORT)); + + // Adds (e0 + e4, e1 + e5, e2 + e6, e3 + e7), giving: + // ... + // e4, e5, e6, e7 | e0, e1, e2, e3 + // e5, e4, e7, e6 | e1, e0, e3, e2 + // e6, e7, e4, e5 | e2, e3, e0, e1 + // e7, e6, e5, e4 | e3, e2, e1, e0 + + shuffleConst = 0x4D; + break; + } + + default: + { + unreached(); + } + } + + idx = comp->gtNewIconNode(shuffleConst, TYP_INT); + BlockRange().InsertAfter(tmp2, idx); + + if (varTypeIsFloating(baseType)) + { + // We will be constructing the following parts: + // ... + // /--* tmp2 simd16 + // * STORE_LCL_VAR simd16 + // tmp2 = LCL_VAR simd16 + // tmp3 = LCL_VAR simd16 + // idx = CNS_INT int shuffleConst + // /--* tmp2 simd16 + // +--* tmp3 simd16 + // +--* idx simd16 + // tmp2 = * HWINTRINSIC simd16 T Shuffle + // ... + + // This is roughly the following managed code: + // ... + // tmp3 = tmp2; + // tmp2 = Isa.Shuffle(tmp2, tmp3, shuffleConst); + // ... + + node->gtOp1 = tmp2; + LIR::Use tmp2Use(BlockRange(), &node->gtOp1, node); + ReplaceWithLclVar(tmp2Use); + tmp2 = node->gtOp1; + + tmp3 = comp->gtClone(tmp2); + BlockRange().InsertAfter(tmp2, tmp3); + + tmp2 = comp->gtNewSimdHWIntrinsicNode(simdType, tmp2, tmp3, idx, shuffle, baseType, simdSize); + } + else + { + assert((baseType == TYP_SHORT) || (baseType == TYP_USHORT)); + + if (i < 2) + { + // We will be constructing the following parts: + // ... + // idx = CNS_INT int shuffleConst + // /--* tmp2 simd16 + // +--* idx simd16 + // tmp2 = * HWINTRINSIC simd16 T ShuffleLow + // idx = CNS_INT int shuffleConst + // /--* tmp2 simd16 + // +--* idx simd16 + // tmp2 = * HWINTRINSIC simd16 T ShuffleHigh + // ... + + // This is roughly the following managed code: + // ... + // tmp2 = Isa.Shuffle(tmp1, shuffleConst); + // ... + + tmp2 = comp->gtNewSimdHWIntrinsicNode(simdType, tmp2, idx, NI_SSE2_ShuffleLow, baseType, simdSize); + BlockRange().InsertAfter(idx, tmp2); + LowerNode(tmp2); + + idx = comp->gtNewIconNode(shuffleConst, TYP_INT); + BlockRange().InsertAfter(tmp2, idx); + + tmp2 = comp->gtNewSimdHWIntrinsicNode(simdType, tmp2, idx, NI_SSE2_ShuffleHigh, baseType, simdSize); + } + else + { + assert(i == 2); + + // We will be constructing the following parts: + // ... + // idx = CNS_INT int shuffleConst + // /--* tmp2 simd16 + // +--* idx simd16 + // tmp2 = * HWINTRINSIC simd16 T ShuffleLow + // ... + + // This is roughly the following managed code: + // ... + // tmp2 = Isa.Shuffle(tmp1, shuffleConst); + // ... + + tmp2 = comp->gtNewSimdHWIntrinsicNode(simdType, tmp2, idx, NI_SSE2_Shuffle, TYP_INT, simdSize); + } + } + + BlockRange().InsertAfter(idx, tmp2); + LowerNode(tmp2); + + // We will be constructing the following parts: + // ... + // /--* tmp1 simd16 + // +--* tmp2 simd16 + // tmp1 = * HWINTRINSIC simd16 T Add + // ... + + // This is roughly the following managed code: + // ... + // tmp1 = Isa.Add(tmp1, tmp2); + // ... + + tmp1 = comp->gtNewSimdHWIntrinsicNode(simdType, tmp1, tmp2, add, baseType, simdSize); + } + + BlockRange().InsertAfter(tmp2, tmp1); + LowerNode(tmp1); + } + + if (simdSize == 32) + { + // We will be constructing the following parts: + // ... + // /--* tmp1 simd16 + // * STORE_LCL_VAR simd16 + // tmp1 = LCL_VAR simd16 + // tmp2 = LCL_VAR simd16 + // idx = CNS_INT int 0x01 + // /--* tmp2 simd16 + // +--* idx int + // tmp2 = * HWINTRINSIC simd16 T ExtractVector128 + // /--* tmp1 simd16 + // +--* tmp2 simd16 + // tmp1 = * HWINTRINSIC simd16 T Add + // ... + + // This is roughly the following managed code: + // ... + // var tmp2 = tmp1; + // tmp2 = Avx.ExtractVector128(tmp2, 0x01); + // var tmp1 = Isa.Add(tmp1, tmp2); + // ... + + node->gtOp1 = tmp1; + LIR::Use tmp1Use(BlockRange(), &node->gtOp1, node); + ReplaceWithLclVar(tmp1Use); + tmp1 = node->gtOp1; + + tmp2 = comp->gtClone(tmp1); + BlockRange().InsertAfter(tmp1, tmp2); + + idx = comp->gtNewIconNode(0x01, TYP_INT); + BlockRange().InsertAfter(tmp2, idx); + + tmp2 = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, tmp2, idx, NI_AVX_ExtractVector128, baseType, simdSize); + BlockRange().InsertAfter(idx, tmp2); + LowerNode(tmp2); + + tmp1 = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, tmp1, tmp2, add, baseType, 16); + BlockRange().InsertAfter(tmp2, tmp1); + LowerNode(tmp1); + + node->gtSIMDSize = 16; + } + + // We will be constructing the following parts: + // ... + // /--* tmp1 simd16 + // node = * HWINTRINSIC simd16 T ToScalar + + // This is roughly the following managed code: + // ... + // return tmp1.ToScalar(); + + node->gtOp1 = tmp1; + node->gtOp2 = nullptr; + + node->gtHWIntrinsicId = NI_Vector128_ToScalar; + LowerNode(node); + + return; +} + +//---------------------------------------------------------------------------------------------- +// Lowering::LowerHWIntrinsicToScalar: Lowers a Vector128 or Vector256 ToScalar call +// +// Arguments: +// node - The hardware intrinsic node. +// +void Lowering::LowerHWIntrinsicToScalar(GenTreeHWIntrinsic* node) +{ + NamedIntrinsic intrinsicId = node->gtHWIntrinsicId; + ; + var_types baseType = node->gtSIMDBaseType; + unsigned simdSize = node->gtSIMDSize; + var_types simdType = Compiler::getSIMDTypeForSize(simdSize); + + assert((intrinsicId == NI_Vector128_ToScalar) || (intrinsicId == NI_Vector256_ToScalar)); + assert(varTypeIsSIMD(simdType)); + assert(varTypeIsArithmetic(baseType)); + assert(simdSize != 0); + + switch (baseType) + { + case TYP_BYTE: + case TYP_SHORT: + case TYP_INT: + { + node->gtType = TYP_INT; + node->gtSIMDBaseType = TYP_INT; + node->gtHWIntrinsicId = NI_SSE2_ConvertToInt32; + break; + } + + case TYP_UBYTE: + case TYP_USHORT: + case TYP_UINT: + { + node->gtType = TYP_UINT; + node->gtSIMDBaseType = TYP_UINT; + node->gtHWIntrinsicId = NI_SSE2_ConvertToUInt32; + break; + } + +#if defined(TARGET_AMD64) + case TYP_LONG: + { + node->gtHWIntrinsicId = NI_SSE2_X64_ConvertToInt64; + break; + } + + case TYP_ULONG: + { + node->gtHWIntrinsicId = NI_SSE2_X64_ConvertToUInt64; + break; + } +#endif // TARGET_AMD64 + + case TYP_FLOAT: + case TYP_DOUBLE: + { + ContainCheckHWIntrinsic(node); + return; + } + + default: + { + unreached(); + } + } + + LowerNode(node); + + if (genTypeSize(baseType) < 4) + { + LIR::Use use; + bool foundUse = BlockRange().TryGetUse(node, &use); + + GenTreeCast* cast = comp->gtNewCastNode(baseType, node, node->IsUnsigned(), baseType); + BlockRange().InsertAfter(node, cast); + + if (foundUse) + { + use.ReplaceWith(comp, cast); + } + LowerNode(cast); + } +} #endif // FEATURE_HW_INTRINSICS //---------------------------------------------------------------------------------------------- @@ -3047,11 +3814,11 @@ void Lowering::ContainCheckIndir(GenTreeIndir* node) // The address of an indirection that requires its address in a reg. // Skip any further processing that might otherwise make it contained. } - else if ((addr->OperGet() == GT_CLS_VAR_ADDR) || (addr->OperGet() == GT_LCL_VAR_ADDR)) + else if (addr->OperIs(GT_CLS_VAR_ADDR, GT_LCL_VAR_ADDR, GT_LCL_FLD_ADDR)) { // These nodes go into an addr mode: // - GT_CLS_VAR_ADDR turns into a constant. - // - GT_LCL_VAR_ADDR is a stack addr mode. + // - GT_LCL_VAR_ADDR, GT_LCL_FLD_ADDR is a stack addr mode. // make this contained, it turns into a constant that goes into an addr mode MakeSrcContained(node, addr); diff --git a/src/coreclr/src/jit/lsra.cpp b/src/coreclr/src/jit/lsra.cpp index e468377f56f8..4f51e2890a5b 100644 --- a/src/coreclr/src/jit/lsra.cpp +++ b/src/coreclr/src/jit/lsra.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -6790,8 +6789,8 @@ void LinearScan::insertCopyOrReload(BasicBlock* block, GenTree* tree, unsigned m if (refPosition->copyReg) { // This is a TEMPORARY copy - assert(isCandidateLocalRef(tree)); - newNode->gtFlags |= GTF_VAR_DEATH; + assert(isCandidateLocalRef(tree) || tree->IsMultiRegLclVar()); + newNode->SetLastUse(multiRegIdx); } // Insert the copy/reload after the spilled node and replace the use of the original node with a use diff --git a/src/coreclr/src/jit/lsra.h b/src/coreclr/src/jit/lsra.h index 97b37b644c6d..7050e5f069a2 100644 --- a/src/coreclr/src/jit/lsra.h +++ b/src/coreclr/src/jit/lsra.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*****************************************************************************/ #ifndef _LSRA_H_ diff --git a/src/coreclr/src/jit/lsra_reftypes.h b/src/coreclr/src/jit/lsra_reftypes.h index 11b2cb48fc7c..5006a61e5236 100644 --- a/src/coreclr/src/jit/lsra_reftypes.h +++ b/src/coreclr/src/jit/lsra_reftypes.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // clang-format off // memberName - enum member name diff --git a/src/coreclr/src/jit/lsraarm.cpp b/src/coreclr/src/jit/lsraarm.cpp index 6f7fed2dd034..da91c7b9dde4 100644 --- a/src/coreclr/src/jit/lsraarm.cpp +++ b/src/coreclr/src/jit/lsraarm.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -696,17 +695,15 @@ int LinearScan::BuildNode(GenTree* tree) break; case GT_NULLCHECK: - // It requires a internal register on ARM, as it is implemented as a load - assert(dstCount == 0); - assert(!tree->gtGetOp1()->isContained()); - srcCount = 1; - buildInternalIntRegisterDefForNode(tree); - BuildUse(tree->gtGetOp1()); - buildInternalRegisterUses(); - break; - +#ifdef TARGET_ARM + // On Arm32 we never want to use GT_NULLCHECK, as we require a target register. + // Previously we used an internal register for this, but that results in a lifetime + // that overlaps with all the source registers. + assert(!"Should never see GT_NULLCHECK on Arm/32"); +#endif + // For Arm64 we simply fall through to the GT_IND case, and will use REG_ZR as the target. case GT_IND: - assert(dstCount == 1); + assert(dstCount == (tree->OperIs(GT_NULLCHECK) ? 0 : 1)); srcCount = BuildIndir(tree->AsIndir()); break; @@ -766,7 +763,11 @@ int LinearScan::BuildNode(GenTree* tree) { assert(dstCount == 1); regNumber argReg = tree->GetRegNum(); - regMaskTP argMask = genRegMask(argReg); + regMaskTP argMask = RBM_NONE; + if (argReg != REG_COUNT) + { + argMask = genRegMask(argReg); + } // If type of node is `long` then it is actually `double`. // The actual `long` types must have been transformed as a field list with two fields. diff --git a/src/coreclr/src/jit/lsraarm64.cpp b/src/coreclr/src/jit/lsraarm64.cpp index cc62f3f351a0..514ed90feef4 100644 --- a/src/coreclr/src/jit/lsraarm64.cpp +++ b/src/coreclr/src/jit/lsraarm64.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -717,16 +716,8 @@ int LinearScan::BuildNode(GenTree* tree) break; case GT_NULLCHECK: - // Unlike ARM, ARM64 implements NULLCHECK as a load to REG_ZR, so no internal register - // is required, and it is not a localDefUse. - assert(dstCount == 0); - assert(!tree->gtGetOp1()->isContained()); - BuildUse(tree->gtGetOp1()); - srcCount = 1; - break; - case GT_IND: - assert(dstCount == 1); + assert(dstCount == (tree->OperIs(GT_NULLCHECK) ? 0 : 1)); srcCount = BuildIndir(tree->AsIndir()); break; @@ -849,10 +840,7 @@ int LinearScan::BuildSIMD(GenTreeSIMD* simdTree) } break; - case SIMDIntrinsicAdd: case SIMDIntrinsicSub: - case SIMDIntrinsicMul: - case SIMDIntrinsicDiv: case SIMDIntrinsicBitwiseAnd: case SIMDIntrinsicBitwiseOr: case SIMDIntrinsicEqual: @@ -904,19 +892,11 @@ int LinearScan::BuildSIMD(GenTreeSIMD* simdTree) // We have an array and an index, which may be contained. break; - case SIMDIntrinsicDotProduct: - buildInternalFloatRegisterDefForNode(simdTree); - break; - case SIMDIntrinsicInitArrayX: case SIMDIntrinsicInitFixed: case SIMDIntrinsicCopyToArray: case SIMDIntrinsicCopyToArrayX: case SIMDIntrinsicNone: - case SIMDIntrinsicGetCount: - case SIMDIntrinsicGetOne: - case SIMDIntrinsicGetZero: - case SIMDIntrinsicGetAllOnes: case SIMDIntrinsicGetX: case SIMDIntrinsicGetY: case SIMDIntrinsicGetZ: @@ -1033,6 +1013,7 @@ int LinearScan::BuildHWIntrinsic(GenTreeHWIntrinsic* intrinsicTree) case NI_AdvSimd_DuplicateSelectedScalarToVector128: case NI_AdvSimd_Extract: case NI_AdvSimd_Insert: + case NI_AdvSimd_InsertScalar: case NI_AdvSimd_LoadAndInsertScalar: case NI_AdvSimd_Arm64_DuplicateSelectedScalarToVector128: needBranchTargetReg = !intrin.op2->isContainedIntOrIImmed(); diff --git a/src/coreclr/src/jit/lsraarmarch.cpp b/src/coreclr/src/jit/lsraarmarch.cpp index bcc987ca62e1..59d64329b456 100644 --- a/src/coreclr/src/jit/lsraarmarch.cpp +++ b/src/coreclr/src/jit/lsraarmarch.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -117,7 +116,7 @@ int LinearScan::BuildIndir(GenTreeIndir* indirTree) int srcCount = BuildIndirUses(indirTree); buildInternalRegisterUses(); - if (indirTree->gtOper != GT_STOREIND) + if (!indirTree->OperIs(GT_STOREIND, GT_NULLCHECK)) { BuildDef(indirTree); } diff --git a/src/coreclr/src/jit/lsrabuild.cpp b/src/coreclr/src/jit/lsrabuild.cpp index 591fa173aae6..549a463b3ea2 100644 --- a/src/coreclr/src/jit/lsrabuild.cpp +++ b/src/coreclr/src/jit/lsrabuild.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -1354,13 +1353,8 @@ RefPosition* LinearScan::defineNewInternalTemp(GenTree* tree, RegisterType regTy // RefPosition* LinearScan::buildInternalIntRegisterDefForNode(GenTree* tree, regMaskTP internalCands) { - bool fixedReg = false; // The candidate set should contain only integer registers. assert((internalCands & ~allRegs(TYP_INT)) == RBM_NONE); - if (genMaxOneBit(internalCands)) - { - fixedReg = true; - } RefPosition* defRefPosition = defineNewInternalTemp(tree, IntRegisterType, internalCands); return defRefPosition; @@ -1378,13 +1372,8 @@ RefPosition* LinearScan::buildInternalIntRegisterDefForNode(GenTree* tree, regMa // RefPosition* LinearScan::buildInternalFloatRegisterDefForNode(GenTree* tree, regMaskTP internalCands) { - bool fixedReg = false; // The candidate set should contain only float registers. assert((internalCands & ~allRegs(TYP_FLOAT)) == RBM_NONE); - if (genMaxOneBit(internalCands)) - { - fixedReg = true; - } RefPosition* defRefPosition = defineNewInternalTemp(tree, FloatRegisterType, internalCands); return defRefPosition; diff --git a/src/coreclr/src/jit/lsraxarch.cpp b/src/coreclr/src/jit/lsraxarch.cpp index 7dd7a68efc71..780d959a9e93 100644 --- a/src/coreclr/src/jit/lsraxarch.cpp +++ b/src/coreclr/src/jit/lsraxarch.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -620,8 +619,9 @@ int LinearScan::BuildNode(GenTree* tree) case GT_NULLCHECK: { assert(dstCount == 0); - regMaskTP indirCandidates = RBM_NONE; - BuildUse(tree->gtGetOp1(), indirCandidates); + // If we have a contained address on a nullcheck, we transform it to + // an unused GT_IND, since we require a target register. + BuildUse(tree->gtGetOp1()); srcCount = 1; break; } @@ -1932,67 +1932,14 @@ int LinearScan::BuildSIMD(GenTreeSIMD* simdTree) // We have an array and an index, which may be contained. break; - case SIMDIntrinsicDiv: - // SSE2 has no instruction support for division on integer vectors - noway_assert(varTypeIsFloating(simdTree->gtSIMDBaseType)); - break; - - case SIMDIntrinsicAdd: case SIMDIntrinsicSub: - case SIMDIntrinsicMul: case SIMDIntrinsicBitwiseAnd: case SIMDIntrinsicBitwiseOr: - // SSE2 32-bit integer multiplication requires two temp regs - if (simdTree->gtSIMDIntrinsicID == SIMDIntrinsicMul && simdTree->gtSIMDBaseType == TYP_INT && - compiler->getSIMDSupportLevel() == SIMD_SSE2_Supported) - { - buildInternalFloatRegisterDefForNode(simdTree); - buildInternalFloatRegisterDefForNode(simdTree); - } break; case SIMDIntrinsicEqual: break; - case SIMDIntrinsicDotProduct: - // Float/Double vectors: - // For SSE, or AVX with 32-byte vectors, we also need an internal register - // as scratch. Further we need the targetReg and internal reg to be distinct - // registers. Note that if this is a TYP_SIMD16 or smaller on AVX, then we - // don't need a tmpReg. - // - // 32-byte integer vector on SSE4/AVX: - // will take advantage of phaddd, which operates only on 128-bit xmm reg. - // This will need 1 (in case of SSE4) or 2 (in case of AVX) internal - // registers since targetReg is an int type register. - // - // See genSIMDIntrinsicDotProduct() for details on code sequence generated - // and the need for scratch registers. - if (varTypeIsFloating(simdTree->gtSIMDBaseType)) - { - if ((compiler->getSIMDSupportLevel() == SIMD_SSE2_Supported) || - (simdTree->gtGetOp1()->TypeGet() == TYP_SIMD32)) - { - buildInternalFloatRegisterDefForNode(simdTree); - setInternalRegsDelayFree = true; - } - // else don't need scratch reg(s). - } - else - { - assert(simdTree->gtSIMDBaseType == TYP_INT && compiler->getSIMDSupportLevel() >= SIMD_SSE4_Supported); - - // No need to setInternalRegsDelayFree since targetReg is a - // an int type reg and guaranteed to be different from xmm/ymm - // regs. - buildInternalFloatRegisterDefForNode(simdTree); - if (compiler->getSIMDSupportLevel() == SIMD_AVX2_Supported) - { - buildInternalFloatRegisterDefForNode(simdTree); - } - } - break; - case SIMDIntrinsicGetItem: { // This implements get_Item method. The sources are: @@ -2162,10 +2109,6 @@ int LinearScan::BuildSIMD(GenTreeSIMD* simdTree) case SIMDIntrinsicGetY: case SIMDIntrinsicGetZ: case SIMDIntrinsicGetW: - case SIMDIntrinsicGetOne: - case SIMDIntrinsicGetZero: - case SIMDIntrinsicGetCount: - case SIMDIntrinsicGetAllOnes: assert(!"Get intrinsics should not be seen during Lowering."); unreached(); diff --git a/src/coreclr/src/jit/morph.cpp b/src/coreclr/src/jit/morph.cpp index 49bc83a4ce23..89d351ebffaf 100644 --- a/src/coreclr/src/jit/morph.cpp +++ b/src/coreclr/src/jit/morph.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -2704,6 +2703,9 @@ void Compiler::fgInitArgInfo(GenTreeCall* call) size_t addrValue = (size_t)call->gtEntryPoint.addr; GenTree* indirectCellAddress = gtNewIconHandleNode(addrValue, GTF_ICON_FTN_ADDR); +#ifdef DEBUG + indirectCellAddress->AsIntCon()->gtTargetHandle = (size_t)call->gtCallMethHnd; +#endif indirectCellAddress->SetRegNum(REG_R2R_INDIRECT_PARAM); // Push the stub address onto the list of arguments. @@ -3980,6 +3982,8 @@ GenTreeCall* Compiler::fgMorphArgs(GenTreeCall* call) if (call->gtCallType == CT_INDIRECT) { call->gtCallAddr = fgMorphTree(call->gtCallAddr); + // Const CSE may create an assignment node here + flagsSummary |= call->gtCallAddr->gtFlags; } #if FEATURE_FIXED_OUT_ARGS @@ -5277,14 +5281,31 @@ const int MAX_INDEX_COMPLEXITY = 4; GenTree* Compiler::fgMorphArrayIndex(GenTree* tree) { noway_assert(tree->gtOper == GT_INDEX); - GenTreeIndex* asIndex = tree->AsIndex(); - - var_types elemTyp = tree->TypeGet(); - unsigned elemSize = tree->AsIndex()->gtIndElemSize; - CORINFO_CLASS_HANDLE elemStructType = tree->AsIndex()->gtStructElemClass; + GenTreeIndex* asIndex = tree->AsIndex(); + var_types elemTyp = asIndex->TypeGet(); + unsigned elemSize = asIndex->gtIndElemSize; + CORINFO_CLASS_HANDLE elemStructType = asIndex->gtStructElemClass; noway_assert(elemTyp != TYP_STRUCT || elemStructType != nullptr); + // Fold "cns_str"[cns_index] to ushort constant + if (opts.OptimizationEnabled() && asIndex->Arr()->OperIs(GT_CNS_STR) && asIndex->Index()->IsIntCnsFitsInI32()) + { + const int cnsIndex = static_cast(asIndex->Index()->AsIntConCommon()->IconValue()); + if (cnsIndex >= 0) + { + int length; + LPCWSTR str = info.compCompHnd->getStringLiteral(asIndex->Arr()->AsStrCon()->gtScpHnd, + asIndex->Arr()->AsStrCon()->gtSconCPX, &length); + if ((cnsIndex < length) && (str != nullptr)) + { + GenTree* cnsCharNode = gtNewIconNode(str[cnsIndex], elemTyp); + INDEBUG(cnsCharNode->gtDebugFlags |= GTF_DEBUG_NODE_MORPHED); + return cnsCharNode; + } + } + } + #ifdef FEATURE_SIMD if (featureSIMD && varTypeIsStruct(elemTyp) && structSizeMightRepresentSIMDType(elemSize)) { @@ -6094,6 +6115,9 @@ GenTree* Compiler::fgMorphField(GenTree* tree, MorphAddrContext* mac) { offsetNode = gtNewIndOfIconHandleNode(TYP_I_IMPL, (size_t)tree->AsField()->gtFieldLookup.addr, GTF_ICON_FIELD_HDL, false); +#ifdef DEBUG + offsetNode->gtGetOp1()->AsIntCon()->gtTargetHandle = (size_t)symHnd; +#endif } else { @@ -7536,8 +7560,9 @@ GenTree* Compiler::fgMorphPotentialTailCall(GenTreeCall* call) // fgSetBlockOrder() is going to mark the method as fully interruptible // if the block containing this tail call is reachable without executing // any call. + BasicBlock* curBlock = compCurBB; if (canFastTailCall || (fgFirstBB->bbFlags & BBF_GC_SAFE_POINT) || (compCurBB->bbFlags & BBF_GC_SAFE_POINT) || - !fgCreateGCPoll(GCPOLL_INLINE, compCurBB)) + (fgCreateGCPoll(GCPOLL_INLINE, compCurBB) == curBlock)) { // We didn't insert a poll block, so we need to morph the call now // (Normally it will get morphed when we get to the split poll block) @@ -8391,6 +8416,9 @@ GenTree* Compiler::fgGetStubAddrArg(GenTreeCall* call) assert(call->gtCallMoreFlags & GTF_CALL_M_VIRTSTUB_REL_INDIRECT); ssize_t addr = ssize_t(call->gtStubCallStubAddr); stubAddrArg = gtNewIconHandleNode(addr, GTF_ICON_FTN_ADDR); +#ifdef DEBUG + stubAddrArg->AsIntCon()->gtTargetHandle = (size_t)call->gtCallMethHnd; +#endif } assert(stubAddrArg != nullptr); stubAddrArg->SetRegNum(virtualStubParamInfo->GetReg()); @@ -8828,12 +8856,11 @@ GenTree* Compiler::fgMorphCall(GenTreeCall* call) // Regardless of the state of the basic block with respect to GC safe point, // we will always insert a GC Poll for scenarios involving a suppressed GC - // transition. Only insert the GC Poll on the first morph. + // transition. Only mark the block for GC Poll insertion on the first morph. if (fgGlobalMorph && call->IsUnmanaged() && call->IsSuppressGCTransition()) { - // Insert a GC poll. - bool insertedBB = fgCreateGCPoll(GCPOLL_CALL, compCurBB, compCurStmt); - assert(!insertedBB); // No new block should be inserted + compCurBB->bbFlags |= (BBF_HAS_SUPPRESSGC_CALL | BBF_GC_SAFE_POINT); + optMethodFlags |= OMF_NEEDS_GCPOLLS; } // Morph Type.op_Equality, Type.op_Inequality, and Enum.HasFlag @@ -10336,6 +10363,16 @@ GenTree* Compiler::fgMorphCopyBlock(GenTree* tree) } #endif // FEATURE_MULTIREG_RET + if (src->IsCall() && dest->OperIs(GT_LCL_VAR) && !compDoOldStructRetyping()) + { + LclVarDsc* varDsc = lvaGetDesc(dest->AsLclVar()); + if (varTypeIsStruct(varDsc) && varDsc->CanBeReplacedWithItsField(this)) + { + JITDUMP(" not morphing a single reg call return\n"); + return tree; + } + } + // If we have an array index on the lhs, we need to create an obj node. dest = fgMorphBlkNode(dest, true); @@ -11667,7 +11704,7 @@ GenTree* Compiler::fgMorphSmpOp(GenTree* tree, MorphAddrContext* mac) // Replace "val / dcon" with "val * (1.0 / dcon)" if dcon is a power of two. // Powers of two within range are always exactly represented, // so multiplication by the reciprocal is safe in this scenario - if (op2->IsCnsFltOrDbl()) + if (fgGlobalMorph && op2->IsCnsFltOrDbl()) { double divisor = op2->AsDblCon()->gtDconVal; if (((typ == TYP_DOUBLE) && FloatingPointUtils::hasPreciseReciprocal(divisor)) || @@ -11811,6 +11848,8 @@ GenTree* Compiler::fgMorphSmpOp(GenTree* tree, MorphAddrContext* mac) { tree = gtFoldExpr(tree); } + + tree->AsOp()->CheckDivideByConstOptimized(this); return tree; } } @@ -11969,28 +12008,43 @@ GenTree* Compiler::fgMorphSmpOp(GenTree* tree, MorphAddrContext* mac) return tree; } - if (varTypeIsStruct(tree) && op1->OperIs(GT_OBJ, GT_BLK)) + if (!compDoOldStructRetyping() && !tree->TypeIs(TYP_VOID)) { - assert(!compDoOldStructRetyping()); - GenTree* addr = op1->AsBlk()->Addr(); - // if we return `OBJ` or `BLK` from a local var, lcl var has to have a stack address. - if (addr->OperIs(GT_ADDR) && addr->gtGetOp1()->OperIs(GT_LCL_VAR)) + if (op1->OperIs(GT_OBJ, GT_BLK, GT_IND)) { - GenTreeLclVar* lclVar = addr->gtGetOp1()->AsLclVar(); - assert(!gtIsActiveCSE_Candidate(addr) && !gtIsActiveCSE_Candidate(op1)); - if (gtGetStructHandle(tree) == gtGetStructHandleIfPresent(lclVar)) - { - // Fold *(&x). - tree->AsUnOp()->gtOp1 = op1; - DEBUG_DESTROY_NODE(op1); - DEBUG_DESTROY_NODE(addr); - op1 = lclVar; - } - else + op1 = fgMorphRetInd(tree->AsUnOp()); + } + if (op1->OperIs(GT_LCL_VAR)) + { + // With a `genReturnBB` this `RETURN(src)` tree will be replaced by a `ASG(genReturnLocal, src)` + // and `ASG` will be tranformed into field by field copy without parent local referencing if + // possible. + GenTreeLclVar* lclVar = op1->AsLclVar(); + unsigned lclNum = lclVar->GetLclNum(); + if ((genReturnLocal == BAD_VAR_NUM) || (genReturnLocal == lclNum)) { - // TODO-1stClassStructs: It is not address-taken or block operation, - // but the current IR doesn't allow to express that cast without stack, see #11413. - lvaSetVarDoNotEnregister(lclVar->GetLclNum() DEBUGARG(DNER_BlockOp)); + LclVarDsc* varDsc = lvaGetDesc(lclVar); + if (varDsc->CanBeReplacedWithItsField(this)) + { + // We can replace the struct with its only field and allow copy propogation to replace + // return value that was written as a field. + unsigned fieldLclNum = varDsc->lvFieldLclStart; + LclVarDsc* fieldDsc = lvaGetDesc(fieldLclNum); + + if (!varTypeIsSmallInt(fieldDsc->lvType)) + { + // TODO-CQ: support that substitution for small types without creating `CAST` node. + // When a small struct is returned in a register higher bits could be left in undefined + // state. + JITDUMP("Replacing an independently promoted local var V%02u with its only field " + "V%02u for " + "the return [%06u]\n", + lclVar->GetLclNum(), fieldLclNum, dspTreeID(tree)); + lclVar->SetLclNum(fieldLclNum); + var_types fieldType = fieldDsc->lvType; + lclVar->ChangeType(fieldDsc->lvType); + } + } } } } @@ -13159,12 +13213,18 @@ GenTree* Compiler::fgMorphSmpOp(GenTree* tree, MorphAddrContext* mac) { if (op2->AsDblCon()->gtDconVal == 2.0) { - // Fold "x*2.0" to "x+x" - op2 = op1->OperIsLeaf() ? gtCloneExpr(op1) : fgMakeMultiUse(&tree->AsOp()->gtOp1); - op1 = tree->AsOp()->gtOp1; - oper = GT_ADD; - tree = gtNewOperNode(oper, tree->TypeGet(), op1, op2); - INDEBUG(tree->gtDebugFlags |= GTF_DEBUG_NODE_MORPHED); + bool needsComma = !op1->OperIsLeaf() && !op1->IsLocal(); + // if op1 is not a leaf/local we have to introduce a temp via GT_COMMA. + // Unfortunately, it's not optHoistLoopCode-friendly yet so let's do it later. + if (!needsComma || (fgOrder == FGOrderLinear)) + { + // Fold "x*2.0" to "x+x" + op2 = fgMakeMultiUse(&tree->AsOp()->gtOp1); + op1 = tree->AsOp()->gtOp1; + oper = GT_ADD; + tree = gtNewOperNode(oper, tree->TypeGet(), op1, op2); + INDEBUG(tree->gtDebugFlags |= GTF_DEBUG_NODE_MORPHED); + } } else if (op2->AsDblCon()->gtDconVal == 1.0) { @@ -14213,6 +14273,87 @@ GenTree* Compiler::fgMorphSmpOp(GenTree* tree, MorphAddrContext* mac) return tree; } + +//---------------------------------------------------------------------------------------------- +// fgMorphRetInd: Try to get rid of extra IND(ADDR()) pairs in a return tree. +// +// Arguments: +// node - The return node that uses an indirection. +// +// Return Value: +// the original op1 of the ret if there was no optimization or an optimized new op1. +// +GenTree* Compiler::fgMorphRetInd(GenTreeUnOp* ret) +{ + assert(!compDoOldStructRetyping()); + assert(ret->OperIs(GT_RETURN)); + assert(ret->gtGetOp1()->OperIs(GT_IND, GT_BLK, GT_OBJ)); + GenTreeIndir* ind = ret->gtGetOp1()->AsIndir(); + GenTree* addr = ind->Addr(); + + if (addr->OperIs(GT_ADDR) && addr->gtGetOp1()->OperIs(GT_LCL_VAR)) + { + // If `return` retypes LCL_VAR as a smaller struct it should not set `doNotEnregister` on that + // LclVar. + // Example: in `Vector128:AsVector2` we have RETURN SIMD8(OBJ SIMD8(ADDR byref(LCL_VAR SIMD16))). + GenTreeLclVar* lclVar = addr->gtGetOp1()->AsLclVar(); + if (!lvaIsImplicitByRefLocal(lclVar->GetLclNum())) + { + assert(!gtIsActiveCSE_Candidate(addr) && !gtIsActiveCSE_Candidate(ind)); + unsigned indSize; + if (ind->OperIs(GT_IND)) + { + indSize = genTypeSize(ind); + } + else + { + indSize = ind->AsBlk()->GetLayout()->GetSize(); + } + + LclVarDsc* varDsc = lvaGetDesc(lclVar); + + unsigned lclVarSize; + if (!lclVar->TypeIs(TYP_STRUCT)) + + { + lclVarSize = genTypeSize(varDsc->TypeGet()); + } + else + { + lclVarSize = varDsc->lvExactSize; + } + // TODO: change conditions in `canFold` to `indSize <= lclVarSize`, but currently do not support `BITCAST + // int<-SIMD16` etc. + assert((indSize <= lclVarSize) || varDsc->lvDoNotEnregister); + +#if defined(TARGET_64BIT) + bool canFold = (indSize == lclVarSize); +#else // !TARGET_64BIT + // TODO: improve 32 bit targets handling for LONG returns if necessary, nowadays we do not support `BITCAST + // long<->double` there. + bool canFold = (indSize == lclVarSize) && (lclVarSize <= REGSIZE_BYTES); +#endif + // TODO: support `genReturnBB != nullptr`, it requires #11413 to avoid `Incompatible types for + // gtNewTempAssign`. + if (canFold && (genReturnBB == nullptr)) + { + // Fold (TYPE1)*(&(TYPE2)x) even if types do not match, lowering will handle it. + // Getting rid of this IND(ADDR()) pair allows to keep lclVar as not address taken + // and enregister it. + DEBUG_DESTROY_NODE(ind); + DEBUG_DESTROY_NODE(addr); + ret->gtOp1 = lclVar; + return ret->gtGetOp1(); + } + else if (!varDsc->lvDoNotEnregister) + { + lvaSetVarDoNotEnregister(lclVar->GetLclNum() DEBUGARG(Compiler::DNER_BlockOp)); + } + } + } + return ind; +} + #ifdef _PREFAST_ #pragma warning(pop) #endif @@ -14417,7 +14558,11 @@ GenTree* Compiler::fgMorphSmpOpOptional(GenTreeOp* tree) DEBUG_DESTROY_NODE(tree); return op1; } + break; + case GT_UDIV: + case GT_UMOD: + tree->CheckDivideByConstOptimized(this); break; case GT_LSH: @@ -14570,6 +14715,8 @@ GenTree* Compiler::fgMorphModToSubMulDiv(GenTreeOp* tree) sub->gtDebugFlags |= GTF_DEBUG_NODE_MORPHED; #endif + tree->CheckDivideByConstOptimized(this); + return sub; } @@ -16311,6 +16458,17 @@ void Compiler::fgMorphBlocks() fgGlobalMorph = false; compCurBB = nullptr; + // Under OSR, we no longer need to specially protect the original method entry + // + if (opts.IsOSR() && (fgEntryBB != nullptr) && (fgEntryBB->bbFlags & BBF_IMPORTED)) + { + JITDUMP("OSR: un-protecting original method entry " FMT_BB "\n", fgEntryBB->bbNum); + assert(fgEntryBB->bbRefs > 0); + fgEntryBB->bbRefs--; + // We don't need to remember this block anymore. + fgEntryBB = nullptr; + } + #ifdef DEBUG if (verboseTrees) { @@ -16589,18 +16747,18 @@ GenTree* Compiler::fgInitThisClass() switch (kind.runtimeLookupKind) { case CORINFO_LOOKUP_THISOBJ: + { // This code takes a this pointer; but we need to pass the static method desc to get the right point in // the hierarchy - { - GenTree* vtTree = gtNewLclvNode(info.compThisArg, TYP_REF); - vtTree->gtFlags |= GTF_VAR_CONTEXT; - // Vtable pointer of this object - vtTree = gtNewOperNode(GT_IND, TYP_I_IMPL, vtTree); - vtTree->gtFlags |= GTF_EXCEPT; // Null-pointer exception - GenTree* methodHnd = gtNewIconEmbMethHndNode(info.compMethodHnd); + GenTree* vtTree = gtNewLclvNode(info.compThisArg, TYP_REF); + vtTree->gtFlags |= GTF_VAR_CONTEXT; + // Vtable pointer of this object + vtTree = gtNewOperNode(GT_IND, TYP_I_IMPL, vtTree); + vtTree->gtFlags |= GTF_EXCEPT; // Null-pointer exception + GenTree* methodHnd = gtNewIconEmbMethHndNode(info.compMethodHnd); - return gtNewHelperCallNode(CORINFO_HELP_INITINSTCLASS, TYP_VOID, gtNewCallArgs(vtTree, methodHnd)); - } + return gtNewHelperCallNode(CORINFO_HELP_INITINSTCLASS, TYP_VOID, gtNewCallArgs(vtTree, methodHnd)); + } case CORINFO_LOOKUP_CLASSPARAM: { @@ -16616,11 +16774,12 @@ GenTree* Compiler::fgInitThisClass() return gtNewHelperCallNode(CORINFO_HELP_INITINSTCLASS, TYP_VOID, gtNewCallArgs(gtNewIconNode(0), methHndTree)); } + + default: + noway_assert(!"Unknown LOOKUP_KIND"); + UNREACHABLE(); } } - - noway_assert(!"Unknown LOOKUP_KIND"); - UNREACHABLE(); } #ifdef DEBUG diff --git a/src/coreclr/src/jit/namedintrinsiclist.h b/src/coreclr/src/jit/namedintrinsiclist.h index c9a87d782a62..63d79fbeff19 100644 --- a/src/coreclr/src/jit/namedintrinsiclist.h +++ b/src/coreclr/src/jit/namedintrinsiclist.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _NAMEDINTRINSICLIST_H_ #define _NAMEDINTRINSICLIST_H_ diff --git a/src/coreclr/src/jit/objectalloc.cpp b/src/coreclr/src/jit/objectalloc.cpp index 7be52493cd21..39c22e63a811 100644 --- a/src/coreclr/src/jit/objectalloc.cpp +++ b/src/coreclr/src/jit/objectalloc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/src/coreclr/src/jit/objectalloc.h b/src/coreclr/src/jit/objectalloc.h index 2d00c9db2a9c..7a03320b46ea 100644 --- a/src/coreclr/src/jit/objectalloc.h +++ b/src/coreclr/src/jit/objectalloc.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/src/coreclr/src/jit/opcode.h b/src/coreclr/src/jit/opcode.h index 87741e97d9be..bedf8b0c40dc 100644 --- a/src/coreclr/src/jit/opcode.h +++ b/src/coreclr/src/jit/opcode.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/src/coreclr/src/jit/optcse.cpp b/src/coreclr/src/jit/optcse.cpp index ddf7d8af1d6a..46e834df0dc4 100644 --- a/src/coreclr/src/jit/optcse.cpp +++ b/src/coreclr/src/jit/optcse.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -2638,17 +2637,15 @@ class CSE_Heuristic // If all occurances were in GT_IND nodes it could still be NO_CLASS_HANDLE // CORINFO_CLASS_HANDLE structHnd = successfulCandidate->CseDsc()->csdStructHnd; - assert((structHnd != NO_CLASS_HANDLE) || (cseLclVarTyp != TYP_STRUCT)); - if (structHnd != NO_CLASS_HANDLE) - { - m_pCompiler->lvaSetStruct(cseLclVarNum, structHnd, false); - } -#ifdef FEATURE_SIMD - else if (varTypeIsSIMD(cseLclVarTyp)) + if (structHnd == NO_CLASS_HANDLE) { - m_pCompiler->lvaGetDesc(cseLclVarNum)->lvSIMDType = true; + assert(varTypeIsSIMD(cseLclVarTyp)); + // We are not setting it for `SIMD* indir` during the first path + // because it is not precise, see `optValnumCSE_Index`. + structHnd = m_pCompiler->gtGetStructHandle(successfulCandidate->CseDsc()->csdTree); } -#endif // FEATURE_SIMD + assert(structHnd != NO_CLASS_HANDLE); + m_pCompiler->lvaSetStruct(cseLclVarNum, structHnd, false); } m_pCompiler->lvaTable[cseLclVarNum].lvType = cseLclVarTyp; m_pCompiler->lvaTable[cseLclVarNum].lvIsCSE = true; @@ -3214,9 +3211,9 @@ bool Compiler::optIsCSEcandidate(GenTree* tree) return false; } - // If this is a struct type, we can only consider it for CSE-ing if we can get at - // its handle, so that we can create a temp. - if ((type == TYP_STRUCT) && (gtGetStructHandleIfPresent(tree) == NO_CLASS_HANDLE)) + // If this is a struct type (including SIMD*), we can only consider it for CSE-ing + // if we can get its handle, so that we can create a temp. + if (varTypeIsStruct(type) && (gtGetStructHandleIfPresent(tree) == NO_CLASS_HANDLE)) { return false; } diff --git a/src/coreclr/src/jit/optimizer.cpp b/src/coreclr/src/jit/optimizer.cpp index 3e36d7ab4dee..d953ecd92aed 100644 --- a/src/coreclr/src/jit/optimizer.cpp +++ b/src/coreclr/src/jit/optimizer.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -2318,8 +2317,8 @@ class LoopSearch } // Make sure we don't leave around a goto-next unless it's marked KEEP_BBJ_ALWAYS. - assert((block->bbJumpKind != BBJ_COND) || (block->bbJumpKind != BBJ_ALWAYS) || (block->bbJumpDest != newNext) || - ((block->bbFlags & BBF_KEEP_BBJ_ALWAYS) != 0)); + assert(((block->bbJumpKind != BBJ_COND) && (block->bbJumpKind != BBJ_ALWAYS)) || + (block->bbJumpDest != newNext) || ((block->bbFlags & BBF_KEEP_BBJ_ALWAYS) != 0)); return newBlock; } @@ -4266,6 +4265,11 @@ void Compiler::fgOptWhileLoop(BasicBlock* block) copyOfCondStmt->SetCompilerAdded(); + if (condTree->gtFlags & GTF_CALL) + { + block->bbFlags |= BBF_HAS_CALL; // Record that the block has a call + } + if (opts.compDbgInfo) { copyOfCondStmt->SetILOffsetX(condStmt->GetILOffsetX()); @@ -6199,6 +6203,10 @@ void Compiler::optPerformHoistExpr(GenTree* origExpr, unsigned lnum) // Create a copy of the expression and mark it for CSE's. GenTree* hoistExpr = gtCloneExpr(origExpr, GTF_MAKE_CSE); + // The hoist Expr does not have to computed into a specific register, + // so clear the RegNum if it was set in the original expression + hoistExpr->ClearRegNum(); + // At this point we should have a cloned expression, marked with the GTF_MAKE_CSE flag assert(hoistExpr != origExpr); assert(hoistExpr->gtFlags & GTF_MAKE_CSE); @@ -7369,6 +7377,12 @@ void Compiler::fgCreateLoopPreHeader(unsigned lnum) preHead->inheritWeight(head); preHead->bbFlags &= ~BBF_PROF_WEIGHT; + // Copy the bbReach set from head for the new preHead block + preHead->bbReach = BlockSetOps::MakeEmpty(this); + BlockSetOps::Assign(this, preHead->bbReach, head->bbReach); + // Also include 'head' in the preHead bbReach set + BlockSetOps::AddElemD(this, preHead->bbReach, head->bbNum); + #ifdef DEBUG if (verbose) { @@ -9235,12 +9249,15 @@ void Compiler::optRemoveRedundantZeroInits() block = block->GetUniqueSucc()) { block->bbFlags |= BBF_MARKED; + CompAllocator allocator(getAllocator(CMK_ZeroInit)); + LclVarRefCounts defsInBlock(allocator); + bool removedTrackedDefs = false; for (Statement* stmt = block->FirstNonPhiDef(); stmt != nullptr;) { Statement* next = stmt->GetNextStmt(); for (GenTree* tree = stmt->GetTreeList(); tree != nullptr; tree = tree->gtNext) { - if (((tree->gtFlags & GTF_CALL) != 0) && (!tree->IsCall() || !tree->AsCall()->IsSuppressGCTransition())) + if (((tree->gtFlags & GTF_CALL) != 0)) { hasGCSafePoint = true; } @@ -9268,17 +9285,75 @@ void Compiler::optRemoveRedundantZeroInits() refCounts.Set(lclNum, 1); } + if ((tree->gtFlags & GTF_VAR_DEF) == 0) + { + break; + } + + // We need to count the number of tracked var defs in the block + // so that we can update block->bbVarDef if we remove any tracked var defs. + + LclVarDsc* const lclDsc = lvaGetDesc(lclNum); + if (lclDsc->lvTracked) + { + unsigned* pDefsCount = defsInBlock.LookupPointer(lclNum); + if (pDefsCount != nullptr) + { + *pDefsCount = (*pDefsCount) + 1; + } + else + { + defsInBlock.Set(lclNum, 1); + } + } + else if (varTypeIsStruct(lclDsc) && ((tree->gtFlags & GTF_VAR_USEASG) == 0) && + lvaGetPromotionType(lclDsc) != PROMOTION_TYPE_NONE) + { + for (unsigned i = lclDsc->lvFieldLclStart; i < lclDsc->lvFieldLclStart + lclDsc->lvFieldCnt; + ++i) + { + if (lvaGetDesc(i)->lvTracked) + { + unsigned* pDefsCount = defsInBlock.LookupPointer(i); + if (pDefsCount != nullptr) + { + *pDefsCount = (*pDefsCount) + 1; + } + else + { + defsInBlock.Set(i, 1); + } + } + } + } + break; } case GT_ASG: { GenTreeOp* treeOp = tree->AsOp(); - if (!treeOp->gtOp1->OperIs(GT_LCL_VAR, GT_LCL_FLD)) + + unsigned lclNum = BAD_VAR_NUM; + + if (treeOp->gtOp1->OperIs(GT_LCL_VAR, GT_LCL_FLD)) + { + lclNum = treeOp->gtOp1->AsLclVarCommon()->GetLclNum(); + } + else if (treeOp->gtOp1->OperIs(GT_OBJ, GT_BLK)) + { + GenTreeLclVarCommon* lcl = treeOp->gtOp1->gtGetOp1()->IsLocalAddrExpr(); + + if (lcl != nullptr) + { + lclNum = lcl->GetLclNum(); + } + } + + if (lclNum == BAD_VAR_NUM) { break; } - unsigned lclNum = treeOp->gtOp1->AsLclVarCommon()->GetLclNum(); LclVarDsc* const lclDsc = lvaGetDesc(lclNum); unsigned* pRefCount = refCounts.LookupPointer(lclNum); @@ -9317,26 +9392,29 @@ void Compiler::optRemoveRedundantZeroInits() if (treeOp->gtOp2->IsIntegralConst(0)) { - if (!lclDsc->lvTracked) - { - bool bbInALoop = (block->bbFlags & BBF_BACKWARD_JUMP) != 0; - bool bbIsReturn = block->bbJumpKind == BBJ_RETURN; + bool bbInALoop = (block->bbFlags & BBF_BACKWARD_JUMP) != 0; + bool bbIsReturn = block->bbJumpKind == BBJ_RETURN; - if (BitVecOps::IsMember(&bitVecTraits, zeroInitLocals, lclNum) || - (lclDsc->lvIsStructField && - BitVecOps::IsMember(&bitVecTraits, zeroInitLocals, lclDsc->lvParentLcl)) || - !fgVarNeedsExplicitZeroInit(lclNum, bbInALoop, bbIsReturn)) + if (BitVecOps::IsMember(&bitVecTraits, zeroInitLocals, lclNum) || + (lclDsc->lvIsStructField && + BitVecOps::IsMember(&bitVecTraits, zeroInitLocals, lclDsc->lvParentLcl)) || + (!lclDsc->lvTracked && !fgVarNeedsExplicitZeroInit(lclNum, bbInALoop, bbIsReturn))) + { + // We are guaranteed to have a zero initialization in the prolog or a + // dominating explicit zero initialization and the local hasn't been redefined + // between the prolog and this explicit zero initialization so the assignment + // can be safely removed. + if (tree == stmt->GetRootNode()) { - // We are guaranteed to have a zero initialization in the prolog or a - // dominating explicit zero initialization and the local hasn't been redefined - // between the prolog and this explicit zero initialization so the assignment - // can be safely removed. - if (tree == stmt->GetRootNode()) + fgRemoveStmt(block, stmt); + removedExplicitZeroInit = true; + lclDsc->lvSuppressedZeroInit = 1; + + if (lclDsc->lvTracked) { - fgRemoveStmt(block, stmt); - removedExplicitZeroInit = true; - lclDsc->lvSuppressedZeroInit = 1; - lclDsc->setLvRefCnt(lclDsc->lvRefCnt() - 1); + removedTrackedDefs = true; + unsigned* pDefsCount = defsInBlock.LookupPointer(lclNum); + *pDefsCount = (*pDefsCount) - 1; } } } @@ -9370,6 +9448,20 @@ void Compiler::optRemoveRedundantZeroInits() } stmt = next; } + + if (removedTrackedDefs) + { + LclVarRefCounts::KeyIterator iter(defsInBlock.Begin()); + LclVarRefCounts::KeyIterator end(defsInBlock.End()); + for (; !iter.Equal(end); iter++) + { + unsigned int lclNum = iter.Get(); + if (defsInBlock[lclNum] == 0) + { + VarSetOps::RemoveElemD(this, block->bbVarDef, lvaGetDesc(lclNum)->lvVarIndex); + } + } + } } for (BasicBlock* block = fgFirstBB; (block != nullptr) && ((block->bbFlags & BBF_MARKED) != 0); diff --git a/src/coreclr/src/jit/patchpoint.cpp b/src/coreclr/src/jit/patchpoint.cpp index f19d2a862f19..e5a2981abd02 100644 --- a/src/coreclr/src/jit/patchpoint.cpp +++ b/src/coreclr/src/jit/patchpoint.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "jitpch.h" #ifdef _MSC_VER diff --git a/src/coreclr/src/jit/phase.cpp b/src/coreclr/src/jit/phase.cpp index 996aa13cef2b..f1fd245ae1b9 100644 --- a/src/coreclr/src/jit/phase.cpp +++ b/src/coreclr/src/jit/phase.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "jitpch.h" #ifdef _MSC_VER @@ -75,7 +74,7 @@ void Phase::PrePhase() // To help in the incremental conversion of jit activity to phases // without greatly increasing dump size or checked jit time, we - // currently whitelist the phases that do pre-phase checks and + // currently allow the phases that do pre-phase checks and // dumps via the phase object, and not via explicit calls from // the various methods in the phase. // @@ -85,12 +84,12 @@ void Phase::PrePhase() // // Currently the list is just the set of phases that have custom // derivations from the Phase class. - static Phases s_whitelist[] = {PHASE_BUILD_SSA, PHASE_RATIONALIZE, PHASE_LOWERING, PHASE_STACK_LEVEL_SETTER}; + static Phases s_allowlist[] = {PHASE_BUILD_SSA, PHASE_RATIONALIZE, PHASE_LOWERING, PHASE_STACK_LEVEL_SETTER}; bool doPrePhase = false; - for (size_t i = 0; i < sizeof(s_whitelist) / sizeof(Phases); i++) + for (size_t i = 0; i < sizeof(s_allowlist) / sizeof(Phases); i++) { - if (m_phase == s_whitelist[i]) + if (m_phase == s_allowlist[i]) { doPrePhase = true; break; @@ -146,7 +145,7 @@ void Phase::PostPhase(PhaseStatus status) // To help in the incremental conversion of jit activity to phases // without greatly increasing dump size or checked jit time, we - // currently whitelist the phases that do post-phase checks and + // currently allow the phases that do post-phase checks and // dumps via the phase object, and not via explicit calls from // the various methods in the phase. // @@ -158,7 +157,7 @@ void Phase::PostPhase(PhaseStatus status) // well as the new-style phases that have been updated to return // PhaseStatus from their DoPhase methods. // - static Phases s_whitelist[] = {PHASE_IMPORTATION, + static Phases s_allowlist[] = {PHASE_IMPORTATION, PHASE_INDXCALL, PHASE_MORPH_INLINE, PHASE_ALLOCATE_OBJECTS, @@ -175,9 +174,9 @@ void Phase::PostPhase(PhaseStatus status) if (madeChanges) { - for (size_t i = 0; i < sizeof(s_whitelist) / sizeof(Phases); i++) + for (size_t i = 0; i < sizeof(s_allowlist) / sizeof(Phases); i++) { - if (m_phase == s_whitelist[i]) + if (m_phase == s_allowlist[i]) { doPostPhase = true; break; diff --git a/src/coreclr/src/jit/phase.h b/src/coreclr/src/jit/phase.h index 8f4c0f2de5ad..6288d596729d 100644 --- a/src/coreclr/src/jit/phase.h +++ b/src/coreclr/src/jit/phase.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*****************************************************************************/ #ifndef _PHASE_H_ diff --git a/src/coreclr/src/jit/protojit/protojit.def b/src/coreclr/src/jit/protojit/protojit.def index e229be40aaab..0afb54dca77d 100644 --- a/src/coreclr/src/jit/protojit/protojit.def +++ b/src/coreclr/src/jit/protojit/protojit.def @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. EXPORTS getJit jitStartup diff --git a/src/coreclr/src/jit/protononjit/protononjit.def b/src/coreclr/src/jit/protononjit/protononjit.def index e229be40aaab..0afb54dca77d 100644 --- a/src/coreclr/src/jit/protononjit/protononjit.def +++ b/src/coreclr/src/jit/protononjit/protononjit.def @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. EXPORTS getJit jitStartup diff --git a/src/coreclr/src/jit/rangecheck.cpp b/src/coreclr/src/jit/rangecheck.cpp index c4fcc85b07b4..66ebafb1c747 100644 --- a/src/coreclr/src/jit/rangecheck.cpp +++ b/src/coreclr/src/jit/rangecheck.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // @@ -444,7 +443,12 @@ LclSsaVarDsc* RangeCheck::GetSsaDefAsg(GenTreeLclVarCommon* lclUse) return nullptr; } - LclSsaVarDsc* ssaDef = m_pCompiler->lvaGetDesc(lclUse)->GetPerSsaData(ssaNum); + LclVarDsc* varDsc = m_pCompiler->lvaGetDesc(lclUse); + if (varDsc->CanBeReplacedWithItsField(m_pCompiler)) + { + varDsc = m_pCompiler->lvaGetDesc(varDsc->lvFieldLclStart); + } + LclSsaVarDsc* ssaDef = varDsc->GetPerSsaData(ssaNum); // RangeCheck does not care about uninitialized variables. if (ssaDef->GetAssignment() == nullptr) @@ -461,6 +465,7 @@ LclSsaVarDsc* RangeCheck::GetSsaDefAsg(GenTreeLclVarCommon* lclUse) #ifdef DEBUG Location* loc = GetDef(lclUse); + assert(loc != nullptr); assert(loc->parent == ssaDef->GetAssignment()); assert(loc->block == ssaDef->GetBlock()); #endif @@ -471,6 +476,11 @@ LclSsaVarDsc* RangeCheck::GetSsaDefAsg(GenTreeLclVarCommon* lclUse) #ifdef DEBUG UINT64 RangeCheck::HashCode(unsigned lclNum, unsigned ssaNum) { + LclVarDsc* varDsc = m_pCompiler->lvaGetDesc(lclNum); + if (varDsc->CanBeReplacedWithItsField(m_pCompiler)) + { + lclNum = varDsc->lvFieldLclStart; + } assert(ssaNum != SsaConfig::RESERVED_SSA_NUM); return UINT64(lclNum) << 32 | ssaNum; } @@ -498,7 +508,8 @@ RangeCheck::Location* RangeCheck::GetDef(unsigned lclNum, unsigned ssaNum) RangeCheck::Location* RangeCheck::GetDef(GenTreeLclVarCommon* lcl) { - return GetDef(lcl->GetLclNum(), lcl->GetSsaNum()); + unsigned lclNum = lcl->GetLclNum(); + return GetDef(lclNum, lcl->GetSsaNum()); } // Add the def location to the hash table. @@ -545,7 +556,12 @@ void RangeCheck::MergeEdgeAssertions(GenTreeLclVarCommon* lcl, ASSERT_VALARG_TP Limit limit(Limit::keUndef); genTreeOps cmpOper = GT_NONE; - LclSsaVarDsc* ssaData = m_pCompiler->lvaTable[lcl->GetLclNum()].GetPerSsaData(lcl->GetSsaNum()); + LclVarDsc* varDsc = m_pCompiler->lvaGetDesc(lcl); + if (varDsc->CanBeReplacedWithItsField(m_pCompiler)) + { + varDsc = m_pCompiler->lvaGetDesc(varDsc->lvFieldLclStart); + } + LclSsaVarDsc* ssaData = varDsc->GetPerSsaData(lcl->GetSsaNum()); ValueNum normalLclVN = m_pCompiler->vnStore->VNConservativeNormalValue(ssaData->m_vnPair); // Current assertion is of the form (i < len - cns) != 0 diff --git a/src/coreclr/src/jit/rangecheck.h b/src/coreclr/src/jit/rangecheck.h index 136d0f3185f9..754f64cbc2ea 100644 --- a/src/coreclr/src/jit/rangecheck.h +++ b/src/coreclr/src/jit/rangecheck.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/jit/rationalize.cpp b/src/coreclr/src/jit/rationalize.cpp index b8f8595b43e0..b878a30beeae 100644 --- a/src/coreclr/src/jit/rationalize.cpp +++ b/src/coreclr/src/jit/rationalize.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "jitpch.h" #ifdef _MSC_VER @@ -44,6 +43,72 @@ void copyFlags(GenTree* dst, GenTree* src, unsigned mask) dst->gtFlags |= (src->gtFlags & mask); } +// RewriteIndir: Rewrite an indirection and clear the flags that should not be set after rationalize. +// +// Arguments: +// use - A use of an indirection node. +// +void Rationalizer::RewriteIndir(LIR::Use& use) +{ + GenTreeIndir* indir = use.Def()->AsIndir(); + assert(indir->OperIs(GT_IND, GT_BLK, GT_OBJ)); + + // Clear the `GTF_IND_ASG_LHS` flag, which overlaps with `GTF_IND_REQ_ADDR_IN_REG`. + indir->gtFlags &= ~GTF_IND_ASG_LHS; + + if (indir->OperIs(GT_IND)) + { + if (varTypeIsSIMD(indir)) + { + RewriteSIMDIndir(use); + } + else + { + // Due to promotion of structs containing fields of type struct with a + // single scalar type field, we could potentially see IR nodes of the + // form GT_IND(GT_ADD(lclvarAddr, 0)) where 0 is an offset representing + // a field-seq. These get folded here. + // + // TODO: This code can be removed once JIT implements recursive struct + // promotion instead of lying about the type of struct field as the type + // of its single scalar field. + GenTree* addr = indir->Addr(); + if (addr->OperGet() == GT_ADD && addr->gtGetOp1()->OperGet() == GT_LCL_VAR_ADDR && + addr->gtGetOp2()->IsIntegralConst(0)) + { + GenTreeLclVarCommon* lclVarNode = addr->gtGetOp1()->AsLclVarCommon(); + unsigned lclNum = lclVarNode->GetLclNum(); + LclVarDsc* varDsc = comp->lvaTable + lclNum; + if (indir->TypeGet() == varDsc->TypeGet()) + { + JITDUMP("Rewriting GT_IND(GT_ADD(LCL_VAR_ADDR,0)) to LCL_VAR\n"); + lclVarNode->SetOper(GT_LCL_VAR); + lclVarNode->gtType = indir->TypeGet(); + use.ReplaceWith(comp, lclVarNode); + BlockRange().Remove(addr); + BlockRange().Remove(addr->gtGetOp2()); + BlockRange().Remove(indir); + } + } + } + } + else if (indir->OperIs(GT_OBJ)) + { + assert((indir->TypeGet() == TYP_STRUCT) || !use.User()->OperIsInitBlkOp()); + if (varTypeIsSIMD(indir->TypeGet())) + { + indir->SetOper(GT_IND); + RewriteSIMDIndir(use); + } + } + else + { + assert(indir->OperIs(GT_BLK)); + // We should only see GT_BLK for TYP_STRUCT or for InitBlocks. + assert((indir->TypeGet() == TYP_STRUCT) || use.User()->OperIsInitBlkOp()); + } +} + // RewriteSIMDIndir: Rewrite a SIMD indirection as a simple lclVar if possible. // // Arguments: @@ -557,42 +622,9 @@ Compiler::fgWalkResult Rationalizer::RewriteNode(GenTree** useEdge, Compiler::Ge break; case GT_IND: - // Clear the `GTF_IND_ASG_LHS` flag, which overlaps with `GTF_IND_REQ_ADDR_IN_REG`. - node->gtFlags &= ~GTF_IND_ASG_LHS; - - if (varTypeIsSIMD(node)) - { - RewriteSIMDIndir(use); - } - else - { - // Due to promotion of structs containing fields of type struct with a - // single scalar type field, we could potentially see IR nodes of the - // form GT_IND(GT_ADD(lclvarAddr, 0)) where 0 is an offset representing - // a field-seq. These get folded here. - // - // TODO: This code can be removed once JIT implements recursive struct - // promotion instead of lying about the type of struct field as the type - // of its single scalar field. - GenTree* addr = node->AsIndir()->Addr(); - if (addr->OperGet() == GT_ADD && addr->gtGetOp1()->OperGet() == GT_LCL_VAR_ADDR && - addr->gtGetOp2()->IsIntegralConst(0)) - { - GenTreeLclVarCommon* lclVarNode = addr->gtGetOp1()->AsLclVarCommon(); - unsigned lclNum = lclVarNode->GetLclNum(); - LclVarDsc* varDsc = comp->lvaTable + lclNum; - if (node->TypeGet() == varDsc->TypeGet()) - { - JITDUMP("Rewriting GT_IND(GT_ADD(LCL_VAR_ADDR,0)) to LCL_VAR\n"); - lclVarNode->SetOper(GT_LCL_VAR); - lclVarNode->gtType = node->TypeGet(); - use.ReplaceWith(comp, lclVarNode); - BlockRange().Remove(addr); - BlockRange().Remove(addr->gtGetOp2()); - BlockRange().Remove(node); - } - } - } + case GT_BLK: + case GT_OBJ: + RewriteIndir(use); break; case GT_NOP: @@ -697,20 +729,6 @@ Compiler::fgWalkResult Rationalizer::RewriteNode(GenTree** useEdge, Compiler::Ge assert(comp->IsTargetIntrinsic(node->AsIntrinsic()->gtIntrinsicId)); break; - case GT_BLK: - // We should only see GT_BLK for TYP_STRUCT or for InitBlocks. - assert((node->TypeGet() == TYP_STRUCT) || use.User()->OperIsInitBlkOp()); - break; - - case GT_OBJ: - assert((node->TypeGet() == TYP_STRUCT) || !use.User()->OperIsInitBlkOp()); - if (varTypeIsSIMD(node->TypeGet())) - { - node->SetOper(GT_IND); - RewriteSIMDIndir(use); - } - break; - #ifdef FEATURE_SIMD case GT_SIMD: { diff --git a/src/coreclr/src/jit/rationalize.h b/src/coreclr/src/jit/rationalize.h index de836a292999..e4c8872eb0cd 100644 --- a/src/coreclr/src/jit/rationalize.h +++ b/src/coreclr/src/jit/rationalize.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //=============================================================================== #include "phase.h" @@ -35,6 +34,8 @@ class Rationalizer final : public Phase return LIR::AsRange(m_block); } + void RewriteIndir(LIR::Use& use); + // SIMD related void RewriteSIMDIndir(LIR::Use& use); diff --git a/src/coreclr/src/jit/regalloc.cpp b/src/coreclr/src/jit/regalloc.cpp index 367eb81877f1..381edde88670 100644 --- a/src/coreclr/src/jit/regalloc.cpp +++ b/src/coreclr/src/jit/regalloc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/src/coreclr/src/jit/regalloc.h b/src/coreclr/src/jit/regalloc.h index 117e62f84c3d..7e6cb94c3e0c 100644 --- a/src/coreclr/src/jit/regalloc.h +++ b/src/coreclr/src/jit/regalloc.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef REGALLOC_H_ #define REGALLOC_H_ diff --git a/src/coreclr/src/jit/register.h b/src/coreclr/src/jit/register.h index f1fb9e2afba1..d06bef0cea1d 100644 --- a/src/coreclr/src/jit/register.h +++ b/src/coreclr/src/jit/register.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // clang-format off diff --git a/src/coreclr/src/jit/register_arg_convention.cpp b/src/coreclr/src/jit/register_arg_convention.cpp index 8bbce59cbb99..a90e61c3a59f 100644 --- a/src/coreclr/src/jit/register_arg_convention.cpp +++ b/src/coreclr/src/jit/register_arg_convention.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "jitpch.h" #ifdef _MSC_VER diff --git a/src/coreclr/src/jit/register_arg_convention.h b/src/coreclr/src/jit/register_arg_convention.h index 3fcce3706a3f..7b3199b03af7 100644 --- a/src/coreclr/src/jit/register_arg_convention.h +++ b/src/coreclr/src/jit/register_arg_convention.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __register_arg_convention__ #define __register_arg_convention__ diff --git a/src/coreclr/src/jit/registerarm.h b/src/coreclr/src/jit/registerarm.h index ecb15c003bf8..ad70eaa211cc 100644 --- a/src/coreclr/src/jit/registerarm.h +++ b/src/coreclr/src/jit/registerarm.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // clang-format off diff --git a/src/coreclr/src/jit/registerarm64.h b/src/coreclr/src/jit/registerarm64.h index b1c320150f6d..7ce66ada1beb 100644 --- a/src/coreclr/src/jit/registerarm64.h +++ b/src/coreclr/src/jit/registerarm64.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // clang-format off diff --git a/src/coreclr/src/jit/reglist.h b/src/coreclr/src/jit/reglist.h index 16239b81cd8e..794f2914454c 100644 --- a/src/coreclr/src/jit/reglist.h +++ b/src/coreclr/src/jit/reglist.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef REGLIST_H #define REGLIST_H diff --git a/src/coreclr/src/jit/regset.cpp b/src/coreclr/src/jit/regset.cpp index 0ebde49eadfb..1a7816d6ca25 100644 --- a/src/coreclr/src/jit/regset.cpp +++ b/src/coreclr/src/jit/regset.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/src/coreclr/src/jit/regset.h b/src/coreclr/src/jit/regset.h index a354c12bc589..4f966329fa1e 100644 --- a/src/coreclr/src/jit/regset.h +++ b/src/coreclr/src/jit/regset.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*****************************************************************************/ diff --git a/src/coreclr/src/jit/scopeinfo.cpp b/src/coreclr/src/jit/scopeinfo.cpp index 13afb64db3d7..5fc7bca119f4 100644 --- a/src/coreclr/src/jit/scopeinfo.cpp +++ b/src/coreclr/src/jit/scopeinfo.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/src/coreclr/src/jit/sideeffects.cpp b/src/coreclr/src/jit/sideeffects.cpp index 10fa5d5c49a5..0f75f8ff66f3 100644 --- a/src/coreclr/src/jit/sideeffects.cpp +++ b/src/coreclr/src/jit/sideeffects.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "jitpch.h" #ifdef _MSC_VER diff --git a/src/coreclr/src/jit/sideeffects.h b/src/coreclr/src/jit/sideeffects.h index e14b2925ed79..8e2fe1cd788b 100644 --- a/src/coreclr/src/jit/sideeffects.h +++ b/src/coreclr/src/jit/sideeffects.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _SIDEEFFECTS_H_ #define _SIDEEFFECTS_H_ diff --git a/src/coreclr/src/jit/simd.cpp b/src/coreclr/src/jit/simd.cpp index f3180cc12e21..985953407986 100644 --- a/src/coreclr/src/jit/simd.cpp +++ b/src/coreclr/src/jit/simd.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // SIMD Support @@ -1074,14 +1073,10 @@ const SIMDIntrinsicInfo* Compiler::getSIMDIntrinsicInfo(CORINFO_CLASS_HANDLE* in { case SIMDIntrinsicInit: case SIMDIntrinsicGetItem: - case SIMDIntrinsicAdd: case SIMDIntrinsicSub: - case SIMDIntrinsicMul: - case SIMDIntrinsicDiv: case SIMDIntrinsicEqual: case SIMDIntrinsicBitwiseAnd: case SIMDIntrinsicBitwiseOr: - case SIMDIntrinsicDotProduct: case SIMDIntrinsicCast: case SIMDIntrinsicConvertToSingle: case SIMDIntrinsicConvertToDouble: @@ -1822,7 +1817,9 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, unsigned argCount = 0; const SIMDIntrinsicInfo* intrinsicInfo = getSIMDIntrinsicInfo(&clsHnd, methodHnd, sig, (opcode == CEE_NEWOBJ), &argCount, &baseType, &size); - if (intrinsicInfo == nullptr || intrinsicInfo->id == SIMDIntrinsicInvalid) + + // Exit early if the intrinsic is invalid or unrecognized + if ((intrinsicInfo == nullptr) || (intrinsicInfo->id == SIMDIntrinsicInvalid)) { return nullptr; } @@ -1835,7 +1832,7 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, #error Unsupported platform #endif // !TARGET_XARCH && !TARGET_ARM64 - if (!compOpportunisticallyDependsOn(minimumIsa)) + if (!compOpportunisticallyDependsOn(minimumIsa) || !JitConfig.EnableHWIntrinsic()) { // The user disabled support for the baseline ISA so // don't emit any SIMD intrinsics as they all require @@ -1878,38 +1875,6 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, switch (simdIntrinsicID) { - case SIMDIntrinsicGetCount: - { - int length = getSIMDVectorLength(clsHnd); - GenTreeIntCon* intConstTree = new (this, GT_CNS_INT) GenTreeIntCon(TYP_INT, length); - retVal = intConstTree; - - intConstTree->gtFlags |= GTF_ICON_SIMD_COUNT; - } - break; - - case SIMDIntrinsicGetZero: - retVal = gtNewSIMDVectorZero(simdType, baseType, size); - break; - - case SIMDIntrinsicGetOne: - retVal = gtNewSIMDVectorOne(simdType, baseType, size); - break; - - case SIMDIntrinsicGetAllOnes: - { - // Equivalent to (Vector) new Vector(0xffffffff); - GenTree* initVal = gtNewIconNode(0xffffffff, TYP_INT); - simdTree = gtNewSIMDNode(simdType, initVal, nullptr, SIMDIntrinsicInit, TYP_INT, size); - if (baseType != TYP_INT) - { - // cast it to required baseType if different from TYP_INT - simdTree = gtNewSIMDNode(simdType, simdTree, nullptr, SIMDIntrinsicCast, baseType, size); - } - retVal = simdTree; - } - break; - case SIMDIntrinsicInit: case SIMDIntrinsicInitN: { @@ -2260,55 +2225,10 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, } break; - case SIMDIntrinsicAdd: case SIMDIntrinsicSub: - case SIMDIntrinsicMul: - case SIMDIntrinsicDiv: case SIMDIntrinsicBitwiseAnd: case SIMDIntrinsicBitwiseOr: { -#if defined(DEBUG) - // check for the cases where we don't support intrinsics. - // This check should be done before we make modifications to type stack. - // Note that this is more of a double safety check for robustness since - // we expect getSIMDIntrinsicInfo() to have filtered out intrinsics on - // unsupported base types. If getSIMdIntrinsicInfo() doesn't filter due - // to some bug, assert in chk/dbg will fire. - if (!varTypeIsFloating(baseType)) - { - if (simdIntrinsicID == SIMDIntrinsicMul) - { -#if defined(TARGET_XARCH) - if ((baseType != TYP_INT) && (baseType != TYP_SHORT)) - { - // TODO-CQ: implement mul on these integer vectors. - // Note that SSE2 has no direct support for these vectors. - assert(!"Mul not supported on long/ulong/uint/small int vectors\n"); - return nullptr; - } -#endif // TARGET_XARCH -#if defined(TARGET_ARM64) - if ((baseType == TYP_ULONG) && (baseType == TYP_LONG)) - { - // TODO-CQ: implement mul on these integer vectors. - // Note that ARM64 has no direct support for these vectors. - assert(!"Mul not supported on long/ulong vectors\n"); - return nullptr; - } -#endif // TARGET_ARM64 - } -#if defined(TARGET_XARCH) || defined(TARGET_ARM64) - // common to all integer type vectors - if (simdIntrinsicID == SIMDIntrinsicDiv) - { - // SSE2 doesn't support div on non-floating point vectors. - assert(!"Div not supported on integer type vectors\n"); - return nullptr; - } -#endif // defined(TARGET_XARCH) || defined(TARGET_ARM64) - } -#endif // DEBUG - // op1 is the first operand; if instance method, op1 is "this" arg // op2 is the second operand op2 = impSIMDPopStack(simdType); @@ -2360,31 +2280,6 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, } break; - case SIMDIntrinsicDotProduct: - { -#if defined(TARGET_XARCH) - // Right now dot product is supported only for float/double vectors and - // int vectors on SSE4/AVX. - if (!varTypeIsFloating(baseType) && !(baseType == TYP_INT && getSIMDSupportLevel() >= SIMD_SSE4_Supported)) - { - return nullptr; - } -#endif // TARGET_XARCH - - // op1 is a SIMD variable that is the first source and also "this" arg. - // op2 is a SIMD variable which is the second source. - op2 = impSIMDPopStack(simdType); - op1 = impSIMDPopStack(simdType, instMethod); - - simdTree = gtNewSIMDNode(baseType, op1, op2, simdIntrinsicID, baseType, size); - if (simdType == TYP_SIMD12) - { - simdTree->gtFlags |= GTF_SIMD12_OP; - } - retVal = simdTree; - } - break; - case SIMDIntrinsicGetW: retVal = impSIMDGetFixed(simdType, baseType, size, 3); break; diff --git a/src/coreclr/src/jit/simd.h b/src/coreclr/src/jit/simd.h index 70510dc317c5..07d70e20d503 100644 --- a/src/coreclr/src/jit/simd.h +++ b/src/coreclr/src/jit/simd.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _SIMD_H_ #define _SIMD_H_ diff --git a/src/coreclr/src/jit/simdashwintrinsic.cpp b/src/coreclr/src/jit/simdashwintrinsic.cpp index facb9c2a4baf..6e48db4d8212 100644 --- a/src/coreclr/src/jit/simdashwintrinsic.cpp +++ b/src/coreclr/src/jit/simdashwintrinsic.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "jitpch.h" #include "simdashwintrinsic.h" @@ -169,10 +168,8 @@ GenTree* Compiler::impSimdAsHWIntrinsic(NamedIntrinsic intrinsic, CORINFO_CLASS_HANDLE clsHnd, CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* sig, - bool mustExpand) + GenTree* newobjThis) { - assert(!mustExpand); - if (!featureSIMD) { // We can't support SIMD intrinsics if the JIT doesn't support the feature @@ -187,7 +184,7 @@ GenTree* Compiler::impSimdAsHWIntrinsic(NamedIntrinsic intrinsic, #error Unsupported platform #endif // !TARGET_XARCH && !TARGET_ARM64 - if (!compOpportunisticallyDependsOn(minimumIsa)) + if (!compOpportunisticallyDependsOn(minimumIsa) || !JitConfig.EnableHWIntrinsic()) { // The user disabled support for the baseline ISA so // don't emit any SIMD intrinsics as they all require @@ -207,6 +204,13 @@ GenTree* Compiler::impSimdAsHWIntrinsic(NamedIntrinsic intrinsic, // if it isn't the basis for anything carried on the node. baseType = getBaseTypeAndSizeOfSIMDType(clsHnd, &simdSize); + if ((clsHnd != m_simdHandleCache->SIMDVectorHandle) && !varTypeIsArithmetic(baseType)) + { + // We want to exit early if the clsHnd should have a base type and it isn't one + // of the supported types. This handles cases like op_Explicit which take a Vector + return nullptr; + } + if (retType == TYP_STRUCT) { baseType = getBaseTypeAndSizeOfSIMDType(sig->retTypeSigClass, &simdSize); @@ -267,7 +271,7 @@ GenTree* Compiler::impSimdAsHWIntrinsic(NamedIntrinsic intrinsic, if (hwIntrinsic == intrinsic) { // The SIMD intrinsic requires special handling outside the normal code path - return impSimdAsHWIntrinsicSpecial(intrinsic, clsHnd, sig, retType, baseType, simdSize); + return impSimdAsHWIntrinsicSpecial(intrinsic, clsHnd, sig, retType, baseType, simdSize, newobjThis); } CORINFO_InstructionSet hwIntrinsicIsa = HWIntrinsicInfo::lookupIsa(hwIntrinsic); @@ -345,7 +349,8 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, CORINFO_SIG_INFO* sig, var_types retType, var_types baseType, - unsigned simdSize) + unsigned simdSize, + GenTree* newobjThis) { assert(featureSIMD); assert(retType != TYP_UNKNOWN); @@ -380,28 +385,110 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, #if defined(TARGET_XARCH) bool isVectorT256 = (SimdAsHWIntrinsicInfo::lookupClassId(intrinsic) == SimdAsHWIntrinsicClassId::VectorT256); - if ((baseType != TYP_FLOAT) && !compOpportunisticallyDependsOn(InstructionSet_SSE2)) - { - // Vector, for everything but float, requires at least SSE2 - return nullptr; - } - else if (!compOpportunisticallyDependsOn(InstructionSet_SSE)) + // We should have alredy exited early if SSE2 isn't supported + assert(compIsaSupportedDebugOnly(InstructionSet_SSE2)); + + switch (intrinsic) { - // Vector requires at least SSE - return nullptr; +#if defined(TARGET_X86) + case NI_VectorT128_CreateBroadcast: + case NI_VectorT256_CreateBroadcast: + { + if (varTypeIsLong(baseType)) + { + // TODO-XARCH-CQ: It may be beneficial to emit the movq + // instruction, which takes a 64-bit memory address and + // works on 32-bit x86 systems. + return nullptr; + } + break; + } +#endif // TARGET_X86 + + case NI_VectorT128_Dot: + { + if (!compOpportunisticallyDependsOn(InstructionSet_SSE41)) + { + // We need to exit early if this is Vector.Dot for int or uint and SSE41 is not supported + // The other types should be handled via the table driven paths + + assert((baseType == TYP_INT) || (baseType == TYP_UINT)); + return nullptr; + } + break; + } + + default: + { + // Most intrinsics have some path that works even if only SSE2 is available + break; + } } // Vector, when 32-bytes, requires at least AVX2 assert(!isVectorT256 || compIsaSupportedDebugOnly(InstructionSet_AVX2)); -#endif +#elif defined(TARGET_ARM64) + // We should have alredy exited early if AdvSimd isn't supported + assert(compIsaSupportedDebugOnly(InstructionSet_AdvSimd)); +#else +#error Unsupported platform +#endif // !TARGET_XARCH && !TARGET_ARM64 + + GenTree* copyBlkDst = nullptr; + GenTree* copyBlkSrc = nullptr; switch (numArgs) { case 0: { + assert(newobjThis == nullptr); + switch (intrinsic) { #if defined(TARGET_XARCH) + case NI_Vector2_get_One: + case NI_Vector3_get_One: + case NI_Vector4_get_One: + case NI_VectorT128_get_One: + case NI_VectorT256_get_One: + { + switch (baseType) + { + case TYP_BYTE: + case TYP_UBYTE: + case TYP_SHORT: + case TYP_USHORT: + case TYP_INT: + case TYP_UINT: + { + op1 = gtNewIconNode(1, TYP_INT); + break; + } + + case TYP_LONG: + case TYP_ULONG: + { + op1 = gtNewLconNode(1); + break; + } + + case TYP_FLOAT: + case TYP_DOUBLE: + { + op1 = gtNewDconNode(1.0, baseType); + break; + } + + default: + { + unreached(); + } + } + + return gtNewSimdCreateBroadcastNode(retType, op1, baseType, simdSize, + /* isSimdAsHWIntrinsic */ true); + } + case NI_VectorT128_get_Count: case NI_VectorT256_get_Count: { @@ -410,6 +497,48 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, return countNode; } #elif defined(TARGET_ARM64) + case NI_Vector2_get_One: + case NI_Vector3_get_One: + case NI_Vector4_get_One: + case NI_VectorT128_get_One: + { + switch (baseType) + { + case TYP_BYTE: + case TYP_UBYTE: + case TYP_SHORT: + case TYP_USHORT: + case TYP_INT: + case TYP_UINT: + { + op1 = gtNewIconNode(1, TYP_INT); + break; + } + + case TYP_LONG: + case TYP_ULONG: + { + op1 = gtNewLconNode(1); + break; + } + + case TYP_FLOAT: + case TYP_DOUBLE: + { + op1 = gtNewDconNode(1.0, baseType); + break; + } + + default: + { + unreached(); + } + } + + return gtNewSimdCreateBroadcastNode(retType, op1, baseType, simdSize, + /* isSimdAsHWIntrinsic */ true); + } + case NI_VectorT128_get_Count: { GenTreeIntCon* countNode = gtNewIconNode(getSIMDVectorLength(simdSize, baseType), TYP_INT); @@ -431,6 +560,8 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, case 1: { + assert(newobjThis == nullptr); + bool isOpExplicit = (intrinsic == NI_VectorT128_op_Explicit); #if defined(TARGET_XARCH) @@ -487,7 +618,8 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, } assert(bitMask != nullptr); - bitMask = gtNewSIMDNode(retType, bitMask, SIMDIntrinsicInit, baseType, simdSize); + bitMask = gtNewSimdCreateBroadcastNode(retType, bitMask, baseType, simdSize, + /* isSimdAsHWIntrinsic */ true); intrinsic = isVectorT256 ? NI_VectorT256_op_BitwiseAnd : NI_VectorT128_op_BitwiseAnd; intrinsic = SimdAsHWIntrinsicInfo::lookupHWIntrinsic(intrinsic, baseType); @@ -558,13 +690,27 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, argType = isInstanceMethod ? simdType : JITtype2varType(strip(info.compCompHnd->getArgType(sig, argList, &argClass))); - op1 = getArgForHWIntrinsic(argType, argClass, isInstanceMethod); + op1 = getArgForHWIntrinsic(argType, argClass, isInstanceMethod, newobjThis); assert(!SimdAsHWIntrinsicInfo::NeedsOperandsSwapped(intrinsic)); switch (intrinsic) { #if defined(TARGET_XARCH) + case NI_Vector2_CreateBroadcast: + case NI_Vector3_CreateBroadcast: + case NI_Vector4_CreateBroadcast: + case NI_VectorT128_CreateBroadcast: + case NI_VectorT256_CreateBroadcast: + { + assert(retType == TYP_VOID); + + copyBlkDst = op1; + copyBlkSrc = + gtNewSimdCreateBroadcastNode(simdType, op2, baseType, simdSize, /* isSimdAsHWIntrinsic */ true); + break; + } + case NI_Vector2_op_Division: case NI_Vector3_op_Division: { @@ -591,6 +737,13 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, return retNode; } + case NI_VectorT128_Dot: + { + assert((baseType == TYP_INT) || (baseType == TYP_UINT)); + assert(compIsaSupportedDebugOnly(InstructionSet_SSE41)); + return gtNewSimdAsHWIntrinsicNode(retType, op1, op2, NI_Vector128_Dot, baseType, simdSize); + } + case NI_VectorT128_Equals: case NI_VectorT128_GreaterThan: case NI_VectorT128_GreaterThanOrEqual: @@ -641,8 +794,8 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, } } - GenTree* constVector = - gtNewSIMDNode(retType, constVal, nullptr, SIMDIntrinsicInit, TYP_INT, simdSize); + GenTree* constVector = gtNewSimdCreateBroadcastNode(retType, constVal, TYP_INT, simdSize, + /* isSimdAsHWIntrinsic */ true); GenTree* constVectorDup1; constVector = impCloneExpr(constVector, &constVectorDup1, clsHnd, (unsigned)CHECK_SPILL_ALL, @@ -759,6 +912,19 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, return gtNewSimdAsHWIntrinsicNode(retType, op1, op2, hwIntrinsic, baseType, simdSize); } #elif defined(TARGET_ARM64) + case NI_Vector2_CreateBroadcast: + case NI_Vector3_CreateBroadcast: + case NI_Vector4_CreateBroadcast: + case NI_VectorT128_CreateBroadcast: + { + assert(retType == TYP_VOID); + + copyBlkDst = op1; + copyBlkSrc = + gtNewSimdCreateBroadcastNode(simdType, op2, baseType, simdSize, /* isSimdAsHWIntrinsic */ true); + break; + } + case NI_VectorT128_Max: case NI_VectorT128_Min: { @@ -801,6 +967,8 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, case 3: { + assert(newobjThis == nullptr); + CORINFO_ARG_LIST_HANDLE arg2 = isInstanceMethod ? argList : info.compCompHnd->getArgNext(argList); CORINFO_ARG_LIST_HANDLE arg3 = info.compCompHnd->getArgNext(arg2); @@ -812,7 +980,7 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, argType = isInstanceMethod ? simdType : JITtype2varType(strip(info.compCompHnd->getArgType(sig, argList, &argClass))); - op1 = getArgForHWIntrinsic(argType, argClass, isInstanceMethod); + op1 = getArgForHWIntrinsic(argType, argClass, isInstanceMethod, newobjThis); assert(!SimdAsHWIntrinsicInfo::NeedsOperandsSwapped(intrinsic)); @@ -843,6 +1011,27 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, } } + if (copyBlkDst != nullptr) + { + assert(copyBlkSrc != nullptr); + + // At this point, we have a tree that we are going to store into a destination. + // TODO-1stClassStructs: This should be a simple store or assignment, and should not require + // GTF_ALL_EFFECT for the dest. This is currently emulating the previous behavior of + // block ops. + + GenTree* dest = gtNewBlockVal(copyBlkDst, simdSize); + + dest->gtType = simdType; + dest->gtFlags |= GTF_GLOB_REF; + + GenTree* retNode = gtNewBlkOpNode(dest, copyBlkSrc, /* isVolatile */ false, /* isCopyBlock */ true); + retNode->gtFlags |= ((copyBlkDst->gtFlags | copyBlkSrc->gtFlags) & GTF_ALL_EFFECT); + + return retNode; + } + assert(copyBlkSrc == nullptr); + assert(!"Unexpected SimdAsHWIntrinsic"); return nullptr; } @@ -1148,8 +1337,8 @@ GenTree* Compiler::impSimdAsHWIntrinsicRelOp(NamedIntrinsic intrinsic, } } - GenTree* constVector = - gtNewSIMDNode(retType, constVal, nullptr, SIMDIntrinsicInit, constVal->TypeGet(), simdSize); + GenTree* constVector = gtNewSimdCreateBroadcastNode(retType, constVal, constVal->TypeGet(), simdSize, + /* isSimdAsHWIntrinsic */ true); GenTree* constVectorDup; constVector = impCloneExpr(constVector, &constVectorDup, clsHnd, (unsigned)CHECK_SPILL_ALL, diff --git a/src/coreclr/src/jit/simdashwintrinsic.h b/src/coreclr/src/jit/simdashwintrinsic.h index e5d951e38703..41dd1c5a53b3 100644 --- a/src/coreclr/src/jit/simdashwintrinsic.h +++ b/src/coreclr/src/jit/simdashwintrinsic.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _SIMD_AS_HWINTRINSIC_H_ #define _SIMD_AS_HWINTRINSIC_H_ diff --git a/src/coreclr/src/jit/simdashwintrinsiclistarm64.h b/src/coreclr/src/jit/simdashwintrinsiclistarm64.h index 9621486e6965..481e139c2ac5 100644 --- a/src/coreclr/src/jit/simdashwintrinsiclistarm64.h +++ b/src/coreclr/src/jit/simdashwintrinsiclistarm64.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*****************************************************************************/ #ifndef SIMD_AS_HWINTRINSIC @@ -39,7 +38,10 @@ // ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************* // Vector2 Intrinsics SIMD_AS_HWINTRINSIC_ID(Vector2, Abs, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_AdvSimd_Abs, NI_Illegal}, SimdAsHWIntrinsicFlag::None) +SIMD_AS_HWINTRINSIC_NM(Vector2, CreateBroadcast, ".ctor", 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_CreateBroadcast, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod) +SIMD_AS_HWINTRINSIC_ID(Vector2, Dot, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector64_Dot, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_NM(Vector2, EqualsInstance, "Equals", 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector64_op_Equality, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod) +SIMD_AS_HWINTRINSIC_ID(Vector2, get_One, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_get_One, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector2, get_Zero, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector64_get_Zero, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector2, Max, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_AdvSimd_Max, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector2, Min, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_AdvSimd_Min, NI_Illegal}, SimdAsHWIntrinsicFlag::None) @@ -57,7 +59,10 @@ SIMD_AS_HWINTRINSIC_ID(Vector2, SquareRoot, // ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************* // Vector3 Intrinsics SIMD_AS_HWINTRINSIC_ID(Vector3, Abs, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_AdvSimd_Abs, NI_Illegal}, SimdAsHWIntrinsicFlag::None) +SIMD_AS_HWINTRINSIC_NM(Vector3, CreateBroadcast, ".ctor", 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_CreateBroadcast, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod) +SIMD_AS_HWINTRINSIC_ID(Vector3, Dot, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector128_Dot, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_NM(Vector3, EqualsInstance, "Equals", 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector128_op_Equality, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod) +SIMD_AS_HWINTRINSIC_ID(Vector3, get_One, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_get_One, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector3, get_Zero, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector128_get_Zero, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector3, Max, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_AdvSimd_Max, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector3, Min, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_AdvSimd_Min, NI_Illegal}, SimdAsHWIntrinsicFlag::None) @@ -75,7 +80,10 @@ SIMD_AS_HWINTRINSIC_ID(Vector3, SquareRoot, // ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************* // Vector4 Intrinsics SIMD_AS_HWINTRINSIC_ID(Vector4, Abs, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_AdvSimd_Abs, NI_Illegal}, SimdAsHWIntrinsicFlag::None) +SIMD_AS_HWINTRINSIC_NM(Vector4, CreateBroadcast, ".ctor", 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_CreateBroadcast, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod) +SIMD_AS_HWINTRINSIC_ID(Vector4, Dot, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector128_Dot, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_NM(Vector4, EqualsInstance, "Equals", 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector128_op_Equality, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod) +SIMD_AS_HWINTRINSIC_ID(Vector4, get_One, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_get_One, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector4, get_Zero, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector128_get_Zero, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector4, Max, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_AdvSimd_Max, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector4, Min, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_AdvSimd_Min, NI_Illegal}, SimdAsHWIntrinsicFlag::None) @@ -94,13 +102,16 @@ SIMD_AS_HWINTRINSIC_ID(Vector4, SquareRoot, // Vector Intrinsics SIMD_AS_HWINTRINSIC_ID(VectorT128, Abs, 1, {NI_AdvSimd_Abs, NI_VectorT128_Abs, NI_AdvSimd_Abs, NI_VectorT128_Abs, NI_AdvSimd_Abs, NI_VectorT128_Abs, NI_AdvSimd_Arm64_Abs, NI_VectorT128_Abs, NI_AdvSimd_Abs, NI_AdvSimd_Arm64_Abs}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT128, AndNot, 2, {NI_AdvSimd_BitwiseClear, NI_AdvSimd_BitwiseClear, NI_AdvSimd_BitwiseClear, NI_AdvSimd_BitwiseClear, NI_AdvSimd_BitwiseClear, NI_AdvSimd_BitwiseClear, NI_AdvSimd_BitwiseClear, NI_AdvSimd_BitwiseClear, NI_AdvSimd_BitwiseClear, NI_AdvSimd_BitwiseClear}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT128, Ceiling, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_AdvSimd_Ceiling, NI_AdvSimd_Ceiling}, SimdAsHWIntrinsicFlag::None) +SIMD_AS_HWINTRINSIC_ID(VectorT128, Ceiling, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_AdvSimd_Ceiling, NI_AdvSimd_Arm64_Ceiling}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT128, ConditionalSelect, 3, {NI_VectorT128_ConditionalSelect, NI_VectorT128_ConditionalSelect, NI_VectorT128_ConditionalSelect, NI_VectorT128_ConditionalSelect, NI_VectorT128_ConditionalSelect, NI_VectorT128_ConditionalSelect, NI_VectorT128_ConditionalSelect, NI_VectorT128_ConditionalSelect, NI_VectorT128_ConditionalSelect, NI_VectorT128_ConditionalSelect}, SimdAsHWIntrinsicFlag::None) +SIMD_AS_HWINTRINSIC_NM(VectorT128, CreateBroadcast, ".ctor", 2, {NI_VectorT128_CreateBroadcast, NI_VectorT128_CreateBroadcast, NI_VectorT128_CreateBroadcast, NI_VectorT128_CreateBroadcast, NI_VectorT128_CreateBroadcast, NI_VectorT128_CreateBroadcast, NI_VectorT128_CreateBroadcast, NI_VectorT128_CreateBroadcast, NI_VectorT128_CreateBroadcast, NI_VectorT128_CreateBroadcast}, SimdAsHWIntrinsicFlag::InstanceMethod) +SIMD_AS_HWINTRINSIC_ID(VectorT128, Dot, 2, {NI_Vector128_Dot, NI_Vector128_Dot, NI_Vector128_Dot, NI_Vector128_Dot, NI_Vector128_Dot, NI_Vector128_Dot, NI_Illegal, NI_Illegal, NI_Vector128_Dot, NI_Vector128_Dot}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT128, Equals, 2, {NI_AdvSimd_CompareEqual, NI_AdvSimd_CompareEqual, NI_AdvSimd_CompareEqual, NI_AdvSimd_CompareEqual, NI_AdvSimd_CompareEqual, NI_AdvSimd_CompareEqual, NI_AdvSimd_Arm64_CompareEqual, NI_AdvSimd_Arm64_CompareEqual, NI_AdvSimd_CompareEqual, NI_AdvSimd_Arm64_CompareEqual}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_NM(VectorT128, EqualsInstance, "Equals", 2, {NI_Vector128_op_Equality, NI_Vector128_op_Equality, NI_Vector128_op_Equality, NI_Vector128_op_Equality, NI_Vector128_op_Equality, NI_Vector128_op_Equality, NI_Vector128_op_Equality, NI_Vector128_op_Equality, NI_Vector128_op_Equality, NI_Vector128_op_Equality}, SimdAsHWIntrinsicFlag::InstanceMethod) -SIMD_AS_HWINTRINSIC_ID(VectorT128, Floor, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_AdvSimd_Floor, NI_AdvSimd_Floor}, SimdAsHWIntrinsicFlag::None) +SIMD_AS_HWINTRINSIC_ID(VectorT128, Floor, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_AdvSimd_Floor, NI_AdvSimd_Arm64_Floor}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT128, get_AllBitsSet, 0, {NI_Vector128_get_AllBitsSet, NI_Vector128_get_AllBitsSet, NI_Vector128_get_AllBitsSet, NI_Vector128_get_AllBitsSet, NI_Vector128_get_AllBitsSet, NI_Vector128_get_AllBitsSet, NI_Vector128_get_AllBitsSet, NI_Vector128_get_AllBitsSet, NI_Vector128_get_AllBitsSet, NI_Vector128_get_AllBitsSet}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT128, get_Count, 0, {NI_VectorT128_get_Count, NI_VectorT128_get_Count, NI_VectorT128_get_Count, NI_VectorT128_get_Count, NI_VectorT128_get_Count, NI_VectorT128_get_Count, NI_VectorT128_get_Count, NI_VectorT128_get_Count, NI_VectorT128_get_Count, NI_VectorT128_get_Count}, SimdAsHWIntrinsicFlag::None) +SIMD_AS_HWINTRINSIC_ID(VectorT128, get_Count, 0, {NI_VectorT128_get_Count, NI_VectorT128_get_Count, NI_VectorT128_get_Count, NI_VectorT128_get_Count, NI_VectorT128_get_Count, NI_VectorT128_get_Count, NI_VectorT128_get_Count, NI_VectorT128_get_Count, NI_VectorT128_get_Count, NI_VectorT128_get_Count}, SimdAsHWIntrinsicFlag::None) +SIMD_AS_HWINTRINSIC_ID(VectorT128, get_One, 0, {NI_VectorT128_get_One, NI_VectorT128_get_One, NI_VectorT128_get_One, NI_VectorT128_get_One, NI_VectorT128_get_One, NI_VectorT128_get_One, NI_VectorT128_get_One, NI_VectorT128_get_One, NI_VectorT128_get_One, NI_VectorT128_get_One}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT128, get_Zero, 0, {NI_Vector128_get_Zero, NI_Vector128_get_Zero, NI_Vector128_get_Zero, NI_Vector128_get_Zero, NI_Vector128_get_Zero, NI_Vector128_get_Zero, NI_Vector128_get_Zero, NI_Vector128_get_Zero, NI_Vector128_get_Zero, NI_Vector128_get_Zero}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT128, GreaterThan, 2, {NI_AdvSimd_CompareGreaterThan, NI_AdvSimd_CompareGreaterThan, NI_AdvSimd_CompareGreaterThan, NI_AdvSimd_CompareGreaterThan, NI_AdvSimd_CompareGreaterThan, NI_AdvSimd_CompareGreaterThan, NI_AdvSimd_Arm64_CompareGreaterThan, NI_AdvSimd_Arm64_CompareGreaterThan, NI_AdvSimd_CompareGreaterThan, NI_AdvSimd_Arm64_CompareGreaterThan}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT128, GreaterThanOrEqual, 2, {NI_AdvSimd_CompareGreaterThanOrEqual, NI_AdvSimd_CompareGreaterThanOrEqual, NI_AdvSimd_CompareGreaterThanOrEqual, NI_AdvSimd_CompareGreaterThanOrEqual, NI_AdvSimd_CompareGreaterThanOrEqual, NI_AdvSimd_CompareGreaterThanOrEqual, NI_AdvSimd_Arm64_CompareGreaterThanOrEqual, NI_AdvSimd_Arm64_CompareGreaterThanOrEqual, NI_AdvSimd_CompareGreaterThanOrEqual, NI_AdvSimd_Arm64_CompareGreaterThanOrEqual}, SimdAsHWIntrinsicFlag::None) diff --git a/src/coreclr/src/jit/simdashwintrinsiclistxarch.h b/src/coreclr/src/jit/simdashwintrinsiclistxarch.h index d13153db4aad..d542dc63d316 100644 --- a/src/coreclr/src/jit/simdashwintrinsiclistxarch.h +++ b/src/coreclr/src/jit/simdashwintrinsiclistxarch.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*****************************************************************************/ #ifndef SIMD_AS_HWINTRINSIC @@ -35,11 +34,14 @@ // ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************* // ISA ID Name NumArg Instructions Flags -// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} +// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} // ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************* // Vector2 Intrinsics SIMD_AS_HWINTRINSIC_ID(Vector2, Abs, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_Abs, NI_Illegal}, SimdAsHWIntrinsicFlag::None) +SIMD_AS_HWINTRINSIC_NM(Vector2, CreateBroadcast, ".ctor", 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_CreateBroadcast, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod) +SIMD_AS_HWINTRINSIC_ID(Vector2, Dot, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector128_Dot, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_NM(Vector2, EqualsInstance, "Equals", 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector128_op_Equality, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod) +SIMD_AS_HWINTRINSIC_ID(Vector2, get_One, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_get_One, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector2, get_Zero, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector128_get_Zero, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector2, Max, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_SSE_Max, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector2, Min, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_SSE_Min, NI_Illegal}, SimdAsHWIntrinsicFlag::None) @@ -57,7 +59,10 @@ SIMD_AS_HWINTRINSIC_ID(Vector2, SquareRoot, // ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************* // Vector3 Intrinsics SIMD_AS_HWINTRINSIC_ID(Vector3, Abs, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_Abs, NI_Illegal}, SimdAsHWIntrinsicFlag::None) +SIMD_AS_HWINTRINSIC_NM(Vector3, CreateBroadcast, ".ctor", 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_CreateBroadcast, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod) +SIMD_AS_HWINTRINSIC_ID(Vector3, Dot, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector128_Dot, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_NM(Vector3, EqualsInstance, "Equals", 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector128_op_Equality, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod) +SIMD_AS_HWINTRINSIC_ID(Vector3, get_One, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_get_One, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector3, get_Zero, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector128_get_Zero, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector3, Max, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_SSE_Max, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector3, Min, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_SSE_Min, NI_Illegal}, SimdAsHWIntrinsicFlag::None) @@ -75,7 +80,10 @@ SIMD_AS_HWINTRINSIC_ID(Vector3, SquareRoot, // ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************* // Vector4 Intrinsics SIMD_AS_HWINTRINSIC_ID(Vector4, Abs, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_Abs, NI_Illegal}, SimdAsHWIntrinsicFlag::None) +SIMD_AS_HWINTRINSIC_NM(Vector4, CreateBroadcast, ".ctor", 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_CreateBroadcast, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod) +SIMD_AS_HWINTRINSIC_ID(Vector4, Dot, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector128_Dot, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_NM(Vector4, EqualsInstance, "Equals", 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector128_op_Equality, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod) +SIMD_AS_HWINTRINSIC_ID(Vector4, get_One, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_get_One, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector4, get_Zero, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector128_get_Zero, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector4, Max, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_SSE_Max, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector4, Min, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_SSE_Min, NI_Illegal}, SimdAsHWIntrinsicFlag::None) @@ -96,11 +104,14 @@ SIMD_AS_HWINTRINSIC_ID(VectorT128, Abs, SIMD_AS_HWINTRINSIC_ID(VectorT128, AndNot, 2, {NI_SSE2_AndNot, NI_SSE2_AndNot, NI_SSE2_AndNot, NI_SSE2_AndNot, NI_SSE2_AndNot, NI_SSE2_AndNot, NI_SSE2_AndNot, NI_SSE2_AndNot, NI_SSE_AndNot, NI_SSE2_AndNot}, SimdAsHWIntrinsicFlag::NeedsOperandsSwapped) SIMD_AS_HWINTRINSIC_ID(VectorT128, Ceiling, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_SSE41_Ceiling, NI_SSE41_Ceiling}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT128, ConditionalSelect, 3, {NI_VectorT128_ConditionalSelect, NI_VectorT128_ConditionalSelect, NI_VectorT128_ConditionalSelect, NI_VectorT128_ConditionalSelect, NI_VectorT128_ConditionalSelect, NI_VectorT128_ConditionalSelect, NI_VectorT128_ConditionalSelect, NI_VectorT128_ConditionalSelect, NI_VectorT128_ConditionalSelect, NI_VectorT128_ConditionalSelect}, SimdAsHWIntrinsicFlag::None) +SIMD_AS_HWINTRINSIC_NM(VectorT128, CreateBroadcast, ".ctor", 2, {NI_VectorT128_CreateBroadcast, NI_VectorT128_CreateBroadcast, NI_VectorT128_CreateBroadcast, NI_VectorT128_CreateBroadcast, NI_VectorT128_CreateBroadcast, NI_VectorT128_CreateBroadcast, NI_VectorT128_CreateBroadcast, NI_VectorT128_CreateBroadcast, NI_VectorT128_CreateBroadcast, NI_VectorT128_CreateBroadcast}, SimdAsHWIntrinsicFlag::InstanceMethod) +SIMD_AS_HWINTRINSIC_ID(VectorT128, Dot, 2, {NI_Illegal, NI_Illegal, NI_Vector128_Dot, NI_Vector128_Dot, NI_VectorT128_Dot, NI_VectorT128_Dot, NI_Illegal, NI_Illegal, NI_Vector128_Dot, NI_Vector128_Dot}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT128, Equals, 2, {NI_SSE2_CompareEqual, NI_SSE2_CompareEqual, NI_SSE2_CompareEqual, NI_SSE2_CompareEqual, NI_SSE2_CompareEqual, NI_SSE2_CompareEqual, NI_VectorT128_Equals, NI_VectorT128_Equals, NI_SSE_CompareEqual, NI_SSE2_CompareEqual}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_NM(VectorT128, EqualsInstance, "Equals", 2, {NI_Vector128_op_Equality, NI_Vector128_op_Equality, NI_Vector128_op_Equality, NI_Vector128_op_Equality, NI_Vector128_op_Equality, NI_Vector128_op_Equality, NI_Vector128_op_Equality, NI_Vector128_op_Equality, NI_Vector128_op_Equality, NI_Vector128_op_Equality}, SimdAsHWIntrinsicFlag::InstanceMethod) SIMD_AS_HWINTRINSIC_ID(VectorT128, Floor, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_SSE41_Floor, NI_SSE41_Floor}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT128, get_AllBitsSet, 0, {NI_Vector128_get_AllBitsSet, NI_Vector128_get_AllBitsSet, NI_Vector128_get_AllBitsSet, NI_Vector128_get_AllBitsSet, NI_Vector128_get_AllBitsSet, NI_Vector128_get_AllBitsSet, NI_Vector128_get_AllBitsSet, NI_Vector128_get_AllBitsSet, NI_Vector128_get_AllBitsSet, NI_Vector128_get_AllBitsSet}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT128, get_Count, 0, {NI_VectorT128_get_Count, NI_VectorT128_get_Count, NI_VectorT128_get_Count, NI_VectorT128_get_Count, NI_VectorT128_get_Count, NI_VectorT128_get_Count, NI_VectorT128_get_Count, NI_VectorT128_get_Count, NI_VectorT128_get_Count, NI_VectorT128_get_Count}, SimdAsHWIntrinsicFlag::None) +SIMD_AS_HWINTRINSIC_ID(VectorT128, get_Count, 0, {NI_VectorT128_get_Count, NI_VectorT128_get_Count, NI_VectorT128_get_Count, NI_VectorT128_get_Count, NI_VectorT128_get_Count, NI_VectorT128_get_Count, NI_VectorT128_get_Count, NI_VectorT128_get_Count, NI_VectorT128_get_Count, NI_VectorT128_get_Count}, SimdAsHWIntrinsicFlag::None) +SIMD_AS_HWINTRINSIC_ID(VectorT128, get_One, 0, {NI_VectorT128_get_One, NI_VectorT128_get_One, NI_VectorT128_get_One, NI_VectorT128_get_One, NI_VectorT128_get_One, NI_VectorT128_get_One, NI_VectorT128_get_One, NI_VectorT128_get_One, NI_VectorT128_get_One, NI_VectorT128_get_One}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT128, get_Zero, 0, {NI_Vector128_get_Zero, NI_Vector128_get_Zero, NI_Vector128_get_Zero, NI_Vector128_get_Zero, NI_Vector128_get_Zero, NI_Vector128_get_Zero, NI_Vector128_get_Zero, NI_Vector128_get_Zero, NI_Vector128_get_Zero, NI_Vector128_get_Zero}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT128, GreaterThan, 2, {NI_SSE2_CompareGreaterThan, NI_VectorT128_GreaterThan, NI_SSE2_CompareGreaterThan, NI_VectorT128_GreaterThan, NI_SSE2_CompareGreaterThan, NI_VectorT128_GreaterThan, NI_VectorT128_GreaterThan, NI_VectorT128_GreaterThan, NI_SSE_CompareGreaterThan, NI_SSE2_CompareGreaterThan}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT128, GreaterThanOrEqual, 2, {NI_VectorT128_GreaterThanOrEqual, NI_VectorT128_GreaterThanOrEqual, NI_VectorT128_GreaterThanOrEqual, NI_VectorT128_GreaterThanOrEqual, NI_VectorT128_GreaterThanOrEqual, NI_VectorT128_GreaterThanOrEqual, NI_VectorT128_GreaterThanOrEqual, NI_VectorT128_GreaterThanOrEqual, NI_SSE_CompareGreaterThanOrEqual, NI_SSE2_CompareGreaterThanOrEqual}, SimdAsHWIntrinsicFlag::None) @@ -129,11 +140,14 @@ SIMD_AS_HWINTRINSIC_ID(VectorT256, Abs, SIMD_AS_HWINTRINSIC_ID(VectorT256, AndNot, 2, {NI_AVX2_AndNot, NI_AVX2_AndNot, NI_AVX2_AndNot, NI_AVX2_AndNot, NI_AVX2_AndNot, NI_AVX2_AndNot, NI_AVX2_AndNot, NI_AVX2_AndNot, NI_AVX_AndNot, NI_AVX_AndNot}, SimdAsHWIntrinsicFlag::NeedsOperandsSwapped) SIMD_AS_HWINTRINSIC_ID(VectorT256, Ceiling, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_AVX_Ceiling, NI_AVX_Ceiling}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT256, ConditionalSelect, 3, {NI_VectorT256_ConditionalSelect, NI_VectorT256_ConditionalSelect, NI_VectorT256_ConditionalSelect, NI_VectorT256_ConditionalSelect, NI_VectorT256_ConditionalSelect, NI_VectorT256_ConditionalSelect, NI_VectorT256_ConditionalSelect, NI_VectorT256_ConditionalSelect, NI_VectorT256_ConditionalSelect, NI_VectorT256_ConditionalSelect}, SimdAsHWIntrinsicFlag::None) +SIMD_AS_HWINTRINSIC_NM(VectorT256, CreateBroadcast, ".ctor", 2, {NI_VectorT256_CreateBroadcast, NI_VectorT256_CreateBroadcast, NI_VectorT256_CreateBroadcast, NI_VectorT256_CreateBroadcast, NI_VectorT256_CreateBroadcast, NI_VectorT256_CreateBroadcast, NI_VectorT256_CreateBroadcast, NI_VectorT256_CreateBroadcast, NI_VectorT256_CreateBroadcast, NI_VectorT256_CreateBroadcast}, SimdAsHWIntrinsicFlag::InstanceMethod) +SIMD_AS_HWINTRINSIC_ID(VectorT256, Dot, 2, {NI_Illegal, NI_Illegal, NI_Vector256_Dot, NI_Vector256_Dot, NI_Vector256_Dot, NI_Vector256_Dot, NI_Illegal, NI_Illegal, NI_Vector256_Dot, NI_Vector256_Dot}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT256, Equals, 2, {NI_AVX2_CompareEqual, NI_AVX2_CompareEqual, NI_AVX2_CompareEqual, NI_AVX2_CompareEqual, NI_AVX2_CompareEqual, NI_AVX2_CompareEqual, NI_AVX2_CompareEqual, NI_AVX2_CompareEqual, NI_AVX_CompareEqual, NI_AVX_CompareEqual}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_NM(VectorT256, EqualsInstance, "Equals", 2, {NI_Vector256_op_Equality, NI_Vector256_op_Equality, NI_Vector256_op_Equality, NI_Vector256_op_Equality, NI_Vector256_op_Equality, NI_Vector256_op_Equality, NI_Vector256_op_Equality, NI_Vector256_op_Equality, NI_Vector256_op_Equality, NI_Vector256_op_Equality}, SimdAsHWIntrinsicFlag::InstanceMethod) SIMD_AS_HWINTRINSIC_ID(VectorT256, Floor, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_AVX_Floor, NI_AVX_Floor}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT256, get_AllBitsSet, 0, {NI_Vector256_get_AllBitsSet, NI_Vector256_get_AllBitsSet, NI_Vector256_get_AllBitsSet, NI_Vector256_get_AllBitsSet, NI_Vector256_get_AllBitsSet, NI_Vector256_get_AllBitsSet, NI_Vector256_get_AllBitsSet, NI_Vector256_get_AllBitsSet, NI_Vector256_get_AllBitsSet, NI_Vector256_get_AllBitsSet}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT256, get_Count, 0, {NI_VectorT256_get_Count, NI_VectorT256_get_Count, NI_VectorT256_get_Count, NI_VectorT256_get_Count, NI_VectorT256_get_Count, NI_VectorT256_get_Count, NI_VectorT256_get_Count, NI_VectorT256_get_Count, NI_VectorT256_get_Count, NI_VectorT256_get_Count}, SimdAsHWIntrinsicFlag::None) +SIMD_AS_HWINTRINSIC_ID(VectorT256, get_Count, 0, {NI_VectorT256_get_Count, NI_VectorT256_get_Count, NI_VectorT256_get_Count, NI_VectorT256_get_Count, NI_VectorT256_get_Count, NI_VectorT256_get_Count, NI_VectorT256_get_Count, NI_VectorT256_get_Count, NI_VectorT256_get_Count, NI_VectorT256_get_Count}, SimdAsHWIntrinsicFlag::None) +SIMD_AS_HWINTRINSIC_ID(VectorT256, get_One, 0, {NI_VectorT256_get_One, NI_VectorT256_get_One, NI_VectorT256_get_One, NI_VectorT256_get_One, NI_VectorT256_get_One, NI_VectorT256_get_One, NI_VectorT256_get_One, NI_VectorT256_get_One, NI_VectorT256_get_One, NI_VectorT256_get_One}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT256, get_Zero, 0, {NI_Vector256_get_Zero, NI_Vector256_get_Zero, NI_Vector256_get_Zero, NI_Vector256_get_Zero, NI_Vector256_get_Zero, NI_Vector256_get_Zero, NI_Vector256_get_Zero, NI_Vector256_get_Zero, NI_Vector256_get_Zero, NI_Vector256_get_Zero}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT256, GreaterThan, 2, {NI_AVX2_CompareGreaterThan, NI_VectorT256_GreaterThan, NI_AVX2_CompareGreaterThan, NI_VectorT256_GreaterThan, NI_AVX2_CompareGreaterThan, NI_VectorT256_GreaterThan, NI_AVX2_CompareGreaterThan, NI_VectorT256_GreaterThan, NI_AVX_CompareGreaterThan, NI_AVX_CompareGreaterThan}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT256, GreaterThanOrEqual, 2, {NI_VectorT256_GreaterThanOrEqual, NI_VectorT256_GreaterThanOrEqual, NI_VectorT256_GreaterThanOrEqual, NI_VectorT256_GreaterThanOrEqual, NI_VectorT256_GreaterThanOrEqual, NI_VectorT256_GreaterThanOrEqual, NI_VectorT256_GreaterThanOrEqual, NI_VectorT256_GreaterThanOrEqual, NI_AVX_CompareGreaterThanOrEqual, NI_AVX_CompareGreaterThanOrEqual}, SimdAsHWIntrinsicFlag::None) diff --git a/src/coreclr/src/jit/simdcodegenxarch.cpp b/src/coreclr/src/jit/simdcodegenxarch.cpp index e6aa4db08fe5..a1acdfd2f1a7 100644 --- a/src/coreclr/src/jit/simdcodegenxarch.cpp +++ b/src/coreclr/src/jit/simdcodegenxarch.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -130,33 +129,6 @@ instruction CodeGen::getOpForSIMDIntrinsic(SIMDIntrinsicID intrinsicId, var_type } break; - case SIMDIntrinsicAdd: - if (baseType == TYP_FLOAT) - { - result = INS_addps; - } - else if (baseType == TYP_DOUBLE) - { - result = INS_addpd; - } - else if (baseType == TYP_INT || baseType == TYP_UINT) - { - result = INS_paddd; - } - else if (baseType == TYP_USHORT || baseType == TYP_SHORT) - { - result = INS_paddw; - } - else if (baseType == TYP_UBYTE || baseType == TYP_BYTE) - { - result = INS_paddb; - } - else if (baseType == TYP_LONG || baseType == TYP_ULONG) - { - result = INS_paddq; - } - break; - case SIMDIntrinsicSub: if (baseType == TYP_FLOAT) { @@ -184,40 +156,6 @@ instruction CodeGen::getOpForSIMDIntrinsic(SIMDIntrinsicID intrinsicId, var_type } break; - case SIMDIntrinsicMul: - if (baseType == TYP_FLOAT) - { - result = INS_mulps; - } - else if (baseType == TYP_DOUBLE) - { - result = INS_mulpd; - } - else if (baseType == TYP_SHORT) - { - result = INS_pmullw; - } - else if ((baseType == TYP_INT) && (compiler->getSIMDSupportLevel() >= SIMD_SSE4_Supported)) - { - result = INS_pmulld; - } - break; - - case SIMDIntrinsicDiv: - if (baseType == TYP_FLOAT) - { - result = INS_divps; - } - else if (baseType == TYP_DOUBLE) - { - result = INS_divpd; - } - else - { - unreached(); - } - break; - case SIMDIntrinsicEqual: if (baseType == TYP_FLOAT) { @@ -1556,9 +1494,7 @@ void CodeGen::genSIMDIntrinsicNarrow(GenTreeSIMD* simdNode) // void CodeGen::genSIMDIntrinsicBinOp(GenTreeSIMD* simdNode) { - assert(simdNode->gtSIMDIntrinsicID == SIMDIntrinsicAdd || simdNode->gtSIMDIntrinsicID == SIMDIntrinsicSub || - simdNode->gtSIMDIntrinsicID == SIMDIntrinsicMul || simdNode->gtSIMDIntrinsicID == SIMDIntrinsicDiv || - simdNode->gtSIMDIntrinsicID == SIMDIntrinsicBitwiseAnd || + assert(simdNode->gtSIMDIntrinsicID == SIMDIntrinsicSub || simdNode->gtSIMDIntrinsicID == SIMDIntrinsicBitwiseAnd || simdNode->gtSIMDIntrinsicID == SIMDIntrinsicBitwiseOr); GenTree* op1 = simdNode->gtGetOp1(); @@ -1574,156 +1510,27 @@ void CodeGen::genSIMDIntrinsicBinOp(GenTreeSIMD* simdNode) regNumber op2Reg = op2->GetRegNum(); regNumber otherReg = op2Reg; - // Vector.Mul: - // SSE2 doesn't have an instruction to perform this operation directly - // whereas SSE4.1 does (pmulld). This is special cased and computed - // as follows. - if (simdNode->gtSIMDIntrinsicID == SIMDIntrinsicMul && baseType == TYP_INT && level == SIMD_SSE2_Supported) - { - // We need a temporary register that is NOT the same as the target, - // and we MAY need another. - regNumber tmpReg = simdNode->ExtractTempReg(); - regNumber tmpReg2 = simdNode->GetSingleTempReg(); - - // The register allocator guarantees the following conditions: - // - the only registers that may be the same among op1Reg, op2Reg, tmpReg - // and tmpReg2 are op1Reg and op2Reg. - // Let's be extra-careful and assert that now. - assert((op1Reg != tmpReg) && (op1Reg != tmpReg2) && (op2Reg != tmpReg) && (op2Reg != tmpReg2) && - (tmpReg != tmpReg2)); - - // We will start by setting things up so that: - // - We have op1 in op1Reg and targetReg, and they are different registers. - // - We have op2 in op2Reg and tmpReg - // - Either we will leave the input registers (the original op1Reg and op2Reg) unmodified, - // OR they are the targetReg that will be produced. - // (Note that in the code we generate below op1Reg and op2Reg are never written.) - // We will copy things as necessary to ensure that this is the case. - // Note that we can swap op1 and op2, since multiplication is commutative. - // We will not modify the values in op1Reg and op2Reg. - // (Though note that if either op1 or op2 is the same as targetReg, we will make - // a copy and use that copy as the input register. In that case we WILL modify - // the original value in the register, but will wind up with the result in targetReg - // in the end, as expected.) - - // First, we need a tmpReg that is NOT the same as targetReg. - // Note that if we have another reg that is the same as targetReg, - // we can use tmpReg2 for that case, as we will not have hit this case. - if (tmpReg == targetReg) - { - tmpReg = tmpReg2; - } + instruction ins = getOpForSIMDIntrinsic(simdNode->gtSIMDIntrinsicID, baseType); - if (op2Reg == targetReg) - { - // We will swap the operands. - // Since the code below only deals with registers, this now becomes the case where - // op1Reg == targetReg. - op2Reg = op1Reg; - op1Reg = targetReg; - } - if (op1Reg == targetReg) - { - // Copy op1, and make tmpReg2 the new op1Reg. - // Note that those regs can't be the same, as we asserted above. - // Also, we know that tmpReg2 hasn't been used, because we couldn't have hit - // the "tmpReg == targetReg" case. - inst_RV_RV(INS_movaps, tmpReg2, op1Reg, targetType, emitActualTypeSize(targetType)); - op1Reg = tmpReg2; - inst_RV_RV(INS_movaps, tmpReg, op2Reg, targetType, emitActualTypeSize(targetType)); - // However, we have one more case to worry about: what if op2Reg is also targetReg - // (i.e. we have the same operand as op1 and op2)? - // In that case we will set op2Reg to the same register as op1Reg. - if (op2Reg == targetReg) - { - op2Reg = tmpReg2; - } - } - else - { - // Copy op1 to targetReg and op2 to tmpReg. - inst_RV_RV(INS_movaps, targetReg, op1Reg, targetType, emitActualTypeSize(targetType)); - inst_RV_RV(INS_movaps, tmpReg, op2Reg, targetType, emitActualTypeSize(targetType)); - } - // Let's assert that things are as we expect. - // - We have op1 in op1Reg and targetReg, and they are different registers. - assert(op1Reg != targetReg); - // - We have op2 in op2Reg and tmpReg, and they are different registers. - assert(op2Reg != tmpReg); - // - Either we are going to leave op1's reg unmodified, or it is the targetReg. - assert((op1->GetRegNum() == op1Reg) || (op1->GetRegNum() == op2Reg) || (op1->GetRegNum() == targetReg)); - // - Similarly, we are going to leave op2's reg unmodified, or it is the targetReg. - assert((op2->GetRegNum() == op1Reg) || (op2->GetRegNum() == op2Reg) || (op2->GetRegNum() == targetReg)); - - // Now we can generate the code. - - // targetReg = op1 >> 4-bytes (op1 is already in targetReg) - GetEmitter()->emitIns_R_I(INS_psrldq, emitActualTypeSize(targetType), targetReg, 4); - - // tmpReg = op2 >> 4-bytes (op2 is already in tmpReg) - GetEmitter()->emitIns_R_I(INS_psrldq, emitActualTypeSize(targetType), tmpReg, 4); - - // tmp = unsigned double word multiply of targetReg and tmpReg. Essentially - // tmpReg[63:0] = op1[1] * op2[1] - // tmpReg[127:64] = op1[3] * op2[3] - inst_RV_RV(INS_pmuludq, tmpReg, targetReg, targetType, emitActualTypeSize(targetType)); - - // Extract first and third double word results from tmpReg - // tmpReg = shuffle(0,0,2,0) of tmpReg - GetEmitter()->emitIns_R_R_I(INS_pshufd, emitActualTypeSize(targetType), tmpReg, tmpReg, (int8_t)SHUFFLE_XXZX); - - // targetReg[63:0] = op1[0] * op2[0] - // targetReg[127:64] = op1[2] * op2[2] - inst_RV_RV(INS_movaps, targetReg, op1Reg, targetType, emitActualTypeSize(targetType)); - inst_RV_RV(INS_pmuludq, targetReg, op2Reg, targetType, emitActualTypeSize(targetType)); - - // Extract first and third double word results from targetReg - // targetReg = shuffle(0,0,2,0) of targetReg - GetEmitter()->emitIns_R_R_I(INS_pshufd, emitActualTypeSize(targetType), targetReg, targetReg, - (int8_t)SHUFFLE_XXZX); - - // pack the results into a single vector - inst_RV_RV(INS_punpckldq, targetReg, tmpReg, targetType, emitActualTypeSize(targetType)); + // Currently AVX doesn't support integer. + // if the ins is INS_cvtsi2ss or INS_cvtsi2sd, we won't use AVX. + if (op1Reg != targetReg && compiler->getSIMDSupportLevel() == SIMD_AVX2_Supported && + !(ins == INS_cvtsi2ss || ins == INS_cvtsi2sd) && GetEmitter()->IsThreeOperandAVXInstruction(ins)) + { + inst_RV_RV_RV(ins, targetReg, op1Reg, op2Reg, emitActualTypeSize(targetType)); } else { - instruction ins = getOpForSIMDIntrinsic(simdNode->gtSIMDIntrinsicID, baseType); - - // Currently AVX doesn't support integer. - // if the ins is INS_cvtsi2ss or INS_cvtsi2sd, we won't use AVX. - if (op1Reg != targetReg && compiler->getSIMDSupportLevel() == SIMD_AVX2_Supported && - !(ins == INS_cvtsi2ss || ins == INS_cvtsi2sd) && GetEmitter()->IsThreeOperandAVXInstruction(ins)) + if (op2Reg == targetReg) { - inst_RV_RV_RV(ins, targetReg, op1Reg, op2Reg, emitActualTypeSize(targetType)); + otherReg = op1Reg; } - else + else if (op1Reg != targetReg) { - if (op2Reg == targetReg) - { - otherReg = op1Reg; - } - else if (op1Reg != targetReg) - { - inst_RV_RV(ins_Copy(targetType), targetReg, op1Reg, targetType, emitActualTypeSize(targetType)); - } - - inst_RV_RV(ins, targetReg, otherReg, targetType, emitActualTypeSize(targetType)); + inst_RV_RV(ins_Copy(targetType), targetReg, op1Reg, targetType, emitActualTypeSize(targetType)); } - } - // Vector2/3 div: since the top-most elements will be zero, we end up - // perfoming 0/0 which is a NAN. Therefore, post division we need to set the - // top-most elements to zero. This is achieved by left logical shift followed - // by right logical shift of targetReg. - if (simdNode->gtSIMDIntrinsicID == SIMDIntrinsicDiv && (simdNode->gtSIMDSize < 16)) - { - // These are 16 byte operations, so we subtract from 16 bytes, not the vector register length. - unsigned shiftCount = 16 - simdNode->gtSIMDSize; - assert((shiftCount > 0) && (shiftCount <= 16)); - instruction ins = getOpForSIMDIntrinsic(SIMDIntrinsicShiftLeftInternal, TYP_SIMD16); - GetEmitter()->emitIns_R_I(ins, EA_16BYTE, targetReg, shiftCount); - ins = getOpForSIMDIntrinsic(SIMDIntrinsicShiftRightInternal, TYP_SIMD16); - GetEmitter()->emitIns_R_I(ins, EA_16BYTE, targetReg, shiftCount); + inst_RV_RV(ins, targetReg, otherReg, targetType, emitActualTypeSize(targetType)); } genProduceReg(simdNode); @@ -1807,290 +1614,6 @@ void CodeGen::genSIMDIntrinsicRelOp(GenTreeSIMD* simdNode) genProduceReg(simdNode); } -//-------------------------------------------------------------------------------- -// genSIMDIntrinsicDotProduct: Generate code for SIMD Intrinsic Dot Product. -// -// Arguments: -// simdNode - The GT_SIMD node -// -// Return Value: -// None. -// -void CodeGen::genSIMDIntrinsicDotProduct(GenTreeSIMD* simdNode) -{ - assert(simdNode->gtSIMDIntrinsicID == SIMDIntrinsicDotProduct); - - GenTree* op1 = simdNode->gtGetOp1(); - GenTree* op2 = simdNode->gtGetOp2(); - var_types baseType = simdNode->gtSIMDBaseType; - var_types simdType = op1->TypeGet(); - // TODO-1stClassStructs: Temporary to minimize asmDiffs - if (simdType == TYP_DOUBLE) - { - simdType = TYP_SIMD8; - } - var_types simdEvalType = (simdType == TYP_SIMD12) ? TYP_SIMD16 : simdType; - regNumber targetReg = simdNode->GetRegNum(); - assert(targetReg != REG_NA); - - var_types targetType = simdNode->TypeGet(); - assert(targetType == baseType); - - genConsumeOperands(simdNode); - regNumber op1Reg = op1->GetRegNum(); - regNumber op2Reg = op2->GetRegNum(); - regNumber tmpReg1 = REG_NA; - regNumber tmpReg2 = REG_NA; - - SIMDLevel level = compiler->getSIMDSupportLevel(); - - // Dot product intrinsic is supported only on float/double vectors - // and 32-byte int vectors on AVX. - // - // Float/Double Vectors: - // For SSE, or AVX with 32-byte vectors, we need one additional Xmm register - // different from targetReg as scratch. Note that if this is a TYP_SIMD16 or - // smaller on AVX, then we don't need a tmpReg. - // - // 32-byte integer vector on AVX: we need two additional Xmm registers - // different from targetReg as scratch. - // - // 16-byte integer vector on SSE4: we need one additional Xmm register - // different from targetReg as scratch. - if (varTypeIsFloating(baseType)) - { - if ((compiler->getSIMDSupportLevel() == SIMD_SSE2_Supported) || (simdEvalType == TYP_SIMD32)) - { - tmpReg1 = simdNode->GetSingleTempReg(); - assert(tmpReg1 != targetReg); - } - else - { - assert(simdNode->AvailableTempRegCount() == 0); - } - } - else - { - assert(baseType == TYP_INT); - assert(level >= SIMD_SSE4_Supported); - - if (level == SIMD_SSE4_Supported) - { - tmpReg1 = simdNode->GetSingleTempReg(); - } - else - { - tmpReg1 = simdNode->ExtractTempReg(); - tmpReg2 = simdNode->GetSingleTempReg(); - } - } - - if (level == SIMD_SSE2_Supported) - { - // We avoid reg move if either op1Reg == targetReg or op2Reg == targetReg - if (op1Reg == targetReg) - { - // Best case - // nothing to do, we have registers in the right place - } - else if (op2Reg == targetReg) - { - op2Reg = op1Reg; - } - else - { - inst_RV_RV(ins_Copy(simdType), targetReg, op1Reg, simdEvalType, emitActualTypeSize(simdType)); - } - - // DotProduct(v1, v2) - // Here v0 = targetReg, v1 = op1Reg, v2 = op2Reg and tmp = tmpReg1 - if ((simdNode->gtFlags & GTF_SIMD12_OP) != 0) - { - assert(baseType == TYP_FLOAT); - // v0 = v1 * v2 - // tmp = v0 // v0 = (3, 2, 1, 0) - each element is given by its - // // position - // tmp = shuffle(tmp, tmp, SHUFFLE_ZXXY) // tmp = (2, 0, 0, 1) - don't really care what's in upper - // // bits - // v0 = v0 + tmp // v0 = (3+2, 0+2, 1+0, 0+1) - // tmp = shuffle(tmp, tmp, SHUFFLE_XXWW) // tmp = ( 1, 1, 2, 2) - // v0 = v0 + tmp // v0 = (1+2+3, 0+1+2, 0+1+2, 0+1+2) - // - inst_RV_RV(INS_mulps, targetReg, op2Reg); - inst_RV_RV(INS_movaps, tmpReg1, targetReg); - inst_RV_RV_IV(INS_shufps, EA_16BYTE, tmpReg1, tmpReg1, (int8_t)SHUFFLE_ZXXY); - inst_RV_RV(INS_addps, targetReg, tmpReg1); - inst_RV_RV_IV(INS_shufps, EA_16BYTE, tmpReg1, tmpReg1, (int8_t)SHUFFLE_XXWW); - inst_RV_RV(INS_addps, targetReg, tmpReg1); - } - else if (baseType == TYP_FLOAT) - { - // v0 = v1 * v2 - // tmp = v0 // v0 = (3, 2, 1, 0) - each element is given by its - // // position - // tmp = shuffle(tmp, tmp, SHUFFLE_ZWXY) // tmp = (2, 3, 0, 1) - // v0 = v0 + tmp // v0 = (3+2, 2+3, 1+0, 0+1) - // tmp = v0 - // tmp = shuffle(tmp, tmp, SHUFFLE_XYZW) // tmp = (0+1, 1+0, 2+3, 3+2) - // v0 = v0 + tmp // v0 = (0+1+2+3, 0+1+2+3, 0+1+2+3, 0+1+2+3) - // // Essentially horizontal addition of all elements. - // // We could achieve the same using SSEv3 instruction - // // HADDPS. - // - inst_RV_RV(INS_mulps, targetReg, op2Reg); - inst_RV_RV(INS_movaps, tmpReg1, targetReg); - inst_RV_RV_IV(INS_shufps, EA_16BYTE, tmpReg1, tmpReg1, (int8_t)SHUFFLE_ZWXY); - inst_RV_RV(INS_addps, targetReg, tmpReg1); - inst_RV_RV(INS_movaps, tmpReg1, targetReg); - inst_RV_RV_IV(INS_shufps, EA_16BYTE, tmpReg1, tmpReg1, (int8_t)SHUFFLE_XYZW); - inst_RV_RV(INS_addps, targetReg, tmpReg1); - } - else - { - assert(baseType == TYP_DOUBLE); - - // v0 = v1 * v2 - // tmp = v0 // v0 = (1, 0) - each element is given by its position - // tmp = shuffle(tmp, tmp, Shuffle(0,1)) // tmp = (0, 1) - // v0 = v0 + tmp // v0 = (1+0, 0+1) - inst_RV_RV(INS_mulpd, targetReg, op2Reg); - inst_RV_RV(INS_movaps, tmpReg1, targetReg); - inst_RV_RV_IV(INS_shufpd, EA_16BYTE, tmpReg1, tmpReg1, 0x01); - inst_RV_RV(INS_addpd, targetReg, tmpReg1); - } - } - else - { - assert(level >= SIMD_SSE4_Supported); - - if (varTypeIsFloating(baseType)) - { - // We avoid reg move if either op1Reg == targetReg or op2Reg == targetReg. - // Note that this is a duplicate of the code above for SSE, but in the AVX case we can eventually - // use the 3-op form, so that we can avoid these copies. - // TODO-CQ: Add inst_RV_RV_RV_IV(). - if (op1Reg == targetReg) - { - // Best case - // nothing to do, we have registers in the right place - } - else if (op2Reg == targetReg) - { - op2Reg = op1Reg; - } - else - { - inst_RV_RV(ins_Copy(simdType), targetReg, op1Reg, simdEvalType, emitActualTypeSize(simdType)); - } - - emitAttr emitSize = emitActualTypeSize(simdEvalType); - if (baseType == TYP_FLOAT) - { - // dpps computes the dot product of the upper & lower halves of the 32-byte register. - // Notice that if this is a TYP_SIMD16 or smaller on AVX, then we don't need a tmpReg. - unsigned mask = ((simdNode->gtFlags & GTF_SIMD12_OP) != 0) ? 0x71 : 0xf1; - assert((mask >= 0) && (mask <= 255)); - inst_RV_RV_IV(INS_dpps, emitSize, targetReg, op2Reg, (int8_t)mask); - // dpps computes the dot product of the upper & lower halves of the 32-byte register. - // Notice that if this is a TYP_SIMD16 or smaller on AVX, then we don't need a tmpReg. - // If this is TYP_SIMD32, we need to combine the lower & upper results. - if (simdEvalType == TYP_SIMD32) - { - GetEmitter()->emitIns_R_R_I(INS_vextractf128, EA_32BYTE, tmpReg1, targetReg, 0x01); - inst_RV_RV(INS_addps, targetReg, tmpReg1, targetType, emitTypeSize(targetType)); - } - } - else if (baseType == TYP_DOUBLE) - { - if (simdEvalType == TYP_SIMD32) - { - // targetReg = targetReg * op2Reg - // targetReg = vhaddpd(targetReg, targetReg) ; horizontal sum of lower & upper halves - // tmpReg = vextractf128(targetReg, 1) ; Moves the upper sum into tempReg - // targetReg = targetReg + tmpReg1 - inst_RV_RV(INS_mulpd, targetReg, op2Reg, simdEvalType, emitActualTypeSize(simdType)); - inst_RV_RV(INS_haddpd, targetReg, targetReg, simdEvalType, emitActualTypeSize(simdType)); - GetEmitter()->emitIns_R_R_I(INS_vextractf128, EA_32BYTE, tmpReg1, targetReg, 0x01); - inst_RV_RV(INS_addpd, targetReg, tmpReg1, targetType, emitTypeSize(targetType)); - } - else - { - // On AVX, we have no 16-byte vectors of double. Note that, if we did, we could use - // dppd directly. - assert(level == SIMD_SSE4_Supported); - inst_RV_RV_IV(INS_dppd, emitSize, targetReg, op2Reg, 0x31); - } - } - } - else - { - // Dot product of 32-byte int vector on SSE4/AVX. - assert(baseType == TYP_INT); - assert(simdEvalType == TYP_SIMD16 || simdEvalType == TYP_SIMD32); - -#ifdef DEBUG - // SSE4: We need 1 scratch register. - // AVX2: We need 2 scratch registers. - if (simdEvalType == TYP_SIMD16) - { - assert(tmpReg1 != REG_NA); - } - else - { - assert(tmpReg1 != REG_NA); - assert(tmpReg2 != REG_NA); - } -#endif - - // tmpReg1 = op1 * op2 - if (level == SIMD_AVX2_Supported) - { - // On AVX take advantage 3 operand form of pmulld - inst_RV_RV_RV(INS_pmulld, tmpReg1, op1Reg, op2Reg, emitTypeSize(simdEvalType)); - } - else - { - inst_RV_RV(ins_Copy(simdEvalType), tmpReg1, op1Reg, simdEvalType); - inst_RV_RV(INS_pmulld, tmpReg1, op2Reg, simdEvalType); - } - - if (simdEvalType == TYP_SIMD32) - { - // tmpReg2[127..0] = Upper 128-bits of tmpReg1 - GetEmitter()->emitIns_R_R_I(INS_vextractf128, EA_32BYTE, tmpReg2, tmpReg1, 0x01); - - // tmpReg1[127..0] = tmpReg1[127..0] + tmpReg2[127..0] - // This will compute - // tmpReg1[0] = op1[0]*op2[0] + op1[4]*op2[4] - // tmpReg1[1] = op1[1]*op2[1] + op1[5]*op2[5] - // tmpReg1[2] = op1[2]*op2[2] + op1[6]*op2[6] - // tmpReg1[4] = op1[4]*op2[4] + op1[7]*op2[7] - inst_RV_RV(INS_paddd, tmpReg1, tmpReg2, TYP_SIMD16, EA_16BYTE); - } - - // This horizontal add will compute - // - // TYP_SIMD16: - // tmpReg1[0] = tmpReg1[2] = op1[0]*op2[0] + op1[1]*op2[1] - // tmpReg1[1] = tmpReg1[3] = op1[2]*op2[2] + op1[4]*op2[4] - // - // TYP_SIMD32: - // tmpReg1[0] = tmpReg1[2] = op1[0]*op2[0] + op1[4]*op2[4] + op1[1]*op2[1] + op1[5]*op2[5] - // tmpReg1[1] = tmpReg1[3] = op1[2]*op2[2] + op1[6]*op2[6] + op1[4]*op2[4] + op1[7]*op2[7] - inst_RV_RV(INS_phaddd, tmpReg1, tmpReg1, TYP_SIMD16, EA_16BYTE); - - // DotProduct(op1, op2) = tmpReg1[0] = tmpReg1[0] + tmpReg1[1] - inst_RV_RV(INS_phaddd, tmpReg1, tmpReg1, TYP_SIMD16, EA_16BYTE); - - // TargetReg = integer result from tmpReg1 - // (Note that for mov_xmm2i, the int register is always in the reg2 position) - inst_RV_RV(INS_mov_xmm2i, tmpReg1, targetReg, TYP_INT); - } - } - - genProduceReg(simdNode); -} - //------------------------------------------------------------------------------------ // genSIMDIntrinsicGetItem: Generate code for SIMD Intrinsic get element at index i. // @@ -2144,6 +1667,17 @@ void CodeGen::genSIMDIntrinsicGetItem(GenTreeSIMD* simdNode) bool isEBPbased; unsigned varNum = op1->AsLclVarCommon()->GetLclNum(); offset += compiler->lvaFrameAddress(varNum, &isEBPbased); + +#if !FEATURE_FIXED_OUT_ARGS + if (!isEBPbased) + { + // Adjust the offset by the amount currently pushed on the CPU stack + offset += genStackLevel; + } +#else + assert(genStackLevel == 0); +#endif // !FEATURE_FIXED_OUT_ARGS + if (op1->OperGet() == GT_LCL_FLD) { offset += op1->AsLclFld()->GetLclOffs(); @@ -2192,8 +1726,19 @@ void CodeGen::genSIMDIntrinsicGetItem(GenTreeSIMD* simdNode) { unsigned simdInitTempVarNum = compiler->lvaSIMDInitTempVarNum; noway_assert(simdInitTempVarNum != BAD_VAR_NUM); - bool isEBPbased; - unsigned offs = compiler->lvaFrameAddress(simdInitTempVarNum, &isEBPbased); + bool isEBPbased; + unsigned offs = compiler->lvaFrameAddress(simdInitTempVarNum, &isEBPbased); + +#if !FEATURE_FIXED_OUT_ARGS + if (!isEBPbased) + { + // Adjust the offset by the amount currently pushed on the CPU stack + offs += genStackLevel; + } +#else + assert(genStackLevel == 0); +#endif // !FEATURE_FIXED_OUT_ARGS + regNumber indexReg = op2->GetRegNum(); // Store the vector to the temp location. @@ -2881,10 +2426,7 @@ void CodeGen::genSIMDIntrinsic(GenTreeSIMD* simdNode) genSIMDIntrinsicNarrow(simdNode); break; - case SIMDIntrinsicAdd: case SIMDIntrinsicSub: - case SIMDIntrinsicMul: - case SIMDIntrinsicDiv: case SIMDIntrinsicBitwiseAnd: case SIMDIntrinsicBitwiseOr: genSIMDIntrinsicBinOp(simdNode); @@ -2894,10 +2436,6 @@ void CodeGen::genSIMDIntrinsic(GenTreeSIMD* simdNode) genSIMDIntrinsicRelOp(simdNode); break; - case SIMDIntrinsicDotProduct: - genSIMDIntrinsicDotProduct(simdNode); - break; - case SIMDIntrinsicGetItem: genSIMDIntrinsicGetItem(simdNode); break; diff --git a/src/coreclr/src/jit/simdintrinsiclist.h b/src/coreclr/src/jit/simdintrinsiclist.h index 813a937fd056..fb806804a569 100644 --- a/src/coreclr/src/jit/simdintrinsiclist.h +++ b/src/coreclr/src/jit/simdintrinsiclist.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*****************************************************************************/ #ifndef SIMD_INTRINSIC @@ -39,11 +38,6 @@ ***************************************************************************************************************************************************************************************************************************/ SIMD_INTRINSIC(nullptr, false, None, "None", TYP_UNDEF, 0, {TYP_UNDEF, TYP_UNDEF, TYP_UNDEF}, {TYP_UNDEF, TYP_UNDEF, TYP_UNDEF, TYP_UNDEF, TYP_UNDEF, TYP_UNDEF, TYP_UNDEF, TYP_UNDEF, TYP_UNDEF, TYP_UNDEF}) -SIMD_INTRINSIC("get_Count", false, GetCount, "count", TYP_INT, 0, {TYP_VOID, TYP_UNDEF, TYP_UNDEF}, {TYP_INT, TYP_FLOAT, TYP_DOUBLE, TYP_LONG, TYP_USHORT, TYP_UBYTE, TYP_BYTE, TYP_SHORT, TYP_UINT, TYP_ULONG}) -SIMD_INTRINSIC("get_One", false, GetOne, "one", TYP_STRUCT, 0, {TYP_VOID, TYP_UNDEF, TYP_UNDEF}, {TYP_INT, TYP_FLOAT, TYP_DOUBLE, TYP_LONG, TYP_USHORT, TYP_UBYTE, TYP_BYTE, TYP_SHORT, TYP_UINT, TYP_ULONG}) -SIMD_INTRINSIC("get_Zero", false, GetZero, "zero", TYP_STRUCT, 0, {TYP_VOID, TYP_UNDEF, TYP_UNDEF}, {TYP_INT, TYP_FLOAT, TYP_DOUBLE, TYP_LONG, TYP_USHORT, TYP_UBYTE, TYP_BYTE, TYP_SHORT, TYP_UINT, TYP_ULONG}) -SIMD_INTRINSIC("get_AllOnes", false, GetAllOnes, "allOnes", TYP_STRUCT, 0, {TYP_VOID, TYP_UNDEF, TYP_UNDEF}, {TYP_INT, TYP_FLOAT, TYP_DOUBLE, TYP_LONG, TYP_USHORT, TYP_UBYTE, TYP_BYTE, TYP_SHORT, TYP_UINT, TYP_ULONG}) - // .ctor call or newobj - there are four forms. // This form takes the object plus a value of the base (element) type: SIMD_INTRINSIC(".ctor", true, Init, "init", TYP_VOID, 2, {TYP_BYREF, TYP_UNKNOWN, TYP_UNDEF}, {TYP_INT, TYP_FLOAT, TYP_DOUBLE, TYP_LONG, TYP_USHORT, TYP_UBYTE, TYP_BYTE, TYP_SHORT, TYP_UINT, TYP_ULONG}) @@ -77,18 +71,8 @@ SIMD_INTRINSIC("set_Z", true, SetZ, SIMD_INTRINSIC("set_W", true, SetW, "setW", TYP_VOID, 2, {TYP_BYREF, TYP_UNKNOWN, TYP_UNDEF}, {TYP_FLOAT, TYP_UNDEF, TYP_UNDEF, TYP_UNDEF, TYP_UNDEF, TYP_UNDEF, TYP_UNDEF, TYP_UNDEF, TYP_UNDEF, TYP_UNDEF}) // Arithmetic Operations -SIMD_INTRINSIC("op_Addition", false, Add, "+", TYP_STRUCT, 2, {TYP_STRUCT, TYP_STRUCT, TYP_UNDEF}, {TYP_INT, TYP_FLOAT, TYP_DOUBLE, TYP_LONG, TYP_USHORT, TYP_UBYTE, TYP_BYTE, TYP_SHORT, TYP_UINT, TYP_ULONG}) SIMD_INTRINSIC("op_Subtraction", false, Sub, "-", TYP_STRUCT, 2, {TYP_STRUCT, TYP_STRUCT, TYP_UNDEF}, {TYP_INT, TYP_FLOAT, TYP_DOUBLE, TYP_LONG, TYP_USHORT, TYP_UBYTE, TYP_BYTE, TYP_SHORT, TYP_UINT, TYP_ULONG}) -#if defined(TARGET_XARCH) -SIMD_INTRINSIC("op_Multiply", false, Mul, "*", TYP_STRUCT, 2, {TYP_STRUCT, TYP_STRUCT, TYP_UNDEF}, {TYP_INT, TYP_FLOAT, TYP_DOUBLE, TYP_SHORT,TYP_UNDEF, TYP_UNDEF, TYP_UNDEF, TYP_UNDEF, TYP_UNDEF, TYP_UNDEF}) -#elif defined(TARGET_ARM64) -// TODO-ARM64-CQ Investigate code sequence to accelerate LONG/ULONG vector multiply -SIMD_INTRINSIC("op_Multiply", false, Mul, "*", TYP_STRUCT, 2, {TYP_STRUCT, TYP_STRUCT, TYP_UNDEF}, {TYP_INT, TYP_FLOAT, TYP_DOUBLE, TYP_USHORT, TYP_UBYTE, TYP_BYTE, TYP_SHORT, TYP_UINT, TYP_UNDEF, TYP_UNDEF}) -#endif - -SIMD_INTRINSIC("op_Division", false, Div, "/", TYP_STRUCT, 2, {TYP_STRUCT, TYP_STRUCT, TYP_UNDEF}, {TYP_FLOAT, TYP_DOUBLE, TYP_UNDEF, TYP_UNDEF, TYP_UNDEF, TYP_UNDEF, TYP_UNDEF, TYP_UNDEF, TYP_UNDEF, TYP_UNDEF}) - // Vector Relational operators SIMD_INTRINSIC("Equals", false, Equal, "eq", TYP_STRUCT, 2, {TYP_STRUCT, TYP_STRUCT, TYP_UNDEF}, {TYP_INT, TYP_FLOAT, TYP_DOUBLE, TYP_LONG, TYP_USHORT, TYP_UBYTE, TYP_BYTE, TYP_SHORT, TYP_UINT, TYP_ULONG}) @@ -96,15 +80,6 @@ SIMD_INTRINSIC("Equals", false, Equal, SIMD_INTRINSIC("op_BitwiseAnd", false, BitwiseAnd, "&", TYP_STRUCT, 2, {TYP_STRUCT, TYP_STRUCT, TYP_UNDEF}, {TYP_INT, TYP_FLOAT, TYP_DOUBLE, TYP_LONG, TYP_USHORT, TYP_UBYTE, TYP_BYTE, TYP_SHORT, TYP_UINT, TYP_ULONG}) SIMD_INTRINSIC("op_BitwiseOr", false, BitwiseOr, "|", TYP_STRUCT, 2, {TYP_STRUCT, TYP_STRUCT, TYP_UNDEF}, {TYP_INT, TYP_FLOAT, TYP_DOUBLE, TYP_LONG, TYP_USHORT, TYP_UBYTE, TYP_BYTE, TYP_SHORT, TYP_UINT, TYP_ULONG}) -// Dot Product -#if defined(TARGET_XARCH) -// Is supported only on Vector on AVX. -SIMD_INTRINSIC("Dot", false, DotProduct, "Dot", TYP_UNKNOWN, 2, {TYP_STRUCT, TYP_STRUCT, TYP_UNDEF}, {TYP_INT, TYP_FLOAT, TYP_DOUBLE, TYP_UNDEF, TYP_UNDEF, TYP_UNDEF, TYP_UNDEF, TYP_UNDEF, TYP_UNDEF, TYP_UNDEF}) -#elif defined(TARGET_ARM64) -// Dot Product does not support LONG/ULONG due to lack of multiply support (see TODO-ARM64-CQ above) -SIMD_INTRINSIC("Dot", false, DotProduct, "Dot", TYP_UNKNOWN, 2, {TYP_STRUCT, TYP_STRUCT, TYP_UNDEF}, {TYP_INT, TYP_FLOAT, TYP_DOUBLE, TYP_USHORT, TYP_UBYTE, TYP_BYTE, TYP_SHORT, TYP_UINT, TYP_UNDEF, TYP_UNDEF}) -#endif - // Cast SIMD_INTRINSIC("op_Explicit", false, Cast, "Cast", TYP_STRUCT, 1, {TYP_STRUCT, TYP_UNDEF, TYP_UNDEF}, {TYP_INT, TYP_FLOAT, TYP_DOUBLE, TYP_LONG, TYP_USHORT, TYP_UBYTE, TYP_BYTE, TYP_SHORT, TYP_UINT, TYP_ULONG}) diff --git a/src/coreclr/src/jit/sm.cpp b/src/coreclr/src/jit/sm.cpp index b01689976198..5cd6e9879c78 100644 --- a/src/coreclr/src/jit/sm.cpp +++ b/src/coreclr/src/jit/sm.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/src/coreclr/src/jit/sm.h b/src/coreclr/src/jit/sm.h index 8c90e0b7f92a..fddcf2d697cd 100644 --- a/src/coreclr/src/jit/sm.h +++ b/src/coreclr/src/jit/sm.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // State machine header used ONLY in the JIT. diff --git a/src/coreclr/src/jit/smallhash.h b/src/coreclr/src/jit/smallhash.h index 5900d286b602..6f72b1e9ab68 100644 --- a/src/coreclr/src/jit/smallhash.h +++ b/src/coreclr/src/jit/smallhash.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _SMALLHASHTABLE_H_ #define _SMALLHASHTABLE_H_ diff --git a/src/coreclr/src/jit/smcommon.cpp b/src/coreclr/src/jit/smcommon.cpp index d17e21b874ae..511c8557fae9 100644 --- a/src/coreclr/src/jit/smcommon.cpp +++ b/src/coreclr/src/jit/smcommon.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #if defined(DEBUG) || defined(SMGEN_COMPILE) diff --git a/src/coreclr/src/jit/smcommon.h b/src/coreclr/src/jit/smcommon.h index 0c33e05a7b12..a6de234b523e 100644 --- a/src/coreclr/src/jit/smcommon.h +++ b/src/coreclr/src/jit/smcommon.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // Common headers used both in smgen.exe and the JIT. diff --git a/src/coreclr/src/jit/smdata.cpp b/src/coreclr/src/jit/smdata.cpp index e911430e127e..30b0a7b81d7b 100644 --- a/src/coreclr/src/jit/smdata.cpp +++ b/src/coreclr/src/jit/smdata.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // diff --git a/src/coreclr/src/jit/smopcode.def b/src/coreclr/src/jit/smopcode.def index aa918601c292..0b25962af461 100644 --- a/src/coreclr/src/jit/smopcode.def +++ b/src/coreclr/src/jit/smopcode.def @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /******************************************************************************************* ** ** diff --git a/src/coreclr/src/jit/smopcodemap.def b/src/coreclr/src/jit/smopcodemap.def index 2094c267ebf0..e5912ee86af2 100644 --- a/src/coreclr/src/jit/smopcodemap.def +++ b/src/coreclr/src/jit/smopcodemap.def @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /******************************************************************************************* ** ** diff --git a/src/coreclr/src/jit/smopenum.h b/src/coreclr/src/jit/smopenum.h index 978bbc2c3bb3..dc1fd6a81033 100644 --- a/src/coreclr/src/jit/smopenum.h +++ b/src/coreclr/src/jit/smopenum.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __smopenum_h__ #define __smopenum_h__ diff --git a/src/coreclr/src/jit/smweights.cpp b/src/coreclr/src/jit/smweights.cpp index fdf50a914db4..ec55072436eb 100644 --- a/src/coreclr/src/jit/smweights.cpp +++ b/src/coreclr/src/jit/smweights.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // diff --git a/src/coreclr/src/jit/ssabuilder.cpp b/src/coreclr/src/jit/ssabuilder.cpp index 8730a277c6fd..d562065bf216 100644 --- a/src/coreclr/src/jit/ssabuilder.cpp +++ b/src/coreclr/src/jit/ssabuilder.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "jitpch.h" #include "ssaconfig.h" @@ -749,7 +748,15 @@ void SsaBuilder::RenameDef(GenTreeOp* asgNode, BasicBlock* block) if (isLocal) { - unsigned lclNum = lclNode->GetLclNum(); + unsigned lclNum = lclNode->GetLclNum(); + LclVarDsc* varDsc = m_pCompiler->lvaGetDesc(lclNum); + + if (!m_pCompiler->lvaInSsa(lclNum) && varDsc->CanBeReplacedWithItsField(m_pCompiler)) + { + lclNum = varDsc->lvFieldLclStart; + varDsc = m_pCompiler->lvaGetDesc(lclNum); + assert(isFullDef); + } if (m_pCompiler->lvaInSsa(lclNum)) { @@ -758,7 +765,7 @@ void SsaBuilder::RenameDef(GenTreeOp* asgNode, BasicBlock* block) // This should have been marked as defintion. assert((lclNode->gtFlags & GTF_VAR_DEF) != 0); - unsigned ssaNum = m_pCompiler->lvaGetDesc(lclNum)->lvPerSsaData.AllocSsaNum(m_allocator, block, asgNode); + unsigned ssaNum = varDsc->lvPerSsaData.AllocSsaNum(m_allocator, block, asgNode); if (!isFullDef) { @@ -787,7 +794,7 @@ void SsaBuilder::RenameDef(GenTreeOp* asgNode, BasicBlock* block) } // If it's a SSA local then it cannot be address exposed and thus does not define SSA memory. - assert(!m_pCompiler->lvaVarAddrExposed(lclNode->GetLclNum())); + assert(!m_pCompiler->lvaVarAddrExposed(lclNum)); return; } @@ -1542,6 +1549,9 @@ void SsaBuilder::Build() m_pCompiler->fgLocalVarLiveness(); EndPhase(PHASE_BUILD_SSA_LIVENESS); + m_pCompiler->optRemoveRedundantZeroInits(); + EndPhase(PHASE_ZERO_INITS); + // Mark all variables that will be tracked by SSA for (unsigned lclNum = 0; lclNum < m_pCompiler->lvaCount; lclNum++) { diff --git a/src/coreclr/src/jit/ssabuilder.h b/src/coreclr/src/jit/ssabuilder.h index 5bdc752c696b..6d1a9fbd5542 100644 --- a/src/coreclr/src/jit/ssabuilder.h +++ b/src/coreclr/src/jit/ssabuilder.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma once #pragma warning(disable : 4503) // 'identifier' : decorated name length exceeded, name was truncated diff --git a/src/coreclr/src/jit/ssaconfig.h b/src/coreclr/src/jit/ssaconfig.h index a4ff0604d6f6..43a00c53dcc5 100644 --- a/src/coreclr/src/jit/ssaconfig.h +++ b/src/coreclr/src/jit/ssaconfig.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma once diff --git a/src/coreclr/src/jit/ssarenamestate.cpp b/src/coreclr/src/jit/ssarenamestate.cpp index c715aeb6438e..55a96f3b2cf4 100644 --- a/src/coreclr/src/jit/ssarenamestate.cpp +++ b/src/coreclr/src/jit/ssarenamestate.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "jitpch.h" #include "ssaconfig.h" diff --git a/src/coreclr/src/jit/ssarenamestate.h b/src/coreclr/src/jit/ssarenamestate.h index 5edc2008c563..37dc332746b5 100644 --- a/src/coreclr/src/jit/ssarenamestate.h +++ b/src/coreclr/src/jit/ssarenamestate.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma once diff --git a/src/coreclr/src/jit/stacklevelsetter.cpp b/src/coreclr/src/jit/stacklevelsetter.cpp index 0cf9dd34ade6..fa48b8080ea1 100644 --- a/src/coreclr/src/jit/stacklevelsetter.cpp +++ b/src/coreclr/src/jit/stacklevelsetter.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "jitpch.h" #ifdef _MSC_VER diff --git a/src/coreclr/src/jit/stacklevelsetter.h b/src/coreclr/src/jit/stacklevelsetter.h index b568980e6712..f43558f09769 100644 --- a/src/coreclr/src/jit/stacklevelsetter.h +++ b/src/coreclr/src/jit/stacklevelsetter.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma once diff --git a/src/coreclr/src/jit/static/CMakeLists.txt b/src/coreclr/src/jit/static/CMakeLists.txt new file mode 100644 index 000000000000..b4e62c041cd4 --- /dev/null +++ b/src/coreclr/src/jit/static/CMakeLists.txt @@ -0,0 +1,15 @@ +project(ClrJit) + +set_source_files_properties(${JIT_EXPORTS_FILE} PROPERTIES GENERATED TRUE) + +add_library_clr(clrjit_static + OBJECT + ${JIT_CORE_SOURCES} + ${JIT_ARCH_SOURCES} +) + +if(CLR_CMAKE_HOST_UNIX) + add_dependencies(clrjit_static coreclrpal gcinfo) +endif(CLR_CMAKE_HOST_UNIX) + +target_precompile_header(TARGET clrjit_static HEADER jitpch.h ADDITIONAL_INCLUDE_DIRECTORIES ${JIT_SOURCE_DIR}) diff --git a/src/coreclr/src/jit/static/clrjit.def b/src/coreclr/src/jit/static/clrjit.def new file mode 100644 index 000000000000..0afb54dca77d --- /dev/null +++ b/src/coreclr/src/jit/static/clrjit.def @@ -0,0 +1,5 @@ +; Licensed to the .NET Foundation under one or more agreements. +; The .NET Foundation licenses this file to you under the MIT license. +EXPORTS + getJit + jitStartup diff --git a/src/coreclr/src/jit/target.h b/src/coreclr/src/jit/target.h index 78384435c549..4229d39b3266 100644 --- a/src/coreclr/src/jit/target.h +++ b/src/coreclr/src/jit/target.h @@ -1,15 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*****************************************************************************/ #ifndef TARGET_H_ #define TARGET_H_ -#if defined(TARGET_UNIX) -#define FEATURE_VARARG 0 -#else +// Native Varargs are not supported on Unix (all architectures) and Windows ARM +#if defined(TARGET_WINDOWS) && !defined(TARGET_ARM) #define FEATURE_VARARG 1 +#else +#define FEATURE_VARARG 0 #endif /*****************************************************************************/ diff --git a/src/coreclr/src/jit/targetamd64.cpp b/src/coreclr/src/jit/targetamd64.cpp index 78d77fea8936..143e6e464180 100644 --- a/src/coreclr/src/jit/targetamd64.cpp +++ b/src/coreclr/src/jit/targetamd64.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*****************************************************************************/ diff --git a/src/coreclr/src/jit/targetarm.cpp b/src/coreclr/src/jit/targetarm.cpp index 64e0c92d21c9..ca974a76af39 100644 --- a/src/coreclr/src/jit/targetarm.cpp +++ b/src/coreclr/src/jit/targetarm.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*****************************************************************************/ diff --git a/src/coreclr/src/jit/targetarm64.cpp b/src/coreclr/src/jit/targetarm64.cpp index cba0916158f1..7b035f145b01 100644 --- a/src/coreclr/src/jit/targetarm64.cpp +++ b/src/coreclr/src/jit/targetarm64.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*****************************************************************************/ diff --git a/src/coreclr/src/jit/targetx86.cpp b/src/coreclr/src/jit/targetx86.cpp index 63128689f27f..391a934e5b9e 100644 --- a/src/coreclr/src/jit/targetx86.cpp +++ b/src/coreclr/src/jit/targetx86.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*****************************************************************************/ diff --git a/src/coreclr/src/jit/tinyarray.h b/src/coreclr/src/jit/tinyarray.h index bee59bdb594e..ef3a12756b9d 100644 --- a/src/coreclr/src/jit/tinyarray.h +++ b/src/coreclr/src/jit/tinyarray.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef TINYARRAY_H #define TINYARRAY_H diff --git a/src/coreclr/src/jit/titypes.h b/src/coreclr/src/jit/titypes.h index a659320709dd..02e71cc38a91 100644 --- a/src/coreclr/src/jit/titypes.h +++ b/src/coreclr/src/jit/titypes.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. DEF_TI(TI_ERROR, "") DEF_TI(TI_REF, "Ref") diff --git a/src/coreclr/src/jit/treelifeupdater.cpp b/src/coreclr/src/jit/treelifeupdater.cpp index e9ba11f80eab..d81ce887218d 100644 --- a/src/coreclr/src/jit/treelifeupdater.cpp +++ b/src/coreclr/src/jit/treelifeupdater.cpp @@ -220,24 +220,24 @@ void TreeLifeUpdater::UpdateLifeVar(GenTree* tree) // if it's a partial definition then variable "x" must have had a previous, original, site to be born. bool isBorn; bool isDying; - bool spill; + // GTF_SPILL will be set on a MultiRegLclVar if any registers need to be spilled. + bool spill = ((lclVarTree->gtFlags & GTF_SPILL) != 0); bool isMultiRegLocal = lclVarTree->IsMultiRegLclVar(); if (isMultiRegLocal) { - assert((tree->gtFlags & GTF_VAR_USEASG) == 0); - isBorn = ((tree->gtFlags & GTF_VAR_DEF) != 0); + // We should never have an 'IndirOfAddrOfLocal' for a multi-reg. + assert(lclVarTree == tree); + assert((lclVarTree->gtFlags & GTF_VAR_USEASG) == 0); + isBorn = ((lclVarTree->gtFlags & GTF_VAR_DEF) != 0); // Note that for multireg locals we can have definitions for which some of those are last uses. // We don't want to add those to the varDeltaSet because otherwise they will be added as newly // live. - isDying = !isBorn && tree->AsLclVar()->HasLastUse(); - // GTF_SPILL will be set if any registers need to be spilled. - spill = ((tree->gtFlags & GTF_SPILL) != 0); + isDying = !isBorn && lclVarTree->HasLastUse(); } else { isBorn = ((lclVarTree->gtFlags & GTF_VAR_DEF) != 0 && (lclVarTree->gtFlags & GTF_VAR_USEASG) == 0); isDying = ((lclVarTree->gtFlags & GTF_VAR_DEATH) != 0); - spill = ((lclVarTree->gtFlags & GTF_SPILL) != 0); } // Since all tracked vars are register candidates, but not all are in registers at all times, @@ -276,7 +276,8 @@ void TreeLifeUpdater::UpdateLifeVar(GenTree* tree) unsigned firstFieldVarNum = varDsc->lvFieldLclStart; for (unsigned i = 0; i < varDsc->lvFieldCnt; ++i) { - LclVarDsc* fldVarDsc = &(compiler->lvaTable[firstFieldVarNum + i]); + bool fieldIsSpilled = spill && ((lclVarTree->GetRegSpillFlagByIdx(i) & GTF_SPILL) != 0); + LclVarDsc* fldVarDsc = &(compiler->lvaTable[firstFieldVarNum + i]); noway_assert(fldVarDsc->lvIsStructField); assert(fldVarDsc->lvTracked); unsigned fldVarIndex = fldVarDsc->lvVarIndex; @@ -300,7 +301,7 @@ void TreeLifeUpdater::UpdateLifeVar(GenTree* tree) } compiler->codeGen->genUpdateRegLife(fldVarDsc, isBorn, isFieldDying DEBUGARG(tree)); // If this was marked for spill, genProduceReg should already have spilled it. - assert(!spill); + assert(!fieldIsSpilled); } } spill = false; diff --git a/src/coreclr/src/jit/treelifeupdater.h b/src/coreclr/src/jit/treelifeupdater.h index 80095f874f1c..00a31cd1b479 100644 --- a/src/coreclr/src/jit/treelifeupdater.h +++ b/src/coreclr/src/jit/treelifeupdater.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma once diff --git a/src/coreclr/src/jit/typeinfo.cpp b/src/coreclr/src/jit/typeinfo.cpp index 6dbafd9ec20c..eff009180167 100644 --- a/src/coreclr/src/jit/typeinfo.cpp +++ b/src/coreclr/src/jit/typeinfo.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/src/coreclr/src/jit/typelist.h b/src/coreclr/src/jit/typelist.h index a700d0fe6d8e..5f129106fcaf 100644 --- a/src/coreclr/src/jit/typelist.h +++ b/src/coreclr/src/jit/typelist.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #define GCS EA_GCREF #define BRS EA_BYREF diff --git a/src/coreclr/src/jit/unwind.cpp b/src/coreclr/src/jit/unwind.cpp index dff2df668bc5..7bbccd789d6c 100644 --- a/src/coreclr/src/jit/unwind.cpp +++ b/src/coreclr/src/jit/unwind.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/src/coreclr/src/jit/unwind.h b/src/coreclr/src/jit/unwind.h index 53105dd759f0..5541450e0ef7 100644 --- a/src/coreclr/src/jit/unwind.h +++ b/src/coreclr/src/jit/unwind.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/src/coreclr/src/jit/unwindamd64.cpp b/src/coreclr/src/jit/unwindamd64.cpp index 7ff069e1da9a..927400ad4e1d 100644 --- a/src/coreclr/src/jit/unwindamd64.cpp +++ b/src/coreclr/src/jit/unwindamd64.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/src/coreclr/src/jit/unwindarm.cpp b/src/coreclr/src/jit/unwindarm.cpp index 843083efb90a..4ca2b3db5e25 100644 --- a/src/coreclr/src/jit/unwindarm.cpp +++ b/src/coreclr/src/jit/unwindarm.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/src/coreclr/src/jit/unwindarm64.cpp b/src/coreclr/src/jit/unwindarm64.cpp index 9ae4eee3d512..d7356f4a1fd8 100644 --- a/src/coreclr/src/jit/unwindarm64.cpp +++ b/src/coreclr/src/jit/unwindarm64.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/src/coreclr/src/jit/unwindx86.cpp b/src/coreclr/src/jit/unwindx86.cpp index 997f94b8d01f..fa6cbe8eeb5d 100644 --- a/src/coreclr/src/jit/unwindx86.cpp +++ b/src/coreclr/src/jit/unwindx86.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/src/coreclr/src/jit/utils.cpp b/src/coreclr/src/jit/utils.cpp index 9af74b55b540..4477ceb16295 100644 --- a/src/coreclr/src/jit/utils.cpp +++ b/src/coreclr/src/jit/utils.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =================================================================================================== // Portions of the code implemented below are based on the 'Berkeley SoftFloat Release 3e' algorithms. diff --git a/src/coreclr/src/jit/utils.h b/src/coreclr/src/jit/utils.h index 7a7b96c96077..149ef88b0027 100644 --- a/src/coreclr/src/jit/utils.h +++ b/src/coreclr/src/jit/utils.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/src/coreclr/src/jit/valuenum.cpp b/src/coreclr/src/jit/valuenum.cpp index 2fb9c3ce14e4..1cc0cab621ca 100644 --- a/src/coreclr/src/jit/valuenum.cpp +++ b/src/coreclr/src/jit/valuenum.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -6859,6 +6858,12 @@ void Compiler::fgValueNumberTree(GenTree* tree) unsigned lclNum = lcl->GetLclNum(); LclVarDsc* varDsc = &lvaTable[lclNum]; + if (varDsc->CanBeReplacedWithItsField(this)) + { + lclNum = varDsc->lvFieldLclStart; + varDsc = &lvaTable[lclNum]; + } + // Do we have a Use (read) of the LclVar? // if ((lcl->gtFlags & GTF_VAR_DEF) == 0 || diff --git a/src/coreclr/src/jit/valuenum.h b/src/coreclr/src/jit/valuenum.h index d4167a00c074..9f3cc2025be2 100644 --- a/src/coreclr/src/jit/valuenum.h +++ b/src/coreclr/src/jit/valuenum.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // Defines the class "ValueNumStore", which maintains value numbers for a compilation. diff --git a/src/coreclr/src/jit/valuenumfuncs.h b/src/coreclr/src/jit/valuenumfuncs.h index 9c6922e8ae30..9e191ffaa614 100644 --- a/src/coreclr/src/jit/valuenumfuncs.h +++ b/src/coreclr/src/jit/valuenumfuncs.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // Defines the functions understood by the value-numbering system. // ValueNumFuncDef(, , , , diff --git a/src/coreclr/src/jit/valuenumtype.h b/src/coreclr/src/jit/valuenumtype.h index f14bc6a735ae..326f0ef65fda 100644 --- a/src/coreclr/src/jit/valuenumtype.h +++ b/src/coreclr/src/jit/valuenumtype.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // Defines the type "ValueNum". diff --git a/src/coreclr/src/jit/varset.h b/src/coreclr/src/jit/varset.h index 09fa2f7b61fd..c19406166714 100644 --- a/src/coreclr/src/jit/varset.h +++ b/src/coreclr/src/jit/varset.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // This include file determines how VARSET_TP is implemented. diff --git a/src/coreclr/src/jit/vartype.h b/src/coreclr/src/jit/vartype.h index e34ee7e5a8df..d7a42c9e9cdd 100644 --- a/src/coreclr/src/jit/vartype.h +++ b/src/coreclr/src/jit/vartype.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*****************************************************************************/ #ifndef _VARTYPE_H_ diff --git a/src/coreclr/src/libraries-native/CMakeLists.txt b/src/coreclr/src/libraries-native/CMakeLists.txt index 58a6e893b20b..65b0d06c29ca 100644 --- a/src/coreclr/src/libraries-native/CMakeLists.txt +++ b/src/coreclr/src/libraries-native/CMakeLists.txt @@ -9,7 +9,3 @@ include_directories("${CLR_REPO_ROOT_DIR}/src/libraries/Native/Unix/Common") add_subdirectory(${GLOBALIZATION_NATIVE_DIR} System.Globalization.Native) -add_library(libraries-native - STATIC - entrypoints.c -) diff --git a/src/coreclr/src/md/ceefilegen/CMakeLists.txt b/src/coreclr/src/md/ceefilegen/CMakeLists.txt index 90749c806b23..39864c71817f 100644 --- a/src/coreclr/src/md/ceefilegen/CMakeLists.txt +++ b/src/coreclr/src/md/ceefilegen/CMakeLists.txt @@ -26,7 +26,7 @@ if (CLR_CMAKE_TARGET_WIN32) endif (CLR_CMAKE_TARGET_WIN32) add_library_clr(ceefgen - STATIC + OBJECT ${CEEFILEGEN_SOURCES} ) target_precompile_header(TARGET ceefgen HEADER stdafx.h) diff --git a/src/coreclr/src/md/ceefilegen/blobfetcher.cpp b/src/coreclr/src/md/ceefilegen/blobfetcher.cpp index 444e543a0594..a4c21029ea05 100644 --- a/src/coreclr/src/md/ceefilegen/blobfetcher.cpp +++ b/src/coreclr/src/md/ceefilegen/blobfetcher.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // Implementation for CBlobFetcher // diff --git a/src/coreclr/src/md/ceefilegen/cceegen.cpp b/src/coreclr/src/md/ceefilegen/cceegen.cpp index ad5d7fc00d51..9be6c99ff9ba 100644 --- a/src/coreclr/src/md/ceefilegen/cceegen.cpp +++ b/src/coreclr/src/md/ceefilegen/cceegen.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/md/ceefilegen/ceegentokenmapper.cpp b/src/coreclr/src/md/ceefilegen/ceegentokenmapper.cpp index bdf0024588fd..c94597c68f83 100644 --- a/src/coreclr/src/md/ceefilegen/ceegentokenmapper.cpp +++ b/src/coreclr/src/md/ceefilegen/ceegentokenmapper.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // CeeGenTokenMapper.cpp // diff --git a/src/coreclr/src/md/ceefilegen/ceesectionstring.cpp b/src/coreclr/src/md/ceefilegen/ceesectionstring.cpp index 4a0af7970d20..2575d56d0c67 100644 --- a/src/coreclr/src/md/ceefilegen/ceesectionstring.cpp +++ b/src/coreclr/src/md/ceefilegen/ceesectionstring.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: CeeSectionString.cpp // diff --git a/src/coreclr/src/md/ceefilegen/pesectionman.cpp b/src/coreclr/src/md/ceefilegen/pesectionman.cpp index e4d96312b076..a75558be4d8c 100644 --- a/src/coreclr/src/md/ceefilegen/pesectionman.cpp +++ b/src/coreclr/src/md/ceefilegen/pesectionman.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // PESectionMan implementation // diff --git a/src/coreclr/src/md/ceefilegen/stdafx.h b/src/coreclr/src/md/ceefilegen/stdafx.h index 431d7e8f34eb..36f42f95aa52 100644 --- a/src/coreclr/src/md/ceefilegen/stdafx.h +++ b/src/coreclr/src/md/ceefilegen/stdafx.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // stdafx.h // diff --git a/src/coreclr/src/md/compiler/CMakeLists.txt b/src/coreclr/src/md/compiler/CMakeLists.txt index 3b916cdc9fe8..6b89cfa5308d 100644 --- a/src/coreclr/src/md/compiler/CMakeLists.txt +++ b/src/coreclr/src/md/compiler/CMakeLists.txt @@ -58,7 +58,7 @@ add_library_clr(mdcompiler_dac ${MDCOMPILER_SOURCES}) set_target_properties(mdcompiler_dac PROPERTIES DAC_COMPONENT TRUE) target_precompile_header(TARGET mdcompiler_dac HEADER stdafx.h) -add_library_clr(mdcompiler_wks ${MDCOMPILER_SOURCES}) +add_library_clr(mdcompiler_wks OBJECT ${MDCOMPILER_SOURCES}) target_compile_definitions(mdcompiler_wks PRIVATE FEATURE_METADATA_EMIT_ALL) target_precompile_header(TARGET mdcompiler_wks HEADER stdafx.h) diff --git a/src/coreclr/src/md/compiler/assemblymd.cpp b/src/coreclr/src/md/compiler/assemblymd.cpp index f2d7219bbe67..d778c636722a 100644 --- a/src/coreclr/src/md/compiler/assemblymd.cpp +++ b/src/coreclr/src/md/compiler/assemblymd.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // AssemblyMD.cpp // diff --git a/src/coreclr/src/md/compiler/assemblymd_emit.cpp b/src/coreclr/src/md/compiler/assemblymd_emit.cpp index 11e9946208f3..7a43a56259a3 100644 --- a/src/coreclr/src/md/compiler/assemblymd_emit.cpp +++ b/src/coreclr/src/md/compiler/assemblymd_emit.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // AssemblyMD.cpp // diff --git a/src/coreclr/src/md/compiler/cacheload.h b/src/coreclr/src/md/compiler/cacheload.h index 93d882e33db1..6fc1dc88a6e3 100644 --- a/src/coreclr/src/md/compiler/cacheload.h +++ b/src/coreclr/src/md/compiler/cacheload.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // CacheLoad.h // diff --git a/src/coreclr/src/md/compiler/classfactory.cpp b/src/coreclr/src/md/compiler/classfactory.cpp index 57558219c570..1506cb00e277 100644 --- a/src/coreclr/src/md/compiler/classfactory.cpp +++ b/src/coreclr/src/md/compiler/classfactory.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // ClassFactory.cpp // diff --git a/src/coreclr/src/md/compiler/classfactory.h b/src/coreclr/src/md/compiler/classfactory.h index e0372cd5f875..86417708fcf9 100644 --- a/src/coreclr/src/md/compiler/classfactory.h +++ b/src/coreclr/src/md/compiler/classfactory.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // ClassFactory.h // diff --git a/src/coreclr/src/md/compiler/custattr.h b/src/coreclr/src/md/compiler/custattr.h index ce8a803d3346..13df242481c1 100644 --- a/src/coreclr/src/md/compiler/custattr.h +++ b/src/coreclr/src/md/compiler/custattr.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/md/compiler/custattr_emit.cpp b/src/coreclr/src/md/compiler/custattr_emit.cpp index 26c0cc4d0f3b..cff1be18dfbb 100644 --- a/src/coreclr/src/md/compiler/custattr_emit.cpp +++ b/src/coreclr/src/md/compiler/custattr_emit.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // CustAttr_Emit.cpp // diff --git a/src/coreclr/src/md/compiler/custattr_import.cpp b/src/coreclr/src/md/compiler/custattr_import.cpp index dcbc873ec2bf..56930bb5d3bc 100644 --- a/src/coreclr/src/md/compiler/custattr_import.cpp +++ b/src/coreclr/src/md/compiler/custattr_import.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // diff --git a/src/coreclr/src/md/compiler/disp.cpp b/src/coreclr/src/md/compiler/disp.cpp index fc9d77333442..82d09e8c2d9a 100644 --- a/src/coreclr/src/md/compiler/disp.cpp +++ b/src/coreclr/src/md/compiler/disp.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // Disp.cpp // diff --git a/src/coreclr/src/md/compiler/disp.h b/src/coreclr/src/md/compiler/disp.h index 248ae0bc826e..2a183051d9bf 100644 --- a/src/coreclr/src/md/compiler/disp.h +++ b/src/coreclr/src/md/compiler/disp.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // Disp.h // diff --git a/src/coreclr/src/md/compiler/emit.cpp b/src/coreclr/src/md/compiler/emit.cpp index 97a6260e76a7..1d380129983a 100644 --- a/src/coreclr/src/md/compiler/emit.cpp +++ b/src/coreclr/src/md/compiler/emit.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // Emit.cpp // diff --git a/src/coreclr/src/md/compiler/filtermanager.cpp b/src/coreclr/src/md/compiler/filtermanager.cpp index 3648c5c58bd7..87df90334b7f 100644 --- a/src/coreclr/src/md/compiler/filtermanager.cpp +++ b/src/coreclr/src/md/compiler/filtermanager.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // FilterManager.cpp // diff --git a/src/coreclr/src/md/compiler/filtermanager.h b/src/coreclr/src/md/compiler/filtermanager.h index 52cbb5289b30..24fcd0128c2d 100644 --- a/src/coreclr/src/md/compiler/filtermanager.h +++ b/src/coreclr/src/md/compiler/filtermanager.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // FilterManager.h // diff --git a/src/coreclr/src/md/compiler/helper.cpp b/src/coreclr/src/md/compiler/helper.cpp index d04406401235..8c8662c8dc5a 100644 --- a/src/coreclr/src/md/compiler/helper.cpp +++ b/src/coreclr/src/md/compiler/helper.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // Helper.cpp // diff --git a/src/coreclr/src/md/compiler/import.cpp b/src/coreclr/src/md/compiler/import.cpp index ef1e5905a00b..9f3beded986e 100644 --- a/src/coreclr/src/md/compiler/import.cpp +++ b/src/coreclr/src/md/compiler/import.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // Import.cpp // diff --git a/src/coreclr/src/md/compiler/importhelper.cpp b/src/coreclr/src/md/compiler/importhelper.cpp index 068206aa3d1f..5b5907c8e037 100644 --- a/src/coreclr/src/md/compiler/importhelper.cpp +++ b/src/coreclr/src/md/compiler/importhelper.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // ImportHelper.cpp // diff --git a/src/coreclr/src/md/compiler/importhelper.h b/src/coreclr/src/md/compiler/importhelper.h index 954aae1cd490..febcd7b5ae17 100644 --- a/src/coreclr/src/md/compiler/importhelper.h +++ b/src/coreclr/src/md/compiler/importhelper.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // ImportHelper.h // diff --git a/src/coreclr/src/md/compiler/mdperf.cpp b/src/coreclr/src/md/compiler/mdperf.cpp index fa1edaacd687..016b28d9a4cd 100644 --- a/src/coreclr/src/md/compiler/mdperf.cpp +++ b/src/coreclr/src/md/compiler/mdperf.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // MDperf.cpp // diff --git a/src/coreclr/src/md/compiler/mdperf.h b/src/coreclr/src/md/compiler/mdperf.h index 3184d71cb497..b7726b36e320 100644 --- a/src/coreclr/src/md/compiler/mdperf.h +++ b/src/coreclr/src/md/compiler/mdperf.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // Mdperf.h // diff --git a/src/coreclr/src/md/compiler/mdsighelper.h b/src/coreclr/src/md/compiler/mdsighelper.h index 7d008524f48c..057746e8f787 100644 --- a/src/coreclr/src/md/compiler/mdsighelper.h +++ b/src/coreclr/src/md/compiler/mdsighelper.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // diff --git a/src/coreclr/src/md/compiler/mdutil.cpp b/src/coreclr/src/md/compiler/mdutil.cpp index 3ec35216a2ae..55ac77e9a3aa 100644 --- a/src/coreclr/src/md/compiler/mdutil.cpp +++ b/src/coreclr/src/md/compiler/mdutil.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // MDUtil.cpp // diff --git a/src/coreclr/src/md/compiler/mdutil.h b/src/coreclr/src/md/compiler/mdutil.h index b912bef96ab2..eadc93a3dd83 100644 --- a/src/coreclr/src/md/compiler/mdutil.h +++ b/src/coreclr/src/md/compiler/mdutil.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // MDUtil.h // diff --git a/src/coreclr/src/md/compiler/regmeta.cpp b/src/coreclr/src/md/compiler/regmeta.cpp index e79778b78c1c..c411346c0d20 100644 --- a/src/coreclr/src/md/compiler/regmeta.cpp +++ b/src/coreclr/src/md/compiler/regmeta.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // RegMeta.cpp // diff --git a/src/coreclr/src/md/compiler/regmeta.h b/src/coreclr/src/md/compiler/regmeta.h index 56e6f43a7b21..1da1afaf8bdc 100644 --- a/src/coreclr/src/md/compiler/regmeta.h +++ b/src/coreclr/src/md/compiler/regmeta.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // RegMeta.h // diff --git a/src/coreclr/src/md/compiler/regmeta_compilersupport.cpp b/src/coreclr/src/md/compiler/regmeta_compilersupport.cpp index 8a2e20b9565d..b2d635530b8f 100644 --- a/src/coreclr/src/md/compiler/regmeta_compilersupport.cpp +++ b/src/coreclr/src/md/compiler/regmeta_compilersupport.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // RegMeta.cpp // diff --git a/src/coreclr/src/md/compiler/regmeta_emit.cpp b/src/coreclr/src/md/compiler/regmeta_emit.cpp index 90df9090a89d..b2b53798f969 100644 --- a/src/coreclr/src/md/compiler/regmeta_emit.cpp +++ b/src/coreclr/src/md/compiler/regmeta_emit.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: RegMeta_IMetaDataImport.cpp // diff --git a/src/coreclr/src/md/compiler/regmeta_imetadatatables.cpp b/src/coreclr/src/md/compiler/regmeta_imetadatatables.cpp index d6f624cbac3a..b00dcaa08b9c 100644 --- a/src/coreclr/src/md/compiler/regmeta_imetadatatables.cpp +++ b/src/coreclr/src/md/compiler/regmeta_imetadatatables.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: RegMeta_IMetaDataTables.cpp // diff --git a/src/coreclr/src/md/compiler/regmeta_import.cpp b/src/coreclr/src/md/compiler/regmeta_import.cpp index 53203f2640d3..93e2a5004665 100644 --- a/src/coreclr/src/md/compiler/regmeta_import.cpp +++ b/src/coreclr/src/md/compiler/regmeta_import.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: RegMeta_IMetaDataImport.cpp // diff --git a/src/coreclr/src/md/compiler/regmeta_vm.cpp b/src/coreclr/src/md/compiler/regmeta_vm.cpp index 41a4d952d8f6..04b69c7d5cc3 100644 --- a/src/coreclr/src/md/compiler/regmeta_vm.cpp +++ b/src/coreclr/src/md/compiler/regmeta_vm.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** diff --git a/src/coreclr/src/md/compiler/stdafx.h b/src/coreclr/src/md/compiler/stdafx.h index a73681d1c1e3..01636b82acac 100644 --- a/src/coreclr/src/md/compiler/stdafx.h +++ b/src/coreclr/src/md/compiler/stdafx.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // stdafx.h // diff --git a/src/coreclr/src/md/compiler/verifylayouts.cpp b/src/coreclr/src/md/compiler/verifylayouts.cpp index 8c90888058f4..24f9498e3d9d 100644 --- a/src/coreclr/src/md/compiler/verifylayouts.cpp +++ b/src/coreclr/src/md/compiler/verifylayouts.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // VerifyLayouts.cpp // diff --git a/src/coreclr/src/md/compressedinteger.h b/src/coreclr/src/md/compressedinteger.h index 81b37f1a8e62..e6ee51ab217d 100644 --- a/src/coreclr/src/md/compressedinteger.h +++ b/src/coreclr/src/md/compressedinteger.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: CompressedInteger.h // diff --git a/src/coreclr/src/md/compressedinteger.inl b/src/coreclr/src/md/compressedinteger.inl index aad9e8ac6831..acdc504b686b 100644 --- a/src/coreclr/src/md/compressedinteger.inl +++ b/src/coreclr/src/md/compressedinteger.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: CompressedInteger.inl // diff --git a/src/coreclr/src/md/datablob.h b/src/coreclr/src/md/datablob.h index 67a938587a50..ed8c949f268d 100644 --- a/src/coreclr/src/md/datablob.h +++ b/src/coreclr/src/md/datablob.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: DataBlob.h // diff --git a/src/coreclr/src/md/datablob.inl b/src/coreclr/src/md/datablob.inl index 5c71c59443b9..5f55af6cd5fc 100644 --- a/src/coreclr/src/md/datablob.inl +++ b/src/coreclr/src/md/datablob.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: DataBlob.inl // diff --git a/src/coreclr/src/md/databuffer.h b/src/coreclr/src/md/databuffer.h index 67612c3cf38f..0aade1c1dfb1 100644 --- a/src/coreclr/src/md/databuffer.h +++ b/src/coreclr/src/md/databuffer.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: DataBuffer.h // diff --git a/src/coreclr/src/md/databuffer.inl b/src/coreclr/src/md/databuffer.inl index bebedb06492e..12d55c02f6ba 100644 --- a/src/coreclr/src/md/databuffer.inl +++ b/src/coreclr/src/md/databuffer.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: DataBuffer.inl // diff --git a/src/coreclr/src/md/datasource/api.cpp b/src/coreclr/src/md/datasource/api.cpp index f61787870012..9d062d5f6b08 100644 --- a/src/coreclr/src/md/datasource/api.cpp +++ b/src/coreclr/src/md/datasource/api.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // api.cpp // diff --git a/src/coreclr/src/md/datasource/datatargetreader.cpp b/src/coreclr/src/md/datasource/datatargetreader.cpp index 329366fbf24f..03b08a6b2278 100644 --- a/src/coreclr/src/md/datasource/datatargetreader.cpp +++ b/src/coreclr/src/md/datasource/datatargetreader.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "stdafx.h" diff --git a/src/coreclr/src/md/datasource/datatargetreader.h b/src/coreclr/src/md/datasource/datatargetreader.h index b819813dbf2f..e1d0ee5d8ad5 100644 --- a/src/coreclr/src/md/datasource/datatargetreader.h +++ b/src/coreclr/src/md/datasource/datatargetreader.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _MD_DATA_TARGET_READER_ #define _MD_DATA_TARGET_READER_ diff --git a/src/coreclr/src/md/datasource/remotemdinternalrwsource.cpp b/src/coreclr/src/md/datasource/remotemdinternalrwsource.cpp index 692fe66955d4..7effa8a67ff1 100644 --- a/src/coreclr/src/md/datasource/remotemdinternalrwsource.cpp +++ b/src/coreclr/src/md/datasource/remotemdinternalrwsource.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // RemoteMDInternalRWSource.cpp // diff --git a/src/coreclr/src/md/datasource/remotemdinternalrwsource.h b/src/coreclr/src/md/datasource/remotemdinternalrwsource.h index 3d89e007211a..f2e98fc1ce9e 100644 --- a/src/coreclr/src/md/datasource/remotemdinternalrwsource.h +++ b/src/coreclr/src/md/datasource/remotemdinternalrwsource.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // RemoteMDInternalRWSource.h // diff --git a/src/coreclr/src/md/datasource/stdafx.h b/src/coreclr/src/md/datasource/stdafx.h index 61c738585e5d..1495c5f46364 100644 --- a/src/coreclr/src/md/datasource/stdafx.h +++ b/src/coreclr/src/md/datasource/stdafx.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // stdafx.h // diff --git a/src/coreclr/src/md/datasource/targettypes.cpp b/src/coreclr/src/md/datasource/targettypes.cpp index 7ce94fd86977..60e3b7f41323 100644 --- a/src/coreclr/src/md/datasource/targettypes.cpp +++ b/src/coreclr/src/md/datasource/targettypes.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // TargetTypes.cpp // diff --git a/src/coreclr/src/md/datasource/targettypes.h b/src/coreclr/src/md/datasource/targettypes.h index 7ba82d4ad903..a51e8e99b1af 100644 --- a/src/coreclr/src/md/datasource/targettypes.h +++ b/src/coreclr/src/md/datasource/targettypes.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // TargetTypes.h // diff --git a/src/coreclr/src/md/debug_metadata.h b/src/coreclr/src/md/debug_metadata.h index 293a97cb649c..7f98c4c182b5 100644 --- a/src/coreclr/src/md/debug_metadata.h +++ b/src/coreclr/src/md/debug_metadata.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: Debug_MetaData.h // diff --git a/src/coreclr/src/md/enc/CMakeLists.txt b/src/coreclr/src/md/enc/CMakeLists.txt index 221bb8cab455..bf209317d032 100644 --- a/src/coreclr/src/md/enc/CMakeLists.txt +++ b/src/coreclr/src/md/enc/CMakeLists.txt @@ -48,7 +48,7 @@ add_library_clr(mdruntimerw_dac ${MDRUNTIMERW_SOURCES}) set_target_properties(mdruntimerw_dac PROPERTIES DAC_COMPONENT TRUE) target_precompile_header(TARGET mdruntimerw_dac HEADER stdafx.h) -add_library_clr(mdruntimerw_wks ${MDRUNTIMERW_SOURCES}) +add_library_clr(mdruntimerw_wks OBJECT ${MDRUNTIMERW_SOURCES}) target_compile_definitions(mdruntimerw_wks PRIVATE FEATURE_METADATA_EMIT_ALL) target_precompile_header(TARGET mdruntimerw_wks HEADER stdafx.h) diff --git a/src/coreclr/src/md/enc/liteweightstgdbrw.cpp b/src/coreclr/src/md/enc/liteweightstgdbrw.cpp index c1bbe3d1b2a0..5e5fbe9314ff 100644 --- a/src/coreclr/src/md/enc/liteweightstgdbrw.cpp +++ b/src/coreclr/src/md/enc/liteweightstgdbrw.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // diff --git a/src/coreclr/src/md/enc/mdinternalrw.cpp b/src/coreclr/src/md/enc/mdinternalrw.cpp index c18b842ef198..511e529121ec 100644 --- a/src/coreclr/src/md/enc/mdinternalrw.cpp +++ b/src/coreclr/src/md/enc/mdinternalrw.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: MDInternalRW.cpp // diff --git a/src/coreclr/src/md/enc/metamodelenc.cpp b/src/coreclr/src/md/enc/metamodelenc.cpp index 79d6d036a90d..5dc4b58bd596 100644 --- a/src/coreclr/src/md/enc/metamodelenc.cpp +++ b/src/coreclr/src/md/enc/metamodelenc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // MetaModelENC.cpp // diff --git a/src/coreclr/src/md/enc/metamodelrw.cpp b/src/coreclr/src/md/enc/metamodelrw.cpp index ec2e3609934b..ac0e400be4e2 100644 --- a/src/coreclr/src/md/enc/metamodelrw.cpp +++ b/src/coreclr/src/md/enc/metamodelrw.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // MetaModelRW.cpp // diff --git a/src/coreclr/src/md/enc/peparse.cpp b/src/coreclr/src/md/enc/peparse.cpp index 2ea3a414ffaf..b5bff4ed164f 100644 --- a/src/coreclr/src/md/enc/peparse.cpp +++ b/src/coreclr/src/md/enc/peparse.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "stdafx.h" diff --git a/src/coreclr/src/md/enc/rwutil.cpp b/src/coreclr/src/md/enc/rwutil.cpp index cb6dd559eda7..e7aed761c25e 100644 --- a/src/coreclr/src/md/enc/rwutil.cpp +++ b/src/coreclr/src/md/enc/rwutil.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // RWUtil.cpp // diff --git a/src/coreclr/src/md/enc/stdafx.h b/src/coreclr/src/md/enc/stdafx.h index ed91d0b3a6ce..16d3ca8cd1f2 100644 --- a/src/coreclr/src/md/enc/stdafx.h +++ b/src/coreclr/src/md/enc/stdafx.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // stdafx.h // diff --git a/src/coreclr/src/md/enc/stgio.cpp b/src/coreclr/src/md/enc/stgio.cpp index bb9a917f85b3..451ee2590900 100644 --- a/src/coreclr/src/md/enc/stgio.cpp +++ b/src/coreclr/src/md/enc/stgio.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // StgIO.h // diff --git a/src/coreclr/src/md/enc/stgtiggerstorage.cpp b/src/coreclr/src/md/enc/stgtiggerstorage.cpp index 1dd1ed8662e2..e4c799a08af2 100644 --- a/src/coreclr/src/md/enc/stgtiggerstorage.cpp +++ b/src/coreclr/src/md/enc/stgtiggerstorage.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // StgTiggerStorage.cpp // diff --git a/src/coreclr/src/md/enc/stgtiggerstream.cpp b/src/coreclr/src/md/enc/stgtiggerstream.cpp index 370c4458c114..3e5eba9b82f5 100644 --- a/src/coreclr/src/md/enc/stgtiggerstream.cpp +++ b/src/coreclr/src/md/enc/stgtiggerstream.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // StgTiggerStream.h // diff --git a/src/coreclr/src/md/errors_metadata.h b/src/coreclr/src/md/errors_metadata.h index 0714c5543e48..a21075d7df4b 100644 --- a/src/coreclr/src/md/errors_metadata.h +++ b/src/coreclr/src/md/errors_metadata.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include #include diff --git a/src/coreclr/src/md/export.h b/src/coreclr/src/md/export.h index 79d6d065d878..2991052962e3 100644 --- a/src/coreclr/src/md/export.h +++ b/src/coreclr/src/md/export.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: export.h // diff --git a/src/coreclr/src/md/external.h b/src/coreclr/src/md/external.h index bf9ac5df3b20..990ef4a2829e 100644 --- a/src/coreclr/src/md/external.h +++ b/src/coreclr/src/md/external.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: external.h // diff --git a/src/coreclr/src/md/heaps/blobheap.h b/src/coreclr/src/md/heaps/blobheap.h index 995ce7e62661..7d9eaf1ec036 100644 --- a/src/coreclr/src/md/heaps/blobheap.h +++ b/src/coreclr/src/md/heaps/blobheap.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: BlobHeap.h // diff --git a/src/coreclr/src/md/heaps/export.h b/src/coreclr/src/md/heaps/export.h index a91c9bb2b9dc..f4c8eaf427ad 100644 --- a/src/coreclr/src/md/heaps/export.h +++ b/src/coreclr/src/md/heaps/export.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: export.h // diff --git a/src/coreclr/src/md/heaps/external.h b/src/coreclr/src/md/heaps/external.h index 29e75a1fa579..6ba7685e097d 100644 --- a/src/coreclr/src/md/heaps/external.h +++ b/src/coreclr/src/md/heaps/external.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: external.h // diff --git a/src/coreclr/src/md/heaps/guidheap.h b/src/coreclr/src/md/heaps/guidheap.h index dd8fd1330e17..cb4dac2147ae 100644 --- a/src/coreclr/src/md/heaps/guidheap.h +++ b/src/coreclr/src/md/heaps/guidheap.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: GuidHeap.h // diff --git a/src/coreclr/src/md/heaps/stringheap.h b/src/coreclr/src/md/heaps/stringheap.h index a63f16f13ebc..747fd196284f 100644 --- a/src/coreclr/src/md/heaps/stringheap.h +++ b/src/coreclr/src/md/heaps/stringheap.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: StringHeap.h // diff --git a/src/coreclr/src/md/hotdata/CMakeLists.txt b/src/coreclr/src/md/hotdata/CMakeLists.txt index c6168d2a4b0c..6f7a2891d20c 100644 --- a/src/coreclr/src/md/hotdata/CMakeLists.txt +++ b/src/coreclr/src/md/hotdata/CMakeLists.txt @@ -33,7 +33,7 @@ add_library_clr(mdhotdata_dac ${MDHOTDATA_SOURCES}) set_target_properties(mdhotdata_dac PROPERTIES DAC_COMPONENT TRUE) target_precompile_header(TARGET mdhotdata_dac HEADER external.h) -add_library_clr(mdhotdata_full ${MDHOTDATA_SOURCES}) +add_library_clr(mdhotdata_full OBJECT ${MDHOTDATA_SOURCES}) target_precompile_header(TARGET mdhotdata_full HEADER external.h) add_library_clr(mdhotdata_crossgen ${MDHOTDATA_SOURCES}) diff --git a/src/coreclr/src/md/hotdata/export.h b/src/coreclr/src/md/hotdata/export.h index e508d6ceccad..a8480fa6e874 100644 --- a/src/coreclr/src/md/hotdata/export.h +++ b/src/coreclr/src/md/hotdata/export.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: export.h // diff --git a/src/coreclr/src/md/hotdata/external.h b/src/coreclr/src/md/hotdata/external.h index 8b6e0fac1b12..6201772c55e5 100644 --- a/src/coreclr/src/md/hotdata/external.h +++ b/src/coreclr/src/md/hotdata/external.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: external.h // diff --git a/src/coreclr/src/md/hotdata/heapindex.h b/src/coreclr/src/md/hotdata/heapindex.h index 6247daa32260..b257581ae776 100644 --- a/src/coreclr/src/md/hotdata/heapindex.h +++ b/src/coreclr/src/md/hotdata/heapindex.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: HotHeapWriter.h // diff --git a/src/coreclr/src/md/hotdata/hotdataformat.h b/src/coreclr/src/md/hotdata/hotdataformat.h index 57abf5f40b60..445463be8efc 100644 --- a/src/coreclr/src/md/hotdata/hotdataformat.h +++ b/src/coreclr/src/md/hotdata/hotdataformat.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: HotDataFormat.h // diff --git a/src/coreclr/src/md/hotdata/hotheap.cpp b/src/coreclr/src/md/hotdata/hotheap.cpp index 5439146e18f7..2781a81a1c2e 100644 --- a/src/coreclr/src/md/hotdata/hotheap.cpp +++ b/src/coreclr/src/md/hotdata/hotheap.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: HotHeap.cpp // diff --git a/src/coreclr/src/md/hotdata/hotheap.h b/src/coreclr/src/md/hotdata/hotheap.h index 7c0777d3379d..60e4f568bf20 100644 --- a/src/coreclr/src/md/hotdata/hotheap.h +++ b/src/coreclr/src/md/hotdata/hotheap.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: HotHeap.h // diff --git a/src/coreclr/src/md/hotdata/hotheapsdirectoryiterator.cpp b/src/coreclr/src/md/hotdata/hotheapsdirectoryiterator.cpp index d77f88a9d76b..33653a2404b9 100644 --- a/src/coreclr/src/md/hotdata/hotheapsdirectoryiterator.cpp +++ b/src/coreclr/src/md/hotdata/hotheapsdirectoryiterator.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: HotHeapsDirectoryIterator.h // diff --git a/src/coreclr/src/md/hotdata/hotheapsdirectoryiterator.h b/src/coreclr/src/md/hotdata/hotheapsdirectoryiterator.h index 2838a85996a3..79a99b3d3e25 100644 --- a/src/coreclr/src/md/hotdata/hotheapsdirectoryiterator.h +++ b/src/coreclr/src/md/hotdata/hotheapsdirectoryiterator.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: HotHeapsDirectoryIterator.h // diff --git a/src/coreclr/src/md/hotdata/hotheapwriter.cpp b/src/coreclr/src/md/hotdata/hotheapwriter.cpp index cf27df4f37d5..c3a483bf6ab1 100644 --- a/src/coreclr/src/md/hotdata/hotheapwriter.cpp +++ b/src/coreclr/src/md/hotdata/hotheapwriter.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: HotHeapWriter.cpp // diff --git a/src/coreclr/src/md/hotdata/hotheapwriter.h b/src/coreclr/src/md/hotdata/hotheapwriter.h index e9dbea770ec7..ee2d78f664e6 100644 --- a/src/coreclr/src/md/hotdata/hotheapwriter.h +++ b/src/coreclr/src/md/hotdata/hotheapwriter.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: HotHeapWriter.h // diff --git a/src/coreclr/src/md/hotdata/hotmetadata.cpp b/src/coreclr/src/md/hotdata/hotmetadata.cpp index 368ebd8d8ef1..b68896a7fcd7 100644 --- a/src/coreclr/src/md/hotdata/hotmetadata.cpp +++ b/src/coreclr/src/md/hotdata/hotmetadata.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: HotMetaData.cpp // diff --git a/src/coreclr/src/md/hotdata/hotmetadata.h b/src/coreclr/src/md/hotdata/hotmetadata.h index 8da88c9e62b1..86ab49dc816a 100644 --- a/src/coreclr/src/md/hotdata/hotmetadata.h +++ b/src/coreclr/src/md/hotdata/hotmetadata.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: HotMetaData.h // diff --git a/src/coreclr/src/md/hotdata/hottable.cpp b/src/coreclr/src/md/hotdata/hottable.cpp index 58e8aec7fa89..81031b774190 100644 --- a/src/coreclr/src/md/hotdata/hottable.cpp +++ b/src/coreclr/src/md/hotdata/hottable.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: HotTable.cpp // diff --git a/src/coreclr/src/md/hotdata/hottable.h b/src/coreclr/src/md/hotdata/hottable.h index 39cb351a4202..3cfd82ea8a5d 100644 --- a/src/coreclr/src/md/hotdata/hottable.h +++ b/src/coreclr/src/md/hotdata/hottable.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: HotTable.h // diff --git a/src/coreclr/src/md/inc/VerifyLayouts.inc b/src/coreclr/src/md/inc/VerifyLayouts.inc index 36a2146f5d4b..b259700e2eec 100644 --- a/src/coreclr/src/md/inc/VerifyLayouts.inc +++ b/src/coreclr/src/md/inc/VerifyLayouts.inc @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // This file provides an explicit check of field layouts using some macro magic diff --git a/src/coreclr/src/md/inc/assemblymdinternaldisp.h b/src/coreclr/src/md/inc/assemblymdinternaldisp.h index 7c0bbf29f895..286fbd58f83b 100644 --- a/src/coreclr/src/md/inc/assemblymdinternaldisp.h +++ b/src/coreclr/src/md/inc/assemblymdinternaldisp.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // AssemblyMDInternalDispenser.h // diff --git a/src/coreclr/src/md/inc/cahlprinternal.h b/src/coreclr/src/md/inc/cahlprinternal.h index 9a685919daf9..e7235d13aa66 100644 --- a/src/coreclr/src/md/inc/cahlprinternal.h +++ b/src/coreclr/src/md/inc/cahlprinternal.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/md/inc/liteweightstgdb.h b/src/coreclr/src/md/inc/liteweightstgdb.h index 05fd5697a704..1e35df09cccb 100644 --- a/src/coreclr/src/md/inc/liteweightstgdb.h +++ b/src/coreclr/src/md/inc/liteweightstgdb.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // LiteWeightStgdb.h // diff --git a/src/coreclr/src/md/inc/mdcolumndescriptors.h b/src/coreclr/src/md/inc/mdcolumndescriptors.h index fbeb8e9cb50a..21a46afec72b 100644 --- a/src/coreclr/src/md/inc/mdcolumndescriptors.h +++ b/src/coreclr/src/md/inc/mdcolumndescriptors.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/md/inc/mdinternalrw.h b/src/coreclr/src/md/inc/mdinternalrw.h index 0726819332fd..ad1dc9a6cc79 100644 --- a/src/coreclr/src/md/inc/mdinternalrw.h +++ b/src/coreclr/src/md/inc/mdinternalrw.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // MDInternalRW.h // diff --git a/src/coreclr/src/md/inc/mdlog.h b/src/coreclr/src/md/inc/mdlog.h index 1b32ef2dd7d7..4459183f15f7 100644 --- a/src/coreclr/src/md/inc/mdlog.h +++ b/src/coreclr/src/md/inc/mdlog.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // MDLog.h - Meta data logging helper. // diff --git a/src/coreclr/src/md/inc/metadatahash.h b/src/coreclr/src/md/inc/metadatahash.h index a08502a05dd1..5f78416da939 100644 --- a/src/coreclr/src/md/inc/metadatahash.h +++ b/src/coreclr/src/md/inc/metadatahash.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // MetaDataHash.h -- Meta data hash data structures. // diff --git a/src/coreclr/src/md/inc/metamodel.h b/src/coreclr/src/md/inc/metamodel.h index db8f9142970a..c48a69872488 100644 --- a/src/coreclr/src/md/inc/metamodel.h +++ b/src/coreclr/src/md/inc/metamodel.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // MetaModel.h -- header file for compressed COM+ metadata. // diff --git a/src/coreclr/src/md/inc/metamodelro.h b/src/coreclr/src/md/inc/metamodelro.h index 629dfd42fbbd..1f7b170d218c 100644 --- a/src/coreclr/src/md/inc/metamodelro.h +++ b/src/coreclr/src/md/inc/metamodelro.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // MetaModelRO.h -- header file for Read-Only compressed COM+ metadata. // diff --git a/src/coreclr/src/md/inc/metamodelrw.h b/src/coreclr/src/md/inc/metamodelrw.h index 322e280c69b0..87917890da83 100644 --- a/src/coreclr/src/md/inc/metamodelrw.h +++ b/src/coreclr/src/md/inc/metamodelrw.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // MetaModelRW.h -- header file for Read/Write compressed COM+ metadata. diff --git a/src/coreclr/src/md/inc/recordpool.h b/src/coreclr/src/md/inc/recordpool.h index c0dc6b7a6506..cd907776eeb0 100644 --- a/src/coreclr/src/md/inc/recordpool.h +++ b/src/coreclr/src/md/inc/recordpool.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // RecordPool.h -- header file for record heaps. // diff --git a/src/coreclr/src/md/inc/rwutil.h b/src/coreclr/src/md/inc/rwutil.h index 5e19a58305f1..16e98913a51f 100644 --- a/src/coreclr/src/md/inc/rwutil.h +++ b/src/coreclr/src/md/inc/rwutil.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // RWUtil.h // diff --git a/src/coreclr/src/md/inc/stgio.h b/src/coreclr/src/md/inc/stgio.h index 3b4621fbe503..cb66cb5594d1 100644 --- a/src/coreclr/src/md/inc/stgio.h +++ b/src/coreclr/src/md/inc/stgio.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // StgIO.h // diff --git a/src/coreclr/src/md/inc/stgtiggerstorage.h b/src/coreclr/src/md/inc/stgtiggerstorage.h index 8e4340c0f09f..d445d5ef3007 100644 --- a/src/coreclr/src/md/inc/stgtiggerstorage.h +++ b/src/coreclr/src/md/inc/stgtiggerstorage.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // StgTiggerStorage.h // diff --git a/src/coreclr/src/md/inc/stgtiggerstream.h b/src/coreclr/src/md/inc/stgtiggerstream.h index fe8c6d0f29d6..b30ade61d814 100644 --- a/src/coreclr/src/md/inc/stgtiggerstream.h +++ b/src/coreclr/src/md/inc/stgtiggerstream.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // StgTiggerStream.h // diff --git a/src/coreclr/src/md/inc/streamutil.h b/src/coreclr/src/md/inc/streamutil.h index 54d2d2a8df02..0836e1bd91ba 100644 --- a/src/coreclr/src/md/inc/streamutil.h +++ b/src/coreclr/src/md/inc/streamutil.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/md/inc/verifylayouts.h b/src/coreclr/src/md/inc/verifylayouts.h index aa3201fb702f..049e64b36eef 100644 --- a/src/coreclr/src/md/inc/verifylayouts.h +++ b/src/coreclr/src/md/inc/verifylayouts.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // VerifyLayouts.h // diff --git a/src/coreclr/src/md/runtime/CMakeLists.txt b/src/coreclr/src/md/runtime/CMakeLists.txt index 9b5e3f2afaef..99b8bec54958 100644 --- a/src/coreclr/src/md/runtime/CMakeLists.txt +++ b/src/coreclr/src/md/runtime/CMakeLists.txt @@ -46,7 +46,7 @@ add_library_clr(mdruntime_dac ${MDRUNTIME_SOURCES}) set_target_properties(mdruntime_dac PROPERTIES DAC_COMPONENT TRUE) target_precompile_header(TARGET mdruntime_dac HEADER stdafx.h) -add_library_clr(mdruntime_wks ${MDRUNTIME_SOURCES}) +add_library_clr(mdruntime_wks OBJECT ${MDRUNTIME_SOURCES}) target_compile_definitions(mdruntime_wks PRIVATE FEATURE_METADATA_EMIT_ALL) target_precompile_header(TARGET mdruntime_wks HEADER stdafx.h) diff --git a/src/coreclr/src/md/runtime/liteweightstgdb.cpp b/src/coreclr/src/md/runtime/liteweightstgdb.cpp index fa7922af3d9c..5e110ddde6b1 100644 --- a/src/coreclr/src/md/runtime/liteweightstgdb.cpp +++ b/src/coreclr/src/md/runtime/liteweightstgdb.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // LiteWeightStgdb.cpp // diff --git a/src/coreclr/src/md/runtime/mdcolumndescriptors.cpp b/src/coreclr/src/md/runtime/mdcolumndescriptors.cpp index cfb40aa0bcdc..3806c93ca956 100644 --- a/src/coreclr/src/md/runtime/mdcolumndescriptors.cpp +++ b/src/coreclr/src/md/runtime/mdcolumndescriptors.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/md/runtime/mdfileformat.cpp b/src/coreclr/src/md/runtime/mdfileformat.cpp index 5c185fda15e6..9b1c5f6e64bb 100644 --- a/src/coreclr/src/md/runtime/mdfileformat.cpp +++ b/src/coreclr/src/md/runtime/mdfileformat.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // MDFileFormat.cpp // diff --git a/src/coreclr/src/md/runtime/mdinternaldisp.cpp b/src/coreclr/src/md/runtime/mdinternaldisp.cpp index c11a49229ae8..49ceb2652427 100644 --- a/src/coreclr/src/md/runtime/mdinternaldisp.cpp +++ b/src/coreclr/src/md/runtime/mdinternaldisp.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: MDInternalDisp.CPP // diff --git a/src/coreclr/src/md/runtime/mdinternaldisp.h b/src/coreclr/src/md/runtime/mdinternaldisp.h index 530a14198956..3da8f31eba5f 100644 --- a/src/coreclr/src/md/runtime/mdinternaldisp.h +++ b/src/coreclr/src/md/runtime/mdinternaldisp.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // MDInternalDispenser.h // diff --git a/src/coreclr/src/md/runtime/mdinternalro.cpp b/src/coreclr/src/md/runtime/mdinternalro.cpp index 2edcada0ff91..327eb8648a7f 100644 --- a/src/coreclr/src/md/runtime/mdinternalro.cpp +++ b/src/coreclr/src/md/runtime/mdinternalro.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: MDInternalRO.CPP // diff --git a/src/coreclr/src/md/runtime/mdinternalro.h b/src/coreclr/src/md/runtime/mdinternalro.h index 00942319a671..2ac1c90680c0 100644 --- a/src/coreclr/src/md/runtime/mdinternalro.h +++ b/src/coreclr/src/md/runtime/mdinternalro.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // MDInternalRO.h // diff --git a/src/coreclr/src/md/runtime/metamodel.cpp b/src/coreclr/src/md/runtime/metamodel.cpp index 2b62355661e7..84c091678c38 100644 --- a/src/coreclr/src/md/runtime/metamodel.cpp +++ b/src/coreclr/src/md/runtime/metamodel.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // MetaModel.cpp -- Base portion of compressed COM+ metadata. // diff --git a/src/coreclr/src/md/runtime/metamodelcolumndefs.h b/src/coreclr/src/md/runtime/metamodelcolumndefs.h index 280cf3f3b8ac..ad4f8071e943 100644 --- a/src/coreclr/src/md/runtime/metamodelcolumndefs.h +++ b/src/coreclr/src/md/runtime/metamodelcolumndefs.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // MetaModelColumnDefs.h -- Table definitions for MetaData. // diff --git a/src/coreclr/src/md/runtime/metamodelro.cpp b/src/coreclr/src/md/runtime/metamodelro.cpp index ee4ad88be163..55ce8430a344 100644 --- a/src/coreclr/src/md/runtime/metamodelro.cpp +++ b/src/coreclr/src/md/runtime/metamodelro.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // MetaModelRO.cpp -- Read-only implementation of compressed COM+ metadata. // diff --git a/src/coreclr/src/md/runtime/recordpool.cpp b/src/coreclr/src/md/runtime/recordpool.cpp index 792211201672..73680757ed45 100644 --- a/src/coreclr/src/md/runtime/recordpool.cpp +++ b/src/coreclr/src/md/runtime/recordpool.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // RecordPool.cpp -- Implementation of record heaps. // diff --git a/src/coreclr/src/md/runtime/stdafx.h b/src/coreclr/src/md/runtime/stdafx.h index 65decac1fdd5..7a196c6dd696 100644 --- a/src/coreclr/src/md/runtime/stdafx.h +++ b/src/coreclr/src/md/runtime/stdafx.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // stdafx.h // diff --git a/src/coreclr/src/md/runtime/strongnameinternal.cpp b/src/coreclr/src/md/runtime/strongnameinternal.cpp index fad2aa6fea71..a9e559b1054b 100644 --- a/src/coreclr/src/md/runtime/strongnameinternal.cpp +++ b/src/coreclr/src/md/runtime/strongnameinternal.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // Strong name APIs which are not exposed publicly but are used by CLR code // diff --git a/src/coreclr/src/md/staticmd/apis.cpp b/src/coreclr/src/md/staticmd/apis.cpp index a9e66a7fa4e5..b13fd8cb7e1b 100644 --- a/src/coreclr/src/md/staticmd/apis.cpp +++ b/src/coreclr/src/md/staticmd/apis.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "stdafx.h" diff --git a/src/coreclr/src/md/staticmd/stdafx.h b/src/coreclr/src/md/staticmd/stdafx.h index ac6bb917c4ae..ab95ea1f3d62 100644 --- a/src/coreclr/src/md/staticmd/stdafx.h +++ b/src/coreclr/src/md/staticmd/stdafx.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include #include // Windows wrappers. diff --git a/src/coreclr/src/md/tables/export.h b/src/coreclr/src/md/tables/export.h index bf7ddc1d66e4..16ffef8651a5 100644 --- a/src/coreclr/src/md/tables/export.h +++ b/src/coreclr/src/md/tables/export.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: export.h // diff --git a/src/coreclr/src/md/tables/external.h b/src/coreclr/src/md/tables/external.h index 14e7440945d7..6c2f4fde6b5e 100644 --- a/src/coreclr/src/md/tables/external.h +++ b/src/coreclr/src/md/tables/external.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: external.h // diff --git a/src/coreclr/src/md/tables/table.h b/src/coreclr/src/md/tables/table.h index 726f9e1e3cb9..37897b07e51b 100644 --- a/src/coreclr/src/md/tables/table.h +++ b/src/coreclr/src/md/tables/table.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: Table.h // diff --git a/src/coreclr/src/nativeresources/CMakeLists.txt b/src/coreclr/src/nativeresources/CMakeLists.txt index 947a91438970..ab3e53863e3f 100644 --- a/src/coreclr/src/nativeresources/CMakeLists.txt +++ b/src/coreclr/src/nativeresources/CMakeLists.txt @@ -5,3 +5,4 @@ add_library_clr(nativeresourcestring resourcestring.cpp ) +_install (TARGETS nativeresourcestring DESTINATION lib) diff --git a/src/coreclr/src/nativeresources/resourcestring.cpp b/src/coreclr/src/nativeresources/resourcestring.cpp index db7e0eabd5b5..fa698ab8f9c5 100644 --- a/src/coreclr/src/nativeresources/resourcestring.cpp +++ b/src/coreclr/src/nativeresources/resourcestring.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include diff --git a/src/coreclr/src/nativeresources/resourcestring.h b/src/coreclr/src/nativeresources/resourcestring.h index 2225a479b396..c8beb9bf3340 100644 --- a/src/coreclr/src/nativeresources/resourcestring.h +++ b/src/coreclr/src/nativeresources/resourcestring.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __RESOURCE_STRING_H_ #define __RESOURCE_STRING_H_ diff --git a/src/coreclr/src/pal/inc/mbusafecrt.h b/src/coreclr/src/pal/inc/mbusafecrt.h index 663d032c49b2..52ccc6c02aed 100644 --- a/src/coreclr/src/pal/inc/mbusafecrt.h +++ b/src/coreclr/src/pal/inc/mbusafecrt.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** * mbusafecrt.h - public declarations for SafeCRT lib diff --git a/src/coreclr/src/pal/inc/pal.h b/src/coreclr/src/pal/inc/pal.h index 7ffdc2b7ec32..df658c546905 100644 --- a/src/coreclr/src/pal/inc/pal.h +++ b/src/coreclr/src/pal/inc/pal.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ @@ -377,7 +376,7 @@ PALIMPORT DWORD PALAPI PAL_InitializeCoreCLR( - const char *szExePath); + const char *szExePath, bool runningInExe); /// /// This function shuts down PAL WITHOUT exiting the current process. @@ -449,12 +448,10 @@ BOOL PALAPI PAL_NotifyRuntimeStarted(); -#ifdef __APPLE__ PALIMPORT LPCSTR PALAPI PAL_GetApplicationGroupId(); -#endif static const unsigned int MAX_DEBUGGER_TRANSPORT_PIPE_NAME_LENGTH = MAX_PATH; @@ -2350,6 +2347,8 @@ PALIMPORT BOOL PALAPI PAL_VirtualUnwindOutOfProc(CONTEXT *context, KNONVOLATILE_ #define PAL_CS_NATIVE_DATA_SIZE 76 #elif defined(__APPLE__) && defined(__x86_64__) #define PAL_CS_NATIVE_DATA_SIZE 120 +#elif defined(__APPLE__) && defined(HOST_ARM64) +#define PAL_CS_NATIVE_DATA_SIZE 120 #elif defined(__FreeBSD__) && defined(HOST_X86) #define PAL_CS_NATIVE_DATA_SIZE 12 #elif defined(__FreeBSD__) && defined(__x86_64__) diff --git a/src/coreclr/src/pal/inc/pal_assert.h b/src/coreclr/src/pal/inc/pal_assert.h index 67ab24f527a0..2953473343ec 100644 --- a/src/coreclr/src/pal/inc/pal_assert.h +++ b/src/coreclr/src/pal/inc/pal_assert.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/inc/pal_endian.h b/src/coreclr/src/pal/inc/pal_endian.h index 92cef33a6ff9..6822b004ddaa 100644 --- a/src/coreclr/src/pal/inc/pal_endian.h +++ b/src/coreclr/src/pal/inc/pal_endian.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/inc/pal_error.h b/src/coreclr/src/pal/inc/pal_error.h index 112a0c4b3158..be9350d333e9 100644 --- a/src/coreclr/src/pal/inc/pal_error.h +++ b/src/coreclr/src/pal/inc/pal_error.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/inc/pal_mstypes.h b/src/coreclr/src/pal/inc/pal_mstypes.h index 6e8151c56198..90378a81f4ac 100644 --- a/src/coreclr/src/pal/inc/pal_mstypes.h +++ b/src/coreclr/src/pal/inc/pal_mstypes.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/inc/pal_safecrt.h b/src/coreclr/src/pal/inc/pal_safecrt.h index d9e76cd783ed..481e9c4422bf 100644 --- a/src/coreclr/src/pal/inc/pal_safecrt.h +++ b/src/coreclr/src/pal/inc/pal_safecrt.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/inc/palprivate.h b/src/coreclr/src/pal/inc/palprivate.h index a9d86249a6db..e92cd1aa4747 100644 --- a/src/coreclr/src/pal/inc/palprivate.h +++ b/src/coreclr/src/pal/inc/palprivate.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __PAL_PRIVATE_H__ #define __PAL_PRIVATE_H__ diff --git a/src/coreclr/src/pal/inc/rt/accctrl.h b/src/coreclr/src/pal/inc/rt/accctrl.h index c2491f2ea5f3..4f76c298d3af 100644 --- a/src/coreclr/src/pal/inc/rt/accctrl.h +++ b/src/coreclr/src/pal/inc/rt/accctrl.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/aclapi.h b/src/coreclr/src/pal/inc/rt/aclapi.h index 2494a36f6802..ac30dcf6e47a 100644 --- a/src/coreclr/src/pal/inc/rt/aclapi.h +++ b/src/coreclr/src/pal/inc/rt/aclapi.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/commctrl.h b/src/coreclr/src/pal/inc/rt/commctrl.h index d56ff809cf76..8056bb45327c 100644 --- a/src/coreclr/src/pal/inc/rt/commctrl.h +++ b/src/coreclr/src/pal/inc/rt/commctrl.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/commdlg.h b/src/coreclr/src/pal/inc/rt/commdlg.h index be5fdfe13732..5e7ec2057745 100644 --- a/src/coreclr/src/pal/inc/rt/commdlg.h +++ b/src/coreclr/src/pal/inc/rt/commdlg.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/conio.h b/src/coreclr/src/pal/inc/rt/conio.h index 4cc3e4b17898..9dd9c0a06d29 100644 --- a/src/coreclr/src/pal/inc/rt/conio.h +++ b/src/coreclr/src/pal/inc/rt/conio.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/cpp/assert.h b/src/coreclr/src/pal/inc/rt/cpp/assert.h index 3f861040df8a..7493b151d6a0 100644 --- a/src/coreclr/src/pal/inc/rt/cpp/assert.h +++ b/src/coreclr/src/pal/inc/rt/cpp/assert.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/cpp/cstdlib b/src/coreclr/src/pal/inc/rt/cpp/cstdlib index ee8f59a713fd..1cfd40828a47 100644 --- a/src/coreclr/src/pal/inc/rt/cpp/cstdlib +++ b/src/coreclr/src/pal/inc/rt/cpp/cstdlib @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // clrosdev diff --git a/src/coreclr/src/pal/inc/rt/cpp/ctype.h b/src/coreclr/src/pal/inc/rt/cpp/ctype.h index 12a0e6965b0b..cb41fcd88e6e 100644 --- a/src/coreclr/src/pal/inc/rt/cpp/ctype.h +++ b/src/coreclr/src/pal/inc/rt/cpp/ctype.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/cpp/emmintrin.h b/src/coreclr/src/pal/inc/rt/cpp/emmintrin.h index 89e14929acc3..f2e8e0c1fd66 100644 --- a/src/coreclr/src/pal/inc/rt/cpp/emmintrin.h +++ b/src/coreclr/src/pal/inc/rt/cpp/emmintrin.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // From llvm-3.9/clang-3.9.1 emmintrin.h: diff --git a/src/coreclr/src/pal/inc/rt/cpp/fcntl.h b/src/coreclr/src/pal/inc/rt/cpp/fcntl.h index 47b948abab6a..556145a9f084 100644 --- a/src/coreclr/src/pal/inc/rt/cpp/fcntl.h +++ b/src/coreclr/src/pal/inc/rt/cpp/fcntl.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/cpp/float.h b/src/coreclr/src/pal/inc/rt/cpp/float.h index c7c2ca234a05..a1dc803380e4 100644 --- a/src/coreclr/src/pal/inc/rt/cpp/float.h +++ b/src/coreclr/src/pal/inc/rt/cpp/float.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/cpp/io.h b/src/coreclr/src/pal/inc/rt/cpp/io.h index a80d9a4e6781..64f3a52df730 100644 --- a/src/coreclr/src/pal/inc/rt/cpp/io.h +++ b/src/coreclr/src/pal/inc/rt/cpp/io.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/cpp/limits.h b/src/coreclr/src/pal/inc/rt/cpp/limits.h index 6c0ee619f16c..bd667f14eaf9 100644 --- a/src/coreclr/src/pal/inc/rt/cpp/limits.h +++ b/src/coreclr/src/pal/inc/rt/cpp/limits.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/cpp/malloc.h b/src/coreclr/src/pal/inc/rt/cpp/malloc.h index a8324bb54f94..255a2c7f2fa2 100644 --- a/src/coreclr/src/pal/inc/rt/cpp/malloc.h +++ b/src/coreclr/src/pal/inc/rt/cpp/malloc.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/cpp/math.h b/src/coreclr/src/pal/inc/rt/cpp/math.h index 9f70610cd0c3..e42c1852c139 100644 --- a/src/coreclr/src/pal/inc/rt/cpp/math.h +++ b/src/coreclr/src/pal/inc/rt/cpp/math.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/cpp/memory.h b/src/coreclr/src/pal/inc/rt/cpp/memory.h index 09f74a1e8a90..bcc0d7d9c5d5 100644 --- a/src/coreclr/src/pal/inc/rt/cpp/memory.h +++ b/src/coreclr/src/pal/inc/rt/cpp/memory.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/cpp/stdarg.h b/src/coreclr/src/pal/inc/rt/cpp/stdarg.h index dfbe495b34d4..59d0d046d5f9 100644 --- a/src/coreclr/src/pal/inc/rt/cpp/stdarg.h +++ b/src/coreclr/src/pal/inc/rt/cpp/stdarg.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/cpp/stddef.h b/src/coreclr/src/pal/inc/rt/cpp/stddef.h index c4bfff37cf06..b347dbf41497 100644 --- a/src/coreclr/src/pal/inc/rt/cpp/stddef.h +++ b/src/coreclr/src/pal/inc/rt/cpp/stddef.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/cpp/stdint.h b/src/coreclr/src/pal/inc/rt/cpp/stdint.h index 5401fabc1308..b23533a2940d 100644 --- a/src/coreclr/src/pal/inc/rt/cpp/stdint.h +++ b/src/coreclr/src/pal/inc/rt/cpp/stdint.h @@ -1,5 +1,4 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "palrt.h" diff --git a/src/coreclr/src/pal/inc/rt/cpp/stdio.h b/src/coreclr/src/pal/inc/rt/cpp/stdio.h index 1d00ca34deed..33c1912bb2b7 100644 --- a/src/coreclr/src/pal/inc/rt/cpp/stdio.h +++ b/src/coreclr/src/pal/inc/rt/cpp/stdio.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/cpp/stdlib.h b/src/coreclr/src/pal/inc/rt/cpp/stdlib.h index 6a89f45f57bc..d2d49357b88e 100644 --- a/src/coreclr/src/pal/inc/rt/cpp/stdlib.h +++ b/src/coreclr/src/pal/inc/rt/cpp/stdlib.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/cpp/string.h b/src/coreclr/src/pal/inc/rt/cpp/string.h index cfc81cc28577..b66d883338e1 100644 --- a/src/coreclr/src/pal/inc/rt/cpp/string.h +++ b/src/coreclr/src/pal/inc/rt/cpp/string.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/cpp/time.h b/src/coreclr/src/pal/inc/rt/cpp/time.h index 127083bb23a0..00c83f99d343 100644 --- a/src/coreclr/src/pal/inc/rt/cpp/time.h +++ b/src/coreclr/src/pal/inc/rt/cpp/time.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/cpp/wchar.h b/src/coreclr/src/pal/inc/rt/cpp/wchar.h index 569a0216eb4e..5497d729e43b 100644 --- a/src/coreclr/src/pal/inc/rt/cpp/wchar.h +++ b/src/coreclr/src/pal/inc/rt/cpp/wchar.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/cpp/xmmintrin.h b/src/coreclr/src/pal/inc/rt/cpp/xmmintrin.h index ed2ff583b3ae..826d2d788676 100644 --- a/src/coreclr/src/pal/inc/rt/cpp/xmmintrin.h +++ b/src/coreclr/src/pal/inc/rt/cpp/xmmintrin.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // From llvm-3.9/clang-3.9.1 xmmintrin.h: diff --git a/src/coreclr/src/pal/inc/rt/crtdbg.h b/src/coreclr/src/pal/inc/rt/crtdbg.h index 456b47170b3c..48d728ebff32 100644 --- a/src/coreclr/src/pal/inc/rt/crtdbg.h +++ b/src/coreclr/src/pal/inc/rt/crtdbg.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/dbghelp.h b/src/coreclr/src/pal/inc/rt/dbghelp.h index 7d9cd334e919..1d231d34fc39 100644 --- a/src/coreclr/src/pal/inc/rt/dbghelp.h +++ b/src/coreclr/src/pal/inc/rt/dbghelp.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ BUILD Version: 0000 Increment this if a change has global effects diff --git a/src/coreclr/src/pal/inc/rt/eh.h b/src/coreclr/src/pal/inc/rt/eh.h index 5401fabc1308..b23533a2940d 100644 --- a/src/coreclr/src/pal/inc/rt/eh.h +++ b/src/coreclr/src/pal/inc/rt/eh.h @@ -1,5 +1,4 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "palrt.h" diff --git a/src/coreclr/src/pal/inc/rt/errorrep.h b/src/coreclr/src/pal/inc/rt/errorrep.h index 5401fabc1308..b23533a2940d 100644 --- a/src/coreclr/src/pal/inc/rt/errorrep.h +++ b/src/coreclr/src/pal/inc/rt/errorrep.h @@ -1,5 +1,4 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "palrt.h" diff --git a/src/coreclr/src/pal/inc/rt/guiddef.h b/src/coreclr/src/pal/inc/rt/guiddef.h index db742c6c8080..1a2ed05e16fe 100644 --- a/src/coreclr/src/pal/inc/rt/guiddef.h +++ b/src/coreclr/src/pal/inc/rt/guiddef.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/hstring.h b/src/coreclr/src/pal/inc/rt/hstring.h index 5401fabc1308..b23533a2940d 100644 --- a/src/coreclr/src/pal/inc/rt/hstring.h +++ b/src/coreclr/src/pal/inc/rt/hstring.h @@ -1,5 +1,4 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "palrt.h" diff --git a/src/coreclr/src/pal/inc/rt/htmlhelp.h b/src/coreclr/src/pal/inc/rt/htmlhelp.h index b55403336ed1..5a3142f74253 100644 --- a/src/coreclr/src/pal/inc/rt/htmlhelp.h +++ b/src/coreclr/src/pal/inc/rt/htmlhelp.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/imagehlp.h b/src/coreclr/src/pal/inc/rt/imagehlp.h index 07824e49aa97..65410d718b9e 100644 --- a/src/coreclr/src/pal/inc/rt/imagehlp.h +++ b/src/coreclr/src/pal/inc/rt/imagehlp.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/inc/rt/intrin.h b/src/coreclr/src/pal/inc/rt/intrin.h index 5401fabc1308..b23533a2940d 100644 --- a/src/coreclr/src/pal/inc/rt/intrin.h +++ b/src/coreclr/src/pal/inc/rt/intrin.h @@ -1,5 +1,4 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "palrt.h" diff --git a/src/coreclr/src/pal/inc/rt/intsafe.h b/src/coreclr/src/pal/inc/rt/intsafe.h index 1d18f914414e..9159c1bb1676 100644 --- a/src/coreclr/src/pal/inc/rt/intsafe.h +++ b/src/coreclr/src/pal/inc/rt/intsafe.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /****************************************************************** * * diff --git a/src/coreclr/src/pal/inc/rt/mbstring.h b/src/coreclr/src/pal/inc/rt/mbstring.h index 0813ae64f39d..19966945dc2f 100644 --- a/src/coreclr/src/pal/inc/rt/mbstring.h +++ b/src/coreclr/src/pal/inc/rt/mbstring.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/new.h b/src/coreclr/src/pal/inc/rt/new.h index 740a18ccb63d..1cb42afc670c 100644 --- a/src/coreclr/src/pal/inc/rt/new.h +++ b/src/coreclr/src/pal/inc/rt/new.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/no_sal2.h b/src/coreclr/src/pal/inc/rt/no_sal2.h index aa6c6db017d4..0a460cb9c6a0 100644 --- a/src/coreclr/src/pal/inc/rt/no_sal2.h +++ b/src/coreclr/src/pal/inc/rt/no_sal2.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** diff --git a/src/coreclr/src/pal/inc/rt/ntimage.h b/src/coreclr/src/pal/inc/rt/ntimage.h index 10686ef9d98b..931d528404d1 100644 --- a/src/coreclr/src/pal/inc/rt/ntimage.h +++ b/src/coreclr/src/pal/inc/rt/ntimage.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/oaidl.h b/src/coreclr/src/pal/inc/rt/oaidl.h index 8e16d4f41b85..3c75bc053540 100644 --- a/src/coreclr/src/pal/inc/rt/oaidl.h +++ b/src/coreclr/src/pal/inc/rt/oaidl.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/objbase.h b/src/coreclr/src/pal/inc/rt/objbase.h index 6b2693272a57..065a4b44de99 100644 --- a/src/coreclr/src/pal/inc/rt/objbase.h +++ b/src/coreclr/src/pal/inc/rt/objbase.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/objidl.h b/src/coreclr/src/pal/inc/rt/objidl.h index 087254252077..9530a5917a00 100644 --- a/src/coreclr/src/pal/inc/rt/objidl.h +++ b/src/coreclr/src/pal/inc/rt/objidl.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/ocidl.h b/src/coreclr/src/pal/inc/rt/ocidl.h index ab9201ee36e7..f6c964cb6ba6 100644 --- a/src/coreclr/src/pal/inc/rt/ocidl.h +++ b/src/coreclr/src/pal/inc/rt/ocidl.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/ole2.h b/src/coreclr/src/pal/inc/rt/ole2.h index 36a057fcf914..f51d41e04b05 100644 --- a/src/coreclr/src/pal/inc/rt/ole2.h +++ b/src/coreclr/src/pal/inc/rt/ole2.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/oleauto.h b/src/coreclr/src/pal/inc/rt/oleauto.h index aa802907b4a1..15db2c3912e9 100644 --- a/src/coreclr/src/pal/inc/rt/oleauto.h +++ b/src/coreclr/src/pal/inc/rt/oleauto.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/olectl.h b/src/coreclr/src/pal/inc/rt/olectl.h index fddc2e4c1058..f5452707908c 100644 --- a/src/coreclr/src/pal/inc/rt/olectl.h +++ b/src/coreclr/src/pal/inc/rt/olectl.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/oleidl.h b/src/coreclr/src/pal/inc/rt/oleidl.h index 9293d1f39a41..f1b442c86b14 100644 --- a/src/coreclr/src/pal/inc/rt/oleidl.h +++ b/src/coreclr/src/pal/inc/rt/oleidl.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/palrt.h b/src/coreclr/src/pal/inc/rt/palrt.h index 0de8be16cea2..23f627e1b8e5 100644 --- a/src/coreclr/src/pal/inc/rt/palrt.h +++ b/src/coreclr/src/pal/inc/rt/palrt.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/poppack.h b/src/coreclr/src/pal/inc/rt/poppack.h index 4d5264c8fa2d..0bb3ae839b31 100644 --- a/src/coreclr/src/pal/inc/rt/poppack.h +++ b/src/coreclr/src/pal/inc/rt/poppack.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/process.h b/src/coreclr/src/pal/inc/rt/process.h index 901c4e57dabf..38db0009d603 100644 --- a/src/coreclr/src/pal/inc/rt/process.h +++ b/src/coreclr/src/pal/inc/rt/process.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/psapi.h b/src/coreclr/src/pal/inc/rt/psapi.h index 5401fabc1308..b23533a2940d 100644 --- a/src/coreclr/src/pal/inc/rt/psapi.h +++ b/src/coreclr/src/pal/inc/rt/psapi.h @@ -1,5 +1,4 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "palrt.h" diff --git a/src/coreclr/src/pal/inc/rt/pshpack1.h b/src/coreclr/src/pal/inc/rt/pshpack1.h index 568a609501ff..92f7a83448bb 100644 --- a/src/coreclr/src/pal/inc/rt/pshpack1.h +++ b/src/coreclr/src/pal/inc/rt/pshpack1.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/pshpack2.h b/src/coreclr/src/pal/inc/rt/pshpack2.h index d92bac0a20f8..2a4a40eb8058 100644 --- a/src/coreclr/src/pal/inc/rt/pshpack2.h +++ b/src/coreclr/src/pal/inc/rt/pshpack2.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/pshpack4.h b/src/coreclr/src/pal/inc/rt/pshpack4.h index 96ab354c67d0..e491515e66e9 100644 --- a/src/coreclr/src/pal/inc/rt/pshpack4.h +++ b/src/coreclr/src/pal/inc/rt/pshpack4.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/pshpack8.h b/src/coreclr/src/pal/inc/rt/pshpack8.h index 35a48dd07cdd..f5d4deb2b6bd 100644 --- a/src/coreclr/src/pal/inc/rt/pshpack8.h +++ b/src/coreclr/src/pal/inc/rt/pshpack8.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/pshpck16.h b/src/coreclr/src/pal/inc/rt/pshpck16.h index 19807f280d6c..bd0d82ed724e 100644 --- a/src/coreclr/src/pal/inc/rt/pshpck16.h +++ b/src/coreclr/src/pal/inc/rt/pshpck16.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/richedit.h b/src/coreclr/src/pal/inc/rt/richedit.h index 6c41a08469df..d445296c50af 100644 --- a/src/coreclr/src/pal/inc/rt/richedit.h +++ b/src/coreclr/src/pal/inc/rt/richedit.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/rpc.h b/src/coreclr/src/pal/inc/rt/rpc.h index 5e44c2b83707..9b9f425f69fe 100644 --- a/src/coreclr/src/pal/inc/rt/rpc.h +++ b/src/coreclr/src/pal/inc/rt/rpc.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/rpcndr.h b/src/coreclr/src/pal/inc/rt/rpcndr.h index 35e4c188d835..8e7f88a5b8b4 100644 --- a/src/coreclr/src/pal/inc/rt/rpcndr.h +++ b/src/coreclr/src/pal/inc/rt/rpcndr.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/safecrt.h b/src/coreclr/src/pal/inc/rt/safecrt.h index 1f5e82650a65..fa30a150a34d 100644 --- a/src/coreclr/src/pal/inc/rt/safecrt.h +++ b/src/coreclr/src/pal/inc/rt/safecrt.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/sal.h b/src/coreclr/src/pal/inc/rt/sal.h index d42c724b3ad8..9f7c014b792e 100644 --- a/src/coreclr/src/pal/inc/rt/sal.h +++ b/src/coreclr/src/pal/inc/rt/sal.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *sal.h - markers for documenting the semantics of APIs diff --git a/src/coreclr/src/pal/inc/rt/servprov.h b/src/coreclr/src/pal/inc/rt/servprov.h index 0153cef93783..dfda1a8b128e 100644 --- a/src/coreclr/src/pal/inc/rt/servprov.h +++ b/src/coreclr/src/pal/inc/rt/servprov.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/share.h b/src/coreclr/src/pal/inc/rt/share.h index 5401fabc1308..b23533a2940d 100644 --- a/src/coreclr/src/pal/inc/rt/share.h +++ b/src/coreclr/src/pal/inc/rt/share.h @@ -1,5 +1,4 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "palrt.h" diff --git a/src/coreclr/src/pal/inc/rt/shellapi.h b/src/coreclr/src/pal/inc/rt/shellapi.h index 28e43f5db404..8e1d58806ea2 100644 --- a/src/coreclr/src/pal/inc/rt/shellapi.h +++ b/src/coreclr/src/pal/inc/rt/shellapi.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/shlobj.h b/src/coreclr/src/pal/inc/rt/shlobj.h index 3743143c684c..edbd420993f7 100644 --- a/src/coreclr/src/pal/inc/rt/shlobj.h +++ b/src/coreclr/src/pal/inc/rt/shlobj.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/shlwapi.h b/src/coreclr/src/pal/inc/rt/shlwapi.h index deec2813b8d9..029a17325911 100644 --- a/src/coreclr/src/pal/inc/rt/shlwapi.h +++ b/src/coreclr/src/pal/inc/rt/shlwapi.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/specstrings.h b/src/coreclr/src/pal/inc/rt/specstrings.h index 0a6397eb75db..5f5e6e1cf9a4 100644 --- a/src/coreclr/src/pal/inc/rt/specstrings.h +++ b/src/coreclr/src/pal/inc/rt/specstrings.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/pal/inc/rt/specstrings_adt.h b/src/coreclr/src/pal/inc/rt/specstrings_adt.h index 47377193195a..06eab8c0ab75 100644 --- a/src/coreclr/src/pal/inc/rt/specstrings_adt.h +++ b/src/coreclr/src/pal/inc/rt/specstrings_adt.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/pal/inc/rt/specstrings_strict.h b/src/coreclr/src/pal/inc/rt/specstrings_strict.h index 2cf351273224..7aaabd1661c6 100644 --- a/src/coreclr/src/pal/inc/rt/specstrings_strict.h +++ b/src/coreclr/src/pal/inc/rt/specstrings_strict.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /************************************************************************* * This file documents all the macros approved for use in windows source diff --git a/src/coreclr/src/pal/inc/rt/specstrings_undef.h b/src/coreclr/src/pal/inc/rt/specstrings_undef.h index d240ae1866e5..0008f2278598 100644 --- a/src/coreclr/src/pal/inc/rt/specstrings_undef.h +++ b/src/coreclr/src/pal/inc/rt/specstrings_undef.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* diff --git a/src/coreclr/src/pal/inc/rt/symcrypt.h b/src/coreclr/src/pal/inc/rt/symcrypt.h index 0e71e2cb74f7..88ac20b5426b 100644 --- a/src/coreclr/src/pal/inc/rt/symcrypt.h +++ b/src/coreclr/src/pal/inc/rt/symcrypt.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/tchar.h b/src/coreclr/src/pal/inc/rt/tchar.h index 5401fabc1308..b23533a2940d 100644 --- a/src/coreclr/src/pal/inc/rt/tchar.h +++ b/src/coreclr/src/pal/inc/rt/tchar.h @@ -1,5 +1,4 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "palrt.h" diff --git a/src/coreclr/src/pal/inc/rt/tlhelp32.h b/src/coreclr/src/pal/inc/rt/tlhelp32.h index b052d0ce0d3a..d8bc5a9b44d0 100644 --- a/src/coreclr/src/pal/inc/rt/tlhelp32.h +++ b/src/coreclr/src/pal/inc/rt/tlhelp32.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/unknwn.h b/src/coreclr/src/pal/inc/rt/unknwn.h index b2efa8f38d9b..f9cdc8df0f86 100644 --- a/src/coreclr/src/pal/inc/rt/unknwn.h +++ b/src/coreclr/src/pal/inc/rt/unknwn.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/urlmon.h b/src/coreclr/src/pal/inc/rt/urlmon.h index 80320f757d54..1fcfec2e6f65 100644 --- a/src/coreclr/src/pal/inc/rt/urlmon.h +++ b/src/coreclr/src/pal/inc/rt/urlmon.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/verrsrc.h b/src/coreclr/src/pal/inc/rt/verrsrc.h index cd80202d047e..0bd71033246b 100644 --- a/src/coreclr/src/pal/inc/rt/verrsrc.h +++ b/src/coreclr/src/pal/inc/rt/verrsrc.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/winapifamily.h b/src/coreclr/src/pal/inc/rt/winapifamily.h index 3f3781debf84..1220aed7bcd3 100644 --- a/src/coreclr/src/pal/inc/rt/winapifamily.h +++ b/src/coreclr/src/pal/inc/rt/winapifamily.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/winbase.h b/src/coreclr/src/pal/inc/rt/winbase.h index 9b5dbdd70327..aaa7a406ab74 100644 --- a/src/coreclr/src/pal/inc/rt/winbase.h +++ b/src/coreclr/src/pal/inc/rt/winbase.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/wincrypt.h b/src/coreclr/src/pal/inc/rt/wincrypt.h index ce6b478b20fc..ae1520c30eae 100644 --- a/src/coreclr/src/pal/inc/rt/wincrypt.h +++ b/src/coreclr/src/pal/inc/rt/wincrypt.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/windef.h b/src/coreclr/src/pal/inc/rt/windef.h index e289a7c1f1d0..8de7fddc2701 100644 --- a/src/coreclr/src/pal/inc/rt/windef.h +++ b/src/coreclr/src/pal/inc/rt/windef.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/windows.h b/src/coreclr/src/pal/inc/rt/windows.h index f793214cc98e..8e7def378814 100644 --- a/src/coreclr/src/pal/inc/rt/windows.h +++ b/src/coreclr/src/pal/inc/rt/windows.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/winerror.h b/src/coreclr/src/pal/inc/rt/winerror.h index fd119d89f5db..cc37c9dd79ad 100644 --- a/src/coreclr/src/pal/inc/rt/winerror.h +++ b/src/coreclr/src/pal/inc/rt/winerror.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/wininet.h b/src/coreclr/src/pal/inc/rt/wininet.h index b11106b935fb..c3ad9fab0d30 100644 --- a/src/coreclr/src/pal/inc/rt/wininet.h +++ b/src/coreclr/src/pal/inc/rt/wininet.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/winnls.h b/src/coreclr/src/pal/inc/rt/winnls.h index dd0d2fba23e9..93775e4509cf 100644 --- a/src/coreclr/src/pal/inc/rt/winnls.h +++ b/src/coreclr/src/pal/inc/rt/winnls.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/winnt.h b/src/coreclr/src/pal/inc/rt/winnt.h index 68184c45e3f7..11628d5deff8 100644 --- a/src/coreclr/src/pal/inc/rt/winnt.h +++ b/src/coreclr/src/pal/inc/rt/winnt.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/winresrc.h b/src/coreclr/src/pal/inc/rt/winresrc.h index 3f66f4ecc578..b0843d15f1f2 100644 --- a/src/coreclr/src/pal/inc/rt/winresrc.h +++ b/src/coreclr/src/pal/inc/rt/winresrc.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/winternl.h b/src/coreclr/src/pal/inc/rt/winternl.h index ba1c64bbba9c..a5e42c6678bc 100644 --- a/src/coreclr/src/pal/inc/rt/winternl.h +++ b/src/coreclr/src/pal/inc/rt/winternl.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/winuser.h b/src/coreclr/src/pal/inc/rt/winuser.h index 1dcef15e705a..9be850e80bb3 100644 --- a/src/coreclr/src/pal/inc/rt/winuser.h +++ b/src/coreclr/src/pal/inc/rt/winuser.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/winver.h b/src/coreclr/src/pal/inc/rt/winver.h index a3ab78af8b88..b0f441e1a1d4 100644 --- a/src/coreclr/src/pal/inc/rt/winver.h +++ b/src/coreclr/src/pal/inc/rt/winver.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/rt/wtsapi32.h b/src/coreclr/src/pal/inc/rt/wtsapi32.h index b68f5c41f02a..0613f91d1ae2 100644 --- a/src/coreclr/src/pal/inc/rt/wtsapi32.h +++ b/src/coreclr/src/pal/inc/rt/wtsapi32.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/pal/inc/strsafe.h b/src/coreclr/src/pal/inc/strsafe.h index b618a3bf81c7..82c36db3c000 100644 --- a/src/coreclr/src/pal/inc/strsafe.h +++ b/src/coreclr/src/pal/inc/strsafe.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/inc/unixasmmacros.inc b/src/coreclr/src/pal/inc/unixasmmacros.inc index 18ed49e202e3..3740ab1b3658 100644 --- a/src/coreclr/src/pal/inc/unixasmmacros.inc +++ b/src/coreclr/src/pal/inc/unixasmmacros.inc @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #define INVALIDGCVALUE 0xCCCCCCCD diff --git a/src/coreclr/src/pal/inc/unixasmmacrosamd64.inc b/src/coreclr/src/pal/inc/unixasmmacrosamd64.inc index e1b4a95328d2..9a656ddf1bec 100644 --- a/src/coreclr/src/pal/inc/unixasmmacrosamd64.inc +++ b/src/coreclr/src/pal/inc/unixasmmacrosamd64.inc @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. .macro NESTED_ENTRY Name, Section, Handler LEAF_ENTRY \Name, \Section diff --git a/src/coreclr/src/pal/inc/unixasmmacrosarm.inc b/src/coreclr/src/pal/inc/unixasmmacrosarm.inc index fcf906975d60..e0c0016cc26a 100644 --- a/src/coreclr/src/pal/inc/unixasmmacrosarm.inc +++ b/src/coreclr/src/pal/inc/unixasmmacrosarm.inc @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. .macro LEAF_ENTRY Name, Section .thumb_func diff --git a/src/coreclr/src/pal/inc/unixasmmacrosarm64.inc b/src/coreclr/src/pal/inc/unixasmmacrosarm64.inc index f13bb7a04305..69cdcb3f48ba 100644 --- a/src/coreclr/src/pal/inc/unixasmmacrosarm64.inc +++ b/src/coreclr/src/pal/inc/unixasmmacrosarm64.inc @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. .macro NESTED_ENTRY Name, Section, Handler LEAF_ENTRY \Name, \Section diff --git a/src/coreclr/src/pal/inc/unixasmmacrosx86.inc b/src/coreclr/src/pal/inc/unixasmmacrosx86.inc index ae4ad14ea216..87cbddd6eda2 100644 --- a/src/coreclr/src/pal/inc/unixasmmacrosx86.inc +++ b/src/coreclr/src/pal/inc/unixasmmacrosx86.inc @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. .macro NESTED_ENTRY Name, Section, Handler LEAF_ENTRY \Name, \Section diff --git a/src/coreclr/src/pal/prebuilt/corerror/makecorerror.bat b/src/coreclr/src/pal/prebuilt/corerror/makecorerror.bat index 7e5d6e892400..939404f75a5b 100644 --- a/src/coreclr/src/pal/prebuilt/corerror/makecorerror.bat +++ b/src/coreclr/src/pal/prebuilt/corerror/makecorerror.bat @@ -1,7 +1,6 @@ @if "%_echo%"=="" echo off REM Licensed to the .NET Foundation under one or more agreements. REM The .NET Foundation licenses this file to you under the MIT license. -REM See the LICENSE file in the project root for more information. setlocal csc ..\..\..\inc\genheaders.cs diff --git a/src/coreclr/src/pal/prebuilt/corerror/mscorurt.rc b/src/coreclr/src/pal/prebuilt/corerror/mscorurt.rc index d4a3a39f1999..f51e77ae1245 100644 --- a/src/coreclr/src/pal/prebuilt/corerror/mscorurt.rc +++ b/src/coreclr/src/pal/prebuilt/corerror/mscorurt.rc @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. STRINGTABLE DISCARDABLE BEGIN diff --git a/src/coreclr/src/pal/prebuilt/idl/clrdata_i.cpp b/src/coreclr/src/pal/prebuilt/idl/clrdata_i.cpp index f0f6742db414..d88a456414d2 100644 --- a/src/coreclr/src/pal/prebuilt/idl/clrdata_i.cpp +++ b/src/coreclr/src/pal/prebuilt/idl/clrdata_i.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* this ALWAYS GENERATED file contains the IIDs and CLSIDs */ diff --git a/src/coreclr/src/pal/prebuilt/idl/clrinternal_i.cpp b/src/coreclr/src/pal/prebuilt/idl/clrinternal_i.cpp index 7cfb798aab89..e202ddfd8ef2 100644 --- a/src/coreclr/src/pal/prebuilt/idl/clrinternal_i.cpp +++ b/src/coreclr/src/pal/prebuilt/idl/clrinternal_i.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/pal/prebuilt/idl/clrprivappxhosting_i.cpp b/src/coreclr/src/pal/prebuilt/idl/clrprivappxhosting_i.cpp index c46d033d1a3c..dc5cc728e687 100644 --- a/src/coreclr/src/pal/prebuilt/idl/clrprivappxhosting_i.cpp +++ b/src/coreclr/src/pal/prebuilt/idl/clrprivappxhosting_i.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/pal/prebuilt/idl/clrprivbinding_i.cpp b/src/coreclr/src/pal/prebuilt/idl/clrprivbinding_i.cpp index 5584a557cb21..1de6c4119bf1 100644 --- a/src/coreclr/src/pal/prebuilt/idl/clrprivbinding_i.cpp +++ b/src/coreclr/src/pal/prebuilt/idl/clrprivbinding_i.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. @@ -66,18 +65,6 @@ MIDL_DEFINE_GUID(IID, IID_ICLRPrivBinder,0x2601F621,0xE462,0x404C,0xB2,0x99,0x3E MIDL_DEFINE_GUID(IID, IID_ICLRPrivAssembly,0x2601F621,0xE462,0x404C,0xB2,0x99,0x3E,0x1D,0xE7,0x2F,0x85,0x43); - -MIDL_DEFINE_GUID(IID, IID_ICLRPrivResource,0x2601F621,0xE462,0x404C,0xB2,0x99,0x3E,0x1D,0xE7,0x2F,0x85,0x47); - - -MIDL_DEFINE_GUID(IID, IID_ICLRPrivResourcePath,0x2601F621,0xE462,0x404C,0xB2,0x99,0x3E,0x1D,0xE7,0x2F,0x85,0x44); - - -MIDL_DEFINE_GUID(IID, IID_ICLRPrivResourceAssembly,0x8d2d3cc9,0x1249,0x4ad4,0x97,0x7d,0xb7,0x72,0xbd,0x4e,0x8a,0x94); - - -MIDL_DEFINE_GUID(IID, IID_ICLRPrivAssemblyInfo,0x5653946E,0x800B,0x48B7,0x8B,0x09,0xB1,0xB8,0x79,0xB5,0x4F,0x68); - #undef MIDL_DEFINE_GUID #ifdef __cplusplus diff --git a/src/coreclr/src/pal/prebuilt/idl/cordebug_i.cpp b/src/coreclr/src/pal/prebuilt/idl/cordebug_i.cpp index d04c21a85fdc..c6b8512eb0a8 100644 --- a/src/coreclr/src/pal/prebuilt/idl/cordebug_i.cpp +++ b/src/coreclr/src/pal/prebuilt/idl/cordebug_i.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/pal/prebuilt/idl/corprof_i.cpp b/src/coreclr/src/pal/prebuilt/idl/corprof_i.cpp index e1f611517927..498c52b3914c 100644 --- a/src/coreclr/src/pal/prebuilt/idl/corprof_i.cpp +++ b/src/coreclr/src/pal/prebuilt/idl/corprof_i.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. @@ -17,7 +16,7 @@ #ifdef __cplusplus extern "C"{ -#endif +#endif #include @@ -88,6 +87,9 @@ MIDL_DEFINE_GUID(IID, IID_ICorProfilerCallback8,0x5BED9B15,0xC079,0x4D47,0xBF,0x MIDL_DEFINE_GUID(IID, IID_ICorProfilerCallback9,0x27583EC3,0xC8F5,0x482F,0x80,0x52,0x19,0x4B,0x8C,0xE4,0x70,0x5A); +MIDL_DEFINE_GUID(IID, IID_ICorProfilerCallback10,0xCEC5B60E,0xC69C,0x495F,0x87,0xF6,0x84,0xD2,0x8E,0xE1,0x6F,0xFB); + + MIDL_DEFINE_GUID(IID, IID_ICorProfilerInfo,0x28B5557D,0x3F3F,0x48b4,0x90,0xB2,0x5F,0x9E,0xEA,0x2F,0x6C,0x48); diff --git a/src/coreclr/src/pal/prebuilt/idl/corpub_i.cpp b/src/coreclr/src/pal/prebuilt/idl/corpub_i.cpp index 0be473f09772..8aa67f888761 100644 --- a/src/coreclr/src/pal/prebuilt/idl/corpub_i.cpp +++ b/src/coreclr/src/pal/prebuilt/idl/corpub_i.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/pal/prebuilt/idl/corsym_i.cpp b/src/coreclr/src/pal/prebuilt/idl/corsym_i.cpp index eba38ce40eb6..0ca3dc5f2840 100644 --- a/src/coreclr/src/pal/prebuilt/idl/corsym_i.cpp +++ b/src/coreclr/src/pal/prebuilt/idl/corsym_i.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/pal/prebuilt/idl/mscorsvc_i.cpp b/src/coreclr/src/pal/prebuilt/idl/mscorsvc_i.cpp index 139174574a15..79b8aab8c440 100644 --- a/src/coreclr/src/pal/prebuilt/idl/mscorsvc_i.cpp +++ b/src/coreclr/src/pal/prebuilt/idl/mscorsvc_i.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/pal/prebuilt/idl/sospriv_i.cpp b/src/coreclr/src/pal/prebuilt/idl/sospriv_i.cpp index 55de43254315..993737f7a0b3 100644 --- a/src/coreclr/src/pal/prebuilt/idl/sospriv_i.cpp +++ b/src/coreclr/src/pal/prebuilt/idl/sospriv_i.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/pal/prebuilt/idl/xclrdata_i.cpp b/src/coreclr/src/pal/prebuilt/idl/xclrdata_i.cpp index 140082d8aa1d..de3f1a537b55 100644 --- a/src/coreclr/src/pal/prebuilt/idl/xclrdata_i.cpp +++ b/src/coreclr/src/pal/prebuilt/idl/xclrdata_i.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/pal/prebuilt/idl/xcordebug_i.cpp b/src/coreclr/src/pal/prebuilt/idl/xcordebug_i.cpp index 32bb754c1d4b..07684b632097 100644 --- a/src/coreclr/src/pal/prebuilt/idl/xcordebug_i.cpp +++ b/src/coreclr/src/pal/prebuilt/idl/xcordebug_i.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/pal/prebuilt/inc/clrdata.h b/src/coreclr/src/pal/prebuilt/inc/clrdata.h index 6d6700554147..b0675c9d43a0 100644 --- a/src/coreclr/src/pal/prebuilt/inc/clrdata.h +++ b/src/coreclr/src/pal/prebuilt/inc/clrdata.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* this ALWAYS GENERATED file contains the definitions for the interfaces */ diff --git a/src/coreclr/src/pal/prebuilt/inc/clrinternal.h b/src/coreclr/src/pal/prebuilt/inc/clrinternal.h index e3625a7c3129..16fd6841da22 100644 --- a/src/coreclr/src/pal/prebuilt/inc/clrinternal.h +++ b/src/coreclr/src/pal/prebuilt/inc/clrinternal.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/pal/prebuilt/inc/clrprivbinding.h b/src/coreclr/src/pal/prebuilt/inc/clrprivbinding.h index 543d2778e3ca..ea4cf7417074 100644 --- a/src/coreclr/src/pal/prebuilt/inc/clrprivbinding.h +++ b/src/coreclr/src/pal/prebuilt/inc/clrprivbinding.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. @@ -53,34 +52,6 @@ typedef interface ICLRPrivAssembly ICLRPrivAssembly; #endif /* __ICLRPrivAssembly_FWD_DEFINED__ */ -#ifndef __ICLRPrivResource_FWD_DEFINED__ -#define __ICLRPrivResource_FWD_DEFINED__ -typedef interface ICLRPrivResource ICLRPrivResource; - -#endif /* __ICLRPrivResource_FWD_DEFINED__ */ - - -#ifndef __ICLRPrivResourcePath_FWD_DEFINED__ -#define __ICLRPrivResourcePath_FWD_DEFINED__ -typedef interface ICLRPrivResourcePath ICLRPrivResourcePath; - -#endif /* __ICLRPrivResourcePath_FWD_DEFINED__ */ - - -#ifndef __ICLRPrivResourceAssembly_FWD_DEFINED__ -#define __ICLRPrivResourceAssembly_FWD_DEFINED__ -typedef interface ICLRPrivResourceAssembly ICLRPrivResourceAssembly; - -#endif /* __ICLRPrivResourceAssembly_FWD_DEFINED__ */ - - -#ifndef __ICLRPrivAssemblyInfo_FWD_DEFINED__ -#define __ICLRPrivAssemblyInfo_FWD_DEFINED__ -typedef interface ICLRPrivAssemblyInfo ICLRPrivAssemblyInfo; - -#endif /* __ICLRPrivAssemblyInfo_FWD_DEFINED__ */ - - /* header files for imported files */ #include "unknwn.h" #include "objidl.h" @@ -96,9 +67,6 @@ extern "C"{ - - - typedef LPCSTR LPCUTF8; @@ -242,11 +210,6 @@ EXTERN_C const IID IID_ICLRPrivAssembly; virtual HRESULT STDMETHODCALLTYPE GetAvailableImageTypes( /* [retval][out] */ LPDWORD pdwImageTypes) = 0; - virtual HRESULT STDMETHODCALLTYPE GetImageResource( - /* [in] */ DWORD dwImageType, - /* [out] */ DWORD *pdwImageType, - /* [retval][out] */ ICLRPrivResource **ppIResource) = 0; - }; @@ -285,12 +248,6 @@ EXTERN_C const IID IID_ICLRPrivAssembly; ICLRPrivAssembly * This, /* [retval][out] */ LPDWORD pdwImageTypes); - HRESULT ( STDMETHODCALLTYPE *GetImageResource )( - ICLRPrivAssembly * This, - /* [in] */ DWORD dwImageType, - /* [out] */ DWORD *pdwImageType, - /* [retval][out] */ ICLRPrivResource **ppIResource); - END_INTERFACE } ICLRPrivAssemblyVtbl; @@ -327,9 +284,6 @@ EXTERN_C const IID IID_ICLRPrivAssembly; #define ICLRPrivAssembly_GetAvailableImageTypes(This,pdwImageTypes) \ ( (This)->lpVtbl -> GetAvailableImageTypes(This,pdwImageTypes) ) -#define ICLRPrivAssembly_GetImageResource(This,dwImageType,pdwImageType,ppIResource) \ - ( (This)->lpVtbl -> GetImageResource(This,dwImageType,pdwImageType,ppIResource) ) - #endif /* COBJMACROS */ @@ -341,364 +295,6 @@ EXTERN_C const IID IID_ICLRPrivAssembly; #endif /* __ICLRPrivAssembly_INTERFACE_DEFINED__ */ -#ifndef __ICLRPrivResource_INTERFACE_DEFINED__ -#define __ICLRPrivResource_INTERFACE_DEFINED__ - -/* interface ICLRPrivResource */ -/* [object][local][version][uuid] */ - - -EXTERN_C const IID IID_ICLRPrivResource; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("2601F621-E462-404C-B299-3E1DE72F8547") - ICLRPrivResource : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE GetResourceType( - /* [retval][out] */ IID *pIID) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICLRPrivResourceVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICLRPrivResource * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICLRPrivResource * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICLRPrivResource * This); - - HRESULT ( STDMETHODCALLTYPE *GetResourceType )( - ICLRPrivResource * This, - /* [retval][out] */ IID *pIID); - - END_INTERFACE - } ICLRPrivResourceVtbl; - - interface ICLRPrivResource - { - CONST_VTBL struct ICLRPrivResourceVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICLRPrivResource_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICLRPrivResource_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICLRPrivResource_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICLRPrivResource_GetResourceType(This,pIID) \ - ( (This)->lpVtbl -> GetResourceType(This,pIID) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICLRPrivResource_INTERFACE_DEFINED__ */ - - -#ifndef __ICLRPrivResourcePath_INTERFACE_DEFINED__ -#define __ICLRPrivResourcePath_INTERFACE_DEFINED__ - -/* interface ICLRPrivResourcePath */ -/* [object][local][version][uuid] */ - - -EXTERN_C const IID IID_ICLRPrivResourcePath; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("2601F621-E462-404C-B299-3E1DE72F8544") - ICLRPrivResourcePath : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE GetPath( - /* [in] */ DWORD cchBuffer, - /* [out] */ LPDWORD pcchBuffer, - /* [optional][string][length_is][size_is][out] */ LPWSTR wzBuffer) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICLRPrivResourcePathVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICLRPrivResourcePath * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICLRPrivResourcePath * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICLRPrivResourcePath * This); - - HRESULT ( STDMETHODCALLTYPE *GetPath )( - ICLRPrivResourcePath * This, - /* [in] */ DWORD cchBuffer, - /* [out] */ LPDWORD pcchBuffer, - /* [optional][string][length_is][size_is][out] */ LPWSTR wzBuffer); - - END_INTERFACE - } ICLRPrivResourcePathVtbl; - - interface ICLRPrivResourcePath - { - CONST_VTBL struct ICLRPrivResourcePathVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICLRPrivResourcePath_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICLRPrivResourcePath_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICLRPrivResourcePath_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICLRPrivResourcePath_GetPath(This,cchBuffer,pcchBuffer,wzBuffer) \ - ( (This)->lpVtbl -> GetPath(This,cchBuffer,pcchBuffer,wzBuffer) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICLRPrivResourcePath_INTERFACE_DEFINED__ */ - - -#ifndef __ICLRPrivResourceAssembly_INTERFACE_DEFINED__ -#define __ICLRPrivResourceAssembly_INTERFACE_DEFINED__ - -/* interface ICLRPrivResourceAssembly */ -/* [object][local][version][uuid] */ - - -EXTERN_C const IID IID_ICLRPrivResourceAssembly; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("8d2d3cc9-1249-4ad4-977d-b772bd4e8a94") - ICLRPrivResourceAssembly : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE GetAssembly( - /* [retval][out] */ LPVOID *pAssembly) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICLRPrivResourceAssemblyVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICLRPrivResourceAssembly * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICLRPrivResourceAssembly * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICLRPrivResourceAssembly * This); - - HRESULT ( STDMETHODCALLTYPE *GetAssembly )( - ICLRPrivResourceAssembly * This, - /* [retval][out] */ LPVOID *pAssembly); - - END_INTERFACE - } ICLRPrivResourceAssemblyVtbl; - - interface ICLRPrivResourceAssembly - { - CONST_VTBL struct ICLRPrivResourceAssemblyVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICLRPrivResourceAssembly_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICLRPrivResourceAssembly_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICLRPrivResourceAssembly_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICLRPrivResourceAssembly_GetAssembly(This,pAssembly) \ - ( (This)->lpVtbl -> GetAssembly(This,pAssembly) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICLRPrivResourceAssembly_INTERFACE_DEFINED__ */ - - -#ifndef __ICLRPrivAssemblyInfo_INTERFACE_DEFINED__ -#define __ICLRPrivAssemblyInfo_INTERFACE_DEFINED__ - -/* interface ICLRPrivAssemblyInfo */ -/* [object][local][version][uuid] */ - - -EXTERN_C const IID IID_ICLRPrivAssemblyInfo; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("5653946E-800B-48B7-8B09-B1B879B54F68") - ICLRPrivAssemblyInfo : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE GetAssemblyName( - /* [in] */ DWORD cchBuffer, - /* [out] */ LPDWORD pcchBuffer, - /* [optional][string][out] */ LPWSTR wzBuffer) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetAssemblyVersion( - /* [out] */ USHORT *pMajor, - /* [out] */ USHORT *pMinor, - /* [out] */ USHORT *pBuild, - /* [out] */ USHORT *pRevision) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetAssemblyPublicKey( - /* [in] */ DWORD cbBuffer, - /* [out] */ LPDWORD pcbBuffer, - /* [optional][length_is][size_is][out] */ BYTE *pbBuffer) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICLRPrivAssemblyInfoVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICLRPrivAssemblyInfo * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICLRPrivAssemblyInfo * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICLRPrivAssemblyInfo * This); - - HRESULT ( STDMETHODCALLTYPE *GetAssemblyName )( - ICLRPrivAssemblyInfo * This, - /* [in] */ DWORD cchBuffer, - /* [out] */ LPDWORD pcchBuffer, - /* [optional][string][out] */ LPWSTR wzBuffer); - - HRESULT ( STDMETHODCALLTYPE *GetAssemblyVersion )( - ICLRPrivAssemblyInfo * This, - /* [out] */ USHORT *pMajor, - /* [out] */ USHORT *pMinor, - /* [out] */ USHORT *pBuild, - /* [out] */ USHORT *pRevision); - - HRESULT ( STDMETHODCALLTYPE *GetAssemblyPublicKey )( - ICLRPrivAssemblyInfo * This, - /* [in] */ DWORD cbBuffer, - /* [out] */ LPDWORD pcbBuffer, - /* [optional][length_is][size_is][out] */ BYTE *pbBuffer); - - END_INTERFACE - } ICLRPrivAssemblyInfoVtbl; - - interface ICLRPrivAssemblyInfo - { - CONST_VTBL struct ICLRPrivAssemblyInfoVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICLRPrivAssemblyInfo_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICLRPrivAssemblyInfo_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICLRPrivAssemblyInfo_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICLRPrivAssemblyInfo_GetAssemblyName(This,cchBuffer,pcchBuffer,wzBuffer) \ - ( (This)->lpVtbl -> GetAssemblyName(This,cchBuffer,pcchBuffer,wzBuffer) ) - -#define ICLRPrivAssemblyInfo_GetAssemblyVersion(This,pMajor,pMinor,pBuild,pRevision) \ - ( (This)->lpVtbl -> GetAssemblyVersion(This,pMajor,pMinor,pBuild,pRevision) ) - -#define ICLRPrivAssemblyInfo_GetAssemblyPublicKey(This,cbBuffer,pcbBuffer,pbBuffer) \ - ( (This)->lpVtbl -> GetAssemblyPublicKey(This,cbBuffer,pcbBuffer,pbBuffer) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICLRPrivAssemblyInfo_INTERFACE_DEFINED__ */ - - /* Additional Prototypes for ALL interfaces */ /* end of Additional Prototypes */ diff --git a/src/coreclr/src/pal/prebuilt/inc/cordebug.h b/src/coreclr/src/pal/prebuilt/inc/cordebug.h index 69c897575113..7b68842d2c9d 100644 --- a/src/coreclr/src/pal/prebuilt/inc/cordebug.h +++ b/src/coreclr/src/pal/prebuilt/inc/cordebug.h @@ -6,11 +6,11 @@ /* File created by MIDL compiler version 8.01.0622 */ /* at Mon Jan 18 19:14:07 2038 */ -/* Compiler settings for E:/repos/coreclr2/src/inc/cordebug.idl: - Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.01.0622 +/* Compiler settings for C:/git/runtime/src/coreclr/src/inc/cordebug.idl: + Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.01.0622 protocol : dce , ms_ext, c_ext, robust - error checks: allocation ref bounds_check enum stub_data - VC __declspec() decoration level: + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: __declspec(uuid()), __declspec(selectany), __declspec(novtable) DECLSPEC_UUID(), MIDL_INTERFACE() */ @@ -43,916 +43,916 @@ #pragma once #endif -/* Forward Declarations */ +/* Forward Declarations */ #ifndef __ICorDebugDataTarget_FWD_DEFINED__ #define __ICorDebugDataTarget_FWD_DEFINED__ typedef interface ICorDebugDataTarget ICorDebugDataTarget; -#endif /* __ICorDebugDataTarget_FWD_DEFINED__ */ +#endif /* __ICorDebugDataTarget_FWD_DEFINED__ */ #ifndef __ICorDebugStaticFieldSymbol_FWD_DEFINED__ #define __ICorDebugStaticFieldSymbol_FWD_DEFINED__ typedef interface ICorDebugStaticFieldSymbol ICorDebugStaticFieldSymbol; -#endif /* __ICorDebugStaticFieldSymbol_FWD_DEFINED__ */ +#endif /* __ICorDebugStaticFieldSymbol_FWD_DEFINED__ */ #ifndef __ICorDebugInstanceFieldSymbol_FWD_DEFINED__ #define __ICorDebugInstanceFieldSymbol_FWD_DEFINED__ typedef interface ICorDebugInstanceFieldSymbol ICorDebugInstanceFieldSymbol; -#endif /* __ICorDebugInstanceFieldSymbol_FWD_DEFINED__ */ +#endif /* __ICorDebugInstanceFieldSymbol_FWD_DEFINED__ */ #ifndef __ICorDebugVariableSymbol_FWD_DEFINED__ #define __ICorDebugVariableSymbol_FWD_DEFINED__ typedef interface ICorDebugVariableSymbol ICorDebugVariableSymbol; -#endif /* __ICorDebugVariableSymbol_FWD_DEFINED__ */ +#endif /* __ICorDebugVariableSymbol_FWD_DEFINED__ */ #ifndef __ICorDebugMemoryBuffer_FWD_DEFINED__ #define __ICorDebugMemoryBuffer_FWD_DEFINED__ typedef interface ICorDebugMemoryBuffer ICorDebugMemoryBuffer; -#endif /* __ICorDebugMemoryBuffer_FWD_DEFINED__ */ +#endif /* __ICorDebugMemoryBuffer_FWD_DEFINED__ */ #ifndef __ICorDebugMergedAssemblyRecord_FWD_DEFINED__ #define __ICorDebugMergedAssemblyRecord_FWD_DEFINED__ typedef interface ICorDebugMergedAssemblyRecord ICorDebugMergedAssemblyRecord; -#endif /* __ICorDebugMergedAssemblyRecord_FWD_DEFINED__ */ +#endif /* __ICorDebugMergedAssemblyRecord_FWD_DEFINED__ */ #ifndef __ICorDebugSymbolProvider_FWD_DEFINED__ #define __ICorDebugSymbolProvider_FWD_DEFINED__ typedef interface ICorDebugSymbolProvider ICorDebugSymbolProvider; -#endif /* __ICorDebugSymbolProvider_FWD_DEFINED__ */ +#endif /* __ICorDebugSymbolProvider_FWD_DEFINED__ */ #ifndef __ICorDebugSymbolProvider2_FWD_DEFINED__ #define __ICorDebugSymbolProvider2_FWD_DEFINED__ typedef interface ICorDebugSymbolProvider2 ICorDebugSymbolProvider2; -#endif /* __ICorDebugSymbolProvider2_FWD_DEFINED__ */ +#endif /* __ICorDebugSymbolProvider2_FWD_DEFINED__ */ #ifndef __ICorDebugVirtualUnwinder_FWD_DEFINED__ #define __ICorDebugVirtualUnwinder_FWD_DEFINED__ typedef interface ICorDebugVirtualUnwinder ICorDebugVirtualUnwinder; -#endif /* __ICorDebugVirtualUnwinder_FWD_DEFINED__ */ +#endif /* __ICorDebugVirtualUnwinder_FWD_DEFINED__ */ #ifndef __ICorDebugDataTarget2_FWD_DEFINED__ #define __ICorDebugDataTarget2_FWD_DEFINED__ typedef interface ICorDebugDataTarget2 ICorDebugDataTarget2; -#endif /* __ICorDebugDataTarget2_FWD_DEFINED__ */ +#endif /* __ICorDebugDataTarget2_FWD_DEFINED__ */ #ifndef __ICorDebugLoadedModule_FWD_DEFINED__ #define __ICorDebugLoadedModule_FWD_DEFINED__ typedef interface ICorDebugLoadedModule ICorDebugLoadedModule; -#endif /* __ICorDebugLoadedModule_FWD_DEFINED__ */ +#endif /* __ICorDebugLoadedModule_FWD_DEFINED__ */ #ifndef __ICorDebugDataTarget3_FWD_DEFINED__ #define __ICorDebugDataTarget3_FWD_DEFINED__ typedef interface ICorDebugDataTarget3 ICorDebugDataTarget3; -#endif /* __ICorDebugDataTarget3_FWD_DEFINED__ */ +#endif /* __ICorDebugDataTarget3_FWD_DEFINED__ */ #ifndef __ICorDebugDataTarget4_FWD_DEFINED__ #define __ICorDebugDataTarget4_FWD_DEFINED__ typedef interface ICorDebugDataTarget4 ICorDebugDataTarget4; -#endif /* __ICorDebugDataTarget4_FWD_DEFINED__ */ +#endif /* __ICorDebugDataTarget4_FWD_DEFINED__ */ #ifndef __ICorDebugMutableDataTarget_FWD_DEFINED__ #define __ICorDebugMutableDataTarget_FWD_DEFINED__ typedef interface ICorDebugMutableDataTarget ICorDebugMutableDataTarget; -#endif /* __ICorDebugMutableDataTarget_FWD_DEFINED__ */ +#endif /* __ICorDebugMutableDataTarget_FWD_DEFINED__ */ #ifndef __ICorDebugMetaDataLocator_FWD_DEFINED__ #define __ICorDebugMetaDataLocator_FWD_DEFINED__ typedef interface ICorDebugMetaDataLocator ICorDebugMetaDataLocator; -#endif /* __ICorDebugMetaDataLocator_FWD_DEFINED__ */ +#endif /* __ICorDebugMetaDataLocator_FWD_DEFINED__ */ #ifndef __ICorDebugManagedCallback_FWD_DEFINED__ #define __ICorDebugManagedCallback_FWD_DEFINED__ typedef interface ICorDebugManagedCallback ICorDebugManagedCallback; -#endif /* __ICorDebugManagedCallback_FWD_DEFINED__ */ +#endif /* __ICorDebugManagedCallback_FWD_DEFINED__ */ #ifndef __ICorDebugManagedCallback3_FWD_DEFINED__ #define __ICorDebugManagedCallback3_FWD_DEFINED__ typedef interface ICorDebugManagedCallback3 ICorDebugManagedCallback3; -#endif /* __ICorDebugManagedCallback3_FWD_DEFINED__ */ +#endif /* __ICorDebugManagedCallback3_FWD_DEFINED__ */ #ifndef __ICorDebugManagedCallback4_FWD_DEFINED__ #define __ICorDebugManagedCallback4_FWD_DEFINED__ typedef interface ICorDebugManagedCallback4 ICorDebugManagedCallback4; -#endif /* __ICorDebugManagedCallback4_FWD_DEFINED__ */ +#endif /* __ICorDebugManagedCallback4_FWD_DEFINED__ */ #ifndef __ICorDebugManagedCallback2_FWD_DEFINED__ #define __ICorDebugManagedCallback2_FWD_DEFINED__ typedef interface ICorDebugManagedCallback2 ICorDebugManagedCallback2; -#endif /* __ICorDebugManagedCallback2_FWD_DEFINED__ */ +#endif /* __ICorDebugManagedCallback2_FWD_DEFINED__ */ #ifndef __ICorDebugUnmanagedCallback_FWD_DEFINED__ #define __ICorDebugUnmanagedCallback_FWD_DEFINED__ typedef interface ICorDebugUnmanagedCallback ICorDebugUnmanagedCallback; -#endif /* __ICorDebugUnmanagedCallback_FWD_DEFINED__ */ +#endif /* __ICorDebugUnmanagedCallback_FWD_DEFINED__ */ #ifndef __ICorDebug_FWD_DEFINED__ #define __ICorDebug_FWD_DEFINED__ typedef interface ICorDebug ICorDebug; -#endif /* __ICorDebug_FWD_DEFINED__ */ +#endif /* __ICorDebug_FWD_DEFINED__ */ #ifndef __ICorDebugRemoteTarget_FWD_DEFINED__ #define __ICorDebugRemoteTarget_FWD_DEFINED__ typedef interface ICorDebugRemoteTarget ICorDebugRemoteTarget; -#endif /* __ICorDebugRemoteTarget_FWD_DEFINED__ */ +#endif /* __ICorDebugRemoteTarget_FWD_DEFINED__ */ #ifndef __ICorDebugRemote_FWD_DEFINED__ #define __ICorDebugRemote_FWD_DEFINED__ typedef interface ICorDebugRemote ICorDebugRemote; -#endif /* __ICorDebugRemote_FWD_DEFINED__ */ +#endif /* __ICorDebugRemote_FWD_DEFINED__ */ #ifndef __ICorDebug2_FWD_DEFINED__ #define __ICorDebug2_FWD_DEFINED__ typedef interface ICorDebug2 ICorDebug2; -#endif /* __ICorDebug2_FWD_DEFINED__ */ +#endif /* __ICorDebug2_FWD_DEFINED__ */ #ifndef __ICorDebugController_FWD_DEFINED__ #define __ICorDebugController_FWD_DEFINED__ typedef interface ICorDebugController ICorDebugController; -#endif /* __ICorDebugController_FWD_DEFINED__ */ +#endif /* __ICorDebugController_FWD_DEFINED__ */ #ifndef __ICorDebugAppDomain_FWD_DEFINED__ #define __ICorDebugAppDomain_FWD_DEFINED__ typedef interface ICorDebugAppDomain ICorDebugAppDomain; -#endif /* __ICorDebugAppDomain_FWD_DEFINED__ */ +#endif /* __ICorDebugAppDomain_FWD_DEFINED__ */ #ifndef __ICorDebugAppDomain2_FWD_DEFINED__ #define __ICorDebugAppDomain2_FWD_DEFINED__ typedef interface ICorDebugAppDomain2 ICorDebugAppDomain2; -#endif /* __ICorDebugAppDomain2_FWD_DEFINED__ */ +#endif /* __ICorDebugAppDomain2_FWD_DEFINED__ */ #ifndef __ICorDebugEnum_FWD_DEFINED__ #define __ICorDebugEnum_FWD_DEFINED__ typedef interface ICorDebugEnum ICorDebugEnum; -#endif /* __ICorDebugEnum_FWD_DEFINED__ */ +#endif /* __ICorDebugEnum_FWD_DEFINED__ */ #ifndef __ICorDebugGuidToTypeEnum_FWD_DEFINED__ #define __ICorDebugGuidToTypeEnum_FWD_DEFINED__ typedef interface ICorDebugGuidToTypeEnum ICorDebugGuidToTypeEnum; -#endif /* __ICorDebugGuidToTypeEnum_FWD_DEFINED__ */ +#endif /* __ICorDebugGuidToTypeEnum_FWD_DEFINED__ */ #ifndef __ICorDebugAppDomain3_FWD_DEFINED__ #define __ICorDebugAppDomain3_FWD_DEFINED__ typedef interface ICorDebugAppDomain3 ICorDebugAppDomain3; -#endif /* __ICorDebugAppDomain3_FWD_DEFINED__ */ +#endif /* __ICorDebugAppDomain3_FWD_DEFINED__ */ #ifndef __ICorDebugAppDomain4_FWD_DEFINED__ #define __ICorDebugAppDomain4_FWD_DEFINED__ typedef interface ICorDebugAppDomain4 ICorDebugAppDomain4; -#endif /* __ICorDebugAppDomain4_FWD_DEFINED__ */ +#endif /* __ICorDebugAppDomain4_FWD_DEFINED__ */ #ifndef __ICorDebugAssembly_FWD_DEFINED__ #define __ICorDebugAssembly_FWD_DEFINED__ typedef interface ICorDebugAssembly ICorDebugAssembly; -#endif /* __ICorDebugAssembly_FWD_DEFINED__ */ +#endif /* __ICorDebugAssembly_FWD_DEFINED__ */ #ifndef __ICorDebugAssembly2_FWD_DEFINED__ #define __ICorDebugAssembly2_FWD_DEFINED__ typedef interface ICorDebugAssembly2 ICorDebugAssembly2; -#endif /* __ICorDebugAssembly2_FWD_DEFINED__ */ +#endif /* __ICorDebugAssembly2_FWD_DEFINED__ */ #ifndef __ICorDebugAssembly3_FWD_DEFINED__ #define __ICorDebugAssembly3_FWD_DEFINED__ typedef interface ICorDebugAssembly3 ICorDebugAssembly3; -#endif /* __ICorDebugAssembly3_FWD_DEFINED__ */ +#endif /* __ICorDebugAssembly3_FWD_DEFINED__ */ #ifndef __ICorDebugHeapEnum_FWD_DEFINED__ #define __ICorDebugHeapEnum_FWD_DEFINED__ typedef interface ICorDebugHeapEnum ICorDebugHeapEnum; -#endif /* __ICorDebugHeapEnum_FWD_DEFINED__ */ +#endif /* __ICorDebugHeapEnum_FWD_DEFINED__ */ #ifndef __ICorDebugHeapSegmentEnum_FWD_DEFINED__ #define __ICorDebugHeapSegmentEnum_FWD_DEFINED__ typedef interface ICorDebugHeapSegmentEnum ICorDebugHeapSegmentEnum; -#endif /* __ICorDebugHeapSegmentEnum_FWD_DEFINED__ */ +#endif /* __ICorDebugHeapSegmentEnum_FWD_DEFINED__ */ #ifndef __ICorDebugGCReferenceEnum_FWD_DEFINED__ #define __ICorDebugGCReferenceEnum_FWD_DEFINED__ typedef interface ICorDebugGCReferenceEnum ICorDebugGCReferenceEnum; -#endif /* __ICorDebugGCReferenceEnum_FWD_DEFINED__ */ +#endif /* __ICorDebugGCReferenceEnum_FWD_DEFINED__ */ #ifndef __ICorDebugProcess_FWD_DEFINED__ #define __ICorDebugProcess_FWD_DEFINED__ typedef interface ICorDebugProcess ICorDebugProcess; -#endif /* __ICorDebugProcess_FWD_DEFINED__ */ +#endif /* __ICorDebugProcess_FWD_DEFINED__ */ #ifndef __ICorDebugProcess2_FWD_DEFINED__ #define __ICorDebugProcess2_FWD_DEFINED__ typedef interface ICorDebugProcess2 ICorDebugProcess2; -#endif /* __ICorDebugProcess2_FWD_DEFINED__ */ +#endif /* __ICorDebugProcess2_FWD_DEFINED__ */ #ifndef __ICorDebugProcess3_FWD_DEFINED__ #define __ICorDebugProcess3_FWD_DEFINED__ typedef interface ICorDebugProcess3 ICorDebugProcess3; -#endif /* __ICorDebugProcess3_FWD_DEFINED__ */ +#endif /* __ICorDebugProcess3_FWD_DEFINED__ */ #ifndef __ICorDebugProcess5_FWD_DEFINED__ #define __ICorDebugProcess5_FWD_DEFINED__ typedef interface ICorDebugProcess5 ICorDebugProcess5; -#endif /* __ICorDebugProcess5_FWD_DEFINED__ */ +#endif /* __ICorDebugProcess5_FWD_DEFINED__ */ #ifndef __ICorDebugDebugEvent_FWD_DEFINED__ #define __ICorDebugDebugEvent_FWD_DEFINED__ typedef interface ICorDebugDebugEvent ICorDebugDebugEvent; -#endif /* __ICorDebugDebugEvent_FWD_DEFINED__ */ +#endif /* __ICorDebugDebugEvent_FWD_DEFINED__ */ #ifndef __ICorDebugProcess6_FWD_DEFINED__ #define __ICorDebugProcess6_FWD_DEFINED__ typedef interface ICorDebugProcess6 ICorDebugProcess6; -#endif /* __ICorDebugProcess6_FWD_DEFINED__ */ +#endif /* __ICorDebugProcess6_FWD_DEFINED__ */ #ifndef __ICorDebugProcess7_FWD_DEFINED__ #define __ICorDebugProcess7_FWD_DEFINED__ typedef interface ICorDebugProcess7 ICorDebugProcess7; -#endif /* __ICorDebugProcess7_FWD_DEFINED__ */ +#endif /* __ICorDebugProcess7_FWD_DEFINED__ */ #ifndef __ICorDebugProcess8_FWD_DEFINED__ #define __ICorDebugProcess8_FWD_DEFINED__ typedef interface ICorDebugProcess8 ICorDebugProcess8; -#endif /* __ICorDebugProcess8_FWD_DEFINED__ */ +#endif /* __ICorDebugProcess8_FWD_DEFINED__ */ #ifndef __ICorDebugProcess10_FWD_DEFINED__ #define __ICorDebugProcess10_FWD_DEFINED__ typedef interface ICorDebugProcess10 ICorDebugProcess10; -#endif /* __ICorDebugProcess10_FWD_DEFINED__ */ +#endif /* __ICorDebugProcess10_FWD_DEFINED__ */ #ifndef __ICorDebugModuleDebugEvent_FWD_DEFINED__ #define __ICorDebugModuleDebugEvent_FWD_DEFINED__ typedef interface ICorDebugModuleDebugEvent ICorDebugModuleDebugEvent; -#endif /* __ICorDebugModuleDebugEvent_FWD_DEFINED__ */ +#endif /* __ICorDebugModuleDebugEvent_FWD_DEFINED__ */ #ifndef __ICorDebugExceptionDebugEvent_FWD_DEFINED__ #define __ICorDebugExceptionDebugEvent_FWD_DEFINED__ typedef interface ICorDebugExceptionDebugEvent ICorDebugExceptionDebugEvent; -#endif /* __ICorDebugExceptionDebugEvent_FWD_DEFINED__ */ +#endif /* __ICorDebugExceptionDebugEvent_FWD_DEFINED__ */ #ifndef __ICorDebugBreakpoint_FWD_DEFINED__ #define __ICorDebugBreakpoint_FWD_DEFINED__ typedef interface ICorDebugBreakpoint ICorDebugBreakpoint; -#endif /* __ICorDebugBreakpoint_FWD_DEFINED__ */ +#endif /* __ICorDebugBreakpoint_FWD_DEFINED__ */ #ifndef __ICorDebugFunctionBreakpoint_FWD_DEFINED__ #define __ICorDebugFunctionBreakpoint_FWD_DEFINED__ typedef interface ICorDebugFunctionBreakpoint ICorDebugFunctionBreakpoint; -#endif /* __ICorDebugFunctionBreakpoint_FWD_DEFINED__ */ +#endif /* __ICorDebugFunctionBreakpoint_FWD_DEFINED__ */ #ifndef __ICorDebugModuleBreakpoint_FWD_DEFINED__ #define __ICorDebugModuleBreakpoint_FWD_DEFINED__ typedef interface ICorDebugModuleBreakpoint ICorDebugModuleBreakpoint; -#endif /* __ICorDebugModuleBreakpoint_FWD_DEFINED__ */ +#endif /* __ICorDebugModuleBreakpoint_FWD_DEFINED__ */ #ifndef __ICorDebugValueBreakpoint_FWD_DEFINED__ #define __ICorDebugValueBreakpoint_FWD_DEFINED__ typedef interface ICorDebugValueBreakpoint ICorDebugValueBreakpoint; -#endif /* __ICorDebugValueBreakpoint_FWD_DEFINED__ */ +#endif /* __ICorDebugValueBreakpoint_FWD_DEFINED__ */ #ifndef __ICorDebugStepper_FWD_DEFINED__ #define __ICorDebugStepper_FWD_DEFINED__ typedef interface ICorDebugStepper ICorDebugStepper; -#endif /* __ICorDebugStepper_FWD_DEFINED__ */ +#endif /* __ICorDebugStepper_FWD_DEFINED__ */ #ifndef __ICorDebugStepper2_FWD_DEFINED__ #define __ICorDebugStepper2_FWD_DEFINED__ typedef interface ICorDebugStepper2 ICorDebugStepper2; -#endif /* __ICorDebugStepper2_FWD_DEFINED__ */ +#endif /* __ICorDebugStepper2_FWD_DEFINED__ */ #ifndef __ICorDebugRegisterSet_FWD_DEFINED__ #define __ICorDebugRegisterSet_FWD_DEFINED__ typedef interface ICorDebugRegisterSet ICorDebugRegisterSet; -#endif /* __ICorDebugRegisterSet_FWD_DEFINED__ */ +#endif /* __ICorDebugRegisterSet_FWD_DEFINED__ */ #ifndef __ICorDebugRegisterSet2_FWD_DEFINED__ #define __ICorDebugRegisterSet2_FWD_DEFINED__ typedef interface ICorDebugRegisterSet2 ICorDebugRegisterSet2; -#endif /* __ICorDebugRegisterSet2_FWD_DEFINED__ */ +#endif /* __ICorDebugRegisterSet2_FWD_DEFINED__ */ #ifndef __ICorDebugThread_FWD_DEFINED__ #define __ICorDebugThread_FWD_DEFINED__ typedef interface ICorDebugThread ICorDebugThread; -#endif /* __ICorDebugThread_FWD_DEFINED__ */ +#endif /* __ICorDebugThread_FWD_DEFINED__ */ #ifndef __ICorDebugThread2_FWD_DEFINED__ #define __ICorDebugThread2_FWD_DEFINED__ typedef interface ICorDebugThread2 ICorDebugThread2; -#endif /* __ICorDebugThread2_FWD_DEFINED__ */ +#endif /* __ICorDebugThread2_FWD_DEFINED__ */ #ifndef __ICorDebugThread3_FWD_DEFINED__ #define __ICorDebugThread3_FWD_DEFINED__ typedef interface ICorDebugThread3 ICorDebugThread3; -#endif /* __ICorDebugThread3_FWD_DEFINED__ */ +#endif /* __ICorDebugThread3_FWD_DEFINED__ */ #ifndef __ICorDebugThread4_FWD_DEFINED__ #define __ICorDebugThread4_FWD_DEFINED__ typedef interface ICorDebugThread4 ICorDebugThread4; -#endif /* __ICorDebugThread4_FWD_DEFINED__ */ +#endif /* __ICorDebugThread4_FWD_DEFINED__ */ #ifndef __ICorDebugStackWalk_FWD_DEFINED__ #define __ICorDebugStackWalk_FWD_DEFINED__ typedef interface ICorDebugStackWalk ICorDebugStackWalk; -#endif /* __ICorDebugStackWalk_FWD_DEFINED__ */ +#endif /* __ICorDebugStackWalk_FWD_DEFINED__ */ #ifndef __ICorDebugChain_FWD_DEFINED__ #define __ICorDebugChain_FWD_DEFINED__ typedef interface ICorDebugChain ICorDebugChain; -#endif /* __ICorDebugChain_FWD_DEFINED__ */ +#endif /* __ICorDebugChain_FWD_DEFINED__ */ #ifndef __ICorDebugFrame_FWD_DEFINED__ #define __ICorDebugFrame_FWD_DEFINED__ typedef interface ICorDebugFrame ICorDebugFrame; -#endif /* __ICorDebugFrame_FWD_DEFINED__ */ +#endif /* __ICorDebugFrame_FWD_DEFINED__ */ #ifndef __ICorDebugInternalFrame_FWD_DEFINED__ #define __ICorDebugInternalFrame_FWD_DEFINED__ typedef interface ICorDebugInternalFrame ICorDebugInternalFrame; -#endif /* __ICorDebugInternalFrame_FWD_DEFINED__ */ +#endif /* __ICorDebugInternalFrame_FWD_DEFINED__ */ #ifndef __ICorDebugInternalFrame2_FWD_DEFINED__ #define __ICorDebugInternalFrame2_FWD_DEFINED__ typedef interface ICorDebugInternalFrame2 ICorDebugInternalFrame2; -#endif /* __ICorDebugInternalFrame2_FWD_DEFINED__ */ +#endif /* __ICorDebugInternalFrame2_FWD_DEFINED__ */ #ifndef __ICorDebugILFrame_FWD_DEFINED__ #define __ICorDebugILFrame_FWD_DEFINED__ typedef interface ICorDebugILFrame ICorDebugILFrame; -#endif /* __ICorDebugILFrame_FWD_DEFINED__ */ +#endif /* __ICorDebugILFrame_FWD_DEFINED__ */ #ifndef __ICorDebugILFrame2_FWD_DEFINED__ #define __ICorDebugILFrame2_FWD_DEFINED__ typedef interface ICorDebugILFrame2 ICorDebugILFrame2; -#endif /* __ICorDebugILFrame2_FWD_DEFINED__ */ +#endif /* __ICorDebugILFrame2_FWD_DEFINED__ */ #ifndef __ICorDebugILFrame3_FWD_DEFINED__ #define __ICorDebugILFrame3_FWD_DEFINED__ typedef interface ICorDebugILFrame3 ICorDebugILFrame3; -#endif /* __ICorDebugILFrame3_FWD_DEFINED__ */ +#endif /* __ICorDebugILFrame3_FWD_DEFINED__ */ #ifndef __ICorDebugILFrame4_FWD_DEFINED__ #define __ICorDebugILFrame4_FWD_DEFINED__ typedef interface ICorDebugILFrame4 ICorDebugILFrame4; -#endif /* __ICorDebugILFrame4_FWD_DEFINED__ */ +#endif /* __ICorDebugILFrame4_FWD_DEFINED__ */ #ifndef __ICorDebugNativeFrame_FWD_DEFINED__ #define __ICorDebugNativeFrame_FWD_DEFINED__ typedef interface ICorDebugNativeFrame ICorDebugNativeFrame; -#endif /* __ICorDebugNativeFrame_FWD_DEFINED__ */ +#endif /* __ICorDebugNativeFrame_FWD_DEFINED__ */ #ifndef __ICorDebugNativeFrame2_FWD_DEFINED__ #define __ICorDebugNativeFrame2_FWD_DEFINED__ typedef interface ICorDebugNativeFrame2 ICorDebugNativeFrame2; -#endif /* __ICorDebugNativeFrame2_FWD_DEFINED__ */ +#endif /* __ICorDebugNativeFrame2_FWD_DEFINED__ */ #ifndef __ICorDebugModule3_FWD_DEFINED__ #define __ICorDebugModule3_FWD_DEFINED__ typedef interface ICorDebugModule3 ICorDebugModule3; -#endif /* __ICorDebugModule3_FWD_DEFINED__ */ +#endif /* __ICorDebugModule3_FWD_DEFINED__ */ #ifndef __ICorDebugRuntimeUnwindableFrame_FWD_DEFINED__ #define __ICorDebugRuntimeUnwindableFrame_FWD_DEFINED__ typedef interface ICorDebugRuntimeUnwindableFrame ICorDebugRuntimeUnwindableFrame; -#endif /* __ICorDebugRuntimeUnwindableFrame_FWD_DEFINED__ */ +#endif /* __ICorDebugRuntimeUnwindableFrame_FWD_DEFINED__ */ #ifndef __ICorDebugModule_FWD_DEFINED__ #define __ICorDebugModule_FWD_DEFINED__ typedef interface ICorDebugModule ICorDebugModule; -#endif /* __ICorDebugModule_FWD_DEFINED__ */ +#endif /* __ICorDebugModule_FWD_DEFINED__ */ #ifndef __ICorDebugModule2_FWD_DEFINED__ #define __ICorDebugModule2_FWD_DEFINED__ typedef interface ICorDebugModule2 ICorDebugModule2; -#endif /* __ICorDebugModule2_FWD_DEFINED__ */ +#endif /* __ICorDebugModule2_FWD_DEFINED__ */ #ifndef __ICorDebugFunction_FWD_DEFINED__ #define __ICorDebugFunction_FWD_DEFINED__ typedef interface ICorDebugFunction ICorDebugFunction; -#endif /* __ICorDebugFunction_FWD_DEFINED__ */ +#endif /* __ICorDebugFunction_FWD_DEFINED__ */ #ifndef __ICorDebugFunction2_FWD_DEFINED__ #define __ICorDebugFunction2_FWD_DEFINED__ typedef interface ICorDebugFunction2 ICorDebugFunction2; -#endif /* __ICorDebugFunction2_FWD_DEFINED__ */ +#endif /* __ICorDebugFunction2_FWD_DEFINED__ */ #ifndef __ICorDebugFunction3_FWD_DEFINED__ #define __ICorDebugFunction3_FWD_DEFINED__ typedef interface ICorDebugFunction3 ICorDebugFunction3; -#endif /* __ICorDebugFunction3_FWD_DEFINED__ */ +#endif /* __ICorDebugFunction3_FWD_DEFINED__ */ #ifndef __ICorDebugFunction4_FWD_DEFINED__ #define __ICorDebugFunction4_FWD_DEFINED__ typedef interface ICorDebugFunction4 ICorDebugFunction4; -#endif /* __ICorDebugFunction4_FWD_DEFINED__ */ +#endif /* __ICorDebugFunction4_FWD_DEFINED__ */ #ifndef __ICorDebugCode_FWD_DEFINED__ #define __ICorDebugCode_FWD_DEFINED__ typedef interface ICorDebugCode ICorDebugCode; -#endif /* __ICorDebugCode_FWD_DEFINED__ */ +#endif /* __ICorDebugCode_FWD_DEFINED__ */ #ifndef __ICorDebugCode2_FWD_DEFINED__ #define __ICorDebugCode2_FWD_DEFINED__ typedef interface ICorDebugCode2 ICorDebugCode2; -#endif /* __ICorDebugCode2_FWD_DEFINED__ */ +#endif /* __ICorDebugCode2_FWD_DEFINED__ */ #ifndef __ICorDebugCode3_FWD_DEFINED__ #define __ICorDebugCode3_FWD_DEFINED__ typedef interface ICorDebugCode3 ICorDebugCode3; -#endif /* __ICorDebugCode3_FWD_DEFINED__ */ +#endif /* __ICorDebugCode3_FWD_DEFINED__ */ #ifndef __ICorDebugCode4_FWD_DEFINED__ #define __ICorDebugCode4_FWD_DEFINED__ typedef interface ICorDebugCode4 ICorDebugCode4; -#endif /* __ICorDebugCode4_FWD_DEFINED__ */ +#endif /* __ICorDebugCode4_FWD_DEFINED__ */ #ifndef __ICorDebugILCode_FWD_DEFINED__ #define __ICorDebugILCode_FWD_DEFINED__ typedef interface ICorDebugILCode ICorDebugILCode; -#endif /* __ICorDebugILCode_FWD_DEFINED__ */ +#endif /* __ICorDebugILCode_FWD_DEFINED__ */ #ifndef __ICorDebugILCode2_FWD_DEFINED__ #define __ICorDebugILCode2_FWD_DEFINED__ typedef interface ICorDebugILCode2 ICorDebugILCode2; -#endif /* __ICorDebugILCode2_FWD_DEFINED__ */ +#endif /* __ICorDebugILCode2_FWD_DEFINED__ */ #ifndef __ICorDebugClass_FWD_DEFINED__ #define __ICorDebugClass_FWD_DEFINED__ typedef interface ICorDebugClass ICorDebugClass; -#endif /* __ICorDebugClass_FWD_DEFINED__ */ +#endif /* __ICorDebugClass_FWD_DEFINED__ */ #ifndef __ICorDebugClass2_FWD_DEFINED__ #define __ICorDebugClass2_FWD_DEFINED__ typedef interface ICorDebugClass2 ICorDebugClass2; -#endif /* __ICorDebugClass2_FWD_DEFINED__ */ +#endif /* __ICorDebugClass2_FWD_DEFINED__ */ #ifndef __ICorDebugEval_FWD_DEFINED__ #define __ICorDebugEval_FWD_DEFINED__ typedef interface ICorDebugEval ICorDebugEval; -#endif /* __ICorDebugEval_FWD_DEFINED__ */ +#endif /* __ICorDebugEval_FWD_DEFINED__ */ #ifndef __ICorDebugEval2_FWD_DEFINED__ #define __ICorDebugEval2_FWD_DEFINED__ typedef interface ICorDebugEval2 ICorDebugEval2; -#endif /* __ICorDebugEval2_FWD_DEFINED__ */ +#endif /* __ICorDebugEval2_FWD_DEFINED__ */ #ifndef __ICorDebugValue_FWD_DEFINED__ #define __ICorDebugValue_FWD_DEFINED__ typedef interface ICorDebugValue ICorDebugValue; -#endif /* __ICorDebugValue_FWD_DEFINED__ */ +#endif /* __ICorDebugValue_FWD_DEFINED__ */ #ifndef __ICorDebugValue2_FWD_DEFINED__ #define __ICorDebugValue2_FWD_DEFINED__ typedef interface ICorDebugValue2 ICorDebugValue2; -#endif /* __ICorDebugValue2_FWD_DEFINED__ */ +#endif /* __ICorDebugValue2_FWD_DEFINED__ */ #ifndef __ICorDebugValue3_FWD_DEFINED__ #define __ICorDebugValue3_FWD_DEFINED__ typedef interface ICorDebugValue3 ICorDebugValue3; -#endif /* __ICorDebugValue3_FWD_DEFINED__ */ +#endif /* __ICorDebugValue3_FWD_DEFINED__ */ #ifndef __ICorDebugGenericValue_FWD_DEFINED__ #define __ICorDebugGenericValue_FWD_DEFINED__ typedef interface ICorDebugGenericValue ICorDebugGenericValue; -#endif /* __ICorDebugGenericValue_FWD_DEFINED__ */ +#endif /* __ICorDebugGenericValue_FWD_DEFINED__ */ #ifndef __ICorDebugReferenceValue_FWD_DEFINED__ #define __ICorDebugReferenceValue_FWD_DEFINED__ typedef interface ICorDebugReferenceValue ICorDebugReferenceValue; -#endif /* __ICorDebugReferenceValue_FWD_DEFINED__ */ +#endif /* __ICorDebugReferenceValue_FWD_DEFINED__ */ #ifndef __ICorDebugHeapValue_FWD_DEFINED__ #define __ICorDebugHeapValue_FWD_DEFINED__ typedef interface ICorDebugHeapValue ICorDebugHeapValue; -#endif /* __ICorDebugHeapValue_FWD_DEFINED__ */ +#endif /* __ICorDebugHeapValue_FWD_DEFINED__ */ #ifndef __ICorDebugHeapValue2_FWD_DEFINED__ #define __ICorDebugHeapValue2_FWD_DEFINED__ typedef interface ICorDebugHeapValue2 ICorDebugHeapValue2; -#endif /* __ICorDebugHeapValue2_FWD_DEFINED__ */ +#endif /* __ICorDebugHeapValue2_FWD_DEFINED__ */ #ifndef __ICorDebugHeapValue3_FWD_DEFINED__ #define __ICorDebugHeapValue3_FWD_DEFINED__ typedef interface ICorDebugHeapValue3 ICorDebugHeapValue3; -#endif /* __ICorDebugHeapValue3_FWD_DEFINED__ */ +#endif /* __ICorDebugHeapValue3_FWD_DEFINED__ */ #ifndef __ICorDebugObjectValue_FWD_DEFINED__ #define __ICorDebugObjectValue_FWD_DEFINED__ typedef interface ICorDebugObjectValue ICorDebugObjectValue; -#endif /* __ICorDebugObjectValue_FWD_DEFINED__ */ +#endif /* __ICorDebugObjectValue_FWD_DEFINED__ */ #ifndef __ICorDebugObjectValue2_FWD_DEFINED__ #define __ICorDebugObjectValue2_FWD_DEFINED__ typedef interface ICorDebugObjectValue2 ICorDebugObjectValue2; -#endif /* __ICorDebugObjectValue2_FWD_DEFINED__ */ +#endif /* __ICorDebugObjectValue2_FWD_DEFINED__ */ #ifndef __ICorDebugDelegateObjectValue_FWD_DEFINED__ #define __ICorDebugDelegateObjectValue_FWD_DEFINED__ typedef interface ICorDebugDelegateObjectValue ICorDebugDelegateObjectValue; -#endif /* __ICorDebugDelegateObjectValue_FWD_DEFINED__ */ +#endif /* __ICorDebugDelegateObjectValue_FWD_DEFINED__ */ #ifndef __ICorDebugBoxValue_FWD_DEFINED__ #define __ICorDebugBoxValue_FWD_DEFINED__ typedef interface ICorDebugBoxValue ICorDebugBoxValue; -#endif /* __ICorDebugBoxValue_FWD_DEFINED__ */ +#endif /* __ICorDebugBoxValue_FWD_DEFINED__ */ #ifndef __ICorDebugStringValue_FWD_DEFINED__ #define __ICorDebugStringValue_FWD_DEFINED__ typedef interface ICorDebugStringValue ICorDebugStringValue; -#endif /* __ICorDebugStringValue_FWD_DEFINED__ */ +#endif /* __ICorDebugStringValue_FWD_DEFINED__ */ #ifndef __ICorDebugArrayValue_FWD_DEFINED__ #define __ICorDebugArrayValue_FWD_DEFINED__ typedef interface ICorDebugArrayValue ICorDebugArrayValue; -#endif /* __ICorDebugArrayValue_FWD_DEFINED__ */ +#endif /* __ICorDebugArrayValue_FWD_DEFINED__ */ #ifndef __ICorDebugVariableHome_FWD_DEFINED__ #define __ICorDebugVariableHome_FWD_DEFINED__ typedef interface ICorDebugVariableHome ICorDebugVariableHome; -#endif /* __ICorDebugVariableHome_FWD_DEFINED__ */ +#endif /* __ICorDebugVariableHome_FWD_DEFINED__ */ #ifndef __ICorDebugHandleValue_FWD_DEFINED__ #define __ICorDebugHandleValue_FWD_DEFINED__ typedef interface ICorDebugHandleValue ICorDebugHandleValue; -#endif /* __ICorDebugHandleValue_FWD_DEFINED__ */ +#endif /* __ICorDebugHandleValue_FWD_DEFINED__ */ #ifndef __ICorDebugContext_FWD_DEFINED__ #define __ICorDebugContext_FWD_DEFINED__ typedef interface ICorDebugContext ICorDebugContext; -#endif /* __ICorDebugContext_FWD_DEFINED__ */ +#endif /* __ICorDebugContext_FWD_DEFINED__ */ #ifndef __ICorDebugComObjectValue_FWD_DEFINED__ #define __ICorDebugComObjectValue_FWD_DEFINED__ typedef interface ICorDebugComObjectValue ICorDebugComObjectValue; -#endif /* __ICorDebugComObjectValue_FWD_DEFINED__ */ +#endif /* __ICorDebugComObjectValue_FWD_DEFINED__ */ #ifndef __ICorDebugObjectEnum_FWD_DEFINED__ #define __ICorDebugObjectEnum_FWD_DEFINED__ typedef interface ICorDebugObjectEnum ICorDebugObjectEnum; -#endif /* __ICorDebugObjectEnum_FWD_DEFINED__ */ +#endif /* __ICorDebugObjectEnum_FWD_DEFINED__ */ #ifndef __ICorDebugBreakpointEnum_FWD_DEFINED__ #define __ICorDebugBreakpointEnum_FWD_DEFINED__ typedef interface ICorDebugBreakpointEnum ICorDebugBreakpointEnum; -#endif /* __ICorDebugBreakpointEnum_FWD_DEFINED__ */ +#endif /* __ICorDebugBreakpointEnum_FWD_DEFINED__ */ #ifndef __ICorDebugStepperEnum_FWD_DEFINED__ #define __ICorDebugStepperEnum_FWD_DEFINED__ typedef interface ICorDebugStepperEnum ICorDebugStepperEnum; -#endif /* __ICorDebugStepperEnum_FWD_DEFINED__ */ +#endif /* __ICorDebugStepperEnum_FWD_DEFINED__ */ #ifndef __ICorDebugProcessEnum_FWD_DEFINED__ #define __ICorDebugProcessEnum_FWD_DEFINED__ typedef interface ICorDebugProcessEnum ICorDebugProcessEnum; -#endif /* __ICorDebugProcessEnum_FWD_DEFINED__ */ +#endif /* __ICorDebugProcessEnum_FWD_DEFINED__ */ #ifndef __ICorDebugThreadEnum_FWD_DEFINED__ #define __ICorDebugThreadEnum_FWD_DEFINED__ typedef interface ICorDebugThreadEnum ICorDebugThreadEnum; -#endif /* __ICorDebugThreadEnum_FWD_DEFINED__ */ +#endif /* __ICorDebugThreadEnum_FWD_DEFINED__ */ #ifndef __ICorDebugFrameEnum_FWD_DEFINED__ #define __ICorDebugFrameEnum_FWD_DEFINED__ typedef interface ICorDebugFrameEnum ICorDebugFrameEnum; -#endif /* __ICorDebugFrameEnum_FWD_DEFINED__ */ +#endif /* __ICorDebugFrameEnum_FWD_DEFINED__ */ #ifndef __ICorDebugChainEnum_FWD_DEFINED__ #define __ICorDebugChainEnum_FWD_DEFINED__ typedef interface ICorDebugChainEnum ICorDebugChainEnum; -#endif /* __ICorDebugChainEnum_FWD_DEFINED__ */ +#endif /* __ICorDebugChainEnum_FWD_DEFINED__ */ #ifndef __ICorDebugModuleEnum_FWD_DEFINED__ #define __ICorDebugModuleEnum_FWD_DEFINED__ typedef interface ICorDebugModuleEnum ICorDebugModuleEnum; -#endif /* __ICorDebugModuleEnum_FWD_DEFINED__ */ +#endif /* __ICorDebugModuleEnum_FWD_DEFINED__ */ #ifndef __ICorDebugValueEnum_FWD_DEFINED__ #define __ICorDebugValueEnum_FWD_DEFINED__ typedef interface ICorDebugValueEnum ICorDebugValueEnum; -#endif /* __ICorDebugValueEnum_FWD_DEFINED__ */ +#endif /* __ICorDebugValueEnum_FWD_DEFINED__ */ #ifndef __ICorDebugVariableHomeEnum_FWD_DEFINED__ #define __ICorDebugVariableHomeEnum_FWD_DEFINED__ typedef interface ICorDebugVariableHomeEnum ICorDebugVariableHomeEnum; -#endif /* __ICorDebugVariableHomeEnum_FWD_DEFINED__ */ +#endif /* __ICorDebugVariableHomeEnum_FWD_DEFINED__ */ #ifndef __ICorDebugCodeEnum_FWD_DEFINED__ #define __ICorDebugCodeEnum_FWD_DEFINED__ typedef interface ICorDebugCodeEnum ICorDebugCodeEnum; -#endif /* __ICorDebugCodeEnum_FWD_DEFINED__ */ +#endif /* __ICorDebugCodeEnum_FWD_DEFINED__ */ #ifndef __ICorDebugTypeEnum_FWD_DEFINED__ #define __ICorDebugTypeEnum_FWD_DEFINED__ typedef interface ICorDebugTypeEnum ICorDebugTypeEnum; -#endif /* __ICorDebugTypeEnum_FWD_DEFINED__ */ +#endif /* __ICorDebugTypeEnum_FWD_DEFINED__ */ #ifndef __ICorDebugType_FWD_DEFINED__ #define __ICorDebugType_FWD_DEFINED__ typedef interface ICorDebugType ICorDebugType; -#endif /* __ICorDebugType_FWD_DEFINED__ */ +#endif /* __ICorDebugType_FWD_DEFINED__ */ #ifndef __ICorDebugType2_FWD_DEFINED__ #define __ICorDebugType2_FWD_DEFINED__ typedef interface ICorDebugType2 ICorDebugType2; -#endif /* __ICorDebugType2_FWD_DEFINED__ */ +#endif /* __ICorDebugType2_FWD_DEFINED__ */ #ifndef __ICorDebugErrorInfoEnum_FWD_DEFINED__ #define __ICorDebugErrorInfoEnum_FWD_DEFINED__ typedef interface ICorDebugErrorInfoEnum ICorDebugErrorInfoEnum; -#endif /* __ICorDebugErrorInfoEnum_FWD_DEFINED__ */ +#endif /* __ICorDebugErrorInfoEnum_FWD_DEFINED__ */ #ifndef __ICorDebugAppDomainEnum_FWD_DEFINED__ #define __ICorDebugAppDomainEnum_FWD_DEFINED__ typedef interface ICorDebugAppDomainEnum ICorDebugAppDomainEnum; -#endif /* __ICorDebugAppDomainEnum_FWD_DEFINED__ */ +#endif /* __ICorDebugAppDomainEnum_FWD_DEFINED__ */ #ifndef __ICorDebugAssemblyEnum_FWD_DEFINED__ #define __ICorDebugAssemblyEnum_FWD_DEFINED__ typedef interface ICorDebugAssemblyEnum ICorDebugAssemblyEnum; -#endif /* __ICorDebugAssemblyEnum_FWD_DEFINED__ */ +#endif /* __ICorDebugAssemblyEnum_FWD_DEFINED__ */ #ifndef __ICorDebugBlockingObjectEnum_FWD_DEFINED__ #define __ICorDebugBlockingObjectEnum_FWD_DEFINED__ typedef interface ICorDebugBlockingObjectEnum ICorDebugBlockingObjectEnum; -#endif /* __ICorDebugBlockingObjectEnum_FWD_DEFINED__ */ +#endif /* __ICorDebugBlockingObjectEnum_FWD_DEFINED__ */ #ifndef __ICorDebugMDA_FWD_DEFINED__ #define __ICorDebugMDA_FWD_DEFINED__ typedef interface ICorDebugMDA ICorDebugMDA; -#endif /* __ICorDebugMDA_FWD_DEFINED__ */ +#endif /* __ICorDebugMDA_FWD_DEFINED__ */ #ifndef __ICorDebugEditAndContinueErrorInfo_FWD_DEFINED__ #define __ICorDebugEditAndContinueErrorInfo_FWD_DEFINED__ typedef interface ICorDebugEditAndContinueErrorInfo ICorDebugEditAndContinueErrorInfo; -#endif /* __ICorDebugEditAndContinueErrorInfo_FWD_DEFINED__ */ +#endif /* __ICorDebugEditAndContinueErrorInfo_FWD_DEFINED__ */ #ifndef __ICorDebugEditAndContinueSnapshot_FWD_DEFINED__ #define __ICorDebugEditAndContinueSnapshot_FWD_DEFINED__ typedef interface ICorDebugEditAndContinueSnapshot ICorDebugEditAndContinueSnapshot; -#endif /* __ICorDebugEditAndContinueSnapshot_FWD_DEFINED__ */ +#endif /* __ICorDebugEditAndContinueSnapshot_FWD_DEFINED__ */ #ifndef __ICorDebugExceptionObjectCallStackEnum_FWD_DEFINED__ #define __ICorDebugExceptionObjectCallStackEnum_FWD_DEFINED__ typedef interface ICorDebugExceptionObjectCallStackEnum ICorDebugExceptionObjectCallStackEnum; -#endif /* __ICorDebugExceptionObjectCallStackEnum_FWD_DEFINED__ */ +#endif /* __ICorDebugExceptionObjectCallStackEnum_FWD_DEFINED__ */ #ifndef __ICorDebugExceptionObjectValue_FWD_DEFINED__ #define __ICorDebugExceptionObjectValue_FWD_DEFINED__ typedef interface ICorDebugExceptionObjectValue ICorDebugExceptionObjectValue; -#endif /* __ICorDebugExceptionObjectValue_FWD_DEFINED__ */ +#endif /* __ICorDebugExceptionObjectValue_FWD_DEFINED__ */ #ifndef __CorDebug_FWD_DEFINED__ @@ -964,7 +964,7 @@ typedef class CorDebug CorDebug; typedef struct CorDebug CorDebug; #endif /* __cplusplus */ -#endif /* __CorDebug_FWD_DEFINED__ */ +#endif /* __CorDebug_FWD_DEFINED__ */ #ifndef __EmbeddedCLRCorDebug_FWD_DEFINED__ @@ -976,238 +976,238 @@ typedef class EmbeddedCLRCorDebug EmbeddedCLRCorDebug; typedef struct EmbeddedCLRCorDebug EmbeddedCLRCorDebug; #endif /* __cplusplus */ -#endif /* __EmbeddedCLRCorDebug_FWD_DEFINED__ */ +#endif /* __EmbeddedCLRCorDebug_FWD_DEFINED__ */ #ifndef __ICorDebugValue_FWD_DEFINED__ #define __ICorDebugValue_FWD_DEFINED__ typedef interface ICorDebugValue ICorDebugValue; -#endif /* __ICorDebugValue_FWD_DEFINED__ */ +#endif /* __ICorDebugValue_FWD_DEFINED__ */ #ifndef __ICorDebugReferenceValue_FWD_DEFINED__ #define __ICorDebugReferenceValue_FWD_DEFINED__ typedef interface ICorDebugReferenceValue ICorDebugReferenceValue; -#endif /* __ICorDebugReferenceValue_FWD_DEFINED__ */ +#endif /* __ICorDebugReferenceValue_FWD_DEFINED__ */ #ifndef __ICorDebugHeapValue_FWD_DEFINED__ #define __ICorDebugHeapValue_FWD_DEFINED__ typedef interface ICorDebugHeapValue ICorDebugHeapValue; -#endif /* __ICorDebugHeapValue_FWD_DEFINED__ */ +#endif /* __ICorDebugHeapValue_FWD_DEFINED__ */ #ifndef __ICorDebugStringValue_FWD_DEFINED__ #define __ICorDebugStringValue_FWD_DEFINED__ typedef interface ICorDebugStringValue ICorDebugStringValue; -#endif /* __ICorDebugStringValue_FWD_DEFINED__ */ +#endif /* __ICorDebugStringValue_FWD_DEFINED__ */ #ifndef __ICorDebugGenericValue_FWD_DEFINED__ #define __ICorDebugGenericValue_FWD_DEFINED__ typedef interface ICorDebugGenericValue ICorDebugGenericValue; -#endif /* __ICorDebugGenericValue_FWD_DEFINED__ */ +#endif /* __ICorDebugGenericValue_FWD_DEFINED__ */ #ifndef __ICorDebugBoxValue_FWD_DEFINED__ #define __ICorDebugBoxValue_FWD_DEFINED__ typedef interface ICorDebugBoxValue ICorDebugBoxValue; -#endif /* __ICorDebugBoxValue_FWD_DEFINED__ */ +#endif /* __ICorDebugBoxValue_FWD_DEFINED__ */ #ifndef __ICorDebugArrayValue_FWD_DEFINED__ #define __ICorDebugArrayValue_FWD_DEFINED__ typedef interface ICorDebugArrayValue ICorDebugArrayValue; -#endif /* __ICorDebugArrayValue_FWD_DEFINED__ */ +#endif /* __ICorDebugArrayValue_FWD_DEFINED__ */ #ifndef __ICorDebugFrame_FWD_DEFINED__ #define __ICorDebugFrame_FWD_DEFINED__ typedef interface ICorDebugFrame ICorDebugFrame; -#endif /* __ICorDebugFrame_FWD_DEFINED__ */ +#endif /* __ICorDebugFrame_FWD_DEFINED__ */ #ifndef __ICorDebugILFrame_FWD_DEFINED__ #define __ICorDebugILFrame_FWD_DEFINED__ typedef interface ICorDebugILFrame ICorDebugILFrame; -#endif /* __ICorDebugILFrame_FWD_DEFINED__ */ +#endif /* __ICorDebugILFrame_FWD_DEFINED__ */ #ifndef __ICorDebugInternalFrame_FWD_DEFINED__ #define __ICorDebugInternalFrame_FWD_DEFINED__ typedef interface ICorDebugInternalFrame ICorDebugInternalFrame; -#endif /* __ICorDebugInternalFrame_FWD_DEFINED__ */ +#endif /* __ICorDebugInternalFrame_FWD_DEFINED__ */ #ifndef __ICorDebugInternalFrame2_FWD_DEFINED__ #define __ICorDebugInternalFrame2_FWD_DEFINED__ typedef interface ICorDebugInternalFrame2 ICorDebugInternalFrame2; -#endif /* __ICorDebugInternalFrame2_FWD_DEFINED__ */ +#endif /* __ICorDebugInternalFrame2_FWD_DEFINED__ */ #ifndef __ICorDebugNativeFrame_FWD_DEFINED__ #define __ICorDebugNativeFrame_FWD_DEFINED__ typedef interface ICorDebugNativeFrame ICorDebugNativeFrame; -#endif /* __ICorDebugNativeFrame_FWD_DEFINED__ */ +#endif /* __ICorDebugNativeFrame_FWD_DEFINED__ */ #ifndef __ICorDebugNativeFrame2_FWD_DEFINED__ #define __ICorDebugNativeFrame2_FWD_DEFINED__ typedef interface ICorDebugNativeFrame2 ICorDebugNativeFrame2; -#endif /* __ICorDebugNativeFrame2_FWD_DEFINED__ */ +#endif /* __ICorDebugNativeFrame2_FWD_DEFINED__ */ #ifndef __ICorDebugRuntimeUnwindableFrame_FWD_DEFINED__ #define __ICorDebugRuntimeUnwindableFrame_FWD_DEFINED__ typedef interface ICorDebugRuntimeUnwindableFrame ICorDebugRuntimeUnwindableFrame; -#endif /* __ICorDebugRuntimeUnwindableFrame_FWD_DEFINED__ */ +#endif /* __ICorDebugRuntimeUnwindableFrame_FWD_DEFINED__ */ #ifndef __ICorDebugManagedCallback2_FWD_DEFINED__ #define __ICorDebugManagedCallback2_FWD_DEFINED__ typedef interface ICorDebugManagedCallback2 ICorDebugManagedCallback2; -#endif /* __ICorDebugManagedCallback2_FWD_DEFINED__ */ +#endif /* __ICorDebugManagedCallback2_FWD_DEFINED__ */ #ifndef __ICorDebugAppDomain2_FWD_DEFINED__ #define __ICorDebugAppDomain2_FWD_DEFINED__ typedef interface ICorDebugAppDomain2 ICorDebugAppDomain2; -#endif /* __ICorDebugAppDomain2_FWD_DEFINED__ */ +#endif /* __ICorDebugAppDomain2_FWD_DEFINED__ */ #ifndef __ICorDebugAppDomain3_FWD_DEFINED__ #define __ICorDebugAppDomain3_FWD_DEFINED__ typedef interface ICorDebugAppDomain3 ICorDebugAppDomain3; -#endif /* __ICorDebugAppDomain3_FWD_DEFINED__ */ +#endif /* __ICorDebugAppDomain3_FWD_DEFINED__ */ #ifndef __ICorDebugAssembly2_FWD_DEFINED__ #define __ICorDebugAssembly2_FWD_DEFINED__ typedef interface ICorDebugAssembly2 ICorDebugAssembly2; -#endif /* __ICorDebugAssembly2_FWD_DEFINED__ */ +#endif /* __ICorDebugAssembly2_FWD_DEFINED__ */ #ifndef __ICorDebugProcess2_FWD_DEFINED__ #define __ICorDebugProcess2_FWD_DEFINED__ typedef interface ICorDebugProcess2 ICorDebugProcess2; -#endif /* __ICorDebugProcess2_FWD_DEFINED__ */ +#endif /* __ICorDebugProcess2_FWD_DEFINED__ */ #ifndef __ICorDebugStepper2_FWD_DEFINED__ #define __ICorDebugStepper2_FWD_DEFINED__ typedef interface ICorDebugStepper2 ICorDebugStepper2; -#endif /* __ICorDebugStepper2_FWD_DEFINED__ */ +#endif /* __ICorDebugStepper2_FWD_DEFINED__ */ #ifndef __ICorDebugThread2_FWD_DEFINED__ #define __ICorDebugThread2_FWD_DEFINED__ typedef interface ICorDebugThread2 ICorDebugThread2; -#endif /* __ICorDebugThread2_FWD_DEFINED__ */ +#endif /* __ICorDebugThread2_FWD_DEFINED__ */ #ifndef __ICorDebugThread3_FWD_DEFINED__ #define __ICorDebugThread3_FWD_DEFINED__ typedef interface ICorDebugThread3 ICorDebugThread3; -#endif /* __ICorDebugThread3_FWD_DEFINED__ */ +#endif /* __ICorDebugThread3_FWD_DEFINED__ */ #ifndef __ICorDebugILFrame2_FWD_DEFINED__ #define __ICorDebugILFrame2_FWD_DEFINED__ typedef interface ICorDebugILFrame2 ICorDebugILFrame2; -#endif /* __ICorDebugILFrame2_FWD_DEFINED__ */ +#endif /* __ICorDebugILFrame2_FWD_DEFINED__ */ #ifndef __ICorDebugModule2_FWD_DEFINED__ #define __ICorDebugModule2_FWD_DEFINED__ typedef interface ICorDebugModule2 ICorDebugModule2; -#endif /* __ICorDebugModule2_FWD_DEFINED__ */ +#endif /* __ICorDebugModule2_FWD_DEFINED__ */ #ifndef __ICorDebugFunction2_FWD_DEFINED__ #define __ICorDebugFunction2_FWD_DEFINED__ typedef interface ICorDebugFunction2 ICorDebugFunction2; -#endif /* __ICorDebugFunction2_FWD_DEFINED__ */ +#endif /* __ICorDebugFunction2_FWD_DEFINED__ */ #ifndef __ICorDebugClass2_FWD_DEFINED__ #define __ICorDebugClass2_FWD_DEFINED__ typedef interface ICorDebugClass2 ICorDebugClass2; -#endif /* __ICorDebugClass2_FWD_DEFINED__ */ +#endif /* __ICorDebugClass2_FWD_DEFINED__ */ #ifndef __ICorDebugEval2_FWD_DEFINED__ #define __ICorDebugEval2_FWD_DEFINED__ typedef interface ICorDebugEval2 ICorDebugEval2; -#endif /* __ICorDebugEval2_FWD_DEFINED__ */ +#endif /* __ICorDebugEval2_FWD_DEFINED__ */ #ifndef __ICorDebugValue2_FWD_DEFINED__ #define __ICorDebugValue2_FWD_DEFINED__ typedef interface ICorDebugValue2 ICorDebugValue2; -#endif /* __ICorDebugValue2_FWD_DEFINED__ */ +#endif /* __ICorDebugValue2_FWD_DEFINED__ */ #ifndef __ICorDebugObjectValue2_FWD_DEFINED__ #define __ICorDebugObjectValue2_FWD_DEFINED__ typedef interface ICorDebugObjectValue2 ICorDebugObjectValue2; -#endif /* __ICorDebugObjectValue2_FWD_DEFINED__ */ +#endif /* __ICorDebugObjectValue2_FWD_DEFINED__ */ #ifndef __ICorDebugHandleValue_FWD_DEFINED__ #define __ICorDebugHandleValue_FWD_DEFINED__ typedef interface ICorDebugHandleValue ICorDebugHandleValue; -#endif /* __ICorDebugHandleValue_FWD_DEFINED__ */ +#endif /* __ICorDebugHandleValue_FWD_DEFINED__ */ #ifndef __ICorDebugHeapValue2_FWD_DEFINED__ #define __ICorDebugHeapValue2_FWD_DEFINED__ typedef interface ICorDebugHeapValue2 ICorDebugHeapValue2; -#endif /* __ICorDebugHeapValue2_FWD_DEFINED__ */ +#endif /* __ICorDebugHeapValue2_FWD_DEFINED__ */ #ifndef __ICorDebugComObjectValue_FWD_DEFINED__ #define __ICorDebugComObjectValue_FWD_DEFINED__ typedef interface ICorDebugComObjectValue ICorDebugComObjectValue; -#endif /* __ICorDebugComObjectValue_FWD_DEFINED__ */ +#endif /* __ICorDebugComObjectValue_FWD_DEFINED__ */ #ifndef __ICorDebugModule3_FWD_DEFINED__ #define __ICorDebugModule3_FWD_DEFINED__ typedef interface ICorDebugModule3 ICorDebugModule3; -#endif /* __ICorDebugModule3_FWD_DEFINED__ */ +#endif /* __ICorDebugModule3_FWD_DEFINED__ */ /* header files for imported files */ @@ -1216,11 +1216,11 @@ typedef interface ICorDebugModule3 ICorDebugModule3; #ifdef __cplusplus extern "C"{ -#endif +#endif /* interface __MIDL_itf_cordebug_0000_0000 */ -/* [local] */ +/* [local] */ #if 0 typedef UINT32 mdToken; @@ -1269,50 +1269,50 @@ typedef struct _COR_IL_MAP ULONG32 oldOffset; ULONG32 newOffset; BOOL fAccurate; - } COR_IL_MAP; + } COR_IL_MAP; #endif //_COR_IL_MAP #ifndef _COR_DEBUG_IL_TO_NATIVE_MAP_ #define _COR_DEBUG_IL_TO_NATIVE_MAP_ -typedef +typedef enum CorDebugIlToNativeMappingTypes { - NO_MAPPING = -1, - PROLOG = -2, - EPILOG = -3 - } CorDebugIlToNativeMappingTypes; + NO_MAPPING = -1, + PROLOG = -2, + EPILOG = -3 + } CorDebugIlToNativeMappingTypes; typedef struct COR_DEBUG_IL_TO_NATIVE_MAP { ULONG32 ilOffset; ULONG32 nativeStartOffset; ULONG32 nativeEndOffset; - } COR_DEBUG_IL_TO_NATIVE_MAP; + } COR_DEBUG_IL_TO_NATIVE_MAP; #endif // _COR_DEBUG_IL_TO_NATIVE_MAP_ #define REMOTE_DEBUGGING_DLL_ENTRY L"Software\\Microsoft\\.NETFramework\\Debugger\\ActivateRemoteDebugging" -typedef +typedef enum CorDebugJITCompilerFlags { - CORDEBUG_JIT_DEFAULT = 0x1, - CORDEBUG_JIT_DISABLE_OPTIMIZATION = 0x3, - CORDEBUG_JIT_ENABLE_ENC = 0x7 - } CorDebugJITCompilerFlags; + CORDEBUG_JIT_DEFAULT = 0x1, + CORDEBUG_JIT_DISABLE_OPTIMIZATION = 0x3, + CORDEBUG_JIT_ENABLE_ENC = 0x7 + } CorDebugJITCompilerFlags; -typedef +typedef enum CorDebugJITCompilerFlagsDecprecated { - CORDEBUG_JIT_TRACK_DEBUG_INFO = 0x1 - } CorDebugJITCompilerFlagsDeprecated; + CORDEBUG_JIT_TRACK_DEBUG_INFO = 0x1 + } CorDebugJITCompilerFlagsDeprecated; -typedef +typedef enum CorDebugNGENPolicy { - DISABLE_LOCAL_NIC = 1 - } CorDebugNGENPolicy; + DISABLE_LOCAL_NIC = 1 + } CorDebugNGENPolicy; #pragma warning(push) -#pragma warning(disable:28718) +#pragma warning(disable:28718) @@ -1385,20 +1385,20 @@ typedef ULONG64 CORDB_REGISTER; typedef DWORD CORDB_CONTINUE_STATUS; -typedef +typedef enum CorDebugBlockingReason { - BLOCKING_NONE = 0, - BLOCKING_MONITOR_CRITICAL_SECTION = 0x1, - BLOCKING_MONITOR_EVENT = 0x2 - } CorDebugBlockingReason; + BLOCKING_NONE = 0, + BLOCKING_MONITOR_CRITICAL_SECTION = 0x1, + BLOCKING_MONITOR_EVENT = 0x2 + } CorDebugBlockingReason; typedef struct CorDebugBlockingObject { ICorDebugValue *pBlockingObject; DWORD dwTimeout; CorDebugBlockingReason blockingReason; - } CorDebugBlockingObject; + } CorDebugBlockingObject; typedef struct CorDebugExceptionObjectStackFrame { @@ -1406,13 +1406,13 @@ typedef struct CorDebugExceptionObjectStackFrame CORDB_ADDRESS ip; mdMethodDef methodDef; BOOL isLastForeignExceptionFrame; - } CorDebugExceptionObjectStackFrame; + } CorDebugExceptionObjectStackFrame; typedef struct CorDebugGuidToTypeMapping { GUID iid; ICorDebugType *pType; - } CorDebugGuidToTypeMapping; + } CorDebugGuidToTypeMapping; @@ -1423,88 +1423,88 @@ extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0000_v0_0_s_ifspec; #define __ICorDebugDataTarget_INTERFACE_DEFINED__ /* interface ICorDebugDataTarget */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ -typedef +typedef enum CorDebugPlatform { - CORDB_PLATFORM_WINDOWS_X86 = 0, - CORDB_PLATFORM_WINDOWS_AMD64 = ( CORDB_PLATFORM_WINDOWS_X86 + 1 ) , - CORDB_PLATFORM_WINDOWS_IA64 = ( CORDB_PLATFORM_WINDOWS_AMD64 + 1 ) , - CORDB_PLATFORM_MAC_PPC = ( CORDB_PLATFORM_WINDOWS_IA64 + 1 ) , - CORDB_PLATFORM_MAC_X86 = ( CORDB_PLATFORM_MAC_PPC + 1 ) , - CORDB_PLATFORM_WINDOWS_ARM = ( CORDB_PLATFORM_MAC_X86 + 1 ) , - CORDB_PLATFORM_MAC_AMD64 = ( CORDB_PLATFORM_WINDOWS_ARM + 1 ) , - CORDB_PLATFORM_WINDOWS_ARM64 = ( CORDB_PLATFORM_MAC_AMD64 + 1 ) , - CORDB_PLATFORM_POSIX_AMD64 = ( CORDB_PLATFORM_WINDOWS_ARM64 + 1 ) , - CORDB_PLATFORM_POSIX_X86 = ( CORDB_PLATFORM_POSIX_AMD64 + 1 ) , - CORDB_PLATFORM_POSIX_ARM = ( CORDB_PLATFORM_POSIX_X86 + 1 ) , - CORDB_PLATFORM_POSIX_ARM64 = ( CORDB_PLATFORM_POSIX_ARM + 1 ) - } CorDebugPlatform; + CORDB_PLATFORM_WINDOWS_X86 = 0, + CORDB_PLATFORM_WINDOWS_AMD64 = ( CORDB_PLATFORM_WINDOWS_X86 + 1 ) , + CORDB_PLATFORM_WINDOWS_IA64 = ( CORDB_PLATFORM_WINDOWS_AMD64 + 1 ) , + CORDB_PLATFORM_MAC_PPC = ( CORDB_PLATFORM_WINDOWS_IA64 + 1 ) , + CORDB_PLATFORM_MAC_X86 = ( CORDB_PLATFORM_MAC_PPC + 1 ) , + CORDB_PLATFORM_WINDOWS_ARM = ( CORDB_PLATFORM_MAC_X86 + 1 ) , + CORDB_PLATFORM_MAC_AMD64 = ( CORDB_PLATFORM_WINDOWS_ARM + 1 ) , + CORDB_PLATFORM_WINDOWS_ARM64 = ( CORDB_PLATFORM_MAC_AMD64 + 1 ) , + CORDB_PLATFORM_POSIX_AMD64 = ( CORDB_PLATFORM_WINDOWS_ARM64 + 1 ) , + CORDB_PLATFORM_POSIX_X86 = ( CORDB_PLATFORM_POSIX_AMD64 + 1 ) , + CORDB_PLATFORM_POSIX_ARM = ( CORDB_PLATFORM_POSIX_X86 + 1 ) , + CORDB_PLATFORM_POSIX_ARM64 = ( CORDB_PLATFORM_POSIX_ARM + 1 ) + } CorDebugPlatform; EXTERN_C const IID IID_ICorDebugDataTarget; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("FE06DC28-49FB-4636-A4A3-E80DB4AE116C") ICorDebugDataTarget : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetPlatform( + virtual HRESULT STDMETHODCALLTYPE GetPlatform( /* [out] */ CorDebugPlatform *pTargetPlatform) = 0; - - virtual HRESULT STDMETHODCALLTYPE ReadVirtual( + + virtual HRESULT STDMETHODCALLTYPE ReadVirtual( /* [in] */ CORDB_ADDRESS address, /* [length_is][size_is][out] */ BYTE *pBuffer, /* [in] */ ULONG32 bytesRequested, /* [out] */ ULONG32 *pBytesRead) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetThreadContext( + + virtual HRESULT STDMETHODCALLTYPE GetThreadContext( /* [in] */ DWORD dwThreadID, /* [in] */ ULONG32 contextFlags, /* [in] */ ULONG32 contextSize, /* [size_is][out] */ BYTE *pContext) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugDataTargetVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugDataTarget * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugDataTarget * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugDataTarget * This); - - HRESULT ( STDMETHODCALLTYPE *GetPlatform )( + + HRESULT ( STDMETHODCALLTYPE *GetPlatform )( ICorDebugDataTarget * This, /* [out] */ CorDebugPlatform *pTargetPlatform); - - HRESULT ( STDMETHODCALLTYPE *ReadVirtual )( + + HRESULT ( STDMETHODCALLTYPE *ReadVirtual )( ICorDebugDataTarget * This, /* [in] */ CORDB_ADDRESS address, /* [length_is][size_is][out] */ BYTE *pBuffer, /* [in] */ ULONG32 bytesRequested, /* [out] */ ULONG32 *pBytesRead); - - HRESULT ( STDMETHODCALLTYPE *GetThreadContext )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadContext )( ICorDebugDataTarget * This, /* [in] */ DWORD dwThreadID, /* [in] */ ULONG32 contextFlags, /* [in] */ ULONG32 contextSize, /* [size_is][out] */ BYTE *pContext); - + END_INTERFACE } ICorDebugDataTargetVtbl; @@ -1513,102 +1513,102 @@ EXTERN_C const IID IID_ICorDebugDataTarget; CONST_VTBL struct ICorDebugDataTargetVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugDataTarget_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugDataTarget_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugDataTarget_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugDataTarget_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugDataTarget_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugDataTarget_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugDataTarget_GetPlatform(This,pTargetPlatform) \ - ( (This)->lpVtbl -> GetPlatform(This,pTargetPlatform) ) +#define ICorDebugDataTarget_GetPlatform(This,pTargetPlatform) \ + ( (This)->lpVtbl -> GetPlatform(This,pTargetPlatform) ) -#define ICorDebugDataTarget_ReadVirtual(This,address,pBuffer,bytesRequested,pBytesRead) \ - ( (This)->lpVtbl -> ReadVirtual(This,address,pBuffer,bytesRequested,pBytesRead) ) +#define ICorDebugDataTarget_ReadVirtual(This,address,pBuffer,bytesRequested,pBytesRead) \ + ( (This)->lpVtbl -> ReadVirtual(This,address,pBuffer,bytesRequested,pBytesRead) ) -#define ICorDebugDataTarget_GetThreadContext(This,dwThreadID,contextFlags,contextSize,pContext) \ - ( (This)->lpVtbl -> GetThreadContext(This,dwThreadID,contextFlags,contextSize,pContext) ) +#define ICorDebugDataTarget_GetThreadContext(This,dwThreadID,contextFlags,contextSize,pContext) \ + ( (This)->lpVtbl -> GetThreadContext(This,dwThreadID,contextFlags,contextSize,pContext) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugDataTarget_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugDataTarget_INTERFACE_DEFINED__ */ #ifndef __ICorDebugStaticFieldSymbol_INTERFACE_DEFINED__ #define __ICorDebugStaticFieldSymbol_INTERFACE_DEFINED__ /* interface ICorDebugStaticFieldSymbol */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugStaticFieldSymbol; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("CBF9DA63-F68D-4BBB-A21C-15A45EAADF5B") ICorDebugStaticFieldSymbol : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetName( + virtual HRESULT STDMETHODCALLTYPE GetName( /* [in] */ ULONG32 cchName, /* [out] */ ULONG32 *pcchName, /* [length_is][size_is][out] */ WCHAR szName[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetSize( + + virtual HRESULT STDMETHODCALLTYPE GetSize( /* [out] */ ULONG32 *pcbSize) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetAddress( + + virtual HRESULT STDMETHODCALLTYPE GetAddress( /* [out] */ CORDB_ADDRESS *pRVA) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugStaticFieldSymbolVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugStaticFieldSymbol * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugStaticFieldSymbol * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugStaticFieldSymbol * This); - - HRESULT ( STDMETHODCALLTYPE *GetName )( + + HRESULT ( STDMETHODCALLTYPE *GetName )( ICorDebugStaticFieldSymbol * This, /* [in] */ ULONG32 cchName, /* [out] */ ULONG32 *pcchName, /* [length_is][size_is][out] */ WCHAR szName[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetSize )( + + HRESULT ( STDMETHODCALLTYPE *GetSize )( ICorDebugStaticFieldSymbol * This, /* [out] */ ULONG32 *pcbSize); - - HRESULT ( STDMETHODCALLTYPE *GetAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetAddress )( ICorDebugStaticFieldSymbol * This, /* [out] */ CORDB_ADDRESS *pRVA); - + END_INTERFACE } ICorDebugStaticFieldSymbolVtbl; @@ -1617,102 +1617,102 @@ EXTERN_C const IID IID_ICorDebugStaticFieldSymbol; CONST_VTBL struct ICorDebugStaticFieldSymbolVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugStaticFieldSymbol_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugStaticFieldSymbol_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugStaticFieldSymbol_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugStaticFieldSymbol_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugStaticFieldSymbol_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugStaticFieldSymbol_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugStaticFieldSymbol_GetName(This,cchName,pcchName,szName) \ - ( (This)->lpVtbl -> GetName(This,cchName,pcchName,szName) ) +#define ICorDebugStaticFieldSymbol_GetName(This,cchName,pcchName,szName) \ + ( (This)->lpVtbl -> GetName(This,cchName,pcchName,szName) ) -#define ICorDebugStaticFieldSymbol_GetSize(This,pcbSize) \ - ( (This)->lpVtbl -> GetSize(This,pcbSize) ) +#define ICorDebugStaticFieldSymbol_GetSize(This,pcbSize) \ + ( (This)->lpVtbl -> GetSize(This,pcbSize) ) -#define ICorDebugStaticFieldSymbol_GetAddress(This,pRVA) \ - ( (This)->lpVtbl -> GetAddress(This,pRVA) ) +#define ICorDebugStaticFieldSymbol_GetAddress(This,pRVA) \ + ( (This)->lpVtbl -> GetAddress(This,pRVA) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugStaticFieldSymbol_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugStaticFieldSymbol_INTERFACE_DEFINED__ */ #ifndef __ICorDebugInstanceFieldSymbol_INTERFACE_DEFINED__ #define __ICorDebugInstanceFieldSymbol_INTERFACE_DEFINED__ /* interface ICorDebugInstanceFieldSymbol */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugInstanceFieldSymbol; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("A074096B-3ADC-4485-81DA-68C7A4EA52DB") ICorDebugInstanceFieldSymbol : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetName( + virtual HRESULT STDMETHODCALLTYPE GetName( /* [in] */ ULONG32 cchName, /* [out] */ ULONG32 *pcchName, /* [length_is][size_is][out] */ WCHAR szName[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetSize( + + virtual HRESULT STDMETHODCALLTYPE GetSize( /* [out] */ ULONG32 *pcbSize) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetOffset( + + virtual HRESULT STDMETHODCALLTYPE GetOffset( /* [out] */ ULONG32 *pcbOffset) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugInstanceFieldSymbolVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugInstanceFieldSymbol * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugInstanceFieldSymbol * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugInstanceFieldSymbol * This); - - HRESULT ( STDMETHODCALLTYPE *GetName )( + + HRESULT ( STDMETHODCALLTYPE *GetName )( ICorDebugInstanceFieldSymbol * This, /* [in] */ ULONG32 cchName, /* [out] */ ULONG32 *pcchName, /* [length_is][size_is][out] */ WCHAR szName[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetSize )( + + HRESULT ( STDMETHODCALLTYPE *GetSize )( ICorDebugInstanceFieldSymbol * This, /* [out] */ ULONG32 *pcbSize); - - HRESULT ( STDMETHODCALLTYPE *GetOffset )( + + HRESULT ( STDMETHODCALLTYPE *GetOffset )( ICorDebugInstanceFieldSymbol * This, /* [out] */ ULONG32 *pcbOffset); - + END_INTERFACE } ICorDebugInstanceFieldSymbolVtbl; @@ -1721,115 +1721,115 @@ EXTERN_C const IID IID_ICorDebugInstanceFieldSymbol; CONST_VTBL struct ICorDebugInstanceFieldSymbolVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugInstanceFieldSymbol_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugInstanceFieldSymbol_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugInstanceFieldSymbol_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugInstanceFieldSymbol_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugInstanceFieldSymbol_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugInstanceFieldSymbol_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugInstanceFieldSymbol_GetName(This,cchName,pcchName,szName) \ - ( (This)->lpVtbl -> GetName(This,cchName,pcchName,szName) ) +#define ICorDebugInstanceFieldSymbol_GetName(This,cchName,pcchName,szName) \ + ( (This)->lpVtbl -> GetName(This,cchName,pcchName,szName) ) -#define ICorDebugInstanceFieldSymbol_GetSize(This,pcbSize) \ - ( (This)->lpVtbl -> GetSize(This,pcbSize) ) +#define ICorDebugInstanceFieldSymbol_GetSize(This,pcbSize) \ + ( (This)->lpVtbl -> GetSize(This,pcbSize) ) -#define ICorDebugInstanceFieldSymbol_GetOffset(This,pcbOffset) \ - ( (This)->lpVtbl -> GetOffset(This,pcbOffset) ) +#define ICorDebugInstanceFieldSymbol_GetOffset(This,pcbOffset) \ + ( (This)->lpVtbl -> GetOffset(This,pcbOffset) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugInstanceFieldSymbol_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugInstanceFieldSymbol_INTERFACE_DEFINED__ */ #ifndef __ICorDebugVariableSymbol_INTERFACE_DEFINED__ #define __ICorDebugVariableSymbol_INTERFACE_DEFINED__ /* interface ICorDebugVariableSymbol */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugVariableSymbol; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("707E8932-1163-48D9-8A93-F5B1F480FBB7") ICorDebugVariableSymbol : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetName( + virtual HRESULT STDMETHODCALLTYPE GetName( /* [in] */ ULONG32 cchName, /* [out] */ ULONG32 *pcchName, /* [length_is][size_is][out] */ WCHAR szName[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetSize( + + virtual HRESULT STDMETHODCALLTYPE GetSize( /* [out] */ ULONG32 *pcbValue) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetValue( + + virtual HRESULT STDMETHODCALLTYPE GetValue( /* [in] */ ULONG32 offset, /* [in] */ ULONG32 cbContext, /* [size_is][in] */ BYTE context[ ], /* [in] */ ULONG32 cbValue, /* [out] */ ULONG32 *pcbValue, /* [length_is][size_is][out] */ BYTE pValue[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetValue( + + virtual HRESULT STDMETHODCALLTYPE SetValue( /* [in] */ ULONG32 offset, /* [in] */ DWORD threadID, /* [in] */ ULONG32 cbContext, /* [size_is][in] */ BYTE context[ ], /* [in] */ ULONG32 cbValue, /* [size_is][in] */ BYTE pValue[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetSlotIndex( + + virtual HRESULT STDMETHODCALLTYPE GetSlotIndex( /* [out] */ ULONG32 *pSlotIndex) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugVariableSymbolVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugVariableSymbol * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugVariableSymbol * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugVariableSymbol * This); - - HRESULT ( STDMETHODCALLTYPE *GetName )( + + HRESULT ( STDMETHODCALLTYPE *GetName )( ICorDebugVariableSymbol * This, /* [in] */ ULONG32 cchName, /* [out] */ ULONG32 *pcchName, /* [length_is][size_is][out] */ WCHAR szName[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetSize )( + + HRESULT ( STDMETHODCALLTYPE *GetSize )( ICorDebugVariableSymbol * This, /* [out] */ ULONG32 *pcbValue); - - HRESULT ( STDMETHODCALLTYPE *GetValue )( + + HRESULT ( STDMETHODCALLTYPE *GetValue )( ICorDebugVariableSymbol * This, /* [in] */ ULONG32 offset, /* [in] */ ULONG32 cbContext, @@ -1837,8 +1837,8 @@ EXTERN_C const IID IID_ICorDebugVariableSymbol; /* [in] */ ULONG32 cbValue, /* [out] */ ULONG32 *pcbValue, /* [length_is][size_is][out] */ BYTE pValue[ ]); - - HRESULT ( STDMETHODCALLTYPE *SetValue )( + + HRESULT ( STDMETHODCALLTYPE *SetValue )( ICorDebugVariableSymbol * This, /* [in] */ ULONG32 offset, /* [in] */ DWORD threadID, @@ -1846,11 +1846,11 @@ EXTERN_C const IID IID_ICorDebugVariableSymbol; /* [size_is][in] */ BYTE context[ ], /* [in] */ ULONG32 cbValue, /* [size_is][in] */ BYTE pValue[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetSlotIndex )( + + HRESULT ( STDMETHODCALLTYPE *GetSlotIndex )( ICorDebugVariableSymbol * This, /* [out] */ ULONG32 *pSlotIndex); - + END_INTERFACE } ICorDebugVariableSymbolVtbl; @@ -1859,97 +1859,97 @@ EXTERN_C const IID IID_ICorDebugVariableSymbol; CONST_VTBL struct ICorDebugVariableSymbolVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugVariableSymbol_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugVariableSymbol_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugVariableSymbol_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugVariableSymbol_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugVariableSymbol_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugVariableSymbol_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugVariableSymbol_GetName(This,cchName,pcchName,szName) \ - ( (This)->lpVtbl -> GetName(This,cchName,pcchName,szName) ) +#define ICorDebugVariableSymbol_GetName(This,cchName,pcchName,szName) \ + ( (This)->lpVtbl -> GetName(This,cchName,pcchName,szName) ) -#define ICorDebugVariableSymbol_GetSize(This,pcbValue) \ - ( (This)->lpVtbl -> GetSize(This,pcbValue) ) +#define ICorDebugVariableSymbol_GetSize(This,pcbValue) \ + ( (This)->lpVtbl -> GetSize(This,pcbValue) ) -#define ICorDebugVariableSymbol_GetValue(This,offset,cbContext,context,cbValue,pcbValue,pValue) \ - ( (This)->lpVtbl -> GetValue(This,offset,cbContext,context,cbValue,pcbValue,pValue) ) +#define ICorDebugVariableSymbol_GetValue(This,offset,cbContext,context,cbValue,pcbValue,pValue) \ + ( (This)->lpVtbl -> GetValue(This,offset,cbContext,context,cbValue,pcbValue,pValue) ) -#define ICorDebugVariableSymbol_SetValue(This,offset,threadID,cbContext,context,cbValue,pValue) \ - ( (This)->lpVtbl -> SetValue(This,offset,threadID,cbContext,context,cbValue,pValue) ) +#define ICorDebugVariableSymbol_SetValue(This,offset,threadID,cbContext,context,cbValue,pValue) \ + ( (This)->lpVtbl -> SetValue(This,offset,threadID,cbContext,context,cbValue,pValue) ) -#define ICorDebugVariableSymbol_GetSlotIndex(This,pSlotIndex) \ - ( (This)->lpVtbl -> GetSlotIndex(This,pSlotIndex) ) +#define ICorDebugVariableSymbol_GetSlotIndex(This,pSlotIndex) \ + ( (This)->lpVtbl -> GetSlotIndex(This,pSlotIndex) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugVariableSymbol_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugVariableSymbol_INTERFACE_DEFINED__ */ #ifndef __ICorDebugMemoryBuffer_INTERFACE_DEFINED__ #define __ICorDebugMemoryBuffer_INTERFACE_DEFINED__ /* interface ICorDebugMemoryBuffer */ -/* [unique][local][uuid][object] */ +/* [unique][local][uuid][object] */ EXTERN_C const IID IID_ICorDebugMemoryBuffer; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("677888B3-D160-4B8C-A73B-D79E6AAA1D13") ICorDebugMemoryBuffer : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetStartAddress( + virtual HRESULT STDMETHODCALLTYPE GetStartAddress( /* [out] */ LPCVOID *address) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetSize( + + virtual HRESULT STDMETHODCALLTYPE GetSize( /* [out] */ ULONG32 *pcbBufferLength) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugMemoryBufferVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugMemoryBuffer * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugMemoryBuffer * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugMemoryBuffer * This); - - HRESULT ( STDMETHODCALLTYPE *GetStartAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetStartAddress )( ICorDebugMemoryBuffer * This, /* [out] */ LPCVOID *address); - - HRESULT ( STDMETHODCALLTYPE *GetSize )( + + HRESULT ( STDMETHODCALLTYPE *GetSize )( ICorDebugMemoryBuffer * This, /* [out] */ ULONG32 *pcbBufferLength); - + END_INTERFACE } ICorDebugMemoryBufferVtbl; @@ -1958,138 +1958,138 @@ EXTERN_C const IID IID_ICorDebugMemoryBuffer; CONST_VTBL struct ICorDebugMemoryBufferVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugMemoryBuffer_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugMemoryBuffer_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugMemoryBuffer_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugMemoryBuffer_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugMemoryBuffer_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugMemoryBuffer_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugMemoryBuffer_GetStartAddress(This,address) \ - ( (This)->lpVtbl -> GetStartAddress(This,address) ) +#define ICorDebugMemoryBuffer_GetStartAddress(This,address) \ + ( (This)->lpVtbl -> GetStartAddress(This,address) ) -#define ICorDebugMemoryBuffer_GetSize(This,pcbBufferLength) \ - ( (This)->lpVtbl -> GetSize(This,pcbBufferLength) ) +#define ICorDebugMemoryBuffer_GetSize(This,pcbBufferLength) \ + ( (This)->lpVtbl -> GetSize(This,pcbBufferLength) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugMemoryBuffer_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugMemoryBuffer_INTERFACE_DEFINED__ */ #ifndef __ICorDebugMergedAssemblyRecord_INTERFACE_DEFINED__ #define __ICorDebugMergedAssemblyRecord_INTERFACE_DEFINED__ /* interface ICorDebugMergedAssemblyRecord */ -/* [unique][local][uuid][object] */ +/* [unique][local][uuid][object] */ EXTERN_C const IID IID_ICorDebugMergedAssemblyRecord; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("FAA8637B-3BBE-4671-8E26-3B59875B922A") ICorDebugMergedAssemblyRecord : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetSimpleName( + virtual HRESULT STDMETHODCALLTYPE GetSimpleName( /* [in] */ ULONG32 cchName, /* [out] */ ULONG32 *pcchName, /* [length_is][size_is][out] */ WCHAR szName[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetVersion( + + virtual HRESULT STDMETHODCALLTYPE GetVersion( /* [out] */ USHORT *pMajor, /* [out] */ USHORT *pMinor, /* [out] */ USHORT *pBuild, /* [out] */ USHORT *pRevision) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCulture( + + virtual HRESULT STDMETHODCALLTYPE GetCulture( /* [in] */ ULONG32 cchCulture, /* [out] */ ULONG32 *pcchCulture, /* [length_is][size_is][out] */ WCHAR szCulture[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetPublicKey( + + virtual HRESULT STDMETHODCALLTYPE GetPublicKey( /* [in] */ ULONG32 cbPublicKey, /* [out] */ ULONG32 *pcbPublicKey, /* [length_is][size_is][out] */ BYTE pbPublicKey[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetPublicKeyToken( + + virtual HRESULT STDMETHODCALLTYPE GetPublicKeyToken( /* [in] */ ULONG32 cbPublicKeyToken, /* [out] */ ULONG32 *pcbPublicKeyToken, /* [length_is][size_is][out] */ BYTE pbPublicKeyToken[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetIndex( + + virtual HRESULT STDMETHODCALLTYPE GetIndex( /* [out] */ ULONG32 *pIndex) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugMergedAssemblyRecordVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugMergedAssemblyRecord * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugMergedAssemblyRecord * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugMergedAssemblyRecord * This); - - HRESULT ( STDMETHODCALLTYPE *GetSimpleName )( + + HRESULT ( STDMETHODCALLTYPE *GetSimpleName )( ICorDebugMergedAssemblyRecord * This, /* [in] */ ULONG32 cchName, /* [out] */ ULONG32 *pcchName, /* [length_is][size_is][out] */ WCHAR szName[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetVersion )( + + HRESULT ( STDMETHODCALLTYPE *GetVersion )( ICorDebugMergedAssemblyRecord * This, /* [out] */ USHORT *pMajor, /* [out] */ USHORT *pMinor, /* [out] */ USHORT *pBuild, /* [out] */ USHORT *pRevision); - - HRESULT ( STDMETHODCALLTYPE *GetCulture )( + + HRESULT ( STDMETHODCALLTYPE *GetCulture )( ICorDebugMergedAssemblyRecord * This, /* [in] */ ULONG32 cchCulture, /* [out] */ ULONG32 *pcchCulture, /* [length_is][size_is][out] */ WCHAR szCulture[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetPublicKey )( + + HRESULT ( STDMETHODCALLTYPE *GetPublicKey )( ICorDebugMergedAssemblyRecord * This, /* [in] */ ULONG32 cbPublicKey, /* [out] */ ULONG32 *pcbPublicKey, /* [length_is][size_is][out] */ BYTE pbPublicKey[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetPublicKeyToken )( + + HRESULT ( STDMETHODCALLTYPE *GetPublicKeyToken )( ICorDebugMergedAssemblyRecord * This, /* [in] */ ULONG32 cbPublicKeyToken, /* [out] */ ULONG32 *pcbPublicKeyToken, /* [length_is][size_is][out] */ BYTE pbPublicKeyToken[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetIndex )( + + HRESULT ( STDMETHODCALLTYPE *GetIndex )( ICorDebugMergedAssemblyRecord * This, /* [out] */ ULONG32 *pIndex); - + END_INTERFACE } ICorDebugMergedAssemblyRecordVtbl; @@ -2098,186 +2098,186 @@ EXTERN_C const IID IID_ICorDebugMergedAssemblyRecord; CONST_VTBL struct ICorDebugMergedAssemblyRecordVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugMergedAssemblyRecord_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugMergedAssemblyRecord_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugMergedAssemblyRecord_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugMergedAssemblyRecord_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugMergedAssemblyRecord_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugMergedAssemblyRecord_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugMergedAssemblyRecord_GetSimpleName(This,cchName,pcchName,szName) \ - ( (This)->lpVtbl -> GetSimpleName(This,cchName,pcchName,szName) ) +#define ICorDebugMergedAssemblyRecord_GetSimpleName(This,cchName,pcchName,szName) \ + ( (This)->lpVtbl -> GetSimpleName(This,cchName,pcchName,szName) ) -#define ICorDebugMergedAssemblyRecord_GetVersion(This,pMajor,pMinor,pBuild,pRevision) \ - ( (This)->lpVtbl -> GetVersion(This,pMajor,pMinor,pBuild,pRevision) ) +#define ICorDebugMergedAssemblyRecord_GetVersion(This,pMajor,pMinor,pBuild,pRevision) \ + ( (This)->lpVtbl -> GetVersion(This,pMajor,pMinor,pBuild,pRevision) ) -#define ICorDebugMergedAssemblyRecord_GetCulture(This,cchCulture,pcchCulture,szCulture) \ - ( (This)->lpVtbl -> GetCulture(This,cchCulture,pcchCulture,szCulture) ) +#define ICorDebugMergedAssemblyRecord_GetCulture(This,cchCulture,pcchCulture,szCulture) \ + ( (This)->lpVtbl -> GetCulture(This,cchCulture,pcchCulture,szCulture) ) -#define ICorDebugMergedAssemblyRecord_GetPublicKey(This,cbPublicKey,pcbPublicKey,pbPublicKey) \ - ( (This)->lpVtbl -> GetPublicKey(This,cbPublicKey,pcbPublicKey,pbPublicKey) ) +#define ICorDebugMergedAssemblyRecord_GetPublicKey(This,cbPublicKey,pcbPublicKey,pbPublicKey) \ + ( (This)->lpVtbl -> GetPublicKey(This,cbPublicKey,pcbPublicKey,pbPublicKey) ) -#define ICorDebugMergedAssemblyRecord_GetPublicKeyToken(This,cbPublicKeyToken,pcbPublicKeyToken,pbPublicKeyToken) \ - ( (This)->lpVtbl -> GetPublicKeyToken(This,cbPublicKeyToken,pcbPublicKeyToken,pbPublicKeyToken) ) +#define ICorDebugMergedAssemblyRecord_GetPublicKeyToken(This,cbPublicKeyToken,pcbPublicKeyToken,pbPublicKeyToken) \ + ( (This)->lpVtbl -> GetPublicKeyToken(This,cbPublicKeyToken,pcbPublicKeyToken,pbPublicKeyToken) ) -#define ICorDebugMergedAssemblyRecord_GetIndex(This,pIndex) \ - ( (This)->lpVtbl -> GetIndex(This,pIndex) ) +#define ICorDebugMergedAssemblyRecord_GetIndex(This,pIndex) \ + ( (This)->lpVtbl -> GetIndex(This,pIndex) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugMergedAssemblyRecord_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugMergedAssemblyRecord_INTERFACE_DEFINED__ */ #ifndef __ICorDebugSymbolProvider_INTERFACE_DEFINED__ #define __ICorDebugSymbolProvider_INTERFACE_DEFINED__ /* interface ICorDebugSymbolProvider */ -/* [unique][local][uuid][object] */ +/* [unique][local][uuid][object] */ EXTERN_C const IID IID_ICorDebugSymbolProvider; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("3948A999-FD8A-4C38-A708-8A71E9B04DBB") ICorDebugSymbolProvider : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetStaticFieldSymbols( + virtual HRESULT STDMETHODCALLTYPE GetStaticFieldSymbols( /* [in] */ ULONG32 cbSignature, /* [size_is][in] */ BYTE typeSig[ ], /* [in] */ ULONG32 cRequestedSymbols, /* [out] */ ULONG32 *pcFetchedSymbols, /* [length_is][size_is][out] */ ICorDebugStaticFieldSymbol *pSymbols[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetInstanceFieldSymbols( + + virtual HRESULT STDMETHODCALLTYPE GetInstanceFieldSymbols( /* [in] */ ULONG32 cbSignature, /* [size_is][in] */ BYTE typeSig[ ], /* [in] */ ULONG32 cRequestedSymbols, /* [out] */ ULONG32 *pcFetchedSymbols, /* [length_is][size_is][out] */ ICorDebugInstanceFieldSymbol *pSymbols[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetMethodLocalSymbols( + + virtual HRESULT STDMETHODCALLTYPE GetMethodLocalSymbols( /* [in] */ ULONG32 nativeRVA, /* [in] */ ULONG32 cRequestedSymbols, /* [out] */ ULONG32 *pcFetchedSymbols, /* [length_is][size_is][out] */ ICorDebugVariableSymbol *pSymbols[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetMethodParameterSymbols( + + virtual HRESULT STDMETHODCALLTYPE GetMethodParameterSymbols( /* [in] */ ULONG32 nativeRVA, /* [in] */ ULONG32 cRequestedSymbols, /* [out] */ ULONG32 *pcFetchedSymbols, /* [length_is][size_is][out] */ ICorDebugVariableSymbol *pSymbols[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetMergedAssemblyRecords( + + virtual HRESULT STDMETHODCALLTYPE GetMergedAssemblyRecords( /* [in] */ ULONG32 cRequestedRecords, /* [out] */ ULONG32 *pcFetchedRecords, /* [length_is][size_is][out] */ ICorDebugMergedAssemblyRecord *pRecords[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetMethodProps( + + virtual HRESULT STDMETHODCALLTYPE GetMethodProps( /* [in] */ ULONG32 codeRva, /* [out] */ mdToken *pMethodToken, /* [out] */ ULONG32 *pcGenericParams, /* [in] */ ULONG32 cbSignature, /* [out] */ ULONG32 *pcbSignature, /* [length_is][size_is][out] */ BYTE signature[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetTypeProps( + + virtual HRESULT STDMETHODCALLTYPE GetTypeProps( /* [in] */ ULONG32 vtableRva, /* [in] */ ULONG32 cbSignature, /* [out] */ ULONG32 *pcbSignature, /* [length_is][size_is][out] */ BYTE signature[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCodeRange( + + virtual HRESULT STDMETHODCALLTYPE GetCodeRange( /* [in] */ ULONG32 codeRva, /* [out] */ ULONG32 *pCodeStartAddress, ULONG32 *pCodeSize) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetAssemblyImageBytes( + + virtual HRESULT STDMETHODCALLTYPE GetAssemblyImageBytes( /* [in] */ CORDB_ADDRESS rva, /* [in] */ ULONG32 length, /* [out] */ ICorDebugMemoryBuffer **ppMemoryBuffer) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetObjectSize( + + virtual HRESULT STDMETHODCALLTYPE GetObjectSize( /* [in] */ ULONG32 cbSignature, /* [size_is][in] */ BYTE typeSig[ ], /* [out] */ ULONG32 *pObjectSize) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetAssemblyImageMetadata( + + virtual HRESULT STDMETHODCALLTYPE GetAssemblyImageMetadata( /* [out] */ ICorDebugMemoryBuffer **ppMemoryBuffer) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugSymbolProviderVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugSymbolProvider * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugSymbolProvider * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugSymbolProvider * This); - - HRESULT ( STDMETHODCALLTYPE *GetStaticFieldSymbols )( + + HRESULT ( STDMETHODCALLTYPE *GetStaticFieldSymbols )( ICorDebugSymbolProvider * This, /* [in] */ ULONG32 cbSignature, /* [size_is][in] */ BYTE typeSig[ ], /* [in] */ ULONG32 cRequestedSymbols, /* [out] */ ULONG32 *pcFetchedSymbols, /* [length_is][size_is][out] */ ICorDebugStaticFieldSymbol *pSymbols[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetInstanceFieldSymbols )( + + HRESULT ( STDMETHODCALLTYPE *GetInstanceFieldSymbols )( ICorDebugSymbolProvider * This, /* [in] */ ULONG32 cbSignature, /* [size_is][in] */ BYTE typeSig[ ], /* [in] */ ULONG32 cRequestedSymbols, /* [out] */ ULONG32 *pcFetchedSymbols, /* [length_is][size_is][out] */ ICorDebugInstanceFieldSymbol *pSymbols[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetMethodLocalSymbols )( + + HRESULT ( STDMETHODCALLTYPE *GetMethodLocalSymbols )( ICorDebugSymbolProvider * This, /* [in] */ ULONG32 nativeRVA, /* [in] */ ULONG32 cRequestedSymbols, /* [out] */ ULONG32 *pcFetchedSymbols, /* [length_is][size_is][out] */ ICorDebugVariableSymbol *pSymbols[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetMethodParameterSymbols )( + + HRESULT ( STDMETHODCALLTYPE *GetMethodParameterSymbols )( ICorDebugSymbolProvider * This, /* [in] */ ULONG32 nativeRVA, /* [in] */ ULONG32 cRequestedSymbols, /* [out] */ ULONG32 *pcFetchedSymbols, /* [length_is][size_is][out] */ ICorDebugVariableSymbol *pSymbols[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetMergedAssemblyRecords )( + + HRESULT ( STDMETHODCALLTYPE *GetMergedAssemblyRecords )( ICorDebugSymbolProvider * This, /* [in] */ ULONG32 cRequestedRecords, /* [out] */ ULONG32 *pcFetchedRecords, /* [length_is][size_is][out] */ ICorDebugMergedAssemblyRecord *pRecords[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetMethodProps )( + + HRESULT ( STDMETHODCALLTYPE *GetMethodProps )( ICorDebugSymbolProvider * This, /* [in] */ ULONG32 codeRva, /* [out] */ mdToken *pMethodToken, @@ -2285,36 +2285,36 @@ EXTERN_C const IID IID_ICorDebugSymbolProvider; /* [in] */ ULONG32 cbSignature, /* [out] */ ULONG32 *pcbSignature, /* [length_is][size_is][out] */ BYTE signature[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetTypeProps )( + + HRESULT ( STDMETHODCALLTYPE *GetTypeProps )( ICorDebugSymbolProvider * This, /* [in] */ ULONG32 vtableRva, /* [in] */ ULONG32 cbSignature, /* [out] */ ULONG32 *pcbSignature, /* [length_is][size_is][out] */ BYTE signature[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetCodeRange )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeRange )( ICorDebugSymbolProvider * This, /* [in] */ ULONG32 codeRva, /* [out] */ ULONG32 *pCodeStartAddress, ULONG32 *pCodeSize); - - HRESULT ( STDMETHODCALLTYPE *GetAssemblyImageBytes )( + + HRESULT ( STDMETHODCALLTYPE *GetAssemblyImageBytes )( ICorDebugSymbolProvider * This, /* [in] */ CORDB_ADDRESS rva, /* [in] */ ULONG32 length, /* [out] */ ICorDebugMemoryBuffer **ppMemoryBuffer); - - HRESULT ( STDMETHODCALLTYPE *GetObjectSize )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectSize )( ICorDebugSymbolProvider * This, /* [in] */ ULONG32 cbSignature, /* [size_is][in] */ BYTE typeSig[ ], /* [out] */ ULONG32 *pObjectSize); - - HRESULT ( STDMETHODCALLTYPE *GetAssemblyImageMetadata )( + + HRESULT ( STDMETHODCALLTYPE *GetAssemblyImageMetadata )( ICorDebugSymbolProvider * This, /* [out] */ ICorDebugMemoryBuffer **ppMemoryBuffer); - + END_INTERFACE } ICorDebugSymbolProviderVtbl; @@ -2323,119 +2323,119 @@ EXTERN_C const IID IID_ICorDebugSymbolProvider; CONST_VTBL struct ICorDebugSymbolProviderVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugSymbolProvider_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugSymbolProvider_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugSymbolProvider_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugSymbolProvider_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugSymbolProvider_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugSymbolProvider_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugSymbolProvider_GetStaticFieldSymbols(This,cbSignature,typeSig,cRequestedSymbols,pcFetchedSymbols,pSymbols) \ - ( (This)->lpVtbl -> GetStaticFieldSymbols(This,cbSignature,typeSig,cRequestedSymbols,pcFetchedSymbols,pSymbols) ) +#define ICorDebugSymbolProvider_GetStaticFieldSymbols(This,cbSignature,typeSig,cRequestedSymbols,pcFetchedSymbols,pSymbols) \ + ( (This)->lpVtbl -> GetStaticFieldSymbols(This,cbSignature,typeSig,cRequestedSymbols,pcFetchedSymbols,pSymbols) ) -#define ICorDebugSymbolProvider_GetInstanceFieldSymbols(This,cbSignature,typeSig,cRequestedSymbols,pcFetchedSymbols,pSymbols) \ - ( (This)->lpVtbl -> GetInstanceFieldSymbols(This,cbSignature,typeSig,cRequestedSymbols,pcFetchedSymbols,pSymbols) ) +#define ICorDebugSymbolProvider_GetInstanceFieldSymbols(This,cbSignature,typeSig,cRequestedSymbols,pcFetchedSymbols,pSymbols) \ + ( (This)->lpVtbl -> GetInstanceFieldSymbols(This,cbSignature,typeSig,cRequestedSymbols,pcFetchedSymbols,pSymbols) ) -#define ICorDebugSymbolProvider_GetMethodLocalSymbols(This,nativeRVA,cRequestedSymbols,pcFetchedSymbols,pSymbols) \ - ( (This)->lpVtbl -> GetMethodLocalSymbols(This,nativeRVA,cRequestedSymbols,pcFetchedSymbols,pSymbols) ) +#define ICorDebugSymbolProvider_GetMethodLocalSymbols(This,nativeRVA,cRequestedSymbols,pcFetchedSymbols,pSymbols) \ + ( (This)->lpVtbl -> GetMethodLocalSymbols(This,nativeRVA,cRequestedSymbols,pcFetchedSymbols,pSymbols) ) -#define ICorDebugSymbolProvider_GetMethodParameterSymbols(This,nativeRVA,cRequestedSymbols,pcFetchedSymbols,pSymbols) \ - ( (This)->lpVtbl -> GetMethodParameterSymbols(This,nativeRVA,cRequestedSymbols,pcFetchedSymbols,pSymbols) ) +#define ICorDebugSymbolProvider_GetMethodParameterSymbols(This,nativeRVA,cRequestedSymbols,pcFetchedSymbols,pSymbols) \ + ( (This)->lpVtbl -> GetMethodParameterSymbols(This,nativeRVA,cRequestedSymbols,pcFetchedSymbols,pSymbols) ) -#define ICorDebugSymbolProvider_GetMergedAssemblyRecords(This,cRequestedRecords,pcFetchedRecords,pRecords) \ - ( (This)->lpVtbl -> GetMergedAssemblyRecords(This,cRequestedRecords,pcFetchedRecords,pRecords) ) +#define ICorDebugSymbolProvider_GetMergedAssemblyRecords(This,cRequestedRecords,pcFetchedRecords,pRecords) \ + ( (This)->lpVtbl -> GetMergedAssemblyRecords(This,cRequestedRecords,pcFetchedRecords,pRecords) ) -#define ICorDebugSymbolProvider_GetMethodProps(This,codeRva,pMethodToken,pcGenericParams,cbSignature,pcbSignature,signature) \ - ( (This)->lpVtbl -> GetMethodProps(This,codeRva,pMethodToken,pcGenericParams,cbSignature,pcbSignature,signature) ) +#define ICorDebugSymbolProvider_GetMethodProps(This,codeRva,pMethodToken,pcGenericParams,cbSignature,pcbSignature,signature) \ + ( (This)->lpVtbl -> GetMethodProps(This,codeRva,pMethodToken,pcGenericParams,cbSignature,pcbSignature,signature) ) -#define ICorDebugSymbolProvider_GetTypeProps(This,vtableRva,cbSignature,pcbSignature,signature) \ - ( (This)->lpVtbl -> GetTypeProps(This,vtableRva,cbSignature,pcbSignature,signature) ) +#define ICorDebugSymbolProvider_GetTypeProps(This,vtableRva,cbSignature,pcbSignature,signature) \ + ( (This)->lpVtbl -> GetTypeProps(This,vtableRva,cbSignature,pcbSignature,signature) ) -#define ICorDebugSymbolProvider_GetCodeRange(This,codeRva,pCodeStartAddress,pCodeSize) \ - ( (This)->lpVtbl -> GetCodeRange(This,codeRva,pCodeStartAddress,pCodeSize) ) +#define ICorDebugSymbolProvider_GetCodeRange(This,codeRva,pCodeStartAddress,pCodeSize) \ + ( (This)->lpVtbl -> GetCodeRange(This,codeRva,pCodeStartAddress,pCodeSize) ) -#define ICorDebugSymbolProvider_GetAssemblyImageBytes(This,rva,length,ppMemoryBuffer) \ - ( (This)->lpVtbl -> GetAssemblyImageBytes(This,rva,length,ppMemoryBuffer) ) +#define ICorDebugSymbolProvider_GetAssemblyImageBytes(This,rva,length,ppMemoryBuffer) \ + ( (This)->lpVtbl -> GetAssemblyImageBytes(This,rva,length,ppMemoryBuffer) ) -#define ICorDebugSymbolProvider_GetObjectSize(This,cbSignature,typeSig,pObjectSize) \ - ( (This)->lpVtbl -> GetObjectSize(This,cbSignature,typeSig,pObjectSize) ) +#define ICorDebugSymbolProvider_GetObjectSize(This,cbSignature,typeSig,pObjectSize) \ + ( (This)->lpVtbl -> GetObjectSize(This,cbSignature,typeSig,pObjectSize) ) -#define ICorDebugSymbolProvider_GetAssemblyImageMetadata(This,ppMemoryBuffer) \ - ( (This)->lpVtbl -> GetAssemblyImageMetadata(This,ppMemoryBuffer) ) +#define ICorDebugSymbolProvider_GetAssemblyImageMetadata(This,ppMemoryBuffer) \ + ( (This)->lpVtbl -> GetAssemblyImageMetadata(This,ppMemoryBuffer) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugSymbolProvider_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugSymbolProvider_INTERFACE_DEFINED__ */ #ifndef __ICorDebugSymbolProvider2_INTERFACE_DEFINED__ #define __ICorDebugSymbolProvider2_INTERFACE_DEFINED__ /* interface ICorDebugSymbolProvider2 */ -/* [unique][local][uuid][object] */ +/* [unique][local][uuid][object] */ EXTERN_C const IID IID_ICorDebugSymbolProvider2; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("F9801807-4764-4330-9E67-4F685094165E") ICorDebugSymbolProvider2 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetGenericDictionaryInfo( + virtual HRESULT STDMETHODCALLTYPE GetGenericDictionaryInfo( /* [out] */ ICorDebugMemoryBuffer **ppMemoryBuffer) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetFrameProps( + + virtual HRESULT STDMETHODCALLTYPE GetFrameProps( /* [in] */ ULONG32 codeRva, /* [out] */ ULONG32 *pCodeStartRva, /* [out] */ ULONG32 *pParentFrameStartRva) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugSymbolProvider2Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugSymbolProvider2 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugSymbolProvider2 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugSymbolProvider2 * This); - - HRESULT ( STDMETHODCALLTYPE *GetGenericDictionaryInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetGenericDictionaryInfo )( ICorDebugSymbolProvider2 * This, /* [out] */ ICorDebugMemoryBuffer **ppMemoryBuffer); - - HRESULT ( STDMETHODCALLTYPE *GetFrameProps )( + + HRESULT ( STDMETHODCALLTYPE *GetFrameProps )( ICorDebugSymbolProvider2 * This, /* [in] */ ULONG32 codeRva, /* [out] */ ULONG32 *pCodeStartRva, /* [out] */ ULONG32 *pParentFrameStartRva); - + END_INTERFACE } ICorDebugSymbolProvider2Vtbl; @@ -2444,92 +2444,92 @@ EXTERN_C const IID IID_ICorDebugSymbolProvider2; CONST_VTBL struct ICorDebugSymbolProvider2Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugSymbolProvider2_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugSymbolProvider2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugSymbolProvider2_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugSymbolProvider2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugSymbolProvider2_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugSymbolProvider2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugSymbolProvider2_GetGenericDictionaryInfo(This,ppMemoryBuffer) \ - ( (This)->lpVtbl -> GetGenericDictionaryInfo(This,ppMemoryBuffer) ) +#define ICorDebugSymbolProvider2_GetGenericDictionaryInfo(This,ppMemoryBuffer) \ + ( (This)->lpVtbl -> GetGenericDictionaryInfo(This,ppMemoryBuffer) ) -#define ICorDebugSymbolProvider2_GetFrameProps(This,codeRva,pCodeStartRva,pParentFrameStartRva) \ - ( (This)->lpVtbl -> GetFrameProps(This,codeRva,pCodeStartRva,pParentFrameStartRva) ) +#define ICorDebugSymbolProvider2_GetFrameProps(This,codeRva,pCodeStartRva,pParentFrameStartRva) \ + ( (This)->lpVtbl -> GetFrameProps(This,codeRva,pCodeStartRva,pParentFrameStartRva) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugSymbolProvider2_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugSymbolProvider2_INTERFACE_DEFINED__ */ #ifndef __ICorDebugVirtualUnwinder_INTERFACE_DEFINED__ #define __ICorDebugVirtualUnwinder_INTERFACE_DEFINED__ /* interface ICorDebugVirtualUnwinder */ -/* [unique][local][uuid][object] */ +/* [unique][local][uuid][object] */ EXTERN_C const IID IID_ICorDebugVirtualUnwinder; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("F69126B7-C787-4F6B-AE96-A569786FC670") ICorDebugVirtualUnwinder : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetContext( + virtual HRESULT STDMETHODCALLTYPE GetContext( /* [in] */ ULONG32 contextFlags, /* [in] */ ULONG32 cbContextBuf, /* [out] */ ULONG32 *contextSize, /* [size_is][out] */ BYTE contextBuf[ ]) = 0; - + virtual HRESULT STDMETHODCALLTYPE Next( void) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugVirtualUnwinderVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugVirtualUnwinder * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugVirtualUnwinder * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugVirtualUnwinder * This); - - HRESULT ( STDMETHODCALLTYPE *GetContext )( + + HRESULT ( STDMETHODCALLTYPE *GetContext )( ICorDebugVirtualUnwinder * This, /* [in] */ ULONG32 contextFlags, /* [in] */ ULONG32 cbContextBuf, /* [out] */ ULONG32 *contextSize, /* [size_is][out] */ BYTE contextBuf[ ]); - - HRESULT ( STDMETHODCALLTYPE *Next )( + + HRESULT ( STDMETHODCALLTYPE *Next )( ICorDebugVirtualUnwinder * This); - + END_INTERFACE } ICorDebugVirtualUnwinderVtbl; @@ -2538,133 +2538,133 @@ EXTERN_C const IID IID_ICorDebugVirtualUnwinder; CONST_VTBL struct ICorDebugVirtualUnwinderVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugVirtualUnwinder_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugVirtualUnwinder_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugVirtualUnwinder_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugVirtualUnwinder_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugVirtualUnwinder_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugVirtualUnwinder_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugVirtualUnwinder_GetContext(This,contextFlags,cbContextBuf,contextSize,contextBuf) \ - ( (This)->lpVtbl -> GetContext(This,contextFlags,cbContextBuf,contextSize,contextBuf) ) +#define ICorDebugVirtualUnwinder_GetContext(This,contextFlags,cbContextBuf,contextSize,contextBuf) \ + ( (This)->lpVtbl -> GetContext(This,contextFlags,cbContextBuf,contextSize,contextBuf) ) -#define ICorDebugVirtualUnwinder_Next(This) \ - ( (This)->lpVtbl -> Next(This) ) +#define ICorDebugVirtualUnwinder_Next(This) \ + ( (This)->lpVtbl -> Next(This) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugVirtualUnwinder_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugVirtualUnwinder_INTERFACE_DEFINED__ */ #ifndef __ICorDebugDataTarget2_INTERFACE_DEFINED__ #define __ICorDebugDataTarget2_INTERFACE_DEFINED__ /* interface ICorDebugDataTarget2 */ -/* [unique][local][uuid][object] */ +/* [unique][local][uuid][object] */ EXTERN_C const IID IID_ICorDebugDataTarget2; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("2eb364da-605b-4e8d-b333-3394c4828d41") ICorDebugDataTarget2 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetImageFromPointer( + virtual HRESULT STDMETHODCALLTYPE GetImageFromPointer( /* [in] */ CORDB_ADDRESS addr, /* [out] */ CORDB_ADDRESS *pImageBase, /* [out] */ ULONG32 *pSize) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetImageLocation( + + virtual HRESULT STDMETHODCALLTYPE GetImageLocation( /* [in] */ CORDB_ADDRESS baseAddress, /* [in] */ ULONG32 cchName, /* [out] */ ULONG32 *pcchName, /* [length_is][size_is][out] */ WCHAR szName[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetSymbolProviderForImage( + + virtual HRESULT STDMETHODCALLTYPE GetSymbolProviderForImage( /* [in] */ CORDB_ADDRESS imageBaseAddress, /* [out] */ ICorDebugSymbolProvider **ppSymProvider) = 0; - - virtual HRESULT STDMETHODCALLTYPE EnumerateThreadIDs( + + virtual HRESULT STDMETHODCALLTYPE EnumerateThreadIDs( /* [in] */ ULONG32 cThreadIds, /* [out] */ ULONG32 *pcThreadIds, /* [length_is][size_is][out] */ ULONG32 pThreadIds[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE CreateVirtualUnwinder( + + virtual HRESULT STDMETHODCALLTYPE CreateVirtualUnwinder( /* [in] */ DWORD nativeThreadID, /* [in] */ ULONG32 contextFlags, /* [in] */ ULONG32 cbContext, /* [size_is][in] */ BYTE initialContext[ ], /* [out] */ ICorDebugVirtualUnwinder **ppUnwinder) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugDataTarget2Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugDataTarget2 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugDataTarget2 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugDataTarget2 * This); - - HRESULT ( STDMETHODCALLTYPE *GetImageFromPointer )( + + HRESULT ( STDMETHODCALLTYPE *GetImageFromPointer )( ICorDebugDataTarget2 * This, /* [in] */ CORDB_ADDRESS addr, /* [out] */ CORDB_ADDRESS *pImageBase, /* [out] */ ULONG32 *pSize); - - HRESULT ( STDMETHODCALLTYPE *GetImageLocation )( + + HRESULT ( STDMETHODCALLTYPE *GetImageLocation )( ICorDebugDataTarget2 * This, /* [in] */ CORDB_ADDRESS baseAddress, /* [in] */ ULONG32 cchName, /* [out] */ ULONG32 *pcchName, /* [length_is][size_is][out] */ WCHAR szName[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetSymbolProviderForImage )( + + HRESULT ( STDMETHODCALLTYPE *GetSymbolProviderForImage )( ICorDebugDataTarget2 * This, /* [in] */ CORDB_ADDRESS imageBaseAddress, /* [out] */ ICorDebugSymbolProvider **ppSymProvider); - - HRESULT ( STDMETHODCALLTYPE *EnumerateThreadIDs )( + + HRESULT ( STDMETHODCALLTYPE *EnumerateThreadIDs )( ICorDebugDataTarget2 * This, /* [in] */ ULONG32 cThreadIds, /* [out] */ ULONG32 *pcThreadIds, /* [length_is][size_is][out] */ ULONG32 pThreadIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *CreateVirtualUnwinder )( + + HRESULT ( STDMETHODCALLTYPE *CreateVirtualUnwinder )( ICorDebugDataTarget2 * This, /* [in] */ DWORD nativeThreadID, /* [in] */ ULONG32 contextFlags, /* [in] */ ULONG32 cbContext, /* [size_is][in] */ BYTE initialContext[ ], /* [out] */ ICorDebugVirtualUnwinder **ppUnwinder); - + END_INTERFACE } ICorDebugDataTarget2Vtbl; @@ -2673,108 +2673,108 @@ EXTERN_C const IID IID_ICorDebugDataTarget2; CONST_VTBL struct ICorDebugDataTarget2Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugDataTarget2_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugDataTarget2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugDataTarget2_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugDataTarget2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugDataTarget2_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugDataTarget2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugDataTarget2_GetImageFromPointer(This,addr,pImageBase,pSize) \ - ( (This)->lpVtbl -> GetImageFromPointer(This,addr,pImageBase,pSize) ) +#define ICorDebugDataTarget2_GetImageFromPointer(This,addr,pImageBase,pSize) \ + ( (This)->lpVtbl -> GetImageFromPointer(This,addr,pImageBase,pSize) ) -#define ICorDebugDataTarget2_GetImageLocation(This,baseAddress,cchName,pcchName,szName) \ - ( (This)->lpVtbl -> GetImageLocation(This,baseAddress,cchName,pcchName,szName) ) +#define ICorDebugDataTarget2_GetImageLocation(This,baseAddress,cchName,pcchName,szName) \ + ( (This)->lpVtbl -> GetImageLocation(This,baseAddress,cchName,pcchName,szName) ) -#define ICorDebugDataTarget2_GetSymbolProviderForImage(This,imageBaseAddress,ppSymProvider) \ - ( (This)->lpVtbl -> GetSymbolProviderForImage(This,imageBaseAddress,ppSymProvider) ) +#define ICorDebugDataTarget2_GetSymbolProviderForImage(This,imageBaseAddress,ppSymProvider) \ + ( (This)->lpVtbl -> GetSymbolProviderForImage(This,imageBaseAddress,ppSymProvider) ) -#define ICorDebugDataTarget2_EnumerateThreadIDs(This,cThreadIds,pcThreadIds,pThreadIds) \ - ( (This)->lpVtbl -> EnumerateThreadIDs(This,cThreadIds,pcThreadIds,pThreadIds) ) +#define ICorDebugDataTarget2_EnumerateThreadIDs(This,cThreadIds,pcThreadIds,pThreadIds) \ + ( (This)->lpVtbl -> EnumerateThreadIDs(This,cThreadIds,pcThreadIds,pThreadIds) ) -#define ICorDebugDataTarget2_CreateVirtualUnwinder(This,nativeThreadID,contextFlags,cbContext,initialContext,ppUnwinder) \ - ( (This)->lpVtbl -> CreateVirtualUnwinder(This,nativeThreadID,contextFlags,cbContext,initialContext,ppUnwinder) ) +#define ICorDebugDataTarget2_CreateVirtualUnwinder(This,nativeThreadID,contextFlags,cbContext,initialContext,ppUnwinder) \ + ( (This)->lpVtbl -> CreateVirtualUnwinder(This,nativeThreadID,contextFlags,cbContext,initialContext,ppUnwinder) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugDataTarget2_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugDataTarget2_INTERFACE_DEFINED__ */ #ifndef __ICorDebugLoadedModule_INTERFACE_DEFINED__ #define __ICorDebugLoadedModule_INTERFACE_DEFINED__ /* interface ICorDebugLoadedModule */ -/* [unique][local][uuid][object] */ +/* [unique][local][uuid][object] */ EXTERN_C const IID IID_ICorDebugLoadedModule; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("817F343A-6630-4578-96C5-D11BC0EC5EE2") ICorDebugLoadedModule : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetBaseAddress( + virtual HRESULT STDMETHODCALLTYPE GetBaseAddress( /* [out] */ CORDB_ADDRESS *pAddress) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetName( + + virtual HRESULT STDMETHODCALLTYPE GetName( /* [in] */ ULONG32 cchName, /* [out] */ ULONG32 *pcchName, /* [length_is][size_is][out] */ WCHAR szName[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetSize( + + virtual HRESULT STDMETHODCALLTYPE GetSize( /* [out] */ ULONG32 *pcBytes) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugLoadedModuleVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugLoadedModule * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugLoadedModule * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugLoadedModule * This); - - HRESULT ( STDMETHODCALLTYPE *GetBaseAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetBaseAddress )( ICorDebugLoadedModule * This, /* [out] */ CORDB_ADDRESS *pAddress); - - HRESULT ( STDMETHODCALLTYPE *GetName )( + + HRESULT ( STDMETHODCALLTYPE *GetName )( ICorDebugLoadedModule * This, /* [in] */ ULONG32 cchName, /* [out] */ ULONG32 *pcchName, /* [length_is][size_is][out] */ WCHAR szName[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetSize )( + + HRESULT ( STDMETHODCALLTYPE *GetSize )( ICorDebugLoadedModule * This, /* [out] */ ULONG32 *pcBytes); - + END_INTERFACE } ICorDebugLoadedModuleVtbl; @@ -2783,88 +2783,88 @@ EXTERN_C const IID IID_ICorDebugLoadedModule; CONST_VTBL struct ICorDebugLoadedModuleVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugLoadedModule_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugLoadedModule_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugLoadedModule_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugLoadedModule_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugLoadedModule_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugLoadedModule_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugLoadedModule_GetBaseAddress(This,pAddress) \ - ( (This)->lpVtbl -> GetBaseAddress(This,pAddress) ) +#define ICorDebugLoadedModule_GetBaseAddress(This,pAddress) \ + ( (This)->lpVtbl -> GetBaseAddress(This,pAddress) ) -#define ICorDebugLoadedModule_GetName(This,cchName,pcchName,szName) \ - ( (This)->lpVtbl -> GetName(This,cchName,pcchName,szName) ) +#define ICorDebugLoadedModule_GetName(This,cchName,pcchName,szName) \ + ( (This)->lpVtbl -> GetName(This,cchName,pcchName,szName) ) -#define ICorDebugLoadedModule_GetSize(This,pcBytes) \ - ( (This)->lpVtbl -> GetSize(This,pcBytes) ) +#define ICorDebugLoadedModule_GetSize(This,pcBytes) \ + ( (This)->lpVtbl -> GetSize(This,pcBytes) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugLoadedModule_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugLoadedModule_INTERFACE_DEFINED__ */ #ifndef __ICorDebugDataTarget3_INTERFACE_DEFINED__ #define __ICorDebugDataTarget3_INTERFACE_DEFINED__ /* interface ICorDebugDataTarget3 */ -/* [unique][local][uuid][object] */ +/* [unique][local][uuid][object] */ EXTERN_C const IID IID_ICorDebugDataTarget3; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("D05E60C3-848C-4E7D-894E-623320FF6AFA") ICorDebugDataTarget3 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetLoadedModules( + virtual HRESULT STDMETHODCALLTYPE GetLoadedModules( /* [in] */ ULONG32 cRequestedModules, /* [out] */ ULONG32 *pcFetchedModules, /* [length_is][size_is][out] */ ICorDebugLoadedModule *pLoadedModules[ ]) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugDataTarget3Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugDataTarget3 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugDataTarget3 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugDataTarget3 * This); - - HRESULT ( STDMETHODCALLTYPE *GetLoadedModules )( + + HRESULT ( STDMETHODCALLTYPE *GetLoadedModules )( ICorDebugDataTarget3 * This, /* [in] */ ULONG32 cRequestedModules, /* [out] */ ULONG32 *pcFetchedModules, /* [length_is][size_is][out] */ ICorDebugLoadedModule *pLoadedModules[ ]); - + END_INTERFACE } ICorDebugDataTarget3Vtbl; @@ -2873,82 +2873,82 @@ EXTERN_C const IID IID_ICorDebugDataTarget3; CONST_VTBL struct ICorDebugDataTarget3Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugDataTarget3_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugDataTarget3_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugDataTarget3_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugDataTarget3_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugDataTarget3_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugDataTarget3_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugDataTarget3_GetLoadedModules(This,cRequestedModules,pcFetchedModules,pLoadedModules) \ - ( (This)->lpVtbl -> GetLoadedModules(This,cRequestedModules,pcFetchedModules,pLoadedModules) ) +#define ICorDebugDataTarget3_GetLoadedModules(This,cRequestedModules,pcFetchedModules,pLoadedModules) \ + ( (This)->lpVtbl -> GetLoadedModules(This,cRequestedModules,pcFetchedModules,pLoadedModules) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugDataTarget3_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugDataTarget3_INTERFACE_DEFINED__ */ #ifndef __ICorDebugDataTarget4_INTERFACE_DEFINED__ #define __ICorDebugDataTarget4_INTERFACE_DEFINED__ /* interface ICorDebugDataTarget4 */ -/* [unique][local][uuid][object] */ +/* [unique][local][uuid][object] */ EXTERN_C const IID IID_ICorDebugDataTarget4; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("E799DC06-E099-4713-BDD9-906D3CC02CF2") ICorDebugDataTarget4 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE VirtualUnwind( + virtual HRESULT STDMETHODCALLTYPE VirtualUnwind( /* [in] */ DWORD threadId, /* [in] */ ULONG32 contextSize, /* [size_is][out][in] */ BYTE *context) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugDataTarget4Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugDataTarget4 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugDataTarget4 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugDataTarget4 * This); - - HRESULT ( STDMETHODCALLTYPE *VirtualUnwind )( + + HRESULT ( STDMETHODCALLTYPE *VirtualUnwind )( ICorDebugDataTarget4 * This, /* [in] */ DWORD threadId, /* [in] */ ULONG32 contextSize, /* [size_is][out][in] */ BYTE *context); - + END_INTERFACE } ICorDebugDataTarget4Vtbl; @@ -2957,120 +2957,120 @@ EXTERN_C const IID IID_ICorDebugDataTarget4; CONST_VTBL struct ICorDebugDataTarget4Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugDataTarget4_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugDataTarget4_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugDataTarget4_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugDataTarget4_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugDataTarget4_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugDataTarget4_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugDataTarget4_VirtualUnwind(This,threadId,contextSize,context) \ - ( (This)->lpVtbl -> VirtualUnwind(This,threadId,contextSize,context) ) +#define ICorDebugDataTarget4_VirtualUnwind(This,threadId,contextSize,context) \ + ( (This)->lpVtbl -> VirtualUnwind(This,threadId,contextSize,context) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugDataTarget4_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugDataTarget4_INTERFACE_DEFINED__ */ #ifndef __ICorDebugMutableDataTarget_INTERFACE_DEFINED__ #define __ICorDebugMutableDataTarget_INTERFACE_DEFINED__ /* interface ICorDebugMutableDataTarget */ -/* [unique][local][uuid][object] */ +/* [unique][local][uuid][object] */ EXTERN_C const IID IID_ICorDebugMutableDataTarget; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("A1B8A756-3CB6-4CCB-979F-3DF999673A59") ICorDebugMutableDataTarget : public ICorDebugDataTarget { public: - virtual HRESULT STDMETHODCALLTYPE WriteVirtual( + virtual HRESULT STDMETHODCALLTYPE WriteVirtual( /* [in] */ CORDB_ADDRESS address, /* [size_is][in] */ const BYTE *pBuffer, /* [in] */ ULONG32 bytesRequested) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetThreadContext( + + virtual HRESULT STDMETHODCALLTYPE SetThreadContext( /* [in] */ DWORD dwThreadID, /* [in] */ ULONG32 contextSize, /* [size_is][in] */ const BYTE *pContext) = 0; - - virtual HRESULT STDMETHODCALLTYPE ContinueStatusChanged( + + virtual HRESULT STDMETHODCALLTYPE ContinueStatusChanged( /* [in] */ DWORD dwThreadId, /* [in] */ CORDB_CONTINUE_STATUS continueStatus) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugMutableDataTargetVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugMutableDataTarget * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugMutableDataTarget * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugMutableDataTarget * This); - - HRESULT ( STDMETHODCALLTYPE *GetPlatform )( + + HRESULT ( STDMETHODCALLTYPE *GetPlatform )( ICorDebugMutableDataTarget * This, /* [out] */ CorDebugPlatform *pTargetPlatform); - - HRESULT ( STDMETHODCALLTYPE *ReadVirtual )( + + HRESULT ( STDMETHODCALLTYPE *ReadVirtual )( ICorDebugMutableDataTarget * This, /* [in] */ CORDB_ADDRESS address, /* [length_is][size_is][out] */ BYTE *pBuffer, /* [in] */ ULONG32 bytesRequested, /* [out] */ ULONG32 *pBytesRead); - - HRESULT ( STDMETHODCALLTYPE *GetThreadContext )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadContext )( ICorDebugMutableDataTarget * This, /* [in] */ DWORD dwThreadID, /* [in] */ ULONG32 contextFlags, /* [in] */ ULONG32 contextSize, /* [size_is][out] */ BYTE *pContext); - - HRESULT ( STDMETHODCALLTYPE *WriteVirtual )( + + HRESULT ( STDMETHODCALLTYPE *WriteVirtual )( ICorDebugMutableDataTarget * This, /* [in] */ CORDB_ADDRESS address, /* [size_is][in] */ const BYTE *pBuffer, /* [in] */ ULONG32 bytesRequested); - - HRESULT ( STDMETHODCALLTYPE *SetThreadContext )( + + HRESULT ( STDMETHODCALLTYPE *SetThreadContext )( ICorDebugMutableDataTarget * This, /* [in] */ DWORD dwThreadID, /* [in] */ ULONG32 contextSize, /* [size_is][in] */ const BYTE *pContext); - - HRESULT ( STDMETHODCALLTYPE *ContinueStatusChanged )( + + HRESULT ( STDMETHODCALLTYPE *ContinueStatusChanged )( ICorDebugMutableDataTarget * This, /* [in] */ DWORD dwThreadId, /* [in] */ CORDB_CONTINUE_STATUS continueStatus); - + END_INTERFACE } ICorDebugMutableDataTargetVtbl; @@ -3079,108 +3079,108 @@ EXTERN_C const IID IID_ICorDebugMutableDataTarget; CONST_VTBL struct ICorDebugMutableDataTargetVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugMutableDataTarget_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugMutableDataTarget_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugMutableDataTarget_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugMutableDataTarget_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugMutableDataTarget_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugMutableDataTarget_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugMutableDataTarget_GetPlatform(This,pTargetPlatform) \ - ( (This)->lpVtbl -> GetPlatform(This,pTargetPlatform) ) +#define ICorDebugMutableDataTarget_GetPlatform(This,pTargetPlatform) \ + ( (This)->lpVtbl -> GetPlatform(This,pTargetPlatform) ) -#define ICorDebugMutableDataTarget_ReadVirtual(This,address,pBuffer,bytesRequested,pBytesRead) \ - ( (This)->lpVtbl -> ReadVirtual(This,address,pBuffer,bytesRequested,pBytesRead) ) +#define ICorDebugMutableDataTarget_ReadVirtual(This,address,pBuffer,bytesRequested,pBytesRead) \ + ( (This)->lpVtbl -> ReadVirtual(This,address,pBuffer,bytesRequested,pBytesRead) ) -#define ICorDebugMutableDataTarget_GetThreadContext(This,dwThreadID,contextFlags,contextSize,pContext) \ - ( (This)->lpVtbl -> GetThreadContext(This,dwThreadID,contextFlags,contextSize,pContext) ) +#define ICorDebugMutableDataTarget_GetThreadContext(This,dwThreadID,contextFlags,contextSize,pContext) \ + ( (This)->lpVtbl -> GetThreadContext(This,dwThreadID,contextFlags,contextSize,pContext) ) -#define ICorDebugMutableDataTarget_WriteVirtual(This,address,pBuffer,bytesRequested) \ - ( (This)->lpVtbl -> WriteVirtual(This,address,pBuffer,bytesRequested) ) +#define ICorDebugMutableDataTarget_WriteVirtual(This,address,pBuffer,bytesRequested) \ + ( (This)->lpVtbl -> WriteVirtual(This,address,pBuffer,bytesRequested) ) -#define ICorDebugMutableDataTarget_SetThreadContext(This,dwThreadID,contextSize,pContext) \ - ( (This)->lpVtbl -> SetThreadContext(This,dwThreadID,contextSize,pContext) ) +#define ICorDebugMutableDataTarget_SetThreadContext(This,dwThreadID,contextSize,pContext) \ + ( (This)->lpVtbl -> SetThreadContext(This,dwThreadID,contextSize,pContext) ) -#define ICorDebugMutableDataTarget_ContinueStatusChanged(This,dwThreadId,continueStatus) \ - ( (This)->lpVtbl -> ContinueStatusChanged(This,dwThreadId,continueStatus) ) +#define ICorDebugMutableDataTarget_ContinueStatusChanged(This,dwThreadId,continueStatus) \ + ( (This)->lpVtbl -> ContinueStatusChanged(This,dwThreadId,continueStatus) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugMutableDataTarget_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugMutableDataTarget_INTERFACE_DEFINED__ */ #ifndef __ICorDebugMetaDataLocator_INTERFACE_DEFINED__ #define __ICorDebugMetaDataLocator_INTERFACE_DEFINED__ /* interface ICorDebugMetaDataLocator */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugMetaDataLocator; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("7cef8ba9-2ef7-42bf-973f-4171474f87d9") ICorDebugMetaDataLocator : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetMetaData( + virtual HRESULT STDMETHODCALLTYPE GetMetaData( /* [in] */ LPCWSTR wszImagePath, /* [in] */ DWORD dwImageTimeStamp, /* [in] */ DWORD dwImageSize, /* [in] */ ULONG32 cchPathBuffer, - /* [annotation][out] */ + /* [annotation][out] */ _Out_ ULONG32 *pcchPathBuffer, - /* [annotation][length_is][size_is][out] */ + /* [annotation][length_is][size_is][out] */ _Out_writes_to_(cchPathBuffer, *pcchPathBuffer) WCHAR wszPathBuffer[ ]) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugMetaDataLocatorVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugMetaDataLocator * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugMetaDataLocator * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugMetaDataLocator * This); - - HRESULT ( STDMETHODCALLTYPE *GetMetaData )( + + HRESULT ( STDMETHODCALLTYPE *GetMetaData )( ICorDebugMetaDataLocator * This, /* [in] */ LPCWSTR wszImagePath, /* [in] */ DWORD dwImageTimeStamp, /* [in] */ DWORD dwImageSize, /* [in] */ ULONG32 cchPathBuffer, - /* [annotation][out] */ + /* [annotation][out] */ _Out_ ULONG32 *pcchPathBuffer, - /* [annotation][length_is][size_is][out] */ + /* [annotation][length_is][size_is][out] */ _Out_writes_to_(cchPathBuffer, *pcchPathBuffer) WCHAR wszPathBuffer[ ]); - + END_INTERFACE } ICorDebugMetaDataLocatorVtbl; @@ -3189,40 +3189,40 @@ EXTERN_C const IID IID_ICorDebugMetaDataLocator; CONST_VTBL struct ICorDebugMetaDataLocatorVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugMetaDataLocator_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugMetaDataLocator_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugMetaDataLocator_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugMetaDataLocator_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugMetaDataLocator_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugMetaDataLocator_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugMetaDataLocator_GetMetaData(This,wszImagePath,dwImageTimeStamp,dwImageSize,cchPathBuffer,pcchPathBuffer,wszPathBuffer) \ - ( (This)->lpVtbl -> GetMetaData(This,wszImagePath,dwImageTimeStamp,dwImageSize,cchPathBuffer,pcchPathBuffer,wszPathBuffer) ) +#define ICorDebugMetaDataLocator_GetMetaData(This,wszImagePath,dwImageTimeStamp,dwImageSize,cchPathBuffer,pcchPathBuffer,wszPathBuffer) \ + ( (This)->lpVtbl -> GetMetaData(This,wszImagePath,dwImageTimeStamp,dwImageSize,cchPathBuffer,pcchPathBuffer,wszPathBuffer) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugMetaDataLocator_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugMetaDataLocator_INTERFACE_DEFINED__ */ /* interface __MIDL_itf_cordebug_0000_0015 */ -/* [local] */ +/* [local] */ #pragma warning(push) -#pragma warning(disable:28718) +#pragma warning(disable:28718) extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0015_v0_0_c_ifspec; @@ -3232,285 +3232,285 @@ extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0015_v0_0_s_ifspec; #define __ICorDebugManagedCallback_INTERFACE_DEFINED__ /* interface ICorDebugManagedCallback */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ -typedef +typedef enum CorDebugStepReason { - STEP_NORMAL = 0, - STEP_RETURN = ( STEP_NORMAL + 1 ) , - STEP_CALL = ( STEP_RETURN + 1 ) , - STEP_EXCEPTION_FILTER = ( STEP_CALL + 1 ) , - STEP_EXCEPTION_HANDLER = ( STEP_EXCEPTION_FILTER + 1 ) , - STEP_INTERCEPT = ( STEP_EXCEPTION_HANDLER + 1 ) , - STEP_EXIT = ( STEP_INTERCEPT + 1 ) - } CorDebugStepReason; + STEP_NORMAL = 0, + STEP_RETURN = ( STEP_NORMAL + 1 ) , + STEP_CALL = ( STEP_RETURN + 1 ) , + STEP_EXCEPTION_FILTER = ( STEP_CALL + 1 ) , + STEP_EXCEPTION_HANDLER = ( STEP_EXCEPTION_FILTER + 1 ) , + STEP_INTERCEPT = ( STEP_EXCEPTION_HANDLER + 1 ) , + STEP_EXIT = ( STEP_INTERCEPT + 1 ) + } CorDebugStepReason; -typedef +typedef enum LoggingLevelEnum { - LTraceLevel0 = 0, - LTraceLevel1 = ( LTraceLevel0 + 1 ) , - LTraceLevel2 = ( LTraceLevel1 + 1 ) , - LTraceLevel3 = ( LTraceLevel2 + 1 ) , - LTraceLevel4 = ( LTraceLevel3 + 1 ) , - LStatusLevel0 = 20, - LStatusLevel1 = ( LStatusLevel0 + 1 ) , - LStatusLevel2 = ( LStatusLevel1 + 1 ) , - LStatusLevel3 = ( LStatusLevel2 + 1 ) , - LStatusLevel4 = ( LStatusLevel3 + 1 ) , - LWarningLevel = 40, - LErrorLevel = 50, - LPanicLevel = 100 - } LoggingLevelEnum; - -typedef + LTraceLevel0 = 0, + LTraceLevel1 = ( LTraceLevel0 + 1 ) , + LTraceLevel2 = ( LTraceLevel1 + 1 ) , + LTraceLevel3 = ( LTraceLevel2 + 1 ) , + LTraceLevel4 = ( LTraceLevel3 + 1 ) , + LStatusLevel0 = 20, + LStatusLevel1 = ( LStatusLevel0 + 1 ) , + LStatusLevel2 = ( LStatusLevel1 + 1 ) , + LStatusLevel3 = ( LStatusLevel2 + 1 ) , + LStatusLevel4 = ( LStatusLevel3 + 1 ) , + LWarningLevel = 40, + LErrorLevel = 50, + LPanicLevel = 100 + } LoggingLevelEnum; + +typedef enum LogSwitchCallReason { - SWITCH_CREATE = 0, - SWITCH_MODIFY = ( SWITCH_CREATE + 1 ) , - SWITCH_DELETE = ( SWITCH_MODIFY + 1 ) - } LogSwitchCallReason; + SWITCH_CREATE = 0, + SWITCH_MODIFY = ( SWITCH_CREATE + 1 ) , + SWITCH_DELETE = ( SWITCH_MODIFY + 1 ) + } LogSwitchCallReason; EXTERN_C const IID IID_ICorDebugManagedCallback; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("3d6f5f60-7538-11d3-8d5b-00104b35e7ef") ICorDebugManagedCallback : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE Breakpoint( + virtual HRESULT STDMETHODCALLTYPE Breakpoint( /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugThread *pThread, /* [in] */ ICorDebugBreakpoint *pBreakpoint) = 0; - - virtual HRESULT STDMETHODCALLTYPE StepComplete( + + virtual HRESULT STDMETHODCALLTYPE StepComplete( /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugThread *pThread, /* [in] */ ICorDebugStepper *pStepper, /* [in] */ CorDebugStepReason reason) = 0; - - virtual HRESULT STDMETHODCALLTYPE Break( + + virtual HRESULT STDMETHODCALLTYPE Break( /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugThread *thread) = 0; - - virtual HRESULT STDMETHODCALLTYPE Exception( + + virtual HRESULT STDMETHODCALLTYPE Exception( /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugThread *pThread, /* [in] */ BOOL unhandled) = 0; - - virtual HRESULT STDMETHODCALLTYPE EvalComplete( + + virtual HRESULT STDMETHODCALLTYPE EvalComplete( /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugThread *pThread, /* [in] */ ICorDebugEval *pEval) = 0; - - virtual HRESULT STDMETHODCALLTYPE EvalException( + + virtual HRESULT STDMETHODCALLTYPE EvalException( /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugThread *pThread, /* [in] */ ICorDebugEval *pEval) = 0; - - virtual HRESULT STDMETHODCALLTYPE CreateProcess( + + virtual HRESULT STDMETHODCALLTYPE CreateProcess( /* [in] */ ICorDebugProcess *pProcess) = 0; - - virtual HRESULT STDMETHODCALLTYPE ExitProcess( + + virtual HRESULT STDMETHODCALLTYPE ExitProcess( /* [in] */ ICorDebugProcess *pProcess) = 0; - - virtual HRESULT STDMETHODCALLTYPE CreateThread( + + virtual HRESULT STDMETHODCALLTYPE CreateThread( /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugThread *thread) = 0; - - virtual HRESULT STDMETHODCALLTYPE ExitThread( + + virtual HRESULT STDMETHODCALLTYPE ExitThread( /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugThread *thread) = 0; - - virtual HRESULT STDMETHODCALLTYPE LoadModule( + + virtual HRESULT STDMETHODCALLTYPE LoadModule( /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugModule *pModule) = 0; - - virtual HRESULT STDMETHODCALLTYPE UnloadModule( + + virtual HRESULT STDMETHODCALLTYPE UnloadModule( /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugModule *pModule) = 0; - - virtual HRESULT STDMETHODCALLTYPE LoadClass( + + virtual HRESULT STDMETHODCALLTYPE LoadClass( /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugClass *c) = 0; - - virtual HRESULT STDMETHODCALLTYPE UnloadClass( + + virtual HRESULT STDMETHODCALLTYPE UnloadClass( /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugClass *c) = 0; - - virtual HRESULT STDMETHODCALLTYPE DebuggerError( + + virtual HRESULT STDMETHODCALLTYPE DebuggerError( /* [in] */ ICorDebugProcess *pProcess, /* [in] */ HRESULT errorHR, /* [in] */ DWORD errorCode) = 0; - - virtual HRESULT STDMETHODCALLTYPE LogMessage( + + virtual HRESULT STDMETHODCALLTYPE LogMessage( /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugThread *pThread, /* [in] */ LONG lLevel, /* [in] */ WCHAR *pLogSwitchName, /* [in] */ WCHAR *pMessage) = 0; - - virtual HRESULT STDMETHODCALLTYPE LogSwitch( + + virtual HRESULT STDMETHODCALLTYPE LogSwitch( /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugThread *pThread, /* [in] */ LONG lLevel, /* [in] */ ULONG ulReason, /* [in] */ WCHAR *pLogSwitchName, /* [in] */ WCHAR *pParentName) = 0; - - virtual HRESULT STDMETHODCALLTYPE CreateAppDomain( + + virtual HRESULT STDMETHODCALLTYPE CreateAppDomain( /* [in] */ ICorDebugProcess *pProcess, /* [in] */ ICorDebugAppDomain *pAppDomain) = 0; - - virtual HRESULT STDMETHODCALLTYPE ExitAppDomain( + + virtual HRESULT STDMETHODCALLTYPE ExitAppDomain( /* [in] */ ICorDebugProcess *pProcess, /* [in] */ ICorDebugAppDomain *pAppDomain) = 0; - - virtual HRESULT STDMETHODCALLTYPE LoadAssembly( + + virtual HRESULT STDMETHODCALLTYPE LoadAssembly( /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugAssembly *pAssembly) = 0; - - virtual HRESULT STDMETHODCALLTYPE UnloadAssembly( + + virtual HRESULT STDMETHODCALLTYPE UnloadAssembly( /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugAssembly *pAssembly) = 0; - - virtual HRESULT STDMETHODCALLTYPE ControlCTrap( + + virtual HRESULT STDMETHODCALLTYPE ControlCTrap( /* [in] */ ICorDebugProcess *pProcess) = 0; - - virtual HRESULT STDMETHODCALLTYPE NameChange( + + virtual HRESULT STDMETHODCALLTYPE NameChange( /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugThread *pThread) = 0; - - virtual HRESULT STDMETHODCALLTYPE UpdateModuleSymbols( + + virtual HRESULT STDMETHODCALLTYPE UpdateModuleSymbols( /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugModule *pModule, /* [in] */ IStream *pSymbolStream) = 0; - - virtual HRESULT STDMETHODCALLTYPE EditAndContinueRemap( + + virtual HRESULT STDMETHODCALLTYPE EditAndContinueRemap( /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugThread *pThread, /* [in] */ ICorDebugFunction *pFunction, /* [in] */ BOOL fAccurate) = 0; - - virtual HRESULT STDMETHODCALLTYPE BreakpointSetError( + + virtual HRESULT STDMETHODCALLTYPE BreakpointSetError( /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugThread *pThread, /* [in] */ ICorDebugBreakpoint *pBreakpoint, /* [in] */ DWORD dwError) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugManagedCallbackVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugManagedCallback * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugManagedCallback * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugManagedCallback * This); - - HRESULT ( STDMETHODCALLTYPE *Breakpoint )( + + HRESULT ( STDMETHODCALLTYPE *Breakpoint )( ICorDebugManagedCallback * This, /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugThread *pThread, /* [in] */ ICorDebugBreakpoint *pBreakpoint); - - HRESULT ( STDMETHODCALLTYPE *StepComplete )( + + HRESULT ( STDMETHODCALLTYPE *StepComplete )( ICorDebugManagedCallback * This, /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugThread *pThread, /* [in] */ ICorDebugStepper *pStepper, /* [in] */ CorDebugStepReason reason); - - HRESULT ( STDMETHODCALLTYPE *Break )( + + HRESULT ( STDMETHODCALLTYPE *Break )( ICorDebugManagedCallback * This, /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugThread *thread); - - HRESULT ( STDMETHODCALLTYPE *Exception )( + + HRESULT ( STDMETHODCALLTYPE *Exception )( ICorDebugManagedCallback * This, /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugThread *pThread, /* [in] */ BOOL unhandled); - - HRESULT ( STDMETHODCALLTYPE *EvalComplete )( + + HRESULT ( STDMETHODCALLTYPE *EvalComplete )( ICorDebugManagedCallback * This, /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugThread *pThread, /* [in] */ ICorDebugEval *pEval); - - HRESULT ( STDMETHODCALLTYPE *EvalException )( + + HRESULT ( STDMETHODCALLTYPE *EvalException )( ICorDebugManagedCallback * This, /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugThread *pThread, /* [in] */ ICorDebugEval *pEval); - - HRESULT ( STDMETHODCALLTYPE *CreateProcess )( + + HRESULT ( STDMETHODCALLTYPE *CreateProcess )( ICorDebugManagedCallback * This, /* [in] */ ICorDebugProcess *pProcess); - - HRESULT ( STDMETHODCALLTYPE *ExitProcess )( + + HRESULT ( STDMETHODCALLTYPE *ExitProcess )( ICorDebugManagedCallback * This, /* [in] */ ICorDebugProcess *pProcess); - - HRESULT ( STDMETHODCALLTYPE *CreateThread )( + + HRESULT ( STDMETHODCALLTYPE *CreateThread )( ICorDebugManagedCallback * This, /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugThread *thread); - - HRESULT ( STDMETHODCALLTYPE *ExitThread )( + + HRESULT ( STDMETHODCALLTYPE *ExitThread )( ICorDebugManagedCallback * This, /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugThread *thread); - - HRESULT ( STDMETHODCALLTYPE *LoadModule )( + + HRESULT ( STDMETHODCALLTYPE *LoadModule )( ICorDebugManagedCallback * This, /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugModule *pModule); - - HRESULT ( STDMETHODCALLTYPE *UnloadModule )( + + HRESULT ( STDMETHODCALLTYPE *UnloadModule )( ICorDebugManagedCallback * This, /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugModule *pModule); - - HRESULT ( STDMETHODCALLTYPE *LoadClass )( + + HRESULT ( STDMETHODCALLTYPE *LoadClass )( ICorDebugManagedCallback * This, /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugClass *c); - - HRESULT ( STDMETHODCALLTYPE *UnloadClass )( + + HRESULT ( STDMETHODCALLTYPE *UnloadClass )( ICorDebugManagedCallback * This, /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugClass *c); - - HRESULT ( STDMETHODCALLTYPE *DebuggerError )( + + HRESULT ( STDMETHODCALLTYPE *DebuggerError )( ICorDebugManagedCallback * This, /* [in] */ ICorDebugProcess *pProcess, /* [in] */ HRESULT errorHR, /* [in] */ DWORD errorCode); - - HRESULT ( STDMETHODCALLTYPE *LogMessage )( + + HRESULT ( STDMETHODCALLTYPE *LogMessage )( ICorDebugManagedCallback * This, /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugThread *pThread, /* [in] */ LONG lLevel, /* [in] */ WCHAR *pLogSwitchName, /* [in] */ WCHAR *pMessage); - - HRESULT ( STDMETHODCALLTYPE *LogSwitch )( + + HRESULT ( STDMETHODCALLTYPE *LogSwitch )( ICorDebugManagedCallback * This, /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugThread *pThread, @@ -3518,56 +3518,56 @@ EXTERN_C const IID IID_ICorDebugManagedCallback; /* [in] */ ULONG ulReason, /* [in] */ WCHAR *pLogSwitchName, /* [in] */ WCHAR *pParentName); - - HRESULT ( STDMETHODCALLTYPE *CreateAppDomain )( + + HRESULT ( STDMETHODCALLTYPE *CreateAppDomain )( ICorDebugManagedCallback * This, /* [in] */ ICorDebugProcess *pProcess, /* [in] */ ICorDebugAppDomain *pAppDomain); - - HRESULT ( STDMETHODCALLTYPE *ExitAppDomain )( + + HRESULT ( STDMETHODCALLTYPE *ExitAppDomain )( ICorDebugManagedCallback * This, /* [in] */ ICorDebugProcess *pProcess, /* [in] */ ICorDebugAppDomain *pAppDomain); - - HRESULT ( STDMETHODCALLTYPE *LoadAssembly )( + + HRESULT ( STDMETHODCALLTYPE *LoadAssembly )( ICorDebugManagedCallback * This, /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugAssembly *pAssembly); - - HRESULT ( STDMETHODCALLTYPE *UnloadAssembly )( + + HRESULT ( STDMETHODCALLTYPE *UnloadAssembly )( ICorDebugManagedCallback * This, /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugAssembly *pAssembly); - - HRESULT ( STDMETHODCALLTYPE *ControlCTrap )( + + HRESULT ( STDMETHODCALLTYPE *ControlCTrap )( ICorDebugManagedCallback * This, /* [in] */ ICorDebugProcess *pProcess); - - HRESULT ( STDMETHODCALLTYPE *NameChange )( + + HRESULT ( STDMETHODCALLTYPE *NameChange )( ICorDebugManagedCallback * This, /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugThread *pThread); - - HRESULT ( STDMETHODCALLTYPE *UpdateModuleSymbols )( + + HRESULT ( STDMETHODCALLTYPE *UpdateModuleSymbols )( ICorDebugManagedCallback * This, /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugModule *pModule, /* [in] */ IStream *pSymbolStream); - - HRESULT ( STDMETHODCALLTYPE *EditAndContinueRemap )( + + HRESULT ( STDMETHODCALLTYPE *EditAndContinueRemap )( ICorDebugManagedCallback * This, /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugThread *pThread, /* [in] */ ICorDebugFunction *pFunction, /* [in] */ BOOL fAccurate); - - HRESULT ( STDMETHODCALLTYPE *BreakpointSetError )( + + HRESULT ( STDMETHODCALLTYPE *BreakpointSetError )( ICorDebugManagedCallback * This, /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugThread *pThread, /* [in] */ ICorDebugBreakpoint *pBreakpoint, /* [in] */ DWORD dwError); - + END_INTERFACE } ICorDebugManagedCallbackVtbl; @@ -3576,112 +3576,112 @@ EXTERN_C const IID IID_ICorDebugManagedCallback; CONST_VTBL struct ICorDebugManagedCallbackVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugManagedCallback_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugManagedCallback_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugManagedCallback_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugManagedCallback_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugManagedCallback_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugManagedCallback_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugManagedCallback_Breakpoint(This,pAppDomain,pThread,pBreakpoint) \ - ( (This)->lpVtbl -> Breakpoint(This,pAppDomain,pThread,pBreakpoint) ) +#define ICorDebugManagedCallback_Breakpoint(This,pAppDomain,pThread,pBreakpoint) \ + ( (This)->lpVtbl -> Breakpoint(This,pAppDomain,pThread,pBreakpoint) ) -#define ICorDebugManagedCallback_StepComplete(This,pAppDomain,pThread,pStepper,reason) \ - ( (This)->lpVtbl -> StepComplete(This,pAppDomain,pThread,pStepper,reason) ) +#define ICorDebugManagedCallback_StepComplete(This,pAppDomain,pThread,pStepper,reason) \ + ( (This)->lpVtbl -> StepComplete(This,pAppDomain,pThread,pStepper,reason) ) -#define ICorDebugManagedCallback_Break(This,pAppDomain,thread) \ - ( (This)->lpVtbl -> Break(This,pAppDomain,thread) ) +#define ICorDebugManagedCallback_Break(This,pAppDomain,thread) \ + ( (This)->lpVtbl -> Break(This,pAppDomain,thread) ) -#define ICorDebugManagedCallback_Exception(This,pAppDomain,pThread,unhandled) \ - ( (This)->lpVtbl -> Exception(This,pAppDomain,pThread,unhandled) ) +#define ICorDebugManagedCallback_Exception(This,pAppDomain,pThread,unhandled) \ + ( (This)->lpVtbl -> Exception(This,pAppDomain,pThread,unhandled) ) -#define ICorDebugManagedCallback_EvalComplete(This,pAppDomain,pThread,pEval) \ - ( (This)->lpVtbl -> EvalComplete(This,pAppDomain,pThread,pEval) ) +#define ICorDebugManagedCallback_EvalComplete(This,pAppDomain,pThread,pEval) \ + ( (This)->lpVtbl -> EvalComplete(This,pAppDomain,pThread,pEval) ) -#define ICorDebugManagedCallback_EvalException(This,pAppDomain,pThread,pEval) \ - ( (This)->lpVtbl -> EvalException(This,pAppDomain,pThread,pEval) ) +#define ICorDebugManagedCallback_EvalException(This,pAppDomain,pThread,pEval) \ + ( (This)->lpVtbl -> EvalException(This,pAppDomain,pThread,pEval) ) -#define ICorDebugManagedCallback_CreateProcess(This,pProcess) \ - ( (This)->lpVtbl -> CreateProcess(This,pProcess) ) +#define ICorDebugManagedCallback_CreateProcess(This,pProcess) \ + ( (This)->lpVtbl -> CreateProcess(This,pProcess) ) -#define ICorDebugManagedCallback_ExitProcess(This,pProcess) \ - ( (This)->lpVtbl -> ExitProcess(This,pProcess) ) +#define ICorDebugManagedCallback_ExitProcess(This,pProcess) \ + ( (This)->lpVtbl -> ExitProcess(This,pProcess) ) -#define ICorDebugManagedCallback_CreateThread(This,pAppDomain,thread) \ - ( (This)->lpVtbl -> CreateThread(This,pAppDomain,thread) ) +#define ICorDebugManagedCallback_CreateThread(This,pAppDomain,thread) \ + ( (This)->lpVtbl -> CreateThread(This,pAppDomain,thread) ) -#define ICorDebugManagedCallback_ExitThread(This,pAppDomain,thread) \ - ( (This)->lpVtbl -> ExitThread(This,pAppDomain,thread) ) +#define ICorDebugManagedCallback_ExitThread(This,pAppDomain,thread) \ + ( (This)->lpVtbl -> ExitThread(This,pAppDomain,thread) ) -#define ICorDebugManagedCallback_LoadModule(This,pAppDomain,pModule) \ - ( (This)->lpVtbl -> LoadModule(This,pAppDomain,pModule) ) +#define ICorDebugManagedCallback_LoadModule(This,pAppDomain,pModule) \ + ( (This)->lpVtbl -> LoadModule(This,pAppDomain,pModule) ) -#define ICorDebugManagedCallback_UnloadModule(This,pAppDomain,pModule) \ - ( (This)->lpVtbl -> UnloadModule(This,pAppDomain,pModule) ) +#define ICorDebugManagedCallback_UnloadModule(This,pAppDomain,pModule) \ + ( (This)->lpVtbl -> UnloadModule(This,pAppDomain,pModule) ) -#define ICorDebugManagedCallback_LoadClass(This,pAppDomain,c) \ - ( (This)->lpVtbl -> LoadClass(This,pAppDomain,c) ) +#define ICorDebugManagedCallback_LoadClass(This,pAppDomain,c) \ + ( (This)->lpVtbl -> LoadClass(This,pAppDomain,c) ) -#define ICorDebugManagedCallback_UnloadClass(This,pAppDomain,c) \ - ( (This)->lpVtbl -> UnloadClass(This,pAppDomain,c) ) +#define ICorDebugManagedCallback_UnloadClass(This,pAppDomain,c) \ + ( (This)->lpVtbl -> UnloadClass(This,pAppDomain,c) ) -#define ICorDebugManagedCallback_DebuggerError(This,pProcess,errorHR,errorCode) \ - ( (This)->lpVtbl -> DebuggerError(This,pProcess,errorHR,errorCode) ) +#define ICorDebugManagedCallback_DebuggerError(This,pProcess,errorHR,errorCode) \ + ( (This)->lpVtbl -> DebuggerError(This,pProcess,errorHR,errorCode) ) -#define ICorDebugManagedCallback_LogMessage(This,pAppDomain,pThread,lLevel,pLogSwitchName,pMessage) \ - ( (This)->lpVtbl -> LogMessage(This,pAppDomain,pThread,lLevel,pLogSwitchName,pMessage) ) +#define ICorDebugManagedCallback_LogMessage(This,pAppDomain,pThread,lLevel,pLogSwitchName,pMessage) \ + ( (This)->lpVtbl -> LogMessage(This,pAppDomain,pThread,lLevel,pLogSwitchName,pMessage) ) -#define ICorDebugManagedCallback_LogSwitch(This,pAppDomain,pThread,lLevel,ulReason,pLogSwitchName,pParentName) \ - ( (This)->lpVtbl -> LogSwitch(This,pAppDomain,pThread,lLevel,ulReason,pLogSwitchName,pParentName) ) +#define ICorDebugManagedCallback_LogSwitch(This,pAppDomain,pThread,lLevel,ulReason,pLogSwitchName,pParentName) \ + ( (This)->lpVtbl -> LogSwitch(This,pAppDomain,pThread,lLevel,ulReason,pLogSwitchName,pParentName) ) -#define ICorDebugManagedCallback_CreateAppDomain(This,pProcess,pAppDomain) \ - ( (This)->lpVtbl -> CreateAppDomain(This,pProcess,pAppDomain) ) +#define ICorDebugManagedCallback_CreateAppDomain(This,pProcess,pAppDomain) \ + ( (This)->lpVtbl -> CreateAppDomain(This,pProcess,pAppDomain) ) -#define ICorDebugManagedCallback_ExitAppDomain(This,pProcess,pAppDomain) \ - ( (This)->lpVtbl -> ExitAppDomain(This,pProcess,pAppDomain) ) +#define ICorDebugManagedCallback_ExitAppDomain(This,pProcess,pAppDomain) \ + ( (This)->lpVtbl -> ExitAppDomain(This,pProcess,pAppDomain) ) -#define ICorDebugManagedCallback_LoadAssembly(This,pAppDomain,pAssembly) \ - ( (This)->lpVtbl -> LoadAssembly(This,pAppDomain,pAssembly) ) +#define ICorDebugManagedCallback_LoadAssembly(This,pAppDomain,pAssembly) \ + ( (This)->lpVtbl -> LoadAssembly(This,pAppDomain,pAssembly) ) -#define ICorDebugManagedCallback_UnloadAssembly(This,pAppDomain,pAssembly) \ - ( (This)->lpVtbl -> UnloadAssembly(This,pAppDomain,pAssembly) ) +#define ICorDebugManagedCallback_UnloadAssembly(This,pAppDomain,pAssembly) \ + ( (This)->lpVtbl -> UnloadAssembly(This,pAppDomain,pAssembly) ) -#define ICorDebugManagedCallback_ControlCTrap(This,pProcess) \ - ( (This)->lpVtbl -> ControlCTrap(This,pProcess) ) +#define ICorDebugManagedCallback_ControlCTrap(This,pProcess) \ + ( (This)->lpVtbl -> ControlCTrap(This,pProcess) ) -#define ICorDebugManagedCallback_NameChange(This,pAppDomain,pThread) \ - ( (This)->lpVtbl -> NameChange(This,pAppDomain,pThread) ) +#define ICorDebugManagedCallback_NameChange(This,pAppDomain,pThread) \ + ( (This)->lpVtbl -> NameChange(This,pAppDomain,pThread) ) -#define ICorDebugManagedCallback_UpdateModuleSymbols(This,pAppDomain,pModule,pSymbolStream) \ - ( (This)->lpVtbl -> UpdateModuleSymbols(This,pAppDomain,pModule,pSymbolStream) ) +#define ICorDebugManagedCallback_UpdateModuleSymbols(This,pAppDomain,pModule,pSymbolStream) \ + ( (This)->lpVtbl -> UpdateModuleSymbols(This,pAppDomain,pModule,pSymbolStream) ) -#define ICorDebugManagedCallback_EditAndContinueRemap(This,pAppDomain,pThread,pFunction,fAccurate) \ - ( (This)->lpVtbl -> EditAndContinueRemap(This,pAppDomain,pThread,pFunction,fAccurate) ) +#define ICorDebugManagedCallback_EditAndContinueRemap(This,pAppDomain,pThread,pFunction,fAccurate) \ + ( (This)->lpVtbl -> EditAndContinueRemap(This,pAppDomain,pThread,pFunction,fAccurate) ) -#define ICorDebugManagedCallback_BreakpointSetError(This,pAppDomain,pThread,pBreakpoint,dwError) \ - ( (This)->lpVtbl -> BreakpointSetError(This,pAppDomain,pThread,pBreakpoint,dwError) ) +#define ICorDebugManagedCallback_BreakpointSetError(This,pAppDomain,pThread,pBreakpoint,dwError) \ + ( (This)->lpVtbl -> BreakpointSetError(This,pAppDomain,pThread,pBreakpoint,dwError) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugManagedCallback_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugManagedCallback_INTERFACE_DEFINED__ */ /* interface __MIDL_itf_cordebug_0000_0016 */ -/* [local] */ +/* [local] */ #pragma warning(pop) #pragma warning(push) @@ -3694,47 +3694,47 @@ extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0016_v0_0_s_ifspec; #define __ICorDebugManagedCallback3_INTERFACE_DEFINED__ /* interface ICorDebugManagedCallback3 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugManagedCallback3; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("264EA0FC-2591-49AA-868E-835E6515323F") ICorDebugManagedCallback3 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE CustomNotification( + virtual HRESULT STDMETHODCALLTYPE CustomNotification( /* [in] */ ICorDebugThread *pThread, /* [in] */ ICorDebugAppDomain *pAppDomain) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugManagedCallback3Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugManagedCallback3 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugManagedCallback3 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugManagedCallback3 * This); - - HRESULT ( STDMETHODCALLTYPE *CustomNotification )( + + HRESULT ( STDMETHODCALLTYPE *CustomNotification )( ICorDebugManagedCallback3 * This, /* [in] */ ICorDebugThread *pThread, /* [in] */ ICorDebugAppDomain *pAppDomain); - + END_INTERFACE } ICorDebugManagedCallback3Vtbl; @@ -3743,98 +3743,98 @@ EXTERN_C const IID IID_ICorDebugManagedCallback3; CONST_VTBL struct ICorDebugManagedCallback3Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugManagedCallback3_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugManagedCallback3_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugManagedCallback3_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugManagedCallback3_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugManagedCallback3_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugManagedCallback3_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugManagedCallback3_CustomNotification(This,pThread,pAppDomain) \ - ( (This)->lpVtbl -> CustomNotification(This,pThread,pAppDomain) ) +#define ICorDebugManagedCallback3_CustomNotification(This,pThread,pAppDomain) \ + ( (This)->lpVtbl -> CustomNotification(This,pThread,pAppDomain) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugManagedCallback3_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugManagedCallback3_INTERFACE_DEFINED__ */ #ifndef __ICorDebugManagedCallback4_INTERFACE_DEFINED__ #define __ICorDebugManagedCallback4_INTERFACE_DEFINED__ /* interface ICorDebugManagedCallback4 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugManagedCallback4; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("322911AE-16A5-49BA-84A3-ED69678138A3") ICorDebugManagedCallback4 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE BeforeGarbageCollection( + virtual HRESULT STDMETHODCALLTYPE BeforeGarbageCollection( /* [in] */ ICorDebugProcess *pProcess) = 0; - - virtual HRESULT STDMETHODCALLTYPE AfterGarbageCollection( + + virtual HRESULT STDMETHODCALLTYPE AfterGarbageCollection( /* [in] */ ICorDebugProcess *pProcess) = 0; - - virtual HRESULT STDMETHODCALLTYPE DataBreakpoint( + + virtual HRESULT STDMETHODCALLTYPE DataBreakpoint( /* [in] */ ICorDebugProcess *pProcess, /* [in] */ ICorDebugThread *pThread, /* [in] */ BYTE *pContext, /* [in] */ ULONG32 contextSize) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugManagedCallback4Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugManagedCallback4 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugManagedCallback4 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugManagedCallback4 * This); - - HRESULT ( STDMETHODCALLTYPE *BeforeGarbageCollection )( + + HRESULT ( STDMETHODCALLTYPE *BeforeGarbageCollection )( ICorDebugManagedCallback4 * This, /* [in] */ ICorDebugProcess *pProcess); - - HRESULT ( STDMETHODCALLTYPE *AfterGarbageCollection )( + + HRESULT ( STDMETHODCALLTYPE *AfterGarbageCollection )( ICorDebugManagedCallback4 * This, /* [in] */ ICorDebugProcess *pProcess); - - HRESULT ( STDMETHODCALLTYPE *DataBreakpoint )( + + HRESULT ( STDMETHODCALLTYPE *DataBreakpoint )( ICorDebugManagedCallback4 * This, /* [in] */ ICorDebugProcess *pProcess, /* [in] */ ICorDebugThread *pThread, /* [in] */ BYTE *pContext, /* [in] */ ULONG32 contextSize); - + END_INTERFACE } ICorDebugManagedCallback4Vtbl; @@ -3843,45 +3843,45 @@ EXTERN_C const IID IID_ICorDebugManagedCallback4; CONST_VTBL struct ICorDebugManagedCallback4Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugManagedCallback4_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugManagedCallback4_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugManagedCallback4_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugManagedCallback4_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugManagedCallback4_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugManagedCallback4_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugManagedCallback4_BeforeGarbageCollection(This,pProcess) \ - ( (This)->lpVtbl -> BeforeGarbageCollection(This,pProcess) ) +#define ICorDebugManagedCallback4_BeforeGarbageCollection(This,pProcess) \ + ( (This)->lpVtbl -> BeforeGarbageCollection(This,pProcess) ) -#define ICorDebugManagedCallback4_AfterGarbageCollection(This,pProcess) \ - ( (This)->lpVtbl -> AfterGarbageCollection(This,pProcess) ) +#define ICorDebugManagedCallback4_AfterGarbageCollection(This,pProcess) \ + ( (This)->lpVtbl -> AfterGarbageCollection(This,pProcess) ) -#define ICorDebugManagedCallback4_DataBreakpoint(This,pProcess,pThread,pContext,contextSize) \ - ( (This)->lpVtbl -> DataBreakpoint(This,pProcess,pThread,pContext,contextSize) ) +#define ICorDebugManagedCallback4_DataBreakpoint(This,pProcess,pThread,pContext,contextSize) \ + ( (This)->lpVtbl -> DataBreakpoint(This,pProcess,pThread,pContext,contextSize) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugManagedCallback4_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugManagedCallback4_INTERFACE_DEFINED__ */ /* interface __MIDL_itf_cordebug_0000_0018 */ -/* [local] */ +/* [local] */ -#pragma warning(disable:28718) +#pragma warning(disable:28718) extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0018_v0_0_c_ifspec; @@ -3891,130 +3891,130 @@ extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0018_v0_0_s_ifspec; #define __ICorDebugManagedCallback2_INTERFACE_DEFINED__ /* interface ICorDebugManagedCallback2 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ -typedef +typedef enum CorDebugExceptionCallbackType { - DEBUG_EXCEPTION_FIRST_CHANCE = 1, - DEBUG_EXCEPTION_USER_FIRST_CHANCE = 2, - DEBUG_EXCEPTION_CATCH_HANDLER_FOUND = 3, - DEBUG_EXCEPTION_UNHANDLED = 4 - } CorDebugExceptionCallbackType; + DEBUG_EXCEPTION_FIRST_CHANCE = 1, + DEBUG_EXCEPTION_USER_FIRST_CHANCE = 2, + DEBUG_EXCEPTION_CATCH_HANDLER_FOUND = 3, + DEBUG_EXCEPTION_UNHANDLED = 4 + } CorDebugExceptionCallbackType; -typedef +typedef enum CorDebugExceptionFlags { - DEBUG_EXCEPTION_NONE = 0, - DEBUG_EXCEPTION_CAN_BE_INTERCEPTED = 0x1 - } CorDebugExceptionFlags; + DEBUG_EXCEPTION_NONE = 0, + DEBUG_EXCEPTION_CAN_BE_INTERCEPTED = 0x1 + } CorDebugExceptionFlags; -typedef +typedef enum CorDebugExceptionUnwindCallbackType { - DEBUG_EXCEPTION_UNWIND_BEGIN = 1, - DEBUG_EXCEPTION_INTERCEPTED = 2 - } CorDebugExceptionUnwindCallbackType; + DEBUG_EXCEPTION_UNWIND_BEGIN = 1, + DEBUG_EXCEPTION_INTERCEPTED = 2 + } CorDebugExceptionUnwindCallbackType; EXTERN_C const IID IID_ICorDebugManagedCallback2; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("250E5EEA-DB5C-4C76-B6F3-8C46F12E3203") ICorDebugManagedCallback2 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE FunctionRemapOpportunity( + virtual HRESULT STDMETHODCALLTYPE FunctionRemapOpportunity( /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugThread *pThread, /* [in] */ ICorDebugFunction *pOldFunction, /* [in] */ ICorDebugFunction *pNewFunction, /* [in] */ ULONG32 oldILOffset) = 0; - - virtual HRESULT STDMETHODCALLTYPE CreateConnection( + + virtual HRESULT STDMETHODCALLTYPE CreateConnection( /* [in] */ ICorDebugProcess *pProcess, /* [in] */ CONNID dwConnectionId, /* [in] */ WCHAR *pConnName) = 0; - - virtual HRESULT STDMETHODCALLTYPE ChangeConnection( + + virtual HRESULT STDMETHODCALLTYPE ChangeConnection( /* [in] */ ICorDebugProcess *pProcess, /* [in] */ CONNID dwConnectionId) = 0; - - virtual HRESULT STDMETHODCALLTYPE DestroyConnection( + + virtual HRESULT STDMETHODCALLTYPE DestroyConnection( /* [in] */ ICorDebugProcess *pProcess, /* [in] */ CONNID dwConnectionId) = 0; - - virtual HRESULT STDMETHODCALLTYPE Exception( + + virtual HRESULT STDMETHODCALLTYPE Exception( /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugThread *pThread, /* [in] */ ICorDebugFrame *pFrame, /* [in] */ ULONG32 nOffset, /* [in] */ CorDebugExceptionCallbackType dwEventType, /* [in] */ DWORD dwFlags) = 0; - - virtual HRESULT STDMETHODCALLTYPE ExceptionUnwind( + + virtual HRESULT STDMETHODCALLTYPE ExceptionUnwind( /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugThread *pThread, /* [in] */ CorDebugExceptionUnwindCallbackType dwEventType, /* [in] */ DWORD dwFlags) = 0; - - virtual HRESULT STDMETHODCALLTYPE FunctionRemapComplete( + + virtual HRESULT STDMETHODCALLTYPE FunctionRemapComplete( /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugThread *pThread, /* [in] */ ICorDebugFunction *pFunction) = 0; - - virtual HRESULT STDMETHODCALLTYPE MDANotification( + + virtual HRESULT STDMETHODCALLTYPE MDANotification( /* [in] */ ICorDebugController *pController, /* [in] */ ICorDebugThread *pThread, /* [in] */ ICorDebugMDA *pMDA) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugManagedCallback2Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugManagedCallback2 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugManagedCallback2 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugManagedCallback2 * This); - - HRESULT ( STDMETHODCALLTYPE *FunctionRemapOpportunity )( + + HRESULT ( STDMETHODCALLTYPE *FunctionRemapOpportunity )( ICorDebugManagedCallback2 * This, /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugThread *pThread, /* [in] */ ICorDebugFunction *pOldFunction, /* [in] */ ICorDebugFunction *pNewFunction, /* [in] */ ULONG32 oldILOffset); - - HRESULT ( STDMETHODCALLTYPE *CreateConnection )( + + HRESULT ( STDMETHODCALLTYPE *CreateConnection )( ICorDebugManagedCallback2 * This, /* [in] */ ICorDebugProcess *pProcess, /* [in] */ CONNID dwConnectionId, /* [in] */ WCHAR *pConnName); - - HRESULT ( STDMETHODCALLTYPE *ChangeConnection )( + + HRESULT ( STDMETHODCALLTYPE *ChangeConnection )( ICorDebugManagedCallback2 * This, /* [in] */ ICorDebugProcess *pProcess, /* [in] */ CONNID dwConnectionId); - - HRESULT ( STDMETHODCALLTYPE *DestroyConnection )( + + HRESULT ( STDMETHODCALLTYPE *DestroyConnection )( ICorDebugManagedCallback2 * This, /* [in] */ ICorDebugProcess *pProcess, /* [in] */ CONNID dwConnectionId); - - HRESULT ( STDMETHODCALLTYPE *Exception )( + + HRESULT ( STDMETHODCALLTYPE *Exception )( ICorDebugManagedCallback2 * This, /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugThread *pThread, @@ -4022,26 +4022,26 @@ EXTERN_C const IID IID_ICorDebugManagedCallback2; /* [in] */ ULONG32 nOffset, /* [in] */ CorDebugExceptionCallbackType dwEventType, /* [in] */ DWORD dwFlags); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwind )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwind )( ICorDebugManagedCallback2 * This, /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugThread *pThread, /* [in] */ CorDebugExceptionUnwindCallbackType dwEventType, /* [in] */ DWORD dwFlags); - - HRESULT ( STDMETHODCALLTYPE *FunctionRemapComplete )( + + HRESULT ( STDMETHODCALLTYPE *FunctionRemapComplete )( ICorDebugManagedCallback2 * This, /* [in] */ ICorDebugAppDomain *pAppDomain, /* [in] */ ICorDebugThread *pThread, /* [in] */ ICorDebugFunction *pFunction); - - HRESULT ( STDMETHODCALLTYPE *MDANotification )( + + HRESULT ( STDMETHODCALLTYPE *MDANotification )( ICorDebugManagedCallback2 * This, /* [in] */ ICorDebugController *pController, /* [in] */ ICorDebugThread *pThread, /* [in] */ ICorDebugMDA *pMDA); - + END_INTERFACE } ICorDebugManagedCallback2Vtbl; @@ -4050,58 +4050,58 @@ EXTERN_C const IID IID_ICorDebugManagedCallback2; CONST_VTBL struct ICorDebugManagedCallback2Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugManagedCallback2_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugManagedCallback2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugManagedCallback2_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugManagedCallback2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugManagedCallback2_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugManagedCallback2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugManagedCallback2_FunctionRemapOpportunity(This,pAppDomain,pThread,pOldFunction,pNewFunction,oldILOffset) \ - ( (This)->lpVtbl -> FunctionRemapOpportunity(This,pAppDomain,pThread,pOldFunction,pNewFunction,oldILOffset) ) +#define ICorDebugManagedCallback2_FunctionRemapOpportunity(This,pAppDomain,pThread,pOldFunction,pNewFunction,oldILOffset) \ + ( (This)->lpVtbl -> FunctionRemapOpportunity(This,pAppDomain,pThread,pOldFunction,pNewFunction,oldILOffset) ) -#define ICorDebugManagedCallback2_CreateConnection(This,pProcess,dwConnectionId,pConnName) \ - ( (This)->lpVtbl -> CreateConnection(This,pProcess,dwConnectionId,pConnName) ) +#define ICorDebugManagedCallback2_CreateConnection(This,pProcess,dwConnectionId,pConnName) \ + ( (This)->lpVtbl -> CreateConnection(This,pProcess,dwConnectionId,pConnName) ) -#define ICorDebugManagedCallback2_ChangeConnection(This,pProcess,dwConnectionId) \ - ( (This)->lpVtbl -> ChangeConnection(This,pProcess,dwConnectionId) ) +#define ICorDebugManagedCallback2_ChangeConnection(This,pProcess,dwConnectionId) \ + ( (This)->lpVtbl -> ChangeConnection(This,pProcess,dwConnectionId) ) -#define ICorDebugManagedCallback2_DestroyConnection(This,pProcess,dwConnectionId) \ - ( (This)->lpVtbl -> DestroyConnection(This,pProcess,dwConnectionId) ) +#define ICorDebugManagedCallback2_DestroyConnection(This,pProcess,dwConnectionId) \ + ( (This)->lpVtbl -> DestroyConnection(This,pProcess,dwConnectionId) ) -#define ICorDebugManagedCallback2_Exception(This,pAppDomain,pThread,pFrame,nOffset,dwEventType,dwFlags) \ - ( (This)->lpVtbl -> Exception(This,pAppDomain,pThread,pFrame,nOffset,dwEventType,dwFlags) ) +#define ICorDebugManagedCallback2_Exception(This,pAppDomain,pThread,pFrame,nOffset,dwEventType,dwFlags) \ + ( (This)->lpVtbl -> Exception(This,pAppDomain,pThread,pFrame,nOffset,dwEventType,dwFlags) ) -#define ICorDebugManagedCallback2_ExceptionUnwind(This,pAppDomain,pThread,dwEventType,dwFlags) \ - ( (This)->lpVtbl -> ExceptionUnwind(This,pAppDomain,pThread,dwEventType,dwFlags) ) +#define ICorDebugManagedCallback2_ExceptionUnwind(This,pAppDomain,pThread,dwEventType,dwFlags) \ + ( (This)->lpVtbl -> ExceptionUnwind(This,pAppDomain,pThread,dwEventType,dwFlags) ) -#define ICorDebugManagedCallback2_FunctionRemapComplete(This,pAppDomain,pThread,pFunction) \ - ( (This)->lpVtbl -> FunctionRemapComplete(This,pAppDomain,pThread,pFunction) ) +#define ICorDebugManagedCallback2_FunctionRemapComplete(This,pAppDomain,pThread,pFunction) \ + ( (This)->lpVtbl -> FunctionRemapComplete(This,pAppDomain,pThread,pFunction) ) -#define ICorDebugManagedCallback2_MDANotification(This,pController,pThread,pMDA) \ - ( (This)->lpVtbl -> MDANotification(This,pController,pThread,pMDA) ) +#define ICorDebugManagedCallback2_MDANotification(This,pController,pThread,pMDA) \ + ( (This)->lpVtbl -> MDANotification(This,pController,pThread,pMDA) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugManagedCallback2_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugManagedCallback2_INTERFACE_DEFINED__ */ /* interface __MIDL_itf_cordebug_0000_0019 */ -/* [local] */ +/* [local] */ #pragma warning(pop) @@ -4113,47 +4113,47 @@ extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0019_v0_0_s_ifspec; #define __ICorDebugUnmanagedCallback_INTERFACE_DEFINED__ /* interface ICorDebugUnmanagedCallback */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugUnmanagedCallback; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("5263E909-8CB5-11d3-BD2F-0000F80849BD") ICorDebugUnmanagedCallback : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE DebugEvent( + virtual HRESULT STDMETHODCALLTYPE DebugEvent( /* [in] */ LPDEBUG_EVENT pDebugEvent, /* [in] */ BOOL fOutOfBand) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugUnmanagedCallbackVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugUnmanagedCallback * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugUnmanagedCallback * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugUnmanagedCallback * This); - - HRESULT ( STDMETHODCALLTYPE *DebugEvent )( + + HRESULT ( STDMETHODCALLTYPE *DebugEvent )( ICorDebugUnmanagedCallback * This, /* [in] */ LPDEBUG_EVENT pDebugEvent, /* [in] */ BOOL fOutOfBand); - + END_INTERFACE } ICorDebugUnmanagedCallbackVtbl; @@ -4162,53 +4162,53 @@ EXTERN_C const IID IID_ICorDebugUnmanagedCallback; CONST_VTBL struct ICorDebugUnmanagedCallbackVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugUnmanagedCallback_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugUnmanagedCallback_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugUnmanagedCallback_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugUnmanagedCallback_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugUnmanagedCallback_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugUnmanagedCallback_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugUnmanagedCallback_DebugEvent(This,pDebugEvent,fOutOfBand) \ - ( (This)->lpVtbl -> DebugEvent(This,pDebugEvent,fOutOfBand) ) +#define ICorDebugUnmanagedCallback_DebugEvent(This,pDebugEvent,fOutOfBand) \ + ( (This)->lpVtbl -> DebugEvent(This,pDebugEvent,fOutOfBand) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugUnmanagedCallback_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugUnmanagedCallback_INTERFACE_DEFINED__ */ /* interface __MIDL_itf_cordebug_0000_0020 */ -/* [local] */ +/* [local] */ -typedef +typedef enum CorDebugCreateProcessFlags { - DEBUG_NO_SPECIAL_OPTIONS = 0 - } CorDebugCreateProcessFlags; + DEBUG_NO_SPECIAL_OPTIONS = 0 + } CorDebugCreateProcessFlags; -typedef +typedef enum CorDebugHandleType { - HANDLE_STRONG = 1, - HANDLE_WEAK_TRACK_RESURRECTION = 2 - } CorDebugHandleType; + HANDLE_STRONG = 1, + HANDLE_WEAK_TRACK_RESURRECTION = 2 + } CorDebugHandleType; #pragma warning(push) -#pragma warning(disable:28718) +#pragma warning(disable:28718) extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0020_v0_0_c_ifspec; @@ -4218,28 +4218,28 @@ extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0020_v0_0_s_ifspec; #define __ICorDebug_INTERFACE_DEFINED__ /* interface ICorDebug */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebug; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("3d6f5f61-7538-11d3-8d5b-00104b35e7ef") ICorDebug : public IUnknown { public: virtual HRESULT STDMETHODCALLTYPE Initialize( void) = 0; - + virtual HRESULT STDMETHODCALLTYPE Terminate( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetManagedHandler( + + virtual HRESULT STDMETHODCALLTYPE SetManagedHandler( /* [in] */ ICorDebugManagedCallback *pCallback) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetUnmanagedHandler( + + virtual HRESULT STDMETHODCALLTYPE SetUnmanagedHandler( /* [in] */ ICorDebugUnmanagedCallback *pCallback) = 0; - - virtual HRESULT STDMETHODCALLTYPE CreateProcess( + + virtual HRESULT STDMETHODCALLTYPE CreateProcess( /* [in] */ LPCWSTR lpApplicationName, /* [in] */ LPWSTR lpCommandLine, /* [in] */ LPSECURITY_ATTRIBUTES lpProcessAttributes, @@ -4252,59 +4252,59 @@ EXTERN_C const IID IID_ICorDebug; /* [in] */ LPPROCESS_INFORMATION lpProcessInformation, /* [in] */ CorDebugCreateProcessFlags debuggingFlags, /* [out] */ ICorDebugProcess **ppProcess) = 0; - - virtual HRESULT STDMETHODCALLTYPE DebugActiveProcess( + + virtual HRESULT STDMETHODCALLTYPE DebugActiveProcess( /* [in] */ DWORD id, /* [in] */ BOOL win32Attach, /* [out] */ ICorDebugProcess **ppProcess) = 0; - - virtual HRESULT STDMETHODCALLTYPE EnumerateProcesses( + + virtual HRESULT STDMETHODCALLTYPE EnumerateProcesses( /* [out] */ ICorDebugProcessEnum **ppProcess) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetProcess( + + virtual HRESULT STDMETHODCALLTYPE GetProcess( /* [in] */ DWORD dwProcessId, /* [out] */ ICorDebugProcess **ppProcess) = 0; - - virtual HRESULT STDMETHODCALLTYPE CanLaunchOrAttach( + + virtual HRESULT STDMETHODCALLTYPE CanLaunchOrAttach( /* [in] */ DWORD dwProcessId, /* [in] */ BOOL win32DebuggingEnabled) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICorDebug * This, + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ICorDebug * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebug * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebug * This); - - HRESULT ( STDMETHODCALLTYPE *Initialize )( + + HRESULT ( STDMETHODCALLTYPE *Initialize )( ICorDebug * This); - - HRESULT ( STDMETHODCALLTYPE *Terminate )( + + HRESULT ( STDMETHODCALLTYPE *Terminate )( ICorDebug * This); - - HRESULT ( STDMETHODCALLTYPE *SetManagedHandler )( + + HRESULT ( STDMETHODCALLTYPE *SetManagedHandler )( ICorDebug * This, /* [in] */ ICorDebugManagedCallback *pCallback); - - HRESULT ( STDMETHODCALLTYPE *SetUnmanagedHandler )( + + HRESULT ( STDMETHODCALLTYPE *SetUnmanagedHandler )( ICorDebug * This, /* [in] */ ICorDebugUnmanagedCallback *pCallback); - - HRESULT ( STDMETHODCALLTYPE *CreateProcess )( + + HRESULT ( STDMETHODCALLTYPE *CreateProcess )( ICorDebug * This, /* [in] */ LPCWSTR lpApplicationName, /* [in] */ LPWSTR lpCommandLine, @@ -4318,27 +4318,27 @@ EXTERN_C const IID IID_ICorDebug; /* [in] */ LPPROCESS_INFORMATION lpProcessInformation, /* [in] */ CorDebugCreateProcessFlags debuggingFlags, /* [out] */ ICorDebugProcess **ppProcess); - - HRESULT ( STDMETHODCALLTYPE *DebugActiveProcess )( + + HRESULT ( STDMETHODCALLTYPE *DebugActiveProcess )( ICorDebug * This, /* [in] */ DWORD id, /* [in] */ BOOL win32Attach, /* [out] */ ICorDebugProcess **ppProcess); - - HRESULT ( STDMETHODCALLTYPE *EnumerateProcesses )( + + HRESULT ( STDMETHODCALLTYPE *EnumerateProcesses )( ICorDebug * This, /* [out] */ ICorDebugProcessEnum **ppProcess); - - HRESULT ( STDMETHODCALLTYPE *GetProcess )( + + HRESULT ( STDMETHODCALLTYPE *GetProcess )( ICorDebug * This, /* [in] */ DWORD dwProcessId, /* [out] */ ICorDebugProcess **ppProcess); - - HRESULT ( STDMETHODCALLTYPE *CanLaunchOrAttach )( + + HRESULT ( STDMETHODCALLTYPE *CanLaunchOrAttach )( ICorDebug * This, /* [in] */ DWORD dwProcessId, /* [in] */ BOOL win32DebuggingEnabled); - + END_INTERFACE } ICorDebugVtbl; @@ -4347,61 +4347,61 @@ EXTERN_C const IID IID_ICorDebug; CONST_VTBL struct ICorDebugVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebug_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebug_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebug_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebug_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebug_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebug_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebug_Initialize(This) \ - ( (This)->lpVtbl -> Initialize(This) ) +#define ICorDebug_Initialize(This) \ + ( (This)->lpVtbl -> Initialize(This) ) -#define ICorDebug_Terminate(This) \ - ( (This)->lpVtbl -> Terminate(This) ) +#define ICorDebug_Terminate(This) \ + ( (This)->lpVtbl -> Terminate(This) ) -#define ICorDebug_SetManagedHandler(This,pCallback) \ - ( (This)->lpVtbl -> SetManagedHandler(This,pCallback) ) +#define ICorDebug_SetManagedHandler(This,pCallback) \ + ( (This)->lpVtbl -> SetManagedHandler(This,pCallback) ) -#define ICorDebug_SetUnmanagedHandler(This,pCallback) \ - ( (This)->lpVtbl -> SetUnmanagedHandler(This,pCallback) ) +#define ICorDebug_SetUnmanagedHandler(This,pCallback) \ + ( (This)->lpVtbl -> SetUnmanagedHandler(This,pCallback) ) -#define ICorDebug_CreateProcess(This,lpApplicationName,lpCommandLine,lpProcessAttributes,lpThreadAttributes,bInheritHandles,dwCreationFlags,lpEnvironment,lpCurrentDirectory,lpStartupInfo,lpProcessInformation,debuggingFlags,ppProcess) \ - ( (This)->lpVtbl -> CreateProcess(This,lpApplicationName,lpCommandLine,lpProcessAttributes,lpThreadAttributes,bInheritHandles,dwCreationFlags,lpEnvironment,lpCurrentDirectory,lpStartupInfo,lpProcessInformation,debuggingFlags,ppProcess) ) +#define ICorDebug_CreateProcess(This,lpApplicationName,lpCommandLine,lpProcessAttributes,lpThreadAttributes,bInheritHandles,dwCreationFlags,lpEnvironment,lpCurrentDirectory,lpStartupInfo,lpProcessInformation,debuggingFlags,ppProcess) \ + ( (This)->lpVtbl -> CreateProcess(This,lpApplicationName,lpCommandLine,lpProcessAttributes,lpThreadAttributes,bInheritHandles,dwCreationFlags,lpEnvironment,lpCurrentDirectory,lpStartupInfo,lpProcessInformation,debuggingFlags,ppProcess) ) -#define ICorDebug_DebugActiveProcess(This,id,win32Attach,ppProcess) \ - ( (This)->lpVtbl -> DebugActiveProcess(This,id,win32Attach,ppProcess) ) +#define ICorDebug_DebugActiveProcess(This,id,win32Attach,ppProcess) \ + ( (This)->lpVtbl -> DebugActiveProcess(This,id,win32Attach,ppProcess) ) -#define ICorDebug_EnumerateProcesses(This,ppProcess) \ - ( (This)->lpVtbl -> EnumerateProcesses(This,ppProcess) ) +#define ICorDebug_EnumerateProcesses(This,ppProcess) \ + ( (This)->lpVtbl -> EnumerateProcesses(This,ppProcess) ) -#define ICorDebug_GetProcess(This,dwProcessId,ppProcess) \ - ( (This)->lpVtbl -> GetProcess(This,dwProcessId,ppProcess) ) +#define ICorDebug_GetProcess(This,dwProcessId,ppProcess) \ + ( (This)->lpVtbl -> GetProcess(This,dwProcessId,ppProcess) ) -#define ICorDebug_CanLaunchOrAttach(This,dwProcessId,win32DebuggingEnabled) \ - ( (This)->lpVtbl -> CanLaunchOrAttach(This,dwProcessId,win32DebuggingEnabled) ) +#define ICorDebug_CanLaunchOrAttach(This,dwProcessId,win32DebuggingEnabled) \ + ( (This)->lpVtbl -> CanLaunchOrAttach(This,dwProcessId,win32DebuggingEnabled) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebug_INTERFACE_DEFINED__ */ +#endif /* __ICorDebug_INTERFACE_DEFINED__ */ /* interface __MIDL_itf_cordebug_0000_0021 */ -/* [local] */ +/* [local] */ #pragma warning(pop) @@ -4413,53 +4413,53 @@ extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0021_v0_0_s_ifspec; #define __ICorDebugRemoteTarget_INTERFACE_DEFINED__ /* interface ICorDebugRemoteTarget */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugRemoteTarget; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("C3ED8383-5A49-4cf5-B4B7-01864D9E582D") ICorDebugRemoteTarget : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetHostName( + virtual HRESULT STDMETHODCALLTYPE GetHostName( /* [in] */ ULONG32 cchHostName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_ ULONG32 *pcchHostName, - /* [annotation][length_is][size_is][out] */ + /* [annotation][length_is][size_is][out] */ _Out_writes_to_opt_(cchHostName, *pcchHostName) WCHAR szHostName[ ]) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugRemoteTargetVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugRemoteTarget * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugRemoteTarget * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugRemoteTarget * This); - - HRESULT ( STDMETHODCALLTYPE *GetHostName )( + + HRESULT ( STDMETHODCALLTYPE *GetHostName )( ICorDebugRemoteTarget * This, /* [in] */ ULONG32 cchHostName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_ ULONG32 *pcchHostName, - /* [annotation][length_is][size_is][out] */ + /* [annotation][length_is][size_is][out] */ _Out_writes_to_opt_(cchHostName, *pcchHostName) WCHAR szHostName[ ]); - + END_INTERFACE } ICorDebugRemoteTargetVtbl; @@ -4468,54 +4468,54 @@ EXTERN_C const IID IID_ICorDebugRemoteTarget; CONST_VTBL struct ICorDebugRemoteTargetVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugRemoteTarget_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugRemoteTarget_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugRemoteTarget_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugRemoteTarget_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugRemoteTarget_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugRemoteTarget_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugRemoteTarget_GetHostName(This,cchHostName,pcchHostName,szHostName) \ - ( (This)->lpVtbl -> GetHostName(This,cchHostName,pcchHostName,szHostName) ) +#define ICorDebugRemoteTarget_GetHostName(This,cchHostName,pcchHostName,szHostName) \ + ( (This)->lpVtbl -> GetHostName(This,cchHostName,pcchHostName,szHostName) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugRemoteTarget_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugRemoteTarget_INTERFACE_DEFINED__ */ #ifndef __ICorDebugRemote_INTERFACE_DEFINED__ #define __ICorDebugRemote_INTERFACE_DEFINED__ /* interface ICorDebugRemote */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugRemote; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("D5EBB8E2-7BBE-4c1d-98A6-A3C04CBDEF64") ICorDebugRemote : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE CreateProcessEx( + virtual HRESULT STDMETHODCALLTYPE CreateProcessEx( /* [in] */ ICorDebugRemoteTarget *pRemoteTarget, /* [in] */ LPCWSTR lpApplicationName, - /* [annotation][in] */ + /* [annotation][in] */ _In_ LPWSTR lpCommandLine, /* [in] */ LPSECURITY_ATTRIBUTES lpProcessAttributes, /* [in] */ LPSECURITY_ATTRIBUTES lpThreadAttributes, @@ -4527,39 +4527,39 @@ EXTERN_C const IID IID_ICorDebugRemote; /* [in] */ LPPROCESS_INFORMATION lpProcessInformation, /* [in] */ CorDebugCreateProcessFlags debuggingFlags, /* [out] */ ICorDebugProcess **ppProcess) = 0; - - virtual HRESULT STDMETHODCALLTYPE DebugActiveProcessEx( + + virtual HRESULT STDMETHODCALLTYPE DebugActiveProcessEx( /* [in] */ ICorDebugRemoteTarget *pRemoteTarget, /* [in] */ DWORD dwProcessId, /* [in] */ BOOL fWin32Attach, /* [out] */ ICorDebugProcess **ppProcess) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugRemoteVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugRemote * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugRemote * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugRemote * This); - - HRESULT ( STDMETHODCALLTYPE *CreateProcessEx )( + + HRESULT ( STDMETHODCALLTYPE *CreateProcessEx )( ICorDebugRemote * This, /* [in] */ ICorDebugRemoteTarget *pRemoteTarget, /* [in] */ LPCWSTR lpApplicationName, - /* [annotation][in] */ + /* [annotation][in] */ _In_ LPWSTR lpCommandLine, /* [in] */ LPSECURITY_ATTRIBUTES lpProcessAttributes, /* [in] */ LPSECURITY_ATTRIBUTES lpThreadAttributes, @@ -4571,14 +4571,14 @@ EXTERN_C const IID IID_ICorDebugRemote; /* [in] */ LPPROCESS_INFORMATION lpProcessInformation, /* [in] */ CorDebugCreateProcessFlags debuggingFlags, /* [out] */ ICorDebugProcess **ppProcess); - - HRESULT ( STDMETHODCALLTYPE *DebugActiveProcessEx )( + + HRESULT ( STDMETHODCALLTYPE *DebugActiveProcessEx )( ICorDebugRemote * This, /* [in] */ ICorDebugRemoteTarget *pRemoteTarget, /* [in] */ DWORD dwProcessId, /* [in] */ BOOL fWin32Attach, /* [out] */ ICorDebugProcess **ppProcess); - + END_INTERFACE } ICorDebugRemoteVtbl; @@ -4587,40 +4587,40 @@ EXTERN_C const IID IID_ICorDebugRemote; CONST_VTBL struct ICorDebugRemoteVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugRemote_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugRemote_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugRemote_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugRemote_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugRemote_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugRemote_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugRemote_CreateProcessEx(This,pRemoteTarget,lpApplicationName,lpCommandLine,lpProcessAttributes,lpThreadAttributes,bInheritHandles,dwCreationFlags,lpEnvironment,lpCurrentDirectory,lpStartupInfo,lpProcessInformation,debuggingFlags,ppProcess) \ - ( (This)->lpVtbl -> CreateProcessEx(This,pRemoteTarget,lpApplicationName,lpCommandLine,lpProcessAttributes,lpThreadAttributes,bInheritHandles,dwCreationFlags,lpEnvironment,lpCurrentDirectory,lpStartupInfo,lpProcessInformation,debuggingFlags,ppProcess) ) +#define ICorDebugRemote_CreateProcessEx(This,pRemoteTarget,lpApplicationName,lpCommandLine,lpProcessAttributes,lpThreadAttributes,bInheritHandles,dwCreationFlags,lpEnvironment,lpCurrentDirectory,lpStartupInfo,lpProcessInformation,debuggingFlags,ppProcess) \ + ( (This)->lpVtbl -> CreateProcessEx(This,pRemoteTarget,lpApplicationName,lpCommandLine,lpProcessAttributes,lpThreadAttributes,bInheritHandles,dwCreationFlags,lpEnvironment,lpCurrentDirectory,lpStartupInfo,lpProcessInformation,debuggingFlags,ppProcess) ) -#define ICorDebugRemote_DebugActiveProcessEx(This,pRemoteTarget,dwProcessId,fWin32Attach,ppProcess) \ - ( (This)->lpVtbl -> DebugActiveProcessEx(This,pRemoteTarget,dwProcessId,fWin32Attach,ppProcess) ) +#define ICorDebugRemote_DebugActiveProcessEx(This,pRemoteTarget,dwProcessId,fWin32Attach,ppProcess) \ + ( (This)->lpVtbl -> DebugActiveProcessEx(This,pRemoteTarget,dwProcessId,fWin32Attach,ppProcess) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugRemote_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugRemote_INTERFACE_DEFINED__ */ /* interface __MIDL_itf_cordebug_0000_0023 */ -/* [local] */ +/* [local] */ typedef struct _COR_VERSION { @@ -4628,7 +4628,7 @@ typedef struct _COR_VERSION DWORD dwMinor; DWORD dwBuild; DWORD dwSubBuild; - } COR_VERSION; + } COR_VERSION; @@ -4639,128 +4639,128 @@ extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0023_v0_0_s_ifspec; #define __ICorDebug2_INTERFACE_DEFINED__ /* interface ICorDebug2 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ -typedef +typedef enum CorDebugInterfaceVersion { - CorDebugInvalidVersion = 0, - CorDebugVersion_1_0 = ( CorDebugInvalidVersion + 1 ) , - ver_ICorDebugManagedCallback = CorDebugVersion_1_0, - ver_ICorDebugUnmanagedCallback = CorDebugVersion_1_0, - ver_ICorDebug = CorDebugVersion_1_0, - ver_ICorDebugController = CorDebugVersion_1_0, - ver_ICorDebugAppDomain = CorDebugVersion_1_0, - ver_ICorDebugAssembly = CorDebugVersion_1_0, - ver_ICorDebugProcess = CorDebugVersion_1_0, - ver_ICorDebugBreakpoint = CorDebugVersion_1_0, - ver_ICorDebugFunctionBreakpoint = CorDebugVersion_1_0, - ver_ICorDebugModuleBreakpoint = CorDebugVersion_1_0, - ver_ICorDebugValueBreakpoint = CorDebugVersion_1_0, - ver_ICorDebugStepper = CorDebugVersion_1_0, - ver_ICorDebugRegisterSet = CorDebugVersion_1_0, - ver_ICorDebugThread = CorDebugVersion_1_0, - ver_ICorDebugChain = CorDebugVersion_1_0, - ver_ICorDebugFrame = CorDebugVersion_1_0, - ver_ICorDebugILFrame = CorDebugVersion_1_0, - ver_ICorDebugNativeFrame = CorDebugVersion_1_0, - ver_ICorDebugModule = CorDebugVersion_1_0, - ver_ICorDebugFunction = CorDebugVersion_1_0, - ver_ICorDebugCode = CorDebugVersion_1_0, - ver_ICorDebugClass = CorDebugVersion_1_0, - ver_ICorDebugEval = CorDebugVersion_1_0, - ver_ICorDebugValue = CorDebugVersion_1_0, - ver_ICorDebugGenericValue = CorDebugVersion_1_0, - ver_ICorDebugReferenceValue = CorDebugVersion_1_0, - ver_ICorDebugHeapValue = CorDebugVersion_1_0, - ver_ICorDebugObjectValue = CorDebugVersion_1_0, - ver_ICorDebugBoxValue = CorDebugVersion_1_0, - ver_ICorDebugStringValue = CorDebugVersion_1_0, - ver_ICorDebugArrayValue = CorDebugVersion_1_0, - ver_ICorDebugContext = CorDebugVersion_1_0, - ver_ICorDebugEnum = CorDebugVersion_1_0, - ver_ICorDebugObjectEnum = CorDebugVersion_1_0, - ver_ICorDebugBreakpointEnum = CorDebugVersion_1_0, - ver_ICorDebugStepperEnum = CorDebugVersion_1_0, - ver_ICorDebugProcessEnum = CorDebugVersion_1_0, - ver_ICorDebugThreadEnum = CorDebugVersion_1_0, - ver_ICorDebugFrameEnum = CorDebugVersion_1_0, - ver_ICorDebugChainEnum = CorDebugVersion_1_0, - ver_ICorDebugModuleEnum = CorDebugVersion_1_0, - ver_ICorDebugValueEnum = CorDebugVersion_1_0, - ver_ICorDebugCodeEnum = CorDebugVersion_1_0, - ver_ICorDebugTypeEnum = CorDebugVersion_1_0, - ver_ICorDebugErrorInfoEnum = CorDebugVersion_1_0, - ver_ICorDebugAppDomainEnum = CorDebugVersion_1_0, - ver_ICorDebugAssemblyEnum = CorDebugVersion_1_0, - ver_ICorDebugEditAndContinueErrorInfo = CorDebugVersion_1_0, - ver_ICorDebugEditAndContinueSnapshot = CorDebugVersion_1_0, - CorDebugVersion_1_1 = ( CorDebugVersion_1_0 + 1 ) , - CorDebugVersion_2_0 = ( CorDebugVersion_1_1 + 1 ) , - ver_ICorDebugManagedCallback2 = CorDebugVersion_2_0, - ver_ICorDebugAppDomain2 = CorDebugVersion_2_0, - ver_ICorDebugAssembly2 = CorDebugVersion_2_0, - ver_ICorDebugProcess2 = CorDebugVersion_2_0, - ver_ICorDebugStepper2 = CorDebugVersion_2_0, - ver_ICorDebugRegisterSet2 = CorDebugVersion_2_0, - ver_ICorDebugThread2 = CorDebugVersion_2_0, - ver_ICorDebugILFrame2 = CorDebugVersion_2_0, - ver_ICorDebugInternalFrame = CorDebugVersion_2_0, - ver_ICorDebugModule2 = CorDebugVersion_2_0, - ver_ICorDebugFunction2 = CorDebugVersion_2_0, - ver_ICorDebugCode2 = CorDebugVersion_2_0, - ver_ICorDebugClass2 = CorDebugVersion_2_0, - ver_ICorDebugValue2 = CorDebugVersion_2_0, - ver_ICorDebugEval2 = CorDebugVersion_2_0, - ver_ICorDebugObjectValue2 = CorDebugVersion_2_0, - CorDebugVersion_4_0 = ( CorDebugVersion_2_0 + 1 ) , - ver_ICorDebugThread3 = CorDebugVersion_4_0, - ver_ICorDebugThread4 = CorDebugVersion_4_0, - ver_ICorDebugStackWalk = CorDebugVersion_4_0, - ver_ICorDebugNativeFrame2 = CorDebugVersion_4_0, - ver_ICorDebugInternalFrame2 = CorDebugVersion_4_0, - ver_ICorDebugRuntimeUnwindableFrame = CorDebugVersion_4_0, - ver_ICorDebugHeapValue3 = CorDebugVersion_4_0, - ver_ICorDebugBlockingObjectEnum = CorDebugVersion_4_0, - ver_ICorDebugValue3 = CorDebugVersion_4_0, - CorDebugVersion_4_5 = ( CorDebugVersion_4_0 + 1 ) , - ver_ICorDebugComObjectValue = CorDebugVersion_4_5, - ver_ICorDebugAppDomain3 = CorDebugVersion_4_5, - ver_ICorDebugCode3 = CorDebugVersion_4_5, - ver_ICorDebugILFrame3 = CorDebugVersion_4_5, - CorDebugLatestVersion = CorDebugVersion_4_5 - } CorDebugInterfaceVersion; + CorDebugInvalidVersion = 0, + CorDebugVersion_1_0 = ( CorDebugInvalidVersion + 1 ) , + ver_ICorDebugManagedCallback = CorDebugVersion_1_0, + ver_ICorDebugUnmanagedCallback = CorDebugVersion_1_0, + ver_ICorDebug = CorDebugVersion_1_0, + ver_ICorDebugController = CorDebugVersion_1_0, + ver_ICorDebugAppDomain = CorDebugVersion_1_0, + ver_ICorDebugAssembly = CorDebugVersion_1_0, + ver_ICorDebugProcess = CorDebugVersion_1_0, + ver_ICorDebugBreakpoint = CorDebugVersion_1_0, + ver_ICorDebugFunctionBreakpoint = CorDebugVersion_1_0, + ver_ICorDebugModuleBreakpoint = CorDebugVersion_1_0, + ver_ICorDebugValueBreakpoint = CorDebugVersion_1_0, + ver_ICorDebugStepper = CorDebugVersion_1_0, + ver_ICorDebugRegisterSet = CorDebugVersion_1_0, + ver_ICorDebugThread = CorDebugVersion_1_0, + ver_ICorDebugChain = CorDebugVersion_1_0, + ver_ICorDebugFrame = CorDebugVersion_1_0, + ver_ICorDebugILFrame = CorDebugVersion_1_0, + ver_ICorDebugNativeFrame = CorDebugVersion_1_0, + ver_ICorDebugModule = CorDebugVersion_1_0, + ver_ICorDebugFunction = CorDebugVersion_1_0, + ver_ICorDebugCode = CorDebugVersion_1_0, + ver_ICorDebugClass = CorDebugVersion_1_0, + ver_ICorDebugEval = CorDebugVersion_1_0, + ver_ICorDebugValue = CorDebugVersion_1_0, + ver_ICorDebugGenericValue = CorDebugVersion_1_0, + ver_ICorDebugReferenceValue = CorDebugVersion_1_0, + ver_ICorDebugHeapValue = CorDebugVersion_1_0, + ver_ICorDebugObjectValue = CorDebugVersion_1_0, + ver_ICorDebugBoxValue = CorDebugVersion_1_0, + ver_ICorDebugStringValue = CorDebugVersion_1_0, + ver_ICorDebugArrayValue = CorDebugVersion_1_0, + ver_ICorDebugContext = CorDebugVersion_1_0, + ver_ICorDebugEnum = CorDebugVersion_1_0, + ver_ICorDebugObjectEnum = CorDebugVersion_1_0, + ver_ICorDebugBreakpointEnum = CorDebugVersion_1_0, + ver_ICorDebugStepperEnum = CorDebugVersion_1_0, + ver_ICorDebugProcessEnum = CorDebugVersion_1_0, + ver_ICorDebugThreadEnum = CorDebugVersion_1_0, + ver_ICorDebugFrameEnum = CorDebugVersion_1_0, + ver_ICorDebugChainEnum = CorDebugVersion_1_0, + ver_ICorDebugModuleEnum = CorDebugVersion_1_0, + ver_ICorDebugValueEnum = CorDebugVersion_1_0, + ver_ICorDebugCodeEnum = CorDebugVersion_1_0, + ver_ICorDebugTypeEnum = CorDebugVersion_1_0, + ver_ICorDebugErrorInfoEnum = CorDebugVersion_1_0, + ver_ICorDebugAppDomainEnum = CorDebugVersion_1_0, + ver_ICorDebugAssemblyEnum = CorDebugVersion_1_0, + ver_ICorDebugEditAndContinueErrorInfo = CorDebugVersion_1_0, + ver_ICorDebugEditAndContinueSnapshot = CorDebugVersion_1_0, + CorDebugVersion_1_1 = ( CorDebugVersion_1_0 + 1 ) , + CorDebugVersion_2_0 = ( CorDebugVersion_1_1 + 1 ) , + ver_ICorDebugManagedCallback2 = CorDebugVersion_2_0, + ver_ICorDebugAppDomain2 = CorDebugVersion_2_0, + ver_ICorDebugAssembly2 = CorDebugVersion_2_0, + ver_ICorDebugProcess2 = CorDebugVersion_2_0, + ver_ICorDebugStepper2 = CorDebugVersion_2_0, + ver_ICorDebugRegisterSet2 = CorDebugVersion_2_0, + ver_ICorDebugThread2 = CorDebugVersion_2_0, + ver_ICorDebugILFrame2 = CorDebugVersion_2_0, + ver_ICorDebugInternalFrame = CorDebugVersion_2_0, + ver_ICorDebugModule2 = CorDebugVersion_2_0, + ver_ICorDebugFunction2 = CorDebugVersion_2_0, + ver_ICorDebugCode2 = CorDebugVersion_2_0, + ver_ICorDebugClass2 = CorDebugVersion_2_0, + ver_ICorDebugValue2 = CorDebugVersion_2_0, + ver_ICorDebugEval2 = CorDebugVersion_2_0, + ver_ICorDebugObjectValue2 = CorDebugVersion_2_0, + CorDebugVersion_4_0 = ( CorDebugVersion_2_0 + 1 ) , + ver_ICorDebugThread3 = CorDebugVersion_4_0, + ver_ICorDebugThread4 = CorDebugVersion_4_0, + ver_ICorDebugStackWalk = CorDebugVersion_4_0, + ver_ICorDebugNativeFrame2 = CorDebugVersion_4_0, + ver_ICorDebugInternalFrame2 = CorDebugVersion_4_0, + ver_ICorDebugRuntimeUnwindableFrame = CorDebugVersion_4_0, + ver_ICorDebugHeapValue3 = CorDebugVersion_4_0, + ver_ICorDebugBlockingObjectEnum = CorDebugVersion_4_0, + ver_ICorDebugValue3 = CorDebugVersion_4_0, + CorDebugVersion_4_5 = ( CorDebugVersion_4_0 + 1 ) , + ver_ICorDebugComObjectValue = CorDebugVersion_4_5, + ver_ICorDebugAppDomain3 = CorDebugVersion_4_5, + ver_ICorDebugCode3 = CorDebugVersion_4_5, + ver_ICorDebugILFrame3 = CorDebugVersion_4_5, + CorDebugLatestVersion = CorDebugVersion_4_5 + } CorDebugInterfaceVersion; EXTERN_C const IID IID_ICorDebug2; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("ECCCCF2E-B286-4b3e-A983-860A8793D105") ICorDebug2 : public IUnknown { public: }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebug2Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebug2 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebug2 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebug2 * This); - + END_INTERFACE } ICorDebug2Vtbl; @@ -4769,41 +4769,41 @@ EXTERN_C const IID IID_ICorDebug2; CONST_VTBL struct ICorDebug2Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebug2_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebug2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebug2_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebug2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebug2_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebug2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebug2_INTERFACE_DEFINED__ */ +#endif /* __ICorDebug2_INTERFACE_DEFINED__ */ /* interface __MIDL_itf_cordebug_0000_0024 */ -/* [local] */ +/* [local] */ -typedef +typedef enum CorDebugThreadState { - THREAD_RUN = 0, - THREAD_SUSPEND = ( THREAD_RUN + 1 ) - } CorDebugThreadState; + THREAD_RUN = 0, + THREAD_SUSPEND = ( THREAD_RUN + 1 ) + } CorDebugThreadState; @@ -4814,118 +4814,118 @@ extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0024_v0_0_s_ifspec; #define __ICorDebugController_INTERFACE_DEFINED__ /* interface ICorDebugController */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugController; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("3d6f5f62-7538-11d3-8d5b-00104b35e7ef") ICorDebugController : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE Stop( + virtual HRESULT STDMETHODCALLTYPE Stop( /* [in] */ DWORD dwTimeoutIgnored) = 0; - - virtual HRESULT STDMETHODCALLTYPE Continue( + + virtual HRESULT STDMETHODCALLTYPE Continue( /* [in] */ BOOL fIsOutOfBand) = 0; - - virtual HRESULT STDMETHODCALLTYPE IsRunning( + + virtual HRESULT STDMETHODCALLTYPE IsRunning( /* [out] */ BOOL *pbRunning) = 0; - - virtual HRESULT STDMETHODCALLTYPE HasQueuedCallbacks( + + virtual HRESULT STDMETHODCALLTYPE HasQueuedCallbacks( /* [in] */ ICorDebugThread *pThread, /* [out] */ BOOL *pbQueued) = 0; - - virtual HRESULT STDMETHODCALLTYPE EnumerateThreads( + + virtual HRESULT STDMETHODCALLTYPE EnumerateThreads( /* [out] */ ICorDebugThreadEnum **ppThreads) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetAllThreadsDebugState( + + virtual HRESULT STDMETHODCALLTYPE SetAllThreadsDebugState( /* [in] */ CorDebugThreadState state, /* [in] */ ICorDebugThread *pExceptThisThread) = 0; - + virtual HRESULT STDMETHODCALLTYPE Detach( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE Terminate( + + virtual HRESULT STDMETHODCALLTYPE Terminate( /* [in] */ UINT exitCode) = 0; - - virtual HRESULT STDMETHODCALLTYPE CanCommitChanges( + + virtual HRESULT STDMETHODCALLTYPE CanCommitChanges( /* [in] */ ULONG cSnapshots, /* [size_is][in] */ ICorDebugEditAndContinueSnapshot *pSnapshots[ ], /* [out] */ ICorDebugErrorInfoEnum **pError) = 0; - - virtual HRESULT STDMETHODCALLTYPE CommitChanges( + + virtual HRESULT STDMETHODCALLTYPE CommitChanges( /* [in] */ ULONG cSnapshots, /* [size_is][in] */ ICorDebugEditAndContinueSnapshot *pSnapshots[ ], /* [out] */ ICorDebugErrorInfoEnum **pError) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugControllerVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugController * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugController * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugController * This); - - HRESULT ( STDMETHODCALLTYPE *Stop )( + + HRESULT ( STDMETHODCALLTYPE *Stop )( ICorDebugController * This, /* [in] */ DWORD dwTimeoutIgnored); - - HRESULT ( STDMETHODCALLTYPE *Continue )( + + HRESULT ( STDMETHODCALLTYPE *Continue )( ICorDebugController * This, /* [in] */ BOOL fIsOutOfBand); - - HRESULT ( STDMETHODCALLTYPE *IsRunning )( + + HRESULT ( STDMETHODCALLTYPE *IsRunning )( ICorDebugController * This, /* [out] */ BOOL *pbRunning); - - HRESULT ( STDMETHODCALLTYPE *HasQueuedCallbacks )( + + HRESULT ( STDMETHODCALLTYPE *HasQueuedCallbacks )( ICorDebugController * This, /* [in] */ ICorDebugThread *pThread, /* [out] */ BOOL *pbQueued); - - HRESULT ( STDMETHODCALLTYPE *EnumerateThreads )( + + HRESULT ( STDMETHODCALLTYPE *EnumerateThreads )( ICorDebugController * This, /* [out] */ ICorDebugThreadEnum **ppThreads); - - HRESULT ( STDMETHODCALLTYPE *SetAllThreadsDebugState )( + + HRESULT ( STDMETHODCALLTYPE *SetAllThreadsDebugState )( ICorDebugController * This, /* [in] */ CorDebugThreadState state, /* [in] */ ICorDebugThread *pExceptThisThread); - - HRESULT ( STDMETHODCALLTYPE *Detach )( + + HRESULT ( STDMETHODCALLTYPE *Detach )( ICorDebugController * This); - - HRESULT ( STDMETHODCALLTYPE *Terminate )( + + HRESULT ( STDMETHODCALLTYPE *Terminate )( ICorDebugController * This, /* [in] */ UINT exitCode); - - HRESULT ( STDMETHODCALLTYPE *CanCommitChanges )( + + HRESULT ( STDMETHODCALLTYPE *CanCommitChanges )( ICorDebugController * This, /* [in] */ ULONG cSnapshots, /* [size_is][in] */ ICorDebugEditAndContinueSnapshot *pSnapshots[ ], /* [out] */ ICorDebugErrorInfoEnum **pError); - - HRESULT ( STDMETHODCALLTYPE *CommitChanges )( + + HRESULT ( STDMETHODCALLTYPE *CommitChanges )( ICorDebugController * This, /* [in] */ ULONG cSnapshots, /* [size_is][in] */ ICorDebugEditAndContinueSnapshot *pSnapshots[ ], /* [out] */ ICorDebugErrorInfoEnum **pError); - + END_INTERFACE } ICorDebugControllerVtbl; @@ -4934,67 +4934,67 @@ EXTERN_C const IID IID_ICorDebugController; CONST_VTBL struct ICorDebugControllerVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugController_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugController_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugController_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugController_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugController_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugController_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugController_Stop(This,dwTimeoutIgnored) \ - ( (This)->lpVtbl -> Stop(This,dwTimeoutIgnored) ) +#define ICorDebugController_Stop(This,dwTimeoutIgnored) \ + ( (This)->lpVtbl -> Stop(This,dwTimeoutIgnored) ) -#define ICorDebugController_Continue(This,fIsOutOfBand) \ - ( (This)->lpVtbl -> Continue(This,fIsOutOfBand) ) +#define ICorDebugController_Continue(This,fIsOutOfBand) \ + ( (This)->lpVtbl -> Continue(This,fIsOutOfBand) ) -#define ICorDebugController_IsRunning(This,pbRunning) \ - ( (This)->lpVtbl -> IsRunning(This,pbRunning) ) +#define ICorDebugController_IsRunning(This,pbRunning) \ + ( (This)->lpVtbl -> IsRunning(This,pbRunning) ) -#define ICorDebugController_HasQueuedCallbacks(This,pThread,pbQueued) \ - ( (This)->lpVtbl -> HasQueuedCallbacks(This,pThread,pbQueued) ) +#define ICorDebugController_HasQueuedCallbacks(This,pThread,pbQueued) \ + ( (This)->lpVtbl -> HasQueuedCallbacks(This,pThread,pbQueued) ) -#define ICorDebugController_EnumerateThreads(This,ppThreads) \ - ( (This)->lpVtbl -> EnumerateThreads(This,ppThreads) ) +#define ICorDebugController_EnumerateThreads(This,ppThreads) \ + ( (This)->lpVtbl -> EnumerateThreads(This,ppThreads) ) -#define ICorDebugController_SetAllThreadsDebugState(This,state,pExceptThisThread) \ - ( (This)->lpVtbl -> SetAllThreadsDebugState(This,state,pExceptThisThread) ) +#define ICorDebugController_SetAllThreadsDebugState(This,state,pExceptThisThread) \ + ( (This)->lpVtbl -> SetAllThreadsDebugState(This,state,pExceptThisThread) ) -#define ICorDebugController_Detach(This) \ - ( (This)->lpVtbl -> Detach(This) ) +#define ICorDebugController_Detach(This) \ + ( (This)->lpVtbl -> Detach(This) ) -#define ICorDebugController_Terminate(This,exitCode) \ - ( (This)->lpVtbl -> Terminate(This,exitCode) ) +#define ICorDebugController_Terminate(This,exitCode) \ + ( (This)->lpVtbl -> Terminate(This,exitCode) ) -#define ICorDebugController_CanCommitChanges(This,cSnapshots,pSnapshots,pError) \ - ( (This)->lpVtbl -> CanCommitChanges(This,cSnapshots,pSnapshots,pError) ) +#define ICorDebugController_CanCommitChanges(This,cSnapshots,pSnapshots,pError) \ + ( (This)->lpVtbl -> CanCommitChanges(This,cSnapshots,pSnapshots,pError) ) -#define ICorDebugController_CommitChanges(This,cSnapshots,pSnapshots,pError) \ - ( (This)->lpVtbl -> CommitChanges(This,cSnapshots,pSnapshots,pError) ) +#define ICorDebugController_CommitChanges(This,cSnapshots,pSnapshots,pError) \ + ( (This)->lpVtbl -> CommitChanges(This,cSnapshots,pSnapshots,pError) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugController_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugController_INTERFACE_DEFINED__ */ /* interface __MIDL_itf_cordebug_0000_0025 */ -/* [local] */ +/* [local] */ #pragma warning(push) -#pragma warning(disable:28718) +#pragma warning(disable:28718) extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0025_v0_0_c_ifspec; @@ -5004,157 +5004,157 @@ extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0025_v0_0_s_ifspec; #define __ICorDebugAppDomain_INTERFACE_DEFINED__ /* interface ICorDebugAppDomain */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugAppDomain; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("3d6f5f63-7538-11d3-8d5b-00104b35e7ef") ICorDebugAppDomain : public ICorDebugController { public: - virtual HRESULT STDMETHODCALLTYPE GetProcess( + virtual HRESULT STDMETHODCALLTYPE GetProcess( /* [out] */ ICorDebugProcess **ppProcess) = 0; - - virtual HRESULT STDMETHODCALLTYPE EnumerateAssemblies( + + virtual HRESULT STDMETHODCALLTYPE EnumerateAssemblies( /* [out] */ ICorDebugAssemblyEnum **ppAssemblies) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetModuleFromMetaDataInterface( + + virtual HRESULT STDMETHODCALLTYPE GetModuleFromMetaDataInterface( /* [in] */ IUnknown *pIMetaData, /* [out] */ ICorDebugModule **ppModule) = 0; - - virtual HRESULT STDMETHODCALLTYPE EnumerateBreakpoints( + + virtual HRESULT STDMETHODCALLTYPE EnumerateBreakpoints( /* [out] */ ICorDebugBreakpointEnum **ppBreakpoints) = 0; - - virtual HRESULT STDMETHODCALLTYPE EnumerateSteppers( + + virtual HRESULT STDMETHODCALLTYPE EnumerateSteppers( /* [out] */ ICorDebugStepperEnum **ppSteppers) = 0; - - virtual HRESULT STDMETHODCALLTYPE IsAttached( + + virtual HRESULT STDMETHODCALLTYPE IsAttached( /* [out] */ BOOL *pbAttached) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetName( + + virtual HRESULT STDMETHODCALLTYPE GetName( /* [in] */ ULONG32 cchName, /* [out] */ ULONG32 *pcchName, /* [length_is][size_is][out] */ WCHAR szName[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetObject( + + virtual HRESULT STDMETHODCALLTYPE GetObject( /* [out] */ ICorDebugValue **ppObject) = 0; - + virtual HRESULT STDMETHODCALLTYPE Attach( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetID( + + virtual HRESULT STDMETHODCALLTYPE GetID( /* [out] */ ULONG32 *pId) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugAppDomainVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugAppDomain * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugAppDomain * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugAppDomain * This); - - HRESULT ( STDMETHODCALLTYPE *Stop )( + + HRESULT ( STDMETHODCALLTYPE *Stop )( ICorDebugAppDomain * This, /* [in] */ DWORD dwTimeoutIgnored); - - HRESULT ( STDMETHODCALLTYPE *Continue )( + + HRESULT ( STDMETHODCALLTYPE *Continue )( ICorDebugAppDomain * This, /* [in] */ BOOL fIsOutOfBand); - - HRESULT ( STDMETHODCALLTYPE *IsRunning )( + + HRESULT ( STDMETHODCALLTYPE *IsRunning )( ICorDebugAppDomain * This, /* [out] */ BOOL *pbRunning); - - HRESULT ( STDMETHODCALLTYPE *HasQueuedCallbacks )( + + HRESULT ( STDMETHODCALLTYPE *HasQueuedCallbacks )( ICorDebugAppDomain * This, /* [in] */ ICorDebugThread *pThread, /* [out] */ BOOL *pbQueued); - - HRESULT ( STDMETHODCALLTYPE *EnumerateThreads )( + + HRESULT ( STDMETHODCALLTYPE *EnumerateThreads )( ICorDebugAppDomain * This, /* [out] */ ICorDebugThreadEnum **ppThreads); - - HRESULT ( STDMETHODCALLTYPE *SetAllThreadsDebugState )( + + HRESULT ( STDMETHODCALLTYPE *SetAllThreadsDebugState )( ICorDebugAppDomain * This, /* [in] */ CorDebugThreadState state, /* [in] */ ICorDebugThread *pExceptThisThread); - - HRESULT ( STDMETHODCALLTYPE *Detach )( + + HRESULT ( STDMETHODCALLTYPE *Detach )( ICorDebugAppDomain * This); - - HRESULT ( STDMETHODCALLTYPE *Terminate )( + + HRESULT ( STDMETHODCALLTYPE *Terminate )( ICorDebugAppDomain * This, /* [in] */ UINT exitCode); - - HRESULT ( STDMETHODCALLTYPE *CanCommitChanges )( + + HRESULT ( STDMETHODCALLTYPE *CanCommitChanges )( ICorDebugAppDomain * This, /* [in] */ ULONG cSnapshots, /* [size_is][in] */ ICorDebugEditAndContinueSnapshot *pSnapshots[ ], /* [out] */ ICorDebugErrorInfoEnum **pError); - - HRESULT ( STDMETHODCALLTYPE *CommitChanges )( + + HRESULT ( STDMETHODCALLTYPE *CommitChanges )( ICorDebugAppDomain * This, /* [in] */ ULONG cSnapshots, /* [size_is][in] */ ICorDebugEditAndContinueSnapshot *pSnapshots[ ], /* [out] */ ICorDebugErrorInfoEnum **pError); - - HRESULT ( STDMETHODCALLTYPE *GetProcess )( + + HRESULT ( STDMETHODCALLTYPE *GetProcess )( ICorDebugAppDomain * This, /* [out] */ ICorDebugProcess **ppProcess); - - HRESULT ( STDMETHODCALLTYPE *EnumerateAssemblies )( + + HRESULT ( STDMETHODCALLTYPE *EnumerateAssemblies )( ICorDebugAppDomain * This, /* [out] */ ICorDebugAssemblyEnum **ppAssemblies); - - HRESULT ( STDMETHODCALLTYPE *GetModuleFromMetaDataInterface )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleFromMetaDataInterface )( ICorDebugAppDomain * This, /* [in] */ IUnknown *pIMetaData, /* [out] */ ICorDebugModule **ppModule); - - HRESULT ( STDMETHODCALLTYPE *EnumerateBreakpoints )( + + HRESULT ( STDMETHODCALLTYPE *EnumerateBreakpoints )( ICorDebugAppDomain * This, /* [out] */ ICorDebugBreakpointEnum **ppBreakpoints); - - HRESULT ( STDMETHODCALLTYPE *EnumerateSteppers )( + + HRESULT ( STDMETHODCALLTYPE *EnumerateSteppers )( ICorDebugAppDomain * This, /* [out] */ ICorDebugStepperEnum **ppSteppers); - - HRESULT ( STDMETHODCALLTYPE *IsAttached )( + + HRESULT ( STDMETHODCALLTYPE *IsAttached )( ICorDebugAppDomain * This, /* [out] */ BOOL *pbAttached); - - HRESULT ( STDMETHODCALLTYPE *GetName )( + + HRESULT ( STDMETHODCALLTYPE *GetName )( ICorDebugAppDomain * This, /* [in] */ ULONG32 cchName, /* [out] */ ULONG32 *pcchName, /* [length_is][size_is][out] */ WCHAR szName[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetObject )( + + HRESULT ( STDMETHODCALLTYPE *GetObject )( ICorDebugAppDomain * This, /* [out] */ ICorDebugValue **ppObject); - - HRESULT ( STDMETHODCALLTYPE *Attach )( + + HRESULT ( STDMETHODCALLTYPE *Attach )( ICorDebugAppDomain * This); - - HRESULT ( STDMETHODCALLTYPE *GetID )( + + HRESULT ( STDMETHODCALLTYPE *GetID )( ICorDebugAppDomain * This, /* [out] */ ULONG32 *pId); - + END_INTERFACE } ICorDebugAppDomainVtbl; @@ -5163,95 +5163,95 @@ EXTERN_C const IID IID_ICorDebugAppDomain; CONST_VTBL struct ICorDebugAppDomainVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugAppDomain_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugAppDomain_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugAppDomain_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugAppDomain_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugAppDomain_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugAppDomain_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugAppDomain_Stop(This,dwTimeoutIgnored) \ - ( (This)->lpVtbl -> Stop(This,dwTimeoutIgnored) ) +#define ICorDebugAppDomain_Stop(This,dwTimeoutIgnored) \ + ( (This)->lpVtbl -> Stop(This,dwTimeoutIgnored) ) -#define ICorDebugAppDomain_Continue(This,fIsOutOfBand) \ - ( (This)->lpVtbl -> Continue(This,fIsOutOfBand) ) +#define ICorDebugAppDomain_Continue(This,fIsOutOfBand) \ + ( (This)->lpVtbl -> Continue(This,fIsOutOfBand) ) -#define ICorDebugAppDomain_IsRunning(This,pbRunning) \ - ( (This)->lpVtbl -> IsRunning(This,pbRunning) ) +#define ICorDebugAppDomain_IsRunning(This,pbRunning) \ + ( (This)->lpVtbl -> IsRunning(This,pbRunning) ) -#define ICorDebugAppDomain_HasQueuedCallbacks(This,pThread,pbQueued) \ - ( (This)->lpVtbl -> HasQueuedCallbacks(This,pThread,pbQueued) ) +#define ICorDebugAppDomain_HasQueuedCallbacks(This,pThread,pbQueued) \ + ( (This)->lpVtbl -> HasQueuedCallbacks(This,pThread,pbQueued) ) -#define ICorDebugAppDomain_EnumerateThreads(This,ppThreads) \ - ( (This)->lpVtbl -> EnumerateThreads(This,ppThreads) ) +#define ICorDebugAppDomain_EnumerateThreads(This,ppThreads) \ + ( (This)->lpVtbl -> EnumerateThreads(This,ppThreads) ) -#define ICorDebugAppDomain_SetAllThreadsDebugState(This,state,pExceptThisThread) \ - ( (This)->lpVtbl -> SetAllThreadsDebugState(This,state,pExceptThisThread) ) +#define ICorDebugAppDomain_SetAllThreadsDebugState(This,state,pExceptThisThread) \ + ( (This)->lpVtbl -> SetAllThreadsDebugState(This,state,pExceptThisThread) ) -#define ICorDebugAppDomain_Detach(This) \ - ( (This)->lpVtbl -> Detach(This) ) +#define ICorDebugAppDomain_Detach(This) \ + ( (This)->lpVtbl -> Detach(This) ) -#define ICorDebugAppDomain_Terminate(This,exitCode) \ - ( (This)->lpVtbl -> Terminate(This,exitCode) ) +#define ICorDebugAppDomain_Terminate(This,exitCode) \ + ( (This)->lpVtbl -> Terminate(This,exitCode) ) -#define ICorDebugAppDomain_CanCommitChanges(This,cSnapshots,pSnapshots,pError) \ - ( (This)->lpVtbl -> CanCommitChanges(This,cSnapshots,pSnapshots,pError) ) +#define ICorDebugAppDomain_CanCommitChanges(This,cSnapshots,pSnapshots,pError) \ + ( (This)->lpVtbl -> CanCommitChanges(This,cSnapshots,pSnapshots,pError) ) -#define ICorDebugAppDomain_CommitChanges(This,cSnapshots,pSnapshots,pError) \ - ( (This)->lpVtbl -> CommitChanges(This,cSnapshots,pSnapshots,pError) ) +#define ICorDebugAppDomain_CommitChanges(This,cSnapshots,pSnapshots,pError) \ + ( (This)->lpVtbl -> CommitChanges(This,cSnapshots,pSnapshots,pError) ) -#define ICorDebugAppDomain_GetProcess(This,ppProcess) \ - ( (This)->lpVtbl -> GetProcess(This,ppProcess) ) +#define ICorDebugAppDomain_GetProcess(This,ppProcess) \ + ( (This)->lpVtbl -> GetProcess(This,ppProcess) ) -#define ICorDebugAppDomain_EnumerateAssemblies(This,ppAssemblies) \ - ( (This)->lpVtbl -> EnumerateAssemblies(This,ppAssemblies) ) +#define ICorDebugAppDomain_EnumerateAssemblies(This,ppAssemblies) \ + ( (This)->lpVtbl -> EnumerateAssemblies(This,ppAssemblies) ) -#define ICorDebugAppDomain_GetModuleFromMetaDataInterface(This,pIMetaData,ppModule) \ - ( (This)->lpVtbl -> GetModuleFromMetaDataInterface(This,pIMetaData,ppModule) ) +#define ICorDebugAppDomain_GetModuleFromMetaDataInterface(This,pIMetaData,ppModule) \ + ( (This)->lpVtbl -> GetModuleFromMetaDataInterface(This,pIMetaData,ppModule) ) -#define ICorDebugAppDomain_EnumerateBreakpoints(This,ppBreakpoints) \ - ( (This)->lpVtbl -> EnumerateBreakpoints(This,ppBreakpoints) ) +#define ICorDebugAppDomain_EnumerateBreakpoints(This,ppBreakpoints) \ + ( (This)->lpVtbl -> EnumerateBreakpoints(This,ppBreakpoints) ) -#define ICorDebugAppDomain_EnumerateSteppers(This,ppSteppers) \ - ( (This)->lpVtbl -> EnumerateSteppers(This,ppSteppers) ) +#define ICorDebugAppDomain_EnumerateSteppers(This,ppSteppers) \ + ( (This)->lpVtbl -> EnumerateSteppers(This,ppSteppers) ) -#define ICorDebugAppDomain_IsAttached(This,pbAttached) \ - ( (This)->lpVtbl -> IsAttached(This,pbAttached) ) +#define ICorDebugAppDomain_IsAttached(This,pbAttached) \ + ( (This)->lpVtbl -> IsAttached(This,pbAttached) ) -#define ICorDebugAppDomain_GetName(This,cchName,pcchName,szName) \ - ( (This)->lpVtbl -> GetName(This,cchName,pcchName,szName) ) +#define ICorDebugAppDomain_GetName(This,cchName,pcchName,szName) \ + ( (This)->lpVtbl -> GetName(This,cchName,pcchName,szName) ) -#define ICorDebugAppDomain_GetObject(This,ppObject) \ - ( (This)->lpVtbl -> GetObject(This,ppObject) ) +#define ICorDebugAppDomain_GetObject(This,ppObject) \ + ( (This)->lpVtbl -> GetObject(This,ppObject) ) -#define ICorDebugAppDomain_Attach(This) \ - ( (This)->lpVtbl -> Attach(This) ) +#define ICorDebugAppDomain_Attach(This) \ + ( (This)->lpVtbl -> Attach(This) ) -#define ICorDebugAppDomain_GetID(This,pId) \ - ( (This)->lpVtbl -> GetID(This,pId) ) +#define ICorDebugAppDomain_GetID(This,pId) \ + ( (This)->lpVtbl -> GetID(This,pId) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugAppDomain_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugAppDomain_INTERFACE_DEFINED__ */ /* interface __MIDL_itf_cordebug_0000_0026 */ -/* [local] */ +/* [local] */ #pragma warning(pop) @@ -5263,62 +5263,62 @@ extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0026_v0_0_s_ifspec; #define __ICorDebugAppDomain2_INTERFACE_DEFINED__ /* interface ICorDebugAppDomain2 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugAppDomain2; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("096E81D5-ECDA-4202-83F5-C65980A9EF75") ICorDebugAppDomain2 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetArrayOrPointerType( + virtual HRESULT STDMETHODCALLTYPE GetArrayOrPointerType( /* [in] */ CorElementType elementType, /* [in] */ ULONG32 nRank, /* [in] */ ICorDebugType *pTypeArg, /* [out] */ ICorDebugType **ppType) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetFunctionPointerType( + + virtual HRESULT STDMETHODCALLTYPE GetFunctionPointerType( /* [in] */ ULONG32 nTypeArgs, /* [size_is][in] */ ICorDebugType *ppTypeArgs[ ], /* [out] */ ICorDebugType **ppType) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugAppDomain2Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugAppDomain2 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugAppDomain2 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugAppDomain2 * This); - - HRESULT ( STDMETHODCALLTYPE *GetArrayOrPointerType )( + + HRESULT ( STDMETHODCALLTYPE *GetArrayOrPointerType )( ICorDebugAppDomain2 * This, /* [in] */ CorElementType elementType, /* [in] */ ULONG32 nRank, /* [in] */ ICorDebugType *pTypeArg, /* [out] */ ICorDebugType **ppType); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionPointerType )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionPointerType )( ICorDebugAppDomain2 * This, /* [in] */ ULONG32 nTypeArgs, /* [size_is][in] */ ICorDebugType *ppTypeArgs[ ], /* [out] */ ICorDebugType **ppType); - + END_INTERFACE } ICorDebugAppDomain2Vtbl; @@ -5327,100 +5327,100 @@ EXTERN_C const IID IID_ICorDebugAppDomain2; CONST_VTBL struct ICorDebugAppDomain2Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugAppDomain2_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugAppDomain2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugAppDomain2_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugAppDomain2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugAppDomain2_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugAppDomain2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugAppDomain2_GetArrayOrPointerType(This,elementType,nRank,pTypeArg,ppType) \ - ( (This)->lpVtbl -> GetArrayOrPointerType(This,elementType,nRank,pTypeArg,ppType) ) +#define ICorDebugAppDomain2_GetArrayOrPointerType(This,elementType,nRank,pTypeArg,ppType) \ + ( (This)->lpVtbl -> GetArrayOrPointerType(This,elementType,nRank,pTypeArg,ppType) ) -#define ICorDebugAppDomain2_GetFunctionPointerType(This,nTypeArgs,ppTypeArgs,ppType) \ - ( (This)->lpVtbl -> GetFunctionPointerType(This,nTypeArgs,ppTypeArgs,ppType) ) +#define ICorDebugAppDomain2_GetFunctionPointerType(This,nTypeArgs,ppTypeArgs,ppType) \ + ( (This)->lpVtbl -> GetFunctionPointerType(This,nTypeArgs,ppTypeArgs,ppType) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugAppDomain2_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugAppDomain2_INTERFACE_DEFINED__ */ #ifndef __ICorDebugEnum_INTERFACE_DEFINED__ #define __ICorDebugEnum_INTERFACE_DEFINED__ /* interface ICorDebugEnum */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugEnum; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("CC7BCB01-8A68-11d2-983C-0000F808342D") ICorDebugEnum : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE Skip( + virtual HRESULT STDMETHODCALLTYPE Skip( /* [in] */ ULONG celt) = 0; - + virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE Clone( + + virtual HRESULT STDMETHODCALLTYPE Clone( /* [out] */ ICorDebugEnum **ppEnum) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCount( + + virtual HRESULT STDMETHODCALLTYPE GetCount( /* [out] */ ULONG *pcelt) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugEnumVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugEnum * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugEnum * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Skip )( + + HRESULT ( STDMETHODCALLTYPE *Skip )( ICorDebugEnum * This, /* [in] */ ULONG celt); - - HRESULT ( STDMETHODCALLTYPE *Reset )( + + HRESULT ( STDMETHODCALLTYPE *Reset )( ICorDebugEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Clone )( + + HRESULT ( STDMETHODCALLTYPE *Clone )( ICorDebugEnum * This, /* [out] */ ICorDebugEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetCount )( + + HRESULT ( STDMETHODCALLTYPE *GetCount )( ICorDebugEnum * This, /* [out] */ ULONG *pcelt); - + END_INTERFACE } ICorDebugEnumVtbl; @@ -5429,106 +5429,106 @@ EXTERN_C const IID IID_ICorDebugEnum; CONST_VTBL struct ICorDebugEnumVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugEnum_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugEnum_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugEnum_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugEnum_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugEnum_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugEnum_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugEnum_Skip(This,celt) \ - ( (This)->lpVtbl -> Skip(This,celt) ) +#define ICorDebugEnum_Skip(This,celt) \ + ( (This)->lpVtbl -> Skip(This,celt) ) -#define ICorDebugEnum_Reset(This) \ - ( (This)->lpVtbl -> Reset(This) ) +#define ICorDebugEnum_Reset(This) \ + ( (This)->lpVtbl -> Reset(This) ) -#define ICorDebugEnum_Clone(This,ppEnum) \ - ( (This)->lpVtbl -> Clone(This,ppEnum) ) +#define ICorDebugEnum_Clone(This,ppEnum) \ + ( (This)->lpVtbl -> Clone(This,ppEnum) ) -#define ICorDebugEnum_GetCount(This,pcelt) \ - ( (This)->lpVtbl -> GetCount(This,pcelt) ) +#define ICorDebugEnum_GetCount(This,pcelt) \ + ( (This)->lpVtbl -> GetCount(This,pcelt) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugEnum_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugEnum_INTERFACE_DEFINED__ */ #ifndef __ICorDebugGuidToTypeEnum_INTERFACE_DEFINED__ #define __ICorDebugGuidToTypeEnum_INTERFACE_DEFINED__ /* interface ICorDebugGuidToTypeEnum */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugGuidToTypeEnum; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("6164D242-1015-4BD6-8CBE-D0DBD4B8275A") ICorDebugGuidToTypeEnum : public ICorDebugEnum { public: - virtual HRESULT STDMETHODCALLTYPE Next( + virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ ULONG celt, /* [length_is][size_is][out] */ CorDebugGuidToTypeMapping values[ ], /* [out] */ ULONG *pceltFetched) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugGuidToTypeEnumVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugGuidToTypeEnum * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugGuidToTypeEnum * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugGuidToTypeEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Skip )( + + HRESULT ( STDMETHODCALLTYPE *Skip )( ICorDebugGuidToTypeEnum * This, /* [in] */ ULONG celt); - - HRESULT ( STDMETHODCALLTYPE *Reset )( + + HRESULT ( STDMETHODCALLTYPE *Reset )( ICorDebugGuidToTypeEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Clone )( + + HRESULT ( STDMETHODCALLTYPE *Clone )( ICorDebugGuidToTypeEnum * This, /* [out] */ ICorDebugEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetCount )( + + HRESULT ( STDMETHODCALLTYPE *GetCount )( ICorDebugGuidToTypeEnum * This, /* [out] */ ULONG *pcelt); - - HRESULT ( STDMETHODCALLTYPE *Next )( + + HRESULT ( STDMETHODCALLTYPE *Next )( ICorDebugGuidToTypeEnum * This, /* [in] */ ULONG celt, /* [length_is][size_is][out] */ CorDebugGuidToTypeMapping values[ ], /* [out] */ ULONG *pceltFetched); - + END_INTERFACE } ICorDebugGuidToTypeEnumVtbl; @@ -5537,102 +5537,102 @@ EXTERN_C const IID IID_ICorDebugGuidToTypeEnum; CONST_VTBL struct ICorDebugGuidToTypeEnumVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugGuidToTypeEnum_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugGuidToTypeEnum_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugGuidToTypeEnum_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugGuidToTypeEnum_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugGuidToTypeEnum_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugGuidToTypeEnum_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugGuidToTypeEnum_Skip(This,celt) \ - ( (This)->lpVtbl -> Skip(This,celt) ) +#define ICorDebugGuidToTypeEnum_Skip(This,celt) \ + ( (This)->lpVtbl -> Skip(This,celt) ) -#define ICorDebugGuidToTypeEnum_Reset(This) \ - ( (This)->lpVtbl -> Reset(This) ) +#define ICorDebugGuidToTypeEnum_Reset(This) \ + ( (This)->lpVtbl -> Reset(This) ) -#define ICorDebugGuidToTypeEnum_Clone(This,ppEnum) \ - ( (This)->lpVtbl -> Clone(This,ppEnum) ) +#define ICorDebugGuidToTypeEnum_Clone(This,ppEnum) \ + ( (This)->lpVtbl -> Clone(This,ppEnum) ) -#define ICorDebugGuidToTypeEnum_GetCount(This,pcelt) \ - ( (This)->lpVtbl -> GetCount(This,pcelt) ) +#define ICorDebugGuidToTypeEnum_GetCount(This,pcelt) \ + ( (This)->lpVtbl -> GetCount(This,pcelt) ) -#define ICorDebugGuidToTypeEnum_Next(This,celt,values,pceltFetched) \ - ( (This)->lpVtbl -> Next(This,celt,values,pceltFetched) ) +#define ICorDebugGuidToTypeEnum_Next(This,celt,values,pceltFetched) \ + ( (This)->lpVtbl -> Next(This,celt,values,pceltFetched) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugGuidToTypeEnum_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugGuidToTypeEnum_INTERFACE_DEFINED__ */ #ifndef __ICorDebugAppDomain3_INTERFACE_DEFINED__ #define __ICorDebugAppDomain3_INTERFACE_DEFINED__ /* interface ICorDebugAppDomain3 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugAppDomain3; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("8CB96A16-B588-42E2-B71C-DD849FC2ECCC") ICorDebugAppDomain3 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetCachedWinRTTypesForIIDs( + virtual HRESULT STDMETHODCALLTYPE GetCachedWinRTTypesForIIDs( /* [in] */ ULONG32 cReqTypes, /* [size_is][in] */ GUID *iidsToResolve, /* [out] */ ICorDebugTypeEnum **ppTypesEnum) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCachedWinRTTypes( + + virtual HRESULT STDMETHODCALLTYPE GetCachedWinRTTypes( /* [out] */ ICorDebugGuidToTypeEnum **ppGuidToTypeEnum) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugAppDomain3Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugAppDomain3 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugAppDomain3 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugAppDomain3 * This); - - HRESULT ( STDMETHODCALLTYPE *GetCachedWinRTTypesForIIDs )( + + HRESULT ( STDMETHODCALLTYPE *GetCachedWinRTTypesForIIDs )( ICorDebugAppDomain3 * This, /* [in] */ ULONG32 cReqTypes, /* [size_is][in] */ GUID *iidsToResolve, /* [out] */ ICorDebugTypeEnum **ppTypesEnum); - - HRESULT ( STDMETHODCALLTYPE *GetCachedWinRTTypes )( + + HRESULT ( STDMETHODCALLTYPE *GetCachedWinRTTypes )( ICorDebugAppDomain3 * This, /* [out] */ ICorDebugGuidToTypeEnum **ppGuidToTypeEnum); - + END_INTERFACE } ICorDebugAppDomain3Vtbl; @@ -5641,83 +5641,83 @@ EXTERN_C const IID IID_ICorDebugAppDomain3; CONST_VTBL struct ICorDebugAppDomain3Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugAppDomain3_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugAppDomain3_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugAppDomain3_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugAppDomain3_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugAppDomain3_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugAppDomain3_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugAppDomain3_GetCachedWinRTTypesForIIDs(This,cReqTypes,iidsToResolve,ppTypesEnum) \ - ( (This)->lpVtbl -> GetCachedWinRTTypesForIIDs(This,cReqTypes,iidsToResolve,ppTypesEnum) ) +#define ICorDebugAppDomain3_GetCachedWinRTTypesForIIDs(This,cReqTypes,iidsToResolve,ppTypesEnum) \ + ( (This)->lpVtbl -> GetCachedWinRTTypesForIIDs(This,cReqTypes,iidsToResolve,ppTypesEnum) ) -#define ICorDebugAppDomain3_GetCachedWinRTTypes(This,ppGuidToTypeEnum) \ - ( (This)->lpVtbl -> GetCachedWinRTTypes(This,ppGuidToTypeEnum) ) +#define ICorDebugAppDomain3_GetCachedWinRTTypes(This,ppGuidToTypeEnum) \ + ( (This)->lpVtbl -> GetCachedWinRTTypes(This,ppGuidToTypeEnum) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugAppDomain3_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugAppDomain3_INTERFACE_DEFINED__ */ #ifndef __ICorDebugAppDomain4_INTERFACE_DEFINED__ #define __ICorDebugAppDomain4_INTERFACE_DEFINED__ /* interface ICorDebugAppDomain4 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugAppDomain4; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("FB99CC40-83BE-4724-AB3B-768E796EBAC2") ICorDebugAppDomain4 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetObjectForCCW( + virtual HRESULT STDMETHODCALLTYPE GetObjectForCCW( /* [in] */ CORDB_ADDRESS ccwPointer, /* [out] */ ICorDebugValue **ppManagedObject) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugAppDomain4Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugAppDomain4 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICorDebugAppDomain4 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugAppDomain4 * This); - - HRESULT ( STDMETHODCALLTYPE *GetObjectForCCW )( + + ULONG ( STDMETHODCALLTYPE *Release )( + ICorDebugAppDomain4 * This); + + HRESULT ( STDMETHODCALLTYPE *GetObjectForCCW )( ICorDebugAppDomain4 * This, /* [in] */ CORDB_ADDRESS ccwPointer, /* [out] */ ICorDebugValue **ppManagedObject); - + END_INTERFACE } ICorDebugAppDomain4Vtbl; @@ -5726,40 +5726,40 @@ EXTERN_C const IID IID_ICorDebugAppDomain4; CONST_VTBL struct ICorDebugAppDomain4Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugAppDomain4_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugAppDomain4_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugAppDomain4_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugAppDomain4_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugAppDomain4_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugAppDomain4_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugAppDomain4_GetObjectForCCW(This,ccwPointer,ppManagedObject) \ - ( (This)->lpVtbl -> GetObjectForCCW(This,ccwPointer,ppManagedObject) ) +#define ICorDebugAppDomain4_GetObjectForCCW(This,ccwPointer,ppManagedObject) \ + ( (This)->lpVtbl -> GetObjectForCCW(This,ccwPointer,ppManagedObject) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugAppDomain4_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugAppDomain4_INTERFACE_DEFINED__ */ /* interface __MIDL_itf_cordebug_0000_0030 */ -/* [local] */ +/* [local] */ #pragma warning(push) -#pragma warning(disable:28718) +#pragma warning(disable:28718) extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0030_v0_0_c_ifspec; @@ -5769,81 +5769,81 @@ extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0030_v0_0_s_ifspec; #define __ICorDebugAssembly_INTERFACE_DEFINED__ /* interface ICorDebugAssembly */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugAssembly; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("df59507c-d47a-459e-bce2-6427eac8fd06") ICorDebugAssembly : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetProcess( + virtual HRESULT STDMETHODCALLTYPE GetProcess( /* [out] */ ICorDebugProcess **ppProcess) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetAppDomain( + + virtual HRESULT STDMETHODCALLTYPE GetAppDomain( /* [out] */ ICorDebugAppDomain **ppAppDomain) = 0; - - virtual HRESULT STDMETHODCALLTYPE EnumerateModules( + + virtual HRESULT STDMETHODCALLTYPE EnumerateModules( /* [out] */ ICorDebugModuleEnum **ppModules) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCodeBase( + + virtual HRESULT STDMETHODCALLTYPE GetCodeBase( /* [in] */ ULONG32 cchName, /* [out] */ ULONG32 *pcchName, /* [length_is][size_is][out] */ WCHAR szName[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetName( + + virtual HRESULT STDMETHODCALLTYPE GetName( /* [in] */ ULONG32 cchName, /* [out] */ ULONG32 *pcchName, /* [length_is][size_is][out] */ WCHAR szName[ ]) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugAssemblyVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugAssembly * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugAssembly * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugAssembly * This); - - HRESULT ( STDMETHODCALLTYPE *GetProcess )( + + HRESULT ( STDMETHODCALLTYPE *GetProcess )( ICorDebugAssembly * This, /* [out] */ ICorDebugProcess **ppProcess); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomain )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomain )( ICorDebugAssembly * This, /* [out] */ ICorDebugAppDomain **ppAppDomain); - - HRESULT ( STDMETHODCALLTYPE *EnumerateModules )( + + HRESULT ( STDMETHODCALLTYPE *EnumerateModules )( ICorDebugAssembly * This, /* [out] */ ICorDebugModuleEnum **ppModules); - - HRESULT ( STDMETHODCALLTYPE *GetCodeBase )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeBase )( ICorDebugAssembly * This, /* [in] */ ULONG32 cchName, /* [out] */ ULONG32 *pcchName, /* [length_is][size_is][out] */ WCHAR szName[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetName )( + + HRESULT ( STDMETHODCALLTYPE *GetName )( ICorDebugAssembly * This, /* [in] */ ULONG32 cchName, /* [out] */ ULONG32 *pcchName, /* [length_is][size_is][out] */ WCHAR szName[ ]); - + END_INTERFACE } ICorDebugAssemblyVtbl; @@ -5852,49 +5852,49 @@ EXTERN_C const IID IID_ICorDebugAssembly; CONST_VTBL struct ICorDebugAssemblyVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugAssembly_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugAssembly_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugAssembly_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugAssembly_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugAssembly_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugAssembly_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugAssembly_GetProcess(This,ppProcess) \ - ( (This)->lpVtbl -> GetProcess(This,ppProcess) ) +#define ICorDebugAssembly_GetProcess(This,ppProcess) \ + ( (This)->lpVtbl -> GetProcess(This,ppProcess) ) -#define ICorDebugAssembly_GetAppDomain(This,ppAppDomain) \ - ( (This)->lpVtbl -> GetAppDomain(This,ppAppDomain) ) +#define ICorDebugAssembly_GetAppDomain(This,ppAppDomain) \ + ( (This)->lpVtbl -> GetAppDomain(This,ppAppDomain) ) -#define ICorDebugAssembly_EnumerateModules(This,ppModules) \ - ( (This)->lpVtbl -> EnumerateModules(This,ppModules) ) +#define ICorDebugAssembly_EnumerateModules(This,ppModules) \ + ( (This)->lpVtbl -> EnumerateModules(This,ppModules) ) -#define ICorDebugAssembly_GetCodeBase(This,cchName,pcchName,szName) \ - ( (This)->lpVtbl -> GetCodeBase(This,cchName,pcchName,szName) ) +#define ICorDebugAssembly_GetCodeBase(This,cchName,pcchName,szName) \ + ( (This)->lpVtbl -> GetCodeBase(This,cchName,pcchName,szName) ) -#define ICorDebugAssembly_GetName(This,cchName,pcchName,szName) \ - ( (This)->lpVtbl -> GetName(This,cchName,pcchName,szName) ) +#define ICorDebugAssembly_GetName(This,cchName,pcchName,szName) \ + ( (This)->lpVtbl -> GetName(This,cchName,pcchName,szName) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugAssembly_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugAssembly_INTERFACE_DEFINED__ */ /* interface __MIDL_itf_cordebug_0000_0031 */ -/* [local] */ +/* [local] */ #pragma warning(pop) @@ -5906,45 +5906,45 @@ extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0031_v0_0_s_ifspec; #define __ICorDebugAssembly2_INTERFACE_DEFINED__ /* interface ICorDebugAssembly2 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugAssembly2; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("426d1f9e-6dd4-44c8-aec7-26cdbaf4e398") ICorDebugAssembly2 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE IsFullyTrusted( + virtual HRESULT STDMETHODCALLTYPE IsFullyTrusted( /* [out] */ BOOL *pbFullyTrusted) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugAssembly2Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugAssembly2 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugAssembly2 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugAssembly2 * This); - - HRESULT ( STDMETHODCALLTYPE *IsFullyTrusted )( + + HRESULT ( STDMETHODCALLTYPE *IsFullyTrusted )( ICorDebugAssembly2 * This, /* [out] */ BOOL *pbFullyTrusted); - + END_INTERFACE } ICorDebugAssembly2Vtbl; @@ -5953,85 +5953,85 @@ EXTERN_C const IID IID_ICorDebugAssembly2; CONST_VTBL struct ICorDebugAssembly2Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugAssembly2_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugAssembly2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugAssembly2_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugAssembly2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugAssembly2_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugAssembly2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugAssembly2_IsFullyTrusted(This,pbFullyTrusted) \ - ( (This)->lpVtbl -> IsFullyTrusted(This,pbFullyTrusted) ) +#define ICorDebugAssembly2_IsFullyTrusted(This,pbFullyTrusted) \ + ( (This)->lpVtbl -> IsFullyTrusted(This,pbFullyTrusted) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugAssembly2_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugAssembly2_INTERFACE_DEFINED__ */ #ifndef __ICorDebugAssembly3_INTERFACE_DEFINED__ #define __ICorDebugAssembly3_INTERFACE_DEFINED__ /* interface ICorDebugAssembly3 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugAssembly3; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("76361AB2-8C86-4FE9-96F2-F73D8843570A") ICorDebugAssembly3 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetContainerAssembly( + virtual HRESULT STDMETHODCALLTYPE GetContainerAssembly( ICorDebugAssembly **ppAssembly) = 0; - - virtual HRESULT STDMETHODCALLTYPE EnumerateContainedAssemblies( + + virtual HRESULT STDMETHODCALLTYPE EnumerateContainedAssemblies( ICorDebugAssemblyEnum **ppAssemblies) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugAssembly3Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugAssembly3 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugAssembly3 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugAssembly3 * This); - - HRESULT ( STDMETHODCALLTYPE *GetContainerAssembly )( + + HRESULT ( STDMETHODCALLTYPE *GetContainerAssembly )( ICorDebugAssembly3 * This, ICorDebugAssembly **ppAssembly); - - HRESULT ( STDMETHODCALLTYPE *EnumerateContainedAssemblies )( + + HRESULT ( STDMETHODCALLTYPE *EnumerateContainedAssemblies )( ICorDebugAssembly3 * This, ICorDebugAssemblyEnum **ppAssemblies); - + END_INTERFACE } ICorDebugAssembly3Vtbl; @@ -6040,40 +6040,40 @@ EXTERN_C const IID IID_ICorDebugAssembly3; CONST_VTBL struct ICorDebugAssembly3Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugAssembly3_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugAssembly3_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugAssembly3_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugAssembly3_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugAssembly3_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugAssembly3_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugAssembly3_GetContainerAssembly(This,ppAssembly) \ - ( (This)->lpVtbl -> GetContainerAssembly(This,ppAssembly) ) +#define ICorDebugAssembly3_GetContainerAssembly(This,ppAssembly) \ + ( (This)->lpVtbl -> GetContainerAssembly(This,ppAssembly) ) -#define ICorDebugAssembly3_EnumerateContainedAssemblies(This,ppAssemblies) \ - ( (This)->lpVtbl -> EnumerateContainedAssemblies(This,ppAssemblies) ) +#define ICorDebugAssembly3_EnumerateContainedAssemblies(This,ppAssemblies) \ + ( (This)->lpVtbl -> EnumerateContainedAssemblies(This,ppAssemblies) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugAssembly3_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugAssembly3_INTERFACE_DEFINED__ */ /* interface __MIDL_itf_cordebug_0000_0033 */ -/* [local] */ +/* [local] */ #ifndef _DEF_COR_TYPEID_ #define _DEF_COR_TYPEID_ @@ -6081,7 +6081,7 @@ typedef struct COR_TYPEID { UINT64 token1; UINT64 token2; - } COR_TYPEID; + } COR_TYPEID; #endif // _DEF_COR_TYPEID_ typedef struct _COR_HEAPOBJECT @@ -6089,7 +6089,7 @@ typedef struct _COR_HEAPOBJECT CORDB_ADDRESS address; ULONG64 size; COR_TYPEID type; - } COR_HEAPOBJECT; + } COR_HEAPOBJECT; @@ -6100,64 +6100,64 @@ extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0033_v0_0_s_ifspec; #define __ICorDebugHeapEnum_INTERFACE_DEFINED__ /* interface ICorDebugHeapEnum */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugHeapEnum; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("76D7DAB8-D044-11DF-9A15-7E29DFD72085") ICorDebugHeapEnum : public ICorDebugEnum { public: - virtual HRESULT STDMETHODCALLTYPE Next( + virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ ULONG celt, /* [length_is][size_is][out] */ COR_HEAPOBJECT objects[ ], /* [out] */ ULONG *pceltFetched) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugHeapEnumVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugHeapEnum * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugHeapEnum * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugHeapEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Skip )( + + HRESULT ( STDMETHODCALLTYPE *Skip )( ICorDebugHeapEnum * This, /* [in] */ ULONG celt); - - HRESULT ( STDMETHODCALLTYPE *Reset )( + + HRESULT ( STDMETHODCALLTYPE *Reset )( ICorDebugHeapEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Clone )( + + HRESULT ( STDMETHODCALLTYPE *Clone )( ICorDebugHeapEnum * This, /* [out] */ ICorDebugEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetCount )( + + HRESULT ( STDMETHODCALLTYPE *GetCount )( ICorDebugHeapEnum * This, /* [out] */ ULONG *pcelt); - - HRESULT ( STDMETHODCALLTYPE *Next )( + + HRESULT ( STDMETHODCALLTYPE *Next )( ICorDebugHeapEnum * This, /* [in] */ ULONG celt, /* [length_is][size_is][out] */ COR_HEAPOBJECT objects[ ], /* [out] */ ULONG *pceltFetched); - + END_INTERFACE } ICorDebugHeapEnumVtbl; @@ -6166,59 +6166,60 @@ EXTERN_C const IID IID_ICorDebugHeapEnum; CONST_VTBL struct ICorDebugHeapEnumVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugHeapEnum_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugHeapEnum_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugHeapEnum_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugHeapEnum_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugHeapEnum_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugHeapEnum_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugHeapEnum_Skip(This,celt) \ - ( (This)->lpVtbl -> Skip(This,celt) ) +#define ICorDebugHeapEnum_Skip(This,celt) \ + ( (This)->lpVtbl -> Skip(This,celt) ) -#define ICorDebugHeapEnum_Reset(This) \ - ( (This)->lpVtbl -> Reset(This) ) +#define ICorDebugHeapEnum_Reset(This) \ + ( (This)->lpVtbl -> Reset(This) ) -#define ICorDebugHeapEnum_Clone(This,ppEnum) \ - ( (This)->lpVtbl -> Clone(This,ppEnum) ) +#define ICorDebugHeapEnum_Clone(This,ppEnum) \ + ( (This)->lpVtbl -> Clone(This,ppEnum) ) -#define ICorDebugHeapEnum_GetCount(This,pcelt) \ - ( (This)->lpVtbl -> GetCount(This,pcelt) ) +#define ICorDebugHeapEnum_GetCount(This,pcelt) \ + ( (This)->lpVtbl -> GetCount(This,pcelt) ) -#define ICorDebugHeapEnum_Next(This,celt,objects,pceltFetched) \ - ( (This)->lpVtbl -> Next(This,celt,objects,pceltFetched) ) +#define ICorDebugHeapEnum_Next(This,celt,objects,pceltFetched) \ + ( (This)->lpVtbl -> Next(This,celt,objects,pceltFetched) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugHeapEnum_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugHeapEnum_INTERFACE_DEFINED__ */ /* interface __MIDL_itf_cordebug_0000_0034 */ -/* [local] */ +/* [local] */ -typedef +typedef enum CorDebugGenerationTypes { - CorDebug_Gen0 = 0, - CorDebug_Gen1 = 1, - CorDebug_Gen2 = 2, - CorDebug_LOH = 3 - } CorDebugGenerationTypes; + CorDebug_Gen0 = 0, + CorDebug_Gen1 = 1, + CorDebug_Gen2 = 2, + CorDebug_LOH = 3, + CorDebug_POH = 4 + } CorDebugGenerationTypes; typedef struct _COR_SEGMENT { @@ -6226,14 +6227,14 @@ typedef struct _COR_SEGMENT CORDB_ADDRESS end; CorDebugGenerationTypes type; ULONG heap; - } COR_SEGMENT; + } COR_SEGMENT; -typedef +typedef enum CorDebugGCType { - CorDebugWorkstationGC = 0, - CorDebugServerGC = ( CorDebugWorkstationGC + 1 ) - } CorDebugGCType; + CorDebugWorkstationGC = 0, + CorDebugServerGC = ( CorDebugWorkstationGC + 1 ) + } CorDebugGCType; typedef struct _COR_HEAPINFO { @@ -6242,7 +6243,7 @@ typedef struct _COR_HEAPINFO DWORD numHeaps; BOOL concurrent; CorDebugGCType gcType; - } COR_HEAPINFO; + } COR_HEAPINFO; @@ -6253,64 +6254,64 @@ extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0034_v0_0_s_ifspec; #define __ICorDebugHeapSegmentEnum_INTERFACE_DEFINED__ /* interface ICorDebugHeapSegmentEnum */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugHeapSegmentEnum; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("A2FA0F8E-D045-11DF-AC8E-CE2ADFD72085") ICorDebugHeapSegmentEnum : public ICorDebugEnum { public: - virtual HRESULT STDMETHODCALLTYPE Next( + virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ ULONG celt, /* [length_is][size_is][out] */ COR_SEGMENT segments[ ], /* [out] */ ULONG *pceltFetched) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugHeapSegmentEnumVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugHeapSegmentEnum * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugHeapSegmentEnum * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugHeapSegmentEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Skip )( + + HRESULT ( STDMETHODCALLTYPE *Skip )( ICorDebugHeapSegmentEnum * This, /* [in] */ ULONG celt); - - HRESULT ( STDMETHODCALLTYPE *Reset )( + + HRESULT ( STDMETHODCALLTYPE *Reset )( ICorDebugHeapSegmentEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Clone )( + + HRESULT ( STDMETHODCALLTYPE *Clone )( ICorDebugHeapSegmentEnum * This, /* [out] */ ICorDebugEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetCount )( + + HRESULT ( STDMETHODCALLTYPE *GetCount )( ICorDebugHeapSegmentEnum * This, /* [out] */ ULONG *pcelt); - - HRESULT ( STDMETHODCALLTYPE *Next )( + + HRESULT ( STDMETHODCALLTYPE *Next )( ICorDebugHeapSegmentEnum * This, /* [in] */ ULONG celt, /* [length_is][size_is][out] */ COR_SEGMENT segments[ ], /* [out] */ ULONG *pceltFetched); - + END_INTERFACE } ICorDebugHeapSegmentEnumVtbl; @@ -6319,71 +6320,71 @@ EXTERN_C const IID IID_ICorDebugHeapSegmentEnum; CONST_VTBL struct ICorDebugHeapSegmentEnumVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugHeapSegmentEnum_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugHeapSegmentEnum_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugHeapSegmentEnum_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugHeapSegmentEnum_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugHeapSegmentEnum_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugHeapSegmentEnum_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugHeapSegmentEnum_Skip(This,celt) \ - ( (This)->lpVtbl -> Skip(This,celt) ) +#define ICorDebugHeapSegmentEnum_Skip(This,celt) \ + ( (This)->lpVtbl -> Skip(This,celt) ) -#define ICorDebugHeapSegmentEnum_Reset(This) \ - ( (This)->lpVtbl -> Reset(This) ) +#define ICorDebugHeapSegmentEnum_Reset(This) \ + ( (This)->lpVtbl -> Reset(This) ) -#define ICorDebugHeapSegmentEnum_Clone(This,ppEnum) \ - ( (This)->lpVtbl -> Clone(This,ppEnum) ) +#define ICorDebugHeapSegmentEnum_Clone(This,ppEnum) \ + ( (This)->lpVtbl -> Clone(This,ppEnum) ) -#define ICorDebugHeapSegmentEnum_GetCount(This,pcelt) \ - ( (This)->lpVtbl -> GetCount(This,pcelt) ) +#define ICorDebugHeapSegmentEnum_GetCount(This,pcelt) \ + ( (This)->lpVtbl -> GetCount(This,pcelt) ) -#define ICorDebugHeapSegmentEnum_Next(This,celt,segments,pceltFetched) \ - ( (This)->lpVtbl -> Next(This,celt,segments,pceltFetched) ) +#define ICorDebugHeapSegmentEnum_Next(This,celt,segments,pceltFetched) \ + ( (This)->lpVtbl -> Next(This,celt,segments,pceltFetched) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugHeapSegmentEnum_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugHeapSegmentEnum_INTERFACE_DEFINED__ */ /* interface __MIDL_itf_cordebug_0000_0035 */ -/* [local] */ +/* [local] */ -typedef +typedef enum CorGCReferenceType { - CorHandleStrong = ( 1 << 0 ) , - CorHandleStrongPinning = ( 1 << 1 ) , - CorHandleWeakShort = ( 1 << 2 ) , - CorHandleWeakLong = ( 1 << 3 ) , - CorHandleWeakRefCount = ( 1 << 4 ) , - CorHandleStrongRefCount = ( 1 << 5 ) , - CorHandleStrongDependent = ( 1 << 6 ) , - CorHandleStrongAsyncPinned = ( 1 << 7 ) , - CorHandleStrongSizedByref = ( 1 << 8 ) , - CorHandleWeakNativeCom = ( 1 << 9 ) , - CorHandleWeakWinRT = CorHandleWeakNativeCom, - CorReferenceStack = 0x80000001, - CorReferenceFinalizer = 80000002, - CorHandleStrongOnly = 0x1e3, - CorHandleWeakOnly = 0x21c, - CorHandleAll = 0x7fffffff - } CorGCReferenceType; + CorHandleStrong = ( 1 << 0 ) , + CorHandleStrongPinning = ( 1 << 1 ) , + CorHandleWeakShort = ( 1 << 2 ) , + CorHandleWeakLong = ( 1 << 3 ) , + CorHandleWeakRefCount = ( 1 << 4 ) , + CorHandleStrongRefCount = ( 1 << 5 ) , + CorHandleStrongDependent = ( 1 << 6 ) , + CorHandleStrongAsyncPinned = ( 1 << 7 ) , + CorHandleStrongSizedByref = ( 1 << 8 ) , + CorHandleWeakNativeCom = ( 1 << 9 ) , + CorHandleWeakWinRT = CorHandleWeakNativeCom, + CorReferenceStack = 0x80000001, + CorReferenceFinalizer = 80000002, + CorHandleStrongOnly = 0x1e3, + CorHandleWeakOnly = 0x21c, + CorHandleAll = 0x7fffffff + } CorGCReferenceType; #ifndef _DEF_COR_GC_REFERENCE_ #define _DEF_COR_GC_REFERENCE_ @@ -6393,7 +6394,7 @@ typedef struct COR_GC_REFERENCE ICorDebugValue *Location; CorGCReferenceType Type; UINT64 ExtraData; - } COR_GC_REFERENCE; + } COR_GC_REFERENCE; #endif // _DEF_COR_GC_REFERENCE_ @@ -6405,64 +6406,64 @@ extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0035_v0_0_s_ifspec; #define __ICorDebugGCReferenceEnum_INTERFACE_DEFINED__ /* interface ICorDebugGCReferenceEnum */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugGCReferenceEnum; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("7F3C24D3-7E1D-4245-AC3A-F72F8859C80C") ICorDebugGCReferenceEnum : public ICorDebugEnum { public: - virtual HRESULT STDMETHODCALLTYPE Next( + virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ ULONG celt, /* [length_is][size_is][out] */ COR_GC_REFERENCE roots[ ], /* [out] */ ULONG *pceltFetched) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugGCReferenceEnumVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugGCReferenceEnum * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugGCReferenceEnum * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugGCReferenceEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Skip )( + + HRESULT ( STDMETHODCALLTYPE *Skip )( ICorDebugGCReferenceEnum * This, /* [in] */ ULONG celt); - - HRESULT ( STDMETHODCALLTYPE *Reset )( + + HRESULT ( STDMETHODCALLTYPE *Reset )( ICorDebugGCReferenceEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Clone )( + + HRESULT ( STDMETHODCALLTYPE *Clone )( ICorDebugGCReferenceEnum * This, /* [out] */ ICorDebugEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetCount )( + + HRESULT ( STDMETHODCALLTYPE *GetCount )( ICorDebugGCReferenceEnum * This, /* [out] */ ULONG *pcelt); - - HRESULT ( STDMETHODCALLTYPE *Next )( + + HRESULT ( STDMETHODCALLTYPE *Next )( ICorDebugGCReferenceEnum * This, /* [in] */ ULONG celt, /* [length_is][size_is][out] */ COR_GC_REFERENCE roots[ ], /* [out] */ ULONG *pceltFetched); - + END_INTERFACE } ICorDebugGCReferenceEnumVtbl; @@ -6471,50 +6472,50 @@ EXTERN_C const IID IID_ICorDebugGCReferenceEnum; CONST_VTBL struct ICorDebugGCReferenceEnumVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugGCReferenceEnum_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugGCReferenceEnum_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugGCReferenceEnum_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugGCReferenceEnum_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugGCReferenceEnum_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugGCReferenceEnum_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugGCReferenceEnum_Skip(This,celt) \ - ( (This)->lpVtbl -> Skip(This,celt) ) +#define ICorDebugGCReferenceEnum_Skip(This,celt) \ + ( (This)->lpVtbl -> Skip(This,celt) ) -#define ICorDebugGCReferenceEnum_Reset(This) \ - ( (This)->lpVtbl -> Reset(This) ) +#define ICorDebugGCReferenceEnum_Reset(This) \ + ( (This)->lpVtbl -> Reset(This) ) -#define ICorDebugGCReferenceEnum_Clone(This,ppEnum) \ - ( (This)->lpVtbl -> Clone(This,ppEnum) ) +#define ICorDebugGCReferenceEnum_Clone(This,ppEnum) \ + ( (This)->lpVtbl -> Clone(This,ppEnum) ) -#define ICorDebugGCReferenceEnum_GetCount(This,pcelt) \ - ( (This)->lpVtbl -> GetCount(This,pcelt) ) +#define ICorDebugGCReferenceEnum_GetCount(This,pcelt) \ + ( (This)->lpVtbl -> GetCount(This,pcelt) ) -#define ICorDebugGCReferenceEnum_Next(This,celt,roots,pceltFetched) \ - ( (This)->lpVtbl -> Next(This,celt,roots,pceltFetched) ) +#define ICorDebugGCReferenceEnum_Next(This,celt,roots,pceltFetched) \ + ( (This)->lpVtbl -> Next(This,celt,roots,pceltFetched) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugGCReferenceEnum_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugGCReferenceEnum_INTERFACE_DEFINED__ */ /* interface __MIDL_itf_cordebug_0000_0036 */ -/* [local] */ +/* [local] */ #ifndef _DEF_COR_ARRAY_LAYOUT_ #define _DEF_COR_ARRAY_LAYOUT_ @@ -6528,7 +6529,7 @@ typedef struct COR_ARRAY_LAYOUT ULONG32 rankSize; ULONG32 numRanks; ULONG32 rankOffset; - } COR_ARRAY_LAYOUT; + } COR_ARRAY_LAYOUT; #endif // _DEF_COR_ARRAY_LAYOUT_ #ifndef _DEF_COR_TYPE_LAYOUT_ @@ -6540,7 +6541,7 @@ typedef struct COR_TYPE_LAYOUT ULONG32 numFields; ULONG32 boxOffset; CorElementType type; - } COR_TYPE_LAYOUT; + } COR_TYPE_LAYOUT; #endif // _DEF_COR_TYPE_LAYOUT_ #ifndef _DEF_COR_FIELD_ @@ -6551,11 +6552,11 @@ typedef struct COR_FIELD ULONG32 offset; COR_TYPEID id; CorElementType fieldType; - } COR_FIELD; + } COR_FIELD; #endif // _DEF_COR_FIELD_ #pragma warning(push) -#pragma warning(disable:28718) +#pragma warning(disable:28718) extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0036_v0_0_c_ifspec; @@ -6565,234 +6566,234 @@ extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0036_v0_0_s_ifspec; #define __ICorDebugProcess_INTERFACE_DEFINED__ /* interface ICorDebugProcess */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugProcess; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("3d6f5f64-7538-11d3-8d5b-00104b35e7ef") ICorDebugProcess : public ICorDebugController { public: - virtual HRESULT STDMETHODCALLTYPE GetID( + virtual HRESULT STDMETHODCALLTYPE GetID( /* [out] */ DWORD *pdwProcessId) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetHandle( + + virtual HRESULT STDMETHODCALLTYPE GetHandle( /* [out] */ HPROCESS *phProcessHandle) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetThread( + + virtual HRESULT STDMETHODCALLTYPE GetThread( /* [in] */ DWORD dwThreadId, /* [out] */ ICorDebugThread **ppThread) = 0; - - virtual HRESULT STDMETHODCALLTYPE EnumerateObjects( + + virtual HRESULT STDMETHODCALLTYPE EnumerateObjects( /* [out] */ ICorDebugObjectEnum **ppObjects) = 0; - - virtual HRESULT STDMETHODCALLTYPE IsTransitionStub( + + virtual HRESULT STDMETHODCALLTYPE IsTransitionStub( /* [in] */ CORDB_ADDRESS address, /* [out] */ BOOL *pbTransitionStub) = 0; - - virtual HRESULT STDMETHODCALLTYPE IsOSSuspended( + + virtual HRESULT STDMETHODCALLTYPE IsOSSuspended( /* [in] */ DWORD threadID, /* [out] */ BOOL *pbSuspended) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetThreadContext( + + virtual HRESULT STDMETHODCALLTYPE GetThreadContext( /* [in] */ DWORD threadID, /* [in] */ ULONG32 contextSize, /* [size_is][length_is][out][in] */ BYTE context[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetThreadContext( + + virtual HRESULT STDMETHODCALLTYPE SetThreadContext( /* [in] */ DWORD threadID, /* [in] */ ULONG32 contextSize, /* [size_is][length_is][in] */ BYTE context[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE ReadMemory( + + virtual HRESULT STDMETHODCALLTYPE ReadMemory( /* [in] */ CORDB_ADDRESS address, /* [in] */ DWORD size, /* [length_is][size_is][out] */ BYTE buffer[ ], /* [out] */ SIZE_T *read) = 0; - - virtual HRESULT STDMETHODCALLTYPE WriteMemory( + + virtual HRESULT STDMETHODCALLTYPE WriteMemory( /* [in] */ CORDB_ADDRESS address, /* [in] */ DWORD size, /* [size_is][in] */ BYTE buffer[ ], /* [out] */ SIZE_T *written) = 0; - - virtual HRESULT STDMETHODCALLTYPE ClearCurrentException( + + virtual HRESULT STDMETHODCALLTYPE ClearCurrentException( /* [in] */ DWORD threadID) = 0; - - virtual HRESULT STDMETHODCALLTYPE EnableLogMessages( + + virtual HRESULT STDMETHODCALLTYPE EnableLogMessages( /* [in] */ BOOL fOnOff) = 0; - - virtual HRESULT STDMETHODCALLTYPE ModifyLogSwitch( - /* [annotation][in] */ + + virtual HRESULT STDMETHODCALLTYPE ModifyLogSwitch( + /* [annotation][in] */ _In_ WCHAR *pLogSwitchName, /* [in] */ LONG lLevel) = 0; - - virtual HRESULT STDMETHODCALLTYPE EnumerateAppDomains( + + virtual HRESULT STDMETHODCALLTYPE EnumerateAppDomains( /* [out] */ ICorDebugAppDomainEnum **ppAppDomains) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetObject( + + virtual HRESULT STDMETHODCALLTYPE GetObject( /* [out] */ ICorDebugValue **ppObject) = 0; - - virtual HRESULT STDMETHODCALLTYPE ThreadForFiberCookie( + + virtual HRESULT STDMETHODCALLTYPE ThreadForFiberCookie( /* [in] */ DWORD fiberCookie, /* [out] */ ICorDebugThread **ppThread) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetHelperThreadID( + + virtual HRESULT STDMETHODCALLTYPE GetHelperThreadID( /* [out] */ DWORD *pThreadID) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugProcessVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugProcess * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugProcess * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugProcess * This); - - HRESULT ( STDMETHODCALLTYPE *Stop )( + + HRESULT ( STDMETHODCALLTYPE *Stop )( ICorDebugProcess * This, /* [in] */ DWORD dwTimeoutIgnored); - - HRESULT ( STDMETHODCALLTYPE *Continue )( + + HRESULT ( STDMETHODCALLTYPE *Continue )( ICorDebugProcess * This, /* [in] */ BOOL fIsOutOfBand); - - HRESULT ( STDMETHODCALLTYPE *IsRunning )( + + HRESULT ( STDMETHODCALLTYPE *IsRunning )( ICorDebugProcess * This, /* [out] */ BOOL *pbRunning); - - HRESULT ( STDMETHODCALLTYPE *HasQueuedCallbacks )( + + HRESULT ( STDMETHODCALLTYPE *HasQueuedCallbacks )( ICorDebugProcess * This, /* [in] */ ICorDebugThread *pThread, /* [out] */ BOOL *pbQueued); - - HRESULT ( STDMETHODCALLTYPE *EnumerateThreads )( + + HRESULT ( STDMETHODCALLTYPE *EnumerateThreads )( ICorDebugProcess * This, /* [out] */ ICorDebugThreadEnum **ppThreads); - - HRESULT ( STDMETHODCALLTYPE *SetAllThreadsDebugState )( + + HRESULT ( STDMETHODCALLTYPE *SetAllThreadsDebugState )( ICorDebugProcess * This, /* [in] */ CorDebugThreadState state, /* [in] */ ICorDebugThread *pExceptThisThread); - - HRESULT ( STDMETHODCALLTYPE *Detach )( + + HRESULT ( STDMETHODCALLTYPE *Detach )( ICorDebugProcess * This); - - HRESULT ( STDMETHODCALLTYPE *Terminate )( + + HRESULT ( STDMETHODCALLTYPE *Terminate )( ICorDebugProcess * This, /* [in] */ UINT exitCode); - - HRESULT ( STDMETHODCALLTYPE *CanCommitChanges )( + + HRESULT ( STDMETHODCALLTYPE *CanCommitChanges )( ICorDebugProcess * This, /* [in] */ ULONG cSnapshots, /* [size_is][in] */ ICorDebugEditAndContinueSnapshot *pSnapshots[ ], /* [out] */ ICorDebugErrorInfoEnum **pError); - - HRESULT ( STDMETHODCALLTYPE *CommitChanges )( + + HRESULT ( STDMETHODCALLTYPE *CommitChanges )( ICorDebugProcess * This, /* [in] */ ULONG cSnapshots, /* [size_is][in] */ ICorDebugEditAndContinueSnapshot *pSnapshots[ ], /* [out] */ ICorDebugErrorInfoEnum **pError); - - HRESULT ( STDMETHODCALLTYPE *GetID )( + + HRESULT ( STDMETHODCALLTYPE *GetID )( ICorDebugProcess * This, /* [out] */ DWORD *pdwProcessId); - - HRESULT ( STDMETHODCALLTYPE *GetHandle )( + + HRESULT ( STDMETHODCALLTYPE *GetHandle )( ICorDebugProcess * This, /* [out] */ HPROCESS *phProcessHandle); - - HRESULT ( STDMETHODCALLTYPE *GetThread )( + + HRESULT ( STDMETHODCALLTYPE *GetThread )( ICorDebugProcess * This, /* [in] */ DWORD dwThreadId, /* [out] */ ICorDebugThread **ppThread); - - HRESULT ( STDMETHODCALLTYPE *EnumerateObjects )( + + HRESULT ( STDMETHODCALLTYPE *EnumerateObjects )( ICorDebugProcess * This, /* [out] */ ICorDebugObjectEnum **ppObjects); - - HRESULT ( STDMETHODCALLTYPE *IsTransitionStub )( + + HRESULT ( STDMETHODCALLTYPE *IsTransitionStub )( ICorDebugProcess * This, /* [in] */ CORDB_ADDRESS address, /* [out] */ BOOL *pbTransitionStub); - - HRESULT ( STDMETHODCALLTYPE *IsOSSuspended )( + + HRESULT ( STDMETHODCALLTYPE *IsOSSuspended )( ICorDebugProcess * This, /* [in] */ DWORD threadID, /* [out] */ BOOL *pbSuspended); - - HRESULT ( STDMETHODCALLTYPE *GetThreadContext )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadContext )( ICorDebugProcess * This, /* [in] */ DWORD threadID, /* [in] */ ULONG32 contextSize, /* [size_is][length_is][out][in] */ BYTE context[ ]); - - HRESULT ( STDMETHODCALLTYPE *SetThreadContext )( + + HRESULT ( STDMETHODCALLTYPE *SetThreadContext )( ICorDebugProcess * This, /* [in] */ DWORD threadID, /* [in] */ ULONG32 contextSize, /* [size_is][length_is][in] */ BYTE context[ ]); - - HRESULT ( STDMETHODCALLTYPE *ReadMemory )( + + HRESULT ( STDMETHODCALLTYPE *ReadMemory )( ICorDebugProcess * This, /* [in] */ CORDB_ADDRESS address, /* [in] */ DWORD size, /* [length_is][size_is][out] */ BYTE buffer[ ], /* [out] */ SIZE_T *read); - - HRESULT ( STDMETHODCALLTYPE *WriteMemory )( + + HRESULT ( STDMETHODCALLTYPE *WriteMemory )( ICorDebugProcess * This, /* [in] */ CORDB_ADDRESS address, /* [in] */ DWORD size, /* [size_is][in] */ BYTE buffer[ ], /* [out] */ SIZE_T *written); - - HRESULT ( STDMETHODCALLTYPE *ClearCurrentException )( + + HRESULT ( STDMETHODCALLTYPE *ClearCurrentException )( ICorDebugProcess * This, /* [in] */ DWORD threadID); - - HRESULT ( STDMETHODCALLTYPE *EnableLogMessages )( + + HRESULT ( STDMETHODCALLTYPE *EnableLogMessages )( ICorDebugProcess * This, /* [in] */ BOOL fOnOff); - - HRESULT ( STDMETHODCALLTYPE *ModifyLogSwitch )( + + HRESULT ( STDMETHODCALLTYPE *ModifyLogSwitch )( ICorDebugProcess * This, - /* [annotation][in] */ + /* [annotation][in] */ _In_ WCHAR *pLogSwitchName, /* [in] */ LONG lLevel); - - HRESULT ( STDMETHODCALLTYPE *EnumerateAppDomains )( + + HRESULT ( STDMETHODCALLTYPE *EnumerateAppDomains )( ICorDebugProcess * This, /* [out] */ ICorDebugAppDomainEnum **ppAppDomains); - - HRESULT ( STDMETHODCALLTYPE *GetObject )( + + HRESULT ( STDMETHODCALLTYPE *GetObject )( ICorDebugProcess * This, /* [out] */ ICorDebugValue **ppObject); - - HRESULT ( STDMETHODCALLTYPE *ThreadForFiberCookie )( + + HRESULT ( STDMETHODCALLTYPE *ThreadForFiberCookie )( ICorDebugProcess * This, /* [in] */ DWORD fiberCookie, /* [out] */ ICorDebugThread **ppThread); - - HRESULT ( STDMETHODCALLTYPE *GetHelperThreadID )( + + HRESULT ( STDMETHODCALLTYPE *GetHelperThreadID )( ICorDebugProcess * This, /* [out] */ DWORD *pThreadID); - + END_INTERFACE } ICorDebugProcessVtbl; @@ -6801,116 +6802,116 @@ EXTERN_C const IID IID_ICorDebugProcess; CONST_VTBL struct ICorDebugProcessVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugProcess_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugProcess_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugProcess_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugProcess_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugProcess_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugProcess_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugProcess_Stop(This,dwTimeoutIgnored) \ - ( (This)->lpVtbl -> Stop(This,dwTimeoutIgnored) ) +#define ICorDebugProcess_Stop(This,dwTimeoutIgnored) \ + ( (This)->lpVtbl -> Stop(This,dwTimeoutIgnored) ) -#define ICorDebugProcess_Continue(This,fIsOutOfBand) \ - ( (This)->lpVtbl -> Continue(This,fIsOutOfBand) ) +#define ICorDebugProcess_Continue(This,fIsOutOfBand) \ + ( (This)->lpVtbl -> Continue(This,fIsOutOfBand) ) -#define ICorDebugProcess_IsRunning(This,pbRunning) \ - ( (This)->lpVtbl -> IsRunning(This,pbRunning) ) +#define ICorDebugProcess_IsRunning(This,pbRunning) \ + ( (This)->lpVtbl -> IsRunning(This,pbRunning) ) -#define ICorDebugProcess_HasQueuedCallbacks(This,pThread,pbQueued) \ - ( (This)->lpVtbl -> HasQueuedCallbacks(This,pThread,pbQueued) ) +#define ICorDebugProcess_HasQueuedCallbacks(This,pThread,pbQueued) \ + ( (This)->lpVtbl -> HasQueuedCallbacks(This,pThread,pbQueued) ) -#define ICorDebugProcess_EnumerateThreads(This,ppThreads) \ - ( (This)->lpVtbl -> EnumerateThreads(This,ppThreads) ) +#define ICorDebugProcess_EnumerateThreads(This,ppThreads) \ + ( (This)->lpVtbl -> EnumerateThreads(This,ppThreads) ) -#define ICorDebugProcess_SetAllThreadsDebugState(This,state,pExceptThisThread) \ - ( (This)->lpVtbl -> SetAllThreadsDebugState(This,state,pExceptThisThread) ) +#define ICorDebugProcess_SetAllThreadsDebugState(This,state,pExceptThisThread) \ + ( (This)->lpVtbl -> SetAllThreadsDebugState(This,state,pExceptThisThread) ) -#define ICorDebugProcess_Detach(This) \ - ( (This)->lpVtbl -> Detach(This) ) +#define ICorDebugProcess_Detach(This) \ + ( (This)->lpVtbl -> Detach(This) ) -#define ICorDebugProcess_Terminate(This,exitCode) \ - ( (This)->lpVtbl -> Terminate(This,exitCode) ) +#define ICorDebugProcess_Terminate(This,exitCode) \ + ( (This)->lpVtbl -> Terminate(This,exitCode) ) -#define ICorDebugProcess_CanCommitChanges(This,cSnapshots,pSnapshots,pError) \ - ( (This)->lpVtbl -> CanCommitChanges(This,cSnapshots,pSnapshots,pError) ) +#define ICorDebugProcess_CanCommitChanges(This,cSnapshots,pSnapshots,pError) \ + ( (This)->lpVtbl -> CanCommitChanges(This,cSnapshots,pSnapshots,pError) ) -#define ICorDebugProcess_CommitChanges(This,cSnapshots,pSnapshots,pError) \ - ( (This)->lpVtbl -> CommitChanges(This,cSnapshots,pSnapshots,pError) ) +#define ICorDebugProcess_CommitChanges(This,cSnapshots,pSnapshots,pError) \ + ( (This)->lpVtbl -> CommitChanges(This,cSnapshots,pSnapshots,pError) ) -#define ICorDebugProcess_GetID(This,pdwProcessId) \ - ( (This)->lpVtbl -> GetID(This,pdwProcessId) ) +#define ICorDebugProcess_GetID(This,pdwProcessId) \ + ( (This)->lpVtbl -> GetID(This,pdwProcessId) ) -#define ICorDebugProcess_GetHandle(This,phProcessHandle) \ - ( (This)->lpVtbl -> GetHandle(This,phProcessHandle) ) +#define ICorDebugProcess_GetHandle(This,phProcessHandle) \ + ( (This)->lpVtbl -> GetHandle(This,phProcessHandle) ) -#define ICorDebugProcess_GetThread(This,dwThreadId,ppThread) \ - ( (This)->lpVtbl -> GetThread(This,dwThreadId,ppThread) ) +#define ICorDebugProcess_GetThread(This,dwThreadId,ppThread) \ + ( (This)->lpVtbl -> GetThread(This,dwThreadId,ppThread) ) -#define ICorDebugProcess_EnumerateObjects(This,ppObjects) \ - ( (This)->lpVtbl -> EnumerateObjects(This,ppObjects) ) +#define ICorDebugProcess_EnumerateObjects(This,ppObjects) \ + ( (This)->lpVtbl -> EnumerateObjects(This,ppObjects) ) -#define ICorDebugProcess_IsTransitionStub(This,address,pbTransitionStub) \ - ( (This)->lpVtbl -> IsTransitionStub(This,address,pbTransitionStub) ) +#define ICorDebugProcess_IsTransitionStub(This,address,pbTransitionStub) \ + ( (This)->lpVtbl -> IsTransitionStub(This,address,pbTransitionStub) ) -#define ICorDebugProcess_IsOSSuspended(This,threadID,pbSuspended) \ - ( (This)->lpVtbl -> IsOSSuspended(This,threadID,pbSuspended) ) +#define ICorDebugProcess_IsOSSuspended(This,threadID,pbSuspended) \ + ( (This)->lpVtbl -> IsOSSuspended(This,threadID,pbSuspended) ) -#define ICorDebugProcess_GetThreadContext(This,threadID,contextSize,context) \ - ( (This)->lpVtbl -> GetThreadContext(This,threadID,contextSize,context) ) +#define ICorDebugProcess_GetThreadContext(This,threadID,contextSize,context) \ + ( (This)->lpVtbl -> GetThreadContext(This,threadID,contextSize,context) ) -#define ICorDebugProcess_SetThreadContext(This,threadID,contextSize,context) \ - ( (This)->lpVtbl -> SetThreadContext(This,threadID,contextSize,context) ) +#define ICorDebugProcess_SetThreadContext(This,threadID,contextSize,context) \ + ( (This)->lpVtbl -> SetThreadContext(This,threadID,contextSize,context) ) -#define ICorDebugProcess_ReadMemory(This,address,size,buffer,read) \ - ( (This)->lpVtbl -> ReadMemory(This,address,size,buffer,read) ) +#define ICorDebugProcess_ReadMemory(This,address,size,buffer,read) \ + ( (This)->lpVtbl -> ReadMemory(This,address,size,buffer,read) ) -#define ICorDebugProcess_WriteMemory(This,address,size,buffer,written) \ - ( (This)->lpVtbl -> WriteMemory(This,address,size,buffer,written) ) +#define ICorDebugProcess_WriteMemory(This,address,size,buffer,written) \ + ( (This)->lpVtbl -> WriteMemory(This,address,size,buffer,written) ) -#define ICorDebugProcess_ClearCurrentException(This,threadID) \ - ( (This)->lpVtbl -> ClearCurrentException(This,threadID) ) +#define ICorDebugProcess_ClearCurrentException(This,threadID) \ + ( (This)->lpVtbl -> ClearCurrentException(This,threadID) ) -#define ICorDebugProcess_EnableLogMessages(This,fOnOff) \ - ( (This)->lpVtbl -> EnableLogMessages(This,fOnOff) ) +#define ICorDebugProcess_EnableLogMessages(This,fOnOff) \ + ( (This)->lpVtbl -> EnableLogMessages(This,fOnOff) ) -#define ICorDebugProcess_ModifyLogSwitch(This,pLogSwitchName,lLevel) \ - ( (This)->lpVtbl -> ModifyLogSwitch(This,pLogSwitchName,lLevel) ) +#define ICorDebugProcess_ModifyLogSwitch(This,pLogSwitchName,lLevel) \ + ( (This)->lpVtbl -> ModifyLogSwitch(This,pLogSwitchName,lLevel) ) -#define ICorDebugProcess_EnumerateAppDomains(This,ppAppDomains) \ - ( (This)->lpVtbl -> EnumerateAppDomains(This,ppAppDomains) ) +#define ICorDebugProcess_EnumerateAppDomains(This,ppAppDomains) \ + ( (This)->lpVtbl -> EnumerateAppDomains(This,ppAppDomains) ) -#define ICorDebugProcess_GetObject(This,ppObject) \ - ( (This)->lpVtbl -> GetObject(This,ppObject) ) +#define ICorDebugProcess_GetObject(This,ppObject) \ + ( (This)->lpVtbl -> GetObject(This,ppObject) ) -#define ICorDebugProcess_ThreadForFiberCookie(This,fiberCookie,ppThread) \ - ( (This)->lpVtbl -> ThreadForFiberCookie(This,fiberCookie,ppThread) ) +#define ICorDebugProcess_ThreadForFiberCookie(This,fiberCookie,ppThread) \ + ( (This)->lpVtbl -> ThreadForFiberCookie(This,fiberCookie,ppThread) ) -#define ICorDebugProcess_GetHelperThreadID(This,pThreadID) \ - ( (This)->lpVtbl -> GetHelperThreadID(This,pThreadID) ) +#define ICorDebugProcess_GetHelperThreadID(This,pThreadID) \ + ( (This)->lpVtbl -> GetHelperThreadID(This,pThreadID) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugProcess_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugProcess_INTERFACE_DEFINED__ */ /* interface __MIDL_itf_cordebug_0000_0037 */ -/* [local] */ +/* [local] */ #pragma warning(pop) @@ -6922,97 +6923,97 @@ extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0037_v0_0_s_ifspec; #define __ICorDebugProcess2_INTERFACE_DEFINED__ /* interface ICorDebugProcess2 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugProcess2; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("AD1B3588-0EF0-4744-A496-AA09A9F80371") ICorDebugProcess2 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetThreadForTaskID( + virtual HRESULT STDMETHODCALLTYPE GetThreadForTaskID( /* [in] */ TASKID taskid, /* [out] */ ICorDebugThread2 **ppThread) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetVersion( + + virtual HRESULT STDMETHODCALLTYPE GetVersion( /* [out] */ COR_VERSION *version) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetUnmanagedBreakpoint( + + virtual HRESULT STDMETHODCALLTYPE SetUnmanagedBreakpoint( /* [in] */ CORDB_ADDRESS address, /* [in] */ ULONG32 bufsize, /* [length_is][size_is][out] */ BYTE buffer[ ], /* [out] */ ULONG32 *bufLen) = 0; - - virtual HRESULT STDMETHODCALLTYPE ClearUnmanagedBreakpoint( + + virtual HRESULT STDMETHODCALLTYPE ClearUnmanagedBreakpoint( /* [in] */ CORDB_ADDRESS address) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetDesiredNGENCompilerFlags( + + virtual HRESULT STDMETHODCALLTYPE SetDesiredNGENCompilerFlags( /* [in] */ DWORD pdwFlags) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetDesiredNGENCompilerFlags( + + virtual HRESULT STDMETHODCALLTYPE GetDesiredNGENCompilerFlags( /* [out] */ DWORD *pdwFlags) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetReferenceValueFromGCHandle( + + virtual HRESULT STDMETHODCALLTYPE GetReferenceValueFromGCHandle( /* [in] */ UINT_PTR handle, /* [out] */ ICorDebugReferenceValue **pOutValue) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugProcess2Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugProcess2 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugProcess2 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugProcess2 * This); - - HRESULT ( STDMETHODCALLTYPE *GetThreadForTaskID )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadForTaskID )( ICorDebugProcess2 * This, /* [in] */ TASKID taskid, /* [out] */ ICorDebugThread2 **ppThread); - - HRESULT ( STDMETHODCALLTYPE *GetVersion )( + + HRESULT ( STDMETHODCALLTYPE *GetVersion )( ICorDebugProcess2 * This, /* [out] */ COR_VERSION *version); - - HRESULT ( STDMETHODCALLTYPE *SetUnmanagedBreakpoint )( + + HRESULT ( STDMETHODCALLTYPE *SetUnmanagedBreakpoint )( ICorDebugProcess2 * This, /* [in] */ CORDB_ADDRESS address, /* [in] */ ULONG32 bufsize, /* [length_is][size_is][out] */ BYTE buffer[ ], /* [out] */ ULONG32 *bufLen); - - HRESULT ( STDMETHODCALLTYPE *ClearUnmanagedBreakpoint )( + + HRESULT ( STDMETHODCALLTYPE *ClearUnmanagedBreakpoint )( ICorDebugProcess2 * This, /* [in] */ CORDB_ADDRESS address); - - HRESULT ( STDMETHODCALLTYPE *SetDesiredNGENCompilerFlags )( + + HRESULT ( STDMETHODCALLTYPE *SetDesiredNGENCompilerFlags )( ICorDebugProcess2 * This, /* [in] */ DWORD pdwFlags); - - HRESULT ( STDMETHODCALLTYPE *GetDesiredNGENCompilerFlags )( + + HRESULT ( STDMETHODCALLTYPE *GetDesiredNGENCompilerFlags )( ICorDebugProcess2 * This, /* [out] */ DWORD *pdwFlags); - - HRESULT ( STDMETHODCALLTYPE *GetReferenceValueFromGCHandle )( + + HRESULT ( STDMETHODCALLTYPE *GetReferenceValueFromGCHandle )( ICorDebugProcess2 * This, /* [in] */ UINT_PTR handle, /* [out] */ ICorDebugReferenceValue **pOutValue); - + END_INTERFACE } ICorDebugProcess2Vtbl; @@ -7021,98 +7022,98 @@ EXTERN_C const IID IID_ICorDebugProcess2; CONST_VTBL struct ICorDebugProcess2Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugProcess2_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugProcess2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugProcess2_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugProcess2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugProcess2_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugProcess2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugProcess2_GetThreadForTaskID(This,taskid,ppThread) \ - ( (This)->lpVtbl -> GetThreadForTaskID(This,taskid,ppThread) ) +#define ICorDebugProcess2_GetThreadForTaskID(This,taskid,ppThread) \ + ( (This)->lpVtbl -> GetThreadForTaskID(This,taskid,ppThread) ) -#define ICorDebugProcess2_GetVersion(This,version) \ - ( (This)->lpVtbl -> GetVersion(This,version) ) +#define ICorDebugProcess2_GetVersion(This,version) \ + ( (This)->lpVtbl -> GetVersion(This,version) ) -#define ICorDebugProcess2_SetUnmanagedBreakpoint(This,address,bufsize,buffer,bufLen) \ - ( (This)->lpVtbl -> SetUnmanagedBreakpoint(This,address,bufsize,buffer,bufLen) ) +#define ICorDebugProcess2_SetUnmanagedBreakpoint(This,address,bufsize,buffer,bufLen) \ + ( (This)->lpVtbl -> SetUnmanagedBreakpoint(This,address,bufsize,buffer,bufLen) ) -#define ICorDebugProcess2_ClearUnmanagedBreakpoint(This,address) \ - ( (This)->lpVtbl -> ClearUnmanagedBreakpoint(This,address) ) +#define ICorDebugProcess2_ClearUnmanagedBreakpoint(This,address) \ + ( (This)->lpVtbl -> ClearUnmanagedBreakpoint(This,address) ) -#define ICorDebugProcess2_SetDesiredNGENCompilerFlags(This,pdwFlags) \ - ( (This)->lpVtbl -> SetDesiredNGENCompilerFlags(This,pdwFlags) ) +#define ICorDebugProcess2_SetDesiredNGENCompilerFlags(This,pdwFlags) \ + ( (This)->lpVtbl -> SetDesiredNGENCompilerFlags(This,pdwFlags) ) -#define ICorDebugProcess2_GetDesiredNGENCompilerFlags(This,pdwFlags) \ - ( (This)->lpVtbl -> GetDesiredNGENCompilerFlags(This,pdwFlags) ) +#define ICorDebugProcess2_GetDesiredNGENCompilerFlags(This,pdwFlags) \ + ( (This)->lpVtbl -> GetDesiredNGENCompilerFlags(This,pdwFlags) ) -#define ICorDebugProcess2_GetReferenceValueFromGCHandle(This,handle,pOutValue) \ - ( (This)->lpVtbl -> GetReferenceValueFromGCHandle(This,handle,pOutValue) ) +#define ICorDebugProcess2_GetReferenceValueFromGCHandle(This,handle,pOutValue) \ + ( (This)->lpVtbl -> GetReferenceValueFromGCHandle(This,handle,pOutValue) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugProcess2_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugProcess2_INTERFACE_DEFINED__ */ #ifndef __ICorDebugProcess3_INTERFACE_DEFINED__ #define __ICorDebugProcess3_INTERFACE_DEFINED__ /* interface ICorDebugProcess3 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugProcess3; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("2EE06488-C0D4-42B1-B26D-F3795EF606FB") ICorDebugProcess3 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE SetEnableCustomNotification( + virtual HRESULT STDMETHODCALLTYPE SetEnableCustomNotification( ICorDebugClass *pClass, BOOL fEnable) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugProcess3Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugProcess3 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugProcess3 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugProcess3 * This); - - HRESULT ( STDMETHODCALLTYPE *SetEnableCustomNotification )( + + HRESULT ( STDMETHODCALLTYPE *SetEnableCustomNotification )( ICorDebugProcess3 * This, ICorDebugClass *pClass, BOOL fEnable); - + END_INTERFACE } ICorDebugProcess3Vtbl; @@ -7121,175 +7122,175 @@ EXTERN_C const IID IID_ICorDebugProcess3; CONST_VTBL struct ICorDebugProcess3Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugProcess3_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugProcess3_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugProcess3_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugProcess3_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugProcess3_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugProcess3_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugProcess3_SetEnableCustomNotification(This,pClass,fEnable) \ - ( (This)->lpVtbl -> SetEnableCustomNotification(This,pClass,fEnable) ) +#define ICorDebugProcess3_SetEnableCustomNotification(This,pClass,fEnable) \ + ( (This)->lpVtbl -> SetEnableCustomNotification(This,pClass,fEnable) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugProcess3_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugProcess3_INTERFACE_DEFINED__ */ #ifndef __ICorDebugProcess5_INTERFACE_DEFINED__ #define __ICorDebugProcess5_INTERFACE_DEFINED__ /* interface ICorDebugProcess5 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugProcess5; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("21e9d9c0-fcb8-11df-8cff-0800200c9a66") ICorDebugProcess5 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetGCHeapInformation( + virtual HRESULT STDMETHODCALLTYPE GetGCHeapInformation( /* [out] */ COR_HEAPINFO *pHeapInfo) = 0; - - virtual HRESULT STDMETHODCALLTYPE EnumerateHeap( + + virtual HRESULT STDMETHODCALLTYPE EnumerateHeap( /* [out] */ ICorDebugHeapEnum **ppObjects) = 0; - - virtual HRESULT STDMETHODCALLTYPE EnumerateHeapRegions( + + virtual HRESULT STDMETHODCALLTYPE EnumerateHeapRegions( /* [out] */ ICorDebugHeapSegmentEnum **ppRegions) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetObject( + + virtual HRESULT STDMETHODCALLTYPE GetObject( /* [in] */ CORDB_ADDRESS addr, /* [out] */ ICorDebugObjectValue **pObject) = 0; - - virtual HRESULT STDMETHODCALLTYPE EnumerateGCReferences( + + virtual HRESULT STDMETHODCALLTYPE EnumerateGCReferences( /* [in] */ BOOL enumerateWeakReferences, /* [out] */ ICorDebugGCReferenceEnum **ppEnum) = 0; - - virtual HRESULT STDMETHODCALLTYPE EnumerateHandles( + + virtual HRESULT STDMETHODCALLTYPE EnumerateHandles( /* [in] */ CorGCReferenceType types, /* [out] */ ICorDebugGCReferenceEnum **ppEnum) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetTypeID( + + virtual HRESULT STDMETHODCALLTYPE GetTypeID( /* [in] */ CORDB_ADDRESS obj, /* [out] */ COR_TYPEID *pId) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetTypeForTypeID( + + virtual HRESULT STDMETHODCALLTYPE GetTypeForTypeID( /* [in] */ COR_TYPEID id, /* [out] */ ICorDebugType **ppType) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetArrayLayout( + + virtual HRESULT STDMETHODCALLTYPE GetArrayLayout( /* [in] */ COR_TYPEID id, /* [out] */ COR_ARRAY_LAYOUT *pLayout) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetTypeLayout( + + virtual HRESULT STDMETHODCALLTYPE GetTypeLayout( /* [in] */ COR_TYPEID id, /* [out] */ COR_TYPE_LAYOUT *pLayout) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetTypeFields( + + virtual HRESULT STDMETHODCALLTYPE GetTypeFields( /* [in] */ COR_TYPEID id, ULONG32 celt, COR_FIELD fields[ ], ULONG32 *pceltNeeded) = 0; - - virtual HRESULT STDMETHODCALLTYPE EnableNGENPolicy( + + virtual HRESULT STDMETHODCALLTYPE EnableNGENPolicy( /* [in] */ CorDebugNGENPolicy ePolicy) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugProcess5Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugProcess5 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugProcess5 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugProcess5 * This); - - HRESULT ( STDMETHODCALLTYPE *GetGCHeapInformation )( + + HRESULT ( STDMETHODCALLTYPE *GetGCHeapInformation )( ICorDebugProcess5 * This, /* [out] */ COR_HEAPINFO *pHeapInfo); - - HRESULT ( STDMETHODCALLTYPE *EnumerateHeap )( + + HRESULT ( STDMETHODCALLTYPE *EnumerateHeap )( ICorDebugProcess5 * This, /* [out] */ ICorDebugHeapEnum **ppObjects); - - HRESULT ( STDMETHODCALLTYPE *EnumerateHeapRegions )( + + HRESULT ( STDMETHODCALLTYPE *EnumerateHeapRegions )( ICorDebugProcess5 * This, /* [out] */ ICorDebugHeapSegmentEnum **ppRegions); - - HRESULT ( STDMETHODCALLTYPE *GetObject )( + + HRESULT ( STDMETHODCALLTYPE *GetObject )( ICorDebugProcess5 * This, /* [in] */ CORDB_ADDRESS addr, /* [out] */ ICorDebugObjectValue **pObject); - - HRESULT ( STDMETHODCALLTYPE *EnumerateGCReferences )( + + HRESULT ( STDMETHODCALLTYPE *EnumerateGCReferences )( ICorDebugProcess5 * This, /* [in] */ BOOL enumerateWeakReferences, /* [out] */ ICorDebugGCReferenceEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *EnumerateHandles )( + + HRESULT ( STDMETHODCALLTYPE *EnumerateHandles )( ICorDebugProcess5 * This, /* [in] */ CorGCReferenceType types, /* [out] */ ICorDebugGCReferenceEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetTypeID )( + + HRESULT ( STDMETHODCALLTYPE *GetTypeID )( ICorDebugProcess5 * This, /* [in] */ CORDB_ADDRESS obj, /* [out] */ COR_TYPEID *pId); - - HRESULT ( STDMETHODCALLTYPE *GetTypeForTypeID )( + + HRESULT ( STDMETHODCALLTYPE *GetTypeForTypeID )( ICorDebugProcess5 * This, /* [in] */ COR_TYPEID id, /* [out] */ ICorDebugType **ppType); - - HRESULT ( STDMETHODCALLTYPE *GetArrayLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetArrayLayout )( ICorDebugProcess5 * This, /* [in] */ COR_TYPEID id, /* [out] */ COR_ARRAY_LAYOUT *pLayout); - - HRESULT ( STDMETHODCALLTYPE *GetTypeLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetTypeLayout )( ICorDebugProcess5 * This, /* [in] */ COR_TYPEID id, /* [out] */ COR_TYPE_LAYOUT *pLayout); - - HRESULT ( STDMETHODCALLTYPE *GetTypeFields )( + + HRESULT ( STDMETHODCALLTYPE *GetTypeFields )( ICorDebugProcess5 * This, /* [in] */ COR_TYPEID id, ULONG32 celt, COR_FIELD fields[ ], ULONG32 *pceltNeeded); - - HRESULT ( STDMETHODCALLTYPE *EnableNGENPolicy )( + + HRESULT ( STDMETHODCALLTYPE *EnableNGENPolicy )( ICorDebugProcess5 * This, /* [in] */ CorDebugNGENPolicy ePolicy); - + END_INTERFACE } ICorDebugProcess5Vtbl; @@ -7298,101 +7299,101 @@ EXTERN_C const IID IID_ICorDebugProcess5; CONST_VTBL struct ICorDebugProcess5Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugProcess5_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugProcess5_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugProcess5_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugProcess5_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugProcess5_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugProcess5_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugProcess5_GetGCHeapInformation(This,pHeapInfo) \ - ( (This)->lpVtbl -> GetGCHeapInformation(This,pHeapInfo) ) +#define ICorDebugProcess5_GetGCHeapInformation(This,pHeapInfo) \ + ( (This)->lpVtbl -> GetGCHeapInformation(This,pHeapInfo) ) -#define ICorDebugProcess5_EnumerateHeap(This,ppObjects) \ - ( (This)->lpVtbl -> EnumerateHeap(This,ppObjects) ) +#define ICorDebugProcess5_EnumerateHeap(This,ppObjects) \ + ( (This)->lpVtbl -> EnumerateHeap(This,ppObjects) ) -#define ICorDebugProcess5_EnumerateHeapRegions(This,ppRegions) \ - ( (This)->lpVtbl -> EnumerateHeapRegions(This,ppRegions) ) +#define ICorDebugProcess5_EnumerateHeapRegions(This,ppRegions) \ + ( (This)->lpVtbl -> EnumerateHeapRegions(This,ppRegions) ) -#define ICorDebugProcess5_GetObject(This,addr,pObject) \ - ( (This)->lpVtbl -> GetObject(This,addr,pObject) ) +#define ICorDebugProcess5_GetObject(This,addr,pObject) \ + ( (This)->lpVtbl -> GetObject(This,addr,pObject) ) -#define ICorDebugProcess5_EnumerateGCReferences(This,enumerateWeakReferences,ppEnum) \ - ( (This)->lpVtbl -> EnumerateGCReferences(This,enumerateWeakReferences,ppEnum) ) +#define ICorDebugProcess5_EnumerateGCReferences(This,enumerateWeakReferences,ppEnum) \ + ( (This)->lpVtbl -> EnumerateGCReferences(This,enumerateWeakReferences,ppEnum) ) -#define ICorDebugProcess5_EnumerateHandles(This,types,ppEnum) \ - ( (This)->lpVtbl -> EnumerateHandles(This,types,ppEnum) ) +#define ICorDebugProcess5_EnumerateHandles(This,types,ppEnum) \ + ( (This)->lpVtbl -> EnumerateHandles(This,types,ppEnum) ) -#define ICorDebugProcess5_GetTypeID(This,obj,pId) \ - ( (This)->lpVtbl -> GetTypeID(This,obj,pId) ) +#define ICorDebugProcess5_GetTypeID(This,obj,pId) \ + ( (This)->lpVtbl -> GetTypeID(This,obj,pId) ) -#define ICorDebugProcess5_GetTypeForTypeID(This,id,ppType) \ - ( (This)->lpVtbl -> GetTypeForTypeID(This,id,ppType) ) +#define ICorDebugProcess5_GetTypeForTypeID(This,id,ppType) \ + ( (This)->lpVtbl -> GetTypeForTypeID(This,id,ppType) ) -#define ICorDebugProcess5_GetArrayLayout(This,id,pLayout) \ - ( (This)->lpVtbl -> GetArrayLayout(This,id,pLayout) ) +#define ICorDebugProcess5_GetArrayLayout(This,id,pLayout) \ + ( (This)->lpVtbl -> GetArrayLayout(This,id,pLayout) ) -#define ICorDebugProcess5_GetTypeLayout(This,id,pLayout) \ - ( (This)->lpVtbl -> GetTypeLayout(This,id,pLayout) ) +#define ICorDebugProcess5_GetTypeLayout(This,id,pLayout) \ + ( (This)->lpVtbl -> GetTypeLayout(This,id,pLayout) ) -#define ICorDebugProcess5_GetTypeFields(This,id,celt,fields,pceltNeeded) \ - ( (This)->lpVtbl -> GetTypeFields(This,id,celt,fields,pceltNeeded) ) +#define ICorDebugProcess5_GetTypeFields(This,id,celt,fields,pceltNeeded) \ + ( (This)->lpVtbl -> GetTypeFields(This,id,celt,fields,pceltNeeded) ) -#define ICorDebugProcess5_EnableNGENPolicy(This,ePolicy) \ - ( (This)->lpVtbl -> EnableNGENPolicy(This,ePolicy) ) +#define ICorDebugProcess5_EnableNGENPolicy(This,ePolicy) \ + ( (This)->lpVtbl -> EnableNGENPolicy(This,ePolicy) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugProcess5_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugProcess5_INTERFACE_DEFINED__ */ /* interface __MIDL_itf_cordebug_0000_0040 */ -/* [local] */ +/* [local] */ -typedef +typedef enum CorDebugRecordFormat { - FORMAT_WINDOWS_EXCEPTIONRECORD32 = 1, - FORMAT_WINDOWS_EXCEPTIONRECORD64 = 2 - } CorDebugRecordFormat; + FORMAT_WINDOWS_EXCEPTIONRECORD32 = 1, + FORMAT_WINDOWS_EXCEPTIONRECORD64 = 2 + } CorDebugRecordFormat; -typedef +typedef enum CorDebugDecodeEventFlagsWindows { - IS_FIRST_CHANCE = 1 - } CorDebugDecodeEventFlagsWindows; + IS_FIRST_CHANCE = 1 + } CorDebugDecodeEventFlagsWindows; -typedef +typedef enum CorDebugDebugEventKind { - DEBUG_EVENT_KIND_MODULE_LOADED = 1, - DEBUG_EVENT_KIND_MODULE_UNLOADED = 2, - DEBUG_EVENT_KIND_MANAGED_EXCEPTION_FIRST_CHANCE = 3, - DEBUG_EVENT_KIND_MANAGED_EXCEPTION_USER_FIRST_CHANCE = 4, - DEBUG_EVENT_KIND_MANAGED_EXCEPTION_CATCH_HANDLER_FOUND = 5, - DEBUG_EVENT_KIND_MANAGED_EXCEPTION_UNHANDLED = 6 - } CorDebugDebugEventKind; + DEBUG_EVENT_KIND_MODULE_LOADED = 1, + DEBUG_EVENT_KIND_MODULE_UNLOADED = 2, + DEBUG_EVENT_KIND_MANAGED_EXCEPTION_FIRST_CHANCE = 3, + DEBUG_EVENT_KIND_MANAGED_EXCEPTION_USER_FIRST_CHANCE = 4, + DEBUG_EVENT_KIND_MANAGED_EXCEPTION_CATCH_HANDLER_FOUND = 5, + DEBUG_EVENT_KIND_MANAGED_EXCEPTION_UNHANDLED = 6 + } CorDebugDebugEventKind; -typedef +typedef enum CorDebugStateChange { - PROCESS_RUNNING = 0x1, - FLUSH_ALL = 0x2 - } CorDebugStateChange; + PROCESS_RUNNING = 0x1, + FLUSH_ALL = 0x2 + } CorDebugStateChange; @@ -7403,52 +7404,52 @@ extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0040_v0_0_s_ifspec; #define __ICorDebugDebugEvent_INTERFACE_DEFINED__ /* interface ICorDebugDebugEvent */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugDebugEvent; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("41BD395D-DE99-48F1-BF7A-CC0F44A6D281") ICorDebugDebugEvent : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetEventKind( + virtual HRESULT STDMETHODCALLTYPE GetEventKind( /* [out] */ CorDebugDebugEventKind *pDebugEventKind) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetThread( + + virtual HRESULT STDMETHODCALLTYPE GetThread( /* [out] */ ICorDebugThread **ppThread) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugDebugEventVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugDebugEvent * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugDebugEvent * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugDebugEvent * This); - - HRESULT ( STDMETHODCALLTYPE *GetEventKind )( + + HRESULT ( STDMETHODCALLTYPE *GetEventKind )( ICorDebugDebugEvent * This, /* [out] */ CorDebugDebugEventKind *pDebugEventKind); - - HRESULT ( STDMETHODCALLTYPE *GetThread )( + + HRESULT ( STDMETHODCALLTYPE *GetThread )( ICorDebugDebugEvent * This, /* [out] */ ICorDebugThread **ppThread); - + END_INTERFACE } ICorDebugDebugEventVtbl; @@ -7457,57 +7458,57 @@ EXTERN_C const IID IID_ICorDebugDebugEvent; CONST_VTBL struct ICorDebugDebugEventVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugDebugEvent_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugDebugEvent_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugDebugEvent_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugDebugEvent_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugDebugEvent_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugDebugEvent_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugDebugEvent_GetEventKind(This,pDebugEventKind) \ - ( (This)->lpVtbl -> GetEventKind(This,pDebugEventKind) ) +#define ICorDebugDebugEvent_GetEventKind(This,pDebugEventKind) \ + ( (This)->lpVtbl -> GetEventKind(This,pDebugEventKind) ) -#define ICorDebugDebugEvent_GetThread(This,ppThread) \ - ( (This)->lpVtbl -> GetThread(This,ppThread) ) +#define ICorDebugDebugEvent_GetThread(This,ppThread) \ + ( (This)->lpVtbl -> GetThread(This,ppThread) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugDebugEvent_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugDebugEvent_INTERFACE_DEFINED__ */ /* interface __MIDL_itf_cordebug_0000_0041 */ -/* [local] */ +/* [local] */ -typedef +typedef enum CorDebugCodeInvokeKind { - CODE_INVOKE_KIND_NONE = 0, - CODE_INVOKE_KIND_RETURN = ( CODE_INVOKE_KIND_NONE + 1 ) , - CODE_INVOKE_KIND_TAILCALL = ( CODE_INVOKE_KIND_RETURN + 1 ) - } CorDebugCodeInvokeKind; + CODE_INVOKE_KIND_NONE = 0, + CODE_INVOKE_KIND_RETURN = ( CODE_INVOKE_KIND_NONE + 1 ) , + CODE_INVOKE_KIND_TAILCALL = ( CODE_INVOKE_KIND_RETURN + 1 ) + } CorDebugCodeInvokeKind; -typedef +typedef enum CorDebugCodeInvokePurpose { - CODE_INVOKE_PURPOSE_NONE = 0, - CODE_INVOKE_PURPOSE_NATIVE_TO_MANAGED_TRANSITION = ( CODE_INVOKE_PURPOSE_NONE + 1 ) , - CODE_INVOKE_PURPOSE_CLASS_INIT = ( CODE_INVOKE_PURPOSE_NATIVE_TO_MANAGED_TRANSITION + 1 ) , - CODE_INVOKE_PURPOSE_INTERFACE_DISPATCH = ( CODE_INVOKE_PURPOSE_CLASS_INIT + 1 ) - } CorDebugCodeInvokePurpose; + CODE_INVOKE_PURPOSE_NONE = 0, + CODE_INVOKE_PURPOSE_NATIVE_TO_MANAGED_TRANSITION = ( CODE_INVOKE_PURPOSE_NONE + 1 ) , + CODE_INVOKE_PURPOSE_CLASS_INIT = ( CODE_INVOKE_PURPOSE_NATIVE_TO_MANAGED_TRANSITION + 1 ) , + CODE_INVOKE_PURPOSE_INTERFACE_DISPATCH = ( CODE_INVOKE_PURPOSE_CLASS_INIT + 1 ) + } CorDebugCodeInvokePurpose; @@ -7518,65 +7519,65 @@ extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0041_v0_0_s_ifspec; #define __ICorDebugProcess6_INTERFACE_DEFINED__ /* interface ICorDebugProcess6 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugProcess6; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("11588775-7205-4CEB-A41A-93753C3153E9") ICorDebugProcess6 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE DecodeEvent( + virtual HRESULT STDMETHODCALLTYPE DecodeEvent( /* [size_is][length_is][in] */ const BYTE pRecord[ ], /* [in] */ DWORD countBytes, /* [in] */ CorDebugRecordFormat format, /* [in] */ DWORD dwFlags, /* [in] */ DWORD dwThreadId, /* [out] */ ICorDebugDebugEvent **ppEvent) = 0; - - virtual HRESULT STDMETHODCALLTYPE ProcessStateChanged( + + virtual HRESULT STDMETHODCALLTYPE ProcessStateChanged( /* [in] */ CorDebugStateChange change) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCode( + + virtual HRESULT STDMETHODCALLTYPE GetCode( /* [in] */ CORDB_ADDRESS codeAddress, /* [out] */ ICorDebugCode **ppCode) = 0; - - virtual HRESULT STDMETHODCALLTYPE EnableVirtualModuleSplitting( + + virtual HRESULT STDMETHODCALLTYPE EnableVirtualModuleSplitting( BOOL enableSplitting) = 0; - - virtual HRESULT STDMETHODCALLTYPE MarkDebuggerAttached( + + virtual HRESULT STDMETHODCALLTYPE MarkDebuggerAttached( BOOL fIsAttached) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetExportStepInfo( + + virtual HRESULT STDMETHODCALLTYPE GetExportStepInfo( /* [in] */ LPCWSTR pszExportName, /* [out] */ CorDebugCodeInvokeKind *pInvokeKind, /* [out] */ CorDebugCodeInvokePurpose *pInvokePurpose) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugProcess6Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugProcess6 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugProcess6 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugProcess6 * This); - - HRESULT ( STDMETHODCALLTYPE *DecodeEvent )( + + HRESULT ( STDMETHODCALLTYPE *DecodeEvent )( ICorDebugProcess6 * This, /* [size_is][length_is][in] */ const BYTE pRecord[ ], /* [in] */ DWORD countBytes, @@ -7584,30 +7585,30 @@ EXTERN_C const IID IID_ICorDebugProcess6; /* [in] */ DWORD dwFlags, /* [in] */ DWORD dwThreadId, /* [out] */ ICorDebugDebugEvent **ppEvent); - - HRESULT ( STDMETHODCALLTYPE *ProcessStateChanged )( + + HRESULT ( STDMETHODCALLTYPE *ProcessStateChanged )( ICorDebugProcess6 * This, /* [in] */ CorDebugStateChange change); - - HRESULT ( STDMETHODCALLTYPE *GetCode )( + + HRESULT ( STDMETHODCALLTYPE *GetCode )( ICorDebugProcess6 * This, /* [in] */ CORDB_ADDRESS codeAddress, /* [out] */ ICorDebugCode **ppCode); - - HRESULT ( STDMETHODCALLTYPE *EnableVirtualModuleSplitting )( + + HRESULT ( STDMETHODCALLTYPE *EnableVirtualModuleSplitting )( ICorDebugProcess6 * This, BOOL enableSplitting); - - HRESULT ( STDMETHODCALLTYPE *MarkDebuggerAttached )( + + HRESULT ( STDMETHODCALLTYPE *MarkDebuggerAttached )( ICorDebugProcess6 * This, BOOL fIsAttached); - - HRESULT ( STDMETHODCALLTYPE *GetExportStepInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetExportStepInfo )( ICorDebugProcess6 * This, /* [in] */ LPCWSTR pszExportName, /* [out] */ CorDebugCodeInvokeKind *pInvokeKind, /* [out] */ CorDebugCodeInvokePurpose *pInvokePurpose); - + END_INTERFACE } ICorDebugProcess6Vtbl; @@ -7616,59 +7617,59 @@ EXTERN_C const IID IID_ICorDebugProcess6; CONST_VTBL struct ICorDebugProcess6Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugProcess6_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugProcess6_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugProcess6_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugProcess6_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugProcess6_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugProcess6_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugProcess6_DecodeEvent(This,pRecord,countBytes,format,dwFlags,dwThreadId,ppEvent) \ - ( (This)->lpVtbl -> DecodeEvent(This,pRecord,countBytes,format,dwFlags,dwThreadId,ppEvent) ) +#define ICorDebugProcess6_DecodeEvent(This,pRecord,countBytes,format,dwFlags,dwThreadId,ppEvent) \ + ( (This)->lpVtbl -> DecodeEvent(This,pRecord,countBytes,format,dwFlags,dwThreadId,ppEvent) ) -#define ICorDebugProcess6_ProcessStateChanged(This,change) \ - ( (This)->lpVtbl -> ProcessStateChanged(This,change) ) +#define ICorDebugProcess6_ProcessStateChanged(This,change) \ + ( (This)->lpVtbl -> ProcessStateChanged(This,change) ) -#define ICorDebugProcess6_GetCode(This,codeAddress,ppCode) \ - ( (This)->lpVtbl -> GetCode(This,codeAddress,ppCode) ) +#define ICorDebugProcess6_GetCode(This,codeAddress,ppCode) \ + ( (This)->lpVtbl -> GetCode(This,codeAddress,ppCode) ) -#define ICorDebugProcess6_EnableVirtualModuleSplitting(This,enableSplitting) \ - ( (This)->lpVtbl -> EnableVirtualModuleSplitting(This,enableSplitting) ) +#define ICorDebugProcess6_EnableVirtualModuleSplitting(This,enableSplitting) \ + ( (This)->lpVtbl -> EnableVirtualModuleSplitting(This,enableSplitting) ) -#define ICorDebugProcess6_MarkDebuggerAttached(This,fIsAttached) \ - ( (This)->lpVtbl -> MarkDebuggerAttached(This,fIsAttached) ) +#define ICorDebugProcess6_MarkDebuggerAttached(This,fIsAttached) \ + ( (This)->lpVtbl -> MarkDebuggerAttached(This,fIsAttached) ) -#define ICorDebugProcess6_GetExportStepInfo(This,pszExportName,pInvokeKind,pInvokePurpose) \ - ( (This)->lpVtbl -> GetExportStepInfo(This,pszExportName,pInvokeKind,pInvokePurpose) ) +#define ICorDebugProcess6_GetExportStepInfo(This,pszExportName,pInvokeKind,pInvokePurpose) \ + ( (This)->lpVtbl -> GetExportStepInfo(This,pszExportName,pInvokeKind,pInvokePurpose) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugProcess6_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugProcess6_INTERFACE_DEFINED__ */ /* interface __MIDL_itf_cordebug_0000_0042 */ -/* [local] */ +/* [local] */ -typedef +typedef enum WriteableMetadataUpdateMode { - LegacyCompatPolicy = 0, - AlwaysShowUpdates = ( LegacyCompatPolicy + 1 ) - } WriteableMetadataUpdateMode; + LegacyCompatPolicy = 0, + AlwaysShowUpdates = ( LegacyCompatPolicy + 1 ) + } WriteableMetadataUpdateMode; @@ -7679,45 +7680,45 @@ extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0042_v0_0_s_ifspec; #define __ICorDebugProcess7_INTERFACE_DEFINED__ /* interface ICorDebugProcess7 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugProcess7; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("9B2C54E4-119F-4D6F-B402-527603266D69") ICorDebugProcess7 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE SetWriteableMetadataUpdateMode( + virtual HRESULT STDMETHODCALLTYPE SetWriteableMetadataUpdateMode( WriteableMetadataUpdateMode flags) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugProcess7Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugProcess7 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugProcess7 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugProcess7 * This); - - HRESULT ( STDMETHODCALLTYPE *SetWriteableMetadataUpdateMode )( + + HRESULT ( STDMETHODCALLTYPE *SetWriteableMetadataUpdateMode )( ICorDebugProcess7 * This, WriteableMetadataUpdateMode flags); - + END_INTERFACE } ICorDebugProcess7Vtbl; @@ -7726,78 +7727,78 @@ EXTERN_C const IID IID_ICorDebugProcess7; CONST_VTBL struct ICorDebugProcess7Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugProcess7_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugProcess7_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugProcess7_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugProcess7_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugProcess7_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugProcess7_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugProcess7_SetWriteableMetadataUpdateMode(This,flags) \ - ( (This)->lpVtbl -> SetWriteableMetadataUpdateMode(This,flags) ) +#define ICorDebugProcess7_SetWriteableMetadataUpdateMode(This,flags) \ + ( (This)->lpVtbl -> SetWriteableMetadataUpdateMode(This,flags) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugProcess7_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugProcess7_INTERFACE_DEFINED__ */ #ifndef __ICorDebugProcess8_INTERFACE_DEFINED__ #define __ICorDebugProcess8_INTERFACE_DEFINED__ /* interface ICorDebugProcess8 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugProcess8; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("2E6F28C1-85EB-4141-80AD-0A90944B9639") ICorDebugProcess8 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE EnableExceptionCallbacksOutsideOfMyCode( + virtual HRESULT STDMETHODCALLTYPE EnableExceptionCallbacksOutsideOfMyCode( /* [in] */ BOOL enableExceptionsOutsideOfJMC) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugProcess8Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugProcess8 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugProcess8 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugProcess8 * This); - - HRESULT ( STDMETHODCALLTYPE *EnableExceptionCallbacksOutsideOfMyCode )( + + HRESULT ( STDMETHODCALLTYPE *EnableExceptionCallbacksOutsideOfMyCode )( ICorDebugProcess8 * This, /* [in] */ BOOL enableExceptionsOutsideOfJMC); - + END_INTERFACE } ICorDebugProcess8Vtbl; @@ -7806,78 +7807,78 @@ EXTERN_C const IID IID_ICorDebugProcess8; CONST_VTBL struct ICorDebugProcess8Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugProcess8_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugProcess8_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugProcess8_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugProcess8_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugProcess8_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugProcess8_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugProcess8_EnableExceptionCallbacksOutsideOfMyCode(This,enableExceptionsOutsideOfJMC) \ - ( (This)->lpVtbl -> EnableExceptionCallbacksOutsideOfMyCode(This,enableExceptionsOutsideOfJMC) ) +#define ICorDebugProcess8_EnableExceptionCallbacksOutsideOfMyCode(This,enableExceptionsOutsideOfJMC) \ + ( (This)->lpVtbl -> EnableExceptionCallbacksOutsideOfMyCode(This,enableExceptionsOutsideOfJMC) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugProcess8_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugProcess8_INTERFACE_DEFINED__ */ #ifndef __ICorDebugProcess10_INTERFACE_DEFINED__ #define __ICorDebugProcess10_INTERFACE_DEFINED__ /* interface ICorDebugProcess10 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugProcess10; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("8F378F6F-1017-4461-9890-ECF64C54079F") ICorDebugProcess10 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE EnableGCNotificationEvents( + virtual HRESULT STDMETHODCALLTYPE EnableGCNotificationEvents( BOOL fEnable) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugProcess10Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugProcess10 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugProcess10 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugProcess10 * This); - - HRESULT ( STDMETHODCALLTYPE *EnableGCNotificationEvents )( + + HRESULT ( STDMETHODCALLTYPE *EnableGCNotificationEvents )( ICorDebugProcess10 * This, BOOL fEnable); - + END_INTERFACE } ICorDebugProcess10Vtbl; @@ -7886,86 +7887,86 @@ EXTERN_C const IID IID_ICorDebugProcess10; CONST_VTBL struct ICorDebugProcess10Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugProcess10_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugProcess10_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugProcess10_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugProcess10_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugProcess10_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugProcess10_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugProcess10_EnableGCNotificationEvents(This,fEnable) \ - ( (This)->lpVtbl -> EnableGCNotificationEvents(This,fEnable) ) +#define ICorDebugProcess10_EnableGCNotificationEvents(This,fEnable) \ + ( (This)->lpVtbl -> EnableGCNotificationEvents(This,fEnable) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugProcess10_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugProcess10_INTERFACE_DEFINED__ */ #ifndef __ICorDebugModuleDebugEvent_INTERFACE_DEFINED__ #define __ICorDebugModuleDebugEvent_INTERFACE_DEFINED__ /* interface ICorDebugModuleDebugEvent */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugModuleDebugEvent; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("51A15E8D-9FFF-4864-9B87-F4FBDEA747A2") ICorDebugModuleDebugEvent : public ICorDebugDebugEvent { public: - virtual HRESULT STDMETHODCALLTYPE GetModule( + virtual HRESULT STDMETHODCALLTYPE GetModule( /* [out] */ ICorDebugModule **ppModule) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugModuleDebugEventVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugModuleDebugEvent * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugModuleDebugEvent * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugModuleDebugEvent * This); - - HRESULT ( STDMETHODCALLTYPE *GetEventKind )( + + HRESULT ( STDMETHODCALLTYPE *GetEventKind )( ICorDebugModuleDebugEvent * This, /* [out] */ CorDebugDebugEventKind *pDebugEventKind); - - HRESULT ( STDMETHODCALLTYPE *GetThread )( + + HRESULT ( STDMETHODCALLTYPE *GetThread )( ICorDebugModuleDebugEvent * This, /* [out] */ ICorDebugThread **ppThread); - - HRESULT ( STDMETHODCALLTYPE *GetModule )( + + HRESULT ( STDMETHODCALLTYPE *GetModule )( ICorDebugModuleDebugEvent * This, /* [out] */ ICorDebugModule **ppModule); - + END_INTERFACE } ICorDebugModuleDebugEventVtbl; @@ -7974,107 +7975,107 @@ EXTERN_C const IID IID_ICorDebugModuleDebugEvent; CONST_VTBL struct ICorDebugModuleDebugEventVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugModuleDebugEvent_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugModuleDebugEvent_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugModuleDebugEvent_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugModuleDebugEvent_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugModuleDebugEvent_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugModuleDebugEvent_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugModuleDebugEvent_GetEventKind(This,pDebugEventKind) \ - ( (This)->lpVtbl -> GetEventKind(This,pDebugEventKind) ) +#define ICorDebugModuleDebugEvent_GetEventKind(This,pDebugEventKind) \ + ( (This)->lpVtbl -> GetEventKind(This,pDebugEventKind) ) -#define ICorDebugModuleDebugEvent_GetThread(This,ppThread) \ - ( (This)->lpVtbl -> GetThread(This,ppThread) ) +#define ICorDebugModuleDebugEvent_GetThread(This,ppThread) \ + ( (This)->lpVtbl -> GetThread(This,ppThread) ) -#define ICorDebugModuleDebugEvent_GetModule(This,ppModule) \ - ( (This)->lpVtbl -> GetModule(This,ppModule) ) +#define ICorDebugModuleDebugEvent_GetModule(This,ppModule) \ + ( (This)->lpVtbl -> GetModule(This,ppModule) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugModuleDebugEvent_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugModuleDebugEvent_INTERFACE_DEFINED__ */ #ifndef __ICorDebugExceptionDebugEvent_INTERFACE_DEFINED__ #define __ICorDebugExceptionDebugEvent_INTERFACE_DEFINED__ /* interface ICorDebugExceptionDebugEvent */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugExceptionDebugEvent; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("AF79EC94-4752-419C-A626-5FB1CC1A5AB7") ICorDebugExceptionDebugEvent : public ICorDebugDebugEvent { public: - virtual HRESULT STDMETHODCALLTYPE GetStackPointer( + virtual HRESULT STDMETHODCALLTYPE GetStackPointer( /* [out] */ CORDB_ADDRESS *pStackPointer) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetNativeIP( + + virtual HRESULT STDMETHODCALLTYPE GetNativeIP( /* [out] */ CORDB_ADDRESS *pIP) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetFlags( + + virtual HRESULT STDMETHODCALLTYPE GetFlags( /* [out] */ CorDebugExceptionFlags *pdwFlags) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugExceptionDebugEventVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugExceptionDebugEvent * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugExceptionDebugEvent * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugExceptionDebugEvent * This); - - HRESULT ( STDMETHODCALLTYPE *GetEventKind )( + + HRESULT ( STDMETHODCALLTYPE *GetEventKind )( ICorDebugExceptionDebugEvent * This, /* [out] */ CorDebugDebugEventKind *pDebugEventKind); - - HRESULT ( STDMETHODCALLTYPE *GetThread )( + + HRESULT ( STDMETHODCALLTYPE *GetThread )( ICorDebugExceptionDebugEvent * This, /* [out] */ ICorDebugThread **ppThread); - - HRESULT ( STDMETHODCALLTYPE *GetStackPointer )( + + HRESULT ( STDMETHODCALLTYPE *GetStackPointer )( ICorDebugExceptionDebugEvent * This, /* [out] */ CORDB_ADDRESS *pStackPointer); - - HRESULT ( STDMETHODCALLTYPE *GetNativeIP )( + + HRESULT ( STDMETHODCALLTYPE *GetNativeIP )( ICorDebugExceptionDebugEvent * This, /* [out] */ CORDB_ADDRESS *pIP); - - HRESULT ( STDMETHODCALLTYPE *GetFlags )( + + HRESULT ( STDMETHODCALLTYPE *GetFlags )( ICorDebugExceptionDebugEvent * This, /* [out] */ CorDebugExceptionFlags *pdwFlags); - + END_INTERFACE } ICorDebugExceptionDebugEventVtbl; @@ -8083,98 +8084,98 @@ EXTERN_C const IID IID_ICorDebugExceptionDebugEvent; CONST_VTBL struct ICorDebugExceptionDebugEventVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugExceptionDebugEvent_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugExceptionDebugEvent_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugExceptionDebugEvent_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugExceptionDebugEvent_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugExceptionDebugEvent_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugExceptionDebugEvent_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugExceptionDebugEvent_GetEventKind(This,pDebugEventKind) \ - ( (This)->lpVtbl -> GetEventKind(This,pDebugEventKind) ) +#define ICorDebugExceptionDebugEvent_GetEventKind(This,pDebugEventKind) \ + ( (This)->lpVtbl -> GetEventKind(This,pDebugEventKind) ) -#define ICorDebugExceptionDebugEvent_GetThread(This,ppThread) \ - ( (This)->lpVtbl -> GetThread(This,ppThread) ) +#define ICorDebugExceptionDebugEvent_GetThread(This,ppThread) \ + ( (This)->lpVtbl -> GetThread(This,ppThread) ) -#define ICorDebugExceptionDebugEvent_GetStackPointer(This,pStackPointer) \ - ( (This)->lpVtbl -> GetStackPointer(This,pStackPointer) ) +#define ICorDebugExceptionDebugEvent_GetStackPointer(This,pStackPointer) \ + ( (This)->lpVtbl -> GetStackPointer(This,pStackPointer) ) -#define ICorDebugExceptionDebugEvent_GetNativeIP(This,pIP) \ - ( (This)->lpVtbl -> GetNativeIP(This,pIP) ) +#define ICorDebugExceptionDebugEvent_GetNativeIP(This,pIP) \ + ( (This)->lpVtbl -> GetNativeIP(This,pIP) ) -#define ICorDebugExceptionDebugEvent_GetFlags(This,pdwFlags) \ - ( (This)->lpVtbl -> GetFlags(This,pdwFlags) ) +#define ICorDebugExceptionDebugEvent_GetFlags(This,pdwFlags) \ + ( (This)->lpVtbl -> GetFlags(This,pdwFlags) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugExceptionDebugEvent_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugExceptionDebugEvent_INTERFACE_DEFINED__ */ #ifndef __ICorDebugBreakpoint_INTERFACE_DEFINED__ #define __ICorDebugBreakpoint_INTERFACE_DEFINED__ /* interface ICorDebugBreakpoint */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugBreakpoint; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("CC7BCAE8-8A68-11d2-983C-0000F808342D") ICorDebugBreakpoint : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE Activate( + virtual HRESULT STDMETHODCALLTYPE Activate( /* [in] */ BOOL bActive) = 0; - - virtual HRESULT STDMETHODCALLTYPE IsActive( + + virtual HRESULT STDMETHODCALLTYPE IsActive( /* [out] */ BOOL *pbActive) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugBreakpointVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugBreakpoint * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugBreakpoint * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugBreakpoint * This); - - HRESULT ( STDMETHODCALLTYPE *Activate )( + + HRESULT ( STDMETHODCALLTYPE *Activate )( ICorDebugBreakpoint * This, /* [in] */ BOOL bActive); - - HRESULT ( STDMETHODCALLTYPE *IsActive )( + + HRESULT ( STDMETHODCALLTYPE *IsActive )( ICorDebugBreakpoint * This, /* [out] */ BOOL *pbActive); - + END_INTERFACE } ICorDebugBreakpointVtbl; @@ -8183,96 +8184,96 @@ EXTERN_C const IID IID_ICorDebugBreakpoint; CONST_VTBL struct ICorDebugBreakpointVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugBreakpoint_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugBreakpoint_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugBreakpoint_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugBreakpoint_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugBreakpoint_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugBreakpoint_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugBreakpoint_Activate(This,bActive) \ - ( (This)->lpVtbl -> Activate(This,bActive) ) +#define ICorDebugBreakpoint_Activate(This,bActive) \ + ( (This)->lpVtbl -> Activate(This,bActive) ) -#define ICorDebugBreakpoint_IsActive(This,pbActive) \ - ( (This)->lpVtbl -> IsActive(This,pbActive) ) +#define ICorDebugBreakpoint_IsActive(This,pbActive) \ + ( (This)->lpVtbl -> IsActive(This,pbActive) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugBreakpoint_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugBreakpoint_INTERFACE_DEFINED__ */ #ifndef __ICorDebugFunctionBreakpoint_INTERFACE_DEFINED__ #define __ICorDebugFunctionBreakpoint_INTERFACE_DEFINED__ /* interface ICorDebugFunctionBreakpoint */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugFunctionBreakpoint; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("CC7BCAE9-8A68-11d2-983C-0000F808342D") ICorDebugFunctionBreakpoint : public ICorDebugBreakpoint { public: - virtual HRESULT STDMETHODCALLTYPE GetFunction( + virtual HRESULT STDMETHODCALLTYPE GetFunction( /* [out] */ ICorDebugFunction **ppFunction) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetOffset( + + virtual HRESULT STDMETHODCALLTYPE GetOffset( /* [out] */ ULONG32 *pnOffset) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugFunctionBreakpointVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugFunctionBreakpoint * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugFunctionBreakpoint * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugFunctionBreakpoint * This); - - HRESULT ( STDMETHODCALLTYPE *Activate )( + + HRESULT ( STDMETHODCALLTYPE *Activate )( ICorDebugFunctionBreakpoint * This, /* [in] */ BOOL bActive); - - HRESULT ( STDMETHODCALLTYPE *IsActive )( + + HRESULT ( STDMETHODCALLTYPE *IsActive )( ICorDebugFunctionBreakpoint * This, /* [out] */ BOOL *pbActive); - - HRESULT ( STDMETHODCALLTYPE *GetFunction )( + + HRESULT ( STDMETHODCALLTYPE *GetFunction )( ICorDebugFunctionBreakpoint * This, /* [out] */ ICorDebugFunction **ppFunction); - - HRESULT ( STDMETHODCALLTYPE *GetOffset )( + + HRESULT ( STDMETHODCALLTYPE *GetOffset )( ICorDebugFunctionBreakpoint * This, /* [out] */ ULONG32 *pnOffset); - + END_INTERFACE } ICorDebugFunctionBreakpointVtbl; @@ -8281,96 +8282,96 @@ EXTERN_C const IID IID_ICorDebugFunctionBreakpoint; CONST_VTBL struct ICorDebugFunctionBreakpointVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugFunctionBreakpoint_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugFunctionBreakpoint_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugFunctionBreakpoint_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugFunctionBreakpoint_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugFunctionBreakpoint_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugFunctionBreakpoint_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugFunctionBreakpoint_Activate(This,bActive) \ - ( (This)->lpVtbl -> Activate(This,bActive) ) +#define ICorDebugFunctionBreakpoint_Activate(This,bActive) \ + ( (This)->lpVtbl -> Activate(This,bActive) ) -#define ICorDebugFunctionBreakpoint_IsActive(This,pbActive) \ - ( (This)->lpVtbl -> IsActive(This,pbActive) ) +#define ICorDebugFunctionBreakpoint_IsActive(This,pbActive) \ + ( (This)->lpVtbl -> IsActive(This,pbActive) ) -#define ICorDebugFunctionBreakpoint_GetFunction(This,ppFunction) \ - ( (This)->lpVtbl -> GetFunction(This,ppFunction) ) +#define ICorDebugFunctionBreakpoint_GetFunction(This,ppFunction) \ + ( (This)->lpVtbl -> GetFunction(This,ppFunction) ) -#define ICorDebugFunctionBreakpoint_GetOffset(This,pnOffset) \ - ( (This)->lpVtbl -> GetOffset(This,pnOffset) ) +#define ICorDebugFunctionBreakpoint_GetOffset(This,pnOffset) \ + ( (This)->lpVtbl -> GetOffset(This,pnOffset) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugFunctionBreakpoint_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugFunctionBreakpoint_INTERFACE_DEFINED__ */ #ifndef __ICorDebugModuleBreakpoint_INTERFACE_DEFINED__ #define __ICorDebugModuleBreakpoint_INTERFACE_DEFINED__ /* interface ICorDebugModuleBreakpoint */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugModuleBreakpoint; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("CC7BCAEA-8A68-11d2-983C-0000F808342D") ICorDebugModuleBreakpoint : public ICorDebugBreakpoint { public: - virtual HRESULT STDMETHODCALLTYPE GetModule( + virtual HRESULT STDMETHODCALLTYPE GetModule( /* [out] */ ICorDebugModule **ppModule) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugModuleBreakpointVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugModuleBreakpoint * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugModuleBreakpoint * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugModuleBreakpoint * This); - - HRESULT ( STDMETHODCALLTYPE *Activate )( + + HRESULT ( STDMETHODCALLTYPE *Activate )( ICorDebugModuleBreakpoint * This, /* [in] */ BOOL bActive); - - HRESULT ( STDMETHODCALLTYPE *IsActive )( + + HRESULT ( STDMETHODCALLTYPE *IsActive )( ICorDebugModuleBreakpoint * This, /* [out] */ BOOL *pbActive); - - HRESULT ( STDMETHODCALLTYPE *GetModule )( + + HRESULT ( STDMETHODCALLTYPE *GetModule )( ICorDebugModuleBreakpoint * This, /* [out] */ ICorDebugModule **ppModule); - + END_INTERFACE } ICorDebugModuleBreakpointVtbl; @@ -8379,93 +8380,93 @@ EXTERN_C const IID IID_ICorDebugModuleBreakpoint; CONST_VTBL struct ICorDebugModuleBreakpointVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugModuleBreakpoint_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugModuleBreakpoint_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugModuleBreakpoint_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugModuleBreakpoint_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugModuleBreakpoint_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugModuleBreakpoint_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugModuleBreakpoint_Activate(This,bActive) \ - ( (This)->lpVtbl -> Activate(This,bActive) ) +#define ICorDebugModuleBreakpoint_Activate(This,bActive) \ + ( (This)->lpVtbl -> Activate(This,bActive) ) -#define ICorDebugModuleBreakpoint_IsActive(This,pbActive) \ - ( (This)->lpVtbl -> IsActive(This,pbActive) ) +#define ICorDebugModuleBreakpoint_IsActive(This,pbActive) \ + ( (This)->lpVtbl -> IsActive(This,pbActive) ) -#define ICorDebugModuleBreakpoint_GetModule(This,ppModule) \ - ( (This)->lpVtbl -> GetModule(This,ppModule) ) +#define ICorDebugModuleBreakpoint_GetModule(This,ppModule) \ + ( (This)->lpVtbl -> GetModule(This,ppModule) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugModuleBreakpoint_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugModuleBreakpoint_INTERFACE_DEFINED__ */ #ifndef __ICorDebugValueBreakpoint_INTERFACE_DEFINED__ #define __ICorDebugValueBreakpoint_INTERFACE_DEFINED__ /* interface ICorDebugValueBreakpoint */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugValueBreakpoint; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("CC7BCAEB-8A68-11d2-983C-0000F808342D") ICorDebugValueBreakpoint : public ICorDebugBreakpoint { public: - virtual HRESULT STDMETHODCALLTYPE GetValue( + virtual HRESULT STDMETHODCALLTYPE GetValue( /* [out] */ ICorDebugValue **ppValue) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugValueBreakpointVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugValueBreakpoint * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugValueBreakpoint * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugValueBreakpoint * This); - - HRESULT ( STDMETHODCALLTYPE *Activate )( + + HRESULT ( STDMETHODCALLTYPE *Activate )( ICorDebugValueBreakpoint * This, /* [in] */ BOOL bActive); - - HRESULT ( STDMETHODCALLTYPE *IsActive )( + + HRESULT ( STDMETHODCALLTYPE *IsActive )( ICorDebugValueBreakpoint * This, /* [out] */ BOOL *pbActive); - - HRESULT ( STDMETHODCALLTYPE *GetValue )( + + HRESULT ( STDMETHODCALLTYPE *GetValue )( ICorDebugValueBreakpoint * This, /* [out] */ ICorDebugValue **ppValue); - + END_INTERFACE } ICorDebugValueBreakpointVtbl; @@ -8474,164 +8475,164 @@ EXTERN_C const IID IID_ICorDebugValueBreakpoint; CONST_VTBL struct ICorDebugValueBreakpointVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugValueBreakpoint_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugValueBreakpoint_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugValueBreakpoint_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugValueBreakpoint_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugValueBreakpoint_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugValueBreakpoint_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugValueBreakpoint_Activate(This,bActive) \ - ( (This)->lpVtbl -> Activate(This,bActive) ) +#define ICorDebugValueBreakpoint_Activate(This,bActive) \ + ( (This)->lpVtbl -> Activate(This,bActive) ) -#define ICorDebugValueBreakpoint_IsActive(This,pbActive) \ - ( (This)->lpVtbl -> IsActive(This,pbActive) ) +#define ICorDebugValueBreakpoint_IsActive(This,pbActive) \ + ( (This)->lpVtbl -> IsActive(This,pbActive) ) -#define ICorDebugValueBreakpoint_GetValue(This,ppValue) \ - ( (This)->lpVtbl -> GetValue(This,ppValue) ) +#define ICorDebugValueBreakpoint_GetValue(This,ppValue) \ + ( (This)->lpVtbl -> GetValue(This,ppValue) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugValueBreakpoint_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugValueBreakpoint_INTERFACE_DEFINED__ */ #ifndef __ICorDebugStepper_INTERFACE_DEFINED__ #define __ICorDebugStepper_INTERFACE_DEFINED__ /* interface ICorDebugStepper */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ -typedef +typedef enum CorDebugIntercept { - INTERCEPT_NONE = 0, - INTERCEPT_CLASS_INIT = 0x1, - INTERCEPT_EXCEPTION_FILTER = 0x2, - INTERCEPT_SECURITY = 0x4, - INTERCEPT_CONTEXT_POLICY = 0x8, - INTERCEPT_INTERCEPTION = 0x10, - INTERCEPT_ALL = 0xffff - } CorDebugIntercept; + INTERCEPT_NONE = 0, + INTERCEPT_CLASS_INIT = 0x1, + INTERCEPT_EXCEPTION_FILTER = 0x2, + INTERCEPT_SECURITY = 0x4, + INTERCEPT_CONTEXT_POLICY = 0x8, + INTERCEPT_INTERCEPTION = 0x10, + INTERCEPT_ALL = 0xffff + } CorDebugIntercept; -typedef +typedef enum CorDebugUnmappedStop { - STOP_NONE = 0, - STOP_PROLOG = 0x1, - STOP_EPILOG = 0x2, - STOP_NO_MAPPING_INFO = 0x4, - STOP_OTHER_UNMAPPED = 0x8, - STOP_UNMANAGED = 0x10, - STOP_ALL = 0xffff - } CorDebugUnmappedStop; + STOP_NONE = 0, + STOP_PROLOG = 0x1, + STOP_EPILOG = 0x2, + STOP_NO_MAPPING_INFO = 0x4, + STOP_OTHER_UNMAPPED = 0x8, + STOP_UNMANAGED = 0x10, + STOP_ALL = 0xffff + } CorDebugUnmappedStop; typedef struct COR_DEBUG_STEP_RANGE { ULONG32 startOffset; ULONG32 endOffset; - } COR_DEBUG_STEP_RANGE; + } COR_DEBUG_STEP_RANGE; EXTERN_C const IID IID_ICorDebugStepper; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("CC7BCAEC-8A68-11d2-983C-0000F808342D") ICorDebugStepper : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE IsActive( + virtual HRESULT STDMETHODCALLTYPE IsActive( /* [out] */ BOOL *pbActive) = 0; - + virtual HRESULT STDMETHODCALLTYPE Deactivate( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetInterceptMask( + + virtual HRESULT STDMETHODCALLTYPE SetInterceptMask( /* [in] */ CorDebugIntercept mask) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetUnmappedStopMask( + + virtual HRESULT STDMETHODCALLTYPE SetUnmappedStopMask( /* [in] */ CorDebugUnmappedStop mask) = 0; - - virtual HRESULT STDMETHODCALLTYPE Step( + + virtual HRESULT STDMETHODCALLTYPE Step( /* [in] */ BOOL bStepIn) = 0; - - virtual HRESULT STDMETHODCALLTYPE StepRange( + + virtual HRESULT STDMETHODCALLTYPE StepRange( /* [in] */ BOOL bStepIn, /* [size_is][in] */ COR_DEBUG_STEP_RANGE ranges[ ], /* [in] */ ULONG32 cRangeCount) = 0; - + virtual HRESULT STDMETHODCALLTYPE StepOut( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetRangeIL( + + virtual HRESULT STDMETHODCALLTYPE SetRangeIL( /* [in] */ BOOL bIL) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugStepperVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugStepper * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugStepper * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugStepper * This); - - HRESULT ( STDMETHODCALLTYPE *IsActive )( + + HRESULT ( STDMETHODCALLTYPE *IsActive )( ICorDebugStepper * This, /* [out] */ BOOL *pbActive); - - HRESULT ( STDMETHODCALLTYPE *Deactivate )( + + HRESULT ( STDMETHODCALLTYPE *Deactivate )( ICorDebugStepper * This); - - HRESULT ( STDMETHODCALLTYPE *SetInterceptMask )( + + HRESULT ( STDMETHODCALLTYPE *SetInterceptMask )( ICorDebugStepper * This, /* [in] */ CorDebugIntercept mask); - - HRESULT ( STDMETHODCALLTYPE *SetUnmappedStopMask )( + + HRESULT ( STDMETHODCALLTYPE *SetUnmappedStopMask )( ICorDebugStepper * This, /* [in] */ CorDebugUnmappedStop mask); - - HRESULT ( STDMETHODCALLTYPE *Step )( + + HRESULT ( STDMETHODCALLTYPE *Step )( ICorDebugStepper * This, /* [in] */ BOOL bStepIn); - - HRESULT ( STDMETHODCALLTYPE *StepRange )( + + HRESULT ( STDMETHODCALLTYPE *StepRange )( ICorDebugStepper * This, /* [in] */ BOOL bStepIn, /* [size_is][in] */ COR_DEBUG_STEP_RANGE ranges[ ], /* [in] */ ULONG32 cRangeCount); - - HRESULT ( STDMETHODCALLTYPE *StepOut )( + + HRESULT ( STDMETHODCALLTYPE *StepOut )( ICorDebugStepper * This); - - HRESULT ( STDMETHODCALLTYPE *SetRangeIL )( + + HRESULT ( STDMETHODCALLTYPE *SetRangeIL )( ICorDebugStepper * This, /* [in] */ BOOL bIL); - + END_INTERFACE } ICorDebugStepperVtbl; @@ -8640,99 +8641,99 @@ EXTERN_C const IID IID_ICorDebugStepper; CONST_VTBL struct ICorDebugStepperVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugStepper_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugStepper_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugStepper_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugStepper_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugStepper_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugStepper_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugStepper_IsActive(This,pbActive) \ - ( (This)->lpVtbl -> IsActive(This,pbActive) ) +#define ICorDebugStepper_IsActive(This,pbActive) \ + ( (This)->lpVtbl -> IsActive(This,pbActive) ) -#define ICorDebugStepper_Deactivate(This) \ - ( (This)->lpVtbl -> Deactivate(This) ) +#define ICorDebugStepper_Deactivate(This) \ + ( (This)->lpVtbl -> Deactivate(This) ) -#define ICorDebugStepper_SetInterceptMask(This,mask) \ - ( (This)->lpVtbl -> SetInterceptMask(This,mask) ) +#define ICorDebugStepper_SetInterceptMask(This,mask) \ + ( (This)->lpVtbl -> SetInterceptMask(This,mask) ) -#define ICorDebugStepper_SetUnmappedStopMask(This,mask) \ - ( (This)->lpVtbl -> SetUnmappedStopMask(This,mask) ) +#define ICorDebugStepper_SetUnmappedStopMask(This,mask) \ + ( (This)->lpVtbl -> SetUnmappedStopMask(This,mask) ) -#define ICorDebugStepper_Step(This,bStepIn) \ - ( (This)->lpVtbl -> Step(This,bStepIn) ) +#define ICorDebugStepper_Step(This,bStepIn) \ + ( (This)->lpVtbl -> Step(This,bStepIn) ) -#define ICorDebugStepper_StepRange(This,bStepIn,ranges,cRangeCount) \ - ( (This)->lpVtbl -> StepRange(This,bStepIn,ranges,cRangeCount) ) +#define ICorDebugStepper_StepRange(This,bStepIn,ranges,cRangeCount) \ + ( (This)->lpVtbl -> StepRange(This,bStepIn,ranges,cRangeCount) ) -#define ICorDebugStepper_StepOut(This) \ - ( (This)->lpVtbl -> StepOut(This) ) +#define ICorDebugStepper_StepOut(This) \ + ( (This)->lpVtbl -> StepOut(This) ) -#define ICorDebugStepper_SetRangeIL(This,bIL) \ - ( (This)->lpVtbl -> SetRangeIL(This,bIL) ) +#define ICorDebugStepper_SetRangeIL(This,bIL) \ + ( (This)->lpVtbl -> SetRangeIL(This,bIL) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugStepper_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugStepper_INTERFACE_DEFINED__ */ #ifndef __ICorDebugStepper2_INTERFACE_DEFINED__ #define __ICorDebugStepper2_INTERFACE_DEFINED__ /* interface ICorDebugStepper2 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugStepper2; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("C5B6E9C3-E7D1-4a8e-873B-7F047F0706F7") ICorDebugStepper2 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE SetJMC( + virtual HRESULT STDMETHODCALLTYPE SetJMC( /* [in] */ BOOL fIsJMCStepper) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugStepper2Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugStepper2 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugStepper2 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugStepper2 * This); - - HRESULT ( STDMETHODCALLTYPE *SetJMC )( + + HRESULT ( STDMETHODCALLTYPE *SetJMC )( ICorDebugStepper2 * This, /* [in] */ BOOL fIsJMCStepper); - + END_INTERFACE } ICorDebugStepper2Vtbl; @@ -8741,292 +8742,292 @@ EXTERN_C const IID IID_ICorDebugStepper2; CONST_VTBL struct ICorDebugStepper2Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugStepper2_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugStepper2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugStepper2_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugStepper2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugStepper2_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugStepper2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugStepper2_SetJMC(This,fIsJMCStepper) \ - ( (This)->lpVtbl -> SetJMC(This,fIsJMCStepper) ) +#define ICorDebugStepper2_SetJMC(This,fIsJMCStepper) \ + ( (This)->lpVtbl -> SetJMC(This,fIsJMCStepper) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugStepper2_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugStepper2_INTERFACE_DEFINED__ */ #ifndef __ICorDebugRegisterSet_INTERFACE_DEFINED__ #define __ICorDebugRegisterSet_INTERFACE_DEFINED__ /* interface ICorDebugRegisterSet */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ -typedef +typedef enum CorDebugRegister { - REGISTER_INSTRUCTION_POINTER = 0, - REGISTER_STACK_POINTER = ( REGISTER_INSTRUCTION_POINTER + 1 ) , - REGISTER_FRAME_POINTER = ( REGISTER_STACK_POINTER + 1 ) , - REGISTER_X86_EIP = 0, - REGISTER_X86_ESP = ( REGISTER_X86_EIP + 1 ) , - REGISTER_X86_EBP = ( REGISTER_X86_ESP + 1 ) , - REGISTER_X86_EAX = ( REGISTER_X86_EBP + 1 ) , - REGISTER_X86_ECX = ( REGISTER_X86_EAX + 1 ) , - REGISTER_X86_EDX = ( REGISTER_X86_ECX + 1 ) , - REGISTER_X86_EBX = ( REGISTER_X86_EDX + 1 ) , - REGISTER_X86_ESI = ( REGISTER_X86_EBX + 1 ) , - REGISTER_X86_EDI = ( REGISTER_X86_ESI + 1 ) , - REGISTER_X86_FPSTACK_0 = ( REGISTER_X86_EDI + 1 ) , - REGISTER_X86_FPSTACK_1 = ( REGISTER_X86_FPSTACK_0 + 1 ) , - REGISTER_X86_FPSTACK_2 = ( REGISTER_X86_FPSTACK_1 + 1 ) , - REGISTER_X86_FPSTACK_3 = ( REGISTER_X86_FPSTACK_2 + 1 ) , - REGISTER_X86_FPSTACK_4 = ( REGISTER_X86_FPSTACK_3 + 1 ) , - REGISTER_X86_FPSTACK_5 = ( REGISTER_X86_FPSTACK_4 + 1 ) , - REGISTER_X86_FPSTACK_6 = ( REGISTER_X86_FPSTACK_5 + 1 ) , - REGISTER_X86_FPSTACK_7 = ( REGISTER_X86_FPSTACK_6 + 1 ) , - REGISTER_AMD64_RIP = 0, - REGISTER_AMD64_RSP = ( REGISTER_AMD64_RIP + 1 ) , - REGISTER_AMD64_RBP = ( REGISTER_AMD64_RSP + 1 ) , - REGISTER_AMD64_RAX = ( REGISTER_AMD64_RBP + 1 ) , - REGISTER_AMD64_RCX = ( REGISTER_AMD64_RAX + 1 ) , - REGISTER_AMD64_RDX = ( REGISTER_AMD64_RCX + 1 ) , - REGISTER_AMD64_RBX = ( REGISTER_AMD64_RDX + 1 ) , - REGISTER_AMD64_RSI = ( REGISTER_AMD64_RBX + 1 ) , - REGISTER_AMD64_RDI = ( REGISTER_AMD64_RSI + 1 ) , - REGISTER_AMD64_R8 = ( REGISTER_AMD64_RDI + 1 ) , - REGISTER_AMD64_R9 = ( REGISTER_AMD64_R8 + 1 ) , - REGISTER_AMD64_R10 = ( REGISTER_AMD64_R9 + 1 ) , - REGISTER_AMD64_R11 = ( REGISTER_AMD64_R10 + 1 ) , - REGISTER_AMD64_R12 = ( REGISTER_AMD64_R11 + 1 ) , - REGISTER_AMD64_R13 = ( REGISTER_AMD64_R12 + 1 ) , - REGISTER_AMD64_R14 = ( REGISTER_AMD64_R13 + 1 ) , - REGISTER_AMD64_R15 = ( REGISTER_AMD64_R14 + 1 ) , - REGISTER_AMD64_XMM0 = ( REGISTER_AMD64_R15 + 1 ) , - REGISTER_AMD64_XMM1 = ( REGISTER_AMD64_XMM0 + 1 ) , - REGISTER_AMD64_XMM2 = ( REGISTER_AMD64_XMM1 + 1 ) , - REGISTER_AMD64_XMM3 = ( REGISTER_AMD64_XMM2 + 1 ) , - REGISTER_AMD64_XMM4 = ( REGISTER_AMD64_XMM3 + 1 ) , - REGISTER_AMD64_XMM5 = ( REGISTER_AMD64_XMM4 + 1 ) , - REGISTER_AMD64_XMM6 = ( REGISTER_AMD64_XMM5 + 1 ) , - REGISTER_AMD64_XMM7 = ( REGISTER_AMD64_XMM6 + 1 ) , - REGISTER_AMD64_XMM8 = ( REGISTER_AMD64_XMM7 + 1 ) , - REGISTER_AMD64_XMM9 = ( REGISTER_AMD64_XMM8 + 1 ) , - REGISTER_AMD64_XMM10 = ( REGISTER_AMD64_XMM9 + 1 ) , - REGISTER_AMD64_XMM11 = ( REGISTER_AMD64_XMM10 + 1 ) , - REGISTER_AMD64_XMM12 = ( REGISTER_AMD64_XMM11 + 1 ) , - REGISTER_AMD64_XMM13 = ( REGISTER_AMD64_XMM12 + 1 ) , - REGISTER_AMD64_XMM14 = ( REGISTER_AMD64_XMM13 + 1 ) , - REGISTER_AMD64_XMM15 = ( REGISTER_AMD64_XMM14 + 1 ) , - REGISTER_IA64_BSP = REGISTER_FRAME_POINTER, - REGISTER_IA64_R0 = ( REGISTER_IA64_BSP + 1 ) , - REGISTER_IA64_F0 = ( REGISTER_IA64_R0 + 128 ) , - REGISTER_ARM_PC = 0, - REGISTER_ARM_SP = ( REGISTER_ARM_PC + 1 ) , - REGISTER_ARM_R0 = ( REGISTER_ARM_SP + 1 ) , - REGISTER_ARM_R1 = ( REGISTER_ARM_R0 + 1 ) , - REGISTER_ARM_R2 = ( REGISTER_ARM_R1 + 1 ) , - REGISTER_ARM_R3 = ( REGISTER_ARM_R2 + 1 ) , - REGISTER_ARM_R4 = ( REGISTER_ARM_R3 + 1 ) , - REGISTER_ARM_R5 = ( REGISTER_ARM_R4 + 1 ) , - REGISTER_ARM_R6 = ( REGISTER_ARM_R5 + 1 ) , - REGISTER_ARM_R7 = ( REGISTER_ARM_R6 + 1 ) , - REGISTER_ARM_R8 = ( REGISTER_ARM_R7 + 1 ) , - REGISTER_ARM_R9 = ( REGISTER_ARM_R8 + 1 ) , - REGISTER_ARM_R10 = ( REGISTER_ARM_R9 + 1 ) , - REGISTER_ARM_R11 = ( REGISTER_ARM_R10 + 1 ) , - REGISTER_ARM_R12 = ( REGISTER_ARM_R11 + 1 ) , - REGISTER_ARM_LR = ( REGISTER_ARM_R12 + 1 ) , - REGISTER_ARM_D0 = ( REGISTER_ARM_LR + 1 ) , - REGISTER_ARM_D1 = ( REGISTER_ARM_D0 + 1 ) , - REGISTER_ARM_D2 = ( REGISTER_ARM_D1 + 1 ) , - REGISTER_ARM_D3 = ( REGISTER_ARM_D2 + 1 ) , - REGISTER_ARM_D4 = ( REGISTER_ARM_D3 + 1 ) , - REGISTER_ARM_D5 = ( REGISTER_ARM_D4 + 1 ) , - REGISTER_ARM_D6 = ( REGISTER_ARM_D5 + 1 ) , - REGISTER_ARM_D7 = ( REGISTER_ARM_D6 + 1 ) , - REGISTER_ARM_D8 = ( REGISTER_ARM_D7 + 1 ) , - REGISTER_ARM_D9 = ( REGISTER_ARM_D8 + 1 ) , - REGISTER_ARM_D10 = ( REGISTER_ARM_D9 + 1 ) , - REGISTER_ARM_D11 = ( REGISTER_ARM_D10 + 1 ) , - REGISTER_ARM_D12 = ( REGISTER_ARM_D11 + 1 ) , - REGISTER_ARM_D13 = ( REGISTER_ARM_D12 + 1 ) , - REGISTER_ARM_D14 = ( REGISTER_ARM_D13 + 1 ) , - REGISTER_ARM_D15 = ( REGISTER_ARM_D14 + 1 ) , - REGISTER_ARM_D16 = ( REGISTER_ARM_D15 + 1 ) , - REGISTER_ARM_D17 = ( REGISTER_ARM_D16 + 1 ) , - REGISTER_ARM_D18 = ( REGISTER_ARM_D17 + 1 ) , - REGISTER_ARM_D19 = ( REGISTER_ARM_D18 + 1 ) , - REGISTER_ARM_D20 = ( REGISTER_ARM_D19 + 1 ) , - REGISTER_ARM_D21 = ( REGISTER_ARM_D20 + 1 ) , - REGISTER_ARM_D22 = ( REGISTER_ARM_D21 + 1 ) , - REGISTER_ARM_D23 = ( REGISTER_ARM_D22 + 1 ) , - REGISTER_ARM_D24 = ( REGISTER_ARM_D23 + 1 ) , - REGISTER_ARM_D25 = ( REGISTER_ARM_D24 + 1 ) , - REGISTER_ARM_D26 = ( REGISTER_ARM_D25 + 1 ) , - REGISTER_ARM_D27 = ( REGISTER_ARM_D26 + 1 ) , - REGISTER_ARM_D28 = ( REGISTER_ARM_D27 + 1 ) , - REGISTER_ARM_D29 = ( REGISTER_ARM_D28 + 1 ) , - REGISTER_ARM_D30 = ( REGISTER_ARM_D29 + 1 ) , - REGISTER_ARM_D31 = ( REGISTER_ARM_D30 + 1 ) , - REGISTER_ARM64_PC = 0, - REGISTER_ARM64_SP = ( REGISTER_ARM64_PC + 1 ) , - REGISTER_ARM64_FP = ( REGISTER_ARM64_SP + 1 ) , - REGISTER_ARM64_X0 = ( REGISTER_ARM64_FP + 1 ) , - REGISTER_ARM64_X1 = ( REGISTER_ARM64_X0 + 1 ) , - REGISTER_ARM64_X2 = ( REGISTER_ARM64_X1 + 1 ) , - REGISTER_ARM64_X3 = ( REGISTER_ARM64_X2 + 1 ) , - REGISTER_ARM64_X4 = ( REGISTER_ARM64_X3 + 1 ) , - REGISTER_ARM64_X5 = ( REGISTER_ARM64_X4 + 1 ) , - REGISTER_ARM64_X6 = ( REGISTER_ARM64_X5 + 1 ) , - REGISTER_ARM64_X7 = ( REGISTER_ARM64_X6 + 1 ) , - REGISTER_ARM64_X8 = ( REGISTER_ARM64_X7 + 1 ) , - REGISTER_ARM64_X9 = ( REGISTER_ARM64_X8 + 1 ) , - REGISTER_ARM64_X10 = ( REGISTER_ARM64_X9 + 1 ) , - REGISTER_ARM64_X11 = ( REGISTER_ARM64_X10 + 1 ) , - REGISTER_ARM64_X12 = ( REGISTER_ARM64_X11 + 1 ) , - REGISTER_ARM64_X13 = ( REGISTER_ARM64_X12 + 1 ) , - REGISTER_ARM64_X14 = ( REGISTER_ARM64_X13 + 1 ) , - REGISTER_ARM64_X15 = ( REGISTER_ARM64_X14 + 1 ) , - REGISTER_ARM64_X16 = ( REGISTER_ARM64_X15 + 1 ) , - REGISTER_ARM64_X17 = ( REGISTER_ARM64_X16 + 1 ) , - REGISTER_ARM64_X18 = ( REGISTER_ARM64_X17 + 1 ) , - REGISTER_ARM64_X19 = ( REGISTER_ARM64_X18 + 1 ) , - REGISTER_ARM64_X20 = ( REGISTER_ARM64_X19 + 1 ) , - REGISTER_ARM64_X21 = ( REGISTER_ARM64_X20 + 1 ) , - REGISTER_ARM64_X22 = ( REGISTER_ARM64_X21 + 1 ) , - REGISTER_ARM64_X23 = ( REGISTER_ARM64_X22 + 1 ) , - REGISTER_ARM64_X24 = ( REGISTER_ARM64_X23 + 1 ) , - REGISTER_ARM64_X25 = ( REGISTER_ARM64_X24 + 1 ) , - REGISTER_ARM64_X26 = ( REGISTER_ARM64_X25 + 1 ) , - REGISTER_ARM64_X27 = ( REGISTER_ARM64_X26 + 1 ) , - REGISTER_ARM64_X28 = ( REGISTER_ARM64_X27 + 1 ) , - REGISTER_ARM64_LR = ( REGISTER_ARM64_X28 + 1 ) , - REGISTER_ARM64_V0 = ( REGISTER_ARM64_LR + 1 ) , - REGISTER_ARM64_V1 = ( REGISTER_ARM64_V0 + 1 ) , - REGISTER_ARM64_V2 = ( REGISTER_ARM64_V1 + 1 ) , - REGISTER_ARM64_V3 = ( REGISTER_ARM64_V2 + 1 ) , - REGISTER_ARM64_V4 = ( REGISTER_ARM64_V3 + 1 ) , - REGISTER_ARM64_V5 = ( REGISTER_ARM64_V4 + 1 ) , - REGISTER_ARM64_V6 = ( REGISTER_ARM64_V5 + 1 ) , - REGISTER_ARM64_V7 = ( REGISTER_ARM64_V6 + 1 ) , - REGISTER_ARM64_V8 = ( REGISTER_ARM64_V7 + 1 ) , - REGISTER_ARM64_V9 = ( REGISTER_ARM64_V8 + 1 ) , - REGISTER_ARM64_V10 = ( REGISTER_ARM64_V9 + 1 ) , - REGISTER_ARM64_V11 = ( REGISTER_ARM64_V10 + 1 ) , - REGISTER_ARM64_V12 = ( REGISTER_ARM64_V11 + 1 ) , - REGISTER_ARM64_V13 = ( REGISTER_ARM64_V12 + 1 ) , - REGISTER_ARM64_V14 = ( REGISTER_ARM64_V13 + 1 ) , - REGISTER_ARM64_V15 = ( REGISTER_ARM64_V14 + 1 ) , - REGISTER_ARM64_V16 = ( REGISTER_ARM64_V15 + 1 ) , - REGISTER_ARM64_V17 = ( REGISTER_ARM64_V16 + 1 ) , - REGISTER_ARM64_V18 = ( REGISTER_ARM64_V17 + 1 ) , - REGISTER_ARM64_V19 = ( REGISTER_ARM64_V18 + 1 ) , - REGISTER_ARM64_V20 = ( REGISTER_ARM64_V19 + 1 ) , - REGISTER_ARM64_V21 = ( REGISTER_ARM64_V20 + 1 ) , - REGISTER_ARM64_V22 = ( REGISTER_ARM64_V21 + 1 ) , - REGISTER_ARM64_V23 = ( REGISTER_ARM64_V22 + 1 ) , - REGISTER_ARM64_V24 = ( REGISTER_ARM64_V23 + 1 ) , - REGISTER_ARM64_V25 = ( REGISTER_ARM64_V24 + 1 ) , - REGISTER_ARM64_V26 = ( REGISTER_ARM64_V25 + 1 ) , - REGISTER_ARM64_V27 = ( REGISTER_ARM64_V26 + 1 ) , - REGISTER_ARM64_V28 = ( REGISTER_ARM64_V27 + 1 ) , - REGISTER_ARM64_V29 = ( REGISTER_ARM64_V28 + 1 ) , - REGISTER_ARM64_V30 = ( REGISTER_ARM64_V29 + 1 ) , - REGISTER_ARM64_V31 = ( REGISTER_ARM64_V30 + 1 ) - } CorDebugRegister; + REGISTER_INSTRUCTION_POINTER = 0, + REGISTER_STACK_POINTER = ( REGISTER_INSTRUCTION_POINTER + 1 ) , + REGISTER_FRAME_POINTER = ( REGISTER_STACK_POINTER + 1 ) , + REGISTER_X86_EIP = 0, + REGISTER_X86_ESP = ( REGISTER_X86_EIP + 1 ) , + REGISTER_X86_EBP = ( REGISTER_X86_ESP + 1 ) , + REGISTER_X86_EAX = ( REGISTER_X86_EBP + 1 ) , + REGISTER_X86_ECX = ( REGISTER_X86_EAX + 1 ) , + REGISTER_X86_EDX = ( REGISTER_X86_ECX + 1 ) , + REGISTER_X86_EBX = ( REGISTER_X86_EDX + 1 ) , + REGISTER_X86_ESI = ( REGISTER_X86_EBX + 1 ) , + REGISTER_X86_EDI = ( REGISTER_X86_ESI + 1 ) , + REGISTER_X86_FPSTACK_0 = ( REGISTER_X86_EDI + 1 ) , + REGISTER_X86_FPSTACK_1 = ( REGISTER_X86_FPSTACK_0 + 1 ) , + REGISTER_X86_FPSTACK_2 = ( REGISTER_X86_FPSTACK_1 + 1 ) , + REGISTER_X86_FPSTACK_3 = ( REGISTER_X86_FPSTACK_2 + 1 ) , + REGISTER_X86_FPSTACK_4 = ( REGISTER_X86_FPSTACK_3 + 1 ) , + REGISTER_X86_FPSTACK_5 = ( REGISTER_X86_FPSTACK_4 + 1 ) , + REGISTER_X86_FPSTACK_6 = ( REGISTER_X86_FPSTACK_5 + 1 ) , + REGISTER_X86_FPSTACK_7 = ( REGISTER_X86_FPSTACK_6 + 1 ) , + REGISTER_AMD64_RIP = 0, + REGISTER_AMD64_RSP = ( REGISTER_AMD64_RIP + 1 ) , + REGISTER_AMD64_RBP = ( REGISTER_AMD64_RSP + 1 ) , + REGISTER_AMD64_RAX = ( REGISTER_AMD64_RBP + 1 ) , + REGISTER_AMD64_RCX = ( REGISTER_AMD64_RAX + 1 ) , + REGISTER_AMD64_RDX = ( REGISTER_AMD64_RCX + 1 ) , + REGISTER_AMD64_RBX = ( REGISTER_AMD64_RDX + 1 ) , + REGISTER_AMD64_RSI = ( REGISTER_AMD64_RBX + 1 ) , + REGISTER_AMD64_RDI = ( REGISTER_AMD64_RSI + 1 ) , + REGISTER_AMD64_R8 = ( REGISTER_AMD64_RDI + 1 ) , + REGISTER_AMD64_R9 = ( REGISTER_AMD64_R8 + 1 ) , + REGISTER_AMD64_R10 = ( REGISTER_AMD64_R9 + 1 ) , + REGISTER_AMD64_R11 = ( REGISTER_AMD64_R10 + 1 ) , + REGISTER_AMD64_R12 = ( REGISTER_AMD64_R11 + 1 ) , + REGISTER_AMD64_R13 = ( REGISTER_AMD64_R12 + 1 ) , + REGISTER_AMD64_R14 = ( REGISTER_AMD64_R13 + 1 ) , + REGISTER_AMD64_R15 = ( REGISTER_AMD64_R14 + 1 ) , + REGISTER_AMD64_XMM0 = ( REGISTER_AMD64_R15 + 1 ) , + REGISTER_AMD64_XMM1 = ( REGISTER_AMD64_XMM0 + 1 ) , + REGISTER_AMD64_XMM2 = ( REGISTER_AMD64_XMM1 + 1 ) , + REGISTER_AMD64_XMM3 = ( REGISTER_AMD64_XMM2 + 1 ) , + REGISTER_AMD64_XMM4 = ( REGISTER_AMD64_XMM3 + 1 ) , + REGISTER_AMD64_XMM5 = ( REGISTER_AMD64_XMM4 + 1 ) , + REGISTER_AMD64_XMM6 = ( REGISTER_AMD64_XMM5 + 1 ) , + REGISTER_AMD64_XMM7 = ( REGISTER_AMD64_XMM6 + 1 ) , + REGISTER_AMD64_XMM8 = ( REGISTER_AMD64_XMM7 + 1 ) , + REGISTER_AMD64_XMM9 = ( REGISTER_AMD64_XMM8 + 1 ) , + REGISTER_AMD64_XMM10 = ( REGISTER_AMD64_XMM9 + 1 ) , + REGISTER_AMD64_XMM11 = ( REGISTER_AMD64_XMM10 + 1 ) , + REGISTER_AMD64_XMM12 = ( REGISTER_AMD64_XMM11 + 1 ) , + REGISTER_AMD64_XMM13 = ( REGISTER_AMD64_XMM12 + 1 ) , + REGISTER_AMD64_XMM14 = ( REGISTER_AMD64_XMM13 + 1 ) , + REGISTER_AMD64_XMM15 = ( REGISTER_AMD64_XMM14 + 1 ) , + REGISTER_IA64_BSP = REGISTER_FRAME_POINTER, + REGISTER_IA64_R0 = ( REGISTER_IA64_BSP + 1 ) , + REGISTER_IA64_F0 = ( REGISTER_IA64_R0 + 128 ) , + REGISTER_ARM_PC = 0, + REGISTER_ARM_SP = ( REGISTER_ARM_PC + 1 ) , + REGISTER_ARM_R0 = ( REGISTER_ARM_SP + 1 ) , + REGISTER_ARM_R1 = ( REGISTER_ARM_R0 + 1 ) , + REGISTER_ARM_R2 = ( REGISTER_ARM_R1 + 1 ) , + REGISTER_ARM_R3 = ( REGISTER_ARM_R2 + 1 ) , + REGISTER_ARM_R4 = ( REGISTER_ARM_R3 + 1 ) , + REGISTER_ARM_R5 = ( REGISTER_ARM_R4 + 1 ) , + REGISTER_ARM_R6 = ( REGISTER_ARM_R5 + 1 ) , + REGISTER_ARM_R7 = ( REGISTER_ARM_R6 + 1 ) , + REGISTER_ARM_R8 = ( REGISTER_ARM_R7 + 1 ) , + REGISTER_ARM_R9 = ( REGISTER_ARM_R8 + 1 ) , + REGISTER_ARM_R10 = ( REGISTER_ARM_R9 + 1 ) , + REGISTER_ARM_R11 = ( REGISTER_ARM_R10 + 1 ) , + REGISTER_ARM_R12 = ( REGISTER_ARM_R11 + 1 ) , + REGISTER_ARM_LR = ( REGISTER_ARM_R12 + 1 ) , + REGISTER_ARM_D0 = ( REGISTER_ARM_LR + 1 ) , + REGISTER_ARM_D1 = ( REGISTER_ARM_D0 + 1 ) , + REGISTER_ARM_D2 = ( REGISTER_ARM_D1 + 1 ) , + REGISTER_ARM_D3 = ( REGISTER_ARM_D2 + 1 ) , + REGISTER_ARM_D4 = ( REGISTER_ARM_D3 + 1 ) , + REGISTER_ARM_D5 = ( REGISTER_ARM_D4 + 1 ) , + REGISTER_ARM_D6 = ( REGISTER_ARM_D5 + 1 ) , + REGISTER_ARM_D7 = ( REGISTER_ARM_D6 + 1 ) , + REGISTER_ARM_D8 = ( REGISTER_ARM_D7 + 1 ) , + REGISTER_ARM_D9 = ( REGISTER_ARM_D8 + 1 ) , + REGISTER_ARM_D10 = ( REGISTER_ARM_D9 + 1 ) , + REGISTER_ARM_D11 = ( REGISTER_ARM_D10 + 1 ) , + REGISTER_ARM_D12 = ( REGISTER_ARM_D11 + 1 ) , + REGISTER_ARM_D13 = ( REGISTER_ARM_D12 + 1 ) , + REGISTER_ARM_D14 = ( REGISTER_ARM_D13 + 1 ) , + REGISTER_ARM_D15 = ( REGISTER_ARM_D14 + 1 ) , + REGISTER_ARM_D16 = ( REGISTER_ARM_D15 + 1 ) , + REGISTER_ARM_D17 = ( REGISTER_ARM_D16 + 1 ) , + REGISTER_ARM_D18 = ( REGISTER_ARM_D17 + 1 ) , + REGISTER_ARM_D19 = ( REGISTER_ARM_D18 + 1 ) , + REGISTER_ARM_D20 = ( REGISTER_ARM_D19 + 1 ) , + REGISTER_ARM_D21 = ( REGISTER_ARM_D20 + 1 ) , + REGISTER_ARM_D22 = ( REGISTER_ARM_D21 + 1 ) , + REGISTER_ARM_D23 = ( REGISTER_ARM_D22 + 1 ) , + REGISTER_ARM_D24 = ( REGISTER_ARM_D23 + 1 ) , + REGISTER_ARM_D25 = ( REGISTER_ARM_D24 + 1 ) , + REGISTER_ARM_D26 = ( REGISTER_ARM_D25 + 1 ) , + REGISTER_ARM_D27 = ( REGISTER_ARM_D26 + 1 ) , + REGISTER_ARM_D28 = ( REGISTER_ARM_D27 + 1 ) , + REGISTER_ARM_D29 = ( REGISTER_ARM_D28 + 1 ) , + REGISTER_ARM_D30 = ( REGISTER_ARM_D29 + 1 ) , + REGISTER_ARM_D31 = ( REGISTER_ARM_D30 + 1 ) , + REGISTER_ARM64_PC = 0, + REGISTER_ARM64_SP = ( REGISTER_ARM64_PC + 1 ) , + REGISTER_ARM64_FP = ( REGISTER_ARM64_SP + 1 ) , + REGISTER_ARM64_X0 = ( REGISTER_ARM64_FP + 1 ) , + REGISTER_ARM64_X1 = ( REGISTER_ARM64_X0 + 1 ) , + REGISTER_ARM64_X2 = ( REGISTER_ARM64_X1 + 1 ) , + REGISTER_ARM64_X3 = ( REGISTER_ARM64_X2 + 1 ) , + REGISTER_ARM64_X4 = ( REGISTER_ARM64_X3 + 1 ) , + REGISTER_ARM64_X5 = ( REGISTER_ARM64_X4 + 1 ) , + REGISTER_ARM64_X6 = ( REGISTER_ARM64_X5 + 1 ) , + REGISTER_ARM64_X7 = ( REGISTER_ARM64_X6 + 1 ) , + REGISTER_ARM64_X8 = ( REGISTER_ARM64_X7 + 1 ) , + REGISTER_ARM64_X9 = ( REGISTER_ARM64_X8 + 1 ) , + REGISTER_ARM64_X10 = ( REGISTER_ARM64_X9 + 1 ) , + REGISTER_ARM64_X11 = ( REGISTER_ARM64_X10 + 1 ) , + REGISTER_ARM64_X12 = ( REGISTER_ARM64_X11 + 1 ) , + REGISTER_ARM64_X13 = ( REGISTER_ARM64_X12 + 1 ) , + REGISTER_ARM64_X14 = ( REGISTER_ARM64_X13 + 1 ) , + REGISTER_ARM64_X15 = ( REGISTER_ARM64_X14 + 1 ) , + REGISTER_ARM64_X16 = ( REGISTER_ARM64_X15 + 1 ) , + REGISTER_ARM64_X17 = ( REGISTER_ARM64_X16 + 1 ) , + REGISTER_ARM64_X18 = ( REGISTER_ARM64_X17 + 1 ) , + REGISTER_ARM64_X19 = ( REGISTER_ARM64_X18 + 1 ) , + REGISTER_ARM64_X20 = ( REGISTER_ARM64_X19 + 1 ) , + REGISTER_ARM64_X21 = ( REGISTER_ARM64_X20 + 1 ) , + REGISTER_ARM64_X22 = ( REGISTER_ARM64_X21 + 1 ) , + REGISTER_ARM64_X23 = ( REGISTER_ARM64_X22 + 1 ) , + REGISTER_ARM64_X24 = ( REGISTER_ARM64_X23 + 1 ) , + REGISTER_ARM64_X25 = ( REGISTER_ARM64_X24 + 1 ) , + REGISTER_ARM64_X26 = ( REGISTER_ARM64_X25 + 1 ) , + REGISTER_ARM64_X27 = ( REGISTER_ARM64_X26 + 1 ) , + REGISTER_ARM64_X28 = ( REGISTER_ARM64_X27 + 1 ) , + REGISTER_ARM64_LR = ( REGISTER_ARM64_X28 + 1 ) , + REGISTER_ARM64_V0 = ( REGISTER_ARM64_LR + 1 ) , + REGISTER_ARM64_V1 = ( REGISTER_ARM64_V0 + 1 ) , + REGISTER_ARM64_V2 = ( REGISTER_ARM64_V1 + 1 ) , + REGISTER_ARM64_V3 = ( REGISTER_ARM64_V2 + 1 ) , + REGISTER_ARM64_V4 = ( REGISTER_ARM64_V3 + 1 ) , + REGISTER_ARM64_V5 = ( REGISTER_ARM64_V4 + 1 ) , + REGISTER_ARM64_V6 = ( REGISTER_ARM64_V5 + 1 ) , + REGISTER_ARM64_V7 = ( REGISTER_ARM64_V6 + 1 ) , + REGISTER_ARM64_V8 = ( REGISTER_ARM64_V7 + 1 ) , + REGISTER_ARM64_V9 = ( REGISTER_ARM64_V8 + 1 ) , + REGISTER_ARM64_V10 = ( REGISTER_ARM64_V9 + 1 ) , + REGISTER_ARM64_V11 = ( REGISTER_ARM64_V10 + 1 ) , + REGISTER_ARM64_V12 = ( REGISTER_ARM64_V11 + 1 ) , + REGISTER_ARM64_V13 = ( REGISTER_ARM64_V12 + 1 ) , + REGISTER_ARM64_V14 = ( REGISTER_ARM64_V13 + 1 ) , + REGISTER_ARM64_V15 = ( REGISTER_ARM64_V14 + 1 ) , + REGISTER_ARM64_V16 = ( REGISTER_ARM64_V15 + 1 ) , + REGISTER_ARM64_V17 = ( REGISTER_ARM64_V16 + 1 ) , + REGISTER_ARM64_V18 = ( REGISTER_ARM64_V17 + 1 ) , + REGISTER_ARM64_V19 = ( REGISTER_ARM64_V18 + 1 ) , + REGISTER_ARM64_V20 = ( REGISTER_ARM64_V19 + 1 ) , + REGISTER_ARM64_V21 = ( REGISTER_ARM64_V20 + 1 ) , + REGISTER_ARM64_V22 = ( REGISTER_ARM64_V21 + 1 ) , + REGISTER_ARM64_V23 = ( REGISTER_ARM64_V22 + 1 ) , + REGISTER_ARM64_V24 = ( REGISTER_ARM64_V23 + 1 ) , + REGISTER_ARM64_V25 = ( REGISTER_ARM64_V24 + 1 ) , + REGISTER_ARM64_V26 = ( REGISTER_ARM64_V25 + 1 ) , + REGISTER_ARM64_V27 = ( REGISTER_ARM64_V26 + 1 ) , + REGISTER_ARM64_V28 = ( REGISTER_ARM64_V27 + 1 ) , + REGISTER_ARM64_V29 = ( REGISTER_ARM64_V28 + 1 ) , + REGISTER_ARM64_V30 = ( REGISTER_ARM64_V29 + 1 ) , + REGISTER_ARM64_V31 = ( REGISTER_ARM64_V30 + 1 ) + } CorDebugRegister; EXTERN_C const IID IID_ICorDebugRegisterSet; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("CC7BCB0B-8A68-11d2-983C-0000F808342D") ICorDebugRegisterSet : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetRegistersAvailable( + virtual HRESULT STDMETHODCALLTYPE GetRegistersAvailable( /* [out] */ ULONG64 *pAvailable) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetRegisters( + + virtual HRESULT STDMETHODCALLTYPE GetRegisters( /* [in] */ ULONG64 mask, /* [in] */ ULONG32 regCount, /* [length_is][size_is][out] */ CORDB_REGISTER regBuffer[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetRegisters( + + virtual HRESULT STDMETHODCALLTYPE SetRegisters( /* [in] */ ULONG64 mask, /* [in] */ ULONG32 regCount, /* [size_is][in] */ CORDB_REGISTER regBuffer[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetThreadContext( + + virtual HRESULT STDMETHODCALLTYPE GetThreadContext( /* [in] */ ULONG32 contextSize, /* [size_is][length_is][out][in] */ BYTE context[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetThreadContext( + + virtual HRESULT STDMETHODCALLTYPE SetThreadContext( /* [in] */ ULONG32 contextSize, /* [size_is][length_is][in] */ BYTE context[ ]) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugRegisterSetVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugRegisterSet * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugRegisterSet * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugRegisterSet * This); - - HRESULT ( STDMETHODCALLTYPE *GetRegistersAvailable )( + + HRESULT ( STDMETHODCALLTYPE *GetRegistersAvailable )( ICorDebugRegisterSet * This, /* [out] */ ULONG64 *pAvailable); - - HRESULT ( STDMETHODCALLTYPE *GetRegisters )( + + HRESULT ( STDMETHODCALLTYPE *GetRegisters )( ICorDebugRegisterSet * This, /* [in] */ ULONG64 mask, /* [in] */ ULONG32 regCount, /* [length_is][size_is][out] */ CORDB_REGISTER regBuffer[ ]); - - HRESULT ( STDMETHODCALLTYPE *SetRegisters )( + + HRESULT ( STDMETHODCALLTYPE *SetRegisters )( ICorDebugRegisterSet * This, /* [in] */ ULONG64 mask, /* [in] */ ULONG32 regCount, /* [size_is][in] */ CORDB_REGISTER regBuffer[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetThreadContext )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadContext )( ICorDebugRegisterSet * This, /* [in] */ ULONG32 contextSize, /* [size_is][length_is][out][in] */ BYTE context[ ]); - - HRESULT ( STDMETHODCALLTYPE *SetThreadContext )( + + HRESULT ( STDMETHODCALLTYPE *SetThreadContext )( ICorDebugRegisterSet * This, /* [in] */ ULONG32 contextSize, /* [size_is][length_is][in] */ BYTE context[ ]); - + END_INTERFACE } ICorDebugRegisterSetVtbl; @@ -9035,118 +9036,118 @@ EXTERN_C const IID IID_ICorDebugRegisterSet; CONST_VTBL struct ICorDebugRegisterSetVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugRegisterSet_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugRegisterSet_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugRegisterSet_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugRegisterSet_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugRegisterSet_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugRegisterSet_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugRegisterSet_GetRegistersAvailable(This,pAvailable) \ - ( (This)->lpVtbl -> GetRegistersAvailable(This,pAvailable) ) +#define ICorDebugRegisterSet_GetRegistersAvailable(This,pAvailable) \ + ( (This)->lpVtbl -> GetRegistersAvailable(This,pAvailable) ) -#define ICorDebugRegisterSet_GetRegisters(This,mask,regCount,regBuffer) \ - ( (This)->lpVtbl -> GetRegisters(This,mask,regCount,regBuffer) ) +#define ICorDebugRegisterSet_GetRegisters(This,mask,regCount,regBuffer) \ + ( (This)->lpVtbl -> GetRegisters(This,mask,regCount,regBuffer) ) -#define ICorDebugRegisterSet_SetRegisters(This,mask,regCount,regBuffer) \ - ( (This)->lpVtbl -> SetRegisters(This,mask,regCount,regBuffer) ) +#define ICorDebugRegisterSet_SetRegisters(This,mask,regCount,regBuffer) \ + ( (This)->lpVtbl -> SetRegisters(This,mask,regCount,regBuffer) ) -#define ICorDebugRegisterSet_GetThreadContext(This,contextSize,context) \ - ( (This)->lpVtbl -> GetThreadContext(This,contextSize,context) ) +#define ICorDebugRegisterSet_GetThreadContext(This,contextSize,context) \ + ( (This)->lpVtbl -> GetThreadContext(This,contextSize,context) ) -#define ICorDebugRegisterSet_SetThreadContext(This,contextSize,context) \ - ( (This)->lpVtbl -> SetThreadContext(This,contextSize,context) ) +#define ICorDebugRegisterSet_SetThreadContext(This,contextSize,context) \ + ( (This)->lpVtbl -> SetThreadContext(This,contextSize,context) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugRegisterSet_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugRegisterSet_INTERFACE_DEFINED__ */ #ifndef __ICorDebugRegisterSet2_INTERFACE_DEFINED__ #define __ICorDebugRegisterSet2_INTERFACE_DEFINED__ /* interface ICorDebugRegisterSet2 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugRegisterSet2; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("6DC7BA3F-89BA-4459-9EC1-9D60937B468D") ICorDebugRegisterSet2 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetRegistersAvailable( + virtual HRESULT STDMETHODCALLTYPE GetRegistersAvailable( /* [in] */ ULONG32 numChunks, /* [size_is][out] */ BYTE availableRegChunks[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetRegisters( + + virtual HRESULT STDMETHODCALLTYPE GetRegisters( /* [in] */ ULONG32 maskCount, /* [size_is][in] */ BYTE mask[ ], /* [in] */ ULONG32 regCount, /* [size_is][out] */ CORDB_REGISTER regBuffer[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetRegisters( + + virtual HRESULT STDMETHODCALLTYPE SetRegisters( /* [in] */ ULONG32 maskCount, /* [size_is][in] */ BYTE mask[ ], /* [in] */ ULONG32 regCount, /* [size_is][in] */ CORDB_REGISTER regBuffer[ ]) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugRegisterSet2Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugRegisterSet2 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugRegisterSet2 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugRegisterSet2 * This); - - HRESULT ( STDMETHODCALLTYPE *GetRegistersAvailable )( + + HRESULT ( STDMETHODCALLTYPE *GetRegistersAvailable )( ICorDebugRegisterSet2 * This, /* [in] */ ULONG32 numChunks, /* [size_is][out] */ BYTE availableRegChunks[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetRegisters )( + + HRESULT ( STDMETHODCALLTYPE *GetRegisters )( ICorDebugRegisterSet2 * This, /* [in] */ ULONG32 maskCount, /* [size_is][in] */ BYTE mask[ ], /* [in] */ ULONG32 regCount, /* [size_is][out] */ CORDB_REGISTER regBuffer[ ]); - - HRESULT ( STDMETHODCALLTYPE *SetRegisters )( + + HRESULT ( STDMETHODCALLTYPE *SetRegisters )( ICorDebugRegisterSet2 * This, /* [in] */ ULONG32 maskCount, /* [size_is][in] */ BYTE mask[ ], /* [in] */ ULONG32 regCount, /* [size_is][in] */ CORDB_REGISTER regBuffer[ ]); - + END_INTERFACE } ICorDebugRegisterSet2Vtbl; @@ -9155,201 +9156,201 @@ EXTERN_C const IID IID_ICorDebugRegisterSet2; CONST_VTBL struct ICorDebugRegisterSet2Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugRegisterSet2_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugRegisterSet2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugRegisterSet2_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugRegisterSet2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugRegisterSet2_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugRegisterSet2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugRegisterSet2_GetRegistersAvailable(This,numChunks,availableRegChunks) \ - ( (This)->lpVtbl -> GetRegistersAvailable(This,numChunks,availableRegChunks) ) +#define ICorDebugRegisterSet2_GetRegistersAvailable(This,numChunks,availableRegChunks) \ + ( (This)->lpVtbl -> GetRegistersAvailable(This,numChunks,availableRegChunks) ) -#define ICorDebugRegisterSet2_GetRegisters(This,maskCount,mask,regCount,regBuffer) \ - ( (This)->lpVtbl -> GetRegisters(This,maskCount,mask,regCount,regBuffer) ) +#define ICorDebugRegisterSet2_GetRegisters(This,maskCount,mask,regCount,regBuffer) \ + ( (This)->lpVtbl -> GetRegisters(This,maskCount,mask,regCount,regBuffer) ) -#define ICorDebugRegisterSet2_SetRegisters(This,maskCount,mask,regCount,regBuffer) \ - ( (This)->lpVtbl -> SetRegisters(This,maskCount,mask,regCount,regBuffer) ) +#define ICorDebugRegisterSet2_SetRegisters(This,maskCount,mask,regCount,regBuffer) \ + ( (This)->lpVtbl -> SetRegisters(This,maskCount,mask,regCount,regBuffer) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugRegisterSet2_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugRegisterSet2_INTERFACE_DEFINED__ */ #ifndef __ICorDebugThread_INTERFACE_DEFINED__ #define __ICorDebugThread_INTERFACE_DEFINED__ /* interface ICorDebugThread */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ -typedef +typedef enum CorDebugUserState { - USER_STOP_REQUESTED = 0x1, - USER_SUSPEND_REQUESTED = 0x2, - USER_BACKGROUND = 0x4, - USER_UNSTARTED = 0x8, - USER_STOPPED = 0x10, - USER_WAIT_SLEEP_JOIN = 0x20, - USER_SUSPENDED = 0x40, - USER_UNSAFE_POINT = 0x80, - USER_THREADPOOL = 0x100 - } CorDebugUserState; + USER_STOP_REQUESTED = 0x1, + USER_SUSPEND_REQUESTED = 0x2, + USER_BACKGROUND = 0x4, + USER_UNSTARTED = 0x8, + USER_STOPPED = 0x10, + USER_WAIT_SLEEP_JOIN = 0x20, + USER_SUSPENDED = 0x40, + USER_UNSAFE_POINT = 0x80, + USER_THREADPOOL = 0x100 + } CorDebugUserState; EXTERN_C const IID IID_ICorDebugThread; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("938c6d66-7fb6-4f69-b389-425b8987329b") ICorDebugThread : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetProcess( + virtual HRESULT STDMETHODCALLTYPE GetProcess( /* [out] */ ICorDebugProcess **ppProcess) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetID( + + virtual HRESULT STDMETHODCALLTYPE GetID( /* [out] */ DWORD *pdwThreadId) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetHandle( + + virtual HRESULT STDMETHODCALLTYPE GetHandle( /* [out] */ HTHREAD *phThreadHandle) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetAppDomain( + + virtual HRESULT STDMETHODCALLTYPE GetAppDomain( /* [out] */ ICorDebugAppDomain **ppAppDomain) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetDebugState( + + virtual HRESULT STDMETHODCALLTYPE SetDebugState( /* [in] */ CorDebugThreadState state) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetDebugState( + + virtual HRESULT STDMETHODCALLTYPE GetDebugState( /* [out] */ CorDebugThreadState *pState) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetUserState( + + virtual HRESULT STDMETHODCALLTYPE GetUserState( /* [out] */ CorDebugUserState *pState) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCurrentException( + + virtual HRESULT STDMETHODCALLTYPE GetCurrentException( /* [out] */ ICorDebugValue **ppExceptionObject) = 0; - + virtual HRESULT STDMETHODCALLTYPE ClearCurrentException( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE CreateStepper( + + virtual HRESULT STDMETHODCALLTYPE CreateStepper( /* [out] */ ICorDebugStepper **ppStepper) = 0; - - virtual HRESULT STDMETHODCALLTYPE EnumerateChains( + + virtual HRESULT STDMETHODCALLTYPE EnumerateChains( /* [out] */ ICorDebugChainEnum **ppChains) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetActiveChain( + + virtual HRESULT STDMETHODCALLTYPE GetActiveChain( /* [out] */ ICorDebugChain **ppChain) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetActiveFrame( + + virtual HRESULT STDMETHODCALLTYPE GetActiveFrame( /* [out] */ ICorDebugFrame **ppFrame) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetRegisterSet( + + virtual HRESULT STDMETHODCALLTYPE GetRegisterSet( /* [out] */ ICorDebugRegisterSet **ppRegisters) = 0; - - virtual HRESULT STDMETHODCALLTYPE CreateEval( + + virtual HRESULT STDMETHODCALLTYPE CreateEval( /* [out] */ ICorDebugEval **ppEval) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetObject( + + virtual HRESULT STDMETHODCALLTYPE GetObject( /* [out] */ ICorDebugValue **ppObject) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugThreadVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugThread * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugThread * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugThread * This); - - HRESULT ( STDMETHODCALLTYPE *GetProcess )( + + HRESULT ( STDMETHODCALLTYPE *GetProcess )( ICorDebugThread * This, /* [out] */ ICorDebugProcess **ppProcess); - - HRESULT ( STDMETHODCALLTYPE *GetID )( + + HRESULT ( STDMETHODCALLTYPE *GetID )( ICorDebugThread * This, /* [out] */ DWORD *pdwThreadId); - - HRESULT ( STDMETHODCALLTYPE *GetHandle )( + + HRESULT ( STDMETHODCALLTYPE *GetHandle )( ICorDebugThread * This, /* [out] */ HTHREAD *phThreadHandle); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomain )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomain )( ICorDebugThread * This, /* [out] */ ICorDebugAppDomain **ppAppDomain); - - HRESULT ( STDMETHODCALLTYPE *SetDebugState )( + + HRESULT ( STDMETHODCALLTYPE *SetDebugState )( ICorDebugThread * This, /* [in] */ CorDebugThreadState state); - - HRESULT ( STDMETHODCALLTYPE *GetDebugState )( + + HRESULT ( STDMETHODCALLTYPE *GetDebugState )( ICorDebugThread * This, /* [out] */ CorDebugThreadState *pState); - - HRESULT ( STDMETHODCALLTYPE *GetUserState )( + + HRESULT ( STDMETHODCALLTYPE *GetUserState )( ICorDebugThread * This, /* [out] */ CorDebugUserState *pState); - - HRESULT ( STDMETHODCALLTYPE *GetCurrentException )( + + HRESULT ( STDMETHODCALLTYPE *GetCurrentException )( ICorDebugThread * This, /* [out] */ ICorDebugValue **ppExceptionObject); - - HRESULT ( STDMETHODCALLTYPE *ClearCurrentException )( + + HRESULT ( STDMETHODCALLTYPE *ClearCurrentException )( ICorDebugThread * This); - - HRESULT ( STDMETHODCALLTYPE *CreateStepper )( + + HRESULT ( STDMETHODCALLTYPE *CreateStepper )( ICorDebugThread * This, /* [out] */ ICorDebugStepper **ppStepper); - - HRESULT ( STDMETHODCALLTYPE *EnumerateChains )( + + HRESULT ( STDMETHODCALLTYPE *EnumerateChains )( ICorDebugThread * This, /* [out] */ ICorDebugChainEnum **ppChains); - - HRESULT ( STDMETHODCALLTYPE *GetActiveChain )( + + HRESULT ( STDMETHODCALLTYPE *GetActiveChain )( ICorDebugThread * This, /* [out] */ ICorDebugChain **ppChain); - - HRESULT ( STDMETHODCALLTYPE *GetActiveFrame )( + + HRESULT ( STDMETHODCALLTYPE *GetActiveFrame )( ICorDebugThread * This, /* [out] */ ICorDebugFrame **ppFrame); - - HRESULT ( STDMETHODCALLTYPE *GetRegisterSet )( + + HRESULT ( STDMETHODCALLTYPE *GetRegisterSet )( ICorDebugThread * This, /* [out] */ ICorDebugRegisterSet **ppRegisters); - - HRESULT ( STDMETHODCALLTYPE *CreateEval )( + + HRESULT ( STDMETHODCALLTYPE *CreateEval )( ICorDebugThread * This, /* [out] */ ICorDebugEval **ppEval); - - HRESULT ( STDMETHODCALLTYPE *GetObject )( + + HRESULT ( STDMETHODCALLTYPE *GetObject )( ICorDebugThread * This, /* [out] */ ICorDebugValue **ppObject); - + END_INTERFACE } ICorDebugThreadVtbl; @@ -9358,85 +9359,85 @@ EXTERN_C const IID IID_ICorDebugThread; CONST_VTBL struct ICorDebugThreadVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugThread_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugThread_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugThread_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugThread_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugThread_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugThread_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugThread_GetProcess(This,ppProcess) \ - ( (This)->lpVtbl -> GetProcess(This,ppProcess) ) +#define ICorDebugThread_GetProcess(This,ppProcess) \ + ( (This)->lpVtbl -> GetProcess(This,ppProcess) ) -#define ICorDebugThread_GetID(This,pdwThreadId) \ - ( (This)->lpVtbl -> GetID(This,pdwThreadId) ) +#define ICorDebugThread_GetID(This,pdwThreadId) \ + ( (This)->lpVtbl -> GetID(This,pdwThreadId) ) -#define ICorDebugThread_GetHandle(This,phThreadHandle) \ - ( (This)->lpVtbl -> GetHandle(This,phThreadHandle) ) +#define ICorDebugThread_GetHandle(This,phThreadHandle) \ + ( (This)->lpVtbl -> GetHandle(This,phThreadHandle) ) -#define ICorDebugThread_GetAppDomain(This,ppAppDomain) \ - ( (This)->lpVtbl -> GetAppDomain(This,ppAppDomain) ) +#define ICorDebugThread_GetAppDomain(This,ppAppDomain) \ + ( (This)->lpVtbl -> GetAppDomain(This,ppAppDomain) ) -#define ICorDebugThread_SetDebugState(This,state) \ - ( (This)->lpVtbl -> SetDebugState(This,state) ) +#define ICorDebugThread_SetDebugState(This,state) \ + ( (This)->lpVtbl -> SetDebugState(This,state) ) -#define ICorDebugThread_GetDebugState(This,pState) \ - ( (This)->lpVtbl -> GetDebugState(This,pState) ) +#define ICorDebugThread_GetDebugState(This,pState) \ + ( (This)->lpVtbl -> GetDebugState(This,pState) ) -#define ICorDebugThread_GetUserState(This,pState) \ - ( (This)->lpVtbl -> GetUserState(This,pState) ) +#define ICorDebugThread_GetUserState(This,pState) \ + ( (This)->lpVtbl -> GetUserState(This,pState) ) -#define ICorDebugThread_GetCurrentException(This,ppExceptionObject) \ - ( (This)->lpVtbl -> GetCurrentException(This,ppExceptionObject) ) +#define ICorDebugThread_GetCurrentException(This,ppExceptionObject) \ + ( (This)->lpVtbl -> GetCurrentException(This,ppExceptionObject) ) -#define ICorDebugThread_ClearCurrentException(This) \ - ( (This)->lpVtbl -> ClearCurrentException(This) ) +#define ICorDebugThread_ClearCurrentException(This) \ + ( (This)->lpVtbl -> ClearCurrentException(This) ) -#define ICorDebugThread_CreateStepper(This,ppStepper) \ - ( (This)->lpVtbl -> CreateStepper(This,ppStepper) ) +#define ICorDebugThread_CreateStepper(This,ppStepper) \ + ( (This)->lpVtbl -> CreateStepper(This,ppStepper) ) -#define ICorDebugThread_EnumerateChains(This,ppChains) \ - ( (This)->lpVtbl -> EnumerateChains(This,ppChains) ) +#define ICorDebugThread_EnumerateChains(This,ppChains) \ + ( (This)->lpVtbl -> EnumerateChains(This,ppChains) ) -#define ICorDebugThread_GetActiveChain(This,ppChain) \ - ( (This)->lpVtbl -> GetActiveChain(This,ppChain) ) +#define ICorDebugThread_GetActiveChain(This,ppChain) \ + ( (This)->lpVtbl -> GetActiveChain(This,ppChain) ) -#define ICorDebugThread_GetActiveFrame(This,ppFrame) \ - ( (This)->lpVtbl -> GetActiveFrame(This,ppFrame) ) +#define ICorDebugThread_GetActiveFrame(This,ppFrame) \ + ( (This)->lpVtbl -> GetActiveFrame(This,ppFrame) ) -#define ICorDebugThread_GetRegisterSet(This,ppRegisters) \ - ( (This)->lpVtbl -> GetRegisterSet(This,ppRegisters) ) +#define ICorDebugThread_GetRegisterSet(This,ppRegisters) \ + ( (This)->lpVtbl -> GetRegisterSet(This,ppRegisters) ) -#define ICorDebugThread_CreateEval(This,ppEval) \ - ( (This)->lpVtbl -> CreateEval(This,ppEval) ) +#define ICorDebugThread_CreateEval(This,ppEval) \ + ( (This)->lpVtbl -> CreateEval(This,ppEval) ) -#define ICorDebugThread_GetObject(This,ppObject) \ - ( (This)->lpVtbl -> GetObject(This,ppObject) ) +#define ICorDebugThread_GetObject(This,ppObject) \ + ( (This)->lpVtbl -> GetObject(This,ppObject) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugThread_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugThread_INTERFACE_DEFINED__ */ #ifndef __ICorDebugThread2_INTERFACE_DEFINED__ #define __ICorDebugThread2_INTERFACE_DEFINED__ /* interface ICorDebugThread2 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ typedef struct _COR_ACTIVE_FUNCTION { @@ -9445,77 +9446,77 @@ typedef struct _COR_ACTIVE_FUNCTION ICorDebugFunction2 *pFunction; ULONG32 ilOffset; ULONG32 flags; - } COR_ACTIVE_FUNCTION; + } COR_ACTIVE_FUNCTION; EXTERN_C const IID IID_ICorDebugThread2; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("2BD956D9-7B07-4bef-8A98-12AA862417C5") ICorDebugThread2 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetActiveFunctions( + virtual HRESULT STDMETHODCALLTYPE GetActiveFunctions( /* [in] */ ULONG32 cFunctions, /* [out] */ ULONG32 *pcFunctions, /* [length_is][size_is][out][in] */ COR_ACTIVE_FUNCTION pFunctions[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetConnectionID( + + virtual HRESULT STDMETHODCALLTYPE GetConnectionID( /* [out] */ CONNID *pdwConnectionId) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetTaskID( + + virtual HRESULT STDMETHODCALLTYPE GetTaskID( /* [out] */ TASKID *pTaskId) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetVolatileOSThreadID( + + virtual HRESULT STDMETHODCALLTYPE GetVolatileOSThreadID( /* [out] */ DWORD *pdwTid) = 0; - - virtual HRESULT STDMETHODCALLTYPE InterceptCurrentException( + + virtual HRESULT STDMETHODCALLTYPE InterceptCurrentException( /* [in] */ ICorDebugFrame *pFrame) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugThread2Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugThread2 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugThread2 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugThread2 * This); - - HRESULT ( STDMETHODCALLTYPE *GetActiveFunctions )( + + HRESULT ( STDMETHODCALLTYPE *GetActiveFunctions )( ICorDebugThread2 * This, /* [in] */ ULONG32 cFunctions, /* [out] */ ULONG32 *pcFunctions, /* [length_is][size_is][out][in] */ COR_ACTIVE_FUNCTION pFunctions[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetConnectionID )( + + HRESULT ( STDMETHODCALLTYPE *GetConnectionID )( ICorDebugThread2 * This, /* [out] */ CONNID *pdwConnectionId); - - HRESULT ( STDMETHODCALLTYPE *GetTaskID )( + + HRESULT ( STDMETHODCALLTYPE *GetTaskID )( ICorDebugThread2 * This, /* [out] */ TASKID *pTaskId); - - HRESULT ( STDMETHODCALLTYPE *GetVolatileOSThreadID )( + + HRESULT ( STDMETHODCALLTYPE *GetVolatileOSThreadID )( ICorDebugThread2 * This, /* [out] */ DWORD *pdwTid); - - HRESULT ( STDMETHODCALLTYPE *InterceptCurrentException )( + + HRESULT ( STDMETHODCALLTYPE *InterceptCurrentException )( ICorDebugThread2 * This, /* [in] */ ICorDebugFrame *pFrame); - + END_INTERFACE } ICorDebugThread2Vtbl; @@ -9524,101 +9525,101 @@ EXTERN_C const IID IID_ICorDebugThread2; CONST_VTBL struct ICorDebugThread2Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugThread2_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugThread2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugThread2_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugThread2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugThread2_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugThread2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugThread2_GetActiveFunctions(This,cFunctions,pcFunctions,pFunctions) \ - ( (This)->lpVtbl -> GetActiveFunctions(This,cFunctions,pcFunctions,pFunctions) ) +#define ICorDebugThread2_GetActiveFunctions(This,cFunctions,pcFunctions,pFunctions) \ + ( (This)->lpVtbl -> GetActiveFunctions(This,cFunctions,pcFunctions,pFunctions) ) -#define ICorDebugThread2_GetConnectionID(This,pdwConnectionId) \ - ( (This)->lpVtbl -> GetConnectionID(This,pdwConnectionId) ) +#define ICorDebugThread2_GetConnectionID(This,pdwConnectionId) \ + ( (This)->lpVtbl -> GetConnectionID(This,pdwConnectionId) ) -#define ICorDebugThread2_GetTaskID(This,pTaskId) \ - ( (This)->lpVtbl -> GetTaskID(This,pTaskId) ) +#define ICorDebugThread2_GetTaskID(This,pTaskId) \ + ( (This)->lpVtbl -> GetTaskID(This,pTaskId) ) -#define ICorDebugThread2_GetVolatileOSThreadID(This,pdwTid) \ - ( (This)->lpVtbl -> GetVolatileOSThreadID(This,pdwTid) ) +#define ICorDebugThread2_GetVolatileOSThreadID(This,pdwTid) \ + ( (This)->lpVtbl -> GetVolatileOSThreadID(This,pdwTid) ) -#define ICorDebugThread2_InterceptCurrentException(This,pFrame) \ - ( (This)->lpVtbl -> InterceptCurrentException(This,pFrame) ) +#define ICorDebugThread2_InterceptCurrentException(This,pFrame) \ + ( (This)->lpVtbl -> InterceptCurrentException(This,pFrame) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugThread2_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugThread2_INTERFACE_DEFINED__ */ #ifndef __ICorDebugThread3_INTERFACE_DEFINED__ #define __ICorDebugThread3_INTERFACE_DEFINED__ /* interface ICorDebugThread3 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugThread3; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("F8544EC3-5E4E-46c7-8D3E-A52B8405B1F5") ICorDebugThread3 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE CreateStackWalk( + virtual HRESULT STDMETHODCALLTYPE CreateStackWalk( /* [out] */ ICorDebugStackWalk **ppStackWalk) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetActiveInternalFrames( + + virtual HRESULT STDMETHODCALLTYPE GetActiveInternalFrames( /* [in] */ ULONG32 cInternalFrames, /* [out] */ ULONG32 *pcInternalFrames, /* [length_is][size_is][out][in] */ ICorDebugInternalFrame2 *ppInternalFrames[ ]) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugThread3Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugThread3 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugThread3 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugThread3 * This); - - HRESULT ( STDMETHODCALLTYPE *CreateStackWalk )( + + HRESULT ( STDMETHODCALLTYPE *CreateStackWalk )( ICorDebugThread3 * This, /* [out] */ ICorDebugStackWalk **ppStackWalk); - - HRESULT ( STDMETHODCALLTYPE *GetActiveInternalFrames )( + + HRESULT ( STDMETHODCALLTYPE *GetActiveInternalFrames )( ICorDebugThread3 * This, /* [in] */ ULONG32 cInternalFrames, /* [out] */ ULONG32 *pcInternalFrames, /* [length_is][size_is][out][in] */ ICorDebugInternalFrame2 *ppInternalFrames[ ]); - + END_INTERFACE } ICorDebugThread3Vtbl; @@ -9627,93 +9628,93 @@ EXTERN_C const IID IID_ICorDebugThread3; CONST_VTBL struct ICorDebugThread3Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugThread3_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugThread3_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugThread3_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugThread3_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugThread3_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugThread3_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugThread3_CreateStackWalk(This,ppStackWalk) \ - ( (This)->lpVtbl -> CreateStackWalk(This,ppStackWalk) ) +#define ICorDebugThread3_CreateStackWalk(This,ppStackWalk) \ + ( (This)->lpVtbl -> CreateStackWalk(This,ppStackWalk) ) -#define ICorDebugThread3_GetActiveInternalFrames(This,cInternalFrames,pcInternalFrames,ppInternalFrames) \ - ( (This)->lpVtbl -> GetActiveInternalFrames(This,cInternalFrames,pcInternalFrames,ppInternalFrames) ) +#define ICorDebugThread3_GetActiveInternalFrames(This,cInternalFrames,pcInternalFrames,ppInternalFrames) \ + ( (This)->lpVtbl -> GetActiveInternalFrames(This,cInternalFrames,pcInternalFrames,ppInternalFrames) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugThread3_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugThread3_INTERFACE_DEFINED__ */ #ifndef __ICorDebugThread4_INTERFACE_DEFINED__ #define __ICorDebugThread4_INTERFACE_DEFINED__ /* interface ICorDebugThread4 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugThread4; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("1A1F204B-1C66-4637-823F-3EE6C744A69C") ICorDebugThread4 : public IUnknown { public: virtual HRESULT STDMETHODCALLTYPE HasUnhandledException( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetBlockingObjects( + + virtual HRESULT STDMETHODCALLTYPE GetBlockingObjects( /* [out] */ ICorDebugBlockingObjectEnum **ppBlockingObjectEnum) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCurrentCustomDebuggerNotification( + + virtual HRESULT STDMETHODCALLTYPE GetCurrentCustomDebuggerNotification( /* [out] */ ICorDebugValue **ppNotificationObject) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugThread4Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugThread4 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugThread4 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugThread4 * This); - - HRESULT ( STDMETHODCALLTYPE *HasUnhandledException )( + + HRESULT ( STDMETHODCALLTYPE *HasUnhandledException )( ICorDebugThread4 * This); - - HRESULT ( STDMETHODCALLTYPE *GetBlockingObjects )( + + HRESULT ( STDMETHODCALLTYPE *GetBlockingObjects )( ICorDebugThread4 * This, /* [out] */ ICorDebugBlockingObjectEnum **ppBlockingObjectEnum); - - HRESULT ( STDMETHODCALLTYPE *GetCurrentCustomDebuggerNotification )( + + HRESULT ( STDMETHODCALLTYPE *GetCurrentCustomDebuggerNotification )( ICorDebugThread4 * This, /* [out] */ ICorDebugValue **ppNotificationObject); - + END_INTERFACE } ICorDebugThread4Vtbl; @@ -9722,120 +9723,120 @@ EXTERN_C const IID IID_ICorDebugThread4; CONST_VTBL struct ICorDebugThread4Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugThread4_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugThread4_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugThread4_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugThread4_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugThread4_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugThread4_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugThread4_HasUnhandledException(This) \ - ( (This)->lpVtbl -> HasUnhandledException(This) ) +#define ICorDebugThread4_HasUnhandledException(This) \ + ( (This)->lpVtbl -> HasUnhandledException(This) ) -#define ICorDebugThread4_GetBlockingObjects(This,ppBlockingObjectEnum) \ - ( (This)->lpVtbl -> GetBlockingObjects(This,ppBlockingObjectEnum) ) +#define ICorDebugThread4_GetBlockingObjects(This,ppBlockingObjectEnum) \ + ( (This)->lpVtbl -> GetBlockingObjects(This,ppBlockingObjectEnum) ) -#define ICorDebugThread4_GetCurrentCustomDebuggerNotification(This,ppNotificationObject) \ - ( (This)->lpVtbl -> GetCurrentCustomDebuggerNotification(This,ppNotificationObject) ) +#define ICorDebugThread4_GetCurrentCustomDebuggerNotification(This,ppNotificationObject) \ + ( (This)->lpVtbl -> GetCurrentCustomDebuggerNotification(This,ppNotificationObject) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugThread4_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugThread4_INTERFACE_DEFINED__ */ #ifndef __ICorDebugStackWalk_INTERFACE_DEFINED__ #define __ICorDebugStackWalk_INTERFACE_DEFINED__ /* interface ICorDebugStackWalk */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ -typedef +typedef enum CorDebugSetContextFlag { - SET_CONTEXT_FLAG_ACTIVE_FRAME = 0x1, - SET_CONTEXT_FLAG_UNWIND_FRAME = 0x2 - } CorDebugSetContextFlag; + SET_CONTEXT_FLAG_ACTIVE_FRAME = 0x1, + SET_CONTEXT_FLAG_UNWIND_FRAME = 0x2 + } CorDebugSetContextFlag; EXTERN_C const IID IID_ICorDebugStackWalk; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("A0647DE9-55DE-4816-929C-385271C64CF7") ICorDebugStackWalk : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetContext( + virtual HRESULT STDMETHODCALLTYPE GetContext( /* [in] */ ULONG32 contextFlags, /* [in] */ ULONG32 contextBufSize, /* [out] */ ULONG32 *contextSize, /* [size_is][out] */ BYTE contextBuf[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetContext( + + virtual HRESULT STDMETHODCALLTYPE SetContext( /* [in] */ CorDebugSetContextFlag flag, /* [in] */ ULONG32 contextSize, /* [size_is][in] */ BYTE context[ ]) = 0; - + virtual HRESULT STDMETHODCALLTYPE Next( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetFrame( + + virtual HRESULT STDMETHODCALLTYPE GetFrame( /* [out] */ ICorDebugFrame **pFrame) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugStackWalkVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugStackWalk * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugStackWalk * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugStackWalk * This); - - HRESULT ( STDMETHODCALLTYPE *GetContext )( + + HRESULT ( STDMETHODCALLTYPE *GetContext )( ICorDebugStackWalk * This, /* [in] */ ULONG32 contextFlags, /* [in] */ ULONG32 contextBufSize, /* [out] */ ULONG32 *contextSize, /* [size_is][out] */ BYTE contextBuf[ ]); - - HRESULT ( STDMETHODCALLTYPE *SetContext )( + + HRESULT ( STDMETHODCALLTYPE *SetContext )( ICorDebugStackWalk * This, /* [in] */ CorDebugSetContextFlag flag, /* [in] */ ULONG32 contextSize, /* [size_is][in] */ BYTE context[ ]); - - HRESULT ( STDMETHODCALLTYPE *Next )( + + HRESULT ( STDMETHODCALLTYPE *Next )( ICorDebugStackWalk * This); - - HRESULT ( STDMETHODCALLTYPE *GetFrame )( + + HRESULT ( STDMETHODCALLTYPE *GetFrame )( ICorDebugStackWalk * This, /* [out] */ ICorDebugFrame **pFrame); - + END_INTERFACE } ICorDebugStackWalkVtbl; @@ -9844,184 +9845,184 @@ EXTERN_C const IID IID_ICorDebugStackWalk; CONST_VTBL struct ICorDebugStackWalkVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugStackWalk_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugStackWalk_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugStackWalk_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugStackWalk_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugStackWalk_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugStackWalk_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugStackWalk_GetContext(This,contextFlags,contextBufSize,contextSize,contextBuf) \ - ( (This)->lpVtbl -> GetContext(This,contextFlags,contextBufSize,contextSize,contextBuf) ) +#define ICorDebugStackWalk_GetContext(This,contextFlags,contextBufSize,contextSize,contextBuf) \ + ( (This)->lpVtbl -> GetContext(This,contextFlags,contextBufSize,contextSize,contextBuf) ) -#define ICorDebugStackWalk_SetContext(This,flag,contextSize,context) \ - ( (This)->lpVtbl -> SetContext(This,flag,contextSize,context) ) +#define ICorDebugStackWalk_SetContext(This,flag,contextSize,context) \ + ( (This)->lpVtbl -> SetContext(This,flag,contextSize,context) ) -#define ICorDebugStackWalk_Next(This) \ - ( (This)->lpVtbl -> Next(This) ) +#define ICorDebugStackWalk_Next(This) \ + ( (This)->lpVtbl -> Next(This) ) -#define ICorDebugStackWalk_GetFrame(This,pFrame) \ - ( (This)->lpVtbl -> GetFrame(This,pFrame) ) +#define ICorDebugStackWalk_GetFrame(This,pFrame) \ + ( (This)->lpVtbl -> GetFrame(This,pFrame) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugStackWalk_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugStackWalk_INTERFACE_DEFINED__ */ #ifndef __ICorDebugChain_INTERFACE_DEFINED__ #define __ICorDebugChain_INTERFACE_DEFINED__ /* interface ICorDebugChain */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ -typedef +typedef enum CorDebugChainReason { - CHAIN_NONE = 0, - CHAIN_CLASS_INIT = 0x1, - CHAIN_EXCEPTION_FILTER = 0x2, - CHAIN_SECURITY = 0x4, - CHAIN_CONTEXT_POLICY = 0x8, - CHAIN_INTERCEPTION = 0x10, - CHAIN_PROCESS_START = 0x20, - CHAIN_THREAD_START = 0x40, - CHAIN_ENTER_MANAGED = 0x80, - CHAIN_ENTER_UNMANAGED = 0x100, - CHAIN_DEBUGGER_EVAL = 0x200, - CHAIN_CONTEXT_SWITCH = 0x400, - CHAIN_FUNC_EVAL = 0x800 - } CorDebugChainReason; + CHAIN_NONE = 0, + CHAIN_CLASS_INIT = 0x1, + CHAIN_EXCEPTION_FILTER = 0x2, + CHAIN_SECURITY = 0x4, + CHAIN_CONTEXT_POLICY = 0x8, + CHAIN_INTERCEPTION = 0x10, + CHAIN_PROCESS_START = 0x20, + CHAIN_THREAD_START = 0x40, + CHAIN_ENTER_MANAGED = 0x80, + CHAIN_ENTER_UNMANAGED = 0x100, + CHAIN_DEBUGGER_EVAL = 0x200, + CHAIN_CONTEXT_SWITCH = 0x400, + CHAIN_FUNC_EVAL = 0x800 + } CorDebugChainReason; EXTERN_C const IID IID_ICorDebugChain; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("CC7BCAEE-8A68-11d2-983C-0000F808342D") ICorDebugChain : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetThread( + virtual HRESULT STDMETHODCALLTYPE GetThread( /* [out] */ ICorDebugThread **ppThread) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetStackRange( + + virtual HRESULT STDMETHODCALLTYPE GetStackRange( /* [out] */ CORDB_ADDRESS *pStart, /* [out] */ CORDB_ADDRESS *pEnd) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetContext( + + virtual HRESULT STDMETHODCALLTYPE GetContext( /* [out] */ ICorDebugContext **ppContext) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCaller( + + virtual HRESULT STDMETHODCALLTYPE GetCaller( /* [out] */ ICorDebugChain **ppChain) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCallee( + + virtual HRESULT STDMETHODCALLTYPE GetCallee( /* [out] */ ICorDebugChain **ppChain) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetPrevious( + + virtual HRESULT STDMETHODCALLTYPE GetPrevious( /* [out] */ ICorDebugChain **ppChain) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetNext( + + virtual HRESULT STDMETHODCALLTYPE GetNext( /* [out] */ ICorDebugChain **ppChain) = 0; - - virtual HRESULT STDMETHODCALLTYPE IsManaged( + + virtual HRESULT STDMETHODCALLTYPE IsManaged( /* [out] */ BOOL *pManaged) = 0; - - virtual HRESULT STDMETHODCALLTYPE EnumerateFrames( + + virtual HRESULT STDMETHODCALLTYPE EnumerateFrames( /* [out] */ ICorDebugFrameEnum **ppFrames) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetActiveFrame( + + virtual HRESULT STDMETHODCALLTYPE GetActiveFrame( /* [out] */ ICorDebugFrame **ppFrame) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetRegisterSet( + + virtual HRESULT STDMETHODCALLTYPE GetRegisterSet( /* [out] */ ICorDebugRegisterSet **ppRegisters) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetReason( + + virtual HRESULT STDMETHODCALLTYPE GetReason( /* [out] */ CorDebugChainReason *pReason) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugChainVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugChain * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugChain * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugChain * This); - - HRESULT ( STDMETHODCALLTYPE *GetThread )( + + HRESULT ( STDMETHODCALLTYPE *GetThread )( ICorDebugChain * This, /* [out] */ ICorDebugThread **ppThread); - - HRESULT ( STDMETHODCALLTYPE *GetStackRange )( + + HRESULT ( STDMETHODCALLTYPE *GetStackRange )( ICorDebugChain * This, /* [out] */ CORDB_ADDRESS *pStart, /* [out] */ CORDB_ADDRESS *pEnd); - - HRESULT ( STDMETHODCALLTYPE *GetContext )( + + HRESULT ( STDMETHODCALLTYPE *GetContext )( ICorDebugChain * This, /* [out] */ ICorDebugContext **ppContext); - - HRESULT ( STDMETHODCALLTYPE *GetCaller )( + + HRESULT ( STDMETHODCALLTYPE *GetCaller )( ICorDebugChain * This, /* [out] */ ICorDebugChain **ppChain); - - HRESULT ( STDMETHODCALLTYPE *GetCallee )( + + HRESULT ( STDMETHODCALLTYPE *GetCallee )( ICorDebugChain * This, /* [out] */ ICorDebugChain **ppChain); - - HRESULT ( STDMETHODCALLTYPE *GetPrevious )( + + HRESULT ( STDMETHODCALLTYPE *GetPrevious )( ICorDebugChain * This, /* [out] */ ICorDebugChain **ppChain); - - HRESULT ( STDMETHODCALLTYPE *GetNext )( + + HRESULT ( STDMETHODCALLTYPE *GetNext )( ICorDebugChain * This, /* [out] */ ICorDebugChain **ppChain); - - HRESULT ( STDMETHODCALLTYPE *IsManaged )( + + HRESULT ( STDMETHODCALLTYPE *IsManaged )( ICorDebugChain * This, /* [out] */ BOOL *pManaged); - - HRESULT ( STDMETHODCALLTYPE *EnumerateFrames )( + + HRESULT ( STDMETHODCALLTYPE *EnumerateFrames )( ICorDebugChain * This, /* [out] */ ICorDebugFrameEnum **ppFrames); - - HRESULT ( STDMETHODCALLTYPE *GetActiveFrame )( + + HRESULT ( STDMETHODCALLTYPE *GetActiveFrame )( ICorDebugChain * This, /* [out] */ ICorDebugFrame **ppFrame); - - HRESULT ( STDMETHODCALLTYPE *GetRegisterSet )( + + HRESULT ( STDMETHODCALLTYPE *GetRegisterSet )( ICorDebugChain * This, /* [out] */ ICorDebugRegisterSet **ppRegisters); - - HRESULT ( STDMETHODCALLTYPE *GetReason )( + + HRESULT ( STDMETHODCALLTYPE *GetReason )( ICorDebugChain * This, /* [out] */ CorDebugChainReason *pReason); - + END_INTERFACE } ICorDebugChainVtbl; @@ -10030,162 +10031,162 @@ EXTERN_C const IID IID_ICorDebugChain; CONST_VTBL struct ICorDebugChainVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugChain_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugChain_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugChain_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugChain_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugChain_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugChain_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugChain_GetThread(This,ppThread) \ - ( (This)->lpVtbl -> GetThread(This,ppThread) ) +#define ICorDebugChain_GetThread(This,ppThread) \ + ( (This)->lpVtbl -> GetThread(This,ppThread) ) -#define ICorDebugChain_GetStackRange(This,pStart,pEnd) \ - ( (This)->lpVtbl -> GetStackRange(This,pStart,pEnd) ) +#define ICorDebugChain_GetStackRange(This,pStart,pEnd) \ + ( (This)->lpVtbl -> GetStackRange(This,pStart,pEnd) ) -#define ICorDebugChain_GetContext(This,ppContext) \ - ( (This)->lpVtbl -> GetContext(This,ppContext) ) +#define ICorDebugChain_GetContext(This,ppContext) \ + ( (This)->lpVtbl -> GetContext(This,ppContext) ) -#define ICorDebugChain_GetCaller(This,ppChain) \ - ( (This)->lpVtbl -> GetCaller(This,ppChain) ) +#define ICorDebugChain_GetCaller(This,ppChain) \ + ( (This)->lpVtbl -> GetCaller(This,ppChain) ) -#define ICorDebugChain_GetCallee(This,ppChain) \ - ( (This)->lpVtbl -> GetCallee(This,ppChain) ) +#define ICorDebugChain_GetCallee(This,ppChain) \ + ( (This)->lpVtbl -> GetCallee(This,ppChain) ) -#define ICorDebugChain_GetPrevious(This,ppChain) \ - ( (This)->lpVtbl -> GetPrevious(This,ppChain) ) +#define ICorDebugChain_GetPrevious(This,ppChain) \ + ( (This)->lpVtbl -> GetPrevious(This,ppChain) ) -#define ICorDebugChain_GetNext(This,ppChain) \ - ( (This)->lpVtbl -> GetNext(This,ppChain) ) +#define ICorDebugChain_GetNext(This,ppChain) \ + ( (This)->lpVtbl -> GetNext(This,ppChain) ) -#define ICorDebugChain_IsManaged(This,pManaged) \ - ( (This)->lpVtbl -> IsManaged(This,pManaged) ) +#define ICorDebugChain_IsManaged(This,pManaged) \ + ( (This)->lpVtbl -> IsManaged(This,pManaged) ) -#define ICorDebugChain_EnumerateFrames(This,ppFrames) \ - ( (This)->lpVtbl -> EnumerateFrames(This,ppFrames) ) +#define ICorDebugChain_EnumerateFrames(This,ppFrames) \ + ( (This)->lpVtbl -> EnumerateFrames(This,ppFrames) ) -#define ICorDebugChain_GetActiveFrame(This,ppFrame) \ - ( (This)->lpVtbl -> GetActiveFrame(This,ppFrame) ) +#define ICorDebugChain_GetActiveFrame(This,ppFrame) \ + ( (This)->lpVtbl -> GetActiveFrame(This,ppFrame) ) -#define ICorDebugChain_GetRegisterSet(This,ppRegisters) \ - ( (This)->lpVtbl -> GetRegisterSet(This,ppRegisters) ) +#define ICorDebugChain_GetRegisterSet(This,ppRegisters) \ + ( (This)->lpVtbl -> GetRegisterSet(This,ppRegisters) ) -#define ICorDebugChain_GetReason(This,pReason) \ - ( (This)->lpVtbl -> GetReason(This,pReason) ) +#define ICorDebugChain_GetReason(This,pReason) \ + ( (This)->lpVtbl -> GetReason(This,pReason) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugChain_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugChain_INTERFACE_DEFINED__ */ #ifndef __ICorDebugFrame_INTERFACE_DEFINED__ #define __ICorDebugFrame_INTERFACE_DEFINED__ /* interface ICorDebugFrame */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugFrame; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("CC7BCAEF-8A68-11d2-983C-0000F808342D") ICorDebugFrame : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetChain( + virtual HRESULT STDMETHODCALLTYPE GetChain( /* [out] */ ICorDebugChain **ppChain) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCode( + + virtual HRESULT STDMETHODCALLTYPE GetCode( /* [out] */ ICorDebugCode **ppCode) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetFunction( + + virtual HRESULT STDMETHODCALLTYPE GetFunction( /* [out] */ ICorDebugFunction **ppFunction) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetFunctionToken( + + virtual HRESULT STDMETHODCALLTYPE GetFunctionToken( /* [out] */ mdMethodDef *pToken) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetStackRange( + + virtual HRESULT STDMETHODCALLTYPE GetStackRange( /* [out] */ CORDB_ADDRESS *pStart, /* [out] */ CORDB_ADDRESS *pEnd) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCaller( + + virtual HRESULT STDMETHODCALLTYPE GetCaller( /* [out] */ ICorDebugFrame **ppFrame) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCallee( + + virtual HRESULT STDMETHODCALLTYPE GetCallee( /* [out] */ ICorDebugFrame **ppFrame) = 0; - - virtual HRESULT STDMETHODCALLTYPE CreateStepper( + + virtual HRESULT STDMETHODCALLTYPE CreateStepper( /* [out] */ ICorDebugStepper **ppStepper) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugFrameVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugFrame * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugFrame * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugFrame * This); - - HRESULT ( STDMETHODCALLTYPE *GetChain )( + + HRESULT ( STDMETHODCALLTYPE *GetChain )( ICorDebugFrame * This, /* [out] */ ICorDebugChain **ppChain); - - HRESULT ( STDMETHODCALLTYPE *GetCode )( + + HRESULT ( STDMETHODCALLTYPE *GetCode )( ICorDebugFrame * This, /* [out] */ ICorDebugCode **ppCode); - - HRESULT ( STDMETHODCALLTYPE *GetFunction )( + + HRESULT ( STDMETHODCALLTYPE *GetFunction )( ICorDebugFrame * This, /* [out] */ ICorDebugFunction **ppFunction); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionToken )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionToken )( ICorDebugFrame * This, /* [out] */ mdMethodDef *pToken); - - HRESULT ( STDMETHODCALLTYPE *GetStackRange )( + + HRESULT ( STDMETHODCALLTYPE *GetStackRange )( ICorDebugFrame * This, /* [out] */ CORDB_ADDRESS *pStart, /* [out] */ CORDB_ADDRESS *pEnd); - - HRESULT ( STDMETHODCALLTYPE *GetCaller )( + + HRESULT ( STDMETHODCALLTYPE *GetCaller )( ICorDebugFrame * This, /* [out] */ ICorDebugFrame **ppFrame); - - HRESULT ( STDMETHODCALLTYPE *GetCallee )( + + HRESULT ( STDMETHODCALLTYPE *GetCallee )( ICorDebugFrame * This, /* [out] */ ICorDebugFrame **ppFrame); - - HRESULT ( STDMETHODCALLTYPE *CreateStepper )( + + HRESULT ( STDMETHODCALLTYPE *CreateStepper )( ICorDebugFrame * This, /* [out] */ ICorDebugStepper **ppStepper); - + END_INTERFACE } ICorDebugFrameVtbl; @@ -10194,148 +10195,148 @@ EXTERN_C const IID IID_ICorDebugFrame; CONST_VTBL struct ICorDebugFrameVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugFrame_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugFrame_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugFrame_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugFrame_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugFrame_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugFrame_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugFrame_GetChain(This,ppChain) \ - ( (This)->lpVtbl -> GetChain(This,ppChain) ) +#define ICorDebugFrame_GetChain(This,ppChain) \ + ( (This)->lpVtbl -> GetChain(This,ppChain) ) -#define ICorDebugFrame_GetCode(This,ppCode) \ - ( (This)->lpVtbl -> GetCode(This,ppCode) ) +#define ICorDebugFrame_GetCode(This,ppCode) \ + ( (This)->lpVtbl -> GetCode(This,ppCode) ) -#define ICorDebugFrame_GetFunction(This,ppFunction) \ - ( (This)->lpVtbl -> GetFunction(This,ppFunction) ) +#define ICorDebugFrame_GetFunction(This,ppFunction) \ + ( (This)->lpVtbl -> GetFunction(This,ppFunction) ) -#define ICorDebugFrame_GetFunctionToken(This,pToken) \ - ( (This)->lpVtbl -> GetFunctionToken(This,pToken) ) +#define ICorDebugFrame_GetFunctionToken(This,pToken) \ + ( (This)->lpVtbl -> GetFunctionToken(This,pToken) ) -#define ICorDebugFrame_GetStackRange(This,pStart,pEnd) \ - ( (This)->lpVtbl -> GetStackRange(This,pStart,pEnd) ) +#define ICorDebugFrame_GetStackRange(This,pStart,pEnd) \ + ( (This)->lpVtbl -> GetStackRange(This,pStart,pEnd) ) -#define ICorDebugFrame_GetCaller(This,ppFrame) \ - ( (This)->lpVtbl -> GetCaller(This,ppFrame) ) +#define ICorDebugFrame_GetCaller(This,ppFrame) \ + ( (This)->lpVtbl -> GetCaller(This,ppFrame) ) -#define ICorDebugFrame_GetCallee(This,ppFrame) \ - ( (This)->lpVtbl -> GetCallee(This,ppFrame) ) +#define ICorDebugFrame_GetCallee(This,ppFrame) \ + ( (This)->lpVtbl -> GetCallee(This,ppFrame) ) -#define ICorDebugFrame_CreateStepper(This,ppStepper) \ - ( (This)->lpVtbl -> CreateStepper(This,ppStepper) ) +#define ICorDebugFrame_CreateStepper(This,ppStepper) \ + ( (This)->lpVtbl -> CreateStepper(This,ppStepper) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugFrame_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugFrame_INTERFACE_DEFINED__ */ #ifndef __ICorDebugInternalFrame_INTERFACE_DEFINED__ #define __ICorDebugInternalFrame_INTERFACE_DEFINED__ /* interface ICorDebugInternalFrame */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ -typedef +typedef enum CorDebugInternalFrameType { - STUBFRAME_NONE = 0, - STUBFRAME_M2U = 0x1, - STUBFRAME_U2M = 0x2, - STUBFRAME_APPDOMAIN_TRANSITION = 0x3, - STUBFRAME_LIGHTWEIGHT_FUNCTION = 0x4, - STUBFRAME_FUNC_EVAL = 0x5, - STUBFRAME_INTERNALCALL = 0x6, - STUBFRAME_CLASS_INIT = 0x7, - STUBFRAME_EXCEPTION = 0x8, - STUBFRAME_SECURITY = 0x9, - STUBFRAME_JIT_COMPILATION = 0xa - } CorDebugInternalFrameType; + STUBFRAME_NONE = 0, + STUBFRAME_M2U = 0x1, + STUBFRAME_U2M = 0x2, + STUBFRAME_APPDOMAIN_TRANSITION = 0x3, + STUBFRAME_LIGHTWEIGHT_FUNCTION = 0x4, + STUBFRAME_FUNC_EVAL = 0x5, + STUBFRAME_INTERNALCALL = 0x6, + STUBFRAME_CLASS_INIT = 0x7, + STUBFRAME_EXCEPTION = 0x8, + STUBFRAME_SECURITY = 0x9, + STUBFRAME_JIT_COMPILATION = 0xa + } CorDebugInternalFrameType; EXTERN_C const IID IID_ICorDebugInternalFrame; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("B92CC7F7-9D2D-45c4-BC2B-621FCC9DFBF4") ICorDebugInternalFrame : public ICorDebugFrame { public: - virtual HRESULT STDMETHODCALLTYPE GetFrameType( + virtual HRESULT STDMETHODCALLTYPE GetFrameType( /* [out] */ CorDebugInternalFrameType *pType) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugInternalFrameVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugInternalFrame * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugInternalFrame * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugInternalFrame * This); - - HRESULT ( STDMETHODCALLTYPE *GetChain )( + + HRESULT ( STDMETHODCALLTYPE *GetChain )( ICorDebugInternalFrame * This, /* [out] */ ICorDebugChain **ppChain); - - HRESULT ( STDMETHODCALLTYPE *GetCode )( + + HRESULT ( STDMETHODCALLTYPE *GetCode )( ICorDebugInternalFrame * This, /* [out] */ ICorDebugCode **ppCode); - - HRESULT ( STDMETHODCALLTYPE *GetFunction )( + + HRESULT ( STDMETHODCALLTYPE *GetFunction )( ICorDebugInternalFrame * This, /* [out] */ ICorDebugFunction **ppFunction); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionToken )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionToken )( ICorDebugInternalFrame * This, /* [out] */ mdMethodDef *pToken); - - HRESULT ( STDMETHODCALLTYPE *GetStackRange )( + + HRESULT ( STDMETHODCALLTYPE *GetStackRange )( ICorDebugInternalFrame * This, /* [out] */ CORDB_ADDRESS *pStart, /* [out] */ CORDB_ADDRESS *pEnd); - - HRESULT ( STDMETHODCALLTYPE *GetCaller )( + + HRESULT ( STDMETHODCALLTYPE *GetCaller )( ICorDebugInternalFrame * This, /* [out] */ ICorDebugFrame **ppFrame); - - HRESULT ( STDMETHODCALLTYPE *GetCallee )( + + HRESULT ( STDMETHODCALLTYPE *GetCallee )( ICorDebugInternalFrame * This, /* [out] */ ICorDebugFrame **ppFrame); - - HRESULT ( STDMETHODCALLTYPE *CreateStepper )( + + HRESULT ( STDMETHODCALLTYPE *CreateStepper )( ICorDebugInternalFrame * This, /* [out] */ ICorDebugStepper **ppStepper); - - HRESULT ( STDMETHODCALLTYPE *GetFrameType )( + + HRESULT ( STDMETHODCALLTYPE *GetFrameType )( ICorDebugInternalFrame * This, /* [out] */ CorDebugInternalFrameType *pType); - + END_INTERFACE } ICorDebugInternalFrameVtbl; @@ -10344,112 +10345,112 @@ EXTERN_C const IID IID_ICorDebugInternalFrame; CONST_VTBL struct ICorDebugInternalFrameVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugInternalFrame_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugInternalFrame_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugInternalFrame_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugInternalFrame_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugInternalFrame_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugInternalFrame_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugInternalFrame_GetChain(This,ppChain) \ - ( (This)->lpVtbl -> GetChain(This,ppChain) ) +#define ICorDebugInternalFrame_GetChain(This,ppChain) \ + ( (This)->lpVtbl -> GetChain(This,ppChain) ) -#define ICorDebugInternalFrame_GetCode(This,ppCode) \ - ( (This)->lpVtbl -> GetCode(This,ppCode) ) +#define ICorDebugInternalFrame_GetCode(This,ppCode) \ + ( (This)->lpVtbl -> GetCode(This,ppCode) ) -#define ICorDebugInternalFrame_GetFunction(This,ppFunction) \ - ( (This)->lpVtbl -> GetFunction(This,ppFunction) ) +#define ICorDebugInternalFrame_GetFunction(This,ppFunction) \ + ( (This)->lpVtbl -> GetFunction(This,ppFunction) ) -#define ICorDebugInternalFrame_GetFunctionToken(This,pToken) \ - ( (This)->lpVtbl -> GetFunctionToken(This,pToken) ) +#define ICorDebugInternalFrame_GetFunctionToken(This,pToken) \ + ( (This)->lpVtbl -> GetFunctionToken(This,pToken) ) -#define ICorDebugInternalFrame_GetStackRange(This,pStart,pEnd) \ - ( (This)->lpVtbl -> GetStackRange(This,pStart,pEnd) ) +#define ICorDebugInternalFrame_GetStackRange(This,pStart,pEnd) \ + ( (This)->lpVtbl -> GetStackRange(This,pStart,pEnd) ) -#define ICorDebugInternalFrame_GetCaller(This,ppFrame) \ - ( (This)->lpVtbl -> GetCaller(This,ppFrame) ) +#define ICorDebugInternalFrame_GetCaller(This,ppFrame) \ + ( (This)->lpVtbl -> GetCaller(This,ppFrame) ) -#define ICorDebugInternalFrame_GetCallee(This,ppFrame) \ - ( (This)->lpVtbl -> GetCallee(This,ppFrame) ) +#define ICorDebugInternalFrame_GetCallee(This,ppFrame) \ + ( (This)->lpVtbl -> GetCallee(This,ppFrame) ) -#define ICorDebugInternalFrame_CreateStepper(This,ppStepper) \ - ( (This)->lpVtbl -> CreateStepper(This,ppStepper) ) +#define ICorDebugInternalFrame_CreateStepper(This,ppStepper) \ + ( (This)->lpVtbl -> CreateStepper(This,ppStepper) ) -#define ICorDebugInternalFrame_GetFrameType(This,pType) \ - ( (This)->lpVtbl -> GetFrameType(This,pType) ) +#define ICorDebugInternalFrame_GetFrameType(This,pType) \ + ( (This)->lpVtbl -> GetFrameType(This,pType) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugInternalFrame_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugInternalFrame_INTERFACE_DEFINED__ */ #ifndef __ICorDebugInternalFrame2_INTERFACE_DEFINED__ #define __ICorDebugInternalFrame2_INTERFACE_DEFINED__ /* interface ICorDebugInternalFrame2 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugInternalFrame2; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("C0815BDC-CFAB-447e-A779-C116B454EB5B") ICorDebugInternalFrame2 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetAddress( + virtual HRESULT STDMETHODCALLTYPE GetAddress( /* [out] */ CORDB_ADDRESS *pAddress) = 0; - - virtual HRESULT STDMETHODCALLTYPE IsCloserToLeaf( + + virtual HRESULT STDMETHODCALLTYPE IsCloserToLeaf( /* [in] */ ICorDebugFrame *pFrameToCompare, /* [out] */ BOOL *pIsCloser) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugInternalFrame2Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugInternalFrame2 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugInternalFrame2 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugInternalFrame2 * This); - - HRESULT ( STDMETHODCALLTYPE *GetAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetAddress )( ICorDebugInternalFrame2 * This, /* [out] */ CORDB_ADDRESS *pAddress); - - HRESULT ( STDMETHODCALLTYPE *IsCloserToLeaf )( + + HRESULT ( STDMETHODCALLTYPE *IsCloserToLeaf )( ICorDebugInternalFrame2 * This, /* [in] */ ICorDebugFrame *pFrameToCompare, /* [out] */ BOOL *pIsCloser); - + END_INTERFACE } ICorDebugInternalFrame2Vtbl; @@ -10458,189 +10459,189 @@ EXTERN_C const IID IID_ICorDebugInternalFrame2; CONST_VTBL struct ICorDebugInternalFrame2Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugInternalFrame2_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugInternalFrame2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugInternalFrame2_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugInternalFrame2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugInternalFrame2_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugInternalFrame2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugInternalFrame2_GetAddress(This,pAddress) \ - ( (This)->lpVtbl -> GetAddress(This,pAddress) ) +#define ICorDebugInternalFrame2_GetAddress(This,pAddress) \ + ( (This)->lpVtbl -> GetAddress(This,pAddress) ) -#define ICorDebugInternalFrame2_IsCloserToLeaf(This,pFrameToCompare,pIsCloser) \ - ( (This)->lpVtbl -> IsCloserToLeaf(This,pFrameToCompare,pIsCloser) ) +#define ICorDebugInternalFrame2_IsCloserToLeaf(This,pFrameToCompare,pIsCloser) \ + ( (This)->lpVtbl -> IsCloserToLeaf(This,pFrameToCompare,pIsCloser) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugInternalFrame2_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugInternalFrame2_INTERFACE_DEFINED__ */ #ifndef __ICorDebugILFrame_INTERFACE_DEFINED__ #define __ICorDebugILFrame_INTERFACE_DEFINED__ /* interface ICorDebugILFrame */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ -typedef +typedef enum CorDebugMappingResult { - MAPPING_PROLOG = 0x1, - MAPPING_EPILOG = 0x2, - MAPPING_NO_INFO = 0x4, - MAPPING_UNMAPPED_ADDRESS = 0x8, - MAPPING_EXACT = 0x10, - MAPPING_APPROXIMATE = 0x20 - } CorDebugMappingResult; + MAPPING_PROLOG = 0x1, + MAPPING_EPILOG = 0x2, + MAPPING_NO_INFO = 0x4, + MAPPING_UNMAPPED_ADDRESS = 0x8, + MAPPING_EXACT = 0x10, + MAPPING_APPROXIMATE = 0x20 + } CorDebugMappingResult; EXTERN_C const IID IID_ICorDebugILFrame; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("03E26311-4F76-11d3-88C6-006097945418") ICorDebugILFrame : public ICorDebugFrame { public: - virtual HRESULT STDMETHODCALLTYPE GetIP( + virtual HRESULT STDMETHODCALLTYPE GetIP( /* [out] */ ULONG32 *pnOffset, /* [out] */ CorDebugMappingResult *pMappingResult) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetIP( + + virtual HRESULT STDMETHODCALLTYPE SetIP( /* [in] */ ULONG32 nOffset) = 0; - - virtual HRESULT STDMETHODCALLTYPE EnumerateLocalVariables( + + virtual HRESULT STDMETHODCALLTYPE EnumerateLocalVariables( /* [out] */ ICorDebugValueEnum **ppValueEnum) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetLocalVariable( + + virtual HRESULT STDMETHODCALLTYPE GetLocalVariable( /* [in] */ DWORD dwIndex, /* [out] */ ICorDebugValue **ppValue) = 0; - - virtual HRESULT STDMETHODCALLTYPE EnumerateArguments( + + virtual HRESULT STDMETHODCALLTYPE EnumerateArguments( /* [out] */ ICorDebugValueEnum **ppValueEnum) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetArgument( + + virtual HRESULT STDMETHODCALLTYPE GetArgument( /* [in] */ DWORD dwIndex, /* [out] */ ICorDebugValue **ppValue) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetStackDepth( + + virtual HRESULT STDMETHODCALLTYPE GetStackDepth( /* [out] */ ULONG32 *pDepth) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetStackValue( + + virtual HRESULT STDMETHODCALLTYPE GetStackValue( /* [in] */ DWORD dwIndex, /* [out] */ ICorDebugValue **ppValue) = 0; - - virtual HRESULT STDMETHODCALLTYPE CanSetIP( + + virtual HRESULT STDMETHODCALLTYPE CanSetIP( /* [in] */ ULONG32 nOffset) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugILFrameVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugILFrame * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugILFrame * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugILFrame * This); - - HRESULT ( STDMETHODCALLTYPE *GetChain )( + + HRESULT ( STDMETHODCALLTYPE *GetChain )( ICorDebugILFrame * This, /* [out] */ ICorDebugChain **ppChain); - - HRESULT ( STDMETHODCALLTYPE *GetCode )( + + HRESULT ( STDMETHODCALLTYPE *GetCode )( ICorDebugILFrame * This, /* [out] */ ICorDebugCode **ppCode); - - HRESULT ( STDMETHODCALLTYPE *GetFunction )( + + HRESULT ( STDMETHODCALLTYPE *GetFunction )( ICorDebugILFrame * This, /* [out] */ ICorDebugFunction **ppFunction); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionToken )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionToken )( ICorDebugILFrame * This, /* [out] */ mdMethodDef *pToken); - - HRESULT ( STDMETHODCALLTYPE *GetStackRange )( + + HRESULT ( STDMETHODCALLTYPE *GetStackRange )( ICorDebugILFrame * This, /* [out] */ CORDB_ADDRESS *pStart, /* [out] */ CORDB_ADDRESS *pEnd); - - HRESULT ( STDMETHODCALLTYPE *GetCaller )( + + HRESULT ( STDMETHODCALLTYPE *GetCaller )( ICorDebugILFrame * This, /* [out] */ ICorDebugFrame **ppFrame); - - HRESULT ( STDMETHODCALLTYPE *GetCallee )( + + HRESULT ( STDMETHODCALLTYPE *GetCallee )( ICorDebugILFrame * This, /* [out] */ ICorDebugFrame **ppFrame); - - HRESULT ( STDMETHODCALLTYPE *CreateStepper )( + + HRESULT ( STDMETHODCALLTYPE *CreateStepper )( ICorDebugILFrame * This, /* [out] */ ICorDebugStepper **ppStepper); - - HRESULT ( STDMETHODCALLTYPE *GetIP )( + + HRESULT ( STDMETHODCALLTYPE *GetIP )( ICorDebugILFrame * This, /* [out] */ ULONG32 *pnOffset, /* [out] */ CorDebugMappingResult *pMappingResult); - - HRESULT ( STDMETHODCALLTYPE *SetIP )( + + HRESULT ( STDMETHODCALLTYPE *SetIP )( ICorDebugILFrame * This, /* [in] */ ULONG32 nOffset); - - HRESULT ( STDMETHODCALLTYPE *EnumerateLocalVariables )( + + HRESULT ( STDMETHODCALLTYPE *EnumerateLocalVariables )( ICorDebugILFrame * This, /* [out] */ ICorDebugValueEnum **ppValueEnum); - - HRESULT ( STDMETHODCALLTYPE *GetLocalVariable )( + + HRESULT ( STDMETHODCALLTYPE *GetLocalVariable )( ICorDebugILFrame * This, /* [in] */ DWORD dwIndex, /* [out] */ ICorDebugValue **ppValue); - - HRESULT ( STDMETHODCALLTYPE *EnumerateArguments )( + + HRESULT ( STDMETHODCALLTYPE *EnumerateArguments )( ICorDebugILFrame * This, /* [out] */ ICorDebugValueEnum **ppValueEnum); - - HRESULT ( STDMETHODCALLTYPE *GetArgument )( + + HRESULT ( STDMETHODCALLTYPE *GetArgument )( ICorDebugILFrame * This, /* [in] */ DWORD dwIndex, /* [out] */ ICorDebugValue **ppValue); - - HRESULT ( STDMETHODCALLTYPE *GetStackDepth )( + + HRESULT ( STDMETHODCALLTYPE *GetStackDepth )( ICorDebugILFrame * This, /* [out] */ ULONG32 *pDepth); - - HRESULT ( STDMETHODCALLTYPE *GetStackValue )( + + HRESULT ( STDMETHODCALLTYPE *GetStackValue )( ICorDebugILFrame * This, /* [in] */ DWORD dwIndex, /* [out] */ ICorDebugValue **ppValue); - - HRESULT ( STDMETHODCALLTYPE *CanSetIP )( + + HRESULT ( STDMETHODCALLTYPE *CanSetIP )( ICorDebugILFrame * This, /* [in] */ ULONG32 nOffset); - + END_INTERFACE } ICorDebugILFrameVtbl; @@ -10649,134 +10650,134 @@ EXTERN_C const IID IID_ICorDebugILFrame; CONST_VTBL struct ICorDebugILFrameVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugILFrame_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugILFrame_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugILFrame_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugILFrame_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugILFrame_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugILFrame_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugILFrame_GetChain(This,ppChain) \ - ( (This)->lpVtbl -> GetChain(This,ppChain) ) +#define ICorDebugILFrame_GetChain(This,ppChain) \ + ( (This)->lpVtbl -> GetChain(This,ppChain) ) -#define ICorDebugILFrame_GetCode(This,ppCode) \ - ( (This)->lpVtbl -> GetCode(This,ppCode) ) +#define ICorDebugILFrame_GetCode(This,ppCode) \ + ( (This)->lpVtbl -> GetCode(This,ppCode) ) -#define ICorDebugILFrame_GetFunction(This,ppFunction) \ - ( (This)->lpVtbl -> GetFunction(This,ppFunction) ) +#define ICorDebugILFrame_GetFunction(This,ppFunction) \ + ( (This)->lpVtbl -> GetFunction(This,ppFunction) ) -#define ICorDebugILFrame_GetFunctionToken(This,pToken) \ - ( (This)->lpVtbl -> GetFunctionToken(This,pToken) ) +#define ICorDebugILFrame_GetFunctionToken(This,pToken) \ + ( (This)->lpVtbl -> GetFunctionToken(This,pToken) ) -#define ICorDebugILFrame_GetStackRange(This,pStart,pEnd) \ - ( (This)->lpVtbl -> GetStackRange(This,pStart,pEnd) ) +#define ICorDebugILFrame_GetStackRange(This,pStart,pEnd) \ + ( (This)->lpVtbl -> GetStackRange(This,pStart,pEnd) ) -#define ICorDebugILFrame_GetCaller(This,ppFrame) \ - ( (This)->lpVtbl -> GetCaller(This,ppFrame) ) +#define ICorDebugILFrame_GetCaller(This,ppFrame) \ + ( (This)->lpVtbl -> GetCaller(This,ppFrame) ) -#define ICorDebugILFrame_GetCallee(This,ppFrame) \ - ( (This)->lpVtbl -> GetCallee(This,ppFrame) ) +#define ICorDebugILFrame_GetCallee(This,ppFrame) \ + ( (This)->lpVtbl -> GetCallee(This,ppFrame) ) -#define ICorDebugILFrame_CreateStepper(This,ppStepper) \ - ( (This)->lpVtbl -> CreateStepper(This,ppStepper) ) +#define ICorDebugILFrame_CreateStepper(This,ppStepper) \ + ( (This)->lpVtbl -> CreateStepper(This,ppStepper) ) -#define ICorDebugILFrame_GetIP(This,pnOffset,pMappingResult) \ - ( (This)->lpVtbl -> GetIP(This,pnOffset,pMappingResult) ) +#define ICorDebugILFrame_GetIP(This,pnOffset,pMappingResult) \ + ( (This)->lpVtbl -> GetIP(This,pnOffset,pMappingResult) ) -#define ICorDebugILFrame_SetIP(This,nOffset) \ - ( (This)->lpVtbl -> SetIP(This,nOffset) ) +#define ICorDebugILFrame_SetIP(This,nOffset) \ + ( (This)->lpVtbl -> SetIP(This,nOffset) ) -#define ICorDebugILFrame_EnumerateLocalVariables(This,ppValueEnum) \ - ( (This)->lpVtbl -> EnumerateLocalVariables(This,ppValueEnum) ) +#define ICorDebugILFrame_EnumerateLocalVariables(This,ppValueEnum) \ + ( (This)->lpVtbl -> EnumerateLocalVariables(This,ppValueEnum) ) -#define ICorDebugILFrame_GetLocalVariable(This,dwIndex,ppValue) \ - ( (This)->lpVtbl -> GetLocalVariable(This,dwIndex,ppValue) ) +#define ICorDebugILFrame_GetLocalVariable(This,dwIndex,ppValue) \ + ( (This)->lpVtbl -> GetLocalVariable(This,dwIndex,ppValue) ) -#define ICorDebugILFrame_EnumerateArguments(This,ppValueEnum) \ - ( (This)->lpVtbl -> EnumerateArguments(This,ppValueEnum) ) +#define ICorDebugILFrame_EnumerateArguments(This,ppValueEnum) \ + ( (This)->lpVtbl -> EnumerateArguments(This,ppValueEnum) ) -#define ICorDebugILFrame_GetArgument(This,dwIndex,ppValue) \ - ( (This)->lpVtbl -> GetArgument(This,dwIndex,ppValue) ) +#define ICorDebugILFrame_GetArgument(This,dwIndex,ppValue) \ + ( (This)->lpVtbl -> GetArgument(This,dwIndex,ppValue) ) -#define ICorDebugILFrame_GetStackDepth(This,pDepth) \ - ( (This)->lpVtbl -> GetStackDepth(This,pDepth) ) +#define ICorDebugILFrame_GetStackDepth(This,pDepth) \ + ( (This)->lpVtbl -> GetStackDepth(This,pDepth) ) -#define ICorDebugILFrame_GetStackValue(This,dwIndex,ppValue) \ - ( (This)->lpVtbl -> GetStackValue(This,dwIndex,ppValue) ) +#define ICorDebugILFrame_GetStackValue(This,dwIndex,ppValue) \ + ( (This)->lpVtbl -> GetStackValue(This,dwIndex,ppValue) ) -#define ICorDebugILFrame_CanSetIP(This,nOffset) \ - ( (This)->lpVtbl -> CanSetIP(This,nOffset) ) +#define ICorDebugILFrame_CanSetIP(This,nOffset) \ + ( (This)->lpVtbl -> CanSetIP(This,nOffset) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugILFrame_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugILFrame_INTERFACE_DEFINED__ */ #ifndef __ICorDebugILFrame2_INTERFACE_DEFINED__ #define __ICorDebugILFrame2_INTERFACE_DEFINED__ /* interface ICorDebugILFrame2 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugILFrame2; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("5D88A994-6C30-479b-890F-BCEF88B129A5") ICorDebugILFrame2 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE RemapFunction( + virtual HRESULT STDMETHODCALLTYPE RemapFunction( /* [in] */ ULONG32 newILOffset) = 0; - - virtual HRESULT STDMETHODCALLTYPE EnumerateTypeParameters( + + virtual HRESULT STDMETHODCALLTYPE EnumerateTypeParameters( /* [out] */ ICorDebugTypeEnum **ppTyParEnum) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugILFrame2Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugILFrame2 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugILFrame2 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugILFrame2 * This); - - HRESULT ( STDMETHODCALLTYPE *RemapFunction )( + + HRESULT ( STDMETHODCALLTYPE *RemapFunction )( ICorDebugILFrame2 * This, /* [in] */ ULONG32 newILOffset); - - HRESULT ( STDMETHODCALLTYPE *EnumerateTypeParameters )( + + HRESULT ( STDMETHODCALLTYPE *EnumerateTypeParameters )( ICorDebugILFrame2 * This, /* [out] */ ICorDebugTypeEnum **ppTyParEnum); - + END_INTERFACE } ICorDebugILFrame2Vtbl; @@ -10785,83 +10786,83 @@ EXTERN_C const IID IID_ICorDebugILFrame2; CONST_VTBL struct ICorDebugILFrame2Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugILFrame2_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugILFrame2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugILFrame2_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugILFrame2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugILFrame2_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugILFrame2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugILFrame2_RemapFunction(This,newILOffset) \ - ( (This)->lpVtbl -> RemapFunction(This,newILOffset) ) +#define ICorDebugILFrame2_RemapFunction(This,newILOffset) \ + ( (This)->lpVtbl -> RemapFunction(This,newILOffset) ) -#define ICorDebugILFrame2_EnumerateTypeParameters(This,ppTyParEnum) \ - ( (This)->lpVtbl -> EnumerateTypeParameters(This,ppTyParEnum) ) +#define ICorDebugILFrame2_EnumerateTypeParameters(This,ppTyParEnum) \ + ( (This)->lpVtbl -> EnumerateTypeParameters(This,ppTyParEnum) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugILFrame2_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugILFrame2_INTERFACE_DEFINED__ */ #ifndef __ICorDebugILFrame3_INTERFACE_DEFINED__ #define __ICorDebugILFrame3_INTERFACE_DEFINED__ /* interface ICorDebugILFrame3 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugILFrame3; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("9A9E2ED6-04DF-4FE0-BB50-CAB64126AD24") ICorDebugILFrame3 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetReturnValueForILOffset( + virtual HRESULT STDMETHODCALLTYPE GetReturnValueForILOffset( ULONG32 ILoffset, /* [out] */ ICorDebugValue **ppReturnValue) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugILFrame3Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugILFrame3 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugILFrame3 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugILFrame3 * This); - - HRESULT ( STDMETHODCALLTYPE *GetReturnValueForILOffset )( + + HRESULT ( STDMETHODCALLTYPE *GetReturnValueForILOffset )( ICorDebugILFrame3 * This, ULONG32 ILoffset, /* [out] */ ICorDebugValue **ppReturnValue); - + END_INTERFACE } ICorDebugILFrame3Vtbl; @@ -10870,44 +10871,44 @@ EXTERN_C const IID IID_ICorDebugILFrame3; CONST_VTBL struct ICorDebugILFrame3Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugILFrame3_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugILFrame3_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugILFrame3_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugILFrame3_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugILFrame3_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugILFrame3_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugILFrame3_GetReturnValueForILOffset(This,ILoffset,ppReturnValue) \ - ( (This)->lpVtbl -> GetReturnValueForILOffset(This,ILoffset,ppReturnValue) ) +#define ICorDebugILFrame3_GetReturnValueForILOffset(This,ILoffset,ppReturnValue) \ + ( (This)->lpVtbl -> GetReturnValueForILOffset(This,ILoffset,ppReturnValue) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugILFrame3_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugILFrame3_INTERFACE_DEFINED__ */ /* interface __MIDL_itf_cordebug_0000_0067 */ -/* [local] */ +/* [local] */ -typedef +typedef enum ILCodeKind { - ILCODE_ORIGINAL_IL = 0x1, - ILCODE_REJIT_IL = 0x2 - } ILCodeKind; + ILCODE_ORIGINAL_IL = 0x1, + ILCODE_REJIT_IL = 0x2 + } ILCodeKind; @@ -10918,67 +10919,67 @@ extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0067_v0_0_s_ifspec; #define __ICorDebugILFrame4_INTERFACE_DEFINED__ /* interface ICorDebugILFrame4 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugILFrame4; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("AD914A30-C6D1-4AC5-9C5E-577F3BAA8A45") ICorDebugILFrame4 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE EnumerateLocalVariablesEx( + virtual HRESULT STDMETHODCALLTYPE EnumerateLocalVariablesEx( /* [in] */ ILCodeKind flags, /* [out] */ ICorDebugValueEnum **ppValueEnum) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetLocalVariableEx( + + virtual HRESULT STDMETHODCALLTYPE GetLocalVariableEx( /* [in] */ ILCodeKind flags, /* [in] */ DWORD dwIndex, /* [out] */ ICorDebugValue **ppValue) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCodeEx( + + virtual HRESULT STDMETHODCALLTYPE GetCodeEx( /* [in] */ ILCodeKind flags, /* [out] */ ICorDebugCode **ppCode) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugILFrame4Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugILFrame4 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugILFrame4 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugILFrame4 * This); - - HRESULT ( STDMETHODCALLTYPE *EnumerateLocalVariablesEx )( + + HRESULT ( STDMETHODCALLTYPE *EnumerateLocalVariablesEx )( ICorDebugILFrame4 * This, /* [in] */ ILCodeKind flags, /* [out] */ ICorDebugValueEnum **ppValueEnum); - - HRESULT ( STDMETHODCALLTYPE *GetLocalVariableEx )( + + HRESULT ( STDMETHODCALLTYPE *GetLocalVariableEx )( ICorDebugILFrame4 * This, /* [in] */ ILCodeKind flags, /* [in] */ DWORD dwIndex, /* [out] */ ICorDebugValue **ppValue); - - HRESULT ( STDMETHODCALLTYPE *GetCodeEx )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeEx )( ICorDebugILFrame4 * This, /* [in] */ ILCodeKind flags, /* [out] */ ICorDebugCode **ppCode); - + END_INTERFACE } ICorDebugILFrame4Vtbl; @@ -10987,209 +10988,209 @@ EXTERN_C const IID IID_ICorDebugILFrame4; CONST_VTBL struct ICorDebugILFrame4Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugILFrame4_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugILFrame4_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugILFrame4_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugILFrame4_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugILFrame4_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugILFrame4_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugILFrame4_EnumerateLocalVariablesEx(This,flags,ppValueEnum) \ - ( (This)->lpVtbl -> EnumerateLocalVariablesEx(This,flags,ppValueEnum) ) +#define ICorDebugILFrame4_EnumerateLocalVariablesEx(This,flags,ppValueEnum) \ + ( (This)->lpVtbl -> EnumerateLocalVariablesEx(This,flags,ppValueEnum) ) -#define ICorDebugILFrame4_GetLocalVariableEx(This,flags,dwIndex,ppValue) \ - ( (This)->lpVtbl -> GetLocalVariableEx(This,flags,dwIndex,ppValue) ) +#define ICorDebugILFrame4_GetLocalVariableEx(This,flags,dwIndex,ppValue) \ + ( (This)->lpVtbl -> GetLocalVariableEx(This,flags,dwIndex,ppValue) ) -#define ICorDebugILFrame4_GetCodeEx(This,flags,ppCode) \ - ( (This)->lpVtbl -> GetCodeEx(This,flags,ppCode) ) +#define ICorDebugILFrame4_GetCodeEx(This,flags,ppCode) \ + ( (This)->lpVtbl -> GetCodeEx(This,flags,ppCode) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugILFrame4_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugILFrame4_INTERFACE_DEFINED__ */ #ifndef __ICorDebugNativeFrame_INTERFACE_DEFINED__ #define __ICorDebugNativeFrame_INTERFACE_DEFINED__ /* interface ICorDebugNativeFrame */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugNativeFrame; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("03E26314-4F76-11d3-88C6-006097945418") ICorDebugNativeFrame : public ICorDebugFrame { public: - virtual HRESULT STDMETHODCALLTYPE GetIP( + virtual HRESULT STDMETHODCALLTYPE GetIP( /* [out] */ ULONG32 *pnOffset) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetIP( + + virtual HRESULT STDMETHODCALLTYPE SetIP( /* [in] */ ULONG32 nOffset) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetRegisterSet( + + virtual HRESULT STDMETHODCALLTYPE GetRegisterSet( /* [out] */ ICorDebugRegisterSet **ppRegisters) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetLocalRegisterValue( + + virtual HRESULT STDMETHODCALLTYPE GetLocalRegisterValue( /* [in] */ CorDebugRegister reg, /* [in] */ ULONG cbSigBlob, /* [in] */ PCCOR_SIGNATURE pvSigBlob, /* [out] */ ICorDebugValue **ppValue) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetLocalDoubleRegisterValue( + + virtual HRESULT STDMETHODCALLTYPE GetLocalDoubleRegisterValue( /* [in] */ CorDebugRegister highWordReg, /* [in] */ CorDebugRegister lowWordReg, /* [in] */ ULONG cbSigBlob, /* [in] */ PCCOR_SIGNATURE pvSigBlob, /* [out] */ ICorDebugValue **ppValue) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetLocalMemoryValue( + + virtual HRESULT STDMETHODCALLTYPE GetLocalMemoryValue( /* [in] */ CORDB_ADDRESS address, /* [in] */ ULONG cbSigBlob, /* [in] */ PCCOR_SIGNATURE pvSigBlob, /* [out] */ ICorDebugValue **ppValue) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetLocalRegisterMemoryValue( + + virtual HRESULT STDMETHODCALLTYPE GetLocalRegisterMemoryValue( /* [in] */ CorDebugRegister highWordReg, /* [in] */ CORDB_ADDRESS lowWordAddress, /* [in] */ ULONG cbSigBlob, /* [in] */ PCCOR_SIGNATURE pvSigBlob, /* [out] */ ICorDebugValue **ppValue) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetLocalMemoryRegisterValue( + + virtual HRESULT STDMETHODCALLTYPE GetLocalMemoryRegisterValue( /* [in] */ CORDB_ADDRESS highWordAddress, /* [in] */ CorDebugRegister lowWordRegister, /* [in] */ ULONG cbSigBlob, /* [in] */ PCCOR_SIGNATURE pvSigBlob, /* [out] */ ICorDebugValue **ppValue) = 0; - - virtual HRESULT STDMETHODCALLTYPE CanSetIP( + + virtual HRESULT STDMETHODCALLTYPE CanSetIP( /* [in] */ ULONG32 nOffset) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugNativeFrameVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugNativeFrame * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugNativeFrame * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugNativeFrame * This); - - HRESULT ( STDMETHODCALLTYPE *GetChain )( + + HRESULT ( STDMETHODCALLTYPE *GetChain )( ICorDebugNativeFrame * This, /* [out] */ ICorDebugChain **ppChain); - - HRESULT ( STDMETHODCALLTYPE *GetCode )( + + HRESULT ( STDMETHODCALLTYPE *GetCode )( ICorDebugNativeFrame * This, /* [out] */ ICorDebugCode **ppCode); - - HRESULT ( STDMETHODCALLTYPE *GetFunction )( + + HRESULT ( STDMETHODCALLTYPE *GetFunction )( ICorDebugNativeFrame * This, /* [out] */ ICorDebugFunction **ppFunction); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionToken )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionToken )( ICorDebugNativeFrame * This, /* [out] */ mdMethodDef *pToken); - - HRESULT ( STDMETHODCALLTYPE *GetStackRange )( + + HRESULT ( STDMETHODCALLTYPE *GetStackRange )( ICorDebugNativeFrame * This, /* [out] */ CORDB_ADDRESS *pStart, /* [out] */ CORDB_ADDRESS *pEnd); - - HRESULT ( STDMETHODCALLTYPE *GetCaller )( + + HRESULT ( STDMETHODCALLTYPE *GetCaller )( ICorDebugNativeFrame * This, /* [out] */ ICorDebugFrame **ppFrame); - - HRESULT ( STDMETHODCALLTYPE *GetCallee )( + + HRESULT ( STDMETHODCALLTYPE *GetCallee )( ICorDebugNativeFrame * This, /* [out] */ ICorDebugFrame **ppFrame); - - HRESULT ( STDMETHODCALLTYPE *CreateStepper )( + + HRESULT ( STDMETHODCALLTYPE *CreateStepper )( ICorDebugNativeFrame * This, /* [out] */ ICorDebugStepper **ppStepper); - - HRESULT ( STDMETHODCALLTYPE *GetIP )( + + HRESULT ( STDMETHODCALLTYPE *GetIP )( ICorDebugNativeFrame * This, /* [out] */ ULONG32 *pnOffset); - - HRESULT ( STDMETHODCALLTYPE *SetIP )( + + HRESULT ( STDMETHODCALLTYPE *SetIP )( ICorDebugNativeFrame * This, /* [in] */ ULONG32 nOffset); - - HRESULT ( STDMETHODCALLTYPE *GetRegisterSet )( + + HRESULT ( STDMETHODCALLTYPE *GetRegisterSet )( ICorDebugNativeFrame * This, /* [out] */ ICorDebugRegisterSet **ppRegisters); - - HRESULT ( STDMETHODCALLTYPE *GetLocalRegisterValue )( + + HRESULT ( STDMETHODCALLTYPE *GetLocalRegisterValue )( ICorDebugNativeFrame * This, /* [in] */ CorDebugRegister reg, /* [in] */ ULONG cbSigBlob, /* [in] */ PCCOR_SIGNATURE pvSigBlob, /* [out] */ ICorDebugValue **ppValue); - - HRESULT ( STDMETHODCALLTYPE *GetLocalDoubleRegisterValue )( + + HRESULT ( STDMETHODCALLTYPE *GetLocalDoubleRegisterValue )( ICorDebugNativeFrame * This, /* [in] */ CorDebugRegister highWordReg, /* [in] */ CorDebugRegister lowWordReg, /* [in] */ ULONG cbSigBlob, /* [in] */ PCCOR_SIGNATURE pvSigBlob, /* [out] */ ICorDebugValue **ppValue); - - HRESULT ( STDMETHODCALLTYPE *GetLocalMemoryValue )( + + HRESULT ( STDMETHODCALLTYPE *GetLocalMemoryValue )( ICorDebugNativeFrame * This, /* [in] */ CORDB_ADDRESS address, /* [in] */ ULONG cbSigBlob, /* [in] */ PCCOR_SIGNATURE pvSigBlob, /* [out] */ ICorDebugValue **ppValue); - - HRESULT ( STDMETHODCALLTYPE *GetLocalRegisterMemoryValue )( + + HRESULT ( STDMETHODCALLTYPE *GetLocalRegisterMemoryValue )( ICorDebugNativeFrame * This, /* [in] */ CorDebugRegister highWordReg, /* [in] */ CORDB_ADDRESS lowWordAddress, /* [in] */ ULONG cbSigBlob, /* [in] */ PCCOR_SIGNATURE pvSigBlob, /* [out] */ ICorDebugValue **ppValue); - - HRESULT ( STDMETHODCALLTYPE *GetLocalMemoryRegisterValue )( + + HRESULT ( STDMETHODCALLTYPE *GetLocalMemoryRegisterValue )( ICorDebugNativeFrame * This, /* [in] */ CORDB_ADDRESS highWordAddress, /* [in] */ CorDebugRegister lowWordRegister, /* [in] */ ULONG cbSigBlob, /* [in] */ PCCOR_SIGNATURE pvSigBlob, /* [out] */ ICorDebugValue **ppValue); - - HRESULT ( STDMETHODCALLTYPE *CanSetIP )( + + HRESULT ( STDMETHODCALLTYPE *CanSetIP )( ICorDebugNativeFrame * This, /* [in] */ ULONG32 nOffset); - + END_INTERFACE } ICorDebugNativeFrameVtbl; @@ -11198,89 +11199,89 @@ EXTERN_C const IID IID_ICorDebugNativeFrame; CONST_VTBL struct ICorDebugNativeFrameVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugNativeFrame_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugNativeFrame_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugNativeFrame_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugNativeFrame_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugNativeFrame_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugNativeFrame_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugNativeFrame_GetChain(This,ppChain) \ - ( (This)->lpVtbl -> GetChain(This,ppChain) ) +#define ICorDebugNativeFrame_GetChain(This,ppChain) \ + ( (This)->lpVtbl -> GetChain(This,ppChain) ) -#define ICorDebugNativeFrame_GetCode(This,ppCode) \ - ( (This)->lpVtbl -> GetCode(This,ppCode) ) +#define ICorDebugNativeFrame_GetCode(This,ppCode) \ + ( (This)->lpVtbl -> GetCode(This,ppCode) ) -#define ICorDebugNativeFrame_GetFunction(This,ppFunction) \ - ( (This)->lpVtbl -> GetFunction(This,ppFunction) ) +#define ICorDebugNativeFrame_GetFunction(This,ppFunction) \ + ( (This)->lpVtbl -> GetFunction(This,ppFunction) ) -#define ICorDebugNativeFrame_GetFunctionToken(This,pToken) \ - ( (This)->lpVtbl -> GetFunctionToken(This,pToken) ) +#define ICorDebugNativeFrame_GetFunctionToken(This,pToken) \ + ( (This)->lpVtbl -> GetFunctionToken(This,pToken) ) -#define ICorDebugNativeFrame_GetStackRange(This,pStart,pEnd) \ - ( (This)->lpVtbl -> GetStackRange(This,pStart,pEnd) ) +#define ICorDebugNativeFrame_GetStackRange(This,pStart,pEnd) \ + ( (This)->lpVtbl -> GetStackRange(This,pStart,pEnd) ) -#define ICorDebugNativeFrame_GetCaller(This,ppFrame) \ - ( (This)->lpVtbl -> GetCaller(This,ppFrame) ) +#define ICorDebugNativeFrame_GetCaller(This,ppFrame) \ + ( (This)->lpVtbl -> GetCaller(This,ppFrame) ) -#define ICorDebugNativeFrame_GetCallee(This,ppFrame) \ - ( (This)->lpVtbl -> GetCallee(This,ppFrame) ) +#define ICorDebugNativeFrame_GetCallee(This,ppFrame) \ + ( (This)->lpVtbl -> GetCallee(This,ppFrame) ) -#define ICorDebugNativeFrame_CreateStepper(This,ppStepper) \ - ( (This)->lpVtbl -> CreateStepper(This,ppStepper) ) +#define ICorDebugNativeFrame_CreateStepper(This,ppStepper) \ + ( (This)->lpVtbl -> CreateStepper(This,ppStepper) ) -#define ICorDebugNativeFrame_GetIP(This,pnOffset) \ - ( (This)->lpVtbl -> GetIP(This,pnOffset) ) +#define ICorDebugNativeFrame_GetIP(This,pnOffset) \ + ( (This)->lpVtbl -> GetIP(This,pnOffset) ) -#define ICorDebugNativeFrame_SetIP(This,nOffset) \ - ( (This)->lpVtbl -> SetIP(This,nOffset) ) +#define ICorDebugNativeFrame_SetIP(This,nOffset) \ + ( (This)->lpVtbl -> SetIP(This,nOffset) ) -#define ICorDebugNativeFrame_GetRegisterSet(This,ppRegisters) \ - ( (This)->lpVtbl -> GetRegisterSet(This,ppRegisters) ) +#define ICorDebugNativeFrame_GetRegisterSet(This,ppRegisters) \ + ( (This)->lpVtbl -> GetRegisterSet(This,ppRegisters) ) -#define ICorDebugNativeFrame_GetLocalRegisterValue(This,reg,cbSigBlob,pvSigBlob,ppValue) \ - ( (This)->lpVtbl -> GetLocalRegisterValue(This,reg,cbSigBlob,pvSigBlob,ppValue) ) +#define ICorDebugNativeFrame_GetLocalRegisterValue(This,reg,cbSigBlob,pvSigBlob,ppValue) \ + ( (This)->lpVtbl -> GetLocalRegisterValue(This,reg,cbSigBlob,pvSigBlob,ppValue) ) -#define ICorDebugNativeFrame_GetLocalDoubleRegisterValue(This,highWordReg,lowWordReg,cbSigBlob,pvSigBlob,ppValue) \ - ( (This)->lpVtbl -> GetLocalDoubleRegisterValue(This,highWordReg,lowWordReg,cbSigBlob,pvSigBlob,ppValue) ) +#define ICorDebugNativeFrame_GetLocalDoubleRegisterValue(This,highWordReg,lowWordReg,cbSigBlob,pvSigBlob,ppValue) \ + ( (This)->lpVtbl -> GetLocalDoubleRegisterValue(This,highWordReg,lowWordReg,cbSigBlob,pvSigBlob,ppValue) ) -#define ICorDebugNativeFrame_GetLocalMemoryValue(This,address,cbSigBlob,pvSigBlob,ppValue) \ - ( (This)->lpVtbl -> GetLocalMemoryValue(This,address,cbSigBlob,pvSigBlob,ppValue) ) +#define ICorDebugNativeFrame_GetLocalMemoryValue(This,address,cbSigBlob,pvSigBlob,ppValue) \ + ( (This)->lpVtbl -> GetLocalMemoryValue(This,address,cbSigBlob,pvSigBlob,ppValue) ) -#define ICorDebugNativeFrame_GetLocalRegisterMemoryValue(This,highWordReg,lowWordAddress,cbSigBlob,pvSigBlob,ppValue) \ - ( (This)->lpVtbl -> GetLocalRegisterMemoryValue(This,highWordReg,lowWordAddress,cbSigBlob,pvSigBlob,ppValue) ) +#define ICorDebugNativeFrame_GetLocalRegisterMemoryValue(This,highWordReg,lowWordAddress,cbSigBlob,pvSigBlob,ppValue) \ + ( (This)->lpVtbl -> GetLocalRegisterMemoryValue(This,highWordReg,lowWordAddress,cbSigBlob,pvSigBlob,ppValue) ) -#define ICorDebugNativeFrame_GetLocalMemoryRegisterValue(This,highWordAddress,lowWordRegister,cbSigBlob,pvSigBlob,ppValue) \ - ( (This)->lpVtbl -> GetLocalMemoryRegisterValue(This,highWordAddress,lowWordRegister,cbSigBlob,pvSigBlob,ppValue) ) +#define ICorDebugNativeFrame_GetLocalMemoryRegisterValue(This,highWordAddress,lowWordRegister,cbSigBlob,pvSigBlob,ppValue) \ + ( (This)->lpVtbl -> GetLocalMemoryRegisterValue(This,highWordAddress,lowWordRegister,cbSigBlob,pvSigBlob,ppValue) ) -#define ICorDebugNativeFrame_CanSetIP(This,nOffset) \ - ( (This)->lpVtbl -> CanSetIP(This,nOffset) ) +#define ICorDebugNativeFrame_CanSetIP(This,nOffset) \ + ( (This)->lpVtbl -> CanSetIP(This,nOffset) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugNativeFrame_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugNativeFrame_INTERFACE_DEFINED__ */ /* interface __MIDL_itf_cordebug_0000_0069 */ -/* [local] */ +/* [local] */ #pragma warning(push) -#pragma warning(disable:28718) +#pragma warning(disable:28718) extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0069_v0_0_c_ifspec; @@ -11290,61 +11291,61 @@ extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0069_v0_0_s_ifspec; #define __ICorDebugNativeFrame2_INTERFACE_DEFINED__ /* interface ICorDebugNativeFrame2 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugNativeFrame2; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("35389FF1-3684-4c55-A2EE-210F26C60E5E") ICorDebugNativeFrame2 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE IsChild( + virtual HRESULT STDMETHODCALLTYPE IsChild( /* [out] */ BOOL *pIsChild) = 0; - - virtual HRESULT STDMETHODCALLTYPE IsMatchingParentFrame( + + virtual HRESULT STDMETHODCALLTYPE IsMatchingParentFrame( /* [in] */ ICorDebugNativeFrame2 *pPotentialParentFrame, /* [out] */ BOOL *pIsParent) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetStackParameterSize( + + virtual HRESULT STDMETHODCALLTYPE GetStackParameterSize( /* [out] */ ULONG32 *pSize) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugNativeFrame2Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugNativeFrame2 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugNativeFrame2 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugNativeFrame2 * This); - - HRESULT ( STDMETHODCALLTYPE *IsChild )( + + HRESULT ( STDMETHODCALLTYPE *IsChild )( ICorDebugNativeFrame2 * This, /* [out] */ BOOL *pIsChild); - - HRESULT ( STDMETHODCALLTYPE *IsMatchingParentFrame )( + + HRESULT ( STDMETHODCALLTYPE *IsMatchingParentFrame )( ICorDebugNativeFrame2 * This, /* [in] */ ICorDebugNativeFrame2 *pPotentialParentFrame, /* [out] */ BOOL *pIsParent); - - HRESULT ( STDMETHODCALLTYPE *GetStackParameterSize )( + + HRESULT ( STDMETHODCALLTYPE *GetStackParameterSize )( ICorDebugNativeFrame2 * This, /* [out] */ ULONG32 *pSize); - + END_INTERFACE } ICorDebugNativeFrame2Vtbl; @@ -11353,86 +11354,86 @@ EXTERN_C const IID IID_ICorDebugNativeFrame2; CONST_VTBL struct ICorDebugNativeFrame2Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugNativeFrame2_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugNativeFrame2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugNativeFrame2_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugNativeFrame2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugNativeFrame2_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugNativeFrame2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugNativeFrame2_IsChild(This,pIsChild) \ - ( (This)->lpVtbl -> IsChild(This,pIsChild) ) +#define ICorDebugNativeFrame2_IsChild(This,pIsChild) \ + ( (This)->lpVtbl -> IsChild(This,pIsChild) ) -#define ICorDebugNativeFrame2_IsMatchingParentFrame(This,pPotentialParentFrame,pIsParent) \ - ( (This)->lpVtbl -> IsMatchingParentFrame(This,pPotentialParentFrame,pIsParent) ) +#define ICorDebugNativeFrame2_IsMatchingParentFrame(This,pPotentialParentFrame,pIsParent) \ + ( (This)->lpVtbl -> IsMatchingParentFrame(This,pPotentialParentFrame,pIsParent) ) -#define ICorDebugNativeFrame2_GetStackParameterSize(This,pSize) \ - ( (This)->lpVtbl -> GetStackParameterSize(This,pSize) ) +#define ICorDebugNativeFrame2_GetStackParameterSize(This,pSize) \ + ( (This)->lpVtbl -> GetStackParameterSize(This,pSize) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugNativeFrame2_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugNativeFrame2_INTERFACE_DEFINED__ */ #ifndef __ICorDebugModule3_INTERFACE_DEFINED__ #define __ICorDebugModule3_INTERFACE_DEFINED__ /* interface ICorDebugModule3 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugModule3; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("86F012BF-FF15-4372-BD30-B6F11CAAE1DD") ICorDebugModule3 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE CreateReaderForInMemorySymbols( + virtual HRESULT STDMETHODCALLTYPE CreateReaderForInMemorySymbols( /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppObj) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugModule3Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugModule3 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugModule3 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugModule3 * This); - - HRESULT ( STDMETHODCALLTYPE *CreateReaderForInMemorySymbols )( + + HRESULT ( STDMETHODCALLTYPE *CreateReaderForInMemorySymbols )( ICorDebugModule3 * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppObj); - + END_INTERFACE } ICorDebugModule3Vtbl; @@ -11441,104 +11442,104 @@ EXTERN_C const IID IID_ICorDebugModule3; CONST_VTBL struct ICorDebugModule3Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugModule3_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugModule3_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugModule3_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugModule3_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugModule3_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugModule3_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugModule3_CreateReaderForInMemorySymbols(This,riid,ppObj) \ - ( (This)->lpVtbl -> CreateReaderForInMemorySymbols(This,riid,ppObj) ) +#define ICorDebugModule3_CreateReaderForInMemorySymbols(This,riid,ppObj) \ + ( (This)->lpVtbl -> CreateReaderForInMemorySymbols(This,riid,ppObj) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugModule3_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugModule3_INTERFACE_DEFINED__ */ #ifndef __ICorDebugRuntimeUnwindableFrame_INTERFACE_DEFINED__ #define __ICorDebugRuntimeUnwindableFrame_INTERFACE_DEFINED__ /* interface ICorDebugRuntimeUnwindableFrame */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugRuntimeUnwindableFrame; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("879CAC0A-4A53-4668-B8E3-CB8473CB187F") ICorDebugRuntimeUnwindableFrame : public ICorDebugFrame { public: }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugRuntimeUnwindableFrameVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugRuntimeUnwindableFrame * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugRuntimeUnwindableFrame * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugRuntimeUnwindableFrame * This); - - HRESULT ( STDMETHODCALLTYPE *GetChain )( + + HRESULT ( STDMETHODCALLTYPE *GetChain )( ICorDebugRuntimeUnwindableFrame * This, /* [out] */ ICorDebugChain **ppChain); - - HRESULT ( STDMETHODCALLTYPE *GetCode )( + + HRESULT ( STDMETHODCALLTYPE *GetCode )( ICorDebugRuntimeUnwindableFrame * This, /* [out] */ ICorDebugCode **ppCode); - - HRESULT ( STDMETHODCALLTYPE *GetFunction )( + + HRESULT ( STDMETHODCALLTYPE *GetFunction )( ICorDebugRuntimeUnwindableFrame * This, /* [out] */ ICorDebugFunction **ppFunction); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionToken )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionToken )( ICorDebugRuntimeUnwindableFrame * This, /* [out] */ mdMethodDef *pToken); - - HRESULT ( STDMETHODCALLTYPE *GetStackRange )( + + HRESULT ( STDMETHODCALLTYPE *GetStackRange )( ICorDebugRuntimeUnwindableFrame * This, /* [out] */ CORDB_ADDRESS *pStart, /* [out] */ CORDB_ADDRESS *pEnd); - - HRESULT ( STDMETHODCALLTYPE *GetCaller )( + + HRESULT ( STDMETHODCALLTYPE *GetCaller )( ICorDebugRuntimeUnwindableFrame * This, /* [out] */ ICorDebugFrame **ppFrame); - - HRESULT ( STDMETHODCALLTYPE *GetCallee )( + + HRESULT ( STDMETHODCALLTYPE *GetCallee )( ICorDebugRuntimeUnwindableFrame * This, /* [out] */ ICorDebugFrame **ppFrame); - - HRESULT ( STDMETHODCALLTYPE *CreateStepper )( + + HRESULT ( STDMETHODCALLTYPE *CreateStepper )( ICorDebugRuntimeUnwindableFrame * This, /* [out] */ ICorDebugStepper **ppStepper); - + END_INTERFACE } ICorDebugRuntimeUnwindableFrameVtbl; @@ -11547,228 +11548,228 @@ EXTERN_C const IID IID_ICorDebugRuntimeUnwindableFrame; CONST_VTBL struct ICorDebugRuntimeUnwindableFrameVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugRuntimeUnwindableFrame_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugRuntimeUnwindableFrame_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugRuntimeUnwindableFrame_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugRuntimeUnwindableFrame_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugRuntimeUnwindableFrame_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugRuntimeUnwindableFrame_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugRuntimeUnwindableFrame_GetChain(This,ppChain) \ - ( (This)->lpVtbl -> GetChain(This,ppChain) ) +#define ICorDebugRuntimeUnwindableFrame_GetChain(This,ppChain) \ + ( (This)->lpVtbl -> GetChain(This,ppChain) ) -#define ICorDebugRuntimeUnwindableFrame_GetCode(This,ppCode) \ - ( (This)->lpVtbl -> GetCode(This,ppCode) ) +#define ICorDebugRuntimeUnwindableFrame_GetCode(This,ppCode) \ + ( (This)->lpVtbl -> GetCode(This,ppCode) ) -#define ICorDebugRuntimeUnwindableFrame_GetFunction(This,ppFunction) \ - ( (This)->lpVtbl -> GetFunction(This,ppFunction) ) +#define ICorDebugRuntimeUnwindableFrame_GetFunction(This,ppFunction) \ + ( (This)->lpVtbl -> GetFunction(This,ppFunction) ) -#define ICorDebugRuntimeUnwindableFrame_GetFunctionToken(This,pToken) \ - ( (This)->lpVtbl -> GetFunctionToken(This,pToken) ) +#define ICorDebugRuntimeUnwindableFrame_GetFunctionToken(This,pToken) \ + ( (This)->lpVtbl -> GetFunctionToken(This,pToken) ) -#define ICorDebugRuntimeUnwindableFrame_GetStackRange(This,pStart,pEnd) \ - ( (This)->lpVtbl -> GetStackRange(This,pStart,pEnd) ) +#define ICorDebugRuntimeUnwindableFrame_GetStackRange(This,pStart,pEnd) \ + ( (This)->lpVtbl -> GetStackRange(This,pStart,pEnd) ) -#define ICorDebugRuntimeUnwindableFrame_GetCaller(This,ppFrame) \ - ( (This)->lpVtbl -> GetCaller(This,ppFrame) ) +#define ICorDebugRuntimeUnwindableFrame_GetCaller(This,ppFrame) \ + ( (This)->lpVtbl -> GetCaller(This,ppFrame) ) -#define ICorDebugRuntimeUnwindableFrame_GetCallee(This,ppFrame) \ - ( (This)->lpVtbl -> GetCallee(This,ppFrame) ) +#define ICorDebugRuntimeUnwindableFrame_GetCallee(This,ppFrame) \ + ( (This)->lpVtbl -> GetCallee(This,ppFrame) ) -#define ICorDebugRuntimeUnwindableFrame_CreateStepper(This,ppStepper) \ - ( (This)->lpVtbl -> CreateStepper(This,ppStepper) ) +#define ICorDebugRuntimeUnwindableFrame_CreateStepper(This,ppStepper) \ + ( (This)->lpVtbl -> CreateStepper(This,ppStepper) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugRuntimeUnwindableFrame_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugRuntimeUnwindableFrame_INTERFACE_DEFINED__ */ #ifndef __ICorDebugModule_INTERFACE_DEFINED__ #define __ICorDebugModule_INTERFACE_DEFINED__ /* interface ICorDebugModule */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugModule; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("dba2d8c1-e5c5-4069-8c13-10a7c6abf43d") ICorDebugModule : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetProcess( + virtual HRESULT STDMETHODCALLTYPE GetProcess( /* [out] */ ICorDebugProcess **ppProcess) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetBaseAddress( + + virtual HRESULT STDMETHODCALLTYPE GetBaseAddress( /* [out] */ CORDB_ADDRESS *pAddress) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetAssembly( + + virtual HRESULT STDMETHODCALLTYPE GetAssembly( /* [out] */ ICorDebugAssembly **ppAssembly) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetName( + + virtual HRESULT STDMETHODCALLTYPE GetName( /* [in] */ ULONG32 cchName, /* [out] */ ULONG32 *pcchName, /* [length_is][size_is][out] */ WCHAR szName[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE EnableJITDebugging( + + virtual HRESULT STDMETHODCALLTYPE EnableJITDebugging( /* [in] */ BOOL bTrackJITInfo, /* [in] */ BOOL bAllowJitOpts) = 0; - - virtual HRESULT STDMETHODCALLTYPE EnableClassLoadCallbacks( + + virtual HRESULT STDMETHODCALLTYPE EnableClassLoadCallbacks( /* [in] */ BOOL bClassLoadCallbacks) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetFunctionFromToken( + + virtual HRESULT STDMETHODCALLTYPE GetFunctionFromToken( /* [in] */ mdMethodDef methodDef, /* [out] */ ICorDebugFunction **ppFunction) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetFunctionFromRVA( + + virtual HRESULT STDMETHODCALLTYPE GetFunctionFromRVA( /* [in] */ CORDB_ADDRESS rva, /* [out] */ ICorDebugFunction **ppFunction) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetClassFromToken( + + virtual HRESULT STDMETHODCALLTYPE GetClassFromToken( /* [in] */ mdTypeDef typeDef, /* [out] */ ICorDebugClass **ppClass) = 0; - - virtual HRESULT STDMETHODCALLTYPE CreateBreakpoint( + + virtual HRESULT STDMETHODCALLTYPE CreateBreakpoint( /* [out] */ ICorDebugModuleBreakpoint **ppBreakpoint) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetEditAndContinueSnapshot( + + virtual HRESULT STDMETHODCALLTYPE GetEditAndContinueSnapshot( /* [out] */ ICorDebugEditAndContinueSnapshot **ppEditAndContinueSnapshot) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetMetaDataInterface( + + virtual HRESULT STDMETHODCALLTYPE GetMetaDataInterface( /* [in] */ REFIID riid, /* [out] */ IUnknown **ppObj) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetToken( + + virtual HRESULT STDMETHODCALLTYPE GetToken( /* [out] */ mdModule *pToken) = 0; - - virtual HRESULT STDMETHODCALLTYPE IsDynamic( + + virtual HRESULT STDMETHODCALLTYPE IsDynamic( /* [out] */ BOOL *pDynamic) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetGlobalVariableValue( + + virtual HRESULT STDMETHODCALLTYPE GetGlobalVariableValue( /* [in] */ mdFieldDef fieldDef, /* [out] */ ICorDebugValue **ppValue) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetSize( + + virtual HRESULT STDMETHODCALLTYPE GetSize( /* [out] */ ULONG32 *pcBytes) = 0; - - virtual HRESULT STDMETHODCALLTYPE IsInMemory( + + virtual HRESULT STDMETHODCALLTYPE IsInMemory( /* [out] */ BOOL *pInMemory) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugModuleVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugModule * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugModule * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugModule * This); - - HRESULT ( STDMETHODCALLTYPE *GetProcess )( + + HRESULT ( STDMETHODCALLTYPE *GetProcess )( ICorDebugModule * This, /* [out] */ ICorDebugProcess **ppProcess); - - HRESULT ( STDMETHODCALLTYPE *GetBaseAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetBaseAddress )( ICorDebugModule * This, /* [out] */ CORDB_ADDRESS *pAddress); - - HRESULT ( STDMETHODCALLTYPE *GetAssembly )( + + HRESULT ( STDMETHODCALLTYPE *GetAssembly )( ICorDebugModule * This, /* [out] */ ICorDebugAssembly **ppAssembly); - - HRESULT ( STDMETHODCALLTYPE *GetName )( + + HRESULT ( STDMETHODCALLTYPE *GetName )( ICorDebugModule * This, /* [in] */ ULONG32 cchName, /* [out] */ ULONG32 *pcchName, /* [length_is][size_is][out] */ WCHAR szName[ ]); - - HRESULT ( STDMETHODCALLTYPE *EnableJITDebugging )( + + HRESULT ( STDMETHODCALLTYPE *EnableJITDebugging )( ICorDebugModule * This, /* [in] */ BOOL bTrackJITInfo, /* [in] */ BOOL bAllowJitOpts); - - HRESULT ( STDMETHODCALLTYPE *EnableClassLoadCallbacks )( + + HRESULT ( STDMETHODCALLTYPE *EnableClassLoadCallbacks )( ICorDebugModule * This, /* [in] */ BOOL bClassLoadCallbacks); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )( ICorDebugModule * This, /* [in] */ mdMethodDef methodDef, /* [out] */ ICorDebugFunction **ppFunction); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromRVA )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromRVA )( ICorDebugModule * This, /* [in] */ CORDB_ADDRESS rva, /* [out] */ ICorDebugFunction **ppFunction); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )( ICorDebugModule * This, /* [in] */ mdTypeDef typeDef, /* [out] */ ICorDebugClass **ppClass); - - HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )( + + HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )( ICorDebugModule * This, /* [out] */ ICorDebugModuleBreakpoint **ppBreakpoint); - - HRESULT ( STDMETHODCALLTYPE *GetEditAndContinueSnapshot )( + + HRESULT ( STDMETHODCALLTYPE *GetEditAndContinueSnapshot )( ICorDebugModule * This, /* [out] */ ICorDebugEditAndContinueSnapshot **ppEditAndContinueSnapshot); - - HRESULT ( STDMETHODCALLTYPE *GetMetaDataInterface )( + + HRESULT ( STDMETHODCALLTYPE *GetMetaDataInterface )( ICorDebugModule * This, /* [in] */ REFIID riid, /* [out] */ IUnknown **ppObj); - - HRESULT ( STDMETHODCALLTYPE *GetToken )( + + HRESULT ( STDMETHODCALLTYPE *GetToken )( ICorDebugModule * This, /* [out] */ mdModule *pToken); - - HRESULT ( STDMETHODCALLTYPE *IsDynamic )( + + HRESULT ( STDMETHODCALLTYPE *IsDynamic )( ICorDebugModule * This, /* [out] */ BOOL *pDynamic); - - HRESULT ( STDMETHODCALLTYPE *GetGlobalVariableValue )( + + HRESULT ( STDMETHODCALLTYPE *GetGlobalVariableValue )( ICorDebugModule * This, /* [in] */ mdFieldDef fieldDef, /* [out] */ ICorDebugValue **ppValue); - - HRESULT ( STDMETHODCALLTYPE *GetSize )( + + HRESULT ( STDMETHODCALLTYPE *GetSize )( ICorDebugModule * This, /* [out] */ ULONG32 *pcBytes); - - HRESULT ( STDMETHODCALLTYPE *IsInMemory )( + + HRESULT ( STDMETHODCALLTYPE *IsInMemory )( ICorDebugModule * This, /* [out] */ BOOL *pInMemory); - + END_INTERFACE } ICorDebugModuleVtbl; @@ -11777,85 +11778,85 @@ EXTERN_C const IID IID_ICorDebugModule; CONST_VTBL struct ICorDebugModuleVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugModule_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugModule_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugModule_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugModule_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugModule_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugModule_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugModule_GetProcess(This,ppProcess) \ - ( (This)->lpVtbl -> GetProcess(This,ppProcess) ) +#define ICorDebugModule_GetProcess(This,ppProcess) \ + ( (This)->lpVtbl -> GetProcess(This,ppProcess) ) -#define ICorDebugModule_GetBaseAddress(This,pAddress) \ - ( (This)->lpVtbl -> GetBaseAddress(This,pAddress) ) +#define ICorDebugModule_GetBaseAddress(This,pAddress) \ + ( (This)->lpVtbl -> GetBaseAddress(This,pAddress) ) -#define ICorDebugModule_GetAssembly(This,ppAssembly) \ - ( (This)->lpVtbl -> GetAssembly(This,ppAssembly) ) +#define ICorDebugModule_GetAssembly(This,ppAssembly) \ + ( (This)->lpVtbl -> GetAssembly(This,ppAssembly) ) -#define ICorDebugModule_GetName(This,cchName,pcchName,szName) \ - ( (This)->lpVtbl -> GetName(This,cchName,pcchName,szName) ) +#define ICorDebugModule_GetName(This,cchName,pcchName,szName) \ + ( (This)->lpVtbl -> GetName(This,cchName,pcchName,szName) ) -#define ICorDebugModule_EnableJITDebugging(This,bTrackJITInfo,bAllowJitOpts) \ - ( (This)->lpVtbl -> EnableJITDebugging(This,bTrackJITInfo,bAllowJitOpts) ) +#define ICorDebugModule_EnableJITDebugging(This,bTrackJITInfo,bAllowJitOpts) \ + ( (This)->lpVtbl -> EnableJITDebugging(This,bTrackJITInfo,bAllowJitOpts) ) -#define ICorDebugModule_EnableClassLoadCallbacks(This,bClassLoadCallbacks) \ - ( (This)->lpVtbl -> EnableClassLoadCallbacks(This,bClassLoadCallbacks) ) +#define ICorDebugModule_EnableClassLoadCallbacks(This,bClassLoadCallbacks) \ + ( (This)->lpVtbl -> EnableClassLoadCallbacks(This,bClassLoadCallbacks) ) -#define ICorDebugModule_GetFunctionFromToken(This,methodDef,ppFunction) \ - ( (This)->lpVtbl -> GetFunctionFromToken(This,methodDef,ppFunction) ) +#define ICorDebugModule_GetFunctionFromToken(This,methodDef,ppFunction) \ + ( (This)->lpVtbl -> GetFunctionFromToken(This,methodDef,ppFunction) ) -#define ICorDebugModule_GetFunctionFromRVA(This,rva,ppFunction) \ - ( (This)->lpVtbl -> GetFunctionFromRVA(This,rva,ppFunction) ) +#define ICorDebugModule_GetFunctionFromRVA(This,rva,ppFunction) \ + ( (This)->lpVtbl -> GetFunctionFromRVA(This,rva,ppFunction) ) -#define ICorDebugModule_GetClassFromToken(This,typeDef,ppClass) \ - ( (This)->lpVtbl -> GetClassFromToken(This,typeDef,ppClass) ) +#define ICorDebugModule_GetClassFromToken(This,typeDef,ppClass) \ + ( (This)->lpVtbl -> GetClassFromToken(This,typeDef,ppClass) ) -#define ICorDebugModule_CreateBreakpoint(This,ppBreakpoint) \ - ( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) ) +#define ICorDebugModule_CreateBreakpoint(This,ppBreakpoint) \ + ( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) ) -#define ICorDebugModule_GetEditAndContinueSnapshot(This,ppEditAndContinueSnapshot) \ - ( (This)->lpVtbl -> GetEditAndContinueSnapshot(This,ppEditAndContinueSnapshot) ) +#define ICorDebugModule_GetEditAndContinueSnapshot(This,ppEditAndContinueSnapshot) \ + ( (This)->lpVtbl -> GetEditAndContinueSnapshot(This,ppEditAndContinueSnapshot) ) -#define ICorDebugModule_GetMetaDataInterface(This,riid,ppObj) \ - ( (This)->lpVtbl -> GetMetaDataInterface(This,riid,ppObj) ) +#define ICorDebugModule_GetMetaDataInterface(This,riid,ppObj) \ + ( (This)->lpVtbl -> GetMetaDataInterface(This,riid,ppObj) ) -#define ICorDebugModule_GetToken(This,pToken) \ - ( (This)->lpVtbl -> GetToken(This,pToken) ) +#define ICorDebugModule_GetToken(This,pToken) \ + ( (This)->lpVtbl -> GetToken(This,pToken) ) -#define ICorDebugModule_IsDynamic(This,pDynamic) \ - ( (This)->lpVtbl -> IsDynamic(This,pDynamic) ) +#define ICorDebugModule_IsDynamic(This,pDynamic) \ + ( (This)->lpVtbl -> IsDynamic(This,pDynamic) ) -#define ICorDebugModule_GetGlobalVariableValue(This,fieldDef,ppValue) \ - ( (This)->lpVtbl -> GetGlobalVariableValue(This,fieldDef,ppValue) ) +#define ICorDebugModule_GetGlobalVariableValue(This,fieldDef,ppValue) \ + ( (This)->lpVtbl -> GetGlobalVariableValue(This,fieldDef,ppValue) ) -#define ICorDebugModule_GetSize(This,pcBytes) \ - ( (This)->lpVtbl -> GetSize(This,pcBytes) ) +#define ICorDebugModule_GetSize(This,pcBytes) \ + ( (This)->lpVtbl -> GetSize(This,pcBytes) ) -#define ICorDebugModule_IsInMemory(This,pInMemory) \ - ( (This)->lpVtbl -> IsInMemory(This,pInMemory) ) +#define ICorDebugModule_IsInMemory(This,pInMemory) \ + ( (This)->lpVtbl -> IsInMemory(This,pInMemory) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugModule_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugModule_INTERFACE_DEFINED__ */ /* interface __MIDL_itf_cordebug_0000_0073 */ -/* [local] */ +/* [local] */ #pragma warning(pop) @@ -11867,85 +11868,85 @@ extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0073_v0_0_s_ifspec; #define __ICorDebugModule2_INTERFACE_DEFINED__ /* interface ICorDebugModule2 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugModule2; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("7FCC5FB5-49C0-41de-9938-3B88B5B9ADD7") ICorDebugModule2 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE SetJMCStatus( + virtual HRESULT STDMETHODCALLTYPE SetJMCStatus( /* [in] */ BOOL bIsJustMyCode, /* [in] */ ULONG32 cTokens, /* [size_is][in] */ mdToken pTokens[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE ApplyChanges( + + virtual HRESULT STDMETHODCALLTYPE ApplyChanges( /* [in] */ ULONG cbMetadata, /* [size_is][in] */ BYTE pbMetadata[ ], /* [in] */ ULONG cbIL, /* [size_is][in] */ BYTE pbIL[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetJITCompilerFlags( + + virtual HRESULT STDMETHODCALLTYPE SetJITCompilerFlags( /* [in] */ DWORD dwFlags) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetJITCompilerFlags( + + virtual HRESULT STDMETHODCALLTYPE GetJITCompilerFlags( /* [out] */ DWORD *pdwFlags) = 0; - - virtual HRESULT STDMETHODCALLTYPE ResolveAssembly( + + virtual HRESULT STDMETHODCALLTYPE ResolveAssembly( /* [in] */ mdToken tkAssemblyRef, /* [out] */ ICorDebugAssembly **ppAssembly) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugModule2Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugModule2 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugModule2 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugModule2 * This); - - HRESULT ( STDMETHODCALLTYPE *SetJMCStatus )( + + HRESULT ( STDMETHODCALLTYPE *SetJMCStatus )( ICorDebugModule2 * This, /* [in] */ BOOL bIsJustMyCode, /* [in] */ ULONG32 cTokens, /* [size_is][in] */ mdToken pTokens[ ]); - - HRESULT ( STDMETHODCALLTYPE *ApplyChanges )( + + HRESULT ( STDMETHODCALLTYPE *ApplyChanges )( ICorDebugModule2 * This, /* [in] */ ULONG cbMetadata, /* [size_is][in] */ BYTE pbMetadata[ ], /* [in] */ ULONG cbIL, /* [size_is][in] */ BYTE pbIL[ ]); - - HRESULT ( STDMETHODCALLTYPE *SetJITCompilerFlags )( + + HRESULT ( STDMETHODCALLTYPE *SetJITCompilerFlags )( ICorDebugModule2 * This, /* [in] */ DWORD dwFlags); - - HRESULT ( STDMETHODCALLTYPE *GetJITCompilerFlags )( + + HRESULT ( STDMETHODCALLTYPE *GetJITCompilerFlags )( ICorDebugModule2 * This, /* [out] */ DWORD *pdwFlags); - - HRESULT ( STDMETHODCALLTYPE *ResolveAssembly )( + + HRESULT ( STDMETHODCALLTYPE *ResolveAssembly )( ICorDebugModule2 * This, /* [in] */ mdToken tkAssemblyRef, /* [out] */ ICorDebugAssembly **ppAssembly); - + END_INTERFACE } ICorDebugModule2Vtbl; @@ -11954,139 +11955,139 @@ EXTERN_C const IID IID_ICorDebugModule2; CONST_VTBL struct ICorDebugModule2Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugModule2_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugModule2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugModule2_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugModule2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugModule2_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugModule2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugModule2_SetJMCStatus(This,bIsJustMyCode,cTokens,pTokens) \ - ( (This)->lpVtbl -> SetJMCStatus(This,bIsJustMyCode,cTokens,pTokens) ) +#define ICorDebugModule2_SetJMCStatus(This,bIsJustMyCode,cTokens,pTokens) \ + ( (This)->lpVtbl -> SetJMCStatus(This,bIsJustMyCode,cTokens,pTokens) ) -#define ICorDebugModule2_ApplyChanges(This,cbMetadata,pbMetadata,cbIL,pbIL) \ - ( (This)->lpVtbl -> ApplyChanges(This,cbMetadata,pbMetadata,cbIL,pbIL) ) +#define ICorDebugModule2_ApplyChanges(This,cbMetadata,pbMetadata,cbIL,pbIL) \ + ( (This)->lpVtbl -> ApplyChanges(This,cbMetadata,pbMetadata,cbIL,pbIL) ) -#define ICorDebugModule2_SetJITCompilerFlags(This,dwFlags) \ - ( (This)->lpVtbl -> SetJITCompilerFlags(This,dwFlags) ) +#define ICorDebugModule2_SetJITCompilerFlags(This,dwFlags) \ + ( (This)->lpVtbl -> SetJITCompilerFlags(This,dwFlags) ) -#define ICorDebugModule2_GetJITCompilerFlags(This,pdwFlags) \ - ( (This)->lpVtbl -> GetJITCompilerFlags(This,pdwFlags) ) +#define ICorDebugModule2_GetJITCompilerFlags(This,pdwFlags) \ + ( (This)->lpVtbl -> GetJITCompilerFlags(This,pdwFlags) ) -#define ICorDebugModule2_ResolveAssembly(This,tkAssemblyRef,ppAssembly) \ - ( (This)->lpVtbl -> ResolveAssembly(This,tkAssemblyRef,ppAssembly) ) +#define ICorDebugModule2_ResolveAssembly(This,tkAssemblyRef,ppAssembly) \ + ( (This)->lpVtbl -> ResolveAssembly(This,tkAssemblyRef,ppAssembly) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugModule2_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugModule2_INTERFACE_DEFINED__ */ #ifndef __ICorDebugFunction_INTERFACE_DEFINED__ #define __ICorDebugFunction_INTERFACE_DEFINED__ /* interface ICorDebugFunction */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugFunction; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("CC7BCAF3-8A68-11d2-983C-0000F808342D") ICorDebugFunction : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetModule( + virtual HRESULT STDMETHODCALLTYPE GetModule( /* [out] */ ICorDebugModule **ppModule) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetClass( + + virtual HRESULT STDMETHODCALLTYPE GetClass( /* [out] */ ICorDebugClass **ppClass) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetToken( + + virtual HRESULT STDMETHODCALLTYPE GetToken( /* [out] */ mdMethodDef *pMethodDef) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetILCode( + + virtual HRESULT STDMETHODCALLTYPE GetILCode( /* [out] */ ICorDebugCode **ppCode) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetNativeCode( + + virtual HRESULT STDMETHODCALLTYPE GetNativeCode( /* [out] */ ICorDebugCode **ppCode) = 0; - - virtual HRESULT STDMETHODCALLTYPE CreateBreakpoint( + + virtual HRESULT STDMETHODCALLTYPE CreateBreakpoint( /* [out] */ ICorDebugFunctionBreakpoint **ppBreakpoint) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetLocalVarSigToken( + + virtual HRESULT STDMETHODCALLTYPE GetLocalVarSigToken( /* [out] */ mdSignature *pmdSig) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCurrentVersionNumber( + + virtual HRESULT STDMETHODCALLTYPE GetCurrentVersionNumber( /* [out] */ ULONG32 *pnCurrentVersion) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugFunctionVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugFunction * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugFunction * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugFunction * This); - - HRESULT ( STDMETHODCALLTYPE *GetModule )( + + HRESULT ( STDMETHODCALLTYPE *GetModule )( ICorDebugFunction * This, /* [out] */ ICorDebugModule **ppModule); - - HRESULT ( STDMETHODCALLTYPE *GetClass )( + + HRESULT ( STDMETHODCALLTYPE *GetClass )( ICorDebugFunction * This, /* [out] */ ICorDebugClass **ppClass); - - HRESULT ( STDMETHODCALLTYPE *GetToken )( + + HRESULT ( STDMETHODCALLTYPE *GetToken )( ICorDebugFunction * This, /* [out] */ mdMethodDef *pMethodDef); - - HRESULT ( STDMETHODCALLTYPE *GetILCode )( + + HRESULT ( STDMETHODCALLTYPE *GetILCode )( ICorDebugFunction * This, /* [out] */ ICorDebugCode **ppCode); - - HRESULT ( STDMETHODCALLTYPE *GetNativeCode )( + + HRESULT ( STDMETHODCALLTYPE *GetNativeCode )( ICorDebugFunction * This, /* [out] */ ICorDebugCode **ppCode); - - HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )( + + HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )( ICorDebugFunction * This, /* [out] */ ICorDebugFunctionBreakpoint **ppBreakpoint); - - HRESULT ( STDMETHODCALLTYPE *GetLocalVarSigToken )( + + HRESULT ( STDMETHODCALLTYPE *GetLocalVarSigToken )( ICorDebugFunction * This, /* [out] */ mdSignature *pmdSig); - - HRESULT ( STDMETHODCALLTYPE *GetCurrentVersionNumber )( + + HRESULT ( STDMETHODCALLTYPE *GetCurrentVersionNumber )( ICorDebugFunction * This, /* [out] */ ULONG32 *pnCurrentVersion); - + END_INTERFACE } ICorDebugFunctionVtbl; @@ -12095,120 +12096,120 @@ EXTERN_C const IID IID_ICorDebugFunction; CONST_VTBL struct ICorDebugFunctionVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugFunction_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugFunction_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugFunction_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugFunction_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugFunction_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugFunction_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugFunction_GetModule(This,ppModule) \ - ( (This)->lpVtbl -> GetModule(This,ppModule) ) +#define ICorDebugFunction_GetModule(This,ppModule) \ + ( (This)->lpVtbl -> GetModule(This,ppModule) ) -#define ICorDebugFunction_GetClass(This,ppClass) \ - ( (This)->lpVtbl -> GetClass(This,ppClass) ) +#define ICorDebugFunction_GetClass(This,ppClass) \ + ( (This)->lpVtbl -> GetClass(This,ppClass) ) -#define ICorDebugFunction_GetToken(This,pMethodDef) \ - ( (This)->lpVtbl -> GetToken(This,pMethodDef) ) +#define ICorDebugFunction_GetToken(This,pMethodDef) \ + ( (This)->lpVtbl -> GetToken(This,pMethodDef) ) -#define ICorDebugFunction_GetILCode(This,ppCode) \ - ( (This)->lpVtbl -> GetILCode(This,ppCode) ) +#define ICorDebugFunction_GetILCode(This,ppCode) \ + ( (This)->lpVtbl -> GetILCode(This,ppCode) ) -#define ICorDebugFunction_GetNativeCode(This,ppCode) \ - ( (This)->lpVtbl -> GetNativeCode(This,ppCode) ) +#define ICorDebugFunction_GetNativeCode(This,ppCode) \ + ( (This)->lpVtbl -> GetNativeCode(This,ppCode) ) -#define ICorDebugFunction_CreateBreakpoint(This,ppBreakpoint) \ - ( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) ) +#define ICorDebugFunction_CreateBreakpoint(This,ppBreakpoint) \ + ( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) ) -#define ICorDebugFunction_GetLocalVarSigToken(This,pmdSig) \ - ( (This)->lpVtbl -> GetLocalVarSigToken(This,pmdSig) ) +#define ICorDebugFunction_GetLocalVarSigToken(This,pmdSig) \ + ( (This)->lpVtbl -> GetLocalVarSigToken(This,pmdSig) ) -#define ICorDebugFunction_GetCurrentVersionNumber(This,pnCurrentVersion) \ - ( (This)->lpVtbl -> GetCurrentVersionNumber(This,pnCurrentVersion) ) +#define ICorDebugFunction_GetCurrentVersionNumber(This,pnCurrentVersion) \ + ( (This)->lpVtbl -> GetCurrentVersionNumber(This,pnCurrentVersion) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugFunction_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugFunction_INTERFACE_DEFINED__ */ #ifndef __ICorDebugFunction2_INTERFACE_DEFINED__ #define __ICorDebugFunction2_INTERFACE_DEFINED__ /* interface ICorDebugFunction2 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugFunction2; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("EF0C490B-94C3-4e4d-B629-DDC134C532D8") ICorDebugFunction2 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE SetJMCStatus( + virtual HRESULT STDMETHODCALLTYPE SetJMCStatus( /* [in] */ BOOL bIsJustMyCode) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetJMCStatus( + + virtual HRESULT STDMETHODCALLTYPE GetJMCStatus( /* [out] */ BOOL *pbIsJustMyCode) = 0; - - virtual HRESULT STDMETHODCALLTYPE EnumerateNativeCode( + + virtual HRESULT STDMETHODCALLTYPE EnumerateNativeCode( /* [out] */ ICorDebugCodeEnum **ppCodeEnum) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetVersionNumber( + + virtual HRESULT STDMETHODCALLTYPE GetVersionNumber( /* [out] */ ULONG32 *pnVersion) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugFunction2Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugFunction2 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugFunction2 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugFunction2 * This); - - HRESULT ( STDMETHODCALLTYPE *SetJMCStatus )( + + HRESULT ( STDMETHODCALLTYPE *SetJMCStatus )( ICorDebugFunction2 * This, /* [in] */ BOOL bIsJustMyCode); - - HRESULT ( STDMETHODCALLTYPE *GetJMCStatus )( + + HRESULT ( STDMETHODCALLTYPE *GetJMCStatus )( ICorDebugFunction2 * This, /* [out] */ BOOL *pbIsJustMyCode); - - HRESULT ( STDMETHODCALLTYPE *EnumerateNativeCode )( + + HRESULT ( STDMETHODCALLTYPE *EnumerateNativeCode )( ICorDebugFunction2 * This, /* [out] */ ICorDebugCodeEnum **ppCodeEnum); - - HRESULT ( STDMETHODCALLTYPE *GetVersionNumber )( + + HRESULT ( STDMETHODCALLTYPE *GetVersionNumber )( ICorDebugFunction2 * This, /* [out] */ ULONG32 *pnVersion); - + END_INTERFACE } ICorDebugFunction2Vtbl; @@ -12217,87 +12218,87 @@ EXTERN_C const IID IID_ICorDebugFunction2; CONST_VTBL struct ICorDebugFunction2Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugFunction2_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugFunction2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugFunction2_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugFunction2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugFunction2_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugFunction2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugFunction2_SetJMCStatus(This,bIsJustMyCode) \ - ( (This)->lpVtbl -> SetJMCStatus(This,bIsJustMyCode) ) +#define ICorDebugFunction2_SetJMCStatus(This,bIsJustMyCode) \ + ( (This)->lpVtbl -> SetJMCStatus(This,bIsJustMyCode) ) -#define ICorDebugFunction2_GetJMCStatus(This,pbIsJustMyCode) \ - ( (This)->lpVtbl -> GetJMCStatus(This,pbIsJustMyCode) ) +#define ICorDebugFunction2_GetJMCStatus(This,pbIsJustMyCode) \ + ( (This)->lpVtbl -> GetJMCStatus(This,pbIsJustMyCode) ) -#define ICorDebugFunction2_EnumerateNativeCode(This,ppCodeEnum) \ - ( (This)->lpVtbl -> EnumerateNativeCode(This,ppCodeEnum) ) +#define ICorDebugFunction2_EnumerateNativeCode(This,ppCodeEnum) \ + ( (This)->lpVtbl -> EnumerateNativeCode(This,ppCodeEnum) ) -#define ICorDebugFunction2_GetVersionNumber(This,pnVersion) \ - ( (This)->lpVtbl -> GetVersionNumber(This,pnVersion) ) +#define ICorDebugFunction2_GetVersionNumber(This,pnVersion) \ + ( (This)->lpVtbl -> GetVersionNumber(This,pnVersion) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugFunction2_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugFunction2_INTERFACE_DEFINED__ */ #ifndef __ICorDebugFunction3_INTERFACE_DEFINED__ #define __ICorDebugFunction3_INTERFACE_DEFINED__ /* interface ICorDebugFunction3 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugFunction3; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("09B70F28-E465-482D-99E0-81A165EB0532") ICorDebugFunction3 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetActiveReJitRequestILCode( + virtual HRESULT STDMETHODCALLTYPE GetActiveReJitRequestILCode( ICorDebugILCode **ppReJitedILCode) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugFunction3Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugFunction3 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugFunction3 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugFunction3 * This); - - HRESULT ( STDMETHODCALLTYPE *GetActiveReJitRequestILCode )( + + HRESULT ( STDMETHODCALLTYPE *GetActiveReJitRequestILCode )( ICorDebugFunction3 * This, ICorDebugILCode **ppReJitedILCode); - + END_INTERFACE } ICorDebugFunction3Vtbl; @@ -12306,78 +12307,78 @@ EXTERN_C const IID IID_ICorDebugFunction3; CONST_VTBL struct ICorDebugFunction3Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugFunction3_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugFunction3_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugFunction3_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugFunction3_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugFunction3_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugFunction3_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugFunction3_GetActiveReJitRequestILCode(This,ppReJitedILCode) \ - ( (This)->lpVtbl -> GetActiveReJitRequestILCode(This,ppReJitedILCode) ) +#define ICorDebugFunction3_GetActiveReJitRequestILCode(This,ppReJitedILCode) \ + ( (This)->lpVtbl -> GetActiveReJitRequestILCode(This,ppReJitedILCode) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugFunction3_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugFunction3_INTERFACE_DEFINED__ */ #ifndef __ICorDebugFunction4_INTERFACE_DEFINED__ #define __ICorDebugFunction4_INTERFACE_DEFINED__ /* interface ICorDebugFunction4 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugFunction4; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("72965963-34fd-46e9-9434-b817fe6e7f43") ICorDebugFunction4 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE CreateNativeBreakpoint( + virtual HRESULT STDMETHODCALLTYPE CreateNativeBreakpoint( ICorDebugFunctionBreakpoint **ppBreakpoint) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugFunction4Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugFunction4 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugFunction4 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugFunction4 * This); - - HRESULT ( STDMETHODCALLTYPE *CreateNativeBreakpoint )( + + HRESULT ( STDMETHODCALLTYPE *CreateNativeBreakpoint )( ICorDebugFunction4 * This, ICorDebugFunctionBreakpoint **ppBreakpoint); - + END_INTERFACE } ICorDebugFunction4Vtbl; @@ -12386,152 +12387,152 @@ EXTERN_C const IID IID_ICorDebugFunction4; CONST_VTBL struct ICorDebugFunction4Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugFunction4_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugFunction4_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugFunction4_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugFunction4_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugFunction4_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugFunction4_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugFunction4_CreateNativeBreakpoint(This,ppBreakpoint) \ - ( (This)->lpVtbl -> CreateNativeBreakpoint(This,ppBreakpoint) ) +#define ICorDebugFunction4_CreateNativeBreakpoint(This,ppBreakpoint) \ + ( (This)->lpVtbl -> CreateNativeBreakpoint(This,ppBreakpoint) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugFunction4_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugFunction4_INTERFACE_DEFINED__ */ #ifndef __ICorDebugCode_INTERFACE_DEFINED__ #define __ICorDebugCode_INTERFACE_DEFINED__ /* interface ICorDebugCode */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugCode; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("CC7BCAF4-8A68-11d2-983C-0000F808342D") ICorDebugCode : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE IsIL( + virtual HRESULT STDMETHODCALLTYPE IsIL( /* [out] */ BOOL *pbIL) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetFunction( + + virtual HRESULT STDMETHODCALLTYPE GetFunction( /* [out] */ ICorDebugFunction **ppFunction) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetAddress( + + virtual HRESULT STDMETHODCALLTYPE GetAddress( /* [out] */ CORDB_ADDRESS *pStart) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetSize( + + virtual HRESULT STDMETHODCALLTYPE GetSize( /* [out] */ ULONG32 *pcBytes) = 0; - - virtual HRESULT STDMETHODCALLTYPE CreateBreakpoint( + + virtual HRESULT STDMETHODCALLTYPE CreateBreakpoint( /* [in] */ ULONG32 offset, /* [out] */ ICorDebugFunctionBreakpoint **ppBreakpoint) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCode( + + virtual HRESULT STDMETHODCALLTYPE GetCode( /* [in] */ ULONG32 startOffset, /* [in] */ ULONG32 endOffset, /* [in] */ ULONG32 cBufferAlloc, /* [length_is][size_is][out] */ BYTE buffer[ ], /* [out] */ ULONG32 *pcBufferSize) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetVersionNumber( + + virtual HRESULT STDMETHODCALLTYPE GetVersionNumber( /* [out] */ ULONG32 *nVersion) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetILToNativeMapping( + + virtual HRESULT STDMETHODCALLTYPE GetILToNativeMapping( /* [in] */ ULONG32 cMap, /* [out] */ ULONG32 *pcMap, /* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetEnCRemapSequencePoints( + + virtual HRESULT STDMETHODCALLTYPE GetEnCRemapSequencePoints( /* [in] */ ULONG32 cMap, /* [out] */ ULONG32 *pcMap, /* [length_is][size_is][out] */ ULONG32 offsets[ ]) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugCodeVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugCode * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugCode * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugCode * This); - - HRESULT ( STDMETHODCALLTYPE *IsIL )( + + HRESULT ( STDMETHODCALLTYPE *IsIL )( ICorDebugCode * This, /* [out] */ BOOL *pbIL); - - HRESULT ( STDMETHODCALLTYPE *GetFunction )( + + HRESULT ( STDMETHODCALLTYPE *GetFunction )( ICorDebugCode * This, /* [out] */ ICorDebugFunction **ppFunction); - - HRESULT ( STDMETHODCALLTYPE *GetAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetAddress )( ICorDebugCode * This, /* [out] */ CORDB_ADDRESS *pStart); - - HRESULT ( STDMETHODCALLTYPE *GetSize )( + + HRESULT ( STDMETHODCALLTYPE *GetSize )( ICorDebugCode * This, /* [out] */ ULONG32 *pcBytes); - - HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )( + + HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )( ICorDebugCode * This, /* [in] */ ULONG32 offset, /* [out] */ ICorDebugFunctionBreakpoint **ppBreakpoint); - - HRESULT ( STDMETHODCALLTYPE *GetCode )( + + HRESULT ( STDMETHODCALLTYPE *GetCode )( ICorDebugCode * This, /* [in] */ ULONG32 startOffset, /* [in] */ ULONG32 endOffset, /* [in] */ ULONG32 cBufferAlloc, /* [length_is][size_is][out] */ BYTE buffer[ ], /* [out] */ ULONG32 *pcBufferSize); - - HRESULT ( STDMETHODCALLTYPE *GetVersionNumber )( + + HRESULT ( STDMETHODCALLTYPE *GetVersionNumber )( ICorDebugCode * This, /* [out] */ ULONG32 *nVersion); - - HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )( + + HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )( ICorDebugCode * This, /* [in] */ ULONG32 cMap, /* [out] */ ULONG32 *pcMap, /* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetEnCRemapSequencePoints )( + + HRESULT ( STDMETHODCALLTYPE *GetEnCRemapSequencePoints )( ICorDebugCode * This, /* [in] */ ULONG32 cMap, /* [out] */ ULONG32 *pcMap, /* [length_is][size_is][out] */ ULONG32 offsets[ ]); - + END_INTERFACE } ICorDebugCodeVtbl; @@ -12540,119 +12541,119 @@ EXTERN_C const IID IID_ICorDebugCode; CONST_VTBL struct ICorDebugCodeVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugCode_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugCode_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugCode_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugCode_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugCode_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugCode_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugCode_IsIL(This,pbIL) \ - ( (This)->lpVtbl -> IsIL(This,pbIL) ) +#define ICorDebugCode_IsIL(This,pbIL) \ + ( (This)->lpVtbl -> IsIL(This,pbIL) ) -#define ICorDebugCode_GetFunction(This,ppFunction) \ - ( (This)->lpVtbl -> GetFunction(This,ppFunction) ) +#define ICorDebugCode_GetFunction(This,ppFunction) \ + ( (This)->lpVtbl -> GetFunction(This,ppFunction) ) -#define ICorDebugCode_GetAddress(This,pStart) \ - ( (This)->lpVtbl -> GetAddress(This,pStart) ) +#define ICorDebugCode_GetAddress(This,pStart) \ + ( (This)->lpVtbl -> GetAddress(This,pStart) ) -#define ICorDebugCode_GetSize(This,pcBytes) \ - ( (This)->lpVtbl -> GetSize(This,pcBytes) ) +#define ICorDebugCode_GetSize(This,pcBytes) \ + ( (This)->lpVtbl -> GetSize(This,pcBytes) ) -#define ICorDebugCode_CreateBreakpoint(This,offset,ppBreakpoint) \ - ( (This)->lpVtbl -> CreateBreakpoint(This,offset,ppBreakpoint) ) +#define ICorDebugCode_CreateBreakpoint(This,offset,ppBreakpoint) \ + ( (This)->lpVtbl -> CreateBreakpoint(This,offset,ppBreakpoint) ) -#define ICorDebugCode_GetCode(This,startOffset,endOffset,cBufferAlloc,buffer,pcBufferSize) \ - ( (This)->lpVtbl -> GetCode(This,startOffset,endOffset,cBufferAlloc,buffer,pcBufferSize) ) +#define ICorDebugCode_GetCode(This,startOffset,endOffset,cBufferAlloc,buffer,pcBufferSize) \ + ( (This)->lpVtbl -> GetCode(This,startOffset,endOffset,cBufferAlloc,buffer,pcBufferSize) ) -#define ICorDebugCode_GetVersionNumber(This,nVersion) \ - ( (This)->lpVtbl -> GetVersionNumber(This,nVersion) ) +#define ICorDebugCode_GetVersionNumber(This,nVersion) \ + ( (This)->lpVtbl -> GetVersionNumber(This,nVersion) ) -#define ICorDebugCode_GetILToNativeMapping(This,cMap,pcMap,map) \ - ( (This)->lpVtbl -> GetILToNativeMapping(This,cMap,pcMap,map) ) +#define ICorDebugCode_GetILToNativeMapping(This,cMap,pcMap,map) \ + ( (This)->lpVtbl -> GetILToNativeMapping(This,cMap,pcMap,map) ) -#define ICorDebugCode_GetEnCRemapSequencePoints(This,cMap,pcMap,offsets) \ - ( (This)->lpVtbl -> GetEnCRemapSequencePoints(This,cMap,pcMap,offsets) ) +#define ICorDebugCode_GetEnCRemapSequencePoints(This,cMap,pcMap,offsets) \ + ( (This)->lpVtbl -> GetEnCRemapSequencePoints(This,cMap,pcMap,offsets) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugCode_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugCode_INTERFACE_DEFINED__ */ #ifndef __ICorDebugCode2_INTERFACE_DEFINED__ #define __ICorDebugCode2_INTERFACE_DEFINED__ /* interface ICorDebugCode2 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ typedef struct _CodeChunkInfo { CORDB_ADDRESS startAddr; ULONG32 length; - } CodeChunkInfo; + } CodeChunkInfo; EXTERN_C const IID IID_ICorDebugCode2; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("5F696509-452F-4436-A3FE-4D11FE7E2347") ICorDebugCode2 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetCodeChunks( + virtual HRESULT STDMETHODCALLTYPE GetCodeChunks( /* [in] */ ULONG32 cbufSize, /* [out] */ ULONG32 *pcnumChunks, /* [length_is][size_is][out] */ CodeChunkInfo chunks[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCompilerFlags( + + virtual HRESULT STDMETHODCALLTYPE GetCompilerFlags( /* [out] */ DWORD *pdwFlags) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugCode2Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugCode2 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugCode2 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugCode2 * This); - - HRESULT ( STDMETHODCALLTYPE *GetCodeChunks )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeChunks )( ICorDebugCode2 * This, /* [in] */ ULONG32 cbufSize, /* [out] */ ULONG32 *pcnumChunks, /* [length_is][size_is][out] */ CodeChunkInfo chunks[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetCompilerFlags )( + + HRESULT ( STDMETHODCALLTYPE *GetCompilerFlags )( ICorDebugCode2 * This, /* [out] */ DWORD *pdwFlags); - + END_INTERFACE } ICorDebugCode2Vtbl; @@ -12661,87 +12662,87 @@ EXTERN_C const IID IID_ICorDebugCode2; CONST_VTBL struct ICorDebugCode2Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugCode2_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugCode2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugCode2_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugCode2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugCode2_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugCode2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugCode2_GetCodeChunks(This,cbufSize,pcnumChunks,chunks) \ - ( (This)->lpVtbl -> GetCodeChunks(This,cbufSize,pcnumChunks,chunks) ) +#define ICorDebugCode2_GetCodeChunks(This,cbufSize,pcnumChunks,chunks) \ + ( (This)->lpVtbl -> GetCodeChunks(This,cbufSize,pcnumChunks,chunks) ) -#define ICorDebugCode2_GetCompilerFlags(This,pdwFlags) \ - ( (This)->lpVtbl -> GetCompilerFlags(This,pdwFlags) ) +#define ICorDebugCode2_GetCompilerFlags(This,pdwFlags) \ + ( (This)->lpVtbl -> GetCompilerFlags(This,pdwFlags) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugCode2_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugCode2_INTERFACE_DEFINED__ */ #ifndef __ICorDebugCode3_INTERFACE_DEFINED__ #define __ICorDebugCode3_INTERFACE_DEFINED__ /* interface ICorDebugCode3 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugCode3; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("D13D3E88-E1F2-4020-AA1D-3D162DCBE966") ICorDebugCode3 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetReturnValueLiveOffset( + virtual HRESULT STDMETHODCALLTYPE GetReturnValueLiveOffset( /* [in] */ ULONG32 ILoffset, /* [in] */ ULONG32 bufferSize, /* [out] */ ULONG32 *pFetched, /* [length_is][size_is][out] */ ULONG32 pOffsets[ ]) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugCode3Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugCode3 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugCode3 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugCode3 * This); - - HRESULT ( STDMETHODCALLTYPE *GetReturnValueLiveOffset )( + + HRESULT ( STDMETHODCALLTYPE *GetReturnValueLiveOffset )( ICorDebugCode3 * This, /* [in] */ ULONG32 ILoffset, /* [in] */ ULONG32 bufferSize, /* [out] */ ULONG32 *pFetched, /* [length_is][size_is][out] */ ULONG32 pOffsets[ ]); - + END_INTERFACE } ICorDebugCode3Vtbl; @@ -12750,78 +12751,78 @@ EXTERN_C const IID IID_ICorDebugCode3; CONST_VTBL struct ICorDebugCode3Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugCode3_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugCode3_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugCode3_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugCode3_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugCode3_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugCode3_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugCode3_GetReturnValueLiveOffset(This,ILoffset,bufferSize,pFetched,pOffsets) \ - ( (This)->lpVtbl -> GetReturnValueLiveOffset(This,ILoffset,bufferSize,pFetched,pOffsets) ) +#define ICorDebugCode3_GetReturnValueLiveOffset(This,ILoffset,bufferSize,pFetched,pOffsets) \ + ( (This)->lpVtbl -> GetReturnValueLiveOffset(This,ILoffset,bufferSize,pFetched,pOffsets) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugCode3_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugCode3_INTERFACE_DEFINED__ */ #ifndef __ICorDebugCode4_INTERFACE_DEFINED__ #define __ICorDebugCode4_INTERFACE_DEFINED__ /* interface ICorDebugCode4 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugCode4; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("18221fa4-20cb-40fa-b19d-9f91c4fa8c14") ICorDebugCode4 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE EnumerateVariableHomes( + virtual HRESULT STDMETHODCALLTYPE EnumerateVariableHomes( /* [out] */ ICorDebugVariableHomeEnum **ppEnum) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugCode4Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugCode4 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugCode4 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugCode4 * This); - - HRESULT ( STDMETHODCALLTYPE *EnumerateVariableHomes )( + + HRESULT ( STDMETHODCALLTYPE *EnumerateVariableHomes )( ICorDebugCode4 * This, /* [out] */ ICorDebugVariableHomeEnum **ppEnum); - + END_INTERFACE } ICorDebugCode4Vtbl; @@ -12830,40 +12831,40 @@ EXTERN_C const IID IID_ICorDebugCode4; CONST_VTBL struct ICorDebugCode4Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugCode4_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugCode4_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugCode4_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugCode4_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugCode4_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugCode4_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugCode4_EnumerateVariableHomes(This,ppEnum) \ - ( (This)->lpVtbl -> EnumerateVariableHomes(This,ppEnum) ) +#define ICorDebugCode4_EnumerateVariableHomes(This,ppEnum) \ + ( (This)->lpVtbl -> EnumerateVariableHomes(This,ppEnum) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugCode4_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugCode4_INTERFACE_DEFINED__ */ #ifndef __ICorDebugILCode_INTERFACE_DEFINED__ #define __ICorDebugILCode_INTERFACE_DEFINED__ /* interface ICorDebugILCode */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ typedef struct _CorDebugEHClause { @@ -12874,49 +12875,49 @@ typedef struct _CorDebugEHClause ULONG32 HandlerLength; ULONG32 ClassToken; ULONG32 FilterOffset; - } CorDebugEHClause; + } CorDebugEHClause; EXTERN_C const IID IID_ICorDebugILCode; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("598D46C2-C877-42A7-89D2-3D0C7F1C1264") ICorDebugILCode : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetEHClauses( + virtual HRESULT STDMETHODCALLTYPE GetEHClauses( /* [in] */ ULONG32 cClauses, /* [out] */ ULONG32 *pcClauses, /* [length_is][size_is][out] */ CorDebugEHClause clauses[ ]) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugILCodeVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugILCode * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugILCode * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugILCode * This); - - HRESULT ( STDMETHODCALLTYPE *GetEHClauses )( + + HRESULT ( STDMETHODCALLTYPE *GetEHClauses )( ICorDebugILCode * This, /* [in] */ ULONG32 cClauses, /* [out] */ ULONG32 *pcClauses, /* [length_is][size_is][out] */ CorDebugEHClause clauses[ ]); - + END_INTERFACE } ICorDebugILCodeVtbl; @@ -12925,89 +12926,89 @@ EXTERN_C const IID IID_ICorDebugILCode; CONST_VTBL struct ICorDebugILCodeVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugILCode_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugILCode_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugILCode_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugILCode_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugILCode_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugILCode_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugILCode_GetEHClauses(This,cClauses,pcClauses,clauses) \ - ( (This)->lpVtbl -> GetEHClauses(This,cClauses,pcClauses,clauses) ) +#define ICorDebugILCode_GetEHClauses(This,cClauses,pcClauses,clauses) \ + ( (This)->lpVtbl -> GetEHClauses(This,cClauses,pcClauses,clauses) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugILCode_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugILCode_INTERFACE_DEFINED__ */ #ifndef __ICorDebugILCode2_INTERFACE_DEFINED__ #define __ICorDebugILCode2_INTERFACE_DEFINED__ /* interface ICorDebugILCode2 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugILCode2; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("46586093-D3F5-4DB6-ACDB-955BCE228C15") ICorDebugILCode2 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetLocalVarSigToken( + virtual HRESULT STDMETHODCALLTYPE GetLocalVarSigToken( /* [out] */ mdSignature *pmdSig) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetInstrumentedILMap( + + virtual HRESULT STDMETHODCALLTYPE GetInstrumentedILMap( /* [in] */ ULONG32 cMap, /* [out] */ ULONG32 *pcMap, /* [length_is][size_is][out] */ COR_IL_MAP map[ ]) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugILCode2Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugILCode2 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugILCode2 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugILCode2 * This); - - HRESULT ( STDMETHODCALLTYPE *GetLocalVarSigToken )( + + HRESULT ( STDMETHODCALLTYPE *GetLocalVarSigToken )( ICorDebugILCode2 * This, /* [out] */ mdSignature *pmdSig); - - HRESULT ( STDMETHODCALLTYPE *GetInstrumentedILMap )( + + HRESULT ( STDMETHODCALLTYPE *GetInstrumentedILMap )( ICorDebugILCode2 * This, /* [in] */ ULONG32 cMap, /* [out] */ ULONG32 *pcMap, /* [length_is][size_is][out] */ COR_IL_MAP map[ ]); - + END_INTERFACE } ICorDebugILCode2Vtbl; @@ -13016,99 +13017,99 @@ EXTERN_C const IID IID_ICorDebugILCode2; CONST_VTBL struct ICorDebugILCode2Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugILCode2_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugILCode2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugILCode2_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugILCode2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugILCode2_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugILCode2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugILCode2_GetLocalVarSigToken(This,pmdSig) \ - ( (This)->lpVtbl -> GetLocalVarSigToken(This,pmdSig) ) +#define ICorDebugILCode2_GetLocalVarSigToken(This,pmdSig) \ + ( (This)->lpVtbl -> GetLocalVarSigToken(This,pmdSig) ) -#define ICorDebugILCode2_GetInstrumentedILMap(This,cMap,pcMap,map) \ - ( (This)->lpVtbl -> GetInstrumentedILMap(This,cMap,pcMap,map) ) +#define ICorDebugILCode2_GetInstrumentedILMap(This,cMap,pcMap,map) \ + ( (This)->lpVtbl -> GetInstrumentedILMap(This,cMap,pcMap,map) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugILCode2_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugILCode2_INTERFACE_DEFINED__ */ #ifndef __ICorDebugClass_INTERFACE_DEFINED__ #define __ICorDebugClass_INTERFACE_DEFINED__ /* interface ICorDebugClass */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugClass; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("CC7BCAF5-8A68-11d2-983C-0000F808342D") ICorDebugClass : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetModule( + virtual HRESULT STDMETHODCALLTYPE GetModule( /* [out] */ ICorDebugModule **pModule) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetToken( + + virtual HRESULT STDMETHODCALLTYPE GetToken( /* [out] */ mdTypeDef *pTypeDef) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetStaticFieldValue( + + virtual HRESULT STDMETHODCALLTYPE GetStaticFieldValue( /* [in] */ mdFieldDef fieldDef, /* [in] */ ICorDebugFrame *pFrame, /* [out] */ ICorDebugValue **ppValue) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugClassVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugClass * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugClass * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugClass * This); - - HRESULT ( STDMETHODCALLTYPE *GetModule )( + + HRESULT ( STDMETHODCALLTYPE *GetModule )( ICorDebugClass * This, /* [out] */ ICorDebugModule **pModule); - - HRESULT ( STDMETHODCALLTYPE *GetToken )( + + HRESULT ( STDMETHODCALLTYPE *GetToken )( ICorDebugClass * This, /* [out] */ mdTypeDef *pTypeDef); - - HRESULT ( STDMETHODCALLTYPE *GetStaticFieldValue )( + + HRESULT ( STDMETHODCALLTYPE *GetStaticFieldValue )( ICorDebugClass * This, /* [in] */ mdFieldDef fieldDef, /* [in] */ ICorDebugFrame *pFrame, /* [out] */ ICorDebugValue **ppValue); - + END_INTERFACE } ICorDebugClassVtbl; @@ -13117,97 +13118,97 @@ EXTERN_C const IID IID_ICorDebugClass; CONST_VTBL struct ICorDebugClassVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugClass_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugClass_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugClass_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugClass_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugClass_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugClass_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugClass_GetModule(This,pModule) \ - ( (This)->lpVtbl -> GetModule(This,pModule) ) +#define ICorDebugClass_GetModule(This,pModule) \ + ( (This)->lpVtbl -> GetModule(This,pModule) ) -#define ICorDebugClass_GetToken(This,pTypeDef) \ - ( (This)->lpVtbl -> GetToken(This,pTypeDef) ) +#define ICorDebugClass_GetToken(This,pTypeDef) \ + ( (This)->lpVtbl -> GetToken(This,pTypeDef) ) -#define ICorDebugClass_GetStaticFieldValue(This,fieldDef,pFrame,ppValue) \ - ( (This)->lpVtbl -> GetStaticFieldValue(This,fieldDef,pFrame,ppValue) ) +#define ICorDebugClass_GetStaticFieldValue(This,fieldDef,pFrame,ppValue) \ + ( (This)->lpVtbl -> GetStaticFieldValue(This,fieldDef,pFrame,ppValue) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugClass_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugClass_INTERFACE_DEFINED__ */ #ifndef __ICorDebugClass2_INTERFACE_DEFINED__ #define __ICorDebugClass2_INTERFACE_DEFINED__ /* interface ICorDebugClass2 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugClass2; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("B008EA8D-7AB1-43f7-BB20-FBB5A04038AE") ICorDebugClass2 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetParameterizedType( + virtual HRESULT STDMETHODCALLTYPE GetParameterizedType( /* [in] */ CorElementType elementType, /* [in] */ ULONG32 nTypeArgs, /* [size_is][in] */ ICorDebugType *ppTypeArgs[ ], /* [out] */ ICorDebugType **ppType) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetJMCStatus( + + virtual HRESULT STDMETHODCALLTYPE SetJMCStatus( /* [in] */ BOOL bIsJustMyCode) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugClass2Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugClass2 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugClass2 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugClass2 * This); - - HRESULT ( STDMETHODCALLTYPE *GetParameterizedType )( + + HRESULT ( STDMETHODCALLTYPE *GetParameterizedType )( ICorDebugClass2 * This, /* [in] */ CorElementType elementType, /* [in] */ ULONG32 nTypeArgs, /* [size_is][in] */ ICorDebugType *ppTypeArgs[ ], /* [out] */ ICorDebugType **ppType); - - HRESULT ( STDMETHODCALLTYPE *SetJMCStatus )( + + HRESULT ( STDMETHODCALLTYPE *SetJMCStatus )( ICorDebugClass2 * This, /* [in] */ BOOL bIsJustMyCode); - + END_INTERFACE } ICorDebugClass2Vtbl; @@ -13216,162 +13217,162 @@ EXTERN_C const IID IID_ICorDebugClass2; CONST_VTBL struct ICorDebugClass2Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugClass2_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugClass2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugClass2_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugClass2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugClass2_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugClass2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugClass2_GetParameterizedType(This,elementType,nTypeArgs,ppTypeArgs,ppType) \ - ( (This)->lpVtbl -> GetParameterizedType(This,elementType,nTypeArgs,ppTypeArgs,ppType) ) +#define ICorDebugClass2_GetParameterizedType(This,elementType,nTypeArgs,ppTypeArgs,ppType) \ + ( (This)->lpVtbl -> GetParameterizedType(This,elementType,nTypeArgs,ppTypeArgs,ppType) ) -#define ICorDebugClass2_SetJMCStatus(This,bIsJustMyCode) \ - ( (This)->lpVtbl -> SetJMCStatus(This,bIsJustMyCode) ) +#define ICorDebugClass2_SetJMCStatus(This,bIsJustMyCode) \ + ( (This)->lpVtbl -> SetJMCStatus(This,bIsJustMyCode) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugClass2_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugClass2_INTERFACE_DEFINED__ */ #ifndef __ICorDebugEval_INTERFACE_DEFINED__ #define __ICorDebugEval_INTERFACE_DEFINED__ /* interface ICorDebugEval */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugEval; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("CC7BCAF6-8A68-11d2-983C-0000F808342D") ICorDebugEval : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE CallFunction( + virtual HRESULT STDMETHODCALLTYPE CallFunction( /* [in] */ ICorDebugFunction *pFunction, /* [in] */ ULONG32 nArgs, /* [size_is][in] */ ICorDebugValue *ppArgs[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE NewObject( + + virtual HRESULT STDMETHODCALLTYPE NewObject( /* [in] */ ICorDebugFunction *pConstructor, /* [in] */ ULONG32 nArgs, /* [size_is][in] */ ICorDebugValue *ppArgs[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE NewObjectNoConstructor( + + virtual HRESULT STDMETHODCALLTYPE NewObjectNoConstructor( /* [in] */ ICorDebugClass *pClass) = 0; - - virtual HRESULT STDMETHODCALLTYPE NewString( + + virtual HRESULT STDMETHODCALLTYPE NewString( /* [in] */ LPCWSTR string) = 0; - - virtual HRESULT STDMETHODCALLTYPE NewArray( + + virtual HRESULT STDMETHODCALLTYPE NewArray( /* [in] */ CorElementType elementType, /* [in] */ ICorDebugClass *pElementClass, /* [in] */ ULONG32 rank, /* [size_is][in] */ ULONG32 dims[ ], /* [size_is][in] */ ULONG32 lowBounds[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE IsActive( + + virtual HRESULT STDMETHODCALLTYPE IsActive( /* [out] */ BOOL *pbActive) = 0; - + virtual HRESULT STDMETHODCALLTYPE Abort( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetResult( + + virtual HRESULT STDMETHODCALLTYPE GetResult( /* [out] */ ICorDebugValue **ppResult) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetThread( + + virtual HRESULT STDMETHODCALLTYPE GetThread( /* [out] */ ICorDebugThread **ppThread) = 0; - - virtual HRESULT STDMETHODCALLTYPE CreateValue( + + virtual HRESULT STDMETHODCALLTYPE CreateValue( /* [in] */ CorElementType elementType, /* [in] */ ICorDebugClass *pElementClass, /* [out] */ ICorDebugValue **ppValue) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugEvalVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugEval * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugEval * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugEval * This); - - HRESULT ( STDMETHODCALLTYPE *CallFunction )( + + HRESULT ( STDMETHODCALLTYPE *CallFunction )( ICorDebugEval * This, /* [in] */ ICorDebugFunction *pFunction, /* [in] */ ULONG32 nArgs, /* [size_is][in] */ ICorDebugValue *ppArgs[ ]); - - HRESULT ( STDMETHODCALLTYPE *NewObject )( + + HRESULT ( STDMETHODCALLTYPE *NewObject )( ICorDebugEval * This, /* [in] */ ICorDebugFunction *pConstructor, /* [in] */ ULONG32 nArgs, /* [size_is][in] */ ICorDebugValue *ppArgs[ ]); - - HRESULT ( STDMETHODCALLTYPE *NewObjectNoConstructor )( + + HRESULT ( STDMETHODCALLTYPE *NewObjectNoConstructor )( ICorDebugEval * This, /* [in] */ ICorDebugClass *pClass); - - HRESULT ( STDMETHODCALLTYPE *NewString )( + + HRESULT ( STDMETHODCALLTYPE *NewString )( ICorDebugEval * This, /* [in] */ LPCWSTR string); - - HRESULT ( STDMETHODCALLTYPE *NewArray )( + + HRESULT ( STDMETHODCALLTYPE *NewArray )( ICorDebugEval * This, /* [in] */ CorElementType elementType, /* [in] */ ICorDebugClass *pElementClass, /* [in] */ ULONG32 rank, /* [size_is][in] */ ULONG32 dims[ ], /* [size_is][in] */ ULONG32 lowBounds[ ]); - - HRESULT ( STDMETHODCALLTYPE *IsActive )( + + HRESULT ( STDMETHODCALLTYPE *IsActive )( ICorDebugEval * This, /* [out] */ BOOL *pbActive); - - HRESULT ( STDMETHODCALLTYPE *Abort )( + + HRESULT ( STDMETHODCALLTYPE *Abort )( ICorDebugEval * This); - - HRESULT ( STDMETHODCALLTYPE *GetResult )( + + HRESULT ( STDMETHODCALLTYPE *GetResult )( ICorDebugEval * This, /* [out] */ ICorDebugValue **ppResult); - - HRESULT ( STDMETHODCALLTYPE *GetThread )( + + HRESULT ( STDMETHODCALLTYPE *GetThread )( ICorDebugEval * This, /* [out] */ ICorDebugThread **ppThread); - - HRESULT ( STDMETHODCALLTYPE *CreateValue )( + + HRESULT ( STDMETHODCALLTYPE *CreateValue )( ICorDebugEval * This, /* [in] */ CorElementType elementType, /* [in] */ ICorDebugClass *pElementClass, /* [out] */ ICorDebugValue **ppValue); - + END_INTERFACE } ICorDebugEvalVtbl; @@ -13380,175 +13381,175 @@ EXTERN_C const IID IID_ICorDebugEval; CONST_VTBL struct ICorDebugEvalVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugEval_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugEval_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugEval_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugEval_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugEval_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugEval_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugEval_CallFunction(This,pFunction,nArgs,ppArgs) \ - ( (This)->lpVtbl -> CallFunction(This,pFunction,nArgs,ppArgs) ) +#define ICorDebugEval_CallFunction(This,pFunction,nArgs,ppArgs) \ + ( (This)->lpVtbl -> CallFunction(This,pFunction,nArgs,ppArgs) ) -#define ICorDebugEval_NewObject(This,pConstructor,nArgs,ppArgs) \ - ( (This)->lpVtbl -> NewObject(This,pConstructor,nArgs,ppArgs) ) +#define ICorDebugEval_NewObject(This,pConstructor,nArgs,ppArgs) \ + ( (This)->lpVtbl -> NewObject(This,pConstructor,nArgs,ppArgs) ) -#define ICorDebugEval_NewObjectNoConstructor(This,pClass) \ - ( (This)->lpVtbl -> NewObjectNoConstructor(This,pClass) ) +#define ICorDebugEval_NewObjectNoConstructor(This,pClass) \ + ( (This)->lpVtbl -> NewObjectNoConstructor(This,pClass) ) -#define ICorDebugEval_NewString(This,string) \ - ( (This)->lpVtbl -> NewString(This,string) ) +#define ICorDebugEval_NewString(This,string) \ + ( (This)->lpVtbl -> NewString(This,string) ) -#define ICorDebugEval_NewArray(This,elementType,pElementClass,rank,dims,lowBounds) \ - ( (This)->lpVtbl -> NewArray(This,elementType,pElementClass,rank,dims,lowBounds) ) +#define ICorDebugEval_NewArray(This,elementType,pElementClass,rank,dims,lowBounds) \ + ( (This)->lpVtbl -> NewArray(This,elementType,pElementClass,rank,dims,lowBounds) ) -#define ICorDebugEval_IsActive(This,pbActive) \ - ( (This)->lpVtbl -> IsActive(This,pbActive) ) +#define ICorDebugEval_IsActive(This,pbActive) \ + ( (This)->lpVtbl -> IsActive(This,pbActive) ) -#define ICorDebugEval_Abort(This) \ - ( (This)->lpVtbl -> Abort(This) ) +#define ICorDebugEval_Abort(This) \ + ( (This)->lpVtbl -> Abort(This) ) -#define ICorDebugEval_GetResult(This,ppResult) \ - ( (This)->lpVtbl -> GetResult(This,ppResult) ) +#define ICorDebugEval_GetResult(This,ppResult) \ + ( (This)->lpVtbl -> GetResult(This,ppResult) ) -#define ICorDebugEval_GetThread(This,ppThread) \ - ( (This)->lpVtbl -> GetThread(This,ppThread) ) +#define ICorDebugEval_GetThread(This,ppThread) \ + ( (This)->lpVtbl -> GetThread(This,ppThread) ) -#define ICorDebugEval_CreateValue(This,elementType,pElementClass,ppValue) \ - ( (This)->lpVtbl -> CreateValue(This,elementType,pElementClass,ppValue) ) +#define ICorDebugEval_CreateValue(This,elementType,pElementClass,ppValue) \ + ( (This)->lpVtbl -> CreateValue(This,elementType,pElementClass,ppValue) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugEval_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugEval_INTERFACE_DEFINED__ */ #ifndef __ICorDebugEval2_INTERFACE_DEFINED__ #define __ICorDebugEval2_INTERFACE_DEFINED__ /* interface ICorDebugEval2 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugEval2; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("FB0D9CE7-BE66-4683-9D32-A42A04E2FD91") ICorDebugEval2 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE CallParameterizedFunction( + virtual HRESULT STDMETHODCALLTYPE CallParameterizedFunction( /* [in] */ ICorDebugFunction *pFunction, /* [in] */ ULONG32 nTypeArgs, /* [size_is][in] */ ICorDebugType *ppTypeArgs[ ], /* [in] */ ULONG32 nArgs, /* [size_is][in] */ ICorDebugValue *ppArgs[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE CreateValueForType( + + virtual HRESULT STDMETHODCALLTYPE CreateValueForType( /* [in] */ ICorDebugType *pType, /* [out] */ ICorDebugValue **ppValue) = 0; - - virtual HRESULT STDMETHODCALLTYPE NewParameterizedObject( + + virtual HRESULT STDMETHODCALLTYPE NewParameterizedObject( /* [in] */ ICorDebugFunction *pConstructor, /* [in] */ ULONG32 nTypeArgs, /* [size_is][in] */ ICorDebugType *ppTypeArgs[ ], /* [in] */ ULONG32 nArgs, /* [size_is][in] */ ICorDebugValue *ppArgs[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE NewParameterizedObjectNoConstructor( + + virtual HRESULT STDMETHODCALLTYPE NewParameterizedObjectNoConstructor( /* [in] */ ICorDebugClass *pClass, /* [in] */ ULONG32 nTypeArgs, /* [size_is][in] */ ICorDebugType *ppTypeArgs[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE NewParameterizedArray( + + virtual HRESULT STDMETHODCALLTYPE NewParameterizedArray( /* [in] */ ICorDebugType *pElementType, /* [in] */ ULONG32 rank, /* [size_is][in] */ ULONG32 dims[ ], /* [size_is][in] */ ULONG32 lowBounds[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE NewStringWithLength( + + virtual HRESULT STDMETHODCALLTYPE NewStringWithLength( /* [in] */ LPCWSTR string, /* [in] */ UINT uiLength) = 0; - + virtual HRESULT STDMETHODCALLTYPE RudeAbort( void) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugEval2Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugEval2 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugEval2 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugEval2 * This); - - HRESULT ( STDMETHODCALLTYPE *CallParameterizedFunction )( + + HRESULT ( STDMETHODCALLTYPE *CallParameterizedFunction )( ICorDebugEval2 * This, /* [in] */ ICorDebugFunction *pFunction, /* [in] */ ULONG32 nTypeArgs, /* [size_is][in] */ ICorDebugType *ppTypeArgs[ ], /* [in] */ ULONG32 nArgs, /* [size_is][in] */ ICorDebugValue *ppArgs[ ]); - - HRESULT ( STDMETHODCALLTYPE *CreateValueForType )( + + HRESULT ( STDMETHODCALLTYPE *CreateValueForType )( ICorDebugEval2 * This, /* [in] */ ICorDebugType *pType, /* [out] */ ICorDebugValue **ppValue); - - HRESULT ( STDMETHODCALLTYPE *NewParameterizedObject )( + + HRESULT ( STDMETHODCALLTYPE *NewParameterizedObject )( ICorDebugEval2 * This, /* [in] */ ICorDebugFunction *pConstructor, /* [in] */ ULONG32 nTypeArgs, /* [size_is][in] */ ICorDebugType *ppTypeArgs[ ], /* [in] */ ULONG32 nArgs, /* [size_is][in] */ ICorDebugValue *ppArgs[ ]); - - HRESULT ( STDMETHODCALLTYPE *NewParameterizedObjectNoConstructor )( + + HRESULT ( STDMETHODCALLTYPE *NewParameterizedObjectNoConstructor )( ICorDebugEval2 * This, /* [in] */ ICorDebugClass *pClass, /* [in] */ ULONG32 nTypeArgs, /* [size_is][in] */ ICorDebugType *ppTypeArgs[ ]); - - HRESULT ( STDMETHODCALLTYPE *NewParameterizedArray )( + + HRESULT ( STDMETHODCALLTYPE *NewParameterizedArray )( ICorDebugEval2 * This, /* [in] */ ICorDebugType *pElementType, /* [in] */ ULONG32 rank, /* [size_is][in] */ ULONG32 dims[ ], /* [size_is][in] */ ULONG32 lowBounds[ ]); - - HRESULT ( STDMETHODCALLTYPE *NewStringWithLength )( + + HRESULT ( STDMETHODCALLTYPE *NewStringWithLength )( ICorDebugEval2 * This, /* [in] */ LPCWSTR string, /* [in] */ UINT uiLength); - - HRESULT ( STDMETHODCALLTYPE *RudeAbort )( + + HRESULT ( STDMETHODCALLTYPE *RudeAbort )( ICorDebugEval2 * This); - + END_INTERFACE } ICorDebugEval2Vtbl; @@ -13557,117 +13558,117 @@ EXTERN_C const IID IID_ICorDebugEval2; CONST_VTBL struct ICorDebugEval2Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugEval2_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugEval2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugEval2_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugEval2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugEval2_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugEval2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugEval2_CallParameterizedFunction(This,pFunction,nTypeArgs,ppTypeArgs,nArgs,ppArgs) \ - ( (This)->lpVtbl -> CallParameterizedFunction(This,pFunction,nTypeArgs,ppTypeArgs,nArgs,ppArgs) ) +#define ICorDebugEval2_CallParameterizedFunction(This,pFunction,nTypeArgs,ppTypeArgs,nArgs,ppArgs) \ + ( (This)->lpVtbl -> CallParameterizedFunction(This,pFunction,nTypeArgs,ppTypeArgs,nArgs,ppArgs) ) -#define ICorDebugEval2_CreateValueForType(This,pType,ppValue) \ - ( (This)->lpVtbl -> CreateValueForType(This,pType,ppValue) ) +#define ICorDebugEval2_CreateValueForType(This,pType,ppValue) \ + ( (This)->lpVtbl -> CreateValueForType(This,pType,ppValue) ) -#define ICorDebugEval2_NewParameterizedObject(This,pConstructor,nTypeArgs,ppTypeArgs,nArgs,ppArgs) \ - ( (This)->lpVtbl -> NewParameterizedObject(This,pConstructor,nTypeArgs,ppTypeArgs,nArgs,ppArgs) ) +#define ICorDebugEval2_NewParameterizedObject(This,pConstructor,nTypeArgs,ppTypeArgs,nArgs,ppArgs) \ + ( (This)->lpVtbl -> NewParameterizedObject(This,pConstructor,nTypeArgs,ppTypeArgs,nArgs,ppArgs) ) -#define ICorDebugEval2_NewParameterizedObjectNoConstructor(This,pClass,nTypeArgs,ppTypeArgs) \ - ( (This)->lpVtbl -> NewParameterizedObjectNoConstructor(This,pClass,nTypeArgs,ppTypeArgs) ) +#define ICorDebugEval2_NewParameterizedObjectNoConstructor(This,pClass,nTypeArgs,ppTypeArgs) \ + ( (This)->lpVtbl -> NewParameterizedObjectNoConstructor(This,pClass,nTypeArgs,ppTypeArgs) ) -#define ICorDebugEval2_NewParameterizedArray(This,pElementType,rank,dims,lowBounds) \ - ( (This)->lpVtbl -> NewParameterizedArray(This,pElementType,rank,dims,lowBounds) ) +#define ICorDebugEval2_NewParameterizedArray(This,pElementType,rank,dims,lowBounds) \ + ( (This)->lpVtbl -> NewParameterizedArray(This,pElementType,rank,dims,lowBounds) ) -#define ICorDebugEval2_NewStringWithLength(This,string,uiLength) \ - ( (This)->lpVtbl -> NewStringWithLength(This,string,uiLength) ) +#define ICorDebugEval2_NewStringWithLength(This,string,uiLength) \ + ( (This)->lpVtbl -> NewStringWithLength(This,string,uiLength) ) -#define ICorDebugEval2_RudeAbort(This) \ - ( (This)->lpVtbl -> RudeAbort(This) ) +#define ICorDebugEval2_RudeAbort(This) \ + ( (This)->lpVtbl -> RudeAbort(This) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugEval2_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugEval2_INTERFACE_DEFINED__ */ #ifndef __ICorDebugValue_INTERFACE_DEFINED__ #define __ICorDebugValue_INTERFACE_DEFINED__ /* interface ICorDebugValue */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugValue; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("CC7BCAF7-8A68-11d2-983C-0000F808342D") ICorDebugValue : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetType( + virtual HRESULT STDMETHODCALLTYPE GetType( /* [out] */ CorElementType *pType) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetSize( + + virtual HRESULT STDMETHODCALLTYPE GetSize( /* [out] */ ULONG32 *pSize) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetAddress( + + virtual HRESULT STDMETHODCALLTYPE GetAddress( /* [out] */ CORDB_ADDRESS *pAddress) = 0; - - virtual HRESULT STDMETHODCALLTYPE CreateBreakpoint( + + virtual HRESULT STDMETHODCALLTYPE CreateBreakpoint( /* [out] */ ICorDebugValueBreakpoint **ppBreakpoint) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugValueVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugValue * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugValue * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugValue * This); - - HRESULT ( STDMETHODCALLTYPE *GetType )( + + HRESULT ( STDMETHODCALLTYPE *GetType )( ICorDebugValue * This, /* [out] */ CorElementType *pType); - - HRESULT ( STDMETHODCALLTYPE *GetSize )( + + HRESULT ( STDMETHODCALLTYPE *GetSize )( ICorDebugValue * This, /* [out] */ ULONG32 *pSize); - - HRESULT ( STDMETHODCALLTYPE *GetAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetAddress )( ICorDebugValue * This, /* [out] */ CORDB_ADDRESS *pAddress); - - HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )( + + HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )( ICorDebugValue * This, /* [out] */ ICorDebugValueBreakpoint **ppBreakpoint); - + END_INTERFACE } ICorDebugValueVtbl; @@ -13676,87 +13677,87 @@ EXTERN_C const IID IID_ICorDebugValue; CONST_VTBL struct ICorDebugValueVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugValue_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugValue_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugValue_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugValue_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugValue_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugValue_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugValue_GetType(This,pType) \ - ( (This)->lpVtbl -> GetType(This,pType) ) +#define ICorDebugValue_GetType(This,pType) \ + ( (This)->lpVtbl -> GetType(This,pType) ) -#define ICorDebugValue_GetSize(This,pSize) \ - ( (This)->lpVtbl -> GetSize(This,pSize) ) +#define ICorDebugValue_GetSize(This,pSize) \ + ( (This)->lpVtbl -> GetSize(This,pSize) ) -#define ICorDebugValue_GetAddress(This,pAddress) \ - ( (This)->lpVtbl -> GetAddress(This,pAddress) ) +#define ICorDebugValue_GetAddress(This,pAddress) \ + ( (This)->lpVtbl -> GetAddress(This,pAddress) ) -#define ICorDebugValue_CreateBreakpoint(This,ppBreakpoint) \ - ( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) ) +#define ICorDebugValue_CreateBreakpoint(This,ppBreakpoint) \ + ( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugValue_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugValue_INTERFACE_DEFINED__ */ #ifndef __ICorDebugValue2_INTERFACE_DEFINED__ #define __ICorDebugValue2_INTERFACE_DEFINED__ /* interface ICorDebugValue2 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugValue2; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("5E0B54E7-D88A-4626-9420-A691E0A78B49") ICorDebugValue2 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetExactType( + virtual HRESULT STDMETHODCALLTYPE GetExactType( /* [out] */ ICorDebugType **ppType) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugValue2Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugValue2 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugValue2 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugValue2 * This); - - HRESULT ( STDMETHODCALLTYPE *GetExactType )( + + HRESULT ( STDMETHODCALLTYPE *GetExactType )( ICorDebugValue2 * This, /* [out] */ ICorDebugType **ppType); - + END_INTERFACE } ICorDebugValue2Vtbl; @@ -13765,78 +13766,78 @@ EXTERN_C const IID IID_ICorDebugValue2; CONST_VTBL struct ICorDebugValue2Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugValue2_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugValue2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugValue2_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugValue2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugValue2_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugValue2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugValue2_GetExactType(This,ppType) \ - ( (This)->lpVtbl -> GetExactType(This,ppType) ) +#define ICorDebugValue2_GetExactType(This,ppType) \ + ( (This)->lpVtbl -> GetExactType(This,ppType) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugValue2_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugValue2_INTERFACE_DEFINED__ */ #ifndef __ICorDebugValue3_INTERFACE_DEFINED__ #define __ICorDebugValue3_INTERFACE_DEFINED__ /* interface ICorDebugValue3 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugValue3; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("565005FC-0F8A-4F3E-9EDB-83102B156595") ICorDebugValue3 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetSize64( + virtual HRESULT STDMETHODCALLTYPE GetSize64( /* [out] */ ULONG64 *pSize) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugValue3Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugValue3 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugValue3 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugValue3 * This); - - HRESULT ( STDMETHODCALLTYPE *GetSize64 )( + + HRESULT ( STDMETHODCALLTYPE *GetSize64 )( ICorDebugValue3 * This, /* [out] */ ULONG64 *pSize); - + END_INTERFACE } ICorDebugValue3Vtbl; @@ -13845,101 +13846,101 @@ EXTERN_C const IID IID_ICorDebugValue3; CONST_VTBL struct ICorDebugValue3Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugValue3_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugValue3_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugValue3_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugValue3_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugValue3_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugValue3_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugValue3_GetSize64(This,pSize) \ - ( (This)->lpVtbl -> GetSize64(This,pSize) ) +#define ICorDebugValue3_GetSize64(This,pSize) \ + ( (This)->lpVtbl -> GetSize64(This,pSize) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugValue3_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugValue3_INTERFACE_DEFINED__ */ #ifndef __ICorDebugGenericValue_INTERFACE_DEFINED__ #define __ICorDebugGenericValue_INTERFACE_DEFINED__ /* interface ICorDebugGenericValue */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugGenericValue; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("CC7BCAF8-8A68-11d2-983C-0000F808342D") ICorDebugGenericValue : public ICorDebugValue { public: - virtual HRESULT STDMETHODCALLTYPE GetValue( + virtual HRESULT STDMETHODCALLTYPE GetValue( /* [out] */ void *pTo) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetValue( + + virtual HRESULT STDMETHODCALLTYPE SetValue( /* [in] */ void *pFrom) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugGenericValueVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugGenericValue * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugGenericValue * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugGenericValue * This); - - HRESULT ( STDMETHODCALLTYPE *GetType )( + + HRESULT ( STDMETHODCALLTYPE *GetType )( ICorDebugGenericValue * This, /* [out] */ CorElementType *pType); - - HRESULT ( STDMETHODCALLTYPE *GetSize )( + + HRESULT ( STDMETHODCALLTYPE *GetSize )( ICorDebugGenericValue * This, /* [out] */ ULONG32 *pSize); - - HRESULT ( STDMETHODCALLTYPE *GetAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetAddress )( ICorDebugGenericValue * This, /* [out] */ CORDB_ADDRESS *pAddress); - - HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )( + + HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )( ICorDebugGenericValue * This, /* [out] */ ICorDebugValueBreakpoint **ppBreakpoint); - - HRESULT ( STDMETHODCALLTYPE *GetValue )( + + HRESULT ( STDMETHODCALLTYPE *GetValue )( ICorDebugGenericValue * This, /* [out] */ void *pTo); - - HRESULT ( STDMETHODCALLTYPE *SetValue )( + + HRESULT ( STDMETHODCALLTYPE *SetValue )( ICorDebugGenericValue * This, /* [in] */ void *pFrom); - + END_INTERFACE } ICorDebugGenericValueVtbl; @@ -13948,138 +13949,138 @@ EXTERN_C const IID IID_ICorDebugGenericValue; CONST_VTBL struct ICorDebugGenericValueVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugGenericValue_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugGenericValue_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugGenericValue_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugGenericValue_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugGenericValue_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugGenericValue_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugGenericValue_GetType(This,pType) \ - ( (This)->lpVtbl -> GetType(This,pType) ) +#define ICorDebugGenericValue_GetType(This,pType) \ + ( (This)->lpVtbl -> GetType(This,pType) ) -#define ICorDebugGenericValue_GetSize(This,pSize) \ - ( (This)->lpVtbl -> GetSize(This,pSize) ) +#define ICorDebugGenericValue_GetSize(This,pSize) \ + ( (This)->lpVtbl -> GetSize(This,pSize) ) -#define ICorDebugGenericValue_GetAddress(This,pAddress) \ - ( (This)->lpVtbl -> GetAddress(This,pAddress) ) +#define ICorDebugGenericValue_GetAddress(This,pAddress) \ + ( (This)->lpVtbl -> GetAddress(This,pAddress) ) -#define ICorDebugGenericValue_CreateBreakpoint(This,ppBreakpoint) \ - ( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) ) +#define ICorDebugGenericValue_CreateBreakpoint(This,ppBreakpoint) \ + ( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) ) -#define ICorDebugGenericValue_GetValue(This,pTo) \ - ( (This)->lpVtbl -> GetValue(This,pTo) ) +#define ICorDebugGenericValue_GetValue(This,pTo) \ + ( (This)->lpVtbl -> GetValue(This,pTo) ) -#define ICorDebugGenericValue_SetValue(This,pFrom) \ - ( (This)->lpVtbl -> SetValue(This,pFrom) ) +#define ICorDebugGenericValue_SetValue(This,pFrom) \ + ( (This)->lpVtbl -> SetValue(This,pFrom) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugGenericValue_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugGenericValue_INTERFACE_DEFINED__ */ #ifndef __ICorDebugReferenceValue_INTERFACE_DEFINED__ #define __ICorDebugReferenceValue_INTERFACE_DEFINED__ /* interface ICorDebugReferenceValue */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugReferenceValue; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("CC7BCAF9-8A68-11d2-983C-0000F808342D") ICorDebugReferenceValue : public ICorDebugValue { public: - virtual HRESULT STDMETHODCALLTYPE IsNull( + virtual HRESULT STDMETHODCALLTYPE IsNull( /* [out] */ BOOL *pbNull) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetValue( + + virtual HRESULT STDMETHODCALLTYPE GetValue( /* [out] */ CORDB_ADDRESS *pValue) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetValue( + + virtual HRESULT STDMETHODCALLTYPE SetValue( /* [in] */ CORDB_ADDRESS value) = 0; - - virtual HRESULT STDMETHODCALLTYPE Dereference( + + virtual HRESULT STDMETHODCALLTYPE Dereference( /* [out] */ ICorDebugValue **ppValue) = 0; - - virtual HRESULT STDMETHODCALLTYPE DereferenceStrong( + + virtual HRESULT STDMETHODCALLTYPE DereferenceStrong( /* [out] */ ICorDebugValue **ppValue) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugReferenceValueVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugReferenceValue * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugReferenceValue * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugReferenceValue * This); - - HRESULT ( STDMETHODCALLTYPE *GetType )( + + HRESULT ( STDMETHODCALLTYPE *GetType )( ICorDebugReferenceValue * This, /* [out] */ CorElementType *pType); - - HRESULT ( STDMETHODCALLTYPE *GetSize )( + + HRESULT ( STDMETHODCALLTYPE *GetSize )( ICorDebugReferenceValue * This, /* [out] */ ULONG32 *pSize); - - HRESULT ( STDMETHODCALLTYPE *GetAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetAddress )( ICorDebugReferenceValue * This, /* [out] */ CORDB_ADDRESS *pAddress); - - HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )( + + HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )( ICorDebugReferenceValue * This, /* [out] */ ICorDebugValueBreakpoint **ppBreakpoint); - - HRESULT ( STDMETHODCALLTYPE *IsNull )( + + HRESULT ( STDMETHODCALLTYPE *IsNull )( ICorDebugReferenceValue * This, /* [out] */ BOOL *pbNull); - - HRESULT ( STDMETHODCALLTYPE *GetValue )( + + HRESULT ( STDMETHODCALLTYPE *GetValue )( ICorDebugReferenceValue * This, /* [out] */ CORDB_ADDRESS *pValue); - - HRESULT ( STDMETHODCALLTYPE *SetValue )( + + HRESULT ( STDMETHODCALLTYPE *SetValue )( ICorDebugReferenceValue * This, /* [in] */ CORDB_ADDRESS value); - - HRESULT ( STDMETHODCALLTYPE *Dereference )( + + HRESULT ( STDMETHODCALLTYPE *Dereference )( ICorDebugReferenceValue * This, /* [out] */ ICorDebugValue **ppValue); - - HRESULT ( STDMETHODCALLTYPE *DereferenceStrong )( + + HRESULT ( STDMETHODCALLTYPE *DereferenceStrong )( ICorDebugReferenceValue * This, /* [out] */ ICorDebugValue **ppValue); - + END_INTERFACE } ICorDebugReferenceValueVtbl; @@ -14088,126 +14089,126 @@ EXTERN_C const IID IID_ICorDebugReferenceValue; CONST_VTBL struct ICorDebugReferenceValueVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugReferenceValue_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugReferenceValue_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugReferenceValue_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugReferenceValue_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugReferenceValue_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugReferenceValue_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugReferenceValue_GetType(This,pType) \ - ( (This)->lpVtbl -> GetType(This,pType) ) +#define ICorDebugReferenceValue_GetType(This,pType) \ + ( (This)->lpVtbl -> GetType(This,pType) ) -#define ICorDebugReferenceValue_GetSize(This,pSize) \ - ( (This)->lpVtbl -> GetSize(This,pSize) ) +#define ICorDebugReferenceValue_GetSize(This,pSize) \ + ( (This)->lpVtbl -> GetSize(This,pSize) ) -#define ICorDebugReferenceValue_GetAddress(This,pAddress) \ - ( (This)->lpVtbl -> GetAddress(This,pAddress) ) +#define ICorDebugReferenceValue_GetAddress(This,pAddress) \ + ( (This)->lpVtbl -> GetAddress(This,pAddress) ) -#define ICorDebugReferenceValue_CreateBreakpoint(This,ppBreakpoint) \ - ( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) ) +#define ICorDebugReferenceValue_CreateBreakpoint(This,ppBreakpoint) \ + ( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) ) -#define ICorDebugReferenceValue_IsNull(This,pbNull) \ - ( (This)->lpVtbl -> IsNull(This,pbNull) ) +#define ICorDebugReferenceValue_IsNull(This,pbNull) \ + ( (This)->lpVtbl -> IsNull(This,pbNull) ) -#define ICorDebugReferenceValue_GetValue(This,pValue) \ - ( (This)->lpVtbl -> GetValue(This,pValue) ) +#define ICorDebugReferenceValue_GetValue(This,pValue) \ + ( (This)->lpVtbl -> GetValue(This,pValue) ) -#define ICorDebugReferenceValue_SetValue(This,value) \ - ( (This)->lpVtbl -> SetValue(This,value) ) +#define ICorDebugReferenceValue_SetValue(This,value) \ + ( (This)->lpVtbl -> SetValue(This,value) ) -#define ICorDebugReferenceValue_Dereference(This,ppValue) \ - ( (This)->lpVtbl -> Dereference(This,ppValue) ) +#define ICorDebugReferenceValue_Dereference(This,ppValue) \ + ( (This)->lpVtbl -> Dereference(This,ppValue) ) -#define ICorDebugReferenceValue_DereferenceStrong(This,ppValue) \ - ( (This)->lpVtbl -> DereferenceStrong(This,ppValue) ) +#define ICorDebugReferenceValue_DereferenceStrong(This,ppValue) \ + ( (This)->lpVtbl -> DereferenceStrong(This,ppValue) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugReferenceValue_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugReferenceValue_INTERFACE_DEFINED__ */ #ifndef __ICorDebugHeapValue_INTERFACE_DEFINED__ #define __ICorDebugHeapValue_INTERFACE_DEFINED__ /* interface ICorDebugHeapValue */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugHeapValue; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("CC7BCAFA-8A68-11d2-983C-0000F808342D") ICorDebugHeapValue : public ICorDebugValue { public: - virtual HRESULT STDMETHODCALLTYPE IsValid( + virtual HRESULT STDMETHODCALLTYPE IsValid( /* [out] */ BOOL *pbValid) = 0; - - virtual HRESULT STDMETHODCALLTYPE CreateRelocBreakpoint( + + virtual HRESULT STDMETHODCALLTYPE CreateRelocBreakpoint( /* [out] */ ICorDebugValueBreakpoint **ppBreakpoint) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugHeapValueVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugHeapValue * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugHeapValue * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugHeapValue * This); - - HRESULT ( STDMETHODCALLTYPE *GetType )( + + HRESULT ( STDMETHODCALLTYPE *GetType )( ICorDebugHeapValue * This, /* [out] */ CorElementType *pType); - - HRESULT ( STDMETHODCALLTYPE *GetSize )( + + HRESULT ( STDMETHODCALLTYPE *GetSize )( ICorDebugHeapValue * This, /* [out] */ ULONG32 *pSize); - - HRESULT ( STDMETHODCALLTYPE *GetAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetAddress )( ICorDebugHeapValue * This, /* [out] */ CORDB_ADDRESS *pAddress); - - HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )( + + HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )( ICorDebugHeapValue * This, /* [out] */ ICorDebugValueBreakpoint **ppBreakpoint); - - HRESULT ( STDMETHODCALLTYPE *IsValid )( + + HRESULT ( STDMETHODCALLTYPE *IsValid )( ICorDebugHeapValue * This, /* [out] */ BOOL *pbValid); - - HRESULT ( STDMETHODCALLTYPE *CreateRelocBreakpoint )( + + HRESULT ( STDMETHODCALLTYPE *CreateRelocBreakpoint )( ICorDebugHeapValue * This, /* [out] */ ICorDebugValueBreakpoint **ppBreakpoint); - + END_INTERFACE } ICorDebugHeapValueVtbl; @@ -14216,96 +14217,96 @@ EXTERN_C const IID IID_ICorDebugHeapValue; CONST_VTBL struct ICorDebugHeapValueVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugHeapValue_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugHeapValue_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugHeapValue_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugHeapValue_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugHeapValue_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugHeapValue_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugHeapValue_GetType(This,pType) \ - ( (This)->lpVtbl -> GetType(This,pType) ) +#define ICorDebugHeapValue_GetType(This,pType) \ + ( (This)->lpVtbl -> GetType(This,pType) ) -#define ICorDebugHeapValue_GetSize(This,pSize) \ - ( (This)->lpVtbl -> GetSize(This,pSize) ) +#define ICorDebugHeapValue_GetSize(This,pSize) \ + ( (This)->lpVtbl -> GetSize(This,pSize) ) -#define ICorDebugHeapValue_GetAddress(This,pAddress) \ - ( (This)->lpVtbl -> GetAddress(This,pAddress) ) +#define ICorDebugHeapValue_GetAddress(This,pAddress) \ + ( (This)->lpVtbl -> GetAddress(This,pAddress) ) -#define ICorDebugHeapValue_CreateBreakpoint(This,ppBreakpoint) \ - ( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) ) +#define ICorDebugHeapValue_CreateBreakpoint(This,ppBreakpoint) \ + ( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) ) -#define ICorDebugHeapValue_IsValid(This,pbValid) \ - ( (This)->lpVtbl -> IsValid(This,pbValid) ) +#define ICorDebugHeapValue_IsValid(This,pbValid) \ + ( (This)->lpVtbl -> IsValid(This,pbValid) ) -#define ICorDebugHeapValue_CreateRelocBreakpoint(This,ppBreakpoint) \ - ( (This)->lpVtbl -> CreateRelocBreakpoint(This,ppBreakpoint) ) +#define ICorDebugHeapValue_CreateRelocBreakpoint(This,ppBreakpoint) \ + ( (This)->lpVtbl -> CreateRelocBreakpoint(This,ppBreakpoint) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugHeapValue_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugHeapValue_INTERFACE_DEFINED__ */ #ifndef __ICorDebugHeapValue2_INTERFACE_DEFINED__ #define __ICorDebugHeapValue2_INTERFACE_DEFINED__ /* interface ICorDebugHeapValue2 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugHeapValue2; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("E3AC4D6C-9CB7-43e6-96CC-B21540E5083C") ICorDebugHeapValue2 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE CreateHandle( + virtual HRESULT STDMETHODCALLTYPE CreateHandle( /* [in] */ CorDebugHandleType type, /* [out] */ ICorDebugHandleValue **ppHandle) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugHeapValue2Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugHeapValue2 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugHeapValue2 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugHeapValue2 * This); - - HRESULT ( STDMETHODCALLTYPE *CreateHandle )( + + HRESULT ( STDMETHODCALLTYPE *CreateHandle )( ICorDebugHeapValue2 * This, /* [in] */ CorDebugHandleType type, /* [out] */ ICorDebugHandleValue **ppHandle); - + END_INTERFACE } ICorDebugHeapValue2Vtbl; @@ -14314,87 +14315,87 @@ EXTERN_C const IID IID_ICorDebugHeapValue2; CONST_VTBL struct ICorDebugHeapValue2Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugHeapValue2_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugHeapValue2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugHeapValue2_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugHeapValue2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugHeapValue2_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugHeapValue2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugHeapValue2_CreateHandle(This,type,ppHandle) \ - ( (This)->lpVtbl -> CreateHandle(This,type,ppHandle) ) +#define ICorDebugHeapValue2_CreateHandle(This,type,ppHandle) \ + ( (This)->lpVtbl -> CreateHandle(This,type,ppHandle) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugHeapValue2_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugHeapValue2_INTERFACE_DEFINED__ */ #ifndef __ICorDebugHeapValue3_INTERFACE_DEFINED__ #define __ICorDebugHeapValue3_INTERFACE_DEFINED__ /* interface ICorDebugHeapValue3 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugHeapValue3; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("A69ACAD8-2374-46e9-9FF8-B1F14120D296") ICorDebugHeapValue3 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetThreadOwningMonitorLock( + virtual HRESULT STDMETHODCALLTYPE GetThreadOwningMonitorLock( /* [out] */ ICorDebugThread **ppThread, /* [out] */ DWORD *pAcquisitionCount) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetMonitorEventWaitList( + + virtual HRESULT STDMETHODCALLTYPE GetMonitorEventWaitList( /* [out] */ ICorDebugThreadEnum **ppThreadEnum) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugHeapValue3Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugHeapValue3 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugHeapValue3 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugHeapValue3 * This); - - HRESULT ( STDMETHODCALLTYPE *GetThreadOwningMonitorLock )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadOwningMonitorLock )( ICorDebugHeapValue3 * This, /* [out] */ ICorDebugThread **ppThread, /* [out] */ DWORD *pAcquisitionCount); - - HRESULT ( STDMETHODCALLTYPE *GetMonitorEventWaitList )( + + HRESULT ( STDMETHODCALLTYPE *GetMonitorEventWaitList )( ICorDebugHeapValue3 * This, /* [out] */ ICorDebugThreadEnum **ppThreadEnum); - + END_INTERFACE } ICorDebugHeapValue3Vtbl; @@ -14403,145 +14404,145 @@ EXTERN_C const IID IID_ICorDebugHeapValue3; CONST_VTBL struct ICorDebugHeapValue3Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugHeapValue3_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugHeapValue3_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugHeapValue3_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugHeapValue3_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugHeapValue3_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugHeapValue3_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugHeapValue3_GetThreadOwningMonitorLock(This,ppThread,pAcquisitionCount) \ - ( (This)->lpVtbl -> GetThreadOwningMonitorLock(This,ppThread,pAcquisitionCount) ) +#define ICorDebugHeapValue3_GetThreadOwningMonitorLock(This,ppThread,pAcquisitionCount) \ + ( (This)->lpVtbl -> GetThreadOwningMonitorLock(This,ppThread,pAcquisitionCount) ) -#define ICorDebugHeapValue3_GetMonitorEventWaitList(This,ppThreadEnum) \ - ( (This)->lpVtbl -> GetMonitorEventWaitList(This,ppThreadEnum) ) +#define ICorDebugHeapValue3_GetMonitorEventWaitList(This,ppThreadEnum) \ + ( (This)->lpVtbl -> GetMonitorEventWaitList(This,ppThreadEnum) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugHeapValue3_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugHeapValue3_INTERFACE_DEFINED__ */ #ifndef __ICorDebugObjectValue_INTERFACE_DEFINED__ #define __ICorDebugObjectValue_INTERFACE_DEFINED__ /* interface ICorDebugObjectValue */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugObjectValue; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("18AD3D6E-B7D2-11d2-BD04-0000F80849BD") ICorDebugObjectValue : public ICorDebugValue { public: - virtual HRESULT STDMETHODCALLTYPE GetClass( + virtual HRESULT STDMETHODCALLTYPE GetClass( /* [out] */ ICorDebugClass **ppClass) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetFieldValue( + + virtual HRESULT STDMETHODCALLTYPE GetFieldValue( /* [in] */ ICorDebugClass *pClass, /* [in] */ mdFieldDef fieldDef, /* [out] */ ICorDebugValue **ppValue) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetVirtualMethod( + + virtual HRESULT STDMETHODCALLTYPE GetVirtualMethod( /* [in] */ mdMemberRef memberRef, /* [out] */ ICorDebugFunction **ppFunction) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetContext( + + virtual HRESULT STDMETHODCALLTYPE GetContext( /* [out] */ ICorDebugContext **ppContext) = 0; - - virtual HRESULT STDMETHODCALLTYPE IsValueClass( + + virtual HRESULT STDMETHODCALLTYPE IsValueClass( /* [out] */ BOOL *pbIsValueClass) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetManagedCopy( + + virtual HRESULT STDMETHODCALLTYPE GetManagedCopy( /* [out] */ IUnknown **ppObject) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetFromManagedCopy( + + virtual HRESULT STDMETHODCALLTYPE SetFromManagedCopy( /* [in] */ IUnknown *pObject) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugObjectValueVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugObjectValue * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugObjectValue * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugObjectValue * This); - - HRESULT ( STDMETHODCALLTYPE *GetType )( + + HRESULT ( STDMETHODCALLTYPE *GetType )( ICorDebugObjectValue * This, /* [out] */ CorElementType *pType); - - HRESULT ( STDMETHODCALLTYPE *GetSize )( + + HRESULT ( STDMETHODCALLTYPE *GetSize )( ICorDebugObjectValue * This, /* [out] */ ULONG32 *pSize); - - HRESULT ( STDMETHODCALLTYPE *GetAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetAddress )( ICorDebugObjectValue * This, /* [out] */ CORDB_ADDRESS *pAddress); - - HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )( + + HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )( ICorDebugObjectValue * This, /* [out] */ ICorDebugValueBreakpoint **ppBreakpoint); - - HRESULT ( STDMETHODCALLTYPE *GetClass )( + + HRESULT ( STDMETHODCALLTYPE *GetClass )( ICorDebugObjectValue * This, /* [out] */ ICorDebugClass **ppClass); - - HRESULT ( STDMETHODCALLTYPE *GetFieldValue )( + + HRESULT ( STDMETHODCALLTYPE *GetFieldValue )( ICorDebugObjectValue * This, /* [in] */ ICorDebugClass *pClass, /* [in] */ mdFieldDef fieldDef, /* [out] */ ICorDebugValue **ppValue); - - HRESULT ( STDMETHODCALLTYPE *GetVirtualMethod )( + + HRESULT ( STDMETHODCALLTYPE *GetVirtualMethod )( ICorDebugObjectValue * This, /* [in] */ mdMemberRef memberRef, /* [out] */ ICorDebugFunction **ppFunction); - - HRESULT ( STDMETHODCALLTYPE *GetContext )( + + HRESULT ( STDMETHODCALLTYPE *GetContext )( ICorDebugObjectValue * This, /* [out] */ ICorDebugContext **ppContext); - - HRESULT ( STDMETHODCALLTYPE *IsValueClass )( + + HRESULT ( STDMETHODCALLTYPE *IsValueClass )( ICorDebugObjectValue * This, /* [out] */ BOOL *pbIsValueClass); - - HRESULT ( STDMETHODCALLTYPE *GetManagedCopy )( + + HRESULT ( STDMETHODCALLTYPE *GetManagedCopy )( ICorDebugObjectValue * This, /* [out] */ IUnknown **ppObject); - - HRESULT ( STDMETHODCALLTYPE *SetFromManagedCopy )( + + HRESULT ( STDMETHODCALLTYPE *SetFromManagedCopy )( ICorDebugObjectValue * This, /* [in] */ IUnknown *pObject); - + END_INTERFACE } ICorDebugObjectValueVtbl; @@ -14550,113 +14551,113 @@ EXTERN_C const IID IID_ICorDebugObjectValue; CONST_VTBL struct ICorDebugObjectValueVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugObjectValue_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugObjectValue_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugObjectValue_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugObjectValue_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugObjectValue_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugObjectValue_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugObjectValue_GetType(This,pType) \ - ( (This)->lpVtbl -> GetType(This,pType) ) +#define ICorDebugObjectValue_GetType(This,pType) \ + ( (This)->lpVtbl -> GetType(This,pType) ) -#define ICorDebugObjectValue_GetSize(This,pSize) \ - ( (This)->lpVtbl -> GetSize(This,pSize) ) +#define ICorDebugObjectValue_GetSize(This,pSize) \ + ( (This)->lpVtbl -> GetSize(This,pSize) ) -#define ICorDebugObjectValue_GetAddress(This,pAddress) \ - ( (This)->lpVtbl -> GetAddress(This,pAddress) ) +#define ICorDebugObjectValue_GetAddress(This,pAddress) \ + ( (This)->lpVtbl -> GetAddress(This,pAddress) ) -#define ICorDebugObjectValue_CreateBreakpoint(This,ppBreakpoint) \ - ( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) ) +#define ICorDebugObjectValue_CreateBreakpoint(This,ppBreakpoint) \ + ( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) ) -#define ICorDebugObjectValue_GetClass(This,ppClass) \ - ( (This)->lpVtbl -> GetClass(This,ppClass) ) +#define ICorDebugObjectValue_GetClass(This,ppClass) \ + ( (This)->lpVtbl -> GetClass(This,ppClass) ) -#define ICorDebugObjectValue_GetFieldValue(This,pClass,fieldDef,ppValue) \ - ( (This)->lpVtbl -> GetFieldValue(This,pClass,fieldDef,ppValue) ) +#define ICorDebugObjectValue_GetFieldValue(This,pClass,fieldDef,ppValue) \ + ( (This)->lpVtbl -> GetFieldValue(This,pClass,fieldDef,ppValue) ) -#define ICorDebugObjectValue_GetVirtualMethod(This,memberRef,ppFunction) \ - ( (This)->lpVtbl -> GetVirtualMethod(This,memberRef,ppFunction) ) +#define ICorDebugObjectValue_GetVirtualMethod(This,memberRef,ppFunction) \ + ( (This)->lpVtbl -> GetVirtualMethod(This,memberRef,ppFunction) ) -#define ICorDebugObjectValue_GetContext(This,ppContext) \ - ( (This)->lpVtbl -> GetContext(This,ppContext) ) +#define ICorDebugObjectValue_GetContext(This,ppContext) \ + ( (This)->lpVtbl -> GetContext(This,ppContext) ) -#define ICorDebugObjectValue_IsValueClass(This,pbIsValueClass) \ - ( (This)->lpVtbl -> IsValueClass(This,pbIsValueClass) ) +#define ICorDebugObjectValue_IsValueClass(This,pbIsValueClass) \ + ( (This)->lpVtbl -> IsValueClass(This,pbIsValueClass) ) -#define ICorDebugObjectValue_GetManagedCopy(This,ppObject) \ - ( (This)->lpVtbl -> GetManagedCopy(This,ppObject) ) +#define ICorDebugObjectValue_GetManagedCopy(This,ppObject) \ + ( (This)->lpVtbl -> GetManagedCopy(This,ppObject) ) -#define ICorDebugObjectValue_SetFromManagedCopy(This,pObject) \ - ( (This)->lpVtbl -> SetFromManagedCopy(This,pObject) ) +#define ICorDebugObjectValue_SetFromManagedCopy(This,pObject) \ + ( (This)->lpVtbl -> SetFromManagedCopy(This,pObject) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugObjectValue_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugObjectValue_INTERFACE_DEFINED__ */ #ifndef __ICorDebugObjectValue2_INTERFACE_DEFINED__ #define __ICorDebugObjectValue2_INTERFACE_DEFINED__ /* interface ICorDebugObjectValue2 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugObjectValue2; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("49E4A320-4A9B-4eca-B105-229FB7D5009F") ICorDebugObjectValue2 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetVirtualMethodAndType( + virtual HRESULT STDMETHODCALLTYPE GetVirtualMethodAndType( /* [in] */ mdMemberRef memberRef, /* [out] */ ICorDebugFunction **ppFunction, /* [out] */ ICorDebugType **ppType) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugObjectValue2Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugObjectValue2 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugObjectValue2 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugObjectValue2 * This); - - HRESULT ( STDMETHODCALLTYPE *GetVirtualMethodAndType )( + + HRESULT ( STDMETHODCALLTYPE *GetVirtualMethodAndType )( ICorDebugObjectValue2 * This, /* [in] */ mdMemberRef memberRef, /* [out] */ ICorDebugFunction **ppFunction, /* [out] */ ICorDebugType **ppType); - + END_INTERFACE } ICorDebugObjectValue2Vtbl; @@ -14665,33 +14666,33 @@ EXTERN_C const IID IID_ICorDebugObjectValue2; CONST_VTBL struct ICorDebugObjectValue2Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugObjectValue2_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugObjectValue2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugObjectValue2_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugObjectValue2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugObjectValue2_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugObjectValue2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugObjectValue2_GetVirtualMethodAndType(This,memberRef,ppFunction,ppType) \ - ( (This)->lpVtbl -> GetVirtualMethodAndType(This,memberRef,ppFunction,ppType) ) +#define ICorDebugObjectValue2_GetVirtualMethodAndType(This,memberRef,ppFunction,ppType) \ + ( (This)->lpVtbl -> GetVirtualMethodAndType(This,memberRef,ppFunction,ppType) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugObjectValue2_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugObjectValue2_INTERFACE_DEFINED__ */ #ifndef __ICorDebugDelegateObjectValue_INTERFACE_DEFINED__ @@ -14718,7 +14719,7 @@ EXTERN_C const IID IID_ICorDebugDelegateObjectValue; }; -#else /* C style interface */ +#else /* C style interface */ typedef struct ICorDebugDelegateObjectValueVtbl { @@ -14757,100 +14758,100 @@ EXTERN_C const IID IID_ICorDebugDelegateObjectValue; #ifdef COBJMACROS -#define ICorDebugDelegateObjectValue_QueryInterface(This,riid,ppvObject) \ +#define ICorDebugDelegateObjectValue_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugDelegateObjectValue_AddRef(This) \ +#define ICorDebugDelegateObjectValue_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugDelegateObjectValue_Release(This) \ +#define ICorDebugDelegateObjectValue_Release(This) \ ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugDelegateObjectValue_GetTarget(This,ppObject) \ +#define ICorDebugDelegateObjectValue_GetTarget(This,ppObject) \ ( (This)->lpVtbl -> GetTarget(This,ppObject) ) -#define ICorDebugDelegateObjectValue_GetFunction(This,ppFunction) \ +#define ICorDebugDelegateObjectValue_GetFunction(This,ppFunction) \ ( (This)->lpVtbl -> GetFunction(This,ppFunction) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugDelegateObjectValue_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugDelegateObjectValue_INTERFACE_DEFINED__ */ #ifndef __ICorDebugBoxValue_INTERFACE_DEFINED__ #define __ICorDebugBoxValue_INTERFACE_DEFINED__ /* interface ICorDebugBoxValue */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugBoxValue; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("CC7BCAFC-8A68-11d2-983C-0000F808342D") ICorDebugBoxValue : public ICorDebugHeapValue { public: - virtual HRESULT STDMETHODCALLTYPE GetObject( + virtual HRESULT STDMETHODCALLTYPE GetObject( /* [out] */ ICorDebugObjectValue **ppObject) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugBoxValueVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugBoxValue * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugBoxValue * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugBoxValue * This); - - HRESULT ( STDMETHODCALLTYPE *GetType )( + + HRESULT ( STDMETHODCALLTYPE *GetType )( ICorDebugBoxValue * This, /* [out] */ CorElementType *pType); - - HRESULT ( STDMETHODCALLTYPE *GetSize )( + + HRESULT ( STDMETHODCALLTYPE *GetSize )( ICorDebugBoxValue * This, /* [out] */ ULONG32 *pSize); - - HRESULT ( STDMETHODCALLTYPE *GetAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetAddress )( ICorDebugBoxValue * This, /* [out] */ CORDB_ADDRESS *pAddress); - - HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )( + + HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )( ICorDebugBoxValue * This, /* [out] */ ICorDebugValueBreakpoint **ppBreakpoint); - - HRESULT ( STDMETHODCALLTYPE *IsValid )( + + HRESULT ( STDMETHODCALLTYPE *IsValid )( ICorDebugBoxValue * This, /* [out] */ BOOL *pbValid); - - HRESULT ( STDMETHODCALLTYPE *CreateRelocBreakpoint )( + + HRESULT ( STDMETHODCALLTYPE *CreateRelocBreakpoint )( ICorDebugBoxValue * This, /* [out] */ ICorDebugValueBreakpoint **ppBreakpoint); - - HRESULT ( STDMETHODCALLTYPE *GetObject )( + + HRESULT ( STDMETHODCALLTYPE *GetObject )( ICorDebugBoxValue * This, /* [out] */ ICorDebugObjectValue **ppObject); - + END_INTERFACE } ICorDebugBoxValueVtbl; @@ -14859,60 +14860,60 @@ EXTERN_C const IID IID_ICorDebugBoxValue; CONST_VTBL struct ICorDebugBoxValueVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugBoxValue_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugBoxValue_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugBoxValue_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugBoxValue_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugBoxValue_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugBoxValue_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugBoxValue_GetType(This,pType) \ - ( (This)->lpVtbl -> GetType(This,pType) ) +#define ICorDebugBoxValue_GetType(This,pType) \ + ( (This)->lpVtbl -> GetType(This,pType) ) -#define ICorDebugBoxValue_GetSize(This,pSize) \ - ( (This)->lpVtbl -> GetSize(This,pSize) ) +#define ICorDebugBoxValue_GetSize(This,pSize) \ + ( (This)->lpVtbl -> GetSize(This,pSize) ) -#define ICorDebugBoxValue_GetAddress(This,pAddress) \ - ( (This)->lpVtbl -> GetAddress(This,pAddress) ) +#define ICorDebugBoxValue_GetAddress(This,pAddress) \ + ( (This)->lpVtbl -> GetAddress(This,pAddress) ) -#define ICorDebugBoxValue_CreateBreakpoint(This,ppBreakpoint) \ - ( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) ) +#define ICorDebugBoxValue_CreateBreakpoint(This,ppBreakpoint) \ + ( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) ) -#define ICorDebugBoxValue_IsValid(This,pbValid) \ - ( (This)->lpVtbl -> IsValid(This,pbValid) ) +#define ICorDebugBoxValue_IsValid(This,pbValid) \ + ( (This)->lpVtbl -> IsValid(This,pbValid) ) -#define ICorDebugBoxValue_CreateRelocBreakpoint(This,ppBreakpoint) \ - ( (This)->lpVtbl -> CreateRelocBreakpoint(This,ppBreakpoint) ) +#define ICorDebugBoxValue_CreateRelocBreakpoint(This,ppBreakpoint) \ + ( (This)->lpVtbl -> CreateRelocBreakpoint(This,ppBreakpoint) ) -#define ICorDebugBoxValue_GetObject(This,ppObject) \ - ( (This)->lpVtbl -> GetObject(This,ppObject) ) +#define ICorDebugBoxValue_GetObject(This,ppObject) \ + ( (This)->lpVtbl -> GetObject(This,ppObject) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugBoxValue_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugBoxValue_INTERFACE_DEFINED__ */ /* interface __MIDL_itf_cordebug_0000_0100 */ -/* [local] */ +/* [local] */ #pragma warning(push) -#pragma warning(disable:28718) +#pragma warning(disable:28718) extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0100_v0_0_c_ifspec; @@ -14922,80 +14923,80 @@ extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0100_v0_0_s_ifspec; #define __ICorDebugStringValue_INTERFACE_DEFINED__ /* interface ICorDebugStringValue */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugStringValue; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("CC7BCAFD-8A68-11d2-983C-0000F808342D") ICorDebugStringValue : public ICorDebugHeapValue { public: - virtual HRESULT STDMETHODCALLTYPE GetLength( + virtual HRESULT STDMETHODCALLTYPE GetLength( /* [out] */ ULONG32 *pcchString) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetString( + + virtual HRESULT STDMETHODCALLTYPE GetString( /* [in] */ ULONG32 cchString, /* [out] */ ULONG32 *pcchString, /* [length_is][size_is][out] */ WCHAR szString[ ]) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugStringValueVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugStringValue * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugStringValue * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugStringValue * This); - - HRESULT ( STDMETHODCALLTYPE *GetType )( + + HRESULT ( STDMETHODCALLTYPE *GetType )( ICorDebugStringValue * This, /* [out] */ CorElementType *pType); - - HRESULT ( STDMETHODCALLTYPE *GetSize )( + + HRESULT ( STDMETHODCALLTYPE *GetSize )( ICorDebugStringValue * This, /* [out] */ ULONG32 *pSize); - - HRESULT ( STDMETHODCALLTYPE *GetAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetAddress )( ICorDebugStringValue * This, /* [out] */ CORDB_ADDRESS *pAddress); - - HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )( + + HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )( ICorDebugStringValue * This, /* [out] */ ICorDebugValueBreakpoint **ppBreakpoint); - - HRESULT ( STDMETHODCALLTYPE *IsValid )( + + HRESULT ( STDMETHODCALLTYPE *IsValid )( ICorDebugStringValue * This, /* [out] */ BOOL *pbValid); - - HRESULT ( STDMETHODCALLTYPE *CreateRelocBreakpoint )( + + HRESULT ( STDMETHODCALLTYPE *CreateRelocBreakpoint )( ICorDebugStringValue * This, /* [out] */ ICorDebugValueBreakpoint **ppBreakpoint); - - HRESULT ( STDMETHODCALLTYPE *GetLength )( + + HRESULT ( STDMETHODCALLTYPE *GetLength )( ICorDebugStringValue * This, /* [out] */ ULONG32 *pcchString); - - HRESULT ( STDMETHODCALLTYPE *GetString )( + + HRESULT ( STDMETHODCALLTYPE *GetString )( ICorDebugStringValue * This, /* [in] */ ULONG32 cchString, /* [out] */ ULONG32 *pcchString, /* [length_is][size_is][out] */ WCHAR szString[ ]); - + END_INTERFACE } ICorDebugStringValueVtbl; @@ -15004,60 +15005,60 @@ EXTERN_C const IID IID_ICorDebugStringValue; CONST_VTBL struct ICorDebugStringValueVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugStringValue_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugStringValue_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugStringValue_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugStringValue_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugStringValue_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugStringValue_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugStringValue_GetType(This,pType) \ - ( (This)->lpVtbl -> GetType(This,pType) ) +#define ICorDebugStringValue_GetType(This,pType) \ + ( (This)->lpVtbl -> GetType(This,pType) ) -#define ICorDebugStringValue_GetSize(This,pSize) \ - ( (This)->lpVtbl -> GetSize(This,pSize) ) +#define ICorDebugStringValue_GetSize(This,pSize) \ + ( (This)->lpVtbl -> GetSize(This,pSize) ) -#define ICorDebugStringValue_GetAddress(This,pAddress) \ - ( (This)->lpVtbl -> GetAddress(This,pAddress) ) +#define ICorDebugStringValue_GetAddress(This,pAddress) \ + ( (This)->lpVtbl -> GetAddress(This,pAddress) ) -#define ICorDebugStringValue_CreateBreakpoint(This,ppBreakpoint) \ - ( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) ) +#define ICorDebugStringValue_CreateBreakpoint(This,ppBreakpoint) \ + ( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) ) -#define ICorDebugStringValue_IsValid(This,pbValid) \ - ( (This)->lpVtbl -> IsValid(This,pbValid) ) +#define ICorDebugStringValue_IsValid(This,pbValid) \ + ( (This)->lpVtbl -> IsValid(This,pbValid) ) -#define ICorDebugStringValue_CreateRelocBreakpoint(This,ppBreakpoint) \ - ( (This)->lpVtbl -> CreateRelocBreakpoint(This,ppBreakpoint) ) +#define ICorDebugStringValue_CreateRelocBreakpoint(This,ppBreakpoint) \ + ( (This)->lpVtbl -> CreateRelocBreakpoint(This,ppBreakpoint) ) -#define ICorDebugStringValue_GetLength(This,pcchString) \ - ( (This)->lpVtbl -> GetLength(This,pcchString) ) +#define ICorDebugStringValue_GetLength(This,pcchString) \ + ( (This)->lpVtbl -> GetLength(This,pcchString) ) -#define ICorDebugStringValue_GetString(This,cchString,pcchString,szString) \ - ( (This)->lpVtbl -> GetString(This,cchString,pcchString,szString) ) +#define ICorDebugStringValue_GetString(This,cchString,pcchString,szString) \ + ( (This)->lpVtbl -> GetString(This,cchString,pcchString,szString) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugStringValue_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugStringValue_INTERFACE_DEFINED__ */ /* interface __MIDL_itf_cordebug_0000_0101 */ -/* [local] */ +/* [local] */ #pragma warning(pop) @@ -15069,128 +15070,128 @@ extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0101_v0_0_s_ifspec; #define __ICorDebugArrayValue_INTERFACE_DEFINED__ /* interface ICorDebugArrayValue */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugArrayValue; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("0405B0DF-A660-11d2-BD02-0000F80849BD") ICorDebugArrayValue : public ICorDebugHeapValue { public: - virtual HRESULT STDMETHODCALLTYPE GetElementType( + virtual HRESULT STDMETHODCALLTYPE GetElementType( /* [out] */ CorElementType *pType) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetRank( + + virtual HRESULT STDMETHODCALLTYPE GetRank( /* [out] */ ULONG32 *pnRank) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCount( + + virtual HRESULT STDMETHODCALLTYPE GetCount( /* [out] */ ULONG32 *pnCount) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetDimensions( + + virtual HRESULT STDMETHODCALLTYPE GetDimensions( /* [in] */ ULONG32 cdim, /* [length_is][size_is][out] */ ULONG32 dims[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE HasBaseIndicies( + + virtual HRESULT STDMETHODCALLTYPE HasBaseIndicies( /* [out] */ BOOL *pbHasBaseIndicies) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetBaseIndicies( + + virtual HRESULT STDMETHODCALLTYPE GetBaseIndicies( /* [in] */ ULONG32 cdim, /* [length_is][size_is][out] */ ULONG32 indicies[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetElement( + + virtual HRESULT STDMETHODCALLTYPE GetElement( /* [in] */ ULONG32 cdim, /* [length_is][size_is][in] */ ULONG32 indices[ ], /* [out] */ ICorDebugValue **ppValue) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetElementAtPosition( + + virtual HRESULT STDMETHODCALLTYPE GetElementAtPosition( /* [in] */ ULONG32 nPosition, /* [out] */ ICorDebugValue **ppValue) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugArrayValueVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugArrayValue * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugArrayValue * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugArrayValue * This); - - HRESULT ( STDMETHODCALLTYPE *GetType )( + + HRESULT ( STDMETHODCALLTYPE *GetType )( ICorDebugArrayValue * This, /* [out] */ CorElementType *pType); - - HRESULT ( STDMETHODCALLTYPE *GetSize )( + + HRESULT ( STDMETHODCALLTYPE *GetSize )( ICorDebugArrayValue * This, /* [out] */ ULONG32 *pSize); - - HRESULT ( STDMETHODCALLTYPE *GetAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetAddress )( ICorDebugArrayValue * This, /* [out] */ CORDB_ADDRESS *pAddress); - - HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )( + + HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )( ICorDebugArrayValue * This, /* [out] */ ICorDebugValueBreakpoint **ppBreakpoint); - - HRESULT ( STDMETHODCALLTYPE *IsValid )( + + HRESULT ( STDMETHODCALLTYPE *IsValid )( ICorDebugArrayValue * This, /* [out] */ BOOL *pbValid); - - HRESULT ( STDMETHODCALLTYPE *CreateRelocBreakpoint )( + + HRESULT ( STDMETHODCALLTYPE *CreateRelocBreakpoint )( ICorDebugArrayValue * This, /* [out] */ ICorDebugValueBreakpoint **ppBreakpoint); - - HRESULT ( STDMETHODCALLTYPE *GetElementType )( + + HRESULT ( STDMETHODCALLTYPE *GetElementType )( ICorDebugArrayValue * This, /* [out] */ CorElementType *pType); - - HRESULT ( STDMETHODCALLTYPE *GetRank )( + + HRESULT ( STDMETHODCALLTYPE *GetRank )( ICorDebugArrayValue * This, /* [out] */ ULONG32 *pnRank); - - HRESULT ( STDMETHODCALLTYPE *GetCount )( + + HRESULT ( STDMETHODCALLTYPE *GetCount )( ICorDebugArrayValue * This, /* [out] */ ULONG32 *pnCount); - - HRESULT ( STDMETHODCALLTYPE *GetDimensions )( + + HRESULT ( STDMETHODCALLTYPE *GetDimensions )( ICorDebugArrayValue * This, /* [in] */ ULONG32 cdim, /* [length_is][size_is][out] */ ULONG32 dims[ ]); - - HRESULT ( STDMETHODCALLTYPE *HasBaseIndicies )( + + HRESULT ( STDMETHODCALLTYPE *HasBaseIndicies )( ICorDebugArrayValue * This, /* [out] */ BOOL *pbHasBaseIndicies); - - HRESULT ( STDMETHODCALLTYPE *GetBaseIndicies )( + + HRESULT ( STDMETHODCALLTYPE *GetBaseIndicies )( ICorDebugArrayValue * This, /* [in] */ ULONG32 cdim, /* [length_is][size_is][out] */ ULONG32 indicies[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetElement )( + + HRESULT ( STDMETHODCALLTYPE *GetElement )( ICorDebugArrayValue * This, /* [in] */ ULONG32 cdim, /* [length_is][size_is][in] */ ULONG32 indices[ ], /* [out] */ ICorDebugValue **ppValue); - - HRESULT ( STDMETHODCALLTYPE *GetElementAtPosition )( + + HRESULT ( STDMETHODCALLTYPE *GetElementAtPosition )( ICorDebugArrayValue * This, /* [in] */ ULONG32 nPosition, /* [out] */ ICorDebugValue **ppValue); - + END_INTERFACE } ICorDebugArrayValueVtbl; @@ -15199,171 +15200,171 @@ EXTERN_C const IID IID_ICorDebugArrayValue; CONST_VTBL struct ICorDebugArrayValueVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugArrayValue_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugArrayValue_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugArrayValue_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugArrayValue_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugArrayValue_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugArrayValue_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugArrayValue_GetType(This,pType) \ - ( (This)->lpVtbl -> GetType(This,pType) ) +#define ICorDebugArrayValue_GetType(This,pType) \ + ( (This)->lpVtbl -> GetType(This,pType) ) -#define ICorDebugArrayValue_GetSize(This,pSize) \ - ( (This)->lpVtbl -> GetSize(This,pSize) ) +#define ICorDebugArrayValue_GetSize(This,pSize) \ + ( (This)->lpVtbl -> GetSize(This,pSize) ) -#define ICorDebugArrayValue_GetAddress(This,pAddress) \ - ( (This)->lpVtbl -> GetAddress(This,pAddress) ) +#define ICorDebugArrayValue_GetAddress(This,pAddress) \ + ( (This)->lpVtbl -> GetAddress(This,pAddress) ) -#define ICorDebugArrayValue_CreateBreakpoint(This,ppBreakpoint) \ - ( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) ) +#define ICorDebugArrayValue_CreateBreakpoint(This,ppBreakpoint) \ + ( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) ) -#define ICorDebugArrayValue_IsValid(This,pbValid) \ - ( (This)->lpVtbl -> IsValid(This,pbValid) ) +#define ICorDebugArrayValue_IsValid(This,pbValid) \ + ( (This)->lpVtbl -> IsValid(This,pbValid) ) -#define ICorDebugArrayValue_CreateRelocBreakpoint(This,ppBreakpoint) \ - ( (This)->lpVtbl -> CreateRelocBreakpoint(This,ppBreakpoint) ) +#define ICorDebugArrayValue_CreateRelocBreakpoint(This,ppBreakpoint) \ + ( (This)->lpVtbl -> CreateRelocBreakpoint(This,ppBreakpoint) ) -#define ICorDebugArrayValue_GetElementType(This,pType) \ - ( (This)->lpVtbl -> GetElementType(This,pType) ) +#define ICorDebugArrayValue_GetElementType(This,pType) \ + ( (This)->lpVtbl -> GetElementType(This,pType) ) -#define ICorDebugArrayValue_GetRank(This,pnRank) \ - ( (This)->lpVtbl -> GetRank(This,pnRank) ) +#define ICorDebugArrayValue_GetRank(This,pnRank) \ + ( (This)->lpVtbl -> GetRank(This,pnRank) ) -#define ICorDebugArrayValue_GetCount(This,pnCount) \ - ( (This)->lpVtbl -> GetCount(This,pnCount) ) +#define ICorDebugArrayValue_GetCount(This,pnCount) \ + ( (This)->lpVtbl -> GetCount(This,pnCount) ) -#define ICorDebugArrayValue_GetDimensions(This,cdim,dims) \ - ( (This)->lpVtbl -> GetDimensions(This,cdim,dims) ) +#define ICorDebugArrayValue_GetDimensions(This,cdim,dims) \ + ( (This)->lpVtbl -> GetDimensions(This,cdim,dims) ) -#define ICorDebugArrayValue_HasBaseIndicies(This,pbHasBaseIndicies) \ - ( (This)->lpVtbl -> HasBaseIndicies(This,pbHasBaseIndicies) ) +#define ICorDebugArrayValue_HasBaseIndicies(This,pbHasBaseIndicies) \ + ( (This)->lpVtbl -> HasBaseIndicies(This,pbHasBaseIndicies) ) -#define ICorDebugArrayValue_GetBaseIndicies(This,cdim,indicies) \ - ( (This)->lpVtbl -> GetBaseIndicies(This,cdim,indicies) ) +#define ICorDebugArrayValue_GetBaseIndicies(This,cdim,indicies) \ + ( (This)->lpVtbl -> GetBaseIndicies(This,cdim,indicies) ) -#define ICorDebugArrayValue_GetElement(This,cdim,indices,ppValue) \ - ( (This)->lpVtbl -> GetElement(This,cdim,indices,ppValue) ) +#define ICorDebugArrayValue_GetElement(This,cdim,indices,ppValue) \ + ( (This)->lpVtbl -> GetElement(This,cdim,indices,ppValue) ) -#define ICorDebugArrayValue_GetElementAtPosition(This,nPosition,ppValue) \ - ( (This)->lpVtbl -> GetElementAtPosition(This,nPosition,ppValue) ) +#define ICorDebugArrayValue_GetElementAtPosition(This,nPosition,ppValue) \ + ( (This)->lpVtbl -> GetElementAtPosition(This,nPosition,ppValue) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugArrayValue_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugArrayValue_INTERFACE_DEFINED__ */ #ifndef __ICorDebugVariableHome_INTERFACE_DEFINED__ #define __ICorDebugVariableHome_INTERFACE_DEFINED__ /* interface ICorDebugVariableHome */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ -typedef +typedef enum VariableLocationType { - VLT_REGISTER = 0, - VLT_REGISTER_RELATIVE = ( VLT_REGISTER + 1 ) , - VLT_INVALID = ( VLT_REGISTER_RELATIVE + 1 ) - } VariableLocationType; + VLT_REGISTER = 0, + VLT_REGISTER_RELATIVE = ( VLT_REGISTER + 1 ) , + VLT_INVALID = ( VLT_REGISTER_RELATIVE + 1 ) + } VariableLocationType; EXTERN_C const IID IID_ICorDebugVariableHome; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("50847b8d-f43f-41b0-924c-6383a5f2278b") ICorDebugVariableHome : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetCode( + virtual HRESULT STDMETHODCALLTYPE GetCode( /* [out] */ ICorDebugCode **ppCode) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetSlotIndex( + + virtual HRESULT STDMETHODCALLTYPE GetSlotIndex( /* [out] */ ULONG32 *pSlotIndex) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetArgumentIndex( + + virtual HRESULT STDMETHODCALLTYPE GetArgumentIndex( /* [out] */ ULONG32 *pArgumentIndex) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetLiveRange( + + virtual HRESULT STDMETHODCALLTYPE GetLiveRange( /* [out] */ ULONG32 *pStartOffset, /* [out] */ ULONG32 *pEndOffset) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetLocationType( + + virtual HRESULT STDMETHODCALLTYPE GetLocationType( /* [out] */ VariableLocationType *pLocationType) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetRegister( + + virtual HRESULT STDMETHODCALLTYPE GetRegister( /* [out] */ CorDebugRegister *pRegister) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetOffset( + + virtual HRESULT STDMETHODCALLTYPE GetOffset( /* [out] */ LONG *pOffset) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugVariableHomeVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugVariableHome * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugVariableHome * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugVariableHome * This); - - HRESULT ( STDMETHODCALLTYPE *GetCode )( + + HRESULT ( STDMETHODCALLTYPE *GetCode )( ICorDebugVariableHome * This, /* [out] */ ICorDebugCode **ppCode); - - HRESULT ( STDMETHODCALLTYPE *GetSlotIndex )( + + HRESULT ( STDMETHODCALLTYPE *GetSlotIndex )( ICorDebugVariableHome * This, /* [out] */ ULONG32 *pSlotIndex); - - HRESULT ( STDMETHODCALLTYPE *GetArgumentIndex )( + + HRESULT ( STDMETHODCALLTYPE *GetArgumentIndex )( ICorDebugVariableHome * This, /* [out] */ ULONG32 *pArgumentIndex); - - HRESULT ( STDMETHODCALLTYPE *GetLiveRange )( + + HRESULT ( STDMETHODCALLTYPE *GetLiveRange )( ICorDebugVariableHome * This, /* [out] */ ULONG32 *pStartOffset, /* [out] */ ULONG32 *pEndOffset); - - HRESULT ( STDMETHODCALLTYPE *GetLocationType )( + + HRESULT ( STDMETHODCALLTYPE *GetLocationType )( ICorDebugVariableHome * This, /* [out] */ VariableLocationType *pLocationType); - - HRESULT ( STDMETHODCALLTYPE *GetRegister )( + + HRESULT ( STDMETHODCALLTYPE *GetRegister )( ICorDebugVariableHome * This, /* [out] */ CorDebugRegister *pRegister); - - HRESULT ( STDMETHODCALLTYPE *GetOffset )( + + HRESULT ( STDMETHODCALLTYPE *GetOffset )( ICorDebugVariableHome * This, /* [out] */ LONG *pOffset); - + END_INTERFACE } ICorDebugVariableHomeVtbl; @@ -15372,137 +15373,137 @@ EXTERN_C const IID IID_ICorDebugVariableHome; CONST_VTBL struct ICorDebugVariableHomeVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugVariableHome_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugVariableHome_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugVariableHome_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugVariableHome_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugVariableHome_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugVariableHome_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugVariableHome_GetCode(This,ppCode) \ - ( (This)->lpVtbl -> GetCode(This,ppCode) ) +#define ICorDebugVariableHome_GetCode(This,ppCode) \ + ( (This)->lpVtbl -> GetCode(This,ppCode) ) -#define ICorDebugVariableHome_GetSlotIndex(This,pSlotIndex) \ - ( (This)->lpVtbl -> GetSlotIndex(This,pSlotIndex) ) +#define ICorDebugVariableHome_GetSlotIndex(This,pSlotIndex) \ + ( (This)->lpVtbl -> GetSlotIndex(This,pSlotIndex) ) -#define ICorDebugVariableHome_GetArgumentIndex(This,pArgumentIndex) \ - ( (This)->lpVtbl -> GetArgumentIndex(This,pArgumentIndex) ) +#define ICorDebugVariableHome_GetArgumentIndex(This,pArgumentIndex) \ + ( (This)->lpVtbl -> GetArgumentIndex(This,pArgumentIndex) ) -#define ICorDebugVariableHome_GetLiveRange(This,pStartOffset,pEndOffset) \ - ( (This)->lpVtbl -> GetLiveRange(This,pStartOffset,pEndOffset) ) +#define ICorDebugVariableHome_GetLiveRange(This,pStartOffset,pEndOffset) \ + ( (This)->lpVtbl -> GetLiveRange(This,pStartOffset,pEndOffset) ) -#define ICorDebugVariableHome_GetLocationType(This,pLocationType) \ - ( (This)->lpVtbl -> GetLocationType(This,pLocationType) ) +#define ICorDebugVariableHome_GetLocationType(This,pLocationType) \ + ( (This)->lpVtbl -> GetLocationType(This,pLocationType) ) -#define ICorDebugVariableHome_GetRegister(This,pRegister) \ - ( (This)->lpVtbl -> GetRegister(This,pRegister) ) +#define ICorDebugVariableHome_GetRegister(This,pRegister) \ + ( (This)->lpVtbl -> GetRegister(This,pRegister) ) -#define ICorDebugVariableHome_GetOffset(This,pOffset) \ - ( (This)->lpVtbl -> GetOffset(This,pOffset) ) +#define ICorDebugVariableHome_GetOffset(This,pOffset) \ + ( (This)->lpVtbl -> GetOffset(This,pOffset) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugVariableHome_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugVariableHome_INTERFACE_DEFINED__ */ #ifndef __ICorDebugHandleValue_INTERFACE_DEFINED__ #define __ICorDebugHandleValue_INTERFACE_DEFINED__ /* interface ICorDebugHandleValue */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugHandleValue; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("029596E8-276B-46a1-9821-732E96BBB00B") ICorDebugHandleValue : public ICorDebugReferenceValue { public: - virtual HRESULT STDMETHODCALLTYPE GetHandleType( + virtual HRESULT STDMETHODCALLTYPE GetHandleType( /* [out] */ CorDebugHandleType *pType) = 0; - + virtual HRESULT STDMETHODCALLTYPE Dispose( void) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugHandleValueVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugHandleValue * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugHandleValue * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugHandleValue * This); - - HRESULT ( STDMETHODCALLTYPE *GetType )( + + HRESULT ( STDMETHODCALLTYPE *GetType )( ICorDebugHandleValue * This, /* [out] */ CorElementType *pType); - - HRESULT ( STDMETHODCALLTYPE *GetSize )( + + HRESULT ( STDMETHODCALLTYPE *GetSize )( ICorDebugHandleValue * This, /* [out] */ ULONG32 *pSize); - - HRESULT ( STDMETHODCALLTYPE *GetAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetAddress )( ICorDebugHandleValue * This, /* [out] */ CORDB_ADDRESS *pAddress); - - HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )( + + HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )( ICorDebugHandleValue * This, /* [out] */ ICorDebugValueBreakpoint **ppBreakpoint); - - HRESULT ( STDMETHODCALLTYPE *IsNull )( + + HRESULT ( STDMETHODCALLTYPE *IsNull )( ICorDebugHandleValue * This, /* [out] */ BOOL *pbNull); - - HRESULT ( STDMETHODCALLTYPE *GetValue )( + + HRESULT ( STDMETHODCALLTYPE *GetValue )( ICorDebugHandleValue * This, /* [out] */ CORDB_ADDRESS *pValue); - - HRESULT ( STDMETHODCALLTYPE *SetValue )( + + HRESULT ( STDMETHODCALLTYPE *SetValue )( ICorDebugHandleValue * This, /* [in] */ CORDB_ADDRESS value); - - HRESULT ( STDMETHODCALLTYPE *Dereference )( + + HRESULT ( STDMETHODCALLTYPE *Dereference )( ICorDebugHandleValue * This, /* [out] */ ICorDebugValue **ppValue); - - HRESULT ( STDMETHODCALLTYPE *DereferenceStrong )( + + HRESULT ( STDMETHODCALLTYPE *DereferenceStrong )( ICorDebugHandleValue * This, /* [out] */ ICorDebugValue **ppValue); - - HRESULT ( STDMETHODCALLTYPE *GetHandleType )( + + HRESULT ( STDMETHODCALLTYPE *GetHandleType )( ICorDebugHandleValue * This, /* [out] */ CorDebugHandleType *pType); - - HRESULT ( STDMETHODCALLTYPE *Dispose )( + + HRESULT ( STDMETHODCALLTYPE *Dispose )( ICorDebugHandleValue * This); - + END_INTERFACE } ICorDebugHandleValueVtbl; @@ -15511,150 +15512,150 @@ EXTERN_C const IID IID_ICorDebugHandleValue; CONST_VTBL struct ICorDebugHandleValueVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugHandleValue_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugHandleValue_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugHandleValue_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugHandleValue_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugHandleValue_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugHandleValue_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugHandleValue_GetType(This,pType) \ - ( (This)->lpVtbl -> GetType(This,pType) ) +#define ICorDebugHandleValue_GetType(This,pType) \ + ( (This)->lpVtbl -> GetType(This,pType) ) -#define ICorDebugHandleValue_GetSize(This,pSize) \ - ( (This)->lpVtbl -> GetSize(This,pSize) ) +#define ICorDebugHandleValue_GetSize(This,pSize) \ + ( (This)->lpVtbl -> GetSize(This,pSize) ) -#define ICorDebugHandleValue_GetAddress(This,pAddress) \ - ( (This)->lpVtbl -> GetAddress(This,pAddress) ) +#define ICorDebugHandleValue_GetAddress(This,pAddress) \ + ( (This)->lpVtbl -> GetAddress(This,pAddress) ) -#define ICorDebugHandleValue_CreateBreakpoint(This,ppBreakpoint) \ - ( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) ) +#define ICorDebugHandleValue_CreateBreakpoint(This,ppBreakpoint) \ + ( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) ) -#define ICorDebugHandleValue_IsNull(This,pbNull) \ - ( (This)->lpVtbl -> IsNull(This,pbNull) ) +#define ICorDebugHandleValue_IsNull(This,pbNull) \ + ( (This)->lpVtbl -> IsNull(This,pbNull) ) -#define ICorDebugHandleValue_GetValue(This,pValue) \ - ( (This)->lpVtbl -> GetValue(This,pValue) ) +#define ICorDebugHandleValue_GetValue(This,pValue) \ + ( (This)->lpVtbl -> GetValue(This,pValue) ) -#define ICorDebugHandleValue_SetValue(This,value) \ - ( (This)->lpVtbl -> SetValue(This,value) ) +#define ICorDebugHandleValue_SetValue(This,value) \ + ( (This)->lpVtbl -> SetValue(This,value) ) -#define ICorDebugHandleValue_Dereference(This,ppValue) \ - ( (This)->lpVtbl -> Dereference(This,ppValue) ) +#define ICorDebugHandleValue_Dereference(This,ppValue) \ + ( (This)->lpVtbl -> Dereference(This,ppValue) ) -#define ICorDebugHandleValue_DereferenceStrong(This,ppValue) \ - ( (This)->lpVtbl -> DereferenceStrong(This,ppValue) ) +#define ICorDebugHandleValue_DereferenceStrong(This,ppValue) \ + ( (This)->lpVtbl -> DereferenceStrong(This,ppValue) ) -#define ICorDebugHandleValue_GetHandleType(This,pType) \ - ( (This)->lpVtbl -> GetHandleType(This,pType) ) +#define ICorDebugHandleValue_GetHandleType(This,pType) \ + ( (This)->lpVtbl -> GetHandleType(This,pType) ) -#define ICorDebugHandleValue_Dispose(This) \ - ( (This)->lpVtbl -> Dispose(This) ) +#define ICorDebugHandleValue_Dispose(This) \ + ( (This)->lpVtbl -> Dispose(This) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugHandleValue_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugHandleValue_INTERFACE_DEFINED__ */ #ifndef __ICorDebugContext_INTERFACE_DEFINED__ #define __ICorDebugContext_INTERFACE_DEFINED__ /* interface ICorDebugContext */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugContext; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("CC7BCB00-8A68-11d2-983C-0000F808342D") ICorDebugContext : public ICorDebugObjectValue { public: }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugContextVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugContext * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugContext * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugContext * This); - - HRESULT ( STDMETHODCALLTYPE *GetType )( + + HRESULT ( STDMETHODCALLTYPE *GetType )( ICorDebugContext * This, /* [out] */ CorElementType *pType); - - HRESULT ( STDMETHODCALLTYPE *GetSize )( + + HRESULT ( STDMETHODCALLTYPE *GetSize )( ICorDebugContext * This, /* [out] */ ULONG32 *pSize); - - HRESULT ( STDMETHODCALLTYPE *GetAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetAddress )( ICorDebugContext * This, /* [out] */ CORDB_ADDRESS *pAddress); - - HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )( + + HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )( ICorDebugContext * This, /* [out] */ ICorDebugValueBreakpoint **ppBreakpoint); - - HRESULT ( STDMETHODCALLTYPE *GetClass )( + + HRESULT ( STDMETHODCALLTYPE *GetClass )( ICorDebugContext * This, /* [out] */ ICorDebugClass **ppClass); - - HRESULT ( STDMETHODCALLTYPE *GetFieldValue )( + + HRESULT ( STDMETHODCALLTYPE *GetFieldValue )( ICorDebugContext * This, /* [in] */ ICorDebugClass *pClass, /* [in] */ mdFieldDef fieldDef, /* [out] */ ICorDebugValue **ppValue); - - HRESULT ( STDMETHODCALLTYPE *GetVirtualMethod )( + + HRESULT ( STDMETHODCALLTYPE *GetVirtualMethod )( ICorDebugContext * This, /* [in] */ mdMemberRef memberRef, /* [out] */ ICorDebugFunction **ppFunction); - - HRESULT ( STDMETHODCALLTYPE *GetContext )( + + HRESULT ( STDMETHODCALLTYPE *GetContext )( ICorDebugContext * This, /* [out] */ ICorDebugContext **ppContext); - - HRESULT ( STDMETHODCALLTYPE *IsValueClass )( + + HRESULT ( STDMETHODCALLTYPE *IsValueClass )( ICorDebugContext * This, /* [out] */ BOOL *pbIsValueClass); - - HRESULT ( STDMETHODCALLTYPE *GetManagedCopy )( + + HRESULT ( STDMETHODCALLTYPE *GetManagedCopy )( ICorDebugContext * This, /* [out] */ IUnknown **ppObject); - - HRESULT ( STDMETHODCALLTYPE *SetFromManagedCopy )( + + HRESULT ( STDMETHODCALLTYPE *SetFromManagedCopy )( ICorDebugContext * This, /* [in] */ IUnknown *pObject); - + END_INTERFACE } ICorDebugContextVtbl; @@ -15663,125 +15664,125 @@ EXTERN_C const IID IID_ICorDebugContext; CONST_VTBL struct ICorDebugContextVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugContext_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugContext_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugContext_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugContext_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugContext_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugContext_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugContext_GetType(This,pType) \ - ( (This)->lpVtbl -> GetType(This,pType) ) +#define ICorDebugContext_GetType(This,pType) \ + ( (This)->lpVtbl -> GetType(This,pType) ) -#define ICorDebugContext_GetSize(This,pSize) \ - ( (This)->lpVtbl -> GetSize(This,pSize) ) +#define ICorDebugContext_GetSize(This,pSize) \ + ( (This)->lpVtbl -> GetSize(This,pSize) ) -#define ICorDebugContext_GetAddress(This,pAddress) \ - ( (This)->lpVtbl -> GetAddress(This,pAddress) ) +#define ICorDebugContext_GetAddress(This,pAddress) \ + ( (This)->lpVtbl -> GetAddress(This,pAddress) ) -#define ICorDebugContext_CreateBreakpoint(This,ppBreakpoint) \ - ( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) ) +#define ICorDebugContext_CreateBreakpoint(This,ppBreakpoint) \ + ( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) ) -#define ICorDebugContext_GetClass(This,ppClass) \ - ( (This)->lpVtbl -> GetClass(This,ppClass) ) +#define ICorDebugContext_GetClass(This,ppClass) \ + ( (This)->lpVtbl -> GetClass(This,ppClass) ) -#define ICorDebugContext_GetFieldValue(This,pClass,fieldDef,ppValue) \ - ( (This)->lpVtbl -> GetFieldValue(This,pClass,fieldDef,ppValue) ) +#define ICorDebugContext_GetFieldValue(This,pClass,fieldDef,ppValue) \ + ( (This)->lpVtbl -> GetFieldValue(This,pClass,fieldDef,ppValue) ) -#define ICorDebugContext_GetVirtualMethod(This,memberRef,ppFunction) \ - ( (This)->lpVtbl -> GetVirtualMethod(This,memberRef,ppFunction) ) +#define ICorDebugContext_GetVirtualMethod(This,memberRef,ppFunction) \ + ( (This)->lpVtbl -> GetVirtualMethod(This,memberRef,ppFunction) ) -#define ICorDebugContext_GetContext(This,ppContext) \ - ( (This)->lpVtbl -> GetContext(This,ppContext) ) +#define ICorDebugContext_GetContext(This,ppContext) \ + ( (This)->lpVtbl -> GetContext(This,ppContext) ) -#define ICorDebugContext_IsValueClass(This,pbIsValueClass) \ - ( (This)->lpVtbl -> IsValueClass(This,pbIsValueClass) ) +#define ICorDebugContext_IsValueClass(This,pbIsValueClass) \ + ( (This)->lpVtbl -> IsValueClass(This,pbIsValueClass) ) -#define ICorDebugContext_GetManagedCopy(This,ppObject) \ - ( (This)->lpVtbl -> GetManagedCopy(This,ppObject) ) +#define ICorDebugContext_GetManagedCopy(This,ppObject) \ + ( (This)->lpVtbl -> GetManagedCopy(This,ppObject) ) -#define ICorDebugContext_SetFromManagedCopy(This,pObject) \ - ( (This)->lpVtbl -> SetFromManagedCopy(This,pObject) ) +#define ICorDebugContext_SetFromManagedCopy(This,pObject) \ + ( (This)->lpVtbl -> SetFromManagedCopy(This,pObject) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugContext_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugContext_INTERFACE_DEFINED__ */ #ifndef __ICorDebugComObjectValue_INTERFACE_DEFINED__ #define __ICorDebugComObjectValue_INTERFACE_DEFINED__ /* interface ICorDebugComObjectValue */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugComObjectValue; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("5F69C5E5-3E12-42DF-B371-F9D761D6EE24") ICorDebugComObjectValue : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetCachedInterfaceTypes( + virtual HRESULT STDMETHODCALLTYPE GetCachedInterfaceTypes( /* [in] */ BOOL bIInspectableOnly, /* [out] */ ICorDebugTypeEnum **ppInterfacesEnum) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCachedInterfacePointers( + + virtual HRESULT STDMETHODCALLTYPE GetCachedInterfacePointers( /* [in] */ BOOL bIInspectableOnly, /* [in] */ ULONG32 celt, /* [out] */ ULONG32 *pcEltFetched, /* [length_is][size_is][out] */ CORDB_ADDRESS *ptrs) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugComObjectValueVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugComObjectValue * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugComObjectValue * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugComObjectValue * This); - - HRESULT ( STDMETHODCALLTYPE *GetCachedInterfaceTypes )( + + HRESULT ( STDMETHODCALLTYPE *GetCachedInterfaceTypes )( ICorDebugComObjectValue * This, /* [in] */ BOOL bIInspectableOnly, /* [out] */ ICorDebugTypeEnum **ppInterfacesEnum); - - HRESULT ( STDMETHODCALLTYPE *GetCachedInterfacePointers )( + + HRESULT ( STDMETHODCALLTYPE *GetCachedInterfacePointers )( ICorDebugComObjectValue * This, /* [in] */ BOOL bIInspectableOnly, /* [in] */ ULONG32 celt, /* [out] */ ULONG32 *pcEltFetched, /* [length_is][size_is][out] */ CORDB_ADDRESS *ptrs); - + END_INTERFACE } ICorDebugComObjectValueVtbl; @@ -15790,100 +15791,100 @@ EXTERN_C const IID IID_ICorDebugComObjectValue; CONST_VTBL struct ICorDebugComObjectValueVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugComObjectValue_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugComObjectValue_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugComObjectValue_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugComObjectValue_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugComObjectValue_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugComObjectValue_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugComObjectValue_GetCachedInterfaceTypes(This,bIInspectableOnly,ppInterfacesEnum) \ - ( (This)->lpVtbl -> GetCachedInterfaceTypes(This,bIInspectableOnly,ppInterfacesEnum) ) +#define ICorDebugComObjectValue_GetCachedInterfaceTypes(This,bIInspectableOnly,ppInterfacesEnum) \ + ( (This)->lpVtbl -> GetCachedInterfaceTypes(This,bIInspectableOnly,ppInterfacesEnum) ) -#define ICorDebugComObjectValue_GetCachedInterfacePointers(This,bIInspectableOnly,celt,pcEltFetched,ptrs) \ - ( (This)->lpVtbl -> GetCachedInterfacePointers(This,bIInspectableOnly,celt,pcEltFetched,ptrs) ) +#define ICorDebugComObjectValue_GetCachedInterfacePointers(This,bIInspectableOnly,celt,pcEltFetched,ptrs) \ + ( (This)->lpVtbl -> GetCachedInterfacePointers(This,bIInspectableOnly,celt,pcEltFetched,ptrs) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugComObjectValue_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugComObjectValue_INTERFACE_DEFINED__ */ #ifndef __ICorDebugObjectEnum_INTERFACE_DEFINED__ #define __ICorDebugObjectEnum_INTERFACE_DEFINED__ /* interface ICorDebugObjectEnum */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugObjectEnum; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("CC7BCB02-8A68-11d2-983C-0000F808342D") ICorDebugObjectEnum : public ICorDebugEnum { public: - virtual HRESULT STDMETHODCALLTYPE Next( + virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ ULONG celt, /* [length_is][size_is][out] */ CORDB_ADDRESS objects[ ], /* [out] */ ULONG *pceltFetched) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugObjectEnumVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugObjectEnum * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugObjectEnum * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugObjectEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Skip )( + + HRESULT ( STDMETHODCALLTYPE *Skip )( ICorDebugObjectEnum * This, /* [in] */ ULONG celt); - - HRESULT ( STDMETHODCALLTYPE *Reset )( + + HRESULT ( STDMETHODCALLTYPE *Reset )( ICorDebugObjectEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Clone )( + + HRESULT ( STDMETHODCALLTYPE *Clone )( ICorDebugObjectEnum * This, /* [out] */ ICorDebugEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetCount )( + + HRESULT ( STDMETHODCALLTYPE *GetCount )( ICorDebugObjectEnum * This, /* [out] */ ULONG *pcelt); - - HRESULT ( STDMETHODCALLTYPE *Next )( + + HRESULT ( STDMETHODCALLTYPE *Next )( ICorDebugObjectEnum * This, /* [in] */ ULONG celt, /* [length_is][size_is][out] */ CORDB_ADDRESS objects[ ], /* [out] */ ULONG *pceltFetched); - + END_INTERFACE } ICorDebugObjectEnumVtbl; @@ -15892,110 +15893,110 @@ EXTERN_C const IID IID_ICorDebugObjectEnum; CONST_VTBL struct ICorDebugObjectEnumVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugObjectEnum_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugObjectEnum_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugObjectEnum_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugObjectEnum_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugObjectEnum_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugObjectEnum_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugObjectEnum_Skip(This,celt) \ - ( (This)->lpVtbl -> Skip(This,celt) ) +#define ICorDebugObjectEnum_Skip(This,celt) \ + ( (This)->lpVtbl -> Skip(This,celt) ) -#define ICorDebugObjectEnum_Reset(This) \ - ( (This)->lpVtbl -> Reset(This) ) +#define ICorDebugObjectEnum_Reset(This) \ + ( (This)->lpVtbl -> Reset(This) ) -#define ICorDebugObjectEnum_Clone(This,ppEnum) \ - ( (This)->lpVtbl -> Clone(This,ppEnum) ) +#define ICorDebugObjectEnum_Clone(This,ppEnum) \ + ( (This)->lpVtbl -> Clone(This,ppEnum) ) -#define ICorDebugObjectEnum_GetCount(This,pcelt) \ - ( (This)->lpVtbl -> GetCount(This,pcelt) ) +#define ICorDebugObjectEnum_GetCount(This,pcelt) \ + ( (This)->lpVtbl -> GetCount(This,pcelt) ) -#define ICorDebugObjectEnum_Next(This,celt,objects,pceltFetched) \ - ( (This)->lpVtbl -> Next(This,celt,objects,pceltFetched) ) +#define ICorDebugObjectEnum_Next(This,celt,objects,pceltFetched) \ + ( (This)->lpVtbl -> Next(This,celt,objects,pceltFetched) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugObjectEnum_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugObjectEnum_INTERFACE_DEFINED__ */ #ifndef __ICorDebugBreakpointEnum_INTERFACE_DEFINED__ #define __ICorDebugBreakpointEnum_INTERFACE_DEFINED__ /* interface ICorDebugBreakpointEnum */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugBreakpointEnum; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("CC7BCB03-8A68-11d2-983C-0000F808342D") ICorDebugBreakpointEnum : public ICorDebugEnum { public: - virtual HRESULT STDMETHODCALLTYPE Next( + virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ ULONG celt, /* [length_is][size_is][out] */ ICorDebugBreakpoint *breakpoints[ ], /* [out] */ ULONG *pceltFetched) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugBreakpointEnumVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugBreakpointEnum * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugBreakpointEnum * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugBreakpointEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Skip )( + + HRESULT ( STDMETHODCALLTYPE *Skip )( ICorDebugBreakpointEnum * This, /* [in] */ ULONG celt); - - HRESULT ( STDMETHODCALLTYPE *Reset )( + + HRESULT ( STDMETHODCALLTYPE *Reset )( ICorDebugBreakpointEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Clone )( + + HRESULT ( STDMETHODCALLTYPE *Clone )( ICorDebugBreakpointEnum * This, /* [out] */ ICorDebugEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetCount )( + + HRESULT ( STDMETHODCALLTYPE *GetCount )( ICorDebugBreakpointEnum * This, /* [out] */ ULONG *pcelt); - - HRESULT ( STDMETHODCALLTYPE *Next )( + + HRESULT ( STDMETHODCALLTYPE *Next )( ICorDebugBreakpointEnum * This, /* [in] */ ULONG celt, /* [length_is][size_is][out] */ ICorDebugBreakpoint *breakpoints[ ], /* [out] */ ULONG *pceltFetched); - + END_INTERFACE } ICorDebugBreakpointEnumVtbl; @@ -16004,110 +16005,110 @@ EXTERN_C const IID IID_ICorDebugBreakpointEnum; CONST_VTBL struct ICorDebugBreakpointEnumVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugBreakpointEnum_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugBreakpointEnum_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugBreakpointEnum_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugBreakpointEnum_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugBreakpointEnum_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugBreakpointEnum_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugBreakpointEnum_Skip(This,celt) \ - ( (This)->lpVtbl -> Skip(This,celt) ) +#define ICorDebugBreakpointEnum_Skip(This,celt) \ + ( (This)->lpVtbl -> Skip(This,celt) ) -#define ICorDebugBreakpointEnum_Reset(This) \ - ( (This)->lpVtbl -> Reset(This) ) +#define ICorDebugBreakpointEnum_Reset(This) \ + ( (This)->lpVtbl -> Reset(This) ) -#define ICorDebugBreakpointEnum_Clone(This,ppEnum) \ - ( (This)->lpVtbl -> Clone(This,ppEnum) ) +#define ICorDebugBreakpointEnum_Clone(This,ppEnum) \ + ( (This)->lpVtbl -> Clone(This,ppEnum) ) -#define ICorDebugBreakpointEnum_GetCount(This,pcelt) \ - ( (This)->lpVtbl -> GetCount(This,pcelt) ) +#define ICorDebugBreakpointEnum_GetCount(This,pcelt) \ + ( (This)->lpVtbl -> GetCount(This,pcelt) ) -#define ICorDebugBreakpointEnum_Next(This,celt,breakpoints,pceltFetched) \ - ( (This)->lpVtbl -> Next(This,celt,breakpoints,pceltFetched) ) +#define ICorDebugBreakpointEnum_Next(This,celt,breakpoints,pceltFetched) \ + ( (This)->lpVtbl -> Next(This,celt,breakpoints,pceltFetched) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugBreakpointEnum_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugBreakpointEnum_INTERFACE_DEFINED__ */ #ifndef __ICorDebugStepperEnum_INTERFACE_DEFINED__ #define __ICorDebugStepperEnum_INTERFACE_DEFINED__ /* interface ICorDebugStepperEnum */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugStepperEnum; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("CC7BCB04-8A68-11d2-983C-0000F808342D") ICorDebugStepperEnum : public ICorDebugEnum { public: - virtual HRESULT STDMETHODCALLTYPE Next( + virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ ULONG celt, /* [length_is][size_is][out] */ ICorDebugStepper *steppers[ ], /* [out] */ ULONG *pceltFetched) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugStepperEnumVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugStepperEnum * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugStepperEnum * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugStepperEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Skip )( + + HRESULT ( STDMETHODCALLTYPE *Skip )( ICorDebugStepperEnum * This, /* [in] */ ULONG celt); - - HRESULT ( STDMETHODCALLTYPE *Reset )( + + HRESULT ( STDMETHODCALLTYPE *Reset )( ICorDebugStepperEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Clone )( + + HRESULT ( STDMETHODCALLTYPE *Clone )( ICorDebugStepperEnum * This, /* [out] */ ICorDebugEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetCount )( + + HRESULT ( STDMETHODCALLTYPE *GetCount )( ICorDebugStepperEnum * This, /* [out] */ ULONG *pcelt); - - HRESULT ( STDMETHODCALLTYPE *Next )( + + HRESULT ( STDMETHODCALLTYPE *Next )( ICorDebugStepperEnum * This, /* [in] */ ULONG celt, /* [length_is][size_is][out] */ ICorDebugStepper *steppers[ ], /* [out] */ ULONG *pceltFetched); - + END_INTERFACE } ICorDebugStepperEnumVtbl; @@ -16116,110 +16117,110 @@ EXTERN_C const IID IID_ICorDebugStepperEnum; CONST_VTBL struct ICorDebugStepperEnumVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugStepperEnum_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugStepperEnum_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugStepperEnum_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugStepperEnum_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugStepperEnum_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugStepperEnum_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugStepperEnum_Skip(This,celt) \ - ( (This)->lpVtbl -> Skip(This,celt) ) +#define ICorDebugStepperEnum_Skip(This,celt) \ + ( (This)->lpVtbl -> Skip(This,celt) ) -#define ICorDebugStepperEnum_Reset(This) \ - ( (This)->lpVtbl -> Reset(This) ) +#define ICorDebugStepperEnum_Reset(This) \ + ( (This)->lpVtbl -> Reset(This) ) -#define ICorDebugStepperEnum_Clone(This,ppEnum) \ - ( (This)->lpVtbl -> Clone(This,ppEnum) ) +#define ICorDebugStepperEnum_Clone(This,ppEnum) \ + ( (This)->lpVtbl -> Clone(This,ppEnum) ) -#define ICorDebugStepperEnum_GetCount(This,pcelt) \ - ( (This)->lpVtbl -> GetCount(This,pcelt) ) +#define ICorDebugStepperEnum_GetCount(This,pcelt) \ + ( (This)->lpVtbl -> GetCount(This,pcelt) ) -#define ICorDebugStepperEnum_Next(This,celt,steppers,pceltFetched) \ - ( (This)->lpVtbl -> Next(This,celt,steppers,pceltFetched) ) +#define ICorDebugStepperEnum_Next(This,celt,steppers,pceltFetched) \ + ( (This)->lpVtbl -> Next(This,celt,steppers,pceltFetched) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugStepperEnum_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugStepperEnum_INTERFACE_DEFINED__ */ #ifndef __ICorDebugProcessEnum_INTERFACE_DEFINED__ #define __ICorDebugProcessEnum_INTERFACE_DEFINED__ /* interface ICorDebugProcessEnum */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugProcessEnum; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("CC7BCB05-8A68-11d2-983C-0000F808342D") ICorDebugProcessEnum : public ICorDebugEnum { public: - virtual HRESULT STDMETHODCALLTYPE Next( + virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ ULONG celt, /* [length_is][size_is][out] */ ICorDebugProcess *processes[ ], /* [out] */ ULONG *pceltFetched) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugProcessEnumVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugProcessEnum * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugProcessEnum * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugProcessEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Skip )( + + HRESULT ( STDMETHODCALLTYPE *Skip )( ICorDebugProcessEnum * This, /* [in] */ ULONG celt); - - HRESULT ( STDMETHODCALLTYPE *Reset )( + + HRESULT ( STDMETHODCALLTYPE *Reset )( ICorDebugProcessEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Clone )( + + HRESULT ( STDMETHODCALLTYPE *Clone )( ICorDebugProcessEnum * This, /* [out] */ ICorDebugEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetCount )( + + HRESULT ( STDMETHODCALLTYPE *GetCount )( ICorDebugProcessEnum * This, /* [out] */ ULONG *pcelt); - - HRESULT ( STDMETHODCALLTYPE *Next )( + + HRESULT ( STDMETHODCALLTYPE *Next )( ICorDebugProcessEnum * This, /* [in] */ ULONG celt, /* [length_is][size_is][out] */ ICorDebugProcess *processes[ ], /* [out] */ ULONG *pceltFetched); - + END_INTERFACE } ICorDebugProcessEnumVtbl; @@ -16228,110 +16229,110 @@ EXTERN_C const IID IID_ICorDebugProcessEnum; CONST_VTBL struct ICorDebugProcessEnumVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugProcessEnum_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugProcessEnum_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugProcessEnum_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugProcessEnum_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugProcessEnum_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugProcessEnum_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugProcessEnum_Skip(This,celt) \ - ( (This)->lpVtbl -> Skip(This,celt) ) +#define ICorDebugProcessEnum_Skip(This,celt) \ + ( (This)->lpVtbl -> Skip(This,celt) ) -#define ICorDebugProcessEnum_Reset(This) \ - ( (This)->lpVtbl -> Reset(This) ) +#define ICorDebugProcessEnum_Reset(This) \ + ( (This)->lpVtbl -> Reset(This) ) -#define ICorDebugProcessEnum_Clone(This,ppEnum) \ - ( (This)->lpVtbl -> Clone(This,ppEnum) ) +#define ICorDebugProcessEnum_Clone(This,ppEnum) \ + ( (This)->lpVtbl -> Clone(This,ppEnum) ) -#define ICorDebugProcessEnum_GetCount(This,pcelt) \ - ( (This)->lpVtbl -> GetCount(This,pcelt) ) +#define ICorDebugProcessEnum_GetCount(This,pcelt) \ + ( (This)->lpVtbl -> GetCount(This,pcelt) ) -#define ICorDebugProcessEnum_Next(This,celt,processes,pceltFetched) \ - ( (This)->lpVtbl -> Next(This,celt,processes,pceltFetched) ) +#define ICorDebugProcessEnum_Next(This,celt,processes,pceltFetched) \ + ( (This)->lpVtbl -> Next(This,celt,processes,pceltFetched) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugProcessEnum_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugProcessEnum_INTERFACE_DEFINED__ */ #ifndef __ICorDebugThreadEnum_INTERFACE_DEFINED__ #define __ICorDebugThreadEnum_INTERFACE_DEFINED__ /* interface ICorDebugThreadEnum */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugThreadEnum; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("CC7BCB06-8A68-11d2-983C-0000F808342D") ICorDebugThreadEnum : public ICorDebugEnum { public: - virtual HRESULT STDMETHODCALLTYPE Next( + virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ ULONG celt, /* [length_is][size_is][out] */ ICorDebugThread *threads[ ], /* [out] */ ULONG *pceltFetched) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugThreadEnumVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugThreadEnum * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugThreadEnum * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugThreadEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Skip )( + + HRESULT ( STDMETHODCALLTYPE *Skip )( ICorDebugThreadEnum * This, /* [in] */ ULONG celt); - - HRESULT ( STDMETHODCALLTYPE *Reset )( + + HRESULT ( STDMETHODCALLTYPE *Reset )( ICorDebugThreadEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Clone )( + + HRESULT ( STDMETHODCALLTYPE *Clone )( ICorDebugThreadEnum * This, /* [out] */ ICorDebugEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetCount )( + + HRESULT ( STDMETHODCALLTYPE *GetCount )( ICorDebugThreadEnum * This, /* [out] */ ULONG *pcelt); - - HRESULT ( STDMETHODCALLTYPE *Next )( + + HRESULT ( STDMETHODCALLTYPE *Next )( ICorDebugThreadEnum * This, /* [in] */ ULONG celt, /* [length_is][size_is][out] */ ICorDebugThread *threads[ ], /* [out] */ ULONG *pceltFetched); - + END_INTERFACE } ICorDebugThreadEnumVtbl; @@ -16340,110 +16341,110 @@ EXTERN_C const IID IID_ICorDebugThreadEnum; CONST_VTBL struct ICorDebugThreadEnumVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugThreadEnum_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugThreadEnum_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugThreadEnum_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugThreadEnum_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugThreadEnum_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugThreadEnum_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugThreadEnum_Skip(This,celt) \ - ( (This)->lpVtbl -> Skip(This,celt) ) +#define ICorDebugThreadEnum_Skip(This,celt) \ + ( (This)->lpVtbl -> Skip(This,celt) ) -#define ICorDebugThreadEnum_Reset(This) \ - ( (This)->lpVtbl -> Reset(This) ) +#define ICorDebugThreadEnum_Reset(This) \ + ( (This)->lpVtbl -> Reset(This) ) -#define ICorDebugThreadEnum_Clone(This,ppEnum) \ - ( (This)->lpVtbl -> Clone(This,ppEnum) ) +#define ICorDebugThreadEnum_Clone(This,ppEnum) \ + ( (This)->lpVtbl -> Clone(This,ppEnum) ) -#define ICorDebugThreadEnum_GetCount(This,pcelt) \ - ( (This)->lpVtbl -> GetCount(This,pcelt) ) +#define ICorDebugThreadEnum_GetCount(This,pcelt) \ + ( (This)->lpVtbl -> GetCount(This,pcelt) ) -#define ICorDebugThreadEnum_Next(This,celt,threads,pceltFetched) \ - ( (This)->lpVtbl -> Next(This,celt,threads,pceltFetched) ) +#define ICorDebugThreadEnum_Next(This,celt,threads,pceltFetched) \ + ( (This)->lpVtbl -> Next(This,celt,threads,pceltFetched) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugThreadEnum_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugThreadEnum_INTERFACE_DEFINED__ */ #ifndef __ICorDebugFrameEnum_INTERFACE_DEFINED__ #define __ICorDebugFrameEnum_INTERFACE_DEFINED__ /* interface ICorDebugFrameEnum */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugFrameEnum; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("CC7BCB07-8A68-11d2-983C-0000F808342D") ICorDebugFrameEnum : public ICorDebugEnum { public: - virtual HRESULT STDMETHODCALLTYPE Next( + virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ ULONG celt, /* [length_is][size_is][out] */ ICorDebugFrame *frames[ ], /* [out] */ ULONG *pceltFetched) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugFrameEnumVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugFrameEnum * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugFrameEnum * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugFrameEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Skip )( + + HRESULT ( STDMETHODCALLTYPE *Skip )( ICorDebugFrameEnum * This, /* [in] */ ULONG celt); - - HRESULT ( STDMETHODCALLTYPE *Reset )( + + HRESULT ( STDMETHODCALLTYPE *Reset )( ICorDebugFrameEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Clone )( + + HRESULT ( STDMETHODCALLTYPE *Clone )( ICorDebugFrameEnum * This, /* [out] */ ICorDebugEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetCount )( + + HRESULT ( STDMETHODCALLTYPE *GetCount )( ICorDebugFrameEnum * This, /* [out] */ ULONG *pcelt); - - HRESULT ( STDMETHODCALLTYPE *Next )( + + HRESULT ( STDMETHODCALLTYPE *Next )( ICorDebugFrameEnum * This, /* [in] */ ULONG celt, /* [length_is][size_is][out] */ ICorDebugFrame *frames[ ], /* [out] */ ULONG *pceltFetched); - + END_INTERFACE } ICorDebugFrameEnumVtbl; @@ -16452,110 +16453,110 @@ EXTERN_C const IID IID_ICorDebugFrameEnum; CONST_VTBL struct ICorDebugFrameEnumVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugFrameEnum_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugFrameEnum_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugFrameEnum_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugFrameEnum_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugFrameEnum_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugFrameEnum_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugFrameEnum_Skip(This,celt) \ - ( (This)->lpVtbl -> Skip(This,celt) ) +#define ICorDebugFrameEnum_Skip(This,celt) \ + ( (This)->lpVtbl -> Skip(This,celt) ) -#define ICorDebugFrameEnum_Reset(This) \ - ( (This)->lpVtbl -> Reset(This) ) +#define ICorDebugFrameEnum_Reset(This) \ + ( (This)->lpVtbl -> Reset(This) ) -#define ICorDebugFrameEnum_Clone(This,ppEnum) \ - ( (This)->lpVtbl -> Clone(This,ppEnum) ) +#define ICorDebugFrameEnum_Clone(This,ppEnum) \ + ( (This)->lpVtbl -> Clone(This,ppEnum) ) -#define ICorDebugFrameEnum_GetCount(This,pcelt) \ - ( (This)->lpVtbl -> GetCount(This,pcelt) ) +#define ICorDebugFrameEnum_GetCount(This,pcelt) \ + ( (This)->lpVtbl -> GetCount(This,pcelt) ) -#define ICorDebugFrameEnum_Next(This,celt,frames,pceltFetched) \ - ( (This)->lpVtbl -> Next(This,celt,frames,pceltFetched) ) +#define ICorDebugFrameEnum_Next(This,celt,frames,pceltFetched) \ + ( (This)->lpVtbl -> Next(This,celt,frames,pceltFetched) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugFrameEnum_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugFrameEnum_INTERFACE_DEFINED__ */ #ifndef __ICorDebugChainEnum_INTERFACE_DEFINED__ #define __ICorDebugChainEnum_INTERFACE_DEFINED__ /* interface ICorDebugChainEnum */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugChainEnum; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("CC7BCB08-8A68-11d2-983C-0000F808342D") ICorDebugChainEnum : public ICorDebugEnum { public: - virtual HRESULT STDMETHODCALLTYPE Next( + virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ ULONG celt, /* [length_is][size_is][out] */ ICorDebugChain *chains[ ], /* [out] */ ULONG *pceltFetched) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugChainEnumVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugChainEnum * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugChainEnum * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugChainEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Skip )( + + HRESULT ( STDMETHODCALLTYPE *Skip )( ICorDebugChainEnum * This, /* [in] */ ULONG celt); - - HRESULT ( STDMETHODCALLTYPE *Reset )( + + HRESULT ( STDMETHODCALLTYPE *Reset )( ICorDebugChainEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Clone )( + + HRESULT ( STDMETHODCALLTYPE *Clone )( ICorDebugChainEnum * This, /* [out] */ ICorDebugEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetCount )( + + HRESULT ( STDMETHODCALLTYPE *GetCount )( ICorDebugChainEnum * This, /* [out] */ ULONG *pcelt); - - HRESULT ( STDMETHODCALLTYPE *Next )( + + HRESULT ( STDMETHODCALLTYPE *Next )( ICorDebugChainEnum * This, /* [in] */ ULONG celt, /* [length_is][size_is][out] */ ICorDebugChain *chains[ ], /* [out] */ ULONG *pceltFetched); - + END_INTERFACE } ICorDebugChainEnumVtbl; @@ -16564,110 +16565,110 @@ EXTERN_C const IID IID_ICorDebugChainEnum; CONST_VTBL struct ICorDebugChainEnumVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugChainEnum_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugChainEnum_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugChainEnum_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugChainEnum_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugChainEnum_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugChainEnum_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugChainEnum_Skip(This,celt) \ - ( (This)->lpVtbl -> Skip(This,celt) ) +#define ICorDebugChainEnum_Skip(This,celt) \ + ( (This)->lpVtbl -> Skip(This,celt) ) -#define ICorDebugChainEnum_Reset(This) \ - ( (This)->lpVtbl -> Reset(This) ) +#define ICorDebugChainEnum_Reset(This) \ + ( (This)->lpVtbl -> Reset(This) ) -#define ICorDebugChainEnum_Clone(This,ppEnum) \ - ( (This)->lpVtbl -> Clone(This,ppEnum) ) +#define ICorDebugChainEnum_Clone(This,ppEnum) \ + ( (This)->lpVtbl -> Clone(This,ppEnum) ) -#define ICorDebugChainEnum_GetCount(This,pcelt) \ - ( (This)->lpVtbl -> GetCount(This,pcelt) ) +#define ICorDebugChainEnum_GetCount(This,pcelt) \ + ( (This)->lpVtbl -> GetCount(This,pcelt) ) -#define ICorDebugChainEnum_Next(This,celt,chains,pceltFetched) \ - ( (This)->lpVtbl -> Next(This,celt,chains,pceltFetched) ) +#define ICorDebugChainEnum_Next(This,celt,chains,pceltFetched) \ + ( (This)->lpVtbl -> Next(This,celt,chains,pceltFetched) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugChainEnum_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugChainEnum_INTERFACE_DEFINED__ */ #ifndef __ICorDebugModuleEnum_INTERFACE_DEFINED__ #define __ICorDebugModuleEnum_INTERFACE_DEFINED__ /* interface ICorDebugModuleEnum */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugModuleEnum; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("CC7BCB09-8A68-11d2-983C-0000F808342D") ICorDebugModuleEnum : public ICorDebugEnum { public: - virtual HRESULT STDMETHODCALLTYPE Next( + virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ ULONG celt, /* [length_is][size_is][out] */ ICorDebugModule *modules[ ], /* [out] */ ULONG *pceltFetched) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugModuleEnumVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugModuleEnum * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugModuleEnum * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugModuleEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Skip )( + + HRESULT ( STDMETHODCALLTYPE *Skip )( ICorDebugModuleEnum * This, /* [in] */ ULONG celt); - - HRESULT ( STDMETHODCALLTYPE *Reset )( + + HRESULT ( STDMETHODCALLTYPE *Reset )( ICorDebugModuleEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Clone )( + + HRESULT ( STDMETHODCALLTYPE *Clone )( ICorDebugModuleEnum * This, /* [out] */ ICorDebugEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetCount )( + + HRESULT ( STDMETHODCALLTYPE *GetCount )( ICorDebugModuleEnum * This, /* [out] */ ULONG *pcelt); - - HRESULT ( STDMETHODCALLTYPE *Next )( + + HRESULT ( STDMETHODCALLTYPE *Next )( ICorDebugModuleEnum * This, /* [in] */ ULONG celt, /* [length_is][size_is][out] */ ICorDebugModule *modules[ ], /* [out] */ ULONG *pceltFetched); - + END_INTERFACE } ICorDebugModuleEnumVtbl; @@ -16676,110 +16677,110 @@ EXTERN_C const IID IID_ICorDebugModuleEnum; CONST_VTBL struct ICorDebugModuleEnumVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugModuleEnum_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugModuleEnum_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugModuleEnum_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugModuleEnum_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugModuleEnum_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugModuleEnum_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugModuleEnum_Skip(This,celt) \ - ( (This)->lpVtbl -> Skip(This,celt) ) +#define ICorDebugModuleEnum_Skip(This,celt) \ + ( (This)->lpVtbl -> Skip(This,celt) ) -#define ICorDebugModuleEnum_Reset(This) \ - ( (This)->lpVtbl -> Reset(This) ) +#define ICorDebugModuleEnum_Reset(This) \ + ( (This)->lpVtbl -> Reset(This) ) -#define ICorDebugModuleEnum_Clone(This,ppEnum) \ - ( (This)->lpVtbl -> Clone(This,ppEnum) ) +#define ICorDebugModuleEnum_Clone(This,ppEnum) \ + ( (This)->lpVtbl -> Clone(This,ppEnum) ) -#define ICorDebugModuleEnum_GetCount(This,pcelt) \ - ( (This)->lpVtbl -> GetCount(This,pcelt) ) +#define ICorDebugModuleEnum_GetCount(This,pcelt) \ + ( (This)->lpVtbl -> GetCount(This,pcelt) ) -#define ICorDebugModuleEnum_Next(This,celt,modules,pceltFetched) \ - ( (This)->lpVtbl -> Next(This,celt,modules,pceltFetched) ) +#define ICorDebugModuleEnum_Next(This,celt,modules,pceltFetched) \ + ( (This)->lpVtbl -> Next(This,celt,modules,pceltFetched) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugModuleEnum_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugModuleEnum_INTERFACE_DEFINED__ */ #ifndef __ICorDebugValueEnum_INTERFACE_DEFINED__ #define __ICorDebugValueEnum_INTERFACE_DEFINED__ /* interface ICorDebugValueEnum */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugValueEnum; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("CC7BCB0A-8A68-11d2-983C-0000F808342D") ICorDebugValueEnum : public ICorDebugEnum { public: - virtual HRESULT STDMETHODCALLTYPE Next( + virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ ULONG celt, /* [length_is][size_is][out] */ ICorDebugValue *values[ ], /* [out] */ ULONG *pceltFetched) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugValueEnumVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugValueEnum * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugValueEnum * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugValueEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Skip )( + + HRESULT ( STDMETHODCALLTYPE *Skip )( ICorDebugValueEnum * This, /* [in] */ ULONG celt); - - HRESULT ( STDMETHODCALLTYPE *Reset )( + + HRESULT ( STDMETHODCALLTYPE *Reset )( ICorDebugValueEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Clone )( + + HRESULT ( STDMETHODCALLTYPE *Clone )( ICorDebugValueEnum * This, /* [out] */ ICorDebugEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetCount )( + + HRESULT ( STDMETHODCALLTYPE *GetCount )( ICorDebugValueEnum * This, /* [out] */ ULONG *pcelt); - - HRESULT ( STDMETHODCALLTYPE *Next )( + + HRESULT ( STDMETHODCALLTYPE *Next )( ICorDebugValueEnum * This, /* [in] */ ULONG celt, /* [length_is][size_is][out] */ ICorDebugValue *values[ ], /* [out] */ ULONG *pceltFetched); - + END_INTERFACE } ICorDebugValueEnumVtbl; @@ -16788,110 +16789,110 @@ EXTERN_C const IID IID_ICorDebugValueEnum; CONST_VTBL struct ICorDebugValueEnumVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugValueEnum_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugValueEnum_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugValueEnum_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugValueEnum_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugValueEnum_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugValueEnum_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugValueEnum_Skip(This,celt) \ - ( (This)->lpVtbl -> Skip(This,celt) ) +#define ICorDebugValueEnum_Skip(This,celt) \ + ( (This)->lpVtbl -> Skip(This,celt) ) -#define ICorDebugValueEnum_Reset(This) \ - ( (This)->lpVtbl -> Reset(This) ) +#define ICorDebugValueEnum_Reset(This) \ + ( (This)->lpVtbl -> Reset(This) ) -#define ICorDebugValueEnum_Clone(This,ppEnum) \ - ( (This)->lpVtbl -> Clone(This,ppEnum) ) +#define ICorDebugValueEnum_Clone(This,ppEnum) \ + ( (This)->lpVtbl -> Clone(This,ppEnum) ) -#define ICorDebugValueEnum_GetCount(This,pcelt) \ - ( (This)->lpVtbl -> GetCount(This,pcelt) ) +#define ICorDebugValueEnum_GetCount(This,pcelt) \ + ( (This)->lpVtbl -> GetCount(This,pcelt) ) -#define ICorDebugValueEnum_Next(This,celt,values,pceltFetched) \ - ( (This)->lpVtbl -> Next(This,celt,values,pceltFetched) ) +#define ICorDebugValueEnum_Next(This,celt,values,pceltFetched) \ + ( (This)->lpVtbl -> Next(This,celt,values,pceltFetched) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugValueEnum_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugValueEnum_INTERFACE_DEFINED__ */ #ifndef __ICorDebugVariableHomeEnum_INTERFACE_DEFINED__ #define __ICorDebugVariableHomeEnum_INTERFACE_DEFINED__ /* interface ICorDebugVariableHomeEnum */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugVariableHomeEnum; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("e76b7a57-4f7a-4309-85a7-5d918c3deaf7") ICorDebugVariableHomeEnum : public ICorDebugEnum { public: - virtual HRESULT STDMETHODCALLTYPE Next( + virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ ULONG celt, /* [length_is][size_is][out] */ ICorDebugVariableHome *homes[ ], /* [out] */ ULONG *pceltFetched) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugVariableHomeEnumVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugVariableHomeEnum * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugVariableHomeEnum * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugVariableHomeEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Skip )( + + HRESULT ( STDMETHODCALLTYPE *Skip )( ICorDebugVariableHomeEnum * This, /* [in] */ ULONG celt); - - HRESULT ( STDMETHODCALLTYPE *Reset )( + + HRESULT ( STDMETHODCALLTYPE *Reset )( ICorDebugVariableHomeEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Clone )( + + HRESULT ( STDMETHODCALLTYPE *Clone )( ICorDebugVariableHomeEnum * This, /* [out] */ ICorDebugEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetCount )( + + HRESULT ( STDMETHODCALLTYPE *GetCount )( ICorDebugVariableHomeEnum * This, /* [out] */ ULONG *pcelt); - - HRESULT ( STDMETHODCALLTYPE *Next )( + + HRESULT ( STDMETHODCALLTYPE *Next )( ICorDebugVariableHomeEnum * This, /* [in] */ ULONG celt, /* [length_is][size_is][out] */ ICorDebugVariableHome *homes[ ], /* [out] */ ULONG *pceltFetched); - + END_INTERFACE } ICorDebugVariableHomeEnumVtbl; @@ -16900,110 +16901,110 @@ EXTERN_C const IID IID_ICorDebugVariableHomeEnum; CONST_VTBL struct ICorDebugVariableHomeEnumVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugVariableHomeEnum_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugVariableHomeEnum_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugVariableHomeEnum_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugVariableHomeEnum_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugVariableHomeEnum_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugVariableHomeEnum_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugVariableHomeEnum_Skip(This,celt) \ - ( (This)->lpVtbl -> Skip(This,celt) ) +#define ICorDebugVariableHomeEnum_Skip(This,celt) \ + ( (This)->lpVtbl -> Skip(This,celt) ) -#define ICorDebugVariableHomeEnum_Reset(This) \ - ( (This)->lpVtbl -> Reset(This) ) +#define ICorDebugVariableHomeEnum_Reset(This) \ + ( (This)->lpVtbl -> Reset(This) ) -#define ICorDebugVariableHomeEnum_Clone(This,ppEnum) \ - ( (This)->lpVtbl -> Clone(This,ppEnum) ) +#define ICorDebugVariableHomeEnum_Clone(This,ppEnum) \ + ( (This)->lpVtbl -> Clone(This,ppEnum) ) -#define ICorDebugVariableHomeEnum_GetCount(This,pcelt) \ - ( (This)->lpVtbl -> GetCount(This,pcelt) ) +#define ICorDebugVariableHomeEnum_GetCount(This,pcelt) \ + ( (This)->lpVtbl -> GetCount(This,pcelt) ) -#define ICorDebugVariableHomeEnum_Next(This,celt,homes,pceltFetched) \ - ( (This)->lpVtbl -> Next(This,celt,homes,pceltFetched) ) +#define ICorDebugVariableHomeEnum_Next(This,celt,homes,pceltFetched) \ + ( (This)->lpVtbl -> Next(This,celt,homes,pceltFetched) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugVariableHomeEnum_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugVariableHomeEnum_INTERFACE_DEFINED__ */ #ifndef __ICorDebugCodeEnum_INTERFACE_DEFINED__ #define __ICorDebugCodeEnum_INTERFACE_DEFINED__ /* interface ICorDebugCodeEnum */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugCodeEnum; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("55E96461-9645-45e4-A2FF-0367877ABCDE") ICorDebugCodeEnum : public ICorDebugEnum { public: - virtual HRESULT STDMETHODCALLTYPE Next( + virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ ULONG celt, /* [length_is][size_is][out] */ ICorDebugCode *values[ ], /* [out] */ ULONG *pceltFetched) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugCodeEnumVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugCodeEnum * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugCodeEnum * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugCodeEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Skip )( + + HRESULT ( STDMETHODCALLTYPE *Skip )( ICorDebugCodeEnum * This, /* [in] */ ULONG celt); - - HRESULT ( STDMETHODCALLTYPE *Reset )( + + HRESULT ( STDMETHODCALLTYPE *Reset )( ICorDebugCodeEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Clone )( + + HRESULT ( STDMETHODCALLTYPE *Clone )( ICorDebugCodeEnum * This, /* [out] */ ICorDebugEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetCount )( + + HRESULT ( STDMETHODCALLTYPE *GetCount )( ICorDebugCodeEnum * This, /* [out] */ ULONG *pcelt); - - HRESULT ( STDMETHODCALLTYPE *Next )( + + HRESULT ( STDMETHODCALLTYPE *Next )( ICorDebugCodeEnum * This, /* [in] */ ULONG celt, /* [length_is][size_is][out] */ ICorDebugCode *values[ ], /* [out] */ ULONG *pceltFetched); - + END_INTERFACE } ICorDebugCodeEnumVtbl; @@ -17012,110 +17013,110 @@ EXTERN_C const IID IID_ICorDebugCodeEnum; CONST_VTBL struct ICorDebugCodeEnumVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugCodeEnum_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugCodeEnum_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugCodeEnum_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugCodeEnum_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugCodeEnum_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugCodeEnum_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugCodeEnum_Skip(This,celt) \ - ( (This)->lpVtbl -> Skip(This,celt) ) +#define ICorDebugCodeEnum_Skip(This,celt) \ + ( (This)->lpVtbl -> Skip(This,celt) ) -#define ICorDebugCodeEnum_Reset(This) \ - ( (This)->lpVtbl -> Reset(This) ) +#define ICorDebugCodeEnum_Reset(This) \ + ( (This)->lpVtbl -> Reset(This) ) -#define ICorDebugCodeEnum_Clone(This,ppEnum) \ - ( (This)->lpVtbl -> Clone(This,ppEnum) ) +#define ICorDebugCodeEnum_Clone(This,ppEnum) \ + ( (This)->lpVtbl -> Clone(This,ppEnum) ) -#define ICorDebugCodeEnum_GetCount(This,pcelt) \ - ( (This)->lpVtbl -> GetCount(This,pcelt) ) +#define ICorDebugCodeEnum_GetCount(This,pcelt) \ + ( (This)->lpVtbl -> GetCount(This,pcelt) ) -#define ICorDebugCodeEnum_Next(This,celt,values,pceltFetched) \ - ( (This)->lpVtbl -> Next(This,celt,values,pceltFetched) ) +#define ICorDebugCodeEnum_Next(This,celt,values,pceltFetched) \ + ( (This)->lpVtbl -> Next(This,celt,values,pceltFetched) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugCodeEnum_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugCodeEnum_INTERFACE_DEFINED__ */ #ifndef __ICorDebugTypeEnum_INTERFACE_DEFINED__ #define __ICorDebugTypeEnum_INTERFACE_DEFINED__ /* interface ICorDebugTypeEnum */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugTypeEnum; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("10F27499-9DF2-43ce-8333-A321D7C99CB4") ICorDebugTypeEnum : public ICorDebugEnum { public: - virtual HRESULT STDMETHODCALLTYPE Next( + virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ ULONG celt, /* [length_is][size_is][out] */ ICorDebugType *values[ ], /* [out] */ ULONG *pceltFetched) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugTypeEnumVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugTypeEnum * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugTypeEnum * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugTypeEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Skip )( + + HRESULT ( STDMETHODCALLTYPE *Skip )( ICorDebugTypeEnum * This, /* [in] */ ULONG celt); - - HRESULT ( STDMETHODCALLTYPE *Reset )( + + HRESULT ( STDMETHODCALLTYPE *Reset )( ICorDebugTypeEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Clone )( + + HRESULT ( STDMETHODCALLTYPE *Clone )( ICorDebugTypeEnum * This, /* [out] */ ICorDebugEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetCount )( + + HRESULT ( STDMETHODCALLTYPE *GetCount )( ICorDebugTypeEnum * This, /* [out] */ ULONG *pcelt); - - HRESULT ( STDMETHODCALLTYPE *Next )( + + HRESULT ( STDMETHODCALLTYPE *Next )( ICorDebugTypeEnum * This, /* [in] */ ULONG celt, /* [length_is][size_is][out] */ ICorDebugType *values[ ], /* [out] */ ULONG *pceltFetched); - + END_INTERFACE } ICorDebugTypeEnumVtbl; @@ -17124,137 +17125,137 @@ EXTERN_C const IID IID_ICorDebugTypeEnum; CONST_VTBL struct ICorDebugTypeEnumVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugTypeEnum_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugTypeEnum_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugTypeEnum_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugTypeEnum_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugTypeEnum_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugTypeEnum_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugTypeEnum_Skip(This,celt) \ - ( (This)->lpVtbl -> Skip(This,celt) ) +#define ICorDebugTypeEnum_Skip(This,celt) \ + ( (This)->lpVtbl -> Skip(This,celt) ) -#define ICorDebugTypeEnum_Reset(This) \ - ( (This)->lpVtbl -> Reset(This) ) +#define ICorDebugTypeEnum_Reset(This) \ + ( (This)->lpVtbl -> Reset(This) ) -#define ICorDebugTypeEnum_Clone(This,ppEnum) \ - ( (This)->lpVtbl -> Clone(This,ppEnum) ) +#define ICorDebugTypeEnum_Clone(This,ppEnum) \ + ( (This)->lpVtbl -> Clone(This,ppEnum) ) -#define ICorDebugTypeEnum_GetCount(This,pcelt) \ - ( (This)->lpVtbl -> GetCount(This,pcelt) ) +#define ICorDebugTypeEnum_GetCount(This,pcelt) \ + ( (This)->lpVtbl -> GetCount(This,pcelt) ) -#define ICorDebugTypeEnum_Next(This,celt,values,pceltFetched) \ - ( (This)->lpVtbl -> Next(This,celt,values,pceltFetched) ) +#define ICorDebugTypeEnum_Next(This,celt,values,pceltFetched) \ + ( (This)->lpVtbl -> Next(This,celt,values,pceltFetched) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugTypeEnum_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugTypeEnum_INTERFACE_DEFINED__ */ #ifndef __ICorDebugType_INTERFACE_DEFINED__ #define __ICorDebugType_INTERFACE_DEFINED__ /* interface ICorDebugType */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugType; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("D613F0BB-ACE1-4c19-BD72-E4C08D5DA7F5") ICorDebugType : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetType( + virtual HRESULT STDMETHODCALLTYPE GetType( /* [out] */ CorElementType *ty) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetClass( + + virtual HRESULT STDMETHODCALLTYPE GetClass( /* [out] */ ICorDebugClass **ppClass) = 0; - - virtual HRESULT STDMETHODCALLTYPE EnumerateTypeParameters( + + virtual HRESULT STDMETHODCALLTYPE EnumerateTypeParameters( /* [out] */ ICorDebugTypeEnum **ppTyParEnum) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetFirstTypeParameter( + + virtual HRESULT STDMETHODCALLTYPE GetFirstTypeParameter( /* [out] */ ICorDebugType **value) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetBase( + + virtual HRESULT STDMETHODCALLTYPE GetBase( /* [out] */ ICorDebugType **pBase) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetStaticFieldValue( + + virtual HRESULT STDMETHODCALLTYPE GetStaticFieldValue( /* [in] */ mdFieldDef fieldDef, /* [in] */ ICorDebugFrame *pFrame, /* [out] */ ICorDebugValue **ppValue) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetRank( + + virtual HRESULT STDMETHODCALLTYPE GetRank( /* [out] */ ULONG32 *pnRank) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugTypeVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugType * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugType * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugType * This); - - HRESULT ( STDMETHODCALLTYPE *GetType )( + + HRESULT ( STDMETHODCALLTYPE *GetType )( ICorDebugType * This, /* [out] */ CorElementType *ty); - - HRESULT ( STDMETHODCALLTYPE *GetClass )( + + HRESULT ( STDMETHODCALLTYPE *GetClass )( ICorDebugType * This, /* [out] */ ICorDebugClass **ppClass); - - HRESULT ( STDMETHODCALLTYPE *EnumerateTypeParameters )( + + HRESULT ( STDMETHODCALLTYPE *EnumerateTypeParameters )( ICorDebugType * This, /* [out] */ ICorDebugTypeEnum **ppTyParEnum); - - HRESULT ( STDMETHODCALLTYPE *GetFirstTypeParameter )( + + HRESULT ( STDMETHODCALLTYPE *GetFirstTypeParameter )( ICorDebugType * This, /* [out] */ ICorDebugType **value); - - HRESULT ( STDMETHODCALLTYPE *GetBase )( + + HRESULT ( STDMETHODCALLTYPE *GetBase )( ICorDebugType * This, /* [out] */ ICorDebugType **pBase); - - HRESULT ( STDMETHODCALLTYPE *GetStaticFieldValue )( + + HRESULT ( STDMETHODCALLTYPE *GetStaticFieldValue )( ICorDebugType * This, /* [in] */ mdFieldDef fieldDef, /* [in] */ ICorDebugFrame *pFrame, /* [out] */ ICorDebugValue **ppValue); - - HRESULT ( STDMETHODCALLTYPE *GetRank )( + + HRESULT ( STDMETHODCALLTYPE *GetRank )( ICorDebugType * This, /* [out] */ ULONG32 *pnRank); - + END_INTERFACE } ICorDebugTypeVtbl; @@ -17263,96 +17264,96 @@ EXTERN_C const IID IID_ICorDebugType; CONST_VTBL struct ICorDebugTypeVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugType_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugType_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugType_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugType_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugType_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugType_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugType_GetType(This,ty) \ - ( (This)->lpVtbl -> GetType(This,ty) ) +#define ICorDebugType_GetType(This,ty) \ + ( (This)->lpVtbl -> GetType(This,ty) ) -#define ICorDebugType_GetClass(This,ppClass) \ - ( (This)->lpVtbl -> GetClass(This,ppClass) ) +#define ICorDebugType_GetClass(This,ppClass) \ + ( (This)->lpVtbl -> GetClass(This,ppClass) ) -#define ICorDebugType_EnumerateTypeParameters(This,ppTyParEnum) \ - ( (This)->lpVtbl -> EnumerateTypeParameters(This,ppTyParEnum) ) +#define ICorDebugType_EnumerateTypeParameters(This,ppTyParEnum) \ + ( (This)->lpVtbl -> EnumerateTypeParameters(This,ppTyParEnum) ) -#define ICorDebugType_GetFirstTypeParameter(This,value) \ - ( (This)->lpVtbl -> GetFirstTypeParameter(This,value) ) +#define ICorDebugType_GetFirstTypeParameter(This,value) \ + ( (This)->lpVtbl -> GetFirstTypeParameter(This,value) ) -#define ICorDebugType_GetBase(This,pBase) \ - ( (This)->lpVtbl -> GetBase(This,pBase) ) +#define ICorDebugType_GetBase(This,pBase) \ + ( (This)->lpVtbl -> GetBase(This,pBase) ) -#define ICorDebugType_GetStaticFieldValue(This,fieldDef,pFrame,ppValue) \ - ( (This)->lpVtbl -> GetStaticFieldValue(This,fieldDef,pFrame,ppValue) ) +#define ICorDebugType_GetStaticFieldValue(This,fieldDef,pFrame,ppValue) \ + ( (This)->lpVtbl -> GetStaticFieldValue(This,fieldDef,pFrame,ppValue) ) -#define ICorDebugType_GetRank(This,pnRank) \ - ( (This)->lpVtbl -> GetRank(This,pnRank) ) +#define ICorDebugType_GetRank(This,pnRank) \ + ( (This)->lpVtbl -> GetRank(This,pnRank) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugType_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugType_INTERFACE_DEFINED__ */ #ifndef __ICorDebugType2_INTERFACE_DEFINED__ #define __ICorDebugType2_INTERFACE_DEFINED__ /* interface ICorDebugType2 */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugType2; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("e6e91d79-693d-48bc-b417-8284b4f10fb5") ICorDebugType2 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetTypeID( + virtual HRESULT STDMETHODCALLTYPE GetTypeID( /* [out] */ COR_TYPEID *id) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugType2Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugType2 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugType2 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugType2 * This); - - HRESULT ( STDMETHODCALLTYPE *GetTypeID )( + + HRESULT ( STDMETHODCALLTYPE *GetTypeID )( ICorDebugType2 * This, /* [out] */ COR_TYPEID *id); - + END_INTERFACE } ICorDebugType2Vtbl; @@ -17361,97 +17362,97 @@ EXTERN_C const IID IID_ICorDebugType2; CONST_VTBL struct ICorDebugType2Vtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugType2_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugType2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugType2_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugType2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugType2_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugType2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugType2_GetTypeID(This,id) \ - ( (This)->lpVtbl -> GetTypeID(This,id) ) +#define ICorDebugType2_GetTypeID(This,id) \ + ( (This)->lpVtbl -> GetTypeID(This,id) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugType2_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugType2_INTERFACE_DEFINED__ */ #ifndef __ICorDebugErrorInfoEnum_INTERFACE_DEFINED__ #define __ICorDebugErrorInfoEnum_INTERFACE_DEFINED__ /* interface ICorDebugErrorInfoEnum */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugErrorInfoEnum; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("F0E18809-72B5-11d2-976F-00A0C9B4D50C") ICorDebugErrorInfoEnum : public ICorDebugEnum { public: - virtual HRESULT STDMETHODCALLTYPE Next( + virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ ULONG celt, /* [length_is][size_is][out] */ ICorDebugEditAndContinueErrorInfo *errors[ ], /* [out] */ ULONG *pceltFetched) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugErrorInfoEnumVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugErrorInfoEnum * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugErrorInfoEnum * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugErrorInfoEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Skip )( + + HRESULT ( STDMETHODCALLTYPE *Skip )( ICorDebugErrorInfoEnum * This, /* [in] */ ULONG celt); - - HRESULT ( STDMETHODCALLTYPE *Reset )( + + HRESULT ( STDMETHODCALLTYPE *Reset )( ICorDebugErrorInfoEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Clone )( + + HRESULT ( STDMETHODCALLTYPE *Clone )( ICorDebugErrorInfoEnum * This, /* [out] */ ICorDebugEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetCount )( + + HRESULT ( STDMETHODCALLTYPE *GetCount )( ICorDebugErrorInfoEnum * This, /* [out] */ ULONG *pcelt); - - HRESULT ( STDMETHODCALLTYPE *Next )( + + HRESULT ( STDMETHODCALLTYPE *Next )( ICorDebugErrorInfoEnum * This, /* [in] */ ULONG celt, /* [length_is][size_is][out] */ ICorDebugEditAndContinueErrorInfo *errors[ ], /* [out] */ ULONG *pceltFetched); - + END_INTERFACE } ICorDebugErrorInfoEnumVtbl; @@ -17460,110 +17461,110 @@ EXTERN_C const IID IID_ICorDebugErrorInfoEnum; CONST_VTBL struct ICorDebugErrorInfoEnumVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugErrorInfoEnum_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugErrorInfoEnum_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugErrorInfoEnum_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugErrorInfoEnum_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugErrorInfoEnum_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugErrorInfoEnum_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugErrorInfoEnum_Skip(This,celt) \ - ( (This)->lpVtbl -> Skip(This,celt) ) +#define ICorDebugErrorInfoEnum_Skip(This,celt) \ + ( (This)->lpVtbl -> Skip(This,celt) ) -#define ICorDebugErrorInfoEnum_Reset(This) \ - ( (This)->lpVtbl -> Reset(This) ) +#define ICorDebugErrorInfoEnum_Reset(This) \ + ( (This)->lpVtbl -> Reset(This) ) -#define ICorDebugErrorInfoEnum_Clone(This,ppEnum) \ - ( (This)->lpVtbl -> Clone(This,ppEnum) ) +#define ICorDebugErrorInfoEnum_Clone(This,ppEnum) \ + ( (This)->lpVtbl -> Clone(This,ppEnum) ) -#define ICorDebugErrorInfoEnum_GetCount(This,pcelt) \ - ( (This)->lpVtbl -> GetCount(This,pcelt) ) +#define ICorDebugErrorInfoEnum_GetCount(This,pcelt) \ + ( (This)->lpVtbl -> GetCount(This,pcelt) ) -#define ICorDebugErrorInfoEnum_Next(This,celt,errors,pceltFetched) \ - ( (This)->lpVtbl -> Next(This,celt,errors,pceltFetched) ) +#define ICorDebugErrorInfoEnum_Next(This,celt,errors,pceltFetched) \ + ( (This)->lpVtbl -> Next(This,celt,errors,pceltFetched) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugErrorInfoEnum_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugErrorInfoEnum_INTERFACE_DEFINED__ */ #ifndef __ICorDebugAppDomainEnum_INTERFACE_DEFINED__ #define __ICorDebugAppDomainEnum_INTERFACE_DEFINED__ /* interface ICorDebugAppDomainEnum */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugAppDomainEnum; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("63ca1b24-4359-4883-bd57-13f815f58744") ICorDebugAppDomainEnum : public ICorDebugEnum { public: - virtual HRESULT STDMETHODCALLTYPE Next( + virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ ULONG celt, /* [length_is][size_is][out] */ ICorDebugAppDomain *values[ ], /* [out] */ ULONG *pceltFetched) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugAppDomainEnumVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugAppDomainEnum * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugAppDomainEnum * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugAppDomainEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Skip )( + + HRESULT ( STDMETHODCALLTYPE *Skip )( ICorDebugAppDomainEnum * This, /* [in] */ ULONG celt); - - HRESULT ( STDMETHODCALLTYPE *Reset )( + + HRESULT ( STDMETHODCALLTYPE *Reset )( ICorDebugAppDomainEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Clone )( + + HRESULT ( STDMETHODCALLTYPE *Clone )( ICorDebugAppDomainEnum * This, /* [out] */ ICorDebugEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetCount )( + + HRESULT ( STDMETHODCALLTYPE *GetCount )( ICorDebugAppDomainEnum * This, /* [out] */ ULONG *pcelt); - - HRESULT ( STDMETHODCALLTYPE *Next )( + + HRESULT ( STDMETHODCALLTYPE *Next )( ICorDebugAppDomainEnum * This, /* [in] */ ULONG celt, /* [length_is][size_is][out] */ ICorDebugAppDomain *values[ ], /* [out] */ ULONG *pceltFetched); - + END_INTERFACE } ICorDebugAppDomainEnumVtbl; @@ -17572,110 +17573,110 @@ EXTERN_C const IID IID_ICorDebugAppDomainEnum; CONST_VTBL struct ICorDebugAppDomainEnumVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugAppDomainEnum_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugAppDomainEnum_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugAppDomainEnum_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugAppDomainEnum_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugAppDomainEnum_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugAppDomainEnum_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugAppDomainEnum_Skip(This,celt) \ - ( (This)->lpVtbl -> Skip(This,celt) ) +#define ICorDebugAppDomainEnum_Skip(This,celt) \ + ( (This)->lpVtbl -> Skip(This,celt) ) -#define ICorDebugAppDomainEnum_Reset(This) \ - ( (This)->lpVtbl -> Reset(This) ) +#define ICorDebugAppDomainEnum_Reset(This) \ + ( (This)->lpVtbl -> Reset(This) ) -#define ICorDebugAppDomainEnum_Clone(This,ppEnum) \ - ( (This)->lpVtbl -> Clone(This,ppEnum) ) +#define ICorDebugAppDomainEnum_Clone(This,ppEnum) \ + ( (This)->lpVtbl -> Clone(This,ppEnum) ) -#define ICorDebugAppDomainEnum_GetCount(This,pcelt) \ - ( (This)->lpVtbl -> GetCount(This,pcelt) ) +#define ICorDebugAppDomainEnum_GetCount(This,pcelt) \ + ( (This)->lpVtbl -> GetCount(This,pcelt) ) -#define ICorDebugAppDomainEnum_Next(This,celt,values,pceltFetched) \ - ( (This)->lpVtbl -> Next(This,celt,values,pceltFetched) ) +#define ICorDebugAppDomainEnum_Next(This,celt,values,pceltFetched) \ + ( (This)->lpVtbl -> Next(This,celt,values,pceltFetched) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugAppDomainEnum_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugAppDomainEnum_INTERFACE_DEFINED__ */ #ifndef __ICorDebugAssemblyEnum_INTERFACE_DEFINED__ #define __ICorDebugAssemblyEnum_INTERFACE_DEFINED__ /* interface ICorDebugAssemblyEnum */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugAssemblyEnum; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("4a2a1ec9-85ec-4bfb-9f15-a89fdfe0fe83") ICorDebugAssemblyEnum : public ICorDebugEnum { public: - virtual HRESULT STDMETHODCALLTYPE Next( + virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ ULONG celt, /* [length_is][size_is][out] */ ICorDebugAssembly *values[ ], /* [out] */ ULONG *pceltFetched) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugAssemblyEnumVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugAssemblyEnum * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugAssemblyEnum * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugAssemblyEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Skip )( + + HRESULT ( STDMETHODCALLTYPE *Skip )( ICorDebugAssemblyEnum * This, /* [in] */ ULONG celt); - - HRESULT ( STDMETHODCALLTYPE *Reset )( + + HRESULT ( STDMETHODCALLTYPE *Reset )( ICorDebugAssemblyEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Clone )( + + HRESULT ( STDMETHODCALLTYPE *Clone )( ICorDebugAssemblyEnum * This, /* [out] */ ICorDebugEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetCount )( + + HRESULT ( STDMETHODCALLTYPE *GetCount )( ICorDebugAssemblyEnum * This, /* [out] */ ULONG *pcelt); - - HRESULT ( STDMETHODCALLTYPE *Next )( + + HRESULT ( STDMETHODCALLTYPE *Next )( ICorDebugAssemblyEnum * This, /* [in] */ ULONG celt, /* [length_is][size_is][out] */ ICorDebugAssembly *values[ ], /* [out] */ ULONG *pceltFetched); - + END_INTERFACE } ICorDebugAssemblyEnumVtbl; @@ -17684,110 +17685,110 @@ EXTERN_C const IID IID_ICorDebugAssemblyEnum; CONST_VTBL struct ICorDebugAssemblyEnumVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugAssemblyEnum_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugAssemblyEnum_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugAssemblyEnum_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugAssemblyEnum_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugAssemblyEnum_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugAssemblyEnum_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugAssemblyEnum_Skip(This,celt) \ - ( (This)->lpVtbl -> Skip(This,celt) ) +#define ICorDebugAssemblyEnum_Skip(This,celt) \ + ( (This)->lpVtbl -> Skip(This,celt) ) -#define ICorDebugAssemblyEnum_Reset(This) \ - ( (This)->lpVtbl -> Reset(This) ) +#define ICorDebugAssemblyEnum_Reset(This) \ + ( (This)->lpVtbl -> Reset(This) ) -#define ICorDebugAssemblyEnum_Clone(This,ppEnum) \ - ( (This)->lpVtbl -> Clone(This,ppEnum) ) +#define ICorDebugAssemblyEnum_Clone(This,ppEnum) \ + ( (This)->lpVtbl -> Clone(This,ppEnum) ) -#define ICorDebugAssemblyEnum_GetCount(This,pcelt) \ - ( (This)->lpVtbl -> GetCount(This,pcelt) ) +#define ICorDebugAssemblyEnum_GetCount(This,pcelt) \ + ( (This)->lpVtbl -> GetCount(This,pcelt) ) -#define ICorDebugAssemblyEnum_Next(This,celt,values,pceltFetched) \ - ( (This)->lpVtbl -> Next(This,celt,values,pceltFetched) ) +#define ICorDebugAssemblyEnum_Next(This,celt,values,pceltFetched) \ + ( (This)->lpVtbl -> Next(This,celt,values,pceltFetched) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugAssemblyEnum_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugAssemblyEnum_INTERFACE_DEFINED__ */ #ifndef __ICorDebugBlockingObjectEnum_INTERFACE_DEFINED__ #define __ICorDebugBlockingObjectEnum_INTERFACE_DEFINED__ /* interface ICorDebugBlockingObjectEnum */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugBlockingObjectEnum; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("976A6278-134A-4a81-81A3-8F277943F4C3") ICorDebugBlockingObjectEnum : public ICorDebugEnum { public: - virtual HRESULT STDMETHODCALLTYPE Next( + virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ ULONG celt, /* [length_is][size_is][out] */ CorDebugBlockingObject values[ ], /* [out] */ ULONG *pceltFetched) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugBlockingObjectEnumVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugBlockingObjectEnum * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugBlockingObjectEnum * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugBlockingObjectEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Skip )( + + HRESULT ( STDMETHODCALLTYPE *Skip )( ICorDebugBlockingObjectEnum * This, /* [in] */ ULONG celt); - - HRESULT ( STDMETHODCALLTYPE *Reset )( + + HRESULT ( STDMETHODCALLTYPE *Reset )( ICorDebugBlockingObjectEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Clone )( + + HRESULT ( STDMETHODCALLTYPE *Clone )( ICorDebugBlockingObjectEnum * This, /* [out] */ ICorDebugEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetCount )( + + HRESULT ( STDMETHODCALLTYPE *GetCount )( ICorDebugBlockingObjectEnum * This, /* [out] */ ULONG *pcelt); - - HRESULT ( STDMETHODCALLTYPE *Next )( + + HRESULT ( STDMETHODCALLTYPE *Next )( ICorDebugBlockingObjectEnum * This, /* [in] */ ULONG celt, /* [length_is][size_is][out] */ CorDebugBlockingObject values[ ], /* [out] */ ULONG *pceltFetched); - + END_INTERFACE } ICorDebugBlockingObjectEnumVtbl; @@ -17796,50 +17797,50 @@ EXTERN_C const IID IID_ICorDebugBlockingObjectEnum; CONST_VTBL struct ICorDebugBlockingObjectEnumVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugBlockingObjectEnum_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugBlockingObjectEnum_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugBlockingObjectEnum_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugBlockingObjectEnum_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugBlockingObjectEnum_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugBlockingObjectEnum_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugBlockingObjectEnum_Skip(This,celt) \ - ( (This)->lpVtbl -> Skip(This,celt) ) +#define ICorDebugBlockingObjectEnum_Skip(This,celt) \ + ( (This)->lpVtbl -> Skip(This,celt) ) -#define ICorDebugBlockingObjectEnum_Reset(This) \ - ( (This)->lpVtbl -> Reset(This) ) +#define ICorDebugBlockingObjectEnum_Reset(This) \ + ( (This)->lpVtbl -> Reset(This) ) -#define ICorDebugBlockingObjectEnum_Clone(This,ppEnum) \ - ( (This)->lpVtbl -> Clone(This,ppEnum) ) +#define ICorDebugBlockingObjectEnum_Clone(This,ppEnum) \ + ( (This)->lpVtbl -> Clone(This,ppEnum) ) -#define ICorDebugBlockingObjectEnum_GetCount(This,pcelt) \ - ( (This)->lpVtbl -> GetCount(This,pcelt) ) +#define ICorDebugBlockingObjectEnum_GetCount(This,pcelt) \ + ( (This)->lpVtbl -> GetCount(This,pcelt) ) -#define ICorDebugBlockingObjectEnum_Next(This,celt,values,pceltFetched) \ - ( (This)->lpVtbl -> Next(This,celt,values,pceltFetched) ) +#define ICorDebugBlockingObjectEnum_Next(This,celt,values,pceltFetched) \ + ( (This)->lpVtbl -> Next(This,celt,values,pceltFetched) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugBlockingObjectEnum_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugBlockingObjectEnum_INTERFACE_DEFINED__ */ /* interface __MIDL_itf_cordebug_0000_0125 */ -/* [local] */ +/* [local] */ #pragma warning(push) #pragma warning(disable:28718) @@ -17852,91 +17853,91 @@ extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0125_v0_0_s_ifspec; #define __ICorDebugMDA_INTERFACE_DEFINED__ /* interface ICorDebugMDA */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ -typedef +typedef enum CorDebugMDAFlags { - MDA_FLAG_SLIP = 0x2 - } CorDebugMDAFlags; + MDA_FLAG_SLIP = 0x2 + } CorDebugMDAFlags; EXTERN_C const IID IID_ICorDebugMDA; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("CC726F2F-1DB7-459b-B0EC-05F01D841B42") ICorDebugMDA : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetName( + virtual HRESULT STDMETHODCALLTYPE GetName( /* [in] */ ULONG32 cchName, /* [out] */ ULONG32 *pcchName, /* [length_is][size_is][out] */ WCHAR szName[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetDescription( + + virtual HRESULT STDMETHODCALLTYPE GetDescription( /* [in] */ ULONG32 cchName, /* [out] */ ULONG32 *pcchName, /* [length_is][size_is][out] */ WCHAR szName[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetXML( + + virtual HRESULT STDMETHODCALLTYPE GetXML( /* [in] */ ULONG32 cchName, /* [out] */ ULONG32 *pcchName, /* [length_is][size_is][out] */ WCHAR szName[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetFlags( + + virtual HRESULT STDMETHODCALLTYPE GetFlags( /* [in] */ CorDebugMDAFlags *pFlags) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetOSThreadId( + + virtual HRESULT STDMETHODCALLTYPE GetOSThreadId( /* [out] */ DWORD *pOsTid) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugMDAVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugMDA * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugMDA * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugMDA * This); - - HRESULT ( STDMETHODCALLTYPE *GetName )( + + HRESULT ( STDMETHODCALLTYPE *GetName )( ICorDebugMDA * This, /* [in] */ ULONG32 cchName, /* [out] */ ULONG32 *pcchName, /* [length_is][size_is][out] */ WCHAR szName[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetDescription )( + + HRESULT ( STDMETHODCALLTYPE *GetDescription )( ICorDebugMDA * This, /* [in] */ ULONG32 cchName, /* [out] */ ULONG32 *pcchName, /* [length_is][size_is][out] */ WCHAR szName[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetXML )( + + HRESULT ( STDMETHODCALLTYPE *GetXML )( ICorDebugMDA * This, /* [in] */ ULONG32 cchName, /* [out] */ ULONG32 *pcchName, /* [length_is][size_is][out] */ WCHAR szName[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetFlags )( + + HRESULT ( STDMETHODCALLTYPE *GetFlags )( ICorDebugMDA * This, /* [in] */ CorDebugMDAFlags *pFlags); - - HRESULT ( STDMETHODCALLTYPE *GetOSThreadId )( + + HRESULT ( STDMETHODCALLTYPE *GetOSThreadId )( ICorDebugMDA * This, /* [out] */ DWORD *pOsTid); - + END_INTERFACE } ICorDebugMDAVtbl; @@ -17945,53 +17946,53 @@ EXTERN_C const IID IID_ICorDebugMDA; CONST_VTBL struct ICorDebugMDAVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugMDA_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugMDA_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugMDA_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugMDA_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugMDA_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugMDA_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugMDA_GetName(This,cchName,pcchName,szName) \ - ( (This)->lpVtbl -> GetName(This,cchName,pcchName,szName) ) +#define ICorDebugMDA_GetName(This,cchName,pcchName,szName) \ + ( (This)->lpVtbl -> GetName(This,cchName,pcchName,szName) ) -#define ICorDebugMDA_GetDescription(This,cchName,pcchName,szName) \ - ( (This)->lpVtbl -> GetDescription(This,cchName,pcchName,szName) ) +#define ICorDebugMDA_GetDescription(This,cchName,pcchName,szName) \ + ( (This)->lpVtbl -> GetDescription(This,cchName,pcchName,szName) ) -#define ICorDebugMDA_GetXML(This,cchName,pcchName,szName) \ - ( (This)->lpVtbl -> GetXML(This,cchName,pcchName,szName) ) +#define ICorDebugMDA_GetXML(This,cchName,pcchName,szName) \ + ( (This)->lpVtbl -> GetXML(This,cchName,pcchName,szName) ) -#define ICorDebugMDA_GetFlags(This,pFlags) \ - ( (This)->lpVtbl -> GetFlags(This,pFlags) ) +#define ICorDebugMDA_GetFlags(This,pFlags) \ + ( (This)->lpVtbl -> GetFlags(This,pFlags) ) -#define ICorDebugMDA_GetOSThreadId(This,pOsTid) \ - ( (This)->lpVtbl -> GetOSThreadId(This,pOsTid) ) +#define ICorDebugMDA_GetOSThreadId(This,pOsTid) \ + ( (This)->lpVtbl -> GetOSThreadId(This,pOsTid) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugMDA_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugMDA_INTERFACE_DEFINED__ */ /* interface __MIDL_itf_cordebug_0000_0126 */ -/* [local] */ +/* [local] */ #pragma warning(pop) #pragma warning(push) -#pragma warning(disable:28718) +#pragma warning(disable:28718) extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0126_v0_0_c_ifspec; @@ -18001,70 +18002,70 @@ extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0126_v0_0_s_ifspec; #define __ICorDebugEditAndContinueErrorInfo_INTERFACE_DEFINED__ /* interface ICorDebugEditAndContinueErrorInfo */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugEditAndContinueErrorInfo; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("8D600D41-F4F6-4cb3-B7EC-7BD164944036") ICorDebugEditAndContinueErrorInfo : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetModule( + virtual HRESULT STDMETHODCALLTYPE GetModule( /* [out] */ ICorDebugModule **ppModule) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetToken( + + virtual HRESULT STDMETHODCALLTYPE GetToken( /* [out] */ mdToken *pToken) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetErrorCode( + + virtual HRESULT STDMETHODCALLTYPE GetErrorCode( /* [out] */ HRESULT *pHr) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetString( + + virtual HRESULT STDMETHODCALLTYPE GetString( /* [in] */ ULONG32 cchString, /* [out] */ ULONG32 *pcchString, /* [length_is][size_is][out] */ WCHAR szString[ ]) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugEditAndContinueErrorInfoVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugEditAndContinueErrorInfo * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugEditAndContinueErrorInfo * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugEditAndContinueErrorInfo * This); - - HRESULT ( STDMETHODCALLTYPE *GetModule )( + + HRESULT ( STDMETHODCALLTYPE *GetModule )( ICorDebugEditAndContinueErrorInfo * This, /* [out] */ ICorDebugModule **ppModule); - - HRESULT ( STDMETHODCALLTYPE *GetToken )( + + HRESULT ( STDMETHODCALLTYPE *GetToken )( ICorDebugEditAndContinueErrorInfo * This, /* [out] */ mdToken *pToken); - - HRESULT ( STDMETHODCALLTYPE *GetErrorCode )( + + HRESULT ( STDMETHODCALLTYPE *GetErrorCode )( ICorDebugEditAndContinueErrorInfo * This, /* [out] */ HRESULT *pHr); - - HRESULT ( STDMETHODCALLTYPE *GetString )( + + HRESULT ( STDMETHODCALLTYPE *GetString )( ICorDebugEditAndContinueErrorInfo * This, /* [in] */ ULONG32 cchString, /* [out] */ ULONG32 *pcchString, /* [length_is][size_is][out] */ WCHAR szString[ ]); - + END_INTERFACE } ICorDebugEditAndContinueErrorInfoVtbl; @@ -18073,46 +18074,46 @@ EXTERN_C const IID IID_ICorDebugEditAndContinueErrorInfo; CONST_VTBL struct ICorDebugEditAndContinueErrorInfoVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugEditAndContinueErrorInfo_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugEditAndContinueErrorInfo_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugEditAndContinueErrorInfo_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugEditAndContinueErrorInfo_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugEditAndContinueErrorInfo_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugEditAndContinueErrorInfo_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugEditAndContinueErrorInfo_GetModule(This,ppModule) \ - ( (This)->lpVtbl -> GetModule(This,ppModule) ) +#define ICorDebugEditAndContinueErrorInfo_GetModule(This,ppModule) \ + ( (This)->lpVtbl -> GetModule(This,ppModule) ) -#define ICorDebugEditAndContinueErrorInfo_GetToken(This,pToken) \ - ( (This)->lpVtbl -> GetToken(This,pToken) ) +#define ICorDebugEditAndContinueErrorInfo_GetToken(This,pToken) \ + ( (This)->lpVtbl -> GetToken(This,pToken) ) -#define ICorDebugEditAndContinueErrorInfo_GetErrorCode(This,pHr) \ - ( (This)->lpVtbl -> GetErrorCode(This,pHr) ) +#define ICorDebugEditAndContinueErrorInfo_GetErrorCode(This,pHr) \ + ( (This)->lpVtbl -> GetErrorCode(This,pHr) ) -#define ICorDebugEditAndContinueErrorInfo_GetString(This,cchString,pcchString,szString) \ - ( (This)->lpVtbl -> GetString(This,cchString,pcchString,szString) ) +#define ICorDebugEditAndContinueErrorInfo_GetString(This,cchString,pcchString,szString) \ + ( (This)->lpVtbl -> GetString(This,cchString,pcchString,szString) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugEditAndContinueErrorInfo_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugEditAndContinueErrorInfo_INTERFACE_DEFINED__ */ /* interface __MIDL_itf_cordebug_0000_0127 */ -/* [local] */ +/* [local] */ #pragma warning(pop) @@ -18124,93 +18125,93 @@ extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0127_v0_0_s_ifspec; #define __ICorDebugEditAndContinueSnapshot_INTERFACE_DEFINED__ /* interface ICorDebugEditAndContinueSnapshot */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugEditAndContinueSnapshot; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("6DC3FA01-D7CB-11d2-8A95-0080C792E5D8") ICorDebugEditAndContinueSnapshot : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE CopyMetaData( + virtual HRESULT STDMETHODCALLTYPE CopyMetaData( /* [in] */ IStream *pIStream, /* [out] */ GUID *pMvid) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetMvid( + + virtual HRESULT STDMETHODCALLTYPE GetMvid( /* [out] */ GUID *pMvid) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetRoDataRVA( + + virtual HRESULT STDMETHODCALLTYPE GetRoDataRVA( /* [out] */ ULONG32 *pRoDataRVA) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetRwDataRVA( + + virtual HRESULT STDMETHODCALLTYPE GetRwDataRVA( /* [out] */ ULONG32 *pRwDataRVA) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetPEBytes( + + virtual HRESULT STDMETHODCALLTYPE SetPEBytes( /* [in] */ IStream *pIStream) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetILMap( + + virtual HRESULT STDMETHODCALLTYPE SetILMap( /* [in] */ mdToken mdFunction, /* [in] */ ULONG cMapSize, /* [size_is][in] */ COR_IL_MAP map[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetPESymbolBytes( + + virtual HRESULT STDMETHODCALLTYPE SetPESymbolBytes( /* [in] */ IStream *pIStream) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugEditAndContinueSnapshotVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugEditAndContinueSnapshot * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugEditAndContinueSnapshot * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugEditAndContinueSnapshot * This); - - HRESULT ( STDMETHODCALLTYPE *CopyMetaData )( + + HRESULT ( STDMETHODCALLTYPE *CopyMetaData )( ICorDebugEditAndContinueSnapshot * This, /* [in] */ IStream *pIStream, /* [out] */ GUID *pMvid); - - HRESULT ( STDMETHODCALLTYPE *GetMvid )( + + HRESULT ( STDMETHODCALLTYPE *GetMvid )( ICorDebugEditAndContinueSnapshot * This, /* [out] */ GUID *pMvid); - - HRESULT ( STDMETHODCALLTYPE *GetRoDataRVA )( + + HRESULT ( STDMETHODCALLTYPE *GetRoDataRVA )( ICorDebugEditAndContinueSnapshot * This, /* [out] */ ULONG32 *pRoDataRVA); - - HRESULT ( STDMETHODCALLTYPE *GetRwDataRVA )( + + HRESULT ( STDMETHODCALLTYPE *GetRwDataRVA )( ICorDebugEditAndContinueSnapshot * This, /* [out] */ ULONG32 *pRwDataRVA); - - HRESULT ( STDMETHODCALLTYPE *SetPEBytes )( + + HRESULT ( STDMETHODCALLTYPE *SetPEBytes )( ICorDebugEditAndContinueSnapshot * This, /* [in] */ IStream *pIStream); - - HRESULT ( STDMETHODCALLTYPE *SetILMap )( + + HRESULT ( STDMETHODCALLTYPE *SetILMap )( ICorDebugEditAndContinueSnapshot * This, /* [in] */ mdToken mdFunction, /* [in] */ ULONG cMapSize, /* [size_is][in] */ COR_IL_MAP map[ ]); - - HRESULT ( STDMETHODCALLTYPE *SetPESymbolBytes )( + + HRESULT ( STDMETHODCALLTYPE *SetPESymbolBytes )( ICorDebugEditAndContinueSnapshot * This, /* [in] */ IStream *pIStream); - + END_INTERFACE } ICorDebugEditAndContinueSnapshotVtbl; @@ -18219,115 +18220,115 @@ EXTERN_C const IID IID_ICorDebugEditAndContinueSnapshot; CONST_VTBL struct ICorDebugEditAndContinueSnapshotVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugEditAndContinueSnapshot_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugEditAndContinueSnapshot_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugEditAndContinueSnapshot_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugEditAndContinueSnapshot_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugEditAndContinueSnapshot_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugEditAndContinueSnapshot_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugEditAndContinueSnapshot_CopyMetaData(This,pIStream,pMvid) \ - ( (This)->lpVtbl -> CopyMetaData(This,pIStream,pMvid) ) +#define ICorDebugEditAndContinueSnapshot_CopyMetaData(This,pIStream,pMvid) \ + ( (This)->lpVtbl -> CopyMetaData(This,pIStream,pMvid) ) -#define ICorDebugEditAndContinueSnapshot_GetMvid(This,pMvid) \ - ( (This)->lpVtbl -> GetMvid(This,pMvid) ) +#define ICorDebugEditAndContinueSnapshot_GetMvid(This,pMvid) \ + ( (This)->lpVtbl -> GetMvid(This,pMvid) ) -#define ICorDebugEditAndContinueSnapshot_GetRoDataRVA(This,pRoDataRVA) \ - ( (This)->lpVtbl -> GetRoDataRVA(This,pRoDataRVA) ) +#define ICorDebugEditAndContinueSnapshot_GetRoDataRVA(This,pRoDataRVA) \ + ( (This)->lpVtbl -> GetRoDataRVA(This,pRoDataRVA) ) -#define ICorDebugEditAndContinueSnapshot_GetRwDataRVA(This,pRwDataRVA) \ - ( (This)->lpVtbl -> GetRwDataRVA(This,pRwDataRVA) ) +#define ICorDebugEditAndContinueSnapshot_GetRwDataRVA(This,pRwDataRVA) \ + ( (This)->lpVtbl -> GetRwDataRVA(This,pRwDataRVA) ) -#define ICorDebugEditAndContinueSnapshot_SetPEBytes(This,pIStream) \ - ( (This)->lpVtbl -> SetPEBytes(This,pIStream) ) +#define ICorDebugEditAndContinueSnapshot_SetPEBytes(This,pIStream) \ + ( (This)->lpVtbl -> SetPEBytes(This,pIStream) ) -#define ICorDebugEditAndContinueSnapshot_SetILMap(This,mdFunction,cMapSize,map) \ - ( (This)->lpVtbl -> SetILMap(This,mdFunction,cMapSize,map) ) +#define ICorDebugEditAndContinueSnapshot_SetILMap(This,mdFunction,cMapSize,map) \ + ( (This)->lpVtbl -> SetILMap(This,mdFunction,cMapSize,map) ) -#define ICorDebugEditAndContinueSnapshot_SetPESymbolBytes(This,pIStream) \ - ( (This)->lpVtbl -> SetPESymbolBytes(This,pIStream) ) +#define ICorDebugEditAndContinueSnapshot_SetPESymbolBytes(This,pIStream) \ + ( (This)->lpVtbl -> SetPESymbolBytes(This,pIStream) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugEditAndContinueSnapshot_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugEditAndContinueSnapshot_INTERFACE_DEFINED__ */ #ifndef __ICorDebugExceptionObjectCallStackEnum_INTERFACE_DEFINED__ #define __ICorDebugExceptionObjectCallStackEnum_INTERFACE_DEFINED__ /* interface ICorDebugExceptionObjectCallStackEnum */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugExceptionObjectCallStackEnum; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("ED775530-4DC4-41F7-86D0-9E2DEF7DFC66") ICorDebugExceptionObjectCallStackEnum : public ICorDebugEnum { public: - virtual HRESULT STDMETHODCALLTYPE Next( + virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ ULONG celt, /* [length_is][size_is][out] */ CorDebugExceptionObjectStackFrame values[ ], /* [out] */ ULONG *pceltFetched) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugExceptionObjectCallStackEnumVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugExceptionObjectCallStackEnum * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugExceptionObjectCallStackEnum * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugExceptionObjectCallStackEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Skip )( + + HRESULT ( STDMETHODCALLTYPE *Skip )( ICorDebugExceptionObjectCallStackEnum * This, /* [in] */ ULONG celt); - - HRESULT ( STDMETHODCALLTYPE *Reset )( + + HRESULT ( STDMETHODCALLTYPE *Reset )( ICorDebugExceptionObjectCallStackEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Clone )( + + HRESULT ( STDMETHODCALLTYPE *Clone )( ICorDebugExceptionObjectCallStackEnum * This, /* [out] */ ICorDebugEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetCount )( + + HRESULT ( STDMETHODCALLTYPE *GetCount )( ICorDebugExceptionObjectCallStackEnum * This, /* [out] */ ULONG *pcelt); - - HRESULT ( STDMETHODCALLTYPE *Next )( + + HRESULT ( STDMETHODCALLTYPE *Next )( ICorDebugExceptionObjectCallStackEnum * This, /* [in] */ ULONG celt, /* [length_is][size_is][out] */ CorDebugExceptionObjectStackFrame values[ ], /* [out] */ ULONG *pceltFetched); - + END_INTERFACE } ICorDebugExceptionObjectCallStackEnumVtbl; @@ -18336,91 +18337,91 @@ EXTERN_C const IID IID_ICorDebugExceptionObjectCallStackEnum; CONST_VTBL struct ICorDebugExceptionObjectCallStackEnumVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugExceptionObjectCallStackEnum_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugExceptionObjectCallStackEnum_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugExceptionObjectCallStackEnum_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugExceptionObjectCallStackEnum_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugExceptionObjectCallStackEnum_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugExceptionObjectCallStackEnum_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugExceptionObjectCallStackEnum_Skip(This,celt) \ - ( (This)->lpVtbl -> Skip(This,celt) ) +#define ICorDebugExceptionObjectCallStackEnum_Skip(This,celt) \ + ( (This)->lpVtbl -> Skip(This,celt) ) -#define ICorDebugExceptionObjectCallStackEnum_Reset(This) \ - ( (This)->lpVtbl -> Reset(This) ) +#define ICorDebugExceptionObjectCallStackEnum_Reset(This) \ + ( (This)->lpVtbl -> Reset(This) ) -#define ICorDebugExceptionObjectCallStackEnum_Clone(This,ppEnum) \ - ( (This)->lpVtbl -> Clone(This,ppEnum) ) +#define ICorDebugExceptionObjectCallStackEnum_Clone(This,ppEnum) \ + ( (This)->lpVtbl -> Clone(This,ppEnum) ) -#define ICorDebugExceptionObjectCallStackEnum_GetCount(This,pcelt) \ - ( (This)->lpVtbl -> GetCount(This,pcelt) ) +#define ICorDebugExceptionObjectCallStackEnum_GetCount(This,pcelt) \ + ( (This)->lpVtbl -> GetCount(This,pcelt) ) -#define ICorDebugExceptionObjectCallStackEnum_Next(This,celt,values,pceltFetched) \ - ( (This)->lpVtbl -> Next(This,celt,values,pceltFetched) ) +#define ICorDebugExceptionObjectCallStackEnum_Next(This,celt,values,pceltFetched) \ + ( (This)->lpVtbl -> Next(This,celt,values,pceltFetched) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugExceptionObjectCallStackEnum_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugExceptionObjectCallStackEnum_INTERFACE_DEFINED__ */ #ifndef __ICorDebugExceptionObjectValue_INTERFACE_DEFINED__ #define __ICorDebugExceptionObjectValue_INTERFACE_DEFINED__ /* interface ICorDebugExceptionObjectValue */ -/* [unique][uuid][local][object] */ +/* [unique][uuid][local][object] */ EXTERN_C const IID IID_ICorDebugExceptionObjectValue; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("AE4CA65D-59DD-42A2-83A5-57E8A08D8719") ICorDebugExceptionObjectValue : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE EnumerateExceptionCallStack( + virtual HRESULT STDMETHODCALLTYPE EnumerateExceptionCallStack( /* [out] */ ICorDebugExceptionObjectCallStackEnum **ppCallStackEnum) = 0; - + }; - - -#else /* C style interface */ + + +#else /* C style interface */ typedef struct ICorDebugExceptionObjectValueVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorDebugExceptionObjectValue * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorDebugExceptionObjectValue * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorDebugExceptionObjectValue * This); - - HRESULT ( STDMETHODCALLTYPE *EnumerateExceptionCallStack )( + + HRESULT ( STDMETHODCALLTYPE *EnumerateExceptionCallStack )( ICorDebugExceptionObjectValue * This, /* [out] */ ICorDebugExceptionObjectCallStackEnum **ppCallStackEnum); - + END_INTERFACE } ICorDebugExceptionObjectValueVtbl; @@ -18429,33 +18430,33 @@ EXTERN_C const IID IID_ICorDebugExceptionObjectValue; CONST_VTBL struct ICorDebugExceptionObjectValueVtbl *lpVtbl; }; - + #ifdef COBJMACROS -#define ICorDebugExceptionObjectValue_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) +#define ICorDebugExceptionObjectValue_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ICorDebugExceptionObjectValue_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) +#define ICorDebugExceptionObjectValue_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) -#define ICorDebugExceptionObjectValue_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) +#define ICorDebugExceptionObjectValue_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) -#define ICorDebugExceptionObjectValue_EnumerateExceptionCallStack(This,ppCallStackEnum) \ - ( (This)->lpVtbl -> EnumerateExceptionCallStack(This,ppCallStackEnum) ) +#define ICorDebugExceptionObjectValue_EnumerateExceptionCallStack(This,ppCallStackEnum) \ + ( (This)->lpVtbl -> EnumerateExceptionCallStack(This,ppCallStackEnum) ) #endif /* COBJMACROS */ -#endif /* C style interface */ +#endif /* C style interface */ -#endif /* __ICorDebugExceptionObjectValue_INTERFACE_DEFINED__ */ +#endif /* __ICorDebugExceptionObjectValue_INTERFACE_DEFINED__ */ @@ -18463,7 +18464,7 @@ EXTERN_C const IID IID_ICorDebugExceptionObjectValue; #define __CORDBLib_LIBRARY_DEFINED__ /* library CORDBLib */ -/* [helpstring][version][uuid] */ +/* [helpstring][version][uuid] */ diff --git a/src/coreclr/src/pal/prebuilt/inc/corerror.h b/src/coreclr/src/pal/prebuilt/inc/corerror.h index 15dc30154649..31ba2d9c4554 100644 --- a/src/coreclr/src/pal/prebuilt/inc/corerror.h +++ b/src/coreclr/src/pal/prebuilt/inc/corerror.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __COMMON_LANGUAGE_RUNTIME_HRESULTS__ #define __COMMON_LANGUAGE_RUNTIME_HRESULTS__ diff --git a/src/coreclr/src/pal/prebuilt/inc/corprof.h b/src/coreclr/src/pal/prebuilt/inc/corprof.h index 223b3d5a9476..9a1e4b490a66 100644 --- a/src/coreclr/src/pal/prebuilt/inc/corprof.h +++ b/src/coreclr/src/pal/prebuilt/inc/corprof.h @@ -7,10 +7,10 @@ /* at Mon Jan 18 19:14:07 2038 */ /* Compiler settings for C:/git/runtime/src/coreclr/src/inc/corprof.idl: - Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.01.0622 + Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.01.0622 protocol : dce , ms_ext, c_ext, robust - error checks: allocation ref bounds_check enum stub_data - VC __declspec() decoration level: + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: __declspec(uuid()), __declspec(selectany), __declspec(novtable) DECLSPEC_UUID(), MIDL_INTERFACE() */ @@ -43,7 +43,7 @@ #pragma once #endif -/* Forward Declarations */ +/* Forward Declarations */ #ifndef __ICorProfilerCallback_FWD_DEFINED__ #define __ICorProfilerCallback_FWD_DEFINED__ @@ -108,6 +108,13 @@ typedef interface ICorProfilerCallback9 ICorProfilerCallback9; #endif /* __ICorProfilerCallback9_FWD_DEFINED__ */ +#ifndef __ICorProfilerCallback10_FWD_DEFINED__ +#define __ICorProfilerCallback10_FWD_DEFINED__ +typedef interface ICorProfilerCallback10 ICorProfilerCallback10; + +#endif /* __ICorProfilerCallback10_FWD_DEFINED__ */ + + #ifndef __ICorProfilerInfo_FWD_DEFINED__ #define __ICorProfilerInfo_FWD_DEFINED__ typedef interface ICorProfilerInfo ICorProfilerInfo; @@ -253,11 +260,11 @@ typedef interface ICorProfilerAssemblyReferenceProvider ICorProfilerAssemblyRefe #ifdef __cplusplus extern "C"{ -#endif +#endif /* interface __MIDL_itf_corprof_0000_0000 */ -/* [local] */ +/* [local] */ #define CorDB_CONTROL_Profiling "Cor_Enable_Profiling" #define CorDB_CONTROL_ProfilingL L"Cor_Enable_Profiling" @@ -319,7 +326,7 @@ typedef struct _COR_IL_MAP #endif //_COR_IL_MAP #ifndef _COR_DEBUG_IL_TO_NATIVE_MAP_ #define _COR_DEBUG_IL_TO_NATIVE_MAP_ -typedef +typedef enum CorDebugIlToNativeMappingTypes { NO_MAPPING = -1, @@ -374,16 +381,16 @@ typedef /* [public][public][public][public][public][public][public][public][publ UINT_PTR clientID; } FunctionIDOrClientID; -typedef UINT_PTR __stdcall __stdcall FunctionIDMapper( +typedef UINT_PTR __stdcall __stdcall FunctionIDMapper( FunctionID funcId, BOOL *pbHookFunction); -typedef UINT_PTR __stdcall __stdcall FunctionIDMapper2( +typedef UINT_PTR __stdcall __stdcall FunctionIDMapper2( FunctionID funcId, void *clientData, BOOL *pbHookFunction); -typedef +typedef enum _COR_PRF_SNAPSHOT_INFO { COR_PRF_SNAPSHOT_DEFAULT = 0, @@ -412,7 +419,7 @@ typedef struct _COR_PRF_CODE_INFO SIZE_T size; } COR_PRF_CODE_INFO; -typedef /* [public][public] */ +typedef /* [public][public] */ enum __MIDL___MIDL_itf_corprof_0000_0000_0004 { COR_PRF_FIELD_NOT_A_STATIC = 0, @@ -445,54 +452,54 @@ typedef struct _COR_PRF_METHOD mdMethodDef methodId; } COR_PRF_METHOD; -typedef void FunctionEnter( +typedef void FunctionEnter( FunctionID funcID); -typedef void FunctionLeave( +typedef void FunctionLeave( FunctionID funcID); -typedef void FunctionTailcall( +typedef void FunctionTailcall( FunctionID funcID); -typedef void FunctionEnter2( +typedef void FunctionEnter2( FunctionID funcId, UINT_PTR clientData, COR_PRF_FRAME_INFO func, COR_PRF_FUNCTION_ARGUMENT_INFO *argumentInfo); -typedef void FunctionLeave2( +typedef void FunctionLeave2( FunctionID funcId, UINT_PTR clientData, COR_PRF_FRAME_INFO func, COR_PRF_FUNCTION_ARGUMENT_RANGE *retvalRange); -typedef void FunctionTailcall2( +typedef void FunctionTailcall2( FunctionID funcId, UINT_PTR clientData, COR_PRF_FRAME_INFO func); -typedef void FunctionEnter3( +typedef void FunctionEnter3( FunctionIDOrClientID functionIDOrClientID); -typedef void FunctionLeave3( +typedef void FunctionLeave3( FunctionIDOrClientID functionIDOrClientID); -typedef void FunctionTailcall3( +typedef void FunctionTailcall3( FunctionIDOrClientID functionIDOrClientID); -typedef void FunctionEnter3WithInfo( +typedef void FunctionEnter3WithInfo( FunctionIDOrClientID functionIDOrClientID, COR_PRF_ELT_INFO eltInfo); -typedef void FunctionLeave3WithInfo( +typedef void FunctionLeave3WithInfo( FunctionIDOrClientID functionIDOrClientID, COR_PRF_ELT_INFO eltInfo); -typedef void FunctionTailcall3WithInfo( +typedef void FunctionTailcall3WithInfo( FunctionIDOrClientID functionIDOrClientID, COR_PRF_ELT_INFO eltInfo); -typedef HRESULT __stdcall __stdcall StackSnapshotCallback( +typedef HRESULT __stdcall __stdcall StackSnapshotCallback( FunctionID funcId, UINT_PTR ip, COR_PRF_FRAME_INFO frameInfo, @@ -500,12 +507,12 @@ typedef HRESULT __stdcall __stdcall StackSnapshotCallback( BYTE context[ ], void *clientData); -typedef BOOL ObjectReferenceCallback( +typedef BOOL ObjectReferenceCallback( ObjectID root, ObjectID *reference, void *clientData); -typedef /* [public] */ +typedef /* [public] */ enum __MIDL___MIDL_itf_corprof_0000_0000_0005 { COR_PRF_MONITOR_NONE = 0, @@ -545,10 +552,10 @@ enum __MIDL___MIDL_itf_corprof_0000_0000_0005 COR_PRF_ALL = 0x8fffffff, COR_PRF_REQUIRE_PROFILE_IMAGE = ( ( COR_PRF_USE_PROFILE_IMAGES | COR_PRF_MONITOR_CODE_TRANSITIONS ) | COR_PRF_MONITOR_ENTERLEAVE ) , COR_PRF_ALLOWABLE_AFTER_ATTACH = ( ( ( ( ( ( ( ( ( ( COR_PRF_MONITOR_THREADS | COR_PRF_MONITOR_MODULE_LOADS ) | COR_PRF_MONITOR_ASSEMBLY_LOADS ) | COR_PRF_MONITOR_APPDOMAIN_LOADS ) | COR_PRF_ENABLE_STACK_SNAPSHOT ) | COR_PRF_MONITOR_GC ) | COR_PRF_MONITOR_SUSPENDS ) | COR_PRF_MONITOR_CLASS_LOADS ) | COR_PRF_MONITOR_EXCEPTIONS ) | COR_PRF_MONITOR_JIT_COMPILATION ) | COR_PRF_ENABLE_REJIT ) , - COR_PRF_MONITOR_IMMUTABLE = ( ( ( ( ( ( ( ( ( ( ( ( ( ( COR_PRF_MONITOR_CODE_TRANSITIONS | COR_PRF_MONITOR_REMOTING ) | COR_PRF_MONITOR_REMOTING_COOKIE ) | COR_PRF_MONITOR_REMOTING_ASYNC ) | COR_PRF_ENABLE_INPROC_DEBUGGING ) | COR_PRF_ENABLE_JIT_MAPS ) | COR_PRF_DISABLE_OPTIMIZATIONS ) | COR_PRF_DISABLE_INLINING ) | COR_PRF_ENABLE_OBJECT_ALLOCATED ) | COR_PRF_ENABLE_FUNCTION_ARGS ) | COR_PRF_ENABLE_FUNCTION_RETVAL ) | COR_PRF_ENABLE_FRAME_INFO ) | COR_PRF_USE_PROFILE_IMAGES ) | COR_PRF_DISABLE_TRANSPARENCY_CHECKS_UNDER_FULL_TRUST ) | COR_PRF_DISABLE_ALL_NGEN_IMAGES ) + COR_PRF_MONITOR_IMMUTABLE = ( ( ( ( ( ( ( ( ( ( ( ( ( ( COR_PRF_MONITOR_CODE_TRANSITIONS | COR_PRF_MONITOR_REMOTING ) | COR_PRF_MONITOR_REMOTING_COOKIE ) | COR_PRF_MONITOR_REMOTING_ASYNC ) | COR_PRF_ENABLE_INPROC_DEBUGGING ) | COR_PRF_ENABLE_JIT_MAPS ) | COR_PRF_DISABLE_OPTIMIZATIONS ) | COR_PRF_DISABLE_INLINING ) | COR_PRF_ENABLE_OBJECT_ALLOCATED ) | COR_PRF_ENABLE_FUNCTION_ARGS ) | COR_PRF_ENABLE_FUNCTION_RETVAL ) | COR_PRF_ENABLE_FRAME_INFO ) | COR_PRF_USE_PROFILE_IMAGES ) | COR_PRF_DISABLE_TRANSPARENCY_CHECKS_UNDER_FULL_TRUST ) | COR_PRF_DISABLE_ALL_NGEN_IMAGES ) } COR_PRF_MONITOR; -typedef /* [public] */ +typedef /* [public] */ enum __MIDL___MIDL_itf_corprof_0000_0000_0006 { COR_PRF_HIGH_MONITOR_NONE = 0, @@ -560,11 +567,12 @@ enum __MIDL___MIDL_itf_corprof_0000_0000_0006 COR_PRF_HIGH_MONITOR_GC_MOVED_OBJECTS = 0x20, COR_PRF_HIGH_REQUIRE_PROFILE_IMAGE = 0, COR_PRF_HIGH_MONITOR_LARGEOBJECT_ALLOCATED = 0x40, - COR_PRF_HIGH_ALLOWABLE_AFTER_ATTACH = ( ( ( ( COR_PRF_HIGH_IN_MEMORY_SYMBOLS_UPDATED | COR_PRF_HIGH_MONITOR_DYNAMIC_FUNCTION_UNLOADS ) | COR_PRF_HIGH_BASIC_GC ) | COR_PRF_HIGH_MONITOR_GC_MOVED_OBJECTS ) | COR_PRF_HIGH_MONITOR_LARGEOBJECT_ALLOCATED ) , + COR_PRF_HIGH_MONITOR_EVENT_PIPE = 0x80, + COR_PRF_HIGH_ALLOWABLE_AFTER_ATTACH = ( ( ( ( ( COR_PRF_HIGH_IN_MEMORY_SYMBOLS_UPDATED | COR_PRF_HIGH_MONITOR_DYNAMIC_FUNCTION_UNLOADS ) | COR_PRF_HIGH_BASIC_GC ) | COR_PRF_HIGH_MONITOR_GC_MOVED_OBJECTS ) | COR_PRF_HIGH_MONITOR_LARGEOBJECT_ALLOCATED ) | COR_PRF_HIGH_MONITOR_EVENT_PIPE ) , COR_PRF_HIGH_MONITOR_IMMUTABLE = COR_PRF_HIGH_DISABLE_TIERED_COMPILATION } COR_PRF_HIGH_MONITOR; -typedef /* [public] */ +typedef /* [public] */ enum __MIDL___MIDL_itf_corprof_0000_0000_0007 { PROFILER_PARENT_UNKNOWN = 0xfffffffd, @@ -572,21 +580,21 @@ enum __MIDL___MIDL_itf_corprof_0000_0000_0007 PROFILER_GLOBAL_MODULE = 0xffffffff } COR_PRF_MISC; -typedef /* [public][public] */ +typedef /* [public][public] */ enum __MIDL___MIDL_itf_corprof_0000_0000_0008 { COR_PRF_CACHED_FUNCTION_FOUND = 0, - COR_PRF_CACHED_FUNCTION_NOT_FOUND = ( COR_PRF_CACHED_FUNCTION_FOUND + 1 ) + COR_PRF_CACHED_FUNCTION_NOT_FOUND = ( COR_PRF_CACHED_FUNCTION_FOUND + 1 ) } COR_PRF_JIT_CACHE; -typedef /* [public][public][public] */ +typedef /* [public][public][public] */ enum __MIDL___MIDL_itf_corprof_0000_0000_0009 { COR_PRF_TRANSITION_CALL = 0, - COR_PRF_TRANSITION_RETURN = ( COR_PRF_TRANSITION_CALL + 1 ) + COR_PRF_TRANSITION_RETURN = ( COR_PRF_TRANSITION_CALL + 1 ) } COR_PRF_TRANSITION_REASON; -typedef /* [public][public] */ +typedef /* [public][public] */ enum __MIDL___MIDL_itf_corprof_0000_0000_0010 { COR_PRF_SUSPEND_OTHER = 0, @@ -600,14 +608,14 @@ enum __MIDL___MIDL_itf_corprof_0000_0000_0010 COR_PRF_SUSPEND_FOR_PROFILER = 9 } COR_PRF_SUSPEND_REASON; -typedef /* [public][public] */ +typedef /* [public][public] */ enum __MIDL___MIDL_itf_corprof_0000_0000_0011 { COR_PRF_DESKTOP_CLR = 0x1, COR_PRF_CORE_CLR = 0x2 } COR_PRF_RUNTIME_TYPE; -typedef /* [public] */ +typedef /* [public] */ enum __MIDL___MIDL_itf_corprof_0000_0000_0012 { COR_PRF_REJIT_BLOCK_INLINING = 0x1, @@ -618,9 +626,12 @@ typedef UINT_PTR EVENTPIPE_PROVIDER; typedef UINT_PTR EVENTPIPE_EVENT; -typedef /* [public] */ +typedef UINT64 EVENTPIPE_SESSION; + +typedef /* [public] */ enum __MIDL___MIDL_itf_corprof_0000_0000_0013 { + COR_PRF_EVENTPIPE_OBJECT = 1, COR_PRF_EVENTPIPE_BOOLEAN = 3, COR_PRF_EVENTPIPE_CHAR = 4, COR_PRF_EVENTPIPE_SBYTE = 5, @@ -640,7 +651,7 @@ enum __MIDL___MIDL_itf_corprof_0000_0000_0013 COR_PRF_EVENTPIPE_ARRAY = 19 } COR_PRF_EVENTPIPE_PARAM_TYPE; -typedef /* [public] */ +typedef /* [public] */ enum __MIDL___MIDL_itf_corprof_0000_0000_0014 { COR_PRF_EVENTPIPE_LOGALWAYS = 0, @@ -651,14 +662,22 @@ enum __MIDL___MIDL_itf_corprof_0000_0000_0014 COR_PRF_EVENTPIPE_VERBOSE = 5 } COR_PRF_EVENTPIPE_LEVEL; -typedef /* [public][public] */ struct __MIDL___MIDL_itf_corprof_0000_0000_0015 +typedef /* [public][public][public] */ struct __MIDL___MIDL_itf_corprof_0000_0000_0015 + { + const WCHAR *providerName; + UINT64 keywords; + UINT32 loggingLevel; + const WCHAR *filterData; + } COR_PRF_EVENTPIPE_PROVIDER_CONFIG; + +typedef /* [public][public] */ struct __MIDL___MIDL_itf_corprof_0000_0000_0016 { UINT32 type; UINT32 elementType; const WCHAR *name; } COR_PRF_EVENTPIPE_PARAM_DESC; -typedef /* [public][public] */ struct __MIDL___MIDL_itf_corprof_0000_0000_0016 +typedef /* [public][public] */ struct __MIDL___MIDL_itf_corprof_0000_0000_0017 { UINT64 ptr; UINT32 size; @@ -690,567 +709,567 @@ extern RPC_IF_HANDLE __MIDL_itf_corprof_0000_0000_v0_0_s_ifspec; #define __ICorProfilerCallback_INTERFACE_DEFINED__ /* interface ICorProfilerCallback */ -/* [local][unique][uuid][object] */ +/* [local][unique][uuid][object] */ EXTERN_C const IID IID_ICorProfilerCallback; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("176FBED1-A55C-4796-98CA-A9DA0EF883E7") ICorProfilerCallback : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE Initialize( + virtual HRESULT STDMETHODCALLTYPE Initialize( /* [in] */ IUnknown *pICorProfilerInfoUnk) = 0; - + virtual HRESULT STDMETHODCALLTYPE Shutdown( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE AppDomainCreationStarted( + + virtual HRESULT STDMETHODCALLTYPE AppDomainCreationStarted( /* [in] */ AppDomainID appDomainId) = 0; - - virtual HRESULT STDMETHODCALLTYPE AppDomainCreationFinished( + + virtual HRESULT STDMETHODCALLTYPE AppDomainCreationFinished( /* [in] */ AppDomainID appDomainId, /* [in] */ HRESULT hrStatus) = 0; - - virtual HRESULT STDMETHODCALLTYPE AppDomainShutdownStarted( + + virtual HRESULT STDMETHODCALLTYPE AppDomainShutdownStarted( /* [in] */ AppDomainID appDomainId) = 0; - - virtual HRESULT STDMETHODCALLTYPE AppDomainShutdownFinished( + + virtual HRESULT STDMETHODCALLTYPE AppDomainShutdownFinished( /* [in] */ AppDomainID appDomainId, /* [in] */ HRESULT hrStatus) = 0; - - virtual HRESULT STDMETHODCALLTYPE AssemblyLoadStarted( + + virtual HRESULT STDMETHODCALLTYPE AssemblyLoadStarted( /* [in] */ AssemblyID assemblyId) = 0; - - virtual HRESULT STDMETHODCALLTYPE AssemblyLoadFinished( + + virtual HRESULT STDMETHODCALLTYPE AssemblyLoadFinished( /* [in] */ AssemblyID assemblyId, /* [in] */ HRESULT hrStatus) = 0; - - virtual HRESULT STDMETHODCALLTYPE AssemblyUnloadStarted( + + virtual HRESULT STDMETHODCALLTYPE AssemblyUnloadStarted( /* [in] */ AssemblyID assemblyId) = 0; - - virtual HRESULT STDMETHODCALLTYPE AssemblyUnloadFinished( + + virtual HRESULT STDMETHODCALLTYPE AssemblyUnloadFinished( /* [in] */ AssemblyID assemblyId, /* [in] */ HRESULT hrStatus) = 0; - - virtual HRESULT STDMETHODCALLTYPE ModuleLoadStarted( + + virtual HRESULT STDMETHODCALLTYPE ModuleLoadStarted( /* [in] */ ModuleID moduleId) = 0; - - virtual HRESULT STDMETHODCALLTYPE ModuleLoadFinished( + + virtual HRESULT STDMETHODCALLTYPE ModuleLoadFinished( /* [in] */ ModuleID moduleId, /* [in] */ HRESULT hrStatus) = 0; - - virtual HRESULT STDMETHODCALLTYPE ModuleUnloadStarted( + + virtual HRESULT STDMETHODCALLTYPE ModuleUnloadStarted( /* [in] */ ModuleID moduleId) = 0; - - virtual HRESULT STDMETHODCALLTYPE ModuleUnloadFinished( + + virtual HRESULT STDMETHODCALLTYPE ModuleUnloadFinished( /* [in] */ ModuleID moduleId, /* [in] */ HRESULT hrStatus) = 0; - - virtual HRESULT STDMETHODCALLTYPE ModuleAttachedToAssembly( + + virtual HRESULT STDMETHODCALLTYPE ModuleAttachedToAssembly( /* [in] */ ModuleID moduleId, /* [in] */ AssemblyID AssemblyId) = 0; - - virtual HRESULT STDMETHODCALLTYPE ClassLoadStarted( + + virtual HRESULT STDMETHODCALLTYPE ClassLoadStarted( /* [in] */ ClassID classId) = 0; - - virtual HRESULT STDMETHODCALLTYPE ClassLoadFinished( + + virtual HRESULT STDMETHODCALLTYPE ClassLoadFinished( /* [in] */ ClassID classId, /* [in] */ HRESULT hrStatus) = 0; - - virtual HRESULT STDMETHODCALLTYPE ClassUnloadStarted( + + virtual HRESULT STDMETHODCALLTYPE ClassUnloadStarted( /* [in] */ ClassID classId) = 0; - - virtual HRESULT STDMETHODCALLTYPE ClassUnloadFinished( + + virtual HRESULT STDMETHODCALLTYPE ClassUnloadFinished( /* [in] */ ClassID classId, /* [in] */ HRESULT hrStatus) = 0; - - virtual HRESULT STDMETHODCALLTYPE FunctionUnloadStarted( + + virtual HRESULT STDMETHODCALLTYPE FunctionUnloadStarted( /* [in] */ FunctionID functionId) = 0; - - virtual HRESULT STDMETHODCALLTYPE JITCompilationStarted( + + virtual HRESULT STDMETHODCALLTYPE JITCompilationStarted( /* [in] */ FunctionID functionId, /* [in] */ BOOL fIsSafeToBlock) = 0; - - virtual HRESULT STDMETHODCALLTYPE JITCompilationFinished( + + virtual HRESULT STDMETHODCALLTYPE JITCompilationFinished( /* [in] */ FunctionID functionId, /* [in] */ HRESULT hrStatus, /* [in] */ BOOL fIsSafeToBlock) = 0; - - virtual HRESULT STDMETHODCALLTYPE JITCachedFunctionSearchStarted( + + virtual HRESULT STDMETHODCALLTYPE JITCachedFunctionSearchStarted( /* [in] */ FunctionID functionId, /* [out] */ BOOL *pbUseCachedFunction) = 0; - - virtual HRESULT STDMETHODCALLTYPE JITCachedFunctionSearchFinished( + + virtual HRESULT STDMETHODCALLTYPE JITCachedFunctionSearchFinished( /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_JIT_CACHE result) = 0; - - virtual HRESULT STDMETHODCALLTYPE JITFunctionPitched( + + virtual HRESULT STDMETHODCALLTYPE JITFunctionPitched( /* [in] */ FunctionID functionId) = 0; - - virtual HRESULT STDMETHODCALLTYPE JITInlining( + + virtual HRESULT STDMETHODCALLTYPE JITInlining( /* [in] */ FunctionID callerId, /* [in] */ FunctionID calleeId, /* [out] */ BOOL *pfShouldInline) = 0; - - virtual HRESULT STDMETHODCALLTYPE ThreadCreated( + + virtual HRESULT STDMETHODCALLTYPE ThreadCreated( /* [in] */ ThreadID threadId) = 0; - - virtual HRESULT STDMETHODCALLTYPE ThreadDestroyed( + + virtual HRESULT STDMETHODCALLTYPE ThreadDestroyed( /* [in] */ ThreadID threadId) = 0; - - virtual HRESULT STDMETHODCALLTYPE ThreadAssignedToOSThread( + + virtual HRESULT STDMETHODCALLTYPE ThreadAssignedToOSThread( /* [in] */ ThreadID managedThreadId, /* [in] */ DWORD osThreadId) = 0; - + virtual HRESULT STDMETHODCALLTYPE RemotingClientInvocationStarted( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE RemotingClientSendingMessage( + + virtual HRESULT STDMETHODCALLTYPE RemotingClientSendingMessage( /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync) = 0; - - virtual HRESULT STDMETHODCALLTYPE RemotingClientReceivingReply( + + virtual HRESULT STDMETHODCALLTYPE RemotingClientReceivingReply( /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync) = 0; - + virtual HRESULT STDMETHODCALLTYPE RemotingClientInvocationFinished( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE RemotingServerReceivingMessage( + + virtual HRESULT STDMETHODCALLTYPE RemotingServerReceivingMessage( /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync) = 0; - + virtual HRESULT STDMETHODCALLTYPE RemotingServerInvocationStarted( void) = 0; - + virtual HRESULT STDMETHODCALLTYPE RemotingServerInvocationReturned( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE RemotingServerSendingReply( + + virtual HRESULT STDMETHODCALLTYPE RemotingServerSendingReply( /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync) = 0; - - virtual HRESULT STDMETHODCALLTYPE UnmanagedToManagedTransition( + + virtual HRESULT STDMETHODCALLTYPE UnmanagedToManagedTransition( /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_TRANSITION_REASON reason) = 0; - - virtual HRESULT STDMETHODCALLTYPE ManagedToUnmanagedTransition( + + virtual HRESULT STDMETHODCALLTYPE ManagedToUnmanagedTransition( /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_TRANSITION_REASON reason) = 0; - - virtual HRESULT STDMETHODCALLTYPE RuntimeSuspendStarted( + + virtual HRESULT STDMETHODCALLTYPE RuntimeSuspendStarted( /* [in] */ COR_PRF_SUSPEND_REASON suspendReason) = 0; - + virtual HRESULT STDMETHODCALLTYPE RuntimeSuspendFinished( void) = 0; - + virtual HRESULT STDMETHODCALLTYPE RuntimeSuspendAborted( void) = 0; - + virtual HRESULT STDMETHODCALLTYPE RuntimeResumeStarted( void) = 0; - + virtual HRESULT STDMETHODCALLTYPE RuntimeResumeFinished( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE RuntimeThreadSuspended( + + virtual HRESULT STDMETHODCALLTYPE RuntimeThreadSuspended( /* [in] */ ThreadID threadId) = 0; - - virtual HRESULT STDMETHODCALLTYPE RuntimeThreadResumed( + + virtual HRESULT STDMETHODCALLTYPE RuntimeThreadResumed( /* [in] */ ThreadID threadId) = 0; - - virtual HRESULT STDMETHODCALLTYPE MovedReferences( + + virtual HRESULT STDMETHODCALLTYPE MovedReferences( /* [in] */ ULONG cMovedObjectIDRanges, /* [size_is][in] */ ObjectID oldObjectIDRangeStart[ ], /* [size_is][in] */ ObjectID newObjectIDRangeStart[ ], /* [size_is][in] */ ULONG cObjectIDRangeLength[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE ObjectAllocated( + + virtual HRESULT STDMETHODCALLTYPE ObjectAllocated( /* [in] */ ObjectID objectId, /* [in] */ ClassID classId) = 0; - - virtual HRESULT STDMETHODCALLTYPE ObjectsAllocatedByClass( + + virtual HRESULT STDMETHODCALLTYPE ObjectsAllocatedByClass( /* [in] */ ULONG cClassCount, /* [size_is][in] */ ClassID classIds[ ], /* [size_is][in] */ ULONG cObjects[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE ObjectReferences( + + virtual HRESULT STDMETHODCALLTYPE ObjectReferences( /* [in] */ ObjectID objectId, /* [in] */ ClassID classId, /* [in] */ ULONG cObjectRefs, /* [size_is][in] */ ObjectID objectRefIds[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE RootReferences( + + virtual HRESULT STDMETHODCALLTYPE RootReferences( /* [in] */ ULONG cRootRefs, /* [size_is][in] */ ObjectID rootRefIds[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE ExceptionThrown( + + virtual HRESULT STDMETHODCALLTYPE ExceptionThrown( /* [in] */ ObjectID thrownObjectId) = 0; - - virtual HRESULT STDMETHODCALLTYPE ExceptionSearchFunctionEnter( + + virtual HRESULT STDMETHODCALLTYPE ExceptionSearchFunctionEnter( /* [in] */ FunctionID functionId) = 0; - + virtual HRESULT STDMETHODCALLTYPE ExceptionSearchFunctionLeave( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE ExceptionSearchFilterEnter( + + virtual HRESULT STDMETHODCALLTYPE ExceptionSearchFilterEnter( /* [in] */ FunctionID functionId) = 0; - + virtual HRESULT STDMETHODCALLTYPE ExceptionSearchFilterLeave( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE ExceptionSearchCatcherFound( + + virtual HRESULT STDMETHODCALLTYPE ExceptionSearchCatcherFound( /* [in] */ FunctionID functionId) = 0; - - virtual HRESULT STDMETHODCALLTYPE ExceptionOSHandlerEnter( + + virtual HRESULT STDMETHODCALLTYPE ExceptionOSHandlerEnter( /* [in] */ UINT_PTR __unused) = 0; - - virtual HRESULT STDMETHODCALLTYPE ExceptionOSHandlerLeave( + + virtual HRESULT STDMETHODCALLTYPE ExceptionOSHandlerLeave( /* [in] */ UINT_PTR __unused) = 0; - - virtual HRESULT STDMETHODCALLTYPE ExceptionUnwindFunctionEnter( + + virtual HRESULT STDMETHODCALLTYPE ExceptionUnwindFunctionEnter( /* [in] */ FunctionID functionId) = 0; - + virtual HRESULT STDMETHODCALLTYPE ExceptionUnwindFunctionLeave( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE ExceptionUnwindFinallyEnter( + + virtual HRESULT STDMETHODCALLTYPE ExceptionUnwindFinallyEnter( /* [in] */ FunctionID functionId) = 0; - + virtual HRESULT STDMETHODCALLTYPE ExceptionUnwindFinallyLeave( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE ExceptionCatcherEnter( + + virtual HRESULT STDMETHODCALLTYPE ExceptionCatcherEnter( /* [in] */ FunctionID functionId, /* [in] */ ObjectID objectId) = 0; - + virtual HRESULT STDMETHODCALLTYPE ExceptionCatcherLeave( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE COMClassicVTableCreated( + + virtual HRESULT STDMETHODCALLTYPE COMClassicVTableCreated( /* [in] */ ClassID wrappedClassId, /* [in] */ REFGUID implementedIID, /* [in] */ void *pVTable, /* [in] */ ULONG cSlots) = 0; - - virtual HRESULT STDMETHODCALLTYPE COMClassicVTableDestroyed( + + virtual HRESULT STDMETHODCALLTYPE COMClassicVTableDestroyed( /* [in] */ ClassID wrappedClassId, /* [in] */ REFGUID implementedIID, /* [in] */ void *pVTable) = 0; - + virtual HRESULT STDMETHODCALLTYPE ExceptionCLRCatcherFound( void) = 0; - + virtual HRESULT STDMETHODCALLTYPE ExceptionCLRCatcherExecute( void) = 0; - + }; - - + + #else /* C style interface */ typedef struct ICorProfilerCallbackVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorProfilerCallback * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorProfilerCallback * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorProfilerCallback * This); - - HRESULT ( STDMETHODCALLTYPE *Initialize )( + + HRESULT ( STDMETHODCALLTYPE *Initialize )( ICorProfilerCallback * This, /* [in] */ IUnknown *pICorProfilerInfoUnk); - - HRESULT ( STDMETHODCALLTYPE *Shutdown )( + + HRESULT ( STDMETHODCALLTYPE *Shutdown )( ICorProfilerCallback * This); - - HRESULT ( STDMETHODCALLTYPE *AppDomainCreationStarted )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainCreationStarted )( ICorProfilerCallback * This, /* [in] */ AppDomainID appDomainId); - - HRESULT ( STDMETHODCALLTYPE *AppDomainCreationFinished )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainCreationFinished )( ICorProfilerCallback * This, /* [in] */ AppDomainID appDomainId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownStarted )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownStarted )( ICorProfilerCallback * This, /* [in] */ AppDomainID appDomainId); - - HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownFinished )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownFinished )( ICorProfilerCallback * This, /* [in] */ AppDomainID appDomainId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *AssemblyLoadStarted )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyLoadStarted )( ICorProfilerCallback * This, /* [in] */ AssemblyID assemblyId); - - HRESULT ( STDMETHODCALLTYPE *AssemblyLoadFinished )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyLoadFinished )( ICorProfilerCallback * This, /* [in] */ AssemblyID assemblyId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadStarted )( ICorProfilerCallback * This, /* [in] */ AssemblyID assemblyId); - - HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadFinished )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadFinished )( ICorProfilerCallback * This, /* [in] */ AssemblyID assemblyId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ModuleLoadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ModuleLoadStarted )( ICorProfilerCallback * This, /* [in] */ ModuleID moduleId); - - HRESULT ( STDMETHODCALLTYPE *ModuleLoadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ModuleLoadFinished )( ICorProfilerCallback * This, /* [in] */ ModuleID moduleId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ModuleUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ModuleUnloadStarted )( ICorProfilerCallback * This, /* [in] */ ModuleID moduleId); - - HRESULT ( STDMETHODCALLTYPE *ModuleUnloadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ModuleUnloadFinished )( ICorProfilerCallback * This, /* [in] */ ModuleID moduleId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ModuleAttachedToAssembly )( + + HRESULT ( STDMETHODCALLTYPE *ModuleAttachedToAssembly )( ICorProfilerCallback * This, /* [in] */ ModuleID moduleId, /* [in] */ AssemblyID AssemblyId); - - HRESULT ( STDMETHODCALLTYPE *ClassLoadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ClassLoadStarted )( ICorProfilerCallback * This, /* [in] */ ClassID classId); - - HRESULT ( STDMETHODCALLTYPE *ClassLoadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ClassLoadFinished )( ICorProfilerCallback * This, /* [in] */ ClassID classId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ClassUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ClassUnloadStarted )( ICorProfilerCallback * This, /* [in] */ ClassID classId); - - HRESULT ( STDMETHODCALLTYPE *ClassUnloadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ClassUnloadFinished )( ICorProfilerCallback * This, /* [in] */ ClassID classId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *FunctionUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *FunctionUnloadStarted )( ICorProfilerCallback * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *JITCompilationStarted )( + + HRESULT ( STDMETHODCALLTYPE *JITCompilationStarted )( ICorProfilerCallback * This, /* [in] */ FunctionID functionId, /* [in] */ BOOL fIsSafeToBlock); - - HRESULT ( STDMETHODCALLTYPE *JITCompilationFinished )( + + HRESULT ( STDMETHODCALLTYPE *JITCompilationFinished )( ICorProfilerCallback * This, /* [in] */ FunctionID functionId, /* [in] */ HRESULT hrStatus, /* [in] */ BOOL fIsSafeToBlock); - - HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchStarted )( + + HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchStarted )( ICorProfilerCallback * This, /* [in] */ FunctionID functionId, /* [out] */ BOOL *pbUseCachedFunction); - - HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchFinished )( + + HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchFinished )( ICorProfilerCallback * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_JIT_CACHE result); - - HRESULT ( STDMETHODCALLTYPE *JITFunctionPitched )( + + HRESULT ( STDMETHODCALLTYPE *JITFunctionPitched )( ICorProfilerCallback * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *JITInlining )( + + HRESULT ( STDMETHODCALLTYPE *JITInlining )( ICorProfilerCallback * This, /* [in] */ FunctionID callerId, /* [in] */ FunctionID calleeId, /* [out] */ BOOL *pfShouldInline); - - HRESULT ( STDMETHODCALLTYPE *ThreadCreated )( + + HRESULT ( STDMETHODCALLTYPE *ThreadCreated )( ICorProfilerCallback * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *ThreadDestroyed )( + + HRESULT ( STDMETHODCALLTYPE *ThreadDestroyed )( ICorProfilerCallback * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *ThreadAssignedToOSThread )( + + HRESULT ( STDMETHODCALLTYPE *ThreadAssignedToOSThread )( ICorProfilerCallback * This, /* [in] */ ThreadID managedThreadId, /* [in] */ DWORD osThreadId); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationStarted )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationStarted )( ICorProfilerCallback * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientSendingMessage )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientSendingMessage )( ICorProfilerCallback * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientReceivingReply )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientReceivingReply )( ICorProfilerCallback * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationFinished )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationFinished )( ICorProfilerCallback * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerReceivingMessage )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerReceivingMessage )( ICorProfilerCallback * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationStarted )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationStarted )( ICorProfilerCallback * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationReturned )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationReturned )( ICorProfilerCallback * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerSendingReply )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerSendingReply )( ICorProfilerCallback * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *UnmanagedToManagedTransition )( + + HRESULT ( STDMETHODCALLTYPE *UnmanagedToManagedTransition )( ICorProfilerCallback * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_TRANSITION_REASON reason); - - HRESULT ( STDMETHODCALLTYPE *ManagedToUnmanagedTransition )( + + HRESULT ( STDMETHODCALLTYPE *ManagedToUnmanagedTransition )( ICorProfilerCallback * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_TRANSITION_REASON reason); - - HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendStarted )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendStarted )( ICorProfilerCallback * This, /* [in] */ COR_PRF_SUSPEND_REASON suspendReason); - - HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendFinished )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendFinished )( ICorProfilerCallback * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendAborted )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendAborted )( ICorProfilerCallback * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeResumeStarted )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeResumeStarted )( ICorProfilerCallback * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeResumeFinished )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeResumeFinished )( ICorProfilerCallback * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeThreadSuspended )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeThreadSuspended )( ICorProfilerCallback * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *RuntimeThreadResumed )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeThreadResumed )( ICorProfilerCallback * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *MovedReferences )( + + HRESULT ( STDMETHODCALLTYPE *MovedReferences )( ICorProfilerCallback * This, /* [in] */ ULONG cMovedObjectIDRanges, /* [size_is][in] */ ObjectID oldObjectIDRangeStart[ ], /* [size_is][in] */ ObjectID newObjectIDRangeStart[ ], /* [size_is][in] */ ULONG cObjectIDRangeLength[ ]); - - HRESULT ( STDMETHODCALLTYPE *ObjectAllocated )( + + HRESULT ( STDMETHODCALLTYPE *ObjectAllocated )( ICorProfilerCallback * This, /* [in] */ ObjectID objectId, /* [in] */ ClassID classId); - - HRESULT ( STDMETHODCALLTYPE *ObjectsAllocatedByClass )( + + HRESULT ( STDMETHODCALLTYPE *ObjectsAllocatedByClass )( ICorProfilerCallback * This, /* [in] */ ULONG cClassCount, /* [size_is][in] */ ClassID classIds[ ], /* [size_is][in] */ ULONG cObjects[ ]); - - HRESULT ( STDMETHODCALLTYPE *ObjectReferences )( + + HRESULT ( STDMETHODCALLTYPE *ObjectReferences )( ICorProfilerCallback * This, /* [in] */ ObjectID objectId, /* [in] */ ClassID classId, /* [in] */ ULONG cObjectRefs, /* [size_is][in] */ ObjectID objectRefIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *RootReferences )( + + HRESULT ( STDMETHODCALLTYPE *RootReferences )( ICorProfilerCallback * This, /* [in] */ ULONG cRootRefs, /* [size_is][in] */ ObjectID rootRefIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *ExceptionThrown )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionThrown )( ICorProfilerCallback * This, /* [in] */ ObjectID thrownObjectId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionEnter )( ICorProfilerCallback * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionLeave )( ICorProfilerCallback * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterEnter )( ICorProfilerCallback * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterLeave )( ICorProfilerCallback * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchCatcherFound )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchCatcherFound )( ICorProfilerCallback * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerEnter )( ICorProfilerCallback * This, /* [in] */ UINT_PTR __unused); - - HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerLeave )( ICorProfilerCallback * This, /* [in] */ UINT_PTR __unused); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionEnter )( ICorProfilerCallback * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionLeave )( ICorProfilerCallback * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyEnter )( ICorProfilerCallback * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyLeave )( ICorProfilerCallback * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherEnter )( ICorProfilerCallback * This, /* [in] */ FunctionID functionId, /* [in] */ ObjectID objectId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherLeave )( ICorProfilerCallback * This); - - HRESULT ( STDMETHODCALLTYPE *COMClassicVTableCreated )( + + HRESULT ( STDMETHODCALLTYPE *COMClassicVTableCreated )( ICorProfilerCallback * This, /* [in] */ ClassID wrappedClassId, /* [in] */ REFGUID implementedIID, /* [in] */ void *pVTable, /* [in] */ ULONG cSlots); - - HRESULT ( STDMETHODCALLTYPE *COMClassicVTableDestroyed )( + + HRESULT ( STDMETHODCALLTYPE *COMClassicVTableDestroyed )( ICorProfilerCallback * This, /* [in] */ ClassID wrappedClassId, /* [in] */ REFGUID implementedIID, /* [in] */ void *pVTable); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherFound )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherFound )( ICorProfilerCallback * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherExecute )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherExecute )( ICorProfilerCallback * This); - + END_INTERFACE } ICorProfilerCallbackVtbl; @@ -1259,227 +1278,227 @@ EXTERN_C const IID IID_ICorProfilerCallback; CONST_VTBL struct ICorProfilerCallbackVtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ICorProfilerCallback_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ICorProfilerCallback_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ICorProfilerCallback_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ICorProfilerCallback_Initialize(This,pICorProfilerInfoUnk) \ - ( (This)->lpVtbl -> Initialize(This,pICorProfilerInfoUnk) ) + ( (This)->lpVtbl -> Initialize(This,pICorProfilerInfoUnk) ) #define ICorProfilerCallback_Shutdown(This) \ - ( (This)->lpVtbl -> Shutdown(This) ) + ( (This)->lpVtbl -> Shutdown(This) ) #define ICorProfilerCallback_AppDomainCreationStarted(This,appDomainId) \ - ( (This)->lpVtbl -> AppDomainCreationStarted(This,appDomainId) ) + ( (This)->lpVtbl -> AppDomainCreationStarted(This,appDomainId) ) #define ICorProfilerCallback_AppDomainCreationFinished(This,appDomainId,hrStatus) \ - ( (This)->lpVtbl -> AppDomainCreationFinished(This,appDomainId,hrStatus) ) + ( (This)->lpVtbl -> AppDomainCreationFinished(This,appDomainId,hrStatus) ) #define ICorProfilerCallback_AppDomainShutdownStarted(This,appDomainId) \ - ( (This)->lpVtbl -> AppDomainShutdownStarted(This,appDomainId) ) + ( (This)->lpVtbl -> AppDomainShutdownStarted(This,appDomainId) ) #define ICorProfilerCallback_AppDomainShutdownFinished(This,appDomainId,hrStatus) \ - ( (This)->lpVtbl -> AppDomainShutdownFinished(This,appDomainId,hrStatus) ) + ( (This)->lpVtbl -> AppDomainShutdownFinished(This,appDomainId,hrStatus) ) #define ICorProfilerCallback_AssemblyLoadStarted(This,assemblyId) \ - ( (This)->lpVtbl -> AssemblyLoadStarted(This,assemblyId) ) + ( (This)->lpVtbl -> AssemblyLoadStarted(This,assemblyId) ) #define ICorProfilerCallback_AssemblyLoadFinished(This,assemblyId,hrStatus) \ - ( (This)->lpVtbl -> AssemblyLoadFinished(This,assemblyId,hrStatus) ) + ( (This)->lpVtbl -> AssemblyLoadFinished(This,assemblyId,hrStatus) ) #define ICorProfilerCallback_AssemblyUnloadStarted(This,assemblyId) \ - ( (This)->lpVtbl -> AssemblyUnloadStarted(This,assemblyId) ) + ( (This)->lpVtbl -> AssemblyUnloadStarted(This,assemblyId) ) #define ICorProfilerCallback_AssemblyUnloadFinished(This,assemblyId,hrStatus) \ - ( (This)->lpVtbl -> AssemblyUnloadFinished(This,assemblyId,hrStatus) ) + ( (This)->lpVtbl -> AssemblyUnloadFinished(This,assemblyId,hrStatus) ) #define ICorProfilerCallback_ModuleLoadStarted(This,moduleId) \ - ( (This)->lpVtbl -> ModuleLoadStarted(This,moduleId) ) + ( (This)->lpVtbl -> ModuleLoadStarted(This,moduleId) ) #define ICorProfilerCallback_ModuleLoadFinished(This,moduleId,hrStatus) \ - ( (This)->lpVtbl -> ModuleLoadFinished(This,moduleId,hrStatus) ) + ( (This)->lpVtbl -> ModuleLoadFinished(This,moduleId,hrStatus) ) #define ICorProfilerCallback_ModuleUnloadStarted(This,moduleId) \ - ( (This)->lpVtbl -> ModuleUnloadStarted(This,moduleId) ) + ( (This)->lpVtbl -> ModuleUnloadStarted(This,moduleId) ) #define ICorProfilerCallback_ModuleUnloadFinished(This,moduleId,hrStatus) \ - ( (This)->lpVtbl -> ModuleUnloadFinished(This,moduleId,hrStatus) ) + ( (This)->lpVtbl -> ModuleUnloadFinished(This,moduleId,hrStatus) ) #define ICorProfilerCallback_ModuleAttachedToAssembly(This,moduleId,AssemblyId) \ - ( (This)->lpVtbl -> ModuleAttachedToAssembly(This,moduleId,AssemblyId) ) + ( (This)->lpVtbl -> ModuleAttachedToAssembly(This,moduleId,AssemblyId) ) #define ICorProfilerCallback_ClassLoadStarted(This,classId) \ - ( (This)->lpVtbl -> ClassLoadStarted(This,classId) ) + ( (This)->lpVtbl -> ClassLoadStarted(This,classId) ) #define ICorProfilerCallback_ClassLoadFinished(This,classId,hrStatus) \ - ( (This)->lpVtbl -> ClassLoadFinished(This,classId,hrStatus) ) + ( (This)->lpVtbl -> ClassLoadFinished(This,classId,hrStatus) ) #define ICorProfilerCallback_ClassUnloadStarted(This,classId) \ - ( (This)->lpVtbl -> ClassUnloadStarted(This,classId) ) + ( (This)->lpVtbl -> ClassUnloadStarted(This,classId) ) #define ICorProfilerCallback_ClassUnloadFinished(This,classId,hrStatus) \ - ( (This)->lpVtbl -> ClassUnloadFinished(This,classId,hrStatus) ) + ( (This)->lpVtbl -> ClassUnloadFinished(This,classId,hrStatus) ) #define ICorProfilerCallback_FunctionUnloadStarted(This,functionId) \ - ( (This)->lpVtbl -> FunctionUnloadStarted(This,functionId) ) + ( (This)->lpVtbl -> FunctionUnloadStarted(This,functionId) ) #define ICorProfilerCallback_JITCompilationStarted(This,functionId,fIsSafeToBlock) \ - ( (This)->lpVtbl -> JITCompilationStarted(This,functionId,fIsSafeToBlock) ) + ( (This)->lpVtbl -> JITCompilationStarted(This,functionId,fIsSafeToBlock) ) #define ICorProfilerCallback_JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \ - ( (This)->lpVtbl -> JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) ) + ( (This)->lpVtbl -> JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) ) #define ICorProfilerCallback_JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) \ - ( (This)->lpVtbl -> JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) ) + ( (This)->lpVtbl -> JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) ) #define ICorProfilerCallback_JITCachedFunctionSearchFinished(This,functionId,result) \ - ( (This)->lpVtbl -> JITCachedFunctionSearchFinished(This,functionId,result) ) + ( (This)->lpVtbl -> JITCachedFunctionSearchFinished(This,functionId,result) ) #define ICorProfilerCallback_JITFunctionPitched(This,functionId) \ - ( (This)->lpVtbl -> JITFunctionPitched(This,functionId) ) + ( (This)->lpVtbl -> JITFunctionPitched(This,functionId) ) #define ICorProfilerCallback_JITInlining(This,callerId,calleeId,pfShouldInline) \ - ( (This)->lpVtbl -> JITInlining(This,callerId,calleeId,pfShouldInline) ) + ( (This)->lpVtbl -> JITInlining(This,callerId,calleeId,pfShouldInline) ) #define ICorProfilerCallback_ThreadCreated(This,threadId) \ - ( (This)->lpVtbl -> ThreadCreated(This,threadId) ) + ( (This)->lpVtbl -> ThreadCreated(This,threadId) ) #define ICorProfilerCallback_ThreadDestroyed(This,threadId) \ - ( (This)->lpVtbl -> ThreadDestroyed(This,threadId) ) + ( (This)->lpVtbl -> ThreadDestroyed(This,threadId) ) #define ICorProfilerCallback_ThreadAssignedToOSThread(This,managedThreadId,osThreadId) \ - ( (This)->lpVtbl -> ThreadAssignedToOSThread(This,managedThreadId,osThreadId) ) + ( (This)->lpVtbl -> ThreadAssignedToOSThread(This,managedThreadId,osThreadId) ) #define ICorProfilerCallback_RemotingClientInvocationStarted(This) \ - ( (This)->lpVtbl -> RemotingClientInvocationStarted(This) ) + ( (This)->lpVtbl -> RemotingClientInvocationStarted(This) ) #define ICorProfilerCallback_RemotingClientSendingMessage(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingClientSendingMessage(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingClientSendingMessage(This,pCookie,fIsAsync) ) #define ICorProfilerCallback_RemotingClientReceivingReply(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingClientReceivingReply(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingClientReceivingReply(This,pCookie,fIsAsync) ) #define ICorProfilerCallback_RemotingClientInvocationFinished(This) \ - ( (This)->lpVtbl -> RemotingClientInvocationFinished(This) ) + ( (This)->lpVtbl -> RemotingClientInvocationFinished(This) ) #define ICorProfilerCallback_RemotingServerReceivingMessage(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingServerReceivingMessage(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingServerReceivingMessage(This,pCookie,fIsAsync) ) #define ICorProfilerCallback_RemotingServerInvocationStarted(This) \ - ( (This)->lpVtbl -> RemotingServerInvocationStarted(This) ) + ( (This)->lpVtbl -> RemotingServerInvocationStarted(This) ) #define ICorProfilerCallback_RemotingServerInvocationReturned(This) \ - ( (This)->lpVtbl -> RemotingServerInvocationReturned(This) ) + ( (This)->lpVtbl -> RemotingServerInvocationReturned(This) ) #define ICorProfilerCallback_RemotingServerSendingReply(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingServerSendingReply(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingServerSendingReply(This,pCookie,fIsAsync) ) #define ICorProfilerCallback_UnmanagedToManagedTransition(This,functionId,reason) \ - ( (This)->lpVtbl -> UnmanagedToManagedTransition(This,functionId,reason) ) + ( (This)->lpVtbl -> UnmanagedToManagedTransition(This,functionId,reason) ) #define ICorProfilerCallback_ManagedToUnmanagedTransition(This,functionId,reason) \ - ( (This)->lpVtbl -> ManagedToUnmanagedTransition(This,functionId,reason) ) + ( (This)->lpVtbl -> ManagedToUnmanagedTransition(This,functionId,reason) ) #define ICorProfilerCallback_RuntimeSuspendStarted(This,suspendReason) \ - ( (This)->lpVtbl -> RuntimeSuspendStarted(This,suspendReason) ) + ( (This)->lpVtbl -> RuntimeSuspendStarted(This,suspendReason) ) #define ICorProfilerCallback_RuntimeSuspendFinished(This) \ - ( (This)->lpVtbl -> RuntimeSuspendFinished(This) ) + ( (This)->lpVtbl -> RuntimeSuspendFinished(This) ) #define ICorProfilerCallback_RuntimeSuspendAborted(This) \ - ( (This)->lpVtbl -> RuntimeSuspendAborted(This) ) + ( (This)->lpVtbl -> RuntimeSuspendAborted(This) ) #define ICorProfilerCallback_RuntimeResumeStarted(This) \ - ( (This)->lpVtbl -> RuntimeResumeStarted(This) ) + ( (This)->lpVtbl -> RuntimeResumeStarted(This) ) #define ICorProfilerCallback_RuntimeResumeFinished(This) \ - ( (This)->lpVtbl -> RuntimeResumeFinished(This) ) + ( (This)->lpVtbl -> RuntimeResumeFinished(This) ) #define ICorProfilerCallback_RuntimeThreadSuspended(This,threadId) \ - ( (This)->lpVtbl -> RuntimeThreadSuspended(This,threadId) ) + ( (This)->lpVtbl -> RuntimeThreadSuspended(This,threadId) ) #define ICorProfilerCallback_RuntimeThreadResumed(This,threadId) \ - ( (This)->lpVtbl -> RuntimeThreadResumed(This,threadId) ) + ( (This)->lpVtbl -> RuntimeThreadResumed(This,threadId) ) #define ICorProfilerCallback_MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \ - ( (This)->lpVtbl -> MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) ) + ( (This)->lpVtbl -> MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) ) #define ICorProfilerCallback_ObjectAllocated(This,objectId,classId) \ - ( (This)->lpVtbl -> ObjectAllocated(This,objectId,classId) ) + ( (This)->lpVtbl -> ObjectAllocated(This,objectId,classId) ) #define ICorProfilerCallback_ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) \ - ( (This)->lpVtbl -> ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) ) + ( (This)->lpVtbl -> ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) ) #define ICorProfilerCallback_ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) \ - ( (This)->lpVtbl -> ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) ) + ( (This)->lpVtbl -> ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) ) #define ICorProfilerCallback_RootReferences(This,cRootRefs,rootRefIds) \ - ( (This)->lpVtbl -> RootReferences(This,cRootRefs,rootRefIds) ) + ( (This)->lpVtbl -> RootReferences(This,cRootRefs,rootRefIds) ) #define ICorProfilerCallback_ExceptionThrown(This,thrownObjectId) \ - ( (This)->lpVtbl -> ExceptionThrown(This,thrownObjectId) ) + ( (This)->lpVtbl -> ExceptionThrown(This,thrownObjectId) ) #define ICorProfilerCallback_ExceptionSearchFunctionEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionSearchFunctionEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionSearchFunctionEnter(This,functionId) ) #define ICorProfilerCallback_ExceptionSearchFunctionLeave(This) \ - ( (This)->lpVtbl -> ExceptionSearchFunctionLeave(This) ) + ( (This)->lpVtbl -> ExceptionSearchFunctionLeave(This) ) #define ICorProfilerCallback_ExceptionSearchFilterEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionSearchFilterEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionSearchFilterEnter(This,functionId) ) #define ICorProfilerCallback_ExceptionSearchFilterLeave(This) \ - ( (This)->lpVtbl -> ExceptionSearchFilterLeave(This) ) + ( (This)->lpVtbl -> ExceptionSearchFilterLeave(This) ) #define ICorProfilerCallback_ExceptionSearchCatcherFound(This,functionId) \ - ( (This)->lpVtbl -> ExceptionSearchCatcherFound(This,functionId) ) + ( (This)->lpVtbl -> ExceptionSearchCatcherFound(This,functionId) ) #define ICorProfilerCallback_ExceptionOSHandlerEnter(This,__unused) \ - ( (This)->lpVtbl -> ExceptionOSHandlerEnter(This,__unused) ) + ( (This)->lpVtbl -> ExceptionOSHandlerEnter(This,__unused) ) #define ICorProfilerCallback_ExceptionOSHandlerLeave(This,__unused) \ - ( (This)->lpVtbl -> ExceptionOSHandlerLeave(This,__unused) ) + ( (This)->lpVtbl -> ExceptionOSHandlerLeave(This,__unused) ) #define ICorProfilerCallback_ExceptionUnwindFunctionEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionUnwindFunctionEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionUnwindFunctionEnter(This,functionId) ) #define ICorProfilerCallback_ExceptionUnwindFunctionLeave(This) \ - ( (This)->lpVtbl -> ExceptionUnwindFunctionLeave(This) ) + ( (This)->lpVtbl -> ExceptionUnwindFunctionLeave(This) ) #define ICorProfilerCallback_ExceptionUnwindFinallyEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionUnwindFinallyEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionUnwindFinallyEnter(This,functionId) ) #define ICorProfilerCallback_ExceptionUnwindFinallyLeave(This) \ - ( (This)->lpVtbl -> ExceptionUnwindFinallyLeave(This) ) + ( (This)->lpVtbl -> ExceptionUnwindFinallyLeave(This) ) #define ICorProfilerCallback_ExceptionCatcherEnter(This,functionId,objectId) \ - ( (This)->lpVtbl -> ExceptionCatcherEnter(This,functionId,objectId) ) + ( (This)->lpVtbl -> ExceptionCatcherEnter(This,functionId,objectId) ) #define ICorProfilerCallback_ExceptionCatcherLeave(This) \ - ( (This)->lpVtbl -> ExceptionCatcherLeave(This) ) + ( (This)->lpVtbl -> ExceptionCatcherLeave(This) ) #define ICorProfilerCallback_COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) \ - ( (This)->lpVtbl -> COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) ) + ( (This)->lpVtbl -> COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) ) #define ICorProfilerCallback_COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) \ - ( (This)->lpVtbl -> COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) ) + ( (This)->lpVtbl -> COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) ) #define ICorProfilerCallback_ExceptionCLRCatcherFound(This) \ - ( (This)->lpVtbl -> ExceptionCLRCatcherFound(This) ) + ( (This)->lpVtbl -> ExceptionCLRCatcherFound(This) ) #define ICorProfilerCallback_ExceptionCLRCatcherExecute(This) \ - ( (This)->lpVtbl -> ExceptionCLRCatcherExecute(This) ) + ( (This)->lpVtbl -> ExceptionCLRCatcherExecute(This) ) #endif /* COBJMACROS */ @@ -1493,9 +1512,9 @@ EXTERN_C const IID IID_ICorProfilerCallback; /* interface __MIDL_itf_corprof_0000_0001 */ -/* [local] */ +/* [local] */ -typedef /* [public][public] */ +typedef /* [public][public] */ enum __MIDL___MIDL_itf_corprof_0000_0001_0001 { COR_PRF_GC_ROOT_STACK = 1, @@ -1504,7 +1523,7 @@ enum __MIDL___MIDL_itf_corprof_0000_0001_0001 COR_PRF_GC_ROOT_OTHER = 0 } COR_PRF_GC_ROOT_KIND; -typedef /* [public][public] */ +typedef /* [public][public] */ enum __MIDL___MIDL_itf_corprof_0000_0001_0002 { COR_PRF_GC_ROOT_PINNING = 0x1, @@ -1513,13 +1532,13 @@ enum __MIDL___MIDL_itf_corprof_0000_0001_0002 COR_PRF_GC_ROOT_REFCOUNTED = 0x8 } COR_PRF_GC_ROOT_FLAGS; -typedef /* [public] */ +typedef /* [public] */ enum __MIDL___MIDL_itf_corprof_0000_0001_0003 { COR_PRF_FINALIZER_CRITICAL = 0x1 } COR_PRF_FINALIZER_FLAGS; -typedef /* [public][public][public][public] */ +typedef /* [public][public][public][public] */ enum __MIDL___MIDL_itf_corprof_0000_0001_0004 { COR_PRF_GC_GEN_0 = 0, @@ -1537,7 +1556,7 @@ typedef struct COR_PRF_GC_GENERATION_RANGE UINT_PTR rangeLengthReserved; } COR_PRF_GC_GENERATION_RANGE; -typedef /* [public][public][public] */ +typedef /* [public][public][public] */ enum __MIDL___MIDL_itf_corprof_0000_0001_0005 { COR_PRF_CLAUSE_NONE = 0, @@ -1554,14 +1573,14 @@ typedef struct COR_PRF_EX_CLAUSE_INFO UINT_PTR shadowStackPointer; } COR_PRF_EX_CLAUSE_INFO; -typedef /* [public][public] */ +typedef /* [public][public] */ enum __MIDL___MIDL_itf_corprof_0000_0001_0006 { COR_PRF_GC_INDUCED = 1, COR_PRF_GC_OTHER = 0 } COR_PRF_GC_REASON; -typedef /* [public] */ +typedef /* [public] */ enum __MIDL___MIDL_itf_corprof_0000_0001_0007 { COR_PRF_MODULE_DISK = 0x1, @@ -1582,417 +1601,417 @@ extern RPC_IF_HANDLE __MIDL_itf_corprof_0000_0001_v0_0_s_ifspec; #define __ICorProfilerCallback2_INTERFACE_DEFINED__ /* interface ICorProfilerCallback2 */ -/* [local][unique][uuid][object] */ +/* [local][unique][uuid][object] */ EXTERN_C const IID IID_ICorProfilerCallback2; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("8A8CC829-CCF2-49fe-BBAE-0F022228071A") ICorProfilerCallback2 : public ICorProfilerCallback { public: - virtual HRESULT STDMETHODCALLTYPE ThreadNameChanged( + virtual HRESULT STDMETHODCALLTYPE ThreadNameChanged( /* [in] */ ThreadID threadId, /* [in] */ ULONG cchName, - /* [annotation][in] */ + /* [annotation][in] */ _In_reads_opt_(cchName) WCHAR name[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GarbageCollectionStarted( + + virtual HRESULT STDMETHODCALLTYPE GarbageCollectionStarted( /* [in] */ int cGenerations, /* [size_is][in] */ BOOL generationCollected[ ], /* [in] */ COR_PRF_GC_REASON reason) = 0; - - virtual HRESULT STDMETHODCALLTYPE SurvivingReferences( + + virtual HRESULT STDMETHODCALLTYPE SurvivingReferences( /* [in] */ ULONG cSurvivingObjectIDRanges, /* [size_is][in] */ ObjectID objectIDRangeStart[ ], /* [size_is][in] */ ULONG cObjectIDRangeLength[ ]) = 0; - + virtual HRESULT STDMETHODCALLTYPE GarbageCollectionFinished( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE FinalizeableObjectQueued( + + virtual HRESULT STDMETHODCALLTYPE FinalizeableObjectQueued( /* [in] */ DWORD finalizerFlags, /* [in] */ ObjectID objectID) = 0; - - virtual HRESULT STDMETHODCALLTYPE RootReferences2( + + virtual HRESULT STDMETHODCALLTYPE RootReferences2( /* [in] */ ULONG cRootRefs, /* [size_is][in] */ ObjectID rootRefIds[ ], /* [size_is][in] */ COR_PRF_GC_ROOT_KIND rootKinds[ ], /* [size_is][in] */ COR_PRF_GC_ROOT_FLAGS rootFlags[ ], /* [size_is][in] */ UINT_PTR rootIds[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE HandleCreated( + + virtual HRESULT STDMETHODCALLTYPE HandleCreated( /* [in] */ GCHandleID handleId, /* [in] */ ObjectID initialObjectId) = 0; - - virtual HRESULT STDMETHODCALLTYPE HandleDestroyed( + + virtual HRESULT STDMETHODCALLTYPE HandleDestroyed( /* [in] */ GCHandleID handleId) = 0; - + }; - - + + #else /* C style interface */ typedef struct ICorProfilerCallback2Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorProfilerCallback2 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorProfilerCallback2 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorProfilerCallback2 * This); - - HRESULT ( STDMETHODCALLTYPE *Initialize )( + + HRESULT ( STDMETHODCALLTYPE *Initialize )( ICorProfilerCallback2 * This, /* [in] */ IUnknown *pICorProfilerInfoUnk); - - HRESULT ( STDMETHODCALLTYPE *Shutdown )( + + HRESULT ( STDMETHODCALLTYPE *Shutdown )( ICorProfilerCallback2 * This); - - HRESULT ( STDMETHODCALLTYPE *AppDomainCreationStarted )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainCreationStarted )( ICorProfilerCallback2 * This, /* [in] */ AppDomainID appDomainId); - - HRESULT ( STDMETHODCALLTYPE *AppDomainCreationFinished )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainCreationFinished )( ICorProfilerCallback2 * This, /* [in] */ AppDomainID appDomainId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownStarted )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownStarted )( ICorProfilerCallback2 * This, /* [in] */ AppDomainID appDomainId); - - HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownFinished )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownFinished )( ICorProfilerCallback2 * This, /* [in] */ AppDomainID appDomainId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *AssemblyLoadStarted )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyLoadStarted )( ICorProfilerCallback2 * This, /* [in] */ AssemblyID assemblyId); - - HRESULT ( STDMETHODCALLTYPE *AssemblyLoadFinished )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyLoadFinished )( ICorProfilerCallback2 * This, /* [in] */ AssemblyID assemblyId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadStarted )( ICorProfilerCallback2 * This, /* [in] */ AssemblyID assemblyId); - - HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadFinished )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadFinished )( ICorProfilerCallback2 * This, /* [in] */ AssemblyID assemblyId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ModuleLoadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ModuleLoadStarted )( ICorProfilerCallback2 * This, /* [in] */ ModuleID moduleId); - - HRESULT ( STDMETHODCALLTYPE *ModuleLoadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ModuleLoadFinished )( ICorProfilerCallback2 * This, /* [in] */ ModuleID moduleId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ModuleUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ModuleUnloadStarted )( ICorProfilerCallback2 * This, /* [in] */ ModuleID moduleId); - - HRESULT ( STDMETHODCALLTYPE *ModuleUnloadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ModuleUnloadFinished )( ICorProfilerCallback2 * This, /* [in] */ ModuleID moduleId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ModuleAttachedToAssembly )( + + HRESULT ( STDMETHODCALLTYPE *ModuleAttachedToAssembly )( ICorProfilerCallback2 * This, /* [in] */ ModuleID moduleId, /* [in] */ AssemblyID AssemblyId); - - HRESULT ( STDMETHODCALLTYPE *ClassLoadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ClassLoadStarted )( ICorProfilerCallback2 * This, /* [in] */ ClassID classId); - - HRESULT ( STDMETHODCALLTYPE *ClassLoadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ClassLoadFinished )( ICorProfilerCallback2 * This, /* [in] */ ClassID classId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ClassUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ClassUnloadStarted )( ICorProfilerCallback2 * This, /* [in] */ ClassID classId); - - HRESULT ( STDMETHODCALLTYPE *ClassUnloadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ClassUnloadFinished )( ICorProfilerCallback2 * This, /* [in] */ ClassID classId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *FunctionUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *FunctionUnloadStarted )( ICorProfilerCallback2 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *JITCompilationStarted )( + + HRESULT ( STDMETHODCALLTYPE *JITCompilationStarted )( ICorProfilerCallback2 * This, /* [in] */ FunctionID functionId, /* [in] */ BOOL fIsSafeToBlock); - - HRESULT ( STDMETHODCALLTYPE *JITCompilationFinished )( + + HRESULT ( STDMETHODCALLTYPE *JITCompilationFinished )( ICorProfilerCallback2 * This, /* [in] */ FunctionID functionId, /* [in] */ HRESULT hrStatus, /* [in] */ BOOL fIsSafeToBlock); - - HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchStarted )( + + HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchStarted )( ICorProfilerCallback2 * This, /* [in] */ FunctionID functionId, /* [out] */ BOOL *pbUseCachedFunction); - - HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchFinished )( + + HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchFinished )( ICorProfilerCallback2 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_JIT_CACHE result); - - HRESULT ( STDMETHODCALLTYPE *JITFunctionPitched )( + + HRESULT ( STDMETHODCALLTYPE *JITFunctionPitched )( ICorProfilerCallback2 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *JITInlining )( + + HRESULT ( STDMETHODCALLTYPE *JITInlining )( ICorProfilerCallback2 * This, /* [in] */ FunctionID callerId, /* [in] */ FunctionID calleeId, /* [out] */ BOOL *pfShouldInline); - - HRESULT ( STDMETHODCALLTYPE *ThreadCreated )( + + HRESULT ( STDMETHODCALLTYPE *ThreadCreated )( ICorProfilerCallback2 * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *ThreadDestroyed )( + + HRESULT ( STDMETHODCALLTYPE *ThreadDestroyed )( ICorProfilerCallback2 * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *ThreadAssignedToOSThread )( + + HRESULT ( STDMETHODCALLTYPE *ThreadAssignedToOSThread )( ICorProfilerCallback2 * This, /* [in] */ ThreadID managedThreadId, /* [in] */ DWORD osThreadId); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationStarted )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationStarted )( ICorProfilerCallback2 * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientSendingMessage )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientSendingMessage )( ICorProfilerCallback2 * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientReceivingReply )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientReceivingReply )( ICorProfilerCallback2 * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationFinished )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationFinished )( ICorProfilerCallback2 * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerReceivingMessage )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerReceivingMessage )( ICorProfilerCallback2 * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationStarted )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationStarted )( ICorProfilerCallback2 * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationReturned )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationReturned )( ICorProfilerCallback2 * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerSendingReply )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerSendingReply )( ICorProfilerCallback2 * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *UnmanagedToManagedTransition )( + + HRESULT ( STDMETHODCALLTYPE *UnmanagedToManagedTransition )( ICorProfilerCallback2 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_TRANSITION_REASON reason); - - HRESULT ( STDMETHODCALLTYPE *ManagedToUnmanagedTransition )( + + HRESULT ( STDMETHODCALLTYPE *ManagedToUnmanagedTransition )( ICorProfilerCallback2 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_TRANSITION_REASON reason); - - HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendStarted )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendStarted )( ICorProfilerCallback2 * This, /* [in] */ COR_PRF_SUSPEND_REASON suspendReason); - - HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendFinished )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendFinished )( ICorProfilerCallback2 * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendAborted )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendAborted )( ICorProfilerCallback2 * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeResumeStarted )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeResumeStarted )( ICorProfilerCallback2 * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeResumeFinished )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeResumeFinished )( ICorProfilerCallback2 * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeThreadSuspended )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeThreadSuspended )( ICorProfilerCallback2 * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *RuntimeThreadResumed )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeThreadResumed )( ICorProfilerCallback2 * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *MovedReferences )( + + HRESULT ( STDMETHODCALLTYPE *MovedReferences )( ICorProfilerCallback2 * This, /* [in] */ ULONG cMovedObjectIDRanges, /* [size_is][in] */ ObjectID oldObjectIDRangeStart[ ], /* [size_is][in] */ ObjectID newObjectIDRangeStart[ ], /* [size_is][in] */ ULONG cObjectIDRangeLength[ ]); - - HRESULT ( STDMETHODCALLTYPE *ObjectAllocated )( + + HRESULT ( STDMETHODCALLTYPE *ObjectAllocated )( ICorProfilerCallback2 * This, /* [in] */ ObjectID objectId, /* [in] */ ClassID classId); - - HRESULT ( STDMETHODCALLTYPE *ObjectsAllocatedByClass )( + + HRESULT ( STDMETHODCALLTYPE *ObjectsAllocatedByClass )( ICorProfilerCallback2 * This, /* [in] */ ULONG cClassCount, /* [size_is][in] */ ClassID classIds[ ], /* [size_is][in] */ ULONG cObjects[ ]); - - HRESULT ( STDMETHODCALLTYPE *ObjectReferences )( + + HRESULT ( STDMETHODCALLTYPE *ObjectReferences )( ICorProfilerCallback2 * This, /* [in] */ ObjectID objectId, /* [in] */ ClassID classId, /* [in] */ ULONG cObjectRefs, /* [size_is][in] */ ObjectID objectRefIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *RootReferences )( + + HRESULT ( STDMETHODCALLTYPE *RootReferences )( ICorProfilerCallback2 * This, /* [in] */ ULONG cRootRefs, /* [size_is][in] */ ObjectID rootRefIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *ExceptionThrown )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionThrown )( ICorProfilerCallback2 * This, /* [in] */ ObjectID thrownObjectId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionEnter )( ICorProfilerCallback2 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionLeave )( ICorProfilerCallback2 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterEnter )( ICorProfilerCallback2 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterLeave )( ICorProfilerCallback2 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchCatcherFound )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchCatcherFound )( ICorProfilerCallback2 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerEnter )( ICorProfilerCallback2 * This, /* [in] */ UINT_PTR __unused); - - HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerLeave )( ICorProfilerCallback2 * This, /* [in] */ UINT_PTR __unused); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionEnter )( ICorProfilerCallback2 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionLeave )( ICorProfilerCallback2 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyEnter )( ICorProfilerCallback2 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyLeave )( ICorProfilerCallback2 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherEnter )( ICorProfilerCallback2 * This, /* [in] */ FunctionID functionId, /* [in] */ ObjectID objectId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherLeave )( ICorProfilerCallback2 * This); - - HRESULT ( STDMETHODCALLTYPE *COMClassicVTableCreated )( + + HRESULT ( STDMETHODCALLTYPE *COMClassicVTableCreated )( ICorProfilerCallback2 * This, /* [in] */ ClassID wrappedClassId, /* [in] */ REFGUID implementedIID, /* [in] */ void *pVTable, /* [in] */ ULONG cSlots); - - HRESULT ( STDMETHODCALLTYPE *COMClassicVTableDestroyed )( + + HRESULT ( STDMETHODCALLTYPE *COMClassicVTableDestroyed )( ICorProfilerCallback2 * This, /* [in] */ ClassID wrappedClassId, /* [in] */ REFGUID implementedIID, /* [in] */ void *pVTable); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherFound )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherFound )( ICorProfilerCallback2 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherExecute )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherExecute )( ICorProfilerCallback2 * This); - - HRESULT ( STDMETHODCALLTYPE *ThreadNameChanged )( + + HRESULT ( STDMETHODCALLTYPE *ThreadNameChanged )( ICorProfilerCallback2 * This, /* [in] */ ThreadID threadId, /* [in] */ ULONG cchName, - /* [annotation][in] */ + /* [annotation][in] */ _In_reads_opt_(cchName) WCHAR name[ ]); - - HRESULT ( STDMETHODCALLTYPE *GarbageCollectionStarted )( + + HRESULT ( STDMETHODCALLTYPE *GarbageCollectionStarted )( ICorProfilerCallback2 * This, /* [in] */ int cGenerations, /* [size_is][in] */ BOOL generationCollected[ ], /* [in] */ COR_PRF_GC_REASON reason); - - HRESULT ( STDMETHODCALLTYPE *SurvivingReferences )( + + HRESULT ( STDMETHODCALLTYPE *SurvivingReferences )( ICorProfilerCallback2 * This, /* [in] */ ULONG cSurvivingObjectIDRanges, /* [size_is][in] */ ObjectID objectIDRangeStart[ ], /* [size_is][in] */ ULONG cObjectIDRangeLength[ ]); - - HRESULT ( STDMETHODCALLTYPE *GarbageCollectionFinished )( + + HRESULT ( STDMETHODCALLTYPE *GarbageCollectionFinished )( ICorProfilerCallback2 * This); - - HRESULT ( STDMETHODCALLTYPE *FinalizeableObjectQueued )( + + HRESULT ( STDMETHODCALLTYPE *FinalizeableObjectQueued )( ICorProfilerCallback2 * This, /* [in] */ DWORD finalizerFlags, /* [in] */ ObjectID objectID); - - HRESULT ( STDMETHODCALLTYPE *RootReferences2 )( + + HRESULT ( STDMETHODCALLTYPE *RootReferences2 )( ICorProfilerCallback2 * This, /* [in] */ ULONG cRootRefs, /* [size_is][in] */ ObjectID rootRefIds[ ], /* [size_is][in] */ COR_PRF_GC_ROOT_KIND rootKinds[ ], /* [size_is][in] */ COR_PRF_GC_ROOT_FLAGS rootFlags[ ], /* [size_is][in] */ UINT_PTR rootIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *HandleCreated )( + + HRESULT ( STDMETHODCALLTYPE *HandleCreated )( ICorProfilerCallback2 * This, /* [in] */ GCHandleID handleId, /* [in] */ ObjectID initialObjectId); - - HRESULT ( STDMETHODCALLTYPE *HandleDestroyed )( + + HRESULT ( STDMETHODCALLTYPE *HandleDestroyed )( ICorProfilerCallback2 * This, /* [in] */ GCHandleID handleId); - + END_INTERFACE } ICorProfilerCallback2Vtbl; @@ -2001,252 +2020,252 @@ EXTERN_C const IID IID_ICorProfilerCallback2; CONST_VTBL struct ICorProfilerCallback2Vtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ICorProfilerCallback2_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ICorProfilerCallback2_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ICorProfilerCallback2_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ICorProfilerCallback2_Initialize(This,pICorProfilerInfoUnk) \ - ( (This)->lpVtbl -> Initialize(This,pICorProfilerInfoUnk) ) + ( (This)->lpVtbl -> Initialize(This,pICorProfilerInfoUnk) ) #define ICorProfilerCallback2_Shutdown(This) \ - ( (This)->lpVtbl -> Shutdown(This) ) + ( (This)->lpVtbl -> Shutdown(This) ) #define ICorProfilerCallback2_AppDomainCreationStarted(This,appDomainId) \ - ( (This)->lpVtbl -> AppDomainCreationStarted(This,appDomainId) ) + ( (This)->lpVtbl -> AppDomainCreationStarted(This,appDomainId) ) #define ICorProfilerCallback2_AppDomainCreationFinished(This,appDomainId,hrStatus) \ - ( (This)->lpVtbl -> AppDomainCreationFinished(This,appDomainId,hrStatus) ) + ( (This)->lpVtbl -> AppDomainCreationFinished(This,appDomainId,hrStatus) ) #define ICorProfilerCallback2_AppDomainShutdownStarted(This,appDomainId) \ - ( (This)->lpVtbl -> AppDomainShutdownStarted(This,appDomainId) ) + ( (This)->lpVtbl -> AppDomainShutdownStarted(This,appDomainId) ) #define ICorProfilerCallback2_AppDomainShutdownFinished(This,appDomainId,hrStatus) \ - ( (This)->lpVtbl -> AppDomainShutdownFinished(This,appDomainId,hrStatus) ) + ( (This)->lpVtbl -> AppDomainShutdownFinished(This,appDomainId,hrStatus) ) #define ICorProfilerCallback2_AssemblyLoadStarted(This,assemblyId) \ - ( (This)->lpVtbl -> AssemblyLoadStarted(This,assemblyId) ) + ( (This)->lpVtbl -> AssemblyLoadStarted(This,assemblyId) ) #define ICorProfilerCallback2_AssemblyLoadFinished(This,assemblyId,hrStatus) \ - ( (This)->lpVtbl -> AssemblyLoadFinished(This,assemblyId,hrStatus) ) + ( (This)->lpVtbl -> AssemblyLoadFinished(This,assemblyId,hrStatus) ) #define ICorProfilerCallback2_AssemblyUnloadStarted(This,assemblyId) \ - ( (This)->lpVtbl -> AssemblyUnloadStarted(This,assemblyId) ) + ( (This)->lpVtbl -> AssemblyUnloadStarted(This,assemblyId) ) #define ICorProfilerCallback2_AssemblyUnloadFinished(This,assemblyId,hrStatus) \ - ( (This)->lpVtbl -> AssemblyUnloadFinished(This,assemblyId,hrStatus) ) + ( (This)->lpVtbl -> AssemblyUnloadFinished(This,assemblyId,hrStatus) ) #define ICorProfilerCallback2_ModuleLoadStarted(This,moduleId) \ - ( (This)->lpVtbl -> ModuleLoadStarted(This,moduleId) ) + ( (This)->lpVtbl -> ModuleLoadStarted(This,moduleId) ) #define ICorProfilerCallback2_ModuleLoadFinished(This,moduleId,hrStatus) \ - ( (This)->lpVtbl -> ModuleLoadFinished(This,moduleId,hrStatus) ) + ( (This)->lpVtbl -> ModuleLoadFinished(This,moduleId,hrStatus) ) #define ICorProfilerCallback2_ModuleUnloadStarted(This,moduleId) \ - ( (This)->lpVtbl -> ModuleUnloadStarted(This,moduleId) ) + ( (This)->lpVtbl -> ModuleUnloadStarted(This,moduleId) ) #define ICorProfilerCallback2_ModuleUnloadFinished(This,moduleId,hrStatus) \ - ( (This)->lpVtbl -> ModuleUnloadFinished(This,moduleId,hrStatus) ) + ( (This)->lpVtbl -> ModuleUnloadFinished(This,moduleId,hrStatus) ) #define ICorProfilerCallback2_ModuleAttachedToAssembly(This,moduleId,AssemblyId) \ - ( (This)->lpVtbl -> ModuleAttachedToAssembly(This,moduleId,AssemblyId) ) + ( (This)->lpVtbl -> ModuleAttachedToAssembly(This,moduleId,AssemblyId) ) #define ICorProfilerCallback2_ClassLoadStarted(This,classId) \ - ( (This)->lpVtbl -> ClassLoadStarted(This,classId) ) + ( (This)->lpVtbl -> ClassLoadStarted(This,classId) ) #define ICorProfilerCallback2_ClassLoadFinished(This,classId,hrStatus) \ - ( (This)->lpVtbl -> ClassLoadFinished(This,classId,hrStatus) ) + ( (This)->lpVtbl -> ClassLoadFinished(This,classId,hrStatus) ) #define ICorProfilerCallback2_ClassUnloadStarted(This,classId) \ - ( (This)->lpVtbl -> ClassUnloadStarted(This,classId) ) + ( (This)->lpVtbl -> ClassUnloadStarted(This,classId) ) #define ICorProfilerCallback2_ClassUnloadFinished(This,classId,hrStatus) \ - ( (This)->lpVtbl -> ClassUnloadFinished(This,classId,hrStatus) ) + ( (This)->lpVtbl -> ClassUnloadFinished(This,classId,hrStatus) ) #define ICorProfilerCallback2_FunctionUnloadStarted(This,functionId) \ - ( (This)->lpVtbl -> FunctionUnloadStarted(This,functionId) ) + ( (This)->lpVtbl -> FunctionUnloadStarted(This,functionId) ) #define ICorProfilerCallback2_JITCompilationStarted(This,functionId,fIsSafeToBlock) \ - ( (This)->lpVtbl -> JITCompilationStarted(This,functionId,fIsSafeToBlock) ) + ( (This)->lpVtbl -> JITCompilationStarted(This,functionId,fIsSafeToBlock) ) #define ICorProfilerCallback2_JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \ - ( (This)->lpVtbl -> JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) ) + ( (This)->lpVtbl -> JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) ) #define ICorProfilerCallback2_JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) \ - ( (This)->lpVtbl -> JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) ) + ( (This)->lpVtbl -> JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) ) #define ICorProfilerCallback2_JITCachedFunctionSearchFinished(This,functionId,result) \ - ( (This)->lpVtbl -> JITCachedFunctionSearchFinished(This,functionId,result) ) + ( (This)->lpVtbl -> JITCachedFunctionSearchFinished(This,functionId,result) ) #define ICorProfilerCallback2_JITFunctionPitched(This,functionId) \ - ( (This)->lpVtbl -> JITFunctionPitched(This,functionId) ) + ( (This)->lpVtbl -> JITFunctionPitched(This,functionId) ) #define ICorProfilerCallback2_JITInlining(This,callerId,calleeId,pfShouldInline) \ - ( (This)->lpVtbl -> JITInlining(This,callerId,calleeId,pfShouldInline) ) + ( (This)->lpVtbl -> JITInlining(This,callerId,calleeId,pfShouldInline) ) #define ICorProfilerCallback2_ThreadCreated(This,threadId) \ - ( (This)->lpVtbl -> ThreadCreated(This,threadId) ) + ( (This)->lpVtbl -> ThreadCreated(This,threadId) ) #define ICorProfilerCallback2_ThreadDestroyed(This,threadId) \ - ( (This)->lpVtbl -> ThreadDestroyed(This,threadId) ) + ( (This)->lpVtbl -> ThreadDestroyed(This,threadId) ) #define ICorProfilerCallback2_ThreadAssignedToOSThread(This,managedThreadId,osThreadId) \ - ( (This)->lpVtbl -> ThreadAssignedToOSThread(This,managedThreadId,osThreadId) ) + ( (This)->lpVtbl -> ThreadAssignedToOSThread(This,managedThreadId,osThreadId) ) #define ICorProfilerCallback2_RemotingClientInvocationStarted(This) \ - ( (This)->lpVtbl -> RemotingClientInvocationStarted(This) ) + ( (This)->lpVtbl -> RemotingClientInvocationStarted(This) ) #define ICorProfilerCallback2_RemotingClientSendingMessage(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingClientSendingMessage(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingClientSendingMessage(This,pCookie,fIsAsync) ) #define ICorProfilerCallback2_RemotingClientReceivingReply(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingClientReceivingReply(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingClientReceivingReply(This,pCookie,fIsAsync) ) #define ICorProfilerCallback2_RemotingClientInvocationFinished(This) \ - ( (This)->lpVtbl -> RemotingClientInvocationFinished(This) ) + ( (This)->lpVtbl -> RemotingClientInvocationFinished(This) ) #define ICorProfilerCallback2_RemotingServerReceivingMessage(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingServerReceivingMessage(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingServerReceivingMessage(This,pCookie,fIsAsync) ) #define ICorProfilerCallback2_RemotingServerInvocationStarted(This) \ - ( (This)->lpVtbl -> RemotingServerInvocationStarted(This) ) + ( (This)->lpVtbl -> RemotingServerInvocationStarted(This) ) #define ICorProfilerCallback2_RemotingServerInvocationReturned(This) \ - ( (This)->lpVtbl -> RemotingServerInvocationReturned(This) ) + ( (This)->lpVtbl -> RemotingServerInvocationReturned(This) ) #define ICorProfilerCallback2_RemotingServerSendingReply(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingServerSendingReply(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingServerSendingReply(This,pCookie,fIsAsync) ) #define ICorProfilerCallback2_UnmanagedToManagedTransition(This,functionId,reason) \ - ( (This)->lpVtbl -> UnmanagedToManagedTransition(This,functionId,reason) ) + ( (This)->lpVtbl -> UnmanagedToManagedTransition(This,functionId,reason) ) #define ICorProfilerCallback2_ManagedToUnmanagedTransition(This,functionId,reason) \ - ( (This)->lpVtbl -> ManagedToUnmanagedTransition(This,functionId,reason) ) + ( (This)->lpVtbl -> ManagedToUnmanagedTransition(This,functionId,reason) ) #define ICorProfilerCallback2_RuntimeSuspendStarted(This,suspendReason) \ - ( (This)->lpVtbl -> RuntimeSuspendStarted(This,suspendReason) ) + ( (This)->lpVtbl -> RuntimeSuspendStarted(This,suspendReason) ) #define ICorProfilerCallback2_RuntimeSuspendFinished(This) \ - ( (This)->lpVtbl -> RuntimeSuspendFinished(This) ) + ( (This)->lpVtbl -> RuntimeSuspendFinished(This) ) #define ICorProfilerCallback2_RuntimeSuspendAborted(This) \ - ( (This)->lpVtbl -> RuntimeSuspendAborted(This) ) + ( (This)->lpVtbl -> RuntimeSuspendAborted(This) ) #define ICorProfilerCallback2_RuntimeResumeStarted(This) \ - ( (This)->lpVtbl -> RuntimeResumeStarted(This) ) + ( (This)->lpVtbl -> RuntimeResumeStarted(This) ) #define ICorProfilerCallback2_RuntimeResumeFinished(This) \ - ( (This)->lpVtbl -> RuntimeResumeFinished(This) ) + ( (This)->lpVtbl -> RuntimeResumeFinished(This) ) #define ICorProfilerCallback2_RuntimeThreadSuspended(This,threadId) \ - ( (This)->lpVtbl -> RuntimeThreadSuspended(This,threadId) ) + ( (This)->lpVtbl -> RuntimeThreadSuspended(This,threadId) ) #define ICorProfilerCallback2_RuntimeThreadResumed(This,threadId) \ - ( (This)->lpVtbl -> RuntimeThreadResumed(This,threadId) ) + ( (This)->lpVtbl -> RuntimeThreadResumed(This,threadId) ) #define ICorProfilerCallback2_MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \ - ( (This)->lpVtbl -> MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) ) + ( (This)->lpVtbl -> MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) ) #define ICorProfilerCallback2_ObjectAllocated(This,objectId,classId) \ - ( (This)->lpVtbl -> ObjectAllocated(This,objectId,classId) ) + ( (This)->lpVtbl -> ObjectAllocated(This,objectId,classId) ) #define ICorProfilerCallback2_ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) \ - ( (This)->lpVtbl -> ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) ) + ( (This)->lpVtbl -> ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) ) #define ICorProfilerCallback2_ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) \ - ( (This)->lpVtbl -> ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) ) + ( (This)->lpVtbl -> ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) ) #define ICorProfilerCallback2_RootReferences(This,cRootRefs,rootRefIds) \ - ( (This)->lpVtbl -> RootReferences(This,cRootRefs,rootRefIds) ) + ( (This)->lpVtbl -> RootReferences(This,cRootRefs,rootRefIds) ) #define ICorProfilerCallback2_ExceptionThrown(This,thrownObjectId) \ - ( (This)->lpVtbl -> ExceptionThrown(This,thrownObjectId) ) + ( (This)->lpVtbl -> ExceptionThrown(This,thrownObjectId) ) #define ICorProfilerCallback2_ExceptionSearchFunctionEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionSearchFunctionEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionSearchFunctionEnter(This,functionId) ) #define ICorProfilerCallback2_ExceptionSearchFunctionLeave(This) \ - ( (This)->lpVtbl -> ExceptionSearchFunctionLeave(This) ) + ( (This)->lpVtbl -> ExceptionSearchFunctionLeave(This) ) #define ICorProfilerCallback2_ExceptionSearchFilterEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionSearchFilterEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionSearchFilterEnter(This,functionId) ) #define ICorProfilerCallback2_ExceptionSearchFilterLeave(This) \ - ( (This)->lpVtbl -> ExceptionSearchFilterLeave(This) ) + ( (This)->lpVtbl -> ExceptionSearchFilterLeave(This) ) #define ICorProfilerCallback2_ExceptionSearchCatcherFound(This,functionId) \ - ( (This)->lpVtbl -> ExceptionSearchCatcherFound(This,functionId) ) + ( (This)->lpVtbl -> ExceptionSearchCatcherFound(This,functionId) ) #define ICorProfilerCallback2_ExceptionOSHandlerEnter(This,__unused) \ - ( (This)->lpVtbl -> ExceptionOSHandlerEnter(This,__unused) ) + ( (This)->lpVtbl -> ExceptionOSHandlerEnter(This,__unused) ) #define ICorProfilerCallback2_ExceptionOSHandlerLeave(This,__unused) \ - ( (This)->lpVtbl -> ExceptionOSHandlerLeave(This,__unused) ) + ( (This)->lpVtbl -> ExceptionOSHandlerLeave(This,__unused) ) #define ICorProfilerCallback2_ExceptionUnwindFunctionEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionUnwindFunctionEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionUnwindFunctionEnter(This,functionId) ) #define ICorProfilerCallback2_ExceptionUnwindFunctionLeave(This) \ - ( (This)->lpVtbl -> ExceptionUnwindFunctionLeave(This) ) + ( (This)->lpVtbl -> ExceptionUnwindFunctionLeave(This) ) #define ICorProfilerCallback2_ExceptionUnwindFinallyEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionUnwindFinallyEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionUnwindFinallyEnter(This,functionId) ) #define ICorProfilerCallback2_ExceptionUnwindFinallyLeave(This) \ - ( (This)->lpVtbl -> ExceptionUnwindFinallyLeave(This) ) + ( (This)->lpVtbl -> ExceptionUnwindFinallyLeave(This) ) #define ICorProfilerCallback2_ExceptionCatcherEnter(This,functionId,objectId) \ - ( (This)->lpVtbl -> ExceptionCatcherEnter(This,functionId,objectId) ) + ( (This)->lpVtbl -> ExceptionCatcherEnter(This,functionId,objectId) ) #define ICorProfilerCallback2_ExceptionCatcherLeave(This) \ - ( (This)->lpVtbl -> ExceptionCatcherLeave(This) ) + ( (This)->lpVtbl -> ExceptionCatcherLeave(This) ) #define ICorProfilerCallback2_COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) \ - ( (This)->lpVtbl -> COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) ) + ( (This)->lpVtbl -> COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) ) #define ICorProfilerCallback2_COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) \ - ( (This)->lpVtbl -> COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) ) + ( (This)->lpVtbl -> COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) ) #define ICorProfilerCallback2_ExceptionCLRCatcherFound(This) \ - ( (This)->lpVtbl -> ExceptionCLRCatcherFound(This) ) + ( (This)->lpVtbl -> ExceptionCLRCatcherFound(This) ) #define ICorProfilerCallback2_ExceptionCLRCatcherExecute(This) \ - ( (This)->lpVtbl -> ExceptionCLRCatcherExecute(This) ) + ( (This)->lpVtbl -> ExceptionCLRCatcherExecute(This) ) #define ICorProfilerCallback2_ThreadNameChanged(This,threadId,cchName,name) \ - ( (This)->lpVtbl -> ThreadNameChanged(This,threadId,cchName,name) ) + ( (This)->lpVtbl -> ThreadNameChanged(This,threadId,cchName,name) ) #define ICorProfilerCallback2_GarbageCollectionStarted(This,cGenerations,generationCollected,reason) \ - ( (This)->lpVtbl -> GarbageCollectionStarted(This,cGenerations,generationCollected,reason) ) + ( (This)->lpVtbl -> GarbageCollectionStarted(This,cGenerations,generationCollected,reason) ) #define ICorProfilerCallback2_SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \ - ( (This)->lpVtbl -> SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) ) + ( (This)->lpVtbl -> SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) ) #define ICorProfilerCallback2_GarbageCollectionFinished(This) \ - ( (This)->lpVtbl -> GarbageCollectionFinished(This) ) + ( (This)->lpVtbl -> GarbageCollectionFinished(This) ) #define ICorProfilerCallback2_FinalizeableObjectQueued(This,finalizerFlags,objectID) \ - ( (This)->lpVtbl -> FinalizeableObjectQueued(This,finalizerFlags,objectID) ) + ( (This)->lpVtbl -> FinalizeableObjectQueued(This,finalizerFlags,objectID) ) #define ICorProfilerCallback2_RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) \ - ( (This)->lpVtbl -> RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) ) + ( (This)->lpVtbl -> RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) ) #define ICorProfilerCallback2_HandleCreated(This,handleId,initialObjectId) \ - ( (This)->lpVtbl -> HandleCreated(This,handleId,initialObjectId) ) + ( (This)->lpVtbl -> HandleCreated(This,handleId,initialObjectId) ) #define ICorProfilerCallback2_HandleDestroyed(This,handleId) \ - ( (This)->lpVtbl -> HandleDestroyed(This,handleId) ) + ( (This)->lpVtbl -> HandleDestroyed(This,handleId) ) #endif /* COBJMACROS */ @@ -2263,402 +2282,402 @@ EXTERN_C const IID IID_ICorProfilerCallback2; #define __ICorProfilerCallback3_INTERFACE_DEFINED__ /* interface ICorProfilerCallback3 */ -/* [local][unique][uuid][object] */ +/* [local][unique][uuid][object] */ EXTERN_C const IID IID_ICorProfilerCallback3; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("4FD2ED52-7731-4b8d-9469-03D2CC3086C5") ICorProfilerCallback3 : public ICorProfilerCallback2 { public: - virtual HRESULT STDMETHODCALLTYPE InitializeForAttach( + virtual HRESULT STDMETHODCALLTYPE InitializeForAttach( /* [in] */ IUnknown *pCorProfilerInfoUnk, /* [in] */ void *pvClientData, /* [in] */ UINT cbClientData) = 0; - + virtual HRESULT STDMETHODCALLTYPE ProfilerAttachComplete( void) = 0; - + virtual HRESULT STDMETHODCALLTYPE ProfilerDetachSucceeded( void) = 0; - + }; - - + + #else /* C style interface */ typedef struct ICorProfilerCallback3Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorProfilerCallback3 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorProfilerCallback3 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorProfilerCallback3 * This); - - HRESULT ( STDMETHODCALLTYPE *Initialize )( + + HRESULT ( STDMETHODCALLTYPE *Initialize )( ICorProfilerCallback3 * This, /* [in] */ IUnknown *pICorProfilerInfoUnk); - - HRESULT ( STDMETHODCALLTYPE *Shutdown )( + + HRESULT ( STDMETHODCALLTYPE *Shutdown )( ICorProfilerCallback3 * This); - - HRESULT ( STDMETHODCALLTYPE *AppDomainCreationStarted )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainCreationStarted )( ICorProfilerCallback3 * This, /* [in] */ AppDomainID appDomainId); - - HRESULT ( STDMETHODCALLTYPE *AppDomainCreationFinished )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainCreationFinished )( ICorProfilerCallback3 * This, /* [in] */ AppDomainID appDomainId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownStarted )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownStarted )( ICorProfilerCallback3 * This, /* [in] */ AppDomainID appDomainId); - - HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownFinished )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownFinished )( ICorProfilerCallback3 * This, /* [in] */ AppDomainID appDomainId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *AssemblyLoadStarted )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyLoadStarted )( ICorProfilerCallback3 * This, /* [in] */ AssemblyID assemblyId); - - HRESULT ( STDMETHODCALLTYPE *AssemblyLoadFinished )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyLoadFinished )( ICorProfilerCallback3 * This, /* [in] */ AssemblyID assemblyId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadStarted )( ICorProfilerCallback3 * This, /* [in] */ AssemblyID assemblyId); - - HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadFinished )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadFinished )( ICorProfilerCallback3 * This, /* [in] */ AssemblyID assemblyId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ModuleLoadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ModuleLoadStarted )( ICorProfilerCallback3 * This, /* [in] */ ModuleID moduleId); - - HRESULT ( STDMETHODCALLTYPE *ModuleLoadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ModuleLoadFinished )( ICorProfilerCallback3 * This, /* [in] */ ModuleID moduleId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ModuleUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ModuleUnloadStarted )( ICorProfilerCallback3 * This, /* [in] */ ModuleID moduleId); - - HRESULT ( STDMETHODCALLTYPE *ModuleUnloadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ModuleUnloadFinished )( ICorProfilerCallback3 * This, /* [in] */ ModuleID moduleId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ModuleAttachedToAssembly )( + + HRESULT ( STDMETHODCALLTYPE *ModuleAttachedToAssembly )( ICorProfilerCallback3 * This, /* [in] */ ModuleID moduleId, /* [in] */ AssemblyID AssemblyId); - - HRESULT ( STDMETHODCALLTYPE *ClassLoadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ClassLoadStarted )( ICorProfilerCallback3 * This, /* [in] */ ClassID classId); - - HRESULT ( STDMETHODCALLTYPE *ClassLoadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ClassLoadFinished )( ICorProfilerCallback3 * This, /* [in] */ ClassID classId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ClassUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ClassUnloadStarted )( ICorProfilerCallback3 * This, /* [in] */ ClassID classId); - - HRESULT ( STDMETHODCALLTYPE *ClassUnloadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ClassUnloadFinished )( ICorProfilerCallback3 * This, /* [in] */ ClassID classId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *FunctionUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *FunctionUnloadStarted )( ICorProfilerCallback3 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *JITCompilationStarted )( + + HRESULT ( STDMETHODCALLTYPE *JITCompilationStarted )( ICorProfilerCallback3 * This, /* [in] */ FunctionID functionId, /* [in] */ BOOL fIsSafeToBlock); - - HRESULT ( STDMETHODCALLTYPE *JITCompilationFinished )( + + HRESULT ( STDMETHODCALLTYPE *JITCompilationFinished )( ICorProfilerCallback3 * This, /* [in] */ FunctionID functionId, /* [in] */ HRESULT hrStatus, /* [in] */ BOOL fIsSafeToBlock); - - HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchStarted )( + + HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchStarted )( ICorProfilerCallback3 * This, /* [in] */ FunctionID functionId, /* [out] */ BOOL *pbUseCachedFunction); - - HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchFinished )( + + HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchFinished )( ICorProfilerCallback3 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_JIT_CACHE result); - - HRESULT ( STDMETHODCALLTYPE *JITFunctionPitched )( + + HRESULT ( STDMETHODCALLTYPE *JITFunctionPitched )( ICorProfilerCallback3 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *JITInlining )( + + HRESULT ( STDMETHODCALLTYPE *JITInlining )( ICorProfilerCallback3 * This, /* [in] */ FunctionID callerId, /* [in] */ FunctionID calleeId, /* [out] */ BOOL *pfShouldInline); - - HRESULT ( STDMETHODCALLTYPE *ThreadCreated )( + + HRESULT ( STDMETHODCALLTYPE *ThreadCreated )( ICorProfilerCallback3 * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *ThreadDestroyed )( + + HRESULT ( STDMETHODCALLTYPE *ThreadDestroyed )( ICorProfilerCallback3 * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *ThreadAssignedToOSThread )( + + HRESULT ( STDMETHODCALLTYPE *ThreadAssignedToOSThread )( ICorProfilerCallback3 * This, /* [in] */ ThreadID managedThreadId, /* [in] */ DWORD osThreadId); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationStarted )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationStarted )( ICorProfilerCallback3 * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientSendingMessage )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientSendingMessage )( ICorProfilerCallback3 * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientReceivingReply )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientReceivingReply )( ICorProfilerCallback3 * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationFinished )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationFinished )( ICorProfilerCallback3 * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerReceivingMessage )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerReceivingMessage )( ICorProfilerCallback3 * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationStarted )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationStarted )( ICorProfilerCallback3 * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationReturned )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationReturned )( ICorProfilerCallback3 * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerSendingReply )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerSendingReply )( ICorProfilerCallback3 * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *UnmanagedToManagedTransition )( + + HRESULT ( STDMETHODCALLTYPE *UnmanagedToManagedTransition )( ICorProfilerCallback3 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_TRANSITION_REASON reason); - - HRESULT ( STDMETHODCALLTYPE *ManagedToUnmanagedTransition )( + + HRESULT ( STDMETHODCALLTYPE *ManagedToUnmanagedTransition )( ICorProfilerCallback3 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_TRANSITION_REASON reason); - - HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendStarted )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendStarted )( ICorProfilerCallback3 * This, /* [in] */ COR_PRF_SUSPEND_REASON suspendReason); - - HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendFinished )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendFinished )( ICorProfilerCallback3 * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendAborted )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendAborted )( ICorProfilerCallback3 * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeResumeStarted )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeResumeStarted )( ICorProfilerCallback3 * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeResumeFinished )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeResumeFinished )( ICorProfilerCallback3 * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeThreadSuspended )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeThreadSuspended )( ICorProfilerCallback3 * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *RuntimeThreadResumed )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeThreadResumed )( ICorProfilerCallback3 * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *MovedReferences )( + + HRESULT ( STDMETHODCALLTYPE *MovedReferences )( ICorProfilerCallback3 * This, /* [in] */ ULONG cMovedObjectIDRanges, /* [size_is][in] */ ObjectID oldObjectIDRangeStart[ ], /* [size_is][in] */ ObjectID newObjectIDRangeStart[ ], /* [size_is][in] */ ULONG cObjectIDRangeLength[ ]); - - HRESULT ( STDMETHODCALLTYPE *ObjectAllocated )( + + HRESULT ( STDMETHODCALLTYPE *ObjectAllocated )( ICorProfilerCallback3 * This, /* [in] */ ObjectID objectId, /* [in] */ ClassID classId); - - HRESULT ( STDMETHODCALLTYPE *ObjectsAllocatedByClass )( + + HRESULT ( STDMETHODCALLTYPE *ObjectsAllocatedByClass )( ICorProfilerCallback3 * This, /* [in] */ ULONG cClassCount, /* [size_is][in] */ ClassID classIds[ ], /* [size_is][in] */ ULONG cObjects[ ]); - - HRESULT ( STDMETHODCALLTYPE *ObjectReferences )( + + HRESULT ( STDMETHODCALLTYPE *ObjectReferences )( ICorProfilerCallback3 * This, /* [in] */ ObjectID objectId, /* [in] */ ClassID classId, /* [in] */ ULONG cObjectRefs, /* [size_is][in] */ ObjectID objectRefIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *RootReferences )( + + HRESULT ( STDMETHODCALLTYPE *RootReferences )( ICorProfilerCallback3 * This, /* [in] */ ULONG cRootRefs, /* [size_is][in] */ ObjectID rootRefIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *ExceptionThrown )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionThrown )( ICorProfilerCallback3 * This, /* [in] */ ObjectID thrownObjectId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionEnter )( ICorProfilerCallback3 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionLeave )( ICorProfilerCallback3 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterEnter )( ICorProfilerCallback3 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterLeave )( ICorProfilerCallback3 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchCatcherFound )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchCatcherFound )( ICorProfilerCallback3 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerEnter )( ICorProfilerCallback3 * This, /* [in] */ UINT_PTR __unused); - - HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerLeave )( ICorProfilerCallback3 * This, /* [in] */ UINT_PTR __unused); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionEnter )( ICorProfilerCallback3 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionLeave )( ICorProfilerCallback3 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyEnter )( ICorProfilerCallback3 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyLeave )( ICorProfilerCallback3 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherEnter )( ICorProfilerCallback3 * This, /* [in] */ FunctionID functionId, /* [in] */ ObjectID objectId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherLeave )( ICorProfilerCallback3 * This); - - HRESULT ( STDMETHODCALLTYPE *COMClassicVTableCreated )( + + HRESULT ( STDMETHODCALLTYPE *COMClassicVTableCreated )( ICorProfilerCallback3 * This, /* [in] */ ClassID wrappedClassId, /* [in] */ REFGUID implementedIID, /* [in] */ void *pVTable, /* [in] */ ULONG cSlots); - - HRESULT ( STDMETHODCALLTYPE *COMClassicVTableDestroyed )( + + HRESULT ( STDMETHODCALLTYPE *COMClassicVTableDestroyed )( ICorProfilerCallback3 * This, /* [in] */ ClassID wrappedClassId, /* [in] */ REFGUID implementedIID, /* [in] */ void *pVTable); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherFound )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherFound )( ICorProfilerCallback3 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherExecute )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherExecute )( ICorProfilerCallback3 * This); - - HRESULT ( STDMETHODCALLTYPE *ThreadNameChanged )( + + HRESULT ( STDMETHODCALLTYPE *ThreadNameChanged )( ICorProfilerCallback3 * This, /* [in] */ ThreadID threadId, /* [in] */ ULONG cchName, - /* [annotation][in] */ + /* [annotation][in] */ _In_reads_opt_(cchName) WCHAR name[ ]); - - HRESULT ( STDMETHODCALLTYPE *GarbageCollectionStarted )( + + HRESULT ( STDMETHODCALLTYPE *GarbageCollectionStarted )( ICorProfilerCallback3 * This, /* [in] */ int cGenerations, /* [size_is][in] */ BOOL generationCollected[ ], /* [in] */ COR_PRF_GC_REASON reason); - - HRESULT ( STDMETHODCALLTYPE *SurvivingReferences )( + + HRESULT ( STDMETHODCALLTYPE *SurvivingReferences )( ICorProfilerCallback3 * This, /* [in] */ ULONG cSurvivingObjectIDRanges, /* [size_is][in] */ ObjectID objectIDRangeStart[ ], /* [size_is][in] */ ULONG cObjectIDRangeLength[ ]); - - HRESULT ( STDMETHODCALLTYPE *GarbageCollectionFinished )( + + HRESULT ( STDMETHODCALLTYPE *GarbageCollectionFinished )( ICorProfilerCallback3 * This); - - HRESULT ( STDMETHODCALLTYPE *FinalizeableObjectQueued )( + + HRESULT ( STDMETHODCALLTYPE *FinalizeableObjectQueued )( ICorProfilerCallback3 * This, /* [in] */ DWORD finalizerFlags, /* [in] */ ObjectID objectID); - - HRESULT ( STDMETHODCALLTYPE *RootReferences2 )( + + HRESULT ( STDMETHODCALLTYPE *RootReferences2 )( ICorProfilerCallback3 * This, /* [in] */ ULONG cRootRefs, /* [size_is][in] */ ObjectID rootRefIds[ ], /* [size_is][in] */ COR_PRF_GC_ROOT_KIND rootKinds[ ], /* [size_is][in] */ COR_PRF_GC_ROOT_FLAGS rootFlags[ ], /* [size_is][in] */ UINT_PTR rootIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *HandleCreated )( + + HRESULT ( STDMETHODCALLTYPE *HandleCreated )( ICorProfilerCallback3 * This, /* [in] */ GCHandleID handleId, /* [in] */ ObjectID initialObjectId); - - HRESULT ( STDMETHODCALLTYPE *HandleDestroyed )( + + HRESULT ( STDMETHODCALLTYPE *HandleDestroyed )( ICorProfilerCallback3 * This, /* [in] */ GCHandleID handleId); - - HRESULT ( STDMETHODCALLTYPE *InitializeForAttach )( + + HRESULT ( STDMETHODCALLTYPE *InitializeForAttach )( ICorProfilerCallback3 * This, /* [in] */ IUnknown *pCorProfilerInfoUnk, /* [in] */ void *pvClientData, /* [in] */ UINT cbClientData); - - HRESULT ( STDMETHODCALLTYPE *ProfilerAttachComplete )( + + HRESULT ( STDMETHODCALLTYPE *ProfilerAttachComplete )( ICorProfilerCallback3 * This); - - HRESULT ( STDMETHODCALLTYPE *ProfilerDetachSucceeded )( + + HRESULT ( STDMETHODCALLTYPE *ProfilerDetachSucceeded )( ICorProfilerCallback3 * This); - + END_INTERFACE } ICorProfilerCallback3Vtbl; @@ -2667,262 +2686,262 @@ EXTERN_C const IID IID_ICorProfilerCallback3; CONST_VTBL struct ICorProfilerCallback3Vtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ICorProfilerCallback3_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ICorProfilerCallback3_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ICorProfilerCallback3_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ICorProfilerCallback3_Initialize(This,pICorProfilerInfoUnk) \ - ( (This)->lpVtbl -> Initialize(This,pICorProfilerInfoUnk) ) + ( (This)->lpVtbl -> Initialize(This,pICorProfilerInfoUnk) ) #define ICorProfilerCallback3_Shutdown(This) \ - ( (This)->lpVtbl -> Shutdown(This) ) + ( (This)->lpVtbl -> Shutdown(This) ) #define ICorProfilerCallback3_AppDomainCreationStarted(This,appDomainId) \ - ( (This)->lpVtbl -> AppDomainCreationStarted(This,appDomainId) ) + ( (This)->lpVtbl -> AppDomainCreationStarted(This,appDomainId) ) #define ICorProfilerCallback3_AppDomainCreationFinished(This,appDomainId,hrStatus) \ - ( (This)->lpVtbl -> AppDomainCreationFinished(This,appDomainId,hrStatus) ) + ( (This)->lpVtbl -> AppDomainCreationFinished(This,appDomainId,hrStatus) ) #define ICorProfilerCallback3_AppDomainShutdownStarted(This,appDomainId) \ - ( (This)->lpVtbl -> AppDomainShutdownStarted(This,appDomainId) ) + ( (This)->lpVtbl -> AppDomainShutdownStarted(This,appDomainId) ) #define ICorProfilerCallback3_AppDomainShutdownFinished(This,appDomainId,hrStatus) \ - ( (This)->lpVtbl -> AppDomainShutdownFinished(This,appDomainId,hrStatus) ) + ( (This)->lpVtbl -> AppDomainShutdownFinished(This,appDomainId,hrStatus) ) #define ICorProfilerCallback3_AssemblyLoadStarted(This,assemblyId) \ - ( (This)->lpVtbl -> AssemblyLoadStarted(This,assemblyId) ) + ( (This)->lpVtbl -> AssemblyLoadStarted(This,assemblyId) ) #define ICorProfilerCallback3_AssemblyLoadFinished(This,assemblyId,hrStatus) \ - ( (This)->lpVtbl -> AssemblyLoadFinished(This,assemblyId,hrStatus) ) + ( (This)->lpVtbl -> AssemblyLoadFinished(This,assemblyId,hrStatus) ) #define ICorProfilerCallback3_AssemblyUnloadStarted(This,assemblyId) \ - ( (This)->lpVtbl -> AssemblyUnloadStarted(This,assemblyId) ) + ( (This)->lpVtbl -> AssemblyUnloadStarted(This,assemblyId) ) #define ICorProfilerCallback3_AssemblyUnloadFinished(This,assemblyId,hrStatus) \ - ( (This)->lpVtbl -> AssemblyUnloadFinished(This,assemblyId,hrStatus) ) + ( (This)->lpVtbl -> AssemblyUnloadFinished(This,assemblyId,hrStatus) ) #define ICorProfilerCallback3_ModuleLoadStarted(This,moduleId) \ - ( (This)->lpVtbl -> ModuleLoadStarted(This,moduleId) ) + ( (This)->lpVtbl -> ModuleLoadStarted(This,moduleId) ) #define ICorProfilerCallback3_ModuleLoadFinished(This,moduleId,hrStatus) \ - ( (This)->lpVtbl -> ModuleLoadFinished(This,moduleId,hrStatus) ) + ( (This)->lpVtbl -> ModuleLoadFinished(This,moduleId,hrStatus) ) #define ICorProfilerCallback3_ModuleUnloadStarted(This,moduleId) \ - ( (This)->lpVtbl -> ModuleUnloadStarted(This,moduleId) ) + ( (This)->lpVtbl -> ModuleUnloadStarted(This,moduleId) ) #define ICorProfilerCallback3_ModuleUnloadFinished(This,moduleId,hrStatus) \ - ( (This)->lpVtbl -> ModuleUnloadFinished(This,moduleId,hrStatus) ) + ( (This)->lpVtbl -> ModuleUnloadFinished(This,moduleId,hrStatus) ) #define ICorProfilerCallback3_ModuleAttachedToAssembly(This,moduleId,AssemblyId) \ - ( (This)->lpVtbl -> ModuleAttachedToAssembly(This,moduleId,AssemblyId) ) + ( (This)->lpVtbl -> ModuleAttachedToAssembly(This,moduleId,AssemblyId) ) #define ICorProfilerCallback3_ClassLoadStarted(This,classId) \ - ( (This)->lpVtbl -> ClassLoadStarted(This,classId) ) + ( (This)->lpVtbl -> ClassLoadStarted(This,classId) ) #define ICorProfilerCallback3_ClassLoadFinished(This,classId,hrStatus) \ - ( (This)->lpVtbl -> ClassLoadFinished(This,classId,hrStatus) ) + ( (This)->lpVtbl -> ClassLoadFinished(This,classId,hrStatus) ) #define ICorProfilerCallback3_ClassUnloadStarted(This,classId) \ - ( (This)->lpVtbl -> ClassUnloadStarted(This,classId) ) + ( (This)->lpVtbl -> ClassUnloadStarted(This,classId) ) #define ICorProfilerCallback3_ClassUnloadFinished(This,classId,hrStatus) \ - ( (This)->lpVtbl -> ClassUnloadFinished(This,classId,hrStatus) ) + ( (This)->lpVtbl -> ClassUnloadFinished(This,classId,hrStatus) ) #define ICorProfilerCallback3_FunctionUnloadStarted(This,functionId) \ - ( (This)->lpVtbl -> FunctionUnloadStarted(This,functionId) ) + ( (This)->lpVtbl -> FunctionUnloadStarted(This,functionId) ) #define ICorProfilerCallback3_JITCompilationStarted(This,functionId,fIsSafeToBlock) \ - ( (This)->lpVtbl -> JITCompilationStarted(This,functionId,fIsSafeToBlock) ) + ( (This)->lpVtbl -> JITCompilationStarted(This,functionId,fIsSafeToBlock) ) #define ICorProfilerCallback3_JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \ - ( (This)->lpVtbl -> JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) ) + ( (This)->lpVtbl -> JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) ) #define ICorProfilerCallback3_JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) \ - ( (This)->lpVtbl -> JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) ) + ( (This)->lpVtbl -> JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) ) #define ICorProfilerCallback3_JITCachedFunctionSearchFinished(This,functionId,result) \ - ( (This)->lpVtbl -> JITCachedFunctionSearchFinished(This,functionId,result) ) + ( (This)->lpVtbl -> JITCachedFunctionSearchFinished(This,functionId,result) ) #define ICorProfilerCallback3_JITFunctionPitched(This,functionId) \ - ( (This)->lpVtbl -> JITFunctionPitched(This,functionId) ) + ( (This)->lpVtbl -> JITFunctionPitched(This,functionId) ) #define ICorProfilerCallback3_JITInlining(This,callerId,calleeId,pfShouldInline) \ - ( (This)->lpVtbl -> JITInlining(This,callerId,calleeId,pfShouldInline) ) + ( (This)->lpVtbl -> JITInlining(This,callerId,calleeId,pfShouldInline) ) #define ICorProfilerCallback3_ThreadCreated(This,threadId) \ - ( (This)->lpVtbl -> ThreadCreated(This,threadId) ) + ( (This)->lpVtbl -> ThreadCreated(This,threadId) ) #define ICorProfilerCallback3_ThreadDestroyed(This,threadId) \ - ( (This)->lpVtbl -> ThreadDestroyed(This,threadId) ) + ( (This)->lpVtbl -> ThreadDestroyed(This,threadId) ) #define ICorProfilerCallback3_ThreadAssignedToOSThread(This,managedThreadId,osThreadId) \ - ( (This)->lpVtbl -> ThreadAssignedToOSThread(This,managedThreadId,osThreadId) ) + ( (This)->lpVtbl -> ThreadAssignedToOSThread(This,managedThreadId,osThreadId) ) #define ICorProfilerCallback3_RemotingClientInvocationStarted(This) \ - ( (This)->lpVtbl -> RemotingClientInvocationStarted(This) ) + ( (This)->lpVtbl -> RemotingClientInvocationStarted(This) ) #define ICorProfilerCallback3_RemotingClientSendingMessage(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingClientSendingMessage(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingClientSendingMessage(This,pCookie,fIsAsync) ) #define ICorProfilerCallback3_RemotingClientReceivingReply(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingClientReceivingReply(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingClientReceivingReply(This,pCookie,fIsAsync) ) #define ICorProfilerCallback3_RemotingClientInvocationFinished(This) \ - ( (This)->lpVtbl -> RemotingClientInvocationFinished(This) ) + ( (This)->lpVtbl -> RemotingClientInvocationFinished(This) ) #define ICorProfilerCallback3_RemotingServerReceivingMessage(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingServerReceivingMessage(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingServerReceivingMessage(This,pCookie,fIsAsync) ) #define ICorProfilerCallback3_RemotingServerInvocationStarted(This) \ - ( (This)->lpVtbl -> RemotingServerInvocationStarted(This) ) + ( (This)->lpVtbl -> RemotingServerInvocationStarted(This) ) #define ICorProfilerCallback3_RemotingServerInvocationReturned(This) \ - ( (This)->lpVtbl -> RemotingServerInvocationReturned(This) ) + ( (This)->lpVtbl -> RemotingServerInvocationReturned(This) ) #define ICorProfilerCallback3_RemotingServerSendingReply(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingServerSendingReply(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingServerSendingReply(This,pCookie,fIsAsync) ) #define ICorProfilerCallback3_UnmanagedToManagedTransition(This,functionId,reason) \ - ( (This)->lpVtbl -> UnmanagedToManagedTransition(This,functionId,reason) ) + ( (This)->lpVtbl -> UnmanagedToManagedTransition(This,functionId,reason) ) #define ICorProfilerCallback3_ManagedToUnmanagedTransition(This,functionId,reason) \ - ( (This)->lpVtbl -> ManagedToUnmanagedTransition(This,functionId,reason) ) + ( (This)->lpVtbl -> ManagedToUnmanagedTransition(This,functionId,reason) ) #define ICorProfilerCallback3_RuntimeSuspendStarted(This,suspendReason) \ - ( (This)->lpVtbl -> RuntimeSuspendStarted(This,suspendReason) ) + ( (This)->lpVtbl -> RuntimeSuspendStarted(This,suspendReason) ) #define ICorProfilerCallback3_RuntimeSuspendFinished(This) \ - ( (This)->lpVtbl -> RuntimeSuspendFinished(This) ) + ( (This)->lpVtbl -> RuntimeSuspendFinished(This) ) #define ICorProfilerCallback3_RuntimeSuspendAborted(This) \ - ( (This)->lpVtbl -> RuntimeSuspendAborted(This) ) + ( (This)->lpVtbl -> RuntimeSuspendAborted(This) ) #define ICorProfilerCallback3_RuntimeResumeStarted(This) \ - ( (This)->lpVtbl -> RuntimeResumeStarted(This) ) + ( (This)->lpVtbl -> RuntimeResumeStarted(This) ) #define ICorProfilerCallback3_RuntimeResumeFinished(This) \ - ( (This)->lpVtbl -> RuntimeResumeFinished(This) ) + ( (This)->lpVtbl -> RuntimeResumeFinished(This) ) #define ICorProfilerCallback3_RuntimeThreadSuspended(This,threadId) \ - ( (This)->lpVtbl -> RuntimeThreadSuspended(This,threadId) ) + ( (This)->lpVtbl -> RuntimeThreadSuspended(This,threadId) ) #define ICorProfilerCallback3_RuntimeThreadResumed(This,threadId) \ - ( (This)->lpVtbl -> RuntimeThreadResumed(This,threadId) ) + ( (This)->lpVtbl -> RuntimeThreadResumed(This,threadId) ) #define ICorProfilerCallback3_MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \ - ( (This)->lpVtbl -> MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) ) + ( (This)->lpVtbl -> MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) ) #define ICorProfilerCallback3_ObjectAllocated(This,objectId,classId) \ - ( (This)->lpVtbl -> ObjectAllocated(This,objectId,classId) ) + ( (This)->lpVtbl -> ObjectAllocated(This,objectId,classId) ) #define ICorProfilerCallback3_ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) \ - ( (This)->lpVtbl -> ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) ) + ( (This)->lpVtbl -> ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) ) #define ICorProfilerCallback3_ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) \ - ( (This)->lpVtbl -> ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) ) + ( (This)->lpVtbl -> ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) ) #define ICorProfilerCallback3_RootReferences(This,cRootRefs,rootRefIds) \ - ( (This)->lpVtbl -> RootReferences(This,cRootRefs,rootRefIds) ) + ( (This)->lpVtbl -> RootReferences(This,cRootRefs,rootRefIds) ) #define ICorProfilerCallback3_ExceptionThrown(This,thrownObjectId) \ - ( (This)->lpVtbl -> ExceptionThrown(This,thrownObjectId) ) + ( (This)->lpVtbl -> ExceptionThrown(This,thrownObjectId) ) #define ICorProfilerCallback3_ExceptionSearchFunctionEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionSearchFunctionEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionSearchFunctionEnter(This,functionId) ) #define ICorProfilerCallback3_ExceptionSearchFunctionLeave(This) \ - ( (This)->lpVtbl -> ExceptionSearchFunctionLeave(This) ) + ( (This)->lpVtbl -> ExceptionSearchFunctionLeave(This) ) #define ICorProfilerCallback3_ExceptionSearchFilterEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionSearchFilterEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionSearchFilterEnter(This,functionId) ) #define ICorProfilerCallback3_ExceptionSearchFilterLeave(This) \ - ( (This)->lpVtbl -> ExceptionSearchFilterLeave(This) ) + ( (This)->lpVtbl -> ExceptionSearchFilterLeave(This) ) #define ICorProfilerCallback3_ExceptionSearchCatcherFound(This,functionId) \ - ( (This)->lpVtbl -> ExceptionSearchCatcherFound(This,functionId) ) + ( (This)->lpVtbl -> ExceptionSearchCatcherFound(This,functionId) ) #define ICorProfilerCallback3_ExceptionOSHandlerEnter(This,__unused) \ - ( (This)->lpVtbl -> ExceptionOSHandlerEnter(This,__unused) ) + ( (This)->lpVtbl -> ExceptionOSHandlerEnter(This,__unused) ) #define ICorProfilerCallback3_ExceptionOSHandlerLeave(This,__unused) \ - ( (This)->lpVtbl -> ExceptionOSHandlerLeave(This,__unused) ) + ( (This)->lpVtbl -> ExceptionOSHandlerLeave(This,__unused) ) #define ICorProfilerCallback3_ExceptionUnwindFunctionEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionUnwindFunctionEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionUnwindFunctionEnter(This,functionId) ) #define ICorProfilerCallback3_ExceptionUnwindFunctionLeave(This) \ - ( (This)->lpVtbl -> ExceptionUnwindFunctionLeave(This) ) + ( (This)->lpVtbl -> ExceptionUnwindFunctionLeave(This) ) #define ICorProfilerCallback3_ExceptionUnwindFinallyEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionUnwindFinallyEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionUnwindFinallyEnter(This,functionId) ) #define ICorProfilerCallback3_ExceptionUnwindFinallyLeave(This) \ - ( (This)->lpVtbl -> ExceptionUnwindFinallyLeave(This) ) + ( (This)->lpVtbl -> ExceptionUnwindFinallyLeave(This) ) #define ICorProfilerCallback3_ExceptionCatcherEnter(This,functionId,objectId) \ - ( (This)->lpVtbl -> ExceptionCatcherEnter(This,functionId,objectId) ) + ( (This)->lpVtbl -> ExceptionCatcherEnter(This,functionId,objectId) ) #define ICorProfilerCallback3_ExceptionCatcherLeave(This) \ - ( (This)->lpVtbl -> ExceptionCatcherLeave(This) ) + ( (This)->lpVtbl -> ExceptionCatcherLeave(This) ) #define ICorProfilerCallback3_COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) \ - ( (This)->lpVtbl -> COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) ) + ( (This)->lpVtbl -> COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) ) #define ICorProfilerCallback3_COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) \ - ( (This)->lpVtbl -> COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) ) + ( (This)->lpVtbl -> COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) ) #define ICorProfilerCallback3_ExceptionCLRCatcherFound(This) \ - ( (This)->lpVtbl -> ExceptionCLRCatcherFound(This) ) + ( (This)->lpVtbl -> ExceptionCLRCatcherFound(This) ) #define ICorProfilerCallback3_ExceptionCLRCatcherExecute(This) \ - ( (This)->lpVtbl -> ExceptionCLRCatcherExecute(This) ) + ( (This)->lpVtbl -> ExceptionCLRCatcherExecute(This) ) #define ICorProfilerCallback3_ThreadNameChanged(This,threadId,cchName,name) \ - ( (This)->lpVtbl -> ThreadNameChanged(This,threadId,cchName,name) ) + ( (This)->lpVtbl -> ThreadNameChanged(This,threadId,cchName,name) ) #define ICorProfilerCallback3_GarbageCollectionStarted(This,cGenerations,generationCollected,reason) \ - ( (This)->lpVtbl -> GarbageCollectionStarted(This,cGenerations,generationCollected,reason) ) + ( (This)->lpVtbl -> GarbageCollectionStarted(This,cGenerations,generationCollected,reason) ) #define ICorProfilerCallback3_SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \ - ( (This)->lpVtbl -> SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) ) + ( (This)->lpVtbl -> SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) ) #define ICorProfilerCallback3_GarbageCollectionFinished(This) \ - ( (This)->lpVtbl -> GarbageCollectionFinished(This) ) + ( (This)->lpVtbl -> GarbageCollectionFinished(This) ) #define ICorProfilerCallback3_FinalizeableObjectQueued(This,finalizerFlags,objectID) \ - ( (This)->lpVtbl -> FinalizeableObjectQueued(This,finalizerFlags,objectID) ) + ( (This)->lpVtbl -> FinalizeableObjectQueued(This,finalizerFlags,objectID) ) #define ICorProfilerCallback3_RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) \ - ( (This)->lpVtbl -> RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) ) + ( (This)->lpVtbl -> RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) ) #define ICorProfilerCallback3_HandleCreated(This,handleId,initialObjectId) \ - ( (This)->lpVtbl -> HandleCreated(This,handleId,initialObjectId) ) + ( (This)->lpVtbl -> HandleCreated(This,handleId,initialObjectId) ) #define ICorProfilerCallback3_HandleDestroyed(This,handleId) \ - ( (This)->lpVtbl -> HandleDestroyed(This,handleId) ) + ( (This)->lpVtbl -> HandleDestroyed(This,handleId) ) #define ICorProfilerCallback3_InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) \ - ( (This)->lpVtbl -> InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) ) + ( (This)->lpVtbl -> InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) ) #define ICorProfilerCallback3_ProfilerAttachComplete(This) \ - ( (This)->lpVtbl -> ProfilerAttachComplete(This) ) + ( (This)->lpVtbl -> ProfilerAttachComplete(This) ) #define ICorProfilerCallback3_ProfilerDetachSucceeded(This) \ - ( (This)->lpVtbl -> ProfilerDetachSucceeded(This) ) + ( (This)->lpVtbl -> ProfilerDetachSucceeded(This) ) #endif /* COBJMACROS */ @@ -2939,465 +2958,465 @@ EXTERN_C const IID IID_ICorProfilerCallback3; #define __ICorProfilerCallback4_INTERFACE_DEFINED__ /* interface ICorProfilerCallback4 */ -/* [local][unique][uuid][object] */ +/* [local][unique][uuid][object] */ EXTERN_C const IID IID_ICorProfilerCallback4; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("7B63B2E3-107D-4d48-B2F6-F61E229470D2") ICorProfilerCallback4 : public ICorProfilerCallback3 { public: - virtual HRESULT STDMETHODCALLTYPE ReJITCompilationStarted( + virtual HRESULT STDMETHODCALLTYPE ReJITCompilationStarted( /* [in] */ FunctionID functionId, /* [in] */ ReJITID rejitId, /* [in] */ BOOL fIsSafeToBlock) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetReJITParameters( + + virtual HRESULT STDMETHODCALLTYPE GetReJITParameters( /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodId, /* [in] */ ICorProfilerFunctionControl *pFunctionControl) = 0; - - virtual HRESULT STDMETHODCALLTYPE ReJITCompilationFinished( + + virtual HRESULT STDMETHODCALLTYPE ReJITCompilationFinished( /* [in] */ FunctionID functionId, /* [in] */ ReJITID rejitId, /* [in] */ HRESULT hrStatus, /* [in] */ BOOL fIsSafeToBlock) = 0; - - virtual HRESULT STDMETHODCALLTYPE ReJITError( + + virtual HRESULT STDMETHODCALLTYPE ReJITError( /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodId, /* [in] */ FunctionID functionId, /* [in] */ HRESULT hrStatus) = 0; - - virtual HRESULT STDMETHODCALLTYPE MovedReferences2( + + virtual HRESULT STDMETHODCALLTYPE MovedReferences2( /* [in] */ ULONG cMovedObjectIDRanges, /* [size_is][in] */ ObjectID oldObjectIDRangeStart[ ], /* [size_is][in] */ ObjectID newObjectIDRangeStart[ ], /* [size_is][in] */ SIZE_T cObjectIDRangeLength[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE SurvivingReferences2( + + virtual HRESULT STDMETHODCALLTYPE SurvivingReferences2( /* [in] */ ULONG cSurvivingObjectIDRanges, /* [size_is][in] */ ObjectID objectIDRangeStart[ ], /* [size_is][in] */ SIZE_T cObjectIDRangeLength[ ]) = 0; - + }; - - + + #else /* C style interface */ typedef struct ICorProfilerCallback4Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorProfilerCallback4 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorProfilerCallback4 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorProfilerCallback4 * This); - - HRESULT ( STDMETHODCALLTYPE *Initialize )( + + HRESULT ( STDMETHODCALLTYPE *Initialize )( ICorProfilerCallback4 * This, /* [in] */ IUnknown *pICorProfilerInfoUnk); - - HRESULT ( STDMETHODCALLTYPE *Shutdown )( + + HRESULT ( STDMETHODCALLTYPE *Shutdown )( ICorProfilerCallback4 * This); - - HRESULT ( STDMETHODCALLTYPE *AppDomainCreationStarted )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainCreationStarted )( ICorProfilerCallback4 * This, /* [in] */ AppDomainID appDomainId); - - HRESULT ( STDMETHODCALLTYPE *AppDomainCreationFinished )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainCreationFinished )( ICorProfilerCallback4 * This, /* [in] */ AppDomainID appDomainId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownStarted )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownStarted )( ICorProfilerCallback4 * This, /* [in] */ AppDomainID appDomainId); - - HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownFinished )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownFinished )( ICorProfilerCallback4 * This, /* [in] */ AppDomainID appDomainId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *AssemblyLoadStarted )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyLoadStarted )( ICorProfilerCallback4 * This, /* [in] */ AssemblyID assemblyId); - - HRESULT ( STDMETHODCALLTYPE *AssemblyLoadFinished )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyLoadFinished )( ICorProfilerCallback4 * This, /* [in] */ AssemblyID assemblyId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadStarted )( ICorProfilerCallback4 * This, /* [in] */ AssemblyID assemblyId); - - HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadFinished )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadFinished )( ICorProfilerCallback4 * This, /* [in] */ AssemblyID assemblyId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ModuleLoadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ModuleLoadStarted )( ICorProfilerCallback4 * This, /* [in] */ ModuleID moduleId); - - HRESULT ( STDMETHODCALLTYPE *ModuleLoadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ModuleLoadFinished )( ICorProfilerCallback4 * This, /* [in] */ ModuleID moduleId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ModuleUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ModuleUnloadStarted )( ICorProfilerCallback4 * This, /* [in] */ ModuleID moduleId); - - HRESULT ( STDMETHODCALLTYPE *ModuleUnloadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ModuleUnloadFinished )( ICorProfilerCallback4 * This, /* [in] */ ModuleID moduleId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ModuleAttachedToAssembly )( + + HRESULT ( STDMETHODCALLTYPE *ModuleAttachedToAssembly )( ICorProfilerCallback4 * This, /* [in] */ ModuleID moduleId, /* [in] */ AssemblyID AssemblyId); - - HRESULT ( STDMETHODCALLTYPE *ClassLoadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ClassLoadStarted )( ICorProfilerCallback4 * This, /* [in] */ ClassID classId); - - HRESULT ( STDMETHODCALLTYPE *ClassLoadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ClassLoadFinished )( ICorProfilerCallback4 * This, /* [in] */ ClassID classId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ClassUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ClassUnloadStarted )( ICorProfilerCallback4 * This, /* [in] */ ClassID classId); - - HRESULT ( STDMETHODCALLTYPE *ClassUnloadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ClassUnloadFinished )( ICorProfilerCallback4 * This, /* [in] */ ClassID classId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *FunctionUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *FunctionUnloadStarted )( ICorProfilerCallback4 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *JITCompilationStarted )( + + HRESULT ( STDMETHODCALLTYPE *JITCompilationStarted )( ICorProfilerCallback4 * This, /* [in] */ FunctionID functionId, /* [in] */ BOOL fIsSafeToBlock); - - HRESULT ( STDMETHODCALLTYPE *JITCompilationFinished )( + + HRESULT ( STDMETHODCALLTYPE *JITCompilationFinished )( ICorProfilerCallback4 * This, /* [in] */ FunctionID functionId, /* [in] */ HRESULT hrStatus, /* [in] */ BOOL fIsSafeToBlock); - - HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchStarted )( + + HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchStarted )( ICorProfilerCallback4 * This, /* [in] */ FunctionID functionId, /* [out] */ BOOL *pbUseCachedFunction); - - HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchFinished )( + + HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchFinished )( ICorProfilerCallback4 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_JIT_CACHE result); - - HRESULT ( STDMETHODCALLTYPE *JITFunctionPitched )( + + HRESULT ( STDMETHODCALLTYPE *JITFunctionPitched )( ICorProfilerCallback4 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *JITInlining )( + + HRESULT ( STDMETHODCALLTYPE *JITInlining )( ICorProfilerCallback4 * This, /* [in] */ FunctionID callerId, /* [in] */ FunctionID calleeId, /* [out] */ BOOL *pfShouldInline); - - HRESULT ( STDMETHODCALLTYPE *ThreadCreated )( + + HRESULT ( STDMETHODCALLTYPE *ThreadCreated )( ICorProfilerCallback4 * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *ThreadDestroyed )( + + HRESULT ( STDMETHODCALLTYPE *ThreadDestroyed )( ICorProfilerCallback4 * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *ThreadAssignedToOSThread )( + + HRESULT ( STDMETHODCALLTYPE *ThreadAssignedToOSThread )( ICorProfilerCallback4 * This, /* [in] */ ThreadID managedThreadId, /* [in] */ DWORD osThreadId); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationStarted )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationStarted )( ICorProfilerCallback4 * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientSendingMessage )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientSendingMessage )( ICorProfilerCallback4 * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientReceivingReply )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientReceivingReply )( ICorProfilerCallback4 * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationFinished )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationFinished )( ICorProfilerCallback4 * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerReceivingMessage )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerReceivingMessage )( ICorProfilerCallback4 * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationStarted )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationStarted )( ICorProfilerCallback4 * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationReturned )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationReturned )( ICorProfilerCallback4 * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerSendingReply )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerSendingReply )( ICorProfilerCallback4 * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *UnmanagedToManagedTransition )( + + HRESULT ( STDMETHODCALLTYPE *UnmanagedToManagedTransition )( ICorProfilerCallback4 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_TRANSITION_REASON reason); - - HRESULT ( STDMETHODCALLTYPE *ManagedToUnmanagedTransition )( + + HRESULT ( STDMETHODCALLTYPE *ManagedToUnmanagedTransition )( ICorProfilerCallback4 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_TRANSITION_REASON reason); - - HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendStarted )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendStarted )( ICorProfilerCallback4 * This, /* [in] */ COR_PRF_SUSPEND_REASON suspendReason); - - HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendFinished )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendFinished )( ICorProfilerCallback4 * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendAborted )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendAborted )( ICorProfilerCallback4 * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeResumeStarted )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeResumeStarted )( ICorProfilerCallback4 * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeResumeFinished )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeResumeFinished )( ICorProfilerCallback4 * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeThreadSuspended )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeThreadSuspended )( ICorProfilerCallback4 * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *RuntimeThreadResumed )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeThreadResumed )( ICorProfilerCallback4 * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *MovedReferences )( + + HRESULT ( STDMETHODCALLTYPE *MovedReferences )( ICorProfilerCallback4 * This, /* [in] */ ULONG cMovedObjectIDRanges, /* [size_is][in] */ ObjectID oldObjectIDRangeStart[ ], /* [size_is][in] */ ObjectID newObjectIDRangeStart[ ], /* [size_is][in] */ ULONG cObjectIDRangeLength[ ]); - - HRESULT ( STDMETHODCALLTYPE *ObjectAllocated )( + + HRESULT ( STDMETHODCALLTYPE *ObjectAllocated )( ICorProfilerCallback4 * This, /* [in] */ ObjectID objectId, /* [in] */ ClassID classId); - - HRESULT ( STDMETHODCALLTYPE *ObjectsAllocatedByClass )( + + HRESULT ( STDMETHODCALLTYPE *ObjectsAllocatedByClass )( ICorProfilerCallback4 * This, /* [in] */ ULONG cClassCount, /* [size_is][in] */ ClassID classIds[ ], /* [size_is][in] */ ULONG cObjects[ ]); - - HRESULT ( STDMETHODCALLTYPE *ObjectReferences )( + + HRESULT ( STDMETHODCALLTYPE *ObjectReferences )( ICorProfilerCallback4 * This, /* [in] */ ObjectID objectId, /* [in] */ ClassID classId, /* [in] */ ULONG cObjectRefs, /* [size_is][in] */ ObjectID objectRefIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *RootReferences )( + + HRESULT ( STDMETHODCALLTYPE *RootReferences )( ICorProfilerCallback4 * This, /* [in] */ ULONG cRootRefs, /* [size_is][in] */ ObjectID rootRefIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *ExceptionThrown )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionThrown )( ICorProfilerCallback4 * This, /* [in] */ ObjectID thrownObjectId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionEnter )( ICorProfilerCallback4 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionLeave )( ICorProfilerCallback4 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterEnter )( ICorProfilerCallback4 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterLeave )( ICorProfilerCallback4 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchCatcherFound )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchCatcherFound )( ICorProfilerCallback4 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerEnter )( ICorProfilerCallback4 * This, /* [in] */ UINT_PTR __unused); - - HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerLeave )( ICorProfilerCallback4 * This, /* [in] */ UINT_PTR __unused); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionEnter )( ICorProfilerCallback4 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionLeave )( ICorProfilerCallback4 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyEnter )( ICorProfilerCallback4 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyLeave )( ICorProfilerCallback4 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherEnter )( ICorProfilerCallback4 * This, /* [in] */ FunctionID functionId, /* [in] */ ObjectID objectId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherLeave )( ICorProfilerCallback4 * This); - - HRESULT ( STDMETHODCALLTYPE *COMClassicVTableCreated )( + + HRESULT ( STDMETHODCALLTYPE *COMClassicVTableCreated )( ICorProfilerCallback4 * This, /* [in] */ ClassID wrappedClassId, /* [in] */ REFGUID implementedIID, /* [in] */ void *pVTable, /* [in] */ ULONG cSlots); - - HRESULT ( STDMETHODCALLTYPE *COMClassicVTableDestroyed )( + + HRESULT ( STDMETHODCALLTYPE *COMClassicVTableDestroyed )( ICorProfilerCallback4 * This, /* [in] */ ClassID wrappedClassId, /* [in] */ REFGUID implementedIID, /* [in] */ void *pVTable); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherFound )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherFound )( ICorProfilerCallback4 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherExecute )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherExecute )( ICorProfilerCallback4 * This); - - HRESULT ( STDMETHODCALLTYPE *ThreadNameChanged )( + + HRESULT ( STDMETHODCALLTYPE *ThreadNameChanged )( ICorProfilerCallback4 * This, /* [in] */ ThreadID threadId, /* [in] */ ULONG cchName, - /* [annotation][in] */ + /* [annotation][in] */ _In_reads_opt_(cchName) WCHAR name[ ]); - - HRESULT ( STDMETHODCALLTYPE *GarbageCollectionStarted )( + + HRESULT ( STDMETHODCALLTYPE *GarbageCollectionStarted )( ICorProfilerCallback4 * This, /* [in] */ int cGenerations, /* [size_is][in] */ BOOL generationCollected[ ], /* [in] */ COR_PRF_GC_REASON reason); - - HRESULT ( STDMETHODCALLTYPE *SurvivingReferences )( + + HRESULT ( STDMETHODCALLTYPE *SurvivingReferences )( ICorProfilerCallback4 * This, /* [in] */ ULONG cSurvivingObjectIDRanges, /* [size_is][in] */ ObjectID objectIDRangeStart[ ], /* [size_is][in] */ ULONG cObjectIDRangeLength[ ]); - - HRESULT ( STDMETHODCALLTYPE *GarbageCollectionFinished )( + + HRESULT ( STDMETHODCALLTYPE *GarbageCollectionFinished )( ICorProfilerCallback4 * This); - - HRESULT ( STDMETHODCALLTYPE *FinalizeableObjectQueued )( + + HRESULT ( STDMETHODCALLTYPE *FinalizeableObjectQueued )( ICorProfilerCallback4 * This, /* [in] */ DWORD finalizerFlags, /* [in] */ ObjectID objectID); - - HRESULT ( STDMETHODCALLTYPE *RootReferences2 )( + + HRESULT ( STDMETHODCALLTYPE *RootReferences2 )( ICorProfilerCallback4 * This, /* [in] */ ULONG cRootRefs, /* [size_is][in] */ ObjectID rootRefIds[ ], /* [size_is][in] */ COR_PRF_GC_ROOT_KIND rootKinds[ ], /* [size_is][in] */ COR_PRF_GC_ROOT_FLAGS rootFlags[ ], /* [size_is][in] */ UINT_PTR rootIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *HandleCreated )( + + HRESULT ( STDMETHODCALLTYPE *HandleCreated )( ICorProfilerCallback4 * This, /* [in] */ GCHandleID handleId, /* [in] */ ObjectID initialObjectId); - - HRESULT ( STDMETHODCALLTYPE *HandleDestroyed )( + + HRESULT ( STDMETHODCALLTYPE *HandleDestroyed )( ICorProfilerCallback4 * This, /* [in] */ GCHandleID handleId); - - HRESULT ( STDMETHODCALLTYPE *InitializeForAttach )( + + HRESULT ( STDMETHODCALLTYPE *InitializeForAttach )( ICorProfilerCallback4 * This, /* [in] */ IUnknown *pCorProfilerInfoUnk, /* [in] */ void *pvClientData, /* [in] */ UINT cbClientData); - - HRESULT ( STDMETHODCALLTYPE *ProfilerAttachComplete )( + + HRESULT ( STDMETHODCALLTYPE *ProfilerAttachComplete )( ICorProfilerCallback4 * This); - - HRESULT ( STDMETHODCALLTYPE *ProfilerDetachSucceeded )( + + HRESULT ( STDMETHODCALLTYPE *ProfilerDetachSucceeded )( ICorProfilerCallback4 * This); - - HRESULT ( STDMETHODCALLTYPE *ReJITCompilationStarted )( + + HRESULT ( STDMETHODCALLTYPE *ReJITCompilationStarted )( ICorProfilerCallback4 * This, /* [in] */ FunctionID functionId, /* [in] */ ReJITID rejitId, /* [in] */ BOOL fIsSafeToBlock); - - HRESULT ( STDMETHODCALLTYPE *GetReJITParameters )( + + HRESULT ( STDMETHODCALLTYPE *GetReJITParameters )( ICorProfilerCallback4 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodId, /* [in] */ ICorProfilerFunctionControl *pFunctionControl); - - HRESULT ( STDMETHODCALLTYPE *ReJITCompilationFinished )( + + HRESULT ( STDMETHODCALLTYPE *ReJITCompilationFinished )( ICorProfilerCallback4 * This, /* [in] */ FunctionID functionId, /* [in] */ ReJITID rejitId, /* [in] */ HRESULT hrStatus, /* [in] */ BOOL fIsSafeToBlock); - - HRESULT ( STDMETHODCALLTYPE *ReJITError )( + + HRESULT ( STDMETHODCALLTYPE *ReJITError )( ICorProfilerCallback4 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodId, /* [in] */ FunctionID functionId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *MovedReferences2 )( + + HRESULT ( STDMETHODCALLTYPE *MovedReferences2 )( ICorProfilerCallback4 * This, /* [in] */ ULONG cMovedObjectIDRanges, /* [size_is][in] */ ObjectID oldObjectIDRangeStart[ ], /* [size_is][in] */ ObjectID newObjectIDRangeStart[ ], /* [size_is][in] */ SIZE_T cObjectIDRangeLength[ ]); - - HRESULT ( STDMETHODCALLTYPE *SurvivingReferences2 )( + + HRESULT ( STDMETHODCALLTYPE *SurvivingReferences2 )( ICorProfilerCallback4 * This, /* [in] */ ULONG cSurvivingObjectIDRanges, /* [size_is][in] */ ObjectID objectIDRangeStart[ ], /* [size_is][in] */ SIZE_T cObjectIDRangeLength[ ]); - + END_INTERFACE } ICorProfilerCallback4Vtbl; @@ -3406,281 +3425,281 @@ EXTERN_C const IID IID_ICorProfilerCallback4; CONST_VTBL struct ICorProfilerCallback4Vtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ICorProfilerCallback4_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ICorProfilerCallback4_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ICorProfilerCallback4_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ICorProfilerCallback4_Initialize(This,pICorProfilerInfoUnk) \ - ( (This)->lpVtbl -> Initialize(This,pICorProfilerInfoUnk) ) + ( (This)->lpVtbl -> Initialize(This,pICorProfilerInfoUnk) ) #define ICorProfilerCallback4_Shutdown(This) \ - ( (This)->lpVtbl -> Shutdown(This) ) + ( (This)->lpVtbl -> Shutdown(This) ) #define ICorProfilerCallback4_AppDomainCreationStarted(This,appDomainId) \ - ( (This)->lpVtbl -> AppDomainCreationStarted(This,appDomainId) ) + ( (This)->lpVtbl -> AppDomainCreationStarted(This,appDomainId) ) #define ICorProfilerCallback4_AppDomainCreationFinished(This,appDomainId,hrStatus) \ - ( (This)->lpVtbl -> AppDomainCreationFinished(This,appDomainId,hrStatus) ) + ( (This)->lpVtbl -> AppDomainCreationFinished(This,appDomainId,hrStatus) ) #define ICorProfilerCallback4_AppDomainShutdownStarted(This,appDomainId) \ - ( (This)->lpVtbl -> AppDomainShutdownStarted(This,appDomainId) ) + ( (This)->lpVtbl -> AppDomainShutdownStarted(This,appDomainId) ) #define ICorProfilerCallback4_AppDomainShutdownFinished(This,appDomainId,hrStatus) \ - ( (This)->lpVtbl -> AppDomainShutdownFinished(This,appDomainId,hrStatus) ) + ( (This)->lpVtbl -> AppDomainShutdownFinished(This,appDomainId,hrStatus) ) #define ICorProfilerCallback4_AssemblyLoadStarted(This,assemblyId) \ - ( (This)->lpVtbl -> AssemblyLoadStarted(This,assemblyId) ) + ( (This)->lpVtbl -> AssemblyLoadStarted(This,assemblyId) ) #define ICorProfilerCallback4_AssemblyLoadFinished(This,assemblyId,hrStatus) \ - ( (This)->lpVtbl -> AssemblyLoadFinished(This,assemblyId,hrStatus) ) + ( (This)->lpVtbl -> AssemblyLoadFinished(This,assemblyId,hrStatus) ) #define ICorProfilerCallback4_AssemblyUnloadStarted(This,assemblyId) \ - ( (This)->lpVtbl -> AssemblyUnloadStarted(This,assemblyId) ) + ( (This)->lpVtbl -> AssemblyUnloadStarted(This,assemblyId) ) #define ICorProfilerCallback4_AssemblyUnloadFinished(This,assemblyId,hrStatus) \ - ( (This)->lpVtbl -> AssemblyUnloadFinished(This,assemblyId,hrStatus) ) + ( (This)->lpVtbl -> AssemblyUnloadFinished(This,assemblyId,hrStatus) ) #define ICorProfilerCallback4_ModuleLoadStarted(This,moduleId) \ - ( (This)->lpVtbl -> ModuleLoadStarted(This,moduleId) ) + ( (This)->lpVtbl -> ModuleLoadStarted(This,moduleId) ) #define ICorProfilerCallback4_ModuleLoadFinished(This,moduleId,hrStatus) \ - ( (This)->lpVtbl -> ModuleLoadFinished(This,moduleId,hrStatus) ) + ( (This)->lpVtbl -> ModuleLoadFinished(This,moduleId,hrStatus) ) #define ICorProfilerCallback4_ModuleUnloadStarted(This,moduleId) \ - ( (This)->lpVtbl -> ModuleUnloadStarted(This,moduleId) ) + ( (This)->lpVtbl -> ModuleUnloadStarted(This,moduleId) ) #define ICorProfilerCallback4_ModuleUnloadFinished(This,moduleId,hrStatus) \ - ( (This)->lpVtbl -> ModuleUnloadFinished(This,moduleId,hrStatus) ) + ( (This)->lpVtbl -> ModuleUnloadFinished(This,moduleId,hrStatus) ) #define ICorProfilerCallback4_ModuleAttachedToAssembly(This,moduleId,AssemblyId) \ - ( (This)->lpVtbl -> ModuleAttachedToAssembly(This,moduleId,AssemblyId) ) + ( (This)->lpVtbl -> ModuleAttachedToAssembly(This,moduleId,AssemblyId) ) #define ICorProfilerCallback4_ClassLoadStarted(This,classId) \ - ( (This)->lpVtbl -> ClassLoadStarted(This,classId) ) + ( (This)->lpVtbl -> ClassLoadStarted(This,classId) ) #define ICorProfilerCallback4_ClassLoadFinished(This,classId,hrStatus) \ - ( (This)->lpVtbl -> ClassLoadFinished(This,classId,hrStatus) ) + ( (This)->lpVtbl -> ClassLoadFinished(This,classId,hrStatus) ) #define ICorProfilerCallback4_ClassUnloadStarted(This,classId) \ - ( (This)->lpVtbl -> ClassUnloadStarted(This,classId) ) + ( (This)->lpVtbl -> ClassUnloadStarted(This,classId) ) #define ICorProfilerCallback4_ClassUnloadFinished(This,classId,hrStatus) \ - ( (This)->lpVtbl -> ClassUnloadFinished(This,classId,hrStatus) ) + ( (This)->lpVtbl -> ClassUnloadFinished(This,classId,hrStatus) ) #define ICorProfilerCallback4_FunctionUnloadStarted(This,functionId) \ - ( (This)->lpVtbl -> FunctionUnloadStarted(This,functionId) ) + ( (This)->lpVtbl -> FunctionUnloadStarted(This,functionId) ) #define ICorProfilerCallback4_JITCompilationStarted(This,functionId,fIsSafeToBlock) \ - ( (This)->lpVtbl -> JITCompilationStarted(This,functionId,fIsSafeToBlock) ) + ( (This)->lpVtbl -> JITCompilationStarted(This,functionId,fIsSafeToBlock) ) #define ICorProfilerCallback4_JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \ - ( (This)->lpVtbl -> JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) ) + ( (This)->lpVtbl -> JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) ) #define ICorProfilerCallback4_JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) \ - ( (This)->lpVtbl -> JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) ) + ( (This)->lpVtbl -> JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) ) #define ICorProfilerCallback4_JITCachedFunctionSearchFinished(This,functionId,result) \ - ( (This)->lpVtbl -> JITCachedFunctionSearchFinished(This,functionId,result) ) + ( (This)->lpVtbl -> JITCachedFunctionSearchFinished(This,functionId,result) ) #define ICorProfilerCallback4_JITFunctionPitched(This,functionId) \ - ( (This)->lpVtbl -> JITFunctionPitched(This,functionId) ) + ( (This)->lpVtbl -> JITFunctionPitched(This,functionId) ) #define ICorProfilerCallback4_JITInlining(This,callerId,calleeId,pfShouldInline) \ - ( (This)->lpVtbl -> JITInlining(This,callerId,calleeId,pfShouldInline) ) + ( (This)->lpVtbl -> JITInlining(This,callerId,calleeId,pfShouldInline) ) #define ICorProfilerCallback4_ThreadCreated(This,threadId) \ - ( (This)->lpVtbl -> ThreadCreated(This,threadId) ) + ( (This)->lpVtbl -> ThreadCreated(This,threadId) ) #define ICorProfilerCallback4_ThreadDestroyed(This,threadId) \ - ( (This)->lpVtbl -> ThreadDestroyed(This,threadId) ) + ( (This)->lpVtbl -> ThreadDestroyed(This,threadId) ) #define ICorProfilerCallback4_ThreadAssignedToOSThread(This,managedThreadId,osThreadId) \ - ( (This)->lpVtbl -> ThreadAssignedToOSThread(This,managedThreadId,osThreadId) ) + ( (This)->lpVtbl -> ThreadAssignedToOSThread(This,managedThreadId,osThreadId) ) #define ICorProfilerCallback4_RemotingClientInvocationStarted(This) \ - ( (This)->lpVtbl -> RemotingClientInvocationStarted(This) ) + ( (This)->lpVtbl -> RemotingClientInvocationStarted(This) ) #define ICorProfilerCallback4_RemotingClientSendingMessage(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingClientSendingMessage(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingClientSendingMessage(This,pCookie,fIsAsync) ) #define ICorProfilerCallback4_RemotingClientReceivingReply(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingClientReceivingReply(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingClientReceivingReply(This,pCookie,fIsAsync) ) #define ICorProfilerCallback4_RemotingClientInvocationFinished(This) \ - ( (This)->lpVtbl -> RemotingClientInvocationFinished(This) ) + ( (This)->lpVtbl -> RemotingClientInvocationFinished(This) ) #define ICorProfilerCallback4_RemotingServerReceivingMessage(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingServerReceivingMessage(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingServerReceivingMessage(This,pCookie,fIsAsync) ) #define ICorProfilerCallback4_RemotingServerInvocationStarted(This) \ - ( (This)->lpVtbl -> RemotingServerInvocationStarted(This) ) + ( (This)->lpVtbl -> RemotingServerInvocationStarted(This) ) #define ICorProfilerCallback4_RemotingServerInvocationReturned(This) \ - ( (This)->lpVtbl -> RemotingServerInvocationReturned(This) ) + ( (This)->lpVtbl -> RemotingServerInvocationReturned(This) ) #define ICorProfilerCallback4_RemotingServerSendingReply(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingServerSendingReply(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingServerSendingReply(This,pCookie,fIsAsync) ) #define ICorProfilerCallback4_UnmanagedToManagedTransition(This,functionId,reason) \ - ( (This)->lpVtbl -> UnmanagedToManagedTransition(This,functionId,reason) ) + ( (This)->lpVtbl -> UnmanagedToManagedTransition(This,functionId,reason) ) #define ICorProfilerCallback4_ManagedToUnmanagedTransition(This,functionId,reason) \ - ( (This)->lpVtbl -> ManagedToUnmanagedTransition(This,functionId,reason) ) + ( (This)->lpVtbl -> ManagedToUnmanagedTransition(This,functionId,reason) ) #define ICorProfilerCallback4_RuntimeSuspendStarted(This,suspendReason) \ - ( (This)->lpVtbl -> RuntimeSuspendStarted(This,suspendReason) ) + ( (This)->lpVtbl -> RuntimeSuspendStarted(This,suspendReason) ) #define ICorProfilerCallback4_RuntimeSuspendFinished(This) \ - ( (This)->lpVtbl -> RuntimeSuspendFinished(This) ) + ( (This)->lpVtbl -> RuntimeSuspendFinished(This) ) #define ICorProfilerCallback4_RuntimeSuspendAborted(This) \ - ( (This)->lpVtbl -> RuntimeSuspendAborted(This) ) + ( (This)->lpVtbl -> RuntimeSuspendAborted(This) ) #define ICorProfilerCallback4_RuntimeResumeStarted(This) \ - ( (This)->lpVtbl -> RuntimeResumeStarted(This) ) + ( (This)->lpVtbl -> RuntimeResumeStarted(This) ) #define ICorProfilerCallback4_RuntimeResumeFinished(This) \ - ( (This)->lpVtbl -> RuntimeResumeFinished(This) ) + ( (This)->lpVtbl -> RuntimeResumeFinished(This) ) #define ICorProfilerCallback4_RuntimeThreadSuspended(This,threadId) \ - ( (This)->lpVtbl -> RuntimeThreadSuspended(This,threadId) ) + ( (This)->lpVtbl -> RuntimeThreadSuspended(This,threadId) ) #define ICorProfilerCallback4_RuntimeThreadResumed(This,threadId) \ - ( (This)->lpVtbl -> RuntimeThreadResumed(This,threadId) ) + ( (This)->lpVtbl -> RuntimeThreadResumed(This,threadId) ) #define ICorProfilerCallback4_MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \ - ( (This)->lpVtbl -> MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) ) + ( (This)->lpVtbl -> MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) ) #define ICorProfilerCallback4_ObjectAllocated(This,objectId,classId) \ - ( (This)->lpVtbl -> ObjectAllocated(This,objectId,classId) ) + ( (This)->lpVtbl -> ObjectAllocated(This,objectId,classId) ) #define ICorProfilerCallback4_ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) \ - ( (This)->lpVtbl -> ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) ) + ( (This)->lpVtbl -> ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) ) #define ICorProfilerCallback4_ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) \ - ( (This)->lpVtbl -> ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) ) + ( (This)->lpVtbl -> ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) ) #define ICorProfilerCallback4_RootReferences(This,cRootRefs,rootRefIds) \ - ( (This)->lpVtbl -> RootReferences(This,cRootRefs,rootRefIds) ) + ( (This)->lpVtbl -> RootReferences(This,cRootRefs,rootRefIds) ) #define ICorProfilerCallback4_ExceptionThrown(This,thrownObjectId) \ - ( (This)->lpVtbl -> ExceptionThrown(This,thrownObjectId) ) + ( (This)->lpVtbl -> ExceptionThrown(This,thrownObjectId) ) #define ICorProfilerCallback4_ExceptionSearchFunctionEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionSearchFunctionEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionSearchFunctionEnter(This,functionId) ) #define ICorProfilerCallback4_ExceptionSearchFunctionLeave(This) \ - ( (This)->lpVtbl -> ExceptionSearchFunctionLeave(This) ) + ( (This)->lpVtbl -> ExceptionSearchFunctionLeave(This) ) #define ICorProfilerCallback4_ExceptionSearchFilterEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionSearchFilterEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionSearchFilterEnter(This,functionId) ) #define ICorProfilerCallback4_ExceptionSearchFilterLeave(This) \ - ( (This)->lpVtbl -> ExceptionSearchFilterLeave(This) ) + ( (This)->lpVtbl -> ExceptionSearchFilterLeave(This) ) #define ICorProfilerCallback4_ExceptionSearchCatcherFound(This,functionId) \ - ( (This)->lpVtbl -> ExceptionSearchCatcherFound(This,functionId) ) + ( (This)->lpVtbl -> ExceptionSearchCatcherFound(This,functionId) ) #define ICorProfilerCallback4_ExceptionOSHandlerEnter(This,__unused) \ - ( (This)->lpVtbl -> ExceptionOSHandlerEnter(This,__unused) ) + ( (This)->lpVtbl -> ExceptionOSHandlerEnter(This,__unused) ) #define ICorProfilerCallback4_ExceptionOSHandlerLeave(This,__unused) \ - ( (This)->lpVtbl -> ExceptionOSHandlerLeave(This,__unused) ) + ( (This)->lpVtbl -> ExceptionOSHandlerLeave(This,__unused) ) #define ICorProfilerCallback4_ExceptionUnwindFunctionEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionUnwindFunctionEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionUnwindFunctionEnter(This,functionId) ) #define ICorProfilerCallback4_ExceptionUnwindFunctionLeave(This) \ - ( (This)->lpVtbl -> ExceptionUnwindFunctionLeave(This) ) + ( (This)->lpVtbl -> ExceptionUnwindFunctionLeave(This) ) #define ICorProfilerCallback4_ExceptionUnwindFinallyEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionUnwindFinallyEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionUnwindFinallyEnter(This,functionId) ) #define ICorProfilerCallback4_ExceptionUnwindFinallyLeave(This) \ - ( (This)->lpVtbl -> ExceptionUnwindFinallyLeave(This) ) + ( (This)->lpVtbl -> ExceptionUnwindFinallyLeave(This) ) #define ICorProfilerCallback4_ExceptionCatcherEnter(This,functionId,objectId) \ - ( (This)->lpVtbl -> ExceptionCatcherEnter(This,functionId,objectId) ) + ( (This)->lpVtbl -> ExceptionCatcherEnter(This,functionId,objectId) ) #define ICorProfilerCallback4_ExceptionCatcherLeave(This) \ - ( (This)->lpVtbl -> ExceptionCatcherLeave(This) ) + ( (This)->lpVtbl -> ExceptionCatcherLeave(This) ) #define ICorProfilerCallback4_COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) \ - ( (This)->lpVtbl -> COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) ) + ( (This)->lpVtbl -> COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) ) #define ICorProfilerCallback4_COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) \ - ( (This)->lpVtbl -> COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) ) + ( (This)->lpVtbl -> COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) ) #define ICorProfilerCallback4_ExceptionCLRCatcherFound(This) \ - ( (This)->lpVtbl -> ExceptionCLRCatcherFound(This) ) + ( (This)->lpVtbl -> ExceptionCLRCatcherFound(This) ) #define ICorProfilerCallback4_ExceptionCLRCatcherExecute(This) \ - ( (This)->lpVtbl -> ExceptionCLRCatcherExecute(This) ) + ( (This)->lpVtbl -> ExceptionCLRCatcherExecute(This) ) #define ICorProfilerCallback4_ThreadNameChanged(This,threadId,cchName,name) \ - ( (This)->lpVtbl -> ThreadNameChanged(This,threadId,cchName,name) ) + ( (This)->lpVtbl -> ThreadNameChanged(This,threadId,cchName,name) ) #define ICorProfilerCallback4_GarbageCollectionStarted(This,cGenerations,generationCollected,reason) \ - ( (This)->lpVtbl -> GarbageCollectionStarted(This,cGenerations,generationCollected,reason) ) + ( (This)->lpVtbl -> GarbageCollectionStarted(This,cGenerations,generationCollected,reason) ) #define ICorProfilerCallback4_SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \ - ( (This)->lpVtbl -> SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) ) + ( (This)->lpVtbl -> SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) ) #define ICorProfilerCallback4_GarbageCollectionFinished(This) \ - ( (This)->lpVtbl -> GarbageCollectionFinished(This) ) + ( (This)->lpVtbl -> GarbageCollectionFinished(This) ) #define ICorProfilerCallback4_FinalizeableObjectQueued(This,finalizerFlags,objectID) \ - ( (This)->lpVtbl -> FinalizeableObjectQueued(This,finalizerFlags,objectID) ) + ( (This)->lpVtbl -> FinalizeableObjectQueued(This,finalizerFlags,objectID) ) #define ICorProfilerCallback4_RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) \ - ( (This)->lpVtbl -> RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) ) + ( (This)->lpVtbl -> RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) ) #define ICorProfilerCallback4_HandleCreated(This,handleId,initialObjectId) \ - ( (This)->lpVtbl -> HandleCreated(This,handleId,initialObjectId) ) + ( (This)->lpVtbl -> HandleCreated(This,handleId,initialObjectId) ) #define ICorProfilerCallback4_HandleDestroyed(This,handleId) \ - ( (This)->lpVtbl -> HandleDestroyed(This,handleId) ) + ( (This)->lpVtbl -> HandleDestroyed(This,handleId) ) #define ICorProfilerCallback4_InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) \ - ( (This)->lpVtbl -> InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) ) + ( (This)->lpVtbl -> InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) ) #define ICorProfilerCallback4_ProfilerAttachComplete(This) \ - ( (This)->lpVtbl -> ProfilerAttachComplete(This) ) + ( (This)->lpVtbl -> ProfilerAttachComplete(This) ) #define ICorProfilerCallback4_ProfilerDetachSucceeded(This) \ - ( (This)->lpVtbl -> ProfilerDetachSucceeded(This) ) + ( (This)->lpVtbl -> ProfilerDetachSucceeded(This) ) #define ICorProfilerCallback4_ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) \ - ( (This)->lpVtbl -> ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) ) + ( (This)->lpVtbl -> ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) ) #define ICorProfilerCallback4_GetReJITParameters(This,moduleId,methodId,pFunctionControl) \ - ( (This)->lpVtbl -> GetReJITParameters(This,moduleId,methodId,pFunctionControl) ) + ( (This)->lpVtbl -> GetReJITParameters(This,moduleId,methodId,pFunctionControl) ) #define ICorProfilerCallback4_ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) \ - ( (This)->lpVtbl -> ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) ) + ( (This)->lpVtbl -> ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) ) #define ICorProfilerCallback4_ReJITError(This,moduleId,methodId,functionId,hrStatus) \ - ( (This)->lpVtbl -> ReJITError(This,moduleId,methodId,functionId,hrStatus) ) + ( (This)->lpVtbl -> ReJITError(This,moduleId,methodId,functionId,hrStatus) ) #define ICorProfilerCallback4_MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \ - ( (This)->lpVtbl -> MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) ) + ( (This)->lpVtbl -> MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) ) #define ICorProfilerCallback4_SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \ - ( (This)->lpVtbl -> SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) ) + ( (This)->lpVtbl -> SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) ) #endif /* COBJMACROS */ @@ -3697,445 +3716,445 @@ EXTERN_C const IID IID_ICorProfilerCallback4; #define __ICorProfilerCallback5_INTERFACE_DEFINED__ /* interface ICorProfilerCallback5 */ -/* [local][unique][uuid][object] */ +/* [local][unique][uuid][object] */ EXTERN_C const IID IID_ICorProfilerCallback5; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("8DFBA405-8C9F-45F8-BFFA-83B14CEF78B5") ICorProfilerCallback5 : public ICorProfilerCallback4 { public: - virtual HRESULT STDMETHODCALLTYPE ConditionalWeakTableElementReferences( + virtual HRESULT STDMETHODCALLTYPE ConditionalWeakTableElementReferences( /* [in] */ ULONG cRootRefs, /* [size_is][in] */ ObjectID keyRefIds[ ], /* [size_is][in] */ ObjectID valueRefIds[ ], /* [size_is][in] */ GCHandleID rootIds[ ]) = 0; - + }; - - + + #else /* C style interface */ typedef struct ICorProfilerCallback5Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorProfilerCallback5 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorProfilerCallback5 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorProfilerCallback5 * This); - - HRESULT ( STDMETHODCALLTYPE *Initialize )( + + HRESULT ( STDMETHODCALLTYPE *Initialize )( ICorProfilerCallback5 * This, /* [in] */ IUnknown *pICorProfilerInfoUnk); - - HRESULT ( STDMETHODCALLTYPE *Shutdown )( + + HRESULT ( STDMETHODCALLTYPE *Shutdown )( ICorProfilerCallback5 * This); - - HRESULT ( STDMETHODCALLTYPE *AppDomainCreationStarted )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainCreationStarted )( ICorProfilerCallback5 * This, /* [in] */ AppDomainID appDomainId); - - HRESULT ( STDMETHODCALLTYPE *AppDomainCreationFinished )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainCreationFinished )( ICorProfilerCallback5 * This, /* [in] */ AppDomainID appDomainId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownStarted )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownStarted )( ICorProfilerCallback5 * This, /* [in] */ AppDomainID appDomainId); - - HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownFinished )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownFinished )( ICorProfilerCallback5 * This, /* [in] */ AppDomainID appDomainId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *AssemblyLoadStarted )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyLoadStarted )( ICorProfilerCallback5 * This, /* [in] */ AssemblyID assemblyId); - - HRESULT ( STDMETHODCALLTYPE *AssemblyLoadFinished )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyLoadFinished )( ICorProfilerCallback5 * This, /* [in] */ AssemblyID assemblyId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadStarted )( ICorProfilerCallback5 * This, /* [in] */ AssemblyID assemblyId); - - HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadFinished )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadFinished )( ICorProfilerCallback5 * This, /* [in] */ AssemblyID assemblyId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ModuleLoadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ModuleLoadStarted )( ICorProfilerCallback5 * This, /* [in] */ ModuleID moduleId); - - HRESULT ( STDMETHODCALLTYPE *ModuleLoadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ModuleLoadFinished )( ICorProfilerCallback5 * This, /* [in] */ ModuleID moduleId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ModuleUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ModuleUnloadStarted )( ICorProfilerCallback5 * This, /* [in] */ ModuleID moduleId); - - HRESULT ( STDMETHODCALLTYPE *ModuleUnloadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ModuleUnloadFinished )( ICorProfilerCallback5 * This, /* [in] */ ModuleID moduleId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ModuleAttachedToAssembly )( + + HRESULT ( STDMETHODCALLTYPE *ModuleAttachedToAssembly )( ICorProfilerCallback5 * This, /* [in] */ ModuleID moduleId, /* [in] */ AssemblyID AssemblyId); - - HRESULT ( STDMETHODCALLTYPE *ClassLoadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ClassLoadStarted )( ICorProfilerCallback5 * This, /* [in] */ ClassID classId); - - HRESULT ( STDMETHODCALLTYPE *ClassLoadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ClassLoadFinished )( ICorProfilerCallback5 * This, /* [in] */ ClassID classId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ClassUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ClassUnloadStarted )( ICorProfilerCallback5 * This, /* [in] */ ClassID classId); - - HRESULT ( STDMETHODCALLTYPE *ClassUnloadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ClassUnloadFinished )( ICorProfilerCallback5 * This, /* [in] */ ClassID classId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *FunctionUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *FunctionUnloadStarted )( ICorProfilerCallback5 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *JITCompilationStarted )( + + HRESULT ( STDMETHODCALLTYPE *JITCompilationStarted )( ICorProfilerCallback5 * This, /* [in] */ FunctionID functionId, /* [in] */ BOOL fIsSafeToBlock); - - HRESULT ( STDMETHODCALLTYPE *JITCompilationFinished )( + + HRESULT ( STDMETHODCALLTYPE *JITCompilationFinished )( ICorProfilerCallback5 * This, /* [in] */ FunctionID functionId, /* [in] */ HRESULT hrStatus, /* [in] */ BOOL fIsSafeToBlock); - - HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchStarted )( + + HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchStarted )( ICorProfilerCallback5 * This, /* [in] */ FunctionID functionId, /* [out] */ BOOL *pbUseCachedFunction); - - HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchFinished )( + + HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchFinished )( ICorProfilerCallback5 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_JIT_CACHE result); - - HRESULT ( STDMETHODCALLTYPE *JITFunctionPitched )( + + HRESULT ( STDMETHODCALLTYPE *JITFunctionPitched )( ICorProfilerCallback5 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *JITInlining )( + + HRESULT ( STDMETHODCALLTYPE *JITInlining )( ICorProfilerCallback5 * This, /* [in] */ FunctionID callerId, /* [in] */ FunctionID calleeId, /* [out] */ BOOL *pfShouldInline); - - HRESULT ( STDMETHODCALLTYPE *ThreadCreated )( + + HRESULT ( STDMETHODCALLTYPE *ThreadCreated )( ICorProfilerCallback5 * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *ThreadDestroyed )( + + HRESULT ( STDMETHODCALLTYPE *ThreadDestroyed )( ICorProfilerCallback5 * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *ThreadAssignedToOSThread )( + + HRESULT ( STDMETHODCALLTYPE *ThreadAssignedToOSThread )( ICorProfilerCallback5 * This, /* [in] */ ThreadID managedThreadId, /* [in] */ DWORD osThreadId); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationStarted )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationStarted )( ICorProfilerCallback5 * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientSendingMessage )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientSendingMessage )( ICorProfilerCallback5 * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientReceivingReply )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientReceivingReply )( ICorProfilerCallback5 * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationFinished )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationFinished )( ICorProfilerCallback5 * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerReceivingMessage )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerReceivingMessage )( ICorProfilerCallback5 * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationStarted )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationStarted )( ICorProfilerCallback5 * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationReturned )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationReturned )( ICorProfilerCallback5 * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerSendingReply )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerSendingReply )( ICorProfilerCallback5 * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *UnmanagedToManagedTransition )( + + HRESULT ( STDMETHODCALLTYPE *UnmanagedToManagedTransition )( ICorProfilerCallback5 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_TRANSITION_REASON reason); - - HRESULT ( STDMETHODCALLTYPE *ManagedToUnmanagedTransition )( + + HRESULT ( STDMETHODCALLTYPE *ManagedToUnmanagedTransition )( ICorProfilerCallback5 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_TRANSITION_REASON reason); - - HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendStarted )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendStarted )( ICorProfilerCallback5 * This, /* [in] */ COR_PRF_SUSPEND_REASON suspendReason); - - HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendFinished )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendFinished )( ICorProfilerCallback5 * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendAborted )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendAborted )( ICorProfilerCallback5 * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeResumeStarted )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeResumeStarted )( ICorProfilerCallback5 * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeResumeFinished )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeResumeFinished )( ICorProfilerCallback5 * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeThreadSuspended )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeThreadSuspended )( ICorProfilerCallback5 * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *RuntimeThreadResumed )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeThreadResumed )( ICorProfilerCallback5 * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *MovedReferences )( + + HRESULT ( STDMETHODCALLTYPE *MovedReferences )( ICorProfilerCallback5 * This, /* [in] */ ULONG cMovedObjectIDRanges, /* [size_is][in] */ ObjectID oldObjectIDRangeStart[ ], /* [size_is][in] */ ObjectID newObjectIDRangeStart[ ], /* [size_is][in] */ ULONG cObjectIDRangeLength[ ]); - - HRESULT ( STDMETHODCALLTYPE *ObjectAllocated )( + + HRESULT ( STDMETHODCALLTYPE *ObjectAllocated )( ICorProfilerCallback5 * This, /* [in] */ ObjectID objectId, /* [in] */ ClassID classId); - - HRESULT ( STDMETHODCALLTYPE *ObjectsAllocatedByClass )( + + HRESULT ( STDMETHODCALLTYPE *ObjectsAllocatedByClass )( ICorProfilerCallback5 * This, /* [in] */ ULONG cClassCount, /* [size_is][in] */ ClassID classIds[ ], /* [size_is][in] */ ULONG cObjects[ ]); - - HRESULT ( STDMETHODCALLTYPE *ObjectReferences )( + + HRESULT ( STDMETHODCALLTYPE *ObjectReferences )( ICorProfilerCallback5 * This, /* [in] */ ObjectID objectId, /* [in] */ ClassID classId, /* [in] */ ULONG cObjectRefs, /* [size_is][in] */ ObjectID objectRefIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *RootReferences )( + + HRESULT ( STDMETHODCALLTYPE *RootReferences )( ICorProfilerCallback5 * This, /* [in] */ ULONG cRootRefs, /* [size_is][in] */ ObjectID rootRefIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *ExceptionThrown )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionThrown )( ICorProfilerCallback5 * This, /* [in] */ ObjectID thrownObjectId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionEnter )( ICorProfilerCallback5 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionLeave )( ICorProfilerCallback5 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterEnter )( ICorProfilerCallback5 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterLeave )( ICorProfilerCallback5 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchCatcherFound )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchCatcherFound )( ICorProfilerCallback5 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerEnter )( ICorProfilerCallback5 * This, /* [in] */ UINT_PTR __unused); - - HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerLeave )( ICorProfilerCallback5 * This, /* [in] */ UINT_PTR __unused); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionEnter )( ICorProfilerCallback5 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionLeave )( ICorProfilerCallback5 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyEnter )( ICorProfilerCallback5 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyLeave )( ICorProfilerCallback5 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherEnter )( ICorProfilerCallback5 * This, /* [in] */ FunctionID functionId, /* [in] */ ObjectID objectId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherLeave )( ICorProfilerCallback5 * This); - - HRESULT ( STDMETHODCALLTYPE *COMClassicVTableCreated )( + + HRESULT ( STDMETHODCALLTYPE *COMClassicVTableCreated )( ICorProfilerCallback5 * This, /* [in] */ ClassID wrappedClassId, /* [in] */ REFGUID implementedIID, /* [in] */ void *pVTable, /* [in] */ ULONG cSlots); - - HRESULT ( STDMETHODCALLTYPE *COMClassicVTableDestroyed )( + + HRESULT ( STDMETHODCALLTYPE *COMClassicVTableDestroyed )( ICorProfilerCallback5 * This, /* [in] */ ClassID wrappedClassId, /* [in] */ REFGUID implementedIID, /* [in] */ void *pVTable); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherFound )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherFound )( ICorProfilerCallback5 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherExecute )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherExecute )( ICorProfilerCallback5 * This); - - HRESULT ( STDMETHODCALLTYPE *ThreadNameChanged )( + + HRESULT ( STDMETHODCALLTYPE *ThreadNameChanged )( ICorProfilerCallback5 * This, /* [in] */ ThreadID threadId, /* [in] */ ULONG cchName, - /* [annotation][in] */ + /* [annotation][in] */ _In_reads_opt_(cchName) WCHAR name[ ]); - - HRESULT ( STDMETHODCALLTYPE *GarbageCollectionStarted )( + + HRESULT ( STDMETHODCALLTYPE *GarbageCollectionStarted )( ICorProfilerCallback5 * This, /* [in] */ int cGenerations, /* [size_is][in] */ BOOL generationCollected[ ], /* [in] */ COR_PRF_GC_REASON reason); - - HRESULT ( STDMETHODCALLTYPE *SurvivingReferences )( + + HRESULT ( STDMETHODCALLTYPE *SurvivingReferences )( ICorProfilerCallback5 * This, /* [in] */ ULONG cSurvivingObjectIDRanges, /* [size_is][in] */ ObjectID objectIDRangeStart[ ], /* [size_is][in] */ ULONG cObjectIDRangeLength[ ]); - - HRESULT ( STDMETHODCALLTYPE *GarbageCollectionFinished )( + + HRESULT ( STDMETHODCALLTYPE *GarbageCollectionFinished )( ICorProfilerCallback5 * This); - - HRESULT ( STDMETHODCALLTYPE *FinalizeableObjectQueued )( + + HRESULT ( STDMETHODCALLTYPE *FinalizeableObjectQueued )( ICorProfilerCallback5 * This, /* [in] */ DWORD finalizerFlags, /* [in] */ ObjectID objectID); - - HRESULT ( STDMETHODCALLTYPE *RootReferences2 )( + + HRESULT ( STDMETHODCALLTYPE *RootReferences2 )( ICorProfilerCallback5 * This, /* [in] */ ULONG cRootRefs, /* [size_is][in] */ ObjectID rootRefIds[ ], /* [size_is][in] */ COR_PRF_GC_ROOT_KIND rootKinds[ ], /* [size_is][in] */ COR_PRF_GC_ROOT_FLAGS rootFlags[ ], /* [size_is][in] */ UINT_PTR rootIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *HandleCreated )( + + HRESULT ( STDMETHODCALLTYPE *HandleCreated )( ICorProfilerCallback5 * This, /* [in] */ GCHandleID handleId, /* [in] */ ObjectID initialObjectId); - - HRESULT ( STDMETHODCALLTYPE *HandleDestroyed )( + + HRESULT ( STDMETHODCALLTYPE *HandleDestroyed )( ICorProfilerCallback5 * This, /* [in] */ GCHandleID handleId); - - HRESULT ( STDMETHODCALLTYPE *InitializeForAttach )( + + HRESULT ( STDMETHODCALLTYPE *InitializeForAttach )( ICorProfilerCallback5 * This, /* [in] */ IUnknown *pCorProfilerInfoUnk, /* [in] */ void *pvClientData, /* [in] */ UINT cbClientData); - - HRESULT ( STDMETHODCALLTYPE *ProfilerAttachComplete )( + + HRESULT ( STDMETHODCALLTYPE *ProfilerAttachComplete )( ICorProfilerCallback5 * This); - - HRESULT ( STDMETHODCALLTYPE *ProfilerDetachSucceeded )( + + HRESULT ( STDMETHODCALLTYPE *ProfilerDetachSucceeded )( ICorProfilerCallback5 * This); - - HRESULT ( STDMETHODCALLTYPE *ReJITCompilationStarted )( + + HRESULT ( STDMETHODCALLTYPE *ReJITCompilationStarted )( ICorProfilerCallback5 * This, /* [in] */ FunctionID functionId, /* [in] */ ReJITID rejitId, /* [in] */ BOOL fIsSafeToBlock); - - HRESULT ( STDMETHODCALLTYPE *GetReJITParameters )( + + HRESULT ( STDMETHODCALLTYPE *GetReJITParameters )( ICorProfilerCallback5 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodId, /* [in] */ ICorProfilerFunctionControl *pFunctionControl); - - HRESULT ( STDMETHODCALLTYPE *ReJITCompilationFinished )( + + HRESULT ( STDMETHODCALLTYPE *ReJITCompilationFinished )( ICorProfilerCallback5 * This, /* [in] */ FunctionID functionId, /* [in] */ ReJITID rejitId, /* [in] */ HRESULT hrStatus, /* [in] */ BOOL fIsSafeToBlock); - - HRESULT ( STDMETHODCALLTYPE *ReJITError )( + + HRESULT ( STDMETHODCALLTYPE *ReJITError )( ICorProfilerCallback5 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodId, /* [in] */ FunctionID functionId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *MovedReferences2 )( + + HRESULT ( STDMETHODCALLTYPE *MovedReferences2 )( ICorProfilerCallback5 * This, /* [in] */ ULONG cMovedObjectIDRanges, /* [size_is][in] */ ObjectID oldObjectIDRangeStart[ ], /* [size_is][in] */ ObjectID newObjectIDRangeStart[ ], /* [size_is][in] */ SIZE_T cObjectIDRangeLength[ ]); - - HRESULT ( STDMETHODCALLTYPE *SurvivingReferences2 )( + + HRESULT ( STDMETHODCALLTYPE *SurvivingReferences2 )( ICorProfilerCallback5 * This, /* [in] */ ULONG cSurvivingObjectIDRanges, /* [size_is][in] */ ObjectID objectIDRangeStart[ ], /* [size_is][in] */ SIZE_T cObjectIDRangeLength[ ]); - - HRESULT ( STDMETHODCALLTYPE *ConditionalWeakTableElementReferences )( + + HRESULT ( STDMETHODCALLTYPE *ConditionalWeakTableElementReferences )( ICorProfilerCallback5 * This, /* [in] */ ULONG cRootRefs, /* [size_is][in] */ ObjectID keyRefIds[ ], /* [size_is][in] */ ObjectID valueRefIds[ ], /* [size_is][in] */ GCHandleID rootIds[ ]); - + END_INTERFACE } ICorProfilerCallback5Vtbl; @@ -4144,285 +4163,285 @@ EXTERN_C const IID IID_ICorProfilerCallback5; CONST_VTBL struct ICorProfilerCallback5Vtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ICorProfilerCallback5_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ICorProfilerCallback5_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ICorProfilerCallback5_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ICorProfilerCallback5_Initialize(This,pICorProfilerInfoUnk) \ - ( (This)->lpVtbl -> Initialize(This,pICorProfilerInfoUnk) ) + ( (This)->lpVtbl -> Initialize(This,pICorProfilerInfoUnk) ) #define ICorProfilerCallback5_Shutdown(This) \ - ( (This)->lpVtbl -> Shutdown(This) ) + ( (This)->lpVtbl -> Shutdown(This) ) #define ICorProfilerCallback5_AppDomainCreationStarted(This,appDomainId) \ - ( (This)->lpVtbl -> AppDomainCreationStarted(This,appDomainId) ) + ( (This)->lpVtbl -> AppDomainCreationStarted(This,appDomainId) ) #define ICorProfilerCallback5_AppDomainCreationFinished(This,appDomainId,hrStatus) \ - ( (This)->lpVtbl -> AppDomainCreationFinished(This,appDomainId,hrStatus) ) + ( (This)->lpVtbl -> AppDomainCreationFinished(This,appDomainId,hrStatus) ) #define ICorProfilerCallback5_AppDomainShutdownStarted(This,appDomainId) \ - ( (This)->lpVtbl -> AppDomainShutdownStarted(This,appDomainId) ) + ( (This)->lpVtbl -> AppDomainShutdownStarted(This,appDomainId) ) #define ICorProfilerCallback5_AppDomainShutdownFinished(This,appDomainId,hrStatus) \ - ( (This)->lpVtbl -> AppDomainShutdownFinished(This,appDomainId,hrStatus) ) + ( (This)->lpVtbl -> AppDomainShutdownFinished(This,appDomainId,hrStatus) ) #define ICorProfilerCallback5_AssemblyLoadStarted(This,assemblyId) \ - ( (This)->lpVtbl -> AssemblyLoadStarted(This,assemblyId) ) + ( (This)->lpVtbl -> AssemblyLoadStarted(This,assemblyId) ) #define ICorProfilerCallback5_AssemblyLoadFinished(This,assemblyId,hrStatus) \ - ( (This)->lpVtbl -> AssemblyLoadFinished(This,assemblyId,hrStatus) ) + ( (This)->lpVtbl -> AssemblyLoadFinished(This,assemblyId,hrStatus) ) #define ICorProfilerCallback5_AssemblyUnloadStarted(This,assemblyId) \ - ( (This)->lpVtbl -> AssemblyUnloadStarted(This,assemblyId) ) + ( (This)->lpVtbl -> AssemblyUnloadStarted(This,assemblyId) ) #define ICorProfilerCallback5_AssemblyUnloadFinished(This,assemblyId,hrStatus) \ - ( (This)->lpVtbl -> AssemblyUnloadFinished(This,assemblyId,hrStatus) ) + ( (This)->lpVtbl -> AssemblyUnloadFinished(This,assemblyId,hrStatus) ) #define ICorProfilerCallback5_ModuleLoadStarted(This,moduleId) \ - ( (This)->lpVtbl -> ModuleLoadStarted(This,moduleId) ) + ( (This)->lpVtbl -> ModuleLoadStarted(This,moduleId) ) #define ICorProfilerCallback5_ModuleLoadFinished(This,moduleId,hrStatus) \ - ( (This)->lpVtbl -> ModuleLoadFinished(This,moduleId,hrStatus) ) + ( (This)->lpVtbl -> ModuleLoadFinished(This,moduleId,hrStatus) ) #define ICorProfilerCallback5_ModuleUnloadStarted(This,moduleId) \ - ( (This)->lpVtbl -> ModuleUnloadStarted(This,moduleId) ) + ( (This)->lpVtbl -> ModuleUnloadStarted(This,moduleId) ) #define ICorProfilerCallback5_ModuleUnloadFinished(This,moduleId,hrStatus) \ - ( (This)->lpVtbl -> ModuleUnloadFinished(This,moduleId,hrStatus) ) + ( (This)->lpVtbl -> ModuleUnloadFinished(This,moduleId,hrStatus) ) #define ICorProfilerCallback5_ModuleAttachedToAssembly(This,moduleId,AssemblyId) \ - ( (This)->lpVtbl -> ModuleAttachedToAssembly(This,moduleId,AssemblyId) ) + ( (This)->lpVtbl -> ModuleAttachedToAssembly(This,moduleId,AssemblyId) ) #define ICorProfilerCallback5_ClassLoadStarted(This,classId) \ - ( (This)->lpVtbl -> ClassLoadStarted(This,classId) ) + ( (This)->lpVtbl -> ClassLoadStarted(This,classId) ) #define ICorProfilerCallback5_ClassLoadFinished(This,classId,hrStatus) \ - ( (This)->lpVtbl -> ClassLoadFinished(This,classId,hrStatus) ) + ( (This)->lpVtbl -> ClassLoadFinished(This,classId,hrStatus) ) #define ICorProfilerCallback5_ClassUnloadStarted(This,classId) \ - ( (This)->lpVtbl -> ClassUnloadStarted(This,classId) ) + ( (This)->lpVtbl -> ClassUnloadStarted(This,classId) ) #define ICorProfilerCallback5_ClassUnloadFinished(This,classId,hrStatus) \ - ( (This)->lpVtbl -> ClassUnloadFinished(This,classId,hrStatus) ) + ( (This)->lpVtbl -> ClassUnloadFinished(This,classId,hrStatus) ) #define ICorProfilerCallback5_FunctionUnloadStarted(This,functionId) \ - ( (This)->lpVtbl -> FunctionUnloadStarted(This,functionId) ) + ( (This)->lpVtbl -> FunctionUnloadStarted(This,functionId) ) #define ICorProfilerCallback5_JITCompilationStarted(This,functionId,fIsSafeToBlock) \ - ( (This)->lpVtbl -> JITCompilationStarted(This,functionId,fIsSafeToBlock) ) + ( (This)->lpVtbl -> JITCompilationStarted(This,functionId,fIsSafeToBlock) ) #define ICorProfilerCallback5_JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \ - ( (This)->lpVtbl -> JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) ) + ( (This)->lpVtbl -> JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) ) #define ICorProfilerCallback5_JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) \ - ( (This)->lpVtbl -> JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) ) + ( (This)->lpVtbl -> JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) ) #define ICorProfilerCallback5_JITCachedFunctionSearchFinished(This,functionId,result) \ - ( (This)->lpVtbl -> JITCachedFunctionSearchFinished(This,functionId,result) ) + ( (This)->lpVtbl -> JITCachedFunctionSearchFinished(This,functionId,result) ) #define ICorProfilerCallback5_JITFunctionPitched(This,functionId) \ - ( (This)->lpVtbl -> JITFunctionPitched(This,functionId) ) + ( (This)->lpVtbl -> JITFunctionPitched(This,functionId) ) #define ICorProfilerCallback5_JITInlining(This,callerId,calleeId,pfShouldInline) \ - ( (This)->lpVtbl -> JITInlining(This,callerId,calleeId,pfShouldInline) ) + ( (This)->lpVtbl -> JITInlining(This,callerId,calleeId,pfShouldInline) ) #define ICorProfilerCallback5_ThreadCreated(This,threadId) \ - ( (This)->lpVtbl -> ThreadCreated(This,threadId) ) + ( (This)->lpVtbl -> ThreadCreated(This,threadId) ) #define ICorProfilerCallback5_ThreadDestroyed(This,threadId) \ - ( (This)->lpVtbl -> ThreadDestroyed(This,threadId) ) + ( (This)->lpVtbl -> ThreadDestroyed(This,threadId) ) #define ICorProfilerCallback5_ThreadAssignedToOSThread(This,managedThreadId,osThreadId) \ - ( (This)->lpVtbl -> ThreadAssignedToOSThread(This,managedThreadId,osThreadId) ) + ( (This)->lpVtbl -> ThreadAssignedToOSThread(This,managedThreadId,osThreadId) ) #define ICorProfilerCallback5_RemotingClientInvocationStarted(This) \ - ( (This)->lpVtbl -> RemotingClientInvocationStarted(This) ) + ( (This)->lpVtbl -> RemotingClientInvocationStarted(This) ) #define ICorProfilerCallback5_RemotingClientSendingMessage(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingClientSendingMessage(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingClientSendingMessage(This,pCookie,fIsAsync) ) #define ICorProfilerCallback5_RemotingClientReceivingReply(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingClientReceivingReply(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingClientReceivingReply(This,pCookie,fIsAsync) ) #define ICorProfilerCallback5_RemotingClientInvocationFinished(This) \ - ( (This)->lpVtbl -> RemotingClientInvocationFinished(This) ) + ( (This)->lpVtbl -> RemotingClientInvocationFinished(This) ) #define ICorProfilerCallback5_RemotingServerReceivingMessage(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingServerReceivingMessage(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingServerReceivingMessage(This,pCookie,fIsAsync) ) #define ICorProfilerCallback5_RemotingServerInvocationStarted(This) \ - ( (This)->lpVtbl -> RemotingServerInvocationStarted(This) ) + ( (This)->lpVtbl -> RemotingServerInvocationStarted(This) ) #define ICorProfilerCallback5_RemotingServerInvocationReturned(This) \ - ( (This)->lpVtbl -> RemotingServerInvocationReturned(This) ) + ( (This)->lpVtbl -> RemotingServerInvocationReturned(This) ) #define ICorProfilerCallback5_RemotingServerSendingReply(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingServerSendingReply(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingServerSendingReply(This,pCookie,fIsAsync) ) #define ICorProfilerCallback5_UnmanagedToManagedTransition(This,functionId,reason) \ - ( (This)->lpVtbl -> UnmanagedToManagedTransition(This,functionId,reason) ) + ( (This)->lpVtbl -> UnmanagedToManagedTransition(This,functionId,reason) ) #define ICorProfilerCallback5_ManagedToUnmanagedTransition(This,functionId,reason) \ - ( (This)->lpVtbl -> ManagedToUnmanagedTransition(This,functionId,reason) ) + ( (This)->lpVtbl -> ManagedToUnmanagedTransition(This,functionId,reason) ) #define ICorProfilerCallback5_RuntimeSuspendStarted(This,suspendReason) \ - ( (This)->lpVtbl -> RuntimeSuspendStarted(This,suspendReason) ) + ( (This)->lpVtbl -> RuntimeSuspendStarted(This,suspendReason) ) #define ICorProfilerCallback5_RuntimeSuspendFinished(This) \ - ( (This)->lpVtbl -> RuntimeSuspendFinished(This) ) + ( (This)->lpVtbl -> RuntimeSuspendFinished(This) ) #define ICorProfilerCallback5_RuntimeSuspendAborted(This) \ - ( (This)->lpVtbl -> RuntimeSuspendAborted(This) ) + ( (This)->lpVtbl -> RuntimeSuspendAborted(This) ) #define ICorProfilerCallback5_RuntimeResumeStarted(This) \ - ( (This)->lpVtbl -> RuntimeResumeStarted(This) ) + ( (This)->lpVtbl -> RuntimeResumeStarted(This) ) #define ICorProfilerCallback5_RuntimeResumeFinished(This) \ - ( (This)->lpVtbl -> RuntimeResumeFinished(This) ) + ( (This)->lpVtbl -> RuntimeResumeFinished(This) ) #define ICorProfilerCallback5_RuntimeThreadSuspended(This,threadId) \ - ( (This)->lpVtbl -> RuntimeThreadSuspended(This,threadId) ) + ( (This)->lpVtbl -> RuntimeThreadSuspended(This,threadId) ) #define ICorProfilerCallback5_RuntimeThreadResumed(This,threadId) \ - ( (This)->lpVtbl -> RuntimeThreadResumed(This,threadId) ) + ( (This)->lpVtbl -> RuntimeThreadResumed(This,threadId) ) #define ICorProfilerCallback5_MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \ - ( (This)->lpVtbl -> MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) ) + ( (This)->lpVtbl -> MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) ) #define ICorProfilerCallback5_ObjectAllocated(This,objectId,classId) \ - ( (This)->lpVtbl -> ObjectAllocated(This,objectId,classId) ) + ( (This)->lpVtbl -> ObjectAllocated(This,objectId,classId) ) #define ICorProfilerCallback5_ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) \ - ( (This)->lpVtbl -> ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) ) + ( (This)->lpVtbl -> ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) ) #define ICorProfilerCallback5_ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) \ - ( (This)->lpVtbl -> ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) ) + ( (This)->lpVtbl -> ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) ) #define ICorProfilerCallback5_RootReferences(This,cRootRefs,rootRefIds) \ - ( (This)->lpVtbl -> RootReferences(This,cRootRefs,rootRefIds) ) + ( (This)->lpVtbl -> RootReferences(This,cRootRefs,rootRefIds) ) #define ICorProfilerCallback5_ExceptionThrown(This,thrownObjectId) \ - ( (This)->lpVtbl -> ExceptionThrown(This,thrownObjectId) ) + ( (This)->lpVtbl -> ExceptionThrown(This,thrownObjectId) ) #define ICorProfilerCallback5_ExceptionSearchFunctionEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionSearchFunctionEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionSearchFunctionEnter(This,functionId) ) #define ICorProfilerCallback5_ExceptionSearchFunctionLeave(This) \ - ( (This)->lpVtbl -> ExceptionSearchFunctionLeave(This) ) + ( (This)->lpVtbl -> ExceptionSearchFunctionLeave(This) ) #define ICorProfilerCallback5_ExceptionSearchFilterEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionSearchFilterEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionSearchFilterEnter(This,functionId) ) #define ICorProfilerCallback5_ExceptionSearchFilterLeave(This) \ - ( (This)->lpVtbl -> ExceptionSearchFilterLeave(This) ) + ( (This)->lpVtbl -> ExceptionSearchFilterLeave(This) ) #define ICorProfilerCallback5_ExceptionSearchCatcherFound(This,functionId) \ - ( (This)->lpVtbl -> ExceptionSearchCatcherFound(This,functionId) ) + ( (This)->lpVtbl -> ExceptionSearchCatcherFound(This,functionId) ) #define ICorProfilerCallback5_ExceptionOSHandlerEnter(This,__unused) \ - ( (This)->lpVtbl -> ExceptionOSHandlerEnter(This,__unused) ) + ( (This)->lpVtbl -> ExceptionOSHandlerEnter(This,__unused) ) #define ICorProfilerCallback5_ExceptionOSHandlerLeave(This,__unused) \ - ( (This)->lpVtbl -> ExceptionOSHandlerLeave(This,__unused) ) + ( (This)->lpVtbl -> ExceptionOSHandlerLeave(This,__unused) ) #define ICorProfilerCallback5_ExceptionUnwindFunctionEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionUnwindFunctionEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionUnwindFunctionEnter(This,functionId) ) #define ICorProfilerCallback5_ExceptionUnwindFunctionLeave(This) \ - ( (This)->lpVtbl -> ExceptionUnwindFunctionLeave(This) ) + ( (This)->lpVtbl -> ExceptionUnwindFunctionLeave(This) ) #define ICorProfilerCallback5_ExceptionUnwindFinallyEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionUnwindFinallyEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionUnwindFinallyEnter(This,functionId) ) #define ICorProfilerCallback5_ExceptionUnwindFinallyLeave(This) \ - ( (This)->lpVtbl -> ExceptionUnwindFinallyLeave(This) ) + ( (This)->lpVtbl -> ExceptionUnwindFinallyLeave(This) ) #define ICorProfilerCallback5_ExceptionCatcherEnter(This,functionId,objectId) \ - ( (This)->lpVtbl -> ExceptionCatcherEnter(This,functionId,objectId) ) + ( (This)->lpVtbl -> ExceptionCatcherEnter(This,functionId,objectId) ) #define ICorProfilerCallback5_ExceptionCatcherLeave(This) \ - ( (This)->lpVtbl -> ExceptionCatcherLeave(This) ) + ( (This)->lpVtbl -> ExceptionCatcherLeave(This) ) #define ICorProfilerCallback5_COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) \ - ( (This)->lpVtbl -> COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) ) + ( (This)->lpVtbl -> COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) ) #define ICorProfilerCallback5_COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) \ - ( (This)->lpVtbl -> COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) ) + ( (This)->lpVtbl -> COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) ) #define ICorProfilerCallback5_ExceptionCLRCatcherFound(This) \ - ( (This)->lpVtbl -> ExceptionCLRCatcherFound(This) ) + ( (This)->lpVtbl -> ExceptionCLRCatcherFound(This) ) #define ICorProfilerCallback5_ExceptionCLRCatcherExecute(This) \ - ( (This)->lpVtbl -> ExceptionCLRCatcherExecute(This) ) + ( (This)->lpVtbl -> ExceptionCLRCatcherExecute(This) ) #define ICorProfilerCallback5_ThreadNameChanged(This,threadId,cchName,name) \ - ( (This)->lpVtbl -> ThreadNameChanged(This,threadId,cchName,name) ) + ( (This)->lpVtbl -> ThreadNameChanged(This,threadId,cchName,name) ) #define ICorProfilerCallback5_GarbageCollectionStarted(This,cGenerations,generationCollected,reason) \ - ( (This)->lpVtbl -> GarbageCollectionStarted(This,cGenerations,generationCollected,reason) ) + ( (This)->lpVtbl -> GarbageCollectionStarted(This,cGenerations,generationCollected,reason) ) #define ICorProfilerCallback5_SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \ - ( (This)->lpVtbl -> SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) ) + ( (This)->lpVtbl -> SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) ) #define ICorProfilerCallback5_GarbageCollectionFinished(This) \ - ( (This)->lpVtbl -> GarbageCollectionFinished(This) ) + ( (This)->lpVtbl -> GarbageCollectionFinished(This) ) #define ICorProfilerCallback5_FinalizeableObjectQueued(This,finalizerFlags,objectID) \ - ( (This)->lpVtbl -> FinalizeableObjectQueued(This,finalizerFlags,objectID) ) + ( (This)->lpVtbl -> FinalizeableObjectQueued(This,finalizerFlags,objectID) ) #define ICorProfilerCallback5_RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) \ - ( (This)->lpVtbl -> RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) ) + ( (This)->lpVtbl -> RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) ) #define ICorProfilerCallback5_HandleCreated(This,handleId,initialObjectId) \ - ( (This)->lpVtbl -> HandleCreated(This,handleId,initialObjectId) ) + ( (This)->lpVtbl -> HandleCreated(This,handleId,initialObjectId) ) #define ICorProfilerCallback5_HandleDestroyed(This,handleId) \ - ( (This)->lpVtbl -> HandleDestroyed(This,handleId) ) + ( (This)->lpVtbl -> HandleDestroyed(This,handleId) ) #define ICorProfilerCallback5_InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) \ - ( (This)->lpVtbl -> InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) ) + ( (This)->lpVtbl -> InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) ) #define ICorProfilerCallback5_ProfilerAttachComplete(This) \ - ( (This)->lpVtbl -> ProfilerAttachComplete(This) ) + ( (This)->lpVtbl -> ProfilerAttachComplete(This) ) #define ICorProfilerCallback5_ProfilerDetachSucceeded(This) \ - ( (This)->lpVtbl -> ProfilerDetachSucceeded(This) ) + ( (This)->lpVtbl -> ProfilerDetachSucceeded(This) ) #define ICorProfilerCallback5_ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) \ - ( (This)->lpVtbl -> ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) ) + ( (This)->lpVtbl -> ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) ) #define ICorProfilerCallback5_GetReJITParameters(This,moduleId,methodId,pFunctionControl) \ - ( (This)->lpVtbl -> GetReJITParameters(This,moduleId,methodId,pFunctionControl) ) + ( (This)->lpVtbl -> GetReJITParameters(This,moduleId,methodId,pFunctionControl) ) #define ICorProfilerCallback5_ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) \ - ( (This)->lpVtbl -> ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) ) + ( (This)->lpVtbl -> ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) ) #define ICorProfilerCallback5_ReJITError(This,moduleId,methodId,functionId,hrStatus) \ - ( (This)->lpVtbl -> ReJITError(This,moduleId,methodId,functionId,hrStatus) ) + ( (This)->lpVtbl -> ReJITError(This,moduleId,methodId,functionId,hrStatus) ) #define ICorProfilerCallback5_MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \ - ( (This)->lpVtbl -> MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) ) + ( (This)->lpVtbl -> MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) ) #define ICorProfilerCallback5_SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \ - ( (This)->lpVtbl -> SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) ) + ( (This)->lpVtbl -> SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) ) #define ICorProfilerCallback5_ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) \ - ( (This)->lpVtbl -> ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) ) + ( (This)->lpVtbl -> ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) ) #endif /* COBJMACROS */ @@ -4439,448 +4458,448 @@ EXTERN_C const IID IID_ICorProfilerCallback5; #define __ICorProfilerCallback6_INTERFACE_DEFINED__ /* interface ICorProfilerCallback6 */ -/* [local][unique][uuid][object] */ +/* [local][unique][uuid][object] */ EXTERN_C const IID IID_ICorProfilerCallback6; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("FC13DF4B-4448-4F4F-950C-BA8D19D00C36") ICorProfilerCallback6 : public ICorProfilerCallback5 { public: - virtual HRESULT STDMETHODCALLTYPE GetAssemblyReferences( + virtual HRESULT STDMETHODCALLTYPE GetAssemblyReferences( /* [string][in] */ const WCHAR *wszAssemblyPath, /* [in] */ ICorProfilerAssemblyReferenceProvider *pAsmRefProvider) = 0; - + }; - - + + #else /* C style interface */ typedef struct ICorProfilerCallback6Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorProfilerCallback6 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorProfilerCallback6 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorProfilerCallback6 * This); - - HRESULT ( STDMETHODCALLTYPE *Initialize )( + + HRESULT ( STDMETHODCALLTYPE *Initialize )( ICorProfilerCallback6 * This, /* [in] */ IUnknown *pICorProfilerInfoUnk); - - HRESULT ( STDMETHODCALLTYPE *Shutdown )( + + HRESULT ( STDMETHODCALLTYPE *Shutdown )( ICorProfilerCallback6 * This); - - HRESULT ( STDMETHODCALLTYPE *AppDomainCreationStarted )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainCreationStarted )( ICorProfilerCallback6 * This, /* [in] */ AppDomainID appDomainId); - - HRESULT ( STDMETHODCALLTYPE *AppDomainCreationFinished )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainCreationFinished )( ICorProfilerCallback6 * This, /* [in] */ AppDomainID appDomainId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownStarted )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownStarted )( ICorProfilerCallback6 * This, /* [in] */ AppDomainID appDomainId); - - HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownFinished )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownFinished )( ICorProfilerCallback6 * This, /* [in] */ AppDomainID appDomainId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *AssemblyLoadStarted )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyLoadStarted )( ICorProfilerCallback6 * This, /* [in] */ AssemblyID assemblyId); - - HRESULT ( STDMETHODCALLTYPE *AssemblyLoadFinished )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyLoadFinished )( ICorProfilerCallback6 * This, /* [in] */ AssemblyID assemblyId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadStarted )( ICorProfilerCallback6 * This, /* [in] */ AssemblyID assemblyId); - - HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadFinished )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadFinished )( ICorProfilerCallback6 * This, /* [in] */ AssemblyID assemblyId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ModuleLoadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ModuleLoadStarted )( ICorProfilerCallback6 * This, /* [in] */ ModuleID moduleId); - - HRESULT ( STDMETHODCALLTYPE *ModuleLoadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ModuleLoadFinished )( ICorProfilerCallback6 * This, /* [in] */ ModuleID moduleId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ModuleUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ModuleUnloadStarted )( ICorProfilerCallback6 * This, /* [in] */ ModuleID moduleId); - - HRESULT ( STDMETHODCALLTYPE *ModuleUnloadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ModuleUnloadFinished )( ICorProfilerCallback6 * This, /* [in] */ ModuleID moduleId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ModuleAttachedToAssembly )( + + HRESULT ( STDMETHODCALLTYPE *ModuleAttachedToAssembly )( ICorProfilerCallback6 * This, /* [in] */ ModuleID moduleId, /* [in] */ AssemblyID AssemblyId); - - HRESULT ( STDMETHODCALLTYPE *ClassLoadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ClassLoadStarted )( ICorProfilerCallback6 * This, /* [in] */ ClassID classId); - - HRESULT ( STDMETHODCALLTYPE *ClassLoadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ClassLoadFinished )( ICorProfilerCallback6 * This, /* [in] */ ClassID classId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ClassUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ClassUnloadStarted )( ICorProfilerCallback6 * This, /* [in] */ ClassID classId); - - HRESULT ( STDMETHODCALLTYPE *ClassUnloadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ClassUnloadFinished )( ICorProfilerCallback6 * This, /* [in] */ ClassID classId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *FunctionUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *FunctionUnloadStarted )( ICorProfilerCallback6 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *JITCompilationStarted )( + + HRESULT ( STDMETHODCALLTYPE *JITCompilationStarted )( ICorProfilerCallback6 * This, /* [in] */ FunctionID functionId, /* [in] */ BOOL fIsSafeToBlock); - - HRESULT ( STDMETHODCALLTYPE *JITCompilationFinished )( + + HRESULT ( STDMETHODCALLTYPE *JITCompilationFinished )( ICorProfilerCallback6 * This, /* [in] */ FunctionID functionId, /* [in] */ HRESULT hrStatus, /* [in] */ BOOL fIsSafeToBlock); - - HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchStarted )( + + HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchStarted )( ICorProfilerCallback6 * This, /* [in] */ FunctionID functionId, /* [out] */ BOOL *pbUseCachedFunction); - - HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchFinished )( + + HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchFinished )( ICorProfilerCallback6 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_JIT_CACHE result); - - HRESULT ( STDMETHODCALLTYPE *JITFunctionPitched )( + + HRESULT ( STDMETHODCALLTYPE *JITFunctionPitched )( ICorProfilerCallback6 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *JITInlining )( + + HRESULT ( STDMETHODCALLTYPE *JITInlining )( ICorProfilerCallback6 * This, /* [in] */ FunctionID callerId, /* [in] */ FunctionID calleeId, /* [out] */ BOOL *pfShouldInline); - - HRESULT ( STDMETHODCALLTYPE *ThreadCreated )( + + HRESULT ( STDMETHODCALLTYPE *ThreadCreated )( ICorProfilerCallback6 * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *ThreadDestroyed )( + + HRESULT ( STDMETHODCALLTYPE *ThreadDestroyed )( ICorProfilerCallback6 * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *ThreadAssignedToOSThread )( + + HRESULT ( STDMETHODCALLTYPE *ThreadAssignedToOSThread )( ICorProfilerCallback6 * This, /* [in] */ ThreadID managedThreadId, /* [in] */ DWORD osThreadId); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationStarted )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationStarted )( ICorProfilerCallback6 * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientSendingMessage )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientSendingMessage )( ICorProfilerCallback6 * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientReceivingReply )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientReceivingReply )( ICorProfilerCallback6 * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationFinished )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationFinished )( ICorProfilerCallback6 * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerReceivingMessage )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerReceivingMessage )( ICorProfilerCallback6 * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationStarted )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationStarted )( ICorProfilerCallback6 * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationReturned )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationReturned )( ICorProfilerCallback6 * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerSendingReply )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerSendingReply )( ICorProfilerCallback6 * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *UnmanagedToManagedTransition )( + + HRESULT ( STDMETHODCALLTYPE *UnmanagedToManagedTransition )( ICorProfilerCallback6 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_TRANSITION_REASON reason); - - HRESULT ( STDMETHODCALLTYPE *ManagedToUnmanagedTransition )( + + HRESULT ( STDMETHODCALLTYPE *ManagedToUnmanagedTransition )( ICorProfilerCallback6 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_TRANSITION_REASON reason); - - HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendStarted )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendStarted )( ICorProfilerCallback6 * This, /* [in] */ COR_PRF_SUSPEND_REASON suspendReason); - - HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendFinished )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendFinished )( ICorProfilerCallback6 * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendAborted )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendAborted )( ICorProfilerCallback6 * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeResumeStarted )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeResumeStarted )( ICorProfilerCallback6 * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeResumeFinished )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeResumeFinished )( ICorProfilerCallback6 * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeThreadSuspended )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeThreadSuspended )( ICorProfilerCallback6 * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *RuntimeThreadResumed )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeThreadResumed )( ICorProfilerCallback6 * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *MovedReferences )( + + HRESULT ( STDMETHODCALLTYPE *MovedReferences )( ICorProfilerCallback6 * This, /* [in] */ ULONG cMovedObjectIDRanges, /* [size_is][in] */ ObjectID oldObjectIDRangeStart[ ], /* [size_is][in] */ ObjectID newObjectIDRangeStart[ ], /* [size_is][in] */ ULONG cObjectIDRangeLength[ ]); - - HRESULT ( STDMETHODCALLTYPE *ObjectAllocated )( + + HRESULT ( STDMETHODCALLTYPE *ObjectAllocated )( ICorProfilerCallback6 * This, /* [in] */ ObjectID objectId, /* [in] */ ClassID classId); - - HRESULT ( STDMETHODCALLTYPE *ObjectsAllocatedByClass )( + + HRESULT ( STDMETHODCALLTYPE *ObjectsAllocatedByClass )( ICorProfilerCallback6 * This, /* [in] */ ULONG cClassCount, /* [size_is][in] */ ClassID classIds[ ], /* [size_is][in] */ ULONG cObjects[ ]); - - HRESULT ( STDMETHODCALLTYPE *ObjectReferences )( + + HRESULT ( STDMETHODCALLTYPE *ObjectReferences )( ICorProfilerCallback6 * This, /* [in] */ ObjectID objectId, /* [in] */ ClassID classId, /* [in] */ ULONG cObjectRefs, /* [size_is][in] */ ObjectID objectRefIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *RootReferences )( + + HRESULT ( STDMETHODCALLTYPE *RootReferences )( ICorProfilerCallback6 * This, /* [in] */ ULONG cRootRefs, /* [size_is][in] */ ObjectID rootRefIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *ExceptionThrown )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionThrown )( ICorProfilerCallback6 * This, /* [in] */ ObjectID thrownObjectId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionEnter )( ICorProfilerCallback6 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionLeave )( ICorProfilerCallback6 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterEnter )( ICorProfilerCallback6 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterLeave )( ICorProfilerCallback6 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchCatcherFound )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchCatcherFound )( ICorProfilerCallback6 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerEnter )( ICorProfilerCallback6 * This, /* [in] */ UINT_PTR __unused); - - HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerLeave )( ICorProfilerCallback6 * This, /* [in] */ UINT_PTR __unused); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionEnter )( ICorProfilerCallback6 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionLeave )( ICorProfilerCallback6 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyEnter )( ICorProfilerCallback6 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyLeave )( ICorProfilerCallback6 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherEnter )( ICorProfilerCallback6 * This, /* [in] */ FunctionID functionId, /* [in] */ ObjectID objectId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherLeave )( ICorProfilerCallback6 * This); - - HRESULT ( STDMETHODCALLTYPE *COMClassicVTableCreated )( + + HRESULT ( STDMETHODCALLTYPE *COMClassicVTableCreated )( ICorProfilerCallback6 * This, /* [in] */ ClassID wrappedClassId, /* [in] */ REFGUID implementedIID, /* [in] */ void *pVTable, /* [in] */ ULONG cSlots); - - HRESULT ( STDMETHODCALLTYPE *COMClassicVTableDestroyed )( + + HRESULT ( STDMETHODCALLTYPE *COMClassicVTableDestroyed )( ICorProfilerCallback6 * This, /* [in] */ ClassID wrappedClassId, /* [in] */ REFGUID implementedIID, /* [in] */ void *pVTable); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherFound )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherFound )( ICorProfilerCallback6 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherExecute )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherExecute )( ICorProfilerCallback6 * This); - - HRESULT ( STDMETHODCALLTYPE *ThreadNameChanged )( + + HRESULT ( STDMETHODCALLTYPE *ThreadNameChanged )( ICorProfilerCallback6 * This, /* [in] */ ThreadID threadId, /* [in] */ ULONG cchName, - /* [annotation][in] */ + /* [annotation][in] */ _In_reads_opt_(cchName) WCHAR name[ ]); - - HRESULT ( STDMETHODCALLTYPE *GarbageCollectionStarted )( + + HRESULT ( STDMETHODCALLTYPE *GarbageCollectionStarted )( ICorProfilerCallback6 * This, /* [in] */ int cGenerations, /* [size_is][in] */ BOOL generationCollected[ ], /* [in] */ COR_PRF_GC_REASON reason); - - HRESULT ( STDMETHODCALLTYPE *SurvivingReferences )( + + HRESULT ( STDMETHODCALLTYPE *SurvivingReferences )( ICorProfilerCallback6 * This, /* [in] */ ULONG cSurvivingObjectIDRanges, /* [size_is][in] */ ObjectID objectIDRangeStart[ ], /* [size_is][in] */ ULONG cObjectIDRangeLength[ ]); - - HRESULT ( STDMETHODCALLTYPE *GarbageCollectionFinished )( + + HRESULT ( STDMETHODCALLTYPE *GarbageCollectionFinished )( ICorProfilerCallback6 * This); - - HRESULT ( STDMETHODCALLTYPE *FinalizeableObjectQueued )( + + HRESULT ( STDMETHODCALLTYPE *FinalizeableObjectQueued )( ICorProfilerCallback6 * This, /* [in] */ DWORD finalizerFlags, /* [in] */ ObjectID objectID); - - HRESULT ( STDMETHODCALLTYPE *RootReferences2 )( + + HRESULT ( STDMETHODCALLTYPE *RootReferences2 )( ICorProfilerCallback6 * This, /* [in] */ ULONG cRootRefs, /* [size_is][in] */ ObjectID rootRefIds[ ], /* [size_is][in] */ COR_PRF_GC_ROOT_KIND rootKinds[ ], /* [size_is][in] */ COR_PRF_GC_ROOT_FLAGS rootFlags[ ], /* [size_is][in] */ UINT_PTR rootIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *HandleCreated )( + + HRESULT ( STDMETHODCALLTYPE *HandleCreated )( ICorProfilerCallback6 * This, /* [in] */ GCHandleID handleId, /* [in] */ ObjectID initialObjectId); - - HRESULT ( STDMETHODCALLTYPE *HandleDestroyed )( + + HRESULT ( STDMETHODCALLTYPE *HandleDestroyed )( ICorProfilerCallback6 * This, /* [in] */ GCHandleID handleId); - - HRESULT ( STDMETHODCALLTYPE *InitializeForAttach )( + + HRESULT ( STDMETHODCALLTYPE *InitializeForAttach )( ICorProfilerCallback6 * This, /* [in] */ IUnknown *pCorProfilerInfoUnk, /* [in] */ void *pvClientData, /* [in] */ UINT cbClientData); - - HRESULT ( STDMETHODCALLTYPE *ProfilerAttachComplete )( + + HRESULT ( STDMETHODCALLTYPE *ProfilerAttachComplete )( ICorProfilerCallback6 * This); - - HRESULT ( STDMETHODCALLTYPE *ProfilerDetachSucceeded )( + + HRESULT ( STDMETHODCALLTYPE *ProfilerDetachSucceeded )( ICorProfilerCallback6 * This); - - HRESULT ( STDMETHODCALLTYPE *ReJITCompilationStarted )( + + HRESULT ( STDMETHODCALLTYPE *ReJITCompilationStarted )( ICorProfilerCallback6 * This, /* [in] */ FunctionID functionId, /* [in] */ ReJITID rejitId, /* [in] */ BOOL fIsSafeToBlock); - - HRESULT ( STDMETHODCALLTYPE *GetReJITParameters )( + + HRESULT ( STDMETHODCALLTYPE *GetReJITParameters )( ICorProfilerCallback6 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodId, /* [in] */ ICorProfilerFunctionControl *pFunctionControl); - - HRESULT ( STDMETHODCALLTYPE *ReJITCompilationFinished )( + + HRESULT ( STDMETHODCALLTYPE *ReJITCompilationFinished )( ICorProfilerCallback6 * This, /* [in] */ FunctionID functionId, /* [in] */ ReJITID rejitId, /* [in] */ HRESULT hrStatus, /* [in] */ BOOL fIsSafeToBlock); - - HRESULT ( STDMETHODCALLTYPE *ReJITError )( + + HRESULT ( STDMETHODCALLTYPE *ReJITError )( ICorProfilerCallback6 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodId, /* [in] */ FunctionID functionId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *MovedReferences2 )( + + HRESULT ( STDMETHODCALLTYPE *MovedReferences2 )( ICorProfilerCallback6 * This, /* [in] */ ULONG cMovedObjectIDRanges, /* [size_is][in] */ ObjectID oldObjectIDRangeStart[ ], /* [size_is][in] */ ObjectID newObjectIDRangeStart[ ], /* [size_is][in] */ SIZE_T cObjectIDRangeLength[ ]); - - HRESULT ( STDMETHODCALLTYPE *SurvivingReferences2 )( + + HRESULT ( STDMETHODCALLTYPE *SurvivingReferences2 )( ICorProfilerCallback6 * This, /* [in] */ ULONG cSurvivingObjectIDRanges, /* [size_is][in] */ ObjectID objectIDRangeStart[ ], /* [size_is][in] */ SIZE_T cObjectIDRangeLength[ ]); - - HRESULT ( STDMETHODCALLTYPE *ConditionalWeakTableElementReferences )( + + HRESULT ( STDMETHODCALLTYPE *ConditionalWeakTableElementReferences )( ICorProfilerCallback6 * This, /* [in] */ ULONG cRootRefs, /* [size_is][in] */ ObjectID keyRefIds[ ], /* [size_is][in] */ ObjectID valueRefIds[ ], /* [size_is][in] */ GCHandleID rootIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetAssemblyReferences )( + + HRESULT ( STDMETHODCALLTYPE *GetAssemblyReferences )( ICorProfilerCallback6 * This, /* [string][in] */ const WCHAR *wszAssemblyPath, /* [in] */ ICorProfilerAssemblyReferenceProvider *pAsmRefProvider); - + END_INTERFACE } ICorProfilerCallback6Vtbl; @@ -4889,289 +4908,289 @@ EXTERN_C const IID IID_ICorProfilerCallback6; CONST_VTBL struct ICorProfilerCallback6Vtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ICorProfilerCallback6_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ICorProfilerCallback6_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ICorProfilerCallback6_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ICorProfilerCallback6_Initialize(This,pICorProfilerInfoUnk) \ - ( (This)->lpVtbl -> Initialize(This,pICorProfilerInfoUnk) ) + ( (This)->lpVtbl -> Initialize(This,pICorProfilerInfoUnk) ) #define ICorProfilerCallback6_Shutdown(This) \ - ( (This)->lpVtbl -> Shutdown(This) ) + ( (This)->lpVtbl -> Shutdown(This) ) #define ICorProfilerCallback6_AppDomainCreationStarted(This,appDomainId) \ - ( (This)->lpVtbl -> AppDomainCreationStarted(This,appDomainId) ) + ( (This)->lpVtbl -> AppDomainCreationStarted(This,appDomainId) ) #define ICorProfilerCallback6_AppDomainCreationFinished(This,appDomainId,hrStatus) \ - ( (This)->lpVtbl -> AppDomainCreationFinished(This,appDomainId,hrStatus) ) + ( (This)->lpVtbl -> AppDomainCreationFinished(This,appDomainId,hrStatus) ) #define ICorProfilerCallback6_AppDomainShutdownStarted(This,appDomainId) \ - ( (This)->lpVtbl -> AppDomainShutdownStarted(This,appDomainId) ) + ( (This)->lpVtbl -> AppDomainShutdownStarted(This,appDomainId) ) #define ICorProfilerCallback6_AppDomainShutdownFinished(This,appDomainId,hrStatus) \ - ( (This)->lpVtbl -> AppDomainShutdownFinished(This,appDomainId,hrStatus) ) + ( (This)->lpVtbl -> AppDomainShutdownFinished(This,appDomainId,hrStatus) ) #define ICorProfilerCallback6_AssemblyLoadStarted(This,assemblyId) \ - ( (This)->lpVtbl -> AssemblyLoadStarted(This,assemblyId) ) + ( (This)->lpVtbl -> AssemblyLoadStarted(This,assemblyId) ) #define ICorProfilerCallback6_AssemblyLoadFinished(This,assemblyId,hrStatus) \ - ( (This)->lpVtbl -> AssemblyLoadFinished(This,assemblyId,hrStatus) ) + ( (This)->lpVtbl -> AssemblyLoadFinished(This,assemblyId,hrStatus) ) #define ICorProfilerCallback6_AssemblyUnloadStarted(This,assemblyId) \ - ( (This)->lpVtbl -> AssemblyUnloadStarted(This,assemblyId) ) + ( (This)->lpVtbl -> AssemblyUnloadStarted(This,assemblyId) ) #define ICorProfilerCallback6_AssemblyUnloadFinished(This,assemblyId,hrStatus) \ - ( (This)->lpVtbl -> AssemblyUnloadFinished(This,assemblyId,hrStatus) ) + ( (This)->lpVtbl -> AssemblyUnloadFinished(This,assemblyId,hrStatus) ) #define ICorProfilerCallback6_ModuleLoadStarted(This,moduleId) \ - ( (This)->lpVtbl -> ModuleLoadStarted(This,moduleId) ) + ( (This)->lpVtbl -> ModuleLoadStarted(This,moduleId) ) #define ICorProfilerCallback6_ModuleLoadFinished(This,moduleId,hrStatus) \ - ( (This)->lpVtbl -> ModuleLoadFinished(This,moduleId,hrStatus) ) + ( (This)->lpVtbl -> ModuleLoadFinished(This,moduleId,hrStatus) ) #define ICorProfilerCallback6_ModuleUnloadStarted(This,moduleId) \ - ( (This)->lpVtbl -> ModuleUnloadStarted(This,moduleId) ) + ( (This)->lpVtbl -> ModuleUnloadStarted(This,moduleId) ) #define ICorProfilerCallback6_ModuleUnloadFinished(This,moduleId,hrStatus) \ - ( (This)->lpVtbl -> ModuleUnloadFinished(This,moduleId,hrStatus) ) + ( (This)->lpVtbl -> ModuleUnloadFinished(This,moduleId,hrStatus) ) #define ICorProfilerCallback6_ModuleAttachedToAssembly(This,moduleId,AssemblyId) \ - ( (This)->lpVtbl -> ModuleAttachedToAssembly(This,moduleId,AssemblyId) ) + ( (This)->lpVtbl -> ModuleAttachedToAssembly(This,moduleId,AssemblyId) ) #define ICorProfilerCallback6_ClassLoadStarted(This,classId) \ - ( (This)->lpVtbl -> ClassLoadStarted(This,classId) ) + ( (This)->lpVtbl -> ClassLoadStarted(This,classId) ) #define ICorProfilerCallback6_ClassLoadFinished(This,classId,hrStatus) \ - ( (This)->lpVtbl -> ClassLoadFinished(This,classId,hrStatus) ) + ( (This)->lpVtbl -> ClassLoadFinished(This,classId,hrStatus) ) #define ICorProfilerCallback6_ClassUnloadStarted(This,classId) \ - ( (This)->lpVtbl -> ClassUnloadStarted(This,classId) ) + ( (This)->lpVtbl -> ClassUnloadStarted(This,classId) ) #define ICorProfilerCallback6_ClassUnloadFinished(This,classId,hrStatus) \ - ( (This)->lpVtbl -> ClassUnloadFinished(This,classId,hrStatus) ) + ( (This)->lpVtbl -> ClassUnloadFinished(This,classId,hrStatus) ) #define ICorProfilerCallback6_FunctionUnloadStarted(This,functionId) \ - ( (This)->lpVtbl -> FunctionUnloadStarted(This,functionId) ) + ( (This)->lpVtbl -> FunctionUnloadStarted(This,functionId) ) #define ICorProfilerCallback6_JITCompilationStarted(This,functionId,fIsSafeToBlock) \ - ( (This)->lpVtbl -> JITCompilationStarted(This,functionId,fIsSafeToBlock) ) + ( (This)->lpVtbl -> JITCompilationStarted(This,functionId,fIsSafeToBlock) ) #define ICorProfilerCallback6_JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \ - ( (This)->lpVtbl -> JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) ) + ( (This)->lpVtbl -> JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) ) #define ICorProfilerCallback6_JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) \ - ( (This)->lpVtbl -> JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) ) + ( (This)->lpVtbl -> JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) ) #define ICorProfilerCallback6_JITCachedFunctionSearchFinished(This,functionId,result) \ - ( (This)->lpVtbl -> JITCachedFunctionSearchFinished(This,functionId,result) ) + ( (This)->lpVtbl -> JITCachedFunctionSearchFinished(This,functionId,result) ) #define ICorProfilerCallback6_JITFunctionPitched(This,functionId) \ - ( (This)->lpVtbl -> JITFunctionPitched(This,functionId) ) + ( (This)->lpVtbl -> JITFunctionPitched(This,functionId) ) #define ICorProfilerCallback6_JITInlining(This,callerId,calleeId,pfShouldInline) \ - ( (This)->lpVtbl -> JITInlining(This,callerId,calleeId,pfShouldInline) ) + ( (This)->lpVtbl -> JITInlining(This,callerId,calleeId,pfShouldInline) ) #define ICorProfilerCallback6_ThreadCreated(This,threadId) \ - ( (This)->lpVtbl -> ThreadCreated(This,threadId) ) + ( (This)->lpVtbl -> ThreadCreated(This,threadId) ) #define ICorProfilerCallback6_ThreadDestroyed(This,threadId) \ - ( (This)->lpVtbl -> ThreadDestroyed(This,threadId) ) + ( (This)->lpVtbl -> ThreadDestroyed(This,threadId) ) #define ICorProfilerCallback6_ThreadAssignedToOSThread(This,managedThreadId,osThreadId) \ - ( (This)->lpVtbl -> ThreadAssignedToOSThread(This,managedThreadId,osThreadId) ) + ( (This)->lpVtbl -> ThreadAssignedToOSThread(This,managedThreadId,osThreadId) ) #define ICorProfilerCallback6_RemotingClientInvocationStarted(This) \ - ( (This)->lpVtbl -> RemotingClientInvocationStarted(This) ) + ( (This)->lpVtbl -> RemotingClientInvocationStarted(This) ) #define ICorProfilerCallback6_RemotingClientSendingMessage(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingClientSendingMessage(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingClientSendingMessage(This,pCookie,fIsAsync) ) #define ICorProfilerCallback6_RemotingClientReceivingReply(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingClientReceivingReply(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingClientReceivingReply(This,pCookie,fIsAsync) ) #define ICorProfilerCallback6_RemotingClientInvocationFinished(This) \ - ( (This)->lpVtbl -> RemotingClientInvocationFinished(This) ) + ( (This)->lpVtbl -> RemotingClientInvocationFinished(This) ) #define ICorProfilerCallback6_RemotingServerReceivingMessage(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingServerReceivingMessage(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingServerReceivingMessage(This,pCookie,fIsAsync) ) #define ICorProfilerCallback6_RemotingServerInvocationStarted(This) \ - ( (This)->lpVtbl -> RemotingServerInvocationStarted(This) ) + ( (This)->lpVtbl -> RemotingServerInvocationStarted(This) ) #define ICorProfilerCallback6_RemotingServerInvocationReturned(This) \ - ( (This)->lpVtbl -> RemotingServerInvocationReturned(This) ) + ( (This)->lpVtbl -> RemotingServerInvocationReturned(This) ) #define ICorProfilerCallback6_RemotingServerSendingReply(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingServerSendingReply(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingServerSendingReply(This,pCookie,fIsAsync) ) #define ICorProfilerCallback6_UnmanagedToManagedTransition(This,functionId,reason) \ - ( (This)->lpVtbl -> UnmanagedToManagedTransition(This,functionId,reason) ) + ( (This)->lpVtbl -> UnmanagedToManagedTransition(This,functionId,reason) ) #define ICorProfilerCallback6_ManagedToUnmanagedTransition(This,functionId,reason) \ - ( (This)->lpVtbl -> ManagedToUnmanagedTransition(This,functionId,reason) ) + ( (This)->lpVtbl -> ManagedToUnmanagedTransition(This,functionId,reason) ) #define ICorProfilerCallback6_RuntimeSuspendStarted(This,suspendReason) \ - ( (This)->lpVtbl -> RuntimeSuspendStarted(This,suspendReason) ) + ( (This)->lpVtbl -> RuntimeSuspendStarted(This,suspendReason) ) #define ICorProfilerCallback6_RuntimeSuspendFinished(This) \ - ( (This)->lpVtbl -> RuntimeSuspendFinished(This) ) + ( (This)->lpVtbl -> RuntimeSuspendFinished(This) ) #define ICorProfilerCallback6_RuntimeSuspendAborted(This) \ - ( (This)->lpVtbl -> RuntimeSuspendAborted(This) ) + ( (This)->lpVtbl -> RuntimeSuspendAborted(This) ) #define ICorProfilerCallback6_RuntimeResumeStarted(This) \ - ( (This)->lpVtbl -> RuntimeResumeStarted(This) ) + ( (This)->lpVtbl -> RuntimeResumeStarted(This) ) #define ICorProfilerCallback6_RuntimeResumeFinished(This) \ - ( (This)->lpVtbl -> RuntimeResumeFinished(This) ) + ( (This)->lpVtbl -> RuntimeResumeFinished(This) ) #define ICorProfilerCallback6_RuntimeThreadSuspended(This,threadId) \ - ( (This)->lpVtbl -> RuntimeThreadSuspended(This,threadId) ) + ( (This)->lpVtbl -> RuntimeThreadSuspended(This,threadId) ) #define ICorProfilerCallback6_RuntimeThreadResumed(This,threadId) \ - ( (This)->lpVtbl -> RuntimeThreadResumed(This,threadId) ) + ( (This)->lpVtbl -> RuntimeThreadResumed(This,threadId) ) #define ICorProfilerCallback6_MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \ - ( (This)->lpVtbl -> MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) ) + ( (This)->lpVtbl -> MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) ) #define ICorProfilerCallback6_ObjectAllocated(This,objectId,classId) \ - ( (This)->lpVtbl -> ObjectAllocated(This,objectId,classId) ) + ( (This)->lpVtbl -> ObjectAllocated(This,objectId,classId) ) #define ICorProfilerCallback6_ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) \ - ( (This)->lpVtbl -> ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) ) + ( (This)->lpVtbl -> ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) ) #define ICorProfilerCallback6_ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) \ - ( (This)->lpVtbl -> ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) ) + ( (This)->lpVtbl -> ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) ) #define ICorProfilerCallback6_RootReferences(This,cRootRefs,rootRefIds) \ - ( (This)->lpVtbl -> RootReferences(This,cRootRefs,rootRefIds) ) + ( (This)->lpVtbl -> RootReferences(This,cRootRefs,rootRefIds) ) #define ICorProfilerCallback6_ExceptionThrown(This,thrownObjectId) \ - ( (This)->lpVtbl -> ExceptionThrown(This,thrownObjectId) ) + ( (This)->lpVtbl -> ExceptionThrown(This,thrownObjectId) ) #define ICorProfilerCallback6_ExceptionSearchFunctionEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionSearchFunctionEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionSearchFunctionEnter(This,functionId) ) #define ICorProfilerCallback6_ExceptionSearchFunctionLeave(This) \ - ( (This)->lpVtbl -> ExceptionSearchFunctionLeave(This) ) + ( (This)->lpVtbl -> ExceptionSearchFunctionLeave(This) ) #define ICorProfilerCallback6_ExceptionSearchFilterEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionSearchFilterEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionSearchFilterEnter(This,functionId) ) #define ICorProfilerCallback6_ExceptionSearchFilterLeave(This) \ - ( (This)->lpVtbl -> ExceptionSearchFilterLeave(This) ) + ( (This)->lpVtbl -> ExceptionSearchFilterLeave(This) ) #define ICorProfilerCallback6_ExceptionSearchCatcherFound(This,functionId) \ - ( (This)->lpVtbl -> ExceptionSearchCatcherFound(This,functionId) ) + ( (This)->lpVtbl -> ExceptionSearchCatcherFound(This,functionId) ) #define ICorProfilerCallback6_ExceptionOSHandlerEnter(This,__unused) \ - ( (This)->lpVtbl -> ExceptionOSHandlerEnter(This,__unused) ) + ( (This)->lpVtbl -> ExceptionOSHandlerEnter(This,__unused) ) #define ICorProfilerCallback6_ExceptionOSHandlerLeave(This,__unused) \ - ( (This)->lpVtbl -> ExceptionOSHandlerLeave(This,__unused) ) + ( (This)->lpVtbl -> ExceptionOSHandlerLeave(This,__unused) ) #define ICorProfilerCallback6_ExceptionUnwindFunctionEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionUnwindFunctionEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionUnwindFunctionEnter(This,functionId) ) #define ICorProfilerCallback6_ExceptionUnwindFunctionLeave(This) \ - ( (This)->lpVtbl -> ExceptionUnwindFunctionLeave(This) ) + ( (This)->lpVtbl -> ExceptionUnwindFunctionLeave(This) ) #define ICorProfilerCallback6_ExceptionUnwindFinallyEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionUnwindFinallyEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionUnwindFinallyEnter(This,functionId) ) #define ICorProfilerCallback6_ExceptionUnwindFinallyLeave(This) \ - ( (This)->lpVtbl -> ExceptionUnwindFinallyLeave(This) ) + ( (This)->lpVtbl -> ExceptionUnwindFinallyLeave(This) ) #define ICorProfilerCallback6_ExceptionCatcherEnter(This,functionId,objectId) \ - ( (This)->lpVtbl -> ExceptionCatcherEnter(This,functionId,objectId) ) + ( (This)->lpVtbl -> ExceptionCatcherEnter(This,functionId,objectId) ) #define ICorProfilerCallback6_ExceptionCatcherLeave(This) \ - ( (This)->lpVtbl -> ExceptionCatcherLeave(This) ) + ( (This)->lpVtbl -> ExceptionCatcherLeave(This) ) #define ICorProfilerCallback6_COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) \ - ( (This)->lpVtbl -> COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) ) + ( (This)->lpVtbl -> COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) ) #define ICorProfilerCallback6_COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) \ - ( (This)->lpVtbl -> COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) ) + ( (This)->lpVtbl -> COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) ) #define ICorProfilerCallback6_ExceptionCLRCatcherFound(This) \ - ( (This)->lpVtbl -> ExceptionCLRCatcherFound(This) ) + ( (This)->lpVtbl -> ExceptionCLRCatcherFound(This) ) #define ICorProfilerCallback6_ExceptionCLRCatcherExecute(This) \ - ( (This)->lpVtbl -> ExceptionCLRCatcherExecute(This) ) + ( (This)->lpVtbl -> ExceptionCLRCatcherExecute(This) ) #define ICorProfilerCallback6_ThreadNameChanged(This,threadId,cchName,name) \ - ( (This)->lpVtbl -> ThreadNameChanged(This,threadId,cchName,name) ) + ( (This)->lpVtbl -> ThreadNameChanged(This,threadId,cchName,name) ) #define ICorProfilerCallback6_GarbageCollectionStarted(This,cGenerations,generationCollected,reason) \ - ( (This)->lpVtbl -> GarbageCollectionStarted(This,cGenerations,generationCollected,reason) ) + ( (This)->lpVtbl -> GarbageCollectionStarted(This,cGenerations,generationCollected,reason) ) #define ICorProfilerCallback6_SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \ - ( (This)->lpVtbl -> SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) ) + ( (This)->lpVtbl -> SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) ) #define ICorProfilerCallback6_GarbageCollectionFinished(This) \ - ( (This)->lpVtbl -> GarbageCollectionFinished(This) ) + ( (This)->lpVtbl -> GarbageCollectionFinished(This) ) #define ICorProfilerCallback6_FinalizeableObjectQueued(This,finalizerFlags,objectID) \ - ( (This)->lpVtbl -> FinalizeableObjectQueued(This,finalizerFlags,objectID) ) + ( (This)->lpVtbl -> FinalizeableObjectQueued(This,finalizerFlags,objectID) ) #define ICorProfilerCallback6_RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) \ - ( (This)->lpVtbl -> RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) ) + ( (This)->lpVtbl -> RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) ) #define ICorProfilerCallback6_HandleCreated(This,handleId,initialObjectId) \ - ( (This)->lpVtbl -> HandleCreated(This,handleId,initialObjectId) ) + ( (This)->lpVtbl -> HandleCreated(This,handleId,initialObjectId) ) #define ICorProfilerCallback6_HandleDestroyed(This,handleId) \ - ( (This)->lpVtbl -> HandleDestroyed(This,handleId) ) + ( (This)->lpVtbl -> HandleDestroyed(This,handleId) ) #define ICorProfilerCallback6_InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) \ - ( (This)->lpVtbl -> InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) ) + ( (This)->lpVtbl -> InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) ) #define ICorProfilerCallback6_ProfilerAttachComplete(This) \ - ( (This)->lpVtbl -> ProfilerAttachComplete(This) ) + ( (This)->lpVtbl -> ProfilerAttachComplete(This) ) #define ICorProfilerCallback6_ProfilerDetachSucceeded(This) \ - ( (This)->lpVtbl -> ProfilerDetachSucceeded(This) ) + ( (This)->lpVtbl -> ProfilerDetachSucceeded(This) ) #define ICorProfilerCallback6_ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) \ - ( (This)->lpVtbl -> ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) ) + ( (This)->lpVtbl -> ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) ) #define ICorProfilerCallback6_GetReJITParameters(This,moduleId,methodId,pFunctionControl) \ - ( (This)->lpVtbl -> GetReJITParameters(This,moduleId,methodId,pFunctionControl) ) + ( (This)->lpVtbl -> GetReJITParameters(This,moduleId,methodId,pFunctionControl) ) #define ICorProfilerCallback6_ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) \ - ( (This)->lpVtbl -> ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) ) + ( (This)->lpVtbl -> ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) ) #define ICorProfilerCallback6_ReJITError(This,moduleId,methodId,functionId,hrStatus) \ - ( (This)->lpVtbl -> ReJITError(This,moduleId,methodId,functionId,hrStatus) ) + ( (This)->lpVtbl -> ReJITError(This,moduleId,methodId,functionId,hrStatus) ) #define ICorProfilerCallback6_MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \ - ( (This)->lpVtbl -> MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) ) + ( (This)->lpVtbl -> MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) ) #define ICorProfilerCallback6_SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \ - ( (This)->lpVtbl -> SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) ) + ( (This)->lpVtbl -> SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) ) #define ICorProfilerCallback6_ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) \ - ( (This)->lpVtbl -> ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) ) + ( (This)->lpVtbl -> ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) ) #define ICorProfilerCallback6_GetAssemblyReferences(This,wszAssemblyPath,pAsmRefProvider) \ - ( (This)->lpVtbl -> GetAssemblyReferences(This,wszAssemblyPath,pAsmRefProvider) ) + ( (This)->lpVtbl -> GetAssemblyReferences(This,wszAssemblyPath,pAsmRefProvider) ) #endif /* COBJMACROS */ @@ -5188,451 +5207,451 @@ EXTERN_C const IID IID_ICorProfilerCallback6; #define __ICorProfilerCallback7_INTERFACE_DEFINED__ /* interface ICorProfilerCallback7 */ -/* [local][unique][uuid][object] */ +/* [local][unique][uuid][object] */ EXTERN_C const IID IID_ICorProfilerCallback7; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("F76A2DBA-1D52-4539-866C-2AA518F9EFC3") ICorProfilerCallback7 : public ICorProfilerCallback6 { public: - virtual HRESULT STDMETHODCALLTYPE ModuleInMemorySymbolsUpdated( + virtual HRESULT STDMETHODCALLTYPE ModuleInMemorySymbolsUpdated( ModuleID moduleId) = 0; - + }; - - + + #else /* C style interface */ typedef struct ICorProfilerCallback7Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorProfilerCallback7 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorProfilerCallback7 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorProfilerCallback7 * This); - - HRESULT ( STDMETHODCALLTYPE *Initialize )( + + HRESULT ( STDMETHODCALLTYPE *Initialize )( ICorProfilerCallback7 * This, /* [in] */ IUnknown *pICorProfilerInfoUnk); - - HRESULT ( STDMETHODCALLTYPE *Shutdown )( + + HRESULT ( STDMETHODCALLTYPE *Shutdown )( ICorProfilerCallback7 * This); - - HRESULT ( STDMETHODCALLTYPE *AppDomainCreationStarted )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainCreationStarted )( ICorProfilerCallback7 * This, /* [in] */ AppDomainID appDomainId); - - HRESULT ( STDMETHODCALLTYPE *AppDomainCreationFinished )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainCreationFinished )( ICorProfilerCallback7 * This, /* [in] */ AppDomainID appDomainId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownStarted )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownStarted )( ICorProfilerCallback7 * This, /* [in] */ AppDomainID appDomainId); - - HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownFinished )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownFinished )( ICorProfilerCallback7 * This, /* [in] */ AppDomainID appDomainId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *AssemblyLoadStarted )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyLoadStarted )( ICorProfilerCallback7 * This, /* [in] */ AssemblyID assemblyId); - - HRESULT ( STDMETHODCALLTYPE *AssemblyLoadFinished )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyLoadFinished )( ICorProfilerCallback7 * This, /* [in] */ AssemblyID assemblyId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadStarted )( ICorProfilerCallback7 * This, /* [in] */ AssemblyID assemblyId); - - HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadFinished )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadFinished )( ICorProfilerCallback7 * This, /* [in] */ AssemblyID assemblyId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ModuleLoadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ModuleLoadStarted )( ICorProfilerCallback7 * This, /* [in] */ ModuleID moduleId); - - HRESULT ( STDMETHODCALLTYPE *ModuleLoadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ModuleLoadFinished )( ICorProfilerCallback7 * This, /* [in] */ ModuleID moduleId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ModuleUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ModuleUnloadStarted )( ICorProfilerCallback7 * This, /* [in] */ ModuleID moduleId); - - HRESULT ( STDMETHODCALLTYPE *ModuleUnloadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ModuleUnloadFinished )( ICorProfilerCallback7 * This, /* [in] */ ModuleID moduleId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ModuleAttachedToAssembly )( + + HRESULT ( STDMETHODCALLTYPE *ModuleAttachedToAssembly )( ICorProfilerCallback7 * This, /* [in] */ ModuleID moduleId, /* [in] */ AssemblyID AssemblyId); - - HRESULT ( STDMETHODCALLTYPE *ClassLoadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ClassLoadStarted )( ICorProfilerCallback7 * This, /* [in] */ ClassID classId); - - HRESULT ( STDMETHODCALLTYPE *ClassLoadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ClassLoadFinished )( ICorProfilerCallback7 * This, /* [in] */ ClassID classId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ClassUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ClassUnloadStarted )( ICorProfilerCallback7 * This, /* [in] */ ClassID classId); - - HRESULT ( STDMETHODCALLTYPE *ClassUnloadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ClassUnloadFinished )( ICorProfilerCallback7 * This, /* [in] */ ClassID classId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *FunctionUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *FunctionUnloadStarted )( ICorProfilerCallback7 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *JITCompilationStarted )( + + HRESULT ( STDMETHODCALLTYPE *JITCompilationStarted )( ICorProfilerCallback7 * This, /* [in] */ FunctionID functionId, /* [in] */ BOOL fIsSafeToBlock); - - HRESULT ( STDMETHODCALLTYPE *JITCompilationFinished )( + + HRESULT ( STDMETHODCALLTYPE *JITCompilationFinished )( ICorProfilerCallback7 * This, /* [in] */ FunctionID functionId, /* [in] */ HRESULT hrStatus, /* [in] */ BOOL fIsSafeToBlock); - - HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchStarted )( + + HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchStarted )( ICorProfilerCallback7 * This, /* [in] */ FunctionID functionId, /* [out] */ BOOL *pbUseCachedFunction); - - HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchFinished )( + + HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchFinished )( ICorProfilerCallback7 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_JIT_CACHE result); - - HRESULT ( STDMETHODCALLTYPE *JITFunctionPitched )( + + HRESULT ( STDMETHODCALLTYPE *JITFunctionPitched )( ICorProfilerCallback7 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *JITInlining )( + + HRESULT ( STDMETHODCALLTYPE *JITInlining )( ICorProfilerCallback7 * This, /* [in] */ FunctionID callerId, /* [in] */ FunctionID calleeId, /* [out] */ BOOL *pfShouldInline); - - HRESULT ( STDMETHODCALLTYPE *ThreadCreated )( + + HRESULT ( STDMETHODCALLTYPE *ThreadCreated )( ICorProfilerCallback7 * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *ThreadDestroyed )( + + HRESULT ( STDMETHODCALLTYPE *ThreadDestroyed )( ICorProfilerCallback7 * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *ThreadAssignedToOSThread )( + + HRESULT ( STDMETHODCALLTYPE *ThreadAssignedToOSThread )( ICorProfilerCallback7 * This, /* [in] */ ThreadID managedThreadId, /* [in] */ DWORD osThreadId); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationStarted )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationStarted )( ICorProfilerCallback7 * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientSendingMessage )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientSendingMessage )( ICorProfilerCallback7 * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientReceivingReply )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientReceivingReply )( ICorProfilerCallback7 * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationFinished )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationFinished )( ICorProfilerCallback7 * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerReceivingMessage )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerReceivingMessage )( ICorProfilerCallback7 * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationStarted )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationStarted )( ICorProfilerCallback7 * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationReturned )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationReturned )( ICorProfilerCallback7 * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerSendingReply )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerSendingReply )( ICorProfilerCallback7 * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *UnmanagedToManagedTransition )( + + HRESULT ( STDMETHODCALLTYPE *UnmanagedToManagedTransition )( ICorProfilerCallback7 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_TRANSITION_REASON reason); - - HRESULT ( STDMETHODCALLTYPE *ManagedToUnmanagedTransition )( + + HRESULT ( STDMETHODCALLTYPE *ManagedToUnmanagedTransition )( ICorProfilerCallback7 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_TRANSITION_REASON reason); - - HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendStarted )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendStarted )( ICorProfilerCallback7 * This, /* [in] */ COR_PRF_SUSPEND_REASON suspendReason); - - HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendFinished )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendFinished )( ICorProfilerCallback7 * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendAborted )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendAborted )( ICorProfilerCallback7 * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeResumeStarted )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeResumeStarted )( ICorProfilerCallback7 * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeResumeFinished )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeResumeFinished )( ICorProfilerCallback7 * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeThreadSuspended )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeThreadSuspended )( ICorProfilerCallback7 * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *RuntimeThreadResumed )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeThreadResumed )( ICorProfilerCallback7 * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *MovedReferences )( + + HRESULT ( STDMETHODCALLTYPE *MovedReferences )( ICorProfilerCallback7 * This, /* [in] */ ULONG cMovedObjectIDRanges, /* [size_is][in] */ ObjectID oldObjectIDRangeStart[ ], /* [size_is][in] */ ObjectID newObjectIDRangeStart[ ], /* [size_is][in] */ ULONG cObjectIDRangeLength[ ]); - - HRESULT ( STDMETHODCALLTYPE *ObjectAllocated )( + + HRESULT ( STDMETHODCALLTYPE *ObjectAllocated )( ICorProfilerCallback7 * This, /* [in] */ ObjectID objectId, /* [in] */ ClassID classId); - - HRESULT ( STDMETHODCALLTYPE *ObjectsAllocatedByClass )( + + HRESULT ( STDMETHODCALLTYPE *ObjectsAllocatedByClass )( ICorProfilerCallback7 * This, /* [in] */ ULONG cClassCount, /* [size_is][in] */ ClassID classIds[ ], /* [size_is][in] */ ULONG cObjects[ ]); - - HRESULT ( STDMETHODCALLTYPE *ObjectReferences )( + + HRESULT ( STDMETHODCALLTYPE *ObjectReferences )( ICorProfilerCallback7 * This, /* [in] */ ObjectID objectId, /* [in] */ ClassID classId, /* [in] */ ULONG cObjectRefs, /* [size_is][in] */ ObjectID objectRefIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *RootReferences )( + + HRESULT ( STDMETHODCALLTYPE *RootReferences )( ICorProfilerCallback7 * This, /* [in] */ ULONG cRootRefs, /* [size_is][in] */ ObjectID rootRefIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *ExceptionThrown )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionThrown )( ICorProfilerCallback7 * This, /* [in] */ ObjectID thrownObjectId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionEnter )( ICorProfilerCallback7 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionLeave )( ICorProfilerCallback7 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterEnter )( ICorProfilerCallback7 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterLeave )( ICorProfilerCallback7 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchCatcherFound )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchCatcherFound )( ICorProfilerCallback7 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerEnter )( ICorProfilerCallback7 * This, /* [in] */ UINT_PTR __unused); - - HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerLeave )( ICorProfilerCallback7 * This, /* [in] */ UINT_PTR __unused); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionEnter )( ICorProfilerCallback7 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionLeave )( ICorProfilerCallback7 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyEnter )( ICorProfilerCallback7 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyLeave )( ICorProfilerCallback7 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherEnter )( ICorProfilerCallback7 * This, /* [in] */ FunctionID functionId, /* [in] */ ObjectID objectId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherLeave )( ICorProfilerCallback7 * This); - - HRESULT ( STDMETHODCALLTYPE *COMClassicVTableCreated )( + + HRESULT ( STDMETHODCALLTYPE *COMClassicVTableCreated )( ICorProfilerCallback7 * This, /* [in] */ ClassID wrappedClassId, /* [in] */ REFGUID implementedIID, /* [in] */ void *pVTable, /* [in] */ ULONG cSlots); - - HRESULT ( STDMETHODCALLTYPE *COMClassicVTableDestroyed )( + + HRESULT ( STDMETHODCALLTYPE *COMClassicVTableDestroyed )( ICorProfilerCallback7 * This, /* [in] */ ClassID wrappedClassId, /* [in] */ REFGUID implementedIID, /* [in] */ void *pVTable); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherFound )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherFound )( ICorProfilerCallback7 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherExecute )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherExecute )( ICorProfilerCallback7 * This); - - HRESULT ( STDMETHODCALLTYPE *ThreadNameChanged )( + + HRESULT ( STDMETHODCALLTYPE *ThreadNameChanged )( ICorProfilerCallback7 * This, /* [in] */ ThreadID threadId, /* [in] */ ULONG cchName, - /* [annotation][in] */ + /* [annotation][in] */ _In_reads_opt_(cchName) WCHAR name[ ]); - - HRESULT ( STDMETHODCALLTYPE *GarbageCollectionStarted )( + + HRESULT ( STDMETHODCALLTYPE *GarbageCollectionStarted )( ICorProfilerCallback7 * This, /* [in] */ int cGenerations, /* [size_is][in] */ BOOL generationCollected[ ], /* [in] */ COR_PRF_GC_REASON reason); - - HRESULT ( STDMETHODCALLTYPE *SurvivingReferences )( + + HRESULT ( STDMETHODCALLTYPE *SurvivingReferences )( ICorProfilerCallback7 * This, /* [in] */ ULONG cSurvivingObjectIDRanges, /* [size_is][in] */ ObjectID objectIDRangeStart[ ], /* [size_is][in] */ ULONG cObjectIDRangeLength[ ]); - - HRESULT ( STDMETHODCALLTYPE *GarbageCollectionFinished )( + + HRESULT ( STDMETHODCALLTYPE *GarbageCollectionFinished )( ICorProfilerCallback7 * This); - - HRESULT ( STDMETHODCALLTYPE *FinalizeableObjectQueued )( + + HRESULT ( STDMETHODCALLTYPE *FinalizeableObjectQueued )( ICorProfilerCallback7 * This, /* [in] */ DWORD finalizerFlags, /* [in] */ ObjectID objectID); - - HRESULT ( STDMETHODCALLTYPE *RootReferences2 )( + + HRESULT ( STDMETHODCALLTYPE *RootReferences2 )( ICorProfilerCallback7 * This, /* [in] */ ULONG cRootRefs, /* [size_is][in] */ ObjectID rootRefIds[ ], /* [size_is][in] */ COR_PRF_GC_ROOT_KIND rootKinds[ ], /* [size_is][in] */ COR_PRF_GC_ROOT_FLAGS rootFlags[ ], /* [size_is][in] */ UINT_PTR rootIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *HandleCreated )( + + HRESULT ( STDMETHODCALLTYPE *HandleCreated )( ICorProfilerCallback7 * This, /* [in] */ GCHandleID handleId, /* [in] */ ObjectID initialObjectId); - - HRESULT ( STDMETHODCALLTYPE *HandleDestroyed )( + + HRESULT ( STDMETHODCALLTYPE *HandleDestroyed )( ICorProfilerCallback7 * This, /* [in] */ GCHandleID handleId); - - HRESULT ( STDMETHODCALLTYPE *InitializeForAttach )( + + HRESULT ( STDMETHODCALLTYPE *InitializeForAttach )( ICorProfilerCallback7 * This, /* [in] */ IUnknown *pCorProfilerInfoUnk, /* [in] */ void *pvClientData, /* [in] */ UINT cbClientData); - - HRESULT ( STDMETHODCALLTYPE *ProfilerAttachComplete )( + + HRESULT ( STDMETHODCALLTYPE *ProfilerAttachComplete )( ICorProfilerCallback7 * This); - - HRESULT ( STDMETHODCALLTYPE *ProfilerDetachSucceeded )( + + HRESULT ( STDMETHODCALLTYPE *ProfilerDetachSucceeded )( ICorProfilerCallback7 * This); - - HRESULT ( STDMETHODCALLTYPE *ReJITCompilationStarted )( + + HRESULT ( STDMETHODCALLTYPE *ReJITCompilationStarted )( ICorProfilerCallback7 * This, /* [in] */ FunctionID functionId, /* [in] */ ReJITID rejitId, /* [in] */ BOOL fIsSafeToBlock); - - HRESULT ( STDMETHODCALLTYPE *GetReJITParameters )( + + HRESULT ( STDMETHODCALLTYPE *GetReJITParameters )( ICorProfilerCallback7 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodId, /* [in] */ ICorProfilerFunctionControl *pFunctionControl); - - HRESULT ( STDMETHODCALLTYPE *ReJITCompilationFinished )( + + HRESULT ( STDMETHODCALLTYPE *ReJITCompilationFinished )( ICorProfilerCallback7 * This, /* [in] */ FunctionID functionId, /* [in] */ ReJITID rejitId, /* [in] */ HRESULT hrStatus, /* [in] */ BOOL fIsSafeToBlock); - - HRESULT ( STDMETHODCALLTYPE *ReJITError )( + + HRESULT ( STDMETHODCALLTYPE *ReJITError )( ICorProfilerCallback7 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodId, /* [in] */ FunctionID functionId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *MovedReferences2 )( + + HRESULT ( STDMETHODCALLTYPE *MovedReferences2 )( ICorProfilerCallback7 * This, /* [in] */ ULONG cMovedObjectIDRanges, /* [size_is][in] */ ObjectID oldObjectIDRangeStart[ ], /* [size_is][in] */ ObjectID newObjectIDRangeStart[ ], /* [size_is][in] */ SIZE_T cObjectIDRangeLength[ ]); - - HRESULT ( STDMETHODCALLTYPE *SurvivingReferences2 )( + + HRESULT ( STDMETHODCALLTYPE *SurvivingReferences2 )( ICorProfilerCallback7 * This, /* [in] */ ULONG cSurvivingObjectIDRanges, /* [size_is][in] */ ObjectID objectIDRangeStart[ ], /* [size_is][in] */ SIZE_T cObjectIDRangeLength[ ]); - - HRESULT ( STDMETHODCALLTYPE *ConditionalWeakTableElementReferences )( + + HRESULT ( STDMETHODCALLTYPE *ConditionalWeakTableElementReferences )( ICorProfilerCallback7 * This, /* [in] */ ULONG cRootRefs, /* [size_is][in] */ ObjectID keyRefIds[ ], /* [size_is][in] */ ObjectID valueRefIds[ ], /* [size_is][in] */ GCHandleID rootIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetAssemblyReferences )( + + HRESULT ( STDMETHODCALLTYPE *GetAssemblyReferences )( ICorProfilerCallback7 * This, /* [string][in] */ const WCHAR *wszAssemblyPath, /* [in] */ ICorProfilerAssemblyReferenceProvider *pAsmRefProvider); - - HRESULT ( STDMETHODCALLTYPE *ModuleInMemorySymbolsUpdated )( + + HRESULT ( STDMETHODCALLTYPE *ModuleInMemorySymbolsUpdated )( ICorProfilerCallback7 * This, ModuleID moduleId); - + END_INTERFACE } ICorProfilerCallback7Vtbl; @@ -5641,293 +5660,293 @@ EXTERN_C const IID IID_ICorProfilerCallback7; CONST_VTBL struct ICorProfilerCallback7Vtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ICorProfilerCallback7_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ICorProfilerCallback7_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ICorProfilerCallback7_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ICorProfilerCallback7_Initialize(This,pICorProfilerInfoUnk) \ - ( (This)->lpVtbl -> Initialize(This,pICorProfilerInfoUnk) ) + ( (This)->lpVtbl -> Initialize(This,pICorProfilerInfoUnk) ) #define ICorProfilerCallback7_Shutdown(This) \ - ( (This)->lpVtbl -> Shutdown(This) ) + ( (This)->lpVtbl -> Shutdown(This) ) #define ICorProfilerCallback7_AppDomainCreationStarted(This,appDomainId) \ - ( (This)->lpVtbl -> AppDomainCreationStarted(This,appDomainId) ) + ( (This)->lpVtbl -> AppDomainCreationStarted(This,appDomainId) ) #define ICorProfilerCallback7_AppDomainCreationFinished(This,appDomainId,hrStatus) \ - ( (This)->lpVtbl -> AppDomainCreationFinished(This,appDomainId,hrStatus) ) + ( (This)->lpVtbl -> AppDomainCreationFinished(This,appDomainId,hrStatus) ) #define ICorProfilerCallback7_AppDomainShutdownStarted(This,appDomainId) \ - ( (This)->lpVtbl -> AppDomainShutdownStarted(This,appDomainId) ) + ( (This)->lpVtbl -> AppDomainShutdownStarted(This,appDomainId) ) #define ICorProfilerCallback7_AppDomainShutdownFinished(This,appDomainId,hrStatus) \ - ( (This)->lpVtbl -> AppDomainShutdownFinished(This,appDomainId,hrStatus) ) + ( (This)->lpVtbl -> AppDomainShutdownFinished(This,appDomainId,hrStatus) ) #define ICorProfilerCallback7_AssemblyLoadStarted(This,assemblyId) \ - ( (This)->lpVtbl -> AssemblyLoadStarted(This,assemblyId) ) + ( (This)->lpVtbl -> AssemblyLoadStarted(This,assemblyId) ) #define ICorProfilerCallback7_AssemblyLoadFinished(This,assemblyId,hrStatus) \ - ( (This)->lpVtbl -> AssemblyLoadFinished(This,assemblyId,hrStatus) ) + ( (This)->lpVtbl -> AssemblyLoadFinished(This,assemblyId,hrStatus) ) #define ICorProfilerCallback7_AssemblyUnloadStarted(This,assemblyId) \ - ( (This)->lpVtbl -> AssemblyUnloadStarted(This,assemblyId) ) + ( (This)->lpVtbl -> AssemblyUnloadStarted(This,assemblyId) ) #define ICorProfilerCallback7_AssemblyUnloadFinished(This,assemblyId,hrStatus) \ - ( (This)->lpVtbl -> AssemblyUnloadFinished(This,assemblyId,hrStatus) ) + ( (This)->lpVtbl -> AssemblyUnloadFinished(This,assemblyId,hrStatus) ) #define ICorProfilerCallback7_ModuleLoadStarted(This,moduleId) \ - ( (This)->lpVtbl -> ModuleLoadStarted(This,moduleId) ) + ( (This)->lpVtbl -> ModuleLoadStarted(This,moduleId) ) #define ICorProfilerCallback7_ModuleLoadFinished(This,moduleId,hrStatus) \ - ( (This)->lpVtbl -> ModuleLoadFinished(This,moduleId,hrStatus) ) + ( (This)->lpVtbl -> ModuleLoadFinished(This,moduleId,hrStatus) ) #define ICorProfilerCallback7_ModuleUnloadStarted(This,moduleId) \ - ( (This)->lpVtbl -> ModuleUnloadStarted(This,moduleId) ) + ( (This)->lpVtbl -> ModuleUnloadStarted(This,moduleId) ) #define ICorProfilerCallback7_ModuleUnloadFinished(This,moduleId,hrStatus) \ - ( (This)->lpVtbl -> ModuleUnloadFinished(This,moduleId,hrStatus) ) + ( (This)->lpVtbl -> ModuleUnloadFinished(This,moduleId,hrStatus) ) #define ICorProfilerCallback7_ModuleAttachedToAssembly(This,moduleId,AssemblyId) \ - ( (This)->lpVtbl -> ModuleAttachedToAssembly(This,moduleId,AssemblyId) ) + ( (This)->lpVtbl -> ModuleAttachedToAssembly(This,moduleId,AssemblyId) ) #define ICorProfilerCallback7_ClassLoadStarted(This,classId) \ - ( (This)->lpVtbl -> ClassLoadStarted(This,classId) ) + ( (This)->lpVtbl -> ClassLoadStarted(This,classId) ) #define ICorProfilerCallback7_ClassLoadFinished(This,classId,hrStatus) \ - ( (This)->lpVtbl -> ClassLoadFinished(This,classId,hrStatus) ) + ( (This)->lpVtbl -> ClassLoadFinished(This,classId,hrStatus) ) #define ICorProfilerCallback7_ClassUnloadStarted(This,classId) \ - ( (This)->lpVtbl -> ClassUnloadStarted(This,classId) ) + ( (This)->lpVtbl -> ClassUnloadStarted(This,classId) ) #define ICorProfilerCallback7_ClassUnloadFinished(This,classId,hrStatus) \ - ( (This)->lpVtbl -> ClassUnloadFinished(This,classId,hrStatus) ) + ( (This)->lpVtbl -> ClassUnloadFinished(This,classId,hrStatus) ) #define ICorProfilerCallback7_FunctionUnloadStarted(This,functionId) \ - ( (This)->lpVtbl -> FunctionUnloadStarted(This,functionId) ) + ( (This)->lpVtbl -> FunctionUnloadStarted(This,functionId) ) #define ICorProfilerCallback7_JITCompilationStarted(This,functionId,fIsSafeToBlock) \ - ( (This)->lpVtbl -> JITCompilationStarted(This,functionId,fIsSafeToBlock) ) + ( (This)->lpVtbl -> JITCompilationStarted(This,functionId,fIsSafeToBlock) ) #define ICorProfilerCallback7_JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \ - ( (This)->lpVtbl -> JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) ) + ( (This)->lpVtbl -> JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) ) #define ICorProfilerCallback7_JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) \ - ( (This)->lpVtbl -> JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) ) + ( (This)->lpVtbl -> JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) ) #define ICorProfilerCallback7_JITCachedFunctionSearchFinished(This,functionId,result) \ - ( (This)->lpVtbl -> JITCachedFunctionSearchFinished(This,functionId,result) ) + ( (This)->lpVtbl -> JITCachedFunctionSearchFinished(This,functionId,result) ) #define ICorProfilerCallback7_JITFunctionPitched(This,functionId) \ - ( (This)->lpVtbl -> JITFunctionPitched(This,functionId) ) + ( (This)->lpVtbl -> JITFunctionPitched(This,functionId) ) #define ICorProfilerCallback7_JITInlining(This,callerId,calleeId,pfShouldInline) \ - ( (This)->lpVtbl -> JITInlining(This,callerId,calleeId,pfShouldInline) ) + ( (This)->lpVtbl -> JITInlining(This,callerId,calleeId,pfShouldInline) ) #define ICorProfilerCallback7_ThreadCreated(This,threadId) \ - ( (This)->lpVtbl -> ThreadCreated(This,threadId) ) + ( (This)->lpVtbl -> ThreadCreated(This,threadId) ) #define ICorProfilerCallback7_ThreadDestroyed(This,threadId) \ - ( (This)->lpVtbl -> ThreadDestroyed(This,threadId) ) + ( (This)->lpVtbl -> ThreadDestroyed(This,threadId) ) #define ICorProfilerCallback7_ThreadAssignedToOSThread(This,managedThreadId,osThreadId) \ - ( (This)->lpVtbl -> ThreadAssignedToOSThread(This,managedThreadId,osThreadId) ) + ( (This)->lpVtbl -> ThreadAssignedToOSThread(This,managedThreadId,osThreadId) ) #define ICorProfilerCallback7_RemotingClientInvocationStarted(This) \ - ( (This)->lpVtbl -> RemotingClientInvocationStarted(This) ) + ( (This)->lpVtbl -> RemotingClientInvocationStarted(This) ) #define ICorProfilerCallback7_RemotingClientSendingMessage(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingClientSendingMessage(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingClientSendingMessage(This,pCookie,fIsAsync) ) #define ICorProfilerCallback7_RemotingClientReceivingReply(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingClientReceivingReply(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingClientReceivingReply(This,pCookie,fIsAsync) ) #define ICorProfilerCallback7_RemotingClientInvocationFinished(This) \ - ( (This)->lpVtbl -> RemotingClientInvocationFinished(This) ) + ( (This)->lpVtbl -> RemotingClientInvocationFinished(This) ) #define ICorProfilerCallback7_RemotingServerReceivingMessage(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingServerReceivingMessage(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingServerReceivingMessage(This,pCookie,fIsAsync) ) #define ICorProfilerCallback7_RemotingServerInvocationStarted(This) \ - ( (This)->lpVtbl -> RemotingServerInvocationStarted(This) ) + ( (This)->lpVtbl -> RemotingServerInvocationStarted(This) ) #define ICorProfilerCallback7_RemotingServerInvocationReturned(This) \ - ( (This)->lpVtbl -> RemotingServerInvocationReturned(This) ) + ( (This)->lpVtbl -> RemotingServerInvocationReturned(This) ) #define ICorProfilerCallback7_RemotingServerSendingReply(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingServerSendingReply(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingServerSendingReply(This,pCookie,fIsAsync) ) #define ICorProfilerCallback7_UnmanagedToManagedTransition(This,functionId,reason) \ - ( (This)->lpVtbl -> UnmanagedToManagedTransition(This,functionId,reason) ) + ( (This)->lpVtbl -> UnmanagedToManagedTransition(This,functionId,reason) ) #define ICorProfilerCallback7_ManagedToUnmanagedTransition(This,functionId,reason) \ - ( (This)->lpVtbl -> ManagedToUnmanagedTransition(This,functionId,reason) ) + ( (This)->lpVtbl -> ManagedToUnmanagedTransition(This,functionId,reason) ) #define ICorProfilerCallback7_RuntimeSuspendStarted(This,suspendReason) \ - ( (This)->lpVtbl -> RuntimeSuspendStarted(This,suspendReason) ) + ( (This)->lpVtbl -> RuntimeSuspendStarted(This,suspendReason) ) #define ICorProfilerCallback7_RuntimeSuspendFinished(This) \ - ( (This)->lpVtbl -> RuntimeSuspendFinished(This) ) + ( (This)->lpVtbl -> RuntimeSuspendFinished(This) ) #define ICorProfilerCallback7_RuntimeSuspendAborted(This) \ - ( (This)->lpVtbl -> RuntimeSuspendAborted(This) ) + ( (This)->lpVtbl -> RuntimeSuspendAborted(This) ) #define ICorProfilerCallback7_RuntimeResumeStarted(This) \ - ( (This)->lpVtbl -> RuntimeResumeStarted(This) ) + ( (This)->lpVtbl -> RuntimeResumeStarted(This) ) #define ICorProfilerCallback7_RuntimeResumeFinished(This) \ - ( (This)->lpVtbl -> RuntimeResumeFinished(This) ) + ( (This)->lpVtbl -> RuntimeResumeFinished(This) ) #define ICorProfilerCallback7_RuntimeThreadSuspended(This,threadId) \ - ( (This)->lpVtbl -> RuntimeThreadSuspended(This,threadId) ) + ( (This)->lpVtbl -> RuntimeThreadSuspended(This,threadId) ) #define ICorProfilerCallback7_RuntimeThreadResumed(This,threadId) \ - ( (This)->lpVtbl -> RuntimeThreadResumed(This,threadId) ) + ( (This)->lpVtbl -> RuntimeThreadResumed(This,threadId) ) #define ICorProfilerCallback7_MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \ - ( (This)->lpVtbl -> MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) ) + ( (This)->lpVtbl -> MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) ) #define ICorProfilerCallback7_ObjectAllocated(This,objectId,classId) \ - ( (This)->lpVtbl -> ObjectAllocated(This,objectId,classId) ) + ( (This)->lpVtbl -> ObjectAllocated(This,objectId,classId) ) #define ICorProfilerCallback7_ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) \ - ( (This)->lpVtbl -> ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) ) + ( (This)->lpVtbl -> ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) ) #define ICorProfilerCallback7_ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) \ - ( (This)->lpVtbl -> ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) ) + ( (This)->lpVtbl -> ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) ) #define ICorProfilerCallback7_RootReferences(This,cRootRefs,rootRefIds) \ - ( (This)->lpVtbl -> RootReferences(This,cRootRefs,rootRefIds) ) + ( (This)->lpVtbl -> RootReferences(This,cRootRefs,rootRefIds) ) #define ICorProfilerCallback7_ExceptionThrown(This,thrownObjectId) \ - ( (This)->lpVtbl -> ExceptionThrown(This,thrownObjectId) ) + ( (This)->lpVtbl -> ExceptionThrown(This,thrownObjectId) ) #define ICorProfilerCallback7_ExceptionSearchFunctionEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionSearchFunctionEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionSearchFunctionEnter(This,functionId) ) #define ICorProfilerCallback7_ExceptionSearchFunctionLeave(This) \ - ( (This)->lpVtbl -> ExceptionSearchFunctionLeave(This) ) + ( (This)->lpVtbl -> ExceptionSearchFunctionLeave(This) ) #define ICorProfilerCallback7_ExceptionSearchFilterEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionSearchFilterEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionSearchFilterEnter(This,functionId) ) #define ICorProfilerCallback7_ExceptionSearchFilterLeave(This) \ - ( (This)->lpVtbl -> ExceptionSearchFilterLeave(This) ) + ( (This)->lpVtbl -> ExceptionSearchFilterLeave(This) ) #define ICorProfilerCallback7_ExceptionSearchCatcherFound(This,functionId) \ - ( (This)->lpVtbl -> ExceptionSearchCatcherFound(This,functionId) ) + ( (This)->lpVtbl -> ExceptionSearchCatcherFound(This,functionId) ) #define ICorProfilerCallback7_ExceptionOSHandlerEnter(This,__unused) \ - ( (This)->lpVtbl -> ExceptionOSHandlerEnter(This,__unused) ) + ( (This)->lpVtbl -> ExceptionOSHandlerEnter(This,__unused) ) #define ICorProfilerCallback7_ExceptionOSHandlerLeave(This,__unused) \ - ( (This)->lpVtbl -> ExceptionOSHandlerLeave(This,__unused) ) + ( (This)->lpVtbl -> ExceptionOSHandlerLeave(This,__unused) ) #define ICorProfilerCallback7_ExceptionUnwindFunctionEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionUnwindFunctionEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionUnwindFunctionEnter(This,functionId) ) #define ICorProfilerCallback7_ExceptionUnwindFunctionLeave(This) \ - ( (This)->lpVtbl -> ExceptionUnwindFunctionLeave(This) ) + ( (This)->lpVtbl -> ExceptionUnwindFunctionLeave(This) ) #define ICorProfilerCallback7_ExceptionUnwindFinallyEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionUnwindFinallyEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionUnwindFinallyEnter(This,functionId) ) #define ICorProfilerCallback7_ExceptionUnwindFinallyLeave(This) \ - ( (This)->lpVtbl -> ExceptionUnwindFinallyLeave(This) ) + ( (This)->lpVtbl -> ExceptionUnwindFinallyLeave(This) ) #define ICorProfilerCallback7_ExceptionCatcherEnter(This,functionId,objectId) \ - ( (This)->lpVtbl -> ExceptionCatcherEnter(This,functionId,objectId) ) + ( (This)->lpVtbl -> ExceptionCatcherEnter(This,functionId,objectId) ) #define ICorProfilerCallback7_ExceptionCatcherLeave(This) \ - ( (This)->lpVtbl -> ExceptionCatcherLeave(This) ) + ( (This)->lpVtbl -> ExceptionCatcherLeave(This) ) #define ICorProfilerCallback7_COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) \ - ( (This)->lpVtbl -> COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) ) + ( (This)->lpVtbl -> COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) ) #define ICorProfilerCallback7_COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) \ - ( (This)->lpVtbl -> COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) ) + ( (This)->lpVtbl -> COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) ) #define ICorProfilerCallback7_ExceptionCLRCatcherFound(This) \ - ( (This)->lpVtbl -> ExceptionCLRCatcherFound(This) ) + ( (This)->lpVtbl -> ExceptionCLRCatcherFound(This) ) #define ICorProfilerCallback7_ExceptionCLRCatcherExecute(This) \ - ( (This)->lpVtbl -> ExceptionCLRCatcherExecute(This) ) + ( (This)->lpVtbl -> ExceptionCLRCatcherExecute(This) ) #define ICorProfilerCallback7_ThreadNameChanged(This,threadId,cchName,name) \ - ( (This)->lpVtbl -> ThreadNameChanged(This,threadId,cchName,name) ) + ( (This)->lpVtbl -> ThreadNameChanged(This,threadId,cchName,name) ) #define ICorProfilerCallback7_GarbageCollectionStarted(This,cGenerations,generationCollected,reason) \ - ( (This)->lpVtbl -> GarbageCollectionStarted(This,cGenerations,generationCollected,reason) ) + ( (This)->lpVtbl -> GarbageCollectionStarted(This,cGenerations,generationCollected,reason) ) #define ICorProfilerCallback7_SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \ - ( (This)->lpVtbl -> SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) ) + ( (This)->lpVtbl -> SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) ) #define ICorProfilerCallback7_GarbageCollectionFinished(This) \ - ( (This)->lpVtbl -> GarbageCollectionFinished(This) ) + ( (This)->lpVtbl -> GarbageCollectionFinished(This) ) #define ICorProfilerCallback7_FinalizeableObjectQueued(This,finalizerFlags,objectID) \ - ( (This)->lpVtbl -> FinalizeableObjectQueued(This,finalizerFlags,objectID) ) + ( (This)->lpVtbl -> FinalizeableObjectQueued(This,finalizerFlags,objectID) ) #define ICorProfilerCallback7_RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) \ - ( (This)->lpVtbl -> RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) ) + ( (This)->lpVtbl -> RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) ) #define ICorProfilerCallback7_HandleCreated(This,handleId,initialObjectId) \ - ( (This)->lpVtbl -> HandleCreated(This,handleId,initialObjectId) ) + ( (This)->lpVtbl -> HandleCreated(This,handleId,initialObjectId) ) #define ICorProfilerCallback7_HandleDestroyed(This,handleId) \ - ( (This)->lpVtbl -> HandleDestroyed(This,handleId) ) + ( (This)->lpVtbl -> HandleDestroyed(This,handleId) ) #define ICorProfilerCallback7_InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) \ - ( (This)->lpVtbl -> InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) ) + ( (This)->lpVtbl -> InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) ) #define ICorProfilerCallback7_ProfilerAttachComplete(This) \ - ( (This)->lpVtbl -> ProfilerAttachComplete(This) ) + ( (This)->lpVtbl -> ProfilerAttachComplete(This) ) #define ICorProfilerCallback7_ProfilerDetachSucceeded(This) \ - ( (This)->lpVtbl -> ProfilerDetachSucceeded(This) ) + ( (This)->lpVtbl -> ProfilerDetachSucceeded(This) ) #define ICorProfilerCallback7_ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) \ - ( (This)->lpVtbl -> ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) ) + ( (This)->lpVtbl -> ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) ) #define ICorProfilerCallback7_GetReJITParameters(This,moduleId,methodId,pFunctionControl) \ - ( (This)->lpVtbl -> GetReJITParameters(This,moduleId,methodId,pFunctionControl) ) + ( (This)->lpVtbl -> GetReJITParameters(This,moduleId,methodId,pFunctionControl) ) #define ICorProfilerCallback7_ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) \ - ( (This)->lpVtbl -> ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) ) + ( (This)->lpVtbl -> ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) ) #define ICorProfilerCallback7_ReJITError(This,moduleId,methodId,functionId,hrStatus) \ - ( (This)->lpVtbl -> ReJITError(This,moduleId,methodId,functionId,hrStatus) ) + ( (This)->lpVtbl -> ReJITError(This,moduleId,methodId,functionId,hrStatus) ) #define ICorProfilerCallback7_MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \ - ( (This)->lpVtbl -> MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) ) + ( (This)->lpVtbl -> MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) ) #define ICorProfilerCallback7_SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \ - ( (This)->lpVtbl -> SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) ) + ( (This)->lpVtbl -> SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) ) #define ICorProfilerCallback7_ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) \ - ( (This)->lpVtbl -> ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) ) + ( (This)->lpVtbl -> ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) ) #define ICorProfilerCallback7_GetAssemblyReferences(This,wszAssemblyPath,pAsmRefProvider) \ - ( (This)->lpVtbl -> GetAssemblyReferences(This,wszAssemblyPath,pAsmRefProvider) ) + ( (This)->lpVtbl -> GetAssemblyReferences(This,wszAssemblyPath,pAsmRefProvider) ) #define ICorProfilerCallback7_ModuleInMemorySymbolsUpdated(This,moduleId) \ - ( (This)->lpVtbl -> ModuleInMemorySymbolsUpdated(This,moduleId) ) + ( (This)->lpVtbl -> ModuleInMemorySymbolsUpdated(This,moduleId) ) #endif /* COBJMACROS */ @@ -5944,472 +5963,472 @@ EXTERN_C const IID IID_ICorProfilerCallback7; #define __ICorProfilerCallback8_INTERFACE_DEFINED__ /* interface ICorProfilerCallback8 */ -/* [local][unique][uuid][object] */ +/* [local][unique][uuid][object] */ EXTERN_C const IID IID_ICorProfilerCallback8; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("5BED9B15-C079-4D47-BFE2-215A140C07E0") ICorProfilerCallback8 : public ICorProfilerCallback7 { public: - virtual HRESULT STDMETHODCALLTYPE DynamicMethodJITCompilationStarted( + virtual HRESULT STDMETHODCALLTYPE DynamicMethodJITCompilationStarted( /* [in] */ FunctionID functionId, /* [in] */ BOOL fIsSafeToBlock, /* [in] */ LPCBYTE pILHeader, /* [in] */ ULONG cbILHeader) = 0; - - virtual HRESULT STDMETHODCALLTYPE DynamicMethodJITCompilationFinished( + + virtual HRESULT STDMETHODCALLTYPE DynamicMethodJITCompilationFinished( /* [in] */ FunctionID functionId, /* [in] */ HRESULT hrStatus, /* [in] */ BOOL fIsSafeToBlock) = 0; - + }; - - + + #else /* C style interface */ typedef struct ICorProfilerCallback8Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorProfilerCallback8 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorProfilerCallback8 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorProfilerCallback8 * This); - - HRESULT ( STDMETHODCALLTYPE *Initialize )( + + HRESULT ( STDMETHODCALLTYPE *Initialize )( ICorProfilerCallback8 * This, /* [in] */ IUnknown *pICorProfilerInfoUnk); - - HRESULT ( STDMETHODCALLTYPE *Shutdown )( + + HRESULT ( STDMETHODCALLTYPE *Shutdown )( ICorProfilerCallback8 * This); - - HRESULT ( STDMETHODCALLTYPE *AppDomainCreationStarted )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainCreationStarted )( ICorProfilerCallback8 * This, /* [in] */ AppDomainID appDomainId); - - HRESULT ( STDMETHODCALLTYPE *AppDomainCreationFinished )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainCreationFinished )( ICorProfilerCallback8 * This, /* [in] */ AppDomainID appDomainId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownStarted )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownStarted )( ICorProfilerCallback8 * This, /* [in] */ AppDomainID appDomainId); - - HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownFinished )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownFinished )( ICorProfilerCallback8 * This, /* [in] */ AppDomainID appDomainId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *AssemblyLoadStarted )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyLoadStarted )( ICorProfilerCallback8 * This, /* [in] */ AssemblyID assemblyId); - - HRESULT ( STDMETHODCALLTYPE *AssemblyLoadFinished )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyLoadFinished )( ICorProfilerCallback8 * This, /* [in] */ AssemblyID assemblyId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadStarted )( ICorProfilerCallback8 * This, /* [in] */ AssemblyID assemblyId); - - HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadFinished )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadFinished )( ICorProfilerCallback8 * This, /* [in] */ AssemblyID assemblyId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ModuleLoadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ModuleLoadStarted )( ICorProfilerCallback8 * This, /* [in] */ ModuleID moduleId); - - HRESULT ( STDMETHODCALLTYPE *ModuleLoadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ModuleLoadFinished )( ICorProfilerCallback8 * This, /* [in] */ ModuleID moduleId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ModuleUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ModuleUnloadStarted )( ICorProfilerCallback8 * This, /* [in] */ ModuleID moduleId); - - HRESULT ( STDMETHODCALLTYPE *ModuleUnloadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ModuleUnloadFinished )( ICorProfilerCallback8 * This, /* [in] */ ModuleID moduleId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ModuleAttachedToAssembly )( + + HRESULT ( STDMETHODCALLTYPE *ModuleAttachedToAssembly )( ICorProfilerCallback8 * This, /* [in] */ ModuleID moduleId, /* [in] */ AssemblyID AssemblyId); - - HRESULT ( STDMETHODCALLTYPE *ClassLoadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ClassLoadStarted )( ICorProfilerCallback8 * This, /* [in] */ ClassID classId); - - HRESULT ( STDMETHODCALLTYPE *ClassLoadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ClassLoadFinished )( ICorProfilerCallback8 * This, /* [in] */ ClassID classId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ClassUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ClassUnloadStarted )( ICorProfilerCallback8 * This, /* [in] */ ClassID classId); - - HRESULT ( STDMETHODCALLTYPE *ClassUnloadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ClassUnloadFinished )( ICorProfilerCallback8 * This, /* [in] */ ClassID classId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *FunctionUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *FunctionUnloadStarted )( ICorProfilerCallback8 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *JITCompilationStarted )( + + HRESULT ( STDMETHODCALLTYPE *JITCompilationStarted )( ICorProfilerCallback8 * This, /* [in] */ FunctionID functionId, /* [in] */ BOOL fIsSafeToBlock); - - HRESULT ( STDMETHODCALLTYPE *JITCompilationFinished )( + + HRESULT ( STDMETHODCALLTYPE *JITCompilationFinished )( ICorProfilerCallback8 * This, /* [in] */ FunctionID functionId, /* [in] */ HRESULT hrStatus, /* [in] */ BOOL fIsSafeToBlock); - - HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchStarted )( + + HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchStarted )( ICorProfilerCallback8 * This, /* [in] */ FunctionID functionId, /* [out] */ BOOL *pbUseCachedFunction); - - HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchFinished )( + + HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchFinished )( ICorProfilerCallback8 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_JIT_CACHE result); - - HRESULT ( STDMETHODCALLTYPE *JITFunctionPitched )( + + HRESULT ( STDMETHODCALLTYPE *JITFunctionPitched )( ICorProfilerCallback8 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *JITInlining )( + + HRESULT ( STDMETHODCALLTYPE *JITInlining )( ICorProfilerCallback8 * This, /* [in] */ FunctionID callerId, /* [in] */ FunctionID calleeId, /* [out] */ BOOL *pfShouldInline); - - HRESULT ( STDMETHODCALLTYPE *ThreadCreated )( + + HRESULT ( STDMETHODCALLTYPE *ThreadCreated )( ICorProfilerCallback8 * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *ThreadDestroyed )( + + HRESULT ( STDMETHODCALLTYPE *ThreadDestroyed )( ICorProfilerCallback8 * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *ThreadAssignedToOSThread )( + + HRESULT ( STDMETHODCALLTYPE *ThreadAssignedToOSThread )( ICorProfilerCallback8 * This, /* [in] */ ThreadID managedThreadId, /* [in] */ DWORD osThreadId); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationStarted )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationStarted )( ICorProfilerCallback8 * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientSendingMessage )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientSendingMessage )( ICorProfilerCallback8 * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientReceivingReply )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientReceivingReply )( ICorProfilerCallback8 * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationFinished )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationFinished )( ICorProfilerCallback8 * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerReceivingMessage )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerReceivingMessage )( ICorProfilerCallback8 * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationStarted )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationStarted )( ICorProfilerCallback8 * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationReturned )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationReturned )( ICorProfilerCallback8 * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerSendingReply )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerSendingReply )( ICorProfilerCallback8 * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *UnmanagedToManagedTransition )( + + HRESULT ( STDMETHODCALLTYPE *UnmanagedToManagedTransition )( ICorProfilerCallback8 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_TRANSITION_REASON reason); - - HRESULT ( STDMETHODCALLTYPE *ManagedToUnmanagedTransition )( + + HRESULT ( STDMETHODCALLTYPE *ManagedToUnmanagedTransition )( ICorProfilerCallback8 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_TRANSITION_REASON reason); - - HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendStarted )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendStarted )( ICorProfilerCallback8 * This, /* [in] */ COR_PRF_SUSPEND_REASON suspendReason); - - HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendFinished )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendFinished )( ICorProfilerCallback8 * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendAborted )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendAborted )( ICorProfilerCallback8 * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeResumeStarted )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeResumeStarted )( ICorProfilerCallback8 * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeResumeFinished )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeResumeFinished )( ICorProfilerCallback8 * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeThreadSuspended )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeThreadSuspended )( ICorProfilerCallback8 * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *RuntimeThreadResumed )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeThreadResumed )( ICorProfilerCallback8 * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *MovedReferences )( + + HRESULT ( STDMETHODCALLTYPE *MovedReferences )( ICorProfilerCallback8 * This, /* [in] */ ULONG cMovedObjectIDRanges, /* [size_is][in] */ ObjectID oldObjectIDRangeStart[ ], /* [size_is][in] */ ObjectID newObjectIDRangeStart[ ], /* [size_is][in] */ ULONG cObjectIDRangeLength[ ]); - - HRESULT ( STDMETHODCALLTYPE *ObjectAllocated )( + + HRESULT ( STDMETHODCALLTYPE *ObjectAllocated )( ICorProfilerCallback8 * This, /* [in] */ ObjectID objectId, /* [in] */ ClassID classId); - - HRESULT ( STDMETHODCALLTYPE *ObjectsAllocatedByClass )( + + HRESULT ( STDMETHODCALLTYPE *ObjectsAllocatedByClass )( ICorProfilerCallback8 * This, /* [in] */ ULONG cClassCount, /* [size_is][in] */ ClassID classIds[ ], /* [size_is][in] */ ULONG cObjects[ ]); - - HRESULT ( STDMETHODCALLTYPE *ObjectReferences )( + + HRESULT ( STDMETHODCALLTYPE *ObjectReferences )( ICorProfilerCallback8 * This, /* [in] */ ObjectID objectId, /* [in] */ ClassID classId, /* [in] */ ULONG cObjectRefs, /* [size_is][in] */ ObjectID objectRefIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *RootReferences )( + + HRESULT ( STDMETHODCALLTYPE *RootReferences )( ICorProfilerCallback8 * This, /* [in] */ ULONG cRootRefs, /* [size_is][in] */ ObjectID rootRefIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *ExceptionThrown )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionThrown )( ICorProfilerCallback8 * This, /* [in] */ ObjectID thrownObjectId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionEnter )( ICorProfilerCallback8 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionLeave )( ICorProfilerCallback8 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterEnter )( ICorProfilerCallback8 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterLeave )( ICorProfilerCallback8 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchCatcherFound )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchCatcherFound )( ICorProfilerCallback8 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerEnter )( ICorProfilerCallback8 * This, /* [in] */ UINT_PTR __unused); - - HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerLeave )( ICorProfilerCallback8 * This, /* [in] */ UINT_PTR __unused); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionEnter )( ICorProfilerCallback8 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionLeave )( ICorProfilerCallback8 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyEnter )( ICorProfilerCallback8 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyLeave )( ICorProfilerCallback8 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherEnter )( ICorProfilerCallback8 * This, /* [in] */ FunctionID functionId, /* [in] */ ObjectID objectId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherLeave )( ICorProfilerCallback8 * This); - - HRESULT ( STDMETHODCALLTYPE *COMClassicVTableCreated )( + + HRESULT ( STDMETHODCALLTYPE *COMClassicVTableCreated )( ICorProfilerCallback8 * This, /* [in] */ ClassID wrappedClassId, /* [in] */ REFGUID implementedIID, /* [in] */ void *pVTable, /* [in] */ ULONG cSlots); - - HRESULT ( STDMETHODCALLTYPE *COMClassicVTableDestroyed )( + + HRESULT ( STDMETHODCALLTYPE *COMClassicVTableDestroyed )( ICorProfilerCallback8 * This, /* [in] */ ClassID wrappedClassId, /* [in] */ REFGUID implementedIID, /* [in] */ void *pVTable); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherFound )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherFound )( ICorProfilerCallback8 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherExecute )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherExecute )( ICorProfilerCallback8 * This); - - HRESULT ( STDMETHODCALLTYPE *ThreadNameChanged )( + + HRESULT ( STDMETHODCALLTYPE *ThreadNameChanged )( ICorProfilerCallback8 * This, /* [in] */ ThreadID threadId, /* [in] */ ULONG cchName, - /* [annotation][in] */ + /* [annotation][in] */ _In_reads_opt_(cchName) WCHAR name[ ]); - - HRESULT ( STDMETHODCALLTYPE *GarbageCollectionStarted )( + + HRESULT ( STDMETHODCALLTYPE *GarbageCollectionStarted )( ICorProfilerCallback8 * This, /* [in] */ int cGenerations, /* [size_is][in] */ BOOL generationCollected[ ], /* [in] */ COR_PRF_GC_REASON reason); - - HRESULT ( STDMETHODCALLTYPE *SurvivingReferences )( + + HRESULT ( STDMETHODCALLTYPE *SurvivingReferences )( ICorProfilerCallback8 * This, /* [in] */ ULONG cSurvivingObjectIDRanges, /* [size_is][in] */ ObjectID objectIDRangeStart[ ], /* [size_is][in] */ ULONG cObjectIDRangeLength[ ]); - - HRESULT ( STDMETHODCALLTYPE *GarbageCollectionFinished )( + + HRESULT ( STDMETHODCALLTYPE *GarbageCollectionFinished )( ICorProfilerCallback8 * This); - - HRESULT ( STDMETHODCALLTYPE *FinalizeableObjectQueued )( + + HRESULT ( STDMETHODCALLTYPE *FinalizeableObjectQueued )( ICorProfilerCallback8 * This, /* [in] */ DWORD finalizerFlags, /* [in] */ ObjectID objectID); - - HRESULT ( STDMETHODCALLTYPE *RootReferences2 )( + + HRESULT ( STDMETHODCALLTYPE *RootReferences2 )( ICorProfilerCallback8 * This, /* [in] */ ULONG cRootRefs, /* [size_is][in] */ ObjectID rootRefIds[ ], /* [size_is][in] */ COR_PRF_GC_ROOT_KIND rootKinds[ ], /* [size_is][in] */ COR_PRF_GC_ROOT_FLAGS rootFlags[ ], /* [size_is][in] */ UINT_PTR rootIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *HandleCreated )( + + HRESULT ( STDMETHODCALLTYPE *HandleCreated )( ICorProfilerCallback8 * This, /* [in] */ GCHandleID handleId, /* [in] */ ObjectID initialObjectId); - - HRESULT ( STDMETHODCALLTYPE *HandleDestroyed )( + + HRESULT ( STDMETHODCALLTYPE *HandleDestroyed )( ICorProfilerCallback8 * This, /* [in] */ GCHandleID handleId); - - HRESULT ( STDMETHODCALLTYPE *InitializeForAttach )( + + HRESULT ( STDMETHODCALLTYPE *InitializeForAttach )( ICorProfilerCallback8 * This, /* [in] */ IUnknown *pCorProfilerInfoUnk, /* [in] */ void *pvClientData, /* [in] */ UINT cbClientData); - - HRESULT ( STDMETHODCALLTYPE *ProfilerAttachComplete )( + + HRESULT ( STDMETHODCALLTYPE *ProfilerAttachComplete )( ICorProfilerCallback8 * This); - - HRESULT ( STDMETHODCALLTYPE *ProfilerDetachSucceeded )( + + HRESULT ( STDMETHODCALLTYPE *ProfilerDetachSucceeded )( ICorProfilerCallback8 * This); - - HRESULT ( STDMETHODCALLTYPE *ReJITCompilationStarted )( + + HRESULT ( STDMETHODCALLTYPE *ReJITCompilationStarted )( ICorProfilerCallback8 * This, /* [in] */ FunctionID functionId, /* [in] */ ReJITID rejitId, /* [in] */ BOOL fIsSafeToBlock); - - HRESULT ( STDMETHODCALLTYPE *GetReJITParameters )( + + HRESULT ( STDMETHODCALLTYPE *GetReJITParameters )( ICorProfilerCallback8 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodId, /* [in] */ ICorProfilerFunctionControl *pFunctionControl); - - HRESULT ( STDMETHODCALLTYPE *ReJITCompilationFinished )( + + HRESULT ( STDMETHODCALLTYPE *ReJITCompilationFinished )( ICorProfilerCallback8 * This, /* [in] */ FunctionID functionId, /* [in] */ ReJITID rejitId, /* [in] */ HRESULT hrStatus, /* [in] */ BOOL fIsSafeToBlock); - - HRESULT ( STDMETHODCALLTYPE *ReJITError )( + + HRESULT ( STDMETHODCALLTYPE *ReJITError )( ICorProfilerCallback8 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodId, /* [in] */ FunctionID functionId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *MovedReferences2 )( + + HRESULT ( STDMETHODCALLTYPE *MovedReferences2 )( ICorProfilerCallback8 * This, /* [in] */ ULONG cMovedObjectIDRanges, /* [size_is][in] */ ObjectID oldObjectIDRangeStart[ ], /* [size_is][in] */ ObjectID newObjectIDRangeStart[ ], /* [size_is][in] */ SIZE_T cObjectIDRangeLength[ ]); - - HRESULT ( STDMETHODCALLTYPE *SurvivingReferences2 )( + + HRESULT ( STDMETHODCALLTYPE *SurvivingReferences2 )( ICorProfilerCallback8 * This, /* [in] */ ULONG cSurvivingObjectIDRanges, /* [size_is][in] */ ObjectID objectIDRangeStart[ ], /* [size_is][in] */ SIZE_T cObjectIDRangeLength[ ]); - - HRESULT ( STDMETHODCALLTYPE *ConditionalWeakTableElementReferences )( + + HRESULT ( STDMETHODCALLTYPE *ConditionalWeakTableElementReferences )( ICorProfilerCallback8 * This, /* [in] */ ULONG cRootRefs, /* [size_is][in] */ ObjectID keyRefIds[ ], /* [size_is][in] */ ObjectID valueRefIds[ ], /* [size_is][in] */ GCHandleID rootIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetAssemblyReferences )( + + HRESULT ( STDMETHODCALLTYPE *GetAssemblyReferences )( ICorProfilerCallback8 * This, /* [string][in] */ const WCHAR *wszAssemblyPath, /* [in] */ ICorProfilerAssemblyReferenceProvider *pAsmRefProvider); - - HRESULT ( STDMETHODCALLTYPE *ModuleInMemorySymbolsUpdated )( + + HRESULT ( STDMETHODCALLTYPE *ModuleInMemorySymbolsUpdated )( ICorProfilerCallback8 * This, ModuleID moduleId); - - HRESULT ( STDMETHODCALLTYPE *DynamicMethodJITCompilationStarted )( + + HRESULT ( STDMETHODCALLTYPE *DynamicMethodJITCompilationStarted )( ICorProfilerCallback8 * This, /* [in] */ FunctionID functionId, /* [in] */ BOOL fIsSafeToBlock, /* [in] */ LPCBYTE pILHeader, /* [in] */ ULONG cbILHeader); - - HRESULT ( STDMETHODCALLTYPE *DynamicMethodJITCompilationFinished )( + + HRESULT ( STDMETHODCALLTYPE *DynamicMethodJITCompilationFinished )( ICorProfilerCallback8 * This, /* [in] */ FunctionID functionId, /* [in] */ HRESULT hrStatus, /* [in] */ BOOL fIsSafeToBlock); - + END_INTERFACE } ICorProfilerCallback8Vtbl; @@ -6418,300 +6437,300 @@ EXTERN_C const IID IID_ICorProfilerCallback8; CONST_VTBL struct ICorProfilerCallback8Vtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ICorProfilerCallback8_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ICorProfilerCallback8_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ICorProfilerCallback8_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ICorProfilerCallback8_Initialize(This,pICorProfilerInfoUnk) \ - ( (This)->lpVtbl -> Initialize(This,pICorProfilerInfoUnk) ) + ( (This)->lpVtbl -> Initialize(This,pICorProfilerInfoUnk) ) #define ICorProfilerCallback8_Shutdown(This) \ - ( (This)->lpVtbl -> Shutdown(This) ) + ( (This)->lpVtbl -> Shutdown(This) ) #define ICorProfilerCallback8_AppDomainCreationStarted(This,appDomainId) \ - ( (This)->lpVtbl -> AppDomainCreationStarted(This,appDomainId) ) + ( (This)->lpVtbl -> AppDomainCreationStarted(This,appDomainId) ) #define ICorProfilerCallback8_AppDomainCreationFinished(This,appDomainId,hrStatus) \ - ( (This)->lpVtbl -> AppDomainCreationFinished(This,appDomainId,hrStatus) ) + ( (This)->lpVtbl -> AppDomainCreationFinished(This,appDomainId,hrStatus) ) #define ICorProfilerCallback8_AppDomainShutdownStarted(This,appDomainId) \ - ( (This)->lpVtbl -> AppDomainShutdownStarted(This,appDomainId) ) + ( (This)->lpVtbl -> AppDomainShutdownStarted(This,appDomainId) ) #define ICorProfilerCallback8_AppDomainShutdownFinished(This,appDomainId,hrStatus) \ - ( (This)->lpVtbl -> AppDomainShutdownFinished(This,appDomainId,hrStatus) ) + ( (This)->lpVtbl -> AppDomainShutdownFinished(This,appDomainId,hrStatus) ) #define ICorProfilerCallback8_AssemblyLoadStarted(This,assemblyId) \ - ( (This)->lpVtbl -> AssemblyLoadStarted(This,assemblyId) ) + ( (This)->lpVtbl -> AssemblyLoadStarted(This,assemblyId) ) #define ICorProfilerCallback8_AssemblyLoadFinished(This,assemblyId,hrStatus) \ - ( (This)->lpVtbl -> AssemblyLoadFinished(This,assemblyId,hrStatus) ) + ( (This)->lpVtbl -> AssemblyLoadFinished(This,assemblyId,hrStatus) ) #define ICorProfilerCallback8_AssemblyUnloadStarted(This,assemblyId) \ - ( (This)->lpVtbl -> AssemblyUnloadStarted(This,assemblyId) ) + ( (This)->lpVtbl -> AssemblyUnloadStarted(This,assemblyId) ) #define ICorProfilerCallback8_AssemblyUnloadFinished(This,assemblyId,hrStatus) \ - ( (This)->lpVtbl -> AssemblyUnloadFinished(This,assemblyId,hrStatus) ) + ( (This)->lpVtbl -> AssemblyUnloadFinished(This,assemblyId,hrStatus) ) #define ICorProfilerCallback8_ModuleLoadStarted(This,moduleId) \ - ( (This)->lpVtbl -> ModuleLoadStarted(This,moduleId) ) + ( (This)->lpVtbl -> ModuleLoadStarted(This,moduleId) ) #define ICorProfilerCallback8_ModuleLoadFinished(This,moduleId,hrStatus) \ - ( (This)->lpVtbl -> ModuleLoadFinished(This,moduleId,hrStatus) ) + ( (This)->lpVtbl -> ModuleLoadFinished(This,moduleId,hrStatus) ) #define ICorProfilerCallback8_ModuleUnloadStarted(This,moduleId) \ - ( (This)->lpVtbl -> ModuleUnloadStarted(This,moduleId) ) + ( (This)->lpVtbl -> ModuleUnloadStarted(This,moduleId) ) #define ICorProfilerCallback8_ModuleUnloadFinished(This,moduleId,hrStatus) \ - ( (This)->lpVtbl -> ModuleUnloadFinished(This,moduleId,hrStatus) ) + ( (This)->lpVtbl -> ModuleUnloadFinished(This,moduleId,hrStatus) ) #define ICorProfilerCallback8_ModuleAttachedToAssembly(This,moduleId,AssemblyId) \ - ( (This)->lpVtbl -> ModuleAttachedToAssembly(This,moduleId,AssemblyId) ) + ( (This)->lpVtbl -> ModuleAttachedToAssembly(This,moduleId,AssemblyId) ) #define ICorProfilerCallback8_ClassLoadStarted(This,classId) \ - ( (This)->lpVtbl -> ClassLoadStarted(This,classId) ) + ( (This)->lpVtbl -> ClassLoadStarted(This,classId) ) #define ICorProfilerCallback8_ClassLoadFinished(This,classId,hrStatus) \ - ( (This)->lpVtbl -> ClassLoadFinished(This,classId,hrStatus) ) + ( (This)->lpVtbl -> ClassLoadFinished(This,classId,hrStatus) ) #define ICorProfilerCallback8_ClassUnloadStarted(This,classId) \ - ( (This)->lpVtbl -> ClassUnloadStarted(This,classId) ) + ( (This)->lpVtbl -> ClassUnloadStarted(This,classId) ) #define ICorProfilerCallback8_ClassUnloadFinished(This,classId,hrStatus) \ - ( (This)->lpVtbl -> ClassUnloadFinished(This,classId,hrStatus) ) + ( (This)->lpVtbl -> ClassUnloadFinished(This,classId,hrStatus) ) #define ICorProfilerCallback8_FunctionUnloadStarted(This,functionId) \ - ( (This)->lpVtbl -> FunctionUnloadStarted(This,functionId) ) + ( (This)->lpVtbl -> FunctionUnloadStarted(This,functionId) ) #define ICorProfilerCallback8_JITCompilationStarted(This,functionId,fIsSafeToBlock) \ - ( (This)->lpVtbl -> JITCompilationStarted(This,functionId,fIsSafeToBlock) ) + ( (This)->lpVtbl -> JITCompilationStarted(This,functionId,fIsSafeToBlock) ) #define ICorProfilerCallback8_JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \ - ( (This)->lpVtbl -> JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) ) + ( (This)->lpVtbl -> JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) ) #define ICorProfilerCallback8_JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) \ - ( (This)->lpVtbl -> JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) ) + ( (This)->lpVtbl -> JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) ) #define ICorProfilerCallback8_JITCachedFunctionSearchFinished(This,functionId,result) \ - ( (This)->lpVtbl -> JITCachedFunctionSearchFinished(This,functionId,result) ) + ( (This)->lpVtbl -> JITCachedFunctionSearchFinished(This,functionId,result) ) #define ICorProfilerCallback8_JITFunctionPitched(This,functionId) \ - ( (This)->lpVtbl -> JITFunctionPitched(This,functionId) ) + ( (This)->lpVtbl -> JITFunctionPitched(This,functionId) ) #define ICorProfilerCallback8_JITInlining(This,callerId,calleeId,pfShouldInline) \ - ( (This)->lpVtbl -> JITInlining(This,callerId,calleeId,pfShouldInline) ) + ( (This)->lpVtbl -> JITInlining(This,callerId,calleeId,pfShouldInline) ) #define ICorProfilerCallback8_ThreadCreated(This,threadId) \ - ( (This)->lpVtbl -> ThreadCreated(This,threadId) ) + ( (This)->lpVtbl -> ThreadCreated(This,threadId) ) #define ICorProfilerCallback8_ThreadDestroyed(This,threadId) \ - ( (This)->lpVtbl -> ThreadDestroyed(This,threadId) ) + ( (This)->lpVtbl -> ThreadDestroyed(This,threadId) ) #define ICorProfilerCallback8_ThreadAssignedToOSThread(This,managedThreadId,osThreadId) \ - ( (This)->lpVtbl -> ThreadAssignedToOSThread(This,managedThreadId,osThreadId) ) + ( (This)->lpVtbl -> ThreadAssignedToOSThread(This,managedThreadId,osThreadId) ) #define ICorProfilerCallback8_RemotingClientInvocationStarted(This) \ - ( (This)->lpVtbl -> RemotingClientInvocationStarted(This) ) + ( (This)->lpVtbl -> RemotingClientInvocationStarted(This) ) #define ICorProfilerCallback8_RemotingClientSendingMessage(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingClientSendingMessage(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingClientSendingMessage(This,pCookie,fIsAsync) ) #define ICorProfilerCallback8_RemotingClientReceivingReply(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingClientReceivingReply(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingClientReceivingReply(This,pCookie,fIsAsync) ) #define ICorProfilerCallback8_RemotingClientInvocationFinished(This) \ - ( (This)->lpVtbl -> RemotingClientInvocationFinished(This) ) + ( (This)->lpVtbl -> RemotingClientInvocationFinished(This) ) #define ICorProfilerCallback8_RemotingServerReceivingMessage(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingServerReceivingMessage(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingServerReceivingMessage(This,pCookie,fIsAsync) ) #define ICorProfilerCallback8_RemotingServerInvocationStarted(This) \ - ( (This)->lpVtbl -> RemotingServerInvocationStarted(This) ) + ( (This)->lpVtbl -> RemotingServerInvocationStarted(This) ) #define ICorProfilerCallback8_RemotingServerInvocationReturned(This) \ - ( (This)->lpVtbl -> RemotingServerInvocationReturned(This) ) + ( (This)->lpVtbl -> RemotingServerInvocationReturned(This) ) #define ICorProfilerCallback8_RemotingServerSendingReply(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingServerSendingReply(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingServerSendingReply(This,pCookie,fIsAsync) ) #define ICorProfilerCallback8_UnmanagedToManagedTransition(This,functionId,reason) \ - ( (This)->lpVtbl -> UnmanagedToManagedTransition(This,functionId,reason) ) + ( (This)->lpVtbl -> UnmanagedToManagedTransition(This,functionId,reason) ) #define ICorProfilerCallback8_ManagedToUnmanagedTransition(This,functionId,reason) \ - ( (This)->lpVtbl -> ManagedToUnmanagedTransition(This,functionId,reason) ) + ( (This)->lpVtbl -> ManagedToUnmanagedTransition(This,functionId,reason) ) #define ICorProfilerCallback8_RuntimeSuspendStarted(This,suspendReason) \ - ( (This)->lpVtbl -> RuntimeSuspendStarted(This,suspendReason) ) + ( (This)->lpVtbl -> RuntimeSuspendStarted(This,suspendReason) ) #define ICorProfilerCallback8_RuntimeSuspendFinished(This) \ - ( (This)->lpVtbl -> RuntimeSuspendFinished(This) ) + ( (This)->lpVtbl -> RuntimeSuspendFinished(This) ) #define ICorProfilerCallback8_RuntimeSuspendAborted(This) \ - ( (This)->lpVtbl -> RuntimeSuspendAborted(This) ) + ( (This)->lpVtbl -> RuntimeSuspendAborted(This) ) #define ICorProfilerCallback8_RuntimeResumeStarted(This) \ - ( (This)->lpVtbl -> RuntimeResumeStarted(This) ) + ( (This)->lpVtbl -> RuntimeResumeStarted(This) ) #define ICorProfilerCallback8_RuntimeResumeFinished(This) \ - ( (This)->lpVtbl -> RuntimeResumeFinished(This) ) + ( (This)->lpVtbl -> RuntimeResumeFinished(This) ) #define ICorProfilerCallback8_RuntimeThreadSuspended(This,threadId) \ - ( (This)->lpVtbl -> RuntimeThreadSuspended(This,threadId) ) + ( (This)->lpVtbl -> RuntimeThreadSuspended(This,threadId) ) #define ICorProfilerCallback8_RuntimeThreadResumed(This,threadId) \ - ( (This)->lpVtbl -> RuntimeThreadResumed(This,threadId) ) + ( (This)->lpVtbl -> RuntimeThreadResumed(This,threadId) ) #define ICorProfilerCallback8_MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \ - ( (This)->lpVtbl -> MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) ) + ( (This)->lpVtbl -> MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) ) #define ICorProfilerCallback8_ObjectAllocated(This,objectId,classId) \ - ( (This)->lpVtbl -> ObjectAllocated(This,objectId,classId) ) + ( (This)->lpVtbl -> ObjectAllocated(This,objectId,classId) ) #define ICorProfilerCallback8_ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) \ - ( (This)->lpVtbl -> ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) ) + ( (This)->lpVtbl -> ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) ) #define ICorProfilerCallback8_ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) \ - ( (This)->lpVtbl -> ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) ) + ( (This)->lpVtbl -> ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) ) #define ICorProfilerCallback8_RootReferences(This,cRootRefs,rootRefIds) \ - ( (This)->lpVtbl -> RootReferences(This,cRootRefs,rootRefIds) ) + ( (This)->lpVtbl -> RootReferences(This,cRootRefs,rootRefIds) ) #define ICorProfilerCallback8_ExceptionThrown(This,thrownObjectId) \ - ( (This)->lpVtbl -> ExceptionThrown(This,thrownObjectId) ) + ( (This)->lpVtbl -> ExceptionThrown(This,thrownObjectId) ) #define ICorProfilerCallback8_ExceptionSearchFunctionEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionSearchFunctionEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionSearchFunctionEnter(This,functionId) ) #define ICorProfilerCallback8_ExceptionSearchFunctionLeave(This) \ - ( (This)->lpVtbl -> ExceptionSearchFunctionLeave(This) ) + ( (This)->lpVtbl -> ExceptionSearchFunctionLeave(This) ) #define ICorProfilerCallback8_ExceptionSearchFilterEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionSearchFilterEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionSearchFilterEnter(This,functionId) ) #define ICorProfilerCallback8_ExceptionSearchFilterLeave(This) \ - ( (This)->lpVtbl -> ExceptionSearchFilterLeave(This) ) + ( (This)->lpVtbl -> ExceptionSearchFilterLeave(This) ) #define ICorProfilerCallback8_ExceptionSearchCatcherFound(This,functionId) \ - ( (This)->lpVtbl -> ExceptionSearchCatcherFound(This,functionId) ) + ( (This)->lpVtbl -> ExceptionSearchCatcherFound(This,functionId) ) #define ICorProfilerCallback8_ExceptionOSHandlerEnter(This,__unused) \ - ( (This)->lpVtbl -> ExceptionOSHandlerEnter(This,__unused) ) + ( (This)->lpVtbl -> ExceptionOSHandlerEnter(This,__unused) ) #define ICorProfilerCallback8_ExceptionOSHandlerLeave(This,__unused) \ - ( (This)->lpVtbl -> ExceptionOSHandlerLeave(This,__unused) ) + ( (This)->lpVtbl -> ExceptionOSHandlerLeave(This,__unused) ) #define ICorProfilerCallback8_ExceptionUnwindFunctionEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionUnwindFunctionEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionUnwindFunctionEnter(This,functionId) ) #define ICorProfilerCallback8_ExceptionUnwindFunctionLeave(This) \ - ( (This)->lpVtbl -> ExceptionUnwindFunctionLeave(This) ) + ( (This)->lpVtbl -> ExceptionUnwindFunctionLeave(This) ) #define ICorProfilerCallback8_ExceptionUnwindFinallyEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionUnwindFinallyEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionUnwindFinallyEnter(This,functionId) ) #define ICorProfilerCallback8_ExceptionUnwindFinallyLeave(This) \ - ( (This)->lpVtbl -> ExceptionUnwindFinallyLeave(This) ) + ( (This)->lpVtbl -> ExceptionUnwindFinallyLeave(This) ) #define ICorProfilerCallback8_ExceptionCatcherEnter(This,functionId,objectId) \ - ( (This)->lpVtbl -> ExceptionCatcherEnter(This,functionId,objectId) ) + ( (This)->lpVtbl -> ExceptionCatcherEnter(This,functionId,objectId) ) #define ICorProfilerCallback8_ExceptionCatcherLeave(This) \ - ( (This)->lpVtbl -> ExceptionCatcherLeave(This) ) + ( (This)->lpVtbl -> ExceptionCatcherLeave(This) ) #define ICorProfilerCallback8_COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) \ - ( (This)->lpVtbl -> COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) ) + ( (This)->lpVtbl -> COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) ) #define ICorProfilerCallback8_COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) \ - ( (This)->lpVtbl -> COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) ) + ( (This)->lpVtbl -> COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) ) #define ICorProfilerCallback8_ExceptionCLRCatcherFound(This) \ - ( (This)->lpVtbl -> ExceptionCLRCatcherFound(This) ) + ( (This)->lpVtbl -> ExceptionCLRCatcherFound(This) ) #define ICorProfilerCallback8_ExceptionCLRCatcherExecute(This) \ - ( (This)->lpVtbl -> ExceptionCLRCatcherExecute(This) ) + ( (This)->lpVtbl -> ExceptionCLRCatcherExecute(This) ) #define ICorProfilerCallback8_ThreadNameChanged(This,threadId,cchName,name) \ - ( (This)->lpVtbl -> ThreadNameChanged(This,threadId,cchName,name) ) + ( (This)->lpVtbl -> ThreadNameChanged(This,threadId,cchName,name) ) #define ICorProfilerCallback8_GarbageCollectionStarted(This,cGenerations,generationCollected,reason) \ - ( (This)->lpVtbl -> GarbageCollectionStarted(This,cGenerations,generationCollected,reason) ) + ( (This)->lpVtbl -> GarbageCollectionStarted(This,cGenerations,generationCollected,reason) ) #define ICorProfilerCallback8_SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \ - ( (This)->lpVtbl -> SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) ) + ( (This)->lpVtbl -> SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) ) #define ICorProfilerCallback8_GarbageCollectionFinished(This) \ - ( (This)->lpVtbl -> GarbageCollectionFinished(This) ) + ( (This)->lpVtbl -> GarbageCollectionFinished(This) ) #define ICorProfilerCallback8_FinalizeableObjectQueued(This,finalizerFlags,objectID) \ - ( (This)->lpVtbl -> FinalizeableObjectQueued(This,finalizerFlags,objectID) ) + ( (This)->lpVtbl -> FinalizeableObjectQueued(This,finalizerFlags,objectID) ) #define ICorProfilerCallback8_RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) \ - ( (This)->lpVtbl -> RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) ) + ( (This)->lpVtbl -> RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) ) #define ICorProfilerCallback8_HandleCreated(This,handleId,initialObjectId) \ - ( (This)->lpVtbl -> HandleCreated(This,handleId,initialObjectId) ) + ( (This)->lpVtbl -> HandleCreated(This,handleId,initialObjectId) ) #define ICorProfilerCallback8_HandleDestroyed(This,handleId) \ - ( (This)->lpVtbl -> HandleDestroyed(This,handleId) ) + ( (This)->lpVtbl -> HandleDestroyed(This,handleId) ) #define ICorProfilerCallback8_InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) \ - ( (This)->lpVtbl -> InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) ) + ( (This)->lpVtbl -> InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) ) #define ICorProfilerCallback8_ProfilerAttachComplete(This) \ - ( (This)->lpVtbl -> ProfilerAttachComplete(This) ) + ( (This)->lpVtbl -> ProfilerAttachComplete(This) ) #define ICorProfilerCallback8_ProfilerDetachSucceeded(This) \ - ( (This)->lpVtbl -> ProfilerDetachSucceeded(This) ) + ( (This)->lpVtbl -> ProfilerDetachSucceeded(This) ) #define ICorProfilerCallback8_ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) \ - ( (This)->lpVtbl -> ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) ) + ( (This)->lpVtbl -> ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) ) #define ICorProfilerCallback8_GetReJITParameters(This,moduleId,methodId,pFunctionControl) \ - ( (This)->lpVtbl -> GetReJITParameters(This,moduleId,methodId,pFunctionControl) ) + ( (This)->lpVtbl -> GetReJITParameters(This,moduleId,methodId,pFunctionControl) ) #define ICorProfilerCallback8_ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) \ - ( (This)->lpVtbl -> ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) ) + ( (This)->lpVtbl -> ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) ) #define ICorProfilerCallback8_ReJITError(This,moduleId,methodId,functionId,hrStatus) \ - ( (This)->lpVtbl -> ReJITError(This,moduleId,methodId,functionId,hrStatus) ) + ( (This)->lpVtbl -> ReJITError(This,moduleId,methodId,functionId,hrStatus) ) #define ICorProfilerCallback8_MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \ - ( (This)->lpVtbl -> MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) ) + ( (This)->lpVtbl -> MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) ) #define ICorProfilerCallback8_SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \ - ( (This)->lpVtbl -> SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) ) + ( (This)->lpVtbl -> SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) ) #define ICorProfilerCallback8_ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) \ - ( (This)->lpVtbl -> ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) ) + ( (This)->lpVtbl -> ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) ) #define ICorProfilerCallback8_GetAssemblyReferences(This,wszAssemblyPath,pAsmRefProvider) \ - ( (This)->lpVtbl -> GetAssemblyReferences(This,wszAssemblyPath,pAsmRefProvider) ) + ( (This)->lpVtbl -> GetAssemblyReferences(This,wszAssemblyPath,pAsmRefProvider) ) #define ICorProfilerCallback8_ModuleInMemorySymbolsUpdated(This,moduleId) \ - ( (This)->lpVtbl -> ModuleInMemorySymbolsUpdated(This,moduleId) ) + ( (This)->lpVtbl -> ModuleInMemorySymbolsUpdated(This,moduleId) ) #define ICorProfilerCallback8_DynamicMethodJITCompilationStarted(This,functionId,fIsSafeToBlock,pILHeader,cbILHeader) \ - ( (This)->lpVtbl -> DynamicMethodJITCompilationStarted(This,functionId,fIsSafeToBlock,pILHeader,cbILHeader) ) + ( (This)->lpVtbl -> DynamicMethodJITCompilationStarted(This,functionId,fIsSafeToBlock,pILHeader,cbILHeader) ) #define ICorProfilerCallback8_DynamicMethodJITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \ - ( (This)->lpVtbl -> DynamicMethodJITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) ) + ( (This)->lpVtbl -> DynamicMethodJITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) ) #endif /* COBJMACROS */ @@ -6728,468 +6747,468 @@ EXTERN_C const IID IID_ICorProfilerCallback8; #define __ICorProfilerCallback9_INTERFACE_DEFINED__ /* interface ICorProfilerCallback9 */ -/* [local][unique][uuid][object] */ +/* [local][unique][uuid][object] */ EXTERN_C const IID IID_ICorProfilerCallback9; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("27583EC3-C8F5-482F-8052-194B8CE4705A") ICorProfilerCallback9 : public ICorProfilerCallback8 { public: - virtual HRESULT STDMETHODCALLTYPE DynamicMethodUnloaded( + virtual HRESULT STDMETHODCALLTYPE DynamicMethodUnloaded( /* [in] */ FunctionID functionId) = 0; - + }; - - + + #else /* C style interface */ typedef struct ICorProfilerCallback9Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorProfilerCallback9 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorProfilerCallback9 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorProfilerCallback9 * This); - - HRESULT ( STDMETHODCALLTYPE *Initialize )( + + HRESULT ( STDMETHODCALLTYPE *Initialize )( ICorProfilerCallback9 * This, /* [in] */ IUnknown *pICorProfilerInfoUnk); - - HRESULT ( STDMETHODCALLTYPE *Shutdown )( + + HRESULT ( STDMETHODCALLTYPE *Shutdown )( ICorProfilerCallback9 * This); - - HRESULT ( STDMETHODCALLTYPE *AppDomainCreationStarted )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainCreationStarted )( ICorProfilerCallback9 * This, /* [in] */ AppDomainID appDomainId); - - HRESULT ( STDMETHODCALLTYPE *AppDomainCreationFinished )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainCreationFinished )( ICorProfilerCallback9 * This, /* [in] */ AppDomainID appDomainId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownStarted )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownStarted )( ICorProfilerCallback9 * This, /* [in] */ AppDomainID appDomainId); - - HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownFinished )( + + HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownFinished )( ICorProfilerCallback9 * This, /* [in] */ AppDomainID appDomainId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *AssemblyLoadStarted )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyLoadStarted )( ICorProfilerCallback9 * This, /* [in] */ AssemblyID assemblyId); - - HRESULT ( STDMETHODCALLTYPE *AssemblyLoadFinished )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyLoadFinished )( ICorProfilerCallback9 * This, /* [in] */ AssemblyID assemblyId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadStarted )( ICorProfilerCallback9 * This, /* [in] */ AssemblyID assemblyId); - - HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadFinished )( + + HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadFinished )( ICorProfilerCallback9 * This, /* [in] */ AssemblyID assemblyId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ModuleLoadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ModuleLoadStarted )( ICorProfilerCallback9 * This, /* [in] */ ModuleID moduleId); - - HRESULT ( STDMETHODCALLTYPE *ModuleLoadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ModuleLoadFinished )( ICorProfilerCallback9 * This, /* [in] */ ModuleID moduleId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ModuleUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ModuleUnloadStarted )( ICorProfilerCallback9 * This, /* [in] */ ModuleID moduleId); - - HRESULT ( STDMETHODCALLTYPE *ModuleUnloadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ModuleUnloadFinished )( ICorProfilerCallback9 * This, /* [in] */ ModuleID moduleId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ModuleAttachedToAssembly )( + + HRESULT ( STDMETHODCALLTYPE *ModuleAttachedToAssembly )( ICorProfilerCallback9 * This, /* [in] */ ModuleID moduleId, /* [in] */ AssemblyID AssemblyId); - - HRESULT ( STDMETHODCALLTYPE *ClassLoadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ClassLoadStarted )( ICorProfilerCallback9 * This, /* [in] */ ClassID classId); - - HRESULT ( STDMETHODCALLTYPE *ClassLoadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ClassLoadFinished )( ICorProfilerCallback9 * This, /* [in] */ ClassID classId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *ClassUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *ClassUnloadStarted )( ICorProfilerCallback9 * This, /* [in] */ ClassID classId); - - HRESULT ( STDMETHODCALLTYPE *ClassUnloadFinished )( + + HRESULT ( STDMETHODCALLTYPE *ClassUnloadFinished )( ICorProfilerCallback9 * This, /* [in] */ ClassID classId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *FunctionUnloadStarted )( + + HRESULT ( STDMETHODCALLTYPE *FunctionUnloadStarted )( ICorProfilerCallback9 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *JITCompilationStarted )( + + HRESULT ( STDMETHODCALLTYPE *JITCompilationStarted )( ICorProfilerCallback9 * This, /* [in] */ FunctionID functionId, /* [in] */ BOOL fIsSafeToBlock); - - HRESULT ( STDMETHODCALLTYPE *JITCompilationFinished )( + + HRESULT ( STDMETHODCALLTYPE *JITCompilationFinished )( ICorProfilerCallback9 * This, /* [in] */ FunctionID functionId, /* [in] */ HRESULT hrStatus, /* [in] */ BOOL fIsSafeToBlock); - - HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchStarted )( + + HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchStarted )( ICorProfilerCallback9 * This, /* [in] */ FunctionID functionId, /* [out] */ BOOL *pbUseCachedFunction); - - HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchFinished )( + + HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchFinished )( ICorProfilerCallback9 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_JIT_CACHE result); - - HRESULT ( STDMETHODCALLTYPE *JITFunctionPitched )( + + HRESULT ( STDMETHODCALLTYPE *JITFunctionPitched )( ICorProfilerCallback9 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *JITInlining )( + + HRESULT ( STDMETHODCALLTYPE *JITInlining )( ICorProfilerCallback9 * This, /* [in] */ FunctionID callerId, /* [in] */ FunctionID calleeId, /* [out] */ BOOL *pfShouldInline); - - HRESULT ( STDMETHODCALLTYPE *ThreadCreated )( + + HRESULT ( STDMETHODCALLTYPE *ThreadCreated )( ICorProfilerCallback9 * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *ThreadDestroyed )( + + HRESULT ( STDMETHODCALLTYPE *ThreadDestroyed )( ICorProfilerCallback9 * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *ThreadAssignedToOSThread )( + + HRESULT ( STDMETHODCALLTYPE *ThreadAssignedToOSThread )( ICorProfilerCallback9 * This, /* [in] */ ThreadID managedThreadId, /* [in] */ DWORD osThreadId); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationStarted )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationStarted )( ICorProfilerCallback9 * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientSendingMessage )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientSendingMessage )( ICorProfilerCallback9 * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientReceivingReply )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientReceivingReply )( ICorProfilerCallback9 * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationFinished )( + + HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationFinished )( ICorProfilerCallback9 * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerReceivingMessage )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerReceivingMessage )( ICorProfilerCallback9 * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationStarted )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationStarted )( ICorProfilerCallback9 * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationReturned )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationReturned )( ICorProfilerCallback9 * This); - - HRESULT ( STDMETHODCALLTYPE *RemotingServerSendingReply )( + + HRESULT ( STDMETHODCALLTYPE *RemotingServerSendingReply )( ICorProfilerCallback9 * This, /* [in] */ GUID *pCookie, /* [in] */ BOOL fIsAsync); - - HRESULT ( STDMETHODCALLTYPE *UnmanagedToManagedTransition )( + + HRESULT ( STDMETHODCALLTYPE *UnmanagedToManagedTransition )( ICorProfilerCallback9 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_TRANSITION_REASON reason); - - HRESULT ( STDMETHODCALLTYPE *ManagedToUnmanagedTransition )( + + HRESULT ( STDMETHODCALLTYPE *ManagedToUnmanagedTransition )( ICorProfilerCallback9 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_TRANSITION_REASON reason); - - HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendStarted )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendStarted )( ICorProfilerCallback9 * This, /* [in] */ COR_PRF_SUSPEND_REASON suspendReason); - - HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendFinished )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendFinished )( ICorProfilerCallback9 * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendAborted )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendAborted )( ICorProfilerCallback9 * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeResumeStarted )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeResumeStarted )( ICorProfilerCallback9 * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeResumeFinished )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeResumeFinished )( ICorProfilerCallback9 * This); - - HRESULT ( STDMETHODCALLTYPE *RuntimeThreadSuspended )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeThreadSuspended )( ICorProfilerCallback9 * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *RuntimeThreadResumed )( + + HRESULT ( STDMETHODCALLTYPE *RuntimeThreadResumed )( ICorProfilerCallback9 * This, /* [in] */ ThreadID threadId); - - HRESULT ( STDMETHODCALLTYPE *MovedReferences )( + + HRESULT ( STDMETHODCALLTYPE *MovedReferences )( ICorProfilerCallback9 * This, /* [in] */ ULONG cMovedObjectIDRanges, /* [size_is][in] */ ObjectID oldObjectIDRangeStart[ ], /* [size_is][in] */ ObjectID newObjectIDRangeStart[ ], /* [size_is][in] */ ULONG cObjectIDRangeLength[ ]); - - HRESULT ( STDMETHODCALLTYPE *ObjectAllocated )( + + HRESULT ( STDMETHODCALLTYPE *ObjectAllocated )( ICorProfilerCallback9 * This, /* [in] */ ObjectID objectId, /* [in] */ ClassID classId); - - HRESULT ( STDMETHODCALLTYPE *ObjectsAllocatedByClass )( + + HRESULT ( STDMETHODCALLTYPE *ObjectsAllocatedByClass )( ICorProfilerCallback9 * This, /* [in] */ ULONG cClassCount, /* [size_is][in] */ ClassID classIds[ ], /* [size_is][in] */ ULONG cObjects[ ]); - - HRESULT ( STDMETHODCALLTYPE *ObjectReferences )( + + HRESULT ( STDMETHODCALLTYPE *ObjectReferences )( ICorProfilerCallback9 * This, /* [in] */ ObjectID objectId, /* [in] */ ClassID classId, /* [in] */ ULONG cObjectRefs, /* [size_is][in] */ ObjectID objectRefIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *RootReferences )( + + HRESULT ( STDMETHODCALLTYPE *RootReferences )( ICorProfilerCallback9 * This, /* [in] */ ULONG cRootRefs, /* [size_is][in] */ ObjectID rootRefIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *ExceptionThrown )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionThrown )( ICorProfilerCallback9 * This, /* [in] */ ObjectID thrownObjectId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionEnter )( ICorProfilerCallback9 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionLeave )( ICorProfilerCallback9 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterEnter )( ICorProfilerCallback9 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterLeave )( ICorProfilerCallback9 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionSearchCatcherFound )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchCatcherFound )( ICorProfilerCallback9 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerEnter )( ICorProfilerCallback9 * This, /* [in] */ UINT_PTR __unused); - - HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerLeave )( ICorProfilerCallback9 * This, /* [in] */ UINT_PTR __unused); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionEnter )( ICorProfilerCallback9 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionLeave )( ICorProfilerCallback9 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyEnter )( ICorProfilerCallback9 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyLeave )( ICorProfilerCallback9 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherEnter )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherEnter )( ICorProfilerCallback9 * This, /* [in] */ FunctionID functionId, /* [in] */ ObjectID objectId); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherLeave )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherLeave )( ICorProfilerCallback9 * This); - - HRESULT ( STDMETHODCALLTYPE *COMClassicVTableCreated )( + + HRESULT ( STDMETHODCALLTYPE *COMClassicVTableCreated )( ICorProfilerCallback9 * This, /* [in] */ ClassID wrappedClassId, /* [in] */ REFGUID implementedIID, /* [in] */ void *pVTable, /* [in] */ ULONG cSlots); - - HRESULT ( STDMETHODCALLTYPE *COMClassicVTableDestroyed )( + + HRESULT ( STDMETHODCALLTYPE *COMClassicVTableDestroyed )( ICorProfilerCallback9 * This, /* [in] */ ClassID wrappedClassId, /* [in] */ REFGUID implementedIID, /* [in] */ void *pVTable); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherFound )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherFound )( ICorProfilerCallback9 * This); - - HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherExecute )( + + HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherExecute )( ICorProfilerCallback9 * This); - - HRESULT ( STDMETHODCALLTYPE *ThreadNameChanged )( + + HRESULT ( STDMETHODCALLTYPE *ThreadNameChanged )( ICorProfilerCallback9 * This, /* [in] */ ThreadID threadId, /* [in] */ ULONG cchName, - /* [annotation][in] */ + /* [annotation][in] */ _In_reads_opt_(cchName) WCHAR name[ ]); - - HRESULT ( STDMETHODCALLTYPE *GarbageCollectionStarted )( + + HRESULT ( STDMETHODCALLTYPE *GarbageCollectionStarted )( ICorProfilerCallback9 * This, /* [in] */ int cGenerations, /* [size_is][in] */ BOOL generationCollected[ ], /* [in] */ COR_PRF_GC_REASON reason); - - HRESULT ( STDMETHODCALLTYPE *SurvivingReferences )( + + HRESULT ( STDMETHODCALLTYPE *SurvivingReferences )( ICorProfilerCallback9 * This, /* [in] */ ULONG cSurvivingObjectIDRanges, /* [size_is][in] */ ObjectID objectIDRangeStart[ ], /* [size_is][in] */ ULONG cObjectIDRangeLength[ ]); - - HRESULT ( STDMETHODCALLTYPE *GarbageCollectionFinished )( + + HRESULT ( STDMETHODCALLTYPE *GarbageCollectionFinished )( ICorProfilerCallback9 * This); - - HRESULT ( STDMETHODCALLTYPE *FinalizeableObjectQueued )( + + HRESULT ( STDMETHODCALLTYPE *FinalizeableObjectQueued )( ICorProfilerCallback9 * This, /* [in] */ DWORD finalizerFlags, /* [in] */ ObjectID objectID); - - HRESULT ( STDMETHODCALLTYPE *RootReferences2 )( + + HRESULT ( STDMETHODCALLTYPE *RootReferences2 )( ICorProfilerCallback9 * This, /* [in] */ ULONG cRootRefs, /* [size_is][in] */ ObjectID rootRefIds[ ], /* [size_is][in] */ COR_PRF_GC_ROOT_KIND rootKinds[ ], /* [size_is][in] */ COR_PRF_GC_ROOT_FLAGS rootFlags[ ], /* [size_is][in] */ UINT_PTR rootIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *HandleCreated )( + + HRESULT ( STDMETHODCALLTYPE *HandleCreated )( ICorProfilerCallback9 * This, /* [in] */ GCHandleID handleId, /* [in] */ ObjectID initialObjectId); - - HRESULT ( STDMETHODCALLTYPE *HandleDestroyed )( + + HRESULT ( STDMETHODCALLTYPE *HandleDestroyed )( ICorProfilerCallback9 * This, /* [in] */ GCHandleID handleId); - - HRESULT ( STDMETHODCALLTYPE *InitializeForAttach )( + + HRESULT ( STDMETHODCALLTYPE *InitializeForAttach )( ICorProfilerCallback9 * This, /* [in] */ IUnknown *pCorProfilerInfoUnk, /* [in] */ void *pvClientData, /* [in] */ UINT cbClientData); - - HRESULT ( STDMETHODCALLTYPE *ProfilerAttachComplete )( + + HRESULT ( STDMETHODCALLTYPE *ProfilerAttachComplete )( ICorProfilerCallback9 * This); - - HRESULT ( STDMETHODCALLTYPE *ProfilerDetachSucceeded )( + + HRESULT ( STDMETHODCALLTYPE *ProfilerDetachSucceeded )( ICorProfilerCallback9 * This); - - HRESULT ( STDMETHODCALLTYPE *ReJITCompilationStarted )( + + HRESULT ( STDMETHODCALLTYPE *ReJITCompilationStarted )( ICorProfilerCallback9 * This, /* [in] */ FunctionID functionId, /* [in] */ ReJITID rejitId, /* [in] */ BOOL fIsSafeToBlock); - - HRESULT ( STDMETHODCALLTYPE *GetReJITParameters )( + + HRESULT ( STDMETHODCALLTYPE *GetReJITParameters )( ICorProfilerCallback9 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodId, /* [in] */ ICorProfilerFunctionControl *pFunctionControl); - - HRESULT ( STDMETHODCALLTYPE *ReJITCompilationFinished )( + + HRESULT ( STDMETHODCALLTYPE *ReJITCompilationFinished )( ICorProfilerCallback9 * This, /* [in] */ FunctionID functionId, /* [in] */ ReJITID rejitId, /* [in] */ HRESULT hrStatus, /* [in] */ BOOL fIsSafeToBlock); - - HRESULT ( STDMETHODCALLTYPE *ReJITError )( + + HRESULT ( STDMETHODCALLTYPE *ReJITError )( ICorProfilerCallback9 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodId, /* [in] */ FunctionID functionId, /* [in] */ HRESULT hrStatus); - - HRESULT ( STDMETHODCALLTYPE *MovedReferences2 )( + + HRESULT ( STDMETHODCALLTYPE *MovedReferences2 )( ICorProfilerCallback9 * This, /* [in] */ ULONG cMovedObjectIDRanges, /* [size_is][in] */ ObjectID oldObjectIDRangeStart[ ], /* [size_is][in] */ ObjectID newObjectIDRangeStart[ ], /* [size_is][in] */ SIZE_T cObjectIDRangeLength[ ]); - - HRESULT ( STDMETHODCALLTYPE *SurvivingReferences2 )( + + HRESULT ( STDMETHODCALLTYPE *SurvivingReferences2 )( ICorProfilerCallback9 * This, /* [in] */ ULONG cSurvivingObjectIDRanges, /* [size_is][in] */ ObjectID objectIDRangeStart[ ], /* [size_is][in] */ SIZE_T cObjectIDRangeLength[ ]); - - HRESULT ( STDMETHODCALLTYPE *ConditionalWeakTableElementReferences )( + + HRESULT ( STDMETHODCALLTYPE *ConditionalWeakTableElementReferences )( ICorProfilerCallback9 * This, /* [in] */ ULONG cRootRefs, /* [size_is][in] */ ObjectID keyRefIds[ ], /* [size_is][in] */ ObjectID valueRefIds[ ], /* [size_is][in] */ GCHandleID rootIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetAssemblyReferences )( + + HRESULT ( STDMETHODCALLTYPE *GetAssemblyReferences )( ICorProfilerCallback9 * This, /* [string][in] */ const WCHAR *wszAssemblyPath, /* [in] */ ICorProfilerAssemblyReferenceProvider *pAsmRefProvider); - - HRESULT ( STDMETHODCALLTYPE *ModuleInMemorySymbolsUpdated )( + + HRESULT ( STDMETHODCALLTYPE *ModuleInMemorySymbolsUpdated )( ICorProfilerCallback9 * This, ModuleID moduleId); - - HRESULT ( STDMETHODCALLTYPE *DynamicMethodJITCompilationStarted )( + + HRESULT ( STDMETHODCALLTYPE *DynamicMethodJITCompilationStarted )( ICorProfilerCallback9 * This, /* [in] */ FunctionID functionId, /* [in] */ BOOL fIsSafeToBlock, /* [in] */ LPCBYTE pILHeader, /* [in] */ ULONG cbILHeader); - - HRESULT ( STDMETHODCALLTYPE *DynamicMethodJITCompilationFinished )( + + HRESULT ( STDMETHODCALLTYPE *DynamicMethodJITCompilationFinished )( ICorProfilerCallback9 * This, /* [in] */ FunctionID functionId, /* [in] */ HRESULT hrStatus, /* [in] */ BOOL fIsSafeToBlock); - - HRESULT ( STDMETHODCALLTYPE *DynamicMethodUnloaded )( + + HRESULT ( STDMETHODCALLTYPE *DynamicMethodUnloaded )( ICorProfilerCallback9 * This, /* [in] */ FunctionID functionId); - + END_INTERFACE } ICorProfilerCallback9Vtbl; @@ -7198,304 +7217,304 @@ EXTERN_C const IID IID_ICorProfilerCallback9; CONST_VTBL struct ICorProfilerCallback9Vtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ICorProfilerCallback9_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ICorProfilerCallback9_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ICorProfilerCallback9_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ICorProfilerCallback9_Initialize(This,pICorProfilerInfoUnk) \ - ( (This)->lpVtbl -> Initialize(This,pICorProfilerInfoUnk) ) + ( (This)->lpVtbl -> Initialize(This,pICorProfilerInfoUnk) ) #define ICorProfilerCallback9_Shutdown(This) \ - ( (This)->lpVtbl -> Shutdown(This) ) + ( (This)->lpVtbl -> Shutdown(This) ) #define ICorProfilerCallback9_AppDomainCreationStarted(This,appDomainId) \ - ( (This)->lpVtbl -> AppDomainCreationStarted(This,appDomainId) ) + ( (This)->lpVtbl -> AppDomainCreationStarted(This,appDomainId) ) #define ICorProfilerCallback9_AppDomainCreationFinished(This,appDomainId,hrStatus) \ - ( (This)->lpVtbl -> AppDomainCreationFinished(This,appDomainId,hrStatus) ) + ( (This)->lpVtbl -> AppDomainCreationFinished(This,appDomainId,hrStatus) ) #define ICorProfilerCallback9_AppDomainShutdownStarted(This,appDomainId) \ - ( (This)->lpVtbl -> AppDomainShutdownStarted(This,appDomainId) ) + ( (This)->lpVtbl -> AppDomainShutdownStarted(This,appDomainId) ) #define ICorProfilerCallback9_AppDomainShutdownFinished(This,appDomainId,hrStatus) \ - ( (This)->lpVtbl -> AppDomainShutdownFinished(This,appDomainId,hrStatus) ) + ( (This)->lpVtbl -> AppDomainShutdownFinished(This,appDomainId,hrStatus) ) #define ICorProfilerCallback9_AssemblyLoadStarted(This,assemblyId) \ - ( (This)->lpVtbl -> AssemblyLoadStarted(This,assemblyId) ) + ( (This)->lpVtbl -> AssemblyLoadStarted(This,assemblyId) ) #define ICorProfilerCallback9_AssemblyLoadFinished(This,assemblyId,hrStatus) \ - ( (This)->lpVtbl -> AssemblyLoadFinished(This,assemblyId,hrStatus) ) + ( (This)->lpVtbl -> AssemblyLoadFinished(This,assemblyId,hrStatus) ) #define ICorProfilerCallback9_AssemblyUnloadStarted(This,assemblyId) \ - ( (This)->lpVtbl -> AssemblyUnloadStarted(This,assemblyId) ) + ( (This)->lpVtbl -> AssemblyUnloadStarted(This,assemblyId) ) #define ICorProfilerCallback9_AssemblyUnloadFinished(This,assemblyId,hrStatus) \ - ( (This)->lpVtbl -> AssemblyUnloadFinished(This,assemblyId,hrStatus) ) + ( (This)->lpVtbl -> AssemblyUnloadFinished(This,assemblyId,hrStatus) ) #define ICorProfilerCallback9_ModuleLoadStarted(This,moduleId) \ - ( (This)->lpVtbl -> ModuleLoadStarted(This,moduleId) ) + ( (This)->lpVtbl -> ModuleLoadStarted(This,moduleId) ) #define ICorProfilerCallback9_ModuleLoadFinished(This,moduleId,hrStatus) \ - ( (This)->lpVtbl -> ModuleLoadFinished(This,moduleId,hrStatus) ) + ( (This)->lpVtbl -> ModuleLoadFinished(This,moduleId,hrStatus) ) #define ICorProfilerCallback9_ModuleUnloadStarted(This,moduleId) \ - ( (This)->lpVtbl -> ModuleUnloadStarted(This,moduleId) ) + ( (This)->lpVtbl -> ModuleUnloadStarted(This,moduleId) ) #define ICorProfilerCallback9_ModuleUnloadFinished(This,moduleId,hrStatus) \ - ( (This)->lpVtbl -> ModuleUnloadFinished(This,moduleId,hrStatus) ) + ( (This)->lpVtbl -> ModuleUnloadFinished(This,moduleId,hrStatus) ) #define ICorProfilerCallback9_ModuleAttachedToAssembly(This,moduleId,AssemblyId) \ - ( (This)->lpVtbl -> ModuleAttachedToAssembly(This,moduleId,AssemblyId) ) + ( (This)->lpVtbl -> ModuleAttachedToAssembly(This,moduleId,AssemblyId) ) #define ICorProfilerCallback9_ClassLoadStarted(This,classId) \ - ( (This)->lpVtbl -> ClassLoadStarted(This,classId) ) + ( (This)->lpVtbl -> ClassLoadStarted(This,classId) ) #define ICorProfilerCallback9_ClassLoadFinished(This,classId,hrStatus) \ - ( (This)->lpVtbl -> ClassLoadFinished(This,classId,hrStatus) ) + ( (This)->lpVtbl -> ClassLoadFinished(This,classId,hrStatus) ) #define ICorProfilerCallback9_ClassUnloadStarted(This,classId) \ - ( (This)->lpVtbl -> ClassUnloadStarted(This,classId) ) + ( (This)->lpVtbl -> ClassUnloadStarted(This,classId) ) #define ICorProfilerCallback9_ClassUnloadFinished(This,classId,hrStatus) \ - ( (This)->lpVtbl -> ClassUnloadFinished(This,classId,hrStatus) ) + ( (This)->lpVtbl -> ClassUnloadFinished(This,classId,hrStatus) ) #define ICorProfilerCallback9_FunctionUnloadStarted(This,functionId) \ - ( (This)->lpVtbl -> FunctionUnloadStarted(This,functionId) ) + ( (This)->lpVtbl -> FunctionUnloadStarted(This,functionId) ) #define ICorProfilerCallback9_JITCompilationStarted(This,functionId,fIsSafeToBlock) \ - ( (This)->lpVtbl -> JITCompilationStarted(This,functionId,fIsSafeToBlock) ) + ( (This)->lpVtbl -> JITCompilationStarted(This,functionId,fIsSafeToBlock) ) #define ICorProfilerCallback9_JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \ - ( (This)->lpVtbl -> JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) ) + ( (This)->lpVtbl -> JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) ) #define ICorProfilerCallback9_JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) \ - ( (This)->lpVtbl -> JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) ) + ( (This)->lpVtbl -> JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) ) #define ICorProfilerCallback9_JITCachedFunctionSearchFinished(This,functionId,result) \ - ( (This)->lpVtbl -> JITCachedFunctionSearchFinished(This,functionId,result) ) + ( (This)->lpVtbl -> JITCachedFunctionSearchFinished(This,functionId,result) ) #define ICorProfilerCallback9_JITFunctionPitched(This,functionId) \ - ( (This)->lpVtbl -> JITFunctionPitched(This,functionId) ) + ( (This)->lpVtbl -> JITFunctionPitched(This,functionId) ) #define ICorProfilerCallback9_JITInlining(This,callerId,calleeId,pfShouldInline) \ - ( (This)->lpVtbl -> JITInlining(This,callerId,calleeId,pfShouldInline) ) + ( (This)->lpVtbl -> JITInlining(This,callerId,calleeId,pfShouldInline) ) #define ICorProfilerCallback9_ThreadCreated(This,threadId) \ - ( (This)->lpVtbl -> ThreadCreated(This,threadId) ) + ( (This)->lpVtbl -> ThreadCreated(This,threadId) ) #define ICorProfilerCallback9_ThreadDestroyed(This,threadId) \ - ( (This)->lpVtbl -> ThreadDestroyed(This,threadId) ) + ( (This)->lpVtbl -> ThreadDestroyed(This,threadId) ) #define ICorProfilerCallback9_ThreadAssignedToOSThread(This,managedThreadId,osThreadId) \ - ( (This)->lpVtbl -> ThreadAssignedToOSThread(This,managedThreadId,osThreadId) ) + ( (This)->lpVtbl -> ThreadAssignedToOSThread(This,managedThreadId,osThreadId) ) #define ICorProfilerCallback9_RemotingClientInvocationStarted(This) \ - ( (This)->lpVtbl -> RemotingClientInvocationStarted(This) ) + ( (This)->lpVtbl -> RemotingClientInvocationStarted(This) ) #define ICorProfilerCallback9_RemotingClientSendingMessage(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingClientSendingMessage(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingClientSendingMessage(This,pCookie,fIsAsync) ) #define ICorProfilerCallback9_RemotingClientReceivingReply(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingClientReceivingReply(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingClientReceivingReply(This,pCookie,fIsAsync) ) #define ICorProfilerCallback9_RemotingClientInvocationFinished(This) \ - ( (This)->lpVtbl -> RemotingClientInvocationFinished(This) ) + ( (This)->lpVtbl -> RemotingClientInvocationFinished(This) ) #define ICorProfilerCallback9_RemotingServerReceivingMessage(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingServerReceivingMessage(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingServerReceivingMessage(This,pCookie,fIsAsync) ) #define ICorProfilerCallback9_RemotingServerInvocationStarted(This) \ - ( (This)->lpVtbl -> RemotingServerInvocationStarted(This) ) + ( (This)->lpVtbl -> RemotingServerInvocationStarted(This) ) #define ICorProfilerCallback9_RemotingServerInvocationReturned(This) \ - ( (This)->lpVtbl -> RemotingServerInvocationReturned(This) ) + ( (This)->lpVtbl -> RemotingServerInvocationReturned(This) ) #define ICorProfilerCallback9_RemotingServerSendingReply(This,pCookie,fIsAsync) \ - ( (This)->lpVtbl -> RemotingServerSendingReply(This,pCookie,fIsAsync) ) + ( (This)->lpVtbl -> RemotingServerSendingReply(This,pCookie,fIsAsync) ) #define ICorProfilerCallback9_UnmanagedToManagedTransition(This,functionId,reason) \ - ( (This)->lpVtbl -> UnmanagedToManagedTransition(This,functionId,reason) ) + ( (This)->lpVtbl -> UnmanagedToManagedTransition(This,functionId,reason) ) #define ICorProfilerCallback9_ManagedToUnmanagedTransition(This,functionId,reason) \ - ( (This)->lpVtbl -> ManagedToUnmanagedTransition(This,functionId,reason) ) + ( (This)->lpVtbl -> ManagedToUnmanagedTransition(This,functionId,reason) ) #define ICorProfilerCallback9_RuntimeSuspendStarted(This,suspendReason) \ - ( (This)->lpVtbl -> RuntimeSuspendStarted(This,suspendReason) ) + ( (This)->lpVtbl -> RuntimeSuspendStarted(This,suspendReason) ) #define ICorProfilerCallback9_RuntimeSuspendFinished(This) \ - ( (This)->lpVtbl -> RuntimeSuspendFinished(This) ) + ( (This)->lpVtbl -> RuntimeSuspendFinished(This) ) #define ICorProfilerCallback9_RuntimeSuspendAborted(This) \ - ( (This)->lpVtbl -> RuntimeSuspendAborted(This) ) + ( (This)->lpVtbl -> RuntimeSuspendAborted(This) ) #define ICorProfilerCallback9_RuntimeResumeStarted(This) \ - ( (This)->lpVtbl -> RuntimeResumeStarted(This) ) + ( (This)->lpVtbl -> RuntimeResumeStarted(This) ) #define ICorProfilerCallback9_RuntimeResumeFinished(This) \ - ( (This)->lpVtbl -> RuntimeResumeFinished(This) ) + ( (This)->lpVtbl -> RuntimeResumeFinished(This) ) #define ICorProfilerCallback9_RuntimeThreadSuspended(This,threadId) \ - ( (This)->lpVtbl -> RuntimeThreadSuspended(This,threadId) ) + ( (This)->lpVtbl -> RuntimeThreadSuspended(This,threadId) ) #define ICorProfilerCallback9_RuntimeThreadResumed(This,threadId) \ - ( (This)->lpVtbl -> RuntimeThreadResumed(This,threadId) ) + ( (This)->lpVtbl -> RuntimeThreadResumed(This,threadId) ) #define ICorProfilerCallback9_MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \ - ( (This)->lpVtbl -> MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) ) + ( (This)->lpVtbl -> MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) ) #define ICorProfilerCallback9_ObjectAllocated(This,objectId,classId) \ - ( (This)->lpVtbl -> ObjectAllocated(This,objectId,classId) ) + ( (This)->lpVtbl -> ObjectAllocated(This,objectId,classId) ) #define ICorProfilerCallback9_ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) \ - ( (This)->lpVtbl -> ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) ) + ( (This)->lpVtbl -> ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) ) #define ICorProfilerCallback9_ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) \ - ( (This)->lpVtbl -> ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) ) + ( (This)->lpVtbl -> ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) ) #define ICorProfilerCallback9_RootReferences(This,cRootRefs,rootRefIds) \ - ( (This)->lpVtbl -> RootReferences(This,cRootRefs,rootRefIds) ) + ( (This)->lpVtbl -> RootReferences(This,cRootRefs,rootRefIds) ) #define ICorProfilerCallback9_ExceptionThrown(This,thrownObjectId) \ - ( (This)->lpVtbl -> ExceptionThrown(This,thrownObjectId) ) + ( (This)->lpVtbl -> ExceptionThrown(This,thrownObjectId) ) #define ICorProfilerCallback9_ExceptionSearchFunctionEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionSearchFunctionEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionSearchFunctionEnter(This,functionId) ) #define ICorProfilerCallback9_ExceptionSearchFunctionLeave(This) \ - ( (This)->lpVtbl -> ExceptionSearchFunctionLeave(This) ) + ( (This)->lpVtbl -> ExceptionSearchFunctionLeave(This) ) #define ICorProfilerCallback9_ExceptionSearchFilterEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionSearchFilterEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionSearchFilterEnter(This,functionId) ) #define ICorProfilerCallback9_ExceptionSearchFilterLeave(This) \ - ( (This)->lpVtbl -> ExceptionSearchFilterLeave(This) ) + ( (This)->lpVtbl -> ExceptionSearchFilterLeave(This) ) #define ICorProfilerCallback9_ExceptionSearchCatcherFound(This,functionId) \ - ( (This)->lpVtbl -> ExceptionSearchCatcherFound(This,functionId) ) + ( (This)->lpVtbl -> ExceptionSearchCatcherFound(This,functionId) ) #define ICorProfilerCallback9_ExceptionOSHandlerEnter(This,__unused) \ - ( (This)->lpVtbl -> ExceptionOSHandlerEnter(This,__unused) ) + ( (This)->lpVtbl -> ExceptionOSHandlerEnter(This,__unused) ) #define ICorProfilerCallback9_ExceptionOSHandlerLeave(This,__unused) \ - ( (This)->lpVtbl -> ExceptionOSHandlerLeave(This,__unused) ) + ( (This)->lpVtbl -> ExceptionOSHandlerLeave(This,__unused) ) #define ICorProfilerCallback9_ExceptionUnwindFunctionEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionUnwindFunctionEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionUnwindFunctionEnter(This,functionId) ) #define ICorProfilerCallback9_ExceptionUnwindFunctionLeave(This) \ - ( (This)->lpVtbl -> ExceptionUnwindFunctionLeave(This) ) + ( (This)->lpVtbl -> ExceptionUnwindFunctionLeave(This) ) #define ICorProfilerCallback9_ExceptionUnwindFinallyEnter(This,functionId) \ - ( (This)->lpVtbl -> ExceptionUnwindFinallyEnter(This,functionId) ) + ( (This)->lpVtbl -> ExceptionUnwindFinallyEnter(This,functionId) ) #define ICorProfilerCallback9_ExceptionUnwindFinallyLeave(This) \ - ( (This)->lpVtbl -> ExceptionUnwindFinallyLeave(This) ) + ( (This)->lpVtbl -> ExceptionUnwindFinallyLeave(This) ) #define ICorProfilerCallback9_ExceptionCatcherEnter(This,functionId,objectId) \ - ( (This)->lpVtbl -> ExceptionCatcherEnter(This,functionId,objectId) ) + ( (This)->lpVtbl -> ExceptionCatcherEnter(This,functionId,objectId) ) #define ICorProfilerCallback9_ExceptionCatcherLeave(This) \ - ( (This)->lpVtbl -> ExceptionCatcherLeave(This) ) + ( (This)->lpVtbl -> ExceptionCatcherLeave(This) ) #define ICorProfilerCallback9_COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) \ - ( (This)->lpVtbl -> COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) ) + ( (This)->lpVtbl -> COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) ) #define ICorProfilerCallback9_COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) \ - ( (This)->lpVtbl -> COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) ) + ( (This)->lpVtbl -> COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) ) #define ICorProfilerCallback9_ExceptionCLRCatcherFound(This) \ - ( (This)->lpVtbl -> ExceptionCLRCatcherFound(This) ) + ( (This)->lpVtbl -> ExceptionCLRCatcherFound(This) ) #define ICorProfilerCallback9_ExceptionCLRCatcherExecute(This) \ - ( (This)->lpVtbl -> ExceptionCLRCatcherExecute(This) ) + ( (This)->lpVtbl -> ExceptionCLRCatcherExecute(This) ) #define ICorProfilerCallback9_ThreadNameChanged(This,threadId,cchName,name) \ - ( (This)->lpVtbl -> ThreadNameChanged(This,threadId,cchName,name) ) + ( (This)->lpVtbl -> ThreadNameChanged(This,threadId,cchName,name) ) #define ICorProfilerCallback9_GarbageCollectionStarted(This,cGenerations,generationCollected,reason) \ - ( (This)->lpVtbl -> GarbageCollectionStarted(This,cGenerations,generationCollected,reason) ) + ( (This)->lpVtbl -> GarbageCollectionStarted(This,cGenerations,generationCollected,reason) ) #define ICorProfilerCallback9_SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \ - ( (This)->lpVtbl -> SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) ) + ( (This)->lpVtbl -> SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) ) #define ICorProfilerCallback9_GarbageCollectionFinished(This) \ - ( (This)->lpVtbl -> GarbageCollectionFinished(This) ) + ( (This)->lpVtbl -> GarbageCollectionFinished(This) ) #define ICorProfilerCallback9_FinalizeableObjectQueued(This,finalizerFlags,objectID) \ - ( (This)->lpVtbl -> FinalizeableObjectQueued(This,finalizerFlags,objectID) ) + ( (This)->lpVtbl -> FinalizeableObjectQueued(This,finalizerFlags,objectID) ) #define ICorProfilerCallback9_RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) \ - ( (This)->lpVtbl -> RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) ) + ( (This)->lpVtbl -> RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) ) #define ICorProfilerCallback9_HandleCreated(This,handleId,initialObjectId) \ - ( (This)->lpVtbl -> HandleCreated(This,handleId,initialObjectId) ) + ( (This)->lpVtbl -> HandleCreated(This,handleId,initialObjectId) ) #define ICorProfilerCallback9_HandleDestroyed(This,handleId) \ - ( (This)->lpVtbl -> HandleDestroyed(This,handleId) ) + ( (This)->lpVtbl -> HandleDestroyed(This,handleId) ) #define ICorProfilerCallback9_InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) \ - ( (This)->lpVtbl -> InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) ) + ( (This)->lpVtbl -> InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) ) #define ICorProfilerCallback9_ProfilerAttachComplete(This) \ - ( (This)->lpVtbl -> ProfilerAttachComplete(This) ) + ( (This)->lpVtbl -> ProfilerAttachComplete(This) ) #define ICorProfilerCallback9_ProfilerDetachSucceeded(This) \ - ( (This)->lpVtbl -> ProfilerDetachSucceeded(This) ) + ( (This)->lpVtbl -> ProfilerDetachSucceeded(This) ) #define ICorProfilerCallback9_ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) \ - ( (This)->lpVtbl -> ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) ) + ( (This)->lpVtbl -> ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) ) #define ICorProfilerCallback9_GetReJITParameters(This,moduleId,methodId,pFunctionControl) \ - ( (This)->lpVtbl -> GetReJITParameters(This,moduleId,methodId,pFunctionControl) ) + ( (This)->lpVtbl -> GetReJITParameters(This,moduleId,methodId,pFunctionControl) ) #define ICorProfilerCallback9_ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) \ - ( (This)->lpVtbl -> ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) ) + ( (This)->lpVtbl -> ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) ) #define ICorProfilerCallback9_ReJITError(This,moduleId,methodId,functionId,hrStatus) \ - ( (This)->lpVtbl -> ReJITError(This,moduleId,methodId,functionId,hrStatus) ) + ( (This)->lpVtbl -> ReJITError(This,moduleId,methodId,functionId,hrStatus) ) #define ICorProfilerCallback9_MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \ - ( (This)->lpVtbl -> MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) ) + ( (This)->lpVtbl -> MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) ) #define ICorProfilerCallback9_SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \ - ( (This)->lpVtbl -> SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) ) + ( (This)->lpVtbl -> SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) ) #define ICorProfilerCallback9_ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) \ - ( (This)->lpVtbl -> ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) ) + ( (This)->lpVtbl -> ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) ) #define ICorProfilerCallback9_GetAssemblyReferences(This,wszAssemblyPath,pAsmRefProvider) \ - ( (This)->lpVtbl -> GetAssemblyReferences(This,wszAssemblyPath,pAsmRefProvider) ) + ( (This)->lpVtbl -> GetAssemblyReferences(This,wszAssemblyPath,pAsmRefProvider) ) #define ICorProfilerCallback9_ModuleInMemorySymbolsUpdated(This,moduleId) \ - ( (This)->lpVtbl -> ModuleInMemorySymbolsUpdated(This,moduleId) ) + ( (This)->lpVtbl -> ModuleInMemorySymbolsUpdated(This,moduleId) ) #define ICorProfilerCallback9_DynamicMethodJITCompilationStarted(This,functionId,fIsSafeToBlock,pILHeader,cbILHeader) \ - ( (This)->lpVtbl -> DynamicMethodJITCompilationStarted(This,functionId,fIsSafeToBlock,pILHeader,cbILHeader) ) + ( (This)->lpVtbl -> DynamicMethodJITCompilationStarted(This,functionId,fIsSafeToBlock,pILHeader,cbILHeader) ) #define ICorProfilerCallback9_DynamicMethodJITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \ - ( (This)->lpVtbl -> DynamicMethodJITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) ) + ( (This)->lpVtbl -> DynamicMethodJITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) ) #define ICorProfilerCallback9_DynamicMethodUnloaded(This,functionId) \ - ( (This)->lpVtbl -> DynamicMethodUnloaded(This,functionId) ) + ( (This)->lpVtbl -> DynamicMethodUnloaded(This,functionId) ) #endif /* COBJMACROS */ @@ -7508,11 +7527,835 @@ EXTERN_C const IID IID_ICorProfilerCallback9; #endif /* __ICorProfilerCallback9_INTERFACE_DEFINED__ */ -/* interface __MIDL_itf_corprof_0000_0009 */ -/* [local] */ +#ifndef __ICorProfilerCallback10_INTERFACE_DEFINED__ +#define __ICorProfilerCallback10_INTERFACE_DEFINED__ + +/* interface ICorProfilerCallback10 */ +/* [local][unique][uuid][object] */ + + +EXTERN_C const IID IID_ICorProfilerCallback10; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("CEC5B60E-C69C-495F-87F6-84D28EE16FFB") + ICorProfilerCallback10 : public ICorProfilerCallback9 + { + public: + virtual HRESULT STDMETHODCALLTYPE EventPipeEventDelivered( + /* [in] */ EVENTPIPE_PROVIDER provider, + /* [in] */ DWORD eventId, + /* [in] */ DWORD eventVersion, + /* [in] */ ULONG cbMetadataBlob, + /* [size_is][in] */ LPCBYTE metadataBlob, + /* [in] */ ULONG cbEventData, + /* [size_is][in] */ LPCBYTE eventData, + /* [in] */ LPCGUID pActivityId, + /* [in] */ LPCGUID pRelatedActivityId, + /* [in] */ ThreadID eventThread, + /* [in] */ ULONG numStackFrames, + /* [length_is][in] */ UINT_PTR stackFrames[ ]) = 0; + + virtual HRESULT STDMETHODCALLTYPE EventPipeProviderCreated( + /* [in] */ EVENTPIPE_PROVIDER provider) = 0; + + }; + + +#else /* C style interface */ -typedef /* [public] */ -enum __MIDL___MIDL_itf_corprof_0000_0009_0001 + typedef struct ICorProfilerCallback10Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ICorProfilerCallback10 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ICorProfilerCallback10 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ICorProfilerCallback10 * This); + + HRESULT ( STDMETHODCALLTYPE *Initialize )( + ICorProfilerCallback10 * This, + /* [in] */ IUnknown *pICorProfilerInfoUnk); + + HRESULT ( STDMETHODCALLTYPE *Shutdown )( + ICorProfilerCallback10 * This); + + HRESULT ( STDMETHODCALLTYPE *AppDomainCreationStarted )( + ICorProfilerCallback10 * This, + /* [in] */ AppDomainID appDomainId); + + HRESULT ( STDMETHODCALLTYPE *AppDomainCreationFinished )( + ICorProfilerCallback10 * This, + /* [in] */ AppDomainID appDomainId, + /* [in] */ HRESULT hrStatus); + + HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownStarted )( + ICorProfilerCallback10 * This, + /* [in] */ AppDomainID appDomainId); + + HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownFinished )( + ICorProfilerCallback10 * This, + /* [in] */ AppDomainID appDomainId, + /* [in] */ HRESULT hrStatus); + + HRESULT ( STDMETHODCALLTYPE *AssemblyLoadStarted )( + ICorProfilerCallback10 * This, + /* [in] */ AssemblyID assemblyId); + + HRESULT ( STDMETHODCALLTYPE *AssemblyLoadFinished )( + ICorProfilerCallback10 * This, + /* [in] */ AssemblyID assemblyId, + /* [in] */ HRESULT hrStatus); + + HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadStarted )( + ICorProfilerCallback10 * This, + /* [in] */ AssemblyID assemblyId); + + HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadFinished )( + ICorProfilerCallback10 * This, + /* [in] */ AssemblyID assemblyId, + /* [in] */ HRESULT hrStatus); + + HRESULT ( STDMETHODCALLTYPE *ModuleLoadStarted )( + ICorProfilerCallback10 * This, + /* [in] */ ModuleID moduleId); + + HRESULT ( STDMETHODCALLTYPE *ModuleLoadFinished )( + ICorProfilerCallback10 * This, + /* [in] */ ModuleID moduleId, + /* [in] */ HRESULT hrStatus); + + HRESULT ( STDMETHODCALLTYPE *ModuleUnloadStarted )( + ICorProfilerCallback10 * This, + /* [in] */ ModuleID moduleId); + + HRESULT ( STDMETHODCALLTYPE *ModuleUnloadFinished )( + ICorProfilerCallback10 * This, + /* [in] */ ModuleID moduleId, + /* [in] */ HRESULT hrStatus); + + HRESULT ( STDMETHODCALLTYPE *ModuleAttachedToAssembly )( + ICorProfilerCallback10 * This, + /* [in] */ ModuleID moduleId, + /* [in] */ AssemblyID AssemblyId); + + HRESULT ( STDMETHODCALLTYPE *ClassLoadStarted )( + ICorProfilerCallback10 * This, + /* [in] */ ClassID classId); + + HRESULT ( STDMETHODCALLTYPE *ClassLoadFinished )( + ICorProfilerCallback10 * This, + /* [in] */ ClassID classId, + /* [in] */ HRESULT hrStatus); + + HRESULT ( STDMETHODCALLTYPE *ClassUnloadStarted )( + ICorProfilerCallback10 * This, + /* [in] */ ClassID classId); + + HRESULT ( STDMETHODCALLTYPE *ClassUnloadFinished )( + ICorProfilerCallback10 * This, + /* [in] */ ClassID classId, + /* [in] */ HRESULT hrStatus); + + HRESULT ( STDMETHODCALLTYPE *FunctionUnloadStarted )( + ICorProfilerCallback10 * This, + /* [in] */ FunctionID functionId); + + HRESULT ( STDMETHODCALLTYPE *JITCompilationStarted )( + ICorProfilerCallback10 * This, + /* [in] */ FunctionID functionId, + /* [in] */ BOOL fIsSafeToBlock); + + HRESULT ( STDMETHODCALLTYPE *JITCompilationFinished )( + ICorProfilerCallback10 * This, + /* [in] */ FunctionID functionId, + /* [in] */ HRESULT hrStatus, + /* [in] */ BOOL fIsSafeToBlock); + + HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchStarted )( + ICorProfilerCallback10 * This, + /* [in] */ FunctionID functionId, + /* [out] */ BOOL *pbUseCachedFunction); + + HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchFinished )( + ICorProfilerCallback10 * This, + /* [in] */ FunctionID functionId, + /* [in] */ COR_PRF_JIT_CACHE result); + + HRESULT ( STDMETHODCALLTYPE *JITFunctionPitched )( + ICorProfilerCallback10 * This, + /* [in] */ FunctionID functionId); + + HRESULT ( STDMETHODCALLTYPE *JITInlining )( + ICorProfilerCallback10 * This, + /* [in] */ FunctionID callerId, + /* [in] */ FunctionID calleeId, + /* [out] */ BOOL *pfShouldInline); + + HRESULT ( STDMETHODCALLTYPE *ThreadCreated )( + ICorProfilerCallback10 * This, + /* [in] */ ThreadID threadId); + + HRESULT ( STDMETHODCALLTYPE *ThreadDestroyed )( + ICorProfilerCallback10 * This, + /* [in] */ ThreadID threadId); + + HRESULT ( STDMETHODCALLTYPE *ThreadAssignedToOSThread )( + ICorProfilerCallback10 * This, + /* [in] */ ThreadID managedThreadId, + /* [in] */ DWORD osThreadId); + + HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationStarted )( + ICorProfilerCallback10 * This); + + HRESULT ( STDMETHODCALLTYPE *RemotingClientSendingMessage )( + ICorProfilerCallback10 * This, + /* [in] */ GUID *pCookie, + /* [in] */ BOOL fIsAsync); + + HRESULT ( STDMETHODCALLTYPE *RemotingClientReceivingReply )( + ICorProfilerCallback10 * This, + /* [in] */ GUID *pCookie, + /* [in] */ BOOL fIsAsync); + + HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationFinished )( + ICorProfilerCallback10 * This); + + HRESULT ( STDMETHODCALLTYPE *RemotingServerReceivingMessage )( + ICorProfilerCallback10 * This, + /* [in] */ GUID *pCookie, + /* [in] */ BOOL fIsAsync); + + HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationStarted )( + ICorProfilerCallback10 * This); + + HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationReturned )( + ICorProfilerCallback10 * This); + + HRESULT ( STDMETHODCALLTYPE *RemotingServerSendingReply )( + ICorProfilerCallback10 * This, + /* [in] */ GUID *pCookie, + /* [in] */ BOOL fIsAsync); + + HRESULT ( STDMETHODCALLTYPE *UnmanagedToManagedTransition )( + ICorProfilerCallback10 * This, + /* [in] */ FunctionID functionId, + /* [in] */ COR_PRF_TRANSITION_REASON reason); + + HRESULT ( STDMETHODCALLTYPE *ManagedToUnmanagedTransition )( + ICorProfilerCallback10 * This, + /* [in] */ FunctionID functionId, + /* [in] */ COR_PRF_TRANSITION_REASON reason); + + HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendStarted )( + ICorProfilerCallback10 * This, + /* [in] */ COR_PRF_SUSPEND_REASON suspendReason); + + HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendFinished )( + ICorProfilerCallback10 * This); + + HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendAborted )( + ICorProfilerCallback10 * This); + + HRESULT ( STDMETHODCALLTYPE *RuntimeResumeStarted )( + ICorProfilerCallback10 * This); + + HRESULT ( STDMETHODCALLTYPE *RuntimeResumeFinished )( + ICorProfilerCallback10 * This); + + HRESULT ( STDMETHODCALLTYPE *RuntimeThreadSuspended )( + ICorProfilerCallback10 * This, + /* [in] */ ThreadID threadId); + + HRESULT ( STDMETHODCALLTYPE *RuntimeThreadResumed )( + ICorProfilerCallback10 * This, + /* [in] */ ThreadID threadId); + + HRESULT ( STDMETHODCALLTYPE *MovedReferences )( + ICorProfilerCallback10 * This, + /* [in] */ ULONG cMovedObjectIDRanges, + /* [size_is][in] */ ObjectID oldObjectIDRangeStart[ ], + /* [size_is][in] */ ObjectID newObjectIDRangeStart[ ], + /* [size_is][in] */ ULONG cObjectIDRangeLength[ ]); + + HRESULT ( STDMETHODCALLTYPE *ObjectAllocated )( + ICorProfilerCallback10 * This, + /* [in] */ ObjectID objectId, + /* [in] */ ClassID classId); + + HRESULT ( STDMETHODCALLTYPE *ObjectsAllocatedByClass )( + ICorProfilerCallback10 * This, + /* [in] */ ULONG cClassCount, + /* [size_is][in] */ ClassID classIds[ ], + /* [size_is][in] */ ULONG cObjects[ ]); + + HRESULT ( STDMETHODCALLTYPE *ObjectReferences )( + ICorProfilerCallback10 * This, + /* [in] */ ObjectID objectId, + /* [in] */ ClassID classId, + /* [in] */ ULONG cObjectRefs, + /* [size_is][in] */ ObjectID objectRefIds[ ]); + + HRESULT ( STDMETHODCALLTYPE *RootReferences )( + ICorProfilerCallback10 * This, + /* [in] */ ULONG cRootRefs, + /* [size_is][in] */ ObjectID rootRefIds[ ]); + + HRESULT ( STDMETHODCALLTYPE *ExceptionThrown )( + ICorProfilerCallback10 * This, + /* [in] */ ObjectID thrownObjectId); + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionEnter )( + ICorProfilerCallback10 * This, + /* [in] */ FunctionID functionId); + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionLeave )( + ICorProfilerCallback10 * This); + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterEnter )( + ICorProfilerCallback10 * This, + /* [in] */ FunctionID functionId); + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterLeave )( + ICorProfilerCallback10 * This); + + HRESULT ( STDMETHODCALLTYPE *ExceptionSearchCatcherFound )( + ICorProfilerCallback10 * This, + /* [in] */ FunctionID functionId); + + HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerEnter )( + ICorProfilerCallback10 * This, + /* [in] */ UINT_PTR __unused); + + HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerLeave )( + ICorProfilerCallback10 * This, + /* [in] */ UINT_PTR __unused); + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionEnter )( + ICorProfilerCallback10 * This, + /* [in] */ FunctionID functionId); + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionLeave )( + ICorProfilerCallback10 * This); + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyEnter )( + ICorProfilerCallback10 * This, + /* [in] */ FunctionID functionId); + + HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyLeave )( + ICorProfilerCallback10 * This); + + HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherEnter )( + ICorProfilerCallback10 * This, + /* [in] */ FunctionID functionId, + /* [in] */ ObjectID objectId); + + HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherLeave )( + ICorProfilerCallback10 * This); + + HRESULT ( STDMETHODCALLTYPE *COMClassicVTableCreated )( + ICorProfilerCallback10 * This, + /* [in] */ ClassID wrappedClassId, + /* [in] */ REFGUID implementedIID, + /* [in] */ void *pVTable, + /* [in] */ ULONG cSlots); + + HRESULT ( STDMETHODCALLTYPE *COMClassicVTableDestroyed )( + ICorProfilerCallback10 * This, + /* [in] */ ClassID wrappedClassId, + /* [in] */ REFGUID implementedIID, + /* [in] */ void *pVTable); + + HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherFound )( + ICorProfilerCallback10 * This); + + HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherExecute )( + ICorProfilerCallback10 * This); + + HRESULT ( STDMETHODCALLTYPE *ThreadNameChanged )( + ICorProfilerCallback10 * This, + /* [in] */ ThreadID threadId, + /* [in] */ ULONG cchName, + /* [annotation][in] */ + _In_reads_opt_(cchName) WCHAR name[ ]); + + HRESULT ( STDMETHODCALLTYPE *GarbageCollectionStarted )( + ICorProfilerCallback10 * This, + /* [in] */ int cGenerations, + /* [size_is][in] */ BOOL generationCollected[ ], + /* [in] */ COR_PRF_GC_REASON reason); + + HRESULT ( STDMETHODCALLTYPE *SurvivingReferences )( + ICorProfilerCallback10 * This, + /* [in] */ ULONG cSurvivingObjectIDRanges, + /* [size_is][in] */ ObjectID objectIDRangeStart[ ], + /* [size_is][in] */ ULONG cObjectIDRangeLength[ ]); + + HRESULT ( STDMETHODCALLTYPE *GarbageCollectionFinished )( + ICorProfilerCallback10 * This); + + HRESULT ( STDMETHODCALLTYPE *FinalizeableObjectQueued )( + ICorProfilerCallback10 * This, + /* [in] */ DWORD finalizerFlags, + /* [in] */ ObjectID objectID); + + HRESULT ( STDMETHODCALLTYPE *RootReferences2 )( + ICorProfilerCallback10 * This, + /* [in] */ ULONG cRootRefs, + /* [size_is][in] */ ObjectID rootRefIds[ ], + /* [size_is][in] */ COR_PRF_GC_ROOT_KIND rootKinds[ ], + /* [size_is][in] */ COR_PRF_GC_ROOT_FLAGS rootFlags[ ], + /* [size_is][in] */ UINT_PTR rootIds[ ]); + + HRESULT ( STDMETHODCALLTYPE *HandleCreated )( + ICorProfilerCallback10 * This, + /* [in] */ GCHandleID handleId, + /* [in] */ ObjectID initialObjectId); + + HRESULT ( STDMETHODCALLTYPE *HandleDestroyed )( + ICorProfilerCallback10 * This, + /* [in] */ GCHandleID handleId); + + HRESULT ( STDMETHODCALLTYPE *InitializeForAttach )( + ICorProfilerCallback10 * This, + /* [in] */ IUnknown *pCorProfilerInfoUnk, + /* [in] */ void *pvClientData, + /* [in] */ UINT cbClientData); + + HRESULT ( STDMETHODCALLTYPE *ProfilerAttachComplete )( + ICorProfilerCallback10 * This); + + HRESULT ( STDMETHODCALLTYPE *ProfilerDetachSucceeded )( + ICorProfilerCallback10 * This); + + HRESULT ( STDMETHODCALLTYPE *ReJITCompilationStarted )( + ICorProfilerCallback10 * This, + /* [in] */ FunctionID functionId, + /* [in] */ ReJITID rejitId, + /* [in] */ BOOL fIsSafeToBlock); + + HRESULT ( STDMETHODCALLTYPE *GetReJITParameters )( + ICorProfilerCallback10 * This, + /* [in] */ ModuleID moduleId, + /* [in] */ mdMethodDef methodId, + /* [in] */ ICorProfilerFunctionControl *pFunctionControl); + + HRESULT ( STDMETHODCALLTYPE *ReJITCompilationFinished )( + ICorProfilerCallback10 * This, + /* [in] */ FunctionID functionId, + /* [in] */ ReJITID rejitId, + /* [in] */ HRESULT hrStatus, + /* [in] */ BOOL fIsSafeToBlock); + + HRESULT ( STDMETHODCALLTYPE *ReJITError )( + ICorProfilerCallback10 * This, + /* [in] */ ModuleID moduleId, + /* [in] */ mdMethodDef methodId, + /* [in] */ FunctionID functionId, + /* [in] */ HRESULT hrStatus); + + HRESULT ( STDMETHODCALLTYPE *MovedReferences2 )( + ICorProfilerCallback10 * This, + /* [in] */ ULONG cMovedObjectIDRanges, + /* [size_is][in] */ ObjectID oldObjectIDRangeStart[ ], + /* [size_is][in] */ ObjectID newObjectIDRangeStart[ ], + /* [size_is][in] */ SIZE_T cObjectIDRangeLength[ ]); + + HRESULT ( STDMETHODCALLTYPE *SurvivingReferences2 )( + ICorProfilerCallback10 * This, + /* [in] */ ULONG cSurvivingObjectIDRanges, + /* [size_is][in] */ ObjectID objectIDRangeStart[ ], + /* [size_is][in] */ SIZE_T cObjectIDRangeLength[ ]); + + HRESULT ( STDMETHODCALLTYPE *ConditionalWeakTableElementReferences )( + ICorProfilerCallback10 * This, + /* [in] */ ULONG cRootRefs, + /* [size_is][in] */ ObjectID keyRefIds[ ], + /* [size_is][in] */ ObjectID valueRefIds[ ], + /* [size_is][in] */ GCHandleID rootIds[ ]); + + HRESULT ( STDMETHODCALLTYPE *GetAssemblyReferences )( + ICorProfilerCallback10 * This, + /* [string][in] */ const WCHAR *wszAssemblyPath, + /* [in] */ ICorProfilerAssemblyReferenceProvider *pAsmRefProvider); + + HRESULT ( STDMETHODCALLTYPE *ModuleInMemorySymbolsUpdated )( + ICorProfilerCallback10 * This, + ModuleID moduleId); + + HRESULT ( STDMETHODCALLTYPE *DynamicMethodJITCompilationStarted )( + ICorProfilerCallback10 * This, + /* [in] */ FunctionID functionId, + /* [in] */ BOOL fIsSafeToBlock, + /* [in] */ LPCBYTE pILHeader, + /* [in] */ ULONG cbILHeader); + + HRESULT ( STDMETHODCALLTYPE *DynamicMethodJITCompilationFinished )( + ICorProfilerCallback10 * This, + /* [in] */ FunctionID functionId, + /* [in] */ HRESULT hrStatus, + /* [in] */ BOOL fIsSafeToBlock); + + HRESULT ( STDMETHODCALLTYPE *DynamicMethodUnloaded )( + ICorProfilerCallback10 * This, + /* [in] */ FunctionID functionId); + + HRESULT ( STDMETHODCALLTYPE *EventPipeEventDelivered )( + ICorProfilerCallback10 * This, + /* [in] */ EVENTPIPE_PROVIDER provider, + /* [in] */ DWORD eventId, + /* [in] */ DWORD eventVersion, + /* [in] */ ULONG cbMetadataBlob, + /* [size_is][in] */ LPCBYTE metadataBlob, + /* [in] */ ULONG cbEventData, + /* [size_is][in] */ LPCBYTE eventData, + /* [in] */ LPCGUID pActivityId, + /* [in] */ LPCGUID pRelatedActivityId, + /* [in] */ ThreadID eventThread, + /* [in] */ ULONG numStackFrames, + /* [length_is][in] */ UINT_PTR stackFrames[ ]); + + HRESULT ( STDMETHODCALLTYPE *EventPipeProviderCreated )( + ICorProfilerCallback10 * This, + /* [in] */ EVENTPIPE_PROVIDER provider); + + END_INTERFACE + } ICorProfilerCallback10Vtbl; + + interface ICorProfilerCallback10 + { + CONST_VTBL struct ICorProfilerCallback10Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ICorProfilerCallback10_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ICorProfilerCallback10_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ICorProfilerCallback10_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ICorProfilerCallback10_Initialize(This,pICorProfilerInfoUnk) \ + ( (This)->lpVtbl -> Initialize(This,pICorProfilerInfoUnk) ) + +#define ICorProfilerCallback10_Shutdown(This) \ + ( (This)->lpVtbl -> Shutdown(This) ) + +#define ICorProfilerCallback10_AppDomainCreationStarted(This,appDomainId) \ + ( (This)->lpVtbl -> AppDomainCreationStarted(This,appDomainId) ) + +#define ICorProfilerCallback10_AppDomainCreationFinished(This,appDomainId,hrStatus) \ + ( (This)->lpVtbl -> AppDomainCreationFinished(This,appDomainId,hrStatus) ) + +#define ICorProfilerCallback10_AppDomainShutdownStarted(This,appDomainId) \ + ( (This)->lpVtbl -> AppDomainShutdownStarted(This,appDomainId) ) + +#define ICorProfilerCallback10_AppDomainShutdownFinished(This,appDomainId,hrStatus) \ + ( (This)->lpVtbl -> AppDomainShutdownFinished(This,appDomainId,hrStatus) ) + +#define ICorProfilerCallback10_AssemblyLoadStarted(This,assemblyId) \ + ( (This)->lpVtbl -> AssemblyLoadStarted(This,assemblyId) ) + +#define ICorProfilerCallback10_AssemblyLoadFinished(This,assemblyId,hrStatus) \ + ( (This)->lpVtbl -> AssemblyLoadFinished(This,assemblyId,hrStatus) ) + +#define ICorProfilerCallback10_AssemblyUnloadStarted(This,assemblyId) \ + ( (This)->lpVtbl -> AssemblyUnloadStarted(This,assemblyId) ) + +#define ICorProfilerCallback10_AssemblyUnloadFinished(This,assemblyId,hrStatus) \ + ( (This)->lpVtbl -> AssemblyUnloadFinished(This,assemblyId,hrStatus) ) + +#define ICorProfilerCallback10_ModuleLoadStarted(This,moduleId) \ + ( (This)->lpVtbl -> ModuleLoadStarted(This,moduleId) ) + +#define ICorProfilerCallback10_ModuleLoadFinished(This,moduleId,hrStatus) \ + ( (This)->lpVtbl -> ModuleLoadFinished(This,moduleId,hrStatus) ) + +#define ICorProfilerCallback10_ModuleUnloadStarted(This,moduleId) \ + ( (This)->lpVtbl -> ModuleUnloadStarted(This,moduleId) ) + +#define ICorProfilerCallback10_ModuleUnloadFinished(This,moduleId,hrStatus) \ + ( (This)->lpVtbl -> ModuleUnloadFinished(This,moduleId,hrStatus) ) + +#define ICorProfilerCallback10_ModuleAttachedToAssembly(This,moduleId,AssemblyId) \ + ( (This)->lpVtbl -> ModuleAttachedToAssembly(This,moduleId,AssemblyId) ) + +#define ICorProfilerCallback10_ClassLoadStarted(This,classId) \ + ( (This)->lpVtbl -> ClassLoadStarted(This,classId) ) + +#define ICorProfilerCallback10_ClassLoadFinished(This,classId,hrStatus) \ + ( (This)->lpVtbl -> ClassLoadFinished(This,classId,hrStatus) ) + +#define ICorProfilerCallback10_ClassUnloadStarted(This,classId) \ + ( (This)->lpVtbl -> ClassUnloadStarted(This,classId) ) + +#define ICorProfilerCallback10_ClassUnloadFinished(This,classId,hrStatus) \ + ( (This)->lpVtbl -> ClassUnloadFinished(This,classId,hrStatus) ) + +#define ICorProfilerCallback10_FunctionUnloadStarted(This,functionId) \ + ( (This)->lpVtbl -> FunctionUnloadStarted(This,functionId) ) + +#define ICorProfilerCallback10_JITCompilationStarted(This,functionId,fIsSafeToBlock) \ + ( (This)->lpVtbl -> JITCompilationStarted(This,functionId,fIsSafeToBlock) ) + +#define ICorProfilerCallback10_JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \ + ( (This)->lpVtbl -> JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) ) + +#define ICorProfilerCallback10_JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) \ + ( (This)->lpVtbl -> JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) ) + +#define ICorProfilerCallback10_JITCachedFunctionSearchFinished(This,functionId,result) \ + ( (This)->lpVtbl -> JITCachedFunctionSearchFinished(This,functionId,result) ) + +#define ICorProfilerCallback10_JITFunctionPitched(This,functionId) \ + ( (This)->lpVtbl -> JITFunctionPitched(This,functionId) ) + +#define ICorProfilerCallback10_JITInlining(This,callerId,calleeId,pfShouldInline) \ + ( (This)->lpVtbl -> JITInlining(This,callerId,calleeId,pfShouldInline) ) + +#define ICorProfilerCallback10_ThreadCreated(This,threadId) \ + ( (This)->lpVtbl -> ThreadCreated(This,threadId) ) + +#define ICorProfilerCallback10_ThreadDestroyed(This,threadId) \ + ( (This)->lpVtbl -> ThreadDestroyed(This,threadId) ) + +#define ICorProfilerCallback10_ThreadAssignedToOSThread(This,managedThreadId,osThreadId) \ + ( (This)->lpVtbl -> ThreadAssignedToOSThread(This,managedThreadId,osThreadId) ) + +#define ICorProfilerCallback10_RemotingClientInvocationStarted(This) \ + ( (This)->lpVtbl -> RemotingClientInvocationStarted(This) ) + +#define ICorProfilerCallback10_RemotingClientSendingMessage(This,pCookie,fIsAsync) \ + ( (This)->lpVtbl -> RemotingClientSendingMessage(This,pCookie,fIsAsync) ) + +#define ICorProfilerCallback10_RemotingClientReceivingReply(This,pCookie,fIsAsync) \ + ( (This)->lpVtbl -> RemotingClientReceivingReply(This,pCookie,fIsAsync) ) + +#define ICorProfilerCallback10_RemotingClientInvocationFinished(This) \ + ( (This)->lpVtbl -> RemotingClientInvocationFinished(This) ) + +#define ICorProfilerCallback10_RemotingServerReceivingMessage(This,pCookie,fIsAsync) \ + ( (This)->lpVtbl -> RemotingServerReceivingMessage(This,pCookie,fIsAsync) ) + +#define ICorProfilerCallback10_RemotingServerInvocationStarted(This) \ + ( (This)->lpVtbl -> RemotingServerInvocationStarted(This) ) + +#define ICorProfilerCallback10_RemotingServerInvocationReturned(This) \ + ( (This)->lpVtbl -> RemotingServerInvocationReturned(This) ) + +#define ICorProfilerCallback10_RemotingServerSendingReply(This,pCookie,fIsAsync) \ + ( (This)->lpVtbl -> RemotingServerSendingReply(This,pCookie,fIsAsync) ) + +#define ICorProfilerCallback10_UnmanagedToManagedTransition(This,functionId,reason) \ + ( (This)->lpVtbl -> UnmanagedToManagedTransition(This,functionId,reason) ) + +#define ICorProfilerCallback10_ManagedToUnmanagedTransition(This,functionId,reason) \ + ( (This)->lpVtbl -> ManagedToUnmanagedTransition(This,functionId,reason) ) + +#define ICorProfilerCallback10_RuntimeSuspendStarted(This,suspendReason) \ + ( (This)->lpVtbl -> RuntimeSuspendStarted(This,suspendReason) ) + +#define ICorProfilerCallback10_RuntimeSuspendFinished(This) \ + ( (This)->lpVtbl -> RuntimeSuspendFinished(This) ) + +#define ICorProfilerCallback10_RuntimeSuspendAborted(This) \ + ( (This)->lpVtbl -> RuntimeSuspendAborted(This) ) + +#define ICorProfilerCallback10_RuntimeResumeStarted(This) \ + ( (This)->lpVtbl -> RuntimeResumeStarted(This) ) + +#define ICorProfilerCallback10_RuntimeResumeFinished(This) \ + ( (This)->lpVtbl -> RuntimeResumeFinished(This) ) + +#define ICorProfilerCallback10_RuntimeThreadSuspended(This,threadId) \ + ( (This)->lpVtbl -> RuntimeThreadSuspended(This,threadId) ) + +#define ICorProfilerCallback10_RuntimeThreadResumed(This,threadId) \ + ( (This)->lpVtbl -> RuntimeThreadResumed(This,threadId) ) + +#define ICorProfilerCallback10_MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \ + ( (This)->lpVtbl -> MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) ) + +#define ICorProfilerCallback10_ObjectAllocated(This,objectId,classId) \ + ( (This)->lpVtbl -> ObjectAllocated(This,objectId,classId) ) + +#define ICorProfilerCallback10_ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) \ + ( (This)->lpVtbl -> ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) ) + +#define ICorProfilerCallback10_ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) \ + ( (This)->lpVtbl -> ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) ) + +#define ICorProfilerCallback10_RootReferences(This,cRootRefs,rootRefIds) \ + ( (This)->lpVtbl -> RootReferences(This,cRootRefs,rootRefIds) ) + +#define ICorProfilerCallback10_ExceptionThrown(This,thrownObjectId) \ + ( (This)->lpVtbl -> ExceptionThrown(This,thrownObjectId) ) + +#define ICorProfilerCallback10_ExceptionSearchFunctionEnter(This,functionId) \ + ( (This)->lpVtbl -> ExceptionSearchFunctionEnter(This,functionId) ) + +#define ICorProfilerCallback10_ExceptionSearchFunctionLeave(This) \ + ( (This)->lpVtbl -> ExceptionSearchFunctionLeave(This) ) + +#define ICorProfilerCallback10_ExceptionSearchFilterEnter(This,functionId) \ + ( (This)->lpVtbl -> ExceptionSearchFilterEnter(This,functionId) ) + +#define ICorProfilerCallback10_ExceptionSearchFilterLeave(This) \ + ( (This)->lpVtbl -> ExceptionSearchFilterLeave(This) ) + +#define ICorProfilerCallback10_ExceptionSearchCatcherFound(This,functionId) \ + ( (This)->lpVtbl -> ExceptionSearchCatcherFound(This,functionId) ) + +#define ICorProfilerCallback10_ExceptionOSHandlerEnter(This,__unused) \ + ( (This)->lpVtbl -> ExceptionOSHandlerEnter(This,__unused) ) + +#define ICorProfilerCallback10_ExceptionOSHandlerLeave(This,__unused) \ + ( (This)->lpVtbl -> ExceptionOSHandlerLeave(This,__unused) ) + +#define ICorProfilerCallback10_ExceptionUnwindFunctionEnter(This,functionId) \ + ( (This)->lpVtbl -> ExceptionUnwindFunctionEnter(This,functionId) ) + +#define ICorProfilerCallback10_ExceptionUnwindFunctionLeave(This) \ + ( (This)->lpVtbl -> ExceptionUnwindFunctionLeave(This) ) + +#define ICorProfilerCallback10_ExceptionUnwindFinallyEnter(This,functionId) \ + ( (This)->lpVtbl -> ExceptionUnwindFinallyEnter(This,functionId) ) + +#define ICorProfilerCallback10_ExceptionUnwindFinallyLeave(This) \ + ( (This)->lpVtbl -> ExceptionUnwindFinallyLeave(This) ) + +#define ICorProfilerCallback10_ExceptionCatcherEnter(This,functionId,objectId) \ + ( (This)->lpVtbl -> ExceptionCatcherEnter(This,functionId,objectId) ) + +#define ICorProfilerCallback10_ExceptionCatcherLeave(This) \ + ( (This)->lpVtbl -> ExceptionCatcherLeave(This) ) + +#define ICorProfilerCallback10_COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) \ + ( (This)->lpVtbl -> COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) ) + +#define ICorProfilerCallback10_COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) \ + ( (This)->lpVtbl -> COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) ) + +#define ICorProfilerCallback10_ExceptionCLRCatcherFound(This) \ + ( (This)->lpVtbl -> ExceptionCLRCatcherFound(This) ) + +#define ICorProfilerCallback10_ExceptionCLRCatcherExecute(This) \ + ( (This)->lpVtbl -> ExceptionCLRCatcherExecute(This) ) + + +#define ICorProfilerCallback10_ThreadNameChanged(This,threadId,cchName,name) \ + ( (This)->lpVtbl -> ThreadNameChanged(This,threadId,cchName,name) ) + +#define ICorProfilerCallback10_GarbageCollectionStarted(This,cGenerations,generationCollected,reason) \ + ( (This)->lpVtbl -> GarbageCollectionStarted(This,cGenerations,generationCollected,reason) ) + +#define ICorProfilerCallback10_SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \ + ( (This)->lpVtbl -> SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) ) + +#define ICorProfilerCallback10_GarbageCollectionFinished(This) \ + ( (This)->lpVtbl -> GarbageCollectionFinished(This) ) + +#define ICorProfilerCallback10_FinalizeableObjectQueued(This,finalizerFlags,objectID) \ + ( (This)->lpVtbl -> FinalizeableObjectQueued(This,finalizerFlags,objectID) ) + +#define ICorProfilerCallback10_RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) \ + ( (This)->lpVtbl -> RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) ) + +#define ICorProfilerCallback10_HandleCreated(This,handleId,initialObjectId) \ + ( (This)->lpVtbl -> HandleCreated(This,handleId,initialObjectId) ) + +#define ICorProfilerCallback10_HandleDestroyed(This,handleId) \ + ( (This)->lpVtbl -> HandleDestroyed(This,handleId) ) + + +#define ICorProfilerCallback10_InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) \ + ( (This)->lpVtbl -> InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) ) + +#define ICorProfilerCallback10_ProfilerAttachComplete(This) \ + ( (This)->lpVtbl -> ProfilerAttachComplete(This) ) + +#define ICorProfilerCallback10_ProfilerDetachSucceeded(This) \ + ( (This)->lpVtbl -> ProfilerDetachSucceeded(This) ) + + +#define ICorProfilerCallback10_ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) \ + ( (This)->lpVtbl -> ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) ) + +#define ICorProfilerCallback10_GetReJITParameters(This,moduleId,methodId,pFunctionControl) \ + ( (This)->lpVtbl -> GetReJITParameters(This,moduleId,methodId,pFunctionControl) ) + +#define ICorProfilerCallback10_ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) \ + ( (This)->lpVtbl -> ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) ) + +#define ICorProfilerCallback10_ReJITError(This,moduleId,methodId,functionId,hrStatus) \ + ( (This)->lpVtbl -> ReJITError(This,moduleId,methodId,functionId,hrStatus) ) + +#define ICorProfilerCallback10_MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \ + ( (This)->lpVtbl -> MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) ) + +#define ICorProfilerCallback10_SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \ + ( (This)->lpVtbl -> SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) ) + + +#define ICorProfilerCallback10_ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) \ + ( (This)->lpVtbl -> ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) ) + + +#define ICorProfilerCallback10_GetAssemblyReferences(This,wszAssemblyPath,pAsmRefProvider) \ + ( (This)->lpVtbl -> GetAssemblyReferences(This,wszAssemblyPath,pAsmRefProvider) ) + + +#define ICorProfilerCallback10_ModuleInMemorySymbolsUpdated(This,moduleId) \ + ( (This)->lpVtbl -> ModuleInMemorySymbolsUpdated(This,moduleId) ) + + +#define ICorProfilerCallback10_DynamicMethodJITCompilationStarted(This,functionId,fIsSafeToBlock,pILHeader,cbILHeader) \ + ( (This)->lpVtbl -> DynamicMethodJITCompilationStarted(This,functionId,fIsSafeToBlock,pILHeader,cbILHeader) ) + +#define ICorProfilerCallback10_DynamicMethodJITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \ + ( (This)->lpVtbl -> DynamicMethodJITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) ) + + +#define ICorProfilerCallback10_DynamicMethodUnloaded(This,functionId) \ + ( (This)->lpVtbl -> DynamicMethodUnloaded(This,functionId) ) + + +#define ICorProfilerCallback10_EventPipeEventDelivered(This,provider,eventId,eventVersion,cbMetadataBlob,metadataBlob,cbEventData,eventData,pActivityId,pRelatedActivityId,eventThread,numStackFrames,stackFrames) \ + ( (This)->lpVtbl -> EventPipeEventDelivered(This,provider,eventId,eventVersion,cbMetadataBlob,metadataBlob,cbEventData,eventData,pActivityId,pRelatedActivityId,eventThread,numStackFrames,stackFrames) ) + +#define ICorProfilerCallback10_EventPipeProviderCreated(This,provider) \ + ( (This)->lpVtbl -> EventPipeProviderCreated(This,provider) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ICorProfilerCallback10_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_corprof_0000_0010 */ +/* [local] */ + +typedef /* [public] */ +enum __MIDL___MIDL_itf_corprof_0000_0010_0001 { COR_PRF_CODEGEN_DISABLE_INLINING = 0x1, COR_PRF_CODEGEN_DISABLE_ALL_OPTIMIZATIONS = 0x2 @@ -7520,390 +8363,390 @@ enum __MIDL___MIDL_itf_corprof_0000_0009_0001 -extern RPC_IF_HANDLE __MIDL_itf_corprof_0000_0009_v0_0_c_ifspec; -extern RPC_IF_HANDLE __MIDL_itf_corprof_0000_0009_v0_0_s_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_corprof_0000_0010_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_corprof_0000_0010_v0_0_s_ifspec; #ifndef __ICorProfilerInfo_INTERFACE_DEFINED__ #define __ICorProfilerInfo_INTERFACE_DEFINED__ /* interface ICorProfilerInfo */ -/* [local][unique][uuid][object] */ +/* [local][unique][uuid][object] */ EXTERN_C const IID IID_ICorProfilerInfo; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("28B5557D-3F3F-48b4-90B2-5F9EEA2F6C48") ICorProfilerInfo : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetClassFromObject( + virtual HRESULT STDMETHODCALLTYPE GetClassFromObject( /* [in] */ ObjectID objectId, /* [out] */ ClassID *pClassId) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetClassFromToken( + + virtual HRESULT STDMETHODCALLTYPE GetClassFromToken( /* [in] */ ModuleID moduleId, /* [in] */ mdTypeDef typeDef, /* [out] */ ClassID *pClassId) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCodeInfo( + + virtual HRESULT STDMETHODCALLTYPE GetCodeInfo( /* [in] */ FunctionID functionId, /* [out] */ LPCBYTE *pStart, /* [out] */ ULONG *pcSize) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetEventMask( + + virtual HRESULT STDMETHODCALLTYPE GetEventMask( /* [out] */ DWORD *pdwEvents) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetFunctionFromIP( + + virtual HRESULT STDMETHODCALLTYPE GetFunctionFromIP( /* [in] */ LPCBYTE ip, /* [out] */ FunctionID *pFunctionId) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetFunctionFromToken( + + virtual HRESULT STDMETHODCALLTYPE GetFunctionFromToken( /* [in] */ ModuleID moduleId, /* [in] */ mdToken token, /* [out] */ FunctionID *pFunctionId) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetHandleFromThread( + + virtual HRESULT STDMETHODCALLTYPE GetHandleFromThread( /* [in] */ ThreadID threadId, /* [out] */ HANDLE *phThread) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetObjectSize( + + virtual HRESULT STDMETHODCALLTYPE GetObjectSize( /* [in] */ ObjectID objectId, /* [out] */ ULONG *pcSize) = 0; - - virtual HRESULT STDMETHODCALLTYPE IsArrayClass( + + virtual HRESULT STDMETHODCALLTYPE IsArrayClass( /* [in] */ ClassID classId, /* [out] */ CorElementType *pBaseElemType, /* [out] */ ClassID *pBaseClassId, /* [out] */ ULONG *pcRank) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetThreadInfo( + + virtual HRESULT STDMETHODCALLTYPE GetThreadInfo( /* [in] */ ThreadID threadId, /* [out] */ DWORD *pdwWin32ThreadId) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCurrentThreadID( + + virtual HRESULT STDMETHODCALLTYPE GetCurrentThreadID( /* [out] */ ThreadID *pThreadId) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetClassIDInfo( + + virtual HRESULT STDMETHODCALLTYPE GetClassIDInfo( /* [in] */ ClassID classId, /* [out] */ ModuleID *pModuleId, /* [out] */ mdTypeDef *pTypeDefToken) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetFunctionInfo( + + virtual HRESULT STDMETHODCALLTYPE GetFunctionInfo( /* [in] */ FunctionID functionId, /* [out] */ ClassID *pClassId, /* [out] */ ModuleID *pModuleId, /* [out] */ mdToken *pToken) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetEventMask( + + virtual HRESULT STDMETHODCALLTYPE SetEventMask( /* [in] */ DWORD dwEvents) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetEnterLeaveFunctionHooks( + + virtual HRESULT STDMETHODCALLTYPE SetEnterLeaveFunctionHooks( /* [in] */ FunctionEnter *pFuncEnter, /* [in] */ FunctionLeave *pFuncLeave, /* [in] */ FunctionTailcall *pFuncTailcall) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetFunctionIDMapper( + + virtual HRESULT STDMETHODCALLTYPE SetFunctionIDMapper( /* [in] */ FunctionIDMapper *pFunc) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetTokenAndMetaDataFromFunction( + + virtual HRESULT STDMETHODCALLTYPE GetTokenAndMetaDataFromFunction( /* [in] */ FunctionID functionId, /* [in] */ REFIID riid, /* [out] */ IUnknown **ppImport, /* [out] */ mdToken *pToken) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetModuleInfo( + + virtual HRESULT STDMETHODCALLTYPE GetModuleInfo( /* [in] */ ModuleID moduleId, /* [out] */ LPCBYTE *ppBaseLoadAddress, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AssemblyID *pAssemblyId) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetModuleMetaData( + + virtual HRESULT STDMETHODCALLTYPE GetModuleMetaData( /* [in] */ ModuleID moduleId, /* [in] */ DWORD dwOpenFlags, /* [in] */ REFIID riid, /* [out] */ IUnknown **ppOut) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetILFunctionBody( + + virtual HRESULT STDMETHODCALLTYPE GetILFunctionBody( /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodId, /* [out] */ LPCBYTE *ppMethodHeader, /* [out] */ ULONG *pcbMethodSize) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetILFunctionBodyAllocator( + + virtual HRESULT STDMETHODCALLTYPE GetILFunctionBodyAllocator( /* [in] */ ModuleID moduleId, /* [out] */ IMethodMalloc **ppMalloc) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetILFunctionBody( + + virtual HRESULT STDMETHODCALLTYPE SetILFunctionBody( /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodid, /* [in] */ LPCBYTE pbNewILMethodHeader) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetAppDomainInfo( + + virtual HRESULT STDMETHODCALLTYPE GetAppDomainInfo( /* [in] */ AppDomainID appDomainId, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ ProcessID *pProcessId) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetAssemblyInfo( + + virtual HRESULT STDMETHODCALLTYPE GetAssemblyInfo( /* [in] */ AssemblyID assemblyId, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AppDomainID *pAppDomainId, /* [out] */ ModuleID *pModuleId) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetFunctionReJIT( + + virtual HRESULT STDMETHODCALLTYPE SetFunctionReJIT( /* [in] */ FunctionID functionId) = 0; - + virtual HRESULT STDMETHODCALLTYPE ForceGC( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetILInstrumentedCodeMap( + + virtual HRESULT STDMETHODCALLTYPE SetILInstrumentedCodeMap( /* [in] */ FunctionID functionId, /* [in] */ BOOL fStartJit, /* [in] */ ULONG cILMapEntries, /* [size_is][in] */ COR_IL_MAP rgILMapEntries[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetInprocInspectionInterface( + + virtual HRESULT STDMETHODCALLTYPE GetInprocInspectionInterface( /* [out] */ IUnknown **ppicd) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetInprocInspectionIThisThread( + + virtual HRESULT STDMETHODCALLTYPE GetInprocInspectionIThisThread( /* [out] */ IUnknown **ppicd) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetThreadContext( + + virtual HRESULT STDMETHODCALLTYPE GetThreadContext( /* [in] */ ThreadID threadId, /* [out] */ ContextID *pContextId) = 0; - - virtual HRESULT STDMETHODCALLTYPE BeginInprocDebugging( + + virtual HRESULT STDMETHODCALLTYPE BeginInprocDebugging( /* [in] */ BOOL fThisThreadOnly, /* [out] */ DWORD *pdwProfilerContext) = 0; - - virtual HRESULT STDMETHODCALLTYPE EndInprocDebugging( + + virtual HRESULT STDMETHODCALLTYPE EndInprocDebugging( /* [in] */ DWORD dwProfilerContext) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetILToNativeMapping( + + virtual HRESULT STDMETHODCALLTYPE GetILToNativeMapping( /* [in] */ FunctionID functionId, /* [in] */ ULONG32 cMap, /* [out] */ ULONG32 *pcMap, /* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]) = 0; - + }; - - + + #else /* C style interface */ typedef struct ICorProfilerInfoVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorProfilerInfo * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorProfilerInfo * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorProfilerInfo * This); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )( ICorProfilerInfo * This, /* [in] */ ObjectID objectId, /* [out] */ ClassID *pClassId); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )( ICorProfilerInfo * This, /* [in] */ ModuleID moduleId, /* [in] */ mdTypeDef typeDef, /* [out] */ ClassID *pClassId); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )( ICorProfilerInfo * This, /* [in] */ FunctionID functionId, /* [out] */ LPCBYTE *pStart, /* [out] */ ULONG *pcSize); - - HRESULT ( STDMETHODCALLTYPE *GetEventMask )( + + HRESULT ( STDMETHODCALLTYPE *GetEventMask )( ICorProfilerInfo * This, /* [out] */ DWORD *pdwEvents); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )( ICorProfilerInfo * This, /* [in] */ LPCBYTE ip, /* [out] */ FunctionID *pFunctionId); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )( ICorProfilerInfo * This, /* [in] */ ModuleID moduleId, /* [in] */ mdToken token, /* [out] */ FunctionID *pFunctionId); - - HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )( + + HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )( ICorProfilerInfo * This, /* [in] */ ThreadID threadId, /* [out] */ HANDLE *phThread); - - HRESULT ( STDMETHODCALLTYPE *GetObjectSize )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectSize )( ICorProfilerInfo * This, /* [in] */ ObjectID objectId, /* [out] */ ULONG *pcSize); - - HRESULT ( STDMETHODCALLTYPE *IsArrayClass )( + + HRESULT ( STDMETHODCALLTYPE *IsArrayClass )( ICorProfilerInfo * This, /* [in] */ ClassID classId, /* [out] */ CorElementType *pBaseElemType, /* [out] */ ClassID *pBaseClassId, /* [out] */ ULONG *pcRank); - - HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )( ICorProfilerInfo * This, /* [in] */ ThreadID threadId, /* [out] */ DWORD *pdwWin32ThreadId); - - HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )( + + HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )( ICorProfilerInfo * This, /* [out] */ ThreadID *pThreadId); - - HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )( ICorProfilerInfo * This, /* [in] */ ClassID classId, /* [out] */ ModuleID *pModuleId, /* [out] */ mdTypeDef *pTypeDefToken); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )( ICorProfilerInfo * This, /* [in] */ FunctionID functionId, /* [out] */ ClassID *pClassId, /* [out] */ ModuleID *pModuleId, /* [out] */ mdToken *pToken); - - HRESULT ( STDMETHODCALLTYPE *SetEventMask )( + + HRESULT ( STDMETHODCALLTYPE *SetEventMask )( ICorProfilerInfo * This, /* [in] */ DWORD dwEvents); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )( ICorProfilerInfo * This, /* [in] */ FunctionEnter *pFuncEnter, /* [in] */ FunctionLeave *pFuncLeave, /* [in] */ FunctionTailcall *pFuncTailcall); - - HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )( + + HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )( ICorProfilerInfo * This, /* [in] */ FunctionIDMapper *pFunc); - - HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )( + + HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )( ICorProfilerInfo * This, /* [in] */ FunctionID functionId, /* [in] */ REFIID riid, /* [out] */ IUnknown **ppImport, /* [out] */ mdToken *pToken); - - HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )( ICorProfilerInfo * This, /* [in] */ ModuleID moduleId, /* [out] */ LPCBYTE *ppBaseLoadAddress, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AssemblyID *pAssemblyId); - - HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )( ICorProfilerInfo * This, /* [in] */ ModuleID moduleId, /* [in] */ DWORD dwOpenFlags, /* [in] */ REFIID riid, /* [out] */ IUnknown **ppOut); - - HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )( + + HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )( ICorProfilerInfo * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodId, /* [out] */ LPCBYTE *ppMethodHeader, /* [out] */ ULONG *pcbMethodSize); - - HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )( + + HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )( ICorProfilerInfo * This, /* [in] */ ModuleID moduleId, /* [out] */ IMethodMalloc **ppMalloc); - - HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )( + + HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )( ICorProfilerInfo * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodid, /* [in] */ LPCBYTE pbNewILMethodHeader); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )( ICorProfilerInfo * This, /* [in] */ AppDomainID appDomainId, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ ProcessID *pProcessId); - - HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )( ICorProfilerInfo * This, /* [in] */ AssemblyID assemblyId, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AppDomainID *pAppDomainId, /* [out] */ ModuleID *pModuleId); - - HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )( + + HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )( ICorProfilerInfo * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ForceGC )( + + HRESULT ( STDMETHODCALLTYPE *ForceGC )( ICorProfilerInfo * This); - - HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )( + + HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )( ICorProfilerInfo * This, /* [in] */ FunctionID functionId, /* [in] */ BOOL fStartJit, /* [in] */ ULONG cILMapEntries, /* [size_is][in] */ COR_IL_MAP rgILMapEntries[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )( + + HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )( ICorProfilerInfo * This, /* [out] */ IUnknown **ppicd); - - HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )( + + HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )( ICorProfilerInfo * This, /* [out] */ IUnknown **ppicd); - - HRESULT ( STDMETHODCALLTYPE *GetThreadContext )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadContext )( ICorProfilerInfo * This, /* [in] */ ThreadID threadId, /* [out] */ ContextID *pContextId); - - HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )( + + HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )( ICorProfilerInfo * This, /* [in] */ BOOL fThisThreadOnly, /* [out] */ DWORD *pdwProfilerContext); - - HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )( + + HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )( ICorProfilerInfo * This, /* [in] */ DWORD dwProfilerContext); - - HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )( + + HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )( ICorProfilerInfo * This, /* [in] */ FunctionID functionId, /* [in] */ ULONG32 cMap, /* [out] */ ULONG32 *pcMap, /* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]); - + END_INTERFACE } ICorProfilerInfoVtbl; @@ -7912,119 +8755,119 @@ EXTERN_C const IID IID_ICorProfilerInfo; CONST_VTBL struct ICorProfilerInfoVtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ICorProfilerInfo_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ICorProfilerInfo_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ICorProfilerInfo_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ICorProfilerInfo_GetClassFromObject(This,objectId,pClassId) \ - ( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) ) + ( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) ) #define ICorProfilerInfo_GetClassFromToken(This,moduleId,typeDef,pClassId) \ - ( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) ) + ( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) ) #define ICorProfilerInfo_GetCodeInfo(This,functionId,pStart,pcSize) \ - ( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) ) + ( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) ) #define ICorProfilerInfo_GetEventMask(This,pdwEvents) \ - ( (This)->lpVtbl -> GetEventMask(This,pdwEvents) ) + ( (This)->lpVtbl -> GetEventMask(This,pdwEvents) ) #define ICorProfilerInfo_GetFunctionFromIP(This,ip,pFunctionId) \ - ( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) ) + ( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) ) #define ICorProfilerInfo_GetFunctionFromToken(This,moduleId,token,pFunctionId) \ - ( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) ) + ( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) ) #define ICorProfilerInfo_GetHandleFromThread(This,threadId,phThread) \ - ( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) ) + ( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) ) #define ICorProfilerInfo_GetObjectSize(This,objectId,pcSize) \ - ( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) ) + ( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) ) #define ICorProfilerInfo_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \ - ( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) ) + ( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) ) #define ICorProfilerInfo_GetThreadInfo(This,threadId,pdwWin32ThreadId) \ - ( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) ) + ( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) ) #define ICorProfilerInfo_GetCurrentThreadID(This,pThreadId) \ - ( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) ) + ( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) ) #define ICorProfilerInfo_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \ - ( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) ) + ( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) ) #define ICorProfilerInfo_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \ - ( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) ) + ( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) ) #define ICorProfilerInfo_SetEventMask(This,dwEvents) \ - ( (This)->lpVtbl -> SetEventMask(This,dwEvents) ) + ( (This)->lpVtbl -> SetEventMask(This,dwEvents) ) #define ICorProfilerInfo_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) #define ICorProfilerInfo_SetFunctionIDMapper(This,pFunc) \ - ( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) ) + ( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) ) #define ICorProfilerInfo_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \ - ( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) ) + ( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) ) #define ICorProfilerInfo_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \ - ( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) ) + ( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) ) #define ICorProfilerInfo_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \ - ( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) ) + ( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) ) #define ICorProfilerInfo_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \ - ( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) ) + ( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) ) #define ICorProfilerInfo_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \ - ( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) ) + ( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) ) #define ICorProfilerInfo_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \ - ( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) ) + ( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) ) #define ICorProfilerInfo_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \ - ( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) ) + ( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) ) #define ICorProfilerInfo_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \ - ( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) ) + ( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) ) #define ICorProfilerInfo_SetFunctionReJIT(This,functionId) \ - ( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) ) + ( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) ) #define ICorProfilerInfo_ForceGC(This) \ - ( (This)->lpVtbl -> ForceGC(This) ) + ( (This)->lpVtbl -> ForceGC(This) ) #define ICorProfilerInfo_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \ - ( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) ) + ( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) ) #define ICorProfilerInfo_GetInprocInspectionInterface(This,ppicd) \ - ( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) ) + ( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) ) #define ICorProfilerInfo_GetInprocInspectionIThisThread(This,ppicd) \ - ( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) ) + ( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) ) #define ICorProfilerInfo_GetThreadContext(This,threadId,pContextId) \ - ( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) ) + ( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) ) #define ICorProfilerInfo_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \ - ( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) ) + ( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) ) #define ICorProfilerInfo_EndInprocDebugging(This,dwProfilerContext) \ - ( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) ) + ( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) ) #define ICorProfilerInfo_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \ - ( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) ) + ( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) ) #endif /* COBJMACROS */ @@ -8041,31 +8884,31 @@ EXTERN_C const IID IID_ICorProfilerInfo; #define __ICorProfilerInfo2_INTERFACE_DEFINED__ /* interface ICorProfilerInfo2 */ -/* [local][unique][uuid][object] */ +/* [local][unique][uuid][object] */ EXTERN_C const IID IID_ICorProfilerInfo2; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("CC0935CD-A518-487d-B0BB-A93214E65478") ICorProfilerInfo2 : public ICorProfilerInfo { public: - virtual HRESULT STDMETHODCALLTYPE DoStackSnapshot( + virtual HRESULT STDMETHODCALLTYPE DoStackSnapshot( /* [in] */ ThreadID thread, /* [in] */ StackSnapshotCallback *callback, /* [in] */ ULONG32 infoFlags, /* [in] */ void *clientData, /* [size_is][in] */ BYTE context[ ], /* [in] */ ULONG32 contextSize) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetEnterLeaveFunctionHooks2( + + virtual HRESULT STDMETHODCALLTYPE SetEnterLeaveFunctionHooks2( /* [in] */ FunctionEnter2 *pFuncEnter, /* [in] */ FunctionLeave2 *pFuncLeave, /* [in] */ FunctionTailcall2 *pFuncTailcall) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetFunctionInfo2( + + virtual HRESULT STDMETHODCALLTYPE GetFunctionInfo2( /* [in] */ FunctionID funcId, /* [in] */ COR_PRF_FRAME_INFO frameInfo, /* [out] */ ClassID *pClassId, @@ -8074,20 +8917,20 @@ EXTERN_C const IID IID_ICorProfilerInfo2; /* [in] */ ULONG32 cTypeArgs, /* [out] */ ULONG32 *pcTypeArgs, /* [out] */ ClassID typeArgs[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetStringLayout( + + virtual HRESULT STDMETHODCALLTYPE GetStringLayout( /* [out] */ ULONG *pBufferLengthOffset, /* [out] */ ULONG *pStringLengthOffset, /* [out] */ ULONG *pBufferOffset) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetClassLayout( + + virtual HRESULT STDMETHODCALLTYPE GetClassLayout( /* [in] */ ClassID classID, /* [out][in] */ COR_FIELD_OFFSET rFieldOffset[ ], /* [in] */ ULONG cFieldOffset, /* [out] */ ULONG *pcFieldOffset, /* [out] */ ULONG *pulClassSize) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetClassIDInfo2( + + virtual HRESULT STDMETHODCALLTYPE GetClassIDInfo2( /* [in] */ ClassID classId, /* [out] */ ModuleID *pModuleId, /* [out] */ mdTypeDef *pTypeDefToken, @@ -8095,298 +8938,298 @@ EXTERN_C const IID IID_ICorProfilerInfo2; /* [in] */ ULONG32 cNumTypeArgs, /* [out] */ ULONG32 *pcNumTypeArgs, /* [out] */ ClassID typeArgs[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCodeInfo2( + + virtual HRESULT STDMETHODCALLTYPE GetCodeInfo2( /* [in] */ FunctionID functionID, /* [in] */ ULONG32 cCodeInfos, /* [out] */ ULONG32 *pcCodeInfos, /* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetClassFromTokenAndTypeArgs( + + virtual HRESULT STDMETHODCALLTYPE GetClassFromTokenAndTypeArgs( /* [in] */ ModuleID moduleID, /* [in] */ mdTypeDef typeDef, /* [in] */ ULONG32 cTypeArgs, /* [size_is][in] */ ClassID typeArgs[ ], /* [out] */ ClassID *pClassID) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetFunctionFromTokenAndTypeArgs( + + virtual HRESULT STDMETHODCALLTYPE GetFunctionFromTokenAndTypeArgs( /* [in] */ ModuleID moduleID, /* [in] */ mdMethodDef funcDef, /* [in] */ ClassID classId, /* [in] */ ULONG32 cTypeArgs, /* [size_is][in] */ ClassID typeArgs[ ], /* [out] */ FunctionID *pFunctionID) = 0; - - virtual HRESULT STDMETHODCALLTYPE EnumModuleFrozenObjects( + + virtual HRESULT STDMETHODCALLTYPE EnumModuleFrozenObjects( /* [in] */ ModuleID moduleID, /* [out] */ ICorProfilerObjectEnum **ppEnum) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetArrayObjectInfo( + + virtual HRESULT STDMETHODCALLTYPE GetArrayObjectInfo( /* [in] */ ObjectID objectId, /* [in] */ ULONG32 cDimensions, /* [size_is][out] */ ULONG32 pDimensionSizes[ ], /* [size_is][out] */ int pDimensionLowerBounds[ ], /* [out] */ BYTE **ppData) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetBoxClassLayout( + + virtual HRESULT STDMETHODCALLTYPE GetBoxClassLayout( /* [in] */ ClassID classId, /* [out] */ ULONG32 *pBufferOffset) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetThreadAppDomain( + + virtual HRESULT STDMETHODCALLTYPE GetThreadAppDomain( /* [in] */ ThreadID threadId, /* [out] */ AppDomainID *pAppDomainId) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetRVAStaticAddress( + + virtual HRESULT STDMETHODCALLTYPE GetRVAStaticAddress( /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [out] */ void **ppAddress) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetAppDomainStaticAddress( + + virtual HRESULT STDMETHODCALLTYPE GetAppDomainStaticAddress( /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ AppDomainID appDomainId, /* [out] */ void **ppAddress) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetThreadStaticAddress( + + virtual HRESULT STDMETHODCALLTYPE GetThreadStaticAddress( /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ ThreadID threadId, /* [out] */ void **ppAddress) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetContextStaticAddress( + + virtual HRESULT STDMETHODCALLTYPE GetContextStaticAddress( /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ ContextID contextId, /* [out] */ void **ppAddress) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetStaticFieldInfo( + + virtual HRESULT STDMETHODCALLTYPE GetStaticFieldInfo( /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [out] */ COR_PRF_STATIC_TYPE *pFieldInfo) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetGenerationBounds( + + virtual HRESULT STDMETHODCALLTYPE GetGenerationBounds( /* [in] */ ULONG cObjectRanges, /* [out] */ ULONG *pcObjectRanges, /* [length_is][size_is][out] */ COR_PRF_GC_GENERATION_RANGE ranges[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetObjectGeneration( + + virtual HRESULT STDMETHODCALLTYPE GetObjectGeneration( /* [in] */ ObjectID objectId, /* [out] */ COR_PRF_GC_GENERATION_RANGE *range) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetNotifiedExceptionClauseInfo( + + virtual HRESULT STDMETHODCALLTYPE GetNotifiedExceptionClauseInfo( /* [out] */ COR_PRF_EX_CLAUSE_INFO *pinfo) = 0; - + }; - - + + #else /* C style interface */ typedef struct ICorProfilerInfo2Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorProfilerInfo2 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorProfilerInfo2 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorProfilerInfo2 * This); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )( ICorProfilerInfo2 * This, /* [in] */ ObjectID objectId, /* [out] */ ClassID *pClassId); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )( ICorProfilerInfo2 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdTypeDef typeDef, /* [out] */ ClassID *pClassId); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )( ICorProfilerInfo2 * This, /* [in] */ FunctionID functionId, /* [out] */ LPCBYTE *pStart, /* [out] */ ULONG *pcSize); - - HRESULT ( STDMETHODCALLTYPE *GetEventMask )( + + HRESULT ( STDMETHODCALLTYPE *GetEventMask )( ICorProfilerInfo2 * This, /* [out] */ DWORD *pdwEvents); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )( ICorProfilerInfo2 * This, /* [in] */ LPCBYTE ip, /* [out] */ FunctionID *pFunctionId); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )( ICorProfilerInfo2 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdToken token, /* [out] */ FunctionID *pFunctionId); - - HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )( + + HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )( ICorProfilerInfo2 * This, /* [in] */ ThreadID threadId, /* [out] */ HANDLE *phThread); - - HRESULT ( STDMETHODCALLTYPE *GetObjectSize )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectSize )( ICorProfilerInfo2 * This, /* [in] */ ObjectID objectId, /* [out] */ ULONG *pcSize); - - HRESULT ( STDMETHODCALLTYPE *IsArrayClass )( + + HRESULT ( STDMETHODCALLTYPE *IsArrayClass )( ICorProfilerInfo2 * This, /* [in] */ ClassID classId, /* [out] */ CorElementType *pBaseElemType, /* [out] */ ClassID *pBaseClassId, /* [out] */ ULONG *pcRank); - - HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )( ICorProfilerInfo2 * This, /* [in] */ ThreadID threadId, /* [out] */ DWORD *pdwWin32ThreadId); - - HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )( + + HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )( ICorProfilerInfo2 * This, /* [out] */ ThreadID *pThreadId); - - HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )( ICorProfilerInfo2 * This, /* [in] */ ClassID classId, /* [out] */ ModuleID *pModuleId, /* [out] */ mdTypeDef *pTypeDefToken); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )( ICorProfilerInfo2 * This, /* [in] */ FunctionID functionId, /* [out] */ ClassID *pClassId, /* [out] */ ModuleID *pModuleId, /* [out] */ mdToken *pToken); - - HRESULT ( STDMETHODCALLTYPE *SetEventMask )( + + HRESULT ( STDMETHODCALLTYPE *SetEventMask )( ICorProfilerInfo2 * This, /* [in] */ DWORD dwEvents); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )( ICorProfilerInfo2 * This, /* [in] */ FunctionEnter *pFuncEnter, /* [in] */ FunctionLeave *pFuncLeave, /* [in] */ FunctionTailcall *pFuncTailcall); - - HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )( + + HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )( ICorProfilerInfo2 * This, /* [in] */ FunctionIDMapper *pFunc); - - HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )( + + HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )( ICorProfilerInfo2 * This, /* [in] */ FunctionID functionId, /* [in] */ REFIID riid, /* [out] */ IUnknown **ppImport, /* [out] */ mdToken *pToken); - - HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )( ICorProfilerInfo2 * This, /* [in] */ ModuleID moduleId, /* [out] */ LPCBYTE *ppBaseLoadAddress, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AssemblyID *pAssemblyId); - - HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )( ICorProfilerInfo2 * This, /* [in] */ ModuleID moduleId, /* [in] */ DWORD dwOpenFlags, /* [in] */ REFIID riid, /* [out] */ IUnknown **ppOut); - - HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )( + + HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )( ICorProfilerInfo2 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodId, /* [out] */ LPCBYTE *ppMethodHeader, /* [out] */ ULONG *pcbMethodSize); - - HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )( + + HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )( ICorProfilerInfo2 * This, /* [in] */ ModuleID moduleId, /* [out] */ IMethodMalloc **ppMalloc); - - HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )( + + HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )( ICorProfilerInfo2 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodid, /* [in] */ LPCBYTE pbNewILMethodHeader); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )( ICorProfilerInfo2 * This, /* [in] */ AppDomainID appDomainId, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ ProcessID *pProcessId); - - HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )( ICorProfilerInfo2 * This, /* [in] */ AssemblyID assemblyId, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AppDomainID *pAppDomainId, /* [out] */ ModuleID *pModuleId); - - HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )( + + HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )( ICorProfilerInfo2 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ForceGC )( + + HRESULT ( STDMETHODCALLTYPE *ForceGC )( ICorProfilerInfo2 * This); - - HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )( + + HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )( ICorProfilerInfo2 * This, /* [in] */ FunctionID functionId, /* [in] */ BOOL fStartJit, /* [in] */ ULONG cILMapEntries, /* [size_is][in] */ COR_IL_MAP rgILMapEntries[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )( + + HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )( ICorProfilerInfo2 * This, /* [out] */ IUnknown **ppicd); - - HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )( + + HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )( ICorProfilerInfo2 * This, /* [out] */ IUnknown **ppicd); - - HRESULT ( STDMETHODCALLTYPE *GetThreadContext )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadContext )( ICorProfilerInfo2 * This, /* [in] */ ThreadID threadId, /* [out] */ ContextID *pContextId); - - HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )( + + HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )( ICorProfilerInfo2 * This, /* [in] */ BOOL fThisThreadOnly, /* [out] */ DWORD *pdwProfilerContext); - - HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )( + + HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )( ICorProfilerInfo2 * This, /* [in] */ DWORD dwProfilerContext); - - HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )( + + HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )( ICorProfilerInfo2 * This, /* [in] */ FunctionID functionId, /* [in] */ ULONG32 cMap, /* [out] */ ULONG32 *pcMap, /* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]); - - HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )( + + HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )( ICorProfilerInfo2 * This, /* [in] */ ThreadID thread, /* [in] */ StackSnapshotCallback *callback, @@ -8394,14 +9237,14 @@ EXTERN_C const IID IID_ICorProfilerInfo2; /* [in] */ void *clientData, /* [size_is][in] */ BYTE context[ ], /* [in] */ ULONG32 contextSize); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )( ICorProfilerInfo2 * This, /* [in] */ FunctionEnter2 *pFuncEnter, /* [in] */ FunctionLeave2 *pFuncLeave, /* [in] */ FunctionTailcall2 *pFuncTailcall); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )( ICorProfilerInfo2 * This, /* [in] */ FunctionID funcId, /* [in] */ COR_PRF_FRAME_INFO frameInfo, @@ -8411,22 +9254,22 @@ EXTERN_C const IID IID_ICorProfilerInfo2; /* [in] */ ULONG32 cTypeArgs, /* [out] */ ULONG32 *pcTypeArgs, /* [out] */ ClassID typeArgs[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetStringLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetStringLayout )( ICorProfilerInfo2 * This, /* [out] */ ULONG *pBufferLengthOffset, /* [out] */ ULONG *pStringLengthOffset, /* [out] */ ULONG *pBufferOffset); - - HRESULT ( STDMETHODCALLTYPE *GetClassLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetClassLayout )( ICorProfilerInfo2 * This, /* [in] */ ClassID classID, /* [out][in] */ COR_FIELD_OFFSET rFieldOffset[ ], /* [in] */ ULONG cFieldOffset, /* [out] */ ULONG *pcFieldOffset, /* [out] */ ULONG *pulClassSize); - - HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )( ICorProfilerInfo2 * This, /* [in] */ ClassID classId, /* [out] */ ModuleID *pModuleId, @@ -8435,23 +9278,23 @@ EXTERN_C const IID IID_ICorProfilerInfo2; /* [in] */ ULONG32 cNumTypeArgs, /* [out] */ ULONG32 *pcNumTypeArgs, /* [out] */ ClassID typeArgs[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )( ICorProfilerInfo2 * This, /* [in] */ FunctionID functionID, /* [in] */ ULONG32 cCodeInfos, /* [out] */ ULONG32 *pcCodeInfos, /* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )( ICorProfilerInfo2 * This, /* [in] */ ModuleID moduleID, /* [in] */ mdTypeDef typeDef, /* [in] */ ULONG32 cTypeArgs, /* [size_is][in] */ ClassID typeArgs[ ], /* [out] */ ClassID *pClassID); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )( ICorProfilerInfo2 * This, /* [in] */ ModuleID moduleID, /* [in] */ mdMethodDef funcDef, @@ -8459,78 +9302,78 @@ EXTERN_C const IID IID_ICorProfilerInfo2; /* [in] */ ULONG32 cTypeArgs, /* [size_is][in] */ ClassID typeArgs[ ], /* [out] */ FunctionID *pFunctionID); - - HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )( + + HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )( ICorProfilerInfo2 * This, /* [in] */ ModuleID moduleID, /* [out] */ ICorProfilerObjectEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )( ICorProfilerInfo2 * This, /* [in] */ ObjectID objectId, /* [in] */ ULONG32 cDimensions, /* [size_is][out] */ ULONG32 pDimensionSizes[ ], /* [size_is][out] */ int pDimensionLowerBounds[ ], /* [out] */ BYTE **ppData); - - HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )( ICorProfilerInfo2 * This, /* [in] */ ClassID classId, /* [out] */ ULONG32 *pBufferOffset); - - HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )( ICorProfilerInfo2 * This, /* [in] */ ThreadID threadId, /* [out] */ AppDomainID *pAppDomainId); - - HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )( ICorProfilerInfo2 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )( ICorProfilerInfo2 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ AppDomainID appDomainId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )( ICorProfilerInfo2 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ ThreadID threadId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )( ICorProfilerInfo2 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ ContextID contextId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )( ICorProfilerInfo2 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [out] */ COR_PRF_STATIC_TYPE *pFieldInfo); - - HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )( + + HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )( ICorProfilerInfo2 * This, /* [in] */ ULONG cObjectRanges, /* [out] */ ULONG *pcObjectRanges, /* [length_is][size_is][out] */ COR_PRF_GC_GENERATION_RANGE ranges[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )( ICorProfilerInfo2 * This, /* [in] */ ObjectID objectId, /* [out] */ COR_PRF_GC_GENERATION_RANGE *range); - - HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )( ICorProfilerInfo2 * This, /* [out] */ COR_PRF_EX_CLAUSE_INFO *pinfo); - + END_INTERFACE } ICorProfilerInfo2Vtbl; @@ -8539,183 +9382,183 @@ EXTERN_C const IID IID_ICorProfilerInfo2; CONST_VTBL struct ICorProfilerInfo2Vtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ICorProfilerInfo2_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ICorProfilerInfo2_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ICorProfilerInfo2_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ICorProfilerInfo2_GetClassFromObject(This,objectId,pClassId) \ - ( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) ) + ( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) ) #define ICorProfilerInfo2_GetClassFromToken(This,moduleId,typeDef,pClassId) \ - ( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) ) + ( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) ) #define ICorProfilerInfo2_GetCodeInfo(This,functionId,pStart,pcSize) \ - ( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) ) + ( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) ) #define ICorProfilerInfo2_GetEventMask(This,pdwEvents) \ - ( (This)->lpVtbl -> GetEventMask(This,pdwEvents) ) + ( (This)->lpVtbl -> GetEventMask(This,pdwEvents) ) #define ICorProfilerInfo2_GetFunctionFromIP(This,ip,pFunctionId) \ - ( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) ) + ( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) ) #define ICorProfilerInfo2_GetFunctionFromToken(This,moduleId,token,pFunctionId) \ - ( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) ) + ( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) ) #define ICorProfilerInfo2_GetHandleFromThread(This,threadId,phThread) \ - ( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) ) + ( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) ) #define ICorProfilerInfo2_GetObjectSize(This,objectId,pcSize) \ - ( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) ) + ( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) ) #define ICorProfilerInfo2_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \ - ( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) ) + ( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) ) #define ICorProfilerInfo2_GetThreadInfo(This,threadId,pdwWin32ThreadId) \ - ( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) ) + ( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) ) #define ICorProfilerInfo2_GetCurrentThreadID(This,pThreadId) \ - ( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) ) + ( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) ) #define ICorProfilerInfo2_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \ - ( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) ) + ( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) ) #define ICorProfilerInfo2_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \ - ( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) ) + ( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) ) #define ICorProfilerInfo2_SetEventMask(This,dwEvents) \ - ( (This)->lpVtbl -> SetEventMask(This,dwEvents) ) + ( (This)->lpVtbl -> SetEventMask(This,dwEvents) ) #define ICorProfilerInfo2_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) #define ICorProfilerInfo2_SetFunctionIDMapper(This,pFunc) \ - ( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) ) + ( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) ) #define ICorProfilerInfo2_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \ - ( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) ) + ( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) ) #define ICorProfilerInfo2_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \ - ( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) ) + ( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) ) #define ICorProfilerInfo2_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \ - ( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) ) + ( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) ) #define ICorProfilerInfo2_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \ - ( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) ) + ( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) ) #define ICorProfilerInfo2_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \ - ( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) ) + ( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) ) #define ICorProfilerInfo2_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \ - ( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) ) + ( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) ) #define ICorProfilerInfo2_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \ - ( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) ) + ( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) ) #define ICorProfilerInfo2_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \ - ( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) ) + ( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) ) #define ICorProfilerInfo2_SetFunctionReJIT(This,functionId) \ - ( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) ) + ( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) ) #define ICorProfilerInfo2_ForceGC(This) \ - ( (This)->lpVtbl -> ForceGC(This) ) + ( (This)->lpVtbl -> ForceGC(This) ) #define ICorProfilerInfo2_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \ - ( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) ) + ( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) ) #define ICorProfilerInfo2_GetInprocInspectionInterface(This,ppicd) \ - ( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) ) + ( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) ) #define ICorProfilerInfo2_GetInprocInspectionIThisThread(This,ppicd) \ - ( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) ) + ( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) ) #define ICorProfilerInfo2_GetThreadContext(This,threadId,pContextId) \ - ( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) ) + ( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) ) #define ICorProfilerInfo2_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \ - ( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) ) + ( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) ) #define ICorProfilerInfo2_EndInprocDebugging(This,dwProfilerContext) \ - ( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) ) + ( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) ) #define ICorProfilerInfo2_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \ - ( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) ) + ( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) ) #define ICorProfilerInfo2_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \ - ( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) ) + ( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) ) #define ICorProfilerInfo2_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) #define ICorProfilerInfo2_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \ - ( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) ) + ( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) ) #define ICorProfilerInfo2_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \ - ( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) ) + ( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) ) #define ICorProfilerInfo2_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \ - ( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) ) + ( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) ) #define ICorProfilerInfo2_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \ - ( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) ) + ( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) ) #define ICorProfilerInfo2_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \ - ( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) ) + ( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) ) #define ICorProfilerInfo2_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \ - ( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) ) + ( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) ) #define ICorProfilerInfo2_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \ - ( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) ) + ( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) ) #define ICorProfilerInfo2_EnumModuleFrozenObjects(This,moduleID,ppEnum) \ - ( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) ) + ( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) ) #define ICorProfilerInfo2_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \ - ( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) ) + ( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) ) #define ICorProfilerInfo2_GetBoxClassLayout(This,classId,pBufferOffset) \ - ( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) ) + ( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) ) #define ICorProfilerInfo2_GetThreadAppDomain(This,threadId,pAppDomainId) \ - ( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) ) + ( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) ) #define ICorProfilerInfo2_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \ - ( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) ) + ( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) ) #define ICorProfilerInfo2_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \ - ( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) ) + ( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) ) #define ICorProfilerInfo2_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \ - ( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) ) + ( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) ) #define ICorProfilerInfo2_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \ - ( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) ) + ( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) ) #define ICorProfilerInfo2_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \ - ( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) ) + ( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) ) #define ICorProfilerInfo2_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \ - ( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) ) + ( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) ) #define ICorProfilerInfo2_GetObjectGeneration(This,objectId,range) \ - ( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) ) + ( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) ) #define ICorProfilerInfo2_GetNotifiedExceptionClauseInfo(This,pinfo) \ - ( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) ) + ( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) ) #endif /* COBJMACROS */ @@ -8732,63 +9575,63 @@ EXTERN_C const IID IID_ICorProfilerInfo2; #define __ICorProfilerInfo3_INTERFACE_DEFINED__ /* interface ICorProfilerInfo3 */ -/* [local][unique][uuid][object] */ +/* [local][unique][uuid][object] */ EXTERN_C const IID IID_ICorProfilerInfo3; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("B555ED4F-452A-4E54-8B39-B5360BAD32A0") ICorProfilerInfo3 : public ICorProfilerInfo2 { public: - virtual HRESULT STDMETHODCALLTYPE EnumJITedFunctions( + virtual HRESULT STDMETHODCALLTYPE EnumJITedFunctions( /* [out] */ ICorProfilerFunctionEnum **ppEnum) = 0; - - virtual HRESULT STDMETHODCALLTYPE RequestProfilerDetach( + + virtual HRESULT STDMETHODCALLTYPE RequestProfilerDetach( /* [in] */ DWORD dwExpectedCompletionMilliseconds) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetFunctionIDMapper2( + + virtual HRESULT STDMETHODCALLTYPE SetFunctionIDMapper2( /* [in] */ FunctionIDMapper2 *pFunc, /* [in] */ void *clientData) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetStringLayout2( + + virtual HRESULT STDMETHODCALLTYPE GetStringLayout2( /* [out] */ ULONG *pStringLengthOffset, /* [out] */ ULONG *pBufferOffset) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetEnterLeaveFunctionHooks3( + + virtual HRESULT STDMETHODCALLTYPE SetEnterLeaveFunctionHooks3( /* [in] */ FunctionEnter3 *pFuncEnter3, /* [in] */ FunctionLeave3 *pFuncLeave3, /* [in] */ FunctionTailcall3 *pFuncTailcall3) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetEnterLeaveFunctionHooks3WithInfo( + + virtual HRESULT STDMETHODCALLTYPE SetEnterLeaveFunctionHooks3WithInfo( /* [in] */ FunctionEnter3WithInfo *pFuncEnter3WithInfo, /* [in] */ FunctionLeave3WithInfo *pFuncLeave3WithInfo, /* [in] */ FunctionTailcall3WithInfo *pFuncTailcall3WithInfo) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetFunctionEnter3Info( + + virtual HRESULT STDMETHODCALLTYPE GetFunctionEnter3Info( /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_ELT_INFO eltInfo, /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo, /* [out][in] */ ULONG *pcbArgumentInfo, /* [size_is][out] */ COR_PRF_FUNCTION_ARGUMENT_INFO *pArgumentInfo) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetFunctionLeave3Info( + + virtual HRESULT STDMETHODCALLTYPE GetFunctionLeave3Info( /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_ELT_INFO eltInfo, /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo, /* [out] */ COR_PRF_FUNCTION_ARGUMENT_RANGE *pRetvalRange) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetFunctionTailcall3Info( + + virtual HRESULT STDMETHODCALLTYPE GetFunctionTailcall3Info( /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_ELT_INFO eltInfo, /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo) = 0; - - virtual HRESULT STDMETHODCALLTYPE EnumModules( + + virtual HRESULT STDMETHODCALLTYPE EnumModules( /* [out] */ ICorProfilerModuleEnum **ppEnum) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetRuntimeInformation( + + virtual HRESULT STDMETHODCALLTYPE GetRuntimeInformation( /* [out] */ USHORT *pClrInstanceId, /* [out] */ COR_PRF_RUNTIME_TYPE *pRuntimeType, /* [out] */ USHORT *pMajorVersion, @@ -8797,243 +9640,243 @@ EXTERN_C const IID IID_ICorProfilerInfo3; /* [out] */ USHORT *pQFEVersion, /* [in] */ ULONG cchVersionString, /* [out] */ ULONG *pcchVersionString, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchVersionString, *pcchVersionString) WCHAR szVersionString[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetThreadStaticAddress2( + + virtual HRESULT STDMETHODCALLTYPE GetThreadStaticAddress2( /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ AppDomainID appDomainId, /* [in] */ ThreadID threadId, /* [out] */ void **ppAddress) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetAppDomainsContainingModule( + + virtual HRESULT STDMETHODCALLTYPE GetAppDomainsContainingModule( /* [in] */ ModuleID moduleId, /* [in] */ ULONG32 cAppDomainIds, /* [out] */ ULONG32 *pcAppDomainIds, /* [length_is][size_is][out] */ AppDomainID appDomainIds[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetModuleInfo2( + + virtual HRESULT STDMETHODCALLTYPE GetModuleInfo2( /* [in] */ ModuleID moduleId, /* [out] */ LPCBYTE *ppBaseLoadAddress, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AssemblyID *pAssemblyId, /* [out] */ DWORD *pdwModuleFlags) = 0; - + }; - - + + #else /* C style interface */ typedef struct ICorProfilerInfo3Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorProfilerInfo3 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorProfilerInfo3 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorProfilerInfo3 * This); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )( ICorProfilerInfo3 * This, /* [in] */ ObjectID objectId, /* [out] */ ClassID *pClassId); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )( ICorProfilerInfo3 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdTypeDef typeDef, /* [out] */ ClassID *pClassId); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )( ICorProfilerInfo3 * This, /* [in] */ FunctionID functionId, /* [out] */ LPCBYTE *pStart, /* [out] */ ULONG *pcSize); - - HRESULT ( STDMETHODCALLTYPE *GetEventMask )( + + HRESULT ( STDMETHODCALLTYPE *GetEventMask )( ICorProfilerInfo3 * This, /* [out] */ DWORD *pdwEvents); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )( ICorProfilerInfo3 * This, /* [in] */ LPCBYTE ip, /* [out] */ FunctionID *pFunctionId); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )( ICorProfilerInfo3 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdToken token, /* [out] */ FunctionID *pFunctionId); - - HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )( + + HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )( ICorProfilerInfo3 * This, /* [in] */ ThreadID threadId, /* [out] */ HANDLE *phThread); - - HRESULT ( STDMETHODCALLTYPE *GetObjectSize )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectSize )( ICorProfilerInfo3 * This, /* [in] */ ObjectID objectId, /* [out] */ ULONG *pcSize); - - HRESULT ( STDMETHODCALLTYPE *IsArrayClass )( + + HRESULT ( STDMETHODCALLTYPE *IsArrayClass )( ICorProfilerInfo3 * This, /* [in] */ ClassID classId, /* [out] */ CorElementType *pBaseElemType, /* [out] */ ClassID *pBaseClassId, /* [out] */ ULONG *pcRank); - - HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )( ICorProfilerInfo3 * This, /* [in] */ ThreadID threadId, /* [out] */ DWORD *pdwWin32ThreadId); - - HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )( + + HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )( ICorProfilerInfo3 * This, /* [out] */ ThreadID *pThreadId); - - HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )( ICorProfilerInfo3 * This, /* [in] */ ClassID classId, /* [out] */ ModuleID *pModuleId, /* [out] */ mdTypeDef *pTypeDefToken); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )( ICorProfilerInfo3 * This, /* [in] */ FunctionID functionId, /* [out] */ ClassID *pClassId, /* [out] */ ModuleID *pModuleId, /* [out] */ mdToken *pToken); - - HRESULT ( STDMETHODCALLTYPE *SetEventMask )( + + HRESULT ( STDMETHODCALLTYPE *SetEventMask )( ICorProfilerInfo3 * This, /* [in] */ DWORD dwEvents); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )( ICorProfilerInfo3 * This, /* [in] */ FunctionEnter *pFuncEnter, /* [in] */ FunctionLeave *pFuncLeave, /* [in] */ FunctionTailcall *pFuncTailcall); - - HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )( + + HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )( ICorProfilerInfo3 * This, /* [in] */ FunctionIDMapper *pFunc); - - HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )( + + HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )( ICorProfilerInfo3 * This, /* [in] */ FunctionID functionId, /* [in] */ REFIID riid, /* [out] */ IUnknown **ppImport, /* [out] */ mdToken *pToken); - - HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )( ICorProfilerInfo3 * This, /* [in] */ ModuleID moduleId, /* [out] */ LPCBYTE *ppBaseLoadAddress, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AssemblyID *pAssemblyId); - - HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )( ICorProfilerInfo3 * This, /* [in] */ ModuleID moduleId, /* [in] */ DWORD dwOpenFlags, /* [in] */ REFIID riid, /* [out] */ IUnknown **ppOut); - - HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )( + + HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )( ICorProfilerInfo3 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodId, /* [out] */ LPCBYTE *ppMethodHeader, /* [out] */ ULONG *pcbMethodSize); - - HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )( + + HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )( ICorProfilerInfo3 * This, /* [in] */ ModuleID moduleId, /* [out] */ IMethodMalloc **ppMalloc); - - HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )( + + HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )( ICorProfilerInfo3 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodid, /* [in] */ LPCBYTE pbNewILMethodHeader); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )( ICorProfilerInfo3 * This, /* [in] */ AppDomainID appDomainId, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ ProcessID *pProcessId); - - HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )( ICorProfilerInfo3 * This, /* [in] */ AssemblyID assemblyId, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AppDomainID *pAppDomainId, /* [out] */ ModuleID *pModuleId); - - HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )( + + HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )( ICorProfilerInfo3 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ForceGC )( + + HRESULT ( STDMETHODCALLTYPE *ForceGC )( ICorProfilerInfo3 * This); - - HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )( + + HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )( ICorProfilerInfo3 * This, /* [in] */ FunctionID functionId, /* [in] */ BOOL fStartJit, /* [in] */ ULONG cILMapEntries, /* [size_is][in] */ COR_IL_MAP rgILMapEntries[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )( + + HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )( ICorProfilerInfo3 * This, /* [out] */ IUnknown **ppicd); - - HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )( + + HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )( ICorProfilerInfo3 * This, /* [out] */ IUnknown **ppicd); - - HRESULT ( STDMETHODCALLTYPE *GetThreadContext )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadContext )( ICorProfilerInfo3 * This, /* [in] */ ThreadID threadId, /* [out] */ ContextID *pContextId); - - HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )( + + HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )( ICorProfilerInfo3 * This, /* [in] */ BOOL fThisThreadOnly, /* [out] */ DWORD *pdwProfilerContext); - - HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )( + + HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )( ICorProfilerInfo3 * This, /* [in] */ DWORD dwProfilerContext); - - HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )( + + HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )( ICorProfilerInfo3 * This, /* [in] */ FunctionID functionId, /* [in] */ ULONG32 cMap, /* [out] */ ULONG32 *pcMap, /* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]); - - HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )( + + HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )( ICorProfilerInfo3 * This, /* [in] */ ThreadID thread, /* [in] */ StackSnapshotCallback *callback, @@ -9041,14 +9884,14 @@ EXTERN_C const IID IID_ICorProfilerInfo3; /* [in] */ void *clientData, /* [size_is][in] */ BYTE context[ ], /* [in] */ ULONG32 contextSize); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )( ICorProfilerInfo3 * This, /* [in] */ FunctionEnter2 *pFuncEnter, /* [in] */ FunctionLeave2 *pFuncLeave, /* [in] */ FunctionTailcall2 *pFuncTailcall); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )( ICorProfilerInfo3 * This, /* [in] */ FunctionID funcId, /* [in] */ COR_PRF_FRAME_INFO frameInfo, @@ -9058,22 +9901,22 @@ EXTERN_C const IID IID_ICorProfilerInfo3; /* [in] */ ULONG32 cTypeArgs, /* [out] */ ULONG32 *pcTypeArgs, /* [out] */ ClassID typeArgs[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetStringLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetStringLayout )( ICorProfilerInfo3 * This, /* [out] */ ULONG *pBufferLengthOffset, /* [out] */ ULONG *pStringLengthOffset, /* [out] */ ULONG *pBufferOffset); - - HRESULT ( STDMETHODCALLTYPE *GetClassLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetClassLayout )( ICorProfilerInfo3 * This, /* [in] */ ClassID classID, /* [out][in] */ COR_FIELD_OFFSET rFieldOffset[ ], /* [in] */ ULONG cFieldOffset, /* [out] */ ULONG *pcFieldOffset, /* [out] */ ULONG *pulClassSize); - - HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )( ICorProfilerInfo3 * This, /* [in] */ ClassID classId, /* [out] */ ModuleID *pModuleId, @@ -9082,23 +9925,23 @@ EXTERN_C const IID IID_ICorProfilerInfo3; /* [in] */ ULONG32 cNumTypeArgs, /* [out] */ ULONG32 *pcNumTypeArgs, /* [out] */ ClassID typeArgs[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )( ICorProfilerInfo3 * This, /* [in] */ FunctionID functionID, /* [in] */ ULONG32 cCodeInfos, /* [out] */ ULONG32 *pcCodeInfos, /* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )( ICorProfilerInfo3 * This, /* [in] */ ModuleID moduleID, /* [in] */ mdTypeDef typeDef, /* [in] */ ULONG32 cTypeArgs, /* [size_is][in] */ ClassID typeArgs[ ], /* [out] */ ClassID *pClassID); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )( ICorProfilerInfo3 * This, /* [in] */ ModuleID moduleID, /* [in] */ mdMethodDef funcDef, @@ -9106,134 +9949,134 @@ EXTERN_C const IID IID_ICorProfilerInfo3; /* [in] */ ULONG32 cTypeArgs, /* [size_is][in] */ ClassID typeArgs[ ], /* [out] */ FunctionID *pFunctionID); - - HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )( + + HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )( ICorProfilerInfo3 * This, /* [in] */ ModuleID moduleID, /* [out] */ ICorProfilerObjectEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )( ICorProfilerInfo3 * This, /* [in] */ ObjectID objectId, /* [in] */ ULONG32 cDimensions, /* [size_is][out] */ ULONG32 pDimensionSizes[ ], /* [size_is][out] */ int pDimensionLowerBounds[ ], /* [out] */ BYTE **ppData); - - HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )( ICorProfilerInfo3 * This, /* [in] */ ClassID classId, /* [out] */ ULONG32 *pBufferOffset); - - HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )( ICorProfilerInfo3 * This, /* [in] */ ThreadID threadId, /* [out] */ AppDomainID *pAppDomainId); - - HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )( ICorProfilerInfo3 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )( ICorProfilerInfo3 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ AppDomainID appDomainId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )( ICorProfilerInfo3 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ ThreadID threadId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )( ICorProfilerInfo3 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ ContextID contextId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )( ICorProfilerInfo3 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [out] */ COR_PRF_STATIC_TYPE *pFieldInfo); - - HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )( + + HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )( ICorProfilerInfo3 * This, /* [in] */ ULONG cObjectRanges, /* [out] */ ULONG *pcObjectRanges, /* [length_is][size_is][out] */ COR_PRF_GC_GENERATION_RANGE ranges[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )( ICorProfilerInfo3 * This, /* [in] */ ObjectID objectId, /* [out] */ COR_PRF_GC_GENERATION_RANGE *range); - - HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )( ICorProfilerInfo3 * This, /* [out] */ COR_PRF_EX_CLAUSE_INFO *pinfo); - - HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions )( + + HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions )( ICorProfilerInfo3 * This, /* [out] */ ICorProfilerFunctionEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *RequestProfilerDetach )( + + HRESULT ( STDMETHODCALLTYPE *RequestProfilerDetach )( ICorProfilerInfo3 * This, /* [in] */ DWORD dwExpectedCompletionMilliseconds); - - HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper2 )( + + HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper2 )( ICorProfilerInfo3 * This, /* [in] */ FunctionIDMapper2 *pFunc, /* [in] */ void *clientData); - - HRESULT ( STDMETHODCALLTYPE *GetStringLayout2 )( + + HRESULT ( STDMETHODCALLTYPE *GetStringLayout2 )( ICorProfilerInfo3 * This, /* [out] */ ULONG *pStringLengthOffset, /* [out] */ ULONG *pBufferOffset); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3 )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3 )( ICorProfilerInfo3 * This, /* [in] */ FunctionEnter3 *pFuncEnter3, /* [in] */ FunctionLeave3 *pFuncLeave3, /* [in] */ FunctionTailcall3 *pFuncTailcall3); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3WithInfo )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3WithInfo )( ICorProfilerInfo3 * This, /* [in] */ FunctionEnter3WithInfo *pFuncEnter3WithInfo, /* [in] */ FunctionLeave3WithInfo *pFuncLeave3WithInfo, /* [in] */ FunctionTailcall3WithInfo *pFuncTailcall3WithInfo); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionEnter3Info )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionEnter3Info )( ICorProfilerInfo3 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_ELT_INFO eltInfo, /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo, /* [out][in] */ ULONG *pcbArgumentInfo, /* [size_is][out] */ COR_PRF_FUNCTION_ARGUMENT_INFO *pArgumentInfo); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionLeave3Info )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionLeave3Info )( ICorProfilerInfo3 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_ELT_INFO eltInfo, /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo, /* [out] */ COR_PRF_FUNCTION_ARGUMENT_RANGE *pRetvalRange); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionTailcall3Info )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionTailcall3Info )( ICorProfilerInfo3 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_ELT_INFO eltInfo, /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo); - - HRESULT ( STDMETHODCALLTYPE *EnumModules )( + + HRESULT ( STDMETHODCALLTYPE *EnumModules )( ICorProfilerInfo3 * This, /* [out] */ ICorProfilerModuleEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetRuntimeInformation )( + + HRESULT ( STDMETHODCALLTYPE *GetRuntimeInformation )( ICorProfilerInfo3 * This, /* [out] */ USHORT *pClrInstanceId, /* [out] */ COR_PRF_RUNTIME_TYPE *pRuntimeType, @@ -9243,35 +10086,35 @@ EXTERN_C const IID IID_ICorProfilerInfo3; /* [out] */ USHORT *pQFEVersion, /* [in] */ ULONG cchVersionString, /* [out] */ ULONG *pcchVersionString, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchVersionString, *pcchVersionString) WCHAR szVersionString[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress2 )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress2 )( ICorProfilerInfo3 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ AppDomainID appDomainId, /* [in] */ ThreadID threadId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainsContainingModule )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainsContainingModule )( ICorProfilerInfo3 * This, /* [in] */ ModuleID moduleId, /* [in] */ ULONG32 cAppDomainIds, /* [out] */ ULONG32 *pcAppDomainIds, /* [length_is][size_is][out] */ AppDomainID appDomainIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetModuleInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleInfo2 )( ICorProfilerInfo3 * This, /* [in] */ ModuleID moduleId, /* [out] */ LPCBYTE *ppBaseLoadAddress, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AssemblyID *pAssemblyId, /* [out] */ DWORD *pdwModuleFlags); - + END_INTERFACE } ICorProfilerInfo3Vtbl; @@ -9280,226 +10123,226 @@ EXTERN_C const IID IID_ICorProfilerInfo3; CONST_VTBL struct ICorProfilerInfo3Vtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ICorProfilerInfo3_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ICorProfilerInfo3_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ICorProfilerInfo3_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ICorProfilerInfo3_GetClassFromObject(This,objectId,pClassId) \ - ( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) ) + ( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) ) #define ICorProfilerInfo3_GetClassFromToken(This,moduleId,typeDef,pClassId) \ - ( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) ) + ( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) ) #define ICorProfilerInfo3_GetCodeInfo(This,functionId,pStart,pcSize) \ - ( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) ) + ( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) ) #define ICorProfilerInfo3_GetEventMask(This,pdwEvents) \ - ( (This)->lpVtbl -> GetEventMask(This,pdwEvents) ) + ( (This)->lpVtbl -> GetEventMask(This,pdwEvents) ) #define ICorProfilerInfo3_GetFunctionFromIP(This,ip,pFunctionId) \ - ( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) ) + ( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) ) #define ICorProfilerInfo3_GetFunctionFromToken(This,moduleId,token,pFunctionId) \ - ( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) ) + ( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) ) #define ICorProfilerInfo3_GetHandleFromThread(This,threadId,phThread) \ - ( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) ) + ( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) ) #define ICorProfilerInfo3_GetObjectSize(This,objectId,pcSize) \ - ( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) ) + ( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) ) #define ICorProfilerInfo3_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \ - ( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) ) + ( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) ) #define ICorProfilerInfo3_GetThreadInfo(This,threadId,pdwWin32ThreadId) \ - ( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) ) + ( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) ) #define ICorProfilerInfo3_GetCurrentThreadID(This,pThreadId) \ - ( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) ) + ( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) ) #define ICorProfilerInfo3_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \ - ( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) ) + ( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) ) #define ICorProfilerInfo3_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \ - ( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) ) + ( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) ) #define ICorProfilerInfo3_SetEventMask(This,dwEvents) \ - ( (This)->lpVtbl -> SetEventMask(This,dwEvents) ) + ( (This)->lpVtbl -> SetEventMask(This,dwEvents) ) #define ICorProfilerInfo3_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) #define ICorProfilerInfo3_SetFunctionIDMapper(This,pFunc) \ - ( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) ) + ( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) ) #define ICorProfilerInfo3_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \ - ( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) ) + ( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) ) #define ICorProfilerInfo3_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \ - ( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) ) + ( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) ) #define ICorProfilerInfo3_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \ - ( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) ) + ( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) ) #define ICorProfilerInfo3_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \ - ( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) ) + ( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) ) #define ICorProfilerInfo3_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \ - ( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) ) + ( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) ) #define ICorProfilerInfo3_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \ - ( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) ) + ( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) ) #define ICorProfilerInfo3_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \ - ( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) ) + ( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) ) #define ICorProfilerInfo3_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \ - ( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) ) + ( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) ) #define ICorProfilerInfo3_SetFunctionReJIT(This,functionId) \ - ( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) ) + ( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) ) #define ICorProfilerInfo3_ForceGC(This) \ - ( (This)->lpVtbl -> ForceGC(This) ) + ( (This)->lpVtbl -> ForceGC(This) ) #define ICorProfilerInfo3_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \ - ( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) ) + ( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) ) #define ICorProfilerInfo3_GetInprocInspectionInterface(This,ppicd) \ - ( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) ) + ( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) ) #define ICorProfilerInfo3_GetInprocInspectionIThisThread(This,ppicd) \ - ( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) ) + ( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) ) #define ICorProfilerInfo3_GetThreadContext(This,threadId,pContextId) \ - ( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) ) + ( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) ) #define ICorProfilerInfo3_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \ - ( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) ) + ( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) ) #define ICorProfilerInfo3_EndInprocDebugging(This,dwProfilerContext) \ - ( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) ) + ( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) ) #define ICorProfilerInfo3_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \ - ( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) ) + ( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) ) #define ICorProfilerInfo3_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \ - ( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) ) + ( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) ) #define ICorProfilerInfo3_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) #define ICorProfilerInfo3_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \ - ( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) ) + ( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) ) #define ICorProfilerInfo3_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \ - ( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) ) + ( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) ) #define ICorProfilerInfo3_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \ - ( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) ) + ( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) ) #define ICorProfilerInfo3_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \ - ( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) ) + ( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) ) #define ICorProfilerInfo3_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \ - ( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) ) + ( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) ) #define ICorProfilerInfo3_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \ - ( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) ) + ( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) ) #define ICorProfilerInfo3_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \ - ( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) ) + ( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) ) #define ICorProfilerInfo3_EnumModuleFrozenObjects(This,moduleID,ppEnum) \ - ( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) ) + ( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) ) #define ICorProfilerInfo3_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \ - ( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) ) + ( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) ) #define ICorProfilerInfo3_GetBoxClassLayout(This,classId,pBufferOffset) \ - ( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) ) + ( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) ) #define ICorProfilerInfo3_GetThreadAppDomain(This,threadId,pAppDomainId) \ - ( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) ) + ( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) ) #define ICorProfilerInfo3_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \ - ( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) ) + ( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) ) #define ICorProfilerInfo3_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \ - ( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) ) + ( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) ) #define ICorProfilerInfo3_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \ - ( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) ) + ( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) ) #define ICorProfilerInfo3_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \ - ( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) ) + ( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) ) #define ICorProfilerInfo3_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \ - ( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) ) + ( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) ) #define ICorProfilerInfo3_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \ - ( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) ) + ( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) ) #define ICorProfilerInfo3_GetObjectGeneration(This,objectId,range) \ - ( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) ) + ( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) ) #define ICorProfilerInfo3_GetNotifiedExceptionClauseInfo(This,pinfo) \ - ( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) ) + ( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) ) #define ICorProfilerInfo3_EnumJITedFunctions(This,ppEnum) \ - ( (This)->lpVtbl -> EnumJITedFunctions(This,ppEnum) ) + ( (This)->lpVtbl -> EnumJITedFunctions(This,ppEnum) ) #define ICorProfilerInfo3_RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) \ - ( (This)->lpVtbl -> RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) ) + ( (This)->lpVtbl -> RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) ) #define ICorProfilerInfo3_SetFunctionIDMapper2(This,pFunc,clientData) \ - ( (This)->lpVtbl -> SetFunctionIDMapper2(This,pFunc,clientData) ) + ( (This)->lpVtbl -> SetFunctionIDMapper2(This,pFunc,clientData) ) #define ICorProfilerInfo3_GetStringLayout2(This,pStringLengthOffset,pBufferOffset) \ - ( (This)->lpVtbl -> GetStringLayout2(This,pStringLengthOffset,pBufferOffset) ) + ( (This)->lpVtbl -> GetStringLayout2(This,pStringLengthOffset,pBufferOffset) ) #define ICorProfilerInfo3_SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) ) #define ICorProfilerInfo3_SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) ) #define ICorProfilerInfo3_GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) \ - ( (This)->lpVtbl -> GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) ) + ( (This)->lpVtbl -> GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) ) #define ICorProfilerInfo3_GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) \ - ( (This)->lpVtbl -> GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) ) + ( (This)->lpVtbl -> GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) ) #define ICorProfilerInfo3_GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) \ - ( (This)->lpVtbl -> GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) ) + ( (This)->lpVtbl -> GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) ) #define ICorProfilerInfo3_EnumModules(This,ppEnum) \ - ( (This)->lpVtbl -> EnumModules(This,ppEnum) ) + ( (This)->lpVtbl -> EnumModules(This,ppEnum) ) #define ICorProfilerInfo3_GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) \ - ( (This)->lpVtbl -> GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) ) + ( (This)->lpVtbl -> GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) ) #define ICorProfilerInfo3_GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) \ - ( (This)->lpVtbl -> GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) ) + ( (This)->lpVtbl -> GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) ) #define ICorProfilerInfo3_GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) \ - ( (This)->lpVtbl -> GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) ) + ( (This)->lpVtbl -> GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) ) #define ICorProfilerInfo3_GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) \ - ( (This)->lpVtbl -> GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) ) + ( (This)->lpVtbl -> GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) ) #endif /* COBJMACROS */ @@ -9516,75 +10359,75 @@ EXTERN_C const IID IID_ICorProfilerInfo3; #define __ICorProfilerObjectEnum_INTERFACE_DEFINED__ /* interface ICorProfilerObjectEnum */ -/* [local][unique][uuid][object] */ +/* [local][unique][uuid][object] */ EXTERN_C const IID IID_ICorProfilerObjectEnum; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("2C6269BD-2D13-4321-AE12-6686365FD6AF") ICorProfilerObjectEnum : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE Skip( + virtual HRESULT STDMETHODCALLTYPE Skip( /* [in] */ ULONG celt) = 0; - + virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE Clone( + + virtual HRESULT STDMETHODCALLTYPE Clone( /* [out] */ ICorProfilerObjectEnum **ppEnum) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCount( + + virtual HRESULT STDMETHODCALLTYPE GetCount( /* [out] */ ULONG *pcelt) = 0; - - virtual HRESULT STDMETHODCALLTYPE Next( + + virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ ULONG celt, /* [length_is][size_is][out] */ ObjectID objects[ ], /* [out] */ ULONG *pceltFetched) = 0; - + }; - - + + #else /* C style interface */ typedef struct ICorProfilerObjectEnumVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorProfilerObjectEnum * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorProfilerObjectEnum * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorProfilerObjectEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Skip )( + + HRESULT ( STDMETHODCALLTYPE *Skip )( ICorProfilerObjectEnum * This, /* [in] */ ULONG celt); - - HRESULT ( STDMETHODCALLTYPE *Reset )( + + HRESULT ( STDMETHODCALLTYPE *Reset )( ICorProfilerObjectEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Clone )( + + HRESULT ( STDMETHODCALLTYPE *Clone )( ICorProfilerObjectEnum * This, /* [out] */ ICorProfilerObjectEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetCount )( + + HRESULT ( STDMETHODCALLTYPE *GetCount )( ICorProfilerObjectEnum * This, /* [out] */ ULONG *pcelt); - - HRESULT ( STDMETHODCALLTYPE *Next )( + + HRESULT ( STDMETHODCALLTYPE *Next )( ICorProfilerObjectEnum * This, /* [in] */ ULONG celt, /* [length_is][size_is][out] */ ObjectID objects[ ], /* [out] */ ULONG *pceltFetched); - + END_INTERFACE } ICorProfilerObjectEnumVtbl; @@ -9593,35 +10436,35 @@ EXTERN_C const IID IID_ICorProfilerObjectEnum; CONST_VTBL struct ICorProfilerObjectEnumVtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ICorProfilerObjectEnum_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ICorProfilerObjectEnum_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ICorProfilerObjectEnum_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ICorProfilerObjectEnum_Skip(This,celt) \ - ( (This)->lpVtbl -> Skip(This,celt) ) + ( (This)->lpVtbl -> Skip(This,celt) ) #define ICorProfilerObjectEnum_Reset(This) \ - ( (This)->lpVtbl -> Reset(This) ) + ( (This)->lpVtbl -> Reset(This) ) #define ICorProfilerObjectEnum_Clone(This,ppEnum) \ - ( (This)->lpVtbl -> Clone(This,ppEnum) ) + ( (This)->lpVtbl -> Clone(This,ppEnum) ) #define ICorProfilerObjectEnum_GetCount(This,pcelt) \ - ( (This)->lpVtbl -> GetCount(This,pcelt) ) + ( (This)->lpVtbl -> GetCount(This,pcelt) ) #define ICorProfilerObjectEnum_Next(This,celt,objects,pceltFetched) \ - ( (This)->lpVtbl -> Next(This,celt,objects,pceltFetched) ) + ( (This)->lpVtbl -> Next(This,celt,objects,pceltFetched) ) #endif /* COBJMACROS */ @@ -9638,75 +10481,75 @@ EXTERN_C const IID IID_ICorProfilerObjectEnum; #define __ICorProfilerFunctionEnum_INTERFACE_DEFINED__ /* interface ICorProfilerFunctionEnum */ -/* [local][unique][uuid][object] */ +/* [local][unique][uuid][object] */ EXTERN_C const IID IID_ICorProfilerFunctionEnum; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("FF71301A-B994-429D-A10B-B345A65280EF") ICorProfilerFunctionEnum : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE Skip( + virtual HRESULT STDMETHODCALLTYPE Skip( /* [in] */ ULONG celt) = 0; - + virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE Clone( + + virtual HRESULT STDMETHODCALLTYPE Clone( /* [out] */ ICorProfilerFunctionEnum **ppEnum) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCount( + + virtual HRESULT STDMETHODCALLTYPE GetCount( /* [out] */ ULONG *pcelt) = 0; - - virtual HRESULT STDMETHODCALLTYPE Next( + + virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ ULONG celt, /* [length_is][size_is][out] */ COR_PRF_FUNCTION ids[ ], /* [out] */ ULONG *pceltFetched) = 0; - + }; - - + + #else /* C style interface */ typedef struct ICorProfilerFunctionEnumVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorProfilerFunctionEnum * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorProfilerFunctionEnum * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorProfilerFunctionEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Skip )( + + HRESULT ( STDMETHODCALLTYPE *Skip )( ICorProfilerFunctionEnum * This, /* [in] */ ULONG celt); - - HRESULT ( STDMETHODCALLTYPE *Reset )( + + HRESULT ( STDMETHODCALLTYPE *Reset )( ICorProfilerFunctionEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Clone )( + + HRESULT ( STDMETHODCALLTYPE *Clone )( ICorProfilerFunctionEnum * This, /* [out] */ ICorProfilerFunctionEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetCount )( + + HRESULT ( STDMETHODCALLTYPE *GetCount )( ICorProfilerFunctionEnum * This, /* [out] */ ULONG *pcelt); - - HRESULT ( STDMETHODCALLTYPE *Next )( + + HRESULT ( STDMETHODCALLTYPE *Next )( ICorProfilerFunctionEnum * This, /* [in] */ ULONG celt, /* [length_is][size_is][out] */ COR_PRF_FUNCTION ids[ ], /* [out] */ ULONG *pceltFetched); - + END_INTERFACE } ICorProfilerFunctionEnumVtbl; @@ -9715,35 +10558,35 @@ EXTERN_C const IID IID_ICorProfilerFunctionEnum; CONST_VTBL struct ICorProfilerFunctionEnumVtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ICorProfilerFunctionEnum_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ICorProfilerFunctionEnum_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ICorProfilerFunctionEnum_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ICorProfilerFunctionEnum_Skip(This,celt) \ - ( (This)->lpVtbl -> Skip(This,celt) ) + ( (This)->lpVtbl -> Skip(This,celt) ) #define ICorProfilerFunctionEnum_Reset(This) \ - ( (This)->lpVtbl -> Reset(This) ) + ( (This)->lpVtbl -> Reset(This) ) #define ICorProfilerFunctionEnum_Clone(This,ppEnum) \ - ( (This)->lpVtbl -> Clone(This,ppEnum) ) + ( (This)->lpVtbl -> Clone(This,ppEnum) ) #define ICorProfilerFunctionEnum_GetCount(This,pcelt) \ - ( (This)->lpVtbl -> GetCount(This,pcelt) ) + ( (This)->lpVtbl -> GetCount(This,pcelt) ) #define ICorProfilerFunctionEnum_Next(This,celt,ids,pceltFetched) \ - ( (This)->lpVtbl -> Next(This,celt,ids,pceltFetched) ) + ( (This)->lpVtbl -> Next(This,celt,ids,pceltFetched) ) #endif /* COBJMACROS */ @@ -9760,75 +10603,75 @@ EXTERN_C const IID IID_ICorProfilerFunctionEnum; #define __ICorProfilerModuleEnum_INTERFACE_DEFINED__ /* interface ICorProfilerModuleEnum */ -/* [local][unique][uuid][object] */ +/* [local][unique][uuid][object] */ EXTERN_C const IID IID_ICorProfilerModuleEnum; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("b0266d75-2081-4493-af7f-028ba34db891") ICorProfilerModuleEnum : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE Skip( + virtual HRESULT STDMETHODCALLTYPE Skip( /* [in] */ ULONG celt) = 0; - + virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE Clone( + + virtual HRESULT STDMETHODCALLTYPE Clone( /* [out] */ ICorProfilerModuleEnum **ppEnum) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCount( + + virtual HRESULT STDMETHODCALLTYPE GetCount( /* [out] */ ULONG *pcelt) = 0; - - virtual HRESULT STDMETHODCALLTYPE Next( + + virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ ULONG celt, /* [length_is][size_is][out] */ ModuleID ids[ ], /* [out] */ ULONG *pceltFetched) = 0; - + }; - - + + #else /* C style interface */ typedef struct ICorProfilerModuleEnumVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorProfilerModuleEnum * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorProfilerModuleEnum * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorProfilerModuleEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Skip )( + + HRESULT ( STDMETHODCALLTYPE *Skip )( ICorProfilerModuleEnum * This, /* [in] */ ULONG celt); - - HRESULT ( STDMETHODCALLTYPE *Reset )( + + HRESULT ( STDMETHODCALLTYPE *Reset )( ICorProfilerModuleEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Clone )( + + HRESULT ( STDMETHODCALLTYPE *Clone )( ICorProfilerModuleEnum * This, /* [out] */ ICorProfilerModuleEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetCount )( + + HRESULT ( STDMETHODCALLTYPE *GetCount )( ICorProfilerModuleEnum * This, /* [out] */ ULONG *pcelt); - - HRESULT ( STDMETHODCALLTYPE *Next )( + + HRESULT ( STDMETHODCALLTYPE *Next )( ICorProfilerModuleEnum * This, /* [in] */ ULONG celt, /* [length_is][size_is][out] */ ModuleID ids[ ], /* [out] */ ULONG *pceltFetched); - + END_INTERFACE } ICorProfilerModuleEnumVtbl; @@ -9837,35 +10680,35 @@ EXTERN_C const IID IID_ICorProfilerModuleEnum; CONST_VTBL struct ICorProfilerModuleEnumVtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ICorProfilerModuleEnum_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ICorProfilerModuleEnum_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ICorProfilerModuleEnum_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ICorProfilerModuleEnum_Skip(This,celt) \ - ( (This)->lpVtbl -> Skip(This,celt) ) + ( (This)->lpVtbl -> Skip(This,celt) ) #define ICorProfilerModuleEnum_Reset(This) \ - ( (This)->lpVtbl -> Reset(This) ) + ( (This)->lpVtbl -> Reset(This) ) #define ICorProfilerModuleEnum_Clone(This,ppEnum) \ - ( (This)->lpVtbl -> Clone(This,ppEnum) ) + ( (This)->lpVtbl -> Clone(This,ppEnum) ) #define ICorProfilerModuleEnum_GetCount(This,pcelt) \ - ( (This)->lpVtbl -> GetCount(This,pcelt) ) + ( (This)->lpVtbl -> GetCount(This,pcelt) ) #define ICorProfilerModuleEnum_Next(This,celt,ids,pceltFetched) \ - ( (This)->lpVtbl -> Next(This,celt,ids,pceltFetched) ) + ( (This)->lpVtbl -> Next(This,celt,ids,pceltFetched) ) #endif /* COBJMACROS */ @@ -9882,45 +10725,45 @@ EXTERN_C const IID IID_ICorProfilerModuleEnum; #define __IMethodMalloc_INTERFACE_DEFINED__ /* interface IMethodMalloc */ -/* [local][unique][uuid][object] */ +/* [local][unique][uuid][object] */ EXTERN_C const IID IID_IMethodMalloc; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("A0EFB28B-6EE2-4d7b-B983-A75EF7BEEDB8") IMethodMalloc : public IUnknown { public: - virtual PVOID STDMETHODCALLTYPE Alloc( + virtual PVOID STDMETHODCALLTYPE Alloc( /* [in] */ ULONG cb) = 0; - + }; - - + + #else /* C style interface */ typedef struct IMethodMallocVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IMethodMalloc * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( IMethodMalloc * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( IMethodMalloc * This); - - PVOID ( STDMETHODCALLTYPE *Alloc )( + + PVOID ( STDMETHODCALLTYPE *Alloc )( IMethodMalloc * This, /* [in] */ ULONG cb); - + END_INTERFACE } IMethodMallocVtbl; @@ -9929,23 +10772,23 @@ EXTERN_C const IID IID_IMethodMalloc; CONST_VTBL struct IMethodMallocVtbl *lpVtbl; }; - + #ifdef COBJMACROS #define IMethodMalloc_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define IMethodMalloc_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define IMethodMalloc_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define IMethodMalloc_Alloc(This,cb) \ - ( (This)->lpVtbl -> Alloc(This,cb) ) + ( (This)->lpVtbl -> Alloc(This,cb) ) #endif /* COBJMACROS */ @@ -9962,63 +10805,63 @@ EXTERN_C const IID IID_IMethodMalloc; #define __ICorProfilerFunctionControl_INTERFACE_DEFINED__ /* interface ICorProfilerFunctionControl */ -/* [local][unique][uuid][object] */ +/* [local][unique][uuid][object] */ EXTERN_C const IID IID_ICorProfilerFunctionControl; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("F0963021-E1EA-4732-8581-E01B0BD3C0C6") ICorProfilerFunctionControl : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE SetCodegenFlags( + virtual HRESULT STDMETHODCALLTYPE SetCodegenFlags( /* [in] */ DWORD flags) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetILFunctionBody( + + virtual HRESULT STDMETHODCALLTYPE SetILFunctionBody( /* [in] */ ULONG cbNewILMethodHeader, /* [size_is][in] */ LPCBYTE pbNewILMethodHeader) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetILInstrumentedCodeMap( + + virtual HRESULT STDMETHODCALLTYPE SetILInstrumentedCodeMap( /* [in] */ ULONG cILMapEntries, /* [size_is][in] */ COR_IL_MAP rgILMapEntries[ ]) = 0; - + }; - - + + #else /* C style interface */ typedef struct ICorProfilerFunctionControlVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorProfilerFunctionControl * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorProfilerFunctionControl * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorProfilerFunctionControl * This); - - HRESULT ( STDMETHODCALLTYPE *SetCodegenFlags )( + + HRESULT ( STDMETHODCALLTYPE *SetCodegenFlags )( ICorProfilerFunctionControl * This, /* [in] */ DWORD flags); - - HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )( + + HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )( ICorProfilerFunctionControl * This, /* [in] */ ULONG cbNewILMethodHeader, /* [size_is][in] */ LPCBYTE pbNewILMethodHeader); - - HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )( + + HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )( ICorProfilerFunctionControl * This, /* [in] */ ULONG cILMapEntries, /* [size_is][in] */ COR_IL_MAP rgILMapEntries[ ]); - + END_INTERFACE } ICorProfilerFunctionControlVtbl; @@ -10027,29 +10870,29 @@ EXTERN_C const IID IID_ICorProfilerFunctionControl; CONST_VTBL struct ICorProfilerFunctionControlVtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ICorProfilerFunctionControl_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ICorProfilerFunctionControl_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ICorProfilerFunctionControl_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ICorProfilerFunctionControl_SetCodegenFlags(This,flags) \ - ( (This)->lpVtbl -> SetCodegenFlags(This,flags) ) + ( (This)->lpVtbl -> SetCodegenFlags(This,flags) ) #define ICorProfilerFunctionControl_SetILFunctionBody(This,cbNewILMethodHeader,pbNewILMethodHeader) \ - ( (This)->lpVtbl -> SetILFunctionBody(This,cbNewILMethodHeader,pbNewILMethodHeader) ) + ( (This)->lpVtbl -> SetILFunctionBody(This,cbNewILMethodHeader,pbNewILMethodHeader) ) #define ICorProfilerFunctionControl_SetILInstrumentedCodeMap(This,cILMapEntries,rgILMapEntries) \ - ( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,cILMapEntries,rgILMapEntries) ) + ( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,cILMapEntries,rgILMapEntries) ) #endif /* COBJMACROS */ @@ -10066,276 +10909,276 @@ EXTERN_C const IID IID_ICorProfilerFunctionControl; #define __ICorProfilerInfo4_INTERFACE_DEFINED__ /* interface ICorProfilerInfo4 */ -/* [local][unique][uuid][object] */ +/* [local][unique][uuid][object] */ EXTERN_C const IID IID_ICorProfilerInfo4; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("0d8fdcaa-6257-47bf-b1bf-94dac88466ee") ICorProfilerInfo4 : public ICorProfilerInfo3 { public: - virtual HRESULT STDMETHODCALLTYPE EnumThreads( + virtual HRESULT STDMETHODCALLTYPE EnumThreads( /* [out] */ ICorProfilerThreadEnum **ppEnum) = 0; - + virtual HRESULT STDMETHODCALLTYPE InitializeCurrentThread( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE RequestReJIT( + + virtual HRESULT STDMETHODCALLTYPE RequestReJIT( /* [in] */ ULONG cFunctions, /* [size_is][in] */ ModuleID moduleIds[ ], /* [size_is][in] */ mdMethodDef methodIds[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE RequestRevert( + + virtual HRESULT STDMETHODCALLTYPE RequestRevert( /* [in] */ ULONG cFunctions, /* [size_is][in] */ ModuleID moduleIds[ ], /* [size_is][in] */ mdMethodDef methodIds[ ], /* [size_is][out] */ HRESULT status[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCodeInfo3( + + virtual HRESULT STDMETHODCALLTYPE GetCodeInfo3( /* [in] */ FunctionID functionID, /* [in] */ ReJITID reJitId, /* [in] */ ULONG32 cCodeInfos, /* [out] */ ULONG32 *pcCodeInfos, /* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetFunctionFromIP2( + + virtual HRESULT STDMETHODCALLTYPE GetFunctionFromIP2( /* [in] */ LPCBYTE ip, /* [out] */ FunctionID *pFunctionId, /* [out] */ ReJITID *pReJitId) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetReJITIDs( + + virtual HRESULT STDMETHODCALLTYPE GetReJITIDs( /* [in] */ FunctionID functionId, /* [in] */ ULONG cReJitIds, /* [out] */ ULONG *pcReJitIds, /* [length_is][size_is][out] */ ReJITID reJitIds[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetILToNativeMapping2( + + virtual HRESULT STDMETHODCALLTYPE GetILToNativeMapping2( /* [in] */ FunctionID functionId, /* [in] */ ReJITID reJitId, /* [in] */ ULONG32 cMap, /* [out] */ ULONG32 *pcMap, /* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE EnumJITedFunctions2( + + virtual HRESULT STDMETHODCALLTYPE EnumJITedFunctions2( /* [out] */ ICorProfilerFunctionEnum **ppEnum) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetObjectSize2( + + virtual HRESULT STDMETHODCALLTYPE GetObjectSize2( /* [in] */ ObjectID objectId, /* [out] */ SIZE_T *pcSize) = 0; - + }; - - + + #else /* C style interface */ typedef struct ICorProfilerInfo4Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorProfilerInfo4 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorProfilerInfo4 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorProfilerInfo4 * This); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )( ICorProfilerInfo4 * This, /* [in] */ ObjectID objectId, /* [out] */ ClassID *pClassId); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )( ICorProfilerInfo4 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdTypeDef typeDef, /* [out] */ ClassID *pClassId); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )( ICorProfilerInfo4 * This, /* [in] */ FunctionID functionId, /* [out] */ LPCBYTE *pStart, /* [out] */ ULONG *pcSize); - - HRESULT ( STDMETHODCALLTYPE *GetEventMask )( + + HRESULT ( STDMETHODCALLTYPE *GetEventMask )( ICorProfilerInfo4 * This, /* [out] */ DWORD *pdwEvents); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )( ICorProfilerInfo4 * This, /* [in] */ LPCBYTE ip, /* [out] */ FunctionID *pFunctionId); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )( ICorProfilerInfo4 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdToken token, /* [out] */ FunctionID *pFunctionId); - - HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )( + + HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )( ICorProfilerInfo4 * This, /* [in] */ ThreadID threadId, /* [out] */ HANDLE *phThread); - - HRESULT ( STDMETHODCALLTYPE *GetObjectSize )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectSize )( ICorProfilerInfo4 * This, /* [in] */ ObjectID objectId, /* [out] */ ULONG *pcSize); - - HRESULT ( STDMETHODCALLTYPE *IsArrayClass )( + + HRESULT ( STDMETHODCALLTYPE *IsArrayClass )( ICorProfilerInfo4 * This, /* [in] */ ClassID classId, /* [out] */ CorElementType *pBaseElemType, /* [out] */ ClassID *pBaseClassId, /* [out] */ ULONG *pcRank); - - HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )( ICorProfilerInfo4 * This, /* [in] */ ThreadID threadId, /* [out] */ DWORD *pdwWin32ThreadId); - - HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )( + + HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )( ICorProfilerInfo4 * This, /* [out] */ ThreadID *pThreadId); - - HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )( ICorProfilerInfo4 * This, /* [in] */ ClassID classId, /* [out] */ ModuleID *pModuleId, /* [out] */ mdTypeDef *pTypeDefToken); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )( ICorProfilerInfo4 * This, /* [in] */ FunctionID functionId, /* [out] */ ClassID *pClassId, /* [out] */ ModuleID *pModuleId, /* [out] */ mdToken *pToken); - - HRESULT ( STDMETHODCALLTYPE *SetEventMask )( + + HRESULT ( STDMETHODCALLTYPE *SetEventMask )( ICorProfilerInfo4 * This, /* [in] */ DWORD dwEvents); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )( ICorProfilerInfo4 * This, /* [in] */ FunctionEnter *pFuncEnter, /* [in] */ FunctionLeave *pFuncLeave, /* [in] */ FunctionTailcall *pFuncTailcall); - - HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )( + + HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )( ICorProfilerInfo4 * This, /* [in] */ FunctionIDMapper *pFunc); - - HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )( + + HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )( ICorProfilerInfo4 * This, /* [in] */ FunctionID functionId, /* [in] */ REFIID riid, /* [out] */ IUnknown **ppImport, /* [out] */ mdToken *pToken); - - HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )( ICorProfilerInfo4 * This, /* [in] */ ModuleID moduleId, /* [out] */ LPCBYTE *ppBaseLoadAddress, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AssemblyID *pAssemblyId); - - HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )( ICorProfilerInfo4 * This, /* [in] */ ModuleID moduleId, /* [in] */ DWORD dwOpenFlags, /* [in] */ REFIID riid, /* [out] */ IUnknown **ppOut); - - HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )( + + HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )( ICorProfilerInfo4 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodId, /* [out] */ LPCBYTE *ppMethodHeader, /* [out] */ ULONG *pcbMethodSize); - - HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )( + + HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )( ICorProfilerInfo4 * This, /* [in] */ ModuleID moduleId, /* [out] */ IMethodMalloc **ppMalloc); - - HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )( + + HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )( ICorProfilerInfo4 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodid, /* [in] */ LPCBYTE pbNewILMethodHeader); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )( ICorProfilerInfo4 * This, /* [in] */ AppDomainID appDomainId, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ ProcessID *pProcessId); - - HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )( ICorProfilerInfo4 * This, /* [in] */ AssemblyID assemblyId, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AppDomainID *pAppDomainId, /* [out] */ ModuleID *pModuleId); - - HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )( + + HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )( ICorProfilerInfo4 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ForceGC )( + + HRESULT ( STDMETHODCALLTYPE *ForceGC )( ICorProfilerInfo4 * This); - - HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )( + + HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )( ICorProfilerInfo4 * This, /* [in] */ FunctionID functionId, /* [in] */ BOOL fStartJit, /* [in] */ ULONG cILMapEntries, /* [size_is][in] */ COR_IL_MAP rgILMapEntries[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )( + + HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )( ICorProfilerInfo4 * This, /* [out] */ IUnknown **ppicd); - - HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )( + + HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )( ICorProfilerInfo4 * This, /* [out] */ IUnknown **ppicd); - - HRESULT ( STDMETHODCALLTYPE *GetThreadContext )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadContext )( ICorProfilerInfo4 * This, /* [in] */ ThreadID threadId, /* [out] */ ContextID *pContextId); - - HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )( + + HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )( ICorProfilerInfo4 * This, /* [in] */ BOOL fThisThreadOnly, /* [out] */ DWORD *pdwProfilerContext); - - HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )( + + HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )( ICorProfilerInfo4 * This, /* [in] */ DWORD dwProfilerContext); - - HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )( + + HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )( ICorProfilerInfo4 * This, /* [in] */ FunctionID functionId, /* [in] */ ULONG32 cMap, /* [out] */ ULONG32 *pcMap, /* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]); - - HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )( + + HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )( ICorProfilerInfo4 * This, /* [in] */ ThreadID thread, /* [in] */ StackSnapshotCallback *callback, @@ -10343,14 +11186,14 @@ EXTERN_C const IID IID_ICorProfilerInfo4; /* [in] */ void *clientData, /* [size_is][in] */ BYTE context[ ], /* [in] */ ULONG32 contextSize); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )( ICorProfilerInfo4 * This, /* [in] */ FunctionEnter2 *pFuncEnter, /* [in] */ FunctionLeave2 *pFuncLeave, /* [in] */ FunctionTailcall2 *pFuncTailcall); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )( ICorProfilerInfo4 * This, /* [in] */ FunctionID funcId, /* [in] */ COR_PRF_FRAME_INFO frameInfo, @@ -10360,22 +11203,22 @@ EXTERN_C const IID IID_ICorProfilerInfo4; /* [in] */ ULONG32 cTypeArgs, /* [out] */ ULONG32 *pcTypeArgs, /* [out] */ ClassID typeArgs[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetStringLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetStringLayout )( ICorProfilerInfo4 * This, /* [out] */ ULONG *pBufferLengthOffset, /* [out] */ ULONG *pStringLengthOffset, /* [out] */ ULONG *pBufferOffset); - - HRESULT ( STDMETHODCALLTYPE *GetClassLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetClassLayout )( ICorProfilerInfo4 * This, /* [in] */ ClassID classID, /* [out][in] */ COR_FIELD_OFFSET rFieldOffset[ ], /* [in] */ ULONG cFieldOffset, /* [out] */ ULONG *pcFieldOffset, /* [out] */ ULONG *pulClassSize); - - HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )( ICorProfilerInfo4 * This, /* [in] */ ClassID classId, /* [out] */ ModuleID *pModuleId, @@ -10384,23 +11227,23 @@ EXTERN_C const IID IID_ICorProfilerInfo4; /* [in] */ ULONG32 cNumTypeArgs, /* [out] */ ULONG32 *pcNumTypeArgs, /* [out] */ ClassID typeArgs[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )( ICorProfilerInfo4 * This, /* [in] */ FunctionID functionID, /* [in] */ ULONG32 cCodeInfos, /* [out] */ ULONG32 *pcCodeInfos, /* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )( ICorProfilerInfo4 * This, /* [in] */ ModuleID moduleID, /* [in] */ mdTypeDef typeDef, /* [in] */ ULONG32 cTypeArgs, /* [size_is][in] */ ClassID typeArgs[ ], /* [out] */ ClassID *pClassID); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )( ICorProfilerInfo4 * This, /* [in] */ ModuleID moduleID, /* [in] */ mdMethodDef funcDef, @@ -10408,134 +11251,134 @@ EXTERN_C const IID IID_ICorProfilerInfo4; /* [in] */ ULONG32 cTypeArgs, /* [size_is][in] */ ClassID typeArgs[ ], /* [out] */ FunctionID *pFunctionID); - - HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )( + + HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )( ICorProfilerInfo4 * This, /* [in] */ ModuleID moduleID, /* [out] */ ICorProfilerObjectEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )( ICorProfilerInfo4 * This, /* [in] */ ObjectID objectId, /* [in] */ ULONG32 cDimensions, /* [size_is][out] */ ULONG32 pDimensionSizes[ ], /* [size_is][out] */ int pDimensionLowerBounds[ ], /* [out] */ BYTE **ppData); - - HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )( ICorProfilerInfo4 * This, /* [in] */ ClassID classId, /* [out] */ ULONG32 *pBufferOffset); - - HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )( ICorProfilerInfo4 * This, /* [in] */ ThreadID threadId, /* [out] */ AppDomainID *pAppDomainId); - - HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )( ICorProfilerInfo4 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )( ICorProfilerInfo4 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ AppDomainID appDomainId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )( ICorProfilerInfo4 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ ThreadID threadId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )( ICorProfilerInfo4 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ ContextID contextId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )( ICorProfilerInfo4 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [out] */ COR_PRF_STATIC_TYPE *pFieldInfo); - - HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )( + + HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )( ICorProfilerInfo4 * This, /* [in] */ ULONG cObjectRanges, /* [out] */ ULONG *pcObjectRanges, /* [length_is][size_is][out] */ COR_PRF_GC_GENERATION_RANGE ranges[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )( ICorProfilerInfo4 * This, /* [in] */ ObjectID objectId, /* [out] */ COR_PRF_GC_GENERATION_RANGE *range); - - HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )( ICorProfilerInfo4 * This, /* [out] */ COR_PRF_EX_CLAUSE_INFO *pinfo); - - HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions )( + + HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions )( ICorProfilerInfo4 * This, /* [out] */ ICorProfilerFunctionEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *RequestProfilerDetach )( + + HRESULT ( STDMETHODCALLTYPE *RequestProfilerDetach )( ICorProfilerInfo4 * This, /* [in] */ DWORD dwExpectedCompletionMilliseconds); - - HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper2 )( + + HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper2 )( ICorProfilerInfo4 * This, /* [in] */ FunctionIDMapper2 *pFunc, /* [in] */ void *clientData); - - HRESULT ( STDMETHODCALLTYPE *GetStringLayout2 )( + + HRESULT ( STDMETHODCALLTYPE *GetStringLayout2 )( ICorProfilerInfo4 * This, /* [out] */ ULONG *pStringLengthOffset, /* [out] */ ULONG *pBufferOffset); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3 )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3 )( ICorProfilerInfo4 * This, /* [in] */ FunctionEnter3 *pFuncEnter3, /* [in] */ FunctionLeave3 *pFuncLeave3, /* [in] */ FunctionTailcall3 *pFuncTailcall3); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3WithInfo )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3WithInfo )( ICorProfilerInfo4 * This, /* [in] */ FunctionEnter3WithInfo *pFuncEnter3WithInfo, /* [in] */ FunctionLeave3WithInfo *pFuncLeave3WithInfo, /* [in] */ FunctionTailcall3WithInfo *pFuncTailcall3WithInfo); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionEnter3Info )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionEnter3Info )( ICorProfilerInfo4 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_ELT_INFO eltInfo, /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo, /* [out][in] */ ULONG *pcbArgumentInfo, /* [size_is][out] */ COR_PRF_FUNCTION_ARGUMENT_INFO *pArgumentInfo); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionLeave3Info )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionLeave3Info )( ICorProfilerInfo4 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_ELT_INFO eltInfo, /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo, /* [out] */ COR_PRF_FUNCTION_ARGUMENT_RANGE *pRetvalRange); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionTailcall3Info )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionTailcall3Info )( ICorProfilerInfo4 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_ELT_INFO eltInfo, /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo); - - HRESULT ( STDMETHODCALLTYPE *EnumModules )( + + HRESULT ( STDMETHODCALLTYPE *EnumModules )( ICorProfilerInfo4 * This, /* [out] */ ICorProfilerModuleEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetRuntimeInformation )( + + HRESULT ( STDMETHODCALLTYPE *GetRuntimeInformation )( ICorProfilerInfo4 * This, /* [out] */ USHORT *pClrInstanceId, /* [out] */ COR_PRF_RUNTIME_TYPE *pRuntimeType, @@ -10545,93 +11388,93 @@ EXTERN_C const IID IID_ICorProfilerInfo4; /* [out] */ USHORT *pQFEVersion, /* [in] */ ULONG cchVersionString, /* [out] */ ULONG *pcchVersionString, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchVersionString, *pcchVersionString) WCHAR szVersionString[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress2 )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress2 )( ICorProfilerInfo4 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ AppDomainID appDomainId, /* [in] */ ThreadID threadId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainsContainingModule )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainsContainingModule )( ICorProfilerInfo4 * This, /* [in] */ ModuleID moduleId, /* [in] */ ULONG32 cAppDomainIds, /* [out] */ ULONG32 *pcAppDomainIds, /* [length_is][size_is][out] */ AppDomainID appDomainIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetModuleInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleInfo2 )( ICorProfilerInfo4 * This, /* [in] */ ModuleID moduleId, /* [out] */ LPCBYTE *ppBaseLoadAddress, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AssemblyID *pAssemblyId, /* [out] */ DWORD *pdwModuleFlags); - - HRESULT ( STDMETHODCALLTYPE *EnumThreads )( + + HRESULT ( STDMETHODCALLTYPE *EnumThreads )( ICorProfilerInfo4 * This, /* [out] */ ICorProfilerThreadEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *InitializeCurrentThread )( + + HRESULT ( STDMETHODCALLTYPE *InitializeCurrentThread )( ICorProfilerInfo4 * This); - - HRESULT ( STDMETHODCALLTYPE *RequestReJIT )( + + HRESULT ( STDMETHODCALLTYPE *RequestReJIT )( ICorProfilerInfo4 * This, /* [in] */ ULONG cFunctions, /* [size_is][in] */ ModuleID moduleIds[ ], /* [size_is][in] */ mdMethodDef methodIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *RequestRevert )( + + HRESULT ( STDMETHODCALLTYPE *RequestRevert )( ICorProfilerInfo4 * This, /* [in] */ ULONG cFunctions, /* [size_is][in] */ ModuleID moduleIds[ ], /* [size_is][in] */ mdMethodDef methodIds[ ], /* [size_is][out] */ HRESULT status[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo3 )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo3 )( ICorProfilerInfo4 * This, /* [in] */ FunctionID functionID, /* [in] */ ReJITID reJitId, /* [in] */ ULONG32 cCodeInfos, /* [out] */ ULONG32 *pcCodeInfos, /* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP2 )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP2 )( ICorProfilerInfo4 * This, /* [in] */ LPCBYTE ip, /* [out] */ FunctionID *pFunctionId, /* [out] */ ReJITID *pReJitId); - - HRESULT ( STDMETHODCALLTYPE *GetReJITIDs )( + + HRESULT ( STDMETHODCALLTYPE *GetReJITIDs )( ICorProfilerInfo4 * This, /* [in] */ FunctionID functionId, /* [in] */ ULONG cReJitIds, /* [out] */ ULONG *pcReJitIds, /* [length_is][size_is][out] */ ReJITID reJitIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping2 )( + + HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping2 )( ICorProfilerInfo4 * This, /* [in] */ FunctionID functionId, /* [in] */ ReJITID reJitId, /* [in] */ ULONG32 cMap, /* [out] */ ULONG32 *pcMap, /* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]); - - HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions2 )( + + HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions2 )( ICorProfilerInfo4 * This, /* [out] */ ICorProfilerFunctionEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetObjectSize2 )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectSize2 )( ICorProfilerInfo4 * This, /* [in] */ ObjectID objectId, /* [out] */ SIZE_T *pcSize); - + END_INTERFACE } ICorProfilerInfo4Vtbl; @@ -10640,257 +11483,257 @@ EXTERN_C const IID IID_ICorProfilerInfo4; CONST_VTBL struct ICorProfilerInfo4Vtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ICorProfilerInfo4_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ICorProfilerInfo4_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ICorProfilerInfo4_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ICorProfilerInfo4_GetClassFromObject(This,objectId,pClassId) \ - ( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) ) + ( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) ) #define ICorProfilerInfo4_GetClassFromToken(This,moduleId,typeDef,pClassId) \ - ( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) ) + ( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) ) #define ICorProfilerInfo4_GetCodeInfo(This,functionId,pStart,pcSize) \ - ( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) ) + ( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) ) #define ICorProfilerInfo4_GetEventMask(This,pdwEvents) \ - ( (This)->lpVtbl -> GetEventMask(This,pdwEvents) ) + ( (This)->lpVtbl -> GetEventMask(This,pdwEvents) ) #define ICorProfilerInfo4_GetFunctionFromIP(This,ip,pFunctionId) \ - ( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) ) + ( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) ) #define ICorProfilerInfo4_GetFunctionFromToken(This,moduleId,token,pFunctionId) \ - ( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) ) + ( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) ) #define ICorProfilerInfo4_GetHandleFromThread(This,threadId,phThread) \ - ( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) ) + ( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) ) #define ICorProfilerInfo4_GetObjectSize(This,objectId,pcSize) \ - ( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) ) + ( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) ) #define ICorProfilerInfo4_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \ - ( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) ) + ( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) ) #define ICorProfilerInfo4_GetThreadInfo(This,threadId,pdwWin32ThreadId) \ - ( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) ) + ( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) ) #define ICorProfilerInfo4_GetCurrentThreadID(This,pThreadId) \ - ( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) ) + ( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) ) #define ICorProfilerInfo4_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \ - ( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) ) + ( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) ) #define ICorProfilerInfo4_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \ - ( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) ) + ( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) ) #define ICorProfilerInfo4_SetEventMask(This,dwEvents) \ - ( (This)->lpVtbl -> SetEventMask(This,dwEvents) ) + ( (This)->lpVtbl -> SetEventMask(This,dwEvents) ) #define ICorProfilerInfo4_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) #define ICorProfilerInfo4_SetFunctionIDMapper(This,pFunc) \ - ( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) ) + ( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) ) #define ICorProfilerInfo4_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \ - ( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) ) + ( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) ) #define ICorProfilerInfo4_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \ - ( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) ) + ( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) ) #define ICorProfilerInfo4_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \ - ( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) ) + ( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) ) #define ICorProfilerInfo4_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \ - ( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) ) + ( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) ) #define ICorProfilerInfo4_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \ - ( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) ) + ( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) ) #define ICorProfilerInfo4_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \ - ( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) ) + ( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) ) #define ICorProfilerInfo4_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \ - ( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) ) + ( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) ) #define ICorProfilerInfo4_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \ - ( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) ) + ( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) ) #define ICorProfilerInfo4_SetFunctionReJIT(This,functionId) \ - ( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) ) + ( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) ) #define ICorProfilerInfo4_ForceGC(This) \ - ( (This)->lpVtbl -> ForceGC(This) ) + ( (This)->lpVtbl -> ForceGC(This) ) #define ICorProfilerInfo4_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \ - ( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) ) + ( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) ) #define ICorProfilerInfo4_GetInprocInspectionInterface(This,ppicd) \ - ( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) ) + ( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) ) #define ICorProfilerInfo4_GetInprocInspectionIThisThread(This,ppicd) \ - ( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) ) + ( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) ) #define ICorProfilerInfo4_GetThreadContext(This,threadId,pContextId) \ - ( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) ) + ( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) ) #define ICorProfilerInfo4_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \ - ( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) ) + ( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) ) #define ICorProfilerInfo4_EndInprocDebugging(This,dwProfilerContext) \ - ( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) ) + ( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) ) #define ICorProfilerInfo4_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \ - ( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) ) + ( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) ) #define ICorProfilerInfo4_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \ - ( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) ) + ( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) ) #define ICorProfilerInfo4_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) #define ICorProfilerInfo4_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \ - ( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) ) + ( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) ) #define ICorProfilerInfo4_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \ - ( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) ) + ( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) ) #define ICorProfilerInfo4_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \ - ( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) ) + ( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) ) #define ICorProfilerInfo4_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \ - ( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) ) + ( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) ) #define ICorProfilerInfo4_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \ - ( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) ) + ( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) ) #define ICorProfilerInfo4_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \ - ( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) ) + ( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) ) #define ICorProfilerInfo4_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \ - ( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) ) + ( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) ) #define ICorProfilerInfo4_EnumModuleFrozenObjects(This,moduleID,ppEnum) \ - ( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) ) + ( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) ) #define ICorProfilerInfo4_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \ - ( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) ) + ( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) ) #define ICorProfilerInfo4_GetBoxClassLayout(This,classId,pBufferOffset) \ - ( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) ) + ( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) ) #define ICorProfilerInfo4_GetThreadAppDomain(This,threadId,pAppDomainId) \ - ( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) ) + ( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) ) #define ICorProfilerInfo4_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \ - ( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) ) + ( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) ) #define ICorProfilerInfo4_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \ - ( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) ) + ( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) ) #define ICorProfilerInfo4_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \ - ( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) ) + ( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) ) #define ICorProfilerInfo4_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \ - ( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) ) + ( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) ) #define ICorProfilerInfo4_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \ - ( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) ) + ( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) ) #define ICorProfilerInfo4_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \ - ( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) ) + ( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) ) #define ICorProfilerInfo4_GetObjectGeneration(This,objectId,range) \ - ( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) ) + ( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) ) #define ICorProfilerInfo4_GetNotifiedExceptionClauseInfo(This,pinfo) \ - ( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) ) + ( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) ) #define ICorProfilerInfo4_EnumJITedFunctions(This,ppEnum) \ - ( (This)->lpVtbl -> EnumJITedFunctions(This,ppEnum) ) + ( (This)->lpVtbl -> EnumJITedFunctions(This,ppEnum) ) #define ICorProfilerInfo4_RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) \ - ( (This)->lpVtbl -> RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) ) + ( (This)->lpVtbl -> RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) ) #define ICorProfilerInfo4_SetFunctionIDMapper2(This,pFunc,clientData) \ - ( (This)->lpVtbl -> SetFunctionIDMapper2(This,pFunc,clientData) ) + ( (This)->lpVtbl -> SetFunctionIDMapper2(This,pFunc,clientData) ) #define ICorProfilerInfo4_GetStringLayout2(This,pStringLengthOffset,pBufferOffset) \ - ( (This)->lpVtbl -> GetStringLayout2(This,pStringLengthOffset,pBufferOffset) ) + ( (This)->lpVtbl -> GetStringLayout2(This,pStringLengthOffset,pBufferOffset) ) #define ICorProfilerInfo4_SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) ) #define ICorProfilerInfo4_SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) ) #define ICorProfilerInfo4_GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) \ - ( (This)->lpVtbl -> GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) ) + ( (This)->lpVtbl -> GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) ) #define ICorProfilerInfo4_GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) \ - ( (This)->lpVtbl -> GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) ) + ( (This)->lpVtbl -> GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) ) #define ICorProfilerInfo4_GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) \ - ( (This)->lpVtbl -> GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) ) + ( (This)->lpVtbl -> GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) ) #define ICorProfilerInfo4_EnumModules(This,ppEnum) \ - ( (This)->lpVtbl -> EnumModules(This,ppEnum) ) + ( (This)->lpVtbl -> EnumModules(This,ppEnum) ) #define ICorProfilerInfo4_GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) \ - ( (This)->lpVtbl -> GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) ) + ( (This)->lpVtbl -> GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) ) #define ICorProfilerInfo4_GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) \ - ( (This)->lpVtbl -> GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) ) + ( (This)->lpVtbl -> GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) ) #define ICorProfilerInfo4_GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) \ - ( (This)->lpVtbl -> GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) ) + ( (This)->lpVtbl -> GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) ) #define ICorProfilerInfo4_GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) \ - ( (This)->lpVtbl -> GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) ) + ( (This)->lpVtbl -> GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) ) #define ICorProfilerInfo4_EnumThreads(This,ppEnum) \ - ( (This)->lpVtbl -> EnumThreads(This,ppEnum) ) + ( (This)->lpVtbl -> EnumThreads(This,ppEnum) ) #define ICorProfilerInfo4_InitializeCurrentThread(This) \ - ( (This)->lpVtbl -> InitializeCurrentThread(This) ) + ( (This)->lpVtbl -> InitializeCurrentThread(This) ) #define ICorProfilerInfo4_RequestReJIT(This,cFunctions,moduleIds,methodIds) \ - ( (This)->lpVtbl -> RequestReJIT(This,cFunctions,moduleIds,methodIds) ) + ( (This)->lpVtbl -> RequestReJIT(This,cFunctions,moduleIds,methodIds) ) #define ICorProfilerInfo4_RequestRevert(This,cFunctions,moduleIds,methodIds,status) \ - ( (This)->lpVtbl -> RequestRevert(This,cFunctions,moduleIds,methodIds,status) ) + ( (This)->lpVtbl -> RequestRevert(This,cFunctions,moduleIds,methodIds,status) ) #define ICorProfilerInfo4_GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) \ - ( (This)->lpVtbl -> GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) ) + ( (This)->lpVtbl -> GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) ) #define ICorProfilerInfo4_GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) \ - ( (This)->lpVtbl -> GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) ) + ( (This)->lpVtbl -> GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) ) #define ICorProfilerInfo4_GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) \ - ( (This)->lpVtbl -> GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) ) + ( (This)->lpVtbl -> GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) ) #define ICorProfilerInfo4_GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) \ - ( (This)->lpVtbl -> GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) ) + ( (This)->lpVtbl -> GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) ) #define ICorProfilerInfo4_EnumJITedFunctions2(This,ppEnum) \ - ( (This)->lpVtbl -> EnumJITedFunctions2(This,ppEnum) ) + ( (This)->lpVtbl -> EnumJITedFunctions2(This,ppEnum) ) #define ICorProfilerInfo4_GetObjectSize2(This,objectId,pcSize) \ - ( (This)->lpVtbl -> GetObjectSize2(This,objectId,pcSize) ) + ( (This)->lpVtbl -> GetObjectSize2(This,objectId,pcSize) ) #endif /* COBJMACROS */ @@ -10907,236 +11750,236 @@ EXTERN_C const IID IID_ICorProfilerInfo4; #define __ICorProfilerInfo5_INTERFACE_DEFINED__ /* interface ICorProfilerInfo5 */ -/* [local][unique][uuid][object] */ +/* [local][unique][uuid][object] */ EXTERN_C const IID IID_ICorProfilerInfo5; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("07602928-CE38-4B83-81E7-74ADAF781214") ICorProfilerInfo5 : public ICorProfilerInfo4 { public: - virtual HRESULT STDMETHODCALLTYPE GetEventMask2( + virtual HRESULT STDMETHODCALLTYPE GetEventMask2( /* [out] */ DWORD *pdwEventsLow, /* [out] */ DWORD *pdwEventsHigh) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetEventMask2( + + virtual HRESULT STDMETHODCALLTYPE SetEventMask2( /* [in] */ DWORD dwEventsLow, /* [in] */ DWORD dwEventsHigh) = 0; - + }; - - + + #else /* C style interface */ typedef struct ICorProfilerInfo5Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorProfilerInfo5 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorProfilerInfo5 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorProfilerInfo5 * This); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )( ICorProfilerInfo5 * This, /* [in] */ ObjectID objectId, /* [out] */ ClassID *pClassId); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )( ICorProfilerInfo5 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdTypeDef typeDef, /* [out] */ ClassID *pClassId); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )( ICorProfilerInfo5 * This, /* [in] */ FunctionID functionId, /* [out] */ LPCBYTE *pStart, /* [out] */ ULONG *pcSize); - - HRESULT ( STDMETHODCALLTYPE *GetEventMask )( + + HRESULT ( STDMETHODCALLTYPE *GetEventMask )( ICorProfilerInfo5 * This, /* [out] */ DWORD *pdwEvents); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )( ICorProfilerInfo5 * This, /* [in] */ LPCBYTE ip, /* [out] */ FunctionID *pFunctionId); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )( ICorProfilerInfo5 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdToken token, /* [out] */ FunctionID *pFunctionId); - - HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )( + + HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )( ICorProfilerInfo5 * This, /* [in] */ ThreadID threadId, /* [out] */ HANDLE *phThread); - - HRESULT ( STDMETHODCALLTYPE *GetObjectSize )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectSize )( ICorProfilerInfo5 * This, /* [in] */ ObjectID objectId, /* [out] */ ULONG *pcSize); - - HRESULT ( STDMETHODCALLTYPE *IsArrayClass )( + + HRESULT ( STDMETHODCALLTYPE *IsArrayClass )( ICorProfilerInfo5 * This, /* [in] */ ClassID classId, /* [out] */ CorElementType *pBaseElemType, /* [out] */ ClassID *pBaseClassId, /* [out] */ ULONG *pcRank); - - HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )( ICorProfilerInfo5 * This, /* [in] */ ThreadID threadId, /* [out] */ DWORD *pdwWin32ThreadId); - - HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )( + + HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )( ICorProfilerInfo5 * This, /* [out] */ ThreadID *pThreadId); - - HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )( ICorProfilerInfo5 * This, /* [in] */ ClassID classId, /* [out] */ ModuleID *pModuleId, /* [out] */ mdTypeDef *pTypeDefToken); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )( ICorProfilerInfo5 * This, /* [in] */ FunctionID functionId, /* [out] */ ClassID *pClassId, /* [out] */ ModuleID *pModuleId, /* [out] */ mdToken *pToken); - - HRESULT ( STDMETHODCALLTYPE *SetEventMask )( + + HRESULT ( STDMETHODCALLTYPE *SetEventMask )( ICorProfilerInfo5 * This, /* [in] */ DWORD dwEvents); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )( ICorProfilerInfo5 * This, /* [in] */ FunctionEnter *pFuncEnter, /* [in] */ FunctionLeave *pFuncLeave, /* [in] */ FunctionTailcall *pFuncTailcall); - - HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )( + + HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )( ICorProfilerInfo5 * This, /* [in] */ FunctionIDMapper *pFunc); - - HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )( + + HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )( ICorProfilerInfo5 * This, /* [in] */ FunctionID functionId, /* [in] */ REFIID riid, /* [out] */ IUnknown **ppImport, /* [out] */ mdToken *pToken); - - HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )( ICorProfilerInfo5 * This, /* [in] */ ModuleID moduleId, /* [out] */ LPCBYTE *ppBaseLoadAddress, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AssemblyID *pAssemblyId); - - HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )( ICorProfilerInfo5 * This, /* [in] */ ModuleID moduleId, /* [in] */ DWORD dwOpenFlags, /* [in] */ REFIID riid, /* [out] */ IUnknown **ppOut); - - HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )( + + HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )( ICorProfilerInfo5 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodId, /* [out] */ LPCBYTE *ppMethodHeader, /* [out] */ ULONG *pcbMethodSize); - - HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )( + + HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )( ICorProfilerInfo5 * This, /* [in] */ ModuleID moduleId, /* [out] */ IMethodMalloc **ppMalloc); - - HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )( + + HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )( ICorProfilerInfo5 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodid, /* [in] */ LPCBYTE pbNewILMethodHeader); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )( ICorProfilerInfo5 * This, /* [in] */ AppDomainID appDomainId, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ ProcessID *pProcessId); - - HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )( ICorProfilerInfo5 * This, /* [in] */ AssemblyID assemblyId, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AppDomainID *pAppDomainId, /* [out] */ ModuleID *pModuleId); - - HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )( + + HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )( ICorProfilerInfo5 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ForceGC )( + + HRESULT ( STDMETHODCALLTYPE *ForceGC )( ICorProfilerInfo5 * This); - - HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )( + + HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )( ICorProfilerInfo5 * This, /* [in] */ FunctionID functionId, /* [in] */ BOOL fStartJit, /* [in] */ ULONG cILMapEntries, /* [size_is][in] */ COR_IL_MAP rgILMapEntries[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )( + + HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )( ICorProfilerInfo5 * This, /* [out] */ IUnknown **ppicd); - - HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )( + + HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )( ICorProfilerInfo5 * This, /* [out] */ IUnknown **ppicd); - - HRESULT ( STDMETHODCALLTYPE *GetThreadContext )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadContext )( ICorProfilerInfo5 * This, /* [in] */ ThreadID threadId, /* [out] */ ContextID *pContextId); - - HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )( + + HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )( ICorProfilerInfo5 * This, /* [in] */ BOOL fThisThreadOnly, /* [out] */ DWORD *pdwProfilerContext); - - HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )( + + HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )( ICorProfilerInfo5 * This, /* [in] */ DWORD dwProfilerContext); - - HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )( + + HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )( ICorProfilerInfo5 * This, /* [in] */ FunctionID functionId, /* [in] */ ULONG32 cMap, /* [out] */ ULONG32 *pcMap, /* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]); - - HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )( + + HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )( ICorProfilerInfo5 * This, /* [in] */ ThreadID thread, /* [in] */ StackSnapshotCallback *callback, @@ -11144,14 +11987,14 @@ EXTERN_C const IID IID_ICorProfilerInfo5; /* [in] */ void *clientData, /* [size_is][in] */ BYTE context[ ], /* [in] */ ULONG32 contextSize); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )( ICorProfilerInfo5 * This, /* [in] */ FunctionEnter2 *pFuncEnter, /* [in] */ FunctionLeave2 *pFuncLeave, /* [in] */ FunctionTailcall2 *pFuncTailcall); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )( ICorProfilerInfo5 * This, /* [in] */ FunctionID funcId, /* [in] */ COR_PRF_FRAME_INFO frameInfo, @@ -11161,22 +12004,22 @@ EXTERN_C const IID IID_ICorProfilerInfo5; /* [in] */ ULONG32 cTypeArgs, /* [out] */ ULONG32 *pcTypeArgs, /* [out] */ ClassID typeArgs[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetStringLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetStringLayout )( ICorProfilerInfo5 * This, /* [out] */ ULONG *pBufferLengthOffset, /* [out] */ ULONG *pStringLengthOffset, /* [out] */ ULONG *pBufferOffset); - - HRESULT ( STDMETHODCALLTYPE *GetClassLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetClassLayout )( ICorProfilerInfo5 * This, /* [in] */ ClassID classID, /* [out][in] */ COR_FIELD_OFFSET rFieldOffset[ ], /* [in] */ ULONG cFieldOffset, /* [out] */ ULONG *pcFieldOffset, /* [out] */ ULONG *pulClassSize); - - HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )( ICorProfilerInfo5 * This, /* [in] */ ClassID classId, /* [out] */ ModuleID *pModuleId, @@ -11185,23 +12028,23 @@ EXTERN_C const IID IID_ICorProfilerInfo5; /* [in] */ ULONG32 cNumTypeArgs, /* [out] */ ULONG32 *pcNumTypeArgs, /* [out] */ ClassID typeArgs[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )( ICorProfilerInfo5 * This, /* [in] */ FunctionID functionID, /* [in] */ ULONG32 cCodeInfos, /* [out] */ ULONG32 *pcCodeInfos, /* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )( ICorProfilerInfo5 * This, /* [in] */ ModuleID moduleID, /* [in] */ mdTypeDef typeDef, /* [in] */ ULONG32 cTypeArgs, /* [size_is][in] */ ClassID typeArgs[ ], /* [out] */ ClassID *pClassID); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )( ICorProfilerInfo5 * This, /* [in] */ ModuleID moduleID, /* [in] */ mdMethodDef funcDef, @@ -11209,134 +12052,134 @@ EXTERN_C const IID IID_ICorProfilerInfo5; /* [in] */ ULONG32 cTypeArgs, /* [size_is][in] */ ClassID typeArgs[ ], /* [out] */ FunctionID *pFunctionID); - - HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )( + + HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )( ICorProfilerInfo5 * This, /* [in] */ ModuleID moduleID, /* [out] */ ICorProfilerObjectEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )( ICorProfilerInfo5 * This, /* [in] */ ObjectID objectId, /* [in] */ ULONG32 cDimensions, /* [size_is][out] */ ULONG32 pDimensionSizes[ ], /* [size_is][out] */ int pDimensionLowerBounds[ ], /* [out] */ BYTE **ppData); - - HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )( ICorProfilerInfo5 * This, /* [in] */ ClassID classId, /* [out] */ ULONG32 *pBufferOffset); - - HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )( ICorProfilerInfo5 * This, /* [in] */ ThreadID threadId, /* [out] */ AppDomainID *pAppDomainId); - - HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )( ICorProfilerInfo5 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )( ICorProfilerInfo5 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ AppDomainID appDomainId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )( ICorProfilerInfo5 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ ThreadID threadId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )( ICorProfilerInfo5 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ ContextID contextId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )( ICorProfilerInfo5 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [out] */ COR_PRF_STATIC_TYPE *pFieldInfo); - - HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )( + + HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )( ICorProfilerInfo5 * This, /* [in] */ ULONG cObjectRanges, /* [out] */ ULONG *pcObjectRanges, /* [length_is][size_is][out] */ COR_PRF_GC_GENERATION_RANGE ranges[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )( ICorProfilerInfo5 * This, /* [in] */ ObjectID objectId, /* [out] */ COR_PRF_GC_GENERATION_RANGE *range); - - HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )( ICorProfilerInfo5 * This, /* [out] */ COR_PRF_EX_CLAUSE_INFO *pinfo); - - HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions )( + + HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions )( ICorProfilerInfo5 * This, /* [out] */ ICorProfilerFunctionEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *RequestProfilerDetach )( + + HRESULT ( STDMETHODCALLTYPE *RequestProfilerDetach )( ICorProfilerInfo5 * This, /* [in] */ DWORD dwExpectedCompletionMilliseconds); - - HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper2 )( + + HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper2 )( ICorProfilerInfo5 * This, /* [in] */ FunctionIDMapper2 *pFunc, /* [in] */ void *clientData); - - HRESULT ( STDMETHODCALLTYPE *GetStringLayout2 )( + + HRESULT ( STDMETHODCALLTYPE *GetStringLayout2 )( ICorProfilerInfo5 * This, /* [out] */ ULONG *pStringLengthOffset, /* [out] */ ULONG *pBufferOffset); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3 )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3 )( ICorProfilerInfo5 * This, /* [in] */ FunctionEnter3 *pFuncEnter3, /* [in] */ FunctionLeave3 *pFuncLeave3, /* [in] */ FunctionTailcall3 *pFuncTailcall3); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3WithInfo )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3WithInfo )( ICorProfilerInfo5 * This, /* [in] */ FunctionEnter3WithInfo *pFuncEnter3WithInfo, /* [in] */ FunctionLeave3WithInfo *pFuncLeave3WithInfo, /* [in] */ FunctionTailcall3WithInfo *pFuncTailcall3WithInfo); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionEnter3Info )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionEnter3Info )( ICorProfilerInfo5 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_ELT_INFO eltInfo, /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo, /* [out][in] */ ULONG *pcbArgumentInfo, /* [size_is][out] */ COR_PRF_FUNCTION_ARGUMENT_INFO *pArgumentInfo); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionLeave3Info )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionLeave3Info )( ICorProfilerInfo5 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_ELT_INFO eltInfo, /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo, /* [out] */ COR_PRF_FUNCTION_ARGUMENT_RANGE *pRetvalRange); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionTailcall3Info )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionTailcall3Info )( ICorProfilerInfo5 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_ELT_INFO eltInfo, /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo); - - HRESULT ( STDMETHODCALLTYPE *EnumModules )( + + HRESULT ( STDMETHODCALLTYPE *EnumModules )( ICorProfilerInfo5 * This, /* [out] */ ICorProfilerModuleEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetRuntimeInformation )( + + HRESULT ( STDMETHODCALLTYPE *GetRuntimeInformation )( ICorProfilerInfo5 * This, /* [out] */ USHORT *pClrInstanceId, /* [out] */ COR_PRF_RUNTIME_TYPE *pRuntimeType, @@ -11346,103 +12189,103 @@ EXTERN_C const IID IID_ICorProfilerInfo5; /* [out] */ USHORT *pQFEVersion, /* [in] */ ULONG cchVersionString, /* [out] */ ULONG *pcchVersionString, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchVersionString, *pcchVersionString) WCHAR szVersionString[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress2 )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress2 )( ICorProfilerInfo5 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ AppDomainID appDomainId, /* [in] */ ThreadID threadId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainsContainingModule )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainsContainingModule )( ICorProfilerInfo5 * This, /* [in] */ ModuleID moduleId, /* [in] */ ULONG32 cAppDomainIds, /* [out] */ ULONG32 *pcAppDomainIds, /* [length_is][size_is][out] */ AppDomainID appDomainIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetModuleInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleInfo2 )( ICorProfilerInfo5 * This, /* [in] */ ModuleID moduleId, /* [out] */ LPCBYTE *ppBaseLoadAddress, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AssemblyID *pAssemblyId, /* [out] */ DWORD *pdwModuleFlags); - - HRESULT ( STDMETHODCALLTYPE *EnumThreads )( + + HRESULT ( STDMETHODCALLTYPE *EnumThreads )( ICorProfilerInfo5 * This, /* [out] */ ICorProfilerThreadEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *InitializeCurrentThread )( + + HRESULT ( STDMETHODCALLTYPE *InitializeCurrentThread )( ICorProfilerInfo5 * This); - - HRESULT ( STDMETHODCALLTYPE *RequestReJIT )( + + HRESULT ( STDMETHODCALLTYPE *RequestReJIT )( ICorProfilerInfo5 * This, /* [in] */ ULONG cFunctions, /* [size_is][in] */ ModuleID moduleIds[ ], /* [size_is][in] */ mdMethodDef methodIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *RequestRevert )( + + HRESULT ( STDMETHODCALLTYPE *RequestRevert )( ICorProfilerInfo5 * This, /* [in] */ ULONG cFunctions, /* [size_is][in] */ ModuleID moduleIds[ ], /* [size_is][in] */ mdMethodDef methodIds[ ], /* [size_is][out] */ HRESULT status[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo3 )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo3 )( ICorProfilerInfo5 * This, /* [in] */ FunctionID functionID, /* [in] */ ReJITID reJitId, /* [in] */ ULONG32 cCodeInfos, /* [out] */ ULONG32 *pcCodeInfos, /* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP2 )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP2 )( ICorProfilerInfo5 * This, /* [in] */ LPCBYTE ip, /* [out] */ FunctionID *pFunctionId, /* [out] */ ReJITID *pReJitId); - - HRESULT ( STDMETHODCALLTYPE *GetReJITIDs )( + + HRESULT ( STDMETHODCALLTYPE *GetReJITIDs )( ICorProfilerInfo5 * This, /* [in] */ FunctionID functionId, /* [in] */ ULONG cReJitIds, /* [out] */ ULONG *pcReJitIds, /* [length_is][size_is][out] */ ReJITID reJitIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping2 )( + + HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping2 )( ICorProfilerInfo5 * This, /* [in] */ FunctionID functionId, /* [in] */ ReJITID reJitId, /* [in] */ ULONG32 cMap, /* [out] */ ULONG32 *pcMap, /* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]); - - HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions2 )( + + HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions2 )( ICorProfilerInfo5 * This, /* [out] */ ICorProfilerFunctionEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetObjectSize2 )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectSize2 )( ICorProfilerInfo5 * This, /* [in] */ ObjectID objectId, /* [out] */ SIZE_T *pcSize); - - HRESULT ( STDMETHODCALLTYPE *GetEventMask2 )( + + HRESULT ( STDMETHODCALLTYPE *GetEventMask2 )( ICorProfilerInfo5 * This, /* [out] */ DWORD *pdwEventsLow, /* [out] */ DWORD *pdwEventsHigh); - - HRESULT ( STDMETHODCALLTYPE *SetEventMask2 )( + + HRESULT ( STDMETHODCALLTYPE *SetEventMask2 )( ICorProfilerInfo5 * This, /* [in] */ DWORD dwEventsLow, /* [in] */ DWORD dwEventsHigh); - + END_INTERFACE } ICorProfilerInfo5Vtbl; @@ -11451,264 +12294,264 @@ EXTERN_C const IID IID_ICorProfilerInfo5; CONST_VTBL struct ICorProfilerInfo5Vtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ICorProfilerInfo5_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ICorProfilerInfo5_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ICorProfilerInfo5_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ICorProfilerInfo5_GetClassFromObject(This,objectId,pClassId) \ - ( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) ) + ( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) ) #define ICorProfilerInfo5_GetClassFromToken(This,moduleId,typeDef,pClassId) \ - ( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) ) + ( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) ) #define ICorProfilerInfo5_GetCodeInfo(This,functionId,pStart,pcSize) \ - ( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) ) + ( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) ) #define ICorProfilerInfo5_GetEventMask(This,pdwEvents) \ - ( (This)->lpVtbl -> GetEventMask(This,pdwEvents) ) + ( (This)->lpVtbl -> GetEventMask(This,pdwEvents) ) #define ICorProfilerInfo5_GetFunctionFromIP(This,ip,pFunctionId) \ - ( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) ) + ( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) ) #define ICorProfilerInfo5_GetFunctionFromToken(This,moduleId,token,pFunctionId) \ - ( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) ) + ( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) ) #define ICorProfilerInfo5_GetHandleFromThread(This,threadId,phThread) \ - ( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) ) + ( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) ) #define ICorProfilerInfo5_GetObjectSize(This,objectId,pcSize) \ - ( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) ) + ( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) ) #define ICorProfilerInfo5_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \ - ( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) ) + ( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) ) #define ICorProfilerInfo5_GetThreadInfo(This,threadId,pdwWin32ThreadId) \ - ( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) ) + ( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) ) #define ICorProfilerInfo5_GetCurrentThreadID(This,pThreadId) \ - ( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) ) + ( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) ) #define ICorProfilerInfo5_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \ - ( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) ) + ( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) ) #define ICorProfilerInfo5_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \ - ( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) ) + ( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) ) #define ICorProfilerInfo5_SetEventMask(This,dwEvents) \ - ( (This)->lpVtbl -> SetEventMask(This,dwEvents) ) + ( (This)->lpVtbl -> SetEventMask(This,dwEvents) ) #define ICorProfilerInfo5_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) #define ICorProfilerInfo5_SetFunctionIDMapper(This,pFunc) \ - ( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) ) + ( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) ) #define ICorProfilerInfo5_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \ - ( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) ) + ( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) ) #define ICorProfilerInfo5_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \ - ( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) ) + ( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) ) #define ICorProfilerInfo5_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \ - ( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) ) + ( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) ) #define ICorProfilerInfo5_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \ - ( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) ) + ( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) ) #define ICorProfilerInfo5_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \ - ( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) ) + ( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) ) #define ICorProfilerInfo5_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \ - ( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) ) + ( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) ) #define ICorProfilerInfo5_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \ - ( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) ) + ( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) ) #define ICorProfilerInfo5_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \ - ( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) ) + ( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) ) #define ICorProfilerInfo5_SetFunctionReJIT(This,functionId) \ - ( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) ) + ( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) ) #define ICorProfilerInfo5_ForceGC(This) \ - ( (This)->lpVtbl -> ForceGC(This) ) + ( (This)->lpVtbl -> ForceGC(This) ) #define ICorProfilerInfo5_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \ - ( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) ) + ( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) ) #define ICorProfilerInfo5_GetInprocInspectionInterface(This,ppicd) \ - ( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) ) + ( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) ) #define ICorProfilerInfo5_GetInprocInspectionIThisThread(This,ppicd) \ - ( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) ) + ( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) ) #define ICorProfilerInfo5_GetThreadContext(This,threadId,pContextId) \ - ( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) ) + ( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) ) #define ICorProfilerInfo5_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \ - ( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) ) + ( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) ) #define ICorProfilerInfo5_EndInprocDebugging(This,dwProfilerContext) \ - ( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) ) + ( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) ) #define ICorProfilerInfo5_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \ - ( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) ) + ( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) ) #define ICorProfilerInfo5_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \ - ( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) ) + ( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) ) #define ICorProfilerInfo5_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) #define ICorProfilerInfo5_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \ - ( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) ) + ( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) ) #define ICorProfilerInfo5_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \ - ( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) ) + ( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) ) #define ICorProfilerInfo5_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \ - ( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) ) + ( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) ) #define ICorProfilerInfo5_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \ - ( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) ) + ( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) ) #define ICorProfilerInfo5_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \ - ( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) ) + ( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) ) #define ICorProfilerInfo5_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \ - ( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) ) + ( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) ) #define ICorProfilerInfo5_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \ - ( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) ) + ( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) ) #define ICorProfilerInfo5_EnumModuleFrozenObjects(This,moduleID,ppEnum) \ - ( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) ) + ( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) ) #define ICorProfilerInfo5_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \ - ( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) ) + ( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) ) #define ICorProfilerInfo5_GetBoxClassLayout(This,classId,pBufferOffset) \ - ( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) ) + ( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) ) #define ICorProfilerInfo5_GetThreadAppDomain(This,threadId,pAppDomainId) \ - ( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) ) + ( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) ) #define ICorProfilerInfo5_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \ - ( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) ) + ( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) ) #define ICorProfilerInfo5_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \ - ( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) ) + ( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) ) #define ICorProfilerInfo5_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \ - ( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) ) + ( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) ) #define ICorProfilerInfo5_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \ - ( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) ) + ( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) ) #define ICorProfilerInfo5_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \ - ( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) ) + ( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) ) #define ICorProfilerInfo5_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \ - ( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) ) + ( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) ) #define ICorProfilerInfo5_GetObjectGeneration(This,objectId,range) \ - ( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) ) + ( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) ) #define ICorProfilerInfo5_GetNotifiedExceptionClauseInfo(This,pinfo) \ - ( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) ) + ( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) ) #define ICorProfilerInfo5_EnumJITedFunctions(This,ppEnum) \ - ( (This)->lpVtbl -> EnumJITedFunctions(This,ppEnum) ) + ( (This)->lpVtbl -> EnumJITedFunctions(This,ppEnum) ) #define ICorProfilerInfo5_RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) \ - ( (This)->lpVtbl -> RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) ) + ( (This)->lpVtbl -> RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) ) #define ICorProfilerInfo5_SetFunctionIDMapper2(This,pFunc,clientData) \ - ( (This)->lpVtbl -> SetFunctionIDMapper2(This,pFunc,clientData) ) + ( (This)->lpVtbl -> SetFunctionIDMapper2(This,pFunc,clientData) ) #define ICorProfilerInfo5_GetStringLayout2(This,pStringLengthOffset,pBufferOffset) \ - ( (This)->lpVtbl -> GetStringLayout2(This,pStringLengthOffset,pBufferOffset) ) + ( (This)->lpVtbl -> GetStringLayout2(This,pStringLengthOffset,pBufferOffset) ) #define ICorProfilerInfo5_SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) ) #define ICorProfilerInfo5_SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) ) #define ICorProfilerInfo5_GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) \ - ( (This)->lpVtbl -> GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) ) + ( (This)->lpVtbl -> GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) ) #define ICorProfilerInfo5_GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) \ - ( (This)->lpVtbl -> GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) ) + ( (This)->lpVtbl -> GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) ) #define ICorProfilerInfo5_GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) \ - ( (This)->lpVtbl -> GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) ) + ( (This)->lpVtbl -> GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) ) #define ICorProfilerInfo5_EnumModules(This,ppEnum) \ - ( (This)->lpVtbl -> EnumModules(This,ppEnum) ) + ( (This)->lpVtbl -> EnumModules(This,ppEnum) ) #define ICorProfilerInfo5_GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) \ - ( (This)->lpVtbl -> GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) ) + ( (This)->lpVtbl -> GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) ) #define ICorProfilerInfo5_GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) \ - ( (This)->lpVtbl -> GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) ) + ( (This)->lpVtbl -> GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) ) #define ICorProfilerInfo5_GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) \ - ( (This)->lpVtbl -> GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) ) + ( (This)->lpVtbl -> GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) ) #define ICorProfilerInfo5_GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) \ - ( (This)->lpVtbl -> GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) ) + ( (This)->lpVtbl -> GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) ) #define ICorProfilerInfo5_EnumThreads(This,ppEnum) \ - ( (This)->lpVtbl -> EnumThreads(This,ppEnum) ) + ( (This)->lpVtbl -> EnumThreads(This,ppEnum) ) #define ICorProfilerInfo5_InitializeCurrentThread(This) \ - ( (This)->lpVtbl -> InitializeCurrentThread(This) ) + ( (This)->lpVtbl -> InitializeCurrentThread(This) ) #define ICorProfilerInfo5_RequestReJIT(This,cFunctions,moduleIds,methodIds) \ - ( (This)->lpVtbl -> RequestReJIT(This,cFunctions,moduleIds,methodIds) ) + ( (This)->lpVtbl -> RequestReJIT(This,cFunctions,moduleIds,methodIds) ) #define ICorProfilerInfo5_RequestRevert(This,cFunctions,moduleIds,methodIds,status) \ - ( (This)->lpVtbl -> RequestRevert(This,cFunctions,moduleIds,methodIds,status) ) + ( (This)->lpVtbl -> RequestRevert(This,cFunctions,moduleIds,methodIds,status) ) #define ICorProfilerInfo5_GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) \ - ( (This)->lpVtbl -> GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) ) + ( (This)->lpVtbl -> GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) ) #define ICorProfilerInfo5_GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) \ - ( (This)->lpVtbl -> GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) ) + ( (This)->lpVtbl -> GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) ) #define ICorProfilerInfo5_GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) \ - ( (This)->lpVtbl -> GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) ) + ( (This)->lpVtbl -> GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) ) #define ICorProfilerInfo5_GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) \ - ( (This)->lpVtbl -> GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) ) + ( (This)->lpVtbl -> GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) ) #define ICorProfilerInfo5_EnumJITedFunctions2(This,ppEnum) \ - ( (This)->lpVtbl -> EnumJITedFunctions2(This,ppEnum) ) + ( (This)->lpVtbl -> EnumJITedFunctions2(This,ppEnum) ) #define ICorProfilerInfo5_GetObjectSize2(This,objectId,pcSize) \ - ( (This)->lpVtbl -> GetObjectSize2(This,objectId,pcSize) ) + ( (This)->lpVtbl -> GetObjectSize2(This,objectId,pcSize) ) #define ICorProfilerInfo5_GetEventMask2(This,pdwEventsLow,pdwEventsHigh) \ - ( (This)->lpVtbl -> GetEventMask2(This,pdwEventsLow,pdwEventsHigh) ) + ( (This)->lpVtbl -> GetEventMask2(This,pdwEventsLow,pdwEventsHigh) ) #define ICorProfilerInfo5_SetEventMask2(This,dwEventsLow,dwEventsHigh) \ - ( (This)->lpVtbl -> SetEventMask2(This,dwEventsLow,dwEventsHigh) ) + ( (This)->lpVtbl -> SetEventMask2(This,dwEventsLow,dwEventsHigh) ) #endif /* COBJMACROS */ @@ -11725,235 +12568,235 @@ EXTERN_C const IID IID_ICorProfilerInfo5; #define __ICorProfilerInfo6_INTERFACE_DEFINED__ /* interface ICorProfilerInfo6 */ -/* [local][unique][uuid][object] */ +/* [local][unique][uuid][object] */ EXTERN_C const IID IID_ICorProfilerInfo6; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("F30A070D-BFFB-46A7-B1D8-8781EF7B698A") ICorProfilerInfo6 : public ICorProfilerInfo5 { public: - virtual HRESULT STDMETHODCALLTYPE EnumNgenModuleMethodsInliningThisMethod( + virtual HRESULT STDMETHODCALLTYPE EnumNgenModuleMethodsInliningThisMethod( /* [in] */ ModuleID inlinersModuleId, /* [in] */ ModuleID inlineeModuleId, /* [in] */ mdMethodDef inlineeMethodId, /* [out] */ BOOL *incompleteData, /* [out] */ ICorProfilerMethodEnum **ppEnum) = 0; - + }; - - + + #else /* C style interface */ typedef struct ICorProfilerInfo6Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorProfilerInfo6 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorProfilerInfo6 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorProfilerInfo6 * This); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )( ICorProfilerInfo6 * This, /* [in] */ ObjectID objectId, /* [out] */ ClassID *pClassId); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )( ICorProfilerInfo6 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdTypeDef typeDef, /* [out] */ ClassID *pClassId); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )( ICorProfilerInfo6 * This, /* [in] */ FunctionID functionId, /* [out] */ LPCBYTE *pStart, /* [out] */ ULONG *pcSize); - - HRESULT ( STDMETHODCALLTYPE *GetEventMask )( + + HRESULT ( STDMETHODCALLTYPE *GetEventMask )( ICorProfilerInfo6 * This, /* [out] */ DWORD *pdwEvents); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )( ICorProfilerInfo6 * This, /* [in] */ LPCBYTE ip, /* [out] */ FunctionID *pFunctionId); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )( ICorProfilerInfo6 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdToken token, /* [out] */ FunctionID *pFunctionId); - - HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )( + + HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )( ICorProfilerInfo6 * This, /* [in] */ ThreadID threadId, /* [out] */ HANDLE *phThread); - - HRESULT ( STDMETHODCALLTYPE *GetObjectSize )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectSize )( ICorProfilerInfo6 * This, /* [in] */ ObjectID objectId, /* [out] */ ULONG *pcSize); - - HRESULT ( STDMETHODCALLTYPE *IsArrayClass )( + + HRESULT ( STDMETHODCALLTYPE *IsArrayClass )( ICorProfilerInfo6 * This, /* [in] */ ClassID classId, /* [out] */ CorElementType *pBaseElemType, /* [out] */ ClassID *pBaseClassId, /* [out] */ ULONG *pcRank); - - HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )( ICorProfilerInfo6 * This, /* [in] */ ThreadID threadId, /* [out] */ DWORD *pdwWin32ThreadId); - - HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )( + + HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )( ICorProfilerInfo6 * This, /* [out] */ ThreadID *pThreadId); - - HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )( ICorProfilerInfo6 * This, /* [in] */ ClassID classId, /* [out] */ ModuleID *pModuleId, /* [out] */ mdTypeDef *pTypeDefToken); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )( ICorProfilerInfo6 * This, /* [in] */ FunctionID functionId, /* [out] */ ClassID *pClassId, /* [out] */ ModuleID *pModuleId, /* [out] */ mdToken *pToken); - - HRESULT ( STDMETHODCALLTYPE *SetEventMask )( + + HRESULT ( STDMETHODCALLTYPE *SetEventMask )( ICorProfilerInfo6 * This, /* [in] */ DWORD dwEvents); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )( ICorProfilerInfo6 * This, /* [in] */ FunctionEnter *pFuncEnter, /* [in] */ FunctionLeave *pFuncLeave, /* [in] */ FunctionTailcall *pFuncTailcall); - - HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )( + + HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )( ICorProfilerInfo6 * This, /* [in] */ FunctionIDMapper *pFunc); - - HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )( + + HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )( ICorProfilerInfo6 * This, /* [in] */ FunctionID functionId, /* [in] */ REFIID riid, /* [out] */ IUnknown **ppImport, /* [out] */ mdToken *pToken); - - HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )( ICorProfilerInfo6 * This, /* [in] */ ModuleID moduleId, /* [out] */ LPCBYTE *ppBaseLoadAddress, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AssemblyID *pAssemblyId); - - HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )( ICorProfilerInfo6 * This, /* [in] */ ModuleID moduleId, /* [in] */ DWORD dwOpenFlags, /* [in] */ REFIID riid, /* [out] */ IUnknown **ppOut); - - HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )( + + HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )( ICorProfilerInfo6 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodId, /* [out] */ LPCBYTE *ppMethodHeader, /* [out] */ ULONG *pcbMethodSize); - - HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )( + + HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )( ICorProfilerInfo6 * This, /* [in] */ ModuleID moduleId, /* [out] */ IMethodMalloc **ppMalloc); - - HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )( + + HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )( ICorProfilerInfo6 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodid, /* [in] */ LPCBYTE pbNewILMethodHeader); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )( ICorProfilerInfo6 * This, /* [in] */ AppDomainID appDomainId, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ ProcessID *pProcessId); - - HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )( ICorProfilerInfo6 * This, /* [in] */ AssemblyID assemblyId, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AppDomainID *pAppDomainId, /* [out] */ ModuleID *pModuleId); - - HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )( + + HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )( ICorProfilerInfo6 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ForceGC )( + + HRESULT ( STDMETHODCALLTYPE *ForceGC )( ICorProfilerInfo6 * This); - - HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )( + + HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )( ICorProfilerInfo6 * This, /* [in] */ FunctionID functionId, /* [in] */ BOOL fStartJit, /* [in] */ ULONG cILMapEntries, /* [size_is][in] */ COR_IL_MAP rgILMapEntries[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )( + + HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )( ICorProfilerInfo6 * This, /* [out] */ IUnknown **ppicd); - - HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )( + + HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )( ICorProfilerInfo6 * This, /* [out] */ IUnknown **ppicd); - - HRESULT ( STDMETHODCALLTYPE *GetThreadContext )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadContext )( ICorProfilerInfo6 * This, /* [in] */ ThreadID threadId, /* [out] */ ContextID *pContextId); - - HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )( + + HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )( ICorProfilerInfo6 * This, /* [in] */ BOOL fThisThreadOnly, /* [out] */ DWORD *pdwProfilerContext); - - HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )( + + HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )( ICorProfilerInfo6 * This, /* [in] */ DWORD dwProfilerContext); - - HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )( + + HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )( ICorProfilerInfo6 * This, /* [in] */ FunctionID functionId, /* [in] */ ULONG32 cMap, /* [out] */ ULONG32 *pcMap, /* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]); - - HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )( + + HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )( ICorProfilerInfo6 * This, /* [in] */ ThreadID thread, /* [in] */ StackSnapshotCallback *callback, @@ -11961,14 +12804,14 @@ EXTERN_C const IID IID_ICorProfilerInfo6; /* [in] */ void *clientData, /* [size_is][in] */ BYTE context[ ], /* [in] */ ULONG32 contextSize); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )( ICorProfilerInfo6 * This, /* [in] */ FunctionEnter2 *pFuncEnter, /* [in] */ FunctionLeave2 *pFuncLeave, /* [in] */ FunctionTailcall2 *pFuncTailcall); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )( ICorProfilerInfo6 * This, /* [in] */ FunctionID funcId, /* [in] */ COR_PRF_FRAME_INFO frameInfo, @@ -11978,22 +12821,22 @@ EXTERN_C const IID IID_ICorProfilerInfo6; /* [in] */ ULONG32 cTypeArgs, /* [out] */ ULONG32 *pcTypeArgs, /* [out] */ ClassID typeArgs[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetStringLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetStringLayout )( ICorProfilerInfo6 * This, /* [out] */ ULONG *pBufferLengthOffset, /* [out] */ ULONG *pStringLengthOffset, /* [out] */ ULONG *pBufferOffset); - - HRESULT ( STDMETHODCALLTYPE *GetClassLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetClassLayout )( ICorProfilerInfo6 * This, /* [in] */ ClassID classID, /* [out][in] */ COR_FIELD_OFFSET rFieldOffset[ ], /* [in] */ ULONG cFieldOffset, /* [out] */ ULONG *pcFieldOffset, /* [out] */ ULONG *pulClassSize); - - HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )( ICorProfilerInfo6 * This, /* [in] */ ClassID classId, /* [out] */ ModuleID *pModuleId, @@ -12002,23 +12845,23 @@ EXTERN_C const IID IID_ICorProfilerInfo6; /* [in] */ ULONG32 cNumTypeArgs, /* [out] */ ULONG32 *pcNumTypeArgs, /* [out] */ ClassID typeArgs[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )( ICorProfilerInfo6 * This, /* [in] */ FunctionID functionID, /* [in] */ ULONG32 cCodeInfos, /* [out] */ ULONG32 *pcCodeInfos, /* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )( ICorProfilerInfo6 * This, /* [in] */ ModuleID moduleID, /* [in] */ mdTypeDef typeDef, /* [in] */ ULONG32 cTypeArgs, /* [size_is][in] */ ClassID typeArgs[ ], /* [out] */ ClassID *pClassID); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )( ICorProfilerInfo6 * This, /* [in] */ ModuleID moduleID, /* [in] */ mdMethodDef funcDef, @@ -12026,134 +12869,134 @@ EXTERN_C const IID IID_ICorProfilerInfo6; /* [in] */ ULONG32 cTypeArgs, /* [size_is][in] */ ClassID typeArgs[ ], /* [out] */ FunctionID *pFunctionID); - - HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )( + + HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )( ICorProfilerInfo6 * This, /* [in] */ ModuleID moduleID, /* [out] */ ICorProfilerObjectEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )( ICorProfilerInfo6 * This, /* [in] */ ObjectID objectId, /* [in] */ ULONG32 cDimensions, /* [size_is][out] */ ULONG32 pDimensionSizes[ ], /* [size_is][out] */ int pDimensionLowerBounds[ ], /* [out] */ BYTE **ppData); - - HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )( ICorProfilerInfo6 * This, /* [in] */ ClassID classId, /* [out] */ ULONG32 *pBufferOffset); - - HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )( ICorProfilerInfo6 * This, /* [in] */ ThreadID threadId, /* [out] */ AppDomainID *pAppDomainId); - - HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )( ICorProfilerInfo6 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )( ICorProfilerInfo6 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ AppDomainID appDomainId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )( ICorProfilerInfo6 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ ThreadID threadId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )( ICorProfilerInfo6 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ ContextID contextId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )( ICorProfilerInfo6 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [out] */ COR_PRF_STATIC_TYPE *pFieldInfo); - - HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )( + + HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )( ICorProfilerInfo6 * This, /* [in] */ ULONG cObjectRanges, /* [out] */ ULONG *pcObjectRanges, /* [length_is][size_is][out] */ COR_PRF_GC_GENERATION_RANGE ranges[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )( ICorProfilerInfo6 * This, /* [in] */ ObjectID objectId, /* [out] */ COR_PRF_GC_GENERATION_RANGE *range); - - HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )( ICorProfilerInfo6 * This, /* [out] */ COR_PRF_EX_CLAUSE_INFO *pinfo); - - HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions )( + + HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions )( ICorProfilerInfo6 * This, /* [out] */ ICorProfilerFunctionEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *RequestProfilerDetach )( + + HRESULT ( STDMETHODCALLTYPE *RequestProfilerDetach )( ICorProfilerInfo6 * This, /* [in] */ DWORD dwExpectedCompletionMilliseconds); - - HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper2 )( + + HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper2 )( ICorProfilerInfo6 * This, /* [in] */ FunctionIDMapper2 *pFunc, /* [in] */ void *clientData); - - HRESULT ( STDMETHODCALLTYPE *GetStringLayout2 )( + + HRESULT ( STDMETHODCALLTYPE *GetStringLayout2 )( ICorProfilerInfo6 * This, /* [out] */ ULONG *pStringLengthOffset, /* [out] */ ULONG *pBufferOffset); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3 )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3 )( ICorProfilerInfo6 * This, /* [in] */ FunctionEnter3 *pFuncEnter3, /* [in] */ FunctionLeave3 *pFuncLeave3, /* [in] */ FunctionTailcall3 *pFuncTailcall3); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3WithInfo )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3WithInfo )( ICorProfilerInfo6 * This, /* [in] */ FunctionEnter3WithInfo *pFuncEnter3WithInfo, /* [in] */ FunctionLeave3WithInfo *pFuncLeave3WithInfo, /* [in] */ FunctionTailcall3WithInfo *pFuncTailcall3WithInfo); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionEnter3Info )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionEnter3Info )( ICorProfilerInfo6 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_ELT_INFO eltInfo, /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo, /* [out][in] */ ULONG *pcbArgumentInfo, /* [size_is][out] */ COR_PRF_FUNCTION_ARGUMENT_INFO *pArgumentInfo); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionLeave3Info )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionLeave3Info )( ICorProfilerInfo6 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_ELT_INFO eltInfo, /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo, /* [out] */ COR_PRF_FUNCTION_ARGUMENT_RANGE *pRetvalRange); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionTailcall3Info )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionTailcall3Info )( ICorProfilerInfo6 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_ELT_INFO eltInfo, /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo); - - HRESULT ( STDMETHODCALLTYPE *EnumModules )( + + HRESULT ( STDMETHODCALLTYPE *EnumModules )( ICorProfilerInfo6 * This, /* [out] */ ICorProfilerModuleEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetRuntimeInformation )( + + HRESULT ( STDMETHODCALLTYPE *GetRuntimeInformation )( ICorProfilerInfo6 * This, /* [out] */ USHORT *pClrInstanceId, /* [out] */ COR_PRF_RUNTIME_TYPE *pRuntimeType, @@ -12163,111 +13006,111 @@ EXTERN_C const IID IID_ICorProfilerInfo6; /* [out] */ USHORT *pQFEVersion, /* [in] */ ULONG cchVersionString, /* [out] */ ULONG *pcchVersionString, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchVersionString, *pcchVersionString) WCHAR szVersionString[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress2 )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress2 )( ICorProfilerInfo6 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ AppDomainID appDomainId, /* [in] */ ThreadID threadId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainsContainingModule )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainsContainingModule )( ICorProfilerInfo6 * This, /* [in] */ ModuleID moduleId, /* [in] */ ULONG32 cAppDomainIds, /* [out] */ ULONG32 *pcAppDomainIds, /* [length_is][size_is][out] */ AppDomainID appDomainIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetModuleInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleInfo2 )( ICorProfilerInfo6 * This, /* [in] */ ModuleID moduleId, /* [out] */ LPCBYTE *ppBaseLoadAddress, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AssemblyID *pAssemblyId, /* [out] */ DWORD *pdwModuleFlags); - - HRESULT ( STDMETHODCALLTYPE *EnumThreads )( + + HRESULT ( STDMETHODCALLTYPE *EnumThreads )( ICorProfilerInfo6 * This, /* [out] */ ICorProfilerThreadEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *InitializeCurrentThread )( + + HRESULT ( STDMETHODCALLTYPE *InitializeCurrentThread )( ICorProfilerInfo6 * This); - - HRESULT ( STDMETHODCALLTYPE *RequestReJIT )( + + HRESULT ( STDMETHODCALLTYPE *RequestReJIT )( ICorProfilerInfo6 * This, /* [in] */ ULONG cFunctions, /* [size_is][in] */ ModuleID moduleIds[ ], /* [size_is][in] */ mdMethodDef methodIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *RequestRevert )( + + HRESULT ( STDMETHODCALLTYPE *RequestRevert )( ICorProfilerInfo6 * This, /* [in] */ ULONG cFunctions, /* [size_is][in] */ ModuleID moduleIds[ ], /* [size_is][in] */ mdMethodDef methodIds[ ], /* [size_is][out] */ HRESULT status[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo3 )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo3 )( ICorProfilerInfo6 * This, /* [in] */ FunctionID functionID, /* [in] */ ReJITID reJitId, /* [in] */ ULONG32 cCodeInfos, /* [out] */ ULONG32 *pcCodeInfos, /* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP2 )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP2 )( ICorProfilerInfo6 * This, /* [in] */ LPCBYTE ip, /* [out] */ FunctionID *pFunctionId, /* [out] */ ReJITID *pReJitId); - - HRESULT ( STDMETHODCALLTYPE *GetReJITIDs )( + + HRESULT ( STDMETHODCALLTYPE *GetReJITIDs )( ICorProfilerInfo6 * This, /* [in] */ FunctionID functionId, /* [in] */ ULONG cReJitIds, /* [out] */ ULONG *pcReJitIds, /* [length_is][size_is][out] */ ReJITID reJitIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping2 )( + + HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping2 )( ICorProfilerInfo6 * This, /* [in] */ FunctionID functionId, /* [in] */ ReJITID reJitId, /* [in] */ ULONG32 cMap, /* [out] */ ULONG32 *pcMap, /* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]); - - HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions2 )( + + HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions2 )( ICorProfilerInfo6 * This, /* [out] */ ICorProfilerFunctionEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetObjectSize2 )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectSize2 )( ICorProfilerInfo6 * This, /* [in] */ ObjectID objectId, /* [out] */ SIZE_T *pcSize); - - HRESULT ( STDMETHODCALLTYPE *GetEventMask2 )( + + HRESULT ( STDMETHODCALLTYPE *GetEventMask2 )( ICorProfilerInfo6 * This, /* [out] */ DWORD *pdwEventsLow, /* [out] */ DWORD *pdwEventsHigh); - - HRESULT ( STDMETHODCALLTYPE *SetEventMask2 )( + + HRESULT ( STDMETHODCALLTYPE *SetEventMask2 )( ICorProfilerInfo6 * This, /* [in] */ DWORD dwEventsLow, /* [in] */ DWORD dwEventsHigh); - - HRESULT ( STDMETHODCALLTYPE *EnumNgenModuleMethodsInliningThisMethod )( + + HRESULT ( STDMETHODCALLTYPE *EnumNgenModuleMethodsInliningThisMethod )( ICorProfilerInfo6 * This, /* [in] */ ModuleID inlinersModuleId, /* [in] */ ModuleID inlineeModuleId, /* [in] */ mdMethodDef inlineeMethodId, /* [out] */ BOOL *incompleteData, /* [out] */ ICorProfilerMethodEnum **ppEnum); - + END_INTERFACE } ICorProfilerInfo6Vtbl; @@ -12276,268 +13119,268 @@ EXTERN_C const IID IID_ICorProfilerInfo6; CONST_VTBL struct ICorProfilerInfo6Vtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ICorProfilerInfo6_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ICorProfilerInfo6_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ICorProfilerInfo6_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ICorProfilerInfo6_GetClassFromObject(This,objectId,pClassId) \ - ( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) ) + ( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) ) #define ICorProfilerInfo6_GetClassFromToken(This,moduleId,typeDef,pClassId) \ - ( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) ) + ( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) ) #define ICorProfilerInfo6_GetCodeInfo(This,functionId,pStart,pcSize) \ - ( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) ) + ( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) ) #define ICorProfilerInfo6_GetEventMask(This,pdwEvents) \ - ( (This)->lpVtbl -> GetEventMask(This,pdwEvents) ) + ( (This)->lpVtbl -> GetEventMask(This,pdwEvents) ) #define ICorProfilerInfo6_GetFunctionFromIP(This,ip,pFunctionId) \ - ( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) ) + ( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) ) #define ICorProfilerInfo6_GetFunctionFromToken(This,moduleId,token,pFunctionId) \ - ( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) ) + ( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) ) #define ICorProfilerInfo6_GetHandleFromThread(This,threadId,phThread) \ - ( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) ) + ( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) ) #define ICorProfilerInfo6_GetObjectSize(This,objectId,pcSize) \ - ( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) ) + ( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) ) #define ICorProfilerInfo6_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \ - ( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) ) + ( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) ) #define ICorProfilerInfo6_GetThreadInfo(This,threadId,pdwWin32ThreadId) \ - ( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) ) + ( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) ) #define ICorProfilerInfo6_GetCurrentThreadID(This,pThreadId) \ - ( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) ) + ( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) ) #define ICorProfilerInfo6_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \ - ( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) ) + ( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) ) #define ICorProfilerInfo6_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \ - ( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) ) + ( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) ) #define ICorProfilerInfo6_SetEventMask(This,dwEvents) \ - ( (This)->lpVtbl -> SetEventMask(This,dwEvents) ) + ( (This)->lpVtbl -> SetEventMask(This,dwEvents) ) #define ICorProfilerInfo6_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) #define ICorProfilerInfo6_SetFunctionIDMapper(This,pFunc) \ - ( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) ) + ( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) ) #define ICorProfilerInfo6_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \ - ( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) ) + ( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) ) #define ICorProfilerInfo6_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \ - ( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) ) + ( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) ) #define ICorProfilerInfo6_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \ - ( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) ) + ( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) ) #define ICorProfilerInfo6_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \ - ( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) ) + ( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) ) #define ICorProfilerInfo6_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \ - ( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) ) + ( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) ) #define ICorProfilerInfo6_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \ - ( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) ) + ( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) ) #define ICorProfilerInfo6_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \ - ( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) ) + ( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) ) #define ICorProfilerInfo6_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \ - ( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) ) + ( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) ) #define ICorProfilerInfo6_SetFunctionReJIT(This,functionId) \ - ( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) ) + ( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) ) #define ICorProfilerInfo6_ForceGC(This) \ - ( (This)->lpVtbl -> ForceGC(This) ) + ( (This)->lpVtbl -> ForceGC(This) ) #define ICorProfilerInfo6_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \ - ( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) ) + ( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) ) #define ICorProfilerInfo6_GetInprocInspectionInterface(This,ppicd) \ - ( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) ) + ( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) ) #define ICorProfilerInfo6_GetInprocInspectionIThisThread(This,ppicd) \ - ( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) ) + ( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) ) #define ICorProfilerInfo6_GetThreadContext(This,threadId,pContextId) \ - ( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) ) + ( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) ) #define ICorProfilerInfo6_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \ - ( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) ) + ( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) ) #define ICorProfilerInfo6_EndInprocDebugging(This,dwProfilerContext) \ - ( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) ) + ( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) ) #define ICorProfilerInfo6_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \ - ( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) ) + ( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) ) #define ICorProfilerInfo6_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \ - ( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) ) + ( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) ) #define ICorProfilerInfo6_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) #define ICorProfilerInfo6_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \ - ( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) ) + ( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) ) #define ICorProfilerInfo6_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \ - ( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) ) + ( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) ) #define ICorProfilerInfo6_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \ - ( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) ) + ( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) ) #define ICorProfilerInfo6_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \ - ( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) ) + ( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) ) #define ICorProfilerInfo6_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \ - ( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) ) + ( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) ) #define ICorProfilerInfo6_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \ - ( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) ) + ( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) ) #define ICorProfilerInfo6_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \ - ( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) ) + ( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) ) #define ICorProfilerInfo6_EnumModuleFrozenObjects(This,moduleID,ppEnum) \ - ( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) ) + ( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) ) #define ICorProfilerInfo6_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \ - ( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) ) + ( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) ) #define ICorProfilerInfo6_GetBoxClassLayout(This,classId,pBufferOffset) \ - ( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) ) + ( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) ) #define ICorProfilerInfo6_GetThreadAppDomain(This,threadId,pAppDomainId) \ - ( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) ) + ( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) ) #define ICorProfilerInfo6_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \ - ( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) ) + ( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) ) #define ICorProfilerInfo6_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \ - ( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) ) + ( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) ) #define ICorProfilerInfo6_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \ - ( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) ) + ( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) ) #define ICorProfilerInfo6_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \ - ( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) ) + ( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) ) #define ICorProfilerInfo6_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \ - ( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) ) + ( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) ) #define ICorProfilerInfo6_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \ - ( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) ) + ( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) ) #define ICorProfilerInfo6_GetObjectGeneration(This,objectId,range) \ - ( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) ) + ( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) ) #define ICorProfilerInfo6_GetNotifiedExceptionClauseInfo(This,pinfo) \ - ( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) ) + ( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) ) #define ICorProfilerInfo6_EnumJITedFunctions(This,ppEnum) \ - ( (This)->lpVtbl -> EnumJITedFunctions(This,ppEnum) ) + ( (This)->lpVtbl -> EnumJITedFunctions(This,ppEnum) ) #define ICorProfilerInfo6_RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) \ - ( (This)->lpVtbl -> RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) ) + ( (This)->lpVtbl -> RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) ) #define ICorProfilerInfo6_SetFunctionIDMapper2(This,pFunc,clientData) \ - ( (This)->lpVtbl -> SetFunctionIDMapper2(This,pFunc,clientData) ) + ( (This)->lpVtbl -> SetFunctionIDMapper2(This,pFunc,clientData) ) #define ICorProfilerInfo6_GetStringLayout2(This,pStringLengthOffset,pBufferOffset) \ - ( (This)->lpVtbl -> GetStringLayout2(This,pStringLengthOffset,pBufferOffset) ) + ( (This)->lpVtbl -> GetStringLayout2(This,pStringLengthOffset,pBufferOffset) ) #define ICorProfilerInfo6_SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) ) #define ICorProfilerInfo6_SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) ) #define ICorProfilerInfo6_GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) \ - ( (This)->lpVtbl -> GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) ) + ( (This)->lpVtbl -> GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) ) #define ICorProfilerInfo6_GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) \ - ( (This)->lpVtbl -> GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) ) + ( (This)->lpVtbl -> GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) ) #define ICorProfilerInfo6_GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) \ - ( (This)->lpVtbl -> GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) ) + ( (This)->lpVtbl -> GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) ) #define ICorProfilerInfo6_EnumModules(This,ppEnum) \ - ( (This)->lpVtbl -> EnumModules(This,ppEnum) ) + ( (This)->lpVtbl -> EnumModules(This,ppEnum) ) #define ICorProfilerInfo6_GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) \ - ( (This)->lpVtbl -> GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) ) + ( (This)->lpVtbl -> GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) ) #define ICorProfilerInfo6_GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) \ - ( (This)->lpVtbl -> GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) ) + ( (This)->lpVtbl -> GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) ) #define ICorProfilerInfo6_GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) \ - ( (This)->lpVtbl -> GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) ) + ( (This)->lpVtbl -> GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) ) #define ICorProfilerInfo6_GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) \ - ( (This)->lpVtbl -> GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) ) + ( (This)->lpVtbl -> GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) ) #define ICorProfilerInfo6_EnumThreads(This,ppEnum) \ - ( (This)->lpVtbl -> EnumThreads(This,ppEnum) ) + ( (This)->lpVtbl -> EnumThreads(This,ppEnum) ) #define ICorProfilerInfo6_InitializeCurrentThread(This) \ - ( (This)->lpVtbl -> InitializeCurrentThread(This) ) + ( (This)->lpVtbl -> InitializeCurrentThread(This) ) #define ICorProfilerInfo6_RequestReJIT(This,cFunctions,moduleIds,methodIds) \ - ( (This)->lpVtbl -> RequestReJIT(This,cFunctions,moduleIds,methodIds) ) + ( (This)->lpVtbl -> RequestReJIT(This,cFunctions,moduleIds,methodIds) ) #define ICorProfilerInfo6_RequestRevert(This,cFunctions,moduleIds,methodIds,status) \ - ( (This)->lpVtbl -> RequestRevert(This,cFunctions,moduleIds,methodIds,status) ) + ( (This)->lpVtbl -> RequestRevert(This,cFunctions,moduleIds,methodIds,status) ) #define ICorProfilerInfo6_GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) \ - ( (This)->lpVtbl -> GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) ) + ( (This)->lpVtbl -> GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) ) #define ICorProfilerInfo6_GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) \ - ( (This)->lpVtbl -> GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) ) + ( (This)->lpVtbl -> GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) ) #define ICorProfilerInfo6_GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) \ - ( (This)->lpVtbl -> GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) ) + ( (This)->lpVtbl -> GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) ) #define ICorProfilerInfo6_GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) \ - ( (This)->lpVtbl -> GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) ) + ( (This)->lpVtbl -> GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) ) #define ICorProfilerInfo6_EnumJITedFunctions2(This,ppEnum) \ - ( (This)->lpVtbl -> EnumJITedFunctions2(This,ppEnum) ) + ( (This)->lpVtbl -> EnumJITedFunctions2(This,ppEnum) ) #define ICorProfilerInfo6_GetObjectSize2(This,objectId,pcSize) \ - ( (This)->lpVtbl -> GetObjectSize2(This,objectId,pcSize) ) + ( (This)->lpVtbl -> GetObjectSize2(This,objectId,pcSize) ) #define ICorProfilerInfo6_GetEventMask2(This,pdwEventsLow,pdwEventsHigh) \ - ( (This)->lpVtbl -> GetEventMask2(This,pdwEventsLow,pdwEventsHigh) ) + ( (This)->lpVtbl -> GetEventMask2(This,pdwEventsLow,pdwEventsHigh) ) #define ICorProfilerInfo6_SetEventMask2(This,dwEventsLow,dwEventsHigh) \ - ( (This)->lpVtbl -> SetEventMask2(This,dwEventsLow,dwEventsHigh) ) + ( (This)->lpVtbl -> SetEventMask2(This,dwEventsLow,dwEventsHigh) ) #define ICorProfilerInfo6_EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) \ - ( (This)->lpVtbl -> EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) ) + ( (This)->lpVtbl -> EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) ) #endif /* COBJMACROS */ @@ -12554,242 +13397,242 @@ EXTERN_C const IID IID_ICorProfilerInfo6; #define __ICorProfilerInfo7_INTERFACE_DEFINED__ /* interface ICorProfilerInfo7 */ -/* [local][unique][uuid][object] */ +/* [local][unique][uuid][object] */ EXTERN_C const IID IID_ICorProfilerInfo7; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("9AEECC0D-63E0-4187-8C00-E312F503F663") ICorProfilerInfo7 : public ICorProfilerInfo6 { public: - virtual HRESULT STDMETHODCALLTYPE ApplyMetaData( + virtual HRESULT STDMETHODCALLTYPE ApplyMetaData( /* [in] */ ModuleID moduleId) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetInMemorySymbolsLength( + + virtual HRESULT STDMETHODCALLTYPE GetInMemorySymbolsLength( /* [in] */ ModuleID moduleId, /* [out] */ DWORD *pCountSymbolBytes) = 0; - - virtual HRESULT STDMETHODCALLTYPE ReadInMemorySymbols( + + virtual HRESULT STDMETHODCALLTYPE ReadInMemorySymbols( /* [in] */ ModuleID moduleId, /* [in] */ DWORD symbolsReadOffset, /* [out] */ BYTE *pSymbolBytes, /* [in] */ DWORD countSymbolBytes, /* [out] */ DWORD *pCountSymbolBytesRead) = 0; - + }; - - + + #else /* C style interface */ typedef struct ICorProfilerInfo7Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorProfilerInfo7 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorProfilerInfo7 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorProfilerInfo7 * This); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )( ICorProfilerInfo7 * This, /* [in] */ ObjectID objectId, /* [out] */ ClassID *pClassId); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )( ICorProfilerInfo7 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdTypeDef typeDef, /* [out] */ ClassID *pClassId); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )( ICorProfilerInfo7 * This, /* [in] */ FunctionID functionId, /* [out] */ LPCBYTE *pStart, /* [out] */ ULONG *pcSize); - - HRESULT ( STDMETHODCALLTYPE *GetEventMask )( + + HRESULT ( STDMETHODCALLTYPE *GetEventMask )( ICorProfilerInfo7 * This, /* [out] */ DWORD *pdwEvents); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )( ICorProfilerInfo7 * This, /* [in] */ LPCBYTE ip, /* [out] */ FunctionID *pFunctionId); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )( ICorProfilerInfo7 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdToken token, /* [out] */ FunctionID *pFunctionId); - - HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )( + + HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )( ICorProfilerInfo7 * This, /* [in] */ ThreadID threadId, /* [out] */ HANDLE *phThread); - - HRESULT ( STDMETHODCALLTYPE *GetObjectSize )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectSize )( ICorProfilerInfo7 * This, /* [in] */ ObjectID objectId, /* [out] */ ULONG *pcSize); - - HRESULT ( STDMETHODCALLTYPE *IsArrayClass )( + + HRESULT ( STDMETHODCALLTYPE *IsArrayClass )( ICorProfilerInfo7 * This, /* [in] */ ClassID classId, /* [out] */ CorElementType *pBaseElemType, /* [out] */ ClassID *pBaseClassId, /* [out] */ ULONG *pcRank); - - HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )( ICorProfilerInfo7 * This, /* [in] */ ThreadID threadId, /* [out] */ DWORD *pdwWin32ThreadId); - - HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )( + + HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )( ICorProfilerInfo7 * This, /* [out] */ ThreadID *pThreadId); - - HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )( ICorProfilerInfo7 * This, /* [in] */ ClassID classId, /* [out] */ ModuleID *pModuleId, /* [out] */ mdTypeDef *pTypeDefToken); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )( ICorProfilerInfo7 * This, /* [in] */ FunctionID functionId, /* [out] */ ClassID *pClassId, /* [out] */ ModuleID *pModuleId, /* [out] */ mdToken *pToken); - - HRESULT ( STDMETHODCALLTYPE *SetEventMask )( + + HRESULT ( STDMETHODCALLTYPE *SetEventMask )( ICorProfilerInfo7 * This, /* [in] */ DWORD dwEvents); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )( ICorProfilerInfo7 * This, /* [in] */ FunctionEnter *pFuncEnter, /* [in] */ FunctionLeave *pFuncLeave, /* [in] */ FunctionTailcall *pFuncTailcall); - - HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )( + + HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )( ICorProfilerInfo7 * This, /* [in] */ FunctionIDMapper *pFunc); - - HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )( + + HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )( ICorProfilerInfo7 * This, /* [in] */ FunctionID functionId, /* [in] */ REFIID riid, /* [out] */ IUnknown **ppImport, /* [out] */ mdToken *pToken); - - HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )( ICorProfilerInfo7 * This, /* [in] */ ModuleID moduleId, /* [out] */ LPCBYTE *ppBaseLoadAddress, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AssemblyID *pAssemblyId); - - HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )( ICorProfilerInfo7 * This, /* [in] */ ModuleID moduleId, /* [in] */ DWORD dwOpenFlags, /* [in] */ REFIID riid, /* [out] */ IUnknown **ppOut); - - HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )( + + HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )( ICorProfilerInfo7 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodId, /* [out] */ LPCBYTE *ppMethodHeader, /* [out] */ ULONG *pcbMethodSize); - - HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )( + + HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )( ICorProfilerInfo7 * This, /* [in] */ ModuleID moduleId, /* [out] */ IMethodMalloc **ppMalloc); - - HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )( + + HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )( ICorProfilerInfo7 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodid, /* [in] */ LPCBYTE pbNewILMethodHeader); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )( ICorProfilerInfo7 * This, /* [in] */ AppDomainID appDomainId, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ ProcessID *pProcessId); - - HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )( ICorProfilerInfo7 * This, /* [in] */ AssemblyID assemblyId, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AppDomainID *pAppDomainId, /* [out] */ ModuleID *pModuleId); - - HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )( + + HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )( ICorProfilerInfo7 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ForceGC )( + + HRESULT ( STDMETHODCALLTYPE *ForceGC )( ICorProfilerInfo7 * This); - - HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )( + + HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )( ICorProfilerInfo7 * This, /* [in] */ FunctionID functionId, /* [in] */ BOOL fStartJit, /* [in] */ ULONG cILMapEntries, /* [size_is][in] */ COR_IL_MAP rgILMapEntries[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )( + + HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )( ICorProfilerInfo7 * This, /* [out] */ IUnknown **ppicd); - - HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )( + + HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )( ICorProfilerInfo7 * This, /* [out] */ IUnknown **ppicd); - - HRESULT ( STDMETHODCALLTYPE *GetThreadContext )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadContext )( ICorProfilerInfo7 * This, /* [in] */ ThreadID threadId, /* [out] */ ContextID *pContextId); - - HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )( + + HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )( ICorProfilerInfo7 * This, /* [in] */ BOOL fThisThreadOnly, /* [out] */ DWORD *pdwProfilerContext); - - HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )( + + HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )( ICorProfilerInfo7 * This, /* [in] */ DWORD dwProfilerContext); - - HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )( + + HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )( ICorProfilerInfo7 * This, /* [in] */ FunctionID functionId, /* [in] */ ULONG32 cMap, /* [out] */ ULONG32 *pcMap, /* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]); - - HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )( + + HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )( ICorProfilerInfo7 * This, /* [in] */ ThreadID thread, /* [in] */ StackSnapshotCallback *callback, @@ -12797,14 +13640,14 @@ EXTERN_C const IID IID_ICorProfilerInfo7; /* [in] */ void *clientData, /* [size_is][in] */ BYTE context[ ], /* [in] */ ULONG32 contextSize); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )( ICorProfilerInfo7 * This, /* [in] */ FunctionEnter2 *pFuncEnter, /* [in] */ FunctionLeave2 *pFuncLeave, /* [in] */ FunctionTailcall2 *pFuncTailcall); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )( ICorProfilerInfo7 * This, /* [in] */ FunctionID funcId, /* [in] */ COR_PRF_FRAME_INFO frameInfo, @@ -12814,22 +13657,22 @@ EXTERN_C const IID IID_ICorProfilerInfo7; /* [in] */ ULONG32 cTypeArgs, /* [out] */ ULONG32 *pcTypeArgs, /* [out] */ ClassID typeArgs[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetStringLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetStringLayout )( ICorProfilerInfo7 * This, /* [out] */ ULONG *pBufferLengthOffset, /* [out] */ ULONG *pStringLengthOffset, /* [out] */ ULONG *pBufferOffset); - - HRESULT ( STDMETHODCALLTYPE *GetClassLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetClassLayout )( ICorProfilerInfo7 * This, /* [in] */ ClassID classID, /* [out][in] */ COR_FIELD_OFFSET rFieldOffset[ ], /* [in] */ ULONG cFieldOffset, /* [out] */ ULONG *pcFieldOffset, /* [out] */ ULONG *pulClassSize); - - HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )( ICorProfilerInfo7 * This, /* [in] */ ClassID classId, /* [out] */ ModuleID *pModuleId, @@ -12838,23 +13681,23 @@ EXTERN_C const IID IID_ICorProfilerInfo7; /* [in] */ ULONG32 cNumTypeArgs, /* [out] */ ULONG32 *pcNumTypeArgs, /* [out] */ ClassID typeArgs[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )( ICorProfilerInfo7 * This, /* [in] */ FunctionID functionID, /* [in] */ ULONG32 cCodeInfos, /* [out] */ ULONG32 *pcCodeInfos, /* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )( ICorProfilerInfo7 * This, /* [in] */ ModuleID moduleID, /* [in] */ mdTypeDef typeDef, /* [in] */ ULONG32 cTypeArgs, /* [size_is][in] */ ClassID typeArgs[ ], /* [out] */ ClassID *pClassID); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )( ICorProfilerInfo7 * This, /* [in] */ ModuleID moduleID, /* [in] */ mdMethodDef funcDef, @@ -12862,134 +13705,134 @@ EXTERN_C const IID IID_ICorProfilerInfo7; /* [in] */ ULONG32 cTypeArgs, /* [size_is][in] */ ClassID typeArgs[ ], /* [out] */ FunctionID *pFunctionID); - - HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )( + + HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )( ICorProfilerInfo7 * This, /* [in] */ ModuleID moduleID, /* [out] */ ICorProfilerObjectEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )( ICorProfilerInfo7 * This, /* [in] */ ObjectID objectId, /* [in] */ ULONG32 cDimensions, /* [size_is][out] */ ULONG32 pDimensionSizes[ ], /* [size_is][out] */ int pDimensionLowerBounds[ ], /* [out] */ BYTE **ppData); - - HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )( ICorProfilerInfo7 * This, /* [in] */ ClassID classId, /* [out] */ ULONG32 *pBufferOffset); - - HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )( ICorProfilerInfo7 * This, /* [in] */ ThreadID threadId, /* [out] */ AppDomainID *pAppDomainId); - - HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )( ICorProfilerInfo7 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )( ICorProfilerInfo7 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ AppDomainID appDomainId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )( ICorProfilerInfo7 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ ThreadID threadId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )( ICorProfilerInfo7 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ ContextID contextId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )( ICorProfilerInfo7 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [out] */ COR_PRF_STATIC_TYPE *pFieldInfo); - - HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )( + + HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )( ICorProfilerInfo7 * This, /* [in] */ ULONG cObjectRanges, /* [out] */ ULONG *pcObjectRanges, /* [length_is][size_is][out] */ COR_PRF_GC_GENERATION_RANGE ranges[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )( ICorProfilerInfo7 * This, /* [in] */ ObjectID objectId, /* [out] */ COR_PRF_GC_GENERATION_RANGE *range); - - HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )( ICorProfilerInfo7 * This, /* [out] */ COR_PRF_EX_CLAUSE_INFO *pinfo); - - HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions )( + + HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions )( ICorProfilerInfo7 * This, /* [out] */ ICorProfilerFunctionEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *RequestProfilerDetach )( + + HRESULT ( STDMETHODCALLTYPE *RequestProfilerDetach )( ICorProfilerInfo7 * This, /* [in] */ DWORD dwExpectedCompletionMilliseconds); - - HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper2 )( + + HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper2 )( ICorProfilerInfo7 * This, /* [in] */ FunctionIDMapper2 *pFunc, /* [in] */ void *clientData); - - HRESULT ( STDMETHODCALLTYPE *GetStringLayout2 )( + + HRESULT ( STDMETHODCALLTYPE *GetStringLayout2 )( ICorProfilerInfo7 * This, /* [out] */ ULONG *pStringLengthOffset, /* [out] */ ULONG *pBufferOffset); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3 )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3 )( ICorProfilerInfo7 * This, /* [in] */ FunctionEnter3 *pFuncEnter3, /* [in] */ FunctionLeave3 *pFuncLeave3, /* [in] */ FunctionTailcall3 *pFuncTailcall3); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3WithInfo )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3WithInfo )( ICorProfilerInfo7 * This, /* [in] */ FunctionEnter3WithInfo *pFuncEnter3WithInfo, /* [in] */ FunctionLeave3WithInfo *pFuncLeave3WithInfo, /* [in] */ FunctionTailcall3WithInfo *pFuncTailcall3WithInfo); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionEnter3Info )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionEnter3Info )( ICorProfilerInfo7 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_ELT_INFO eltInfo, /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo, /* [out][in] */ ULONG *pcbArgumentInfo, /* [size_is][out] */ COR_PRF_FUNCTION_ARGUMENT_INFO *pArgumentInfo); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionLeave3Info )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionLeave3Info )( ICorProfilerInfo7 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_ELT_INFO eltInfo, /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo, /* [out] */ COR_PRF_FUNCTION_ARGUMENT_RANGE *pRetvalRange); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionTailcall3Info )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionTailcall3Info )( ICorProfilerInfo7 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_ELT_INFO eltInfo, /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo); - - HRESULT ( STDMETHODCALLTYPE *EnumModules )( + + HRESULT ( STDMETHODCALLTYPE *EnumModules )( ICorProfilerInfo7 * This, /* [out] */ ICorProfilerModuleEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetRuntimeInformation )( + + HRESULT ( STDMETHODCALLTYPE *GetRuntimeInformation )( ICorProfilerInfo7 * This, /* [out] */ USHORT *pClrInstanceId, /* [out] */ COR_PRF_RUNTIME_TYPE *pRuntimeType, @@ -12999,128 +13842,128 @@ EXTERN_C const IID IID_ICorProfilerInfo7; /* [out] */ USHORT *pQFEVersion, /* [in] */ ULONG cchVersionString, /* [out] */ ULONG *pcchVersionString, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchVersionString, *pcchVersionString) WCHAR szVersionString[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress2 )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress2 )( ICorProfilerInfo7 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ AppDomainID appDomainId, /* [in] */ ThreadID threadId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainsContainingModule )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainsContainingModule )( ICorProfilerInfo7 * This, /* [in] */ ModuleID moduleId, /* [in] */ ULONG32 cAppDomainIds, /* [out] */ ULONG32 *pcAppDomainIds, /* [length_is][size_is][out] */ AppDomainID appDomainIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetModuleInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleInfo2 )( ICorProfilerInfo7 * This, /* [in] */ ModuleID moduleId, /* [out] */ LPCBYTE *ppBaseLoadAddress, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AssemblyID *pAssemblyId, /* [out] */ DWORD *pdwModuleFlags); - - HRESULT ( STDMETHODCALLTYPE *EnumThreads )( + + HRESULT ( STDMETHODCALLTYPE *EnumThreads )( ICorProfilerInfo7 * This, /* [out] */ ICorProfilerThreadEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *InitializeCurrentThread )( + + HRESULT ( STDMETHODCALLTYPE *InitializeCurrentThread )( ICorProfilerInfo7 * This); - - HRESULT ( STDMETHODCALLTYPE *RequestReJIT )( + + HRESULT ( STDMETHODCALLTYPE *RequestReJIT )( ICorProfilerInfo7 * This, /* [in] */ ULONG cFunctions, /* [size_is][in] */ ModuleID moduleIds[ ], /* [size_is][in] */ mdMethodDef methodIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *RequestRevert )( + + HRESULT ( STDMETHODCALLTYPE *RequestRevert )( ICorProfilerInfo7 * This, /* [in] */ ULONG cFunctions, /* [size_is][in] */ ModuleID moduleIds[ ], /* [size_is][in] */ mdMethodDef methodIds[ ], /* [size_is][out] */ HRESULT status[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo3 )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo3 )( ICorProfilerInfo7 * This, /* [in] */ FunctionID functionID, /* [in] */ ReJITID reJitId, /* [in] */ ULONG32 cCodeInfos, /* [out] */ ULONG32 *pcCodeInfos, /* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP2 )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP2 )( ICorProfilerInfo7 * This, /* [in] */ LPCBYTE ip, /* [out] */ FunctionID *pFunctionId, /* [out] */ ReJITID *pReJitId); - - HRESULT ( STDMETHODCALLTYPE *GetReJITIDs )( + + HRESULT ( STDMETHODCALLTYPE *GetReJITIDs )( ICorProfilerInfo7 * This, /* [in] */ FunctionID functionId, /* [in] */ ULONG cReJitIds, /* [out] */ ULONG *pcReJitIds, /* [length_is][size_is][out] */ ReJITID reJitIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping2 )( + + HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping2 )( ICorProfilerInfo7 * This, /* [in] */ FunctionID functionId, /* [in] */ ReJITID reJitId, /* [in] */ ULONG32 cMap, /* [out] */ ULONG32 *pcMap, /* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]); - - HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions2 )( + + HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions2 )( ICorProfilerInfo7 * This, /* [out] */ ICorProfilerFunctionEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetObjectSize2 )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectSize2 )( ICorProfilerInfo7 * This, /* [in] */ ObjectID objectId, /* [out] */ SIZE_T *pcSize); - - HRESULT ( STDMETHODCALLTYPE *GetEventMask2 )( + + HRESULT ( STDMETHODCALLTYPE *GetEventMask2 )( ICorProfilerInfo7 * This, /* [out] */ DWORD *pdwEventsLow, /* [out] */ DWORD *pdwEventsHigh); - - HRESULT ( STDMETHODCALLTYPE *SetEventMask2 )( + + HRESULT ( STDMETHODCALLTYPE *SetEventMask2 )( ICorProfilerInfo7 * This, /* [in] */ DWORD dwEventsLow, /* [in] */ DWORD dwEventsHigh); - - HRESULT ( STDMETHODCALLTYPE *EnumNgenModuleMethodsInliningThisMethod )( + + HRESULT ( STDMETHODCALLTYPE *EnumNgenModuleMethodsInliningThisMethod )( ICorProfilerInfo7 * This, /* [in] */ ModuleID inlinersModuleId, /* [in] */ ModuleID inlineeModuleId, /* [in] */ mdMethodDef inlineeMethodId, /* [out] */ BOOL *incompleteData, /* [out] */ ICorProfilerMethodEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *ApplyMetaData )( + + HRESULT ( STDMETHODCALLTYPE *ApplyMetaData )( ICorProfilerInfo7 * This, /* [in] */ ModuleID moduleId); - - HRESULT ( STDMETHODCALLTYPE *GetInMemorySymbolsLength )( + + HRESULT ( STDMETHODCALLTYPE *GetInMemorySymbolsLength )( ICorProfilerInfo7 * This, /* [in] */ ModuleID moduleId, /* [out] */ DWORD *pCountSymbolBytes); - - HRESULT ( STDMETHODCALLTYPE *ReadInMemorySymbols )( + + HRESULT ( STDMETHODCALLTYPE *ReadInMemorySymbols )( ICorProfilerInfo7 * This, /* [in] */ ModuleID moduleId, /* [in] */ DWORD symbolsReadOffset, /* [out] */ BYTE *pSymbolBytes, /* [in] */ DWORD countSymbolBytes, /* [out] */ DWORD *pCountSymbolBytesRead); - + END_INTERFACE } ICorProfilerInfo7Vtbl; @@ -13129,278 +13972,278 @@ EXTERN_C const IID IID_ICorProfilerInfo7; CONST_VTBL struct ICorProfilerInfo7Vtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ICorProfilerInfo7_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ICorProfilerInfo7_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ICorProfilerInfo7_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ICorProfilerInfo7_GetClassFromObject(This,objectId,pClassId) \ - ( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) ) + ( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) ) #define ICorProfilerInfo7_GetClassFromToken(This,moduleId,typeDef,pClassId) \ - ( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) ) + ( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) ) #define ICorProfilerInfo7_GetCodeInfo(This,functionId,pStart,pcSize) \ - ( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) ) + ( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) ) #define ICorProfilerInfo7_GetEventMask(This,pdwEvents) \ - ( (This)->lpVtbl -> GetEventMask(This,pdwEvents) ) + ( (This)->lpVtbl -> GetEventMask(This,pdwEvents) ) #define ICorProfilerInfo7_GetFunctionFromIP(This,ip,pFunctionId) \ - ( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) ) + ( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) ) #define ICorProfilerInfo7_GetFunctionFromToken(This,moduleId,token,pFunctionId) \ - ( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) ) + ( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) ) #define ICorProfilerInfo7_GetHandleFromThread(This,threadId,phThread) \ - ( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) ) + ( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) ) #define ICorProfilerInfo7_GetObjectSize(This,objectId,pcSize) \ - ( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) ) + ( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) ) #define ICorProfilerInfo7_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \ - ( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) ) + ( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) ) #define ICorProfilerInfo7_GetThreadInfo(This,threadId,pdwWin32ThreadId) \ - ( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) ) + ( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) ) #define ICorProfilerInfo7_GetCurrentThreadID(This,pThreadId) \ - ( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) ) + ( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) ) #define ICorProfilerInfo7_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \ - ( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) ) + ( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) ) #define ICorProfilerInfo7_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \ - ( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) ) + ( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) ) #define ICorProfilerInfo7_SetEventMask(This,dwEvents) \ - ( (This)->lpVtbl -> SetEventMask(This,dwEvents) ) + ( (This)->lpVtbl -> SetEventMask(This,dwEvents) ) #define ICorProfilerInfo7_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) #define ICorProfilerInfo7_SetFunctionIDMapper(This,pFunc) \ - ( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) ) + ( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) ) #define ICorProfilerInfo7_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \ - ( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) ) + ( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) ) #define ICorProfilerInfo7_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \ - ( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) ) + ( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) ) #define ICorProfilerInfo7_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \ - ( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) ) + ( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) ) #define ICorProfilerInfo7_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \ - ( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) ) + ( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) ) #define ICorProfilerInfo7_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \ - ( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) ) + ( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) ) #define ICorProfilerInfo7_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \ - ( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) ) + ( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) ) #define ICorProfilerInfo7_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \ - ( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) ) + ( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) ) #define ICorProfilerInfo7_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \ - ( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) ) + ( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) ) #define ICorProfilerInfo7_SetFunctionReJIT(This,functionId) \ - ( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) ) + ( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) ) #define ICorProfilerInfo7_ForceGC(This) \ - ( (This)->lpVtbl -> ForceGC(This) ) + ( (This)->lpVtbl -> ForceGC(This) ) #define ICorProfilerInfo7_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \ - ( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) ) + ( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) ) #define ICorProfilerInfo7_GetInprocInspectionInterface(This,ppicd) \ - ( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) ) + ( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) ) #define ICorProfilerInfo7_GetInprocInspectionIThisThread(This,ppicd) \ - ( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) ) + ( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) ) #define ICorProfilerInfo7_GetThreadContext(This,threadId,pContextId) \ - ( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) ) + ( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) ) #define ICorProfilerInfo7_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \ - ( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) ) + ( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) ) #define ICorProfilerInfo7_EndInprocDebugging(This,dwProfilerContext) \ - ( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) ) + ( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) ) #define ICorProfilerInfo7_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \ - ( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) ) + ( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) ) #define ICorProfilerInfo7_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \ - ( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) ) + ( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) ) #define ICorProfilerInfo7_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) #define ICorProfilerInfo7_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \ - ( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) ) + ( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) ) #define ICorProfilerInfo7_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \ - ( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) ) + ( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) ) #define ICorProfilerInfo7_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \ - ( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) ) + ( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) ) #define ICorProfilerInfo7_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \ - ( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) ) + ( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) ) #define ICorProfilerInfo7_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \ - ( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) ) + ( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) ) #define ICorProfilerInfo7_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \ - ( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) ) + ( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) ) #define ICorProfilerInfo7_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \ - ( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) ) + ( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) ) #define ICorProfilerInfo7_EnumModuleFrozenObjects(This,moduleID,ppEnum) \ - ( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) ) + ( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) ) #define ICorProfilerInfo7_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \ - ( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) ) + ( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) ) #define ICorProfilerInfo7_GetBoxClassLayout(This,classId,pBufferOffset) \ - ( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) ) + ( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) ) #define ICorProfilerInfo7_GetThreadAppDomain(This,threadId,pAppDomainId) \ - ( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) ) + ( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) ) #define ICorProfilerInfo7_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \ - ( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) ) + ( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) ) #define ICorProfilerInfo7_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \ - ( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) ) + ( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) ) #define ICorProfilerInfo7_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \ - ( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) ) + ( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) ) #define ICorProfilerInfo7_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \ - ( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) ) + ( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) ) #define ICorProfilerInfo7_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \ - ( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) ) + ( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) ) #define ICorProfilerInfo7_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \ - ( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) ) + ( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) ) #define ICorProfilerInfo7_GetObjectGeneration(This,objectId,range) \ - ( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) ) + ( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) ) #define ICorProfilerInfo7_GetNotifiedExceptionClauseInfo(This,pinfo) \ - ( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) ) + ( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) ) #define ICorProfilerInfo7_EnumJITedFunctions(This,ppEnum) \ - ( (This)->lpVtbl -> EnumJITedFunctions(This,ppEnum) ) + ( (This)->lpVtbl -> EnumJITedFunctions(This,ppEnum) ) #define ICorProfilerInfo7_RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) \ - ( (This)->lpVtbl -> RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) ) + ( (This)->lpVtbl -> RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) ) #define ICorProfilerInfo7_SetFunctionIDMapper2(This,pFunc,clientData) \ - ( (This)->lpVtbl -> SetFunctionIDMapper2(This,pFunc,clientData) ) + ( (This)->lpVtbl -> SetFunctionIDMapper2(This,pFunc,clientData) ) #define ICorProfilerInfo7_GetStringLayout2(This,pStringLengthOffset,pBufferOffset) \ - ( (This)->lpVtbl -> GetStringLayout2(This,pStringLengthOffset,pBufferOffset) ) + ( (This)->lpVtbl -> GetStringLayout2(This,pStringLengthOffset,pBufferOffset) ) #define ICorProfilerInfo7_SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) ) #define ICorProfilerInfo7_SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) ) #define ICorProfilerInfo7_GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) \ - ( (This)->lpVtbl -> GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) ) + ( (This)->lpVtbl -> GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) ) #define ICorProfilerInfo7_GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) \ - ( (This)->lpVtbl -> GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) ) + ( (This)->lpVtbl -> GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) ) #define ICorProfilerInfo7_GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) \ - ( (This)->lpVtbl -> GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) ) + ( (This)->lpVtbl -> GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) ) #define ICorProfilerInfo7_EnumModules(This,ppEnum) \ - ( (This)->lpVtbl -> EnumModules(This,ppEnum) ) + ( (This)->lpVtbl -> EnumModules(This,ppEnum) ) #define ICorProfilerInfo7_GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) \ - ( (This)->lpVtbl -> GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) ) + ( (This)->lpVtbl -> GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) ) #define ICorProfilerInfo7_GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) \ - ( (This)->lpVtbl -> GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) ) + ( (This)->lpVtbl -> GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) ) #define ICorProfilerInfo7_GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) \ - ( (This)->lpVtbl -> GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) ) + ( (This)->lpVtbl -> GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) ) #define ICorProfilerInfo7_GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) \ - ( (This)->lpVtbl -> GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) ) + ( (This)->lpVtbl -> GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) ) #define ICorProfilerInfo7_EnumThreads(This,ppEnum) \ - ( (This)->lpVtbl -> EnumThreads(This,ppEnum) ) + ( (This)->lpVtbl -> EnumThreads(This,ppEnum) ) #define ICorProfilerInfo7_InitializeCurrentThread(This) \ - ( (This)->lpVtbl -> InitializeCurrentThread(This) ) + ( (This)->lpVtbl -> InitializeCurrentThread(This) ) #define ICorProfilerInfo7_RequestReJIT(This,cFunctions,moduleIds,methodIds) \ - ( (This)->lpVtbl -> RequestReJIT(This,cFunctions,moduleIds,methodIds) ) + ( (This)->lpVtbl -> RequestReJIT(This,cFunctions,moduleIds,methodIds) ) #define ICorProfilerInfo7_RequestRevert(This,cFunctions,moduleIds,methodIds,status) \ - ( (This)->lpVtbl -> RequestRevert(This,cFunctions,moduleIds,methodIds,status) ) + ( (This)->lpVtbl -> RequestRevert(This,cFunctions,moduleIds,methodIds,status) ) #define ICorProfilerInfo7_GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) \ - ( (This)->lpVtbl -> GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) ) + ( (This)->lpVtbl -> GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) ) #define ICorProfilerInfo7_GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) \ - ( (This)->lpVtbl -> GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) ) + ( (This)->lpVtbl -> GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) ) #define ICorProfilerInfo7_GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) \ - ( (This)->lpVtbl -> GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) ) + ( (This)->lpVtbl -> GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) ) #define ICorProfilerInfo7_GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) \ - ( (This)->lpVtbl -> GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) ) + ( (This)->lpVtbl -> GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) ) #define ICorProfilerInfo7_EnumJITedFunctions2(This,ppEnum) \ - ( (This)->lpVtbl -> EnumJITedFunctions2(This,ppEnum) ) + ( (This)->lpVtbl -> EnumJITedFunctions2(This,ppEnum) ) #define ICorProfilerInfo7_GetObjectSize2(This,objectId,pcSize) \ - ( (This)->lpVtbl -> GetObjectSize2(This,objectId,pcSize) ) + ( (This)->lpVtbl -> GetObjectSize2(This,objectId,pcSize) ) #define ICorProfilerInfo7_GetEventMask2(This,pdwEventsLow,pdwEventsHigh) \ - ( (This)->lpVtbl -> GetEventMask2(This,pdwEventsLow,pdwEventsHigh) ) + ( (This)->lpVtbl -> GetEventMask2(This,pdwEventsLow,pdwEventsHigh) ) #define ICorProfilerInfo7_SetEventMask2(This,dwEventsLow,dwEventsHigh) \ - ( (This)->lpVtbl -> SetEventMask2(This,dwEventsLow,dwEventsHigh) ) + ( (This)->lpVtbl -> SetEventMask2(This,dwEventsLow,dwEventsHigh) ) #define ICorProfilerInfo7_EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) \ - ( (This)->lpVtbl -> EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) ) + ( (This)->lpVtbl -> EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) ) #define ICorProfilerInfo7_ApplyMetaData(This,moduleId) \ - ( (This)->lpVtbl -> ApplyMetaData(This,moduleId) ) + ( (This)->lpVtbl -> ApplyMetaData(This,moduleId) ) #define ICorProfilerInfo7_GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) \ - ( (This)->lpVtbl -> GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) ) + ( (This)->lpVtbl -> GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) ) #define ICorProfilerInfo7_ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) \ - ( (This)->lpVtbl -> ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) ) + ( (This)->lpVtbl -> ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) ) #endif /* COBJMACROS */ @@ -13417,27 +14260,27 @@ EXTERN_C const IID IID_ICorProfilerInfo7; #define __ICorProfilerInfo8_INTERFACE_DEFINED__ /* interface ICorProfilerInfo8 */ -/* [local][unique][uuid][object] */ +/* [local][unique][uuid][object] */ EXTERN_C const IID IID_ICorProfilerInfo8; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("C5AC80A6-782E-4716-8044-39598C60CFBF") ICorProfilerInfo8 : public ICorProfilerInfo7 { public: - virtual HRESULT STDMETHODCALLTYPE IsFunctionDynamic( + virtual HRESULT STDMETHODCALLTYPE IsFunctionDynamic( /* [in] */ FunctionID functionId, /* [out] */ BOOL *isDynamic) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetFunctionFromIP3( + + virtual HRESULT STDMETHODCALLTYPE GetFunctionFromIP3( /* [in] */ LPCBYTE ip, /* [out] */ FunctionID *functionId, /* [out] */ ReJITID *pReJitId) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetDynamicFunctionInfo( + + virtual HRESULT STDMETHODCALLTYPE GetDynamicFunctionInfo( /* [in] */ FunctionID functionId, /* [out] */ ModuleID *moduleId, /* [out] */ PCCOR_SIGNATURE *ppvSig, @@ -13445,218 +14288,218 @@ EXTERN_C const IID IID_ICorProfilerInfo8; /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, /* [out] */ WCHAR wszName[ ]) = 0; - + }; - - + + #else /* C style interface */ typedef struct ICorProfilerInfo8Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorProfilerInfo8 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorProfilerInfo8 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorProfilerInfo8 * This); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )( ICorProfilerInfo8 * This, /* [in] */ ObjectID objectId, /* [out] */ ClassID *pClassId); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )( ICorProfilerInfo8 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdTypeDef typeDef, /* [out] */ ClassID *pClassId); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )( ICorProfilerInfo8 * This, /* [in] */ FunctionID functionId, /* [out] */ LPCBYTE *pStart, /* [out] */ ULONG *pcSize); - - HRESULT ( STDMETHODCALLTYPE *GetEventMask )( + + HRESULT ( STDMETHODCALLTYPE *GetEventMask )( ICorProfilerInfo8 * This, /* [out] */ DWORD *pdwEvents); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )( ICorProfilerInfo8 * This, /* [in] */ LPCBYTE ip, /* [out] */ FunctionID *pFunctionId); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )( ICorProfilerInfo8 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdToken token, /* [out] */ FunctionID *pFunctionId); - - HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )( + + HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )( ICorProfilerInfo8 * This, /* [in] */ ThreadID threadId, /* [out] */ HANDLE *phThread); - - HRESULT ( STDMETHODCALLTYPE *GetObjectSize )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectSize )( ICorProfilerInfo8 * This, /* [in] */ ObjectID objectId, /* [out] */ ULONG *pcSize); - - HRESULT ( STDMETHODCALLTYPE *IsArrayClass )( + + HRESULT ( STDMETHODCALLTYPE *IsArrayClass )( ICorProfilerInfo8 * This, /* [in] */ ClassID classId, /* [out] */ CorElementType *pBaseElemType, /* [out] */ ClassID *pBaseClassId, /* [out] */ ULONG *pcRank); - - HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )( ICorProfilerInfo8 * This, /* [in] */ ThreadID threadId, /* [out] */ DWORD *pdwWin32ThreadId); - - HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )( + + HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )( ICorProfilerInfo8 * This, /* [out] */ ThreadID *pThreadId); - - HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )( ICorProfilerInfo8 * This, /* [in] */ ClassID classId, /* [out] */ ModuleID *pModuleId, /* [out] */ mdTypeDef *pTypeDefToken); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )( ICorProfilerInfo8 * This, /* [in] */ FunctionID functionId, /* [out] */ ClassID *pClassId, /* [out] */ ModuleID *pModuleId, /* [out] */ mdToken *pToken); - - HRESULT ( STDMETHODCALLTYPE *SetEventMask )( + + HRESULT ( STDMETHODCALLTYPE *SetEventMask )( ICorProfilerInfo8 * This, /* [in] */ DWORD dwEvents); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )( ICorProfilerInfo8 * This, /* [in] */ FunctionEnter *pFuncEnter, /* [in] */ FunctionLeave *pFuncLeave, /* [in] */ FunctionTailcall *pFuncTailcall); - - HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )( + + HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )( ICorProfilerInfo8 * This, /* [in] */ FunctionIDMapper *pFunc); - - HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )( + + HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )( ICorProfilerInfo8 * This, /* [in] */ FunctionID functionId, /* [in] */ REFIID riid, /* [out] */ IUnknown **ppImport, /* [out] */ mdToken *pToken); - - HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )( ICorProfilerInfo8 * This, /* [in] */ ModuleID moduleId, /* [out] */ LPCBYTE *ppBaseLoadAddress, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AssemblyID *pAssemblyId); - - HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )( ICorProfilerInfo8 * This, /* [in] */ ModuleID moduleId, /* [in] */ DWORD dwOpenFlags, /* [in] */ REFIID riid, /* [out] */ IUnknown **ppOut); - - HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )( + + HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )( ICorProfilerInfo8 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodId, /* [out] */ LPCBYTE *ppMethodHeader, /* [out] */ ULONG *pcbMethodSize); - - HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )( + + HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )( ICorProfilerInfo8 * This, /* [in] */ ModuleID moduleId, /* [out] */ IMethodMalloc **ppMalloc); - - HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )( + + HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )( ICorProfilerInfo8 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodid, /* [in] */ LPCBYTE pbNewILMethodHeader); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )( ICorProfilerInfo8 * This, /* [in] */ AppDomainID appDomainId, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ ProcessID *pProcessId); - - HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )( ICorProfilerInfo8 * This, /* [in] */ AssemblyID assemblyId, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AppDomainID *pAppDomainId, /* [out] */ ModuleID *pModuleId); - - HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )( + + HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )( ICorProfilerInfo8 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ForceGC )( + + HRESULT ( STDMETHODCALLTYPE *ForceGC )( ICorProfilerInfo8 * This); - - HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )( + + HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )( ICorProfilerInfo8 * This, /* [in] */ FunctionID functionId, /* [in] */ BOOL fStartJit, /* [in] */ ULONG cILMapEntries, /* [size_is][in] */ COR_IL_MAP rgILMapEntries[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )( + + HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )( ICorProfilerInfo8 * This, /* [out] */ IUnknown **ppicd); - - HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )( + + HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )( ICorProfilerInfo8 * This, /* [out] */ IUnknown **ppicd); - - HRESULT ( STDMETHODCALLTYPE *GetThreadContext )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadContext )( ICorProfilerInfo8 * This, /* [in] */ ThreadID threadId, /* [out] */ ContextID *pContextId); - - HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )( + + HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )( ICorProfilerInfo8 * This, /* [in] */ BOOL fThisThreadOnly, /* [out] */ DWORD *pdwProfilerContext); - - HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )( + + HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )( ICorProfilerInfo8 * This, /* [in] */ DWORD dwProfilerContext); - - HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )( + + HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )( ICorProfilerInfo8 * This, /* [in] */ FunctionID functionId, /* [in] */ ULONG32 cMap, /* [out] */ ULONG32 *pcMap, /* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]); - - HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )( + + HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )( ICorProfilerInfo8 * This, /* [in] */ ThreadID thread, /* [in] */ StackSnapshotCallback *callback, @@ -13664,14 +14507,14 @@ EXTERN_C const IID IID_ICorProfilerInfo8; /* [in] */ void *clientData, /* [size_is][in] */ BYTE context[ ], /* [in] */ ULONG32 contextSize); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )( ICorProfilerInfo8 * This, /* [in] */ FunctionEnter2 *pFuncEnter, /* [in] */ FunctionLeave2 *pFuncLeave, /* [in] */ FunctionTailcall2 *pFuncTailcall); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )( ICorProfilerInfo8 * This, /* [in] */ FunctionID funcId, /* [in] */ COR_PRF_FRAME_INFO frameInfo, @@ -13681,22 +14524,22 @@ EXTERN_C const IID IID_ICorProfilerInfo8; /* [in] */ ULONG32 cTypeArgs, /* [out] */ ULONG32 *pcTypeArgs, /* [out] */ ClassID typeArgs[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetStringLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetStringLayout )( ICorProfilerInfo8 * This, /* [out] */ ULONG *pBufferLengthOffset, /* [out] */ ULONG *pStringLengthOffset, /* [out] */ ULONG *pBufferOffset); - - HRESULT ( STDMETHODCALLTYPE *GetClassLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetClassLayout )( ICorProfilerInfo8 * This, /* [in] */ ClassID classID, /* [out][in] */ COR_FIELD_OFFSET rFieldOffset[ ], /* [in] */ ULONG cFieldOffset, /* [out] */ ULONG *pcFieldOffset, /* [out] */ ULONG *pulClassSize); - - HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )( ICorProfilerInfo8 * This, /* [in] */ ClassID classId, /* [out] */ ModuleID *pModuleId, @@ -13705,23 +14548,23 @@ EXTERN_C const IID IID_ICorProfilerInfo8; /* [in] */ ULONG32 cNumTypeArgs, /* [out] */ ULONG32 *pcNumTypeArgs, /* [out] */ ClassID typeArgs[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )( ICorProfilerInfo8 * This, /* [in] */ FunctionID functionID, /* [in] */ ULONG32 cCodeInfos, /* [out] */ ULONG32 *pcCodeInfos, /* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )( ICorProfilerInfo8 * This, /* [in] */ ModuleID moduleID, /* [in] */ mdTypeDef typeDef, /* [in] */ ULONG32 cTypeArgs, /* [size_is][in] */ ClassID typeArgs[ ], /* [out] */ ClassID *pClassID); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )( ICorProfilerInfo8 * This, /* [in] */ ModuleID moduleID, /* [in] */ mdMethodDef funcDef, @@ -13729,134 +14572,134 @@ EXTERN_C const IID IID_ICorProfilerInfo8; /* [in] */ ULONG32 cTypeArgs, /* [size_is][in] */ ClassID typeArgs[ ], /* [out] */ FunctionID *pFunctionID); - - HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )( + + HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )( ICorProfilerInfo8 * This, /* [in] */ ModuleID moduleID, /* [out] */ ICorProfilerObjectEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )( ICorProfilerInfo8 * This, /* [in] */ ObjectID objectId, /* [in] */ ULONG32 cDimensions, /* [size_is][out] */ ULONG32 pDimensionSizes[ ], /* [size_is][out] */ int pDimensionLowerBounds[ ], /* [out] */ BYTE **ppData); - - HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )( ICorProfilerInfo8 * This, /* [in] */ ClassID classId, /* [out] */ ULONG32 *pBufferOffset); - - HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )( ICorProfilerInfo8 * This, /* [in] */ ThreadID threadId, /* [out] */ AppDomainID *pAppDomainId); - - HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )( ICorProfilerInfo8 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )( ICorProfilerInfo8 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ AppDomainID appDomainId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )( ICorProfilerInfo8 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ ThreadID threadId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )( ICorProfilerInfo8 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ ContextID contextId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )( ICorProfilerInfo8 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [out] */ COR_PRF_STATIC_TYPE *pFieldInfo); - - HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )( + + HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )( ICorProfilerInfo8 * This, /* [in] */ ULONG cObjectRanges, /* [out] */ ULONG *pcObjectRanges, /* [length_is][size_is][out] */ COR_PRF_GC_GENERATION_RANGE ranges[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )( ICorProfilerInfo8 * This, /* [in] */ ObjectID objectId, /* [out] */ COR_PRF_GC_GENERATION_RANGE *range); - - HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )( ICorProfilerInfo8 * This, /* [out] */ COR_PRF_EX_CLAUSE_INFO *pinfo); - - HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions )( + + HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions )( ICorProfilerInfo8 * This, /* [out] */ ICorProfilerFunctionEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *RequestProfilerDetach )( + + HRESULT ( STDMETHODCALLTYPE *RequestProfilerDetach )( ICorProfilerInfo8 * This, /* [in] */ DWORD dwExpectedCompletionMilliseconds); - - HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper2 )( + + HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper2 )( ICorProfilerInfo8 * This, /* [in] */ FunctionIDMapper2 *pFunc, /* [in] */ void *clientData); - - HRESULT ( STDMETHODCALLTYPE *GetStringLayout2 )( + + HRESULT ( STDMETHODCALLTYPE *GetStringLayout2 )( ICorProfilerInfo8 * This, /* [out] */ ULONG *pStringLengthOffset, /* [out] */ ULONG *pBufferOffset); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3 )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3 )( ICorProfilerInfo8 * This, /* [in] */ FunctionEnter3 *pFuncEnter3, /* [in] */ FunctionLeave3 *pFuncLeave3, /* [in] */ FunctionTailcall3 *pFuncTailcall3); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3WithInfo )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3WithInfo )( ICorProfilerInfo8 * This, /* [in] */ FunctionEnter3WithInfo *pFuncEnter3WithInfo, /* [in] */ FunctionLeave3WithInfo *pFuncLeave3WithInfo, /* [in] */ FunctionTailcall3WithInfo *pFuncTailcall3WithInfo); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionEnter3Info )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionEnter3Info )( ICorProfilerInfo8 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_ELT_INFO eltInfo, /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo, /* [out][in] */ ULONG *pcbArgumentInfo, /* [size_is][out] */ COR_PRF_FUNCTION_ARGUMENT_INFO *pArgumentInfo); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionLeave3Info )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionLeave3Info )( ICorProfilerInfo8 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_ELT_INFO eltInfo, /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo, /* [out] */ COR_PRF_FUNCTION_ARGUMENT_RANGE *pRetvalRange); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionTailcall3Info )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionTailcall3Info )( ICorProfilerInfo8 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_ELT_INFO eltInfo, /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo); - - HRESULT ( STDMETHODCALLTYPE *EnumModules )( + + HRESULT ( STDMETHODCALLTYPE *EnumModules )( ICorProfilerInfo8 * This, /* [out] */ ICorProfilerModuleEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetRuntimeInformation )( + + HRESULT ( STDMETHODCALLTYPE *GetRuntimeInformation )( ICorProfilerInfo8 * This, /* [out] */ USHORT *pClrInstanceId, /* [out] */ COR_PRF_RUNTIME_TYPE *pRuntimeType, @@ -13866,140 +14709,140 @@ EXTERN_C const IID IID_ICorProfilerInfo8; /* [out] */ USHORT *pQFEVersion, /* [in] */ ULONG cchVersionString, /* [out] */ ULONG *pcchVersionString, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchVersionString, *pcchVersionString) WCHAR szVersionString[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress2 )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress2 )( ICorProfilerInfo8 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ AppDomainID appDomainId, /* [in] */ ThreadID threadId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainsContainingModule )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainsContainingModule )( ICorProfilerInfo8 * This, /* [in] */ ModuleID moduleId, /* [in] */ ULONG32 cAppDomainIds, /* [out] */ ULONG32 *pcAppDomainIds, /* [length_is][size_is][out] */ AppDomainID appDomainIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetModuleInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleInfo2 )( ICorProfilerInfo8 * This, /* [in] */ ModuleID moduleId, /* [out] */ LPCBYTE *ppBaseLoadAddress, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AssemblyID *pAssemblyId, /* [out] */ DWORD *pdwModuleFlags); - - HRESULT ( STDMETHODCALLTYPE *EnumThreads )( + + HRESULT ( STDMETHODCALLTYPE *EnumThreads )( ICorProfilerInfo8 * This, /* [out] */ ICorProfilerThreadEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *InitializeCurrentThread )( + + HRESULT ( STDMETHODCALLTYPE *InitializeCurrentThread )( ICorProfilerInfo8 * This); - - HRESULT ( STDMETHODCALLTYPE *RequestReJIT )( + + HRESULT ( STDMETHODCALLTYPE *RequestReJIT )( ICorProfilerInfo8 * This, /* [in] */ ULONG cFunctions, /* [size_is][in] */ ModuleID moduleIds[ ], /* [size_is][in] */ mdMethodDef methodIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *RequestRevert )( + + HRESULT ( STDMETHODCALLTYPE *RequestRevert )( ICorProfilerInfo8 * This, /* [in] */ ULONG cFunctions, /* [size_is][in] */ ModuleID moduleIds[ ], /* [size_is][in] */ mdMethodDef methodIds[ ], /* [size_is][out] */ HRESULT status[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo3 )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo3 )( ICorProfilerInfo8 * This, /* [in] */ FunctionID functionID, /* [in] */ ReJITID reJitId, /* [in] */ ULONG32 cCodeInfos, /* [out] */ ULONG32 *pcCodeInfos, /* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP2 )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP2 )( ICorProfilerInfo8 * This, /* [in] */ LPCBYTE ip, /* [out] */ FunctionID *pFunctionId, /* [out] */ ReJITID *pReJitId); - - HRESULT ( STDMETHODCALLTYPE *GetReJITIDs )( + + HRESULT ( STDMETHODCALLTYPE *GetReJITIDs )( ICorProfilerInfo8 * This, /* [in] */ FunctionID functionId, /* [in] */ ULONG cReJitIds, /* [out] */ ULONG *pcReJitIds, /* [length_is][size_is][out] */ ReJITID reJitIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping2 )( + + HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping2 )( ICorProfilerInfo8 * This, /* [in] */ FunctionID functionId, /* [in] */ ReJITID reJitId, /* [in] */ ULONG32 cMap, /* [out] */ ULONG32 *pcMap, /* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]); - - HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions2 )( + + HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions2 )( ICorProfilerInfo8 * This, /* [out] */ ICorProfilerFunctionEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetObjectSize2 )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectSize2 )( ICorProfilerInfo8 * This, /* [in] */ ObjectID objectId, /* [out] */ SIZE_T *pcSize); - - HRESULT ( STDMETHODCALLTYPE *GetEventMask2 )( + + HRESULT ( STDMETHODCALLTYPE *GetEventMask2 )( ICorProfilerInfo8 * This, /* [out] */ DWORD *pdwEventsLow, /* [out] */ DWORD *pdwEventsHigh); - - HRESULT ( STDMETHODCALLTYPE *SetEventMask2 )( + + HRESULT ( STDMETHODCALLTYPE *SetEventMask2 )( ICorProfilerInfo8 * This, /* [in] */ DWORD dwEventsLow, /* [in] */ DWORD dwEventsHigh); - - HRESULT ( STDMETHODCALLTYPE *EnumNgenModuleMethodsInliningThisMethod )( + + HRESULT ( STDMETHODCALLTYPE *EnumNgenModuleMethodsInliningThisMethod )( ICorProfilerInfo8 * This, /* [in] */ ModuleID inlinersModuleId, /* [in] */ ModuleID inlineeModuleId, /* [in] */ mdMethodDef inlineeMethodId, /* [out] */ BOOL *incompleteData, /* [out] */ ICorProfilerMethodEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *ApplyMetaData )( + + HRESULT ( STDMETHODCALLTYPE *ApplyMetaData )( ICorProfilerInfo8 * This, /* [in] */ ModuleID moduleId); - - HRESULT ( STDMETHODCALLTYPE *GetInMemorySymbolsLength )( + + HRESULT ( STDMETHODCALLTYPE *GetInMemorySymbolsLength )( ICorProfilerInfo8 * This, /* [in] */ ModuleID moduleId, /* [out] */ DWORD *pCountSymbolBytes); - - HRESULT ( STDMETHODCALLTYPE *ReadInMemorySymbols )( + + HRESULT ( STDMETHODCALLTYPE *ReadInMemorySymbols )( ICorProfilerInfo8 * This, /* [in] */ ModuleID moduleId, /* [in] */ DWORD symbolsReadOffset, /* [out] */ BYTE *pSymbolBytes, /* [in] */ DWORD countSymbolBytes, /* [out] */ DWORD *pCountSymbolBytesRead); - - HRESULT ( STDMETHODCALLTYPE *IsFunctionDynamic )( + + HRESULT ( STDMETHODCALLTYPE *IsFunctionDynamic )( ICorProfilerInfo8 * This, /* [in] */ FunctionID functionId, /* [out] */ BOOL *isDynamic); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP3 )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP3 )( ICorProfilerInfo8 * This, /* [in] */ LPCBYTE ip, /* [out] */ FunctionID *functionId, /* [out] */ ReJITID *pReJitId); - - HRESULT ( STDMETHODCALLTYPE *GetDynamicFunctionInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetDynamicFunctionInfo )( ICorProfilerInfo8 * This, /* [in] */ FunctionID functionId, /* [out] */ ModuleID *moduleId, @@ -14008,7 +14851,7 @@ EXTERN_C const IID IID_ICorProfilerInfo8; /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, /* [out] */ WCHAR wszName[ ]); - + END_INTERFACE } ICorProfilerInfo8Vtbl; @@ -14017,288 +14860,288 @@ EXTERN_C const IID IID_ICorProfilerInfo8; CONST_VTBL struct ICorProfilerInfo8Vtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ICorProfilerInfo8_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ICorProfilerInfo8_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ICorProfilerInfo8_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ICorProfilerInfo8_GetClassFromObject(This,objectId,pClassId) \ - ( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) ) + ( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) ) #define ICorProfilerInfo8_GetClassFromToken(This,moduleId,typeDef,pClassId) \ - ( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) ) + ( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) ) #define ICorProfilerInfo8_GetCodeInfo(This,functionId,pStart,pcSize) \ - ( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) ) + ( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) ) #define ICorProfilerInfo8_GetEventMask(This,pdwEvents) \ - ( (This)->lpVtbl -> GetEventMask(This,pdwEvents) ) + ( (This)->lpVtbl -> GetEventMask(This,pdwEvents) ) #define ICorProfilerInfo8_GetFunctionFromIP(This,ip,pFunctionId) \ - ( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) ) + ( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) ) #define ICorProfilerInfo8_GetFunctionFromToken(This,moduleId,token,pFunctionId) \ - ( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) ) + ( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) ) #define ICorProfilerInfo8_GetHandleFromThread(This,threadId,phThread) \ - ( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) ) + ( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) ) #define ICorProfilerInfo8_GetObjectSize(This,objectId,pcSize) \ - ( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) ) + ( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) ) #define ICorProfilerInfo8_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \ - ( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) ) + ( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) ) #define ICorProfilerInfo8_GetThreadInfo(This,threadId,pdwWin32ThreadId) \ - ( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) ) + ( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) ) #define ICorProfilerInfo8_GetCurrentThreadID(This,pThreadId) \ - ( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) ) + ( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) ) #define ICorProfilerInfo8_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \ - ( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) ) + ( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) ) #define ICorProfilerInfo8_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \ - ( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) ) + ( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) ) #define ICorProfilerInfo8_SetEventMask(This,dwEvents) \ - ( (This)->lpVtbl -> SetEventMask(This,dwEvents) ) + ( (This)->lpVtbl -> SetEventMask(This,dwEvents) ) #define ICorProfilerInfo8_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) #define ICorProfilerInfo8_SetFunctionIDMapper(This,pFunc) \ - ( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) ) + ( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) ) #define ICorProfilerInfo8_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \ - ( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) ) + ( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) ) #define ICorProfilerInfo8_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \ - ( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) ) + ( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) ) #define ICorProfilerInfo8_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \ - ( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) ) + ( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) ) #define ICorProfilerInfo8_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \ - ( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) ) + ( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) ) #define ICorProfilerInfo8_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \ - ( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) ) + ( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) ) #define ICorProfilerInfo8_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \ - ( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) ) + ( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) ) #define ICorProfilerInfo8_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \ - ( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) ) + ( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) ) #define ICorProfilerInfo8_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \ - ( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) ) + ( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) ) #define ICorProfilerInfo8_SetFunctionReJIT(This,functionId) \ - ( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) ) + ( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) ) #define ICorProfilerInfo8_ForceGC(This) \ - ( (This)->lpVtbl -> ForceGC(This) ) + ( (This)->lpVtbl -> ForceGC(This) ) #define ICorProfilerInfo8_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \ - ( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) ) + ( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) ) #define ICorProfilerInfo8_GetInprocInspectionInterface(This,ppicd) \ - ( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) ) + ( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) ) #define ICorProfilerInfo8_GetInprocInspectionIThisThread(This,ppicd) \ - ( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) ) + ( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) ) #define ICorProfilerInfo8_GetThreadContext(This,threadId,pContextId) \ - ( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) ) + ( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) ) #define ICorProfilerInfo8_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \ - ( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) ) + ( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) ) #define ICorProfilerInfo8_EndInprocDebugging(This,dwProfilerContext) \ - ( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) ) + ( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) ) #define ICorProfilerInfo8_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \ - ( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) ) + ( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) ) #define ICorProfilerInfo8_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \ - ( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) ) + ( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) ) #define ICorProfilerInfo8_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) #define ICorProfilerInfo8_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \ - ( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) ) + ( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) ) #define ICorProfilerInfo8_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \ - ( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) ) + ( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) ) #define ICorProfilerInfo8_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \ - ( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) ) + ( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) ) #define ICorProfilerInfo8_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \ - ( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) ) + ( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) ) #define ICorProfilerInfo8_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \ - ( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) ) + ( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) ) #define ICorProfilerInfo8_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \ - ( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) ) + ( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) ) #define ICorProfilerInfo8_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \ - ( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) ) + ( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) ) #define ICorProfilerInfo8_EnumModuleFrozenObjects(This,moduleID,ppEnum) \ - ( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) ) + ( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) ) #define ICorProfilerInfo8_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \ - ( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) ) + ( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) ) #define ICorProfilerInfo8_GetBoxClassLayout(This,classId,pBufferOffset) \ - ( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) ) + ( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) ) #define ICorProfilerInfo8_GetThreadAppDomain(This,threadId,pAppDomainId) \ - ( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) ) + ( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) ) #define ICorProfilerInfo8_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \ - ( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) ) + ( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) ) #define ICorProfilerInfo8_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \ - ( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) ) + ( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) ) #define ICorProfilerInfo8_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \ - ( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) ) + ( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) ) #define ICorProfilerInfo8_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \ - ( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) ) + ( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) ) #define ICorProfilerInfo8_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \ - ( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) ) + ( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) ) #define ICorProfilerInfo8_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \ - ( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) ) + ( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) ) #define ICorProfilerInfo8_GetObjectGeneration(This,objectId,range) \ - ( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) ) + ( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) ) #define ICorProfilerInfo8_GetNotifiedExceptionClauseInfo(This,pinfo) \ - ( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) ) + ( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) ) #define ICorProfilerInfo8_EnumJITedFunctions(This,ppEnum) \ - ( (This)->lpVtbl -> EnumJITedFunctions(This,ppEnum) ) + ( (This)->lpVtbl -> EnumJITedFunctions(This,ppEnum) ) #define ICorProfilerInfo8_RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) \ - ( (This)->lpVtbl -> RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) ) + ( (This)->lpVtbl -> RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) ) #define ICorProfilerInfo8_SetFunctionIDMapper2(This,pFunc,clientData) \ - ( (This)->lpVtbl -> SetFunctionIDMapper2(This,pFunc,clientData) ) + ( (This)->lpVtbl -> SetFunctionIDMapper2(This,pFunc,clientData) ) #define ICorProfilerInfo8_GetStringLayout2(This,pStringLengthOffset,pBufferOffset) \ - ( (This)->lpVtbl -> GetStringLayout2(This,pStringLengthOffset,pBufferOffset) ) + ( (This)->lpVtbl -> GetStringLayout2(This,pStringLengthOffset,pBufferOffset) ) #define ICorProfilerInfo8_SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) ) #define ICorProfilerInfo8_SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) ) #define ICorProfilerInfo8_GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) \ - ( (This)->lpVtbl -> GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) ) + ( (This)->lpVtbl -> GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) ) #define ICorProfilerInfo8_GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) \ - ( (This)->lpVtbl -> GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) ) + ( (This)->lpVtbl -> GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) ) #define ICorProfilerInfo8_GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) \ - ( (This)->lpVtbl -> GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) ) + ( (This)->lpVtbl -> GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) ) #define ICorProfilerInfo8_EnumModules(This,ppEnum) \ - ( (This)->lpVtbl -> EnumModules(This,ppEnum) ) + ( (This)->lpVtbl -> EnumModules(This,ppEnum) ) #define ICorProfilerInfo8_GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) \ - ( (This)->lpVtbl -> GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) ) + ( (This)->lpVtbl -> GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) ) #define ICorProfilerInfo8_GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) \ - ( (This)->lpVtbl -> GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) ) + ( (This)->lpVtbl -> GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) ) #define ICorProfilerInfo8_GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) \ - ( (This)->lpVtbl -> GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) ) + ( (This)->lpVtbl -> GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) ) #define ICorProfilerInfo8_GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) \ - ( (This)->lpVtbl -> GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) ) + ( (This)->lpVtbl -> GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) ) #define ICorProfilerInfo8_EnumThreads(This,ppEnum) \ - ( (This)->lpVtbl -> EnumThreads(This,ppEnum) ) + ( (This)->lpVtbl -> EnumThreads(This,ppEnum) ) #define ICorProfilerInfo8_InitializeCurrentThread(This) \ - ( (This)->lpVtbl -> InitializeCurrentThread(This) ) + ( (This)->lpVtbl -> InitializeCurrentThread(This) ) #define ICorProfilerInfo8_RequestReJIT(This,cFunctions,moduleIds,methodIds) \ - ( (This)->lpVtbl -> RequestReJIT(This,cFunctions,moduleIds,methodIds) ) + ( (This)->lpVtbl -> RequestReJIT(This,cFunctions,moduleIds,methodIds) ) #define ICorProfilerInfo8_RequestRevert(This,cFunctions,moduleIds,methodIds,status) \ - ( (This)->lpVtbl -> RequestRevert(This,cFunctions,moduleIds,methodIds,status) ) + ( (This)->lpVtbl -> RequestRevert(This,cFunctions,moduleIds,methodIds,status) ) #define ICorProfilerInfo8_GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) \ - ( (This)->lpVtbl -> GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) ) + ( (This)->lpVtbl -> GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) ) #define ICorProfilerInfo8_GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) \ - ( (This)->lpVtbl -> GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) ) + ( (This)->lpVtbl -> GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) ) #define ICorProfilerInfo8_GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) \ - ( (This)->lpVtbl -> GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) ) + ( (This)->lpVtbl -> GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) ) #define ICorProfilerInfo8_GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) \ - ( (This)->lpVtbl -> GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) ) + ( (This)->lpVtbl -> GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) ) #define ICorProfilerInfo8_EnumJITedFunctions2(This,ppEnum) \ - ( (This)->lpVtbl -> EnumJITedFunctions2(This,ppEnum) ) + ( (This)->lpVtbl -> EnumJITedFunctions2(This,ppEnum) ) #define ICorProfilerInfo8_GetObjectSize2(This,objectId,pcSize) \ - ( (This)->lpVtbl -> GetObjectSize2(This,objectId,pcSize) ) + ( (This)->lpVtbl -> GetObjectSize2(This,objectId,pcSize) ) #define ICorProfilerInfo8_GetEventMask2(This,pdwEventsLow,pdwEventsHigh) \ - ( (This)->lpVtbl -> GetEventMask2(This,pdwEventsLow,pdwEventsHigh) ) + ( (This)->lpVtbl -> GetEventMask2(This,pdwEventsLow,pdwEventsHigh) ) #define ICorProfilerInfo8_SetEventMask2(This,dwEventsLow,dwEventsHigh) \ - ( (This)->lpVtbl -> SetEventMask2(This,dwEventsLow,dwEventsHigh) ) + ( (This)->lpVtbl -> SetEventMask2(This,dwEventsLow,dwEventsHigh) ) #define ICorProfilerInfo8_EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) \ - ( (This)->lpVtbl -> EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) ) + ( (This)->lpVtbl -> EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) ) #define ICorProfilerInfo8_ApplyMetaData(This,moduleId) \ - ( (This)->lpVtbl -> ApplyMetaData(This,moduleId) ) + ( (This)->lpVtbl -> ApplyMetaData(This,moduleId) ) #define ICorProfilerInfo8_GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) \ - ( (This)->lpVtbl -> GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) ) + ( (This)->lpVtbl -> GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) ) #define ICorProfilerInfo8_ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) \ - ( (This)->lpVtbl -> ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) ) + ( (This)->lpVtbl -> ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) ) #define ICorProfilerInfo8_IsFunctionDynamic(This,functionId,isDynamic) \ - ( (This)->lpVtbl -> IsFunctionDynamic(This,functionId,isDynamic) ) + ( (This)->lpVtbl -> IsFunctionDynamic(This,functionId,isDynamic) ) #define ICorProfilerInfo8_GetFunctionFromIP3(This,ip,functionId,pReJitId) \ - ( (This)->lpVtbl -> GetFunctionFromIP3(This,ip,functionId,pReJitId) ) + ( (This)->lpVtbl -> GetFunctionFromIP3(This,ip,functionId,pReJitId) ) #define ICorProfilerInfo8_GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) \ - ( (This)->lpVtbl -> GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) ) + ( (This)->lpVtbl -> GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) ) #endif /* COBJMACROS */ @@ -14315,247 +15158,247 @@ EXTERN_C const IID IID_ICorProfilerInfo8; #define __ICorProfilerInfo9_INTERFACE_DEFINED__ /* interface ICorProfilerInfo9 */ -/* [local][unique][uuid][object] */ +/* [local][unique][uuid][object] */ EXTERN_C const IID IID_ICorProfilerInfo9; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("008170DB-F8CC-4796-9A51-DC8AA0B47012") ICorProfilerInfo9 : public ICorProfilerInfo8 { public: - virtual HRESULT STDMETHODCALLTYPE GetNativeCodeStartAddresses( + virtual HRESULT STDMETHODCALLTYPE GetNativeCodeStartAddresses( FunctionID functionID, ReJITID reJitId, ULONG32 cCodeStartAddresses, ULONG32 *pcCodeStartAddresses, UINT_PTR codeStartAddresses[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetILToNativeMapping3( + + virtual HRESULT STDMETHODCALLTYPE GetILToNativeMapping3( UINT_PTR pNativeCodeStartAddress, ULONG32 cMap, ULONG32 *pcMap, COR_DEBUG_IL_TO_NATIVE_MAP map[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCodeInfo4( + + virtual HRESULT STDMETHODCALLTYPE GetCodeInfo4( UINT_PTR pNativeCodeStartAddress, ULONG32 cCodeInfos, ULONG32 *pcCodeInfos, COR_PRF_CODE_INFO codeInfos[ ]) = 0; - + }; - - + + #else /* C style interface */ typedef struct ICorProfilerInfo9Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorProfilerInfo9 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorProfilerInfo9 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorProfilerInfo9 * This); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )( ICorProfilerInfo9 * This, /* [in] */ ObjectID objectId, /* [out] */ ClassID *pClassId); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )( ICorProfilerInfo9 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdTypeDef typeDef, /* [out] */ ClassID *pClassId); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )( ICorProfilerInfo9 * This, /* [in] */ FunctionID functionId, /* [out] */ LPCBYTE *pStart, /* [out] */ ULONG *pcSize); - - HRESULT ( STDMETHODCALLTYPE *GetEventMask )( + + HRESULT ( STDMETHODCALLTYPE *GetEventMask )( ICorProfilerInfo9 * This, /* [out] */ DWORD *pdwEvents); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )( ICorProfilerInfo9 * This, /* [in] */ LPCBYTE ip, /* [out] */ FunctionID *pFunctionId); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )( ICorProfilerInfo9 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdToken token, /* [out] */ FunctionID *pFunctionId); - - HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )( + + HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )( ICorProfilerInfo9 * This, /* [in] */ ThreadID threadId, /* [out] */ HANDLE *phThread); - - HRESULT ( STDMETHODCALLTYPE *GetObjectSize )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectSize )( ICorProfilerInfo9 * This, /* [in] */ ObjectID objectId, /* [out] */ ULONG *pcSize); - - HRESULT ( STDMETHODCALLTYPE *IsArrayClass )( + + HRESULT ( STDMETHODCALLTYPE *IsArrayClass )( ICorProfilerInfo9 * This, /* [in] */ ClassID classId, /* [out] */ CorElementType *pBaseElemType, /* [out] */ ClassID *pBaseClassId, /* [out] */ ULONG *pcRank); - - HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )( ICorProfilerInfo9 * This, /* [in] */ ThreadID threadId, /* [out] */ DWORD *pdwWin32ThreadId); - - HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )( + + HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )( ICorProfilerInfo9 * This, /* [out] */ ThreadID *pThreadId); - - HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )( ICorProfilerInfo9 * This, /* [in] */ ClassID classId, /* [out] */ ModuleID *pModuleId, /* [out] */ mdTypeDef *pTypeDefToken); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )( ICorProfilerInfo9 * This, /* [in] */ FunctionID functionId, /* [out] */ ClassID *pClassId, /* [out] */ ModuleID *pModuleId, /* [out] */ mdToken *pToken); - - HRESULT ( STDMETHODCALLTYPE *SetEventMask )( + + HRESULT ( STDMETHODCALLTYPE *SetEventMask )( ICorProfilerInfo9 * This, /* [in] */ DWORD dwEvents); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )( ICorProfilerInfo9 * This, /* [in] */ FunctionEnter *pFuncEnter, /* [in] */ FunctionLeave *pFuncLeave, /* [in] */ FunctionTailcall *pFuncTailcall); - - HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )( + + HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )( ICorProfilerInfo9 * This, /* [in] */ FunctionIDMapper *pFunc); - - HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )( + + HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )( ICorProfilerInfo9 * This, /* [in] */ FunctionID functionId, /* [in] */ REFIID riid, /* [out] */ IUnknown **ppImport, /* [out] */ mdToken *pToken); - - HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )( ICorProfilerInfo9 * This, /* [in] */ ModuleID moduleId, /* [out] */ LPCBYTE *ppBaseLoadAddress, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AssemblyID *pAssemblyId); - - HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )( ICorProfilerInfo9 * This, /* [in] */ ModuleID moduleId, /* [in] */ DWORD dwOpenFlags, /* [in] */ REFIID riid, /* [out] */ IUnknown **ppOut); - - HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )( + + HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )( ICorProfilerInfo9 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodId, /* [out] */ LPCBYTE *ppMethodHeader, /* [out] */ ULONG *pcbMethodSize); - - HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )( + + HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )( ICorProfilerInfo9 * This, /* [in] */ ModuleID moduleId, /* [out] */ IMethodMalloc **ppMalloc); - - HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )( + + HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )( ICorProfilerInfo9 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodid, /* [in] */ LPCBYTE pbNewILMethodHeader); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )( ICorProfilerInfo9 * This, /* [in] */ AppDomainID appDomainId, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ ProcessID *pProcessId); - - HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )( ICorProfilerInfo9 * This, /* [in] */ AssemblyID assemblyId, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AppDomainID *pAppDomainId, /* [out] */ ModuleID *pModuleId); - - HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )( + + HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )( ICorProfilerInfo9 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ForceGC )( + + HRESULT ( STDMETHODCALLTYPE *ForceGC )( ICorProfilerInfo9 * This); - - HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )( + + HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )( ICorProfilerInfo9 * This, /* [in] */ FunctionID functionId, /* [in] */ BOOL fStartJit, /* [in] */ ULONG cILMapEntries, /* [size_is][in] */ COR_IL_MAP rgILMapEntries[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )( + + HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )( ICorProfilerInfo9 * This, /* [out] */ IUnknown **ppicd); - - HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )( + + HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )( ICorProfilerInfo9 * This, /* [out] */ IUnknown **ppicd); - - HRESULT ( STDMETHODCALLTYPE *GetThreadContext )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadContext )( ICorProfilerInfo9 * This, /* [in] */ ThreadID threadId, /* [out] */ ContextID *pContextId); - - HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )( + + HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )( ICorProfilerInfo9 * This, /* [in] */ BOOL fThisThreadOnly, /* [out] */ DWORD *pdwProfilerContext); - - HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )( + + HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )( ICorProfilerInfo9 * This, /* [in] */ DWORD dwProfilerContext); - - HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )( + + HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )( ICorProfilerInfo9 * This, /* [in] */ FunctionID functionId, /* [in] */ ULONG32 cMap, /* [out] */ ULONG32 *pcMap, /* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]); - - HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )( + + HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )( ICorProfilerInfo9 * This, /* [in] */ ThreadID thread, /* [in] */ StackSnapshotCallback *callback, @@ -14563,14 +15406,14 @@ EXTERN_C const IID IID_ICorProfilerInfo9; /* [in] */ void *clientData, /* [size_is][in] */ BYTE context[ ], /* [in] */ ULONG32 contextSize); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )( ICorProfilerInfo9 * This, /* [in] */ FunctionEnter2 *pFuncEnter, /* [in] */ FunctionLeave2 *pFuncLeave, /* [in] */ FunctionTailcall2 *pFuncTailcall); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )( ICorProfilerInfo9 * This, /* [in] */ FunctionID funcId, /* [in] */ COR_PRF_FRAME_INFO frameInfo, @@ -14580,22 +15423,22 @@ EXTERN_C const IID IID_ICorProfilerInfo9; /* [in] */ ULONG32 cTypeArgs, /* [out] */ ULONG32 *pcTypeArgs, /* [out] */ ClassID typeArgs[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetStringLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetStringLayout )( ICorProfilerInfo9 * This, /* [out] */ ULONG *pBufferLengthOffset, /* [out] */ ULONG *pStringLengthOffset, /* [out] */ ULONG *pBufferOffset); - - HRESULT ( STDMETHODCALLTYPE *GetClassLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetClassLayout )( ICorProfilerInfo9 * This, /* [in] */ ClassID classID, /* [out][in] */ COR_FIELD_OFFSET rFieldOffset[ ], /* [in] */ ULONG cFieldOffset, /* [out] */ ULONG *pcFieldOffset, /* [out] */ ULONG *pulClassSize); - - HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )( ICorProfilerInfo9 * This, /* [in] */ ClassID classId, /* [out] */ ModuleID *pModuleId, @@ -14604,23 +15447,23 @@ EXTERN_C const IID IID_ICorProfilerInfo9; /* [in] */ ULONG32 cNumTypeArgs, /* [out] */ ULONG32 *pcNumTypeArgs, /* [out] */ ClassID typeArgs[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )( ICorProfilerInfo9 * This, /* [in] */ FunctionID functionID, /* [in] */ ULONG32 cCodeInfos, /* [out] */ ULONG32 *pcCodeInfos, /* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )( ICorProfilerInfo9 * This, /* [in] */ ModuleID moduleID, /* [in] */ mdTypeDef typeDef, /* [in] */ ULONG32 cTypeArgs, /* [size_is][in] */ ClassID typeArgs[ ], /* [out] */ ClassID *pClassID); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )( ICorProfilerInfo9 * This, /* [in] */ ModuleID moduleID, /* [in] */ mdMethodDef funcDef, @@ -14628,134 +15471,134 @@ EXTERN_C const IID IID_ICorProfilerInfo9; /* [in] */ ULONG32 cTypeArgs, /* [size_is][in] */ ClassID typeArgs[ ], /* [out] */ FunctionID *pFunctionID); - - HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )( + + HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )( ICorProfilerInfo9 * This, /* [in] */ ModuleID moduleID, /* [out] */ ICorProfilerObjectEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )( ICorProfilerInfo9 * This, /* [in] */ ObjectID objectId, /* [in] */ ULONG32 cDimensions, /* [size_is][out] */ ULONG32 pDimensionSizes[ ], /* [size_is][out] */ int pDimensionLowerBounds[ ], /* [out] */ BYTE **ppData); - - HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )( ICorProfilerInfo9 * This, /* [in] */ ClassID classId, /* [out] */ ULONG32 *pBufferOffset); - - HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )( ICorProfilerInfo9 * This, /* [in] */ ThreadID threadId, /* [out] */ AppDomainID *pAppDomainId); - - HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )( ICorProfilerInfo9 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )( ICorProfilerInfo9 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ AppDomainID appDomainId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )( ICorProfilerInfo9 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ ThreadID threadId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )( ICorProfilerInfo9 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ ContextID contextId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )( ICorProfilerInfo9 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [out] */ COR_PRF_STATIC_TYPE *pFieldInfo); - - HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )( + + HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )( ICorProfilerInfo9 * This, /* [in] */ ULONG cObjectRanges, /* [out] */ ULONG *pcObjectRanges, /* [length_is][size_is][out] */ COR_PRF_GC_GENERATION_RANGE ranges[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )( ICorProfilerInfo9 * This, /* [in] */ ObjectID objectId, /* [out] */ COR_PRF_GC_GENERATION_RANGE *range); - - HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )( ICorProfilerInfo9 * This, /* [out] */ COR_PRF_EX_CLAUSE_INFO *pinfo); - - HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions )( + + HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions )( ICorProfilerInfo9 * This, /* [out] */ ICorProfilerFunctionEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *RequestProfilerDetach )( + + HRESULT ( STDMETHODCALLTYPE *RequestProfilerDetach )( ICorProfilerInfo9 * This, /* [in] */ DWORD dwExpectedCompletionMilliseconds); - - HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper2 )( + + HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper2 )( ICorProfilerInfo9 * This, /* [in] */ FunctionIDMapper2 *pFunc, /* [in] */ void *clientData); - - HRESULT ( STDMETHODCALLTYPE *GetStringLayout2 )( + + HRESULT ( STDMETHODCALLTYPE *GetStringLayout2 )( ICorProfilerInfo9 * This, /* [out] */ ULONG *pStringLengthOffset, /* [out] */ ULONG *pBufferOffset); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3 )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3 )( ICorProfilerInfo9 * This, /* [in] */ FunctionEnter3 *pFuncEnter3, /* [in] */ FunctionLeave3 *pFuncLeave3, /* [in] */ FunctionTailcall3 *pFuncTailcall3); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3WithInfo )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3WithInfo )( ICorProfilerInfo9 * This, /* [in] */ FunctionEnter3WithInfo *pFuncEnter3WithInfo, /* [in] */ FunctionLeave3WithInfo *pFuncLeave3WithInfo, /* [in] */ FunctionTailcall3WithInfo *pFuncTailcall3WithInfo); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionEnter3Info )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionEnter3Info )( ICorProfilerInfo9 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_ELT_INFO eltInfo, /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo, /* [out][in] */ ULONG *pcbArgumentInfo, /* [size_is][out] */ COR_PRF_FUNCTION_ARGUMENT_INFO *pArgumentInfo); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionLeave3Info )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionLeave3Info )( ICorProfilerInfo9 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_ELT_INFO eltInfo, /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo, /* [out] */ COR_PRF_FUNCTION_ARGUMENT_RANGE *pRetvalRange); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionTailcall3Info )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionTailcall3Info )( ICorProfilerInfo9 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_ELT_INFO eltInfo, /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo); - - HRESULT ( STDMETHODCALLTYPE *EnumModules )( + + HRESULT ( STDMETHODCALLTYPE *EnumModules )( ICorProfilerInfo9 * This, /* [out] */ ICorProfilerModuleEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetRuntimeInformation )( + + HRESULT ( STDMETHODCALLTYPE *GetRuntimeInformation )( ICorProfilerInfo9 * This, /* [out] */ USHORT *pClrInstanceId, /* [out] */ COR_PRF_RUNTIME_TYPE *pRuntimeType, @@ -14765,140 +15608,140 @@ EXTERN_C const IID IID_ICorProfilerInfo9; /* [out] */ USHORT *pQFEVersion, /* [in] */ ULONG cchVersionString, /* [out] */ ULONG *pcchVersionString, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchVersionString, *pcchVersionString) WCHAR szVersionString[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress2 )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress2 )( ICorProfilerInfo9 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ AppDomainID appDomainId, /* [in] */ ThreadID threadId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainsContainingModule )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainsContainingModule )( ICorProfilerInfo9 * This, /* [in] */ ModuleID moduleId, /* [in] */ ULONG32 cAppDomainIds, /* [out] */ ULONG32 *pcAppDomainIds, /* [length_is][size_is][out] */ AppDomainID appDomainIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetModuleInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleInfo2 )( ICorProfilerInfo9 * This, /* [in] */ ModuleID moduleId, /* [out] */ LPCBYTE *ppBaseLoadAddress, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AssemblyID *pAssemblyId, /* [out] */ DWORD *pdwModuleFlags); - - HRESULT ( STDMETHODCALLTYPE *EnumThreads )( + + HRESULT ( STDMETHODCALLTYPE *EnumThreads )( ICorProfilerInfo9 * This, /* [out] */ ICorProfilerThreadEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *InitializeCurrentThread )( + + HRESULT ( STDMETHODCALLTYPE *InitializeCurrentThread )( ICorProfilerInfo9 * This); - - HRESULT ( STDMETHODCALLTYPE *RequestReJIT )( + + HRESULT ( STDMETHODCALLTYPE *RequestReJIT )( ICorProfilerInfo9 * This, /* [in] */ ULONG cFunctions, /* [size_is][in] */ ModuleID moduleIds[ ], /* [size_is][in] */ mdMethodDef methodIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *RequestRevert )( + + HRESULT ( STDMETHODCALLTYPE *RequestRevert )( ICorProfilerInfo9 * This, /* [in] */ ULONG cFunctions, /* [size_is][in] */ ModuleID moduleIds[ ], /* [size_is][in] */ mdMethodDef methodIds[ ], /* [size_is][out] */ HRESULT status[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo3 )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo3 )( ICorProfilerInfo9 * This, /* [in] */ FunctionID functionID, /* [in] */ ReJITID reJitId, /* [in] */ ULONG32 cCodeInfos, /* [out] */ ULONG32 *pcCodeInfos, /* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP2 )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP2 )( ICorProfilerInfo9 * This, /* [in] */ LPCBYTE ip, /* [out] */ FunctionID *pFunctionId, /* [out] */ ReJITID *pReJitId); - - HRESULT ( STDMETHODCALLTYPE *GetReJITIDs )( + + HRESULT ( STDMETHODCALLTYPE *GetReJITIDs )( ICorProfilerInfo9 * This, /* [in] */ FunctionID functionId, /* [in] */ ULONG cReJitIds, /* [out] */ ULONG *pcReJitIds, /* [length_is][size_is][out] */ ReJITID reJitIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping2 )( + + HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping2 )( ICorProfilerInfo9 * This, /* [in] */ FunctionID functionId, /* [in] */ ReJITID reJitId, /* [in] */ ULONG32 cMap, /* [out] */ ULONG32 *pcMap, /* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]); - - HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions2 )( + + HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions2 )( ICorProfilerInfo9 * This, /* [out] */ ICorProfilerFunctionEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetObjectSize2 )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectSize2 )( ICorProfilerInfo9 * This, /* [in] */ ObjectID objectId, /* [out] */ SIZE_T *pcSize); - - HRESULT ( STDMETHODCALLTYPE *GetEventMask2 )( + + HRESULT ( STDMETHODCALLTYPE *GetEventMask2 )( ICorProfilerInfo9 * This, /* [out] */ DWORD *pdwEventsLow, /* [out] */ DWORD *pdwEventsHigh); - - HRESULT ( STDMETHODCALLTYPE *SetEventMask2 )( + + HRESULT ( STDMETHODCALLTYPE *SetEventMask2 )( ICorProfilerInfo9 * This, /* [in] */ DWORD dwEventsLow, /* [in] */ DWORD dwEventsHigh); - - HRESULT ( STDMETHODCALLTYPE *EnumNgenModuleMethodsInliningThisMethod )( + + HRESULT ( STDMETHODCALLTYPE *EnumNgenModuleMethodsInliningThisMethod )( ICorProfilerInfo9 * This, /* [in] */ ModuleID inlinersModuleId, /* [in] */ ModuleID inlineeModuleId, /* [in] */ mdMethodDef inlineeMethodId, /* [out] */ BOOL *incompleteData, /* [out] */ ICorProfilerMethodEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *ApplyMetaData )( + + HRESULT ( STDMETHODCALLTYPE *ApplyMetaData )( ICorProfilerInfo9 * This, /* [in] */ ModuleID moduleId); - - HRESULT ( STDMETHODCALLTYPE *GetInMemorySymbolsLength )( + + HRESULT ( STDMETHODCALLTYPE *GetInMemorySymbolsLength )( ICorProfilerInfo9 * This, /* [in] */ ModuleID moduleId, /* [out] */ DWORD *pCountSymbolBytes); - - HRESULT ( STDMETHODCALLTYPE *ReadInMemorySymbols )( + + HRESULT ( STDMETHODCALLTYPE *ReadInMemorySymbols )( ICorProfilerInfo9 * This, /* [in] */ ModuleID moduleId, /* [in] */ DWORD symbolsReadOffset, /* [out] */ BYTE *pSymbolBytes, /* [in] */ DWORD countSymbolBytes, /* [out] */ DWORD *pCountSymbolBytesRead); - - HRESULT ( STDMETHODCALLTYPE *IsFunctionDynamic )( + + HRESULT ( STDMETHODCALLTYPE *IsFunctionDynamic )( ICorProfilerInfo9 * This, /* [in] */ FunctionID functionId, /* [out] */ BOOL *isDynamic); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP3 )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP3 )( ICorProfilerInfo9 * This, /* [in] */ LPCBYTE ip, /* [out] */ FunctionID *functionId, /* [out] */ ReJITID *pReJitId); - - HRESULT ( STDMETHODCALLTYPE *GetDynamicFunctionInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetDynamicFunctionInfo )( ICorProfilerInfo9 * This, /* [in] */ FunctionID functionId, /* [out] */ ModuleID *moduleId, @@ -14907,29 +15750,29 @@ EXTERN_C const IID IID_ICorProfilerInfo9; /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, /* [out] */ WCHAR wszName[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetNativeCodeStartAddresses )( + + HRESULT ( STDMETHODCALLTYPE *GetNativeCodeStartAddresses )( ICorProfilerInfo9 * This, FunctionID functionID, ReJITID reJitId, ULONG32 cCodeStartAddresses, ULONG32 *pcCodeStartAddresses, UINT_PTR codeStartAddresses[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping3 )( + + HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping3 )( ICorProfilerInfo9 * This, UINT_PTR pNativeCodeStartAddress, ULONG32 cMap, ULONG32 *pcMap, COR_DEBUG_IL_TO_NATIVE_MAP map[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo4 )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo4 )( ICorProfilerInfo9 * This, UINT_PTR pNativeCodeStartAddress, ULONG32 cCodeInfos, ULONG32 *pcCodeInfos, COR_PRF_CODE_INFO codeInfos[ ]); - + END_INTERFACE } ICorProfilerInfo9Vtbl; @@ -14938,298 +15781,298 @@ EXTERN_C const IID IID_ICorProfilerInfo9; CONST_VTBL struct ICorProfilerInfo9Vtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ICorProfilerInfo9_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ICorProfilerInfo9_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ICorProfilerInfo9_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ICorProfilerInfo9_GetClassFromObject(This,objectId,pClassId) \ - ( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) ) + ( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) ) #define ICorProfilerInfo9_GetClassFromToken(This,moduleId,typeDef,pClassId) \ - ( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) ) + ( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) ) #define ICorProfilerInfo9_GetCodeInfo(This,functionId,pStart,pcSize) \ - ( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) ) + ( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) ) #define ICorProfilerInfo9_GetEventMask(This,pdwEvents) \ - ( (This)->lpVtbl -> GetEventMask(This,pdwEvents) ) + ( (This)->lpVtbl -> GetEventMask(This,pdwEvents) ) #define ICorProfilerInfo9_GetFunctionFromIP(This,ip,pFunctionId) \ - ( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) ) + ( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) ) #define ICorProfilerInfo9_GetFunctionFromToken(This,moduleId,token,pFunctionId) \ - ( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) ) + ( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) ) #define ICorProfilerInfo9_GetHandleFromThread(This,threadId,phThread) \ - ( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) ) + ( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) ) #define ICorProfilerInfo9_GetObjectSize(This,objectId,pcSize) \ - ( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) ) + ( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) ) #define ICorProfilerInfo9_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \ - ( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) ) + ( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) ) #define ICorProfilerInfo9_GetThreadInfo(This,threadId,pdwWin32ThreadId) \ - ( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) ) + ( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) ) #define ICorProfilerInfo9_GetCurrentThreadID(This,pThreadId) \ - ( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) ) + ( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) ) #define ICorProfilerInfo9_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \ - ( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) ) + ( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) ) #define ICorProfilerInfo9_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \ - ( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) ) + ( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) ) #define ICorProfilerInfo9_SetEventMask(This,dwEvents) \ - ( (This)->lpVtbl -> SetEventMask(This,dwEvents) ) + ( (This)->lpVtbl -> SetEventMask(This,dwEvents) ) #define ICorProfilerInfo9_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) #define ICorProfilerInfo9_SetFunctionIDMapper(This,pFunc) \ - ( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) ) + ( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) ) #define ICorProfilerInfo9_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \ - ( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) ) + ( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) ) #define ICorProfilerInfo9_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \ - ( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) ) + ( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) ) #define ICorProfilerInfo9_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \ - ( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) ) + ( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) ) #define ICorProfilerInfo9_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \ - ( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) ) + ( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) ) #define ICorProfilerInfo9_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \ - ( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) ) + ( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) ) #define ICorProfilerInfo9_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \ - ( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) ) + ( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) ) #define ICorProfilerInfo9_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \ - ( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) ) + ( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) ) #define ICorProfilerInfo9_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \ - ( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) ) + ( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) ) #define ICorProfilerInfo9_SetFunctionReJIT(This,functionId) \ - ( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) ) + ( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) ) #define ICorProfilerInfo9_ForceGC(This) \ - ( (This)->lpVtbl -> ForceGC(This) ) + ( (This)->lpVtbl -> ForceGC(This) ) #define ICorProfilerInfo9_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \ - ( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) ) + ( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) ) #define ICorProfilerInfo9_GetInprocInspectionInterface(This,ppicd) \ - ( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) ) + ( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) ) #define ICorProfilerInfo9_GetInprocInspectionIThisThread(This,ppicd) \ - ( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) ) + ( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) ) #define ICorProfilerInfo9_GetThreadContext(This,threadId,pContextId) \ - ( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) ) + ( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) ) #define ICorProfilerInfo9_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \ - ( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) ) + ( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) ) #define ICorProfilerInfo9_EndInprocDebugging(This,dwProfilerContext) \ - ( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) ) + ( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) ) #define ICorProfilerInfo9_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \ - ( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) ) + ( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) ) #define ICorProfilerInfo9_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \ - ( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) ) + ( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) ) #define ICorProfilerInfo9_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) #define ICorProfilerInfo9_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \ - ( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) ) + ( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) ) #define ICorProfilerInfo9_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \ - ( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) ) + ( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) ) #define ICorProfilerInfo9_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \ - ( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) ) + ( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) ) #define ICorProfilerInfo9_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \ - ( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) ) + ( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) ) #define ICorProfilerInfo9_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \ - ( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) ) + ( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) ) #define ICorProfilerInfo9_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \ - ( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) ) + ( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) ) #define ICorProfilerInfo9_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \ - ( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) ) + ( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) ) #define ICorProfilerInfo9_EnumModuleFrozenObjects(This,moduleID,ppEnum) \ - ( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) ) + ( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) ) #define ICorProfilerInfo9_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \ - ( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) ) + ( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) ) #define ICorProfilerInfo9_GetBoxClassLayout(This,classId,pBufferOffset) \ - ( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) ) + ( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) ) #define ICorProfilerInfo9_GetThreadAppDomain(This,threadId,pAppDomainId) \ - ( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) ) + ( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) ) #define ICorProfilerInfo9_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \ - ( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) ) + ( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) ) #define ICorProfilerInfo9_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \ - ( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) ) + ( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) ) #define ICorProfilerInfo9_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \ - ( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) ) + ( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) ) #define ICorProfilerInfo9_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \ - ( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) ) + ( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) ) #define ICorProfilerInfo9_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \ - ( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) ) + ( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) ) #define ICorProfilerInfo9_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \ - ( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) ) + ( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) ) #define ICorProfilerInfo9_GetObjectGeneration(This,objectId,range) \ - ( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) ) + ( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) ) #define ICorProfilerInfo9_GetNotifiedExceptionClauseInfo(This,pinfo) \ - ( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) ) + ( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) ) #define ICorProfilerInfo9_EnumJITedFunctions(This,ppEnum) \ - ( (This)->lpVtbl -> EnumJITedFunctions(This,ppEnum) ) + ( (This)->lpVtbl -> EnumJITedFunctions(This,ppEnum) ) #define ICorProfilerInfo9_RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) \ - ( (This)->lpVtbl -> RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) ) + ( (This)->lpVtbl -> RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) ) #define ICorProfilerInfo9_SetFunctionIDMapper2(This,pFunc,clientData) \ - ( (This)->lpVtbl -> SetFunctionIDMapper2(This,pFunc,clientData) ) + ( (This)->lpVtbl -> SetFunctionIDMapper2(This,pFunc,clientData) ) #define ICorProfilerInfo9_GetStringLayout2(This,pStringLengthOffset,pBufferOffset) \ - ( (This)->lpVtbl -> GetStringLayout2(This,pStringLengthOffset,pBufferOffset) ) + ( (This)->lpVtbl -> GetStringLayout2(This,pStringLengthOffset,pBufferOffset) ) #define ICorProfilerInfo9_SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) ) #define ICorProfilerInfo9_SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) ) #define ICorProfilerInfo9_GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) \ - ( (This)->lpVtbl -> GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) ) + ( (This)->lpVtbl -> GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) ) #define ICorProfilerInfo9_GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) \ - ( (This)->lpVtbl -> GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) ) + ( (This)->lpVtbl -> GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) ) #define ICorProfilerInfo9_GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) \ - ( (This)->lpVtbl -> GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) ) + ( (This)->lpVtbl -> GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) ) #define ICorProfilerInfo9_EnumModules(This,ppEnum) \ - ( (This)->lpVtbl -> EnumModules(This,ppEnum) ) + ( (This)->lpVtbl -> EnumModules(This,ppEnum) ) #define ICorProfilerInfo9_GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) \ - ( (This)->lpVtbl -> GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) ) + ( (This)->lpVtbl -> GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) ) #define ICorProfilerInfo9_GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) \ - ( (This)->lpVtbl -> GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) ) + ( (This)->lpVtbl -> GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) ) #define ICorProfilerInfo9_GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) \ - ( (This)->lpVtbl -> GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) ) + ( (This)->lpVtbl -> GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) ) #define ICorProfilerInfo9_GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) \ - ( (This)->lpVtbl -> GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) ) + ( (This)->lpVtbl -> GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) ) #define ICorProfilerInfo9_EnumThreads(This,ppEnum) \ - ( (This)->lpVtbl -> EnumThreads(This,ppEnum) ) + ( (This)->lpVtbl -> EnumThreads(This,ppEnum) ) #define ICorProfilerInfo9_InitializeCurrentThread(This) \ - ( (This)->lpVtbl -> InitializeCurrentThread(This) ) + ( (This)->lpVtbl -> InitializeCurrentThread(This) ) #define ICorProfilerInfo9_RequestReJIT(This,cFunctions,moduleIds,methodIds) \ - ( (This)->lpVtbl -> RequestReJIT(This,cFunctions,moduleIds,methodIds) ) + ( (This)->lpVtbl -> RequestReJIT(This,cFunctions,moduleIds,methodIds) ) #define ICorProfilerInfo9_RequestRevert(This,cFunctions,moduleIds,methodIds,status) \ - ( (This)->lpVtbl -> RequestRevert(This,cFunctions,moduleIds,methodIds,status) ) + ( (This)->lpVtbl -> RequestRevert(This,cFunctions,moduleIds,methodIds,status) ) #define ICorProfilerInfo9_GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) \ - ( (This)->lpVtbl -> GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) ) + ( (This)->lpVtbl -> GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) ) #define ICorProfilerInfo9_GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) \ - ( (This)->lpVtbl -> GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) ) + ( (This)->lpVtbl -> GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) ) #define ICorProfilerInfo9_GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) \ - ( (This)->lpVtbl -> GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) ) + ( (This)->lpVtbl -> GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) ) #define ICorProfilerInfo9_GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) \ - ( (This)->lpVtbl -> GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) ) + ( (This)->lpVtbl -> GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) ) #define ICorProfilerInfo9_EnumJITedFunctions2(This,ppEnum) \ - ( (This)->lpVtbl -> EnumJITedFunctions2(This,ppEnum) ) + ( (This)->lpVtbl -> EnumJITedFunctions2(This,ppEnum) ) #define ICorProfilerInfo9_GetObjectSize2(This,objectId,pcSize) \ - ( (This)->lpVtbl -> GetObjectSize2(This,objectId,pcSize) ) + ( (This)->lpVtbl -> GetObjectSize2(This,objectId,pcSize) ) #define ICorProfilerInfo9_GetEventMask2(This,pdwEventsLow,pdwEventsHigh) \ - ( (This)->lpVtbl -> GetEventMask2(This,pdwEventsLow,pdwEventsHigh) ) + ( (This)->lpVtbl -> GetEventMask2(This,pdwEventsLow,pdwEventsHigh) ) #define ICorProfilerInfo9_SetEventMask2(This,dwEventsLow,dwEventsHigh) \ - ( (This)->lpVtbl -> SetEventMask2(This,dwEventsLow,dwEventsHigh) ) + ( (This)->lpVtbl -> SetEventMask2(This,dwEventsLow,dwEventsHigh) ) #define ICorProfilerInfo9_EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) \ - ( (This)->lpVtbl -> EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) ) + ( (This)->lpVtbl -> EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) ) #define ICorProfilerInfo9_ApplyMetaData(This,moduleId) \ - ( (This)->lpVtbl -> ApplyMetaData(This,moduleId) ) + ( (This)->lpVtbl -> ApplyMetaData(This,moduleId) ) #define ICorProfilerInfo9_GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) \ - ( (This)->lpVtbl -> GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) ) + ( (This)->lpVtbl -> GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) ) #define ICorProfilerInfo9_ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) \ - ( (This)->lpVtbl -> ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) ) + ( (This)->lpVtbl -> ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) ) #define ICorProfilerInfo9_IsFunctionDynamic(This,functionId,isDynamic) \ - ( (This)->lpVtbl -> IsFunctionDynamic(This,functionId,isDynamic) ) + ( (This)->lpVtbl -> IsFunctionDynamic(This,functionId,isDynamic) ) #define ICorProfilerInfo9_GetFunctionFromIP3(This,ip,functionId,pReJitId) \ - ( (This)->lpVtbl -> GetFunctionFromIP3(This,ip,functionId,pReJitId) ) + ( (This)->lpVtbl -> GetFunctionFromIP3(This,ip,functionId,pReJitId) ) #define ICorProfilerInfo9_GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) \ - ( (This)->lpVtbl -> GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) ) + ( (This)->lpVtbl -> GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) ) #define ICorProfilerInfo9_GetNativeCodeStartAddresses(This,functionID,reJitId,cCodeStartAddresses,pcCodeStartAddresses,codeStartAddresses) \ - ( (This)->lpVtbl -> GetNativeCodeStartAddresses(This,functionID,reJitId,cCodeStartAddresses,pcCodeStartAddresses,codeStartAddresses) ) + ( (This)->lpVtbl -> GetNativeCodeStartAddresses(This,functionID,reJitId,cCodeStartAddresses,pcCodeStartAddresses,codeStartAddresses) ) #define ICorProfilerInfo9_GetILToNativeMapping3(This,pNativeCodeStartAddress,cMap,pcMap,map) \ - ( (This)->lpVtbl -> GetILToNativeMapping3(This,pNativeCodeStartAddress,cMap,pcMap,map) ) + ( (This)->lpVtbl -> GetILToNativeMapping3(This,pNativeCodeStartAddress,cMap,pcMap,map) ) #define ICorProfilerInfo9_GetCodeInfo4(This,pNativeCodeStartAddress,cCodeInfos,pcCodeInfos,codeInfos) \ - ( (This)->lpVtbl -> GetCodeInfo4(This,pNativeCodeStartAddress,cCodeInfos,pcCodeInfos,codeInfos) ) + ( (This)->lpVtbl -> GetCodeInfo4(This,pNativeCodeStartAddress,cCodeInfos,pcCodeInfos,codeInfos) ) #endif /* COBJMACROS */ @@ -15246,250 +16089,250 @@ EXTERN_C const IID IID_ICorProfilerInfo9; #define __ICorProfilerInfo10_INTERFACE_DEFINED__ /* interface ICorProfilerInfo10 */ -/* [local][unique][uuid][object] */ +/* [local][unique][uuid][object] */ EXTERN_C const IID IID_ICorProfilerInfo10; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("2F1B5152-C869-40C9-AA5F-3ABE026BD720") ICorProfilerInfo10 : public ICorProfilerInfo9 { public: - virtual HRESULT STDMETHODCALLTYPE EnumerateObjectReferences( + virtual HRESULT STDMETHODCALLTYPE EnumerateObjectReferences( ObjectID objectId, ObjectReferenceCallback callback, void *clientData) = 0; - - virtual HRESULT STDMETHODCALLTYPE IsFrozenObject( + + virtual HRESULT STDMETHODCALLTYPE IsFrozenObject( ObjectID objectId, BOOL *pbFrozen) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetLOHObjectSizeThreshold( + + virtual HRESULT STDMETHODCALLTYPE GetLOHObjectSizeThreshold( DWORD *pThreshold) = 0; - - virtual HRESULT STDMETHODCALLTYPE RequestReJITWithInliners( + + virtual HRESULT STDMETHODCALLTYPE RequestReJITWithInliners( /* [in] */ DWORD dwRejitFlags, /* [in] */ ULONG cFunctions, /* [size_is][in] */ ModuleID moduleIds[ ], /* [size_is][in] */ mdMethodDef methodIds[ ]) = 0; - + virtual HRESULT STDMETHODCALLTYPE SuspendRuntime( void) = 0; - + virtual HRESULT STDMETHODCALLTYPE ResumeRuntime( void) = 0; - + }; - - + + #else /* C style interface */ typedef struct ICorProfilerInfo10Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorProfilerInfo10 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorProfilerInfo10 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorProfilerInfo10 * This); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )( ICorProfilerInfo10 * This, /* [in] */ ObjectID objectId, /* [out] */ ClassID *pClassId); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )( ICorProfilerInfo10 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdTypeDef typeDef, /* [out] */ ClassID *pClassId); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )( ICorProfilerInfo10 * This, /* [in] */ FunctionID functionId, /* [out] */ LPCBYTE *pStart, /* [out] */ ULONG *pcSize); - - HRESULT ( STDMETHODCALLTYPE *GetEventMask )( + + HRESULT ( STDMETHODCALLTYPE *GetEventMask )( ICorProfilerInfo10 * This, /* [out] */ DWORD *pdwEvents); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )( ICorProfilerInfo10 * This, /* [in] */ LPCBYTE ip, /* [out] */ FunctionID *pFunctionId); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )( ICorProfilerInfo10 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdToken token, /* [out] */ FunctionID *pFunctionId); - - HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )( + + HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )( ICorProfilerInfo10 * This, /* [in] */ ThreadID threadId, /* [out] */ HANDLE *phThread); - - HRESULT ( STDMETHODCALLTYPE *GetObjectSize )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectSize )( ICorProfilerInfo10 * This, /* [in] */ ObjectID objectId, /* [out] */ ULONG *pcSize); - - HRESULT ( STDMETHODCALLTYPE *IsArrayClass )( + + HRESULT ( STDMETHODCALLTYPE *IsArrayClass )( ICorProfilerInfo10 * This, /* [in] */ ClassID classId, /* [out] */ CorElementType *pBaseElemType, /* [out] */ ClassID *pBaseClassId, /* [out] */ ULONG *pcRank); - - HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )( ICorProfilerInfo10 * This, /* [in] */ ThreadID threadId, /* [out] */ DWORD *pdwWin32ThreadId); - - HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )( + + HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )( ICorProfilerInfo10 * This, /* [out] */ ThreadID *pThreadId); - - HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )( ICorProfilerInfo10 * This, /* [in] */ ClassID classId, /* [out] */ ModuleID *pModuleId, /* [out] */ mdTypeDef *pTypeDefToken); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )( ICorProfilerInfo10 * This, /* [in] */ FunctionID functionId, /* [out] */ ClassID *pClassId, /* [out] */ ModuleID *pModuleId, /* [out] */ mdToken *pToken); - - HRESULT ( STDMETHODCALLTYPE *SetEventMask )( + + HRESULT ( STDMETHODCALLTYPE *SetEventMask )( ICorProfilerInfo10 * This, /* [in] */ DWORD dwEvents); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )( ICorProfilerInfo10 * This, /* [in] */ FunctionEnter *pFuncEnter, /* [in] */ FunctionLeave *pFuncLeave, /* [in] */ FunctionTailcall *pFuncTailcall); - - HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )( + + HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )( ICorProfilerInfo10 * This, /* [in] */ FunctionIDMapper *pFunc); - - HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )( + + HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )( ICorProfilerInfo10 * This, /* [in] */ FunctionID functionId, /* [in] */ REFIID riid, /* [out] */ IUnknown **ppImport, /* [out] */ mdToken *pToken); - - HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )( ICorProfilerInfo10 * This, /* [in] */ ModuleID moduleId, /* [out] */ LPCBYTE *ppBaseLoadAddress, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AssemblyID *pAssemblyId); - - HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )( ICorProfilerInfo10 * This, /* [in] */ ModuleID moduleId, /* [in] */ DWORD dwOpenFlags, /* [in] */ REFIID riid, /* [out] */ IUnknown **ppOut); - - HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )( + + HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )( ICorProfilerInfo10 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodId, /* [out] */ LPCBYTE *ppMethodHeader, /* [out] */ ULONG *pcbMethodSize); - - HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )( + + HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )( ICorProfilerInfo10 * This, /* [in] */ ModuleID moduleId, /* [out] */ IMethodMalloc **ppMalloc); - - HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )( + + HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )( ICorProfilerInfo10 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodid, /* [in] */ LPCBYTE pbNewILMethodHeader); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )( ICorProfilerInfo10 * This, /* [in] */ AppDomainID appDomainId, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ ProcessID *pProcessId); - - HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )( ICorProfilerInfo10 * This, /* [in] */ AssemblyID assemblyId, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AppDomainID *pAppDomainId, /* [out] */ ModuleID *pModuleId); - - HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )( + + HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )( ICorProfilerInfo10 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ForceGC )( + + HRESULT ( STDMETHODCALLTYPE *ForceGC )( ICorProfilerInfo10 * This); - - HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )( + + HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )( ICorProfilerInfo10 * This, /* [in] */ FunctionID functionId, /* [in] */ BOOL fStartJit, /* [in] */ ULONG cILMapEntries, /* [size_is][in] */ COR_IL_MAP rgILMapEntries[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )( + + HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )( ICorProfilerInfo10 * This, /* [out] */ IUnknown **ppicd); - - HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )( + + HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )( ICorProfilerInfo10 * This, /* [out] */ IUnknown **ppicd); - - HRESULT ( STDMETHODCALLTYPE *GetThreadContext )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadContext )( ICorProfilerInfo10 * This, /* [in] */ ThreadID threadId, /* [out] */ ContextID *pContextId); - - HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )( + + HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )( ICorProfilerInfo10 * This, /* [in] */ BOOL fThisThreadOnly, /* [out] */ DWORD *pdwProfilerContext); - - HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )( + + HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )( ICorProfilerInfo10 * This, /* [in] */ DWORD dwProfilerContext); - - HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )( + + HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )( ICorProfilerInfo10 * This, /* [in] */ FunctionID functionId, /* [in] */ ULONG32 cMap, /* [out] */ ULONG32 *pcMap, /* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]); - - HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )( + + HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )( ICorProfilerInfo10 * This, /* [in] */ ThreadID thread, /* [in] */ StackSnapshotCallback *callback, @@ -15497,14 +16340,14 @@ EXTERN_C const IID IID_ICorProfilerInfo10; /* [in] */ void *clientData, /* [size_is][in] */ BYTE context[ ], /* [in] */ ULONG32 contextSize); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )( ICorProfilerInfo10 * This, /* [in] */ FunctionEnter2 *pFuncEnter, /* [in] */ FunctionLeave2 *pFuncLeave, /* [in] */ FunctionTailcall2 *pFuncTailcall); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )( ICorProfilerInfo10 * This, /* [in] */ FunctionID funcId, /* [in] */ COR_PRF_FRAME_INFO frameInfo, @@ -15514,22 +16357,22 @@ EXTERN_C const IID IID_ICorProfilerInfo10; /* [in] */ ULONG32 cTypeArgs, /* [out] */ ULONG32 *pcTypeArgs, /* [out] */ ClassID typeArgs[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetStringLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetStringLayout )( ICorProfilerInfo10 * This, /* [out] */ ULONG *pBufferLengthOffset, /* [out] */ ULONG *pStringLengthOffset, /* [out] */ ULONG *pBufferOffset); - - HRESULT ( STDMETHODCALLTYPE *GetClassLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetClassLayout )( ICorProfilerInfo10 * This, /* [in] */ ClassID classID, /* [out][in] */ COR_FIELD_OFFSET rFieldOffset[ ], /* [in] */ ULONG cFieldOffset, /* [out] */ ULONG *pcFieldOffset, /* [out] */ ULONG *pulClassSize); - - HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )( ICorProfilerInfo10 * This, /* [in] */ ClassID classId, /* [out] */ ModuleID *pModuleId, @@ -15538,23 +16381,23 @@ EXTERN_C const IID IID_ICorProfilerInfo10; /* [in] */ ULONG32 cNumTypeArgs, /* [out] */ ULONG32 *pcNumTypeArgs, /* [out] */ ClassID typeArgs[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )( ICorProfilerInfo10 * This, /* [in] */ FunctionID functionID, /* [in] */ ULONG32 cCodeInfos, /* [out] */ ULONG32 *pcCodeInfos, /* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )( ICorProfilerInfo10 * This, /* [in] */ ModuleID moduleID, /* [in] */ mdTypeDef typeDef, /* [in] */ ULONG32 cTypeArgs, /* [size_is][in] */ ClassID typeArgs[ ], /* [out] */ ClassID *pClassID); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )( ICorProfilerInfo10 * This, /* [in] */ ModuleID moduleID, /* [in] */ mdMethodDef funcDef, @@ -15562,134 +16405,134 @@ EXTERN_C const IID IID_ICorProfilerInfo10; /* [in] */ ULONG32 cTypeArgs, /* [size_is][in] */ ClassID typeArgs[ ], /* [out] */ FunctionID *pFunctionID); - - HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )( + + HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )( ICorProfilerInfo10 * This, /* [in] */ ModuleID moduleID, /* [out] */ ICorProfilerObjectEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )( ICorProfilerInfo10 * This, /* [in] */ ObjectID objectId, /* [in] */ ULONG32 cDimensions, /* [size_is][out] */ ULONG32 pDimensionSizes[ ], /* [size_is][out] */ int pDimensionLowerBounds[ ], /* [out] */ BYTE **ppData); - - HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )( ICorProfilerInfo10 * This, /* [in] */ ClassID classId, /* [out] */ ULONG32 *pBufferOffset); - - HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )( ICorProfilerInfo10 * This, /* [in] */ ThreadID threadId, /* [out] */ AppDomainID *pAppDomainId); - - HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )( ICorProfilerInfo10 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )( ICorProfilerInfo10 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ AppDomainID appDomainId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )( ICorProfilerInfo10 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ ThreadID threadId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )( ICorProfilerInfo10 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ ContextID contextId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )( ICorProfilerInfo10 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [out] */ COR_PRF_STATIC_TYPE *pFieldInfo); - - HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )( + + HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )( ICorProfilerInfo10 * This, /* [in] */ ULONG cObjectRanges, /* [out] */ ULONG *pcObjectRanges, /* [length_is][size_is][out] */ COR_PRF_GC_GENERATION_RANGE ranges[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )( ICorProfilerInfo10 * This, /* [in] */ ObjectID objectId, /* [out] */ COR_PRF_GC_GENERATION_RANGE *range); - - HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )( ICorProfilerInfo10 * This, /* [out] */ COR_PRF_EX_CLAUSE_INFO *pinfo); - - HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions )( + + HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions )( ICorProfilerInfo10 * This, /* [out] */ ICorProfilerFunctionEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *RequestProfilerDetach )( + + HRESULT ( STDMETHODCALLTYPE *RequestProfilerDetach )( ICorProfilerInfo10 * This, /* [in] */ DWORD dwExpectedCompletionMilliseconds); - - HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper2 )( + + HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper2 )( ICorProfilerInfo10 * This, /* [in] */ FunctionIDMapper2 *pFunc, /* [in] */ void *clientData); - - HRESULT ( STDMETHODCALLTYPE *GetStringLayout2 )( + + HRESULT ( STDMETHODCALLTYPE *GetStringLayout2 )( ICorProfilerInfo10 * This, /* [out] */ ULONG *pStringLengthOffset, /* [out] */ ULONG *pBufferOffset); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3 )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3 )( ICorProfilerInfo10 * This, /* [in] */ FunctionEnter3 *pFuncEnter3, /* [in] */ FunctionLeave3 *pFuncLeave3, /* [in] */ FunctionTailcall3 *pFuncTailcall3); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3WithInfo )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3WithInfo )( ICorProfilerInfo10 * This, /* [in] */ FunctionEnter3WithInfo *pFuncEnter3WithInfo, /* [in] */ FunctionLeave3WithInfo *pFuncLeave3WithInfo, /* [in] */ FunctionTailcall3WithInfo *pFuncTailcall3WithInfo); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionEnter3Info )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionEnter3Info )( ICorProfilerInfo10 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_ELT_INFO eltInfo, /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo, /* [out][in] */ ULONG *pcbArgumentInfo, /* [size_is][out] */ COR_PRF_FUNCTION_ARGUMENT_INFO *pArgumentInfo); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionLeave3Info )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionLeave3Info )( ICorProfilerInfo10 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_ELT_INFO eltInfo, /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo, /* [out] */ COR_PRF_FUNCTION_ARGUMENT_RANGE *pRetvalRange); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionTailcall3Info )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionTailcall3Info )( ICorProfilerInfo10 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_ELT_INFO eltInfo, /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo); - - HRESULT ( STDMETHODCALLTYPE *EnumModules )( + + HRESULT ( STDMETHODCALLTYPE *EnumModules )( ICorProfilerInfo10 * This, /* [out] */ ICorProfilerModuleEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetRuntimeInformation )( + + HRESULT ( STDMETHODCALLTYPE *GetRuntimeInformation )( ICorProfilerInfo10 * This, /* [out] */ USHORT *pClrInstanceId, /* [out] */ COR_PRF_RUNTIME_TYPE *pRuntimeType, @@ -15699,140 +16542,140 @@ EXTERN_C const IID IID_ICorProfilerInfo10; /* [out] */ USHORT *pQFEVersion, /* [in] */ ULONG cchVersionString, /* [out] */ ULONG *pcchVersionString, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchVersionString, *pcchVersionString) WCHAR szVersionString[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress2 )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress2 )( ICorProfilerInfo10 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ AppDomainID appDomainId, /* [in] */ ThreadID threadId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainsContainingModule )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainsContainingModule )( ICorProfilerInfo10 * This, /* [in] */ ModuleID moduleId, /* [in] */ ULONG32 cAppDomainIds, /* [out] */ ULONG32 *pcAppDomainIds, /* [length_is][size_is][out] */ AppDomainID appDomainIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetModuleInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleInfo2 )( ICorProfilerInfo10 * This, /* [in] */ ModuleID moduleId, /* [out] */ LPCBYTE *ppBaseLoadAddress, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AssemblyID *pAssemblyId, /* [out] */ DWORD *pdwModuleFlags); - - HRESULT ( STDMETHODCALLTYPE *EnumThreads )( + + HRESULT ( STDMETHODCALLTYPE *EnumThreads )( ICorProfilerInfo10 * This, /* [out] */ ICorProfilerThreadEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *InitializeCurrentThread )( + + HRESULT ( STDMETHODCALLTYPE *InitializeCurrentThread )( ICorProfilerInfo10 * This); - - HRESULT ( STDMETHODCALLTYPE *RequestReJIT )( + + HRESULT ( STDMETHODCALLTYPE *RequestReJIT )( ICorProfilerInfo10 * This, /* [in] */ ULONG cFunctions, /* [size_is][in] */ ModuleID moduleIds[ ], /* [size_is][in] */ mdMethodDef methodIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *RequestRevert )( + + HRESULT ( STDMETHODCALLTYPE *RequestRevert )( ICorProfilerInfo10 * This, /* [in] */ ULONG cFunctions, /* [size_is][in] */ ModuleID moduleIds[ ], /* [size_is][in] */ mdMethodDef methodIds[ ], /* [size_is][out] */ HRESULT status[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo3 )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo3 )( ICorProfilerInfo10 * This, /* [in] */ FunctionID functionID, /* [in] */ ReJITID reJitId, /* [in] */ ULONG32 cCodeInfos, /* [out] */ ULONG32 *pcCodeInfos, /* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP2 )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP2 )( ICorProfilerInfo10 * This, /* [in] */ LPCBYTE ip, /* [out] */ FunctionID *pFunctionId, /* [out] */ ReJITID *pReJitId); - - HRESULT ( STDMETHODCALLTYPE *GetReJITIDs )( + + HRESULT ( STDMETHODCALLTYPE *GetReJITIDs )( ICorProfilerInfo10 * This, /* [in] */ FunctionID functionId, /* [in] */ ULONG cReJitIds, /* [out] */ ULONG *pcReJitIds, /* [length_is][size_is][out] */ ReJITID reJitIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping2 )( + + HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping2 )( ICorProfilerInfo10 * This, /* [in] */ FunctionID functionId, /* [in] */ ReJITID reJitId, /* [in] */ ULONG32 cMap, /* [out] */ ULONG32 *pcMap, /* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]); - - HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions2 )( + + HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions2 )( ICorProfilerInfo10 * This, /* [out] */ ICorProfilerFunctionEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetObjectSize2 )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectSize2 )( ICorProfilerInfo10 * This, /* [in] */ ObjectID objectId, /* [out] */ SIZE_T *pcSize); - - HRESULT ( STDMETHODCALLTYPE *GetEventMask2 )( + + HRESULT ( STDMETHODCALLTYPE *GetEventMask2 )( ICorProfilerInfo10 * This, /* [out] */ DWORD *pdwEventsLow, /* [out] */ DWORD *pdwEventsHigh); - - HRESULT ( STDMETHODCALLTYPE *SetEventMask2 )( + + HRESULT ( STDMETHODCALLTYPE *SetEventMask2 )( ICorProfilerInfo10 * This, /* [in] */ DWORD dwEventsLow, /* [in] */ DWORD dwEventsHigh); - - HRESULT ( STDMETHODCALLTYPE *EnumNgenModuleMethodsInliningThisMethod )( + + HRESULT ( STDMETHODCALLTYPE *EnumNgenModuleMethodsInliningThisMethod )( ICorProfilerInfo10 * This, /* [in] */ ModuleID inlinersModuleId, /* [in] */ ModuleID inlineeModuleId, /* [in] */ mdMethodDef inlineeMethodId, /* [out] */ BOOL *incompleteData, /* [out] */ ICorProfilerMethodEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *ApplyMetaData )( + + HRESULT ( STDMETHODCALLTYPE *ApplyMetaData )( ICorProfilerInfo10 * This, /* [in] */ ModuleID moduleId); - - HRESULT ( STDMETHODCALLTYPE *GetInMemorySymbolsLength )( + + HRESULT ( STDMETHODCALLTYPE *GetInMemorySymbolsLength )( ICorProfilerInfo10 * This, /* [in] */ ModuleID moduleId, /* [out] */ DWORD *pCountSymbolBytes); - - HRESULT ( STDMETHODCALLTYPE *ReadInMemorySymbols )( + + HRESULT ( STDMETHODCALLTYPE *ReadInMemorySymbols )( ICorProfilerInfo10 * This, /* [in] */ ModuleID moduleId, /* [in] */ DWORD symbolsReadOffset, /* [out] */ BYTE *pSymbolBytes, /* [in] */ DWORD countSymbolBytes, /* [out] */ DWORD *pCountSymbolBytesRead); - - HRESULT ( STDMETHODCALLTYPE *IsFunctionDynamic )( + + HRESULT ( STDMETHODCALLTYPE *IsFunctionDynamic )( ICorProfilerInfo10 * This, /* [in] */ FunctionID functionId, /* [out] */ BOOL *isDynamic); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP3 )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP3 )( ICorProfilerInfo10 * This, /* [in] */ LPCBYTE ip, /* [out] */ FunctionID *functionId, /* [out] */ ReJITID *pReJitId); - - HRESULT ( STDMETHODCALLTYPE *GetDynamicFunctionInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetDynamicFunctionInfo )( ICorProfilerInfo10 * This, /* [in] */ FunctionID functionId, /* [out] */ ModuleID *moduleId, @@ -15841,57 +16684,57 @@ EXTERN_C const IID IID_ICorProfilerInfo10; /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, /* [out] */ WCHAR wszName[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetNativeCodeStartAddresses )( + + HRESULT ( STDMETHODCALLTYPE *GetNativeCodeStartAddresses )( ICorProfilerInfo10 * This, FunctionID functionID, ReJITID reJitId, ULONG32 cCodeStartAddresses, ULONG32 *pcCodeStartAddresses, UINT_PTR codeStartAddresses[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping3 )( + + HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping3 )( ICorProfilerInfo10 * This, UINT_PTR pNativeCodeStartAddress, ULONG32 cMap, ULONG32 *pcMap, COR_DEBUG_IL_TO_NATIVE_MAP map[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo4 )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo4 )( ICorProfilerInfo10 * This, UINT_PTR pNativeCodeStartAddress, ULONG32 cCodeInfos, ULONG32 *pcCodeInfos, COR_PRF_CODE_INFO codeInfos[ ]); - - HRESULT ( STDMETHODCALLTYPE *EnumerateObjectReferences )( + + HRESULT ( STDMETHODCALLTYPE *EnumerateObjectReferences )( ICorProfilerInfo10 * This, ObjectID objectId, ObjectReferenceCallback callback, void *clientData); - - HRESULT ( STDMETHODCALLTYPE *IsFrozenObject )( + + HRESULT ( STDMETHODCALLTYPE *IsFrozenObject )( ICorProfilerInfo10 * This, ObjectID objectId, BOOL *pbFrozen); - - HRESULT ( STDMETHODCALLTYPE *GetLOHObjectSizeThreshold )( + + HRESULT ( STDMETHODCALLTYPE *GetLOHObjectSizeThreshold )( ICorProfilerInfo10 * This, DWORD *pThreshold); - - HRESULT ( STDMETHODCALLTYPE *RequestReJITWithInliners )( + + HRESULT ( STDMETHODCALLTYPE *RequestReJITWithInliners )( ICorProfilerInfo10 * This, /* [in] */ DWORD dwRejitFlags, /* [in] */ ULONG cFunctions, /* [size_is][in] */ ModuleID moduleIds[ ], /* [size_is][in] */ mdMethodDef methodIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *SuspendRuntime )( + + HRESULT ( STDMETHODCALLTYPE *SuspendRuntime )( ICorProfilerInfo10 * This); - - HRESULT ( STDMETHODCALLTYPE *ResumeRuntime )( + + HRESULT ( STDMETHODCALLTYPE *ResumeRuntime )( ICorProfilerInfo10 * This); - + END_INTERFACE } ICorProfilerInfo10Vtbl; @@ -15900,317 +16743,317 @@ EXTERN_C const IID IID_ICorProfilerInfo10; CONST_VTBL struct ICorProfilerInfo10Vtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ICorProfilerInfo10_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ICorProfilerInfo10_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ICorProfilerInfo10_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ICorProfilerInfo10_GetClassFromObject(This,objectId,pClassId) \ - ( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) ) + ( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) ) #define ICorProfilerInfo10_GetClassFromToken(This,moduleId,typeDef,pClassId) \ - ( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) ) + ( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) ) #define ICorProfilerInfo10_GetCodeInfo(This,functionId,pStart,pcSize) \ - ( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) ) + ( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) ) #define ICorProfilerInfo10_GetEventMask(This,pdwEvents) \ - ( (This)->lpVtbl -> GetEventMask(This,pdwEvents) ) + ( (This)->lpVtbl -> GetEventMask(This,pdwEvents) ) #define ICorProfilerInfo10_GetFunctionFromIP(This,ip,pFunctionId) \ - ( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) ) + ( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) ) #define ICorProfilerInfo10_GetFunctionFromToken(This,moduleId,token,pFunctionId) \ - ( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) ) + ( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) ) #define ICorProfilerInfo10_GetHandleFromThread(This,threadId,phThread) \ - ( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) ) + ( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) ) #define ICorProfilerInfo10_GetObjectSize(This,objectId,pcSize) \ - ( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) ) + ( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) ) #define ICorProfilerInfo10_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \ - ( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) ) + ( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) ) #define ICorProfilerInfo10_GetThreadInfo(This,threadId,pdwWin32ThreadId) \ - ( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) ) + ( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) ) #define ICorProfilerInfo10_GetCurrentThreadID(This,pThreadId) \ - ( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) ) + ( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) ) #define ICorProfilerInfo10_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \ - ( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) ) + ( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) ) #define ICorProfilerInfo10_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \ - ( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) ) + ( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) ) #define ICorProfilerInfo10_SetEventMask(This,dwEvents) \ - ( (This)->lpVtbl -> SetEventMask(This,dwEvents) ) + ( (This)->lpVtbl -> SetEventMask(This,dwEvents) ) #define ICorProfilerInfo10_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) #define ICorProfilerInfo10_SetFunctionIDMapper(This,pFunc) \ - ( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) ) + ( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) ) #define ICorProfilerInfo10_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \ - ( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) ) + ( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) ) #define ICorProfilerInfo10_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \ - ( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) ) + ( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) ) #define ICorProfilerInfo10_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \ - ( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) ) + ( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) ) #define ICorProfilerInfo10_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \ - ( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) ) + ( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) ) #define ICorProfilerInfo10_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \ - ( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) ) + ( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) ) #define ICorProfilerInfo10_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \ - ( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) ) + ( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) ) #define ICorProfilerInfo10_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \ - ( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) ) + ( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) ) #define ICorProfilerInfo10_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \ - ( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) ) + ( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) ) #define ICorProfilerInfo10_SetFunctionReJIT(This,functionId) \ - ( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) ) + ( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) ) #define ICorProfilerInfo10_ForceGC(This) \ - ( (This)->lpVtbl -> ForceGC(This) ) + ( (This)->lpVtbl -> ForceGC(This) ) #define ICorProfilerInfo10_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \ - ( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) ) + ( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) ) #define ICorProfilerInfo10_GetInprocInspectionInterface(This,ppicd) \ - ( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) ) + ( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) ) #define ICorProfilerInfo10_GetInprocInspectionIThisThread(This,ppicd) \ - ( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) ) + ( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) ) #define ICorProfilerInfo10_GetThreadContext(This,threadId,pContextId) \ - ( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) ) + ( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) ) #define ICorProfilerInfo10_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \ - ( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) ) + ( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) ) #define ICorProfilerInfo10_EndInprocDebugging(This,dwProfilerContext) \ - ( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) ) + ( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) ) #define ICorProfilerInfo10_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \ - ( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) ) + ( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) ) #define ICorProfilerInfo10_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \ - ( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) ) + ( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) ) #define ICorProfilerInfo10_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) #define ICorProfilerInfo10_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \ - ( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) ) + ( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) ) #define ICorProfilerInfo10_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \ - ( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) ) + ( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) ) #define ICorProfilerInfo10_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \ - ( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) ) + ( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) ) #define ICorProfilerInfo10_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \ - ( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) ) + ( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) ) #define ICorProfilerInfo10_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \ - ( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) ) + ( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) ) #define ICorProfilerInfo10_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \ - ( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) ) + ( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) ) #define ICorProfilerInfo10_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \ - ( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) ) + ( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) ) #define ICorProfilerInfo10_EnumModuleFrozenObjects(This,moduleID,ppEnum) \ - ( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) ) + ( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) ) #define ICorProfilerInfo10_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \ - ( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) ) + ( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) ) #define ICorProfilerInfo10_GetBoxClassLayout(This,classId,pBufferOffset) \ - ( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) ) + ( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) ) #define ICorProfilerInfo10_GetThreadAppDomain(This,threadId,pAppDomainId) \ - ( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) ) + ( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) ) #define ICorProfilerInfo10_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \ - ( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) ) + ( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) ) #define ICorProfilerInfo10_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \ - ( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) ) + ( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) ) #define ICorProfilerInfo10_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \ - ( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) ) + ( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) ) #define ICorProfilerInfo10_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \ - ( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) ) + ( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) ) #define ICorProfilerInfo10_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \ - ( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) ) + ( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) ) #define ICorProfilerInfo10_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \ - ( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) ) + ( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) ) #define ICorProfilerInfo10_GetObjectGeneration(This,objectId,range) \ - ( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) ) + ( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) ) #define ICorProfilerInfo10_GetNotifiedExceptionClauseInfo(This,pinfo) \ - ( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) ) + ( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) ) #define ICorProfilerInfo10_EnumJITedFunctions(This,ppEnum) \ - ( (This)->lpVtbl -> EnumJITedFunctions(This,ppEnum) ) + ( (This)->lpVtbl -> EnumJITedFunctions(This,ppEnum) ) #define ICorProfilerInfo10_RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) \ - ( (This)->lpVtbl -> RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) ) + ( (This)->lpVtbl -> RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) ) #define ICorProfilerInfo10_SetFunctionIDMapper2(This,pFunc,clientData) \ - ( (This)->lpVtbl -> SetFunctionIDMapper2(This,pFunc,clientData) ) + ( (This)->lpVtbl -> SetFunctionIDMapper2(This,pFunc,clientData) ) #define ICorProfilerInfo10_GetStringLayout2(This,pStringLengthOffset,pBufferOffset) \ - ( (This)->lpVtbl -> GetStringLayout2(This,pStringLengthOffset,pBufferOffset) ) + ( (This)->lpVtbl -> GetStringLayout2(This,pStringLengthOffset,pBufferOffset) ) #define ICorProfilerInfo10_SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) ) #define ICorProfilerInfo10_SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) ) #define ICorProfilerInfo10_GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) \ - ( (This)->lpVtbl -> GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) ) + ( (This)->lpVtbl -> GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) ) #define ICorProfilerInfo10_GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) \ - ( (This)->lpVtbl -> GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) ) + ( (This)->lpVtbl -> GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) ) #define ICorProfilerInfo10_GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) \ - ( (This)->lpVtbl -> GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) ) + ( (This)->lpVtbl -> GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) ) #define ICorProfilerInfo10_EnumModules(This,ppEnum) \ - ( (This)->lpVtbl -> EnumModules(This,ppEnum) ) + ( (This)->lpVtbl -> EnumModules(This,ppEnum) ) #define ICorProfilerInfo10_GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) \ - ( (This)->lpVtbl -> GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) ) + ( (This)->lpVtbl -> GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) ) #define ICorProfilerInfo10_GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) \ - ( (This)->lpVtbl -> GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) ) + ( (This)->lpVtbl -> GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) ) #define ICorProfilerInfo10_GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) \ - ( (This)->lpVtbl -> GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) ) + ( (This)->lpVtbl -> GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) ) #define ICorProfilerInfo10_GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) \ - ( (This)->lpVtbl -> GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) ) + ( (This)->lpVtbl -> GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) ) #define ICorProfilerInfo10_EnumThreads(This,ppEnum) \ - ( (This)->lpVtbl -> EnumThreads(This,ppEnum) ) + ( (This)->lpVtbl -> EnumThreads(This,ppEnum) ) #define ICorProfilerInfo10_InitializeCurrentThread(This) \ - ( (This)->lpVtbl -> InitializeCurrentThread(This) ) + ( (This)->lpVtbl -> InitializeCurrentThread(This) ) #define ICorProfilerInfo10_RequestReJIT(This,cFunctions,moduleIds,methodIds) \ - ( (This)->lpVtbl -> RequestReJIT(This,cFunctions,moduleIds,methodIds) ) + ( (This)->lpVtbl -> RequestReJIT(This,cFunctions,moduleIds,methodIds) ) #define ICorProfilerInfo10_RequestRevert(This,cFunctions,moduleIds,methodIds,status) \ - ( (This)->lpVtbl -> RequestRevert(This,cFunctions,moduleIds,methodIds,status) ) + ( (This)->lpVtbl -> RequestRevert(This,cFunctions,moduleIds,methodIds,status) ) #define ICorProfilerInfo10_GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) \ - ( (This)->lpVtbl -> GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) ) + ( (This)->lpVtbl -> GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) ) #define ICorProfilerInfo10_GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) \ - ( (This)->lpVtbl -> GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) ) + ( (This)->lpVtbl -> GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) ) #define ICorProfilerInfo10_GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) \ - ( (This)->lpVtbl -> GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) ) + ( (This)->lpVtbl -> GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) ) #define ICorProfilerInfo10_GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) \ - ( (This)->lpVtbl -> GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) ) + ( (This)->lpVtbl -> GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) ) #define ICorProfilerInfo10_EnumJITedFunctions2(This,ppEnum) \ - ( (This)->lpVtbl -> EnumJITedFunctions2(This,ppEnum) ) + ( (This)->lpVtbl -> EnumJITedFunctions2(This,ppEnum) ) #define ICorProfilerInfo10_GetObjectSize2(This,objectId,pcSize) \ - ( (This)->lpVtbl -> GetObjectSize2(This,objectId,pcSize) ) + ( (This)->lpVtbl -> GetObjectSize2(This,objectId,pcSize) ) #define ICorProfilerInfo10_GetEventMask2(This,pdwEventsLow,pdwEventsHigh) \ - ( (This)->lpVtbl -> GetEventMask2(This,pdwEventsLow,pdwEventsHigh) ) + ( (This)->lpVtbl -> GetEventMask2(This,pdwEventsLow,pdwEventsHigh) ) #define ICorProfilerInfo10_SetEventMask2(This,dwEventsLow,dwEventsHigh) \ - ( (This)->lpVtbl -> SetEventMask2(This,dwEventsLow,dwEventsHigh) ) + ( (This)->lpVtbl -> SetEventMask2(This,dwEventsLow,dwEventsHigh) ) #define ICorProfilerInfo10_EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) \ - ( (This)->lpVtbl -> EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) ) + ( (This)->lpVtbl -> EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) ) #define ICorProfilerInfo10_ApplyMetaData(This,moduleId) \ - ( (This)->lpVtbl -> ApplyMetaData(This,moduleId) ) + ( (This)->lpVtbl -> ApplyMetaData(This,moduleId) ) #define ICorProfilerInfo10_GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) \ - ( (This)->lpVtbl -> GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) ) + ( (This)->lpVtbl -> GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) ) #define ICorProfilerInfo10_ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) \ - ( (This)->lpVtbl -> ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) ) + ( (This)->lpVtbl -> ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) ) #define ICorProfilerInfo10_IsFunctionDynamic(This,functionId,isDynamic) \ - ( (This)->lpVtbl -> IsFunctionDynamic(This,functionId,isDynamic) ) + ( (This)->lpVtbl -> IsFunctionDynamic(This,functionId,isDynamic) ) #define ICorProfilerInfo10_GetFunctionFromIP3(This,ip,functionId,pReJitId) \ - ( (This)->lpVtbl -> GetFunctionFromIP3(This,ip,functionId,pReJitId) ) + ( (This)->lpVtbl -> GetFunctionFromIP3(This,ip,functionId,pReJitId) ) #define ICorProfilerInfo10_GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) \ - ( (This)->lpVtbl -> GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) ) + ( (This)->lpVtbl -> GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) ) #define ICorProfilerInfo10_GetNativeCodeStartAddresses(This,functionID,reJitId,cCodeStartAddresses,pcCodeStartAddresses,codeStartAddresses) \ - ( (This)->lpVtbl -> GetNativeCodeStartAddresses(This,functionID,reJitId,cCodeStartAddresses,pcCodeStartAddresses,codeStartAddresses) ) + ( (This)->lpVtbl -> GetNativeCodeStartAddresses(This,functionID,reJitId,cCodeStartAddresses,pcCodeStartAddresses,codeStartAddresses) ) #define ICorProfilerInfo10_GetILToNativeMapping3(This,pNativeCodeStartAddress,cMap,pcMap,map) \ - ( (This)->lpVtbl -> GetILToNativeMapping3(This,pNativeCodeStartAddress,cMap,pcMap,map) ) + ( (This)->lpVtbl -> GetILToNativeMapping3(This,pNativeCodeStartAddress,cMap,pcMap,map) ) #define ICorProfilerInfo10_GetCodeInfo4(This,pNativeCodeStartAddress,cCodeInfos,pcCodeInfos,codeInfos) \ - ( (This)->lpVtbl -> GetCodeInfo4(This,pNativeCodeStartAddress,cCodeInfos,pcCodeInfos,codeInfos) ) + ( (This)->lpVtbl -> GetCodeInfo4(This,pNativeCodeStartAddress,cCodeInfos,pcCodeInfos,codeInfos) ) #define ICorProfilerInfo10_EnumerateObjectReferences(This,objectId,callback,clientData) \ - ( (This)->lpVtbl -> EnumerateObjectReferences(This,objectId,callback,clientData) ) + ( (This)->lpVtbl -> EnumerateObjectReferences(This,objectId,callback,clientData) ) #define ICorProfilerInfo10_IsFrozenObject(This,objectId,pbFrozen) \ - ( (This)->lpVtbl -> IsFrozenObject(This,objectId,pbFrozen) ) + ( (This)->lpVtbl -> IsFrozenObject(This,objectId,pbFrozen) ) #define ICorProfilerInfo10_GetLOHObjectSizeThreshold(This,pThreshold) \ - ( (This)->lpVtbl -> GetLOHObjectSizeThreshold(This,pThreshold) ) + ( (This)->lpVtbl -> GetLOHObjectSizeThreshold(This,pThreshold) ) #define ICorProfilerInfo10_RequestReJITWithInliners(This,dwRejitFlags,cFunctions,moduleIds,methodIds) \ - ( (This)->lpVtbl -> RequestReJITWithInliners(This,dwRejitFlags,cFunctions,moduleIds,methodIds) ) + ( (This)->lpVtbl -> RequestReJITWithInliners(This,dwRejitFlags,cFunctions,moduleIds,methodIds) ) #define ICorProfilerInfo10_SuspendRuntime(This) \ - ( (This)->lpVtbl -> SuspendRuntime(This) ) + ( (This)->lpVtbl -> SuspendRuntime(This) ) #define ICorProfilerInfo10_ResumeRuntime(This) \ - ( (This)->lpVtbl -> ResumeRuntime(This) ) + ( (This)->lpVtbl -> ResumeRuntime(This) ) #endif /* COBJMACROS */ @@ -16227,239 +17070,239 @@ EXTERN_C const IID IID_ICorProfilerInfo10; #define __ICorProfilerInfo11_INTERFACE_DEFINED__ /* interface ICorProfilerInfo11 */ -/* [local][unique][uuid][object] */ +/* [local][unique][uuid][object] */ EXTERN_C const IID IID_ICorProfilerInfo11; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("06398876-8987-4154-B621-40A00D6E4D04") ICorProfilerInfo11 : public ICorProfilerInfo10 { public: - virtual HRESULT STDMETHODCALLTYPE GetEnvironmentVariable( + virtual HRESULT STDMETHODCALLTYPE GetEnvironmentVariable( /* [string][in] */ const WCHAR *szName, /* [in] */ ULONG cchValue, /* [out] */ ULONG *pcchValue, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchValue, *pcchValue) WCHAR szValue[ ]) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetEnvironmentVariable( + + virtual HRESULT STDMETHODCALLTYPE SetEnvironmentVariable( /* [string][in] */ const WCHAR *szName, /* [string][in] */ const WCHAR *szValue) = 0; - + }; - - + + #else /* C style interface */ typedef struct ICorProfilerInfo11Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorProfilerInfo11 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorProfilerInfo11 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorProfilerInfo11 * This); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )( ICorProfilerInfo11 * This, /* [in] */ ObjectID objectId, /* [out] */ ClassID *pClassId); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )( ICorProfilerInfo11 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdTypeDef typeDef, /* [out] */ ClassID *pClassId); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )( ICorProfilerInfo11 * This, /* [in] */ FunctionID functionId, /* [out] */ LPCBYTE *pStart, /* [out] */ ULONG *pcSize); - - HRESULT ( STDMETHODCALLTYPE *GetEventMask )( + + HRESULT ( STDMETHODCALLTYPE *GetEventMask )( ICorProfilerInfo11 * This, /* [out] */ DWORD *pdwEvents); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )( ICorProfilerInfo11 * This, /* [in] */ LPCBYTE ip, /* [out] */ FunctionID *pFunctionId); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )( ICorProfilerInfo11 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdToken token, /* [out] */ FunctionID *pFunctionId); - - HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )( + + HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )( ICorProfilerInfo11 * This, /* [in] */ ThreadID threadId, /* [out] */ HANDLE *phThread); - - HRESULT ( STDMETHODCALLTYPE *GetObjectSize )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectSize )( ICorProfilerInfo11 * This, /* [in] */ ObjectID objectId, /* [out] */ ULONG *pcSize); - - HRESULT ( STDMETHODCALLTYPE *IsArrayClass )( + + HRESULT ( STDMETHODCALLTYPE *IsArrayClass )( ICorProfilerInfo11 * This, /* [in] */ ClassID classId, /* [out] */ CorElementType *pBaseElemType, /* [out] */ ClassID *pBaseClassId, /* [out] */ ULONG *pcRank); - - HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )( ICorProfilerInfo11 * This, /* [in] */ ThreadID threadId, /* [out] */ DWORD *pdwWin32ThreadId); - - HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )( + + HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )( ICorProfilerInfo11 * This, /* [out] */ ThreadID *pThreadId); - - HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )( ICorProfilerInfo11 * This, /* [in] */ ClassID classId, /* [out] */ ModuleID *pModuleId, /* [out] */ mdTypeDef *pTypeDefToken); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )( ICorProfilerInfo11 * This, /* [in] */ FunctionID functionId, /* [out] */ ClassID *pClassId, /* [out] */ ModuleID *pModuleId, /* [out] */ mdToken *pToken); - - HRESULT ( STDMETHODCALLTYPE *SetEventMask )( + + HRESULT ( STDMETHODCALLTYPE *SetEventMask )( ICorProfilerInfo11 * This, /* [in] */ DWORD dwEvents); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )( ICorProfilerInfo11 * This, /* [in] */ FunctionEnter *pFuncEnter, /* [in] */ FunctionLeave *pFuncLeave, /* [in] */ FunctionTailcall *pFuncTailcall); - - HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )( + + HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )( ICorProfilerInfo11 * This, /* [in] */ FunctionIDMapper *pFunc); - - HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )( + + HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )( ICorProfilerInfo11 * This, /* [in] */ FunctionID functionId, /* [in] */ REFIID riid, /* [out] */ IUnknown **ppImport, /* [out] */ mdToken *pToken); - - HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )( ICorProfilerInfo11 * This, /* [in] */ ModuleID moduleId, /* [out] */ LPCBYTE *ppBaseLoadAddress, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AssemblyID *pAssemblyId); - - HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )( ICorProfilerInfo11 * This, /* [in] */ ModuleID moduleId, /* [in] */ DWORD dwOpenFlags, /* [in] */ REFIID riid, /* [out] */ IUnknown **ppOut); - - HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )( + + HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )( ICorProfilerInfo11 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodId, /* [out] */ LPCBYTE *ppMethodHeader, /* [out] */ ULONG *pcbMethodSize); - - HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )( + + HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )( ICorProfilerInfo11 * This, /* [in] */ ModuleID moduleId, /* [out] */ IMethodMalloc **ppMalloc); - - HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )( + + HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )( ICorProfilerInfo11 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodid, /* [in] */ LPCBYTE pbNewILMethodHeader); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )( ICorProfilerInfo11 * This, /* [in] */ AppDomainID appDomainId, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ ProcessID *pProcessId); - - HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )( ICorProfilerInfo11 * This, /* [in] */ AssemblyID assemblyId, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AppDomainID *pAppDomainId, /* [out] */ ModuleID *pModuleId); - - HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )( + + HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )( ICorProfilerInfo11 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ForceGC )( + + HRESULT ( STDMETHODCALLTYPE *ForceGC )( ICorProfilerInfo11 * This); - - HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )( + + HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )( ICorProfilerInfo11 * This, /* [in] */ FunctionID functionId, /* [in] */ BOOL fStartJit, /* [in] */ ULONG cILMapEntries, /* [size_is][in] */ COR_IL_MAP rgILMapEntries[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )( + + HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )( ICorProfilerInfo11 * This, /* [out] */ IUnknown **ppicd); - - HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )( + + HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )( ICorProfilerInfo11 * This, /* [out] */ IUnknown **ppicd); - - HRESULT ( STDMETHODCALLTYPE *GetThreadContext )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadContext )( ICorProfilerInfo11 * This, /* [in] */ ThreadID threadId, /* [out] */ ContextID *pContextId); - - HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )( + + HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )( ICorProfilerInfo11 * This, /* [in] */ BOOL fThisThreadOnly, /* [out] */ DWORD *pdwProfilerContext); - - HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )( + + HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )( ICorProfilerInfo11 * This, /* [in] */ DWORD dwProfilerContext); - - HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )( + + HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )( ICorProfilerInfo11 * This, /* [in] */ FunctionID functionId, /* [in] */ ULONG32 cMap, /* [out] */ ULONG32 *pcMap, /* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]); - - HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )( + + HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )( ICorProfilerInfo11 * This, /* [in] */ ThreadID thread, /* [in] */ StackSnapshotCallback *callback, @@ -16467,14 +17310,14 @@ EXTERN_C const IID IID_ICorProfilerInfo11; /* [in] */ void *clientData, /* [size_is][in] */ BYTE context[ ], /* [in] */ ULONG32 contextSize); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )( ICorProfilerInfo11 * This, /* [in] */ FunctionEnter2 *pFuncEnter, /* [in] */ FunctionLeave2 *pFuncLeave, /* [in] */ FunctionTailcall2 *pFuncTailcall); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )( ICorProfilerInfo11 * This, /* [in] */ FunctionID funcId, /* [in] */ COR_PRF_FRAME_INFO frameInfo, @@ -16484,22 +17327,22 @@ EXTERN_C const IID IID_ICorProfilerInfo11; /* [in] */ ULONG32 cTypeArgs, /* [out] */ ULONG32 *pcTypeArgs, /* [out] */ ClassID typeArgs[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetStringLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetStringLayout )( ICorProfilerInfo11 * This, /* [out] */ ULONG *pBufferLengthOffset, /* [out] */ ULONG *pStringLengthOffset, /* [out] */ ULONG *pBufferOffset); - - HRESULT ( STDMETHODCALLTYPE *GetClassLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetClassLayout )( ICorProfilerInfo11 * This, /* [in] */ ClassID classID, /* [out][in] */ COR_FIELD_OFFSET rFieldOffset[ ], /* [in] */ ULONG cFieldOffset, /* [out] */ ULONG *pcFieldOffset, /* [out] */ ULONG *pulClassSize); - - HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )( ICorProfilerInfo11 * This, /* [in] */ ClassID classId, /* [out] */ ModuleID *pModuleId, @@ -16508,23 +17351,23 @@ EXTERN_C const IID IID_ICorProfilerInfo11; /* [in] */ ULONG32 cNumTypeArgs, /* [out] */ ULONG32 *pcNumTypeArgs, /* [out] */ ClassID typeArgs[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )( ICorProfilerInfo11 * This, /* [in] */ FunctionID functionID, /* [in] */ ULONG32 cCodeInfos, /* [out] */ ULONG32 *pcCodeInfos, /* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )( ICorProfilerInfo11 * This, /* [in] */ ModuleID moduleID, /* [in] */ mdTypeDef typeDef, /* [in] */ ULONG32 cTypeArgs, /* [size_is][in] */ ClassID typeArgs[ ], /* [out] */ ClassID *pClassID); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )( ICorProfilerInfo11 * This, /* [in] */ ModuleID moduleID, /* [in] */ mdMethodDef funcDef, @@ -16532,134 +17375,134 @@ EXTERN_C const IID IID_ICorProfilerInfo11; /* [in] */ ULONG32 cTypeArgs, /* [size_is][in] */ ClassID typeArgs[ ], /* [out] */ FunctionID *pFunctionID); - - HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )( + + HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )( ICorProfilerInfo11 * This, /* [in] */ ModuleID moduleID, /* [out] */ ICorProfilerObjectEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )( ICorProfilerInfo11 * This, /* [in] */ ObjectID objectId, /* [in] */ ULONG32 cDimensions, /* [size_is][out] */ ULONG32 pDimensionSizes[ ], /* [size_is][out] */ int pDimensionLowerBounds[ ], /* [out] */ BYTE **ppData); - - HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )( ICorProfilerInfo11 * This, /* [in] */ ClassID classId, /* [out] */ ULONG32 *pBufferOffset); - - HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )( ICorProfilerInfo11 * This, /* [in] */ ThreadID threadId, /* [out] */ AppDomainID *pAppDomainId); - - HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )( ICorProfilerInfo11 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )( ICorProfilerInfo11 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ AppDomainID appDomainId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )( ICorProfilerInfo11 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ ThreadID threadId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )( ICorProfilerInfo11 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ ContextID contextId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )( ICorProfilerInfo11 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [out] */ COR_PRF_STATIC_TYPE *pFieldInfo); - - HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )( + + HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )( ICorProfilerInfo11 * This, /* [in] */ ULONG cObjectRanges, /* [out] */ ULONG *pcObjectRanges, /* [length_is][size_is][out] */ COR_PRF_GC_GENERATION_RANGE ranges[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )( ICorProfilerInfo11 * This, /* [in] */ ObjectID objectId, /* [out] */ COR_PRF_GC_GENERATION_RANGE *range); - - HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )( ICorProfilerInfo11 * This, /* [out] */ COR_PRF_EX_CLAUSE_INFO *pinfo); - - HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions )( + + HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions )( ICorProfilerInfo11 * This, /* [out] */ ICorProfilerFunctionEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *RequestProfilerDetach )( + + HRESULT ( STDMETHODCALLTYPE *RequestProfilerDetach )( ICorProfilerInfo11 * This, /* [in] */ DWORD dwExpectedCompletionMilliseconds); - - HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper2 )( + + HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper2 )( ICorProfilerInfo11 * This, /* [in] */ FunctionIDMapper2 *pFunc, /* [in] */ void *clientData); - - HRESULT ( STDMETHODCALLTYPE *GetStringLayout2 )( + + HRESULT ( STDMETHODCALLTYPE *GetStringLayout2 )( ICorProfilerInfo11 * This, /* [out] */ ULONG *pStringLengthOffset, /* [out] */ ULONG *pBufferOffset); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3 )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3 )( ICorProfilerInfo11 * This, /* [in] */ FunctionEnter3 *pFuncEnter3, /* [in] */ FunctionLeave3 *pFuncLeave3, /* [in] */ FunctionTailcall3 *pFuncTailcall3); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3WithInfo )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3WithInfo )( ICorProfilerInfo11 * This, /* [in] */ FunctionEnter3WithInfo *pFuncEnter3WithInfo, /* [in] */ FunctionLeave3WithInfo *pFuncLeave3WithInfo, /* [in] */ FunctionTailcall3WithInfo *pFuncTailcall3WithInfo); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionEnter3Info )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionEnter3Info )( ICorProfilerInfo11 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_ELT_INFO eltInfo, /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo, /* [out][in] */ ULONG *pcbArgumentInfo, /* [size_is][out] */ COR_PRF_FUNCTION_ARGUMENT_INFO *pArgumentInfo); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionLeave3Info )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionLeave3Info )( ICorProfilerInfo11 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_ELT_INFO eltInfo, /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo, /* [out] */ COR_PRF_FUNCTION_ARGUMENT_RANGE *pRetvalRange); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionTailcall3Info )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionTailcall3Info )( ICorProfilerInfo11 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_ELT_INFO eltInfo, /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo); - - HRESULT ( STDMETHODCALLTYPE *EnumModules )( + + HRESULT ( STDMETHODCALLTYPE *EnumModules )( ICorProfilerInfo11 * This, /* [out] */ ICorProfilerModuleEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetRuntimeInformation )( + + HRESULT ( STDMETHODCALLTYPE *GetRuntimeInformation )( ICorProfilerInfo11 * This, /* [out] */ USHORT *pClrInstanceId, /* [out] */ COR_PRF_RUNTIME_TYPE *pRuntimeType, @@ -16669,140 +17512,140 @@ EXTERN_C const IID IID_ICorProfilerInfo11; /* [out] */ USHORT *pQFEVersion, /* [in] */ ULONG cchVersionString, /* [out] */ ULONG *pcchVersionString, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchVersionString, *pcchVersionString) WCHAR szVersionString[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress2 )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress2 )( ICorProfilerInfo11 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ AppDomainID appDomainId, /* [in] */ ThreadID threadId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainsContainingModule )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainsContainingModule )( ICorProfilerInfo11 * This, /* [in] */ ModuleID moduleId, /* [in] */ ULONG32 cAppDomainIds, /* [out] */ ULONG32 *pcAppDomainIds, /* [length_is][size_is][out] */ AppDomainID appDomainIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetModuleInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleInfo2 )( ICorProfilerInfo11 * This, /* [in] */ ModuleID moduleId, /* [out] */ LPCBYTE *ppBaseLoadAddress, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AssemblyID *pAssemblyId, /* [out] */ DWORD *pdwModuleFlags); - - HRESULT ( STDMETHODCALLTYPE *EnumThreads )( + + HRESULT ( STDMETHODCALLTYPE *EnumThreads )( ICorProfilerInfo11 * This, /* [out] */ ICorProfilerThreadEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *InitializeCurrentThread )( + + HRESULT ( STDMETHODCALLTYPE *InitializeCurrentThread )( ICorProfilerInfo11 * This); - - HRESULT ( STDMETHODCALLTYPE *RequestReJIT )( + + HRESULT ( STDMETHODCALLTYPE *RequestReJIT )( ICorProfilerInfo11 * This, /* [in] */ ULONG cFunctions, /* [size_is][in] */ ModuleID moduleIds[ ], /* [size_is][in] */ mdMethodDef methodIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *RequestRevert )( + + HRESULT ( STDMETHODCALLTYPE *RequestRevert )( ICorProfilerInfo11 * This, /* [in] */ ULONG cFunctions, /* [size_is][in] */ ModuleID moduleIds[ ], /* [size_is][in] */ mdMethodDef methodIds[ ], /* [size_is][out] */ HRESULT status[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo3 )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo3 )( ICorProfilerInfo11 * This, /* [in] */ FunctionID functionID, /* [in] */ ReJITID reJitId, /* [in] */ ULONG32 cCodeInfos, /* [out] */ ULONG32 *pcCodeInfos, /* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP2 )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP2 )( ICorProfilerInfo11 * This, /* [in] */ LPCBYTE ip, /* [out] */ FunctionID *pFunctionId, /* [out] */ ReJITID *pReJitId); - - HRESULT ( STDMETHODCALLTYPE *GetReJITIDs )( + + HRESULT ( STDMETHODCALLTYPE *GetReJITIDs )( ICorProfilerInfo11 * This, /* [in] */ FunctionID functionId, /* [in] */ ULONG cReJitIds, /* [out] */ ULONG *pcReJitIds, /* [length_is][size_is][out] */ ReJITID reJitIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping2 )( + + HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping2 )( ICorProfilerInfo11 * This, /* [in] */ FunctionID functionId, /* [in] */ ReJITID reJitId, /* [in] */ ULONG32 cMap, /* [out] */ ULONG32 *pcMap, /* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]); - - HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions2 )( + + HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions2 )( ICorProfilerInfo11 * This, /* [out] */ ICorProfilerFunctionEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetObjectSize2 )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectSize2 )( ICorProfilerInfo11 * This, /* [in] */ ObjectID objectId, /* [out] */ SIZE_T *pcSize); - - HRESULT ( STDMETHODCALLTYPE *GetEventMask2 )( + + HRESULT ( STDMETHODCALLTYPE *GetEventMask2 )( ICorProfilerInfo11 * This, /* [out] */ DWORD *pdwEventsLow, /* [out] */ DWORD *pdwEventsHigh); - - HRESULT ( STDMETHODCALLTYPE *SetEventMask2 )( + + HRESULT ( STDMETHODCALLTYPE *SetEventMask2 )( ICorProfilerInfo11 * This, /* [in] */ DWORD dwEventsLow, /* [in] */ DWORD dwEventsHigh); - - HRESULT ( STDMETHODCALLTYPE *EnumNgenModuleMethodsInliningThisMethod )( + + HRESULT ( STDMETHODCALLTYPE *EnumNgenModuleMethodsInliningThisMethod )( ICorProfilerInfo11 * This, /* [in] */ ModuleID inlinersModuleId, /* [in] */ ModuleID inlineeModuleId, /* [in] */ mdMethodDef inlineeMethodId, /* [out] */ BOOL *incompleteData, /* [out] */ ICorProfilerMethodEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *ApplyMetaData )( + + HRESULT ( STDMETHODCALLTYPE *ApplyMetaData )( ICorProfilerInfo11 * This, /* [in] */ ModuleID moduleId); - - HRESULT ( STDMETHODCALLTYPE *GetInMemorySymbolsLength )( + + HRESULT ( STDMETHODCALLTYPE *GetInMemorySymbolsLength )( ICorProfilerInfo11 * This, /* [in] */ ModuleID moduleId, /* [out] */ DWORD *pCountSymbolBytes); - - HRESULT ( STDMETHODCALLTYPE *ReadInMemorySymbols )( + + HRESULT ( STDMETHODCALLTYPE *ReadInMemorySymbols )( ICorProfilerInfo11 * This, /* [in] */ ModuleID moduleId, /* [in] */ DWORD symbolsReadOffset, /* [out] */ BYTE *pSymbolBytes, /* [in] */ DWORD countSymbolBytes, /* [out] */ DWORD *pCountSymbolBytesRead); - - HRESULT ( STDMETHODCALLTYPE *IsFunctionDynamic )( + + HRESULT ( STDMETHODCALLTYPE *IsFunctionDynamic )( ICorProfilerInfo11 * This, /* [in] */ FunctionID functionId, /* [out] */ BOOL *isDynamic); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP3 )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP3 )( ICorProfilerInfo11 * This, /* [in] */ LPCBYTE ip, /* [out] */ FunctionID *functionId, /* [out] */ ReJITID *pReJitId); - - HRESULT ( STDMETHODCALLTYPE *GetDynamicFunctionInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetDynamicFunctionInfo )( ICorProfilerInfo11 * This, /* [in] */ FunctionID functionId, /* [out] */ ModuleID *moduleId, @@ -16811,70 +17654,70 @@ EXTERN_C const IID IID_ICorProfilerInfo11; /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, /* [out] */ WCHAR wszName[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetNativeCodeStartAddresses )( + + HRESULT ( STDMETHODCALLTYPE *GetNativeCodeStartAddresses )( ICorProfilerInfo11 * This, FunctionID functionID, ReJITID reJitId, ULONG32 cCodeStartAddresses, ULONG32 *pcCodeStartAddresses, UINT_PTR codeStartAddresses[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping3 )( + + HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping3 )( ICorProfilerInfo11 * This, UINT_PTR pNativeCodeStartAddress, ULONG32 cMap, ULONG32 *pcMap, COR_DEBUG_IL_TO_NATIVE_MAP map[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo4 )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo4 )( ICorProfilerInfo11 * This, UINT_PTR pNativeCodeStartAddress, ULONG32 cCodeInfos, ULONG32 *pcCodeInfos, COR_PRF_CODE_INFO codeInfos[ ]); - - HRESULT ( STDMETHODCALLTYPE *EnumerateObjectReferences )( + + HRESULT ( STDMETHODCALLTYPE *EnumerateObjectReferences )( ICorProfilerInfo11 * This, ObjectID objectId, ObjectReferenceCallback callback, void *clientData); - - HRESULT ( STDMETHODCALLTYPE *IsFrozenObject )( + + HRESULT ( STDMETHODCALLTYPE *IsFrozenObject )( ICorProfilerInfo11 * This, ObjectID objectId, BOOL *pbFrozen); - - HRESULT ( STDMETHODCALLTYPE *GetLOHObjectSizeThreshold )( + + HRESULT ( STDMETHODCALLTYPE *GetLOHObjectSizeThreshold )( ICorProfilerInfo11 * This, DWORD *pThreshold); - - HRESULT ( STDMETHODCALLTYPE *RequestReJITWithInliners )( + + HRESULT ( STDMETHODCALLTYPE *RequestReJITWithInliners )( ICorProfilerInfo11 * This, /* [in] */ DWORD dwRejitFlags, /* [in] */ ULONG cFunctions, /* [size_is][in] */ ModuleID moduleIds[ ], /* [size_is][in] */ mdMethodDef methodIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *SuspendRuntime )( + + HRESULT ( STDMETHODCALLTYPE *SuspendRuntime )( ICorProfilerInfo11 * This); - - HRESULT ( STDMETHODCALLTYPE *ResumeRuntime )( + + HRESULT ( STDMETHODCALLTYPE *ResumeRuntime )( ICorProfilerInfo11 * This); - - HRESULT ( STDMETHODCALLTYPE *GetEnvironmentVariable )( + + HRESULT ( STDMETHODCALLTYPE *GetEnvironmentVariable )( ICorProfilerInfo11 * This, /* [string][in] */ const WCHAR *szName, /* [in] */ ULONG cchValue, /* [out] */ ULONG *pcchValue, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchValue, *pcchValue) WCHAR szValue[ ]); - - HRESULT ( STDMETHODCALLTYPE *SetEnvironmentVariable )( + + HRESULT ( STDMETHODCALLTYPE *SetEnvironmentVariable )( ICorProfilerInfo11 * This, /* [string][in] */ const WCHAR *szName, /* [string][in] */ const WCHAR *szValue); - + END_INTERFACE } ICorProfilerInfo11Vtbl; @@ -16883,324 +17726,324 @@ EXTERN_C const IID IID_ICorProfilerInfo11; CONST_VTBL struct ICorProfilerInfo11Vtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ICorProfilerInfo11_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ICorProfilerInfo11_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ICorProfilerInfo11_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ICorProfilerInfo11_GetClassFromObject(This,objectId,pClassId) \ - ( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) ) + ( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) ) #define ICorProfilerInfo11_GetClassFromToken(This,moduleId,typeDef,pClassId) \ - ( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) ) + ( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) ) #define ICorProfilerInfo11_GetCodeInfo(This,functionId,pStart,pcSize) \ - ( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) ) + ( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) ) #define ICorProfilerInfo11_GetEventMask(This,pdwEvents) \ - ( (This)->lpVtbl -> GetEventMask(This,pdwEvents) ) + ( (This)->lpVtbl -> GetEventMask(This,pdwEvents) ) #define ICorProfilerInfo11_GetFunctionFromIP(This,ip,pFunctionId) \ - ( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) ) + ( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) ) #define ICorProfilerInfo11_GetFunctionFromToken(This,moduleId,token,pFunctionId) \ - ( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) ) + ( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) ) #define ICorProfilerInfo11_GetHandleFromThread(This,threadId,phThread) \ - ( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) ) + ( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) ) #define ICorProfilerInfo11_GetObjectSize(This,objectId,pcSize) \ - ( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) ) + ( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) ) #define ICorProfilerInfo11_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \ - ( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) ) + ( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) ) #define ICorProfilerInfo11_GetThreadInfo(This,threadId,pdwWin32ThreadId) \ - ( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) ) + ( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) ) #define ICorProfilerInfo11_GetCurrentThreadID(This,pThreadId) \ - ( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) ) + ( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) ) #define ICorProfilerInfo11_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \ - ( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) ) + ( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) ) #define ICorProfilerInfo11_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \ - ( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) ) + ( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) ) #define ICorProfilerInfo11_SetEventMask(This,dwEvents) \ - ( (This)->lpVtbl -> SetEventMask(This,dwEvents) ) + ( (This)->lpVtbl -> SetEventMask(This,dwEvents) ) #define ICorProfilerInfo11_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) #define ICorProfilerInfo11_SetFunctionIDMapper(This,pFunc) \ - ( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) ) + ( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) ) #define ICorProfilerInfo11_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \ - ( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) ) + ( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) ) #define ICorProfilerInfo11_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \ - ( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) ) + ( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) ) #define ICorProfilerInfo11_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \ - ( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) ) + ( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) ) #define ICorProfilerInfo11_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \ - ( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) ) + ( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) ) #define ICorProfilerInfo11_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \ - ( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) ) + ( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) ) #define ICorProfilerInfo11_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \ - ( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) ) + ( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) ) #define ICorProfilerInfo11_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \ - ( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) ) + ( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) ) #define ICorProfilerInfo11_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \ - ( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) ) + ( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) ) #define ICorProfilerInfo11_SetFunctionReJIT(This,functionId) \ - ( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) ) + ( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) ) #define ICorProfilerInfo11_ForceGC(This) \ - ( (This)->lpVtbl -> ForceGC(This) ) + ( (This)->lpVtbl -> ForceGC(This) ) #define ICorProfilerInfo11_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \ - ( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) ) + ( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) ) #define ICorProfilerInfo11_GetInprocInspectionInterface(This,ppicd) \ - ( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) ) + ( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) ) #define ICorProfilerInfo11_GetInprocInspectionIThisThread(This,ppicd) \ - ( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) ) + ( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) ) #define ICorProfilerInfo11_GetThreadContext(This,threadId,pContextId) \ - ( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) ) + ( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) ) #define ICorProfilerInfo11_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \ - ( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) ) + ( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) ) #define ICorProfilerInfo11_EndInprocDebugging(This,dwProfilerContext) \ - ( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) ) + ( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) ) #define ICorProfilerInfo11_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \ - ( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) ) + ( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) ) #define ICorProfilerInfo11_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \ - ( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) ) + ( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) ) #define ICorProfilerInfo11_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) #define ICorProfilerInfo11_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \ - ( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) ) + ( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) ) #define ICorProfilerInfo11_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \ - ( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) ) + ( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) ) #define ICorProfilerInfo11_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \ - ( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) ) + ( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) ) #define ICorProfilerInfo11_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \ - ( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) ) + ( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) ) #define ICorProfilerInfo11_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \ - ( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) ) + ( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) ) #define ICorProfilerInfo11_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \ - ( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) ) + ( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) ) #define ICorProfilerInfo11_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \ - ( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) ) + ( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) ) #define ICorProfilerInfo11_EnumModuleFrozenObjects(This,moduleID,ppEnum) \ - ( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) ) + ( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) ) #define ICorProfilerInfo11_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \ - ( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) ) + ( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) ) #define ICorProfilerInfo11_GetBoxClassLayout(This,classId,pBufferOffset) \ - ( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) ) + ( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) ) #define ICorProfilerInfo11_GetThreadAppDomain(This,threadId,pAppDomainId) \ - ( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) ) + ( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) ) #define ICorProfilerInfo11_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \ - ( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) ) + ( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) ) #define ICorProfilerInfo11_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \ - ( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) ) + ( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) ) #define ICorProfilerInfo11_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \ - ( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) ) + ( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) ) #define ICorProfilerInfo11_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \ - ( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) ) + ( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) ) #define ICorProfilerInfo11_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \ - ( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) ) + ( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) ) #define ICorProfilerInfo11_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \ - ( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) ) + ( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) ) #define ICorProfilerInfo11_GetObjectGeneration(This,objectId,range) \ - ( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) ) + ( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) ) #define ICorProfilerInfo11_GetNotifiedExceptionClauseInfo(This,pinfo) \ - ( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) ) + ( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) ) #define ICorProfilerInfo11_EnumJITedFunctions(This,ppEnum) \ - ( (This)->lpVtbl -> EnumJITedFunctions(This,ppEnum) ) + ( (This)->lpVtbl -> EnumJITedFunctions(This,ppEnum) ) #define ICorProfilerInfo11_RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) \ - ( (This)->lpVtbl -> RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) ) + ( (This)->lpVtbl -> RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) ) #define ICorProfilerInfo11_SetFunctionIDMapper2(This,pFunc,clientData) \ - ( (This)->lpVtbl -> SetFunctionIDMapper2(This,pFunc,clientData) ) + ( (This)->lpVtbl -> SetFunctionIDMapper2(This,pFunc,clientData) ) #define ICorProfilerInfo11_GetStringLayout2(This,pStringLengthOffset,pBufferOffset) \ - ( (This)->lpVtbl -> GetStringLayout2(This,pStringLengthOffset,pBufferOffset) ) + ( (This)->lpVtbl -> GetStringLayout2(This,pStringLengthOffset,pBufferOffset) ) #define ICorProfilerInfo11_SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) ) #define ICorProfilerInfo11_SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) ) #define ICorProfilerInfo11_GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) \ - ( (This)->lpVtbl -> GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) ) + ( (This)->lpVtbl -> GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) ) #define ICorProfilerInfo11_GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) \ - ( (This)->lpVtbl -> GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) ) + ( (This)->lpVtbl -> GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) ) #define ICorProfilerInfo11_GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) \ - ( (This)->lpVtbl -> GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) ) + ( (This)->lpVtbl -> GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) ) #define ICorProfilerInfo11_EnumModules(This,ppEnum) \ - ( (This)->lpVtbl -> EnumModules(This,ppEnum) ) + ( (This)->lpVtbl -> EnumModules(This,ppEnum) ) #define ICorProfilerInfo11_GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) \ - ( (This)->lpVtbl -> GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) ) + ( (This)->lpVtbl -> GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) ) #define ICorProfilerInfo11_GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) \ - ( (This)->lpVtbl -> GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) ) + ( (This)->lpVtbl -> GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) ) #define ICorProfilerInfo11_GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) \ - ( (This)->lpVtbl -> GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) ) + ( (This)->lpVtbl -> GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) ) #define ICorProfilerInfo11_GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) \ - ( (This)->lpVtbl -> GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) ) + ( (This)->lpVtbl -> GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) ) #define ICorProfilerInfo11_EnumThreads(This,ppEnum) \ - ( (This)->lpVtbl -> EnumThreads(This,ppEnum) ) + ( (This)->lpVtbl -> EnumThreads(This,ppEnum) ) #define ICorProfilerInfo11_InitializeCurrentThread(This) \ - ( (This)->lpVtbl -> InitializeCurrentThread(This) ) + ( (This)->lpVtbl -> InitializeCurrentThread(This) ) #define ICorProfilerInfo11_RequestReJIT(This,cFunctions,moduleIds,methodIds) \ - ( (This)->lpVtbl -> RequestReJIT(This,cFunctions,moduleIds,methodIds) ) + ( (This)->lpVtbl -> RequestReJIT(This,cFunctions,moduleIds,methodIds) ) #define ICorProfilerInfo11_RequestRevert(This,cFunctions,moduleIds,methodIds,status) \ - ( (This)->lpVtbl -> RequestRevert(This,cFunctions,moduleIds,methodIds,status) ) + ( (This)->lpVtbl -> RequestRevert(This,cFunctions,moduleIds,methodIds,status) ) #define ICorProfilerInfo11_GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) \ - ( (This)->lpVtbl -> GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) ) + ( (This)->lpVtbl -> GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) ) #define ICorProfilerInfo11_GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) \ - ( (This)->lpVtbl -> GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) ) + ( (This)->lpVtbl -> GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) ) #define ICorProfilerInfo11_GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) \ - ( (This)->lpVtbl -> GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) ) + ( (This)->lpVtbl -> GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) ) #define ICorProfilerInfo11_GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) \ - ( (This)->lpVtbl -> GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) ) + ( (This)->lpVtbl -> GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) ) #define ICorProfilerInfo11_EnumJITedFunctions2(This,ppEnum) \ - ( (This)->lpVtbl -> EnumJITedFunctions2(This,ppEnum) ) + ( (This)->lpVtbl -> EnumJITedFunctions2(This,ppEnum) ) #define ICorProfilerInfo11_GetObjectSize2(This,objectId,pcSize) \ - ( (This)->lpVtbl -> GetObjectSize2(This,objectId,pcSize) ) + ( (This)->lpVtbl -> GetObjectSize2(This,objectId,pcSize) ) #define ICorProfilerInfo11_GetEventMask2(This,pdwEventsLow,pdwEventsHigh) \ - ( (This)->lpVtbl -> GetEventMask2(This,pdwEventsLow,pdwEventsHigh) ) + ( (This)->lpVtbl -> GetEventMask2(This,pdwEventsLow,pdwEventsHigh) ) #define ICorProfilerInfo11_SetEventMask2(This,dwEventsLow,dwEventsHigh) \ - ( (This)->lpVtbl -> SetEventMask2(This,dwEventsLow,dwEventsHigh) ) + ( (This)->lpVtbl -> SetEventMask2(This,dwEventsLow,dwEventsHigh) ) #define ICorProfilerInfo11_EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) \ - ( (This)->lpVtbl -> EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) ) + ( (This)->lpVtbl -> EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) ) #define ICorProfilerInfo11_ApplyMetaData(This,moduleId) \ - ( (This)->lpVtbl -> ApplyMetaData(This,moduleId) ) + ( (This)->lpVtbl -> ApplyMetaData(This,moduleId) ) #define ICorProfilerInfo11_GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) \ - ( (This)->lpVtbl -> GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) ) + ( (This)->lpVtbl -> GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) ) #define ICorProfilerInfo11_ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) \ - ( (This)->lpVtbl -> ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) ) + ( (This)->lpVtbl -> ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) ) #define ICorProfilerInfo11_IsFunctionDynamic(This,functionId,isDynamic) \ - ( (This)->lpVtbl -> IsFunctionDynamic(This,functionId,isDynamic) ) + ( (This)->lpVtbl -> IsFunctionDynamic(This,functionId,isDynamic) ) #define ICorProfilerInfo11_GetFunctionFromIP3(This,ip,functionId,pReJitId) \ - ( (This)->lpVtbl -> GetFunctionFromIP3(This,ip,functionId,pReJitId) ) + ( (This)->lpVtbl -> GetFunctionFromIP3(This,ip,functionId,pReJitId) ) #define ICorProfilerInfo11_GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) \ - ( (This)->lpVtbl -> GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) ) + ( (This)->lpVtbl -> GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) ) #define ICorProfilerInfo11_GetNativeCodeStartAddresses(This,functionID,reJitId,cCodeStartAddresses,pcCodeStartAddresses,codeStartAddresses) \ - ( (This)->lpVtbl -> GetNativeCodeStartAddresses(This,functionID,reJitId,cCodeStartAddresses,pcCodeStartAddresses,codeStartAddresses) ) + ( (This)->lpVtbl -> GetNativeCodeStartAddresses(This,functionID,reJitId,cCodeStartAddresses,pcCodeStartAddresses,codeStartAddresses) ) #define ICorProfilerInfo11_GetILToNativeMapping3(This,pNativeCodeStartAddress,cMap,pcMap,map) \ - ( (This)->lpVtbl -> GetILToNativeMapping3(This,pNativeCodeStartAddress,cMap,pcMap,map) ) + ( (This)->lpVtbl -> GetILToNativeMapping3(This,pNativeCodeStartAddress,cMap,pcMap,map) ) #define ICorProfilerInfo11_GetCodeInfo4(This,pNativeCodeStartAddress,cCodeInfos,pcCodeInfos,codeInfos) \ - ( (This)->lpVtbl -> GetCodeInfo4(This,pNativeCodeStartAddress,cCodeInfos,pcCodeInfos,codeInfos) ) + ( (This)->lpVtbl -> GetCodeInfo4(This,pNativeCodeStartAddress,cCodeInfos,pcCodeInfos,codeInfos) ) #define ICorProfilerInfo11_EnumerateObjectReferences(This,objectId,callback,clientData) \ - ( (This)->lpVtbl -> EnumerateObjectReferences(This,objectId,callback,clientData) ) + ( (This)->lpVtbl -> EnumerateObjectReferences(This,objectId,callback,clientData) ) #define ICorProfilerInfo11_IsFrozenObject(This,objectId,pbFrozen) \ - ( (This)->lpVtbl -> IsFrozenObject(This,objectId,pbFrozen) ) + ( (This)->lpVtbl -> IsFrozenObject(This,objectId,pbFrozen) ) #define ICorProfilerInfo11_GetLOHObjectSizeThreshold(This,pThreshold) \ - ( (This)->lpVtbl -> GetLOHObjectSizeThreshold(This,pThreshold) ) + ( (This)->lpVtbl -> GetLOHObjectSizeThreshold(This,pThreshold) ) #define ICorProfilerInfo11_RequestReJITWithInliners(This,dwRejitFlags,cFunctions,moduleIds,methodIds) \ - ( (This)->lpVtbl -> RequestReJITWithInliners(This,dwRejitFlags,cFunctions,moduleIds,methodIds) ) + ( (This)->lpVtbl -> RequestReJITWithInliners(This,dwRejitFlags,cFunctions,moduleIds,methodIds) ) #define ICorProfilerInfo11_SuspendRuntime(This) \ - ( (This)->lpVtbl -> SuspendRuntime(This) ) + ( (This)->lpVtbl -> SuspendRuntime(This) ) #define ICorProfilerInfo11_ResumeRuntime(This) \ - ( (This)->lpVtbl -> ResumeRuntime(This) ) + ( (This)->lpVtbl -> ResumeRuntime(This) ) #define ICorProfilerInfo11_GetEnvironmentVariable(This,szName,cchValue,pcchValue,szValue) \ - ( (This)->lpVtbl -> GetEnvironmentVariable(This,szName,cchValue,pcchValue,szValue) ) + ( (This)->lpVtbl -> GetEnvironmentVariable(This,szName,cchValue,pcchValue,szValue) ) #define ICorProfilerInfo11_SetEnvironmentVariable(This,szName,szValue) \ - ( (This)->lpVtbl -> SetEnvironmentVariable(This,szName,szValue) ) + ( (This)->lpVtbl -> SetEnvironmentVariable(This,szName,szValue) ) #endif /* COBJMACROS */ @@ -17217,24 +18060,44 @@ EXTERN_C const IID IID_ICorProfilerInfo11; #define __ICorProfilerInfo12_INTERFACE_DEFINED__ /* interface ICorProfilerInfo12 */ -/* [local][unique][uuid][object] */ +/* [local][unique][uuid][object] */ EXTERN_C const IID IID_ICorProfilerInfo12; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("27b24ccd-1cb1-47c5-96ee-98190dc30959") ICorProfilerInfo12 : public ICorProfilerInfo11 { public: - virtual HRESULT STDMETHODCALLTYPE EventPipeCreateProvider( - /* [string][in] */ const WCHAR *szName, - /* [out] */ EVENTPIPE_PROVIDER *pProviderHandle) = 0; - - virtual HRESULT STDMETHODCALLTYPE EventPipeDefineEvent( - /* [in] */ EVENTPIPE_PROVIDER provHandle, - /* [string][in] */ const WCHAR *szName, + virtual HRESULT STDMETHODCALLTYPE EventPipeStartSession( + /* [in] */ UINT32 cProviderConfigs, + /* [size_is][in] */ COR_PRF_EVENTPIPE_PROVIDER_CONFIG pProviderConfigs[ ], + /* [in] */ BOOL requestRundown, + /* [out] */ EVENTPIPE_SESSION *pSession) = 0; + + virtual HRESULT STDMETHODCALLTYPE EventPipeAddProviderToSession( + /* [in] */ EVENTPIPE_SESSION session, + /* [in] */ COR_PRF_EVENTPIPE_PROVIDER_CONFIG providerConfig) = 0; + + virtual HRESULT STDMETHODCALLTYPE EventPipeStopSession( + /* [in] */ EVENTPIPE_SESSION session) = 0; + + virtual HRESULT STDMETHODCALLTYPE EventPipeCreateProvider( + /* [string][in] */ const WCHAR *providerName, + /* [out] */ EVENTPIPE_PROVIDER *pProvider) = 0; + + virtual HRESULT STDMETHODCALLTYPE EventPipeGetProviderInfo( + /* [in] */ EVENTPIPE_PROVIDER provider, + /* [in] */ ULONG cchName, + /* [out] */ ULONG *pcchName, + /* [annotation][out] */ + _Out_writes_to_(cchName, *pcchName) WCHAR providerName[ ]) = 0; + + virtual HRESULT STDMETHODCALLTYPE EventPipeDefineEvent( + /* [in] */ EVENTPIPE_PROVIDER provider, + /* [string][in] */ const WCHAR *eventName, /* [in] */ UINT32 eventID, /* [in] */ UINT64 keywords, /* [in] */ UINT32 eventVersion, @@ -17243,226 +18106,226 @@ EXTERN_C const IID IID_ICorProfilerInfo12; /* [in] */ BOOL needStack, /* [in] */ UINT32 cParamDescs, /* [size_is][in] */ COR_PRF_EVENTPIPE_PARAM_DESC pParamDescs[ ], - /* [out] */ EVENTPIPE_EVENT *pEventHandle) = 0; - - virtual HRESULT STDMETHODCALLTYPE EventPipeWriteEvent( - /* [in] */ EVENTPIPE_EVENT eventHandle, + /* [out] */ EVENTPIPE_EVENT *pEvent) = 0; + + virtual HRESULT STDMETHODCALLTYPE EventPipeWriteEvent( + /* [in] */ EVENTPIPE_EVENT event, /* [in] */ UINT32 cData, /* [size_is][in] */ COR_PRF_EVENT_DATA data[ ], /* [in] */ LPCGUID pActivityId, /* [in] */ LPCGUID pRelatedActivityId) = 0; - + }; - - + + #else /* C style interface */ typedef struct ICorProfilerInfo12Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorProfilerInfo12 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorProfilerInfo12 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorProfilerInfo12 * This); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )( ICorProfilerInfo12 * This, /* [in] */ ObjectID objectId, /* [out] */ ClassID *pClassId); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )( ICorProfilerInfo12 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdTypeDef typeDef, /* [out] */ ClassID *pClassId); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )( ICorProfilerInfo12 * This, /* [in] */ FunctionID functionId, /* [out] */ LPCBYTE *pStart, /* [out] */ ULONG *pcSize); - - HRESULT ( STDMETHODCALLTYPE *GetEventMask )( + + HRESULT ( STDMETHODCALLTYPE *GetEventMask )( ICorProfilerInfo12 * This, /* [out] */ DWORD *pdwEvents); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )( ICorProfilerInfo12 * This, /* [in] */ LPCBYTE ip, /* [out] */ FunctionID *pFunctionId); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )( ICorProfilerInfo12 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdToken token, /* [out] */ FunctionID *pFunctionId); - - HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )( + + HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )( ICorProfilerInfo12 * This, /* [in] */ ThreadID threadId, /* [out] */ HANDLE *phThread); - - HRESULT ( STDMETHODCALLTYPE *GetObjectSize )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectSize )( ICorProfilerInfo12 * This, /* [in] */ ObjectID objectId, /* [out] */ ULONG *pcSize); - - HRESULT ( STDMETHODCALLTYPE *IsArrayClass )( + + HRESULT ( STDMETHODCALLTYPE *IsArrayClass )( ICorProfilerInfo12 * This, /* [in] */ ClassID classId, /* [out] */ CorElementType *pBaseElemType, /* [out] */ ClassID *pBaseClassId, /* [out] */ ULONG *pcRank); - - HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )( ICorProfilerInfo12 * This, /* [in] */ ThreadID threadId, /* [out] */ DWORD *pdwWin32ThreadId); - - HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )( + + HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )( ICorProfilerInfo12 * This, /* [out] */ ThreadID *pThreadId); - - HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )( ICorProfilerInfo12 * This, /* [in] */ ClassID classId, /* [out] */ ModuleID *pModuleId, /* [out] */ mdTypeDef *pTypeDefToken); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )( ICorProfilerInfo12 * This, /* [in] */ FunctionID functionId, /* [out] */ ClassID *pClassId, /* [out] */ ModuleID *pModuleId, /* [out] */ mdToken *pToken); - - HRESULT ( STDMETHODCALLTYPE *SetEventMask )( + + HRESULT ( STDMETHODCALLTYPE *SetEventMask )( ICorProfilerInfo12 * This, /* [in] */ DWORD dwEvents); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )( ICorProfilerInfo12 * This, /* [in] */ FunctionEnter *pFuncEnter, /* [in] */ FunctionLeave *pFuncLeave, /* [in] */ FunctionTailcall *pFuncTailcall); - - HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )( + + HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )( ICorProfilerInfo12 * This, /* [in] */ FunctionIDMapper *pFunc); - - HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )( + + HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )( ICorProfilerInfo12 * This, /* [in] */ FunctionID functionId, /* [in] */ REFIID riid, /* [out] */ IUnknown **ppImport, /* [out] */ mdToken *pToken); - - HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )( ICorProfilerInfo12 * This, /* [in] */ ModuleID moduleId, /* [out] */ LPCBYTE *ppBaseLoadAddress, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AssemblyID *pAssemblyId); - - HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )( ICorProfilerInfo12 * This, /* [in] */ ModuleID moduleId, /* [in] */ DWORD dwOpenFlags, /* [in] */ REFIID riid, /* [out] */ IUnknown **ppOut); - - HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )( + + HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )( ICorProfilerInfo12 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodId, /* [out] */ LPCBYTE *ppMethodHeader, /* [out] */ ULONG *pcbMethodSize); - - HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )( + + HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )( ICorProfilerInfo12 * This, /* [in] */ ModuleID moduleId, /* [out] */ IMethodMalloc **ppMalloc); - - HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )( + + HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )( ICorProfilerInfo12 * This, /* [in] */ ModuleID moduleId, /* [in] */ mdMethodDef methodid, /* [in] */ LPCBYTE pbNewILMethodHeader); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )( ICorProfilerInfo12 * This, /* [in] */ AppDomainID appDomainId, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ ProcessID *pProcessId); - - HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )( ICorProfilerInfo12 * This, /* [in] */ AssemblyID assemblyId, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AppDomainID *pAppDomainId, /* [out] */ ModuleID *pModuleId); - - HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )( + + HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )( ICorProfilerInfo12 * This, /* [in] */ FunctionID functionId); - - HRESULT ( STDMETHODCALLTYPE *ForceGC )( + + HRESULT ( STDMETHODCALLTYPE *ForceGC )( ICorProfilerInfo12 * This); - - HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )( + + HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )( ICorProfilerInfo12 * This, /* [in] */ FunctionID functionId, /* [in] */ BOOL fStartJit, /* [in] */ ULONG cILMapEntries, /* [size_is][in] */ COR_IL_MAP rgILMapEntries[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )( + + HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )( ICorProfilerInfo12 * This, /* [out] */ IUnknown **ppicd); - - HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )( + + HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )( ICorProfilerInfo12 * This, /* [out] */ IUnknown **ppicd); - - HRESULT ( STDMETHODCALLTYPE *GetThreadContext )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadContext )( ICorProfilerInfo12 * This, /* [in] */ ThreadID threadId, /* [out] */ ContextID *pContextId); - - HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )( + + HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )( ICorProfilerInfo12 * This, /* [in] */ BOOL fThisThreadOnly, /* [out] */ DWORD *pdwProfilerContext); - - HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )( + + HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )( ICorProfilerInfo12 * This, /* [in] */ DWORD dwProfilerContext); - - HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )( + + HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )( ICorProfilerInfo12 * This, /* [in] */ FunctionID functionId, /* [in] */ ULONG32 cMap, /* [out] */ ULONG32 *pcMap, /* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]); - - HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )( + + HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )( ICorProfilerInfo12 * This, /* [in] */ ThreadID thread, /* [in] */ StackSnapshotCallback *callback, @@ -17470,14 +18333,14 @@ EXTERN_C const IID IID_ICorProfilerInfo12; /* [in] */ void *clientData, /* [size_is][in] */ BYTE context[ ], /* [in] */ ULONG32 contextSize); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )( ICorProfilerInfo12 * This, /* [in] */ FunctionEnter2 *pFuncEnter, /* [in] */ FunctionLeave2 *pFuncLeave, /* [in] */ FunctionTailcall2 *pFuncTailcall); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )( ICorProfilerInfo12 * This, /* [in] */ FunctionID funcId, /* [in] */ COR_PRF_FRAME_INFO frameInfo, @@ -17487,22 +18350,22 @@ EXTERN_C const IID IID_ICorProfilerInfo12; /* [in] */ ULONG32 cTypeArgs, /* [out] */ ULONG32 *pcTypeArgs, /* [out] */ ClassID typeArgs[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetStringLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetStringLayout )( ICorProfilerInfo12 * This, /* [out] */ ULONG *pBufferLengthOffset, /* [out] */ ULONG *pStringLengthOffset, /* [out] */ ULONG *pBufferOffset); - - HRESULT ( STDMETHODCALLTYPE *GetClassLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetClassLayout )( ICorProfilerInfo12 * This, /* [in] */ ClassID classID, /* [out][in] */ COR_FIELD_OFFSET rFieldOffset[ ], /* [in] */ ULONG cFieldOffset, /* [out] */ ULONG *pcFieldOffset, /* [out] */ ULONG *pulClassSize); - - HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )( ICorProfilerInfo12 * This, /* [in] */ ClassID classId, /* [out] */ ModuleID *pModuleId, @@ -17511,23 +18374,23 @@ EXTERN_C const IID IID_ICorProfilerInfo12; /* [in] */ ULONG32 cNumTypeArgs, /* [out] */ ULONG32 *pcNumTypeArgs, /* [out] */ ClassID typeArgs[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )( ICorProfilerInfo12 * This, /* [in] */ FunctionID functionID, /* [in] */ ULONG32 cCodeInfos, /* [out] */ ULONG32 *pcCodeInfos, /* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )( + + HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )( ICorProfilerInfo12 * This, /* [in] */ ModuleID moduleID, /* [in] */ mdTypeDef typeDef, /* [in] */ ULONG32 cTypeArgs, /* [size_is][in] */ ClassID typeArgs[ ], /* [out] */ ClassID *pClassID); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )( ICorProfilerInfo12 * This, /* [in] */ ModuleID moduleID, /* [in] */ mdMethodDef funcDef, @@ -17535,134 +18398,134 @@ EXTERN_C const IID IID_ICorProfilerInfo12; /* [in] */ ULONG32 cTypeArgs, /* [size_is][in] */ ClassID typeArgs[ ], /* [out] */ FunctionID *pFunctionID); - - HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )( + + HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )( ICorProfilerInfo12 * This, /* [in] */ ModuleID moduleID, /* [out] */ ICorProfilerObjectEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )( ICorProfilerInfo12 * This, /* [in] */ ObjectID objectId, /* [in] */ ULONG32 cDimensions, /* [size_is][out] */ ULONG32 pDimensionSizes[ ], /* [size_is][out] */ int pDimensionLowerBounds[ ], /* [out] */ BYTE **ppData); - - HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )( + + HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )( ICorProfilerInfo12 * This, /* [in] */ ClassID classId, /* [out] */ ULONG32 *pBufferOffset); - - HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )( ICorProfilerInfo12 * This, /* [in] */ ThreadID threadId, /* [out] */ AppDomainID *pAppDomainId); - - HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )( ICorProfilerInfo12 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )( ICorProfilerInfo12 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ AppDomainID appDomainId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )( ICorProfilerInfo12 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ ThreadID threadId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )( ICorProfilerInfo12 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ ContextID contextId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )( ICorProfilerInfo12 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [out] */ COR_PRF_STATIC_TYPE *pFieldInfo); - - HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )( + + HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )( ICorProfilerInfo12 * This, /* [in] */ ULONG cObjectRanges, /* [out] */ ULONG *pcObjectRanges, /* [length_is][size_is][out] */ COR_PRF_GC_GENERATION_RANGE ranges[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )( ICorProfilerInfo12 * This, /* [in] */ ObjectID objectId, /* [out] */ COR_PRF_GC_GENERATION_RANGE *range); - - HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )( ICorProfilerInfo12 * This, /* [out] */ COR_PRF_EX_CLAUSE_INFO *pinfo); - - HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions )( + + HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions )( ICorProfilerInfo12 * This, /* [out] */ ICorProfilerFunctionEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *RequestProfilerDetach )( + + HRESULT ( STDMETHODCALLTYPE *RequestProfilerDetach )( ICorProfilerInfo12 * This, /* [in] */ DWORD dwExpectedCompletionMilliseconds); - - HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper2 )( + + HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper2 )( ICorProfilerInfo12 * This, /* [in] */ FunctionIDMapper2 *pFunc, /* [in] */ void *clientData); - - HRESULT ( STDMETHODCALLTYPE *GetStringLayout2 )( + + HRESULT ( STDMETHODCALLTYPE *GetStringLayout2 )( ICorProfilerInfo12 * This, /* [out] */ ULONG *pStringLengthOffset, /* [out] */ ULONG *pBufferOffset); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3 )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3 )( ICorProfilerInfo12 * This, /* [in] */ FunctionEnter3 *pFuncEnter3, /* [in] */ FunctionLeave3 *pFuncLeave3, /* [in] */ FunctionTailcall3 *pFuncTailcall3); - - HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3WithInfo )( + + HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3WithInfo )( ICorProfilerInfo12 * This, /* [in] */ FunctionEnter3WithInfo *pFuncEnter3WithInfo, /* [in] */ FunctionLeave3WithInfo *pFuncLeave3WithInfo, /* [in] */ FunctionTailcall3WithInfo *pFuncTailcall3WithInfo); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionEnter3Info )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionEnter3Info )( ICorProfilerInfo12 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_ELT_INFO eltInfo, /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo, /* [out][in] */ ULONG *pcbArgumentInfo, /* [size_is][out] */ COR_PRF_FUNCTION_ARGUMENT_INFO *pArgumentInfo); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionLeave3Info )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionLeave3Info )( ICorProfilerInfo12 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_ELT_INFO eltInfo, /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo, /* [out] */ COR_PRF_FUNCTION_ARGUMENT_RANGE *pRetvalRange); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionTailcall3Info )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionTailcall3Info )( ICorProfilerInfo12 * This, /* [in] */ FunctionID functionId, /* [in] */ COR_PRF_ELT_INFO eltInfo, /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo); - - HRESULT ( STDMETHODCALLTYPE *EnumModules )( + + HRESULT ( STDMETHODCALLTYPE *EnumModules )( ICorProfilerInfo12 * This, /* [out] */ ICorProfilerModuleEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetRuntimeInformation )( + + HRESULT ( STDMETHODCALLTYPE *GetRuntimeInformation )( ICorProfilerInfo12 * This, /* [out] */ USHORT *pClrInstanceId, /* [out] */ COR_PRF_RUNTIME_TYPE *pRuntimeType, @@ -17672,140 +18535,140 @@ EXTERN_C const IID IID_ICorProfilerInfo12; /* [out] */ USHORT *pQFEVersion, /* [in] */ ULONG cchVersionString, /* [out] */ ULONG *pcchVersionString, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchVersionString, *pcchVersionString) WCHAR szVersionString[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress2 )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress2 )( ICorProfilerInfo12 * This, /* [in] */ ClassID classId, /* [in] */ mdFieldDef fieldToken, /* [in] */ AppDomainID appDomainId, /* [in] */ ThreadID threadId, /* [out] */ void **ppAddress); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainsContainingModule )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainsContainingModule )( ICorProfilerInfo12 * This, /* [in] */ ModuleID moduleId, /* [in] */ ULONG32 cAppDomainIds, /* [out] */ ULONG32 *pcAppDomainIds, /* [length_is][size_is][out] */ AppDomainID appDomainIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetModuleInfo2 )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleInfo2 )( ICorProfilerInfo12 * This, /* [in] */ ModuleID moduleId, /* [out] */ LPCBYTE *ppBaseLoadAddress, /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ], /* [out] */ AssemblyID *pAssemblyId, /* [out] */ DWORD *pdwModuleFlags); - - HRESULT ( STDMETHODCALLTYPE *EnumThreads )( + + HRESULT ( STDMETHODCALLTYPE *EnumThreads )( ICorProfilerInfo12 * This, /* [out] */ ICorProfilerThreadEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *InitializeCurrentThread )( + + HRESULT ( STDMETHODCALLTYPE *InitializeCurrentThread )( ICorProfilerInfo12 * This); - - HRESULT ( STDMETHODCALLTYPE *RequestReJIT )( + + HRESULT ( STDMETHODCALLTYPE *RequestReJIT )( ICorProfilerInfo12 * This, /* [in] */ ULONG cFunctions, /* [size_is][in] */ ModuleID moduleIds[ ], /* [size_is][in] */ mdMethodDef methodIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *RequestRevert )( + + HRESULT ( STDMETHODCALLTYPE *RequestRevert )( ICorProfilerInfo12 * This, /* [in] */ ULONG cFunctions, /* [size_is][in] */ ModuleID moduleIds[ ], /* [size_is][in] */ mdMethodDef methodIds[ ], /* [size_is][out] */ HRESULT status[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo3 )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo3 )( ICorProfilerInfo12 * This, /* [in] */ FunctionID functionID, /* [in] */ ReJITID reJitId, /* [in] */ ULONG32 cCodeInfos, /* [out] */ ULONG32 *pcCodeInfos, /* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP2 )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP2 )( ICorProfilerInfo12 * This, /* [in] */ LPCBYTE ip, /* [out] */ FunctionID *pFunctionId, /* [out] */ ReJITID *pReJitId); - - HRESULT ( STDMETHODCALLTYPE *GetReJITIDs )( + + HRESULT ( STDMETHODCALLTYPE *GetReJITIDs )( ICorProfilerInfo12 * This, /* [in] */ FunctionID functionId, /* [in] */ ULONG cReJitIds, /* [out] */ ULONG *pcReJitIds, /* [length_is][size_is][out] */ ReJITID reJitIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping2 )( + + HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping2 )( ICorProfilerInfo12 * This, /* [in] */ FunctionID functionId, /* [in] */ ReJITID reJitId, /* [in] */ ULONG32 cMap, /* [out] */ ULONG32 *pcMap, /* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]); - - HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions2 )( + + HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions2 )( ICorProfilerInfo12 * This, /* [out] */ ICorProfilerFunctionEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetObjectSize2 )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectSize2 )( ICorProfilerInfo12 * This, /* [in] */ ObjectID objectId, /* [out] */ SIZE_T *pcSize); - - HRESULT ( STDMETHODCALLTYPE *GetEventMask2 )( + + HRESULT ( STDMETHODCALLTYPE *GetEventMask2 )( ICorProfilerInfo12 * This, /* [out] */ DWORD *pdwEventsLow, /* [out] */ DWORD *pdwEventsHigh); - - HRESULT ( STDMETHODCALLTYPE *SetEventMask2 )( + + HRESULT ( STDMETHODCALLTYPE *SetEventMask2 )( ICorProfilerInfo12 * This, /* [in] */ DWORD dwEventsLow, /* [in] */ DWORD dwEventsHigh); - - HRESULT ( STDMETHODCALLTYPE *EnumNgenModuleMethodsInliningThisMethod )( + + HRESULT ( STDMETHODCALLTYPE *EnumNgenModuleMethodsInliningThisMethod )( ICorProfilerInfo12 * This, /* [in] */ ModuleID inlinersModuleId, /* [in] */ ModuleID inlineeModuleId, /* [in] */ mdMethodDef inlineeMethodId, /* [out] */ BOOL *incompleteData, /* [out] */ ICorProfilerMethodEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *ApplyMetaData )( + + HRESULT ( STDMETHODCALLTYPE *ApplyMetaData )( ICorProfilerInfo12 * This, /* [in] */ ModuleID moduleId); - - HRESULT ( STDMETHODCALLTYPE *GetInMemorySymbolsLength )( + + HRESULT ( STDMETHODCALLTYPE *GetInMemorySymbolsLength )( ICorProfilerInfo12 * This, /* [in] */ ModuleID moduleId, /* [out] */ DWORD *pCountSymbolBytes); - - HRESULT ( STDMETHODCALLTYPE *ReadInMemorySymbols )( + + HRESULT ( STDMETHODCALLTYPE *ReadInMemorySymbols )( ICorProfilerInfo12 * This, /* [in] */ ModuleID moduleId, /* [in] */ DWORD symbolsReadOffset, /* [out] */ BYTE *pSymbolBytes, /* [in] */ DWORD countSymbolBytes, /* [out] */ DWORD *pCountSymbolBytesRead); - - HRESULT ( STDMETHODCALLTYPE *IsFunctionDynamic )( + + HRESULT ( STDMETHODCALLTYPE *IsFunctionDynamic )( ICorProfilerInfo12 * This, /* [in] */ FunctionID functionId, /* [out] */ BOOL *isDynamic); - - HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP3 )( + + HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP3 )( ICorProfilerInfo12 * This, /* [in] */ LPCBYTE ip, /* [out] */ FunctionID *functionId, /* [out] */ ReJITID *pReJitId); - - HRESULT ( STDMETHODCALLTYPE *GetDynamicFunctionInfo )( + + HRESULT ( STDMETHODCALLTYPE *GetDynamicFunctionInfo )( ICorProfilerInfo12 * This, /* [in] */ FunctionID functionId, /* [out] */ ModuleID *moduleId, @@ -17814,79 +18677,103 @@ EXTERN_C const IID IID_ICorProfilerInfo12; /* [in] */ ULONG cchName, /* [out] */ ULONG *pcchName, /* [out] */ WCHAR wszName[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetNativeCodeStartAddresses )( + + HRESULT ( STDMETHODCALLTYPE *GetNativeCodeStartAddresses )( ICorProfilerInfo12 * This, FunctionID functionID, ReJITID reJitId, ULONG32 cCodeStartAddresses, ULONG32 *pcCodeStartAddresses, UINT_PTR codeStartAddresses[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping3 )( + + HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping3 )( ICorProfilerInfo12 * This, UINT_PTR pNativeCodeStartAddress, ULONG32 cMap, ULONG32 *pcMap, COR_DEBUG_IL_TO_NATIVE_MAP map[ ]); - - HRESULT ( STDMETHODCALLTYPE *GetCodeInfo4 )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeInfo4 )( ICorProfilerInfo12 * This, UINT_PTR pNativeCodeStartAddress, ULONG32 cCodeInfos, ULONG32 *pcCodeInfos, COR_PRF_CODE_INFO codeInfos[ ]); - - HRESULT ( STDMETHODCALLTYPE *EnumerateObjectReferences )( + + HRESULT ( STDMETHODCALLTYPE *EnumerateObjectReferences )( ICorProfilerInfo12 * This, ObjectID objectId, ObjectReferenceCallback callback, void *clientData); - - HRESULT ( STDMETHODCALLTYPE *IsFrozenObject )( + + HRESULT ( STDMETHODCALLTYPE *IsFrozenObject )( ICorProfilerInfo12 * This, ObjectID objectId, BOOL *pbFrozen); - - HRESULT ( STDMETHODCALLTYPE *GetLOHObjectSizeThreshold )( + + HRESULT ( STDMETHODCALLTYPE *GetLOHObjectSizeThreshold )( ICorProfilerInfo12 * This, DWORD *pThreshold); - - HRESULT ( STDMETHODCALLTYPE *RequestReJITWithInliners )( + + HRESULT ( STDMETHODCALLTYPE *RequestReJITWithInliners )( ICorProfilerInfo12 * This, /* [in] */ DWORD dwRejitFlags, /* [in] */ ULONG cFunctions, /* [size_is][in] */ ModuleID moduleIds[ ], /* [size_is][in] */ mdMethodDef methodIds[ ]); - - HRESULT ( STDMETHODCALLTYPE *SuspendRuntime )( + + HRESULT ( STDMETHODCALLTYPE *SuspendRuntime )( ICorProfilerInfo12 * This); - - HRESULT ( STDMETHODCALLTYPE *ResumeRuntime )( + + HRESULT ( STDMETHODCALLTYPE *ResumeRuntime )( ICorProfilerInfo12 * This); - - HRESULT ( STDMETHODCALLTYPE *GetEnvironmentVariable )( + + HRESULT ( STDMETHODCALLTYPE *GetEnvironmentVariable )( ICorProfilerInfo12 * This, /* [string][in] */ const WCHAR *szName, /* [in] */ ULONG cchValue, /* [out] */ ULONG *pcchValue, - /* [annotation][out] */ + /* [annotation][out] */ _Out_writes_to_(cchValue, *pcchValue) WCHAR szValue[ ]); - - HRESULT ( STDMETHODCALLTYPE *SetEnvironmentVariable )( + + HRESULT ( STDMETHODCALLTYPE *SetEnvironmentVariable )( ICorProfilerInfo12 * This, /* [string][in] */ const WCHAR *szName, /* [string][in] */ const WCHAR *szValue); - - HRESULT ( STDMETHODCALLTYPE *EventPipeCreateProvider )( + + HRESULT ( STDMETHODCALLTYPE *EventPipeStartSession )( ICorProfilerInfo12 * This, - /* [string][in] */ const WCHAR *szName, - /* [out] */ EVENTPIPE_PROVIDER *pProviderHandle); - - HRESULT ( STDMETHODCALLTYPE *EventPipeDefineEvent )( + /* [in] */ UINT32 cProviderConfigs, + /* [size_is][in] */ COR_PRF_EVENTPIPE_PROVIDER_CONFIG pProviderConfigs[ ], + /* [in] */ BOOL requestRundown, + /* [out] */ EVENTPIPE_SESSION *pSession); + + HRESULT ( STDMETHODCALLTYPE *EventPipeAddProviderToSession )( ICorProfilerInfo12 * This, - /* [in] */ EVENTPIPE_PROVIDER provHandle, - /* [string][in] */ const WCHAR *szName, + /* [in] */ EVENTPIPE_SESSION session, + /* [in] */ COR_PRF_EVENTPIPE_PROVIDER_CONFIG providerConfig); + + HRESULT ( STDMETHODCALLTYPE *EventPipeStopSession )( + ICorProfilerInfo12 * This, + /* [in] */ EVENTPIPE_SESSION session); + + HRESULT ( STDMETHODCALLTYPE *EventPipeCreateProvider )( + ICorProfilerInfo12 * This, + /* [string][in] */ const WCHAR *providerName, + /* [out] */ EVENTPIPE_PROVIDER *pProvider); + + HRESULT ( STDMETHODCALLTYPE *EventPipeGetProviderInfo )( + ICorProfilerInfo12 * This, + /* [in] */ EVENTPIPE_PROVIDER provider, + /* [in] */ ULONG cchName, + /* [out] */ ULONG *pcchName, + /* [annotation][out] */ + _Out_writes_to_(cchName, *pcchName) WCHAR providerName[ ]); + + HRESULT ( STDMETHODCALLTYPE *EventPipeDefineEvent )( + ICorProfilerInfo12 * This, + /* [in] */ EVENTPIPE_PROVIDER provider, + /* [string][in] */ const WCHAR *eventName, /* [in] */ UINT32 eventID, /* [in] */ UINT64 keywords, /* [in] */ UINT32 eventVersion, @@ -17895,16 +18782,16 @@ EXTERN_C const IID IID_ICorProfilerInfo12; /* [in] */ BOOL needStack, /* [in] */ UINT32 cParamDescs, /* [size_is][in] */ COR_PRF_EVENTPIPE_PARAM_DESC pParamDescs[ ], - /* [out] */ EVENTPIPE_EVENT *pEventHandle); - - HRESULT ( STDMETHODCALLTYPE *EventPipeWriteEvent )( + /* [out] */ EVENTPIPE_EVENT *pEvent); + + HRESULT ( STDMETHODCALLTYPE *EventPipeWriteEvent )( ICorProfilerInfo12 * This, - /* [in] */ EVENTPIPE_EVENT eventHandle, + /* [in] */ EVENTPIPE_EVENT event, /* [in] */ UINT32 cData, /* [size_is][in] */ COR_PRF_EVENT_DATA data[ ], /* [in] */ LPCGUID pActivityId, /* [in] */ LPCGUID pRelatedActivityId); - + END_INTERFACE } ICorProfilerInfo12Vtbl; @@ -17913,334 +18800,346 @@ EXTERN_C const IID IID_ICorProfilerInfo12; CONST_VTBL struct ICorProfilerInfo12Vtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ICorProfilerInfo12_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ICorProfilerInfo12_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ICorProfilerInfo12_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ICorProfilerInfo12_GetClassFromObject(This,objectId,pClassId) \ - ( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) ) + ( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) ) #define ICorProfilerInfo12_GetClassFromToken(This,moduleId,typeDef,pClassId) \ - ( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) ) + ( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) ) #define ICorProfilerInfo12_GetCodeInfo(This,functionId,pStart,pcSize) \ - ( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) ) + ( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) ) #define ICorProfilerInfo12_GetEventMask(This,pdwEvents) \ - ( (This)->lpVtbl -> GetEventMask(This,pdwEvents) ) + ( (This)->lpVtbl -> GetEventMask(This,pdwEvents) ) #define ICorProfilerInfo12_GetFunctionFromIP(This,ip,pFunctionId) \ - ( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) ) + ( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) ) #define ICorProfilerInfo12_GetFunctionFromToken(This,moduleId,token,pFunctionId) \ - ( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) ) + ( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) ) #define ICorProfilerInfo12_GetHandleFromThread(This,threadId,phThread) \ - ( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) ) + ( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) ) #define ICorProfilerInfo12_GetObjectSize(This,objectId,pcSize) \ - ( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) ) + ( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) ) #define ICorProfilerInfo12_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \ - ( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) ) + ( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) ) #define ICorProfilerInfo12_GetThreadInfo(This,threadId,pdwWin32ThreadId) \ - ( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) ) + ( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) ) #define ICorProfilerInfo12_GetCurrentThreadID(This,pThreadId) \ - ( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) ) + ( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) ) #define ICorProfilerInfo12_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \ - ( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) ) + ( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) ) #define ICorProfilerInfo12_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \ - ( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) ) + ( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) ) #define ICorProfilerInfo12_SetEventMask(This,dwEvents) \ - ( (This)->lpVtbl -> SetEventMask(This,dwEvents) ) + ( (This)->lpVtbl -> SetEventMask(This,dwEvents) ) #define ICorProfilerInfo12_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) #define ICorProfilerInfo12_SetFunctionIDMapper(This,pFunc) \ - ( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) ) + ( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) ) #define ICorProfilerInfo12_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \ - ( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) ) + ( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) ) #define ICorProfilerInfo12_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \ - ( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) ) + ( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) ) #define ICorProfilerInfo12_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \ - ( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) ) + ( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) ) #define ICorProfilerInfo12_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \ - ( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) ) + ( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) ) #define ICorProfilerInfo12_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \ - ( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) ) + ( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) ) #define ICorProfilerInfo12_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \ - ( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) ) + ( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) ) #define ICorProfilerInfo12_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \ - ( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) ) + ( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) ) #define ICorProfilerInfo12_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \ - ( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) ) + ( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) ) #define ICorProfilerInfo12_SetFunctionReJIT(This,functionId) \ - ( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) ) + ( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) ) #define ICorProfilerInfo12_ForceGC(This) \ - ( (This)->lpVtbl -> ForceGC(This) ) + ( (This)->lpVtbl -> ForceGC(This) ) #define ICorProfilerInfo12_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \ - ( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) ) + ( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) ) #define ICorProfilerInfo12_GetInprocInspectionInterface(This,ppicd) \ - ( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) ) + ( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) ) #define ICorProfilerInfo12_GetInprocInspectionIThisThread(This,ppicd) \ - ( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) ) + ( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) ) #define ICorProfilerInfo12_GetThreadContext(This,threadId,pContextId) \ - ( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) ) + ( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) ) #define ICorProfilerInfo12_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \ - ( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) ) + ( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) ) #define ICorProfilerInfo12_EndInprocDebugging(This,dwProfilerContext) \ - ( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) ) + ( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) ) #define ICorProfilerInfo12_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \ - ( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) ) + ( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) ) #define ICorProfilerInfo12_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \ - ( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) ) + ( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) ) #define ICorProfilerInfo12_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) ) #define ICorProfilerInfo12_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \ - ( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) ) + ( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) ) #define ICorProfilerInfo12_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \ - ( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) ) + ( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) ) #define ICorProfilerInfo12_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \ - ( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) ) + ( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) ) #define ICorProfilerInfo12_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \ - ( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) ) + ( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) ) #define ICorProfilerInfo12_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \ - ( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) ) + ( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) ) #define ICorProfilerInfo12_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \ - ( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) ) + ( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) ) #define ICorProfilerInfo12_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \ - ( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) ) + ( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) ) #define ICorProfilerInfo12_EnumModuleFrozenObjects(This,moduleID,ppEnum) \ - ( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) ) + ( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) ) #define ICorProfilerInfo12_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \ - ( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) ) + ( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) ) #define ICorProfilerInfo12_GetBoxClassLayout(This,classId,pBufferOffset) \ - ( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) ) + ( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) ) #define ICorProfilerInfo12_GetThreadAppDomain(This,threadId,pAppDomainId) \ - ( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) ) + ( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) ) #define ICorProfilerInfo12_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \ - ( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) ) + ( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) ) #define ICorProfilerInfo12_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \ - ( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) ) + ( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) ) #define ICorProfilerInfo12_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \ - ( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) ) + ( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) ) #define ICorProfilerInfo12_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \ - ( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) ) + ( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) ) #define ICorProfilerInfo12_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \ - ( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) ) + ( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) ) #define ICorProfilerInfo12_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \ - ( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) ) + ( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) ) #define ICorProfilerInfo12_GetObjectGeneration(This,objectId,range) \ - ( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) ) + ( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) ) #define ICorProfilerInfo12_GetNotifiedExceptionClauseInfo(This,pinfo) \ - ( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) ) + ( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) ) #define ICorProfilerInfo12_EnumJITedFunctions(This,ppEnum) \ - ( (This)->lpVtbl -> EnumJITedFunctions(This,ppEnum) ) + ( (This)->lpVtbl -> EnumJITedFunctions(This,ppEnum) ) #define ICorProfilerInfo12_RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) \ - ( (This)->lpVtbl -> RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) ) + ( (This)->lpVtbl -> RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) ) #define ICorProfilerInfo12_SetFunctionIDMapper2(This,pFunc,clientData) \ - ( (This)->lpVtbl -> SetFunctionIDMapper2(This,pFunc,clientData) ) + ( (This)->lpVtbl -> SetFunctionIDMapper2(This,pFunc,clientData) ) #define ICorProfilerInfo12_GetStringLayout2(This,pStringLengthOffset,pBufferOffset) \ - ( (This)->lpVtbl -> GetStringLayout2(This,pStringLengthOffset,pBufferOffset) ) + ( (This)->lpVtbl -> GetStringLayout2(This,pStringLengthOffset,pBufferOffset) ) #define ICorProfilerInfo12_SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) ) #define ICorProfilerInfo12_SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) \ - ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) ) + ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) ) #define ICorProfilerInfo12_GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) \ - ( (This)->lpVtbl -> GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) ) + ( (This)->lpVtbl -> GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) ) #define ICorProfilerInfo12_GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) \ - ( (This)->lpVtbl -> GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) ) + ( (This)->lpVtbl -> GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) ) #define ICorProfilerInfo12_GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) \ - ( (This)->lpVtbl -> GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) ) + ( (This)->lpVtbl -> GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) ) #define ICorProfilerInfo12_EnumModules(This,ppEnum) \ - ( (This)->lpVtbl -> EnumModules(This,ppEnum) ) + ( (This)->lpVtbl -> EnumModules(This,ppEnum) ) #define ICorProfilerInfo12_GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) \ - ( (This)->lpVtbl -> GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) ) + ( (This)->lpVtbl -> GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) ) #define ICorProfilerInfo12_GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) \ - ( (This)->lpVtbl -> GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) ) + ( (This)->lpVtbl -> GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) ) #define ICorProfilerInfo12_GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) \ - ( (This)->lpVtbl -> GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) ) + ( (This)->lpVtbl -> GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) ) #define ICorProfilerInfo12_GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) \ - ( (This)->lpVtbl -> GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) ) + ( (This)->lpVtbl -> GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) ) #define ICorProfilerInfo12_EnumThreads(This,ppEnum) \ - ( (This)->lpVtbl -> EnumThreads(This,ppEnum) ) + ( (This)->lpVtbl -> EnumThreads(This,ppEnum) ) #define ICorProfilerInfo12_InitializeCurrentThread(This) \ - ( (This)->lpVtbl -> InitializeCurrentThread(This) ) + ( (This)->lpVtbl -> InitializeCurrentThread(This) ) #define ICorProfilerInfo12_RequestReJIT(This,cFunctions,moduleIds,methodIds) \ - ( (This)->lpVtbl -> RequestReJIT(This,cFunctions,moduleIds,methodIds) ) + ( (This)->lpVtbl -> RequestReJIT(This,cFunctions,moduleIds,methodIds) ) #define ICorProfilerInfo12_RequestRevert(This,cFunctions,moduleIds,methodIds,status) \ - ( (This)->lpVtbl -> RequestRevert(This,cFunctions,moduleIds,methodIds,status) ) + ( (This)->lpVtbl -> RequestRevert(This,cFunctions,moduleIds,methodIds,status) ) #define ICorProfilerInfo12_GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) \ - ( (This)->lpVtbl -> GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) ) + ( (This)->lpVtbl -> GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) ) #define ICorProfilerInfo12_GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) \ - ( (This)->lpVtbl -> GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) ) + ( (This)->lpVtbl -> GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) ) #define ICorProfilerInfo12_GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) \ - ( (This)->lpVtbl -> GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) ) + ( (This)->lpVtbl -> GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) ) #define ICorProfilerInfo12_GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) \ - ( (This)->lpVtbl -> GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) ) + ( (This)->lpVtbl -> GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) ) #define ICorProfilerInfo12_EnumJITedFunctions2(This,ppEnum) \ - ( (This)->lpVtbl -> EnumJITedFunctions2(This,ppEnum) ) + ( (This)->lpVtbl -> EnumJITedFunctions2(This,ppEnum) ) #define ICorProfilerInfo12_GetObjectSize2(This,objectId,pcSize) \ - ( (This)->lpVtbl -> GetObjectSize2(This,objectId,pcSize) ) + ( (This)->lpVtbl -> GetObjectSize2(This,objectId,pcSize) ) #define ICorProfilerInfo12_GetEventMask2(This,pdwEventsLow,pdwEventsHigh) \ - ( (This)->lpVtbl -> GetEventMask2(This,pdwEventsLow,pdwEventsHigh) ) + ( (This)->lpVtbl -> GetEventMask2(This,pdwEventsLow,pdwEventsHigh) ) #define ICorProfilerInfo12_SetEventMask2(This,dwEventsLow,dwEventsHigh) \ - ( (This)->lpVtbl -> SetEventMask2(This,dwEventsLow,dwEventsHigh) ) + ( (This)->lpVtbl -> SetEventMask2(This,dwEventsLow,dwEventsHigh) ) #define ICorProfilerInfo12_EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) \ - ( (This)->lpVtbl -> EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) ) + ( (This)->lpVtbl -> EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) ) #define ICorProfilerInfo12_ApplyMetaData(This,moduleId) \ - ( (This)->lpVtbl -> ApplyMetaData(This,moduleId) ) + ( (This)->lpVtbl -> ApplyMetaData(This,moduleId) ) #define ICorProfilerInfo12_GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) \ - ( (This)->lpVtbl -> GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) ) + ( (This)->lpVtbl -> GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) ) #define ICorProfilerInfo12_ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) \ - ( (This)->lpVtbl -> ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) ) + ( (This)->lpVtbl -> ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) ) #define ICorProfilerInfo12_IsFunctionDynamic(This,functionId,isDynamic) \ - ( (This)->lpVtbl -> IsFunctionDynamic(This,functionId,isDynamic) ) + ( (This)->lpVtbl -> IsFunctionDynamic(This,functionId,isDynamic) ) #define ICorProfilerInfo12_GetFunctionFromIP3(This,ip,functionId,pReJitId) \ - ( (This)->lpVtbl -> GetFunctionFromIP3(This,ip,functionId,pReJitId) ) + ( (This)->lpVtbl -> GetFunctionFromIP3(This,ip,functionId,pReJitId) ) #define ICorProfilerInfo12_GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) \ - ( (This)->lpVtbl -> GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) ) + ( (This)->lpVtbl -> GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) ) #define ICorProfilerInfo12_GetNativeCodeStartAddresses(This,functionID,reJitId,cCodeStartAddresses,pcCodeStartAddresses,codeStartAddresses) \ - ( (This)->lpVtbl -> GetNativeCodeStartAddresses(This,functionID,reJitId,cCodeStartAddresses,pcCodeStartAddresses,codeStartAddresses) ) + ( (This)->lpVtbl -> GetNativeCodeStartAddresses(This,functionID,reJitId,cCodeStartAddresses,pcCodeStartAddresses,codeStartAddresses) ) #define ICorProfilerInfo12_GetILToNativeMapping3(This,pNativeCodeStartAddress,cMap,pcMap,map) \ - ( (This)->lpVtbl -> GetILToNativeMapping3(This,pNativeCodeStartAddress,cMap,pcMap,map) ) + ( (This)->lpVtbl -> GetILToNativeMapping3(This,pNativeCodeStartAddress,cMap,pcMap,map) ) #define ICorProfilerInfo12_GetCodeInfo4(This,pNativeCodeStartAddress,cCodeInfos,pcCodeInfos,codeInfos) \ - ( (This)->lpVtbl -> GetCodeInfo4(This,pNativeCodeStartAddress,cCodeInfos,pcCodeInfos,codeInfos) ) + ( (This)->lpVtbl -> GetCodeInfo4(This,pNativeCodeStartAddress,cCodeInfos,pcCodeInfos,codeInfos) ) #define ICorProfilerInfo12_EnumerateObjectReferences(This,objectId,callback,clientData) \ - ( (This)->lpVtbl -> EnumerateObjectReferences(This,objectId,callback,clientData) ) + ( (This)->lpVtbl -> EnumerateObjectReferences(This,objectId,callback,clientData) ) #define ICorProfilerInfo12_IsFrozenObject(This,objectId,pbFrozen) \ - ( (This)->lpVtbl -> IsFrozenObject(This,objectId,pbFrozen) ) + ( (This)->lpVtbl -> IsFrozenObject(This,objectId,pbFrozen) ) #define ICorProfilerInfo12_GetLOHObjectSizeThreshold(This,pThreshold) \ - ( (This)->lpVtbl -> GetLOHObjectSizeThreshold(This,pThreshold) ) + ( (This)->lpVtbl -> GetLOHObjectSizeThreshold(This,pThreshold) ) #define ICorProfilerInfo12_RequestReJITWithInliners(This,dwRejitFlags,cFunctions,moduleIds,methodIds) \ - ( (This)->lpVtbl -> RequestReJITWithInliners(This,dwRejitFlags,cFunctions,moduleIds,methodIds) ) + ( (This)->lpVtbl -> RequestReJITWithInliners(This,dwRejitFlags,cFunctions,moduleIds,methodIds) ) #define ICorProfilerInfo12_SuspendRuntime(This) \ - ( (This)->lpVtbl -> SuspendRuntime(This) ) + ( (This)->lpVtbl -> SuspendRuntime(This) ) #define ICorProfilerInfo12_ResumeRuntime(This) \ - ( (This)->lpVtbl -> ResumeRuntime(This) ) + ( (This)->lpVtbl -> ResumeRuntime(This) ) #define ICorProfilerInfo12_GetEnvironmentVariable(This,szName,cchValue,pcchValue,szValue) \ - ( (This)->lpVtbl -> GetEnvironmentVariable(This,szName,cchValue,pcchValue,szValue) ) + ( (This)->lpVtbl -> GetEnvironmentVariable(This,szName,cchValue,pcchValue,szValue) ) #define ICorProfilerInfo12_SetEnvironmentVariable(This,szName,szValue) \ - ( (This)->lpVtbl -> SetEnvironmentVariable(This,szName,szValue) ) + ( (This)->lpVtbl -> SetEnvironmentVariable(This,szName,szValue) ) + + +#define ICorProfilerInfo12_EventPipeStartSession(This,cProviderConfigs,pProviderConfigs,requestRundown,pSession) \ + ( (This)->lpVtbl -> EventPipeStartSession(This,cProviderConfigs,pProviderConfigs,requestRundown,pSession) ) +#define ICorProfilerInfo12_EventPipeAddProviderToSession(This,session,providerConfig) \ + ( (This)->lpVtbl -> EventPipeAddProviderToSession(This,session,providerConfig) ) -#define ICorProfilerInfo12_EventPipeCreateProvider(This,szName,pProviderHandle) \ - ( (This)->lpVtbl -> EventPipeCreateProvider(This,szName,pProviderHandle) ) +#define ICorProfilerInfo12_EventPipeStopSession(This,session) \ + ( (This)->lpVtbl -> EventPipeStopSession(This,session) ) -#define ICorProfilerInfo12_EventPipeDefineEvent(This,provHandle,szName,eventID,keywords,eventVersion,level,opcode,needStack,cParamDescs,pParamDescs,pEventHandle) \ - ( (This)->lpVtbl -> EventPipeDefineEvent(This,provHandle,szName,eventID,keywords,eventVersion,level,opcode,needStack,cParamDescs,pParamDescs,pEventHandle) ) +#define ICorProfilerInfo12_EventPipeCreateProvider(This,providerName,pProvider) \ + ( (This)->lpVtbl -> EventPipeCreateProvider(This,providerName,pProvider) ) -#define ICorProfilerInfo12_EventPipeWriteEvent(This,eventHandle,cData,data,pActivityId,pRelatedActivityId) \ - ( (This)->lpVtbl -> EventPipeWriteEvent(This,eventHandle,cData,data,pActivityId,pRelatedActivityId) ) +#define ICorProfilerInfo12_EventPipeGetProviderInfo(This,provider,cchName,pcchName,providerName) \ + ( (This)->lpVtbl -> EventPipeGetProviderInfo(This,provider,cchName,pcchName,providerName) ) + +#define ICorProfilerInfo12_EventPipeDefineEvent(This,provider,eventName,eventID,keywords,eventVersion,level,opcode,needStack,cParamDescs,pParamDescs,pEvent) \ + ( (This)->lpVtbl -> EventPipeDefineEvent(This,provider,eventName,eventID,keywords,eventVersion,level,opcode,needStack,cParamDescs,pParamDescs,pEvent) ) + +#define ICorProfilerInfo12_EventPipeWriteEvent(This,event,cData,data,pActivityId,pRelatedActivityId) \ + ( (This)->lpVtbl -> EventPipeWriteEvent(This,event,cData,data,pActivityId,pRelatedActivityId) ) #endif /* COBJMACROS */ @@ -18257,75 +19156,75 @@ EXTERN_C const IID IID_ICorProfilerInfo12; #define __ICorProfilerMethodEnum_INTERFACE_DEFINED__ /* interface ICorProfilerMethodEnum */ -/* [local][unique][uuid][object] */ +/* [local][unique][uuid][object] */ EXTERN_C const IID IID_ICorProfilerMethodEnum; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("FCCEE788-0088-454B-A811-C99F298D1942") ICorProfilerMethodEnum : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE Skip( + virtual HRESULT STDMETHODCALLTYPE Skip( /* [in] */ ULONG celt) = 0; - + virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE Clone( + + virtual HRESULT STDMETHODCALLTYPE Clone( /* [out] */ ICorProfilerMethodEnum **ppEnum) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCount( + + virtual HRESULT STDMETHODCALLTYPE GetCount( /* [out] */ ULONG *pcelt) = 0; - - virtual HRESULT STDMETHODCALLTYPE Next( + + virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ ULONG celt, /* [length_is][size_is][out] */ COR_PRF_METHOD elements[ ], /* [out] */ ULONG *pceltFetched) = 0; - + }; - - + + #else /* C style interface */ typedef struct ICorProfilerMethodEnumVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorProfilerMethodEnum * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorProfilerMethodEnum * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorProfilerMethodEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Skip )( + + HRESULT ( STDMETHODCALLTYPE *Skip )( ICorProfilerMethodEnum * This, /* [in] */ ULONG celt); - - HRESULT ( STDMETHODCALLTYPE *Reset )( + + HRESULT ( STDMETHODCALLTYPE *Reset )( ICorProfilerMethodEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Clone )( + + HRESULT ( STDMETHODCALLTYPE *Clone )( ICorProfilerMethodEnum * This, /* [out] */ ICorProfilerMethodEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetCount )( + + HRESULT ( STDMETHODCALLTYPE *GetCount )( ICorProfilerMethodEnum * This, /* [out] */ ULONG *pcelt); - - HRESULT ( STDMETHODCALLTYPE *Next )( + + HRESULT ( STDMETHODCALLTYPE *Next )( ICorProfilerMethodEnum * This, /* [in] */ ULONG celt, /* [length_is][size_is][out] */ COR_PRF_METHOD elements[ ], /* [out] */ ULONG *pceltFetched); - + END_INTERFACE } ICorProfilerMethodEnumVtbl; @@ -18334,35 +19233,35 @@ EXTERN_C const IID IID_ICorProfilerMethodEnum; CONST_VTBL struct ICorProfilerMethodEnumVtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ICorProfilerMethodEnum_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ICorProfilerMethodEnum_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ICorProfilerMethodEnum_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ICorProfilerMethodEnum_Skip(This,celt) \ - ( (This)->lpVtbl -> Skip(This,celt) ) + ( (This)->lpVtbl -> Skip(This,celt) ) #define ICorProfilerMethodEnum_Reset(This) \ - ( (This)->lpVtbl -> Reset(This) ) + ( (This)->lpVtbl -> Reset(This) ) #define ICorProfilerMethodEnum_Clone(This,ppEnum) \ - ( (This)->lpVtbl -> Clone(This,ppEnum) ) + ( (This)->lpVtbl -> Clone(This,ppEnum) ) #define ICorProfilerMethodEnum_GetCount(This,pcelt) \ - ( (This)->lpVtbl -> GetCount(This,pcelt) ) + ( (This)->lpVtbl -> GetCount(This,pcelt) ) #define ICorProfilerMethodEnum_Next(This,celt,elements,pceltFetched) \ - ( (This)->lpVtbl -> Next(This,celt,elements,pceltFetched) ) + ( (This)->lpVtbl -> Next(This,celt,elements,pceltFetched) ) #endif /* COBJMACROS */ @@ -18379,75 +19278,75 @@ EXTERN_C const IID IID_ICorProfilerMethodEnum; #define __ICorProfilerThreadEnum_INTERFACE_DEFINED__ /* interface ICorProfilerThreadEnum */ -/* [local][unique][uuid][object] */ +/* [local][unique][uuid][object] */ EXTERN_C const IID IID_ICorProfilerThreadEnum; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("571194f7-25ed-419f-aa8b-7016b3159701") ICorProfilerThreadEnum : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE Skip( + virtual HRESULT STDMETHODCALLTYPE Skip( /* [in] */ ULONG celt) = 0; - + virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE Clone( + + virtual HRESULT STDMETHODCALLTYPE Clone( /* [out] */ ICorProfilerThreadEnum **ppEnum) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCount( + + virtual HRESULT STDMETHODCALLTYPE GetCount( /* [out] */ ULONG *pcelt) = 0; - - virtual HRESULT STDMETHODCALLTYPE Next( + + virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ ULONG celt, /* [length_is][size_is][out] */ ThreadID ids[ ], /* [out] */ ULONG *pceltFetched) = 0; - + }; - - + + #else /* C style interface */ typedef struct ICorProfilerThreadEnumVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorProfilerThreadEnum * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorProfilerThreadEnum * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorProfilerThreadEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Skip )( + + HRESULT ( STDMETHODCALLTYPE *Skip )( ICorProfilerThreadEnum * This, /* [in] */ ULONG celt); - - HRESULT ( STDMETHODCALLTYPE *Reset )( + + HRESULT ( STDMETHODCALLTYPE *Reset )( ICorProfilerThreadEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Clone )( + + HRESULT ( STDMETHODCALLTYPE *Clone )( ICorProfilerThreadEnum * This, /* [out] */ ICorProfilerThreadEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetCount )( + + HRESULT ( STDMETHODCALLTYPE *GetCount )( ICorProfilerThreadEnum * This, /* [out] */ ULONG *pcelt); - - HRESULT ( STDMETHODCALLTYPE *Next )( + + HRESULT ( STDMETHODCALLTYPE *Next )( ICorProfilerThreadEnum * This, /* [in] */ ULONG celt, /* [length_is][size_is][out] */ ThreadID ids[ ], /* [out] */ ULONG *pceltFetched); - + END_INTERFACE } ICorProfilerThreadEnumVtbl; @@ -18456,35 +19355,35 @@ EXTERN_C const IID IID_ICorProfilerThreadEnum; CONST_VTBL struct ICorProfilerThreadEnumVtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ICorProfilerThreadEnum_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ICorProfilerThreadEnum_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ICorProfilerThreadEnum_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ICorProfilerThreadEnum_Skip(This,celt) \ - ( (This)->lpVtbl -> Skip(This,celt) ) + ( (This)->lpVtbl -> Skip(This,celt) ) #define ICorProfilerThreadEnum_Reset(This) \ - ( (This)->lpVtbl -> Reset(This) ) + ( (This)->lpVtbl -> Reset(This) ) #define ICorProfilerThreadEnum_Clone(This,ppEnum) \ - ( (This)->lpVtbl -> Clone(This,ppEnum) ) + ( (This)->lpVtbl -> Clone(This,ppEnum) ) #define ICorProfilerThreadEnum_GetCount(This,pcelt) \ - ( (This)->lpVtbl -> GetCount(This,pcelt) ) + ( (This)->lpVtbl -> GetCount(This,pcelt) ) #define ICorProfilerThreadEnum_Next(This,celt,ids,pceltFetched) \ - ( (This)->lpVtbl -> Next(This,celt,ids,pceltFetched) ) + ( (This)->lpVtbl -> Next(This,celt,ids,pceltFetched) ) #endif /* COBJMACROS */ @@ -18501,45 +19400,45 @@ EXTERN_C const IID IID_ICorProfilerThreadEnum; #define __ICorProfilerAssemblyReferenceProvider_INTERFACE_DEFINED__ /* interface ICorProfilerAssemblyReferenceProvider */ -/* [local][unique][uuid][object] */ +/* [local][unique][uuid][object] */ EXTERN_C const IID IID_ICorProfilerAssemblyReferenceProvider; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("66A78C24-2EEF-4F65-B45F-DD1D8038BF3C") ICorProfilerAssemblyReferenceProvider : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE AddAssemblyReference( + virtual HRESULT STDMETHODCALLTYPE AddAssemblyReference( const COR_PRF_ASSEMBLY_REFERENCE_INFO *pAssemblyRefInfo) = 0; - + }; - - + + #else /* C style interface */ typedef struct ICorProfilerAssemblyReferenceProviderVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ICorProfilerAssemblyReferenceProvider * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ICorProfilerAssemblyReferenceProvider * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ICorProfilerAssemblyReferenceProvider * This); - - HRESULT ( STDMETHODCALLTYPE *AddAssemblyReference )( + + HRESULT ( STDMETHODCALLTYPE *AddAssemblyReference )( ICorProfilerAssemblyReferenceProvider * This, const COR_PRF_ASSEMBLY_REFERENCE_INFO *pAssemblyRefInfo); - + END_INTERFACE } ICorProfilerAssemblyReferenceProviderVtbl; @@ -18548,23 +19447,23 @@ EXTERN_C const IID IID_ICorProfilerAssemblyReferenceProvider; CONST_VTBL struct ICorProfilerAssemblyReferenceProviderVtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ICorProfilerAssemblyReferenceProvider_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ICorProfilerAssemblyReferenceProvider_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ICorProfilerAssemblyReferenceProvider_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ICorProfilerAssemblyReferenceProvider_AddAssemblyReference(This,pAssemblyRefInfo) \ - ( (This)->lpVtbl -> AddAssemblyReference(This,pAssemblyRefInfo) ) + ( (This)->lpVtbl -> AddAssemblyReference(This,pAssemblyRefInfo) ) #endif /* COBJMACROS */ diff --git a/src/coreclr/src/pal/prebuilt/inc/corpub.h b/src/coreclr/src/pal/prebuilt/inc/corpub.h index 94c01c660aec..bc1ef7630802 100644 --- a/src/coreclr/src/pal/prebuilt/inc/corpub.h +++ b/src/coreclr/src/pal/prebuilt/inc/corpub.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/pal/prebuilt/inc/corsym.h b/src/coreclr/src/pal/prebuilt/inc/corsym.h index 46025395e643..9b739091771e 100644 --- a/src/coreclr/src/pal/prebuilt/inc/corsym.h +++ b/src/coreclr/src/pal/prebuilt/inc/corsym.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/pal/prebuilt/inc/fusion.h b/src/coreclr/src/pal/prebuilt/inc/fusion.h index b8d17a36689d..3129a9b1bc44 100644 --- a/src/coreclr/src/pal/prebuilt/inc/fusion.h +++ b/src/coreclr/src/pal/prebuilt/inc/fusion.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. @@ -162,12 +161,6 @@ EXTERN_C const IID IID_IAssemblyName; /* [out] */ LPVOID pvProperty, /* [out][in] */ LPDWORD pcbProperty) = 0; - virtual HRESULT STDMETHODCALLTYPE GetName( - /* [annotation][out][in] */ - _Inout_ LPDWORD lpcwBuffer, - /* [annotation][out] */ - _Out_writes_opt_(*lpcwBuffer) WCHAR *pwzName) = 0; - }; @@ -201,13 +194,6 @@ EXTERN_C const IID IID_IAssemblyName; /* [out] */ LPVOID pvProperty, /* [out][in] */ LPDWORD pcbProperty); - HRESULT ( STDMETHODCALLTYPE *GetName )( - IAssemblyName * This, - /* [annotation][out][in] */ - _Inout_ LPDWORD lpcwBuffer, - /* [annotation][out] */ - _Out_writes_opt_(*lpcwBuffer) WCHAR *pwzName); - END_INTERFACE } IAssemblyNameVtbl; @@ -237,9 +223,6 @@ EXTERN_C const IID IID_IAssemblyName; #define IAssemblyName_GetProperty(This,PropertyId,pvProperty,pcbProperty) \ ( (This)->lpVtbl -> GetProperty(This,PropertyId,pvProperty,pcbProperty) ) -#define IAssemblyName_GetName(This,lpcwBuffer,pwzName) \ - ( (This)->lpVtbl -> GetName(This,lpcwBuffer,pwzName) ) - #endif /* COBJMACROS */ diff --git a/src/coreclr/src/pal/prebuilt/inc/fxver.h b/src/coreclr/src/pal/prebuilt/inc/fxver.h index 7e2a3224b888..7297587490de 100644 --- a/src/coreclr/src/pal/prebuilt/inc/fxver.h +++ b/src/coreclr/src/pal/prebuilt/inc/fxver.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include diff --git a/src/coreclr/src/pal/prebuilt/inc/fxver.rc b/src/coreclr/src/pal/prebuilt/inc/fxver.rc index 8f8637ffc9e8..ce3aa4e98e5b 100644 --- a/src/coreclr/src/pal/prebuilt/inc/fxver.rc +++ b/src/coreclr/src/pal/prebuilt/inc/fxver.rc @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifdef _WIN32 #include <_version.h> diff --git a/src/coreclr/src/pal/prebuilt/inc/mscoree.h b/src/coreclr/src/pal/prebuilt/inc/mscoree.h index 4f5c5b819772..928a7fad88be 100644 --- a/src/coreclr/src/pal/prebuilt/inc/mscoree.h +++ b/src/coreclr/src/pal/prebuilt/inc/mscoree.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* this ALWAYS GENERATED file contains the definitions for the interfaces */ diff --git a/src/coreclr/src/pal/prebuilt/inc/mscorsvc.h b/src/coreclr/src/pal/prebuilt/inc/mscorsvc.h index c51d8bdc9ac6..a00db395eca8 100644 --- a/src/coreclr/src/pal/prebuilt/inc/mscorsvc.h +++ b/src/coreclr/src/pal/prebuilt/inc/mscorsvc.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/pal/prebuilt/inc/sospriv.h b/src/coreclr/src/pal/prebuilt/inc/sospriv.h index d06852e24184..d76eac0ead66 100644 --- a/src/coreclr/src/pal/prebuilt/inc/sospriv.h +++ b/src/coreclr/src/pal/prebuilt/inc/sospriv.h @@ -2548,6 +2548,9 @@ EXTERN_C const IID IID_ISOSDacInterface8; CLRDATA_ADDRESS *pFinalizationFillPointers, unsigned int *pNeeded) = 0; + virtual HRESULT STDMETHODCALLTYPE GetAssemblyLoadContext( + CLRDATA_ADDRESS methodTable, + CLRDATA_ADDRESS* assemblyLoadContext) = 0; }; @@ -2599,6 +2602,11 @@ EXTERN_C const IID IID_ISOSDacInterface8; CLRDATA_ADDRESS *pFinalizationFillPointers, unsigned int *pNeeded); + HRESULT ( STDMETHODCALLTYPE *GetAssemblyLoadContext )( + ISOSDacInterface8 * This, + CLRDATA_ADDRESS methodTable, + CLRDATA_ADDRESS *assemblyLoadContext); + END_INTERFACE } ISOSDacInterface8Vtbl; @@ -2608,7 +2616,6 @@ EXTERN_C const IID IID_ISOSDacInterface8; }; - #ifdef COBJMACROS @@ -2637,6 +2644,9 @@ EXTERN_C const IID IID_ISOSDacInterface8; #define ISOSDacInterface8_GetFinalizationFillPointersSvr(This,heapAddr,cFillPointers,pFinalizationFillPointers,pNeeded) \ ( (This)->lpVtbl -> GetFinalizationFillPointersSvr(This,heapAddr,cFillPointers,pFinalizationFillPointers,pNeeded) ) +#define ISOSDacInterface8_GetAssemblyLoadContext(This,methodTable,assemblyLoadContext) \ + ( (This)->lpVtbl -> GetAssemblyLoadContext(This,methodTable,assemblyLoadContext) ) + #endif /* COBJMACROS */ diff --git a/src/coreclr/src/pal/prebuilt/inc/xclrdata.h b/src/coreclr/src/pal/prebuilt/inc/xclrdata.h index ea97929a14d0..dbee62b9b122 100644 --- a/src/coreclr/src/pal/prebuilt/inc/xclrdata.h +++ b/src/coreclr/src/pal/prebuilt/inc/xclrdata.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/pal/src/CMakeLists.txt b/src/coreclr/src/pal/src/CMakeLists.txt index 1a3936383228..89c3ed934454 100644 --- a/src/coreclr/src/pal/src/CMakeLists.txt +++ b/src/coreclr/src/pal/src/CMakeLists.txt @@ -17,36 +17,9 @@ if(NOT CLR_CMAKE_USE_SYSTEM_LIBUNWIND) add_subdirectory(libunwind) elseif(NOT CLR_CMAKE_TARGET_OSX) - if(CLR_CMAKE_HOST_ARCH_ARM) - find_library(UNWIND_ARCH NAMES unwind-arm) - endif() - - if(CLR_CMAKE_HOST_ARCH_ARM64) - find_library(UNWIND_ARCH NAMES unwind-aarch64) - endif() - - if(CLR_CMAKE_HOST_ARCH_AMD64) - find_library(UNWIND_ARCH NAMES unwind-x86_64) - endif() - - if(NOT UNWIND_ARCH STREQUAL UNWIND_ARCH-NOTFOUND) - set(UNWIND_LIBS ${UNWIND_ARCH}) - endif() - - find_library(UNWIND_GENERIC NAMES unwind-generic) - - if(NOT UNWIND_GENERIC STREQUAL UNWIND_GENERIC-NOTFOUND) - set(UNWIND_LIBS ${UNWIND_LIBS} ${UNWIND_GENERIC}) - endif() - - find_library(UNWIND NAMES unwind) - - if(UNWIND STREQUAL UNWIND-NOTFOUND) - message(FATAL_ERROR "Cannot find libunwind. Try installing libunwind8-dev or libunwind-devel.") - endif() - - set(UNWIND_LIBS ${UNWIND_LIBS} ${UNWIND}) + find_unwind_libs(UNWIND_LIBS) endif(NOT CLR_CMAKE_USE_SYSTEM_LIBUNWIND) + include(configure.cmake) project(coreclrpal) @@ -261,7 +234,7 @@ add_library(coreclrpal # if(CLR_CMAKE_TARGET_LINUX) add_library(tracepointprovider - STATIC + OBJECT misc/tracepointprovider.cpp ) endif(CLR_CMAKE_TARGET_LINUX) diff --git a/src/coreclr/src/pal/src/arch/amd64/activationhandlerwrapper.S b/src/coreclr/src/pal/src/arch/amd64/activationhandlerwrapper.S index 0ac73fceb6be..2e7f931facf2 100644 --- a/src/coreclr/src/pal/src/arch/amd64/activationhandlerwrapper.S +++ b/src/coreclr/src/pal/src/arch/amd64/activationhandlerwrapper.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. .intel_syntax noprefix #include "unixasmmacros.inc" diff --git a/src/coreclr/src/pal/src/arch/amd64/asmconstants.h b/src/coreclr/src/pal/src/arch/amd64/asmconstants.h index 71b584a51cc1..1a057225bcc5 100644 --- a/src/coreclr/src/pal/src/arch/amd64/asmconstants.h +++ b/src/coreclr/src/pal/src/arch/amd64/asmconstants.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifdef HOST_64BIT diff --git a/src/coreclr/src/pal/src/arch/amd64/callsignalhandlerwrapper.S b/src/coreclr/src/pal/src/arch/amd64/callsignalhandlerwrapper.S index 8260591c307b..45d0aee5ddb0 100644 --- a/src/coreclr/src/pal/src/arch/amd64/callsignalhandlerwrapper.S +++ b/src/coreclr/src/pal/src/arch/amd64/callsignalhandlerwrapper.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. .intel_syntax noprefix #include "unixasmmacros.inc" diff --git a/src/coreclr/src/pal/src/arch/amd64/context.S b/src/coreclr/src/pal/src/arch/amd64/context.S index f8a2dca89c11..babbf2dcd299 100644 --- a/src/coreclr/src/pal/src/arch/amd64/context.S +++ b/src/coreclr/src/pal/src/arch/amd64/context.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #if defined(_DEBUG) .text diff --git a/src/coreclr/src/pal/src/arch/amd64/context2.S b/src/coreclr/src/pal/src/arch/amd64/context2.S index b2a23917de81..c8688dd63c09 100644 --- a/src/coreclr/src/pal/src/arch/amd64/context2.S +++ b/src/coreclr/src/pal/src/arch/amd64/context2.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // Implementation of _CONTEXT_CaptureContext for the Intel x86 platform. // This function is processor dependent. It is used by exception handling, diff --git a/src/coreclr/src/pal/src/arch/amd64/debugbreak.S b/src/coreclr/src/pal/src/arch/amd64/debugbreak.S index 3065e4064c10..84f7f3ea6736 100644 --- a/src/coreclr/src/pal/src/arch/amd64/debugbreak.S +++ b/src/coreclr/src/pal/src/arch/amd64/debugbreak.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. .intel_syntax noprefix #include "unixasmmacros.inc" diff --git a/src/coreclr/src/pal/src/arch/amd64/dispatchexceptionwrapper.S b/src/coreclr/src/pal/src/arch/amd64/dispatchexceptionwrapper.S index e9baaecce56e..919adef1f65c 100644 --- a/src/coreclr/src/pal/src/arch/amd64/dispatchexceptionwrapper.S +++ b/src/coreclr/src/pal/src/arch/amd64/dispatchexceptionwrapper.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ==++== // diff --git a/src/coreclr/src/pal/src/arch/amd64/exceptionhelper.S b/src/coreclr/src/pal/src/arch/amd64/exceptionhelper.S index 207258341046..360b56e87c87 100644 --- a/src/coreclr/src/pal/src/arch/amd64/exceptionhelper.S +++ b/src/coreclr/src/pal/src/arch/amd64/exceptionhelper.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. .intel_syntax noprefix #include "unixasmmacros.inc" diff --git a/src/coreclr/src/pal/src/arch/amd64/processor.cpp b/src/coreclr/src/pal/src/arch/amd64/processor.cpp index a52011174972..1c9e026cfed9 100644 --- a/src/coreclr/src/pal/src/arch/amd64/processor.cpp +++ b/src/coreclr/src/pal/src/arch/amd64/processor.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/arch/amd64/signalhandlerhelper.cpp b/src/coreclr/src/pal/src/arch/amd64/signalhandlerhelper.cpp index 61eba90008d9..d1db9295a57a 100644 --- a/src/coreclr/src/pal/src/arch/amd64/signalhandlerhelper.cpp +++ b/src/coreclr/src/pal/src/arch/amd64/signalhandlerhelper.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "pal/dbgmsg.h" SET_DEFAULT_DEBUG_CHANNEL(EXCEPT); // some headers have code with asserts, so do this first diff --git a/src/coreclr/src/pal/src/arch/arm/asmconstants.h b/src/coreclr/src/pal/src/arch/arm/asmconstants.h index ae4b01b8dcc2..0437610d92df 100644 --- a/src/coreclr/src/pal/src/arch/arm/asmconstants.h +++ b/src/coreclr/src/pal/src/arch/arm/asmconstants.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __PAL_ARM_ASMCONSTANTS_H__ #define __PAL_ARM_ASMCONSTANTS_H__ diff --git a/src/coreclr/src/pal/src/arch/arm/callsignalhandlerwrapper.S b/src/coreclr/src/pal/src/arch/arm/callsignalhandlerwrapper.S index b9398d6d632c..4179f61e1627 100644 --- a/src/coreclr/src/pal/src/arch/arm/callsignalhandlerwrapper.S +++ b/src/coreclr/src/pal/src/arch/arm/callsignalhandlerwrapper.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "unixasmmacros.inc" #include "asmconstants.h" diff --git a/src/coreclr/src/pal/src/arch/arm/context2.S b/src/coreclr/src/pal/src/arch/arm/context2.S index 6ea8aba6b6f8..1cd7684a953e 100644 --- a/src/coreclr/src/pal/src/arch/arm/context2.S +++ b/src/coreclr/src/pal/src/arch/arm/context2.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // Implementation of _CONTEXT_CaptureContext for the ARM platform. // This function is processor dependent. It is used by exception handling, diff --git a/src/coreclr/src/pal/src/arch/arm/debugbreak.S b/src/coreclr/src/pal/src/arch/arm/debugbreak.S index 863d7cf40b58..dd8a9348352d 100644 --- a/src/coreclr/src/pal/src/arch/arm/debugbreak.S +++ b/src/coreclr/src/pal/src/arch/arm/debugbreak.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "unixasmmacros.inc" diff --git a/src/coreclr/src/pal/src/arch/arm/exceptionhelper.S b/src/coreclr/src/pal/src/arch/arm/exceptionhelper.S index 1234305c0997..f733aad61337 100644 --- a/src/coreclr/src/pal/src/arch/arm/exceptionhelper.S +++ b/src/coreclr/src/pal/src/arch/arm/exceptionhelper.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "unixasmmacros.inc" #include "asmconstants.h" diff --git a/src/coreclr/src/pal/src/arch/arm/processor.cpp b/src/coreclr/src/pal/src/arch/arm/processor.cpp index 7993212556c1..7048a5b4b4db 100644 --- a/src/coreclr/src/pal/src/arch/arm/processor.cpp +++ b/src/coreclr/src/pal/src/arch/arm/processor.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/arch/arm/signalhandlerhelper.cpp b/src/coreclr/src/pal/src/arch/arm/signalhandlerhelper.cpp index 9c6dda1f2fb7..1eabd968c828 100644 --- a/src/coreclr/src/pal/src/arch/arm/signalhandlerhelper.cpp +++ b/src/coreclr/src/pal/src/arch/arm/signalhandlerhelper.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "pal/dbgmsg.h" SET_DEFAULT_DEBUG_CHANNEL(EXCEPT); // some headers have code with asserts, so do this first diff --git a/src/coreclr/src/pal/src/arch/arm64/asmconstants.h b/src/coreclr/src/pal/src/arch/arm64/asmconstants.h index 08502ed3b353..ad7d09e6efbb 100644 --- a/src/coreclr/src/pal/src/arch/arm64/asmconstants.h +++ b/src/coreclr/src/pal/src/arch/arm64/asmconstants.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __PAL_ARM64_ASMCONSTANTS_H__ #define __PAL_ARM64_ASMCONSTANTS_H__ diff --git a/src/coreclr/src/pal/src/arch/arm64/callsignalhandlerwrapper.S b/src/coreclr/src/pal/src/arch/arm64/callsignalhandlerwrapper.S index a74932e8e6b0..67a88fbb2e6f 100644 --- a/src/coreclr/src/pal/src/arch/arm64/callsignalhandlerwrapper.S +++ b/src/coreclr/src/pal/src/arch/arm64/callsignalhandlerwrapper.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "unixasmmacros.inc" #include "asmconstants.h" diff --git a/src/coreclr/src/pal/src/arch/arm64/context2.S b/src/coreclr/src/pal/src/arch/arm64/context2.S index 2c8e4f538d41..f7d6d3fe059d 100644 --- a/src/coreclr/src/pal/src/arch/arm64/context2.S +++ b/src/coreclr/src/pal/src/arch/arm64/context2.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // Implementation of _CONTEXT_CaptureContext for the ARM platform. // This function is processor dependent. It is used by exception handling, diff --git a/src/coreclr/src/pal/src/arch/arm64/debugbreak.S b/src/coreclr/src/pal/src/arch/arm64/debugbreak.S index 0dc5bb6bd35b..27f93977396d 100644 --- a/src/coreclr/src/pal/src/arch/arm64/debugbreak.S +++ b/src/coreclr/src/pal/src/arch/arm64/debugbreak.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "unixasmmacros.inc" diff --git a/src/coreclr/src/pal/src/arch/arm64/exceptionhelper.S b/src/coreclr/src/pal/src/arch/arm64/exceptionhelper.S index 93c9af1d0680..c4cf523dcd19 100644 --- a/src/coreclr/src/pal/src/arch/arm64/exceptionhelper.S +++ b/src/coreclr/src/pal/src/arch/arm64/exceptionhelper.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "unixasmmacros.inc" #include "asmconstants.h" diff --git a/src/coreclr/src/pal/src/arch/arm64/processor.cpp b/src/coreclr/src/pal/src/arch/arm64/processor.cpp index 4c4721016586..ab4b84febd91 100644 --- a/src/coreclr/src/pal/src/arch/arm64/processor.cpp +++ b/src/coreclr/src/pal/src/arch/arm64/processor.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/arch/arm64/signalhandlerhelper.cpp b/src/coreclr/src/pal/src/arch/arm64/signalhandlerhelper.cpp index 524bd11b364f..9bada1413861 100644 --- a/src/coreclr/src/pal/src/arch/arm64/signalhandlerhelper.cpp +++ b/src/coreclr/src/pal/src/arch/arm64/signalhandlerhelper.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "pal/dbgmsg.h" SET_DEFAULT_DEBUG_CHANNEL(EXCEPT); // some headers have code with asserts, so do this first diff --git a/src/coreclr/src/pal/src/arch/i386/asmconstants.h b/src/coreclr/src/pal/src/arch/i386/asmconstants.h index ff763ef16b2c..2fd7e193af2d 100644 --- a/src/coreclr/src/pal/src/arch/i386/asmconstants.h +++ b/src/coreclr/src/pal/src/arch/i386/asmconstants.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #define CONTEXT_ContextFlags 0 #define CONTEXT_FLOATING_POINT 8 diff --git a/src/coreclr/src/pal/src/arch/i386/callsignalhandlerwrapper.S b/src/coreclr/src/pal/src/arch/i386/callsignalhandlerwrapper.S index 26f06d988626..7786fe49c152 100644 --- a/src/coreclr/src/pal/src/arch/i386/callsignalhandlerwrapper.S +++ b/src/coreclr/src/pal/src/arch/i386/callsignalhandlerwrapper.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. .intel_syntax noprefix #include "unixasmmacros.inc" diff --git a/src/coreclr/src/pal/src/arch/i386/context2.S b/src/coreclr/src/pal/src/arch/i386/context2.S index 8c5db203082f..bfcc25b09f40 100644 --- a/src/coreclr/src/pal/src/arch/i386/context2.S +++ b/src/coreclr/src/pal/src/arch/i386/context2.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. .intel_syntax noprefix #include "unixasmmacros.inc" diff --git a/src/coreclr/src/pal/src/arch/i386/debugbreak.S b/src/coreclr/src/pal/src/arch/i386/debugbreak.S index 3065e4064c10..84f7f3ea6736 100644 --- a/src/coreclr/src/pal/src/arch/i386/debugbreak.S +++ b/src/coreclr/src/pal/src/arch/i386/debugbreak.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. .intel_syntax noprefix #include "unixasmmacros.inc" diff --git a/src/coreclr/src/pal/src/arch/i386/exceptionhelper.S b/src/coreclr/src/pal/src/arch/i386/exceptionhelper.S index 609efcff7a5b..c41007e0b30a 100644 --- a/src/coreclr/src/pal/src/arch/i386/exceptionhelper.S +++ b/src/coreclr/src/pal/src/arch/i386/exceptionhelper.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. .intel_syntax noprefix #include "unixasmmacros.inc" diff --git a/src/coreclr/src/pal/src/arch/i386/processor.cpp b/src/coreclr/src/pal/src/arch/i386/processor.cpp index e1c8de1943af..7f60b75cfe5e 100644 --- a/src/coreclr/src/pal/src/arch/i386/processor.cpp +++ b/src/coreclr/src/pal/src/arch/i386/processor.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/arch/i386/signalhandlerhelper.cpp b/src/coreclr/src/pal/src/arch/i386/signalhandlerhelper.cpp index 16e527a1ebcb..1174d284fd49 100644 --- a/src/coreclr/src/pal/src/arch/i386/signalhandlerhelper.cpp +++ b/src/coreclr/src/pal/src/arch/i386/signalhandlerhelper.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "pal/dbgmsg.h" SET_DEFAULT_DEBUG_CHANNEL(EXCEPT); // some headers have code with asserts, so do this first diff --git a/src/coreclr/src/pal/src/build_tools/mdtool_dummy b/src/coreclr/src/pal/src/build_tools/mdtool_dummy index 1005a3496f24..1b88ee66c386 100644 --- a/src/coreclr/src/pal/src/build_tools/mdtool_dummy +++ b/src/coreclr/src/pal/src/build_tools/mdtool_dummy @@ -2,6 +2,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. echo mdtool_dummy : not generating any dependencies diff --git a/src/coreclr/src/pal/src/build_tools/mdtool_gcc.in b/src/coreclr/src/pal/src/build_tools/mdtool_gcc.in index 233b58aa74ce..072a57369427 100644 --- a/src/coreclr/src/pal/src/build_tools/mdtool_gcc.in +++ b/src/coreclr/src/pal/src/build_tools/mdtool_gcc.in @@ -2,7 +2,6 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. # # mdtool_gcc # diff --git a/src/coreclr/src/pal/src/cruntime/file.cpp b/src/coreclr/src/pal/src/cruntime/file.cpp index e481d43f6b49..eb2512c68e0e 100644 --- a/src/coreclr/src/pal/src/cruntime/file.cpp +++ b/src/coreclr/src/pal/src/cruntime/file.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/cruntime/filecrt.cpp b/src/coreclr/src/pal/src/cruntime/filecrt.cpp index 3875a08e08e2..6a14a9cd6f56 100644 --- a/src/coreclr/src/pal/src/cruntime/filecrt.cpp +++ b/src/coreclr/src/pal/src/cruntime/filecrt.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/cruntime/malloc.cpp b/src/coreclr/src/pal/src/cruntime/malloc.cpp index 4f0979d39ba7..4351c47e31a4 100644 --- a/src/coreclr/src/pal/src/cruntime/malloc.cpp +++ b/src/coreclr/src/pal/src/cruntime/malloc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ @@ -113,4 +112,4 @@ PAL__strdup( ) { return strdup(c_szStr); -} \ No newline at end of file +} diff --git a/src/coreclr/src/pal/src/cruntime/math.cpp b/src/coreclr/src/pal/src/cruntime/math.cpp index aa6c0244c4c3..a80eec445868 100644 --- a/src/coreclr/src/pal/src/cruntime/math.cpp +++ b/src/coreclr/src/pal/src/cruntime/math.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/cruntime/mbstring.cpp b/src/coreclr/src/pal/src/cruntime/mbstring.cpp index e929b9aa05db..12d0cb067cfb 100644 --- a/src/coreclr/src/pal/src/cruntime/mbstring.cpp +++ b/src/coreclr/src/pal/src/cruntime/mbstring.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/cruntime/misc.cpp b/src/coreclr/src/pal/src/cruntime/misc.cpp index 2a569a6b7691..4ba36c60a2ad 100644 --- a/src/coreclr/src/pal/src/cruntime/misc.cpp +++ b/src/coreclr/src/pal/src/cruntime/misc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/cruntime/path.cpp b/src/coreclr/src/pal/src/cruntime/path.cpp index add20b3299d4..c25636771bc6 100644 --- a/src/coreclr/src/pal/src/cruntime/path.cpp +++ b/src/coreclr/src/pal/src/cruntime/path.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/cruntime/printf.cpp b/src/coreclr/src/pal/src/cruntime/printf.cpp index f0d5b1c1b64a..5144984c1b89 100644 --- a/src/coreclr/src/pal/src/cruntime/printf.cpp +++ b/src/coreclr/src/pal/src/cruntime/printf.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/cruntime/printfcpp.cpp b/src/coreclr/src/pal/src/cruntime/printfcpp.cpp index 037c3e991008..a71814e0dd4e 100644 --- a/src/coreclr/src/pal/src/cruntime/printfcpp.cpp +++ b/src/coreclr/src/pal/src/cruntime/printfcpp.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/cruntime/silent_printf.cpp b/src/coreclr/src/pal/src/cruntime/silent_printf.cpp index 9a34a396bc6e..bc9c718fe3ae 100644 --- a/src/coreclr/src/pal/src/cruntime/silent_printf.cpp +++ b/src/coreclr/src/pal/src/cruntime/silent_printf.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/cruntime/string.cpp b/src/coreclr/src/pal/src/cruntime/string.cpp index 04c1918e9dcd..b096f80077a9 100644 --- a/src/coreclr/src/pal/src/cruntime/string.cpp +++ b/src/coreclr/src/pal/src/cruntime/string.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/cruntime/stringtls.cpp b/src/coreclr/src/pal/src/cruntime/stringtls.cpp index 85f11582e7d9..a080e1dd84fd 100644 --- a/src/coreclr/src/pal/src/cruntime/stringtls.cpp +++ b/src/coreclr/src/pal/src/cruntime/stringtls.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/cruntime/thread.cpp b/src/coreclr/src/pal/src/cruntime/thread.cpp index b4a249a723a0..883c5d1b0019 100644 --- a/src/coreclr/src/pal/src/cruntime/thread.cpp +++ b/src/coreclr/src/pal/src/cruntime/thread.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/cruntime/wchar.cpp b/src/coreclr/src/pal/src/cruntime/wchar.cpp index 01e05cec3fb6..43023bb50075 100644 --- a/src/coreclr/src/pal/src/cruntime/wchar.cpp +++ b/src/coreclr/src/pal/src/cruntime/wchar.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/cruntime/wchartls.cpp b/src/coreclr/src/pal/src/cruntime/wchartls.cpp index ea9c0a5ba3aa..35b73359889a 100644 --- a/src/coreclr/src/pal/src/cruntime/wchartls.cpp +++ b/src/coreclr/src/pal/src/cruntime/wchartls.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/debug/debug.cpp b/src/coreclr/src/pal/src/debug/debug.cpp index 72b517326290..b58b2fe587e1 100644 --- a/src/coreclr/src/pal/src/debug/debug.cpp +++ b/src/coreclr/src/pal/src/debug/debug.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/eventprovider/lttngprovider/eventproviderhelpers.cpp b/src/coreclr/src/pal/src/eventprovider/lttngprovider/eventproviderhelpers.cpp index b9d438c9a13d..e5bcb36088f1 100644 --- a/src/coreclr/src/pal/src/eventprovider/lttngprovider/eventproviderhelpers.cpp +++ b/src/coreclr/src/pal/src/eventprovider/lttngprovider/eventproviderhelpers.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "palrt.h" #include "pal.h" diff --git a/src/coreclr/src/pal/src/exception/machexception.cpp b/src/coreclr/src/pal/src/exception/machexception.cpp index 01130e80978c..de50fd6be99d 100644 --- a/src/coreclr/src/pal/src/exception/machexception.cpp +++ b/src/coreclr/src/pal/src/exception/machexception.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/exception/machexception.h b/src/coreclr/src/pal/src/exception/machexception.h index 98512ff6d5fa..7099c9ba3516 100644 --- a/src/coreclr/src/pal/src/exception/machexception.h +++ b/src/coreclr/src/pal/src/exception/machexception.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/exception/machmessage.cpp b/src/coreclr/src/pal/src/exception/machmessage.cpp index aa83687e1dd1..0c0021855395 100644 --- a/src/coreclr/src/pal/src/exception/machmessage.cpp +++ b/src/coreclr/src/pal/src/exception/machmessage.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/exception/machmessage.h b/src/coreclr/src/pal/src/exception/machmessage.h index 91d4c976561f..bf544d66f98c 100644 --- a/src/coreclr/src/pal/src/exception/machmessage.h +++ b/src/coreclr/src/pal/src/exception/machmessage.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/exception/remote-unwind.cpp b/src/coreclr/src/pal/src/exception/remote-unwind.cpp index 26a9194f6de4..7adfb57803bc 100644 --- a/src/coreclr/src/pal/src/exception/remote-unwind.cpp +++ b/src/coreclr/src/pal/src/exception/remote-unwind.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/exception/seh-unwind.cpp b/src/coreclr/src/pal/src/exception/seh-unwind.cpp index 42204786394e..524d7252bbff 100644 --- a/src/coreclr/src/pal/src/exception/seh-unwind.cpp +++ b/src/coreclr/src/pal/src/exception/seh-unwind.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ @@ -318,7 +317,18 @@ BOOL PAL_VirtualUnwind(CONTEXT *context, KNONVOLATILE_CONTEXT_POINTERS *contextP } #if !UNWIND_CONTEXT_IS_UCONTEXT_T +// The unw_getcontext is defined in the libunwind headers for ARM as inline assembly with +// stmia instruction storing SP and PC, which clang complains about as deprecated. +// However, it is required for atomic restoration of the context, so disable that warning. +#if defined(__llvm__) && defined(TARGET_ARM) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Winline-asm" +#endif st = unw_getcontext(&unwContext); +#if defined(__llvm__) && defined(TARGET_ARM) +#pragma clang diagnostic pop +#endif + if (st < 0) { return FALSE; diff --git a/src/coreclr/src/pal/src/exception/seh.cpp b/src/coreclr/src/pal/src/exception/seh.cpp index ee022b45fa7c..d37eb6fb5c80 100644 --- a/src/coreclr/src/pal/src/exception/seh.cpp +++ b/src/coreclr/src/pal/src/exception/seh.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/exception/signal.cpp b/src/coreclr/src/pal/src/exception/signal.cpp index b142bbd82f77..de2d0ad3b700 100644 --- a/src/coreclr/src/pal/src/exception/signal.cpp +++ b/src/coreclr/src/pal/src/exception/signal.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/file/directory.cpp b/src/coreclr/src/pal/src/file/directory.cpp index 4711ff7c1c63..5c4c0b2ae9ff 100644 --- a/src/coreclr/src/pal/src/file/directory.cpp +++ b/src/coreclr/src/pal/src/file/directory.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/file/file.cpp b/src/coreclr/src/pal/src/file/file.cpp index 92695fd63159..754b2d1e256e 100644 --- a/src/coreclr/src/pal/src/file/file.cpp +++ b/src/coreclr/src/pal/src/file/file.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/file/filetime.cpp b/src/coreclr/src/pal/src/file/filetime.cpp index 34e4dcc707fd..7cdde900d211 100644 --- a/src/coreclr/src/pal/src/file/filetime.cpp +++ b/src/coreclr/src/pal/src/file/filetime.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/file/find.cpp b/src/coreclr/src/pal/src/file/find.cpp index 9bbf3f210a03..8f2431abfa98 100644 --- a/src/coreclr/src/pal/src/file/find.cpp +++ b/src/coreclr/src/pal/src/file/find.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/file/path.cpp b/src/coreclr/src/pal/src/file/path.cpp index 890c4d962e5b..edc9c6c0a661 100644 --- a/src/coreclr/src/pal/src/file/path.cpp +++ b/src/coreclr/src/pal/src/file/path.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/handlemgr/handleapi.cpp b/src/coreclr/src/pal/src/handlemgr/handleapi.cpp index c88a76866383..90683bc2c308 100644 --- a/src/coreclr/src/pal/src/handlemgr/handleapi.cpp +++ b/src/coreclr/src/pal/src/handlemgr/handleapi.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/handlemgr/handlemgr.cpp b/src/coreclr/src/pal/src/handlemgr/handlemgr.cpp index 661b9d541afd..5dc198c7f5a3 100644 --- a/src/coreclr/src/pal/src/handlemgr/handlemgr.cpp +++ b/src/coreclr/src/pal/src/handlemgr/handlemgr.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/cert.hpp b/src/coreclr/src/pal/src/include/pal/cert.hpp index 609864fef67a..74bacfe39d73 100644 --- a/src/coreclr/src/pal/src/include/pal/cert.hpp +++ b/src/coreclr/src/pal/src/include/pal/cert.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/cgroup.h b/src/coreclr/src/pal/src/include/pal/cgroup.h index 3f03d91b7254..95e2438c4bfd 100644 --- a/src/coreclr/src/pal/src/include/pal/cgroup.h +++ b/src/coreclr/src/pal/src/include/pal/cgroup.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/context.h b/src/coreclr/src/pal/src/include/pal/context.h index 9313fc51653f..db0baec11191 100644 --- a/src/coreclr/src/pal/src/include/pal/context.h +++ b/src/coreclr/src/pal/src/include/pal/context.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/corunix.hpp b/src/coreclr/src/pal/src/include/pal/corunix.hpp index af6b239257a7..ce6bd079e959 100644 --- a/src/coreclr/src/pal/src/include/pal/corunix.hpp +++ b/src/coreclr/src/pal/src/include/pal/corunix.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/corunix.inl b/src/coreclr/src/pal/src/include/pal/corunix.inl index ab0ac7046219..92a4a0a5e8bc 100644 --- a/src/coreclr/src/pal/src/include/pal/corunix.inl +++ b/src/coreclr/src/pal/src/include/pal/corunix.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/critsect.h b/src/coreclr/src/pal/src/include/pal/critsect.h index aeda121fbf78..c14baf20a1e4 100644 --- a/src/coreclr/src/pal/src/include/pal/critsect.h +++ b/src/coreclr/src/pal/src/include/pal/critsect.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/cruntime.h b/src/coreclr/src/pal/src/include/pal/cruntime.h index 00c91b663536..dd19618f1bf7 100644 --- a/src/coreclr/src/pal/src/include/pal/cruntime.h +++ b/src/coreclr/src/pal/src/include/pal/cruntime.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/cs.hpp b/src/coreclr/src/pal/src/include/pal/cs.hpp index fb2172357879..5fc1d2e3253c 100644 --- a/src/coreclr/src/pal/src/include/pal/cs.hpp +++ b/src/coreclr/src/pal/src/include/pal/cs.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /////////////////////////////////////////////////////////////////////////////// // diff --git a/src/coreclr/src/pal/src/include/pal/dbgmsg.h b/src/coreclr/src/pal/src/include/pal/dbgmsg.h index f80dadac37df..712d99e4b375 100644 --- a/src/coreclr/src/pal/src/include/pal/dbgmsg.h +++ b/src/coreclr/src/pal/src/include/pal/dbgmsg.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/debug.h b/src/coreclr/src/pal/src/include/pal/debug.h index 5f8a30765458..a74a30136abd 100644 --- a/src/coreclr/src/pal/src/include/pal/debug.h +++ b/src/coreclr/src/pal/src/include/pal/debug.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/environ.h b/src/coreclr/src/pal/src/include/pal/environ.h index cfb97710df74..226279c0425b 100644 --- a/src/coreclr/src/pal/src/include/pal/environ.h +++ b/src/coreclr/src/pal/src/include/pal/environ.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/event.hpp b/src/coreclr/src/pal/src/include/pal/event.hpp index b71bd10494a3..313e7e69433e 100644 --- a/src/coreclr/src/pal/src/include/pal/event.hpp +++ b/src/coreclr/src/pal/src/include/pal/event.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/fakepoll.h b/src/coreclr/src/pal/src/include/pal/fakepoll.h index 33f71822ca65..935f9a7a6fcf 100644 --- a/src/coreclr/src/pal/src/include/pal/fakepoll.h +++ b/src/coreclr/src/pal/src/include/pal/fakepoll.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // fakepoll.h // poll using select diff --git a/src/coreclr/src/pal/src/include/pal/file.h b/src/coreclr/src/pal/src/include/pal/file.h index d6617746e9a5..d56d5df8b62a 100644 --- a/src/coreclr/src/pal/src/include/pal/file.h +++ b/src/coreclr/src/pal/src/include/pal/file.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/file.hpp b/src/coreclr/src/pal/src/include/pal/file.hpp index 308f70e4d1b7..d16a3ee19703 100644 --- a/src/coreclr/src/pal/src/include/pal/file.hpp +++ b/src/coreclr/src/pal/src/include/pal/file.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/filetime.h b/src/coreclr/src/pal/src/include/pal/filetime.h index 71a04d2484c8..5a06cb5c3063 100644 --- a/src/coreclr/src/pal/src/include/pal/filetime.h +++ b/src/coreclr/src/pal/src/include/pal/filetime.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/handleapi.hpp b/src/coreclr/src/pal/src/include/pal/handleapi.hpp index ac1c3d9d89f3..c482ad42ba26 100644 --- a/src/coreclr/src/pal/src/include/pal/handleapi.hpp +++ b/src/coreclr/src/pal/src/include/pal/handleapi.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/handlemgr.hpp b/src/coreclr/src/pal/src/include/pal/handlemgr.hpp index b1f8c1674cf6..94b40e72ce0e 100644 --- a/src/coreclr/src/pal/src/include/pal/handlemgr.hpp +++ b/src/coreclr/src/pal/src/include/pal/handlemgr.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/init.h b/src/coreclr/src/pal/src/include/pal/init.h index 4f6a2b0d28fb..9544a369d304 100644 --- a/src/coreclr/src/pal/src/include/pal/init.h +++ b/src/coreclr/src/pal/src/include/pal/init.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/list.h b/src/coreclr/src/pal/src/include/pal/list.h index cd78c0f03ae5..5357e12f7a6b 100644 --- a/src/coreclr/src/pal/src/include/pal/list.h +++ b/src/coreclr/src/pal/src/include/pal/list.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/malloc.hpp b/src/coreclr/src/pal/src/include/pal/malloc.hpp index 580b6a916c17..fb7c88d128c5 100644 --- a/src/coreclr/src/pal/src/include/pal/malloc.hpp +++ b/src/coreclr/src/pal/src/include/pal/malloc.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/map.h b/src/coreclr/src/pal/src/include/pal/map.h index 2b5374712572..fc7e751fa6c0 100644 --- a/src/coreclr/src/pal/src/include/pal/map.h +++ b/src/coreclr/src/pal/src/include/pal/map.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/map.hpp b/src/coreclr/src/pal/src/include/pal/map.hpp index b8c584f83c52..f40c3c861f69 100644 --- a/src/coreclr/src/pal/src/include/pal/map.hpp +++ b/src/coreclr/src/pal/src/include/pal/map.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/misc.h b/src/coreclr/src/pal/src/include/pal/misc.h index 65d59aee60bb..1a555f4fb2bb 100644 --- a/src/coreclr/src/pal/src/include/pal/misc.h +++ b/src/coreclr/src/pal/src/include/pal/misc.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/module.h b/src/coreclr/src/pal/src/include/pal/module.h index 6a5e080d499d..80c211e8008b 100644 --- a/src/coreclr/src/pal/src/include/pal/module.h +++ b/src/coreclr/src/pal/src/include/pal/module.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/modulename.h b/src/coreclr/src/pal/src/include/pal/modulename.h index 20001f879730..87d54b77a5b9 100644 --- a/src/coreclr/src/pal/src/include/pal/modulename.h +++ b/src/coreclr/src/pal/src/include/pal/modulename.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/mutex.hpp b/src/coreclr/src/pal/src/include/pal/mutex.hpp index d5f6cef00953..c0227ff88d06 100644 --- a/src/coreclr/src/pal/src/include/pal/mutex.hpp +++ b/src/coreclr/src/pal/src/include/pal/mutex.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/numa.h b/src/coreclr/src/pal/src/include/pal/numa.h index 5ed998c9cce5..82ce5a37f2aa 100644 --- a/src/coreclr/src/pal/src/include/pal/numa.h +++ b/src/coreclr/src/pal/src/include/pal/numa.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/palinternal.h b/src/coreclr/src/pal/src/include/pal/palinternal.h index c45ad250c7e6..a672d7ce6253 100644 --- a/src/coreclr/src/pal/src/include/pal/palinternal.h +++ b/src/coreclr/src/pal/src/include/pal/palinternal.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/perftrace.h b/src/coreclr/src/pal/src/include/pal/perftrace.h index 8cfe3b10ddee..363709aa1b5f 100644 --- a/src/coreclr/src/pal/src/include/pal/perftrace.h +++ b/src/coreclr/src/pal/src/include/pal/perftrace.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/printfcpp.hpp b/src/coreclr/src/pal/src/include/pal/printfcpp.hpp index 2201cd97963b..fd04285c949c 100644 --- a/src/coreclr/src/pal/src/include/pal/printfcpp.hpp +++ b/src/coreclr/src/pal/src/include/pal/printfcpp.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/process.h b/src/coreclr/src/pal/src/include/pal/process.h index 674b0f4b2812..0d0dbe203638 100644 --- a/src/coreclr/src/pal/src/include/pal/process.h +++ b/src/coreclr/src/pal/src/include/pal/process.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/procobj.hpp b/src/coreclr/src/pal/src/include/pal/procobj.hpp index 50c162cf03dc..32357c40b773 100644 --- a/src/coreclr/src/pal/src/include/pal/procobj.hpp +++ b/src/coreclr/src/pal/src/include/pal/procobj.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/seh.hpp b/src/coreclr/src/pal/src/include/pal/seh.hpp index ba04d14c9001..6ad89df0fdd6 100644 --- a/src/coreclr/src/pal/src/include/pal/seh.hpp +++ b/src/coreclr/src/pal/src/include/pal/seh.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/semaphore.hpp b/src/coreclr/src/pal/src/include/pal/semaphore.hpp index f0bb1300cba8..a2b9663bc7c5 100644 --- a/src/coreclr/src/pal/src/include/pal/semaphore.hpp +++ b/src/coreclr/src/pal/src/include/pal/semaphore.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/sharedmemory.h b/src/coreclr/src/pal/src/include/pal/sharedmemory.h index ff64e20b5aa7..1ded94e12fcc 100644 --- a/src/coreclr/src/pal/src/include/pal/sharedmemory.h +++ b/src/coreclr/src/pal/src/include/pal/sharedmemory.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _PAL_SHARED_MEMORY_H_ #define _PAL_SHARED_MEMORY_H_ diff --git a/src/coreclr/src/pal/src/include/pal/sharedmemory.inl b/src/coreclr/src/pal/src/include/pal/sharedmemory.inl index 3a0c9797819c..598172c2bbc7 100644 --- a/src/coreclr/src/pal/src/include/pal/sharedmemory.inl +++ b/src/coreclr/src/pal/src/include/pal/sharedmemory.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _PAL_SHARED_MEMORY_INL_ #define _PAL_SHARED_MEMORY_INL_ diff --git a/src/coreclr/src/pal/src/include/pal/shm.hpp b/src/coreclr/src/pal/src/include/pal/shm.hpp index 1baca7c6cf5d..4a6b919ff2ba 100644 --- a/src/coreclr/src/pal/src/include/pal/shm.hpp +++ b/src/coreclr/src/pal/src/include/pal/shm.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/shmemory.h b/src/coreclr/src/pal/src/include/pal/shmemory.h index b4140317dcac..a43b11b42959 100644 --- a/src/coreclr/src/pal/src/include/pal/shmemory.h +++ b/src/coreclr/src/pal/src/include/pal/shmemory.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/signal.hpp b/src/coreclr/src/pal/src/include/pal/signal.hpp index 7b5e1d71407b..c5a1e276a05b 100644 --- a/src/coreclr/src/pal/src/include/pal/signal.hpp +++ b/src/coreclr/src/pal/src/include/pal/signal.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/stackstring.hpp b/src/coreclr/src/pal/src/include/pal/stackstring.hpp index a37da8045b49..20a948480ce7 100644 --- a/src/coreclr/src/pal/src/include/pal/stackstring.hpp +++ b/src/coreclr/src/pal/src/include/pal/stackstring.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __STACKSTRING_H_ #define __STACKSTRING_H_ diff --git a/src/coreclr/src/pal/src/include/pal/synchcache.hpp b/src/coreclr/src/pal/src/include/pal/synchcache.hpp index 9275765d0a76..821f5096a744 100644 --- a/src/coreclr/src/pal/src/include/pal/synchcache.hpp +++ b/src/coreclr/src/pal/src/include/pal/synchcache.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/synchobjects.hpp b/src/coreclr/src/pal/src/include/pal/synchobjects.hpp index ab51a005bae0..2cb957320d1f 100644 --- a/src/coreclr/src/pal/src/include/pal/synchobjects.hpp +++ b/src/coreclr/src/pal/src/include/pal/synchobjects.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/thread.hpp b/src/coreclr/src/pal/src/include/pal/thread.hpp index cb4cb9f9abcd..859c48416306 100644 --- a/src/coreclr/src/pal/src/include/pal/thread.hpp +++ b/src/coreclr/src/pal/src/include/pal/thread.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/threadinfo.hpp b/src/coreclr/src/pal/src/include/pal/threadinfo.hpp index 8819a5a7fdd0..e2fdeb2e59db 100644 --- a/src/coreclr/src/pal/src/include/pal/threadinfo.hpp +++ b/src/coreclr/src/pal/src/include/pal/threadinfo.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/threadsusp.hpp b/src/coreclr/src/pal/src/include/pal/threadsusp.hpp index 76fd4475a737..c3e59df89d79 100644 --- a/src/coreclr/src/pal/src/include/pal/threadsusp.hpp +++ b/src/coreclr/src/pal/src/include/pal/threadsusp.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/unicodedata.h b/src/coreclr/src/pal/src/include/pal/unicodedata.h index 42b41394729c..c7e9347fe066 100644 --- a/src/coreclr/src/pal/src/include/pal/unicodedata.h +++ b/src/coreclr/src/pal/src/include/pal/unicodedata.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _PAL_UNICODEDATA_H_ #define _PAL_UNICODEDATA_H_ diff --git a/src/coreclr/src/pal/src/include/pal/utf8.h b/src/coreclr/src/pal/src/include/pal/utf8.h index 2516caafb07c..fa417c0a021f 100644 --- a/src/coreclr/src/pal/src/include/pal/utf8.h +++ b/src/coreclr/src/pal/src/include/pal/utf8.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/utils.h b/src/coreclr/src/pal/src/include/pal/utils.h index 26e93c111a46..83cf2b104c1f 100644 --- a/src/coreclr/src/pal/src/include/pal/utils.h +++ b/src/coreclr/src/pal/src/include/pal/utils.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/include/pal/virtual.h b/src/coreclr/src/pal/src/include/pal/virtual.h index 14b133a3bac9..b8ad1856a4a5 100644 --- a/src/coreclr/src/pal/src/include/pal/virtual.h +++ b/src/coreclr/src/pal/src/include/pal/virtual.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/init/pal.cpp b/src/coreclr/src/pal/src/init/pal.cpp index cd7a5797c9e5..e040f2fd10e6 100644 --- a/src/coreclr/src/pal/src/init/pal.cpp +++ b/src/coreclr/src/pal/src/init/pal.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ @@ -103,6 +102,8 @@ using namespace CorUnix; extern "C" BOOL CRTInitStdStreams( void ); +extern bool g_running_in_exe; + Volatile init_count = 0; Volatile shutdown_intent = 0; Volatile g_coreclrInitialized = 0; @@ -786,8 +787,10 @@ exit : --*/ PAL_ERROR PALAPI -PAL_InitializeCoreCLR(const char *szExePath) +PAL_InitializeCoreCLR(const char *szExePath, bool runningInExe) { + g_running_in_exe = runningInExe; + // Fake up a command line to call PAL initialization with. int result = Initialize(1, &szExePath, PAL_INITIALIZE_CORECLR); if (result != 0) diff --git a/src/coreclr/src/pal/src/init/sxs.cpp b/src/coreclr/src/pal/src/init/sxs.cpp index e37b231fe42f..ddb084098efa 100644 --- a/src/coreclr/src/pal/src/init/sxs.cpp +++ b/src/coreclr/src/pal/src/init/sxs.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/libunwind/src/oop/_OOP_find_proc_info.c b/src/coreclr/src/pal/src/libunwind/src/oop/_OOP_find_proc_info.c index 71c54a933934..74d42ffe2abb 100644 --- a/src/coreclr/src/pal/src/libunwind/src/oop/_OOP_find_proc_info.c +++ b/src/coreclr/src/pal/src/libunwind/src/oop/_OOP_find_proc_info.c @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include #include diff --git a/src/coreclr/src/pal/src/libunwind/src/oop/_OOP_internal.h b/src/coreclr/src/pal/src/libunwind/src/oop/_OOP_internal.h index 6e41104a2d5a..866a7c99ea9b 100644 --- a/src/coreclr/src/pal/src/libunwind/src/oop/_OOP_internal.h +++ b/src/coreclr/src/pal/src/libunwind/src/oop/_OOP_internal.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _OOP_internal_h #define _OOP_internal_h diff --git a/src/coreclr/src/pal/src/libunwind/src/win/pal-single-threaded.c b/src/coreclr/src/pal/src/libunwind/src/win/pal-single-threaded.c index 88a57fdb14b6..c4f4e780c583 100644 --- a/src/coreclr/src/pal/src/libunwind/src/win/pal-single-threaded.c +++ b/src/coreclr/src/pal/src/libunwind/src/win/pal-single-threaded.c @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // This is minimal implementation of posix functions files required to cross compile // libunwind on a Windows host for UNW_REMOTE_ONLY application. diff --git a/src/coreclr/src/pal/src/loader/module.cpp b/src/coreclr/src/pal/src/loader/module.cpp index 65168978ba74..68675ac848a4 100644 --- a/src/coreclr/src/pal/src/loader/module.cpp +++ b/src/coreclr/src/pal/src/loader/module.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ @@ -87,6 +86,7 @@ MODSTRUCT exe_module; MODSTRUCT *pal_module = nullptr; char * g_szCoreCLRPath = nullptr; +bool g_running_in_exe = false; int MaxWCharToAcpLength = 3; @@ -1436,6 +1436,18 @@ static LPWSTR LOADGetModuleFileName(MODSTRUCT *module) return module->lib_name; } +static bool ShouldRedirectToCurrentLibrary(LPCSTR libraryNameOrPath) +{ + if (!g_running_in_exe) + return false; + + // Getting nullptr as name indicates redirection to current library + if (libraryNameOrPath == nullptr) + return true; + + return false; +} + /* Function: LOADLoadLibraryDirect [internal] @@ -1450,10 +1462,19 @@ Return value: */ static NATIVE_LIBRARY_HANDLE LOADLoadLibraryDirect(LPCSTR libraryNameOrPath) { - _ASSERTE(libraryNameOrPath != nullptr); - _ASSERTE(libraryNameOrPath[0] != '\0'); + NATIVE_LIBRARY_HANDLE dl_handle; + + if (ShouldRedirectToCurrentLibrary(libraryNameOrPath)) + { + dl_handle = dlopen(NULL, RTLD_LAZY); + } + else + { + _ASSERTE(libraryNameOrPath != nullptr); + _ASSERTE(libraryNameOrPath[0] != '\0'); + dl_handle = dlopen(libraryNameOrPath, RTLD_LAZY); + } - NATIVE_LIBRARY_HANDLE dl_handle = dlopen(libraryNameOrPath, RTLD_LAZY); if (dl_handle == nullptr) { SetLastError(ERROR_MOD_NOT_FOUND); @@ -1536,8 +1557,7 @@ Return value: static MODSTRUCT *LOADAddModule(NATIVE_LIBRARY_HANDLE dl_handle, LPCSTR libraryNameOrPath) { _ASSERTE(dl_handle != nullptr); - _ASSERTE(libraryNameOrPath != nullptr); - _ASSERTE(libraryNameOrPath[0] != '\0'); + _ASSERTE(g_running_in_exe || (libraryNameOrPath != nullptr && libraryNameOrPath[0] != '\0')); #if !RETURNS_NEW_HANDLES_ON_REPEAT_DLOPEN /* search module list for a match. */ @@ -1663,7 +1683,8 @@ Function : implementation of LoadLibrary (for use by the A/W variants) Parameters : - LPSTR shortAsciiName : name of module as specified to LoadLibrary + LPSTR shortAsciiName : name of module as specified to LoadLibrary. + Could be nullptr if loading containing executable. BOOL fDynamic : TRUE if dynamic load through LoadLibrary, FALSE if static load through RegisterLibrary @@ -1676,7 +1697,8 @@ static HMODULE LOADLoadLibrary(LPCSTR shortAsciiName, BOOL fDynamic) HMODULE module = nullptr; NATIVE_LIBRARY_HANDLE dl_handle = nullptr; - shortAsciiName = FixLibCName(shortAsciiName); + if (shortAsciiName != nullptr) + shortAsciiName = FixLibCName(shortAsciiName); LockModuleList(); @@ -1762,7 +1784,14 @@ MODSTRUCT *LOADGetPalLibrary() } } - pal_module = (MODSTRUCT *)LOADLoadLibrary(info.dli_fname, FALSE); + if (g_running_in_exe) + { + pal_module = (MODSTRUCT*)LOADLoadLibrary(nullptr, FALSE); + } + else + { + pal_module = (MODSTRUCT*)LOADLoadLibrary(info.dli_fname, FALSE); + } } exit: diff --git a/src/coreclr/src/pal/src/loader/modulename.cpp b/src/coreclr/src/pal/src/loader/modulename.cpp index 92f23cd27bd7..40c1c6de5c3d 100644 --- a/src/coreclr/src/pal/src/loader/modulename.cpp +++ b/src/coreclr/src/pal/src/loader/modulename.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/locale/unicode.cpp b/src/coreclr/src/pal/src/locale/unicode.cpp index cca7723d70b4..dea10acfceb3 100644 --- a/src/coreclr/src/pal/src/locale/unicode.cpp +++ b/src/coreclr/src/pal/src/locale/unicode.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/locale/unicodedata.cpp b/src/coreclr/src/pal/src/locale/unicodedata.cpp index 91787ec278bd..ec3a1f365538 100644 --- a/src/coreclr/src/pal/src/locale/unicodedata.cpp +++ b/src/coreclr/src/pal/src/locale/unicodedata.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "pal/unicodedata.h" diff --git a/src/coreclr/src/pal/src/locale/unicodedata.cs b/src/coreclr/src/pal/src/locale/unicodedata.cs index ad6779656021..aafc67fc204f 100644 --- a/src/coreclr/src/pal/src/locale/unicodedata.cs +++ b/src/coreclr/src/pal/src/locale/unicodedata.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -14,7 +13,6 @@ static void Main(string[] args) { Console.WriteLine("// Licensed to the .NET Foundation under one or more agreements."); Console.WriteLine("// The .NET Foundation licenses this file to you under the MIT license."); - Console.WriteLine("// See the LICENSE file in the project root for more information."); Console.WriteLine(); Console.WriteLine("#include \"pal/unicodedata.h\""); @@ -62,4 +60,4 @@ static void Main(string[] args) Console.WriteLine("CONST UINT UNICODE_DATA_SIZE = sizeof(UnicodeData)/sizeof(UnicodeDataRec);"); } -} \ No newline at end of file +} diff --git a/src/coreclr/src/pal/src/locale/utf8.cpp b/src/coreclr/src/pal/src/locale/utf8.cpp index d263248bdf31..b8a6f7ad5d6f 100644 --- a/src/coreclr/src/pal/src/locale/utf8.cpp +++ b/src/coreclr/src/pal/src/locale/utf8.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/map/common.cpp b/src/coreclr/src/pal/src/map/common.cpp index 49b1b6d06af8..0ba094359b1c 100644 --- a/src/coreclr/src/pal/src/map/common.cpp +++ b/src/coreclr/src/pal/src/map/common.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/map/common.h b/src/coreclr/src/pal/src/map/common.h index 68d8fc6ae242..b80df2114397 100644 --- a/src/coreclr/src/pal/src/map/common.h +++ b/src/coreclr/src/pal/src/map/common.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/map/map.cpp b/src/coreclr/src/pal/src/map/map.cpp index ee919a8067ac..154329885679 100644 --- a/src/coreclr/src/pal/src/map/map.cpp +++ b/src/coreclr/src/pal/src/map/map.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/map/virtual.cpp b/src/coreclr/src/pal/src/map/virtual.cpp index 3d796d9efc17..edac87758021 100644 --- a/src/coreclr/src/pal/src/map/virtual.cpp +++ b/src/coreclr/src/pal/src/map/virtual.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/memory/local.cpp b/src/coreclr/src/pal/src/memory/local.cpp index e41f7a47bcdc..8ed51b7c1757 100644 --- a/src/coreclr/src/pal/src/memory/local.cpp +++ b/src/coreclr/src/pal/src/memory/local.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/misc/cgroup.cpp b/src/coreclr/src/pal/src/misc/cgroup.cpp index 42a5dd27d275..26f9686e73c2 100644 --- a/src/coreclr/src/pal/src/misc/cgroup.cpp +++ b/src/coreclr/src/pal/src/misc/cgroup.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/misc/dbgmsg.cpp b/src/coreclr/src/pal/src/misc/dbgmsg.cpp index 609eea12943c..a41d2d1036b4 100644 --- a/src/coreclr/src/pal/src/misc/dbgmsg.cpp +++ b/src/coreclr/src/pal/src/misc/dbgmsg.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/misc/environ.cpp b/src/coreclr/src/pal/src/misc/environ.cpp index 9fec8a33a2b4..ed13156381e5 100644 --- a/src/coreclr/src/pal/src/misc/environ.cpp +++ b/src/coreclr/src/pal/src/misc/environ.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/misc/error.cpp b/src/coreclr/src/pal/src/misc/error.cpp index aaa7095118bf..3abe03127c23 100644 --- a/src/coreclr/src/pal/src/misc/error.cpp +++ b/src/coreclr/src/pal/src/misc/error.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/misc/errorstrings.cpp b/src/coreclr/src/pal/src/misc/errorstrings.cpp index 286349534943..fbf9a3f4c1c9 100644 --- a/src/coreclr/src/pal/src/misc/errorstrings.cpp +++ b/src/coreclr/src/pal/src/misc/errorstrings.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/misc/errorstrings.h b/src/coreclr/src/pal/src/misc/errorstrings.h index d24f025e32cf..2f1bf73df7eb 100644 --- a/src/coreclr/src/pal/src/misc/errorstrings.h +++ b/src/coreclr/src/pal/src/misc/errorstrings.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _ERRORSTRINGS_H_ #define _ERRORSTRINGS_H_ diff --git a/src/coreclr/src/pal/src/misc/fmtmessage.cpp b/src/coreclr/src/pal/src/misc/fmtmessage.cpp index 210f32bf6e5f..81502bfc7722 100644 --- a/src/coreclr/src/pal/src/misc/fmtmessage.cpp +++ b/src/coreclr/src/pal/src/misc/fmtmessage.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/misc/jitsupport.cpp b/src/coreclr/src/pal/src/misc/jitsupport.cpp index db9b4e2fe6b5..68af6aa1bd6d 100644 --- a/src/coreclr/src/pal/src/misc/jitsupport.cpp +++ b/src/coreclr/src/pal/src/misc/jitsupport.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "pal/palinternal.h" @@ -22,6 +21,7 @@ PAL_GetJitCpuCapabilityFlags(CORJIT_FLAGS *flags) _ASSERTE(flags); CORJIT_FLAGS &CPUCompileFlags = *flags; + #if defined(HOST_ARM64) #if HAVE_AUXV_HWCAP_H unsigned long hwCap = getauxval(AT_HWCAP); @@ -50,8 +50,8 @@ PAL_GetJitCpuCapabilityFlags(CORJIT_FLAGS *flags) // CPUCompileFlags.Set(CORJIT_FLAGS::CORJIT_FLAG_HAS_ARM64_DCPOP); #endif #ifdef HWCAP_ASIMDDP -// if (hwCap & HWCAP_ASIMDDP) -// CPUCompileFlags.Set(CORJIT_FLAGS::CORJIT_FLAG_HAS_ARM64_DP); + if (hwCap & HWCAP_ASIMDDP) + CPUCompileFlags.Set(InstructionSet_Dp); #endif #ifdef HWCAP_FCMA // if (hwCap & HWCAP_FCMA) @@ -98,8 +98,8 @@ PAL_GetJitCpuCapabilityFlags(CORJIT_FLAGS *flags) CPUCompileFlags.Set(InstructionSet_AdvSimd); #endif #ifdef HWCAP_ASIMDRDM -// if (hwCap & HWCAP_ASIMDRDM) -// CPUCompileFlags.Set(CORJIT_FLAGS::CORJIT_FLAG_HAS_ARM64_ADVSIMD_V81); + if (hwCap & HWCAP_ASIMDRDM) + CPUCompileFlags.Set(InstructionSet_Rdm); #endif #ifdef HWCAP_ASIMDHP // if (hwCap & HWCAP_ASIMDHP) @@ -122,10 +122,14 @@ PAL_GetJitCpuCapabilityFlags(CORJIT_FLAGS *flags) // On exceptional basis platforms may leave out support, but CoreCLR does not // yet support such platforms // Set baseline flags if OS has not exposed mechanism for us to determine CPU capabilities + CPUCompileFlags.Set(InstructionSet_ArmBase); CPUCompileFlags.Set(InstructionSet_AdvSimd); -// CPUCompileFlags.Set(CORJIT_FLAGS::CORJIT_FLAG_HAS_ARM64_FP); + // CPUCompileFlags.Set(CORJIT_FLAGS::CORJIT_FLAG_HAS_ARM64_FP); #endif // HAVE_AUXV_HWCAP_H +#elif defined(TARGET_ARM64) + // Enable ARM64 based flags by default so we always crossgen + // ARM64 intrinsics for Linux + CPUCompileFlags.Set(InstructionSet_ArmBase); + CPUCompileFlags.Set(InstructionSet_AdvSimd); #endif // defined(HOST_ARM64) - CPUCompileFlags.Set64BitInstructionSetVariants(); - CPUCompileFlags.EnsureValidInstructionSetSupport(); } diff --git a/src/coreclr/src/pal/src/misc/miscpalapi.cpp b/src/coreclr/src/pal/src/misc/miscpalapi.cpp index 3475ed2c4ed5..ce223fdaa66d 100644 --- a/src/coreclr/src/pal/src/misc/miscpalapi.cpp +++ b/src/coreclr/src/pal/src/misc/miscpalapi.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/misc/msgbox.cpp b/src/coreclr/src/pal/src/misc/msgbox.cpp index fccaf30bbe98..9a76cc8b5c8c 100644 --- a/src/coreclr/src/pal/src/misc/msgbox.cpp +++ b/src/coreclr/src/pal/src/misc/msgbox.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/misc/perfjitdump.cpp b/src/coreclr/src/pal/src/misc/perfjitdump.cpp index e75d5989f18a..a1fe107421dc 100644 --- a/src/coreclr/src/pal/src/misc/perfjitdump.cpp +++ b/src/coreclr/src/pal/src/misc/perfjitdump.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== #if defined(__linux__) diff --git a/src/coreclr/src/pal/src/misc/perftrace.cpp b/src/coreclr/src/pal/src/misc/perftrace.cpp index 82969a1c8914..5dd0d38209d1 100644 --- a/src/coreclr/src/pal/src/misc/perftrace.cpp +++ b/src/coreclr/src/pal/src/misc/perftrace.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/misc/strutil.cpp b/src/coreclr/src/pal/src/misc/strutil.cpp index 6c032566423f..ed29831232ca 100644 --- a/src/coreclr/src/pal/src/misc/strutil.cpp +++ b/src/coreclr/src/pal/src/misc/strutil.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/misc/sysinfo.cpp b/src/coreclr/src/pal/src/misc/sysinfo.cpp index 17efa171c284..4592aa2a1434 100644 --- a/src/coreclr/src/pal/src/misc/sysinfo.cpp +++ b/src/coreclr/src/pal/src/misc/sysinfo.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/misc/time.cpp b/src/coreclr/src/pal/src/misc/time.cpp index ce65f3d515ff..0d56e411e4cc 100644 --- a/src/coreclr/src/pal/src/misc/time.cpp +++ b/src/coreclr/src/pal/src/misc/time.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/misc/tracepointprovider.cpp b/src/coreclr/src/pal/src/misc/tracepointprovider.cpp index 49ddf5d40f75..125654d4488d 100644 --- a/src/coreclr/src/pal/src/misc/tracepointprovider.cpp +++ b/src/coreclr/src/pal/src/misc/tracepointprovider.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/misc/utils.cpp b/src/coreclr/src/pal/src/misc/utils.cpp index a41f7a7bbdf2..de604fe96dc4 100644 --- a/src/coreclr/src/pal/src/misc/utils.cpp +++ b/src/coreclr/src/pal/src/misc/utils.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/numa/numa.cpp b/src/coreclr/src/pal/src/numa/numa.cpp index 4d75508cc7bc..edeed72109e9 100644 --- a/src/coreclr/src/pal/src/numa/numa.cpp +++ b/src/coreclr/src/pal/src/numa/numa.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/numa/numashim.h b/src/coreclr/src/pal/src/numa/numashim.h index e56cfab9d123..c6594b5d0632 100644 --- a/src/coreclr/src/pal/src/numa/numashim.h +++ b/src/coreclr/src/pal/src/numa/numashim.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // Enable calling numa functions through shims to make it a soft // runtime dependency. diff --git a/src/coreclr/src/pal/src/objmgr/palobjbase.cpp b/src/coreclr/src/pal/src/objmgr/palobjbase.cpp index ca4ee618aaaf..d81c04ebfd20 100644 --- a/src/coreclr/src/pal/src/objmgr/palobjbase.cpp +++ b/src/coreclr/src/pal/src/objmgr/palobjbase.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/objmgr/palobjbase.hpp b/src/coreclr/src/pal/src/objmgr/palobjbase.hpp index 28efe0d11244..e05aaf0cd7a0 100644 --- a/src/coreclr/src/pal/src/objmgr/palobjbase.hpp +++ b/src/coreclr/src/pal/src/objmgr/palobjbase.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/objmgr/shmobject.cpp b/src/coreclr/src/pal/src/objmgr/shmobject.cpp index 2d3a18206f2d..35cfc76f33d6 100644 --- a/src/coreclr/src/pal/src/objmgr/shmobject.cpp +++ b/src/coreclr/src/pal/src/objmgr/shmobject.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/objmgr/shmobject.hpp b/src/coreclr/src/pal/src/objmgr/shmobject.hpp index 8c8727b8012b..f50d10e0bb84 100644 --- a/src/coreclr/src/pal/src/objmgr/shmobject.hpp +++ b/src/coreclr/src/pal/src/objmgr/shmobject.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/objmgr/shmobjectmanager.cpp b/src/coreclr/src/pal/src/objmgr/shmobjectmanager.cpp index 7769779a6cb2..7c4fec93ecb8 100644 --- a/src/coreclr/src/pal/src/objmgr/shmobjectmanager.cpp +++ b/src/coreclr/src/pal/src/objmgr/shmobjectmanager.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/objmgr/shmobjectmanager.hpp b/src/coreclr/src/pal/src/objmgr/shmobjectmanager.hpp index f10f988eb99f..b9ec51919e0d 100644 --- a/src/coreclr/src/pal/src/objmgr/shmobjectmanager.hpp +++ b/src/coreclr/src/pal/src/objmgr/shmobjectmanager.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/poll/fakepoll.cpp b/src/coreclr/src/pal/src/poll/fakepoll.cpp index 489175cafa65..6b6e5403ce25 100644 --- a/src/coreclr/src/pal/src/poll/fakepoll.cpp +++ b/src/coreclr/src/pal/src/poll/fakepoll.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // fakepoll.h // poll using select diff --git a/src/coreclr/src/pal/src/safecrt/cruntime.h b/src/coreclr/src/pal/src/safecrt/cruntime.h index 9508e8ff9c9d..87dc02c5af9c 100644 --- a/src/coreclr/src/pal/src/safecrt/cruntime.h +++ b/src/coreclr/src/pal/src/safecrt/cruntime.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *cruntime.h - definitions specific to the target operating system and hardware diff --git a/src/coreclr/src/pal/src/safecrt/input.inl b/src/coreclr/src/pal/src/safecrt/input.inl index 0f578e099eba..4e1d243460dd 100644 --- a/src/coreclr/src/pal/src/safecrt/input.inl +++ b/src/coreclr/src/pal/src/safecrt/input.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *input.c - C formatted input, used by scanf, etc. diff --git a/src/coreclr/src/pal/src/safecrt/internal.h b/src/coreclr/src/pal/src/safecrt/internal.h index 3b3b3e65f448..ab87904b2b80 100644 --- a/src/coreclr/src/pal/src/safecrt/internal.h +++ b/src/coreclr/src/pal/src/safecrt/internal.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *internal.h - contains declarations of internal routines and variables diff --git a/src/coreclr/src/pal/src/safecrt/internal_securecrt.h b/src/coreclr/src/pal/src/safecrt/internal_securecrt.h index 4d8be0556c30..f5ca89c4bb32 100644 --- a/src/coreclr/src/pal/src/safecrt/internal_securecrt.h +++ b/src/coreclr/src/pal/src/safecrt/internal_securecrt.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *internal_securecrt.h - contains declarations of internal routines and variables for securecrt diff --git a/src/coreclr/src/pal/src/safecrt/makepath_s.cpp b/src/coreclr/src/pal/src/safecrt/makepath_s.cpp index 4342685b9c58..8b39a52d344e 100644 --- a/src/coreclr/src/pal/src/safecrt/makepath_s.cpp +++ b/src/coreclr/src/pal/src/safecrt/makepath_s.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *makepath_s.c - create path name from components diff --git a/src/coreclr/src/pal/src/safecrt/mbusafecrt.cpp b/src/coreclr/src/pal/src/safecrt/mbusafecrt.cpp index 82bc08a7946d..1f56c45a234c 100644 --- a/src/coreclr/src/pal/src/safecrt/mbusafecrt.cpp +++ b/src/coreclr/src/pal/src/safecrt/mbusafecrt.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** * mbusafecrt.c - implementaion of support functions and data for MBUSafeCRT diff --git a/src/coreclr/src/pal/src/safecrt/mbusafecrt_internal.h b/src/coreclr/src/pal/src/safecrt/mbusafecrt_internal.h index 4f9ee5f6c5af..b00bd2b1b30b 100644 --- a/src/coreclr/src/pal/src/safecrt/mbusafecrt_internal.h +++ b/src/coreclr/src/pal/src/safecrt/mbusafecrt_internal.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** * mbusafecrt_internal.h - internal declarations for SafeCRT functions diff --git a/src/coreclr/src/pal/src/safecrt/memcpy_s.cpp b/src/coreclr/src/pal/src/safecrt/memcpy_s.cpp index db3bb5f1fcb6..b4b83da74cc8 100644 --- a/src/coreclr/src/pal/src/safecrt/memcpy_s.cpp +++ b/src/coreclr/src/pal/src/safecrt/memcpy_s.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *memcpy_s.c - contains memcpy_s routine diff --git a/src/coreclr/src/pal/src/safecrt/memmove_s.cpp b/src/coreclr/src/pal/src/safecrt/memmove_s.cpp index a0ae5f7ea625..b3f5e398a6b5 100644 --- a/src/coreclr/src/pal/src/safecrt/memmove_s.cpp +++ b/src/coreclr/src/pal/src/safecrt/memmove_s.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *memmove_s.c - contains memmove_s routine diff --git a/src/coreclr/src/pal/src/safecrt/output.inl b/src/coreclr/src/pal/src/safecrt/output.inl index cab3a808e908..9e90525735ad 100644 --- a/src/coreclr/src/pal/src/safecrt/output.inl +++ b/src/coreclr/src/pal/src/safecrt/output.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *output.c - printf style output to a FILE diff --git a/src/coreclr/src/pal/src/safecrt/safecrt_input_s.cpp b/src/coreclr/src/pal/src/safecrt/safecrt_input_s.cpp index 6ba607c669f3..a7cd93b4b5c7 100644 --- a/src/coreclr/src/pal/src/safecrt/safecrt_input_s.cpp +++ b/src/coreclr/src/pal/src/safecrt/safecrt_input_s.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *safecrt_input_s.c - implementation of the _input family for safecrt.lib diff --git a/src/coreclr/src/pal/src/safecrt/safecrt_output_l.cpp b/src/coreclr/src/pal/src/safecrt/safecrt_output_l.cpp index 8b71fd360082..752ffea173fe 100644 --- a/src/coreclr/src/pal/src/safecrt/safecrt_output_l.cpp +++ b/src/coreclr/src/pal/src/safecrt/safecrt_output_l.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *safecrt_output_l.c - implementation of the _output family for safercrt.lib diff --git a/src/coreclr/src/pal/src/safecrt/safecrt_output_s.cpp b/src/coreclr/src/pal/src/safecrt/safecrt_output_s.cpp index c3e7f91404f7..ed93e0b92b97 100644 --- a/src/coreclr/src/pal/src/safecrt/safecrt_output_s.cpp +++ b/src/coreclr/src/pal/src/safecrt/safecrt_output_s.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *safecrt_output_s.c - implementation of the _output family for safercrt.lib diff --git a/src/coreclr/src/pal/src/safecrt/safecrt_winput_s.cpp b/src/coreclr/src/pal/src/safecrt/safecrt_winput_s.cpp index 459a9b55c160..fb98d988cd45 100644 --- a/src/coreclr/src/pal/src/safecrt/safecrt_winput_s.cpp +++ b/src/coreclr/src/pal/src/safecrt/safecrt_winput_s.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *safecrt_winput_s.c - implementation of the _winput family for safecrt.lib diff --git a/src/coreclr/src/pal/src/safecrt/safecrt_woutput_s.cpp b/src/coreclr/src/pal/src/safecrt/safecrt_woutput_s.cpp index 814a19dcf712..c0911193eb75 100644 --- a/src/coreclr/src/pal/src/safecrt/safecrt_woutput_s.cpp +++ b/src/coreclr/src/pal/src/safecrt/safecrt_woutput_s.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *safecrt_woutput_s.c - implementation of the _woutput family for safercrt.lib diff --git a/src/coreclr/src/pal/src/safecrt/snprintf.cpp b/src/coreclr/src/pal/src/safecrt/snprintf.cpp index dea87167b993..aafa5ca9b0e3 100644 --- a/src/coreclr/src/pal/src/safecrt/snprintf.cpp +++ b/src/coreclr/src/pal/src/safecrt/snprintf.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *snprintf.c - "Count" version of sprintf diff --git a/src/coreclr/src/pal/src/safecrt/splitpath_s.cpp b/src/coreclr/src/pal/src/safecrt/splitpath_s.cpp index cb8a3645504d..1fe3a384d479 100644 --- a/src/coreclr/src/pal/src/safecrt/splitpath_s.cpp +++ b/src/coreclr/src/pal/src/safecrt/splitpath_s.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *splitpath_s.c - break down path name into components diff --git a/src/coreclr/src/pal/src/safecrt/sprintf_s.cpp b/src/coreclr/src/pal/src/safecrt/sprintf_s.cpp index 79a4e4345b4d..f61a8bc70789 100644 --- a/src/coreclr/src/pal/src/safecrt/sprintf_s.cpp +++ b/src/coreclr/src/pal/src/safecrt/sprintf_s.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *sprintf_s.c - print formatted to string diff --git a/src/coreclr/src/pal/src/safecrt/sscanf_s.cpp b/src/coreclr/src/pal/src/safecrt/sscanf_s.cpp index 39c8ce3da8af..26e5167f4b27 100644 --- a/src/coreclr/src/pal/src/safecrt/sscanf_s.cpp +++ b/src/coreclr/src/pal/src/safecrt/sscanf_s.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *sscanf_s.c - read formatted data from string diff --git a/src/coreclr/src/pal/src/safecrt/strcat_s.cpp b/src/coreclr/src/pal/src/safecrt/strcat_s.cpp index 4dc2332006b0..94f0a2391445 100644 --- a/src/coreclr/src/pal/src/safecrt/strcat_s.cpp +++ b/src/coreclr/src/pal/src/safecrt/strcat_s.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *strcat_s.c - contains strcat_s() diff --git a/src/coreclr/src/pal/src/safecrt/strcpy_s.cpp b/src/coreclr/src/pal/src/safecrt/strcpy_s.cpp index 821dbe85f6ff..d325ba88b774 100644 --- a/src/coreclr/src/pal/src/safecrt/strcpy_s.cpp +++ b/src/coreclr/src/pal/src/safecrt/strcpy_s.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *strcpy_s.c - contains strcpy_s() diff --git a/src/coreclr/src/pal/src/safecrt/strlen_s.cpp b/src/coreclr/src/pal/src/safecrt/strlen_s.cpp index 3f1e1cf1aec9..0c35d3625df3 100644 --- a/src/coreclr/src/pal/src/safecrt/strlen_s.cpp +++ b/src/coreclr/src/pal/src/safecrt/strlen_s.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *strlen_s.c - contains strnlen() routine diff --git a/src/coreclr/src/pal/src/safecrt/strncat_s.cpp b/src/coreclr/src/pal/src/safecrt/strncat_s.cpp index ef8c6cfc7f1c..a99ccd4c4db3 100644 --- a/src/coreclr/src/pal/src/safecrt/strncat_s.cpp +++ b/src/coreclr/src/pal/src/safecrt/strncat_s.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *strncat_s.c - append n chars of string to new string diff --git a/src/coreclr/src/pal/src/safecrt/strncpy_s.cpp b/src/coreclr/src/pal/src/safecrt/strncpy_s.cpp index f819ebb6bbd5..eab5c409aa55 100644 --- a/src/coreclr/src/pal/src/safecrt/strncpy_s.cpp +++ b/src/coreclr/src/pal/src/safecrt/strncpy_s.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *strncpy_s.c - copy at most n characters of string diff --git a/src/coreclr/src/pal/src/safecrt/strtok_s.cpp b/src/coreclr/src/pal/src/safecrt/strtok_s.cpp index 6f1c80633fe0..c183ad5ab343 100644 --- a/src/coreclr/src/pal/src/safecrt/strtok_s.cpp +++ b/src/coreclr/src/pal/src/safecrt/strtok_s.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *strtok_s.c - tokenize a string with given delimiters diff --git a/src/coreclr/src/pal/src/safecrt/swprintf.cpp b/src/coreclr/src/pal/src/safecrt/swprintf.cpp index bf0970e2ce3f..72718dad682f 100644 --- a/src/coreclr/src/pal/src/safecrt/swprintf.cpp +++ b/src/coreclr/src/pal/src/safecrt/swprintf.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *swprintf.c - print formatted to string diff --git a/src/coreclr/src/pal/src/safecrt/tcscat_s.inl b/src/coreclr/src/pal/src/safecrt/tcscat_s.inl index b6fefdc0ae6e..413d8dca726b 100644 --- a/src/coreclr/src/pal/src/safecrt/tcscat_s.inl +++ b/src/coreclr/src/pal/src/safecrt/tcscat_s.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *tcscat_s.inl - general implementation of _tcscpy_s diff --git a/src/coreclr/src/pal/src/safecrt/tcscpy_s.inl b/src/coreclr/src/pal/src/safecrt/tcscpy_s.inl index b1192d8ee729..86cd6920a872 100644 --- a/src/coreclr/src/pal/src/safecrt/tcscpy_s.inl +++ b/src/coreclr/src/pal/src/safecrt/tcscpy_s.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *tcscpy_s.inl - general implementation of _tcscpy_s diff --git a/src/coreclr/src/pal/src/safecrt/tcsncat_s.inl b/src/coreclr/src/pal/src/safecrt/tcsncat_s.inl index 6de501767d50..ec60e06b5e5f 100644 --- a/src/coreclr/src/pal/src/safecrt/tcsncat_s.inl +++ b/src/coreclr/src/pal/src/safecrt/tcsncat_s.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *tcsncat_s.inl - general implementation of _tcscpy_s diff --git a/src/coreclr/src/pal/src/safecrt/tcsncpy_s.inl b/src/coreclr/src/pal/src/safecrt/tcsncpy_s.inl index 54a79a03e78e..5c713bdd220e 100644 --- a/src/coreclr/src/pal/src/safecrt/tcsncpy_s.inl +++ b/src/coreclr/src/pal/src/safecrt/tcsncpy_s.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *tcsncpy_s.inl - general implementation of _tcsncpy_s diff --git a/src/coreclr/src/pal/src/safecrt/tcstok_s.inl b/src/coreclr/src/pal/src/safecrt/tcstok_s.inl index 29ca5c6858f6..f3ed934c19b2 100644 --- a/src/coreclr/src/pal/src/safecrt/tcstok_s.inl +++ b/src/coreclr/src/pal/src/safecrt/tcstok_s.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *tcstok_s.inl - general implementation of _tcstok_s diff --git a/src/coreclr/src/pal/src/safecrt/tmakepath_s.inl b/src/coreclr/src/pal/src/safecrt/tmakepath_s.inl index 34c4842c6194..27d2ab731d60 100644 --- a/src/coreclr/src/pal/src/safecrt/tmakepath_s.inl +++ b/src/coreclr/src/pal/src/safecrt/tmakepath_s.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *tmakepath_s.inl - general implementation of _tmakepath_s diff --git a/src/coreclr/src/pal/src/safecrt/tsplitpath_s.inl b/src/coreclr/src/pal/src/safecrt/tsplitpath_s.inl index 77dd32a1909a..8a447c0d85c5 100644 --- a/src/coreclr/src/pal/src/safecrt/tsplitpath_s.inl +++ b/src/coreclr/src/pal/src/safecrt/tsplitpath_s.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *tsplitpath_s.inl - general implementation of _tsplitpath_s diff --git a/src/coreclr/src/pal/src/safecrt/vsprintf.cpp b/src/coreclr/src/pal/src/safecrt/vsprintf.cpp index 6d4b78698496..235321b396ff 100644 --- a/src/coreclr/src/pal/src/safecrt/vsprintf.cpp +++ b/src/coreclr/src/pal/src/safecrt/vsprintf.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *vsprintf.c - print formatted data into a string from var arg list diff --git a/src/coreclr/src/pal/src/safecrt/vswprint.cpp b/src/coreclr/src/pal/src/safecrt/vswprint.cpp index 4ba156574222..24451849b60e 100644 --- a/src/coreclr/src/pal/src/safecrt/vswprint.cpp +++ b/src/coreclr/src/pal/src/safecrt/vswprint.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *vswprint.c - print formatted data into a string from var arg list diff --git a/src/coreclr/src/pal/src/safecrt/wcscat_s.cpp b/src/coreclr/src/pal/src/safecrt/wcscat_s.cpp index 507db7c25838..3ae54a95c9c3 100644 --- a/src/coreclr/src/pal/src/safecrt/wcscat_s.cpp +++ b/src/coreclr/src/pal/src/safecrt/wcscat_s.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *wcscat_s.c - contains wcscat_s() diff --git a/src/coreclr/src/pal/src/safecrt/wcscpy_s.cpp b/src/coreclr/src/pal/src/safecrt/wcscpy_s.cpp index 5285eac64549..1b0f2216e5cf 100644 --- a/src/coreclr/src/pal/src/safecrt/wcscpy_s.cpp +++ b/src/coreclr/src/pal/src/safecrt/wcscpy_s.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *strcpy_s.c - contains wcscpy_s() diff --git a/src/coreclr/src/pal/src/safecrt/wcslen_s.cpp b/src/coreclr/src/pal/src/safecrt/wcslen_s.cpp index 70cbb3ae8e1e..e4b7e22af91b 100644 --- a/src/coreclr/src/pal/src/safecrt/wcslen_s.cpp +++ b/src/coreclr/src/pal/src/safecrt/wcslen_s.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *wcslen_s.c - contains wcsnlen() routine diff --git a/src/coreclr/src/pal/src/safecrt/wcsncat_s.cpp b/src/coreclr/src/pal/src/safecrt/wcsncat_s.cpp index b2e4701cd157..54b425785472 100644 --- a/src/coreclr/src/pal/src/safecrt/wcsncat_s.cpp +++ b/src/coreclr/src/pal/src/safecrt/wcsncat_s.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *wcsncat_s.c - append n chars of string to new string diff --git a/src/coreclr/src/pal/src/safecrt/wcsncpy_s.cpp b/src/coreclr/src/pal/src/safecrt/wcsncpy_s.cpp index 932231f39021..c0f64e4a20f7 100644 --- a/src/coreclr/src/pal/src/safecrt/wcsncpy_s.cpp +++ b/src/coreclr/src/pal/src/safecrt/wcsncpy_s.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *wcsncpy_s.c - copy at most n characters of wide-character string diff --git a/src/coreclr/src/pal/src/safecrt/wcstok_s.cpp b/src/coreclr/src/pal/src/safecrt/wcstok_s.cpp index adc9813325b6..83751d656558 100644 --- a/src/coreclr/src/pal/src/safecrt/wcstok_s.cpp +++ b/src/coreclr/src/pal/src/safecrt/wcstok_s.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *wcstok_s.c - tokenize a wide-character string with given delimiters diff --git a/src/coreclr/src/pal/src/safecrt/wmakepath_s.cpp b/src/coreclr/src/pal/src/safecrt/wmakepath_s.cpp index efc52d13acc3..ab33c214fc76 100644 --- a/src/coreclr/src/pal/src/safecrt/wmakepath_s.cpp +++ b/src/coreclr/src/pal/src/safecrt/wmakepath_s.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *wmakepath_s.c - create path name from components diff --git a/src/coreclr/src/pal/src/safecrt/wsplitpath_s.cpp b/src/coreclr/src/pal/src/safecrt/wsplitpath_s.cpp index 64483f7ddc88..6889723c1473 100644 --- a/src/coreclr/src/pal/src/safecrt/wsplitpath_s.cpp +++ b/src/coreclr/src/pal/src/safecrt/wsplitpath_s.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *wsplitpath_s.c - break down path name into components diff --git a/src/coreclr/src/pal/src/safecrt/xtoa_s.cpp b/src/coreclr/src/pal/src/safecrt/xtoa_s.cpp index 2857beab078a..e535b1b388c5 100644 --- a/src/coreclr/src/pal/src/safecrt/xtoa_s.cpp +++ b/src/coreclr/src/pal/src/safecrt/xtoa_s.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *strtok_s.c - tokenize a string with given delimiters diff --git a/src/coreclr/src/pal/src/safecrt/xtow_s.cpp b/src/coreclr/src/pal/src/safecrt/xtow_s.cpp index e001cc39fdac..4a5d077532bb 100644 --- a/src/coreclr/src/pal/src/safecrt/xtow_s.cpp +++ b/src/coreclr/src/pal/src/safecrt/xtow_s.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *strtok_s.c - tokenize a string with given delimiters diff --git a/src/coreclr/src/pal/src/safecrt/xtox_s.inl b/src/coreclr/src/pal/src/safecrt/xtox_s.inl index f43b53d5d688..f2284fa4ab50 100644 --- a/src/coreclr/src/pal/src/safecrt/xtox_s.inl +++ b/src/coreclr/src/pal/src/safecrt/xtox_s.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *xtoa.c - convert integers/longs to ASCII string diff --git a/src/coreclr/src/pal/src/sharedmemory/sharedmemory.cpp b/src/coreclr/src/pal/src/sharedmemory/sharedmemory.cpp index d61b92c939fd..4c946cc5257b 100644 --- a/src/coreclr/src/pal/src/sharedmemory/sharedmemory.cpp +++ b/src/coreclr/src/pal/src/sharedmemory/sharedmemory.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "pal/sharedmemory.h" diff --git a/src/coreclr/src/pal/src/shmemory/shmemory.cpp b/src/coreclr/src/pal/src/shmemory/shmemory.cpp index 9539d10aebec..e2e845c8c773 100644 --- a/src/coreclr/src/pal/src/shmemory/shmemory.cpp +++ b/src/coreclr/src/pal/src/shmemory/shmemory.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/sync/cs.cpp b/src/coreclr/src/pal/src/sync/cs.cpp index 354550063c64..8fa0509e8347 100644 --- a/src/coreclr/src/pal/src/sync/cs.cpp +++ b/src/coreclr/src/pal/src/sync/cs.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /////////////////////////////////////////////////////////////////////////////// // diff --git a/src/coreclr/src/pal/src/synchmgr/synchcontrollers.cpp b/src/coreclr/src/pal/src/synchmgr/synchcontrollers.cpp index 513d8b86fd9c..e24105d281c4 100644 --- a/src/coreclr/src/pal/src/synchmgr/synchcontrollers.cpp +++ b/src/coreclr/src/pal/src/synchmgr/synchcontrollers.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/synchmgr/synchmanager.cpp b/src/coreclr/src/pal/src/synchmgr/synchmanager.cpp index 52b8843889d2..b1fdb82adf76 100644 --- a/src/coreclr/src/pal/src/synchmgr/synchmanager.cpp +++ b/src/coreclr/src/pal/src/synchmgr/synchmanager.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/synchmgr/synchmanager.hpp b/src/coreclr/src/pal/src/synchmgr/synchmanager.hpp index b9dd8ed0dd8d..e4adcb318a3f 100644 --- a/src/coreclr/src/pal/src/synchmgr/synchmanager.hpp +++ b/src/coreclr/src/pal/src/synchmgr/synchmanager.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/synchmgr/wait.cpp b/src/coreclr/src/pal/src/synchmgr/wait.cpp index 8d2de64e4c41..273b9617a9fb 100644 --- a/src/coreclr/src/pal/src/synchmgr/wait.cpp +++ b/src/coreclr/src/pal/src/synchmgr/wait.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/synchobj/event.cpp b/src/coreclr/src/pal/src/synchobj/event.cpp index 960ae6d4e71e..a00272c5a454 100644 --- a/src/coreclr/src/pal/src/synchobj/event.cpp +++ b/src/coreclr/src/pal/src/synchobj/event.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/synchobj/mutex.cpp b/src/coreclr/src/pal/src/synchobj/mutex.cpp index d36752a20405..b0b4425fc5ba 100644 --- a/src/coreclr/src/pal/src/synchobj/mutex.cpp +++ b/src/coreclr/src/pal/src/synchobj/mutex.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/synchobj/semaphore.cpp b/src/coreclr/src/pal/src/synchobj/semaphore.cpp index f079fe5c83ff..bdc3fe8d5278 100644 --- a/src/coreclr/src/pal/src/synchobj/semaphore.cpp +++ b/src/coreclr/src/pal/src/synchobj/semaphore.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/thread/context.cpp b/src/coreclr/src/pal/src/thread/context.cpp index 435b04715eda..ca0b60e44925 100644 --- a/src/coreclr/src/pal/src/thread/context.cpp +++ b/src/coreclr/src/pal/src/thread/context.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/thread/process.cpp b/src/coreclr/src/pal/src/thread/process.cpp index ee1e759087da..0fd7efae777f 100644 --- a/src/coreclr/src/pal/src/thread/process.cpp +++ b/src/coreclr/src/pal/src/thread/process.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ @@ -2011,12 +2010,7 @@ PAL_NotifyRuntimeStarted() _ASSERTE(ret == TRUE || processIdDisambiguationKey == 0); UnambiguousProcessDescriptor unambiguousProcessDescriptor(gPID, processIdDisambiguationKey); - LPCSTR applicationGroupId = -#ifdef __APPLE__ - PAL_GetApplicationGroupId(); -#else - nullptr; -#endif + LPCSTR applicationGroupId = PAL_GetApplicationGroupId(); CreateSemaphoreName(startupSemName, RuntimeStartupSemaphoreName, unambiguousProcessDescriptor, applicationGroupId); CreateSemaphoreName(continueSemName, RuntimeContinueSemaphoreName, unambiguousProcessDescriptor, applicationGroupId); @@ -2066,14 +2060,19 @@ PAL_NotifyRuntimeStarted() return launched; } -#ifdef __APPLE__ LPCSTR PALAPI PAL_GetApplicationGroupId() { +#ifdef __APPLE__ return gApplicationGroupId; +#else + return nullptr; +#endif } +#ifdef __APPLE__ + // We use 7bits from each byte, so this computes the extra size we need to encode a given byte count constexpr int GetExtraEncodedAreaSize(UINT rawByteCount) { diff --git a/src/coreclr/src/pal/src/thread/procprivate.hpp b/src/coreclr/src/pal/src/thread/procprivate.hpp index a1d085d86a5b..4f3af27243e3 100644 --- a/src/coreclr/src/pal/src/thread/procprivate.hpp +++ b/src/coreclr/src/pal/src/thread/procprivate.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/thread/thread.cpp b/src/coreclr/src/pal/src/thread/thread.cpp index fa4a66380135..6efe93492bc3 100644 --- a/src/coreclr/src/pal/src/thread/thread.cpp +++ b/src/coreclr/src/pal/src/thread/thread.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/src/thread/threadsusp.cpp b/src/coreclr/src/pal/src/thread/threadsusp.cpp index af22fc1de8c6..d2fae05c4256 100644 --- a/src/coreclr/src/pal/src/thread/threadsusp.cpp +++ b/src/coreclr/src/pal/src/thread/threadsusp.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/tests/palsuite/CMakeLists.txt b/src/coreclr/src/pal/tests/palsuite/CMakeLists.txt index 902f125412b1..091da03fba3c 100644 --- a/src/coreclr/src/pal/tests/palsuite/CMakeLists.txt +++ b/src/coreclr/src/pal/tests/palsuite/CMakeLists.txt @@ -20,6 +20,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") add_compile_options(-Wno-sign-compare) add_compile_options(-Wno-narrowing) + add_compile_options(-fno-builtin) add_compile_options($<$:-fpermissive>) add_compile_options(-Wno-int-to-pointer-cast) endif() diff --git a/src/coreclr/src/pal/tests/palsuite/README.txt b/src/coreclr/src/pal/tests/palsuite/README.txt index eb180b328f15..b9a2441474b2 100644 --- a/src/coreclr/src/pal/tests/palsuite/README.txt +++ b/src/coreclr/src/pal/tests/palsuite/README.txt @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. =========================================================================== diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/__iscsym/test1/__iscsym.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/__iscsym/test1/__iscsym.cpp index 9c8f1d0f2539..497f281da12f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/__iscsym/test1/__iscsym.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/__iscsym/test1/__iscsym.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/__iscsym/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/__iscsym/test1/testinfo.dat index e6668edccf8f..7bf152d2cc7b 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/__iscsym/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/__iscsym/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_alloca/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_alloca/test1/test1.cpp index c533d8423491..b0552d457f8b 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_alloca/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_alloca/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_alloca/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_alloca/test1/testinfo.dat index e21562195e1f..30ef924f1e90 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_alloca/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_alloca/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_fdopen/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_fdopen/test1/test1.cpp index b88267c6e4ac..608f537f25df 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_fdopen/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_fdopen/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_fdopen/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_fdopen/test1/testinfo.dat index 89e48bb4c17c..c2bbdb6b42af 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_fdopen/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_fdopen/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_finite/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_finite/test1/test1.cpp index c815055b38b6..4f86cad2f17d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_finite/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_finite/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_finite/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_finite/test1/testinfo.dat index cec0f8ae4ac9..3dd6f68f2f3a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_finite/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_finite/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_finitef/test1/test1.c b/src/coreclr/src/pal/tests/palsuite/c_runtime/_finitef/test1/test1.c index f9a1109a664e..5f94ac464e7c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_finitef/test1/test1.c +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_finitef/test1/test1.c @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_finitef/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_finitef/test1/testinfo.dat index b0767431e526..aeadb89d6f2b 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_finitef/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_finitef/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_gcvt/test1/_gcvt.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_gcvt/test1/_gcvt.cpp index ccfc286898e5..e73d74b2cdff 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_gcvt/test1/_gcvt.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_gcvt/test1/_gcvt.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_gcvt/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_gcvt/test1/testinfo.dat index d52741810897..b32ac0e38f2a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_gcvt/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_gcvt/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_gcvt/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_gcvt/test2/test2.cpp index 7ac9a4fcf099..9ed63892f81a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_gcvt/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_gcvt/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_gcvt/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_gcvt/test2/testinfo.dat index e9e192849a6e..1dca549cc93e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_gcvt/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_gcvt/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_isnan/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_isnan/test1/test1.cpp index d793c9b371dd..6640bc4edcf1 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_isnan/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_isnan/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_isnan/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_isnan/test1/testinfo.dat index d5de17e21952..7762c56edb3c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_isnan/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_isnan/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_isnanf/test1/test1.c b/src/coreclr/src/pal/tests/palsuite/c_runtime/_isnanf/test1/test1.c index 9b75a7236dc1..6fac5a718caf 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_isnanf/test1/test1.c +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_isnanf/test1/test1.c @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_isnanf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_isnanf/test1/testinfo.dat index 22b0edbd748a..362f6426576d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_isnanf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_isnanf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_itow/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_itow/test1/test1.cpp index c8167edc0d34..bd93868a0e41 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_itow/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_itow/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_itow/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_itow/test1/testinfo.dat index 91f0e62e09da..99b24cf89d5a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_itow/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_itow/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_mbsdec/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_mbsdec/test1/test1.cpp index 1cd7513293e9..460f7159da63 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_mbsdec/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_mbsdec/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_mbsdec/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_mbsdec/test1/testinfo.dat index ce2aa29aa549..b8ac7b283b66 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_mbsdec/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_mbsdec/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_mbsinc/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_mbsinc/test1/test1.cpp index 95a5041af28b..868dfb736d88 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_mbsinc/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_mbsinc/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_mbsinc/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_mbsinc/test1/testinfo.dat index 3f3883fa3173..179f66828326 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_mbsinc/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_mbsinc/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_mbsninc/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_mbsninc/test1/test1.cpp index 59ef50dcc36a..5949a550ab40 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_mbsninc/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_mbsninc/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_mbsninc/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_mbsninc/test1/testinfo.dat index b855222af95c..aea76f11eca0 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_mbsninc/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_mbsninc/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_putenv/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_putenv/test1/test1.cpp index 2d096adc78cd..596c0e8dcfcb 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_putenv/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_putenv/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_putenv/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_putenv/test1/testinfo.dat index d0978184fc5d..bf2e6c42ffa4 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_putenv/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_putenv/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_putenv/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_putenv/test2/test2.cpp index 39be4f68b429..170e55ff93b8 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_putenv/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_putenv/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_putenv/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_putenv/test2/testinfo.dat index 8d3a6ced1eea..7f033b4ca243 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_putenv/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_putenv/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_putenv/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_putenv/test3/test3.cpp index 8aa67773073f..c6889821d4db 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_putenv/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_putenv/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_putenv/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_putenv/test3/testinfo.dat index 2c6af1b5cfe2..c1a8b91e1ee1 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_putenv/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_putenv/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_putenv/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_putenv/test4/test4.cpp index 48d7ba963c01..c7b9994a8e10 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_putenv/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_putenv/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_putenv/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_putenv/test4/testinfo.dat index af1a01c2fc53..04ca0daad7e9 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_putenv/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_putenv/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_rotl/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_rotl/test1/test1.cpp index 3a3138889359..19e5cdb805d4 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_rotl/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_rotl/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_rotl/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_rotl/test1/testinfo.dat index 9c87473f8eb9..4232c58bbdf3 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_rotl/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_rotl/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_rotr/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_rotr/test1/test1.cpp index cf461c0a6e40..e90ca0e853bb 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_rotr/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_rotr/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_rotr/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_rotr/test1/testinfo.dat index 915f46766259..e56d80e95800 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_rotr/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_rotr/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/_snprintf_s.h b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/_snprintf_s.h index 9ed5209beadb..35aeffe24e4f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/_snprintf_s.h +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/_snprintf_s.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test1/test1.cpp index d180b05df525..39f91711b561 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test1/testinfo.dat index 255c534cdfd9..dd7e48e96b2d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test10/test10.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test10/test10.cpp index 7ecb9102e4c3..e2f7d4aca34e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test10/test10.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test10/test10.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test10/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test10/testinfo.dat index 25ed554ea3db..5bef07c257d6 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test10/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test10/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test11/test11.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test11/test11.cpp index c2ac0156982d..fc93a3c668df 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test11/test11.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test11/test11.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test11/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test11/testinfo.dat index 3144f1290ecf..c65a26c70812 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test11/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test11/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test12/test12.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test12/test12.cpp index 52171838cc78..c1bee9c77f92 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test12/test12.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test12/test12.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test12/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test12/testinfo.dat index ed91cecc46bd..99db86d551db 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test12/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test12/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test13/test13.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test13/test13.cpp index 15e47558b01a..1e0f0e5383a9 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test13/test13.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test13/test13.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test13/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test13/testinfo.dat index fd5f53017cd4..9ec9a9f53d91 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test13/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test13/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test14/test14.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test14/test14.cpp index 331475e962df..6bcf181a6155 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test14/test14.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test14/test14.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test14/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test14/testinfo.dat index 23cf42335428..d9d2d7dd4ebd 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test14/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test14/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test15/test15.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test15/test15.cpp index d43613b6cfc6..818cb14c8707 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test15/test15.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test15/test15.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test15/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test15/testinfo.dat index 537e6d1db232..458ef784771d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test15/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test15/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test16/test16.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test16/test16.cpp index 21cbb1ed3059..e47bb777dab7 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test16/test16.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test16/test16.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test16/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test16/testinfo.dat index 4e98eccac294..a40e69e53105 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test16/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test16/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test17/test17.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test17/test17.cpp index d161270b84b3..aef1be6a9015 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test17/test17.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test17/test17.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test17/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test17/testinfo.dat index 5e41e20d448b..2782f03bb863 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test17/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test17/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test18/test18.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test18/test18.cpp index 46ec287cc180..34c67f43c15e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test18/test18.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test18/test18.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test18/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test18/testinfo.dat index 06ae3a632e60..e93e01f2b11c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test18/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test18/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test19/test19.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test19/test19.cpp index 91b1dae58302..480b83fd2764 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test19/test19.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test19/test19.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test19/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test19/testinfo.dat index 7064c01771bf..ea56b0bb8f03 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test19/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test19/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test2/test2.cpp index 54ef80bae38e..1c8888ee3881 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test2/testinfo.dat index cce2dc67e749..1ec448495ffc 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test3/test3.cpp index 99c25a654b6a..ed515e7bcd26 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test3/testinfo.dat index cc8de0eae596..cc56fe26478f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test4/test4.cpp index 089e056c7aa9..56b2a0c955ba 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test4/testinfo.dat index f53f784991b7..617c9b2d3e5b 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test6/test6.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test6/test6.cpp index 45c9e2b79bdc..b7ce3fac92ea 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test6/test6.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test6/test6.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test6/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test6/testinfo.dat index 06e31e85d615..0c520ade03e5 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test6/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test6/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test7/test7.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test7/test7.cpp index 5c10fc8ea7b5..0831dfa74961 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test7/test7.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test7/test7.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test7/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test7/testinfo.dat index 647c9d80fd39..38fa9371fe59 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test7/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test7/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test8/test8.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test8/test8.cpp index 416e357e1e38..d034f7572b14 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test8/test8.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test8/test8.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test8/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test8/testinfo.dat index 524834e53e7e..8c9e8cff321b 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test8/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test8/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test9/test9.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test9/test9.cpp index 18b1cb7830db..1877ff9a8071 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test9/test9.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test9/test9.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test9/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test9/testinfo.dat index 7c51443a3d03..beb708ae943c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test9/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snprintf_s/test9/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/_snwprintf_s.h b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/_snwprintf_s.h index 19d192114bd9..021dde0666f0 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/_snwprintf_s.h +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/_snwprintf_s.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test1/test1.cpp index ba85103cb1ea..27a6f7ccaf99 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test1/testinfo.dat index 96d7914ce0a0..5c5d41c9beb2 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test10/test10.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test10/test10.cpp index 298f82b002b4..c5c9fcd2d114 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test10/test10.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test10/test10.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test10/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test10/testinfo.dat index 887bbf76c830..c84916bba073 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test10/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test10/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test11/test11.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test11/test11.cpp index 519668791b41..d82edff596f0 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test11/test11.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test11/test11.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test11/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test11/testinfo.dat index 3bda85e3354f..eb4cbfbda2ba 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test11/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test11/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test12/test12.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test12/test12.cpp index 52780aff0abc..695275bf3e28 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test12/test12.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test12/test12.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test12/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test12/testinfo.dat index d808a3b8f4a7..b2d41d2d1d43 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test12/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test12/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test13/test13.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test13/test13.cpp index fa948b3a1b13..ce579b154874 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test13/test13.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test13/test13.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test13/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test13/testinfo.dat index 2e5800ec31bb..6e0760f01c16 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test13/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test13/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test14/test14.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test14/test14.cpp index aea289d1a1ca..87e44f45fcc9 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test14/test14.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test14/test14.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test14/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test14/testinfo.dat index 25bd5099c97f..1ac436cb395e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test14/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test14/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test15/test15.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test15/test15.cpp index 14db14b49805..58e94f6f73d3 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test15/test15.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test15/test15.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test15/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test15/testinfo.dat index 95d90e82e7d5..654c853070ae 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test15/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test15/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test16/test16.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test16/test16.cpp index 4d9a717f2499..22ddff25770a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test16/test16.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test16/test16.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test16/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test16/testinfo.dat index b81c847c69a3..8a0b2e720cdb 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test16/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test16/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test17/test17.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test17/test17.cpp index 6af1815b858f..8a4d4c2af4b9 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test17/test17.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test17/test17.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test17/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test17/testinfo.dat index d64366702a58..fa7eef03965c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test17/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test17/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test18/test18.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test18/test18.cpp index 020a88509084..d07f8b351a7b 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test18/test18.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test18/test18.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test18/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test18/testinfo.dat index dfc2cd5f4313..eaa0af13cd65 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test18/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test18/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test19/test19.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test19/test19.cpp index d335d1d10c1d..62a55f7b8f4d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test19/test19.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test19/test19.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test19/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test19/testinfo.dat index 95269cdd3968..a18b094dc559 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test19/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test19/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test2/test2.cpp index 7d8dd65c3804..b8c269016861 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test2/testinfo.dat index 88f19816097b..f63b59e2929a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test3/test3.cpp index b4a4a32ae2b9..9439f4c92d28 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test3/testinfo.dat index 5ed59e61ac50..3d707741633c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test4/test4.cpp index cdf2728ba1ef..18317f107b8c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test4/testinfo.dat index 2b35f2d0d346..4b175bd46b83 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test6/test6.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test6/test6.cpp index 576e061acd5b..d30c670f0742 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test6/test6.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test6/test6.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test6/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test6/testinfo.dat index d8db7f833576..aeb753f2dbfa 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test6/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test6/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test7/test7.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test7/test7.cpp index 54dd32b433ca..f3516b44c351 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test7/test7.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test7/test7.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test7/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test7/testinfo.dat index fa5bd3000884..e145f4b113e7 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test7/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test7/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test8/test8.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test8/test8.cpp index 9f1b555e3cbd..3495d2a8c270 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test8/test8.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test8/test8.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test8/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test8/testinfo.dat index d76a421ea320..ed8ba1174378 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test8/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test8/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test9/test9.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test9/test9.cpp index 76d60631a26c..36f14c2a44c9 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test9/test9.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test9/test9.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test9/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test9/testinfo.dat index b2a038df6243..d5f7922809ba 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test9/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_snwprintf_s/test9/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_stricmp/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_stricmp/test1/test1.cpp index 60e2f9eb8b84..af73788e3b53 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_stricmp/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_stricmp/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_stricmp/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_stricmp/test1/testinfo.dat index 89d4e0f57b47..e3f3fdc903fa 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_stricmp/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_stricmp/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_strnicmp/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_strnicmp/test1/test1.cpp index 3c915dc62158..a2d213359a4d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_strnicmp/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_strnicmp/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_strnicmp/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_strnicmp/test1/testinfo.dat index 86744c04df11..716886c7e2da 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_strnicmp/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_strnicmp/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/_vsnprintf_s.h b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/_vsnprintf_s.h index d549bbef51ac..2d644f963456 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/_vsnprintf_s.h +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/_vsnprintf_s.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test1/test1.cpp index db70f5612ba3..37119ac11e27 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test1/testinfo.dat index f96bf084f235..8afb6aa8bd07 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test10/test10.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test10/test10.cpp index 707a91c048f2..dd0eb89b0337 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test10/test10.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test10/test10.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test10/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test10/testinfo.dat index a3d8eca54ee4..af151c49530e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test10/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test10/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test11/test11.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test11/test11.cpp index 4c710e56b07c..ffb8fb029239 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test11/test11.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test11/test11.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test11/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test11/testinfo.dat index 17e9f049469f..d1c5c14be03a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test11/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test11/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test12/test12.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test12/test12.cpp index 528e6582a868..b0af9dc01681 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test12/test12.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test12/test12.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test12/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test12/testinfo.dat index 82f58e437119..0fd1c9c1d014 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test12/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test12/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test13/test13.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test13/test13.cpp index 645a11868224..c029b277cfe6 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test13/test13.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test13/test13.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test13/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test13/testinfo.dat index d308edf87189..1e72c5117850 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test13/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test13/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test14/test14.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test14/test14.cpp index 05965f0ed776..74994e0ede33 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test14/test14.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test14/test14.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test14/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test14/testinfo.dat index 8d11b1d6ff8b..abcbead26d2e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test14/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test14/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test15/test15.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test15/test15.cpp index cd34f74e6c7e..e1010894d86f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test15/test15.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test15/test15.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test15/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test15/testinfo.dat index 913912508e78..6e2e53c902df 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test15/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test15/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test16/test16.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test16/test16.cpp index de9b74f9b3d3..8d71d155e50b 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test16/test16.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test16/test16.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test16/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test16/testinfo.dat index fc2f13071b90..5738e44f8f20 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test16/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test16/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test17/test17.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test17/test17.cpp index 3304eda7f90c..658fb109add7 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test17/test17.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test17/test17.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test17/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test17/testinfo.dat index aeb924495c3e..34d783aaf935 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test17/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test17/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test18/test18.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test18/test18.cpp index 14ad8f583a80..0fc57a75f15b 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test18/test18.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test18/test18.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test18/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test18/testinfo.dat index 57aaed5953f3..cd04495f958e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test18/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test18/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test19/test19.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test19/test19.cpp index 6f2aefa94c6f..9b2227ea0596 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test19/test19.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test19/test19.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test19/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test19/testinfo.dat index cda896686558..73c4a9d0e3ec 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test19/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test19/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test2/test2.cpp index e5808f363eda..f23d4c9f932f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test2/testinfo.dat index 6e8f03e63929..6e79fd7692d1 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test3/test3.cpp index bb8b153b52f2..ec00c09d9c02 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test3/testinfo.dat index 638cef69ef21..7acd05dcfdf4 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test4/test4.cpp index f795c0dc1fd2..1478dbaab79a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test4/testinfo.dat index 03ff2931bca1..8e63da1a8d21 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test6/test6.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test6/test6.cpp index cbcead88b594..1482bc722d57 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test6/test6.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test6/test6.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test6/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test6/testinfo.dat index e375f9238d26..9611f432d3e7 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test6/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test6/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test7/test7.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test7/test7.cpp index 4843d27598a8..f56aa497e92e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test7/test7.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test7/test7.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test7/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test7/testinfo.dat index 09eb481b599b..2eea64b74ac2 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test7/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test7/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test8/test8.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test8/test8.cpp index 8021a797c865..073be3fc0299 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test8/test8.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test8/test8.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test8/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test8/testinfo.dat index 1bdf41198311..691c02d3b128 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test8/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test8/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test9/test9.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test9/test9.cpp index d36846e4013b..f8afbe0409a6 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test9/test9.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test9/test9.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test9/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test9/testinfo.dat index bdaae87ce811..03141bca19db 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test9/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnprintf_s/test9/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/_vsnwprintf_s.h b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/_vsnwprintf_s.h index bca63b45d77a..657fbd948ef1 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/_vsnwprintf_s.h +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/_vsnwprintf_s.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test1/test1.cpp index 4a7a02e77885..1a70f3c95bc4 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test1/testinfo.dat index 450c5b9034e2..a96b906db649 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test10/test10.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test10/test10.cpp index e33f2281dfa8..38df25d6aafe 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test10/test10.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test10/test10.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test10/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test10/testinfo.dat index 59af082f49b5..100bc35dcc25 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test10/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test10/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test11/test11.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test11/test11.cpp index 4e860bbc21cb..c3d0c5e2efcf 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test11/test11.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test11/test11.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test11/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test11/testinfo.dat index 10c0014fca0e..15c728006029 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test11/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test11/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test12/test12.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test12/test12.cpp index 2dcfcf59985c..b2f989f405bb 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test12/test12.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test12/test12.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test12/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test12/testinfo.dat index de089895b9a7..581702733687 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test12/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test12/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test13/test13.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test13/test13.cpp index c95278a56ba3..a505316da632 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test13/test13.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test13/test13.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test13/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test13/testinfo.dat index 94479d527c47..3c689872d099 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test13/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test13/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test14/test14.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test14/test14.cpp index cab1b247dfb9..e5b14b24d004 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test14/test14.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test14/test14.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test14/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test14/testinfo.dat index 0d46d9764995..bc7c6aecee79 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test14/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test14/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test15/test15.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test15/test15.cpp index d5738991a60d..a61648d43d3e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test15/test15.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test15/test15.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test15/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test15/testinfo.dat index 7737f49a35c9..b5f6a0e40101 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test15/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test15/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test16/test16.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test16/test16.cpp index 72c546eb6357..4cc272b478ae 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test16/test16.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test16/test16.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test16/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test16/testinfo.dat index 9aec1c008a2a..17bbd3f69629 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test16/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test16/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test17/test17.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test17/test17.cpp index e6860b930fb3..41edb8f05180 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test17/test17.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test17/test17.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test17/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test17/testinfo.dat index 1487b7a17e5d..e8ca626f7934 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test17/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test17/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test18/test18.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test18/test18.cpp index a164edbc0f66..fdac25414a56 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test18/test18.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test18/test18.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test18/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test18/testinfo.dat index 54c4e87c89a9..be1034930430 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test18/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test18/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test19/test19.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test19/test19.cpp index c2a85478ae9b..dcb6d758e319 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test19/test19.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test19/test19.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test19/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test19/testinfo.dat index 2913e304062b..ef3e466d6c1e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test19/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test19/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test2/test2.cpp index b2958dfa8d52..6f0026ec34a4 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test2/testinfo.dat index 5b9b6292dc6b..9d30e1c586de 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test3/test3.cpp index 657a911b5c42..e238a35194d0 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test3/testinfo.dat index 62160695e6d9..22e9b85ee0ea 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test4/test4.cpp index acf9abadae96..fa553982b931 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test4/testinfo.dat index 9fbfcba5cf52..991a73ce90a2 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test6/test6.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test6/test6.cpp index ecba5853a6b0..79335d0b2d22 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test6/test6.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test6/test6.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test6/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test6/testinfo.dat index 1b411d79822b..c93821024e66 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test6/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test6/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test7/test7.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test7/test7.cpp index 519657a20265..898f3f0f411f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test7/test7.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test7/test7.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test7/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test7/testinfo.dat index 8f2ccf0b5826..3b36ecec6a60 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test7/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test7/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test8/test8.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test8/test8.cpp index 15641f7b9e98..9bf5f6c37c95 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test8/test8.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test8/test8.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test8/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test8/testinfo.dat index 905740c1bb3d..c09cdac6277b 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test8/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test8/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test9/test9.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test9/test9.cpp index 38f6be21e785..f3cfb5dbb79b 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test9/test9.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test9/test9.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test9/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test9/testinfo.dat index 974efdb4cf51..a166a92cc7f0 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test9/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_vsnwprintf_s/test9/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wcsicmp/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wcsicmp/test1/test1.cpp index dd4bb54680e4..3b063b469fdc 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wcsicmp/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wcsicmp/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wcsicmp/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wcsicmp/test1/testinfo.dat index 9351a156e0ed..0fbf1a06c17a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wcsicmp/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wcsicmp/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wcslwr/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wcslwr/test1/test1.cpp index 3a758de39bb7..9426c1eb4334 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wcslwr/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wcslwr/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wcslwr/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wcslwr/test1/testinfo.dat index 5d691d84d98b..3579b4d4a058 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wcslwr/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wcslwr/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wcsnicmp/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wcsnicmp/test1/test1.cpp index 0271bcc60d47..05ef6c24df06 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wcsnicmp/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wcsnicmp/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wcsnicmp/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wcsnicmp/test1/testinfo.dat index df49cc1a9acd..9f3f97a570f6 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wcsnicmp/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wcsnicmp/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test1/test1.cpp index 93fdb012d25f..a13f222fccd5 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test1/testinfo.dat index 6514137c2f1a..2ca737be79b4 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test2/test2.cpp index 921ffef19daf..6f46cd74e846 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test2/testinfo.dat index 3ed2e3bbedbc..ab79c00e6d83 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test3/test3.cpp index 3b67818bc57a..bda512add38a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test3/testinfo.dat index 3dd23e794655..cc8ca9137594 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test4/test4.cpp index 0948fa11ccdc..e865cbcb9787 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test4/testinfo.dat index de41d7731719..9413f99556d8 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test5/test5.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test5/test5.cpp index 21e5ec84ed6a..58abf0a5eafb 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test5/test5.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test5/test5.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test5/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test5/testinfo.dat index 6be33cb2be6c..dc3574984454 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test5/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test5/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test6/test6.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test6/test6.cpp index 17d36a0c5065..c64c4a0a9c21 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test6/test6.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test6/test6.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test6/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test6/testinfo.dat index 832f1024161c..4201a2e168da 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test6/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test6/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test7/test7.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test7/test7.cpp index 0a889adc8ab6..7f13df415238 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test7/test7.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test7/test7.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test7/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test7/testinfo.dat index 0c50efb759a6..33d6252de83a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test7/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wfopen/test7/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wtoi/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wtoi/test1/test1.cpp index 0b14dedd60ac..0829af706060 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wtoi/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wtoi/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wtoi/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wtoi/test1/testinfo.dat index 4a1f21d4b902..5d2801d5d1f9 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/_wtoi/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/_wtoi/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/abs/test1/abs.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/abs/test1/abs.cpp index 233a5dcb3012..b567c37a93d3 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/abs/test1/abs.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/abs/test1/abs.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/abs/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/abs/test1/testinfo.dat index 98e2af21d4b9..1719a0c55056 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/abs/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/abs/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/acos/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/acos/test1/test1.cpp index c6ed0692c797..4c6cceb4d1c4 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/acos/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/acos/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/acos/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/acos/test1/testinfo.dat index 4b43982fca5f..877437d8f390 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/acos/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/acos/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/acosf/test1/test1.c b/src/coreclr/src/pal/tests/palsuite/c_runtime/acosf/test1/test1.c index 3d8668cebb7a..8d612ab40d1d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/acosf/test1/test1.c +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/acosf/test1/test1.c @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/acosf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/acosf/test1/testinfo.dat index 41cead33bbd6..de8fedaed3cc 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/acosf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/acosf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/acosh/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/acosh/test1/test1.cpp index 14ff430c05ae..4ffa84211fdf 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/acosh/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/acosh/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/acosh/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/acosh/test1/testinfo.dat index 32d69ee47422..e20077a9a89e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/acosh/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/acosh/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/acoshf/test1/test1.c b/src/coreclr/src/pal/tests/palsuite/c_runtime/acoshf/test1/test1.c index 2209999736b5..6f6b7f59a869 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/acoshf/test1/test1.c +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/acoshf/test1/test1.c @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/acoshf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/acoshf/test1/testinfo.dat index 07d78ad10601..c6968845412d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/acoshf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/acoshf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/asin/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/asin/test1/test1.cpp index 0a63356ed038..4c1856721318 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/asin/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/asin/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/asin/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/asin/test1/testinfo.dat index fba9f95a2134..54b0ac574daf 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/asin/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/asin/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/asinf/test1/test1.c b/src/coreclr/src/pal/tests/palsuite/c_runtime/asinf/test1/test1.c index 773015eec0a1..e249cb7f1e4a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/asinf/test1/test1.c +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/asinf/test1/test1.c @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/asinf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/asinf/test1/testinfo.dat index ca2dd42150e7..2e6622d7a551 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/asinf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/asinf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/asinh/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/asinh/test1/test1.cpp index 64c1e4a74fc4..28304f108d47 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/asinh/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/asinh/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/asinh/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/asinh/test1/testinfo.dat index c5e9530d926f..871186907070 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/asinh/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/asinh/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/asinhf/test1/test1.c b/src/coreclr/src/pal/tests/palsuite/c_runtime/asinhf/test1/test1.c index 6ecb8d93ce4b..d052781e5849 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/asinhf/test1/test1.c +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/asinhf/test1/test1.c @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/asinhf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/asinhf/test1/testinfo.dat index 023796b1449e..0e56de6faffe 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/asinhf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/asinhf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/atan/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/atan/test1/test1.cpp index 6840d4617242..8677c52acd8a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/atan/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/atan/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/atan/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/atan/test1/testinfo.dat index 8a181b8a94a6..e823c2d55a8f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/atan/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/atan/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/atan2/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/atan2/test1/test1.cpp index 15aa8f53b91c..889ea90c9ca3 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/atan2/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/atan2/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/atan2/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/atan2/test1/testinfo.dat index 78fb09118e13..45241063cc88 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/atan2/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/atan2/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/atan2f/test1/test1.c b/src/coreclr/src/pal/tests/palsuite/c_runtime/atan2f/test1/test1.c index 2ee641e8d4aa..b00d4e55eeee 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/atan2f/test1/test1.c +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/atan2f/test1/test1.c @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/atan2f/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/atan2f/test1/testinfo.dat index bd9a9d9b9395..225a3c7b4fca 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/atan2f/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/atan2f/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/atanf/test1/test1.c b/src/coreclr/src/pal/tests/palsuite/c_runtime/atanf/test1/test1.c index 543a0a8168bc..3d460d3e25c6 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/atanf/test1/test1.c +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/atanf/test1/test1.c @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/atanf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/atanf/test1/testinfo.dat index 0d184272a243..4924a2a15d93 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/atanf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/atanf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/atanh/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/atanh/test1/test1.cpp index d454f3272cb6..3531e765ff8f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/atanh/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/atanh/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/atanh/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/atanh/test1/testinfo.dat index 55e1db7c0c6f..32a68acb851b 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/atanh/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/atanh/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/atanhf/test1/test1.c b/src/coreclr/src/pal/tests/palsuite/c_runtime/atanhf/test1/test1.c index 3fd3ab8bdb27..3c3a156035ad 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/atanhf/test1/test1.c +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/atanhf/test1/test1.c @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/atanhf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/atanhf/test1/testinfo.dat index 842c0d9ecf7d..4f8217652a3b 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/atanhf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/atanhf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/atof/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/atof/test1/test1.cpp index a973133f9ec1..e708d7a42fb6 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/atof/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/atof/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/atof/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/atof/test1/testinfo.dat index 7f37affb9c7d..d108278e93b2 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/atof/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/atof/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/atoi/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/atoi/test1/test1.cpp index 2554d4c353c2..38e42862cc4c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/atoi/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/atoi/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/atoi/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/atoi/test1/testinfo.dat index 36a1a4499ff4..161812238f14 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/atoi/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/atoi/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/bsearch/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/bsearch/test1/test1.cpp index c4b91738ebc0..b00ec2832122 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/bsearch/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/bsearch/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/bsearch/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/bsearch/test1/testinfo.dat index 3eb7369ac2ba..eaae5e0add98 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/bsearch/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/bsearch/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/bsearch/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/bsearch/test2/test2.cpp index 6de1b3fadad2..08440728c067 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/bsearch/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/bsearch/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/bsearch/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/bsearch/test2/testinfo.dat index faa9dc1be609..4d149e26a4fe 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/bsearch/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/bsearch/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/cbrt/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/cbrt/test1/test1.cpp index 471b6a4641ad..aca178fc1afb 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/cbrt/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/cbrt/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/cbrt/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/cbrt/test1/testinfo.dat index ddb926ae1702..03981d2f1535 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/cbrt/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/cbrt/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/cbrtf/test1/test1.c b/src/coreclr/src/pal/tests/palsuite/c_runtime/cbrtf/test1/test1.c index b13d829fbb48..a4acb920d7dc 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/cbrtf/test1/test1.c +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/cbrtf/test1/test1.c @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/cbrtf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/cbrtf/test1/testinfo.dat index e42cf2659f2a..73264ba8478c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/cbrtf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/cbrtf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/ceil/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/ceil/test1/test1.cpp index e6e36e6e33b2..594c4d794792 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/ceil/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/ceil/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/ceil/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/ceil/test1/testinfo.dat index 84e80a9cb7d9..e3a13421a13c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/ceil/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/ceil/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/ceilf/test1/test1.c b/src/coreclr/src/pal/tests/palsuite/c_runtime/ceilf/test1/test1.c index 4939fb7ccf29..2b3534dd8304 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/ceilf/test1/test1.c +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/ceilf/test1/test1.c @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/ceilf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/ceilf/test1/testinfo.dat index 095b8b216ae0..c10be6890b1f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/ceilf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/ceilf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/cos/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/cos/test1/test1.cpp index 8c1c7300e69b..ffbd61bdcb16 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/cos/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/cos/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/cos/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/cos/test1/testinfo.dat index 9e57b7f8ab21..39a176459fd7 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/cos/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/cos/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/cosf/test1/test1.c b/src/coreclr/src/pal/tests/palsuite/c_runtime/cosf/test1/test1.c index 210851a2fa54..d9c75152c189 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/cosf/test1/test1.c +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/cosf/test1/test1.c @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/cosf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/cosf/test1/testinfo.dat index a0265add2f3b..f6596c47bacf 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/cosf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/cosf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/cosh/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/cosh/test1/test1.cpp index 40c2fca85ddc..4c23816621a9 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/cosh/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/cosh/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/cosh/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/cosh/test1/testinfo.dat index 131512289f11..1308e92e3a45 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/cosh/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/cosh/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/coshf/test1/test1.c b/src/coreclr/src/pal/tests/palsuite/c_runtime/coshf/test1/test1.c index e1ab745acb0e..f62e7377420b 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/coshf/test1/test1.c +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/coshf/test1/test1.c @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/coshf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/coshf/test1/testinfo.dat index 814ed98698ee..a953630cda9f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/coshf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/coshf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/errno/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/errno/test1/test1.cpp index e1dd4a6b36d4..0a7da4a644c7 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/errno/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/errno/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/errno/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/errno/test1/testinfo.dat index 3291dbc60aad..21bcff79efc3 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/errno/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/errno/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/errno/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/errno/test2/test2.cpp index f418d2f19994..2c5e42d00592 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/errno/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/errno/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/errno/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/errno/test2/testinfo.dat index 90c232866fa8..1b79738d96ab 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/errno/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/errno/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/exit/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/exit/test1/test1.cpp index 87c9d22b8ac6..201e798e909f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/exit/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/exit/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/exit/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/exit/test1/testinfo.dat index 3d9583bf966f..8ee95bdcb9d2 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/exit/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/exit/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/exit/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/exit/test2/test2.cpp index 16fbdfed2f48..c5cb862740e6 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/exit/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/exit/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/exit/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/exit/test2/testinfo.dat index 6887f27c36d2..c913ec694644 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/exit/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/exit/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/exp/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/exp/test1/test1.cpp index 20e071aa68e4..c18e31b97830 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/exp/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/exp/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/exp/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/exp/test1/testinfo.dat index 65fc192cd94c..9014536f5017 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/exp/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/exp/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/expf/test1/test1.c b/src/coreclr/src/pal/tests/palsuite/c_runtime/expf/test1/test1.c index 32f4e8d26ccc..1ef28a44085a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/expf/test1/test1.c +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/expf/test1/test1.c @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/expf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/expf/test1/testinfo.dat index c35928501e3c..9ed119e12975 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/expf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/expf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fabs/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fabs/test1/test1.cpp index 0a74d5c1c55d..e505a21d3bb8 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fabs/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fabs/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fabs/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fabs/test1/testinfo.dat index d5b2321edd3e..41ba9d82fbad 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fabs/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fabs/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fabsf/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fabsf/test1/test1.cpp index 0b020729b8d1..db46814c87a4 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fabsf/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fabsf/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fabsf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fabsf/test1/testinfo.dat index a927f1e3df8b..e58a7b95df1b 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fabsf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fabsf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fclose/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fclose/test1/test1.cpp index 0a8463823ddc..9771dc5e3113 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fclose/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fclose/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fclose/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fclose/test1/testinfo.dat index 0904c4fa9d23..8854bfb0eeb2 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fclose/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fclose/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fclose/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fclose/test2/test2.cpp index f4da53553520..0ba288485890 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fclose/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fclose/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fclose/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fclose/test2/testinfo.dat index 192b8d2f6bc1..d487fec74152 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fclose/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fclose/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/ferror/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/ferror/test1/test1.cpp index 516f2531eda4..dbc8a6e240fd 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/ferror/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/ferror/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/ferror/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/ferror/test1/testinfo.dat index 32e55a3b0d4d..eba507af4ab7 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/ferror/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/ferror/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/ferror/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/ferror/test2/test2.cpp index fdf9e032c854..2e597e788856 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/ferror/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/ferror/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/ferror/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/ferror/test2/testinfo.dat index d724a4c4e783..c230d3009635 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/ferror/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/ferror/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fflush/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fflush/test1/test1.cpp index 7baf9ba5b971..d9a22dae857e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fflush/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fflush/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fflush/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fflush/test1/testinfo.dat index 1cff5a94a1a2..1bde5c32bac6 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fflush/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fflush/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fgets/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fgets/test1/test1.cpp index 5e0e62dece49..55759e9e9b48 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fgets/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fgets/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fgets/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fgets/test1/testinfo.dat index 70ea6690caca..f319b9445a82 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fgets/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fgets/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fgets/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fgets/test2/test2.cpp index fa37cdbc13f6..36c21fc56bbe 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fgets/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fgets/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fgets/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fgets/test2/testinfo.dat index d282dbaa65b0..8687e6aedcf2 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fgets/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fgets/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fgets/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fgets/test3/test3.cpp index 525ba9327f46..bf8074f4a4a2 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fgets/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fgets/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fgets/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fgets/test3/testinfo.dat index e10cf899688c..f4549d917336 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fgets/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fgets/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/floor/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/floor/test1/test1.cpp index dba320919bbe..a9837bfcd55a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/floor/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/floor/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/floor/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/floor/test1/testinfo.dat index 90543ea7afad..250ad8a28426 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/floor/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/floor/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/floorf/test1/test1.c b/src/coreclr/src/pal/tests/palsuite/c_runtime/floorf/test1/test1.c index 57dca21382ed..0a1e722e0801 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/floorf/test1/test1.c +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/floorf/test1/test1.c @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/floorf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/floorf/test1/testinfo.dat index 006540141aaa..b64c1789f4eb 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/floorf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/floorf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fma/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fma/test1/test1.cpp index b7d515dafc4f..67aced025353 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fma/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fma/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fma/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fma/test1/testinfo.dat index 22bf0e70a148..daa452056d55 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fma/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fma/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fmaf/test1/test1.c b/src/coreclr/src/pal/tests/palsuite/c_runtime/fmaf/test1/test1.c index 6c48d566e4c6..34b63f6c0d28 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fmaf/test1/test1.c +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fmaf/test1/test1.c @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fmaf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fmaf/test1/testinfo.dat index 8ca9fb733012..d62caa5bc545 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fmaf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fmaf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fmod/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fmod/test1/test1.cpp index fd69ca52cb36..cf4ec5891dfc 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fmod/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fmod/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fmod/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fmod/test1/testinfo.dat index 0a81fd80e08f..ff196cad90ad 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fmod/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fmod/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fmodf/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fmodf/test1/test1.cpp index 31b45d360688..9768db041b75 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fmodf/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fmodf/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fmodf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fmodf/test1/testinfo.dat index 11c79789254e..6c9ac05fe63c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fmodf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fmodf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test1/test1.cpp index 565b4eb77db9..42009e8acf0d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test1/testinfo.dat index d9908549ea18..efff7c8005ca 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test2/test2.cpp index 4026efe89aeb..8c66c66fcd69 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test2/testinfo.dat index 4c1a0095f872..0201327fb163 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test3/test3.cpp index f3af42dc8a07..fd1a7976d619 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test3/testinfo.dat index c458c1196a14..3b9864641b35 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test4/test4.cpp index 04683d52c5d5..83c6987397d1 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test4/testinfo.dat index a1ecaf959b54..ba3a6c59518f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test5/test5.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test5/test5.cpp index 0a760314e154..81428a4dcfca 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test5/test5.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test5/test5.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test5/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test5/testinfo.dat index 8f8f5d950b33..5528ec39b500 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test5/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test5/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test6/test6.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test6/test6.cpp index 03b6067fdd03..7e55b0963c47 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test6/test6.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test6/test6.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test6/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test6/testinfo.dat index 5edd94416d6d..c28ce15b9750 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test6/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test6/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test7/test7.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test7/test7.cpp index 3ef8602ddb03..719ed7d08252 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test7/test7.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test7/test7.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test7/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test7/testinfo.dat index e4bc99c91056..642695288ed3 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test7/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fopen/test7/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/fprintf.h b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/fprintf.h index 87ee0d12323f..beead0eee58c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/fprintf.h +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/fprintf.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*NOTE: The creation of the test file within each function is because the FILE diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test1/test1.cpp index d55fc2534ce7..b97ed0e1b923 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test1/testinfo.dat index be3bf4b78a11..e5049fea0506 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test10/test10.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test10/test10.cpp index 5988e8da74ab..b7061b62ac02 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test10/test10.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test10/test10.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test10/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test10/testinfo.dat index 7afffeaf75b8..f7704dd56738 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test10/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test10/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test11/test11.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test11/test11.cpp index 01880552b756..4451ccdb5ac7 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test11/test11.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test11/test11.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test11/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test11/testinfo.dat index 8275f0f7cee5..8a7084e1b04e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test11/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test11/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test12/test12.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test12/test12.cpp index 0292e150141f..db65b1c44582 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test12/test12.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test12/test12.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test12/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test12/testinfo.dat index 4b44cfc3133d..80f855c05872 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test12/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test12/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test13/test13.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test13/test13.cpp index e171aeacce24..7a29345aa777 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test13/test13.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test13/test13.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test13/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test13/testinfo.dat index ae983ec78a99..49c0c469fda3 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test13/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test13/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test14/test14.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test14/test14.cpp index 5d7d77387d9a..1396181e467f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test14/test14.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test14/test14.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test14/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test14/testinfo.dat index f0a843f480d4..0628542f3e3e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test14/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test14/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test15/test15.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test15/test15.cpp index d024bdbd8a69..0a1d25880d14 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test15/test15.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test15/test15.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test15/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test15/testinfo.dat index fedabca3c6c5..af6d4f56bd46 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test15/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test15/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test16/test16.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test16/test16.cpp index 079faeaf596d..e68876a12f55 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test16/test16.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test16/test16.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test16/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test16/testinfo.dat index ef93c7c05dcb..1bbed723c366 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test16/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test16/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test17/test17.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test17/test17.cpp index 7bd817d7db60..a2b366c184c3 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test17/test17.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test17/test17.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test17/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test17/testinfo.dat index 420703c66854..014c9c60d00b 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test17/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test17/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test18/test18.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test18/test18.cpp index 6582c41e0fd2..6c28d6d8d3f1 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test18/test18.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test18/test18.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test18/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test18/testinfo.dat index 129febec27ed..a1bd6109c49e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test18/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test18/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test19/test19.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test19/test19.cpp index 9d9a28c325f3..7e82b98311db 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test19/test19.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test19/test19.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test19/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test19/testinfo.dat index 25025b920af0..d30e57dfa2e3 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test19/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test19/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test2/test2.cpp index 1441827489e4..79c638027dee 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test2/testinfo.dat index d4c7dbff436b..eac39643ac94 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test3/test3.cpp index dd34c085368b..8819aa36c352 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test3/testinfo.dat index 88a1b03a7fb1..9fa452afa34b 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test4/test4.cpp index 4af4d1af6184..00450ba852f1 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test4/testinfo.dat index 5f373ac23075..cbea30319754 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test5/test5.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test5/test5.cpp index c53e3f45b468..8318b1a83ef7 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test5/test5.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test5/test5.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test5/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test5/testinfo.dat index b4d0e81777e7..ac3e1e9dafd7 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test5/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test5/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test6/test6.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test6/test6.cpp index 0a8bc6b103e8..0de4fedc065e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test6/test6.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test6/test6.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test6/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test6/testinfo.dat index a8a071ca2119..cbad94d74a86 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test6/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test6/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test7/test7.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test7/test7.cpp index 088e328de5ca..12bb0e595d4f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test7/test7.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test7/test7.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test7/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test7/testinfo.dat index fc12718063e3..aef742a3dcb7 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test7/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test7/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test8/test8.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test8/test8.cpp index c781abc96875..a59cee3caa3a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test8/test8.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test8/test8.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test8/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test8/testinfo.dat index 26092607868b..e18af7dd2ad7 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test8/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test8/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test9/test9.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test9/test9.cpp index 3b06daec4845..978a06177d2a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test9/test9.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test9/test9.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test9/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test9/testinfo.dat index e502af70b261..6a8ae9653a82 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test9/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fprintf/test9/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fputs/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fputs/test1/test1.cpp index b90ea082e92a..e4e0443faa60 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fputs/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fputs/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fputs/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fputs/test1/testinfo.dat index bdef09c60fe5..199eb4684af6 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fputs/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fputs/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fputs/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fputs/test2/test2.cpp index b8e2f410bbf8..3b1c8baf4bcf 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fputs/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fputs/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fputs/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fputs/test2/testinfo.dat index 0e2abbdc305a..923eaf11afd9 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fputs/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fputs/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fread/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fread/test1/test1.cpp index b706b2e91ca4..95d60d544eb7 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fread/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fread/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fread/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fread/test1/testinfo.dat index 0f8b86061689..79351d10fc3a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fread/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fread/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fread/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fread/test2/test2.cpp index d7262a932167..53f5f6b1cbfd 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fread/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fread/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fread/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fread/test2/testinfo.dat index a73c0ecf9e49..06205cef6692 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fread/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fread/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fread/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fread/test3/test3.cpp index 8c79bee582ff..c4998ab8230c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fread/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fread/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fread/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fread/test3/testinfo.dat index 95bc30ebcf76..9662aeb5b6e6 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fread/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fread/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/free/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/free/test1/test1.cpp index 4ff8dfb0945c..ca49da436fd4 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/free/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/free/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/free/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/free/test1/testinfo.dat index 5bf400ce2754..a220635ee5cb 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/free/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/free/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fseek/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fseek/test1/test1.cpp index dd1e87ea8d4f..2fd1144571a8 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fseek/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fseek/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fseek/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fseek/test1/testinfo.dat index 788f8d4beabb..32e862db75e1 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fseek/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fseek/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/ftell/test1/ftell.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/ftell/test1/ftell.cpp index 66e0854847a5..b5900887e5d9 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/ftell/test1/ftell.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/ftell/test1/ftell.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/ftell/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/ftell/test1/testinfo.dat index c17ec9ad9933..e4f2333213c8 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/ftell/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/ftell/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = c_runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/fwprintf.h b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/fwprintf.h index eed0e7648477..f6bfc10918b4 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/fwprintf.h +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/fwprintf.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test1/test1.cpp index 8a171db52aec..784ddbfcab4c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test1/testinfo.dat index 3bef5c638413..0e86460b2c02 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test10/test10.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test10/test10.cpp index 3aa2c45c7c39..1e1574df0d99 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test10/test10.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test10/test10.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test10/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test10/testinfo.dat index 17902cb7fcab..43032b16964f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test10/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test10/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test11/test11.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test11/test11.cpp index 5867cd64fbb3..ba01c9e5274d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test11/test11.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test11/test11.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test11/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test11/testinfo.dat index beda0cc3ab1c..e8a4ac891887 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test11/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test11/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test12/test12.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test12/test12.cpp index 48a61234235c..86ae29c159d2 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test12/test12.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test12/test12.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test12/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test12/testinfo.dat index 3d0bf4c8f84c..b33156ad2ecc 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test12/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test12/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test13/test13.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test13/test13.cpp index 6eabec6c7719..ee8a0d7fb2a7 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test13/test13.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test13/test13.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test13/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test13/testinfo.dat index c3222e7c9ee8..b8e7eaca0c3e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test13/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test13/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test14/test14.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test14/test14.cpp index 001cf726891e..397f7a1e2b67 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test14/test14.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test14/test14.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test14/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test14/testinfo.dat index a723f76083e9..fc9947b4cee6 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test14/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test14/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test15/test15.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test15/test15.cpp index 9dfe82ecccd9..672eb51402c7 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test15/test15.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test15/test15.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test15/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test15/testinfo.dat index 246072f797f5..d9370d186b78 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test15/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test15/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test16/test16.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test16/test16.cpp index 1969be182407..1aa29b82c053 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test16/test16.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test16/test16.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test16/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test16/testinfo.dat index 9e5faf9baf21..7b9b7cf57756 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test16/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test16/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test17/test17.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test17/test17.cpp index 66b12716d0bb..67d3156a6df7 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test17/test17.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test17/test17.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test17/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test17/testinfo.dat index fe637d744ce5..6d12af33a776 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test17/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test17/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test18/test18.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test18/test18.cpp index a33dea39b33e..001acd1eb600 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test18/test18.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test18/test18.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test18/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test18/testinfo.dat index 23f621733bac..839f5edcae34 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test18/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test18/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test19/test19.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test19/test19.cpp index a407c9f4bda9..1c4ac0122846 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test19/test19.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test19/test19.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test19/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test19/testinfo.dat index 24aa8778c3db..4161de7f43a6 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test19/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test19/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test2/test2.cpp index 1e03147619a9..79e1c3825040 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test2/testinfo.dat index 1933682f245a..22e41fd9e3e6 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test3/test3.cpp index ff24aa715f66..425526ad8ce0 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test3/testinfo.dat index fa8a0bcf75a5..12d078a5c70e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test4/test4.cpp index ba0cafba01ae..389e3ed81adc 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test4/testinfo.dat index 92140c29bb0f..75caf169182a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test5/test5.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test5/test5.cpp index 9d959890904a..635c0128eece 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test5/test5.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test5/test5.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test5/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test5/testinfo.dat index 152f56334b64..1136506c4f79 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test5/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test5/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test6/test6.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test6/test6.cpp index 160ff524e08b..b8cf52e8bfd1 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test6/test6.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test6/test6.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test6/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test6/testinfo.dat index cc968bdf7f94..30b4cae7da93 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test6/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test6/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test7/test7.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test7/test7.cpp index c5515a8640c9..87beeb630d26 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test7/test7.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test7/test7.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test7/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test7/testinfo.dat index 46cb35cf4b88..23ae9df79851 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test7/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test7/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test8/test8.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test8/test8.cpp index efc81a954a6f..242e0ca9a8b1 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test8/test8.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test8/test8.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test8/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test8/testinfo.dat index c8ce33acb904..e5bc8f086eaf 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test8/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test8/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test9/test9.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test9/test9.cpp index 23db2d8971db..3c252af99638 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test9/test9.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test9/test9.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test9/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test9/testinfo.dat index 5c2ec25ab5c3..266f1176ace2 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test9/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwprintf/test9/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwrite/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwrite/test1/test1.cpp index 392522879fdc..70e7deb245e5 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwrite/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwrite/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwrite/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwrite/test1/testinfo.dat index 75ad9ed05d39..c14a988fd4a2 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/fwrite/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/fwrite/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/getenv/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/getenv/test1/test1.cpp index 0fb9025c8f21..d7361d7de178 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/getenv/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/getenv/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/getenv/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/getenv/test1/testinfo.dat index b9cbf71986d0..9d0485bd8b05 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/getenv/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/getenv/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/getenv/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/getenv/test2/test2.cpp index 26f245fcceff..c0d2d27733fc 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/getenv/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/getenv/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/getenv/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/getenv/test2/testinfo.dat index 90a4ac5affdb..1151f19590a7 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/getenv/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/getenv/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/getenv/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/getenv/test3/test3.cpp index 1eefd9d40ca0..ca734748b0bd 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/getenv/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/getenv/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/getenv/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/getenv/test3/testinfo.dat index 6e12fc438562..ccec02c70cdb 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/getenv/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/getenv/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/ilogb/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/ilogb/test1/test1.cpp index 0757e4e7ac72..67290f598f9c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/ilogb/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/ilogb/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/ilogb/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/ilogb/test1/testinfo.dat index 05549dbd2f25..4d224a437db8 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/ilogb/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/ilogb/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/ilogbf/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/ilogbf/test1/test1.cpp index faa9f268cb7d..b224e2059902 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/ilogbf/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/ilogbf/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/ilogbf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/ilogbf/test1/testinfo.dat index 8337bba44d27..a34d80a551d6 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/ilogbf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/ilogbf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/isalnum/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/isalnum/test1/test1.cpp index d9cdfcadf670..78560d5320d3 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/isalnum/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/isalnum/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/isalnum/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/isalnum/test1/testinfo.dat index ba8f07a722d1..78d8cd2ee423 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/isalnum/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/isalnum/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/isalpha/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/isalpha/test1/test1.cpp index b494d14a9239..7e125b4817b9 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/isalpha/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/isalpha/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/isalpha/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/isalpha/test1/testinfo.dat index 7d508366e83d..3c1ea87c2cd8 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/isalpha/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/isalpha/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/isdigit/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/isdigit/test1/test1.cpp index ad2344827f40..28f2b08a8b3f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/isdigit/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/isdigit/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/isdigit/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/isdigit/test1/testinfo.dat index eb2373916468..66e1e117e002 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/isdigit/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/isdigit/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/islower/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/islower/test1/test1.cpp index c8e877b70583..77b99843b550 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/islower/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/islower/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/islower/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/islower/test1/testinfo.dat index 49a6fb761d8a..72caf94d43c5 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/islower/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/islower/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/isprint/test1/isprint.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/isprint/test1/isprint.cpp index 54db666bf2b1..57d1d5159565 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/isprint/test1/isprint.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/isprint/test1/isprint.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/isprint/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/isprint/test1/testinfo.dat index c9b9ec07ea13..15e53e398142 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/isprint/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/isprint/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/isprint/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/isprint/test2/test2.cpp index 2170c47a1465..08591afc7f21 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/isprint/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/isprint/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/isprint/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/isprint/test2/testinfo.dat index e115278edb62..ebd114d38f06 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/isprint/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/isprint/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/isspace/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/isspace/test1/test1.cpp index 6cd1ce878b83..d5806ad72847 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/isspace/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/isspace/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/isspace/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/isspace/test1/testinfo.dat index fe9926e8c82b..2ac42ae0f7cb 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/isspace/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/isspace/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/isupper/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/isupper/test1/test1.cpp index b88bcc4a7eb0..b48944299196 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/isupper/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/isupper/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/isupper/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/isupper/test1/testinfo.dat index fb2648a52610..7cd4c66bb58f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/isupper/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/isupper/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/iswdigit/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/iswdigit/test1/test1.cpp index b4fe3b3140da..8b82b11e9401 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/iswdigit/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/iswdigit/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/iswdigit/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/iswdigit/test1/testinfo.dat index 345c9d5661eb..c9bf834b0d91 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/iswdigit/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/iswdigit/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/iswprint/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/iswprint/test1/test1.cpp index 08a985b2d64a..ac6e9246227b 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/iswprint/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/iswprint/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/iswprint/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/iswprint/test1/testinfo.dat index c425967b9705..e99abf3a5e55 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/iswprint/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/iswprint/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/iswspace/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/iswspace/test1/test1.cpp index c58997812ef2..14b78b4ec540 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/iswspace/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/iswspace/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/iswspace/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/iswspace/test1/testinfo.dat index 0368052b912a..d401868b2dea 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/iswspace/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/iswspace/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/iswupper/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/iswupper/test1/test1.cpp index a01686be44ad..116021306674 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/iswupper/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/iswupper/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/iswupper/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/iswupper/test1/testinfo.dat index 22131e40acbb..14c4ac8c95e7 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/iswupper/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/iswupper/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/isxdigit/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/isxdigit/test1/test1.cpp index be25af233cea..bbca8e1d2254 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/isxdigit/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/isxdigit/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/isxdigit/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/isxdigit/test1/testinfo.dat index fd031f0768d1..983902fde35d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/isxdigit/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/isxdigit/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/llabs/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/llabs/test1/test1.cpp index 044e22f13448..a6ea7d475e50 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/llabs/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/llabs/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/llabs/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/llabs/test1/testinfo.dat index b1b76377bf18..9d3b744cb3b0 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/llabs/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/llabs/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/log/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/log/test1/test1.cpp index eea592dd4519..9c8f72cafccb 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/log/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/log/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/log/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/log/test1/testinfo.dat index 6b984f6ebaf2..674932298799 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/log/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/log/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/log10/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/log10/test1/test1.cpp index 13711a752e4a..b1444528c618 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/log10/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/log10/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/log10/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/log10/test1/testinfo.dat index 887bace692e1..1068593a04f4 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/log10/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/log10/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/log10f/test1/test1.c b/src/coreclr/src/pal/tests/palsuite/c_runtime/log10f/test1/test1.c index e7c8c2f28b6a..d43ef2f43e9e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/log10f/test1/test1.c +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/log10f/test1/test1.c @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/log10f/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/log10f/test1/testinfo.dat index 175ee3ab092d..591853bc1dd8 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/log10f/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/log10f/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/log2/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/log2/test1/test1.cpp index 0f73fa16a737..c453e102a5fb 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/log2/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/log2/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/log2/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/log2/test1/testinfo.dat index ef6268e079e5..14c34b08a0ef 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/log2/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/log2/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/log2f/test1/test1.c b/src/coreclr/src/pal/tests/palsuite/c_runtime/log2f/test1/test1.c index ed62e6320499..a4195d051b7e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/log2f/test1/test1.c +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/log2f/test1/test1.c @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/log2f/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/log2f/test1/testinfo.dat index 7627c825c7c9..ebda8b49d0e2 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/log2f/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/log2f/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/logf/test1/test1.c b/src/coreclr/src/pal/tests/palsuite/c_runtime/logf/test1/test1.c index 499778e992d8..3c7f10f0e9bd 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/logf/test1/test1.c +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/logf/test1/test1.c @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/logf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/logf/test1/testinfo.dat index aadfee6c1193..52236efce0d3 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/logf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/logf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/malloc/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/malloc/test1/test1.cpp index 7ea4dd068f99..be71d783297f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/malloc/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/malloc/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/malloc/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/malloc/test1/testinfo.dat index 9060bc6284df..d815414e38c7 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/malloc/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/malloc/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/malloc/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/malloc/test2/test2.cpp index 5deee0eddb06..6aa3e3f6b200 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/malloc/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/malloc/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/malloc/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/malloc/test2/testinfo.dat index 1212a8f8f9e9..c4fad6844f2a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/malloc/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/malloc/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/memchr/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/memchr/test1/test1.cpp index 043a6789d803..924e5c80a554 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/memchr/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/memchr/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/memchr/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/memchr/test1/testinfo.dat index fc2a8e95dce9..d5e074c6ae7c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/memchr/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/memchr/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/memcmp/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/memcmp/test1/test1.cpp index 7b63173e22d3..41c16d98e0f8 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/memcmp/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/memcmp/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/memcmp/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/memcmp/test1/testinfo.dat index 2de36b2dd6c0..852ea669788e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/memcmp/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/memcmp/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/memcpy/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/memcpy/test1/test1.cpp index 9da98d6573b5..26d59aa94ea4 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/memcpy/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/memcpy/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/memcpy/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/memcpy/test1/testinfo.dat index 157da6cf87be..f4ea0f1ee23d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/memcpy/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/memcpy/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/memmove/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/memmove/test1/test1.cpp index 8279d671391d..8bb0ee231532 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/memmove/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/memmove/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/memmove/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/memmove/test1/testinfo.dat index d8d4c0ead975..777c1aacf311 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/memmove/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/memmove/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/memset/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/memset/test1/test1.cpp index 67cde8756b5c..483e3b9c3559 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/memset/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/memset/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/memset/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/memset/test1/testinfo.dat index cab02fb4b79c..647bcd87f92d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/memset/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/memset/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/modf/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/modf/test1/test1.cpp index 389d0792533d..b0beb7cabe13 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/modf/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/modf/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/modf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/modf/test1/testinfo.dat index 203b553e2086..ad8b36486fca 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/modf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/modf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/modff/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/modff/test1/test1.cpp index 6b7a50be39bc..a96cf7c78d75 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/modff/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/modff/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/modff/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/modff/test1/testinfo.dat index 392491e3bec0..26429e91f486 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/modff/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/modff/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/pow/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/pow/test1/test1.cpp index 7eea316e6219..159d3956ea9c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/pow/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/pow/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/pow/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/pow/test1/testinfo.dat index cf106d90ed3b..0dae5d524606 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/pow/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/pow/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/powf/test1/test1.c b/src/coreclr/src/pal/tests/palsuite/c_runtime/powf/test1/test1.c index e8933c5ce2ee..24a23e04f9e1 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/powf/test1/test1.c +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/powf/test1/test1.c @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/powf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/powf/test1/testinfo.dat index 778c04202557..2194e1084654 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/powf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/powf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/printf.h b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/printf.h index 8ef725f305bf..780cf8f01cf3 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/printf.h +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/printf.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test1/test1.cpp index 31b701434339..3b941ae215bc 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test1/testinfo.dat index fe8bee680e43..dedc3cff90e1 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test10/test10.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test10/test10.cpp index 5e69175b0771..122eacd7d07e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test10/test10.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test10/test10.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test10/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test10/testinfo.dat index 7667a0f461b3..994c781b0566 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test10/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test10/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test11/test11.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test11/test11.cpp index 788be8b2db26..be94cb6b6d7a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test11/test11.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test11/test11.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test11/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test11/testinfo.dat index a88e0d8fcb4b..aeb1aba1d1b9 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test11/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test11/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test12/test12.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test12/test12.cpp index b4006f2405d9..00328193ef1a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test12/test12.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test12/test12.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test12/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test12/testinfo.dat index a6e317f9057b..100e1bf35feb 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test12/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test12/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test13/test13.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test13/test13.cpp index ccd16b50d2a1..d42313f90c06 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test13/test13.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test13/test13.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test13/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test13/testinfo.dat index e814040b37a6..eb8dd5351f0e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test13/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test13/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test14/test14.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test14/test14.cpp index 10577db67d72..5a999122324f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test14/test14.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test14/test14.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test14/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test14/testinfo.dat index 5cb22c1fcca8..d13bbd2ec685 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test14/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test14/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test15/test15.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test15/test15.cpp index 2acfc436a3b3..03ba391fde54 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test15/test15.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test15/test15.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test15/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test15/testinfo.dat index bdfa2cc3b5eb..2c917d7b30b1 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test15/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test15/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test16/test16.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test16/test16.cpp index 50c952f959e7..186568262a8c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test16/test16.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test16/test16.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test16/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test16/testinfo.dat index afb9a21b3ba4..c7e2f771b3f8 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test16/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test16/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test17/test17.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test17/test17.cpp index 96ddd5c1e4b8..58dbc37feaa2 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test17/test17.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test17/test17.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test17/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test17/testinfo.dat index a8545d9542aa..203125deed7f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test17/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test17/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test18/test18.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test18/test18.cpp index 6c05e40f429c..25f3c91ee3d4 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test18/test18.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test18/test18.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test18/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test18/testinfo.dat index bd5c90b0c3f0..f8af9313962d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test18/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test18/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test19/test19.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test19/test19.cpp index a3ce0e7ad88b..ecef021d658b 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test19/test19.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test19/test19.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test19/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test19/testinfo.dat index 6ad18f759183..bf57331b4a40 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test19/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test19/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test2/test2.cpp index 1c61b1d86d1d..5ddcce29c336 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test2/testinfo.dat index 3ff71c74964f..b1813b134f3b 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test3/test3.cpp index 79fe7213b339..5778ebc0ab89 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test3/testinfo.dat index 295c172f09fa..db5f9770184e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test4/test4.cpp index ba2fa589ba2b..d673fdda4412 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test4/testinfo.dat index 0c55e0ed39be..2aef0fe76668 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test5/test5.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test5/test5.cpp index 9f8baa74da71..b02195a02f1c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test5/test5.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test5/test5.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test5/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test5/testinfo.dat index a7c7400f587f..a0eec3662381 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test5/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test5/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test6/test6.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test6/test6.cpp index edc65b6b9b1e..ab55cb65b912 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test6/test6.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test6/test6.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test6/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test6/testinfo.dat index fd8a98529105..a39fbd8cff51 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test6/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test6/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test7/test7.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test7/test7.cpp index 3aeb58f7dcac..6ec7a29a5674 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test7/test7.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test7/test7.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test7/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test7/testinfo.dat index 6d2b1cf84e9f..62dfef223a74 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test7/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test7/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test8/test8.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test8/test8.cpp index daa4674b92d9..bf3f76d4c9be 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test8/test8.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test8/test8.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test8/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test8/testinfo.dat index 6367235aa52b..70d987668823 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test8/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test8/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test9/test9.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test9/test9.cpp index 22c60d04f28d..bad50d00a9ee 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test9/test9.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test9/test9.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test9/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test9/testinfo.dat index 3208cb44a550..4737eb08553d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test9/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/printf/test9/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/qsort/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/qsort/test1/test1.cpp index c65fb18e68b6..674ec965fc8c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/qsort/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/qsort/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/qsort/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/qsort/test1/testinfo.dat index 7e3b4b87c3e6..d15798b1a92e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/qsort/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/qsort/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/qsort/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/qsort/test2/test2.cpp index 8110dcd2c201..9500002a939b 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/qsort/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/qsort/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/qsort/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/qsort/test2/testinfo.dat index 35f5f0607622..8946ab67a5b6 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/qsort/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/qsort/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/rand_srand/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/rand_srand/test1/test1.cpp index 34154cb6d234..68888ca8e5fb 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/rand_srand/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/rand_srand/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/rand_srand/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/rand_srand/test1/testinfo.dat index cf1b42dbf06b..272e23f038f7 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/rand_srand/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/rand_srand/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/realloc/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/realloc/test1/test1.cpp index 64a9270eab46..ff812e1f0d50 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/realloc/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/realloc/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/realloc/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/realloc/test1/testinfo.dat index 5d2a32224e8e..710109597425 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/realloc/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/realloc/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/scalbn/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/scalbn/test1/test1.cpp index 9507cc48869f..22c61328edd0 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/scalbn/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/scalbn/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/scalbn/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/scalbn/test1/testinfo.dat index ce98062b6578..d39477b81d81 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/scalbn/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/scalbn/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/scalbnf/test1/test1.c b/src/coreclr/src/pal/tests/palsuite/c_runtime/scalbnf/test1/test1.c index 88f00a24847b..10c7b2a7178e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/scalbnf/test1/test1.c +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/scalbnf/test1/test1.c @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/scalbnf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/scalbnf/test1/testinfo.dat index 728fafabae12..3fe3745eacfd 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/scalbnf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/scalbnf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sin/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sin/test1/test1.cpp index bec58d4dd985..7c83f7281f55 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sin/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sin/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sin/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sin/test1/testinfo.dat index 57eae6bfd124..8ec3977815bd 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sin/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sin/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sinf/test1/test1.c b/src/coreclr/src/pal/tests/palsuite/c_runtime/sinf/test1/test1.c index d5bd24893525..0fa2935f1907 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sinf/test1/test1.c +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sinf/test1/test1.c @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sinf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sinf/test1/testinfo.dat index 08ff6026cb59..2d70efaab928 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sinf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sinf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sinh/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sinh/test1/test1.cpp index e790b16fb4dc..5dc6282a0221 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sinh/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sinh/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sinh/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sinh/test1/testinfo.dat index f7aee402018d..a8f09d8fc28b 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sinh/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sinh/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sinhf/test1/test1.c b/src/coreclr/src/pal/tests/palsuite/c_runtime/sinhf/test1/test1.c index 4e706a2f7170..6c00b8599697 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sinhf/test1/test1.c +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sinhf/test1/test1.c @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sinhf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sinhf/test1/testinfo.dat index cfb27f54276a..1af96771ef91 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sinhf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sinhf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/sprintf_s.h b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/sprintf_s.h index 129b9db72783..cc3eff5fd954 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/sprintf_s.h +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/sprintf_s.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test1/test1.cpp index a289c07716b2..95cabe068c3b 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test1/testinfo.dat index 255c534cdfd9..dd7e48e96b2d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test10/test10.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test10/test10.cpp index bbda15a331b1..fec212368755 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test10/test10.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test10/test10.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test10/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test10/testinfo.dat index 25ed554ea3db..5bef07c257d6 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test10/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test10/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test11/test11.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test11/test11.cpp index 7f4fca9f32ce..d2d21e3222c6 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test11/test11.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test11/test11.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test11/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test11/testinfo.dat index 3144f1290ecf..c65a26c70812 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test11/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test11/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test12/test12.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test12/test12.cpp index 759a41105b3e..44da16677ac0 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test12/test12.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test12/test12.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test12/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test12/testinfo.dat index ed91cecc46bd..99db86d551db 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test12/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test12/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test13/test13.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test13/test13.cpp index 76250d058ca1..7542bb6fa78a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test13/test13.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test13/test13.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test13/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test13/testinfo.dat index fd5f53017cd4..9ec9a9f53d91 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test13/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test13/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test14/test14.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test14/test14.cpp index 668edda433b2..21b900d87d06 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test14/test14.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test14/test14.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test14/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test14/testinfo.dat index 23cf42335428..d9d2d7dd4ebd 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test14/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test14/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test15/test15.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test15/test15.cpp index 61e0e362a155..17b4020ec0dd 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test15/test15.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test15/test15.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test15/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test15/testinfo.dat index 537e6d1db232..458ef784771d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test15/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test15/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test16/test16.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test16/test16.cpp index b237c98d5caf..b25a48633b4f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test16/test16.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test16/test16.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test16/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test16/testinfo.dat index 4e98eccac294..a40e69e53105 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test16/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test16/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test17/test17.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test17/test17.cpp index 220555e5d433..1cf0aaa4f31c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test17/test17.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test17/test17.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test17/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test17/testinfo.dat index 5e41e20d448b..2782f03bb863 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test17/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test17/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test18/test18.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test18/test18.cpp index 2135a6f1e7f6..e3130105f9c2 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test18/test18.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test18/test18.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test18/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test18/testinfo.dat index 06ae3a632e60..e93e01f2b11c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test18/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test18/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test19/test19.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test19/test19.cpp index 483c7167b18b..98be4e8e1ed9 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test19/test19.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test19/test19.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test19/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test19/testinfo.dat index 7064c01771bf..ea56b0bb8f03 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test19/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test19/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test2/test2.cpp index a3eb71dd1cdf..efa9e484a9cc 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test2/testinfo.dat index cce2dc67e749..1ec448495ffc 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test3/test3.cpp index dd6e59026360..f39d667386b9 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test3/testinfo.dat index cc8de0eae596..cc56fe26478f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test4/test4.cpp index 72349700ba9c..67f664d59bec 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test4/testinfo.dat index f53f784991b7..617c9b2d3e5b 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test6/test6.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test6/test6.cpp index c5fc804071a7..9682e61f543d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test6/test6.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test6/test6.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test6/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test6/testinfo.dat index c5b93fc78c49..8a8a3f4c9863 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test6/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test6/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test7/test7.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test7/test7.cpp index fd46ae967413..b9dc0a810d57 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test7/test7.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test7/test7.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test7/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test7/testinfo.dat index 647c9d80fd39..38fa9371fe59 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test7/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test7/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test8/test8.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test8/test8.cpp index db02627bb091..70d0c6e1e095 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test8/test8.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test8/test8.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test8/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test8/testinfo.dat index 524834e53e7e..8c9e8cff321b 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test8/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test8/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test9/test9.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test9/test9.cpp index 2e1c78ce681e..d7e67a245b8d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test9/test9.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test9/test9.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test9/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test9/testinfo.dat index 7c51443a3d03..beb708ae943c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test9/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sprintf_s/test9/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sqrt/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sqrt/test1/test1.cpp index 62d2251d61ef..ae1b92fd12e5 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sqrt/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sqrt/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sqrt/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sqrt/test1/testinfo.dat index 804fef088c6a..65001382b9aa 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sqrt/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sqrt/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sqrtf/test1/test1.c b/src/coreclr/src/pal/tests/palsuite/c_runtime/sqrtf/test1/test1.c index cb1ac9e7df88..ac3941b55f61 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sqrtf/test1/test1.c +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sqrtf/test1/test1.c @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sqrtf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sqrtf/test1/testinfo.dat index 00d8ab2e4363..1bda2dabe57c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sqrtf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sqrtf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/sscanf_s.h b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/sscanf_s.h index 8a99d87cb453..6ef638c3fabb 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/sscanf_s.h +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/sscanf_s.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test1/test1.cpp index 61313146e590..c8c12aa854a8 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test1/testinfo.dat index 76f592769fa4..03ccc14eb200 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test10/test10.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test10/test10.cpp index 0c63c864edd6..fb710429db18 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test10/test10.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test10/test10.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test10/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test10/testinfo.dat index e048e700a022..ef47b2b5ab7c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test10/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test10/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test11/test11.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test11/test11.cpp index 8279f4b3f46b..665f006ee076 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test11/test11.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test11/test11.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test11/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test11/testinfo.dat index 5a906ddf510a..6dadb849e37a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test11/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test11/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test12/test12.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test12/test12.cpp index e5995342701e..912dac26f6d4 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test12/test12.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test12/test12.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test12/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test12/testinfo.dat index 569be983c0a2..816f51ee6713 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test12/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test12/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test13/test13.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test13/test13.cpp index 4fc12bb751f8..f7deec83c78e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test13/test13.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test13/test13.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test13/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test13/testinfo.dat index 651577befdd7..1e62e1a5c703 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test13/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test13/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test14/test14.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test14/test14.cpp index fc2fa2ee159b..091afd61535e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test14/test14.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test14/test14.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test14/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test14/testinfo.dat index 8e7338fd4654..cf144fe46272 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test14/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test14/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test15/test15.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test15/test15.cpp index 1eff995b862e..cf2a30de87b1 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test15/test15.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test15/test15.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test15/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test15/testinfo.dat index d713a73d81d8..1e7ac43310c7 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test15/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test15/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test16/test16.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test16/test16.cpp index f202767448d7..546d9fb6206f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test16/test16.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test16/test16.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test16/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test16/testinfo.dat index 669611945d13..6cc77ce70511 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test16/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test16/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test17/test17.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test17/test17.cpp index a18c3caff14d..0205d4e4210f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test17/test17.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test17/test17.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test17/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test17/testinfo.dat index 8ce4e93e1a1b..555e5e318430 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test17/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test17/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test2/test2.cpp index c9c79f67ea59..162521a83999 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test2/testinfo.dat index 85fed244f999..d3442af41368 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test3/test3.cpp index e1e45bdd7095..85e6d8d0cbee 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test3/testinfo.dat index 523d31e82e98..0125372264cb 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test4/test4.cpp index f8413ea7fdb2..9caa663f5fba 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test4/testinfo.dat index 2065f2bea243..24436214cd32 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test5/test5.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test5/test5.cpp index cdfefd860b4e..35a4498f1578 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test5/test5.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test5/test5.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test5/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test5/testinfo.dat index cb687c15cda8..54577ae93e3d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test5/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test5/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test6/test6.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test6/test6.cpp index 507b100e15b6..d0a75282e449 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test6/test6.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test6/test6.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test6/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test6/testinfo.dat index 9e518dddf228..7e33d024408e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test6/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test6/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test7/test7.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test7/test7.cpp index 4093e009e15f..609a29613c03 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test7/test7.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test7/test7.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test7/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test7/testinfo.dat index 8d6c182c90d1..e2b55a7fd7a1 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test7/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test7/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test8/test8.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test8/test8.cpp index 23ef22a56ab8..b447442a924c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test8/test8.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test8/test8.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test8/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test8/testinfo.dat index 0287a495d2d7..d68933dd5408 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test8/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test8/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test9/test9.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test9/test9.cpp index 2c99c40e5dcb..0fcab98f0247 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test9/test9.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test9/test9.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test9/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test9/testinfo.dat index 95f6c74ee23d..371cd5e31288 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test9/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/sscanf_s/test9/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section =C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/strcat/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/strcat/test1/test1.cpp index 532d84621ef1..f5c00c5be447 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/strcat/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/strcat/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/strcat/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/strcat/test1/testinfo.dat index 6d67ffa180cd..145816d7cb70 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/strcat/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/strcat/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/strchr/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/strchr/test1/test1.cpp index 9190c4f7ce6a..0d75dd81dfb1 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/strchr/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/strchr/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/strchr/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/strchr/test1/testinfo.dat index 4985c47541b9..8c5f6a1214b8 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/strchr/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/strchr/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/strcmp/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/strcmp/test1/test1.cpp index 49428fd62406..26e00d939cfe 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/strcmp/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/strcmp/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/strcmp/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/strcmp/test1/testinfo.dat index 174cb4be8564..ed6838e42050 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/strcmp/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/strcmp/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/strcpy/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/strcpy/test1/test1.cpp index 43069e59a6d4..af9f88b1edee 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/strcpy/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/strcpy/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/strcpy/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/strcpy/test1/testinfo.dat index 700b12492679..2327a8ca83e9 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/strcpy/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/strcpy/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/strcspn/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/strcspn/test1/test1.cpp index ddc56675702e..cd321f1e80e7 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/strcspn/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/strcspn/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/strcspn/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/strcspn/test1/testinfo.dat index a302eb1fb775..54fbb7f34906 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/strcspn/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/strcspn/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/strlen/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/strlen/test1/test1.cpp index 40f8e151c7d1..9fea613f9560 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/strlen/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/strlen/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/strlen/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/strlen/test1/testinfo.dat index ac5c3aec0f86..b55bc8e8a5b8 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/strlen/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/strlen/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/strncat/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/strncat/test1/test1.cpp index 000d1685b9ec..505db1e60880 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/strncat/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/strncat/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/strncat/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/strncat/test1/testinfo.dat index 4aaedbf404a4..da8476d66496 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/strncat/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/strncat/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/strncmp/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/strncmp/test1/test1.cpp index 7326c3b61e24..66d947edff9f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/strncmp/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/strncmp/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/strncmp/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/strncmp/test1/testinfo.dat index 8e95311f364e..0aabf93e4f81 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/strncmp/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/strncmp/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/strncpy/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/strncpy/test1/test1.cpp index 62baf61ba2f4..96f8f9b3bfe2 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/strncpy/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/strncpy/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/strncpy/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/strncpy/test1/testinfo.dat index c402adb1c17c..eeb078773085 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/strncpy/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/strncpy/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/strpbrk/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/strpbrk/test1/test1.cpp index cf81c5817058..88bb3da1e13c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/strpbrk/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/strpbrk/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/strpbrk/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/strpbrk/test1/testinfo.dat index d4fb9587bf5d..291f23458d18 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/strpbrk/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/strpbrk/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/strrchr/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/strrchr/test1/test1.cpp index a5c147eecec4..b7014848d9f0 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/strrchr/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/strrchr/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/strrchr/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/strrchr/test1/testinfo.dat index 45b27aecf902..8c35087963b1 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/strrchr/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/strrchr/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/strspn/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/strspn/test1/test1.cpp index 78d248843814..cc841696284b 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/strspn/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/strspn/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/strspn/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/strspn/test1/testinfo.dat index b56bd1574ec0..a5c178867111 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/strspn/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/strspn/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/strstr/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/strstr/test1/test1.cpp index db01e8b32a2c..cfd71ac57fb5 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/strstr/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/strstr/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/strstr/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/strstr/test1/testinfo.dat index cf13170af541..45bdf71da1fa 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/strstr/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/strstr/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/strtod/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/strtod/test1/test1.cpp index e312d98f584a..e4d7d66623f4 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/strtod/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/strtod/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/strtod/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/strtod/test1/testinfo.dat index 2c98d2eaf6b9..a5141e07a347 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/strtod/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/strtod/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/strtod/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/strtod/test2/test2.cpp index 0eaf4f53b666..71915dbbd5c2 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/strtod/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/strtod/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/strtod/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/strtod/test2/testinfo.dat index a50c07b8b549..892df776dfc7 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/strtod/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/strtod/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/strtok/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/strtok/test1/test1.cpp index f1dec7038095..de157a531db1 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/strtok/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/strtok/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/strtok/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/strtok/test1/testinfo.dat index f3773514c2d0..78c82d75a07f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/strtok/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/strtok/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/strtoul/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/strtoul/test1/test1.cpp index 344671b5cc91..4db4401a5ec8 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/strtoul/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/strtoul/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/strtoul/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/strtoul/test1/testinfo.dat index c7fc2c0c4da6..df7165719dbd 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/strtoul/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/strtoul/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/swprintf.h b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/swprintf.h index 210b12ec7ae5..74ab02977aee 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/swprintf.h +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/swprintf.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test1/test1.cpp index c47d7d520268..7353646b31b8 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test1/testinfo.dat index f43d462daff5..e80446528413 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test10/test10.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test10/test10.cpp index 61aef593a026..aaf472c0e908 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test10/test10.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test10/test10.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test10/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test10/testinfo.dat index e860bb26e7c7..7f8ec90c67b5 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test10/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test10/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test11/test11.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test11/test11.cpp index 216f9acdbb40..63592c542bf8 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test11/test11.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test11/test11.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test11/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test11/testinfo.dat index 430a777e7a0b..54b90d78845c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test11/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test11/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test12/test12.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test12/test12.cpp index a41b0ddbd35e..d3789b5f7065 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test12/test12.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test12/test12.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test12/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test12/testinfo.dat index d53582644f20..91439b8928c1 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test12/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test12/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test13/test13.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test13/test13.cpp index b99232f7eac0..d404eb95d2b7 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test13/test13.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test13/test13.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test13/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test13/testinfo.dat index 1ce172414c51..d22b3a6175e3 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test13/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test13/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test14/test14.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test14/test14.cpp index bcfd6a7c2441..f17e42e0cc02 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test14/test14.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test14/test14.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test14/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test14/testinfo.dat index 7f3451820b7a..9b069ec89943 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test14/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test14/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test15/test15.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test15/test15.cpp index 215afbe093ce..2aab51237fa3 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test15/test15.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test15/test15.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test15/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test15/testinfo.dat index a6044e7bcc4e..3f917fc4054a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test15/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test15/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test16/test16.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test16/test16.cpp index 859afed8dd88..a97e51669567 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test16/test16.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test16/test16.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test16/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test16/testinfo.dat index d2f9a125c400..0047513d65ed 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test16/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test16/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test17/test17.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test17/test17.cpp index 480f2b2fe18e..b6c0aef6e51e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test17/test17.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test17/test17.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test17/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test17/testinfo.dat index f26029c659cf..ba8b0542bec8 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test17/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test17/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test18/test18.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test18/test18.cpp index 1ed8cd00d8d2..fd51bb0a4a6d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test18/test18.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test18/test18.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test18/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test18/testinfo.dat index 6a8ca702ff17..5aa2c3436f7b 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test18/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test18/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test19/test19.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test19/test19.cpp index 0967bc8f4b0a..936a4ef6f8e8 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test19/test19.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test19/test19.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test19/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test19/testinfo.dat index cbd572a35ca0..83c17566a57c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test19/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test19/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test2/test2.cpp index 1c2f420fe9b9..e2721b0a177f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test2/testinfo.dat index d93fa7b4006a..cf9413bb2bde 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test3/test3.cpp index 8c6c38c96b7e..fd8a82af34de 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test3/testinfo.dat index 923a8f0efd16..d8b74f0a0834 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test4/test4.cpp index 04bfca3285c0..c461fab0ab2a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test4/testinfo.dat index dc481d32f15e..68d4d11fb2d4 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test6/test6.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test6/test6.cpp index ecd637426475..9fe4f14af509 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test6/test6.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test6/test6.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test6/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test6/testinfo.dat index 4224d1951968..4b30cd1c61a5 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test6/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test6/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test7/test7.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test7/test7.cpp index e231ada3d2a8..f547877e464f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test7/test7.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test7/test7.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test7/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test7/testinfo.dat index 7facc90b58fc..ab8f20d1628e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test7/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test7/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test8/test8.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test8/test8.cpp index b4be28e78d4c..e861c92cb4fe 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test8/test8.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test8/test8.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test8/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test8/testinfo.dat index d5858b2cfe8c..1626ffd89591 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test8/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test8/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test9/test9.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test9/test9.cpp index 2f5429e5fd6a..e49e788df043 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test9/test9.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test9/test9.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test9/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test9/testinfo.dat index 7ef9eed134ca..2c3207e0f33c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test9/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swprintf/test9/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/swscanf.h b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/swscanf.h index 6349b7dcd693..20c99092e1a3 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/swscanf.h +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/swscanf.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test1/test1.cpp index 66136e57c53a..790284a01741 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test1/testinfo.dat index b6366a73d03d..607f2641d620 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test10/test10.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test10/test10.cpp index a8628e0de12c..0c7c6cbd755c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test10/test10.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test10/test10.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test10/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test10/testinfo.dat index 2f8890db2023..45ed1aea593b 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test10/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test10/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test11/test11.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test11/test11.cpp index f7eb4af46fce..a5044d82c436 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test11/test11.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test11/test11.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test11/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test11/testinfo.dat index 5bbc2e433b8f..03ac4b1eab33 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test11/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test11/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test12/test12.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test12/test12.cpp index f5f8bbdf8ad7..2ab7d910409a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test12/test12.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test12/test12.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test12/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test12/testinfo.dat index 06bf26af9bd0..a5ce40ced2cb 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test12/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test12/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test13/test13.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test13/test13.cpp index 1bb0b7b21ce2..2c89bcaaf402 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test13/test13.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test13/test13.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test13/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test13/testinfo.dat index a3c01c5d7679..92c9888305f9 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test13/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test13/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test14/test14.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test14/test14.cpp index 80581b726f1f..a21976c0937e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test14/test14.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test14/test14.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test14/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test14/testinfo.dat index 184a3e7fb819..0a95899ad8b8 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test14/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test14/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test15/test15.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test15/test15.cpp index 9b7d277e178d..ef50e91905ff 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test15/test15.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test15/test15.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test15/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test15/testinfo.dat index ab20463ecdec..b022abba5684 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test15/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test15/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test16/test16.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test16/test16.cpp index c83b64468b3b..1a21fa915387 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test16/test16.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test16/test16.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test16/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test16/testinfo.dat index 0cfa37d63b62..186db5ba433b 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test16/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test16/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test17/test17.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test17/test17.cpp index 9023f7020a8d..ffa8b9e2dded 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test17/test17.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test17/test17.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test17/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test17/testinfo.dat index f0489dfa41d7..6b393940febb 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test17/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test17/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test2/test2.cpp index 8fbd3f86ba69..3263341f7158 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test2/testinfo.dat index 88768ca465f0..188db3736802 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test3/test3.cpp index 8b05df20f275..0413f150276a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test3/testinfo.dat index 998cba8b6b9b..c84dda67d8d3 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test4/test4.cpp index d63d25b7d073..11f86c4f6216 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test4/testinfo.dat index e6102872d7ba..84639a1c25c3 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test5/test5.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test5/test5.cpp index 8ae2d81da68d..8b8be9a318a7 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test5/test5.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test5/test5.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test5/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test5/testinfo.dat index 9991286402df..ffe131d17889 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test5/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test5/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test6/test6.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test6/test6.cpp index 982f799cfce5..d1a2540ca8a2 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test6/test6.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test6/test6.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test6/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test6/testinfo.dat index ca7870e96217..d4969b1ba081 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test6/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test6/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test7/test7.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test7/test7.cpp index 45e9400549e9..954c1820b02d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test7/test7.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test7/test7.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test7/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test7/testinfo.dat index 43ff8108df1d..fa3d1fc1145e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test7/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test7/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test8/test8.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test8/test8.cpp index a244de748f9b..9f02ac9efb32 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test8/test8.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test8/test8.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test8/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test8/testinfo.dat index 0edefb07566f..2363091e712c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test8/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test8/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test9/test9.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test9/test9.cpp index e289d26f5853..0d7cd508816f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test9/test9.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test9/test9.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test9/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test9/testinfo.dat index 955b62b12f02..9e3006447a5a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test9/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/swscanf/test9/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/tan/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/tan/test1/test1.cpp index 443e5da6d6d0..4724f0567c8c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/tan/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/tan/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/tan/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/tan/test1/testinfo.dat index 05d6cfeb74a0..61ce69e24f3d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/tan/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/tan/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/tanf/test1/test1.c b/src/coreclr/src/pal/tests/palsuite/c_runtime/tanf/test1/test1.c index 18d5c4e59d4a..7fb8b859e82a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/tanf/test1/test1.c +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/tanf/test1/test1.c @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/tanf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/tanf/test1/testinfo.dat index aa33232adc51..d0b661feb425 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/tanf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/tanf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/tanh/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/tanh/test1/test1.cpp index 3b8f87964ab9..5c6102478af5 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/tanh/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/tanh/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/tanh/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/tanh/test1/testinfo.dat index 1b2bc91b2ba4..4bd3bfcd8428 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/tanh/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/tanh/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/tanhf/test1/test1.c b/src/coreclr/src/pal/tests/palsuite/c_runtime/tanhf/test1/test1.c index 904729a2c4e5..01649aea5937 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/tanhf/test1/test1.c +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/tanhf/test1/test1.c @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/tanhf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/tanhf/test1/testinfo.dat index 6c7594fc5a4e..0aff99938749 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/tanhf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/tanhf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/time/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/time/test1/test1.cpp index c668bf38e7af..540794557ffd 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/time/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/time/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/time/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/time/test1/testinfo.dat index 40134c762368..664cbde01102 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/time/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/time/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/tolower/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/tolower/test1/test1.cpp index cab623d3f93f..6e3f0a50b6ef 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/tolower/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/tolower/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/tolower/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/tolower/test1/testinfo.dat index 90f1c729cdfa..2abccb349950 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/tolower/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/tolower/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/toupper/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/toupper/test1/test1.cpp index c580699e3bbd..546f898949bb 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/toupper/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/toupper/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/toupper/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/toupper/test1/testinfo.dat index bde7affa4e91..285f8555e7c5 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/toupper/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/toupper/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/towlower/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/towlower/test1/test1.cpp index 5f2457a5fea0..6900a8fd4347 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/towlower/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/towlower/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/towlower/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/towlower/test1/testinfo.dat index 2df179a8b695..f6ea60afb687 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/towlower/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/towlower/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/towupper/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/towupper/test1/test1.cpp index 63f051fa666e..a463a69d2ec5 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/towupper/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/towupper/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/towupper/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/towupper/test1/testinfo.dat index 40b6fadd5adb..b5977214b29b 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/towupper/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/towupper/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test1/test1.cpp index 302c914e3a92..28432f87e65d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test1/testinfo.dat index 8359de8e3d63..fec5d5471f9c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test10/test10.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test10/test10.cpp index ecb4b0314a74..9065352728aa 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test10/test10.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test10/test10.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test10/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test10/testinfo.dat index 034610a7dc93..4e310b6f0b53 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test10/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test10/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test11/test11.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test11/test11.cpp index 5f7bc118cc5a..657d47baf9a0 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test11/test11.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test11/test11.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test11/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test11/testinfo.dat index 4050bd610ee6..56a486fc9888 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test11/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test11/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test12/test12.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test12/test12.cpp index 0bf61d3eccf9..9063acf7b091 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test12/test12.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test12/test12.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test12/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test12/testinfo.dat index 640af62affdb..1e0579e381cd 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test12/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test12/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test13/test13.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test13/test13.cpp index 1e42ce9e8d80..c25896974171 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test13/test13.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test13/test13.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test13/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test13/testinfo.dat index 26c7db0523e9..337b3eed7ba7 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test13/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test13/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test14/test14.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test14/test14.cpp index 82f247430fff..194d47a285a7 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test14/test14.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test14/test14.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test14/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test14/testinfo.dat index fa363193114d..21a6782a11a3 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test14/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test14/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test15/test15.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test15/test15.cpp index 53cc2ceb87a4..de90698c9bb6 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test15/test15.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test15/test15.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test15/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test15/testinfo.dat index f51f72c12209..eeb64d431ec5 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test15/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test15/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test16/test16.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test16/test16.cpp index 2b7674bb94de..eba3cbaae460 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test16/test16.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test16/test16.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test16/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test16/testinfo.dat index f91d9f429cae..bcfa56f113c0 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test16/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test16/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test17/test17.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test17/test17.cpp index 956be15f6f18..add1f54cd02a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test17/test17.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test17/test17.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test17/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test17/testinfo.dat index 623846465fcf..6f4159a01187 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test17/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test17/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test18/test18.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test18/test18.cpp index c61c8cbdab25..6b4eea397255 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test18/test18.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test18/test18.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test18/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test18/testinfo.dat index 44ddab30bcee..41c470542d40 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test18/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test18/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test19/test19.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test19/test19.cpp index d8e8f9301d6d..53b1209364fd 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test19/test19.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test19/test19.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test19/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test19/testinfo.dat index 729c2796084d..b8bccc7b2cac 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test19/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test19/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test2/test2.cpp index 0228734525a7..f19665b6e1f3 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test2/testinfo.dat index 6d2f2315667d..7fbe6596a7f1 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test3/test3.cpp index 879446f851d5..b9ab319f2f94 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test3/testinfo.dat index b5aa1e2f07b7..721c7c9e48ce 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test4/test4.cpp index d1376f18ec3d..8afbca483339 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test4/testinfo.dat index d08928a8b66a..7413dcc4f0ef 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test5/test5.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test5/test5.cpp index 44f21b61dbc2..03a8bd60b552 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test5/test5.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test5/test5.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test5/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test5/testinfo.dat index 73feaa0202f9..bd5d1e00a5d5 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test5/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test5/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test6/test6.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test6/test6.cpp index 36c6fe51ca4a..afa0909d6485 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test6/test6.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test6/test6.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test6/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test6/testinfo.dat index cb1337dfd7f2..3a6f60d2a3f3 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test6/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test6/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test7/test7.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test7/test7.cpp index a9cfe319bd82..e8871b71600d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test7/test7.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test7/test7.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test7/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test7/testinfo.dat index c861344845c1..0bfd81343a55 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test7/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test7/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test8/test8.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test8/test8.cpp index 5cef99741a59..3c6896417446 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test8/test8.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test8/test8.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test8/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test8/testinfo.dat index e96723378d62..05bfce9c1932 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test8/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test8/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test9/test9.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test9/test9.cpp index 45d0dc7a9e74..f77ad5710ba6 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test9/test9.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test9/test9.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test9/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test9/testinfo.dat index 48621773cc16..af803d0ef2ea 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test9/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/test9/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/vfprintf.h b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/vfprintf.h index 7901b08b0deb..1e5bac108cab 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/vfprintf.h +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vfprintf/vfprintf.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test1/test1.cpp index 404d7a0dc99b..721ea27c12ae 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test1/testinfo.dat index ac5de863415a..36105e5acdd9 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test10/test10.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test10/test10.cpp index b363d7c02cc6..b7a6a1e2a252 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test10/test10.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test10/test10.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test10/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test10/testinfo.dat index 449402430076..e6a506774d78 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test10/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test10/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test11/test11.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test11/test11.cpp index f5157ac99f93..61b370236b0f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test11/test11.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test11/test11.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test11/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test11/testinfo.dat index c504c70e886e..19b15fb39275 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test11/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test11/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test12/test12.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test12/test12.cpp index 703a8c4fdc96..a44a60abf60e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test12/test12.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test12/test12.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test12/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test12/testinfo.dat index 558ce37c8bcf..0b2af43a4ffa 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test12/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test12/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test13/test13.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test13/test13.cpp index ecb83ba38d55..8267a21f6f82 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test13/test13.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test13/test13.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test13/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test13/testinfo.dat index 33822958dd11..e962e3176304 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test13/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test13/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test14/test14.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test14/test14.cpp index 536c1950e32d..bba973a1e7f1 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test14/test14.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test14/test14.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test14/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test14/testinfo.dat index d2633fca4328..6d8fd63fdb61 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test14/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test14/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test15/test15.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test15/test15.cpp index 9aff6e457db0..6ea26bab57ff 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test15/test15.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test15/test15.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test15/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test15/testinfo.dat index c1e00520a78f..bd474baf7d27 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test15/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test15/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test16/test16.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test16/test16.cpp index 66e9afe2d7ad..7cb28491017f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test16/test16.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test16/test16.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test16/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test16/testinfo.dat index 8b17d2f71a0b..f70e7de261f9 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test16/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test16/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test17/test17.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test17/test17.cpp index d36a08490363..0d178b935f77 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test17/test17.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test17/test17.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test17/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test17/testinfo.dat index 9f40fb03a0c3..75c5bf43e34e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test17/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test17/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test18/test18.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test18/test18.cpp index 6fde79b5fb8d..67d491140aa2 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test18/test18.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test18/test18.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test18/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test18/testinfo.dat index b41f8c63e06e..81e9efbf1fbf 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test18/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test18/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test19/test19.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test19/test19.cpp index a3e08773693e..abeb7ead6e3e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test19/test19.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test19/test19.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test19/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test19/testinfo.dat index 03c3afa693af..cbd8547ae944 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test19/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test19/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test2/test2.cpp index 72b79e5969b0..7b4b133f9928 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test2/testinfo.dat index 32c1d70d9ec5..6abd0066b556 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test3/test3.cpp index 66cd509d94ce..62826cfbc5ae 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test3/testinfo.dat index c3b385e8f1eb..c5776a92eb44 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test4/test4.cpp index 2469cb5661cf..6a915b82fde0 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test4/testinfo.dat index 74c4ce932ec4..30c18365d8ec 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test5/test5.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test5/test5.cpp index c9e290123061..69a9f0d2405a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test5/test5.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test5/test5.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test5/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test5/testinfo.dat index 01ff86420898..b1c3e8cf4974 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test5/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test5/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test6/test6.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test6/test6.cpp index 6a83cccea6af..3a04a5142056 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test6/test6.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test6/test6.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test6/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test6/testinfo.dat index ce450183f616..f762bc6e9cbb 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test6/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test6/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test7/test7.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test7/test7.cpp index 5096ace42cc0..14bef0bf9650 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test7/test7.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test7/test7.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test7/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test7/testinfo.dat index 254e31e5f87f..399518e6ffd9 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test7/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test7/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test8/test8.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test8/test8.cpp index 2683339ece5c..bed3b18b3099 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test8/test8.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test8/test8.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test8/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test8/testinfo.dat index 73f287b9fefe..0bb7038786f6 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test8/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test8/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test9/test9.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test9/test9.cpp index 8545bc760e50..4f8a05e4ce56 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test9/test9.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test9/test9.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test9/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test9/testinfo.dat index c4c77b9d1153..38b887dd1c24 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test9/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/test9/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/vprintf.h b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/vprintf.h index fcd8f8037090..87e7956b7622 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/vprintf.h +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vprintf/vprintf.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test1/test1.cpp index 18c8c0ea1a7d..b210afe7ce45 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test1/testinfo.dat index 996364f366a7..a8986b564e36 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test10/test10.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test10/test10.cpp index 791213fccc02..81e3f833bae3 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test10/test10.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test10/test10.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test10/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test10/testinfo.dat index 1a1f4ef21748..51c02697aa02 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test10/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test10/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test11/test11.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test11/test11.cpp index e0af94981baf..da58cbad4e46 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test11/test11.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test11/test11.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test11/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test11/testinfo.dat index d44167e255fe..a43d38bc04fe 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test11/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test11/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test12/test12.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test12/test12.cpp index f86ddcade8c0..77852434416a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test12/test12.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test12/test12.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test12/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test12/testinfo.dat index 781fb9cae89c..4415fa60459e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test12/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test12/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test13/test13.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test13/test13.cpp index 36e78255314b..6422543f795d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test13/test13.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test13/test13.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test13/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test13/testinfo.dat index 7b28a91e65d6..9fd558e0da2c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test13/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test13/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test14/test14.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test14/test14.cpp index 360fafc37f75..de8395aa7f6a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test14/test14.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test14/test14.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test14/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test14/testinfo.dat index a0934096cc75..81232f2e7dc5 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test14/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test14/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test15/test15.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test15/test15.cpp index a5b4c9422677..760fa0081bcc 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test15/test15.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test15/test15.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test15/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test15/testinfo.dat index c3b8ebd29293..01063b6a8f70 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test15/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test15/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test16/test16.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test16/test16.cpp index a7258db9d6a8..65159efe590b 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test16/test16.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test16/test16.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test16/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test16/testinfo.dat index d29634e3ed05..28828b2f4943 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test16/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test16/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test17/test17.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test17/test17.cpp index 0ad246a1aeea..d37c27b3a2e4 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test17/test17.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test17/test17.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test17/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test17/testinfo.dat index 0dcd3c869eaf..26d759bed51d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test17/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test17/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test18/test18.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test18/test18.cpp index 9a4530556270..31fc132a5e15 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test18/test18.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test18/test18.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test18/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test18/testinfo.dat index 43299968c36a..fb05cb1966c9 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test18/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test18/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test19/test19.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test19/test19.cpp index 698ff36e3574..4136033c29e4 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test19/test19.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test19/test19.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test19/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test19/testinfo.dat index 1e7bc7615e4c..262786d91a0d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test19/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test19/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test2/test2.cpp index fc9163e97686..e2dea2c655ec 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test2/testinfo.dat index 7958c1ad9779..eeb5836831a1 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test3/test3.cpp index 4656bf3a925b..be9e5270bee8 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test3/testinfo.dat index afeb7da95307..ecb6acb657a2 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test4/test4.cpp index 513b0dd3fa60..5b71f63390ef 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test4/testinfo.dat index 7331c20375ef..63581f71eaff 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test6/test6.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test6/test6.cpp index 0d38a3a11401..8b68bc9c9153 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test6/test6.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test6/test6.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test6/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test6/testinfo.dat index d76c5bf1a841..0afdeaa83283 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test6/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test6/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test7/test7.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test7/test7.cpp index c9f87d4343cc..5bb113376dfe 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test7/test7.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test7/test7.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test7/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test7/testinfo.dat index facf60d6aa14..239796200ad3 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test7/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test7/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test8/test8.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test8/test8.cpp index e741d1da8bbf..e83e6b5c9f1a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test8/test8.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test8/test8.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test8/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test8/testinfo.dat index 05f84f4999e5..37cecfa8dadf 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test8/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test8/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test9/test9.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test9/test9.cpp index e1f7c8419572..16fc3db29f7b 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test9/test9.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test9/test9.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test9/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test9/testinfo.dat index 3bc0057c968f..922474c8368d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test9/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/test9/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/vsprintf.h b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/vsprintf.h index d02756242735..f5556691efd6 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/vsprintf.h +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vsprintf/vsprintf.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test1/test1.cpp index 8d69c82684d6..988c0e0e17fb 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test1/testinfo.dat index 6161190d4cec..ca72ebc538b3 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test10/test10.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test10/test10.cpp index 7f316e28f6ec..58ea624ee9c1 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test10/test10.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test10/test10.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test10/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test10/testinfo.dat index 81fbce5e4dc0..994dead97da4 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test10/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test10/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test11/test11.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test11/test11.cpp index 608069f82916..a78b5963ff8d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test11/test11.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test11/test11.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test11/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test11/testinfo.dat index 13585cc94e88..d7182fedf7a6 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test11/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test11/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test12/test12.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test12/test12.cpp index 36b203853ad5..c5e0b1680857 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test12/test12.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test12/test12.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test12/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test12/testinfo.dat index d42e9a1801fc..e23f936c182d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test12/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test12/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test13/test13.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test13/test13.cpp index 63dc36a96007..b84836b214ff 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test13/test13.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test13/test13.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test13/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test13/testinfo.dat index f7c6756e3016..a4a46b7329e3 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test13/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test13/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test14/test14.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test14/test14.cpp index bb4ab16a5442..5e948e8768ca 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test14/test14.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test14/test14.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test14/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test14/testinfo.dat index e9615f906a4c..8194ceee56c0 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test14/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test14/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test15/test15.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test15/test15.cpp index 6296220c4e81..fcfac5497ac4 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test15/test15.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test15/test15.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test15/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test15/testinfo.dat index 24ff03b11a9f..0f1e42efff0e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test15/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test15/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test16/test16.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test16/test16.cpp index 3a2059a49135..e0f0fea2a2bd 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test16/test16.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test16/test16.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test16/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test16/testinfo.dat index 6dc45f4c7839..2c2f716d0e9c 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test16/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test16/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test17/test17.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test17/test17.cpp index 95e3bd99954a..635fb2b00eee 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test17/test17.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test17/test17.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test17/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test17/testinfo.dat index 815e57ddf59f..a99a9d150e80 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test17/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test17/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test18/test18.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test18/test18.cpp index ae7ae4c44bec..4318a5f4e67e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test18/test18.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test18/test18.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test18/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test18/testinfo.dat index b5165999a604..b022db560eed 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test18/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test18/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test19/test19.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test19/test19.cpp index 12f2b7ba99a3..70f586f77b5d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test19/test19.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test19/test19.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test19/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test19/testinfo.dat index ccc08cd7ba89..37ad02278b32 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test19/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test19/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test2/test2.cpp index a7b1b3a33605..215c26b679f0 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test2/testinfo.dat index d6d7c3e8bd06..f10b42f6fbf9 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test3/test3.cpp index 40c7d2afcf59..e361074ec26f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test3/testinfo.dat index 8fb9dc80600a..31fbe7cb21b5 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test4/test4.cpp index 2d61137d1baf..aea717f105b7 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test4/testinfo.dat index 435f9703cd15..f0a23f0f146f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test6/test6.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test6/test6.cpp index 51e99267a160..d9e47a156181 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test6/test6.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test6/test6.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test6/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test6/testinfo.dat index f4ad2e954e78..2b7032408c29 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test6/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test6/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test7/test7.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test7/test7.cpp index 6037cb0fe7ae..789e32983e3f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test7/test7.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test7/test7.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test7/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test7/testinfo.dat index ed0a474f7ef1..71011f070f03 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test7/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test7/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test8/test8.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test8/test8.cpp index baba524650e1..a500b073b7ab 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test8/test8.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test8/test8.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test8/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test8/testinfo.dat index 4c5114bd27d5..0293f2dc0a48 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test8/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test8/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test9/test9.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test9/test9.cpp index 5de004f5edcb..07754e2f63f8 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test9/test9.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test9/test9.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test9/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test9/testinfo.dat index 3c2bcdf3e5e7..a05265d7967b 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test9/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/test9/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/vswprintf.h b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/vswprintf.h index 3454d289a32b..ac72491695e8 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/vswprintf.h +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/vswprintf/vswprintf.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcscat/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcscat/test1/test1.cpp index e9a79d3880d6..c1f6f169f77e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcscat/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcscat/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcscat/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcscat/test1/testinfo.dat index 878c446251dd..8f5cff0e9d67 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcscat/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcscat/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcschr/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcschr/test1/test1.cpp index a4963672f8e9..eeecf331a104 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcschr/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcschr/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcschr/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcschr/test1/testinfo.dat index 40a166d61556..59e4d32dd313 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcschr/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcschr/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcscmp/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcscmp/test1/test1.cpp index 1c38dd6d5832..0b374518b05d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcscmp/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcscmp/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcscmp/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcscmp/test1/testinfo.dat index 0fe696fbe7ce..9d5c60a03521 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcscmp/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcscmp/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcscpy/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcscpy/test1/test1.cpp index 2ecafa830751..a2b98c5b6d4a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcscpy/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcscpy/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcscpy/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcscpy/test1/testinfo.dat index ef9c58ecc9c6..b989c1455691 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcscpy/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcscpy/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcslen/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcslen/test1/test1.cpp index 17d03276289d..ca2047b3c2d2 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcslen/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcslen/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcslen/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcslen/test1/testinfo.dat index cfdef4819d40..baefcff664d7 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcslen/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcslen/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsncmp/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsncmp/test1/test1.cpp index 4e4488f5a190..51ab8a371323 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsncmp/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsncmp/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsncmp/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsncmp/test1/testinfo.dat index 1f8b508748a7..4ff561aee846 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsncmp/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsncmp/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsncpy/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsncpy/test1/test1.cpp index 50d97b0e9cc7..85c531ff043f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsncpy/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsncpy/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsncpy/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsncpy/test1/testinfo.dat index b8b0ddb3f724..7bb0faaae94d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsncpy/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsncpy/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcspbrk/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcspbrk/test1/test1.cpp index b0432f781957..56773fce640f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcspbrk/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcspbrk/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcspbrk/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcspbrk/test1/testinfo.dat index 7044197b77ce..281570d87e78 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcspbrk/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcspbrk/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsrchr/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsrchr/test1/test1.cpp index ae8765776e95..fc28893ed0f6 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsrchr/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsrchr/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsrchr/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsrchr/test1/testinfo.dat index 984df9a3f35f..8ed25b99e003 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsrchr/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsrchr/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsstr/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsstr/test1/test1.cpp index 16005a9f8e1c..ab41299982c8 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsstr/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsstr/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsstr/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsstr/test1/testinfo.dat index e42fd8c9ebfc..3d3d5d1f90b4 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsstr/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsstr/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstod/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstod/test1/test1.cpp index e41e92e961e5..d49c9038752e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstod/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstod/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstod/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstod/test1/testinfo.dat index 19da0b5a4283..91eb1c62dd5d 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstod/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstod/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstod/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstod/test2/test2.cpp index 8f9b5cbf58f1..3bd972c1b2d3 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstod/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstod/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstod/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstod/test2/testinfo.dat index bf41e97075fb..1aa32d0b01e4 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstod/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstod/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstok/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstok/test1/test1.cpp index 76d7dc02b351..725669c36d56 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstok/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstok/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstok/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstok/test1/testinfo.dat index cc00844c6ab2..f28611680755 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstok/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstok/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test1/test1.cpp index 5274905e30a7..190e05e373a7 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test1/testinfo.dat index af4fb7e55dd2..1912c4332fba 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test2/test2.cpp index 07a020e67903..5464ee32869f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test2/testinfo.dat index b7e301f42322..699cc4090a3e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test3/test3.cpp index eac46615e29c..8e8916021d4e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test3/testinfo.dat index f7f6302d7939..c4671d63a09a 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test4/test4.cpp index 0261da4275dd..5aa380669ccd 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test4/testinfo.dat index 301178be3a55..2ae5a8b03f2f 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test5/test5.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test5/test5.cpp index a24123a209bc..0f9ce043c94b 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test5/test5.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test5/test5.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test5/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test5/testinfo.dat index bf7b2b6fe0ae..8f69b2ae9475 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test5/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test5/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test6/test6.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test6/test6.cpp index 28397ec73fd5..716dfef7cbdc 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test6/test6.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test6/test6.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test6/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test6/testinfo.dat index 40e18d540d61..255a584c9016 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test6/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcstoul/test6/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wprintf/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/wprintf/test1/test1.cpp index d99dc8cf9301..22b459eabf68 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wprintf/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wprintf/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wprintf/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/wprintf/test1/testinfo.dat index 02946361b0f0..5f807eee705e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wprintf/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wprintf/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wprintf/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/wprintf/test2/test2.cpp index 4e54d452e8f2..d1943902692e 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wprintf/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wprintf/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wprintf/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/c_runtime/wprintf/test2/testinfo.dat index 7808c069ddfe..7bbfe64e6cda 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wprintf/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wprintf/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wprintf/wprintf.h b/src/coreclr/src/pal/tests/palsuite/c_runtime/wprintf/wprintf.h index 3a96248c35d7..440d62c5a3e8 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wprintf/wprintf.h +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wprintf/wprintf.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/common/ResultBuffer.cpp b/src/coreclr/src/pal/tests/palsuite/common/ResultBuffer.cpp index e38c3241876b..4119399b3618 100644 --- a/src/coreclr/src/pal/tests/palsuite/common/ResultBuffer.cpp +++ b/src/coreclr/src/pal/tests/palsuite/common/ResultBuffer.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //#include "stdafx.h" #include "resultbuffer.h" diff --git a/src/coreclr/src/pal/tests/palsuite/common/ResultBuffer.h b/src/coreclr/src/pal/tests/palsuite/common/ResultBuffer.h index c59d421e2d48..0eb80f9e06bf 100644 --- a/src/coreclr/src/pal/tests/palsuite/common/ResultBuffer.h +++ b/src/coreclr/src/pal/tests/palsuite/common/ResultBuffer.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //#include //#include diff --git a/src/coreclr/src/pal/tests/palsuite/common/ResultTime.h b/src/coreclr/src/pal/tests/palsuite/common/ResultTime.h index 82daeb83c456..3d19d0f31681 100644 --- a/src/coreclr/src/pal/tests/palsuite/common/ResultTime.h +++ b/src/coreclr/src/pal/tests/palsuite/common/ResultTime.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _RESULT_TIME_H_ #define _RESULT_TIME_H_ diff --git a/src/coreclr/src/pal/tests/palsuite/common/pal_stdclib.h b/src/coreclr/src/pal/tests/palsuite/common/pal_stdclib.h index 61963db67c3c..a1bde4bdd3c7 100644 --- a/src/coreclr/src/pal/tests/palsuite/common/pal_stdclib.h +++ b/src/coreclr/src/pal/tests/palsuite/common/pal_stdclib.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/common/palsuite.h b/src/coreclr/src/pal/tests/palsuite/common/palsuite.h index 8cc501892599..34bf3a5fa1a4 100644 --- a/src/coreclr/src/pal/tests/palsuite/common/palsuite.h +++ b/src/coreclr/src/pal/tests/palsuite/common/palsuite.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/composite/object_management/event/nonshared/event.cpp b/src/coreclr/src/pal/tests/palsuite/composite/object_management/event/nonshared/event.cpp index 69ad9a30e315..337e0cf74f10 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/object_management/event/nonshared/event.cpp +++ b/src/coreclr/src/pal/tests/palsuite/composite/object_management/event/nonshared/event.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/composite/object_management/event/nonshared/main.cpp b/src/coreclr/src/pal/tests/palsuite/composite/object_management/event/nonshared/main.cpp index 7b61e91737dc..2d326c4b7246 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/object_management/event/nonshared/main.cpp +++ b/src/coreclr/src/pal/tests/palsuite/composite/object_management/event/nonshared/main.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/composite/object_management/event/shared/event.cpp b/src/coreclr/src/pal/tests/palsuite/composite/object_management/event/shared/event.cpp index 83d5fce27e38..8f136f3b5370 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/object_management/event/shared/event.cpp +++ b/src/coreclr/src/pal/tests/palsuite/composite/object_management/event/shared/event.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/composite/object_management/event/shared/main.cpp b/src/coreclr/src/pal/tests/palsuite/composite/object_management/event/shared/main.cpp index c4a4067b5dcb..6824d3c2507e 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/object_management/event/shared/main.cpp +++ b/src/coreclr/src/pal/tests/palsuite/composite/object_management/event/shared/main.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/composite/object_management/mutex/nonshared/main.cpp b/src/coreclr/src/pal/tests/palsuite/composite/object_management/mutex/nonshared/main.cpp index 80f31aad6ee0..0937a2a8967d 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/object_management/mutex/nonshared/main.cpp +++ b/src/coreclr/src/pal/tests/palsuite/composite/object_management/mutex/nonshared/main.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/composite/object_management/mutex/nonshared/mutex.cpp b/src/coreclr/src/pal/tests/palsuite/composite/object_management/mutex/nonshared/mutex.cpp index 7f1f659f9223..8dc808c99ab2 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/object_management/mutex/nonshared/mutex.cpp +++ b/src/coreclr/src/pal/tests/palsuite/composite/object_management/mutex/nonshared/mutex.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/composite/object_management/mutex/shared/main.cpp b/src/coreclr/src/pal/tests/palsuite/composite/object_management/mutex/shared/main.cpp index aa9885556570..a8481f60d1b1 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/object_management/mutex/shared/main.cpp +++ b/src/coreclr/src/pal/tests/palsuite/composite/object_management/mutex/shared/main.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/composite/object_management/mutex/shared/mutex.cpp b/src/coreclr/src/pal/tests/palsuite/composite/object_management/mutex/shared/mutex.cpp index ec5d9b37ac6f..19fe3ad6f90a 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/object_management/mutex/shared/mutex.cpp +++ b/src/coreclr/src/pal/tests/palsuite/composite/object_management/mutex/shared/mutex.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/composite/object_management/semaphore/nonshared/main.cpp b/src/coreclr/src/pal/tests/palsuite/composite/object_management/semaphore/nonshared/main.cpp index 854809c8f82f..effe5c3527f8 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/object_management/semaphore/nonshared/main.cpp +++ b/src/coreclr/src/pal/tests/palsuite/composite/object_management/semaphore/nonshared/main.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/composite/object_management/semaphore/nonshared/semaphore.cpp b/src/coreclr/src/pal/tests/palsuite/composite/object_management/semaphore/nonshared/semaphore.cpp index 0e487f2c17e2..6c84a77c6c15 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/object_management/semaphore/nonshared/semaphore.cpp +++ b/src/coreclr/src/pal/tests/palsuite/composite/object_management/semaphore/nonshared/semaphore.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/composite/object_management/semaphore/shared/main.cpp b/src/coreclr/src/pal/tests/palsuite/composite/object_management/semaphore/shared/main.cpp index d3cfa762bba6..fd9167d487ad 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/object_management/semaphore/shared/main.cpp +++ b/src/coreclr/src/pal/tests/palsuite/composite/object_management/semaphore/shared/main.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/composite/object_management/semaphore/shared/semaphore.cpp b/src/coreclr/src/pal/tests/palsuite/composite/object_management/semaphore/shared/semaphore.cpp index 5143c55143e4..251e4d2fdcc5 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/object_management/semaphore/shared/semaphore.cpp +++ b/src/coreclr/src/pal/tests/palsuite/composite/object_management/semaphore/shared/semaphore.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/composite/synchronization/criticalsection/criticalsection.cpp b/src/coreclr/src/pal/tests/palsuite/composite/synchronization/criticalsection/criticalsection.cpp index 2fcd363e8a50..60a41283ee22 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/synchronization/criticalsection/criticalsection.cpp +++ b/src/coreclr/src/pal/tests/palsuite/composite/synchronization/criticalsection/criticalsection.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/composite/synchronization/criticalsection/mainWrapper.cpp b/src/coreclr/src/pal/tests/palsuite/composite/synchronization/criticalsection/mainWrapper.cpp index 4bc2f3d83449..7f9659dd9973 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/synchronization/criticalsection/mainWrapper.cpp +++ b/src/coreclr/src/pal/tests/palsuite/composite/synchronization/criticalsection/mainWrapper.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* Source Code: mainWrapper.c diff --git a/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecriticalsection/mtx_critsect.cpp b/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecriticalsection/mtx_critsect.cpp index 790c89f966f8..6f5a032a62cd 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecriticalsection/mtx_critsect.cpp +++ b/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecriticalsection/mtx_critsect.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //#include #include diff --git a/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecriticalsection/mtx_critsect.h b/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecriticalsection/mtx_critsect.h index bc44ad8ecd95..90c36cc61cdc 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecriticalsection/mtx_critsect.h +++ b/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecriticalsection/mtx_critsect.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include diff --git a/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecriticalsection/pal_composite_native_cs.cpp b/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecriticalsection/pal_composite_native_cs.cpp index 0ccd5c941948..a36931205a5d 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecriticalsection/pal_composite_native_cs.cpp +++ b/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecriticalsection/pal_composite_native_cs.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include #include diff --git a/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecriticalsection/resultbuffer.cpp b/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecriticalsection/resultbuffer.cpp index c9ed9435f14c..e99e31ff31d3 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecriticalsection/resultbuffer.cpp +++ b/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecriticalsection/resultbuffer.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //#include "stdafx.h" #include "resultbuffer.h" diff --git a/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecriticalsection/resultbuffer.h b/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecriticalsection/resultbuffer.h index 89209581003b..c3d9a27fdb78 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecriticalsection/resultbuffer.h +++ b/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecriticalsection/resultbuffer.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include #include diff --git a/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/hpitinterlock.s b/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/hpitinterlock.s index 062f4ebe6a7a..97d7c718ba70 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/hpitinterlock.s +++ b/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/hpitinterlock.s @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/interlocked.cpp b/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/interlocked.cpp index b6c1dd7a8ff9..a87b6c4a2842 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/interlocked.cpp +++ b/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/interlocked.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. typedef long LONG; diff --git a/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/mtx_critsect.cpp b/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/mtx_critsect.cpp index 69c10e9078a6..cd62a7840a1c 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/mtx_critsect.cpp +++ b/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/mtx_critsect.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include diff --git a/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/mtx_critsect.h b/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/mtx_critsect.h index becbf6f0cae6..16e9eb9cbb39 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/mtx_critsect.h +++ b/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/mtx_critsect.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include diff --git a/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/pal_composite_native_cs.cpp b/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/pal_composite_native_cs.cpp index ec5c1c365f55..18d967423771 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/pal_composite_native_cs.cpp +++ b/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/pal_composite_native_cs.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include #include diff --git a/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/resultbuffer.cpp b/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/resultbuffer.cpp index c9ed9435f14c..e99e31ff31d3 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/resultbuffer.cpp +++ b/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/resultbuffer.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //#include "stdafx.h" #include "resultbuffer.h" diff --git a/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/resultbuffer.h b/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/resultbuffer.h index 89209581003b..c3d9a27fdb78 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/resultbuffer.h +++ b/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/resultbuffer.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include #include diff --git a/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/sparcinterloc.s b/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/sparcinterloc.s index b9708bc770ac..20647c77818d 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/sparcinterloc.s +++ b/src/coreclr/src/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/sparcinterloc.s @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/pal/tests/palsuite/composite/threading/threadsuspension/mainWrapper.cpp b/src/coreclr/src/pal/tests/palsuite/composite/threading/threadsuspension/mainWrapper.cpp index 05a71191cf8f..4366f26137ee 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/threading/threadsuspension/mainWrapper.cpp +++ b/src/coreclr/src/pal/tests/palsuite/composite/threading/threadsuspension/mainWrapper.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* Source Code: mainWrapper.c diff --git a/src/coreclr/src/pal/tests/palsuite/composite/threading/threadsuspension/threadsuspension.cpp b/src/coreclr/src/pal/tests/palsuite/composite/threading/threadsuspension/threadsuspension.cpp index 86ee4e2fc0bd..2e2539445e37 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/threading/threadsuspension/threadsuspension.cpp +++ b/src/coreclr/src/pal/tests/palsuite/composite/threading/threadsuspension/threadsuspension.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/composite/threading/threadsuspension_switchthread/mainWrapper.cpp b/src/coreclr/src/pal/tests/palsuite/composite/threading/threadsuspension_switchthread/mainWrapper.cpp index 05a71191cf8f..4366f26137ee 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/threading/threadsuspension_switchthread/mainWrapper.cpp +++ b/src/coreclr/src/pal/tests/palsuite/composite/threading/threadsuspension_switchthread/mainWrapper.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* Source Code: mainWrapper.c diff --git a/src/coreclr/src/pal/tests/palsuite/composite/threading/threadsuspension_switchthread/threadsuspension.cpp b/src/coreclr/src/pal/tests/palsuite/composite/threading/threadsuspension_switchthread/threadsuspension.cpp index a117b8617441..da445a06570d 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/threading/threadsuspension_switchthread/threadsuspension.cpp +++ b/src/coreclr/src/pal/tests/palsuite/composite/threading/threadsuspension_switchthread/threadsuspension.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/composite/wfmo/main.cpp b/src/coreclr/src/pal/tests/palsuite/composite/wfmo/main.cpp index d186aa7b8bdf..43c5b98c7b3b 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/wfmo/main.cpp +++ b/src/coreclr/src/pal/tests/palsuite/composite/wfmo/main.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** Source Code: main.c and mutex.c diff --git a/src/coreclr/src/pal/tests/palsuite/composite/wfmo/mutex.cpp b/src/coreclr/src/pal/tests/palsuite/composite/wfmo/mutex.cpp index c8ed01426c75..5d2310fcfb19 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/wfmo/mutex.cpp +++ b/src/coreclr/src/pal/tests/palsuite/composite/wfmo/mutex.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ **Source Code: main.c and mutex.c diff --git a/src/coreclr/src/pal/tests/palsuite/debug_api/DebugBreak/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/debug_api/DebugBreak/test1/test1.cpp index 2b10b9ad9d07..b0872c3f37d1 100644 --- a/src/coreclr/src/pal/tests/palsuite/debug_api/DebugBreak/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/debug_api/DebugBreak/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/debug_api/DebugBreak/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/debug_api/DebugBreak/test1/testinfo.dat index 25c480eccb16..65215093cd0a 100644 --- a/src/coreclr/src/pal/tests/palsuite/debug_api/DebugBreak/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/debug_api/DebugBreak/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Debug diff --git a/src/coreclr/src/pal/tests/palsuite/debug_api/OutputDebugStringA/test1/helper.cpp b/src/coreclr/src/pal/tests/palsuite/debug_api/OutputDebugStringA/test1/helper.cpp index 90073dfedd4d..85f9c64b8ba7 100644 --- a/src/coreclr/src/pal/tests/palsuite/debug_api/OutputDebugStringA/test1/helper.cpp +++ b/src/coreclr/src/pal/tests/palsuite/debug_api/OutputDebugStringA/test1/helper.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/debug_api/OutputDebugStringA/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/debug_api/OutputDebugStringA/test1/test1.cpp index 080c6ac53ec7..07b0c6798177 100644 --- a/src/coreclr/src/pal/tests/palsuite/debug_api/OutputDebugStringA/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/debug_api/OutputDebugStringA/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/debug_api/OutputDebugStringA/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/debug_api/OutputDebugStringA/test1/testinfo.dat index d49e9048d14f..e4d37931ec9c 100644 --- a/src/coreclr/src/pal/tests/palsuite/debug_api/OutputDebugStringA/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/debug_api/OutputDebugStringA/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Debug diff --git a/src/coreclr/src/pal/tests/palsuite/debug_api/OutputDebugStringW/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/debug_api/OutputDebugStringW/test1/test1.cpp index 88b55427bcef..c0fb3743ede2 100644 --- a/src/coreclr/src/pal/tests/palsuite/debug_api/OutputDebugStringW/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/debug_api/OutputDebugStringW/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/debug_api/OutputDebugStringW/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/debug_api/OutputDebugStringW/test1/testinfo.dat index d6bc4ac5a152..eee22efa9247 100644 --- a/src/coreclr/src/pal/tests/palsuite/debug_api/OutputDebugStringW/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/debug_api/OutputDebugStringW/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Debug diff --git a/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1/commonconsts.h b/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1/commonconsts.h index eb7d51153461..f056c478dd83 100644 --- a/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1/commonconsts.h +++ b/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1/commonconsts.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1/helper.cpp b/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1/helper.cpp index d965ca7a5116..ba53f6e17be0 100644 --- a/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1/helper.cpp +++ b/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1/helper.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1/test1.cpp index f390c10c7227..a3608bde245c 100644 --- a/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1/testinfo.dat index 0946f8f13845..130bba97be97 100644 --- a/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Debug diff --git a/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test3/commonconsts.h b/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test3/commonconsts.h index c1cec18e2d05..b055ddf07ade 100644 --- a/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test3/commonconsts.h +++ b/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test3/commonconsts.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test3/helper.cpp b/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test3/helper.cpp index 170e2064cbe0..a64477424263 100644 --- a/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test3/helper.cpp +++ b/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test3/helper.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test3/test3.cpp index 15b4b3f79d15..bef06d0843e7 100644 --- a/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test3/testinfo.dat index 23ad3ae56762..92dd2c62320d 100644 --- a/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Debug diff --git a/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test4/helper.cpp b/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test4/helper.cpp index b653ea505701..aa9746f56328 100644 --- a/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test4/helper.cpp +++ b/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test4/helper.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test4/test4.cpp index 51db23499bbf..34f72ce1c02a 100644 --- a/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test4/testinfo.dat index c6f4edb5d64d..4f69644dce2c 100644 --- a/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Debug diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER/test1/PAL_EXCEPT_FILTER.cpp b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER/test1/PAL_EXCEPT_FILTER.cpp index ee65f43d2c0a..fa537b43d0b4 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER/test1/PAL_EXCEPT_FILTER.cpp +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER/test1/PAL_EXCEPT_FILTER.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER/test1/testinfo.dat index b0b90d3ab48b..1d68e987f53f 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = exception_handling diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER/test2/pal_except_filter.cpp b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER/test2/pal_except_filter.cpp index ccf53fb0ba20..0e960c247875 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER/test2/pal_except_filter.cpp +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER/test2/pal_except_filter.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER/test2/testinfo.dat index 729d2a4c49d1..66789ab817d8 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = exception_handling diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER/test3/pal_except_filter.cpp b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER/test3/pal_except_filter.cpp index 20c36840b13d..11f420ea809d 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER/test3/pal_except_filter.cpp +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER/test3/pal_except_filter.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER/test3/testinfo.dat index d2df399392b1..795ba064b8c4 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = exception_handling diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER_EX/test1/PAL_EXCEPT_FILTER_EX.cpp b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER_EX/test1/PAL_EXCEPT_FILTER_EX.cpp index 91f392d8d759..b987b14f59d8 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER_EX/test1/PAL_EXCEPT_FILTER_EX.cpp +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER_EX/test1/PAL_EXCEPT_FILTER_EX.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER_EX/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER_EX/test1/testinfo.dat index 1d8f8f600e5e..3dae7bcad5db 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER_EX/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER_EX/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = exception_handling diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER_EX/test2/pal_except_filter_ex.cpp b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER_EX/test2/pal_except_filter_ex.cpp index ab25c4973326..314221178b44 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER_EX/test2/pal_except_filter_ex.cpp +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER_EX/test2/pal_except_filter_ex.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER_EX/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER_EX/test2/testinfo.dat index 0343d133e899..4c5c5b2d606e 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER_EX/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER_EX/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = exception_handling diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER_EX/test3/pal_except_filter.cpp b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER_EX/test3/pal_except_filter.cpp index a17cb4f6b3bd..bb0be8b3038e 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER_EX/test3/pal_except_filter.cpp +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER_EX/test3/pal_except_filter.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER_EX/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER_EX/test3/testinfo.dat index 568296c39949..ae6093b1dbea 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER_EX/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER_EX/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = exception_handling diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT/test1/PAL_TRY_EXCEPT.cpp b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT/test1/PAL_TRY_EXCEPT.cpp index 4fb09bd27603..eb2bbce1ee6e 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT/test1/PAL_TRY_EXCEPT.cpp +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT/test1/PAL_TRY_EXCEPT.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT/test1/testinfo.dat index 1f663a8bc551..7108fe259f1b 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = exception_handling diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT/test2/PAL_TRY_EXCEPT.cpp b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT/test2/PAL_TRY_EXCEPT.cpp index eb7b9d125790..baf4533bd8a0 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT/test2/PAL_TRY_EXCEPT.cpp +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT/test2/PAL_TRY_EXCEPT.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT/test2/testinfo.dat index a5815f5722c3..8ccdd101a194 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = exception_handling diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT_EX/test1/PAL_TRY_EXCEPT_EX.cpp b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT_EX/test1/PAL_TRY_EXCEPT_EX.cpp index 8b4dd7b4307a..2225f46aab6f 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT_EX/test1/PAL_TRY_EXCEPT_EX.cpp +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT_EX/test1/PAL_TRY_EXCEPT_EX.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT_EX/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT_EX/test1/testinfo.dat index b5714279357b..afb31350006f 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT_EX/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT_EX/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = exception_handling diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT_EX/test2/PAL_TRY_EXCEPT_EX.cpp b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT_EX/test2/PAL_TRY_EXCEPT_EX.cpp index 5ab4a95ce9cd..c56552d4b59c 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT_EX/test2/PAL_TRY_EXCEPT_EX.cpp +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT_EX/test2/PAL_TRY_EXCEPT_EX.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT_EX/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT_EX/test2/testinfo.dat index f71964da1ce8..79d5b8b22304 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT_EX/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT_EX/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = exception_handling diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT_EX/test3/PAL_TRY_EXCEPT_EX.cpp b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT_EX/test3/PAL_TRY_EXCEPT_EX.cpp index d6a948926b9f..7e4d97f11ec2 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT_EX/test3/PAL_TRY_EXCEPT_EX.cpp +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT_EX/test3/PAL_TRY_EXCEPT_EX.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT_EX/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT_EX/test3/testinfo.dat index a24544708864..99d74e1f4353 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT_EX/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_EXCEPT_EX/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = exception_handling diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_LEAVE_FINALLY/test1/PAL_TRY_LEAVE_FINALLY.cpp b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_LEAVE_FINALLY/test1/PAL_TRY_LEAVE_FINALLY.cpp index 675c2a594783..b5de993e5b38 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_LEAVE_FINALLY/test1/PAL_TRY_LEAVE_FINALLY.cpp +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_LEAVE_FINALLY/test1/PAL_TRY_LEAVE_FINALLY.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_LEAVE_FINALLY/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_LEAVE_FINALLY/test1/testinfo.dat index 8a90ef392c2d..22e7f4fd5058 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_LEAVE_FINALLY/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/PAL_TRY_LEAVE_FINALLY/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/RaiseException/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/exception_handling/RaiseException/test1/test1.cpp index 9130bc362d82..22ffbc0c030a 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/RaiseException/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/RaiseException/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/RaiseException/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/exception_handling/RaiseException/test1/testinfo.dat index 890b5efec75a..8dc343012a59 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/RaiseException/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/RaiseException/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = exception_handling diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/RaiseException/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/exception_handling/RaiseException/test2/test2.cpp index f8db573ac0b9..e5a85fe6adc2 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/RaiseException/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/RaiseException/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/RaiseException/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/exception_handling/RaiseException/test2/testinfo.dat index ce85e67ace21..8d59d41a2bae 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/RaiseException/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/RaiseException/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/RaiseException/test3/test.cpp b/src/coreclr/src/pal/tests/palsuite/exception_handling/RaiseException/test3/test.cpp index 5278ad17724a..47199b55fa2f 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/RaiseException/test3/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/RaiseException/test3/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/RaiseException/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/exception_handling/RaiseException/test3/testinfo.dat index 12a56f0efe4b..fe650592402b 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/RaiseException/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/RaiseException/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = exception_handling diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test1/test1.cpp index 0fe48e7fc398..809c9bba5bda 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test1/testinfo.dat index 246553a9cb74..5c2a4849ebdb 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test2/test2.cpp index bc0d4e300a36..68238c4e1e9e 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test2/testinfo.dat index 39a628b16c18..6aa28db3527d 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test3/test3.cpp index 013769777413..0e6b2641d14b 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test3/testinfo.dat index 07da444a5ac4..348940e6a27f 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test4/test4.cpp index 87844973b026..386f50243898 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test4/testinfo.dat index d658cc85faa0..3f761bc2487f 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test5/test5.cpp b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test5/test5.cpp index f9faf4440e12..97ee1d8d2810 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test5/test5.cpp +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test5/test5.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test5/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test5/testinfo.dat index 2e12d0c64b46..9ff2fbfb8b02 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test5/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test5/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test6/test6.cpp b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test6/test6.cpp index 44b0ba1bc921..c3fc8547690f 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test6/test6.cpp +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test6/test6.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test6/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test6/testinfo.dat index f8901a7f50d4..5d6006cef6d8 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test6/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test6/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test7/test7.cpp b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test7/test7.cpp index a8dc8331c202..cc43f4ee2a0a 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test7/test7.cpp +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test7/test7.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test7/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test7/testinfo.dat index 546d64cdecd0..97cdfa4ba75f 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test7/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_except/test7/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_finally/test1/pal_finally.cpp b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_finally/test1/pal_finally.cpp index f278f98956f6..423355b2d68d 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_finally/test1/pal_finally.cpp +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_finally/test1/pal_finally.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_finally/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_finally/test1/testinfo.dat index 5c2624343891..66626c2039ed 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_finally/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_finally/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = exception_handling diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_sxs/test1/CMakeLists.txt b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_sxs/test1/CMakeLists.txt index 2d2d037ca29c..0db9b289dc80 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_sxs/test1/CMakeLists.txt +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_sxs/test1/CMakeLists.txt @@ -18,18 +18,9 @@ convert_to_absolute_path(DEF_SOURCES1 ${DEF_SOURCES1}) set(EXPORTS_FILE1 ${CMAKE_CURRENT_BINARY_DIR}/dlltest1.exports) generate_exports_file(${DEF_SOURCES1} ${EXPORTS_FILE1}) -if(CLR_CMAKE_TARGET_LINUX OR CLR_CMAKE_TARGET_FREEBSD OR CLR_CMAKE_TARGET_NETBSD) - set(EXPORTS_LINKER_OPTION1 -Wl,--version-script=${EXPORTS_FILE1}) -endif(CLR_CMAKE_TARGET_LINUX OR CLR_CMAKE_TARGET_FREEBSD OR CLR_CMAKE_TARGET_NETBSD) - -if(CLR_CMAKE_TARGET_OSX) - set(EXPORTS_LINKER_OPTION1 -Wl,-exported_symbols_list,${EXPORTS_FILE1}) -endif(CLR_CMAKE_TARGET_OSX) - -if(CLR_CMAKE_TARGET_SUNOS) - # Add linker exports file option - set(EXPORTS_LINKER_OPTION -Wl,-M,${EXPORTS_FILE}) -endif(CLR_CMAKE_TARGET_SUNOS) +if(CLR_CMAKE_HOST_UNIX) + set_exports_linker_option(${EXPORTS_FILE}) +endif(CLR_CMAKE_HOST_UNIX) set(DLL1SOURCES dlltest1.cpp) add_library(paltest_pal_sxs_test1_dll1 SHARED ${DLL1SOURCES}) diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_sxs/test1/dlltest1.cpp b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_sxs/test1/dlltest1.cpp index bbcb664bfe55..c39a85646122 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_sxs/test1/dlltest1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_sxs/test1/dlltest1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_sxs/test1/dlltest2.cpp b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_sxs/test1/dlltest2.cpp index 084d99040444..9b10c03d30cb 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_sxs/test1/dlltest2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_sxs/test1/dlltest2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_sxs/test1/exceptionsxs.cpp b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_sxs/test1/exceptionsxs.cpp index 97a963c120a7..aed4d6184a5c 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_sxs/test1/exceptionsxs.cpp +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_sxs/test1/exceptionsxs.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_sxs/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_sxs/test1/testinfo.dat index c0cf1ddfcb0b..1e4162db5d1c 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_sxs/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_sxs/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = exception_handling diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileA/test1/CopyFileA.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileA/test1/CopyFileA.cpp index bfea85b7cb03..fcfb463a9349 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileA/test1/CopyFileA.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileA/test1/CopyFileA.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileA/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileA/test1/testinfo.dat index 88b9c73cb48b..305e3486f2bd 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileA/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileA/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileA/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileA/test2/test2.cpp index 56618d0a58b2..60e1ffa280b9 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileA/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileA/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileA/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileA/test2/testinfo.dat index 31143842e689..17f971771216 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileA/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileA/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileA/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileA/test3/test3.cpp index b28bfe36fbd1..48ebda2d5fc3 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileA/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileA/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileA/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileA/test3/testinfo.dat index 5a9775d14fb7..fde68250de9d 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileA/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileA/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileA/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileA/test4/test4.cpp index 4a99938eb510..05d07eed5d17 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileA/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileA/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileA/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileA/test4/testinfo.dat index 42187b760fc0..662c16999128 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileA/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileA/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileW/test1/CopyFileW.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileW/test1/CopyFileW.cpp index 6127cc21bd8a..49e25f1ed947 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileW/test1/CopyFileW.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileW/test1/CopyFileW.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileW/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileW/test1/testinfo.dat index b7ff6de2fd40..80eaf917be67 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileW/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileW/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileW/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileW/test2/test2.cpp index 5380a181ca8e..98fb244627e1 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileW/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileW/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileW/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileW/test2/testinfo.dat index 7e1591dd7255..b81c63f7b237 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileW/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileW/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileW/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileW/test3/test3.cpp index a2eb04c443b7..739abc9504f4 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileW/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileW/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileW/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileW/test3/testinfo.dat index 9fd185dad00c..ef91c318e520 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileW/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/CopyFileW/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/CreateFileA/test1/CreateFileA.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/CreateFileA/test1/CreateFileA.cpp index f98fc5b9c5ff..21150a0614ca 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/CreateFileA/test1/CreateFileA.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/CreateFileA/test1/CreateFileA.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/CreateFileA/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/CreateFileA/test1/testinfo.dat index bb872806eb7c..3f3083a78c1a 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/CreateFileA/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/CreateFileA/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/CreateFileW/test1/CreateFileW.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/CreateFileW/test1/CreateFileW.cpp index 0619f5b4aa4c..a861f3d88fa2 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/CreateFileW/test1/CreateFileW.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/CreateFileW/test1/CreateFileW.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/CreateFileW/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/CreateFileW/test1/testinfo.dat index 2dbf159996cb..b4028e8a44ae 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/CreateFileW/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/CreateFileW/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/DeleteFileA/test1/DeleteFileA.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/DeleteFileA/test1/DeleteFileA.cpp index a8eb71decb5f..badb3ba8525a 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/DeleteFileA/test1/DeleteFileA.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/DeleteFileA/test1/DeleteFileA.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/DeleteFileA/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/DeleteFileA/test1/testinfo.dat index 24283ed9323b..5522d2855608 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/DeleteFileA/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/DeleteFileA/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/DeleteFileW/test1/DeleteFileW.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/DeleteFileW/test1/DeleteFileW.cpp index fca96d1e00b7..ef9069670206 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/DeleteFileW/test1/DeleteFileW.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/DeleteFileW/test1/DeleteFileW.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/DeleteFileW/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/DeleteFileW/test1/testinfo.dat index db44f998fc04..78f0fbc2bd9d 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/DeleteFileW/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/DeleteFileW/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/FILECanonicalizePath/FILECanonicalizePath.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/FILECanonicalizePath/FILECanonicalizePath.cpp index 3a1758aa3b82..4661843d7803 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/FILECanonicalizePath/FILECanonicalizePath.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/FILECanonicalizePath/FILECanonicalizePath.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/FILECanonicalizePath/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/FILECanonicalizePath/testinfo.dat index 033ad78b473b..c06c21c75883 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/FILECanonicalizePath/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/FILECanonicalizePath/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/FindClose/test1/FindClose.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/FindClose/test1/FindClose.cpp index 3d53806e486f..f9df4b9c077a 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/FindClose/test1/FindClose.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/FindClose/test1/FindClose.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/FindClose/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/FindClose/test1/testinfo.dat index b59bcbf5789c..a330c61b8585 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/FindClose/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/FindClose/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/FindFirstFileA/test1/FindFirstFileA.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/FindFirstFileA/test1/FindFirstFileA.cpp index 6ceb6a97479a..901a1f35e6bb 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/FindFirstFileA/test1/FindFirstFileA.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/FindFirstFileA/test1/FindFirstFileA.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/FindFirstFileA/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/FindFirstFileA/test1/testinfo.dat index 5b92f8c642d5..7a2e05906dc8 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/FindFirstFileA/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/FindFirstFileA/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/FindFirstFileW/test1/FindFirstFileW.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/FindFirstFileW/test1/FindFirstFileW.cpp index f69a6259764b..ac3ba18d95ee 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/FindFirstFileW/test1/FindFirstFileW.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/FindFirstFileW/test1/FindFirstFileW.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/FindFirstFileW/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/FindFirstFileW/test1/testinfo.dat index c088c04cbde3..0a89d3659dfc 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/FindFirstFileW/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/FindFirstFileW/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/FindNextFileA/test1/FindNextFileA.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/FindNextFileA/test1/FindNextFileA.cpp index 578fa0054273..a9192b464c9d 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/FindNextFileA/test1/FindNextFileA.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/FindNextFileA/test1/FindNextFileA.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/FindNextFileA/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/FindNextFileA/test1/testinfo.dat index e1027eff328d..dc0ad63f1a64 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/FindNextFileA/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/FindNextFileA/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/FindNextFileA/test2/findnextfilea.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/FindNextFileA/test2/findnextfilea.cpp index c841a4d498e2..091d0c37bd54 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/FindNextFileA/test2/findnextfilea.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/FindNextFileA/test2/findnextfilea.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/FindNextFileA/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/FindNextFileA/test2/testinfo.dat index dd6c1e48b3bf..23d17cb80c12 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/FindNextFileA/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/FindNextFileA/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/FindNextFileW/test1/FindNextFileW.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/FindNextFileW/test1/FindNextFileW.cpp index 42e2e55805d9..df271f8b849d 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/FindNextFileW/test1/FindNextFileW.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/FindNextFileW/test1/FindNextFileW.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/FindNextFileW/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/FindNextFileW/test1/testinfo.dat index 3eaebef43eea..97ac53884a24 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/FindNextFileW/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/FindNextFileW/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/FindNextFileW/test2/findnextfilew.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/FindNextFileW/test2/findnextfilew.cpp index 3e806c257647..b0e5f4857b8a 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/FindNextFileW/test2/findnextfilew.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/FindNextFileW/test2/findnextfilew.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/FindNextFileW/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/FindNextFileW/test2/testinfo.dat index 98bd5e77937b..664538d76a86 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/FindNextFileW/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/FindNextFileW/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/FlushFileBuffers/test1/FlushFileBuffers.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/FlushFileBuffers/test1/FlushFileBuffers.cpp index 246be64847fd..8c7b7545fadb 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/FlushFileBuffers/test1/FlushFileBuffers.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/FlushFileBuffers/test1/FlushFileBuffers.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/FlushFileBuffers/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/FlushFileBuffers/test1/testinfo.dat index 3a0da6918d4c..54b3c24e3055 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/FlushFileBuffers/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/FlushFileBuffers/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetConsoleOutputCP/test1/GetConsoleOutputCP.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/GetConsoleOutputCP/test1/GetConsoleOutputCP.cpp index 3deaebf68fad..137839387cd5 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetConsoleOutputCP/test1/GetConsoleOutputCP.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetConsoleOutputCP/test1/GetConsoleOutputCP.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetConsoleOutputCP/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/GetConsoleOutputCP/test1/testinfo.dat index 9ad624eaf2d1..85fb02067be4 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetConsoleOutputCP/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetConsoleOutputCP/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetCurrentDirectoryA/test1/GetCurrentDirectoryA.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/GetCurrentDirectoryA/test1/GetCurrentDirectoryA.cpp index b09e8a104d53..2e28e530bfd4 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetCurrentDirectoryA/test1/GetCurrentDirectoryA.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetCurrentDirectoryA/test1/GetCurrentDirectoryA.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetCurrentDirectoryA/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/GetCurrentDirectoryA/test1/testinfo.dat index c14eb42b22ed..d5c59d997073 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetCurrentDirectoryA/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetCurrentDirectoryA/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetCurrentDirectoryW/test1/GetCurrentDirectoryW.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/GetCurrentDirectoryW/test1/GetCurrentDirectoryW.cpp index 4f4697b0a26b..a183663387cf 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetCurrentDirectoryW/test1/GetCurrentDirectoryW.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetCurrentDirectoryW/test1/GetCurrentDirectoryW.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetCurrentDirectoryW/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/GetCurrentDirectoryW/test1/testinfo.dat index 4443a79833f6..d3ddb7ea4f1d 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetCurrentDirectoryW/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetCurrentDirectoryW/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetFileAttributesA/test1/GetFileAttributesA.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/GetFileAttributesA/test1/GetFileAttributesA.cpp index 1d9d85d7718a..9d71293acfef 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetFileAttributesA/test1/GetFileAttributesA.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetFileAttributesA/test1/GetFileAttributesA.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetFileAttributesA/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/GetFileAttributesA/test1/testinfo.dat index 2053220bf36b..eb49f3c49520 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetFileAttributesA/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetFileAttributesA/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetFileAttributesExW/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/GetFileAttributesExW/test1/test1.cpp index af279ed1ef7d..037d276af803 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetFileAttributesExW/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetFileAttributesExW/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetFileAttributesExW/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/GetFileAttributesExW/test1/testinfo.dat index fbc397eac0ca..6135ede5bc7a 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetFileAttributesExW/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetFileAttributesExW/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetFileAttributesExW/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/GetFileAttributesExW/test2/test2.cpp index f244a3bf6a55..f5fea17222d6 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetFileAttributesExW/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetFileAttributesExW/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetFileAttributesExW/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/GetFileAttributesExW/test2/testinfo.dat index 560e3f6266a5..af5d031cd28c 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetFileAttributesExW/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetFileAttributesExW/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetFileAttributesW/test1/GetFileAttributesW.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/GetFileAttributesW/test1/GetFileAttributesW.cpp index ffae4d985e20..cb5745337169 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetFileAttributesW/test1/GetFileAttributesW.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetFileAttributesW/test1/GetFileAttributesW.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetFileAttributesW/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/GetFileAttributesW/test1/testinfo.dat index 1a8089a0f1b7..e837aeae70aa 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetFileAttributesW/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetFileAttributesW/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetFileSize/test1/GetFileSize.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/GetFileSize/test1/GetFileSize.cpp index fac01c98c999..f66d5b94054b 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetFileSize/test1/GetFileSize.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetFileSize/test1/GetFileSize.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetFileSize/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/GetFileSize/test1/testinfo.dat index 38258572db16..ea1c1021d5e9 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetFileSize/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetFileSize/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetFileSizeEx/test1/GetFileSizeEx.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/GetFileSizeEx/test1/GetFileSizeEx.cpp index ef5afd0e6b89..3361047c2713 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetFileSizeEx/test1/GetFileSizeEx.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetFileSizeEx/test1/GetFileSizeEx.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetFileSizeEx/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/GetFileSizeEx/test1/testinfo.dat index 5968fe727130..587113c35566 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetFileSizeEx/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetFileSizeEx/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameA/test1/GetFullPathNameA.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameA/test1/GetFullPathNameA.cpp index de9a266f5a8e..eda6f130c4f3 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameA/test1/GetFullPathNameA.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameA/test1/GetFullPathNameA.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameA/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameA/test1/testinfo.dat index a4ccc9534888..f5191c648a6a 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameA/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameA/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameA/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameA/test2/test2.cpp index 95a1497331db..caec7d8be8d3 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameA/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameA/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameA/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameA/test2/testinfo.dat index b75f48114bb8..fd72c84010f6 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameA/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameA/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameA/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameA/test3/test3.cpp index 0cc39e7300a0..54c53955465d 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameA/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameA/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameA/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameA/test3/testinfo.dat index 3991744d42a2..1a1de6d9555c 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameA/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameA/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameA/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameA/test4/test4.cpp index fb22c1f07bb1..fd9879b03c8d 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameA/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameA/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameA/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameA/test4/testinfo.dat index 8a7b3b35dac6..9480549d73e5 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameA/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameA/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameW/test1/GetFullPathNameW.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameW/test1/GetFullPathNameW.cpp index 4fb1effe45ae..e4562132016b 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameW/test1/GetFullPathNameW.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameW/test1/GetFullPathNameW.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameW/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameW/test1/testinfo.dat index 4f70617d48d9..4b7448ddb447 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameW/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameW/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameW/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameW/test2/test2.cpp index 9ed10d02751e..3faaffa3f5c2 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameW/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameW/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameW/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameW/test2/testinfo.dat index b8460e0b784d..facd0940b060 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameW/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameW/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameW/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameW/test3/test3.cpp index 5b16b678cdd6..ca2b13bc5154 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameW/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameW/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameW/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameW/test3/testinfo.dat index 1eb6a27ada7b..fe20866ad7f6 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameW/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameW/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameW/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameW/test4/test4.cpp index d1efc81e5f6a..6976dcd4079e 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameW/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameW/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameW/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameW/test4/testinfo.dat index 8a7b3b35dac6..9480549d73e5 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameW/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetFullPathNameW/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetStdHandle/test1/GetStdHandle.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/GetStdHandle/test1/GetStdHandle.cpp index 47b1eba5997d..3120d180f107 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetStdHandle/test1/GetStdHandle.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetStdHandle/test1/GetStdHandle.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetStdHandle/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/GetStdHandle/test1/testinfo.dat index 3f7dbf5f4294..be8b8fc3dbf3 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetStdHandle/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetStdHandle/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetStdHandle/test2/GetStdHandle.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/GetStdHandle/test2/GetStdHandle.cpp index 45f5ddd24330..91d175b58e37 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetStdHandle/test2/GetStdHandle.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetStdHandle/test2/GetStdHandle.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetStdHandle/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/GetStdHandle/test2/testinfo.dat index dcd498c6ef24..b4bcbaa71ee7 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetStdHandle/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetStdHandle/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetSystemTime/test1/test.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/GetSystemTime/test1/test.cpp index 361dbef33d9b..fe5e01869a95 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetSystemTime/test1/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetSystemTime/test1/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetSystemTime/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/GetSystemTime/test1/testinfo.dat index 05169f65c679..f96f4770ac13 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetSystemTime/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetSystemTime/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetSystemTimeAsFileTime/test1/GetSystemTimeAsFileTime.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/GetSystemTimeAsFileTime/test1/GetSystemTimeAsFileTime.cpp index bd7e856abd93..c17cbccd69fb 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetSystemTimeAsFileTime/test1/GetSystemTimeAsFileTime.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetSystemTimeAsFileTime/test1/GetSystemTimeAsFileTime.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetSystemTimeAsFileTime/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/GetSystemTimeAsFileTime/test1/testinfo.dat index 3318d1386a48..3b0c0d99cb62 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetSystemTimeAsFileTime/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetSystemTimeAsFileTime/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameA/test1/GetTempFileNameA.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameA/test1/GetTempFileNameA.cpp index bea8e2776e65..c5e26784fc03 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameA/test1/GetTempFileNameA.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameA/test1/GetTempFileNameA.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameA/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameA/test1/testinfo.dat index 4bf0000b9f8f..452858aa6915 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameA/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameA/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameA/test2/GetTempFileNameA.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameA/test2/GetTempFileNameA.cpp index 861a8b87e87d..c64128844974 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameA/test2/GetTempFileNameA.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameA/test2/GetTempFileNameA.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameA/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameA/test2/testinfo.dat index ca46f6d84249..61042b1695aa 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameA/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameA/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameA/test3/gettempfilenamea.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameA/test3/gettempfilenamea.cpp index 8eccc3d2e8e1..4cb3581d2b88 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameA/test3/gettempfilenamea.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameA/test3/gettempfilenamea.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameA/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameA/test3/testinfo.dat index f1f5bf5764ce..00ef5135af68 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameA/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameA/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameW/test1/GetTempFileNameW.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameW/test1/GetTempFileNameW.cpp index ebc4d25bcb83..126b3f63685e 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameW/test1/GetTempFileNameW.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameW/test1/GetTempFileNameW.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameW/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameW/test1/testinfo.dat index 72af6930d9f9..b315f7aef6b9 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameW/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameW/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameW/test2/GetTempFileNameW.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameW/test2/GetTempFileNameW.cpp index 2c8b19e0816c..d649bf811fc5 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameW/test2/GetTempFileNameW.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameW/test2/GetTempFileNameW.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameW/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameW/test2/testinfo.dat index 72500111ad7f..74d871676d42 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameW/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameW/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameW/test3/gettempfilenamew.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameW/test3/gettempfilenamew.cpp index 96d8e66410b8..0e55cd0ce22b 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameW/test3/gettempfilenamew.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameW/test3/gettempfilenamew.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameW/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameW/test3/testinfo.dat index dd482dbde573..176994bab294 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameW/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetTempFileNameW/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetTempPathW/test1/GetTempPathW.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/GetTempPathW/test1/GetTempPathW.cpp index bf997def7674..a33eee5008ab 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetTempPathW/test1/GetTempPathW.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetTempPathW/test1/GetTempPathW.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/GetTempPathW/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/GetTempPathW/test1/testinfo.dat index 84dc33832c34..bcca83dc2c50 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/GetTempPathW/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/GetTempPathW/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/MoveFileExA/test1/MoveFileExA.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/MoveFileExA/test1/MoveFileExA.cpp index 0bce2b08d1e9..08ce684facb1 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/MoveFileExA/test1/MoveFileExA.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/MoveFileExA/test1/MoveFileExA.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/MoveFileExA/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/MoveFileExA/test1/testinfo.dat index d8d19af88046..baf6a864055f 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/MoveFileExA/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/MoveFileExA/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/MoveFileExW/test1/MoveFileExW.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/MoveFileExW/test1/MoveFileExW.cpp index 4f5b72dcf7b5..bb9cb5a2d766 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/MoveFileExW/test1/MoveFileExW.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/MoveFileExW/test1/MoveFileExW.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/MoveFileExW/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/MoveFileExW/test1/testinfo.dat index 9b001b5c381a..6b4a8b2cfbb4 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/MoveFileExW/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/MoveFileExW/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/ReadFile/test1/ReadFile.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/ReadFile/test1/ReadFile.cpp index a59e29212e16..2c9698d7c6ac 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/ReadFile/test1/ReadFile.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/ReadFile/test1/ReadFile.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/ReadFile/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/ReadFile/test1/testinfo.dat index b0df11a3abf1..7aa03cd48f50 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/ReadFile/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/ReadFile/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/ReadFile/test2/ReadFile.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/ReadFile/test2/ReadFile.cpp index 7120d1fc9de0..3f969eb4b6d4 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/ReadFile/test2/ReadFile.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/ReadFile/test2/ReadFile.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/ReadFile/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/ReadFile/test2/testinfo.dat index 82b6326170d3..510f79fca6c7 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/ReadFile/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/ReadFile/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/ReadFile/test3/ReadFile.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/ReadFile/test3/ReadFile.cpp index c5d6b1d15533..937e581c11a1 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/ReadFile/test3/ReadFile.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/ReadFile/test3/ReadFile.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/ReadFile/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/ReadFile/test3/testinfo.dat index 82b6326170d3..510f79fca6c7 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/ReadFile/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/ReadFile/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/ReadFile/test4/readfile.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/ReadFile/test4/readfile.cpp index 3ec939f63ac8..864695092a6a 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/ReadFile/test4/readfile.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/ReadFile/test4/readfile.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/ReadFile/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/ReadFile/test4/testinfo.dat index 6f3267d591e8..664ce3362f6d 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/ReadFile/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/ReadFile/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/SearchPathW/test1/SearchPathW.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/SearchPathW/test1/SearchPathW.cpp index 6880a864cb81..6ae52059e2ec 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/SearchPathW/test1/SearchPathW.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/SearchPathW/test1/SearchPathW.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/SearchPathW/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/SearchPathW/test1/testinfo.dat index f7a36eb53bdd..1664a75d527c 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/SearchPathW/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/SearchPathW/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test1/SetEndOfFile.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test1/SetEndOfFile.cpp index 9078ddc65b51..b4ca15527e08 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test1/SetEndOfFile.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test1/SetEndOfFile.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test1/testinfo.dat index 72fc5e59e628..d3e27707eeb3 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test2/SetEndOfFile.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test2/SetEndOfFile.cpp index 6b3c05088e9d..031c7573b3ac 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test2/SetEndOfFile.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test2/SetEndOfFile.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test2/testinfo.dat index 555f0d823f89..1debf06544ce 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test3/SetEndOfFile.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test3/SetEndOfFile.cpp index dfd9194465b8..c7598d32b7f2 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test3/SetEndOfFile.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test3/SetEndOfFile.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test3/testinfo.dat index 7f3868d6ca15..c6156af4ff9a 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test4/setendoffile.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test4/setendoffile.cpp index 98a6ec63daff..66530513f9d4 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test4/setendoffile.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test4/setendoffile.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test4/testinfo.dat index 51d918534376..74236b5df6a1 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test5/test5.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test5/test5.cpp index 7000d1af155e..f7c6e3c10410 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test5/test5.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test5/test5.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test5/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test5/testinfo.dat index 3a226ff8ad0b..169561ae31e0 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test5/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/SetEndOfFile/test5/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test1/SetFilePointer.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test1/SetFilePointer.cpp index 14b5f85e69f3..6c421bf7e932 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test1/SetFilePointer.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test1/SetFilePointer.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test1/testinfo.dat index dfd4b6bd4230..769fe0173d09 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test2/SetFilePointer.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test2/SetFilePointer.cpp index 19e99a74b350..073703e644eb 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test2/SetFilePointer.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test2/SetFilePointer.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test2/testinfo.dat index e3a0a861f4d9..5e328c6565c1 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test3/SetFilePointer.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test3/SetFilePointer.cpp index dd53829629b3..1ba13e525314 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test3/SetFilePointer.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test3/SetFilePointer.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test3/testinfo.dat index 7c51fbc38462..934aad656f1d 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test4/SetFilePointer.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test4/SetFilePointer.cpp index 2993cfd3544e..12e13ca62085 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test4/SetFilePointer.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test4/SetFilePointer.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test4/testinfo.dat index dce6f9eb215f..0195673da772 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test5/SetFilePointer.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test5/SetFilePointer.cpp index f1d392da3895..c1c531d19716 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test5/SetFilePointer.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test5/SetFilePointer.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test5/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test5/testinfo.dat index 64745c0e983a..baed91d6b763 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test5/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test5/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test6/SetFilePointer.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test6/SetFilePointer.cpp index b35247ec24cf..5b48da950b92 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test6/SetFilePointer.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test6/SetFilePointer.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test6/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test6/testinfo.dat index 3138e9bb4055..1f292b886f11 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test6/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test6/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test7/SetFilePointer.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test7/SetFilePointer.cpp index 33dfd5e711f3..d7d4d37b6214 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test7/SetFilePointer.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test7/SetFilePointer.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test7/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test7/testinfo.dat index 6e8826291fd7..1a9b5fb2b672 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test7/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/SetFilePointer/test7/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test1/WriteFile.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test1/WriteFile.cpp index a080f56422ad..cc805ccf9ff6 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test1/WriteFile.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test1/WriteFile.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test1/testinfo.dat index 148a2678e507..72ec21f55ade 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test2/WriteFile.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test2/WriteFile.cpp index 9345bc6c4871..593b1667fd5e 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test2/WriteFile.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test2/WriteFile.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test2/testinfo.dat index a09df962f380..94d2db8b488b 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test3/WriteFile.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test3/WriteFile.cpp index 751f89ff2ceb..672a10e16eca 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test3/WriteFile.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test3/WriteFile.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test3/testinfo.dat index e88e985b4495..cba76f89a390 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test4/testinfo.dat index 87ddf9d857fc..f3627273f758 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test4/writefile.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test4/writefile.cpp index 47a0066ec908..4eb2b20ee013 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test4/writefile.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test4/writefile.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test5/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test5/testinfo.dat index ffde30ea2341..5f7239927681 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test5/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test5/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test5/writefile.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test5/writefile.cpp index 46920b333559..e1ddf22ad4db 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test5/writefile.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/WriteFile/test5/writefile.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/errorpathnotfound/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/errorpathnotfound/test1/test1.cpp index eaf3db3a3098..8a2654b1193c 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/errorpathnotfound/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/errorpathnotfound/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/errorpathnotfound/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/errorpathnotfound/test1/testinfo.dat index dc1ddc96f1d4..761ca9aed2bc 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/errorpathnotfound/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/errorpathnotfound/test1/testinfo.dat @@ -2,7 +2,6 @@ # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/errorpathnotfound/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/errorpathnotfound/test2/test2.cpp index 78f925e6b9f0..b6a439a5786c 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/errorpathnotfound/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/errorpathnotfound/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/errorpathnotfound/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/errorpathnotfound/test2/testinfo.dat index 0b0449fe78df..1b04b9766f25 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/errorpathnotfound/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/errorpathnotfound/test2/testinfo.dat @@ -2,7 +2,6 @@ # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/gettemppatha/test1/gettemppatha.cpp b/src/coreclr/src/pal/tests/palsuite/file_io/gettemppatha/test1/gettemppatha.cpp index b0da528af868..55ca7db7ca4e 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/gettemppatha/test1/gettemppatha.cpp +++ b/src/coreclr/src/pal/tests/palsuite/file_io/gettemppatha/test1/gettemppatha.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/file_io/gettemppatha/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/file_io/gettemppatha/test1/testinfo.dat index 71f8bef651b6..700a0c72c1e2 100644 --- a/src/coreclr/src/pal/tests/palsuite/file_io/gettemppatha/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/file_io/gettemppatha/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = file_io diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test1/CreateFileMapping.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test1/CreateFileMapping.cpp index 91640bfd0481..6462b8022a75 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test1/CreateFileMapping.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test1/CreateFileMapping.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test1/testinfo.dat index 36ff3238c7da..0fd5e3429be7 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test3/CreateFileMapping.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test3/CreateFileMapping.cpp index 2a849d86b887..bbf75296e057 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test3/CreateFileMapping.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test3/CreateFileMapping.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test3/testinfo.dat index 4689ee6a08f4..c393f0777d94 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test4/CreateFileMapping.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test4/CreateFileMapping.cpp index 64caa88ca08f..a5fd1c8a0a30 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test4/CreateFileMapping.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test4/CreateFileMapping.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test4/testinfo.dat index 7d9dda1a9609..eab2b3cd7bf1 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test5/CreateFileMapping.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test5/CreateFileMapping.cpp index c7f9918b0846..3d17532eeca4 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test5/CreateFileMapping.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test5/CreateFileMapping.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test5/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test5/testinfo.dat index 137db9d82b3d..2b5d8902a403 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test5/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test5/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test6/CreateFileMapping.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test6/CreateFileMapping.cpp index 6445295de8f3..7c3ba87a8f67 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test6/CreateFileMapping.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test6/CreateFileMapping.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test6/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test6/testinfo.dat index d088c5d562c3..b69e8e3161d3 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test6/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test6/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test7/createfilemapping.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test7/createfilemapping.cpp index 7cef9ddcdce1..47bfdf20f71c 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test7/createfilemapping.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test7/createfilemapping.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test7/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test7/testinfo.dat index c03d98a91cbf..a61f67ffd079 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test7/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test7/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test8/createfilemapping.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test8/createfilemapping.cpp index 02b2fb5e615f..fa09291511c4 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test8/createfilemapping.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test8/createfilemapping.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test8/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test8/testinfo.dat index ebe138f659f7..961303fde725 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test8/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test8/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test9/createfilemapping.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test9/createfilemapping.cpp index 9224c22b4bf5..c0a1028fa443 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test9/createfilemapping.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test9/createfilemapping.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test9/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test9/testinfo.dat index 11cbedc8c5db..c5812e6f0d66 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test9/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test9/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/CreateFileMapping_neg1/CreateFileMapping_neg.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/CreateFileMapping_neg1/CreateFileMapping_neg.cpp index 8cf79b3c57b9..3fd3d2086706 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/CreateFileMapping_neg1/CreateFileMapping_neg.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/CreateFileMapping_neg1/CreateFileMapping_neg.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/CreateFileMapping_neg1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/CreateFileMapping_neg1/testinfo.dat index a09487d4b9b3..7b8b1bbd463a 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/CreateFileMapping_neg1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/CreateFileMapping_neg1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test1/CreateFileMappingW.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test1/CreateFileMappingW.cpp index 4263a3ad294b..b17ecfac0adc 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test1/CreateFileMappingW.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test1/CreateFileMappingW.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test1/testinfo.dat index 464679a45614..e132c6324c94 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test2/CreateFileMappingW.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test2/CreateFileMappingW.cpp index 5cc6d7770908..9f13cd7ce7a2 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test2/CreateFileMappingW.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test2/CreateFileMappingW.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test3/CreateFileMappingW.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test3/CreateFileMappingW.cpp index 1cbeff94a7fb..867b51b1668a 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test3/CreateFileMappingW.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test3/CreateFileMappingW.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test3/testinfo.dat index 1077316618d7..6cd0d3eef8b7 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test4/CreateFileMappingW.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test4/CreateFileMappingW.cpp index 265a317b2f5e..e439ed0c939a 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test4/CreateFileMappingW.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test4/CreateFileMappingW.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test4/testinfo.dat index 472b857eff93..2a1e78b640f5 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test5/CreateFileMappingW.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test5/CreateFileMappingW.cpp index 21bf7c6d7627..a45267d4d30c 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test5/CreateFileMappingW.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test5/CreateFileMappingW.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test5/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test5/testinfo.dat index 87e16d3d79bc..dfc444e6f605 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test5/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test5/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test6/CreateFileMappingW.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test6/CreateFileMappingW.cpp index acf3ac6dff92..635999a6ab4c 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test6/CreateFileMappingW.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test6/CreateFileMappingW.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test6/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test6/testinfo.dat index 7afae68f1683..583585009054 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test6/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test6/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test7/createfilemapping.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test7/createfilemapping.cpp index e49b9f688d10..3141f7ea2e2a 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test7/createfilemapping.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test7/createfilemapping.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test7/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test7/testinfo.dat index a68a665d7487..3c499001a474 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test7/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test7/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test8/createfilemapping.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test8/createfilemapping.cpp index 1ff137d8d3aa..54543d5f218e 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test8/createfilemapping.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test8/createfilemapping.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test8/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test8/testinfo.dat index 475d827af408..3d8364d5abf5 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test8/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test8/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test9/createfilemapping.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test9/createfilemapping.cpp index 16ae74c126a0..e062e4543d33 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test9/createfilemapping.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test9/createfilemapping.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test9/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test9/testinfo.dat index 2a7ecdbab78b..b3baf015a102 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test9/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test9/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test1/FreeLibrary.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test1/FreeLibrary.cpp index a06a23158688..093242db6350 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test1/FreeLibrary.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test1/FreeLibrary.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test1/dlltest.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test1/dlltest.cpp index 3e6cff292e3f..24c3dd406d26 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test1/dlltest.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test1/dlltest.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test1/testinfo.dat index a09d21428ff0..6e6e9f3f4010 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test2/test2.cpp index b43f74d6bc2e..2cf10ee8ee14 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test2/testinfo.dat index 521fa6eaead7..44c99fb3ce3a 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/FreeLibraryAndExitThread/test1/dlltest.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/FreeLibraryAndExitThread/test1/dlltest.cpp index e66a9ebdbe54..2efa625c64b2 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/FreeLibraryAndExitThread/test1/dlltest.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/FreeLibraryAndExitThread/test1/dlltest.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/FreeLibraryAndExitThread/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/FreeLibraryAndExitThread/test1/test1.cpp index 58f6643722aa..2306a190d0f3 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/FreeLibraryAndExitThread/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/FreeLibraryAndExitThread/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/FreeLibraryAndExitThread/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/FreeLibraryAndExitThread/test1/testinfo.dat index 455829c0d598..cdadee335abb 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/FreeLibraryAndExitThread/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/FreeLibraryAndExitThread/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test1/GetModuleFileNameA.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test1/GetModuleFileNameA.cpp index d05f0ac6a979..78550913b59a 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test1/GetModuleFileNameA.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test1/GetModuleFileNameA.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test1/testinfo.dat index 8075e840ce5c..72196a4cc642 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test2/GetModuleFileNameA.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test2/GetModuleFileNameA.cpp index e8aed6d30e34..99cfeb7c1cf1 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test2/GetModuleFileNameA.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test2/GetModuleFileNameA.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test2/testinfo.dat index 45fdca6ae7b0..9f6c7d8b4f41 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test1/GetModuleFileNameW.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test1/GetModuleFileNameW.cpp index c122312d8913..d38ea3218570 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test1/GetModuleFileNameW.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test1/GetModuleFileNameW.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test1/testinfo.dat index c8d94b73b497..e6e090035fc4 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test2/GetModuleFileNameW.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test2/GetModuleFileNameW.cpp index f23d97c1386a..b9f52970eb32 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test2/GetModuleFileNameW.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test2/GetModuleFileNameW.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test2/testinfo.dat index 8b8740149cef..47a5defb23b7 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test1/test1.cpp index 7b89dfeb2b9e..78d6a565f642 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test1/testinfo.dat index 31b262e31eae..8bc3b446977e 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test1/testlib.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test1/testlib.cpp index 7b87ba7f79dc..fe3cd17b94a6 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test1/testlib.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test1/testlib.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test2/test2.cpp index 91077284232a..fdd5d8567666 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test2/testinfo.dat index 8bf50ad81277..4e64e8ccf92a 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test2/testlib.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test2/testlib.cpp index 47299a1b1fb2..77821369b7fd 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test2/testlib.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test2/testlib.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/LocalAlloc/test1/LocalAlloc.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/LocalAlloc/test1/LocalAlloc.cpp index 17afbc602064..1b349069f04a 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/LocalAlloc/test1/LocalAlloc.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/LocalAlloc/test1/LocalAlloc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/LocalAlloc/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/LocalAlloc/test1/testinfo.dat index 056d9ceb21f0..b1626eff32c7 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/LocalAlloc/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/LocalAlloc/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/LocalFree/test1/LocalFree.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/LocalFree/test1/LocalFree.cpp index d9c062e761ba..86d27b45586c 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/LocalFree/test1/LocalFree.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/LocalFree/test1/LocalFree.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/LocalFree/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/LocalFree/test1/testinfo.dat index 2c0611bdec2d..2fb5007769f0 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/LocalFree/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/LocalFree/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/LocalFree/test2/LocalFree.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/LocalFree/test2/LocalFree.cpp index 4d4567dc3f55..587036041c17 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/LocalFree/test2/LocalFree.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/LocalFree/test2/LocalFree.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/LocalFree/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/LocalFree/test2/testinfo.dat index 1455fe93b765..aab6b36a74e1 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/LocalFree/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/LocalFree/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test1/MapViewOfFile.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test1/MapViewOfFile.cpp index 6bfb73f0e86d..9f0f6b8fa90c 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test1/MapViewOfFile.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test1/MapViewOfFile.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test1/testinfo.dat index f1d8451efba4..84e3addeeb3c 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test2/MapViewOfFile.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test2/MapViewOfFile.cpp index c08f585c0e32..e34960158a4f 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test2/MapViewOfFile.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test2/MapViewOfFile.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test2/testinfo.dat index 13b3f52cf19a..b8ed53e8f385 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test3/MapViewOfFile.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test3/MapViewOfFile.cpp index 63bee768f9f1..3a8990e3aceb 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test3/MapViewOfFile.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test3/MapViewOfFile.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test3/testinfo.dat index f76333e7eacb..34f83cad17a2 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test4/mapviewoffile.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test4/mapviewoffile.cpp index 7f3252144b03..66a72896eeba 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test4/mapviewoffile.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test4/mapviewoffile.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test4/testinfo.dat index 37655eda5bac..84e96b38bcd7 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test5/mapviewoffile.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test5/mapviewoffile.cpp index 219b3fa12a87..ee920301fc36 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test5/mapviewoffile.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test5/mapviewoffile.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test5/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test5/testinfo.dat index e3ecb3277279..2427779c0a19 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test5/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test5/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test6/mapviewoffile.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test6/mapviewoffile.cpp index f7d7302a4c97..0e719ad73384 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test6/mapviewoffile.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test6/mapviewoffile.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test6/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test6/testinfo.dat index 020827d2fe84..6112c648cfe4 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test6/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test6/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test1/OpenFileMappingA.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test1/OpenFileMappingA.cpp index 90872851129a..231389491d07 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test1/OpenFileMappingA.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test1/OpenFileMappingA.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test1/testinfo.dat index 010f2fe27923..a6021bb633c5 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test2/OpenFileMappingA.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test2/OpenFileMappingA.cpp index 5e41a920243a..a8a2ce21cf22 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test2/OpenFileMappingA.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test2/OpenFileMappingA.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test2/testinfo.dat index 2a02128b686e..4d7fca5f7877 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test3/OpenFileMappingA.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test3/OpenFileMappingA.cpp index b01a3e8c0bca..f26c7347c22e 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test3/OpenFileMappingA.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test3/OpenFileMappingA.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test3/testinfo.dat index 4aff853f91eb..a6b02d890d56 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test1/OpenFileMappingW.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test1/OpenFileMappingW.cpp index 079af4a5c0b0..f5680f070b3b 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test1/OpenFileMappingW.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test1/OpenFileMappingW.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test1/testinfo.dat index e67f4775f41e..78401088492c 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test2/OpenFileMappingW.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test2/OpenFileMappingW.cpp index e6a69651faad..8b9f08955f48 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test2/OpenFileMappingW.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test2/OpenFileMappingW.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test2/testinfo.dat index d481560a0d77..fc258fed1f9d 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test3/OpenFileMappingW.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test3/OpenFileMappingW.cpp index 9c83491f6bb3..7b55dfc428b8 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test3/OpenFileMappingW.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test3/OpenFileMappingW.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test3/testinfo.dat index b4ac69ec365e..5ec676370952 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/ProbeMemory/ProbeMemory_neg1/ProbeMemory_neg.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/ProbeMemory/ProbeMemory_neg1/ProbeMemory_neg.cpp index 80de809e14de..1bca5c662ab9 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/ProbeMemory/ProbeMemory_neg1/ProbeMemory_neg.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/ProbeMemory/ProbeMemory_neg1/ProbeMemory_neg.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/ProbeMemory/ProbeMemory_neg1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/ProbeMemory/ProbeMemory_neg1/testinfo.dat index 4d11a71bdb13..3f4fad673356 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/ProbeMemory/ProbeMemory_neg1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/ProbeMemory/ProbeMemory_neg1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/ProbeMemory/test1/ProbeMemory.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/ProbeMemory/test1/ProbeMemory.cpp index 30b358d31540..58dbcd67eb40 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/ProbeMemory/test1/ProbeMemory.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/ProbeMemory/test1/ProbeMemory.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/ProbeMemory/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/ProbeMemory/test1/testinfo.dat index 512b945c4a86..9fd6b566c59e 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/ProbeMemory/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/ProbeMemory/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/UnmapViewOfFile/test1/UnmapViewOfFile.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/UnmapViewOfFile/test1/UnmapViewOfFile.cpp index a970ccc3b500..3b78ce617ec0 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/UnmapViewOfFile/test1/UnmapViewOfFile.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/UnmapViewOfFile/test1/UnmapViewOfFile.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/UnmapViewOfFile/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/UnmapViewOfFile/test1/testinfo.dat index 841801536070..e5c136b60d5d 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/UnmapViewOfFile/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/UnmapViewOfFile/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/UnmapViewOfFile/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/UnmapViewOfFile/test2/testinfo.dat index 29e847a82f8f..5229c85d3628 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/UnmapViewOfFile/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/UnmapViewOfFile/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/UnmapViewOfFile/test2/unmapviewoffile.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/UnmapViewOfFile/test2/unmapviewoffile.cpp index 2ca185d234c2..43ab2b50cd11 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/UnmapViewOfFile/test2/unmapviewoffile.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/UnmapViewOfFile/test2/unmapviewoffile.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test1/VirtualAlloc.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test1/VirtualAlloc.cpp index 26ee942ba188..f71175cbe4aa 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test1/VirtualAlloc.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test1/VirtualAlloc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test1/testinfo.dat index 5b8311a05dac..f5f575557498 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test10/VirtualAlloc.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test10/VirtualAlloc.cpp index ac06b9b5c811..f24d64b26213 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test10/VirtualAlloc.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test10/VirtualAlloc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test10/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test10/testinfo.dat index 960f2265d532..2c2db5db106e 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test10/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test10/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test11/VirtualAlloc.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test11/VirtualAlloc.cpp index a3df39b63450..5f5440cf0bcb 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test11/VirtualAlloc.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test11/VirtualAlloc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test11/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test11/testinfo.dat index 5d9f0ad880ab..09830266b74a 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test11/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test11/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test12/VirtualAlloc.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test12/VirtualAlloc.cpp index 8b3508635fce..a2d8bb5adfb0 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test12/VirtualAlloc.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test12/VirtualAlloc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test12/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test12/testinfo.dat index ac2b91c0dc5d..3b014114d161 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test12/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test12/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test13/VirtualAlloc.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test13/VirtualAlloc.cpp index d2109c0339d0..0859c49d9144 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test13/VirtualAlloc.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test13/VirtualAlloc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test13/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test13/testinfo.dat index a571e9f8d2c3..ee11d926b931 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test13/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test13/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test14/VirtualAlloc.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test14/VirtualAlloc.cpp index 49bd21875ec8..e76d12311f77 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test14/VirtualAlloc.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test14/VirtualAlloc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test14/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test14/testinfo.dat index 60decb84616f..5e38441a9fc6 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test14/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test14/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test15/VirtualAlloc.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test15/VirtualAlloc.cpp index 3cf1502f268d..10922602b1ff 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test15/VirtualAlloc.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test15/VirtualAlloc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test15/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test15/testinfo.dat index 2d9845ded6fa..76b6ed401cdf 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test15/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test15/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test16/VirtualAlloc.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test16/VirtualAlloc.cpp index ce61b9aa391b..9cbe6ce85259 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test16/VirtualAlloc.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test16/VirtualAlloc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test16/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test16/testinfo.dat index 1389f1f92e5d..6bbb9069a4d3 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test16/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test16/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test17/VirtualAlloc.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test17/VirtualAlloc.cpp index eb609f14e48a..d4efeb154086 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test17/VirtualAlloc.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test17/VirtualAlloc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test17/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test17/testinfo.dat index 49ced638361e..59155900f02c 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test17/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test17/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test18/VirtualAlloc.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test18/VirtualAlloc.cpp index e46da851dbed..189298625ca7 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test18/VirtualAlloc.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test18/VirtualAlloc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test18/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test18/testinfo.dat index 1fd4ac6f14f0..a3f0f31a0af6 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test18/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test18/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test19/VirtualAlloc.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test19/VirtualAlloc.cpp index 5cbe48b15ed0..d575daa39c76 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test19/VirtualAlloc.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test19/VirtualAlloc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test19/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test19/testinfo.dat index 6e427da15a46..0249bfc187ca 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test19/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test19/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test2/VirtualAlloc.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test2/VirtualAlloc.cpp index 99cf76a52350..dab649d718f3 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test2/VirtualAlloc.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test2/VirtualAlloc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test2/testinfo.dat index c7d8b6783d46..9ca9f0f5fd35 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test20/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test20/testinfo.dat index 6010a18c8ad7..a58268126fe8 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test20/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test20/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test20/virtualalloc.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test20/virtualalloc.cpp index 7aec3c7f55d3..3ed2b40364a1 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test20/virtualalloc.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test20/virtualalloc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test21/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test21/testinfo.dat index c32d352d19bd..8fcc04474a9b 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test21/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test21/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test21/virtualalloc.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test21/virtualalloc.cpp index 065a2ff5c815..1663bf6c1954 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test21/virtualalloc.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test21/virtualalloc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test22/VirtualAlloc.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test22/VirtualAlloc.cpp index 489926f48d66..74fea7da1773 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test22/VirtualAlloc.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test22/VirtualAlloc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test22/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test22/testinfo.dat index 3d5962c7afb5..17da3b1e48ee 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test22/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test22/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test3/VirtualAlloc.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test3/VirtualAlloc.cpp index 5c57ec337fd1..e004a00a47a3 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test3/VirtualAlloc.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test3/VirtualAlloc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test3/testinfo.dat index a3d5401493df..08181b199c26 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test4/VirtualAlloc.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test4/VirtualAlloc.cpp index c134a14eb13f..e4250f685dc0 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test4/VirtualAlloc.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test4/VirtualAlloc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test4/testinfo.dat index 0e84e7a3ba88..e30903b480fb 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test5/VirtualAlloc.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test5/VirtualAlloc.cpp index 8c4f9dcdb604..4ff672bce349 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test5/VirtualAlloc.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test5/VirtualAlloc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test5/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test5/testinfo.dat index 332b88b071a1..929605dec721 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test5/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test5/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test6/VirtualAlloc.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test6/VirtualAlloc.cpp index e9c33d86dff9..a9a08734f1fc 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test6/VirtualAlloc.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test6/VirtualAlloc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test6/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test6/testinfo.dat index ac2b91c0dc5d..3b014114d161 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test6/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test6/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test7/VirtualAlloc.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test7/VirtualAlloc.cpp index bee2735c9f9c..27285252f28d 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test7/VirtualAlloc.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test7/VirtualAlloc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test7/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test7/testinfo.dat index 2edcb56d3b1c..7096b5462ba2 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test7/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test7/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test8/VirtualAlloc.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test8/VirtualAlloc.cpp index d548e0c8db6b..9802e7b3a8d2 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test8/VirtualAlloc.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test8/VirtualAlloc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test8/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test8/testinfo.dat index c0ee6b6a69c4..fe712f77c17a 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test8/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test8/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test9/VirtualAlloc.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test9/VirtualAlloc.cpp index 2711addacc28..36d3cf786ab8 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test9/VirtualAlloc.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test9/VirtualAlloc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test9/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test9/testinfo.dat index 1e83744bba10..6ee923e448ff 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test9/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test9/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test1/VirtualFree.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test1/VirtualFree.cpp index 0f4f144aa51f..921457e6d3a9 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test1/VirtualFree.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test1/VirtualFree.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test1/testinfo.dat index 284863568131..462b8ffab1c4 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test2/VirtualFree.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test2/VirtualFree.cpp index 70064a3bf968..fe70d7d08732 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test2/VirtualFree.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test2/VirtualFree.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test2/testinfo.dat index ea380c367630..8942d13572a6 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test3/VirtualFree.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test3/VirtualFree.cpp index 27f1936be70b..214f96c1d5ee 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test3/VirtualFree.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test3/VirtualFree.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test3/testinfo.dat index c27b7ad3e515..371b964b5a5d 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test1/VirtualProtect.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test1/VirtualProtect.cpp index 1a28bd156def..36e107593c8a 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test1/VirtualProtect.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test1/VirtualProtect.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test1/testinfo.dat index 6b78c079e705..51cbd6577f25 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test2/VirtualProtect.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test2/VirtualProtect.cpp index 64a08d7885df..0c95533f554f 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test2/VirtualProtect.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test2/VirtualProtect.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test2/testinfo.dat index d5fa0cfbc276..12db123a8b6b 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test3/VirtualProtect.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test3/VirtualProtect.cpp index 0f738630eed2..86e35ebd0748 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test3/VirtualProtect.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test3/VirtualProtect.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test3/testinfo.dat index 7c64c3092e68..7817613f95e6 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test4/VirtualProtect.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test4/VirtualProtect.cpp index 926d501d0d0f..61275e822b47 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test4/VirtualProtect.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test4/VirtualProtect.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test4/testinfo.dat index c34407311353..19d6b9eb3b23 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test6/VirtualProtect.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test6/VirtualProtect.cpp index d60b323ec650..6fa46642901e 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test6/VirtualProtect.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test6/VirtualProtect.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test6/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test6/testinfo.dat index 71ccad563985..7df0c9dc9e83 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test6/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test6/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test7/VirtualProtect.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test7/VirtualProtect.cpp index edc37711f425..fb60354c672a 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test7/VirtualProtect.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test7/VirtualProtect.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test7/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test7/testinfo.dat index 6b6eb58b342f..1ba6e796f209 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test7/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test7/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualQuery/test1/VirtualQuery.cpp b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualQuery/test1/VirtualQuery.cpp index 44216ae563f6..3a414b36cbfa 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualQuery/test1/VirtualQuery.cpp +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualQuery/test1/VirtualQuery.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualQuery/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualQuery/test1/testinfo.dat index b3462cd2f7f8..3d9d01e2e9a1 100644 --- a/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualQuery/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/filemapping_memmgt/VirtualQuery/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Filemapping_memmgt diff --git a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test1/LoadLibraryA.cpp b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test1/LoadLibraryA.cpp index b4a8de1367ca..942b540d4169 100644 --- a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test1/LoadLibraryA.cpp +++ b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test1/LoadLibraryA.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test1/testinfo.dat index 096aab958b9e..946efd2a1641 100644 --- a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Loader diff --git a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test2/LoadLibraryA.cpp b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test2/LoadLibraryA.cpp index d7cd9cb875a5..e8dc76d94591 100644 --- a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test2/LoadLibraryA.cpp +++ b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test2/LoadLibraryA.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test2/MyModule.cpp b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test2/MyModule.cpp index 883b3fbc4a15..5664c6737756 100644 --- a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test2/MyModule.cpp +++ b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test2/MyModule.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test2/testinfo.dat index 97b7222b9e45..b0f3b00d49cd 100644 --- a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Loader diff --git a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test3/loadlibrarya.cpp b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test3/loadlibrarya.cpp index da38f98d040b..a0732f66f2e3 100644 --- a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test3/loadlibrarya.cpp +++ b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test3/loadlibrarya.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test3/testinfo.dat index c27c8e0eea52..47a426e0322c 100644 --- a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Loader diff --git a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test5/loadlibrarya.cpp b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test5/loadlibrarya.cpp index ab38d1a6326d..b8216f724f15 100644 --- a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test5/loadlibrarya.cpp +++ b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test5/loadlibrarya.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test5/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test5/testinfo.dat index e2cd16c6f1b6..975519b5805a 100644 --- a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test5/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test5/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Loader diff --git a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test6/dlltest.cpp b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test6/dlltest.cpp index 372657605b53..6e2cdeb7c9a7 100644 --- a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test6/dlltest.cpp +++ b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test6/dlltest.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test6/loadlibrarya.cpp b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test6/loadlibrarya.cpp index ee825e6439ab..eb2a5e9d40e2 100644 --- a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test6/loadlibrarya.cpp +++ b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test6/loadlibrarya.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test6/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test6/testinfo.dat index 4be93b8092ad..a5252b6e389f 100644 --- a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test6/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test6/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Loader diff --git a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test7/LoadLibraryA.cpp b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test7/LoadLibraryA.cpp index 5e6db8bb6874..99aef0a5173e 100644 --- a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test7/LoadLibraryA.cpp +++ b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test7/LoadLibraryA.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test7/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test7/testinfo.dat index 416caf34fb05..c16a7d95a2df 100644 --- a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test7/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test7/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Loader diff --git a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test8/dlltest.cpp b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test8/dlltest.cpp index 372657605b53..6e2cdeb7c9a7 100644 --- a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test8/dlltest.cpp +++ b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test8/dlltest.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test8/loadlibrarya.cpp b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test8/loadlibrarya.cpp index 6556e9c89679..62197cfedcaa 100644 --- a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test8/loadlibrarya.cpp +++ b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test8/loadlibrarya.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test8/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test8/testinfo.dat index b552b720828b..2d4bf04ec75b 100644 --- a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test8/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryA/test8/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Loader diff --git a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryW/test1/LoadLibraryW.cpp b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryW/test1/LoadLibraryW.cpp index 4c1a551de13a..bd680cc5d25c 100644 --- a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryW/test1/LoadLibraryW.cpp +++ b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryW/test1/LoadLibraryW.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryW/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryW/test1/testinfo.dat index c5c4adc75a87..f014e6c6833f 100644 --- a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryW/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryW/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Loader diff --git a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryW/test2/loadlibraryw.cpp b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryW/test2/loadlibraryw.cpp index e8aebf77e93a..097b275906ca 100644 --- a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryW/test2/loadlibraryw.cpp +++ b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryW/test2/loadlibraryw.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryW/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryW/test2/testinfo.dat index bc107f006936..5f0e262a8990 100644 --- a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryW/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryW/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Loader diff --git a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryW/test3/loadlibraryw.cpp b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryW/test3/loadlibraryw.cpp index c722edaf131e..9f405138c910 100644 --- a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryW/test3/loadlibraryw.cpp +++ b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryW/test3/loadlibraryw.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryW/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryW/test3/testinfo.dat index bd20aaf9952f..cfd9c01c3adc 100644 --- a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryW/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryW/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Loader diff --git a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryW/test5/loadlibraryw.cpp b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryW/test5/loadlibraryw.cpp index 6d92f029e48c..505b62053163 100644 --- a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryW/test5/loadlibraryw.cpp +++ b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryW/test5/loadlibraryw.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryW/test5/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryW/test5/testinfo.dat index 8275f41644ee..055c9753f540 100644 --- a/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryW/test5/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/loader/LoadLibraryW/test5/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Loader diff --git a/src/coreclr/src/pal/tests/palsuite/locale_info/CompareStringA/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/locale_info/CompareStringA/test1/test1.cpp index 98c147af483b..37beece4dfae 100644 --- a/src/coreclr/src/pal/tests/palsuite/locale_info/CompareStringA/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/locale_info/CompareStringA/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/locale_info/CompareStringA/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/locale_info/CompareStringA/test1/testinfo.dat index e934b1376323..6bea1c67f24b 100644 --- a/src/coreclr/src/pal/tests/palsuite/locale_info/CompareStringA/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/locale_info/CompareStringA/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Locale Information diff --git a/src/coreclr/src/pal/tests/palsuite/locale_info/CompareStringW/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/locale_info/CompareStringW/test1/test1.cpp index bdf2c3dcf394..5c3f8b0e42bd 100644 --- a/src/coreclr/src/pal/tests/palsuite/locale_info/CompareStringW/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/locale_info/CompareStringW/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/locale_info/CompareStringW/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/locale_info/CompareStringW/test1/testinfo.dat index d41de3ee6849..95894f2dfcc7 100644 --- a/src/coreclr/src/pal/tests/palsuite/locale_info/CompareStringW/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/locale_info/CompareStringW/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Locale Information diff --git a/src/coreclr/src/pal/tests/palsuite/locale_info/GetACP/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/locale_info/GetACP/test1/test1.cpp index 8ea078ee69b9..f0f1284d3c7a 100644 --- a/src/coreclr/src/pal/tests/palsuite/locale_info/GetACP/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/locale_info/GetACP/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/locale_info/GetACP/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/locale_info/GetACP/test1/testinfo.dat index 63a58f681bfc..48c2a36859cc 100644 --- a/src/coreclr/src/pal/tests/palsuite/locale_info/GetACP/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/locale_info/GetACP/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Locale Information diff --git a/src/coreclr/src/pal/tests/palsuite/locale_info/GetCPInfo/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/locale_info/GetCPInfo/test1/test1.cpp index ed9bbf93fc57..2ef184d6478b 100644 --- a/src/coreclr/src/pal/tests/palsuite/locale_info/GetCPInfo/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/locale_info/GetCPInfo/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/locale_info/GetCPInfo/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/locale_info/GetCPInfo/test1/testinfo.dat index 31be1d5536d2..a1b30072e1e2 100644 --- a/src/coreclr/src/pal/tests/palsuite/locale_info/GetCPInfo/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/locale_info/GetCPInfo/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Locale Information diff --git a/src/coreclr/src/pal/tests/palsuite/locale_info/GetCPInfo/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/locale_info/GetCPInfo/test2/test2.cpp index f52320f1678d..0e47d54c230e 100644 --- a/src/coreclr/src/pal/tests/palsuite/locale_info/GetCPInfo/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/locale_info/GetCPInfo/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/locale_info/GetCPInfo/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/locale_info/GetCPInfo/test3/test3.cpp index aa9df935b809..4223538431ee 100644 --- a/src/coreclr/src/pal/tests/palsuite/locale_info/GetCPInfo/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/locale_info/GetCPInfo/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/locale_info/GetLocaleInfoW/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/locale_info/GetLocaleInfoW/test1/test1.cpp index 0994940a5785..932ddc0313e9 100644 --- a/src/coreclr/src/pal/tests/palsuite/locale_info/GetLocaleInfoW/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/locale_info/GetLocaleInfoW/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/locale_info/GetLocaleInfoW/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/locale_info/GetLocaleInfoW/test1/testinfo.dat index 00d974a71c2a..be1629203570 100644 --- a/src/coreclr/src/pal/tests/palsuite/locale_info/GetLocaleInfoW/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/locale_info/GetLocaleInfoW/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Locale Information diff --git a/src/coreclr/src/pal/tests/palsuite/locale_info/GetLocaleInfoW/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/locale_info/GetLocaleInfoW/test2/test2.cpp index f00fa79c598f..215ee3e2c7f7 100644 --- a/src/coreclr/src/pal/tests/palsuite/locale_info/GetLocaleInfoW/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/locale_info/GetLocaleInfoW/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/locale_info/GetLocaleInfoW/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/locale_info/GetLocaleInfoW/test2/testinfo.dat index b9fc4886eeeb..4f8b045fc026 100644 --- a/src/coreclr/src/pal/tests/palsuite/locale_info/GetLocaleInfoW/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/locale_info/GetLocaleInfoW/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Locale Information diff --git a/src/coreclr/src/pal/tests/palsuite/locale_info/IsDBCSLeadByte/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/locale_info/IsDBCSLeadByte/test1/test1.cpp index ad326be08406..0d3b997010e0 100644 --- a/src/coreclr/src/pal/tests/palsuite/locale_info/IsDBCSLeadByte/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/locale_info/IsDBCSLeadByte/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/locale_info/IsDBCSLeadByte/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/locale_info/IsDBCSLeadByte/test1/testinfo.dat index 43cd2aebb6bd..5cdc938541b4 100644 --- a/src/coreclr/src/pal/tests/palsuite/locale_info/IsDBCSLeadByte/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/locale_info/IsDBCSLeadByte/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Locale Information diff --git a/src/coreclr/src/pal/tests/palsuite/locale_info/IsDBCSLeadByteEx/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/locale_info/IsDBCSLeadByteEx/test1/test1.cpp index 9466f4817f16..036e2a392b19 100644 --- a/src/coreclr/src/pal/tests/palsuite/locale_info/IsDBCSLeadByteEx/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/locale_info/IsDBCSLeadByteEx/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/locale_info/IsDBCSLeadByteEx/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/locale_info/IsDBCSLeadByteEx/test1/testinfo.dat index b85e38727236..ead792e7a6e9 100644 --- a/src/coreclr/src/pal/tests/palsuite/locale_info/IsDBCSLeadByteEx/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/locale_info/IsDBCSLeadByteEx/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Locale Information diff --git a/src/coreclr/src/pal/tests/palsuite/locale_info/MultiByteToWideChar/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/locale_info/MultiByteToWideChar/test1/test1.cpp index 81f58a532c59..a10c00d3ef2f 100644 --- a/src/coreclr/src/pal/tests/palsuite/locale_info/MultiByteToWideChar/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/locale_info/MultiByteToWideChar/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/locale_info/MultiByteToWideChar/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/locale_info/MultiByteToWideChar/test1/testinfo.dat index 0e4591d24766..0548926e8469 100644 --- a/src/coreclr/src/pal/tests/palsuite/locale_info/MultiByteToWideChar/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/locale_info/MultiByteToWideChar/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Locale Information diff --git a/src/coreclr/src/pal/tests/palsuite/locale_info/MultiByteToWideChar/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/locale_info/MultiByteToWideChar/test2/test2.cpp index 1370dba89430..e4649b116daf 100644 --- a/src/coreclr/src/pal/tests/palsuite/locale_info/MultiByteToWideChar/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/locale_info/MultiByteToWideChar/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/locale_info/MultiByteToWideChar/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/locale_info/MultiByteToWideChar/test2/testinfo.dat index 5211db125651..84d190a8fab9 100644 --- a/src/coreclr/src/pal/tests/palsuite/locale_info/MultiByteToWideChar/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/locale_info/MultiByteToWideChar/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Locale Information diff --git a/src/coreclr/src/pal/tests/palsuite/locale_info/MultiByteToWideChar/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/locale_info/MultiByteToWideChar/test3/test3.cpp index 1b3a4bd4f5df..5553e73cdaf9 100644 --- a/src/coreclr/src/pal/tests/palsuite/locale_info/MultiByteToWideChar/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/locale_info/MultiByteToWideChar/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/locale_info/MultiByteToWideChar/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/locale_info/MultiByteToWideChar/test3/testinfo.dat index c59f285dca7e..603565d64a18 100644 --- a/src/coreclr/src/pal/tests/palsuite/locale_info/MultiByteToWideChar/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/locale_info/MultiByteToWideChar/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Locale Information diff --git a/src/coreclr/src/pal/tests/palsuite/locale_info/MultiByteToWideChar/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/locale_info/MultiByteToWideChar/test4/test4.cpp index 7d382de29851..758d3c875cbc 100644 --- a/src/coreclr/src/pal/tests/palsuite/locale_info/MultiByteToWideChar/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/locale_info/MultiByteToWideChar/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test1/test1.cpp index cd763f33bebc..3bdc124e9f9d 100644 --- a/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test1/testinfo.dat index 9fb5f0f0326c..518a52988bee 100644 --- a/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Locale Information diff --git a/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test2/test2.cpp index f5d40ae9035b..f4cee255adc4 100644 --- a/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test2/testinfo.dat index e5b50b81430f..3b29e9514ac1 100644 --- a/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Locale Information diff --git a/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test3/test3.cpp index ecd26addb4f1..46c7f47fa9a7 100644 --- a/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test3/testinfo.dat index b737686c3934..9ecf1f29309a 100644 --- a/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Locale Information diff --git a/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test4/test4.cpp index e82994bc9c0f..7c81884d73dc 100644 --- a/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test4/testinfo.dat index 03b00d3548ce..fd7575e8f624 100644 --- a/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Locale Information diff --git a/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test5/test5.cpp b/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test5/test5.cpp index 393516a19868..c01bbe0756cf 100644 --- a/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test5/test5.cpp +++ b/src/coreclr/src/pal/tests/palsuite/locale_info/WideCharToMultiByte/test5/test5.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/manual-inspect.dat b/src/coreclr/src/pal/tests/palsuite/manual-inspect.dat index c541b2ff85a7..22f9ebc1f8ff 100644 --- a/src/coreclr/src/pal/tests/palsuite/manual-inspect.dat +++ b/src/coreclr/src/pal/tests/palsuite/manual-inspect.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. # Automatable to detect gross errors; also manually inspect for proper behaviour miscellaneous/messageboxw/test1,1 diff --git a/src/coreclr/src/pal/tests/palsuite/manual-unautomatable.dat b/src/coreclr/src/pal/tests/palsuite/manual-unautomatable.dat index e60ab279b626..c7a2a3913e7b 100644 --- a/src/coreclr/src/pal/tests/palsuite/manual-unautomatable.dat +++ b/src/coreclr/src/pal/tests/palsuite/manual-unautomatable.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. #This test is negative and will exit with exit(1). #Therefore, the harness would record it as a failure diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/CGroup/test1/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/CGroup/test1/test.cpp index 44b970a233e8..d44c7a753a20 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/CGroup/test1/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/CGroup/test1/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/CGroup/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/CGroup/test1/testinfo.dat index 86da2d151507..672a583a78ed 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/CGroup/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/CGroup/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/CloseHandle/test1/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/CloseHandle/test1/test.cpp index 443f89bacefa..ad1bed2ab6f7 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/CloseHandle/test1/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/CloseHandle/test1/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/CloseHandle/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/CloseHandle/test1/testinfo.dat index 891e1dfcfc90..3ac8f45d7962 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/CloseHandle/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/CloseHandle/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/CloseHandle/test2/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/CloseHandle/test2/test.cpp index c1eea4407006..70aa9c4bcef9 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/CloseHandle/test2/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/CloseHandle/test2/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/CloseHandle/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/CloseHandle/test2/testinfo.dat index 6917e8586a60..a69f5d5b0518 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/CloseHandle/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/CloseHandle/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/CreatePipe/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/CreatePipe/test1/test1.cpp index 3930183b6032..df2b8f667173 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/CreatePipe/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/CreatePipe/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/CreatePipe/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/CreatePipe/test1/testinfo.dat index b9422b062709..d36f44faf47a 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/CreatePipe/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/CreatePipe/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FlushInstructionCache/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FlushInstructionCache/test1/test1.cpp index cdbefd01cc06..1ff3d9e898ae 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FlushInstructionCache/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FlushInstructionCache/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FlushInstructionCache/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FlushInstructionCache/test1/testinfo.dat index 78ab5f77ff96..bb2d259cdf02 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FlushInstructionCache/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FlushInstructionCache/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test1/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test1/test.cpp index 0cc4c434325b..05b4bca36d32 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test1/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test1/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test1/testinfo.dat index 5bd46bf60433..c057584ef983 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test2/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test2/test.cpp index eba38d48bd9c..a4a9a4d00b0f 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test2/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test2/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test2/testinfo.dat index 5e4a35428efc..dc5713728288 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test3/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test3/test.cpp index a390c00fea4c..e46214f84151 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test3/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test3/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test3/testinfo.dat index cad1f6381748..704b4c29c499 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test4/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test4/test.cpp index 4f865efe7e7b..7ebe91de5ef1 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test4/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test4/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test4/testinfo.dat index 33e0cfa827c5..dbe71255aafd 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test5/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test5/test.cpp index 148c2ff2360b..a27f42ebcf7d 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test5/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test5/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test5/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test5/testinfo.dat index 6f497c23cc3e..39e525c759a5 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test5/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test5/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test6/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test6/test.cpp index 48f5e3e93d71..510946421df1 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test6/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test6/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test6/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test6/testinfo.dat index 7eda50527133..6ca71938f152 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test6/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FormatMessageW/test6/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FreeEnvironmentStringsW/test1/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FreeEnvironmentStringsW/test1/test.cpp index 56010039d759..a8d371800701 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FreeEnvironmentStringsW/test1/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FreeEnvironmentStringsW/test1/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FreeEnvironmentStringsW/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FreeEnvironmentStringsW/test1/testinfo.dat index f653bf5dc2d4..33267b23b031 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FreeEnvironmentStringsW/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FreeEnvironmentStringsW/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FreeEnvironmentStringsW/test2/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FreeEnvironmentStringsW/test2/test.cpp index e59ad84fcfd8..c961ee625026 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FreeEnvironmentStringsW/test2/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FreeEnvironmentStringsW/test2/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FreeEnvironmentStringsW/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FreeEnvironmentStringsW/test2/testinfo.dat index c426a7ccbdc9..e9ee3e4a5788 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/FreeEnvironmentStringsW/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/FreeEnvironmentStringsW/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetCommandLineW/test1/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetCommandLineW/test1/test.cpp index 3417c149a00c..9604138a5ece 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetCommandLineW/test1/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetCommandLineW/test1/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetCommandLineW/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetCommandLineW/test1/testinfo.dat index 668cb7d24952..19fba6d0667e 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetCommandLineW/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetCommandLineW/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentStringsW/test1/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentStringsW/test1/test.cpp index 2bd9153e59a8..9cdabf2d525f 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentStringsW/test1/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentStringsW/test1/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentStringsW/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentStringsW/test1/testinfo.dat index fa712ab823b2..3e7c3e6ffbd6 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentStringsW/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentStringsW/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test1/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test1/test.cpp index 23e99744672d..35edd29a6db2 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test1/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test1/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test1/testinfo.dat index ee81e2ec3bff..104eab1bab3a 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test2/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test2/test.cpp index d26588e9077d..ac0b9ebb02a3 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test2/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test2/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test2/testinfo.dat index 990649fad9e4..55150d5dc671 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test3/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test3/test.cpp index b51e139c9576..96a2a93fd24b 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test3/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test3/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test3/testinfo.dat index afaa04b8fae1..7f049668700d 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test4/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test4/test.cpp index a09eb883e355..35431e074d3d 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test4/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test4/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test4/testinfo.dat index 8fb16c778c46..d0e01fd76cc1 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test5/test5.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test5/test5.cpp index 19a4d25b64e6..e65573542277 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test5/test5.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test5/test5.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** Source : test5.c diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test5/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test5/testinfo.dat index 0bcec5973ba1..91baadc4c538 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test5/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test5/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test6/test6.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test6/test6.cpp index 837036a0a93c..2f1107fdb4fe 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test6/test6.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test6/test6.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** Source : test6.c diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test6/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test6/testinfo.dat index 5de219a959a8..6f1952b47987 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test6/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test6/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test1/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test1/test.cpp index cb5fc00554f6..50c40afc7a74 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test1/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test1/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test1/testinfo.dat index 467f2b7b94a4..40adb9cd4da6 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test2/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test2/test.cpp index 6fa753c8d38e..b4308a8bd5c5 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test2/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test2/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test2/testinfo.dat index 372f5af316a9..0fc404753f76 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test3/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test3/test.cpp index 03781e723f20..d489996f64a3 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test3/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test3/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test3/testinfo.dat index d41c19c908c8..86464a2f3a0f 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test4/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test4/test.cpp index 1ee3e72c9d0c..47f1c217b581 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test4/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test4/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test4/testinfo.dat index 64204fa698ff..ae1965ca49ff 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test5/test5.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test5/test5.cpp index 179fc17f0b7a..d0932ae184f9 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test5/test5.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test5/test5.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** Source : test5.c diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test5/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test5/testinfo.dat index cbc214e8cad5..b53bf6a81e35 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test5/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test5/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test6/test6.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test6/test6.cpp index e37695084134..abd9fc267027 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test6/test6.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test6/test6.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** Source : test6.c diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test6/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test6/testinfo.dat index fad1ad69a6b2..102cf8edcaca 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test6/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test6/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetLastError/test1/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetLastError/test1/test.cpp index 65f56e595fd9..c106f9c9030d 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetLastError/test1/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetLastError/test1/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetLastError/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetLastError/test1/testinfo.dat index be41f52c6333..44c0197aae00 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetLastError/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetLastError/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetSystemInfo/test1/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetSystemInfo/test1/test.cpp index 5f3608fb7083..f9cb513b7a60 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetSystemInfo/test1/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetSystemInfo/test1/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetSystemInfo/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetSystemInfo/test1/testinfo.dat index 7f03c6355cc8..ac3a2251084b 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetSystemInfo/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetSystemInfo/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetTickCount/test1/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetTickCount/test1/test.cpp index ad71ba5d6c2f..2638f93808b7 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetTickCount/test1/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetTickCount/test1/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetTickCount/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetTickCount/test1/testinfo.dat index 78888abd534a..dde3d04fbc1c 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetTickCount/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GetTickCount/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GlobalMemoryStatusEx/test1/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GlobalMemoryStatusEx/test1/test.cpp index 460edade6124..84de313e71d1 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GlobalMemoryStatusEx/test1/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GlobalMemoryStatusEx/test1/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GlobalMemoryStatusEx/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GlobalMemoryStatusEx/test1/testinfo.dat index 7ae3b5142aac..af14d1b24329 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/GlobalMemoryStatusEx/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/GlobalMemoryStatusEx/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterLockedExchangeAdd/test1/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterLockedExchangeAdd/test1/test.cpp index a44f569b7bcb..ba91df17c1c4 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterLockedExchangeAdd/test1/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterLockedExchangeAdd/test1/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedBit/test1/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedBit/test1/test.cpp index 1f7c43cddb3f..027a292c327e 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedBit/test1/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedBit/test1/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedBit/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedBit/test1/testinfo.dat index 677999906fce..ab6067ab1511 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedBit/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedBit/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedBit/test2/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedBit/test2/test.cpp index 4230c8a8057d..0bb01ff124fc 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedBit/test2/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedBit/test2/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedBit/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedBit/test2/testinfo.dat index 3ad431701ac0..9c206d31b346 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedBit/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedBit/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange/test1/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange/test1/test.cpp index 77f2c4c449b5..2d98aac47b0f 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange/test1/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange/test1/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange/test1/testinfo.dat index 04b1dfe78302..857c40b684e8 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange/test2/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange/test2/test.cpp index 568380b27497..42c94087fc43 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange/test2/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange/test2/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64/test1/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64/test1/test.cpp index 938855dda535..e91a1461e5a3 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64/test1/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64/test1/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64/test1/testinfo.dat index 184927734705..8021f43156e3 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64/test2/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64/test2/test.cpp index 0b6fb116518d..933cb3ff2364 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64/test2/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64/test2/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchangePointer/test1/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchangePointer/test1/test.cpp index c263a6cdc47d..1a4edf77c5d5 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchangePointer/test1/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchangePointer/test1/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchangePointer/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchangePointer/test1/testinfo.dat index d78515e7cceb..7a802c1e8cbb 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchangePointer/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchangePointer/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement/test1/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement/test1/test.cpp index 9c9a50c73e0e..ddd188cb7086 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement/test1/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement/test1/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement/test1/testinfo.dat index 57ee3835cdbf..e94bf38e740f 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement/test2/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement/test2/test.cpp index ba202b9c5f51..a9dd8ef29350 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement/test2/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement/test2/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement64/test1/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement64/test1/test.cpp index 9d18b89dcf51..8810cd8ecfab 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement64/test1/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement64/test1/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement64/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement64/test1/testinfo.dat index 8c5b1f087c33..878c1023cb6a 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement64/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement64/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement64/test2/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement64/test2/test.cpp index dae15f6263e2..6bfa89a38548 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement64/test2/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement64/test2/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedExchange/test1/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedExchange/test1/test.cpp index 517fca1792d7..670f960c17aa 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedExchange/test1/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedExchange/test1/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedExchange/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedExchange/test1/testinfo.dat index 4b7c20a42391..dc5743a88318 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedExchange/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedExchange/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedExchange64/test1/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedExchange64/test1/test.cpp index 202ab75d2e22..97a1f2212373 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedExchange64/test1/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedExchange64/test1/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedExchange64/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedExchange64/test1/testinfo.dat index 3669e9961421..b55eb9e62edd 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedExchange64/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedExchange64/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedExchangePointer/test1/InterlockedExchangePointer.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedExchangePointer/test1/InterlockedExchangePointer.cpp index d36c96724f58..4800024f64c7 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedExchangePointer/test1/InterlockedExchangePointer.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedExchangePointer/test1/InterlockedExchangePointer.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedExchangePointer/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedExchangePointer/test1/testinfo.dat index 5e0a36627afb..b7128df27912 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedExchangePointer/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedExchangePointer/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement/test1/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement/test1/test.cpp index 8b4b3e91488d..d100c1da072a 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement/test1/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement/test1/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement/test1/testinfo.dat index c30496003090..e404d7ff3452 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement/test2/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement/test2/test.cpp index 90858e7e0aba..49e31c65fa31 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement/test2/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement/test2/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement64/test1/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement64/test1/test.cpp index 28e671852e68..6e04b49f8492 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement64/test1/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement64/test1/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement64/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement64/test1/testinfo.dat index fff0c701c6c9..7b9c2712937b 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement64/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement64/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement64/test2/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement64/test2/test.cpp index 503da35ab886..cabd2176c94c 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement64/test2/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement64/test2/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadCodePtr/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadCodePtr/test1/test1.cpp index 4b2763d45743..619f077c2ca2 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadCodePtr/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadCodePtr/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadCodePtr/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadCodePtr/test1/testinfo.dat index 8b73c0dfca19..eb52f3bd83c7 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadCodePtr/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadCodePtr/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = C Runtime diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadReadPtr/test1/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadReadPtr/test1/test.cpp index 24b7ceb7e6a2..58e2e7c3a250 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadReadPtr/test1/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadReadPtr/test1/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadReadPtr/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadReadPtr/test1/testinfo.dat index 27668b66c746..a08ac0203b37 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadReadPtr/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadReadPtr/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test1/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test1/test.cpp index 018d7beae0f2..2e3a8507661c 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test1/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test1/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test1/testinfo.dat index ba4e97ebbc4d..335b52f2a9cd 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test2/test2.cpp index b5e22ea70e5d..e4262c8504ed 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test2/testinfo.dat index ad0a5fe90efa..dcffd114a6a2 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test3/test3.cpp index 7b04c548ccbb..5b2ac41d4ff1 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test3/testinfo.dat index 18851d2fdee1..89739c0d09af 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/MessageBoxW/test1/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/MessageBoxW/test1/test.cpp index 8eb8c0eb7e43..4a3f208efa44 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/MessageBoxW/test1/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/MessageBoxW/test1/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/MessageBoxW/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/MessageBoxW/test1/testinfo.dat index e4d46c986bb5..667db59488ca 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/MessageBoxW/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/MessageBoxW/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/MessageBoxW/test2/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/MessageBoxW/test2/test.cpp index e2ff0cf6d60f..9893decc98e2 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/MessageBoxW/test2/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/MessageBoxW/test2/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/MessageBoxW/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/MessageBoxW/test2/testinfo.dat index e4d46c986bb5..667db59488ca 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/MessageBoxW/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/MessageBoxW/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test1/test1.cpp index 86a44218f1e9..6ff916aca038 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test1/testinfo.dat index 561cd943fca8..3283c2ec73de 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test2/test2.cpp index 984007e6f1ca..d71e4e2063a5 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test2/testinfo.dat index 446e30150057..46a5aa0a7031 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test3/test3.cpp index 539e33004b8d..d35d6925ddb3 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** Source : test3.c diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test3/testinfo.dat index 05076bb376d5..2f59bc47c9b5 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test4/test4.cpp index de3059c8d834..18473198bf75 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** Source : test4.c diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test4/testinfo.dat index 925a917871b7..4a07a95ce49c 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableA/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test1/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test1/test.cpp index 0c753be78151..6541ee07327d 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test1/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test1/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test1/testinfo.dat index a44f4674cf35..a35799f9b503 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test2/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test2/test.cpp index 12f4887b6d4e..c20d97cad31e 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test2/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test2/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test2/testinfo.dat index 4df82daadea0..a3b30d087d93 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test3/test3.cpp index 5c4d4eba42a2..53b7fc5630a9 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** Source : test3.c diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test3/testinfo.dat index 43a457a76a43..33fbfe541860 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test4/test4.cpp index 50c59d6e97a8..225e104039b5 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** Source : test4.c diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test4/testinfo.dat index 126a72c94ccd..f0da41068472 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetLastError/test1/test.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetLastError/test1/test.cpp index d414626dd2e4..8a6b0d3c6fea 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetLastError/test1/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetLastError/test1/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetLastError/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetLastError/test1/testinfo.dat index 5333a4bb36d7..e81fa1cc3b29 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetLastError/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/SetLastError/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/_i64tow/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/_i64tow/test1/test1.cpp index 9a8ae0708974..0c48434a0e10 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/_i64tow/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/_i64tow/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/_i64tow/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/miscellaneous/_i64tow/test1/testinfo.dat index 11982050e06c..8ee04a500507 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/_i64tow/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/_i64tow/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = miscellaneous diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/queryperformancecounter/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/queryperformancecounter/test1/test1.cpp index 55b173add7cd..65c8503b41fe 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/queryperformancecounter/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/queryperformancecounter/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/miscellaneous/queryperformancefrequency/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/miscellaneous/queryperformancefrequency/test1/test1.cpp index de08063a74e5..bc3fc0761474 100644 --- a/src/coreclr/src/pal/tests/palsuite/miscellaneous/queryperformancefrequency/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/miscellaneous/queryperformancefrequency/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_GetPALDirectoryW/test1/PAL_GetPALDirectoryW.cpp b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_GetPALDirectoryW/test1/PAL_GetPALDirectoryW.cpp index 856bfe865981..73099467940d 100644 --- a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_GetPALDirectoryW/test1/PAL_GetPALDirectoryW.cpp +++ b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_GetPALDirectoryW/test1/PAL_GetPALDirectoryW.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_GetPALDirectoryW/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_GetPALDirectoryW/test1/testinfo.dat index dca92b0462f6..306d2e53d3d3 100644 --- a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_GetPALDirectoryW/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_GetPALDirectoryW/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = PAL_Specific diff --git a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_GetUserTempDirectoryW/test1/PAL_GetUserTempDirectoryW.cpp b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_GetUserTempDirectoryW/test1/PAL_GetUserTempDirectoryW.cpp index 65cc426c74a1..2343a6799d4f 100644 --- a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_GetUserTempDirectoryW/test1/PAL_GetUserTempDirectoryW.cpp +++ b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_GetUserTempDirectoryW/test1/PAL_GetUserTempDirectoryW.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_GetUserTempDirectoryW/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_GetUserTempDirectoryW/test1/testinfo.dat index d530ca5fc700..7384f82fb873 100644 --- a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_GetUserTempDirectoryW/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_GetUserTempDirectoryW/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = pal_specific diff --git a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_Initialize_Terminate/test1/PAL_Initialize_Terminate.cpp b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_Initialize_Terminate/test1/PAL_Initialize_Terminate.cpp index 29bb2c3b4f68..8baba7c8b053 100644 --- a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_Initialize_Terminate/test1/PAL_Initialize_Terminate.cpp +++ b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_Initialize_Terminate/test1/PAL_Initialize_Terminate.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_Initialize_Terminate/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_Initialize_Terminate/test1/testinfo.dat index 8ffe3bb7c7cd..15fb6bfa9aa0 100644 --- a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_Initialize_Terminate/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_Initialize_Terminate/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = PAL_Specific diff --git a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_Initialize_Terminate/test2/pal_initialize_twice.cpp b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_Initialize_Terminate/test2/pal_initialize_twice.cpp index fc460bc1ada1..2697e370598c 100644 --- a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_Initialize_Terminate/test2/pal_initialize_twice.cpp +++ b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_Initialize_Terminate/test2/pal_initialize_twice.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_Initialize_Terminate/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_Initialize_Terminate/test2/testinfo.dat index 31ceaf054d2d..baa11675a23b 100644 --- a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_Initialize_Terminate/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_Initialize_Terminate/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = PAL_Specific diff --git a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_RegisterLibraryW_UnregisterLibraryW/test1/PAL_RegisterLibraryW_UnregisterLibraryW.cpp b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_RegisterLibraryW_UnregisterLibraryW/test1/PAL_RegisterLibraryW_UnregisterLibraryW.cpp index 8eb8776107a4..d4e5578e0cae 100644 --- a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_RegisterLibraryW_UnregisterLibraryW/test1/PAL_RegisterLibraryW_UnregisterLibraryW.cpp +++ b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_RegisterLibraryW_UnregisterLibraryW/test1/PAL_RegisterLibraryW_UnregisterLibraryW.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_RegisterLibraryW_UnregisterLibraryW/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_RegisterLibraryW_UnregisterLibraryW/test1/testinfo.dat index abbd28c2384e..68d1fa0c490f 100644 --- a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_RegisterLibraryW_UnregisterLibraryW/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_RegisterLibraryW_UnregisterLibraryW/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = pal_specific diff --git a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_RegisterLibraryW_UnregisterLibraryW/test2_neg/reg_unreg_libraryw_neg.cpp b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_RegisterLibraryW_UnregisterLibraryW/test2_neg/reg_unreg_libraryw_neg.cpp index c6fa4ad0747a..55838837ae0a 100644 --- a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_RegisterLibraryW_UnregisterLibraryW/test2_neg/reg_unreg_libraryw_neg.cpp +++ b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_RegisterLibraryW_UnregisterLibraryW/test2_neg/reg_unreg_libraryw_neg.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_RegisterLibraryW_UnregisterLibraryW/test2_neg/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_RegisterLibraryW_UnregisterLibraryW/test2_neg/testinfo.dat index 3322633291fb..b0ebcb3d1d7e 100644 --- a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_RegisterLibraryW_UnregisterLibraryW/test2_neg/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_RegisterLibraryW_UnregisterLibraryW/test2_neg/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = pal_specific diff --git a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_errno/test1/PAL_errno.cpp b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_errno/test1/PAL_errno.cpp index 32e8487d07c1..3f9451ad8c52 100644 --- a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_errno/test1/PAL_errno.cpp +++ b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_errno/test1/PAL_errno.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_errno/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_errno/test1/testinfo.dat index a35e1d23fc4b..8fb427ad3382 100644 --- a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_errno/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_errno/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = PAL_Specific diff --git a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_get_stderr/test1/PAL_get_stderr.cpp b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_get_stderr/test1/PAL_get_stderr.cpp index da534601012e..6a2981ce44ca 100644 --- a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_get_stderr/test1/PAL_get_stderr.cpp +++ b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_get_stderr/test1/PAL_get_stderr.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_get_stderr/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_get_stderr/test1/testinfo.dat index a633c68e3479..87f0e4818df5 100644 --- a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_get_stderr/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_get_stderr/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = PAL_Specific diff --git a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_get_stdin/test1/PAL_get_stdin.cpp b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_get_stdin/test1/PAL_get_stdin.cpp index 5d1fd23f92bd..e320f79a9bf5 100644 --- a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_get_stdin/test1/PAL_get_stdin.cpp +++ b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_get_stdin/test1/PAL_get_stdin.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_get_stdin/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_get_stdin/test1/testinfo.dat index d1c5723236e8..b186dc973d4c 100644 --- a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_get_stdin/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_get_stdin/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = PAL_Specific diff --git a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_get_stdout/test1/PAL_get_stdout.cpp b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_get_stdout/test1/PAL_get_stdout.cpp index ebfee47ae913..f741278d097c 100644 --- a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_get_stdout/test1/PAL_get_stdout.cpp +++ b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_get_stdout/test1/PAL_get_stdout.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_get_stdout/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_get_stdout/test1/testinfo.dat index ed370981aa85..5c7c3e05adc6 100644 --- a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_get_stdout/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_get_stdout/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = PAL_Specific diff --git a/src/coreclr/src/pal/tests/palsuite/samples/test1/test.cpp b/src/coreclr/src/pal/tests/palsuite/samples/test1/test.cpp index 2eed6f6f4490..5a8fb032a375 100644 --- a/src/coreclr/src/pal/tests/palsuite/samples/test1/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/samples/test1/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/samples/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/samples/test1/testinfo.dat index 0459d24d6308..35406bf33758 100644 --- a/src/coreclr/src/pal/tests/palsuite/samples/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/samples/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Samples diff --git a/src/coreclr/src/pal/tests/palsuite/samples/test2/test.cpp b/src/coreclr/src/pal/tests/palsuite/samples/test2/test.cpp index 53d4158b9d15..82877c66c2e7 100644 --- a/src/coreclr/src/pal/tests/palsuite/samples/test2/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/samples/test2/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/samples/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/samples/test2/testinfo.dat index eb6e38db87e1..e6e4832aa128 100644 --- a/src/coreclr/src/pal/tests/palsuite/samples/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/samples/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Samples diff --git a/src/coreclr/src/pal/tests/palsuite/tests-manual.dat b/src/coreclr/src/pal/tests/palsuite/tests-manual.dat index 402e819cea27..b87a39486af1 100644 --- a/src/coreclr/src/pal/tests/palsuite/tests-manual.dat +++ b/src/coreclr/src/pal/tests/palsuite/tests-manual.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. c_runtime/exit/test2,1 pal_specific/pal_get_stderr/test1,1 diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateEventA/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CreateEventA/test1/test1.cpp index d8ef0f58a307..52f1a467e4fb 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateEventA/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateEventA/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateEventA/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/CreateEventA/test1/testinfo.dat index c0d169ccdc50..019b2a4c4163 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateEventA/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateEventA/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateEventA/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CreateEventA/test2/test2.cpp index a24d20eeea98..a3749e27d1d3 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateEventA/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateEventA/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateEventA/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/CreateEventA/test2/testinfo.dat index 4af65f18d891..a3ada19a0ee2 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateEventA/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateEventA/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateEventA/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CreateEventA/test3/test3.cpp index 56d107b22d57..ddd299357359 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateEventA/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateEventA/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateEventA/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/CreateEventA/test3/testinfo.dat index c3a344a2d9b0..acf4bf5f94d2 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateEventA/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateEventA/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateEventW/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CreateEventW/test1/test1.cpp index 8d99e4193474..8153d63a313b 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateEventW/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateEventW/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateEventW/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/CreateEventW/test1/testinfo.dat index 204ad1f4d49e..d0ed8a534b64 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateEventW/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateEventW/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateEventW/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CreateEventW/test2/test2.cpp index 4df218995a75..7c7905c7e5ff 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateEventW/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateEventW/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateEventW/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/CreateEventW/test2/testinfo.dat index 01f7519ae3e0..9588f2d100a4 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateEventW/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateEventW/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateEventW/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CreateEventW/test3/test3.cpp index 22f0fcfc49b9..8b07d55d35e0 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateEventW/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateEventW/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateEventW/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/CreateEventW/test3/testinfo.dat index 4776ed239f96..58d3e98d7245 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateEventW/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateEventW/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateMutexA_ReleaseMutex/test1/CreateMutexA.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CreateMutexA_ReleaseMutex/test1/CreateMutexA.cpp index 3074fa03fc49..3fe70fabefd0 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateMutexA_ReleaseMutex/test1/CreateMutexA.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateMutexA_ReleaseMutex/test1/CreateMutexA.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateMutexA_ReleaseMutex/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/CreateMutexA_ReleaseMutex/test1/testinfo.dat index 829b7159ac56..8371b360c953 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateMutexA_ReleaseMutex/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateMutexA_ReleaseMutex/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateMutexA_ReleaseMutex/test2/CreateMutexA.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CreateMutexA_ReleaseMutex/test2/CreateMutexA.cpp index 36295855e04b..25a027e480f1 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateMutexA_ReleaseMutex/test2/CreateMutexA.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateMutexA_ReleaseMutex/test2/CreateMutexA.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateMutexA_ReleaseMutex/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/CreateMutexA_ReleaseMutex/test2/testinfo.dat index 7e37528c1557..92a71b43a7cf 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateMutexA_ReleaseMutex/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateMutexA_ReleaseMutex/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateMutexW_ReleaseMutex/test1/CreateMutexW.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CreateMutexW_ReleaseMutex/test1/CreateMutexW.cpp index ec8e0c66b74c..28aa46be7e0f 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateMutexW_ReleaseMutex/test1/CreateMutexW.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateMutexW_ReleaseMutex/test1/CreateMutexW.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateMutexW_ReleaseMutex/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/CreateMutexW_ReleaseMutex/test1/testinfo.dat index 19ea934dff7c..7a95eea6166f 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateMutexW_ReleaseMutex/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateMutexW_ReleaseMutex/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateMutexW_ReleaseMutex/test2/CreateMutexW.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CreateMutexW_ReleaseMutex/test2/CreateMutexW.cpp index 41b7798a6e24..2a8ba343f942 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateMutexW_ReleaseMutex/test2/CreateMutexW.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateMutexW_ReleaseMutex/test2/CreateMutexW.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateMutexW_ReleaseMutex/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/CreateMutexW_ReleaseMutex/test2/testinfo.dat index c5769e3ad331..948598c875c5 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateMutexW_ReleaseMutex/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateMutexW_ReleaseMutex/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessA/test1/childProcess.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessA/test1/childProcess.cpp index ccbb050c04d8..27a3265a2ea6 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessA/test1/childProcess.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessA/test1/childProcess.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessA/test1/parentProcess.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessA/test1/parentProcess.cpp index b0c5808a7e74..145bb1808fe8 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessA/test1/parentProcess.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessA/test1/parentProcess.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessA/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessA/test1/testinfo.dat index 02c25444fe0d..cee46a23f418 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessA/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessA/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessA/test2/childprocess.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessA/test2/childprocess.cpp index baa20c2d3c39..f1ac1474ba42 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessA/test2/childprocess.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessA/test2/childprocess.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessA/test2/parentprocess.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessA/test2/parentprocess.cpp index ef3340c5d9d1..9f80e3412499 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessA/test2/parentprocess.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessA/test2/parentprocess.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessA/test2/test2.h b/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessA/test2/test2.h index 8cdff3b9390e..07bd3977fa6a 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessA/test2/test2.h +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessA/test2/test2.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessA/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessA/test2/testinfo.dat index 23fcdf93aeb5..a90eed19c257 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessA/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessA/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessW/test1/childProcess.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessW/test1/childProcess.cpp index a7730c6d51d7..73087ab611ec 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessW/test1/childProcess.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessW/test1/childProcess.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessW/test1/parentProcess.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessW/test1/parentProcess.cpp index db1fb6356d02..d417f40ec234 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessW/test1/parentProcess.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessW/test1/parentProcess.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessW/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessW/test1/testinfo.dat index 2acf2c92895f..03cd757c1546 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessW/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessW/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessW/test2/childprocess.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessW/test2/childprocess.cpp index b4ab9366d940..f38f2dad23e6 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessW/test2/childprocess.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessW/test2/childprocess.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessW/test2/parentprocess.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessW/test2/parentprocess.cpp index 439b7b5eef25..59a8274fe0ab 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessW/test2/parentprocess.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessW/test2/parentprocess.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessW/test2/test2.h b/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessW/test2/test2.h index 07d40b894283..100320dac685 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessW/test2/test2.h +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessW/test2/test2.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessW/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessW/test2/testinfo.dat index d16ae593f230..b256fd67f72b 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessW/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateProcessW/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreA_ReleaseSemaphore/test1/CreateSemaphore.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreA_ReleaseSemaphore/test1/CreateSemaphore.cpp index 342b15ec295e..ecc897c8612e 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreA_ReleaseSemaphore/test1/CreateSemaphore.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreA_ReleaseSemaphore/test1/CreateSemaphore.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreA_ReleaseSemaphore/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreA_ReleaseSemaphore/test1/testinfo.dat index 880746e43eb5..87f87915c1fe 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreA_ReleaseSemaphore/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreA_ReleaseSemaphore/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreA_ReleaseSemaphore/test2/CreateSemaphore.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreA_ReleaseSemaphore/test2/CreateSemaphore.cpp index bff5b51c3353..62b42e221ba9 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreA_ReleaseSemaphore/test2/CreateSemaphore.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreA_ReleaseSemaphore/test2/CreateSemaphore.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreA_ReleaseSemaphore/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreA_ReleaseSemaphore/test2/testinfo.dat index 5a6c2e7909c9..32645dcffbb4 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreA_ReleaseSemaphore/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreA_ReleaseSemaphore/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreA_ReleaseSemaphore/test3/createsemaphore.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreA_ReleaseSemaphore/test3/createsemaphore.cpp index 7c6db6b055f1..3d2feacb569d 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreA_ReleaseSemaphore/test3/createsemaphore.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreA_ReleaseSemaphore/test3/createsemaphore.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreA_ReleaseSemaphore/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreA_ReleaseSemaphore/test3/testinfo.dat index d8cd5909235a..ee4384e72430 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreA_ReleaseSemaphore/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreA_ReleaseSemaphore/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreW_ReleaseSemaphore/test1/CreateSemaphore.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreW_ReleaseSemaphore/test1/CreateSemaphore.cpp index 854d16d0ef3c..598b351b4bf0 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreW_ReleaseSemaphore/test1/CreateSemaphore.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreW_ReleaseSemaphore/test1/CreateSemaphore.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreW_ReleaseSemaphore/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreW_ReleaseSemaphore/test1/testinfo.dat index 9127589333e6..c3a2a9e4f5b0 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreW_ReleaseSemaphore/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreW_ReleaseSemaphore/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreW_ReleaseSemaphore/test2/CreateSemaphore.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreW_ReleaseSemaphore/test2/CreateSemaphore.cpp index 62532737ace1..befce930f22a 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreW_ReleaseSemaphore/test2/CreateSemaphore.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreW_ReleaseSemaphore/test2/CreateSemaphore.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreW_ReleaseSemaphore/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreW_ReleaseSemaphore/test2/testinfo.dat index 32b107fd9e97..e70792803239 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreW_ReleaseSemaphore/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreW_ReleaseSemaphore/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreW_ReleaseSemaphore/test3/createsemaphore.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreW_ReleaseSemaphore/test3/createsemaphore.cpp index ea0a5e084662..77e81b468254 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreW_ReleaseSemaphore/test3/createsemaphore.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreW_ReleaseSemaphore/test3/createsemaphore.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreW_ReleaseSemaphore/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreW_ReleaseSemaphore/test3/testinfo.dat index beaac95f97b7..48215569f073 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreW_ReleaseSemaphore/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateSemaphoreW_ReleaseSemaphore/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateThread/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CreateThread/test1/test1.cpp index 4084e1f9cf74..a1c7e4d0cfb8 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateThread/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateThread/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateThread/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/CreateThread/test1/testinfo.dat index 3ae70625c23d..ab67f1fa2377 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateThread/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateThread/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateThread/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CreateThread/test2/test2.cpp index 34d3afbfb66a..610c2f6da44c 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateThread/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateThread/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*=========================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateThread/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/CreateThread/test2/testinfo.dat index 0333beb3603d..d08bc095d6a6 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateThread/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateThread/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateThread/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CreateThread/test3/test3.cpp index 0c44d1fdd0bc..62c28f382a67 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateThread/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateThread/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*=========================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CreateThread/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/CreateThread/test3/testinfo.dat index 712c3a6652e5..6d854f379808 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CreateThread/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/CreateThread/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test1/InitializeCriticalSection.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test1/InitializeCriticalSection.cpp index f294cea472d9..6f4dbe43b698 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test1/InitializeCriticalSection.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test1/InitializeCriticalSection.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test1/testinfo.dat index 494b899b9051..41db3e985c08 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test2/test2.cpp index 47659a1c1896..41b104935e09 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test2/testinfo.dat index 06842124b924..22f5d1445ce6 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test3/test3.cpp index d5911267b212..12096eba27fe 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test3/testinfo.dat index 818b4870a263..cf9cf558bc83 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test4/test4.cpp index 8a245a47765c..ee3e60008a4f 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test4/testinfo.dat index 9c07c24113fa..c31a70ac4272 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test5/test5.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test5/test5.cpp index 8dfa4f5f3d53..c62a75d3f0f4 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test5/test5.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test5/test5.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test5/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test5/testinfo.dat index aa1124925bdd..c35fcf001912 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test5/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test5/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test6/test6.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test6/test6.cpp index c27db86e5b23..b56bde195551 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test6/test6.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test6/test6.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test6/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test6/testinfo.dat index 151e1ed4d014..adeb1a18ce91 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test6/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test6/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test7/test7.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test7/test7.cpp index 1c030d3c037f..aa39ad6b4a9c 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test7/test7.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test7/test7.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test7/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test7/testinfo.dat index 5cf580962218..a14c248df2af 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test7/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test7/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test8/test8.cpp b/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test8/test8.cpp index 7f0c58cd26d1..239c4d5f3458 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test8/test8.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/CriticalSectionFunctions/test8/test8.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/DisableThreadLibraryCalls/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/threading/DisableThreadLibraryCalls/test1/test1.cpp index 55251d46bfb9..7e86ba15e1b4 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/DisableThreadLibraryCalls/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/DisableThreadLibraryCalls/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/DisableThreadLibraryCalls/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/DisableThreadLibraryCalls/test1/testinfo.dat index 6d32f3591a42..a597b25dd917 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/DisableThreadLibraryCalls/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/DisableThreadLibraryCalls/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/DisableThreadLibraryCalls/test1/testlib.cpp b/src/coreclr/src/pal/tests/palsuite/threading/DisableThreadLibraryCalls/test1/testlib.cpp index 057dfde66d2c..4c7974d88641 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/DisableThreadLibraryCalls/test1/testlib.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/DisableThreadLibraryCalls/test1/testlib.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/DisableThreadLibraryCalls/test2/dllmain1.cpp b/src/coreclr/src/pal/tests/palsuite/threading/DisableThreadLibraryCalls/test2/dllmain1.cpp index b65bb66a5612..b9a6e6701394 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/DisableThreadLibraryCalls/test2/dllmain1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/DisableThreadLibraryCalls/test2/dllmain1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/DisableThreadLibraryCalls/test2/dllmain2.cpp b/src/coreclr/src/pal/tests/palsuite/threading/DisableThreadLibraryCalls/test2/dllmain2.cpp index 519083bbaff3..833fbe4155bc 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/DisableThreadLibraryCalls/test2/dllmain2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/DisableThreadLibraryCalls/test2/dllmain2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/DisableThreadLibraryCalls/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/threading/DisableThreadLibraryCalls/test2/test2.cpp index 5fb694ea1400..448db98b8a6d 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/DisableThreadLibraryCalls/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/DisableThreadLibraryCalls/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/DisableThreadLibraryCalls/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/DisableThreadLibraryCalls/test2/testinfo.dat index 6d28595628c7..84b7339883de 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/DisableThreadLibraryCalls/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/DisableThreadLibraryCalls/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test1/test1.cpp index e080e98ae8e8..15c0c22f77a8 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test1/testinfo.dat index e22b0bea6a65..c19896bb4187 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test10/test10.cpp b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test10/test10.cpp index 108d748de677..995670018926 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test10/test10.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test10/test10.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test10/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test10/testinfo.dat index 674c71c2b34b..875ab4f503f0 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test10/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test10/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test11/childprocess.cpp b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test11/childprocess.cpp index d5b310e46c4d..7ec6bcd05312 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test11/childprocess.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test11/childprocess.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test11/myexitcode.h b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test11/myexitcode.h index 84801cbb5444..b9446c00d1a9 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test11/myexitcode.h +++ b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test11/myexitcode.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test11/test11.cpp b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test11/test11.cpp index b05244c4b848..c2182244e458 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test11/test11.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test11/test11.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test11/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test11/testinfo.dat index 1937877880ea..b671dd6e60eb 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test11/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test11/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test12/test12.cpp b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test12/test12.cpp index 519194bc3a6d..e600c5e1d002 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test12/test12.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test12/test12.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test12/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test12/testinfo.dat index 3d73362eb32c..93bc1a64d754 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test12/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test12/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test2/test2.cpp index d1411e62d992..9554b17118fc 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test2/testinfo.dat index 273440804e0d..df07a395ac42 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test3/test3.cpp index fc91b5ec22f2..206438d22ad0 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test3/testinfo.dat index a10adb9a8ea0..61ff7c89788b 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test4/test4.cpp index 14a72db46116..c1854cd370b0 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test4/testinfo.dat index 64842f8713e0..accb13526994 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test5/test5.cpp b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test5/test5.cpp index a588928f004c..a9eaa62daa35 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test5/test5.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test5/test5.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test5/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test5/testinfo.dat index 97e42a978714..142a4674b984 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test5/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test5/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test6/test6.cpp b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test6/test6.cpp index 026f315a4422..a6a1b1f2579d 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test6/test6.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test6/test6.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test6/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test6/testinfo.dat index 6c49d64f89ca..6ad1cf89f640 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test6/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test6/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test7/test7.cpp b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test7/test7.cpp index 7074d37029e6..fa2f6c363635 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test7/test7.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test7/test7.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test7/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test7/testinfo.dat index b8092d615240..d10d857c7db0 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test7/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test7/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test8/test8.cpp b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test8/test8.cpp index 6748c5dffdec..47083e3cd0f8 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test8/test8.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test8/test8.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test8/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test8/testinfo.dat index ae1353af1835..5340ffe92fa1 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test8/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test8/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test9/test9.cpp b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test9/test9.cpp index f15871c57d9f..c223f9a4a6eb 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test9/test9.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test9/test9.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test9/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test9/testinfo.dat index c7122908fdf5..179eabc13ba4 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test9/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/DuplicateHandle/test9/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/ExitProcess/test1/ExitProcess.cpp b/src/coreclr/src/pal/tests/palsuite/threading/ExitProcess/test1/ExitProcess.cpp index 2b089a0b833a..74e41afe3514 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/ExitProcess/test1/ExitProcess.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/ExitProcess/test1/ExitProcess.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/ExitProcess/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/ExitProcess/test1/testinfo.dat index d8b85abad600..61906c783931 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/ExitProcess/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/ExitProcess/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/ExitProcess/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/threading/ExitProcess/test2/test2.cpp index 8023ad7bab30..58698c1dc866 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/ExitProcess/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/ExitProcess/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/ExitProcess/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/ExitProcess/test2/testinfo.dat index 0aa07eb15a83..0a1dd2be8c88 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/ExitProcess/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/ExitProcess/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/ExitProcess/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/threading/ExitProcess/test3/test3.cpp index aea485e5e388..6b3f4afc5388 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/ExitProcess/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/ExitProcess/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/ExitProcess/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/ExitProcess/test3/testinfo.dat index c857d885cc9f..3bdc45cd2d5e 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/ExitProcess/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/ExitProcess/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test1/test1.cpp index 947763312690..9cdfe6fcde6f 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test1/testinfo.dat index a526f8e127c0..7b1f6cdec309 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test2/childprocess.cpp b/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test2/childprocess.cpp index 7fbe208f919f..ea439628ad9e 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test2/childprocess.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test2/childprocess.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test2/myexitcode.h b/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test2/myexitcode.h index 566becb9a0d5..f753316e23be 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test2/myexitcode.h +++ b/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test2/myexitcode.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test2/test2.cpp index c31af8a079d3..6de6d2fbdb35 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test2/testinfo.dat index 4b5bdc2ac672..dbda37f8246d 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test3/dllmain.cpp b/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test3/dllmain.cpp index 862aff5f0022..5be9bb91c5ed 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test3/dllmain.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test3/dllmain.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test3/test3.cpp index 8a71c7cc9947..034bbf48be9e 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test3/testinfo.dat index 1c9e8c756713..7a32a241df53 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/ExitThread/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentProcess/test1/process.cpp b/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentProcess/test1/process.cpp index 17d9af62824a..4a05dc80b29d 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentProcess/test1/process.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentProcess/test1/process.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentProcess/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentProcess/test1/testinfo.dat index 8eb2759fb910..f930e4c75dba 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentProcess/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentProcess/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentProcessId/test1/processId.cpp b/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentProcessId/test1/processId.cpp index cc689b3f8b2b..879292013857 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentProcessId/test1/processId.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentProcessId/test1/processId.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentProcessId/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentProcessId/test1/testinfo.dat index db615c0bf91d..8bdc0e414de8 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentProcessId/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentProcessId/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentThread/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentThread/test1/testinfo.dat index 29c9767ed07f..c11cba188f5a 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentThread/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentThread/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentThread/test1/thread.cpp b/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentThread/test1/thread.cpp index b2bb97fd67fb..d19e18f90369 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentThread/test1/thread.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentThread/test1/thread.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentThread/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentThread/test2/test2.cpp index beeb5ec241f7..3598437b4426 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentThread/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentThread/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentThread/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentThread/test2/testinfo.dat index 96a6d403bb0d..437dcfcdc0d0 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentThread/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentThread/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentThreadId/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentThreadId/test1/testinfo.dat index 4d1e056b71a7..44dec989648b 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentThreadId/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentThreadId/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentThreadId/test1/threadId.cpp b/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentThreadId/test1/threadId.cpp index acbb1ff37325..8288f93aa70c 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentThreadId/test1/threadId.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/GetCurrentThreadId/test1/threadId.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/GetExitCodeProcess/test1/childProcess.cpp b/src/coreclr/src/pal/tests/palsuite/threading/GetExitCodeProcess/test1/childProcess.cpp index fe1b38fb3152..4ee5f0a194b6 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/GetExitCodeProcess/test1/childProcess.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/GetExitCodeProcess/test1/childProcess.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/GetExitCodeProcess/test1/myexitcode.h b/src/coreclr/src/pal/tests/palsuite/threading/GetExitCodeProcess/test1/myexitcode.h index 60a140d1f342..ddf0fb2a050b 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/GetExitCodeProcess/test1/myexitcode.h +++ b/src/coreclr/src/pal/tests/palsuite/threading/GetExitCodeProcess/test1/myexitcode.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/GetExitCodeProcess/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/threading/GetExitCodeProcess/test1/test1.cpp index 0f98cf8f5788..dff574cadf30 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/GetExitCodeProcess/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/GetExitCodeProcess/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/GetExitCodeProcess/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/GetExitCodeProcess/test1/testinfo.dat index d06719f0b02d..b015aee999af 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/GetExitCodeProcess/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/GetExitCodeProcess/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/GetProcessTimes/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/threading/GetProcessTimes/test2/test2.cpp index cc39de609bf6..410f63793ad4 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/GetProcessTimes/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/GetProcessTimes/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/GetProcessTimes/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/GetProcessTimes/test2/testinfo.dat index d0d3b75f0628..71871ab36fa0 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/GetProcessTimes/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/GetProcessTimes/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/GetThreadTimes/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/threading/GetThreadTimes/test1/test1.cpp index 33fcc3611872..3d91bfaecb4c 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/GetThreadTimes/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/GetThreadTimes/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/NamedMutex/test1/namedmutex.cpp b/src/coreclr/src/pal/tests/palsuite/threading/NamedMutex/test1/namedmutex.cpp index 70c9f697c76c..89e9e85a86c4 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/NamedMutex/test1/namedmutex.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/NamedMutex/test1/namedmutex.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // These test cases test named mutexes, including positive // and negative cases, cross - thread and cross - process, mutual diff --git a/src/coreclr/src/pal/tests/palsuite/threading/NamedMutex/test1/nopal.cpp b/src/coreclr/src/pal/tests/palsuite/threading/NamedMutex/test1/nopal.cpp index ae3ebc361c4f..3c18e67d021c 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/NamedMutex/test1/nopal.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/NamedMutex/test1/nopal.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // Contains wrappers for functions whose required headers conflict with the PAL diff --git a/src/coreclr/src/pal/tests/palsuite/threading/NamedMutex/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/NamedMutex/test1/testinfo.dat index e3090093ea07..a1b6aab6a26d 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/NamedMutex/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/NamedMutex/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test1/test1.cpp index 9dcb3a4a68ba..b143faac7bfd 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test1/testinfo.dat index cc9be71042c9..12393a714da7 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test2/test2.cpp index 9cbf872b95f1..0edffc457255 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test2/testinfo.dat index ad3f22eea070..0e1fac095935 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test3/childprocess.cpp b/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test3/childprocess.cpp index b5149e006fc7..d2fab36c9968 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test3/childprocess.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test3/childprocess.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test3/test3.cpp index c4edf22a7698..18f88b52a8dd 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test3/testinfo.dat index 96b2c06644be..d5ebeb05c9ff 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test4/test4.cpp index ae657a05116b..9d062bd6d56a 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test4/testinfo.dat index 1b3f2d83c6b3..31e512e75683 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test5/test5.cpp b/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test5/test5.cpp index 43b585765c0c..5d4e90dba04c 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test5/test5.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test5/test5.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test5/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test5/testinfo.dat index f5af943a7c2e..f88f33731ca1 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test5/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/OpenEventW/test5/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/OpenProcess/test1/childProcess.cpp b/src/coreclr/src/pal/tests/palsuite/threading/OpenProcess/test1/childProcess.cpp index 9ef07433fdd9..a3dd3aa2a590 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/OpenProcess/test1/childProcess.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/OpenProcess/test1/childProcess.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/OpenProcess/test1/myexitcode.h b/src/coreclr/src/pal/tests/palsuite/threading/OpenProcess/test1/myexitcode.h index 66b8f43a976d..89d0be7cb32a 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/OpenProcess/test1/myexitcode.h +++ b/src/coreclr/src/pal/tests/palsuite/threading/OpenProcess/test1/myexitcode.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/OpenProcess/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/threading/OpenProcess/test1/test1.cpp index d0f901964625..57fc97a27678 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/OpenProcess/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/OpenProcess/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/OpenProcess/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/OpenProcess/test1/testinfo.dat index dd6b2c0ffe3b..11a7c9826533 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/OpenProcess/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/OpenProcess/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/QueryThreadCycleTime/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/threading/QueryThreadCycleTime/test1/test1.cpp index ea50042c978e..0bb9d87a4ffb 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/QueryThreadCycleTime/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/QueryThreadCycleTime/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test1/test1.cpp index 3637897ba714..886ba439a6c8 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test1/testinfo.dat index fbe8343d81ce..812a128ac831 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test2/test2.cpp index dc2bfdb1739d..b7ec387647c5 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test2/testinfo.dat index 42d942df36db..c915a5415bc7 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test3/test3.cpp index 933f41a5b4cb..a5f694bb41e8 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test3/testinfo.dat index 0b96349f1527..4dd3fc6b0984 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test4/test4.cpp index c28709db81e9..4b54513d5ed8 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test4/testinfo.dat index cd7b7c2f21d7..7813384a4ae5 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test5/test5.cpp b/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test5/test5.cpp index 3d26a55f5900..6095ffcbcce5 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test5/test5.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test5/test5.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test5/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test5/testinfo.dat index f1775aabe8be..8fe1d93b7b9c 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test5/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test5/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test6/test6.cpp b/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test6/test6.cpp index e2e2464726d6..2cf30224f4d2 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test6/test6.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test6/test6.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test6/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test6/testinfo.dat index 4d806184eec2..402fa57c44fc 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test6/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test6/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test7/test7.cpp b/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test7/test7.cpp index 54a63982fe4f..cef429233646 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test7/test7.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test7/test7.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test7/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test7/testinfo.dat index d92d9496d76f..23b4288e0eac 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test7/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/QueueUserAPC/test7/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/ReleaseMutex/test3/ReleaseMutex.cpp b/src/coreclr/src/pal/tests/palsuite/threading/ReleaseMutex/test3/ReleaseMutex.cpp index 5f6adb0419e8..26fe09687d05 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/ReleaseMutex/test3/ReleaseMutex.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/ReleaseMutex/test3/ReleaseMutex.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/ReleaseMutex/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/ReleaseMutex/test3/testinfo.dat index 3f06757eb6a4..b88a8fa5ce2b 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/ReleaseMutex/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/ReleaseMutex/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/ResetEvent/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/threading/ResetEvent/test1/test1.cpp index 20a0d5dffa03..b2fef7b19282 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/ResetEvent/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/ResetEvent/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/ResetEvent/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/ResetEvent/test1/testinfo.dat index ed27f13dbac6..c3caf1f4dd3d 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/ResetEvent/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/ResetEvent/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/ResetEvent/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/threading/ResetEvent/test2/test2.cpp index 8117f44353ce..1f23d79bb6ce 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/ResetEvent/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/ResetEvent/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/ResetEvent/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/ResetEvent/test2/testinfo.dat index 4af1769cd430..91d105e294db 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/ResetEvent/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/ResetEvent/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/ResetEvent/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/threading/ResetEvent/test3/test3.cpp index 9bc068ea72d7..601b6b4e3534 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/ResetEvent/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/ResetEvent/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/ResetEvent/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/ResetEvent/test3/testinfo.dat index 4abeeded00fd..652085c22621 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/ResetEvent/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/ResetEvent/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/ResetEvent/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/threading/ResetEvent/test4/test4.cpp index 0cc68fd9aa8b..0efe87f32286 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/ResetEvent/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/ResetEvent/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/ResetEvent/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/ResetEvent/test4/testinfo.dat index 0223246c6f0c..9ae938ef2846 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/ResetEvent/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/ResetEvent/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/ResumeThread/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/threading/ResumeThread/test1/test1.cpp index 825064e23bba..952b8c614a59 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/ResumeThread/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/ResumeThread/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/ResumeThread/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/ResumeThread/test1/testinfo.dat index 8472165d5db6..a0e64fb5bdb9 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/ResumeThread/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/ResumeThread/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/SetErrorMode/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/threading/SetErrorMode/test1/test1.cpp index 238cec44218e..ad4d278cbcd1 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/SetErrorMode/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/SetErrorMode/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/SetErrorMode/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/SetErrorMode/test1/testinfo.dat index 875ac2a223da..b3e71e9f078e 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/SetErrorMode/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/SetErrorMode/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = Threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/SetEvent/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/threading/SetEvent/test1/test1.cpp index d5a29ce3f346..b5bfe85a0ed4 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/SetEvent/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/SetEvent/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/SetEvent/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/SetEvent/test1/testinfo.dat index 9bfd80829cb8..b44ad50a5072 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/SetEvent/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/SetEvent/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/SetEvent/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/threading/SetEvent/test2/test2.cpp index 5fd283395742..275ed146c0c7 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/SetEvent/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/SetEvent/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/SetEvent/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/SetEvent/test2/testinfo.dat index f2153052bbbe..6a1f6b93d516 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/SetEvent/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/SetEvent/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/SetEvent/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/threading/SetEvent/test3/test3.cpp index 21601f00b88f..a4c032d5cec6 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/SetEvent/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/SetEvent/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/SetEvent/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/SetEvent/test3/testinfo.dat index 7b8f43013ab3..b9842b2ed315 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/SetEvent/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/SetEvent/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/SetEvent/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/threading/SetEvent/test4/test4.cpp index 7a79a9d708ff..1433c2306d43 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/SetEvent/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/SetEvent/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/SetEvent/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/SetEvent/test4/testinfo.dat index 9a7f7ddb3bdf..9f77ba4e74cf 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/SetEvent/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/SetEvent/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/SignalObjectAndWait/SignalObjectAndWaitTest.cpp b/src/coreclr/src/pal/tests/palsuite/threading/SignalObjectAndWait/SignalObjectAndWaitTest.cpp index 9ec1ed3dc839..e9ef3946dc37 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/SignalObjectAndWait/SignalObjectAndWaitTest.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/SignalObjectAndWait/SignalObjectAndWaitTest.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include diff --git a/src/coreclr/src/pal/tests/palsuite/threading/Sleep/test1/Sleep.cpp b/src/coreclr/src/pal/tests/palsuite/threading/Sleep/test1/Sleep.cpp index f7f7c91730db..d08e6da20d99 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/Sleep/test1/Sleep.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/Sleep/test1/Sleep.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/Sleep/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/Sleep/test1/testinfo.dat index 433a061f2cfc..b0355f830f0e 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/Sleep/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/Sleep/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/Sleep/test2/sleep.cpp b/src/coreclr/src/pal/tests/palsuite/threading/Sleep/test2/sleep.cpp index eb30e34f2f5a..1393ce3170bd 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/Sleep/test2/sleep.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/Sleep/test2/sleep.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/Sleep/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/Sleep/test2/testinfo.dat index 433a061f2cfc..b0355f830f0e 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/Sleep/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/Sleep/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/SleepEx/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/threading/SleepEx/test1/test1.cpp index 7ccfe0ce87b6..ea82e7e9b6fa 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/SleepEx/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/SleepEx/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/SleepEx/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/SleepEx/test1/testinfo.dat index 1242768743e1..29045410a0b7 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/SleepEx/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/SleepEx/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/SleepEx/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/threading/SleepEx/test2/test2.cpp index 690acf5ce773..6365b73412c4 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/SleepEx/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/SleepEx/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/SleepEx/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/SleepEx/test2/testinfo.dat index 52f3ce0af6d9..7880c59207d7 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/SleepEx/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/SleepEx/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/SwitchToThread/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/threading/SwitchToThread/test1/test1.cpp index ce03021b9e2d..3d258d8e101a 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/SwitchToThread/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/SwitchToThread/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/SwitchToThread/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/SwitchToThread/test1/testinfo.dat index 15ee8d4d4e49..2147f4af35c5 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/SwitchToThread/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/SwitchToThread/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/TerminateProcess/test1/TerminateProcess.cpp b/src/coreclr/src/pal/tests/palsuite/threading/TerminateProcess/test1/TerminateProcess.cpp index 6feedfce7663..189f7094a1c3 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/TerminateProcess/test1/TerminateProcess.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/TerminateProcess/test1/TerminateProcess.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/TerminateProcess/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/TerminateProcess/test1/testinfo.dat index 7ee69bfa292f..fa9c848c34c2 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/TerminateProcess/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/TerminateProcess/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/ThreadPriority/test1/ThreadPriority.cpp b/src/coreclr/src/pal/tests/palsuite/threading/ThreadPriority/test1/ThreadPriority.cpp index 95bcdac52a51..b74816560da8 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/ThreadPriority/test1/ThreadPriority.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/ThreadPriority/test1/ThreadPriority.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/ThreadPriority/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/ThreadPriority/test1/testinfo.dat index 0abd9c1e0607..8decb5fd48b6 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/ThreadPriority/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/ThreadPriority/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjects/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjects/test1/test1.cpp index 8249c38d9d1c..327ca5968573 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjects/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjects/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjects/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjects/test1/testinfo.dat index 38bd350d64ab..8bd5de43087d 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjects/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjects/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test1/test1.cpp index df3233fa507a..88f3c33dfcd2 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test1/testinfo.dat index 596c4bbf329d..cfaac3da7da8 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test2/test2.cpp b/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test2/test2.cpp index ffa496dd82ff..ec27bed4897f 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test2/test2.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test2/test2.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test2/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test2/testinfo.dat index e8e781a7f2c7..b07246550250 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test2/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test2/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test3/test3.cpp b/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test3/test3.cpp index b78b0540dcfb..88ff567566cb 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test3/test3.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test3/test3.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test3/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test3/testinfo.dat index 991b93489d87..09a5127c84e4 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test3/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test3/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test4/test4.cpp b/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test4/test4.cpp index 15d0a386d1c7..c648a7c1e2ed 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test4/test4.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test4/test4.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test4/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test4/testinfo.dat index 16f3468ac2c7..a7c0264de62b 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test4/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test4/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test5/commonconsts.h b/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test5/commonconsts.h index b746616b582c..79283500546b 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test5/commonconsts.h +++ b/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test5/commonconsts.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test5/helper.cpp b/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test5/helper.cpp index caa0206a1115..9bfb85af357a 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test5/helper.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test5/helper.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test5/test5.cpp b/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test5/test5.cpp index 4d1a5ce0beed..0704fad832a0 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test5/test5.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test5/test5.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test5/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test5/testinfo.dat index 5efc75f77e17..d782113d10ad 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test5/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test5/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test6/child6.cpp b/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test6/child6.cpp index a53b6c97273e..bec5bb3f1160 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test6/child6.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test6/child6.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test6/test6.cpp b/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test6/test6.cpp index 1cec3492db12..45e8c7f04aeb 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test6/test6.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test6/test6.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/WFSOExMutexTest/WFSOExMutexTest.cpp b/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/WFSOExMutexTest/WFSOExMutexTest.cpp index f8fd7cbccc15..086a876d6e86 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/WFSOExMutexTest/WFSOExMutexTest.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/WFSOExMutexTest/WFSOExMutexTest.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/WFSOExSemaphoreTest/WFSOExSemaphoreTest.cpp b/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/WFSOExSemaphoreTest/WFSOExSemaphoreTest.cpp index d8816a7b98ac..56675cb79527 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/WFSOExSemaphoreTest/WFSOExSemaphoreTest.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/WFSOExSemaphoreTest/WFSOExSemaphoreTest.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/WFSOExThreadTest/WFSOExThreadTest.cpp b/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/WFSOExThreadTest/WFSOExThreadTest.cpp index a2c8850f7904..c1068b4f6005 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/WFSOExThreadTest/WFSOExThreadTest.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/WFSOExThreadTest/WFSOExThreadTest.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*===================================================================== ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/WFSOMutexTest/WFSOMutexTest.cpp b/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/WFSOMutexTest/WFSOMutexTest.cpp index f2537fa776b4..aa12b37dcfab 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/WFSOMutexTest/WFSOMutexTest.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/WFSOMutexTest/WFSOMutexTest.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/WFSOProcessTest/ChildProcess.cpp b/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/WFSOProcessTest/ChildProcess.cpp index 91c24d87bbcc..7bda0db956a1 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/WFSOProcessTest/ChildProcess.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/WFSOProcessTest/ChildProcess.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/WFSOProcessTest/WFSOProcessTest.cpp b/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/WFSOProcessTest/WFSOProcessTest.cpp index 2711e26c29c0..d8f550edd644 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/WFSOProcessTest/WFSOProcessTest.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/WFSOProcessTest/WFSOProcessTest.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/WFSOSemaphoreTest/WFSOSemaphoreTest.cpp b/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/WFSOSemaphoreTest/WFSOSemaphoreTest.cpp index b743b44544ac..ba032f00d37d 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/WFSOSemaphoreTest/WFSOSemaphoreTest.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/WFSOSemaphoreTest/WFSOSemaphoreTest.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/WFSOThreadTest/WFSOThreadTest.cpp b/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/WFSOThreadTest/WFSOThreadTest.cpp index e3c3fe22b7a2..da386b69a86d 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/WFSOThreadTest/WFSOThreadTest.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/WFSOThreadTest/WFSOThreadTest.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/test1/test1.cpp index 2af80df67721..0fa4a12e511a 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/test1/testinfo.dat index 89193d1c20fe..0a15d8334018 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/WaitForSingleObject/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/YieldProcessor/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/threading/YieldProcessor/test1/test1.cpp index 6adbe989c251..665bdfa89d44 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/YieldProcessor/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/YieldProcessor/test1/test1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================= ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/YieldProcessor/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/YieldProcessor/test1/testinfo.dat index 6d12110c34f3..fa1163e7c611 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/YieldProcessor/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/YieldProcessor/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/pal/tests/palsuite/threading/releasesemaphore/test1/test.cpp b/src/coreclr/src/pal/tests/palsuite/threading/releasesemaphore/test1/test.cpp index 4d736b7d9a3a..1747f1528088 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/releasesemaphore/test1/test.cpp +++ b/src/coreclr/src/pal/tests/palsuite/threading/releasesemaphore/test1/test.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================================ ** diff --git a/src/coreclr/src/pal/tests/palsuite/threading/releasesemaphore/test1/testinfo.dat b/src/coreclr/src/pal/tests/palsuite/threading/releasesemaphore/test1/testinfo.dat index b4d647a59243..5af762fd8bdb 100644 --- a/src/coreclr/src/pal/tests/palsuite/threading/releasesemaphore/test1/testinfo.dat +++ b/src/coreclr/src/pal/tests/palsuite/threading/releasesemaphore/test1/testinfo.dat @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Version = 1.0 Section = threading diff --git a/src/coreclr/src/palrt/bstr.cpp b/src/coreclr/src/palrt/bstr.cpp index bce2a364053a..2f5ccd9cd480 100644 --- a/src/coreclr/src/palrt/bstr.cpp +++ b/src/coreclr/src/palrt/bstr.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/palrt/coguid.cpp b/src/coreclr/src/palrt/coguid.cpp index d01193c40415..8a91d8fa8646 100644 --- a/src/coreclr/src/palrt/coguid.cpp +++ b/src/coreclr/src/palrt/coguid.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/palrt/comem.cpp b/src/coreclr/src/palrt/comem.cpp index 7e95a8db6dc3..bb1bdf28a5fb 100644 --- a/src/coreclr/src/palrt/comem.cpp +++ b/src/coreclr/src/palrt/comem.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/palrt/common.h b/src/coreclr/src/palrt/common.h index b61a934670d6..684c134abede 100644 --- a/src/coreclr/src/palrt/common.h +++ b/src/coreclr/src/palrt/common.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // common.h // diff --git a/src/coreclr/src/palrt/guid.cpp b/src/coreclr/src/palrt/guid.cpp index f67dbaeedcc6..68cc157d91ca 100644 --- a/src/coreclr/src/palrt/guid.cpp +++ b/src/coreclr/src/palrt/guid.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/palrt/memorystream.cpp b/src/coreclr/src/palrt/memorystream.cpp index 8afdbffefdaf..0ed06547f3bf 100644 --- a/src/coreclr/src/palrt/memorystream.cpp +++ b/src/coreclr/src/palrt/memorystream.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/palrt/path.cpp b/src/coreclr/src/palrt/path.cpp index 121ff7927360..7e0d2279f4a9 100644 --- a/src/coreclr/src/palrt/path.cpp +++ b/src/coreclr/src/palrt/path.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/palrt/shlwapip.h b/src/coreclr/src/palrt/shlwapip.h index 7076d88cc229..a34c923c346b 100644 --- a/src/coreclr/src/palrt/shlwapip.h +++ b/src/coreclr/src/palrt/shlwapip.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/palrt/unicode.cpp b/src/coreclr/src/palrt/unicode.cpp index a8460ca614f5..1d8372642ec0 100644 --- a/src/coreclr/src/palrt/unicode.cpp +++ b/src/coreclr/src/palrt/unicode.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // #include "common.h" diff --git a/src/coreclr/src/palrt/variant.cpp b/src/coreclr/src/palrt/variant.cpp index 9929425035e9..f96d1defdd10 100644 --- a/src/coreclr/src/palrt/variant.cpp +++ b/src/coreclr/src/palrt/variant.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/scripts/genDummyProvider.py b/src/coreclr/src/scripts/genDummyProvider.py index b9933dc7fce3..9b062ded09d5 100644 --- a/src/coreclr/src/scripts/genDummyProvider.py +++ b/src/coreclr/src/scripts/genDummyProvider.py @@ -1,7 +1,6 @@ ## ## Licensed to the .NET Foundation under one or more agreements. ## The .NET Foundation licenses this file to you under the MIT license. -## See the LICENSE file in the project root for more information. ## ## This script exists to create a dummy implementaion of the eventprovider ## interface from a manifest file @@ -16,7 +15,6 @@ stdprolog_cpp=""" // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /****************************************************************** diff --git a/src/coreclr/src/scripts/genEtwProvider.py b/src/coreclr/src/scripts/genEtwProvider.py index 46ab99ad379d..1a146b5fda36 100644 --- a/src/coreclr/src/scripts/genEtwProvider.py +++ b/src/coreclr/src/scripts/genEtwProvider.py @@ -1,7 +1,6 @@ ## ## Licensed to the .NET Foundation under one or more agreements. ## The .NET Foundation licenses this file to you under the MIT license. -## See the LICENSE file in the project root for more information. ## ## This script generates the interface to ETW using MC.exe @@ -35,7 +34,6 @@ stdprolog_cpp=""" // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /****************************************************************** diff --git a/src/coreclr/src/scripts/genEventPipe.py b/src/coreclr/src/scripts/genEventPipe.py index 54a9db415706..86d0dfea4a88 100644 --- a/src/coreclr/src/scripts/genEventPipe.py +++ b/src/coreclr/src/scripts/genEventPipe.py @@ -7,7 +7,6 @@ stdprolog_cpp = """// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /****************************************************************** diff --git a/src/coreclr/src/scripts/genEventing.py b/src/coreclr/src/scripts/genEventing.py index 69c96adf5a06..c591be8dc064 100644 --- a/src/coreclr/src/scripts/genEventing.py +++ b/src/coreclr/src/scripts/genEventing.py @@ -1,7 +1,6 @@ # ## Licensed to the .NET Foundation under one or more agreements. ## The .NET Foundation licenses this file to you under the MIT license. -## See the LICENSE file in the project root for more information. # # #USAGE: @@ -19,7 +18,6 @@ stdprolog=""" // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /****************************************************************** diff --git a/src/coreclr/src/scripts/genEventingTests.py b/src/coreclr/src/scripts/genEventingTests.py index 3931b2f6d817..8db53132acac 100644 --- a/src/coreclr/src/scripts/genEventingTests.py +++ b/src/coreclr/src/scripts/genEventingTests.py @@ -9,7 +9,6 @@ stdprolog=""" // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /****************************************************************** diff --git a/src/coreclr/src/scripts/genLttngProvider.py b/src/coreclr/src/scripts/genLttngProvider.py index 1ed1d2a839a2..272e51dc1d18 100644 --- a/src/coreclr/src/scripts/genLttngProvider.py +++ b/src/coreclr/src/scripts/genLttngProvider.py @@ -1,7 +1,6 @@ ## ## Licensed to the .NET Foundation under one or more agreements. ## The .NET Foundation licenses this file to you under the MIT license. -## See the LICENSE file in the project root for more information. ## ## Sample LTTng Instrumentation code that is generated: ## @@ -56,7 +55,6 @@ stdprolog=""" // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /****************************************************************** diff --git a/src/coreclr/src/scripts/genRuntimeEventSources.py b/src/coreclr/src/scripts/genRuntimeEventSources.py index 027c3eccafbd..5eaf8575ff2f 100644 --- a/src/coreclr/src/scripts/genRuntimeEventSources.py +++ b/src/coreclr/src/scripts/genRuntimeEventSources.py @@ -1,7 +1,6 @@ # ## Licensed to the .NET Foundation under one or more agreements. ## The .NET Foundation licenses this file to you under the MIT license. -## See the LICENSE file in the project root for more information. # import os @@ -12,7 +11,6 @@ generatedCodeFileHeader="""// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /********************************************************************** diff --git a/src/coreclr/src/scripts/pgocheck.py b/src/coreclr/src/scripts/pgocheck.py index fcd69b54b578..07ead80a9ab9 100644 --- a/src/coreclr/src/scripts/pgocheck.py +++ b/src/coreclr/src/scripts/pgocheck.py @@ -2,7 +2,6 @@ # ## Licensed to the .NET Foundation under one or more agreements. ## The .NET Foundation licenses this file to you under the MIT license. -## See the LICENSE file in the project root for more information. # ## # Title :pgocheck.py diff --git a/src/coreclr/src/scripts/utilities.py b/src/coreclr/src/scripts/utilities.py index 46442eed5b8a..36b827df093d 100644 --- a/src/coreclr/src/scripts/utilities.py +++ b/src/coreclr/src/scripts/utilities.py @@ -1,7 +1,6 @@ ## ## Licensed to the .NET Foundation under one or more agreements. ## The .NET Foundation licenses this file to you under the MIT license. -## See the LICENSE file in the project root for more information. ## ## This file provides utility functions to the adjacent python scripts diff --git a/src/coreclr/src/tools/Common/CommandLine/CommandLineException.cs b/src/coreclr/src/tools/Common/CommandLine/CommandLineException.cs index e51837ca944e..1c42daf007f2 100644 --- a/src/coreclr/src/tools/Common/CommandLine/CommandLineException.cs +++ b/src/coreclr/src/tools/Common/CommandLine/CommandLineException.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/CommandLine/CommandLineHelpers.cs b/src/coreclr/src/tools/Common/CommandLine/CommandLineHelpers.cs index 35618e005e53..fabb66351ed4 100644 --- a/src/coreclr/src/tools/Common/CommandLine/CommandLineHelpers.cs +++ b/src/coreclr/src/tools/Common/CommandLine/CommandLineHelpers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/Compiler/CodeGenerationFailedException.cs b/src/coreclr/src/tools/Common/Compiler/CodeGenerationFailedException.cs index b27be3de26e2..0001807c0cf4 100644 --- a/src/coreclr/src/tools/Common/Compiler/CodeGenerationFailedException.cs +++ b/src/coreclr/src/tools/Common/Compiler/CodeGenerationFailedException.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/Compiler/CompilationBuilder.cs b/src/coreclr/src/tools/Common/Compiler/CompilationBuilder.cs index fa97ad503df2..f3c9e7ef8f8f 100644 --- a/src/coreclr/src/tools/Common/Compiler/CompilationBuilder.cs +++ b/src/coreclr/src/tools/Common/Compiler/CompilationBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/Compiler/CompilationModuleGroup.cs b/src/coreclr/src/tools/Common/Compiler/CompilationModuleGroup.cs index 0182fc21b47a..a72e5c65b0db 100644 --- a/src/coreclr/src/tools/Common/Compiler/CompilationModuleGroup.cs +++ b/src/coreclr/src/tools/Common/Compiler/CompilationModuleGroup.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Internal.TypeSystem; diff --git a/src/coreclr/src/tools/Common/Compiler/CompilerTypeSystemContext.Validation.cs b/src/coreclr/src/tools/Common/Compiler/CompilerTypeSystemContext.Validation.cs index 5373708e823a..6121792073e0 100644 --- a/src/coreclr/src/tools/Common/Compiler/CompilerTypeSystemContext.Validation.cs +++ b/src/coreclr/src/tools/Common/Compiler/CompilerTypeSystemContext.Validation.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Internal.TypeSystem; diff --git a/src/coreclr/src/tools/Common/Compiler/CompilerTypeSystemContext.cs b/src/coreclr/src/tools/Common/Compiler/CompilerTypeSystemContext.cs index 1c103df45b7f..3cd92b4296e6 100644 --- a/src/coreclr/src/tools/Common/Compiler/CompilerTypeSystemContext.cs +++ b/src/coreclr/src/tools/Common/Compiler/CompilerTypeSystemContext.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/coreclr/src/tools/Common/Compiler/CoreRTNameMangler.cs b/src/coreclr/src/tools/Common/Compiler/CoreRTNameMangler.cs index 8e0f1247f4c3..2b2250f2f957 100644 --- a/src/coreclr/src/tools/Common/Compiler/CoreRTNameMangler.cs +++ b/src/coreclr/src/tools/Common/Compiler/CoreRTNameMangler.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/AssemblyStubNode.cs b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/AssemblyStubNode.cs index e0bd6d7c5cf9..b95daf56f0b4 100644 --- a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/AssemblyStubNode.cs +++ b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/AssemblyStubNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/CompilerComparer.cs b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/CompilerComparer.cs index b02ab632a5ac..632d8f55ff2b 100644 --- a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/CompilerComparer.cs +++ b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/CompilerComparer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/EmbeddedDataContainerNode.cs b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/EmbeddedDataContainerNode.cs index e219528e8ffa..da756fcd16b5 100644 --- a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/EmbeddedDataContainerNode.cs +++ b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/EmbeddedDataContainerNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Internal.TypeSystem; diff --git a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/IMethodBodyNode.cs b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/IMethodBodyNode.cs index 75d7314c9c0e..a240bbaccf21 100644 --- a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/IMethodBodyNode.cs +++ b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/IMethodBodyNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace ILCompiler.DependencyAnalysis { diff --git a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/IMethodNode.cs b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/IMethodNode.cs index 3c148c8acc3d..5a0157c97c7c 100644 --- a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/IMethodNode.cs +++ b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/IMethodNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Internal.TypeSystem; diff --git a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/INodeWithCodeInfo.cs b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/INodeWithCodeInfo.cs index c1b293b020ed..9f6d21749060 100644 --- a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/INodeWithCodeInfo.cs +++ b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/INodeWithCodeInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/INodeWithRuntimeDeterminedDependencies.cs b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/INodeWithRuntimeDeterminedDependencies.cs index 3397f798159d..301cf4d2948b 100644 --- a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/INodeWithRuntimeDeterminedDependencies.cs +++ b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/INodeWithRuntimeDeterminedDependencies.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/ISortableNode.cs b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/ISortableNode.cs index bde728a7493a..1ecdd7707cbe 100644 --- a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/ISortableNode.cs +++ b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/ISortableNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace ILCompiler.DependencyAnalysis { diff --git a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/ISymbolNode.cs b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/ISymbolNode.cs index feca8b45e2fe..a1bc6ee63def 100644 --- a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/ISymbolNode.cs +++ b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/ISymbolNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using ILCompiler.DependencyAnalysisFramework; diff --git a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/MethodReadOnlyDataNode.cs b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/MethodReadOnlyDataNode.cs index 7c1ae117056b..205266622422 100644 --- a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/MethodReadOnlyDataNode.cs +++ b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/MethodReadOnlyDataNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/ObjectAndOffsetSymbolNode.cs b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/ObjectAndOffsetSymbolNode.cs index fb6652ff3598..ab8cb36d111b 100644 --- a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/ObjectAndOffsetSymbolNode.cs +++ b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/ObjectAndOffsetSymbolNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/ObjectDataBuilder.cs b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/ObjectDataBuilder.cs index d23d102ba92d..ffc8db575bc0 100644 --- a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/ObjectDataBuilder.cs +++ b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/ObjectDataBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/ObjectNode.cs b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/ObjectNode.cs index 21490cadc31b..68b984519d27 100644 --- a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/ObjectNode.cs +++ b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/ObjectNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/ObjectNodeSection.cs b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/ObjectNodeSection.cs index 5a672f953c96..f4a6179b7f39 100644 --- a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/ObjectNodeSection.cs +++ b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/ObjectNodeSection.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Relocation.cs b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Relocation.cs index 6c38500d6856..fbb9408222ca 100644 --- a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Relocation.cs +++ b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Relocation.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/ShadowConcreteMethodNode.cs b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/ShadowConcreteMethodNode.cs index a489d68cd288..57ea2b981490 100644 --- a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/ShadowConcreteMethodNode.cs +++ b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/ShadowConcreteMethodNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/SortableDependencyNode.cs b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/SortableDependencyNode.cs index 9e1b18e9feec..ec29368b2304 100644 --- a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/SortableDependencyNode.cs +++ b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/SortableDependencyNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_ARM/ARMEmitter.cs b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_ARM/ARMEmitter.cs index 535f13fce46e..53bcb335e054 100644 --- a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_ARM/ARMEmitter.cs +++ b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_ARM/ARMEmitter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_ARM/Register.cs b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_ARM/Register.cs index 15213c752ed4..59cc4b74753f 100644 --- a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_ARM/Register.cs +++ b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_ARM/Register.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_ARM/TargetRegisterMap.cs b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_ARM/TargetRegisterMap.cs index d3940ceaaad9..73dc986c5697 100644 --- a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_ARM/TargetRegisterMap.cs +++ b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_ARM/TargetRegisterMap.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_ARM64/ARM64Emitter.cs b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_ARM64/ARM64Emitter.cs index e266aeaa3615..ee2a3c7516b0 100644 --- a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_ARM64/ARM64Emitter.cs +++ b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_ARM64/ARM64Emitter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_ARM64/AddrMode.cs b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_ARM64/AddrMode.cs index f8d757359d63..410eb8b349fa 100644 --- a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_ARM64/AddrMode.cs +++ b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_ARM64/AddrMode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_ARM64/Register.cs b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_ARM64/Register.cs index b69177e30aff..aa102c85db7a 100644 --- a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_ARM64/Register.cs +++ b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_ARM64/Register.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_ARM64/TargetRegisterMap.cs b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_ARM64/TargetRegisterMap.cs index dff6e4a837d1..ad69fdf94519 100644 --- a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_ARM64/TargetRegisterMap.cs +++ b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_ARM64/TargetRegisterMap.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X64/AddrMode.cs b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X64/AddrMode.cs index cba245601b58..c787523125fe 100644 --- a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X64/AddrMode.cs +++ b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X64/AddrMode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X64/Register.cs b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X64/Register.cs index 1bc2aa00bc08..9b88bd615952 100644 --- a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X64/Register.cs +++ b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X64/Register.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X64/TargetRegisterMap.cs b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X64/TargetRegisterMap.cs index 7d76bf5259b7..f377441b0d48 100644 --- a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X64/TargetRegisterMap.cs +++ b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X64/TargetRegisterMap.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X64/X64Emitter.cs b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X64/X64Emitter.cs index 932e5ab96dea..6d9cb57faaa5 100644 --- a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X64/X64Emitter.cs +++ b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X64/X64Emitter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X86/AddrMode.cs b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X86/AddrMode.cs index 75a5a7edabd5..b09e5a32ad15 100644 --- a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X86/AddrMode.cs +++ b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X86/AddrMode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X86/Register.cs b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X86/Register.cs index ab938c828006..e75f86e6bc37 100644 --- a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X86/Register.cs +++ b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X86/Register.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X86/TargetRegisterMap.cs b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X86/TargetRegisterMap.cs index 3b81e43ba02c..405bc57910b2 100644 --- a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X86/TargetRegisterMap.cs +++ b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X86/TargetRegisterMap.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X86/X86Emitter.cs b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X86/X86Emitter.cs index 16954470b8ac..331895db84ec 100644 --- a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X86/X86Emitter.cs +++ b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X86/X86Emitter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/coreclr/src/tools/Common/Compiler/DependencyTrackingLevel.cs b/src/coreclr/src/tools/Common/Compiler/DependencyTrackingLevel.cs index 8a2eb211fda0..65df1280a4fb 100644 --- a/src/coreclr/src/tools/Common/Compiler/DependencyTrackingLevel.cs +++ b/src/coreclr/src/tools/Common/Compiler/DependencyTrackingLevel.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/Compiler/DevirtualizationManager.cs b/src/coreclr/src/tools/Common/Compiler/DevirtualizationManager.cs index d07b6a84f186..8ac37b1b9e92 100644 --- a/src/coreclr/src/tools/Common/Compiler/DevirtualizationManager.cs +++ b/src/coreclr/src/tools/Common/Compiler/DevirtualizationManager.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Internal.TypeSystem; diff --git a/src/coreclr/src/tools/Common/Compiler/HardwareIntrinsicHelpers.cs b/src/coreclr/src/tools/Common/Compiler/HardwareIntrinsicHelpers.cs index 1481a74e77b9..f20fa1ae352b 100644 --- a/src/coreclr/src/tools/Common/Compiler/HardwareIntrinsicHelpers.cs +++ b/src/coreclr/src/tools/Common/Compiler/HardwareIntrinsicHelpers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/Compiler/ICompilationRootProvider.cs b/src/coreclr/src/tools/Common/Compiler/ICompilationRootProvider.cs index 76eeec6cabeb..cb1fbbb5927c 100644 --- a/src/coreclr/src/tools/Common/Compiler/ICompilationRootProvider.cs +++ b/src/coreclr/src/tools/Common/Compiler/ICompilationRootProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace ILCompiler { diff --git a/src/coreclr/src/tools/Common/Compiler/InstructionSetSupport.cs b/src/coreclr/src/tools/Common/Compiler/InstructionSetSupport.cs index ef17aab24ad7..c961e8af0594 100644 --- a/src/coreclr/src/tools/Common/Compiler/InstructionSetSupport.cs +++ b/src/coreclr/src/tools/Common/Compiler/InstructionSetSupport.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/Compiler/InternalCompilerErrorException.cs b/src/coreclr/src/tools/Common/Compiler/InternalCompilerErrorException.cs index 164a5f0981ec..9e5741b260df 100644 --- a/src/coreclr/src/tools/Common/Compiler/InternalCompilerErrorException.cs +++ b/src/coreclr/src/tools/Common/Compiler/InternalCompilerErrorException.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/Compiler/Logger.cs b/src/coreclr/src/tools/Common/Compiler/Logger.cs index 7861bde9464c..af2d728577c0 100644 --- a/src/coreclr/src/tools/Common/Compiler/Logger.cs +++ b/src/coreclr/src/tools/Common/Compiler/Logger.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; diff --git a/src/coreclr/src/tools/Common/Compiler/NameMangler.cs b/src/coreclr/src/tools/Common/Compiler/NameMangler.cs index 3bd959748e23..9d182290fde1 100644 --- a/src/coreclr/src/tools/Common/Compiler/NameMangler.cs +++ b/src/coreclr/src/tools/Common/Compiler/NameMangler.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Internal.Text; using Internal.TypeSystem; diff --git a/src/coreclr/src/tools/Common/Compiler/SingleMethodRootProvider.cs b/src/coreclr/src/tools/Common/Compiler/SingleMethodRootProvider.cs index 769747d13ed2..33a469347089 100644 --- a/src/coreclr/src/tools/Common/Compiler/SingleMethodRootProvider.cs +++ b/src/coreclr/src/tools/Common/Compiler/SingleMethodRootProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Internal.TypeSystem; diff --git a/src/coreclr/src/tools/Common/Compiler/TypeExtensions.cs b/src/coreclr/src/tools/Common/Compiler/TypeExtensions.cs index 86f46938e558..89fd08f3dbab 100644 --- a/src/coreclr/src/tools/Common/Compiler/TypeExtensions.cs +++ b/src/coreclr/src/tools/Common/Compiler/TypeExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Internal.IL; diff --git a/src/coreclr/src/tools/Common/Compiler/VectorFieldLayoutAlgorithm.cs b/src/coreclr/src/tools/Common/Compiler/VectorFieldLayoutAlgorithm.cs index 12ded51464c6..dd71f2772966 100644 --- a/src/coreclr/src/tools/Common/Compiler/VectorFieldLayoutAlgorithm.cs +++ b/src/coreclr/src/tools/Common/Compiler/VectorFieldLayoutAlgorithm.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Internal.TypeSystem; diff --git a/src/coreclr/src/tools/Common/Internal/NativeFormat/NativeFormat.cs b/src/coreclr/src/tools/Common/Internal/NativeFormat/NativeFormat.cs index 3c8539adcfe0..e92c689d658b 100644 --- a/src/coreclr/src/tools/Common/Internal/NativeFormat/NativeFormat.cs +++ b/src/coreclr/src/tools/Common/Internal/NativeFormat/NativeFormat.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/Internal/NativeFormat/NativeFormatWriter.Primitives.cs b/src/coreclr/src/tools/Common/Internal/NativeFormat/NativeFormatWriter.Primitives.cs index 52a917c9a9cd..82d298a60493 100644 --- a/src/coreclr/src/tools/Common/Internal/NativeFormat/NativeFormatWriter.Primitives.cs +++ b/src/coreclr/src/tools/Common/Internal/NativeFormat/NativeFormatWriter.Primitives.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/coreclr/src/tools/Common/Internal/NativeFormat/NativeFormatWriter.cs b/src/coreclr/src/tools/Common/Internal/NativeFormat/NativeFormatWriter.cs index 899fb15fc3d5..a1cd32aee48d 100644 --- a/src/coreclr/src/tools/Common/Internal/NativeFormat/NativeFormatWriter.cs +++ b/src/coreclr/src/tools/Common/Internal/NativeFormat/NativeFormatWriter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/coreclr/src/tools/Common/Internal/Runtime/CorConstants.cs b/src/coreclr/src/tools/Common/Internal/Runtime/CorConstants.cs index ef9305c315f4..0b9f35726a13 100644 --- a/src/coreclr/src/tools/Common/Internal/Runtime/CorConstants.cs +++ b/src/coreclr/src/tools/Common/Internal/Runtime/CorConstants.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/Internal/Runtime/ModuleHeaders.cs b/src/coreclr/src/tools/Common/Internal/Runtime/ModuleHeaders.cs index 57722b4f3d7b..e953a209a086 100644 --- a/src/coreclr/src/tools/Common/Internal/Runtime/ModuleHeaders.cs +++ b/src/coreclr/src/tools/Common/Internal/Runtime/ModuleHeaders.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/Internal/Runtime/ReadyToRunConstants.cs b/src/coreclr/src/tools/Common/Internal/Runtime/ReadyToRunConstants.cs index 487695ef3b42..be037341870d 100644 --- a/src/coreclr/src/tools/Common/Internal/Runtime/ReadyToRunConstants.cs +++ b/src/coreclr/src/tools/Common/Internal/Runtime/ReadyToRunConstants.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -118,6 +117,9 @@ public enum ReadyToRunFixupKind Check_InstructionSetSupport = 0x30, // Define the set of instruction sets that must be supported/unsupported to use the fixup + Verify_FieldOffset = 0x31, // Generate a runtime check to ensure that the field offset matches between compile and runtime. Unlike CheckFieldOffset, this will generate a runtime exception on failure instead of silently dropping the method + Verify_TypeLayout = 0x32, // Generate a runtime check to ensure that the type layout (size, alignment, HFA, reference map) matches between compile and runtime. Unlike Check_TypeLayout, this will generate a runtime failure instead of silently dropping the method + ModuleOverride = 0x80, // followed by sig-encoded UInt with assemblyref index into either the assemblyref // table of the MSIL metadata of the master context module for the signature or diff --git a/src/coreclr/src/tools/Common/Internal/Runtime/ReadyToRunInstructionSet.cs b/src/coreclr/src/tools/Common/Internal/Runtime/ReadyToRunInstructionSet.cs index 632b7a9d2df5..c4b646cb22d9 100644 --- a/src/coreclr/src/tools/Common/Internal/Runtime/ReadyToRunInstructionSet.cs +++ b/src/coreclr/src/tools/Common/Internal/Runtime/ReadyToRunInstructionSet.cs @@ -1,7 +1,5 @@ - // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // DO NOT EDIT THIS FILE! IT IS AUTOGENERATED // FROM /src/coreclr/src/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt @@ -36,6 +34,8 @@ public enum ReadyToRunInstructionSet Sha256=20, Atomics=21, X86Base=22, + Dp=23, + Rdm=24, } } diff --git a/src/coreclr/src/tools/Common/Internal/Runtime/ReadyToRunInstructionSetHelper.cs b/src/coreclr/src/tools/Common/Internal/Runtime/ReadyToRunInstructionSetHelper.cs index 16cf47f43d68..0a9726239b72 100644 --- a/src/coreclr/src/tools/Common/Internal/Runtime/ReadyToRunInstructionSetHelper.cs +++ b/src/coreclr/src/tools/Common/Internal/Runtime/ReadyToRunInstructionSetHelper.cs @@ -1,7 +1,5 @@ - // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // DO NOT EDIT THIS FILE! IT IS AUTOGENERATED // FROM /src/coreclr/src/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt @@ -30,10 +28,17 @@ public static class ReadyToRunInstructionSetHelper case InstructionSet.ARM64_AdvSimd: return ReadyToRunInstructionSet.AdvSimd; case InstructionSet.ARM64_AdvSimd_Arm64: return ReadyToRunInstructionSet.AdvSimd; case InstructionSet.ARM64_Aes: return ReadyToRunInstructionSet.Aes; + case InstructionSet.ARM64_Aes_Arm64: return ReadyToRunInstructionSet.Aes; case InstructionSet.ARM64_Crc32: return ReadyToRunInstructionSet.Crc32; case InstructionSet.ARM64_Crc32_Arm64: return ReadyToRunInstructionSet.Crc32; + case InstructionSet.ARM64_Dp: return ReadyToRunInstructionSet.Dp; + case InstructionSet.ARM64_Dp_Arm64: return ReadyToRunInstructionSet.Dp; + case InstructionSet.ARM64_Rdm: return ReadyToRunInstructionSet.Rdm; + case InstructionSet.ARM64_Rdm_Arm64: return ReadyToRunInstructionSet.Rdm; case InstructionSet.ARM64_Sha1: return ReadyToRunInstructionSet.Sha1; + case InstructionSet.ARM64_Sha1_Arm64: return ReadyToRunInstructionSet.Sha1; case InstructionSet.ARM64_Sha256: return ReadyToRunInstructionSet.Sha256; + case InstructionSet.ARM64_Sha256_Arm64: return ReadyToRunInstructionSet.Sha256; case InstructionSet.ARM64_Atomics: return ReadyToRunInstructionSet.Atomics; case InstructionSet.ARM64_Vector64: return null; case InstructionSet.ARM64_Vector128: return null; @@ -53,22 +58,29 @@ public static class ReadyToRunInstructionSetHelper case InstructionSet.X64_SSE2: return ReadyToRunInstructionSet.Sse2; case InstructionSet.X64_SSE2_X64: return ReadyToRunInstructionSet.Sse2; case InstructionSet.X64_SSE3: return ReadyToRunInstructionSet.Sse3; + case InstructionSet.X64_SSE3_X64: return ReadyToRunInstructionSet.Sse3; case InstructionSet.X64_SSSE3: return ReadyToRunInstructionSet.Ssse3; + case InstructionSet.X64_SSSE3_X64: return ReadyToRunInstructionSet.Ssse3; case InstructionSet.X64_SSE41: return ReadyToRunInstructionSet.Sse41; case InstructionSet.X64_SSE41_X64: return ReadyToRunInstructionSet.Sse41; case InstructionSet.X64_SSE42: return ReadyToRunInstructionSet.Sse42; case InstructionSet.X64_SSE42_X64: return ReadyToRunInstructionSet.Sse42; case InstructionSet.X64_AVX: return ReadyToRunInstructionSet.Avx; + case InstructionSet.X64_AVX_X64: return ReadyToRunInstructionSet.Avx; case InstructionSet.X64_AVX2: return ReadyToRunInstructionSet.Avx2; + case InstructionSet.X64_AVX2_X64: return ReadyToRunInstructionSet.Avx2; case InstructionSet.X64_AES: return ReadyToRunInstructionSet.Aes; + case InstructionSet.X64_AES_X64: return ReadyToRunInstructionSet.Aes; case InstructionSet.X64_BMI1: return ReadyToRunInstructionSet.Bmi1; case InstructionSet.X64_BMI1_X64: return ReadyToRunInstructionSet.Bmi1; case InstructionSet.X64_BMI2: return ReadyToRunInstructionSet.Bmi2; case InstructionSet.X64_BMI2_X64: return ReadyToRunInstructionSet.Bmi2; case InstructionSet.X64_FMA: return ReadyToRunInstructionSet.Fma; + case InstructionSet.X64_FMA_X64: return ReadyToRunInstructionSet.Fma; case InstructionSet.X64_LZCNT: return ReadyToRunInstructionSet.Lzcnt; case InstructionSet.X64_LZCNT_X64: return ReadyToRunInstructionSet.Lzcnt; case InstructionSet.X64_PCLMULQDQ: return ReadyToRunInstructionSet.Pclmulqdq; + case InstructionSet.X64_PCLMULQDQ_X64: return ReadyToRunInstructionSet.Pclmulqdq; case InstructionSet.X64_POPCNT: return ReadyToRunInstructionSet.Popcnt; case InstructionSet.X64_POPCNT_X64: return ReadyToRunInstructionSet.Popcnt; case InstructionSet.X64_Vector128: return null; diff --git a/src/coreclr/src/tools/Common/Internal/Text/Utf8String.cs b/src/coreclr/src/tools/Common/Internal/Text/Utf8String.cs index 47e701350769..cc1b045bb19a 100644 --- a/src/coreclr/src/tools/Common/Internal/Text/Utf8String.cs +++ b/src/coreclr/src/tools/Common/Internal/Text/Utf8String.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.CompilerServices; diff --git a/src/coreclr/src/tools/Common/Internal/Text/Utf8StringBuilder.cs b/src/coreclr/src/tools/Common/Internal/Text/Utf8StringBuilder.cs index 0cdd95abcd4a..a2144946a08a 100644 --- a/src/coreclr/src/tools/Common/Internal/Text/Utf8StringBuilder.cs +++ b/src/coreclr/src/tools/Common/Internal/Text/Utf8StringBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Text; diff --git a/src/coreclr/src/tools/Common/JitInterface/CorInfoBase.cs b/src/coreclr/src/tools/Common/JitInterface/CorInfoBase.cs index 54595b1d2636..67475c44629a 100644 --- a/src/coreclr/src/tools/Common/JitInterface/CorInfoBase.cs +++ b/src/coreclr/src/tools/Common/JitInterface/CorInfoBase.cs @@ -1,7 +1,5 @@ - // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // DO NOT EDIT THIS FILE! It IS AUTOGENERATED using System; @@ -148,7 +146,7 @@ unsafe partial class CorInfoImpl [UnmanagedFunctionPointerAttribute(default(CallingConvention))] delegate byte* __getHelperName(IntPtr _this, IntPtr* ppException, CorInfoHelpFunc helpFunc); [UnmanagedFunctionPointerAttribute(default(CallingConvention))] - delegate CorInfoInitClassResult __initClass(IntPtr _this, IntPtr* ppException, CORINFO_FIELD_STRUCT_* field, CORINFO_METHOD_STRUCT_* method, CORINFO_CONTEXT_STRUCT* context, [MarshalAs(UnmanagedType.Bool)]bool speculative); + delegate CorInfoInitClassResult __initClass(IntPtr _this, IntPtr* ppException, CORINFO_FIELD_STRUCT_* field, CORINFO_METHOD_STRUCT_* method, CORINFO_CONTEXT_STRUCT* context); [UnmanagedFunctionPointerAttribute(default(CallingConvention))] delegate void __classMustBeLoadedBeforeCodeIsRun(IntPtr _this, IntPtr* ppException, CORINFO_CLASS_STRUCT_* cls); [UnmanagedFunctionPointerAttribute(default(CallingConvention))] @@ -1288,12 +1286,12 @@ static void _getReadyToRunDelegateCtorHelper(IntPtr thisHandle, IntPtr* ppExcept } } - static CorInfoInitClassResult _initClass(IntPtr thisHandle, IntPtr* ppException, CORINFO_FIELD_STRUCT_* field, CORINFO_METHOD_STRUCT_* method, CORINFO_CONTEXT_STRUCT* context, [MarshalAs(UnmanagedType.Bool)]bool speculative) + static CorInfoInitClassResult _initClass(IntPtr thisHandle, IntPtr* ppException, CORINFO_FIELD_STRUCT_* field, CORINFO_METHOD_STRUCT_* method, CORINFO_CONTEXT_STRUCT* context) { var _this = GetThis(thisHandle); try { - return _this.initClass(field, method, context, speculative); + return _this.initClass(field, method, context); } catch (Exception ex) { diff --git a/src/coreclr/src/tools/Common/JitInterface/CorInfoHelpFunc.cs b/src/coreclr/src/tools/Common/JitInterface/CorInfoHelpFunc.cs index 94530e1f46d4..87fa09e0b595 100644 --- a/src/coreclr/src/tools/Common/JitInterface/CorInfoHelpFunc.cs +++ b/src/coreclr/src/tools/Common/JitInterface/CorInfoHelpFunc.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/JitInterface/CorInfoImpl.Intrinsics.cs b/src/coreclr/src/tools/Common/JitInterface/CorInfoImpl.Intrinsics.cs index 30bc7f772362..3f6c089744b2 100644 --- a/src/coreclr/src/tools/Common/JitInterface/CorInfoImpl.Intrinsics.cs +++ b/src/coreclr/src/tools/Common/JitInterface/CorInfoImpl.Intrinsics.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/coreclr/src/tools/Common/JitInterface/CorInfoImpl.cs b/src/coreclr/src/tools/Common/JitInterface/CorInfoImpl.cs index 5f1b843d6b5b..2be99788f34a 100644 --- a/src/coreclr/src/tools/Common/JitInterface/CorInfoImpl.cs +++ b/src/coreclr/src/tools/Common/JitInterface/CorInfoImpl.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -620,8 +619,18 @@ private CorInfoType asCorInfoType(TypeDesc type, CORINFO_CLASS_STRUCT_** structT return (CORINFO_CONTEXT_STRUCT*)(((ulong)ObjectToHandle(type)) | (ulong)CorInfoContextFlags.CORINFO_CONTEXTFLAGS_CLASS); } + private static CORINFO_CONTEXT_STRUCT* contextFromMethodBeingCompiled() + { + return (CORINFO_CONTEXT_STRUCT*)1; + } + private MethodDesc methodFromContext(CORINFO_CONTEXT_STRUCT* contextStruct) { + if (contextStruct == contextFromMethodBeingCompiled()) + { + return MethodBeingCompiled; + } + if (((ulong)contextStruct & (ulong)CorInfoContextFlags.CORINFO_CONTEXTFLAGS_MASK) == (ulong)CorInfoContextFlags.CORINFO_CONTEXTFLAGS_CLASS) { return null; @@ -634,18 +643,28 @@ private MethodDesc methodFromContext(CORINFO_CONTEXT_STRUCT* contextStruct) private TypeDesc typeFromContext(CORINFO_CONTEXT_STRUCT* contextStruct) { + if (contextStruct == contextFromMethodBeingCompiled()) + { + return MethodBeingCompiled.OwningType; + } + if (((ulong)contextStruct & (ulong)CorInfoContextFlags.CORINFO_CONTEXTFLAGS_MASK) == (ulong)CorInfoContextFlags.CORINFO_CONTEXTFLAGS_CLASS) { return HandleToObject((CORINFO_CLASS_STRUCT_*)((ulong)contextStruct & ~(ulong)CorInfoContextFlags.CORINFO_CONTEXTFLAGS_MASK)); } else { - return methodFromContext(contextStruct).OwningType; + return HandleToObject((CORINFO_METHOD_STRUCT_*)((ulong)contextStruct & ~(ulong)CorInfoContextFlags.CORINFO_CONTEXTFLAGS_MASK)).OwningType; } } private TypeSystemEntity entityFromContext(CORINFO_CONTEXT_STRUCT* contextStruct) { + if (contextStruct == contextFromMethodBeingCompiled()) + { + return MethodBeingCompiled.HasInstantiation ? (TypeSystemEntity)MethodBeingCompiled: (TypeSystemEntity)MethodBeingCompiled.OwningType; + } + return (TypeSystemEntity)HandleToObject((IntPtr)((ulong)contextStruct & ~(ulong)CorInfoContextFlags.CORINFO_CONTEXTFLAGS_MASK)); } @@ -990,8 +1009,17 @@ private static object ResolveTokenInScope(MethodIL methodIL, object typeOrMethod else { var methodContext = (MethodDesc)typeOrMethodContext; - Debug.Assert(methodContext.GetTypicalMethodDefinition() == owningMethod.GetTypicalMethodDefinition() || + // Allow cases where the method's do not have instantiations themselves, if + // 1. The method defining the context is generic, but the target method is not + // 2. Both methods are not generic + // 3. The methods are the same generic + // AND + // The methods are on the same type + Debug.Assert((methodContext.HasInstantiation && !owningMethod.HasInstantiation) || + (!methodContext.HasInstantiation && !owningMethod.HasInstantiation) || + methodContext.GetTypicalMethodDefinition() == owningMethod.GetTypicalMethodDefinition() || (owningMethod.Name == "CreateDefaultInstance" && methodContext.Name == "CreateInstance")); + Debug.Assert(methodContext.OwningType.HasSameTypeDefinition(owningMethod.OwningType)); typeInst = methodContext.OwningType.Instantiation; methodInst = methodContext.Instantiation; } @@ -1014,7 +1042,9 @@ private object GetRuntimeDeterminedObjectForToken(ref CORINFO_RESOLVED_TOKEN pRe // to the runtime determined form (e.g. Foo<__Canon> becomes Foo). var methodIL = (MethodIL)HandleToObject((IntPtr)pResolvedToken.tokenScope); - var typeOrMethodContext = HandleToObject((IntPtr)pResolvedToken.tokenContext); + + var typeOrMethodContext = (pResolvedToken.tokenContext == contextFromMethodBeingCompiled()) ? + MethodBeingCompiled : HandleToObject((IntPtr)pResolvedToken.tokenContext); object result = ResolveTokenInScope(methodIL, typeOrMethodContext, pResolvedToken.token); @@ -1060,7 +1090,9 @@ by resolving the token in the definition. */ private void resolveToken(ref CORINFO_RESOLVED_TOKEN pResolvedToken) { var methodIL = (MethodIL)HandleToObject((IntPtr)pResolvedToken.tokenScope); - var typeOrMethodContext = HandleToObject((IntPtr)pResolvedToken.tokenContext); + + var typeOrMethodContext = (pResolvedToken.tokenContext == contextFromMethodBeingCompiled()) ? + MethodBeingCompiled : HandleToObject((IntPtr)pResolvedToken.tokenContext); object result = ResolveTokenInScope(methodIL, typeOrMethodContext, pResolvedToken.token); @@ -1161,6 +1193,11 @@ private void findSig(CORINFO_MODULE_STRUCT_* module, uint sigTOK, CORINFO_CONTEX var methodSig = (MethodSignature)methodIL.GetObject((int)sigTOK); Get_CORINFO_SIG_INFO(methodSig, sig); + if (sig->callConv == CorInfoCallConv.CORINFO_CALLCONV_UNMANAGED) + { + throw new NotImplementedException(); + } + #if !READYTORUN // Check whether we need to report this as a fat pointer call if (_compilation.IsFatPointerCandidate(methodIL.OwningMethod, methodSig)) @@ -1618,12 +1655,12 @@ private CorInfoHelpFunc getUnBoxHelper(CORINFO_CLASS_STRUCT_* cls) return (byte*)GetPin(StringToUTF8(helpFunc.ToString())); } - private CorInfoInitClassResult initClass(CORINFO_FIELD_STRUCT_* field, CORINFO_METHOD_STRUCT_* method, CORINFO_CONTEXT_STRUCT* context, bool speculative) + private CorInfoInitClassResult initClass(CORINFO_FIELD_STRUCT_* field, CORINFO_METHOD_STRUCT_* method, CORINFO_CONTEXT_STRUCT* context) { FieldDesc fd = field == null ? null : HandleToObject(field); Debug.Assert(fd == null || fd.IsStatic); - MethodDesc md = HandleToObject(method); + MethodDesc md = method == null ? MethodBeingCompiled : HandleToObject(method); TypeDesc type = fd != null ? fd.OwningType : typeFromContext(context); if (_isFallbackBodyCompilation || @@ -1672,6 +1709,13 @@ private CorInfoInitClassResult initClass(CORINFO_FIELD_STRUCT_* field, CORINFO_M if (typeToInit.IsCanonicalSubtype(CanonicalFormKind.Any)) { + if (fd == null && method != null && context == contextFromMethodBeingCompiled()) + { + // If we're inling a call to a method in our own type, then we should already + // have triggered the .cctor when caller was itself called. + return CorInfoInitClassResult.CORINFO_INITCLASS_NOT_REQUIRED; + } + // Shared generic code has to use helper. Moreover, tell JIT not to inline since // inlining of generic dictionary lookups is not supported. return CorInfoInitClassResult.CORINFO_INITCLASS_USE_HELPER | CorInfoInitClassResult.CORINFO_INITCLASS_DONT_INLINE; @@ -1686,10 +1730,7 @@ private CorInfoInitClassResult initClass(CORINFO_FIELD_STRUCT_* field, CORINFO_M // Handled above Debug.Assert(!typeToInit.IsBeforeFieldInit); - // Note that jit has both methods the same if asking whether to emit cctor - // for a given method's code (as opposed to inlining codegen). - MethodDesc contextMethod = methodFromContext(context); - if (contextMethod != MethodBeingCompiled && typeToInit == MethodBeingCompiled.OwningType) + if (method != null && typeToInit == MethodBeingCompiled.OwningType) { // If we're inling a call to a method in our own type, then we should already // have triggered the .cctor when caller was itself called. diff --git a/src/coreclr/src/tools/Common/JitInterface/CorInfoInstructionSet.cs b/src/coreclr/src/tools/Common/JitInterface/CorInfoInstructionSet.cs index dae2003712ff..c04ffa4bd941 100644 --- a/src/coreclr/src/tools/Common/JitInterface/CorInfoInstructionSet.cs +++ b/src/coreclr/src/tools/Common/JitInterface/CorInfoInstructionSet.cs @@ -1,7 +1,5 @@ - // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // DO NOT EDIT THIS FILE! IT IS AUTOGENERATED // FROM /src/coreclr/src/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt @@ -20,17 +18,24 @@ public enum InstructionSet ILLEGAL = 0, NONE = 63, ARM64_ArmBase=1, - ARM64_ArmBase_Arm64=2, - ARM64_AdvSimd=3, - ARM64_AdvSimd_Arm64=4, - ARM64_Aes=5, - ARM64_Crc32=6, - ARM64_Crc32_Arm64=7, - ARM64_Sha1=8, - ARM64_Sha256=9, - ARM64_Atomics=10, - ARM64_Vector64=11, - ARM64_Vector128=12, + ARM64_AdvSimd=2, + ARM64_Aes=3, + ARM64_Crc32=4, + ARM64_Dp=5, + ARM64_Rdm=6, + ARM64_Sha1=7, + ARM64_Sha256=8, + ARM64_Atomics=9, + ARM64_Vector64=10, + ARM64_Vector128=11, + ARM64_ArmBase_Arm64=12, + ARM64_AdvSimd_Arm64=13, + ARM64_Aes_Arm64=14, + ARM64_Crc32_Arm64=15, + ARM64_Dp_Arm64=16, + ARM64_Rdm_Arm64=17, + ARM64_Sha1_Arm64=18, + ARM64_Sha256_Arm64=19, X64_X86Base=1, X64_SSE=2, X64_SSE2=3, @@ -50,14 +55,21 @@ public enum InstructionSet X64_Vector128=17, X64_Vector256=18, X64_X86Base_X64=19, - X64_BMI1_X64=20, - X64_BMI2_X64=21, - X64_LZCNT_X64=22, - X64_POPCNT_X64=23, - X64_SSE_X64=24, - X64_SSE2_X64=25, - X64_SSE41_X64=26, - X64_SSE42_X64=27, + X64_SSE_X64=20, + X64_SSE2_X64=21, + X64_SSE3_X64=22, + X64_SSSE3_X64=23, + X64_SSE41_X64=24, + X64_SSE42_X64=25, + X64_AVX_X64=26, + X64_AVX2_X64=27, + X64_AES_X64=28, + X64_BMI1_X64=29, + X64_BMI2_X64=30, + X64_FMA_X64=31, + X64_LZCNT_X64=32, + X64_PCLMULQDQ_X64=33, + X64_POPCNT_X64=34, X86_X86Base=1, X86_SSE=2, X86_SSE2=3, @@ -77,14 +89,21 @@ public enum InstructionSet X86_Vector128=17, X86_Vector256=18, X86_X86Base_X64=19, - X86_BMI1_X64=20, - X86_BMI2_X64=21, - X86_LZCNT_X64=22, - X86_POPCNT_X64=23, - X86_SSE_X64=24, - X86_SSE2_X64=25, - X86_SSE41_X64=26, - X86_SSE42_X64=27, + X86_SSE_X64=20, + X86_SSE2_X64=21, + X86_SSE3_X64=22, + X86_SSSE3_X64=23, + X86_SSE41_X64=24, + X86_SSE42_X64=25, + X86_AVX_X64=26, + X86_AVX2_X64=27, + X86_AES_X64=28, + X86_BMI1_X64=29, + X86_BMI2_X64=30, + X86_FMA_X64=31, + X86_LZCNT_X64=32, + X86_PCLMULQDQ_X64=33, + X86_POPCNT_X64=34, } @@ -173,16 +192,40 @@ public static InstructionSetFlags ExpandInstructionSetByImplicationHelper(Target resultflags.AddInstructionSet(InstructionSet.ARM64_AdvSimd_Arm64); if (resultflags.HasInstructionSet(InstructionSet.ARM64_AdvSimd_Arm64)) resultflags.AddInstructionSet(InstructionSet.ARM64_AdvSimd); + if (resultflags.HasInstructionSet(InstructionSet.ARM64_Aes)) + resultflags.AddInstructionSet(InstructionSet.ARM64_Aes_Arm64); + if (resultflags.HasInstructionSet(InstructionSet.ARM64_Aes_Arm64)) + resultflags.AddInstructionSet(InstructionSet.ARM64_Aes); if (resultflags.HasInstructionSet(InstructionSet.ARM64_Crc32)) resultflags.AddInstructionSet(InstructionSet.ARM64_Crc32_Arm64); if (resultflags.HasInstructionSet(InstructionSet.ARM64_Crc32_Arm64)) resultflags.AddInstructionSet(InstructionSet.ARM64_Crc32); + if (resultflags.HasInstructionSet(InstructionSet.ARM64_Dp)) + resultflags.AddInstructionSet(InstructionSet.ARM64_Dp_Arm64); + if (resultflags.HasInstructionSet(InstructionSet.ARM64_Dp_Arm64)) + resultflags.AddInstructionSet(InstructionSet.ARM64_Dp); + if (resultflags.HasInstructionSet(InstructionSet.ARM64_Rdm)) + resultflags.AddInstructionSet(InstructionSet.ARM64_Rdm_Arm64); + if (resultflags.HasInstructionSet(InstructionSet.ARM64_Rdm_Arm64)) + resultflags.AddInstructionSet(InstructionSet.ARM64_Rdm); + if (resultflags.HasInstructionSet(InstructionSet.ARM64_Sha1)) + resultflags.AddInstructionSet(InstructionSet.ARM64_Sha1_Arm64); + if (resultflags.HasInstructionSet(InstructionSet.ARM64_Sha1_Arm64)) + resultflags.AddInstructionSet(InstructionSet.ARM64_Sha1); + if (resultflags.HasInstructionSet(InstructionSet.ARM64_Sha256)) + resultflags.AddInstructionSet(InstructionSet.ARM64_Sha256_Arm64); + if (resultflags.HasInstructionSet(InstructionSet.ARM64_Sha256_Arm64)) + resultflags.AddInstructionSet(InstructionSet.ARM64_Sha256); if (resultflags.HasInstructionSet(InstructionSet.ARM64_AdvSimd)) resultflags.AddInstructionSet(InstructionSet.ARM64_ArmBase); if (resultflags.HasInstructionSet(InstructionSet.ARM64_Aes)) resultflags.AddInstructionSet(InstructionSet.ARM64_ArmBase); if (resultflags.HasInstructionSet(InstructionSet.ARM64_Crc32)) resultflags.AddInstructionSet(InstructionSet.ARM64_ArmBase); + if (resultflags.HasInstructionSet(InstructionSet.ARM64_Dp)) + resultflags.AddInstructionSet(InstructionSet.ARM64_AdvSimd); + if (resultflags.HasInstructionSet(InstructionSet.ARM64_Rdm)) + resultflags.AddInstructionSet(InstructionSet.ARM64_AdvSimd); if (resultflags.HasInstructionSet(InstructionSet.ARM64_Sha1)) resultflags.AddInstructionSet(InstructionSet.ARM64_ArmBase); if (resultflags.HasInstructionSet(InstructionSet.ARM64_Sha256)) @@ -202,6 +245,14 @@ public static InstructionSetFlags ExpandInstructionSetByImplicationHelper(Target resultflags.AddInstructionSet(InstructionSet.X64_SSE2_X64); if (resultflags.HasInstructionSet(InstructionSet.X64_SSE2_X64)) resultflags.AddInstructionSet(InstructionSet.X64_SSE2); + if (resultflags.HasInstructionSet(InstructionSet.X64_SSE3)) + resultflags.AddInstructionSet(InstructionSet.X64_SSE3_X64); + if (resultflags.HasInstructionSet(InstructionSet.X64_SSE3_X64)) + resultflags.AddInstructionSet(InstructionSet.X64_SSE3); + if (resultflags.HasInstructionSet(InstructionSet.X64_SSSE3)) + resultflags.AddInstructionSet(InstructionSet.X64_SSSE3_X64); + if (resultflags.HasInstructionSet(InstructionSet.X64_SSSE3_X64)) + resultflags.AddInstructionSet(InstructionSet.X64_SSSE3); if (resultflags.HasInstructionSet(InstructionSet.X64_SSE41)) resultflags.AddInstructionSet(InstructionSet.X64_SSE41_X64); if (resultflags.HasInstructionSet(InstructionSet.X64_SSE41_X64)) @@ -210,6 +261,18 @@ public static InstructionSetFlags ExpandInstructionSetByImplicationHelper(Target resultflags.AddInstructionSet(InstructionSet.X64_SSE42_X64); if (resultflags.HasInstructionSet(InstructionSet.X64_SSE42_X64)) resultflags.AddInstructionSet(InstructionSet.X64_SSE42); + if (resultflags.HasInstructionSet(InstructionSet.X64_AVX)) + resultflags.AddInstructionSet(InstructionSet.X64_AVX_X64); + if (resultflags.HasInstructionSet(InstructionSet.X64_AVX_X64)) + resultflags.AddInstructionSet(InstructionSet.X64_AVX); + if (resultflags.HasInstructionSet(InstructionSet.X64_AVX2)) + resultflags.AddInstructionSet(InstructionSet.X64_AVX2_X64); + if (resultflags.HasInstructionSet(InstructionSet.X64_AVX2_X64)) + resultflags.AddInstructionSet(InstructionSet.X64_AVX2); + if (resultflags.HasInstructionSet(InstructionSet.X64_AES)) + resultflags.AddInstructionSet(InstructionSet.X64_AES_X64); + if (resultflags.HasInstructionSet(InstructionSet.X64_AES_X64)) + resultflags.AddInstructionSet(InstructionSet.X64_AES); if (resultflags.HasInstructionSet(InstructionSet.X64_BMI1)) resultflags.AddInstructionSet(InstructionSet.X64_BMI1_X64); if (resultflags.HasInstructionSet(InstructionSet.X64_BMI1_X64)) @@ -218,10 +281,18 @@ public static InstructionSetFlags ExpandInstructionSetByImplicationHelper(Target resultflags.AddInstructionSet(InstructionSet.X64_BMI2_X64); if (resultflags.HasInstructionSet(InstructionSet.X64_BMI2_X64)) resultflags.AddInstructionSet(InstructionSet.X64_BMI2); + if (resultflags.HasInstructionSet(InstructionSet.X64_FMA)) + resultflags.AddInstructionSet(InstructionSet.X64_FMA_X64); + if (resultflags.HasInstructionSet(InstructionSet.X64_FMA_X64)) + resultflags.AddInstructionSet(InstructionSet.X64_FMA); if (resultflags.HasInstructionSet(InstructionSet.X64_LZCNT)) resultflags.AddInstructionSet(InstructionSet.X64_LZCNT_X64); if (resultflags.HasInstructionSet(InstructionSet.X64_LZCNT_X64)) resultflags.AddInstructionSet(InstructionSet.X64_LZCNT); + if (resultflags.HasInstructionSet(InstructionSet.X64_PCLMULQDQ)) + resultflags.AddInstructionSet(InstructionSet.X64_PCLMULQDQ_X64); + if (resultflags.HasInstructionSet(InstructionSet.X64_PCLMULQDQ_X64)) + resultflags.AddInstructionSet(InstructionSet.X64_PCLMULQDQ); if (resultflags.HasInstructionSet(InstructionSet.X64_POPCNT)) resultflags.AddInstructionSet(InstructionSet.X64_POPCNT_X64); if (resultflags.HasInstructionSet(InstructionSet.X64_POPCNT_X64)) @@ -316,14 +387,28 @@ private static InstructionSetFlags ExpandInstructionSetByReverseImplicationHelpe resultflags.AddInstructionSet(InstructionSet.ARM64_ArmBase); if (resultflags.HasInstructionSet(InstructionSet.ARM64_AdvSimd_Arm64)) resultflags.AddInstructionSet(InstructionSet.ARM64_AdvSimd); + if (resultflags.HasInstructionSet(InstructionSet.ARM64_Aes_Arm64)) + resultflags.AddInstructionSet(InstructionSet.ARM64_Aes); if (resultflags.HasInstructionSet(InstructionSet.ARM64_Crc32_Arm64)) resultflags.AddInstructionSet(InstructionSet.ARM64_Crc32); + if (resultflags.HasInstructionSet(InstructionSet.ARM64_Dp_Arm64)) + resultflags.AddInstructionSet(InstructionSet.ARM64_Dp); + if (resultflags.HasInstructionSet(InstructionSet.ARM64_Rdm_Arm64)) + resultflags.AddInstructionSet(InstructionSet.ARM64_Rdm); + if (resultflags.HasInstructionSet(InstructionSet.ARM64_Sha1_Arm64)) + resultflags.AddInstructionSet(InstructionSet.ARM64_Sha1); + if (resultflags.HasInstructionSet(InstructionSet.ARM64_Sha256_Arm64)) + resultflags.AddInstructionSet(InstructionSet.ARM64_Sha256); if (resultflags.HasInstructionSet(InstructionSet.ARM64_ArmBase)) resultflags.AddInstructionSet(InstructionSet.ARM64_AdvSimd); if (resultflags.HasInstructionSet(InstructionSet.ARM64_ArmBase)) resultflags.AddInstructionSet(InstructionSet.ARM64_Aes); if (resultflags.HasInstructionSet(InstructionSet.ARM64_ArmBase)) resultflags.AddInstructionSet(InstructionSet.ARM64_Crc32); + if (resultflags.HasInstructionSet(InstructionSet.ARM64_AdvSimd)) + resultflags.AddInstructionSet(InstructionSet.ARM64_Dp); + if (resultflags.HasInstructionSet(InstructionSet.ARM64_AdvSimd)) + resultflags.AddInstructionSet(InstructionSet.ARM64_Rdm); if (resultflags.HasInstructionSet(InstructionSet.ARM64_ArmBase)) resultflags.AddInstructionSet(InstructionSet.ARM64_Sha1); if (resultflags.HasInstructionSet(InstructionSet.ARM64_ArmBase)) @@ -337,16 +422,30 @@ private static InstructionSetFlags ExpandInstructionSetByReverseImplicationHelpe resultflags.AddInstructionSet(InstructionSet.X64_SSE); if (resultflags.HasInstructionSet(InstructionSet.X64_SSE2_X64)) resultflags.AddInstructionSet(InstructionSet.X64_SSE2); + if (resultflags.HasInstructionSet(InstructionSet.X64_SSE3_X64)) + resultflags.AddInstructionSet(InstructionSet.X64_SSE3); + if (resultflags.HasInstructionSet(InstructionSet.X64_SSSE3_X64)) + resultflags.AddInstructionSet(InstructionSet.X64_SSSE3); if (resultflags.HasInstructionSet(InstructionSet.X64_SSE41_X64)) resultflags.AddInstructionSet(InstructionSet.X64_SSE41); if (resultflags.HasInstructionSet(InstructionSet.X64_SSE42_X64)) resultflags.AddInstructionSet(InstructionSet.X64_SSE42); + if (resultflags.HasInstructionSet(InstructionSet.X64_AVX_X64)) + resultflags.AddInstructionSet(InstructionSet.X64_AVX); + if (resultflags.HasInstructionSet(InstructionSet.X64_AVX2_X64)) + resultflags.AddInstructionSet(InstructionSet.X64_AVX2); + if (resultflags.HasInstructionSet(InstructionSet.X64_AES_X64)) + resultflags.AddInstructionSet(InstructionSet.X64_AES); if (resultflags.HasInstructionSet(InstructionSet.X64_BMI1_X64)) resultflags.AddInstructionSet(InstructionSet.X64_BMI1); if (resultflags.HasInstructionSet(InstructionSet.X64_BMI2_X64)) resultflags.AddInstructionSet(InstructionSet.X64_BMI2); + if (resultflags.HasInstructionSet(InstructionSet.X64_FMA_X64)) + resultflags.AddInstructionSet(InstructionSet.X64_FMA); if (resultflags.HasInstructionSet(InstructionSet.X64_LZCNT_X64)) resultflags.AddInstructionSet(InstructionSet.X64_LZCNT); + if (resultflags.HasInstructionSet(InstructionSet.X64_PCLMULQDQ_X64)) + resultflags.AddInstructionSet(InstructionSet.X64_PCLMULQDQ); if (resultflags.HasInstructionSet(InstructionSet.X64_POPCNT_X64)) resultflags.AddInstructionSet(InstructionSet.X64_POPCNT); if (resultflags.HasInstructionSet(InstructionSet.X64_X86Base)) @@ -445,6 +544,8 @@ public static IEnumerable ArchitectureToValidInstructionSets yield return new InstructionSetInfo("neon", "AdvSimd", InstructionSet.ARM64_AdvSimd, true); yield return new InstructionSetInfo("aes", "Aes", InstructionSet.ARM64_Aes, true); yield return new InstructionSetInfo("crc", "Crc32", InstructionSet.ARM64_Crc32, true); + yield return new InstructionSetInfo("dotprod", "Dp", InstructionSet.ARM64_Dp, true); + yield return new InstructionSetInfo("rdma", "Rdm", InstructionSet.ARM64_Rdm, true); yield return new InstructionSetInfo("sha1", "Sha1", InstructionSet.ARM64_Sha1, true); yield return new InstructionSetInfo("sha2", "Sha256", InstructionSet.ARM64_Sha256, true); yield return new InstructionSetInfo("lse", "", InstructionSet.ARM64_Atomics, true); @@ -507,8 +608,18 @@ public void Set64BitInstructionSetVariants(TargetArchitecture architecture) AddInstructionSet(InstructionSet.ARM64_ArmBase_Arm64); if (HasInstructionSet(InstructionSet.ARM64_AdvSimd)) AddInstructionSet(InstructionSet.ARM64_AdvSimd_Arm64); + if (HasInstructionSet(InstructionSet.ARM64_Aes)) + AddInstructionSet(InstructionSet.ARM64_Aes_Arm64); if (HasInstructionSet(InstructionSet.ARM64_Crc32)) AddInstructionSet(InstructionSet.ARM64_Crc32_Arm64); + if (HasInstructionSet(InstructionSet.ARM64_Dp)) + AddInstructionSet(InstructionSet.ARM64_Dp_Arm64); + if (HasInstructionSet(InstructionSet.ARM64_Rdm)) + AddInstructionSet(InstructionSet.ARM64_Rdm_Arm64); + if (HasInstructionSet(InstructionSet.ARM64_Sha1)) + AddInstructionSet(InstructionSet.ARM64_Sha1_Arm64); + if (HasInstructionSet(InstructionSet.ARM64_Sha256)) + AddInstructionSet(InstructionSet.ARM64_Sha256_Arm64); break; case TargetArchitecture.X64: @@ -518,16 +629,30 @@ public void Set64BitInstructionSetVariants(TargetArchitecture architecture) AddInstructionSet(InstructionSet.X64_SSE_X64); if (HasInstructionSet(InstructionSet.X64_SSE2)) AddInstructionSet(InstructionSet.X64_SSE2_X64); + if (HasInstructionSet(InstructionSet.X64_SSE3)) + AddInstructionSet(InstructionSet.X64_SSE3_X64); + if (HasInstructionSet(InstructionSet.X64_SSSE3)) + AddInstructionSet(InstructionSet.X64_SSSE3_X64); if (HasInstructionSet(InstructionSet.X64_SSE41)) AddInstructionSet(InstructionSet.X64_SSE41_X64); if (HasInstructionSet(InstructionSet.X64_SSE42)) AddInstructionSet(InstructionSet.X64_SSE42_X64); + if (HasInstructionSet(InstructionSet.X64_AVX)) + AddInstructionSet(InstructionSet.X64_AVX_X64); + if (HasInstructionSet(InstructionSet.X64_AVX2)) + AddInstructionSet(InstructionSet.X64_AVX2_X64); + if (HasInstructionSet(InstructionSet.X64_AES)) + AddInstructionSet(InstructionSet.X64_AES_X64); if (HasInstructionSet(InstructionSet.X64_BMI1)) AddInstructionSet(InstructionSet.X64_BMI1_X64); if (HasInstructionSet(InstructionSet.X64_BMI2)) AddInstructionSet(InstructionSet.X64_BMI2_X64); + if (HasInstructionSet(InstructionSet.X64_FMA)) + AddInstructionSet(InstructionSet.X64_FMA_X64); if (HasInstructionSet(InstructionSet.X64_LZCNT)) AddInstructionSet(InstructionSet.X64_LZCNT_X64); + if (HasInstructionSet(InstructionSet.X64_PCLMULQDQ)) + AddInstructionSet(InstructionSet.X64_PCLMULQDQ_X64); if (HasInstructionSet(InstructionSet.X64_POPCNT)) AddInstructionSet(InstructionSet.X64_POPCNT_X64); break; diff --git a/src/coreclr/src/tools/Common/JitInterface/CorInfoTypes.VarInfo.cs b/src/coreclr/src/tools/Common/JitInterface/CorInfoTypes.VarInfo.cs index 671b9dd408b6..c3a5bac23671 100644 --- a/src/coreclr/src/tools/Common/JitInterface/CorInfoTypes.VarInfo.cs +++ b/src/coreclr/src/tools/Common/JitInterface/CorInfoTypes.VarInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/coreclr/src/tools/Common/JitInterface/CorInfoTypes.cs b/src/coreclr/src/tools/Common/JitInterface/CorInfoTypes.cs index ea1d607aac6c..c1a9f87533ad 100644 --- a/src/coreclr/src/tools/Common/JitInterface/CorInfoTypes.cs +++ b/src/coreclr/src/tools/Common/JitInterface/CorInfoTypes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; @@ -213,6 +212,7 @@ public enum CORINFO_RUNTIME_LOOKUP_KIND CORINFO_LOOKUP_THISOBJ, CORINFO_LOOKUP_METHODPARAM, CORINFO_LOOKUP_CLASSPARAM, + CORINFO_LOOKUP_NOT_SUPPORTED, // Returned for attempts to inline dictionary lookups } public unsafe struct CORINFO_LOOKUP_KIND @@ -350,6 +350,7 @@ public enum CorInfoCallConv CORINFO_CALLCONV_FIELD = 0x6, CORINFO_CALLCONV_LOCAL_SIG = 0x7, CORINFO_CALLCONV_PROPERTY = 0x8, + CORINFO_CALLCONV_UNMANAGED = 0x9, CORINFO_CALLCONV_NATIVEVARARG = 0xb, // used ONLY for IL stub PInvoke vararg calls CORINFO_CALLCONV_MASK = 0x0f, // Calling convention is bottom 4 bits @@ -564,9 +565,8 @@ public enum CorInfoInitClassResult CORINFO_INITCLASS_NOT_REQUIRED = 0x00, // No class initialization required, but the class is not actually initialized yet // (e.g. we are guaranteed to run the static constructor in method prolog) CORINFO_INITCLASS_INITIALIZED = 0x01, // Class initialized - CORINFO_INITCLASS_SPECULATIVE = 0x02, // Class may be initialized speculatively - CORINFO_INITCLASS_USE_HELPER = 0x04, // The JIT must insert class initialization helper call. - CORINFO_INITCLASS_DONT_INLINE = 0x08, // The JIT should not inline the method requesting the class initialization. The class + CORINFO_INITCLASS_USE_HELPER = 0x02, // The JIT must insert class initialization helper call. + CORINFO_INITCLASS_DONT_INLINE = 0x04, // The JIT should not inline the method requesting the class initialization. The class // initialization requires helper class now, but will not require initialization // if the method is compiled standalone. Or the method cannot be inlined due to some // requirement around class initialization such as shared generics. diff --git a/src/coreclr/src/tools/Common/JitInterface/JitConfigProvider.cs b/src/coreclr/src/tools/Common/JitInterface/JitConfigProvider.cs index 13044997af00..1635c5ab3fd1 100644 --- a/src/coreclr/src/tools/Common/JitInterface/JitConfigProvider.cs +++ b/src/coreclr/src/tools/Common/JitInterface/JitConfigProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/JitInterface/MemoryHelper.cs b/src/coreclr/src/tools/Common/JitInterface/MemoryHelper.cs index a9647f37fa74..ce7edb1e56be 100644 --- a/src/coreclr/src/tools/Common/JitInterface/MemoryHelper.cs +++ b/src/coreclr/src/tools/Common/JitInterface/MemoryHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/JitInterface/SystemVStructClassificator.cs b/src/coreclr/src/tools/Common/JitInterface/SystemVStructClassificator.cs index 2c54f3a8f7c7..55b8e2d1dc02 100644 --- a/src/coreclr/src/tools/Common/JitInterface/SystemVStructClassificator.cs +++ b/src/coreclr/src/tools/Common/JitInterface/SystemVStructClassificator.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; using System.Diagnostics; diff --git a/src/coreclr/src/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt b/src/coreclr/src/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt index 44a913998210..615fc9648ed5 100644 --- a/src/coreclr/src/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt +++ b/src/coreclr/src/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt @@ -16,72 +16,93 @@ ; copyinstructionsets,, ; Definition of X86 instruction sets - definearch ,X86 ,32Bit ,X64 + instructionset ,X86 ,X86Base , ,22 ,X86Base ,base instructionset ,X86 ,Sse , ,1 ,SSE ,sse -implication ,X86 ,SSE ,X86Base instructionset ,X86 ,Sse2 , ,2 ,SSE2 ,sse2 -implication ,X86 ,SSE2 ,SSE instructionset ,X86 ,Sse3 , ,3 ,SSE3 ,sse3 -implication ,X86 ,SSE3 ,SSE2 instructionset ,X86 ,Ssse3 , ,4 ,SSSE3 ,ssse3 -implication ,X86 ,SSSE3 ,SSE3 instructionset ,X86 ,Sse41 , ,5 ,SSE41 ,sse4.1 -implication ,X86 ,SSE41 ,SSSE3 instructionset ,X86 ,Sse42 , ,6 ,SSE42 ,sse4.2 -implication ,X86 ,SSE42 ,SSE41 instructionset ,X86 ,Avx , ,7 ,AVX ,avx -implication ,X86 ,AVX ,SSE42 instructionset ,X86 ,Avx2 , ,8 ,AVX2 ,avx2 -implication ,X86 ,AVX2 ,AVX instructionset ,X86 ,Aes , ,9 ,AES ,aes -implication ,X86 ,AES ,SSE2 instructionset ,X86 ,Bmi1 , ,10 ,BMI1 ,bmi -implication ,X86 ,BMI1 ,AVX instructionset ,X86 ,Bmi2 , ,11 ,BMI2 ,bmi2 -implication ,X86 ,BMI2 ,AVX instructionset ,X86 ,Fma , ,12 ,FMA ,fma -implication ,X86 ,FMA ,AVX instructionset ,X86 ,Lzcnt , ,13 ,LZCNT ,lzcnt instructionset ,X86 ,Pclmulqdq , ,14 ,PCLMULQDQ,pclmul -implication ,X86 ,PCLMULQDQ ,SSE2 instructionset ,X86 ,Popcnt , ,15 ,POPCNT ,popcnt -implication ,X86 ,POPCNT ,SSE42 instructionset ,X86 , , , ,Vector128, instructionset ,X86 , , , ,Vector256, -implication ,X86 ,Vector256 ,AVX -; Definition of X64 instruction sets (Define ) -definearch ,X64 ,64Bit ,X64 instructionset64bit,X86 ,X86Base -instructionset64bit,X86 ,BMI1 -instructionset64bit,X86 ,BMI2 -instructionset64bit,X86 ,LZCNT -instructionset64bit,X86 ,POPCNT instructionset64bit,X86 ,SSE instructionset64bit,X86 ,SSE2 +instructionset64bit,X86 ,SSE3 +instructionset64bit,X86 ,SSSE3 instructionset64bit,X86 ,SSE41 instructionset64bit,X86 ,SSE42 +instructionset64bit,X86 ,AVX +instructionset64bit,X86 ,AVX2 +instructionset64bit,X86 ,AES +instructionset64bit,X86 ,BMI1 +instructionset64bit,X86 ,BMI2 +instructionset64bit,X86 ,FMA +instructionset64bit,X86 ,LZCNT +instructionset64bit,X86 ,PCLMULQDQ +instructionset64bit,X86 ,POPCNT + +implication ,X86 ,SSE ,X86Base +implication ,X86 ,SSE2 ,SSE +implication ,X86 ,SSE3 ,SSE2 +implication ,X86 ,SSSE3 ,SSE3 +implication ,X86 ,SSE41 ,SSSE3 +implication ,X86 ,SSE42 ,SSE41 +implication ,X86 ,AVX ,SSE42 +implication ,X86 ,AVX2 ,AVX +implication ,X86 ,AES ,SSE2 +implication ,X86 ,BMI1 ,AVX +implication ,X86 ,BMI2 ,AVX +implication ,X86 ,FMA ,AVX +implication ,X86 ,PCLMULQDQ ,SSE2 +implication ,X86 ,POPCNT ,SSE42 +implication ,X86 ,Vector256 ,AVX + +; Definition of X64 instruction sets +definearch ,X64 ,64Bit ,X64 copyinstructionsets,X86 ,X64 -; Definition of the Arm64 instruction sets +; Definition of Arm64 instruction sets definearch ,ARM64 ,64Bit ,Arm64 + instructionset ,ARM64 ,ArmBase , ,16 ,ArmBase ,base -instructionset64bit,ARM64 ,ArmBase instructionset ,ARM64 ,AdvSimd , ,17 ,AdvSimd ,neon -instructionset64bit,ARM64 ,AdvSimd -implication ,ARM64 ,AdvSimd ,ArmBase instructionset ,ARM64 ,Aes , ,9 ,Aes ,aes -implication ,ARM64 ,Aes ,ArmBase instructionset ,ARM64 ,Crc32 , ,18 ,Crc32 ,crc -instructionset64bit,ARM64 ,Crc32 -implication ,ARM64 ,Crc32 ,ArmBase +instructionset ,ARM64 ,Dp , ,23 ,Dp ,dotprod +instructionset ,ARM64 ,Rdm , ,24 ,Rdm ,rdma instructionset ,ARM64 ,Sha1 , ,19 ,Sha1 ,sha1 -implication ,ARM64 ,Sha1 ,ArmBase instructionset ,ARM64 ,Sha256 , ,20 ,Sha256 ,sha2 -implication ,ARM64 ,Sha256 ,ArmBase instructionset ,ARM64 , ,Atomics ,21 ,Atomics ,lse instructionset ,ARM64 , , , ,Vector64 , instructionset ,ARM64 , , , ,Vector128, + +instructionset64bit,ARM64 ,ArmBase +instructionset64bit,ARM64 ,AdvSimd +instructionset64bit,ARM64 ,Aes +instructionset64bit,ARM64 ,Crc32 +instructionset64bit,ARM64 ,Dp +instructionset64bit,ARM64 ,Rdm +instructionset64bit,ARM64 ,Sha1 +instructionset64bit,ARM64 ,Sha256 + +implication ,ARM64 ,AdvSimd ,ArmBase +implication ,ARM64 ,Aes ,ArmBase +implication ,ARM64 ,Crc32 ,ArmBase +implication ,ARM64 ,Dp ,AdvSimd +implication ,ARM64 ,Rdm ,AdvSimd +implication ,ARM64 ,Sha1 ,ArmBase +implication ,ARM64 ,Sha256 ,ArmBase diff --git a/src/coreclr/src/tools/Common/JitInterface/ThunkGenerator/InstructionSetGenerator.cs b/src/coreclr/src/tools/Common/JitInterface/ThunkGenerator/InstructionSetGenerator.cs index ad5a2108a1c1..ae5892ddbab3 100644 --- a/src/coreclr/src/tools/Common/JitInterface/ThunkGenerator/InstructionSetGenerator.cs +++ b/src/coreclr/src/tools/Common/JitInterface/ThunkGenerator/InstructionSetGenerator.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -248,7 +247,6 @@ public void WriteManagedReadyToRunInstructionSet(TextWriter tr) tr.Write(@" // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // DO NOT EDIT THIS FILE! IT IS AUTOGENERATED // FROM /src/coreclr/src/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt @@ -279,7 +277,6 @@ public void WriteManagedReadyToRunInstructionSetHelper(TextWriter tr) tr.Write(@" // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // DO NOT EDIT THIS FILE! IT IS AUTOGENERATED // FROM /src/coreclr/src/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt @@ -344,7 +341,6 @@ public void WriteManagedJitInstructionSet(TextWriter tr) tr.Write(@" // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // DO NOT EDIT THIS FILE! IT IS AUTOGENERATED // FROM /src/coreclr/src/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt @@ -609,7 +605,6 @@ public void WriteNativeCorInfoInstructionSet(TextWriter tr) tr.Write(@" // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // DO NOT EDIT THIS FILE! IT IS AUTOGENERATED // FROM /src/coreclr/src/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt @@ -831,7 +826,6 @@ public void WriteNativeReadyToRunInstructionSet(TextWriter tr) tr.Write(@" // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // DO NOT EDIT THIS FILE! IT IS AUTOGENERATED // FROM /src/coreclr/src/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt @@ -854,4 +848,4 @@ enum ReadyToRunInstructionSet "); } } -} \ No newline at end of file +} diff --git a/src/coreclr/src/tools/Common/JitInterface/ThunkGenerator/Program.cs b/src/coreclr/src/tools/Common/JitInterface/ThunkGenerator/Program.cs index bd03d05d0187..40d651881a07 100644 --- a/src/coreclr/src/tools/Common/JitInterface/ThunkGenerator/Program.cs +++ b/src/coreclr/src/tools/Common/JitInterface/ThunkGenerator/Program.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -240,7 +239,6 @@ static void WriteManagedThunkInterface(TextWriter tr, IEnumerable tr.Write(@" // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // DO NOT EDIT THIS FILE! It IS AUTOGENERATED using System; @@ -395,7 +393,6 @@ static void WriteNativeWrapperInterface(TextWriter tw, IEnumerable tw.Write(@" // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // DO NOT EDIT THIS FILE! It IS AUTOGENERATED #include ""corinfoexception.h"" diff --git a/src/coreclr/src/tools/Common/JitInterface/ThunkGenerator/ThunkInput.txt b/src/coreclr/src/tools/Common/JitInterface/ThunkGenerator/ThunkInput.txt index 0e17908daabb..389fffc2f1ef 100644 --- a/src/coreclr/src/tools/Common/JitInterface/ThunkGenerator/ThunkInput.txt +++ b/src/coreclr/src/tools/Common/JitInterface/ThunkGenerator/ThunkInput.txt @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ; ; Thunk generator input file for generating the thunks from the C++ version of the ; jit interface to COM, into managed, and from COM to C++. @@ -231,7 +230,7 @@ FUNCTIONS bool getReadyToRunHelper(CORINFO_RESOLVED_TOKEN * pResolvedToken, CORINFO_LOOKUP_KIND * pGenericLookupKind, CorInfoHelpFunc id, CORINFO_CONST_LOOKUP *pLookup) void getReadyToRunDelegateCtorHelper(CORINFO_RESOLVED_TOKEN * pTargetMethod, CORINFO_CLASS_HANDLE delegateType, CORINFO_LOOKUP *pLookup) const char* getHelperName(CorInfoHelpFunc helpFunc) - CorInfoInitClassResult initClass(CORINFO_FIELD_HANDLE field, CORINFO_METHOD_HANDLE method, CORINFO_CONTEXT_HANDLE context, BOOL speculative) + CorInfoInitClassResult initClass(CORINFO_FIELD_HANDLE field, CORINFO_METHOD_HANDLE method, CORINFO_CONTEXT_HANDLE context) void classMustBeLoadedBeforeCodeIsRun(CORINFO_CLASS_HANDLE cls) CORINFO_CLASS_HANDLE getBuiltinClass(CorInfoClassId classId) CorInfoType getTypeForPrimitiveValueClass(CORINFO_CLASS_HANDLE cls) diff --git a/src/coreclr/src/tools/Common/JitInterface/TypeString.cs b/src/coreclr/src/tools/Common/JitInterface/TypeString.cs index 52a9dcfb9570..db6008431513 100644 --- a/src/coreclr/src/tools/Common/JitInterface/TypeString.cs +++ b/src/coreclr/src/tools/Common/JitInterface/TypeString.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Text; diff --git a/src/coreclr/src/tools/Common/JitInterface/UnboxingMethodDesc.cs b/src/coreclr/src/tools/Common/JitInterface/UnboxingMethodDesc.cs index 817e6f311677..0db82ff37eb0 100644 --- a/src/coreclr/src/tools/Common/JitInterface/UnboxingMethodDesc.cs +++ b/src/coreclr/src/tools/Common/JitInterface/UnboxingMethodDesc.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/Sorting/ArrayAccessor.cs b/src/coreclr/src/tools/Common/Sorting/ArrayAccessor.cs index 376e452b86f9..3f001d1826c9 100644 --- a/src/coreclr/src/tools/Common/Sorting/ArrayAccessor.cs +++ b/src/coreclr/src/tools/Common/Sorting/ArrayAccessor.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -35,4 +34,4 @@ public void SwapElements(T[] dataStructure, int i, int i2) dataStructure[i + 1] = temp; } } -} \ No newline at end of file +} diff --git a/src/coreclr/src/tools/Common/Sorting/ICompareAsEqualAction.cs b/src/coreclr/src/tools/Common/Sorting/ICompareAsEqualAction.cs index 8307aac4cc29..09fe5716b4fc 100644 --- a/src/coreclr/src/tools/Common/Sorting/ICompareAsEqualAction.cs +++ b/src/coreclr/src/tools/Common/Sorting/ICompareAsEqualAction.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; @@ -25,4 +24,4 @@ public void CompareAsEqual() { } } -} \ No newline at end of file +} diff --git a/src/coreclr/src/tools/Common/Sorting/ISortableDataStructureAccessor.cs b/src/coreclr/src/tools/Common/Sorting/ISortableDataStructureAccessor.cs index 8b2d1ba6e80d..e6699d4d0feb 100644 --- a/src/coreclr/src/tools/Common/Sorting/ISortableDataStructureAccessor.cs +++ b/src/coreclr/src/tools/Common/Sorting/ISortableDataStructureAccessor.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -17,4 +16,4 @@ internal interface ISortableDataStructureAccessor void Copy(T[] source, int sourceIndex, TDataStructure target, int destIndex, int length); int GetLength(TDataStructure dataStructure); } -} \ No newline at end of file +} diff --git a/src/coreclr/src/tools/Common/Sorting/ListAccessor.cs b/src/coreclr/src/tools/Common/Sorting/ListAccessor.cs index 75d97de93a8e..158718106dd9 100644 --- a/src/coreclr/src/tools/Common/Sorting/ListAccessor.cs +++ b/src/coreclr/src/tools/Common/Sorting/ListAccessor.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -44,4 +43,4 @@ public void SwapElements(List dataStructure, int i, int i2) dataStructure[i + 1] = temp; } } -} \ No newline at end of file +} diff --git a/src/coreclr/src/tools/Common/Sorting/MergeSort.cs b/src/coreclr/src/tools/Common/Sorting/MergeSort.cs index f05d32e8bf89..cbf5d1da814b 100644 --- a/src/coreclr/src/tools/Common/Sorting/MergeSort.cs +++ b/src/coreclr/src/tools/Common/Sorting/MergeSort.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/Sorting/MergeSortCore.cs b/src/coreclr/src/tools/Common/Sorting/MergeSortCore.cs index 1a204bebb0ee..6998c9973791 100644 --- a/src/coreclr/src/tools/Common/Sorting/MergeSortCore.cs +++ b/src/coreclr/src/tools/Common/Sorting/MergeSortCore.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -41,17 +40,12 @@ private static async Task ParallelSort(TDataStructure arrayToSort, int index, in TDataStructureAccessor accessor = default(TDataStructureAccessor); int halfLen = length / 2; - TaskCompletionSource rightSortComplete = new System.Threading.Tasks.TaskCompletionSource(); - _ = Task.Run(async () => - { - await ParallelSort(arrayToSort, index + halfLen, length - halfLen, comparer); - rightSortComplete.SetResult(true); - }); + Task rightSortTask = Task.Run(() => ParallelSort(arrayToSort, index + halfLen, length - halfLen, comparer)); T[] localCopyOfHalfOfArray = new T[halfLen]; accessor.Copy(arrayToSort, index, localCopyOfHalfOfArray, 0, halfLen); await MergeSortCore, TComparer, TCompareAsEqualAction>.ParallelSort(localCopyOfHalfOfArray, 0, halfLen, comparer); - await rightSortComplete.Task; + await rightSortTask; Merge(localCopyOfHalfOfArray, arrayToSort, index, halfLen, length, comparer); } } @@ -127,4 +121,4 @@ private static void Merge(T[] localCopyOfHalfOfArray, TDataStructure arrayToSort } } } -} \ No newline at end of file +} diff --git a/src/coreclr/src/tools/Common/System/Collections/Generic/ArrayBuilder.cs b/src/coreclr/src/tools/Common/System/Collections/Generic/ArrayBuilder.cs index 07548eff7ff7..8fb76479e6e8 100644 --- a/src/coreclr/src/tools/Common/System/Collections/Generic/ArrayBuilder.cs +++ b/src/coreclr/src/tools/Common/System/Collections/Generic/ArrayBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Debug = System.Diagnostics.Debug; diff --git a/src/coreclr/src/tools/Common/System/FormattingHelpers.cs b/src/coreclr/src/tools/Common/System/FormattingHelpers.cs index 62ff1152e76a..8c9bd926a364 100644 --- a/src/coreclr/src/tools/Common/System/FormattingHelpers.cs +++ b/src/coreclr/src/tools/Common/System/FormattingHelpers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Globalization; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Canon/ArrayType.Canon.cs b/src/coreclr/src/tools/Common/TypeSystem/Canon/ArrayType.Canon.cs index 20e92e0ae1f2..7deba06d193c 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Canon/ArrayType.Canon.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Canon/ArrayType.Canon.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { @@ -38,4 +37,4 @@ public override MethodDesc GetCanonMethodTarget(CanonicalFormKind kind) return ((ArrayType)canonicalizedTypeOfTargetMethod).GetArrayMethod(_kind); } } -} \ No newline at end of file +} diff --git a/src/coreclr/src/tools/Common/TypeSystem/Canon/ByRefType.Canon.cs b/src/coreclr/src/tools/Common/TypeSystem/Canon/ByRefType.Canon.cs index a0629e6c8566..97513cb08e4b 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Canon/ByRefType.Canon.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Canon/ByRefType.Canon.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { @@ -16,4 +15,4 @@ protected override TypeDesc ConvertToCanonFormImpl(CanonicalFormKind kind) return this; } } -} \ No newline at end of file +} diff --git a/src/coreclr/src/tools/Common/TypeSystem/Canon/CanonTypes.Diagnostic.cs b/src/coreclr/src/tools/Common/TypeSystem/Canon/CanonTypes.Diagnostic.cs index ea8ab87af27b..d8906a8a7dfb 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Canon/CanonTypes.Diagnostic.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Canon/CanonTypes.Diagnostic.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Canon/CanonTypes.Interop.cs b/src/coreclr/src/tools/Common/TypeSystem/Canon/CanonTypes.Interop.cs index cca6403d0c08..c5e1e39bc977 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Canon/CanonTypes.Interop.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Canon/CanonTypes.Interop.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Canon/CanonTypes.Sorting.cs b/src/coreclr/src/tools/Common/TypeSystem/Canon/CanonTypes.Sorting.cs index 0848de283cea..8f5385d2974f 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Canon/CanonTypes.Sorting.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Canon/CanonTypes.Sorting.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Debug = System.Diagnostics.Debug; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Canon/CanonTypes.cs b/src/coreclr/src/tools/Common/TypeSystem/Canon/CanonTypes.cs index 943452f96b37..b5e30caadf30 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Canon/CanonTypes.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Canon/CanonTypes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Canon/DefType.Canon.cs b/src/coreclr/src/tools/Common/TypeSystem/Canon/DefType.Canon.cs index 7e782f33717e..3d783352c180 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Canon/DefType.Canon.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Canon/DefType.Canon.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { @@ -12,4 +11,4 @@ protected override TypeDesc ConvertToCanonFormImpl(CanonicalFormKind kind) return this; } } -} \ No newline at end of file +} diff --git a/src/coreclr/src/tools/Common/TypeSystem/Canon/FunctionPointerType.Canon.cs b/src/coreclr/src/tools/Common/TypeSystem/Canon/FunctionPointerType.Canon.cs index 1a64efeb7b10..8ff4c2ee544d 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Canon/FunctionPointerType.Canon.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Canon/FunctionPointerType.Canon.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Canon/GenericParameterDesc.Canon.cs b/src/coreclr/src/tools/Common/TypeSystem/Canon/GenericParameterDesc.Canon.cs index 59f1c7311473..5883cf0a2e45 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Canon/GenericParameterDesc.Canon.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Canon/GenericParameterDesc.Canon.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Debug = System.Diagnostics.Debug; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Canon/InstantiatedMethod.Canon.cs b/src/coreclr/src/tools/Common/TypeSystem/Canon/InstantiatedMethod.Canon.cs index f77f5039ee4c..973c86f44598 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Canon/InstantiatedMethod.Canon.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Canon/InstantiatedMethod.Canon.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Debug = System.Diagnostics.Debug; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Canon/InstantiatedType.Canon.cs b/src/coreclr/src/tools/Common/TypeSystem/Canon/InstantiatedType.Canon.cs index 4049a265dc12..5bbbffc42f92 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Canon/InstantiatedType.Canon.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Canon/InstantiatedType.Canon.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { @@ -33,4 +32,4 @@ protected override TypeDesc ConvertToCanonFormImpl(CanonicalFormKind kind) return this; } } -} \ No newline at end of file +} diff --git a/src/coreclr/src/tools/Common/TypeSystem/Canon/MetadataType.Canon.cs b/src/coreclr/src/tools/Common/TypeSystem/Canon/MetadataType.Canon.cs index a8a9d97ab5c3..2d9d4d45e106 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Canon/MetadataType.Canon.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Canon/MetadataType.Canon.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { @@ -12,4 +11,4 @@ public override bool IsCanonicalSubtype(CanonicalFormKind policy) return false; } } -} \ No newline at end of file +} diff --git a/src/coreclr/src/tools/Common/TypeSystem/Canon/MethodDelegator.Canon.cs b/src/coreclr/src/tools/Common/TypeSystem/Canon/MethodDelegator.Canon.cs index 9cc3a22040ef..9b89c40353e0 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Canon/MethodDelegator.Canon.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Canon/MethodDelegator.Canon.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Canon/MethodDesc.Canon.cs b/src/coreclr/src/tools/Common/TypeSystem/Canon/MethodDesc.Canon.cs index 3714346d73f6..0189311657e5 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Canon/MethodDesc.Canon.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Canon/MethodDesc.Canon.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Canon/MethodForInstantiatedType.Canon.cs b/src/coreclr/src/tools/Common/TypeSystem/Canon/MethodForInstantiatedType.Canon.cs index abb49e6f5d77..ec81730a0a87 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Canon/MethodForInstantiatedType.Canon.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Canon/MethodForInstantiatedType.Canon.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Canon/ParameterizedType.Canon.cs b/src/coreclr/src/tools/Common/TypeSystem/Canon/ParameterizedType.Canon.cs index ad386bb04d13..a66eeb39d88f 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Canon/ParameterizedType.Canon.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Canon/ParameterizedType.Canon.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { @@ -12,4 +11,4 @@ public sealed override bool IsCanonicalSubtype(CanonicalFormKind policy) return ParameterType.IsCanonicalSubtype(policy); } } -} \ No newline at end of file +} diff --git a/src/coreclr/src/tools/Common/TypeSystem/Canon/PointerType.Canon.cs b/src/coreclr/src/tools/Common/TypeSystem/Canon/PointerType.Canon.cs index ce4c96d5d006..28e35a96a2c7 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Canon/PointerType.Canon.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Canon/PointerType.Canon.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { @@ -16,4 +15,4 @@ protected override TypeDesc ConvertToCanonFormImpl(CanonicalFormKind kind) return this; } } -} \ No newline at end of file +} diff --git a/src/coreclr/src/tools/Common/TypeSystem/Canon/SignatureVariable.Canon.cs b/src/coreclr/src/tools/Common/TypeSystem/Canon/SignatureVariable.Canon.cs index 381d92db189e..2e76e9eed067 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Canon/SignatureVariable.Canon.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Canon/SignatureVariable.Canon.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Debug = System.Diagnostics.Debug; @@ -37,4 +36,4 @@ protected override TypeDesc ConvertToCanonFormImpl(CanonicalFormKind kind) return this; } } -} \ No newline at end of file +} diff --git a/src/coreclr/src/tools/Common/TypeSystem/Canon/StandardCanonicalizationAlgorithm.cs b/src/coreclr/src/tools/Common/TypeSystem/Canon/StandardCanonicalizationAlgorithm.cs index 04579bc1aef1..ed0f4123dad5 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Canon/StandardCanonicalizationAlgorithm.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Canon/StandardCanonicalizationAlgorithm.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Debug = System.Diagnostics.Debug; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Canon/TypeDesc.Canon.cs b/src/coreclr/src/tools/Common/TypeSystem/Canon/TypeDesc.Canon.cs index 690369ab27ae..c87408e652d4 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Canon/TypeDesc.Canon.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Canon/TypeDesc.Canon.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Debug = System.Diagnostics.Debug; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Canon/TypeSystemContext.Canon.cs b/src/coreclr/src/tools/Common/TypeSystem/Canon/TypeSystemContext.Canon.cs index 268bf73b7f60..5da631b5968b 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Canon/TypeSystemContext.Canon.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Canon/TypeSystemContext.Canon.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/TypeSystem/CodeGen/FieldDesc.CodeGen.cs b/src/coreclr/src/tools/Common/TypeSystem/CodeGen/FieldDesc.CodeGen.cs index 1fd5ea231f02..43f05e4d85f2 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/CodeGen/FieldDesc.CodeGen.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/CodeGen/FieldDesc.CodeGen.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/CodeGen/MethodDelegator.CodeGen.cs b/src/coreclr/src/tools/Common/TypeSystem/CodeGen/MethodDelegator.CodeGen.cs index afee75c16361..41425033e5bc 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/CodeGen/MethodDelegator.CodeGen.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/CodeGen/MethodDelegator.CodeGen.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/CodeGen/MethodDesc.CodeGen.cs b/src/coreclr/src/tools/Common/TypeSystem/CodeGen/MethodDesc.CodeGen.cs index b15a81d9c3cb..6b49acaaa23f 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/CodeGen/MethodDesc.CodeGen.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/CodeGen/MethodDesc.CodeGen.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/CodeGen/TargetDetails.CodeGen.cs b/src/coreclr/src/tools/Common/TypeSystem/CodeGen/TargetDetails.CodeGen.cs index 311f7488dd59..f24974c811b7 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/CodeGen/TargetDetails.CodeGen.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/CodeGen/TargetDetails.CodeGen.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/CodeGen/TypeDesc.CodeGen.cs b/src/coreclr/src/tools/Common/TypeSystem/CodeGen/TypeDesc.CodeGen.cs index 9a5a1c8b289d..eb15a3681d5a 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/CodeGen/TypeDesc.CodeGen.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/CodeGen/TypeDesc.CodeGen.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/AlignmentHelper.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/AlignmentHelper.cs index 7678cd58b81f..2e30c481271d 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/AlignmentHelper.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/AlignmentHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Debug = System.Diagnostics.Debug; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/ArrayMethod.Diagnostic.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/ArrayMethod.Diagnostic.cs index 4da118caeab0..1f6e06709ae4 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/ArrayMethod.Diagnostic.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/ArrayMethod.Diagnostic.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/ArrayOfTRuntimeInterfacesAlgorithm.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/ArrayOfTRuntimeInterfacesAlgorithm.cs new file mode 100644 index 000000000000..68e6371d89e6 --- /dev/null +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/ArrayOfTRuntimeInterfacesAlgorithm.cs @@ -0,0 +1,38 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using Debug = System.Diagnostics.Debug; + +namespace Internal.TypeSystem +{ + /// + /// RuntimeInterfaces algorithm for for array types which are similar to a generic type + /// + public sealed class ArrayOfTRuntimeInterfacesAlgorithm : RuntimeInterfacesAlgorithm + { + /// + /// Open type to instantiate to get the interfaces associated with an array. + /// + private MetadataType _arrayOfTType; + + /// + /// RuntimeInterfaces algorithm for for array types which are similar to a generic type + /// + /// Open type to instantiate to get the interfaces associated with an array. + public ArrayOfTRuntimeInterfacesAlgorithm(MetadataType arrayOfTType) + { + _arrayOfTType = arrayOfTType; + Debug.Assert(!(arrayOfTType is InstantiatedType)); + } + + public override DefType[] ComputeRuntimeInterfaces(TypeDesc _type) + { + ArrayType arrayType = (ArrayType)_type; + Debug.Assert(arrayType.IsSzArray); + TypeDesc arrayOfTInstantiation = _arrayOfTType.MakeInstantiatedType(arrayType.ElementType); + + return arrayOfTInstantiation.RuntimeInterfaces; + } + } +} diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/ArrayType.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/ArrayType.cs index 206f8c2ffb54..55b0c49b429a 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/ArrayType.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/ArrayType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/BaseTypeRuntimeInterfacesAlgorithm.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/BaseTypeRuntimeInterfacesAlgorithm.cs index 8f814cfb5947..41ff1102a8ed 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/BaseTypeRuntimeInterfacesAlgorithm.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/BaseTypeRuntimeInterfacesAlgorithm.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Debug = System.Diagnostics.Debug; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/ByRefType.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/ByRefType.cs index 6d198459452d..4bb3e351a016 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/ByRefType.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/ByRefType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/CastingHelper.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/CastingHelper.cs index 3ffb2c69df36..d10a2dc0fec2 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/CastingHelper.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/CastingHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/ConstructedTypeRewritingHelpers.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/ConstructedTypeRewritingHelpers.cs new file mode 100644 index 000000000000..2bf083f8525d --- /dev/null +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/ConstructedTypeRewritingHelpers.cs @@ -0,0 +1,208 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Collections.Generic; +using System.Diagnostics; + +namespace Internal.TypeSystem +{ + public static class ConstructedTypeRewritingHelpers + { + /// + /// Determine if the construction of a type contains one of a given set of types. This is a deep + /// scan. For instance, given type MyType<SomeGeneric<int[]>>, and a set of typesToFind + /// that includes int, this function will return true. Does not detect the open generics that may be + /// instantiated over in this type. IsConstructedOverType would return false if only passed MyType, + /// or SomeGeneric for the above examplt. + /// + /// type to examine + /// types to search for in the construction of type + /// true if a type in typesToFind is found + public static bool IsConstructedOverType(this TypeDesc type, TypeDesc[] typesToFind) + { + int directDiscoveryIndex = Array.IndexOf(typesToFind, type); + + if (directDiscoveryIndex != -1) + return true; + + if (type.HasInstantiation) + { + for (int instantiationIndex = 0; instantiationIndex < type.Instantiation.Length; instantiationIndex++) + { + if (type.Instantiation[instantiationIndex].IsConstructedOverType(typesToFind)) + { + return true; + } + } + } + else if (type.IsParameterizedType) + { + ParameterizedType parameterizedType = (ParameterizedType)type; + return parameterizedType.ParameterType.IsConstructedOverType(typesToFind); + } + else if (type.IsFunctionPointer) + { + MethodSignature functionPointerSignature = ((FunctionPointerType)type).Signature; + if (functionPointerSignature.ReturnType.IsConstructedOverType(typesToFind)) + return true; + + for (int paramIndex = 0; paramIndex < functionPointerSignature.Length; paramIndex++) + { + if (functionPointerSignature[paramIndex].IsConstructedOverType(typesToFind)) + return true; + } + } + + return false; + } + + /// + /// Replace some of the types in a type's construction with a new set of types. This function does not + /// support any situation where there is an instantiated generic that is not represented by an + /// InstantiatedType. Does not replace the open generics that may be instantiated over in this type. + /// + /// For instance, Given MyType<object, int[]>, + /// an array of types to replace such as {int,object}, and + /// an array of replacement types such as {string,__Canon}. + /// The result shall be MyType<__Canon, string[]> + /// + /// This function cannot be used to replace MyType in the above example. + /// + public static TypeDesc ReplaceTypesInConstructionOfType(this TypeDesc type, TypeDesc[] typesToReplace, TypeDesc[] replacementTypes) + { + int directReplacementIndex = Array.IndexOf(typesToReplace, type); + + if (directReplacementIndex != -1) + return replacementTypes[directReplacementIndex]; + + if (type.HasInstantiation) + { + TypeDesc[] newInstantiation = null; + Debug.Assert(type is InstantiatedType); + int instantiationIndex = 0; + for (; instantiationIndex < type.Instantiation.Length; instantiationIndex++) + { + TypeDesc oldType = type.Instantiation[instantiationIndex]; + TypeDesc newType = oldType.ReplaceTypesInConstructionOfType(typesToReplace, replacementTypes); + if ((oldType != newType) || (newInstantiation != null)) + { + if (newInstantiation == null) + { + newInstantiation = new TypeDesc[type.Instantiation.Length]; + for (int i = 0; i < instantiationIndex; i++) + newInstantiation[i] = type.Instantiation[i]; + } + newInstantiation[instantiationIndex] = newType; + } + } + if (newInstantiation != null) + return type.Context.GetInstantiatedType((MetadataType)type.GetTypeDefinition(), new Instantiation(newInstantiation)); + } + else if (type.IsParameterizedType) + { + ParameterizedType parameterizedType = (ParameterizedType)type; + TypeDesc oldParameter = parameterizedType.ParameterType; + TypeDesc newParameter = oldParameter.ReplaceTypesInConstructionOfType(typesToReplace, replacementTypes); + if (oldParameter != newParameter) + { + if (type.IsArray) + { + ArrayType arrayType = (ArrayType)type; + if (arrayType.IsSzArray) + return type.Context.GetArrayType(newParameter); + else + return type.Context.GetArrayType(newParameter, arrayType.Rank); + } + else if (type.IsPointer) + { + return type.Context.GetPointerType(newParameter); + } + else if (type.IsByRef) + { + return type.Context.GetByRefType(newParameter); + } + Debug.Fail("Unknown form of type"); + } + } + else if (type.IsFunctionPointer) + { + MethodSignature oldSig = ((FunctionPointerType)type).Signature; + MethodSignatureBuilder sigBuilder = new MethodSignatureBuilder(oldSig); + sigBuilder.ReturnType = oldSig.ReturnType.ReplaceTypesInConstructionOfType(typesToReplace, replacementTypes); + for (int paramIndex = 0; paramIndex < oldSig.Length; paramIndex++) + sigBuilder[paramIndex] = oldSig[paramIndex].ReplaceTypesInConstructionOfType(typesToReplace, replacementTypes); + + MethodSignature newSig = sigBuilder.ToSignature(); + if (newSig != oldSig) + return type.Context.GetFunctionPointerType(newSig); + } + + return type; + } + + /// + /// Replace some of the types in a method's construction with a new set of types. + /// Does not replace the open generics that may be instantiated over in this type. + /// + /// For instance, Given MyType<object, int[]>.Function<short>(), + /// an array of types to replace such as {int,short}, and + /// an array of replacement types such as {string,char}. + /// The result shall be MyType<object, string[]>.Function<char> + /// + /// This function cannot be used to replace MyType in the above example. + /// + public static MethodDesc ReplaceTypesInConstructionOfMethod(this MethodDesc method, TypeDesc[] typesToReplace, TypeDesc[] replacementTypes) + { + TypeDesc newOwningType = method.OwningType.ReplaceTypesInConstructionOfType(typesToReplace, replacementTypes); + MethodDesc methodOnOwningType = null; + bool owningTypeChanged = false; + if (newOwningType == method.OwningType) + { + methodOnOwningType = method.GetMethodDefinition(); + } + else + { + methodOnOwningType = TypeSystemHelpers.FindMethodOnExactTypeWithMatchingTypicalMethod(newOwningType, method); + owningTypeChanged = true; + } + + MethodDesc result; + if (!method.HasInstantiation) + { + result = methodOnOwningType; + } + else + { + Debug.Assert(method is InstantiatedMethod); + + TypeDesc[] newInstantiation = null; + int instantiationIndex = 0; + for (; instantiationIndex < method.Instantiation.Length; instantiationIndex++) + { + TypeDesc oldType = method.Instantiation[instantiationIndex]; + TypeDesc newType = oldType.ReplaceTypesInConstructionOfType(typesToReplace, replacementTypes); + if ((oldType != newType) || (newInstantiation != null)) + { + if (newInstantiation == null) + { + newInstantiation = new TypeDesc[method.Instantiation.Length]; + for (int i = 0; i < instantiationIndex; i++) + newInstantiation[i] = method.Instantiation[i]; + } + newInstantiation[instantiationIndex] = newType; + } + } + + if (newInstantiation != null) + result = method.Context.GetInstantiatedMethod(methodOnOwningType, new Instantiation(newInstantiation)); + else if (owningTypeChanged) + result = method.Context.GetInstantiatedMethod(methodOnOwningType, method.Instantiation); + else + result = method; + } + + return result; + } + } +} diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/DefType.Diagnostic.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/DefType.Diagnostic.cs index 8ef92715ab33..26685ff43b2f 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/DefType.Diagnostic.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/DefType.Diagnostic.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/DefType.Dummy.Diagnostic.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/DefType.Dummy.Diagnostic.cs index b852b1b33794..e77d7f5acf66 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/DefType.Dummy.Diagnostic.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/DefType.Dummy.Diagnostic.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/DefType.FieldLayout.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/DefType.FieldLayout.cs index cd7f45d7f4ce..6c9c2b22e5cf 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/DefType.FieldLayout.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/DefType.FieldLayout.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/DefType.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/DefType.cs index fb1cf075c914..06ee99e9d74e 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/DefType.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/DefType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/ExceptionStringID.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/ExceptionStringID.cs index d510e7933f71..00286eabe3a9 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/ExceptionStringID.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/ExceptionStringID.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/ExplicitLayoutValidator.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/ExplicitLayoutValidator.cs index 9e7c4c6f908d..9066f54c04cb 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/ExplicitLayoutValidator.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/ExplicitLayoutValidator.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/FieldDesc.FieldLayout.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/FieldDesc.FieldLayout.cs index 4452e8d6ee79..2d8daed2caf1 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/FieldDesc.FieldLayout.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/FieldDesc.FieldLayout.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/FieldDesc.ToString.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/FieldDesc.ToString.cs index 29cea11d53ec..cde79093f286 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/FieldDesc.ToString.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/FieldDesc.ToString.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/FieldDesc.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/FieldDesc.cs index be2d81bd563e..41536c5189fa 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/FieldDesc.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/FieldDesc.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.CompilerServices; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/FieldForInstantiatedType.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/FieldForInstantiatedType.cs index 5fac11614482..b51d55660a68 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/FieldForInstantiatedType.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/FieldForInstantiatedType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/FieldLayoutAlgorithm.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/FieldLayoutAlgorithm.cs index d43eb0039099..cff8364566b2 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/FieldLayoutAlgorithm.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/FieldLayoutAlgorithm.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/FunctionPointerType.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/FunctionPointerType.cs index 523b105d0fa9..1328e3c040d4 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/FunctionPointerType.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/FunctionPointerType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Text; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/GenericParameterDesc.Diagnostic.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/GenericParameterDesc.Diagnostic.cs index f78dc80fa6a8..8af919396681 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/GenericParameterDesc.Diagnostic.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/GenericParameterDesc.Diagnostic.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/GenericParameterDesc.Dummy.Diagnostic.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/GenericParameterDesc.Dummy.Diagnostic.cs index 8c6d62dcbd61..31ed2e975f18 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/GenericParameterDesc.Dummy.Diagnostic.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/GenericParameterDesc.Dummy.Diagnostic.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/GenericParameterDesc.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/GenericParameterDesc.cs index 4eff6c6cbc5d..5615efc256b6 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/GenericParameterDesc.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/GenericParameterDesc.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/IAssemblyDesc.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/IAssemblyDesc.cs index e9db5b76e92e..be0f346f391d 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/IAssemblyDesc.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/IAssemblyDesc.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Reflection; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/IModuleResolver.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/IModuleResolver.cs index eccacb2a2d57..0acc7ee8b9e1 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/IModuleResolver.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/IModuleResolver.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Reflection; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/InstantiatedMethod.Diagnostic.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/InstantiatedMethod.Diagnostic.cs index c33020e88e17..df6f64a630c0 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/InstantiatedMethod.Diagnostic.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/InstantiatedMethod.Diagnostic.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/InstantiatedMethod.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/InstantiatedMethod.cs index f73366c0a54a..9105c566534c 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/InstantiatedMethod.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/InstantiatedMethod.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/InstantiatedType.Diagnostic.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/InstantiatedType.Diagnostic.cs index 5490cf1dc62f..d4092ae3e64e 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/InstantiatedType.Diagnostic.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/InstantiatedType.Diagnostic.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/InstantiatedType.Interfaces.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/InstantiatedType.Interfaces.cs index a51056923fe9..33d38d0bf320 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/InstantiatedType.Interfaces.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/InstantiatedType.Interfaces.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Debug = System.Diagnostics.Debug; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/InstantiatedType.MethodImpls.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/InstantiatedType.MethodImpls.cs index 474ac1a6ae34..6002edbdb23d 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/InstantiatedType.MethodImpls.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/InstantiatedType.MethodImpls.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/InstantiatedType.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/InstantiatedType.cs index a777f223f091..90267a4c53bf 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/InstantiatedType.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/InstantiatedType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -146,9 +145,9 @@ public override IEnumerable GetMethods() } // TODO: Substitutions, generics, modopts, ... - public override MethodDesc GetMethod(string name, MethodSignature signature) + public override MethodDesc GetMethod(string name, MethodSignature signature, Instantiation substitution) { - MethodDesc typicalMethodDef = _typeDef.GetMethod(name, signature); + MethodDesc typicalMethodDef = _typeDef.GetMethod(name, signature, substitution); if (typicalMethodDef == null) return null; return _typeDef.Context.GetMethodForInstantiatedType(typicalMethodDef, this); diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/Instantiation.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/Instantiation.cs index d403f0c9bdb7..f0e3588c6577 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/Instantiation.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/Instantiation.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.CompilerServices; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/LayoutInt.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/LayoutInt.cs index 331bdec0f4f1..461d74133808 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/LayoutInt.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/LayoutInt.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/LinqPoison.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/LinqPoison.cs index 58e9649c1185..ce2675fa2b1d 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/LinqPoison.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/LinqPoison.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/LocalVariableDefinition.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/LocalVariableDefinition.cs index 95f978a49d92..65546eb8a94c 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/LocalVariableDefinition.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/LocalVariableDefinition.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataFieldLayoutAlgorithm.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataFieldLayoutAlgorithm.cs index 4c7c5cfb6c59..abbb1db11af6 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataFieldLayoutAlgorithm.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataFieldLayoutAlgorithm.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -65,7 +64,7 @@ public override ComputedInstanceFieldLayout ComputeInstanceLayout(DefType defTyp // CLI - Partition 2, section 22.8 // A type has layout if it is marked SequentialLayout or ExplicitLayout. If any type within an inheritance chain has layout, - // then so shall all its base classes, up to the one that descends immediately from System.ValueType (if it exists in the type’s + // then so shall all its base classes, up to the one that descends immediately from System.ValueType (if it exists in the type's // hierarchy); otherwise, from System.Object // Note: While the CLI isn't clearly worded, the layout needs to be the same for the entire chain. // If the current type isn't ValueType or System.Object and has a layout and the parent type isn't @@ -103,6 +102,7 @@ public override ComputedInstanceFieldLayout ComputeInstanceLayout(DefType defTyp type, type.Context.Target.GetWellKnownTypeSize(type), type.Context.Target.GetWellKnownTypeAlignment(type), + 0, out instanceByteSizeAndAlignment ); @@ -358,13 +358,8 @@ protected static ComputedInstanceFieldLayout ComputeExplicitFieldLayout(Metadata fieldOrdinal++; } - if (type.IsValueType) - { - instanceSize = LayoutInt.Max(new LayoutInt(layoutMetadata.Size), instanceSize); - } - SizeAndAlignment instanceByteSizeAndAlignment; - var instanceSizeAndAlignment = ComputeInstanceSize(type, instanceSize, largestAlignmentRequired, out instanceByteSizeAndAlignment); + var instanceSizeAndAlignment = ComputeInstanceSize(type, instanceSize, largestAlignmentRequired, layoutMetadata.Size, out instanceByteSizeAndAlignment); ComputedInstanceFieldLayout computedLayout = new ComputedInstanceFieldLayout(); computedLayout.FieldAlignment = instanceSizeAndAlignment.Alignment; @@ -407,13 +402,8 @@ protected static ComputedInstanceFieldLayout ComputeSequentialFieldLayout(Metada fieldOrdinal++; } - if (type.IsValueType) - { - cumulativeInstanceFieldPos = LayoutInt.Max(cumulativeInstanceFieldPos, new LayoutInt(layoutMetadata.Size)); - } - SizeAndAlignment instanceByteSizeAndAlignment; - var instanceSizeAndAlignment = ComputeInstanceSize(type, cumulativeInstanceFieldPos, largestAlignmentRequirement, out instanceByteSizeAndAlignment); + var instanceSizeAndAlignment = ComputeInstanceSize(type, cumulativeInstanceFieldPos, largestAlignmentRequirement, layoutMetadata.Size, out instanceByteSizeAndAlignment); ComputedInstanceFieldLayout computedLayout = new ComputedInstanceFieldLayout(); computedLayout.FieldAlignment = instanceSizeAndAlignment.Alignment; @@ -675,7 +665,7 @@ protected ComputedInstanceFieldLayout ComputeAutoFieldLayout(MetadataType type, } SizeAndAlignment instanceByteSizeAndAlignment; - var instanceSizeAndAlignment = ComputeInstanceSize(type, cumulativeInstanceFieldPos, minAlign, out instanceByteSizeAndAlignment); + var instanceSizeAndAlignment = ComputeInstanceSize(type, cumulativeInstanceFieldPos, minAlign, 0/* specified field size unused */, out instanceByteSizeAndAlignment); ComputedInstanceFieldLayout computedLayout = new ComputedInstanceFieldLayout(); computedLayout.FieldAlignment = instanceSizeAndAlignment.Alignment; @@ -788,21 +778,40 @@ private static int ComputePackingSize(MetadataType type, ClassLayoutMetadata lay return layoutMetadata.PackingSize; } - private static SizeAndAlignment ComputeInstanceSize(MetadataType type, LayoutInt instanceSize, LayoutInt alignment, out SizeAndAlignment byteCount) + private static SizeAndAlignment ComputeInstanceSize(MetadataType type, LayoutInt instanceSize, LayoutInt alignment, int classLayoutSize, out SizeAndAlignment byteCount) { SizeAndAlignment result; - - TargetDetails target = type.Context.Target; - + // Pad the length of structs to be 1 if they are empty so we have no zero-length structures if (type.IsValueType && instanceSize == LayoutInt.Zero) { instanceSize = LayoutInt.One; } + TargetDetails target = type.Context.Target; + + if (classLayoutSize != 0) + { + LayoutInt parentSize; + if (type.IsValueType) + parentSize = new LayoutInt(0); + else + parentSize = type.BaseType.InstanceByteCountUnaligned; + + LayoutInt specifiedInstanceSize = parentSize + new LayoutInt(classLayoutSize); + + instanceSize = LayoutInt.Max(specifiedInstanceSize, instanceSize); + } + else + { + if (type.IsValueType) + { + instanceSize = LayoutInt.AlignUp(instanceSize, alignment, target); + } + } + if (type.IsValueType) { - instanceSize = LayoutInt.AlignUp(instanceSize, alignment, target); result.Size = instanceSize; result.Alignment = alignment; } diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataRuntimeInterfacesAlgorithm.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataRuntimeInterfacesAlgorithm.cs index 2c5d4789afce..02b94121e52e 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataRuntimeInterfacesAlgorithm.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataRuntimeInterfacesAlgorithm.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataType.Interfaces.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataType.Interfaces.cs index e6fd004d9324..011a16b301a0 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataType.Interfaces.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataType.Interfaces.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Debug = System.Diagnostics.Debug; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataType.MethodImpls.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataType.MethodImpls.cs index 74ec106694eb..67a6ca012c3d 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataType.MethodImpls.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataType.MethodImpls.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataType.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataType.cs index 9fe484c9a015..061fca6790c9 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataType.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataTypeSystemContext.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataTypeSystemContext.cs index 88b003815278..c993b59dea13 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataTypeSystemContext.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataTypeSystemContext.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Debug = System.Diagnostics.Debug; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataVirtualMethodAlgorithm.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataVirtualMethodAlgorithm.cs index da8b2bc27b09..c2554217ea51 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataVirtualMethodAlgorithm.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataVirtualMethodAlgorithm.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -576,7 +575,7 @@ public override MethodDesc ResolveVariantInterfaceMethodToVirtualMethodOnType(Me // Interface function resolution follows the following rules // 1. Apply any method impl that may exist, if once of these exists, resolve to target immediately. // 2. If an interface is explicitly defined on a type, then attempt to perform a namesig match on the - // current type to resolve.If the interface isn’t resolved, if it isn’t implemented on a base type, + // current type to resolve.If the interface isn't resolved, if it isn't implemented on a base type, // scan all base types for name / sig matches. // 3. If implicitly defined, attempt to perform a namesig match if the interface method implementation // has not been found on some base type. diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/MethodDelegator.Diagnostic.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/MethodDelegator.Diagnostic.cs index 946f4a0d79bd..4290daf47365 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/MethodDelegator.Diagnostic.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/MethodDelegator.Diagnostic.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/MethodDelegator.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/MethodDelegator.cs index b1fc85dfc905..b20912397cc0 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/MethodDelegator.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/MethodDelegator.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/MethodDesc.Diagnostic.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/MethodDesc.Diagnostic.cs index 581125911c33..99784da0a347 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/MethodDesc.Diagnostic.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/MethodDesc.Diagnostic.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Text; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/MethodDesc.Dummy.Diagnostic.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/MethodDesc.Dummy.Diagnostic.cs index 6eb18bab4655..719717918556 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/MethodDesc.Dummy.Diagnostic.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/MethodDesc.Dummy.Diagnostic.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/MethodDesc.ToString.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/MethodDesc.ToString.cs index 984faa2433e2..485f28c809f4 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/MethodDesc.ToString.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/MethodDesc.ToString.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Text; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/MethodDesc.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/MethodDesc.cs index bb30e0dd73e3..66143d073a03 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/MethodDesc.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/MethodDesc.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; @@ -20,6 +19,7 @@ public enum MethodSignatureFlags UnmanagedCallingConventionStdCall = 0x0002, UnmanagedCallingConventionThisCall = 0x0003, CallingConventionVarargs = 0x0005, + UnmanagedCallingConvention = 0x0009, Static = 0x0010, } @@ -59,6 +59,44 @@ public MethodSignature(MethodSignatureFlags flags, int genericParameterCount, Ty Debug.Assert(parameters != null, "Parameters must not be null"); } + public MethodSignature ApplySubstitution(Instantiation substitution) + { + if (substitution.IsNull) + return this; + + bool needsNewMethodSignature = false; + TypeDesc[] newParameters = _parameters; // Re-use existing array until conflict appears + TypeDesc returnTypeNew = _returnType.InstantiateSignature(substitution, default(Instantiation)); + if (returnTypeNew != _returnType) + { + needsNewMethodSignature = true; + newParameters = (TypeDesc[])_parameters.Clone(); + } + + for (int i = 0; i < newParameters.Length; i++) + { + TypeDesc newParameter = newParameters[i].InstantiateSignature(substitution, default(Instantiation)); + if (newParameter != newParameters[i]) + { + if (!needsNewMethodSignature) + { + needsNewMethodSignature = true; + newParameters = (TypeDesc[])_parameters.Clone(); + } + newParameters[i] = newParameter; + } + } + + if (needsNewMethodSignature) + { + return new MethodSignature(_flags, _genericParameterCount, returnTypeNew, newParameters, _embeddedSignatureData); + } + else + { + return this; + } + } + public MethodSignatureFlags Flags { get diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/MethodForInstantiatedType.Diagnostic.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/MethodForInstantiatedType.Diagnostic.cs index e1e18c7d70b2..d9b96ba121dc 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/MethodForInstantiatedType.Diagnostic.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/MethodForInstantiatedType.Diagnostic.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/MethodForInstantiatedType.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/MethodForInstantiatedType.cs index 98e3c0be1196..1691d5624ae3 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/MethodForInstantiatedType.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/MethodForInstantiatedType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/ModuleDesc.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/ModuleDesc.cs index 6be6de9b1635..c1e143dfe192 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/ModuleDesc.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/ModuleDesc.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/ParameterizedType.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/ParameterizedType.cs index 33036e758882..6ec0fbd352bf 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/ParameterizedType.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/ParameterizedType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/PointerType.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/PointerType.cs index 15e8adbde4ec..28c3cf31ea00 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/PointerType.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/PointerType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/PropertySignature.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/PropertySignature.cs index da59e609d414..8a99786b4a49 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/PropertySignature.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/PropertySignature.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/RuntimeInterfacesAlgorithm.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/RuntimeInterfacesAlgorithm.cs index 515d531da468..79ebe412bded 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/RuntimeInterfacesAlgorithm.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/RuntimeInterfacesAlgorithm.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/SignatureVariable.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/SignatureVariable.cs index 2fde3c538976..0bfcf24dc7c5 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/SignatureVariable.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/SignatureVariable.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/TargetDetails.ToString.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/TargetDetails.ToString.cs index 822272c15e32..413f789853ed 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/TargetDetails.ToString.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/TargetDetails.ToString.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Debug = System.Diagnostics.Debug; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/TargetDetails.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/TargetDetails.cs index 9337d7670904..79601a4eedd5 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/TargetDetails.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/TargetDetails.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Debug = System.Diagnostics.Debug; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/ThreadSafeFlags.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/ThreadSafeFlags.cs index 70f0b22c40ec..f4919aae380a 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/ThreadSafeFlags.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/ThreadSafeFlags.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; using Interlocked = System.Threading.Interlocked; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/ThrowHelper.Common.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/ThrowHelper.Common.cs index 40b5928d98e0..3eefd5fec066 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/ThrowHelper.Common.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/ThrowHelper.Common.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Text; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/ThrowHelper.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/ThrowHelper.cs index 46ff4cee5a26..9ab806e77ffe 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/ThrowHelper.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/ThrowHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/TypeDesc.Interfaces.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/TypeDesc.Interfaces.cs index e28168c19a92..b8345c88ad4b 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/TypeDesc.Interfaces.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/TypeDesc.Interfaces.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Threading; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/TypeDesc.ToString.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/TypeDesc.ToString.cs index 34e616fae47b..4b63e28d4303 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/TypeDesc.ToString.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/TypeDesc.ToString.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/TypeDesc.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/TypeDesc.cs index 33940de23339..a4bacb6ed1ce 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/TypeDesc.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/TypeDesc.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; @@ -513,14 +512,25 @@ public virtual IEnumerable GetMethods() /// If signature is not specified and there are multiple matches, the first one /// is returned. Returns null if method not found. /// - // TODO: Substitutions, generics, modopts, ... - public virtual MethodDesc GetMethod(string name, MethodSignature signature) + public MethodDesc GetMethod(string name, MethodSignature signature) + { + return GetMethod(name, signature, default(Instantiation)); + } + + /// + /// Gets a named method on the type. This method only looks at methods defined + /// in type's metadata. The parameter can be null. + /// If signature is not specified and there are multiple matches, the first one + /// is returned. If substitution is not null, then substitution will be applied to + /// possible target methods before signature comparison. Returns null if method not found. + /// + public virtual MethodDesc GetMethod(string name, MethodSignature signature, Instantiation substitution) { foreach (var method in GetMethods()) { if (method.Name == name) { - if (signature == null || signature.Equals(method.Signature)) + if (signature == null || signature.Equals(method.Signature.ApplySubstitution(substitution))) return method; } } diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/TypeFlags.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/TypeFlags.cs index c5fa11ed7102..6331f50a891b 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/TypeFlags.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/TypeFlags.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/TypeHashingAlgorithms.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/TypeHashingAlgorithms.cs index 8e84efc26b60..6b3d37851cee 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/TypeHashingAlgorithms.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/TypeHashingAlgorithms.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // --------------------------------------------------------------------------- // Generic functions to compute the hashcode value of types diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/TypeSystemConstraintsHelpers.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/TypeSystemConstraintsHelpers.cs index d428fcfe9be4..cebce492c5fb 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/TypeSystemConstraintsHelpers.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/TypeSystemConstraintsHelpers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/TypeSystemContext.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/TypeSystemContext.cs index dfcbe560b597..2346036fec30 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/TypeSystemContext.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/TypeSystemContext.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/TypeSystemEntity.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/TypeSystemEntity.cs index ad3d3739d16f..f9a02edc42c6 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/TypeSystemEntity.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/TypeSystemEntity.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/TypeSystemException.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/TypeSystemException.cs index afe5ebf7bbb9..331556a6af13 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/TypeSystemException.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/TypeSystemException.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/TypeSystemHelpers.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/TypeSystemHelpers.cs index 018321790590..0ae8d679104a 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/TypeSystemHelpers.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/TypeSystemHelpers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/UniversalCanonLayoutAlgorithm.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/UniversalCanonLayoutAlgorithm.cs new file mode 100644 index 000000000000..f32daba077b2 --- /dev/null +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/UniversalCanonLayoutAlgorithm.cs @@ -0,0 +1,53 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; + +using Internal.NativeFormat; + +using Debug = System.Diagnostics.Debug; + +namespace Internal.TypeSystem +{ + public class UniversalCanonLayoutAlgorithm : FieldLayoutAlgorithm + { + public static UniversalCanonLayoutAlgorithm Instance = new UniversalCanonLayoutAlgorithm(); + + private UniversalCanonLayoutAlgorithm() { } + + public override bool ComputeContainsGCPointers(DefType type) + { + // This should never be called + throw new NotSupportedException(); + } + + public override ComputedInstanceFieldLayout ComputeInstanceLayout(DefType type, InstanceLayoutKind layoutKind) + { + return new ComputedInstanceFieldLayout() + { + FieldSize = LayoutInt.Indeterminate, + FieldAlignment = LayoutInt.Indeterminate, + ByteCountUnaligned = LayoutInt.Indeterminate, + ByteCountAlignment = LayoutInt.Indeterminate, + Offsets = Array.Empty() + }; + } + + public override ComputedStaticFieldLayout ComputeStaticFieldLayout(DefType type, StaticLayoutKind layoutKind) + { + return new ComputedStaticFieldLayout() + { + NonGcStatics = new StaticsBlock() { Size = LayoutInt.Zero, LargestAlignment = LayoutInt.Zero }, + GcStatics = new StaticsBlock() { Size = LayoutInt.Zero, LargestAlignment = LayoutInt.Zero }, + ThreadNonGcStatics = new StaticsBlock() { Size = LayoutInt.Zero, LargestAlignment = LayoutInt.Zero }, + ThreadGcStatics = new StaticsBlock() { Size = LayoutInt.Zero, LargestAlignment = LayoutInt.Zero }, + Offsets = Array.Empty() + }; + } + + public override ValueTypeShapeCharacteristics ComputeValueTypeShapeCharacteristics(DefType type) + { + return ValueTypeShapeCharacteristics.None; + } + } +} diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/CustomAttributeTypeNameFormatter.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/CustomAttributeTypeNameFormatter.cs index 864a7b3220ca..94a9caa2ad1f 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/CustomAttributeTypeNameFormatter.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/CustomAttributeTypeNameFormatter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Text; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/CustomAttributeTypeNameParser.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/CustomAttributeTypeNameParser.cs index 1bea19a91a50..fea531003c3b 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/CustomAttributeTypeNameParser.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/CustomAttributeTypeNameParser.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/DebugNameFormatter.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/DebugNameFormatter.cs index ea8dfb772882..99431f937851 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/DebugNameFormatter.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/DebugNameFormatter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Text; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/ExceptionTypeNameFormatter.Metadata.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/ExceptionTypeNameFormatter.Metadata.cs index f79364bfd1d7..92d3319a0c15 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/ExceptionTypeNameFormatter.Metadata.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/ExceptionTypeNameFormatter.Metadata.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/ExceptionTypeNameFormatter.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/ExceptionTypeNameFormatter.cs index 4e7447cc4a3a..31fccdcaaa93 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/ExceptionTypeNameFormatter.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/ExceptionTypeNameFormatter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Text; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/GCPointerMap.Algorithm.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/GCPointerMap.Algorithm.cs index 4376f9e25d97..af5938677a4b 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/GCPointerMap.Algorithm.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/GCPointerMap.Algorithm.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Debug = System.Diagnostics.Debug; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/GCPointerMap.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/GCPointerMap.cs index 482e502894d1..7f2d2195f3c8 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/GCPointerMap.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/GCPointerMap.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Text; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/LockFreeReaderHashtable.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/LockFreeReaderHashtable.cs index c555a8d6d1fe..59204c234972 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/LockFreeReaderHashtable.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/LockFreeReaderHashtable.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/TypeNameFormatter.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/TypeNameFormatter.cs index 1f946786cb92..11ad86d7874e 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/TypeNameFormatter.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/TypeNameFormatter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Text; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/VirtualMethodAlgorithm.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/VirtualMethodAlgorithm.cs index 4f22881d4a97..3a291fb69802 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/VirtualMethodAlgorithm.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/VirtualMethodAlgorithm.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/WellKnownType.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/WellKnownType.cs index 1f0e22c84118..2a6b425ee1e5 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/WellKnownType.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/WellKnownType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Ecma/CachingMetadataStringDecoder.cs b/src/coreclr/src/tools/Common/TypeSystem/Ecma/CachingMetadataStringDecoder.cs index f965a8bce327..7a1ccfadb8bc 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Ecma/CachingMetadataStringDecoder.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Ecma/CachingMetadataStringDecoder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Reflection.Metadata; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Ecma/CustomAttributeTypeProvider.cs b/src/coreclr/src/tools/Common/TypeSystem/Ecma/CustomAttributeTypeProvider.cs index 2e9d88e3d8f7..0b1390765a7d 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Ecma/CustomAttributeTypeProvider.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Ecma/CustomAttributeTypeProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Reflection.Metadata; @@ -94,4 +93,4 @@ public bool IsSystemType(TypeDesc type) && metadataType.Namespace == "System"; } } -} \ No newline at end of file +} diff --git a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaAssembly.Symbols.cs b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaAssembly.Symbols.cs index 18e4bb76aa23..0ca7305763ca 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaAssembly.Symbols.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaAssembly.Symbols.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Reflection.Metadata; using System.Reflection.PortableExecutable; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaAssembly.cs b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaAssembly.cs index 7b0805ee713a..0e155fda998f 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaAssembly.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaAssembly.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Reflection; using System.Reflection.Metadata; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaField.CodeGen.cs b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaField.CodeGen.cs index a964d40111ff..2f76289e4ab2 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaField.CodeGen.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaField.CodeGen.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem.Ecma { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaField.Serialization.cs b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaField.Serialization.cs index 24b6da5a07d9..52a7a474dbf0 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaField.Serialization.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaField.Serialization.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem.Ecma { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaField.Sorting.cs b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaField.Sorting.cs index 79c5a28b0fc1..9151b571936b 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaField.Sorting.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaField.Sorting.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Reflection.Metadata.Ecma335; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaField.cs b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaField.cs index 81ed1ec3a3f7..31a4c8def5c5 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaField.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaField.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaGenericParameter.Diagnostic.cs b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaGenericParameter.Diagnostic.cs index 2def7d24cf57..e900b53be8b3 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaGenericParameter.Diagnostic.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaGenericParameter.Diagnostic.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Reflection.Metadata.Ecma335; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaGenericParameter.Sorting.cs b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaGenericParameter.Sorting.cs index b1c4bbce6e0c..eb19d5f60107 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaGenericParameter.Sorting.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaGenericParameter.Sorting.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Reflection.Metadata.Ecma335; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaGenericParameter.cs b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaGenericParameter.cs index 28a43f0424cb..7451c0a9fb43 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaGenericParameter.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaGenericParameter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaMethod.Diagnostic.cs b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaMethod.Diagnostic.cs index 88ff3ca78c3b..fbcb9b97db5b 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaMethod.Diagnostic.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaMethod.Diagnostic.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Reflection.Metadata.Ecma335; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaMethod.Sorting.cs b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaMethod.Sorting.cs index c5e20b5362b9..09ea200aa065 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaMethod.Sorting.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaMethod.Sorting.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Reflection.Metadata.Ecma335; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaMethod.cs b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaMethod.cs index d4e0fbd9915e..da5126529e48 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaMethod.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaMethod.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaModule.Sorting.cs b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaModule.Sorting.cs index 3549c767ffae..a86c4f030d53 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaModule.Sorting.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaModule.Sorting.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaModule.Symbols.cs b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaModule.Symbols.cs index 9e86ba21c4d4..821f8643ea34 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaModule.Symbols.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaModule.Symbols.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Reflection.Metadata; using System.Reflection.PortableExecutable; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaModule.cs b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaModule.cs index a20c2a8a47d2..389f0607399b 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaModule.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaModule.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -419,12 +418,12 @@ private Object ResolveMemberReference(MemberReferenceHandle handle) { MethodSignature sig = parser.ParseMethodSignature(); TypeDesc typeDescToInspect = parentTypeDesc; + Instantiation substitution = default(Instantiation); // Try to resolve the name and signature in the current type, or any of the base types. do { - // TODO: handle substitutions - MethodDesc method = typeDescToInspect.GetMethod(name, sig); + MethodDesc method = typeDescToInspect.GetMethod(name, sig, substitution); if (method != null) { // If this resolved to one of the base types, make sure it's not a constructor. @@ -434,7 +433,31 @@ private Object ResolveMemberReference(MemberReferenceHandle handle) return method; } - typeDescToInspect = typeDescToInspect.BaseType; + var baseType = typeDescToInspect.BaseType; + if (baseType != null) + { + if (!baseType.HasInstantiation) + { + substitution = default(Instantiation); + } + else + { + // If the base type is generic, any signature match for methods on the base type with the generic details from + // the deriving type + Instantiation newSubstitution = typeDescToInspect.GetTypeDefinition().BaseType.Instantiation; + if (!substitution.IsNull) + { + TypeDesc[] newSubstitutionTypes = new TypeDesc[newSubstitution.Length]; + for (int i = 0; i < newSubstitution.Length; i++) + { + newSubstitutionTypes[i] = newSubstitution[i].InstantiateSignature(substitution, default(Instantiation)); + } + newSubstitution = new Instantiation(newSubstitutionTypes); + } + substitution = newSubstitution; + } + } + typeDescToInspect = baseType; } while (typeDescToInspect != null); ThrowHelper.ThrowMissingMethodException(parentTypeDesc, name, sig); diff --git a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaSignatureParser.cs b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaSignatureParser.cs index 81c0cc92b0a2..4b86fae7d77f 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaSignatureParser.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaSignatureParser.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Reflection.Metadata; @@ -268,6 +267,8 @@ private MethodSignature ParseMethodSignatureImpl(bool skipEmbeddedSignatureData) Debug.Assert((int)MethodSignatureFlags.UnmanagedCallingConventionStdCall == (int)SignatureCallingConvention.StdCall); Debug.Assert((int)MethodSignatureFlags.UnmanagedCallingConventionThisCall == (int)SignatureCallingConvention.ThisCall); Debug.Assert((int)MethodSignatureFlags.CallingConventionVarargs == (int)SignatureCallingConvention.VarArgs); + // [TODO] Debug.Assert((int)MethodSignatureFlags.UnmanagedCallingConvention == (int)SignatureCallingConvention.Unmanaged); + Debug.Assert((int)MethodSignatureFlags.UnmanagedCallingConvention == 9); flags = (MethodSignatureFlags)signatureCallConv; } diff --git a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaType.Diagnostic.cs b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaType.Diagnostic.cs index 4a00ef9d71db..028fec14c234 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaType.Diagnostic.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaType.Diagnostic.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaType.Interfaces.cs b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaType.Interfaces.cs index c118df190fc2..44639a27ebe2 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaType.Interfaces.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaType.Interfaces.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Reflection; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaType.MethodImpls.cs b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaType.MethodImpls.cs index 4348f6c8ed94..e9f16ef1ca33 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaType.MethodImpls.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaType.MethodImpls.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaType.Serialization.cs b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaType.Serialization.cs index 3ba6042c5dea..0f826f68936b 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaType.Serialization.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaType.Serialization.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Reflection; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaType.Sorting.cs b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaType.Sorting.cs index 77a3fbe46a76..757604dbe677 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaType.Sorting.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaType.Sorting.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Reflection.Metadata.Ecma335; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaType.cs b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaType.cs index 24cf0c8a43f7..8075ef7e4b6f 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaType.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -311,7 +310,7 @@ public override IEnumerable GetMethods() } } - public override MethodDesc GetMethod(string name, MethodSignature signature) + public override MethodDesc GetMethod(string name, MethodSignature signature, Instantiation substitution) { var metadataReader = this.MetadataReader; var stringComparer = metadataReader.StringComparer; @@ -321,7 +320,7 @@ public override MethodDesc GetMethod(string name, MethodSignature signature) if (stringComparer.Equals(metadataReader.GetMethodDefinition(handle).Name, name)) { MethodDesc method = (MethodDesc)_module.GetObject(handle); - if (signature == null || signature.Equals(method.Signature)) + if (signature == null || signature.Equals(method.Signature.ApplySubstitution(substitution))) return method; } } diff --git a/src/coreclr/src/tools/Common/TypeSystem/Ecma/IMetadataStringDecoderProvider.cs b/src/coreclr/src/tools/Common/TypeSystem/Ecma/IMetadataStringDecoderProvider.cs index 5c9fc98e9282..b37bec733a58 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Ecma/IMetadataStringDecoderProvider.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Ecma/IMetadataStringDecoderProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Reflection.Metadata; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Ecma/MetadataExtensions.cs b/src/coreclr/src/tools/Common/TypeSystem/Ecma/MetadataExtensions.cs index bbe4eed38d86..157d774dd569 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Ecma/MetadataExtensions.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Ecma/MetadataExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Reflection; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Ecma/PrimitiveTypeProvider.cs b/src/coreclr/src/tools/Common/TypeSystem/Ecma/PrimitiveTypeProvider.cs index ff9bea5afb7b..3f1d95be58c9 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Ecma/PrimitiveTypeProvider.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Ecma/PrimitiveTypeProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Reflection.Metadata; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Ecma/SymbolReader/PdbSymbolReader.cs b/src/coreclr/src/tools/Common/TypeSystem/Ecma/SymbolReader/PdbSymbolReader.cs index c35c1490a1e5..c36fec3a42f1 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Ecma/SymbolReader/PdbSymbolReader.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Ecma/SymbolReader/PdbSymbolReader.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Ecma/SymbolReader/PortablePdbSymbolReader.cs b/src/coreclr/src/tools/Common/TypeSystem/Ecma/SymbolReader/PortablePdbSymbolReader.cs index 4faecf8a7c3f..886280f21f75 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Ecma/SymbolReader/PortablePdbSymbolReader.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Ecma/SymbolReader/PortablePdbSymbolReader.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Ecma/SymbolReader/UnmanagedPdbSymbolReader.cs b/src/coreclr/src/tools/Common/TypeSystem/Ecma/SymbolReader/UnmanagedPdbSymbolReader.cs index 5b6d1ea8b819..0eb830ac392a 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Ecma/SymbolReader/UnmanagedPdbSymbolReader.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Ecma/SymbolReader/UnmanagedPdbSymbolReader.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/TypeSystem/IL/EcmaMethodIL.Symbols.cs b/src/coreclr/src/tools/Common/TypeSystem/IL/EcmaMethodIL.Symbols.cs index 35b7c22e4966..101ff72b6c23 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/IL/EcmaMethodIL.Symbols.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/IL/EcmaMethodIL.Symbols.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Reflection.Metadata; diff --git a/src/coreclr/src/tools/Common/TypeSystem/IL/EcmaMethodIL.cs b/src/coreclr/src/tools/Common/TypeSystem/IL/EcmaMethodIL.cs index db2443ade3fb..5f1389bb1aa9 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/IL/EcmaMethodIL.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/IL/EcmaMethodIL.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Immutable; diff --git a/src/coreclr/src/tools/Common/TypeSystem/IL/HelperExtensions.cs b/src/coreclr/src/tools/Common/TypeSystem/IL/HelperExtensions.cs index 682dab4f04b5..7c43777bb1df 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/IL/HelperExtensions.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/IL/HelperExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/TypeSystem/IL/ILDisassembler.cs b/src/coreclr/src/tools/Common/TypeSystem/IL/ILDisassembler.cs index c7fb70f6e8e3..2d1a626cc633 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/IL/ILDisassembler.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/IL/ILDisassembler.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Text; diff --git a/src/coreclr/src/tools/Common/TypeSystem/IL/ILImporter.cs b/src/coreclr/src/tools/Common/TypeSystem/IL/ILImporter.cs index 6e6ebd2cc163..e3e4fba5983a 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/IL/ILImporter.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/IL/ILImporter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/TypeSystem/IL/ILOpcode.cs b/src/coreclr/src/tools/Common/TypeSystem/IL/ILOpcode.cs index e031553f5379..f3a11e0074dc 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/IL/ILOpcode.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/IL/ILOpcode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/TypeSystem/IL/ILOpcodeHelper.cs b/src/coreclr/src/tools/Common/TypeSystem/IL/ILOpcodeHelper.cs index b051e205f08e..076876c53751 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/IL/ILOpcodeHelper.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/IL/ILOpcodeHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Debug = System.Diagnostics.Debug; diff --git a/src/coreclr/src/tools/Common/TypeSystem/IL/ILProvider.cs b/src/coreclr/src/tools/Common/TypeSystem/IL/ILProvider.cs index f17bb4979825..eef7d154b42e 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/IL/ILProvider.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/IL/ILProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Internal.TypeSystem; diff --git a/src/coreclr/src/tools/Common/TypeSystem/IL/ILStackHelper.cs b/src/coreclr/src/tools/Common/TypeSystem/IL/ILStackHelper.cs index d30532e13730..19c643256b4b 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/IL/ILStackHelper.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/IL/ILStackHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/coreclr/src/tools/Common/TypeSystem/IL/InstantiatedMethodIL.cs b/src/coreclr/src/tools/Common/TypeSystem/IL/InstantiatedMethodIL.cs index f444f5da7704..7192e547f39a 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/IL/InstantiatedMethodIL.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/IL/InstantiatedMethodIL.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/TypeSystem/IL/MethodIL.Symbols.cs b/src/coreclr/src/tools/Common/TypeSystem/IL/MethodIL.Symbols.cs index 9271af838e53..65309b58c5a3 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/IL/MethodIL.Symbols.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/IL/MethodIL.Symbols.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/TypeSystem/IL/MethodIL.cs b/src/coreclr/src/tools/Common/TypeSystem/IL/MethodIL.cs index 70e925d718b9..83fecc15119b 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/IL/MethodIL.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/IL/MethodIL.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/TypeSystem/IL/MethodILDebugView.cs b/src/coreclr/src/tools/Common/TypeSystem/IL/MethodILDebugView.cs index e0d5675e6022..03fc460d2582 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/IL/MethodILDebugView.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/IL/MethodILDebugView.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Text; diff --git a/src/coreclr/src/tools/Common/TypeSystem/IL/StackValueKind.cs b/src/coreclr/src/tools/Common/TypeSystem/IL/StackValueKind.cs index 71d37a2a47ad..5066be2e40ec 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/IL/StackValueKind.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/IL/StackValueKind.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.IL { diff --git a/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/ComparerIntrinsics.cs b/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/ComparerIntrinsics.cs index 695032b87120..7297b94279f4 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/ComparerIntrinsics.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/ComparerIntrinsics.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/ILEmitter.cs b/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/ILEmitter.cs index 363ab351c89f..67f79ad809dc 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/ILEmitter.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/ILEmitter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/InterlockedIntrinsics.cs b/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/InterlockedIntrinsics.cs index bf75857a9374..7fc1dbc9ef9d 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/InterlockedIntrinsics.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/InterlockedIntrinsics.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/MemoryMarshalIntrinsics.cs b/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/MemoryMarshalIntrinsics.cs index dc4c6a7a197a..fc1d74bf3263 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/MemoryMarshalIntrinsics.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/MemoryMarshalIntrinsics.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Internal.TypeSystem; diff --git a/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/PInvokeILCodeStreams.cs b/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/PInvokeILCodeStreams.cs index c8a7d94d49d2..1ad547dbb468 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/PInvokeILCodeStreams.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/PInvokeILCodeStreams.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.IL.Stubs { diff --git a/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/PInvokeTargetNativeMethod.Diagnostic.cs b/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/PInvokeTargetNativeMethod.Diagnostic.cs index 2cb4d1ea33c4..66be6d965445 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/PInvokeTargetNativeMethod.Diagnostic.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/PInvokeTargetNativeMethod.Diagnostic.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Internal.TypeSystem; diff --git a/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/PInvokeTargetNativeMethod.Mangling.cs b/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/PInvokeTargetNativeMethod.Mangling.cs index 79ea39a9001f..0840a5856fa2 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/PInvokeTargetNativeMethod.Mangling.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/PInvokeTargetNativeMethod.Mangling.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Internal.TypeSystem; diff --git a/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/PInvokeTargetNativeMethod.Sorting.cs b/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/PInvokeTargetNativeMethod.Sorting.cs index ea754346f7a6..da12ad0a8b2d 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/PInvokeTargetNativeMethod.Sorting.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/PInvokeTargetNativeMethod.Sorting.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Internal.TypeSystem; diff --git a/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/PInvokeTargetNativeMethod.cs b/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/PInvokeTargetNativeMethod.cs index 519dee4e9abf..5683eee0429f 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/PInvokeTargetNativeMethod.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/PInvokeTargetNativeMethod.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Internal.TypeSystem; diff --git a/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/RuntimeHelpersIntrinsics.cs b/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/RuntimeHelpersIntrinsics.cs index 6e44c8485a6e..53af0f37161d 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/RuntimeHelpersIntrinsics.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/RuntimeHelpersIntrinsics.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/UnsafeIntrinsics.cs b/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/UnsafeIntrinsics.cs index c0e0ea1feab2..277e6bd67ef2 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/UnsafeIntrinsics.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/UnsafeIntrinsics.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/VolatileIntrinsics.cs b/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/VolatileIntrinsics.cs index 4a9ca72eb9f7..f9ab4c106055 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/VolatileIntrinsics.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/IL/Stubs/VolatileIntrinsics.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Interop/FieldDesc.Interop.cs b/src/coreclr/src/tools/Common/TypeSystem/Interop/FieldDesc.Interop.cs index 1e7a3e3ba76e..ad5a51232d73 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Interop/FieldDesc.Interop.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Interop/FieldDesc.Interop.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Interop/IL/MarshalHelpers.cs b/src/coreclr/src/tools/Common/TypeSystem/Interop/IL/MarshalHelpers.cs index ac307a8b2c74..956e4fc8e274 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Interop/IL/MarshalHelpers.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Interop/IL/MarshalHelpers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Internal.IL; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Interop/IL/MarshalUtils.cs b/src/coreclr/src/tools/Common/TypeSystem/Interop/IL/MarshalUtils.cs index 3b2795751d32..65f0956943fb 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Interop/IL/MarshalUtils.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Interop/IL/MarshalUtils.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Interop/IL/Marshaller.cs b/src/coreclr/src/tools/Common/TypeSystem/Interop/IL/Marshaller.cs index da9e4630d7cc..31c869463025 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Interop/IL/Marshaller.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Interop/IL/Marshaller.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Interop/InstantiatedType.Interop.cs b/src/coreclr/src/tools/Common/TypeSystem/Interop/InstantiatedType.Interop.cs index 4f9cbad960ec..c61514f20eba 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Interop/InstantiatedType.Interop.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Interop/InstantiatedType.Interop.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Interop/InteropTypes.cs b/src/coreclr/src/tools/Common/TypeSystem/Interop/InteropTypes.cs index 4231594e612d..d602d449c47f 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Interop/InteropTypes.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Interop/InteropTypes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Internal.IL; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Interop/MarshalAsDescriptor.cs b/src/coreclr/src/tools/Common/TypeSystem/Interop/MarshalAsDescriptor.cs index 2131581d4fea..392d284215fb 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Interop/MarshalAsDescriptor.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Interop/MarshalAsDescriptor.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; using System; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Interop/MetadataType.Interop.cs b/src/coreclr/src/tools/Common/TypeSystem/Interop/MetadataType.Interop.cs index 3f586dcb3f5e..eeed1cc9343d 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Interop/MetadataType.Interop.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Interop/MetadataType.Interop.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Interop/MethodDelegator.Interop.cs b/src/coreclr/src/tools/Common/TypeSystem/Interop/MethodDelegator.Interop.cs index 73c11109d246..47291cd62bc6 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Interop/MethodDelegator.Interop.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Interop/MethodDelegator.Interop.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Interop/MethodDesc.Interop.cs b/src/coreclr/src/tools/Common/TypeSystem/Interop/MethodDesc.Interop.cs index d496dcf0d1a7..1b8dc40bc6f4 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Interop/MethodDesc.Interop.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Interop/MethodDesc.Interop.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Mangling/IPrefixMangledMethod.cs b/src/coreclr/src/tools/Common/TypeSystem/Mangling/IPrefixMangledMethod.cs index 7e06aa83d261..c79feefa8f65 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Mangling/IPrefixMangledMethod.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Mangling/IPrefixMangledMethod.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Mangling/IPrefixMangledSignature.cs b/src/coreclr/src/tools/Common/TypeSystem/Mangling/IPrefixMangledSignature.cs index 3dabbc53a673..ffe81dbbec0b 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Mangling/IPrefixMangledSignature.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Mangling/IPrefixMangledSignature.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Mangling/IPrefixMangledType.cs b/src/coreclr/src/tools/Common/TypeSystem/Mangling/IPrefixMangledType.cs index 8ea628abdc1e..f4e0618d3e99 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Mangling/IPrefixMangledType.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Mangling/IPrefixMangledType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/ArrayType.RuntimeDetermined.cs b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/ArrayType.RuntimeDetermined.cs index 08983940ffab..2e05f1b87f2b 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/ArrayType.RuntimeDetermined.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/ArrayType.RuntimeDetermined.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/ByRefType.RuntimeDetermined.cs b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/ByRefType.RuntimeDetermined.cs index a10a9c8e5e72..21b4b9a3b067 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/ByRefType.RuntimeDetermined.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/ByRefType.RuntimeDetermined.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/DefType.RuntimeDetermined.cs b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/DefType.RuntimeDetermined.cs index b2f669b228d8..81d24031df36 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/DefType.RuntimeDetermined.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/DefType.RuntimeDetermined.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/FieldDesc.RuntimeDetermined.cs b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/FieldDesc.RuntimeDetermined.cs index c3bd99565e85..748ea1d87720 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/FieldDesc.RuntimeDetermined.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/FieldDesc.RuntimeDetermined.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/FunctionPointerType.RuntimeDetermined.cs b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/FunctionPointerType.RuntimeDetermined.cs index 3ad0e6e701fe..64767657f56b 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/FunctionPointerType.RuntimeDetermined.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/FunctionPointerType.RuntimeDetermined.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Debug = System.Diagnostics.Debug; diff --git a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/GenericParameterDesc.RuntimeDetermined.cs b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/GenericParameterDesc.RuntimeDetermined.cs index 79b2b7b429ed..e2abaf141c48 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/GenericParameterDesc.RuntimeDetermined.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/GenericParameterDesc.RuntimeDetermined.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Debug = System.Diagnostics.Debug; @@ -23,4 +22,4 @@ public override TypeDesc GetNonRuntimeDeterminedTypeFromRuntimeDeterminedSubtype return this; } } -} \ No newline at end of file +} diff --git a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/MethodDesc.RuntimeDetermined.cs b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/MethodDesc.RuntimeDetermined.cs index 8fd47116dd97..909c73465d84 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/MethodDesc.RuntimeDetermined.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/MethodDesc.RuntimeDetermined.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Debug = System.Diagnostics.Debug; diff --git a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/MethodForRuntimeDeterminedType.Diagnostic.cs b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/MethodForRuntimeDeterminedType.Diagnostic.cs index 3aa3b441fd68..aca586c0c151 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/MethodForRuntimeDeterminedType.Diagnostic.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/MethodForRuntimeDeterminedType.Diagnostic.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/MethodForRuntimeDeterminedType.Sorting.cs b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/MethodForRuntimeDeterminedType.Sorting.cs index dd318b30ce9d..2aeab414f4aa 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/MethodForRuntimeDeterminedType.Sorting.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/MethodForRuntimeDeterminedType.Sorting.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/MethodForRuntimeDeterminedType.cs b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/MethodForRuntimeDeterminedType.cs index 2ae3380ad125..24f7ec0eb2d5 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/MethodForRuntimeDeterminedType.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/MethodForRuntimeDeterminedType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/ParameterizedType.RuntimeDetermined.cs b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/ParameterizedType.RuntimeDetermined.cs index df1723270778..430e57596c96 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/ParameterizedType.RuntimeDetermined.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/ParameterizedType.RuntimeDetermined.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { @@ -14,4 +13,4 @@ public sealed override bool IsRuntimeDeterminedSubtype } } } -} \ No newline at end of file +} diff --git a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/PointerType.RuntimeDetermined.cs b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/PointerType.RuntimeDetermined.cs index f3ef66f37123..ef6c1e6bb061 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/PointerType.RuntimeDetermined.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/PointerType.RuntimeDetermined.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedCanonicalizationAlgorithm.cs b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedCanonicalizationAlgorithm.cs index 6ba17638ee0e..a0e7c0777837 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedCanonicalizationAlgorithm.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedCanonicalizationAlgorithm.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Debug = System.Diagnostics.Debug; diff --git a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedFieldLayoutAlgorithm.cs b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedFieldLayoutAlgorithm.cs index 7006d95dd71f..65ee522f5273 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedFieldLayoutAlgorithm.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedFieldLayoutAlgorithm.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedType.Diagnostic.cs b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedType.Diagnostic.cs index 8b9a7cca1d55..b78e4c398e0b 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedType.Diagnostic.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedType.Diagnostic.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedType.Sorting.cs b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedType.Sorting.cs index 685bf46ad089..e2d0428631b8 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedType.Sorting.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedType.Sorting.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedType.cs b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedType.cs index 48abf82860a3..e651989e182f 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedType.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -115,9 +114,9 @@ public override IEnumerable GetMethods() } } - public override MethodDesc GetMethod(string name, MethodSignature signature) + public override MethodDesc GetMethod(string name, MethodSignature signature, Instantiation substitution) { - MethodDesc method = _rawCanonType.GetMethod(name, signature); + MethodDesc method = _rawCanonType.GetMethod(name, signature, substitution); if (method == null) return null; return Context.GetMethodForRuntimeDeterminedType(method.GetTypicalMethodDefinition(), this); diff --git a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedTypeUtilities.cs b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedTypeUtilities.cs index d8411a65b123..e7bd816f9365 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedTypeUtilities.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedTypeUtilities.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Debug = System.Diagnostics.Debug; diff --git a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/SignatureVariable.RuntimeDetermined.cs b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/SignatureVariable.RuntimeDetermined.cs index 416cc19d1c9e..8eff9f519544 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/SignatureVariable.RuntimeDetermined.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/SignatureVariable.RuntimeDetermined.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Debug = System.Diagnostics.Debug; @@ -23,4 +22,4 @@ public override TypeDesc GetNonRuntimeDeterminedTypeFromRuntimeDeterminedSubtype return this; } } -} \ No newline at end of file +} diff --git a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/TypeDesc.RuntimeDetermined.cs b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/TypeDesc.RuntimeDetermined.cs index c21ee835aaff..dc602f5ed282 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/TypeDesc.RuntimeDetermined.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/TypeDesc.RuntimeDetermined.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/TypeSystemContext.RuntimeDetermined.cs b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/TypeSystemContext.RuntimeDetermined.cs index e84d87524217..dbbb7442aa4f 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/TypeSystemContext.RuntimeDetermined.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/RuntimeDetermined/TypeSystemContext.RuntimeDetermined.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Serialization/FieldDesc.Serialization.cs b/src/coreclr/src/tools/Common/TypeSystem/Serialization/FieldDesc.Serialization.cs index 9f5afef28a2a..6552d1eaaa80 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Serialization/FieldDesc.Serialization.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Serialization/FieldDesc.Serialization.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Serialization/TypeDesc.Serialization.cs b/src/coreclr/src/tools/Common/TypeSystem/Serialization/TypeDesc.Serialization.cs index f8ba33aedd97..9c4fcf89376e 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Serialization/TypeDesc.Serialization.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Serialization/TypeDesc.Serialization.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Sorting/ArrayType.Sorting.cs b/src/coreclr/src/tools/Common/TypeSystem/Sorting/ArrayType.Sorting.cs index ba20c3609dba..661fdad27606 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Sorting/ArrayType.Sorting.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Sorting/ArrayType.Sorting.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Sorting/ByRefType.Sorting.cs b/src/coreclr/src/tools/Common/TypeSystem/Sorting/ByRefType.Sorting.cs index 7d5a2392741b..4aa2ca4b8d59 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Sorting/ByRefType.Sorting.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Sorting/ByRefType.Sorting.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Sorting/FieldDesc.Sorting.cs b/src/coreclr/src/tools/Common/TypeSystem/Sorting/FieldDesc.Sorting.cs index 9888013b1591..a1f7c02a2d59 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Sorting/FieldDesc.Sorting.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Sorting/FieldDesc.Sorting.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Sorting/FieldForInstantiatedType.Sorting.cs b/src/coreclr/src/tools/Common/TypeSystem/Sorting/FieldForInstantiatedType.Sorting.cs index 720ab2362ca8..1682d6abe97a 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Sorting/FieldForInstantiatedType.Sorting.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Sorting/FieldForInstantiatedType.Sorting.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Sorting/FunctionPointerType.Sorting.cs b/src/coreclr/src/tools/Common/TypeSystem/Sorting/FunctionPointerType.Sorting.cs index d87745d39d78..fdb61b3d6c56 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Sorting/FunctionPointerType.Sorting.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Sorting/FunctionPointerType.Sorting.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Sorting/InstantiatedMethod.Sorting.cs b/src/coreclr/src/tools/Common/TypeSystem/Sorting/InstantiatedMethod.Sorting.cs index 065c12272136..0fe7eb4686fd 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Sorting/InstantiatedMethod.Sorting.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Sorting/InstantiatedMethod.Sorting.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Sorting/InstantiatedType.Sorting.cs b/src/coreclr/src/tools/Common/TypeSystem/Sorting/InstantiatedType.Sorting.cs index b983382f6268..a761cf0b345f 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Sorting/InstantiatedType.Sorting.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Sorting/InstantiatedType.Sorting.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Debug = System.Diagnostics.Debug; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Sorting/MethodDesc.Sorting.cs b/src/coreclr/src/tools/Common/TypeSystem/Sorting/MethodDesc.Sorting.cs index a8872050614d..baa78bda2036 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Sorting/MethodDesc.Sorting.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Sorting/MethodDesc.Sorting.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Sorting/MethodForInstantiatedType.Sorting.cs b/src/coreclr/src/tools/Common/TypeSystem/Sorting/MethodForInstantiatedType.Sorting.cs index 3c66f37acc9a..eabd0ce0a23e 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Sorting/MethodForInstantiatedType.Sorting.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Sorting/MethodForInstantiatedType.Sorting.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Sorting/MethodSignature.Sorting.cs b/src/coreclr/src/tools/Common/TypeSystem/Sorting/MethodSignature.Sorting.cs index 162a87907ffb..56d37f5a17a5 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Sorting/MethodSignature.Sorting.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Sorting/MethodSignature.Sorting.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Sorting/PointerType.Sorting.cs b/src/coreclr/src/tools/Common/TypeSystem/Sorting/PointerType.Sorting.cs index 30d3d297c89f..7ead35836371 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Sorting/PointerType.Sorting.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Sorting/PointerType.Sorting.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Sorting/SignatureVariable.Sorting.cs b/src/coreclr/src/tools/Common/TypeSystem/Sorting/SignatureVariable.Sorting.cs index cb5cae9399c1..a3104ff842da 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Sorting/SignatureVariable.Sorting.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Sorting/SignatureVariable.Sorting.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Sorting/TypeDesc.Sorting.cs b/src/coreclr/src/tools/Common/TypeSystem/Sorting/TypeDesc.Sorting.cs index b0398f960e13..6e676244d589 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Sorting/TypeDesc.Sorting.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Sorting/TypeDesc.Sorting.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Internal.TypeSystem { diff --git a/src/coreclr/src/tools/Common/TypeSystem/Sorting/TypeSystemComparer.cs b/src/coreclr/src/tools/Common/TypeSystem/Sorting/TypeSystemComparer.cs index ee71c5bf245f..f648411312cf 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Sorting/TypeSystemComparer.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Sorting/TypeSystemComparer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Debug = System.Diagnostics.Debug; diff --git a/src/coreclr/src/tools/GenClrDebugResource/GenClrDebugResource.cpp b/src/coreclr/src/tools/GenClrDebugResource/GenClrDebugResource.cpp index de016de845bc..bc8c6fd97837 100644 --- a/src/coreclr/src/tools/GenClrDebugResource/GenClrDebugResource.cpp +++ b/src/coreclr/src/tools/GenClrDebugResource/GenClrDebugResource.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* This app writes out the data for a special resource which is embedded in clr.dll * The resource serves two purposes, to differentiate a random dll named clr.dll from diff --git a/src/coreclr/src/tools/GenClrDebugResource/native.rc b/src/coreclr/src/tools/GenClrDebugResource/native.rc index 4c1007fd9a96..3c494dcd8625 100644 --- a/src/coreclr/src/tools/GenClrDebugResource/native.rc +++ b/src/coreclr/src/tools/GenClrDebugResource/native.rc @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #define FX_VER_FILEDESCRIPTION_STR "Microsoft\0" #include diff --git a/src/coreclr/src/tools/ILVerification/AccessVerificationHelpers.cs b/src/coreclr/src/tools/ILVerification/AccessVerificationHelpers.cs index 21db942302b3..82cf528236a8 100644 --- a/src/coreclr/src/tools/ILVerification/AccessVerificationHelpers.cs +++ b/src/coreclr/src/tools/ILVerification/AccessVerificationHelpers.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/coreclr/src/tools/ILVerification/ILImporter.StackValue.cs b/src/coreclr/src/tools/ILVerification/ILImporter.StackValue.cs index ad2497b1c0ba..f6ba568ca52d 100644 --- a/src/coreclr/src/tools/ILVerification/ILImporter.StackValue.cs +++ b/src/coreclr/src/tools/ILVerification/ILImporter.StackValue.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/coreclr/src/tools/ILVerification/ILImporter.Verify.cs b/src/coreclr/src/tools/ILVerification/ILImporter.Verify.cs index 26ceb6e53755..787afb52578b 100644 --- a/src/coreclr/src/tools/ILVerification/ILImporter.Verify.cs +++ b/src/coreclr/src/tools/ILVerification/ILImporter.Verify.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/coreclr/src/tools/ILVerification/ILVerification.csproj b/src/coreclr/src/tools/ILVerification/ILVerification.csproj index 89e20243caa3..5d24c044d5e4 100644 --- a/src/coreclr/src/tools/ILVerification/ILVerification.csproj +++ b/src/coreclr/src/tools/ILVerification/ILVerification.csproj @@ -5,6 +5,7 @@ false true false + false netstandard2.0 AnyCPU diff --git a/src/coreclr/src/tools/ILVerification/ILVerification.projitems b/src/coreclr/src/tools/ILVerification/ILVerification.projitems index 0a7057578f7d..69ee3651a751 100644 --- a/src/coreclr/src/tools/ILVerification/ILVerification.projitems +++ b/src/coreclr/src/tools/ILVerification/ILVerification.projitems @@ -13,6 +13,11 @@ + + + ILVerification.Strings.resources + + $(MSBuildThisFileDirectory)..\Common\ diff --git a/src/coreclr/src/tools/ILVerification/ILVerifyTypeSystemContext.cs b/src/coreclr/src/tools/ILVerification/ILVerifyTypeSystemContext.cs index ae9c0171db01..2a238d5c58e8 100644 --- a/src/coreclr/src/tools/ILVerification/ILVerifyTypeSystemContext.cs +++ b/src/coreclr/src/tools/ILVerification/ILVerifyTypeSystemContext.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/ILVerification/IResolver.cs b/src/coreclr/src/tools/ILVerification/IResolver.cs index aec09c82a70c..9581a9c71827 100644 --- a/src/coreclr/src/tools/ILVerification/IResolver.cs +++ b/src/coreclr/src/tools/ILVerification/IResolver.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Reflection; diff --git a/src/coreclr/src/tools/ILVerification/InstantiatedGenericParameter.cs b/src/coreclr/src/tools/ILVerification/InstantiatedGenericParameter.cs index a767de4fec9b..588bcbd274f7 100644 --- a/src/coreclr/src/tools/ILVerification/InstantiatedGenericParameter.cs +++ b/src/coreclr/src/tools/ILVerification/InstantiatedGenericParameter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/ILVerification/SimpleArrayOfTRuntimeInterfacesAlgorithm.cs b/src/coreclr/src/tools/ILVerification/SimpleArrayOfTRuntimeInterfacesAlgorithm.cs index 5e62168f0269..3a08440c4fa7 100644 --- a/src/coreclr/src/tools/ILVerification/SimpleArrayOfTRuntimeInterfacesAlgorithm.cs +++ b/src/coreclr/src/tools/ILVerification/SimpleArrayOfTRuntimeInterfacesAlgorithm.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/coreclr/src/tools/ILVerification/TypeSystemHelpers.cs b/src/coreclr/src/tools/ILVerification/TypeSystemHelpers.cs index 52c5fd987cdb..1c0841252b6e 100644 --- a/src/coreclr/src/tools/ILVerification/TypeSystemHelpers.cs +++ b/src/coreclr/src/tools/ILVerification/TypeSystemHelpers.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Internal.TypeSystem; diff --git a/src/coreclr/src/tools/ILVerification/TypeVerifier.cs b/src/coreclr/src/tools/ILVerification/TypeVerifier.cs index 0b04accec8fa..2005ae08d60d 100644 --- a/src/coreclr/src/tools/ILVerification/TypeVerifier.cs +++ b/src/coreclr/src/tools/ILVerification/TypeVerifier.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/ILVerification/VerificationResult.cs b/src/coreclr/src/tools/ILVerification/VerificationResult.cs index 0d1f30881c0b..1d6a6c3801ce 100644 --- a/src/coreclr/src/tools/ILVerification/VerificationResult.cs +++ b/src/coreclr/src/tools/ILVerification/VerificationResult.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Reflection.Metadata; using Internal.TypeSystem; diff --git a/src/coreclr/src/tools/ILVerification/Verifier.cs b/src/coreclr/src/tools/ILVerification/Verifier.cs index 84e9a488889e..db15494289a0 100644 --- a/src/coreclr/src/tools/ILVerification/Verifier.cs +++ b/src/coreclr/src/tools/ILVerification/Verifier.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/ILVerification/VerifierError.cs b/src/coreclr/src/tools/ILVerification/VerifierError.cs index 2e62d73037da..331d0a88544e 100644 --- a/src/coreclr/src/tools/ILVerification/VerifierError.cs +++ b/src/coreclr/src/tools/ILVerification/VerifierError.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace ILVerify { diff --git a/src/coreclr/src/tools/ILVerify/ILVerify.csproj b/src/coreclr/src/tools/ILVerify/ILVerify.csproj index 95cb3700c141..aeb5b5d8605c 100644 --- a/src/coreclr/src/tools/ILVerify/ILVerify.csproj +++ b/src/coreclr/src/tools/ILVerify/ILVerify.csproj @@ -15,7 +15,7 @@ CommandLine\CommandLineHelpers.cs - + diff --git a/src/coreclr/src/tools/ILVerify/Program.cs b/src/coreclr/src/tools/ILVerify/Program.cs index 0157a619b544..b9fbf35d8276 100644 --- a/src/coreclr/src/tools/ILVerify/Program.cs +++ b/src/coreclr/src/tools/ILVerify/Program.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/InjectResource/InjectResource.cpp b/src/coreclr/src/tools/InjectResource/InjectResource.cpp index 9f4d483a8b25..61f49f5d3c73 100644 --- a/src/coreclr/src/tools/InjectResource/InjectResource.cpp +++ b/src/coreclr/src/tools/InjectResource/InjectResource.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include #include diff --git a/src/coreclr/src/tools/InjectResource/native.rc b/src/coreclr/src/tools/InjectResource/native.rc index 4c1007fd9a96..3c494dcd8625 100644 --- a/src/coreclr/src/tools/InjectResource/native.rc +++ b/src/coreclr/src/tools/InjectResource/native.rc @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #define FX_VER_FILEDESCRIPTION_STR "Microsoft\0" #include diff --git a/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/ComputedStaticDependencyNode.cs b/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/ComputedStaticDependencyNode.cs index 34f66083125b..224f4182b5b6 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/ComputedStaticDependencyNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/ComputedStaticDependencyNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyAnalyzer.cs b/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyAnalyzer.cs index ffd9293d79ff..351b0094ebf7 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyAnalyzer.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyAnalyzer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyAnalyzerBase.cs b/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyAnalyzerBase.cs index 56878094dc0b..ea62d5f351f0 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyAnalyzerBase.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyAnalyzerBase.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyNode.cs b/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyNode.cs index 06232bd6a4ff..fdee41a043e8 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyNodeCore.cs b/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyNodeCore.cs index 9b01f5eb3564..43d3cb6d282f 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyNodeCore.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyNodeCore.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/DgmlWriter.cs b/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/DgmlWriter.cs index 31386ca78d1f..a1c1dbe57d54 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/DgmlWriter.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/DgmlWriter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/EventSourceLogStrategy.cs b/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/EventSourceLogStrategy.cs index 82e2c5b25a91..4595d0ab07e5 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/EventSourceLogStrategy.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/EventSourceLogStrategy.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/FirstMarkLogStrategy.cs b/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/FirstMarkLogStrategy.cs index ddab08988fcb..c2c641a7eced 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/FirstMarkLogStrategy.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/FirstMarkLogStrategy.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/FullGraphLogStrategy.cs b/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/FullGraphLogStrategy.cs index 32e171c8d7ad..c5d716a0c592 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/FullGraphLogStrategy.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/FullGraphLogStrategy.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/IDependencyAnalysisMarkStrategy.cs b/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/IDependencyAnalysisMarkStrategy.cs index ccb5afb23c5c..61faf7e624ad 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/IDependencyAnalysisMarkStrategy.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/IDependencyAnalysisMarkStrategy.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/IDependencyAnalyzerLogEdgeVisitor.cs b/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/IDependencyAnalyzerLogEdgeVisitor.cs index a8c5756f5fb4..422471119d96 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/IDependencyAnalyzerLogEdgeVisitor.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/IDependencyAnalyzerLogEdgeVisitor.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/IDependencyAnalyzerLogNodeVisitor.cs b/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/IDependencyAnalyzerLogNodeVisitor.cs index 630bb56c44d9..9d3b027a81b1 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/IDependencyAnalyzerLogNodeVisitor.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/IDependencyAnalyzerLogNodeVisitor.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/IDependencyNode.cs b/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/IDependencyNode.cs index 71f07f3fb8e0..6ae00bd7eec7 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/IDependencyNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/IDependencyNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/NoLogStrategy.cs b/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/NoLogStrategy.cs index bd2b9d3a805c..da0b2b8e3664 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/NoLogStrategy.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/NoLogStrategy.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/PerfEventSource.cs b/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/PerfEventSource.cs index 6a30fe1d6db2..131d433b05c1 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/PerfEventSource.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.DependencyAnalysisFramework/PerfEventSource.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics.Tracing; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/CodeGen/ReadyToRunObjectWriter.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/CodeGen/ReadyToRunObjectWriter.cs index e032bda1e164..18f7ffbb9003 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/CodeGen/ReadyToRunObjectWriter.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/CodeGen/ReadyToRunObjectWriter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/CompilationModuleGroup.ReadyToRun.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/CompilationModuleGroup.ReadyToRun.cs index acd8aa324e2a..2312ecc1c4a7 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/CompilationModuleGroup.ReadyToRun.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/CompilationModuleGroup.ReadyToRun.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Internal.TypeSystem; using ILCompiler.DependencyAnalysis.ReadyToRun; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/AllMethodsOnTypeNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/AllMethodsOnTypeNode.cs index 7d7e9fd82636..1585861242d2 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/AllMethodsOnTypeNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/AllMethodsOnTypeNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ArrayOfEmbeddedDataNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ArrayOfEmbeddedDataNode.cs index 7cfec07fa653..fba4e0506177 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ArrayOfEmbeddedDataNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ArrayOfEmbeddedDataNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ArrayOfEmbeddedPointersNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ArrayOfEmbeddedPointersNode.cs index b70ed3378277..8fba1bae53a3 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ArrayOfEmbeddedPointersNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ArrayOfEmbeddedPointersNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/EmbeddedObjectNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/EmbeddedObjectNode.cs index 0db837e0c9d3..511f91cbb56f 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/EmbeddedObjectNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/EmbeddedObjectNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/EmbeddedPointerIndirectionNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/EmbeddedPointerIndirectionNode.cs index 0b12be37e7bf..57d2ad9756f6 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/EmbeddedPointerIndirectionNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/EmbeddedPointerIndirectionNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ArgIterator.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ArgIterator.cs index cc70462c1445..9c56ff338e8a 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ArgIterator.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ArgIterator.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // Provides an abstraction over platform specific calling conventions (specifically, the calling convention // utilized by the JIT on that platform). The caller enumerates each argument of a signature in turn, and is diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/AssemblyTableNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/AssemblyTableNode.cs index 9a0bdb248e11..8a7e5770f788 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/AssemblyTableNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/AssemblyTableNode.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/AttributePresenceFilterNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/AttributePresenceFilterNode.cs index 134aa6569e4b..d4c08fdf2243 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/AttributePresenceFilterNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/AttributePresenceFilterNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ByteArrayComparer.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ByteArrayComparer.cs index 5d356c5bd14d..ef1d48ee6403 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ByteArrayComparer.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ByteArrayComparer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/CompilerIdentifierNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/CompilerIdentifierNode.cs index f97c5f298707..5ebf2e4f3411 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/CompilerIdentifierNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/CompilerIdentifierNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Text; using Internal.Text; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/CopiedCorHeaderNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/CopiedCorHeaderNode.cs index 87772fa7079f..50a44f4a2f5e 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/CopiedCorHeaderNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/CopiedCorHeaderNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Reflection.Metadata; using System.Reflection.PortableExecutable; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/CopiedFieldRvaNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/CopiedFieldRvaNode.cs index 7c5240fbd33c..8adc7341210b 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/CopiedFieldRvaNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/CopiedFieldRvaNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Immutable; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/CopiedManagedResourcesNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/CopiedManagedResourcesNode.cs index 840cb8e5927c..6a292c40750d 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/CopiedManagedResourcesNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/CopiedManagedResourcesNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Reflection.PortableExecutable; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/CopiedMetadataBlobNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/CopiedMetadataBlobNode.cs index aedf3037cd09..8f0ae4281c31 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/CopiedMetadataBlobNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/CopiedMetadataBlobNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Reflection.Metadata; using System.Reflection.Metadata.Ecma335; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/CopiedMethodILNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/CopiedMethodILNode.cs index a13d18f125ae..2ff052a4a72f 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/CopiedMethodILNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/CopiedMethodILNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Reflection.Metadata; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/CopiedStrongNameSignatureNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/CopiedStrongNameSignatureNode.cs index ee6067260ada..d46f742a372d 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/CopiedStrongNameSignatureNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/CopiedStrongNameSignatureNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Reflection.PortableExecutable; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/DebugDirectoryEntryNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/DebugDirectoryEntryNode.cs index 6a691d831c19..9aa6e6bbc460 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/DebugDirectoryEntryNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/DebugDirectoryEntryNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/DebugDirectoryNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/DebugDirectoryNode.cs index 5c1bd729b64c..08093ecd3671 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/DebugDirectoryNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/DebugDirectoryNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/DebugInfoTableNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/DebugInfoTableNode.cs index 31540b3d302a..fd628b637a17 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/DebugInfoTableNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/DebugInfoTableNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/DelayLoadHelperImport.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/DelayLoadHelperImport.cs index d8f6c8f8d2c3..6802c0b4c50c 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/DelayLoadHelperImport.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/DelayLoadHelperImport.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/DelayLoadHelperMethodImport.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/DelayLoadHelperMethodImport.cs index 656a68f40c84..3bf386801c68 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/DelayLoadHelperMethodImport.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/DelayLoadHelperMethodImport.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/DelayLoadMethodImport.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/DelayLoadMethodImport.cs new file mode 100644 index 000000000000..47451cadd92f --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/DelayLoadMethodImport.cs @@ -0,0 +1,67 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Collections.Generic; + +using Internal.JitInterface; +using Internal.TypeSystem; +using Internal.ReadyToRunConstants; + +namespace ILCompiler.DependencyAnalysis.ReadyToRun +{ + public class DelayLoadMethodImport : DelayLoadHelperImport, IMethodNode + { + private readonly MethodWithGCInfo _localMethod; + private readonly MethodWithToken _method; + + public DelayLoadMethodImport( + NodeFactory factory, + ReadyToRunFixupKind fixupKind, + MethodWithToken method, + MethodWithGCInfo localMethod, + bool isInstantiatingStub) + : base( + factory, + factory.MethodImports, + ReadyToRunHelper.DelayLoad_MethodCall, + factory.MethodSignature( + fixupKind, + method, + isInstantiatingStub)) + { + _localMethod = localMethod; + _method = method; + } + + public MethodDesc Method => _method.Method; + public MethodWithGCInfo MethodCodeNode => _localMethod; + + public override int ClassCode => 459923351; + + public override IEnumerable GetStaticDependencies(NodeFactory factory) + { + foreach (DependencyListEntry entry in base.GetStaticDependencies(factory)) + { + yield return entry; + } + if (_localMethod != null) + yield return new DependencyListEntry(_localMethod, "Local method import"); + } + + public override int CompareToImpl(ISortableNode other, CompilerComparer comparer) + { + if ((_localMethod != null) && (((DelayLoadMethodImport)other)._localMethod != null)) + { + int result = comparer.Compare(_localMethod, ((DelayLoadMethodImport)other)._localMethod); + if (result != 0) + return result; + } + else if (_localMethod != null) + return 1; + else if (((DelayLoadMethodImport)other)._localMethod != null) + return -1; + + return base.CompareToImpl(other, comparer); + } + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/DelegateCtorSignature.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/DelegateCtorSignature.cs index 4a3566fbdcab..5c2650c52616 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/DelegateCtorSignature.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/DelegateCtorSignature.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Internal.TypeSystem; using Internal.JitInterface; @@ -44,11 +43,10 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false) SignatureContext innerContext = builder.EmitFixup(factory, ReadyToRunFixupKind.DelegateCtor, _methodToken.Module, factory.SignatureContext); builder.EmitMethodSignature( - new MethodWithToken(_targetMethod.Method, _methodToken, constrainedType: null), + new MethodWithToken(_targetMethod.Method, _methodToken, constrainedType: null, unboxing: false), enforceDefEncoding: false, enforceOwningType: false, innerContext, - isUnboxingStub: false, isInstantiatingStub: _targetMethod.Method.HasInstantiation); builder.EmitTypeSignature(_delegateType, innerContext); diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/DevirtualizationManager.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/DevirtualizationManager.cs index ed34d69a27ed..189dd6a0adc5 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/DevirtualizationManager.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/DevirtualizationManager.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Internal.TypeSystem; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ExceptionInfoLookupTableNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ExceptionInfoLookupTableNode.cs index ecef116e6a08..d340b62e6dca 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ExceptionInfoLookupTableNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ExceptionInfoLookupTableNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ExternalMethodImport.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ExternalMethodImport.cs deleted file mode 100644 index 1e57fe0312dd..000000000000 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ExternalMethodImport.cs +++ /dev/null @@ -1,45 +0,0 @@ - -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Internal.JitInterface; -using Internal.TypeSystem; -using Internal.ReadyToRunConstants; - -namespace ILCompiler.DependencyAnalysis.ReadyToRun -{ - public class ExternalMethodImport : DelayLoadHelperImport, IMethodNode - { - private readonly MethodWithToken _method; - - public ExternalMethodImport( - NodeFactory factory, - ReadyToRunFixupKind fixupKind, - MethodWithToken method, - bool isUnboxingStub, - bool isInstantiatingStub) - : base( - factory, - factory.MethodImports, - ReadyToRunHelper.DelayLoad_MethodCall, - factory.MethodSignature( - fixupKind, - method, - isUnboxingStub, - isInstantiatingStub)) - { - _method = method; - } - - public MethodDesc Method => _method.Method; - - public override int ClassCode => 458823351; - - // This is just here in case of future extension (_method is already compared in the base CompareToImpl) - public override int CompareToImpl(ISortableNode other, CompilerComparer comparer) - { - return base.CompareToImpl(other, comparer); - } - } -} diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/FieldFixupSignature.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/FieldFixupSignature.cs index 88abad8269ac..ebeb537f5f15 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/FieldFixupSignature.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/FieldFixupSignature.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -40,9 +39,19 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false) EcmaModule targetModule = factory.SignatureContext.GetTargetModule(_fieldDesc); SignatureContext innerContext = dataBuilder.EmitFixup(factory, _fixupKind, targetModule, factory.SignatureContext); - if (_fixupKind == ReadyToRunFixupKind.Check_FieldOffset) + if (_fixupKind == ReadyToRunFixupKind.Verify_FieldOffset) { - dataBuilder.EmitInt(_fieldDesc.Offset.AsInt); + TypeDesc baseType = _fieldDesc.OwningType.BaseType; + if ((_fieldDesc.OwningType.BaseType != null) && !_fieldDesc.IsStatic && !_fieldDesc.OwningType.IsValueType) + dataBuilder.EmitUInt((uint)_fieldDesc.OwningType.BaseType.InstanceByteCount.AsInt); + else + dataBuilder.EmitUInt(0); + } + + if ((_fixupKind == ReadyToRunFixupKind.Check_FieldOffset) || + (_fixupKind == ReadyToRunFixupKind.Verify_FieldOffset)) + { + dataBuilder.EmitUInt((uint)_fieldDesc.Offset.AsInt); } dataBuilder.EmitFieldSignature(_fieldDesc, innerContext); diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/GCRefMapBuilder.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/GCRefMapBuilder.cs index cfe405663be2..624f464e7ea2 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/GCRefMapBuilder.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/GCRefMapBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/GCRefMapNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/GCRefMapNode.cs index 8488c2765f14..e81024fc92da 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/GCRefMapNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/GCRefMapNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/GenericLookupSignature.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/GenericLookupSignature.cs index a0aa10fe80c5..e806bdb317c9 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/GenericLookupSignature.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/GenericLookupSignature.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; @@ -106,12 +105,13 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false) dataBuilder.EmitByte((byte)_fixupKind); if (_methodArgument != null) { + Debug.Assert(_methodArgument.Unboxing == false); + dataBuilder.EmitMethodSignature( _methodArgument, enforceDefEncoding: false, enforceOwningType: false, context: innerContext, - isUnboxingStub: false, isInstantiatingStub: true); } else if (_typeArgument != null) @@ -210,7 +210,21 @@ public override int CompareToImpl(ISortableNode other, CompilerComparer comparer return result; } - return comparer.Compare(_methodContext.ContextMethod, otherNode._methodContext.ContextMethod); + var contextAsMethod = _methodContext.Context as MethodDesc; + var otherContextAsMethod = otherNode._methodContext.Context as MethodDesc; + if (contextAsMethod != null || otherContextAsMethod != null) + { + if (contextAsMethod == null) + return -1; + if (otherContextAsMethod == null) + return 1; + + return comparer.Compare(contextAsMethod, otherContextAsMethod); + } + else + { + return comparer.Compare(_methodContext.ContextType, otherNode._methodContext.ContextType); + } } } } diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/HeaderNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/HeaderNode.cs index 4f70333c0a4f..fe33cebfbe58 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/HeaderNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/HeaderNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Import.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Import.cs index ebd73a82552b..9e3840130fa2 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Import.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Import.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ImportSectionNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ImportSectionNode.cs index 8f929b2b30e1..4cdb5ca96e43 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ImportSectionNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ImportSectionNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ImportSectionsTableNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ImportSectionsTableNode.cs index b6aa1e5532ef..1635b502ef2c 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ImportSectionsTableNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ImportSectionsTableNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Internal.TypeSystem; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ImportThunk.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ImportThunk.cs index d54472dc122e..7b5d1b4bdbd6 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ImportThunk.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ImportThunk.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Internal.Text; using Internal.ReadyToRunConstants; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/InliningInfoNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/InliningInfoNode.cs index 94718e3b965e..65e1f5a389a3 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/InliningInfoNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/InliningInfoNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/InstanceEntryPointTableNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/InstanceEntryPointTableNode.cs index cf1c1958d71a..e337c0ea7120 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/InstanceEntryPointTableNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/InstanceEntryPointTableNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -62,11 +61,10 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false) ArraySignatureBuilder signatureBuilder = new ArraySignatureBuilder(); signatureBuilder.EmitMethodSignature( - new MethodWithToken(method.Method, moduleToken, constrainedType: null), + new MethodWithToken(method.Method, moduleToken, constrainedType: null, unboxing: false), enforceDefEncoding: true, enforceOwningType: _factory.CompilationModuleGroup.EnforceOwningType(moduleToken.Module), factory.SignatureContext, - isUnboxingStub: false, isInstantiatingStub: false); byte[] signature = signatureBuilder.ToArray(); BlobVertex signatureBlob; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/LocalMethodImport.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/LocalMethodImport.cs deleted file mode 100644 index 55f634292bd2..000000000000 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/LocalMethodImport.cs +++ /dev/null @@ -1,63 +0,0 @@ - -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Collections.Generic; - -using Internal.JitInterface; -using Internal.TypeSystem; -using Internal.ReadyToRunConstants; - -namespace ILCompiler.DependencyAnalysis.ReadyToRun -{ - public class LocalMethodImport : DelayLoadHelperImport, IMethodNode - { - private readonly MethodWithGCInfo _localMethod; - private readonly MethodWithToken _method; - - public LocalMethodImport( - NodeFactory factory, - ReadyToRunFixupKind fixupKind, - MethodWithToken method, - MethodWithGCInfo localMethod, - bool isUnboxingStub, - bool isInstantiatingStub) - : base( - factory, - factory.MethodImports, - ReadyToRunHelper.DelayLoad_MethodCall, - factory.MethodSignature( - fixupKind, - method, - isUnboxingStub, - isInstantiatingStub)) - { - _localMethod = localMethod; - _method = method; - } - - public MethodDesc Method => _method.Method; - public MethodWithGCInfo MethodCodeNode => _localMethod; - - public override int ClassCode => 459923351; - - public override IEnumerable GetStaticDependencies(NodeFactory factory) - { - foreach (DependencyListEntry entry in base.GetStaticDependencies(factory)) - { - yield return entry; - } - yield return new DependencyListEntry(_localMethod, "Local method import"); - } - - public override int CompareToImpl(ISortableNode other, CompilerComparer comparer) - { - int result = comparer.Compare(_localMethod, ((LocalMethodImport)other)._localMethod); - if (result != 0) - return result; - - return base.CompareToImpl(other, comparer); - } - } -} diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ManifestMetadataTableNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ManifestMetadataTableNode.cs index b54979b1447d..e7d985817536 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ManifestMetadataTableNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ManifestMetadataTableNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/MethodEntryPointTableNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/MethodEntryPointTableNode.cs index 4644a60b4ac0..a3483994c86e 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/MethodEntryPointTableNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/MethodEntryPointTableNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/MethodFixupSignature.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/MethodFixupSignature.cs index 7461e662a291..6c07ad33df00 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/MethodFixupSignature.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/MethodFixupSignature.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -19,19 +18,15 @@ public class MethodFixupSignature : Signature private readonly MethodWithToken _method; - private readonly bool _isUnboxingStub; - private readonly bool _isInstantiatingStub; public MethodFixupSignature( ReadyToRunFixupKind fixupKind, - MethodWithToken method, - bool isUnboxingStub, + MethodWithToken method, bool isInstantiatingStub) { _fixupKind = fixupKind; _method = method; - _isUnboxingStub = isUnboxingStub; _isInstantiatingStub = isInstantiatingStub; // Ensure types in signature are loadable and resolvable, otherwise we'll fail later while emitting the signature @@ -45,7 +40,7 @@ public MethodFixupSignature( public override int ClassCode => 150063499; - public bool IsUnboxingStub => _isUnboxingStub; + public bool IsUnboxingStub => _method.Unboxing; public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false) { @@ -61,7 +56,7 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false) // Optimize some of the fixups into a more compact form ReadyToRunFixupKind fixupKind = _fixupKind; bool optimized = false; - if (!_isUnboxingStub && !_isInstantiatingStub && _method.ConstrainedType == null && + if (!_method.Unboxing && !_isInstantiatingStub && _method.ConstrainedType == null && fixupKind == ReadyToRunFixupKind.MethodEntry) { if (!_method.Method.OwningType.HasInstantiation && !_method.Method.OwningType.IsArray) @@ -85,13 +80,13 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false) { if (method.Token.TokenType == CorTokenType.mdtMethodSpec) { - method = new MethodWithToken(method.Method, factory.SignatureContext.GetModuleTokenForMethod(method.Method, throwIfNotFound: false), method.ConstrainedType); + method = new MethodWithToken(method.Method, factory.SignatureContext.GetModuleTokenForMethod(method.Method, throwIfNotFound: false), method.ConstrainedType, unboxing: _method.Unboxing); } else if (!optimized && (method.Token.TokenType == CorTokenType.mdtMemberRef)) { if (method.Method.OwningType.GetTypeDefinition() is EcmaType) { - method = new MethodWithToken(method.Method, factory.SignatureContext.GetModuleTokenForMethod(method.Method, throwIfNotFound: false), method.ConstrainedType); + method = new MethodWithToken(method.Method, factory.SignatureContext.GetModuleTokenForMethod(method.Method, throwIfNotFound: false), method.ConstrainedType, unboxing: _method.Unboxing); } } } @@ -108,7 +103,7 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false) } else { - dataBuilder.EmitMethodSignature(method, enforceDefEncoding: false, enforceOwningType: false, innerContext, _isUnboxingStub, _isInstantiatingStub); + dataBuilder.EmitMethodSignature(method, enforceDefEncoding: false, enforceOwningType: false, innerContext, _isInstantiatingStub); } return dataBuilder.ToObjectData(); @@ -119,10 +114,6 @@ public override void AppendMangledName(NameMangler nameMangler, Utf8StringBuilde sb.Append(nameMangler.CompilationUnitPrefix); sb.Append($@"MethodFixupSignature("); sb.Append(_fixupKind.ToString()); - if (_isUnboxingStub) - { - sb.Append(" [UNBOX]"); - } if (_isInstantiatingStub) { sb.Append(" [INST]"); @@ -138,10 +129,6 @@ public override int CompareToImpl(ISortableNode other, CompilerComparer comparer if (result != 0) return result; - result = _isUnboxingStub.CompareTo(otherNode._isUnboxingStub); - if (result != 0) - return result; - result = _isInstantiatingStub.CompareTo(otherNode._isInstantiatingStub); if (result != 0) return result; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/MethodGCInfoNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/MethodGCInfoNode.cs index e9c63096d168..18f7a17d84fa 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/MethodGCInfoNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/MethodGCInfoNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using Internal.Text; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/MethodWithGCInfo.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/MethodWithGCInfo.cs index ef1feaf20fb2..88685de9ba68 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/MethodWithGCInfo.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/MethodWithGCInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ModuleToken.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ModuleToken.cs index 71b52cdc0efd..484fef52a187 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ModuleToken.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ModuleToken.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ModuleTokenResolver.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ModuleTokenResolver.cs index 0bb2af7f3d1a..8ee9b426d562 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ModuleTokenResolver.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ModuleTokenResolver.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Concurrent; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/NewArrayFixupSignature.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/NewArrayFixupSignature.cs index 7372d0235de3..74942a3804a3 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/NewArrayFixupSignature.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/NewArrayFixupSignature.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Internal.Text; using Internal.TypeSystem; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/NewObjectFixupSignature.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/NewObjectFixupSignature.cs index acfeb03b34fd..9d1df9c0426d 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/NewObjectFixupSignature.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/NewObjectFixupSignature.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Internal.Text; using Internal.TypeSystem; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/NibbleWriter.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/NibbleWriter.cs index edb123e9b021..bb8994bc3209 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/NibbleWriter.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/NibbleWriter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/OwnerCompositeExecutableNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/OwnerCompositeExecutableNode.cs index 1c71fc826091..a9161481f1c2 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/OwnerCompositeExecutableNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/OwnerCompositeExecutableNode.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Text; using Internal.Text; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/PrecodeHelperImport.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/PrecodeHelperImport.cs index c9f685256fad..e155e39dbd43 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/PrecodeHelperImport.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/PrecodeHelperImport.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using Internal.Text; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/PrecodeMethodImport.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/PrecodeMethodImport.cs index d426faefa4b7..8d1d84d3e445 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/PrecodeMethodImport.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/PrecodeMethodImport.cs @@ -1,7 +1,5 @@ - // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; @@ -22,14 +20,12 @@ public PrecodeMethodImport( ReadyToRunFixupKind fixupKind, MethodWithToken method, MethodWithGCInfo localMethod, - bool isUnboxingStub, bool isInstantiatingStub) : base ( factory, factory.MethodSignature( fixupKind, method, - isUnboxingStub, isInstantiatingStub) ) { @@ -55,14 +51,22 @@ public override IEnumerable GetStaticDependencies(NodeFacto { yield return entry; } - yield return new DependencyListEntry(_localMethod, "Precode Method Import"); + if (_localMethod != null) + yield return new DependencyListEntry(_localMethod, "Precode Method Import"); } public override int CompareToImpl(ISortableNode other, CompilerComparer comparer) { - int result = comparer.Compare(_localMethod, ((PrecodeMethodImport)other)._localMethod); - if (result != 0) - return result; + if ((_localMethod != null) && (((PrecodeMethodImport)other)._localMethod != null)) + { + int result = comparer.Compare(_localMethod, ((PrecodeMethodImport)other)._localMethod); + if (result != 0) + return result; + } + else if (_localMethod != null) + return 1; + else if (((PrecodeMethodImport)other)._localMethod != null) + return -1; return base.CompareToImpl(other, comparer); } diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ProfileDataNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ProfileDataNode.cs index 16832b6cd058..0a4b2b89120d 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ProfileDataNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ProfileDataNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ProfileDataSectionNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ProfileDataSectionNode.cs index 44d6282410c1..4c5337f01fe1 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ProfileDataSectionNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ProfileDataSectionNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Internal.Text; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ReadyToRunHelperSignature.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ReadyToRunHelperSignature.cs index 8d05e925e5f2..a2e4dffb97d4 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ReadyToRunHelperSignature.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ReadyToRunHelperSignature.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ReadyToRunInstructionSetSupportSignature.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ReadyToRunInstructionSetSupportSignature.cs index 020287cd27f2..b7c773d133e5 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ReadyToRunInstructionSetSupportSignature.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ReadyToRunInstructionSetSupportSignature.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/RuntimeFunctionsGCInfoNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/RuntimeFunctionsGCInfoNode.cs index 0d6c9dcac648..e06fd16bb861 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/RuntimeFunctionsGCInfoNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/RuntimeFunctionsGCInfoNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace ILCompiler.DependencyAnalysis.ReadyToRun { diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/RuntimeFunctionsTableNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/RuntimeFunctionsTableNode.cs index 990149829b02..24dd8d91c5a1 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/RuntimeFunctionsTableNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/RuntimeFunctionsTableNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Signature.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Signature.cs index 4e3eaa390ab7..194804498456 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Signature.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Signature.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Internal.Text; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/SignatureBuilder.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/SignatureBuilder.cs index 7362dea5a1d1..54b9849aed8c 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/SignatureBuilder.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/SignatureBuilder.cs @@ -1,5 +1,5 @@ +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -396,11 +396,10 @@ public void EmitMethodSignature( bool enforceDefEncoding, bool enforceOwningType, SignatureContext context, - bool isUnboxingStub, bool isInstantiatingStub) { uint flags = 0; - if (isUnboxingStub) + if (method.Unboxing) { flags |= (uint)ReadyToRunMethodSigFlags.READYTORUN_METHOD_SIG_UnboxingStub; } diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/SignatureContext.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/SignatureContext.cs index 02c28f585835..cbaf2f0218d3 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/SignatureContext.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/SignatureContext.cs @@ -1,5 +1,5 @@ +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Immutable; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/SignatureEmbeddedPointerIndirectionNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/SignatureEmbeddedPointerIndirectionNode.cs index c07b78b10e2f..0028ba58d3b0 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/SignatureEmbeddedPointerIndirectionNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/SignatureEmbeddedPointerIndirectionNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using ILCompiler.DependencyAnalysis.ReadyToRun; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/StringImport.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/StringImport.cs index ef9f5bb378b3..3df14226ae05 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/StringImport.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/StringImport.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/StringImportSignature.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/StringImportSignature.cs index b44e178738b7..76e1e864d74d 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/StringImportSignature.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/StringImportSignature.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Internal.Text; using Internal.ReadyToRunConstants; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Target_ARM/ImportThunk.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Target_ARM/ImportThunk.cs index 2741f442347f..6dc9dc9c349b 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Target_ARM/ImportThunk.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Target_ARM/ImportThunk.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Internal.Text; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Target_ARM64/ImportThunk.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Target_ARM64/ImportThunk.cs index b8d18bdff157..36f24de12be8 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Target_ARM64/ImportThunk.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Target_ARM64/ImportThunk.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Target_X64/ImportThunk.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Target_X64/ImportThunk.cs index 554953a27f14..7aafbf796d6c 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Target_X64/ImportThunk.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Target_X64/ImportThunk.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Internal.Text; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Target_X86/ImportThunk.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Target_X86/ImportThunk.cs index 28966aaf743a..2cea702b8d99 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Target_X86/ImportThunk.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Target_X86/ImportThunk.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Internal.Text; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/TransitionBlock.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/TransitionBlock.cs index bc8c9d17bacb..e698e54ad58f 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/TransitionBlock.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/TransitionBlock.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // Provides an abstraction over platform specific calling conventions (specifically, the calling convention // utilized by the JIT on that platform). The caller enumerates each argument of a signature in turn, and is diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/TypeFixupSignature.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/TypeFixupSignature.cs index 9a9184e085d1..0bc86c7794cb 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/TypeFixupSignature.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/TypeFixupSignature.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; @@ -43,7 +42,8 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false) SignatureContext innerContext = dataBuilder.EmitFixup(factory, _fixupKind, targetModule, factory.SignatureContext); dataBuilder.EmitTypeSignature(_typeDesc, innerContext); - if (_fixupKind == ReadyToRunFixupKind.Check_TypeLayout) + if ((_fixupKind == ReadyToRunFixupKind.Check_TypeLayout) || + (_fixupKind == ReadyToRunFixupKind.Verify_TypeLayout)) { EncodeTypeLayout(dataBuilder, _typeDesc); } diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/TypesTableNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/TypesTableNode.cs index 502da243746c..03a9a1489140 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/TypesTableNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/TypesTableNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Win32ResourcesNode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Win32ResourcesNode.cs index ea37c34fd1c9..e66147e0beb3 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Win32ResourcesNode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Win32ResourcesNode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRunCodegenNodeFactory.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRunCodegenNodeFactory.cs index eeb590bce993..0a29f3ff689b 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRunCodegenNodeFactory.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRunCodegenNodeFactory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Concurrent; @@ -224,7 +223,6 @@ private void CreateNodeCaches() return new MethodFixupSignature( key.FixupKind, key.TypeAndMethod.Method, - key.TypeAndMethod.IsUnboxingStub, key.TypeAndMethod.IsInstantiatingStub ); }); @@ -246,7 +244,6 @@ private void CreateNodeCaches() MethodSignature( ReadyToRunFixupKind.VirtualEntry, key.Method, - isUnboxingStub: key.IsUnboxingStub, isInstantiatingStub: key.IsInstantiatingStub)); }); @@ -347,48 +344,39 @@ public Import GetReadyToRunHelperCell(ReadyToRunHelper helperId) private IMethodNode CreateMethodEntrypoint(TypeAndMethod key) { MethodWithToken method = key.Method; - bool isUnboxingStub = key.IsUnboxingStub; bool isInstantiatingStub = key.IsInstantiatingStub; bool isPrecodeImportRequired = key.IsPrecodeImportRequired; MethodDesc compilableMethod = method.Method.GetCanonMethodTarget(CanonicalFormKind.Specific); + MethodWithGCInfo methodWithGCInfo = null; + if (CompilationModuleGroup.ContainsMethodBody(compilableMethod, false)) { - if (isPrecodeImportRequired) - { - return new PrecodeMethodImport( - this, - ReadyToRunFixupKind.MethodEntry, - method, - CompiledMethodNode(compilableMethod), - isUnboxingStub, - isInstantiatingStub); - } - else - { - return new LocalMethodImport( - this, - ReadyToRunFixupKind.MethodEntry, - method, - CompiledMethodNode(compilableMethod), - isUnboxingStub, - isInstantiatingStub); - } + methodWithGCInfo = CompiledMethodNode(compilableMethod); + } + + if (isPrecodeImportRequired) + { + return new PrecodeMethodImport( + this, + ReadyToRunFixupKind.MethodEntry, + method, + methodWithGCInfo, + isInstantiatingStub); } else { - // First time we see a given external method - emit indirection cell and the import entry - return new ExternalMethodImport( + return new DelayLoadMethodImport( this, ReadyToRunFixupKind.MethodEntry, method, - isUnboxingStub, + methodWithGCInfo, isInstantiatingStub); } } - public IMethodNode MethodEntrypoint(MethodWithToken method, bool isUnboxingStub, bool isInstantiatingStub, bool isPrecodeImportRequired) + public IMethodNode MethodEntrypoint(MethodWithToken method, bool isInstantiatingStub, bool isPrecodeImportRequired) { - TypeAndMethod key = new TypeAndMethod(method.ConstrainedType, method, isUnboxingStub, isInstantiatingStub, isPrecodeImportRequired); + TypeAndMethod key = new TypeAndMethod(method.ConstrainedType, method, isInstantiatingStub, isPrecodeImportRequired); return _importMethods.GetOrAdd(key); } @@ -407,11 +395,11 @@ public IEnumerable EnumerateCompiledMethods(EcmaModule moduleT EcmaModule module = ((EcmaMethod)method.GetTypicalMethodDefinition()).Module; ModuleToken moduleToken = Resolver.GetModuleTokenForMethod(method, throwIfNotFound: true); - IMethodNode methodNodeDebug = MethodEntrypoint(new MethodWithToken(method, moduleToken, constrainedType: null), false, false, false); + IMethodNode methodNodeDebug = MethodEntrypoint(new MethodWithToken(method, moduleToken, constrainedType: null, unboxing: false), false, false); MethodWithGCInfo methodCodeNodeDebug = methodNodeDebug as MethodWithGCInfo; - if (methodCodeNodeDebug == null && methodNodeDebug is LocalMethodImport localMethodImport) + if (methodCodeNodeDebug == null && methodNodeDebug is DelayLoadMethodImport DelayLoadMethodImport) { - methodCodeNodeDebug = localMethodImport.MethodCodeNode; + methodCodeNodeDebug = DelayLoadMethodImport.MethodCodeNode; } if (methodCodeNodeDebug == null && methodNodeDebug is PrecodeMethodImport precodeMethodImport) { @@ -459,10 +447,9 @@ public override int GetHashCode() public MethodFixupSignature MethodSignature( ReadyToRunFixupKind fixupKind, MethodWithToken method, - bool isUnboxingStub, bool isInstantiatingStub) { - TypeAndMethod key = new TypeAndMethod(method.ConstrainedType, method, isUnboxingStub, isInstantiatingStub, false); + TypeAndMethod key = new TypeAndMethod(method.ConstrainedType, method, isInstantiatingStub, false); return _methodSignatures.GetOrAdd(new MethodFixupKey(fixupKind, key)); } diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRunSymbolNodeFactory.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRunSymbolNodeFactory.cs index aeca8c8da3b2..7ae68230d8a6 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRunSymbolNodeFactory.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRunSymbolNodeFactory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using ILCompiler.DependencyAnalysis.ReadyToRun; @@ -38,10 +37,14 @@ public enum ReadyToRunHelperId public sealed class ReadyToRunSymbolNodeFactory { private readonly NodeFactory _codegenNodeFactory; + private readonly bool _verifyTypeAndFieldLayout; - public ReadyToRunSymbolNodeFactory(NodeFactory codegenNodeFactory) + public bool VerifyTypeAndFieldLayout => _verifyTypeAndFieldLayout; + + public ReadyToRunSymbolNodeFactory(NodeFactory codegenNodeFactory, bool verifyTypeAndFieldLayout) { _codegenNodeFactory = codegenNodeFactory; + _verifyTypeAndFieldLayout = verifyTypeAndFieldLayout; CreateNodeCaches(); } @@ -91,7 +94,7 @@ private void CreateNodeCaches() { return new PrecodeHelperImport( _codegenNodeFactory, - new FieldFixupSignature(ReadyToRunFixupKind.Check_FieldOffset, key) + new FieldFixupSignature(_verifyTypeAndFieldLayout ? ReadyToRunFixupKind.Verify_FieldOffset : ReadyToRunFixupKind.Check_FieldOffset, key) ); }); @@ -106,7 +109,7 @@ private void CreateNodeCaches() useInstantiatingStub: false, _codegenNodeFactory.MethodSignature(ReadyToRunFixupKind.VirtualEntry, cellKey.Method, - cellKey.IsUnboxingStub, isInstantiatingStub: false), + isInstantiatingStub: false), cellKey.CallingMethod); }); @@ -114,7 +117,6 @@ private void CreateNodeCaches() { IMethodNode targetMethodNode = _codegenNodeFactory.MethodEntrypoint( ctorKey.Method, - isUnboxingStub: false, isInstantiatingStub: ctorKey.Method.Method.HasInstantiation, isPrecodeImportRequired: false); @@ -129,7 +131,7 @@ private void CreateNodeCaches() { return new PrecodeHelperImport( _codegenNodeFactory, - _codegenNodeFactory.TypeSignature(ReadyToRunFixupKind.Check_TypeLayout, key) + _codegenNodeFactory.TypeSignature(_verifyTypeAndFieldLayout ? ReadyToRunFixupKind.Verify_TypeLayout: ReadyToRunFixupKind.Check_TypeLayout, key) ); }); @@ -155,7 +157,6 @@ private void CreateNodeCaches() _codegenNodeFactory.MethodSignature( key.IsIndirect ? ReadyToRunFixupKind.IndirectPInvokeTarget : ReadyToRunFixupKind.PInvokeTarget, key.MethodWithToken, - isUnboxingStub: false, isInstantiatingStub: false)); }); } @@ -341,12 +342,6 @@ private ISymbolNode CreateTypeHandleHelper(TypeDesc type) private ISymbolNode CreateMethodHandleHelper(MethodWithToken method) { - bool useUnboxingStub = method.Method.IsUnboxingThunk(); - if (useUnboxingStub) - { - method = new MethodWithToken(method.Method.GetUnboxedMethod(), method.Token, method.ConstrainedType); - } - bool useInstantiatingStub = method.Method.GetCanonMethodTarget(CanonicalFormKind.Specific) != method.Method; return new PrecodeHelperImport( @@ -354,7 +349,6 @@ private ISymbolNode CreateMethodHandleHelper(MethodWithToken method) _codegenNodeFactory.MethodSignature( ReadyToRunFixupKind.MethodHandle, method, - isUnboxingStub: useUnboxingStub, isInstantiatingStub: useInstantiatingStub)); } @@ -388,8 +382,7 @@ private ISymbolNode CreateMethodDictionary(MethodWithToken method) _codegenNodeFactory, _codegenNodeFactory.MethodSignature( ReadyToRunFixupKind.MethodDictionary, - method, - isUnboxingStub: false, + method, isInstantiatingStub: true)); } @@ -423,9 +416,9 @@ public ISymbolNode FieldBaseOffset(TypeDesc typeDesc) private NodeCache _interfaceDispatchCells = new NodeCache(); - public ISymbolNode InterfaceDispatchCell(MethodWithToken method, bool isUnboxingStub, MethodDesc callingMethod) + public ISymbolNode InterfaceDispatchCell(MethodWithToken method, MethodDesc callingMethod) { - MethodAndCallSite cellKey = new MethodAndCallSite(method, isUnboxingStub, callingMethod); + MethodAndCallSite cellKey = new MethodAndCallSite(method, callingMethod); return _interfaceDispatchCells.GetOrAdd(cellKey); } @@ -436,7 +429,6 @@ public ISymbolNode DelegateCtor(TypeDesc delegateType, MethodWithToken method) TypeAndMethod ctorKey = new TypeAndMethod( delegateType, method, - isUnboxingStub: false, isInstantiatingStub: false, isPrecodeImportRequired: false); return _delegateCtors.GetOrAdd(ctorKey); @@ -452,19 +444,17 @@ public ISymbolNode CheckTypeLayout(TypeDesc type) struct MethodAndCallSite : IEquatable { public readonly MethodWithToken Method; - public readonly bool IsUnboxingStub; public readonly MethodDesc CallingMethod; - public MethodAndCallSite(MethodWithToken method, bool isUnboxingStub, MethodDesc callingMethod) + public MethodAndCallSite(MethodWithToken method, MethodDesc callingMethod) { - IsUnboxingStub = isUnboxingStub; Method = method; CallingMethod = callingMethod; } public bool Equals(MethodAndCallSite other) { - return Method.Equals(other.Method) && IsUnboxingStub == other.IsUnboxingStub && CallingMethod == other.CallingMethod; + return Method.Equals(other.Method) && CallingMethod == other.CallingMethod; } public override bool Equals(object obj) @@ -475,8 +465,7 @@ public override bool Equals(object obj) public override int GetHashCode() { return (CallingMethod != null ? unchecked(199 * CallingMethod.GetHashCode()) : 0) - ^ unchecked(31 * Method.GetHashCode()) - ^ (IsUnboxingStub ? -0x80000000 : 0); + ^ unchecked(31 * Method.GetHashCode()); } } diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/SortableDependencyNodeCompilerSpecific.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/SortableDependencyNodeCompilerSpecific.cs index 6efd2a868c8f..9c4df7c84f20 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/SortableDependencyNodeCompilerSpecific.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/SortableDependencyNodeCompilerSpecific.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/TypeAndMethod.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/TypeAndMethod.cs index 871e5a0ea78b..7b92613a2ab5 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/TypeAndMethod.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/TypeAndMethod.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -15,15 +14,13 @@ internal struct TypeAndMethod : IEquatable { public readonly TypeDesc Type; public readonly MethodWithToken Method; - public readonly bool IsUnboxingStub; public readonly bool IsInstantiatingStub; public readonly bool IsPrecodeImportRequired; - public TypeAndMethod(TypeDesc type, MethodWithToken method, bool isUnboxingStub, bool isInstantiatingStub, bool isPrecodeImportRequired) + public TypeAndMethod(TypeDesc type, MethodWithToken method, bool isInstantiatingStub, bool isPrecodeImportRequired) { Type = type; Method = method; - IsUnboxingStub = isUnboxingStub; IsInstantiatingStub = isInstantiatingStub; IsPrecodeImportRequired = isPrecodeImportRequired; } @@ -32,7 +29,6 @@ public bool Equals(TypeAndMethod other) { return Type == other.Type && Method.Equals(other.Method) && - IsUnboxingStub == other.IsUnboxingStub && IsInstantiatingStub == other.IsInstantiatingStub && IsPrecodeImportRequired == other.IsPrecodeImportRequired; } @@ -46,7 +42,6 @@ public override int GetHashCode() { return (Type?.GetHashCode() ?? 0) ^ unchecked(Method.GetHashCode() * 31) ^ - (IsUnboxingStub ? -0x80000000 : 0) ^ (IsInstantiatingStub ? 0x40000000 : 0) ^ (IsPrecodeImportRequired ? 0x20000000 : 0); } diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/IRootingServiceProvider.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/IRootingServiceProvider.cs index e6bfd1ff9d6a..0c0a504751bd 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/IRootingServiceProvider.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/IRootingServiceProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Internal.TypeSystem; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/MethodExtensions.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/MethodExtensions.cs index 1f1d3da49893..eabc035af092 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/MethodExtensions.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/MethodExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Internal.TypeSystem; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/NoMethodsCompilationModuleGroup.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/NoMethodsCompilationModuleGroup.cs index cc97f72a9526..a98dd12ef5b2 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/NoMethodsCompilationModuleGroup.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/NoMethodsCompilationModuleGroup.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using Internal.ReadyToRunConstants; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/PerfEventSource.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/PerfEventSource.cs index 6bc188b93373..0dc759dbe1df 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/PerfEventSource.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/PerfEventSource.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics.Tracing; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ProfileData.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ProfileData.cs index 476bdab749ed..fc113efd17be 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ProfileData.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ProfileData.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCodegenCompilation.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCodegenCompilation.cs index 5216e851df78..7062b6782452 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCodegenCompilation.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCodegenCompilation.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -253,7 +252,8 @@ internal ReadyToRunCodegenCompilation( ProfileDataManager profileData, ReadyToRunMethodLayoutAlgorithm methodLayoutAlgorithm, ReadyToRunFileLayoutAlgorithm fileLayoutAlgorithm, - int? customPESectionAlignment) + int? customPESectionAlignment, + bool verifyTypeAndFieldLayout) : base( dependencyGraph, nodeFactory, @@ -268,7 +268,7 @@ internal ReadyToRunCodegenCompilation( _parallelism = parallelism; _generateMapFile = generateMapFile; _customPESectionAlignment = customPESectionAlignment; - SymbolNodeFactory = new ReadyToRunSymbolNodeFactory(nodeFactory); + SymbolNodeFactory = new ReadyToRunSymbolNodeFactory(nodeFactory, verifyTypeAndFieldLayout); _corInfoImpls = new ConditionalWeakTable(); _inputFiles = inputFiles; _compositeRootPath = compositeRootPath; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCodegenCompilationBuilder.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCodegenCompilationBuilder.cs index e03372d9b2ac..61b92c8b8b9e 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCodegenCompilationBuilder.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCodegenCompilationBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -30,6 +29,7 @@ public sealed class ReadyToRunCodegenCompilationBuilder : CompilationBuilder private ReadyToRunMethodLayoutAlgorithm _r2rMethodLayoutAlgorithm; private ReadyToRunFileLayoutAlgorithm _r2rFileLayoutAlgorithm; private int? _customPESectionAlignment; + private bool _verifyTypeAndFieldLayout; private string _jitPath; private string _outputFile; @@ -150,6 +150,12 @@ public ReadyToRunCodegenCompilationBuilder UseCustomPESectionAlignment(int? cust return this; } + public ReadyToRunCodegenCompilationBuilder UseVerifyTypeAndFieldLayout(bool verifyTypeAndFieldLayout) + { + _verifyTypeAndFieldLayout = verifyTypeAndFieldLayout; + return this; + } + public override ICompilation ToCompilation() { // TODO: only copy COR headers for single-assembly build and for composite build with embedded MSIL @@ -238,7 +244,8 @@ public override ICompilation ToCompilation() _profileData, _r2rMethodLayoutAlgorithm, _r2rFileLayoutAlgorithm, - _customPESectionAlignment); + _customPESectionAlignment, + _verifyTypeAndFieldLayout); } } } diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCompilationModuleGroupBase.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCompilationModuleGroupBase.cs index 7524c5089523..2e0a760e9725 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCompilationModuleGroupBase.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCompilationModuleGroupBase.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCompilerContext.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCompilerContext.cs index bbe1274cae30..0f7fc68f0794 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCompilerContext.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCompilerContext.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunFileLayoutOptimizer.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunFileLayoutOptimizer.cs index 7cebefe317fc..28349ce9f985 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunFileLayoutOptimizer.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunFileLayoutOptimizer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunHashCode.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunHashCode.cs index dce784b8b426..19a643476ecd 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunHashCode.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunHashCode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunLibraryRootProvider.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunLibraryRootProvider.cs index 1870e8237468..a52c872eb9e0 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunLibraryRootProvider.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunLibraryRootProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunMetadataFieldLayoutAlgorithm.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunMetadataFieldLayoutAlgorithm.cs index 85e1f1b8d492..a9695ef00a0e 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunMetadataFieldLayoutAlgorithm.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunMetadataFieldLayoutAlgorithm.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunSingleAssemblyCompilationModuleGroup.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunSingleAssemblyCompilationModuleGroup.cs index 01a6c1a18cbf..44c3da463379 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunSingleAssemblyCompilationModuleGroup.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunSingleAssemblyCompilationModuleGroup.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunTableManager.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunTableManager.cs index 805d162b0490..8f37f8e9b62f 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunTableManager.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunTableManager.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/RuntimeDeterminedTypeHelper.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/RuntimeDeterminedTypeHelper.cs index fdd74ef3b651..18729cb4a754 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/RuntimeDeterminedTypeHelper.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/RuntimeDeterminedTypeHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/SingleMethodCompilationModuleGroup.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/SingleMethodCompilationModuleGroup.cs index f32c2295b550..ee98f72e4387 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/SingleMethodCompilationModuleGroup.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/SingleMethodCompilationModuleGroup.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using Internal.ReadyToRunConstants; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/SystemObjectFieldLayoutAlgorithm.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/SystemObjectFieldLayoutAlgorithm.cs index 8cdacd9e21e5..a88cdb011353 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/SystemObjectFieldLayoutAlgorithm.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/SystemObjectFieldLayoutAlgorithm.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Internal.TypeSystem; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IBC/IBCDataModel.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IBC/IBCDataModel.cs index 341a55261036..85a1df1fb402 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IBC/IBCDataModel.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IBC/IBCDataModel.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IBC/IBCDataReader.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IBC/IBCDataReader.cs index 996ba8e32295..fffa41f08168 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IBC/IBCDataReader.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IBC/IBCDataReader.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IBC/IBCProfileData.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IBC/IBCProfileData.cs index eaf1673f9417..143607a5c8a5 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IBC/IBCProfileData.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IBC/IBCProfileData.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IBC/IBCProfileParser.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IBC/IBCProfileParser.cs index 30592de3a932..c42ecaa13c1c 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IBC/IBCProfileParser.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IBC/IBCProfileParser.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IBC/MIbcProfileParser.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IBC/MIbcProfileParser.cs index 8741338b49fa..6a86e0629b42 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IBC/MIbcProfileParser.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IBC/MIbcProfileParser.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IBC/ReaderExtensions.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IBC/ReaderExtensions.cs index 69392010d034..c30de4b6edb3 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IBC/ReaderExtensions.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IBC/ReaderExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IL/ReadyToRunILProvider.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IL/ReadyToRunILProvider.cs index 311aed6f3d13..77d5987771ef 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IL/ReadyToRunILProvider.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IL/ReadyToRunILProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IL/Stubs/PInvokeILEmitter.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IL/Stubs/PInvokeILEmitter.cs index c55726522cd3..1bb6e66b5f8f 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IL/Stubs/PInvokeILEmitter.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/IL/Stubs/PInvokeILEmitter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net; @@ -79,6 +78,9 @@ private MethodIL EmitIL() if (!_importMetadata.Flags.PreserveSig) throw new NotSupportedException(); + if (_targetMethod.IsUnmanagedCallersOnly) + throw new NotSupportedException(); + if (_targetMethod.HasCustomAttribute("System.Runtime.InteropServices", "LCIDConversionAttribute")) throw new NotSupportedException(); diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/ILCompiler.ReadyToRun.csproj b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/ILCompiler.ReadyToRun.csproj index 6cb5da336d1d..099820c53e54 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/ILCompiler.ReadyToRun.csproj +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/ILCompiler.ReadyToRun.csproj @@ -126,7 +126,6 @@ - @@ -136,7 +135,7 @@ - + diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Interop/IL/Marshaller.ReadyToRun.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Interop/IL/Marshaller.ReadyToRun.cs index a19823367694..4ca7a6f95965 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Interop/IL/Marshaller.ReadyToRun.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Interop/IL/Marshaller.ReadyToRun.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Debug = System.Diagnostics.Debug; @@ -89,6 +88,9 @@ public static bool IsMarshallingRequired(MethodDesc targetMethod) { Debug.Assert(targetMethod.IsPInvoke); + if (targetMethod.IsUnmanagedCallersOnly) + return true; + PInvokeFlags flags = targetMethod.GetPInvokeMethodMetadata().Flags; if (flags.SetLastError) diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs index 08f83f537c2b..3c42b86ccb57 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -30,12 +29,15 @@ public class MethodWithToken public readonly MethodDesc Method; public readonly ModuleToken Token; public readonly TypeDesc ConstrainedType; + public readonly bool Unboxing; - public MethodWithToken(MethodDesc method, ModuleToken token, TypeDesc constrainedType) + public MethodWithToken(MethodDesc method, ModuleToken token, TypeDesc constrainedType, bool unboxing) { + Debug.Assert(!method.IsUnboxingThunk()); Method = method; Token = token; ConstrainedType = constrainedType; + Unboxing = unboxing; } public override bool Equals(object obj) @@ -51,7 +53,7 @@ public override int GetHashCode() public bool Equals(MethodWithToken methodWithToken) { - return Method == methodWithToken.Method && Token.Equals(methodWithToken.Token) && ConstrainedType == methodWithToken.ConstrainedType; + return Method == methodWithToken.Method && Token.Equals(methodWithToken.Token) && ConstrainedType == methodWithToken.ConstrainedType && Unboxing == methodWithToken.Unboxing; } public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb) @@ -64,6 +66,8 @@ public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb) } sb.Append("; "); sb.Append(Token.ToString()); + if (Unboxing) + sb.Append("; UNBOXING"); } public int CompareTo(MethodWithToken other, TypeSystemComparer comparer) @@ -85,7 +89,11 @@ public int CompareTo(MethodWithToken other, TypeSystemComparer comparer) if (result != 0) return result; - return Token.CompareTo(other.Token); + result = Token.CompareTo(other.Token); + if (result != 0) + return result; + + return Unboxing.CompareTo(other.Unboxing); } } @@ -140,8 +148,7 @@ unsafe partial class CorInfoImpl private OffsetMapping[] _debugLocInfos; private NativeVarInfo[] _debugVarInfos; private ArrayBuilder _inlinedMethods; - - private static readonly UnboxingMethodDescFactory s_unboxingThunkFactory = new UnboxingMethodDescFactory(); + private UnboxingMethodDescFactory _unboxingThunkFactory = new UnboxingMethodDescFactory(); public CorInfoImpl(ReadyToRunCodegenCompilation compilation) : this() @@ -188,6 +195,10 @@ public static bool ShouldSkipCompilation(MethodDesc methodNeedingCode) { return true; } + if (methodNeedingCode.IsInternalCall) + { + return true; + } if (methodNeedingCode.OwningType.IsDelegate && ( methodNeedingCode.IsConstructor || methodNeedingCode.Name == "BeginInvoke" || @@ -301,7 +312,7 @@ private bool getReadyToRunHelper(ref CORINFO_RESOLVED_TOKEN pResolvedToken, ref object helperArg = GetRuntimeDeterminedObjectForToken(ref pResolvedToken); if (helperArg is MethodDesc methodDesc) { - helperArg = new MethodWithToken(methodDesc, HandleToModuleToken(ref pResolvedToken), constrainedType); + helperArg = new MethodWithToken(methodDesc, HandleToModuleToken(ref pResolvedToken), constrainedType, unboxing: false); } GenericContext methodContext = new GenericContext(entityFromContext(pResolvedToken.tokenContext)); @@ -329,7 +340,9 @@ private void getReadyToRunDelegateCtorHelper(ref CORINFO_RESOLVED_TOKEN pTargetM #endif TypeDesc delegateTypeDesc = HandleToObject(delegateType); - MethodWithToken targetMethod = new MethodWithToken(HandleToObject(pTargetMethod.hMethod), HandleToModuleToken(ref pTargetMethod), constrainedType: null); + MethodDesc targetMethodDesc = HandleToObject(pTargetMethod.hMethod); + Debug.Assert(!targetMethodDesc.IsUnboxingThunk()); + MethodWithToken targetMethod = new MethodWithToken(targetMethodDesc, HandleToModuleToken(ref pTargetMethod), constrainedType: null, unboxing: false); pLookup.lookupKind.needsRuntimeLookup = false; pLookup.constLookup = CreateConstLookupToSymbol(_compilation.SymbolNodeFactory.DelegateCtor(delegateTypeDesc, targetMethod)); @@ -994,6 +1007,12 @@ private void getFieldInfo(ref CORINFO_RESOLVED_TOKEN pResolvedToken, CORINFO_MET CorInfoHelpFunc.CORINFO_HELP_GETGENERICS_GCSTATIC_BASE : CorInfoHelpFunc.CORINFO_HELP_GETGENERICS_NONGCSTATIC_BASE); } + + if (_compilation.SymbolNodeFactory.VerifyTypeAndFieldLayout) + { + // ENCODE_CHECK_FIELD_OFFSET + _methodCodeNode.Fixups.Add(_compilation.SymbolNodeFactory.CheckFieldOffset(field)); + } } else { @@ -1021,28 +1040,9 @@ private void getFieldInfo(ref CORINFO_RESOLVED_TOKEN pResolvedToken, CORINFO_MET } else { - if ((flags & CORINFO_ACCESS_FLAGS.CORINFO_ACCESS_ADDRESS) != 0) - { - throw new RequiresRuntimeJitException("https://github.com/dotnet/runtime/issues/32663: CORINFO_FIELD_STATIC_ADDRESS"); - } - helperId = field.HasGCStaticBase ? ReadyToRunHelperId.GetGCStaticBase : ReadyToRunHelperId.GetNonGCStaticBase; - - // - // Currently, we only do this optimization for regular statics, but it - // looks like it may be permissible to do this optimization for - // thread statics as well. Currently there's no reason to do this - // as this code is not reachable until we implement CORINFO_FIELD_STATIC_ADDRESS - // which is something Crossgen1 doesn't do (cf. the above GitHub issue 32663). - /* - if ((flags & CORINFO_ACCESS_FLAGS.CORINFO_ACCESS_ADDRESS) != 0 && - (fieldAccessor != CORINFO_FIELD_ACCESSOR.CORINFO_FIELD_STATIC_TLS)) - { - fieldFlags |= CORINFO_FIELD_FLAGS.CORINFO_FLG_FIELD_SAFESTATIC_BYREF_RETURN; - } - */ } if (!_compilation.NodeFactory.CompilationModuleGroup.VersionsWithType(field.OwningType) && @@ -1062,6 +1062,12 @@ private void getFieldInfo(ref CORINFO_RESOLVED_TOKEN pResolvedToken, CORINFO_MET else if (helperId != ReadyToRunHelperId.Invalid) { + if (_compilation.SymbolNodeFactory.VerifyTypeAndFieldLayout) + { + // ENCODE_CHECK_FIELD_OFFSET + _methodCodeNode.Fixups.Add(_compilation.SymbolNodeFactory.CheckFieldOffset(field)); + } + pResult->fieldLookup = CreateConstLookupToSymbol( _compilation.SymbolNodeFactory.CreateReadyToRunHelper(helperId, field.OwningType) ); @@ -1088,6 +1094,18 @@ private void getFieldInfo(ref CORINFO_RESOLVED_TOKEN pResolvedToken, CORINFO_MET // and STS::AccessCheck::CanAccess. } + private static bool IsTypeSpecForTypicalInstantiation(TypeDesc t) + { + Instantiation inst = t.Instantiation; + for (int i = 0; i < inst.Length; i++) + { + var arg = inst[i] as SignatureTypeVariable; + if (arg == null || arg.Index != i) + return false; + } + return true; + } + private void ceeInfoGetCallInfo( ref CORINFO_RESOLVED_TOKEN pResolvedToken, CORINFO_RESOLVED_TOKEN* pConstrainedResolvedToken, @@ -1171,24 +1189,6 @@ private void ceeInfoGetCallInfo( { pResult->thisTransform = CORINFO_THIS_TRANSFORM.CORINFO_NO_THIS_TRANSFORM; } - else if (constrainedType.IsRuntimeDeterminedSubtype || exactType.IsRuntimeDeterminedSubtype) - { - // It shouldn't really matter what we do here - but the x86 JIT is annoyingly sensitive - // about what we do, since it pretend generic variables are reference types and generates - // an internal JIT tree even when just verifying generic code. - if (constrainedType.IsRuntimeDeterminedType) - { - pResult->thisTransform = CORINFO_THIS_TRANSFORM.CORINFO_DEREF_THIS; // convert 'this' of type &T --> T - } - else if (constrainedType.IsValueType) - { - pResult->thisTransform = CORINFO_THIS_TRANSFORM.CORINFO_BOX_THIS; // convert 'this' of type &VC --> boxed(VC) - } - else - { - pResult->thisTransform = CORINFO_THIS_TRANSFORM.CORINFO_DEREF_THIS; // convert 'this' of type &C --> C - } - } else { // We have a "constrained." call. Try a partial resolve of the constraint call. Note that this @@ -1254,6 +1254,20 @@ private void ceeInfoGetCallInfo( { pResult->contextHandle = contextFromType(exactType); pResult->exactContextNeedsRuntimeLookup = exactType.IsCanonicalSubtype(CanonicalFormKind.Any); + + // Use main method as the context as long as the methods are called on the same type + if (pResult->exactContextNeedsRuntimeLookup && + pResolvedToken.tokenContext == contextFromMethodBeingCompiled() && + constrainedType == null && + exactType == MethodBeingCompiled.OwningType) + { + var methodIL = (MethodIL)HandleToObject((IntPtr)pResolvedToken.tokenScope); + var rawMethod = (MethodDesc)methodIL.GetMethodILDefinition().GetObject((int)pResolvedToken.token); + if (IsTypeSpecForTypicalInstantiation(rawMethod.OwningType)) + { + pResult->contextHandle = contextFromMethodBeingCompiled(); + } + } } // @@ -1278,23 +1292,29 @@ private void ceeInfoGetCallInfo( { directCall = true; } - else if (targetMethod.OwningType.IsInterface && targetMethod.IsAbstract) - { - // Backwards compat: calls to abstract interface methods are treated as callvirt - directCall = false; - } else { bool devirt; + // Check For interfaces before the bubble check + // since interface methods shouldnt change from non-virtual to virtual between versions + if (targetMethod.OwningType.IsInterface) + { + // Handle interface methods specially because the Sealed bit has no meaning on interfaces. + devirt = !targetMethod.IsVirtual; + } // if we are generating version resilient code // AND // caller/callee are in different version bubbles // we have to apply more restrictive rules // These rules are related to the "inlining rules" as far as the // boundaries of a version bubble are concerned. - if (!_compilation.NodeFactory.CompilationModuleGroup.VersionsWithMethodBody(callerMethod) || - !_compilation.NodeFactory.CompilationModuleGroup.VersionsWithMethodBody(targetMethod)) + // This check is different between CG1 and CG2. CG1 considers two types in the same version bubble + // if their assemblies are in the same bubble, or if the NonVersionableTypeAttribute is present on the type. + // CG2 checks a method cache that it builds with a bunch of new code. + else if (!_compilation.NodeFactory.CompilationModuleGroup.VersionsWithMethodBody(callerMethod) || + // check the Typical TargetMethod, not the Instantiation + !_compilation.NodeFactory.CompilationModuleGroup.VersionsWithMethodBody(targetMethod.GetTypicalMethodDefinition())) { // For version resiliency we won't de-virtualize all final/sealed method calls. Because during a // servicing event it is legal to unseal a method or type. @@ -1309,11 +1329,6 @@ private void ceeInfoGetCallInfo( callVirtCrossingVersionBubble = true; } - else if (targetMethod.OwningType.IsInterface) - { - // Handle interface methods specially because the Sealed bit has no meaning on interfaces. - devirt = !targetMethod.IsVirtual; - } else { devirt = !targetMethod.IsVirtual || targetMethod.IsFinal || targetMethod.OwningType.IsSealed(); @@ -1365,8 +1380,7 @@ private void ceeInfoGetCallInfo( const CORINFO_CALLINFO_FLAGS LdVirtFtnMask = CORINFO_CALLINFO_FLAGS.CORINFO_CALLINFO_LDFTN | CORINFO_CALLINFO_FLAGS.CORINFO_CALLINFO_CALLVIRT; bool unresolvedLdVirtFtn = ((flags & LdVirtFtnMask) == LdVirtFtnMask) && !resolvedCallVirt; - if (((pResult->exactContextNeedsRuntimeLookup && useInstantiatingStub && (!allowInstParam || resolvedConstraint)) || forceUseRuntimeLookup) - && entityFromContext(pResolvedToken.tokenContext) is MethodDesc methodDesc && methodDesc.IsSharedByGenericInstantiations) + if ((pResult->exactContextNeedsRuntimeLookup && useInstantiatingStub && (!allowInstParam || resolvedConstraint)) || forceUseRuntimeLookup) { if (unresolvedLdVirtFtn) { @@ -1376,7 +1390,6 @@ private void ceeInfoGetCallInfo( } else { - // Handle invalid IL - see comment in code:CEEInfo::ComputeRuntimeLookupForSharedGenericToken pResult->kind = CORINFO_CALL_KIND.CORINFO_CALL_CODE_POINTER; // For reference types, the constrained type does not affect method resolution @@ -1445,10 +1458,7 @@ private void ceeInfoGetCallInfo( // We can't make stub calls when we need exact information // for interface calls from shared code. - if (// If the token is not shared then we don't need a runtime lookup - pResult->exactContextNeedsRuntimeLookup - // Handle invalid IL - see comment in code:CEEInfo::ComputeRuntimeLookupForSharedGenericToken - && entityFromContext(pResolvedToken.tokenContext) is MethodDesc methodDesc && methodDesc.IsSharedByGenericInstantiations) + if (pResult->exactContextNeedsRuntimeLookup) { ComputeRuntimeLookupForSharedGenericToken(DictionaryEntryKind.DispatchStubAddrSlot, ref pResolvedToken, null, originalMethod, ref pResult->codePointerOrStubLookup); } @@ -1553,8 +1563,7 @@ private void getCallInfo(ref CORINFO_RESOLVED_TOKEN pResolvedToken, CORINFO_RESO pResult->codePointerOrStubLookup.constLookup = CreateConstLookupToSymbol( _compilation.SymbolNodeFactory.InterfaceDispatchCell( - new MethodWithToken(targetMethod, HandleToModuleToken(ref pResolvedToken, targetMethod), constrainedType: null), - isUnboxingStub: false, + new MethodWithToken(targetMethod, HandleToModuleToken(ref pResolvedToken, targetMethod), constrainedType: null, unboxing: false), MethodBeingCompiled)); } break; @@ -1588,8 +1597,7 @@ private void getCallInfo(ref CORINFO_RESOLVED_TOKEN pResolvedToken, CORINFO_RESO // READYTORUN: FUTURE: Direct calls if possible pResult->codePointerOrStubLookup.constLookup = CreateConstLookupToSymbol( _compilation.NodeFactory.MethodEntrypoint( - new MethodWithToken(nonUnboxingMethod, HandleToModuleToken(ref pResolvedToken, nonUnboxingMethod), constrainedType), - isUnboxingStub, + new MethodWithToken(nonUnboxingMethod, HandleToModuleToken(ref pResolvedToken, nonUnboxingMethod), constrainedType, unboxing: isUnboxingStub), isInstantiatingStub: useInstantiatingStub, isPrecodeImportRequired: (flags & CORINFO_CALLINFO_FLAGS.CORINFO_CALLINFO_LDFTN) != 0)); } @@ -1606,7 +1614,7 @@ private void getCallInfo(ref CORINFO_RESOLVED_TOKEN pResolvedToken, CORINFO_RESO bool atypicalCallsite = (flags & CORINFO_CALLINFO_FLAGS.CORINFO_CALLINFO_ATYPICAL_CALLSITE) != 0; pResult->codePointerOrStubLookup.constLookup = CreateConstLookupToSymbol( _compilation.NodeFactory.DynamicHelperCell( - new MethodWithToken(targetMethod, HandleToModuleToken(ref pResolvedToken, targetMethod), constrainedType: null), + new MethodWithToken(targetMethod, HandleToModuleToken(ref pResolvedToken, targetMethod), constrainedType: null, unboxing: false), useInstantiatingStub)); Debug.Assert(!pResult->sig.hasTypeArg()); @@ -1628,13 +1636,12 @@ private void getCallInfo(ref CORINFO_RESOLVED_TOKEN pResolvedToken, CORINFO_RESO } else { - GenericContext methodContext = new GenericContext(entityFromContext(pResolvedToken.tokenContext)); MethodDesc canonMethod = targetMethod.GetCanonMethodTarget(CanonicalFormKind.Specific); if (canonMethod.RequiresInstMethodDescArg()) { pResult->instParamLookup = CreateConstLookupToSymbol(_compilation.SymbolNodeFactory.CreateReadyToRunHelper( ReadyToRunHelperId.MethodDictionary, - new MethodWithToken(targetMethod, HandleToModuleToken(ref pResolvedToken, targetMethod), constrainedType))); + new MethodWithToken(targetMethod, HandleToModuleToken(ref pResolvedToken, targetMethod), constrainedType, unboxing: false))); } else { @@ -1666,19 +1673,21 @@ private void ComputeRuntimeLookupForSharedGenericToken( pResult.indirections = CORINFO.USEHELPER; pResult.sizeOffset = CORINFO.CORINFO_NO_SIZE_CHECK; - MethodDesc contextMethod = methodFromContext(pResolvedToken.tokenContext); - TypeDesc contextType = typeFromContext(pResolvedToken.tokenContext); - - // Do not bother computing the runtime lookup if we are inlining. The JIT is going - // to abort the inlining attempt anyway. - if (contextMethod != MethodBeingCompiled) + // Runtime lookups in inlined contexts are not supported by the runtime for now + if (pResolvedToken.tokenContext != contextFromMethodBeingCompiled()) { + pResultLookup.lookupKind.runtimeLookupKind = CORINFO_RUNTIME_LOOKUP_KIND.CORINFO_LOOKUP_NOT_SUPPORTED; return; } + MethodDesc contextMethod = methodFromContext(pResolvedToken.tokenContext); + TypeDesc contextType = typeFromContext(pResolvedToken.tokenContext); + // There is a pathological case where invalid IL refereces __Canon type directly, but there is no dictionary availabled to store the lookup. - // All callers of ComputeRuntimeLookupForSharedGenericToken have to filter out this case. We can't do much about it here. - Debug.Assert(contextMethod.IsSharedByGenericInstantiations); + if (!contextMethod.IsSharedByGenericInstantiations) + { + ThrowHelper.ThrowInvalidProgramException(); + } if (contextMethod.RequiresInstMethodDescArg()) { @@ -1800,15 +1809,7 @@ private void ceeInfoEmbedGenericHandle(ref CORINFO_RESOLVED_TOKEN pResolvedToken Debug.Assert(pResult.compileTimeHandle != null); - if (runtimeLookup - /* TODO: this Crossgen check doesn't pass for ThisObjGenericLookupTest when inlining - * GenericLookup.CheckInstanceTypeArg -> GetTypeName because - * tokenContext is GenericLookup which is an exact class. Crossgen doesn't hit - * this code path as it properly propagates the object generic type argument to GetTypeName - * and inlines the method too. - // Handle invalid IL - see comment in code:CEEInfo::ComputeRuntimeLookupForSharedGenericToken - && ContextIsShared(pResolvedToken.tokenContext) - */) + if (runtimeLookup) { DictionaryEntryKind entryKind = DictionaryEntryKind.EmptySlot; switch (pResult.handleType) @@ -1871,14 +1872,15 @@ private void embedGenericHandle(ref CORINFO_RESOLVED_TOKEN pResolvedToken, bool MethodDesc md = HandleToObject(pResolvedToken.hMethod); TypeDesc td = HandleToObject(pResolvedToken.hClass); + bool unboxingStub = false; if ((td.IsValueType) && !md.Signature.IsStatic) { - md = getUnboxingThunk(md); + unboxingStub = true; } symbolNode = _compilation.SymbolNodeFactory.CreateReadyToRunHelper( ReadyToRunHelperId.MethodHandle, - new MethodWithToken(md, HandleToModuleToken(ref pResolvedToken), constrainedType: null)); + new MethodWithToken(md, HandleToModuleToken(ref pResolvedToken), constrainedType: null, unboxing: unboxingStub)); } break; @@ -1898,7 +1900,7 @@ private void embedGenericHandle(ref CORINFO_RESOLVED_TOKEN pResolvedToken, bool private MethodDesc getUnboxingThunk(MethodDesc method) { - return s_unboxingThunkFactory.GetUnboxingMethod(method); + return _unboxingThunkFactory.GetUnboxingMethod(method); } private CORINFO_METHOD_STRUCT_* embedMethodHandle(CORINFO_METHOD_STRUCT_* handle, ref void* ppIndirection) @@ -1916,7 +1918,7 @@ private bool NeedsTypeLayoutCheck(TypeDesc type) if (!type.IsValueType) return false; - return !_compilation.IsLayoutFixedInCurrentVersionBubble(type); + return !_compilation.IsLayoutFixedInCurrentVersionBubble(type) || _compilation.SymbolNodeFactory.VerifyTypeAndFieldLayout; } private bool HasLayoutMetadata(TypeDesc type) @@ -1972,10 +1974,20 @@ private void EncodeFieldBaseOffset(FieldDesc field, CORINFO_FIELD_INFO* pResult, } else if (pMT.IsValueType) { + if (_compilation.SymbolNodeFactory.VerifyTypeAndFieldLayout) + { + // ENCODE_CHECK_FIELD_OFFSET + _methodCodeNode.Fixups.Add(_compilation.SymbolNodeFactory.CheckFieldOffset(field)); + } // ENCODE_NONE } else if (_compilation.IsInheritanceChainLayoutFixedInCurrentVersionBubble(pMT.BaseType)) { + if (_compilation.SymbolNodeFactory.VerifyTypeAndFieldLayout) + { + // ENCODE_CHECK_FIELD_OFFSET + _methodCodeNode.Fixups.Add(_compilation.SymbolNodeFactory.CheckFieldOffset(field)); + } // ENCODE_NONE } else if (HasLayoutMetadata(pMT)) @@ -1993,6 +2005,12 @@ private void EncodeFieldBaseOffset(FieldDesc field, CORINFO_FIELD_INFO* pResult, { PreventRecursiveFieldInlinesOutsideVersionBubble(field, callerMethod); + if (_compilation.SymbolNodeFactory.VerifyTypeAndFieldLayout) + { + // ENCODE_CHECK_FIELD_OFFSET + _methodCodeNode.Fixups.Add(_compilation.SymbolNodeFactory.CheckFieldOffset(field)); + } + // ENCODE_FIELD_BASE_OFFSET Debug.Assert(pResult->offset >= (uint)pMT.BaseType.InstanceByteCount.AsInt); pResult->offset -= (uint)pMT.BaseType.InstanceByteCount.AsInt; @@ -2090,7 +2108,7 @@ private void getAddressOfPInvokeTarget(CORINFO_METHOD_STRUCT_* method, ref CORIN methodDesc = rawPInvoke.Target; EcmaMethod ecmaMethod = (EcmaMethod)methodDesc; ModuleToken moduleToken = new ModuleToken(ecmaMethod.Module, ecmaMethod.Handle); - MethodWithToken methodWithToken = new MethodWithToken(ecmaMethod, moduleToken, constrainedType: null); + MethodWithToken methodWithToken = new MethodWithToken(ecmaMethod, moduleToken, constrainedType: null, unboxing: false); if (ecmaMethod.IsSuppressGCTransition()) { diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/JitInterface/UnboxingMethodDescFactory.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/JitInterface/UnboxingMethodDescFactory.cs index 9763e8862ee9..42f4a648fbaa 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/JitInterface/UnboxingMethodDescFactory.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/JitInterface/UnboxingMethodDescFactory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Concurrent; @@ -28,4 +27,4 @@ public UnboxingMethodDesc GetUnboxingMethod(MethodDesc method) return GetOrAdd(method, _factoryDelegate); } } -} \ No newline at end of file +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/ObjectWriter/MapFileBuilder.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/ObjectWriter/MapFileBuilder.cs index dd7b821ba85e..7c9be722af12 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/ObjectWriter/MapFileBuilder.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/ObjectWriter/MapFileBuilder.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/ObjectWriter/R2RPEBuilder.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/ObjectWriter/R2RPEBuilder.cs index b815fa0e9748..95b4035178d3 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/ObjectWriter/R2RPEBuilder.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/ObjectWriter/R2RPEBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/ObjectWriter/RelocationHelper.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/ObjectWriter/RelocationHelper.cs index 831b706345f0..09f9244aeffc 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/ObjectWriter/RelocationHelper.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/ObjectWriter/RelocationHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/ObjectWriter/SectionBuilder.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/ObjectWriter/SectionBuilder.cs index ecaefe4f4293..3d31687cccf7 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/ObjectWriter/SectionBuilder.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/ObjectWriter/SectionBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/ObjectWriter/TargetExtensions.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/ObjectWriter/TargetExtensions.cs index 0b943d623399..57f1bad0d780 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/ObjectWriter/TargetExtensions.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/ObjectWriter/TargetExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Reflection.PortableExecutable; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Win32Resources/ResourceData.Reader.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Win32Resources/ResourceData.Reader.cs index 3f7a9eac51a6..d95eae85bf98 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Win32Resources/ResourceData.Reader.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Win32Resources/ResourceData.Reader.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Reflection.Metadata; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Win32Resources/ResourceData.ResourcesDataModel.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Win32Resources/ResourceData.ResourcesDataModel.cs index ebd5f4318ac2..c7f315eb45df 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Win32Resources/ResourceData.ResourcesDataModel.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Win32Resources/ResourceData.ResourcesDataModel.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Win32Resources/ResourceData.UpdateResourceDataModel.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Win32Resources/ResourceData.UpdateResourceDataModel.cs index 45c9a2ede79d..d0e1bacaa843 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Win32Resources/ResourceData.UpdateResourceDataModel.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Win32Resources/ResourceData.UpdateResourceDataModel.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Win32Resources/ResourceData.Win32Structs.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Win32Resources/ResourceData.Win32Structs.cs index c03d317abec9..114acad5a87d 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Win32Resources/ResourceData.Win32Structs.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Win32Resources/ResourceData.Win32Structs.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Runtime.InteropServices; diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Win32Resources/ResourceData.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Win32Resources/ResourceData.cs index 11bf1091a5ae..d88d0308e15a 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Win32Resources/ResourceData.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Win32Resources/ResourceData.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/GcInfo.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/GcInfo.cs index c3e3633dbfe8..1f970811dbf4 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/GcInfo.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/GcInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/GcSlotTable.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/GcSlotTable.cs index ef2516636eac..45d1ebd1927d 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/GcSlotTable.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/GcSlotTable.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/GcTransition.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/GcTransition.cs index a1c2e7834daa..3c2bb7c8df9d 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/GcTransition.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/GcTransition.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/Registers.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/Registers.cs index 440a7e0c14f9..9a7a6c0d0a9d 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/Registers.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/Registers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/UnwindInfo.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/UnwindInfo.cs index 2c03e7844565..1c5150bcedaf 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/UnwindInfo.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/UnwindInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Arm/Registers.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Arm/Registers.cs index 9db472d49dfa..acde1f9d47bb 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Arm/Registers.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Arm/Registers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Arm/UnwindInfo.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Arm/UnwindInfo.cs index 303eedafe59b..4398f2c626ef 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Arm/UnwindInfo.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Arm/UnwindInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Text; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Arm64/Registers.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Arm64/Registers.cs index 003c630d676c..0fc02d1ba595 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Arm64/Registers.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Arm64/Registers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Arm64/UnwindInfo.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Arm64/UnwindInfo.cs index bae1f9044341..cfbc74859c94 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Arm64/UnwindInfo.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/Arm64/UnwindInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Text; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/DebugInfo.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/DebugInfo.cs index f1ce1b87407a..ff07f31d0b86 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/DebugInfo.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/DebugInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/DebugInfoTypes.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/DebugInfoTypes.cs index f426fa2b5443..73782f2344c3 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/DebugInfoTypes.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/DebugInfoTypes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/DisassemblingTypeProvider.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/DisassemblingTypeProvider.cs index c38b051c1955..35dbd990e7bd 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/DisassemblingTypeProvider.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/DisassemblingTypeProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/EHInfo.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/EHInfo.cs index 9eee53cf43a3..32e4eab6d609 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/EHInfo.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/EHInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/GCInfoTypes.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/GCInfoTypes.cs index c3fcfd192a8a..65a6908bebfd 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/GCInfoTypes.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/GCInfoTypes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Reflection.PortableExecutable; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/GCRefMap.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/GCRefMap.cs index a65bfe2628e3..ca8f56aff086 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/GCRefMap.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/GCRefMap.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/IAssemblyResolver.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/IAssemblyResolver.cs index 3c3535b372eb..411aabe6e50a 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/IAssemblyResolver.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/IAssemblyResolver.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Reflection.Metadata; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/InliningInfoSection.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/InliningInfoSection.cs index 957ec7a20cc3..c67582623af7 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/InliningInfoSection.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/InliningInfoSection.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Reflection.Metadata.Ecma335; using System.Text; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/InliningInfoSection2.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/InliningInfoSection2.cs index 7271d7aa4f5f..463997434501 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/InliningInfoSection2.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/InliningInfoSection2.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Reflection.Metadata.Ecma335; using System.Text; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/NativeArray.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/NativeArray.cs index 511cd30664f4..31b6ab63caf7 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/NativeArray.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/NativeArray.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Text; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/NativeHashtable.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/NativeHashtable.cs index 027fd51b7ea2..6c5365982f32 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/NativeHashtable.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/NativeHashtable.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Text; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/NativeReader.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/NativeReader.cs index 50f36fe805d1..50c5cf301a68 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/NativeReader.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/NativeReader.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/NibbleReader.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/NibbleReader.cs index 45b51d3b50e1..7a024ed33445 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/NibbleReader.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/NibbleReader.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace ILCompiler.Reflection.ReadyToRun { diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/PEReaderExtensions.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/PEReaderExtensions.cs index 0e5dafe0f51c..bcd22bb9ca89 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/PEReaderExtensions.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/PEReaderExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunHeader.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunHeader.cs index 1cf5af44481b..8d97dddba7ee 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunHeader.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunHeader.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunImportSection.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunImportSection.cs index ae8a8a239ec9..771e6dd65817 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunImportSection.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunImportSection.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunMethod.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunMethod.cs index ee4290a80ef5..a00419f212c4 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunMethod.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunMethod.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunReader.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunReader.cs index a80d177c70b8..a829b58599e5 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunReader.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunReader.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunSection.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunSection.cs index 6f6bcb902ea3..c606845540da 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunSection.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunSection.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunSignature.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunSignature.cs index 8dc30c642f1e..5f7175ef4e2d 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunSignature.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunSignature.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -1255,6 +1254,7 @@ private ReadyToRunSignature ParseSignature(ReadyToRunFixupKind fixupType, String case ReadyToRunFixupKind.Check_TypeLayout: + case ReadyToRunFixupKind.Verify_TypeLayout: ParseType(builder); ReadyToRunTypeLayoutFlags layoutFlags = (ReadyToRunTypeLayoutFlags)ReadUInt(); builder.Append($" Flags {layoutFlags}"); @@ -1287,7 +1287,10 @@ private ReadyToRunSignature ParseSignature(ReadyToRunFixupKind fixupType, String } } - builder.Append(" (CHECK_TYPE_LAYOUT)"); + if (fixupType == ReadyToRunFixupKind.Check_TypeLayout) + builder.Append(" (CHECK_TYPE_LAYOUT)"); + else + builder.Append(" (VERIFY_TYPE_LAYOUT)"); break; case ReadyToRunFixupKind.Check_FieldOffset: @@ -1296,6 +1299,13 @@ private ReadyToRunSignature ParseSignature(ReadyToRunFixupKind fixupType, String builder.Append(" (CHECK_FIELD_OFFSET)"); break; + case ReadyToRunFixupKind.Verify_FieldOffset: + builder.Append($"{ReadUInt()} "); + builder.Append($"{ReadUInt()} "); + ParseField(builder); + builder.Append(" (VERIFY_FIELD_OFFSET)"); + break; + case ReadyToRunFixupKind.Check_InstructionSetSupport: builder.Append("CHECK_InstructionSetSupport"); uint countOfInstructionSets = ReadUIntAndEmitInlineSignatureBinary(builder); diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/StringExtensions.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/StringExtensions.cs index 268c6461f840..4191fed83959 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/StringExtensions.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/StringExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Globalization; using System.Text; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/TransitionBlock.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/TransitionBlock.cs index 5cfef643b90e..3f0bef94f8e4 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/TransitionBlock.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/TransitionBlock.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/x86/CallPattern.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/x86/CallPattern.cs index 402c80a9ffe9..ed8c3f3f036f 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/x86/CallPattern.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/x86/CallPattern.cs @@ -1,3 +1,6 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + using System; using System.Collections.Generic; using System.Text; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/x86/GcInfo.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/x86/GcInfo.cs index 67e7d7b36aae..8981287f9363 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/x86/GcInfo.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/x86/GcInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/x86/GcSlotTable.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/x86/GcSlotTable.cs index 736679e4b3bb..daae325a2659 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/x86/GcSlotTable.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/x86/GcSlotTable.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/x86/GcTransition.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/x86/GcTransition.cs index a2bab1e36f10..fd4d2f6ade1f 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/x86/GcTransition.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/x86/GcTransition.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/x86/InfoHdr.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/x86/InfoHdr.cs index aacb2f3c24f4..e100a422ed3a 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/x86/InfoHdr.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/x86/InfoHdr.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/x86/Registers.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/x86/Registers.cs index 4699cc4861be..f94e7dafbb6f 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/x86/Registers.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/x86/Registers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/x86/UnwindInfo.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/x86/UnwindInfo.cs index a62164ff7dc0..b2be1ae712a5 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/x86/UnwindInfo.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/x86/UnwindInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Text; diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ArchitectureSpecificFieldLayoutTests.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ArchitectureSpecificFieldLayoutTests.cs new file mode 100644 index 000000000000..1ea475cde7fb --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ArchitectureSpecificFieldLayoutTests.cs @@ -0,0 +1,86 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +using Internal.TypeSystem.Ecma; +using Internal.TypeSystem; + +using Xunit; + +namespace TypeSystemTests +{ + public class ArchitectureSpecificFieldLayoutTests + { + TestTypeSystemContext _contextX86; + ModuleDesc _testModuleX86; + TestTypeSystemContext _contextX64; + ModuleDesc _testModuleX64; + TestTypeSystemContext _contextARM; + ModuleDesc _testModuleARM; + + public ArchitectureSpecificFieldLayoutTests() + { + _contextX64 = new TestTypeSystemContext(TargetArchitecture.X64); + var systemModuleX64 = _contextX64.CreateModuleForSimpleName("CoreTestAssembly"); + _contextX64.SetSystemModule(systemModuleX64); + + _testModuleX64 = systemModuleX64; + + _contextARM = new TestTypeSystemContext(TargetArchitecture.ARM); + var systemModuleARM = _contextARM.CreateModuleForSimpleName("CoreTestAssembly"); + _contextARM.SetSystemModule(systemModuleARM); + + _testModuleARM = systemModuleARM; + + _contextX86 = new TestTypeSystemContext(TargetArchitecture.X86); + var systemModuleX86 = _contextX86.CreateModuleForSimpleName("CoreTestAssembly"); + _contextX86.SetSystemModule(systemModuleX86); + + _testModuleX86 = systemModuleX86; + } + + [Fact] + public void TestInstanceLayoutDoubleBool() + { + MetadataType tX64 = _testModuleX64.GetType("Sequential", "ClassDoubleBool"); + MetadataType tX86 = _testModuleX86.GetType("Sequential", "ClassDoubleBool"); + MetadataType tARM = _testModuleARM.GetType("Sequential", "ClassDoubleBool"); + + Assert.Equal(0x8, tX64.InstanceByteAlignment.AsInt); + Assert.Equal(0x8, tARM.InstanceByteAlignment.AsInt); + Assert.Equal(0x4, tX86.InstanceByteAlignment.AsInt); + + Assert.Equal(0x11, tX64.InstanceByteCountUnaligned.AsInt); + Assert.Equal(0x11, tARM.InstanceByteCountUnaligned.AsInt); + Assert.Equal(0x11, tX86.InstanceByteCountUnaligned.AsInt); + + Assert.Equal(0x18, tX64.InstanceByteCount.AsInt); + Assert.Equal(0x18, tARM.InstanceByteCount.AsInt); + Assert.Equal(0x14, tX86.InstanceByteCount.AsInt); + } + + [Fact] + public void TestInstanceLayoutBoolDoubleBool() + { + MetadataType tX64 = _testModuleX64.GetType("Sequential", "ClassBoolDoubleBool"); + MetadataType tX86 = _testModuleX86.GetType("Sequential", "ClassBoolDoubleBool"); + MetadataType tARM = _testModuleARM.GetType("Sequential", "ClassBoolDoubleBool"); + + Assert.Equal(0x8, tX64.InstanceByteAlignment.AsInt); + Assert.Equal(0x8, tARM.InstanceByteAlignment.AsInt); + Assert.Equal(0x4, tX86.InstanceByteAlignment.AsInt); + + Assert.Equal(0x19, tX64.InstanceByteCountUnaligned.AsInt); + Assert.Equal(0x11, tARM.InstanceByteCountUnaligned.AsInt); + Assert.Equal(0x11, tX86.InstanceByteCountUnaligned.AsInt); + + Assert.Equal(0x20, tX64.InstanceByteCount.AsInt); + Assert.Equal(0x18, tARM.InstanceByteCount.AsInt); + Assert.Equal(0x14, tX86.InstanceByteCount.AsInt); + } + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CanonicalizationTests.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CanonicalizationTests.cs new file mode 100644 index 000000000000..d3f2c6c6036d --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CanonicalizationTests.cs @@ -0,0 +1,326 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; + +using Internal.TypeSystem; + +using Xunit; + +namespace TypeSystemTests +{ + public class CanonicalizationTests + { + private TestTypeSystemContext _context; + private ModuleDesc _testModule; + + private MetadataType _referenceType; + private MetadataType _otherReferenceType; + private MetadataType _structType; + private MetadataType _otherStructType; + private MetadataType _genericReferenceType; + private MetadataType _genericStructType; + private MetadataType _genericReferenceTypeWithThreeParams; + private MetadataType _genericStructTypeWithThreeParams; + + public CanonicalizationTests() + { + _context = new TestTypeSystemContext(TargetArchitecture.Unknown); + var systemModule = _context.CreateModuleForSimpleName("CoreTestAssembly"); + _context.SetSystemModule(systemModule); + + _testModule = systemModule; + + _referenceType = _testModule.GetType("Canonicalization", "ReferenceType"); + _otherReferenceType = _testModule.GetType("Canonicalization", "OtherReferenceType"); + _structType = _testModule.GetType("Canonicalization", "StructType"); + _otherStructType = _testModule.GetType("Canonicalization", "OtherStructType"); + _genericReferenceType = _testModule.GetType("Canonicalization", "GenericReferenceType`1"); + _genericStructType = _testModule.GetType("Canonicalization", "GenericStructType`1"); + _genericReferenceTypeWithThreeParams = _testModule.GetType("Canonicalization", "GenericReferenceTypeWithThreeParams`3"); + _genericStructTypeWithThreeParams = _testModule.GetType("Canonicalization", "GenericStructTypeWithThreeParams`3"); + } + + [Theory] + [InlineData(CanonicalizationMode.Standard)] + [InlineData(CanonicalizationMode.RuntimeDetermined)] + public void TestGenericTypes(CanonicalizationMode algorithmType) + { + _context.CanonMode = algorithmType; + + // Canonical forms of reference type over two different reference types are equivalent + var referenceOverReference = _genericReferenceType.MakeInstantiatedType(_referenceType); + var referenceOverOtherReference = _genericReferenceType.MakeInstantiatedType(_otherReferenceType); + Assert.Same( + referenceOverReference.ConvertToCanonForm(CanonicalFormKind.Specific), + referenceOverOtherReference.ConvertToCanonForm(CanonicalFormKind.Specific)); + Assert.Same( + referenceOverReference.ConvertToCanonForm(CanonicalFormKind.Universal), + referenceOverOtherReference.ConvertToCanonForm(CanonicalFormKind.Universal)); + + var referenceOverReferenceOverReference = _genericReferenceType.MakeInstantiatedType(referenceOverReference); + Assert.Same( + referenceOverReference.ConvertToCanonForm(CanonicalFormKind.Specific), + referenceOverReferenceOverReference.ConvertToCanonForm(CanonicalFormKind.Specific)); + Assert.Same( + referenceOverReference.ConvertToCanonForm(CanonicalFormKind.Universal), + referenceOverReferenceOverReference.ConvertToCanonForm(CanonicalFormKind.Universal)); + + var threeParamReferenceOverS1R1S1 = _genericReferenceTypeWithThreeParams.MakeInstantiatedType( + _structType, _referenceType, _structType); + var threeParamReferenceOverS1R2S1 = _genericReferenceTypeWithThreeParams.MakeInstantiatedType( + _structType, _otherReferenceType, _structType); + var threeParamReferenceOverS1R2S2 = _genericReferenceTypeWithThreeParams.MakeInstantiatedType( + _structType, _otherReferenceType, _otherStructType); + Assert.Same( + threeParamReferenceOverS1R1S1.ConvertToCanonForm(CanonicalFormKind.Specific), + threeParamReferenceOverS1R2S1.ConvertToCanonForm(CanonicalFormKind.Specific)); + Assert.Same( + threeParamReferenceOverS1R1S1.ConvertToCanonForm(CanonicalFormKind.Universal), + threeParamReferenceOverS1R2S1.ConvertToCanonForm(CanonicalFormKind.Universal)); + Assert.Same( + threeParamReferenceOverS1R1S1.ConvertToCanonForm(CanonicalFormKind.Universal), + threeParamReferenceOverS1R2S2.ConvertToCanonForm(CanonicalFormKind.Universal)); + + // Universal canonical forms of reference type over reference and value types are equivalent + var referenceOverStruct = _genericReferenceType.MakeInstantiatedType(_structType); + var referenceOverOtherStruct = _genericReferenceType.MakeInstantiatedType(_otherStructType); + Assert.Same( + referenceOverStruct.ConvertToCanonForm(CanonicalFormKind.Universal), + referenceOverOtherStruct.ConvertToCanonForm(CanonicalFormKind.Universal)); + + // Canon forms of reference type instantiated over a generic valuetype over any reference type + var genericStructOverReference = _genericStructType.MakeInstantiatedType(_referenceType); + var genericStructOverOtherReference = _genericStructType.MakeInstantiatedType(_otherReferenceType); + var referenceOverGenericStructOverReference = _genericReferenceType.MakeInstantiatedType(genericStructOverReference); + var referenceOverGenericStructOverOtherReference = _genericReferenceType.MakeInstantiatedType(genericStructOverOtherReference); + Assert.Same( + referenceOverGenericStructOverReference.ConvertToCanonForm(CanonicalFormKind.Specific), + referenceOverGenericStructOverOtherReference.ConvertToCanonForm(CanonicalFormKind.Specific)); + Assert.NotSame( + referenceOverGenericStructOverReference.ConvertToCanonForm(CanonicalFormKind.Specific), + referenceOverReference.ConvertToCanonForm(CanonicalFormKind.Specific)); + Assert.Same( + referenceOverGenericStructOverReference.ConvertToCanonForm(CanonicalFormKind.Universal), + referenceOverGenericStructOverOtherReference.ConvertToCanonForm(CanonicalFormKind.Universal)); + Assert.Same( + referenceOverGenericStructOverReference.ConvertToCanonForm(CanonicalFormKind.Universal), + referenceOverReference.ConvertToCanonForm(CanonicalFormKind.Universal)); + + // Canon of a type instantiated over a signature variable is the same type when just canonicalizing as specific, + // but the universal canon form when performing universal canonicalization. + var genericStructOverSignatureVariable = _genericStructType.MakeInstantiatedType(_context.GetSignatureVariable(0, false)); + Assert.Same( + genericStructOverSignatureVariable, + genericStructOverSignatureVariable.ConvertToCanonForm(CanonicalFormKind.Specific)); + Assert.NotSame( + genericStructOverSignatureVariable, + genericStructOverSignatureVariable.ConvertToCanonForm(CanonicalFormKind.Universal)); + } + + [Theory] + [InlineData(CanonicalizationMode.Standard)] + [InlineData(CanonicalizationMode.RuntimeDetermined)] + public void TestGenericTypesNegative(CanonicalizationMode algorithmType) + { + _context.CanonMode = algorithmType; + + // Two different types instantiated over the same type are not canonically equivalent + var referenceOverReference = _genericReferenceType.MakeInstantiatedType(_referenceType); + var structOverReference = _genericStructType.MakeInstantiatedType(_referenceType); + Assert.NotSame( + referenceOverReference.ConvertToCanonForm(CanonicalFormKind.Specific), + structOverReference.ConvertToCanonForm(CanonicalFormKind.Specific)); + Assert.NotSame( + referenceOverReference.ConvertToCanonForm(CanonicalFormKind.Universal), + structOverReference.ConvertToCanonForm(CanonicalFormKind.Universal)); + + // Specific canonical forms of reference type over reference and value types are not equivalent + var referenceOverStruct = _genericReferenceType.MakeInstantiatedType(_structType); + var referenceOverOtherStruct = _genericReferenceType.MakeInstantiatedType(_otherStructType); + Assert.NotSame( + referenceOverStruct.ConvertToCanonForm(CanonicalFormKind.Specific), + referenceOverOtherStruct.ConvertToCanonForm(CanonicalFormKind.Specific)); + + var threeParamReferenceOverS1R2S1 = _genericReferenceTypeWithThreeParams.MakeInstantiatedType( + _structType, _otherReferenceType, _structType); + var threeParamReferenceOverS1R2S2 = _genericReferenceTypeWithThreeParams.MakeInstantiatedType( + _structType, _otherReferenceType, _otherStructType); + Assert.NotSame( + threeParamReferenceOverS1R2S1.ConvertToCanonForm(CanonicalFormKind.Specific), + threeParamReferenceOverS1R2S2.ConvertToCanonForm(CanonicalFormKind.Specific)); + } + + [Theory] + [InlineData(CanonicalizationMode.Standard)] + [InlineData(CanonicalizationMode.RuntimeDetermined)] + public void TestArrayTypes(CanonicalizationMode algorithmType) + { + _context.CanonMode = algorithmType; + + // Generic type instantiated over an array has the same canonical form as generic type over any other reference type + var genericStructOverArrayOfInt = _genericStructType.MakeInstantiatedType(_context.GetWellKnownType(WellKnownType.Int32).MakeArrayType()); + var genericStructOverReferenceType = _genericStructType.MakeInstantiatedType(_referenceType); + Assert.Same( + genericStructOverArrayOfInt.ConvertToCanonForm(CanonicalFormKind.Specific), + genericStructOverReferenceType.ConvertToCanonForm(CanonicalFormKind.Specific)); + Assert.Same( + genericStructOverArrayOfInt.ConvertToCanonForm(CanonicalFormKind.Universal), + genericStructOverReferenceType.ConvertToCanonForm(CanonicalFormKind.Universal)); + + // Canonical form of SzArray and Multidim array are not the same + var arrayOfReferenceType = _referenceType.MakeArrayType(); + var mdArrayOfReferenceType = _referenceType.MakeArrayType(1); + Assert.NotSame( + arrayOfReferenceType.ConvertToCanonForm(CanonicalFormKind.Specific), + mdArrayOfReferenceType.ConvertToCanonForm(CanonicalFormKind.Specific)); + Assert.NotSame( + arrayOfReferenceType.ConvertToCanonForm(CanonicalFormKind.Universal), + mdArrayOfReferenceType.ConvertToCanonForm(CanonicalFormKind.Universal)); + + // Canonical forms of arrays over different reference types are same + var arrayOfOtherReferenceType = _otherReferenceType.MakeArrayType(); + Assert.Same( + arrayOfReferenceType.ConvertToCanonForm(CanonicalFormKind.Specific), + arrayOfOtherReferenceType.ConvertToCanonForm(CanonicalFormKind.Specific)); + Assert.Same( + arrayOfReferenceType.ConvertToCanonForm(CanonicalFormKind.Universal), + arrayOfOtherReferenceType.ConvertToCanonForm(CanonicalFormKind.Universal)); + + // Canonical forms of arrays of value types are only same for universal canon form + var arrayOfStruct = _structType.MakeArrayType(); + Assert.NotSame( + arrayOfReferenceType.ConvertToCanonForm(CanonicalFormKind.Specific), + arrayOfStruct.ConvertToCanonForm(CanonicalFormKind.Specific)); + Assert.Same( + arrayOfReferenceType.ConvertToCanonForm(CanonicalFormKind.Universal), + arrayOfStruct.ConvertToCanonForm(CanonicalFormKind.Universal)); + } + + [Theory] + [InlineData(CanonicalizationMode.Standard)] + [InlineData(CanonicalizationMode.RuntimeDetermined)] + public void TestMethodsOnGenericTypes(CanonicalizationMode algorithmType) + { + _context.CanonMode = algorithmType; + + var referenceOverReference = _genericReferenceType.MakeInstantiatedType(_referenceType); + var referenceOverOtherReference = _genericReferenceType.MakeInstantiatedType(_otherReferenceType); + Assert.NotSame( + referenceOverReference.GetMethod("Method", null), + referenceOverOtherReference.GetMethod("Method", null)); + Assert.Same( + referenceOverReference.GetMethod("Method", null).GetCanonMethodTarget(CanonicalFormKind.Specific), + referenceOverOtherReference.GetMethod("Method", null).GetCanonMethodTarget(CanonicalFormKind.Specific)); + Assert.Same( + referenceOverReference.GetMethod("Method", null).GetCanonMethodTarget(CanonicalFormKind.Universal), + referenceOverOtherReference.GetMethod("Method", null).GetCanonMethodTarget(CanonicalFormKind.Universal)); + + var referenceOverStruct = _genericReferenceType.MakeInstantiatedType(_structType); + Assert.NotSame( + referenceOverReference.GetMethod("Method", null).GetCanonMethodTarget(CanonicalFormKind.Specific), + referenceOverStruct.GetMethod("Method", null).GetCanonMethodTarget(CanonicalFormKind.Specific)); + Assert.Same( + referenceOverReference.GetMethod("Method", null).GetCanonMethodTarget(CanonicalFormKind.Universal), + referenceOverStruct.GetMethod("Method", null).GetCanonMethodTarget(CanonicalFormKind.Universal)); + + Assert.Same( + referenceOverReference.GetMethod("GenericMethod", null).MakeInstantiatedMethod(_referenceType).GetCanonMethodTarget(CanonicalFormKind.Specific), + referenceOverOtherReference.GetMethod("GenericMethod", null).MakeInstantiatedMethod(_otherReferenceType).GetCanonMethodTarget(CanonicalFormKind.Specific)); + Assert.Same( + referenceOverReference.GetMethod("GenericMethod", null).MakeInstantiatedMethod(_referenceType).GetCanonMethodTarget(CanonicalFormKind.Universal), + referenceOverOtherReference.GetMethod("GenericMethod", null).MakeInstantiatedMethod(_otherReferenceType).GetCanonMethodTarget(CanonicalFormKind.Universal)); + + Assert.NotSame( + referenceOverReference.GetMethod("GenericMethod", null).MakeInstantiatedMethod(_referenceType).GetCanonMethodTarget(CanonicalFormKind.Specific), + referenceOverOtherReference.GetMethod("GenericMethod", null).MakeInstantiatedMethod(_structType).GetCanonMethodTarget(CanonicalFormKind.Specific)); + Assert.Same( + referenceOverReference.GetMethod("GenericMethod", null).MakeInstantiatedMethod(_referenceType).GetCanonMethodTarget(CanonicalFormKind.Universal), + referenceOverOtherReference.GetMethod("GenericMethod", null).MakeInstantiatedMethod(_structType).GetCanonMethodTarget(CanonicalFormKind.Universal)); + + Assert.NotSame( + referenceOverStruct.GetMethod("GenericMethod", null).MakeInstantiatedMethod(_referenceType).GetCanonMethodTarget(CanonicalFormKind.Specific), + referenceOverOtherReference.GetMethod("GenericMethod", null).MakeInstantiatedMethod(_structType).GetCanonMethodTarget(CanonicalFormKind.Specific)); + Assert.Same( + referenceOverStruct.GetMethod("GenericMethod", null).MakeInstantiatedMethod(_referenceType).GetCanonMethodTarget(CanonicalFormKind.Universal), + referenceOverOtherReference.GetMethod("GenericMethod", null).MakeInstantiatedMethod(_structType).GetCanonMethodTarget(CanonicalFormKind.Universal)); + + Assert.NotSame( + referenceOverReference.GetMethod("GenericMethod", null).MakeInstantiatedMethod(_structType), + referenceOverReference.GetMethod("GenericMethod", null).MakeInstantiatedMethod(_structType).GetCanonMethodTarget(CanonicalFormKind.Specific)); + } + + [Theory] + [InlineData(CanonicalizationMode.Standard)] + [InlineData(CanonicalizationMode.RuntimeDetermined)] + public void TestArrayMethods(CanonicalizationMode algorithmType) + { + _context.CanonMode = algorithmType; + + var arrayOfReferenceType = _referenceType.MakeArrayType(1); + var arrayOfOtherReferenceType = _otherReferenceType.MakeArrayType(1); + + Assert.Same( + arrayOfReferenceType.GetMethod("Set", null).GetCanonMethodTarget(CanonicalFormKind.Specific), + arrayOfOtherReferenceType.GetMethod("Set", null).GetCanonMethodTarget(CanonicalFormKind.Specific)); + Assert.Same( + arrayOfReferenceType.GetMethod("Set", null).GetCanonMethodTarget(CanonicalFormKind.Universal), + arrayOfOtherReferenceType.GetMethod("Set", null).GetCanonMethodTarget(CanonicalFormKind.Universal)); + + var arrayOfStruct = _structType.MakeArrayType(1); + + Assert.NotSame( + arrayOfReferenceType.GetMethod("Set", null).GetCanonMethodTarget(CanonicalFormKind.Specific), + arrayOfStruct.GetMethod("Set", null).GetCanonMethodTarget(CanonicalFormKind.Specific)); + Assert.Same( + arrayOfReferenceType.GetMethod("Set", null).GetCanonMethodTarget(CanonicalFormKind.Universal), + arrayOfStruct.GetMethod("Set", null).GetCanonMethodTarget(CanonicalFormKind.Universal)); + } + + [Theory] + [InlineData(CanonicalizationMode.Standard)] + [InlineData(CanonicalizationMode.RuntimeDetermined)] + public void TestUpgradeToUniversalCanon(CanonicalizationMode algorithmType) + { + _context.CanonMode = algorithmType; + + var gstOverUniversalCanon = _genericStructType.MakeInstantiatedType(_context.UniversalCanonType); + var grtOverRtRtStOverUniversal = _genericReferenceTypeWithThreeParams.MakeInstantiatedType( + _referenceType, _referenceType, gstOverUniversalCanon); + var grtOverRtRtStOverUniversalCanon = grtOverRtRtStOverUniversal.ConvertToCanonForm(CanonicalFormKind.Specific); + + // Specific form gets upgraded to universal in the presence of universal canon. + // GenericReferenceTypeWithThreeParams> is + // GenericReferenceTypeWithThreeParams + Assert.Same(_context.UniversalCanonType, grtOverRtRtStOverUniversalCanon.Instantiation[0]); + Assert.Same(_context.UniversalCanonType, grtOverRtRtStOverUniversalCanon.Instantiation[2]); + } + + [Theory] + [InlineData(CanonicalizationMode.Standard)] + [InlineData(CanonicalizationMode.RuntimeDetermined)] + public void TestDowngradeFromUniversalCanon(CanonicalizationMode algorithmType) + { + _context.CanonMode = algorithmType; + var grtOverUniversalCanon = _genericReferenceType.MakeInstantiatedType(_context.UniversalCanonType); + var gstOverGrtOverUniversalCanon = _genericStructType.MakeInstantiatedType(grtOverUniversalCanon); + var gstOverCanon = _genericStructType.MakeInstantiatedType(_context.CanonType); + Assert.Same(gstOverCanon, gstOverGrtOverUniversalCanon.ConvertToCanonForm(CanonicalFormKind.Specific)); + + var gstOverGstOverGrtOverUniversalCanon = _genericStructType.MakeInstantiatedType(gstOverGrtOverUniversalCanon); + var gstOverGstOverCanon = _genericStructType.MakeInstantiatedType(gstOverCanon); + Assert.Same(gstOverGstOverCanon, gstOverGstOverGrtOverUniversalCanon.ConvertToCanonForm(CanonicalFormKind.Specific)); + } + + [Fact] + public void TestCanonicalizationOfRuntimeDeterminedUniversalGeneric() + { + var gstOverUniversalCanon = _genericStructType.MakeInstantiatedType(_context.UniversalCanonType); + var rdtUniversalCanon = (RuntimeDeterminedType)gstOverUniversalCanon.ConvertToSharedRuntimeDeterminedForm().Instantiation[0]; + Assert.Same(_context.UniversalCanonType, rdtUniversalCanon.CanonicalType); + + var gstOverRdtUniversalCanon = _genericStructType.MakeInstantiatedType(rdtUniversalCanon); + Assert.Same(gstOverUniversalCanon, gstOverRdtUniversalCanon.ConvertToCanonForm(CanonicalFormKind.Specific)); + } + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CastingTests.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CastingTests.cs new file mode 100644 index 000000000000..06e87dc17be2 --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CastingTests.cs @@ -0,0 +1,218 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Internal.TypeSystem; + +using Xunit; + +namespace TypeSystemTests +{ + public class CastingTests + { + private TestTypeSystemContext _context; + private ModuleDesc _testModule; + + public CastingTests() + { + _context = new TestTypeSystemContext(TargetArchitecture.X64); + var systemModule = _context.CreateModuleForSimpleName("CoreTestAssembly"); + _context.SetSystemModule(systemModule); + + _testModule = systemModule; + } + + [Fact] + public void TestCastingInHierarchy() + { + TypeDesc objectType = _context.GetWellKnownType(WellKnownType.Object); + TypeDesc stringType = _context.GetWellKnownType(WellKnownType.String); + TypeDesc intType = _context.GetWellKnownType(WellKnownType.Int32); + TypeDesc uintType = _context.GetWellKnownType(WellKnownType.UInt32); + + Assert.True(stringType.CanCastTo(objectType)); + Assert.True(objectType.CanCastTo(objectType)); + Assert.True(intType.CanCastTo(objectType)); + + Assert.False(objectType.CanCastTo(stringType)); + Assert.False(intType.CanCastTo(uintType)); + Assert.False(uintType.CanCastTo(intType)); + } + + [Fact] + public void TestInterfaceCasting() + { + TypeDesc iFooType = _testModule.GetType("Casting", "IFoo"); + TypeDesc classImplementingIFooType = + _testModule.GetType("Casting", "ClassImplementingIFoo"); + TypeDesc classImplementingIFooIndirectlyType = + _testModule.GetType("Casting", "ClassImplementingIFooIndirectly"); + TypeDesc objectType = _context.GetWellKnownType(WellKnownType.Object); + + Assert.True(classImplementingIFooType.CanCastTo(iFooType)); + Assert.True(classImplementingIFooIndirectlyType.CanCastTo(iFooType)); + Assert.True(iFooType.CanCastTo(objectType)); + + Assert.False(objectType.CanCastTo(iFooType)); + } + + [Fact] + public void TestSameSizeArrayTypeCasting() + { + TypeDesc intType = _context.GetWellKnownType(WellKnownType.Int32); + TypeDesc uintType = _context.GetWellKnownType(WellKnownType.UInt32); + TypeDesc byteType = _context.GetWellKnownType(WellKnownType.Byte); + TypeDesc sbyteType = _context.GetWellKnownType(WellKnownType.SByte); + TypeDesc intPtrType = _context.GetWellKnownType(WellKnownType.IntPtr); + TypeDesc ulongType = _context.GetWellKnownType(WellKnownType.UInt64); + + TypeDesc doubleType = _context.GetWellKnownType(WellKnownType.Double); + TypeDesc boolType = _context.GetWellKnownType(WellKnownType.Boolean); + + TypeDesc intBasedEnumType = _testModule.GetType("Casting", "IntBasedEnum"); + TypeDesc uintBasedEnumType = _testModule.GetType("Casting", "UIntBasedEnum"); + TypeDesc shortBasedEnumType = _testModule.GetType("Casting", "ShortBasedEnum"); + + Assert.True(intType.MakeArrayType().CanCastTo(uintType.MakeArrayType())); + Assert.True(intType.MakeArrayType().CanCastTo(uintType.MakeArrayType(1))); + Assert.False(intType.CanCastTo(uintType)); + + Assert.True(byteType.MakeArrayType().CanCastTo(sbyteType.MakeArrayType())); + Assert.False(byteType.CanCastTo(sbyteType)); + + Assert.True(intPtrType.MakeArrayType().CanCastTo(ulongType.MakeArrayType())); + Assert.False(intPtrType.CanCastTo(ulongType)); + + // These are same size, but not allowed to cast + Assert.False(doubleType.MakeArrayType().CanCastTo(ulongType.MakeArrayType())); + Assert.False(boolType.MakeArrayType().CanCastTo(byteType.MakeArrayType())); + + Assert.True(intBasedEnumType.MakeArrayType().CanCastTo(uintType.MakeArrayType())); + Assert.True(intBasedEnumType.MakeArrayType().CanCastTo(uintBasedEnumType.MakeArrayType())); + Assert.False(shortBasedEnumType.MakeArrayType().CanCastTo(intType.MakeArrayType())); + } + + [Fact] + public void TestArrayInterfaceCasting() + { + TypeDesc intType = _context.GetWellKnownType(WellKnownType.Int32); + MetadataType iListType = _context.SystemModule.GetType("System.Collections", "IList"); + MetadataType iListOfTType = _context.SystemModule.GetType("System.Collections.Generic", "IList`1"); + + InstantiatedType iListOfIntType = iListOfTType.MakeInstantiatedType(intType); + TypeDesc intSzArrayType = intType.MakeArrayType(); + TypeDesc intArrayType = intType.MakeArrayType(1); + + Assert.True(intSzArrayType.CanCastTo(iListOfIntType)); + Assert.True(intSzArrayType.CanCastTo(iListType)); + + Assert.False(intArrayType.CanCastTo(iListOfIntType)); + Assert.True(intArrayType.CanCastTo(iListType)); + } + + [Fact] + public void TestArrayCasting() + { + TypeDesc intType = _context.GetWellKnownType(WellKnownType.Int32); + TypeDesc stringType = _context.GetWellKnownType(WellKnownType.String); + TypeDesc objectType = _context.GetWellKnownType(WellKnownType.Object); + TypeDesc arrayType = _context.GetWellKnownType(WellKnownType.Array); + TypeDesc intSzArrayType = intType.MakeArrayType(); + TypeDesc intArray1Type = intType.MakeArrayType(1); + TypeDesc intArray2Type = intType.MakeArrayType(2); + TypeDesc stringSzArrayType = stringType.MakeArrayType(); + TypeDesc objectSzArrayType = objectType.MakeArrayType(); + + Assert.True(intSzArrayType.CanCastTo(intArray1Type)); + Assert.False(intArray1Type.CanCastTo(intSzArrayType)); + + Assert.False(intArray1Type.CanCastTo(intArray2Type)); + + Assert.True(intSzArrayType.CanCastTo(arrayType)); + Assert.True(intArray1Type.CanCastTo(arrayType)); + + Assert.True(stringSzArrayType.CanCastTo(objectSzArrayType)); + Assert.False(intSzArrayType.CanCastTo(objectSzArrayType)); + } + + [Fact] + public void TestGenericParameterCasting() + { + TypeDesc paramWithNoConstraint = + _testModule.GetType("Casting", "ClassWithNoConstraint`1").Instantiation[0]; + TypeDesc paramWithValueTypeConstraint = + _testModule.GetType("Casting", "ClassWithValueTypeConstraint`1").Instantiation[0]; + TypeDesc paramWithInterfaceConstraint = + _testModule.GetType("Casting", "ClassWithInterfaceConstraint`1").Instantiation[0]; + + TypeDesc objectType = _context.GetWellKnownType(WellKnownType.Object); + TypeDesc valueTypeType = _context.GetWellKnownType(WellKnownType.ValueType); + TypeDesc iFooType = _testModule.GetType("Casting", "IFoo"); + TypeDesc classImplementingIFooType = _testModule.GetType("Casting", "ClassImplementingIFoo"); + TypeDesc classImplementingIFooIndirectlyType = + _testModule.GetType("Casting", "ClassImplementingIFooIndirectly"); + + Assert.True(paramWithNoConstraint.CanCastTo(objectType)); + Assert.False(paramWithNoConstraint.CanCastTo(valueTypeType)); + Assert.False(paramWithNoConstraint.CanCastTo(iFooType)); + Assert.False(paramWithNoConstraint.CanCastTo(classImplementingIFooType)); + + Assert.True(paramWithValueTypeConstraint.CanCastTo(objectType)); + Assert.True(paramWithValueTypeConstraint.CanCastTo(valueTypeType)); + Assert.False(paramWithValueTypeConstraint.CanCastTo(iFooType)); + Assert.False(paramWithValueTypeConstraint.CanCastTo(classImplementingIFooType)); + + Assert.True(paramWithInterfaceConstraint.CanCastTo(objectType)); + Assert.False(paramWithInterfaceConstraint.CanCastTo(valueTypeType)); + Assert.True(paramWithInterfaceConstraint.CanCastTo(iFooType)); + Assert.False(paramWithInterfaceConstraint.CanCastTo(classImplementingIFooType)); + } + + [Fact] + public void TestVariantCasting() + { + TypeDesc stringType = _context.GetWellKnownType(WellKnownType.String); + TypeDesc objectType = _context.GetWellKnownType(WellKnownType.Object); + TypeDesc exceptionType = _context.GetWellKnownType(WellKnownType.Exception); + + TypeDesc stringSzArrayType = stringType.MakeArrayType(); + + MetadataType iEnumerableOfTType = + _context.SystemModule.GetType("System.Collections.Generic", "IEnumerable`1"); + InstantiatedType iEnumerableOfObjectType = iEnumerableOfTType.MakeInstantiatedType(objectType); + InstantiatedType iEnumerableOfExceptionType = iEnumerableOfTType.MakeInstantiatedType(exceptionType); + + Assert.True(stringSzArrayType.CanCastTo(iEnumerableOfObjectType)); + Assert.False(stringSzArrayType.CanCastTo(iEnumerableOfExceptionType)); + + MetadataType iContravariantOfTType = _testModule.GetType("Casting", "IContravariant`1"); + InstantiatedType iContravariantOfObjectType = iContravariantOfTType.MakeInstantiatedType(objectType); + InstantiatedType iEnumerableOfStringType = iEnumerableOfTType.MakeInstantiatedType(stringType); + + Assert.True(iContravariantOfObjectType.CanCastTo(objectType)); + Assert.True(iEnumerableOfStringType.CanCastTo(objectType)); + } + + [Fact] + public void TestNullableCasting() + { + TypeDesc intType = _context.GetWellKnownType(WellKnownType.Int32); + MetadataType nullableType = (MetadataType)_context.GetWellKnownType(WellKnownType.Nullable); + TypeDesc nullableOfIntType = nullableType.MakeInstantiatedType(intType); + + Assert.True(intType.CanCastTo(nullableOfIntType)); + } + + [Fact] + public void TestRecursiveCanCast() + { + // Tests the stack overflow protection in CanCastTo + + TypeDesc classWithRecursiveImplementation = _testModule.GetType("Casting", "ClassWithRecursiveImplementation"); + MetadataType iContravariantOfTType = (MetadataType)_testModule.GetType("Casting", "IContravariant`1"); + + TypeDesc testType = iContravariantOfTType.MakeInstantiatedType(classWithRecursiveImplementation); + + Assert.False(classWithRecursiveImplementation.CanCastTo(testType)); + } + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ConstraintsValidationTest.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ConstraintsValidationTest.cs new file mode 100644 index 000000000000..3ea1408a96c1 --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ConstraintsValidationTest.cs @@ -0,0 +1,358 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Internal.TypeSystem; + +using Xunit; + +namespace TypeSystemTests +{ + public class ConstraintsValidationTest + { + private TestTypeSystemContext _context; + private ModuleDesc _testModule; + + private MetadataType _iNonGenType; + private MetadataType _iGenType; + private MetadataType _arg1Type; + private MetadataType _arg2Type; + private MetadataType _arg3Type; + private MetadataType _structArgWithDefaultCtorType; + private MetadataType _structArgWithoutDefaultCtorType; + private MetadataType _classArgWithDefaultCtorType; + private MetadataType _classArgWithPrivateDefaultCtorType; + private MetadataType _abstractClassArgWithDefaultCtorType; + private MetadataType _classArgWithoutDefaultCtorType; + private MetadataType _referenceTypeConstraintType; + private MetadataType _defaultConstructorConstraintType; + private MetadataType _notNullableValueTypeConstraintType; + private MetadataType _simpleTypeConstraintType; + private MetadataType _doubleSimpleTypeConstraintType; + private MetadataType _simpleGenericConstraintType; + private MetadataType _complexGenericConstraint1Type; + private MetadataType _complexGenericConstraint2Type; + private MetadataType _complexGenericConstraint3Type; + private MetadataType _complexGenericConstraint4Type; + private MetadataType _multipleConstraintsType; + + private MetadataType _genericMethodsType; + private MethodDesc _simpleGenericConstraintMethod; + private MethodDesc _complexGenericConstraintMethod; + + public ConstraintsValidationTest() + { + _context = new TestTypeSystemContext(TargetArchitecture.Unknown); + var systemModule = _context.CreateModuleForSimpleName("CoreTestAssembly"); + _context.SetSystemModule(systemModule); + + _testModule = systemModule; + + _iNonGenType = _testModule.GetType("GenericConstraints", "INonGen"); + _iGenType = _testModule.GetType("GenericConstraints", "IGen`1"); + _arg1Type = _testModule.GetType("GenericConstraints", "Arg1"); + _arg2Type = _testModule.GetType("GenericConstraints", "Arg2`1"); + _arg3Type = _testModule.GetType("GenericConstraints", "Arg3`1"); + _structArgWithDefaultCtorType = _testModule.GetType("GenericConstraints", "StructArgWithDefaultCtor"); + _structArgWithoutDefaultCtorType = _testModule.GetType("GenericConstraints", "StructArgWithoutDefaultCtor"); + _classArgWithDefaultCtorType = _testModule.GetType("GenericConstraints", "ClassArgWithDefaultCtor"); + _classArgWithPrivateDefaultCtorType = _testModule.GetType("GenericConstraints", "ClassArgWithPrivateDefaultCtor"); + _abstractClassArgWithDefaultCtorType = _testModule.GetType("GenericConstraints", "AbstractClassArgWithDefaultCtor"); + _classArgWithoutDefaultCtorType = _testModule.GetType("GenericConstraints", "ClassArgWithoutDefaultCtor"); + + _referenceTypeConstraintType = _testModule.GetType("GenericConstraints", "ReferenceTypeConstraint`1"); + _defaultConstructorConstraintType = _testModule.GetType("GenericConstraints", "DefaultConstructorConstraint`1"); + _notNullableValueTypeConstraintType = _testModule.GetType("GenericConstraints", "NotNullableValueTypeConstraint`1"); + _simpleTypeConstraintType = _testModule.GetType("GenericConstraints", "SimpleTypeConstraint`1"); + _doubleSimpleTypeConstraintType = _testModule.GetType("GenericConstraints", "DoubleSimpleTypeConstraint`1"); + _simpleGenericConstraintType = _testModule.GetType("GenericConstraints", "SimpleGenericConstraint`2"); + _complexGenericConstraint1Type = _testModule.GetType("GenericConstraints", "ComplexGenericConstraint1`2"); + _complexGenericConstraint2Type = _testModule.GetType("GenericConstraints", "ComplexGenericConstraint2`2"); + _complexGenericConstraint3Type = _testModule.GetType("GenericConstraints", "ComplexGenericConstraint3`2"); + _complexGenericConstraint4Type = _testModule.GetType("GenericConstraints", "ComplexGenericConstraint4`2"); + _multipleConstraintsType = _testModule.GetType("GenericConstraints", "MultipleConstraints`2"); + + _genericMethodsType = _testModule.GetType("GenericConstraints", "GenericMethods"); + _simpleGenericConstraintMethod = _genericMethodsType.GetMethod("SimpleGenericConstraintMethod", null); + _complexGenericConstraintMethod = _genericMethodsType.GetMethod("ComplexGenericConstraintMethod", null); + } + + [Fact] + public void TestTypeConstraints() + { + TypeDesc instantiatedType; + MethodDesc instantiatedMethod; + + MetadataType arg2OfInt = _arg2Type.MakeInstantiatedType(_context.GetWellKnownType(WellKnownType.Int32)); + MetadataType arg2OfBool = _arg2Type.MakeInstantiatedType(_context.GetWellKnownType(WellKnownType.Boolean)); + MetadataType arg2OfObject = _arg2Type.MakeInstantiatedType(_context.GetWellKnownType(WellKnownType.Object)); + + // ReferenceTypeConstraint + { + instantiatedType = _referenceTypeConstraintType.MakeInstantiatedType(_arg1Type); + Assert.True(instantiatedType.CheckConstraints()); + + instantiatedType = _referenceTypeConstraintType.MakeInstantiatedType(_iNonGenType); + Assert.True(instantiatedType.CheckConstraints()); + + instantiatedType = _referenceTypeConstraintType.MakeInstantiatedType(_structArgWithDefaultCtorType); + Assert.False(instantiatedType.CheckConstraints()); + + instantiatedType = _referenceTypeConstraintType.MakeInstantiatedType(_context.GetWellKnownType(WellKnownType.Int32)); + Assert.False(instantiatedType.CheckConstraints()); + } + + // DefaultConstructorConstraint + { + instantiatedType = _defaultConstructorConstraintType.MakeInstantiatedType(_arg1Type); + Assert.True(instantiatedType.CheckConstraints()); + + instantiatedType = _defaultConstructorConstraintType.MakeInstantiatedType(_classArgWithDefaultCtorType); + Assert.True(instantiatedType.CheckConstraints()); + + instantiatedType = _defaultConstructorConstraintType.MakeInstantiatedType(_classArgWithPrivateDefaultCtorType); + Assert.False(instantiatedType.CheckConstraints()); + + instantiatedType = _defaultConstructorConstraintType.MakeInstantiatedType(_abstractClassArgWithDefaultCtorType); + Assert.False(instantiatedType.CheckConstraints()); + + instantiatedType = _defaultConstructorConstraintType.MakeInstantiatedType(_classArgWithoutDefaultCtorType); + Assert.False(instantiatedType.CheckConstraints()); + + instantiatedType = _defaultConstructorConstraintType.MakeInstantiatedType(_context.GetWellKnownType(WellKnownType.Int32)); + Assert.True(instantiatedType.CheckConstraints()); + + instantiatedType = _defaultConstructorConstraintType.MakeInstantiatedType(_structArgWithDefaultCtorType); + Assert.True(instantiatedType.CheckConstraints()); + + // Structs always have implicit default constructors + instantiatedType = _defaultConstructorConstraintType.MakeInstantiatedType(_structArgWithoutDefaultCtorType); + Assert.True(instantiatedType.CheckConstraints()); + } + + // NotNullableValueTypeConstraint + { + instantiatedType = _notNullableValueTypeConstraintType.MakeInstantiatedType(_arg1Type); + Assert.False(instantiatedType.CheckConstraints()); + + instantiatedType = _notNullableValueTypeConstraintType.MakeInstantiatedType(_structArgWithDefaultCtorType); + Assert.True(instantiatedType.CheckConstraints()); + + MetadataType nullable = (MetadataType)_context.GetWellKnownType(WellKnownType.Nullable); + MetadataType nullableOfInt = nullable.MakeInstantiatedType(_context.GetWellKnownType(WellKnownType.Int32)); + + instantiatedType = _notNullableValueTypeConstraintType.MakeInstantiatedType(nullableOfInt); + Assert.False(instantiatedType.CheckConstraints()); + } + + // Special constraints instantiated with generic parameter + { + instantiatedType = _referenceTypeConstraintType.MakeInstantiatedType(_referenceTypeConstraintType.Instantiation[0]); + Assert.True(instantiatedType.CheckConstraints()); + + instantiatedType = _defaultConstructorConstraintType.MakeInstantiatedType(_defaultConstructorConstraintType.Instantiation[0]); + Assert.True(instantiatedType.CheckConstraints()); + + instantiatedType = _notNullableValueTypeConstraintType.MakeInstantiatedType(_notNullableValueTypeConstraintType.Instantiation[0]); + Assert.True(instantiatedType.CheckConstraints()); + + instantiatedType = _defaultConstructorConstraintType.MakeInstantiatedType(_notNullableValueTypeConstraintType.Instantiation[0]); + Assert.True(instantiatedType.CheckConstraints()); + + instantiatedType = _referenceTypeConstraintType.MakeInstantiatedType(_arg2Type.Instantiation[0]); + Assert.False(instantiatedType.CheckConstraints()); + + instantiatedType = _defaultConstructorConstraintType.MakeInstantiatedType(_arg2Type.Instantiation[0]); + Assert.False(instantiatedType.CheckConstraints()); + + instantiatedType = _notNullableValueTypeConstraintType.MakeInstantiatedType(_arg2Type.Instantiation[0]); + Assert.False(instantiatedType.CheckConstraints()); + + instantiatedType = _referenceTypeConstraintType.MakeInstantiatedType(_simpleTypeConstraintType.Instantiation[0]); + Assert.True(instantiatedType.CheckConstraints()); + + instantiatedType = _defaultConstructorConstraintType.MakeInstantiatedType(_simpleTypeConstraintType.Instantiation[0]); + Assert.False(instantiatedType.CheckConstraints()); + + instantiatedType = _notNullableValueTypeConstraintType.MakeInstantiatedType(_simpleTypeConstraintType.Instantiation[0]); + Assert.False(instantiatedType.CheckConstraints()); + } + + // SimpleTypeConstraint and DoubleSimpleTypeConstraint + foreach(var genType in new MetadataType[] { _simpleTypeConstraintType , _doubleSimpleTypeConstraintType }) + { + instantiatedType = genType.MakeInstantiatedType(_arg1Type); + Assert.True(instantiatedType.CheckConstraints()); + + instantiatedType = genType.MakeInstantiatedType(_iNonGenType); + Assert.False(instantiatedType.CheckConstraints()); + + instantiatedType = genType.MakeInstantiatedType(_classArgWithDefaultCtorType); + Assert.False(instantiatedType.CheckConstraints()); + } + + // SimpleGenericConstraint + { + instantiatedType = _simpleGenericConstraintType.MakeInstantiatedType(_arg1Type, _arg1Type); + Assert.True(instantiatedType.CheckConstraints()); + + instantiatedType = _simpleGenericConstraintType.MakeInstantiatedType(_arg1Type, _iNonGenType); + Assert.True(instantiatedType.CheckConstraints()); + + instantiatedType = _simpleGenericConstraintType.MakeInstantiatedType(_classArgWithDefaultCtorType, _classArgWithoutDefaultCtorType); + Assert.False(instantiatedType.CheckConstraints()); + + instantiatedType = _simpleGenericConstraintType.MakeInstantiatedType(_arg1Type, _context.GetWellKnownType(WellKnownType.Object)); + Assert.True(instantiatedType.CheckConstraints()); + + instantiatedType = _simpleGenericConstraintType.MakeInstantiatedType(_structArgWithDefaultCtorType, _context.GetWellKnownType(WellKnownType.ValueType)); + Assert.True(instantiatedType.CheckConstraints()); + + instantiatedType = _simpleGenericConstraintType.MakeInstantiatedType(_arg1Type, _context.GetWellKnownType(WellKnownType.ValueType)); + Assert.False(instantiatedType.CheckConstraints()); + + instantiatedType = _simpleGenericConstraintType.MakeInstantiatedType(_context.GetWellKnownType(WellKnownType.UInt16), _context.GetWellKnownType(WellKnownType.UInt32)); + Assert.False(instantiatedType.CheckConstraints()); + + instantiatedType = _simpleGenericConstraintType.MakeInstantiatedType(_context.GetWellKnownType(WellKnownType.UInt16), _context.GetWellKnownType(WellKnownType.ValueType)); + Assert.True(instantiatedType.CheckConstraints()); + } + + // ComplexGenericConstraint1 + { + instantiatedType = _complexGenericConstraint1Type.MakeInstantiatedType(_arg1Type, _arg1Type /* uninteresting */); + Assert.False(instantiatedType.CheckConstraints()); + + instantiatedType = _complexGenericConstraint1Type.MakeInstantiatedType(arg2OfInt, _arg1Type /* uninteresting */); + Assert.True(instantiatedType.CheckConstraints()); + + instantiatedType = _complexGenericConstraint1Type.MakeInstantiatedType(arg2OfBool, _arg1Type /* uninteresting */); + Assert.False(instantiatedType.CheckConstraints()); + + instantiatedType = _complexGenericConstraint1Type.MakeInstantiatedType(arg2OfObject, _arg1Type /* uninteresting */); + Assert.False(instantiatedType.CheckConstraints()); + } + + // ComplexGenericConstraint2 + { + MetadataType arg2OfArg2OfInt = _arg2Type.MakeInstantiatedType(arg2OfInt); + MetadataType arg2OfArg2OfBool = _arg2Type.MakeInstantiatedType(arg2OfBool); + MetadataType arg2OfArg2OfObject = _arg2Type.MakeInstantiatedType(arg2OfObject); + + instantiatedType = _complexGenericConstraint2Type.MakeInstantiatedType(_arg1Type, _context.GetWellKnownType(WellKnownType.Int32)); + Assert.False(instantiatedType.CheckConstraints()); + + instantiatedType = _complexGenericConstraint2Type.MakeInstantiatedType(arg2OfArg2OfInt, _context.GetWellKnownType(WellKnownType.Int32)); + Assert.True(instantiatedType.CheckConstraints()); + instantiatedType = _complexGenericConstraint2Type.MakeInstantiatedType(arg2OfArg2OfBool, _context.GetWellKnownType(WellKnownType.Int32)); + Assert.False(instantiatedType.CheckConstraints()); + instantiatedType = _complexGenericConstraint2Type.MakeInstantiatedType(arg2OfArg2OfObject, _context.GetWellKnownType(WellKnownType.Int32)); + Assert.False(instantiatedType.CheckConstraints()); + + instantiatedType = _complexGenericConstraint2Type.MakeInstantiatedType(arg2OfArg2OfInt, _context.GetWellKnownType(WellKnownType.Object)); + Assert.False(instantiatedType.CheckConstraints()); + instantiatedType = _complexGenericConstraint2Type.MakeInstantiatedType(arg2OfArg2OfBool, _context.GetWellKnownType(WellKnownType.Object)); + Assert.False(instantiatedType.CheckConstraints()); + instantiatedType = _complexGenericConstraint2Type.MakeInstantiatedType(arg2OfArg2OfObject, _context.GetWellKnownType(WellKnownType.Object)); + Assert.True(instantiatedType.CheckConstraints()); + + instantiatedType = _complexGenericConstraint2Type.MakeInstantiatedType(arg2OfArg2OfInt, _context.GetWellKnownType(WellKnownType.Boolean)); + Assert.False(instantiatedType.CheckConstraints()); + instantiatedType = _complexGenericConstraint2Type.MakeInstantiatedType(arg2OfArg2OfBool, _context.GetWellKnownType(WellKnownType.Boolean)); + Assert.True(instantiatedType.CheckConstraints()); + instantiatedType = _complexGenericConstraint2Type.MakeInstantiatedType(arg2OfArg2OfObject, _context.GetWellKnownType(WellKnownType.Boolean)); + Assert.False(instantiatedType.CheckConstraints()); + } + + // ComplexGenericConstraint3 + { + MetadataType igenOfObject = _iGenType.MakeInstantiatedType(_context.GetWellKnownType(WellKnownType.Object)); + + instantiatedType = _complexGenericConstraint3Type.MakeInstantiatedType(igenOfObject, _context.GetWellKnownType(WellKnownType.Object)); + Assert.True(instantiatedType.CheckConstraints()); + + // Variance-compatible instantiation argument + instantiatedType = _complexGenericConstraint3Type.MakeInstantiatedType(igenOfObject, _context.GetWellKnownType(WellKnownType.String)); + Assert.True(instantiatedType.CheckConstraints()); + + // Type that implements the interface + var arg3OfObject = _arg3Type.MakeInstantiatedType(_context.GetWellKnownType(WellKnownType.Object)); + instantiatedType = _complexGenericConstraint3Type.MakeInstantiatedType(arg3OfObject, _context.GetWellKnownType(WellKnownType.Object)); + Assert.True(instantiatedType.CheckConstraints()); + + // Type that implements a variant compatible interface + instantiatedType = _complexGenericConstraint3Type.MakeInstantiatedType(arg3OfObject, _context.GetWellKnownType(WellKnownType.String)); + Assert.True(instantiatedType.CheckConstraints()); + } + + // Constraints requiring InstantiationContext + { + // Instantiate type / method with own generic parameters + instantiatedType = _complexGenericConstraint3Type.MakeInstantiatedType(_complexGenericConstraint3Type.Instantiation[0], _complexGenericConstraint3Type.Instantiation[1]); + Assert.True(instantiatedType.CheckConstraints(new InstantiationContext(instantiatedType.Instantiation, default(Instantiation)))); + + instantiatedType = _complexGenericConstraint4Type.MakeInstantiatedType(_complexGenericConstraint4Type.Instantiation[0], _complexGenericConstraint4Type.Instantiation[1]); + Assert.True(instantiatedType.CheckConstraints(new InstantiationContext(instantiatedType.Instantiation, default(Instantiation)))); + + instantiatedMethod = _simpleGenericConstraintMethod.MakeInstantiatedMethod(_simpleGenericConstraintMethod.Instantiation); + Assert.True(instantiatedMethod.CheckConstraints(new InstantiationContext(default(Instantiation), instantiatedMethod.Instantiation))); + + instantiatedMethod = _complexGenericConstraintMethod.MakeInstantiatedMethod(_complexGenericConstraintMethod.Instantiation); + Assert.True(instantiatedMethod.CheckConstraints(new InstantiationContext(default(Instantiation), instantiatedMethod.Instantiation))); + + // Instantiate type with generic parameters of method + instantiatedType = _simpleGenericConstraintType.MakeInstantiatedType(_simpleGenericConstraintMethod.Instantiation); + Assert.True(instantiatedType.CheckConstraints(new InstantiationContext(default(Instantiation), _simpleGenericConstraintMethod.Instantiation))); + + instantiatedType = _complexGenericConstraint4Type.MakeInstantiatedType(_complexGenericConstraintMethod.Instantiation); + Assert.True(instantiatedType.CheckConstraints(new InstantiationContext(default(Instantiation), _complexGenericConstraintMethod.Instantiation))); + + // Instantiate method with generic parameters of type + instantiatedMethod = _simpleGenericConstraintMethod.MakeInstantiatedMethod(_simpleGenericConstraintType.Instantiation); + Assert.True(instantiatedMethod.CheckConstraints(new InstantiationContext(_simpleGenericConstraintType.Instantiation, default(Instantiation)))); + + instantiatedMethod = _complexGenericConstraintMethod.MakeInstantiatedMethod(_complexGenericConstraint4Type.Instantiation); + Assert.True(instantiatedMethod.CheckConstraints(new InstantiationContext(_complexGenericConstraint4Type.Instantiation, default(Instantiation)))); + } + + // MultipleConstraints + { + // Violate the class constraint + instantiatedType = _multipleConstraintsType.MakeInstantiatedType(_structArgWithDefaultCtorType, _context.GetWellKnownType(WellKnownType.Object)); + Assert.False(instantiatedType.CheckConstraints()); + + // Violate the new() constraint + instantiatedType = _multipleConstraintsType.MakeInstantiatedType(_classArgWithoutDefaultCtorType, _context.GetWellKnownType(WellKnownType.Object)); + Assert.False(instantiatedType.CheckConstraints()); + + // Violate the IGen constraint + instantiatedType = _multipleConstraintsType.MakeInstantiatedType(_arg1Type, _context.GetWellKnownType(WellKnownType.Object)); + Assert.False(instantiatedType.CheckConstraints()); + + // Satisfy all constraints + instantiatedType = _multipleConstraintsType.MakeInstantiatedType(_classArgWithDefaultCtorType, _context.GetWellKnownType(WellKnownType.Object)); + Assert.True(instantiatedType.CheckConstraints()); + } + + // InvalidInstantiationArgs + { + var pointer = _context.GetWellKnownType(WellKnownType.Int16).MakePointerType(); + var byref = _context.GetWellKnownType(WellKnownType.Int16).MakeByRefType(); + + Assert.False(_iGenType.Instantiation.CheckValidInstantiationArguments()); + + instantiatedType = _iGenType.MakeInstantiatedType(_context.GetWellKnownType(WellKnownType.Void)); + Assert.False(instantiatedType.Instantiation.CheckValidInstantiationArguments()); + + instantiatedType = _iGenType.MakeInstantiatedType(pointer); + Assert.False(instantiatedType.Instantiation.CheckValidInstantiationArguments()); + + instantiatedType = _iGenType.MakeInstantiatedType(byref); + Assert.False(instantiatedType.Instantiation.CheckValidInstantiationArguments()); + + instantiatedType = _iGenType.MakeInstantiatedType(byref); + instantiatedType = _iGenType.MakeInstantiatedType(instantiatedType); + Assert.False(instantiatedType.Instantiation.CheckValidInstantiationArguments()); + } + } + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/Canonicalization.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/Canonicalization.cs new file mode 100644 index 000000000000..475352c1a30a --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/Canonicalization.cs @@ -0,0 +1,65 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +namespace Canonicalization +{ + class ReferenceType + { + void Method() + { + } + + void GenericMethod() + { + } + } + + class OtherReferenceType + { + } + + struct StructType + { + void Method() + { + } + + void GenericMethod() + { + } + } + + struct OtherStructType + { + } + + class GenericReferenceType + { + void Method() + { + } + + void GenericMethod() + { + } + } + + struct GenericStructType + { + void Method() + { + } + + void GenericMethod() + { + } + } + + class GenericReferenceTypeWithThreeParams + { + } + + class GenericStructTypeWithThreeParams + { + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/Casting.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/Casting.cs new file mode 100644 index 000000000000..a6ae700e942a --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/Casting.cs @@ -0,0 +1,27 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +namespace Casting +{ + interface IFoo { } + + interface IContravariant { } + + class ClassImplementingIFoo : IFoo { } + + class ClassImplementingIFooIndirectly : ClassImplementingIFoo { } + + enum IntBasedEnum : int { } + + enum UIntBasedEnum : uint { } + + enum ShortBasedEnum : short { } + + class ClassWithNoConstraint { } + + class ClassWithValueTypeConstraint where T : struct { } + + class ClassWithInterfaceConstraint where T : IFoo { } + + class ClassWithRecursiveImplementation : IContravariant> { } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/CoreTestAssembly.csproj b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/CoreTestAssembly.csproj new file mode 100644 index 000000000000..4c028c607aca --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/CoreTestAssembly.csproj @@ -0,0 +1,15 @@ + + + Library + CoreTestAssembly + false + true + true + netstandard2.0 + + true + + v4.0.30319 + false + + \ No newline at end of file diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/GCPointerMap.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/GCPointerMap.cs new file mode 100644 index 000000000000..f09c3c1f4f35 --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/GCPointerMap.cs @@ -0,0 +1,118 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Runtime.InteropServices; + +#pragma warning disable 169 // Field 'blah' is never used + +namespace GCPointerMap +{ + [StructLayout(LayoutKind.Sequential)] + class ClassWithArrayFields + { + int[] a1; + string[] a2; + } + + [StructLayout(LayoutKind.Sequential)] + class ClassWithStringField + { + static string dummy; + int i; + string s; + bool z; + } + + [StructLayout(LayoutKind.Sequential)] + struct MixedStruct + { + public int X; + public object Y; + public int Z; + public byte U; + public object V; + } + + [StructLayout(LayoutKind.Sequential)] + struct Struct4GcPointers + { + public object o1; + public object o2; + public object o3; + public object o4; + } + + [StructLayout(LayoutKind.Sequential)] + struct Struct32GcPointers + { + public Struct4GcPointers x1; + public Struct4GcPointers x2; + public Struct4GcPointers x3; + public Struct4GcPointers x4; + public Struct4GcPointers x5; + public Struct4GcPointers x6; + public Struct4GcPointers x7; + public Struct4GcPointers x8; + } + + [StructLayout(LayoutKind.Sequential)] + struct StructWithSameGCLayoutAsMixedStruct + { + MixedStruct s; + } + + [StructLayout(LayoutKind.Sequential)] + struct DoubleMixedStructLayout + { + StructWithSameGCLayoutAsMixedStruct X; + MixedStruct Y; + } + + [StructLayout(LayoutKind.Explicit)] + struct ExplicitlyFarPointer + { + [FieldOffset(0)] + object X; + + [FieldOffset(32 * 8)] + object Y; + + [FieldOffset(40 * 8)] + object Z; + + [FieldOffset(56 * 8)] + MixedStruct W; + } + + class MixedStaticClass + { + object dummy1; + static object o; + static int dummy2; + const string dummy3 = "Hello"; + static StructWithSameGCLayoutAsMixedStruct m1; + static MixedStruct m2; + } + + class MixedThreadStaticClass + { + object dummy1; + static object dummy2; + + [ThreadStatic] + static int i; + + [ThreadStatic] + static StructWithSameGCLayoutAsMixedStruct m1; + + [ThreadStatic] + static MixedStruct m2; + + [ThreadStatic] + static object o; + + [ThreadStatic] + static short s; + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/GenericConstraints.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/GenericConstraints.cs new file mode 100644 index 000000000000..5c050742c353 --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/GenericConstraints.cs @@ -0,0 +1,71 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +namespace GenericConstraints +{ + public interface INonGen { } + + public interface IGen { } + + public class Arg1 : INonGen { } + + public class Arg2 { } + + public class Arg3 : IGen { } + + public struct StructArgWithDefaultCtor { } + + public struct StructArgWithoutDefaultCtor + { + public StructArgWithoutDefaultCtor(int argument) { } + } + + public class ClassArgWithDefaultCtor : IGen + { + public ClassArgWithDefaultCtor() { } + } + + public abstract class AbstractClassArgWithDefaultCtor : IGen + { + public AbstractClassArgWithDefaultCtor() { } + } + + public class ClassArgWithPrivateDefaultCtor : IGen + { + private ClassArgWithPrivateDefaultCtor() { } + } + + public class ClassArgWithoutDefaultCtor : IGen + { + public ClassArgWithoutDefaultCtor(int argument) { } + } + + public class ReferenceTypeConstraint where T : class { } + + public class DefaultConstructorConstraint where T : new() { } + + public class NotNullableValueTypeConstraint where T : struct { } + + public class SimpleTypeConstraint where T : Arg1 { } + + public class DoubleSimpleTypeConstraint where T : Arg1, INonGen { } + + public class SimpleGenericConstraint where T : U { } + + public class ComplexGenericConstraint1 where T : Arg2 { } + + public class ComplexGenericConstraint2 where T : Arg2> { } + + public class ComplexGenericConstraint3 where T : IGen { } + + public class ComplexGenericConstraint4 where T : U where U : IGen { } + + public class MultipleConstraints where T : class, IGen, new() { } + + public class GenericMethods + { + public static void SimpleGenericConstraintMethod() where T : U { } + + public static void ComplexGenericConstraintMethod() where T : U where U : IGen { } + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/GenericTypes.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/GenericTypes.cs new file mode 100644 index 000000000000..71e1aae3587a --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/GenericTypes.cs @@ -0,0 +1,95 @@ +// 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.InteropServices; + +namespace GenericTypes +{ + /// + /// Generic class to be used for testing. + /// + /// + public abstract class GenericClass + { + /// + /// Purpose is to manipulate a method involving a generic parameter in its return type. + /// + public abstract T Foo(); + /// + /// Purpose is to manipulate a method involving a generic parameter in its parameter list. + /// + public void Bar(T a) + { + } + + ~GenericClass() + { } + } + + public class DerivedGenericClass : GenericClass + { + public override sealed T Foo() + { + return default(T); + } + } + /// + /// Generic class with multiple parameters to be used for testing. + /// + public class TwoParamGenericClass + { + /// + /// Purpose is to allow testing of the properties of non-generic methods on generic types + /// + public void NonGenericFunction() + { + } + + /// + /// Purpose is to allow testing of the properties of generic methods on generic types + /// + public void GenericFunction() + { + } + } + + /// + /// Non-generic type which has a generic method in it + /// + public class NonGenericClass + { + /// + /// Purpose is to allow testing the properties of generic methods on nongeneric types + /// + /// + /// + public void GenericFunction() + { + } + } + + /// + /// Generic structure with 3 fields all defined by type parameters + /// + [StructLayout(LayoutKind.Sequential)] + public struct GenStruct + { + A _a; + B _b; + C _c; + } + + public class GenClass + { +#pragma warning disable 169 + A _a; +#pragma warning restore 169 + } + + public class GenDerivedClass : GenClass + { +#pragma warning disable 169 + B _b; +#pragma warning restore 169 + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/Hashcode.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/Hashcode.cs new file mode 100644 index 000000000000..c88b3be7a7df --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/Hashcode.cs @@ -0,0 +1,25 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; + +namespace Hashcode +{ + class NonNestedType + { + class NestedType + { + + } + + void GenericMethod() + { } + } + + class GenericType + { + void GenericMethod() + { + } + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/InstanceFieldLayout.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/InstanceFieldLayout.cs new file mode 100644 index 000000000000..24104346f629 --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/InstanceFieldLayout.cs @@ -0,0 +1,306 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Runtime.InteropServices; + +#pragma warning disable 169 + +namespace ContainsGCPointers +{ + struct NoPointers + { + int int1; + byte byte1; + char char1; + } + + struct StillNoPointers + { + NoPointers noPointers1; + bool bool1; + } + + class ClassNoPointers + { + char char1; + } + + struct HasPointers + { + string string1; + } + + struct FieldHasPointers + { + HasPointers hasPointers1; + } + + class ClassHasPointers + { + ClassHasPointers classHasPointers1; + } + + class BaseClassHasPointers : ClassHasPointers + { + } + + public class ClassHasIntArray + { + int[] intArrayField; + } + + public class ClassHasArrayOfClassType + { + ClassNoPointers[] classTypeArray; + } +} + +namespace Explicit +{ + [StructLayout(LayoutKind.Explicit)] + class Class1 + { + static int Stat; + [FieldOffset(4)] + bool Bar; + [FieldOffset(10)] + char Baz; + } + + [StructLayout(LayoutKind.Explicit)] + class Class2 : Class1 + { + [FieldOffset(0)] + int Lol; + [FieldOffset(20)] + byte Omg; + } + + [StructLayout(LayoutKind.Explicit, Size = 40)] + class ExplicitSize + { + [FieldOffset(0)] + int Lol; + [FieldOffset(20)] + byte Omg; + } + + [StructLayout(LayoutKind.Explicit)] + public class ExplicitEmptyClass + { + } + + [StructLayout(LayoutKind.Explicit, Size = 0)] + public class ExplicitEmptyClassSize0 + { + } + + [StructLayout(LayoutKind.Explicit)] + public struct ExplicitEmptyStruct + { + } + + [StructLayout(LayoutKind.Explicit)] + ref struct MisalignedPointer + { + [FieldOffset(2)] + public object O; + } + + [StructLayout(LayoutKind.Explicit)] + ref struct MisalignedByRef + { + [FieldOffset(2)] + public ByRefStruct O; + } + + ref struct ByRefStruct + { + } +} + +namespace Sequential +{ + [StructLayout(LayoutKind.Sequential)] + class Class1 + { + int MyInt; + bool MyBool; + char MyChar; + string MyString; + byte[] MyByteArray; + Class1 MyClass1SelfRef; + } + + [StructLayout(LayoutKind.Sequential)] + class Class2 : Class1 + { + int MyInt2; + } + + // [StructLayout(LayoutKind.Sequential)] is applied by default by the C# compiler + struct Struct0 + { + bool b1; + bool b2; + bool b3; + int i1; + string s1; + } + + // [StructLayout(LayoutKind.Sequential)] is applied by default by the C# compiler + struct Struct1 + { + Struct0 MyStruct0; + bool MyBool; + } + + [StructLayout(LayoutKind.Sequential)] + public class ClassDoubleBool + { + double double1; + bool bool1; + } + + [StructLayout(LayoutKind.Sequential)] + public class ClassBoolDoubleBool + { + bool bool1; + double double1; + bool bool2; + } +} + +namespace Auto +{ + [StructLayout(LayoutKind.Auto)] + struct StructWithBool + { + bool MyStructBool; + } + + [StructLayout(LayoutKind.Auto)] + struct StructWithIntChar + { + char MyStructChar; + int MyStructInt; + } + + [StructLayout(LayoutKind.Auto)] + struct StructWithChar + { + char MyStructChar; + } + + class ClassContainingStructs + { + static int MyStaticInt; + + StructWithBool MyStructWithBool; + bool MyBool1; + char MyChar1; + int MyInt; + double MyDouble; + long MyLong; + byte[] MyByteArray; + string MyString1; + bool MyBool2; + StructWithIntChar MyStructWithIntChar; + StructWithChar MyStructWithChar; + } + + class BaseClass7BytesRemaining + { + bool MyBool1; + double MyDouble1; + long MyLong1; + byte[] MyByteArray1; + string MyString1; + } + + class BaseClass4BytesRemaining + { + long MyLong1; + uint MyUint1; + } + + class BaseClass3BytesRemaining + { + int MyInt1; + string MyString1; + bool MyBool1; + } + + class OptimizePartial : BaseClass7BytesRemaining + { + bool OptBool; + char OptChar; + long NoOptLong; + string NoOptString; + } + + class Optimize7Bools : BaseClass7BytesRemaining + { + bool OptBool1; + bool OptBool2; + bool OptBool3; + bool OptBool4; + bool OptBool5; + bool OptBool6; + bool OptBool7; + bool NoOptBool8; + string NoOptString; + } + + class OptimizeAlignedFields : BaseClass7BytesRemaining + { + bool OptBool1; + bool OptBool2; + bool OptBool3; + bool NoOptBool4; + char OptChar1; + char OptChar2; + string NoOptString; + } + + class OptimizeLargestField : BaseClass4BytesRemaining + { + bool NoOptBool; + char NoOptChar; + int OptInt; + string NoOptString; + } + + class NoOptimizeMisaligned : BaseClass3BytesRemaining + { + char NoOptChar; + int NoOptInt; + string NoOptString; + } + + class NoOptimizeCharAtSize2Alignment : BaseClass3BytesRemaining + { + char NoOptChar; + } + + [StructLayout(LayoutKind.Auto, Pack = 1)] + struct MinPacking + { + public byte _byte; + public T _value; + } +} + +namespace IsByRefLike +{ + public ref struct ByRefLikeStruct + { + ByReference ByRef; + } + + public struct NotByRefLike + { + int X; + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/InterfaceArrangements.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/InterfaceArrangements.cs new file mode 100644 index 000000000000..4e23bccd15b2 --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/InterfaceArrangements.cs @@ -0,0 +1,44 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Runtime.InteropServices; + +namespace InterfaceArrangements +{ + interface I1 { } + + interface I2 : I1 { } + + interface IGen1 { } + + class NoInterfaces { } + + class OneInterface : I1 { } + + class Base : IGen1, I1 { } + + class Mid : Base, IGen1 { } + + class DerivedFromMid : Mid, IGen1 { } + + interface IFoo + { + void IMethod(); + } + + class Foo : IFoo, IFoo + { + public virtual void IMethod() { } + } + + class DerivedFromFoo : Foo, IFoo, IFoo + { + void IFoo.IMethod() { } + } + + class SuperDerivedFromFoo : DerivedFromFoo, IFoo, IFoo + { + void IFoo.IMethod() { } + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/Platform.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/Platform.cs new file mode 100644 index 000000000000..e5f35029d882 --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/Platform.cs @@ -0,0 +1,135 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +#pragma warning disable 649 +#pragma warning disable 169 + +namespace System +{ + // Dummy core types to allow us compiling this assembly as a core library so that the type + // system tests don't have a dependency on a real core library. + + public class Object + { + internal IntPtr m_pEEType; + + public virtual bool Equals(object other) + { + return false; + } + + public virtual int GetHashCode() + { + return 0; + } + + public virtual string ToString() { return null; } + + ~Object() + { + } + } + + public struct Void { } + public struct Boolean { } + public struct Char { } + public struct SByte { } + public struct Byte { } + public struct Int16 { } + public struct UInt16 { } + public struct Int32 { } + public struct UInt32 { } + public struct Int64 { } + public struct UInt64 { } + public struct IntPtr { } + public struct UIntPtr { } + public struct Single { } + public struct Double { } + public abstract class ValueType { } + public abstract class Enum : ValueType { } + public struct Nullable where T : struct { } + + public sealed class String { } + public abstract class Array : System.Collections.IList { } + public abstract class Delegate { } + public abstract class MulticastDelegate : Delegate { } + + public struct RuntimeTypeHandle { } + public struct RuntimeMethodHandle { } + public struct RuntimeFieldHandle { } + + public class Attribute { } + + public class ThreadStaticAttribute : Attribute { } + + public class Array : Array, System.Collections.Generic.IList { } + + public class Exception { } + + public ref struct TypedReference + { + private readonly ByReference _value; + private readonly RuntimeTypeHandle _typeHandle; + } + + public ref struct ByReference { } +} + +namespace System.Collections +{ + interface IEnumerable { } + + interface ICollection : IEnumerable { } + + interface IList : ICollection { } +} + +namespace System.Collections.Generic +{ + interface IEnumerable { } + + interface ICollection : IEnumerable { } + + interface IList : ICollection { } +} + +namespace System.Runtime.InteropServices +{ + public enum LayoutKind + { + Sequential = 0, // 0x00000008, + Explicit = 2, // 0x00000010, + Auto = 3, // 0x00000000, + } + + public sealed class StructLayoutAttribute : Attribute + { + internal LayoutKind _val; + + public StructLayoutAttribute(LayoutKind layoutKind) + { + _val = layoutKind; + } + + public LayoutKind Value { get { return _val; } } + public int Pack; + public int Size; + } + + public sealed class FieldOffsetAttribute : Attribute + { + private int _val; + public FieldOffsetAttribute(int offset) + { + _val = offset; + } + public int Value { get { return _val; } } + } +} + +namespace System.Runtime.CompilerServices +{ + public sealed class IsByRefLikeAttribute : Attribute + { + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/StaticFieldLayout.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/StaticFieldLayout.cs new file mode 100644 index 000000000000..113c0ff7be45 --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/StaticFieldLayout.cs @@ -0,0 +1,74 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; + +#pragma warning disable 169 + +namespace StaticFieldLayout +{ + struct NoPointers + { + static int int1; + static byte byte1; + static char char1; + } + + struct StillNoPointers + { + NoPointers noPointers1; + static bool bool1; + } + + class ClassNoPointers + { + static int int1; + static byte byte1; + static char char1; + } + + struct HasPointers + { + bool bool1; + static string string1; + static ClassNoPointers class1; + char char1; + } + + class MixPointersAndNonPointers + { + static string string1; + static int int1; + static ClassNoPointers class1; + static int int2; + static string string2; + } + + class EnsureInheritanceResetsStaticOffsets : MixPointersAndNonPointers + { + static int int3; + static string string3; + } + + class LiteralFieldsDontAffectLayout + { + const int IntConstant = 0; + const string StringConstant = null; + static int Int1; + static string String1; + } + + class RvaTestClass + { + static void RvaTest() + { + int[] foo = new int[] { 0, 1, 2, 3, 4, 45, 5, 5 }; + } + + } + + struct StaticSelfRef + { + static StaticSelfRef selfRef1; + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/SyntheticVirtualOverride.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/SyntheticVirtualOverride.cs new file mode 100644 index 000000000000..b6480cf6aa6a --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/SyntheticVirtualOverride.cs @@ -0,0 +1,32 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; + +namespace SyntheticVirtualOverride +{ + struct StructWithNoEqualsAndGetHashCode + { + } + + class ClassWithInjectedEqualsAndGetHashCode + { + } + + class ClassOverridingEqualsAndGetHashCode : ClassWithInjectedEqualsAndGetHashCode + { + public override bool Equals(object other) + { + return false; + } + + public override int GetHashCode() + { + return 0; + } + } + + class ClassNotOverridingEqualsAndGetHashCode : ClassWithInjectedEqualsAndGetHashCode + { + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/TypeNameParsing.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/TypeNameParsing.cs new file mode 100644 index 000000000000..b6f54a910fc6 --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/TypeNameParsing.cs @@ -0,0 +1,39 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +public class NonNamespaceQualifiedType +{ + +} + +namespace TypeNameParsing +{ + public class Generic + { + public class NestedNongeneric + { + } + + public class NestedGeneric + { + } + } + + public class VeryGeneric + { + } + + public class Simple + { + public class Nested + { + public class NestedTwice + { + } + } + } + + public struct Struct + { + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/ValueTypeShapeCharacteristics.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/ValueTypeShapeCharacteristics.cs new file mode 100644 index 000000000000..924b8b2c7ab7 --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/ValueTypeShapeCharacteristics.cs @@ -0,0 +1,75 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; + +#pragma warning disable 169 + +namespace ValueTypeShapeCharacteristics +{ + struct SimpleHfaFloatStruct + { + static int irrelevantField; + float field; + } + + struct SimpleHfaFloatStructWithManyFields + { + float field1; + float field2; + float field3; + float field4; + } + + struct SimpleHfaDoubleStruct + { + double field; + static int irrelevantField; + } + + struct CompositeHfaFloatStruct + { + SimpleHfaFloatStruct field1; + float field2; + SimpleHfaFloatStruct field3; + } + + struct CompositeHfaDoubleStruct + { + SimpleHfaDoubleStruct field1; + SimpleHfaDoubleStruct field2; + SimpleHfaDoubleStruct field3; + SimpleHfaDoubleStruct field4; + } + + struct NonHAEmptyStruct + { + } + + struct NonHAStruct + { + float field1; + int field2; + } + + struct NonHAMixedStruct + { + float field1; + double field2; + } + + struct NonHACompositeStruct + { + SimpleHfaDoubleStruct field1; + SimpleHfaFloatStruct field2; + } + + struct NonHAStructWithManyFields + { + float field1; + float field2; + float field3; + float field4; + float field5; + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/VirtualFunctionOverride.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/VirtualFunctionOverride.cs new file mode 100644 index 000000000000..c237f561a266 --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/CoreTestAssembly/VirtualFunctionOverride.cs @@ -0,0 +1,45 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; + +namespace VirtualFunctionOverride +{ + interface IIFaceWithGenericMethod + { + void GenMethod(); + } + + class HasMethodInterfaceOverrideOfGenericMethod : IIFaceWithGenericMethod + { + void IIFaceWithGenericMethod.GenMethod() { } + } + + class SimpleGeneric + { + public override string ToString() + { + return null; + } + } + + class BaseGenericWithOverload + { + public virtual void MyMethod(string s) { } + public virtual void MyMethod(T s) { } + } + + class DerivedGenericWithOverload : BaseGenericWithOverload + { + public override void MyMethod(string s) { } + public override void MyMethod(U s) { } + } + + class ClassWithFinalizer + { + ~ClassWithFinalizer() + { + + } + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/GCPointerMapTests.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/GCPointerMapTests.cs new file mode 100644 index 000000000000..51578a171105 --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/GCPointerMapTests.cs @@ -0,0 +1,79 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Internal.TypeSystem; + +using Xunit; + +namespace TypeSystemTests +{ + public partial class GCPointerMapTests + { + TestTypeSystemContext _context; + ModuleDesc _testModule; + + public GCPointerMapTests() + { + _context = new TestTypeSystemContext(TargetArchitecture.X86); + var systemModule = _context.CreateModuleForSimpleName("CoreTestAssembly"); + _context.SetSystemModule(systemModule); + + _testModule = systemModule; + } + + [Fact] + public void TestInstanceMap() + { + MetadataType classWithArrayFields = _testModule.GetType("GCPointerMap", "ClassWithArrayFields"); + MetadataType classWithStringField = _testModule.GetType("GCPointerMap", "ClassWithStringField"); + MetadataType mixedStruct = _testModule.GetType("GCPointerMap", "MixedStruct"); + MetadataType structWithSameGCLayoutAsMixedStruct = _testModule.GetType("GCPointerMap", "StructWithSameGCLayoutAsMixedStruct"); + MetadataType doubleMixedStructLayout = _testModule.GetType("GCPointerMap", "DoubleMixedStructLayout"); + MetadataType explicitlyFarPointer = _testModule.GetType("GCPointerMap", "ExplicitlyFarPointer"); + MetadataType struct32GcPointers = _testModule.GetType("GCPointerMap", "Struct32GcPointers"); + + { + var map = GCPointerMap.FromInstanceLayout(classWithArrayFields); + Assert.Equal(3, map.Size); + Assert.Equal("011", map.ToString()); + } + + { + var map = GCPointerMap.FromInstanceLayout(classWithStringField); + Assert.Equal(4, map.Size); + Assert.Equal("0010", map.ToString()); + } + + { + var map = GCPointerMap.FromInstanceLayout(mixedStruct); + Assert.Equal(5, map.Size); + Assert.Equal("01001", map.ToString()); + } + + { + var map1 = GCPointerMap.FromInstanceLayout(mixedStruct); + var map2 = GCPointerMap.FromInstanceLayout(structWithSameGCLayoutAsMixedStruct); + Assert.Equal(map1.Size, map2.Size); + Assert.Equal(map1.ToString(), map2.ToString()); + } + + { + var map = GCPointerMap.FromInstanceLayout(doubleMixedStructLayout); + Assert.Equal(10, map.Size); + Assert.Equal("0100101001", map.ToString()); + } + + { + var map = GCPointerMap.FromInstanceLayout(explicitlyFarPointer); + Assert.Equal(117, map.Size); + Assert.Equal("100000000000000000000000000000000000000000000000000000000000000010000000000000001000000000000000000000000000000001001", map.ToString()); + } + + { + var map = GCPointerMap.FromInstanceLayout(struct32GcPointers); + Assert.Equal(32, map.Size); + Assert.Equal("11111111111111111111111111111111", map.ToString()); + } + } + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/GenericTypeAndMethodTests.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/GenericTypeAndMethodTests.cs new file mode 100644 index 000000000000..c9224fa7d9db --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/GenericTypeAndMethodTests.cs @@ -0,0 +1,272 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Linq; +using Internal.TypeSystem; +using Xunit; + +namespace TypeSystemTests +{ + public class GenericMethodTests + { + private TestTypeSystemContext _context; + private ModuleDesc _testModule; + + public GenericMethodTests() + { + _context = new TestTypeSystemContext(TargetArchitecture.Unknown); + var systemModule = _context.CreateModuleForSimpleName("CoreTestAssembly"); + _context.SetSystemModule(systemModule); + + _testModule = systemModule; + } + + /// + /// Testing proper instantiation of types and methods involving generic parameters in their signature. + /// + [Fact] + public void TestInstantiation() + { + MetadataType t = _testModule.GetType("GenericTypes", "GenericClass`1"); + + // Verify that we get just type definitions. + Assert.NotNull(t); + Assert.True(t.IsTypeDefinition); + Assert.Equal(1, t.Instantiation.Length); + Assert.True(t.Instantiation[0].IsTypeDefinition); + + // Verify that we got a method definition + MethodDesc fooMethod = t.GetMethods().First(m => m.Name == "Foo"); + Assert.True(fooMethod.IsTypicalMethodDefinition); + + // Verify that instantiating a method definition has no effect + MethodDesc instantiatedMethod = fooMethod.InstantiateSignature(new Instantiation(_context.GetWellKnownType(WellKnownType.Int32)), Instantiation.Empty); + Assert.Same(fooMethod, instantiatedMethod); + + MetadataType instantiatedType = t.MakeInstantiatedType(_context.GetWellKnownType(WellKnownType.Int32)); + + // Verify properties of the instantiated type + Assert.NotNull(instantiatedType); + Assert.False(instantiatedType.IsTypeDefinition); + Assert.Equal(1, instantiatedType.Instantiation.Length); + Assert.Equal(_context.GetWellKnownType(WellKnownType.Int32), instantiatedType.Instantiation[0]); + + // Verify that we get an instantiated method with the proper signature + MethodDesc fooInstantiatedMethod = instantiatedType.GetMethods().First(m => m.Name == "Foo"); + Assert.False(fooInstantiatedMethod.IsTypicalMethodDefinition); + Assert.Equal(_context.GetWellKnownType(WellKnownType.Int32), fooInstantiatedMethod.Signature.ReturnType); + Assert.Same(fooInstantiatedMethod.GetTypicalMethodDefinition(), fooMethod); + // This is not a generic method, so they should be the same + Assert.Same(fooInstantiatedMethod.GetMethodDefinition(), fooInstantiatedMethod); + + // Verify that instantiating a type definition has no effect + TypeDesc newType = t.InstantiateSignature(new Instantiation(_context.GetWellKnownType(WellKnownType.Int32)), Instantiation.Empty); + Assert.NotNull(newType); + Assert.Same(newType, t); + } + + [Fact] + public void TestMethodAttributes() + { + MetadataType tGen = _testModule.GetType("GenericTypes", "GenericClass`1"); + MetadataType tDerivedGen = _testModule.GetType("GenericTypes", "DerivedGenericClass`1"); + InstantiatedType genOfInt = tGen.MakeInstantiatedType(_context.GetWellKnownType(WellKnownType.Int32)); + InstantiatedType derivedGenOfInt = tDerivedGen.MakeInstantiatedType(_context.GetWellKnownType(WellKnownType.Int32)); + MethodDesc fooInstantiatedMethod = genOfInt.GetMethods().First(m => m.Name == "Foo"); + MethodDesc barInstantiatedMethod = genOfInt.GetMethods().First(m => m.Name == "Bar"); + MethodDesc fooDerivedInstantiatedMethod = derivedGenOfInt.GetMethods().First(m => m.Name == "Foo"); + + Assert.False(barInstantiatedMethod.IsVirtual); + Assert.False(barInstantiatedMethod.IsNewSlot); + Assert.False(barInstantiatedMethod.IsFinal); + Assert.False(barInstantiatedMethod.IsAbstract); + + Assert.True(fooInstantiatedMethod.IsVirtual); + Assert.True(fooInstantiatedMethod.IsNewSlot); + Assert.False(fooInstantiatedMethod.IsFinal); + Assert.True(fooInstantiatedMethod.IsAbstract); + + Assert.True(fooDerivedInstantiatedMethod.IsVirtual); + Assert.False(fooDerivedInstantiatedMethod.IsNewSlot); + Assert.True(fooDerivedInstantiatedMethod.IsFinal); + Assert.False(fooDerivedInstantiatedMethod.IsAbstract); + } + + [Fact] + public void TestFinalize() + { + MetadataType tGen = _testModule.GetType("GenericTypes", "GenericClass`1"); + MetadataType tDerivedGen = _testModule.GetType("GenericTypes", "DerivedGenericClass`1"); + InstantiatedType genOfInt = tGen.MakeInstantiatedType(_context.GetWellKnownType(WellKnownType.Int32)); + InstantiatedType derivedGenOfInt = tDerivedGen.MakeInstantiatedType(_context.GetWellKnownType(WellKnownType.Int32)); + MethodDesc finalizeInstantiatedMethod = genOfInt.GetMethods().First(m => m.Name == "Finalize"); + + Assert.Equal(finalizeInstantiatedMethod, genOfInt.GetFinalizer()); + Assert.Equal(finalizeInstantiatedMethod, derivedGenOfInt.GetFinalizer()); + } + + /// + /// Testing lookup up of a method in an instantiated type. + /// + [Fact] + public void TestMethodLookup() + { + MetadataType t = _testModule.GetType("GenericTypes", "GenericClass`1").MakeInstantiatedType(_context.GetWellKnownType(WellKnownType.Int32)); + + MethodSignature sig = new MethodSignature(MethodSignatureFlags.None, 0, _context.GetSignatureVariable(0, false), new TypeDesc[0] { }); + MethodDesc fooMethod = t.GetMethod("Foo", sig); + Assert.NotNull(fooMethod); + } + + [Fact] + public void TestConstructedTypeAdjustment() + { + TypeDesc intType = _context.GetWellKnownType(WellKnownType.Int32); + TypeDesc stringType = _context.GetWellKnownType(WellKnownType.String); + TypeDesc charType = _context.GetWellKnownType(WellKnownType.Char); + TypeDesc objectType = _context.GetWellKnownType(WellKnownType.Object); + + MetadataType genericOpenType = _testModule.GetType("GenericTypes", "TwoParamGenericClass`2"); + + InstantiatedType genericOfCharObject = genericOpenType.MakeInstantiatedType(charType, objectType); + InstantiatedType genericOfCharString = genericOpenType.MakeInstantiatedType(charType, stringType); + InstantiatedType genericOfIntString = genericOpenType.MakeInstantiatedType(intType, stringType); + InstantiatedType genericOfIntObject = genericOpenType.MakeInstantiatedType(intType, objectType); + + Assert.True(genericOfCharObject.IsConstructedOverType(new TypeDesc[] { charType })); + Assert.True(genericOfCharObject.IsConstructedOverType(new TypeDesc[] { objectType })); + Assert.False(genericOfCharObject.IsConstructedOverType(new TypeDesc[] { intType })); + Assert.False(genericOfCharObject.IsConstructedOverType(new TypeDesc[] { stringType })); + Assert.False(genericOfCharObject.IsConstructedOverType(new TypeDesc[] { genericOpenType })); + + Assert.True(genericOfCharString.IsConstructedOverType(new TypeDesc[] { charType })); + Assert.False(genericOfCharString.IsConstructedOverType(new TypeDesc[] { objectType })); + Assert.False(genericOfCharString.IsConstructedOverType(new TypeDesc[] { intType })); + Assert.True(genericOfCharString.IsConstructedOverType(new TypeDesc[] { stringType })); + + // Test direct replacement + TypeDesc testDirectReplaceAllTypes = genericOfCharObject.ReplaceTypesInConstructionOfType(new TypeDesc[] { charType, objectType }, new TypeDesc[] { intType, stringType }); + Assert.Equal(genericOfIntString, testDirectReplaceAllTypes); + + // Test direct replacement where not all types are replaced + TypeDesc testDirectReplaceFirstType = genericOfCharObject.ReplaceTypesInConstructionOfType(new TypeDesc[] { charType }, new TypeDesc[] { intType }); + Assert.Equal(genericOfIntObject, testDirectReplaceFirstType); + + TypeDesc testDirectReplaceSecondType = genericOfCharObject.ReplaceTypesInConstructionOfType(new TypeDesc[] { objectType }, new TypeDesc[] { stringType }); + Assert.Equal(genericOfCharString, testDirectReplaceSecondType); + + // Test Arrays + TypeDesc arrayChar = _context.GetArrayType(charType); + Assert.False(arrayChar.IsMdArray); + Assert.True(arrayChar.IsSzArray); + Assert.True(arrayChar.IsArray); + + TypeDesc arrayInt = _context.GetArrayType(intType); + Assert.False(arrayInt.IsMdArray); + Assert.True(arrayInt.IsSzArray); + Assert.True(arrayInt.IsArray); + + InstantiatedType genericOfCharArrayObject = genericOpenType.MakeInstantiatedType(arrayChar, objectType); + InstantiatedType genericOfIntArrayObject = genericOpenType.MakeInstantiatedType(arrayInt, objectType); + TypeDesc testReplaceTypeInArrayInGeneric = genericOfCharArrayObject.ReplaceTypesInConstructionOfType(new TypeDesc[] { charType }, new TypeDesc[] { intType }); + Assert.Equal(genericOfIntArrayObject, testReplaceTypeInArrayInGeneric); + + // Test multidimensional arrays + TypeDesc mdArrayChar = _context.GetArrayType(charType, 3); + Assert.True(mdArrayChar.IsMdArray); + Assert.False(mdArrayChar.IsSzArray); + Assert.True(mdArrayChar.IsArray); + + TypeDesc mdArrayInt = _context.GetArrayType(intType, 3); + Assert.True(mdArrayInt.IsMdArray); + Assert.False(mdArrayInt.IsSzArray); + Assert.True(mdArrayInt.IsArray); + + InstantiatedType genericOfCharMdArrayObject = genericOpenType.MakeInstantiatedType(mdArrayChar, objectType); + InstantiatedType genericOfIntMdArrayObject = genericOpenType.MakeInstantiatedType(mdArrayInt, objectType); + TypeDesc testReplaceTypeInMdArrayInGeneric = genericOfCharMdArrayObject.ReplaceTypesInConstructionOfType(new TypeDesc[] { charType }, new TypeDesc[] { intType }); + Assert.Equal(genericOfIntMdArrayObject, testReplaceTypeInMdArrayInGeneric); + + // Test pointers + TypeDesc charPointer = _context.GetPointerType(charType); + TypeDesc intPointer = _context.GetPointerType(intType); + TypeDesc testReplaceTypeInPointer = charPointer.ReplaceTypesInConstructionOfType(new TypeDesc[] { charType }, new TypeDesc[] { intType }); + Assert.Equal(intPointer, testReplaceTypeInPointer); + + Assert.True(charPointer.IsConstructedOverType(new TypeDesc[] { charType })); + Assert.False(charPointer.IsConstructedOverType(new TypeDesc[] { intType })); + + // Test byref + TypeDesc charByRef = _context.GetByRefType(charType); + TypeDesc intByRef = _context.GetByRefType(intType); + TypeDesc testReplaceTypeInByRef = charByRef.ReplaceTypesInConstructionOfType(new TypeDesc[] { charType }, new TypeDesc[] { intType }); + Assert.Equal(intByRef, testReplaceTypeInByRef); + + Assert.True(charByRef.IsConstructedOverType(new TypeDesc[] { charType })); + Assert.False(charByRef.IsConstructedOverType(new TypeDesc[] { intType })); + + // Test replace type entirely + TypeDesc testReplaceTypeEntirely = charByRef.ReplaceTypesInConstructionOfType(new TypeDesc[] { charByRef }, new TypeDesc[] { intByRef }); + Assert.Equal(intByRef, testReplaceTypeEntirely); + Assert.True(charByRef.IsConstructedOverType(new TypeDesc[] { charByRef })); + } + + [Fact] + public void TestConstructedMethodAdjustment() + { + TypeDesc intType = _context.GetWellKnownType(WellKnownType.Int32); + TypeDesc stringType = _context.GetWellKnownType(WellKnownType.String); + TypeDesc charType = _context.GetWellKnownType(WellKnownType.Char); + TypeDesc objectType = _context.GetWellKnownType(WellKnownType.Object); + + MetadataType genericOpenType = _testModule.GetType("GenericTypes", "TwoParamGenericClass`2"); + MetadataType nonGenericType = _testModule.GetType("GenericTypes", "NonGenericClass"); + + MethodDesc nonGenericOnGeneric = genericOpenType.GetMethod("NonGenericFunction", null); + MethodDesc genericOnGeneric = genericOpenType.GetMethod("GenericFunction", null); + MethodDesc genericOnNonGeneric = nonGenericType.GetMethod("GenericFunction", null); + + InstantiatedType genericIntString = genericOpenType.MakeInstantiatedType(intType, stringType); + InstantiatedType genericCharString = genericOpenType.MakeInstantiatedType(charType, stringType); + InstantiatedType genericCharObject = genericOpenType.MakeInstantiatedType(charType, objectType); + + MethodDesc nonGenericOnGenericIntString = genericIntString.GetMethod("NonGenericFunction", null); + MethodDesc nonGenericOnGenericCharString = genericCharString.GetMethod("NonGenericFunction", null); + MethodDesc nonGenericOnGenericCharObject = genericCharObject.GetMethod("NonGenericFunction", null); + + MethodDesc genericIntStringOnGenericIntString = genericIntString.GetMethod("GenericFunction", null).MakeInstantiatedMethod(intType, stringType); + MethodDesc genericCharStringOnGenericCharString = genericCharString.GetMethod("GenericFunction", null).MakeInstantiatedMethod(charType, stringType); + MethodDesc genericCharObjectOnGenericCharObject = genericCharObject.GetMethod("GenericFunction", null).MakeInstantiatedMethod(charType, objectType); + + MethodDesc genericIntStringOnNonGeneric = genericOnNonGeneric.MakeInstantiatedMethod(intType, stringType); + MethodDesc genericCharStringOnNonGeneric = genericOnNonGeneric.MakeInstantiatedMethod(charType, stringType); + MethodDesc genericCharObjectOnNonGeneric = genericOnNonGeneric.MakeInstantiatedMethod(charType, objectType); + + // Test complete replacement + MethodDesc testDirectReplacementNonGenericOnGeneric = nonGenericOnGenericIntString.ReplaceTypesInConstructionOfMethod(new TypeDesc[] { intType, stringType }, new TypeDesc[] { charType, objectType }); + Assert.Equal(nonGenericOnGenericCharObject, testDirectReplacementNonGenericOnGeneric); + MethodDesc testDirectReplacementGenericOnGeneric = genericIntStringOnGenericIntString.ReplaceTypesInConstructionOfMethod(new TypeDesc[] { intType, stringType }, new TypeDesc[] { charType, objectType }); + Assert.Equal(genericCharObjectOnGenericCharObject, testDirectReplacementGenericOnGeneric); + MethodDesc testDirectReplacementGenericOnNonGeneric = genericIntStringOnNonGeneric.ReplaceTypesInConstructionOfMethod(new TypeDesc[] { intType, stringType }, new TypeDesc[] { charType, objectType }); + Assert.Equal(genericCharObjectOnNonGeneric, testDirectReplacementGenericOnNonGeneric); + + // Test replace first type in instantiation + MethodDesc testPartialReplacementNonGenericOnGeneric = nonGenericOnGenericIntString.ReplaceTypesInConstructionOfMethod(new TypeDesc[] { intType }, new TypeDesc[] { charType }); + Assert.Equal(nonGenericOnGenericCharString, testPartialReplacementNonGenericOnGeneric); + MethodDesc testPartialReplacementGenericOnGeneric = genericIntStringOnGenericIntString.ReplaceTypesInConstructionOfMethod(new TypeDesc[] { intType }, new TypeDesc[] { charType }); + Assert.Equal(genericCharStringOnGenericCharString, testPartialReplacementGenericOnGeneric); + MethodDesc testPartialReplacementGenericOnNonGeneric = genericIntStringOnNonGeneric.ReplaceTypesInConstructionOfMethod(new TypeDesc[] { intType }, new TypeDesc[] { charType }); + Assert.Equal(genericCharStringOnNonGeneric, testPartialReplacementGenericOnNonGeneric); + + // Test ArrayMethod case + ArrayType mdArrayChar = _context.GetArrayType(charType, 3); + ArrayType mdArrayInt = _context.GetArrayType(intType, 3); + + MethodDesc getMethodOnMDIntArray = mdArrayInt.GetArrayMethod(ArrayMethodKind.Get); + MethodDesc getMethodOnMDCharArray = mdArrayChar.GetArrayMethod(ArrayMethodKind.Get); + + MethodDesc testArrayMethodCase = getMethodOnMDIntArray.ReplaceTypesInConstructionOfMethod(new TypeDesc[] { intType }, new TypeDesc[] { charType }); + Assert.Equal(getMethodOnMDCharArray, testArrayMethodCase); + } + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/HashcodeTests.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/HashcodeTests.cs new file mode 100644 index 000000000000..a9451752da9b --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/HashcodeTests.cs @@ -0,0 +1,252 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; + +using Internal.TypeSystem; +using Internal.NativeFormat; + +using Xunit; + +namespace TypeSystemTests +{ + public class HashcodeTests + { + TestTypeSystemContext _context; + ModuleDesc _testModule; + + public HashcodeTests() + { + _context = new TestTypeSystemContext(TargetArchitecture.X64); + var systemModule = _context.CreateModuleForSimpleName("CoreTestAssembly"); + _context.SetSystemModule(systemModule); + + _testModule = systemModule; + } + + [Fact] + public void TestMultidimensionalArrays() + { + DefType systemArrayType = _context.GetWellKnownType(WellKnownType.Array); + TypeDesc objectType = _context.GetWellKnownType(WellKnownType.Object); + + ArrayType objectMDArrayRank1 = _context.GetArrayType(objectType, 1); + ArrayType objectMDArrayRank2 = _context.GetArrayType(objectType, 2); + ArrayType objectMDArrayRank3 = _context.GetArrayType(objectType, 3); + + Assert.Equal(TypeHashingAlgorithms.ComputeArrayTypeHashCode(objectType.GetHashCode(), 1), objectMDArrayRank1.GetHashCode()); + Assert.Equal(TypeHashingAlgorithms.ComputeArrayTypeHashCode(objectType.GetHashCode(), 2), objectMDArrayRank2.GetHashCode()); + Assert.Equal(TypeHashingAlgorithms.ComputeArrayTypeHashCode(objectType.GetHashCode(), 3), objectMDArrayRank3.GetHashCode()); + } + + [Fact] + public void TestSingleDimensionalArrays() + { + DefType systemArrayType = _context.GetWellKnownType(WellKnownType.Array); + + TypeDesc objectType = _context.GetWellKnownType(WellKnownType.Object); + + ArrayType objectArray = _context.GetArrayType(objectType); + + Assert.Equal(TypeHashingAlgorithms.ComputeArrayTypeHashCode(objectType.GetHashCode(), -1), objectArray.GetHashCode()); + } + + [Fact] + public void TestNonGenericTypes() + { + DefType systemArrayType = _context.GetWellKnownType(WellKnownType.Array); + MetadataType nonNestedType = (MetadataType)_testModule.GetType("Hashcode", "NonNestedType"); + TypeDesc nestedType = nonNestedType.GetNestedType("NestedType"); + + int expectedNonNestedTypeHashcode = TypeHashingAlgorithms.ComputeNameHashCode("Hashcode.NonNestedType"); + int expectedNestedTypeNameHashcode = TypeHashingAlgorithms.ComputeNameHashCode("NestedType"); + int expectedNestedTypeHashcode = TypeHashingAlgorithms.ComputeNestedTypeHashCode(expectedNonNestedTypeHashcode, expectedNestedTypeNameHashcode); + + Assert.Equal(expectedNonNestedTypeHashcode, nonNestedType.GetHashCode()); + Assert.Equal(expectedNestedTypeHashcode, nestedType.GetHashCode()); + } + + [Fact] + void TestGenericTypes() + { + MetadataType ilistType = (MetadataType)_testModule.GetType("System.Collections.Generic", "IList`1"); + DefType systemArrayType = _context.GetWellKnownType(WellKnownType.Array); + DefType ilistOfSystemArray = ilistType.MakeInstantiatedType(systemArrayType); + + int expectedIListOfTHashcode = TypeHashingAlgorithms.ComputeNameHashCode("System.Collections.Generic.IList`1"); + int expectedSystemArrayHashcode = TypeHashingAlgorithms.ComputeNameHashCode("System.Array"); + Assert.Equal(expectedIListOfTHashcode, ilistType.GetHashCode()); + Assert.Equal(TypeHashingAlgorithms.ComputeGenericInstanceHashCode(expectedIListOfTHashcode, new int[] { expectedSystemArrayHashcode }), ilistOfSystemArray.GetHashCode()); + } + + [Fact] + public void TestInstantiatedMethods() + { + MetadataType nonNestedType = (MetadataType)_testModule.GetType("Hashcode", "NonNestedType"); + MetadataType genericType = (MetadataType)_testModule.GetType("Hashcode", "GenericType`2"); + DefType intType = _context.GetWellKnownType(WellKnownType.Int32); + DefType stringType = _context.GetWellKnownType(WellKnownType.String); + + MetadataType genericTypeOfIntString = genericType.MakeInstantiatedType(intType, stringType); + MetadataType genericTypeOfStringInt = genericType.MakeInstantiatedType(stringType, intType); + + // build up expected hash codes for the above + int expHashNonNestedType = TypeHashingAlgorithms.ComputeNameHashCode("Hashcode.NonNestedType"); + Assert.Equal(expHashNonNestedType, nonNestedType.GetHashCode()); + int expHashGenType = TypeHashingAlgorithms.ComputeNameHashCode("Hashcode.GenericType`2"); + Assert.Equal(expHashGenType, genericType.GetHashCode()); + int expHashInt = TypeHashingAlgorithms.ComputeNameHashCode("System.Int32"); + Assert.Equal(expHashInt, intType.GetHashCode()); + int expHashString = TypeHashingAlgorithms.ComputeNameHashCode("System.String"); + Assert.Equal(expHashString, stringType.GetHashCode()); + int expHashGenTypeOfIS = TypeHashingAlgorithms.ComputeGenericInstanceHashCode(expHashGenType, new int[] { expHashInt, expHashString }); + Assert.Equal(expHashGenTypeOfIS, genericTypeOfIntString.GetHashCode()); + int expHashGenTypeOfSI = TypeHashingAlgorithms.ComputeGenericInstanceHashCode(expHashGenType, new int[] { expHashString, expHashInt }); + Assert.Equal(expHashGenTypeOfSI, genericTypeOfStringInt.GetHashCode()); + + // Test that instantiated method's have the right hashes + + int genMethodNameHash = TypeHashingAlgorithms.ComputeNameHashCode("GenericMethod"); + int genMethodNameAndIHash = TypeHashingAlgorithms.ComputeGenericInstanceHashCode(genMethodNameHash, new int[] { expHashInt }); + int genMethodNameAndSHash = TypeHashingAlgorithms.ComputeGenericInstanceHashCode(genMethodNameHash, new int[] { expHashString }); + + + Action testSequence = (MetadataType typeWithGenericMethod, int expectedTypeHash) => + { + // Uninstantiated Generic method + MethodDesc genMethod = typeWithGenericMethod.GetMethod("GenericMethod", null); + Assert.Equal(TypeHashingAlgorithms.ComputeMethodHashCode(expectedTypeHash, genMethodNameHash), genMethod.GetHashCode()); + + // Instantiated over int + MethodDesc genMethodI = genMethod.MakeInstantiatedMethod(intType); + Assert.Equal(TypeHashingAlgorithms.ComputeMethodHashCode(expectedTypeHash, genMethodNameAndIHash), genMethodI.GetHashCode()); + + // Instantiated over string + MethodDesc genMethodS = genMethod.MakeInstantiatedMethod(stringType); + Assert.Equal(TypeHashingAlgorithms.ComputeMethodHashCode(expectedTypeHash, genMethodNameAndSHash), genMethodS.GetHashCode()); + + // Assert they aren't the same as the other hashes + Assert.NotEqual(genMethodI.GetHashCode(), genMethodS.GetHashCode()); + Assert.NotEqual(genMethodI.GetHashCode(), genMethod.GetHashCode()); + Assert.NotEqual(genMethodS.GetHashCode(), genMethod.GetHashCode()); + }; + + // Test cases on non-generic type + testSequence(nonNestedType, expHashNonNestedType); + + // Test cases on generic type + testSequence(genericType, expHashGenType); + + // Test cases on instantiated generic type + testSequence(genericTypeOfIntString, expHashGenTypeOfIS); + testSequence(genericTypeOfStringInt, expHashGenTypeOfSI); + } + + [Fact] + public void TestPointerTypes() + { + DefType intType = _context.GetWellKnownType(WellKnownType.Int32); + + int expHashInt = TypeHashingAlgorithms.ComputeNameHashCode("System.Int32"); + Assert.Equal(expHashInt, intType.GetHashCode()); + + int expHashIntPointer = TypeHashingAlgorithms.ComputePointerTypeHashCode(expHashInt); + TypeDesc intPointerType = _context.GetPointerType(intType); + Assert.Equal(expHashIntPointer, intPointerType.GetHashCode()); + } + + [Fact] + public void TestFunctionPointerTypes() + { + DefType intType = _context.GetWellKnownType(WellKnownType.Int32); + DefType objectType = _context.GetWellKnownType(WellKnownType.Object); + + int expHashInt = TypeHashingAlgorithms.ComputeNameHashCode("System.Int32"); + int expHashObject = TypeHashingAlgorithms.ComputeNameHashCode("System.Object"); + + int expHashFnPtr = TypeHashingAlgorithms.ComputeMethodSignatureHashCode(expHashInt, new[] { expHashObject }); + + MethodSignature fnPtrSig = new MethodSignature(MethodSignatureFlags.None, 0, intType, new TypeDesc[] { objectType }); + var fnPtrType = _context.GetFunctionPointerType(fnPtrSig); + Assert.Equal(expHashFnPtr, fnPtrType.GetHashCode()); + } + + [Fact] + public void TestByRefTypes() + { + DefType intType = _context.GetWellKnownType(WellKnownType.Int32); + + int expHashInt = TypeHashingAlgorithms.ComputeNameHashCode("System.Int32"); + Assert.Equal(expHashInt, intType.GetHashCode()); + + int expHashIntByRef = TypeHashingAlgorithms.ComputeByrefTypeHashCode(expHashInt); + TypeDesc intByRefType = _context.GetByRefType(intType); + Assert.Equal(expHashIntByRef, intByRefType.GetHashCode()); + } + + [Fact] + public void TestHashCodeBuilder() + { + { + var builder = new TypeHashingAlgorithms.HashCodeBuilder("Xy"); + Assert.Equal(TypeHashingAlgorithms.ComputeNameHashCode("Xy"), builder.ToHashCode()); + } + + { + var builder = new TypeHashingAlgorithms.HashCodeBuilder("Xyz"); + Assert.Equal(TypeHashingAlgorithms.ComputeNameHashCode("Xyz"), builder.ToHashCode()); + } + + { + var builder = new TypeHashingAlgorithms.HashCodeBuilder("Xy"); + builder.Append(""); + Assert.Equal(TypeHashingAlgorithms.ComputeNameHashCode("Xy"), builder.ToHashCode()); + } + + { + var builder = new TypeHashingAlgorithms.HashCodeBuilder("Xy"); + builder.Append("."); + Assert.Equal(TypeHashingAlgorithms.ComputeNameHashCode("Xy."), builder.ToHashCode()); + } + + { + var builder = new TypeHashingAlgorithms.HashCodeBuilder("Xyz"); + builder.Append("."); + Assert.Equal(TypeHashingAlgorithms.ComputeNameHashCode("Xyz."), builder.ToHashCode()); + } + + { + var builder = new TypeHashingAlgorithms.HashCodeBuilder("Xy"); + builder.Append(".."); + Assert.Equal(TypeHashingAlgorithms.ComputeNameHashCode("Xy.."), builder.ToHashCode()); + } + + { + var builder = new TypeHashingAlgorithms.HashCodeBuilder("Xyz"); + builder.Append(".."); + Assert.Equal(TypeHashingAlgorithms.ComputeNameHashCode("Xyz.."), builder.ToHashCode()); + } + + { + var builder = new TypeHashingAlgorithms.HashCodeBuilder("Xy"); + builder.Append("."); + builder.Append("Ab"); + Assert.Equal(TypeHashingAlgorithms.ComputeNameHashCode("Xy.Ab"), builder.ToHashCode()); + } + + { + var builder = new TypeHashingAlgorithms.HashCodeBuilder("Xy"); + builder.Append("."); + builder.Append("Abc"); + Assert.Equal(TypeHashingAlgorithms.ComputeNameHashCode("Xy.Abc"), builder.ToHashCode()); + } + + { + var builder = new TypeHashingAlgorithms.HashCodeBuilder("Xyz"); + builder.Append("."); + builder.Append("Abc"); + Assert.Equal(TypeHashingAlgorithms.ComputeNameHashCode("Xyz.Abc"), builder.ToHashCode()); + } + } + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILCompiler.TypeSystem.ReadyToRun.Tests.csproj b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILCompiler.TypeSystem.ReadyToRun.Tests.csproj new file mode 100644 index 000000000000..38e1dda8abaa --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILCompiler.TypeSystem.ReadyToRun.Tests.csproj @@ -0,0 +1,60 @@ + + + ILCompiler.TypeSystem.ReadyToRun.Tests + $(NetCoreAppCurrent) + Debug;Release;Checked + + true + -notrait category=failing + + $(NoWarn);NU1701 + + false + AnyCPU;x64 + + + + + + + + + + + + + false + Content + PreserveNewest + + + false + Content + PreserveNewest + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILDisassemblerTests.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILDisassemblerTests.cs new file mode 100644 index 000000000000..45881020f622 --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILDisassemblerTests.cs @@ -0,0 +1,73 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Collections.Generic; + +using Internal.IL; +using Internal.TypeSystem; +using Internal.TypeSystem.Ecma; + +using Xunit; + +namespace TypeSystemTests +{ + public class ILDisassemblerTests + { + private TestTypeSystemContext _context; + private ModuleDesc _testModule; + + public ILDisassemblerTests() + { + _context = new TestTypeSystemContext(TargetArchitecture.X64); + var systemModule = _context.CreateModuleForSimpleName("CoreTestAssembly"); + _context.SetSystemModule(systemModule); + + _testModule = _context.GetModuleForSimpleName("ILTestAssembly"); + } + + [Fact] + public void TestGenericNameFormatting() + { + MetadataType testClass = _testModule.GetType("ILDisassembler", "TestGenericClass`1"); + EcmaMethod testMethod = (EcmaMethod)testClass.GetMethod("TestMethod", null); + EcmaMethodIL methodIL = EcmaMethodIL.Create(testMethod); + + Dictionary interestingLines = new Dictionary + { + { 4, "IL_0003: ldstr \"Hello \\\"World\\\"!\\n\"" }, + { 9, "IL_000D: call instance void class ILDisassembler.TestGenericClass`1::VoidGenericMethod(!!0, int32, native int, class ILDisassembler.TestClass&)" }, + { 14, "IL_0017: initobj !TClassParam" }, + { 16, "IL_001E: call !!0 class ILDisassembler.TestGenericClass`1::MethodParamGenericMethod(class ILDisassembler.TestGenericClass`1, class ILDisassembler.TestGenericClass`1/Nested, valuetype ILDisassembler.TestStruct*[], !0)" }, + { 24, "IL_0030: call !!0 class ILDisassembler.TestGenericClass`1::MethodParamGenericMethod(class ILDisassembler.TestGenericClass`1, class ILDisassembler.TestGenericClass`1/Nested, valuetype ILDisassembler.TestStruct*[], !0)" }, + { 26, "IL_0036: ldtoken !TClassParam" }, + { 28, "IL_003C: ldtoken valuetype [CoreTestAssembly]System.Nullable`1" }, + { 31, "IL_0043: ldc.r8 3.14" }, + { 32, "IL_004C: ldc.r4 1.68" }, + { 34, "IL_0053: call instance valuetype ILDisassembler.TestStruct class ILDisassembler.TestGenericClass`1::NonGenericMethod(float64, float32, int16)" }, + { 37, "IL_005A: ldflda !0 class ILDisassembler.TestGenericClass`1::somefield" }, + { 41, "IL_0067: stfld class ILDisassembler.TestClass class ILDisassembler.TestGenericClass`1::otherfield" }, + { 44, "IL_006E: stfld class ILDisassembler.TestGenericClass`1> class ILDisassembler.TestGenericClass`1::genericfield" }, + { 47, "IL_0075: stfld !0[] class ILDisassembler.TestGenericClass`1::arrayfield" }, + { 48, "IL_007A: call void ILDisassembler.TestClass::NonGenericMethod()" }, + { 49, "IL_007F: ldsflda valuetype ILDisassembler.TestStruct ILDisassembler.TestClass::somefield" }, + { 50, "IL_0084: initobj ILDisassembler.TestStruct" } + }; + + ILDisassembler disasm = new ILDisassembler(methodIL); + + int numLines = 1; + while (disasm.HasNextInstruction) + { + string line = disasm.GetNextInstruction(); + string expectedLine; + if (interestingLines.TryGetValue(numLines, out expectedLine)) + { + Assert.Equal(expectedLine, line); + } + numLines++; + } + + Assert.Equal(52, numLines); + } + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILTestAssembly/ILDisassembler.il b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILTestAssembly/ILDisassembler.il new file mode 100644 index 000000000000..166009ce8f5b --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILTestAssembly/ILDisassembler.il @@ -0,0 +1,180 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +// While this is all expressible in C#, we need a deterministic IL to test the disassembler, hence +// this is in IL. + +.class private sequential ansi sealed beforefieldinit ILDisassembler.TestStruct + extends [CoreTestAssembly]System.ValueType +{ + .pack 0 + .size 1 +} // end of class ILDisassembler.TestStruct + +.class private auto ansi beforefieldinit ILDisassembler.TestClass + extends [CoreTestAssembly]System.Object +{ + .field public static valuetype ILDisassembler.TestStruct somefield + .method public hidebysig static void NonGenericMethod() cil managed + { + // Code size 1 (0x1) + .maxstack 8 + ret + } // end of method TestClass::NonGenericMethod + + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + ldarg.0 + call instance void [CoreTestAssembly]System.Object::.ctor() + ret + } // end of method TestClass::.ctor + +} // end of class ILDisassembler.TestClass + +.class private auto ansi beforefieldinit ILDisassembler.TestGenericClass`1 + extends [CoreTestAssembly]System.Object +{ + .class auto ansi nested public beforefieldinit Nested + extends [CoreTestAssembly]System.Object + { + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + ldarg.0 + call instance void [CoreTestAssembly]System.Object::.ctor() + ret + } // end of method Nested::.ctor + + } // end of class Nested + + .field private !TClassParam somefield + .field private class ILDisassembler.TestClass otherfield + .field private class ILDisassembler.TestGenericClass`1> genericfield + .field private !TClassParam[] arrayfield + .method public hidebysig instance void + VoidGenericMethod(!!TMethodParam1 p, + int32 x, + native int y, + class ILDisassembler.TestClass& z) cil managed + { + // Code size 1 (0x1) + .maxstack 8 + ret + } // end of method TestGenericClass`1::VoidGenericMethod + + .method public hidebysig static !!TMethodParam + MethodParamGenericMethod(class ILDisassembler.TestGenericClass`1 x, + class ILDisassembler.TestGenericClass`1/Nested y, + valuetype ILDisassembler.TestStruct*[] z, + !TClassParam w) cil managed + { + // Code size 10 (0xa) + .maxstack 1 + .locals init ([0] !!TMethodParam V_0) + ldloca.s V_0 + initobj !!TMethodParam + ldloc.0 + ret + } // end of method TestGenericClass`1::MethodParamGenericMethod + + .method public hidebysig instance valuetype ILDisassembler.TestStruct + NonGenericMethod(float64 x, + float32 y, + int16 z) cil managed + { + // Code size 10 (0xa) + .maxstack 1 + .locals init ([0] valuetype ILDisassembler.TestStruct V_0) + ldloca.s V_0 + initobj ILDisassembler.TestStruct + ldloc.0 + ret + } // end of method TestGenericClass`1::NonGenericMethod + + .method public hidebysig instance void + TestMethod() cil managed + { + // Code size 162 (0xa2) + .maxstack 5 + .locals init ([0] class ILDisassembler.TestClass t, + [1] !TClassParam V_1) + ldnull + stloc.0 + ldarg.0 + ldstr "Hello \"World\"!\n" + ldc.i4.0 + ldc.i4.0 + conv.i + ldloca.s t + call instance void class ILDisassembler.TestGenericClass`1::VoidGenericMethod(!!0, + int32, + native int, + class ILDisassembler.TestClass&) + ldnull + ldnull + ldnull + ldloca.s V_1 + initobj !TClassParam + ldloc.1 + call !!0 class ILDisassembler.TestGenericClass`1::MethodParamGenericMethod(class ILDisassembler.TestGenericClass`1, + class ILDisassembler.TestGenericClass`1/Nested, + valuetype ILDisassembler.TestStruct*[], + !0) + pop + ldnull + ldnull + ldnull + ldloca.s V_1 + initobj !TClassParam + ldloc.1 + call !!0 class ILDisassembler.TestGenericClass`1::MethodParamGenericMethod(class ILDisassembler.TestGenericClass`1, + class ILDisassembler.TestGenericClass`1/Nested, + valuetype ILDisassembler.TestStruct*[], + !0) + pop + ldtoken !TClassParam + pop + ldtoken valuetype [CoreTestAssembly]System.Nullable`1 + pop + ldarg.0 + ldc.r8 3.1400000000000001 + ldc.r4 1.6799999 + ldc.i4.s 42 + call instance valuetype ILDisassembler.TestStruct class ILDisassembler.TestGenericClass`1::NonGenericMethod(float64, + float32, + int16) + pop + ldarg.0 + ldflda !0 class ILDisassembler.TestGenericClass`1::somefield + initobj !TClassParam + ldarg.0 + ldnull + stfld class ILDisassembler.TestClass class ILDisassembler.TestGenericClass`1::otherfield + ldarg.0 + ldnull + stfld class ILDisassembler.TestGenericClass`1> class ILDisassembler.TestGenericClass`1::genericfield + ldarg.0 + ldnull + stfld !0[] class ILDisassembler.TestGenericClass`1::arrayfield + call void ILDisassembler.TestClass::NonGenericMethod() + ldsflda valuetype ILDisassembler.TestStruct ILDisassembler.TestClass::somefield + initobj ILDisassembler.TestStruct + ret + } // end of method TestGenericClass`1::TestMethod + + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + ldarg.0 + call instance void [CoreTestAssembly]System.Object::.ctor() + ret + } // end of method TestGenericClass`1::.ctor + +} // end of class ILDisassembler.TestGenericClass`1 diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILTestAssembly/ILTestAssembly.ilproj b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILTestAssembly/ILTestAssembly.ilproj new file mode 100644 index 000000000000..bbba57074e9b --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILTestAssembly/ILTestAssembly.ilproj @@ -0,0 +1,23 @@ + + + + Library + ILTestAssembly + true + netstandard2.0 + false + + + + + + + + + + + + + + + diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILTestAssembly/InstanceFieldLayout.il b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILTestAssembly/InstanceFieldLayout.il new file mode 100644 index 000000000000..83906647e842 --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILTestAssembly/InstanceFieldLayout.il @@ -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. + +.class public sequential ansi sealed beforefieldinit IsByRefLike.InvalidStruct + extends [CoreTestAssembly]System.ValueType +{ + .field private valuetype [CoreTestAssembly]System.ByReference`1 ByRef +} + +.class public auto ansi beforefieldinit IsByRefLike.InvalidClass1 + extends [CoreTestAssembly]System.Object +{ + .field private valuetype [CoreTestAssembly]System.ByReference`1 ByRef +} + +.class public auto ansi beforefieldinit IsByRefLike.InvalidClass2 + extends [CoreTestAssembly]System.Object +{ + .custom instance void [CoreTestAssembly]System.Runtime.CompilerServices.IsByRefLikeAttribute::.ctor() = ( 01 00 00 00 ) + .field private valuetype [CoreTestAssembly]System.ByReference`1 ByRef +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILTestAssembly/Main.il b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILTestAssembly/Main.il new file mode 100644 index 000000000000..1a33678168b0 --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILTestAssembly/Main.il @@ -0,0 +1,16 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +.assembly extern CoreTestAssembly +{ +} + +.assembly ILTestAssembly +{ +} + +// Mark this as core library so that ILASM doesn't take the code paths that +// 'fix' all the references to e.g. System.Object to be mscorlib. +.mscorlib + + diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILTestAssembly/MethodImplOverride1.il b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILTestAssembly/MethodImplOverride1.il new file mode 100644 index 000000000000..5b8c40c9f180 --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILTestAssembly/MethodImplOverride1.il @@ -0,0 +1,467 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +.class private abstract auto ansi beforefieldinit MethodImplOverride1.Base`2 + extends [CoreTestAssembly]System.Object +{ + .method public hidebysig newslot virtual + instance string Method([out] class [CoreTestAssembly]GenericTypes.GenericClass`1& y, + class [CoreTestAssembly]GenericTypes.GenericClass`1& x) cil managed + { + // Code size 16 (0x10) + .maxstack 8 + IL_0000: nop + IL_0001: ldarg.1 + IL_0002: ldnull + IL_0003: stind.ref + IL_0004: ldstr "Base.Method(out List y, ref List x)" + IL_000f: ret + } // end of method MethodImplOverride1.Base`2::Method + + .method public hidebysig newslot virtual + instance string Method(class [CoreTestAssembly]GenericTypes.GenericClass`1& x, + [out] class [CoreTestAssembly]GenericTypes.GenericClass`1& y) cil managed + { + // Code size 16 (0x10) + .maxstack 8 + IL_0000: nop + IL_0001: ldarg.2 + IL_0002: ldnull + IL_0003: stind.ref + IL_0004: ldstr "Base.Method(ref List x, out List y)" + IL_000f: ret + } // end of method MethodImplOverride1.Base`2::Method + + .method public hidebysig newslot virtual + instance string Method(class [CoreTestAssembly]GenericTypes.GenericClass`1& x) cil managed + { + // Code size 13 (0xd) + .maxstack 8 + IL_0000: nop + IL_0001: ldstr "Base.Method(ref List x)" + IL_000c: ret + } // end of method MethodImplOverride1.Base`2::Method + + .method family hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [CoreTestAssembly]System.Object::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method MethodImplOverride1.Base`2::.ctor + +} // end of class MethodImplOverride1.Base`2 + +.class private auto ansi beforefieldinit MethodImplOverride1.Base2`2 + extends class MethodImplOverride1.Base`2 +{ + .method public hidebysig newslot virtual + instance string Method([out] class [CoreTestAssembly]GenericTypes.GenericClass`1& x) cil managed + { + // Code size 16 (0x10) + .maxstack 8 + IL_0000: nop + IL_0001: ldarg.1 + IL_0002: ldnull + IL_0003: stind.ref + IL_0004: ldstr "Base2.Method(out List x)" + IL_000f: ret + } // end of method MethodImplOverride1.Base2`2::Method + + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class MethodImplOverride1.Base`2::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method MethodImplOverride1.Base2`2::.ctor + +} // end of class MethodImplOverride1.Base2`2 + +.class private auto ansi beforefieldinit MethodImplOverride1.Derived + extends class MethodImplOverride1.Base2`2 +{ + .method public hidebysig newslot virtual + instance string Method(class [CoreTestAssembly]GenericTypes.GenericClass`1& a, + [out] class [CoreTestAssembly]GenericTypes.GenericClass`1& b) cil managed + { + .override method instance string class MethodImplOverride1.Base`2::Method(class [CoreTestAssembly]GenericTypes.GenericClass`1&, + class [CoreTestAssembly]GenericTypes.GenericClass`1&) + // Code size 16 (0x10) + .maxstack 8 + IL_0000: nop + IL_0001: ldarg.2 + IL_0002: ldnull + IL_0003: stind.ref + IL_0004: ldstr "Derived.Method(ref List a, out List b)" + IL_000f: ret + } // end of method MethodImplOverride1.Derived::Method + + .method public hidebysig newslot virtual + instance string Method(class [CoreTestAssembly]GenericTypes.GenericClass`1& a) cil managed + { + .override method instance string class MethodImplOverride1.Base`2::Method(class [CoreTestAssembly]GenericTypes.GenericClass`1&) + // Code size 13 (0xd) + .maxstack 8 + IL_0000: nop + IL_0001: ldstr "Derived.Method(ref List a)" + IL_000c: ret + } // end of method MethodImplOverride1.Derived::Method + + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class MethodImplOverride1.Base2`2::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method MethodImplOverride1.Derived::.ctor + +} // end of class MethodImplOverride1.Derived + + +// TEST2 classes +.class private auto ansi beforefieldinit MethodImplOverride1.BaseTestGenericsShape`4 + extends [CoreTestAssembly]System.Object +{ + .method public hidebysig newslot virtual + instance string Method(!A a, + !B b) cil managed + { + // Code size 11 (0xb) + .maxstack 1 + .locals init (string V_0) + IL_0000: nop + IL_0001: ldstr "BaseTestGenericsShape.Method(A a, B b)" + IL_0006: stloc.0 + IL_0007: br.s IL_0009 + + IL_0009: ldloc.0 + IL_000a: ret + } // end of method MethodImplOverride1.BaseTestGenericsShape`4::Method + + .method public hidebysig newslot virtual + instance string Method(!C modopt([CoreTestAssembly]System.Void) c, + !D modopt([CoreTestAssembly]System.Object) d) cil managed + { + // Code size 11 (0xb) + .maxstack 1 + .locals init (string V_0) + IL_0000: nop + IL_0001: ldstr "BaseTestGenericsShape.Method(C c, D d)" + IL_0006: stloc.0 + IL_0007: br.s IL_0009 + + IL_0009: ldloc.0 + IL_000a: ret + } // end of method MethodImplOverride1.BaseTestGenericsShape`4::Method + + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [CoreTestAssembly]System.Object::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method MethodImplOverride1.BaseTestGenericsShape`4::.ctor + +} // end of class MethodImplOverride1.BaseTestGenericsShape`4 + +.class private auto ansi beforefieldinit MethodImplOverride1.IntermediateGenericsShape`2 + extends class MethodImplOverride1.BaseTestGenericsShape`4,!F[]> +{ + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class MethodImplOverride1.BaseTestGenericsShape`4::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method MethodImplOverride1.IntermediateGenericsShape`2::.ctor + +} // end of class MethodImplOverride1.IntermediateGenericsShape`2 + +.class private auto ansi beforefieldinit MethodImplOverride1.DerivedGenericsShape`1 + extends class MethodImplOverride1.IntermediateGenericsShape`2 +{ + .method public hidebysig virtual instance string + MethodOnDerived(class [CoreTestAssembly]GenericTypes.GenericClass`1 modopt([CoreTestAssembly]System.Void) e, + !G[] modopt([CoreTestAssembly]System.Object) f) cil managed + { + .override method instance string class MethodImplOverride1.IntermediateGenericsShape`2::Method(class [CoreTestAssembly]GenericTypes.GenericClass`1 modopt([CoreTestAssembly]System.Void), !1[]modopt([CoreTestAssembly]System.Object)) + // Code size 11 (0xb) + .maxstack 1 + .locals init (string V_0) + IL_0000: nop + IL_0001: ldstr "DerivedGenericsShape.Method(int e, G f)" + IL_0006: stloc.0 + IL_0007: br.s IL_0009 + + IL_0009: ldloc.0 + IL_000a: ret + } // end of method MethodImplOverride1.DerivedGenericsShape`1::Method + + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class MethodImplOverride1.IntermediateGenericsShape`2::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method MethodImplOverride1.DerivedGenericsShape`1::.ctor + +} // end of class MethodImplOverride1.DerivedGenericsShape`1 + +.class private auto ansi beforefieldinit MethodImplOverride1.DerivedGenericsShapeInvalidSubstitutedOverride + extends class MethodImplOverride1.IntermediateGenericsShape`2 +{ + .method public hidebysig virtual instance string + MethodOnDerived(int32 e, + int32 f) cil managed + { + .override method instance string class MethodImplOverride1.BaseTestGenericsShape`4::Method(int32, int32) + // Code size 11 (0xb) + .maxstack 1 + .locals init (string V_0) + IL_0000: nop + IL_0001: ldstr "DerivedGenericsShapeInvalidSubstitutedOverride.Method(int e, int f)" + IL_0006: stloc.0 + IL_0007: br.s IL_0009 + + IL_0009: ldloc.0 + IL_000a: ret + } // end of method MethodImplOverride1.DerivedGenericsShapeInvalidSubstitutedOverride::Method + + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class MethodImplOverride1.IntermediateGenericsShape`2::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method MethodImplOverride1.DerivedGenericsShapeInvalidSubstitutedOverride::.ctor + +} // end of class MethodImplOverride1.DerivedGenericsShapeInvalidSubstitutedOverride + + +// Types for Test4 +.class interface private abstract auto ansi MethodImplOverride1.IMultiGeneric`2 +{ + .method public hidebysig newslot abstract virtual + instance string Func(!T t1, + !U u2) cil managed + { + } // end of method MethodImplOverride1.IMultiGeneric`2::Func + + .method public hidebysig newslot abstract virtual + instance string Func(!U u1, + !T t2) cil managed + { + } // end of method MethodImplOverride1.IMultiGeneric`2::Func + +} // end of class MethodImplOverride1.IMultiGeneric`2 + +.class private auto ansi beforefieldinit MethodImplOverride1.Implementor`2 + extends [CoreTestAssembly]System.Object + implements class MethodImplOverride1.IMultiGeneric`2 +{ + .method private hidebysig newslot virtual final + instance string 'IMultiGeneric.Func'(!A t1, + !B u2) cil managed + { + .override method instance string class MethodImplOverride1.IMultiGeneric`2::Func(!0, + !1) + // Code size 11 (0xb) + .maxstack 1 + .locals init (string V_0) + IL_0000: nop + IL_0001: ldstr "Implementor.IMultiGeneric.Func(A t1, B " + + "u2)" + IL_0006: stloc.0 + IL_0007: br.s IL_0009 + + IL_0009: ldloc.0 + IL_000a: ret + } // end of method MethodImplOverride1.Implementor`2::'IMultiGeneric.Func' + + .method private hidebysig newslot virtual final + instance string 'IMultiGeneric.Func'(!B u1, + !A t2) cil managed + { + .override method instance string class MethodImplOverride1.IMultiGeneric`2::Func(!1, + !0) + // Code size 11 (0xb) + .maxstack 1 + .locals init (string V_0) + IL_0000: nop + IL_0001: ldstr "Implementor.IMultiGeneric.Func(B u1, A " + + "t2)" + IL_0006: stloc.0 + IL_0007: br.s IL_0009 + + IL_0009: ldloc.0 + IL_000a: ret + } // end of method MethodImplOverride1.Implementor`2::'IMultiGeneric.Func' + + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [CoreTestAssembly]System.Object::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method MethodImplOverride1.Implementor`2::.ctor + +} // end of class MethodImplOverride1.Implementor`2 + +.class private auto ansi beforefieldinit MethodImplOverride1.PartialIntImplementor`1 + extends [CoreTestAssembly]System.Object + implements class MethodImplOverride1.IMultiGeneric`2 +{ + .method private hidebysig newslot virtual final + instance string 'IMultiGeneric.Func'(!C t1, + int32 u2) cil managed + { + .override method instance string class MethodImplOverride1.IMultiGeneric`2::Func(!0, + !1) + // Code size 11 (0xb) + .maxstack 1 + .locals init (string V_0) + IL_0000: nop + IL_0001: ldstr "PartialIntImplementor.IMultiGeneric.Fun" + + "c(C t1, int u2)" + IL_0006: stloc.0 + IL_0007: br.s IL_0009 + + IL_0009: ldloc.0 + IL_000a: ret + } // end of method MethodImplOverride1.PartialIntImplementor`1::'IMultiGeneric.Func' + + .method private hidebysig newslot virtual final + instance string 'IMultiGeneric.Func'(int32 u1, + !C t2) cil managed + { + .override method instance string class MethodImplOverride1.IMultiGeneric`2::Func(!1, + !0) + // Code size 11 (0xb) + .maxstack 1 + .locals init (string V_0) + IL_0000: nop + IL_0001: ldstr "PartialIntImplementor.IMultiGeneric.Fun" + + "c(int u1, C t2)" + IL_0006: stloc.0 + IL_0007: br.s IL_0009 + + IL_0009: ldloc.0 + IL_000a: ret + } // end of method MethodImplOverride1.PartialIntImplementor`1::'IMultiGeneric.Func' + + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [CoreTestAssembly]System.Object::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method MethodImplOverride1.PartialIntImplementor`1::.ctor + +} // end of class MethodImplOverride1.PartialIntImplementor`1 + +.class private auto ansi beforefieldinit MethodImplOverride1.IntImplementor + extends [CoreTestAssembly]System.Object + implements class MethodImplOverride1.IMultiGeneric`2 +{ + .method public hidebysig newslot virtual final + instance string Func(int32 x, + int32 y) cil managed + { + // Code size 11 (0xb) + .maxstack 1 + .locals init (string V_0) + IL_0000: nop + IL_0001: ldstr "IntImplementor.Func(int x, int y)" + IL_0006: stloc.0 + IL_0007: br.s IL_0009 + + IL_0009: ldloc.0 + IL_000a: ret + } // end of method MethodImplOverride1.IntImplementor::Func + + .method private hidebysig newslot virtual final + instance string 'IMultiGeneric.Func(!0,!1)'(int32 u1, + int32 t2) cil managed + { + .override method instance string class MethodImplOverride1.IMultiGeneric`2::Func(!0, + !1) + // Code size 11 (0xb) + .maxstack 1 + .locals init (string V_0) + IL_0000: nop + IL_0001: ldstr "IntImplementor.IMultiGeneric.Func(!0, !1)" + IL_0006: stloc.0 + IL_0007: br.s IL_0009 + + IL_0009: ldloc.0 + IL_000a: ret + } // end of method MethodImplOverride1.IntImplementor::'IMultiGeneric.Func(!0,!1)' + + .method private hidebysig newslot virtual final + instance string 'IMultiGeneric.Func(!1,!0)'(int32 u1, + int32 t2) cil managed + { + .override method instance string class MethodImplOverride1.IMultiGeneric`2::Func(!1, + !0) + // Code size 11 (0xb) + .maxstack 1 + .locals init (string V_0) + IL_0000: nop + IL_0001: ldstr "IntImplementor.IMultiGeneric.Func(!1, !0)" + IL_0006: stloc.0 + IL_0007: br.s IL_0009 + + IL_0009: ldloc.0 + IL_000a: ret + } // end of method MethodImplOverride1.IntImplementor::'IMultiGeneric.Func(!1,!0)' + + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [CoreTestAssembly]System.Object::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method MethodImplOverride1.IntImplementor::.ctor + +} // end of class MethodImplOverride1.IntImplementor + +// Types for Test5 +.class interface private abstract auto ansi MethodImplOverride1.ISingleGeneric`1 +{ + .method public hidebysig newslot abstract virtual + instance string Method(!T t) cil managed + { + } // end of method MethodImplOverride1.ISingleGeneric`1::Method + +} // end of class MethodImplOverride1.ISingleGeneric`1 diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILTestAssembly/Signature.il b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILTestAssembly/Signature.il new file mode 100644 index 000000000000..b28c850616f7 --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILTestAssembly/Signature.il @@ -0,0 +1,99 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +.class private auto ansi beforefieldinit Atom + extends [CoreTestAssembly]System.Object +{ + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [CoreTestAssembly]System.Object::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method I::.ctor + +} // end of class Atom + +.class private auto ansi beforefieldinit A`1 + extends [CoreTestAssembly]System.Object +{ + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [CoreTestAssembly]System.Object::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method A`1::.ctor + +} // end of class A`1 + +.class private auto ansi beforefieldinit BaseClass`2 + extends [CoreTestAssembly]System.Object +{ + .method public hidebysig newslot virtual + instance void Method(!U u, + !T modopt (FooModifier) t) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method BaseClass`2::Method + + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [CoreTestAssembly]System.Object::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method BaseClass`2::.ctor + +} // end of class BaseClass`2 + +.class private auto ansi beforefieldinit DerivedClass + extends class BaseClass`2,class Atom> +{ + .method public hidebysig virtual instance void + Method(class A`1 u, + class Atom modopt (FooModifier) t) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method DerivedClass::Method + + .method public hidebysig virtual instance void + Method(class A`1 u, + class Atom t) cil managed + { + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method DerivedClass::Method + + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class BaseClass`2,class Atom>::.ctor() + IL_0006: nop + IL_0007: ret + } // end of method DerivedClass::.ctor + +} // end of DerivedClass + +.class public FooModifier { } +.class public BarModifier { } diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILTestAssembly/StaticFieldLayout.il b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILTestAssembly/StaticFieldLayout.il new file mode 100644 index 000000000000..21e739bbd1cd --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILTestAssembly/StaticFieldLayout.il @@ -0,0 +1,16 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +.class public auto ansi beforefieldinit StaticFieldLayout.RvaStatics + extends [CoreTestAssembly]System.Object +{ + .field private static int32 StaticInitedInt at D_00004000 + .data D_00004000 = bytearray (12 34 56 78) +} + +.class public auto ansi beforefieldinit StaticFieldLayout.FunctionPointerType + extends [CoreTestAssembly]System.Object +{ + .field private static int32 StaticIntField; + .field private static method object *(object) StaticMethodField; +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILTestAssembly/VirtualFunctionOverride.il b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILTestAssembly/VirtualFunctionOverride.il new file mode 100644 index 000000000000..a8df6b5d4d02 --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILTestAssembly/VirtualFunctionOverride.il @@ -0,0 +1,48 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +.class public auto ansi beforefieldinit VirtualFunctionOverride.ExplicitOverride + extends [CoreTestAssembly]System.Object +{ + .method public virtual int32 MyGetHashCode() + { + .override [CoreTestAssembly]System.Object::GetHashCode + + ldc.i4 42 + ret + } +} + +.class private auto ansi beforefieldinit VirtualFunctionOverride.MyBase + extends [CoreTestAssembly]System.Object +{ + .method public hidebysig newslot specialname virtual + instance int32 get_foo() cil managed + { + ldc.i4 42 + ret + } + + .property instance int32 foo() + { + .get instance int32 VirtualFunctionOverride.MyBase::get_foo() + } +} + +.class private auto ansi beforefieldinit VirtualFunctionOverride.MyDerived2 + extends VirtualFunctionOverride.MyBase +{ + .method public hidebysig newslot specialname virtual + instance int32 get_foo() cil managed + { + .override VirtualFunctionOverride.MyBase::get_foo + + ldc.i4 42 + ret + } + + .property instance int32 foo() + { + .get instance int32 VirtualFunctionOverride.MyDerived2::get_foo() + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/InstanceFieldLayoutTests.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/InstanceFieldLayoutTests.cs new file mode 100644 index 000000000000..942021d77bfa --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/InstanceFieldLayoutTests.cs @@ -0,0 +1,859 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Collections.Generic; + +using Internal.TypeSystem; + +using Xunit; + +namespace TypeSystemTests +{ + public class InstanceFieldLayoutTests + { + TestTypeSystemContext _context; + ModuleDesc _testModule; + ModuleDesc _ilTestModule; + + public InstanceFieldLayoutTests() + { + _context = new TestTypeSystemContext(TargetArchitecture.X64); + var systemModule = _context.CreateModuleForSimpleName("CoreTestAssembly"); + _context.SetSystemModule(systemModule); + + _testModule = systemModule; + _ilTestModule = _context.CreateModuleForSimpleName("ILTestAssembly"); + } + + [Fact] + public void TestExplicitLayout() + { + MetadataType t = _testModule.GetType("Explicit", "Class1"); + + // With 64bit, there should be 8 bytes for the System.Object EE data pointer + + // 10 bytes up until the offset of the char field + the char size of 2 + we + // round up the whole instance size to the next pointer size (+4) = 24 + Assert.Equal(24, t.InstanceByteCount.AsInt); + + foreach (var field in t.GetFields()) + { + if (field.IsStatic) + continue; + + if (field.Name == "Bar") + { + // Bar has explicit offset 4 and is in a class (with S.O size overhead of ) + // Therefore it should have offset 4 + 8 = 12 + Assert.Equal(12, field.Offset.AsInt); + } + else if (field.Name == "Baz") + { + // Baz has explicit offset 10. 10 + 8 = 18 + Assert.Equal(18, field.Offset.AsInt); + } + else + { + Assert.True(false); + } + } + } + + [Fact] + public void TestExplicitLayoutThatIsEmpty() + { + var explicitEmptyClassType = _testModule.GetType("Explicit", "ExplicitEmptyClass"); + + // ExplicitEmpty class has 8 from System.Object overhead = 8 + Assert.Equal(8, explicitEmptyClassType.InstanceByteCount.AsInt); + + var explicitEmptyStructType = _testModule.GetType("Explicit", "ExplicitEmptyStruct"); + + // ExplicitEmpty class has 0 bytes in it... so instance field size gets pushed up to 1. + Assert.Equal(1, explicitEmptyStructType.InstanceFieldSize.AsInt); + } + + [Fact] + public void TestExplicitTypeLayoutWithSize() + { + var explicitSizeType = _testModule.GetType("Explicit", "ExplicitSize"); + Assert.Equal(48, explicitSizeType.InstanceByteCount.AsInt); + } + + [Fact] + public void TestExplicitTypeLayoutWithInheritance() + { + MetadataType class2Type = _testModule.GetType("Explicit", "Class2"); + + // Class1 has size 24 which Class2 inherits from. Class2 adds a byte at offset 20, so + 21 + // = 45, rounding up to the next pointer size = 48 + Assert.Equal(48, class2Type.InstanceByteCount.AsInt); + + foreach (var f in class2Type.GetFields()) + { + if (f.IsStatic) + continue; + + if (f.Name == "Lol") + { + // First field after base class, with offset 0 so it should lie on the byte count of + // the base class = 24 + Assert.Equal(24, f.Offset.AsInt); + } + else if (f.Name == "Omg") + { + // Offset 20 from base class byte count = 44 + Assert.Equal(44, f.Offset.AsInt); + } + else + { + Assert.True(false); + } + } + } + + [Fact] + public void TestInvalidExplicitTypeLayout() + { + { + DefType type = _testModule.GetType("Explicit", "MisalignedPointer"); + Assert.Throws(() => type.ComputeInstanceLayout(InstanceLayoutKind.TypeAndFields)); + } + + { + DefType type = _testModule.GetType("Explicit", "MisalignedByRef"); + Assert.Throws(() => type.ComputeInstanceLayout(InstanceLayoutKind.TypeAndFields)); + } + } + + [Fact] + public void TestSequentialTypeLayout() + { + MetadataType class1Type = _testModule.GetType("Sequential", "Class1"); + + // Byte count + // Base Class 8 + // MyInt 4 + // MyBool 1 + 1 padding + // MyChar 2 + // MyString 8 + // MyByteArray 8 + // MyClass1SelfRef 8 + // ------------------- + // 40 (0x28) + Assert.Equal(0x28, class1Type.InstanceByteCount.AsInt); + + foreach (var f in class1Type.GetFields()) + { + if (f.IsStatic) + continue; + + switch (f.Name) + { + case "MyInt": + Assert.Equal(0x8, f.Offset.AsInt); + break; + case "MyBool": + Assert.Equal(0xC, f.Offset.AsInt); + break; + case "MyChar": + Assert.Equal(0xE, f.Offset.AsInt); + break; + case "MyString": + Assert.Equal(0x10, f.Offset.AsInt); + break; + case "MyByteArray": + Assert.Equal(0x18, f.Offset.AsInt); + break; + case "MyClass1SelfRef": + Assert.Equal(0x20, f.Offset.AsInt); + break; + default: + Assert.True(false); + break; + } + } + } + + [Fact] + public void TestSequentialTypeLayoutInheritance() + { + MetadataType class2Type = _testModule.GetType("Sequential", "Class2"); + + // Byte count + // Base Class 40 + // MyInt2 4 + 4 byte padding to make class size % pointer size == 0 + // ------------------- + // 48 (0x30) + Assert.Equal(0x30, class2Type.InstanceByteCount.AsInt); + + foreach (var f in class2Type.GetFields()) + { + if (f.IsStatic) + continue; + + switch (f.Name) + { + case "MyInt2": + Assert.Equal(0x28, f.Offset.AsInt); + break; + default: + Assert.True(false); + break; + } + } + } + + [Fact] + public void TestSequentialTypeLayoutStruct() + { + MetadataType struct0Type = _testModule.GetType("Sequential", "Struct0"); + + // Byte count + // bool b1 1 + // bool b2 1 + // bool b3 1 + 1 padding for int alignment + // int i1 4 + // string s1 8 + // ------------------- + // 16 (0x10) + Assert.Equal(0x10, struct0Type.InstanceByteCount.AsInt); + + foreach (var f in struct0Type.GetFields()) + { + if (f.IsStatic) + continue; + + switch (f.Name) + { + case "b1": + Assert.Equal(0x0, f.Offset.AsInt); + break; + case "b2": + Assert.Equal(0x1, f.Offset.AsInt); + break; + case "b3": + Assert.Equal(0x2, f.Offset.AsInt); + break; + case "i1": + Assert.Equal(0x4, f.Offset.AsInt); + break; + case "s1": + Assert.Equal(0x8, f.Offset.AsInt); + break; + default: + Assert.True(false); + break; + } + } + } + + [Fact] + // Test that when a struct is used as a field, we use its instance byte size as the size (ie, treat it + // as a value type) and not a pointer size. + public void TestSequentialTypeLayoutStructEmbedded() + { + MetadataType struct1Type = _testModule.GetType("Sequential", "Struct1"); + + // Byte count + // struct MyStruct0 16 + // bool MyBool 1 + // ----------------------- + // 24 (0x18) + Assert.Equal(0x18, struct1Type.InstanceByteCount.AsInt); + + foreach (var f in struct1Type.GetFields()) + { + if (f.IsStatic) + continue; + + switch (f.Name) + { + case "MyStruct0": + Assert.Equal(0x0, f.Offset.AsInt); + break; + case "MyBool": + Assert.Equal(0x10, f.Offset.AsInt); + break; + default: + Assert.True(false); + break; + } + } + } + + [Fact] + public void TestAutoLayoutStruct() + { + MetadataType structWithIntCharType = _testModule.GetType("Auto", "StructWithIntChar"); + + // Byte count + // MyStructInt 4 + // MyStructChar 2 + // ------------------- + // 8 (0x08) + Assert.Equal(0x08, structWithIntCharType.InstanceByteCount.AsInt); + + foreach (var f in structWithIntCharType.GetFields()) + { + if (f.IsStatic) + continue; + + switch (f.Name) + { + case "MyStructInt": + Assert.Equal(0x00, f.Offset.AsInt); + break; + case "MyStructChar": + Assert.Equal(0x04, f.Offset.AsInt); + break; + default: + Assert.True(false); + break; + } + } + } + + [Fact] + public void TestAutoTypeLayoutClassContainingStructs() + { + MetadataType classContainingStructsType = _testModule.GetType("Auto", "ClassContainingStructs"); + + // Byte count + // Base Class 8 + // MyByteArray 8 + // MyString1 8 + // MyDouble 8 + // MyLong 8 + // MyInt 4 + // MyChar1 2 + // MyBool1 1 + // MyBool2 1 + // MyStructWithBool 1 + 3 to align up to the next multiple of 4 after placing a value class + // 4 byte padding to make offset % pointer size == 0 before placing the next value class + // MyStructWithIntChar 6 + 2 to align up to the next multiple of 4 after placing a value class + // MyStructWithChar 2 + 2 to align up to the next multiple of 4 after placing a value class + 4 byte padding to make class size % pointer size == 0 + // ------------------- + // 72 (0x48) + Assert.Equal(0x48, classContainingStructsType.InstanceByteCount.AsInt); + + foreach (var f in classContainingStructsType.GetFields()) + { + if (f.IsStatic) + continue; + + switch (f.Name) + { + case "MyByteArray": + Assert.Equal(0x08, f.Offset.AsInt); + break; + case "MyString1": + Assert.Equal(0x10, f.Offset.AsInt); + break; + case "MyDouble": + Assert.Equal(0x18, f.Offset.AsInt); + break; + case "MyLong": + Assert.Equal(0x20, f.Offset.AsInt); + break; + case "MyInt": + Assert.Equal(0x28, f.Offset.AsInt); + break; + case "MyChar1": + Assert.Equal(0x2C, f.Offset.AsInt); + break; + case "MyBool1": + Assert.Equal(0x2E, f.Offset.AsInt); + break; + case "MyBool2": + Assert.Equal(0x2F, f.Offset.AsInt); + break; + case "MyStructWithBool": + Assert.Equal(0x30, f.Offset.AsInt); + break; + case "MyStructWithIntChar": + Assert.Equal(0x38, f.Offset.AsInt); + break; + case "MyStructWithChar": + Assert.Equal(0x40, f.Offset.AsInt); + break; + default: + Assert.True(false); + break; + } + } + } + + [Fact] + public void TestAutoTypeLayoutBaseClass7BytesRemaining() + { + MetadataType baseClass7BytesRemainingType = _testModule.GetType("Auto", "BaseClass7BytesRemaining"); + + // Byte count + // Base Class 8 + // MyByteArray1 8 + // MyString1 8 + // MyDouble1 8 + // MyLong1 8 + // MyBool1 1 + 7 byte padding to make class size % pointer size == 0 + // ------------------- + // 48 (0x30) + Assert.Equal(0x30, baseClass7BytesRemainingType.InstanceByteCount.AsInt); + + foreach (var f in baseClass7BytesRemainingType.GetFields()) + { + if (f.IsStatic) + continue; + + switch (f.Name) + { + case "MyByteArray1": + Assert.Equal(0x08, f.Offset.AsInt); + break; + case "MyString1": + Assert.Equal(0x10, f.Offset.AsInt); + break; + case "MyDouble1": + Assert.Equal(0x18, f.Offset.AsInt); + break; + case "MyLong1": + Assert.Equal(0x20, f.Offset.AsInt); + break; + case "MyBool1": + Assert.Equal(0x28, f.Offset.AsInt); + break; + default: + Assert.True(false); + break; + } + } + } + + [Fact] + public void TestAutoTypeLayoutBaseClass4BytesRemaining() + { + MetadataType baseClass4BytesRemainingType = _testModule.GetType("Auto", "BaseClass4BytesRemaining"); + + // Byte count + // Base Class 8 + // MyLong1 8 + // MyUint1 4 + 4 byte padding to make class size % pointer size == 0 + // ------------------- + // 24 (0x18) + Assert.Equal(0x18, baseClass4BytesRemainingType.InstanceByteCount.AsInt); + + foreach (var f in baseClass4BytesRemainingType.GetFields()) + { + if (f.IsStatic) + continue; + + switch (f.Name) + { + case "MyLong1": + Assert.Equal(0x08, f.Offset.AsInt); + break; + case "MyUint1": + Assert.Equal(0x10, f.Offset.AsInt); + break; + default: + Assert.True(false); + break; + } + } + } + + [Fact] + public void TestAutoTypeLayoutBaseClass3BytesRemaining() + { + MetadataType baseClass3BytesRemainingType = _testModule.GetType("Auto", "BaseClass3BytesRemaining"); + + // Byte count + // Base Class 8 + // MyString1 8 + // MyInt1 4 + // MyBool1 1 + 3 byte padding to make class size % pointer size == 0 + // ------------------- + // 24 (0x18) + Assert.Equal(0x18, baseClass3BytesRemainingType.InstanceByteCount.AsInt); + + foreach (var f in baseClass3BytesRemainingType.GetFields()) + { + if (f.IsStatic) + continue; + + switch (f.Name) + { + case "MyString1": + Assert.Equal(0x08, f.Offset.AsInt); + break; + case "MyInt1": + Assert.Equal(0x10, f.Offset.AsInt); + break; + case "MyBool1": + Assert.Equal(0x14, f.Offset.AsInt); + break; + default: + Assert.True(false); + break; + } + } + } + + [Fact] + public void TestAutoTypeLayoutOptimizePartial() + { + MetadataType optimizePartialType = _testModule.GetType("Auto", "OptimizePartial"); + + // Byte count + // Base Class 41 (unaligned) + // OptBool 1 + // OptChar 2 + 4 byte padding to make class size % pointer size == 0 + // NoOptString 8 + // NoOptLong 8 + // ------------------- + // 64 (0x40) + Assert.Equal(0x40, optimizePartialType.InstanceByteCount.AsInt); + + foreach (var f in optimizePartialType.GetFields()) + { + if (f.IsStatic) + continue; + + switch (f.Name) + { + case "OptBool": + Assert.Equal(0x29, f.Offset.AsInt); + break; + case "OptChar": + Assert.Equal(0x2A, f.Offset.AsInt); + break; + case "NoOptString": + Assert.Equal(0x30, f.Offset.AsInt); + break; + case "NoOptLong": + Assert.Equal(0x38, f.Offset.AsInt); + break; + default: + Assert.True(false); + break; + } + } + } + + [Fact] + public void TestAutoTypeLayoutOptimize7Bools() + { + MetadataType optimize7BoolsType = _testModule.GetType("Auto", "Optimize7Bools"); + + // Byte count + // Base Class 41 (unaligned) + // OptBool1 1 + // OptBool2 1 + // OptBool3 1 + // OptBool4 1 + // OptBool5 1 + // OptBool6 1 + // OptBool7 1 + // NoOptString 8 + // NoOptBool8 1 + 7 byte padding to make class size % pointer size == 0 + // ------------------- + // 64 (0x40) + Assert.Equal(0x40, optimize7BoolsType.InstanceByteCount.AsInt); + + foreach (var f in optimize7BoolsType.GetFields()) + { + if (f.IsStatic) + continue; + + switch (f.Name) + { + case "OptBool1": + Assert.Equal(0x29, f.Offset.AsInt); + break; + case "OptBool2": + Assert.Equal(0x2A, f.Offset.AsInt); + break; + case "OptBool3": + Assert.Equal(0x2B, f.Offset.AsInt); + break; + case "OptBool4": + Assert.Equal(0x2C, f.Offset.AsInt); + break; + case "OptBool5": + Assert.Equal(0x2D, f.Offset.AsInt); + break; + case "OptBool6": + Assert.Equal(0x2E, f.Offset.AsInt); + break; + case "OptBool7": + Assert.Equal(0x2F, f.Offset.AsInt); + break; + case "NoOptString": + Assert.Equal(0x30, f.Offset.AsInt); + break; + case "NoOptBool8": + Assert.Equal(0x38, f.Offset.AsInt); + break; + default: + Assert.True(false); + break; + } + } + } + + [Fact] + public void TestAutoTypeLayoutOptimizeAlignedFields() + { + MetadataType optimizeAlignedFieldsType = _testModule.GetType("Auto", "OptimizeAlignedFields"); + + // Byte count + // Base Class 41 (unaligned) + // OptBool1 1 + // OptChar1 2 + // OptChar2 2 + // OptBool2 1 + // OptBool3 1 + // NoOptString 8 + // NoOptBool4 1 + 7 byte padding to make class size % pointer size == 0 + // ------------------- + // 64 (0x40) + Assert.Equal(0x40, optimizeAlignedFieldsType.InstanceByteCount.AsInt); + + foreach (var f in optimizeAlignedFieldsType.GetFields()) + { + if (f.IsStatic) + continue; + + switch (f.Name) + { + case "OptBool1": + Assert.Equal(0x29, f.Offset.AsInt); + break; + case "OptChar1": + Assert.Equal(0x2A, f.Offset.AsInt); + break; + case "OptChar2": + Assert.Equal(0x2C, f.Offset.AsInt); + break; + case "OptBool2": + Assert.Equal(0x2E, f.Offset.AsInt); + break; + case "OptBool3": + Assert.Equal(0x2F, f.Offset.AsInt); + break; + case "NoOptString": + Assert.Equal(0x30, f.Offset.AsInt); + break; + case "NoOptBool4": + Assert.Equal(0x38, f.Offset.AsInt); + break; + default: + Assert.True(false); + break; + } + } + } + + [Fact] + public void TestAutoTypeLayoutOptimizeLargestField() + { + MetadataType optimizeLargestFieldType = _testModule.GetType("Auto", "OptimizeLargestField"); + + // Byte count + // Base Class 20 (unaligned) + // OptInt 4 + // NoOptString 8 + // NoOptChar 2 + // NoOptBool 1 + 5 byte padding to make class size % pointer size == 0 + // ------------------- + // 40 (0x28) + Assert.Equal(0x28, optimizeLargestFieldType.InstanceByteCount.AsInt); + + foreach (var f in optimizeLargestFieldType.GetFields()) + { + if (f.IsStatic) + continue; + + switch (f.Name) + { + case "OptInt": + Assert.Equal(0x14, f.Offset.AsInt); + break; + case "NoOptString": + Assert.Equal(0x18, f.Offset.AsInt); + break; + case "NoOptChar": + Assert.Equal(0x20, f.Offset.AsInt); + break; + case "NoOptBool": + Assert.Equal(0x22, f.Offset.AsInt); + break; + default: + Assert.True(false); + break; + } + } + } + + [Fact] + public void TestAutoTypeLayoutNoOptimizeMisaligned() + { + MetadataType noOptimizeMisalignedType = _testModule.GetType("Auto", "NoOptimizeMisaligned"); + + // Byte count + // Base Class 21 (unaligned) + 3 byte padding to make class size % pointer size == 0 + // NoOptString 8 + // NoOptInt 4 + // NoOptChar 2 + 2 byte padding to make class size % pointer size == 0 + // ------------------- + // 40 (0x28) + Assert.Equal(0x28, noOptimizeMisalignedType.InstanceByteCount.AsInt); + + foreach (var f in noOptimizeMisalignedType.GetFields()) + { + if (f.IsStatic) + continue; + + switch (f.Name) + { + case "NoOptString": + Assert.Equal(0x18, f.Offset.AsInt); + break; + case "NoOptInt": + Assert.Equal(0x20, f.Offset.AsInt); + break; + case "NoOptChar": + Assert.Equal(0x24, f.Offset.AsInt); + break; + default: + Assert.True(false); + break; + } + } + } + + [Fact] + public void TestAutoTypeLayoutNoOptimizeCharAtSize2Alignment() + { + MetadataType noOptimizeCharAtSize2AlignmentType = _testModule.GetType("Auto", "NoOptimizeCharAtSize2Alignment"); + + // Byte count + // Base Class 21 (unaligned) + 1 byte padding to align char + // NoOptChar 2 + // ------------------- + // 24 (0x18) + Assert.Equal(0x18, noOptimizeCharAtSize2AlignmentType.InstanceByteCount.AsInt); + + foreach (var f in noOptimizeCharAtSize2AlignmentType.GetFields()) + { + if (f.IsStatic) + continue; + + switch (f.Name) + { + case "NoOptChar": + Assert.Equal(0x16, f.Offset.AsInt); + break; + default: + Assert.True(false); + break; + } + } + } + + public static IEnumerable AutoTypeLayoutMinPackingData() + { + yield return new object[] { WellKnownType.Boolean, 2 }; + yield return new object[] { WellKnownType.Byte, 2 }; + yield return new object[] { WellKnownType.Char, 4 }; + yield return new object[] { WellKnownType.Double, 16 }; + yield return new object[] { WellKnownType.Int16, 4 }; + yield return new object[] { WellKnownType.Int32, 8 }; + yield return new object[] { WellKnownType.Int64, 16 }; + yield return new object[] { WellKnownType.IntPtr, 16 }; + yield return new object[] { WellKnownType.Single, 8 }; + } + + [Theory] + [MemberData(nameof(AutoTypeLayoutMinPackingData))] + public void TestAutoTypeLayoutMinPacking(WellKnownType type, int expectedSize) + { + MetadataType minPackingType = _testModule.GetType("Auto", "MinPacking`1"); + InstantiatedType inst = minPackingType.MakeInstantiatedType(_context.GetWellKnownType(type)); + Assert.Equal(expectedSize, inst.InstanceFieldSize.AsInt); + } + + [Fact] + public void TestTypeContainsGCPointers() + { + MetadataType type = _testModule.GetType("ContainsGCPointers", "NoPointers"); + Assert.False(type.ContainsGCPointers); + + type = _testModule.GetType("ContainsGCPointers", "StillNoPointers"); + Assert.False(type.ContainsGCPointers); + + type = _testModule.GetType("ContainsGCPointers", "ClassNoPointers"); + Assert.False(type.ContainsGCPointers); + + type = _testModule.GetType("ContainsGCPointers", "HasPointers"); + Assert.True(type.ContainsGCPointers); + + type = _testModule.GetType("ContainsGCPointers", "FieldHasPointers"); + Assert.True(type.ContainsGCPointers); + + type = _testModule.GetType("ContainsGCPointers", "ClassHasPointers"); + Assert.True(type.ContainsGCPointers); + + type = _testModule.GetType("ContainsGCPointers", "BaseClassHasPointers"); + Assert.True(type.ContainsGCPointers); + + type = _testModule.GetType("ContainsGCPointers", "ClassHasIntArray"); + Assert.True(type.ContainsGCPointers); + + type = _testModule.GetType("ContainsGCPointers", "ClassHasArrayOfClassType"); + Assert.True(type.ContainsGCPointers); + } + + [Fact] + public void TestByRefLikeTypes() + { + { + DefType type = _context.GetWellKnownType(WellKnownType.TypedReference); + Assert.True(type.IsByRefLike); + } + + { + DefType type = _context.GetWellKnownType(WellKnownType.ByReferenceOfT); + Assert.True(type.IsByRefLike); + } + + { + DefType type = _testModule.GetType("IsByRefLike", "ByRefLikeStruct"); + Assert.True(type.IsByRefLike); + } + + { + DefType type = _testModule.GetType("IsByRefLike", "NotByRefLike"); + Assert.False(type.IsByRefLike); + } + } + + [Fact] + public void TestInvalidByRefLikeTypes() + { + { + DefType type = _ilTestModule.GetType("IsByRefLike", "InvalidClass1"); + Assert.Throws(() => type.ComputeInstanceLayout(InstanceLayoutKind.TypeAndFields)); + } + + { + DefType type = _ilTestModule.GetType("IsByRefLike", "InvalidClass2"); + Assert.Throws(() => type.ComputeInstanceLayout(InstanceLayoutKind.TypeAndFields)); + } + + { + DefType type = _ilTestModule.GetType("IsByRefLike", "InvalidStruct"); + Assert.Throws(() => type.ComputeInstanceLayout(InstanceLayoutKind.TypeAndFields)); + } + } + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/InterfacesTests.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/InterfacesTests.cs new file mode 100644 index 000000000000..683138a88235 --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/InterfacesTests.cs @@ -0,0 +1,190 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Linq; +using Internal.TypeSystem; + +using Xunit; + +namespace TypeSystemTests +{ + public class InterfacesTests + { + TestTypeSystemContext _context; + ModuleDesc _testModule; + + public InterfacesTests() + { + _context = new TestTypeSystemContext(TargetArchitecture.X64); + var systemModule = _context.CreateModuleForSimpleName("CoreTestAssembly"); + _context.SetSystemModule(systemModule); + + _testModule = systemModule; + } + + [Fact] + public void TestMultidimensionalArrays() + { + DefType systemArrayType = _context.GetWellKnownType(WellKnownType.Array); + TypeDesc objectType = _context.GetWellKnownType(WellKnownType.Object); + + ArrayType objectMDArray = _context.GetArrayType(objectType, 2); + + // MD array should have the same set of interfaces as System.Array + Assert.Equal(systemArrayType.RuntimeInterfaces, objectMDArray.RuntimeInterfaces); + } + + [Fact] + public void TestSingleDimensionalArrays() + { + DefType systemArrayType = _context.GetWellKnownType(WellKnownType.Array); + MetadataType systemIListOfTType = _testModule.GetType("System.Collections.Generic", "IList`1"); + + TypeDesc objectType = _context.GetWellKnownType(WellKnownType.Object); + + ArrayType objectArray = _context.GetArrayType(objectType); + + // The set of interfaces on an array shall start with the same set that exists on System.Array + for (int i = 0; i < systemArrayType.RuntimeInterfaces.Length; i++) + { + Assert.Equal(systemArrayType.RuntimeInterfaces[i], objectArray.RuntimeInterfaces[i]); + } + + // The set of interfaces on an array of type T shall include IList + TypeDesc ilistOfObject = systemIListOfTType.MakeInstantiatedType(objectType); + Assert.Contains(ilistOfObject, objectArray.RuntimeInterfaces); + } + + [Fact] + public void TestNoInterface() + { + MetadataType noInterfacesType = _testModule.GetType("InterfaceArrangements", "NoInterfaces"); + Assert.Empty(noInterfacesType.RuntimeInterfaces); + } + + + [Fact] + public void TestOneInterface() + { + MetadataType oneInterfacesType = _testModule.GetType("InterfaceArrangements", "OneInterface"); + MetadataType i1Type = _testModule.GetType("InterfaceArrangements", "I1"); + + Assert.Equal(new DefType[] { i1Type }, oneInterfacesType.RuntimeInterfaces); + } + + [Fact] + public void TestOverlappingInterfacesAtDerivation() + { + // This test tests that an explicit interface implementation on a type does not cause the + // set of runtime interfaces to get extra duplication + MetadataType derivedFromMidType = _testModule.GetType("InterfaceArrangements", "DerivedFromMid"); + MetadataType igen1Type = _testModule.GetType("InterfaceArrangements", "IGen1`1"); + TypeDesc stringType = _testModule.Context.GetWellKnownType(WellKnownType.String); + DefType igen1OfString = igen1Type.MakeInstantiatedType(stringType); + MetadataType i1Type = _testModule.GetType("InterfaceArrangements", "I1"); + + Assert.Equal(new DefType[] { igen1OfString, i1Type, igen1OfString }, derivedFromMidType.RuntimeInterfaces); + } + + [Fact] + public void TestOverlappingGenericInterfaces() + { + // This test tests that the set of interfaces implemented on a generic type definition + // has the same arrangement regardless of instantiation + MetadataType midType = _testModule.GetType("InterfaceArrangements", "Mid`2"); + MetadataType igen1Type = _testModule.GetType("InterfaceArrangements", "IGen1`1"); + TypeDesc stringType = _testModule.Context.GetWellKnownType(WellKnownType.String); + TypeDesc objectType = _testModule.Context.GetWellKnownType(WellKnownType.Object); + DefType igen1OfString = igen1Type.MakeInstantiatedType(stringType); + DefType igen1OfObject = igen1Type.MakeInstantiatedType(objectType); + MetadataType i1Type = _testModule.GetType("InterfaceArrangements", "I1"); + + TypeDesc mid_string_string = midType.MakeInstantiatedType(stringType, stringType); + TypeDesc mid_string_object = midType.MakeInstantiatedType(stringType, objectType); + TypeDesc mid_object_string = midType.MakeInstantiatedType(objectType, stringType); + TypeDesc mid_object_object = midType.MakeInstantiatedType(objectType, objectType); + + Assert.Equal(new DefType[] { igen1OfString, i1Type, igen1OfString }, mid_string_string.RuntimeInterfaces); + Assert.Equal(new DefType[] { igen1OfString, i1Type, igen1OfObject }, mid_string_object.RuntimeInterfaces); + Assert.Equal(new DefType[] { igen1OfObject, i1Type, igen1OfString }, mid_object_string.RuntimeInterfaces); + Assert.Equal(new DefType[] { igen1OfObject, i1Type, igen1OfObject }, mid_object_object.RuntimeInterfaces); + } + + [Fact] + public void TestInterfaceRequiresImplmentation() + { + MetadataType i1Type = _testModule.GetType("InterfaceArrangements", "I1"); + MetadataType i2Type = _testModule.GetType("InterfaceArrangements", "I2"); + + Assert.Empty(i1Type.RuntimeInterfaces); + Assert.Equal(i1Type.ExplicitlyImplementedInterfaces, i1Type.RuntimeInterfaces); + + Assert.Equal(new DefType[] { i1Type }, i2Type.RuntimeInterfaces); + Assert.Equal(i2Type.ExplicitlyImplementedInterfaces, i2Type.RuntimeInterfaces); + } + + [Fact] + public void TestPointerArrayInterfaces() + { + MetadataType systemArrayType = _testModule.GetType("System", "Array"); + TypeDesc intType = _context.GetWellKnownType(WellKnownType.Int32); + TypeDesc intPointerType = _context.GetPointerType(intType); + + ArrayType intPointerArray = _context.GetArrayType(intPointerType); + + // Pointer arrays should have the same set of interfaces as System.Array + Assert.Equal(systemArrayType.RuntimeInterfaces, intPointerArray.RuntimeInterfaces); + } + + [Fact] + public void TestInterafaceMethodResolution() + { + MetadataType fooType = _testModule.GetType("InterfaceArrangements", "Foo"); + MetadataType derivedType = _testModule.GetType("InterfaceArrangements", "DerivedFromFoo"); + MetadataType superDerivedType = _testModule.GetType("InterfaceArrangements", "SuperDerivedFromFoo"); + + MetadataType ifooOfInt = _testModule.GetType("InterfaceArrangements", "IFoo`1").MakeInstantiatedType(_context.GetWellKnownType(WellKnownType.Int32)); + MetadataType ifooOfString = _testModule.GetType("InterfaceArrangements", "IFoo`1").MakeInstantiatedType(_context.GetWellKnownType(WellKnownType.String)); + + MethodDesc ifooOfIntMethod = ifooOfInt.GetMethods().Where(m => m.Name == "IMethod").Single(); + MethodDesc ifooOfStringMethod = ifooOfString.GetMethods().Where(m => m.Name == "IMethod").Single(); + + MethodDesc result; + + // Resolve on type Foo + { + result = fooType.ResolveInterfaceMethodTarget(ifooOfIntMethod); + Assert.NotNull(result); + Assert.Equal(result.OwningType, fooType); + + result = fooType.ResolveInterfaceMethodTarget(ifooOfStringMethod); + Assert.NotNull(result); + Assert.Equal(result.OwningType, fooType); + } + + // Resolve on type DerivedFromFoo + { + result = derivedType.ResolveInterfaceMethodTarget(ifooOfIntMethod); + Assert.NotNull(result); + Assert.Equal(result.OwningType, fooType); + + result = derivedType.ResolveInterfaceMethodTarget(ifooOfStringMethod); + Assert.NotNull(result); + Assert.Equal(result.OwningType, derivedType); + } + + + // Resolve on type SuperDerivedFromFoo + { + result = superDerivedType.ResolveInterfaceMethodTarget(ifooOfIntMethod); + Assert.NotNull(result); + Assert.Equal(result.OwningType, superDerivedType); + + result = superDerivedType.ResolveInterfaceMethodTarget(ifooOfStringMethod); + Assert.NotNull(result); + Assert.Equal(result.OwningType, derivedType); + } + } + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/RuntimeDeterminedTypesTests.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/RuntimeDeterminedTypesTests.cs new file mode 100644 index 000000000000..a394a562af9f --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/RuntimeDeterminedTypesTests.cs @@ -0,0 +1,172 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Internal.TypeSystem; + +using Xunit; + +namespace TypeSystemTests +{ + public class RuntimeDeterminedTypesTests + { + private TestTypeSystemContext _context; + private ModuleDesc _testModule; + + private MetadataType _referenceType; + private MetadataType _otherReferenceType; + private MetadataType _structType; + private MetadataType _otherStructType; + private MetadataType _genericReferenceType; + private MetadataType _genericStructType; + private MetadataType _genericReferenceTypeWithThreeParams; + private MetadataType _genericStructTypeWithThreeParams; + + public RuntimeDeterminedTypesTests() + { + _context = new TestTypeSystemContext(TargetArchitecture.Unknown); + var systemModule = _context.CreateModuleForSimpleName("CoreTestAssembly"); + _context.SetSystemModule(systemModule); + + _testModule = systemModule; + + _referenceType = _testModule.GetType("Canonicalization", "ReferenceType"); + _otherReferenceType = _testModule.GetType("Canonicalization", "OtherReferenceType"); + _structType = _testModule.GetType("Canonicalization", "StructType"); + _otherStructType = _testModule.GetType("Canonicalization", "OtherStructType"); + _genericReferenceType = _testModule.GetType("Canonicalization", "GenericReferenceType`1"); + _genericStructType = _testModule.GetType("Canonicalization", "GenericStructType`1"); + _genericReferenceTypeWithThreeParams = _testModule.GetType("Canonicalization", "GenericReferenceTypeWithThreeParams`3"); + _genericStructTypeWithThreeParams = _testModule.GetType("Canonicalization", "GenericStructTypeWithThreeParams`3"); + } + + [Fact] + public void TestReferenceTypeConversionToSharedForm() + { + var grtOverRt = _genericReferenceType.MakeInstantiatedType(_referenceType); + var grtOverOtherRt = _genericReferenceType.MakeInstantiatedType(_otherReferenceType); + var grtOverRtShared = grtOverRt.ConvertToSharedRuntimeDeterminedForm(); + var grtOverOtherRtShared = grtOverOtherRt.ConvertToSharedRuntimeDeterminedForm(); + + // GenericReferenceType and GenericReferenceType have the same shared form + Assert.Same(grtOverRtShared, grtOverOtherRtShared); + + // The instantiation argument of the shared form is a runtime determined type + var typeArg = grtOverRtShared.Instantiation[0]; + Assert.IsType(typeArg); + + // The canonical type used in the shared runtime form is __Canon + var runtimeDeterminedType = (RuntimeDeterminedType)typeArg; + Assert.Same(_context.CanonType, runtimeDeterminedType.CanonicalType); + + // The shared runtime form details type is the T from the generic definition + Assert.Same(_genericReferenceType.Instantiation[0], runtimeDeterminedType.RuntimeDeterminedDetailsType); + + // Canonical form of GenericReferenceType is same as canonical form of GenericReferenceType + Assert.Same( + grtOverRtShared.ConvertToCanonForm(CanonicalFormKind.Specific), + grtOverRt.ConvertToCanonForm(CanonicalFormKind.Specific)); + + // GenericReferenceType and GenericReferenceType have the same shared form + var grtOverArray = _genericReferenceType.MakeInstantiatedType(_structType.MakeArrayType()); + var grtOverArrayShared = grtOverArray.ConvertToSharedRuntimeDeterminedForm(); + Assert.Same(grtOverRtShared, grtOverArrayShared); + + // Converting GenericReferenceType to shared form is a no-op + var grtOverSt = _genericReferenceType.MakeInstantiatedType(_structType); + var grtOverStShared = grtOverSt.ConvertToSharedRuntimeDeterminedForm(); + Assert.Same(grtOverStShared, grtOverSt); + } + + [Fact] + public void TestLargeReferenceTypeConversionToSharedForm() + { + var grtOverRtStRt = _genericReferenceTypeWithThreeParams.MakeInstantiatedType( + _referenceType, _structType, _referenceType); + var grtOverRtStOtherRt = _genericReferenceTypeWithThreeParams.MakeInstantiatedType( + _referenceType, _structType, _otherReferenceType); + var grtOverRtStRtShared = grtOverRtStRt.ConvertToSharedRuntimeDeterminedForm(); + var grtOverRtStOtherRtShared = grtOverRtStOtherRt.ConvertToSharedRuntimeDeterminedForm(); + + // GenericReferenceTypeWithThreeParams + // GenericReferenceTypeWithThreeParams + // have the same shared runtime form. + Assert.Same(grtOverRtStRtShared, grtOverRtStOtherRtShared); + + var grtOverStRtSt = _genericReferenceTypeWithThreeParams.MakeInstantiatedType( + _structType, _referenceType, _structType); + var grtOverStOtherRtSt = _genericReferenceTypeWithThreeParams.MakeInstantiatedType( + _structType, _otherReferenceType, _structType); + var grtOverStRtStShared = grtOverStRtSt.ConvertToSharedRuntimeDeterminedForm(); + var grtOverStOtherRtStShared = grtOverStOtherRtSt.ConvertToSharedRuntimeDeterminedForm(); + + // GenericReferenceTypeWithThreeParams + // GenericReferenceTypeWithThreeParams + // have the same shared runtime form. + Assert.Same(grtOverStRtStShared, grtOverStOtherRtStShared); + + // GenericReferenceTypeWithThreeParams + // GenericReferenceTypeWithThreeParams + // have different shared runtime form. + var grtOverStRtOtherSt = _genericReferenceTypeWithThreeParams.MakeInstantiatedType( + _structType, _referenceType, _otherStructType); + var grtOverStRtOtherStShared = grtOverStRtOtherSt.ConvertToSharedRuntimeDeterminedForm(); + Assert.NotSame(grtOverStRtStShared, grtOverStRtOtherStShared); + } + + [Fact] + public void TestUniversalCanonUpgrade() + { + var gstOverUniversalCanon = _genericStructType.MakeInstantiatedType(_context.UniversalCanonType); + var grtOverRtRtStOverUniversal = _genericReferenceTypeWithThreeParams.MakeInstantiatedType( + _referenceType, _referenceType, gstOverUniversalCanon); + var grtOverRtRtStOverUniversalShared = grtOverRtRtStOverUniversal.ConvertToSharedRuntimeDeterminedForm(); + + // Shared runtime form of + // GenericReferenceTypeWithThreeParams> is + // GenericReferenceTypeWithThreeParams + var arg0 = grtOverRtRtStOverUniversalShared.Instantiation[0]; + Assert.IsType(arg0); + Assert.Same(_context.UniversalCanonType, ((RuntimeDeterminedType)arg0).CanonicalType); + var arg2 = grtOverRtRtStOverUniversalShared.Instantiation[2]; + Assert.IsType(arg2); + Assert.Same(_context.UniversalCanonType, ((RuntimeDeterminedType)arg2).CanonicalType); + } + + [Fact] + public void TestSignatureInstantiation() + { + var grtOverRtStRt = _genericReferenceTypeWithThreeParams.MakeInstantiatedType( + _referenceType, _structType, _referenceType); + var grtOverRtStRtShared = grtOverRtStRt.ConvertToSharedRuntimeDeterminedForm(); + + // GenericReferenceTypeWithThreeParams substituted over + // an instantiation of is + // GenericReferenceTypeWithThreeParams + var grtOverRtStRtSharedInstantiated = grtOverRtStRtShared.GetNonRuntimeDeterminedTypeFromRuntimeDeterminedSubtypeViaSubstitution( + new Instantiation(_referenceType, _structType, _otherReferenceType), + Instantiation.Empty); + + var grtOverRtStOtherRt = _genericReferenceTypeWithThreeParams.MakeInstantiatedType( + _referenceType, _structType, _otherReferenceType); + + Assert.Same(grtOverRtStOtherRt, grtOverRtStRtSharedInstantiated); + } + + [Fact] + public void TestInstantiationOverStructOverCanon() + { + var stOverCanon = _genericStructType.MakeInstantiatedType(_context.CanonType); + var grtOverStOverCanon = _genericReferenceType.MakeInstantiatedType( + stOverCanon); + var grtOverStOverCanonShared = grtOverStOverCanon.ConvertToSharedRuntimeDeterminedForm(); + + // GenericReferenceType> converts to + // GenericReferenceType> + var typeArg = grtOverStOverCanonShared.Instantiation[0]; + Assert.IsType(typeArg); + var runtimeDeterminedType = (RuntimeDeterminedType)typeArg; + Assert.Same(stOverCanon, runtimeDeterminedType.CanonicalType); + Assert.Same(_genericReferenceType.Instantiation[0], runtimeDeterminedType.RuntimeDeterminedDetailsType); + } + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/SignatureTests.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/SignatureTests.cs new file mode 100644 index 000000000000..cfaeef6ea437 --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/SignatureTests.cs @@ -0,0 +1,53 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Collections.Generic; +using System.Linq; +using System.Text; + +using Internal.IL; +using Internal.TypeSystem; +using Internal.TypeSystem.Ecma; + +using Xunit; + +namespace TypeSystemTests +{ + public class SignatureTests + { + private TestTypeSystemContext _context; + private ModuleDesc _testModule; + + public SignatureTests() + { + _context = new TestTypeSystemContext(TargetArchitecture.X64); + var systemModule = _context.CreateModuleForSimpleName("CoreTestAssembly"); + _context.SetSystemModule(systemModule); + + _testModule = _context.GetModuleForSimpleName("ILTestAssembly"); + } + + [Fact] + public void TestSignatureMatches() + { + MetadataType atomType = _testModule.GetType("", "Atom"); + MetadataType aType = _testModule.GetType("", "A`1"); + MetadataType aOfAtomType = aType.MakeInstantiatedType(new Instantiation(atomType)); + + + MetadataType baseClassType = _testModule.GetType("", "BaseClass`2"); + MethodDesc baseClassMethod = baseClassType.GetMethods().Single(m => string.Equals(m.Name, "Method")); + MethodSignature baseClassMethodSignature = baseClassMethod.Signature; + MethodSignatureBuilder matchingSignatureBuilder = new MethodSignatureBuilder(baseClassMethodSignature); + matchingSignatureBuilder[0] = aOfAtomType; + matchingSignatureBuilder[1] = atomType; + MethodSignature matchingSignature = matchingSignatureBuilder.ToSignature(); + + MetadataType derivedClassType = _testModule.GetType("", "DerivedClass"); + IEnumerable derivedClassMethods = derivedClassType.GetMethods().Where(m => string.Equals(m.Name, "Method")); + IEnumerable matches = derivedClassMethods.Select(m => matchingSignature.Equals(m.Signature)); + int matchCount = matches.Select(b => b ? 1 : 0).Sum(); + Assert.Equal(1, matchCount); + } + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/StaticFieldLayoutTests.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/StaticFieldLayoutTests.cs new file mode 100644 index 000000000000..e0f5eef5e7a1 --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/StaticFieldLayoutTests.cs @@ -0,0 +1,306 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Linq; + +using Internal.TypeSystem; +using Internal.TypeSystem.Ecma; + +using Xunit; + +namespace TypeSystemTests +{ + public class StaticFieldLayoutTests + { + TestTypeSystemContext _context; + ModuleDesc _testModule; + + public StaticFieldLayoutTests() + { + _context = new TestTypeSystemContext(TargetArchitecture.X64); + var systemModule = _context.CreateModuleForSimpleName("CoreTestAssembly"); + _context.SetSystemModule(systemModule); + + _testModule = systemModule; + } + + [Fact] + public void TestNoPointers() + { + MetadataType t = _testModule.GetType("StaticFieldLayout", "NoPointers"); + + foreach (var field in t.GetFields()) + { + if (!field.IsStatic) + continue; + + switch (field.Name) + { + case "int1": + Assert.Equal(0, field.Offset.AsInt); + break; + case "byte1": + Assert.Equal(4, field.Offset.AsInt); + break; + case "char1": + Assert.Equal(6, field.Offset.AsInt); + break; + default: + throw new Exception(field.Name); + } + } + } + + [Fact] + public void TestStillNoPointers() + { + // + // Test that static offsets ignore instance fields preceeding them + // + + MetadataType t = _testModule.GetType("StaticFieldLayout", "StillNoPointers"); + + foreach (var field in t.GetFields()) + { + if (!field.IsStatic) + continue; + + switch (field.Name) + { + case "bool1": + Assert.Equal(0, field.Offset.AsInt); + break; + default: + throw new Exception(field.Name); + } + } + } + + [Fact] + public void TestClassNoPointers() + { + // + // Ensure classes behave the same as structs when containing statics + // + + MetadataType t = _testModule.GetType("StaticFieldLayout", "ClassNoPointers"); + + foreach (var field in t.GetFields()) + { + if (!field.IsStatic) + continue; + + switch (field.Name) + { + case "int1": + Assert.Equal(0, field.Offset.AsInt); + break; + case "byte1": + Assert.Equal(4, field.Offset.AsInt); + break; + case "char1": + Assert.Equal(6, field.Offset.AsInt); + break; + default: + throw new Exception(field.Name); + } + } + } + + [Fact] + public void TestHasPointers() + { + // + // Test a struct containing static types with pointers + // + + MetadataType t = _testModule.GetType("StaticFieldLayout", "HasPointers"); + + foreach (var field in t.GetFields()) + { + if (!field.IsStatic) + continue; + + switch (field.Name) + { + case "string1": + Assert.Equal(8, field.Offset.AsInt); + break; + case "class1": + Assert.Equal(16, field.Offset.AsInt); + break; + default: + throw new Exception(field.Name); + } + } + } + + [Fact] + public void TestMixPointersAndNonPointers() + { + // + // Test that static fields with GC pointers get separate offsets from non-GC fields + // + + MetadataType t = _testModule.GetType("StaticFieldLayout", "MixPointersAndNonPointers"); + + foreach (var field in t.GetFields()) + { + if (!field.IsStatic) + continue; + + switch (field.Name) + { + case "string1": + Assert.Equal(8, field.Offset.AsInt); + break; + case "int1": + Assert.Equal(0, field.Offset.AsInt); + break; + case "class1": + Assert.Equal(16, field.Offset.AsInt); + break; + case "int2": + Assert.Equal(4, field.Offset.AsInt); + break; + case "string2": + Assert.Equal(24, field.Offset.AsInt); + break; + default: + throw new Exception(field.Name); + } + } + } + + [Fact] + public void TestEnsureInheritanceResetsStaticOffsets() + { + // + // Test that when inheriting a class with static fields, the derived slice's static fields + // are again offset from 0 + // + + MetadataType t = _testModule.GetType("StaticFieldLayout", "EnsureInheritanceResetsStaticOffsets"); + + foreach (var field in t.GetFields()) + { + if (!field.IsStatic) + continue; + + switch (field.Name) + { + case "int3": + Assert.Equal(0, field.Offset.AsInt); + break; + case "string3": + Assert.Equal(8, field.Offset.AsInt); + break; + default: + throw new Exception(field.Name); + } + } + } + + [Fact] + public void TestLiteralFieldsDontAffectLayout() + { + // + // Test that literal fields are not laid out. + // + + MetadataType t = _testModule.GetType("StaticFieldLayout", "LiteralFieldsDontAffectLayout"); + + Assert.Equal(4, t.GetFields().Count()); + + foreach (var field in t.GetFields()) + { + if (!field.IsStatic) + continue; + + switch (field.Name) + { + case "IntConstant": + case "StringConstant": + Assert.True(field.IsStatic); + Assert.True(field.IsLiteral); + break; + case "Int1": + Assert.Equal(0, field.Offset.AsInt); + break; + case "String1": + Assert.Equal(8, field.Offset.AsInt); + break; + default: + throw new Exception(field.Name); + } + } + } + + [Fact] + public void TestStaticSelfRef() + { + // + // Test that we can load a struct which has a static field referencing itself without + // going into an infinite loop + // + + MetadataType t = _testModule.GetType("StaticFieldLayout", "StaticSelfRef"); + + foreach (var field in t.GetFields()) + { + if (!field.IsStatic) + continue; + + switch (field.Name) + { + case "selfRef1": + Assert.Equal(0, field.Offset.AsInt); + break; + default: + throw new Exception(field.Name); + } + } + } + + [Fact] + public void TestRvaStatics() + { + // + // Test that an RVA mapped field has the right value for the offset. + // + + var ilModule = _context.GetModuleForSimpleName("ILTestAssembly"); + var t = ilModule.GetType("StaticFieldLayout", "RvaStatics"); + var field = t.GetField("StaticInitedInt"); + + Assert.True(field.HasRva); + + byte[] rvaData = ((EcmaField)field).GetFieldRvaData(); + + Assert.Equal(4, rvaData.Length); + + int value = rvaData[0] | + rvaData[1] << 8 | + rvaData[2] << 16 | + rvaData[3] << 24; + + Assert.Equal(0x78563412, value); + } + + [Fact] + public void TestFunctionPointer() + { + // + // Test layout with a function pointer typed-field. + // + + var ilModule = _context.GetModuleForSimpleName("ILTestAssembly"); + var t = ilModule.GetType("StaticFieldLayout", "FunctionPointerType"); + var field = t.GetField("StaticMethodField"); + + Assert.Equal(8, field.Offset.AsInt); + Assert.False(field.HasGCStaticBase); + } + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/SyntheticVirtualOverrideTests.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/SyntheticVirtualOverrideTests.cs new file mode 100644 index 000000000000..11e074168489 --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/SyntheticVirtualOverrideTests.cs @@ -0,0 +1,238 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Collections.Generic; +using System.Linq; + +using Internal.TypeSystem; + +using Xunit; + + +namespace TypeSystemTests +{ + public class SyntheticVirtualOverrideTests + { + TestTypeSystemContext _context; + ModuleDesc _testModule; + + public SyntheticVirtualOverrideTests() + { + _context = new SyntheticVirtualOverrideTypeSystemContext(); + var systemModule = _context.CreateModuleForSimpleName("CoreTestAssembly"); + _context.SetSystemModule(systemModule); + + _testModule = systemModule; + } + + [Fact] + public void TestStructEqualsAndGetHashCode() + { + // + // Tests that a struct with no Equals and GetHashCode overrides + // receive a synthetic implementation of these courtesy of the + // EqualsAndGetHashCodeProvidingAlgorithm. + // + + MetadataType t = _testModule.GetType("SyntheticVirtualOverride", "StructWithNoEqualsAndGetHashCode"); + + Assert.DoesNotContain(t.GetMethods(), m => m.Name == "Equals"); + Assert.DoesNotContain(t.GetMethods(), m => m.Name == "GetHashCode"); + + List introducedVirtualMethods = new List(t.GetAllMethods().Where(m => m.IsVirtual)); + Assert.Equal(2, introducedVirtualMethods.Count); + Assert.Contains(introducedVirtualMethods, m => m.Name == "Equals"); + Assert.Contains(introducedVirtualMethods, m => m.Name == "GetHashCode"); + Assert.All(introducedVirtualMethods, m => { Assert.Same(t, m.OwningType); }); + + List virtualSlots = new List(t.EnumAllVirtualSlots()); + Assert.All(virtualSlots, s => { Assert.True(s.OwningType.IsObject); }); + Assert.Equal(4, virtualSlots.Count); + + List vtable = virtualSlots.Select(s => t.FindVirtualFunctionTargetMethodOnObjectType(s)).ToList(); + + Assert.Contains(vtable, m => m.Name == "Equals" && m.OwningType == t); + Assert.Contains(vtable, m => m.Name == "GetHashCode" && m.OwningType == t); + Assert.Contains(vtable, m => m.Name == "Finalize" && m.OwningType.IsObject); + Assert.Contains(vtable, m => m.Name == "ToString" && m.OwningType.IsObject); + } + + [Fact] + public void TestUnoverridenSyntheticEqualsAndGetHashCode() + { + // + // Tests that the synthetic implementation on a base class is propagated to + // derived classes. + // + + MetadataType baseType = _testModule.GetType("SyntheticVirtualOverride", "ClassWithInjectedEqualsAndGetHashCode"); + MetadataType t = _testModule.GetType("SyntheticVirtualOverride", "ClassNotOverridingEqualsAndGetHashCode"); + + List virtualSlots = new List(t.EnumAllVirtualSlots()); + Assert.All(virtualSlots, s => { Assert.True(s.OwningType.IsObject); }); + Assert.Equal(4, virtualSlots.Count); + + List vtable = virtualSlots.Select(s => t.FindVirtualFunctionTargetMethodOnObjectType(s)).ToList(); + + Assert.Contains(vtable, m => m.Name == "Equals" && m.OwningType == baseType); + Assert.Contains(vtable, m => m.Name == "GetHashCode" && m.OwningType == baseType); + Assert.Contains(vtable, m => m.Name == "Finalize" && m.OwningType.IsObject); + Assert.Contains(vtable, m => m.Name == "ToString" && m.OwningType.IsObject); + } + + [Fact] + public void TestOverridenSyntheticEqualsAndGetHashCode() + { + // + // Tests that the synthetic implementation on a base class can be overriden by + // derived classes. + // + + MetadataType baseType = _testModule.GetType("SyntheticVirtualOverride", "ClassWithInjectedEqualsAndGetHashCode"); + MetadataType t = _testModule.GetType("SyntheticVirtualOverride", "ClassOverridingEqualsAndGetHashCode"); + + List virtualSlots = new List(t.EnumAllVirtualSlots()); + Assert.All(virtualSlots, s => { Assert.True(s.OwningType.IsObject); }); + Assert.Equal(4, virtualSlots.Count); + + List vtable = virtualSlots.Select(s => t.FindVirtualFunctionTargetMethodOnObjectType(s)).ToList(); + + Assert.Contains(vtable, m => m.Name == "Equals" && m.OwningType == t); + Assert.Contains(vtable, m => m.Name == "GetHashCode" && m.OwningType == t); + Assert.Contains(vtable, m => m.Name == "Finalize" && m.OwningType.IsObject); + Assert.Contains(vtable, m => m.Name == "ToString" && m.OwningType.IsObject); + } + + private class SyntheticVirtualOverrideTypeSystemContext : TestTypeSystemContext + { + private Dictionary _getHashCodeMethods = new Dictionary(); + private Dictionary _equalsMethods = new Dictionary(); + + public SyntheticVirtualOverrideTypeSystemContext() + : base(TargetArchitecture.Unknown) + { + } + + private MethodDesc GetGetHashCodeMethod(TypeDesc type) + { + MethodDesc result; + if (!_getHashCodeMethods.TryGetValue(type, out result)) + { + result = new SyntheticMethod(type, "GetHashCode", + new MethodSignature(0, 0, type.Context.GetWellKnownType(WellKnownType.Int32), Array.Empty())); + _getHashCodeMethods.Add(type, result); + } + return result; + } + + private MethodDesc GetEqualsMethod(TypeDesc type) + { + MethodDesc result; + if (!_equalsMethods.TryGetValue(type, out result)) + { + result = new SyntheticMethod(type, "Equals", + new MethodSignature(0, 0, type.Context.GetWellKnownType(WellKnownType.Boolean), + new[] { type.Context.GetWellKnownType(WellKnownType.Object) })); + _equalsMethods.Add(type, result); + } + return result; + } + + protected override IEnumerable GetAllMethods(TypeDesc type) + { + MetadataType mdType = type as MetadataType; + + if (mdType.Name == "StructWithNoEqualsAndGetHashCode" + || mdType.Name == "ClassWithInjectedEqualsAndGetHashCode") + { + yield return GetEqualsMethod(type); + yield return GetGetHashCodeMethod(type); + } + + foreach (var m in mdType.GetMethods()) + yield return m; + } + } + + private class SyntheticMethod : MethodDesc + { + private TypeDesc _owningType; + private MethodSignature _signature; + private string _name; + + public SyntheticMethod(TypeDesc owningType, string name, MethodSignature signature) + { + _owningType = owningType; + _signature = signature; + _name = name; + } + + protected override int ClassCode + { + get + { + throw new NotImplementedException(); + } + } + + protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer) + { + throw new NotImplementedException(); + } + + public override bool IsVirtual + { + get + { + return true; + } + } + + public override TypeSystemContext Context + { + get + { + return _owningType.Context; + } + } + + public override string Name + { + get + { + return _name; + } + } + + public override string DiagnosticName + { + get + { + return _name; + } + } + + public override TypeDesc OwningType + { + get + { + return _owningType; + } + } + + public override MethodSignature Signature + { + get + { + return _signature; + } + } + + public override bool HasCustomAttribute(string attributeNamespace, string attributeName) + { + return false; + } + } + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/TestMetadataFieldLayoutAlgorithm.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/TestMetadataFieldLayoutAlgorithm.cs new file mode 100644 index 000000000000..ae7f20c1b07c --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/TestMetadataFieldLayoutAlgorithm.cs @@ -0,0 +1,34 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Collections.Generic; + +using Internal.TypeSystem; + +namespace TypeSystemTests +{ + class TestMetadataFieldLayoutAlgorithm : MetadataFieldLayoutAlgorithm + { + protected override void PrepareRuntimeSpecificStaticFieldLayout(TypeSystemContext context, ref ComputedStaticFieldLayout layout) + { + // GC statics start with a pointer to the "EEType" that signals the size and GCDesc to the GC + layout.GcStatics.Size = context.Target.LayoutPointerSize; + layout.ThreadGcStatics.Size = context.Target.LayoutPointerSize; + } + + protected override void FinalizeRuntimeSpecificStaticFieldLayout(TypeSystemContext context, ref ComputedStaticFieldLayout layout) + { + // If the size of GCStatics is equal to the size set in PrepareRuntimeSpecificStaticFieldLayout, we + // don't have any GC statics + if (layout.GcStatics.Size == context.Target.LayoutPointerSize) + { + layout.GcStatics.Size = LayoutInt.Zero; + } + if (layout.ThreadGcStatics.Size == context.Target.LayoutPointerSize) + { + layout.ThreadGcStatics.Size = LayoutInt.Zero; + } + } + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/TestTypeSystemContext.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/TestTypeSystemContext.cs new file mode 100644 index 000000000000..028fa88df3e8 --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/TestTypeSystemContext.cs @@ -0,0 +1,129 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Collections.Generic; +using System.Diagnostics; + +using Internal.TypeSystem; +using System.Reflection; +using System.Reflection.PortableExecutable; +using System.IO; + +namespace TypeSystemTests +{ + public enum CanonicalizationMode + { + Standard, + RuntimeDetermined, + } + + class TestTypeSystemContext : MetadataTypeSystemContext + { + Dictionary _modules = new Dictionary(StringComparer.OrdinalIgnoreCase); + + MetadataFieldLayoutAlgorithm _metadataFieldLayout = new TestMetadataFieldLayoutAlgorithm(); + MetadataRuntimeInterfacesAlgorithm _metadataRuntimeInterfacesAlgorithm = new MetadataRuntimeInterfacesAlgorithm(); + ArrayOfTRuntimeInterfacesAlgorithm _arrayOfTRuntimeInterfacesAlgorithm; + VirtualMethodAlgorithm _virtualMethodAlgorithm = new MetadataVirtualMethodAlgorithm(); + + public CanonicalizationMode CanonMode { get; set; } = CanonicalizationMode.RuntimeDetermined; + + public TestTypeSystemContext(TargetArchitecture arch) + : base(new TargetDetails(arch, TargetOS.Unknown, TargetAbi.Unknown)) + { + } + + public ModuleDesc GetModuleForSimpleName(string simpleName) + { + ModuleDesc existingModule; + if (_modules.TryGetValue(simpleName, out existingModule)) + return existingModule; + + return CreateModuleForSimpleName(simpleName); + } + + public ModuleDesc CreateModuleForSimpleName(string simpleName) + { + string bindingDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + string filePath = Path.Combine(bindingDirectory, simpleName + ".dll"); + ModuleDesc module = Internal.TypeSystem.Ecma.EcmaModule.Create(this, new PEReader(File.OpenRead(filePath)), containingAssembly: null); + _modules.Add(simpleName, module); + return module; + } + + public override ModuleDesc ResolveAssembly(System.Reflection.AssemblyName name, bool throwIfNotFound) + { + return GetModuleForSimpleName(name.Name); + } + + public override FieldLayoutAlgorithm GetLayoutAlgorithmForType(DefType type) + { + if (type == UniversalCanonType) + return UniversalCanonLayoutAlgorithm.Instance; + + return _metadataFieldLayout; + } + + protected override RuntimeInterfacesAlgorithm GetRuntimeInterfacesAlgorithmForNonPointerArrayType(ArrayType type) + { + if (_arrayOfTRuntimeInterfacesAlgorithm == null) + { + _arrayOfTRuntimeInterfacesAlgorithm = new ArrayOfTRuntimeInterfacesAlgorithm(SystemModule.GetType("System", "Array`1")); + } + return _arrayOfTRuntimeInterfacesAlgorithm; + } + + protected override RuntimeInterfacesAlgorithm GetRuntimeInterfacesAlgorithmForDefType(DefType type) + { + return _metadataRuntimeInterfacesAlgorithm; + } + + public override VirtualMethodAlgorithm GetVirtualMethodAlgorithmForType(TypeDesc type) + { + return _virtualMethodAlgorithm; + } + + protected override Instantiation ConvertInstantiationToCanonForm(Instantiation instantiation, CanonicalFormKind kind, out bool changed) + { + if (CanonMode == CanonicalizationMode.Standard) + return StandardCanonicalizationAlgorithm.ConvertInstantiationToCanonForm(instantiation, kind, out changed); + else + return RuntimeDeterminedCanonicalizationAlgorithm.ConvertInstantiationToCanonForm(instantiation, kind, out changed); + } + + protected override TypeDesc ConvertToCanon(TypeDesc typeToConvert, CanonicalFormKind kind) + { + if (CanonMode == CanonicalizationMode.Standard) + return StandardCanonicalizationAlgorithm.ConvertToCanon(typeToConvert, kind); + else + return RuntimeDeterminedCanonicalizationAlgorithm.ConvertToCanon(typeToConvert, kind); + } + + protected override TypeDesc ConvertToCanon(TypeDesc typeToConvert, ref CanonicalFormKind kind) + { + if (CanonMode == CanonicalizationMode.Standard) + return StandardCanonicalizationAlgorithm.ConvertToCanon(typeToConvert, kind); + else + return RuntimeDeterminedCanonicalizationAlgorithm.ConvertToCanon(typeToConvert, ref kind); + } + + protected override bool ComputeHasGCStaticBase(FieldDesc field) + { + Debug.Assert(field.IsStatic); + + if (field.IsThreadStatic) + return true; + + TypeDesc fieldType = field.FieldType; + if (fieldType.IsValueType) + return ((DefType)fieldType).ContainsGCPointers; + else + return fieldType.IsGCPointer; + + } + + public override bool SupportsUniversalCanon => true; + public override bool SupportsCanon => true; + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/TypeNameParsingTests.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/TypeNameParsingTests.cs new file mode 100644 index 000000000000..d7a08bf583d5 --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/TypeNameParsingTests.cs @@ -0,0 +1,298 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Collections.Generic; + +using Internal.TypeSystem; + +using Xunit; + +namespace TypeSystemTests +{ + public class TypeNameParsingTests + { + TestTypeSystemContext _context; + ModuleDesc _testModule; + + string _coreAssemblyQualifier; + + MetadataType _simpleType; + MetadataType _nestedType; + MetadataType _nestedTwiceType; + + MetadataType _genericType; + MetadataType _nestedNongenericType; + MetadataType _nestedGenericType; + + MetadataType _veryGenericType; + + MetadataType _structType; + + public TypeNameParsingTests() + { + _context = new TestTypeSystemContext(TargetArchitecture.X64); + + // TODO-NICE: split test types into a separate, non-core, module + _testModule = _context.CreateModuleForSimpleName("CoreTestAssembly"); + _context.SetSystemModule(_testModule); + + _simpleType = _testModule.GetType("TypeNameParsing", "Simple"); + _nestedType = _simpleType.GetNestedType("Nested"); + _nestedTwiceType = _nestedType.GetNestedType("NestedTwice"); + + _genericType = _testModule.GetType("TypeNameParsing", "Generic`1"); + _nestedGenericType = _genericType.GetNestedType("NestedGeneric`1"); + _nestedNongenericType = _genericType.GetNestedType("NestedNongeneric"); + + _veryGenericType = _testModule.GetType("TypeNameParsing", "VeryGeneric`3"); + + _structType = _testModule.GetType("TypeNameParsing", "Struct"); + + _coreAssemblyQualifier = ((IAssemblyDesc)_testModule).GetName().FullName; + } + + [Fact] + public void TestSimpleNames() + { + { + TypeDesc result = _testModule.GetTypeByCustomAttributeTypeName("TypeNameParsing.Simple"); + Assert.Equal(_simpleType, result); + } + + { + TypeDesc result = _testModule.GetTypeByCustomAttributeTypeName("TypeNameParsing.Simple+Nested"); + Assert.Equal(_nestedType, result); + } + + { + TypeDesc result = _testModule.GetTypeByCustomAttributeTypeName("TypeNameParsing.Simple+Nested+NestedTwice"); + Assert.Equal(_nestedTwiceType, result); + } + + { + TypeDesc result = _testModule.GetTypeByCustomAttributeTypeName("System.Int32, " + _coreAssemblyQualifier); + Assert.Equal(_context.GetWellKnownType(WellKnownType.Int32), result); + } + + { + TypeDesc result = _testModule.GetTypeByCustomAttributeTypeName("TypeNameParsing.VeryGeneric`3"); + Assert.Equal(_veryGenericType, result); + } + } + + [Fact] + public void TestArrayTypes() + { + { + TypeDesc expected = _simpleType.MakeArrayType(); + TypeDesc result = _testModule.GetTypeByCustomAttributeTypeName("TypeNameParsing.Simple[]"); + Assert.Equal(expected, result); + } + + { + TypeDesc expected = _simpleType.MakeArrayType().MakeArrayType().MakeArrayType(); + TypeDesc result = _testModule.GetTypeByCustomAttributeTypeName("TypeNameParsing.Simple[][][]"); + Assert.Equal(expected, result); + } + + { + TypeDesc expected = _simpleType.MakeArrayType(2).MakeArrayType(3); + TypeDesc result = _testModule.GetTypeByCustomAttributeTypeName("TypeNameParsing.Simple[,][,,]"); + Assert.Equal(expected, result); + } + + { + TypeDesc expected = _context.GetWellKnownType(WellKnownType.Int32).MakeArrayType(); + TypeDesc result = _testModule.GetTypeByCustomAttributeTypeName("System.Int32[], " + _coreAssemblyQualifier); + Assert.Equal(expected, result); + } + } + + [Fact] + public void TestPointerTypes() + { + { + TypeDesc expected = _structType.MakePointerType(); + TypeDesc result = _testModule.GetTypeByCustomAttributeTypeName("TypeNameParsing.Struct*"); + Assert.Equal(expected, result); + } + + { + TypeDesc expected = _structType.MakePointerType().MakePointerType(); + TypeDesc result = _testModule.GetTypeByCustomAttributeTypeName("TypeNameParsing.Struct**"); + Assert.Equal(expected, result); + } + + { + TypeDesc expected = _context.GetWellKnownType(WellKnownType.Int32).MakePointerType(); + TypeDesc result = _testModule.GetTypeByCustomAttributeTypeName("System.Int32*, " + _coreAssemblyQualifier); + Assert.Equal(expected, result); + } + } + + [Fact] + public void TestInstantiatedTypes() + { + var nullableType = (MetadataType)_context.GetWellKnownType(WellKnownType.Nullable); + + { + TypeDesc expected = _genericType.MakeInstantiatedType(_simpleType); + TypeDesc result = _testModule.GetTypeByCustomAttributeTypeName("TypeNameParsing.Generic`1[TypeNameParsing.Simple]"); + Assert.Equal(expected, result); + } + + { + TypeDesc expected = _veryGenericType.MakeInstantiatedType( + _simpleType, + _genericType.MakeInstantiatedType(_simpleType), + _structType + ); + TypeDesc result = _testModule.GetTypeByCustomAttributeTypeName("TypeNameParsing.VeryGeneric`3[TypeNameParsing.Simple,TypeNameParsing.Generic`1[TypeNameParsing.Simple],TypeNameParsing.Struct]"); + Assert.Equal(expected, result); + } + + { + TypeDesc expected = _genericType.MakeInstantiatedType(_context.GetWellKnownType(WellKnownType.Object)); + TypeDesc result = _testModule.GetTypeByCustomAttributeTypeName("TypeNameParsing.Generic`1[[System.Object, " + _coreAssemblyQualifier + "]]"); + Assert.Equal(expected, result); + } + + { + TypeDesc expected = _veryGenericType.MakeInstantiatedType( + _context.GetWellKnownType(WellKnownType.Object), + _simpleType, + _context.GetWellKnownType(WellKnownType.Int32) + ); + TypeDesc result = _testModule.GetTypeByCustomAttributeTypeName(String.Format( + "TypeNameParsing.VeryGeneric`3[[System.Object, {0}],TypeNameParsing.Simple,[System.Int32, {0}]]", _coreAssemblyQualifier)); + Assert.Equal(expected, result); + } + + { + TypeDesc expected = nullableType.MakeInstantiatedType(_structType); + TypeDesc result = _testModule.GetTypeByCustomAttributeTypeName(String.Format( + "System.Nullable`1[TypeNameParsing.Struct], {0}", _coreAssemblyQualifier)); + Assert.Equal(expected, result); + } + + { + TypeDesc expected = nullableType.MakeInstantiatedType(_context.GetWellKnownType(WellKnownType.Int32)); + TypeDesc result = _testModule.GetTypeByCustomAttributeTypeName(String.Format( + "System.Nullable`1[[System.Int32, {0}]], {0}", _coreAssemblyQualifier)); + Assert.Equal(expected, result); + } + } + + [Fact] + public void TestMixed() + { + var nullableType = (MetadataType)_context.GetWellKnownType(WellKnownType.Nullable); + + { + TypeDesc expected = _genericType.MakeInstantiatedType(_structType.MakePointerType().MakeArrayType()); + TypeDesc result = _testModule.GetTypeByCustomAttributeTypeName("TypeNameParsing.Generic`1[TypeNameParsing.Struct*[]]"); + Assert.Equal(expected, result); + } + + { + TypeDesc expected = _genericType.MakeInstantiatedType(_structType.MakePointerType().MakePointerType().MakeArrayType().MakeArrayType(2)); + TypeDesc result = _testModule.GetTypeByCustomAttributeTypeName("TypeNameParsing.Generic`1[TypeNameParsing.Struct**[][,]]"); + Assert.Equal(expected, result); + } + + { + TypeDesc expected = _nestedNongenericType.MakeInstantiatedType( + nullableType.MakeInstantiatedType(_structType) + ); + TypeDesc result = _testModule.GetTypeByCustomAttributeTypeName(String.Format( + "TypeNameParsing.Generic`1+NestedNongeneric[[System.Nullable`1[TypeNameParsing.Struct], {0}]]", _coreAssemblyQualifier)); + Assert.Equal(expected, result); + } + + { + TypeDesc expected = _nestedGenericType.MakeInstantiatedType( + nullableType.MakeInstantiatedType(_context.GetWellKnownType(WellKnownType.Int32)), + _nestedType.MakeArrayType() + ); + TypeDesc result = _testModule.GetTypeByCustomAttributeTypeName(String.Format( + "TypeNameParsing.Generic`1+NestedGeneric`1[[System.Nullable`1[[System.Int32, {0}]], {0}],TypeNameParsing.Simple+Nested[]]", _coreAssemblyQualifier)); + Assert.Equal(expected, result); + } + } + + [Fact] + public void TestFailureWhenTypeIsMissing() + { + // Test throwing behavior + Assert.Throws(() => _testModule.GetTypeByCustomAttributeTypeName("TypeNameParsing.SimpleButNotThere")); + Assert.Throws(() => _testModule.GetTypeByCustomAttributeTypeName("TypeNameParsing.SimpleButNotThere+NonNamespaceQualifiedType")); + Assert.Throws(() => _testModule.GetTypeByCustomAttributeTypeName("TypeNameParsing.Simple+NestedNotThere")); + Assert.Throws(() => _testModule.GetTypeByCustomAttributeTypeName("TypeNameParsing.Simple+Nested+NestedTwiceNotThere")); + Assert.Throws(() => _testModule.GetTypeByCustomAttributeTypeName("TypeNameParsing.Generic`1[TypeNameParsing.SimpleButNotThere]")); + + // Test returning null behavior + Assert.Null(_testModule.GetTypeByCustomAttributeTypeName("TypeNameParsing.SimpleButNotThere", throwIfNotFound: false)); + Assert.Null(_testModule.GetTypeByCustomAttributeTypeName("TypeNameParsing.SimpleButNotThere+NonNamespaceQualifiedType", throwIfNotFound: false)); + Assert.Null(_testModule.GetTypeByCustomAttributeTypeName("TypeNameParsing.Simple+NestedNotThere", throwIfNotFound: false)); + Assert.Null(_testModule.GetTypeByCustomAttributeTypeName("TypeNameParsing.Simple+NestedNotThere+NonNamespaceQualifiedType", throwIfNotFound: false)); + Assert.Null(_testModule.GetTypeByCustomAttributeTypeName("TypeNameParsing.Simple+Nested+NestedTwiceNotThere", throwIfNotFound: false)); + Assert.Null(_testModule.GetTypeByCustomAttributeTypeName("TypeNameParsing.Simple+Nested+NonNamespaceQualifiedType", throwIfNotFound: false)); + Assert.Null(_testModule.GetTypeByCustomAttributeTypeName("TypeNameParsing.Generic`1[TypeNameParsing.SimpleButNotThere]", throwIfNotFound: false)); + } + + public IEnumerable GetTypesForRoundtripTest() + { + yield return _simpleType; + yield return _nestedType; + yield return _nestedTwiceType; + yield return _context.GetWellKnownType(WellKnownType.Int32); + yield return _veryGenericType; + yield return _simpleType.MakeArrayType(); + yield return _simpleType.MakeArrayType().MakeArrayType(); + yield return _simpleType.MakeArrayType(2).MakeArrayType(3); + yield return _context.GetWellKnownType(WellKnownType.Int32).MakeArrayType(); + yield return _structType.MakePointerType(); + yield return _context.GetWellKnownType(WellKnownType.Int32).MakePointerType().MakePointerType(); + yield return _genericType.MakeInstantiatedType(_simpleType); + yield return _veryGenericType.MakeInstantiatedType( + _simpleType, + _genericType.MakeInstantiatedType(_simpleType), + _structType + ); + yield return _genericType.MakeInstantiatedType(_context.GetWellKnownType(WellKnownType.Object)); + yield return _veryGenericType.MakeInstantiatedType( + _context.GetWellKnownType(WellKnownType.Object), + _simpleType, + _context.GetWellKnownType(WellKnownType.Int32) + ); + yield return ((MetadataType)_context.GetWellKnownType(WellKnownType.Nullable)).MakeInstantiatedType(_structType); + yield return _genericType.MakeInstantiatedType(_structType.MakePointerType().MakeArrayType()); + yield return _nestedGenericType.MakeInstantiatedType( + ((MetadataType)_context.GetWellKnownType(WellKnownType.Nullable)).MakeInstantiatedType(_context.GetWellKnownType(WellKnownType.Int32)), + _nestedType.MakeArrayType() + ); + } + + [Fact] + public void TestRoundtripping() + { + foreach (TypeDesc type in GetTypesForRoundtripTest()) + { + { + var fmt = new CustomAttributeTypeNameFormatter((IAssemblyDesc)_testModule); + string formatted = fmt.FormatName(type, true); + TypeDesc roundTripped = _testModule.GetTypeByCustomAttributeTypeName(formatted); + Assert.Equal(type, roundTripped); + } + + { + var fmt = new CustomAttributeTypeNameFormatter(); + string formatted = fmt.FormatName(type, true); + TypeDesc roundTripped = _testModule.GetTypeByCustomAttributeTypeName(formatted); + Assert.Equal(type, roundTripped); + } + } + } + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/UniversalGenericFieldLayoutTests.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/UniversalGenericFieldLayoutTests.cs new file mode 100644 index 000000000000..e1ce09f294ad --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/UniversalGenericFieldLayoutTests.cs @@ -0,0 +1,512 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Collections.Generic; +using System.Linq; +using Internal.TypeSystem; + +using Xunit; + +namespace TypeSystemTests +{ + public class UniversalGenericFieldLayoutTests + { + TestTypeSystemContext _contextX86; + ModuleDesc _testModuleX86; + TestTypeSystemContext _contextX64; + ModuleDesc _testModuleX64; + TestTypeSystemContext _contextARM; + ModuleDesc _testModuleARM; + + public UniversalGenericFieldLayoutTests() + { + // Architecture specific tests may use these contexts + _contextX64 = new TestTypeSystemContext(TargetArchitecture.X64); + var systemModuleX64 = _contextX64.CreateModuleForSimpleName("CoreTestAssembly"); + _contextX64.SetSystemModule(systemModuleX64); + + _testModuleX64 = systemModuleX64; + + _contextARM = new TestTypeSystemContext(TargetArchitecture.ARM); + var systemModuleARM = _contextARM.CreateModuleForSimpleName("CoreTestAssembly"); + _contextARM.SetSystemModule(systemModuleARM); + + _testModuleARM = systemModuleARM; + + _contextX86 = new TestTypeSystemContext(TargetArchitecture.X86); + var systemModuleX86 = _contextX86.CreateModuleForSimpleName("CoreTestAssembly"); + _contextX86.SetSystemModule(systemModuleX86); + + _testModuleX86 = systemModuleX86; + } + + [Fact] + public void LayoutIntTests() + { + Assert.Throws(() => { return new LayoutInt(int.MinValue); }); + Assert.Throws(() => { return new LayoutInt(-1); }); + + Assert.Equal(LayoutInt.Zero, new LayoutInt(0)); + Assert.Equal(LayoutInt.One, new LayoutInt(1)); + + Assert.True(LayoutInt.Zero == new LayoutInt(0)); + Assert.True(LayoutInt.One == new LayoutInt(1)); + Assert.False(LayoutInt.Zero == new LayoutInt(1)); + Assert.False(LayoutInt.One == new LayoutInt(0)); +#pragma warning disable 1718 // Allow comparison to same variable + Assert.True(LayoutInt.Indeterminate == LayoutInt.Indeterminate); +#pragma warning restore 1718 + + Assert.False(LayoutInt.Zero != new LayoutInt(0)); + Assert.False(LayoutInt.One != new LayoutInt(1)); + Assert.True(LayoutInt.Zero != new LayoutInt(1)); + Assert.True(LayoutInt.One != new LayoutInt(0)); +#pragma warning disable 1718 // Allow comparison to same variable + Assert.False(LayoutInt.Indeterminate != LayoutInt.Indeterminate); +#pragma warning restore 1718 + + Assert.Equal(0, new LayoutInt(0).AsInt); + Assert.Equal(1, new LayoutInt(1).AsInt); + Assert.Equal(Int32.MaxValue, new LayoutInt(Int32.MaxValue).AsInt); + Assert.Throws(() => { return LayoutInt.Indeterminate.AsInt; }); + + Assert.Equal(LayoutInt.Indeterminate, LayoutInt.Indeterminate + LayoutInt.Indeterminate); + Assert.Equal(LayoutInt.Indeterminate, LayoutInt.One + LayoutInt.Indeterminate); + Assert.Equal(LayoutInt.Indeterminate, LayoutInt.Indeterminate + LayoutInt.One); + Assert.Equal(new LayoutInt(2), LayoutInt.One + LayoutInt.One); + Assert.Throws(() => { return new LayoutInt(int.MaxValue) + LayoutInt.One; }); + Assert.Throws(() => { return new LayoutInt(int.MaxValue) + LayoutInt.One; }); + + Assert.Equal(LayoutInt.One, LayoutInt.Max(LayoutInt.One, LayoutInt.Zero)); + Assert.Equal(LayoutInt.One, LayoutInt.Max(LayoutInt.Zero, LayoutInt.One)); + Assert.Equal(LayoutInt.Indeterminate, LayoutInt.Max(LayoutInt.Indeterminate, LayoutInt.Zero)); + Assert.Equal(LayoutInt.Indeterminate, LayoutInt.Max(LayoutInt.Zero, LayoutInt.Indeterminate)); + Assert.Equal(LayoutInt.Indeterminate, LayoutInt.Max(LayoutInt.Indeterminate, LayoutInt.Indeterminate)); + + Assert.Equal(LayoutInt.Zero, LayoutInt.Min(LayoutInt.One, LayoutInt.Zero)); + Assert.Equal(LayoutInt.Zero, LayoutInt.Min(LayoutInt.Zero, LayoutInt.One)); + Assert.Equal(LayoutInt.Indeterminate, LayoutInt.Min(LayoutInt.Indeterminate, LayoutInt.Zero)); + Assert.Equal(LayoutInt.Indeterminate, LayoutInt.Min(LayoutInt.Zero, LayoutInt.Indeterminate)); + Assert.Equal(LayoutInt.Indeterminate, LayoutInt.Min(LayoutInt.Indeterminate, LayoutInt.Indeterminate)); + } + + public static IEnumerable GetTargetDetails() + { + yield return new object[] { new TargetDetails(TargetArchitecture.ARM, TargetOS.Unknown, TargetAbi.CoreRT) }; + yield return new object[] { new TargetDetails(TargetArchitecture.ARM64, TargetOS.Unknown, TargetAbi.CoreRT) }; + yield return new object[] { new TargetDetails(TargetArchitecture.X64, TargetOS.Unknown, TargetAbi.CoreRT) }; + yield return new object[] { new TargetDetails(TargetArchitecture.X86, TargetOS.Unknown, TargetAbi.CoreRT) }; + yield return new object[] { new TargetDetails(TargetArchitecture.Wasm32, TargetOS.Unknown, TargetAbi.CoreRT) }; + } + + [Theory] + [MemberData(nameof(GetTargetDetails))] + public void TestLayoutIntAlignUp(TargetDetails target) + { + // AlignUp testing + Assert.Equal(new LayoutInt(0), LayoutInt.AlignUp(new LayoutInt(0), new LayoutInt(1), target)); + Assert.Equal(new LayoutInt(0), LayoutInt.AlignUp(new LayoutInt(0), new LayoutInt(2), target)); + Assert.Equal(new LayoutInt(0), LayoutInt.AlignUp(new LayoutInt(0), new LayoutInt(4), target)); + Assert.Equal(new LayoutInt(0), LayoutInt.AlignUp(new LayoutInt(0), new LayoutInt(8), target)); + + Assert.Equal(new LayoutInt(1), LayoutInt.AlignUp(new LayoutInt(1), new LayoutInt(1), target)); + Assert.Equal(new LayoutInt(2), LayoutInt.AlignUp(new LayoutInt(2), new LayoutInt(1), target)); + Assert.Equal(new LayoutInt(3), LayoutInt.AlignUp(new LayoutInt(3), new LayoutInt(1), target)); + Assert.Equal(new LayoutInt(4), LayoutInt.AlignUp(new LayoutInt(4), new LayoutInt(1), target)); + Assert.Equal(new LayoutInt(5), LayoutInt.AlignUp(new LayoutInt(5), new LayoutInt(1), target)); + Assert.Equal(new LayoutInt(6), LayoutInt.AlignUp(new LayoutInt(6), new LayoutInt(1), target)); + Assert.Equal(new LayoutInt(7), LayoutInt.AlignUp(new LayoutInt(7), new LayoutInt(1), target)); + Assert.Equal(new LayoutInt(8), LayoutInt.AlignUp(new LayoutInt(8), new LayoutInt(1), target)); + Assert.Equal(new LayoutInt(9), LayoutInt.AlignUp(new LayoutInt(9), new LayoutInt(1), target)); + Assert.Equal(new LayoutInt(10), LayoutInt.AlignUp(new LayoutInt(10), new LayoutInt(1), target)); + Assert.Equal(new LayoutInt(11), LayoutInt.AlignUp(new LayoutInt(11), new LayoutInt(1), target)); + Assert.Equal(new LayoutInt(12), LayoutInt.AlignUp(new LayoutInt(12), new LayoutInt(1), target)); + Assert.Equal(new LayoutInt(13), LayoutInt.AlignUp(new LayoutInt(13), new LayoutInt(1), target)); + Assert.Equal(new LayoutInt(14), LayoutInt.AlignUp(new LayoutInt(14), new LayoutInt(1), target)); + Assert.Equal(new LayoutInt(15), LayoutInt.AlignUp(new LayoutInt(15), new LayoutInt(1), target)); + Assert.Equal(new LayoutInt(16), LayoutInt.AlignUp(new LayoutInt(16), new LayoutInt(1), target)); + + Assert.Equal(new LayoutInt(2), LayoutInt.AlignUp(new LayoutInt(1), new LayoutInt(2), target)); + Assert.Equal(new LayoutInt(2), LayoutInt.AlignUp(new LayoutInt(2), new LayoutInt(2), target)); + Assert.Equal(new LayoutInt(4), LayoutInt.AlignUp(new LayoutInt(3), new LayoutInt(2), target)); + Assert.Equal(new LayoutInt(4), LayoutInt.AlignUp(new LayoutInt(4), new LayoutInt(2), target)); + Assert.Equal(new LayoutInt(6), LayoutInt.AlignUp(new LayoutInt(5), new LayoutInt(2), target)); + Assert.Equal(new LayoutInt(6), LayoutInt.AlignUp(new LayoutInt(6), new LayoutInt(2), target)); + Assert.Equal(new LayoutInt(8), LayoutInt.AlignUp(new LayoutInt(7), new LayoutInt(2), target)); + Assert.Equal(new LayoutInt(8), LayoutInt.AlignUp(new LayoutInt(8), new LayoutInt(2), target)); + Assert.Equal(new LayoutInt(10), LayoutInt.AlignUp(new LayoutInt(9), new LayoutInt(2), target)); + Assert.Equal(new LayoutInt(10), LayoutInt.AlignUp(new LayoutInt(10), new LayoutInt(2), target)); + Assert.Equal(new LayoutInt(12), LayoutInt.AlignUp(new LayoutInt(11), new LayoutInt(2), target)); + Assert.Equal(new LayoutInt(12), LayoutInt.AlignUp(new LayoutInt(12), new LayoutInt(2), target)); + Assert.Equal(new LayoutInt(14), LayoutInt.AlignUp(new LayoutInt(13), new LayoutInt(2), target)); + Assert.Equal(new LayoutInt(14), LayoutInt.AlignUp(new LayoutInt(14), new LayoutInt(2), target)); + Assert.Equal(new LayoutInt(16), LayoutInt.AlignUp(new LayoutInt(15), new LayoutInt(2), target)); + Assert.Equal(new LayoutInt(16), LayoutInt.AlignUp(new LayoutInt(16), new LayoutInt(2), target)); + + Assert.Equal(new LayoutInt(4), LayoutInt.AlignUp(new LayoutInt(1), new LayoutInt(4), target)); + Assert.Equal(new LayoutInt(4), LayoutInt.AlignUp(new LayoutInt(2), new LayoutInt(4), target)); + Assert.Equal(new LayoutInt(4), LayoutInt.AlignUp(new LayoutInt(3), new LayoutInt(4), target)); + Assert.Equal(new LayoutInt(4), LayoutInt.AlignUp(new LayoutInt(4), new LayoutInt(4), target)); + Assert.Equal(new LayoutInt(8), LayoutInt.AlignUp(new LayoutInt(5), new LayoutInt(4), target)); + Assert.Equal(new LayoutInt(8), LayoutInt.AlignUp(new LayoutInt(6), new LayoutInt(4), target)); + Assert.Equal(new LayoutInt(8), LayoutInt.AlignUp(new LayoutInt(7), new LayoutInt(4), target)); + Assert.Equal(new LayoutInt(8), LayoutInt.AlignUp(new LayoutInt(8), new LayoutInt(4), target)); + Assert.Equal(new LayoutInt(12), LayoutInt.AlignUp(new LayoutInt(9), new LayoutInt(4), target)); + Assert.Equal(new LayoutInt(12), LayoutInt.AlignUp(new LayoutInt(10), new LayoutInt(4), target)); + Assert.Equal(new LayoutInt(12), LayoutInt.AlignUp(new LayoutInt(11), new LayoutInt(4), target)); + Assert.Equal(new LayoutInt(12), LayoutInt.AlignUp(new LayoutInt(12), new LayoutInt(4), target)); + Assert.Equal(new LayoutInt(16), LayoutInt.AlignUp(new LayoutInt(13), new LayoutInt(4), target)); + Assert.Equal(new LayoutInt(16), LayoutInt.AlignUp(new LayoutInt(14), new LayoutInt(4), target)); + Assert.Equal(new LayoutInt(16), LayoutInt.AlignUp(new LayoutInt(15), new LayoutInt(4), target)); + Assert.Equal(new LayoutInt(16), LayoutInt.AlignUp(new LayoutInt(16), new LayoutInt(4), target)); + + Assert.Equal(new LayoutInt(8), LayoutInt.AlignUp(new LayoutInt(1), new LayoutInt(8), target)); + Assert.Equal(new LayoutInt(8), LayoutInt.AlignUp(new LayoutInt(2), new LayoutInt(8), target)); + Assert.Equal(new LayoutInt(8), LayoutInt.AlignUp(new LayoutInt(3), new LayoutInt(8), target)); + Assert.Equal(new LayoutInt(8), LayoutInt.AlignUp(new LayoutInt(4), new LayoutInt(8), target)); + Assert.Equal(new LayoutInt(8), LayoutInt.AlignUp(new LayoutInt(5), new LayoutInt(8), target)); + Assert.Equal(new LayoutInt(8), LayoutInt.AlignUp(new LayoutInt(6), new LayoutInt(8), target)); + Assert.Equal(new LayoutInt(8), LayoutInt.AlignUp(new LayoutInt(7), new LayoutInt(8), target)); + Assert.Equal(new LayoutInt(8), LayoutInt.AlignUp(new LayoutInt(8), new LayoutInt(8), target)); + Assert.Equal(new LayoutInt(16), LayoutInt.AlignUp(new LayoutInt(9), new LayoutInt(8), target)); + Assert.Equal(new LayoutInt(16), LayoutInt.AlignUp(new LayoutInt(10), new LayoutInt(8), target)); + Assert.Equal(new LayoutInt(16), LayoutInt.AlignUp(new LayoutInt(11), new LayoutInt(8), target)); + Assert.Equal(new LayoutInt(16), LayoutInt.AlignUp(new LayoutInt(12), new LayoutInt(8), target)); + Assert.Equal(new LayoutInt(16), LayoutInt.AlignUp(new LayoutInt(13), new LayoutInt(8), target)); + Assert.Equal(new LayoutInt(16), LayoutInt.AlignUp(new LayoutInt(14), new LayoutInt(8), target)); + Assert.Equal(new LayoutInt(16), LayoutInt.AlignUp(new LayoutInt(15), new LayoutInt(8), target)); + Assert.Equal(new LayoutInt(16), LayoutInt.AlignUp(new LayoutInt(16), new LayoutInt(8), target)); + + Assert.Equal(LayoutInt.Indeterminate, LayoutInt.AlignUp(new LayoutInt(1), LayoutInt.Indeterminate, target)); + Assert.Equal(LayoutInt.Indeterminate, LayoutInt.AlignUp(new LayoutInt(2), LayoutInt.Indeterminate, target)); + Assert.Equal(LayoutInt.Indeterminate, LayoutInt.AlignUp(new LayoutInt(3), LayoutInt.Indeterminate, target)); + Assert.Equal(LayoutInt.Indeterminate, LayoutInt.AlignUp(new LayoutInt(4), LayoutInt.Indeterminate, target)); + Assert.Equal(LayoutInt.Indeterminate, LayoutInt.AlignUp(new LayoutInt(5), LayoutInt.Indeterminate, target)); + Assert.Equal(LayoutInt.Indeterminate, LayoutInt.AlignUp(new LayoutInt(6), LayoutInt.Indeterminate, target)); + Assert.Equal(LayoutInt.Indeterminate, LayoutInt.AlignUp(new LayoutInt(7), LayoutInt.Indeterminate, target)); + if (target.MaximumAlignment > 8) + Assert.Equal(LayoutInt.Indeterminate, LayoutInt.AlignUp(new LayoutInt(8), LayoutInt.Indeterminate, target)); + Assert.Equal(LayoutInt.Indeterminate, LayoutInt.AlignUp(new LayoutInt(9), LayoutInt.Indeterminate, target)); + Assert.Equal(LayoutInt.Indeterminate, LayoutInt.AlignUp(new LayoutInt(10), LayoutInt.Indeterminate, target)); + Assert.Equal(LayoutInt.Indeterminate, LayoutInt.AlignUp(new LayoutInt(11), LayoutInt.Indeterminate, target)); + Assert.Equal(LayoutInt.Indeterminate, LayoutInt.AlignUp(new LayoutInt(12), LayoutInt.Indeterminate, target)); + Assert.Equal(LayoutInt.Indeterminate, LayoutInt.AlignUp(new LayoutInt(13), LayoutInt.Indeterminate, target)); + Assert.Equal(LayoutInt.Indeterminate, LayoutInt.AlignUp(new LayoutInt(14), LayoutInt.Indeterminate, target)); + Assert.Equal(LayoutInt.Indeterminate, LayoutInt.AlignUp(new LayoutInt(15), LayoutInt.Indeterminate, target)); + if (target.MaximumAlignment > 16) + Assert.Equal(LayoutInt.Indeterminate, LayoutInt.AlignUp(new LayoutInt(16), LayoutInt.Indeterminate, target)); + + // If we the value is aligned to the maximum supported alignment, we can consider it aligned no matter + // the value of the alignment. + Assert.Equal(new LayoutInt(target.MaximumAlignment), LayoutInt.AlignUp(new LayoutInt(target.MaximumAlignment), LayoutInt.Indeterminate, target)); + Assert.Equal(new LayoutInt(target.MaximumAlignment * 2), LayoutInt.AlignUp(new LayoutInt(target.MaximumAlignment * 2), LayoutInt.Indeterminate, target)); + + Assert.Equal(LayoutInt.Indeterminate, LayoutInt.AlignUp(LayoutInt.Indeterminate, new LayoutInt(1), target)); + Assert.Equal(LayoutInt.Indeterminate, LayoutInt.AlignUp(LayoutInt.Indeterminate, new LayoutInt(2), target)); + Assert.Equal(LayoutInt.Indeterminate, LayoutInt.AlignUp(LayoutInt.Indeterminate, new LayoutInt(4), target)); + Assert.Equal(LayoutInt.Indeterminate, LayoutInt.AlignUp(LayoutInt.Indeterminate, new LayoutInt(8), target)); + } + + + private void TestLayoutOfUniversalCanonTypeOnArchitecture(TypeSystemContext context) + { + // Assert all of the various layout information about the universal canon type itself + Assert.Equal(LayoutInt.Indeterminate, context.UniversalCanonType.InstanceFieldAlignment); + Assert.Equal(LayoutInt.Indeterminate, context.UniversalCanonType.InstanceFieldSize); + Assert.Equal(LayoutInt.Indeterminate, context.UniversalCanonType.InstanceByteAlignment); + Assert.Equal(LayoutInt.Indeterminate, context.UniversalCanonType.InstanceByteCount); + Assert.Equal(LayoutInt.Indeterminate, context.UniversalCanonType.InstanceByteCountUnaligned); + Assert.Equal(LayoutInt.Zero, context.UniversalCanonType.GCStaticFieldAlignment); + Assert.Equal(LayoutInt.Zero, context.UniversalCanonType.GCStaticFieldSize); + Assert.Equal(LayoutInt.Zero, context.UniversalCanonType.NonGCStaticFieldAlignment); + Assert.Equal(LayoutInt.Zero, context.UniversalCanonType.NonGCStaticFieldSize); + Assert.Equal(LayoutInt.Zero, context.UniversalCanonType.ThreadGcStaticFieldAlignment); + Assert.Equal(LayoutInt.Zero, context.UniversalCanonType.ThreadGcStaticFieldSize); + } + [Fact] + public void TestLayoutOfUniversalCanonType() + { + // Assert all of the various layout information about the universal canon type itself, do this for all architectures + TestLayoutOfUniversalCanonTypeOnArchitecture(_contextX86); + TestLayoutOfUniversalCanonTypeOnArchitecture(_contextX64); + TestLayoutOfUniversalCanonTypeOnArchitecture(_contextARM); + } + + [Fact] + public void TestAllFieldsStructUniversalGeneric() + { + // Given a struct with all field universal, what is the layout? + MetadataType tGen; + InstantiatedType genOfUUU; + ModuleDesc testModule; + TypeSystemContext context; + + // X64 testing + testModule = _testModuleX64; + context = _contextX64; + + tGen = testModule.GetType("GenericTypes", "GenStruct`3"); + genOfUUU = tGen.MakeInstantiatedType(context.UniversalCanonType, context.UniversalCanonType, context.UniversalCanonType); + + Assert.Equal(LayoutInt.Indeterminate, genOfUUU.InstanceFieldAlignment); + Assert.Equal(LayoutInt.Indeterminate, genOfUUU.InstanceFieldSize); + Assert.Equal(new LayoutInt(8), genOfUUU.InstanceByteAlignment); + Assert.Equal(LayoutInt.Indeterminate, genOfUUU.InstanceByteCount); + Assert.Equal(LayoutInt.Indeterminate, genOfUUU.InstanceByteCountUnaligned); + Assert.Equal(0, genOfUUU.GetFields().First().Offset.AsInt); + Assert.Equal(LayoutInt.Indeterminate, genOfUUU.GetFields().ElementAt(1).Offset); + Assert.Equal(LayoutInt.Indeterminate, genOfUUU.GetFields().ElementAt(2).Offset); + + testModule = _testModuleX86; + context = _contextX86; + + tGen = testModule.GetType("GenericTypes", "GenStruct`3"); + genOfUUU = tGen.MakeInstantiatedType(context.UniversalCanonType, context.UniversalCanonType, context.UniversalCanonType); + + Assert.Equal(LayoutInt.Indeterminate, genOfUUU.InstanceFieldAlignment); + Assert.Equal(LayoutInt.Indeterminate, genOfUUU.InstanceFieldSize); + Assert.Equal(new LayoutInt(4), genOfUUU.InstanceByteAlignment); + Assert.Equal(LayoutInt.Indeterminate, genOfUUU.InstanceByteCount); + Assert.Equal(LayoutInt.Indeterminate, genOfUUU.InstanceByteCountUnaligned); + Assert.Equal(0, genOfUUU.GetFields().First().Offset.AsInt); + Assert.Equal(LayoutInt.Indeterminate, genOfUUU.GetFields().ElementAt(1).Offset); + Assert.Equal(LayoutInt.Indeterminate, genOfUUU.GetFields().ElementAt(2).Offset); + + testModule = _testModuleARM; + context = _contextARM; + + tGen = testModule.GetType("GenericTypes", "GenStruct`3"); + genOfUUU = tGen.MakeInstantiatedType(context.UniversalCanonType, context.UniversalCanonType, context.UniversalCanonType); + + Assert.Equal(LayoutInt.Indeterminate, genOfUUU.InstanceFieldAlignment); + Assert.Equal(LayoutInt.Indeterminate, genOfUUU.InstanceFieldSize); + Assert.Equal(LayoutInt.Indeterminate, genOfUUU.InstanceByteAlignment); + Assert.Equal(LayoutInt.Indeterminate, genOfUUU.InstanceByteCount); + Assert.Equal(LayoutInt.Indeterminate, genOfUUU.InstanceByteCountUnaligned); + Assert.Equal(0, genOfUUU.GetFields().First().Offset.AsInt); + Assert.Equal(LayoutInt.Indeterminate, genOfUUU.GetFields().ElementAt(1).Offset); + Assert.Equal(LayoutInt.Indeterminate, genOfUUU.GetFields().ElementAt(2).Offset); + } + + private void TestIndeterminatedNestedStructFieldPerContext(TypeSystemContext context, ModuleDesc testModule, out InstantiatedType genOfIntNestedInt, out InstantiatedType genOfLongNestedInt) + { + // Given a struct with all field universal, what is the layout? + MetadataType tGen = testModule.GetType("GenericTypes", "GenStruct`3"); + InstantiatedType genOfUUU = tGen.MakeInstantiatedType(context.UniversalCanonType, context.UniversalCanonType, context.UniversalCanonType); + genOfIntNestedInt = tGen.MakeInstantiatedType(context.GetWellKnownType(WellKnownType.Int32), genOfUUU, context.GetWellKnownType(WellKnownType.Int32)); + genOfLongNestedInt = tGen.MakeInstantiatedType(context.GetWellKnownType(WellKnownType.Int64), genOfUUU, context.GetWellKnownType(WellKnownType.Int32)); + + Assert.Equal(LayoutInt.Indeterminate, genOfIntNestedInt.InstanceFieldAlignment); + Assert.Equal(LayoutInt.Indeterminate, genOfIntNestedInt.InstanceFieldSize); + Assert.Equal(LayoutInt.Indeterminate, genOfIntNestedInt.InstanceByteCount); + Assert.Equal(LayoutInt.Indeterminate, genOfIntNestedInt.InstanceByteCountUnaligned); + Assert.Equal(0, genOfIntNestedInt.GetFields().First().Offset.AsInt); + Assert.Equal(LayoutInt.Indeterminate, genOfIntNestedInt.GetFields().ElementAt(1).Offset); + Assert.Equal(LayoutInt.Indeterminate, genOfIntNestedInt.GetFields().ElementAt(2).Offset); + + Assert.Equal(LayoutInt.Indeterminate, genOfLongNestedInt.InstanceFieldAlignment); + Assert.Equal(LayoutInt.Indeterminate, genOfLongNestedInt.InstanceFieldSize); + Assert.Equal(LayoutInt.Indeterminate, genOfLongNestedInt.InstanceByteCount); + Assert.Equal(LayoutInt.Indeterminate, genOfLongNestedInt.InstanceByteCountUnaligned); + Assert.Equal(0, genOfLongNestedInt.GetFields().First().Offset.AsInt); + if (context.Target.MaximumAlignment <= 8) + { + Assert.Equal(8, genOfLongNestedInt.GetFields().ElementAt(1).Offset.AsInt); + } + else + { + Assert.Equal(LayoutInt.Indeterminate, genOfLongNestedInt.GetFields().ElementAt(1).Offset); + } + Assert.Equal(LayoutInt.Indeterminate, genOfLongNestedInt.GetFields().ElementAt(2).Offset); + } + + [Fact] + public void TestIndeterminateNestedStructField() + { + InstantiatedType genOfIntNestedInt; + InstantiatedType genOfLongNestedInt; + + TestIndeterminatedNestedStructFieldPerContext(_contextX64, _testModuleX64, out genOfIntNestedInt, out genOfLongNestedInt); + Assert.Equal(new LayoutInt(8), genOfLongNestedInt.InstanceByteAlignment); + Assert.Equal(new LayoutInt(8), genOfLongNestedInt.InstanceByteAlignment); + TestIndeterminatedNestedStructFieldPerContext(_contextX86, _testModuleX86, out genOfIntNestedInt, out genOfLongNestedInt); + Assert.Equal(new LayoutInt(4), genOfLongNestedInt.InstanceByteAlignment); + Assert.Equal(new LayoutInt(4), genOfLongNestedInt.InstanceByteAlignment); + TestIndeterminatedNestedStructFieldPerContext(_contextARM, _testModuleARM, out genOfIntNestedInt, out genOfLongNestedInt); + Assert.Equal(LayoutInt.Indeterminate, genOfLongNestedInt.InstanceByteAlignment); + Assert.Equal(LayoutInt.Indeterminate, genOfLongNestedInt.InstanceByteAlignment); + } + + private void AssertClassIndeterminateSize(TypeSystemContext context, MetadataType type, LayoutInt expectedIndeterminateByteAlignment) + { + Assert.Equal(context.Target.LayoutPointerSize, type.InstanceFieldAlignment); + Assert.Equal(context.Target.LayoutPointerSize, type.InstanceFieldSize); + Assert.Equal(expectedIndeterminateByteAlignment, type.InstanceByteAlignment); + Assert.Equal(LayoutInt.Indeterminate, type.InstanceByteCount); + Assert.Equal(LayoutInt.Indeterminate, type.InstanceByteCountUnaligned); + } + + private void CommonClassLayoutTestBits(ModuleDesc testModule, + TypeSystemContext context, + LayoutInt expectedIndeterminateByteAlignment, + out InstantiatedType genOfIU, + out InstantiatedType genOfLU, + out InstantiatedType genOfUU, + out InstantiatedType genOfUI, + out InstantiatedType genOfUL) + { + MetadataType tDerivedGen = testModule.GetType("GenericTypes", "GenDerivedClass`2"); + genOfIU = tDerivedGen.MakeInstantiatedType(context.GetWellKnownType(WellKnownType.Int32), context.UniversalCanonType); + genOfLU = tDerivedGen.MakeInstantiatedType(context.GetWellKnownType(WellKnownType.Int64), context.UniversalCanonType); + genOfUU = tDerivedGen.MakeInstantiatedType(context.UniversalCanonType, context.UniversalCanonType); + + genOfUI = tDerivedGen.MakeInstantiatedType(context.UniversalCanonType, context.GetWellKnownType(WellKnownType.Int32)); + genOfUL = tDerivedGen.MakeInstantiatedType(context.UniversalCanonType, context.GetWellKnownType(WellKnownType.Int64)); + + // Assert that the class as a whole is known to be of undefined size + AssertClassIndeterminateSize(context, genOfIU, expectedIndeterminateByteAlignment); + AssertClassIndeterminateSize(context, genOfLU, expectedIndeterminateByteAlignment); + AssertClassIndeterminateSize(context, genOfUU, expectedIndeterminateByteAlignment); + AssertClassIndeterminateSize(context, genOfUI, expectedIndeterminateByteAlignment); + AssertClassIndeterminateSize(context, genOfUL, expectedIndeterminateByteAlignment); + } + + [Fact] + public void TestClassLayout() + { + // Tests class layout behavior with universal generics + // Tests handling universal base types as well as non-universal base types + + InstantiatedType genOfIU; + InstantiatedType genOfLU; + InstantiatedType genOfUU; + InstantiatedType genOfUI; + InstantiatedType genOfUL; + + ModuleDesc testModule; + TypeSystemContext context; + + // X64 testing + testModule = _testModuleX64; + context = _contextX64; + + CommonClassLayoutTestBits(testModule, + context, + new LayoutInt(8), + out genOfIU, + out genOfLU, + out genOfUU, + out genOfUI, + out genOfUL); + + // On x64 first field offset is well known always + Assert.Equal(8, genOfIU.BaseType.GetFields().First().Offset.AsInt); + Assert.Equal(8, genOfLU.BaseType.GetFields().First().Offset.AsInt); + if (context.Target.MaximumAlignment <= 8) + { + Assert.Equal(8, genOfUU.BaseType.GetFields().First().Offset.AsInt); + Assert.Equal(8, genOfUI.BaseType.GetFields().First().Offset.AsInt); + Assert.Equal(8, genOfUL.BaseType.GetFields().First().Offset.AsInt); + } + else + { + + Assert.Equal(LayoutInt.Indeterminate, genOfUU.BaseType.GetFields().First().Offset); + Assert.Equal(LayoutInt.Indeterminate, genOfUI.BaseType.GetFields().First().Offset); + Assert.Equal(LayoutInt.Indeterminate, genOfUL.BaseType.GetFields().First().Offset); + } + + Assert.Equal(LayoutInt.Indeterminate, genOfIU.GetFields().First().Offset); + if (context.Target.MaximumAlignment <= 16) + { + Assert.Equal(16, genOfLU.GetFields().First().Offset.AsInt); + } + else + { + Assert.Equal(LayoutInt.Indeterminate, genOfLU.GetFields().First().Offset); + } + Assert.Equal(LayoutInt.Indeterminate, genOfUU.GetFields().First().Offset); + Assert.Equal(LayoutInt.Indeterminate, genOfUI.GetFields().First().Offset); + Assert.Equal(LayoutInt.Indeterminate, genOfUL.GetFields().First().Offset); + + // X86 testing + testModule = _testModuleX86; + context = _contextX86; + + CommonClassLayoutTestBits(testModule, + context, + new LayoutInt(4), + out genOfIU, + out genOfLU, + out genOfUU, + out genOfUI, + out genOfUL); + + Assert.Equal(4, genOfIU.BaseType.GetFields().First().Offset.AsInt); + Assert.Equal(8, genOfLU.BaseType.GetFields().First().Offset.AsInt); + Assert.Equal(LayoutInt.Indeterminate, genOfUU.BaseType.GetFields().First().Offset); + Assert.Equal(LayoutInt.Indeterminate, genOfUI.BaseType.GetFields().First().Offset); + Assert.Equal(LayoutInt.Indeterminate, genOfUL.BaseType.GetFields().First().Offset); + + if (context.Target.MaximumAlignment <= 8) + { + Assert.Equal(8, genOfIU.GetFields().First().Offset.AsInt); + } + else + { + Assert.Equal(LayoutInt.Indeterminate, genOfIU.GetFields().First().Offset); + } + if (context.Target.MaximumAlignment <= 16) + { + Assert.Equal(16, genOfLU.GetFields().First().Offset.AsInt); + } + else + { + Assert.Equal(LayoutInt.Indeterminate, genOfLU.GetFields().First().Offset); + } + Assert.Equal(LayoutInt.Indeterminate, genOfUU.GetFields().First().Offset); + Assert.Equal(LayoutInt.Indeterminate, genOfUI.GetFields().First().Offset); + Assert.Equal(LayoutInt.Indeterminate, genOfUL.GetFields().First().Offset); + + // ARM testing + testModule = _testModuleARM; + context = _contextARM; + + CommonClassLayoutTestBits(testModule, + context, + LayoutInt.Indeterminate, + out genOfIU, + out genOfLU, + out genOfUU, + out genOfUI, + out genOfUL); + + Assert.Equal(4, genOfIU.BaseType.GetFields().First().Offset.AsInt); + Assert.Equal(8, genOfLU.BaseType.GetFields().First().Offset.AsInt); + Assert.Equal(LayoutInt.Indeterminate, genOfUU.BaseType.GetFields().First().Offset); + Assert.Equal(LayoutInt.Indeterminate, genOfUI.BaseType.GetFields().First().Offset); + Assert.Equal(LayoutInt.Indeterminate, genOfUL.BaseType.GetFields().First().Offset); + + if (context.Target.MaximumAlignment <= 8) + { + Assert.Equal(8, genOfIU.GetFields().First().Offset.AsInt); + } + else + { + Assert.Equal(LayoutInt.Indeterminate, genOfIU.GetFields().First().Offset); + } + if (context.Target.MaximumAlignment <= 16) + { + Assert.Equal(16, genOfLU.GetFields().First().Offset.AsInt); + } + else + { + Assert.Equal(LayoutInt.Indeterminate, genOfLU.GetFields().First().Offset); + } + Assert.Equal(LayoutInt.Indeterminate, genOfUU.GetFields().First().Offset); + Assert.Equal(LayoutInt.Indeterminate, genOfUI.GetFields().First().Offset); + Assert.Equal(LayoutInt.Indeterminate, genOfUL.GetFields().First().Offset); + } + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ValueTypeShapeCharacteristicsTests.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ValueTypeShapeCharacteristicsTests.cs new file mode 100644 index 000000000000..2971fd468ead --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ValueTypeShapeCharacteristicsTests.cs @@ -0,0 +1,90 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Internal.TypeSystem; + +using Xunit; + +namespace TypeSystemTests +{ + public class ValueTypeShapeCharacteristicsTests + { + const ValueTypeShapeCharacteristics Float32Aggregate = ValueTypeShapeCharacteristics.Float32Aggregate; + const ValueTypeShapeCharacteristics Float64Aggregate = ValueTypeShapeCharacteristics.Float64Aggregate; + + TestTypeSystemContext _context; + ModuleDesc _testModule; + + public ValueTypeShapeCharacteristicsTests() + { + _context = new TestTypeSystemContext(TargetArchitecture.ARM); + var systemModule = _context.CreateModuleForSimpleName("CoreTestAssembly"); + _context.SetSystemModule(systemModule); + + _testModule = systemModule; + } + + [Fact] + public void TestHfaPrimitives() + { + DefType singleType = _context.GetWellKnownType(WellKnownType.Single); + DefType doubleType = _context.GetWellKnownType(WellKnownType.Double); + + Assert.True(singleType.IsHomogeneousAggregate); + Assert.Equal(Float32Aggregate, singleType.ValueTypeShapeCharacteristics); + + Assert.True(doubleType.IsHomogeneousAggregate); + Assert.Equal(Float64Aggregate, doubleType.ValueTypeShapeCharacteristics); + } + + [Fact] + public void TestSimpleHfa() + { + var simpleHfaFloatStruct = _testModule.GetType("ValueTypeShapeCharacteristics", "SimpleHfaFloatStruct"); + Assert.True(simpleHfaFloatStruct.IsHomogeneousAggregate); + Assert.Equal(Float32Aggregate, simpleHfaFloatStruct.ValueTypeShapeCharacteristics); + + var simpleHfaFloatStructWithManyFields = _testModule.GetType("ValueTypeShapeCharacteristics", "SimpleHfaFloatStructWithManyFields"); + Assert.True(simpleHfaFloatStructWithManyFields.IsHomogeneousAggregate); + Assert.Equal(Float32Aggregate, simpleHfaFloatStructWithManyFields.ValueTypeShapeCharacteristics); + + var simpleHfaDoubleStruct = _testModule.GetType("ValueTypeShapeCharacteristics", "SimpleHfaDoubleStruct"); + Assert.True(simpleHfaDoubleStruct.IsHomogeneousAggregate); + Assert.Equal(Float64Aggregate, simpleHfaDoubleStruct.ValueTypeShapeCharacteristics); + } + + [Fact] + public void TestCompositeHfa() + { + var compositeHfaFloatStruct = _testModule.GetType("ValueTypeShapeCharacteristics", "CompositeHfaFloatStruct"); + Assert.True(compositeHfaFloatStruct.IsHomogeneousAggregate); + Assert.Equal(Float32Aggregate, compositeHfaFloatStruct.ValueTypeShapeCharacteristics); + + var compositeHfaDoubleStruct = _testModule.GetType("ValueTypeShapeCharacteristics", "CompositeHfaDoubleStruct"); + Assert.True(compositeHfaDoubleStruct.IsHomogeneousAggregate); + Assert.Equal(Float64Aggregate, compositeHfaDoubleStruct.ValueTypeShapeCharacteristics); + } + + [Fact] + public void TestHfaNegative() + { + var nonHAEmptyStruct = _testModule.GetType("ValueTypeShapeCharacteristics", "NonHAEmptyStruct"); + Assert.False(nonHAEmptyStruct.IsHomogeneousAggregate); + + var nonHAStruct = _testModule.GetType("ValueTypeShapeCharacteristics", "NonHAStruct"); + Assert.False(nonHAStruct.IsHomogeneousAggregate); + + var nonHAMixedStruct = _testModule.GetType("ValueTypeShapeCharacteristics", "NonHAMixedStruct"); + Assert.False(nonHAMixedStruct.IsHomogeneousAggregate); + + var nonHACompositeStruct = _testModule.GetType("ValueTypeShapeCharacteristics", "NonHACompositeStruct"); + Assert.False(nonHACompositeStruct.IsHomogeneousAggregate); + + var nonHAStructWithManyFields = _testModule.GetType("ValueTypeShapeCharacteristics", "NonHAStructWithManyFields"); + Assert.False(nonHAStructWithManyFields.IsHomogeneousAggregate); + + var objectType = _context.GetWellKnownType(WellKnownType.Object); + Assert.False(objectType.IsHomogeneousAggregate); + } + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/VirtualFunctionOverrideTests.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/VirtualFunctionOverrideTests.cs new file mode 100644 index 000000000000..938377d8cd3c --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/VirtualFunctionOverrideTests.cs @@ -0,0 +1,274 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Linq; +using Internal.TypeSystem; + +using Xunit; + + +namespace TypeSystemTests +{ + public class VirtualFunctionOverrideTests + { + TestTypeSystemContext _context; + ModuleDesc _testModule; + DefType _stringType; + DefType _voidType; + + public VirtualFunctionOverrideTests() + { + _context = new TestTypeSystemContext(TargetArchitecture.X64); + var systemModule = _context.CreateModuleForSimpleName("CoreTestAssembly"); + _context.SetSystemModule(systemModule); + + _testModule = systemModule; + + _stringType = _context.GetWellKnownType(WellKnownType.String); + _voidType = _context.GetWellKnownType(WellKnownType.Void); + } + + [Fact] + public void TestGenericMethodInterfaceMethodImplOverride() + { + // + // Ensure MethodImpl based overriding works for MethodSpecs + // + + MetadataType interfaceType = _testModule.GetType("VirtualFunctionOverride", "IIFaceWithGenericMethod"); + MethodDesc interfaceMethod = null; + + foreach(MethodDesc m in interfaceType.GetMethods()) + { + if (m.Name == "GenMethod") + { + interfaceMethod = m; + break; + } + } + Assert.NotNull(interfaceMethod); + + MetadataType objectType = _testModule.GetType("VirtualFunctionOverride", "HasMethodInterfaceOverrideOfGenericMethod"); + MethodDesc expectedVirtualMethod = null; + foreach (MethodDesc m in objectType.GetMethods()) + { + if (m.Name.Contains("GenMethod")) + { + expectedVirtualMethod = m; + break; + } + } + Assert.NotNull(expectedVirtualMethod); + + Assert.Equal(expectedVirtualMethod, objectType.ResolveInterfaceMethodToVirtualMethodOnType(interfaceMethod)); + } + + [Fact] + public void TestVirtualDispatchOnGenericType() + { + // Verifies that virtual dispatch to a non-generic method on a generic instantiation works + DefType objectType = _context.GetWellKnownType(WellKnownType.Object); + MethodSignature toStringSig = new MethodSignature(MethodSignatureFlags.None, 0, _stringType, Array.Empty()); + MethodDesc objectToString = objectType.GetMethod("ToString", toStringSig); + Assert.NotNull(objectToString); + MetadataType openTestType = _testModule.GetType("VirtualFunctionOverride", "SimpleGeneric`1"); + InstantiatedType testInstance = openTestType.MakeInstantiatedType(objectType); + MethodDesc targetOnInstance = testInstance.GetMethod("ToString", toStringSig); + + MethodDesc targetMethod = testInstance.FindVirtualFunctionTargetMethodOnObjectType(objectToString); + Assert.Equal(targetOnInstance, targetMethod); + } + + [Fact] + public void TestVirtualDispatchOnGenericTypeWithOverload() + { + MetadataType openDerived = _testModule.GetType("VirtualFunctionOverride", "DerivedGenericWithOverload`1"); + MetadataType derivedInstance = openDerived.MakeInstantiatedType(_stringType); + MetadataType baseInstance = (MetadataType)derivedInstance.BaseType; + + MethodDesc baseNongenericOverload = baseInstance.GetMethod("MyMethod", new MethodSignature(MethodSignatureFlags.None, 0, _voidType, new TypeDesc[] { _stringType })); + MethodDesc derivedNongenericOverload = derivedInstance.GetMethod("MyMethod", new MethodSignature(MethodSignatureFlags.None, 0, _voidType, new TypeDesc[] { _stringType })); + MethodDesc nongenericTargetOverload = derivedInstance.FindVirtualFunctionTargetMethodOnObjectType(baseNongenericOverload); + Assert.Equal(derivedNongenericOverload, nongenericTargetOverload); + + MethodDesc baseGenericOverload = baseInstance.GetMethod("MyMethod", new MethodSignature(MethodSignatureFlags.None, 0, _voidType, new TypeDesc[] { _context.GetSignatureVariable(0, false) })); + MethodDesc derivedGenericOverload = derivedInstance.GetMethod("MyMethod", new MethodSignature(MethodSignatureFlags.None, 0, _voidType, new TypeDesc[] { _context.GetSignatureVariable(0, false) })); + MethodDesc genericTargetOverload = derivedInstance.FindVirtualFunctionTargetMethodOnObjectType(baseGenericOverload); + Assert.Equal(derivedGenericOverload, genericTargetOverload); + } + + [Fact] + public void TestFinalizeOverrideChecking() + { + MetadataType classWithFinalizer = _testModule.GetType("VirtualFunctionOverride", "ClassWithFinalizer"); + DefType objectType = _testModule.Context.GetWellKnownType(WellKnownType.Object); + MethodDesc finalizeMethod = objectType.GetMethod("Finalize", new MethodSignature(MethodSignatureFlags.None, 0, _voidType, new TypeDesc[] { })); + + MethodDesc actualFinalizer = classWithFinalizer.FindVirtualFunctionTargetMethodOnObjectType(finalizeMethod); + Assert.NotNull(actualFinalizer); + Assert.NotEqual(actualFinalizer, finalizeMethod); + } + + [Fact] + public void TestExplicitOverride() + { + // + // Test that explicit virtual method overriding works. + // + + var ilModule = _context.GetModuleForSimpleName("ILTestAssembly"); + var explicitOverrideClass = ilModule.GetType("VirtualFunctionOverride", "ExplicitOverride"); + + var myGetHashCodeMethod = explicitOverrideClass.GetMethod("MyGetHashCode", null); + + var objectGetHashCodeMethod = _context.GetWellKnownType(WellKnownType.Object).GetMethod("GetHashCode", null); + + var foundOverride = explicitOverrideClass.FindVirtualFunctionTargetMethodOnObjectType(objectGetHashCodeMethod); + + Assert.Equal(myGetHashCodeMethod, foundOverride); + } + + [Fact] + public void TestFindBaseUnificationGroup() + { + var algo = new MetadataVirtualMethodAlgorithm(); + var ilModule = _context.GetModuleForSimpleName("ILTestAssembly"); + MetadataType myDerived2Type = ilModule.GetType("VirtualFunctionOverride", "MyDerived2"); + Assert.NotNull(myDerived2Type); + MethodDesc method = myDerived2Type.GetMethod("get_foo", null); + Assert.NotNull(method); + + MethodDesc virtualMethod = algo.FindVirtualFunctionTargetMethodOnObjectType(method, myDerived2Type); + Assert.NotNull(virtualMethod); + Assert.Equal(method, virtualMethod); + } + + [Fact] + public void TestGenericsOverrideOfSpecificMethodWhereSubstitutionsAreNecessaryToComputeTheRightTargetToOverride() + { + var algo = new MetadataVirtualMethodAlgorithm(); + var ilModule = _context.GetModuleForSimpleName("ILTestAssembly"); + MetadataType myDerivedType = ilModule.GetType("MethodImplOverride1", "Derived"); + MetadataType baseType = ilModule.GetType("MethodImplOverride1", "Base`2").MakeInstantiatedType(_context.GetWellKnownType(WellKnownType.Int32), _context.GetWellKnownType(WellKnownType.Int32)); + var csModule = _context.GetModuleForSimpleName("CoreTestAssembly"); + var myGenericType = csModule.GetType("GenericTypes", "GenericClass`1"); + var myGenericTypeInstantiatedOverBang0 = myGenericType.MakeInstantiatedType(_context.GetSignatureVariable(0, false)); + var myGenericTypeInstantiatedOverBang0ByRef = myGenericTypeInstantiatedOverBang0.MakeByRefType(); + var myGenericTypeInstantiatedOverBang1 = myGenericType.MakeInstantiatedType(_context.GetSignatureVariable(1, false)); + var myGenericTypeInstantiatedOverBang1ByRef = myGenericTypeInstantiatedOverBang1.MakeByRefType(); + var stringType = _context.GetWellKnownType(WellKnownType.String); + + MethodSignature sigBang0Bang1 = new MethodSignature(0, 0, stringType, new TypeDesc[] { myGenericTypeInstantiatedOverBang0ByRef, myGenericTypeInstantiatedOverBang1ByRef }); + MethodDesc baseMethod0_1 = baseType.GetMethod("Method", sigBang0Bang1); + + MethodDesc virtualMethodBang0Bang1 = algo.FindVirtualFunctionTargetMethodOnObjectType(baseMethod0_1, myDerivedType); + Assert.Equal(virtualMethodBang0Bang1.OwningType, myDerivedType); + + MethodSignature sigBang1Bang0 = new MethodSignature(0, 0, stringType, new TypeDesc[] { myGenericTypeInstantiatedOverBang1ByRef, myGenericTypeInstantiatedOverBang0ByRef }); + MethodDesc baseMethod1_0 = baseType.GetMethod("Method", sigBang1Bang0); + + MethodDesc virtualMethodBang1Bang0 = algo.FindVirtualFunctionTargetMethodOnObjectType(baseMethod1_0, myDerivedType); + Assert.Equal(virtualMethodBang1Bang0.OwningType, baseType); + } + + [Fact] + public void TestGenericsClassOverrideOfMethodWhereMethodHasBeenMovedFromTheTypeWhichPreviouslyDeclaredTheTypeToItsBaseType() + { + var algo = new MetadataVirtualMethodAlgorithm(); + var csModule = _context.GetModuleForSimpleName("CoreTestAssembly"); + var ilModule = _context.GetModuleForSimpleName("ILTestAssembly"); + var doubleType = _context.GetWellKnownType(WellKnownType.Double); + var objectType = _context.GetWellKnownType(WellKnownType.Object); + var stringType = _context.GetWellKnownType(WellKnownType.String); + var intType = _context.GetWellKnownType(WellKnownType.Int32); + var myGenericType = csModule.GetType("GenericTypes", "GenericClass`1"); + var genericTypeOfInt = myGenericType.MakeInstantiatedType(intType); + var doubleArrayType = doubleType.MakeArrayType(); + + MetadataType myDerivedType = ilModule.GetType("MethodImplOverride1", "DerivedGenericsShape`1").MakeInstantiatedType(doubleType); + MetadataType baseType = ilModule.GetType("MethodImplOverride1", "BaseTestGenericsShape`4").MakeInstantiatedType(objectType, stringType, genericTypeOfInt, doubleArrayType); + + var bang0Type = _context.GetSignatureVariable(0, false); + var bang1Type = _context.GetSignatureVariable(1, false); + var bang2Type = _context.GetSignatureVariable(2, false); + var bang3Type = _context.GetSignatureVariable(3, false); + + MethodSignature sigBang0Bang1 = new MethodSignature(0, 0, stringType, new TypeDesc[] { bang0Type, bang1Type }); + MethodDesc baseMethod0_1 = baseType.GetMethod("Method", sigBang0Bang1); + + MethodDesc virtualMethodBang0Bang1 = algo.FindVirtualFunctionTargetMethodOnObjectType(baseMethod0_1, myDerivedType); + Assert.Equal(virtualMethodBang0Bang1.OwningType, baseType); + + MethodSignature sigBang2Bang3 = new MethodSignature(0, 0, stringType, new TypeDesc[] { bang2Type, bang3Type }); + MethodDesc baseMethod2_3 = null; + // BaseMethod(!2,!3) has custom modifiers in its signature, and thus the sig is difficult to write up by hand. Just search for + // it in an ad hoc manner + foreach (MethodDesc method in baseType.GetMethods()) + { + if (method.Name != "Method") + continue; + + if (method.GetTypicalMethodDefinition().Signature[0] == bang2Type) + { + baseMethod2_3 = method; + break; + } + } + + MethodDesc virtualMethodBang1Bang0 = algo.FindVirtualFunctionTargetMethodOnObjectType(baseMethod2_3, myDerivedType); + Assert.Equal(virtualMethodBang1Bang0.OwningType, myDerivedType); + } + + private void ResolveInterfaceDispatch_ForMultiGenericTest(MetadataType type, out MethodDesc md1, out MethodDesc md2) + { + var algo = new MetadataVirtualMethodAlgorithm(); + var stringType = _context.GetWellKnownType(WellKnownType.String); + + var bang0Type = _context.GetSignatureVariable(0, false); + var bang1Type = _context.GetSignatureVariable(1, false); + MethodSignature sigBang0Bang1 = new MethodSignature(0, 0, stringType, new TypeDesc[] { bang0Type, bang1Type }); + MethodSignature sigBang1Bang0 = new MethodSignature(0, 0, stringType, new TypeDesc[] { bang1Type, bang0Type }); + + var iMultiGeneric = type.ExplicitlyImplementedInterfaces.First(); + var method0_1 = iMultiGeneric.GetMethod("Func", sigBang0Bang1); + Assert.NotNull(method0_1); + var method1_0 = iMultiGeneric.GetMethod("Func", sigBang1Bang0); + Assert.NotNull(method1_0); + + md1 = algo.ResolveInterfaceMethodToVirtualMethodOnType(method0_1, type); + md2 = algo.ResolveInterfaceMethodToVirtualMethodOnType(method1_0, type); + Assert.NotNull(md1); + Assert.NotNull(md2); + } + + [Fact] + public void TestExactMethodImplGenericDeclResolutionOnInterfaces() + { + var ilModule = _context.GetModuleForSimpleName("ILTestAssembly"); + var intType = _context.GetWellKnownType(WellKnownType.Int32); + var bang0Type = _context.GetSignatureVariable(0, false); + var bang1Type = _context.GetSignatureVariable(1, false); + + var implementorType = ilModule.GetType("MethodImplOverride1", "Implementor`2").MakeInstantiatedType(intType, intType); + var partialIntImplementorType = ilModule.GetType("MethodImplOverride1", "PartialIntImplementor`1").MakeInstantiatedType(intType); + var intImplementorType = ilModule.GetType("MethodImplOverride1", "IntImplementor"); + + ResolveInterfaceDispatch_ForMultiGenericTest(implementorType, out var md1, out var md2); + Assert.Equal(bang0Type, md1.GetTypicalMethodDefinition().Signature[0]); + Assert.Equal(bang1Type, md1.GetTypicalMethodDefinition().Signature[1]); + Assert.Equal(bang1Type, md2.GetTypicalMethodDefinition().Signature[0]); + Assert.Equal(bang0Type, md2.GetTypicalMethodDefinition().Signature[1]); + + ResolveInterfaceDispatch_ForMultiGenericTest(partialIntImplementorType, out md1, out md2); + Assert.Equal(bang0Type, md1.GetTypicalMethodDefinition().Signature[0]); + Assert.Equal(intType, md1.GetTypicalMethodDefinition().Signature[1]); + Assert.Equal(intType, md2.GetTypicalMethodDefinition().Signature[0]); + Assert.Equal(bang0Type, md2.GetTypicalMethodDefinition().Signature[1]); + + ResolveInterfaceDispatch_ForMultiGenericTest(intImplementorType, out md1, out md2); + Assert.Contains("!0,!1", md1.Name); + Assert.Contains("!1,!0", md2.Name); + } + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/WellKnownTypeTests.cs b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/WellKnownTypeTests.cs new file mode 100644 index 000000000000..3f2f4c2b4d31 --- /dev/null +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/WellKnownTypeTests.cs @@ -0,0 +1,109 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Internal.TypeSystem; + +using Xunit; + +namespace TypeSystemTests +{ + public class WellKnownTypeTests + { + private TestTypeSystemContext _context; + private ModuleDesc _testModule; + + public WellKnownTypeTests() + { + _context = new TestTypeSystemContext(TargetArchitecture.X64); + var systemModule = _context.CreateModuleForSimpleName("CoreTestAssembly"); + _context.SetSystemModule(systemModule); + + _testModule = systemModule; + } + + [Fact] + public void TestIsValueType() + { + Assert.True(_context.GetWellKnownType(WellKnownType.Boolean).IsValueType); + Assert.True(_context.GetWellKnownType(WellKnownType.Char).IsValueType); + Assert.True(_context.GetWellKnownType(WellKnownType.SByte).IsValueType); + Assert.True(_context.GetWellKnownType(WellKnownType.Byte).IsValueType); + Assert.True(_context.GetWellKnownType(WellKnownType.Int16).IsValueType); + Assert.True(_context.GetWellKnownType(WellKnownType.UInt16).IsValueType); + Assert.True(_context.GetWellKnownType(WellKnownType.Int32).IsValueType); + Assert.True(_context.GetWellKnownType(WellKnownType.UInt32).IsValueType); + Assert.True(_context.GetWellKnownType(WellKnownType.Int64).IsValueType); + Assert.True(_context.GetWellKnownType(WellKnownType.UInt64).IsValueType); + Assert.True(_context.GetWellKnownType(WellKnownType.IntPtr).IsValueType); + Assert.True(_context.GetWellKnownType(WellKnownType.UIntPtr).IsValueType); + Assert.True(_context.GetWellKnownType(WellKnownType.Single).IsValueType); + Assert.True(_context.GetWellKnownType(WellKnownType.Double).IsValueType); + Assert.False(_context.GetWellKnownType(WellKnownType.ValueType).IsValueType); + Assert.False(_context.GetWellKnownType(WellKnownType.Enum).IsValueType); + Assert.True(_context.GetWellKnownType(WellKnownType.Nullable).IsValueType); + Assert.False(_context.GetWellKnownType(WellKnownType.Object).IsValueType); + Assert.False(_context.GetWellKnownType(WellKnownType.String).IsValueType); + Assert.False(_context.GetWellKnownType(WellKnownType.Array).IsValueType); + Assert.False(_context.GetWellKnownType(WellKnownType.MulticastDelegate).IsValueType); + Assert.True(_context.GetWellKnownType(WellKnownType.RuntimeTypeHandle).IsValueType); + Assert.True(_context.GetWellKnownType(WellKnownType.RuntimeMethodHandle).IsValueType); + Assert.True(_context.GetWellKnownType(WellKnownType.RuntimeFieldHandle).IsValueType); + Assert.False(_context.GetWellKnownType(WellKnownType.Exception).IsValueType); + } + + [Fact] + public void TestIsPrimitive() + { + Assert.True(_context.GetWellKnownType(WellKnownType.Boolean).IsPrimitive); + Assert.True(_context.GetWellKnownType(WellKnownType.Char).IsPrimitive); + Assert.True(_context.GetWellKnownType(WellKnownType.SByte).IsPrimitive); + Assert.True(_context.GetWellKnownType(WellKnownType.Byte).IsPrimitive); + Assert.True(_context.GetWellKnownType(WellKnownType.Int16).IsPrimitive); + Assert.True(_context.GetWellKnownType(WellKnownType.UInt16).IsPrimitive); + Assert.True(_context.GetWellKnownType(WellKnownType.Int32).IsPrimitive); + Assert.True(_context.GetWellKnownType(WellKnownType.UInt32).IsPrimitive); + Assert.True(_context.GetWellKnownType(WellKnownType.Int64).IsPrimitive); + Assert.True(_context.GetWellKnownType(WellKnownType.UInt64).IsPrimitive); + Assert.True(_context.GetWellKnownType(WellKnownType.IntPtr).IsPrimitive); + Assert.True(_context.GetWellKnownType(WellKnownType.UIntPtr).IsPrimitive); + Assert.True(_context.GetWellKnownType(WellKnownType.Single).IsPrimitive); + Assert.True(_context.GetWellKnownType(WellKnownType.Double).IsPrimitive); + Assert.False(_context.GetWellKnownType(WellKnownType.ValueType).IsPrimitive); + Assert.False(_context.GetWellKnownType(WellKnownType.Enum).IsPrimitive); + Assert.False(_context.GetWellKnownType(WellKnownType.Nullable).IsPrimitive); + Assert.False(_context.GetWellKnownType(WellKnownType.Object).IsPrimitive); + Assert.False(_context.GetWellKnownType(WellKnownType.String).IsPrimitive); + Assert.False(_context.GetWellKnownType(WellKnownType.Array).IsPrimitive); + Assert.False(_context.GetWellKnownType(WellKnownType.MulticastDelegate).IsPrimitive); + Assert.False(_context.GetWellKnownType(WellKnownType.RuntimeTypeHandle).IsPrimitive); + Assert.False(_context.GetWellKnownType(WellKnownType.RuntimeMethodHandle).IsPrimitive); + Assert.False(_context.GetWellKnownType(WellKnownType.RuntimeFieldHandle).IsPrimitive); + Assert.False(_context.GetWellKnownType(WellKnownType.Exception).IsPrimitive); + } + + [Fact] + public void TestPrimitiveSizes() + { + Assert.Equal(1, _context.GetWellKnownType(WellKnownType.Boolean).InstanceFieldSize.AsInt); + Assert.Equal(2, _context.GetWellKnownType(WellKnownType.Char).InstanceFieldSize.AsInt); + Assert.Equal(1, _context.GetWellKnownType(WellKnownType.SByte).InstanceFieldSize.AsInt); + Assert.Equal(1, _context.GetWellKnownType(WellKnownType.Byte).InstanceFieldSize.AsInt); + Assert.Equal(2, _context.GetWellKnownType(WellKnownType.Int16).InstanceFieldSize.AsInt); + Assert.Equal(2, _context.GetWellKnownType(WellKnownType.UInt16).InstanceFieldSize.AsInt); + Assert.Equal(4, _context.GetWellKnownType(WellKnownType.Int32).InstanceFieldSize.AsInt); + Assert.Equal(4, _context.GetWellKnownType(WellKnownType.UInt32).InstanceFieldSize.AsInt); + Assert.Equal(8, _context.GetWellKnownType(WellKnownType.Int64).InstanceFieldSize.AsInt); + Assert.Equal(8, _context.GetWellKnownType(WellKnownType.UInt64).InstanceFieldSize.AsInt); + Assert.Equal(_context.Target.PointerSize, _context.GetWellKnownType(WellKnownType.IntPtr).InstanceFieldSize.AsInt); + Assert.Equal(_context.Target.PointerSize, _context.GetWellKnownType(WellKnownType.UIntPtr).InstanceFieldSize.AsInt); + Assert.Equal(4, _context.GetWellKnownType(WellKnownType.Single).InstanceFieldSize.AsInt); + Assert.Equal(8, _context.GetWellKnownType(WellKnownType.Double).InstanceFieldSize.AsInt); + } + + [Fact] + public void TestModuleType() + { + Assert.True(_testModule.GetGlobalModuleType().IsModuleType); + } + } +} diff --git a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun/ILCompiler.TypeSystem.ReadyToRun.csproj b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun/ILCompiler.TypeSystem.ReadyToRun.csproj index 9b6bb763c6d2..c6266c64df3b 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun/ILCompiler.TypeSystem.ReadyToRun.csproj +++ b/src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun/ILCompiler.TypeSystem.ReadyToRun.csproj @@ -112,9 +112,15 @@ Utilities\AlignmentHelper.cs + + Utilities\ArrayOfTRuntimeInterfacesAlgorithm.cs + TypeSystem\Common\CastingHelper.cs + + TypeSystem\Common\ConstructedTypeRewritingHelpers.cs + TypeSystem\Common\ExplicitLayoutValidator.cs @@ -145,6 +151,9 @@ TypeSystem\Common\ThrowHelper.Common.cs + + TypeSystem\Common\UniversalCanonLayoutAlgorithm.cs + Utilities\CustomAttributeTypeNameFormatter.cs @@ -274,6 +283,9 @@ TypeSystem\Common\TypeHashingAlgorithms.cs + + TypeSystem\Common\TypeSystemConstraintsHelpers.cs + TypeSystem\Common\TypeSystemContext.cs diff --git a/src/coreclr/src/tools/aot/crossgen2.sln b/src/coreclr/src/tools/aot/crossgen2.sln index a22da16873e6..e81eae9c0240 100644 --- a/src/coreclr/src/tools/aot/crossgen2.sln +++ b/src/coreclr/src/tools/aot/crossgen2.sln @@ -10,64 +10,99 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILCompiler.ReadyToRun", "IL EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILCompiler.TypeSystem.ReadyToRun", "ILCompiler.TypeSystem.ReadyToRun\ILCompiler.TypeSystem.ReadyToRun.csproj", "{751583CD-E880-49E1-B3E2-8B1990114CAC}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILCompiler.TypeSystem.ReadyToRun.Tests", "ILCompiler.TypeSystem.ReadyToRun.Tests\ILCompiler.TypeSystem.ReadyToRun.Tests.csproj", "{1043373D-8C14-4224-9E2B-75F0DE645E7E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Checked|Any CPU = Checked|Any CPU Checked|x64 = Checked|x64 Checked|x86 = Checked|x86 + Debug|Any CPU = Debug|Any CPU Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9B928D3E-06AB-45E5-BF79-F374F0AE3B98}.Checked|Any CPU.ActiveCfg = Checked|x86 {9B928D3E-06AB-45E5-BF79-F374F0AE3B98}.Checked|x64.ActiveCfg = Checked|x64 {9B928D3E-06AB-45E5-BF79-F374F0AE3B98}.Checked|x64.Build.0 = Checked|x64 {9B928D3E-06AB-45E5-BF79-F374F0AE3B98}.Checked|x86.ActiveCfg = Checked|x86 {9B928D3E-06AB-45E5-BF79-F374F0AE3B98}.Checked|x86.Build.0 = Checked|x86 + {9B928D3E-06AB-45E5-BF79-F374F0AE3B98}.Debug|Any CPU.ActiveCfg = Debug|x86 {9B928D3E-06AB-45E5-BF79-F374F0AE3B98}.Debug|x64.ActiveCfg = Debug|x64 {9B928D3E-06AB-45E5-BF79-F374F0AE3B98}.Debug|x64.Build.0 = Debug|x64 {9B928D3E-06AB-45E5-BF79-F374F0AE3B98}.Debug|x86.ActiveCfg = Debug|x86 {9B928D3E-06AB-45E5-BF79-F374F0AE3B98}.Debug|x86.Build.0 = Debug|x86 + {9B928D3E-06AB-45E5-BF79-F374F0AE3B98}.Release|Any CPU.ActiveCfg = Release|x86 {9B928D3E-06AB-45E5-BF79-F374F0AE3B98}.Release|x64.ActiveCfg = Release|x64 {9B928D3E-06AB-45E5-BF79-F374F0AE3B98}.Release|x64.Build.0 = Release|x64 {9B928D3E-06AB-45E5-BF79-F374F0AE3B98}.Release|x86.ActiveCfg = Release|x86 {9B928D3E-06AB-45E5-BF79-F374F0AE3B98}.Release|x86.Build.0 = Release|x86 + {FB2D45F2-FA4C-42B2-8E53-3E1F30CF8046}.Checked|Any CPU.ActiveCfg = Checked|x86 {FB2D45F2-FA4C-42B2-8E53-3E1F30CF8046}.Checked|x64.ActiveCfg = Checked|x64 {FB2D45F2-FA4C-42B2-8E53-3E1F30CF8046}.Checked|x64.Build.0 = Checked|x64 {FB2D45F2-FA4C-42B2-8E53-3E1F30CF8046}.Checked|x86.ActiveCfg = Checked|x86 {FB2D45F2-FA4C-42B2-8E53-3E1F30CF8046}.Checked|x86.Build.0 = Checked|x86 + {FB2D45F2-FA4C-42B2-8E53-3E1F30CF8046}.Debug|Any CPU.ActiveCfg = Debug|x86 {FB2D45F2-FA4C-42B2-8E53-3E1F30CF8046}.Debug|x64.ActiveCfg = Debug|x64 {FB2D45F2-FA4C-42B2-8E53-3E1F30CF8046}.Debug|x64.Build.0 = Debug|x64 {FB2D45F2-FA4C-42B2-8E53-3E1F30CF8046}.Debug|x86.ActiveCfg = Debug|x86 {FB2D45F2-FA4C-42B2-8E53-3E1F30CF8046}.Debug|x86.Build.0 = Debug|x86 + {FB2D45F2-FA4C-42B2-8E53-3E1F30CF8046}.Release|Any CPU.ActiveCfg = Release|x86 {FB2D45F2-FA4C-42B2-8E53-3E1F30CF8046}.Release|x64.ActiveCfg = Release|x64 {FB2D45F2-FA4C-42B2-8E53-3E1F30CF8046}.Release|x64.Build.0 = Release|x64 {FB2D45F2-FA4C-42B2-8E53-3E1F30CF8046}.Release|x86.ActiveCfg = Release|x86 {FB2D45F2-FA4C-42B2-8E53-3E1F30CF8046}.Release|x86.Build.0 = Release|x86 + {83A832DE-BF4A-44C4-B361-90F5F88B979B}.Checked|Any CPU.ActiveCfg = Checked|x86 {83A832DE-BF4A-44C4-B361-90F5F88B979B}.Checked|x64.ActiveCfg = Checked|x64 {83A832DE-BF4A-44C4-B361-90F5F88B979B}.Checked|x64.Build.0 = Checked|x64 {83A832DE-BF4A-44C4-B361-90F5F88B979B}.Checked|x86.ActiveCfg = Checked|x86 {83A832DE-BF4A-44C4-B361-90F5F88B979B}.Checked|x86.Build.0 = Checked|x86 + {83A832DE-BF4A-44C4-B361-90F5F88B979B}.Debug|Any CPU.ActiveCfg = Debug|x86 {83A832DE-BF4A-44C4-B361-90F5F88B979B}.Debug|x64.ActiveCfg = Debug|x64 {83A832DE-BF4A-44C4-B361-90F5F88B979B}.Debug|x64.Build.0 = Debug|x64 {83A832DE-BF4A-44C4-B361-90F5F88B979B}.Debug|x86.ActiveCfg = Debug|x86 {83A832DE-BF4A-44C4-B361-90F5F88B979B}.Debug|x86.Build.0 = Debug|x86 + {83A832DE-BF4A-44C4-B361-90F5F88B979B}.Release|Any CPU.ActiveCfg = Release|x86 {83A832DE-BF4A-44C4-B361-90F5F88B979B}.Release|x64.ActiveCfg = Release|x64 {83A832DE-BF4A-44C4-B361-90F5F88B979B}.Release|x64.Build.0 = Release|x64 {83A832DE-BF4A-44C4-B361-90F5F88B979B}.Release|x86.ActiveCfg = Release|x86 {83A832DE-BF4A-44C4-B361-90F5F88B979B}.Release|x86.Build.0 = Release|x86 + {751583CD-E880-49E1-B3E2-8B1990114CAC}.Checked|Any CPU.ActiveCfg = Checked|x86 {751583CD-E880-49E1-B3E2-8B1990114CAC}.Checked|x64.ActiveCfg = Checked|x64 {751583CD-E880-49E1-B3E2-8B1990114CAC}.Checked|x64.Build.0 = Checked|x64 {751583CD-E880-49E1-B3E2-8B1990114CAC}.Checked|x86.ActiveCfg = Checked|x86 {751583CD-E880-49E1-B3E2-8B1990114CAC}.Checked|x86.Build.0 = Checked|x86 + {751583CD-E880-49E1-B3E2-8B1990114CAC}.Debug|Any CPU.ActiveCfg = Debug|x86 {751583CD-E880-49E1-B3E2-8B1990114CAC}.Debug|x64.ActiveCfg = Debug|x64 {751583CD-E880-49E1-B3E2-8B1990114CAC}.Debug|x64.Build.0 = Debug|x64 {751583CD-E880-49E1-B3E2-8B1990114CAC}.Debug|x86.ActiveCfg = Debug|x86 {751583CD-E880-49E1-B3E2-8B1990114CAC}.Debug|x86.Build.0 = Debug|x86 + {751583CD-E880-49E1-B3E2-8B1990114CAC}.Release|Any CPU.ActiveCfg = Release|x86 {751583CD-E880-49E1-B3E2-8B1990114CAC}.Release|x64.ActiveCfg = Release|x64 {751583CD-E880-49E1-B3E2-8B1990114CAC}.Release|x64.Build.0 = Release|x64 {751583CD-E880-49E1-B3E2-8B1990114CAC}.Release|x86.ActiveCfg = Release|x86 {751583CD-E880-49E1-B3E2-8B1990114CAC}.Release|x86.Build.0 = Release|x86 + {1043373D-8C14-4224-9E2B-75F0DE645E7E}.Checked|Any CPU.ActiveCfg = Checked|Any CPU + {1043373D-8C14-4224-9E2B-75F0DE645E7E}.Checked|Any CPU.Build.0 = Checked|Any CPU + {1043373D-8C14-4224-9E2B-75F0DE645E7E}.Checked|x64.ActiveCfg = Checked|x64 + {1043373D-8C14-4224-9E2B-75F0DE645E7E}.Checked|x64.Build.0 = Checked|x64 + {1043373D-8C14-4224-9E2B-75F0DE645E7E}.Checked|x86.ActiveCfg = Checked|Any CPU + {1043373D-8C14-4224-9E2B-75F0DE645E7E}.Checked|x86.Build.0 = Checked|Any CPU + {1043373D-8C14-4224-9E2B-75F0DE645E7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1043373D-8C14-4224-9E2B-75F0DE645E7E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1043373D-8C14-4224-9E2B-75F0DE645E7E}.Debug|x64.ActiveCfg = Debug|x64 + {1043373D-8C14-4224-9E2B-75F0DE645E7E}.Debug|x64.Build.0 = Debug|x64 + {1043373D-8C14-4224-9E2B-75F0DE645E7E}.Debug|x86.ActiveCfg = Debug|Any CPU + {1043373D-8C14-4224-9E2B-75F0DE645E7E}.Debug|x86.Build.0 = Debug|Any CPU + {1043373D-8C14-4224-9E2B-75F0DE645E7E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1043373D-8C14-4224-9E2B-75F0DE645E7E}.Release|Any CPU.Build.0 = Release|Any CPU + {1043373D-8C14-4224-9E2B-75F0DE645E7E}.Release|x64.ActiveCfg = Release|x64 + {1043373D-8C14-4224-9E2B-75F0DE645E7E}.Release|x64.Build.0 = Release|x64 + {1043373D-8C14-4224-9E2B-75F0DE645E7E}.Release|x86.ActiveCfg = Release|Any CPU + {1043373D-8C14-4224-9E2B-75F0DE645E7E}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/coreclr/src/tools/aot/crossgen2/CommandLineOptions.cs b/src/coreclr/src/tools/aot/crossgen2/CommandLineOptions.cs index c0070ab8b9ec..5aeae5245e3e 100644 --- a/src/coreclr/src/tools/aot/crossgen2/CommandLineOptions.cs +++ b/src/coreclr/src/tools/aot/crossgen2/CommandLineOptions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.CommandLine; @@ -43,10 +42,11 @@ public class CommandLineOptions public ReadyToRunMethodLayoutAlgorithm MethodLayout { get; set; } public ReadyToRunFileLayoutAlgorithm FileLayout { get; set; } public int? CustomPESectionAlignment { get; set; } + public bool VerifyTypeAndFieldLayout { get; set; } public string SingleMethodTypeName { get; set; } public string SingleMethodName { get; set; } - public string[] SingleMethodGenericArgs { get; set; } + public string[] SingleMethodGenericArg { get; set; } public string[] CodegenOptions { get; set; } @@ -198,6 +198,10 @@ public static Command RootCommand() { Argument = new Argument() }, + new Option(new[] { "--verify-type-and-field-layout" }, SR.VerifyTypeAndFieldLayoutOption) + { + Argument = new Argument() + } }; } } diff --git a/src/coreclr/src/tools/aot/crossgen2/Program.cs b/src/coreclr/src/tools/aot/crossgen2/Program.cs index e1df88322d2a..be483cbda481 100644 --- a/src/coreclr/src/tools/aot/crossgen2/Program.cs +++ b/src/coreclr/src/tools/aot/crossgen2/Program.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; using System.CommandLine; using System.CommandLine.Invocation; using System.Reflection; +using System.Reflection.PortableExecutable; using System.Runtime.InteropServices; using System.Threading.Tasks; @@ -17,6 +17,7 @@ using Internal.CommandLine; using System.Linq; using System.IO; +using System.Reflection.Metadata; namespace ILCompiler { @@ -31,6 +32,7 @@ internal class Program private Dictionary _inputFilePaths = new Dictionary(StringComparer.OrdinalIgnoreCase); private Dictionary _unrootedInputFilePaths = new Dictionary(StringComparer.OrdinalIgnoreCase); private Dictionary _referenceFilePaths = new Dictionary(StringComparer.OrdinalIgnoreCase); + private CompilerTypeSystemContext _typeSystemContext; private Program(CommandLineOptions commandLineOptions) { @@ -289,7 +291,7 @@ private int Run() SharedGenericsMode genericsMode = SharedGenericsMode.CanonicalReferenceTypes; var targetDetails = new TargetDetails(_targetArchitecture, _targetOS, TargetAbi.CoreRT, instructionSetSupport.GetVectorTSimdVector()); - CompilerTypeSystemContext typeSystemContext = new ReadyToRunCompilerContext(targetDetails, genericsMode); + _typeSystemContext = new ReadyToRunCompilerContext(targetDetails, genericsMode); string compositeRootPath = _commandLineOptions.CompositeRootPath?.FullName; @@ -309,7 +311,7 @@ private int Run() { try { - var module = typeSystemContext.GetModuleFromPath(inputFile.Value); + var module = _typeSystemContext.GetModuleFromPath(inputFile.Value); allInputFilePaths.Add(inputFile.Key, inputFile.Value); inputFilePaths.Add(inputFile.Key, inputFile.Value); referenceableModules.Add(module); @@ -329,7 +331,7 @@ private int Run() { try { - var module = typeSystemContext.GetModuleFromPath(unrootedInputFile.Value); + var module = _typeSystemContext.GetModuleFromPath(unrootedInputFile.Value); if (!allInputFilePaths.ContainsKey(unrootedInputFile.Key)) { allInputFilePaths.Add(unrootedInputFile.Key, unrootedInputFile.Value); @@ -347,8 +349,10 @@ private int Run() } } - typeSystemContext.InputFilePaths = allInputFilePaths; - typeSystemContext.ReferenceFilePaths = _referenceFilePaths; + CheckManagedCppInputFiles(allInputFilePaths.Values); + + _typeSystemContext.InputFilePaths = allInputFilePaths; + _typeSystemContext.ReferenceFilePaths = _referenceFilePaths; List inputModules = new List(); List rootingModules = new List(); @@ -356,7 +360,7 @@ private int Run() foreach (var inputFile in inputFilePaths) { - EcmaModule module = typeSystemContext.GetModuleFromPath(inputFile.Value); + EcmaModule module = _typeSystemContext.GetModuleFromPath(inputFile.Value); inputModules.Add(module); rootingModules.Add(module); versionBubbleModulesHash.Add(module); @@ -369,23 +373,30 @@ private int Run() foreach (var unrootedInputFile in unrootedInputFilePaths) { - EcmaModule module = typeSystemContext.GetModuleFromPath(unrootedInputFile.Value); + EcmaModule module = _typeSystemContext.GetModuleFromPath(unrootedInputFile.Value); inputModules.Add(module); versionBubbleModulesHash.Add(module); } string systemModuleName = _commandLineOptions.SystemModule ?? DefaultSystemModule; - typeSystemContext.SetSystemModule((EcmaModule)typeSystemContext.GetModuleForSimpleName(systemModuleName)); + _typeSystemContext.SetSystemModule((EcmaModule)_typeSystemContext.GetModuleForSimpleName(systemModuleName)); - if (typeSystemContext.InputFilePaths.Count == 0) + if (_typeSystemContext.InputFilePaths.Count == 0) + { + if (_commandLineOptions.InputFilePaths.Count() > 0) + { + Console.WriteLine(SR.InputWasNotLoadable); + return 2; + } throw new CommandLineException(SR.NoInputFiles); + } // // Initialize compilation group and compilation roots // // Single method mode? - MethodDesc singleMethod = CheckAndParseSingleMethodModeArguments(typeSystemContext); + MethodDesc singleMethod = CheckAndParseSingleMethodModeArguments(_typeSystemContext); var logger = new Logger(Console.Out, _commandLineOptions.Verbose); @@ -402,7 +413,7 @@ private int Run() { try { - EcmaModule module = typeSystemContext.GetModuleFromPath(referenceFile); + EcmaModule module = _typeSystemContext.GetModuleFromPath(referenceFile); if (versionBubbleModulesHash.Contains(module)) { // Ignore reference assemblies that have also been passed as inputs @@ -431,7 +442,7 @@ private int Run() { // Compiling just a single method compilationGroup = new SingleMethodCompilationModuleGroup( - typeSystemContext, + _typeSystemContext, _commandLineOptions.Composite, _commandLineOptions.InputBubble, inputModules, @@ -443,7 +454,7 @@ private int Run() else if (_commandLineOptions.CompileNoMethods) { compilationGroup = new NoMethodsCompilationModuleGroup( - typeSystemContext, + _typeSystemContext, _commandLineOptions.Composite, _commandLineOptions.InputBubble, inputModules, @@ -454,7 +465,7 @@ private int Run() { // Single assembly compilation. compilationGroup = new ReadyToRunSingleAssemblyCompilationModuleGroup( - typeSystemContext, + _typeSystemContext, _commandLineOptions.Composite, _commandLineOptions.InputBubble, inputModules, @@ -470,7 +481,7 @@ private int Run() versionBubbleModules, _commandLineOptions.CompileBubbleGenerics ? inputModules[0] : null, mibcFiles, - typeSystemContext, + _typeSystemContext, compilationGroup); if (_commandLineOptions.Partial) @@ -500,7 +511,7 @@ private int Run() // ReadyToRunCodegenCompilationBuilder builder = new ReadyToRunCodegenCompilationBuilder( - typeSystemContext, compilationGroup, allInputFilePaths.Values, compositeRootPath); + _typeSystemContext, compilationGroup, allInputFilePaths.Values, compositeRootPath); string compilationUnitPrefix = ""; builder.UseCompilationUnitPrefix(compilationUnitPrefix); @@ -519,6 +530,7 @@ private int Run() .UseJitPath(_commandLineOptions.JitPath) .UseInstructionSetSupport(instructionSetSupport) .UseCustomPESectionAlignment(_commandLineOptions.CustomPESectionAlignment) + .UseVerifyTypeAndFieldLayout(_commandLineOptions.VerifyTypeAndFieldLayout) .GenerateOutputFile(_commandLineOptions.OutputFilePath.FullName) .UseILProvider(ilProvider) .UseBackendOptions(_commandLineOptions.CodegenOptions) @@ -539,6 +551,18 @@ private int Run() return 0; } + private void CheckManagedCppInputFiles(IEnumerable inputPaths) + { + foreach (string inputFilePath in inputPaths) + { + EcmaModule module = _typeSystemContext.GetModuleFromPath(inputFilePath); + if ((module.PEReader.PEHeaders.CorHeader.Flags & (CorFlags.ILLibrary | CorFlags.ILOnly)) == (CorFlags)0) + { + throw new CommandLineException(string.Format(SR.ManagedCppNotSupported, inputFilePath)); + } + } + } + private TypeDesc FindType(CompilerTypeSystemContext context, string typeName) { ModuleDesc systemModule = context.SystemModule; @@ -556,7 +580,7 @@ private TypeDesc FindType(CompilerTypeSystemContext context, string typeName) private MethodDesc CheckAndParseSingleMethodModeArguments(CompilerTypeSystemContext context) { - if (_commandLineOptions.SingleMethodName == null && _commandLineOptions.SingleMethodTypeName == null && _commandLineOptions.SingleMethodGenericArgs == null) + if (_commandLineOptions.SingleMethodName == null && _commandLineOptions.SingleMethodTypeName == null && _commandLineOptions.SingleMethodGenericArg == null) return null; if (_commandLineOptions.SingleMethodName == null || _commandLineOptions.SingleMethodTypeName == null) @@ -569,8 +593,8 @@ private MethodDesc CheckAndParseSingleMethodModeArguments(CompilerTypeSystemCont if (method == null) throw new CommandLineException(string.Format(SR.MethodNotFoundOnType, _commandLineOptions.SingleMethodName, _commandLineOptions.SingleMethodTypeName)); - if (method.HasInstantiation != (_commandLineOptions.SingleMethodGenericArgs != null) || - (method.HasInstantiation && (method.Instantiation.Length != _commandLineOptions.SingleMethodGenericArgs.Length))) + if (method.HasInstantiation != (_commandLineOptions.SingleMethodGenericArg != null) || + (method.HasInstantiation && (method.Instantiation.Length != _commandLineOptions.SingleMethodGenericArg.Length))) { throw new CommandLineException( string.Format(SR.GenericArgCountMismatch, method.Instantiation.Length, _commandLineOptions.SingleMethodName, _commandLineOptions.SingleMethodTypeName)); @@ -579,7 +603,7 @@ private MethodDesc CheckAndParseSingleMethodModeArguments(CompilerTypeSystemCont if (method.HasInstantiation) { List genericArguments = new List(); - foreach (var argString in _commandLineOptions.SingleMethodGenericArgs) + foreach (var argString in _commandLineOptions.SingleMethodGenericArg) genericArguments.Add(FindType(context, argString)); method = method.MakeInstantiatedMethod(genericArguments.ToArray()); } diff --git a/src/coreclr/src/tools/aot/crossgen2/Properties/Resources.resx b/src/coreclr/src/tools/aot/crossgen2/Properties/Resources.resx index 3c1f25a1bfac..c34c27bcad1f 100644 --- a/src/coreclr/src/tools/aot/crossgen2/Properties/Resources.resx +++ b/src/coreclr/src/tools/aot/crossgen2/Properties/Resources.resx @@ -177,6 +177,9 @@ Output filename must be specified (/out <file>) + + No input files are loadable + No input files specified @@ -276,4 +279,10 @@ Logical root folder for composite builds; defaults to directory of 1st input file. + + Error: managed C++ is not supported: '{0}' + + + Verify that struct type layout and field offsets match between compile time and runtime. Use only for diagnostic purposes. + \ No newline at end of file diff --git a/src/coreclr/src/tools/aot/crossgen2/crossgen2.csproj b/src/coreclr/src/tools/aot/crossgen2/crossgen2.csproj index 05051a5cd6e6..b1e2d5a25130 100644 --- a/src/coreclr/src/tools/aot/crossgen2/crossgen2.csproj +++ b/src/coreclr/src/tools/aot/crossgen2/crossgen2.csproj @@ -100,8 +100,17 @@ - + + + .a + .lib + + + + + + diff --git a/src/coreclr/src/tools/aot/jitinterface/corinfoexception.cpp b/src/coreclr/src/tools/aot/jitinterface/corinfoexception.cpp index 124080f9b82b..1487f5a68713 100644 --- a/src/coreclr/src/tools/aot/jitinterface/corinfoexception.cpp +++ b/src/coreclr/src/tools/aot/jitinterface/corinfoexception.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "corinfoexception.h" #include "dllexport.h" diff --git a/src/coreclr/src/tools/aot/jitinterface/corinfoexception.h b/src/coreclr/src/tools/aot/jitinterface/corinfoexception.h index c8bcc8045ff8..f16813b9b7df 100644 --- a/src/coreclr/src/tools/aot/jitinterface/corinfoexception.h +++ b/src/coreclr/src/tools/aot/jitinterface/corinfoexception.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include diff --git a/src/coreclr/src/tools/aot/jitinterface/dllexport.h b/src/coreclr/src/tools/aot/jitinterface/dllexport.h index 428c63fb7026..4772e282d3b5 100644 --- a/src/coreclr/src/tools/aot/jitinterface/dllexport.h +++ b/src/coreclr/src/tools/aot/jitinterface/dllexport.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // *** diff --git a/src/coreclr/src/tools/aot/jitinterface/jithost.cpp b/src/coreclr/src/tools/aot/jitinterface/jithost.cpp index d068e814f92d..20e5e223860c 100644 --- a/src/coreclr/src/tools/aot/jitinterface/jithost.cpp +++ b/src/coreclr/src/tools/aot/jitinterface/jithost.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include diff --git a/src/coreclr/src/tools/aot/jitinterface/jitinterface.cpp b/src/coreclr/src/tools/aot/jitinterface/jitinterface.cpp index 4d4bf9090518..74b5a9cc64a5 100644 --- a/src/coreclr/src/tools/aot/jitinterface/jitinterface.cpp +++ b/src/coreclr/src/tools/aot/jitinterface/jitinterface.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include #include diff --git a/src/coreclr/src/tools/aot/jitinterface/jitinterface.h b/src/coreclr/src/tools/aot/jitinterface/jitinterface.h index 88144e0bb845..70a85d3fa390 100644 --- a/src/coreclr/src/tools/aot/jitinterface/jitinterface.h +++ b/src/coreclr/src/tools/aot/jitinterface/jitinterface.h @@ -1,7 +1,5 @@ - // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // DO NOT EDIT THIS FILE! It IS AUTOGENERATED #include "corinfoexception.h" @@ -78,7 +76,7 @@ struct JitInterfaceCallbacks bool (* getReadyToRunHelper)(void * thisHandle, CorInfoException** ppException, void* pResolvedToken, void* pGenericLookupKind, int id, void* pLookup); void (* getReadyToRunDelegateCtorHelper)(void * thisHandle, CorInfoException** ppException, void* pTargetMethod, void* delegateType, void* pLookup); const char* (* getHelperName)(void * thisHandle, CorInfoException** ppException, int helpFunc); - int (* initClass)(void * thisHandle, CorInfoException** ppException, void* field, void* method, void* context, int speculative); + int (* initClass)(void * thisHandle, CorInfoException** ppException, void* field, void* method, void* context); void (* classMustBeLoadedBeforeCodeIsRun)(void * thisHandle, CorInfoException** ppException, void* cls); void* (* getBuiltinClass)(void * thisHandle, CorInfoException** ppException, int classId); int (* getTypeForPrimitiveValueClass)(void * thisHandle, CorInfoException** ppException, void* cls); @@ -790,10 +788,10 @@ class JitInterfaceWrapper return _ret; } - virtual int initClass(void* field, void* method, void* context, int speculative) + virtual int initClass(void* field, void* method, void* context) { CorInfoException* pException = nullptr; - int _ret = _callbacks->initClass(_thisHandle, &pException, field, method, context, speculative); + int _ret = _callbacks->initClass(_thisHandle, &pException, field, method, context); if (pException != nullptr) throw pException; return _ret; diff --git a/src/coreclr/src/tools/aot/jitinterface/jitwrapper.cpp b/src/coreclr/src/tools/aot/jitinterface/jitwrapper.cpp index e9918b307b20..b4b51185a1f4 100644 --- a/src/coreclr/src/tools/aot/jitinterface/jitwrapper.cpp +++ b/src/coreclr/src/tools/aot/jitinterface/jitwrapper.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include #include @@ -27,11 +26,11 @@ class CORJIT_FLAGS uint64_t corJitFlags; }; -static const GUID JITEEVersionIdentifier = { /* 2ca8d539-5db9-4831-8f1b-ade425f036bd */ - 0x2ca8d539, - 0x5db9, - 0x4831, - { 0x8f, 0x1b, 0xad, 0xe4, 0x25, 0xf0, 0x36, 0xbd } +static const GUID JITEEVersionIdentifier = { /* 7af97117-55be-4c76-afb2-e26261cb140e */ + 0x7af97117, + 0x55be, + 0x4c76, + { 0xaf, 0xb2, 0xe2, 0x62, 0x61, 0xcb, 0x14, 0x0e } }; class Jit diff --git a/src/coreclr/src/tools/crossgen/Native.rc b/src/coreclr/src/tools/crossgen/Native.rc index 25b5fe5e67c4..c90ad0d19ccf 100644 --- a/src/coreclr/src/tools/crossgen/Native.rc +++ b/src/coreclr/src/tools/crossgen/Native.rc @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #define FX_VER_FILEDESCRIPTION_STR "Microsoft Common Language Runtime native cross compiler\0" diff --git a/src/coreclr/src/tools/crossgen/crossgen.cpp b/src/coreclr/src/tools/crossgen/crossgen.cpp index 622a1e575d82..41da650119d8 100644 --- a/src/coreclr/src/tools/crossgen/crossgen.cpp +++ b/src/coreclr/src/tools/crossgen/crossgen.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // TO DO: we currently use raw printf() for output. Maybe we need to pick up something like ngen's Output() handling diff --git a/src/coreclr/src/tools/dotnet-pgo/Logger.cs b/src/coreclr/src/tools/dotnet-pgo/Logger.cs index 814eea144d26..4bdd8cb19ce7 100644 --- a/src/coreclr/src/tools/dotnet-pgo/Logger.cs +++ b/src/coreclr/src/tools/dotnet-pgo/Logger.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/dotnet-pgo/Microsoft.Diagnostics.JitTrace/JitTraceRuntime.cs b/src/coreclr/src/tools/dotnet-pgo/Microsoft.Diagnostics.JitTrace/JitTraceRuntime.cs index a3898438e780..68a0febb281d 100644 --- a/src/coreclr/src/tools/dotnet-pgo/Microsoft.Diagnostics.JitTrace/JitTraceRuntime.cs +++ b/src/coreclr/src/tools/dotnet-pgo/Microsoft.Diagnostics.JitTrace/JitTraceRuntime.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -270,4 +269,4 @@ IEnumerable MethodsThatMatch() } } } -} \ No newline at end of file +} diff --git a/src/coreclr/src/tools/dotnet-pgo/ModuleLoadLogger.cs b/src/coreclr/src/tools/dotnet-pgo/ModuleLoadLogger.cs index 170fca801f29..122d28c89ec2 100644 --- a/src/coreclr/src/tools/dotnet-pgo/ModuleLoadLogger.cs +++ b/src/coreclr/src/tools/dotnet-pgo/ModuleLoadLogger.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/dotnet-pgo/PgoTraceProcess.cs b/src/coreclr/src/tools/dotnet-pgo/PgoTraceProcess.cs index e096d7355794..6205b0c221ab 100644 --- a/src/coreclr/src/tools/dotnet-pgo/PgoTraceProcess.cs +++ b/src/coreclr/src/tools/dotnet-pgo/PgoTraceProcess.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/dotnet-pgo/Program.cs b/src/coreclr/src/tools/dotnet-pgo/Program.cs index dfad6755e6f5..96c346dd11ac 100644 --- a/src/coreclr/src/tools/dotnet-pgo/Program.cs +++ b/src/coreclr/src/tools/dotnet-pgo/Program.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Internal.TypeSystem; using Internal.TypeSystem.Ecma; diff --git a/src/coreclr/src/tools/dotnet-pgo/R2RSignatureTypeProvider.cs b/src/coreclr/src/tools/dotnet-pgo/R2RSignatureTypeProvider.cs index 52afa7745de1..0bc52929256b 100644 --- a/src/coreclr/src/tools/dotnet-pgo/R2RSignatureTypeProvider.cs +++ b/src/coreclr/src/tools/dotnet-pgo/R2RSignatureTypeProvider.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Immutable; using System.Linq; diff --git a/src/coreclr/src/tools/dotnet-pgo/TraceRuntimeDescToTypeSystemDesc.cs b/src/coreclr/src/tools/dotnet-pgo/TraceRuntimeDescToTypeSystemDesc.cs index d86570a20668..cb1816a26e07 100644 --- a/src/coreclr/src/tools/dotnet-pgo/TraceRuntimeDescToTypeSystemDesc.cs +++ b/src/coreclr/src/tools/dotnet-pgo/TraceRuntimeDescToTypeSystemDesc.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Diagnostics.Tracing.Etlx; using System; diff --git a/src/coreclr/src/tools/dotnet-pgo/TraceTypeSystemContext.cs b/src/coreclr/src/tools/dotnet-pgo/TraceTypeSystemContext.cs index aa2503e90792..7371f92600c8 100644 --- a/src/coreclr/src/tools/dotnet-pgo/TraceTypeSystemContext.cs +++ b/src/coreclr/src/tools/dotnet-pgo/TraceTypeSystemContext.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/coreclr/src/tools/dotnet-pgo/TypeSystemMetadataEmitter.cs b/src/coreclr/src/tools/dotnet-pgo/TypeSystemMetadataEmitter.cs index bf2802acbd53..971eca877059 100644 --- a/src/coreclr/src/tools/dotnet-pgo/TypeSystemMetadataEmitter.cs +++ b/src/coreclr/src/tools/dotnet-pgo/TypeSystemMetadataEmitter.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -462,6 +461,10 @@ void EncodeMethodSignature(BlobBuilder signatureBuilder, MethodSignature sig, Em case MethodSignatureFlags.UnmanagedCallingConventionThisCall: sigCallingConvention = SignatureCallingConvention.ThisCall; break; + case MethodSignatureFlags.UnmanagedCallingConvention: + // [TODO] sigCallingConvention = SignatureCallingConvention.Unmanaged; + sigCallingConvention = (SignatureCallingConvention)9; + break; } signatureEncoder.MethodSignature(sigCallingConvention, genericParameterCount, isInstanceMethod); diff --git a/src/coreclr/src/tools/metainfo/Native.rc b/src/coreclr/src/tools/metainfo/Native.rc index fbe8437475c6..eebbf957180c 100644 --- a/src/coreclr/src/tools/metainfo/Native.rc +++ b/src/coreclr/src/tools/metainfo/Native.rc @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #define FX_VER_FILEDESCRIPTION_STR "Microsoft Common Language Runtime Metadata Info\0" diff --git a/src/coreclr/src/tools/metainfo/mdinfo.cpp b/src/coreclr/src/tools/metainfo/mdinfo.cpp index e04134b86fdd..6ddf1ea96be3 100644 --- a/src/coreclr/src/tools/metainfo/mdinfo.cpp +++ b/src/coreclr/src/tools/metainfo/mdinfo.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include #include diff --git a/src/coreclr/src/tools/metainfo/mdinfo.h b/src/coreclr/src/tools/metainfo/mdinfo.h index fbdc20efacc9..04002fdb267f 100644 --- a/src/coreclr/src/tools/metainfo/mdinfo.h +++ b/src/coreclr/src/tools/metainfo/mdinfo.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _mdinfo_h #define _mdinfo_h diff --git a/src/coreclr/src/tools/metainfo/mdobj.cpp b/src/coreclr/src/tools/metainfo/mdobj.cpp index dde1bf6ed3f0..7a2b39ac8184 100644 --- a/src/coreclr/src/tools/metainfo/mdobj.cpp +++ b/src/coreclr/src/tools/metainfo/mdobj.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include #include diff --git a/src/coreclr/src/tools/metainfo/metainfo.cpp b/src/coreclr/src/tools/metainfo/metainfo.cpp index f73de31371f3..38499bea47e1 100644 --- a/src/coreclr/src/tools/metainfo/metainfo.cpp +++ b/src/coreclr/src/tools/metainfo/metainfo.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include #include diff --git a/src/coreclr/src/tools/r2rdump/CommandLineOptions.cs b/src/coreclr/src/tools/r2rdump/CommandLineOptions.cs index 6b3f53aa6ce3..f41ffd43744a 100644 --- a/src/coreclr/src/tools/r2rdump/CommandLineOptions.cs +++ b/src/coreclr/src/tools/r2rdump/CommandLineOptions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.CommandLine; using System.IO; diff --git a/src/coreclr/src/tools/r2rdump/CoreDisTools.cs b/src/coreclr/src/tools/r2rdump/CoreDisTools.cs index 1f41eab41af6..e21e87c4282f 100644 --- a/src/coreclr/src/tools/r2rdump/CoreDisTools.cs +++ b/src/coreclr/src/tools/r2rdump/CoreDisTools.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using ILCompiler.Reflection.ReadyToRun; using System; using System.Collections.Generic; +using System.Diagnostics; using System.Reflection.PortableExecutable; using System.Runtime.InteropServices; using System.Text; @@ -53,6 +53,7 @@ public unsafe static int GetInstruction(IntPtr Disasm, RuntimeFunction rtf, int } IntPtr pBuffer = GetOutputBuffer(); instr = Marshal.PtrToStringAnsi(pBuffer); + ClearOutputBuffer(); return instrSize; } @@ -96,6 +97,11 @@ public class Disassembler : IDisposable /// private const int NakedWithOffsetIndentation = 11; + /// + /// Indentation of instruction comments. + /// + private const int CommentIndentation = 62; + /// /// R2R reader is used to access architecture info, the PE image data and symbol table. /// @@ -111,6 +117,16 @@ public class Disassembler : IDisposable /// private readonly IntPtr _disasm; + /// + /// ARM64: The image offset of the ADD instruction in an ADRP+ADD pair. + /// + private int _addInstructionOffset; + + /// + /// ARM64: The target of the ADD instruction in an ADRP+ADD pair. + /// + private int _addInstructionTarget; + /// /// Indentation of instruction mnemonics. /// @@ -206,7 +222,6 @@ public int GetInstruction(RuntimeFunction rtf, int imageOffset, int rtfOffset, o } int instrSize = CoreDisTools.GetInstruction(_disasm, rtf, imageOffset, rtfOffset, _reader.Image, out instruction); - CoreDisTools.ClearOutputBuffer(); // CoreDisTools dumps instructions in the following format: // @@ -303,34 +318,43 @@ public int GetInstruction(RuntimeFunction rtf, int imageOffset, int rtfOffset, o builder.Append(line.Replace('\t', ' ')); } - builder.Append('\n'); - lineNum++; - lineStartIndex = builder.Length; - } + string translatedLine = builder.ToString(lineStartIndex, builder.Length - lineStartIndex); + string fixedTranslatedLine = translatedLine; - instruction = builder.ToString(); + switch (_reader.Machine) + { + case Machine.Amd64: + ProbeX64Quirks(rtf, imageOffset, rtfOffset, instrSize, ref fixedTranslatedLine); + break; - switch (_reader.Machine) - { - case Machine.Amd64: - ProbeX64Quirks(rtf, imageOffset, rtfOffset, instrSize, ref instruction); - break; + case Machine.I386: + ProbeX86Quirks(rtf, imageOffset, rtfOffset, instrSize, ref fixedTranslatedLine); + break; - case Machine.I386: - ProbeX86Quirks(rtf, imageOffset, rtfOffset, instrSize, ref instruction); - break; + case Machine.Arm64: + ProbeArm64Quirks(rtf, imageOffset, rtfOffset, ref fixedTranslatedLine); + break; - case Machine.ArmThumb2: - break; + case Machine.ArmThumb2: + break; - case Machine.Arm64: - break; + default: + break; + } - default: - throw new NotImplementedException(); + // If the translated line has been changed, replace it in the builder + if (!object.ReferenceEquals(fixedTranslatedLine, translatedLine)) + { + builder.Length = lineStartIndex; + builder.Append(fixedTranslatedLine); + } + + builder.Append(Environment.NewLine); + lineNum++; + lineStartIndex = builder.Length; } - instruction = instruction.Replace("\n", Environment.NewLine); + instruction = builder.ToString(); return instrSize; } @@ -352,13 +376,14 @@ private void ProbeX64Quirks(RuntimeFunction rtf, int imageOffset, int rtfOffset, if (TryParseRipRelative(instruction, out leftBracket, out rightBracketPlusOne, out displacement)) { int target = rtf.StartAddress + rtfOffset + instrSize + displacement; - int newline = instruction.LastIndexOf('\n'); StringBuilder translated = new StringBuilder(); translated.Append(instruction, 0, leftBracket); + + _reader.ImportCellNames.TryGetValue(target, out string targetName); + if (_options.Naked) { - String targetName; - if (_reader.ImportCellNames.TryGetValue(target, out targetName)) + if (targetName != null) { translated.AppendFormat("[{0}]", targetName); } @@ -366,17 +391,18 @@ private void ProbeX64Quirks(RuntimeFunction rtf, int imageOffset, int rtfOffset, { translated.AppendFormat("[0x{0:x4}]", target); } + translated.Append(instruction, rightBracketPlusOne, instruction.Length - rightBracketPlusOne); } else { translated.AppendFormat("[0x{0:x4}]", target); - - AppendImportCellName(translated, target); + translated.Append(instruction, rightBracketPlusOne, instruction.Length - rightBracketPlusOne); + if (targetName != null) + { + AppendComment(translated, targetName); + } } - translated.Append(instruction, rightBracketPlusOne, newline - rightBracketPlusOne); - - translated.Append(instruction, newline, instruction.Length - newline); instruction = translated.ToString(); } else @@ -400,14 +426,16 @@ private void ProbeX86Quirks(RuntimeFunction rtf, int imageOffset, int rtfOffset, int absoluteAddress; if (TryParseRipRelative(instruction, out leftBracket, out rightBracketPlusOne, out absoluteAddress)) { - int target = absoluteAddress - (int)_reader.PEReader.PEHeaders.PEHeader.ImageBase; + int target = absoluteAddress - (int)_reader.ImageBase; StringBuilder translated = new StringBuilder(); translated.Append(instruction, 0, leftBracket); + + _reader.ImportCellNames.TryGetValue(target, out string targetName); + if (_options.Naked) { - String targetName; - if (_reader.ImportCellNames.TryGetValue(target, out targetName)) + if (targetName != null) { translated.AppendFormat("[{0}]", targetName); } @@ -415,12 +443,16 @@ private void ProbeX86Quirks(RuntimeFunction rtf, int imageOffset, int rtfOffset, { translated.AppendFormat("[0x{0:x4}]", target); } + translated.Append(instruction, rightBracketPlusOne, instruction.Length - rightBracketPlusOne); } else { translated.AppendFormat("[0x{0:x4}]", target); - - AppendImportCellName(translated, target); + translated.Append(instruction, rightBracketPlusOne, instruction.Length - rightBracketPlusOne); + if (targetName != null) + { + AppendComment(translated, targetName); + } } translated.Append(instruction, rightBracketPlusOne, instruction.Length - rightBracketPlusOne); @@ -474,10 +506,8 @@ private void ProbeCommonIntelQuirks(RuntimeFunction rtf, int imageOffset, int rt ReplaceRelativeOffset(ref instruction, targetRVA, rtf); if (haveImportCell) { - int instructionEnd = instruction.IndexOf('\n'); - StringBuilder builder = new StringBuilder(instruction, 0, instructionEnd, capacity: 256); - AppendComment(builder, @$"JMP [0x{thunkTargetRVA:X4}]: {importCellName}"); - builder.AppendLine(); + StringBuilder builder = new StringBuilder(instruction, capacity: 256); + AppendComment(builder, @$"JMP [0x{thunkTargetRVA:x4}]: {importCellName}"); instruction = builder.ToString(); } } @@ -493,16 +523,14 @@ private void ProbeCommonIntelQuirks(RuntimeFunction rtf, int imageOffset, int rt else { ReplaceRelativeOffset(ref instruction, targetRVA, rtf); - int instructionEnd = instruction.IndexOf('\n'); - StringBuilder builder = new StringBuilder(instruction, 0, instructionEnd, capacity: 256); + StringBuilder builder = new StringBuilder(instruction,capacity: 256); AppendComment(builder, runtimeFunctionName); - builder.AppendLine(); instruction = builder.ToString(); } } else { - ReplaceRelativeOffset(ref instruction, nextInstructionRVA + offset, rtf); + ReplaceRelativeOffset(ref instruction, targetRVA, rtf); } } else if (instrSize == 6 && IsIntel2ByteJumpInstructionWithIntOffset(imageOffset + rtfOffset)) @@ -520,17 +548,17 @@ private void ProbeCommonIntelQuirks(RuntimeFunction rtf, int imageOffset, int rt /// Index of the right bracket in the instruction plus one /// Value of the IP-relative delta /// - private bool TryParseRipRelative(string instruction, out int leftBracket, out int rightBracket, out int displacement) + private bool TryParseRipRelative(string instruction, out int leftBracket, out int rightBracketPlusOne, out int displacement) { - int relip = instruction.IndexOf(RelIPTag); + int relip = instruction.IndexOf(RelIPTag, StringComparison.Ordinal); if (relip >= 0 && instruction.Length >= relip + RelIPTag.Length + 3) { int start = relip; relip += RelIPTag.Length; char sign = instruction[relip]; - if (sign == '+' || sign == '-' && + if ((sign == '+' || sign == '-') && instruction[relip + 1] == ' ' && - Char.IsDigit(instruction[relip + 2])) + IsDigit(instruction[relip + 2])) { relip += 2; int offset = 0; @@ -538,7 +566,7 @@ private bool TryParseRipRelative(string instruction, out int leftBracket, out in { offset = 10 * offset + (int)(instruction[relip] - '0'); } - while (++relip < instruction.Length && Char.IsDigit(instruction[relip])); + while (++relip < instruction.Length && IsDigit(instruction[relip])); if (relip < instruction.Length && instruction[relip] == ']') { relip++; @@ -547,7 +575,7 @@ private bool TryParseRipRelative(string instruction, out int leftBracket, out in offset = -offset; } leftBracket = start; - rightBracket = relip; + rightBracketPlusOne = relip; displacement = offset; return true; } @@ -555,39 +583,20 @@ private bool TryParseRipRelative(string instruction, out int leftBracket, out in } leftBracket = 0; - rightBracket = 0; + rightBracketPlusOne = 0; displacement = 0; return false; } - /// - /// Append import cell name to the constructed instruction string as a comment if available. - /// - /// - /// - private void AppendImportCellName(StringBuilder builder, int importCellRva) - { - String targetName; - if (_reader.ImportCellNames.TryGetValue(importCellRva, out targetName)) - { - AppendComment(builder, targetName); - } - } - /// /// Append a given comment to the string builder. /// /// String builder to append comment to /// Comment to append - private void AppendComment(StringBuilder builder, string comment) + private static void AppendComment(StringBuilder builder, string comment) { - int fill = 61 - builder.Length; - if (fill > 0) - { - builder.Append(' ', fill); - } - builder.Append(" // "); - builder.Append(comment); + EnsureIndentation(builder, 0, CommentIndentation); + builder.Append("// ").Append(comment); } /// @@ -601,9 +610,9 @@ private void ReplaceRelativeOffset(ref string instruction, int target, RuntimeFu int outputOffset = target; if (_options.Naked) { - outputOffset -= rtf.StartAddress; + outputOffset = outputOffset - rtf.StartAddress + rtf.CodeOffset; } - ReplaceRelativeOffset(ref instruction, string.Format("0x{0:X4}", outputOffset), rtf); + ReplaceRelativeOffset(ref instruction, string.Format("0x{0:x4}", outputOffset), rtf); } /// @@ -612,14 +621,13 @@ private void ReplaceRelativeOffset(ref string instruction, int target, RuntimeFu /// Disassembled instruction to modify /// String to replace offset with /// Runtime function being disassembled - private void ReplaceRelativeOffset(ref string instruction, string replacementString, RuntimeFunction rtf) + private static void ReplaceRelativeOffset(ref string instruction, string replacementString, RuntimeFunction rtf) { - int numberEnd = instruction.IndexOf('\n'); - int number = numberEnd; + int number = instruction.Length; while (number > 0) { char c = instruction[number - 1]; - if (c >= ' ' && !Char.IsDigit(c) && c != '-') + if (c >= ' ' && !IsDigit(c) && c != '-') { break; } @@ -629,7 +637,6 @@ private void ReplaceRelativeOffset(ref string instruction, string replacementStr StringBuilder translated = new StringBuilder(); translated.Append(instruction, 0, number); translated.Append(replacementString); - translated.Append(instruction, numberEnd, instruction.Length - numberEnd); instruction = translated.ToString(); } @@ -711,6 +718,397 @@ private bool IsIntel2ByteIndirectJumpPCRelativeInstruction(int imageOffset, out return false; } + /// + /// Improves disassembler output for ARM64. + /// + /// Runtime function + /// Offset within the image byte array + /// Offset within the runtime function + /// Textual representation of the instruction + private void ProbeArm64Quirks(RuntimeFunction rtf, int imageOffset, int rtfOffset, ref string instruction) + { + const int InstructionSize = 4; + + // The list of PC-relative instructions: ADR, ADRP, B.cond, B, BL, CBNZ, CBZ, TBNZ, TBZ. + + // Handle an ADR instruction + if (IsArm64AdrInstruction(imageOffset + rtfOffset, out int adrOffset)) + { + ReplaceRelativeOffset(ref instruction, rtf.StartAddress + rtfOffset + adrOffset, rtf); + } + // Handle the ADRP instruction of an ADRP+ADD pair + else if (IsArm64AdrpInstruction(imageOffset + rtfOffset, out uint adrpRegister, out long pageOffset)) + { + int pc = rtf.StartAddress + rtfOffset; + long targetPage = (pc & ~0xfff) + pageOffset; + + if ((0 <= targetPage) && (targetPage <= int.MaxValue) && + IsArm64AddImmediate64NoShiftInstruction(imageOffset + rtfOffset + InstructionSize, out uint addSrcRegister, out uint offset) && + (addSrcRegister == adrpRegister)) + { + int target = (int)targetPage + (int)offset; + _addInstructionOffset = imageOffset + rtfOffset + 4; + _addInstructionTarget = target; + + int hashPos = instruction.LastIndexOf('#'); + var translated = new StringBuilder(); + translated.Append(instruction, 0, hashPos); + + _reader.ImportCellNames.TryGetValue(target, out string targetName); + + if (_options.Naked && (targetName != null)) + { + translated.Append("import_hi21{").Append(targetName).Append('}'); + } + else + { + translated.AppendFormat("#0x{0:x4}", targetPage); + } + + instruction = translated.ToString(); + } + } + // Handle the ADD instruction of an ADRP+ADD pair + else if (imageOffset + rtfOffset == _addInstructionOffset) + { + int target = _addInstructionTarget; + _addInstructionOffset = 0; + _addInstructionTarget = 0; + + int hashPos = instruction.LastIndexOf('#'); + var translated = new StringBuilder(); + translated.Append(instruction, 0, hashPos); + + _reader.ImportCellNames.TryGetValue(target, out string targetName); + + if (_options.Naked && (targetName != null)) + { + translated.Append("import_lo12{").Append(targetName).Append('}'); + } + else + { + translated.AppendFormat("#0x{0:x}", target & 0xfff); + if (targetName != null) + { + AppendComment(translated, "import{" + targetName + "}"); + } + } + + instruction = translated.ToString(); + } + // Handle a B.cond, B, CBZ, CBNZ, TBZ, TBNZ instruction + else if (IsArm64BCondInstruction(imageOffset + rtfOffset, out int branchOffset) || + IsArm64BInstruction(imageOffset + rtfOffset, out branchOffset) || + IsArm64CbzOrCbnzInstruction(imageOffset + rtfOffset, out branchOffset) || + IsArm64TbzOrTbnzInstruction(imageOffset + rtfOffset, out branchOffset)) + { + ReplaceRelativeOffset(ref instruction, rtf.StartAddress + rtfOffset + branchOffset, rtf); + } + // Handle a BL instruction + else if (IsArm64BLInstruction(imageOffset + rtfOffset, out int blOffset)) + { + int blTargetImageOffset = imageOffset + rtfOffset + blOffset; + int blTargetRva = rtf.StartAddress + rtfOffset + blOffset; + + // Search for one of the two patterns below at the BL target: + // 580000ac ldr x12, label + // f940018c ldr x12, [x12] + // d61f0180 br x12 + // or + // 580000a1 ldr x1, label1 + // f9400021 ldr x1, [x1] + // 580000ac ldr x12, label2 + // f940018c ldr x12, [x12] + // d61f0180 br x12 + + if (IsArm64LdrLiteral64Instruction(blTargetImageOffset, out uint ldr1Register, out int ldr1Offset) && + IsArm64LdrImmediate64ZeroOffsetInstruction(blTargetImageOffset + InstructionSize, out uint ldr2DestRegister, out uint ldr2SrcRegister)) + { + int ldr1ImageOffset = blTargetImageOffset; + if (IsArm64LdrLiteral64Instruction(ldr1ImageOffset + InstructionSize * 2, out uint ldr3Register, out int ldr3Offset) && + IsArm64LdrImmediate64ZeroOffsetInstruction(ldr1ImageOffset + InstructionSize * 3, out uint ldr4DestRegister, out uint ldr4SrcRegister)) + { + ldr1ImageOffset += InstructionSize * 2; + ldr1Register = ldr3Register; + ldr1Offset = ldr3Offset; + ldr2DestRegister = ldr4DestRegister; + ldr2SrcRegister = ldr4SrcRegister; + } + + if (IsArm64BrInstruction(ldr1ImageOffset + InstructionSize * 2, out uint brRegister) && + (ldr2SrcRegister == ldr1Register) && + (brRegister == ldr2DestRegister)) + { + int labelOffset = ldr1ImageOffset + ldr1Offset; + int target = checked((int)(BitConverter.ToUInt64(_reader.Image, labelOffset) - _reader.ImageBase)); + _reader.ImportCellNames.TryGetValue(target, out string targetName); + var translated = new StringBuilder(); + + if (_options.Naked && (targetName != null)) + { + int hashPos = instruction.LastIndexOf('#'); + translated.Append(instruction, 0, hashPos); + translated.Append("thunk{").Append(targetName).Append('}'); + } + else + { + ReplaceRelativeOffset(ref instruction, rtf.StartAddress + rtfOffset + blOffset, rtf); + translated.Append(instruction); + if (targetName != null) + { + AppendComment(translated, $"br [0x{target:x4}]: {targetName}"); + } + } + + instruction = translated.ToString(); + } + } + else if (IsAnotherRuntimeFunctionWithinMethod(blTargetRva, rtf, out int runtimeFunctionIndex)) + { + string runtimeFunctionName = string.Format("RUNTIME_FUNCTION[{0}]", runtimeFunctionIndex); + var translated = new StringBuilder(); + + if (_options.Naked) + { + int hashPos = instruction.LastIndexOf('#'); + translated.Append(instruction, 0, hashPos); + translated.Append(runtimeFunctionName); + } + else + { + ReplaceRelativeOffset(ref instruction, blTargetRva, rtf); + translated.Append(instruction); + AppendComment(translated, runtimeFunctionName); + } + + instruction = translated.ToString(); + } + else + { + Debug.Fail("Is this a new pattern that we need to handle?"); + ReplaceRelativeOffset(ref instruction, blTargetRva, rtf); + } + } + } + + /// + /// Determine whether a given instruction is an ADR. + /// + /// Offset within the PE image byte array. + private bool IsArm64AdrInstruction(int imageOffset, out int immediate) + { + byte highByte = _reader.Image[imageOffset + 3]; + if ((highByte & 0x9f) != 0x10) + { + immediate = 0; + return false; + } + + uint instruction = BitConverter.ToUInt32(_reader.Image, imageOffset); + // imm = SignExtend(immhi:immlo, 64) + immediate = (((int)instruction & ~0x1f) | ((int)instruction >> 26) & 0x18) << 8 >> 11; + return true; + } + + /// + /// Determine whether a given instruction is an ADRP. + /// + /// Offset within the PE image byte array. + private bool IsArm64AdrpInstruction(int imageOffset, out uint register, out long immediate) + { + byte highByte = _reader.Image[imageOffset + 3]; + if ((highByte & 0x9f) != 0x90) + { + register = 0; + immediate = 0; + return false; + } + + uint instruction = BitConverter.ToUInt32(_reader.Image, imageOffset); + register = instruction & 0x1f; + // imm = SignExtend(immhi:immlo:Zeros(12), 64) + immediate = (long)unchecked((int)(((instruction ^ register) | (instruction >> 26) & 0x18) << 8)) << 1; + return true; + } + + /// + /// Determine whether a given instruction is an ADD immediate 64-bit with no shift. + /// + /// Offset within the PE image byte array. + private bool IsArm64AddImmediate64NoShiftInstruction(int imageOffset, out uint sourceRegister, out uint immediate) + { + uint instruction = BitConverter.ToUInt32(_reader.Image, imageOffset); + if ((instruction & 0xffc0_0000) != 0x9100_0000) + { + sourceRegister = 0; + immediate = 0; + return false; + } + + sourceRegister = (instruction >> 5) & 0x1f; + // imm = ZeroExtend(imm12, 64) + immediate = instruction << 10 >> 20; + return true; + } + + /// + /// Determine whether a given instruction is a B.cond. + /// + /// Offset within the PE image byte array. + private bool IsArm64BCondInstruction(int imageOffset, out int offset) + { + byte highByte = _reader.Image[imageOffset + 3]; + if (highByte != 0x54) + { + offset = 0; + return false; + } + + uint instruction = BitConverter.ToUInt32(_reader.Image, imageOffset); + if ((instruction & 0x10) != 0) + { + offset = 0; + return false; + } + + // offset = SignExtend(imm19:'00', 64) + offset = ((int)instruction & ~0xf) << 8 >> 11; + return true; + } + + /// + /// Determine whether a given instruction is a B. + /// + /// Offset within the PE image byte array. + private bool IsArm64BInstruction(int imageOffset, out int offset) + { + byte highByte = _reader.Image[imageOffset + 3]; + if ((highByte & 0xfc) != 0x14) + { + offset = 0; + return false; + } + + uint instruction = BitConverter.ToUInt32(_reader.Image, imageOffset); + // offset = SignExtend(imm26:'00', 64) + offset = (int)instruction << 6 >> 4; + return true; + } + + /// + /// Determine whether a given instruction is a CBZ or a CBNZ. + /// + /// Offset within the PE image byte array. + private bool IsArm64CbzOrCbnzInstruction(int imageOffset, out int offset) + { + byte highByte = _reader.Image[imageOffset + 3]; + if ((highByte & 0x7e) != 0x34) + { + offset = 0; + return false; + } + + uint instruction = BitConverter.ToUInt32(_reader.Image, imageOffset); + // offset = SignExtend(imm19:'00', 64) + offset = ((int)instruction & ~0x1f) << 8 >> 11; + return true; + } + + /// + /// Determine whether a given instruction is a TBZ or a TBNZ. + /// + /// Offset within the PE image byte array. + private bool IsArm64TbzOrTbnzInstruction(int imageOffset, out int offset) + { + byte highByte = _reader.Image[imageOffset + 3]; + if ((highByte & 0x7e) != 0x36) + { + offset = 0; + return false; + } + + uint instruction = BitConverter.ToUInt32(_reader.Image, imageOffset); + // offset = SignExtend(imm14:'00', 64) + offset = ((int)instruction & ~0x1f) << 13 >> 16; + return true; + } + + /// + /// Determine whether a given instruction is a BL. + /// + /// Offset within the PE image byte array. + private bool IsArm64BLInstruction(int imageOffset, out int offset) + { + byte highByte = _reader.Image[imageOffset + 3]; + if ((highByte & 0xfc) != 0x94) + { + offset = 0; + return false; + } + + uint instruction = BitConverter.ToUInt32(_reader.Image, imageOffset); + // offset = SignExtend(imm26:'00', 64) + offset = (int)instruction << 6 >> 4; + return true; + } + + /// + /// Determine whether a given instruction is an LDR literal 64-bit. + /// + /// Offset within the PE image byte array. + private bool IsArm64LdrLiteral64Instruction(int imageOffset, out uint register, out int offset) + { + byte highByte = _reader.Image[imageOffset + 3]; + if (highByte != 0x58) + { + register = 0; + offset = 0; + return false; + } + + uint instruction = BitConverter.ToUInt32(_reader.Image, imageOffset); + register = instruction & 0x1f; + // offset = SignExtend(imm19:'00', 64) + offset = (int)(instruction ^ register) << 8 >> 11; + return true; + } + + /// + /// Determine whether a given instruction is an LDR immediate 64-bit with the zero offset, e.g., ldr x12, [x12]. + /// + /// Offset within the PE image byte array. + private bool IsArm64LdrImmediate64ZeroOffsetInstruction(int imageOffset, out uint destRegister, out uint sourceRegister) + { + uint instruction = BitConverter.ToUInt32(_reader.Image, imageOffset); + if ((instruction & 0xffff_fc00) != 0xf940_0000) + { + destRegister = 0; + sourceRegister = 0; + return false; + } + + destRegister = instruction & 0x1f; + sourceRegister = (instruction >> 5) & 0x1f; + return true; + } + + /// + /// Determine whether a given instruction is a BR. + /// + /// Offset within the PE image byte array. + private bool IsArm64BrInstruction(int imageOffset, out uint register) + { + uint instruction = BitConverter.ToUInt32(_reader.Image, imageOffset); + if ((instruction & 0xffff_fc1f) != 0xd61f_0000) + { + register = 0; + return false; + } + + register = (instruction >> 5) & 0x1f; + return true; + } + /// /// Check whether a given target RVA corresponds to another runtime function within the same method. /// @@ -718,7 +1116,7 @@ private bool IsIntel2ByteIndirectJumpPCRelativeInstruction(int imageOffset, out /// Runtime function being disassembled /// Output runtime function index if found, -1 otherwise /// true if target runtime function has been found, false otherwise - private bool IsAnotherRuntimeFunctionWithinMethod(int rva, RuntimeFunction rtf, out int runtimeFunctionIndex) + private static bool IsAnotherRuntimeFunctionWithinMethod(int rva, RuntimeFunction rtf, out int runtimeFunctionIndex) { for (int rtfIndex = 0; rtfIndex < rtf.Method.RuntimeFunctions.Count; rtfIndex++) { @@ -732,5 +1130,10 @@ private bool IsAnotherRuntimeFunctionWithinMethod(int rva, RuntimeFunction rtf, runtimeFunctionIndex = -1; return false; } + + /// + /// Determine whether a given character is an ASCII digit. + /// + private static bool IsDigit(char c) => (uint)(c - '0') <= (uint)('9' - '0'); } } diff --git a/src/coreclr/src/tools/r2rdump/Extensions.cs b/src/coreclr/src/tools/r2rdump/Extensions.cs index 873435977d2d..f8ca578f3325 100644 --- a/src/coreclr/src/tools/r2rdump/Extensions.cs +++ b/src/coreclr/src/tools/r2rdump/Extensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -209,7 +208,7 @@ public static void WriteTo(this RuntimeFunction theThis, TextWriter writer, Dump writer.WriteLine($"Flags: 0x{amd64UnwindInfo.Flags:X2}{parsedFlags}"); writer.WriteLine($"SizeOfProlog: 0x{amd64UnwindInfo.SizeOfProlog:X4}"); writer.WriteLine($"CountOfUnwindCodes: {amd64UnwindInfo.CountOfUnwindCodes}"); - writer.WriteLine($"FrameRegister: {amd64UnwindInfo.FrameRegister}"); + writer.WriteLine($"FrameRegister: {((amd64UnwindInfo.FrameRegister == 0) ? "None" : amd64UnwindInfo.FrameRegister.ToString())}"); writer.WriteLine($"FrameOffset: 0x{amd64UnwindInfo.FrameOffset}"); if (!options.Naked) { diff --git a/src/coreclr/src/tools/r2rdump/ISymNGenWriter.cs b/src/coreclr/src/tools/r2rdump/ISymNGenWriter.cs index 8a4eb8074fb6..4c4b6b97d60a 100644 --- a/src/coreclr/src/tools/r2rdump/ISymNGenWriter.cs +++ b/src/coreclr/src/tools/r2rdump/ISymNGenWriter.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable 436 // SuppressUnmanagedCodeSecurityAttribute defined in source and mscorlib diff --git a/src/coreclr/src/tools/r2rdump/PdbWriter.cs b/src/coreclr/src/tools/r2rdump/PdbWriter.cs index bbf6c5f1f1cb..99216ab6736f 100644 --- a/src/coreclr/src/tools/r2rdump/PdbWriter.cs +++ b/src/coreclr/src/tools/r2rdump/PdbWriter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/r2rdump/R2RDiff.cs b/src/coreclr/src/tools/r2rdump/R2RDiff.cs index 74ef9114d4bf..4f3fd9fe11a8 100644 --- a/src/coreclr/src/tools/r2rdump/R2RDiff.cs +++ b/src/coreclr/src/tools/r2rdump/R2RDiff.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/r2rdump/R2RDump.cs b/src/coreclr/src/tools/r2rdump/R2RDump.cs index 320d41548d9a..62f26189d243 100644 --- a/src/coreclr/src/tools/r2rdump/R2RDump.cs +++ b/src/coreclr/src/tools/r2rdump/R2RDump.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/r2rdump/TextDumper.cs b/src/coreclr/src/tools/r2rdump/TextDumper.cs index 84ff8cc96868..b3bf91845f38 100644 --- a/src/coreclr/src/tools/r2rdump/TextDumper.cs +++ b/src/coreclr/src/tools/r2rdump/TextDumper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/r2rtest/Buckets.cs b/src/coreclr/src/tools/r2rtest/Buckets.cs index 4b7bcf06f4a8..387d753b959f 100644 --- a/src/coreclr/src/tools/r2rtest/Buckets.cs +++ b/src/coreclr/src/tools/r2rtest/Buckets.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/r2rtest/BuildFolder.cs b/src/coreclr/src/tools/r2rtest/BuildFolder.cs index b3b64572a0ce..91cb499ff243 100644 --- a/src/coreclr/src/tools/r2rtest/BuildFolder.cs +++ b/src/coreclr/src/tools/r2rtest/BuildFolder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/r2rtest/BuildFolderSet.cs b/src/coreclr/src/tools/r2rtest/BuildFolderSet.cs index 7c05f20c5a8a..e7e8bd415701 100644 --- a/src/coreclr/src/tools/r2rtest/BuildFolderSet.cs +++ b/src/coreclr/src/tools/r2rtest/BuildFolderSet.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections; diff --git a/src/coreclr/src/tools/r2rtest/BuildOptions.cs b/src/coreclr/src/tools/r2rtest/BuildOptions.cs index 685ffffaf291..cfa0bad14877 100644 --- a/src/coreclr/src/tools/r2rtest/BuildOptions.cs +++ b/src/coreclr/src/tools/r2rtest/BuildOptions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/r2rtest/CommandLineOptions.cs b/src/coreclr/src/tools/r2rtest/CommandLineOptions.cs index aa7ff7a46d0c..9f6e065565e9 100644 --- a/src/coreclr/src/tools/r2rtest/CommandLineOptions.cs +++ b/src/coreclr/src/tools/r2rtest/CommandLineOptions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.CommandLine; diff --git a/src/coreclr/src/tools/r2rtest/Commands/CompileDirectoryCommand.cs b/src/coreclr/src/tools/r2rtest/Commands/CompileDirectoryCommand.cs index 3089bf3f5aa4..25d306f2c052 100644 --- a/src/coreclr/src/tools/r2rtest/Commands/CompileDirectoryCommand.cs +++ b/src/coreclr/src/tools/r2rtest/Commands/CompileDirectoryCommand.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/r2rtest/Commands/CompileFrameworkCommand.cs b/src/coreclr/src/tools/r2rtest/Commands/CompileFrameworkCommand.cs index 6ab22cfb9766..fbce2e2fd833 100644 --- a/src/coreclr/src/tools/r2rtest/Commands/CompileFrameworkCommand.cs +++ b/src/coreclr/src/tools/r2rtest/Commands/CompileFrameworkCommand.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/r2rtest/Commands/CompileNugetCommand.cs b/src/coreclr/src/tools/r2rtest/Commands/CompileNugetCommand.cs index bc5f541898a9..fd890baf420f 100644 --- a/src/coreclr/src/tools/r2rtest/Commands/CompileNugetCommand.cs +++ b/src/coreclr/src/tools/r2rtest/Commands/CompileNugetCommand.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/r2rtest/Commands/CompileSerpCommand.cs b/src/coreclr/src/tools/r2rtest/Commands/CompileSerpCommand.cs index 1e82eabb72f8..dbe99e7a2535 100644 --- a/src/coreclr/src/tools/r2rtest/Commands/CompileSerpCommand.cs +++ b/src/coreclr/src/tools/r2rtest/Commands/CompileSerpCommand.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -23,9 +22,9 @@ public enum SerpCompositeScenario /// SerpAspNetSharedFramework, /// - /// Composite image containing Serp Core, Asp.Net, Shared Framework (the largest composite we can currently make) + /// Composite image containing Serp Core, Asp.Net, Shared Framework, plus composite image containing package assemblies /// - SingleSerpAspNetSharedFrameworkComposite, + SerpAspNetSharedFrameworkCompositeAndPackagesComposite, } class CompileSerpCommand @@ -33,6 +32,7 @@ class CompileSerpCommand private static readonly string BackupFolder = "backup"; private static readonly string CompileFolder = "compile"; private static readonly string FrameworkCompositeFilename = "framework-r2r.dll"; + private static readonly string PackagesCompositeFilename = "packages-r2r.dll"; private List _packageCompileAssemblies; private List _packageReferenceAssemblies; @@ -52,6 +52,7 @@ public CompileSerpCommand(BuildOptions options) options.NoJit = true; options.NoEtw = true; options.Release = true; + options.LargeBubble = true; _options = options; @@ -78,10 +79,10 @@ public CompileSerpCommand(BuildOptions options) throw new ArgumentException($"Error: InputDirectory must point at a SERP build. Could not find {Path.Combine(SerpDir, "runserp.cmd")}"); } - string whiteListFilePath = Path.Combine(SerpDir, "WhitelistDlls.txt"); - if (!File.Exists(whiteListFilePath)) + string allowListFilePath = Path.Combine(SerpDir, "App_Data", "AllowedDllList.txt"); + if (!File.Exists(allowListFilePath)) { - throw new ArgumentException($"File {whiteListFilePath} was not found"); + throw new ArgumentException($"File {allowListFilePath} was not found"); } // Add all assemblies from the various SERP packages (filtered by ShouldInclude) @@ -107,11 +108,15 @@ public CompileSerpCommand(BuildOptions options) _coreCompileAssemblies = new List(); _coreReferenceAssemblies = new List(); { - // Add a whitelist of assemblies from bin - foreach (string item in new HashSet(File.ReadAllLines(whiteListFilePath))) + // Add an allow-list of assemblies from bin. This unified list includes binaries from /bin and /App_data so filter just the /bin assemblies + foreach (string item in new HashSet(File.ReadAllLines(allowListFilePath))) { string binAssembly = Path.Combine(BinDir, item); - _coreCompileAssemblies.Add(binAssembly); + if (File.Exists(binAssembly) && + !FrameworkExclusion.Exclude(Path.GetFileNameWithoutExtension(binAssembly), CompilerIndex.CPAOT, out string reason)) + { + _coreCompileAssemblies.Add(binAssembly); + } } HashSet coreReferenceAssemblyDirectories = new HashSet(); @@ -197,7 +202,7 @@ public int CompileSerpAssemblies() compositeAspNet = true; compositeSerpCore = true; } - if (_options.CompositeScenario == SerpCompositeScenario.SingleSerpAspNetSharedFrameworkComposite) + if (_options.CompositeScenario == SerpCompositeScenario.SerpAspNetSharedFrameworkCompositeAndPackagesComposite) { combinedComposite = true; } @@ -330,24 +335,42 @@ public int CompileSerpAssemblies() } } + string packagesCompositeDirectory = null; // Individual Serp package assemblies { List packageCombinedReferences = new List(); - packageCombinedReferences.AddRange(_packageReferenceAssemblies); - packageCombinedReferences.AddRange(_coreReferenceAssemblies); - packageCombinedReferences.AddRange(_aspReferenceAssemblies); - packageCombinedReferences.AddRange(_frameworkReferenceAssemblies); + HashSet simpleNameList = new HashSet(); + packageCombinedReferences.AddRange(FilterAssembliesNoSimpleNameDuplicates(simpleNameList, _packageReferenceAssemblies)); + packageCombinedReferences.AddRange(FilterAssembliesNoSimpleNameDuplicates(simpleNameList, _coreReferenceAssemblies)); + packageCombinedReferences.AddRange(FilterAssembliesNoSimpleNameDuplicates(simpleNameList, _aspReferenceAssemblies)); + packageCombinedReferences.AddRange(FilterAssembliesNoSimpleNameDuplicates(simpleNameList, _frameworkReferenceAssemblies)); List packageCombinedReferencesBackup = BackupAndUseOriginalAssemblies(serpRoot, packageCombinedReferences); List packageCompileAssembliesBackup = BackupAndUseOriginalAssemblies(serpRoot, _packageCompileAssemblies); - Crossgen2RunnerOptions crossgen2Options = new Crossgen2RunnerOptions() { Composite = false }; - var runner = new Crossgen2Runner(_options, crossgen2Options, packageCombinedReferencesBackup); - foreach (string assembly in packageCompileAssembliesBackup) + string packagesCompositeDll = Path.Combine(_options.CoreRootDirectory.FullName, PackagesCompositeFilename); + packagesCompositeDirectory = SerpDir; + if (File.Exists(packagesCompositeDll)) + File.Delete(packagesCompositeDll); + + if (combinedComposite) { - string dllCompile = GetCompileFile(serpRoot, assembly); - var compilationProcess = new ProcessInfo(new CompilationProcessConstructor(runner, dllCompile, new string[] { assembly })); + string packagesCompositeDllCompile = GetCompileFile(serpRoot, packagesCompositeDll); + Crossgen2RunnerOptions crossgen2Options = new Crossgen2RunnerOptions() { Composite = true, CompositeRoot = GetBackupFile(serpRoot, SerpDir), PartialComposite = true }; + var runner = new Crossgen2Runner(_options, crossgen2Options, packageCombinedReferencesBackup); + var compilationProcess = new ProcessInfo(new CompilationProcessConstructor(runner, packagesCompositeDllCompile, packageCompileAssembliesBackup)); fileCompilations.Add(compilationProcess); } + else + { + Crossgen2RunnerOptions crossgen2Options = new Crossgen2RunnerOptions() { Composite = false }; + var runner = new Crossgen2Runner(_options, crossgen2Options, packageCombinedReferencesBackup); + foreach (string assembly in packageCompileAssembliesBackup) + { + string dllCompile = GetCompileFile(serpRoot, assembly); + var compilationProcess = new ProcessInfo(new CompilationProcessConstructor(runner, dllCompile, new string[] { assembly })); + fileCompilations.Add(compilationProcess); + } + } } ParallelRunner.Run(fileCompilations, _options.DegreeOfParallelism); @@ -379,6 +402,9 @@ public int CompileSerpAssemblies() if (Path.GetFileName(componentAssembly).Equals(FrameworkCompositeFilename)) continue; + if (Path.GetFileName(componentAssembly).Equals(PackagesCompositeFilename)) + continue; + string assemblyRelativePath = Path.GetRelativePath(compositeOutputRootDir, componentAssembly); string destinationFile = Path.Combine(SerpDir, assemblyRelativePath); Debug.Assert(File.Exists(GetBackupFile(serpRoot, destinationFile))); diff --git a/src/coreclr/src/tools/r2rtest/Commands/CompileSubtreeCommand.cs b/src/coreclr/src/tools/r2rtest/Commands/CompileSubtreeCommand.cs index aac04c625141..83b709d6a782 100644 --- a/src/coreclr/src/tools/r2rtest/Commands/CompileSubtreeCommand.cs +++ b/src/coreclr/src/tools/r2rtest/Commands/CompileSubtreeCommand.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Concurrent; diff --git a/src/coreclr/src/tools/r2rtest/CompilerRunner.cs b/src/coreclr/src/tools/r2rtest/CompilerRunner.cs index ae36492a9baa..206a46b3cf4b 100644 --- a/src/coreclr/src/tools/r2rtest/CompilerRunner.cs +++ b/src/coreclr/src/tools/r2rtest/CompilerRunner.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/r2rtest/ComputeManagedAssemblies.cs b/src/coreclr/src/tools/r2rtest/ComputeManagedAssemblies.cs index e453b3d765d1..685ec9a2bf88 100644 --- a/src/coreclr/src/tools/r2rtest/ComputeManagedAssemblies.cs +++ b/src/coreclr/src/tools/r2rtest/ComputeManagedAssemblies.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Concurrent; diff --git a/src/coreclr/src/tools/r2rtest/Crossgen2Runner.cs b/src/coreclr/src/tools/r2rtest/Crossgen2Runner.cs index 9fabba86d21a..84bcef17d164 100644 --- a/src/coreclr/src/tools/r2rtest/Crossgen2Runner.cs +++ b/src/coreclr/src/tools/r2rtest/Crossgen2Runner.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/r2rtest/CrossgenRunner.cs b/src/coreclr/src/tools/r2rtest/CrossgenRunner.cs index 49a31c032b36..9ae0cdc4e5db 100644 --- a/src/coreclr/src/tools/r2rtest/CrossgenRunner.cs +++ b/src/coreclr/src/tools/r2rtest/CrossgenRunner.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/r2rtest/DotnetCli.cs b/src/coreclr/src/tools/r2rtest/DotnetCli.cs index cb1134b0cdf9..47531ca8d325 100644 --- a/src/coreclr/src/tools/r2rtest/DotnetCli.cs +++ b/src/coreclr/src/tools/r2rtest/DotnetCli.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/r2rtest/JitRunner.cs b/src/coreclr/src/tools/r2rtest/JitRunner.cs index 69768e38019c..17b9f84d4915 100644 --- a/src/coreclr/src/tools/r2rtest/JitRunner.cs +++ b/src/coreclr/src/tools/r2rtest/JitRunner.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/r2rtest/Linux.cs b/src/coreclr/src/tools/r2rtest/Linux.cs index b31b4a9d3725..20ab9fe87042 100644 --- a/src/coreclr/src/tools/r2rtest/Linux.cs +++ b/src/coreclr/src/tools/r2rtest/Linux.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/r2rtest/ParallelRunner.cs b/src/coreclr/src/tools/r2rtest/ParallelRunner.cs index 95b70bd17406..5a0558572f87 100644 --- a/src/coreclr/src/tools/r2rtest/ParallelRunner.cs +++ b/src/coreclr/src/tools/r2rtest/ParallelRunner.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/r2rtest/PathHelpers.cs b/src/coreclr/src/tools/r2rtest/PathHelpers.cs index 87ad279990ae..d180032d3dcb 100644 --- a/src/coreclr/src/tools/r2rtest/PathHelpers.cs +++ b/src/coreclr/src/tools/r2rtest/PathHelpers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using R2RTest; using System; diff --git a/src/coreclr/src/tools/r2rtest/PerfEventSourceListener.cs b/src/coreclr/src/tools/r2rtest/PerfEventSourceListener.cs index 0263176f4562..9cb12de564de 100644 --- a/src/coreclr/src/tools/r2rtest/PerfEventSourceListener.cs +++ b/src/coreclr/src/tools/r2rtest/PerfEventSourceListener.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.CodeDom.Compiler; diff --git a/src/coreclr/src/tools/r2rtest/ProcessRunner.cs b/src/coreclr/src/tools/r2rtest/ProcessRunner.cs index 4822baecaea3..dcba0121f5a4 100644 --- a/src/coreclr/src/tools/r2rtest/ProcessRunner.cs +++ b/src/coreclr/src/tools/r2rtest/ProcessRunner.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/r2rtest/Program.cs b/src/coreclr/src/tools/r2rtest/Program.cs index 32aaeafc60d3..86cb14e240a4 100644 --- a/src/coreclr/src/tools/r2rtest/Program.cs +++ b/src/coreclr/src/tools/r2rtest/Program.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.CommandLine; diff --git a/src/coreclr/src/tools/r2rtest/ReadyToRunJittedMethods.cs b/src/coreclr/src/tools/r2rtest/ReadyToRunJittedMethods.cs index a08639ed051d..654f6d576727 100644 --- a/src/coreclr/src/tools/r2rtest/ReadyToRunJittedMethods.cs +++ b/src/coreclr/src/tools/r2rtest/ReadyToRunJittedMethods.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/coreclr/src/tools/r2rtest/TestExclusion.cs b/src/coreclr/src/tools/r2rtest/TestExclusion.cs index 5fefaee6d90f..36a90a636108 100644 --- a/src/coreclr/src/tools/r2rtest/TestExclusion.cs +++ b/src/coreclr/src/tools/r2rtest/TestExclusion.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/coreclr/src/tools/runincontext/runincontext.cs b/src/coreclr/src/tools/runincontext/runincontext.cs index 8b0d2ea6cea2..4b2eae7fffbe 100644 --- a/src/coreclr/src/tools/runincontext/runincontext.cs +++ b/src/coreclr/src/tools/runincontext/runincontext.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // using System; using System.Reflection; diff --git a/src/coreclr/src/tools/util/consoleargs.cpp b/src/coreclr/src/tools/util/consoleargs.cpp index 8a2e436555d0..86300db5ce3f 100644 --- a/src/coreclr/src/tools/util/consoleargs.cpp +++ b/src/coreclr/src/tools/util/consoleargs.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include #include "consoleargs.h" diff --git a/src/coreclr/src/tools/util/consoleargs.h b/src/coreclr/src/tools/util/consoleargs.h index 06b6e753848d..10cc1e40b361 100644 --- a/src/coreclr/src/tools/util/consoleargs.h +++ b/src/coreclr/src/tools/util/consoleargs.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __CONSOLEARGS_H__ #define __CONSOLEARGS_H__ diff --git a/src/coreclr/src/tools/util/file_can.h b/src/coreclr/src/tools/util/file_can.h index bb575d098b5e..bfa2b50c5961 100644 --- a/src/coreclr/src/tools/util/file_can.h +++ b/src/coreclr/src/tools/util/file_can.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __FILE_CAN_H__ #define __FILE_CAN_H__ diff --git a/src/coreclr/src/tools/util/list.h b/src/coreclr/src/tools/util/list.h index 1748ed9cd3c2..5065d2017516 100644 --- a/src/coreclr/src/tools/util/list.h +++ b/src/coreclr/src/tools/util/list.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __GENERIC_LIST_H__ #define __GENERIC_LIST_H__ diff --git a/src/coreclr/src/tools/util/tree.h b/src/coreclr/src/tools/util/tree.h index ddd9c39e1154..4f57cfeed98d 100644 --- a/src/coreclr/src/tools/util/tree.h +++ b/src/coreclr/src/tools/util/tree.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __GENERIC_TREE_H__ #define __GENERIC_TREE_H__ diff --git a/src/coreclr/src/unwinder/CMakeLists.txt b/src/coreclr/src/unwinder/CMakeLists.txt index 8be5f3b21ea6..98cdb0c0b7a8 100644 --- a/src/coreclr/src/unwinder/CMakeLists.txt +++ b/src/coreclr/src/unwinder/CMakeLists.txt @@ -20,7 +20,7 @@ list(APPEND UNWINDER_SOURCES convert_to_absolute_path(UNWINDER_SOURCES ${UNWINDER_SOURCES}) if(CLR_CMAKE_HOST_UNIX) - add_library_clr(unwinder_wks ${UNWINDER_SOURCES}) + add_library_clr(unwinder_wks OBJECT ${UNWINDER_SOURCES}) add_dependencies(unwinder_wks eventing_headers) endif(CLR_CMAKE_HOST_UNIX) diff --git a/src/coreclr/src/unwinder/amd64/dbs_stack_x64.cpp b/src/coreclr/src/unwinder/amd64/dbs_stack_x64.cpp index 97872b6cc4ba..e6714209b939 100644 --- a/src/coreclr/src/unwinder/amd64/dbs_stack_x64.cpp +++ b/src/coreclr/src/unwinder/amd64/dbs_stack_x64.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //---------------------------------------------------------------------------- // diff --git a/src/coreclr/src/unwinder/amd64/unwinder_amd64.cpp b/src/coreclr/src/unwinder/amd64/unwinder_amd64.cpp index 1039773a4a03..ef1c5e0b5b54 100644 --- a/src/coreclr/src/unwinder/amd64/unwinder_amd64.cpp +++ b/src/coreclr/src/unwinder/amd64/unwinder_amd64.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/unwinder/amd64/unwinder_amd64.h b/src/coreclr/src/unwinder/amd64/unwinder_amd64.h index 0c8e9cd70f49..48e67f670218 100644 --- a/src/coreclr/src/unwinder/amd64/unwinder_amd64.h +++ b/src/coreclr/src/unwinder/amd64/unwinder_amd64.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/unwinder/arm/unwinder_arm.cpp b/src/coreclr/src/unwinder/arm/unwinder_arm.cpp index a1eabd1f156d..5c8de3534226 100644 --- a/src/coreclr/src/unwinder/arm/unwinder_arm.cpp +++ b/src/coreclr/src/unwinder/arm/unwinder_arm.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/unwinder/arm/unwinder_arm.h b/src/coreclr/src/unwinder/arm/unwinder_arm.h index cc2dfbb7b149..1a8e52fa9a3d 100644 --- a/src/coreclr/src/unwinder/arm/unwinder_arm.h +++ b/src/coreclr/src/unwinder/arm/unwinder_arm.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/unwinder/arm64/unwinder_arm64.cpp b/src/coreclr/src/unwinder/arm64/unwinder_arm64.cpp index e320028667a8..5740c3cfcab8 100644 --- a/src/coreclr/src/unwinder/arm64/unwinder_arm64.cpp +++ b/src/coreclr/src/unwinder/arm64/unwinder_arm64.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/unwinder/arm64/unwinder_arm64.h b/src/coreclr/src/unwinder/arm64/unwinder_arm64.h index ddd79dad5f2f..f0767d2c315b 100644 --- a/src/coreclr/src/unwinder/arm64/unwinder_arm64.h +++ b/src/coreclr/src/unwinder/arm64/unwinder_arm64.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/unwinder/i386/unwinder_i386.cpp b/src/coreclr/src/unwinder/i386/unwinder_i386.cpp index 18c3e8187b1c..958d0afcf45e 100644 --- a/src/coreclr/src/unwinder/i386/unwinder_i386.cpp +++ b/src/coreclr/src/unwinder/i386/unwinder_i386.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/unwinder/i386/unwinder_i386.h b/src/coreclr/src/unwinder/i386/unwinder_i386.h index c561d7347c0a..6a6c3896ee6a 100644 --- a/src/coreclr/src/unwinder/i386/unwinder_i386.h +++ b/src/coreclr/src/unwinder/i386/unwinder_i386.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/unwinder/stdafx.cpp b/src/coreclr/src/unwinder/stdafx.cpp index f3abd1773dba..54037d9dcd4d 100644 --- a/src/coreclr/src/unwinder/stdafx.cpp +++ b/src/coreclr/src/unwinder/stdafx.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: stdafx.cpp // diff --git a/src/coreclr/src/unwinder/stdafx.h b/src/coreclr/src/unwinder/stdafx.h index 5b7d4f8170c1..8decdc68562b 100644 --- a/src/coreclr/src/unwinder/stdafx.h +++ b/src/coreclr/src/unwinder/stdafx.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: stdafx.h // diff --git a/src/coreclr/src/unwinder/unwinder.cpp b/src/coreclr/src/unwinder/unwinder.cpp index 888bfa99bc51..98245fef445c 100644 --- a/src/coreclr/src/unwinder/unwinder.cpp +++ b/src/coreclr/src/unwinder/unwinder.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/unwinder/unwinder.h b/src/coreclr/src/unwinder/unwinder.h index d34c9263237d..0c4838f1ed5c 100644 --- a/src/coreclr/src/unwinder/unwinder.h +++ b/src/coreclr/src/unwinder/unwinder.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/utilcode/CMakeLists.txt b/src/coreclr/src/utilcode/CMakeLists.txt index aa28b2db6038..4c1ce806b651 100644 --- a/src/coreclr/src/utilcode/CMakeLists.txt +++ b/src/coreclr/src/utilcode/CMakeLists.txt @@ -62,7 +62,6 @@ set(UTILCODE_COMMON_SOURCES # of UTILCODE_SOURCES above after fixing compiler errors. if(CLR_CMAKE_TARGET_WIN32) list(APPEND UTILCODE_COMMON_SOURCES - appxutil.cpp dacutil.cpp dlwrap.cpp securitywrapper.cpp @@ -98,7 +97,7 @@ convert_to_absolute_path(UTILCODE_CROSSGEN_SOURCES ${UTILCODE_CROSSGEN_SOURCES}) convert_to_absolute_path(UTILCODE_STATICNOHOST_SOURCES ${UTILCODE_STATICNOHOST_SOURCES}) add_library_clr(utilcode_dac STATIC ${UTILCODE_DAC_SOURCES}) -add_library_clr(utilcode STATIC ${UTILCODE_SOURCES}) +add_library_clr(utilcode OBJECT ${UTILCODE_SOURCES}) add_library_clr(utilcodestaticnohost STATIC ${UTILCODE_STATICNOHOST_SOURCES}) add_library_clr(utilcode_crossgen STATIC ${UTILCODE_CROSSGEN_SOURCES}) diff --git a/src/coreclr/src/utilcode/appxutil.cpp b/src/coreclr/src/utilcode/appxutil.cpp deleted file mode 100644 index 4bb0feae84b1..000000000000 --- a/src/coreclr/src/utilcode/appxutil.cpp +++ /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. -// See the LICENSE file in the project root for more information. -// - - -#include "stdafx.h" - -#include - -#include "utilcode.h" -#include "holder.h" -#include "volatile.h" -#include "clr/fs.h" -#include "clr/str.h" - -#include "appxutil.h" -#include "ex.h" - -#include "shlwapi.h" // Path manipulation APIs - - -GVAL_IMPL(bool, g_fAppX); -INDEBUG(bool g_fIsAppXAsked;) - -namespace AppX -{ -#ifdef DACCESS_COMPILE - bool DacIsAppXProcess() - { - return g_fAppX; - } -#else - - // Returns true if host has deemed the process to be appx - bool IsAppXProcess() - { - INDEBUG(g_fIsAppXAsked = true;) - return g_fAppX; - } - - - void SetIsAppXProcess(bool value) - { - _ASSERTE(!g_fIsAppXAsked); - g_fAppX = value; - } -#endif -}; - diff --git a/src/coreclr/src/utilcode/arraylist.cpp b/src/coreclr/src/utilcode/arraylist.cpp index f77657d2b804..c6e538fd38da 100644 --- a/src/coreclr/src/utilcode/arraylist.cpp +++ b/src/coreclr/src/utilcode/arraylist.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "stdafx.h" diff --git a/src/coreclr/src/utilcode/bitvector.cpp b/src/coreclr/src/utilcode/bitvector.cpp index 43ab530e4285..b4c53aa96ed0 100644 --- a/src/coreclr/src/utilcode/bitvector.cpp +++ b/src/coreclr/src/utilcode/bitvector.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /***************************************************************************/ /* BitVector.cpp */ diff --git a/src/coreclr/src/utilcode/ccomprc.cpp b/src/coreclr/src/utilcode/ccomprc.cpp index 797bc7bd49c2..8555d57725d3 100644 --- a/src/coreclr/src/utilcode/ccomprc.cpp +++ b/src/coreclr/src/utilcode/ccomprc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "stdafx.h" // Standard header. #include // Utility helpers. diff --git a/src/coreclr/src/utilcode/check.cpp b/src/coreclr/src/utilcode/check.cpp index e06743d79860..4d7a0c741632 100644 --- a/src/coreclr/src/utilcode/check.cpp +++ b/src/coreclr/src/utilcode/check.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //================================================================================ // Assertion checking infrastructure diff --git a/src/coreclr/src/utilcode/clrconfig.cpp b/src/coreclr/src/utilcode/clrconfig.cpp index fcb43894bccb..12e7f9db5218 100644 --- a/src/coreclr/src/utilcode/clrconfig.cpp +++ b/src/coreclr/src/utilcode/clrconfig.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // CLRConfig.cpp // diff --git a/src/coreclr/src/utilcode/clrhelpers.cpp b/src/coreclr/src/utilcode/clrhelpers.cpp index b0a590eae993..98055909867a 100644 --- a/src/coreclr/src/utilcode/clrhelpers.cpp +++ b/src/coreclr/src/utilcode/clrhelpers.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // This is file to compile 2 public "headers" from ..\inc directory (we have to include stdafx.h first). diff --git a/src/coreclr/src/utilcode/clrhost.cpp b/src/coreclr/src/utilcode/clrhost.cpp index 23d6eeaf9048..5aa3a35c2e3f 100644 --- a/src/coreclr/src/utilcode/clrhost.cpp +++ b/src/coreclr/src/utilcode/clrhost.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/utilcode/clrhost_nodependencies.cpp b/src/coreclr/src/utilcode/clrhost_nodependencies.cpp index 84b8e6ab2aa1..64185df41cbb 100644 --- a/src/coreclr/src/utilcode/clrhost_nodependencies.cpp +++ b/src/coreclr/src/utilcode/clrhost_nodependencies.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/utilcode/collections.cpp b/src/coreclr/src/utilcode/collections.cpp index 2ba380418c74..ed5271fde77f 100644 --- a/src/coreclr/src/utilcode/collections.cpp +++ b/src/coreclr/src/utilcode/collections.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // Collections.cpp // diff --git a/src/coreclr/src/utilcode/comex.cpp b/src/coreclr/src/utilcode/comex.cpp index e903d1db0ca5..3a564553d22d 100644 --- a/src/coreclr/src/utilcode/comex.cpp +++ b/src/coreclr/src/utilcode/comex.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // --------------------------------------------------------------------------- // COMEx.cpp // diff --git a/src/coreclr/src/utilcode/configuration.cpp b/src/coreclr/src/utilcode/configuration.cpp index 2cbf8cf3685e..e67507d5bae0 100644 --- a/src/coreclr/src/utilcode/configuration.cpp +++ b/src/coreclr/src/utilcode/configuration.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // -------------------------------------------------------------------------------------------------- // configuration.cpp @@ -133,4 +132,4 @@ bool Configuration::GetKnobBooleanValue(LPCWSTR name, bool defaultValue) } return defaultValue; -} \ No newline at end of file +} diff --git a/src/coreclr/src/utilcode/corimage.cpp b/src/coreclr/src/utilcode/corimage.cpp index 5f732e5651db..a1aff8fe82de 100644 --- a/src/coreclr/src/utilcode/corimage.cpp +++ b/src/coreclr/src/utilcode/corimage.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/utilcode/cycletimer.cpp b/src/coreclr/src/utilcode/cycletimer.cpp index 8a5b4732190a..642ce22e630c 100644 --- a/src/coreclr/src/utilcode/cycletimer.cpp +++ b/src/coreclr/src/utilcode/cycletimer.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "stdafx.h" diff --git a/src/coreclr/src/utilcode/dacutil.cpp b/src/coreclr/src/utilcode/dacutil.cpp index 611867163a82..914007e67817 100644 --- a/src/coreclr/src/utilcode/dacutil.cpp +++ b/src/coreclr/src/utilcode/dacutil.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // // Internal data access functionality. diff --git a/src/coreclr/src/utilcode/debug.cpp b/src/coreclr/src/utilcode/debug.cpp index 80ec783644d6..d6c2c4a4b1ad 100644 --- a/src/coreclr/src/utilcode/debug.cpp +++ b/src/coreclr/src/utilcode/debug.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // Debug.cpp // diff --git a/src/coreclr/src/utilcode/defaultallocator.cpp b/src/coreclr/src/utilcode/defaultallocator.cpp index 08f80cef83ec..1c6e2d522919 100644 --- a/src/coreclr/src/utilcode/defaultallocator.cpp +++ b/src/coreclr/src/utilcode/defaultallocator.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "stdafx.h" #include "defaultallocator.h" diff --git a/src/coreclr/src/utilcode/delayloadhelpers.cpp b/src/coreclr/src/utilcode/delayloadhelpers.cpp index 4c8b4ae28a7e..90936ccbcfc0 100644 --- a/src/coreclr/src/utilcode/delayloadhelpers.cpp +++ b/src/coreclr/src/utilcode/delayloadhelpers.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/utilcode/dlwrap.cpp b/src/coreclr/src/utilcode/dlwrap.cpp index edcd33b04c64..8cb312f8f817 100644 --- a/src/coreclr/src/utilcode/dlwrap.cpp +++ b/src/coreclr/src/utilcode/dlwrap.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "stdafx.h" // Precompiled header key. diff --git a/src/coreclr/src/utilcode/ex.cpp b/src/coreclr/src/utilcode/ex.cpp index 35bcd6c33652..56c1b552eead 100644 --- a/src/coreclr/src/utilcode/ex.cpp +++ b/src/coreclr/src/utilcode/ex.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/utilcode/format1.cpp b/src/coreclr/src/utilcode/format1.cpp index 4e37994b1b2d..f8ef94406bfb 100644 --- a/src/coreclr/src/utilcode/format1.cpp +++ b/src/coreclr/src/utilcode/format1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /***************************************************************************/ /* routines for parsing file format stuff ... */ diff --git a/src/coreclr/src/utilcode/fstream.cpp b/src/coreclr/src/utilcode/fstream.cpp index bffdbe50ec04..835e24f62495 100644 --- a/src/coreclr/src/utilcode/fstream.cpp +++ b/src/coreclr/src/utilcode/fstream.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "stdafx.h" // Precompiled header key. diff --git a/src/coreclr/src/utilcode/fstring.cpp b/src/coreclr/src/utilcode/fstring.cpp index 5f65fd1163b6..0f4360e9ffe0 100644 --- a/src/coreclr/src/utilcode/fstring.cpp +++ b/src/coreclr/src/utilcode/fstring.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // --------------------------------------------------------------------------- // FString.cpp // diff --git a/src/coreclr/src/utilcode/guidfromname.cpp b/src/coreclr/src/utilcode/guidfromname.cpp index 2f573f8f9842..6c8e9917704f 100644 --- a/src/coreclr/src/utilcode/guidfromname.cpp +++ b/src/coreclr/src/utilcode/guidfromname.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // GuidFromName diff --git a/src/coreclr/src/utilcode/hostimpl.cpp b/src/coreclr/src/utilcode/hostimpl.cpp index 3e55bcc3cbdf..31d38df70636 100644 --- a/src/coreclr/src/utilcode/hostimpl.cpp +++ b/src/coreclr/src/utilcode/hostimpl.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "stdafx.h" diff --git a/src/coreclr/src/utilcode/iallocator.cpp b/src/coreclr/src/utilcode/iallocator.cpp index 8c5fc838e5bb..9e1ea5ed9066 100644 --- a/src/coreclr/src/utilcode/iallocator.cpp +++ b/src/coreclr/src/utilcode/iallocator.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "stdafx.h" // Precompiled header key. #include "iallocator.h" diff --git a/src/coreclr/src/utilcode/ilformatter.cpp b/src/coreclr/src/utilcode/ilformatter.cpp index c1d6e7b6521c..f22cb0a4582b 100644 --- a/src/coreclr/src/utilcode/ilformatter.cpp +++ b/src/coreclr/src/utilcode/ilformatter.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /***************************************************************************/ /* ILFormatter.h */ diff --git a/src/coreclr/src/utilcode/loaderheap.cpp b/src/coreclr/src/utilcode/loaderheap.cpp index 7431a868b633..37d1e2f4ce56 100644 --- a/src/coreclr/src/utilcode/loaderheap.cpp +++ b/src/coreclr/src/utilcode/loaderheap.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "stdafx.h" // Precompiled header key. #include "loaderheap.h" diff --git a/src/coreclr/src/utilcode/log.cpp b/src/coreclr/src/utilcode/log.cpp index 75097c574918..37edc05b5cdb 100644 --- a/src/coreclr/src/utilcode/log.cpp +++ b/src/coreclr/src/utilcode/log.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // Simple Logging Facility diff --git a/src/coreclr/src/utilcode/longfilepathwrappers.cpp b/src/coreclr/src/utilcode/longfilepathwrappers.cpp index 319685034c1a..365d91b61d87 100644 --- a/src/coreclr/src/utilcode/longfilepathwrappers.cpp +++ b/src/coreclr/src/utilcode/longfilepathwrappers.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "stdafx.h" #include "windows.h" diff --git a/src/coreclr/src/utilcode/makepath.cpp b/src/coreclr/src/utilcode/makepath.cpp index 14e98a74a995..93914472f3d0 100644 --- a/src/coreclr/src/utilcode/makepath.cpp +++ b/src/coreclr/src/utilcode/makepath.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *makepath.c - create path name from components * diff --git a/src/coreclr/src/utilcode/md5.cpp b/src/coreclr/src/utilcode/md5.cpp index 1617d52905c1..7297114f21fe 100644 --- a/src/coreclr/src/utilcode/md5.cpp +++ b/src/coreclr/src/utilcode/md5.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // md5.cpp // diff --git a/src/coreclr/src/utilcode/memorypool.cpp b/src/coreclr/src/utilcode/memorypool.cpp index 7b274081d7bb..ec2dcd24c85c 100644 --- a/src/coreclr/src/utilcode/memorypool.cpp +++ b/src/coreclr/src/utilcode/memorypool.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "stdafx.h" diff --git a/src/coreclr/src/utilcode/namespaceutil.cpp b/src/coreclr/src/utilcode/namespaceutil.cpp index 38d32821bd67..d930c6f86d2e 100644 --- a/src/coreclr/src/utilcode/namespaceutil.cpp +++ b/src/coreclr/src/utilcode/namespaceutil.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // NamespaceUtil.cpp // diff --git a/src/coreclr/src/utilcode/opinfo.cpp b/src/coreclr/src/utilcode/opinfo.cpp index 0494155c03b1..0a2efdf28f1b 100644 --- a/src/coreclr/src/utilcode/opinfo.cpp +++ b/src/coreclr/src/utilcode/opinfo.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /***************************************************************************/ /* OpInfo.cpp */ diff --git a/src/coreclr/src/utilcode/outstring.cpp b/src/coreclr/src/utilcode/outstring.cpp index 4322f5514d9a..40b8e004066a 100644 --- a/src/coreclr/src/utilcode/outstring.cpp +++ b/src/coreclr/src/utilcode/outstring.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*****************************************************************/ /* OutString.cpp */ diff --git a/src/coreclr/src/utilcode/pedecoder.cpp b/src/coreclr/src/utilcode/pedecoder.cpp index 6497c1be4eb2..32e228cd8039 100644 --- a/src/coreclr/src/utilcode/pedecoder.cpp +++ b/src/coreclr/src/utilcode/pedecoder.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // -------------------------------------------------------------------------------- // PEDecoder.cpp // diff --git a/src/coreclr/src/utilcode/peinformation.cpp b/src/coreclr/src/utilcode/peinformation.cpp index bf77e584d1d2..78e41b11196d 100644 --- a/src/coreclr/src/utilcode/peinformation.cpp +++ b/src/coreclr/src/utilcode/peinformation.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // -------------------------------------------------------------------------------- // PEInformation.cpp // diff --git a/src/coreclr/src/utilcode/posterror.cpp b/src/coreclr/src/utilcode/posterror.cpp index 6dd27d92733e..c71d1b82e6c5 100644 --- a/src/coreclr/src/utilcode/posterror.cpp +++ b/src/coreclr/src/utilcode/posterror.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // PostErrors.cpp // diff --git a/src/coreclr/src/utilcode/prettyprintsig.cpp b/src/coreclr/src/utilcode/prettyprintsig.cpp index 653b71bf1ae2..e902a5fc0015 100644 --- a/src/coreclr/src/utilcode/prettyprintsig.cpp +++ b/src/coreclr/src/utilcode/prettyprintsig.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // This code supports formatting a method and it's signature in a friendly diff --git a/src/coreclr/src/utilcode/rangetree.cpp b/src/coreclr/src/utilcode/rangetree.cpp index ad3634ed6db9..3fea4c731888 100644 --- a/src/coreclr/src/utilcode/rangetree.cpp +++ b/src/coreclr/src/utilcode/rangetree.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "stdafx.h" diff --git a/src/coreclr/src/utilcode/registrywrapper.cpp b/src/coreclr/src/utilcode/registrywrapper.cpp deleted file mode 100644 index c6169fb50d6b..000000000000 --- a/src/coreclr/src/utilcode/registrywrapper.cpp +++ /dev/null @@ -1,76 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -//***************************************************************************** -// File: registrywrapper.cpp -// - -// -// Wrapper around Win32 Registry Functions allowing redirection of .NET -// Framework root registry location -// -// Notes on Offline Ngen Implementation: -// -// This implementation redirects file accesses to the GAC, NIC, framework directory -// and registry accesses to root store and fusion. -// Essentially, if we open a file or reg key directly from the CLR, we redirect it -// into the mounted VHD specified in the COMPLUS config values. -// -// Terminology: -// Host Machine - The machine running a copy of windows that mounts a VHD to -// compile the assemblies within. This is the build machine in the build lab. -// -// Target Machine - The VHD that gets mounted inside the host. We compile -// native images storing them inside the target. This is the freshly build -// copy of windows in the build lab. -// -// The OS itself pulls open all manner of registry keys and files as side-effects -// of our API calls. Here is a list of things the redirection implementation does -// not cover: -// -// - COM -// We use COM in Ngen to create and communicate with worker processes. In -// order to marshal arguments between ngen and worker, mscoree.tlb is loaded. -// The COM system from the loaded and running OS is used, which means the host -// machine's mscoree.tlb gets loaded for marshalling arguments for the CLR -// running on the target machine. In the next release (4.5) the ngen interfaces -// don't expect to change for existing ngen operations. If new functionality -// is added, new interfaces would be added, but existing ones will not be -// altered since we have a high compat bar with an inplace release. mscoree.tlb -// also contains interfaces for mscoree shim and gchost which again we expect to -// remain compatible in this next product release. In order to fix this, we will -// need support from Windows for using the COM system on another copy of Windows. -// - Registry Accesses under -// - HKLM\software[\Wow6432Node]\policies\microsoft : SQM, Cryptography, MUI, codeidentifiers, appcompat, RPC -// - HKLM\software[\Wow6432Node]\RPC,OLE,COM and under these keys -// - HKLM\Software\Microsoft\Cryptography and under -// - HKLM\Software\Microsoft\SQMClient -// - HKLM\Software[\Wow6432Node]\Microsoft\Windows\Windows Error Reporting\WMR and under -// -// These locations are not accessed directly by the CLR, but looked up by Windows -// as part of other API calls. It is safer that we are accessing these -// on the host machine since they correspond with the actively running copy of -// Windows. If we could somehow redirect these to the target VM, we would have -// Windows 7/2K8 OS looking up its config keys from a Win8 registry. If Windows -// has made incompatible changes here, such as moving the location or redefining -// values, we would break. -// - Accesses from C:\Windows\System32 and C:\Windows\Syswow64 and HKCU -// HKCU does not contain any .NET Framework settings (Microsoft\.NETFramework -// is empty). -// There are various files accessed from C:\Windows\System32 and these are a -// function of the OS loader. We load an executable and it automatically -// pulls in kernel32.dll, for example. This should not be a problem for running -// the CLR, since v4.5 will run on Win2K8, and for offline ngen compilation, we -// will not be using the new Win8 APIs for AppX. We had considered setting -// the PATH to point into the target machine's System32 directory, but the -// Windows team advised us that would break pretty quickly due to Api-sets -// having their version numbers rev'd and the Win2k8 host machine not having -// the ability to load them. -// -// -//***************************************************************************** -#include "stdafx.h" -#include "registrywrapper.h" -#include "clrconfig.h" -#include "strsafe.h" - diff --git a/src/coreclr/src/utilcode/regutil.cpp b/src/coreclr/src/utilcode/regutil.cpp index 10d40ddaf600..fcfbe6eb7c7c 100644 --- a/src/coreclr/src/utilcode/regutil.cpp +++ b/src/coreclr/src/utilcode/regutil.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // regutil.cpp // @@ -623,9 +622,8 @@ void REGUTIL::InitOptionalConfigCache() // Should be OK to proceed. continue; } -#if defined(FEATURE_APPX) && !defined(DACCESS_COMPILE) - else if (l == ERROR_ACCESS_DENIED && AppX::IsAppXProcess()) { - // If we encounter access denied for the current key in AppX, ignore + else if (l == ERROR_ACCESS_DENIED) { + // If we encounter access denied for the current key, ignore // the failure and continue to cache the rest. Effectively this means // we are caching that key as containing no values, which is correct // because in the unlikely event there are values hiding underneath @@ -633,7 +631,6 @@ void REGUTIL::InitOptionalConfigCache() // denied and continue on probing other locations. continue; } -#endif // FEATURE_APPX && !DACCESS_COMPILE else if (l != ERROR_SUCCESS) { // Something else went wrong. To be safe, don't enable the cache. goto failure; @@ -660,12 +657,10 @@ void REGUTIL::InitOptionalConfigCache() // Name is too long. That's OK, we don't cache such names. continue; } -#if defined(FEATURE_APPX) && !defined DACCESS_COMPILE - else if (l == ERROR_ACCESS_DENIED && AppX::IsAppXProcess()) { - // As above, ignore access denied in AppX and continue on trying to cache + else if (l == ERROR_ACCESS_DENIED) { + // As above, ignore access denied and continue on trying to cache continue; } -#endif // FEATURE_APPX && !DACCESS_COMPILE else { // WszRegEnumValue failed OOM, or something else went wrong. // To be safe, don't enable the cache. diff --git a/src/coreclr/src/utilcode/regutilformac.cpp b/src/coreclr/src/utilcode/regutilformac.cpp index b61397e97e23..e48fc9eb3552 100644 --- a/src/coreclr/src/utilcode/regutilformac.cpp +++ b/src/coreclr/src/utilcode/regutilformac.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // diff --git a/src/coreclr/src/utilcode/safewrap.cpp b/src/coreclr/src/utilcode/safewrap.cpp index e32e5b54d68b..209038628189 100644 --- a/src/coreclr/src/utilcode/safewrap.cpp +++ b/src/coreclr/src/utilcode/safewrap.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // SafeWrap.cpp // diff --git a/src/coreclr/src/utilcode/sbuffer.cpp b/src/coreclr/src/utilcode/sbuffer.cpp index 41f47dc44ed1..215efefb199f 100644 --- a/src/coreclr/src/utilcode/sbuffer.cpp +++ b/src/coreclr/src/utilcode/sbuffer.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // --------------------------------------------------------------------------- // diff --git a/src/coreclr/src/utilcode/securityutil.cpp b/src/coreclr/src/utilcode/securityutil.cpp index 4145ba821f8f..d3cab8ac1a43 100644 --- a/src/coreclr/src/utilcode/securityutil.cpp +++ b/src/coreclr/src/utilcode/securityutil.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "stdafx.h" diff --git a/src/coreclr/src/utilcode/securitywrapper.cpp b/src/coreclr/src/utilcode/securitywrapper.cpp index f988e5e7fd34..8f7ac38f444a 100644 --- a/src/coreclr/src/utilcode/securitywrapper.cpp +++ b/src/coreclr/src/utilcode/securitywrapper.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: SecurityWrapper.cpp // diff --git a/src/coreclr/src/utilcode/sha1.cpp b/src/coreclr/src/utilcode/sha1.cpp index 5dc33cc4cdee..9c2e091b5275 100644 --- a/src/coreclr/src/utilcode/sha1.cpp +++ b/src/coreclr/src/utilcode/sha1.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // // diff --git a/src/coreclr/src/utilcode/sigbuilder.cpp b/src/coreclr/src/utilcode/sigbuilder.cpp index 922e1613ca36..111164149e7e 100644 --- a/src/coreclr/src/utilcode/sigbuilder.cpp +++ b/src/coreclr/src/utilcode/sigbuilder.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "stdafx.h" diff --git a/src/coreclr/src/utilcode/sigparser.cpp b/src/coreclr/src/utilcode/sigparser.cpp index 47fb1b6e32cf..890d508c7aa5 100644 --- a/src/coreclr/src/utilcode/sigparser.cpp +++ b/src/coreclr/src/utilcode/sigparser.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // sigparser.cpp // diff --git a/src/coreclr/src/utilcode/splitpath.cpp b/src/coreclr/src/utilcode/splitpath.cpp index a5578a1a8db5..9e56b6b0cff3 100644 --- a/src/coreclr/src/utilcode/splitpath.cpp +++ b/src/coreclr/src/utilcode/splitpath.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*** *splitpath.c - break down path name into components * diff --git a/src/coreclr/src/utilcode/sstring.cpp b/src/coreclr/src/utilcode/sstring.cpp index d73e8861eed3..1647a9ee4151 100644 --- a/src/coreclr/src/utilcode/sstring.cpp +++ b/src/coreclr/src/utilcode/sstring.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // --------------------------------------------------------------------------- // SString.cpp // diff --git a/src/coreclr/src/utilcode/sstring_com.cpp b/src/coreclr/src/utilcode/sstring_com.cpp index ca3fab0a5484..396ec95d7359 100644 --- a/src/coreclr/src/utilcode/sstring_com.cpp +++ b/src/coreclr/src/utilcode/sstring_com.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // --------------------------------------------------------------------------- // SString_COM.cpp diff --git a/src/coreclr/src/utilcode/stacktrace.cpp b/src/coreclr/src/utilcode/stacktrace.cpp index f59b268354a4..57b4ee5f2828 100644 --- a/src/coreclr/src/utilcode/stacktrace.cpp +++ b/src/coreclr/src/utilcode/stacktrace.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- diff --git a/src/coreclr/src/utilcode/stdafx.h b/src/coreclr/src/utilcode/stdafx.h index de0b51d51c01..f04d0e47f8e4 100644 --- a/src/coreclr/src/utilcode/stdafx.h +++ b/src/coreclr/src/utilcode/stdafx.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // stdafx.h // diff --git a/src/coreclr/src/utilcode/stgpool.cpp b/src/coreclr/src/utilcode/stgpool.cpp index 16ac8f0187ef..7c4c203e754d 100644 --- a/src/coreclr/src/utilcode/stgpool.cpp +++ b/src/coreclr/src/utilcode/stgpool.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // StgPool.cpp // diff --git a/src/coreclr/src/utilcode/stgpooli.cpp b/src/coreclr/src/utilcode/stgpooli.cpp index 55b7ad40be0b..5e56835bc445 100644 --- a/src/coreclr/src/utilcode/stgpooli.cpp +++ b/src/coreclr/src/utilcode/stgpooli.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // StgPool.cpp // diff --git a/src/coreclr/src/utilcode/stgpoolreadonly.cpp b/src/coreclr/src/utilcode/stgpoolreadonly.cpp index 2f2f5036410a..439e9ca42d26 100644 --- a/src/coreclr/src/utilcode/stgpoolreadonly.cpp +++ b/src/coreclr/src/utilcode/stgpoolreadonly.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // StgPoolReadOnly.cpp // diff --git a/src/coreclr/src/utilcode/stresslog.cpp b/src/coreclr/src/utilcode/stresslog.cpp index 5f9c7bb77838..27906b5e9bcc 100644 --- a/src/coreclr/src/utilcode/stresslog.cpp +++ b/src/coreclr/src/utilcode/stresslog.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*************************************************************************************/ /* StressLog.cpp */ diff --git a/src/coreclr/src/utilcode/util.cpp b/src/coreclr/src/utilcode/util.cpp index 8c980df45dea..d697946beb8f 100644 --- a/src/coreclr/src/utilcode/util.cpp +++ b/src/coreclr/src/utilcode/util.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // util.cpp // diff --git a/src/coreclr/src/utilcode/util_nodependencies.cpp b/src/coreclr/src/utilcode/util_nodependencies.cpp index 4f6732a1a0a8..fb812b21ba6e 100644 --- a/src/coreclr/src/utilcode/util_nodependencies.cpp +++ b/src/coreclr/src/utilcode/util_nodependencies.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // Util_NoDependencies.cpp // diff --git a/src/coreclr/src/utilcode/utilmessagebox.cpp b/src/coreclr/src/utilcode/utilmessagebox.cpp index 993aef537b15..5a8b1f5e2d69 100644 --- a/src/coreclr/src/utilcode/utilmessagebox.cpp +++ b/src/coreclr/src/utilcode/utilmessagebox.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // UtilMessageBox.cpp // diff --git a/src/coreclr/src/utilcode/utsem.cpp b/src/coreclr/src/utilcode/utsem.cpp index 79c8b3abc6a2..66544c5db733 100644 --- a/src/coreclr/src/utilcode/utsem.cpp +++ b/src/coreclr/src/utilcode/utsem.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /****************************************************************************** FILE : UTSEM.CPP diff --git a/src/coreclr/src/utilcode/winfix.cpp b/src/coreclr/src/utilcode/winfix.cpp index 91d64c60b091..acc91c6d5ba3 100644 --- a/src/coreclr/src/utilcode/winfix.cpp +++ b/src/coreclr/src/utilcode/winfix.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // WinWrap.cpp // diff --git a/src/coreclr/src/utilcode/yieldprocessornormalized.cpp b/src/coreclr/src/utilcode/yieldprocessornormalized.cpp index 79d91f8c481c..4242f82792b4 100644 --- a/src/coreclr/src/utilcode/yieldprocessornormalized.cpp +++ b/src/coreclr/src/utilcode/yieldprocessornormalized.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "stdafx.h" diff --git a/src/coreclr/src/vm/.vscode/c_cpp_properties.json b/src/coreclr/src/vm/.vscode/c_cpp_properties.json index 569bf8cb3ebf..86adb9feee34 100644 --- a/src/coreclr/src/vm/.vscode/c_cpp_properties.json +++ b/src/coreclr/src/vm/.vscode/c_cpp_properties.json @@ -41,10 +41,8 @@ "TARGET_64BIT=1", "DEBUGGING_SUPPORTED", "EnC_SUPPORTED", - "FEATURE_APPX", "FEATURE_ARRAYSTUB_AS_IL", "FEATURE_BASICFREEZE", - "FEATURE_CLASSIC_COMINTEROP", "FEATURE_CODE_VERSIONING", "FEATURE_COLLECTIBLE_TYPES", "FEATURE_COMINTEROP", diff --git a/src/coreclr/src/vm/CMakeLists.txt b/src/coreclr/src/vm/CMakeLists.txt index a5b98ef3c86b..3af09016309a 100644 --- a/src/coreclr/src/vm/CMakeLists.txt +++ b/src/coreclr/src/vm/CMakeLists.txt @@ -304,10 +304,8 @@ set(VM_SOURCES_WKS cachelinealloc.cpp callhelpers.cpp callsiteinspect.cpp - ceemain.cpp clrconfignative.cpp clrex.cpp - clrprivbinderutil.cpp clrvarargs.cpp comdatetime.cpp comdependenthandle.cpp @@ -409,6 +407,9 @@ set(VM_SOURCES_WKS ${VM_SOURCES_GDBJIT} ) +# coreclr needs to compile codeman.cpp differently depending on flavor (i.e. dll vs. static lib)) +list(REMOVE_ITEM VM_SOURCES_WKS codeman.cpp) + set(VM_HEADERS_WKS ${VM_HEADERS_DAC_AND_WKS_COMMON} ../inc/jithelpers.h @@ -910,9 +911,16 @@ if (CLR_CMAKE_TARGET_WIN32) list(APPEND VM_SOURCES_DAC ${VM_HEADERS_DAC}) endif(CLR_CMAKE_TARGET_WIN32) +#these two files we need to compile differently for standalone and mergeable flavors of WKS +set (VM_SOURCES_WKS_SPECIAL + codeman.cpp + ceemain.cpp +) + convert_to_absolute_path(VM_SOURCES_WKS ${VM_SOURCES_WKS}) convert_to_absolute_path(VM_SOURCES_WKS_ARCH_ASM ${VM_SOURCES_WKS_ARCH_ASM}) convert_to_absolute_path(VM_SOURCES_DAC ${VM_SOURCES_DAC}) +convert_to_absolute_path(VM_SOURCES_WKS_SPECIAL ${VM_SOURCES_WKS_SPECIAL}) add_library_clr(cee_dac ${VM_SOURCES_DAC}) add_dependencies(cee_dac eventing_headers) diff --git a/src/coreclr/src/vm/amd64/AsmHelpers.asm b/src/coreclr/src/vm/amd64/AsmHelpers.asm index f65c6f0be8b5..cb5d1fad499d 100644 --- a/src/coreclr/src/vm/amd64/AsmHelpers.asm +++ b/src/coreclr/src/vm/amd64/AsmHelpers.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ; ==++== ; diff --git a/src/coreclr/src/vm/amd64/AsmMacros.inc b/src/coreclr/src/vm/amd64/AsmMacros.inc index ea77d1b1dbbf..32d8ecb4fe70 100644 --- a/src/coreclr/src/vm/amd64/AsmMacros.inc +++ b/src/coreclr/src/vm/amd64/AsmMacros.inc @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ; ; Define macros to build unwind data for prologues. diff --git a/src/coreclr/src/vm/amd64/CallDescrWorkerAMD64.asm b/src/coreclr/src/vm/amd64/CallDescrWorkerAMD64.asm index 6f6678b8d604..8d4e4e509429 100644 --- a/src/coreclr/src/vm/amd64/CallDescrWorkerAMD64.asm +++ b/src/coreclr/src/vm/amd64/CallDescrWorkerAMD64.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. include include diff --git a/src/coreclr/src/vm/amd64/ComCallPreStub.asm b/src/coreclr/src/vm/amd64/ComCallPreStub.asm index dc9e50f500a9..b0d6dd6617bf 100644 --- a/src/coreclr/src/vm/amd64/ComCallPreStub.asm +++ b/src/coreclr/src/vm/amd64/ComCallPreStub.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ; ==++== ; diff --git a/src/coreclr/src/vm/amd64/CrtHelpers.asm b/src/coreclr/src/vm/amd64/CrtHelpers.asm index 2025e3cc6231..f3b7a94f9bc3 100644 --- a/src/coreclr/src/vm/amd64/CrtHelpers.asm +++ b/src/coreclr/src/vm/amd64/CrtHelpers.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ; ==++== ; diff --git a/src/coreclr/src/vm/amd64/ExternalMethodFixupThunk.asm b/src/coreclr/src/vm/amd64/ExternalMethodFixupThunk.asm index 677f2e45db99..0fa438c8eb3a 100644 --- a/src/coreclr/src/vm/amd64/ExternalMethodFixupThunk.asm +++ b/src/coreclr/src/vm/amd64/ExternalMethodFixupThunk.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. include include AsmConstants.inc diff --git a/src/coreclr/src/vm/amd64/GenericComCallStubs.asm b/src/coreclr/src/vm/amd64/GenericComCallStubs.asm index c4ae4098282a..7946ff426fcd 100644 --- a/src/coreclr/src/vm/amd64/GenericComCallStubs.asm +++ b/src/coreclr/src/vm/amd64/GenericComCallStubs.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ; ==++== ; diff --git a/src/coreclr/src/vm/amd64/GenericComPlusCallStubs.asm b/src/coreclr/src/vm/amd64/GenericComPlusCallStubs.asm index 787d0604da41..452758dab45f 100644 --- a/src/coreclr/src/vm/amd64/GenericComPlusCallStubs.asm +++ b/src/coreclr/src/vm/amd64/GenericComPlusCallStubs.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ; ==++== ; diff --git a/src/coreclr/src/vm/amd64/JitHelpers_Fast.asm b/src/coreclr/src/vm/amd64/JitHelpers_Fast.asm index 8866399b41dd..28631e9f7b24 100644 --- a/src/coreclr/src/vm/amd64/JitHelpers_Fast.asm +++ b/src/coreclr/src/vm/amd64/JitHelpers_Fast.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ; ==++== ; diff --git a/src/coreclr/src/vm/amd64/JitHelpers_FastWriteBarriers.asm b/src/coreclr/src/vm/amd64/JitHelpers_FastWriteBarriers.asm index ebb26b8dd3c4..63dd1fadc73b 100644 --- a/src/coreclr/src/vm/amd64/JitHelpers_FastWriteBarriers.asm +++ b/src/coreclr/src/vm/amd64/JitHelpers_FastWriteBarriers.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ; ==++== ; diff --git a/src/coreclr/src/vm/amd64/JitHelpers_InlineGetThread.asm b/src/coreclr/src/vm/amd64/JitHelpers_InlineGetThread.asm index 56310faf72e7..5e93265cf548 100644 --- a/src/coreclr/src/vm/amd64/JitHelpers_InlineGetThread.asm +++ b/src/coreclr/src/vm/amd64/JitHelpers_InlineGetThread.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ; *********************************************************************** ; File: JitHelpers_InlineGetThread.asm, see history in jithelp.asm diff --git a/src/coreclr/src/vm/amd64/JitHelpers_SingleAppDomain.asm b/src/coreclr/src/vm/amd64/JitHelpers_SingleAppDomain.asm index 140fcc064194..62f47c7d059b 100644 --- a/src/coreclr/src/vm/amd64/JitHelpers_SingleAppDomain.asm +++ b/src/coreclr/src/vm/amd64/JitHelpers_SingleAppDomain.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ; ==++== ; diff --git a/src/coreclr/src/vm/amd64/JitHelpers_Slow.asm b/src/coreclr/src/vm/amd64/JitHelpers_Slow.asm index 5b687ce2e51c..52e258f19000 100644 --- a/src/coreclr/src/vm/amd64/JitHelpers_Slow.asm +++ b/src/coreclr/src/vm/amd64/JitHelpers_Slow.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ; ==++== ; diff --git a/src/coreclr/src/vm/amd64/PInvokeStubs.asm b/src/coreclr/src/vm/amd64/PInvokeStubs.asm index de785620041d..c7de7b75a001 100644 --- a/src/coreclr/src/vm/amd64/PInvokeStubs.asm +++ b/src/coreclr/src/vm/amd64/PInvokeStubs.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ; ==++== ; diff --git a/src/coreclr/src/vm/amd64/RedirectedHandledJITCase.asm b/src/coreclr/src/vm/amd64/RedirectedHandledJITCase.asm index fd69c6aa5fbf..5a3efffe358c 100644 --- a/src/coreclr/src/vm/amd64/RedirectedHandledJITCase.asm +++ b/src/coreclr/src/vm/amd64/RedirectedHandledJITCase.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ; ==++== ; diff --git a/src/coreclr/src/vm/amd64/ThePreStubAMD64.asm b/src/coreclr/src/vm/amd64/ThePreStubAMD64.asm index 86a97756326a..2be63172dcfc 100644 --- a/src/coreclr/src/vm/amd64/ThePreStubAMD64.asm +++ b/src/coreclr/src/vm/amd64/ThePreStubAMD64.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. include include AsmConstants.inc diff --git a/src/coreclr/src/vm/amd64/UMThunkStub.asm b/src/coreclr/src/vm/amd64/UMThunkStub.asm index cee986632955..20702b506ae6 100644 --- a/src/coreclr/src/vm/amd64/UMThunkStub.asm +++ b/src/coreclr/src/vm/amd64/UMThunkStub.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ; ==++== ; diff --git a/src/coreclr/src/vm/amd64/VirtualCallStubAMD64.asm b/src/coreclr/src/vm/amd64/VirtualCallStubAMD64.asm index 0fe760760759..606d08e5ef51 100644 --- a/src/coreclr/src/vm/amd64/VirtualCallStubAMD64.asm +++ b/src/coreclr/src/vm/amd64/VirtualCallStubAMD64.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. include include AsmConstants.inc diff --git a/src/coreclr/src/vm/amd64/asmconstants.h b/src/coreclr/src/vm/amd64/asmconstants.h index 87823489bd21..a073179f8121 100644 --- a/src/coreclr/src/vm/amd64/asmconstants.h +++ b/src/coreclr/src/vm/amd64/asmconstants.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // See makefile.inc. During the build, this file is converted into a .inc // file for inclusion by .asm files. The #defines are converted into EQU's. diff --git a/src/coreclr/src/vm/amd64/asmhelpers.S b/src/coreclr/src/vm/amd64/asmhelpers.S index beee743bc700..82d6984ab545 100644 --- a/src/coreclr/src/vm/amd64/asmhelpers.S +++ b/src/coreclr/src/vm/amd64/asmhelpers.S @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. .intel_syntax noprefix #include "unixasmmacros.inc" diff --git a/src/coreclr/src/vm/amd64/calldescrworkeramd64.S b/src/coreclr/src/vm/amd64/calldescrworkeramd64.S index 8ae983ac4672..532192bf4fb9 100644 --- a/src/coreclr/src/vm/amd64/calldescrworkeramd64.S +++ b/src/coreclr/src/vm/amd64/calldescrworkeramd64.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. .intel_syntax noprefix #include "unixasmmacros.inc" diff --git a/src/coreclr/src/vm/amd64/cgenamd64.cpp b/src/coreclr/src/vm/amd64/cgenamd64.cpp index 320884a50f46..153993cb37c2 100644 --- a/src/coreclr/src/vm/amd64/cgenamd64.cpp +++ b/src/coreclr/src/vm/amd64/cgenamd64.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // Various helper routines for generating AMD64 assembly code. // diff --git a/src/coreclr/src/vm/amd64/cgencpu.h b/src/coreclr/src/vm/amd64/cgencpu.h index 2b537bf2fc8d..0115cf7acb66 100644 --- a/src/coreclr/src/vm/amd64/cgencpu.h +++ b/src/coreclr/src/vm/amd64/cgencpu.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // CGENCPU.H - // // Various helper routines for generating AMD64 assembly code. diff --git a/src/coreclr/src/vm/amd64/crthelpers.S b/src/coreclr/src/vm/amd64/crthelpers.S index 7f3a5caed0b5..82219e574092 100644 --- a/src/coreclr/src/vm/amd64/crthelpers.S +++ b/src/coreclr/src/vm/amd64/crthelpers.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. .intel_syntax noprefix #include "unixasmmacros.inc" diff --git a/src/coreclr/src/vm/amd64/excepamd64.cpp b/src/coreclr/src/vm/amd64/excepamd64.cpp index bfe2ca6f4da5..5c93b0342d6c 100644 --- a/src/coreclr/src/vm/amd64/excepamd64.cpp +++ b/src/coreclr/src/vm/amd64/excepamd64.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* EXCEP.CPP * diff --git a/src/coreclr/src/vm/amd64/excepcpu.h b/src/coreclr/src/vm/amd64/excepcpu.h index 150416608bd9..8ac8456b70c0 100644 --- a/src/coreclr/src/vm/amd64/excepcpu.h +++ b/src/coreclr/src/vm/amd64/excepcpu.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/amd64/externalmethodfixupthunk.S b/src/coreclr/src/vm/amd64/externalmethodfixupthunk.S index 182e8cbfa849..f840a05c69af 100644 --- a/src/coreclr/src/vm/amd64/externalmethodfixupthunk.S +++ b/src/coreclr/src/vm/amd64/externalmethodfixupthunk.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. ; .intel_syntax noprefix #include "unixasmmacros.inc" diff --git a/src/coreclr/src/vm/amd64/getstate.S b/src/coreclr/src/vm/amd64/getstate.S index 0747cfcc0635..04d9ab707d59 100644 --- a/src/coreclr/src/vm/amd64/getstate.S +++ b/src/coreclr/src/vm/amd64/getstate.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. .intel_syntax noprefix #include "unixasmmacros.inc" diff --git a/src/coreclr/src/vm/amd64/getstate.asm b/src/coreclr/src/vm/amd64/getstate.asm index 51a2099b4e7d..864d2880c461 100644 --- a/src/coreclr/src/vm/amd64/getstate.asm +++ b/src/coreclr/src/vm/amd64/getstate.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ; ==++== ; diff --git a/src/coreclr/src/vm/amd64/gmsamd64.cpp b/src/coreclr/src/vm/amd64/gmsamd64.cpp index 344738561785..9c7f8cc5668f 100644 --- a/src/coreclr/src/vm/amd64/gmsamd64.cpp +++ b/src/coreclr/src/vm/amd64/gmsamd64.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /**************************************************************/ /* gmsAMD64.cpp */ diff --git a/src/coreclr/src/vm/amd64/gmscpu.h b/src/coreclr/src/vm/amd64/gmscpu.h index 2faa9256799c..31e758d8608e 100644 --- a/src/coreclr/src/vm/amd64/gmscpu.h +++ b/src/coreclr/src/vm/amd64/gmscpu.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /**************************************************************/ /* gmscpu.h */ diff --git a/src/coreclr/src/vm/amd64/jithelpers_fast.S b/src/coreclr/src/vm/amd64/jithelpers_fast.S index e55d60711810..3076a633fe98 100644 --- a/src/coreclr/src/vm/amd64/jithelpers_fast.S +++ b/src/coreclr/src/vm/amd64/jithelpers_fast.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. .intel_syntax noprefix #include "unixasmmacros.inc" @@ -33,8 +32,13 @@ LEAF_ENTRY JIT_CheckedWriteBarrier, _TEXT // See if this is in GCHeap PREPARE_EXTERNAL_VAR g_lowest_address, rax cmp rdi, [rax] +#ifdef FEATURE_WRITEBARRIER_COPY + // jb NotInHeap + .byte 0x72, 0x12 +#else // jb NotInHeap .byte 0x72, 0x0e +#endif PREPARE_EXTERNAL_VAR g_highest_address, rax cmp rdi, [rax] diff --git a/src/coreclr/src/vm/amd64/jithelpers_fastwritebarriers.S b/src/coreclr/src/vm/amd64/jithelpers_fastwritebarriers.S index f9b9b9f0bfd1..70d2f2072aa5 100644 --- a/src/coreclr/src/vm/amd64/jithelpers_fastwritebarriers.S +++ b/src/coreclr/src/vm/amd64/jithelpers_fastwritebarriers.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. .intel_syntax noprefix #include "unixasmmacros.inc" diff --git a/src/coreclr/src/vm/amd64/jithelpers_singleappdomain.S b/src/coreclr/src/vm/amd64/jithelpers_singleappdomain.S index aac06aab2d5b..9ab88a4702ab 100644 --- a/src/coreclr/src/vm/amd64/jithelpers_singleappdomain.S +++ b/src/coreclr/src/vm/amd64/jithelpers_singleappdomain.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. .intel_syntax noprefix #include "unixasmmacros.inc" diff --git a/src/coreclr/src/vm/amd64/jithelpers_slow.S b/src/coreclr/src/vm/amd64/jithelpers_slow.S index aa2e8cc06404..1757a7d1c5ad 100644 --- a/src/coreclr/src/vm/amd64/jithelpers_slow.S +++ b/src/coreclr/src/vm/amd64/jithelpers_slow.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. .intel_syntax noprefix #include "unixasmmacros.inc" diff --git a/src/coreclr/src/vm/amd64/jitinterfaceamd64.cpp b/src/coreclr/src/vm/amd64/jitinterfaceamd64.cpp index 4657bd7231bb..30ed32198d8d 100644 --- a/src/coreclr/src/vm/amd64/jitinterfaceamd64.cpp +++ b/src/coreclr/src/vm/amd64/jitinterfaceamd64.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: JITinterfaceCpu.CPP diff --git a/src/coreclr/src/vm/amd64/pinvokestubs.S b/src/coreclr/src/vm/amd64/pinvokestubs.S index a0db72eac5eb..c6febd27e2de 100644 --- a/src/coreclr/src/vm/amd64/pinvokestubs.S +++ b/src/coreclr/src/vm/amd64/pinvokestubs.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. .intel_syntax noprefix #include "unixasmmacros.inc" diff --git a/src/coreclr/src/vm/amd64/profiler.cpp b/src/coreclr/src/vm/amd64/profiler.cpp index 66a08fea1084..afe9685cda84 100644 --- a/src/coreclr/src/vm/amd64/profiler.cpp +++ b/src/coreclr/src/vm/amd64/profiler.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // FILE: profiler.cpp // diff --git a/src/coreclr/src/vm/amd64/stublinkeramd64.cpp b/src/coreclr/src/vm/amd64/stublinkeramd64.cpp index 71213e09c568..4799f36f28c7 100644 --- a/src/coreclr/src/vm/amd64/stublinkeramd64.cpp +++ b/src/coreclr/src/vm/amd64/stublinkeramd64.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "asmconstants.h" diff --git a/src/coreclr/src/vm/amd64/stublinkeramd64.h b/src/coreclr/src/vm/amd64/stublinkeramd64.h index 8f006b823ef8..0dc84215eeec 100644 --- a/src/coreclr/src/vm/amd64/stublinkeramd64.h +++ b/src/coreclr/src/vm/amd64/stublinkeramd64.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _STUBLINKERAMD64_H_ #define _STUBLINKERAMD64_H_ diff --git a/src/coreclr/src/vm/amd64/theprestubamd64.S b/src/coreclr/src/vm/amd64/theprestubamd64.S index ff8d836b9a58..82ddc075de6f 100644 --- a/src/coreclr/src/vm/amd64/theprestubamd64.S +++ b/src/coreclr/src/vm/amd64/theprestubamd64.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. .intel_syntax noprefix #include "unixasmmacros.inc" diff --git a/src/coreclr/src/vm/amd64/umthunkstub.S b/src/coreclr/src/vm/amd64/umthunkstub.S index a3bbb7f432a8..2abbbd222446 100644 --- a/src/coreclr/src/vm/amd64/umthunkstub.S +++ b/src/coreclr/src/vm/amd64/umthunkstub.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. .intel_syntax noprefix #include "unixasmmacros.inc" diff --git a/src/coreclr/src/vm/amd64/unixasmhelpers.S b/src/coreclr/src/vm/amd64/unixasmhelpers.S index 7ec56407aaef..0399fc61dc8e 100644 --- a/src/coreclr/src/vm/amd64/unixasmhelpers.S +++ b/src/coreclr/src/vm/amd64/unixasmhelpers.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. .intel_syntax noprefix #include "unixasmmacros.inc" diff --git a/src/coreclr/src/vm/amd64/unixstubs.cpp b/src/coreclr/src/vm/amd64/unixstubs.cpp index 4d680ae1317f..1de9b9a5b9d1 100644 --- a/src/coreclr/src/vm/amd64/unixstubs.cpp +++ b/src/coreclr/src/vm/amd64/unixstubs.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" diff --git a/src/coreclr/src/vm/amd64/virtualcallstubamd64.S b/src/coreclr/src/vm/amd64/virtualcallstubamd64.S index 45dcffe8a285..79498a00359a 100644 --- a/src/coreclr/src/vm/amd64/virtualcallstubamd64.S +++ b/src/coreclr/src/vm/amd64/virtualcallstubamd64.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. .intel_syntax noprefix #include "unixasmmacros.inc" diff --git a/src/coreclr/src/vm/amd64/virtualcallstubcpu.hpp b/src/coreclr/src/vm/amd64/virtualcallstubcpu.hpp index c91a85432e4e..3e6cabe5c09c 100644 --- a/src/coreclr/src/vm/amd64/virtualcallstubcpu.hpp +++ b/src/coreclr/src/vm/amd64/virtualcallstubcpu.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: AMD64/VirtualCallStubCpu.hpp // diff --git a/src/coreclr/src/vm/amsi.cpp b/src/coreclr/src/vm/amsi.cpp index 47da6708e5a0..4e2a36c130d1 100644 --- a/src/coreclr/src/vm/amsi.cpp +++ b/src/coreclr/src/vm/amsi.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: amsi.cpp // @@ -117,4 +116,4 @@ bool Amsi::IsBlockedByAmsiScan(PVOID flatImageBytes, COUNT_T size) return true; return false; -} \ No newline at end of file +} diff --git a/src/coreclr/src/vm/amsi.h b/src/coreclr/src/vm/amsi.h index 1583c4f18e73..4346514e8dd2 100644 --- a/src/coreclr/src/vm/amsi.h +++ b/src/coreclr/src/vm/amsi.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: amsi.h // diff --git a/src/coreclr/src/vm/appdomain.cpp b/src/coreclr/src/vm/appdomain.cpp index 1feaacbc2a74..8f5b4153d8e5 100644 --- a/src/coreclr/src/vm/appdomain.cpp +++ b/src/coreclr/src/vm/appdomain.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" @@ -122,34 +121,6 @@ ULONG SystemDomain::s_dNumAppDomains = 0; DWORD SystemDomain::m_dwLowestFreeIndex = 0; - - -// comparison function to be used for matching clsids in our clsid hash table -BOOL CompareCLSID(UPTR u1, UPTR u2) -{ - CONTRACTL - { - THROWS; - GC_TRIGGERS; - MODE_ANY; - INJECT_FAULT(COMPlusThrowOM();); - } - CONTRACTL_END; - - GUID *pguid = (GUID *)(u1 << 1); - _ASSERTE(pguid != NULL); - - MethodTable *pMT= (MethodTable *)u2; - _ASSERTE(pMT!= NULL); - - GUID guid; - pMT->GetGuid(&guid, TRUE); - if (!IsEqualIID(guid, *pguid)) - return FALSE; - - return TRUE; -} - #ifndef CROSSGEN_COMPILE // Constructor for the LargeHeapHandleBucket class. LargeHeapHandleBucket::LargeHeapHandleBucket(LargeHeapHandleBucket *pNext, DWORD Size, BaseDomain *pDomain) @@ -940,47 +911,6 @@ OBJECTREF* BaseDomain::AllocateObjRefPtrsInLargeTable(int nRequested, OBJECTREF* #endif // !DACCESS_COMPILE -#ifndef DACCESS_COMPILE - -// Insert class in the hash table -void AppDomain::InsertClassForCLSID(MethodTable* pMT, BOOL fForceInsert /*=FALSE*/) -{ - CONTRACTL - { - GC_TRIGGERS; - MODE_ANY; - THROWS; - INJECT_FAULT(COMPlusThrowOM();); - } - CONTRACTL_END; - - CVID cvid; - - // Ensure that registered classes are activated for allocation - pMT->EnsureInstanceActive(); - - // Note that it is possible for multiple classes to claim the same CLSID, and in such a - // case it is arbitrary which one we will return for a future query for a given app domain. - - pMT->GetGuid(&cvid, fForceInsert); - - if (!IsEqualIID(cvid, GUID_NULL)) - { - //@todo get a better key - LPVOID val = (LPVOID)pMT; - { - LockHolder lh(this); - - if (LookupClass(cvid) != pMT) - { - m_clsidHash.InsertValue(GetKeyFromGUID(&cvid), val); - } - } - } -} - -#endif // DACCESS_COMPILE - #ifdef FEATURE_COMINTEROP #ifndef CROSSGEN_COMPILE #ifndef DACCESS_COMPILE @@ -1711,32 +1641,18 @@ void SystemDomain::SetThreadAptState (Thread::ApartmentState state) if(state == Thread::AS_InSTA) { - Thread::ApartmentState pState = pThread->SetApartment(Thread::AS_InSTA, TRUE); + Thread::ApartmentState pState = pThread->SetApartment(Thread::AS_InSTA); _ASSERTE(pState == Thread::AS_InSTA); } else { // If an apartment state was not explicitly requested, default to MTA - Thread::ApartmentState pState = pThread->SetApartment(Thread::AS_InMTA, TRUE); + Thread::ApartmentState pState = pThread->SetApartment(Thread::AS_InMTA); _ASSERTE(pState == Thread::AS_InMTA); } } #endif // defined(FEATURE_COMINTEROP_APARTMENT_SUPPORT) && !defined(CROSSGEN_COMPILE) -#if defined(FEATURE_CLASSIC_COMINTEROP) && !defined(CROSSGEN_COMPILE) - -MethodTable *AppDomain::LoadCOMClass(GUID clsid, - BOOL bLoadRecord/*=FALSE*/, - BOOL* pfAssemblyInReg/*=NULL*/) -{ - // @CORESYSTODO: what to do here? - // If implemented, this should handle checking that the type actually has the requested CLSID - return NULL; -} - -#endif // FEATURE_CLASSIC_COMINTEROP && !CROSSGEN_COMPILE - - /*static*/ bool SystemDomain::IsReflectionInvocationMethod(MethodDesc* pMeth) { @@ -2346,11 +2262,6 @@ void AppDomain::Init() m_ReflectionCrst.Init(CrstReflection, CRST_UNSAFE_ANYMODE); m_RefClassFactCrst.Init(CrstClassFactInfoHash); - { - LockOwner lock = {&m_DomainCrst, IsOwnerOfCrst}; - m_clsidHash.Init(0,&CompareCLSID,true, &lock); // init hash table - } - SetStage(STAGE_READYFORMANAGEDCODE); #ifndef CROSSGEN_COMPILE @@ -4053,113 +3964,6 @@ BOOL AppDomain::PostBindResolveAssembly(AssemblySpec *pPrePolicySpec, return fFailure; } -//----------------------------------------------------------------------------------------------------------------- -HRESULT AppDomain::BindAssemblySpecForHostedBinder( - AssemblySpec * pSpec, - IAssemblyName * pAssemblyName, - ICLRPrivBinder * pBinder, - PEAssembly ** ppAssembly) -{ - STANDARD_VM_CONTRACT; - - PRECONDITION(CheckPointer(pSpec)); - PRECONDITION(pSpec->GetAppDomain() == this); - PRECONDITION(CheckPointer(ppAssembly)); - PRECONDITION(pSpec->GetCodeBase() == nullptr); - - HRESULT hr = S_OK; - - - // The Fusion binder can throw (to preserve compat, since it will actually perform an assembly - // load as part of it's bind), so we need to be careful here to catch any FileNotFoundException - // objects if fThrowIfNotFound is false. - ReleaseHolder pPrivAssembly; - - // We return HRESULTs here on failure instead of throwing as failures here are not necessarily indicative - // of an actual application problem. Returning an error code is substantially faster than throwing, and - // should be used when possible. - IfFailRet(pBinder->BindAssemblyByName(pAssemblyName, &pPrivAssembly)); - - IfFailRet(BindHostedPrivAssembly(nullptr, pPrivAssembly, pAssemblyName, ppAssembly)); - - - return S_OK; -} - -//----------------------------------------------------------------------------------------------------------------- -HRESULT -AppDomain::BindHostedPrivAssembly( - PEAssembly * pParentAssembly, - ICLRPrivAssembly * pPrivAssembly, - IAssemblyName * pAssemblyName, - PEAssembly ** ppAssembly) -{ - STANDARD_VM_CONTRACT; - - PRECONDITION(CheckPointer(pPrivAssembly)); - PRECONDITION(CheckPointer(ppAssembly)); - - HRESULT hr = S_OK; - - *ppAssembly = nullptr; - - // See if result has been previously loaded. - { - DomainAssembly* pDomainAssembly = FindAssembly(pPrivAssembly); - if (pDomainAssembly != nullptr) - { - *ppAssembly = clr::SafeAddRef(pDomainAssembly->GetFile()); - } - } - - if (*ppAssembly != nullptr) - { // Already exists: return the assembly. - return S_OK; - } - - // Get the IL PEFile. - PEImageHolder pPEImageIL; - { - // Does not already exist, so get the resource for the assembly and load it. - DWORD dwImageType; - ReleaseHolder pIResourceIL; - - IfFailRet(pPrivAssembly->GetImageResource(ASSEMBLY_IMAGE_TYPE_IL, &dwImageType, &pIResourceIL)); - _ASSERTE(dwImageType == ASSEMBLY_IMAGE_TYPE_IL); - - pPEImageIL = PEImage::OpenImage(pIResourceIL, MDInternalImport_Default); - } - - // See if an NI is available. - DWORD dwAvailableImages; - IfFailRet(pPrivAssembly->GetAvailableImageTypes(&dwAvailableImages)); - _ASSERTE(dwAvailableImages & ASSEMBLY_IMAGE_TYPE_IL); // Just double checking that IL bit is always set. - - // Get the NI PEFile if available. - PEImageHolder pPEImageNI; -#ifdef FEATURE_PREJIT - if (dwAvailableImages & ASSEMBLY_IMAGE_TYPE_NATIVE) - { - DWORD dwImageType; - ReleaseHolder pIResourceNI; - - IfFailRet(pPrivAssembly->GetImageResource(ASSEMBLY_IMAGE_TYPE_NATIVE, &dwImageType, &pIResourceNI)); - _ASSERTE(dwImageType == ASSEMBLY_IMAGE_TYPE_NATIVE || FAILED(hr)); - - pPEImageNI = PEImage::OpenImage(pIResourceNI, MDInternalImport_TrustedNativeImage); - } -#endif // FEATURE_PREJIT - _ASSERTE(pPEImageIL != nullptr); - - // Create a PEAssembly using the IL and NI images. - PEAssemblyHolder pPEAssembly = PEAssembly::Open(pParentAssembly, pPEImageIL, pPEImageNI, pPrivAssembly); - - // The result. - *ppAssembly = pPEAssembly.Extract(); - - return S_OK; -} // AppDomain::BindHostedPrivAssembly - //--------------------------------------------------------------------------------------------------------------------- PEAssembly * AppDomain::BindAssemblySpec( AssemblySpec * pSpec, @@ -4560,9 +4364,9 @@ AppDomain::RaiseUnhandledExceptionEvent(OBJECTREF *pThrowable, BOOL isTerminatin #endif // CROSSGEN_COMPILE -IUnknown *AppDomain::CreateBinderContext() +CLRPrivBinderCoreCLR *AppDomain::CreateBinderContext() { - CONTRACT(IUnknown *) + CONTRACT(CLRPrivBinderCoreCLR *) { GC_TRIGGERS; THROWS; @@ -6032,11 +5836,6 @@ void AppDomain::UnPublishHostedAssembly( } } } - else - { - // In AppX processes, all PEAssemblies that are reach this stage should have host binders. - _ASSERTE(!AppX::IsAppXProcess()); - } } #endif //!DACCESS_COMPILE diff --git a/src/coreclr/src/vm/appdomain.hpp b/src/coreclr/src/vm/appdomain.hpp index def9b2f025f9..8a73d95c8fcf 100644 --- a/src/coreclr/src/vm/appdomain.hpp +++ b/src/coreclr/src/vm/appdomain.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** @@ -34,8 +33,6 @@ #include "multicorejit.h" #endif -#include "appxutil.h" - #include "tieredcompilation.h" #include "codeversion.h" @@ -1953,18 +1950,6 @@ class AppDomain : public BaseDomain AssemblySpec *pSpec, BOOL fThrowOnFileNotFound) DAC_EMPTY_RET(NULL); - HRESULT BindAssemblySpecForHostedBinder( - AssemblySpec * pSpec, - IAssemblyName * pAssemblyName, - ICLRPrivBinder * pBinder, - PEAssembly ** ppAssembly) DAC_EMPTY_RET(E_FAIL); - - HRESULT BindHostedPrivAssembly( - PEAssembly * pParentPEAssembly, - ICLRPrivAssembly * pPrivAssembly, - IAssemblyName * pAssemblyName, - PEAssembly ** ppAssembly) DAC_EMPTY_RET(S_OK); - //**************************************************************************************** // //**************************************************************************************** @@ -2001,38 +1986,11 @@ class AppDomain : public BaseDomain void SetupSharedStatics(); - //**************************************************************************************** - // - // Create a quick lookup for classes loaded into this domain based on their GUID. - // - void InsertClassForCLSID(MethodTable* pMT, BOOL fForceInsert = FALSE); - #ifdef FEATURE_COMINTEROP public: - MethodTable *LoadCOMClass(GUID clsid, BOOL bLoadRecord = FALSE, BOOL* pfAssemblyInReg = NULL); OBJECTREF GetMissingObject(); // DispatchInfo will call function to retrieve the Missing.Value object. #endif // FEATURE_COMINTEROP -#ifndef DACCESS_COMPILE - MethodTable* LookupClass(REFIID iid) - { - WRAPPER_NO_CONTRACT; - - MethodTable *pMT = (MethodTable*) m_clsidHash.LookupValue((UPTR) GetKeyFromGUID(&iid), (LPVOID)&iid); - return (pMT == (MethodTable*) INVALIDENTRY - ? NULL - : pMT); - } -#endif // DACCESS_COMPILE - - //@todo get a better key - ULONG GetKeyFromGUID(const GUID *pguid) - { - LIMITED_METHOD_CONTRACT; - - return *(ULONG *) pguid; - } - #ifdef FEATURE_COMINTEROP RCWCache *GetRCWCache() { @@ -2065,7 +2023,7 @@ class AppDomain : public BaseDomain return m_tpIndex; } - IUnknown *CreateBinderContext(); + CLRPrivBinderCoreCLR *CreateBinderContext(); void SetIgnoreUnhandledExceptions() { @@ -2319,14 +2277,9 @@ class AppDomain : public BaseDomain // by one. For it to hit zero an explicit close must have happened. LONG m_cRef; // Ref count. - // Hash table that maps a clsid to a type - PtrHashMap m_clsidHash; - -#ifndef DACCESS_COMPILE // Map of loaded composite native images indexed by base load addresses CrstExplicitInit m_nativeImageLoadCrst; MapSHash m_nativeImageMap; -#endif #ifdef FEATURE_COMINTEROP // this cache stores the RCWs in this domain diff --git a/src/coreclr/src/vm/appdomain.inl b/src/coreclr/src/vm/appdomain.inl index 38984aca5f2e..46f079f4b49c 100644 --- a/src/coreclr/src/vm/appdomain.inl +++ b/src/coreclr/src/vm/appdomain.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** ** Header: AppDomain.i diff --git a/src/coreclr/src/vm/appdomainnative.cpp b/src/coreclr/src/vm/appdomainnative.cpp index 25e4e8f54774..9df486ba46ff 100644 --- a/src/coreclr/src/vm/appdomainnative.cpp +++ b/src/coreclr/src/vm/appdomainnative.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. @@ -11,9 +10,6 @@ #include "eeconfig.h" #include "appdomain.inl" #include "eventtrace.h" -#if defined(FEATURE_APPX) -#include "appxutil.h" -#endif // FEATURE_APPX #include "../binder/inc/clrprivbindercoreclr.h" #include "clr/fs/path.h" @@ -51,24 +47,6 @@ void QCALLTYPE AppDomainNative::CreateDynamicAssembly(QCall::ObjectHandleOnStack END_QCALL; } -#ifdef FEATURE_APPX -// static -BOOL QCALLTYPE AppDomainNative::IsAppXProcess() -{ - QCALL_CONTRACT; - - BOOL result; - - BEGIN_QCALL; - - result = AppX::IsAppXProcess(); - - END_QCALL; - - return result; -} -#endif // FEATURE_APPX - FCIMPL0(Object*, AppDomainNative::GetLoadedAssemblies) { FCALL_CONTRACT; diff --git a/src/coreclr/src/vm/appdomainnative.hpp b/src/coreclr/src/vm/appdomainnative.hpp index 7a4d3bb6621d..d15a70e2dc8a 100644 --- a/src/coreclr/src/vm/appdomainnative.hpp +++ b/src/coreclr/src/vm/appdomainnative.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. @@ -24,10 +23,6 @@ class AppDomainNative static FCDECL0(Object*, GetLoadedAssemblies); static FCDECL1(Object*, GetOrInternString, StringObject* pStringUNSAFE); static FCDECL1(Object*, IsStringInterned, StringObject* pString); - -#ifdef FEATURE_APPX - static INT32 QCALLTYPE IsAppXProcess(); -#endif }; #endif diff --git a/src/coreclr/src/vm/argdestination.h b/src/coreclr/src/vm/argdestination.h index 004f91b4a48e..cc55fbeffe08 100644 --- a/src/coreclr/src/vm/argdestination.h +++ b/src/coreclr/src/vm/argdestination.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // #ifndef __ARGDESTINATION_H__ diff --git a/src/coreclr/src/vm/argslot.h b/src/coreclr/src/vm/argslot.h index 9729227eeda6..757f4ef0b657 100644 --- a/src/coreclr/src/vm/argslot.h +++ b/src/coreclr/src/vm/argslot.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================================ // File: argslot.h // diff --git a/src/coreclr/src/vm/arm/CrtHelpers.asm b/src/coreclr/src/vm/arm/CrtHelpers.asm index 327296448b08..bbc0e1be4caf 100644 --- a/src/coreclr/src/vm/arm/CrtHelpers.asm +++ b/src/coreclr/src/vm/arm/CrtHelpers.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ; ==++== ; diff --git a/src/coreclr/src/vm/arm/PInvokeStubs.asm b/src/coreclr/src/vm/arm/PInvokeStubs.asm index 21a6c70047a9..9dba414ab797 100644 --- a/src/coreclr/src/vm/arm/PInvokeStubs.asm +++ b/src/coreclr/src/vm/arm/PInvokeStubs.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ;; ==++== ;; diff --git a/src/coreclr/src/vm/arm/armsinglestepper.cpp b/src/coreclr/src/vm/arm/armsinglestepper.cpp index 7b7b578c93b2..79317263b222 100644 --- a/src/coreclr/src/vm/arm/armsinglestepper.cpp +++ b/src/coreclr/src/vm/arm/armsinglestepper.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/arm/asmconstants.h b/src/coreclr/src/vm/arm/asmconstants.h index 58bbb8807098..a307674c81b1 100644 --- a/src/coreclr/src/vm/arm/asmconstants.h +++ b/src/coreclr/src/vm/arm/asmconstants.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // asmconstants.h - // // This header defines field offsets and constants used by assembly code diff --git a/src/coreclr/src/vm/arm/asmhelpers.S b/src/coreclr/src/vm/arm/asmhelpers.S index e7f61937d886..dbc7baa9a175 100644 --- a/src/coreclr/src/vm/arm/asmhelpers.S +++ b/src/coreclr/src/vm/arm/asmhelpers.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ==++== // diff --git a/src/coreclr/src/vm/arm/asmhelpers.asm b/src/coreclr/src/vm/arm/asmhelpers.asm index 26b8619aef3c..1565c13d3d45 100644 --- a/src/coreclr/src/vm/arm/asmhelpers.asm +++ b/src/coreclr/src/vm/arm/asmhelpers.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ;; ==++== ;; diff --git a/src/coreclr/src/vm/arm/asmmacros.h b/src/coreclr/src/vm/arm/asmmacros.h index 4ba5e20fbb42..ad3826cd8b2e 100644 --- a/src/coreclr/src/vm/arm/asmmacros.h +++ b/src/coreclr/src/vm/arm/asmmacros.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. ;; ==++== ;; diff --git a/src/coreclr/src/vm/arm/cgencpu.h b/src/coreclr/src/vm/arm/cgencpu.h index 7b23a51c61a5..51cb67acba0d 100644 --- a/src/coreclr/src/vm/arm/cgencpu.h +++ b/src/coreclr/src/vm/arm/cgencpu.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/vm/arm/crthelpers.S b/src/coreclr/src/vm/arm/crthelpers.S index 4dbb4e779945..4cae82caed60 100644 --- a/src/coreclr/src/vm/arm/crthelpers.S +++ b/src/coreclr/src/vm/arm/crthelpers.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ==++== // diff --git a/src/coreclr/src/vm/arm/ehhelpers.S b/src/coreclr/src/vm/arm/ehhelpers.S index c86fd74b70cc..b16b317d52f1 100644 --- a/src/coreclr/src/vm/arm/ehhelpers.S +++ b/src/coreclr/src/vm/arm/ehhelpers.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ==++== // diff --git a/src/coreclr/src/vm/arm/ehhelpers.asm b/src/coreclr/src/vm/arm/ehhelpers.asm index ca6e2d27744f..77ea8fdb4a47 100644 --- a/src/coreclr/src/vm/arm/ehhelpers.asm +++ b/src/coreclr/src/vm/arm/ehhelpers.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ; ==++== ; diff --git a/src/coreclr/src/vm/arm/exceparm.cpp b/src/coreclr/src/vm/arm/exceparm.cpp index 9e19a46b4f58..d82646cff70f 100644 --- a/src/coreclr/src/vm/arm/exceparm.cpp +++ b/src/coreclr/src/vm/arm/exceparm.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: ExcepArm.cpp diff --git a/src/coreclr/src/vm/arm/excepcpu.h b/src/coreclr/src/vm/arm/excepcpu.h index fc0c44e5dea2..edde9e2f123d 100644 --- a/src/coreclr/src/vm/arm/excepcpu.h +++ b/src/coreclr/src/vm/arm/excepcpu.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/arm/gmscpu.h b/src/coreclr/src/vm/arm/gmscpu.h index 30f41a6ec4a1..7ee46c472868 100644 --- a/src/coreclr/src/vm/arm/gmscpu.h +++ b/src/coreclr/src/vm/arm/gmscpu.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /**************************************************************/ /* gmscpu.h */ diff --git a/src/coreclr/src/vm/arm/patchedcode.S b/src/coreclr/src/vm/arm/patchedcode.S index 1897a7d0be35..1f224a55bd82 100644 --- a/src/coreclr/src/vm/arm/patchedcode.S +++ b/src/coreclr/src/vm/arm/patchedcode.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ==++== // diff --git a/src/coreclr/src/vm/arm/patchedcode.asm b/src/coreclr/src/vm/arm/patchedcode.asm index 6f4151b324b2..7f043f61be68 100644 --- a/src/coreclr/src/vm/arm/patchedcode.asm +++ b/src/coreclr/src/vm/arm/patchedcode.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ;; ==++== ;; diff --git a/src/coreclr/src/vm/arm/pinvokestubs.S b/src/coreclr/src/vm/arm/pinvokestubs.S index 000bc8f3ead8..483816c0dd2c 100644 --- a/src/coreclr/src/vm/arm/pinvokestubs.S +++ b/src/coreclr/src/vm/arm/pinvokestubs.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //; ==++== //; diff --git a/src/coreclr/src/vm/arm/profiler.cpp b/src/coreclr/src/vm/arm/profiler.cpp index a39e732c24f2..8bcd075fe986 100644 --- a/src/coreclr/src/vm/arm/profiler.cpp +++ b/src/coreclr/src/vm/arm/profiler.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // FILE: profiler.cpp // diff --git a/src/coreclr/src/vm/arm/stubs.cpp b/src/coreclr/src/vm/arm/stubs.cpp index caa80afc9831..18407fb421c7 100644 --- a/src/coreclr/src/vm/arm/stubs.cpp +++ b/src/coreclr/src/vm/arm/stubs.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: stubs.cpp // diff --git a/src/coreclr/src/vm/arm/unixstubs.cpp b/src/coreclr/src/vm/arm/unixstubs.cpp index b1462fab3adb..9b313f8475f6 100644 --- a/src/coreclr/src/vm/arm/unixstubs.cpp +++ b/src/coreclr/src/vm/arm/unixstubs.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" diff --git a/src/coreclr/src/vm/arm/virtualcallstubcpu.hpp b/src/coreclr/src/vm/arm/virtualcallstubcpu.hpp index a61b31e2ce45..0abf9ad57229 100644 --- a/src/coreclr/src/vm/arm/virtualcallstubcpu.hpp +++ b/src/coreclr/src/vm/arm/virtualcallstubcpu.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // VirtualCallStubCpu.hpp // diff --git a/src/coreclr/src/vm/arm64/CallDescrWorkerARM64.asm b/src/coreclr/src/vm/arm64/CallDescrWorkerARM64.asm index 9817e2dbffcf..389e98bfc69e 100644 --- a/src/coreclr/src/vm/arm64/CallDescrWorkerARM64.asm +++ b/src/coreclr/src/vm/arm64/CallDescrWorkerARM64.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ;; ==++== ;; diff --git a/src/coreclr/src/vm/arm64/PInvokeStubs.asm b/src/coreclr/src/vm/arm64/PInvokeStubs.asm index 2ab6cb335e7a..f75b2b5a77e7 100644 --- a/src/coreclr/src/vm/arm64/PInvokeStubs.asm +++ b/src/coreclr/src/vm/arm64/PInvokeStubs.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ; ==++== ;; @@ -180,8 +179,8 @@ __PInvokeStubWorkerName SETS "$FuncPrefix":CC:"StubWorker" ;; Check return trap ldr x9, =g_TrapReturningThreads - ldr x9, [x9] - cbnz x9, RarePath + ldr w9, [x9] + cbnz w9, RarePath ;; pThread->m_pFrame = pFrame->m_Next ldr x9, [x0, #Frame__m_Next] diff --git a/src/coreclr/src/vm/arm64/arm64singlestepper.cpp b/src/coreclr/src/vm/arm64/arm64singlestepper.cpp index fdf95a4d80f4..893479a61562 100644 --- a/src/coreclr/src/vm/arm64/arm64singlestepper.cpp +++ b/src/coreclr/src/vm/arm64/arm64singlestepper.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/arm64/asmconstants.h b/src/coreclr/src/vm/arm64/asmconstants.h index bb65454a7fd2..45762f5a238a 100644 --- a/src/coreclr/src/vm/arm64/asmconstants.h +++ b/src/coreclr/src/vm/arm64/asmconstants.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // asmconstants.h - // // This header defines field offsets and constants used by assembly code diff --git a/src/coreclr/src/vm/arm64/asmhelpers.S b/src/coreclr/src/vm/arm64/asmhelpers.S index 48a82f1e9765..9ff8203f22f4 100644 --- a/src/coreclr/src/vm/arm64/asmhelpers.S +++ b/src/coreclr/src/vm/arm64/asmhelpers.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "asmconstants.h" #include "unixasmmacros.inc" @@ -545,6 +544,8 @@ NESTED_ENTRY ExternalMethodFixupStub, _TEXT, NoHandler add x0, sp, #__PWTB_TransitionBlock // pTransitionBlock mov x1, x12 // pThunk + mov x2, #0 // sectionIndex + mov x3, #0 // pModule bl C_FUNC(ExternalMethodFixupWorker) diff --git a/src/coreclr/src/vm/arm64/asmhelpers.asm b/src/coreclr/src/vm/arm64/asmhelpers.asm index 2e58e43fec73..1250bd326520 100644 --- a/src/coreclr/src/vm/arm64/asmhelpers.asm +++ b/src/coreclr/src/vm/arm64/asmhelpers.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ;; ==++== ;; @@ -46,7 +45,6 @@ IMPORT g_lowest_address IMPORT g_highest_address IMPORT g_card_table - IMPORT g_TrapReturningThreads IMPORT g_dispatch_cache_chain_success_counter #ifdef WRITE_BARRIER_CHECK SETALIAS g_GCShadow, ?g_GCShadow@@3PEAEEA @@ -612,6 +610,8 @@ Exit add x0, sp, #__PWTB_TransitionBlock ; pTransitionBlock mov x1, x12 ; pThunk + mov x2, #0 ; sectionIndex + mov x3, #0 ; pModule bl ExternalMethodFixupWorker diff --git a/src/coreclr/src/vm/arm64/asmmacros.h b/src/coreclr/src/vm/arm64/asmmacros.h index f1caa02507de..fae7ec3309ae 100644 --- a/src/coreclr/src/vm/arm64/asmmacros.h +++ b/src/coreclr/src/vm/arm64/asmmacros.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. ;; ==++== ;; diff --git a/src/coreclr/src/vm/arm64/calldescrworkerarm64.S b/src/coreclr/src/vm/arm64/calldescrworkerarm64.S index 8cb3f29e95f8..ccb4c3f73b64 100644 --- a/src/coreclr/src/vm/arm64/calldescrworkerarm64.S +++ b/src/coreclr/src/vm/arm64/calldescrworkerarm64.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "unixasmmacros.inc" #include "asmconstants.h" diff --git a/src/coreclr/src/vm/arm64/cgencpu.h b/src/coreclr/src/vm/arm64/cgencpu.h index 999a40df1e84..5eb7daf38fa7 100644 --- a/src/coreclr/src/vm/arm64/cgencpu.h +++ b/src/coreclr/src/vm/arm64/cgencpu.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/vm/arm64/crthelpers.S b/src/coreclr/src/vm/arm64/crthelpers.S index c0317edf5799..387bfc8a943c 100644 --- a/src/coreclr/src/vm/arm64/crthelpers.S +++ b/src/coreclr/src/vm/arm64/crthelpers.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "unixasmmacros.inc" diff --git a/src/coreclr/src/vm/arm64/crthelpers.asm b/src/coreclr/src/vm/arm64/crthelpers.asm index 51483b8647d9..cb3c4d73bd3b 100644 --- a/src/coreclr/src/vm/arm64/crthelpers.asm +++ b/src/coreclr/src/vm/arm64/crthelpers.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ;; ==++== ;; diff --git a/src/coreclr/src/vm/arm64/excepcpu.h b/src/coreclr/src/vm/arm64/excepcpu.h index faa0e4801319..9b73dbae2f77 100644 --- a/src/coreclr/src/vm/arm64/excepcpu.h +++ b/src/coreclr/src/vm/arm64/excepcpu.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/arm64/gmscpu.h b/src/coreclr/src/vm/arm64/gmscpu.h index 92e1b0f0fd57..0c48f007b7bd 100644 --- a/src/coreclr/src/vm/arm64/gmscpu.h +++ b/src/coreclr/src/vm/arm64/gmscpu.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /**************************************************************/ /* gmscpu.h */ diff --git a/src/coreclr/src/vm/arm64/pinvokestubs.S b/src/coreclr/src/vm/arm64/pinvokestubs.S index a81ccf28d50a..8002ea2b4e03 100644 --- a/src/coreclr/src/vm/arm64/pinvokestubs.S +++ b/src/coreclr/src/vm/arm64/pinvokestubs.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ==++== // @@ -158,8 +157,8 @@ LOCAL_LABEL(\__PInvokeStubFuncName\()_0): // Check return trap PREPARE_EXTERNAL_VAR g_TrapReturningThreads, x9 - ldr x9, [x9] - cbnz x9, LOCAL_LABEL(RarePath) + ldr w9, [x9] + cbnz w9, LOCAL_LABEL(RarePath) // pThread->m_pFrame = pFrame->m_Next ldr x9, [x0, #Frame__m_Next] diff --git a/src/coreclr/src/vm/arm64/profiler.cpp b/src/coreclr/src/vm/arm64/profiler.cpp index 91c4640e5f49..64bd9603c877 100644 --- a/src/coreclr/src/vm/arm64/profiler.cpp +++ b/src/coreclr/src/vm/arm64/profiler.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" diff --git a/src/coreclr/src/vm/arm64/stubs.cpp b/src/coreclr/src/vm/arm64/stubs.cpp index 2c482db470ff..ac8466c22fac 100644 --- a/src/coreclr/src/vm/arm64/stubs.cpp +++ b/src/coreclr/src/vm/arm64/stubs.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: stubs.cpp // diff --git a/src/coreclr/src/vm/arm64/unixstubs.cpp b/src/coreclr/src/vm/arm64/unixstubs.cpp index 1d323bf571b8..d51902a949f2 100644 --- a/src/coreclr/src/vm/arm64/unixstubs.cpp +++ b/src/coreclr/src/vm/arm64/unixstubs.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" diff --git a/src/coreclr/src/vm/arm64/virtualcallstubcpu.hpp b/src/coreclr/src/vm/arm64/virtualcallstubcpu.hpp index 6f011fc0df4f..890cf39cbaa8 100644 --- a/src/coreclr/src/vm/arm64/virtualcallstubcpu.hpp +++ b/src/coreclr/src/vm/arm64/virtualcallstubcpu.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // VirtualCallStubCpu.hpp // diff --git a/src/coreclr/src/vm/arm64singlestepper.h b/src/coreclr/src/vm/arm64singlestepper.h index 4d53cbed96f9..e81dd588b5c8 100644 --- a/src/coreclr/src/vm/arm64singlestepper.h +++ b/src/coreclr/src/vm/arm64singlestepper.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/armsinglestepper.h b/src/coreclr/src/vm/armsinglestepper.h index 787bedd1ff39..38ac2ca68400 100644 --- a/src/coreclr/src/vm/armsinglestepper.h +++ b/src/coreclr/src/vm/armsinglestepper.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/array.cpp b/src/coreclr/src/vm/array.cpp index 78b9aa3af65a..dd35b491e9d7 100644 --- a/src/coreclr/src/vm/array.cpp +++ b/src/coreclr/src/vm/array.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // File: ARRAY.CPP // diff --git a/src/coreclr/src/vm/array.h b/src/coreclr/src/vm/array.h index 9b5a1f92220b..51a7c988c4af 100644 --- a/src/coreclr/src/vm/array.h +++ b/src/coreclr/src/vm/array.h @@ -1,17 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _ARRAY_H_ #define _ARRAY_H_ -#define MAX_RANK 32 // If you make this bigger, you need to make MAX_CLASSNAME_LENGTH bigger too. - // if you have an 32 dim array with at least 2 elements in each dim that - // takes up 4Gig!!! Thus this is a reasonable maximum. -// (Note: at the time of the above comment, the rank was 32, and -// MAX_CLASSNAME_LENGTH was 256. I'm now changing MAX_CLASSNAME_LENGTH -// to 1024, but not changing MAX_RANK.) +// A 32 dimension array with at least 2 elements in each dimension requires +// 4gb of memory. Limit the maximum number of dimensions to a value that +// requires 4gb of memory. +// If you make this bigger, you need to make MAX_CLASSNAME_LENGTH bigger too. +#define MAX_RANK 32 class MethodTable; diff --git a/src/coreclr/src/vm/assembly.cpp b/src/coreclr/src/vm/assembly.cpp index 84a3585475d1..8bfb3d283a7c 100644 --- a/src/coreclr/src/vm/assembly.cpp +++ b/src/coreclr/src/vm/assembly.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** @@ -119,13 +118,13 @@ Assembly::Assembly(BaseDomain *pDomain, PEAssembly* pFile, DebuggerAssemblyContr #ifdef FEATURE_COMINTEROP m_pITypeLib(NULL), #endif // FEATURE_COMINTEROP - m_debuggerFlags(debuggerFlags), - m_fTerminated(FALSE) #ifdef FEATURE_COMINTEROP - , m_InteropAttributeStatus(INTEROP_ATTRIBUTE_UNSET) + m_InteropAttributeStatus(INTEROP_ATTRIBUTE_UNSET), #endif + m_debuggerFlags(debuggerFlags), + m_fTerminated(FALSE), #if defined(FEATURE_PREJIT) || defined(FEATURE_READYTORUN) - , m_isInstrumentedStatus(IS_INSTRUMENTED_UNSET) + m_isInstrumentedStatus(IS_INSTRUMENTED_UNSET) #endif { STANDARD_VM_CONTRACT; diff --git a/src/coreclr/src/vm/assembly.hpp b/src/coreclr/src/vm/assembly.hpp index 20ae17ec4aaf..26291d2c0f65 100644 --- a/src/coreclr/src/vm/assembly.hpp +++ b/src/coreclr/src/vm/assembly.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/vm/assemblyloadcontext.cpp b/src/coreclr/src/vm/assemblyloadcontext.cpp index fa226ddfadea..eed482ce830b 100644 --- a/src/coreclr/src/vm/assemblyloadcontext.cpp +++ b/src/coreclr/src/vm/assemblyloadcontext.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "nativeimage.h" diff --git a/src/coreclr/src/vm/assemblyloadcontext.h b/src/coreclr/src/vm/assemblyloadcontext.h index b18ecf6249fc..9455567b7a52 100644 --- a/src/coreclr/src/vm/assemblyloadcontext.h +++ b/src/coreclr/src/vm/assemblyloadcontext.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _ASSEMBLYLOADCONTEXT_H #define _ASSEMBLYLOADCONTEXT_H @@ -23,6 +22,24 @@ class AssemblyLoadContext : public IUnknownCommon m_nativeImages; }; #endif diff --git a/src/coreclr/src/vm/assemblyname.cpp b/src/coreclr/src/vm/assemblyname.cpp index f9291158bc38..60b46cfc6449 100644 --- a/src/coreclr/src/vm/assemblyname.cpp +++ b/src/coreclr/src/vm/assemblyname.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** @@ -21,6 +20,7 @@ #include "assemblyname.hpp" #include "field.h" +#include "strongnameholders.h" #include "strongnameinternal.h" #include "eeconfig.h" diff --git a/src/coreclr/src/vm/assemblyname.hpp b/src/coreclr/src/vm/assemblyname.hpp index c333a51705b9..9e818fc1a9f7 100644 --- a/src/coreclr/src/vm/assemblyname.hpp +++ b/src/coreclr/src/vm/assemblyname.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/vm/assemblynative.cpp b/src/coreclr/src/vm/assemblynative.cpp index 3b85f68d59b8..b5701e8bcbbe 100644 --- a/src/coreclr/src/vm/assemblynative.cpp +++ b/src/coreclr/src/vm/assemblynative.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/vm/assemblynative.hpp b/src/coreclr/src/vm/assemblynative.hpp index 7c6c184a4fc7..db80d9a8a282 100644 --- a/src/coreclr/src/vm/assemblynative.hpp +++ b/src/coreclr/src/vm/assemblynative.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/vm/assemblyspec.cpp b/src/coreclr/src/vm/assemblyspec.cpp index cbf8d4aedb19..ad035b2daf62 100644 --- a/src/coreclr/src/vm/assemblyspec.cpp +++ b/src/coreclr/src/vm/assemblyspec.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** @@ -24,10 +23,6 @@ #include "strongnameholders.h" #include "eventtrace.h" -#ifdef FEATURE_COMINTEROP -#include "clrprivbinderutil.h" -#endif - #include "../binder/inc/bindertracing.h" #ifdef _DEBUG diff --git a/src/coreclr/src/vm/assemblyspec.hpp b/src/coreclr/src/vm/assemblyspec.hpp index ca7d73f1f212..70f7b9ac760d 100644 --- a/src/coreclr/src/vm/assemblyspec.hpp +++ b/src/coreclr/src/vm/assemblyspec.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/vm/assemblyspecbase.h b/src/coreclr/src/vm/assemblyspecbase.h index 3442c9184e2f..00cd7a1105df 100644 --- a/src/coreclr/src/vm/assemblyspecbase.h +++ b/src/coreclr/src/vm/assemblyspecbase.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // AssemblySpecBase.h diff --git a/src/coreclr/src/vm/autotrace.cpp b/src/coreclr/src/vm/autotrace.cpp index 158708dec69a..8ebfdd907666 100644 --- a/src/coreclr/src/vm/autotrace.cpp +++ b/src/coreclr/src/vm/autotrace.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /** * diff --git a/src/coreclr/src/vm/autotrace.h b/src/coreclr/src/vm/autotrace.h index e3c5393567cc..086817419d0b 100644 --- a/src/coreclr/src/vm/autotrace.h +++ b/src/coreclr/src/vm/autotrace.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __AUTO_TRACE_H__ #define __AUTO_TRACE_H__ @@ -13,4 +12,4 @@ void auto_trace_wait(); void auto_trace_signal(); #endif // FEATURE_AUTO_TRACE -#endif // __AUTO_TRACE_H__ \ No newline at end of file +#endif // __AUTO_TRACE_H__ diff --git a/src/coreclr/src/vm/baseassemblyspec.cpp b/src/coreclr/src/vm/baseassemblyspec.cpp index 515e811611f9..864dd2ec44b0 100644 --- a/src/coreclr/src/vm/baseassemblyspec.cpp +++ b/src/coreclr/src/vm/baseassemblyspec.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // BaseAssemblySpec.cpp @@ -542,132 +541,4 @@ HRESULT BaseAssemblySpec::Init(IAssemblyName *pName) return S_OK; } -HRESULT BaseAssemblySpec::CreateFusionName( - IAssemblyName **ppName, - BOOL fIncludeCodeBase/*=TRUE*/, - BOOL fMustBeBindable /*=FALSE*/) const -{ - CONTRACTL - { - NOTHROW; - GC_NOTRIGGER; - MODE_ANY; - } - CONTRACTL_END; - - HRESULT hr = S_OK; - - EX_TRY - { - IAssemblyName *pFusionAssemblyName = NULL; - LPWSTR pwLocale = NULL; - CQuickBytes qb; - - NonVMComHolder< IAssemblyName > holder(NULL); - - SmallStackSString ssAssemblyName; - GetName(ssAssemblyName); - - IfFailGo(CreateAssemblyNameObject(&pFusionAssemblyName, ssAssemblyName.GetUnicode(), false /*parseDisplayName*/)); - - holder = pFusionAssemblyName; - - if (m_context.usMajorVersion != (USHORT) -1) { - IfFailGo(pFusionAssemblyName->SetProperty(ASM_NAME_MAJOR_VERSION, - &m_context.usMajorVersion, - sizeof(USHORT))); - - if (m_context.usMinorVersion != (USHORT) -1) { - IfFailGo(pFusionAssemblyName->SetProperty(ASM_NAME_MINOR_VERSION, - &m_context.usMinorVersion, - sizeof(USHORT))); - - if (m_context.usBuildNumber != (USHORT) -1) { - IfFailGo(pFusionAssemblyName->SetProperty(ASM_NAME_BUILD_NUMBER, - &m_context.usBuildNumber, - sizeof(USHORT))); - - if (m_context.usRevisionNumber != (USHORT) -1) - IfFailGo(pFusionAssemblyName->SetProperty(ASM_NAME_REVISION_NUMBER, - &m_context.usRevisionNumber, - sizeof(USHORT))); - } - } - } - - if (m_context.szLocale) { - int pwLocaleLen = WszMultiByteToWideChar(CP_UTF8, 0, m_context.szLocale, -1, 0, 0); - if(pwLocaleLen == 0) { - IfFailGo(HRESULT_FROM_GetLastError()); - } else if (pwLocaleLen > MAKE_MAX_LENGTH) { - IfFailGo(COR_E_OVERFLOW); - } - pwLocale = (LPWSTR) qb.AllocNoThrow((pwLocaleLen + 1) *sizeof(WCHAR)); - if (!pwLocaleLen) - IfFailGo(E_OUTOFMEMORY); - if (!WszMultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, - m_context.szLocale, -1, pwLocale, pwLocaleLen)) - IfFailGo(HRESULT_FROM_GetLastError()); - pwLocale[pwLocaleLen] = 0; - - IfFailGo(pFusionAssemblyName->SetProperty(ASM_NAME_CULTURE, - pwLocale, - (DWORD)(wcslen(pwLocale) + 1) * sizeof (WCHAR))); - } - - if (m_pbPublicKeyOrToken) { - if (m_cbPublicKeyOrToken) { - if(m_dwFlags & afPublicKey) { - IfFailGo(pFusionAssemblyName->SetProperty(ASM_NAME_PUBLIC_KEY, - m_pbPublicKeyOrToken, m_cbPublicKeyOrToken)); - } - else { - IfFailGo(pFusionAssemblyName->SetProperty(ASM_NAME_PUBLIC_KEY_TOKEN, - m_pbPublicKeyOrToken, m_cbPublicKeyOrToken)); - } - } - else { - } - } - - - // Set the Processor Architecture (if any) - { - DWORD dwPEkind = (DWORD)PAIndex(m_dwFlags); - // Note: Value 0x07 = code:afPA_NoPlatform falls through - if ((dwPEkind >= peMSIL) && (dwPEkind <= peARM)) - { - PEKIND peKind = (PEKIND)dwPEkind; - IfFailGo(pFusionAssemblyName->SetProperty(ASM_NAME_ARCHITECTURE, - &peKind, sizeof(peKind))); - } - } - - // Set the Content Type (if any) - { - if (IsAfContentType_WindowsRuntime(m_dwFlags)) - { - DWORD dwContentType = AssemblyContentType_WindowsRuntime; - IfFailGo(pFusionAssemblyName->SetProperty( - ASM_NAME_CONTENT_TYPE, - &dwContentType, - sizeof(dwContentType))); - } - } - - _ASSERTE(m_wszCodeBase == NULL); - - *ppName = pFusionAssemblyName; - - holder.SuppressRelease(); - hr = S_OK; - - ErrExit: - ; - } - EX_CATCH_HRESULT(hr); - - return hr; -} - #endif // !DACCESS_COMPILE diff --git a/src/coreclr/src/vm/baseassemblyspec.h b/src/coreclr/src/vm/baseassemblyspec.h index 57cf2eb82b90..180ce86e119f 100644 --- a/src/coreclr/src/vm/baseassemblyspec.h +++ b/src/coreclr/src/vm/baseassemblyspec.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // BaseAssemblySpec.h @@ -110,20 +109,6 @@ class BaseAssemblySpec BOOL IsMscorlibSatellite() const; BOOL IsMscorlib(); - //**************************************************************************************** - // - // Creates an IAssemblyName object representing this AssemblySpec. - // - // fMustBeBindable - if set to TRUE, the resulting IAssemblyName may contain internal - // encodings needed to make an identity bindable (this is the case - // for WinRT assemblies: a representative type name is encoded as - // part of the assembly simple name). Be careful to ensure that - // encoded identities are not exposed to customers. - HRESULT CreateFusionName( - IAssemblyName **ppName, - BOOL fIncludeCodeBase = TRUE, /* Used by fusion only */ - BOOL fMustBeBindable = FALSE) const; - // Returns true inline BOOL HasUniqueIdentity() const { diff --git a/src/coreclr/src/vm/baseassemblyspec.inl b/src/coreclr/src/vm/baseassemblyspec.inl index 541a3b046fbb..5a6759506f5a 100644 --- a/src/coreclr/src/vm/baseassemblyspec.inl +++ b/src/coreclr/src/vm/baseassemblyspec.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // BaseAssemblySpec.inl diff --git a/src/coreclr/src/vm/binder.cpp b/src/coreclr/src/vm/binder.cpp index 243d9d4e68ec..bef7b479bc60 100644 --- a/src/coreclr/src/vm/binder.cpp +++ b/src/coreclr/src/vm/binder.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/vm/binder.h b/src/coreclr/src/vm/binder.h index 04818b4361ef..24db64e33fd1 100644 --- a/src/coreclr/src/vm/binder.h +++ b/src/coreclr/src/vm/binder.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _BINDERMODULE_H_ diff --git a/src/coreclr/src/vm/bundle.cpp b/src/coreclr/src/vm/bundle.cpp index e0d03155a56a..3a204deb2cfb 100644 --- a/src/coreclr/src/vm/bundle.cpp +++ b/src/coreclr/src/vm/bundle.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // Bundle.cpp // diff --git a/src/coreclr/src/vm/cachelinealloc.cpp b/src/coreclr/src/vm/cachelinealloc.cpp index ea596b3da4ec..7b9c1f95002e 100644 --- a/src/coreclr/src/vm/cachelinealloc.cpp +++ b/src/coreclr/src/vm/cachelinealloc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //--------------------------------------------------------------------------- // CCacheLineAllocator // diff --git a/src/coreclr/src/vm/cachelinealloc.h b/src/coreclr/src/vm/cachelinealloc.h index f2f72e858d70..8556fab27d90 100644 --- a/src/coreclr/src/vm/cachelinealloc.h +++ b/src/coreclr/src/vm/cachelinealloc.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //--------------------------------------------------------------------------- // CCacheLineAllocator // diff --git a/src/coreclr/src/vm/callcounting.cpp b/src/coreclr/src/vm/callcounting.cpp index 366753f7fb13..aadb400295cd 100644 --- a/src/coreclr/src/vm/callcounting.cpp +++ b/src/coreclr/src/vm/callcounting.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" diff --git a/src/coreclr/src/vm/callcounting.h b/src/coreclr/src/vm/callcounting.h index ebf8a4b75626..bdc5b42351fd 100644 --- a/src/coreclr/src/vm/callcounting.h +++ b/src/coreclr/src/vm/callcounting.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma once diff --git a/src/coreclr/src/vm/callhelpers.cpp b/src/coreclr/src/vm/callhelpers.cpp index 3145cd5e361e..25e2cc44385e 100644 --- a/src/coreclr/src/vm/callhelpers.cpp +++ b/src/coreclr/src/vm/callhelpers.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* * CallHelpers.CPP: helpers to call managed code * diff --git a/src/coreclr/src/vm/callhelpers.h b/src/coreclr/src/vm/callhelpers.h index 7f4446232aa6..a2503f15bb10 100644 --- a/src/coreclr/src/vm/callhelpers.h +++ b/src/coreclr/src/vm/callhelpers.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** ** File: callhelpers.h diff --git a/src/coreclr/src/vm/callingconvention.h b/src/coreclr/src/vm/callingconvention.h index f57232ccb97d..51b46e5efaf9 100644 --- a/src/coreclr/src/vm/callingconvention.h +++ b/src/coreclr/src/vm/callingconvention.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // @@ -743,6 +742,9 @@ class ArgIteratorTemplate : public ARGITERATOR_BASE #ifdef TARGET_X86 int m_curOfs; // Current position of the stack iterator int m_numRegistersUsed; +#ifdef FEATURE_INTERPRETER + bool m_fUnmanagedCallConv; +#endif #endif #ifdef TARGET_AMD64 @@ -988,6 +990,7 @@ int ArgIteratorTemplate::GetNextOffset() m_fUnmanagedCallConv = false; m_numRegistersUsed = numRegistersUsed; m_curOfs = TransitionBlock::GetOffsetOfArgs() + SizeOfArgStack(); + break; } #else m_numRegistersUsed = numRegistersUsed; @@ -1601,20 +1604,21 @@ void ArgIteratorTemplate::ForceSigWalk() } #ifdef FEATURE_INTERPRETER - BYTE callconv = CallConv(); - switch (callconv) - { - case IMAGE_CEE_CS_CALLCONV_C: - case IMAGE_CEE_CS_CALLCONV_STDCALL: - numRegistersUsed = NUM_ARGUMENT_REGISTERS; - nSizeOfArgStack = TransitionBlock::GetOffsetOfArgs() + numRegistersUsed * sizeof(void *); - break; - - case IMAGE_CEE_CS_CALLCONV_THISCALL: - case IMAGE_CEE_CS_CALLCONV_FASTCALL: - _ASSERTE_MSG(false, "Unsupported calling convention."); - default: - } + BYTE callconv = CallConv(); + switch (callconv) + { + case IMAGE_CEE_CS_CALLCONV_C: + case IMAGE_CEE_CS_CALLCONV_STDCALL: + numRegistersUsed = NUM_ARGUMENT_REGISTERS; + nSizeOfArgStack = TransitionBlock::GetOffsetOfArgs() + numRegistersUsed * sizeof(void *); + break; + + case IMAGE_CEE_CS_CALLCONV_THISCALL: + case IMAGE_CEE_CS_CALLCONV_FASTCALL: + _ASSERTE_MSG(false, "Unsupported calling convention."); + default: + break; + } #endif // FEATURE_INTERPRETER DWORD nArgs = this->NumFixedArgs(); diff --git a/src/coreclr/src/vm/callsiteinspect.cpp b/src/coreclr/src/vm/callsiteinspect.cpp index ee0de665c24c..eeb9678e9655 100644 --- a/src/coreclr/src/vm/callsiteinspect.cpp +++ b/src/coreclr/src/vm/callsiteinspect.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "object.h" diff --git a/src/coreclr/src/vm/callsiteinspect.h b/src/coreclr/src/vm/callsiteinspect.h index df7b9002e705..373b9347dfd9 100644 --- a/src/coreclr/src/vm/callsiteinspect.h +++ b/src/coreclr/src/vm/callsiteinspect.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma once diff --git a/src/coreclr/src/vm/castcache.cpp b/src/coreclr/src/vm/castcache.cpp index 829d8b331e01..b4a201626752 100644 --- a/src/coreclr/src/vm/castcache.cpp +++ b/src/coreclr/src/vm/castcache.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: castcache.cpp // diff --git a/src/coreclr/src/vm/castcache.h b/src/coreclr/src/vm/castcache.h index 28ba4bdcd320..772e98dcf3cd 100644 --- a/src/coreclr/src/vm/castcache.h +++ b/src/coreclr/src/vm/castcache.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: castcache.h // diff --git a/src/coreclr/src/vm/ceeload.cpp b/src/coreclr/src/vm/ceeload.cpp index 6b60637913d4..75d1f0bd0c2d 100644 --- a/src/coreclr/src/vm/ceeload.cpp +++ b/src/coreclr/src/vm/ceeload.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: CEELOAD.CPP // diff --git a/src/coreclr/src/vm/ceeload.h b/src/coreclr/src/vm/ceeload.h index c97706665d9f..27c4c8f485ff 100644 --- a/src/coreclr/src/vm/ceeload.h +++ b/src/coreclr/src/vm/ceeload.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: CEELOAD.H // diff --git a/src/coreclr/src/vm/ceeload.inl b/src/coreclr/src/vm/ceeload.inl index b78d90b069b4..a5094b45e61a 100644 --- a/src/coreclr/src/vm/ceeload.inl +++ b/src/coreclr/src/vm/ceeload.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: CEELOAD.INL // diff --git a/src/coreclr/src/vm/ceemain.cpp b/src/coreclr/src/vm/ceemain.cpp index f169b6bdd8ef..5c763f86039d 100644 --- a/src/coreclr/src/vm/ceemain.cpp +++ b/src/coreclr/src/vm/ceemain.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: CEEMAIN.CPP // =========================================================================== @@ -240,8 +239,12 @@ extern "C" HRESULT __cdecl CorDBGetInterface(DebugInterface** rcInterface); #endif // DEBUGGING_SUPPORTED #endif // !CROSSGEN_COMPILE - - +// g_coreclr_embedded indicates that coreclr is linked directly into the program +#ifdef CORECLR_EMBEDDED +bool g_coreclr_embedded = true; +#else +bool g_coreclr_embedded = false; +#endif // Remember how the last startup of EE went. HRESULT g_EEStartupStatus = S_OK; @@ -292,12 +295,6 @@ HRESULT EnsureEEStarted() { BEGIN_ENTRYPOINT_NOTHROW; -#if defined(FEATURE_APPX) && !defined(CROSSGEN_COMPILE) - STARTUP_FLAGS startupFlags = CorHost2::GetStartupFlags(); - // On CoreCLR, the host is in charge of determining whether the process is AppX or not. - AppX::SetIsAppXProcess(!!(startupFlags & STARTUP_APPX_APP_MODEL)); -#endif - #ifndef TARGET_UNIX // The sooner we do this, the sooner we avoid probing registry entries. // (Perf Optimization for VSWhidbey:113373.) @@ -1675,10 +1672,7 @@ void STDMETHODCALLTYPE EEShutDown(BOOL fIsDllUnloading) } #ifdef FEATURE_MULTICOREJIT - if (!AppX::IsAppXProcess()) // When running as Appx, make the delayed timer driven writing be the only option - { - MulticoreJitManager::StopProfileAll(); - } + MulticoreJitManager::StopProfileAll(); #endif } diff --git a/src/coreclr/src/vm/ceemain.h b/src/coreclr/src/vm/ceemain.h index 3201503a3b73..781b07097f36 100644 --- a/src/coreclr/src/vm/ceemain.h +++ b/src/coreclr/src/vm/ceemain.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: CEEMAIN.H // diff --git a/src/coreclr/src/vm/cgensys.h b/src/coreclr/src/vm/cgensys.h index 17213af0e759..53e21461304d 100644 --- a/src/coreclr/src/vm/cgensys.h +++ b/src/coreclr/src/vm/cgensys.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // CGENSYS.H - // // Generic header for choosing system-dependent helpers diff --git a/src/coreclr/src/vm/class.cpp b/src/coreclr/src/vm/class.cpp index c0fee85546bf..8e18a47059f9 100644 --- a/src/coreclr/src/vm/class.cpp +++ b/src/coreclr/src/vm/class.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: CLASS.CPP // diff --git a/src/coreclr/src/vm/class.h b/src/coreclr/src/vm/class.h index 441f5bfe0332..98a59dbba182 100644 --- a/src/coreclr/src/vm/class.h +++ b/src/coreclr/src/vm/class.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ==--== // diff --git a/src/coreclr/src/vm/class.inl b/src/coreclr/src/vm/class.inl index bddef932bc89..2cf76e44fccd 100644 --- a/src/coreclr/src/vm/class.inl +++ b/src/coreclr/src/vm/class.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: CLASS.INL // diff --git a/src/coreclr/src/vm/classcompat.cpp b/src/coreclr/src/vm/classcompat.cpp index af147c8cd2b9..aab4e63d5ccc 100644 --- a/src/coreclr/src/vm/classcompat.cpp +++ b/src/coreclr/src/vm/classcompat.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: CLASSCOMPAT.CPP diff --git a/src/coreclr/src/vm/classcompat.h b/src/coreclr/src/vm/classcompat.h index 802046c0da05..3e333671a40a 100644 --- a/src/coreclr/src/vm/classcompat.h +++ b/src/coreclr/src/vm/classcompat.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: CLASS.H diff --git a/src/coreclr/src/vm/classhash.cpp b/src/coreclr/src/vm/classhash.cpp index 34dadd54935c..28f4c69df4c9 100644 --- a/src/coreclr/src/vm/classhash.cpp +++ b/src/coreclr/src/vm/classhash.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // Hash table associated with each module that records for all types defined in that module the mapping diff --git a/src/coreclr/src/vm/classhash.h b/src/coreclr/src/vm/classhash.h index e724d545d363..d3a747c539ba 100644 --- a/src/coreclr/src/vm/classhash.h +++ b/src/coreclr/src/vm/classhash.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // Hash table associated with each module that records for all types defined in that module the mapping diff --git a/src/coreclr/src/vm/classhash.inl b/src/coreclr/src/vm/classhash.inl index 7746f42a4487..25caf51d579f 100644 --- a/src/coreclr/src/vm/classhash.inl +++ b/src/coreclr/src/vm/classhash.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // Hash table associated with each module that records for all types defined in that module the mapping diff --git a/src/coreclr/src/vm/classlayoutinfo.cpp b/src/coreclr/src/vm/classlayoutinfo.cpp index 4c145f26bfa6..a9c932886a8b 100644 --- a/src/coreclr/src/vm/classlayoutinfo.cpp +++ b/src/coreclr/src/vm/classlayoutinfo.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "class.h" diff --git a/src/coreclr/src/vm/classloadlevel.h b/src/coreclr/src/vm/classloadlevel.h index 58ff25aca7e9..f0702d62734e 100644 --- a/src/coreclr/src/vm/classloadlevel.h +++ b/src/coreclr/src/vm/classloadlevel.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // classloadlevel.h diff --git a/src/coreclr/src/vm/classnames.h b/src/coreclr/src/vm/classnames.h index 9ae2e5cc03cf..0766ff277652 100644 --- a/src/coreclr/src/vm/classnames.h +++ b/src/coreclr/src/vm/classnames.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. @@ -32,23 +31,12 @@ #define g_ObjectModelAsmName "System.ObjectModel" #define g_ColorClassName "System.Drawing.Color" #define g_ColorTranslatorClassName "System.Drawing.ColorTranslator" -#define g_SystemUriClassName "System.Uri" -#define g_INotifyCollectionChangedName "System.Collections.Specialized.INotifyCollectionChanged" -#define g_NotifyCollectionChangedEventHandlerName "System.Collections.Specialized.NotifyCollectionChangedEventHandler" -#define g_NotifyCollectionChangedEventArgsName "System.Collections.Specialized.NotifyCollectionChangedEventArgs" -#define g_NotifyCollectionChangedEventArgsMarshalerName "System.Runtime.InteropServices.WindowsRuntime.NotifyCollectionChangedEventArgsMarshaler" -#define g_INotifyPropertyChangedName "System.ComponentModel.INotifyPropertyChanged" -#define g_PropertyChangedEventHandlerName "System.ComponentModel.PropertyChangedEventHandler" -#define g_PropertyChangedEventArgsName "System.ComponentModel.PropertyChangedEventArgs" -#define g_ICommandName "System.Windows.Input.ICommand" #define g_ComObjectName "__ComObject" #endif // FEATURE_COMINTEROP - #define g_DateClassName "System.DateTime" #define g_DateTimeOffsetClassName "System.DateTimeOffset" #define g_DecimalClassName "System.Decimal" -#define g_DecimalName "Decimal" #define g_Vector64ClassName "System.Runtime.Intrinsics.Vector64`1" #define g_Vector64Name "Vector64`1" @@ -103,7 +91,6 @@ #define g_StringBufferName "StringBuilder" #define g_StringClassName "System.String" #define g_StringName "String" -#define g_SharedStaticsClassName "System.SharedStatics" #define g_ThreadClassName "System.Threading.Thread" #define g_TypeClassName "System.Type" diff --git a/src/coreclr/src/vm/clrconfignative.cpp b/src/coreclr/src/vm/clrconfignative.cpp index 8b09537c2515..87238ae6856f 100644 --- a/src/coreclr/src/vm/clrconfignative.cpp +++ b/src/coreclr/src/vm/clrconfignative.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: clrconfiguration.cpp // diff --git a/src/coreclr/src/vm/clrconfignative.h b/src/coreclr/src/vm/clrconfignative.h index 867369936400..161fac6ad4f3 100644 --- a/src/coreclr/src/vm/clrconfignative.h +++ b/src/coreclr/src/vm/clrconfignative.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _CLRCONFIGNATIVE_H_ #define _CLRCONFIGNATIVE_H_ diff --git a/src/coreclr/src/vm/clrex.cpp b/src/coreclr/src/vm/clrex.cpp index 4f1c71da41a9..0965a32c3dae 100644 --- a/src/coreclr/src/vm/clrex.cpp +++ b/src/coreclr/src/vm/clrex.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/clrex.h b/src/coreclr/src/vm/clrex.h index f92bbc84f9b6..e05daf1b482c 100644 --- a/src/coreclr/src/vm/clrex.h +++ b/src/coreclr/src/vm/clrex.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/clrex.inl b/src/coreclr/src/vm/clrex.inl index 100cf51b3648..6c2d06b80e65 100644 --- a/src/coreclr/src/vm/clrex.inl +++ b/src/coreclr/src/vm/clrex.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/clrprivbinderutil.cpp b/src/coreclr/src/vm/clrprivbinderutil.cpp deleted file mode 100644 index 0f1647ca196d..000000000000 --- a/src/coreclr/src/vm/clrprivbinderutil.cpp +++ /dev/null @@ -1,69 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -// -// Contains helper types for assembly binding host infrastructure. - -#include "common.h" - -#include "utilcode.h" -#include "strsafe.h" - -#include "clrprivbinderutil.h" - -inline -LPWSTR CopyStringThrowing( - LPCWSTR wszString) -{ - CONTRACTL - { - THROWS; - GC_NOTRIGGER; - } - CONTRACTL_END; - - NewArrayHolder wszDup = NULL; - if (wszString != NULL) - { - size_t wszLen = wcslen(wszString); - wszDup = new WCHAR[wszLen + 1]; - IfFailThrow(StringCchCopy(wszDup, wszLen + 1, wszString)); - } - wszDup.SuppressRelease(); - - return wszDup; -} - - -namespace CLRPrivBinderUtil -{ - //--------------------------------------------------------------------------------------------- - CLRPrivResourcePathImpl::CLRPrivResourcePathImpl(LPCWSTR wzPath) - : m_wzPath(CopyStringThrowing(wzPath)) - { STANDARD_VM_CONTRACT; } - - //--------------------------------------------------------------------------------------------- - HRESULT CLRPrivResourcePathImpl::GetPath( - DWORD cchBuffer, - LPDWORD pcchBuffer, - __inout_ecount_part(cchBuffer, *pcchBuffer) LPWSTR wzBuffer) - { - LIMITED_METHOD_CONTRACT; - HRESULT hr = S_OK; - - if (pcchBuffer == nullptr) - IfFailRet(E_INVALIDARG); - - *pcchBuffer = (DWORD)wcslen(m_wzPath); - - if (wzBuffer != nullptr) - { - if (FAILED(StringCchCopy(wzBuffer, cchBuffer, m_wzPath))) - IfFailRet(HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)); - } - - return hr; - } -} // namespace CLRPrivBinderUtil diff --git a/src/coreclr/src/vm/clrtocomcall.cpp b/src/coreclr/src/vm/clrtocomcall.cpp index 1e31736be3f2..dc574467724e 100644 --- a/src/coreclr/src/vm/clrtocomcall.cpp +++ b/src/coreclr/src/vm/clrtocomcall.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: CLRtoCOMCall.cpp // diff --git a/src/coreclr/src/vm/clrtocomcall.h b/src/coreclr/src/vm/clrtocomcall.h index 7c4691af84fc..edd9f43348d0 100644 --- a/src/coreclr/src/vm/clrtocomcall.h +++ b/src/coreclr/src/vm/clrtocomcall.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: CLRtoCOMCall.h // diff --git a/src/coreclr/src/vm/clrtracelogging.cpp b/src/coreclr/src/vm/clrtracelogging.cpp index 8dc8e92806fc..81bf7d60134b 100644 --- a/src/coreclr/src/vm/clrtracelogging.cpp +++ b/src/coreclr/src/vm/clrtracelogging.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // clrttracelogging.cpp diff --git a/src/coreclr/src/vm/clrvarargs.cpp b/src/coreclr/src/vm/clrvarargs.cpp index 05194582e17c..303220b4464a 100644 --- a/src/coreclr/src/vm/clrvarargs.cpp +++ b/src/coreclr/src/vm/clrvarargs.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: CLRVarArgs.cpp // diff --git a/src/coreclr/src/vm/clrvarargs.h b/src/coreclr/src/vm/clrvarargs.h index 37df3ed6438d..6a7e31686434 100644 --- a/src/coreclr/src/vm/clrvarargs.h +++ b/src/coreclr/src/vm/clrvarargs.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //////////////////////////////////////////////////////////////////////////////// // This module contains the implementation of the native methods for the // varargs class(es).. diff --git a/src/coreclr/src/vm/clsload.cpp b/src/coreclr/src/vm/clsload.cpp index 1d82d0fe351f..851266f47576 100644 --- a/src/coreclr/src/vm/clsload.cpp +++ b/src/coreclr/src/vm/clsload.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: clsload.cpp // @@ -3261,7 +3260,6 @@ TypeHandle ClassLoader::CreateTypeHandleForTypeKey(TypeKey* pKey, AllocMemTracke } } - // We really don't need this check anymore. if (rank > MAX_RANK) { ThrowTypeLoadException(pKey, IDS_CLASSLOAD_RANK_TOOLARGE); diff --git a/src/coreclr/src/vm/clsload.hpp b/src/coreclr/src/vm/clsload.hpp index da60903de6da..c919010cf938 100644 --- a/src/coreclr/src/vm/clsload.hpp +++ b/src/coreclr/src/vm/clsload.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: clsload.hpp // diff --git a/src/coreclr/src/vm/clsload.inl b/src/coreclr/src/vm/clsload.inl index 405836d226be..d12b81f162a9 100644 --- a/src/coreclr/src/vm/clsload.inl +++ b/src/coreclr/src/vm/clsload.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: clsload.inl // diff --git a/src/coreclr/src/vm/codeman.cpp b/src/coreclr/src/vm/codeman.cpp index a41e19c02b5e..7af2850b83d4 100644 --- a/src/coreclr/src/vm/codeman.cpp +++ b/src/coreclr/src/vm/codeman.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // codeman.cpp - a managment class for handling multiple code managers // @@ -1473,6 +1472,15 @@ void EEJitManager::SetCpuInfo() CPUCompileFlags.Set(InstructionSet_LZCNT); } } + + if (!CPUCompileFlags.IsSet(InstructionSet_SSE)) + { + EEPOLICY_HANDLE_FATAL_ERROR_WITH_MESSAGE(COR_E_EXECUTIONENGINE, W("SSE is not supported on the processor.")); + } + if (!CPUCompileFlags.IsSet(InstructionSet_SSE2)) + { + EEPOLICY_HANDLE_FATAL_ERROR_WITH_MESSAGE(COR_E_EXECUTIONENGINE, W("SSE2 is not supported on the processor.")); + } #endif // defined(TARGET_X86) || defined(TARGET_AMD64) #if defined(TARGET_ARM64) @@ -1483,6 +1491,15 @@ void EEJitManager::SetCpuInfo() } #if defined(TARGET_UNIX) PAL_GetJitCpuCapabilityFlags(&CPUCompileFlags); + + // For HOST_ARM64, if OS has exposed mechanism to detect CPU capabilities, make sure it has AdvSimd capability. + // For other cases i.e. if !HOST_ARM64 but TARGET_ARM64 or HOST_ARM64 but OS doesn't expose way to detect + // CPU capabilities, we always enable AdvSimd flags by default. + // + if (!CPUCompileFlags.IsSet(InstructionSet_AdvSimd)) + { + EEPOLICY_HANDLE_FATAL_ERROR_WITH_MESSAGE(COR_E_EXECUTIONENGINE, W("AdvSimd is not supported on the processor.")); + } #elif defined(HOST_64BIT) // FP and SIMD support are enabled by default CPUCompileFlags.Set(InstructionSet_ArmBase); diff --git a/src/coreclr/src/vm/codeman.h b/src/coreclr/src/vm/codeman.h index 38a475cbd9a5..ae76b6939da0 100644 --- a/src/coreclr/src/vm/codeman.h +++ b/src/coreclr/src/vm/codeman.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/vm/codeman.inl b/src/coreclr/src/vm/codeman.inl index 463c9e883e1b..da36c9fa1426 100644 --- a/src/coreclr/src/vm/codeman.inl +++ b/src/coreclr/src/vm/codeman.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/vm/codepitchingmanager.cpp b/src/coreclr/src/vm/codepitchingmanager.cpp index 2bae33eeb12d..8487d4785b48 100644 --- a/src/coreclr/src/vm/codepitchingmanager.cpp +++ b/src/coreclr/src/vm/codepitchingmanager.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: CodePitchingManager.cpp // diff --git a/src/coreclr/src/vm/codeversion.cpp b/src/coreclr/src/vm/codeversion.cpp index 6981e0579865..5ae3940a1681 100644 --- a/src/coreclr/src/vm/codeversion.cpp +++ b/src/coreclr/src/vm/codeversion.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: CodeVersion.cpp // diff --git a/src/coreclr/src/vm/codeversion.h b/src/coreclr/src/vm/codeversion.h index f318e2ec8015..bacc5305d9bb 100644 --- a/src/coreclr/src/vm/codeversion.h +++ b/src/coreclr/src/vm/codeversion.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: CodeVersion.h // diff --git a/src/coreclr/src/vm/comcache.cpp b/src/coreclr/src/vm/comcache.cpp index 8f39035ab0a6..689b6411b1c0 100644 --- a/src/coreclr/src/vm/comcache.cpp +++ b/src/coreclr/src/vm/comcache.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/vm/comcache.h b/src/coreclr/src/vm/comcache.h index 6e4ecf2f2c75..6b395d6f31f1 100644 --- a/src/coreclr/src/vm/comcache.h +++ b/src/coreclr/src/vm/comcache.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ComCache.h // diff --git a/src/coreclr/src/vm/comcallablewrapper.cpp b/src/coreclr/src/vm/comcallablewrapper.cpp index 1f58e24d51ca..6fca4a141d60 100644 --- a/src/coreclr/src/vm/comcallablewrapper.cpp +++ b/src/coreclr/src/vm/comcallablewrapper.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //-------------------------------------------------------------------------- // ComCallablewrapper.cpp // @@ -835,7 +834,7 @@ VOID SimpleComCallWrapper::Cleanup() } -VOID SimpleComCallWrapper::Neuter(bool fSkipHandleCleanup) +VOID SimpleComCallWrapper::Neuter() { CONTRACTL { @@ -844,8 +843,6 @@ VOID SimpleComCallWrapper::Neuter(bool fSkipHandleCleanup) MODE_ANY; PRECONDITION(CheckPointer(m_pSyncBlock)); PRECONDITION(!IsNeutered()); - // fSkipHandleCleanup only safe under AppX process because there are no appDomains - PRECONDITION(!(fSkipHandleCleanup && !AppX::IsAppXProcess())); } CONTRACTL_END; @@ -862,14 +859,11 @@ VOID SimpleComCallWrapper::Neuter(bool fSkipHandleCleanup) // NULL the syncblock entry - we can't hang onto this anymore as the syncblock will be killed asynchronously to us. ResetSyncBlock(); - if (!fSkipHandleCleanup) - { - // Disconnect the CCW from the object - // Calls made on this CCW will no longer succeed. - // The CCW has been neutered. - // do this for each of the CCWs - m_pWrap->Neuter(); - } + // Disconnect the CCW from the object + // Calls made on this CCW will no longer succeed. + // The CCW has been neutered. + // do this for each of the CCWs + m_pWrap->Neuter(); StackSString ssMessage; ComCallWrapper *pWrap = m_pWrap; @@ -1392,11 +1386,6 @@ IUnknown* SimpleComCallWrapper::QIStandardInterface(Enum_StdInterfaces index) } else if (index == enum_IDispatchEx) { - if (AppX::IsAppXProcess()) - { - RETURN NULL; - } - if (SupportsIReflect(m_pMT)) { // Initialize the DispatchExInfo before we return the interface. @@ -2944,14 +2933,6 @@ IUnknown* ComCallWrapper::GetComIPFromCCW(ComCallWrapper *pWrap, REFIID riid, Me RETURN pWrap->GetBasicIP(); } - if (IsIErrorInfo(riid) && AppX::IsAppXProcess()) - { - // Don't let the user override the default IErrorInfo implementation in AppX because - // the AppX app model uses it for WER. See code:GetExceptionDescription for details. - SimpleComCallWrapper* pSimpleWrap = pWrap->GetSimpleWrapper(); - RETURN pSimpleWrap->QIStandardInterface(enum_IErrorInfo); - } - if (!(flags & GetComIPFromCCW::SuppressCustomizedQueryInterface) && pTemplate->SupportsICustomQueryInterface()) { @@ -2964,11 +2945,6 @@ IUnknown* ComCallWrapper::GetComIPFromCCW(ComCallWrapper *pWrap, REFIID riid, Me if (IsIDispatch(riid)) { - if (AppX::IsAppXProcess()) - { - RETURN NULL; - } - // We don't do visibility checks on IUnknown. RETURN pWrap->GetIDispatchIP(); } @@ -3195,10 +3171,10 @@ IDispatch* ComCallWrapper::GetIDispatchIP() // constructor //-------------------------------------------------------------------------- ComCallWrapperCache::ComCallWrapperCache() : - m_lock(CrstCOMWrapperCache), m_cbRef(0), m_pCacheLineAllocator(NULL), - m_pLoaderAllocator(NULL) + m_pLoaderAllocator(NULL), + m_lock(CrstCOMWrapperCache) { WRAPPER_NO_CONTRACT; diff --git a/src/coreclr/src/vm/comcallablewrapper.h b/src/coreclr/src/vm/comcallablewrapper.h index 8c5fd42acbb2..b3fd865c6b2c 100644 --- a/src/coreclr/src/vm/comcallablewrapper.h +++ b/src/coreclr/src/vm/comcallablewrapper.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** @@ -1260,7 +1259,7 @@ public : VOID Cleanup(); // Used to neuter a CCW if its AD is being unloaded underneath it. - VOID Neuter(bool fSkipHandleCleanup = false); + VOID Neuter(); ~SimpleComCallWrapper(); diff --git a/src/coreclr/src/vm/comconnectionpoints.cpp b/src/coreclr/src/vm/comconnectionpoints.cpp index 097ab5f799e2..c02ef40abc7b 100644 --- a/src/coreclr/src/vm/comconnectionpoints.cpp +++ b/src/coreclr/src/vm/comconnectionpoints.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: ComConnectionPoints.cpp // @@ -24,9 +23,9 @@ ConnectionPoint::ConnectionPoint(ComCallWrapper *pWrap, MethodTable *pEventMT) , m_pTCEProviderMT(pWrap->GetSimpleWrapper()->GetMethodTable()) , m_pEventItfMT(pEventMT) , m_Lock(CrstInterop) -, m_cbRefCount(0) , m_apEventMethods(NULL) , m_NumEventMethods(0) +, m_cbRefCount(0) , m_pLastInserted(NULL) { CONTRACTL diff --git a/src/coreclr/src/vm/comconnectionpoints.h b/src/coreclr/src/vm/comconnectionpoints.h index 8f3a3cdcd280..c8d338634722 100644 --- a/src/coreclr/src/vm/comconnectionpoints.h +++ b/src/coreclr/src/vm/comconnectionpoints.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: ComConnectionPoints.h // diff --git a/src/coreclr/src/vm/comdatetime.cpp b/src/coreclr/src/vm/comdatetime.cpp index 1ce6d4b863ea..bc6b63eab6cb 100644 --- a/src/coreclr/src/vm/comdatetime.cpp +++ b/src/coreclr/src/vm/comdatetime.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" diff --git a/src/coreclr/src/vm/comdatetime.h b/src/coreclr/src/vm/comdatetime.h index 5f2eb4f45a73..d194410b84ca 100644 --- a/src/coreclr/src/vm/comdatetime.h +++ b/src/coreclr/src/vm/comdatetime.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _COMDATETIME_H_ diff --git a/src/coreclr/src/vm/comdelegate.cpp b/src/coreclr/src/vm/comdelegate.cpp index 81b754b774d1..625513bf9cd3 100644 --- a/src/coreclr/src/vm/comdelegate.cpp +++ b/src/coreclr/src/vm/comdelegate.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: COMDelegate.cpp // @@ -2031,8 +2030,9 @@ void COMDelegate::ThrowIfInvalidUnmanagedCallersOnlyUsage(MethodDesc* pMD) if (pMD->HasClassOrMethodInstantiation()) EX_THROW(EEResourceException, (kInvalidProgramException, W("InvalidProgram_GenericMethod"))); - // Arguments - if (NDirect::MarshalingRequired(pMD, pMD->GetSig(), pMD->GetModule())) + // Arguments - Scenarios involving UnmanagedCallersOnly are handled during the jit. + bool unmanagedCallersOnlyRequiresMarshalling = false; + if (NDirect::MarshalingRequired(pMD, NULL, NULL, unmanagedCallersOnlyRequiresMarshalling)) EX_THROW(EEResourceException, (kInvalidProgramException, W("InvalidProgram_NonBlittableTypes"))); } diff --git a/src/coreclr/src/vm/comdelegate.h b/src/coreclr/src/vm/comdelegate.h index 6cb36c3189e7..5226f6357ffd 100644 --- a/src/coreclr/src/vm/comdelegate.h +++ b/src/coreclr/src/vm/comdelegate.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: COMDelegate.h // diff --git a/src/coreclr/src/vm/comdependenthandle.cpp b/src/coreclr/src/vm/comdependenthandle.cpp index 2b2bff6cf57f..6144483ddc6b 100644 --- a/src/coreclr/src/vm/comdependenthandle.cpp +++ b/src/coreclr/src/vm/comdependenthandle.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: COMDependentHandle.cpp // diff --git a/src/coreclr/src/vm/comdependenthandle.h b/src/coreclr/src/vm/comdependenthandle.h index ca25e10b7547..7c80d0bebe4a 100644 --- a/src/coreclr/src/vm/comdependenthandle.h +++ b/src/coreclr/src/vm/comdependenthandle.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: COMDependentHandle.h // diff --git a/src/coreclr/src/vm/comdynamic.cpp b/src/coreclr/src/vm/comdynamic.cpp index 85a4a61abd99..acfcbe9d6523 100644 --- a/src/coreclr/src/vm/comdynamic.cpp +++ b/src/coreclr/src/vm/comdynamic.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //////////////////////////////////////////////////////////////////////////////// // COMDynamic.h // This module defines the native methods that are used for Dynamic IL generation diff --git a/src/coreclr/src/vm/comdynamic.h b/src/coreclr/src/vm/comdynamic.h index c5f9e7d117d5..364aa21c9bee 100644 --- a/src/coreclr/src/vm/comdynamic.h +++ b/src/coreclr/src/vm/comdynamic.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //////////////////////////////////////////////////////////////////////////////// // COMDynamic.h // This module defines the native methods that are used for Dynamic IL generation diff --git a/src/coreclr/src/vm/cominterfacemarshaler.cpp b/src/coreclr/src/vm/cominterfacemarshaler.cpp index d8d57ab872a5..d2f47cd279d0 100644 --- a/src/coreclr/src/vm/cominterfacemarshaler.cpp +++ b/src/coreclr/src/vm/cominterfacemarshaler.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: ComInterfaceMarshaler.cpp // @@ -104,8 +103,7 @@ VOID COMInterfaceMarshaler::InitializeObjectClass(IUnknown *pIncomingIP) } CONTRACTL_END; - // If we are in an APPX process we do not check for IProvideClassInfo. - if (m_typeHandle.IsNull() && !AppX::IsAppXProcess()) + if (m_typeHandle.IsNull()) { EX_TRY { diff --git a/src/coreclr/src/vm/cominterfacemarshaler.h b/src/coreclr/src/vm/cominterfacemarshaler.h index 3d2505a6ee6d..38b206425444 100644 --- a/src/coreclr/src/vm/cominterfacemarshaler.h +++ b/src/coreclr/src/vm/cominterfacemarshaler.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: ComInterfaceMarshaler.h // diff --git a/src/coreclr/src/vm/commodule.cpp b/src/coreclr/src/vm/commodule.cpp index e9314888ad62..0575cb9b2618 100644 --- a/src/coreclr/src/vm/commodule.cpp +++ b/src/coreclr/src/vm/commodule.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" diff --git a/src/coreclr/src/vm/commodule.h b/src/coreclr/src/vm/commodule.h index fb0790a6f093..a4ce99c3fe14 100644 --- a/src/coreclr/src/vm/commodule.h +++ b/src/coreclr/src/vm/commodule.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //////////////////////////////////////////////////////////////////////////////// diff --git a/src/coreclr/src/vm/common.h b/src/coreclr/src/vm/common.h index 8c8a4dfe8bd5..ab73f6746f45 100644 --- a/src/coreclr/src/vm/common.h +++ b/src/coreclr/src/vm/common.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // common.h - precompiled headers include for the COM+ Execution Engine // @@ -112,6 +111,7 @@ typedef DPTR(class ArrayBase) PTR_ArrayBase; typedef DPTR(class Assembly) PTR_Assembly; typedef DPTR(class AssemblyBaseObject) PTR_AssemblyBaseObject; typedef DPTR(class AssemblyLoadContextBaseObject) PTR_AssemblyLoadContextBaseObject; +typedef DPTR(class AssemblyLoadContext) PTR_AssemblyLoadContext; typedef DPTR(class AssemblyNameBaseObject) PTR_AssemblyNameBaseObject; typedef VPTR(class BaseDomain) PTR_BaseDomain; typedef DPTR(class ClassLoader) PTR_ClassLoader; diff --git a/src/coreclr/src/vm/commtmemberinfomap.cpp b/src/coreclr/src/vm/commtmemberinfomap.cpp index ae4198cc39c4..15612da1035c 100644 --- a/src/coreclr/src/vm/commtmemberinfomap.cpp +++ b/src/coreclr/src/vm/commtmemberinfomap.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ diff --git a/src/coreclr/src/vm/commtmemberinfomap.h b/src/coreclr/src/vm/commtmemberinfomap.h index 0b615b2062ee..c219e9e23f75 100644 --- a/src/coreclr/src/vm/commtmemberinfomap.h +++ b/src/coreclr/src/vm/commtmemberinfomap.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ diff --git a/src/coreclr/src/vm/compatibilityswitch.cpp b/src/coreclr/src/vm/compatibilityswitch.cpp index 6a4f2cf7f821..3b36f58a9d24 100644 --- a/src/coreclr/src/vm/compatibilityswitch.cpp +++ b/src/coreclr/src/vm/compatibilityswitch.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" diff --git a/src/coreclr/src/vm/compatibilityswitch.h b/src/coreclr/src/vm/compatibilityswitch.h index 9dec132b3c5e..810455ebaa5e 100644 --- a/src/coreclr/src/vm/compatibilityswitch.h +++ b/src/coreclr/src/vm/compatibilityswitch.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/vm/compile.cpp b/src/coreclr/src/vm/compile.cpp index aa9112f1f1dc..28716467474e 100644 --- a/src/coreclr/src/vm/compile.cpp +++ b/src/coreclr/src/vm/compile.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: compile.cpp // @@ -1400,7 +1399,7 @@ mdToken CEECompileInfo::TryEncodeMethodAsToken( { _ASSERTE(pResolvedToken != NULL); - Module * pReferencingModule = (Module *)pResolvedToken->tokenScope; + Module * pReferencingModule = GetModule(pResolvedToken->tokenScope); if (!pReferencingModule->IsInCurrentVersionBubble()) return mdTokenNil; @@ -4803,7 +4802,7 @@ static BOOL CanSatisfyConstraints(Instantiation typicalInst, Instantiation candi // -// This method has duplicated logic from bcl\system\collections\generic\comparer.cs +// This method has duplicated logic from coreclr\src\System.Private.CoreLib\src\System\Collections\Generic\ComparerHelpers.cs // static void SpecializeComparer(SString& ss, Instantiation& inst) { @@ -4843,33 +4842,21 @@ static void SpecializeComparer(SString& ss, Instantiation& inst) CorElementType et = elemTypeHnd.GetVerifierCorElementType(); if (et == ELEMENT_TYPE_I1 || et == ELEMENT_TYPE_I2 || - et == ELEMENT_TYPE_I4) - { - ss.Set(W("System.Collections.Generic.Int32EnumComparer`1")); - return; - } - if (et == ELEMENT_TYPE_U1 || + et == ELEMENT_TYPE_I4 || + et == ELEMENT_TYPE_I8 || + et == ELEMENT_TYPE_U1 || et == ELEMENT_TYPE_U2 || - et == ELEMENT_TYPE_U4) - { - ss.Set(W("System.Collections.Generic.UInt32EnumComparer`1")); - return; - } - if (et == ELEMENT_TYPE_I8) - { - ss.Set(W("System.Collections.Generic.Int64EnumComparer`1")); - return; - } - if (et == ELEMENT_TYPE_U8) + et == ELEMENT_TYPE_U4 || + et == ELEMENT_TYPE_U8) { - ss.Set(W("System.Collections.Generic.UInt64EnumComparer`1")); + ss.Set(W("System.Collections.Generic.EnumComparer`1")); return; } } } // -// This method has duplicated logic from bcl\system\collections\generic\equalitycomparer.cs +// This method has duplicated logic from coreclr\src\System.Private.CoreLib\src\System\Collections\Generic\ComparerHelpers.cs // and matching logic in jitinterface.cpp // static void SpecializeEqualityComparer(SString& ss, Instantiation& inst) @@ -4907,25 +4894,19 @@ static void SpecializeEqualityComparer(SString& ss, Instantiation& inst) if (elemTypeHnd.IsEnum()) { - // Note: We have different comparers for Short and SByte because for those types we need to make sure we call GetHashCode on the actual underlying type as the - // implementation of GetHashCode is more complex than for the other types. CorElementType et = elemTypeHnd.GetVerifierCorElementType(); - if (et == ELEMENT_TYPE_I4 || - et == ELEMENT_TYPE_U4 || - et == ELEMENT_TYPE_U2 || + if (et == ELEMENT_TYPE_I1 || et == ELEMENT_TYPE_I2 || + et == ELEMENT_TYPE_I4 || + et == ELEMENT_TYPE_I8 || et == ELEMENT_TYPE_U1 || - et == ELEMENT_TYPE_I1) + et == ELEMENT_TYPE_U2 || + et == ELEMENT_TYPE_U4 || + et == ELEMENT_TYPE_U8) { ss.Set(W("System.Collections.Generic.EnumEqualityComparer`1")); return; } - else if (et == ELEMENT_TYPE_I8 || - et == ELEMENT_TYPE_U8) - { - ss.Set(W("System.Collections.Generic.LongEnumEqualityComparer`1")); - return; - } } } @@ -5937,12 +5918,6 @@ void CEEPreloader::GenerateMethodStubs( if (IsReadyToRunCompilation() && (!GetAppDomain()->ToCompilationDomain()->GetTargetModule()->IsSystem() || !pMD->IsNDirect())) return; -#if defined(TARGET_ARM) && defined(TARGET_UNIX) - // Cross-bitness compilation of il stubs does not work. Disable here. - if (IsReadyToRunCompilation()) - return; -#endif // defined(TARGET_ARM) && defined(TARGET_UNIX) - DWORD dwNGenStubFlags = NDIRECTSTUB_FL_NGENEDSTUB; if (fNgenProfilerImage) diff --git a/src/coreclr/src/vm/compile.h b/src/coreclr/src/vm/compile.h index 7298b75603cc..7e858b1a25a4 100644 --- a/src/coreclr/src/vm/compile.h +++ b/src/coreclr/src/vm/compile.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: compile.h // diff --git a/src/coreclr/src/vm/comreflectioncache.hpp b/src/coreclr/src/vm/comreflectioncache.hpp index 033e7f01f209..80909f94a087 100644 --- a/src/coreclr/src/vm/comreflectioncache.hpp +++ b/src/coreclr/src/vm/comreflectioncache.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __COMReflectionCache_hpp__ diff --git a/src/coreclr/src/vm/comreflectioncache.inl b/src/coreclr/src/vm/comreflectioncache.inl index d71e68dbe403..838737371cb8 100644 --- a/src/coreclr/src/vm/comreflectioncache.inl +++ b/src/coreclr/src/vm/comreflectioncache.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __COMReflectionCache_inl__ #define __COMReflectionCache_inl__ diff --git a/src/coreclr/src/vm/comsynchronizable.cpp b/src/coreclr/src/vm/comsynchronizable.cpp index 51c8c7f070f0..d8cdfe8d6626 100644 --- a/src/coreclr/src/vm/comsynchronizable.cpp +++ b/src/coreclr/src/vm/comsynchronizable.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ @@ -853,7 +852,7 @@ FCIMPLEND // Indicate whether the thread will host an STA (this may fail if the thread has // already been made part of the MTA, use GetApartmentState or the return state // from this routine to check for this). -FCIMPL3(INT32, ThreadNative::SetApartmentState, ThreadBaseObject* pThisUNSAFE, INT32 iState, CLR_BOOL fireMDAOnMismatch) +FCIMPL2(INT32, ThreadNative::SetApartmentState, ThreadBaseObject* pThisUNSAFE, INT32 iState) { FCALL_CONTRACT; @@ -896,7 +895,7 @@ FCIMPL3(INT32, ThreadNative::SetApartmentState, ThreadBaseObject* pThisUNSAFE, I { EX_TRY { - state = thread->SetApartment(state, fireMDAOnMismatch == TRUE); + state = thread->SetApartment(state); } EX_CATCH { @@ -1021,7 +1020,7 @@ FCIMPL1(void, ThreadNative::StartupSetApartmentState, ThreadBaseObject* pThisUNS Thread::ApartmentState as = thread->GetExplicitApartment(); if (as == Thread::AS_Unknown) { - thread->SetApartment(Thread::AS_InMTA, TRUE); + thread->SetApartment(Thread::AS_InMTA); } HELPER_METHOD_FRAME_END(); diff --git a/src/coreclr/src/vm/comsynchronizable.h b/src/coreclr/src/vm/comsynchronizable.h index d0f3bb38fff5..8de4ee3c5dbe 100644 --- a/src/coreclr/src/vm/comsynchronizable.h +++ b/src/coreclr/src/vm/comsynchronizable.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ @@ -79,7 +78,7 @@ friend class ThreadBaseObject; static FCDECL1(INT32, GetThreadContext, ThreadBaseObject* pThisUNSAFE); #ifdef FEATURE_COMINTEROP_APARTMENT_SUPPORT static FCDECL1(INT32, GetApartmentState, ThreadBaseObject* pThis); - static FCDECL3(INT32, SetApartmentState, ThreadBaseObject* pThisUNSAFE, INT32 iState, CLR_BOOL fireMDAOnMismatch); + static FCDECL2(INT32, SetApartmentState, ThreadBaseObject* pThisUNSAFE, INT32 iState); static FCDECL1(void, StartupSetApartmentState, ThreadBaseObject* pThis); #endif // FEATURE_COMINTEROP_APARTMENT_SUPPORT diff --git a/src/coreclr/src/vm/comthreadpool.cpp b/src/coreclr/src/vm/comthreadpool.cpp index 9a0ab9200160..be3a5a3c0d31 100644 --- a/src/coreclr/src/vm/comthreadpool.cpp +++ b/src/coreclr/src/vm/comthreadpool.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ diff --git a/src/coreclr/src/vm/comthreadpool.h b/src/coreclr/src/vm/comthreadpool.h index ceef964099eb..9807482b5394 100644 --- a/src/coreclr/src/vm/comthreadpool.h +++ b/src/coreclr/src/vm/comthreadpool.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ diff --git a/src/coreclr/src/vm/comtoclrcall.cpp b/src/coreclr/src/vm/comtoclrcall.cpp index 796861376243..9e6774f4a9e9 100644 --- a/src/coreclr/src/vm/comtoclrcall.cpp +++ b/src/coreclr/src/vm/comtoclrcall.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ==++== // @@ -272,49 +271,6 @@ OBJECTREF COMToCLRGetObjectAndTarget_Delegate(ComCallWrapper * pWrap, PCODE * pp return pDelObj->GetTarget(); } -// returns true on success, false otherwise -NOINLINE // keep the EH tax out of our caller -bool COMToCLRGetObjectAndTarget_WinRTCtor(Thread * pThread, MethodDesc * pRealMD, ComCallMethodDesc * pCMD, PCODE * ppManagedTargetOut, - OBJECTREF* pObjectOut, UINT64* pRetValOut) -{ - CONTRACTL - { - NOTHROW; - GC_TRIGGERS; - MODE_COOPERATIVE; - } - CONTRACTL_END; - - // Ctor is not virtual and operates on a newly created object. - _ASSERTE(!pCMD->IsVirtual()); - - *pObjectOut = NULL; - *ppManagedTargetOut = pRealMD->GetSingleCallableAddrOfCode(); - MethodTable *pMT = pRealMD->GetMethodTable(); - - // We should not see a unsealed class here - _ASSERTE(pMT->IsSealed()); - - // we know for sure that we are allocating a new object - - // @TODO: move this object allocation into the IL stub to avoid the try/catch and SO-intolerant region. - - bool fSuccess = true; - - EX_TRY - { - *pObjectOut = AllocateObject(pMT); - } - EX_CATCH - { - fSuccess = false; - *pRetValOut = SetupErrorInfo(GET_THROWABLE()); - } - EX_END_CATCH(SwallowAllExceptions); - - return fSuccess; -} - FORCEINLINE_NONDEBUG OBJECTREF COMToCLRGetObjectAndTarget_Virtual(ComCallWrapper * pWrap, MethodDesc * pRealMD, ComCallMethodDesc * pCMD, PCODE * ppManagedTargetOut) { @@ -1537,88 +1493,4 @@ MethodDesc* ComCall::GetILStubMethodDesc(FieldDesc *pFD, DWORD dwStubFlags) pFD); } -// static -MethodDesc *ComCall::GetCtorForWinRTFactoryMethod(MethodTable *pClsMT, MethodDesc *pMD) -{ - CONTRACTL - { - THROWS; - GC_TRIGGERS; - MODE_ANY; - PRECONDITION(pClsMT->IsSealed()); - } - CONTRACTL_END; - - PCCOR_SIGNATURE pSig; - DWORD cSig; - pMD->GetSig(&pSig, &cSig); - SigParser sig(pSig, cSig); - - ULONG numArgs; - - IfFailThrow(sig.GetCallingConv(NULL)); // calling convention - IfFailThrow(sig.GetData(&numArgs)); // number of args - IfFailThrow(sig.SkipExactlyOne()); // skip return type - - SigBuilder sigBuilder; - sigBuilder.AppendByte(IMAGE_CEE_CS_CALLCONV_HASTHIS); - sigBuilder.AppendData(numArgs); - - // ctor returns void - sigBuilder.AppendElementType(ELEMENT_TYPE_VOID); - - sig.GetSignature(&pSig, &cSig); - - // parameter types are identical for sealed classes - sigBuilder.AppendBlob((const PVOID)pSig, cSig); - - pSig = (PCCOR_SIGNATURE)sigBuilder.GetSignature(&cSig); - - MethodDesc *pCtorMD = MemberLoader::FindMethod(pClsMT, COR_CTOR_METHOD_NAME, pSig, cSig, pMD->GetModule()); - - if (pCtorMD == NULL) - { - SString ctorMethodName(SString::Utf8, COR_CTOR_METHOD_NAME); - COMPlusThrowNonLocalized(kMissingMethodException, ctorMethodName.GetUnicode()); - } - return pCtorMD; -} - -// static -MethodDesc *ComCall::GetStaticForWinRTFactoryMethod(MethodTable *pClsMT, MethodDesc *pMD) -{ - CONTRACTL - { - THROWS; - GC_TRIGGERS; - MODE_ANY; - } - CONTRACTL_END; - - PCCOR_SIGNATURE pSig; - DWORD cSig; - pMD->GetSig(&pSig, &cSig); - SigParser sig(pSig, cSig); - - IfFailThrow(sig.GetCallingConv(NULL)); // calling convention - - SigBuilder sigBuilder; - sigBuilder.AppendByte(IMAGE_CEE_CS_CALLCONV_DEFAULT); - - // number of parameters, return type, and parameter types are identical - sig.GetSignature(&pSig, &cSig); - sigBuilder.AppendBlob((const PVOID)pSig, cSig); - - pSig = (PCCOR_SIGNATURE)sigBuilder.GetSignature(&cSig); - - MethodDesc *pStaticMD = MemberLoader::FindMethod(pClsMT, pMD->GetName(), pSig, cSig, pMD->GetModule()); - - if (pStaticMD == NULL) - { - SString staticMethodName(SString::Utf8, pMD->GetName()); - COMPlusThrowNonLocalized(kMissingMethodException, staticMethodName.GetUnicode()); - } - return pStaticMD; -} - #endif // DACCESS_COMPILE diff --git a/src/coreclr/src/vm/comtoclrcall.h b/src/coreclr/src/vm/comtoclrcall.h index 88593d8c737e..7b2627028594 100644 --- a/src/coreclr/src/vm/comtoclrcall.h +++ b/src/coreclr/src/vm/comtoclrcall.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: COMtoCLRCall.h // @@ -87,9 +86,6 @@ class ComCall static MethodDesc* GetILStubMethodDesc(MethodDesc *pCallMD, DWORD dwStubFlags); static MethodDesc* GetILStubMethodDesc(FieldDesc *pFD, DWORD dwStubFlags); - static MethodDesc *GetCtorForWinRTFactoryMethod(MethodTable *pClsMT, MethodDesc *pMD); - static MethodDesc *GetStaticForWinRTFactoryMethod(MethodTable *pClsMT, MethodDesc *pMD); - private: ComCall() {LIMITED_METHOD_CONTRACT;}; // prevent "new"'s on this class diff --git a/src/coreclr/src/vm/comutilnative.cpp b/src/coreclr/src/vm/comutilnative.cpp index 56088ed8fbef..98344d4afb7f 100644 --- a/src/coreclr/src/vm/comutilnative.cpp +++ b/src/coreclr/src/vm/comutilnative.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/comutilnative.h b/src/coreclr/src/vm/comutilnative.h index 8401cc802309..2d1b2df9bfc2 100644 --- a/src/coreclr/src/vm/comutilnative.h +++ b/src/coreclr/src/vm/comutilnative.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/comwaithandle.cpp b/src/coreclr/src/vm/comwaithandle.cpp index 42f03b789ff9..1756687fd32c 100644 --- a/src/coreclr/src/vm/comwaithandle.cpp +++ b/src/coreclr/src/vm/comwaithandle.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ diff --git a/src/coreclr/src/vm/comwaithandle.h b/src/coreclr/src/vm/comwaithandle.h index 218446881a67..92a48ecbfdef 100644 --- a/src/coreclr/src/vm/comwaithandle.h +++ b/src/coreclr/src/vm/comwaithandle.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ diff --git a/src/coreclr/src/vm/contractimpl.cpp b/src/coreclr/src/vm/contractimpl.cpp index c1462fb2d3ee..6d0f9f727c68 100644 --- a/src/coreclr/src/vm/contractimpl.cpp +++ b/src/coreclr/src/vm/contractimpl.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: contractimpl.cpp // diff --git a/src/coreclr/src/vm/contractimpl.h b/src/coreclr/src/vm/contractimpl.h index 5937c3c1c16c..b00f0160d7e8 100644 --- a/src/coreclr/src/vm/contractimpl.h +++ b/src/coreclr/src/vm/contractimpl.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: contractimpl.h // diff --git a/src/coreclr/src/vm/coreassemblyspec.cpp b/src/coreclr/src/vm/coreassemblyspec.cpp index d2fc56ad064d..0a9471ec74c8 100644 --- a/src/coreclr/src/vm/coreassemblyspec.cpp +++ b/src/coreclr/src/vm/coreassemblyspec.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // CoreAssemblySpec.cpp @@ -141,7 +140,7 @@ VOID AssemblySpec::Bind(AppDomain *pAppDomain, // For name based binding these arguments shouldn't have been changed from default _ASSERTE(!fNgenExplicitBind && !fExplicitBindToNativeImage); SafeComHolder pName; - hr = CreateAssemblyNameObject(&pName, assemblyDisplayName, true /*parseDisplayName*/); + hr = CreateAssemblyNameObject(&pName, assemblyDisplayName); if (SUCCEEDED(hr)) { hr = pBinder->BindAssemblyByName(pName, &pPrivAsm); diff --git a/src/coreclr/src/vm/corebindresult.cpp b/src/coreclr/src/vm/corebindresult.cpp index c2eea3a505be..71840dfbe7c5 100644 --- a/src/coreclr/src/vm/corebindresult.cpp +++ b/src/coreclr/src/vm/corebindresult.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // CoreBindResult.cpp diff --git a/src/coreclr/src/vm/coreclr/corebindresult.h b/src/coreclr/src/vm/coreclr/corebindresult.h index 4015a13016e0..db6559d038ad 100644 --- a/src/coreclr/src/vm/coreclr/corebindresult.h +++ b/src/coreclr/src/vm/coreclr/corebindresult.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // CoreBindResult.h diff --git a/src/coreclr/src/vm/coreclr/corebindresult.inl b/src/coreclr/src/vm/coreclr/corebindresult.inl index 2ca24c93063b..1568ccbe9e15 100644 --- a/src/coreclr/src/vm/coreclr/corebindresult.inl +++ b/src/coreclr/src/vm/coreclr/corebindresult.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================ // // CoreBindResult.inl diff --git a/src/coreclr/src/vm/corhost.cpp b/src/coreclr/src/vm/corhost.cpp index 8025eda1c780..a50e15156046 100644 --- a/src/coreclr/src/vm/corhost.cpp +++ b/src/coreclr/src/vm/corhost.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // CorHost.cpp // diff --git a/src/coreclr/src/vm/crossgen/CMakeLists.txt b/src/coreclr/src/vm/crossgen/CMakeLists.txt index 7a9ec5197c0a..a0b321a00e33 100644 --- a/src/coreclr/src/vm/crossgen/CMakeLists.txt +++ b/src/coreclr/src/vm/crossgen/CMakeLists.txt @@ -14,7 +14,6 @@ set(VM_CROSSGEN_SOURCES ../classhash.cpp ../classlayoutinfo.cpp ../clrex.cpp - ../clrprivbinderutil.cpp ../clsload.cpp ../codeman.cpp ../codeversion.cpp diff --git a/src/coreclr/src/vm/crossgencompile.cpp b/src/coreclr/src/vm/crossgencompile.cpp index 6bdf396f5a80..a4fdab8e69ba 100644 --- a/src/coreclr/src/vm/crossgencompile.cpp +++ b/src/coreclr/src/vm/crossgencompile.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: crosscomp.cpp // diff --git a/src/coreclr/src/vm/crossloaderallocatorhash.h b/src/coreclr/src/vm/crossloaderallocatorhash.h index 9d87880d2bc8..d65715817ae5 100644 --- a/src/coreclr/src/vm/crossloaderallocatorhash.h +++ b/src/coreclr/src/vm/crossloaderallocatorhash.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef CROSSLOADERALLOCATORHASH_H #define CROSSLOADERALLOCATORHASH_H diff --git a/src/coreclr/src/vm/crossloaderallocatorhash.inl b/src/coreclr/src/vm/crossloaderallocatorhash.inl index 1e646b123297..1eb55509a87b 100644 --- a/src/coreclr/src/vm/crossloaderallocatorhash.inl +++ b/src/coreclr/src/vm/crossloaderallocatorhash.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef CROSSLOADERALLOCATORHASH_INL #define CROSSLOADERALLOCATORHASH_INL diff --git a/src/coreclr/src/vm/crst.cpp b/src/coreclr/src/vm/crst.cpp index 3dbdfd1e2c6d..22f7a1ff9759 100644 --- a/src/coreclr/src/vm/crst.cpp +++ b/src/coreclr/src/vm/crst.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // CRST.CPP // diff --git a/src/coreclr/src/vm/crst.h b/src/coreclr/src/vm/crst.h index 17330f236e6d..8bdcaae4f919 100644 --- a/src/coreclr/src/vm/crst.h +++ b/src/coreclr/src/vm/crst.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // CRST.H // diff --git a/src/coreclr/src/vm/ctxtcall.h b/src/coreclr/src/vm/ctxtcall.h index 4f57189229c7..9e1de54a9a6e 100644 --- a/src/coreclr/src/vm/ctxtcall.h +++ b/src/coreclr/src/vm/ctxtcall.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning( disable: 4049 ) /* more than 64k source lines */ diff --git a/src/coreclr/src/vm/customattribute.cpp b/src/coreclr/src/vm/customattribute.cpp index 956dc4334f7e..a06cbf0cb9e8 100644 --- a/src/coreclr/src/vm/customattribute.cpp +++ b/src/coreclr/src/vm/customattribute.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" diff --git a/src/coreclr/src/vm/customattribute.h b/src/coreclr/src/vm/customattribute.h index 4aa3f227a121..ac95fa80af99 100644 --- a/src/coreclr/src/vm/customattribute.h +++ b/src/coreclr/src/vm/customattribute.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _CUSTOMATTRIBUTE_H_ @@ -105,7 +104,6 @@ class Attribute CaNamedArgArrayREF* ppCustomAttributeNamedArguments, AssemblyBaseObject* pAssemblyUNSAFE); -private: static HRESULT ParseAttributeArgumentValues( void* pCa, INT32 cCa, @@ -116,6 +114,7 @@ class Attribute COUNT_T cNamedArgs, DomainAssembly* pDomainAssembly); +private: static HRESULT ParseCaValue( CustomAttributeParser &ca, CaValue* pCaArg, diff --git a/src/coreclr/src/vm/custommarshalerinfo.cpp b/src/coreclr/src/vm/custommarshalerinfo.cpp index 1f4fcf145d69..8396b4520def 100644 --- a/src/coreclr/src/vm/custommarshalerinfo.cpp +++ b/src/coreclr/src/vm/custommarshalerinfo.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: CustomMarshalerInfo.cpp // diff --git a/src/coreclr/src/vm/custommarshalerinfo.h b/src/coreclr/src/vm/custommarshalerinfo.h index d2d706882278..a1502f8d242d 100644 --- a/src/coreclr/src/vm/custommarshalerinfo.h +++ b/src/coreclr/src/vm/custommarshalerinfo.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: CustomMarshalerInfo.h // diff --git a/src/coreclr/src/vm/dataimage.cpp b/src/coreclr/src/vm/dataimage.cpp index 61dea0a58321..d619efc1ebf4 100644 --- a/src/coreclr/src/vm/dataimage.cpp +++ b/src/coreclr/src/vm/dataimage.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/vm/dataimage.h b/src/coreclr/src/vm/dataimage.h index 9ba2d98c69ce..3e23e031906e 100644 --- a/src/coreclr/src/vm/dataimage.h +++ b/src/coreclr/src/vm/dataimage.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/vm/dataimagesection.h b/src/coreclr/src/vm/dataimagesection.h index 93dfb49ad882..f78a34823dd3 100644 --- a/src/coreclr/src/vm/dataimagesection.h +++ b/src/coreclr/src/vm/dataimagesection.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/vm/dbginterface.h b/src/coreclr/src/vm/dbginterface.h index 96157bb6b9f6..708b4ff2ac6b 100644 --- a/src/coreclr/src/vm/dbginterface.h +++ b/src/coreclr/src/vm/dbginterface.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // COM+99 Debug Interface Header // diff --git a/src/coreclr/src/vm/debugdebugger.cpp b/src/coreclr/src/vm/debugdebugger.cpp index 141881a1e9d6..ad76de48d20f 100644 --- a/src/coreclr/src/vm/debugdebugger.cpp +++ b/src/coreclr/src/vm/debugdebugger.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/vm/debugdebugger.h b/src/coreclr/src/vm/debugdebugger.h index 92a5f601d08b..3a36f9875ebb 100644 --- a/src/coreclr/src/vm/debugdebugger.h +++ b/src/coreclr/src/vm/debugdebugger.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/vm/debughelp.cpp b/src/coreclr/src/vm/debughelp.cpp index 02cfbe4cc1fe..87c30a7b19ca 100644 --- a/src/coreclr/src/vm/debughelp.cpp +++ b/src/coreclr/src/vm/debughelp.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" @@ -1016,10 +1015,6 @@ void PrintDomainName(size_t ob) #include "gcdump.h" -#include "../gcdump/i386/gcdumpx86.cpp" - -#include "../gcdump/gcdump.cpp" - /*********************************************************************/ void printfToDbgOut(const char* fmt, ...) { diff --git a/src/coreclr/src/vm/debuginfostore.cpp b/src/coreclr/src/vm/debuginfostore.cpp index 2c9d17c22f17..0d5b42a74faf 100644 --- a/src/coreclr/src/vm/debuginfostore.cpp +++ b/src/coreclr/src/vm/debuginfostore.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // DebugInfoStore diff --git a/src/coreclr/src/vm/debuginfostore.h b/src/coreclr/src/vm/debuginfostore.h index 518333705a97..4962c13942f0 100644 --- a/src/coreclr/src/vm/debuginfostore.h +++ b/src/coreclr/src/vm/debuginfostore.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // DebugInfoStore diff --git a/src/coreclr/src/vm/decodemd.cpp b/src/coreclr/src/vm/decodemd.cpp index efd8ba8623e8..6def9757c9b2 100644 --- a/src/coreclr/src/vm/decodemd.cpp +++ b/src/coreclr/src/vm/decodemd.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/vm/decodemd.h b/src/coreclr/src/vm/decodemd.h index 3037668b0ad2..7499f429e090 100644 --- a/src/coreclr/src/vm/decodemd.h +++ b/src/coreclr/src/vm/decodemd.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/vm/delegateinfo.h b/src/coreclr/src/vm/delegateinfo.h index a5db527d3ac7..2f9f2d718602 100644 --- a/src/coreclr/src/vm/delegateinfo.h +++ b/src/coreclr/src/vm/delegateinfo.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/vm/diagnosticserver.cpp b/src/coreclr/src/vm/diagnosticserver.cpp index d654dbafe62c..a843cf311a25 100644 --- a/src/coreclr/src/vm/diagnosticserver.cpp +++ b/src/coreclr/src/vm/diagnosticserver.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "diagnosticserver.h" @@ -27,7 +26,9 @@ DWORD WINAPI DiagnosticServer::DiagnosticsServerThread(LPVOID) { CONTRACTL { +#ifndef DEBUG NOTHROW; +#endif GC_TRIGGERS; MODE_PREEMPTIVE; PRECONDITION(s_shuttingDown || IpcStreamFactory::HasActiveConnections()); @@ -44,8 +45,10 @@ DWORD WINAPI DiagnosticServer::DiagnosticsServerThread(LPVOID) STRESS_LOG2(LF_DIAGNOSTICS_PORT, LL_WARNING, "warning (%d): %s.\n", code, szMessage); }; +#ifndef DEBUG EX_TRY { +#endif while (!s_shuttingDown) { IpcStream *pStream = IpcStreamFactory::GetNextAvailableStream(LoggingCallback); @@ -97,13 +100,14 @@ DWORD WINAPI DiagnosticServer::DiagnosticsServerThread(LPVOID) break; } } +#ifndef DEBUG } EX_CATCH { STRESS_LOG0(LF_DIAGNOSTICS_PORT, LL_ERROR, "Exception caught in diagnostic thread. Leaving thread now.\n"); - _ASSERTE(!"Hit an error in the diagnostic server thread\n."); } EX_END_CATCH(SwallowAllExceptions); +#endif return 0; } @@ -266,13 +270,13 @@ void DiagnosticServer::PauseForDiagnosticsMonitor() if (dwDotnetDiagnosticsMonitorPauseOnStart != 0) { _ASSERTE(s_ResumeRuntimeStartupEvent != nullptr && s_ResumeRuntimeStartupEvent->IsValid()); - wprintf(W("The runtime has been configured to pause during startup and is awaiting a Diagnostics IPC ResumeStartup command from a server at '%s'.\n"), (LPWSTR)pDotnetDiagnosticsMonitorAddress); - fflush(stdout); STRESS_LOG0(LF_DIAGNOSTICS_PORT, LL_ALWAYS, "The runtime has been configured to pause during startup and is awaiting a Diagnostics IPC ResumeStartup command."); const DWORD dwFiveSecondWait = s_ResumeRuntimeStartupEvent->Wait(5000, false); if (dwFiveSecondWait == WAIT_TIMEOUT) { - STRESS_LOG0(LF_DIAGNOSTICS_PORT, LL_ALWAYS, "The runtime has been configured to pause during startup and is awaiting a Diagnostics IPC ResumeStartup command and has waitied 5 seconds."); + wprintf(W("The runtime has been configured to pause during startup and is awaiting a Diagnostics IPC ResumeStartup command from a server at '%s'.\n"), (LPWSTR)pDotnetDiagnosticsMonitorAddress); + fflush(stdout); + STRESS_LOG0(LF_DIAGNOSTICS_PORT, LL_ALWAYS, "The runtime has been configured to pause during startup and is awaiting a Diagnostics IPC ResumeStartup command and has waited 5 seconds."); const DWORD dwWait = s_ResumeRuntimeStartupEvent->Wait(INFINITE, false); } } diff --git a/src/coreclr/src/vm/diagnosticserver.h b/src/coreclr/src/vm/diagnosticserver.h index 8bf3ce78570a..b7ea71d84192 100644 --- a/src/coreclr/src/vm/diagnosticserver.h +++ b/src/coreclr/src/vm/diagnosticserver.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __DIAGNOSTIC_SERVER_H__ #define __DIAGNOSTIC_SERVER_H__ diff --git a/src/coreclr/src/vm/diagnosticsprotocol.h b/src/coreclr/src/vm/diagnosticsprotocol.h index 4e6f9f4d81a7..e3c471e80a21 100644 --- a/src/coreclr/src/vm/diagnosticsprotocol.h +++ b/src/coreclr/src/vm/diagnosticsprotocol.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __DIAGNOSTICS_PROTOCOL_H__ #define __DIAGNOSTICS_PROTOCOL_H__ diff --git a/src/coreclr/src/vm/disassembler.cpp b/src/coreclr/src/vm/disassembler.cpp index 3d5eb16032ce..a0068c77c1e3 100755 --- a/src/coreclr/src/vm/disassembler.cpp +++ b/src/coreclr/src/vm/disassembler.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" diff --git a/src/coreclr/src/vm/disassembler.h b/src/coreclr/src/vm/disassembler.h index 07447d659b0e..568b98c59c7a 100644 --- a/src/coreclr/src/vm/disassembler.h +++ b/src/coreclr/src/vm/disassembler.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __DISASSEMBLER_H__ #define __DISASSEMBLER_H__ diff --git a/src/coreclr/src/vm/dispatchinfo.cpp b/src/coreclr/src/vm/dispatchinfo.cpp index dca9108f1d85..76ee48ff6a92 100644 --- a/src/coreclr/src/vm/dispatchinfo.cpp +++ b/src/coreclr/src/vm/dispatchinfo.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: DispatchInfo.cpp // @@ -72,8 +71,8 @@ DispatchMemberInfo::DispatchMemberInfo(DispatchInfo *pDispInfo, DISPID DispID, S , m_hndMemberInfo(NULL) , m_apParamMarshaler(NULL) , m_pParamInOnly(NULL) -, m_strName(strName) , m_pNext(NULL) +, m_strName(strName) , m_enumType (Uninitted) , m_iNumParams(-1) , m_CultureAwareState(Unknown) @@ -1035,8 +1034,8 @@ DispatchInfo::DispatchInfo(MethodTable *pMT) , m_pFirstMemberInfo(NULL) , m_lock(CrstInterop, (CrstFlags)(CRST_HOST_BREAKABLE | CRST_REENTRANCY)) , m_CurrentDispID(0x10000) -, m_bInvokeUsingInvokeMember(FALSE) , m_bAllowMembersNotInComMTMemberMap(FALSE) +, m_bInvokeUsingInvokeMember(FALSE) { CONTRACTL { diff --git a/src/coreclr/src/vm/dispatchinfo.h b/src/coreclr/src/vm/dispatchinfo.h index 483be69ec0cc..7441d6ad9b4c 100644 --- a/src/coreclr/src/vm/dispatchinfo.h +++ b/src/coreclr/src/vm/dispatchinfo.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: DispatchInfo.h // diff --git a/src/coreclr/src/vm/dispparammarshaler.cpp b/src/coreclr/src/vm/dispparammarshaler.cpp index 98ddd13cb008..f9d421da7219 100644 --- a/src/coreclr/src/vm/dispparammarshaler.cpp +++ b/src/coreclr/src/vm/dispparammarshaler.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: DispParamMarshaler.cpp // @@ -220,7 +219,6 @@ void DispParamInterfaceMarshaler::MarshalManagedToNative(OBJECTREF *pSrcObj, VAR V_VT(pDestVar) = static_cast(m_bDispatch ? VT_DISPATCH : VT_UNKNOWN); } -#ifdef FEATURE_CLASSIC_COMINTEROP void DispParamArrayMarshaler::MarshalNativeToManaged(VARIANT *pSrcVar, OBJECTREF *pDestObj) { CONTRACTL @@ -358,7 +356,6 @@ void DispParamArrayMarshaler::MarshalManagedToNativeRef(OBJECTREF *pSrcObj, VARI // Copy the converted variant back into the byref variant. OleVariant::InsertContentsIntoByrefVariant(&vtmp, pRefVar); } -#endif // FEATURE_CLASSIC_COMINTEROP void DispParamRecordMarshaler::MarshalNativeToManaged(VARIANT *pSrcVar, OBJECTREF *pDestObj) { diff --git a/src/coreclr/src/vm/dispparammarshaler.h b/src/coreclr/src/vm/dispparammarshaler.h index 55e9268a4191..fc431e706da4 100644 --- a/src/coreclr/src/vm/dispparammarshaler.h +++ b/src/coreclr/src/vm/dispparammarshaler.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: DispParamMarshaler.h // @@ -102,9 +101,9 @@ class DispParamInterfaceMarshaler : public DispParamMarshaler { public: DispParamInterfaceMarshaler(BOOL bDispatch, MethodTable* pIntfMT, MethodTable *pClassMT, BOOL bClassIsHint) : - m_bDispatch(bDispatch), m_pIntfMT(pIntfMT), m_pClassMT(pClassMT), + m_bDispatch(bDispatch), m_bClassIsHint(bClassIsHint) { WRAPPER_NO_CONTRACT; @@ -127,7 +126,6 @@ class DispParamInterfaceMarshaler : public DispParamMarshaler BOOL m_bClassIsHint; }; -#ifdef FEATURE_CLASSIC_COMINTEROP class DispParamArrayMarshaler : public DispParamMarshaler { public: @@ -151,7 +149,6 @@ class DispParamArrayMarshaler : public DispParamMarshaler VARTYPE m_ElementVT; MethodTable* m_pElementMT; }; -#endif // FEATURE_CLASSIC_COMINTEROP class DispParamRecordMarshaler : public DispParamMarshaler diff --git a/src/coreclr/src/vm/dllimport.cpp b/src/coreclr/src/vm/dllimport.cpp index c351324bfb11..1debfb2b4aae 100644 --- a/src/coreclr/src/vm/dllimport.cpp +++ b/src/coreclr/src/vm/dllimport.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: DllImport.cpp // @@ -1532,9 +1531,6 @@ NDirectStubLinker::NDirectStubLinker( m_pCleanupFinallyBeginLabel(NULL), m_pCleanupFinallyEndLabel(NULL), m_pSkipExceptionCleanupLabel(NULL), -#ifdef FEATURE_COMINTEROP - m_dwWinRTFactoryObjectLocalNum(-1), -#endif // FEATURE_COMINTEROP m_fHasCleanupCode(FALSE), m_fHasExceptionCleanupCode(FALSE), m_fCleanupWorkListIsSetup(FALSE), @@ -2083,7 +2079,7 @@ void NDirectStubLinker::DoNDirect(ILCodeStream *pcsEmit, DWORD dwStubFlags, Meth // for managed-to-unmanaged CALLI that requires marshaling, the target is passed // as the secret argument to the stub by GenericPInvokeCalliHelper (asmhelpers.asm) EmitLoadStubContext(pcsEmit, dwStubFlags); -#ifdef HOST_64BIT +#ifdef TARGET_64BIT // the secret arg has been shifted to left and ORed with 1 (see code:GenericPInvokeCalliHelper) pcsEmit->EmitLDC(1); pcsEmit->EmitSHR_UN(); @@ -2096,7 +2092,14 @@ void NDirectStubLinker::DoNDirect(ILCodeStream *pcsEmit, DWORD dwStubFlags, Meth { EmitLoadStubContext(pcsEmit, dwStubFlags); // pcsEmit->EmitCALL(METHOD__STUBHELPERS__GET_NDIRECT_TARGET, 1, 1); - pcsEmit->EmitLDC(offsetof(NDirectMethodDesc, ndirect.m_pWriteableData)); + +#ifdef _DEBUG // There are five more pointer values for _DEBUG + _ASSERTE(offsetof(NDirectMethodDesc, ndirect.m_pWriteableData) == sizeof(void*) * 8 + 8); + pcsEmit->EmitLDC(TARGET_POINTER_SIZE * 8 + 8); // offsetof(NDirectMethodDesc, ndirect.m_pWriteableData) +#else // _DEBUG + _ASSERTE(offsetof(NDirectMethodDesc, ndirect.m_pWriteableData) == sizeof(void*) * 3 + 8); + pcsEmit->EmitLDC(TARGET_POINTER_SIZE * 3 + 8); // offsetof(NDirectMethodDesc, ndirect.m_pWriteableData) +#endif // _DEBUG pcsEmit->EmitADD(); if (decltype(NDirectMethodDesc::ndirect.m_pWriteableData)::isRelative) @@ -3015,7 +3018,11 @@ HRESULT NDirect::HasNAT_LAttribute(IMDInternalImport *pInternalImport, mdToken t // Either MD or signature & module must be given. /*static*/ -BOOL NDirect::MarshalingRequired(MethodDesc *pMD, PCCOR_SIGNATURE pSig /*= NULL*/, Module *pModule /*= NULL*/) +BOOL NDirect::MarshalingRequired( + _In_opt_ MethodDesc* pMD, + _In_opt_ PCCOR_SIGNATURE pSig, + _In_opt_ Module* pModule, + _In_ bool unmanagedCallersOnlyRequiresMarshalling) { CONTRACTL { @@ -3049,9 +3056,23 @@ BOOL NDirect::MarshalingRequired(MethodDesc *pMD, PCCOR_SIGNATURE pSig /*= NULL* if (GetLCIDParameterIndex(pMD) != -1) return TRUE; - // making sure that cctor has run may be handled by stub - if (pMD->IsNDirect() && ((NDirectMethodDesc *)pMD)->IsClassConstructorTriggeredByILStub()) - return TRUE; + if (pMD->IsNDirect()) + { + // A P/Invoke marked with UnmanagedCallersOnlyAttribute + // doesn't technically require marshalling. However, we + // don't support a DllImport with this attribute and we + // error out during IL Stub generation so we indicate that + // when checking if an IL Stub is needed. + // + // Callers can indicate the check doesn't need to be performed. + if (unmanagedCallersOnlyRequiresMarshalling && pMD->HasUnmanagedCallersOnlyAttribute()) + return TRUE; + + NDirectMethodDesc* pNMD = (NDirectMethodDesc*)pMD; + // Make sure running cctor can be handled by stub + if (pNMD->IsClassConstructorTriggeredByILStub()) + return TRUE; + } callConv = sigInfo.GetCallConv(); } @@ -3109,7 +3130,7 @@ BOOL NDirect::MarshalingRequired(MethodDesc *pMD, PCCOR_SIGNATURE pSig /*= NULL* return TRUE; } } - if (i > 0) dwStackSize += sizeof(SLOT); + if (i > 0) dwStackSize += TARGET_POINTER_SIZE; break; } @@ -3364,7 +3385,7 @@ static inline UINT GetStackOffsetFromStackSize(UINT stackSize, bool fThisCall) if (fThisCall) { // -1 means that the argument is not on the stack - return (stackSize >= sizeof(SLOT) ? (stackSize - sizeof(SLOT)) : (UINT)-1); + return (stackSize >= TARGET_POINTER_SIZE ? (stackSize - TARGET_POINTER_SIZE) : (UINT)-1); } #endif // TARGET_X86 return stackSize; @@ -3462,8 +3483,7 @@ static void CreateNDirectStubWorker(StubState* pss, // // Marshal the return value. // - - UINT nativeStackSize = (SF_IsCOMStub(dwStubFlags) ? sizeof(SLOT) : 0); + UINT nativeStackSize = (SF_IsCOMStub(dwStubFlags) ? TARGET_POINTER_SIZE : 0); bool fStubNeedsCOM = SF_IsCOMStub(dwStubFlags); // Normally we would like this to be false so that we use the correct signature @@ -3580,7 +3600,7 @@ static void CreateNDirectStubWorker(StubState* pss, fStubNeedsCOM |= info.MarshalerRequiresCOM(); // make sure that the first parameter is enregisterable - if (info.GetNativeArgSize() > sizeof(SLOT)) + if (info.GetNativeArgSize() > TARGET_POINTER_SIZE) COMPlusThrow(kMarshalDirectiveException, IDS_EE_NDIRECT_BADNATL_THISCALL); argidx++; @@ -3599,7 +3619,7 @@ static void CreateNDirectStubWorker(StubState* pss, pParamTokenArray, nlType, nlFlags, - 0, + 1, // Indicating as the first argument pss, isInstanceMethod, argOffset, @@ -3631,7 +3651,7 @@ static void CreateNDirectStubWorker(StubState* pss, MethodTable *pRetMT = msig.GetRetTypeHandleThrowing().AsMethodTable(); if (IsUnmanagedValueTypeReturnedByRef(pRetMT->GetNativeSize())) { - nativeStackSize += sizeof(LPVOID); + nativeStackSize += TARGET_POINTER_SIZE; } } } @@ -3644,7 +3664,7 @@ static void CreateNDirectStubWorker(StubState* pss, if (argidx == iLCIDArg) { pss->MarshalLCID(argidx); - nativeStackSize += sizeof(LPVOID); + nativeStackSize += TARGET_POINTER_SIZE; if (SF_IsReverseStub(dwStubFlags)) argOffset++; @@ -3662,7 +3682,7 @@ static void CreateNDirectStubWorker(StubState* pss, if (fThisCall && argidx == 1) { // make sure that the first parameter is enregisterable - if (info.GetNativeArgSize() > sizeof(SLOT)) + if (info.GetNativeArgSize() > TARGET_POINTER_SIZE) COMPlusThrow(kMarshalDirectiveException, IDS_EE_NDIRECT_BADNATL_THISCALL); } @@ -3675,7 +3695,7 @@ static void CreateNDirectStubWorker(StubState* pss, if (argidx == iLCIDArg) { pss->MarshalLCID(argidx); - nativeStackSize += sizeof(LPVOID); + nativeStackSize += TARGET_POINTER_SIZE; if (SF_IsReverseStub(dwStubFlags)) argOffset++; @@ -3718,7 +3738,7 @@ static void CreateNDirectStubWorker(StubState* pss, if (SF_IsHRESULTSwapping(dwStubFlags)) { if (msig.GetReturnType() != ELEMENT_TYPE_VOID) - nativeStackSize += sizeof(LPVOID); + nativeStackSize += TARGET_POINTER_SIZE; } if (pMD->IsDynamicMethod()) @@ -3732,8 +3752,8 @@ static void CreateNDirectStubWorker(StubState* pss, #ifdef TARGET_X86 if (fThisCall) { - _ASSERTE(nativeStackSize >= sizeof(SLOT)); - nativeStackSize -= sizeof(SLOT); + _ASSERTE(nativeStackSize >= TARGET_POINTER_SIZE); + nativeStackSize -= TARGET_POINTER_SIZE; } #else // TARGET_X86 // @@ -3850,7 +3870,7 @@ static void CreateStructStub(ILStubState* pss, if (pMD->IsDynamicMethod()) { DynamicMethodDesc* pDMD = pMD->AsDynamicMethodDesc(); - pDMD->SetNativeStackArgSize(4 * sizeof(SLOT)); // The native stack arg size is constant since the signature for struct stubs is constant. + pDMD->SetNativeStackArgSize(4 * TARGET_POINTER_SIZE); // The native stack arg size is constant since the signature for struct stubs is constant. } // FinishEmit needs to know the native stack arg size so we call it after the number @@ -4182,15 +4202,21 @@ static void CreateNDirectStubAccessMetadata( } int lcidArg = -1; + + // Check if we have a MethodDesc to query for additional data. if (pSigDesc->m_pMD != NULL) { - lcidArg = GetLCIDParameterIndex(pSigDesc->m_pMD); + MethodDesc* pMD = pSigDesc->m_pMD; + + // P/Invoke marked with UnmanagedCallersOnlyAttribute is not + // presently supported. + if (pMD->HasUnmanagedCallersOnlyAttribute()) + COMPlusThrow(kNotSupportedException, IDS_EE_NDIRECT_UNSUPPORTED_SIG); // Check to see if we need to do LCID conversion. + lcidArg = GetLCIDParameterIndex(pMD); if (lcidArg != -1 && lcidArg > (*pNumArgs)) - { COMPlusThrow(kIndexOutOfRangeException, IDS_EE_INVALIDLCIDPARAM); - } } (*piLCIDArg) = lcidArg; @@ -5184,14 +5210,10 @@ MethodDesc* GetStubMethodDescFromInteropMethodDesc(MethodDesc* pMD, DWORD dwStub { STANDARD_VM_CONTRACT; - BOOL fGcMdaEnabled = FALSE; #ifdef FEATURE_COMINTEROP if (SF_IsReverseCOMStub(dwStubFlags)) { #ifdef FEATURE_PREJIT - if (fGcMdaEnabled) - return NULL; - // reverse COM stubs live in a hash table StubMethodHashTable *pHash = pMD->GetLoaderModule()->GetStubMethodHashTable(); return (pHash == NULL ? NULL : pHash->FindMethodDesc(pMD)); @@ -5204,23 +5226,17 @@ MethodDesc* GetStubMethodDescFromInteropMethodDesc(MethodDesc* pMD, DWORD dwStub if (pMD->IsNDirect()) { NDirectMethodDesc* pNMD = (NDirectMethodDesc*)pMD; - return ((fGcMdaEnabled && !pNMD->IsQCall()) ? NULL : pNMD->ndirect.m_pStubMD.GetValueMaybeNull()); + return pNMD->ndirect.m_pStubMD.GetValueMaybeNull(); } #ifdef FEATURE_COMINTEROP else if (pMD->IsComPlusCall() || pMD->IsGenericComPlusCall()) { - if (fGcMdaEnabled) - return NULL; - ComPlusCallInfo *pComInfo = ComPlusCallInfo::FromMethodDesc(pMD); return (pComInfo == NULL ? NULL : pComInfo->m_pStubMD.GetValueMaybeNull()); } #endif // FEATURE_COMINTEROP else if (pMD->IsEEImpl()) { - if (fGcMdaEnabled) - return NULL; - DelegateEEClass *pClass = (DelegateEEClass *)pMD->GetClass(); if (SF_IsReverseStub(dwStubFlags)) { @@ -6624,7 +6640,8 @@ EXTERN_C LPVOID STDCALL NDirectImportWorker(NDirectMethodDesc* pMD) // INDEBUG(Thread *pThread = GetThread()); { - _ASSERTE(pMD->ShouldSuppressGCTransition() || pThread->GetFrame()->GetVTablePtr() == InlinedCallFrame::GetMethodFrameVPtr()); + _ASSERTE(pMD->ShouldSuppressGCTransition() + || pThread->GetFrame()->GetVTablePtr() == InlinedCallFrame::GetMethodFrameVPtr()); CONSISTENCY_CHECK(pMD->IsNDirect()); // @@ -6764,19 +6781,21 @@ PCODE GetILStubForCalli(VASigCookie *pVASigCookie, MethodDesc *pMD) switch (MetaSig::GetCallingConvention(pVASigCookie->pModule, pVASigCookie->signature)) { case IMAGE_CEE_CS_CALLCONV_C: - unmgdCallConv = pmCallConvCdecl; - break; + unmgdCallConv = pmCallConvCdecl; + break; case IMAGE_CEE_CS_CALLCONV_STDCALL: - unmgdCallConv = pmCallConvStdcall; - break; + unmgdCallConv = pmCallConvStdcall; + break; case IMAGE_CEE_CS_CALLCONV_THISCALL: - unmgdCallConv = pmCallConvThiscall; - break; + unmgdCallConv = pmCallConvThiscall; + break; case IMAGE_CEE_CS_CALLCONV_FASTCALL: - unmgdCallConv = pmCallConvFastcall; - break; + unmgdCallConv = pmCallConvFastcall; + break; + case IMAGE_CEE_CS_CALLCONV_UNMANAGED: + COMPlusThrow(kNotImplementedException); default: - COMPlusThrow(kTypeLoadException, IDS_INVALID_PINVOKE_CALLCONV); + COMPlusThrow(kTypeLoadException, IDS_INVALID_PINVOKE_CALLCONV); } LoaderHeap *pHeap = pVASigCookie->pModule->GetLoaderAllocator()->GetHighFrequencyHeap(); diff --git a/src/coreclr/src/vm/dllimport.h b/src/coreclr/src/vm/dllimport.h index 035721fe697c..b24ab6e3e6c8 100644 --- a/src/coreclr/src/vm/dllimport.h +++ b/src/coreclr/src/vm/dllimport.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: DllImport.h // @@ -83,7 +82,11 @@ class NDirect static VOID NDirectLink(NDirectMethodDesc *pMD); // Either MD or signature & module must be given. - static BOOL MarshalingRequired(MethodDesc *pMD, PCCOR_SIGNATURE pSig = NULL, Module *pModule = NULL); + static BOOL MarshalingRequired( + _In_opt_ MethodDesc* pMD, + _In_opt_ PCCOR_SIGNATURE pSig = NULL, + _In_opt_ Module* pModule = NULL, + _In_ bool unmanagedCallersOnlyRequiresMarshalling = true); static void PopulateNDirectMethodDesc(NDirectMethodDesc* pNMD, PInvokeStaticSigInfo* pSigInfo, BOOL throwOnError = TRUE); static MethodDesc* CreateCLRToNativeILStub( @@ -188,7 +191,6 @@ enum ILStubTypes ILSTUB_WRAPPERDELEGATE_INVOKE = 0x80000007, ILSTUB_TAILCALL_STOREARGS = 0x80000008, ILSTUB_TAILCALL_CALLTARGET = 0x80000009, - ILSTUB_TAILCALL_DISPATCH = 0x8000000A, }; #ifdef FEATURE_COMINTEROP @@ -228,7 +230,6 @@ inline bool SF_IsInstantiatingStub (DWORD dwStubFlags) { LIMITED_METHOD_CON #endif inline bool SF_IsTailCallStoreArgsStub (DWORD dwStubFlags) { LIMITED_METHOD_CONTRACT; return (dwStubFlags == ILSTUB_TAILCALL_STOREARGS); } inline bool SF_IsTailCallCallTargetStub (DWORD dwStubFlags) { LIMITED_METHOD_CONTRACT; return (dwStubFlags == ILSTUB_TAILCALL_CALLTARGET); } -inline bool SF_IsTailCallDispatcherStub (DWORD dwStubFlags) { LIMITED_METHOD_CONTRACT; return (dwStubFlags == ILSTUB_TAILCALL_DISPATCH); } inline bool SF_IsCOMStub (DWORD dwStubFlags) { LIMITED_METHOD_CONTRACT; return COM_ONLY(dwStubFlags < NDIRECTSTUB_FL_INVALID && 0 != (dwStubFlags & NDIRECTSTUB_FL_COM)); } inline bool SF_IsCOMLateBoundStub (DWORD dwStubFlags) { LIMITED_METHOD_CONTRACT; return COM_ONLY(dwStubFlags < NDIRECTSTUB_FL_INVALID && 0 != (dwStubFlags & NDIRECTSTUB_FL_COMLATEBOUND)); } @@ -240,8 +241,7 @@ inline bool SF_IsSharedStub(DWORD dwStubFlags) { WRAPPER_NO_CONTRACT; - if (SF_IsTailCallStoreArgsStub(dwStubFlags) || SF_IsTailCallCallTargetStub(dwStubFlags) || - SF_IsTailCallDispatcherStub(dwStubFlags)) + if (SF_IsTailCallStoreArgsStub(dwStubFlags) || SF_IsTailCallCallTargetStub(dwStubFlags)) { return false; } @@ -542,7 +542,6 @@ class NDirectStubLinker : public ILStubLinker #ifdef FEATURE_COMINTEROP DWORD m_dwTargetInterfacePointerLocalNum; DWORD m_dwTargetEntryPointLocalNum; - DWORD m_dwWinRTFactoryObjectLocalNum; #endif // FEATURE_COMINTEROP BOOL m_fHasCleanupCode; diff --git a/src/coreclr/src/vm/dllimportcallback.cpp b/src/coreclr/src/vm/dllimportcallback.cpp index be989d1f6097..c3c69ddbf348 100644 --- a/src/coreclr/src/vm/dllimportcallback.cpp +++ b/src/coreclr/src/vm/dllimportcallback.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: DllImportCallback.cpp // @@ -23,6 +22,7 @@ #include "appdomain.inl" #include "callingconvention.h" #include "customattribute.h" +#include "typeparse.h" #ifndef CROSSGEN_COMPILE @@ -614,6 +614,22 @@ VOID UMEntryThunk::CompileUMThunkWorker(UMThunkStubInfo *pInfo, pcpusl->X86EmitNearJump(pEnableRejoin); } +namespace +{ + // Templated function to compute if a char string begins with a constant string. + template + bool BeginsWith(ULONG s1Len, const char* s1, const char (&s2)[S2LEN]) + { + WRAPPER_NO_CONTRACT; + + ULONG s2Len = (ULONG)S2LEN - 1; // Remove null + if (s1Len < s2Len) + return false; + + return (0 == strncmp(s1, s2, s2Len)); + } +} + VOID UMThunkMarshInfo::SetUpForUnmanagedCallersOnly() { STANDARD_VM_CONTRACT; @@ -621,37 +637,103 @@ VOID UMThunkMarshInfo::SetUpForUnmanagedCallersOnly() MethodDesc* pMD = GetMethod(); _ASSERTE(pMD != NULL && pMD->HasUnmanagedCallersOnlyAttribute()); - // Validate UnmanagedCallersOnlyAttribute usage + // Validate usage COMDelegate::ThrowIfInvalidUnmanagedCallersOnlyUsage(pMD); BYTE* pData = NULL; LONG cData = 0; - CorPinvokeMap callConv = (CorPinvokeMap)0; + bool nativeCallableInternalData = false; HRESULT hr = pMD->GetCustomAttribute(WellKnownAttribute::UnmanagedCallersOnly, (const VOID **)(&pData), (ULONG *)&cData); if (hr == S_FALSE) + { hr = pMD->GetCustomAttribute(WellKnownAttribute::NativeCallableInternal, (const VOID **)(&pData), (ULONG *)&cData); + nativeCallableInternalData = SUCCEEDED(hr); + } IfFailThrow(hr); _ASSERTE(cData > 0); CustomAttributeParser ca(pData, cData); - // UnmanagedCallersOnly has two optional named arguments CallingConvention and EntryPoint. + + // UnmanagedCallersOnly and NativeCallableInternal each + // have optional named arguments. CaNamedArg namedArgs[2]; - CaTypeCtor caType(SERIALIZATION_TYPE_STRING); - // First, the void constructor. - IfFailThrow(ParseKnownCaArgs(ca, NULL, 0)); - - // Now the optional named properties - namedArgs[0].InitI4FieldEnum("CallingConvention", "System.Runtime.InteropServices.CallingConvention", (ULONG)callConv); - namedArgs[1].Init("EntryPoint", SERIALIZATION_TYPE_STRING, caType); - IfFailThrow(ParseKnownCaNamedArgs(ca, namedArgs, lengthof(namedArgs))); - - callConv = (CorPinvokeMap)(namedArgs[0].val.u4 << 8); - // Let UMThunkMarshalInfo choose the default if calling convension not definied. - if (namedArgs[0].val.type.tag != SERIALIZATION_TYPE_UNDEFINED) - m_callConv = (UINT16)callConv; + + // For the UnmanagedCallersOnly scenario. + CaType caCallConvs; + + // Define attribute specific optional named properties + if (nativeCallableInternalData) + { + namedArgs[0].InitI4FieldEnum("CallingConvention", "System.Runtime.InteropServices.CallingConvention", (ULONG)(CorPinvokeMap)0); + } + else + { + caCallConvs.Init(SERIALIZATION_TYPE_SZARRAY, SERIALIZATION_TYPE_TYPE, SERIALIZATION_TYPE_UNDEFINED, NULL, 0); + namedArgs[0].Init("CallConvs", SERIALIZATION_TYPE_SZARRAY, caCallConvs); + } + + // Define common optional named properties + CaTypeCtor caEntryPoint(SERIALIZATION_TYPE_STRING); + namedArgs[1].Init("EntryPoint", SERIALIZATION_TYPE_STRING, caEntryPoint); + + InlineFactory, 4> caValueArrayFactory; + DomainAssembly* domainAssembly = pMD->GetLoaderModule()->GetDomainAssembly(); + IfFailThrow(Attribute::ParseAttributeArgumentValues( + pData, + cData, + &caValueArrayFactory, + NULL, + 0, + namedArgs, + lengthof(namedArgs), + domainAssembly)); + + // If the value isn't defined, then return without setting anything. + if (namedArgs[0].val.type.tag == SERIALIZATION_TYPE_UNDEFINED) + return; + + CorPinvokeMap callConvLocal = (CorPinvokeMap)0; + if (nativeCallableInternalData) + { + callConvLocal = (CorPinvokeMap)(namedArgs[0].val.u4 << 8); + } + else + { + // Set WinAPI as the default + callConvLocal = CorPinvokeMap::pmCallConvWinapi; + + CaValue* arrayOfTypes = &namedArgs[0].val; + for (ULONG i = 0; i < arrayOfTypes->arr.length; i++) + { + CaValue& typeNameValue = arrayOfTypes->arr[i]; + + // According to ECMA-335, type name strings are UTF-8. Since we are + // looking for type names that are equivalent in ASCII and UTF-8, + // using a const char constant is acceptable. Type name strings are + // in Fully Qualified form, so we include the ',' delimiter. + if (BeginsWith(typeNameValue.str.cbStr, typeNameValue.str.pStr, "System.Runtime.CompilerServices.CallConvCdecl,")) + { + callConvLocal = CorPinvokeMap::pmCallConvCdecl; + } + else if (BeginsWith(typeNameValue.str.cbStr, typeNameValue.str.pStr, "System.Runtime.CompilerServices.CallConvStdcall,")) + { + callConvLocal = CorPinvokeMap::pmCallConvStdcall; + } + else if (BeginsWith(typeNameValue.str.cbStr, typeNameValue.str.pStr, "System.Runtime.CompilerServices.CallConvFastcall,")) + { + callConvLocal = CorPinvokeMap::pmCallConvFastcall; + } + else if (BeginsWith(typeNameValue.str.cbStr, typeNameValue.str.pStr, "System.Runtime.CompilerServices.CallConvThiscall,")) + { + callConvLocal = CorPinvokeMap::pmCallConvThiscall; + } + } + } + + m_callConv = (UINT16)callConvLocal; } // Compiles an unmanaged to managed thunk for the given signature. @@ -776,7 +858,7 @@ Stub *UMThunkMarshInfo::CompileNExportThunk(LoaderHeap *pLoaderHeap, PInvokeStat stubInfo.m_cbSrcStack = static_cast(m_cbActualArgSize); stubInfo.m_cbDstStack = nStackBytes; - if (pSigInfo->GetCallConv() == pmCallConvCdecl) + if (m_callConv == pmCallConvCdecl) { // caller pop m_cbRetPop = 0; @@ -786,7 +868,7 @@ Stub *UMThunkMarshInfo::CompileNExportThunk(LoaderHeap *pLoaderHeap, PInvokeStat // callee pop m_cbRetPop = static_cast(m_cbActualArgSize); - if (pSigInfo->GetCallConv() == pmCallConvThiscall) + if (m_callConv == pmCallConvThiscall) { stubInfo.m_wFlags |= umtmlThisCall; if (argit.HasRetBuffArg()) diff --git a/src/coreclr/src/vm/dllimportcallback.h b/src/coreclr/src/vm/dllimportcallback.h index b92b8e8784cc..b98f0743213f 100644 --- a/src/coreclr/src/vm/dllimportcallback.h +++ b/src/coreclr/src/vm/dllimportcallback.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: DllImportCallback.h // diff --git a/src/coreclr/src/vm/domainfile.cpp b/src/coreclr/src/vm/domainfile.cpp index 33a1f9dfc030..2740c1881fab 100644 --- a/src/coreclr/src/vm/domainfile.cpp +++ b/src/coreclr/src/vm/domainfile.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // -------------------------------------------------------------------------------- // DomainFile.cpp // @@ -1446,15 +1445,6 @@ void DomainAssembly::Allocate() assemblyHolder.SuppressRelease(); } -#ifdef FEATURE_COMINTEROP - // If we are in an AppX process we should prevent loading of PIA in the AppDomain. - // This will ensure that we do not run into any compatibility issues in case a type has both a co-Class and a Winrt Class - if (AppX::IsAppXProcess() && pAssembly->IsPIA()) - { - COMPlusThrow(kNotSupportedException, W("NotSupported_PIAInAppxProcess")); - } -#endif - SetAssembly(pAssembly); #ifdef FEATURE_PREJIT diff --git a/src/coreclr/src/vm/domainfile.h b/src/coreclr/src/vm/domainfile.h index c0f7e15fd105..2f1439b403fd 100644 --- a/src/coreclr/src/vm/domainfile.h +++ b/src/coreclr/src/vm/domainfile.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // -------------------------------------------------------------------------------- // DomainFile.h // diff --git a/src/coreclr/src/vm/domainfile.inl b/src/coreclr/src/vm/domainfile.inl index 8bc6104d1983..297ea089e152 100644 --- a/src/coreclr/src/vm/domainfile.inl +++ b/src/coreclr/src/vm/domainfile.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/vm/dumpdiagnosticprotocolhelper.cpp b/src/coreclr/src/vm/dumpdiagnosticprotocolhelper.cpp index 920691f988d5..70caa5a9ac6a 100644 --- a/src/coreclr/src/vm/dumpdiagnosticprotocolhelper.cpp +++ b/src/coreclr/src/vm/dumpdiagnosticprotocolhelper.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "fastserializer.h" diff --git a/src/coreclr/src/vm/dumpdiagnosticprotocolhelper.h b/src/coreclr/src/vm/dumpdiagnosticprotocolhelper.h index bd0055423d6e..be8f7596245e 100644 --- a/src/coreclr/src/vm/dumpdiagnosticprotocolhelper.h +++ b/src/coreclr/src/vm/dumpdiagnosticprotocolhelper.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __DUMP_DIAGNOSTIC_PROTOCOL_HELPER_H__ #define __DUMP_DIAGNOSTIC_PROTOCOL_HELPER_H__ diff --git a/src/coreclr/src/vm/dwbucketmanager.hpp b/src/coreclr/src/vm/dwbucketmanager.hpp index eb7beac884d2..b4309df6de46 100644 --- a/src/coreclr/src/vm/dwbucketmanager.hpp +++ b/src/coreclr/src/vm/dwbucketmanager.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // FILE: dwbucketmanager.hpp // @@ -88,10 +87,6 @@ DWORD GetCountBucketParamsForEvent(LPCWSTR wzEventName) #include "dbginterface.h" #include -#ifdef FEATURE_APPX -#include "appxutil.h" -#endif - //------------------------------------------------------------------------------ // Description // Converts an array of bytes to a string of base32 encoded characters. @@ -340,7 +335,7 @@ class BaseBucketParamsManager }; BaseBucketParamsManager::BaseBucketParamsManager(GenericModeBlock* pGenericModeBlock, TypeOfReportedError typeOfError, PCODE initialFaultingPc, Thread* pFaultingThread, OBJECTREF* pThrownException) - : m_pFaultingMD(NULL), m_faultingPc(initialFaultingPc), m_pGmb(pGenericModeBlock), m_tore(typeOfError), m_pThread(pFaultingThread), m_pException(pThrownException) + : m_pGmb(pGenericModeBlock), m_tore(typeOfError), m_pThread(pFaultingThread), m_pException(pThrownException), m_pFaultingMD(NULL), m_faultingPc(initialFaultingPc) { CONTRACTL { diff --git a/src/coreclr/src/vm/dwreport.cpp b/src/coreclr/src/vm/dwreport.cpp index 0b9a2c943829..895ecbbadb53 100644 --- a/src/coreclr/src/vm/dwreport.cpp +++ b/src/coreclr/src/vm/dwreport.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // FILE: dwreport.cpp // diff --git a/src/coreclr/src/vm/dwreport.h b/src/coreclr/src/vm/dwreport.h index 5280690cd85d..485eb7cfdf91 100644 --- a/src/coreclr/src/vm/dwreport.h +++ b/src/coreclr/src/vm/dwreport.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // FILE: dwreport.h // diff --git a/src/coreclr/src/vm/dynamicinterfacecastable.cpp b/src/coreclr/src/vm/dynamicinterfacecastable.cpp index 99742a2a7c05..5ed7b8c6c00a 100644 --- a/src/coreclr/src/vm/dynamicinterfacecastable.cpp +++ b/src/coreclr/src/vm/dynamicinterfacecastable.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" diff --git a/src/coreclr/src/vm/dynamicinterfacecastable.h b/src/coreclr/src/vm/dynamicinterfacecastable.h index a2c1a70451e7..c2a3fd8c63b6 100644 --- a/src/coreclr/src/vm/dynamicinterfacecastable.h +++ b/src/coreclr/src/vm/dynamicinterfacecastable.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _DYNAMICINTERFACECASTABLE_H_ diff --git a/src/coreclr/src/vm/dynamicmethod.cpp b/src/coreclr/src/vm/dynamicmethod.cpp index a9f3a876d2cd..51ce113d1adb 100644 --- a/src/coreclr/src/vm/dynamicmethod.cpp +++ b/src/coreclr/src/vm/dynamicmethod.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/dynamicmethod.h b/src/coreclr/src/vm/dynamicmethod.h index 9e4322de213c..0d6599f880bb 100644 --- a/src/coreclr/src/vm/dynamicmethod.h +++ b/src/coreclr/src/vm/dynamicmethod.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/ecall.cpp b/src/coreclr/src/vm/ecall.cpp index 5af0a26a18d0..94a80c3c4a94 100644 --- a/src/coreclr/src/vm/ecall.cpp +++ b/src/coreclr/src/vm/ecall.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ECALL.CPP - // // Handles our private native calling interface. diff --git a/src/coreclr/src/vm/ecall.h b/src/coreclr/src/vm/ecall.h index cd8c7fea0dba..b677cfe1d183 100644 --- a/src/coreclr/src/vm/ecall.h +++ b/src/coreclr/src/vm/ecall.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ECALL.H - // // Handles our private native calling interface. diff --git a/src/coreclr/src/vm/ecalllist.h b/src/coreclr/src/vm/ecalllist.h index 19909f9f1500..d6b592a8bb88 100644 --- a/src/coreclr/src/vm/ecalllist.h +++ b/src/coreclr/src/vm/ecalllist.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ECallList.H // // This file contains definitions of FCall entrypoints @@ -419,12 +418,6 @@ FCFuncStart(gCompatibilitySwitchFuncs) FCFuncElement("GetValueInternalCall", CompatibilitySwitch::GetValue) FCFuncEnd() -#ifdef FEATURE_APPX -FCFuncStart(gApplicationModelFuncs) - QCFuncElement("IsAppXProcess", AppDomainNative::IsAppXProcess) -FCFuncEnd() -#endif - FCFuncStart(gMdUtf8String) QCFuncElement("EqualsCaseInsensitive", MdUtf8String::EqualsCaseInsensitive) QCFuncElement("HashCaseInsensitive", MdUtf8String::HashCaseInsensitive) @@ -959,7 +952,6 @@ FCFuncStart(gMngdRefCustomMarshalerFuncs) FCFuncEnd() FCFuncStart(gStubHelperFuncs) - FCFuncElement("IsQCall", StubHelpers::IsQCall) FCFuncElement("InitDeclaringType", StubHelpers::InitDeclaringType) FCIntrinsic("GetNDirectTarget", StubHelpers::GetNDirectTarget, CORINFO_INTRINSIC_StubHelpers_GetNDirectTarget) FCFuncElement("GetDelegateTarget", StubHelpers::GetDelegateTarget) @@ -1132,9 +1124,6 @@ FCFuncEnd() // Note these have to remain sorted by name:namespace pair (Assert will wack you if you don't) // The sorting is case-sensitive -#ifdef FEATURE_APPX -FCClassElement("ApplicationModel", "System", gApplicationModelFuncs) -#endif FCClassElement("ArgIterator", "System", gVarArgFuncs) FCClassElement("Array", "System", gArrayFuncs) FCClassElement("Assembly", "System.Reflection", gAssemblyFuncs) diff --git a/src/coreclr/src/vm/eeconfig.cpp b/src/coreclr/src/vm/eeconfig.cpp index bb4266f86fb7..6193c0d1e372 100644 --- a/src/coreclr/src/vm/eeconfig.cpp +++ b/src/coreclr/src/vm/eeconfig.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // EEConfig.CPP // @@ -11,9 +10,6 @@ #include "common.h" -#ifdef FEATURE_COMINTEROP -#include -#endif #include "eeconfig.h" #include "method.hpp" #include "eventtrace.h" diff --git a/src/coreclr/src/vm/eeconfig.h b/src/coreclr/src/vm/eeconfig.h index 7ed91a49fc9d..357ffe906b9a 100644 --- a/src/coreclr/src/vm/eeconfig.h +++ b/src/coreclr/src/vm/eeconfig.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // EEConfig.H // diff --git a/src/coreclr/src/vm/eecontract.cpp b/src/coreclr/src/vm/eecontract.cpp index 105bc36c8b0a..50695468b6b9 100644 --- a/src/coreclr/src/vm/eecontract.cpp +++ b/src/coreclr/src/vm/eecontract.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // --------------------------------------------------------------------------- // EEContract.cpp diff --git a/src/coreclr/src/vm/eecontract.h b/src/coreclr/src/vm/eecontract.h index 74fbc76ad897..1c2776aaadd1 100644 --- a/src/coreclr/src/vm/eecontract.h +++ b/src/coreclr/src/vm/eecontract.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // --------------------------------------------------------------------------- // EEContract.h diff --git a/src/coreclr/src/vm/eedbginterface.h b/src/coreclr/src/vm/eedbginterface.h index f35def0f39af..1ce5b8b928ea 100644 --- a/src/coreclr/src/vm/eedbginterface.h +++ b/src/coreclr/src/vm/eedbginterface.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // COM+99 EE to Debugger Interface Header // diff --git a/src/coreclr/src/vm/eedbginterfaceimpl.cpp b/src/coreclr/src/vm/eedbginterfaceimpl.cpp index db0a0d0a0dc6..469c2221f47b 100644 --- a/src/coreclr/src/vm/eedbginterfaceimpl.cpp +++ b/src/coreclr/src/vm/eedbginterfaceimpl.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* diff --git a/src/coreclr/src/vm/eedbginterfaceimpl.h b/src/coreclr/src/vm/eedbginterfaceimpl.h index 40f5894c2ad3..c4c44b44a987 100644 --- a/src/coreclr/src/vm/eedbginterfaceimpl.h +++ b/src/coreclr/src/vm/eedbginterfaceimpl.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* diff --git a/src/coreclr/src/vm/eedbginterfaceimpl.inl b/src/coreclr/src/vm/eedbginterfaceimpl.inl index 0b9306babf80..3f1eb866c7aa 100644 --- a/src/coreclr/src/vm/eedbginterfaceimpl.inl +++ b/src/coreclr/src/vm/eedbginterfaceimpl.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** //***************************************************************************** diff --git a/src/coreclr/src/vm/eehash.cpp b/src/coreclr/src/vm/eehash.cpp index d3e89809e89b..97bcb589c9fb 100644 --- a/src/coreclr/src/vm/eehash.cpp +++ b/src/coreclr/src/vm/eehash.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: eehash.cpp // diff --git a/src/coreclr/src/vm/eehash.h b/src/coreclr/src/vm/eehash.h index 20a1c3494ac5..f45935cb4c99 100644 --- a/src/coreclr/src/vm/eehash.h +++ b/src/coreclr/src/vm/eehash.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/eehash.inl b/src/coreclr/src/vm/eehash.inl index e49a80e022eb..cfc23bfffc30 100644 --- a/src/coreclr/src/vm/eehash.inl +++ b/src/coreclr/src/vm/eehash.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/vm/eemessagebox.cpp b/src/coreclr/src/vm/eemessagebox.cpp index 69f5bf866758..f0acd36a13f6 100644 --- a/src/coreclr/src/vm/eemessagebox.cpp +++ b/src/coreclr/src/vm/eemessagebox.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // EEMessageBox.h // diff --git a/src/coreclr/src/vm/eemessagebox.h b/src/coreclr/src/vm/eemessagebox.h index 717aebbf1f5b..fb91c9394292 100644 --- a/src/coreclr/src/vm/eemessagebox.h +++ b/src/coreclr/src/vm/eemessagebox.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // EEMessageBox.h // diff --git a/src/coreclr/src/vm/eepolicy.cpp b/src/coreclr/src/vm/eepolicy.cpp index b1e85e16030f..c6ca684c1437 100644 --- a/src/coreclr/src/vm/eepolicy.cpp +++ b/src/coreclr/src/vm/eepolicy.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/eepolicy.h b/src/coreclr/src/vm/eepolicy.h index fa133791770a..e8f821c065ab 100644 --- a/src/coreclr/src/vm/eepolicy.h +++ b/src/coreclr/src/vm/eepolicy.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/eeprofinterfaces.h b/src/coreclr/src/vm/eeprofinterfaces.h index 79b37411578d..ec51b014148b 100644 --- a/src/coreclr/src/vm/eeprofinterfaces.h +++ b/src/coreclr/src/vm/eeprofinterfaces.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // EEProfInterfaces.h // diff --git a/src/coreclr/src/vm/eeprofinterfaces.inl b/src/coreclr/src/vm/eeprofinterfaces.inl index 55cff53de0e2..250b3700f801 100644 --- a/src/coreclr/src/vm/eeprofinterfaces.inl +++ b/src/coreclr/src/vm/eeprofinterfaces.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // EEProfInterfaces.inl // diff --git a/src/coreclr/src/vm/eetoprofinterfaceimpl.cpp b/src/coreclr/src/vm/eetoprofinterfaceimpl.cpp index bdd615a6094e..698dbec5f92b 100644 --- a/src/coreclr/src/vm/eetoprofinterfaceimpl.cpp +++ b/src/coreclr/src/vm/eetoprofinterfaceimpl.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // EEToProfInterfaceImpl.cpp // @@ -78,6 +77,10 @@ #include "simplerwlock.hpp" #include "eeconfig.h" +#ifdef FEATURE_PERFTRACING +#include "eventpipeprovider.h" +#endif // FEATURE_PERFTRACING + //--------------------------------------------------------------------------------------- // Helpers @@ -408,6 +411,7 @@ EEToProfInterfaceImpl::EEToProfInterfaceImpl() : m_pCallback7(NULL), m_pCallback8(NULL), m_pCallback9(NULL), + m_pCallback10(NULL), m_hmodProfilerDLL(NULL), m_fLoadedViaAttach(FALSE), m_pProfToEE(NULL), @@ -654,47 +658,41 @@ HRESULT EEToProfInterfaceImpl::CreateProfiler( m_hmodProfilerDLL = hmodProfilerDLL.Extract(); hmodProfilerDLL = NULL; - // The profiler may optionally support ICorProfilerCallback3,4,5,6,7,8,9. Let's check. - - ReleaseHolder pCallback9; + // The profiler may optionally support ICorProfilerCallback3,4,5,6,7,8,9,10. Let's check. + ReleaseHolder pCallback10; hr = m_pCallback2->QueryInterface( - IID_ICorProfilerCallback9, - (LPVOID *)&pCallback9); - if (SUCCEEDED(hr) && (pCallback9 != NULL)) + IID_ICorProfilerCallback10, + (LPVOID *)&pCallback10); + if (SUCCEEDED(hr) && (pCallback10 != NULL)) { - // Nifty. Transfer ownership to this class - _ASSERTE(m_pCallback9 == NULL); - m_pCallback9 = pCallback9.Extract(); - pCallback9 = NULL; - - // And while we're at it, we must now also have an ICorProfilerCallback3,4,5,6,7,8 - // due to inheritance relationship of the interfaces - _ASSERTE(m_pCallback8 == NULL); - m_pCallback8 = static_cast(m_pCallback9); - m_pCallback8->AddRef(); - - _ASSERTE(m_pCallback7 == NULL); - m_pCallback7 = static_cast(m_pCallback8); - m_pCallback7->AddRef(); - - _ASSERTE(m_pCallback6 == NULL); - m_pCallback6 = static_cast(m_pCallback7); - m_pCallback6->AddRef(); - - _ASSERTE(m_pCallback5 == NULL); - m_pCallback5 = static_cast(m_pCallback6); - m_pCallback5->AddRef(); - - _ASSERTE(m_pCallback4 == NULL); - m_pCallback4 = static_cast(m_pCallback5); - m_pCallback4->AddRef(); + _ASSERTE(m_pCallback10 == NULL); + m_pCallback10 = pCallback10.Extract(); + pCallback10 = NULL; + } - _ASSERTE(m_pCallback3 == NULL); - m_pCallback3 = static_cast(m_pCallback4); - m_pCallback3->AddRef(); + // Due to inheritance, if we have an interface we must also have + // all the previous versions + if (m_pCallback10 == NULL) + { + ReleaseHolder pCallback9; + hr = m_pCallback2->QueryInterface( + IID_ICorProfilerCallback9, + (LPVOID *)&pCallback9); + if (SUCCEEDED(hr) && (pCallback9 != NULL)) + { + _ASSERTE(m_pCallback9 == NULL); + m_pCallback9 = pCallback9.Extract(); + pCallback9 = NULL; + } + } + else + { + _ASSERTE(m_pCallback9 == NULL); + m_pCallback9 = static_cast(m_pCallback10); + m_pCallback9->AddRef(); } - if (m_pCallback8 == NULL) + if (m_pCallback9 == NULL) { ReleaseHolder pCallback8; hr = m_pCallback2->QueryInterface( @@ -702,37 +700,19 @@ HRESULT EEToProfInterfaceImpl::CreateProfiler( (LPVOID *)&pCallback8); if (SUCCEEDED(hr) && (pCallback8 != NULL)) { - // Nifty. Transfer ownership to this class _ASSERTE(m_pCallback8 == NULL); m_pCallback8 = pCallback8.Extract(); pCallback8 = NULL; - - // And while we're at it, we must now also have an ICorProfilerCallback3,4,5,6,7 - // due to inheritance relationship of the interfaces - - _ASSERTE(m_pCallback7 == NULL); - m_pCallback7 = static_cast(m_pCallback8); - m_pCallback7->AddRef(); - - _ASSERTE(m_pCallback6 == NULL); - m_pCallback6 = static_cast(m_pCallback7); - m_pCallback6->AddRef(); - - _ASSERTE(m_pCallback5 == NULL); - m_pCallback5 = static_cast(m_pCallback6); - m_pCallback5->AddRef(); - - _ASSERTE(m_pCallback4 == NULL); - m_pCallback4 = static_cast(m_pCallback5); - m_pCallback4->AddRef(); - - _ASSERTE(m_pCallback3 == NULL); - m_pCallback3 = static_cast(m_pCallback4); - m_pCallback3->AddRef(); } } + else + { + _ASSERTE(m_pCallback8 == NULL); + m_pCallback8 = static_cast(m_pCallback9); + m_pCallback8->AddRef(); + } - if (m_pCallback7 == NULL) + if (m_pCallback8 == NULL) { ReleaseHolder pCallback7; hr = m_pCallback2->QueryInterface( @@ -740,33 +720,19 @@ HRESULT EEToProfInterfaceImpl::CreateProfiler( (LPVOID *)&pCallback7); if (SUCCEEDED(hr) && (pCallback7 != NULL)) { - // Nifty. Transfer ownership to this class _ASSERTE(m_pCallback7 == NULL); m_pCallback7 = pCallback7.Extract(); pCallback7 = NULL; - - // And while we're at it, we must now also have an ICorProfilerCallback3,4,5,6 - // due to inheritance relationship of the interfaces - - _ASSERTE(m_pCallback6 == NULL); - m_pCallback6 = static_cast(m_pCallback7); - m_pCallback6->AddRef(); - - _ASSERTE(m_pCallback5 == NULL); - m_pCallback5 = static_cast(m_pCallback6); - m_pCallback5->AddRef(); - - _ASSERTE(m_pCallback4 == NULL); - m_pCallback4 = static_cast(m_pCallback5); - m_pCallback4->AddRef(); - - _ASSERTE(m_pCallback3 == NULL); - m_pCallback3 = static_cast(m_pCallback4); - m_pCallback3->AddRef(); } } + else + { + _ASSERTE(m_pCallback7 == NULL); + m_pCallback7 = static_cast(m_pCallback8); + m_pCallback7->AddRef(); + } - if (m_pCallback6 == NULL) + if (m_pCallback7 == NULL) { ReleaseHolder pCallback6; hr = m_pCallback2->QueryInterface( @@ -774,88 +740,77 @@ HRESULT EEToProfInterfaceImpl::CreateProfiler( (LPVOID *)&pCallback6); if (SUCCEEDED(hr) && (pCallback6 != NULL)) { - // Nifty. Transfer ownership to this class _ASSERTE(m_pCallback6 == NULL); m_pCallback6 = pCallback6.Extract(); pCallback6 = NULL; - - // And while we're at it, we must now also have an ICorProfilerCallback3,4,5 - // due to inheritance relationship of the interfaces - - _ASSERTE(m_pCallback5 == NULL); - m_pCallback5 = static_cast(m_pCallback6); - m_pCallback5->AddRef(); - - _ASSERTE(m_pCallback4 == NULL); - m_pCallback4 = static_cast(m_pCallback5); - m_pCallback4->AddRef(); - - _ASSERTE(m_pCallback3 == NULL); - m_pCallback3 = static_cast(m_pCallback4); - m_pCallback3->AddRef(); } } + else + { + _ASSERTE(m_pCallback6 == NULL); + m_pCallback6 = static_cast(m_pCallback7); + m_pCallback6->AddRef(); + } - if (m_pCallback5 == NULL) + if (m_pCallback6 == NULL) { ReleaseHolder pCallback5; hr = m_pCallback2->QueryInterface( IID_ICorProfilerCallback5, - (LPVOID *) &pCallback5); + (LPVOID *)&pCallback5); if (SUCCEEDED(hr) && (pCallback5 != NULL)) { - // Nifty. Transfer ownership to this class _ASSERTE(m_pCallback5 == NULL); m_pCallback5 = pCallback5.Extract(); pCallback5 = NULL; - - // And while we're at it, we must now also have an ICorProfilerCallback3, and - // ICorProfilerCallback4 due to inheritance relationship of the interfaces - _ASSERTE(m_pCallback4 == NULL); - m_pCallback4 = static_cast(m_pCallback5); - m_pCallback4->AddRef(); - - _ASSERTE(m_pCallback3 == NULL); - m_pCallback3 = static_cast(m_pCallback4); - m_pCallback3->AddRef(); } } + else + { + _ASSERTE(m_pCallback5 == NULL); + m_pCallback5 = static_cast(m_pCallback6); + m_pCallback5->AddRef(); + } - if (m_pCallback4 == NULL) + if (m_pCallback5 == NULL) { ReleaseHolder pCallback4; hr = m_pCallback2->QueryInterface( IID_ICorProfilerCallback4, - (LPVOID *) &pCallback4); + (LPVOID *)&pCallback4); if (SUCCEEDED(hr) && (pCallback4 != NULL)) { - // Nifty. Transfer ownership to this class _ASSERTE(m_pCallback4 == NULL); m_pCallback4 = pCallback4.Extract(); pCallback4 = NULL; - - // And while we're at it, we must now also have an ICorProfilerCallback3, and - // due to inheritance relationship of the interfaces - _ASSERTE(m_pCallback3 == NULL); - m_pCallback3 = static_cast(m_pCallback4); - m_pCallback3->AddRef(); } } + else + { + _ASSERTE(m_pCallback4 == NULL); + m_pCallback4 = static_cast(m_pCallback5); + m_pCallback4->AddRef(); + } - if (m_pCallback3 == NULL) + if (m_pCallback4 == NULL) { ReleaseHolder pCallback3; hr = m_pCallback2->QueryInterface( IID_ICorProfilerCallback3, - (LPVOID *) &pCallback3); + (LPVOID *)&pCallback3); if (SUCCEEDED(hr) && (pCallback3 != NULL)) { - // Nifty. Transfer ownership to this class _ASSERTE(m_pCallback3 == NULL); m_pCallback3 = pCallback3.Extract(); pCallback3 = NULL; } } + else + { + _ASSERTE(m_pCallback3 == NULL); + m_pCallback3 = static_cast(m_pCallback4); + m_pCallback3->AddRef(); + } return S_OK; } @@ -6308,5 +6263,86 @@ HRESULT EEToProfInterfaceImpl::GetAssemblyReferences(LPCWSTR wszAssemblyPath, IA return hr; } +HRESULT EEToProfInterfaceImpl::EventPipeEventDelivered( + EventPipeProvider *provider, + DWORD eventId, + DWORD eventVersion, + ULONG cbMetadataBlob, + LPCBYTE metadataBlob, + ULONG cbEventData, + LPCBYTE eventData, + LPCGUID pActivityId, + LPCGUID pRelatedActivityId, + Thread *pEventThread, + ULONG numStackFrames, + UINT_PTR stackFrames[]) +{ + CONTRACTL + { + NOTHROW; + GC_NOTRIGGER; + MODE_ANY; + } + CONTRACTL_END; + + CLR_TO_PROFILER_ENTRYPOINT_EX( + kEE2PNoTrigger, + (LF_CORPROF, + LL_INFO1000, + "**PROF: EventPipeEventDelivered.\n")); + +#ifdef FEATURE_PERFTRACING + if (m_pCallback10 == NULL) + { + return S_OK; + } + + EVENTPIPE_PROVIDER providerID = (EVENTPIPE_PROVIDER)provider; + return m_pCallback10->EventPipeEventDelivered(providerID, + eventId, + eventVersion, + cbMetadataBlob, + metadataBlob, + cbEventData, + eventData, + pActivityId, + pRelatedActivityId, + reinterpret_cast(pEventThread), + numStackFrames, + stackFrames); +#else // FEATURE_PERFTRACING + return E_NOTIMPL; +#endif // FEATURE_PERFTRACING +} + +HRESULT EEToProfInterfaceImpl::EventPipeProviderCreated(EventPipeProvider *provider) +{ + CONTRACTL + { + NOTHROW; + // The profiler will likely call back in to the other EventPipe apis, + // some of which trigger + GC_TRIGGERS; + MODE_ANY; + } + CONTRACTL_END; + + CLR_TO_PROFILER_ENTRYPOINT((LF_CORPROF, + LL_INFO10, + "**PROF: EventPipeProviderCreated.\n" + )); + +#ifdef FEATURE_PERFTRACING + if (m_pCallback10 == NULL) + { + return S_OK; + } + + EVENTPIPE_PROVIDER providerID = (EVENTPIPE_PROVIDER)provider; + return m_pCallback10->EventPipeProviderCreated(providerID); +#else // FEATURE_PERFTRACING + return E_NOTIMPL; +#endif // FEATURE_PERFTRACING +} #endif // PROFILING_SUPPORTED diff --git a/src/coreclr/src/vm/eetoprofinterfaceimpl.h b/src/coreclr/src/vm/eetoprofinterfaceimpl.h index b00b3969626b..d395cf1206e5 100644 --- a/src/coreclr/src/vm/eetoprofinterfaceimpl.h +++ b/src/coreclr/src/vm/eetoprofinterfaceimpl.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // EEToProfInterfaceImpl.h // @@ -23,6 +22,8 @@ #include "eventtracebase.h" #include "gcinterface.h" +class EventPipeProvider; + class SimpleRWLock; class ProfToEEInterfaceImpl; @@ -485,6 +486,25 @@ class EEToProfInterfaceImpl HRESULT GetAssemblyReferences(LPCWSTR wszAssemblyPath, IAssemblyBindingClosure * pClosure, AssemblyReferenceClosureWalkContextForProfAPI * pContext); + // + // Event Pipe + // + HRESULT EventPipeEventDelivered( + EventPipeProvider *provider, + DWORD eventId, + DWORD eventVersion, + ULONG cbMetadataBlob, + LPCBYTE metadataBlob, + ULONG cbEventData, + LPCBYTE eventData, + LPCGUID pActivityId, + LPCGUID pRelatedActivityId, + Thread *pEventThread, + ULONG numStackFrames, + UINT_PTR stackFrames[]); + + HRESULT EventPipeProviderCreated(EventPipeProvider *provider); + private: // @@ -546,15 +566,16 @@ class EEToProfInterfaceImpl // Pointer to the profiler's implementation of the callback interface(s). // Profilers MUST support ICorProfilerCallback2. - // Profilers MAY optionally support ICorProfilerCallback3,4,5,6,7,8,9 - ICorProfilerCallback2 * m_pCallback2; - ICorProfilerCallback3 * m_pCallback3; - ICorProfilerCallback4 * m_pCallback4; - ICorProfilerCallback5 * m_pCallback5; - ICorProfilerCallback6 * m_pCallback6; - ICorProfilerCallback7 * m_pCallback7; - ICorProfilerCallback8 * m_pCallback8; - ICorProfilerCallback9 * m_pCallback9; + // Profilers MAY optionally support ICorProfilerCallback3,4,5,6,7,8,9,10 + ICorProfilerCallback2 * m_pCallback2; + ICorProfilerCallback3 * m_pCallback3; + ICorProfilerCallback4 * m_pCallback4; + ICorProfilerCallback5 * m_pCallback5; + ICorProfilerCallback6 * m_pCallback6; + ICorProfilerCallback7 * m_pCallback7; + ICorProfilerCallback8 * m_pCallback8; + ICorProfilerCallback9 * m_pCallback9; + ICorProfilerCallback10 * m_pCallback10; HMODULE m_hmodProfilerDLL; diff --git a/src/coreclr/src/vm/eetoprofinterfaceimpl.inl b/src/coreclr/src/vm/eetoprofinterfaceimpl.inl index 487032115390..48a07b5a2370 100644 --- a/src/coreclr/src/vm/eetoprofinterfaceimpl.inl +++ b/src/coreclr/src/vm/eetoprofinterfaceimpl.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // EEToProfInterfaceImpl.inl // diff --git a/src/coreclr/src/vm/eetoprofinterfacewrapper.inl b/src/coreclr/src/vm/eetoprofinterfacewrapper.inl index a26d7de2defa..bdf328e4c7ad 100644 --- a/src/coreclr/src/vm/eetoprofinterfacewrapper.inl +++ b/src/coreclr/src/vm/eetoprofinterfacewrapper.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // EEToProfInterfaceWrapper.inl // diff --git a/src/coreclr/src/vm/eetwain.cpp b/src/coreclr/src/vm/eetwain.cpp index ffdf79b6afd2..41008aac175f 100644 --- a/src/coreclr/src/vm/eetwain.cpp +++ b/src/coreclr/src/vm/eetwain.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" diff --git a/src/coreclr/src/vm/encee.cpp b/src/coreclr/src/vm/encee.cpp index ac104d2d7f9c..7852863a4bfb 100644 --- a/src/coreclr/src/vm/encee.cpp +++ b/src/coreclr/src/vm/encee.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: EnC.CPP // diff --git a/src/coreclr/src/vm/encee.h b/src/coreclr/src/vm/encee.h index a6783ddb5ae0..1ff5d7c3b30d 100644 --- a/src/coreclr/src/vm/encee.h +++ b/src/coreclr/src/vm/encee.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // EnCee.h // diff --git a/src/coreclr/src/vm/eventing/eventpipe/CMakeLists.txt b/src/coreclr/src/vm/eventing/eventpipe/CMakeLists.txt index 00b3f6f386f2..4e816676b8a7 100644 --- a/src/coreclr/src/vm/eventing/eventpipe/CMakeLists.txt +++ b/src/coreclr/src/vm/eventing/eventpipe/CMakeLists.txt @@ -28,7 +28,7 @@ add_custom_command(OUTPUT ${EVENTPIPE_SOURCES} COMMAND ${GENERATE_COMMAND} DEPENDS ${GENERATE_SCRIPT} ${EVENT_MANIFEST} ${EVENT_EXCLUSIONS}) -add_library_clr(eventpipe STATIC ${EVENTPIPE_SOURCES}) +add_library_clr(eventpipe OBJECT ${EVENTPIPE_SOURCES}) set_target_properties(eventpipe PROPERTIES LINKER_LANGUAGE CXX) add_dependencies(eventpipe eventing_headers) diff --git a/src/coreclr/src/vm/eventpipe.cpp b/src/coreclr/src/vm/eventpipe.cpp index be9ad821014b..e0b835f40d79 100644 --- a/src/coreclr/src/vm/eventpipe.cpp +++ b/src/coreclr/src/vm/eventpipe.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "clrtypes.h" @@ -39,7 +38,6 @@ Volatile EventPipe::s_allowWrite = 0; unsigned int * EventPipe::s_pProcGroupOffsets = nullptr; #endif Volatile EventPipe::s_numberOfSessions(0); -bool EventPipe::s_enableSampleProfilerAtStartup = false; CQuickArrayList EventPipe::s_rgDeferredEventPipeSessionIds = CQuickArrayList(); bool EventPipe::s_CanStartThreads = false; @@ -63,6 +61,8 @@ void EventPipe::Initialize() CrstEventPipe, (CrstFlags)(CRST_REENTRANCY | CRST_TAKEN_DURING_SHUTDOWN | CRST_HOST_BREAKABLE)); + EventPipeThread::Initialize(); + // Initialize the session container to nullptr. for (VolatilePtr &session : s_pSessions) session.Store(nullptr); @@ -125,15 +125,12 @@ void EventPipe::FinishInitialize() } } - if (s_enableSampleProfilerAtStartup) - { - SampleProfiler::Enable(); - } + SampleProfiler::CanStartSampling(); } // // If EventPipe environment variables are specified, parse them and start a session -// +// void EventPipe::EnableViaEnvironmentVariables() { STANDARD_VM_CONTRACT; @@ -168,7 +165,6 @@ void EventPipe::EnableViaEnvironmentVariables() pProviders[0] = EventPipeProviderConfiguration(W("Microsoft-Windows-DotNETRuntime"), 0x4c14fccbd, 5, nullptr); pProviders[1] = EventPipeProviderConfiguration(W("Microsoft-Windows-DotNETRuntimePrivate"), 0x4002000b, 5, nullptr); pProviders[2] = EventPipeProviderConfiguration(W("Microsoft-DotNETCore-SampleProfiler"), 0x0, 5, nullptr); - s_enableSampleProfilerAtStartup = true; } else { @@ -198,11 +194,6 @@ void EventPipe::EnableViaEnvironmentVariables() return; } - if (wcscmp(W("Microsoft-DotNETCore-SampleProfiler"), configuration.GetProviderName()) == 0) - { - s_enableSampleProfilerAtStartup = true; - } - pProviders[i++] = EventPipeProviderConfiguration( configuration.GetProviderName(), configuration.GetEnabledKeywordsMask(), @@ -226,8 +217,7 @@ void EventPipe::EnableViaEnvironmentVariables() EventPipeSessionType::File, EventPipeSerializationFormat::NetTraceV4, true, - nullptr, - false + nullptr ); EventPipe::StartStreaming(sessionID); } @@ -299,7 +289,7 @@ EventPipeSessionID EventPipe::Enable( EventPipeSerializationFormat format, const bool rundownRequested, IpcStream *const pStream, - const bool enableSampleProfiler) + EventPipeSessionSynchronousCallback callback) { CONTRACTL { @@ -307,7 +297,7 @@ EventPipeSessionID EventPipe::Enable( GC_TRIGGERS; MODE_PREEMPTIVE; PRECONDITION(format < EventPipeSerializationFormat::Count); - PRECONDITION(circularBufferSizeInMB > 0); + PRECONDITION(sessionType == EventPipeSessionType::Synchronous || circularBufferSizeInMB > 0); PRECONDITION(numProviders > 0 && pProviders != nullptr); } CONTRACTL_END; @@ -336,9 +326,10 @@ EventPipeSessionID EventPipe::Enable( rundownRequested, circularBufferSizeInMB, pProviders, - numProviders); + numProviders, + callback); - const bool fSuccess = EnableInternal(pSession, pEventPipeProviderCallbackDataQueue, enableSampleProfiler); + const bool fSuccess = EnableInternal(pSession, pEventPipeProviderCallbackDataQueue); if (fSuccess) sessionId = reinterpret_cast(pSession); else @@ -350,8 +341,7 @@ EventPipeSessionID EventPipe::Enable( bool EventPipe::EnableInternal( EventPipeSession *const pSession, - EventPipeProviderCallbackDataQueue* pEventPipeProviderCallbackDataQueue, - const bool enableSampleProfiler) + EventPipeProviderCallbackDataQueue* pEventPipeProviderCallbackDataQueue) { CONTRACTL { @@ -399,15 +389,10 @@ bool EventPipe::EnableInternal( // Enable tracing. s_config.Enable(*pSession, pEventPipeProviderCallbackDataQueue); - // Enable the sample profiler or defer until we can create threads - if (enableSampleProfiler && s_CanStartThreads) + if (SessionRequestedSampling(pSession)) { SampleProfiler::Enable(); } - else if (enableSampleProfiler && !s_CanStartThreads) - { - s_enableSampleProfilerAtStartup = true; - } return true; } @@ -509,8 +494,11 @@ void EventPipe::DisableInternal(EventPipeSessionID id, EventPipeProviderCallback // If the session was not found, then there is nothing else to do. EventPipeSession *const pSession = reinterpret_cast(id); - // Disable the profiler. - SampleProfiler::Disable(); + if (SessionRequestedSampling(pSession)) + { + // Disable the profiler. + SampleProfiler::Disable(); + } // Log the process information event. LogProcessInformationEvent(*s_pEventSource); @@ -545,19 +533,19 @@ void EventPipe::DisableInternal(EventPipeSessionID id, EventPipeProviderCallback } s_allowWrite &= ~(pSession->GetMask()); + + // Remove the session from the array before calling SuspendWriteEvent. This way + // we can guarantee that either the event write got the pointer and will complete + // the write successfully, or it gets null and will bail. + _ASSERTE(s_pSessions[pSession->GetIndex()] == pSession); + s_pSessions[pSession->GetIndex()].Store(nullptr); + pSession->SuspendWriteEvent(); bool ignored; pSession->WriteAllBuffersToFile(&ignored); // Flush the buffers to the stream/file --s_numberOfSessions; - // At this point, we should not be writing events to this session anymore - // This is a good time to remove the session from the array. - _ASSERTE(s_pSessions[pSession->GetIndex()] == pSession); - - // Remove the session from the array, and mask. - s_pSessions[pSession->GetIndex()].Store(nullptr); - // Write a final sequence point to the file now that all events have // been emitted. pSession->WriteSequencePointUnbuffered(); @@ -586,6 +574,14 @@ EventPipeSession *EventPipe::GetSession(EventPipeSessionID id) } } +bool EventPipe::IsSessionEnabled(EventPipeSessionID id) +{ + LIMITED_METHOD_CONTRACT; + + const EventPipeSession *const pSession = reinterpret_cast(id); + return s_pSessions[pSession->GetIndex()].Load() != nullptr; +} + EventPipeProvider *EventPipe::CreateProvider(const SString &providerName, EventPipeCallback pCallbackFunction, void *pCallbackData) { CONTRACTL @@ -602,6 +598,7 @@ EventPipeProvider *EventPipe::CreateProvider(const SString &providerName, EventP pProvider = CreateProvider(providerName, pCallbackFunction, pCallbackData, pEventPipeProviderCallbackDataQueue); }); + NotifyProfilerProviderCreated(pProvider); return pProvider; } @@ -616,11 +613,10 @@ EventPipeProvider *EventPipe::CreateProvider(const SString &providerName, EventP } CONTRACTL_END; - return s_config.CreateProvider( - providerName, - pCallbackFunction, - pCallbackData, - pEventPipeProviderCallbackDataQueue); + return s_config.CreateProvider(providerName, + pCallbackFunction, + pCallbackData, + pEventPipeProviderCallbackDataQueue); } EventPipeProvider *EventPipe::GetProvider(const SString &providerName) @@ -636,6 +632,28 @@ EventPipeProvider *EventPipe::GetProvider(const SString &providerName) return s_config.GetProvider(providerName); } +void EventPipe::AddProviderToSession(EventPipeSessionProvider *pProvider, EventPipeSession *pSession) +{ + CONTRACTL + { + THROWS; + GC_TRIGGERS; + MODE_PREEMPTIVE; + } + + CONTRACTL_END; + + if (pProvider == nullptr || pSession == nullptr) + { + return; + } + { + CrstHolder _crst(GetLock()); + + pSession->AddSessionProvider(pProvider); + } +} + void EventPipe::DeleteProvider(EventPipeProvider *pProvider) { CONTRACTL @@ -772,7 +790,7 @@ void EventPipe::WriteEventInternal( { _ASSERTE(pRundownSession != nullptr); if (pRundownSession != nullptr) - pRundownSession->WriteEventBuffered( + pRundownSession->WriteEvent( pThread, event, payload, @@ -804,7 +822,7 @@ void EventPipe::WriteEventInternal( // Disable is allowed to set s_pSessions[i] = NULL at any time and that may have occured in between // the check and the load if (pSession != nullptr) - pSession->WriteEventBuffered( + pSession->WriteEvent( pThread, event, payload, @@ -951,6 +969,23 @@ bool EventPipe::IsSessionIdInCollection(EventPipeSessionID id) return false; } +bool EventPipe::SessionRequestedSampling(EventPipeSession *pSession) +{ + LIMITED_METHOD_CONTRACT; + + EventPipeSessionProviderIterator providerList = pSession->GetProviders(); + EventPipeSessionProvider *pProvider = nullptr; + while (providerList.Next(&pProvider)) + { + if (wcscmp(pProvider->GetProviderName(), W("Microsoft-DotNETCore-SampleProfiler")) == 0) + { + return true; + } + } + + return false; +} + EventPipeEventInstance *EventPipe::GetNextEvent(EventPipeSessionID sessionID) { CONTRACTL diff --git a/src/coreclr/src/vm/eventpipe.h b/src/coreclr/src/vm/eventpipe.h index 97a79cc5a8da..c03df4d3ed9f 100644 --- a/src/coreclr/src/vm/eventpipe.h +++ b/src/coreclr/src/vm/eventpipe.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __EVENTPIPE_H__ #define __EVENTPIPE_H__ @@ -19,6 +18,7 @@ class EventPipeFile; class EventPipeEventSource; class EventPipeProvider; class EventPipeSession; +class EventPipeSessionProvider; class IpcStream; enum class EventPipeSessionType; enum class EventPipeSerializationFormat; @@ -64,7 +64,7 @@ class EventPipe EventPipeSerializationFormat format, const bool rundownRequested, IpcStream *const pStream, - const bool enableSampleProfiler = true); + EventPipeSessionSynchronousCallback callback = nullptr); // Disable tracing via the event pipe. static void Disable(EventPipeSessionID id); @@ -72,6 +72,8 @@ class EventPipe // Get the session for the specified session ID. static EventPipeSession *GetSession(EventPipeSessionID id); + static bool IsSessionEnabled(EventPipeSessionID id); + // start sending the required events down the pipe // starting with file header info and then buffered events static void StartStreaming(EventPipeSessionID id); @@ -94,6 +96,8 @@ class EventPipe // Get a provider. static EventPipeProvider *GetProvider(const SString &providerName); + static void AddProviderToSession(EventPipeSessionProvider *pProvider, EventPipeSession *pSession); + // Delete a provider. static void DeleteProvider(EventPipeProvider *pProvider); @@ -180,8 +184,7 @@ class EventPipe // Enable the specified EventPipe session. static bool EnableInternal( EventPipeSession *const pSession, - EventPipeProviderCallbackDataQueue *pEventPipeProviderCallbackDataQueue, - const bool enableSampleProfiler = true); + EventPipeProviderCallbackDataQueue *pEventPipeProviderCallbackDataQueue); // Callback function for the stack walker. For each frame walked, this callback is invoked. static StackWalkAction StackWalkCallback(CrawlFrame *pCf, StackContents *pData); @@ -215,6 +218,18 @@ class EventPipe return &s_configCrst; } + static void NotifyProfilerProviderCreated(EventPipeProvider *pProvider) + { +#ifndef DACCESS_COMPILE + // Let the profiler know the provider has been created so it can register if it wants to + BEGIN_PIN_PROFILER(CORProfilerIsMonitoringEventPipe()); + g_profControlBlock.pProfInterface->EventPipeProviderCreated(pProvider); + END_PIN_PROFILER(); +#endif // DACCESS_COMPILE + } + + static bool SessionRequestedSampling(EventPipeSession *pSession); + static CrstStatic s_configCrst; static Volatile s_state; static EventPipeConfiguration s_config; @@ -233,7 +248,6 @@ class EventPipe static unsigned int * s_pProcGroupOffsets; #endif static Volatile s_numberOfSessions; - static bool s_enableSampleProfilerAtStartup; }; static_assert(EventPipe::MaxNumberOfSessions == 64, "Maximum number of EventPipe sessions is not 64."); diff --git a/src/coreclr/src/vm/eventpipeblock.cpp b/src/coreclr/src/vm/eventpipeblock.cpp index dd8807d3364c..66a06ff31143 100644 --- a/src/coreclr/src/vm/eventpipeblock.cpp +++ b/src/coreclr/src/vm/eventpipeblock.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "eventpipeblock.h" diff --git a/src/coreclr/src/vm/eventpipeblock.h b/src/coreclr/src/vm/eventpipeblock.h index 84024d07effd..9a3de96114b0 100644 --- a/src/coreclr/src/vm/eventpipeblock.h +++ b/src/coreclr/src/vm/eventpipeblock.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __EVENTPIPE_BLOCK_H__ #define __EVENTPIPE_BLOCK_H__ diff --git a/src/coreclr/src/vm/eventpipebuffer.cpp b/src/coreclr/src/vm/eventpipebuffer.cpp index b1564bb14af3..340e69098240 100644 --- a/src/coreclr/src/vm/eventpipebuffer.cpp +++ b/src/coreclr/src/vm/eventpipebuffer.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "eventpipe.h" diff --git a/src/coreclr/src/vm/eventpipebuffer.h b/src/coreclr/src/vm/eventpipebuffer.h index 4396a45ed307..4d2eaf8f9bce 100644 --- a/src/coreclr/src/vm/eventpipebuffer.h +++ b/src/coreclr/src/vm/eventpipebuffer.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __EVENTPIPE_BUFFER_H__ #define __EVENTPIPE_BUFFER_H__ diff --git a/src/coreclr/src/vm/eventpipebuffermanager.cpp b/src/coreclr/src/vm/eventpipebuffermanager.cpp index f0f5f4539439..10c8d0ca232b 100644 --- a/src/coreclr/src/vm/eventpipebuffermanager.cpp +++ b/src/coreclr/src/vm/eventpipebuffermanager.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "eventpipe.h" @@ -36,7 +35,6 @@ EventPipeBufferManager::EventPipeBufferManager(EventPipeSession* pSession, size_ m_pThreadSessionStateList = new SList>(); m_sizeOfAllBuffers = 0; m_lock.Init(LOCK_TYPE_DEFAULT); - m_writeEventSuspending = FALSE; m_waitEvent.CreateAutoEvent(TRUE); #ifdef _DEBUG @@ -78,8 +76,6 @@ EventPipeBufferManager::~EventPipeBufferManager() } CONTRACTL_END; - // setting this true should have no practical effect other than satisfying asserts at this point. - m_writeEventSuspending = TRUE; DeAllocateBuffers(); } @@ -107,13 +103,6 @@ EventPipeBuffer* EventPipeBufferManager::AllocateBufferForThread(EventPipeThread // Allocating a buffer requires us to take the lock. SpinLockHolder _slh(&m_lock); - // if we are deallocating then give up, see the comments in SuspendWriteEvents() for why this is important. - if (m_writeEventSuspending.Load()) - { - writeSuspended = TRUE; - return NULL; - } - bool allocateNewBuffer = false; EventPipeBufferList *pThreadBufferList = pSessionState->GetBufferList(); @@ -393,11 +382,6 @@ bool EventPipeBufferManager::WriteEvent(Thread *pThread, EventPipeSession &sessi EventPipeThreadSessionState* pSessionState = NULL; { SpinLockHolder _slh(pEventPipeThread->GetLock()); - if (m_writeEventSuspending.LoadWithoutBarrier()) - { - // This session is suspending, we need to avoid initializing any session state and exit - return false; - } pSessionState = pEventPipeThread->GetOrCreateSessionState(m_pSession); if (pSessionState == NULL) { @@ -458,28 +442,15 @@ bool EventPipeBufferManager::WriteEvent(Thread *pThread, EventPipeSession &sessi _ASSERTE(pEventPipeThread != NULL); { SpinLockHolder _slh(pEventPipeThread->GetLock()); - if (m_writeEventSuspending.LoadWithoutBarrier()) - { - // After leaving the manager's lock in AllocateBufferForThread some other thread decided to suspend writes. - // We need to immediately return the buffer we just took without storing it or writing to it. - // SuspendWriteEvent() is spinning waiting for this buffer to be relinquished. - pBuffer->ConvertToReadOnly(); - - // We treat this as the WriteEvent() call occurring after this session stopped listening for events, effectively the - // same as if event.IsEnabled() returned false. - return false; - } - else - { - pSessionState->SetWriteBuffer(pBuffer); - - // Try to write the event after we allocated a buffer. - // This is the first time if the thread had no buffers before the call to this function. - // This is the second time if this thread did have one or more buffers, but they were full. - allocNewBuffer = !pBuffer->WriteEvent(pEventThread, session, event, payload, pActivityId, pRelatedActivityId, pStack); - _ASSERTE(!allocNewBuffer); - pSessionState->IncrementSequenceNumber(); - } + + pSessionState->SetWriteBuffer(pBuffer); + + // Try to write the event after we allocated a buffer. + // This is the first time if the thread had no buffers before the call to this function. + // This is the second time if this thread did have one or more buffers, but they were full. + allocNewBuffer = !pBuffer->WriteEvent(pEventThread, session, event, payload, pActivityId, pRelatedActivityId, pStack); + _ASSERTE(!allocNewBuffer); + pSessionState->IncrementSequenceNumber(); } } } @@ -1005,27 +976,22 @@ void EventPipeBufferManager::SuspendWriteEvent(uint32_t sessionIndex) SpinLockHolder _slh(&m_lock); _ASSERTE(EnsureConsistency()); - m_writeEventSuspending.Store(TRUE); - // From this point until m_writeEventSuspending is reset to FALSE it is impossible - // for new EventPipeThreadSessionStates to be added to the m_pThreadSessionStateList or - // for new EventBuffers to be added to an existing EventPipeBufferList. The only - // way AllocateBufferForThread is allowed to add one is by: - // 1) take m_lock - AllocateBufferForThread can't own it now because this thread owns it, - // but after this thread gives it up lower in this function it could be acquired. - // 2) observe m_writeEventSuspending = False - that won't happen, acquiring m_lock - // guarantees AllocateBufferForThread will observe all the memory changes this - // thread made prior to releasing m_lock and we've already set it TRUE. - // This ensures that we iterate over the list of threads below we've got the complete list. + // Find all threads that have used this buffer manager. SListElem *pElem = m_pThreadSessionStateList->GetHead(); while (pElem != NULL) { - threadList.Push(pElem->GetValue()->GetThread()); + EventPipeThread *pThread = pElem->GetValue()->GetThread(); + threadList.Push(pThread); pElem = m_pThreadSessionStateList->GetNext(pElem); + + // Once EventPipeSession::SuspendWriteEvent completes, we shouldn't have any + // in progress writes left. + _ASSERTE(pThread->GetSessionWriteInProgress() != sessionIndex); } } - // Iterate through all the threads, forcing them to finish writes in progress inside EventPipeThread::m_lock, - // relinquish any buffers stored in EventPipeThread::m_pWriteBuffer and prevent storing new ones. + // Iterate through all the threads, forcing them to relinquish any buffers stored in + // EventPipeThread::m_pWriteBuffer and prevent storing new ones. for (size_t i = 0; i < threadList.Size(); i++) { EventPipeThread *pThread = threadList[i]; @@ -1033,44 +999,6 @@ void EventPipeBufferManager::SuspendWriteEvent(uint32_t sessionIndex) SpinLockHolder _slh(pThread->GetLock()); EventPipeThreadSessionState *const pSessionState = pThread->GetSessionState(m_pSession); pSessionState->SetWriteBuffer(nullptr); - // From this point until m_writeEventSuspending is reset to FALSE it is impossible - // for this thread to set the write buffer to a non-null value which in turn means - // it can't write events into any buffer. To do this it would need to both: - // 1) Acquire the thread lock - it can't right now but it will be able to do so after - // we release the lock below - // 2) Observe m_writeEventSuspending = false - that won't happen, acquiring the thread - // lock guarantees WriteEvent will observe all the memory - // changes this thread made prior to releasing the thread - // lock and we already set it TRUE. - } - } - - // Wait for any straggler WriteEvent threads that may have already allocated a buffer but - // hadn't yet relinquished it. - { - SpinLockHolder _slh(&m_lock); - SListElem *pElem = m_pThreadSessionStateList->GetHead(); - while (pElem != NULL) - { - // Get the list and remove it from the thread. - EventPipeBufferList *const pBufferList = pElem->GetValue()->GetBufferList(); - if (pBufferList != nullptr) - { - EventPipeThread *const pEventPipeThread = pBufferList->GetThread(); - if (pEventPipeThread != nullptr) - { - YIELD_WHILE(pEventPipeThread->GetSessionWriteInProgress() == sessionIndex); - // It still guarantees that the thread has returned its buffer, but it also now guarantees that - // that the thread has returned from Session::WriteEvent() and has relinquished the session pointer - // This yield is guaranteed to eventually finish because threads will eventually exit WriteEvent() - // setting the flag back to -1. If the thread could quickly re-enter WriteEvent and set the flag - // back to this_session_id we could theoretically get unlucky and never observe the gap, but - // setting s_pSessions[this_session_id] = NULL above guaranteed that can't happen indefinately. - // Sooner or later the thread is going to see the NULL value and once it does it won't store - // this_session_id into the flag again. - } - } - pElem = m_pThreadSessionStateList->GetNext(pElem); } } } @@ -1092,15 +1020,6 @@ void EventPipeBufferManager::DeAllocateBuffers() SpinLockHolder _slh(&m_lock); _ASSERTE(EnsureConsistency()); - _ASSERTE(m_writeEventSuspending); - - // This m_writeEventSuspending flag + locks ensures that no thread will touch any of the - // state we are dismantling here. This includes: - // a) EventPipeThread m_sessions[session_id] - // b) EventPipeThreadSessionState - // c) EventPipeBufferList - // d) EventPipeBuffer - // e) EventPipeBufferManager.m_pThreadSessionStateList SListElem *pElem = m_pThreadSessionStateList->GetHead(); while (pElem != NULL) diff --git a/src/coreclr/src/vm/eventpipebuffermanager.h b/src/coreclr/src/vm/eventpipebuffermanager.h index 0a3f125f0ab9..73b80bfaa64b 100644 --- a/src/coreclr/src/vm/eventpipebuffermanager.h +++ b/src/coreclr/src/vm/eventpipebuffermanager.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __EVENTPIPE_BUFFERMANAGER_H__ #define __EVENTPIPE_BUFFERMANAGER_H__ @@ -61,7 +60,6 @@ class EventPipeBufferManager // Lock to protect access to the per-thread buffer list and total allocation size. SpinLock m_lock; - Volatile m_writeEventSuspending; // Event for synchronizing real time reading CLREvent m_waitEvent; diff --git a/src/coreclr/src/vm/eventpipecommontypes.cpp b/src/coreclr/src/vm/eventpipecommontypes.cpp index 06382e506eba..e668dc1aa209 100644 --- a/src/coreclr/src/vm/eventpipecommontypes.cpp +++ b/src/coreclr/src/vm/eventpipecommontypes.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "eventpipecommontypes.h" diff --git a/src/coreclr/src/vm/eventpipecommontypes.h b/src/coreclr/src/vm/eventpipecommontypes.h index fe08196312fd..1a66034adb87 100644 --- a/src/coreclr/src/vm/eventpipecommontypes.h +++ b/src/coreclr/src/vm/eventpipecommontypes.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __EVENTPIPE_PROVIDERCALLBACKDATA_H__ #define __EVENTPIPE_PROVIDERCALLBACKDATA_H__ @@ -9,6 +8,8 @@ #include "common.h" +class EventPipeProvider; + enum class EventPipeEventLevel { LogAlways, @@ -21,6 +22,8 @@ enum class EventPipeEventLevel struct EventPipeProviderConfiguration { + friend class ProfToEEInterfaceImpl; + private: LPCWSTR m_pProviderName = nullptr; UINT64 m_keywords = 0; @@ -115,6 +118,53 @@ class EventPipeProviderCallbackDataQueue SList> list; }; +template +class EventPipeIterator +{ +private: + SList> *m_pList; + typename SList>::Iterator m_iterator; + +public: + EventPipeIterator(SList> *pList) : + m_pList(pList), + m_iterator(pList->begin()) + { + _ASSERTE(m_pList != nullptr); + } + + bool Next(T *ppProvider) + { + CONTRACTL + { + THROWS; + GC_NOTRIGGER; + MODE_ANY; + PRECONDITION(ppProvider != nullptr); + } + CONTRACTL_END; + + *ppProvider = *m_iterator; + ++m_iterator; + return m_iterator != m_pList->end(); + } + +}; + +typedef void (*EventPipeSessionSynchronousCallback)( + EventPipeProvider *provider, + DWORD eventId, + DWORD eventVersion, + ULONG cbMetadataBlob, + LPCBYTE metadataBlob, + ULONG cbEventData, + LPCBYTE eventData, + LPCGUID pActivityId, + LPCGUID pRelatedActivityId, + Thread *pEventThread, + ULONG numStackFrames, + UINT_PTR stackFrames[]); + #endif // FEATURE_PERFTRACING #endif // __EVENTPIPE_PROVIDERCALLBACKDATA_H__ diff --git a/src/coreclr/src/vm/eventpipeconfiguration.cpp b/src/coreclr/src/vm/eventpipeconfiguration.cpp index 69c0dd29840d..d07f280b8af0 100644 --- a/src/coreclr/src/vm/eventpipeconfiguration.cpp +++ b/src/coreclr/src/vm/eventpipeconfiguration.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "eventpipe.h" diff --git a/src/coreclr/src/vm/eventpipeconfiguration.h b/src/coreclr/src/vm/eventpipeconfiguration.h index f817b015b4aa..cf3bd0b2aa71 100644 --- a/src/coreclr/src/vm/eventpipeconfiguration.h +++ b/src/coreclr/src/vm/eventpipeconfiguration.h @@ -1,5 +1,5 @@ +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __EVENTPIPE_CONFIGURATION_H__ #define __EVENTPIPE_CONFIGURATION_H__ diff --git a/src/coreclr/src/vm/eventpipeevent.cpp b/src/coreclr/src/vm/eventpipeevent.cpp index a56ed9429847..62d97c07820f 100644 --- a/src/coreclr/src/vm/eventpipeevent.cpp +++ b/src/coreclr/src/vm/eventpipeevent.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "eventpipeevent.h" diff --git a/src/coreclr/src/vm/eventpipeevent.h b/src/coreclr/src/vm/eventpipeevent.h index 06da70f90f6c..b504e050956a 100644 --- a/src/coreclr/src/vm/eventpipeevent.h +++ b/src/coreclr/src/vm/eventpipeevent.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __EVENTPIPE_EVENT_H__ #define __EVENTPIPE_EVENT_H__ diff --git a/src/coreclr/src/vm/eventpipeeventinstance.cpp b/src/coreclr/src/vm/eventpipeeventinstance.cpp index 5b214a13b3c7..e60c3d5b0360 100644 --- a/src/coreclr/src/vm/eventpipeeventinstance.cpp +++ b/src/coreclr/src/vm/eventpipeeventinstance.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "eventpipeconfiguration.h" diff --git a/src/coreclr/src/vm/eventpipeeventinstance.h b/src/coreclr/src/vm/eventpipeeventinstance.h index 929b43263882..64e6e385ac0d 100644 --- a/src/coreclr/src/vm/eventpipeeventinstance.h +++ b/src/coreclr/src/vm/eventpipeeventinstance.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __EVENTPIPE_EVENTINSTANCE_H__ #define __EVENTPIPE_EVENTINSTANCE_H__ diff --git a/src/coreclr/src/vm/eventpipeeventpayload.cpp b/src/coreclr/src/vm/eventpipeeventpayload.cpp index b9f6f9e30ac1..7a925aef3a37 100644 --- a/src/coreclr/src/vm/eventpipeeventpayload.cpp +++ b/src/coreclr/src/vm/eventpipeeventpayload.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "eventpipeeventpayload.h" diff --git a/src/coreclr/src/vm/eventpipeeventpayload.h b/src/coreclr/src/vm/eventpipeeventpayload.h index 0da1e81ab102..57c2e74b9c82 100644 --- a/src/coreclr/src/vm/eventpipeeventpayload.h +++ b/src/coreclr/src/vm/eventpipeeventpayload.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __EVENTPIPE_EVENTPAYLOAD_H__ #define __EVENTPIPE_EVENTPAYLOAD_H__ diff --git a/src/coreclr/src/vm/eventpipeeventsource.cpp b/src/coreclr/src/vm/eventpipeeventsource.cpp index e7f0a9fbbe75..0febf373a6e1 100644 --- a/src/coreclr/src/vm/eventpipeeventsource.cpp +++ b/src/coreclr/src/vm/eventpipeeventsource.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "eventpipeeventpayload.h" diff --git a/src/coreclr/src/vm/eventpipeeventsource.h b/src/coreclr/src/vm/eventpipeeventsource.h index 1b19c4e7e915..d271ce0f67f4 100644 --- a/src/coreclr/src/vm/eventpipeeventsource.h +++ b/src/coreclr/src/vm/eventpipeeventsource.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __EVENTPIPE_EVENTSOURCE_H__ #define __EVENTPIPE_EVENTSOURCE_H__ diff --git a/src/coreclr/src/vm/eventpipefile.cpp b/src/coreclr/src/vm/eventpipefile.cpp index efcee0cd5f90..c3388c0f464c 100644 --- a/src/coreclr/src/vm/eventpipefile.cpp +++ b/src/coreclr/src/vm/eventpipefile.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "eventpipeblock.h" diff --git a/src/coreclr/src/vm/eventpipefile.h b/src/coreclr/src/vm/eventpipefile.h index bfccd7e9fe07..f284fabf0f93 100644 --- a/src/coreclr/src/vm/eventpipefile.h +++ b/src/coreclr/src/vm/eventpipefile.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __EVENTPIPE_FILE_H__ #define __EVENTPIPE_FILE_H__ diff --git a/src/coreclr/src/vm/eventpipeinternal.cpp b/src/coreclr/src/vm/eventpipeinternal.cpp index 14934419555c..6a33321cc4d9 100644 --- a/src/coreclr/src/vm/eventpipeinternal.cpp +++ b/src/coreclr/src/vm/eventpipeinternal.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "eventpipe.h" diff --git a/src/coreclr/src/vm/eventpipeinternal.h b/src/coreclr/src/vm/eventpipeinternal.h index ad825545b373..6fbb31af3b15 100644 --- a/src/coreclr/src/vm/eventpipeinternal.h +++ b/src/coreclr/src/vm/eventpipeinternal.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __EVENTPIPEINTERNAL_H__ #define __EVENTPIPEINTERNAL_H__ diff --git a/src/coreclr/src/vm/eventpipejsonfile.cpp b/src/coreclr/src/vm/eventpipejsonfile.cpp index e47e10cd7a52..864d60bc64bb 100644 --- a/src/coreclr/src/vm/eventpipejsonfile.cpp +++ b/src/coreclr/src/vm/eventpipejsonfile.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "eventpipejsonfile.h" diff --git a/src/coreclr/src/vm/eventpipejsonfile.h b/src/coreclr/src/vm/eventpipejsonfile.h index 7686db7752f2..cb420c03360c 100644 --- a/src/coreclr/src/vm/eventpipejsonfile.h +++ b/src/coreclr/src/vm/eventpipejsonfile.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __EVENTPIPE_JSONFILE_H__ diff --git a/src/coreclr/src/vm/eventpipemetadatagenerator.cpp b/src/coreclr/src/vm/eventpipemetadatagenerator.cpp index 354f19fbec2d..6ddbe989fc66 100644 --- a/src/coreclr/src/vm/eventpipemetadatagenerator.cpp +++ b/src/coreclr/src/vm/eventpipemetadatagenerator.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "eventpipemetadatagenerator.h" diff --git a/src/coreclr/src/vm/eventpipemetadatagenerator.h b/src/coreclr/src/vm/eventpipemetadatagenerator.h index f5334c28f7a4..1f4b5c5b009f 100644 --- a/src/coreclr/src/vm/eventpipemetadatagenerator.h +++ b/src/coreclr/src/vm/eventpipemetadatagenerator.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __EVENTPIPE_METADATAGENERATOR_H__ #define __EVENTPIPE_METADATAGENERATOR_H__ diff --git a/src/coreclr/src/vm/eventpipeprotocolhelper.cpp b/src/coreclr/src/vm/eventpipeprotocolhelper.cpp index b18fa160c26b..07ccf9c8b0b7 100644 --- a/src/coreclr/src/vm/eventpipeprotocolhelper.cpp +++ b/src/coreclr/src/vm/eventpipeprotocolhelper.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "fastserializer.h" diff --git a/src/coreclr/src/vm/eventpipeprotocolhelper.h b/src/coreclr/src/vm/eventpipeprotocolhelper.h index c473ef13ac25..da6c46f525a0 100644 --- a/src/coreclr/src/vm/eventpipeprotocolhelper.h +++ b/src/coreclr/src/vm/eventpipeprotocolhelper.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __EVENTPIPE_PROTOCOL_HELPER_H__ #define __EVENTPIPE_PROTOCOL_HELPER_H__ diff --git a/src/coreclr/src/vm/eventpipeprovider.cpp b/src/coreclr/src/vm/eventpipeprovider.cpp index 0351ff88438d..9bc84079a65e 100644 --- a/src/coreclr/src/vm/eventpipeprovider.cpp +++ b/src/coreclr/src/vm/eventpipeprovider.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "eventpipe.h" diff --git a/src/coreclr/src/vm/eventpipeprovider.h b/src/coreclr/src/vm/eventpipeprovider.h index 2fe93e969686..fab3bc75fcf4 100644 --- a/src/coreclr/src/vm/eventpipeprovider.h +++ b/src/coreclr/src/vm/eventpipeprovider.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __EVENTPIPE_PROVIDER_H__ #define __EVENTPIPE_PROVIDER_H__ diff --git a/src/coreclr/src/vm/eventpipesession.cpp b/src/coreclr/src/vm/eventpipesession.cpp index 3c699b7d4458..49b9d54b1c15 100644 --- a/src/coreclr/src/vm/eventpipesession.cpp +++ b/src/coreclr/src/vm/eventpipesession.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "eventpipe.h" @@ -9,6 +8,7 @@ #include "eventpipeprovider.h" #include "eventpipesession.h" #include "eventpipesessionprovider.h" +#include "eventpipeeventpayload.h" #ifdef FEATURE_PERFTRACING @@ -22,12 +22,14 @@ EventPipeSession::EventPipeSession( uint32_t circularBufferSizeInMB, const EventPipeProviderConfiguration *pProviders, uint32_t numProviders, - bool rundownEnabled) : m_index(index), - m_pProviderList(new EventPipeSessionProviderList(pProviders, numProviders)), - m_rundownEnabled(rundownEnabled), - m_SessionType(sessionType), - m_format(format), - m_rundownRequested(rundownSwitch) + EventPipeSessionSynchronousCallback callback) : m_index(index), + m_pProviderList(new EventPipeSessionProviderList(pProviders, numProviders)), + m_pBufferManager(nullptr), + m_rundownEnabled(false), + m_SessionType(sessionType), + m_format(format), + m_rundownRequested(rundownSwitch), + m_synchronousCallback(callback) { CONTRACTL { @@ -36,9 +38,10 @@ EventPipeSession::EventPipeSession( MODE_PREEMPTIVE; PRECONDITION(index < EventPipe::MaxNumberOfSessions); PRECONDITION(format < EventPipeSerializationFormat::Count); - PRECONDITION(circularBufferSizeInMB > 0); + PRECONDITION(m_SessionType == EventPipeSessionType::Synchronous || circularBufferSizeInMB > 0); PRECONDITION(numProviders > 0 && pProviders != nullptr); PRECONDITION(EventPipe::IsLockOwnedByCurrentThread()); + PRECONDITION((m_synchronousCallback != nullptr) == (m_SessionType == EventPipeSessionType::Synchronous)); } CONTRACTL_END; @@ -51,7 +54,10 @@ EventPipeSession::EventPipeSession( sequencePointAllocationBudget = 10 * 1024 * 1024; } - m_pBufferManager = new EventPipeBufferManager(this, static_cast(circularBufferSizeInMB) << 20, sequencePointAllocationBudget); + if (m_SessionType != EventPipeSessionType::Synchronous) + { + m_pBufferManager = new EventPipeBufferManager(this, static_cast(circularBufferSizeInMB) << 20, sequencePointAllocationBudget); + } // Create the event pipe file. // A NULL output path means that we should not write the results to a file. @@ -89,7 +95,10 @@ EventPipeSession::~EventPipeSession() CONTRACTL_END; delete m_pProviderList; - delete m_pBufferManager; + if (m_pBufferManager != nullptr) + { + delete m_pBufferManager; + } delete m_pFile; } @@ -264,6 +273,7 @@ void EventPipeSession::AddSessionProvider(EventPipeSessionProvider *pProvider) THROWS; GC_TRIGGERS; MODE_PREEMPTIVE; + PRECONDITION(EventPipe::IsLockOwnedByCurrentThread()); } CONTRACTL_END; @@ -293,7 +303,7 @@ bool EventPipeSession::WriteAllBuffersToFile(bool *pEventsWritten) } CONTRACTL_END; - if (m_pFile == nullptr) + if (m_pFile == nullptr || m_pBufferManager == nullptr) return true; // Get the current time stamp. @@ -305,7 +315,7 @@ bool EventPipeSession::WriteAllBuffersToFile(bool *pEventsWritten) return !m_pFile->HasErrors(); } -bool EventPipeSession::WriteEventBuffered( +bool EventPipeSession::WriteEvent( Thread *pThread, EventPipeEvent &event, EventPipeEventPayload &payload, @@ -323,9 +333,32 @@ bool EventPipeSession::WriteEventBuffered( CONTRACTL_END; // Filter events specific to "this" session based on precomputed flag on provider/events. - return event.IsEnabled(GetMask()) ? - m_pBufferManager->WriteEvent(pThread, *this, event, payload, pActivityId, pRelatedActivityId, pEventThread, pStack) : - false; + if (event.IsEnabled(GetMask())) + { + if (m_synchronousCallback != nullptr) + { + m_synchronousCallback(event.GetProvider(), + event.GetEventID(), + event.GetEventVersion(), + event.GetMetadataLength(), + event.GetMetadata(), + payload.GetSize(), + payload.GetFlatData(), + pActivityId, + pRelatedActivityId, + pEventThread, + pStack == nullptr ? 0 : pStack->GetSize(), + pStack == nullptr ? nullptr : reinterpret_cast(pStack->GetPointer())); + return true; + } + else + { + _ASSERTE(m_pBufferManager != nullptr); + return m_pBufferManager->WriteEvent(pThread, *this, event, payload, pActivityId, pRelatedActivityId, pEventThread, pStack); + } + } + + return false; } void EventPipeSession::WriteSequencePointUnbuffered() @@ -338,7 +371,7 @@ void EventPipeSession::WriteSequencePointUnbuffered() } CONTRACTL_END; - if (m_pFile == nullptr) + if (m_pFile == nullptr || m_pBufferManager == nullptr) return; EventPipeSequencePoint sequencePoint; m_pBufferManager->InitSequencePointThreadList(&sequencePoint); @@ -356,6 +389,13 @@ EventPipeEventInstance *EventPipeSession::GetNextEvent() } CONTRACTL_END; + if (m_pBufferManager == nullptr) + { + // Shouldn't call GetNextEvent on a synchronous session + _ASSERTE(false); + return nullptr; + } + return m_pBufferManager->GetNextEvent(); } @@ -363,6 +403,13 @@ CLREvent *EventPipeSession::GetWaitEvent() { LIMITED_METHOD_CONTRACT; + if (m_pBufferManager == nullptr) + { + // Shouldn't call GetWaitEvent on a synchronous session + _ASSERTE(false); + return nullptr; + } + return m_pBufferManager->GetWaitEvent(); } @@ -383,6 +430,12 @@ void EventPipeSession::StartStreaming() if (m_SessionType == EventPipeSessionType::IpcStream) CreateIpcStreamingThread(); + + if (m_SessionType == EventPipeSessionType::Synchronous) + { + _ASSERTE(m_pFile == nullptr); + _ASSERTE(!IsIpcStreamingEnabled()); + } } void EventPipeSession::EnableRundown() @@ -444,6 +497,7 @@ void EventPipeSession::DisableIpcStreamingThread() CONTRACTL_END; _ASSERTE(!g_fProcessDetach); + _ASSERTE(m_pBufferManager != nullptr); // The IPC streaming thread will watch this value and exit // when profiling is disabled. @@ -482,12 +536,44 @@ void EventPipeSession::SuspendWriteEvent() THROWS; GC_TRIGGERS; MODE_PREEMPTIVE; + // Need to disable the session before calling this method + PRECONDITION(!EventPipe::IsSessionEnabled(reinterpret_cast(this))); } CONTRACTL_END; - // Force all in-progress writes to either finish or cancel - // This is required to ensure we can safely flush and delete the buffers - m_pBufferManager->SuspendWriteEvent(GetIndex()); + // Collect all threads that are currently active so we don't have to + // wait for events to finish writing under the lock. + CQuickArrayList threadList; + { + SpinLockHolder holder(EventPipeThread::GetGlobalThreadLock()); + + EventPipeThreadIterator eventPipeThreads = EventPipeThread::GetThreads(); + EventPipeThread *pThread = nullptr; + while (eventPipeThreads.Next(&pThread)) + { + // Add ref so the thread doesn't disappear when we release the lock + pThread->AddRef(); + threadList.Push(pThread); + } + } + + for (size_t i = 0; i < threadList.Size(); i++) + { + EventPipeThread *pThread = threadList[i]; + // Wait for the thread to finish any writes to this session + YIELD_WHILE(pThread->GetSessionWriteInProgress() == GetIndex()); + + // Since we've already disabled the session, the thread won't call back in to this + // session once its done with the current write + + pThread->Release(); + } + + if (m_pBufferManager != nullptr) + { + // Convert all buffers to read only to ensure they get flushed + m_pBufferManager->SuspendWriteEvent(GetIndex()); + } } void EventPipeSession::ExecuteRundown() diff --git a/src/coreclr/src/vm/eventpipesession.h b/src/coreclr/src/vm/eventpipesession.h index cc86d9b9d26a..10974859c6b5 100644 --- a/src/coreclr/src/vm/eventpipesession.h +++ b/src/coreclr/src/vm/eventpipesession.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __EVENTPIPE_SESSION_H__ #define __EVENTPIPE_SESSION_H__ @@ -9,12 +8,11 @@ #include "common.h" #include "threadsuspend.h" +#include "eventpipesessionprovider.h" class EventPipeBufferManager; class EventPipeEventInstance; class EventPipeFile; -class EventPipeSessionProvider; -class EventPipeSessionProviderList; class EventPipeThread; // TODO: Revisit the need of this enum and its usage. @@ -22,7 +20,8 @@ enum class EventPipeSessionType { File, Listener, - IpcStream + IpcStream, + Synchronous }; enum class EventPipeSerializationFormat @@ -68,6 +67,9 @@ class EventPipeSession // For determininig if a particular session needs rundown events const bool m_rundownRequested; + // For synchronous sessions + EventPipeSessionSynchronousCallback m_synchronousCallback; + // Start date and time in UTC. FILETIME m_sessionStartTime; @@ -105,7 +107,8 @@ class EventPipeSession uint32_t circularBufferSizeInMB, const EventPipeProviderConfiguration *pProviders, uint32_t numProviders, - bool rundownEnabled = false); + EventPipeSessionSynchronousCallback callback = nullptr); + ~EventPipeSession(); uint64_t GetMask() const @@ -182,6 +185,12 @@ class EventPipeSession return m_pIpcStreamingThread; } + EventPipeSessionProviderIterator GetProviders() + { + LIMITED_METHOD_CONTRACT; + return m_pProviderList->GetProviders(); + } + // Add a new provider to the session. void AddSessionProvider(EventPipeSessionProvider *pProvider); @@ -190,7 +199,11 @@ class EventPipeSession bool WriteAllBuffersToFile(bool *pEventsWritten); - bool WriteEventBuffered( + // If a session is non-synchronous (i.e. a file, pipe, etc) WriteEvent will + // put the event in a buffer and return as quick as possible. If a session is + // synchronous (callback to the profiler) then this method will block until the + // profiler is done parsing and reacting to it. + bool WriteEvent( Thread *pThread, EventPipeEvent &event, EventPipeEventPayload &payload, diff --git a/src/coreclr/src/vm/eventpipesessionprovider.cpp b/src/coreclr/src/vm/eventpipesessionprovider.cpp index 0120a629da92..939aab0f6035 100644 --- a/src/coreclr/src/vm/eventpipesessionprovider.cpp +++ b/src/coreclr/src/vm/eventpipesessionprovider.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "eventpipeprovider.h" @@ -177,6 +176,12 @@ EventPipeSessionProvider *EventPipeSessionProviderList::GetSessionProvider(const return pSessionProvider; } +EventPipeSessionProviderIterator EventPipeSessionProviderList::GetProviders() +{ + LIMITED_METHOD_CONTRACT; + return EventPipeSessionProviderIterator(m_pProviders); +} + bool EventPipeSessionProviderList::IsEmpty() const { LIMITED_METHOD_CONTRACT; diff --git a/src/coreclr/src/vm/eventpipesessionprovider.h b/src/coreclr/src/vm/eventpipesessionprovider.h index 642cf4f90ce0..37c715bdf36b 100644 --- a/src/coreclr/src/vm/eventpipesessionprovider.h +++ b/src/coreclr/src/vm/eventpipesessionprovider.h @@ -6,6 +6,8 @@ enum class EventPipeEventLevel; class EventPipeProvider; +typedef EventPipeIterator EventPipeSessionProviderIterator; + class EventPipeSessionProvider { public: @@ -59,6 +61,8 @@ class EventPipeSessionProviderList // Return NULL if one doesn't exist. EventPipeSessionProvider* GetSessionProvider(const EventPipeProvider *pProvider) const; + EventPipeSessionProviderIterator GetProviders(); + // Returns true if the list is empty. bool IsEmpty() const; @@ -72,7 +76,7 @@ class EventPipeSessionProviderList EventPipeSessionProviderList &&operator=(EventPipeSessionProviderList &&rhs) = delete; private: - SList> *m_pProviders = nullptr; + SList> *m_pProviders = nullptr; // A catch-all provider used when tracing is enabled for all events. EventPipeSessionProvider *m_pCatchAllProvider = nullptr; diff --git a/src/coreclr/src/vm/eventpipethread.cpp b/src/coreclr/src/vm/eventpipethread.cpp index 24c678658fba..f33fc4ffd840 100644 --- a/src/coreclr/src/vm/eventpipethread.cpp +++ b/src/coreclr/src/vm/eventpipethread.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "eventpipe.h" @@ -88,8 +87,6 @@ void EventPipeThreadSessionState::IncrementSequenceNumber() m_sequenceNumber++; } - - void ReleaseEventPipeThreadRef(EventPipeThread *pThread) { LIMITED_METHOD_CONTRACT; @@ -104,6 +101,9 @@ void AcquireEventPipeThreadRef(EventPipeThread *pThread) thread_local EventPipeThreadHolder EventPipeThread::gCurrentEventPipeThreadHolder; +SpinLock EventPipeThread::s_threadsLock; +SList> EventPipeThread::s_pThreads; + EventPipeThread::EventPipeThread() { CONTRACTL @@ -136,13 +136,20 @@ EventPipeThread::~EventPipeThread() #endif } -/*static */ EventPipeThread *EventPipeThread::Get() +void EventPipeThread::Initialize() +{ + LIMITED_METHOD_CONTRACT; + + s_threadsLock.Init(LOCK_TYPE_DEFAULT); +} + +EventPipeThread *EventPipeThread::Get() { LIMITED_METHOD_CONTRACT; return gCurrentEventPipeThreadHolder; } -/*static */ EventPipeThread* EventPipeThread::GetOrCreate() +EventPipeThread* EventPipeThread::GetOrCreate() { CONTRACTL { @@ -157,6 +164,11 @@ EventPipeThread::~EventPipeThread() EX_TRY { gCurrentEventPipeThreadHolder = new EventPipeThread(); + + { + SpinLockHolder crst(&s_threadsLock); + s_pThreads.InsertTail(new SListElem((EventPipeThread *)gCurrentEventPipeThreadHolder)); + } } EX_CATCH { @@ -166,6 +178,13 @@ EventPipeThread::~EventPipeThread() return gCurrentEventPipeThreadHolder; } +EventPipeThreadIterator EventPipeThread::GetThreads() +{ + LIMITED_METHOD_CONTRACT; + + return EventPipeThreadIterator(&s_pThreads); +} + void EventPipeThread::AddRef() { LIMITED_METHOD_CONTRACT; @@ -175,8 +194,32 @@ void EventPipeThread::AddRef() void EventPipeThread::Release() { LIMITED_METHOD_CONTRACT; + if (FastInterlockDecrement(&m_refCount) == 0) { + SpinLockHolder crst(&s_threadsLock); + + // Remove ourselves from the global list + SListElem *pElem = s_pThreads.GetHead(); + while (pElem != nullptr) + { + // A null value shouldn't ever be added to the list + _ASSERTE(pElem->GetValue() != nullptr); + + if (pElem->GetValue() == this) + { + break; + } + + pElem = s_pThreads.GetNext(pElem); + } + + if (pElem == nullptr || s_pThreads.FindAndRemove(pElem) == nullptr) + { + // We should always be in the list + _ASSERTE(!"We couldn't find ourselves in the global thread list"); + } + // https://isocpp.org/wiki/faq/freestore-mgmt#delete-this // As long as you're careful, it's okay (not evil) for an object to commit suicide (delete this). delete this; diff --git a/src/coreclr/src/vm/eventpipethread.h b/src/coreclr/src/vm/eventpipethread.h index 981efb02d10c..f4d899a9d697 100644 --- a/src/coreclr/src/vm/eventpipethread.h +++ b/src/coreclr/src/vm/eventpipethread.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __EVENTPIPE_THREAD_H__ #define __EVENTPIPE_THREAD_H__ @@ -19,7 +18,9 @@ class EventPipeThread; void ReleaseEventPipeThreadRef(EventPipeThread* pThread); void AcquireEventPipeThreadRef(EventPipeThread* pThread); -typedef Wrapper EventPipeThreadHolder; +typedef Wrapper EventPipeThreadHolder; + +typedef EventPipeIterator EventPipeThreadIterator; class EventPipeThreadSessionState { @@ -85,6 +86,9 @@ class EventPipeThread { static thread_local EventPipeThreadHolder gCurrentEventPipeThreadHolder; + static SpinLock s_threadsLock; + static SList> s_pThreads; + ~EventPipeThread(); // The EventPipeThreadHolder maintains one count while the thread is alive @@ -115,11 +119,23 @@ class EventPipeThread // EventPipeSession *m_pRundownSession = nullptr; + // Use Get/GetOrCreate instead + EventPipeThread(); + public: + static void Initialize(); + static EventPipeThread *Get(); static EventPipeThread* GetOrCreate(); - EventPipeThread(); + static EventPipeThreadIterator GetThreads(); + static SpinLock *GetGlobalThreadLock() + { + LIMITED_METHOD_CONTRACT; + + return &s_threadsLock; + } + void AddRef(); void Release(); SpinLock *GetLock(); diff --git a/src/coreclr/src/vm/eventreporter.cpp b/src/coreclr/src/vm/eventreporter.cpp index 2ff712b1cc96..f8e3ef7c0b26 100644 --- a/src/coreclr/src/vm/eventreporter.cpp +++ b/src/coreclr/src/vm/eventreporter.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/eventreporter.h b/src/coreclr/src/vm/eventreporter.h index 3bfede0e1e35..ac74acb76a10 100644 --- a/src/coreclr/src/vm/eventreporter.h +++ b/src/coreclr/src/vm/eventreporter.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/eventstore.cpp b/src/coreclr/src/vm/eventstore.cpp index d986e81f402a..7fa0cd570788 100644 --- a/src/coreclr/src/vm/eventstore.cpp +++ b/src/coreclr/src/vm/eventstore.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" diff --git a/src/coreclr/src/vm/eventstore.hpp b/src/coreclr/src/vm/eventstore.hpp index 9e53bb06f8d9..450b7af97877 100644 --- a/src/coreclr/src/vm/eventstore.hpp +++ b/src/coreclr/src/vm/eventstore.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __EventStore_hpp diff --git a/src/coreclr/src/vm/eventtrace.cpp b/src/coreclr/src/vm/eventtrace.cpp index ec5945c73787..8ec702036b00 100644 --- a/src/coreclr/src/vm/eventtrace.cpp +++ b/src/coreclr/src/vm/eventtrace.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: eventtrace.cpp // Abstract: This module implements Event Tracing support @@ -3560,7 +3559,7 @@ BOOL ETW::TypeSystemLog::AddTypeToGlobalCacheIfNotExists(TypeHandle th, BOOL * p { CrstHolder _crst(GetHashCrst()); // Like above, check if the type has been added from a different thread since we last looked it up. - if (pLoggedTypesFromModule->loggedTypesFromModuleHash.Lookup(th).th.IsNull()) + if (!pLoggedTypesFromModule->loggedTypesFromModuleHash.Lookup(th).th.IsNull()) { *pfCreatedNew = FALSE; return fSucceeded; diff --git a/src/coreclr/src/vm/eventtrace.inl b/src/coreclr/src/vm/eventtrace.inl index a8b73b27cad1..5aa06901e09e 100644 --- a/src/coreclr/src/vm/eventtrace.inl +++ b/src/coreclr/src/vm/eventtrace.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma once diff --git a/src/coreclr/src/vm/eventtracepriv.h b/src/coreclr/src/vm/eventtracepriv.h index 77681f2c6920..2d3f09580f58 100644 --- a/src/coreclr/src/vm/eventtracepriv.h +++ b/src/coreclr/src/vm/eventtracepriv.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: eventtracepriv.h // diff --git a/src/coreclr/src/vm/excep.cpp b/src/coreclr/src/vm/excep.cpp index c0b89c0e6945..2366aea21e7d 100644 --- a/src/coreclr/src/vm/excep.cpp +++ b/src/coreclr/src/vm/excep.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/excep.h b/src/coreclr/src/vm/excep.h index 0f8504c194f6..28bcaa35ee7f 100644 --- a/src/coreclr/src/vm/excep.h +++ b/src/coreclr/src/vm/excep.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // EXCEP.H // diff --git a/src/coreclr/src/vm/exceptionhandling.cpp b/src/coreclr/src/vm/exceptionhandling.cpp index c655fe8ded92..84a65d8687e2 100644 --- a/src/coreclr/src/vm/exceptionhandling.cpp +++ b/src/coreclr/src/vm/exceptionhandling.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/exceptionhandling.h b/src/coreclr/src/vm/exceptionhandling.h index dfdaf49726ed..06b10013981a 100644 --- a/src/coreclr/src/vm/exceptionhandling.h +++ b/src/coreclr/src/vm/exceptionhandling.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/exceptmacros.h b/src/coreclr/src/vm/exceptmacros.h index 31fb8c73cdf7..60deb5a5bf90 100644 --- a/src/coreclr/src/vm/exceptmacros.h +++ b/src/coreclr/src/vm/exceptmacros.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/exinfo.cpp b/src/coreclr/src/vm/exinfo.cpp index 58e353a01601..acfa06f07e10 100644 --- a/src/coreclr/src/vm/exinfo.cpp +++ b/src/coreclr/src/vm/exinfo.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/exinfo.h b/src/coreclr/src/vm/exinfo.h index 332d2248342a..a270843eec9c 100644 --- a/src/coreclr/src/vm/exinfo.h +++ b/src/coreclr/src/vm/exinfo.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/exstate.cpp b/src/coreclr/src/vm/exstate.cpp index db238df8bafe..992cd361b6ef 100644 --- a/src/coreclr/src/vm/exstate.cpp +++ b/src/coreclr/src/vm/exstate.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/exstate.h b/src/coreclr/src/vm/exstate.h index e3971d356b5a..6a9b80e1a204 100644 --- a/src/coreclr/src/vm/exstate.h +++ b/src/coreclr/src/vm/exstate.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/exstatecommon.h b/src/coreclr/src/vm/exstatecommon.h index e1bf685f64dc..92a4c45d2b87 100644 --- a/src/coreclr/src/vm/exstatecommon.h +++ b/src/coreclr/src/vm/exstatecommon.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/fastserializableobject.h b/src/coreclr/src/vm/fastserializableobject.h index 15851f102953..f2158c627636 100644 --- a/src/coreclr/src/vm/fastserializableobject.h +++ b/src/coreclr/src/vm/fastserializableobject.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __FASTSERIALIZABLE_OBJECT_H__ #define __FASTSERIALIZABLE_OBJECT_H__ diff --git a/src/coreclr/src/vm/fastserializer.cpp b/src/coreclr/src/vm/fastserializer.cpp index 1a529a4b4d62..a15880079b6f 100644 --- a/src/coreclr/src/vm/fastserializer.cpp +++ b/src/coreclr/src/vm/fastserializer.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "fastserializer.h" diff --git a/src/coreclr/src/vm/fastserializer.h b/src/coreclr/src/vm/fastserializer.h index aa0501f0ae54..436813062cc8 100644 --- a/src/coreclr/src/vm/fastserializer.h +++ b/src/coreclr/src/vm/fastserializer.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __FASTSERIALIZER_H__ #define __FASTSERIALIZER_H__ diff --git a/src/coreclr/src/vm/fcall.cpp b/src/coreclr/src/vm/fcall.cpp index 51c1f0147ad6..6e595c0cc578 100644 --- a/src/coreclr/src/vm/fcall.cpp +++ b/src/coreclr/src/vm/fcall.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // FCALL.CPP // diff --git a/src/coreclr/src/vm/fcall.h b/src/coreclr/src/vm/fcall.h index 13df4cc76d95..3598dc623059 100644 --- a/src/coreclr/src/vm/fcall.h +++ b/src/coreclr/src/vm/fcall.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // FCall.H // diff --git a/src/coreclr/src/vm/field.cpp b/src/coreclr/src/vm/field.cpp index 22ca7c1b3a9b..b3d4bde947a0 100644 --- a/src/coreclr/src/vm/field.cpp +++ b/src/coreclr/src/vm/field.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: Field.cpp // diff --git a/src/coreclr/src/vm/field.h b/src/coreclr/src/vm/field.h index 1121bf8cd476..be57bec9d0c6 100644 --- a/src/coreclr/src/vm/field.h +++ b/src/coreclr/src/vm/field.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // COM+ Data Field Abstraction diff --git a/src/coreclr/src/vm/fieldmarshaler.cpp b/src/coreclr/src/vm/fieldmarshaler.cpp index 5b9133c1f1db..c7b5910e54a5 100644 --- a/src/coreclr/src/vm/fieldmarshaler.cpp +++ b/src/coreclr/src/vm/fieldmarshaler.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: FieldMarshaler.cpp // diff --git a/src/coreclr/src/vm/fieldmarshaler.h b/src/coreclr/src/vm/fieldmarshaler.h index 9366a8a0746e..1fbef3aba622 100644 --- a/src/coreclr/src/vm/fieldmarshaler.h +++ b/src/coreclr/src/vm/fieldmarshaler.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: FieldMarshaler.h // diff --git a/src/coreclr/src/vm/finalizerthread.cpp b/src/coreclr/src/vm/finalizerthread.cpp index 979f05e1e43b..a46166b3a85e 100644 --- a/src/coreclr/src/vm/finalizerthread.cpp +++ b/src/coreclr/src/vm/finalizerthread.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== #include "common.h" @@ -51,21 +50,6 @@ BOOL FinalizerThread::HaveExtraWorkForFinalizer() return GetFinalizerThread()->HaveExtraWorkForFinalizer(); } -// This helper is here to avoid EH goo associated with DefineFullyQualifiedNameForStack being -// invoked when logging is off. -NOINLINE -void LogFinalization(Object* obj) -{ - STATIC_CONTRACT_NOTHROW; - STATIC_CONTRACT_GC_NOTRIGGER; - STATIC_CONTRACT_MODE_ANY; - -#ifdef FEATURE_EVENT_TRACE - ETW::GCLog::SendFinalizeObjectEvent(obj->GetMethodTable(), obj); -#endif // FEATURE_EVENT_TRACE -} - - void CallFinalizer(Object* obj) { STATIC_CONTRACT_THROWS; @@ -77,40 +61,26 @@ void CallFinalizer(Object* obj) LOG((LF_GC, LL_INFO1000, "Finalizing " LOG_OBJECT_CLASS(obj))); _ASSERTE(GetThread()->PreemptiveGCDisabled()); - // if we don't have a class, we can't call the finalizer - // if the object has been marked run as finalizer run don't call either - if (pMT) + + if (!((obj->GetHeader()->GetBits()) & BIT_SBLK_FINALIZER_RUN)) { - if (!((obj->GetHeader()->GetBits()) & BIT_SBLK_FINALIZER_RUN)) - { + _ASSERTE(pMT->HasFinalizer()); - _ASSERTE(obj->GetMethodTable() == pMT); - _ASSERTE(pMT->HasFinalizer()); +#ifdef FEATURE_EVENT_TRACE + ETW::GCLog::SendFinalizeObjectEvent(pMT, obj); +#endif // FEATURE_EVENT_TRACE - LogFinalization(obj); - MethodTable::CallFinalizer(obj); - } - else - { - //reset the bit so the object can be put on the list - //with RegisterForFinalization - obj->GetHeader()->ClrBit (BIT_SBLK_FINALIZER_RUN); - } + MethodTable::CallFinalizer(obj); + } + else + { + //reset the bit so the object can be put on the list + //with RegisterForFinalization + obj->GetHeader()->ClrBit (BIT_SBLK_FINALIZER_RUN); } } -void FinalizerThread::DoOneFinalization(Object* fobj, Thread* pThread) -{ - STATIC_CONTRACT_THROWS; - STATIC_CONTRACT_GC_TRIGGERS; - STATIC_CONTRACT_MODE_COOPERATIVE; - - CallFinalizer(fobj); - - pThread->InternalReset(); -} - -void FinalizerThread::FinalizeAllObjects(int bitToCheck) +void FinalizerThread::FinalizeAllObjects() { STATIC_CONTRACT_THROWS; STATIC_CONTRACT_GC_TRIGGERS; @@ -125,18 +95,14 @@ void FinalizerThread::FinalizeAllObjects(int bitToCheck) Thread *pThread = GetThread(); // Finalize everyone - while (fobj) + while (fobj && !fQuitFinalizer) { - if (fobj->GetHeader()->GetBits() & bitToCheck) - { - fobj = GCHeapUtilities::GetGCHeap()->GetNextFinalizable(); - } - else - { - fcount++; - DoOneFinalization(fobj, pThread); - fobj = GCHeapUtilities::GetGCHeap()->GetNextFinalizable(); - } + fcount++; + + CallFinalizer(fobj); + pThread->InternalReset(); + + fobj = GCHeapUtilities::GetGCHeap()->GetNextFinalizable(); } FireEtwGCFinalizersEnd_V1(fcount, GetClrInstanceId()); } @@ -346,7 +312,7 @@ VOID FinalizerThread::FinalizerThreadWorker(void *args) GetFinalizerThread()->EEResetAbort(Thread::TAR_ALL); } - FinalizeAllObjects(0); + FinalizeAllObjects(); // We may still have the finalizer thread for abort. If so the abort request is for previous finalizer method, not for next one. if (GetFinalizerThread()->IsAbortRequested()) @@ -379,7 +345,7 @@ DWORD WINAPI FinalizerThread::FinalizerThreadStart(void *args) #if defined(FEATURE_COMINTEROP_APARTMENT_SUPPORT) && !defined(FEATURE_COMINTEROP) // Make sure the finalizer thread is set to MTA to avoid hitting // DevDiv Bugs 180773 - [Stress Failure] AV at CoreCLR!SafeQueryInterfaceHelper - GetFinalizerThread()->SetApartment(Thread::AS_InMTA, FALSE); + GetFinalizerThread()->SetApartment(Thread::AS_InMTA); #endif // FEATURE_COMINTEROP_APARTMENT_SUPPORT && !FEATURE_COMINTEROP s_FinalizerThreadOK = GetFinalizerThread()->HasStarted(); @@ -432,14 +398,7 @@ DWORD WINAPI FinalizerThread::FinalizerThreadStart(void *args) // since doing so will cause OLE32 to CoUninitialize. while (1) { - PAL_TRY(void *, unused, NULL) - { - __SwitchToThread(INFINITE, CALLER_LIMITS_SPINNING); - } - PAL_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - } - PAL_ENDTRY + __SwitchToThread(INFINITE, CALLER_LIMITS_SPINNING); } return 0; diff --git a/src/coreclr/src/vm/finalizerthread.h b/src/coreclr/src/vm/finalizerthread.h index 3398c75102f3..fdfc2ab3c52d 100644 --- a/src/coreclr/src/vm/finalizerthread.h +++ b/src/coreclr/src/vm/finalizerthread.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== #ifndef _FINALIZER_THREAD_H_ @@ -33,9 +32,7 @@ class FinalizerThread static void WaitForFinalizerEvent (CLREvent *event); - static void DoOneFinalization(Object* fobj, Thread* pThread); - - static void FinalizeAllObjects(int bitToCheck); + static void FinalizeAllObjects(); public: static Thread* GetFinalizerThread() diff --git a/src/coreclr/src/vm/formattype.cpp b/src/coreclr/src/vm/formattype.cpp index 856945a1c459..756d29629b16 100644 --- a/src/coreclr/src/vm/formattype.cpp +++ b/src/coreclr/src/vm/formattype.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //This file just includes formattype.cpp from the inc directory. diff --git a/src/coreclr/src/vm/fptrstubs.cpp b/src/coreclr/src/vm/fptrstubs.cpp index 18fd87d00655..f76b7951027a 100644 --- a/src/coreclr/src/vm/fptrstubs.cpp +++ b/src/coreclr/src/vm/fptrstubs.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/vm/fptrstubs.h b/src/coreclr/src/vm/fptrstubs.h index 2f1d88b37219..d877f1b4b205 100644 --- a/src/coreclr/src/vm/fptrstubs.h +++ b/src/coreclr/src/vm/fptrstubs.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/vm/frames.cpp b/src/coreclr/src/vm/frames.cpp index 0dd105b59b27..3e6ab6d1c8e8 100644 --- a/src/coreclr/src/vm/frames.cpp +++ b/src/coreclr/src/vm/frames.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // FRAMES.CPP diff --git a/src/coreclr/src/vm/frames.h b/src/coreclr/src/vm/frames.h index 3437030705f1..d37ba385879b 100644 --- a/src/coreclr/src/vm/frames.h +++ b/src/coreclr/src/vm/frames.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // FRAMES.H diff --git a/src/coreclr/src/vm/gccover.cpp b/src/coreclr/src/vm/gccover.cpp index ddd13152db9e..2f6001a0858f 100644 --- a/src/coreclr/src/vm/gccover.cpp +++ b/src/coreclr/src/vm/gccover.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /****************************************************************************/ @@ -37,7 +36,6 @@ MethodDesc* AsMethodDesc(size_t addr); static PBYTE getTargetOfCall(PBYTE instrPtr, PCONTEXT regs, PBYTE*nextInstr); -bool isCallToStopForGCJitHelper(PBYTE instrPtr); #if defined(TARGET_ARM) || defined(TARGET_ARM64) static void replaceSafePointInstructionWithGcStressInstr(UINT32 safePointOffset, LPVOID codeStart); static bool replaceInterruptibleRangesWithGcStressInstr (UINT32 startOffset, UINT32 stopOffset, LPVOID codeStart); @@ -477,61 +475,6 @@ class GCCoverageRangeEnumerator #endif // TARGET_AMD64 -// When sprinkling break points, we must make sure that certain calls to -// Thread-suspension routines inlined into the managed method are not -// converted to GC-Stress points. Otherwise, this will lead to race -// conditions with the GC. -// -// For example, for an inlined PInvoke stub, the JIT generates the following code -// -// call CORINFO_HELP_INIT_PINVOKE_FRAME // Obtain the thread pointer -// -// mov byte ptr[rsi + 12], 0 // Switch to preemptive mode [thread->premptiveGcDisabled = 0] -// call rax // The actual native call, in preemptive mode -// mov byte ptr[rsi + 12], 1 // Switch the thread to Cooperative mode -// cmp dword ptr[(reloc 0x7ffd1bb77148)], 0 // if(g_TrapReturningThreads) -// je SHORT G_M40565_IG05 -// call[CORINFO_HELP_STOP_FOR_GC] // Call JIT_RareDisableHelper() -// -// -// For the SprinkleBreakPoints() routine, the JIT_RareDisableHelper() itself will -// look like an ordinary indirect call/safepoint. So, it may rewrite it with -// a TRAP to perform GC -// -// call CORINFO_HELP_INIT_PINVOKE_FRAME // Obtain the thread pointer -// -// mov byte ptr[rsi + 12], 0 // Switch to preemptive mode [thread->premptiveGcDisabled = 0] -// cli // INTERRUPT_INSTR_CALL -// mov byte ptr[rsi + 12], 1 // Switch the thread to Cooperative mode -// cmp dword ptr[(reloc 0x7ffd1bb77148)], 0 // if(g_TrapReturningThreads) -// je SHORT G_M40565_IG05 -// cli // INTERRUPT_INSTR_CALL -// -// -// Now, a managed thread (T) can race with the GC as follows: -// 1) At the first safepoint, we notice that T is in preemptive mode during the call for GCStress -// So, it is put it in cooperative mode for the purpose of GCStress(fPremptiveGcDisabledForGcStress) -// 2) We DoGCStress(). Start off background GC in a different thread. -// 3) Then the thread T is put back to preemptive mode (because that's where it was). -// Thread T continues execution along with the GC thread. -// 4) The Jitted code puts thread T to cooperative mode, as part of PInvoke epilog -// 5) Now instead of CORINFO_HELP_STOP_FOR_GC(), we hit the GCStress trap and start -// another round of GCStress while in Cooperative mode. -// 6) Now, thread T can modify the stack (ex: RedirectionFrame setup) while the GC thread is scanning it. -// -// This problem can be avoided by not inserting traps-for-GC in place of calls to CORINFO_HELP_STOP_FOR_GC() -// -// How do we identify the calls to CORINFO_HELP_STOP_FOR_GC()? -// Since this is a GCStress only requirement, its not worth special identification in the GcInfo -// Since CORINFO_HELP_STOP_FOR_GC() calls are realized as indirect calls by the JIT, we cannot identify -// them by address at the time of SprinkleBreakpoints(). -// So, we actually let the SprinkleBreakpoints() replace the call to CORINFO_HELP_STOP_FOR_GC() with a trap, -// and revert it back to the original instruction the first time we hit the trap in OnGcCoverageInterrupt(). -// -// Similarly, inserting breakpoints can be avoided for JIT_PollGC() and JIT_StressGC(). - -extern "C" FCDECL0(VOID, JIT_RareDisableHelper); - /****************************************************************************/ /* sprinkle interrupt instructions that will stop on every GCSafe location regionOffsetAdj - Represents the offset of the current region @@ -629,8 +572,6 @@ void GCCoverageInfo::SprinkleBreakpoints( _ASSERTE(len > 0); _ASSERTE(len <= (size_t)(codeEnd-cur)); - bool skipGCForCurrentInstr = false; - switch(instructionType) { case InstructionType::Call_IndirectUnconditional: @@ -654,11 +595,6 @@ void GCCoverageInfo::SprinkleBreakpoints( if (target != 0) { - if (target == (PBYTE)JIT_RareDisableHelper) - { - // Skip the call to JIT_RareDisableHelper. - skipGCForCurrentInstr = true; - } targetMD = getTargetMethodDesc((PCODE)target); } } @@ -676,31 +612,30 @@ void GCCoverageInfo::SprinkleBreakpoints( break; } - if (!skipGCForCurrentInstr) + if (prevDirectCallTargetMD != 0) { - if (prevDirectCallTargetMD != 0) - { - ReplaceInstrAfterCall(cur, prevDirectCallTargetMD); - } + ReplaceInstrAfterCall(cur, prevDirectCallTargetMD); + } - // For fully interruptible code, we end up whacking every instruction - // to INTERRUPT_INSTR. For non-fully interruptible code, we end - // up only touching the call instructions (specially so that we - // can really do the GC on the instruction just after the call). - size_t dwRelOffset = (cur - codeStart) + regionOffsetAdj; - _ASSERTE(FitsIn(dwRelOffset)); - if (codeMan->IsGcSafe(&codeInfo, static_cast(dwRelOffset))) - *cur = INTERRUPT_INSTR; + // For fully interruptible code, we end up whacking every instruction + // to INTERRUPT_INSTR. For non-fully interruptible code, we end + // up only touching the call instructions (specially so that we + // can really do the GC on the instruction just after the call). + size_t dwRelOffset = (cur - codeStart) + regionOffsetAdj; + _ASSERTE(FitsIn(dwRelOffset)); + if (codeMan->IsGcSafe(&codeInfo, static_cast(dwRelOffset))) + { + *cur = INTERRUPT_INSTR; + } #ifdef TARGET_X86 - // we will whack every instruction in the prolog and epilog to make certain - // our unwinding logic works there. - if (codeMan->IsInPrologOrEpilog((cur - codeStart) + (DWORD)regionOffsetAdj, gcInfoToken, NULL)) - { - *cur = INTERRUPT_INSTR; - } -#endif + // we will whack every instruction in the prolog and epilog to make certain + // our unwinding logic works there. + if (codeMan->IsInPrologOrEpilog((cur - codeStart) + (DWORD)regionOffsetAdj, gcInfoToken, NULL)) + { + *cur = INTERRUPT_INSTR; } +#endif // If we couldn't find the method desc targetMD is zero prevDirectCallTargetMD = targetMD; @@ -972,16 +907,12 @@ bool replaceInterruptibleRangesWithGcStressInstr (UINT32 startOffset, UINT32 sto *((WORD*)instrPtr) = INTERRUPT_INSTR; else { - // Do not replace with gcstress interrupt instruction at call to JIT_RareDisableHelper - if(!isCallToStopForGCJitHelper(instrPtr)) - *((DWORD*)instrPtr) = INTERRUPT_INSTR_32; + *((DWORD*)instrPtr) = INTERRUPT_INSTR_32; } instrPtr += instrLen; #elif defined(TARGET_ARM64) - // Do not replace with gcstress interrupt instruction at call to JIT_RareDisableHelper - if(!isCallToStopForGCJitHelper(instrPtr)) - *((DWORD*)instrPtr) = INTERRUPT_INSTR; + *((DWORD*)instrPtr) = INTERRUPT_INSTR; instrPtr += 4; #endif // TARGET_XXXX_ @@ -1000,57 +931,6 @@ bool replaceInterruptibleRangesWithGcStressInstr (UINT32 startOffset, UINT32 sto } #endif // defined(TARGET_ARM) || defined(TARGET_ARM64) -// Is this a call instruction to JIT_RareDisableHelper() -// We cannot insert GCStress instruction at this call -// For arm64 & arm (R2R) call to jithelpers happens via a stub. -// For other architectures call does not happen via stub. -// For other architectures we can get the target directly by calling getTargetOfCall(). -// This is not the case for arm64/arm so need to decode the stub -// instruction to find the actual jithelper target. -// For other architecture we detect call to JIT_RareDisableHelper -// in function OnGcCoverageInterrupt() since getTargetOfCall() can -// get the actual jithelper target. -bool isCallToStopForGCJitHelper(PBYTE instrPtr) -{ -#if defined(TARGET_ARM64) - if (((*reinterpret_cast(instrPtr)) & 0xFC000000) == 0x94000000) // Do we have a BL instruction? - { - // call through immediate - int imm26 = ((*((DWORD*)instrPtr)) & 0x03FFFFFF)<<2; - // SignExtend the immediate value. - imm26 = (imm26 << 4) >> 4; - DWORD* target = (DWORD*) (instrPtr + imm26); - // Call to jithelpers happens via jumpstub - if(*target == 0x58000050 /* ldr xip0, PC+8*/ && *(target+1) == 0xd61f0200 /* br xip0 */) - { - // get the actual jithelper target - target = *(((DWORD**)target) + 1); - if((TADDR)target == GetEEFuncEntryPoint(JIT_RareDisableHelper)) - { - return true; - } - } - } -#elif defined(TARGET_ARM) - if((instrPtr[1] & 0xf8) == 0xf0 && (instrPtr[3] & 0xc0) == 0xc0) // call using imm - { - int imm32 = GetThumb2BlRel24((UINT16 *)instrPtr); - WORD* target = (WORD*) (instrPtr + 4 + imm32); - // Is target a stub - if(*target == 0xf8df && *(target+1) == 0xf000) // ldr pc, [pc+4] - { - //get actual target - target = *((WORD**)target + 1); - if((TADDR)target == GetEEFuncEntryPoint(JIT_RareDisableHelper)) - { - return true; - } - } - } -#endif - return false; -} - static size_t getRegVal(unsigned regNum, PCONTEXT regs) { return *getRegAddr(regNum, regs); @@ -1358,6 +1238,20 @@ void RemoveGcCoverageInterrupt(TADDR instrPtr, BYTE * savedInstrPtr) FlushInstructionCache(GetCurrentProcess(), (LPCVOID)instrPtr, 4); } +// A managed thread (T) can race with the GC as follows: +// 1) At the first safepoint, we notice that T is in preemptive mode during the call for GCStress +// So, it is put it in cooperative mode for the purpose of GCStress(fPremptiveGcDisabledForGcStress) +// 2) We DoGCStress(). Start off background GC in a different thread. +// 3) Then the thread T is put back to preemptive mode (because that's where it was). +// Thread T continues execution along with the GC thread. +// 4) The Jitted code puts thread T to cooperative mode, as part of PInvoke epilog +// 5) Now instead of CORINFO_HELP_STOP_FOR_GC(), we hit the GCStress trap and start +// another round of GCStress while in Cooperative mode. +// 6) Now, thread T can modify the stack (ex: RedirectionFrame setup) while the GC thread is scanning it. +// +// This race is now mitigated below. Where we won't initiate a stress mode GC +// for a thread in cooperative mode with an active ICF, if g_TrapReturningThreads is true. + BOOL OnGcCoverageInterrupt(PCONTEXT regs) { // So that you can set counted breakpoint easily; @@ -1388,17 +1282,6 @@ BOOL OnGcCoverageInterrupt(PCONTEXT regs) BYTE * savedInstrPtr = &gcCover->savedCode[offset]; - // If this trap instruction is taken in place of CORINFO_HELP_STOP_FOR_GC() - // Do not start a GC, but continue with the original instruction. - // See the comments above SprinkleBreakpoints() function. - PBYTE nextInstr; - PBYTE target = getTargetOfCall(savedInstrPtr, regs, &nextInstr); - - if (target == (PBYTE)JIT_RareDisableHelper) { - RemoveGcCoverageInterrupt(instrPtr, savedInstrPtr); - return TRUE; - } - Thread* pThread = GetThread(); if (!pThread) { @@ -1425,6 +1308,18 @@ BOOL OnGcCoverageInterrupt(PCONTEXT regs) return TRUE; } + // If we're in cooperative mode, we're supposed to stop for GC, + // and there's an active ICF, don't initiate a stress GC. + if (g_TrapReturningThreads && pThread->PreemptiveGCDisabled()) + { + Frame* pFrame = pThread->GetFrame(); + if (InlinedCallFrame::FrameHasActiveCall(pFrame)) + { + RemoveGcCoverageInterrupt(instrPtr, savedInstrPtr); + return TRUE; + } + } + #if defined(USE_REDIRECT_FOR_GCSTRESS) && !defined(TARGET_UNIX) // If we're unable to redirect, then we simply won't test GC at this // location. diff --git a/src/coreclr/src/vm/gccover.h b/src/coreclr/src/vm/gccover.h index 6432f005b653..abd07de2cda0 100644 --- a/src/coreclr/src/vm/gccover.h +++ b/src/coreclr/src/vm/gccover.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/vm/gcdecode.cpp b/src/coreclr/src/vm/gcdecode.cpp index 8d2251dcbcc1..f7c819d2dd04 100644 --- a/src/coreclr/src/vm/gcdecode.cpp +++ b/src/coreclr/src/vm/gcdecode.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" diff --git a/src/coreclr/src/vm/gcdesc.h b/src/coreclr/src/vm/gcdesc.h index c4bbbd5857d2..923164bc448e 100644 --- a/src/coreclr/src/vm/gcdesc.h +++ b/src/coreclr/src/vm/gcdesc.h @@ -1,5 +1,4 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "../gc/gcdesc.h" diff --git a/src/coreclr/src/vm/gcenv.ee.common.cpp b/src/coreclr/src/vm/gcenv.ee.common.cpp index f9e7794a839b..3137f6921642 100644 --- a/src/coreclr/src/vm/gcenv.ee.common.cpp +++ b/src/coreclr/src/vm/gcenv.ee.common.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "gcenv.h" @@ -394,4 +393,4 @@ StackWalkAction GcStackCrawlCallBack(CrawlFrame* pCF, VOID* pData) pCF->CheckGSCookies(); return SWA_CONTINUE; -} \ No newline at end of file +} diff --git a/src/coreclr/src/vm/gcenv.ee.cpp b/src/coreclr/src/vm/gcenv.ee.cpp index 7bb9fdde70a6..394475996015 100644 --- a/src/coreclr/src/vm/gcenv.ee.cpp +++ b/src/coreclr/src/vm/gcenv.ee.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* * GCENV.EE.CPP diff --git a/src/coreclr/src/vm/gcenv.ee.h b/src/coreclr/src/vm/gcenv.ee.h index 37f9dc9f68c4..908fb465dc98 100644 --- a/src/coreclr/src/vm/gcenv.ee.h +++ b/src/coreclr/src/vm/gcenv.ee.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _GCENV_EE_H_ #define _GCENV_EE_H_ diff --git a/src/coreclr/src/vm/gcenv.ee.standalone.cpp b/src/coreclr/src/vm/gcenv.ee.standalone.cpp index a52daeaf7f26..8aa1d4893fea 100644 --- a/src/coreclr/src/vm/gcenv.ee.standalone.cpp +++ b/src/coreclr/src/vm/gcenv.ee.standalone.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "gcenv.h" diff --git a/src/coreclr/src/vm/gcenv.ee.static.cpp b/src/coreclr/src/vm/gcenv.ee.static.cpp index b3802e5809ee..5e1b452b256a 100644 --- a/src/coreclr/src/vm/gcenv.ee.static.cpp +++ b/src/coreclr/src/vm/gcenv.ee.static.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "gcenv.h" diff --git a/src/coreclr/src/vm/gcenv.h b/src/coreclr/src/vm/gcenv.h index d2236946f8d0..c73bc467427a 100644 --- a/src/coreclr/src/vm/gcenv.h +++ b/src/coreclr/src/vm/gcenv.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef GCENV_H_ #define GCENV_H_ diff --git a/src/coreclr/src/vm/gcenv.interlocked.h b/src/coreclr/src/vm/gcenv.interlocked.h index 2e4af516686b..2e888aa2f2f1 100644 --- a/src/coreclr/src/vm/gcenv.interlocked.h +++ b/src/coreclr/src/vm/gcenv.interlocked.h @@ -1,5 +1,4 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "../gc/env/gcenv.interlocked.h" diff --git a/src/coreclr/src/vm/gcenv.interlocked.inl b/src/coreclr/src/vm/gcenv.interlocked.inl index 6d79cea5813f..7190af05aa78 100644 --- a/src/coreclr/src/vm/gcenv.interlocked.inl +++ b/src/coreclr/src/vm/gcenv.interlocked.inl @@ -1,5 +1,4 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "../gc/env/gcenv.interlocked.inl" diff --git a/src/coreclr/src/vm/gcenv.os.cpp b/src/coreclr/src/vm/gcenv.os.cpp index e7add3b29e08..dfb7463296f1 100644 --- a/src/coreclr/src/vm/gcenv.os.cpp +++ b/src/coreclr/src/vm/gcenv.os.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* * gcenv.os.cpp diff --git a/src/coreclr/src/vm/gcenv.os.h b/src/coreclr/src/vm/gcenv.os.h index 0ad745e50656..8e43e9de05fa 100644 --- a/src/coreclr/src/vm/gcenv.os.h +++ b/src/coreclr/src/vm/gcenv.os.h @@ -1,5 +1,4 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "../gc/env/gcenv.os.h" diff --git a/src/coreclr/src/vm/gcenv.unix.inl b/src/coreclr/src/vm/gcenv.unix.inl index 7523864c7d06..53dbecc99afb 100644 --- a/src/coreclr/src/vm/gcenv.unix.inl +++ b/src/coreclr/src/vm/gcenv.unix.inl @@ -1,5 +1,4 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "../gc/env/gcenv.unix.inl" diff --git a/src/coreclr/src/vm/gcenv.windows.inl b/src/coreclr/src/vm/gcenv.windows.inl index aeb35f6b20ff..904b30d69056 100644 --- a/src/coreclr/src/vm/gcenv.windows.inl +++ b/src/coreclr/src/vm/gcenv.windows.inl @@ -1,5 +1,4 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "../gc/env/gcenv.windows.inl" diff --git a/src/coreclr/src/vm/gchandleutilities.cpp b/src/coreclr/src/vm/gchandleutilities.cpp index 4c03db60d197..2086dacdc62e 100644 --- a/src/coreclr/src/vm/gchandleutilities.cpp +++ b/src/coreclr/src/vm/gchandleutilities.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "gchandleutilities.h" diff --git a/src/coreclr/src/vm/gchandleutilities.h b/src/coreclr/src/vm/gchandleutilities.h index 039df610a448..f6f7991f7248 100644 --- a/src/coreclr/src/vm/gchandleutilities.h +++ b/src/coreclr/src/vm/gchandleutilities.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _GCHANDLEUTILITIES_H_ #define _GCHANDLEUTILITIES_H_ diff --git a/src/coreclr/src/vm/gcheaphashtable.h b/src/coreclr/src/vm/gcheaphashtable.h index b9e807fc4daa..d47ebaf23229 100644 --- a/src/coreclr/src/vm/gcheaphashtable.h +++ b/src/coreclr/src/vm/gcheaphashtable.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef GCHEAPHASHTABLE_H #define GCHEAPHASHTABLE_H diff --git a/src/coreclr/src/vm/gcheaphashtable.inl b/src/coreclr/src/vm/gcheaphashtable.inl index 2ba776894fcd..6149dcc52dbc 100644 --- a/src/coreclr/src/vm/gcheaphashtable.inl +++ b/src/coreclr/src/vm/gcheaphashtable.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifdef GCHEAPHASHTABLE_H #ifndef GCHEAPHASHTABLE_INL diff --git a/src/coreclr/src/vm/gcheaputilities.cpp b/src/coreclr/src/vm/gcheaputilities.cpp index 9f13eff75b90..606706050958 100644 --- a/src/coreclr/src/vm/gcheaputilities.cpp +++ b/src/coreclr/src/vm/gcheaputilities.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "gcheaputilities.h" diff --git a/src/coreclr/src/vm/gcheaputilities.h b/src/coreclr/src/vm/gcheaputilities.h index 24cd66bb9f32..ab1f931d0e30 100644 --- a/src/coreclr/src/vm/gcheaputilities.h +++ b/src/coreclr/src/vm/gcheaputilities.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _GCHEAPUTILITIES_H_ #define _GCHEAPUTILITIES_H_ diff --git a/src/coreclr/src/vm/gchelpers.cpp b/src/coreclr/src/vm/gchelpers.cpp index 60e0a03a585a..5a8877423a0d 100644 --- a/src/coreclr/src/vm/gchelpers.cpp +++ b/src/coreclr/src/vm/gchelpers.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* * GCHELPERS.CPP diff --git a/src/coreclr/src/vm/gchelpers.h b/src/coreclr/src/vm/gchelpers.h index 9cf70b12d783..f9a9ac5320e2 100644 --- a/src/coreclr/src/vm/gchelpers.h +++ b/src/coreclr/src/vm/gchelpers.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* * GCHELPERS.H diff --git a/src/coreclr/src/vm/gchelpers.inl b/src/coreclr/src/vm/gchelpers.inl index 864bed35b24a..e56bcd16a1ed 100644 --- a/src/coreclr/src/vm/gchelpers.inl +++ b/src/coreclr/src/vm/gchelpers.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* * GCHELPERS.INL diff --git a/src/coreclr/src/vm/gcinfodecoder.cpp b/src/coreclr/src/vm/gcinfodecoder.cpp index 8e9aca78b1f4..ac28d049891e 100644 --- a/src/coreclr/src/vm/gcinfodecoder.cpp +++ b/src/coreclr/src/vm/gcinfodecoder.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" diff --git a/src/coreclr/src/vm/gcinterface.h b/src/coreclr/src/vm/gcinterface.h index cc70becdf19c..d253063ec67c 100644 --- a/src/coreclr/src/vm/gcinterface.h +++ b/src/coreclr/src/vm/gcinterface.h @@ -1,5 +1,4 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -#include "../gc/gcinterface.h" \ No newline at end of file +#include "../gc/gcinterface.h" diff --git a/src/coreclr/src/vm/gcstress.h b/src/coreclr/src/vm/gcstress.h index da9c749d8f08..30c3ca7062d3 100644 --- a/src/coreclr/src/vm/gcstress.h +++ b/src/coreclr/src/vm/gcstress.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/vm/gctoclreventsink.cpp b/src/coreclr/src/vm/gctoclreventsink.cpp index 57dfdef3183e..15cd777e86e1 100644 --- a/src/coreclr/src/vm/gctoclreventsink.cpp +++ b/src/coreclr/src/vm/gctoclreventsink.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "gctoclreventsink.h" diff --git a/src/coreclr/src/vm/gctoclreventsink.h b/src/coreclr/src/vm/gctoclreventsink.h index 3312b074adab..49212e874159 100644 --- a/src/coreclr/src/vm/gctoclreventsink.h +++ b/src/coreclr/src/vm/gctoclreventsink.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __GCTOCLREVENTSINK_H__ #define __GCTOCLREVENTSINK_H__ diff --git a/src/coreclr/src/vm/gdbjit.cpp b/src/coreclr/src/vm/gdbjit.cpp index 8d8e34e6362f..9e12ec4b3cbf 100644 --- a/src/coreclr/src/vm/gdbjit.cpp +++ b/src/coreclr/src/vm/gdbjit.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: gdbjit.cpp // diff --git a/src/coreclr/src/vm/gdbjit.h b/src/coreclr/src/vm/gdbjit.h index fa5a4883cb74..355e5ee831c5 100644 --- a/src/coreclr/src/vm/gdbjit.h +++ b/src/coreclr/src/vm/gdbjit.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: gdbjit.h // diff --git a/src/coreclr/src/vm/gdbjithelpers.h b/src/coreclr/src/vm/gdbjithelpers.h index 28afb655984f..51e59d003684 100644 --- a/src/coreclr/src/vm/gdbjithelpers.h +++ b/src/coreclr/src/vm/gdbjithelpers.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: gdbjithelpers.h // diff --git a/src/coreclr/src/vm/genericdict.cpp b/src/coreclr/src/vm/genericdict.cpp index 3428a417cde9..b378f9225792 100644 --- a/src/coreclr/src/vm/genericdict.cpp +++ b/src/coreclr/src/vm/genericdict.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: genericdict.cpp // diff --git a/src/coreclr/src/vm/genericdict.h b/src/coreclr/src/vm/genericdict.h index 37f8d6a44ffc..8637144466d6 100644 --- a/src/coreclr/src/vm/genericdict.h +++ b/src/coreclr/src/vm/genericdict.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: genericdict.h // diff --git a/src/coreclr/src/vm/generics.cpp b/src/coreclr/src/vm/generics.cpp index 32450ca84f0b..4e95b52f009e 100644 --- a/src/coreclr/src/vm/generics.cpp +++ b/src/coreclr/src/vm/generics.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: generics.cpp // diff --git a/src/coreclr/src/vm/generics.h b/src/coreclr/src/vm/generics.h index 55f4e6a067c1..d7c51569246d 100644 --- a/src/coreclr/src/vm/generics.h +++ b/src/coreclr/src/vm/generics.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: generics.cpp // diff --git a/src/coreclr/src/vm/genmeth.cpp b/src/coreclr/src/vm/genmeth.cpp index e1de988d3ed9..80ffce4f34e9 100644 --- a/src/coreclr/src/vm/genmeth.cpp +++ b/src/coreclr/src/vm/genmeth.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // File: genmeth.cpp // // Most functionality for generic methods is put here diff --git a/src/coreclr/src/vm/gms.h b/src/coreclr/src/vm/gms.h index 9bd4c41ac592..be26cdf1be21 100644 --- a/src/coreclr/src/vm/gms.h +++ b/src/coreclr/src/vm/gms.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "gmscpu.h" diff --git a/src/coreclr/src/vm/h2inc.pl b/src/coreclr/src/vm/h2inc.pl index 9399a8ff5124..6d2e0c3e03dc 100644 --- a/src/coreclr/src/vm/h2inc.pl +++ b/src/coreclr/src/vm/h2inc.pl @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. # C to MASM include file translator # This is replacement for the deprecated h2inc tool that used to be part of VS. diff --git a/src/coreclr/src/vm/h2inc.ps1 b/src/coreclr/src/vm/h2inc.ps1 index b6bf29804923..f2c2c07f2658 100644 --- a/src/coreclr/src/vm/h2inc.ps1 +++ b/src/coreclr/src/vm/h2inc.ps1 @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. # C to MASM include file translator # This is replacement for the deprecated h2inc tool that used to be part of VS. diff --git a/src/coreclr/src/vm/hash.cpp b/src/coreclr/src/vm/hash.cpp index 9408753a5f8b..a6708d2188ec 100644 --- a/src/coreclr/src/vm/hash.cpp +++ b/src/coreclr/src/vm/hash.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ diff --git a/src/coreclr/src/vm/hash.h b/src/coreclr/src/vm/hash.h index 7d09307fde42..aa21cce63b36 100644 --- a/src/coreclr/src/vm/hash.h +++ b/src/coreclr/src/vm/hash.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++--------------------------------------------------------------------------------------- diff --git a/src/coreclr/src/vm/hillclimbing.cpp b/src/coreclr/src/vm/hillclimbing.cpp index f36808067461..0c6be1ec7213 100644 --- a/src/coreclr/src/vm/hillclimbing.cpp +++ b/src/coreclr/src/vm/hillclimbing.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //========================================================================= diff --git a/src/coreclr/src/vm/hillclimbing.h b/src/coreclr/src/vm/hillclimbing.h index 33382f551ec2..49bd023af113 100644 --- a/src/coreclr/src/vm/hillclimbing.h +++ b/src/coreclr/src/vm/hillclimbing.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //========================================================================= diff --git a/src/coreclr/src/vm/hosting.cpp b/src/coreclr/src/vm/hosting.cpp index c45862e8b10e..92ab9613ae67 100644 --- a/src/coreclr/src/vm/hosting.cpp +++ b/src/coreclr/src/vm/hosting.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // @@ -244,7 +243,6 @@ BOOL ClrVirtualProtect(LPVOID lpAddress, SIZE_T dwSize, DWORD flNewProtect, PDWO #define VirtualProtect(lpAddress, dwSize, flNewProtect, lpflOldProtect) Dont_Use_VirtualProtect(lpAddress, dwSize, flNewProtect, lpflOldProtect) #undef SleepEx -#undef Sleep DWORD ClrSleepEx(DWORD dwMilliseconds, BOOL bAlertable) { CONTRACTL @@ -265,25 +263,10 @@ DWORD ClrSleepEx(DWORD dwMilliseconds, BOOL bAlertable) } #define SleepEx(dwMilliseconds,bAlertable) \ Dont_Use_SleepEx(dwMilliseconds,bAlertable) -#define Sleep(a) Dont_Use_Sleep(a) // non-zero return value if this function causes the OS to switch to another thread // See file:spinlock.h#SwitchToThreadSpinning for an explanation of dwSwitchCount BOOL __SwitchToThread (DWORD dwSleepMSec, DWORD dwSwitchCount) -{ - CONTRACTL - { - NOTHROW; - GC_NOTRIGGER; - MODE_ANY; - } - CONTRACTL_END; - - return __DangerousSwitchToThread(dwSleepMSec, dwSwitchCount, FALSE); -} - -#undef SleepEx -BOOL __DangerousSwitchToThread (DWORD dwSleepMSec, DWORD dwSwitchCount, BOOL goThroughOS) { // If you sleep for a long time, the thread should be in Preemptive GC mode. CONTRACTL @@ -297,14 +280,7 @@ BOOL __DangerousSwitchToThread (DWORD dwSleepMSec, DWORD dwSwitchCount, BOOL goT if (dwSleepMSec > 0) { - // when called with goThroughOS make sure to not call into the host. This function - // may be called from GetRuntimeFunctionCallback() which is called by the OS to determine - // the personality routine when it needs to unwind managed code off the stack. when this - // happens in the context of an SO we want to avoid calling into the host - if (goThroughOS) - ::SleepEx(dwSleepMSec, FALSE); - else - ClrSleepEx(dwSleepMSec,FALSE); + ClrSleepEx(dwSleepMSec,FALSE); return TRUE; } @@ -331,18 +307,11 @@ BOOL __DangerousSwitchToThread (DWORD dwSleepMSec, DWORD dwSwitchCount, BOOL goT _ASSERTE(CALLER_LIMITS_SPINNING < SLEEP_START_THRESHOLD); if (dwSwitchCount >= SLEEP_START_THRESHOLD) { - if (goThroughOS) - ::SleepEx(1, FALSE); - else - ClrSleepEx(1, FALSE); + ClrSleepEx(1, FALSE); } - { - return SwitchToThread(); - } + return SwitchToThread(); } -#define SleepEx(dwMilliseconds,bAlertable) \ - Dont_Use_SleepEx(dwMilliseconds,bAlertable) // Locking routines supplied by the EE to the other DLLs of the CLR. In a _DEBUG // build of the EE, we poison the Crst as a poor man's attempt to do some argument diff --git a/src/coreclr/src/vm/i386/AsmMacros.inc b/src/coreclr/src/vm/i386/AsmMacros.inc index a27a74635699..6b9eb6eb3fae 100644 --- a/src/coreclr/src/vm/i386/AsmMacros.inc +++ b/src/coreclr/src/vm/i386/AsmMacros.inc @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ; ; Define macros to build unwind data for prologues. diff --git a/src/coreclr/src/vm/i386/PInvokeStubs.asm b/src/coreclr/src/vm/i386/PInvokeStubs.asm index 6b7558ceb7c8..6f9ec4526a7e 100644 --- a/src/coreclr/src/vm/i386/PInvokeStubs.asm +++ b/src/coreclr/src/vm/i386/PInvokeStubs.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ; *********************************************************************** ; File: PInvokeStubs.asm diff --git a/src/coreclr/src/vm/i386/RedirectedHandledJITCase.asm b/src/coreclr/src/vm/i386/RedirectedHandledJITCase.asm index 11ebcd521d3d..0895954e4c52 100644 --- a/src/coreclr/src/vm/i386/RedirectedHandledJITCase.asm +++ b/src/coreclr/src/vm/i386/RedirectedHandledJITCase.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ; ==++== ; diff --git a/src/coreclr/src/vm/i386/asmconstants.h b/src/coreclr/src/vm/i386/asmconstants.h index 34e2da58f4be..53813933150e 100644 --- a/src/coreclr/src/vm/i386/asmconstants.h +++ b/src/coreclr/src/vm/i386/asmconstants.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // asmconstants.h - // // This header defines field offsets and constants used by assembly code diff --git a/src/coreclr/src/vm/i386/asmhelpers.S b/src/coreclr/src/vm/i386/asmhelpers.S index 7ed9d6bd3512..f6b016cbe410 100644 --- a/src/coreclr/src/vm/i386/asmhelpers.S +++ b/src/coreclr/src/vm/i386/asmhelpers.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. .intel_syntax noprefix #include "unixasmmacros.inc" diff --git a/src/coreclr/src/vm/i386/asmhelpers.asm b/src/coreclr/src/vm/i386/asmhelpers.asm index 5dcb484b673e..81794312dca6 100644 --- a/src/coreclr/src/vm/i386/asmhelpers.asm +++ b/src/coreclr/src/vm/i386/asmhelpers.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ; ==++== ; diff --git a/src/coreclr/src/vm/i386/cgencpu.h b/src/coreclr/src/vm/i386/cgencpu.h index 3ab93a7eca42..0fb8b70deb22 100644 --- a/src/coreclr/src/vm/i386/cgencpu.h +++ b/src/coreclr/src/vm/i386/cgencpu.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // CGENX86.H - // // Various helper routines for generating x86 assembly code. diff --git a/src/coreclr/src/vm/i386/cgenx86.cpp b/src/coreclr/src/vm/i386/cgenx86.cpp index 887b24e9ad29..58cbf0ffa001 100644 --- a/src/coreclr/src/vm/i386/cgenx86.cpp +++ b/src/coreclr/src/vm/i386/cgenx86.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // CGENX86.CPP - // // Various helper routines for generating x86 assembly code. diff --git a/src/coreclr/src/vm/i386/ehhelpers.S b/src/coreclr/src/vm/i386/ehhelpers.S index 7516db501954..3b65e1b384d9 100644 --- a/src/coreclr/src/vm/i386/ehhelpers.S +++ b/src/coreclr/src/vm/i386/ehhelpers.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. .intel_syntax noprefix #include "unixasmmacros.inc" diff --git a/src/coreclr/src/vm/i386/excepcpu.h b/src/coreclr/src/vm/i386/excepcpu.h index 10004e6ffd42..4e8418303041 100644 --- a/src/coreclr/src/vm/i386/excepcpu.h +++ b/src/coreclr/src/vm/i386/excepcpu.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/i386/excepx86.cpp b/src/coreclr/src/vm/i386/excepx86.cpp index a89e71595669..32ea9f08b276 100644 --- a/src/coreclr/src/vm/i386/excepx86.cpp +++ b/src/coreclr/src/vm/i386/excepx86.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/i386/gmsasm.S b/src/coreclr/src/vm/i386/gmsasm.S index 1e43fd281f3b..30871cdf5f08 100644 --- a/src/coreclr/src/vm/i386/gmsasm.S +++ b/src/coreclr/src/vm/i386/gmsasm.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. .intel_syntax noprefix #include "unixasmmacros.inc" diff --git a/src/coreclr/src/vm/i386/gmsasm.asm b/src/coreclr/src/vm/i386/gmsasm.asm index 73cd240232e1..79f15993920b 100644 --- a/src/coreclr/src/vm/i386/gmsasm.asm +++ b/src/coreclr/src/vm/i386/gmsasm.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ; ==++== ; diff --git a/src/coreclr/src/vm/i386/gmscpu.h b/src/coreclr/src/vm/i386/gmscpu.h index c4ecb8de8b10..4f8535c93897 100644 --- a/src/coreclr/src/vm/i386/gmscpu.h +++ b/src/coreclr/src/vm/i386/gmscpu.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /**************************************************************/ /* gmscpu.h */ diff --git a/src/coreclr/src/vm/i386/gmsx86.cpp b/src/coreclr/src/vm/i386/gmsx86.cpp index ccb54a0150be..de27dca090e4 100644 --- a/src/coreclr/src/vm/i386/gmsx86.cpp +++ b/src/coreclr/src/vm/i386/gmsx86.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /**************************************************************/ /* gmsx86.cpp */ diff --git a/src/coreclr/src/vm/i386/jithelp.S b/src/coreclr/src/vm/i386/jithelp.S index cbcb7c72ada0..435b22ba4f24 100644 --- a/src/coreclr/src/vm/i386/jithelp.S +++ b/src/coreclr/src/vm/i386/jithelp.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. .intel_syntax noprefix #include "unixasmmacros.inc" diff --git a/src/coreclr/src/vm/i386/jithelp.asm b/src/coreclr/src/vm/i386/jithelp.asm index cf70b4c70d1e..0d013a6724bf 100644 --- a/src/coreclr/src/vm/i386/jithelp.asm +++ b/src/coreclr/src/vm/i386/jithelp.asm @@ -1,6 +1,5 @@ ; Licensed to the .NET Foundation under one or more agreements. ; The .NET Foundation licenses this file to you under the MIT license. -; See the LICENSE file in the project root for more information. ; *********************************************************************** ; File: JIThelp.asm diff --git a/src/coreclr/src/vm/i386/jitinterfacex86.cpp b/src/coreclr/src/vm/i386/jitinterfacex86.cpp index 72c97096e17c..4cba1165bff3 100644 --- a/src/coreclr/src/vm/i386/jitinterfacex86.cpp +++ b/src/coreclr/src/vm/i386/jitinterfacex86.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: JITinterfaceX86.CPP // diff --git a/src/coreclr/src/vm/i386/pinvokestubs.S b/src/coreclr/src/vm/i386/pinvokestubs.S index d556ae8a9f12..e9c99b7eab0a 100644 --- a/src/coreclr/src/vm/i386/pinvokestubs.S +++ b/src/coreclr/src/vm/i386/pinvokestubs.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. .intel_syntax noprefix #include "unixasmmacros.inc" diff --git a/src/coreclr/src/vm/i386/profiler.cpp b/src/coreclr/src/vm/i386/profiler.cpp index d623be7746a9..9f48cc166336 100644 --- a/src/coreclr/src/vm/i386/profiler.cpp +++ b/src/coreclr/src/vm/i386/profiler.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // FILE: profiler.cpp // diff --git a/src/coreclr/src/vm/i386/stublinkerx86.cpp b/src/coreclr/src/vm/i386/stublinkerx86.cpp index 5e801b4d704a..e6753a67a501 100644 --- a/src/coreclr/src/vm/i386/stublinkerx86.cpp +++ b/src/coreclr/src/vm/i386/stublinkerx86.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // NOTE on Frame Size C_ASSERT usage in this file diff --git a/src/coreclr/src/vm/i386/stublinkerx86.h b/src/coreclr/src/vm/i386/stublinkerx86.h index 23ab0c40ca57..e8730c2725bf 100644 --- a/src/coreclr/src/vm/i386/stublinkerx86.h +++ b/src/coreclr/src/vm/i386/stublinkerx86.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef STUBLINKERX86_H_ #define STUBLINKERX86_H_ diff --git a/src/coreclr/src/vm/i386/umthunkstub.S b/src/coreclr/src/vm/i386/umthunkstub.S index a88fbefcf168..d24493ea0de3 100644 --- a/src/coreclr/src/vm/i386/umthunkstub.S +++ b/src/coreclr/src/vm/i386/umthunkstub.S @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. .intel_syntax noprefix #include "unixasmmacros.inc" diff --git a/src/coreclr/src/vm/i386/unixstubs.cpp b/src/coreclr/src/vm/i386/unixstubs.cpp index 81674766e80e..eb6844e1b038 100644 --- a/src/coreclr/src/vm/i386/unixstubs.cpp +++ b/src/coreclr/src/vm/i386/unixstubs.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" diff --git a/src/coreclr/src/vm/i386/virtualcallstubcpu.hpp b/src/coreclr/src/vm/i386/virtualcallstubcpu.hpp index f8e498236028..38680e402d64 100644 --- a/src/coreclr/src/vm/i386/virtualcallstubcpu.hpp +++ b/src/coreclr/src/vm/i386/virtualcallstubcpu.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: virtualcallstubcpu.hpp // diff --git a/src/coreclr/src/vm/ibclogger.cpp b/src/coreclr/src/vm/ibclogger.cpp index c4b0fd79d0f6..eded1487a20d 100644 --- a/src/coreclr/src/vm/ibclogger.cpp +++ b/src/coreclr/src/vm/ibclogger.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // IBClogger.CPP // diff --git a/src/coreclr/src/vm/ibclogger.h b/src/coreclr/src/vm/ibclogger.h index ded80e84c11e..bde07e9f22a0 100644 --- a/src/coreclr/src/vm/ibclogger.h +++ b/src/coreclr/src/vm/ibclogger.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // IBClogger.H // diff --git a/src/coreclr/src/vm/ildump.h b/src/coreclr/src/vm/ildump.h index 710d6b89cca1..86a028355bde 100644 --- a/src/coreclr/src/vm/ildump.h +++ b/src/coreclr/src/vm/ildump.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #define ILDUMP_VOID BYTE diff --git a/src/coreclr/src/vm/ilinstrumentation.cpp b/src/coreclr/src/vm/ilinstrumentation.cpp index e6f6d3397c68..ca109637448c 100644 --- a/src/coreclr/src/vm/ilinstrumentation.cpp +++ b/src/coreclr/src/vm/ilinstrumentation.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: ILInstrumentation.cpp // diff --git a/src/coreclr/src/vm/ilinstrumentation.h b/src/coreclr/src/vm/ilinstrumentation.h index 995e8ccb70c6..d6725cc5b237 100644 --- a/src/coreclr/src/vm/ilinstrumentation.h +++ b/src/coreclr/src/vm/ilinstrumentation.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: ILInstrumentation.h // diff --git a/src/coreclr/src/vm/ilmarshalers.cpp b/src/coreclr/src/vm/ilmarshalers.cpp index b7aaa3ce87e4..4905061335ca 100644 --- a/src/coreclr/src/vm/ilmarshalers.cpp +++ b/src/coreclr/src/vm/ilmarshalers.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: ILMarshalers.cpp // @@ -3666,7 +3665,8 @@ void ILAsAnyMarshalerBase::EmitCreateMngdMarshaler(ILCodeStream* pslILEmit) m_dwMngdMarshalerLocalNum = pslILEmit->NewLocal(marshalerType); DWORD dwTmpLocalNum = pslILEmit->NewLocal(ELEMENT_TYPE_I); - pslILEmit->EmitLDC(sizeof(MngdNativeArrayMarshaler)); + _ASSERTE(sizeof(MngdNativeArrayMarshaler) == sizeof(void*) * 3 + 16); + pslILEmit->EmitLDC(TARGET_POINTER_SIZE * 3 + 16); // sizeof(MngdNativeArrayMarshaler) pslILEmit->EmitLOCALLOC(); pslILEmit->EmitSTLOC(dwTmpLocalNum); @@ -3763,7 +3763,8 @@ void ILNativeArrayMarshaler::EmitCreateMngdMarshaler(ILCodeStream* pslILEmit) m_dwMngdMarshalerLocalNum = pslILEmit->NewLocal(ELEMENT_TYPE_I); - pslILEmit->EmitLDC(sizeof(MngdNativeArrayMarshaler)); + _ASSERTE(sizeof(MngdNativeArrayMarshaler) == sizeof(void*) * 3 + 16); + pslILEmit->EmitLDC(TARGET_POINTER_SIZE * 3 + 16); // sizeof(MngdNativeArrayMarshaler) pslILEmit->EmitLOCALLOC(); pslILEmit->EmitSTLOC(m_dwMngdMarshalerLocalNum); @@ -4379,7 +4380,8 @@ void ILFixedArrayMarshaler::EmitCreateMngdMarshaler(ILCodeStream* pslILEmit) m_dwMngdMarshalerLocalNum = pslILEmit->NewLocal(ELEMENT_TYPE_I); - pslILEmit->EmitLDC(sizeof(MngdFixedArrayMarshaler)); + _ASSERTE(sizeof(MngdFixedArrayMarshaler) == sizeof(void*) * 4 + 16); + pslILEmit->EmitLDC(TARGET_POINTER_SIZE * 4 + 16); // sizeof(MngdFixedArrayMarshaler) pslILEmit->EmitLOCALLOC(); pslILEmit->EmitSTLOC(m_dwMngdMarshalerLocalNum); @@ -4606,7 +4608,8 @@ void ILSafeArrayMarshaler::EmitCreateMngdMarshaler(ILCodeStream* pslILEmit) m_dwMngdMarshalerLocalNum = pslILEmit->NewLocal(ELEMENT_TYPE_I); - pslILEmit->EmitLDC(sizeof(MngdSafeArrayMarshaler)); + _ASSERTE(sizeof(MngdSafeArrayMarshaler) == sizeof(void*) * 2 + 8); + pslILEmit->EmitLDC(TARGET_POINTER_SIZE * 2 + 8); // sizeof(MngdSafeArrayMarshaler) pslILEmit->EmitLOCALLOC(); pslILEmit->EmitSTLOC(m_dwMngdMarshalerLocalNum); @@ -4902,7 +4905,8 @@ void ILReferenceCustomMarshaler::EmitCreateMngdMarshaler(ILCodeStream* pslILEmit m_dwMngdMarshalerLocalNum = pslILEmit->NewLocal(ELEMENT_TYPE_I); - pslILEmit->EmitLDC(sizeof(MngdRefCustomMarshaler)); + _ASSERTE(sizeof(MngdRefCustomMarshaler) == sizeof(void*)); + pslILEmit->EmitLDC(TARGET_POINTER_SIZE); // sizeof(MngdRefCustomMarshaler) pslILEmit->EmitLOCALLOC(); pslILEmit->EmitSTLOC(m_dwMngdMarshalerLocalNum); diff --git a/src/coreclr/src/vm/ilmarshalers.h b/src/coreclr/src/vm/ilmarshalers.h index 3aae504fe8c9..be1e23e37ccf 100644 --- a/src/coreclr/src/vm/ilmarshalers.h +++ b/src/coreclr/src/vm/ilmarshalers.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: ILMarshalers.h // @@ -1721,15 +1720,14 @@ class ILCopyMarshalerBase : public ILMarshaler } }; -template +template class ILCopyMarshalerSimple : public ILCopyMarshalerBase { public: enum { c_fInOnly = TRUE, - c_nativeSize = sizeof(PROMOTED_ELEMENT), - c_CLRSize = sizeof(PROMOTED_ELEMENT), + c_nativeSize = NATIVE_SIZE, }; bool IsSmallValueTypeSpecialCase() @@ -1741,11 +1739,11 @@ class ILCopyMarshalerSimple : public ILCopyMarshalerBase // return (ELEMENT_TYPE == -#ifdef HOST_64BIT +#ifdef TARGET_64BIT ELEMENT_TYPE_I8 -#else // HOST_64BIT +#else // TARGET_64BIT ELEMENT_TYPE_I4 -#endif // HOST_64BIT +#endif // TARGET_64BIT ) && (NULL != m_pargs->m_pMT); } @@ -1868,15 +1866,15 @@ class ILCopyMarshalerSimple : public ILCopyMarshalerBase } }; -typedef ILCopyMarshalerSimple ILCopyMarshaler1; -typedef ILCopyMarshalerSimple ILCopyMarshalerU1; -typedef ILCopyMarshalerSimple ILCopyMarshaler2; -typedef ILCopyMarshalerSimple ILCopyMarshalerU2; -typedef ILCopyMarshalerSimple ILCopyMarshaler4; -typedef ILCopyMarshalerSimple ILCopyMarshalerU4; -typedef ILCopyMarshalerSimple ILCopyMarshaler8; -typedef ILCopyMarshalerSimple ILFloatMarshaler; -typedef ILCopyMarshalerSimple ILDoubleMarshaler; +typedef ILCopyMarshalerSimple ILCopyMarshaler1; +typedef ILCopyMarshalerSimple ILCopyMarshalerU1; +typedef ILCopyMarshalerSimple ILCopyMarshaler2; +typedef ILCopyMarshalerSimple ILCopyMarshalerU2; +typedef ILCopyMarshalerSimple ILCopyMarshaler4; +typedef ILCopyMarshalerSimple ILCopyMarshalerU4; +typedef ILCopyMarshalerSimple ILCopyMarshaler8; +typedef ILCopyMarshalerSimple ILFloatMarshaler; +typedef ILCopyMarshalerSimple ILDoubleMarshaler; template class ILCopyMarshalerKnownStruct : public ILCopyMarshalerBase @@ -1886,7 +1884,6 @@ class ILCopyMarshalerKnownStruct : public ILCopyMarshalerBase { c_fInOnly = TRUE, c_nativeSize = sizeof(PROMOTED_ELEMENT), - c_CLRSize = sizeof(PROMOTED_ELEMENT), }; virtual void EmitReInitNative(ILCodeStream* pslILEmit) @@ -1915,7 +1912,6 @@ class ILBlittableValueClassMarshaler : public ILCopyMarshalerBase { c_fInOnly = TRUE, c_nativeSize = VARIABLESIZE, - c_CLRSize = VARIABLESIZE, }; virtual void EmitReInitNative(ILCodeStream* pslILEmit) @@ -1941,8 +1937,7 @@ class ILDelegateMarshaler : public ILMarshaler enum { c_fInOnly = TRUE, - c_nativeSize = sizeof(void *), - c_CLRSize = sizeof(OBJECTREF), + c_nativeSize = TARGET_POINTER_SIZE, }; protected: @@ -1958,8 +1953,7 @@ class ILReflectionObjectMarshaler : public ILMarshaler enum { c_fInOnly = TRUE, - c_nativeSize = sizeof(void *), - c_CLRSize = sizeof(OBJECTREF), + c_nativeSize = TARGET_POINTER_SIZE, }; protected: @@ -2035,7 +2029,6 @@ class ILWinBoolMarshaler : public ILBoolMarshaler { c_fInOnly = TRUE, c_nativeSize = sizeof(BOOL), - c_CLRSize = sizeof(INT8), }; protected: @@ -2065,7 +2058,6 @@ class ILCBoolMarshaler : public ILBoolMarshaler { c_fInOnly = TRUE, c_nativeSize = sizeof(BYTE), - c_CLRSize = sizeof(INT8), }; protected: @@ -2096,7 +2088,6 @@ class ILVtBoolMarshaler : public ILBoolMarshaler { c_fInOnly = TRUE, c_nativeSize = sizeof(VARIANT_BOOL), - c_CLRSize = sizeof(INT8), }; protected: @@ -2147,8 +2138,7 @@ class ILUTF8BufferMarshaler : public ILOptimizedAllocMarshaler enum { c_fInOnly = FALSE, - c_nativeSize = sizeof(void *), - c_CLRSize = sizeof(OBJECTREF), + c_nativeSize = TARGET_POINTER_SIZE, }; enum @@ -2176,8 +2166,7 @@ class ILWSTRBufferMarshaler : public ILOptimizedAllocMarshaler enum { c_fInOnly = FALSE, - c_nativeSize = sizeof(void *), - c_CLRSize = sizeof(OBJECTREF), + c_nativeSize = TARGET_POINTER_SIZE, }; enum @@ -2205,8 +2194,7 @@ class ILCSTRBufferMarshaler : public ILOptimizedAllocMarshaler enum { c_fInOnly = FALSE, - c_nativeSize = sizeof(void *), - c_CLRSize = sizeof(OBJECTREF), + c_nativeSize = TARGET_POINTER_SIZE, }; enum @@ -2242,8 +2230,7 @@ class ILHandleRefMarshaler : public ILMarshaler enum { c_fInOnly = FALSE, - c_nativeSize = sizeof(LPVOID), - c_CLRSize = sizeof(HANDLEREF), + c_nativeSize = TARGET_POINTER_SIZE, }; LocalDesc GetManagedType() @@ -2287,8 +2274,7 @@ class ILSafeHandleMarshaler : public ILMarshaler enum { c_fInOnly = FALSE, - c_nativeSize = sizeof(LPVOID), - c_CLRSize = sizeof(SAFEHANDLE), + c_nativeSize = TARGET_POINTER_SIZE, }; LocalDesc GetManagedType() override @@ -2330,8 +2316,7 @@ class ILCriticalHandleMarshaler : public ILMarshaler enum { c_fInOnly = FALSE, - c_nativeSize = sizeof(LPVOID), - c_CLRSize = sizeof(CRITICALHANDLE), + c_nativeSize = TARGET_POINTER_SIZE, }; public: @@ -2375,7 +2360,6 @@ class ILValueClassMarshaler : public ILMarshaler { c_fInOnly = TRUE, c_nativeSize = VARIABLESIZE, - c_CLRSize = VARIABLESIZE, }; protected: @@ -2395,8 +2379,7 @@ class ILObjectMarshaler : public ILMarshaler enum { c_fInOnly = TRUE, - c_CLRSize = sizeof(OBJECTREF), - c_nativeSize = sizeof(VARIANT), + c_nativeSize = TARGET_POINTER_SIZE * 2 + 8, // sizeof(VARIANT) }; protected: @@ -2417,7 +2400,6 @@ class ILDateMarshaler : public ILMarshaler { c_fInOnly = TRUE, c_nativeSize = sizeof(DATE), - c_CLRSize = sizeof(INT64), }; protected: @@ -2436,7 +2418,6 @@ class ILCurrencyMarshaler : public ILMarshaler { c_fInOnly = TRUE, c_nativeSize = sizeof(CURRENCY), - c_CLRSize = sizeof(DECIMAL), }; protected: @@ -2455,8 +2436,7 @@ class ILInterfaceMarshaler : public ILMarshaler enum { c_fInOnly = TRUE, - c_nativeSize = sizeof(void *), - c_CLRSize = sizeof(OBJECTREF), + c_nativeSize = TARGET_POINTER_SIZE, }; protected: @@ -2477,7 +2457,6 @@ class ILAnsiCharMarshaler : public ILMarshaler { c_fInOnly = TRUE, c_nativeSize = sizeof(UINT8), - c_CLRSize = sizeof(UINT16), }; protected: @@ -2495,8 +2474,7 @@ class ILValueClassPtrMarshaler : public ILMarshaler enum { c_fInOnly = TRUE, - c_nativeSize = sizeof(ELEMENT *), - c_CLRSize = sizeof(ELEMENT), + c_nativeSize = TARGET_POINTER_SIZE, }; bool SupportsFieldMarshal(UINT* pErrorResID) override @@ -2611,7 +2589,6 @@ class ILOleColorMarshaler : public ILMarshaler { c_fInOnly = TRUE, c_nativeSize = sizeof(OLE_COLOR), - c_CLRSize = sizeof(SYSTEMCOLOR), }; protected: @@ -2627,8 +2604,7 @@ class ILVBByValStrWMarshaler : public ILMarshaler enum { c_fInOnly = FALSE, - c_nativeSize = sizeof(BSTR), - c_CLRSize = sizeof(OBJECTREF*), + c_nativeSize = TARGET_POINTER_SIZE, }; enum @@ -2668,8 +2644,7 @@ class ILVBByValStrMarshaler : public ILMarshaler enum { c_fInOnly = FALSE, - c_nativeSize = sizeof(LPSTR), - c_CLRSize = sizeof(OBJECTREF *), + c_nativeSize = TARGET_POINTER_SIZE, }; ILVBByValStrMarshaler() : @@ -2701,8 +2676,7 @@ class ILCUTF8Marshaler : public ILOptimizedAllocMarshaler enum { c_fInOnly = TRUE, - c_nativeSize = sizeof(void *), - c_CLRSize = sizeof(OBJECTREF), + c_nativeSize = TARGET_POINTER_SIZE, }; enum @@ -2729,8 +2703,7 @@ class ILWSTRMarshaler : public ILOptimizedAllocMarshaler enum { c_fInOnly = FALSE, - c_nativeSize = sizeof(void *), - c_CLRSize = sizeof(OBJECTREF), + c_nativeSize = TARGET_POINTER_SIZE, }; enum @@ -2786,8 +2759,7 @@ class ILCSTRMarshaler : public ILOptimizedAllocMarshaler enum { c_fInOnly = TRUE, - c_nativeSize = sizeof(void *), - c_CLRSize = sizeof(OBJECTREF), + c_nativeSize = TARGET_POINTER_SIZE, }; enum @@ -2814,8 +2786,7 @@ class ILBSTRMarshaler : public ILOptimizedAllocMarshaler enum { c_fInOnly = TRUE, - c_nativeSize = sizeof(void *), - c_CLRSize = sizeof(OBJECTREF), + c_nativeSize = TARGET_POINTER_SIZE, }; enum @@ -2842,8 +2813,7 @@ class ILAnsiBSTRMarshaler : public ILMarshaler enum { c_fInOnly = TRUE, - c_nativeSize = sizeof(void *), - c_CLRSize = sizeof(OBJECTREF), + c_nativeSize = TARGET_POINTER_SIZE, }; protected: @@ -2862,7 +2832,6 @@ class ILFixedWSTRMarshaler : public ILMarshaler { c_fInOnly = FALSE, c_nativeSize = VARIABLESIZE, - c_CLRSize = sizeof(OBJECTREF) }; bool SupportsArgumentMarshal(DWORD dwMarshalFlags, UINT* pErrorResID) override @@ -2899,7 +2868,6 @@ class ILFixedCSTRMarshaler : public ILMarshaler { c_fInOnly = FALSE, c_nativeSize = VARIABLESIZE, - c_CLRSize = sizeof(OBJECTREF) }; bool SupportsArgumentMarshal(DWORD dwMarshalFlags, UINT* pErrorResID) override @@ -2934,8 +2902,7 @@ class ILLayoutClassPtrMarshalerBase : public ILMarshaler public: enum { - c_nativeSize = sizeof(void *), - c_CLRSize = sizeof(OBJECTREF), + c_nativeSize = TARGET_POINTER_SIZE, }; protected: @@ -2987,7 +2954,6 @@ class ILLayoutClassMarshaler : public ILMarshaler { c_fInOnly = FALSE, c_nativeSize = VARIABLESIZE, - c_CLRSize = sizeof(OBJECTREF), }; LocalDesc GetNativeType() override @@ -3018,7 +2984,6 @@ class ILBlittableLayoutClassMarshaler : public ILMarshaler { c_fInOnly = FALSE, c_nativeSize = VARIABLESIZE, - c_CLRSize = sizeof(OBJECTREF), }; LocalDesc GetNativeType() override @@ -3043,7 +3008,6 @@ class ILBlittableValueClassWithCopyCtorMarshaler : public ILMarshaler { c_fInOnly = TRUE, c_nativeSize = VARIABLESIZE, - c_CLRSize = sizeof(OBJECTREF), }; LocalDesc GetManagedType() @@ -3077,8 +3041,11 @@ class ILArgIteratorMarshaler : public ILMarshaler enum { c_fInOnly = TRUE, - c_nativeSize = sizeof(va_list), - c_CLRSize = sizeof(VARARGS), +#ifdef TARGET_64BIT + c_nativeSize = 24, // sizeof(va_list) +#else + c_nativeSize = 4, // sizeof(va_list) +#endif }; protected: @@ -3098,8 +3065,7 @@ class ILArrayWithOffsetMarshaler : public ILMarshaler enum { c_fInOnly = FALSE, - c_nativeSize = sizeof(LPVOID), - c_CLRSize = sizeof(ArrayWithOffsetData), + c_nativeSize = TARGET_POINTER_SIZE, }; ILArrayWithOffsetMarshaler() : @@ -3130,8 +3096,7 @@ class ILAsAnyMarshalerBase : public ILMarshaler public: enum { - c_nativeSize = sizeof(void *), - c_CLRSize = sizeof(OBJECTREF), + c_nativeSize = TARGET_POINTER_SIZE, }; protected: @@ -3217,8 +3182,7 @@ class ILMngdMarshaler : public ILMarshaler public: enum { - c_nativeSize = sizeof(void *), - c_CLRSize = sizeof(OBJECTREF), + c_nativeSize = TARGET_POINTER_SIZE, }; ILMngdMarshaler(BinderMethodID space2Man, @@ -3587,7 +3551,6 @@ class MngdSafeArrayMarshaler }; #endif // FEATURE_COMINTEROP - class ILReferenceCustomMarshaler : public ILMngdMarshaler { public: diff --git a/src/coreclr/src/vm/ilstubcache.cpp b/src/coreclr/src/vm/ilstubcache.cpp index 8ab1ea8aad97..fb9e0ea1eaf3 100644 --- a/src/coreclr/src/vm/ilstubcache.cpp +++ b/src/coreclr/src/vm/ilstubcache.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: ILStubCache.cpp // @@ -257,11 +256,6 @@ MethodDesc* ILStubCache::CreateNewMethodDesc(LoaderHeap* pCreationHeap, MethodTa pMD->GetILStubResolver()->SetStubType(ILStubResolver::TailCallCallTargetStub); } else - if (SF_IsTailCallDispatcherStub(dwStubFlags)) - { - pMD->GetILStubResolver()->SetStubType(ILStubResolver::TailCallDispatcherStub); - } - else #ifdef FEATURE_COMINTEROP if (SF_IsCOMStub(dwStubFlags)) { diff --git a/src/coreclr/src/vm/ilstubcache.h b/src/coreclr/src/vm/ilstubcache.h index 54912f936260..29fc4fc5ae4d 100644 --- a/src/coreclr/src/vm/ilstubcache.h +++ b/src/coreclr/src/vm/ilstubcache.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: ILStubCache.h // diff --git a/src/coreclr/src/vm/ilstubresolver.cpp b/src/coreclr/src/vm/ilstubresolver.cpp index 7e3650d54fcc..2df8f543e9e7 100644 --- a/src/coreclr/src/vm/ilstubresolver.cpp +++ b/src/coreclr/src/vm/ilstubresolver.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: ILStubResolver.cpp // @@ -89,7 +88,6 @@ LPCUTF8 ILStubResolver::GetStubMethodName() case WrapperDelegateStub: return "IL_STUB_WrapperDelegate_Invoke"; case TailCallStoreArgsStub: return "IL_STUB_StoreTailCallArgs"; case TailCallCallTargetStub: return "IL_STUB_CallTailCallTarget"; - case TailCallDispatcherStub: return "IL_STUB_DispatchTailCalls"; default: UNREACHABLE_MSG("Unknown stub type"); } diff --git a/src/coreclr/src/vm/ilstubresolver.h b/src/coreclr/src/vm/ilstubresolver.h index 88b6c812b804..b60721d2541b 100644 --- a/src/coreclr/src/vm/ilstubresolver.h +++ b/src/coreclr/src/vm/ilstubresolver.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: ILStubResolver.h // @@ -94,7 +93,6 @@ class ILStubResolver : DynamicResolver #endif TailCallStoreArgsStub, TailCallCallTargetStub, - TailCallDispatcherStub, }; ILStubType GetStubType(); diff --git a/src/coreclr/src/vm/inlinetracking.cpp b/src/coreclr/src/vm/inlinetracking.cpp index 6e80dd74dfff..e83e52903c91 100644 --- a/src/coreclr/src/vm/inlinetracking.cpp +++ b/src/coreclr/src/vm/inlinetracking.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================================================= // Code for tracking method inlinings in NGen and R2R images. // The only information stored is "who" got inlined "where", no offsets or inlining depth tracking. diff --git a/src/coreclr/src/vm/inlinetracking.h b/src/coreclr/src/vm/inlinetracking.h index 2fe8dc6fe320..586b63b12e43 100644 --- a/src/coreclr/src/vm/inlinetracking.h +++ b/src/coreclr/src/vm/inlinetracking.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================================================= // Definitions for tracking method inlinings in NGen and R2R images. // The only information stored is "who" got inlined "where", no offsets or inlining depth tracking. diff --git a/src/coreclr/src/vm/instmethhash.cpp b/src/coreclr/src/vm/instmethhash.cpp index 83dcb9d68b2a..0e2f19b69512 100644 --- a/src/coreclr/src/vm/instmethhash.cpp +++ b/src/coreclr/src/vm/instmethhash.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: instmethhash.cpp // diff --git a/src/coreclr/src/vm/instmethhash.h b/src/coreclr/src/vm/instmethhash.h index bebb144410e0..2a340122b9ff 100644 --- a/src/coreclr/src/vm/instmethhash.h +++ b/src/coreclr/src/vm/instmethhash.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: instmethhash.h // diff --git a/src/coreclr/src/vm/interopconverter.cpp b/src/coreclr/src/vm/interopconverter.cpp index e46864e7026b..30604d630f03 100644 --- a/src/coreclr/src/vm/interopconverter.cpp +++ b/src/coreclr/src/vm/interopconverter.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" diff --git a/src/coreclr/src/vm/interopconverter.h b/src/coreclr/src/vm/interopconverter.h index eca3f9192140..a9be3e62a2a2 100644 --- a/src/coreclr/src/vm/interopconverter.h +++ b/src/coreclr/src/vm/interopconverter.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _H_INTEROPCONVERTER_ diff --git a/src/coreclr/src/vm/interoplibinterface.cpp b/src/coreclr/src/vm/interoplibinterface.cpp index ffd8d4f65437..7c8ab4d1b6aa 100644 --- a/src/coreclr/src/vm/interoplibinterface.cpp +++ b/src/coreclr/src/vm/interoplibinterface.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // Runtime headers #include "common.h" diff --git a/src/coreclr/src/vm/interoplibinterface.h b/src/coreclr/src/vm/interoplibinterface.h index bae00fb0d461..a1f34e655753 100644 --- a/src/coreclr/src/vm/interoplibinterface.h +++ b/src/coreclr/src/vm/interoplibinterface.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // Interface between the VM and Interop library. diff --git a/src/coreclr/src/vm/interoputil.cpp b/src/coreclr/src/vm/interoputil.cpp index a2f6846b37a5..0a58c8144e7a 100644 --- a/src/coreclr/src/vm/interoputil.cpp +++ b/src/coreclr/src/vm/interoputil.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" @@ -1486,7 +1485,7 @@ VOID EnsureComStarted(BOOL fCoInitCurrentThread) // COM+ objects are now apartment agile), we only care that a CoInitializeEx // has been performed on this thread by us. if (fCoInitCurrentThread) - GetThread()->SetApartment(Thread::AS_InMTA, FALSE); + GetThread()->SetApartment(Thread::AS_InMTA); // set the finalizer event FinalizerThread::EnableFinalization(); @@ -1543,7 +1542,7 @@ BOOL ExtendsComImport(MethodTable* pMT) return pMT != NULL; } -#ifdef FEATURE_CLASSIC_COMINTEROP +#ifdef FEATURE_COMINTEROP //-------------------------------------------------------------------------------- // Gets the CLSID from the specified Prog ID. @@ -1559,13 +1558,9 @@ HRESULT GetCLSIDFromProgID(__in_z WCHAR *strProgId, GUID *pGuid) HRESULT hr = S_OK; -#ifdef FEATURE_CORESYSTEM return CLSIDFromProgID(strProgId, pGuid); -#else - return CLSIDFromProgIDEx(strProgId, pGuid); -#endif } -#endif // FEATURE_CLASSIC_COMINTEROP +#endif // FEATURE_COMINTEROP #include //-------------------------------------------------------------------------------- @@ -1881,11 +1876,11 @@ OBJECTREF AllocateComObject_ForManaged(MethodTable* pMT) } #endif // FEATURE_COMINTEROP_UNMANAGED_ACTIVATION -#ifdef FEATURE_CLASSIC_COMINTEROP +#ifdef FEATURE_COMINTEROP //--------------------------------------------------------------------------- // get/load type for a given clsid -MethodTable* GetTypeForCLSID(REFCLSID rclsid, BOOL* pfAssemblyInReg) +MethodTable* GetTypeForCLSID(REFCLSID rclsid) { CONTRACT (MethodTable*) { @@ -1896,18 +1891,8 @@ MethodTable* GetTypeForCLSID(REFCLSID rclsid, BOOL* pfAssemblyInReg) } CONTRACT_END; - AppDomain* pDomain = GetAppDomain(); - _ASSERTE(pDomain); - - // check to see if we have this class cached - MethodTable *pMT= pDomain->LookupClass(rclsid); - if (pMT == NULL) - { - pMT = pDomain->LoadCOMClass(rclsid, FALSE, pfAssemblyInReg); - if (pMT != NULL) - pDomain->InsertClassForCLSID(pMT, TRUE); - } - RETURN pMT; + // Not supported in .NET Core - requires typelib registration/generation + RETURN NULL; } @@ -1924,36 +1909,14 @@ MethodTable* GetValueTypeForGUID(REFCLSID guid) } CONTRACT_END; - AppDomain* pDomain = GetAppDomain(); - _ASSERTE(pDomain); - - // Check to see if we have this value class cached - MethodTable *pMT = pDomain->LookupClass(guid); - if (pMT == NULL) - pMT = pDomain->LoadCOMClass(guid, TRUE, NULL); - - if (pMT) - { - // Make sure the class is a value class. - if (!pMT->IsValueType()) - { - DefineFullyQualifiedNameForClassW(); - COMPlusThrow(kArgumentException, IDS_EE_GUID_REPRESENTS_NON_VC, - GetFullyQualifiedNameForClassNestedAwareW(pMT)); - } - - // Insert the type in our map from CLSID to method table. - pDomain->InsertClassForCLSID(pMT, TRUE); - } - - RETURN pMT; + // Not supported in .NET Core - requires typelib registration/generation + RETURN NULL; } -#endif // FEATURE_CLASSIC_COMINTEROP +#endif // FEATURE_COMINTEROP #endif //#ifndef CROSSGEN_COMPILE - //--------------------------------------------------------------------------- // This method returns the default interface for the class. DefaultInterfaceType GetDefaultInterfaceForClassInternal(TypeHandle hndClass, TypeHandle *pHndDefClass) @@ -3807,7 +3770,7 @@ void IUInvokeDispMethod( } } -#if defined(FEATURE_COMINTEROP_UNMANAGED_ACTIVATION) && defined(FEATURE_CLASSIC_COMINTEROP) +#if defined(FEATURE_COMINTEROP_UNMANAGED_ACTIVATION) && defined(FEATURE_COMINTEROP) void GetComClassHelper( _Out_ OBJECTREF *pRef, @@ -3901,7 +3864,6 @@ void GetComClassFromProgID(STRINGREF srefProgID, STRINGREF srefServer, OBJECTREF HRESULT hr = S_OK; MethodTable* pMT = NULL; CLSID clsid = {0}; - BOOL bServerIsLocal = (srefServer == NULL); // // Allocate strings for the ProgID and the server. @@ -3942,51 +3904,23 @@ void GetComClassFromProgID(STRINGREF srefProgID, STRINGREF srefServer, OBJECTREF COMPlusThrowHR(hr); // - // If no server name has been specified, see if we can find the well known - // managed class for this CLSID. + // See if we can find the well known managed class for this CLSID. // - if (bServerIsLocal) - { - BOOL fAssemblyInReg = FALSE; - // @TODO(DM): Do we really need to be this forgiving ? We should - // look into letting the type load exceptions percolate - // up to the user instead of swallowing them and using __ComObject. - EX_TRY - { - pMT = GetTypeForCLSID(clsid, &fAssemblyInReg); - } - EX_CATCH - { - } - EX_END_CATCH(RethrowTerminalExceptions) - } + // Check if we have in the hash. + OBJECTHANDLE hRef; + ClassFactoryInfo ClassFactInfo; + ClassFactInfo.m_clsid = clsid; + ClassFactInfo.m_strServerName = wszServer; + EEClassFactoryInfoHashTable *pClassFactHash = GetAppDomain()->GetClassFactHash(); - if (pMT != NULL) + if (pClassFactHash->GetValue(&ClassFactInfo, (HashDatum *)&hRef)) { - // - // There is a managed class for this ProgID. - // - - *pRef = pMT->GetManagedClassObject(); + *pRef = ObjectFromHandle(hRef); } else { - // Check if we have in the hash. - OBJECTHANDLE hRef; - ClassFactoryInfo ClassFactInfo; - ClassFactInfo.m_clsid = clsid; - ClassFactInfo.m_strServerName = wszServer; - EEClassFactoryInfoHashTable *pClassFactHash = GetAppDomain()->GetClassFactHash(); - - if (pClassFactHash->GetValue(&ClassFactInfo, (HashDatum *)&hRef)) - { - *pRef = ObjectFromHandle(hRef); - } - else - { - GetComClassHelper(pRef, pClassFactHash, &ClassFactInfo, wszProgID); - } + GetComClassHelper(pRef, pClassFactHash, &ClassFactInfo, wszProgID); } // If we made it this far *pRef better be set. @@ -4010,7 +3944,6 @@ void GetComClassFromCLSID(REFCLSID clsid, STRINGREF srefServer, OBJECTREF *pRef) NewArrayHolder wszServer; HRESULT hr = S_OK; MethodTable* pMT = NULL; - BOOL bServerIsLocal = (srefServer == NULL); // // Allocate strings for the server. @@ -4030,57 +3963,30 @@ void GetComClassFromCLSID(REFCLSID clsid, STRINGREF srefServer, OBJECTREF *pRef) // - // If no server name has been specified, see if we can find the well known - // managed class for this CLSID. + // See if we can find the well known managed class for this CLSID. // - if (bServerIsLocal) - { - // @TODO(DM): Do we really need to be this forgiving ? We should - // look into letting the type load exceptions percolate - // up to the user instead of swallowing them and using __ComObject. - EX_TRY - { - pMT = GetTypeForCLSID(clsid); - } - EX_CATCH - { - } - EX_END_CATCH(RethrowTerminalExceptions) - } + // Check if we have in the hash. + OBJECTHANDLE hRef; + ClassFactoryInfo ClassFactInfo; + ClassFactInfo.m_clsid = clsid; + ClassFactInfo.m_strServerName = wszServer; + EEClassFactoryInfoHashTable *pClassFactHash = GetAppDomain()->GetClassFactHash(); - if (pMT != NULL) + if (pClassFactHash->GetValue(&ClassFactInfo, (HashDatum*) &hRef)) { - // - // There is a managed class for this CLSID. - // - - *pRef = pMT->GetManagedClassObject(); + *pRef = ObjectFromHandle(hRef); } else { - // Check if we have in the hash. - OBJECTHANDLE hRef; - ClassFactoryInfo ClassFactInfo; - ClassFactInfo.m_clsid = clsid; - ClassFactInfo.m_strServerName = wszServer; - EEClassFactoryInfoHashTable *pClassFactHash = GetAppDomain()->GetClassFactHash(); - - if (pClassFactHash->GetValue(&ClassFactInfo, (HashDatum*) &hRef)) - { - *pRef = ObjectFromHandle(hRef); - } - else - { - GetComClassHelper(pRef, pClassFactHash, &ClassFactInfo, NULL); - } + GetComClassHelper(pRef, pClassFactHash, &ClassFactInfo, NULL); } // If we made it this far *pRef better be set. _ASSERTE(*pRef != NULL); } -#endif // FEATURE_COMINTEROP_UNMANAGED_ACTIVATION && FEATURE_CLASSIC_COMINTEROP +#endif // FEATURE_COMINTEROP_UNMANAGED_ACTIVATION && FEATURE_COMINTEROP #endif //#ifndef CROSSGEN_COMPILE @@ -4553,7 +4459,7 @@ void UnmarshalObjectFromInterface(OBJECTREF *ppObjectDest, IUnknown **ppUnkSrc, } } -#ifdef FEATURE_CLASSIC_COMINTEROP +#ifdef FEATURE_COMINTEROP //-------------------------------------------------------------------------------- // Check if the pUnk implements IProvideClassInfo and try to figure @@ -4611,45 +4517,8 @@ MethodTable* GetClassFromIProvideClassInfo(IUnknown* pUnk) RETURN pClassMT; } -#endif // FEATURE_CLASSIC_COMINTEROP - -static void DECLSPEC_NORETURN ThrowTypeLoadExceptionWithInner(MethodTable *pClassMT, LPCWSTR pwzName, HRESULT hr, unsigned resID) -{ - CONTRACTL - { - THROWS; - DISABLED(GC_NOTRIGGER); // Must sanitize first pass handling to enable this - MODE_ANY; - } - CONTRACTL_END; - - StackSString simpleName(SString::Utf8, pClassMT->GetAssembly()->GetSimpleName()); - - EEMessageException ex(hr); - EX_THROW_WITH_INNER(EETypeLoadException, (pwzName, simpleName.GetUnicode(), nullptr, resID), &ex); -} - -// -// Creates activation factory and wraps it with a RCW -// -void GetNativeWinRTFactoryObject(MethodTable *pMT, Thread *pThread, MethodTable *pFactoryIntfMT, BOOL bNeedUniqueRCW, ICOMInterfaceMarshalerCallback *pCallback, OBJECTREF *prefFactory) -{ - CONTRACTL - { - THROWS; - MODE_COOPERATIVE; - GC_TRIGGERS; - PRECONDITION(CheckPointer(pMT)); - PRECONDITION(CheckPointer(pThread)); - PRECONDITION(CheckPointer(pFactoryIntfMT, NULL_OK)); - PRECONDITION(CheckPointer(pCallback, NULL_OK)); - } - CONTRACTL_END; - - COMPlusThrow(kPlatformNotSupportedException, W("PlatformNotSupported_WinRT")); -} +#endif // FEATURE_COMINTEROP #endif //#ifndef CROSSGEN_COMPILE - #endif // FEATURE_COMINTEROP diff --git a/src/coreclr/src/vm/interoputil.h b/src/coreclr/src/vm/interoputil.h index 1b889b90a50a..3938a0ad331c 100644 --- a/src/coreclr/src/vm/interoputil.h +++ b/src/coreclr/src/vm/interoputil.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _H_INTEROP_UTIL @@ -265,14 +264,12 @@ OBJECTREF AllocateComObject_ForManaged(MethodTable* pMT); //--------------------------------------------------------------------------- // get/load data for a given clsid -MethodTable* GetTypeForCLSID(REFCLSID rclsid, BOOL* pfAssemblyInReg = NULL); +MethodTable* GetTypeForCLSID(REFCLSID rclsid); //--------------------------------------------------------------------------- // get/load a value class for a given guid -#ifdef FEATURE_CLASSIC_COMINTEROP MethodTable* GetValueTypeForGUID(REFCLSID guid); -#endif DefaultInterfaceType GetDefaultInterfaceForClassInternal(TypeHandle hndClass, TypeHandle *pHndDefClass); DefaultInterfaceType GetDefaultInterfaceForClassWrapper(TypeHandle hndClass, TypeHandle *pHndDefClass); diff --git a/src/coreclr/src/vm/interoputil.inl b/src/coreclr/src/vm/interoputil.inl index 06363bf68555..849a33b7ea62 100644 --- a/src/coreclr/src/vm/interoputil.inl +++ b/src/coreclr/src/vm/interoputil.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // #include "comcallablewrapper.h" diff --git a/src/coreclr/src/vm/interpreter.cpp b/src/coreclr/src/vm/interpreter.cpp index a25c334a3732..b4f5a0dbf45b 100644 --- a/src/coreclr/src/vm/interpreter.cpp +++ b/src/coreclr/src/vm/interpreter.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // #include "common.h" @@ -56,7 +55,7 @@ InterpreterMethodInfo::InterpreterMethodInfo(CEEInfo* comp, CORINFO_METHOD_INFO* m_methodCache(NULL) { // Overflow sanity check. (Can ILCodeSize ever be zero?) - assert(m_ILCode <= m_ILCodeEnd); + _ASSERTE(m_ILCode <= m_ILCodeEnd); // Does the calling convention indicate an implicit "this" (first arg) or generic type context arg (last arg)? SetFlag((methInfo->args.callConv & CORINFO_CALLCONV_HASTHIS) != 0); @@ -279,7 +278,7 @@ void InterpreterMethodInfo::InitArgInfo(CEEInfo* comp, CORINFO_METHOD_INFO* meth } m_argDescs[k].m_typeStackNormal = m_argDescs[k].m_type; m_argDescs[k].m_nativeOffset = argOffsets_[k]; - m_argDescs[k].m_directOffset = reinterpret_cast(ArgSlotEndianessFixup(directOffset, sizeof(void*))); + m_argDescs[k].m_directOffset = static_cast(reinterpret_cast(ArgSlotEndianessFixup(directOffset, sizeof(void*)))); directOffset++; k++; } @@ -302,18 +301,18 @@ void InterpreterMethodInfo::InitArgInfo(CEEInfo* comp, CORINFO_METHOD_INFO* meth #endif // defined(HOST_ARM) ) { - directRetBuffOffset = reinterpret_cast(ArgSlotEndianessFixup(directOffset, sizeof(void*))); + directRetBuffOffset = static_cast(reinterpret_cast(ArgSlotEndianessFixup(directOffset, sizeof(void*)))); directOffset++; } #if defined(HOST_AMD64) if (GetFlag()) { - directVarArgOffset = reinterpret_cast(ArgSlotEndianessFixup(directOffset, sizeof(void*))); + directVarArgOffset = static_cast(reinterpret_cast(ArgSlotEndianessFixup(directOffset, sizeof(void*)))); directOffset++; } if (GetFlag()) { - directTypeParamOffset = reinterpret_cast(ArgSlotEndianessFixup(directOffset, sizeof(void*))); + directTypeParamOffset = static_cast(reinterpret_cast(ArgSlotEndianessFixup(directOffset, sizeof(void*)))); directOffset++; } #endif @@ -343,11 +342,11 @@ void InterpreterMethodInfo::InitArgInfo(CEEInfo* comp, CORINFO_METHOD_INFO* meth // When invoking the interpreter directly, large value types are always passed by reference. if (it.IsLargeStruct(comp)) { - m_argDescs[k].m_directOffset = reinterpret_cast(ArgSlotEndianessFixup(directOffset, sizeof(void*))); + m_argDescs[k].m_directOffset = static_cast(reinterpret_cast(ArgSlotEndianessFixup(directOffset, sizeof(void*)))); } else { - m_argDescs[k].m_directOffset = reinterpret_cast(ArgSlotEndianessFixup(directOffset, it.Size(comp))); + m_argDescs[k].m_directOffset = static_cast(reinterpret_cast(ArgSlotEndianessFixup(directOffset, it.Size(comp)))); } argPtr = comp->getArgNext(argPtr); directOffset++; @@ -413,6 +412,10 @@ void InterpreterMethodInfo::InitArgInfo(CEEInfo* comp, CORINFO_METHOD_INFO* meth NYI_INTERP("InterpreterMethodInfo::InitArgInfo -- CORINFO_CALLCONV_PROPERTY"); break; + case CORINFO_CALLCONV_UNMANAGED: + NYI_INTERP("InterpreterMethodInfo::InitArgInfo -- CORINFO_CALLCONV_UNMANAGED"); + break; + case CORINFO_CALLCONV_NATIVEVARARG: NYI_INTERP("InterpreterMethodInfo::InitArgInfo -- CORINFO_CALLCONV_NATIVEVARARG"); break; @@ -468,12 +471,12 @@ bool InterpreterMethodInfo::GetPinningBit(unsigned locNum) void Interpreter::ArgState::AddArg(unsigned canonIndex, short numSlots, bool noReg, bool twoSlotAlign) { #if defined(HOST_AMD64) - assert(!noReg); - assert(!twoSlotAlign); + _ASSERTE(!noReg); + _ASSERTE(!twoSlotAlign); AddArgAmd64(canonIndex, numSlots, /*isFloatingType*/false); #else // !HOST_AMD64 #if defined(HOST_X86) || defined(HOST_ARM64) - assert(!twoSlotAlign); // Shouldn't use this flag on x86 (it wouldn't work right in the stack, at least). + _ASSERTE(!twoSlotAlign); // Shouldn't use this flag on x86 (it wouldn't work right in the stack, at least). #endif // If the argument requires two-slot alignment, make sure we have it. This is the // ARM model: both in regs and on the stack. @@ -525,7 +528,7 @@ void Interpreter::ArgState::AddArg(unsigned canonIndex, short numSlots, bool noR ClrSafeInt offset(callerArgStackSlots); #endif offset *= static_cast(sizeof(void*)); - assert(!offset.IsOverflow()); + _ASSERTE(!offset.IsOverflow()); argOffsets[canonIndex] = offset.Value(); #if defined(HOST_ARM) || defined(HOST_ARM64) callerArgStackSlots += numSlots; @@ -544,7 +547,7 @@ void Interpreter::ArgState::AddArgAmd64(unsigned canonIndex, unsigned short numS // If floating type and there are slots use a float reg slot. if (isFloatingType && (numFPRegArgSlots < MaxNumFPRegArgSlots)) { - assert(numSlots == 1); + _ASSERTE(numSlots == 1); argIsReg[canonIndex] = ARS_FloatReg; argOffsets[canonIndex] = numFPRegArgSlots * sizeof(void*); fpArgsUsed |= (0x1 << (numFPRegArgSlots + 1)); @@ -566,7 +569,7 @@ void Interpreter::ArgState::AddArgAmd64(unsigned canonIndex, unsigned short numS { argIsReg[canonIndex] = ARS_NotReg; ClrSafeInt offset(callerArgStackSlots * sizeof(void*)); - assert(!offset.IsOverflow()); + _ASSERTE(!offset.IsOverflow()); argOffsets[canonIndex] = offset.Value(); callerArgStackSlots += 1; } @@ -576,20 +579,20 @@ void Interpreter::ArgState::AddArgAmd64(unsigned canonIndex, unsigned short numS void Interpreter::ArgState::AddFPArg(unsigned canonIndex, unsigned short numSlots, bool twoSlotAlign) { #if defined(HOST_AMD64) - assert(!twoSlotAlign); - assert(numSlots == 1); + _ASSERTE(!twoSlotAlign); + _ASSERTE(numSlots == 1); AddArgAmd64(canonIndex, numSlots, /*isFloatingType*/ true); #elif defined(HOST_X86) - assert(false); // Don't call this on x86; we pass all FP on the stack. + _ASSERTE(false); // Don't call this on x86; we pass all FP on the stack. #elif defined(HOST_ARM) // We require "numSlots" alignment. - assert(numFPRegArgSlots + numSlots <= MaxNumFPRegArgSlots); + _ASSERTE(numFPRegArgSlots + numSlots <= MaxNumFPRegArgSlots); argIsReg[canonIndex] = ARS_FloatReg; if (twoSlotAlign) { // If we require two slot alignment, the number of slots must be a multiple of two. - assert((numSlots % 2) == 0); + _ASSERTE((numSlots % 2) == 0); // Skip a slot if necessary. if ((numFPRegArgSlots % 2) != 0) @@ -612,8 +615,8 @@ void Interpreter::ArgState::AddFPArg(unsigned canonIndex, unsigned short numSlot // for previous unused registers. unsigned slot = 0; while (slot < 32 && (fpArgsUsed & (1 << slot))) slot++; - assert(slot < 32); // Search succeeded. - assert(slot <= numFPRegArgSlots); // No bits at or above numFPRegArgSlots are set (regs used). + _ASSERTE(slot < 32); // Search succeeded. + _ASSERTE(slot <= numFPRegArgSlots); // No bits at or above numFPRegArgSlots are set (regs used). argOffsets[canonIndex] = slot * sizeof(void*); fpArgsUsed |= (0x1 << slot); if (slot == numFPRegArgSlots) @@ -632,8 +635,8 @@ void Interpreter::ArgState::AddFPArg(unsigned canonIndex, unsigned short numSlot } #elif defined(HOST_ARM64) - assert(numFPRegArgSlots + numSlots <= MaxNumFPRegArgSlots); - assert(!twoSlotAlign); + _ASSERTE(numFPRegArgSlots + numSlots <= MaxNumFPRegArgSlots); + _ASSERTE(!twoSlotAlign); argIsReg[canonIndex] = ARS_FloatReg; argOffsets[canonIndex] = numFPRegArgSlots * sizeof(void*); @@ -766,7 +769,7 @@ CorJitResult Interpreter::GenerateInterpreterStub(CEEInfo* comp, } else { - assert(offsetOfLd == ILOffsetOfLdFldInDeadSimpleInstanceGetterOpt); + _ASSERTE(offsetOfLd == ILOffsetOfLdFldInDeadSimpleInstanceGetterOpt); } } #endif // FEATURE_INTERPRETER_DEADSIMPLE_OPT @@ -878,7 +881,7 @@ CorJitResult Interpreter::GenerateInterpreterStub(CEEInfo* comp, if (sig.HasThis()) { - assert(info->args.callConv & CORINFO_CALLCONV_HASTHIS); + _ASSERTE(info->args.callConv & CORINFO_CALLCONV_HASTHIS); hasThis = true; totalArgs++; sigArgsPlusThis++; } @@ -899,7 +902,7 @@ CorJitResult Interpreter::GenerateInterpreterStub(CEEInfo* comp, if (sig.GetCallingConventionInfo() & CORINFO_CALLCONV_PARAMTYPE) { - assert(info->args.callConv & CORINFO_CALLCONV_PARAMTYPE); + _ASSERTE(info->args.callConv & CORINFO_CALLCONV_PARAMTYPE); hasGenericsContextArg = true; genericsContextArgIndex = totalArgs; totalArgs++; @@ -1112,6 +1115,7 @@ CorJitResult Interpreter::GenerateInterpreterStub(CEEInfo* comp, #elif defined(HOST_AMD64) argState.AddArg(k, static_cast(szSlots)); #elif defined(HOST_ARM) || defined(HOST_ARM64) + // TODO: handle Vector64, Vector128 types CorInfoHFAElemType hfaType = comp->getHFAType(vcTypeRet); if (CorInfoTypeIsFloatingPoint(hfaType)) { @@ -1205,7 +1209,7 @@ CorJitResult Interpreter::GenerateInterpreterStub(CEEInfo* comp, // that argPerm[k] == kk. unsigned k = argPermInverse[kk]; - assert(k < totalArgs); + _ASSERTE(k < totalArgs); if (argState.argIsReg[k] == ArgState::ARS_IntReg) { @@ -1219,7 +1223,7 @@ CorJitResult Interpreter::GenerateInterpreterStub(CEEInfo* comp, } else { - assert(regArgsFound == 2); + _ASSERTE(regArgsFound == 2); if (!jmpCall) { sl.X86EmitPushReg(kEDX); } argState.argOffsets[k] = (argState.numRegArgs - regArgsFound)*sizeof(void*); } @@ -1285,6 +1289,10 @@ CorJitResult Interpreter::GenerateInterpreterStub(CEEInfo* comp, NYI_INTERP("GenerateInterpreterStub -- CORINFO_CALLCONV_PROPERTY"); break; + case CORINFO_CALLCONV_UNMANAGED: + NYI_INTERP("GenerateInterpreterStub -- CORINFO_CALLCONV_UNMANAGED"); + break; + case CORINFO_CALLCONV_NATIVEVARARG: NYI_INTERP("GenerateInterpreterStub -- CORINFO_CALLCONV_NATIVEVARARG"); break; @@ -1605,7 +1613,7 @@ inline ARG_SLOT Interpreter::InterpretMethodBody(struct InterpreterMethodInfo* i // Allocate a new jitInfo and also a new interpMethInfo. if (interpMethInfo == NULL) { - assert(doJmpCall); + _ASSERTE(doJmpCall); jitInfo = new CEEInfo(pMD, true); CORINFO_METHOD_INFO methInfo; @@ -1627,6 +1635,8 @@ void Interpreter::JitMethodIfAppropriate(InterpreterMethodInfo* interpMethInfo, } CONTRACTL_END; unsigned int MaxInterpretCount = s_InterpreterJITThreshold.val(CLRConfig::INTERNAL_InterpreterJITThreshold); + bool scheduleTieringBackgroundWork = false; + TieredCompilationManager *tieredCompilationManager = GetAppDomain()->GetTieredCompilationManager(); if (force || interpMethInfo->m_invocations > MaxInterpretCount) { @@ -1663,14 +1673,24 @@ void Interpreter::JitMethodIfAppropriate(InterpreterMethodInfo* interpMethInfo, // interpreter I didn't wring my hands too much trying to determine the ideal // policy. #ifdef FEATURE_TIERED_COMPILATION - bool scheduleTieringBackgroundWork = false; + CodeVersionManager::LockHolder _lockHolder; NativeCodeVersion activeCodeVersion = md->GetCodeVersionManager()->GetActiveILCodeVersion(md).GetActiveNativeCodeVersion(md); - GetAppDomain()->GetTieredCompilationManager()->AsyncPromoteToTier1(activeCodeVersion, &scheduleTieringBackgroundWork); + ILCodeVersion ilCodeVersion = activeCodeVersion.GetILCodeVersion(); + if (activeCodeVersion.GetOptimizationTier() == NativeCodeVersion::OptimizationTier0 && + !ilCodeVersion.HasAnyOptimizedNativeCodeVersion(activeCodeVersion)) + { + tieredCompilationManager->AsyncPromoteToTier1(activeCodeVersion, &scheduleTieringBackgroundWork); + } #else #error FEATURE_INTERPRETER depends on FEATURE_TIERED_COMPILATION now #endif } } + + if (scheduleTieringBackgroundWork) + { + tieredCompilationManager->ScheduleBackgroundWork(); // requires GC_TRIGGERS + } } // static @@ -1815,12 +1835,16 @@ AwareLock* Interpreter::GetMonitorForStaticMethod() { case CORINFO_LOOKUP_CLASSPARAM: { - classHnd = (CORINFO_CLASS_HANDLE) GetPreciseGenericsContext(); + CORINFO_CONTEXT_HANDLE ctxHnd = GetPreciseGenericsContext(); + _ASSERTE_MSG((((size_t)ctxHnd & CORINFO_CONTEXTFLAGS_MASK) == CORINFO_CONTEXTFLAGS_CLASS), "Precise context not class context"); + classHnd = (CORINFO_CLASS_HANDLE) ((size_t)ctxHnd & ~CORINFO_CONTEXTFLAGS_CLASS); } break; case CORINFO_LOOKUP_METHODPARAM: { - MethodDesc* pMD = (MethodDesc*) GetPreciseGenericsContext(); + CORINFO_CONTEXT_HANDLE ctxHnd = GetPreciseGenericsContext(); + _ASSERTE_MSG((((size_t)ctxHnd & CORINFO_CONTEXTFLAGS_MASK) == CORINFO_CONTEXTFLAGS_METHOD), "Precise context not method context"); + MethodDesc* pMD = (MethodDesc*) (CORINFO_METHOD_HANDLE) ((size_t)ctxHnd & ~CORINFO_CONTEXTFLAGS_METHOD); classHnd = (CORINFO_CLASS_HANDLE) pMD->GetMethodTable(); } break; @@ -1830,7 +1854,7 @@ AwareLock* Interpreter::GetMonitorForStaticMethod() } MethodTable* pMT = GetMethodTableFromClsHnd(classHnd); OBJECTREF ref = pMT->GetManagedClassObject(); - ASSERT(ref); + _ASSERTE(ref); return (AwareLock*) ref->GetSyncBlock()->GetMonitor(); } } @@ -2119,7 +2143,7 @@ void Interpreter::ExecuteMethod(ARG_SLOT* retVal, __out bool* pDoJmpCall, __out m_ILCodePtr += 9; continue; case CEE_DUP: - assert(m_curStackHt > 0); + _ASSERTE(m_curStackHt > 0); it = OpStackTypeGet(m_curStackHt - 1); OpStackTypeSet(m_curStackHt, it); if (it.IsLargeStruct(&m_interpCeeInfo)) @@ -2136,7 +2160,7 @@ void Interpreter::ExecuteMethod(ARG_SLOT* retVal, __out bool* pDoJmpCall, __out m_curStackHt++; break; case CEE_POP: - assert(m_curStackHt > 0); + _ASSERTE(m_curStackHt > 0); m_curStackHt--; it = OpStackTypeGet(m_curStackHt); if (it.IsLargeStruct(&m_interpCeeInfo)) @@ -2178,11 +2202,11 @@ void Interpreter::ExecuteMethod(ARG_SLOT* retVal, __out bool* pDoJmpCall, __out case CEE_RET: if (m_methInfo->m_returnType == CORINFO_TYPE_VOID) { - assert(m_curStackHt == 0); + _ASSERTE(m_curStackHt == 0); } else { - assert(m_curStackHt == 1); + _ASSERTE(m_curStackHt == 1); InterpreterType retValIt = OpStackTypeGet(0); bool looseInt = s_InterpreterLooseRules && CorInfoTypeIsIntegral(m_methInfo->m_returnType) && @@ -2195,7 +2219,7 @@ void Interpreter::ExecuteMethod(ARG_SLOT* retVal, __out bool* pDoJmpCall, __out (m_methInfo->m_returnType != retValIt.ToCorInfoType()); // Make sure that the return value "matches" (which allows certain relaxations) the declared return type. - assert((m_methInfo->m_returnType == CORINFO_TYPE_VALUECLASS && retValIt.ToCorInfoType() == CORINFO_TYPE_VALUECLASS) || + _ASSERTE((m_methInfo->m_returnType == CORINFO_TYPE_VALUECLASS && retValIt.ToCorInfoType() == CORINFO_TYPE_VALUECLASS) || (m_methInfo->m_returnType == CORINFO_TYPE_REFANY && retValIt.ToCorInfoType() == CORINFO_TYPE_VALUECLASS) || (m_methInfo->m_returnType == CORINFO_TYPE_REFANY && retValIt.ToCorInfoType() == CORINFO_TYPE_REFANY) || (looseInt || looseFloat) || @@ -2212,7 +2236,7 @@ void Interpreter::ExecuteMethod(ARG_SLOT* retVal, __out bool* pDoJmpCall, __out #endif if (m_methInfo->GetFlag()) { - assert((m_methInfo->m_returnType == CORINFO_TYPE_VALUECLASS && retValIt.ToCorInfoType() == CORINFO_TYPE_VALUECLASS) || + _ASSERTE((m_methInfo->m_returnType == CORINFO_TYPE_VALUECLASS && retValIt.ToCorInfoType() == CORINFO_TYPE_VALUECLASS) || (m_methInfo->m_returnType == CORINFO_TYPE_REFANY && retValIt.ToCorInfoType() == CORINFO_TYPE_VALUECLASS) || (m_methInfo->m_returnType == CORINFO_TYPE_REFANY && retValIt.ToCorInfoType() == CORINFO_TYPE_REFANY)); if (retValIt.ToCorInfoType() == CORINFO_TYPE_REFANY) @@ -2237,8 +2261,8 @@ void Interpreter::ExecuteMethod(ARG_SLOT* retVal, __out bool* pDoJmpCall, __out #if defined(FEATURE_HFA) // Is it an HFA? else if (m_methInfo->m_returnType == CORINFO_TYPE_VALUECLASS - && (cit != CORINFO_HFA_ELEM_NONE)) - && (MetaSig(reinterpret_cast(m_methInfo->m_method)).GetCallingConventionInfo() & CORINFO_CALLCONV_VARARG) == 0) + && (cit != CORINFO_HFA_ELEM_NONE) + && (MetaSig(reinterpret_cast(m_methInfo->m_method)).GetCallingConventionInfo() & CORINFO_CALLCONV_VARARG) == 0) { if (retValIt.IsLargeStruct(&m_interpCeeInfo)) { @@ -2278,7 +2302,7 @@ void Interpreter::ExecuteMethod(ARG_SLOT* retVal, __out bool* pDoJmpCall, __out // is small (but this is guaranteed not to happen by def'n of ARG_SLOT.) // // Note structs of size 5, 6, 7 may be returned as 8 byte ints. - assert(sz <= sizeof(INT64)); + _ASSERTE(sz <= sizeof(INT64)); *retVal = OpStackGet(0); } } @@ -2343,7 +2367,7 @@ void Interpreter::ExecuteMethod(ARG_SLOT* retVal, __out bool* pDoJmpCall, __out BrOnComparison(); continue; case CEE_BGE_S: - assert(m_curStackHt >= 2); + _ASSERTE(m_curStackHt >= 2); // ECMA spec gives different semantics for different operand types: switch (OpStackTypeGet(m_curStackHt-1).ToCorInfoType()) { @@ -2360,7 +2384,7 @@ void Interpreter::ExecuteMethod(ARG_SLOT* retVal, __out bool* pDoJmpCall, __out BrOnComparison(); continue; case CEE_BLE_S: - assert(m_curStackHt >= 2); + _ASSERTE(m_curStackHt >= 2); // ECMA spec gives different semantics for different operand types: switch (OpStackTypeGet(m_curStackHt-1).ToCorInfoType()) { @@ -2380,7 +2404,7 @@ void Interpreter::ExecuteMethod(ARG_SLOT* retVal, __out bool* pDoJmpCall, __out BrOnComparison(); continue; case CEE_BGE_UN_S: - assert(m_curStackHt >= 2); + _ASSERTE(m_curStackHt >= 2); // ECMA spec gives different semantics for different operand types: switch (OpStackTypeGet(m_curStackHt-1).ToCorInfoType()) { @@ -2397,7 +2421,7 @@ void Interpreter::ExecuteMethod(ARG_SLOT* retVal, __out bool* pDoJmpCall, __out BrOnComparison(); continue; case CEE_BLE_UN_S: - assert(m_curStackHt >= 2); + _ASSERTE(m_curStackHt >= 2); // ECMA spec gives different semantics for different operand types: switch (OpStackTypeGet(m_curStackHt-1).ToCorInfoType()) { @@ -2463,7 +2487,7 @@ void Interpreter::ExecuteMethod(ARG_SLOT* retVal, __out bool* pDoJmpCall, __out BrOnComparison(); continue; case CEE_BGE: - assert(m_curStackHt >= 2); + _ASSERTE(m_curStackHt >= 2); // ECMA spec gives different semantics for different operand types: switch (OpStackTypeGet(m_curStackHt-1).ToCorInfoType()) { @@ -2480,7 +2504,7 @@ void Interpreter::ExecuteMethod(ARG_SLOT* retVal, __out bool* pDoJmpCall, __out BrOnComparison(); continue; case CEE_BLE: - assert(m_curStackHt >= 2); + _ASSERTE(m_curStackHt >= 2); // ECMA spec gives different semantics for different operand types: switch (OpStackTypeGet(m_curStackHt-1).ToCorInfoType()) { @@ -2500,7 +2524,7 @@ void Interpreter::ExecuteMethod(ARG_SLOT* retVal, __out bool* pDoJmpCall, __out BrOnComparison(); continue; case CEE_BGE_UN: - assert(m_curStackHt >= 2); + _ASSERTE(m_curStackHt >= 2); // ECMA spec gives different semantics for different operand types: switch (OpStackTypeGet(m_curStackHt-1).ToCorInfoType()) { @@ -2517,7 +2541,7 @@ void Interpreter::ExecuteMethod(ARG_SLOT* retVal, __out bool* pDoJmpCall, __out BrOnComparison(); continue; case CEE_BLE_UN: - assert(m_curStackHt >= 2); + _ASSERTE(m_curStackHt >= 2); // ECMA spec gives different semantics for different operand types: switch (OpStackTypeGet(m_curStackHt-1).ToCorInfoType()) { @@ -2536,13 +2560,13 @@ void Interpreter::ExecuteMethod(ARG_SLOT* retVal, __out bool* pDoJmpCall, __out case CEE_SWITCH: { - assert(m_curStackHt > 0); + _ASSERTE(m_curStackHt > 0); m_curStackHt--; #if defined(_DEBUG) || defined(HOST_AMD64) CorInfoType cit = OpStackTypeGet(m_curStackHt).ToCorInfoType(); #endif // _DEBUG || HOST_AMD64 #ifdef _DEBUG - assert(cit == CORINFO_TYPE_INT || cit == CORINFO_TYPE_UINT || cit == CORINFO_TYPE_NATIVEINT); + _ASSERTE(cit == CORINFO_TYPE_INT || cit == CORINFO_TYPE_UINT || cit == CORINFO_TYPE_NATIVEINT); #endif // _DEBUG #if defined(HOST_AMD64) UINT32 val = (cit == CORINFO_TYPE_NATIVEINT) ? (INT32) OpStackGet(m_curStackHt) @@ -2774,7 +2798,7 @@ void Interpreter::ExecuteMethod(ARG_SLOT* retVal, __out bool* pDoJmpCall, __out } else { - assert(sizeof(NativeInt) == 8); + _ASSERTE(sizeof(NativeInt) == 8); ConvOvfUn(); } break; @@ -2785,7 +2809,7 @@ void Interpreter::ExecuteMethod(ARG_SLOT* retVal, __out bool* pDoJmpCall, __out } else { - assert(sizeof(NativeUInt) == 8); + _ASSERTE(sizeof(NativeUInt) == 8); ConvOvfUn(); } break; @@ -2921,7 +2945,7 @@ void Interpreter::ExecuteMethod(ARG_SLOT* retVal, __out bool* pDoJmpCall, __out } else { - assert(sizeof(NativeInt) == 8); + _ASSERTE(sizeof(NativeInt) == 8); ConvOvf(); } break; @@ -2932,7 +2956,7 @@ void Interpreter::ExecuteMethod(ARG_SLOT* retVal, __out bool* pDoJmpCall, __out } else { - assert(sizeof(NativeUInt) == 8); + _ASSERTE(sizeof(NativeUInt) == 8); ConvOvf(); } break; @@ -2964,7 +2988,7 @@ void Interpreter::ExecuteMethod(ARG_SLOT* retVal, __out bool* pDoJmpCall, __out { GCX_FORBID(); - assert(m_inFlightException != NULL); + _ASSERTE(m_inFlightException != NULL); finallyException = m_inFlightException; INTERPLOG("endfinally handling for %s, %p, %p\n", methName, m_methInfo, finallyException); m_inFlightException = NULL; @@ -2978,7 +3002,7 @@ void Interpreter::ExecuteMethod(ARG_SLOT* retVal, __out bool* pDoJmpCall, __out else if (!SearchForCoveringFinally()) { // No, there isn't -- go to the leave target. - assert(!m_leaveInfoStack.IsEmpty()); + _ASSERTE(!m_leaveInfoStack.IsEmpty()); LeaveInfo li = m_leaveInfoStack.Pop(); ExecuteBranch(li.m_target); } @@ -3023,7 +3047,7 @@ void Interpreter::ExecuteMethod(ARG_SLOT* retVal, __out bool* pDoJmpCall, __out { case TWOBYTE_CEE_ARGLIST: // NYI_INTERP("Unimplemented opcode: TWOBYTE_CEE_ARGLIST"); - assert(m_methInfo->m_varArgHandleArgNum != NO_VA_ARGNUM); + _ASSERTE(m_methInfo->m_varArgHandleArgNum != NO_VA_ARGNUM); LdArgA(m_methInfo->m_varArgHandleArgNum); m_ILCodePtr += 2; break; @@ -3256,7 +3280,7 @@ void Interpreter::EndFilter() Object* filterException = NULL; { GCX_FORBID(); - assert(m_inFlightException != NULL); + _ASSERTE(m_inFlightException != NULL); filterException = m_inFlightException; INTERPLOG("endfilter handling for %s, %p, %p\n", m_methInfo->m_methName, m_methInfo, filterException); m_inFlightException = NULL; @@ -3310,7 +3334,7 @@ bool Interpreter::MethodHandlesException(OBJECTREF orThrowable) { CORINFO_EH_CLAUSE clause; m_interpCeeInfo.getEHinfo(m_methInfo->m_method, XTnum, &clause); - assert(clause.HandlerLength != (unsigned)-1); // @DEPRECATED + _ASSERTE(clause.HandlerLength != (unsigned)-1); // @DEPRECATED // First, is the current offset in the try block? if (clause.TryOffset <= curOffset && curOffset < clause.TryOffset + clause.TryLength) @@ -3448,7 +3472,7 @@ static unsigned OpFormatExtraSize(opcode_format_t format) { return 1; default: - assert(false); + _ASSERTE(false); return 0; } } @@ -3511,7 +3535,7 @@ bool Interpreter::MethodMayHaveLoop(BYTE* ilCode, unsigned codeSize) case CEE_PREFIX1: op = *(ilCode + 1) + 0x100; - assert(op < CEE_COUNT); // Bounds check for below. + _ASSERTE(op < CEE_COUNT); // Bounds check for below. // deliberate fall-through here. default: // For the rest of the 1-byte instructions, we'll use a table-driven approach. @@ -3546,7 +3570,7 @@ bool Interpreter::SearchForCoveringFinally() { CORINFO_EH_CLAUSE clause; m_interpCeeInfo.getEHinfo(m_methInfo->m_method, XTnum, &clause); - assert(clause.HandlerLength != (unsigned)-1); // @DEPRECATED + _ASSERTE(clause.HandlerLength != (unsigned)-1); // @DEPRECATED // First, is the offset of the leave instruction in the try block? unsigned tryEndOffset = clause.TryOffset + clause.TryLength; @@ -3696,12 +3720,12 @@ void Interpreter::GCScanRootAtLoc(Object** loc, InterpreterType it, promote_func break; case CORINFO_TYPE_VALUECLASS: - assert(!pinningRef); + _ASSERTE(!pinningRef); GCScanValueClassRootAtLoc(loc, it.ToClassHandle(), pf, sc); break; default: - assert(!pinningRef); + _ASSERTE(!pinningRef); break; } } @@ -3800,7 +3824,7 @@ CorInfoType CorInfoTypeStackNormalize(CorInfoType cit) // interconvert. case CORINFO_TYPE_FLOAT: case CORINFO_TYPE_DOUBLE: - assert(IsStackNormalType(cit)); + _ASSERTE(IsStackNormalType(cit)); return cit; default: @@ -3891,14 +3915,14 @@ bool InterpreterType::MatchesWork(const InterpreterType it2, CEEInfo* info) cons { case CORINFO_TYPE_NATIVEINT: case CORINFO_TYPE_NATIVEUINT: - assert(sizeof(NativeInt) == sizeof(NativeUInt)); + _ASSERTE(sizeof(NativeInt) == sizeof(NativeUInt)); if (it2.Size(info) == sizeof(NativeInt)) return true; break; case CORINFO_TYPE_INT: case CORINFO_TYPE_UINT: - assert(sizeof(INT32) == sizeof(UINT32)); + _ASSERTE(sizeof(INT32) == sizeof(UINT32)); if (it2.Size(info) == sizeof(INT32)) return true; break; @@ -4000,6 +4024,10 @@ bool CorInfoTypeIsFloatingPoint(CorInfoType cit) return cit == CORINFO_TYPE_FLOAT || cit == CORINFO_TYPE_DOUBLE; } +bool CorInfoTypeIsFloatingPoint(CorInfoHFAElemType cihet) +{ + return cihet == CORINFO_HFA_ELEM_FLOAT || cihet == CORINFO_HFA_ELEM_DOUBLE; +} bool CorElemTypeIsUnsigned(CorElementType cet) { @@ -4174,8 +4202,8 @@ void Interpreter::LdNull() template void Interpreter::LdInd() { - assert(TOSIsPtr()); - assert(IsStackNormalType(cit)); + _ASSERTE(TOSIsPtr()); + _ASSERTE(IsStackNormalType(cit)); unsigned curStackInd = m_curStackHt-1; T* ptr = OpStackGet(curStackInd); ThrowOnInvalidPointer(ptr); @@ -4187,8 +4215,8 @@ void Interpreter::LdInd() template void Interpreter::LdIndShort() { - assert(TOSIsPtr()); - assert(sizeof(T) < 4); + _ASSERTE(TOSIsPtr()); + _ASSERTE(sizeof(T) < 4); unsigned curStackInd = m_curStackHt-1; T* ptr = OpStackGet(curStackInd); ThrowOnInvalidPointer(ptr); @@ -4208,8 +4236,8 @@ void Interpreter::LdIndShort() template void Interpreter::StInd() { - assert(m_curStackHt >= 2); - assert(CorInfoTypeIsPointer(OpStackTypeGet(m_curStackHt-2).ToCorInfoType())); + _ASSERTE(m_curStackHt >= 2); + _ASSERTE(CorInfoTypeIsPointer(OpStackTypeGet(m_curStackHt-2).ToCorInfoType())); BarrierIfVolatile(); unsigned stackInd0 = m_curStackHt-2; unsigned stackInd1 = m_curStackHt-1; @@ -4230,8 +4258,8 @@ void Interpreter::StInd() void Interpreter::StInd_Ref() { - assert(m_curStackHt >= 2); - assert(CorInfoTypeIsPointer(OpStackTypeGet(m_curStackHt-2).ToCorInfoType())); + _ASSERTE(m_curStackHt >= 2); + _ASSERTE(CorInfoTypeIsPointer(OpStackTypeGet(m_curStackHt-2).ToCorInfoType())); BarrierIfVolatile(); unsigned stackInd0 = m_curStackHt-2; unsigned stackInd1 = m_curStackHt-1; @@ -4260,15 +4288,15 @@ void Interpreter::BinaryArithOp() MODE_COOPERATIVE; } CONTRACTL_END; - assert(m_curStackHt >= 2); + _ASSERTE(m_curStackHt >= 2); unsigned op1idx = m_curStackHt - 2; unsigned op2idx = m_curStackHt - 1; InterpreterType t1 = OpStackTypeGet(op1idx); - assert(IsStackNormalType(t1.ToCorInfoType())); + _ASSERTE(IsStackNormalType(t1.ToCorInfoType())); // Looking at the generated code, it does seem to save some instructions to use the "shifted // types," though the effect on end-to-end time is variable. So I'll leave it set. InterpreterType t2 = OpStackTypeGet(op2idx); - assert(IsStackNormalType(t2.ToCorInfoType())); + _ASSERTE(IsStackNormalType(t2.ToCorInfoType())); // In all cases belows, since "op" is compile-time constant, "if" chains on it should fold away. switch (t1.ToCorInfoTypeShifted()) @@ -4518,17 +4546,17 @@ void Interpreter::BinaryArithOvfOp() MODE_COOPERATIVE; } CONTRACTL_END; - assert(m_curStackHt >= 2); + _ASSERTE(m_curStackHt >= 2); unsigned op1idx = m_curStackHt - 2; unsigned op2idx = m_curStackHt - 1; InterpreterType t1 = OpStackTypeGet(op1idx); CorInfoType cit1 = t1.ToCorInfoType(); - assert(IsStackNormalType(cit1)); + _ASSERTE(IsStackNormalType(cit1)); InterpreterType t2 = OpStackTypeGet(op2idx); CorInfoType cit2 = t2.ToCorInfoType(); - assert(IsStackNormalType(cit2)); + _ASSERTE(IsStackNormalType(cit2)); // In all cases belows, since "op" is compile-time constant, "if" chains on it should fold away. switch (cit1) @@ -4774,17 +4802,17 @@ void Interpreter::BinaryIntOp() MODE_COOPERATIVE; } CONTRACTL_END; - assert(m_curStackHt >= 2); + _ASSERTE(m_curStackHt >= 2); unsigned op1idx = m_curStackHt - 2; unsigned op2idx = m_curStackHt - 1; InterpreterType t1 = OpStackTypeGet(op1idx); CorInfoType cit1 = t1.ToCorInfoType(); - assert(IsStackNormalType(cit1)); + _ASSERTE(IsStackNormalType(cit1)); InterpreterType t2 = OpStackTypeGet(op2idx); CorInfoType cit2 = t2.ToCorInfoType(); - assert(IsStackNormalType(cit2)); + _ASSERTE(IsStackNormalType(cit2)); // In all cases belows, since "op" is compile-time constant, "if" chains on it should fold away. switch (cit1) @@ -4886,7 +4914,7 @@ void Interpreter::BinaryIntOpWork(T val1, T val2) } else { - assert(op == BIO_DivUn || op == BIO_RemUn); + _ASSERTE(op == BIO_DivUn || op == BIO_RemUn); if (val2 == 0) { ThrowDivideByZero(); @@ -4923,17 +4951,17 @@ void Interpreter::ShiftOp() MODE_COOPERATIVE; } CONTRACTL_END; - assert(m_curStackHt >= 2); + _ASSERTE(m_curStackHt >= 2); unsigned op1idx = m_curStackHt - 2; unsigned op2idx = m_curStackHt - 1; InterpreterType t1 = OpStackTypeGet(op1idx); CorInfoType cit1 = t1.ToCorInfoType(); - assert(IsStackNormalType(cit1)); + _ASSERTE(IsStackNormalType(cit1)); InterpreterType t2 = OpStackTypeGet(op2idx); CorInfoType cit2 = t2.ToCorInfoType(); - assert(IsStackNormalType(cit2)); + _ASSERTE(IsStackNormalType(cit2)); // In all cases belows, since "op" is compile-time constant, "if" chains on it should fold away. switch (cit1) @@ -4978,7 +5006,7 @@ void Interpreter::ShiftOpWork(unsigned op1idx, CorInfoType cit2) } else { - assert(op == CEE_SHR_UN); + _ASSERTE(op == CEE_SHR_UN); res = (static_cast(val)) >> shiftAmt; } } @@ -4995,7 +5023,7 @@ void Interpreter::ShiftOpWork(unsigned op1idx, CorInfoType cit2) } else { - assert(op == CEE_SHR_UN); + _ASSERTE(op == CEE_SHR_UN); res = (static_cast(val)) >> shiftAmt; } } @@ -5015,12 +5043,12 @@ void Interpreter::Neg() MODE_COOPERATIVE; } CONTRACTL_END; - assert(m_curStackHt >= 1); + _ASSERTE(m_curStackHt >= 1); unsigned opidx = m_curStackHt - 1; InterpreterType t1 = OpStackTypeGet(opidx); CorInfoType cit1 = t1.ToCorInfoType(); - assert(IsStackNormalType(cit1)); + _ASSERTE(IsStackNormalType(cit1)); switch (cit1) { @@ -5057,12 +5085,12 @@ void Interpreter::Not() MODE_COOPERATIVE; } CONTRACTL_END; - assert(m_curStackHt >= 1); + _ASSERTE(m_curStackHt >= 1); unsigned opidx = m_curStackHt - 1; InterpreterType t1 = OpStackTypeGet(opidx); CorInfoType cit1 = t1.ToCorInfoType(); - assert(IsStackNormalType(cit1)); + _ASSERTE(IsStackNormalType(cit1)); switch (cit1) { @@ -5092,12 +5120,12 @@ void Interpreter::Conv() MODE_COOPERATIVE; } CONTRACTL_END; - assert(m_curStackHt >= 1); + _ASSERTE(m_curStackHt >= 1); unsigned opidx = m_curStackHt - 1; InterpreterType t1 = OpStackTypeGet(opidx); CorInfoType cit1 = t1.ToCorInfoType(); - assert(IsStackNormalType(cit1)); + _ASSERTE(IsStackNormalType(cit1)); T val; switch (cit1) @@ -5179,12 +5207,12 @@ void Interpreter::ConvRUn() MODE_COOPERATIVE; } CONTRACTL_END; - assert(m_curStackHt >= 1); + _ASSERTE(m_curStackHt >= 1); unsigned opidx = m_curStackHt - 1; InterpreterType t1 = OpStackTypeGet(opidx); CorInfoType cit1 = t1.ToCorInfoType(); - assert(IsStackNormalType(cit1)); + _ASSERTE(IsStackNormalType(cit1)); switch (cit1) { @@ -5219,12 +5247,12 @@ void Interpreter::ConvOvf() MODE_COOPERATIVE; } CONTRACTL_END; - assert(m_curStackHt >= 1); + _ASSERTE(m_curStackHt >= 1); unsigned opidx = m_curStackHt - 1; InterpreterType t1 = OpStackTypeGet(opidx); CorInfoType cit1 = t1.ToCorInfoType(); - assert(IsStackNormalType(cit1)); + _ASSERTE(IsStackNormalType(cit1)); switch (cit1) { @@ -5315,12 +5343,12 @@ void Interpreter::ConvOvfUn() MODE_COOPERATIVE; } CONTRACTL_END; - assert(m_curStackHt >= 1); + _ASSERTE(m_curStackHt >= 1); unsigned opidx = m_curStackHt - 1; InterpreterType t1 = OpStackTypeGet(opidx); CorInfoType cit1 = t1.ToCorInfoType(); - assert(IsStackNormalType(cit1)); + _ASSERTE(IsStackNormalType(cit1)); switch (cit1) { @@ -5412,7 +5440,7 @@ void Interpreter::LdObj() BarrierIfVolatile(); - assert(m_curStackHt > 0); + _ASSERTE(m_curStackHt > 0); unsigned ind = m_curStackHt - 1; #ifdef _DEBUG @@ -5509,7 +5537,7 @@ void Interpreter::CpObj() MODE_COOPERATIVE; } CONTRACTL_END; - assert(m_curStackHt >= 2); + _ASSERTE(m_curStackHt >= 2); unsigned destInd = m_curStackHt - 2; unsigned srcInd = m_curStackHt - 1; @@ -5563,7 +5591,7 @@ void Interpreter::StObj() MODE_COOPERATIVE; } CONTRACTL_END; - assert(m_curStackHt >= 2); + _ASSERTE(m_curStackHt >= 2); unsigned destInd = m_curStackHt - 2; unsigned valInd = m_curStackHt - 1; @@ -5630,12 +5658,12 @@ void Interpreter::StObj() } } - assert(isClass || isPrim || isShared); + _ASSERTE(isClass || isPrim || isShared); } else { const bool isSz = s_InterpreterLooseRules && sz <= sizeof(dest); - assert(isSz); + _ASSERTE(isSz); } #endif // _DEBUG @@ -5658,7 +5686,7 @@ void Interpreter::StObj() else { // The ostack entry is an object reference. - assert(OpStackTypeGet(valInd).ToCorInfoType() == CORINFO_TYPE_CLASS); + _ASSERTE(OpStackTypeGet(valInd).ToCorInfoType() == CORINFO_TYPE_CLASS); // Note that "dest" might be a pointer into the heap. It is therefore important // to calculate it *after* any PREEMP transitions at which we might do a GC. (Thus, @@ -5686,7 +5714,7 @@ void Interpreter::InitObj() MODE_COOPERATIVE; } CONTRACTL_END; - assert(m_curStackHt >= 1); + _ASSERTE(m_curStackHt >= 1); unsigned destInd = m_curStackHt - 1; #ifdef _DEBUG // Check that src and dest are both pointer types. @@ -5867,7 +5895,7 @@ void Interpreter::NewObj() if (clsFlags & CORINFO_FLG_ARRAY) { - assert(clsFlags & CORINFO_FLG_VAROBJSIZE); + _ASSERTE(clsFlags & CORINFO_FLG_VAROBJSIZE); MethodDesc* methDesc = GetMethod(methTok.hMethod); @@ -5877,7 +5905,7 @@ void Interpreter::NewObj() MetaSig msig(pSig, cbSigSize, methDesc->GetModule(), NULL); unsigned dwNumArgs = msig.NumFixedArgs(); - assert(m_curStackHt >= dwNumArgs); + _ASSERTE(m_curStackHt >= dwNumArgs); m_curStackHt -= dwNumArgs; INT32* args = (INT32*)_alloca(dwNumArgs * sizeof(INT32)); @@ -5936,7 +5964,7 @@ void Interpreter::NewArr() MODE_COOPERATIVE; } CONTRACTL_END; - assert(m_curStackHt > 0); + _ASSERTE(m_curStackHt > 0); unsigned stkInd = m_curStackHt-1; CorInfoType cit = OpStackTypeGet(stkInd).ToCorInfoType(); NativeInt sz = 0; @@ -6013,11 +6041,11 @@ void Interpreter::IsInst() CORINFO_CLASS_HANDLE cls = GetTypeFromToken(m_ILCodePtr + 1, CORINFO_TOKENKIND_Casting InterpTracingArg(RTK_IsInst)); - assert(m_curStackHt >= 1); + _ASSERTE(m_curStackHt >= 1); unsigned idx = m_curStackHt - 1; #ifdef _DEBUG CorInfoType cit = OpStackTypeGet(idx).ToCorInfoType(); - assert(cit == CORINFO_TYPE_CLASS || cit == CORINFO_TYPE_STRING); + _ASSERTE(cit == CORINFO_TYPE_CLASS || cit == CORINFO_TYPE_STRING); #endif // DEBUG Object * pObj = OpStackGet(idx); @@ -6046,11 +6074,11 @@ void Interpreter::CastClass() CORINFO_CLASS_HANDLE cls = GetTypeFromToken(m_ILCodePtr + 1, CORINFO_TOKENKIND_Casting InterpTracingArg(RTK_CastClass)); - assert(m_curStackHt >= 1); + _ASSERTE(m_curStackHt >= 1); unsigned idx = m_curStackHt - 1; #ifdef _DEBUG CorInfoType cit = OpStackTypeGet(idx).ToCorInfoType(); - assert(cit == CORINFO_TYPE_CLASS || cit == CORINFO_TYPE_STRING); + _ASSERTE(cit == CORINFO_TYPE_CLASS || cit == CORINFO_TYPE_STRING); #endif // _DEBUG Object * pObj = OpStackGet(idx); @@ -6076,7 +6104,7 @@ void Interpreter::LocAlloc() MODE_COOPERATIVE; } CONTRACTL_END; - assert(m_curStackHt >= 1); + _ASSERTE(m_curStackHt >= 1); unsigned idx = m_curStackHt - 1; CorInfoType cit = OpStackTypeGet(idx).ToCorInfoType(); NativeUInt sz = 0; @@ -6122,7 +6150,7 @@ void Interpreter::MkRefany() #endif // INTERP_TRACING CORINFO_CLASS_HANDLE cls = GetTypeFromToken(m_ILCodePtr + 1, CORINFO_TOKENKIND_Class InterpTracingArg(RTK_MkRefAny)); - assert(m_curStackHt >= 1); + _ASSERTE(m_curStackHt >= 1); unsigned idx = m_curStackHt - 1; CorInfoType cit = OpStackTypeGet(idx).ToCorInfoType(); @@ -6134,11 +6162,11 @@ void Interpreter::MkRefany() InterpreterType typedRefIT = GetTypedRefIT(&m_interpCeeInfo); TypedByRef* tbr; #if defined(HOST_AMD64) - assert(typedRefIT.IsLargeStruct(&m_interpCeeInfo)); + _ASSERTE(typedRefIT.IsLargeStruct(&m_interpCeeInfo)); tbr = (TypedByRef*) LargeStructOperandStackPush(GetTypedRefSize(&m_interpCeeInfo)); OpStackSet(idx, tbr); #elif defined(HOST_X86) || defined(HOST_ARM) - assert(!typedRefIT.IsLargeStruct(&m_interpCeeInfo)); + _ASSERTE(!typedRefIT.IsLargeStruct(&m_interpCeeInfo)); tbr = OpStackGetAddr(idx); #elif defined(HOST_ARM64) tbr = NULL; @@ -6161,7 +6189,7 @@ void Interpreter::RefanyType() MODE_COOPERATIVE; } CONTRACTL_END; - assert(m_curStackHt > 0); + _ASSERTE(m_curStackHt > 0); unsigned idx = m_curStackHt - 1; if (OpStackTypeGet(idx) != GetTypedRefIT(&m_interpCeeInfo)) @@ -6223,7 +6251,7 @@ void Interpreter::RefanyVal() MODE_COOPERATIVE; } CONTRACTL_END; - assert(m_curStackHt > 0); + _ASSERTE(m_curStackHt > 0); unsigned idx = m_curStackHt - 1; if (OpStackTypeGet(idx) != GetTypedRefIT(&m_interpCeeInfo)) @@ -6254,7 +6282,7 @@ void Interpreter::CkFinite() MODE_COOPERATIVE; } CONTRACTL_END; - assert(m_curStackHt > 0); + _ASSERTE(m_curStackHt > 0); unsigned idx = m_curStackHt - 1; CorInfoType cit = OpStackTypeGet(idx).ToCorInfoType(); @@ -6381,7 +6409,7 @@ void Interpreter::LdVirtFtn() MODE_COOPERATIVE; } CONTRACTL_END; - assert(m_curStackHt >= 1); + _ASSERTE(m_curStackHt >= 1); unsigned ind = m_curStackHt - 1; unsigned tokVal = getU4LittleEndian(m_ILCodePtr + 2); @@ -6398,8 +6426,10 @@ void Interpreter::LdVirtFtn() GCX_PREEMP(); ResolveToken(&tok, tokVal, CORINFO_TOKENKIND_Method InterpTracingArg(RTK_LdVirtFtn)); m_interpCeeInfo.getCallInfo(&tok, NULL, m_methInfo->m_method, - combine(CORINFO_CALLINFO_SECURITYCHECKS,CORINFO_CALLINFO_LDFTN), - &callInfo); + combine(CORINFO_CALLINFO_CALLVIRT, + combine(CORINFO_CALLINFO_SECURITYCHECKS, + CORINFO_CALLINFO_LDFTN)), + &callInfo); classHnd = tok.hClass; @@ -6497,7 +6527,7 @@ CORINFO_CLASS_HANDLE Interpreter::GetTypedRefClsHnd(CEEInfo* info) void Interpreter::Initialize() { - assert(!s_initialized); + _ASSERTE(!s_initialized); s_InterpretMeths.ensureInit(CLRConfig::INTERNAL_Interpret); s_InterpretMethsExclude.ensureInit(CLRConfig::INTERNAL_InterpretExclude); @@ -6603,7 +6633,7 @@ void Interpreter::CompareOp() MODE_COOPERATIVE; } CONTRACTL_END; - assert(m_curStackHt >= 2); + _ASSERTE(m_curStackHt >= 2); unsigned op1idx = m_curStackHt - 2; INT32 res = CompareOpRes(op1idx); OpStackSet(op1idx, res); @@ -6620,14 +6650,14 @@ INT32 Interpreter::CompareOpRes(unsigned op1idx) MODE_COOPERATIVE; } CONTRACTL_END; - assert(m_curStackHt >= op1idx + 2); + _ASSERTE(m_curStackHt >= op1idx + 2); unsigned op2idx = op1idx + 1; InterpreterType t1 = OpStackTypeGet(op1idx); CorInfoType cit1 = t1.ToCorInfoType(); - assert(IsStackNormalType(cit1)); + _ASSERTE(IsStackNormalType(cit1)); InterpreterType t2 = OpStackTypeGet(op2idx); CorInfoType cit2 = t2.ToCorInfoType(); - assert(IsStackNormalType(cit2)); + _ASSERTE(IsStackNormalType(cit2)); INT32 res = 0; switch (cit1) @@ -6655,7 +6685,7 @@ INT32 Interpreter::CompareOpRes(unsigned op1idx) } else { - assert(op == CO_LT_UN); + _ASSERTE(op == CO_LT_UN); if (static_cast(val1) < static_cast(val2)) res = 1; } } @@ -6684,7 +6714,7 @@ INT32 Interpreter::CompareOpRes(unsigned op1idx) } else { - assert(op == CO_LT_UN); + _ASSERTE(op == CO_LT_UN); if (static_cast(val1) < static_cast(val2)) res = 1; } } @@ -6748,7 +6778,7 @@ INT32 Interpreter::CompareOpRes(unsigned op1idx) } else { - assert(op == CO_LT_UN); + _ASSERTE(op == CO_LT_UN); if (static_cast(val1) < static_cast(val2)) res = 1; } } @@ -6779,12 +6809,12 @@ INT32 Interpreter::CompareOpRes(unsigned op1idx) } else if (cit2 == CORINFO_TYPE_CLASS) { - assert(OpStackGet(op2idx) == 0); + _ASSERTE(OpStackGet(op2idx) == 0); val2 = 0; } else { - assert(s_InterpreterLooseRules && cit2 == CORINFO_TYPE_BYREF); + _ASSERTE(s_InterpreterLooseRules && cit2 == CORINFO_TYPE_BYREF); val2 = reinterpret_cast(OpStackGet(op2idx)); } if (op == CO_EQ) @@ -6805,7 +6835,7 @@ INT32 Interpreter::CompareOpRes(unsigned op1idx) } else { - assert(op == CO_LT_UN); + _ASSERTE(op == CO_LT_UN); if (static_cast(val1) < static_cast(val2)) res = 1; } } @@ -6842,7 +6872,7 @@ INT32 Interpreter::CompareOpRes(unsigned op1idx) } else { - assert(op == CO_LT_UN); + _ASSERTE(op == CO_LT_UN); if (static_cast(val1) < static_cast(val2)) res = 1; } } @@ -6909,7 +6939,7 @@ INT32 Interpreter::CompareOpRes(unsigned op1idx) } else { - assert(op == CO_LT_UN); + _ASSERTE(op == CO_LT_UN); // Check for NAN's here: if either is a NAN, they're unordered, so this comparison returns true. if (_isnan(val1) || _isnan(val2)) res = 1; else if (val1 < val2) res = 1; @@ -6951,7 +6981,7 @@ INT32 Interpreter::CompareOpRes(unsigned op1idx) } else { - assert(op == CO_LT_UN); + _ASSERTE(op == CO_LT_UN); // Check for NAN's here: if either is a NAN, they're unordered, so this comparison returns true. if (_isnan(val1) || _isnan(val2)) res = 1; else if (val1 < val2) res = 1; @@ -6975,7 +7005,7 @@ INT32 Interpreter::CompareOpRes(unsigned op1idx) } else { - assert(s_InterpreterLooseRules && cit2 == CORINFO_TYPE_NATIVEINT); + _ASSERTE(s_InterpreterLooseRules && cit2 == CORINFO_TYPE_NATIVEINT); val2 = OpStackGet(op2idx); } if (op == CO_EQ) @@ -6996,7 +7026,7 @@ INT32 Interpreter::CompareOpRes(unsigned op1idx) } else { - assert(op == CO_LT_UN); + _ASSERTE(op == CO_LT_UN); if (static_cast(val1) < static_cast(val2)) res = 1; } } @@ -7021,7 +7051,7 @@ INT32 Interpreter::CompareOpRes(unsigned op1idx) break; default: - assert(false); // Should not be here if the type is stack-normal. + _ASSERTE(false); // Should not be here if the type is stack-normal. } return res; @@ -7030,8 +7060,8 @@ INT32 Interpreter::CompareOpRes(unsigned op1idx) template void Interpreter::BrOnValue() { - assert(targetLen == 1 || targetLen == 4); - assert(m_curStackHt > 0); + _ASSERTE(targetLen == 1 || targetLen == 4); + _ASSERTE(m_curStackHt > 0); unsigned stackInd = m_curStackHt - 1; InterpreterType it = OpStackTypeGet(stackInd); @@ -7107,8 +7137,8 @@ void Interpreter::BrOnComparison() MODE_COOPERATIVE; } CONTRACTL_END; - assert(targetLen == 1 || targetLen == 4); - assert(m_curStackHt >= 2); + _ASSERTE(targetLen == 1 || targetLen == 4); + _ASSERTE(m_curStackHt >= 2); unsigned v1Ind = m_curStackHt - 2; INT32 res = CompareOpRes(v1Ind); @@ -7171,7 +7201,7 @@ void Interpreter::LdFld(FieldDesc* fldIn) { unsigned tok = getU4LittleEndian(m_ILCodePtr + sizeof(BYTE)); fld = FindField(tok InterpTracingArg(RTK_LdFld)); - assert(fld != NULL); + _ASSERTE(fld != NULL); fldOffset = fld->GetOffset(); if (s_InterpreterUseCaching && fldOffset < FIELD_OFFSET_LAST_REAL_OFFSET) @@ -7202,7 +7232,7 @@ void Interpreter::LdFld(FieldDesc* fldIn) UINT sz = fld->GetSize(); // Live vars: valCit, structValIt - assert(m_curStackHt > 0); + _ASSERTE(m_curStackHt > 0); unsigned stackInd = m_curStackHt - 1; InterpreterType addrIt = OpStackTypeGet(stackInd); CorInfoType addrCit = addrIt.ToCorInfoType(); @@ -7307,12 +7337,12 @@ void Interpreter::LdFld(FieldDesc* fldIn) } else { - assert(CorInfoTypeIsPointer(addrCit)); + _ASSERTE(CorInfoTypeIsPointer(addrCit)); ptr = OpStackGet(stackInd); ThrowOnInvalidPointer(ptr); } - assert(ptr != NULL); + _ASSERTE(ptr != NULL); ptr += fldOffset; if (valCit == CORINFO_TYPE_VALUECLASS) @@ -7400,7 +7430,7 @@ void Interpreter::LdFldA() fld = FindField(tok InterpTracingArg(RTK_LdFldA)); if (s_InterpreterUseCaching) CacheInstanceField(offset, fld); } - assert(m_curStackHt > 0); + _ASSERTE(m_curStackHt > 0); unsigned stackInd = m_curStackHt - 1; CorInfoType addrCit = OpStackTypeGet(stackInd).ToCorInfoType(); if (addrCit == CORINFO_TYPE_BYREF || addrCit == CORINFO_TYPE_CLASS || addrCit == CORINFO_TYPE_NATIVEINT) @@ -7449,7 +7479,7 @@ void Interpreter::StFld() unsigned tok = getU4LittleEndian(m_ILCodePtr + sizeof(BYTE)); GCX_PREEMP(); fld = FindField(tok InterpTracingArg(RTK_StFld)); - assert(fld != NULL); + _ASSERTE(fld != NULL); fldOffset = fld->GetOffset(); if (s_InterpreterUseCaching && fldOffset < FIELD_OFFSET_LAST_REAL_OFFSET) CacheInstanceField(ilOffset, fld); @@ -7462,12 +7492,12 @@ void Interpreter::StFld() m_ILCodePtr += 5; // Last use above, so update now. UINT sz = fld->GetSize(); - assert(m_curStackHt >= 2); + _ASSERTE(m_curStackHt >= 2); unsigned addrInd = m_curStackHt - 2; CorInfoType addrCit = OpStackTypeGet(addrInd).ToCorInfoType(); unsigned valInd = m_curStackHt - 1; CorInfoType valCit = OpStackTypeGet(valInd).ToCorInfoType(); - assert(IsStackNormalType(addrCit) && IsStackNormalType(valCit)); + _ASSERTE(IsStackNormalType(addrCit) && IsStackNormalType(valCit)); m_curStackHt -= 2; @@ -7530,7 +7560,7 @@ void Interpreter::StFld() } else { - assert(addrCit == CORINFO_TYPE_BYREF || addrCit == CORINFO_TYPE_NATIVEINT); + _ASSERTE(addrCit == CORINFO_TYPE_BYREF || addrCit == CORINFO_TYPE_NATIVEINT); INT8* destPtr = OpStackGet(addrInd); ThrowOnInvalidPointer(destPtr); @@ -7743,14 +7773,14 @@ void Interpreter::EnsureClassInit(MethodTable* pMT) // This is tantamount to a call, so exempt it from the cycle count. #if INTERP_ILCYCLE_PROFILE unsigned __int64 startCycles; - bool b = CycleTimer::GetThreadCyclesS(&startCycles); assert(b); + bool b = CycleTimer::GetThreadCyclesS(&startCycles); _ASSERTE(b); #endif // INTERP_ILCYCLE_PROFILE pMT->CheckRunClassInitThrowing(); #if INTERP_ILCYCLE_PROFILE unsigned __int64 endCycles; - b = CycleTimer::GetThreadCyclesS(&endCycles); assert(b); + b = CycleTimer::GetThreadCyclesS(&endCycles); _ASSERTE(b); m_exemptCycles += (endCycles - startCycles); #endif // INTERP_ILCYCLE_PROFILE } @@ -7862,11 +7892,11 @@ void Interpreter::LdElemWithType() MODE_COOPERATIVE; } CONTRACTL_END; - assert(m_curStackHt >= 2); + _ASSERTE(m_curStackHt >= 2); unsigned arrInd = m_curStackHt - 2; unsigned indexInd = m_curStackHt - 1; - assert(OpStackTypeGet(arrInd).ToCorInfoType() == CORINFO_TYPE_CLASS); + _ASSERTE(OpStackTypeGet(arrInd).ToCorInfoType() == CORINFO_TYPE_CLASS); ArrayBase* a = OpStackGet(arrInd); ThrowOnInvalidPointer(a); @@ -7887,22 +7917,46 @@ void Interpreter::LdElemWithType() } else { - T res = reinterpret_cast*>(a)->GetDirectConstPointerToNonObjectElements()[index]; + intptr_t res_ptr = reinterpret_cast(reinterpret_cast*>(a)->GetDirectConstPointerToNonObjectElements()); if (cit == CORINFO_TYPE_INT) { + _ASSERTE(std::is_integral::value); + // Widen narrow types. - int ires = (int)res; + int ires; + switch (sizeof(T)) + { + case 1: + ires = std::is_same::value ? + static_cast(reinterpret_cast(res_ptr)[index]) : + static_cast(reinterpret_cast(res_ptr)[index]); + break; + case 2: + ires = std::is_same::value ? + static_cast(reinterpret_cast(res_ptr)[index]) : + static_cast(reinterpret_cast(res_ptr)[index]); + break; + case 4: + ires = std::is_same::value ? + static_cast(reinterpret_cast(res_ptr)[index]) : + static_cast(reinterpret_cast(res_ptr)[index]); + break; + default: + _ASSERTE_MSG(false, "This should have exhausted all the possible sizes."); + break; + } + OpStackSet(arrInd, ires); } else { - OpStackSet(arrInd, res); + OpStackSet(arrInd, ((T*) res_ptr)[index]); } } } else { - assert(indexCit == CORINFO_TYPE_NATIVEINT); + _ASSERTE(indexCit == CORINFO_TYPE_NATIVEINT); NativeInt index = OpStackGet(indexInd); if (index < 0 || index >= NativeInt(len)) ThrowArrayBoundsException(); @@ -7934,12 +7988,12 @@ void Interpreter::StElemWithType() } CONTRACTL_END; - assert(m_curStackHt >= 3); + _ASSERTE(m_curStackHt >= 3); unsigned arrInd = m_curStackHt - 3; unsigned indexInd = m_curStackHt - 2; unsigned valInd = m_curStackHt - 1; - assert(OpStackTypeGet(arrInd).ToCorInfoType() == CORINFO_TYPE_CLASS); + _ASSERTE(OpStackTypeGet(arrInd).ToCorInfoType() == CORINFO_TYPE_CLASS); ArrayBase* a = OpStackGet(arrInd); ThrowOnInvalidPointer(a); @@ -7974,7 +8028,7 @@ void Interpreter::StElemWithType() } else { - assert(indexCit == CORINFO_TYPE_NATIVEINT); + _ASSERTE(indexCit == CORINFO_TYPE_NATIVEINT); NativeInt index = OpStackGet(indexInd); if (index < 0 || index >= NativeInt(len)) ThrowArrayBoundsException(); if (IsObjType) @@ -8012,7 +8066,7 @@ void Interpreter::LdElem() MODE_COOPERATIVE; } CONTRACTL_END; - assert(m_curStackHt >= 2); + _ASSERTE(m_curStackHt >= 2); unsigned arrInd = m_curStackHt - 2; unsigned indexInd = m_curStackHt - 1; @@ -8053,7 +8107,7 @@ void Interpreter::LdElem() elemIt = InterpreterType(elemCit); } - assert(OpStackTypeGet(arrInd).ToCorInfoType() == CORINFO_TYPE_CLASS); + _ASSERTE(OpStackTypeGet(arrInd).ToCorInfoType() == CORINFO_TYPE_CLASS); ArrayBase* a = OpStackGet(arrInd); @@ -8071,7 +8125,7 @@ void Interpreter::LdElem() } else { - assert(indexCit == CORINFO_TYPE_NATIVEINT); + _ASSERTE(indexCit == CORINFO_TYPE_NATIVEINT); index = OpStackGet(indexInd); } } @@ -8137,7 +8191,7 @@ void Interpreter::StElem() MODE_COOPERATIVE; } CONTRACTL_END; - assert(m_curStackHt >= 3); + _ASSERTE(m_curStackHt >= 3); unsigned arrInd = m_curStackHt - 3; unsigned indexInd = m_curStackHt - 2; unsigned valInd = m_curStackHt - 1; @@ -8189,7 +8243,7 @@ void Interpreter::StElem() } #endif // _DEBUG - assert(OpStackTypeGet(arrInd).ToCorInfoType() == CORINFO_TYPE_CLASS); + _ASSERTE(OpStackTypeGet(arrInd).ToCorInfoType() == CORINFO_TYPE_CLASS); ArrayBase* a = OpStackGet(arrInd); ThrowOnInvalidPointer(a); @@ -8278,7 +8332,7 @@ void Interpreter::InitBlk() MODE_COOPERATIVE; } CONTRACTL_END; - assert(m_curStackHt >= 3); + _ASSERTE(m_curStackHt >= 3); unsigned addrInd = m_curStackHt - 3; unsigned valInd = m_curStackHt - 2; unsigned sizeInd = m_curStackHt - 1; @@ -8328,7 +8382,7 @@ void Interpreter::CpBlk() MODE_COOPERATIVE; } CONTRACTL_END; - assert(m_curStackHt >= 3); + _ASSERTE(m_curStackHt >= 3); unsigned destInd = m_curStackHt - 3; unsigned srcInd = m_curStackHt - 2; unsigned sizeInd = m_curStackHt - 1; @@ -8385,7 +8439,7 @@ void Interpreter::Box() MODE_COOPERATIVE; } CONTRACTL_END; - assert(m_curStackHt >= 1); + _ASSERTE(m_curStackHt >= 1); unsigned ind = m_curStackHt - 1; DWORD boxTypeAttribs = 0; @@ -8488,7 +8542,7 @@ void Interpreter::Unbox() MODE_COOPERATIVE; } CONTRACTL_END - assert(m_curStackHt > 0); + _ASSERTE(m_curStackHt > 0); unsigned tos = m_curStackHt - 1; #ifdef _DEBUG @@ -8582,7 +8636,7 @@ void Interpreter::Throw() MODE_COOPERATIVE; } CONTRACTL_END - assert(m_curStackHt >= 1); + _ASSERTE(m_curStackHt >= 1); // Note that we can't decrement the stack height here, since the operand stack // protects the thrown object. Nor do we need to, since the ostack will be cleared on @@ -8630,7 +8684,7 @@ void Interpreter::UnboxAny() MODE_COOPERATIVE; } CONTRACTL_END; - assert(m_curStackHt > 0); + _ASSERTE(m_curStackHt > 0); unsigned tos = m_curStackHt - 1; unsigned boxTypeTok = getU4LittleEndian(m_ILCodePtr + 1); @@ -8750,10 +8804,10 @@ void Interpreter::LdLen() MODE_COOPERATIVE; } CONTRACTL_END; - assert(m_curStackHt >= 1); + _ASSERTE(m_curStackHt >= 1); unsigned arrInd = m_curStackHt - 1; - assert(OpStackTypeGet(arrInd).ToCorInfoType() == CORINFO_TYPE_CLASS); + _ASSERTE(OpStackTypeGet(arrInd).ToCorInfoType() == CORINFO_TYPE_CLASS); GCX_FORBID(); @@ -8801,7 +8855,7 @@ CORINFO_CONTEXT_HANDLE InterpreterMethodInfo::GetPreciseGenericsContext(Object* // 2) generic method of a class: generic argument is the precise MethodDesc* of the method. if (GetFlag()) { - assert(GetFlag() || GetFlag()); + _ASSERTE(GetFlag() || GetFlag()); if (GetFlag()) { return MAKE_METHODCONTEXT(reinterpret_cast(genericsCtxtArg)); @@ -8849,7 +8903,7 @@ void Interpreter::DoCallWork(bool virtualCall, void* thisArg, CORINFO_RESOLVED_T #if 0 // XXX unsigned __int64 callStartCycles; - bool b = CycleTimer::GetThreadCyclesS(&callStartCycles); assert(b); + bool b = CycleTimer::GetThreadCyclesS(&callStartCycles); _ASSERTE(b); unsigned __int64 callStartExemptCycles = m_exemptCycles; #endif #endif // INTERP_ILCYCLE_PROFILE @@ -8870,7 +8924,7 @@ void Interpreter::DoCallWork(bool virtualCall, void* thisArg, CORINFO_RESOLVED_T // call to pop that Frame before the caller method completes. If this were not true, if one method could push // a Frame, but defer the pop to its caller, then we could *never* use a Frame in the interpreter, and // our implementation plan would be doomed.) - assert(m_callThisArg == NULL); + _ASSERTE(m_callThisArg == NULL); m_callThisArg = thisArg; // Have we already cached a MethodDescCallSite for this call? (We do this only in loops @@ -8903,7 +8957,7 @@ void Interpreter::DoCallWork(bool virtualCall, void* thisArg, CORINFO_RESOLVED_T GCX_PREEMP(); // callInfoPtr and methTokPtr must either both be NULL, or neither. - assert(methTokPtr == NULL); + _ASSERTE(methTokPtr == NULL); methTokPtr = &methTok; ResolveToken(methTokPtr, tok, CORINFO_TOKENKIND_Method InterpTracingArg(RTK_Call)); @@ -8923,7 +8977,7 @@ void Interpreter::DoCallWork(bool virtualCall, void* thisArg, CORINFO_RESOLVED_T if (virtualCall) { unsigned __int64 callEndCycles; - b = CycleTimer::GetThreadCyclesS(&callEndCycles); assert(b); + b = CycleTimer::GetThreadCyclesS(&callEndCycles); _ASSERTE(b); unsigned __int64 delta = (callEndCycles - callStartCycles); delta -= (m_exemptCycles - callStartExemptCycles); s_callCycles += delta; @@ -8934,7 +8988,7 @@ void Interpreter::DoCallWork(bool virtualCall, void* thisArg, CORINFO_RESOLVED_T callInfoPtr = &callInfo; - assert(!callInfoPtr->exactContextNeedsRuntimeLookup); + _ASSERTE(!callInfoPtr->exactContextNeedsRuntimeLookup); methToCall = reinterpret_cast(methTok.hMethod); exactClass = methTok.hClass; @@ -8942,9 +8996,9 @@ void Interpreter::DoCallWork(bool virtualCall, void* thisArg, CORINFO_RESOLVED_T else { // callInfoPtr and methTokPtr must either both be NULL, or neither. - assert(methTokPtr != NULL); + _ASSERTE(methTokPtr != NULL); - assert(!callInfoPtr->exactContextNeedsRuntimeLookup); + _ASSERTE(!callInfoPtr->exactContextNeedsRuntimeLookup); methToCall = reinterpret_cast(callInfoPtr->hMethod); exactClass = methTokPtr->hClass; @@ -9035,11 +9089,37 @@ void Interpreter::DoCallWork(bool virtualCall, void* thisArg, CORINFO_RESOLVED_T didIntrinsic = true; } + // TODO: The following check for hardware intrinsics is not a production-level + // solution and may produce incorrect results. + static ConfigDWORD s_InterpreterHWIntrinsicsIsSupportedFalse; + if (s_InterpreterHWIntrinsicsIsSupportedFalse.val(CLRConfig::INTERNAL_InterpreterHWIntrinsicsIsSupportedFalse) != 0) + { + GCX_PREEMP(); + + // Hardware intrinsics are recognized by name. + const char* namespaceName = NULL; + const char* className = NULL; + const char* methodName = m_interpCeeInfo.getMethodNameFromMetadata((CORINFO_METHOD_HANDLE)methToCall, &className, &namespaceName, NULL); + if ( +#if defined(TARGET_X86) || defined(TARGET_AMD64) + strcmp(namespaceName, "System.Runtime.Intrinsics.X86") == 0 && +#elif defined(TARGET_ARM64) + strcmp(namespaceName, "System.Runtime.Intrinsics.Arm") == 0 && +#endif // defined(TARGET_X86) || defined(TARGET_AMD64) + strcmp(methodName, "get_IsSupported") == 0 + ) + { + GCX_COOP(); + DoGetIsSupported(); + didIntrinsic = true; + } + } + #if FEATURE_SIMD if (fFeatureSIMD.val(CLRConfig::EXTERNAL_FeatureSIMD) != 0) { // Check for the simd class... - assert(exactClass != NULL); + _ASSERTE(exactClass != NULL); GCX_PREEMP(); bool isIntrinsicType = m_interpCeeInfo.isIntrinsicType(exactClass); @@ -9180,9 +9260,9 @@ void Interpreter::DoCallWork(bool virtualCall, void* thisArg, CORINFO_RESOLVED_T ctorData.pMethod = methToCall; // Second argument to delegate constructor will be code address of the function the delegate wraps. - assert(TOSIsPtr() && OpStackTypeGet(m_curStackHt-1).ToCorInfoType() != CORINFO_TYPE_BYREF); + _ASSERTE(TOSIsPtr() && OpStackTypeGet(m_curStackHt-1).ToCorInfoType() != CORINFO_TYPE_BYREF); CORINFO_METHOD_HANDLE targetMethodHnd = GetFunctionPointerStack()[m_curStackHt-1]; - assert(targetMethodHnd != NULL); + _ASSERTE(targetMethodHnd != NULL); CORINFO_METHOD_HANDLE alternateCtorHnd = m_interpCeeInfo.GetDelegateCtor(reinterpret_cast(methToCall), methTokPtr->hClass, targetMethodHnd, &ctorData); MethodDesc* alternateCtor = reinterpret_cast(alternateCtorHnd); if (alternateCtor != methToCall) @@ -9212,7 +9292,7 @@ void Interpreter::DoCallWork(bool virtualCall, void* thisArg, CORINFO_RESOLVED_T unsigned totalArgsOnILStack = totalSigArgs; if (m_callThisArg != NULL) { - assert(totalArgsOnILStack > 0); + _ASSERTE(totalArgsOnILStack > 0); totalArgsOnILStack--; } @@ -9279,7 +9359,7 @@ void Interpreter::DoCallWork(bool virtualCall, void* thisArg, CORINFO_RESOLVED_T int curArgSlot = 0; // The operand stack index of the first IL argument. - assert(m_curStackHt >= totalArgsOnILStack); + _ASSERTE(m_curStackHt >= totalArgsOnILStack); int argsBase = m_curStackHt - totalArgsOnILStack; // Current on-stack argument index. @@ -9290,7 +9370,7 @@ void Interpreter::DoCallWork(bool virtualCall, void* thisArg, CORINFO_RESOLVED_T if (m_constrainedFlag) { - _ASSERT(m_callThisArg == NULL); // "m_callThisArg" non-null only for .ctor, which are not callvirts. + _ASSERTE(m_callThisArg == NULL); // "m_callThisArg" non-null only for .ctor, which are not callvirts. CorInfoType argCIT = OpStackTypeGet(argsBase + arg).ToCorInfoType(); if (argCIT != CORINFO_TYPE_BYREF) @@ -9311,7 +9391,7 @@ void Interpreter::DoCallWork(bool virtualCall, void* thisArg, CORINFO_RESOLVED_T { GCX_PREEMP(); DWORD clsAttribs = m_interpCeeInfo.getClassAttribs(m_constrainedResolvedToken.hClass); - assert((clsAttribs & CORINFO_FLG_VALUECLASS) == 0); + _ASSERTE((clsAttribs & CORINFO_FLG_VALUECLASS) == 0); } #endif // _DEBUG { @@ -9449,14 +9529,14 @@ void Interpreter::DoCallWork(bool virtualCall, void* thisArg, CORINFO_RESOLVED_T // should have thrown OOM if it was unable to allocate an instance. if (m_callThisArg == NULL) { - assert(!methToCall->IsStatic()); + _ASSERTE(!methToCall->IsStatic()); ThrowNullPointerException(); } // ...except in the case of strings, which are both // allocated and initialized by their special constructor. else { - assert(methToCall->IsCtor() && methToCall->GetMethodTable()->IsString()); + _ASSERTE(methToCall->IsCtor() && methToCall->GetMethodTable()->IsString()); } } curArgSlot++; @@ -9506,7 +9586,7 @@ void Interpreter::DoCallWork(bool virtualCall, void* thisArg, CORINFO_RESOLVED_T #endif // defined(HOST_ARM) ) { - assert(retTypeClsHnd != NULL); + _ASSERTE(retTypeClsHnd != NULL); retTypeIt = InterpreterType(&m_interpCeeInfo, retTypeClsHnd); retTypeSz = retTypeIt.Size(&m_interpCeeInfo); @@ -9565,7 +9645,7 @@ void Interpreter::DoCallWork(bool virtualCall, void* thisArg, CORINFO_RESOLVED_T if (((sigInfo.callConv & CORINFO_CALLCONV_VARARG) != 0) && sigInfo.isVarArg()) { - assert(vaSigCookie != nullptr); + _ASSERTE(vaSigCookie != nullptr); args[curArgSlot] = PtrToArgSlot(vaSigCookie); argTypes[curArgSlot] = InterpreterType(CORINFO_TYPE_NATIVEINT); curArgSlot++; @@ -9592,7 +9672,7 @@ void Interpreter::DoCallWork(bool virtualCall, void* thisArg, CORINFO_RESOLVED_T if (sigInfo.hasTypeArg()) { // If we still have a type argument, we're calling an ArrayOpStub and need to pass the array TypeHandle. - assert(methToCall->IsArray()); + _ASSERTE(methToCall->IsArray()); doNotCache = true; args[curArgSlot] = PtrToArgSlot(exactClass); argTypes[curArgSlot] = InterpreterType(CORINFO_TYPE_NATIVEINT); @@ -9696,7 +9776,7 @@ void Interpreter::DoCallWork(bool virtualCall, void* thisArg, CORINFO_RESOLVED_T { PCODE pCode; - assert(thisArgHnd != NULL); + _ASSERTE(thisArgHnd != NULL); OBJECTREF objRef = ObjectToOBJECTREF(*thisArgHnd); GCPROTECT_BEGIN(objRef); pCode = methToCall->GetMultiCallableAddrOfVirtualizedCode(&objRef, methToCall->GetMethodTable()); @@ -9711,7 +9791,7 @@ void Interpreter::DoCallWork(bool virtualCall, void* thisArg, CORINFO_RESOLVED_T MethodTable* dispatchingMT = NULL; if (exactMethToCall->IsVtableMethod()) { - assert(thisArgHnd != NULL); + _ASSERTE(thisArgHnd != NULL); dispatchingMT = (*thisArgHnd)->GetMethodTable(); } GCX_PREEMP(); @@ -9725,11 +9805,11 @@ void Interpreter::DoCallWork(bool virtualCall, void* thisArg, CORINFO_RESOLVED_T // If we're interpreting the method, simply call it directly. if (InterpretationStubToMethodInfo(target) == exactMethToCall) { - assert(!exactMethToCall->IsILStub()); + _ASSERTE(!exactMethToCall->IsILStub()); InterpreterMethodInfo* methInfo = MethodHandleToInterpreterMethInfoPtr(CORINFO_METHOD_HANDLE(exactMethToCall)); - assert(methInfo != NULL); + _ASSERTE(methInfo != NULL); #if INTERP_ILCYCLE_PROFILE - bool b = CycleTimer::GetThreadCyclesS(&startCycles); assert(b); + bool b = CycleTimer::GetThreadCyclesS(&startCycles); _ASSERTE(b); #endif // INTERP_ILCYCLE_PROFILE retVal = InterpretMethodBody(methInfo, true, reinterpret_cast(args), NULL); pCscd = NULL; // Nothing to cache. @@ -9740,7 +9820,7 @@ void Interpreter::DoCallWork(bool virtualCall, void* thisArg, CORINFO_RESOLVED_T // We've already resolved the virtual call target above, so there is no need to do it again. MethodDescCallSite mdcs(exactMethToCall, &msig, target); #if INTERP_ILCYCLE_PROFILE - bool b = CycleTimer::GetThreadCyclesS(&startCycles); assert(b); + bool b = CycleTimer::GetThreadCyclesS(&startCycles); _ASSERTE(b); #endif // INTERP_ILCYCLE_PROFILE mdcs.CallTargetWorker(args, &retVal, sizeof(retVal)); @@ -9766,7 +9846,7 @@ void Interpreter::DoCallWork(bool virtualCall, void* thisArg, CORINFO_RESOLVED_T } #if INTERP_ILCYCLE_PROFILE unsigned __int64 endCycles; - bool b = CycleTimer::GetThreadCyclesS(&endCycles); assert(b); + bool b = CycleTimer::GetThreadCyclesS(&endCycles); _ASSERTE(b); m_exemptCycles += (endCycles - startCycles); #endif // INTERP_ILCYCLE_PROFILE @@ -9875,7 +9955,7 @@ void Interpreter::DoCallWork(bool virtualCall, void* thisArg, CORINFO_RESOLVED_T #endif // defined(HOST_ARM) if (pLargeStructRetVal != NULL) { - assert(hasRetBuffArg); + _ASSERTE(hasRetBuffArg); void* dst = LargeStructOperandStackPush(retTypeSz); CopyValueClassUnchecked(dst, pLargeStructRetVal, GetMethodTableFromClsHnd(retTypeClsHnd)); OpStackSet(m_curStackHt, dst); @@ -9917,7 +9997,7 @@ void Interpreter::DoCallWork(bool virtualCall, void* thisArg, CORINFO_RESOLVED_T // Originally, this assertion was in the ValueClass case above, but it does a COOP->PREEMP // transition, and therefore causes a GC, and we're GCX_FORBIDden from doing a GC while retVal // is vulnerable. So, for completeness, do it here. - assert(sigInfo.retType != CORINFO_TYPE_VALUECLASS || retTypeIt == InterpreterType(&m_interpCeeInfo, retTypeClsHnd)); + _ASSERTE(sigInfo.retType != CORINFO_TYPE_VALUECLASS || retTypeIt == InterpreterType(&m_interpCeeInfo, retTypeClsHnd)); // If we created a cached call site, cache it now (when it's safe to take a GC). if (pCscd != NULL && !doNotCache) @@ -10019,7 +10099,7 @@ void Interpreter::CallI() // The operand stack index of the first IL argument. unsigned totalArgPositions = totalArgsOnILStack + 1; // + 1 for the ftn argument. - assert(m_curStackHt >= totalArgPositions); + _ASSERTE(m_curStackHt >= totalArgPositions); int argsBase = m_curStackHt - totalArgPositions; // Current on-stack argument index. @@ -10166,7 +10246,7 @@ void Interpreter::CallI() unsigned ftnInd = m_curStackHt - 1; #ifdef _DEBUG CorInfoType ftnType = OpStackTypeGet(ftnInd).ToCorInfoType(); - assert(ftnType == CORINFO_TYPE_NATIVEINT + _ASSERTE(ftnType == CORINFO_TYPE_NATIVEINT || ftnType == CORINFO_TYPE_INT || ftnType == CORINFO_TYPE_LONG); #endif // DEBUG @@ -10179,9 +10259,9 @@ void Interpreter::CallI() if ((methToCall = InterpretationStubToMethodInfo((PCODE)ftnPtr)) != NULL) { InterpreterMethodInfo* methInfo = MethodHandleToInterpreterMethInfoPtr(CORINFO_METHOD_HANDLE(methToCall)); - assert(methInfo != NULL); + _ASSERTE(methInfo != NULL); #if INTERP_ILCYCLE_PROFILE - bool b = CycleTimer::GetThreadCyclesS(&startCycles); assert(b); + bool b = CycleTimer::GetThreadCyclesS(&startCycles); _ASSERTE(b); #endif // INTERP_ILCYCLE_PROFILE retVal = InterpretMethodBody(methInfo, true, reinterpret_cast(args), NULL); } @@ -10284,7 +10364,7 @@ void Interpreter::CallI() // is protected by being fully "on" the operandStack. if (pLargeStructRetVal != NULL) { - assert(hasRetBuffArg); + _ASSERTE(hasRetBuffArg); void* dst = LargeStructOperandStackPush(retTypeSz); CopyValueClassUnchecked(dst, pLargeStructRetVal, GetMethodTableFromClsHnd(retTypeClsHnd)); OpStackSet(m_curStackHt, dst); @@ -10324,7 +10404,7 @@ void Interpreter::CallI() // Originally, this assertion was in the ValueClass case above, but it does a COOP->PREEMP // transition, and therefore causes a GC, and we're GCX_FORBIDden from doing a GC while retVal // is vulnerable. So, for completeness, do it here. - assert(sigInfo.retType != CORINFO_TYPE_VALUECLASS || retTypeIt == InterpreterType(&m_interpCeeInfo, retTypeClsHnd)); + _ASSERTE(sigInfo.retType != CORINFO_TYPE_VALUECLASS || retTypeIt == InterpreterType(&m_interpCeeInfo, retTypeClsHnd)); m_ILCodePtr += 5; } @@ -10357,7 +10437,7 @@ bool Interpreter::IsDeadSimpleGetter(CEEInfo* info, MethodDesc* pMD, size_t* off return false; if (*codePtr != CEE_LDSFLD) return false; - assert(ILOffsetOfLdSFldInDeadSimpleStaticGetter == 0); + _ASSERTE(ILOffsetOfLdSFldInDeadSimpleStaticGetter == 0); *offsetOfLd = 0; codePtr += 5; return (*codePtr == CEE_RET); @@ -10383,7 +10463,7 @@ bool Interpreter::IsDeadSimpleGetter(CEEInfo* info, MethodDesc* pMD, size_t* off if (*codePtr != CEE_LDFLD) return false; *offsetOfLd = codePtr - methInfo.ILCode; - assert((dbg && ILOffsetOfLdFldInDeadSimpleInstanceGetterDbg == *offsetOfLd) + _ASSERTE((dbg && ILOffsetOfLdFldInDeadSimpleInstanceGetterDbg == *offsetOfLd) || (!dbg && ILOffsetOfLdFldInDeadSimpleInstanceGetterOpt == *offsetOfLd)); codePtr += 5; if (dbg) @@ -10411,7 +10491,7 @@ void Interpreter::DoStringLength() MODE_COOPERATIVE; } CONTRACTL_END; - assert(m_curStackHt > 0); + _ASSERTE(m_curStackHt > 0); unsigned ind = m_curStackHt - 1; #ifdef _DEBUG @@ -10450,7 +10530,7 @@ void Interpreter::DoStringGetChar() MODE_COOPERATIVE; } CONTRACTL_END; - assert(m_curStackHt >= 2); + _ASSERTE(m_curStackHt >= 2); unsigned strInd = m_curStackHt - 2; unsigned indexInd = strInd + 1; @@ -10510,7 +10590,7 @@ void Interpreter::DoGetTypeFromHandle() MODE_COOPERATIVE; } CONTRACTL_END; - assert(m_curStackHt > 0); + _ASSERTE(m_curStackHt > 0); unsigned ind = m_curStackHt - 1; #ifdef _DEBUG @@ -10538,8 +10618,8 @@ void Interpreter::DoByReferenceCtor() } CONTRACTL_END; // Note 'this' is not passed on the operand stack... - assert(m_curStackHt > 0); - assert(m_callThisArg != NULL); + _ASSERTE(m_curStackHt > 0); + _ASSERTE(m_callThisArg != NULL); unsigned valInd = m_curStackHt - 1; CorInfoType valCit = OpStackTypeGet(valInd).ToCorInfoType(); @@ -10572,7 +10652,7 @@ void Interpreter::DoByReferenceValue() MODE_COOPERATIVE; } CONTRACTL_END; - assert(m_curStackHt > 0); + _ASSERTE(m_curStackHt > 0); unsigned slot = m_curStackHt - 1; CorInfoType thisCit = OpStackTypeGet(slot).ToCorInfoType(); @@ -10615,6 +10695,20 @@ void Interpreter::DoSIMDHwAccelerated() LdIcon(1); } + +void Interpreter::DoGetIsSupported() +{ + CONTRACTL{ + THROWS; + GC_TRIGGERS; + MODE_COOPERATIVE; + } CONTRACTL_END; + + OpStackSet(m_curStackHt, false); + OpStackTypeSet(m_curStackHt, InterpreterType(CORINFO_TYPE_INT)); + m_curStackHt++; +} + void Interpreter::RecordConstrainedCall() { CONTRACTL { @@ -10657,7 +10751,7 @@ void Interpreter::LargeStructOperandStackEnsureCanPush(size_t sz) void* Interpreter::LargeStructOperandStackPush(size_t sz) { LargeStructOperandStackEnsureCanPush(sz); - assert(m_largeStructOperandStackAllocSize >= m_largeStructOperandStackHt + sz); + _ASSERTE(m_largeStructOperandStackAllocSize >= m_largeStructOperandStackHt + sz); void* res = &m_largeStructOperandStack[m_largeStructOperandStackHt]; m_largeStructOperandStackHt += sz; return res; @@ -10667,7 +10761,7 @@ void Interpreter::LargeStructOperandStackPop(size_t sz, void* fromAddr) { if (!IsInLargeStructLocalArea(fromAddr)) { - assert(m_largeStructOperandStackHt >= sz); + _ASSERTE(m_largeStructOperandStackHt >= sz); m_largeStructOperandStackHt -= sz; } } @@ -10683,7 +10777,7 @@ bool Interpreter::LargeStructStackHeightIsValid() sz2 += OpStackTypeGet(k).Size(&m_interpCeeInfo); } } - assert(sz2 == m_largeStructOperandStackHt); + _ASSERTE(sz2 == m_largeStructOperandStackHt); return sz2 == m_largeStructOperandStackHt; } #endif // _DEBUG @@ -10825,7 +10919,7 @@ void Interpreter::RecordInterpreterStubForMethodDesc(CORINFO_METHOD_HANDLE md, v AddrToMDMap* map = Interpreter::GetAddrToMdMap(); #ifdef _DEBUG CORINFO_METHOD_HANDLE dummy; - assert(!map->Lookup(addr, &dummy)); + _ASSERTE(!map->Lookup(addr, &dummy)); #endif // DEBUG map->AddOrReplace(KeyValuePair(addr, md)); } @@ -11202,7 +11296,7 @@ unsigned Interpreter::s_calls = 0; void Interpreter::UpdateCycleCount() { unsigned __int64 endCycles; - bool b = CycleTimer::GetThreadCyclesS(&endCycles); assert(b); + bool b = CycleTimer::GetThreadCyclesS(&endCycles); _ASSERTE(b); if (m_instr != CEE_COUNT) { unsigned __int64 delta = (endCycles - m_startCycles); @@ -11218,7 +11312,7 @@ void Interpreter::UpdateCycleCount() if (m_instr == CEE_PREFIX1) { m_instr = *(m_ILCodePtr + 1) + 0x100; } - b = CycleTimer::GetThreadCyclesS(&m_startCycles); assert(b); + b = CycleTimer::GetThreadCyclesS(&m_startCycles); _ASSERTE(b); } #endif // INTERP_ILCYCLE_PROFILE @@ -11282,7 +11376,7 @@ void InterpreterCache::EnsureCanInsert() // Otherwise, must make room. if (m_allocSize == 0) { - assert(m_count == 0); + _ASSERTE(m_count == 0); m_pairs = new KeyValPair[InitSize]; m_allocSize = InitSize; #ifdef _DEBUG @@ -11317,7 +11411,7 @@ bool InterpreterCache::AddItem(Key key, Val val) } if (firstGreaterOrEqual < m_count && m_pairs[firstGreaterOrEqual].m_key == key) { - assert(m_pairs[firstGreaterOrEqual].m_val == val); + _ASSERTE(m_pairs[firstGreaterOrEqual].m_val == val); return false; } // Move everything starting at firstGreater up one index (if necessary) @@ -11359,7 +11453,7 @@ bool InterpreterCache::GetItem(Key key, Val& v) } else { - assert(key > midKey); + _ASSERTE(key > midKey); lo = mid + 1; } } @@ -11473,7 +11567,7 @@ const char* eeGetMethodFullName(CEEInfo* info, CORINFO_METHOD_HANDLE hnd, const } else { - assert(strlen(".") == 7); + _ASSERTE(strlen(".") == 7); length = 7; } @@ -11551,7 +11645,7 @@ const char* eeGetMethodFullName(CEEInfo* info, CORINFO_METHOD_HANDLE hnd, const strcat_s(retName, length, returnType); } - assert(strlen(retName) == length - 1); + _ASSERTE(strlen(retName) == length - 1); return(retName); } @@ -11610,7 +11704,7 @@ void Interpreter::PrintOStack() for (unsigned k = 0; k < m_curStackHt; k++) { CorInfoType cit = OpStackTypeGet(k).ToCorInfoType(); - assert(IsStackNormalType(cit)); + _ASSERTE(IsStackNormalType(cit)); fprintf(GetLogFile(), " %4d: %10s: ", k, CorInfoTypeNames[cit]); PrintOStackValue(k); fprintf(GetLogFile(), "\n"); @@ -11841,7 +11935,7 @@ int _cdecl Interpreter::CompareMethInfosByInvocations(const void* mi0in, const v } else { - assert(mi0->m_invocations > mi1->m_invocations); + _ASSERTE(mi0->m_invocations > mi1->m_invocations); return 1; } } @@ -11855,7 +11949,7 @@ int _cdecl Interpreter::CompareMethInfosByILInstrs(const void* mi0in, const void else if (mi0->m_totIlInstructionsExeced == mi1->m_totIlInstructionsExeced) return 0; else { - assert(mi0->m_totIlInstructionsExeced > mi1->m_totIlInstructionsExeced); + _ASSERTE(mi0->m_totIlInstructionsExeced > mi1->m_totIlInstructionsExeced); return -1; } } @@ -12082,7 +12176,7 @@ void Interpreter::PrintPostMortemData() continue; // Don't count these if they occur... } ieps[i].m_cycles = s_ILInstrCycles[i]; - assert((ieps[i].m_execs != 0) || (ieps[i].m_cycles == 0)); // Cycles can be zero for non-zero execs because of measurement correction. + _ASSERTE((ieps[i].m_execs != 0) || (ieps[i].m_cycles == 0)); // Cycles can be zero for non-zero execs because of measurement correction. #endif // INTERP_ILCYCLE_PROFILE } for (unsigned short i = 0; i < CountIlInstr2Byte; i++) @@ -12091,7 +12185,7 @@ void Interpreter::PrintPostMortemData() ieps[ind].m_instr = i; ieps[ind].m_is2byte = true; ieps[ind].m_execs = s_ILInstr2ByteExecs[i]; #if INTERP_ILCYCLE_PROFILE ieps[ind].m_cycles = s_ILInstrCycles[ind]; - assert((ieps[i].m_execs != 0) || (ieps[i].m_cycles == 0)); // Cycles can be zero for non-zero execs because of measurement correction. + _ASSERTE((ieps[i].m_execs != 0) || (ieps[i].m_cycles == 0)); // Cycles can be zero for non-zero execs because of measurement correction. #endif // INTERP_ILCYCLE_PROFILE } diff --git a/src/coreclr/src/vm/interpreter.h b/src/coreclr/src/vm/interpreter.h index fe9c7bc18b70..091a36eb3d50 100644 --- a/src/coreclr/src/vm/interpreter.h +++ b/src/coreclr/src/vm/interpreter.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef INTERPRETER_H_DEFINED @@ -13,6 +12,8 @@ #include "stack.h" #include "crst.h" #include "callhelpers.h" +#include "codeversion.h" +#include "clr_std/type_traits" typedef SSIZE_T NativeInt; typedef SIZE_T NativeUInt; @@ -88,16 +89,20 @@ bool CorInfoTypeIsIntegral(CorInfoType cit); // Returns true iff "cet" is an unsigned integral type. bool CorElemTypeIsUnsigned(CorElementType cet); -// Returns true iff "cit" is an integral type. +// Returns true iff "cit" is a floating-point type. bool CorInfoTypeIsFloatingPoint(CorInfoType cit); +// Returns true iff "cihet" is a floating-point type (float or double). +// TODO: Handle Vector64, Vector128? +bool CorInfoTypeIsFloatingPoint(CorInfoHFAElemType cihet); + // Returns true iff "cit" is a pointer type (mgd/unmgd pointer, or native int). bool CorInfoTypeIsPointer(CorInfoType cit); // Requires that "cit" is stack-normal; returns its (byte) size. inline size_t CorInfoTypeStackNormalSize(CorInfoType cit) { - assert(IsStackNormalType(cit)); + _ASSERTE(IsStackNormalType(cit)); return CorInfoTypeSize(cit); } @@ -159,14 +164,14 @@ class InterpreterType InterpreterType(CorInfoType cit) : m_tp(reinterpret_cast((static_cast(cit) << 2))) { - assert(cit != CORINFO_TYPE_VALUECLASS); + _ASSERTE(cit != CORINFO_TYPE_VALUECLASS); } // Requires that "cet" is not ELEMENT_TYPE_VALUETYPE. InterpreterType(CorElementType cet) : m_tp(reinterpret_cast((static_cast(CEEInfo::asCorInfoType(cet)) << 2))) { - assert(cet != ELEMENT_TYPE_VALUETYPE); + _ASSERTE(cet != ELEMENT_TYPE_VALUETYPE); } InterpreterType(CEEInfo* comp, CORINFO_CLASS_HANDLE sh) @@ -178,7 +183,7 @@ class InterpreterType if (typHnd.IsNativeValueType()) { intptr_t shAsInt = reinterpret_cast(sh); - assert((shAsInt & 0x1) == 0); // The 0x2 bit might already be set by the VM! This is ok, because it's only set for native value types. This is a bit slimey... + _ASSERTE((shAsInt & 0x1) == 0); // The 0x2 bit might already be set by the VM! This is ok, because it's only set for native value types. This is a bit slimey... m_tp = reinterpret_cast(shAsInt | 0x2); } else @@ -190,9 +195,9 @@ class InterpreterType } else { - assert((comp->getClassAttribs(sh) & CORINFO_FLG_VALUECLASS) != 0); + _ASSERTE((comp->getClassAttribs(sh) & CORINFO_FLG_VALUECLASS) != 0); intptr_t shAsInt = reinterpret_cast(sh); - assert((shAsInt & 0x3) == 0); + _ASSERTE((shAsInt & 0x3) == 0); intptr_t bits = 0x1; // All value classes (structs) get 0x1 set. if (getClassSize(sh) > sizeof(INT64)) { @@ -246,7 +251,7 @@ class InterpreterType LIMITED_METHOD_CONTRACT; intptr_t asInt = reinterpret_cast(m_tp); - assert((asInt & 0x3) != 0); + _ASSERTE((asInt & 0x3) != 0); return reinterpret_cast(asInt & (~0x3)); } @@ -277,7 +282,7 @@ class InterpreterType // is the low-bit encoding of "native struct type" both for InterpreterType and for // TypeHandle. TypeHandle typHnd(m_tp); - assert(typHnd.IsNativeValueType()); + _ASSERTE(typHnd.IsNativeValueType()); return typHnd.AsNativeValueType()->GetNativeSize(); } else @@ -298,7 +303,7 @@ class InterpreterType size_t StackNormalSize() const { CorInfoType cit = ToCorInfoType(); - assert(IsStackNormalType(cit)); // Precondition. + _ASSERTE(IsStackNormalType(cit)); // Precondition. return CorInfoTypeStackNormalSize(cit); } @@ -700,7 +705,7 @@ struct InterpreterMethodInfo void SetPinningBit(unsigned locNum); bool GetPinningBit(unsigned locNum); - CORINFO_METHOD_HANDLE GetPreciseGenericsContext(Object* thisArg, void* genericsCtxtArg); + CORINFO_CONTEXT_HANDLE GetPreciseGenericsContext(Object* thisArg, void* genericsCtxtArg); #ifndef DACCESS_COMPILE // Gets the proper cache for a call to a method with the current InterpreterMethodInfo, with the given @@ -1040,8 +1045,8 @@ class Interpreter private: unsigned CurOffset() { - assert(m_methInfo->m_ILCode <= m_ILCodePtr && - m_ILCodePtr < m_methInfo->m_ILCodeEnd); + _ASSERTE(m_methInfo->m_ILCode <= m_ILCodePtr && + m_ILCodePtr < m_methInfo->m_ILCodeEnd); unsigned res = static_cast(m_ILCodePtr - m_methInfo->m_ILCode); return res; } @@ -1147,7 +1152,7 @@ class Interpreter { BYTE* base = GetFrameBase(); BYTE* addr = base + m_methInfo->m_localDescs[locNum].m_offset; - assert(IsInLargeStructLocalArea(addr)); + _ASSERTE(IsInLargeStructLocalArea(addr)); return addr; } @@ -1224,7 +1229,7 @@ class Interpreter __forceinline INT64 GetSmallStructValue(void* src, size_t sz) { - assert(sz <= sizeof(INT64)); + _ASSERTE(sz <= sizeof(INT64)); INT64 ret = 0; memcpy(ArgSlotEndianessFixup(reinterpret_cast(&ret), sz), src, sz); @@ -1272,7 +1277,7 @@ class Interpreter __forceinline void OpStackTypeSet(unsigned ind, InterpreterType it) { - assert(IsStackNormalType(it.ToCorInfoType())); + _ASSERTE(IsStackNormalType(it.ToCorInfoType())); m_operandStackX[ind].m_type = it; } #endif @@ -1284,7 +1289,7 @@ class Interpreter __forceinline void OpStackTypeSet(unsigned ind, InterpreterType it) { - assert(IsStackNormalType(it.ToCorInfoType())); + _ASSERTE(IsStackNormalType(it.ToCorInfoType())); m_operandStackTypes[ind] = it; } #endif @@ -1356,7 +1361,7 @@ class Interpreter { m_thisExecCache = m_methInfo->GetCacheForCall(m_thisArg, m_genericsCtxtArg, alloc); } - assert(!alloc || m_thisExecCache != NULL); + _ASSERTE(!alloc || m_thisExecCache != NULL); return m_thisExecCache; } @@ -1767,12 +1772,13 @@ class Interpreter void DoByReferenceCtor(); void DoByReferenceValue(); void DoSIMDHwAccelerated(); + void DoGetIsSupported(); // Returns the proper generics context for use in resolving tokens ("precise" in the sense of including generic instantiation // information). - CORINFO_METHOD_HANDLE m_preciseGenericsContext; + CORINFO_CONTEXT_HANDLE m_preciseGenericsContext; - CORINFO_METHOD_HANDLE GetPreciseGenericsContext() + CORINFO_CONTEXT_HANDLE GetPreciseGenericsContext() { if (m_preciseGenericsContext == NULL) { diff --git a/src/coreclr/src/vm/interpreter.hpp b/src/coreclr/src/vm/interpreter.hpp index 238cfaa9ecf9..1c18fdd81294 100644 --- a/src/coreclr/src/vm/interpreter.hpp +++ b/src/coreclr/src/vm/interpreter.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/vm/invokeutil.cpp b/src/coreclr/src/vm/invokeutil.cpp index a42f638cc84d..7c1790821db7 100644 --- a/src/coreclr/src/vm/invokeutil.cpp +++ b/src/coreclr/src/vm/invokeutil.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/invokeutil.h b/src/coreclr/src/vm/invokeutil.h index 22d6716b9708..b65cf834b438 100644 --- a/src/coreclr/src/vm/invokeutil.h +++ b/src/coreclr/src/vm/invokeutil.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/ipcstreamfactory.cpp b/src/coreclr/src/vm/ipcstreamfactory.cpp index 33d36e93de5b..3d9987b09a8c 100644 --- a/src/coreclr/src/vm/ipcstreamfactory.cpp +++ b/src/coreclr/src/vm/ipcstreamfactory.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "diagnosticsprotocol.h" @@ -203,4 +202,4 @@ IpcStream *IpcStreamFactory::GetNextAvailableStream(ErrorCallback callback) return pStream; } -#endif // FEATURE_PERFTRACING \ No newline at end of file +#endif // FEATURE_PERFTRACING diff --git a/src/coreclr/src/vm/ipcstreamfactory.h b/src/coreclr/src/vm/ipcstreamfactory.h index 04d92bef8462..d65994a1e11d 100644 --- a/src/coreclr/src/vm/ipcstreamfactory.h +++ b/src/coreclr/src/vm/ipcstreamfactory.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __IPC_STREAM_FACTORY_H__ #define __IPC_STREAM_FACTORY_H__ @@ -100,4 +99,4 @@ class IpcStreamFactory #endif // FEATURE_PERFTRACING -#endif // __IPC_STREAM_FACTORY_H__ \ No newline at end of file +#endif // __IPC_STREAM_FACTORY_H__ diff --git a/src/coreclr/src/vm/iterator_util.h b/src/coreclr/src/vm/iterator_util.h index dadc75d1a37e..7a6026d8c2ce 100644 --- a/src/coreclr/src/vm/iterator_util.h +++ b/src/coreclr/src/vm/iterator_util.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: iterator_util.h // diff --git a/src/coreclr/src/vm/jithelpers.cpp b/src/coreclr/src/vm/jithelpers.cpp index d502f8d750d5..54e0cb016609 100644 --- a/src/coreclr/src/vm/jithelpers.cpp +++ b/src/coreclr/src/vm/jithelpers.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. @@ -5206,7 +5205,7 @@ void JIT_Patchpoint(int* counter, int ilOffset) return; } - LONG newFlags = ppInfo->m_flags | PerPatchpointInfo::patchpoint_triggered; + LONG newFlags = oldFlags | PerPatchpointInfo::patchpoint_triggered; BOOL triggerTransition = InterlockedCompareExchange(&ppInfo->m_flags, newFlags, oldFlags) == oldFlags; if (!triggerTransition) @@ -5238,8 +5237,8 @@ void JIT_Patchpoint(int* counter, int ilOffset) if (osrMethodCode == NULL) { // Unexpected, but not fatal - STRESS_LOG4(LF_TIEREDCOMPILATION, LL_WARNING, "Jit_Patchpoint: patchpoint (0x%p) OSR method creation failed," - " marking patchpoint invalid for Method=0x%pM il offset %d\n", ip, hitCount, pMD, ilOffset); + STRESS_LOG3(LF_TIEREDCOMPILATION, LL_WARNING, "Jit_Patchpoint: patchpoint (0x%p) OSR method creation failed," + " marking patchpoint invalid for Method=0x%pM il offset %d\n", ip, pMD, ilOffset); InterlockedOr(&ppInfo->m_flags, (LONG)PerPatchpointInfo::patchpoint_invalid); return; @@ -5279,8 +5278,9 @@ void JIT_Patchpoint(int* counter, int ilOffset) if ((UINT_PTR)ip != GetIP(&frameContext)) { // Should be fatal - STRESS_LOG2(LF_TIEREDCOMPILATION, LL_INFO10, "Jit_Patchpoint: patchpoint (0x%p) TRANSITION" + STRESS_LOG2(LF_TIEREDCOMPILATION, LL_FATALERROR, "Jit_Patchpoint: patchpoint (0x%p) TRANSITION" " unexpected context IP 0x%p\n", ip, GetIP(&frameContext)); + EEPOLICY_HANDLE_FATAL_ERROR(COR_E_EXECUTIONENGINE); } // Now unwind back to the original method caller frame. diff --git a/src/coreclr/src/vm/jithost.cpp b/src/coreclr/src/vm/jithost.cpp index 25deef866bd8..d9b73512a3ca 100644 --- a/src/coreclr/src/vm/jithost.cpp +++ b/src/coreclr/src/vm/jithost.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" diff --git a/src/coreclr/src/vm/jithost.h b/src/coreclr/src/vm/jithost.h index 21094e519978..4695eaafebc3 100644 --- a/src/coreclr/src/vm/jithost.h +++ b/src/coreclr/src/vm/jithost.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __JITHOST_H__ #define __JITHOST_H__ diff --git a/src/coreclr/src/vm/jitinterface.cpp b/src/coreclr/src/vm/jitinterface.cpp index 9a4f1191ac7d..99073bec81fa 100644 --- a/src/coreclr/src/vm/jitinterface.cpp +++ b/src/coreclr/src/vm/jitinterface.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: JITinterface.CPP // @@ -183,7 +182,7 @@ BOOL ModifyCheckForDynamicMethod(DynamicResolver *pResolver, /*****************************************************************************/ // Initialize from data we passed across to the JIT -inline static void GetTypeContext(const CORINFO_SIG_INST *info, SigTypeContext *pTypeContext) +void CEEInfo::GetTypeContext(const CORINFO_SIG_INST *info, SigTypeContext *pTypeContext) { LIMITED_METHOD_CONTRACT; SigTypeContext::InitTypeContext( @@ -192,9 +191,13 @@ inline static void GetTypeContext(const CORINFO_SIG_INST *info, SigTypeContext * pTypeContext); } -static MethodDesc* GetMethodFromContext(CORINFO_CONTEXT_HANDLE context) +MethodDesc* CEEInfo::GetMethodFromContext(CORINFO_CONTEXT_HANDLE context) { LIMITED_METHOD_CONTRACT; + + if (context == METHOD_BEING_COMPILED_CONTEXT()) + return m_pMethodBeingCompiled; + if (((size_t) context & CORINFO_CONTEXTFLAGS_MASK) == CORINFO_CONTEXTFLAGS_CLASS) { return NULL; @@ -205,24 +208,27 @@ static MethodDesc* GetMethodFromContext(CORINFO_CONTEXT_HANDLE context) } } -static TypeHandle GetTypeFromContext(CORINFO_CONTEXT_HANDLE context) +TypeHandle CEEInfo::GetTypeFromContext(CORINFO_CONTEXT_HANDLE context) { LIMITED_METHOD_CONTRACT; + + if (context == METHOD_BEING_COMPILED_CONTEXT()) + return m_pMethodBeingCompiled->GetMethodTable(); + if (((size_t) context & CORINFO_CONTEXTFLAGS_MASK) == CORINFO_CONTEXTFLAGS_CLASS) { return TypeHandle((CORINFO_CLASS_HANDLE) ((size_t) context & ~CORINFO_CONTEXTFLAGS_MASK)); } else { - MethodTable * pMT = GetMethodFromContext(context)->GetMethodTable(); - return TypeHandle(pMT); + return GetMethod((CORINFO_METHOD_HANDLE)((size_t)context & ~CORINFO_CONTEXTFLAGS_MASK))->GetMethodTable(); } } // Initialize from a context parameter passed to the JIT and back. This is a parameter // that indicates which method is being jitted. -inline static void GetTypeContext(CORINFO_CONTEXT_HANDLE context, SigTypeContext *pTypeContext) +void CEEInfo::GetTypeContext(CORINFO_CONTEXT_HANDLE context, SigTypeContext *pTypeContext) { CONTRACTL { @@ -232,9 +238,10 @@ inline static void GetTypeContext(CORINFO_CONTEXT_HANDLE context, SigTypeContext PRECONDITION(context != NULL); } CONTRACTL_END; - if (GetMethodFromContext(context)) + MethodDesc* pMD = GetMethodFromContext(context); + if (pMD != NULL) { - SigTypeContext::InitTypeContext(GetMethodFromContext(context), pTypeContext); + SigTypeContext::InitTypeContext(pMD, pTypeContext); } else { @@ -242,29 +249,14 @@ inline static void GetTypeContext(CORINFO_CONTEXT_HANDLE context, SigTypeContext } } -static BOOL ContextIsShared(CORINFO_CONTEXT_HANDLE context) -{ - LIMITED_METHOD_CONTRACT; - MethodDesc *pContextMD = GetMethodFromContext(context); - if (pContextMD != NULL) - { - return pContextMD->IsSharedByGenericInstantiations(); - } - else - { - // Type handle contexts are non-shared and are used for inlining of - // non-generic methods in generic classes - return FALSE; - } -} - // Returns true if context is providing any generic variables -static BOOL ContextIsInstantiated(CORINFO_CONTEXT_HANDLE context) +BOOL CEEInfo::ContextIsInstantiated(CORINFO_CONTEXT_HANDLE context) { LIMITED_METHOD_CONTRACT; - if (GetMethodFromContext(context)) + MethodDesc* pMD = GetMethodFromContext(context); + if (pMD != NULL) { - return GetMethodFromContext(context)->HasClassOrMethodInstantiation(); + return pMD->HasClassOrMethodInstantiation(); } else { @@ -574,6 +566,11 @@ CEEInfo::ConvToJitSig( sigRet->args = (CORINFO_ARG_LIST_HANDLE)sig.GetPtr(); } + if (sigRet->callConv == CORINFO_CALLCONV_UNMANAGED) + { + COMPlusThrowHR(E_NOTIMPL); + } + // Set computed flags sigRet->flags = sigRetFlags; @@ -936,17 +933,20 @@ CorInfoHelpFunc CEEInfo::getLazyStringLiteralHelper(CORINFO_MODULE_HANDLE handle CHECK CheckContext(CORINFO_MODULE_HANDLE scopeHnd, CORINFO_CONTEXT_HANDLE context) { - CHECK_MSG(scopeHnd != NULL, "Illegal null scope"); - CHECK_MSG(((size_t) context & ~CORINFO_CONTEXTFLAGS_MASK) != NULL, "Illegal null context"); - if (((size_t) context & CORINFO_CONTEXTFLAGS_MASK) == CORINFO_CONTEXTFLAGS_CLASS) - { - TypeHandle handle((CORINFO_CLASS_HANDLE) ((size_t) context & ~CORINFO_CONTEXTFLAGS_MASK)); - CHECK_MSG(handle.GetModule() == GetModule(scopeHnd), "Inconsistent scope and context"); - } - else + if (context != METHOD_BEING_COMPILED_CONTEXT()) { - MethodDesc* handle = (MethodDesc*) ((size_t) context & ~CORINFO_CONTEXTFLAGS_MASK); - CHECK_MSG(handle->GetModule() == GetModule(scopeHnd), "Inconsistent scope and context"); + CHECK_MSG(scopeHnd != NULL, "Illegal null scope"); + CHECK_MSG(((size_t)context & ~CORINFO_CONTEXTFLAGS_MASK) != NULL, "Illegal null context"); + if (((size_t)context & CORINFO_CONTEXTFLAGS_MASK) == CORINFO_CONTEXTFLAGS_CLASS) + { + TypeHandle handle((CORINFO_CLASS_HANDLE)((size_t)context & ~CORINFO_CONTEXTFLAGS_MASK)); + CHECK_MSG(handle.GetModule() == GetModule(scopeHnd), "Inconsistent scope and context"); + } + else + { + MethodDesc* handle = (MethodDesc*)((size_t)context & ~CORINFO_CONTEXTFLAGS_MASK); + CHECK_MSG(handle->GetModule() == GetModule(scopeHnd), "Inconsistent scope and context"); + } } CHECK_OK; @@ -2653,9 +2653,7 @@ void CEEInfo::embedGenericHandle( _ASSERTE(pResult->compileTimeHandle); - if (fRuntimeLookup - // Handle invalid IL - see comment in code:CEEInfo::ComputeRuntimeLookupForSharedGenericToken - && ContextIsShared(pResolvedToken->tokenContext)) + if (fRuntimeLookup) { DictionaryEntryKind entryKind = EmptySlot; switch (pResult->handleType) @@ -3051,19 +3049,19 @@ void CEEInfo::ComputeRuntimeLookupForSharedGenericToken(DictionaryEntryKind entr // Unless we decide otherwise, just do the lookup via a helper function pResult->indirections = CORINFO_USEHELPER; - MethodDesc *pContextMD = GetMethodFromContext(pResolvedToken->tokenContext); - MethodTable *pContextMT = pContextMD->GetMethodTable(); - - // Do not bother computing the runtime lookup if we are inlining. The JIT is going - // to abort the inlining attempt anyway. - if (pContextMD != m_pMethodBeingCompiled) + // Runtime lookups in inlined contexts are not supported by the runtime for now + if (pResolvedToken->tokenContext != METHOD_BEING_COMPILED_CONTEXT()) { + pResultLookup->lookupKind.runtimeLookupKind = CORINFO_LOOKUP_NOT_SUPPORTED; return; } + MethodDesc* pContextMD = GetMethodFromContext(pResolvedToken->tokenContext); + MethodTable* pContextMT = pContextMD->GetMethodTable(); + // There is a pathological case where invalid IL refereces __Canon type directly, but there is no dictionary availabled to store the lookup. - // All callers of ComputeRuntimeLookupForSharedGenericToken have to filter out this case. We can't do much about it here. - _ASSERTE(pContextMD->IsSharedByGenericInstantiations()); + if (!pContextMD->IsSharedByGenericInstantiations()) + COMPlusThrow(kInvalidProgramException); BOOL fInstrument = FALSE; @@ -3956,8 +3954,7 @@ DWORD CEEInfo::getClassAttribsInternal (CORINFO_CLASS_HANDLE clsHnd) CorInfoInitClassResult CEEInfo::initClass( CORINFO_FIELD_HANDLE field, CORINFO_METHOD_HANDLE method, - CORINFO_CONTEXT_HANDLE context, - BOOL speculative) + CORINFO_CONTEXT_HANDLE context) { CONTRACTL { THROWS; @@ -3980,7 +3977,7 @@ CorInfoInitClassResult CEEInfo::initClass( FieldDesc * pFD = (FieldDesc *)field; _ASSERTE(pFD == NULL || pFD->IsStatic()); - MethodDesc * pMD = (MethodDesc *)method; + MethodDesc* pMD = (method != NULL) ? (MethodDesc*)method : m_pMethodBeingCompiled; TypeHandle typeToInitTH = (pFD != NULL) ? pFD->GetEnclosingMethodTable() : GetTypeFromContext(context); @@ -4020,11 +4017,9 @@ CorInfoInitClassResult CEEInfo::initClass( goto exit; } - bool fIgnoreBeforeFieldInit = false; - if (pFD == NULL) { - if (!fIgnoreBeforeFieldInit && pTypeToInitMT->GetClass()->IsBeforeFieldInit()) + if (pTypeToInitMT->GetClass()->IsBeforeFieldInit()) { // We can wait for field accesses to run .cctor result = CORINFO_INITCLASS_NOT_REQUIRED; @@ -4059,6 +4054,15 @@ CorInfoInitClassResult CEEInfo::initClass( if (pTypeToInitMT->IsSharedByGenericInstantiations()) { + if ((pFD == NULL) && (method != NULL) && (context == METHOD_BEING_COMPILED_CONTEXT())) + { + _ASSERTE(pTypeToInitMT == methodBeingCompiled->GetMethodTable()); + // If we're inling a call to a method in our own type, then we should already + // have triggered the .cctor when caller was itself called. + result = CORINFO_INITCLASS_NOT_REQUIRED; + goto exit; + } + // Shared generic code has to use helper. Moreover, tell JIT not to inline since // inlining of generic dictionary lookups is not supported. result = CORINFO_INITCLASS_USE_HELPER | CORINFO_INITCLASS_DONT_INLINE; @@ -4072,11 +4076,9 @@ CorInfoInitClassResult CEEInfo::initClass( if (pFD == NULL) { // Handled above - _ASSERTE(fIgnoreBeforeFieldInit || !pTypeToInitMT->GetClass()->IsBeforeFieldInit()); + _ASSERTE(!pTypeToInitMT->GetClass()->IsBeforeFieldInit()); - // Note that jit has both methods the same if asking whether to emit cctor - // for a given method's code (as opposed to inlining codegen). - if (context != MAKE_METHODCONTEXT(methodBeingCompiled) && pTypeToInitMT == methodBeingCompiled->GetMethodTable()) + if (method != NULL && pTypeToInitMT == methodBeingCompiled->GetMethodTable()) { // If we're inling a call to a method in our own type, then we should already // have triggered the .cctor when caller was itself called. @@ -5255,6 +5257,19 @@ void CEEInfo::getCallInfo( pResult->contextHandle = MAKE_CLASSCONTEXT(exactType.AsPtr()); pResult->exactContextNeedsRuntimeLookup = exactType.IsSharedByGenericInstantiations(); + + // Use main method as the context as long as the methods are called on the same type + if (pResult->exactContextNeedsRuntimeLookup && + pResolvedToken->tokenContext == METHOD_BEING_COMPILED_CONTEXT() && + constrainedType.IsNull() && + exactType == m_pMethodBeingCompiled->GetMethodTable() && + ((pResolvedToken->cbTypeSpec == 0) || IsTypeSpecForTypicalInstantiation(SigPointer(pResolvedToken->pTypeSpec, pResolvedToken->cbTypeSpec)))) + { + // The typespec signature should be only missing for dynamic methods + _ASSERTE((pResolvedToken->cbTypeSpec != 0) || m_pMethodBeingCompiled->IsDynamicMethod()); + + pResult->contextHandle = METHOD_BEING_COMPILED_CONTEXT(); + } } // @@ -5373,9 +5388,7 @@ void CEEInfo::getCallInfo( bool unresolvedLdVirtFtn = (flags & CORINFO_CALLINFO_LDFTN) && (flags & CORINFO_CALLINFO_CALLVIRT) && !resolvedCallVirt; - if (((pResult->exactContextNeedsRuntimeLookup && pTargetMD->IsInstantiatingStub() && (!allowInstParam || fResolvedConstraint)) || fForceUseRuntimeLookup) - // Handle invalid IL - see comment in code:CEEInfo::ComputeRuntimeLookupForSharedGenericToken - && ContextIsShared(pResolvedToken->tokenContext)) + if (((pResult->exactContextNeedsRuntimeLookup && pTargetMD->IsInstantiatingStub() && (!allowInstParam || fResolvedConstraint)) || fForceUseRuntimeLookup)) { _ASSERTE(!m_pMethodBeingCompiled->IsDynamicMethod()); @@ -5459,10 +5472,7 @@ void CEEInfo::getCallInfo( // We can't make stub calls when we need exact information // for interface calls from shared code. - if (// If the token is not shared then we don't need a runtime lookup - pResult->exactContextNeedsRuntimeLookup - // Handle invalid IL - see comment in code:CEEInfo::ComputeRuntimeLookupForSharedGenericToken - && ContextIsShared(pResolvedToken->tokenContext)) + if (pResult->exactContextNeedsRuntimeLookup) { _ASSERTE(!m_pMethodBeingCompiled->IsDynamicMethod()); @@ -9813,7 +9823,15 @@ BOOL CEEInfo::pInvokeMarshalingRequired(CORINFO_METHOD_HANDLE method, CORINFO_SI JIT_TO_EE_TRANSITION(); - if (method != 0) + if (method == NULL) + { + // check the call site signature + result = NDirect::MarshalingRequired( + NULL, + callSiteSig->pSig, + GetModule(callSiteSig->scope)); + } + else { MethodDesc* ftn = GetMethod(method); _ASSERTE(ftn->IsNDirect()); @@ -9843,14 +9861,6 @@ BOOL CEEInfo::pInvokeMarshalingRequired(CORINFO_METHOD_HANDLE method, CORINFO_SI result = TRUE; #endif } - else - { - // check the call site signature - result = NDirect::MarshalingRequired( - GetMethod(method), - callSiteSig->pSig, - GetModule(callSiteSig->scope)); - } EE_TO_JIT_TRANSITION(); @@ -12248,15 +12258,19 @@ CorJitResult invokeCompileMethodHelper(EEJitManager *jitMgr, #ifdef FEATURE_INTERPRETER static ConfigDWORD s_InterpreterFallback; + static ConfigDWORD s_ForceInterpreter; bool isInterpreterStub = false; bool interpreterFallback = (s_InterpreterFallback.val(CLRConfig::INTERNAL_InterpreterFallback) != 0); + bool forceInterpreter = (s_ForceInterpreter.val(CLRConfig::INTERNAL_ForceInterpreter) != 0); if (interpreterFallback == false) { // If we're doing an "import_only" compilation, it's for verification, so don't interpret. // (We assume that importation is completely architecture-independent, or at least nearly so.) - if (FAILED(ret) && !jitFlags.IsSet(CORJIT_FLAGS::CORJIT_FLAG_IMPORT_ONLY) && !jitFlags.IsSet(CORJIT_FLAGS::CORJIT_FLAG_MAKEFINALCODE)) + if (FAILED(ret) && + !jitFlags.IsSet(CORJIT_FLAGS::CORJIT_FLAG_IMPORT_ONLY) && + (forceInterpreter || !jitFlags.IsSet(CORJIT_FLAGS::CORJIT_FLAG_MAKEFINALCODE))) { if (SUCCEEDED(ret = Interpreter::GenerateInterpreterStub(comp, info, nativeEntry, nativeSizeOfCode))) { @@ -12279,7 +12293,9 @@ CorJitResult invokeCompileMethodHelper(EEJitManager *jitMgr, { // If we're doing an "import_only" compilation, it's for verification, so don't interpret. // (We assume that importation is completely architecture-independent, or at least nearly so.) - if (FAILED(ret) && !jitFlags.IsSet(CORJIT_FLAGS::CORJIT_FLAG_IMPORT_ONLY) && !jitFlags.IsSet(CORJIT_FLAGS::CORJIT_FLAG_MAKEFINALCODE)) + if (FAILED(ret) && + !jitFlags.IsSet(CORJIT_FLAGS::CORJIT_FLAG_IMPORT_ONLY) && + (forceInterpreter || !jitFlags.IsSet(CORJIT_FLAGS::CORJIT_FLAG_MAKEFINALCODE))) { if (SUCCEEDED(ret = Interpreter::GenerateInterpreterStub(comp, info, nativeEntry, nativeSizeOfCode))) { @@ -13747,13 +13763,30 @@ BOOL LoadDynamicInfoEntry(Module *currentModule, break; case ENCODE_CHECK_TYPE_LAYOUT: + case ENCODE_VERIFY_TYPE_LAYOUT: { TypeHandle th = ZapSig::DecodeType(currentModule, pInfoModule, pBlob); MethodTable * pMT = th.AsMethodTable(); _ASSERTE(pMT->IsValueType()); if (!TypeLayoutCheck(pMT, pBlob)) - return FALSE; + { + if (kind == ENCODE_CHECK_TYPE_LAYOUT) + { + return FALSE; + } + else + { + // Verification failures are failfast events + DefineFullyQualifiedNameForClassW(); + SString fatalErrorString; + fatalErrorString.Printf(W("Verify_TypeLayout '%s' failed to verify type layout"), + GetFullyQualifiedNameForClassW(pMT)); + + EEPOLICY_HANDLE_FATAL_ERROR_WITH_MESSAGE(-1, fatalErrorString.GetUnicode()); + return FALSE; + } + } result = 1; } @@ -13777,6 +13810,49 @@ BOOL LoadDynamicInfoEntry(Module *currentModule, } break; + case ENCODE_VERIFY_FIELD_OFFSET: + { + DWORD baseOffset = CorSigUncompressData(pBlob); + DWORD fieldOffset = CorSigUncompressData(pBlob); + FieldDesc* pField = ZapSig::DecodeField(currentModule, pInfoModule, pBlob); + pField->GetEnclosingMethodTable()->CheckRestore(); + DWORD actualFieldOffset = pField->GetOffset(); + if (!pField->IsStatic() && !pField->IsFieldOfValueType()) + { + actualFieldOffset += sizeof(Object); + } + + DWORD actualBaseOffset = 0; + if (!pField->IsStatic() && + pField->GetEnclosingMethodTable()->GetParentMethodTable() != NULL && + !pField->GetEnclosingMethodTable()->IsValueType()) + { + actualBaseOffset = ReadyToRunInfo::GetFieldBaseOffset(pField->GetEnclosingMethodTable()); + } + + if ((fieldOffset != actualFieldOffset) || (baseOffset != actualBaseOffset)) + { + // Verification failures are failfast events + DefineFullyQualifiedNameForClassW(); + SString ssFieldName(SString::Utf8, pField->GetName()); + + SString fatalErrorString; + fatalErrorString.Printf(W("Verify_FieldOffset '%s.%s' %d!=%d || %d!=%d"), + GetFullyQualifiedNameForClassW(pField->GetEnclosingMethodTable()), + ssFieldName.GetUnicode(), + fieldOffset, + actualFieldOffset, + baseOffset, + actualBaseOffset); + + EEPOLICY_HANDLE_FATAL_ERROR_WITH_MESSAGE(-1, fatalErrorString.GetUnicode()); + return FALSE; + } + result = 1; + } + break; + + case ENCODE_CHECK_INSTRUCTION_SET_SUPPORT: { DWORD dwInstructionSetCount = CorSigUncompressData(pBlob); @@ -13863,7 +13939,7 @@ bool CEEInfo::getTailCallHelpersInternal(CORINFO_RESOLVED_TOKEN* callToken, pResult->flags = (CORINFO_TAILCALL_HELPERS_FLAGS)outFlags; pResult->hStoreArgs = (CORINFO_METHOD_HANDLE)pStoreArgsMD; pResult->hCallTarget = (CORINFO_METHOD_HANDLE)pCallTargetMD; - pResult->hDispatcher = (CORINFO_METHOD_HANDLE)TailCallHelp::GetOrCreateTailCallDispatcherMD(); + pResult->hDispatcher = (CORINFO_METHOD_HANDLE)TailCallHelp::GetOrLoadTailCallDispatcherMD(); return true; } diff --git a/src/coreclr/src/vm/jitinterface.h b/src/coreclr/src/vm/jitinterface.h index 471554d39d89..0400fcaff5ec 100644 --- a/src/coreclr/src/vm/jitinterface.h +++ b/src/coreclr/src/vm/jitinterface.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: JITinterface.H // @@ -420,17 +419,11 @@ class CEEInfo : public ICorJitInfo { friend class CEEDynamicCodeInfo; - const char * __stdcall ICorMethodInfo_Hack_getMethodName(CORINFO_METHOD_HANDLE ftnHnd, const char** scopeName) - { - WRAPPER_NO_CONTRACT; - return getMethodName(ftnHnd, scopeName); - } - - mdMethodDef __stdcall ICorClassInfo_Hack_getMethodDefFromMethod(CORINFO_METHOD_HANDLE hMethod) - { - WRAPPER_NO_CONTRACT; - return getMethodDefFromMethod(hMethod); - } + void GetTypeContext(const CORINFO_SIG_INST* info, SigTypeContext* pTypeContext); + MethodDesc* GetMethodFromContext(CORINFO_CONTEXT_HANDLE context); + TypeHandle GetTypeFromContext(CORINFO_CONTEXT_HANDLE context); + void GetTypeContext(CORINFO_CONTEXT_HANDLE context, SigTypeContext* pTypeContext); + BOOL ContextIsInstantiated(CORINFO_CONTEXT_HANDLE context); public: // ICorClassInfo stuff @@ -525,8 +518,7 @@ class CEEInfo : public ICorJitInfo CorInfoInitClassResult initClass( CORINFO_FIELD_HANDLE field, CORINFO_METHOD_HANDLE method, - CORINFO_CONTEXT_HANDLE context, - BOOL speculative = FALSE); + CORINFO_CONTEXT_HANDLE context); void classMustBeLoadedBeforeCodeIsRun (CORINFO_CLASS_HANDLE cls); void methodMustBeLoadedBeforeCodeIsRun (CORINFO_METHOD_HANDLE meth); diff --git a/src/coreclr/src/vm/jitinterfacegen.cpp b/src/coreclr/src/vm/jitinterfacegen.cpp index ceb6d1a0d3de..661d68fa7d8d 100644 --- a/src/coreclr/src/vm/jitinterfacegen.cpp +++ b/src/coreclr/src/vm/jitinterfacegen.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: JITinterfaceGen.CPP diff --git a/src/coreclr/src/vm/listlock.h b/src/coreclr/src/vm/listlock.h index 2b135b19d784..ec92028133b4 100644 --- a/src/coreclr/src/vm/listlock.h +++ b/src/coreclr/src/vm/listlock.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: ListLock.h // diff --git a/src/coreclr/src/vm/loaderallocator.cpp b/src/coreclr/src/vm/loaderallocator.cpp index 406f45a89e32..0119f6510f46 100644 --- a/src/coreclr/src/vm/loaderallocator.cpp +++ b/src/coreclr/src/vm/loaderallocator.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" diff --git a/src/coreclr/src/vm/loaderallocator.hpp b/src/coreclr/src/vm/loaderallocator.hpp index ea3da4a9cbe6..70b7cd839cea 100644 --- a/src/coreclr/src/vm/loaderallocator.hpp +++ b/src/coreclr/src/vm/loaderallocator.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/vm/loaderallocator.inl b/src/coreclr/src/vm/loaderallocator.inl index 7b1db9ae63f2..a826675ccc93 100644 --- a/src/coreclr/src/vm/loaderallocator.inl +++ b/src/coreclr/src/vm/loaderallocator.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _LOADER_ALLOCATOR_I diff --git a/src/coreclr/src/vm/managedmdimport.cpp b/src/coreclr/src/vm/managedmdimport.cpp index 8b96635bffef..973fa8ad44f6 100644 --- a/src/coreclr/src/vm/managedmdimport.cpp +++ b/src/coreclr/src/vm/managedmdimport.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // TODO: Re-implement with MC++ if we ever compile any mscorlib code with that diff --git a/src/coreclr/src/vm/managedmdimport.hpp b/src/coreclr/src/vm/managedmdimport.hpp index cc1a166a6120..ffc1efb2b7a6 100644 --- a/src/coreclr/src/vm/managedmdimport.hpp +++ b/src/coreclr/src/vm/managedmdimport.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// diff --git a/src/coreclr/src/vm/marshalnative.cpp b/src/coreclr/src/vm/marshalnative.cpp index ac0d2018ae5b..e4f95bb77394 100644 --- a/src/coreclr/src/vm/marshalnative.cpp +++ b/src/coreclr/src/vm/marshalnative.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: MarshalNative.cpp // @@ -695,80 +694,6 @@ FCIMPL1(int, MarshalNative::GetHRForException, Object* eUNSAFE) FCIMPLEND #ifdef FEATURE_COMINTEROP - -//==================================================================== -// map GUID to Type -//==================================================================== - -/*OBJECTREF */ -FCIMPL1(Object*, MarshalNative::GetLoadedTypeForGUID, GUID* pGuid) -{ - CONTRACTL - { - FCALL_CHECK; - PRECONDITION(CheckPointer(pGuid, NULL_OK)); - } - CONTRACTL_END; - - OBJECTREF refRetVal = NULL; - HELPER_METHOD_FRAME_BEGIN_RET_1(refRetVal); - - if (!pGuid) - COMPlusThrowArgumentNull(W("pGuid")); - - AppDomain* pDomain = SystemDomain::GetCurrentDomain(); - _ASSERTE(pDomain); - - MethodTable* pMT = pDomain->LookupClass(*(pGuid)); - if (pMT) - refRetVal = pMT->GetManagedClassObject(); - - HELPER_METHOD_FRAME_END(); - return OBJECTREFToObject(refRetVal); -} -FCIMPLEND - -//==================================================================== -// map Type to ITypeInfo* -//==================================================================== -FCIMPL1(ITypeInfo*, MarshalNative::GetITypeInfoForType, ReflectClassBaseObject* refClassUNSAFE) -{ - FCALL_CONTRACT; - - ITypeInfo* pTI = NULL; - REFLECTCLASSBASEREF refClass = (REFLECTCLASSBASEREF) refClassUNSAFE; - HELPER_METHOD_FRAME_BEGIN_RET_1(refClass); - - // Check for null arguments. - if(!refClass) - COMPlusThrowArgumentNull(W("t")); - - MethodTable *pRefMT = refClass->GetMethodTable(); - if (pRefMT != g_pRuntimeTypeClass) - COMPlusThrowArgumentException(W("t"), W("Argument_MustBeRuntimeType")); - - TypeHandle th = refClass->GetType(); - - if (th.HasInstantiation()) - COMPlusThrowArgumentException(W("t"), W("Argument_NeedNonGenericType")); - - // Make sure the type is visible from COM. - if (!::IsTypeVisibleFromCom(th)) - COMPlusThrowArgumentException(W("t"), W("Argument_TypeMustBeVisibleFromCom")); - - // Retrieve the EE class from the reflection type. - MethodTable* pMT = th.GetMethodTable(); - _ASSERTE(pMT); - - // Retrieve the ITypeInfo for the class. - IfFailThrow(GetITypeInfoForEEClass(pMT, &pTI, true /* bClassInfo */)); - _ASSERTE(pTI != NULL); - - HELPER_METHOD_FRAME_END(); - return pTI; -} -FCIMPLEND - //==================================================================== // return the IUnknown* for an Object. //==================================================================== diff --git a/src/coreclr/src/vm/marshalnative.h b/src/coreclr/src/vm/marshalnative.h index 5d01e3e9ca85..574d40c9d2c5 100644 --- a/src/coreclr/src/vm/marshalnative.h +++ b/src/coreclr/src/vm/marshalnative.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: MarshalNative.h // @@ -69,16 +68,6 @@ class MarshalNative static FCDECL1(LPVOID, GetFunctionPointerForDelegateInternal, Object* refDelegateUNSAFE); #ifdef FEATURE_COMINTEROP - //==================================================================== - // map GUID to Type - //==================================================================== - static FCDECL1(Object*, GetLoadedTypeForGUID, GUID* pGuid); - - //==================================================================== - // map Type to ITypeInfo* - //==================================================================== - static FCDECL1(ITypeInfo*, GetITypeInfoForType, ReflectClassBaseObject* refClassUNSAFE); - //==================================================================== // return the IUnknown* for an Object //==================================================================== diff --git a/src/coreclr/src/vm/memberload.cpp b/src/coreclr/src/vm/memberload.cpp index c0e26d74d32f..8df00c959c34 100644 --- a/src/coreclr/src/vm/memberload.cpp +++ b/src/coreclr/src/vm/memberload.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: memberload.cpp // diff --git a/src/coreclr/src/vm/memberload.h b/src/coreclr/src/vm/memberload.h index 2eaddc3ce576..da77684fb227 100644 --- a/src/coreclr/src/vm/memberload.h +++ b/src/coreclr/src/vm/memberload.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: memberload.h // diff --git a/src/coreclr/src/vm/metasig.h b/src/coreclr/src/vm/metasig.h index b7cfcde2dd98..179dcd206378 100644 --- a/src/coreclr/src/vm/metasig.h +++ b/src/coreclr/src/vm/metasig.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // METASIG.H // diff --git a/src/coreclr/src/vm/method.cpp b/src/coreclr/src/vm/method.cpp index fb7d73f791d5..c8d3f6cb7aa9 100644 --- a/src/coreclr/src/vm/method.cpp +++ b/src/coreclr/src/vm/method.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: Method.CPP // @@ -1329,11 +1328,9 @@ ReturnKind MethodDesc::ParseReturnKindFromSig(INDEBUG(bool supportStringConstruc ReturnKind MethodDesc::GetReturnKind(INDEBUG(bool supportStringConstructors)) { -#ifdef HOST_64BIT // For simplicity, we don't hijack in funclets, but if you ever change that, // be sure to choose the OnHijack... callback type to match that of the FUNCLET // not the main method (it would probably be Scalar). -#endif // HOST_64BIT ENABLE_FORBID_GC_LOADER_USE_IN_THIS_SCOPE(); // Mark that we are performing a stackwalker like operation on the current thread. diff --git a/src/coreclr/src/vm/method.hpp b/src/coreclr/src/vm/method.hpp index 599394b61bc1..4103ec6e07e1 100644 --- a/src/coreclr/src/vm/method.hpp +++ b/src/coreclr/src/vm/method.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // method.hpp // @@ -207,7 +206,7 @@ class MethodDesc public: -#ifdef HOST_64BIT +#ifdef TARGET_64BIT static const int ALIGNMENT_SHIFT = 3; #else static const int ALIGNMENT_SHIFT = 2; @@ -2509,7 +2508,7 @@ class StoredSigMethodDesc : public MethodDesc RelativePointer m_pSig; DWORD m_cSig; -#ifdef HOST_64BIT +#ifdef TARGET_64BIT // m_dwExtendedFlags is not used by StoredSigMethodDesc itself. // It is used by child classes. We allocate the space here to get // optimal layout. @@ -2568,7 +2567,7 @@ class FCallMethodDesc : public MethodDesc #endif DWORD m_dwECallID; -#ifdef HOST_64BIT +#ifdef TARGET_64BIT DWORD m_padding; #endif @@ -2608,7 +2607,7 @@ class DynamicMethodDesc : public StoredSigMethodDesc RelativePointer m_pszMethodName; PTR_DynamicResolver m_pResolver; -#ifndef HOST_64BIT +#ifndef TARGET_64BIT // We use m_dwExtendedFlags from StoredSigMethodDesc on WIN64 DWORD m_dwExtendedFlags; // see DynamicMethodDesc::ExtendedFlags enum #endif @@ -2675,7 +2674,7 @@ class DynamicMethodDesc : public StoredSigMethodDesc void SetNativeStackArgSize(WORD cbArgSize) { LIMITED_METHOD_CONTRACT; - _ASSERTE(IsILStub() && (cbArgSize % sizeof(SLOT)) == 0); + _ASSERTE(IsILStub() && (cbArgSize % TARGET_POINTER_SIZE) == 0); m_dwExtendedFlags = (m_dwExtendedFlags & ~nomdStackArgSize) | ((DWORD)cbArgSize << 16); } diff --git a/src/coreclr/src/vm/method.inl b/src/coreclr/src/vm/method.inl index b0a350250177..d0d944d10e37 100644 --- a/src/coreclr/src/vm/method.inl +++ b/src/coreclr/src/vm/method.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/vm/methoddescbackpatchinfo.cpp b/src/coreclr/src/vm/methoddescbackpatchinfo.cpp index 83687d1a22a8..f6ea27e1fd9f 100644 --- a/src/coreclr/src/vm/methoddescbackpatchinfo.cpp +++ b/src/coreclr/src/vm/methoddescbackpatchinfo.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" diff --git a/src/coreclr/src/vm/methoddescbackpatchinfo.h b/src/coreclr/src/vm/methoddescbackpatchinfo.h index 948332233b28..a4d7a8c64fd6 100644 --- a/src/coreclr/src/vm/methoddescbackpatchinfo.h +++ b/src/coreclr/src/vm/methoddescbackpatchinfo.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma once diff --git a/src/coreclr/src/vm/methodimpl.cpp b/src/coreclr/src/vm/methodimpl.cpp index 0507b35fb5c9..4a558b7520bc 100644 --- a/src/coreclr/src/vm/methodimpl.cpp +++ b/src/coreclr/src/vm/methodimpl.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: methodimpl.cpp // diff --git a/src/coreclr/src/vm/methodimpl.h b/src/coreclr/src/vm/methodimpl.h index 7f2974b6a740..4184061ea845 100644 --- a/src/coreclr/src/vm/methodimpl.h +++ b/src/coreclr/src/vm/methodimpl.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: methodimpl.h // diff --git a/src/coreclr/src/vm/methoditer.cpp b/src/coreclr/src/vm/methoditer.cpp index da4f4a8fc639..5a6fc068b8d8 100644 --- a/src/coreclr/src/vm/methoditer.cpp +++ b/src/coreclr/src/vm/methoditer.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // File: MethodIter.cpp diff --git a/src/coreclr/src/vm/methoditer.h b/src/coreclr/src/vm/methoditer.h index 2bff1e4f9505..71192be2e0c0 100644 --- a/src/coreclr/src/vm/methoditer.h +++ b/src/coreclr/src/vm/methoditer.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/vm/methodtable.cpp b/src/coreclr/src/vm/methodtable.cpp index 2e5a2f9cf003..dee047519ee9 100644 --- a/src/coreclr/src/vm/methodtable.cpp +++ b/src/coreclr/src/vm/methodtable.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: methodtable.cpp // diff --git a/src/coreclr/src/vm/methodtable.h b/src/coreclr/src/vm/methodtable.h index 141e9e58fb4b..16f8d7dbc593 100644 --- a/src/coreclr/src/vm/methodtable.h +++ b/src/coreclr/src/vm/methodtable.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: methodtable.h // @@ -2976,14 +2975,6 @@ class MethodTable // Get and cache the GUID for this interface/class void GetGuid(GUID *pGuid, BOOL bGenerateIfNotFound, BOOL bClassic = TRUE); -#ifdef FEATURE_COMINTEROP - // Get the GUID used for WinRT interop - // * for projection generic interfaces returns the equivalent WinRT type's GUID - // * for everything else returns the GetGuid(, TRUE) - BOOL GetGuidForWinRT(GUID *pGuid); - -#endif // FEATURE_COMINTEROP - // Convenience method - determine if the interface/class has a guid specified (even if not yet cached) BOOL HasExplicitGuid(); diff --git a/src/coreclr/src/vm/methodtable.inl b/src/coreclr/src/vm/methodtable.inl index 43e7109fee32..a20e1b4ca495 100644 --- a/src/coreclr/src/vm/methodtable.inl +++ b/src/coreclr/src/vm/methodtable.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: methodtable.inl // @@ -362,21 +361,6 @@ inline BOOL MethodTable::HasExplicitGuid() return (guid != GUID_NULL); } -//========================================================================================== -// Get the GUID used for WinRT interop -// * if the type is not a WinRT type or a redirected interfae return FALSE -inline BOOL MethodTable::GetGuidForWinRT(GUID *pGuid) -{ - CONTRACTL { - THROWS; - GC_TRIGGERS; - MODE_ANY; - SUPPORTS_DAC; - } CONTRACTL_END; - - return FALSE; -} - #endif // FEATURE_COMINTEROP //========================================================================================== diff --git a/src/coreclr/src/vm/methodtablebuilder.cpp b/src/coreclr/src/vm/methodtablebuilder.cpp index 9c10e5826a82..21976325935c 100644 --- a/src/coreclr/src/vm/methodtablebuilder.cpp +++ b/src/coreclr/src/vm/methodtablebuilder.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: METHODTABLEBUILDER.CPP // @@ -1481,10 +1480,10 @@ MethodTableBuilder::BuildMethodTableThrowing( #endif { #if defined(CROSSGEN_COMPILE) -#if defined(TARGET_X86) || defined(TARGET_AMD64) +#if defined(TARGET_X86) || defined(TARGET_AMD64) || defined(TARGET_ARM64) if ((!IsNgenPDBCompilationProcess() && GetAppDomain()->ToCompilationDomain()->GetTargetModule() != g_pObjectClass->GetModule())) -#endif // defined(TARGET_X86) || defined(TARGET_AMD64) +#endif // defined(TARGET_X86) || defined(TARGET_AMD64) || defined(TARGET_ARM64) { // Disable AOT compiling for managed implementation of hardware intrinsics. // We specially treat them here to ensure correct ISA features are set during compilation @@ -5389,7 +5388,7 @@ MethodTableBuilder::FindDeclMethodOnInterfaceEntry(bmtInterfaceEntry *pItfEntry, { bmtRTMethod * pCurDeclMethod = slotIt->Decl().AsRTMethod(); - if (declSig.ExactlyEqual(pCurDeclMethod->GetMethodSignature())) + if (declSig.ExactlyEqual(pCurDeclMethod->GetMethodSignature().GetSignatureWithoutSubstitution())) { declMethod = slotIt->Decl(); break; @@ -5405,7 +5404,7 @@ MethodTableBuilder::FindDeclMethodOnInterfaceEntry(bmtInterfaceEntry *pItfEntry, bmtRTMethod * pCurDeclMethod = slotIt->Decl().AsRTMethod(); // Type Equivalence is forbidden in MethodImpl MemberRefs - if (declSig.Equivalent(pCurDeclMethod->GetMethodSignature())) + if (declSig.Equivalent(pCurDeclMethod->GetMethodSignature().GetSignatureWithoutSubstitution())) { declMethod = slotIt->Decl(); break; @@ -5523,8 +5522,7 @@ MethodTableBuilder::ProcessInexactMethodImpls() } } - Substitution *pDeclSubst = &bmtMetaData->pMethodDeclSubsts[m]; - MethodSignature declSig(GetModule(), szName, pSig, cbSig, pDeclSubst); + MethodSignature declSig(GetModule(), szName, pSig, cbSig, NULL); bmtInterfaceEntry * pItfEntry = NULL; for (DWORD i = 0; i < bmtInterface->dwInterfaceMapSize; i++) @@ -5683,7 +5681,7 @@ MethodTableBuilder::ProcessMethodImpls() Substitution *pDeclSubst = &bmtMetaData->pMethodDeclSubsts[m]; MethodTable * pDeclMT = NULL; - MethodSignature declSig(GetModule(), szName, pSig, cbSig, pDeclSubst); + MethodSignature declSig(GetModule(), szName, pSig, cbSig, NULL); { // 1. Load the approximate type. // Block for the LoadsTypeViolation. @@ -5700,13 +5698,12 @@ MethodTableBuilder::ProcessMethodImpls() } { // 2. Get or create the correct substitution - bmtRTType * pDeclType = NULL; - if (pDeclMT->IsInterface()) - { // If the declaration method is a part of an interface, search through + { + // If the declaration method is a part of an interface, search through // the interface map to find the matching interface so we can provide // the correct substitution chain. - pDeclType = NULL; + bmtRTType *pDeclType = NULL; bmtInterfaceEntry * pItfEntry = NULL; for (DWORD i = 0; i < bmtInterface->dwInterfaceMapSize; i++) @@ -5786,78 +5783,8 @@ MethodTableBuilder::ProcessMethodImpls() declMethod = FindDeclMethodOnInterfaceEntry(pItfEntry, declSig); } else - { // Assume the MethodTable is a parent of the current type, - // and create the substitution chain to match it. - - pDeclType = NULL; - - for (bmtRTType *pCur = GetParentType(); - pCur != NULL; - pCur = pCur->GetParentType()) - { - if (pCur->GetMethodTable() == pDeclMT) - { - pDeclType = pCur; - break; - } - } - - if (pDeclType == NULL) - { // Method's type is not a parent. - BuildMethodTableThrowException(IDS_CLASSLOAD_MI_DECLARATIONNOTFOUND, it.Token()); - } - - // 3. Find the matching method. - bmtRTType *pCurDeclType = pDeclType; - do - { - // two pass algorithm. search for exact matches followed - // by equivalent matches. - for (int iPass = 0; (iPass < 2) && (declMethod.IsNull()); iPass++) - { - MethodTable *pCurDeclMT = pCurDeclType->GetMethodTable(); - - MethodTable::IntroducedMethodIterator methIt(pCurDeclMT); - for(; methIt.IsValid(); methIt.Next()) - { - MethodDesc * pCurMD = methIt.GetMethodDesc(); - - if (pCurDeclMT != pDeclMT) - { - // If the method isn't on the declaring type, then it must be virtual. - if (!pCurMD->IsVirtual()) - continue; - } - if (strcmp(szName, pCurMD->GetName()) == 0) - { - PCCOR_SIGNATURE pCurMDSig; - DWORD cbCurMDSig; - pCurMD->GetSig(&pCurMDSig, &cbCurMDSig); - - // First pass searches for declaration methods should not use type equivalence - TokenPairList newVisited = TokenPairList::AdjustForTypeEquivalenceForbiddenScope(NULL); - - if (MetaSig::CompareMethodSigs( - declSig.GetSignature(), - static_cast(declSig.GetSignatureLength()), - declSig.GetModule(), - &declSig.GetSubstitution(), - pCurMDSig, - cbCurMDSig, - pCurMD->GetModule(), - &pCurDeclType->GetSubstitution(), - FALSE, - iPass == 0 ? &newVisited : NULL)) - { - declMethod = (*bmtParent->pSlotTable)[pCurMD->GetSlot()].Decl(); - break; - } - } - } - } - - pCurDeclType = pCurDeclType->GetParentType(); - } while ((pCurDeclType != NULL) && (declMethod.IsNull())); + { + declMethod = FindDeclMethodOnClassInHierarchy(it, pDeclMT, declSig); } if (declMethod.IsNull()) @@ -5899,6 +5826,105 @@ MethodTableBuilder::ProcessMethodImpls() } /* end ... for each member */ } + +MethodTableBuilder::bmtMethodHandle MethodTableBuilder::FindDeclMethodOnClassInHierarchy(const DeclaredMethodIterator& it, MethodTable * pDeclMT, MethodSignature &declSig) +{ + bmtRTType * pDeclType = NULL; + bmtMethodHandle declMethod; + // Assume the MethodTable is a parent of the current type, + // and create the substitution chain to match it. + + for (bmtRTType *pCur = GetParentType(); + pCur != NULL; + pCur = pCur->GetParentType()) + { + if (pCur->GetMethodTable() == pDeclMT) + { + pDeclType = pCur; + break; + } + } + + // Instead of using the Substitution chain that reaches back to the type being loaded, instead + // use a substitution chain that points back to the open type associated with the memberref of the declsig. + Substitution emptySubstitution; + Substitution* pDeclTypeSubstitution = &emptySubstitution; + DWORD lengthOfSubstitutionChainHandled = pDeclType->GetSubstitution().GetLength(); + + if (pDeclType == NULL) + { // Method's type is not a parent. + BuildMethodTableThrowException(IDS_CLASSLOAD_MI_DECLARATIONNOTFOUND, it.Token()); + } + + // 3. Find the matching method. + bmtRTType *pCurDeclType = pDeclType; + do + { + // Update the substitution in use for matching the method. If the substitution length is greater + // than the previously processed data, add onto the end of the chain. + { + DWORD declTypeSubstitionLength = pCurDeclType->GetSubstitution().GetLength(); + if (declTypeSubstitionLength > lengthOfSubstitutionChainHandled) + { + void *pNewSubstitutionMem = _alloca(sizeof(Substitution)); + Substitution substitutionToClone = pCurDeclType->GetSubstitution(); + + Substitution *pNewSubstitution = new(pNewSubstitutionMem) Substitution(substitutionToClone.GetModule(), substitutionToClone.GetInst(), pDeclTypeSubstitution); + pDeclTypeSubstitution = pNewSubstitution; + lengthOfSubstitutionChainHandled = declTypeSubstitionLength; + } + } + + // two pass algorithm. search for exact matches followed + // by equivalent matches. + for (int iPass = 0; (iPass < 2) && (declMethod.IsNull()); iPass++) + { + MethodTable *pCurDeclMT = pCurDeclType->GetMethodTable(); + + MethodTable::IntroducedMethodIterator methIt(pCurDeclMT); + for(; methIt.IsValid(); methIt.Next()) + { + MethodDesc * pCurMD = methIt.GetMethodDesc(); + + if (pCurDeclMT != pDeclMT) + { + // If the method isn't on the declaring type, then it must be virtual. + if (!pCurMD->IsVirtual()) + continue; + } + if (strcmp(declSig.GetName(), pCurMD->GetName()) == 0) + { + PCCOR_SIGNATURE pCurMDSig; + DWORD cbCurMDSig; + pCurMD->GetSig(&pCurMDSig, &cbCurMDSig); + + // First pass searches for declaration methods should not use type equivalence + TokenPairList newVisited = TokenPairList::AdjustForTypeEquivalenceForbiddenScope(NULL); + + if (MetaSig::CompareMethodSigs( + declSig.GetSignature(), + static_cast(declSig.GetSignatureLength()), + declSig.GetModule(), + NULL, // Do not use the substitution of declSig, as we have adjusted the pDeclTypeSubstitution such that it must not be used. + pCurMDSig, + cbCurMDSig, + pCurMD->GetModule(), + pDeclTypeSubstitution, + FALSE, + iPass == 0 ? &newVisited : NULL)) + { + declMethod = (*bmtParent->pSlotTable)[pCurMD->GetSlot()].Decl(); + break; + } + } + } + } + + pCurDeclType = pCurDeclType->GetParentType(); + } while ((pCurDeclType != NULL) && (declMethod.IsNull())); + + return declMethod; +} //******************************************************************************* // InitMethodDesc takes a pointer to space that's already allocated for the // particular type of MethodDesc, and initializes based on the other info. @@ -9697,23 +9723,6 @@ void MethodTableBuilder::CheckForSystemTypes() pMT->SetInternalCorElementType (ELEMENT_TYPE_I); } #endif -#if defined(ALIGN_ACCESS) || defined(FEATURE_64BIT_ALIGNMENT) - else if (strcmp(name, g_DecimalName) == 0) - { - // This is required because native layout of System.Decimal causes it to be aligned - // differently to the layout of the native DECIMAL structure, which will cause - // data misalignent exceptions if Decimal is embedded in another type. - - EEClassLayoutInfo* pLayout = pClass->GetLayoutInfo(); - pLayout->m_ManagedLargestAlignmentRequirementOfAllMembers = sizeof(ULONGLONG); - -#ifdef FEATURE_64BIT_ALIGNMENT - // Also need to mark the type so it will be allocated on a 64-bit boundary for - // platforms that won't do this naturally. - SetAlign8Candidate(); -#endif - } -#endif // ALIGN_ACCESS || FEATURE_64BIT_ALIGNMENT } else { diff --git a/src/coreclr/src/vm/methodtablebuilder.h b/src/coreclr/src/vm/methodtablebuilder.h index b0dc89505888..34a040c4530c 100644 --- a/src/coreclr/src/vm/methodtablebuilder.h +++ b/src/coreclr/src/vm/methodtablebuilder.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ==++== // @@ -759,6 +758,14 @@ class MethodTableBuilder m_nameHash(s.m_nameHash) { } + MethodSignature GetSignatureWithoutSubstitution() const + { + LIMITED_METHOD_CONTRACT; + MethodSignature sig = *this; + sig.m_pSubst = NULL; + return sig; + } + //----------------------------------------------------------------------------------------- // Returns the module that is the scope within which the signature itself lives. Module * @@ -2287,7 +2294,7 @@ class MethodTableBuilder inline BOOL Next(); inline BOOL Prev(); inline void ResetToEnd(); - inline mdToken Token(); + inline mdToken Token() const; inline DWORD Attrs(); inline DWORD RVA(); inline DWORD ImplFlags(); @@ -2296,7 +2303,7 @@ class MethodTableBuilder inline METHOD_IMPL_TYPE MethodImpl(); inline BOOL IsMethodImpl(); inline METHOD_TYPE MethodType(); - inline bmtMDMethod *GetMDMethod(); + inline bmtMDMethod *GetMDMethod() const; inline MethodDesc *GetIntroducingMethodDesc(); inline bmtMDMethod * operator->(); inline bmtMDMethod * operator*() { WRAPPER_NO_CONTRACT; return GetMDMethod(); } @@ -2725,6 +2732,12 @@ class MethodTableBuilder bmtMethodHandle FindDeclMethodOnInterfaceEntry(bmtInterfaceEntry *pItfEntry, MethodSignature &declSig); + // -------------------------------------------------------------------------------------------- + // Find the decl method within the class hierarchy method name+signature specified + // If none is found, return a null method handle + bmtMethodHandle + FindDeclMethodOnClassInHierarchy(const DeclaredMethodIterator& it, MethodTable * pDeclMT, MethodSignature &declSig); + // -------------------------------------------------------------------------------------------- // Throws if an entry already exists that has been MethodImpl'd. Adds the interface slot and // implementation method to the mapping used by virtual stub dispatch. diff --git a/src/coreclr/src/vm/methodtablebuilder.inl b/src/coreclr/src/vm/methodtablebuilder.inl index fbc2bf479a86..2d13e783fd51 100644 --- a/src/coreclr/src/vm/methodtablebuilder.inl +++ b/src/coreclr/src/vm/methodtablebuilder.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: METHODTABLEBUILDER.INL // @@ -60,7 +59,7 @@ inline void MethodTableBuilder::DeclaredMethodIterator::ResetToEnd() } //*************************************************************************************** -inline mdMethodDef MethodTableBuilder::DeclaredMethodIterator::Token() +inline mdMethodDef MethodTableBuilder::DeclaredMethodIterator::Token() const { STANDARD_VM_CONTRACT; CONSISTENCY_CHECK(TypeFromToken(GetMDMethod()->GetMethodSignature().GetToken()) == mdtMethodDef); @@ -127,7 +126,7 @@ inline MethodTableBuilder::METHOD_TYPE MethodTableBuilder::DeclaredMethodIterato //*************************************************************************************** inline MethodTableBuilder::bmtMDMethod * -MethodTableBuilder::DeclaredMethodIterator::GetMDMethod() +MethodTableBuilder::DeclaredMethodIterator::GetMDMethod() const { LIMITED_METHOD_CONTRACT; _ASSERTE(FitsIn(m_idx)); // Review: m_idx should probably _be_ a SLOT_INDEX, but that asserts. diff --git a/src/coreclr/src/vm/mlinfo.cpp b/src/coreclr/src/vm/mlinfo.cpp index 6038c0a468f6..c4c479cb6d42 100644 --- a/src/coreclr/src/vm/mlinfo.cpp +++ b/src/coreclr/src/vm/mlinfo.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: mlinfo.cpp // @@ -2348,7 +2347,7 @@ MarshalInfo::MarshalInfo(Module* pModule, { // Override the prohibition on byref returns so that IJW works m_byref = FALSE; - m_type = ((sizeof(void*) == 4) ? MARSHAL_TYPE_GENERIC_4 : MARSHAL_TYPE_GENERIC_8); + m_type = ((TARGET_POINTER_SIZE == 4) ? MARSHAL_TYPE_GENERIC_4 : MARSHAL_TYPE_GENERIC_8); } else { @@ -2373,8 +2372,8 @@ MarshalInfo::MarshalInfo(Module* pModule, && !onInstanceMethod && CorIsPrimitiveType(m_pMT->GetInternalCorElementType()) && !IsUnmanagedValueTypeReturnedByRef(nativeSize) - && managedSize <= sizeof(void*) - && nativeSize <= sizeof(void*) + && managedSize <= TARGET_POINTER_SIZE + && nativeSize <= TARGET_POINTER_SIZE && !IsFieldScenario()) { m_type = MARSHAL_TYPE_GENERIC_4; @@ -2435,48 +2434,6 @@ MarshalInfo::MarshalInfo(Module* pModule, } lExit: -#ifdef FEATURE_COMINTEROP -//Field scenario is not blocked here because we don't want to block loading structs that -//have the types which we are blocking, but never pass it to Interop. - - if (AppX::IsAppXProcess() && ms != MarshalInfo::MARSHAL_SCENARIO_FIELD) - { - bool set_error = false; - switch (m_type) - { - case MARSHAL_TYPE_ANSIBSTR: - m_resID = IDS_EE_BADMARSHAL_TYPE_ANSIBSTR; - set_error = true; - break; - case MARSHAL_TYPE_VBBYVALSTR: - case MARSHAL_TYPE_VBBYVALSTRW: - m_resID = IDS_EE_BADMARSHAL_TYPE_VBBYVALSTR; - set_error = true; - break; - case MARSHAL_TYPE_REFERENCECUSTOMMARSHALER: - m_resID = IDS_EE_BADMARSHAL_TYPE_REFERENCECUSTOMMARSHALER; - set_error = true; - break; - case MARSHAL_TYPE_ASANYA: - case MARSHAL_TYPE_ASANYW: - m_resID = IDS_EE_BADMARSHAL_TYPE_ASANYA; - set_error = true; - break; - case MARSHAL_TYPE_INTERFACE: - if (m_fDispItf) - { - m_resID = IDS_EE_BADMARSHAL_TYPE_IDISPATCH; - set_error = true; - } - break; - } - - if (set_error) - COMPlusThrow(kPlatformNotSupportedException, m_resID); - - } -#endif // FEATURE_COMINTEROP - if (m_byref && !isParam) { // byref returns don't work: the thing pointed to lives on @@ -2674,7 +2631,7 @@ HRESULT MarshalInfo::HandleArrayElemType(NativeTypeParamInfo *pParamInfo, TypeHa { if (m_ms == MARSHAL_SCENARIO_FIELD) { -#ifdef FEATURE_CLASSIC_COMINTEROP +#ifdef FEATURE_COMINTEROP m_type = MARSHAL_TYPE_SAFEARRAY; #else m_resID = IDS_EE_BADMARSHALFIELD_ARRAY; @@ -3068,7 +3025,7 @@ void MarshalInfo::SetupArgumentSizes() if (m_byref) { - m_nativeArgSize = StackElemSize(sizeof(void*)); + m_nativeArgSize = StackElemSize(TARGET_POINTER_SIZE); } else { @@ -3077,7 +3034,7 @@ void MarshalInfo::SetupArgumentSizes() #ifdef ENREGISTERED_PARAMTYPE_MAXSIZE if (m_nativeArgSize > ENREGISTERED_PARAMTYPE_MAXSIZE) - m_nativeArgSize = StackElemSize(sizeof(void*)); + m_nativeArgSize = StackElemSize(TARGET_POINTER_SIZE); #endif // ENREGISTERED_PARAMTYPE_MAXSIZE } @@ -3652,7 +3609,7 @@ DispParamMarshaler *MarshalInfo::GenerateDispParamMarshaler() pDispParamMarshaler = new DispParamRecordMarshaler(m_pMT); break; -#ifdef FEATURE_CLASSIC_COMINTEROP +#ifdef FEATURE_COMINTEROP case MARSHAL_TYPE_SAFEARRAY: pDispParamMarshaler = new DispParamArrayMarshaler(m_arrayElementType, m_hndArrayElemType.GetMethodTable()); break; @@ -4467,23 +4424,6 @@ void ArrayMarshalInfo::InitElementInfo(CorNativeType arrayNativeType, MarshalInf } } - // Avoid throwing exceptions for any managed structs that have layouts and have types of fields that gets default to those banned types by default - // We don't know if they will be passed to native code anyway, and the right place to make the check is in the marshallers - if (AppX::IsAppXProcess() && ms != MarshalInfo::MARSHAL_SCENARIO_FIELD) - { - bool set_error = false; - UINT m_resID = 0; - switch (m_vtElement) - { - case VT_DISPATCH: - m_resID = IDS_EE_BADMARSHAL_TYPE_IDISPATCH ; - set_error = true; - break; - } - if (set_error) - COMPlusThrow(kPlatformNotSupportedException, m_resID); - } - LExit:; RETURN; diff --git a/src/coreclr/src/vm/mlinfo.h b/src/coreclr/src/vm/mlinfo.h index 813bcbccbae3..23ec668115ac 100644 --- a/src/coreclr/src/vm/mlinfo.h +++ b/src/coreclr/src/vm/mlinfo.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: mlinfo.h // diff --git a/src/coreclr/src/vm/mngstdinterfaces.cpp b/src/coreclr/src/vm/mngstdinterfaces.cpp index 23ec39878b8c..28ff126fe530 100644 --- a/src/coreclr/src/vm/mngstdinterfaces.cpp +++ b/src/coreclr/src/vm/mngstdinterfaces.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/vm/mngstdinterfaces.h b/src/coreclr/src/vm/mngstdinterfaces.h index a99d319cda67..ba058946aad4 100644 --- a/src/coreclr/src/vm/mngstdinterfaces.h +++ b/src/coreclr/src/vm/mngstdinterfaces.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/vm/mngstditflist.h b/src/coreclr/src/vm/mngstditflist.h index f05f28241dac..0af037cf0ecf 100644 --- a/src/coreclr/src/vm/mngstditflist.h +++ b/src/coreclr/src/vm/mngstditflist.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/vm/mscorlib.cpp b/src/coreclr/src/vm/mscorlib.cpp index f1153bc61845..70eeb9ba7563 100644 --- a/src/coreclr/src/vm/mscorlib.cpp +++ b/src/coreclr/src/vm/mscorlib.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/vm/mscorlib.h b/src/coreclr/src/vm/mscorlib.h index d76d1d4041e3..fd2578fcaea8 100644 --- a/src/coreclr/src/vm/mscorlib.h +++ b/src/coreclr/src/vm/mscorlib.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // This file contains the classes, methods, and field used by the EE from mscorlib // @@ -707,9 +706,10 @@ DEFINE_METHOD(RUNTIME_HELPERS, GET_RAW_ARRAY_DATA, GetRawArrayData, No DEFINE_METHOD(RUNTIME_HELPERS, GET_UNINITIALIZED_OBJECT, GetUninitializedObject, NoSig) DEFINE_METHOD(RUNTIME_HELPERS, ENUM_EQUALS, EnumEquals, NoSig) DEFINE_METHOD(RUNTIME_HELPERS, ENUM_COMPARE_TO, EnumCompareTo, NoSig) -DEFINE_METHOD(RUNTIME_HELPERS, ALLOC_TAILCALL_ARG_BUFFER, AllocTailCallArgBuffer, SM_Int_IntPtr_RetIntPtr) +DEFINE_METHOD(RUNTIME_HELPERS, ALLOC_TAILCALL_ARG_BUFFER, AllocTailCallArgBuffer, SM_Int_IntPtr_RetIntPtr) DEFINE_METHOD(RUNTIME_HELPERS, GET_TAILCALL_INFO, GetTailCallInfo, NoSig) -DEFINE_METHOD(RUNTIME_HELPERS, FREE_TAILCALL_ARG_BUFFER, FreeTailCallArgBuffer, SM_RetVoid) +DEFINE_METHOD(RUNTIME_HELPERS, FREE_TAILCALL_ARG_BUFFER, FreeTailCallArgBuffer, SM_RetVoid) +DEFINE_METHOD(RUNTIME_HELPERS, DISPATCH_TAILCALLS, DispatchTailCalls, NoSig) DEFINE_CLASS(UNSAFE, InternalCompilerServices, Unsafe) DEFINE_METHOD(UNSAFE, AS_POINTER, AsPointer, NoSig) @@ -979,7 +979,6 @@ DEFINE_METHOD(BUFFER, MEMCPY_PTRBYTE_ARRBYTE, Memcpy, DEFINE_METHOD(BUFFER, MEMCPY, Memcpy, SM_PtrByte_PtrByte_Int_RetVoid) DEFINE_CLASS(STUBHELPERS, StubHelpers, StubHelpers) -DEFINE_METHOD(STUBHELPERS, IS_QCALL, IsQCall, SM_IntPtr_RetBool) DEFINE_METHOD(STUBHELPERS, INIT_DECLARING_TYPE, InitDeclaringType, SM_IntPtr_RetVoid) DEFINE_METHOD(STUBHELPERS, GET_NDIRECT_TARGET, GetNDirectTarget, SM_IntPtr_RetIntPtr) DEFINE_METHOD(STUBHELPERS, GET_DELEGATE_TARGET, GetDelegateTarget, SM_Delegate_RefIntPtr_RetIntPtr) diff --git a/src/coreclr/src/vm/mtypes.h b/src/coreclr/src/vm/mtypes.h index f40c72479183..0cbc86c1a85f 100644 --- a/src/coreclr/src/vm/mtypes.h +++ b/src/coreclr/src/vm/mtypes.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: mtypes.h // diff --git a/src/coreclr/src/vm/multicorejit.cpp b/src/coreclr/src/vm/multicorejit.cpp index def296989be2..e260be4a4d18 100644 --- a/src/coreclr/src/vm/multicorejit.cpp +++ b/src/coreclr/src/vm/multicorejit.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: MultiCoreJIT.cpp // @@ -1359,8 +1358,6 @@ void MulticoreJitManager::StopProfileAll() } CONTRACTL_END; - _ASSERTE(!AppX::IsAppXProcess()); - AppDomainIterator domain(TRUE); while (domain.Next()) diff --git a/src/coreclr/src/vm/multicorejit.h b/src/coreclr/src/vm/multicorejit.h index ca1a1cc8dcb0..73a0c6a431b2 100644 --- a/src/coreclr/src/vm/multicorejit.h +++ b/src/coreclr/src/vm/multicorejit.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: MultiCoreJIT.h // diff --git a/src/coreclr/src/vm/multicorejitimpl.h b/src/coreclr/src/vm/multicorejitimpl.h index d1e3ed52f56d..9f517a8945d4 100644 --- a/src/coreclr/src/vm/multicorejitimpl.h +++ b/src/coreclr/src/vm/multicorejitimpl.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: MultiCoreJITImpl.h // diff --git a/src/coreclr/src/vm/multicorejitplayer.cpp b/src/coreclr/src/vm/multicorejitplayer.cpp index 601e5b8d9249..fb3bb598406e 100644 --- a/src/coreclr/src/vm/multicorejitplayer.cpp +++ b/src/coreclr/src/vm/multicorejitplayer.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: MultiCoreJITPlayer.cpp // diff --git a/src/coreclr/src/vm/namespace.h b/src/coreclr/src/vm/namespace.h index 76e088209850..8c2270ce6b0d 100644 --- a/src/coreclr/src/vm/namespace.h +++ b/src/coreclr/src/vm/namespace.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // This file defines namespaces used by the runtime. // diff --git a/src/coreclr/src/vm/nativeeventsource.cpp b/src/coreclr/src/vm/nativeeventsource.cpp index 18bb89b32a53..753b74a79230 100644 --- a/src/coreclr/src/vm/nativeeventsource.cpp +++ b/src/coreclr/src/vm/nativeeventsource.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: nativeeventsource.cpp // Abstract: This module implements native part of Event Source support in VM diff --git a/src/coreclr/src/vm/nativeeventsource.h b/src/coreclr/src/vm/nativeeventsource.h index fdd46df6809a..f22d21ddbfd9 100644 --- a/src/coreclr/src/vm/nativeeventsource.h +++ b/src/coreclr/src/vm/nativeeventsource.h @@ -1,7 +1,5 @@ - // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: nativeeventsource.h // Abstract: This module implements native part of Event Source support in VM diff --git a/src/coreclr/src/vm/nativeformatreader.h b/src/coreclr/src/vm/nativeformatreader.h index 397a27b7cc2a..8c4d643020c0 100644 --- a/src/coreclr/src/vm/nativeformatreader.h +++ b/src/coreclr/src/vm/nativeformatreader.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // --------------------------------------------------------------------------- // NativeFormatReader diff --git a/src/coreclr/src/vm/nativeimage.cpp b/src/coreclr/src/vm/nativeimage.cpp index d321deb9ce35..c02a9e8e89ce 100644 --- a/src/coreclr/src/vm/nativeimage.cpp +++ b/src/coreclr/src/vm/nativeimage.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // -------------------------------------------------------------------------------- // NativeImage.cpp // diff --git a/src/coreclr/src/vm/nativeimage.h b/src/coreclr/src/vm/nativeimage.h index f40ef694ab7c..cbcee5246dbc 100644 --- a/src/coreclr/src/vm/nativeimage.h +++ b/src/coreclr/src/vm/nativeimage.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _NATIVEIMAGE_H #define _NATIVEIMAGE_H diff --git a/src/coreclr/src/vm/nativelibrarynative.cpp b/src/coreclr/src/vm/nativelibrarynative.cpp index de1156b44c21..d059a3f4a9b9 100644 --- a/src/coreclr/src/vm/nativelibrarynative.cpp +++ b/src/coreclr/src/vm/nativelibrarynative.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: NativeLibraryNative.cpp // diff --git a/src/coreclr/src/vm/nativelibrarynative.h b/src/coreclr/src/vm/nativelibrarynative.h index 21f424eb99e7..e34ef68a74b3 100644 --- a/src/coreclr/src/vm/nativelibrarynative.h +++ b/src/coreclr/src/vm/nativelibrarynative.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: NativeLibraryNative.h // diff --git a/src/coreclr/src/vm/nativeoverlapped.cpp b/src/coreclr/src/vm/nativeoverlapped.cpp index 548b1a5a6f1d..0657febc366d 100644 --- a/src/coreclr/src/vm/nativeoverlapped.cpp +++ b/src/coreclr/src/vm/nativeoverlapped.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ diff --git a/src/coreclr/src/vm/nativeoverlapped.h b/src/coreclr/src/vm/nativeoverlapped.h index 4e7a30974ab8..9853c00d5e32 100644 --- a/src/coreclr/src/vm/nativeoverlapped.h +++ b/src/coreclr/src/vm/nativeoverlapped.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ diff --git a/src/coreclr/src/vm/ngenhash.h b/src/coreclr/src/vm/ngenhash.h index c59eb8e62776..2caad782ebf0 100644 --- a/src/coreclr/src/vm/ngenhash.h +++ b/src/coreclr/src/vm/ngenhash.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/ngenhash.inl b/src/coreclr/src/vm/ngenhash.inl index de5b310a2686..9c608f5b68a2 100644 --- a/src/coreclr/src/vm/ngenhash.inl +++ b/src/coreclr/src/vm/ngenhash.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/notifyexternals.cpp b/src/coreclr/src/vm/notifyexternals.cpp index 82694bc24dd2..49c2443da3bc 100644 --- a/src/coreclr/src/vm/notifyexternals.cpp +++ b/src/coreclr/src/vm/notifyexternals.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: notifyexternals.cpp // diff --git a/src/coreclr/src/vm/notifyexternals.h b/src/coreclr/src/vm/notifyexternals.h index fb4d28da3136..8d204d1a7881 100644 --- a/src/coreclr/src/vm/notifyexternals.h +++ b/src/coreclr/src/vm/notifyexternals.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //////////////////////////////////////////////////////////////////////////////// diff --git a/src/coreclr/src/vm/object.cpp b/src/coreclr/src/vm/object.cpp index 06e7bb6c8bf6..8966075d5005 100644 --- a/src/coreclr/src/vm/object.cpp +++ b/src/coreclr/src/vm/object.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // OBJECT.CPP // diff --git a/src/coreclr/src/vm/object.h b/src/coreclr/src/vm/object.h index 48765ccb885b..5d6c3c3981eb 100644 --- a/src/coreclr/src/vm/object.h +++ b/src/coreclr/src/vm/object.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // OBJECT.H // diff --git a/src/coreclr/src/vm/object.inl b/src/coreclr/src/vm/object.inl index fffd3ce4dcb9..e82fdebfbeb5 100644 --- a/src/coreclr/src/vm/object.inl +++ b/src/coreclr/src/vm/object.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // OBJECT.INL // diff --git a/src/coreclr/src/vm/objectlist.cpp b/src/coreclr/src/vm/objectlist.cpp index b1199da3fcb6..ac80ca33bacd 100644 --- a/src/coreclr/src/vm/objectlist.cpp +++ b/src/coreclr/src/vm/objectlist.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" diff --git a/src/coreclr/src/vm/objectlist.h b/src/coreclr/src/vm/objectlist.h index 88d9286067b6..4542c890f800 100644 --- a/src/coreclr/src/vm/objectlist.h +++ b/src/coreclr/src/vm/objectlist.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/vm/olecontexthelpers.cpp b/src/coreclr/src/vm/olecontexthelpers.cpp index 44c509a81d09..21471238a716 100644 --- a/src/coreclr/src/vm/olecontexthelpers.cpp +++ b/src/coreclr/src/vm/olecontexthelpers.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" diff --git a/src/coreclr/src/vm/olecontexthelpers.h b/src/coreclr/src/vm/olecontexthelpers.h index 3066ea3ac389..2722fd9542fb 100644 --- a/src/coreclr/src/vm/olecontexthelpers.h +++ b/src/coreclr/src/vm/olecontexthelpers.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // OleContextHelpers.h // diff --git a/src/coreclr/src/vm/oletls.h b/src/coreclr/src/vm/oletls.h index de507951a6c1..ee2ce722a796 100644 --- a/src/coreclr/src/vm/oletls.h +++ b/src/coreclr/src/vm/oletls.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //+--------------------------------------------------------------------------- // // File: oletls.h diff --git a/src/coreclr/src/vm/olevariant.cpp b/src/coreclr/src/vm/olevariant.cpp index fc0ab0704ec6..1755add7d5e7 100644 --- a/src/coreclr/src/vm/olevariant.cpp +++ b/src/coreclr/src/vm/olevariant.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: OleVariant.cpp // @@ -887,7 +886,7 @@ const OleVariant::Marshaler *OleVariant::GetMarshalerForVarType(VARTYPE vt, BOOL #endif // FEATURE_COMINTEROP -#ifdef FEATURE_CLASSIC_COMINTEROP +#ifdef FEATURE_COMINTEROP if (vt & VT_ARRAY) { VariantArray: @@ -900,7 +899,7 @@ const OleVariant::Marshaler *OleVariant::GetMarshalerForVarType(VARTYPE vt, BOOL ClearVariantArray ); } -#endif // FEATURE_CLASSIC_COMINTEROP +#endif // FEATURE_COMINTEROP switch (vt) { @@ -973,10 +972,8 @@ const OleVariant::Marshaler *OleVariant::GetMarshalerForVarType(VARTYPE vt, BOOL ClearInterfaceArray ); -#ifdef FEATURE_CLASSIC_COMINTEROP case VT_SAFEARRAY: goto VariantArray; -#endif case VT_VARIANT: RETURN_MARSHALER( @@ -1053,7 +1050,7 @@ const OleVariant::Marshaler *OleVariant::GetMarshalerForVarType(VARTYPE vt, BOOL ); case VT_RECORD: -#ifdef FEATURE_CLASSIC_COMINTEROP +#ifdef FEATURE_COMINTEROP RETURN_MARSHALER( MarshalRecordVariantOleToCom, MarshalRecordVariantComToOle, @@ -1069,7 +1066,7 @@ const OleVariant::Marshaler *OleVariant::GetMarshalerForVarType(VARTYPE vt, BOOL MarshalRecordArrayComToOle, ClearRecordArray ); -#endif // FEATURE_CLASSIC_COMINTEROP +#endif // FEATURE_COMINTEROP case VT_CARRAY: case VT_USERDEFINED: @@ -2581,7 +2578,7 @@ void OleVariant::MarshalDecimalVariantOleRefToCom(VARIANT *pOleVariant, * Record marshaling routines * ------------------------------------------------------------------------- */ -#ifdef FEATURE_CLASSIC_COMINTEROP +#ifdef FEATURE_COMINTEROP void OleVariant::MarshalRecordVariantOleToCom(VARIANT *pOleVariant, VariantData *pComVariant) { @@ -2668,7 +2665,7 @@ void OleVariant::MarshalRecordVariantOleRefToCom(VARIANT *pOleVariant, // the same so we can simply forward the call to the non byref API. MarshalRecordVariantOleToCom(pOleVariant, pComVariant); } -#endif // FEATURE_CLASSIC_COMINTEROP +#endif // FEATURE_COMINTEROP void OleVariant::MarshalRecordArrayOleToCom(void *oleArray, BASEARRAYREF *pComArray, MethodTable *pElementMT, PCODE pManagedMarshalerCode) @@ -2768,11 +2765,6 @@ void OleVariant::MarshalOleVariantForObject(OBJECTREF * const & pObj, VARIANT *p } CONTRACTL_END; - if (AppX::IsAppXProcess()) - { - COMPlusThrow(kPlatformNotSupportedException, IDS_EE_BADMARSHAL_TYPE_VARIANTASOBJECT); - } - SafeVariantClear(pOle); #ifdef _DEBUG @@ -2896,11 +2888,6 @@ void OleVariant::MarshalOleRefVariantForObject(OBJECTREF *pObj, VARIANT *pOle) } CONTRACTL_END; - if (AppX::IsAppXProcess()) - { - COMPlusThrow(kPlatformNotSupportedException, IDS_EE_BADMARSHAL_TYPE_VARIANTASOBJECT); - } - HRESULT hr = MarshalCommonOleRefVariantForObject(pObj, pOle); if (FAILED(hr)) @@ -3119,11 +3106,6 @@ void OleVariant::MarshalObjectForOleVariant(const VARIANT * pOle, OBJECTREF * co } CONTRACT_END; - if (AppX::IsAppXProcess()) - { - COMPlusThrow(kPlatformNotSupportedException, IDS_EE_BADMARSHAL_TYPE_VARIANTASOBJECT); - } - // if V_ISBYREF(pOle) and V_BYREF(pOle) is null then we have a problem, // unless we're dealing with VT_EMPTY or VT_NULL in which case that is ok?? VARTYPE vt = V_VT(pOle) & ~VT_BYREF; @@ -4090,7 +4072,7 @@ void OleVariant::ClearVariantArray(void *oleArray, SIZE_T cElements, MethodTable /* ------------------------------------------------------------------------- * * Array marshaling routines * ------------------------------------------------------------------------- */ -#ifdef FEATURE_CLASSIC_COMINTEROP +#ifdef FEATURE_COMINTEROP void OleVariant::MarshalArrayVariantOleToCom(VARIANT *pOleVariant, VariantData *pComVariant) @@ -4220,7 +4202,7 @@ void OleVariant::MarshalArrayVariantOleRefToCom(VARIANT *pOleVariant, pComVariant->SetObjRef(NULL); } } -#endif //FEATURE_CLASSIC_COMINTEROP +#endif //FEATURE_COMINTEROP /* ------------------------------------------------------------------------- * @@ -5102,7 +5084,7 @@ TypeHandle OleVariant::GetArrayElementTypeWrapperAware(BASEARRAYREF *pArray) } } -#ifdef FEATURE_CLASSIC_COMINTEROP +#ifdef FEATURE_COMINTEROP TypeHandle OleVariant::GetElementTypeForRecordSafeArray(SAFEARRAY* pSafeArray) { CONTRACTL @@ -5130,7 +5112,7 @@ TypeHandle OleVariant::GetElementTypeForRecordSafeArray(SAFEARRAY* pSafeArray) return TypeHandle(pValueClass); } -#endif //FEATURE_CLASSIC_COMINTEROP +#endif //FEATURE_COMINTEROP void OleVariant::AllocateEmptyStringForBSTR(BSTR bstr, STRINGREF *pStringObj) { diff --git a/src/coreclr/src/vm/olevariant.h b/src/coreclr/src/vm/olevariant.h index 9fe3de8345bb..dfc846e2731b 100644 --- a/src/coreclr/src/vm/olevariant.h +++ b/src/coreclr/src/vm/olevariant.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: OleVariant.h // @@ -600,7 +599,7 @@ class OleVariant static void MarshalDecimalVariantComToOle(VariantData* pComVariant, VARIANT* pOleVariant); static void MarshalDecimalVariantOleRefToCom(VARIANT* pOleVariant, VariantData* pComVariant); -#ifdef FEATURE_CLASSIC_COMINTEROP +#ifdef FEATURE_COMINTEROP static void MarshalRecordVariantOleToCom(VARIANT* pOleVariant, VariantData* pComVariant); static void MarshalRecordVariantComToOle(VariantData* pComVariant, VARIANT* pOleVariant); static void MarshalRecordVariantOleRefToCom(VARIANT* pOleVariant, VariantData* pComVariant); @@ -624,7 +623,7 @@ class OleVariant SIZE_T cElements, PCODE pManagedMarshalerCode); static void ClearVariantArray(void* oleArray, SIZE_T cElements, MethodTable* pInterfaceMT, PCODE pManagedMarshalerCode); -#ifdef FEATURE_CLASSIC_COMINTEROP +#ifdef FEATURE_COMINTEROP static void MarshalArrayVariantOleToCom(VARIANT* pOleVariant, VariantData* pComVariant); static void MarshalArrayVariantComToOle(VariantData* pComVariant, VARIANT* pOleVariant); static void MarshalArrayVariantOleRefToCom(VARIANT* pOleVariant, VariantData* pComVariant); diff --git a/src/coreclr/src/vm/onstackreplacement.cpp b/src/coreclr/src/vm/onstackreplacement.cpp index 4bb80efc5e94..10668188a4e6 100644 --- a/src/coreclr/src/vm/onstackreplacement.cpp +++ b/src/coreclr/src/vm/onstackreplacement.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: onstackreplacement.cpp // diff --git a/src/coreclr/src/vm/onstackreplacement.h b/src/coreclr/src/vm/onstackreplacement.h index 8ef3188cfc22..fd33aaa0bd35 100644 --- a/src/coreclr/src/vm/onstackreplacement.h +++ b/src/coreclr/src/vm/onstackreplacement.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: onstackreplacement.h // diff --git a/src/coreclr/src/vm/packedfields.inl b/src/coreclr/src/vm/packedfields.inl index 5ceb5522bd0c..16544acd2208 100644 --- a/src/coreclr/src/vm/packedfields.inl +++ b/src/coreclr/src/vm/packedfields.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/pefile.cpp b/src/coreclr/src/vm/pefile.cpp index eec038f2b10a..25d379524977 100644 --- a/src/coreclr/src/vm/pefile.cpp +++ b/src/coreclr/src/vm/pefile.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // -------------------------------------------------------------------------------- // PEFile.cpp // @@ -63,6 +62,7 @@ PEFile::PEFile(PEImage *identity) : m_pMetadataLock(::new SimpleRWLock(PREEMPTIVE, LOCK_TYPE_DEFAULT)), m_refCount(1), m_flags(0), + m_pAssemblyLoadContext(nullptr), m_pHostAssembly(nullptr), m_pFallbackLoadContextBinder(nullptr) { @@ -1831,7 +1831,7 @@ void PEAssembly::Attach() STANDARD_VM_CONTRACT; } - +#ifndef DACCESS_COMPILE PEAssembly::PEAssembly( CoreBindResult* pBindResultInfo, IMetaDataEmit* pEmit, @@ -1921,8 +1921,10 @@ PEAssembly::PEAssembly( m_debugName.Normalize(); m_pDebugName = m_debugName; #endif -} + SetupAssemblyLoadContext(); +} +#endif // !DACCESS_COMPILE PEAssembly *PEAssembly::Open( @@ -2331,6 +2333,24 @@ void PEFile::EnsureImageOpened() GetILimage()->GetLayout(PEImageLayout::LAYOUT_ANY,PEImage::LAYOUT_CREATEIFNEEDED)->Release(); } +void PEFile::SetupAssemblyLoadContext() +{ + PTR_ICLRPrivBinder pBindingContext = GetBindingContext(); + ICLRPrivBinder* pOpaqueBinder = NULL; + + if (pBindingContext != NULL) + { + UINT_PTR assemblyBinderID = 0; + IfFailThrow(pBindingContext->GetBinderID(&assemblyBinderID)); + + pOpaqueBinder = reinterpret_cast(assemblyBinderID); + } + + m_pAssemblyLoadContext = (pOpaqueBinder != NULL) ? + (AssemblyLoadContext*)pOpaqueBinder : + AppDomain::GetCurrentDomain()->CreateBinderContext(); +} + #endif // #ifndef DACCESS_COMPILE #ifdef DACCESS_COMPILE @@ -2462,23 +2482,3 @@ PTR_ICLRPrivBinder PEFile::GetBindingContext() return pBindingContext; } - -#ifndef DACCESS_COMPILE -AssemblyLoadContext* PEFile::GetAssemblyLoadContext() -{ - LIMITED_METHOD_CONTRACT; - - PTR_ICLRPrivBinder pBindingContext = GetBindingContext(); - ICLRPrivBinder* pOpaqueBinder = NULL; - - if (pBindingContext != NULL) - { - UINT_PTR assemblyBinderID = 0; - IfFailThrow(pBindingContext->GetBinderID(&assemblyBinderID)); - - pOpaqueBinder = reinterpret_cast(assemblyBinderID); - } - - return (pOpaqueBinder != NULL) ? (AssemblyLoadContext*)pOpaqueBinder : AppDomain::GetCurrentDomain()->GetTPABinderContext(); -} -#endif diff --git a/src/coreclr/src/vm/pefile.h b/src/coreclr/src/vm/pefile.h index c3282c4cddd8..2ee625206163 100644 --- a/src/coreclr/src/vm/pefile.h +++ b/src/coreclr/src/vm/pefile.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // -------------------------------------------------------------------------------- // PEFile.h // @@ -479,7 +478,10 @@ class PEFile IMetaDataEmit *m_pEmitter; SimpleRWLock *m_pMetadataLock; Volatile m_refCount; - int m_flags; + int m_flags; + + // AssemblyLoadContext that this PEFile is associated with + PTR_AssemblyLoadContext m_pAssemblyLoadContext; #ifdef DEBUGGING_SUPPORTED #ifdef FEATURE_PREJIT @@ -566,20 +568,33 @@ class PEFile // Returns the ICLRPrivBinder* instance associated with the PEFile PTR_ICLRPrivBinder GetBindingContext(); - AssemblyLoadContext* GetAssemblyLoadContext(); - - bool HasHostAssembly() - { STATIC_CONTRACT_WRAPPER; return GetHostAssembly() != nullptr; } - - bool CanUseWithBindingCache() - { LIMITED_METHOD_CONTRACT; return !HasHostAssembly(); } +#ifndef DACCESS_COMPILE + void SetupAssemblyLoadContext(); void SetFallbackLoadContextBinder(PTR_ICLRPrivBinder pFallbackLoadContextBinder) { LIMITED_METHOD_CONTRACT; m_pFallbackLoadContextBinder = pFallbackLoadContextBinder; + SetupAssemblyLoadContext(); + } + +#endif //!DACCESS_COMPILE + + // Returns AssemblyLoadContext into which the current PEFile was loaded. + PTR_AssemblyLoadContext GetAssemblyLoadContext() + { + LIMITED_METHOD_CONTRACT; + + _ASSERTE(m_pAssemblyLoadContext != NULL); + return m_pAssemblyLoadContext; } + bool HasHostAssembly() + { STATIC_CONTRACT_WRAPPER; return GetHostAssembly() != nullptr; } + + bool CanUseWithBindingCache() + { LIMITED_METHOD_CONTRACT; return !HasHostAssembly(); } + PTR_ICLRPrivBinder GetFallbackLoadContextBinder() { LIMITED_METHOD_CONTRACT; diff --git a/src/coreclr/src/vm/pefile.inl b/src/coreclr/src/vm/pefile.inl index b3de060c0587..349b755b5fc1 100644 --- a/src/coreclr/src/vm/pefile.inl +++ b/src/coreclr/src/vm/pefile.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // -------------------------------------------------------------------------------- // PEFile.inl // diff --git a/src/coreclr/src/vm/peimage.cpp b/src/coreclr/src/vm/peimage.cpp index be06ebc837a1..802a20ab4da4 100644 --- a/src/coreclr/src/vm/peimage.cpp +++ b/src/coreclr/src/vm/peimage.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // -------------------------------------------------------------------------------- // PEImage.cpp // @@ -1420,38 +1419,3 @@ BOOL PEImage::IsPtrInImage(PTR_CVOID data) return FALSE; } - - -#if !defined(DACCESS_COMPILE) -PEImage * PEImage::OpenImage( - ICLRPrivResource * pIResource, - MDInternalImportFlags flags) -{ - STANDARD_VM_CONTRACT; - HRESULT hr = S_OK; - - PEImageHolder pPEImage; - - - IID iidResource; - IfFailThrow(pIResource->GetResourceType(&iidResource)); - - if (iidResource == __uuidof(ICLRPrivResourcePath)) - { - ReleaseHolder pIResourcePath; - IfFailThrow(pIResource->QueryInterface(__uuidof(ICLRPrivResourcePath), (LPVOID*)&pIResourcePath)); - WCHAR wzPath[_MAX_PATH]; - DWORD cchPath = NumItems(wzPath); - IfFailThrow(pIResourcePath->GetPath(cchPath, &cchPath, wzPath)); - pPEImage = PEImage::OpenImage(wzPath, flags); - } - else - { - ThrowHR(COR_E_BADIMAGEFORMAT); - } - - return pPEImage.Extract(); -} -#endif - - diff --git a/src/coreclr/src/vm/peimage.h b/src/coreclr/src/vm/peimage.h index 2a9b0b76ac10..47d518319899 100644 --- a/src/coreclr/src/vm/peimage.h +++ b/src/coreclr/src/vm/peimage.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // -------------------------------------------------------------------------------- // PEImage.h // @@ -120,12 +119,6 @@ class PEImage }; - // pUnkResource must be one of the ICLRPrivResource* interfaces defined in CLRPrivBinding.IDL. - // pUnkResource will be queried for each of these to find a match and - static PEImage * OpenImage( - ICLRPrivResource * pIResource, - MDInternalImportFlags flags = MDInternalImport_Default); - static PTR_PEImage FindById(UINT64 uStreamAsmId, DWORD dwModuleId); static PTR_PEImage FindByPath(LPCWSTR pPath); static PTR_PEImage FindByShortPath(LPCWSTR pPath); diff --git a/src/coreclr/src/vm/peimage.inl b/src/coreclr/src/vm/peimage.inl index eebae16e15f7..56d0b0481c77 100644 --- a/src/coreclr/src/vm/peimage.inl +++ b/src/coreclr/src/vm/peimage.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // -------------------------------------------------------------------------------- // PEImage.inl // diff --git a/src/coreclr/src/vm/peimagelayout.cpp b/src/coreclr/src/vm/peimagelayout.cpp index 33032108e7e3..88b27ba5d1b0 100644 --- a/src/coreclr/src/vm/peimagelayout.cpp +++ b/src/coreclr/src/vm/peimagelayout.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/vm/peimagelayout.h b/src/coreclr/src/vm/peimagelayout.h index bc846c54d6c7..7a0242de4f22 100644 --- a/src/coreclr/src/vm/peimagelayout.h +++ b/src/coreclr/src/vm/peimagelayout.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // -------------------------------------------------------------------------------- // PEImageLayout.h // diff --git a/src/coreclr/src/vm/peimagelayout.inl b/src/coreclr/src/vm/peimagelayout.inl index 9fb90e4c9788..5b5cc7ba2b65 100644 --- a/src/coreclr/src/vm/peimagelayout.inl +++ b/src/coreclr/src/vm/peimagelayout.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/vm/pendingload.cpp b/src/coreclr/src/vm/pendingload.cpp index 647bd6d83eb3..597a895b3317 100644 --- a/src/coreclr/src/vm/pendingload.cpp +++ b/src/coreclr/src/vm/pendingload.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: pendingload.cpp // diff --git a/src/coreclr/src/vm/pendingload.h b/src/coreclr/src/vm/pendingload.h index b24da9929420..be8cf6c521b0 100644 --- a/src/coreclr/src/vm/pendingload.h +++ b/src/coreclr/src/vm/pendingload.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // pendingload.h // diff --git a/src/coreclr/src/vm/perfinfo.cpp b/src/coreclr/src/vm/perfinfo.cpp index 629744f03b46..869476ea0fd5 100644 --- a/src/coreclr/src/vm/perfinfo.cpp +++ b/src/coreclr/src/vm/perfinfo.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: perfinfo.cpp // diff --git a/src/coreclr/src/vm/perfinfo.h b/src/coreclr/src/vm/perfinfo.h index d25568507927..759a844f3092 100644 --- a/src/coreclr/src/vm/perfinfo.h +++ b/src/coreclr/src/vm/perfinfo.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: perfinfo.h // diff --git a/src/coreclr/src/vm/perfmap.cpp b/src/coreclr/src/vm/perfmap.cpp index 155daebfc437..9fa9af72c67c 100644 --- a/src/coreclr/src/vm/perfmap.cpp +++ b/src/coreclr/src/vm/perfmap.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: perfmap.cpp // diff --git a/src/coreclr/src/vm/perfmap.h b/src/coreclr/src/vm/perfmap.h index 2528e41594da..14595813877d 100644 --- a/src/coreclr/src/vm/perfmap.h +++ b/src/coreclr/src/vm/perfmap.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: perfmap.h // diff --git a/src/coreclr/src/vm/pgo.cpp b/src/coreclr/src/vm/pgo.cpp index 3d1826b7eba3..16d57f29d8cc 100644 --- a/src/coreclr/src/vm/pgo.cpp +++ b/src/coreclr/src/vm/pgo.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "log.h" diff --git a/src/coreclr/src/vm/pgo.h b/src/coreclr/src/vm/pgo.h index acaf74712c86..c5fc5273236f 100644 --- a/src/coreclr/src/vm/pgo.h +++ b/src/coreclr/src/vm/pgo.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef PGO_H #define PGO_H diff --git a/src/coreclr/src/vm/precode.cpp b/src/coreclr/src/vm/precode.cpp index 06573a542642..0228d860c535 100644 --- a/src/coreclr/src/vm/precode.cpp +++ b/src/coreclr/src/vm/precode.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // precode.cpp // diff --git a/src/coreclr/src/vm/precode.h b/src/coreclr/src/vm/precode.h index 0363700d095b..99220f3b966d 100644 --- a/src/coreclr/src/vm/precode.h +++ b/src/coreclr/src/vm/precode.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // precode.h // diff --git a/src/coreclr/src/vm/prestub.cpp b/src/coreclr/src/vm/prestub.cpp index 8922590fed93..c6a3a58f98d3 100644 --- a/src/coreclr/src/vm/prestub.cpp +++ b/src/coreclr/src/vm/prestub.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: Prestub.cpp // diff --git a/src/coreclr/src/vm/profdetach.cpp b/src/coreclr/src/vm/profdetach.cpp index 9ed02a9f440c..392fde6c0a10 100644 --- a/src/coreclr/src/vm/profdetach.cpp +++ b/src/coreclr/src/vm/profdetach.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ProfDetach.cpp // diff --git a/src/coreclr/src/vm/profdetach.h b/src/coreclr/src/vm/profdetach.h index bfa3989f58af..7b85cb61c9d0 100644 --- a/src/coreclr/src/vm/profdetach.h +++ b/src/coreclr/src/vm/profdetach.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ProfDetach.h // diff --git a/src/coreclr/src/vm/profilerdiagnosticprotocolhelper.cpp b/src/coreclr/src/vm/profilerdiagnosticprotocolhelper.cpp index c3e2a7984c27..efa01fc05164 100644 --- a/src/coreclr/src/vm/profilerdiagnosticprotocolhelper.cpp +++ b/src/coreclr/src/vm/profilerdiagnosticprotocolhelper.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "fastserializer.h" diff --git a/src/coreclr/src/vm/profilerdiagnosticprotocolhelper.h b/src/coreclr/src/vm/profilerdiagnosticprotocolhelper.h index e5b08f771f24..e22f7cb9a724 100644 --- a/src/coreclr/src/vm/profilerdiagnosticprotocolhelper.h +++ b/src/coreclr/src/vm/profilerdiagnosticprotocolhelper.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __PROFILER_DIAGNOSTIC_PROTOCOL_HELPER_H__ #define __PROFILER_DIAGNOSTIC_PROTOCOL_HELPER_H__ diff --git a/src/coreclr/src/vm/profilermetadataemitvalidator.cpp b/src/coreclr/src/vm/profilermetadataemitvalidator.cpp index 1c7dc8854c3f..8424bad271a2 100644 --- a/src/coreclr/src/vm/profilermetadataemitvalidator.cpp +++ b/src/coreclr/src/vm/profilermetadataemitvalidator.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/vm/profilermetadataemitvalidator.h b/src/coreclr/src/vm/profilermetadataemitvalidator.h index bdc2b2423ba5..e5bac319aadc 100644 --- a/src/coreclr/src/vm/profilermetadataemitvalidator.h +++ b/src/coreclr/src/vm/profilermetadataemitvalidator.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/vm/profilingenumerators.cpp b/src/coreclr/src/vm/profilingenumerators.cpp index 908fdda51716..609b57cf4ee3 100644 --- a/src/coreclr/src/vm/profilingenumerators.cpp +++ b/src/coreclr/src/vm/profilingenumerators.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // FILE: ProfilingEnumerators.cpp // diff --git a/src/coreclr/src/vm/profilingenumerators.h b/src/coreclr/src/vm/profilingenumerators.h index b5ac5d72cf4f..de050af4e342 100644 --- a/src/coreclr/src/vm/profilingenumerators.h +++ b/src/coreclr/src/vm/profilingenumerators.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // FILE: ProfilingEnumerators.h // diff --git a/src/coreclr/src/vm/profilinghelper.cpp b/src/coreclr/src/vm/profilinghelper.cpp index e5af2fcdfaca..ab64bb0feab4 100644 --- a/src/coreclr/src/vm/profilinghelper.cpp +++ b/src/coreclr/src/vm/profilinghelper.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ProfilingHelper.cpp // diff --git a/src/coreclr/src/vm/profilinghelper.h b/src/coreclr/src/vm/profilinghelper.h index 2104f5f78660..4c8ed1dc5c26 100644 --- a/src/coreclr/src/vm/profilinghelper.h +++ b/src/coreclr/src/vm/profilinghelper.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ProfilingHelper.h // diff --git a/src/coreclr/src/vm/profilinghelper.inl b/src/coreclr/src/vm/profilinghelper.inl index 7833c01a5cb4..364f574bbd35 100644 --- a/src/coreclr/src/vm/profilinghelper.inl +++ b/src/coreclr/src/vm/profilinghelper.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ProfilingHelper.inl // diff --git a/src/coreclr/src/vm/proftoeeinterfaceimpl.cpp b/src/coreclr/src/vm/proftoeeinterfaceimpl.cpp index ca5e8674da36..a5e4206a5a1a 100644 --- a/src/coreclr/src/vm/proftoeeinterfaceimpl.cpp +++ b/src/coreclr/src/vm/proftoeeinterfaceimpl.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // FILE: ProfToEEInterfaceImpl.cpp // @@ -142,6 +141,8 @@ #include "eventpipeprovider.h" #include "eventpipemetadatagenerator.h" #include "eventpipeeventpayload.h" +#include "eventpipesession.h" +#include "eventpipesessionprovider.h" #endif // FEATURE_PERFTRACING //--------------------------------------------------------------------------------------- @@ -7028,7 +7029,160 @@ HRESULT ProfToEEInterfaceImpl::SetEnvironmentVariable(const WCHAR *szName, const return SetEnvironmentVariableW(szName, szValue) ? S_OK : HRESULT_FROM_WIN32(GetLastError()); } -HRESULT ProfToEEInterfaceImpl::EventPipeCreateProvider(const WCHAR *szName, EVENTPIPE_PROVIDER *pProviderHandle) +HRESULT ProfToEEInterfaceImpl::EventPipeStartSession( + UINT32 cProviderConfigs, + COR_PRF_EVENTPIPE_PROVIDER_CONFIG pProviderConfigs[], + BOOL requestRundown, + EVENTPIPE_SESSION* pSession) +{ + CONTRACTL + { + NOTHROW; + GC_TRIGGERS; + MODE_ANY; + EE_THREAD_NOT_REQUIRED; + } + CONTRACTL_END; + + PROFILER_TO_CLR_ENTRYPOINT_ASYNC_EX(kP2EEAllowableAfterAttach | kP2EETriggers, + (LF_CORPROF, + LL_INFO1000, + "**PROF: EventPipeStartSession.\n")); + +#ifdef FEATURE_PERFTRACING + + static_assert(offsetof(EventPipeProviderConfiguration, m_pProviderName) == offsetof(COR_PRF_EVENTPIPE_PROVIDER_CONFIG, providerName) + && offsetof(EventPipeProviderConfiguration, m_keywords) == offsetof(COR_PRF_EVENTPIPE_PROVIDER_CONFIG, keywords) + && offsetof(EventPipeProviderConfiguration, m_loggingLevel) == offsetof(COR_PRF_EVENTPIPE_PROVIDER_CONFIG, loggingLevel) + && offsetof(EventPipeProviderConfiguration, m_pFilterData) == offsetof(COR_PRF_EVENTPIPE_PROVIDER_CONFIG, filterData) + && sizeof(EventPipeProviderConfiguration) == sizeof(COR_PRF_EVENTPIPE_PROVIDER_CONFIG), + "Layouts of EventPipeProviderConfiguration type and COR_PRF_EVENTPIPE_PROVIDER_CONFIG type do not match!"); + + if (cProviderConfigs == 0 + || pProviderConfigs == NULL + || pSession == NULL) + { + return E_INVALIDARG; + } + + HRESULT hr = S_OK; + EX_TRY + { + EventPipeProviderConfiguration *pProviders = reinterpret_cast(pProviderConfigs); + UINT64 sessionID = EventPipe::Enable(NULL, + 0, // We don't use a circular buffer since it's synchronous + pProviders, + cProviderConfigs, + EventPipeSessionType::Synchronous, + EventPipeSerializationFormat::NetTraceV4, + requestRundown, + NULL, + &ProfToEEInterfaceImpl::EventPipeCallbackHelper); + if (sessionID != 0) + { + EventPipe::StartStreaming(sessionID); + + *pSession = sessionID; + } + else + { + hr = E_FAIL; + } + } + EX_CATCH_HRESULT(hr); + + return hr; +#else // FEATURE_PERFTRACING + return E_NOTIMPL; +#endif // FEATURE_PERFTRACING +} + +HRESULT ProfToEEInterfaceImpl::EventPipeAddProviderToSession( + EVENTPIPE_SESSION session, + COR_PRF_EVENTPIPE_PROVIDER_CONFIG providerConfig) +{ + + CONTRACTL + { + NOTHROW; + GC_TRIGGERS; + MODE_ANY; + EE_THREAD_NOT_REQUIRED; + } + CONTRACTL_END; + + PROFILER_TO_CLR_ENTRYPOINT_ASYNC_EX(kP2EEAllowableAfterAttach | kP2EETriggers, + (LF_CORPROF, + LL_INFO1000, + "**PROF: EventPipeAddProviderToSession.\n")); + +#ifdef FEATURE_PERFTRACING + if (providerConfig.providerName == NULL) + { + return E_INVALIDARG; + } + + HRESULT hr = S_OK; + EX_TRY + { + EventPipeSession *pSession = EventPipe::GetSession(session); + if (pSession == NULL) + { + hr = E_INVALIDARG; + } + else + { + EventPipeSessionProvider *pProvider = new EventPipeSessionProvider( + providerConfig.providerName, + providerConfig.keywords, + (EventPipeEventLevel)providerConfig.loggingLevel, + providerConfig.filterData); + + EventPipe::AddProviderToSession(pProvider, pSession); + } + } + EX_CATCH_HRESULT(hr); + + return hr; +#else // FEATURE_PERFTRACING + return E_NOTIMPL; +#endif // FEATURE_PERFTRACING +} + +HRESULT ProfToEEInterfaceImpl::EventPipeStopSession( + EVENTPIPE_SESSION session) +{ + CONTRACTL + { + NOTHROW; + GC_TRIGGERS; + MODE_ANY; + EE_THREAD_NOT_REQUIRED; + } + CONTRACTL_END; + + PROFILER_TO_CLR_ENTRYPOINT_ASYNC_EX(kP2EEAllowableAfterAttach | kP2EETriggers, + (LF_CORPROF, + LL_INFO1000, + "**PROF: EventPipeStopSession.\n")); + +#ifdef FEATURE_PERFTRACING + HRESULT hr = S_OK; + EX_TRY + { + EventPipe::Disable(session); + } + EX_CATCH_HRESULT(hr); + + return hr; +#else // FEATURE_PERFTRACING + return E_NOTIMPL; +#endif // FEATURE_PERFTRACING +} + +HRESULT ProfToEEInterfaceImpl::EventPipeCreateProvider( + const WCHAR *providerName, + EVENTPIPE_PROVIDER *pProvider) { CONTRACTL { @@ -7045,7 +7199,7 @@ HRESULT ProfToEEInterfaceImpl::EventPipeCreateProvider(const WCHAR *szName, EVEN "**PROF: EventPipeCreateProvider.\n")); #ifdef FEATURE_PERFTRACING - if (szName == NULL || pProviderHandle == NULL) + if (providerName == NULL || pProvider == NULL) { return E_INVALIDARG; } @@ -7053,14 +7207,81 @@ HRESULT ProfToEEInterfaceImpl::EventPipeCreateProvider(const WCHAR *szName, EVEN HRESULT hr = S_OK; EX_TRY { - EventPipeProvider *pProvider = EventPipe::CreateProvider(szName, NULL, NULL); - if (pProvider == NULL) + EventPipeProvider *pRealProvider = EventPipe::CreateProvider(providerName, NULL, NULL); + if (pRealProvider == NULL) { hr = E_FAIL; } else { - *pProviderHandle = reinterpret_cast(pProvider); + *pProvider = reinterpret_cast(pRealProvider); + } + } + EX_CATCH_HRESULT(hr); + + return hr; +#else // FEATURE_PERFTRACING + return E_NOTIMPL; +#endif // FEATURE_PERFTRACING +} + +HRESULT ProfToEEInterfaceImpl::EventPipeGetProviderInfo( + EVENTPIPE_PROVIDER provider, + ULONG cchName, + ULONG *pcchName, + WCHAR szName[]) +{ + CONTRACTL + { + NOTHROW; + GC_NOTRIGGER; + MODE_ANY; + EE_THREAD_NOT_REQUIRED; + } + CONTRACTL_END; + + PROFILER_TO_CLR_ENTRYPOINT_ASYNC_EX(kP2EEAllowableAfterAttach, + (LF_CORPROF, + LL_INFO1000, + "**PROF: EventPipeGetProviderInfo.\n")); + +#ifdef FEATURE_PERFTRACING + if (cchName > 0 && szName == NULL) + { + return E_INVALIDARG; + } + + EventPipeProvider *pRealProvider = reinterpret_cast(provider); + if (pRealProvider == NULL) + { + // Bogus provider passed in + return E_INVALIDARG; + } + + HRESULT hr = S_OK; + EX_TRY + { + const SString &providerName = pRealProvider->GetProviderName(); + ULONG numChars = providerName.GetCount() + 1; + if (pcchName != NULL) + { + *pcchName = numChars; + } + + if (numChars >= cchName) + { + hr = HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER); + } + else + { + size_t pos = 0; + for (SString::CIterator it = providerName.Begin(); it != providerName.End(); ++it) + { + szName[pos] = *it; + ++pos; + } + + szName[pos] = '\0'; } } EX_CATCH_HRESULT(hr); @@ -7072,8 +7293,8 @@ HRESULT ProfToEEInterfaceImpl::EventPipeCreateProvider(const WCHAR *szName, EVEN } HRESULT ProfToEEInterfaceImpl::EventPipeDefineEvent( - EVENTPIPE_PROVIDER provHandle, - const WCHAR *szName, + EVENTPIPE_PROVIDER provider, + const WCHAR *eventName, UINT32 eventID, UINT64 keywords, UINT32 eventVersion, @@ -7082,7 +7303,7 @@ HRESULT ProfToEEInterfaceImpl::EventPipeDefineEvent( BOOL needStack, UINT32 cParamDescs, COR_PRF_EVENTPIPE_PARAM_DESC pParamDescs[], - EVENTPIPE_EVENT *pEventHandle) + EVENTPIPE_EVENT *pEvent) { CONTRACTL { @@ -7097,9 +7318,10 @@ HRESULT ProfToEEInterfaceImpl::EventPipeDefineEvent( (LF_CORPROF, LL_INFO1000, "**PROF: EventPipeDefineEvent.\n")); + #ifdef FEATURE_PERFTRACING - EventPipeProvider *pProvider = reinterpret_cast(provHandle); - if (pProvider == NULL || szName == NULL || pEventHandle == NULL) + EventPipeProvider *pProvider = reinterpret_cast(provider); + if (pProvider == NULL || eventName == NULL || pEvent == NULL) { return E_INVALIDARG; } @@ -7132,7 +7354,7 @@ HRESULT ProfToEEInterfaceImpl::EventPipeDefineEvent( size_t metadataLength; NewArrayHolder pMetadata = EventPipeMetadataGenerator::GenerateEventMetadata( eventID, - szName, + eventName, keywords, eventVersion, (EventPipeEventLevel)level, @@ -7142,7 +7364,7 @@ HRESULT ProfToEEInterfaceImpl::EventPipeDefineEvent( &metadataLength); // Add the event. - EventPipeEvent *pEvent = pProvider->AddEvent( + EventPipeEvent *pRealEvent = pProvider->AddEvent( eventID, keywords, eventVersion, @@ -7151,7 +7373,7 @@ HRESULT ProfToEEInterfaceImpl::EventPipeDefineEvent( pMetadata, (unsigned int)metadataLength); - *pEventHandle = reinterpret_cast(pEvent); + *pEvent = reinterpret_cast(pRealEvent); } EX_CATCH_HRESULT(hr); @@ -7162,7 +7384,7 @@ HRESULT ProfToEEInterfaceImpl::EventPipeDefineEvent( } HRESULT ProfToEEInterfaceImpl::EventPipeWriteEvent( - EVENTPIPE_EVENT eventHandle, + EVENTPIPE_EVENT event, UINT32 cData, COR_PRF_EVENT_DATA data[], LPCGUID pActivityId, @@ -7182,7 +7404,7 @@ HRESULT ProfToEEInterfaceImpl::EventPipeWriteEvent( LL_INFO1000, "**PROF: EventPipeWriteEvent.\n")); #ifdef FEATURE_PERFTRACING - EventPipeEvent *pEvent = reinterpret_cast(eventHandle); + EventPipeEvent *pEvent = reinterpret_cast(event); if (pEvent == NULL) { @@ -7203,6 +7425,43 @@ HRESULT ProfToEEInterfaceImpl::EventPipeWriteEvent( #endif // FEATURE_PERFTRACING } +void ProfToEEInterfaceImpl::EventPipeCallbackHelper(EventPipeProvider *provider, + DWORD eventId, + DWORD eventVersion, + ULONG cbMetadataBlob, + LPCBYTE metadataBlob, + ULONG cbEventData, + LPCBYTE eventData, + LPCGUID pActivityId, + LPCGUID pRelatedActivityId, + Thread *pEventThread, + ULONG numStackFrames, + UINT_PTR stackFrames[]) +{ + // If we got here we know a profiler has started an EventPipe session + BEGIN_PIN_PROFILER(true); + // But, a profiler could always register for a session and then detach without + // closing the session. So check if we have an interface before proceeding. + if (g_profControlBlock.pProfInterface != nullptr) + { + g_profControlBlock.pProfInterface->EventPipeEventDelivered(provider, + eventId, + eventVersion, + cbMetadataBlob, + metadataBlob, + cbEventData, + eventData, + pActivityId, + pRelatedActivityId, + pEventThread, + numStackFrames, + stackFrames); + } + END_PIN_PROFILER(); +}; + + + /* * GetStringLayout * diff --git a/src/coreclr/src/vm/proftoeeinterfaceimpl.h b/src/coreclr/src/vm/proftoeeinterfaceimpl.h index e00d23c857b5..2fbfb8e80376 100644 --- a/src/coreclr/src/vm/proftoeeinterfaceimpl.h +++ b/src/coreclr/src/vm/proftoeeinterfaceimpl.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // FILE: ProfToEEInterfaceImpl.h // @@ -644,13 +643,32 @@ class ProfToEEInterfaceImpl : public ICorProfilerInfo12 // begin ICorProfilerInfo12 + COM_METHOD EventPipeStartSession( + UINT32 cProviderConfigs, + COR_PRF_EVENTPIPE_PROVIDER_CONFIG pProviderConfigs[], + BOOL requestRundown, + EVENTPIPE_SESSION* pSession); + + COM_METHOD EventPipeAddProviderToSession( + EVENTPIPE_SESSION session, + COR_PRF_EVENTPIPE_PROVIDER_CONFIG providerConfig); + + COM_METHOD EventPipeStopSession( + EVENTPIPE_SESSION session); + COM_METHOD EventPipeCreateProvider( - const WCHAR *szName, - EVENTPIPE_PROVIDER *pProviderHandle); + const WCHAR *providerName, + EVENTPIPE_PROVIDER *pProvider); + + COM_METHOD EventPipeGetProviderInfo( + EVENTPIPE_PROVIDER provider, + ULONG cchName, + ULONG *pcchName, + WCHAR providerName[]); COM_METHOD EventPipeDefineEvent( - EVENTPIPE_PROVIDER provHandle, - const WCHAR *szName, + EVENTPIPE_PROVIDER provider, + const WCHAR *eventName, UINT32 eventID, UINT64 keywords, UINT32 eventVersion, @@ -659,10 +677,10 @@ class ProfToEEInterfaceImpl : public ICorProfilerInfo12 BOOL needStack, UINT32 cParamDescs, COR_PRF_EVENTPIPE_PARAM_DESC pParamDescs[], - EVENTPIPE_EVENT *pEventHandle); + EVENTPIPE_EVENT *pEvent); COM_METHOD EventPipeWriteEvent( - EVENTPIPE_EVENT eventHandle, + EVENTPIPE_EVENT event, UINT32 cData, COR_PRF_EVENT_DATA data[], LPCGUID pActivityId, @@ -674,6 +692,19 @@ class ProfToEEInterfaceImpl : public ICorProfilerInfo12 // Internal Helper Functions + static void EventPipeCallbackHelper(EventPipeProvider *provider, + DWORD eventId, + DWORD eventVersion, + ULONG cbMetadataBlob, + LPCBYTE metadataBlob, + ULONG cbEventData, + LPCBYTE eventData, + LPCGUID pActivityId, + LPCGUID pRelatedActivityId, + Thread *pEventThread, + ULONG numStackFrames, + UINT_PTR stackFrames[]); + HRESULT GetCodeInfoHelper(FunctionID functionId, ReJITID reJitId, ULONG32 cCodeInfos, diff --git a/src/coreclr/src/vm/proftoeeinterfaceimpl.inl b/src/coreclr/src/vm/proftoeeinterfaceimpl.inl index 38e0ea08aefb..929dd707e7ae 100644 --- a/src/coreclr/src/vm/proftoeeinterfaceimpl.inl +++ b/src/coreclr/src/vm/proftoeeinterfaceimpl.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // FILE: ProfToEEInterfaceImpl.inl // diff --git a/src/coreclr/src/vm/qcall.cpp b/src/coreclr/src/vm/qcall.cpp index 5fcfd0ceb8a9..e46ab2268c6b 100644 --- a/src/coreclr/src/vm/qcall.cpp +++ b/src/coreclr/src/vm/qcall.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // QCALL.CPP // diff --git a/src/coreclr/src/vm/qcall.h b/src/coreclr/src/vm/qcall.h index 32ce22f1bec8..581aefe4cf83 100644 --- a/src/coreclr/src/vm/qcall.h +++ b/src/coreclr/src/vm/qcall.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // QCall.H diff --git a/src/coreclr/src/vm/rcwrefcache.cpp b/src/coreclr/src/vm/rcwrefcache.cpp index 0451e850f525..61c0a90b352c 100644 --- a/src/coreclr/src/vm/rcwrefcache.cpp +++ b/src/coreclr/src/vm/rcwrefcache.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/rcwrefcache.h b/src/coreclr/src/vm/rcwrefcache.h index e59fb9a340a5..9ea9049b5158 100644 --- a/src/coreclr/src/vm/rcwrefcache.h +++ b/src/coreclr/src/vm/rcwrefcache.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/readytoruninfo.cpp b/src/coreclr/src/vm/readytoruninfo.cpp index f4cb41e96351..b5b69edaac27 100644 --- a/src/coreclr/src/vm/readytoruninfo.cpp +++ b/src/coreclr/src/vm/readytoruninfo.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: ReadyToRunInfo.cpp // @@ -504,10 +503,6 @@ static NativeImage *AcquireCompositeImage(Module * pModule, PEImageLayout * pLay if (ownerCompositeExecutableName != NULL) { AssemblyLoadContext *loadContext = pModule->GetFile()->GetAssemblyLoadContext(); - if (loadContext == nullptr) - { - loadContext = (AssemblyLoadContext *)AppDomain::GetCurrentDomain()->CreateBinderContext(); - } return loadContext->LoadNativeImage(pModule, ownerCompositeExecutableName); } diff --git a/src/coreclr/src/vm/readytoruninfo.h b/src/coreclr/src/vm/readytoruninfo.h index d86786042aca..b7ec74769bd9 100644 --- a/src/coreclr/src/vm/readytoruninfo.h +++ b/src/coreclr/src/vm/readytoruninfo.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: ReadyToRunInfo.h // diff --git a/src/coreclr/src/vm/reflectclasswriter.cpp b/src/coreclr/src/vm/reflectclasswriter.cpp index 63ebfc2ca90c..3b8749908e4e 100644 --- a/src/coreclr/src/vm/reflectclasswriter.cpp +++ b/src/coreclr/src/vm/reflectclasswriter.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/reflectclasswriter.h b/src/coreclr/src/vm/reflectclasswriter.h index bf0c0f1e14a6..858feaf9eb61 100644 --- a/src/coreclr/src/vm/reflectclasswriter.h +++ b/src/coreclr/src/vm/reflectclasswriter.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/reflectioninvocation.cpp b/src/coreclr/src/vm/reflectioninvocation.cpp index 2a36bf7b903a..41ce136349be 100644 --- a/src/coreclr/src/vm/reflectioninvocation.cpp +++ b/src/coreclr/src/vm/reflectioninvocation.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/reflectioninvocation.h b/src/coreclr/src/vm/reflectioninvocation.h index f4160204e8a0..25ce31499e35 100644 --- a/src/coreclr/src/vm/reflectioninvocation.h +++ b/src/coreclr/src/vm/reflectioninvocation.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/rejit.cpp b/src/coreclr/src/vm/rejit.cpp index 8e8d635a31b2..d9077a370ff6 100644 --- a/src/coreclr/src/vm/rejit.cpp +++ b/src/coreclr/src/vm/rejit.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ReJit.cpp // diff --git a/src/coreclr/src/vm/rejit.h b/src/coreclr/src/vm/rejit.h index 4dbcb869319d..77e9dd63046e 100644 --- a/src/coreclr/src/vm/rejit.h +++ b/src/coreclr/src/vm/rejit.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // =========================================================================== // File: REJIT.H diff --git a/src/coreclr/src/vm/rejit.inl b/src/coreclr/src/vm/rejit.inl index 2c973067a2a9..b69b63d9f559 100644 --- a/src/coreclr/src/vm/rejit.inl +++ b/src/coreclr/src/vm/rejit.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: REJIT.INL // diff --git a/src/coreclr/src/vm/rexcep.h b/src/coreclr/src/vm/rexcep.h index beffa51cc0a4..03cfa3617f9a 100644 --- a/src/coreclr/src/vm/rexcep.h +++ b/src/coreclr/src/vm/rexcep.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //==================================================================== // diff --git a/src/coreclr/src/vm/rtlfunctions.cpp b/src/coreclr/src/vm/rtlfunctions.cpp index 2f86b1e0966b..23f662b4d600 100644 --- a/src/coreclr/src/vm/rtlfunctions.cpp +++ b/src/coreclr/src/vm/rtlfunctions.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // RtlFunctions.CPP // diff --git a/src/coreclr/src/vm/rtlfunctions.h b/src/coreclr/src/vm/rtlfunctions.h index 9db918718c0f..1b46c3a38f26 100644 --- a/src/coreclr/src/vm/rtlfunctions.h +++ b/src/coreclr/src/vm/rtlfunctions.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/vm/runtimecallablewrapper.cpp b/src/coreclr/src/vm/runtimecallablewrapper.cpp index e93250f10070..05bbc24938bf 100644 --- a/src/coreclr/src/vm/runtimecallablewrapper.cpp +++ b/src/coreclr/src/vm/runtimecallablewrapper.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** @@ -620,129 +619,6 @@ void ComClassFactory::Cleanup() delete this; } -#if defined(FEATURE_APPX) && !defined(CROSSGEN_COMPILE) -//------------------------------------------------------------- -// Create instance using CoCreateIntanceFromApp -// CoCreateInstanceFromApp is a new Windows 8 API that only -// allow creating COM objects (not WinRT objects) in the allow -// list -// Note: We don't QI for IClassFactory2 in this case as it is not -// supported in ModernSDK -IUnknown *AppXComClassFactory::CreateInstanceInternal(IUnknown *pOuter, BOOL *pfDidContainment) -{ - CONTRACT(IUnknown *) - { - THROWS; - GC_TRIGGERS; - MODE_ANY; - PRECONDITION(CheckPointer(pOuter, NULL_OK)); - PRECONDITION(CheckPointer(pfDidContainment, NULL_OK)); - PRECONDITION(AppX::IsAppXProcess()); - POSTCONDITION(CheckPointer(RETVAL)); - } - CONTRACT_END; - - GCX_PREEMP(); - - MULTI_QI multiQI; - ::ZeroMemory(&multiQI, sizeof(MULTI_QI)); - multiQI.pIID = &IID_IUnknown; - - HRESULT hr; - -#ifdef FEATURE_CORESYSTEM - // This works around a bug in the Windows 7 loader that prevents us from loading the - // forwarder for this function - typedef HRESULT (*CoCreateInstanceFromAppFnPtr) (REFCLSID rclsid, IUnknown *punkOuter, DWORD dwClsCtx, - void *reserved, DWORD dwCount, MULTI_QI *pResults); - - static CoCreateInstanceFromAppFnPtr CoCreateInstanceFromApp = NULL; - if (NULL == CoCreateInstanceFromApp) - { - HMODULE hmod = LoadLibraryExW(W("api-ms-win-core-com-l1-1-1.dll"), NULL, 0); - - if (hmod) - CoCreateInstanceFromApp = (CoCreateInstanceFromAppFnPtr)GetProcAddress(hmod, "CoCreateInstanceFromApp"); - } - - if (NULL == CoCreateInstanceFromApp) - { - // This shouldn't happen - _ASSERTE(false); - IfFailThrow(E_FAIL); - } -#endif - - if (m_pwszServer) - { - // - // Remote server activation - // - COSERVERINFO ServerInfo; - ::ZeroMemory(&ServerInfo, sizeof(COSERVERINFO)); - ServerInfo.pwszName = m_pwszServer; - - hr = CoCreateInstanceFromApp( - m_rclsid, - pOuter, - CLSCTX_REMOTE_SERVER, - &ServerInfo, - 1, - &multiQI); - if (FAILED(hr) && pOuter) - { - // - // Aggregation attempt failed. Retry containment - // - hr = CoCreateInstanceFromApp( - m_rclsid, - NULL, - CLSCTX_REMOTE_SERVER, - &ServerInfo, - 1, - &multiQI); - if (pfDidContainment) - *pfDidContainment = TRUE; - } - } - else - { - // - // Normal activation - // - hr = CoCreateInstanceFromApp( - m_rclsid, - pOuter, - CLSCTX_SERVER, - NULL, - 1, - &multiQI); - if (FAILED(hr) && pOuter) - { - // - // Aggregation attempt failed. Retry containment - // - hr = CoCreateInstanceFromApp( - m_rclsid, - NULL, - CLSCTX_SERVER, - NULL, - 1, - &multiQI); - if (pfDidContainment) - *pfDidContainment = TRUE; - } - } - - if (FAILED(hr)) - ThrowHRMsg(hr, IDS_EE_CREATEINSTANCEFROMAPP_FAILED); - if (FAILED(multiQI.hr)) - ThrowHRMsg(multiQI.hr, IDS_EE_CREATEINSTANCEFROMAPP_FAILED); - - RETURN multiQI.pItf; -} -#endif //FEATURE_APPX - //------------------------------------------------------------- // Returns true if the first parameter of the CA's method ctor is a System.Type static BOOL AttributeFirstParamIsSystemType(mdCustomAttribute tkAttribute, IMDInternalImport *pImport) @@ -1071,37 +947,6 @@ void RCWCache::ReleaseWrappersWorker(LPVOID pCtxCookie) pWrap->DecoupleFromObject(); RemoveWrapper(pWrap); } - else if (!pWrap->IsFreeThreaded()) - { - // We have a non-zero pCtxCookie but this RCW was not created in that context. We still - // need to take a closer look at the RCW because its interface pointer cache may contain - // pointers acquired in the given context - and those need to be released here. - if (pWrap->m_pAuxiliaryData != NULL) - { - RCWAuxiliaryData::InterfaceEntryIterator it = pWrap->m_pAuxiliaryData->IterateInterfacePointers(); - while (it.Next()) - { - InterfaceEntry *pEntry = it.GetEntry(); - if (!pEntry->IsFree() && it.GetCtxCookie() == pCtxCookie) - { - RCWInterfacePointer intfPtr; - intfPtr.m_pUnk = pEntry->m_pUnknown; - intfPtr.m_pRCW = pWrap; - intfPtr.m_pCtxEntry = it.GetCtxEntryNoAddRef(); - - if (!pWrap->IsURTAggregated()) - InterfacePointerList.Push(intfPtr); - else - AggregatedInterfacePointerList.Push(intfPtr); - - // Reset the CtxEntry first, so we don't race with RCWAuxiliaryData::CacheInterfacePointer - // which may try to reuse the InterfaceEntry for another (pUnk, MT, CtxEntry) triplet. - it.ResetCtxEntry(); - pEntry->Free(); - } - } - } - } } } @@ -1552,150 +1397,6 @@ VOID RCWCleanupList::ReleaseRCWListRaw(RCW* pRCW) } } -// Destroys RCWAuxiliaryData. Note that we do not release interface pointers stored in the -// auxiliary interface pointer cache here. That needs to be done in the right COM context -// (see code:RCW::ReleaseAuxInterfacesCallBack). -RCWAuxiliaryData::~RCWAuxiliaryData() -{ - CONTRACTL - { - NOTHROW; - GC_TRIGGERS; - MODE_ANY; - } - CONTRACTL_END; - - if (m_prVariantInterfaces != NULL) - { - delete m_prVariantInterfaces; - } - - InterfaceEntryEx *pEntry = m_pInterfaceCache; - while (pEntry) - { - InterfaceEntryEx *pNextEntry = pEntry->m_pNext; - - delete pEntry; - pEntry = pNextEntry; - } - - if (VARIANCE_STUB_TARGET_IS_HANDLE(m_ohObjectVariantCallTarget_IEnumerable)) - { - DestroyHandle(m_ohObjectVariantCallTarget_IEnumerable); - } - if (VARIANCE_STUB_TARGET_IS_HANDLE(m_ohObjectVariantCallTarget_IReadOnlyList)) - { - DestroyHandle(m_ohObjectVariantCallTarget_IReadOnlyList); - } -} - -// Inserts variant interfaces to the cache. -void RCWAuxiliaryData::CacheVariantInterface(MethodTable *pMT) -{ - CONTRACTL - { - THROWS; - GC_TRIGGERS; - MODE_ANY; - } - CONTRACTL_END; - - CrstHolder ch(&m_VarianceCacheCrst); - - if (m_prVariantInterfaces == NULL) - { - m_prVariantInterfaces = new ArrayList(); - } - - if (pMT->HasVariance() && m_prVariantInterfaces->FindElement(0, pMT) == ArrayList::NOT_FOUND) - { - m_prVariantInterfaces->Append(pMT); - } - - // check implemented interfaces as well - MethodTable::InterfaceMapIterator it = pMT->IterateInterfaceMap(); - while (it.Next()) - { - MethodTable *pItfMT = it.GetInterface(); - if (pItfMT->HasVariance() && m_prVariantInterfaces->FindElement(0, pItfMT) == ArrayList::NOT_FOUND) - { - m_prVariantInterfaces->Append(pItfMT); - } - } -} - -// Inserts an interface pointer in the cache. -void RCWAuxiliaryData::CacheInterfacePointer(MethodTable *pMT, IUnknown *pUnk, LPVOID pCtxCookie) -{ - CONTRACTL - { - THROWS; - GC_TRIGGERS; - MODE_ANY; - } - CONTRACTL_END; - - InterfaceEntryEx *pEntry = NULL; - - // first, try to find a free entry to reuse - InterfaceEntryIterator it = IterateInterfacePointers(); - while (it.Next()) - { - InterfaceEntry *pEntry = it.GetEntry(); - if (pEntry->IsFree() && pEntry->Init(pMT, pUnk)) - { - // setting the cookie after "publishing" the entry is fine, at worst - // we may miss the cache if someone looks for this pMT concurrently - _ASSERTE_MSG(it.GetCtxCookie() == NULL, "Race condition detected, we are supposed to own the InterfaceEntry at this point"); - it.SetCtxCookie(pCtxCookie); - return; - } - } - - // create a new entry if a free one was not found - InterfaceEntryEx *pEntryEx = new InterfaceEntryEx(); - ZeroMemory(pEntryEx, sizeof(InterfaceEntryEx)); - - pEntryEx->m_BaseEntry.Init(pMT, pUnk); - - if (pCtxCookie != NULL) - { - pEntryEx->m_pCtxEntry = CtxEntryCache::GetCtxEntryCache()->FindCtxEntry(pCtxCookie, GetThread()); - } - else - { - pEntryEx->m_pCtxEntry = NULL; - } - - // and insert it into the linked list (the interlocked operation ensures that - // the list is walkable by other threads at all times) - InterfaceEntryEx *pNext; - do - { - pNext = VolatileLoad(&m_pInterfaceCache); // our candidate "next" - pEntryEx->m_pNext = pNext; - } - while (FastInterlockCompareExchangePointer(&m_pInterfaceCache, pEntryEx, pNext) != pNext); -} - -// Returns a cached interface pointer or NULL if there was no match. -IUnknown *RCWAuxiliaryData::FindInterfacePointer(MethodTable *pMT, LPVOID pCtxCookie) -{ - LIMITED_METHOD_CONTRACT; - - InterfaceEntryIterator it = IterateInterfacePointers(); - while (it.Next()) - { - InterfaceEntry *pEntry = it.GetEntry(); - if (!pEntry->IsFree() && pEntry->m_pMT == (IE_METHODTABLE_PTR)pMT && it.GetCtxCookie() == pCtxCookie) - { - return pEntry->m_pUnknown; - } - } - - return NULL; -} - const int RCW::s_rGCPressureTable[GCPressureSize_COUNT] = { 0, // GCPressureSize_None @@ -2251,11 +1952,6 @@ void RCW::Cleanup() RemoveMemoryPressure(); } - if (m_pAuxiliaryData != NULL) - { - delete m_pAuxiliaryData; - } - #ifdef _DEBUG m_cbRefCount = 0; m_SyncBlockIndex = 0; @@ -2472,11 +2168,6 @@ IUnknown *RCW::GetWellKnownInterface(REFIID riid) // make sure it is on the right thread IDispatch *RCW::GetIDispatch() { - if (AppX::IsAppXProcess()) - { - COMPlusThrow(kPlatformNotSupportedException, IDS_EE_ERROR_IDISPATCH); - } - WRAPPER_NO_CONTRACT; return (IDispatch *)GetWellKnownInterface(IID_IDispatch); } @@ -2533,7 +2224,7 @@ HRESULT RCW::SafeQueryInterfaceRemoteAware(REFIID iid, IUnknown** ppResUnk) if (hr == CO_E_OBJNOTCONNECTED || hr == RPC_E_INVALID_OBJECT || hr == RPC_E_INVALID_OBJREF || hr == CO_E_OBJNOTREG) { // set apartment state - GetThread()->SetApartment(Thread::AS_InMTA, FALSE); + GetThread()->SetApartment(Thread::AS_InMTA); // Release the stream of the IUnkEntry to force UnmarshalIUnknownForCurrContext // to remarshal to the stream. @@ -2645,17 +2336,6 @@ IUnknown* RCW::GetComIPForMethodTableFromCache(MethodTable* pMT) } } - if (m_pAuxiliaryData != NULL) - { - pUnk = m_pAuxiliaryData->FindInterfacePointer(pMT, (IsFreeThreaded() ? NULL : pCtxCookie)); - if (pUnk != NULL) - { - cbRef = SafeAddRef(pUnk); - LogInteropAddRef(pUnk, cbRef, "RCW::GetComIPForMethodTableFromCache: Addref because returning pUnk fetched from auxiliary interface pointer cache"); - RETURN pUnk; - } - } - // We're going to be making some COM calls, better initialize COM. EnsureComStarted(); @@ -2665,11 +2345,8 @@ IUnknown* RCW::GetComIPForMethodTableFromCache(MethodTable* pMT) if (pUnk == NULL) RETURN NULL; - bool fAllowOutOfContextCache = false; - // try to cache the interface pointer in the inline cache. This cache can only store interface pointers // returned from QI's in the same context where we created the RCW. - bool fInterfaceCached = false; if (GetWrapperCtxCookie() == pCtxCookie || IsFreeThreaded()) { for (i = 0; i < INTERFACE_ENTRY_CACHE_SIZE; i++) @@ -2684,29 +2361,11 @@ IUnknown* RCW::GetComIPForMethodTableFromCache(MethodTable* pMT) LogInteropAddRef(pUnk, cbRef, "RCW::GetComIPForMethodTableFromCache: Addref because storing pUnk in InterfaceEntry cache"); } - fInterfaceCached = true; break; } } } - if (!fInterfaceCached && fAllowOutOfContextCache) - { - // We couldn't insert into the inline cache, either because it didn't fit, or because - // we are in a wrong COM context. We'll use the RCWAuxiliaryData structure. - GetOrCreateAuxiliaryData()->CacheInterfacePointer(pMT, pUnk, (IsFreeThreaded() ? NULL : pCtxCookie)); - - // If the component is not aggregated then we need to ref-count - if (!IsURTAggregated()) - { - // Get an extra addref to hold this reference alive in our cache - cbRef = SafeAddRef(pUnk); - LogInteropAddRef(pUnk, cbRef, "RCW::GetComIPForMethodTableFromCache: Addref because storing pUnk in the auxiliary interface pointer cache"); - } - - fInterfaceCached = true; - } - RETURN pUnk; } @@ -2765,53 +2424,6 @@ HRESULT RCW::EnterContext(PFNCTXCALLBACK pCallbackFunc, LPVOID pData) return pCtxEntry->EnterContext(pCallbackFunc, pData); } -//--------------------------------------------------------------------- -// Callback called to release the interfaces in the auxiliary cache. -HRESULT __stdcall RCW::ReleaseAuxInterfacesCallBack(LPVOID pData) -{ - CONTRACT(HRESULT) - { - NOTHROW; - GC_TRIGGERS; - MODE_PREEMPTIVE; - PRECONDITION(CheckPointer(pData)); - POSTCONDITION(SUCCEEDED(RETVAL)); - } - CONTRACT_END; - - RCW* pWrap = (RCW*)pData; - - LPVOID pCurrentCtxCookie = GetCurrentCtxCookie(); - _ASSERTE(pCurrentCtxCookie != NULL); - - RCW_VTABLEPTR(pWrap); - - // we don't come here for free-threaded RCWs - _ASSERTE(!pWrap->IsFreeThreaded()); - - // we don't come here if there are no interfaces in the aux cache - _ASSERTE(pWrap->m_pAuxiliaryData != NULL); - - RCWAuxiliaryData::InterfaceEntryIterator it = pWrap->m_pAuxiliaryData->IterateInterfacePointers(); - while (it.Next()) - { - InterfaceEntry *pEntry = it.GetEntry(); - if (!pEntry->IsFree()) - { - if (pCurrentCtxCookie == it.GetCtxCookie()) - { - IUnknown *pUnk = it.GetEntry()->m_pUnknown; - - // make sure we never try to clean this up again - pEntry->Free(); - SafeReleasePreemp(pUnk, pWrap); - } - } - } - - RETURN S_OK; -} - //--------------------------------------------------------------------- // Callback called to release the IUnkEntry and the Interface entries. HRESULT __stdcall RCW::ReleaseAllInterfacesCallBack(LPVOID pData) @@ -2851,47 +2463,6 @@ HRESULT __stdcall RCW::ReleaseAllInterfacesCallBack(LPVOID pData) } } - // Free auxiliary interface entries if this is not an extensible RCW - if (!pWrap->IsURTAggregated() && pWrap->m_pAuxiliaryData != NULL) - { - RCWAuxiliaryData::InterfaceEntryIterator it = pWrap->m_pAuxiliaryData->IterateInterfacePointers(); - while (it.Next()) - { - InterfaceEntry *pEntry = it.GetEntry(); - if (!pEntry->IsFree()) - { - IUnknown *pUnk = it.GetEntry()->m_pUnknown; - - if (pCurrentCtxCookie == NULL || pCurrentCtxCookie == it.GetCtxCookie() || pWrap->IsFreeThreaded()) - { - // make sure we never try to clean this up again - pEntry->Free(); - SafeReleasePreemp(pUnk, pWrap); - } - else - { - // Retrieve the addref'ed context entry that the wrapper lives in. - CtxEntryHolder pCtxEntry = it.GetCtxEntry(); - - // Transition into the context to release the interfaces. - HRESULT hr = pCtxEntry->EnterContext(ReleaseAuxInterfacesCallBack, pWrap); - if (FAILED(hr)) - { - // The context is disconnected so we cannot transition into it to clean up. - // The only option we have left is to try and release the interfaces from - // the current context. This will work for context agile object's since we have - // a pointer to them directly. It will however fail for others since we only - // have a pointer to a proxy which is no longer attached to the object. - - // make sure we never try to clean this up again - pEntry->Free(); - SafeReleasePreemp(pUnk, pWrap); - } - } - } - } - } - RETURN S_OK; } @@ -2930,29 +2501,6 @@ void RCW::ReleaseAllInterfaces() } } -//--------------------------------------------------------------------- -// Returns RCWAuxiliaryData associated with this RCW. -PTR_RCWAuxiliaryData RCW::GetOrCreateAuxiliaryData() -{ - CONTRACTL - { - THROWS; - GC_TRIGGERS; - MODE_ANY; - } - CONTRACTL_END; - - if (m_pAuxiliaryData == NULL) - { - NewHolder pData = new RCWAuxiliaryData(); - if (InterlockedCompareExchangeT(&m_pAuxiliaryData, pData.GetValue(), NULL) == NULL) - { - pData.SuppressRelease(); - } - } - return m_pAuxiliaryData; -} - //--------------------------------------------------------------------- // Returns true if the RCW supports given "standard managed" interface. bool RCW::SupportsMngStdInterface(MethodTable *pItfMT) diff --git a/src/coreclr/src/vm/runtimecallablewrapper.h b/src/coreclr/src/vm/runtimecallablewrapper.h index 261c0f14ab2e..fe3149ddae79 100644 --- a/src/coreclr/src/vm/runtimecallablewrapper.h +++ b/src/coreclr/src/vm/runtimecallablewrapper.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** @@ -79,182 +78,6 @@ class Thread; enum {INTERFACE_ENTRY_CACHE_SIZE = 8}; -struct RCWAuxiliaryData; -typedef DPTR(RCWAuxiliaryData) PTR_RCWAuxiliaryData; - -#define VARIANCE_STUB_TARGET_USE_STRING ((OBJECTHANDLE)(INT_PTR)0x1) -#define VARIANCE_STUB_TARGET_USE_T ((OBJECTHANDLE)(INT_PTR)0x2) -#define VARIANCE_STUB_TARGET_IS_HANDLE(handle) (((INT_PTR)(handle) & ~0x3) != 0) - -// Additional RCW data used for generic interop and auxiliary interface pointer cache. -// This structure is lazily allocated and associated with the RCW via the m_pAuxiliaryData -// field. It's needed only if the RCW supports IEnumerable or another interface with -// variance, or if a QI result could not be saved in the inline interface pointer cache -// (code:RCW.m_aInterfaceEntries). -struct RCWAuxiliaryData -{ - RCWAuxiliaryData() - { - WRAPPER_NO_CONTRACT; - - m_pGetEnumeratorMethod = NULL; - m_prVariantInterfaces = NULL; - m_VarianceCacheCrst.Init(CrstLeafLock); - m_pInterfaceCache = NULL; - m_ohObjectVariantCallTarget_IEnumerable = NULL; - m_ohObjectVariantCallTarget_IReadOnlyList = NULL; - m_AuxFlags.m_dwFlags = 0; - } - - ~RCWAuxiliaryData(); - - struct InterfaceEntryEx; - typedef DPTR(InterfaceEntryEx) PTR_InterfaceEntryEx; - - // Augments code:InterfaceEntry with a next pointer and context entry field. - struct InterfaceEntryEx - { - PTR_InterfaceEntryEx m_pNext; - - InterfaceEntry m_BaseEntry; - PTR_CtxEntry m_pCtxEntry; - - ~InterfaceEntryEx() - { - WRAPPER_NO_CONTRACT; - if (m_pCtxEntry != NULL) - { - m_pCtxEntry->Release(); - } - } - }; - - // Iterator for cached interface entries. - class InterfaceEntryIterator - { - PTR_InterfaceEntryEx m_pCurrent; - bool m_fFirst; - - public: - inline InterfaceEntryIterator(PTR_RCWAuxiliaryData pAuxiliaryData) - { - LIMITED_METHOD_CONTRACT; - m_pCurrent = (pAuxiliaryData == NULL ? NULL : pAuxiliaryData->m_pInterfaceCache); - m_fFirst = true; - } - - // Move to the next item returning TRUE if an item exists or FALSE if we've run off the end - inline bool Next() - { - LIMITED_METHOD_CONTRACT; - if (m_fFirst) - { - m_fFirst = false; - } - else - { - m_pCurrent = m_pCurrent->m_pNext; - } - return (m_pCurrent != NULL); - } - - inline InterfaceEntry *GetEntry() - { - LIMITED_METHOD_CONTRACT; - return &m_pCurrent->m_BaseEntry; - } - - inline LPVOID GetCtxCookie() - { - LIMITED_METHOD_CONTRACT; - return (m_pCurrent->m_pCtxEntry == NULL ? NULL : m_pCurrent->m_pCtxEntry->GetCtxCookie()); - } - - inline CtxEntry *GetCtxEntry() - { - LIMITED_METHOD_CONTRACT; - - m_pCurrent->m_pCtxEntry->AddRef(); - return m_pCurrent->m_pCtxEntry; - } - - inline CtxEntry *GetCtxEntryNoAddRef() - { - LIMITED_METHOD_CONTRACT; - return m_pCurrent->m_pCtxEntry; - } - - inline void ResetCtxEntry() - { - LIMITED_METHOD_CONTRACT; - m_pCurrent->m_pCtxEntry = NULL; - } - -#ifndef DACCESS_COMPILE - inline void SetCtxCookie(LPVOID pCtxCookie) - { - CONTRACTL - { - THROWS; - GC_TRIGGERS; - MODE_ANY; - } - CONTRACTL_END; - - CtxEntry *pCtxEntry = NULL; - if (pCtxCookie != NULL) - { - pCtxEntry = CtxEntryCache::GetCtxEntryCache()->FindCtxEntry(pCtxCookie, GetThread()); - } - m_pCurrent->m_pCtxEntry = pCtxEntry; - } -#endif // !DACCESS_COMPILE - }; - - void CacheVariantInterface(MethodTable *pMT); - - void CacheInterfacePointer(MethodTable *pMT, IUnknown *pUnk, LPVOID pCtxCookie); - IUnknown *FindInterfacePointer(MethodTable *pMT, LPVOID pCtxCookie); - - inline InterfaceEntryIterator IterateInterfacePointers() - { - LIMITED_METHOD_CONTRACT; - return InterfaceEntryIterator(dac_cast(this)); - } - - // GetEnumerator method of the first IEnumerable interface we successfully QI'ed for - PTR_MethodDesc m_pGetEnumeratorMethod; - - // Interfaces with variance that we successfully QI'ed for - ArrayList *m_prVariantInterfaces; - - // Lock to protect concurrent access to m_prVariantInterfaces - CrstExplicitInit m_VarianceCacheCrst; - - // Linked list of cached interface pointers - PTR_InterfaceEntryEx m_pInterfaceCache; - - // Cached object handles wrapping delegate objects that point to the right GetEnumerator/Indexer_Get - // stubs that should be used when calling these methods via IEnumerable/IReadOnlyList. - // Can also contain the special VARIANCE_STUB_TARGET_USE_STRING and VARIANCE_STUB_TARGET_USE_T values. - OBJECTHANDLE m_ohObjectVariantCallTarget_IEnumerable; // GetEnumerator - OBJECTHANDLE m_ohObjectVariantCallTarget_IReadOnlyList; // Indexer_Get - - // Rarely used RCW flags (keep the commonly used ones in code:RCW::RCWFlags) - union RCWAuxFlags - { - DWORD m_dwFlags; - - struct - { - // InterfaceVarianceBehavior for rarely used instantiations that could be supported via string: - DWORD m_InterfaceVarianceBehavior_OfIEnumerable:4; - DWORD m_InterfaceVarianceBehavior_OfIEnumerableOfChar:4; - }; - } - m_AuxFlags; -}; - typedef DPTR(RCW) PTR_RCW; //---------------------------------------------------------------------------- @@ -285,11 +108,9 @@ struct RCW { PTR_RCW m_pRCW; int m_InlineCacheIndex; - RCWAuxiliaryData::InterfaceEntryIterator m_AuxIterator; public: inline CachedInterfaceEntryIterator(PTR_RCW pRCW) - : m_AuxIterator(pRCW->m_pAuxiliaryData) { LIMITED_METHOD_CONTRACT; m_pRCW = pRCW; @@ -301,15 +122,14 @@ struct RCW { LIMITED_METHOD_CONTRACT; - if (m_InlineCacheIndex < INTERFACE_ENTRY_CACHE_SIZE) - { - // stop incrementing m_InlineCacheIndex once we reach INTERFACE_ENTRY_CACHE_SIZE - if (++m_InlineCacheIndex < INTERFACE_ENTRY_CACHE_SIZE) - { - return TRUE; - } - } - return m_AuxIterator.Next(); + if (m_InlineCacheIndex >= INTERFACE_ENTRY_CACHE_SIZE) + return FALSE; + + // stop incrementing m_InlineCacheIndex once we reach INTERFACE_ENTRY_CACHE_SIZE + if (++m_InlineCacheIndex < INTERFACE_ENTRY_CACHE_SIZE) + return TRUE; + + return FALSE; } inline InterfaceEntry *GetEntry() @@ -317,11 +137,10 @@ struct RCW LIMITED_METHOD_CONTRACT; _ASSERTE_MSG(m_InlineCacheIndex >= 0, "Iterator starts before the first element, you need to call Next"); - if (m_InlineCacheIndex < INTERFACE_ENTRY_CACHE_SIZE) - { - return &m_pRCW->m_aInterfaceEntries[m_InlineCacheIndex]; - } - return m_AuxIterator.GetEntry(); + if (m_InlineCacheIndex >= INTERFACE_ENTRY_CACHE_SIZE) + return NULL; + + return &m_pRCW->m_aInterfaceEntries[m_InlineCacheIndex]; } inline LPVOID GetCtxCookie() @@ -329,11 +148,10 @@ struct RCW LIMITED_METHOD_CONTRACT; _ASSERTE_MSG(m_InlineCacheIndex >= 0, "Iterator starts before the first element, you need to call Next"); - if (m_InlineCacheIndex < INTERFACE_ENTRY_CACHE_SIZE) - { - return m_pRCW->GetWrapperCtxCookie(); - } - return m_AuxIterator.GetCtxCookie(); + if (m_InlineCacheIndex >= INTERFACE_ENTRY_CACHE_SIZE) + return NULL; + + return m_pRCW->GetWrapperCtxCookie(); } }; @@ -390,11 +208,7 @@ struct RCW GCPressureSize_ProcessLocal = 1, GCPressureSize_MachineLocal = 2, GCPressureSize_Remote = 3, - GCPressureSize_WinRT_Base = 4, - GCPressureSize_WinRT_Low = 5, - GCPressureSize_WinRT_Medium = 6, - GCPressureSize_WinRT_High = 7, - GCPressureSize_COUNT = 8 + GCPressureSize_COUNT = 4 }; //--------------------------------------------------- @@ -654,11 +468,6 @@ struct RCW return CachedInterfaceEntryIterator(dac_cast(this)); } - //--------------------------------------------------------------------- - // Returns RCWAuxiliaryData associated with this RCW. Allocates the - // structure if it does not exist already. - PTR_RCWAuxiliaryData GetOrCreateAuxiliaryData(); - //--------------------------------------------------------------------- // Returns true iff pItfMT is a "standard managed" interface, such as // IEnumerator, and the RCW supports the interface through classic COM @@ -722,10 +531,6 @@ struct RCW } private: - //--------------------------------------------------------------------- - // Callback called to release the interfaces in the auxiliary cache. - static HRESULT __stdcall ReleaseAuxInterfacesCallBack(LPVOID pData); - //--------------------------------------------------------------------- // Callback called to release the IUnkEntry and the InterfaceEntries, static HRESULT __stdcall ReleaseAllInterfacesCallBack(LPVOID pData); @@ -793,9 +598,6 @@ struct RCW // Tracks concurrent access to this RCW to prevent using RCW instances that have already been released LONG m_cbUseCount; - // additional RCW data used for generic interop and advanced interface pointer caching (NULL unless needed) - PTR_RCWAuxiliaryData m_pAuxiliaryData; - PTR_RCW m_pNextRCW; // This field is useful for debugging purposes, please do not remove. The typical scenario is a crash in @@ -992,28 +794,6 @@ public:; BOOL m_bManagedVersion; }; -//-------------------------------------------------------------- -// Special ComClassFactory for AppX scenarios only -// Call CoCreateInstanceFromApp to ensure compatibility -class AppXComClassFactory : public ComClassFactory -{ -protected : - friend ComClassFactoryCreator; - - AppXComClassFactory(REFCLSID rclsid) - :ComClassFactory(rclsid) - { - LIMITED_METHOD_CONTRACT; - } - -protected : -#ifndef CROSSGEN_COMPILE - //------------------------------------------------------------- - // Create instance using CoCreateInstanceFromApp - virtual IUnknown *CreateInstanceInternal(IUnknown *pOuter, BOOL *pfDidContainment); -#endif -}; - //-------------------------------------------------------------- // Creates the right ComClassFactory for you class ComClassFactoryCreator @@ -1029,12 +809,7 @@ public : } CONTRACT_END; -#ifdef FEATURE_APPX - if (AppX::IsAppXProcess()) - RETURN new AppXComClassFactory(rclsid); - else -#endif - RETURN new ComClassFactory(rclsid); + RETURN new ComClassFactory(rclsid); } }; #endif // FEATURE_COMINTEROP_UNMANAGED_ACTIVATION @@ -1594,9 +1369,8 @@ class RCWCleanupList public: RCWCleanupList() - : m_lock(CrstRCWCleanupList, CRST_UNSAFE_ANYMODE), - m_pCurCleanupThread(NULL), m_doCleanupInContexts(FALSE), - m_pFirstBucket(NULL) + : m_pFirstBucket(NULL), m_lock(CrstRCWCleanupList, CRST_UNSAFE_ANYMODE), + m_pCurCleanupThread(NULL), m_doCleanupInContexts(FALSE) { WRAPPER_NO_CONTRACT; } diff --git a/src/coreclr/src/vm/runtimeexceptionkind.h b/src/coreclr/src/vm/runtimeexceptionkind.h index d68af4151ba2..92efc9f4ee1b 100644 --- a/src/coreclr/src/vm/runtimeexceptionkind.h +++ b/src/coreclr/src/vm/runtimeexceptionkind.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // RuntimeExceptionKind.h // diff --git a/src/coreclr/src/vm/runtimehandles.cpp b/src/coreclr/src/vm/runtimehandles.cpp index b9b81ad080cb..b34ee5c6023a 100644 --- a/src/coreclr/src/vm/runtimehandles.cpp +++ b/src/coreclr/src/vm/runtimehandles.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" diff --git a/src/coreclr/src/vm/runtimehandles.h b/src/coreclr/src/vm/runtimehandles.h index e479c2b757e6..4063fd972237 100644 --- a/src/coreclr/src/vm/runtimehandles.h +++ b/src/coreclr/src/vm/runtimehandles.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/vm/safehandle.cpp b/src/coreclr/src/vm/safehandle.cpp index 8b233866c20b..44c1f40766e5 100644 --- a/src/coreclr/src/vm/safehandle.cpp +++ b/src/coreclr/src/vm/safehandle.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/vm/sampleprofiler.cpp b/src/coreclr/src/vm/sampleprofiler.cpp index d93b47114fb1..687966390443 100644 --- a/src/coreclr/src/vm/sampleprofiler.cpp +++ b/src/coreclr/src/vm/sampleprofiler.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "eventpipebuffermanager.h" @@ -16,7 +15,7 @@ const unsigned long NUM_NANOSECONDS_IN_1_MS = 1000000; -Volatile SampleProfiler::s_profilingEnabled = false; +Volatile SampleProfiler::s_profilingEnabled = FALSE; Thread *SampleProfiler::s_pSamplingThread = NULL; const WCHAR *SampleProfiler::s_providerName = W("Microsoft-DotNETCore-SampleProfiler"); EventPipeProvider *SampleProfiler::s_pEventPipeProvider = NULL; @@ -25,8 +24,9 @@ SampleProfiler::SampleProfilerPayload SampleProfiler::s_ExternalPayload = {Sampl SampleProfiler::SampleProfilerPayload SampleProfiler::s_ManagedPayload = {SampleProfilerSampleType::Managed}; CLREventStatic SampleProfiler::s_threadShutdownEvent; unsigned long SampleProfiler::s_samplingRateInNs = NUM_NANOSECONDS_IN_1_MS; // 1ms -bool SampleProfiler::s_timePeriodIsSet = FALSE; -int32_t SampleProfiler::s_RefCount = 0; +bool SampleProfiler::s_timePeriodIsSet = false; +Volatile SampleProfiler::s_canStartSampling = FALSE; +int32_t SampleProfiler::s_refCount = 0; #ifndef TARGET_UNIX PVOID SampleProfiler::s_timeBeginPeriodFn = NULL; @@ -68,45 +68,23 @@ void SampleProfiler::Enable() MODE_ANY; PRECONDITION(s_pEventPipeProvider != nullptr); PRECONDITION(s_pThreadTimeEvent != nullptr); - PRECONDITION((s_pSamplingThread == NULL && s_RefCount == 0) || ((s_pSamplingThread != NULL && s_RefCount > 0))); // Synchronization of multiple callers occurs in EventPipe::Enable. PRECONDITION(EventPipe::IsLockOwnedByCurrentThread()); } CONTRACTL_END; - const bool fSuccess = LoadDependencies(); - -#ifndef TARGET_UNIX - _ASSERTE(fSuccess); - // TODO: Stress log on failure? -#else - _ASSERTE(!fSuccess); -#endif - // Check to see if the sample profiler event is enabled. If it is not, do not spin up the sampling thread. if (!s_pThreadTimeEvent->IsEnabled()) + { return; + } - if (!s_profilingEnabled) + if (s_canStartSampling) { - s_profilingEnabled = true; - s_pSamplingThread = SetupUnstartedThread(); - if (s_pSamplingThread->CreateNewThread(0, ThreadProc, NULL)) - { - // Start the sampling thread. - s_pSamplingThread->SetBackground(TRUE); - s_pSamplingThread->StartThread(); - } - else - { - _ASSERT(!"Unable to create sample profiler thread."); - } - - s_threadShutdownEvent.CreateManualEvent(FALSE); - - SetTimeGranularity(); + EnableInternal(); } - ++s_RefCount; + + ++s_refCount; } void SampleProfiler::Disable() @@ -118,7 +96,7 @@ void SampleProfiler::Disable() MODE_ANY; // Synchronization of multiple callers occurs in EventPipe::Disable. PRECONDITION(EventPipe::IsLockOwnedByCurrentThread()); - PRECONDITION(s_RefCount >= 0); + PRECONDITION(s_refCount >= 0); } CONTRACTL_END; @@ -126,7 +104,7 @@ void SampleProfiler::Disable() if (!s_profilingEnabled) return; - if (s_RefCount == 1) + if (s_refCount == 1) { _ASSERTE(!g_fProcessDetach); @@ -142,7 +120,25 @@ void SampleProfiler::Disable() ResetTimeGranularity(); UnloadDependencies(); } - --s_RefCount; + --s_refCount; +} + +void SampleProfiler::CanStartSampling() +{ + CONTRACTL + { + THROWS; + GC_TRIGGERS; + MODE_ANY; + PRECONDITION(EventPipe::IsLockOwnedByCurrentThread()); + } + CONTRACTL_END; + + s_canStartSampling = TRUE; + if (s_refCount > 0) + { + EnableInternal(); + } } void SampleProfiler::SetSamplingRate(unsigned long nanoseconds) @@ -334,7 +330,7 @@ bool SampleProfiler::LoadDependencies() CONTRACTL_END; #ifndef TARGET_UNIX - if (s_RefCount > 0) + if (s_refCount > 0) return true; // Already loaded. s_hMultimediaLib = WszLoadLibrary(W("winmm.dll")); @@ -372,4 +368,49 @@ void SampleProfiler::UnloadDependencies() #endif //TARGET_UNIX } +void SampleProfiler::EnableInternal() +{ + CONTRACTL + { + THROWS; + GC_TRIGGERS; + MODE_ANY; + PRECONDITION(s_pEventPipeProvider != nullptr); + PRECONDITION(s_pThreadTimeEvent != nullptr); + PRECONDITION((s_pSamplingThread == NULL && s_refCount == 0) || ((s_pSamplingThread != NULL && s_refCount > 0))); + // Synchronization of multiple callers occurs in EventPipe::Enable. + PRECONDITION(EventPipe::IsLockOwnedByCurrentThread()); + } + CONTRACTL_END; + + const bool fSuccess = LoadDependencies(); + +#ifndef TARGET_UNIX + _ASSERTE(fSuccess); + // TODO: Stress log on failure? +#else + _ASSERTE(!fSuccess); +#endif + + if (!s_profilingEnabled) + { + s_profilingEnabled = true; + s_pSamplingThread = SetupUnstartedThread(); + if (s_pSamplingThread->CreateNewThread(0, ThreadProc, NULL)) + { + // Start the sampling thread. + s_pSamplingThread->SetBackground(TRUE); + s_pSamplingThread->StartThread(); + } + else + { + _ASSERT(!"Unable to create sample profiler thread."); + } + + s_threadShutdownEvent.CreateManualEvent(FALSE); + + SetTimeGranularity(); + } +} + #endif // FEATURE_PERFTRACING diff --git a/src/coreclr/src/vm/sampleprofiler.h b/src/coreclr/src/vm/sampleprofiler.h index 5524193ed1ba..7705623434cb 100644 --- a/src/coreclr/src/vm/sampleprofiler.h +++ b/src/coreclr/src/vm/sampleprofiler.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __SAMPLEPROFILER_H__ #define __SAMPLEPROFILER_H__ @@ -32,6 +31,9 @@ class SampleProfiler // Disable profiling. static void Disable(); + // Let the sampler know it's safe to start sampling + static void CanStartSampling(); + // Set the sampling rate. static void SetSamplingRate(unsigned long nanoseconds); @@ -70,6 +72,8 @@ class SampleProfiler static bool LoadDependencies(); static void UnloadDependencies(); + static void EnableInternal(); + #ifndef TARGET_UNIX static HINSTANCE s_hMultimediaLib; static PVOID s_timeBeginPeriodFn; @@ -106,7 +110,9 @@ class SampleProfiler // Whether or not timeBeginPeriod has been used to set the scheduler period static bool s_timePeriodIsSet; - static int32_t s_RefCount; + static Volatile s_canStartSampling; + + static int32_t s_refCount; }; #endif // FEATURE_PERFTRACING diff --git a/src/coreclr/src/vm/sigformat.cpp b/src/coreclr/src/vm/sigformat.cpp index cc00039631a7..acb95b9ce245 100644 --- a/src/coreclr/src/vm/sigformat.cpp +++ b/src/coreclr/src/vm/sigformat.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/vm/sigformat.h b/src/coreclr/src/vm/sigformat.h index 1bcd6c331095..65a50db0a844 100644 --- a/src/coreclr/src/vm/sigformat.h +++ b/src/coreclr/src/vm/sigformat.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/vm/siginfo.cpp b/src/coreclr/src/vm/siginfo.cpp index 1d3de2ba2107..1148d53196f5 100644 --- a/src/coreclr/src/vm/siginfo.cpp +++ b/src/coreclr/src/vm/siginfo.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // siginfo.cpp // diff --git a/src/coreclr/src/vm/siginfo.hpp b/src/coreclr/src/vm/siginfo.hpp index cdef8c2feb7e..91e51fc68c5e 100644 --- a/src/coreclr/src/vm/siginfo.hpp +++ b/src/coreclr/src/vm/siginfo.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // siginfo.hpp // diff --git a/src/coreclr/src/vm/simplerwlock.cpp b/src/coreclr/src/vm/simplerwlock.cpp index 7b7b98ee7a6f..b434e7b416d1 100644 --- a/src/coreclr/src/vm/simplerwlock.cpp +++ b/src/coreclr/src/vm/simplerwlock.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/simplerwlock.hpp b/src/coreclr/src/vm/simplerwlock.hpp index 302822d80245..437de48bcde4 100644 --- a/src/coreclr/src/vm/simplerwlock.hpp +++ b/src/coreclr/src/vm/simplerwlock.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/sourceline.cpp b/src/coreclr/src/vm/sourceline.cpp index 0eeba928eee6..d9adddf230c2 100644 --- a/src/coreclr/src/vm/sourceline.cpp +++ b/src/coreclr/src/vm/sourceline.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/vm/sourceline.h b/src/coreclr/src/vm/sourceline.h index 9fa4bd998fce..2ab99344b9f3 100644 --- a/src/coreclr/src/vm/sourceline.h +++ b/src/coreclr/src/vm/sourceline.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/vm/specialstatics.h b/src/coreclr/src/vm/specialstatics.h index cdefac2bbc21..6ad0fdc63c9a 100644 --- a/src/coreclr/src/vm/specialstatics.h +++ b/src/coreclr/src/vm/specialstatics.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*=========================================================================== ** diff --git a/src/coreclr/src/vm/spinlock.cpp b/src/coreclr/src/vm/spinlock.cpp index 7bae099c4c00..2d7542b53db3 100644 --- a/src/coreclr/src/vm/spinlock.cpp +++ b/src/coreclr/src/vm/spinlock.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // spinlock.cpp // diff --git a/src/coreclr/src/vm/spinlock.h b/src/coreclr/src/vm/spinlock.h index aad85618b144..adef3d4a59bc 100644 --- a/src/coreclr/src/vm/spinlock.h +++ b/src/coreclr/src/vm/spinlock.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //---------------------------------------------------------------------------- // spinlock.h , defines the spin lock class and a profiler class // @@ -62,7 +61,6 @@ // non-zero return value if this function causes the OS to switch to another thread BOOL __SwitchToThread (DWORD dwSleepMSec, DWORD dwSwitchCount); -BOOL __DangerousSwitchToThread (DWORD dwSleepMSec, DWORD dwSwitchCount, BOOL goThroughOS); //---------------------------------------------------------------------------- diff --git a/src/coreclr/src/vm/stackcontents.h b/src/coreclr/src/vm/stackcontents.h index 10e2ea0d300c..fb11aa0bda8c 100644 --- a/src/coreclr/src/vm/stackcontents.h +++ b/src/coreclr/src/vm/stackcontents.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __STACKCONTENTS_H__ #define __STACKCONTENTS_H__ diff --git a/src/coreclr/src/vm/stackingallocator.cpp b/src/coreclr/src/vm/stackingallocator.cpp index 7b332e0460b7..911132afc86d 100644 --- a/src/coreclr/src/vm/stackingallocator.cpp +++ b/src/coreclr/src/vm/stackingallocator.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // StackingAllocator.cpp - // diff --git a/src/coreclr/src/vm/stackingallocator.h b/src/coreclr/src/vm/stackingallocator.h index 5c69187acf76..a33b50db32a2 100644 --- a/src/coreclr/src/vm/stackingallocator.h +++ b/src/coreclr/src/vm/stackingallocator.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // StackingAllocator.h - // diff --git a/src/coreclr/src/vm/stacksampler.cpp b/src/coreclr/src/vm/stacksampler.cpp index b4cec17b8071..39c1a39a7360 100644 --- a/src/coreclr/src/vm/stacksampler.cpp +++ b/src/coreclr/src/vm/stacksampler.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // Summary: @@ -106,10 +105,10 @@ DWORD __stdcall StackSampler::SamplingThreadProc(void* arg) // Constructor StackSampler::StackSampler() - : m_nSampleAfter(0) + : m_crstJitInfo(CrstStackSampler, (CrstFlags)(CRST_UNSAFE_ANYMODE)) , m_nSampleEvery(s_knDefaultSamplingIntervalMsec) + , m_nSampleAfter(0) , m_nNumMethods(s_knDefaultNumMethods) - , m_crstJitInfo(CrstStackSampler, (CrstFlags) (CRST_UNSAFE_ANYMODE)) { // When to start sampling after the thread launch. int nSampleAfter = CLRConfig::GetConfigValue(CLRConfig::UNSUPPORTED_StackSamplingAfter); diff --git a/src/coreclr/src/vm/stacksampler.h b/src/coreclr/src/vm/stacksampler.h index e6138a88cb31..d489d1366ad9 100644 --- a/src/coreclr/src/vm/stacksampler.h +++ b/src/coreclr/src/vm/stacksampler.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ @@ -62,7 +61,7 @@ class StackSampler { unsigned uCount; bool fJitted; - CountInfo() : fJitted(false), uCount(0) {} + CountInfo() : uCount(0), fJitted(false) {} }; // Fields diff --git a/src/coreclr/src/vm/stackwalk.cpp b/src/coreclr/src/vm/stackwalk.cpp index 9310b863322d..dcd2cb97e034 100644 --- a/src/coreclr/src/vm/stackwalk.cpp +++ b/src/coreclr/src/vm/stackwalk.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // STACKWALK.CPP diff --git a/src/coreclr/src/vm/stackwalk.h b/src/coreclr/src/vm/stackwalk.h index fcfd0edee3e3..52ece5796b0d 100644 --- a/src/coreclr/src/vm/stackwalk.h +++ b/src/coreclr/src/vm/stackwalk.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* This is a poor man's implementation of virtual methods. */ diff --git a/src/coreclr/src/vm/stackwalktypes.h b/src/coreclr/src/vm/stackwalktypes.h index f013d3de8163..640d5f37469a 100644 --- a/src/coreclr/src/vm/stackwalktypes.h +++ b/src/coreclr/src/vm/stackwalktypes.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ============================================================================ // File: stackwalktypes.h // diff --git a/src/coreclr/src/vm/staticallocationhelpers.inl b/src/coreclr/src/vm/staticallocationhelpers.inl index 2519015d003e..eba82d7ad24a 100644 --- a/src/coreclr/src/vm/staticallocationhelpers.inl +++ b/src/coreclr/src/vm/staticallocationhelpers.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // StaticAllocationHelpers.inl - // diff --git a/src/coreclr/src/vm/stdinterfaces.cpp b/src/coreclr/src/vm/stdinterfaces.cpp index bdeefba90f1c..d01a98efd80c 100644 --- a/src/coreclr/src/vm/stdinterfaces.cpp +++ b/src/coreclr/src/vm/stdinterfaces.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //--------------------------------------------------------------------------------- // stdinterfaces.cpp // diff --git a/src/coreclr/src/vm/stdinterfaces.h b/src/coreclr/src/vm/stdinterfaces.h index 10922359d9ab..db04fd93b08a 100644 --- a/src/coreclr/src/vm/stdinterfaces.h +++ b/src/coreclr/src/vm/stdinterfaces.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //--------------------------------------------------------------------------------- // stdinterfaces.h // diff --git a/src/coreclr/src/vm/stdinterfaces_internal.h b/src/coreclr/src/vm/stdinterfaces_internal.h index ac261faa207f..acabf15be1d8 100644 --- a/src/coreclr/src/vm/stdinterfaces_internal.h +++ b/src/coreclr/src/vm/stdinterfaces_internal.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _H_INTERNAL_STDINTERFACES diff --git a/src/coreclr/src/vm/stdinterfaces_wrapper.cpp b/src/coreclr/src/vm/stdinterfaces_wrapper.cpp index f7a5584b3dc6..91fc46651952 100644 --- a/src/coreclr/src/vm/stdinterfaces_wrapper.cpp +++ b/src/coreclr/src/vm/stdinterfaces_wrapper.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //--------------------------------------------------------------------------------- // stdinterfaces_wrapper.cpp // diff --git a/src/coreclr/src/vm/stringliteralmap.cpp b/src/coreclr/src/vm/stringliteralmap.cpp index 867a2eb09037..a5e75c7d8a93 100644 --- a/src/coreclr/src/vm/stringliteralmap.cpp +++ b/src/coreclr/src/vm/stringliteralmap.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ diff --git a/src/coreclr/src/vm/stringliteralmap.h b/src/coreclr/src/vm/stringliteralmap.h index a102abd0592f..3f912d175941 100644 --- a/src/coreclr/src/vm/stringliteralmap.h +++ b/src/coreclr/src/vm/stringliteralmap.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ diff --git a/src/coreclr/src/vm/stubcache.cpp b/src/coreclr/src/vm/stubcache.cpp index 2766537f05a8..e70c9ac3f991 100644 --- a/src/coreclr/src/vm/stubcache.cpp +++ b/src/coreclr/src/vm/stubcache.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: stubcache.cpp // diff --git a/src/coreclr/src/vm/stubcache.h b/src/coreclr/src/vm/stubcache.h index f2a988fedc83..5954851173d1 100644 --- a/src/coreclr/src/vm/stubcache.h +++ b/src/coreclr/src/vm/stubcache.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: stubcache.h // diff --git a/src/coreclr/src/vm/stubgen.cpp b/src/coreclr/src/vm/stubgen.cpp index 5b76beeecd0a..1be173a1888c 100644 --- a/src/coreclr/src/vm/stubgen.cpp +++ b/src/coreclr/src/vm/stubgen.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: StubGen.cpp // @@ -960,11 +959,11 @@ BYTE* ILStubLinker::GenerateCodeWorker(BYTE* pbBuffer, ILInstruction* pInstrBuff case 8: { UINT64 uVal = pInstrBuffer[i].uArg; -#ifndef HOST_64BIT // We don't have room on 32-bit platforms to store the CLR_NAN_64 value, so +#ifndef TARGET_64BIT // We don't have room on 32-bit platforms to store the CLR_NAN_64 value, so // we use a special value to represent CLR_NAN_64 and then recreate it here. if ((instr == ILCodeStream::CEE_LDC_R8) && (((UINT32)uVal) == ILCodeStream::SPECIAL_VALUE_NAN_64_ON_32)) uVal = CLR_NAN_64; -#endif // HOST_64BIT +#endif // TARGET_64BIT SET_UNALIGNED_VAL64(pbBuffer, uVal); } break; @@ -1419,7 +1418,7 @@ void ILCodeStream::EmitLDC(DWORD_PTR uConst) { WRAPPER_NO_CONTRACT; Emit( -#ifdef HOST_64BIT +#ifdef TARGET_64BIT CEE_LDC_I8 #else CEE_LDC_I4 @@ -1434,14 +1433,14 @@ void ILCodeStream::EmitLDC_R4(UINT32 uConst) void ILCodeStream::EmitLDC_R8(UINT64 uConst) { STANDARD_VM_CONTRACT; -#ifndef HOST_64BIT // We don't have room on 32-bit platforms to stor the CLR_NAN_64 value, so +#ifndef TARGET_64BIT // We don't have room on 32-bit platforms to stor the CLR_NAN_64 value, so // we use a special value to represent CLR_NAN_64 and then recreate it later. CONSISTENCY_CHECK(((UINT32)uConst) != SPECIAL_VALUE_NAN_64_ON_32); if (uConst == CLR_NAN_64) uConst = SPECIAL_VALUE_NAN_64_ON_32; else CONSISTENCY_CHECK(FitsInU4(uConst)); -#endif // HOST_64BIT +#endif // TARGET_64BIT Emit(CEE_LDC_R8, 1, (UINT_PTR)uConst); } void ILCodeStream::EmitLDELEMA(int token) diff --git a/src/coreclr/src/vm/stubgen.h b/src/coreclr/src/vm/stubgen.h index a91679648b34..66ca74ab67d6 100644 --- a/src/coreclr/src/vm/stubgen.h +++ b/src/coreclr/src/vm/stubgen.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: StubGen.h // @@ -874,9 +873,9 @@ class ILCodeStream SArray m_buildingEHClauses; SArray m_finishedEHClauses; -#ifndef HOST_64BIT +#ifndef TARGET_64BIT const static UINT32 SPECIAL_VALUE_NAN_64_ON_32 = 0xFFFFFFFF; -#endif // HOST_64BIT +#endif // TARGET_64BIT }; #endif // DACCESS_COMPILE diff --git a/src/coreclr/src/vm/stubhelpers.cpp b/src/coreclr/src/vm/stubhelpers.cpp index 123885c07122..ea21bcbf4bc3 100644 --- a/src/coreclr/src/vm/stubhelpers.cpp +++ b/src/coreclr/src/vm/stubhelpers.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: stubhelpers.cpp // @@ -251,14 +250,6 @@ FORCEINLINE static IUnknown *GetCOMIPFromRCW_GetIUnknownFromRCWCache(RCW *pRCW, } } - // also search the auxiliary cache if it's available - RCWAuxiliaryData *pAuxData = pRCW->m_pAuxiliaryData; - if (pAuxData != NULL) - { - LPVOID pCtxCookie = (pRCW->IsFreeThreaded() ? NULL : pOleTlsData->pCurrentCtx); - return pAuxData->FindInterfacePointer(pItfMT, pCtxCookie); - } - return NULL; } @@ -288,20 +279,6 @@ FORCEINLINE static IUnknown *GetCOMIPFromRCW_GetIUnknownFromRCWCache_NoIntercept } } - // also search the auxiliary cache if it's available - RCWAuxiliaryData *pAuxData = pRCW->m_pAuxiliaryData; - if (pAuxData != NULL) - { - LPVOID pCtxCookie = (pRCW->IsFreeThreaded() ? NULL : pOleTlsData->pCurrentCtx); - - IUnknown *pUnk = pAuxData->FindInterfacePointer(pItfMT, pCtxCookie); - if (pUnk != NULL) - { - *ppTarget = GetCOMIPFromRCW_GetTargetNoInterception(pUnk, pComInfo); - return pUnk; - } - } - return NULL; } @@ -518,13 +495,6 @@ FCIMPL0(void, StubHelpers::ClearLastError) } FCIMPLEND -FCIMPL1(FC_BOOL_RET, StubHelpers::IsQCall, NDirectMethodDesc* pNMD) -{ - FCALL_CONTRACT; - FC_RETURN_BOOL(pNMD->IsQCall()); -} -FCIMPLEND - NOINLINE static void InitDeclaringTypeHelper(MethodTable *pMT) { FC_INNER_PROLOG(StubHelpers::InitDeclaringType); diff --git a/src/coreclr/src/vm/stubhelpers.h b/src/coreclr/src/vm/stubhelpers.h index 5c047bd03c86..9a133069024c 100644 --- a/src/coreclr/src/vm/stubhelpers.h +++ b/src/coreclr/src/vm/stubhelpers.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: stubhelpers.h // @@ -61,7 +60,6 @@ class StubHelpers static FCDECL0(void, SetLastError ); static FCDECL0(void, ClearLastError ); - static FCDECL1(FC_BOOL_RET, IsQCall, NDirectMethodDesc* pNMD); static FCDECL1(void, InitDeclaringType, NDirectMethodDesc* pMND); static FCDECL1(void*, GetNDirectTarget, NDirectMethodDesc* pNMD); static FCDECL2(void*, GetDelegateTarget, DelegateObject *pThisUNSAFE, UINT_PTR *ppStubArg); diff --git a/src/coreclr/src/vm/stublink.cpp b/src/coreclr/src/vm/stublink.cpp index 2fbc34a6235b..00d5c84c9db2 100644 --- a/src/coreclr/src/vm/stublink.cpp +++ b/src/coreclr/src/vm/stublink.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // stublink.cpp // diff --git a/src/coreclr/src/vm/stublink.h b/src/coreclr/src/vm/stublink.h index 9c51988d6419..0e0b13b3bf49 100644 --- a/src/coreclr/src/vm/stublink.h +++ b/src/coreclr/src/vm/stublink.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // STUBLINK.H // diff --git a/src/coreclr/src/vm/stublink.inl b/src/coreclr/src/vm/stublink.inl index fb498ff1ed7b..a0f0433fa809 100644 --- a/src/coreclr/src/vm/stublink.inl +++ b/src/coreclr/src/vm/stublink.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // StubLink.inl // diff --git a/src/coreclr/src/vm/stubmgr.cpp b/src/coreclr/src/vm/stubmgr.cpp index 3477154b6646..38f517c1e779 100644 --- a/src/coreclr/src/vm/stubmgr.cpp +++ b/src/coreclr/src/vm/stubmgr.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" diff --git a/src/coreclr/src/vm/stubmgr.h b/src/coreclr/src/vm/stubmgr.h index dba33f4bce83..d36db9f9009f 100644 --- a/src/coreclr/src/vm/stubmgr.h +++ b/src/coreclr/src/vm/stubmgr.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // StubMgr.h // diff --git a/src/coreclr/src/vm/syncblk.cpp b/src/coreclr/src/vm/syncblk.cpp index 7629279a4e25..29b61c356b51 100644 --- a/src/coreclr/src/vm/syncblk.cpp +++ b/src/coreclr/src/vm/syncblk.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // SYNCBLK.CPP // diff --git a/src/coreclr/src/vm/syncblk.h b/src/coreclr/src/vm/syncblk.h index 08a4feee976d..5601abf94592 100644 --- a/src/coreclr/src/vm/syncblk.h +++ b/src/coreclr/src/vm/syncblk.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // SYNCBLK.H // diff --git a/src/coreclr/src/vm/syncblk.inl b/src/coreclr/src/vm/syncblk.inl index 1d62e80ff3b2..fe44ccc623a0 100644 --- a/src/coreclr/src/vm/syncblk.inl +++ b/src/coreclr/src/vm/syncblk.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _SYNCBLK_INL_ diff --git a/src/coreclr/src/vm/syncclean.cpp b/src/coreclr/src/vm/syncclean.cpp index 3eaea3ec5345..55e8dec1bf65 100644 --- a/src/coreclr/src/vm/syncclean.cpp +++ b/src/coreclr/src/vm/syncclean.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" diff --git a/src/coreclr/src/vm/syncclean.hpp b/src/coreclr/src/vm/syncclean.hpp index 83c8b186018e..c203b7245d10 100644 --- a/src/coreclr/src/vm/syncclean.hpp +++ b/src/coreclr/src/vm/syncclean.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _SYNCCLEAN_HPP_ diff --git a/src/coreclr/src/vm/synch.cpp b/src/coreclr/src/vm/synch.cpp index 6da9b841f8af..9d51befb223c 100644 --- a/src/coreclr/src/vm/synch.cpp +++ b/src/coreclr/src/vm/synch.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/synch.h b/src/coreclr/src/vm/synch.h index db63e293ecf1..86a33af21d4f 100644 --- a/src/coreclr/src/vm/synch.h +++ b/src/coreclr/src/vm/synch.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // diff --git a/src/coreclr/src/vm/tailcallhelp.cpp b/src/coreclr/src/vm/tailcallhelp.cpp index 4d7b8bca0af7..70dee8e5d867 100644 --- a/src/coreclr/src/vm/tailcallhelp.cpp +++ b/src/coreclr/src/vm/tailcallhelp.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "corpriv.h" @@ -109,226 +108,29 @@ struct TailCallInfo }; static MethodDesc* s_tailCallDispatcherMD; -MethodDesc* TailCallHelp::GetTailCallDispatcherMD() +MethodDesc* TailCallHelp::GetOrLoadTailCallDispatcherMD() { - LIMITED_METHOD_CONTRACT; - + CONTRACTL + { + THROWS; + GC_TRIGGERS; + INJECT_FAULT(ThrowOutOfMemory()); + } + CONTRACTL_END; + + if (s_tailCallDispatcherMD == NULL) + s_tailCallDispatcherMD = MscorlibBinder::GetMethod(METHOD__RUNTIME_HELPERS__DISPATCH_TAILCALLS); + return s_tailCallDispatcherMD; } - -// This creates the dispatcher used to dispatch sequences of tailcalls. In C# -// code it is the following function. Once C# gets function pointer support this -// function can be put in System.Private.CoreLib. -// private static unsafe void DispatchTailCalls( -// IntPtr callersRetAddrSlot, IntPtr callTarget, IntPtr retVal) -// { -// IntPtr callersRetAddr; -// TailCallTls* tls = GetTailCallInfo(callersRetAddrSlot, &callersRetAddr); -// PortableTailCallFrame* prevFrame = tls->Frame; -// if (callersRetAddr == prevFrame->TailCallAwareReturnAddress) -// { -// prevFrame->NextCall = callTarget; -// return; -// } -// -// PortableTailCallFrame newFrame; -// newFrame.Prev = prevFrame; -// -// try -// { -// tls->Frame = &newFrame; -// -// do -// { -// newFrame.NextCall = IntPtr.Zero; -// var fptr = (func* void(IntPtr, IntPtr, void*))callTarget; -// fptr(tls->ArgBuffer, retVal, &newFrame.TailCallAwareReturnAddress); -// callTarget = newFrame.NextCall; -// } while (callTarget != IntPtr.Zero); -// } -// finally -// { -// tls->Frame = prevFrame; -// } -// } -MethodDesc* TailCallHelp::GetOrCreateTailCallDispatcherMD() +MethodDesc* TailCallHelp::GetTailCallDispatcherMD() { - STANDARD_VM_CONTRACT; - - if (s_tailCallDispatcherMD != NULL) - return s_tailCallDispatcherMD; - - SigBuilder sigBuilder; - sigBuilder.AppendByte(IMAGE_CEE_CS_CALLCONV_DEFAULT); - - sigBuilder.AppendData(3); - sigBuilder.AppendElementType(ELEMENT_TYPE_VOID); - - sigBuilder.AppendElementType(ELEMENT_TYPE_I); - sigBuilder.AppendElementType(ELEMENT_TYPE_I); - sigBuilder.AppendElementType(ELEMENT_TYPE_I); - - const int ARG_CALLERS_RET_ADDR_SLOT = 0; - const int ARG_CALL_TARGET = 1; - const int ARG_RET_VAL = 2; - - DWORD cbSig; - PCCOR_SIGNATURE pSig = AllocateSignature( - MscorlibBinder::GetModule()->GetLoaderAllocator(), sigBuilder, &cbSig); - - SigTypeContext emptyCtx; - - ILStubLinker sl(MscorlibBinder::GetModule(), - Signature(pSig, cbSig), - &emptyCtx, - NULL, - FALSE, - FALSE); - - ILCodeStream* pCode = sl.NewCodeStream(ILStubLinker::kDispatch); - - DWORD retAddrLcl = pCode->NewLocal(ELEMENT_TYPE_I); - DWORD tlsLcl = pCode->NewLocal(ELEMENT_TYPE_I); - DWORD prevFrameLcl = pCode->NewLocal(ELEMENT_TYPE_I); - TypeHandle frameTyHnd = MscorlibBinder::GetClass(CLASS__PORTABLE_TAIL_CALL_FRAME); - DWORD newFrameEntryLcl = pCode->NewLocal(LocalDesc(frameTyHnd)); - DWORD argsLcl = pCode->NewLocal(ELEMENT_TYPE_I); - ILCodeLabel* noUnwindLbl = pCode->NewCodeLabel(); - ILCodeLabel* loopStart = pCode->NewCodeLabel(); - ILCodeLabel* afterTryFinally = pCode->NewCodeLabel(); - - // tls = RuntimeHelpers.GetTailcallInfo(callersRetAddrSlot, &retAddr); - pCode->EmitLDARG(ARG_CALLERS_RET_ADDR_SLOT); - pCode->EmitLDLOCA(retAddrLcl); - pCode->EmitCALL(METHOD__RUNTIME_HELPERS__GET_TAILCALL_INFO, 2, 1); - pCode->EmitSTLOC(tlsLcl); - - // prevFrame = tls.Frame; - pCode->EmitLDLOC(tlsLcl); - pCode->EmitLDFLD(FIELD__TAIL_CALL_TLS__FRAME); - pCode->EmitSTLOC(prevFrameLcl); - - // if (retAddr != prevFrame.TailCallAwareReturnAddress) goto noUnwindLbl; - pCode->EmitLDLOC(retAddrLcl); - pCode->EmitLDLOC(prevFrameLcl); - pCode->EmitLDFLD(FIELD__PORTABLE_TAIL_CALL_FRAME__TAILCALL_AWARE_RETURN_ADDRESS); - pCode->EmitBNE_UN(noUnwindLbl); - - // prevFrame->NextCall = callTarget; - pCode->EmitLDLOC(prevFrameLcl); - pCode->EmitLDARG(ARG_CALL_TARGET); - pCode->EmitSTFLD(FIELD__PORTABLE_TAIL_CALL_FRAME__NEXT_CALL); - - // return; - pCode->EmitRET(); - - // Ok, we are the "first" dispatcher. - pCode->EmitLabel(noUnwindLbl); - - // newFrameEntry.Prev = prevFrame; - pCode->EmitLDLOCA(newFrameEntryLcl); - pCode->EmitLDLOC(prevFrameLcl); - pCode->EmitSTFLD(FIELD__PORTABLE_TAIL_CALL_FRAME__PREV); - - // try { - pCode->BeginTryBlock(); - - // tls->Frame = &newFrameEntry; - pCode->EmitLDLOC(tlsLcl); - pCode->EmitLDLOCA(newFrameEntryLcl); - pCode->EmitSTFLD(FIELD__TAIL_CALL_TLS__FRAME); - - // do { - pCode->EmitLabel(loopStart); - - // newFrameEntry.NextCall = 0 - pCode->EmitLDLOCA(newFrameEntryLcl); - pCode->EmitLDC(0); - pCode->EmitCONV_I(); - pCode->EmitSTFLD(FIELD__PORTABLE_TAIL_CALL_FRAME__NEXT_CALL); - - SigBuilder calliSig; - calliSig.AppendByte(IMAGE_CEE_CS_CALLCONV_DEFAULT); - calliSig.AppendData(3); - calliSig.AppendElementType(ELEMENT_TYPE_VOID); - calliSig.AppendElementType(ELEMENT_TYPE_I); - calliSig.AppendElementType(ELEMENT_TYPE_I); - calliSig.AppendElementType(ELEMENT_TYPE_I); - - DWORD cbCalliSig; - PCCOR_SIGNATURE pCalliSig = (PCCOR_SIGNATURE)calliSig.GetSignature(&cbCalliSig); - - // callTarget(tls->ArgBuffer, retVal, &newFrameEntry.TailCallAwareReturnAddress) - // arg buffer - pCode->EmitLDLOC(tlsLcl); - pCode->EmitLDFLD(FIELD__TAIL_CALL_TLS__ARG_BUFFER); - - // ret val - pCode->EmitLDARG(ARG_RET_VAL); - - // TailCallAwareReturnAddress - pCode->EmitLDLOCA(newFrameEntryLcl); - pCode->EmitLDFLDA(FIELD__PORTABLE_TAIL_CALL_FRAME__TAILCALL_AWARE_RETURN_ADDRESS); - - // callTarget - pCode->EmitLDARG(ARG_CALL_TARGET); - - pCode->EmitCALLI(pCode->GetSigToken(pCalliSig, cbCalliSig), 2, 0); - - // callTarget = newFrameEntry.NextCall; - pCode->EmitLDLOC(newFrameEntryLcl); - pCode->EmitLDFLD(FIELD__PORTABLE_TAIL_CALL_FRAME__NEXT_CALL); - pCode->EmitSTARG(ARG_CALL_TARGET); - - // } while (callTarget != IntPtr.Zero); - pCode->EmitLDARG(ARG_CALL_TARGET); - pCode->EmitBRTRUE(loopStart); - - // } - pCode->EmitLEAVE(afterTryFinally); - pCode->EndTryBlock(); - - // finally { - pCode->BeginFinallyBlock(); - - // tls->Frame = prevFrame; - pCode->EmitLDLOC(tlsLcl); - pCode->EmitLDLOC(prevFrameLcl); - pCode->EmitSTFLD(FIELD__TAIL_CALL_TLS__FRAME); - - // } - pCode->EmitENDFINALLY(); - pCode->EndFinallyBlock(); - - // afterTryFinally: - pCode->EmitLabel(afterTryFinally); - - // return; - pCode->EmitRET(); - - Module* mscorlib = MscorlibBinder::GetModule(); - MethodDesc* pDispatchTailCallsMD = - ILStubCache::CreateAndLinkNewILStubMethodDesc( - MscorlibBinder::GetModule()->GetLoaderAllocator(), - mscorlib->GetILStubCache()->GetOrCreateStubMethodTable(mscorlib), - ILSTUB_TAILCALL_DISPATCH, - mscorlib, - pSig, cbSig, - &emptyCtx, - &sl); - -#ifdef _DEBUG - LOG((LF_STUBS, LL_INFO1000, "TAILCALLHELP: DispatchTailCalls IL created\n")); - sl.LogILStub(CORJIT_FLAGS()); -#endif - - // We might waste a MethodDesc here if we lose the race, but that is very - // unlikely and since this initialization only happens once not a big deal. - InterlockedCompareExchangeT(&s_tailCallDispatcherMD, pDispatchTailCallsMD, NULL); + LIMITED_METHOD_CONTRACT; return s_tailCallDispatcherMD; } + void TailCallHelp::CreateTailCallHelperStubs( MethodDesc* pCallerMD, MethodDesc* pCalleeMD, MetaSig& callSiteSig, bool virt, bool thisArgByRef, diff --git a/src/coreclr/src/vm/tailcallhelp.h b/src/coreclr/src/vm/tailcallhelp.h index 38a4aae866d0..327dc3d2e1dc 100644 --- a/src/coreclr/src/vm/tailcallhelp.h +++ b/src/coreclr/src/vm/tailcallhelp.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef TAILCALL_HELP_H #define TAILCALL_HELP_H @@ -24,7 +23,7 @@ class TailCallHelp MethodDesc** storeArgsStub, bool* storeArgsNeedsTarget, MethodDesc** callTargetStub); - static MethodDesc* GetOrCreateTailCallDispatcherMD(); + static MethodDesc* GetOrLoadTailCallDispatcherMD(); static MethodDesc* GetTailCallDispatcherMD(); private: diff --git a/src/coreclr/src/vm/threaddebugblockinginfo.cpp b/src/coreclr/src/vm/threaddebugblockinginfo.cpp index a903693cac5b..876709156689 100644 --- a/src/coreclr/src/vm/threaddebugblockinginfo.cpp +++ b/src/coreclr/src/vm/threaddebugblockinginfo.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ThreadDebugBlockingInfo.cpp // diff --git a/src/coreclr/src/vm/threaddebugblockinginfo.h b/src/coreclr/src/vm/threaddebugblockinginfo.h index b7286bf87ffe..9a2815b3a0c7 100644 --- a/src/coreclr/src/vm/threaddebugblockinginfo.h +++ b/src/coreclr/src/vm/threaddebugblockinginfo.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ThreadDebugBlockingInfo.h // diff --git a/src/coreclr/src/vm/threadpoolrequest.cpp b/src/coreclr/src/vm/threadpoolrequest.cpp index 956ad7c4fac5..470f8b4058bd 100644 --- a/src/coreclr/src/vm/threadpoolrequest.cpp +++ b/src/coreclr/src/vm/threadpoolrequest.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //========================================================================= diff --git a/src/coreclr/src/vm/threadpoolrequest.h b/src/coreclr/src/vm/threadpoolrequest.h index 501fa951857f..b7419241bb62 100644 --- a/src/coreclr/src/vm/threadpoolrequest.h +++ b/src/coreclr/src/vm/threadpoolrequest.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //========================================================================= diff --git a/src/coreclr/src/vm/threads.cpp b/src/coreclr/src/vm/threads.cpp index b3103e6cbfe2..32cc52c6f220 100644 --- a/src/coreclr/src/vm/threads.cpp +++ b/src/coreclr/src/vm/threads.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // THREADS.CPP // @@ -4722,7 +4721,7 @@ BOOL Thread::PrepareApartmentAndContext() FastInterlockAnd ((ULONG *) &m_State, ~TS_InSTA & ~TS_InMTA); // Attempt to set the requested apartment state. - SetApartment(aState, FALSE); + SetApartment(aState); } // In the case where we own the thread and we have switched it to a different @@ -4732,9 +4731,9 @@ BOOL Thread::PrepareApartmentAndContext() #endif //FEATURE_COMINTEROP_APARTMENT_SUPPORT #ifdef FEATURE_COMINTEROP - // Our IInitializeSpy will be registered in AppX always, in classic processes + // Our IInitializeSpy will be registered in classic processes // only if the internal config switch is on. - if (AppX::IsAppXProcess() || g_pConfig->EnableRCWCleanupOnSTAShutdown()) + if (g_pConfig->EnableRCWCleanupOnSTAShutdown()) { NewHolder pSpyImpl = new ApartmentSpyImpl(); @@ -4909,9 +4908,7 @@ VOID Thread::ResetApartment() // achieved is returned and may differ from the input state if someone managed // to call CoInitializeEx on this thread first (note that calls to SetApartment // made before the thread has started are guaranteed to succeed). -// The fFireMDAOnMismatch indicates if we should fire the apartment state probe -// on an apartment state mismatch. -Thread::ApartmentState Thread::SetApartment(ApartmentState state, BOOL fFireMDAOnMismatch) +Thread::ApartmentState Thread::SetApartment(ApartmentState state) { CONTRACTL { THROWS; @@ -7240,7 +7237,7 @@ void Thread::DoExtraWorkForFinalizer() #ifdef FEATURE_COMINTEROP_APARTMENT_SUPPORT if (RequiresCoInitialize()) { - SetApartment(AS_InMTA, FALSE); + SetApartment(AS_InMTA); } #endif // FEATURE_COMINTEROP_APARTMENT_SUPPORT diff --git a/src/coreclr/src/vm/threads.h b/src/coreclr/src/vm/threads.h index bb38034a6ec1..b835b4a6321c 100644 --- a/src/coreclr/src/vm/threads.h +++ b/src/coreclr/src/vm/threads.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // THREADS.H - // @@ -2954,9 +2953,7 @@ class Thread // achieved is returned and may differ from the input state if someone managed to // call CoInitializeEx on this thread first (note that calls to SetApartment made // before the thread has started are guaranteed to succeed). - // The fFireMDAOnMismatch indicates if we should fire the apartment state probe - // on an apartment state mismatch. - ApartmentState SetApartment(ApartmentState state, BOOL fFireMDAOnMismatch); + ApartmentState SetApartment(ApartmentState state); // when we get apartment tear-down notification, // we want reset the apartment state we cache on the thread @@ -3448,7 +3445,7 @@ class Thread MethodDesc *m_HijackedFunction; // remember what we hijacked #ifndef TARGET_UNIX - BOOL HandledJITCase(BOOL ForTaskSwitchIn = FALSE); + BOOL HandledJITCase(); #ifdef TARGET_X86 PCODE m_LastRedirectIP; diff --git a/src/coreclr/src/vm/threads.inl b/src/coreclr/src/vm/threads.inl index 6d6946989846..68fa53b0ab62 100644 --- a/src/coreclr/src/vm/threads.inl +++ b/src/coreclr/src/vm/threads.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // diff --git a/src/coreclr/src/vm/threadstatics.cpp b/src/coreclr/src/vm/threadstatics.cpp index b8f9f16c135d..2644d7ad5fc9 100644 --- a/src/coreclr/src/vm/threadstatics.cpp +++ b/src/coreclr/src/vm/threadstatics.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ThreadStatics.cpp // diff --git a/src/coreclr/src/vm/threadstatics.h b/src/coreclr/src/vm/threadstatics.h index e3df27d53f20..14d909fee39f 100644 --- a/src/coreclr/src/vm/threadstatics.h +++ b/src/coreclr/src/vm/threadstatics.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ThreadStatics.h // diff --git a/src/coreclr/src/vm/threadsuspend.cpp b/src/coreclr/src/vm/threadsuspend.cpp index 82afaf0b658c..7d632cb27b1a 100644 --- a/src/coreclr/src/vm/threadsuspend.cpp +++ b/src/coreclr/src/vm/threadsuspend.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // threadsuspend.CPP // @@ -5390,54 +5389,6 @@ static bool GetReturnAddressHijackInfo(EECodeInfo *pCodeInfo, ReturnKind *pRetur #ifndef TARGET_UNIX -// Get the ExecutionState for the specified SwitchIn thread. Note that this is -// a 'StackWalk' call back (PSTACKWALKFRAMESCALLBACK). -StackWalkAction SWCB_GetExecutionStateForSwitchIn(CrawlFrame *pCF, VOID *pData) -{ - CONTRACTL { - NOTHROW; - GC_NOTRIGGER; - } - CONTRACTL_END; - - ExecutionState *pES = (ExecutionState *) pData; - StackWalkAction action = SWA_CONTINUE; - - if (pES->m_FirstPass) { - if (pCF->IsFrameless()) { -#ifdef TARGET_X86 - pES->m_FirstPass = FALSE; -#else - _ASSERTE(!"Platform NYI"); -#endif - - pES->m_IsJIT = TRUE; - pES->m_pFD = pCF->GetFunction(); - pES->m_MethodToken = pCF->GetMethodToken(); - // We do not care if the code is interruptible - pES->m_IsInterruptible = FALSE; - pES->m_RelOffset = pCF->GetRelOffset(); - pES->m_pJitManager = pCF->GetJitManager(); - } - } - else { -#ifdef TARGET_X86 - if (pCF->IsFrameless()) { - PREGDISPLAY pRDT = pCF->GetRegisterSet(); - if (pRDT) { - // pPC points to the return address sitting on the stack, as our - // current EIP for the penultimate stack frame. - pES->m_ppvRetAddrPtr = (void **) pRDT->PCTAddr; - action = SWA_ABORT; - } - } -#else - _ASSERTE(!"Platform NYI"); -#endif - } - return action; -} - // // The function below, ThreadCaughtInKernelModeExceptionHandling, exists to detect and work around a very subtle // race that we have when we suspend a thread while that thread is in the kernel handling an exception. @@ -5751,7 +5702,7 @@ BOOL Thread::GetSafelyRedirectableThreadContext(DWORD dwOptions, CONTEXT * pCtx, // suspended. If we aren't in interruptible code, then we aren't handled. So we // pick a spot to hijack the return address and our caller will wait to get us // somewhere safe. -BOOL Thread::HandledJITCase(BOOL ForTaskSwitchIn) +BOOL Thread::HandledJITCase() { CONTRACTL { NOTHROW; @@ -5797,26 +5748,20 @@ BOOL Thread::HandledJITCase(BOOL ForTaskSwitchIn) } #endif //_DEBUG - // Walk one or two frames of the stack... - if (ForTaskSwitchIn) { - action = StackWalkFramesEx(&rd,SWCB_GetExecutionStateForSwitchIn, &esb, QUICKUNWIND | DISABLE_MISSING_FRAME_DETECTION | THREAD_IS_SUSPENDED | ALLOW_ASYNC_STACK_WALK, NULL); - } - else { #ifdef TIME_SUSPEND - DWORD startCrawl = g_SuspendStatistics.GetTime(); + DWORD startCrawl = g_SuspendStatistics.GetTime(); #endif - action = StackWalkFramesEx(&rd,SWCB_GetExecutionState, &esb, - QUICKUNWIND | DISABLE_MISSING_FRAME_DETECTION | - THREAD_IS_SUSPENDED | ALLOW_ASYNC_STACK_WALK, NULL); + action = StackWalkFramesEx(&rd,SWCB_GetExecutionState, &esb, + QUICKUNWIND | DISABLE_MISSING_FRAME_DETECTION | + THREAD_IS_SUSPENDED | ALLOW_ASYNC_STACK_WALK, NULL); #ifdef TIME_SUSPEND - g_SuspendStatistics.crawl.Accumulate( - SuspendStatistics::GetElapsed(startCrawl, - g_SuspendStatistics.GetTime())); + g_SuspendStatistics.crawl.Accumulate( + SuspendStatistics::GetElapsed(startCrawl, + g_SuspendStatistics.GetTime())); - g_SuspendStatistics.cntHijackCrawl++; + g_SuspendStatistics.cntHijackCrawl++; #endif - } // // action should either be SWA_ABORT, in which case we properly walked diff --git a/src/coreclr/src/vm/threadsuspend.h b/src/coreclr/src/vm/threadsuspend.h index b8df42dbb33f..cff7556ea16a 100644 --- a/src/coreclr/src/vm/threadsuspend.h +++ b/src/coreclr/src/vm/threadsuspend.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // threadsuspend.h #ifndef _THREAD_SUSPEND_H_ diff --git a/src/coreclr/src/vm/tieredcompilation.cpp b/src/coreclr/src/vm/tieredcompilation.cpp index 90458ec5b7e4..311154f1ad72 100644 --- a/src/coreclr/src/vm/tieredcompilation.cpp +++ b/src/coreclr/src/vm/tieredcompilation.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: TieredCompilation.CPP // diff --git a/src/coreclr/src/vm/tieredcompilation.h b/src/coreclr/src/vm/tieredcompilation.h index ee7bac7cdf56..b3f32a67f15b 100644 --- a/src/coreclr/src/vm/tieredcompilation.h +++ b/src/coreclr/src/vm/tieredcompilation.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: TieredCompilation.h // diff --git a/src/coreclr/src/vm/typectxt.cpp b/src/coreclr/src/vm/typectxt.cpp index cb835f7ff897..1abaf9441bd6 100644 --- a/src/coreclr/src/vm/typectxt.cpp +++ b/src/coreclr/src/vm/typectxt.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // typectxt.cpp // diff --git a/src/coreclr/src/vm/typectxt.h b/src/coreclr/src/vm/typectxt.h index 610f3304f924..fc9970a6b781 100644 --- a/src/coreclr/src/vm/typectxt.h +++ b/src/coreclr/src/vm/typectxt.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // typectxt.h // diff --git a/src/coreclr/src/vm/typedesc.cpp b/src/coreclr/src/vm/typedesc.cpp index 472bc883e4ac..167ccf0f5512 100644 --- a/src/coreclr/src/vm/typedesc.cpp +++ b/src/coreclr/src/vm/typedesc.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: typedesc.cpp // diff --git a/src/coreclr/src/vm/typedesc.h b/src/coreclr/src/vm/typedesc.h index 68dee0e641b3..160bfeffd2d3 100644 --- a/src/coreclr/src/vm/typedesc.h +++ b/src/coreclr/src/vm/typedesc.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: typedesc.h // diff --git a/src/coreclr/src/vm/typedesc.inl b/src/coreclr/src/vm/typedesc.inl index 1816a6b7f8c2..c6fbf654f094 100644 --- a/src/coreclr/src/vm/typedesc.inl +++ b/src/coreclr/src/vm/typedesc.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: typedesc.inl // diff --git a/src/coreclr/src/vm/typeequivalencehash.cpp b/src/coreclr/src/vm/typeequivalencehash.cpp index 90b2c2749e0f..ee202cc92e9e 100644 --- a/src/coreclr/src/vm/typeequivalencehash.cpp +++ b/src/coreclr/src/vm/typeequivalencehash.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // Hash table associated with each module that records for all types defined in that module the mapping diff --git a/src/coreclr/src/vm/typeequivalencehash.hpp b/src/coreclr/src/vm/typeequivalencehash.hpp index 25f8e04c2290..ed42e7b7be9b 100644 --- a/src/coreclr/src/vm/typeequivalencehash.hpp +++ b/src/coreclr/src/vm/typeequivalencehash.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // Hash table associated with each module that records for all types defined in that module the mapping diff --git a/src/coreclr/src/vm/typehandle.cpp b/src/coreclr/src/vm/typehandle.cpp index a7a8508e294f..754f842ea700 100644 --- a/src/coreclr/src/vm/typehandle.cpp +++ b/src/coreclr/src/vm/typehandle.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: typehandle.cpp // diff --git a/src/coreclr/src/vm/typehandle.h b/src/coreclr/src/vm/typehandle.h index ba3455241a4c..387a75b36213 100644 --- a/src/coreclr/src/vm/typehandle.h +++ b/src/coreclr/src/vm/typehandle.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: typehandle.h // diff --git a/src/coreclr/src/vm/typehandle.inl b/src/coreclr/src/vm/typehandle.inl index 33beb92037d7..ba66ee3b02f4 100644 --- a/src/coreclr/src/vm/typehandle.inl +++ b/src/coreclr/src/vm/typehandle.inl @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: typehandle.inl // diff --git a/src/coreclr/src/vm/typehash.cpp b/src/coreclr/src/vm/typehash.cpp index 6157f8ecdd3e..343ae7378a70 100644 --- a/src/coreclr/src/vm/typehash.cpp +++ b/src/coreclr/src/vm/typehash.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: typehash.cpp // diff --git a/src/coreclr/src/vm/typehash.h b/src/coreclr/src/vm/typehash.h index b4315d382db8..be19ab5218e6 100644 --- a/src/coreclr/src/vm/typehash.h +++ b/src/coreclr/src/vm/typehash.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: typehash.h // diff --git a/src/coreclr/src/vm/typehashingalgorithms.h b/src/coreclr/src/vm/typehashingalgorithms.h index 201e2506d4c9..f2bd3bd2ee4a 100644 --- a/src/coreclr/src/vm/typehashingalgorithms.h +++ b/src/coreclr/src/vm/typehashingalgorithms.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // --------------------------------------------------------------------------- // Generic functions to compute the hashcode value of types diff --git a/src/coreclr/src/vm/typekey.h b/src/coreclr/src/vm/typekey.h index e2e101efc17f..71d6febced98 100644 --- a/src/coreclr/src/vm/typekey.h +++ b/src/coreclr/src/vm/typekey.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // typekey.h // diff --git a/src/coreclr/src/vm/typeparse.cpp b/src/coreclr/src/vm/typeparse.cpp index f38c829371d1..1b69d0d815d0 100644 --- a/src/coreclr/src/vm/typeparse.cpp +++ b/src/coreclr/src/vm/typeparse.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // --------------------------------------------------------------------------- // typeparse.cpp // --------------------------------------------------------------------------- diff --git a/src/coreclr/src/vm/typeparse.h b/src/coreclr/src/vm/typeparse.h index 2ce593bdc14d..39e4211635d0 100644 --- a/src/coreclr/src/vm/typeparse.h +++ b/src/coreclr/src/vm/typeparse.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // --------------------------------------------------------------------------- // typeparse.h // --------------------------------------------------------------------------- diff --git a/src/coreclr/src/vm/typestring.cpp b/src/coreclr/src/vm/typestring.cpp index 4fd4d9636511..76e31bbbf175 100644 --- a/src/coreclr/src/vm/typestring.cpp +++ b/src/coreclr/src/vm/typestring.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // --------------------------------------------------------------------------- // typestring.cpp // --------------------------------------------------------------------------- @@ -369,7 +368,7 @@ HRESULT TypeNameBuilder::AddArray(DWORD rank) Append(W("[*]")); else if (rank > 64) { - // Only taken in an error path, runtime will not load arrays of more than 32 dimentions + // Only taken in an error path, runtime will not load arrays of more than 32 dimensions WCHAR wzDim[128]; _snwprintf_s(wzDim, 128, _TRUNCATE, W("[%d]"), rank); Append(wzDim); diff --git a/src/coreclr/src/vm/typestring.h b/src/coreclr/src/vm/typestring.h index b1223ac66291..994feb835841 100644 --- a/src/coreclr/src/vm/typestring.h +++ b/src/coreclr/src/vm/typestring.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // --------------------------------------------------------------------------- // typestring.cpp // --------------------------------------------------------------------------- diff --git a/src/coreclr/src/vm/util.cpp b/src/coreclr/src/vm/util.cpp index d41e4675b181..42a98bad7bcd 100644 --- a/src/coreclr/src/vm/util.cpp +++ b/src/coreclr/src/vm/util.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: UTIL.CPP // diff --git a/src/coreclr/src/vm/util.hpp b/src/coreclr/src/vm/util.hpp index 692b9d5f9d6a..19f7932f1782 100644 --- a/src/coreclr/src/vm/util.hpp +++ b/src/coreclr/src/vm/util.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // util.hpp // diff --git a/src/coreclr/src/vm/vars.cpp b/src/coreclr/src/vm/vars.cpp index 036148e46ab7..6239469294e9 100644 --- a/src/coreclr/src/vm/vars.cpp +++ b/src/coreclr/src/vm/vars.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // vars.cpp - Global Var definitions // diff --git a/src/coreclr/src/vm/vars.hpp b/src/coreclr/src/vm/vars.hpp index 3dcc7d68d8dc..ccf9289abab0 100644 --- a/src/coreclr/src/vm/vars.hpp +++ b/src/coreclr/src/vm/vars.hpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // vars.hpp // @@ -695,7 +694,7 @@ typedef DPTR(GSCookie) PTR_GSCookie; #define READONLY_ATTR #else #ifdef __APPLE__ -#define READONLY_ATTR_ARGS section("__TEXT,__const") +#define READONLY_ATTR_ARGS section("__DATA,__const") #else #define READONLY_ATTR_ARGS section(".rodata") #endif diff --git a/src/coreclr/src/vm/versionresilienthashcode.cpp b/src/coreclr/src/vm/versionresilienthashcode.cpp index cfff4edcbed5..5321ae79f9a1 100644 --- a/src/coreclr/src/vm/versionresilienthashcode.cpp +++ b/src/coreclr/src/vm/versionresilienthashcode.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" #include "versionresilienthashcode.h" diff --git a/src/coreclr/src/vm/versionresilienthashcode.h b/src/coreclr/src/vm/versionresilienthashcode.h index f0b33e1239ea..9486df770f0f 100644 --- a/src/coreclr/src/vm/versionresilienthashcode.h +++ b/src/coreclr/src/vm/versionresilienthashcode.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. int GetVersionResilientTypeHashCode(TypeHandle type); diff --git a/src/coreclr/src/vm/virtualcallstub.cpp b/src/coreclr/src/vm/virtualcallstub.cpp index a3e5233d179f..828b56093b8c 100644 --- a/src/coreclr/src/vm/virtualcallstub.cpp +++ b/src/coreclr/src/vm/virtualcallstub.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: VirtualCallStub.CPP // diff --git a/src/coreclr/src/vm/virtualcallstub.h b/src/coreclr/src/vm/virtualcallstub.h index 9f2e2802fc86..19e2cc3c1e21 100644 --- a/src/coreclr/src/vm/virtualcallstub.h +++ b/src/coreclr/src/vm/virtualcallstub.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // File: VirtualCallStub.h // diff --git a/src/coreclr/src/vm/vmholder.h b/src/coreclr/src/vm/vmholder.h index 003892b07add..4cf414e80640 100644 --- a/src/coreclr/src/vm/vmholder.h +++ b/src/coreclr/src/vm/vmholder.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/coreclr/src/vm/weakreferencenative.cpp b/src/coreclr/src/vm/weakreferencenative.cpp index bc52c6124787..da6036abb15b 100644 --- a/src/coreclr/src/vm/weakreferencenative.cpp +++ b/src/coreclr/src/vm/weakreferencenative.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/vm/weakreferencenative.h b/src/coreclr/src/vm/weakreferencenative.h index 0d946f9855d9..387d6df2e252 100644 --- a/src/coreclr/src/vm/weakreferencenative.h +++ b/src/coreclr/src/vm/weakreferencenative.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/coreclr/src/vm/wellknownattributes.h b/src/coreclr/src/vm/wellknownattributes.h index 119119108651..9c3bce5cf456 100644 --- a/src/coreclr/src/vm/wellknownattributes.h +++ b/src/coreclr/src/vm/wellknownattributes.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef __WELLKNOWNATTRIBUTES_H_ #define __WELLKNOWNATTRIBUTES_H_ diff --git a/src/coreclr/src/vm/win32threadpool.cpp b/src/coreclr/src/vm/win32threadpool.cpp index 6afe8ba374c2..20d65a86cb0a 100644 --- a/src/coreclr/src/vm/win32threadpool.cpp +++ b/src/coreclr/src/vm/win32threadpool.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ @@ -1895,7 +1894,7 @@ DWORD WINAPI ThreadpoolMgr::WorkerThreadStart(LPVOID lpArgs) pThread->ChooseThreadCPUGroupAffinity(); #ifdef FEATURE_COMINTEROP - if (pThread->SetApartment(Thread::AS_InMTA, TRUE) != Thread::AS_InMTA) + if (pThread->SetApartment(Thread::AS_InMTA) != Thread::AS_InMTA) { // counts volatile read paired with CompareExchangeCounts loop set counts = WorkerCounter.DangerousGetDirtyCounts(); @@ -2008,7 +2007,7 @@ DWORD WINAPI ThreadpoolMgr::WorkerThreadStart(LPVOID lpArgs) while (true) { RetryRetire: - if (RetiredWorkerSemaphore->Wait(AppX::IsAppXProcess() ? WorkerTimeoutAppX : WorkerTimeout)) + if (RetiredWorkerSemaphore->Wait(WorkerTimeout)) { foundWork = true; @@ -2085,7 +2084,7 @@ DWORD WINAPI ThreadpoolMgr::WorkerThreadStart(LPVOID lpArgs) FireEtwThreadPoolWorkerThreadWait(counts.NumActive, counts.NumRetired, GetClrInstanceId()); RetryWaitForWork: - if (WorkerSemaphore->Wait(AppX::IsAppXProcess() ? WorkerTimeoutAppX : WorkerTimeout, WorkerThreadSpinLimit, NumberOfProcessors)) + if (WorkerSemaphore->Wait(WorkerTimeout, WorkerThreadSpinLimit, NumberOfProcessors)) { foundWork = true; goto Work; @@ -2142,7 +2141,7 @@ DWORD WINAPI ThreadpoolMgr::WorkerThreadStart(LPVOID lpArgs) #ifdef FEATURE_COMINTEROP if (pThread) { - pThread->SetApartment(Thread::AS_Unknown, TRUE); + pThread->SetApartment(Thread::AS_Unknown); pThread->CoUninitialize(); } @@ -3221,7 +3220,7 @@ DWORD WINAPI ThreadpoolMgr::CompletionPortThreadStart(LPVOID lpArgs) PIOCompletionContext context; BOOL fIsCompletionContext; - const DWORD CP_THREAD_WAIT = AppX::IsAppXProcess() ? 5000 : 15000; /* milliseconds */ + const DWORD CP_THREAD_WAIT = 15000; /* milliseconds */ _ASSERTE(GlobalCompletionPort != NULL); @@ -3254,7 +3253,7 @@ DWORD WINAPI ThreadpoolMgr::CompletionPortThreadStart(LPVOID lpArgs) } } - if (pThread && pThread->SetApartment(Thread::AS_InMTA, TRUE) != Thread::AS_InMTA) + if (pThread && pThread->SetApartment(Thread::AS_InMTA) != Thread::AS_InMTA) { // @todo: should we log the failure goto Exit; @@ -3279,7 +3278,7 @@ DWORD WINAPI ThreadpoolMgr::CompletionPortThreadStart(LPVOID lpArgs) pThread->ChooseThreadCPUGroupAffinity(); #ifdef FEATURE_COMINTEROP - if (pThread->SetApartment(Thread::AS_InMTA, TRUE) != Thread::AS_InMTA) + if (pThread->SetApartment(Thread::AS_InMTA) != Thread::AS_InMTA) { // @todo: should we log the failure goto Exit; @@ -3617,7 +3616,7 @@ DWORD WINAPI ThreadpoolMgr::CompletionPortThreadStart(LPVOID lpArgs) #ifdef FEATURE_COMINTEROP if (pThread) { - pThread->SetApartment(Thread::AS_Unknown, TRUE); + pThread->SetApartment(Thread::AS_Unknown); pThread->CoUninitialize(); } // Couninit the worker thread @@ -4517,10 +4516,10 @@ DWORD WINAPI ThreadpoolMgr::TimerThreadStart(LPVOID p) LastTickCount = GetTickCount(); #ifdef FEATURE_COMINTEROP - if (pThread->SetApartment(Thread::AS_InMTA, TRUE) != Thread::AS_InMTA) + if (pThread->SetApartment(Thread::AS_InMTA) != Thread::AS_InMTA) { // @todo: should we log the failure - goto Exit; + return 0; } #endif // FEATURE_COMINTEROP @@ -4536,16 +4535,7 @@ DWORD WINAPI ThreadpoolMgr::TimerThreadStart(LPVOID p) #endif } -#ifdef FEATURE_COMINTEROP -// unreachable code -// if (pThread) { -// pThread->SetApartment(Thread::AS_Unknown, TRUE); -// } -Exit: - - // @todo: replace with host provided ExitThread - return 0; -#endif + // unreachable } void ThreadpoolMgr::TimerThreadFire() diff --git a/src/coreclr/src/vm/win32threadpool.h b/src/coreclr/src/vm/win32threadpool.h index 36ae2d3f636e..d25341ecb4ab 100644 --- a/src/coreclr/src/vm/win32threadpool.h +++ b/src/coreclr/src/vm/win32threadpool.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*++ @@ -1042,7 +1041,6 @@ class ThreadpoolMgr private: static const DWORD WorkerTimeout = 20 * 1000; - static const DWORD WorkerTimeoutAppX = 5 * 1000; // shorter timeout to allow threads to exit prior to app suspension DECLSPEC_ALIGN(MAX_CACHE_LINE_SIZE) SVAL_DECL(ThreadCounter,WorkerCounter); diff --git a/src/coreclr/src/vm/wks/CMakeLists.txt b/src/coreclr/src/vm/wks/CMakeLists.txt index 1e94b575fd64..bd675204bd78 100644 --- a/src/coreclr/src/vm/wks/CMakeLists.txt +++ b/src/coreclr/src/vm/wks/CMakeLists.txt @@ -1,19 +1,22 @@ if (CLR_CMAKE_TARGET_WIN32) + if(CLR_CMAKE_HOST_ARCH_ARM OR CLR_CMAKE_HOST_ARCH_ARM64) - preprocess_compile_asm(ASM_FILES ${VM_SOURCES_WKS_ARCH_ASM} OUTPUT_OBJECTS VM_WKS_ARCH_ASM_OBJECTS) - list(APPEND VM_SOURCES_WKS_ARCH_ASM ${VM_WKS_ARCH_ASM_OBJECTS}) + preprocess_compile_asm(TARGET cee_wks_core ASM_FILES ${VM_SOURCES_WKS_ARCH_ASM} OUTPUT_OBJECTS VM_WKS_ARCH_ASM_OBJECTS) endif() endif (CLR_CMAKE_TARGET_WIN32) -add_library_clr(cee_wks ${VM_SOURCES_WKS} ${VM_SOURCES_WKS_ARCH_ASM}) -target_precompile_header(TARGET cee_wks HEADER common.h) +add_library_clr(cee_wks_core OBJECT ${VM_SOURCES_WKS} ${VM_SOURCES_WKS_ARCH_ASM}) + +target_precompile_header(TARGET cee_wks_core HEADER common.h) + if (MSVC) # mscorlib.cpp does not compile with precompiled header file set_source_files_properties(../mscorlib.cpp PROPERTIES COMPILE_FLAGS "/Y-") endif() -add_dependencies(cee_wks eventing_headers) + +add_dependencies(cee_wks_core eventing_headers) if (CLR_CMAKE_TARGET_WIN32) @@ -45,8 +48,21 @@ if (CLR_CMAKE_TARGET_WIN32) DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/AsmConstants.inc ) - add_dependencies(cee_wks asmconstants_inc) + add_dependencies(cee_wks_core asmconstants_inc) endif(NOT CLR_CMAKE_HOST_ARCH_ARM AND NOT CLR_CMAKE_HOST_ARCH_ARM64) endif (CLR_CMAKE_TARGET_WIN32) + +add_library_clr(cee_wks OBJECT ${VM_SOURCES_WKS_SPECIAL} $ ${VM_WKS_ARCH_ASM_OBJECTS}) +add_library_clr(cee_wks_mergeable OBJECT ${VM_SOURCES_WKS_SPECIAL} $ ${VM_WKS_ARCH_ASM_OBJECTS}) + +add_custom_target(preprocessd_asm DEPENDS ${VM_WKS_ARCH_ASM_OBJECTS}) +add_dependencies(cee_wks preprocessd_asm) +add_dependencies(cee_wks_mergeable preprocessd_asm) + +target_precompile_header(TARGET cee_wks HEADER common.h) +target_precompile_header(TARGET cee_wks_mergeable HEADER common.h) + +target_compile_definitions(cee_wks_mergeable PUBLIC FEATURE_MERGE_JIT_AND_ENGINE) +target_compile_definitions(cee_wks_mergeable PUBLIC CORECLR_EMBEDDED) diff --git a/src/coreclr/src/vm/wrappers.h b/src/coreclr/src/vm/wrappers.h index 4599cd7142a2..e665b56003a6 100644 --- a/src/coreclr/src/vm/wrappers.h +++ b/src/coreclr/src/vm/wrappers.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #ifndef _WRAPPERS_H_ diff --git a/src/coreclr/src/vm/yieldprocessornormalized.cpp b/src/coreclr/src/vm/yieldprocessornormalized.cpp index 33fe1134147f..98a7f5f3e0ec 100644 --- a/src/coreclr/src/vm/yieldprocessornormalized.cpp +++ b/src/coreclr/src/vm/yieldprocessornormalized.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" diff --git a/src/coreclr/src/vm/zapsig.cpp b/src/coreclr/src/vm/zapsig.cpp index dc7a0048896f..e6a2dad94e2d 100644 --- a/src/coreclr/src/vm/zapsig.cpp +++ b/src/coreclr/src/vm/zapsig.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // =========================================================================== // File: zapsig.cpp // diff --git a/src/coreclr/src/vm/zapsig.h b/src/coreclr/src/vm/zapsig.h index f218db2cbbeb..8ef3e60f4316 100644 --- a/src/coreclr/src/vm/zapsig.h +++ b/src/coreclr/src/vm/zapsig.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // --------------------------------------------------------------------------- // zapsig.h diff --git a/src/coreclr/src/zap/common.h b/src/coreclr/src/zap/common.h index 1b132908aa84..beb744e3f915 100644 --- a/src/coreclr/src/zap/common.h +++ b/src/coreclr/src/zap/common.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //***************************************************************************** // common.h // diff --git a/src/coreclr/src/zap/nativeformatwriter.cpp b/src/coreclr/src/zap/nativeformatwriter.cpp index 7428fc52576b..91de65738571 100644 --- a/src/coreclr/src/zap/nativeformatwriter.cpp +++ b/src/coreclr/src/zap/nativeformatwriter.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // --------------------------------------------------------------------------- // NativeFormatWriter diff --git a/src/coreclr/src/zap/nativeformatwriter.h b/src/coreclr/src/zap/nativeformatwriter.h index 99db10d21059..3d8752f0be05 100644 --- a/src/coreclr/src/zap/nativeformatwriter.h +++ b/src/coreclr/src/zap/nativeformatwriter.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // --------------------------------------------------------------------------- // NativeFormatWriter diff --git a/src/coreclr/src/zap/svcworker.cpp b/src/coreclr/src/zap/svcworker.cpp index 079fa3f768f4..78f7b4f9eefd 100644 --- a/src/coreclr/src/zap/svcworker.cpp +++ b/src/coreclr/src/zap/svcworker.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /********************************************************************** @@ -25,11 +24,6 @@ NGenWorkerEmbedding() -- called when COM invoked the COM server with #include "common.h" - -#ifdef FEATURE_APPX -#include "AppXUtil.h" -#endif - ILocalServerLifetime *g_pLocalServerLifetime = NULL; SvcLogger::SvcLogger() diff --git a/src/coreclr/src/zap/zapcode.cpp b/src/coreclr/src/zap/zapcode.cpp index c1fefd912041..039ed6763555 100644 --- a/src/coreclr/src/zap/zapcode.cpp +++ b/src/coreclr/src/zap/zapcode.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ZapCode.cpp // diff --git a/src/coreclr/src/zap/zapcode.h b/src/coreclr/src/zap/zapcode.h index 6a1ad86f76a9..c75025c392c8 100644 --- a/src/coreclr/src/zap/zapcode.h +++ b/src/coreclr/src/zap/zapcode.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ZapCode.h // diff --git a/src/coreclr/src/zap/zapheaders.cpp b/src/coreclr/src/zap/zapheaders.cpp index 068c7d3176bd..f416e5a2884a 100644 --- a/src/coreclr/src/zap/zapheaders.cpp +++ b/src/coreclr/src/zap/zapheaders.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ZapHeaders.cpp // diff --git a/src/coreclr/src/zap/zapheaders.h b/src/coreclr/src/zap/zapheaders.h index 4b6994d574fa..07a0c7758f20 100644 --- a/src/coreclr/src/zap/zapheaders.h +++ b/src/coreclr/src/zap/zapheaders.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ZapHeaders.h // diff --git a/src/coreclr/src/zap/zapimage.cpp b/src/coreclr/src/zap/zapimage.cpp index e4ab0b94ef4b..bcd02a3b2c42 100644 --- a/src/coreclr/src/zap/zapimage.cpp +++ b/src/coreclr/src/zap/zapimage.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ZapImage.cpp // diff --git a/src/coreclr/src/zap/zapimage.h b/src/coreclr/src/zap/zapimage.h index 68b833bd0f44..10705b98e365 100644 --- a/src/coreclr/src/zap/zapimage.h +++ b/src/coreclr/src/zap/zapimage.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ZapImage.h // diff --git a/src/coreclr/src/zap/zapimport.cpp b/src/coreclr/src/zap/zapimport.cpp index 6c76fa7faca4..a492f287bef9 100644 --- a/src/coreclr/src/zap/zapimport.cpp +++ b/src/coreclr/src/zap/zapimport.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ZapImport.cpp // @@ -1780,7 +1779,7 @@ void ZapImportSectionSignatures::PlaceDynamicHelperCell(ZapImport * pImport) m_pImage->GetImportTable()->PlaceImportBlob(pCell); } -ZapImport * ZapImportTable::GetDictionaryLookupCell(CORCOMPILE_FIXUP_BLOB_KIND kind, CORINFO_RESOLVED_TOKEN * pResolvedToken, CORINFO_LOOKUP_KIND * pLookup) +ZapImport * ZapImportTable::GetDictionaryLookupCell(CORCOMPILE_FIXUP_BLOB_KIND kind, CORINFO_METHOD_HANDLE containingMethod, CORINFO_RESOLVED_TOKEN * pResolvedToken, CORINFO_LOOKUP_KIND * pLookup) { _ASSERTE(pLookup->needsRuntimeLookup); @@ -1790,7 +1789,7 @@ ZapImport * ZapImportTable::GetDictionaryLookupCell(CORCOMPILE_FIXUP_BLOB_KIND k if ((kind & ~CORINFO_HELP_READYTORUN_ATYPICAL_CALLSITE) == ENCODE_DICTIONARY_LOOKUP_THISOBJ) { - CORINFO_CLASS_HANDLE hClassContext = GetJitInfo()->getMethodClass(pResolvedToken->tokenContext); + CORINFO_CLASS_HANDLE hClassContext = GetJitInfo()->getMethodClass(containingMethod); GetCompileInfo()->EncodeClass(m_pImage->GetModuleHandle(), hClassContext, &sigBuilder, this, EncodeModuleHelper); } @@ -1843,9 +1842,7 @@ ZapImport * ZapImportTable::GetDictionaryLookupCell(CORCOMPILE_FIXUP_BLOB_KIND k ThrowHR(E_NOTIMPL); } - _ASSERTE(((DWORD)(SIZE_T)pResolvedToken->tokenContext & 1) == 0); - - return GetImportForSignature((void*)pResolvedToken->tokenContext, &sigBuilder); + return GetImportForSignature((void*)containingMethod, &sigBuilder); } ZapImport * ZapImportTable::GetDynamicHelperCell(CORCOMPILE_FIXUP_BLOB_KIND kind, CORINFO_CLASS_HANDLE handle) diff --git a/src/coreclr/src/zap/zapimport.h b/src/coreclr/src/zap/zapimport.h index 5bf16085c046..ea8f506862e0 100644 --- a/src/coreclr/src/zap/zapimport.h +++ b/src/coreclr/src/zap/zapimport.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ZapImport.h // @@ -433,7 +432,7 @@ class ZapImportTable ZapImport * GetDynamicHelperCell(CORCOMPILE_FIXUP_BLOB_KIND kind, CORINFO_METHOD_HANDLE handle, CORINFO_RESOLVED_TOKEN * pResolvedToken, CORINFO_CLASS_HANDLE delegateType = NULL); ZapImport * GetDynamicHelperCell(CORCOMPILE_FIXUP_BLOB_KIND kind, CORINFO_FIELD_HANDLE handle, CORINFO_RESOLVED_TOKEN * pResolvedToken); - ZapImport * GetDictionaryLookupCell(CORCOMPILE_FIXUP_BLOB_KIND kind, CORINFO_RESOLVED_TOKEN * pResolvedToken, CORINFO_LOOKUP_KIND * pLookup); + ZapImport * GetDictionaryLookupCell(CORCOMPILE_FIXUP_BLOB_KIND kind, CORINFO_METHOD_HANDLE containingMethod, CORINFO_RESOLVED_TOKEN * pResolvedToken, CORINFO_LOOKUP_KIND * pLookup); #ifdef FEATURE_READYTORUN_COMPILER ZapNode * GetPlacedIndirectHelperThunk(ReadyToRunHelper helperNum, PVOID pArg = NULL, ZapNode * pCell = NULL); diff --git a/src/coreclr/src/zap/zapinfo.cpp b/src/coreclr/src/zap/zapinfo.cpp index e413b9a37e15..310c0b93cb05 100644 --- a/src/coreclr/src/zap/zapinfo.cpp +++ b/src/coreclr/src/zap/zapinfo.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ZapInfo.cpp // @@ -2147,10 +2146,16 @@ DWORD FilterNamedIntrinsicMethodAttribs(ZapInfo* pZapInfo, DWORD attribs, CORINF // is because they often change the code they emit based on what ISAs are supported by the compiler, // but we don't know what the target machine will support. // - // Additionally, we make sure none of the hardware intrinsic method bodies get pregenerated in crossgen + // Additionally, we make sure none of the hardware intrinsic method bodies (except ARM64) get pregenerated in crossgen // (see ZapInfo::CompileMethod) but get JITted instead. The JITted method will have the correct // answer for the CPU the code is running on. - fTreatAsRegularMethodCall = (fIsGetIsSupportedMethod && fIsPlatformHWIntrinsic) || (!fIsPlatformHWIntrinsic && fIsHWIntrinsic); + + // For Arm64, AdvSimd/ArmBase is the baseline that is suported and hence we do pregenerate the method bodies + // of ARM64 harware intrinsic. + fTreatAsRegularMethodCall = (fIsGetIsSupportedMethod && fIsPlatformHWIntrinsic); +#if !defined(TARGET_ARM64) + fTreatAsRegularMethodCall |= (!fIsPlatformHWIntrinsic && fIsHWIntrinsic); +#endif if (fIsPlatformHWIntrinsic) { @@ -3330,10 +3335,9 @@ BOOL ZapInfo::isStructRequiringStackAllocRetBuf(CORINFO_CLASS_HANDLE cls) CorInfoInitClassResult ZapInfo::initClass( CORINFO_FIELD_HANDLE field, CORINFO_METHOD_HANDLE method, - CORINFO_CONTEXT_HANDLE context, - BOOL speculative) + CORINFO_CONTEXT_HANDLE context) { - return m_pEEJitInfo->initClass(field, method, context, speculative); + return m_pEEJitInfo->initClass(field, method, context); } void ZapInfo::classMustBeLoadedBeforeCodeIsRun(CORINFO_CLASS_HANDLE cls) @@ -3725,18 +3729,18 @@ bool ZapInfo::getReadyToRunHelper(CORINFO_RESOLVED_TOKEN * pResolvedToken, if (pGenericLookupKind->runtimeLookupKind == CORINFO_LOOKUP_METHODPARAM) { pImport = m_pImage->GetImportTable()->GetDictionaryLookupCell( - (CORCOMPILE_FIXUP_BLOB_KIND)(ENCODE_DICTIONARY_LOOKUP_METHOD | fAtypicalCallsite), pResolvedToken, pGenericLookupKind); + (CORCOMPILE_FIXUP_BLOB_KIND)(ENCODE_DICTIONARY_LOOKUP_METHOD | fAtypicalCallsite), m_currentMethodHandle, pResolvedToken, pGenericLookupKind); } else if (pGenericLookupKind->runtimeLookupKind == CORINFO_LOOKUP_THISOBJ) { pImport = m_pImage->GetImportTable()->GetDictionaryLookupCell( - (CORCOMPILE_FIXUP_BLOB_KIND)(ENCODE_DICTIONARY_LOOKUP_THISOBJ | fAtypicalCallsite), pResolvedToken, pGenericLookupKind); + (CORCOMPILE_FIXUP_BLOB_KIND)(ENCODE_DICTIONARY_LOOKUP_THISOBJ | fAtypicalCallsite), m_currentMethodHandle, pResolvedToken, pGenericLookupKind); } else { _ASSERTE(pGenericLookupKind->runtimeLookupKind == CORINFO_LOOKUP_CLASSPARAM); pImport = m_pImage->GetImportTable()->GetDictionaryLookupCell( - (CORCOMPILE_FIXUP_BLOB_KIND)(ENCODE_DICTIONARY_LOOKUP_TYPE | fAtypicalCallsite), pResolvedToken, pGenericLookupKind); + (CORCOMPILE_FIXUP_BLOB_KIND)(ENCODE_DICTIONARY_LOOKUP_TYPE | fAtypicalCallsite), m_currentMethodHandle, pResolvedToken, pGenericLookupKind); } break; diff --git a/src/coreclr/src/zap/zapinfo.h b/src/coreclr/src/zap/zapinfo.h index 50e8b66f35bc..3a44d2e7c0b5 100644 --- a/src/coreclr/src/zap/zapinfo.h +++ b/src/coreclr/src/zap/zapinfo.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ZapInfo.h // @@ -565,8 +564,7 @@ class ZapInfo CorInfoInitClassResult initClass( CORINFO_FIELD_HANDLE field, CORINFO_METHOD_HANDLE method, - CORINFO_CONTEXT_HANDLE context, - BOOL speculative = FALSE); + CORINFO_CONTEXT_HANDLE context); void classMustBeLoadedBeforeCodeIsRun(CORINFO_CLASS_HANDLE cls); void methodMustBeLoadedBeforeCodeIsRun(CORINFO_METHOD_HANDLE meth); diff --git a/src/coreclr/src/zap/zapinnerptr.cpp b/src/coreclr/src/zap/zapinnerptr.cpp index fe0124d9c98b..ec8baec4fa88 100644 --- a/src/coreclr/src/zap/zapinnerptr.cpp +++ b/src/coreclr/src/zap/zapinnerptr.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ZapInnerPtr.h // diff --git a/src/coreclr/src/zap/zapinnerptr.h b/src/coreclr/src/zap/zapinnerptr.h index 354945b9dbc4..7c3ef0aa6c8c 100644 --- a/src/coreclr/src/zap/zapinnerptr.h +++ b/src/coreclr/src/zap/zapinnerptr.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ZapInnerPtr.h // diff --git a/src/coreclr/src/zap/zaplog.h b/src/coreclr/src/zap/zaplog.h index 2f3cf32bdf9b..e07cb29e51e3 100644 --- a/src/coreclr/src/zap/zaplog.h +++ b/src/coreclr/src/zap/zaplog.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* diff --git a/src/coreclr/src/zap/zapmetadata.cpp b/src/coreclr/src/zap/zapmetadata.cpp index d5b9b7253bc6..2e7c3dc570e1 100644 --- a/src/coreclr/src/zap/zapmetadata.cpp +++ b/src/coreclr/src/zap/zapmetadata.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ZapMetadata.cpp // diff --git a/src/coreclr/src/zap/zapmetadata.h b/src/coreclr/src/zap/zapmetadata.h index d5789c2ba728..c23774cffb1f 100644 --- a/src/coreclr/src/zap/zapmetadata.h +++ b/src/coreclr/src/zap/zapmetadata.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ZapMetadata.h // diff --git a/src/coreclr/src/zap/zapnodetype.h b/src/coreclr/src/zap/zapnodetype.h index 08ddd6617cdf..6f73833eb841 100644 --- a/src/coreclr/src/zap/zapnodetype.h +++ b/src/coreclr/src/zap/zapnodetype.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ZapNoteType.h // diff --git a/src/coreclr/src/zap/zapper.cpp b/src/coreclr/src/zap/zapper.cpp index 4bc8e51e97e3..5b999a82f0e6 100644 --- a/src/coreclr/src/zap/zapper.cpp +++ b/src/coreclr/src/zap/zapper.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #include "common.h" diff --git a/src/coreclr/src/zap/zapperstats.cpp b/src/coreclr/src/zap/zapperstats.cpp index b7d593393c7f..9379cd392399 100644 --- a/src/coreclr/src/zap/zapperstats.cpp +++ b/src/coreclr/src/zap/zapperstats.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* diff --git a/src/coreclr/src/zap/zapperstats.h b/src/coreclr/src/zap/zapperstats.h index 5ac43a4d5a7a..585b1bdd0e28 100644 --- a/src/coreclr/src/zap/zapperstats.h +++ b/src/coreclr/src/zap/zapperstats.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /* diff --git a/src/coreclr/src/zap/zapreadytorun.cpp b/src/coreclr/src/zap/zapreadytorun.cpp index 804bc90978c7..27d79b3121d3 100644 --- a/src/coreclr/src/zap/zapreadytorun.cpp +++ b/src/coreclr/src/zap/zapreadytorun.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ZapReadyToRun.cpp // @@ -844,6 +843,9 @@ static_assert_no_msg((int)READYTORUN_FIXUP_PInvokeTarget == (int)ENC static_assert_no_msg((int)READYTORUN_FIXUP_Check_InstructionSetSupport== (int)ENCODE_CHECK_INSTRUCTION_SET_SUPPORT); +static_assert_no_msg((int)READYTORUN_FIXUP_Verify_FieldOffset == (int)ENCODE_VERIFY_FIELD_OFFSET); +static_assert_no_msg((int)READYTORUN_FIXUP_Verify_TypeLayout == (int)ENCODE_VERIFY_TYPE_LAYOUT); + // // READYTORUN_EXCEPTION // diff --git a/src/coreclr/src/zap/zapreadytorun.h b/src/coreclr/src/zap/zapreadytorun.h index 8e1eab61a457..66fe3adb391a 100644 --- a/src/coreclr/src/zap/zapreadytorun.h +++ b/src/coreclr/src/zap/zapreadytorun.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ZapReadyToRun.h // diff --git a/src/coreclr/src/zap/zaprelocs.cpp b/src/coreclr/src/zap/zaprelocs.cpp index e9207ab072a1..028a30e0154b 100644 --- a/src/coreclr/src/zap/zaprelocs.cpp +++ b/src/coreclr/src/zap/zaprelocs.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ZapRelocs.cpp // diff --git a/src/coreclr/src/zap/zaprelocs.h b/src/coreclr/src/zap/zaprelocs.h index 25f46a9fe493..9b06450e8c8f 100644 --- a/src/coreclr/src/zap/zaprelocs.h +++ b/src/coreclr/src/zap/zaprelocs.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ZapRelocs.h // diff --git a/src/coreclr/src/zap/zapwrapper.cpp b/src/coreclr/src/zap/zapwrapper.cpp index a231053d7293..b9dc87c8a0af 100644 --- a/src/coreclr/src/zap/zapwrapper.cpp +++ b/src/coreclr/src/zap/zapwrapper.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ZapWrapper.cpp // diff --git a/src/coreclr/src/zap/zapwrapper.h b/src/coreclr/src/zap/zapwrapper.h index c1c46dcb40b4..ea914da74971 100644 --- a/src/coreclr/src/zap/zapwrapper.h +++ b/src/coreclr/src/zap/zapwrapper.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ZapWrapper.h // diff --git a/src/coreclr/src/zap/zapwriter.cpp b/src/coreclr/src/zap/zapwriter.cpp index 6d03176b6b0e..4642c2af698a 100644 --- a/src/coreclr/src/zap/zapwriter.cpp +++ b/src/coreclr/src/zap/zapwriter.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ZapWriter.cpp // diff --git a/src/coreclr/src/zap/zapwriter.h b/src/coreclr/src/zap/zapwriter.h index 10542476bf23..295a38ade395 100644 --- a/src/coreclr/src/zap/zapwriter.h +++ b/src/coreclr/src/zap/zapwriter.h @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // ZapWriter.h // diff --git a/src/coreclr/tests/CMakeLists.txt b/src/coreclr/tests/CMakeLists.txt deleted file mode 100644 index 75beaaf36ae5..000000000000 --- a/src/coreclr/tests/CMakeLists.txt +++ /dev/null @@ -1,55 +0,0 @@ -cmake_minimum_required(VERSION 3.14.5) - -cmake_policy(SET CMP0042 NEW) -project(Tests) - -include(${CLR_ENG_NATIVE_DIR}/configurecompiler.cmake) - -set(INC_PLATFORM_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/Common/Platform) -if (CLR_CMAKE_TARGET_WIN32) - add_definitions(-DWINDOWS) -endif() - -# Compile options - -if (CLR_CMAKE_HOST_WIN32) - # 4100 - unreferenced formal parameter - # 4514 - unreferenced inline function has been removed - # 4625 - copy constructor was implicitly defined as deleted because a base class copy constructor is inaccessible or deleted - # 4626 - assignment operator was implicitly defined as deleted because a base class assignment operator is inaccessible or deleted - # 4668 - 'symbol' is not defined as a preprocessor macro, replacing with '0' for 'directives' - # 4710 - function not inlined - # 4711 - 'function' selected for inline expansion - # 4774 - format string expected in argument number is not a string literal - # 4820 - bytes padding added after construct 'member_name' - # 5025 - move assignment operator was implicitly defined as deleted - # 5026 - move constructor was implicitly defined as deleted - # 5027 - move assignment operator was implicitly defined as deleted - # 5039 - pointer or reference to potentially throwing function passed to extern C function under -EHc. Undefined behavior may occur if this function throws an exception. - add_compile_options(-wd4100 -wd4514 -wd4625 -wd4626 -wd4668 -wd4710 -wd4711 -wd4774 -wd4820 -wd5025 -wd5026 -wd5027 -wd5039) - add_compile_options(/EHa) # enable C++ EH (w/ SEH exceptions) -endif() - -MACRO(SUBDIRLIST result curdir) - FILE(GLOB children RELATIVE ${curdir} ${curdir}/*) - SET(dirlist "") - FOREACH(child ${children}) - IF(IS_DIRECTORY ${curdir}/${child}) - LIST(APPEND dirlist ${child}) - ENDIF() - ENDFOREACH() - SET(${result} ${dirlist}) -ENDMACRO() - -MACRO(ADDSUBDIR_REC curdir) - SUBDIRLIST(SUB_DIRS ${curdir}) - FOREACH(subdir ${SUB_DIRS}) - if(EXISTS "${curdir}/${subdir}/CMakeLists.txt") - ADD_SUBDIRECTORY(${curdir}/${subdir}) - else() - ADDSUBDIR_REC(${curdir}/${subdir}) - endif(EXISTS "${curdir}/${subdir}/CMakeLists.txt") - ENDFOREACH() -ENDMACRO() - -ADDSUBDIR_REC(${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/src/coreclr/tests/Directory.Build.props b/src/coreclr/tests/Directory.Build.props index bfdb2b3a84ec..ce06d5d9a27f 100644 --- a/src/coreclr/tests/Directory.Build.props +++ b/src/coreclr/tests/Directory.Build.props @@ -10,7 +10,7 @@ $(MSBuildThisFileDirectory) - $(MSBuildThisFileDirectory)src\ + $([MSBuild]::NormalizePath('$(RepoRoot)/src/tests/')) diff --git a/src/coreclr/tests/build.proj b/src/coreclr/tests/build.proj index f09deee581fd..424cd2567539 100644 --- a/src/coreclr/tests/build.proj +++ b/src/coreclr/tests/build.proj @@ -20,7 +20,7 @@ - + diff --git a/src/coreclr/tests/dir.common.props b/src/coreclr/tests/dir.common.props index 4fadf00b8327..a8716b8690fe 100644 --- a/src/coreclr/tests/dir.common.props +++ b/src/coreclr/tests/dir.common.props @@ -12,7 +12,7 @@ $(TargetOS).$(TargetArchitecture).$(Configuration) - $(MSBuildThisFileDirectory)src + $(RepoRoot)src\tests $([MSBuild]::MakeRelative($(TestSrcDir), $(MSBuildProjectDirectory)))\$(MSBuildProjectName)\ @@ -145,24 +148,6 @@ needs triage - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - needs triage @@ -308,12 +293,6 @@ needs triage - - https://github.com/dotnet/runtime/issues/10672 - - - https://github.com/dotnet/runtime/issues/10711 - needs triage @@ -323,15 +302,9 @@ needs triage - - https://github.com/dotnet/runtime/issues/36418 - https://github.com/dotnet/runtime/issues/12216 - - https://github.com/dotnet/runtime/issues/13355 - @@ -572,6 +545,9 @@ https://github.com/dotnet/runtime/issues/12979 + + https://github.com/dotnet/runtime/issues/36681 + https://github.com/dotnet/runtime/issues/12979 @@ -695,6 +671,9 @@ https://github.com/dotnet/runtime/issues/10001 + + https://github.com/dotnet/runtime/issues/38799 + @@ -904,6 +883,42 @@ https://github.com/dotnet/runtime/issues/33887 + + https://github.com/dotnet/runtime/issues/38291 + + + https://github.com/dotnet/runtime/issues/38291 + + + https://github.com/dotnet/runtime/issues/38291 + + + https://github.com/dotnet/runtime/issues/38291 + + + https://github.com/dotnet/runtime/issues/38291 + + + https://github.com/dotnet/runtime/issues/38096 + + + https://github.com/dotnet/runtime/issues/38096 + + + https://github.com/dotnet/runtime/issues/38096 + + + https://github.com/dotnet/runtime/issues/38096 + + + https://github.com/dotnet/runtime/issues/38096 + + + https://github.com/dotnet/runtime/issues/38096 + + + https://github.com/dotnet/runtime/issues/38260 + https://github.com/dotnet/runtime/issues/32725 @@ -916,6 +931,12 @@ Not compatible with crossgen2 + + https://github.com/dotnet/runtime/issues/32732 + + + https://github.com/dotnet/runtime/issues/38259 + https://github.com/dotnet/runtime/issues/615 @@ -937,6 +958,15 @@ https://github.com/dotnet/runtime/issues/34905 + + https://github.com/dotnet/runtime/issues/38290 + + + https://github.com/dotnet/runtime/issues/38290 + + + https://github.com/dotnet/runtime/issues/38260 + https://github.com/dotnet/runtime/issues/32728 @@ -963,6 +993,9 @@ needs triage + + needs triage + needs triage @@ -1410,6 +1443,9 @@ needs triage + + needs triage + needs triage @@ -1479,8 +1515,8 @@ needs triage - - needs triage + + https://github.com/dotnet/runtime/issues/37509 needs triage @@ -1526,6 +1562,9 @@ needs triage + + needs triage + needs triage @@ -1592,6 +1631,9 @@ needs triage + + needs triage + needs triage @@ -1811,43 +1853,42 @@ needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - + + needs triage + + + needs triage + + + needs triage + + + needs triage + + + needs triage + + + needs triage + + + needs triage + + + needs triage + + + needs triage + + + needs triage + + + needs triage + + + needs triage + @@ -2584,6 +2625,24 @@ needs triage + + needs triage + + + needs triage + + + needs triage + + + needs triage + + + needs triage + + + needs triage + needs triage diff --git a/src/coreclr/tests/publishdependency.targets b/src/coreclr/tests/publishdependency.targets index bdef4ffa0c6d..1442ad037d94 100644 --- a/src/coreclr/tests/publishdependency.targets +++ b/src/coreclr/tests/publishdependency.targets @@ -16,7 +16,7 @@ - + diff --git a/src/coreclr/tests/runtest.py b/src/coreclr/tests/runtest.py index e5ef2b0528ed..5914b332f8b8 100755 --- a/src/coreclr/tests/runtest.py +++ b/src/coreclr/tests/runtest.py @@ -2,7 +2,6 @@ # ## Licensed to the .NET Foundation under one or more agreements. ## The .NET Foundation licenses this file to you under the MIT license. -## See the LICENSE file in the project root for more information. # ## # Title: runtest.py diff --git a/src/coreclr/tests/runtest.sh b/src/coreclr/tests/runtest.sh index 857cda101202..a157f601724a 100755 --- a/src/coreclr/tests/runtest.sh +++ b/src/coreclr/tests/runtest.sh @@ -73,11 +73,15 @@ function check_cpu_architecture { local CPUName=$(uname -m) local __arch= + if [[ "$(uname -s)" == "SunOS" ]]; then + CPUName=$(isainfo -n) + fi + case $CPUName in i686) __arch=x86 ;; - x86_64) + amd64|x86_64) __arch=x64 ;; armv7l) diff --git a/src/coreclr/tests/scripts/crossgen_comparison.py b/src/coreclr/tests/scripts/crossgen_comparison.py index 42d7c610ba9c..68a67ff72fbf 100644 --- a/src/coreclr/tests/scripts/crossgen_comparison.py +++ b/src/coreclr/tests/scripts/crossgen_comparison.py @@ -2,7 +2,6 @@ # # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. # ################################################################################ # @@ -815,4 +814,4 @@ def compare_results(args): end = datetime.datetime.now() elapsed = end - start - print("Elapsed time: {}".format(elapsed.total_seconds())) \ No newline at end of file + print("Elapsed time: {}".format(elapsed.total_seconds())) diff --git a/src/coreclr/tests/scripts/exclusion.py b/src/coreclr/tests/scripts/exclusion.py index 87ea48521e9a..e73d21166cf5 100644 --- a/src/coreclr/tests/scripts/exclusion.py +++ b/src/coreclr/tests/scripts/exclusion.py @@ -2,7 +2,6 @@ # ## Licensed to the .NET Foundation under one or more agreements. ## The .NET Foundation licenses this file to you under the MIT license. -## See the LICENSE file in the project root for more information. # ## # Title :exclusion.py diff --git a/src/coreclr/tests/scripts/format.py b/src/coreclr/tests/scripts/format.py index c25e904f3328..2f2b4cf872f5 100644 --- a/src/coreclr/tests/scripts/format.py +++ b/src/coreclr/tests/scripts/format.py @@ -2,7 +2,6 @@ # ## Licensed to the .NET Foundation under one or more agreements. ## The .NET Foundation licenses this file to you under the MIT license. -## See the LICENSE file in the project root for more information. # ## # Title :format.py diff --git a/src/coreclr/tests/scripts/lst_creator.py b/src/coreclr/tests/scripts/lst_creator.py index 4db689a98260..211872df572b 100755 --- a/src/coreclr/tests/scripts/lst_creator.py +++ b/src/coreclr/tests/scripts/lst_creator.py @@ -2,7 +2,6 @@ # ## Licensed to the .NET Foundation under one or more agreements. ## The .NET Foundation licenses this file to you under the MIT license. -## See the LICENSE file in the project root for more information. # ## # Title :lst_creator.py diff --git a/src/coreclr/tests/scripts/migrate-tags.py b/src/coreclr/tests/scripts/migrate-tags.py index 77223a378ef8..6cf6985b598a 100644 --- a/src/coreclr/tests/scripts/migrate-tags.py +++ b/src/coreclr/tests/scripts/migrate-tags.py @@ -2,7 +2,6 @@ # ## Licensed to the .NET Foundation under one or more agreements. ## The .NET Foundation licenses this file to you under the MIT license. -## See the LICENSE file in the project root for more information. # ## # Title :migrate-tags.py diff --git a/src/coreclr/tests/scripts/run-corefx-tests.py b/src/coreclr/tests/scripts/run-corefx-tests.py index 2207d55aa17c..886bbc513ab1 100644 --- a/src/coreclr/tests/scripts/run-corefx-tests.py +++ b/src/coreclr/tests/scripts/run-corefx-tests.py @@ -2,7 +2,6 @@ # # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. # ########################################################################## ########################################################################## diff --git a/src/coreclr/tests/scripts/run-gc-reliability-framework.cmd b/src/coreclr/tests/scripts/run-gc-reliability-framework.cmd index 6d9dd984b6fc..3d3e699213ee 100644 --- a/src/coreclr/tests/scripts/run-gc-reliability-framework.cmd +++ b/src/coreclr/tests/scripts/run-gc-reliability-framework.cmd @@ -1,6 +1,5 @@ @rem Licensed to the .NET Foundation under one or more agreements. @rem The .NET Foundation licenses this file to you under the MIT license. -@rem See the LICENSE file in the project root for more information. @echo off diff --git a/src/coreclr/tests/scripts/run-pmi-diffs.py b/src/coreclr/tests/scripts/run-pmi-diffs.py index 2f1024df5d9f..30f92686c6c9 100755 --- a/src/coreclr/tests/scripts/run-pmi-diffs.py +++ b/src/coreclr/tests/scripts/run-pmi-diffs.py @@ -2,7 +2,6 @@ # # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. # ## # Title :run-pmi-diffs.py diff --git a/src/coreclr/tests/scripts/smarty_error_parser.py b/src/coreclr/tests/scripts/smarty_error_parser.py index cc66e1aacbb2..48a8d393e7af 100644 --- a/src/coreclr/tests/scripts/smarty_error_parser.py +++ b/src/coreclr/tests/scripts/smarty_error_parser.py @@ -2,7 +2,6 @@ # ## Licensed to the .NET Foundation under one or more agreements. ## The .NET Foundation licenses this file to you under the MIT license. -## See the LICENSE file in the project root for more information. # ## # Title :smarty_error_parser.py diff --git a/src/coreclr/tests/scripts/smarty_parser.py b/src/coreclr/tests/scripts/smarty_parser.py index 40f2a500d45f..d9441fc37604 100644 --- a/src/coreclr/tests/scripts/smarty_parser.py +++ b/src/coreclr/tests/scripts/smarty_parser.py @@ -2,7 +2,6 @@ # ## Licensed to the .NET Foundation under one or more agreements. ## The .NET Foundation licenses this file to you under the MIT license. -## See the LICENSE file in the project root for more information. # ## # Title :smarty_parser.py diff --git a/src/coreclr/tests/setup-stress-dependencies.sh b/src/coreclr/tests/setup-stress-dependencies.sh index 925c62cbb405..d54f5c640c99 100755 --- a/src/coreclr/tests/setup-stress-dependencies.sh +++ b/src/coreclr/tests/setup-stress-dependencies.sh @@ -16,7 +16,7 @@ function print_usage { echo '' echo 'Command line:' echo '' - echo './setup-gcstress.sh --arch= --outputDir=' + echo './setup-stress-dependencies.sh --arch= --outputDir=' echo '' echo 'Required arguments:' echo ' --arch= : Target arch for the build' diff --git a/src/coreclr/tests/src/CLRTest.CrossGen.targets b/src/coreclr/tests/src/CLRTest.CrossGen.targets index e5b1da870e4f..a11043761403 100644 --- a/src/coreclr/tests/src/CLRTest.CrossGen.targets +++ b/src/coreclr/tests/src/CLRTest.CrossGen.targets @@ -72,55 +72,68 @@ if [ ! -z ${RunCrossGen2+x} ]%3B then fi fi - __OutputFile="$PWD/" - if [ ! -z ${CompositeBuildMode+x} ]%3B then - __OutputFile+="composite-r2r.dll" - else - __OutputFile+="$(MSBuildProjectName).dll" + if [ ! -z ${LargeVersionBubble+x} ]%3B then + ExtraCrossGen2Args+=" --inputbubble" fi - __ResponseFile="$__OutputFile.rsp" - rm $__ResponseFile + __cg2ExitCode=0 - __Command=$_DebuggerFullPath - # Tests run locally need __TestDotNetCmd (set by runtest.py) or a compatible 5.0 dotnet runtime in the path - if [ ! -z ${__TestDotNetCmd+x} ] %3B then - __Command+=" $__TestDotNetCmd" - else - __Command+=" dotnet" - fi - __Command+=" $CORE_ROOT/crossgen2/crossgen2.dll" - __Command+=" @$__ResponseFile" - __Command+=" $ExtraCrossGen2Args" + OneFileCrossgen2() { + __OutputFile=$1 + + __ResponseFile="$__OutputFile.rsp" + rm $__ResponseFile + + __Command=$_DebuggerFullPath + # Tests run locally need __TestDotNetCmd (set by runtest.py) or a compatible 5.0 dotnet runtime in the path + if [ ! -z ${__TestDotNetCmd+x} ] %3B then + __Command+=" $__TestDotNetCmd" + else + __Command+=" dotnet" + fi + __Command+=" $CORE_ROOT/crossgen2/crossgen2.dll" + __Command+=" @$__ResponseFile" + __Command+=" $ExtraCrossGen2Args" + + echo $2 >> $__ResponseFile + + echo -o:$__OutputFile>>$__ResponseFile + echo -r:$CORE_ROOT/System.*.dll>>$__ResponseFile + echo -r:$CORE_ROOT/Microsoft.*.dll>>$__ResponseFile + echo -r:$CORE_ROOT/mscorlib.dll>>$__ResponseFile + echo --targetarch:$(TargetArchitecture)>>$__ResponseFile + echo -O>>$__ResponseFile + + echo "Response file: $__ResponseFile" + cat $__ResponseFile + echo "Running CrossGen2: $__Command" + $__Command + __cg2ExitCode=$? + } if [ ! -z ${CompositeBuildMode+x} ]%3B then - echo --composite>>$__ResponseFile - echo $PWD/IL/*.dll>>$__ResponseFile + ExtraCrossGen2Args+= --composite + OneFileCrossgen2 "$PWD/composite-r2r.dll" "$PWD/IL/*.dll" else - echo --inputbubble>>$__ResponseFile - echo $PWD/IL/$(MSBuildProjectName).dll>>$__ResponseFile - echo -r:$PWD/IL/*.dll>>$__ResponseFile + ExtraCrossGen2Args+= -r:$PWD/IL/*.dll + for dllFile in $PWD/IL/*.dll + do + echo $dllFile + bareFileName="${dllFile##*/}" + OneFileCrossgen2 "$PWD/$bareFileName" "$dllFile" + if [ $__cg2ExitCode -ne 0 ]; then + break + fi + done fi - echo -o:$__OutputFile>>$__ResponseFile - echo -r:$CORE_ROOT/System.*.dll>>$__ResponseFile - echo -r:$CORE_ROOT/Microsoft.*.dll>>$__ResponseFile - echo -r:$CORE_ROOT/mscorlib.dll>>$__ResponseFile - echo --targetarch:$(TargetArchitecture)>>$__ResponseFile - echo -O>>$__ResponseFile - - echo "Response file: $__ResponseFile" - cat $__ResponseFile - echo "Running CrossGen2: $__Command" - $__Command - __cg2ExitCode=$? - if [ $__cg2ExitCode -ne 0 ] - then + if [ $__cg2ExitCode -ne 0 ]; then echo Crossgen2 failed with exitcode: $__cg2ExitCode ReleaseLock exit 1 fi + ReleaseLock fi ]]> @@ -161,7 +174,7 @@ if defined RunCrossGen ( ) REM CrossGen2 Script if defined RunCrossGen2 ( - if defined LargeVersionBubble ( set OptionalArguments=!OptionalArguments! /largeversionbubble) + if defined LargeVersionBubble ( set ExtraCrossGen2Args=!ExtraCrossGen2Args! --inputbubble) call :TakeLock set CrossGen2Status=0 if not exist "IL" ( @@ -169,16 +182,33 @@ if defined RunCrossGen2 ( if defined CompositeBuildMode ( copy *.dll IL\ ) else ( - copy $(MSBuildProjectName).dll IL\ + copy *.dll IL\ ) ) if defined CompositeBuildMode ( + set ExtraCrossGen2Args=!ExtraCrossGen2Args! --composite set __OutputFile=!scriptPath!\composite-r2r.dll + rem In composite mode, treat all dll's in the test folder as rooting inputs + set __InputFile=!scriptPath!IL\*.dll + call :CompileOneFileCrossgen2 + IF NOT !CrossGen2Status!==0 goto :DoneCrossgen2Operations ) else ( - set __OutputFile=!scriptPath!\$(MSBuildProjectName).dll + for %%I in (!scriptPath!\*.dll) do ( + set ExtraCrossGen2Args=!ExtraCrossGen2Args! -r:!scriptPath!IL\*.dll + set __OutputFile=!scriptPath!\%%~nI.dll + set __InputFile=!scriptPath!IL\%%~nI.dll + call :CompileOneFileCrossgen2 + IF NOT !CrossGen2Status!==0 ( + IF NOT !CrossGen2Status!==2 goto :DoneCrossgen2Operations + ) + rem Normalize return code 2, no valid input files, to success code + set CrossGen2Status=0 + ) ) + goto :DoneCrossgen2Operations +:CompileOneFileCrossgen2 set __ResponseFile=!__OutputFile!.rsp del /Q !__ResponseFile! @@ -192,17 +222,7 @@ if defined RunCrossGen2 ( set __Command=!__Command! "!CORE_ROOT!\crossgen2\crossgen2.dll" set __Command=!__Command! @"!__ResponseFile!" set __Command=!__Command! !ExtraCrossGen2Args! - - if defined CompositeBuildMode ( - echo --composite>>!__ResponseFile! - rem In composite mode, treat all dll's in the test folder as rooting inputs - echo !scriptPath!IL\*.dll>>!__ResponseFile! - ) else ( - echo --inputbubble>>!__ResponseFile! - echo !scriptPath!IL\$(MSBuildProjectName).dll>>!__ResponseFile! - echo -r:!scriptPath!IL\*.dll>>!__ResponseFile! - ) - + echo !__InputFile!>>!__ResponseFile! echo -o:!__OutputFile!>>!__ResponseFile! echo --targetarch:$(TargetArchitecture)>>!__ResponseFile! echo -O>>!__ResponseFile! @@ -217,6 +237,9 @@ if defined RunCrossGen2 ( echo "!__Command!" call !__Command! set CrossGen2Status=!ERRORLEVEL! + Exit /b 0 + +:DoneCrossgen2Operations call :ReleaseLock IF NOT !CrossGen2Status!==0 ( ECHO Crossgen2 failed with exitcode - !CrossGen2Status! diff --git a/src/coreclr/tests/src/CLRTest.Execute.Bash.targets b/src/coreclr/tests/src/CLRTest.Execute.Bash.targets index b8bfec54307d..71a1949d6ad5 100644 --- a/src/coreclr/tests/src/CLRTest.Execute.Bash.targets +++ b/src/coreclr/tests/src/CLRTest.Execute.Bash.targets @@ -69,14 +69,14 @@ WARNING: When setting properties based on their current state (for example: - 0 + 0 @@ -93,12 +93,12 @@ $(BashCLRTestEnvironmentCompatibilityCheck) if [[ ( ! -z "$COMPlus_JitStress" ) || ( ! -z "$COMPlus_JitStressRegs" ) || ( ! -z "$COMPlus_JITMinOpts" ) || ( ! -z "$COMPlus_TailcallStress" ) ]] then echo "SKIPPING EXECUTION BECAUSE ONE OR MORE OF (COMPlus_JitStress, COMPlus_JitStressRegs, COMPlus_JITMinOpts, COMPlus_TailcallStress) IS SET" - exit $(GCBashScriptExitCode) + exit $(IncompatibleTestBashScriptExitCode) fi if [[ "$COMPlus_TieredCompilation" != "0" ]] then echo "SKIPPING EXECUTION BECAUSE COMPlus_TieredCompilation has not been disabled and this test is marked JitOptimizationSensitive" - exit $(GCBashScriptExitCode) + exit $(IncompatibleTestBashScriptExitCode) fi ]]> + @@ -248,15 +256,10 @@ fi <_CLRTestRunFile Condition="'$(CLRTestIsHosted)'=='true'">"$CORE_ROOT/corerun" - $(BashIlrtTestLaunchCmds) + - + - - diff --git a/src/coreclr/tests/src/CLRTest.Jit.targets b/src/coreclr/tests/src/CLRTest.Jit.targets index 13d431a19b45..c80452618d04 100644 --- a/src/coreclr/tests/src/CLRTest.Jit.targets +++ b/src/coreclr/tests/src/CLRTest.Jit.targets @@ -68,63 +68,72 @@ if defined RunningJitDisasm ( - - $(CLRTestKind) - + - + $([MSBuild]::MakeRelative($(OutputPath), $(_CLRTestToRunFileFullPath)).Replace("\","/")) $(MSBuildProjectName).dll $(MSBuildProjectName).dasm.il $(MSBuildProjectName).asm.dll - - + + +]]> - - - +]]> @@ -137,16 +146,22 @@ fi $(MSBuildProjectName).dasm.il $(MSBuildProjectName).asm.dll - - - + + +]]> - - + diff --git a/src/coreclr/tests/src/Common/CoreCLRTestLibrary/TestFramework.cs b/src/coreclr/tests/src/Common/CoreCLRTestLibrary/TestFramework.cs deleted file mode 100644 index e47be328a188..000000000000 --- a/src/coreclr/tests/src/Common/CoreCLRTestLibrary/TestFramework.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -namespace TestLibrary -{ - public static class TestFramework - { - private const int DEFAULT_SEED = 20010415; - - public static void LogInformation(string str) - { - Logging.WriteLine(str); - } - public static void LogVerbose(string str) - { - if (Utilities.Verbose) Logging.WriteLine(str); - } - public static void LogError(string id, string msg) - { - Logging.WriteLine("ERROR!!!-" + id + ": " + msg); - } - - public static void BeginTestCase(string title) - { - int seed = DEFAULT_SEED; - - if (Environment.GetEnvironmentVariable("CORECLR_SEED") != null) - { - string CORECLR_SEED = Environment.GetEnvironmentVariable("CORECLR_SEED"); - - if (!int.TryParse(CORECLR_SEED, out seed)) - { - if (string.Equals(CORECLR_SEED, "random", StringComparison.OrdinalIgnoreCase)) - { - seed = new Random().Next(); - } - else - { - seed = DEFAULT_SEED; - } - } - } - - Generator.m_rand = new Random(seed); - - Logging.WriteLine("Beginning test case " + title + " at " + DateTime.Now); - Logging.WriteLine("Random seed: " + seed + "; set environment variable CORECLR_SEED to this value to repro"); - Logging.WriteLine(); - } - - public static bool EndTestCase() - { - Logging.WriteLine(); - Logging.WriteLine("Ending test case at " + DateTime.Now); - return true; - } - - public static void BeginScenario(string name) - { - Logging.WriteLine("Beginning scenario: " + name); - } - } -} diff --git a/src/coreclr/tests/src/Common/Coreclr.TestWrapper/Coreclr.TestWrapper.csproj b/src/coreclr/tests/src/Common/Coreclr.TestWrapper/Coreclr.TestWrapper.csproj deleted file mode 100644 index 22a4b52ebbca..000000000000 --- a/src/coreclr/tests/src/Common/Coreclr.TestWrapper/Coreclr.TestWrapper.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - true - $(TestSourceDir)Common\Coreclr.TestWrapper\obj\project.assets.json - $(NetCoreAppCurrentTargetFrameworkMoniker) - $(NetCoreAppCurrent) - - - - - - - diff --git a/src/coreclr/tests/src/Common/ilasm/ilasm.ilproj b/src/coreclr/tests/src/Common/ilasm/ilasm.ilproj index 6c76895f60b6..fb5527a77e13 100644 --- a/src/coreclr/tests/src/Common/ilasm/ilasm.ilproj +++ b/src/coreclr/tests/src/Common/ilasm/ilasm.ilproj @@ -8,4 +8,5 @@ $(TestSourceDir)Common\ilasm\obj\project.assets.json + diff --git a/src/coreclr/tests/src/Common/test_dependencies/test_dependencies.csproj b/src/coreclr/tests/src/Common/test_dependencies/test_dependencies.csproj index 19d473b6d6bf..7db0a1d223d5 100644 --- a/src/coreclr/tests/src/Common/test_dependencies/test_dependencies.csproj +++ b/src/coreclr/tests/src/Common/test_dependencies/test_dependencies.csproj @@ -17,7 +17,7 @@ - $(TestSourceDir)Common\test_dependencies\obj\project.assets.json + $(RepoRoot)src\coreclr\tests\src\Common\test_dependencies\obj\project.assets.json diff --git a/src/coreclr/tests/src/CoreMangLib/system/delegate/generics/common.cs b/src/coreclr/tests/src/CoreMangLib/system/delegate/generics/common.cs deleted file mode 100644 index b2a475733ab4..000000000000 --- a/src/coreclr/tests/src/CoreMangLib/system/delegate/generics/common.cs +++ /dev/null @@ -1,333 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -//@TODO - API level testing for generics, particulary with multicast invocation lists and co/contra variant generics -//@TODO - Vary the return type - -//Disable warnings about unused fields, they exist only to pad the size of the structs/objects to stress the stub types, we don't care that they aren't used. -#pragma warning disable 649 -#pragma warning disable 169 -using System; - -////////////////////////////////////////////////////////////////////// -//Non generic delegates over various generic targets -////////////////////////////////////////////////////////////////////// - -//Closed Instance / Open static Non-Generic delegates for all M1-M9s -delegate long dc1(long l); -delegate long dc4(EQStruct t, long l); -delegate long dc5(long l, EQStruct t); -delegate long dc6(EQClass t, long l); -delegate long dc7(long l, EQClass t); - -//Open Instance Non-Generic delegates for M1-M9 over a reference generic -delegate long do1_ref(GenericClass> o,long l); -delegate long do4_ref(GenericClass> o, EQStruct t, long l); -delegate long do5_ref(GenericClass> o, long l, EQStruct t); -delegate long do6_ref(GenericClass> o, EQClass t, long l); -delegate long do7_ref(GenericClass> o, long l, EQClass t); - -//Open Instance Non-Generic delegates for M1-M9 over a value generic -delegate long do1_val(ref GenericStruct> o,long l); -delegate long do4_val(ref GenericStruct> o, EQStruct t, long l); -delegate long do5_val(ref GenericStruct> o, long l, EQStruct t); -delegate long do6_val(ref GenericStruct> o, EQClass t, long l); -delegate long do7_val(ref GenericStruct> o, long l, EQClass t); - -//Closed Static Non-Generic delegates for SM1-SM9 -delegate long dcs1(); -delegate long dcs2(long l); -delegate long dcs5(EQStruct t); -delegate long dcs7(EQClass t); - -////////////////////////////////////////////////////////////////////// -//Generic delegate types over varous generic targets -////////////////////////////////////////////////////////////////////// - -//Minimal set of generic delegates to cover all the above cases -delegate T g0(); -delegate T g1(U u); -delegate T g2(U u, V v); -delegate T g3(U u, V v, W w); - -////////////////////////////////////////////////////////////////////// - -class GenericClass where T:Equality{ - public long value,field2,field3,field4,field5,field6; - - public long M1(long l){ - if(value!=l) - throw new Exception(); - return 100; - } - - public long M2(T t, long l){ - if(!t.Equals(l) || value!=l) - throw new Exception(); - return 100; - } - - public long M3(long l, T t){ - if(!t.Equals(l) || value!=l) - throw new Exception(); - return 100; - } - - public long M4(EQStruct t, long l){ - if(!t.Equals(l) || value!=l) - throw new Exception(); - return 100; - } - - public long M5(long l, EQStruct t){ - if(!t.Equals(l) || value!=l) - throw new Exception(); - return 100; - } - - public long M6(EQClass t, long l){ - if(!t.Equals(l) || value!=l) - throw new Exception(); - return 100; - } - - public long M7(long l, EQClass t){ - if(!t.Equals(l) || value!=l) - throw new Exception(); - return 100; - } - - public long M8(U u, long l) where U:Equality{ - if(!u.Equals(l) || value!=l) - throw new Exception(); - return 100; - } - - public long M9(long l, U u) where U:Equality{ - if(!u.Equals(l) || value!=l) - throw new Exception(); - return 100; - } - - public static long SM1(long l){ - return 100; - } - - public static long SM2(T t, long l){ - if(!t.Equals(l)) - throw new Exception(); - return 100; - } - - public static long SM3(long l, T t){ - if(!t.Equals(l)) - throw new Exception(); - return 100; - } - - public static long SM4(EQStruct t, long l){ - if(!t.Equals(l)) - throw new Exception(); - return 100; - } - - public static long SM5(long l, EQStruct t){ - if(!t.Equals(l)) - throw new Exception(); - return 100; - } - - public static long SM6(EQClass t, long l){ - if(!t.Equals(l)) - throw new Exception(); - return 100; - } - - public static long SM7(long l, EQClass t){ - if(!t.Equals(l)) - throw new Exception(); - return 100; - } - - public static long SM8(U u, long l) where U:Equality{ - if(!u.Equals(l)) - throw new Exception(); - return 100; - } - - public static long SM9(long l, U u) where U:Equality{ - if(!u.Equals(l)) - throw new Exception(); - return 100; - } -} - -struct GenericStruct where T:Equality{ - public long value,field2,field3,field4,field5,field6; - - public long M1(long l){ - if(value!=l) - throw new Exception(); - return 100; - } - - public long M2(T t, long l){ - Console.WriteLine(l); - if(!t.Equals(l) || value!=l) - throw new Exception(); - return 100; - } - - public long M3(long l, T t){ - if(!t.Equals(l) || value!=l) - throw new Exception(); - return 100; - } - - public long M4(EQStruct t, long l){ - if(!t.Equals(l) || value!=l) - throw new Exception(); - return 100; - } - - public long M5(long l, EQStruct t){ - if(!t.Equals(l) || value!=l) - throw new Exception(); - return 100; - } - - public long M6(EQClass t, long l){ - if(!t.Equals(l) || value!=l) - throw new Exception(); - return 100; - } - - public long M7(long l, EQClass t){ - if(!t.Equals(l) || value!=l) - throw new Exception(); - return 100; - } - - public long M8(U u, long l) where U:Equality{ - if(!u.Equals(l) || value!=l) - throw new Exception(); - return 100; - } - - public long M9(long l, U u) where U:Equality{ - if(!u.Equals(l) || value!=l) - throw new Exception(); - return 100; - } - - public static long SM1(long l){ - return 100; - } - - public static long SM2(T t, long l){ - if(!t.Equals(l)) - throw new Exception(); - return 100; - } - - public static long SM3(long l, T t){ - if(!t.Equals(l)) - throw new Exception(); - return 100; - } - - public static long SM4(EQStruct t, long l){ - if(!t.Equals(l)) - throw new Exception(); - return 100; - } - - public static long SM5(long l, EQStruct t){ - if(!t.Equals(l)) - throw new Exception(); - return 100; - } - - public static long SM6(EQClass t, long l){ - if(!t.Equals(l)) - throw new Exception(); - return 100; - } - - public static long SM7(long l, EQClass t){ - if(!t.Equals(l)) - throw new Exception(); - return 100; - } - - public static long SM8(U u, long l) where U:Equality{ - if(!u.Equals(l)) - throw new Exception(); - return 100; - } - - public static long SM9(long l, U u) where U:Equality{ - if(!u.Equals(l)) - throw new Exception(); - return 100; - } -} - -interface Equality{ - bool Equals(long l); -} -/* -class EQClass : Equality{ - double f1,f2,f3,f4,f5,f6,f7,f8,f9,f10; - long value; - - public EQClass(long l){ - value = l; - } - - public bool Equals(long l){ - return (value==l); - } -} - -class EQStruct : Equality{ - double f1,f2,f3,f4,f5,f6,f7,f8,f9,f10; - long value; - - public EQStruct(long l){ - value = l; - } - - public bool Equals(long l){ - return (value==l); - } -} -*/ -class EQClass : Equality{ - double f1,f2,f3,f4,f5,f6,f7,f8,f9,f10; - public T f11; - long value; - - public EQClass(long l){ - value = l; - } - - public bool Equals(long l){ - return (value==l); - } -} - -class EQStruct : Equality{ - double f1,f2,f3,f4,f5,f6,f7,f8,f9,f10; - public T f11; - long value; - - public EQStruct(long l){ - value = l; - } - - public bool Equals(long l){ - return (value==l); - } -} -#pragma warning restore diff --git a/src/coreclr/tests/src/Directory.Build.targets b/src/coreclr/tests/src/Directory.Build.targets index 1d89eb2699e8..625e3b762402 100644 --- a/src/coreclr/tests/src/Directory.Build.targets +++ b/src/coreclr/tests/src/Directory.Build.targets @@ -137,8 +137,8 @@ - - + + @@ -179,8 +179,8 @@ Condition="'$(_CopyNativeProjectBinaries)' == 'true'" BeforeTargets="Build" > - - + + @@ -230,7 +230,7 @@ - $(TestSourceDir)Common\test_dependencies\obj\project.assets.json + $(RepoRoot)src\coreclr\tests\src\Common\test_dependencies\obj\project.assets.json diff --git a/src/coreclr/tests/src/GC/API/GC/Finalize.cs b/src/coreclr/tests/src/GC/API/GC/Finalize.cs deleted file mode 100644 index b8a853fb1e25..000000000000 --- a/src/coreclr/tests/src/GC/API/GC/Finalize.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// Tests Finalize() and WaitForPendingFinalizers() - -using System; -using System.Runtime.CompilerServices; - -public class Test -{ - public static bool visited = false; - public class Dummy - { - ~Dummy() - { - Console.WriteLine("In Finalize() of Dummy"); - Test.visited = true; - } - } - - public class CreateObj - { - public Dummy obj; - - - public CreateObj() - { - obj = new Dummy(); - } - - [MethodImplAttribute(MethodImplOptions.NoInlining)] - public void RunTest() - { - obj = null; - } - } - - public static int Main() - { - CreateObj temp = new CreateObj(); - temp.RunTest(); - - GC.Collect(); - GC.WaitForPendingFinalizers(); // makes sure Finalize() is called. - GC.Collect(); - - if (visited) - { - Console.WriteLine("Test for Finalize() & WaitForPendingFinalizers() passed!"); - return 100; - } - else - { - Console.WriteLine("Test for Finalize() & WaitForPendingFinalizers() failed!"); - return 0; - } - } -} diff --git a/src/coreclr/tests/src/GC/API/GCHandle/Casting.cs b/src/coreclr/tests/src/GC/API/GCHandle/Casting.cs deleted file mode 100644 index b755804c0564..000000000000 --- a/src/coreclr/tests/src/GC/API/GCHandle/Casting.cs +++ /dev/null @@ -1,130 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/* - * TEST: Casting - * DESCRIPTION: Tests casting to and from IntPtrs. - * See also ToFromIntPtr.cs test. - */ - -using System; -using System.Runtime.InteropServices; - -public class Dummy -{ - public Dummy(int i) - { - this.i = i; - } - public int i; -} - - -public class CastingTest -{ - private int _numTests = 0; - - private bool CastTest() - { - _numTests++; - - int dummyValue = 101; - - GCHandle gch = GCHandle.Alloc(new Dummy(dummyValue)); - GCHandle gch2 = (GCHandle)((IntPtr)gch); - - bool success = (gch.Target == gch2.Target); - - gch.Free(); - - if (success) - { - Console.WriteLine("CastTest Passed"); - return true; - } - - Console.WriteLine("CastTest Failed"); - return false; - } - - - private bool FromZeroTest() - { - _numTests++; - try - { - GCHandle gch3 = (GCHandle)IntPtr.Zero; - } - catch (InvalidOperationException) - { - Console.WriteLine("FromZeroTest Passed"); - return true; - } - catch (Exception) - { - Console.WriteLine("Unexpected Exception:"); - } - - Console.WriteLine("FromZeroTest Failed"); - return false; - } - - - private bool ToZeroTest() - { - _numTests++; - - GCHandle gch = GCHandle.Alloc(new Dummy(99)); - gch.Free(); - IntPtr intPtr = (IntPtr)gch; - - if (intPtr == IntPtr.Zero) - { - Console.WriteLine("ToZeroTest Passed"); - return true; - } - - Console.WriteLine("ToZeroTest Failed"); - return false; - } - - - public bool RunTests() - { - int numPassed = 0; - - if (CastTest()) - { - numPassed++; - } - - if (ToZeroTest()) - { - numPassed++; - } - - if (FromZeroTest()) - { - numPassed++; - } - - Console.WriteLine(); - return (_numTests == numPassed); - } - - - public static int Main() - { - CastingTest t = new CastingTest(); - - if (t.RunTests()) - { - Console.WriteLine("CastingTest Passed!"); - return 100; - } - - Console.WriteLine("CastingTest Failed!"); - return 1; - } -} diff --git a/src/coreclr/tests/src/GC/API/GCHandle/Equality.cs b/src/coreclr/tests/src/GC/API/GCHandle/Equality.cs deleted file mode 100644 index eb91658b8f99..000000000000 --- a/src/coreclr/tests/src/GC/API/GCHandle/Equality.cs +++ /dev/null @@ -1,99 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Runtime.InteropServices; - -public class Equality -{ - public bool RunTest() - { - Object o = new Object(); - GCHandle gc = GCHandle.Alloc(o); - GCHandle gc2 = GCHandle.Alloc(o); - GCHandle gc3 = gc; - - if (gc.Equals(null)) - { - Console.WriteLine("Equals null failed"); - return false; - } - - if (gc.Equals(new Object())) - { - Console.WriteLine("Equals new Object failed"); - return false; - } - - if (gc.Equals(gc2)) - { - Console.WriteLine("Equals GCHandle 1 failed"); - return false; - } - - if (!gc.Equals(gc3)) - { - Console.WriteLine("Equals GCHandle 2 failed"); - return false; - } - - - if (gc == gc2) - { - Console.WriteLine("== GCHandle 1 failed"); - return false; - } - - if (!(gc == gc3)) - { - Console.WriteLine("== GCHandle 2 failed"); - return false; - } - - if (gc.GetHashCode() == gc2.GetHashCode()) - { - Console.WriteLine("GetHashCode 1 failed"); - return false; - } - - if (gc.GetHashCode() != gc3.GetHashCode()) - { - Console.WriteLine("GetHashCode 2 failed"); - return false; - } - - - if (!(gc != gc2)) - { - Console.WriteLine("!= GCHandle 1 failed"); - return false; - } - - if (gc != gc3) - { - Console.WriteLine("!= GCHandle 2 failed"); - return false; - } - - return true; - } - - - public static int Main() - { - Equality e = new Equality(); - - - if (e.RunTest()) - { - Console.WriteLine(); - Console.WriteLine("Test Passed"); - return 100; - } - - Console.WriteLine(); - Console.WriteLine("Test Failed"); - return 1; - } -} diff --git a/src/coreclr/tests/src/GC/API/GCHandle/Target.cs b/src/coreclr/tests/src/GC/API/GCHandle/Target.cs deleted file mode 100644 index 17b157c6db15..000000000000 --- a/src/coreclr/tests/src/GC/API/GCHandle/Target.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// Tests GCHandle.Target - -using System; -using System.Runtime.InteropServices; - -public class Test -{ - public class Dummy - { - public int flag; - - public Dummy(int i) - { - flag = i; - } - - public int getFlag() - { - return flag; - } - } - public static int Main() - { - Dummy obj = new Dummy(99); - bool passed = true; - - Console.WriteLine("Allocating a handle to object.."); - GCHandle handle = GCHandle.Alloc(obj); - - Dummy target = (Dummy)handle.Target; - - if (target.getFlag() == 99) - { - Console.WriteLine("Test for GCHandle.get_Target passed!"); - } - else - { - Console.WriteLine("Test for GCHandle.get_Target failed!"); - passed = false; - } - - Dummy obj2 = new Dummy(66); - handle.Target = obj2; - Dummy target2 = (Dummy)handle.Target; - - if (target2.getFlag() == 66) - { - Console.WriteLine("Test for GCHandle.set_Target passed!"); - } - else - { - Console.WriteLine("Test for GCHandle.set_Target failed!"); - passed = false; - } - - handle.Free(); - - if (passed) - { - Console.WriteLine("Test Passed!"); - return 100; - } - Console.WriteLine("Test Failed!"); - return 1; - } -} diff --git a/src/coreclr/tests/src/GC/API/WeakReference/Finalize.cs b/src/coreclr/tests/src/GC/API/WeakReference/Finalize.cs deleted file mode 100644 index 1e1a2d630c92..000000000000 --- a/src/coreclr/tests/src/GC/API/WeakReference/Finalize.cs +++ /dev/null @@ -1,75 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// Tests WeakReference.Finalize() - - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -public class Test { - - public class Dummy - { - public static bool visited=false; - ~Dummy() { - Console.WriteLine("In Finalize() of Dummy"); - if(visited==false) visited=true; - else visited=false; - } - } - - public class CreateObj - { - Dummy dummy1; - Dummy dummy2; - - public CreateObj() - { - dummy1 = new Dummy(); - dummy2 = new Dummy(); - } - - [MethodImplAttribute(MethodImplOptions.NoInlining)] - public GCHandle RunTest() - { - WeakReference weak1 = new WeakReference(dummy1); - GCHandle handle = GCHandle.Alloc(dummy1,GCHandleType.Normal); // Strong Reference - - WeakReference weak2 = new WeakReference(dummy2); // only a weak reference..so should run finalizer - - // ensuring that GC happens even with /debug mode - dummy1=null; - dummy2=null; - - return handle; - } - } - - public static int Main() - { - CreateObj temp = new CreateObj(); - GCHandle handle = temp.RunTest(); - - GC.Collect(); - GC.WaitForPendingFinalizers(); - GC.Collect(); - - bool success = Dummy.visited; - - handle.Free(); - - if (success) - { - Console.WriteLine("Test for WeakReference.Finalize() passed!"); - return 100; - } - else - { - Console.WriteLine("Test for WeakReference.Finalize() failed!"); - return 1; - } - } -} diff --git a/src/coreclr/tests/src/GC/API/WeakReference/Target.cs b/src/coreclr/tests/src/GC/API/WeakReference/Target.cs deleted file mode 100644 index 91eb16168b92..000000000000 --- a/src/coreclr/tests/src/GC/API/WeakReference/Target.cs +++ /dev/null @@ -1,118 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// Tests WeakReference.Target -// Retrieves or assigns the object an IsAlive status. - -using System; -using System.Runtime.InteropServices; -using System.Runtime.CompilerServices; - -public class Dummy -{ - public int val = 0; - - public Dummy(int val) - { - this.val = val; - } -} - -public class Test -{ - public static int[] array; - public static Object[] obj; - - [MethodImplAttribute(MethodImplOptions.NoInlining)] - public static void CreateArrays() - { - array = new int[50]; - obj = new Object[25]; - } - - [MethodImplAttribute(MethodImplOptions.NoInlining)] - public static WeakReference CreateArrayWeakReference() - { - return new WeakReference(array); - } - - [MethodImplAttribute(MethodImplOptions.NoInlining)] - public static void DestroyArrays() - { - array = null; - obj = null; - } - - public bool GetTargetTest() - { - CreateArrays(); - WeakReference weakarray = CreateArrayWeakReference(); // array has only weak reference - - // obj has both strong and weak ref and so should not get collected - - WeakReference weakobj = new WeakReference(obj); - GCHandle objhandle = GCHandle.Alloc(obj, GCHandleType.Normal); - - DestroyArrays(); - GC.Collect(); - - Object target1 = weakarray.Target; // should be null - Object target2 = weakobj.Target; // should be System.Object[] - - Console.WriteLine("{0},{1}", target1, target2); - - if ((target1 == null) && (target2 != null)) - { - Console.WriteLine("Test for WeakReference.get_Target passed!"); - return true; - } - else - { - Console.WriteLine("Test for WeakReference.get_Target failed!"); - return false; - } - } - - public bool SetTargetTest() - { - Dummy d1 = new Dummy(99); - Dummy d2 = new Dummy(66); - - WeakReference wr = new WeakReference(d1); // array has only weak reference - wr.Target = d2; // overwrite wr.Target with d2 - Dummy d3 = (Dummy)wr.Target; // get wr.Target - GC.KeepAlive(d2); // required so d2 doesn't get collected before setting d3 - - if (d3.val == 66) - { - // make sure d3 == d2, not d1 - Console.WriteLine("Test for WeakReference.set_Target passed!"); - return true; - } - else - { - Console.WriteLine("Test for WeakReference.set_Target failed!"); - return false; - } - } - - public static int Main() - { - bool passed1, passed2; - - Test t = new Test(); - - passed1 = t.GetTargetTest(); - passed2 = t.SetTargetTest(); - - if (passed1 && passed2) - { - Console.WriteLine("Test Passed!"); - return 100; - } - - Console.WriteLine("Test Failed!"); - return 1; - } -} diff --git a/src/coreclr/tests/src/GC/Coverage/LargeObjectAlloc.cs b/src/coreclr/tests/src/GC/Coverage/LargeObjectAlloc.cs deleted file mode 100644 index 0eafed7bd401..000000000000 --- a/src/coreclr/tests/src/GC/Coverage/LargeObjectAlloc.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// Bug#94878 Problem with the Large Object Allocator -// Repro test from MStanton - -using System; -using System.Threading; - -internal class Mainy -{ - public static void DoWork() - { - int k = 0; - while (k < 3) - { - Console.WriteLine("{0}: Restarting run {1}", Thread.CurrentThread.Name, k); - int[] largeArray = new int[1000000]; - for (int i = 0; i <= 100; i++) - { - int[] saveArray = largeArray; - largeArray = new int[largeArray.Length + 100000]; - saveArray = null; - //Console.WriteLine("{0} at size {1}",Thread.CurrentThread.Name,largeArray.Length.ToString()); - } - k++; - } - } - - public static int Main(String[] args) - { - long Threads = 1; - - if (args.Length > 1) - { - Console.WriteLine("usage: LargeObjectAlloc "); - return 1; - } - else if (args.Length == 1) - { - Threads = Int64.Parse(args[0]); - } - - Console.WriteLine("LargeObjectAlloc started with {0} threads. Control-C to exit", Threads.ToString()); - - Thread myThread = null; - for (long i = 0; i < Threads; i++) - { - myThread = new Thread(new ThreadStart(Mainy.DoWork)); - myThread.Name = i.ToString(); - myThread.Start(); - } - - Console.WriteLine("All threads started"); - myThread.Join(); - - - Console.WriteLine("Test Passed"); - return 100; - } -} - diff --git a/src/coreclr/tests/src/GC/Coverage/LargeObjectAlloc2.cs b/src/coreclr/tests/src/GC/Coverage/LargeObjectAlloc2.cs deleted file mode 100644 index 9b8862d45dbb..000000000000 --- a/src/coreclr/tests/src/GC/Coverage/LargeObjectAlloc2.cs +++ /dev/null @@ -1,89 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// Allocate nested objects of ~ 25 MB -// If memory is low, after every loop, the large objects should be collected -// and committed from the LargeObjectHeap -// The Finalizer makes sure that the GC is actually collecting the large objects - - -using System; - -namespace LargeObjectTest -{ - public class OtherLargeObject - { - // disabling unused variable warning -#pragma warning disable 0414 - private int[] _otherarray; -#pragma warning restore 0414 - - public OtherLargeObject() - { - _otherarray = new int[5000]; // 20 KB - } - } - - public class LargeObject - { - // disabling unused variable warning -#pragma warning disable 0414 - private int[] _array; -#pragma warning restore 0414 - private OtherLargeObject[] _olargeobj; - - public LargeObject() - { - _array = new int[1250000]; // 5 MB - _olargeobj = new OtherLargeObject[1000]; //20 MB - for (int i = 0; i < 1000; i++) - { - _olargeobj[i] = new OtherLargeObject(); - } - } - - ~LargeObject() - { - Console.WriteLine("In finalizer"); - Test.ExitCode = 100; - } - } - - public class Test - { - public static int ExitCode = 1; - public static int Main() - { - int loop = 0; - LargeObject largeobj; - - Console.WriteLine("Test should pass with ExitCode 100\n"); - - while (loop <= 200) - { - loop++; - Console.Write("LOOP: {0}\n", loop); - try - { - largeobj = new LargeObject(); - Console.WriteLine("Allocated LargeObject"); - } - catch (Exception e) - { - Console.WriteLine("Failure to allocate at loop {0}\n", loop); - Console.WriteLine("Caught Exception: {0}", e); - return ExitCode; - } - largeobj = null; - GC.Collect(); - GC.WaitForPendingFinalizers(); - Console.WriteLine("LargeObject Collected\n"); - } - Console.WriteLine("Test Passed"); - GC.Collect(); - - return ExitCode; - } - } -} diff --git a/src/coreclr/tests/src/GC/Coverage/delete_next_card_table.cs b/src/coreclr/tests/src/GC/Coverage/delete_next_card_table.cs deleted file mode 100644 index ad0bd5ca3f93..000000000000 --- a/src/coreclr/tests/src/GC/Coverage/delete_next_card_table.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/* TEST: delete_next_card_table - * DESCRIPTION: gains 14 blocks in gc.cpp - mscorwks!WKS::delete_next_card_table: (7 blocks, 11 arcs) - mscorwks!SVR::delete_next_card_table: (7 blocks, 11 arcs) - */ - -using System; -using System.Collections; - -public class delete_next_card_table -{ - public static int Main() - { - new delete_next_card_table().DoMemoryChurn(); - return 100; - } - - // this function attempts to allocate & free large amounts - // of memory to ensure our objects remain pinned, don't get - // relocated, etc... - void DoMemoryChurn() - { - - Random r = new Random(); - for (int j = 0; j < 10; j++) - { - Console.Write("Churn loop {0}", j); - - try - { - // arraylist keeps everything rooted until we run out of memory - //ArrayList al = new ArrayList(); - object[] objArray = new object[32]; - int len = 1; - - for (int i = 0; i < 32; i++) // todo: this should be based upon size of IntPtr (32 bits on 32 bit platforms, 64 on 64 bit platforms) - { - Console.Write("."); - - if (i < 30) - { - // Random.Next cannot handle negative (0x80000000) numbers - len *= 2; - } - //al.Add(new Guid[len + r.Next(len)]); - objArray[i] = new Guid[len + r.Next(len)]; - } - } - catch (OutOfMemoryException) - { - Console.WriteLine("OOM while Churning"); - GC.Collect(); - } - - Console.WriteLine(); - } - } -} - diff --git a/src/coreclr/tests/src/GC/Features/BackgroundGC/concurrentspin2.cs b/src/coreclr/tests/src/GC/Features/BackgroundGC/concurrentspin2.cs deleted file mode 100644 index 23edb8bb34b0..000000000000 --- a/src/coreclr/tests/src/GC/Features/BackgroundGC/concurrentspin2.cs +++ /dev/null @@ -1,184 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Diagnostics; -using System.Threading; - -class PriorityTest -{ - private byte[][] old; - private byte[][] med; - private Random rand; - - private int oldDataSize; - private int medDataSize; - private int iterCount; - private int meanAllocSize; - private int medTime; - private int youngTime; - - - public PriorityTest(int oldDataSize, int medDataSize, - int iterCount, int meanAllocSize, - int medTime, int youngTime) - { - rand = new Random(314159); - this.oldDataSize = oldDataSize; - this.medDataSize = medDataSize; - this.iterCount = iterCount; - this.meanAllocSize = meanAllocSize; - this.medTime = medTime; - this.youngTime = youngTime; - } - - // creates initial arrays - void AllocTest(int oldDataSize, int medDataSize, int meanAllocSize) - { - old = new byte[oldDataSize][]; - med = new byte[medDataSize][]; - - for (int i = 0; i < old.Length; i++) - { - old[i] = new byte[meanAllocSize]; - } - - for (int i = 0; i < med.Length; i++) - { - med[i] = new byte[meanAllocSize]; - } - } - - // churns data in the heap by replacing byte arrays with new ones of random length - // this should induce concurrent GCs - void SteadyState(int oldDataSize, int medDataSize, - int iterCount, int meanAllocSize, - int medTime, int youngTime) - { - - for (int i = 0; i < iterCount; i++) - { - byte[] newarray = new byte[meanAllocSize]; - - if ((i % medTime) == 0) - { - old[rand.Next(0, old.Length)] = newarray; - } - if ((i % youngTime) == 0) - { - med[rand.Next(0, med.Length)] = newarray; - } - //if (((i % 5000) == 0) && (Thread.CurrentThread.Priority != ThreadPriority.Lowest)) - //{ - // Thread.Sleep(200); - //} - } - } - - // method that runs the test - public void RunTest() - { - for (int iteration = 0; iteration < iterCount; iteration++) - { - AllocTest(oldDataSize, medDataSize, meanAllocSize); - - SteadyState(oldDataSize, medDataSize, - iterCount, meanAllocSize, - medTime, youngTime); - - if (((iteration + 1) % 20) == 0) - Console.WriteLine("Thread: {1} Finished iteration {0}", iteration, System.Threading.Thread.CurrentThread.Name); - } - - } - -} - - -class ConcurrentRepro -{ - - public static void Usage() - { - Console.WriteLine("Usage:"); - Console.WriteLine("\t "); - } - - public static int[] ParseArgs(string[] args) - { - int[] parameters = new int[2]; - - // set defaults - parameters[0] = 100; - parameters[1] = 4; - - if (args.Length == 0) - { - //use defaults - Console.WriteLine("Using defaults: 100 iterations, 4 threads"); - return parameters; - } - if (args.Length == parameters.Length) - { - for (int i = 0; i < args.Length; i++) - { - int j = 0; - if (!int.TryParse(args[i], out j)) - { - Usage(); - return null; - } - parameters[i] = j; - } - - return parameters; - } - - // incorrect number of arguments - Usage(); - return null; - } - - - public static int Main(string[] args) - { - - // parse arguments - int[] parameters = ParseArgs(args); - if (parameters == null) - { - return 0; - } - - // set process affinity to 1 to repro bug easier - //Process.GetCurrentProcess().ProcessorAffinity = (IntPtr)1; - - - PriorityTest priorityTest = new PriorityTest(1000000, 5000, parameters[0], 17, 30, 3); - ThreadStart startDelegate = new ThreadStart(priorityTest.RunTest); - - // create threads - Thread[] threads = new Thread[parameters[1]]; - for (int i = 0; i < threads.Length; i++) - { - threads[i] = new Thread(startDelegate); - threads[i].Name = String.Format("Thread{0}", i); - //if (i % 2 == 0) - //{ - // threads[i].Priority = ThreadPriority.Lowest; - //} - threads[i].Start(); - } - - // wait for threads to complete - for (int i = 0; i < threads.Length; i++) - { - threads[i].Join(); - } - - return 100; - } -} - - diff --git a/src/coreclr/tests/src/GC/Features/HeapExpansion/GCUtil.cs b/src/coreclr/tests/src/GC/Features/HeapExpansion/GCUtil.cs deleted file mode 100644 index c8b97c8ccde4..000000000000 --- a/src/coreclr/tests/src/GC/Features/HeapExpansion/GCUtil.cs +++ /dev/null @@ -1,99 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Runtime.InteropServices; -using System.Collections.Generic; -using System.Security; - -public class GCUtil -{ - public static List list = new List(); - public static List blist = new List(); - public static List list2 = new List(); - public static List blist2 = new List(); - - [SecuritySafeCritical] - public static void Alloc(int numNodes, int percentPinned) - { - for (int i = 0; i < numNodes; i++) - { - byte[] b = new byte[10]; - b[0] = 0xC; - - if (i % ((int)(numNodes * (100 / percentPinned))) == 0) - { - list.Add(GCHandle.Alloc(b, GCHandleType.Pinned)); - } - - blist.Add(b); - } - } - - [SecuritySafeCritical] - public static void FreePins() - { - foreach (GCHandle gch in list) - { - gch.Free(); - } - list.Clear(); - blist.Clear(); - } - - [SecuritySafeCritical] - public static void FreeNonPins() - { - blist.Clear(); - } - - - [SecuritySafeCritical] - public static void Alloc2(int numNodes, int percentPinned) - { - for (int i = 0; i < numNodes; i++) - { - byte[] b = new byte[10]; - b[0] = 0xC; - - if (i % ((int)(numNodes * (100 / percentPinned))) == 0) - { - list2.Add(GCHandle.Alloc(b, GCHandleType.Pinned)); - } - - blist2.Add(b); - } - } - - - [SecuritySafeCritical] - public static void FreePins2() - { - foreach (GCHandle gch in list2) - { - gch.Free(); - } - list2.Clear(); - blist2.Clear(); - } - - - [SecuritySafeCritical] - public static void FreeNonPins2() - { - blist2.Clear(); - } - - [SecuritySafeCritical] - public static void AllocWithGaps() - { - for (int i = 0; i < 1024 * 1024; i++) - { - byte[] unpinned = new byte[50]; - byte[] pinned = new byte[10]; - blist.Add(unpinned); - list.Add(GCHandle.Alloc(pinned, GCHandleType.Pinned)); - } - } -} diff --git a/src/coreclr/tests/src/GC/Features/HeapExpansion/bestfit-finalize.cs b/src/coreclr/tests/src/GC/Features/HeapExpansion/bestfit-finalize.cs deleted file mode 100644 index 0e511a33be0b..000000000000 --- a/src/coreclr/tests/src/GC/Features/HeapExpansion/bestfit-finalize.cs +++ /dev/null @@ -1,197 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -//This is modeled after a server executing requests -//which pin some of their newly allocated objects. -using System; -using System.Threading; -using System.Runtime.InteropServices; -using System.Security; - -namespace Fragment -{ - [SecuritySafeCritical] - public class Request - { - Object[] survivors; - GCHandle pin; - - [SecuritySafeCritical] - public Request() - { - survivors = new Object[1 + (int)(Test.AllocationVolume*Test.SurvivalRate)/100]; - int i = 0; - int volume = 0; - - //allocate half of the request size. - while (volume < Test.AllocationVolume/2) - { - volume += AllocHalfVolume(++i, Test.SurvivalRate); - } - - //allocate one pinned buffer - pin = GCHandle.Alloc(new byte[100], GCHandleType.Pinned); - - //allocate the rest of the request - while (volume < Test.AllocationVolume) - { - volume += AllocHalfVolume(++i, Test.SurvivalRate); - } - - } - - // unpins and releases the pinned buffer - [SecuritySafeCritical] - ~Request() - { - pin.Free(); - } - - [SecuritySafeCritical] - private int AllocHalfVolume(int index, float survFraction) - { - int allocSurv = Test.Rand.Next(100, 2000 + 2*index); - int alloc = (int)(allocSurv / survFraction) - allocSurv; - - // create garbage - int garbage=0; - while (garbage < alloc) - { - int size = Test.Rand.Next(10, 200+2*garbage); - Object x = new byte[size]; - garbage+=size; - } - survivors[index] = new byte[allocSurv]; - return allocSurv + alloc; - } - - } - - public class Test - { - - public static Random Rand; - public static int NumRequests = 0; - public static int AllocationVolume = 0; - public static float SurvivalRate = 0.6f; - - public void Go() - { - int steadyStateFactor = 5; - Request[] requests = new Request[NumRequests]; - int instRequests = 0; - int totalReqs = 0; - int nreqsToSteady = 0; - bool done = false; - - while (!done) - { - totalReqs++; - int i = Rand.Next(0, NumRequests); - if (requests[i] != null) - { - requests[i] = null; - } - else - { - instRequests++; - } - requests[i] = new Request(); - - if (instRequests == NumRequests) - { - if (nreqsToSteady == 0) - { - nreqsToSteady = totalReqs; - Console.WriteLine ("Took {0} iterations to reach steady state", nreqsToSteady); - } - else if (totalReqs == steadyStateFactor*nreqsToSteady) - { - done = true; - } - } - } - - for (int i = 0; i < NumRequests; i++) - { - requests[i] = null; - } - - } - - - public static void Usage() - { - Console.WriteLine("Usage:"); - Console.WriteLine("Fragment [random seed]"); - } - - - static public int Main (String[] args) - { - int numIterations = 0; - int randomSeed = 0; - - switch (args.Length) - { - case 0: - // use defaults - numIterations = 1; - NumRequests = 1200; - AllocationVolume = 100000; - randomSeed = (int)DateTime.Now.Ticks; - Console.WriteLine("Using defaults: {0} {1} {2}", numIterations, NumRequests, AllocationVolume); - - break; - case 3: - case 4: - if ( (!Int32.TryParse(args[0], out numIterations)) || - (!Int32.TryParse(args[1], out NumRequests)) || - (!Int32.TryParse(args[2], out AllocationVolume)) ) - { - goto default; - } - - if (args.Length==4) - { - if (!Int32.TryParse(args[3], out randomSeed)) - { - goto default; - } - } - else - { - randomSeed = (int)DateTime.Now.Ticks; - } - - break; - default: - Usage(); - return 1; - } - - Console.WriteLine("Using random seed: {0}", randomSeed ); - Rand = new Random(randomSeed); - - try - { - for (int j=0; j - /// we might want to implement a different strategy that decide the life time of the object based on the time - /// elapsed since the last object access. - /// - /// - class TimeBasedLifeTimeStrategy : LifeTimeStrategy - { - private int lastMediumTickCount = Environment.TickCount; - private int lastShortTickCount = Environment.TickCount; - private int lastMediumIndex = 0; - private int lastShortIndex = 0; - - public int NextObject(LifeTimeENUM lifeTime) - { - switch (lifeTime) - { - case LifeTimeENUM.Short: - return lastShortIndex; - case LifeTimeENUM.Medium: - return lastMediumIndex; - case LifeTimeENUM.Long: - return 0; - } - return 0; - } - - public bool ShouldDie(LifeTime o, int index) - { - - LifeTimeENUM lifeTime = o.LifeTime; - // short objects will live for 20 seconds, long objects will live for more. - switch (lifeTime) - { - case LifeTimeENUM.Short: - if (Environment.TickCount - lastShortTickCount > 1) // this is in accureat enumber, since - // we will be finsh iterating throuh the short life time object in less than 1 ms , so we need - // to switch either to QueryPeroformanceCounter, or to block the loop for some time through - // Thread.Sleep, the other solution is to increase the number of objects a lot. - { - lastShortTickCount = Environment.TickCount; - lastShortIndex = index; - return true; - } - - break; - case LifeTimeENUM.Medium: - if (Environment.TickCount - lastMediumTickCount > 20) - { - lastMediumTickCount = Environment.TickCount; - lastMediumIndex = index; - return true; - } - - break; - case LifeTimeENUM.Long: - break; - } - return false; - } - } - - class ObjectWrapper : LifeTime, PinnedObject - { - - private bool pinned; - private bool weakReferenced; - private GCHandle gcHandle; - private LifeTimeENUM lifeTime; - private WeakReference weakRef; - - private byte[] data; - private int dataSize; - public int DataSize - { - set - { - dataSize = value; - data = new byte[dataSize]; - if (pinned) - { - gcHandle = GCHandle.Alloc(data, GCHandleType.Pinned); - } - - if (weakReferenced) - { - weakRef = new WeakReference(data); - } - } - - } - - public LifeTimeENUM LifeTime - { - get - { - return lifeTime; - } - set - { - this.lifeTime = value; - } - } - - public bool IsPinned() - { - return pinned; - } - - public bool IsWeak() - { - return weakReferenced; - } - - - public void CleanUp() - { - if (pinned) - { - gcHandle.Free(); - } - } - - public ObjectWrapper(bool runFinalizer, bool pinned, bool weakReferenced) - { - this.pinned = pinned; - this.weakReferenced = weakReferenced; - if (!runFinalizer) - { - GC.SuppressFinalize(this); - } - } - - - ~ObjectWrapper() - { - // DO SOMETHING BAD IN FINALIZER - data = new byte[dataSize]; - } - } - - class ClientSimulator - { - [ThreadStatic] - private static ObjectLifeTimeManager lifeTimeManager; - - private static int meanAllocSize = 17; - - private static int mediumLifeTime = 30; - private static int shortLifeTime = 3; - - private static int mediumDataSize = meanAllocSize; - private static int shortDataSize = meanAllocSize; - - private static int mediumDataCount = 1000000; - private static int shortDataCount = 5000; - - private static int countIters = 500; - private static float percentPinned = 0.02F; - private static float percentWeak = 0.0F; - - private static int numThreads = 1; - - private static bool runFinalizer = false; - private static string strategy = "Random"; - - private static bool noTimer = false; - - private static string objectGraph = "List"; - - - private static List threadList = new List(); - public static void Main(string[] args) - { - - bool shouldContinue = ParseArgs(args); - if (!shouldContinue) - { - return; - } - - int timer = 0; - // Run the test. - - for (int i = 0; i < numThreads; ++i) - { - Thread thread = new Thread(RunTest); - threadList.Add(thread); - thread.Start(); - - } - - foreach (Thread t in threadList) - { - t.Join(); - } - } - - - public static void RunTest(object threadInfoObj) - { - - // Allocate the objects. - lifeTimeManager = new ObjectLifeTimeManager(); - LifeTimeStrategy ltStrategy; - - int threadMediumLifeTime = mediumLifeTime; - int threadShortLifeTime = shortLifeTime; - int threadMediumDataSize = mediumDataSize; - int threadShortDataSize = shortDataSize; - int threadMediumDataCount = mediumDataCount; - int threadShortDataCount = shortDataCount; - float threadPercentPinned = percentPinned; - float threadPercentWeak = percentWeak; - bool threadRunFinalizer = runFinalizer; - string threadStrategy = strategy; - string threadObjectGraph = objectGraph; - - if (threadObjectGraph.ToLower() == "tree") - { - lifeTimeManager.SetObjectContainer(new BinaryTreeObjectContainer()); - } - else - { - lifeTimeManager.SetObjectContainer(new ArrayObjectContainer()); - } - - lifeTimeManager.Init(threadShortDataCount + threadMediumDataCount); - - - if (threadStrategy.ToLower()=="random") - { - ltStrategy = new RandomLifeTimeStrategy(threadMediumLifeTime, threadShortLifeTime, threadMediumDataCount, threadShortDataCount); - } - else - { - // may be we need to specify the elapsed time. - ltStrategy = new TimeBasedLifeTimeStrategy(); - } - - lifeTimeManager.LifeTimeStrategy = ltStrategy; - lifeTimeManager.objectDied += new ObjectDiedEventHandler(objectDied); - - for (int i=0; i < threadShortDataCount + threadMediumDataCount; ++i) - { - bool pinned = false; - if (threadPercentPinned!=0) - { - pinned = (i % ((int)(1/threadPercentPinned))==0); - } - - bool weak = false; - if (threadPercentWeak!=0) - { - weak = (i % ((int)(1/threadPercentWeak))==0); - } - - ObjectWrapper oWrapper = new ObjectWrapper(threadRunFinalizer, pinned, weak); - if (i < threadShortDataCount) - { - oWrapper.DataSize = threadShortDataSize; - oWrapper.LifeTime = LifeTimeENUM.Short; - } - else - { - oWrapper.DataSize = threadMediumDataSize; - oWrapper.LifeTime = LifeTimeENUM.Medium; - } - - lifeTimeManager.AddObject(oWrapper, i); - } - - for (int i = 0; i < countIters; ++i) - { - - // Run the test. - lifeTimeManager.Run(); - } - - } - - private static void objectDied(LifeTime lifeTime, int index) - { - // put a new fresh object instead; - - LifeTimeENUM lifeTimeEnum; - lifeTimeEnum = lifeTime.LifeTime; - - ObjectWrapper oWrapper = lifeTime as ObjectWrapper; - bool weakReferenced = oWrapper.IsWeak(); - bool pinned = oWrapper.IsPinned(); - if (pinned) - { - oWrapper.CleanUp(); - } - - oWrapper = new ObjectWrapper(runFinalizer, pinned, weakReferenced); - oWrapper.LifeTime = lifeTimeEnum; - oWrapper.DataSize = lifeTime.LifeTime == LifeTimeENUM.Short ? shortDataSize : mediumDataSize; - lifeTimeManager.AddObject(oWrapper, index); - } - - /// - /// Parse the arguments, no error checking is done yet. - /// TODO: Add more error checking. - /// - /// Populate variables with defaults, then overwrite them with config settings. Finally overwrite them with command line parameters - /// - public static bool ParseArgs(string[] args) - { - - for (int i = 0; i < args.Length; ++i) - { - string currentArg = args[i]; - string currentArgValue; - if (currentArg.StartsWith("-") || currentArg.StartsWith("/")) - { - currentArg = currentArg.Substring(1); - } - else - { - continue; - } - - if (currentArg.StartsWith("?")) - { - Usage(); - return false; - } - if (currentArg.StartsWith("iter") || currentArg.Equals("i")) // number of iterations - { - currentArgValue = args[++i]; - countIters = Int32.Parse(currentArgValue); - } - if (currentArg.StartsWith("datasize") || currentArg.Equals("dz")) - { - currentArgValue = args[++i]; - mediumDataSize = Int32.Parse(currentArgValue); - } - - if (currentArg.StartsWith("sdatasize") || currentArg.Equals("sdz")) - { - currentArgValue = args[++i]; - shortDataSize = Int32.Parse(currentArgValue); - } - - if (currentArg.StartsWith("datacount") || currentArg.Equals("dc")) - { - currentArgValue = args[++i]; - mediumDataCount = Int32.Parse(currentArgValue); - } - - if (currentArg.StartsWith("sdatacount") || currentArg.Equals("sdc")) - { - currentArgValue = args[++i]; - shortDataCount = Int32.Parse(currentArgValue); - } - - - if (currentArg.StartsWith("lifetime") || currentArg.Equals("lt")) - { - currentArgValue = args[++i]; - shortLifeTime = Int32.Parse(currentArgValue); - mediumLifeTime = shortLifeTime * 10; - } - - if (currentArg.StartsWith("threads") || currentArg.Equals("t")) - { - currentArgValue = args[++i]; - numThreads = Int32.Parse(currentArgValue); - } - if (currentArg.StartsWith("fin") || currentArg.Equals("f")) - { - runFinalizer = true; - } - - if (currentArg.StartsWith("datapinned") || currentArg.StartsWith("dp")) // percentage data pinned - { - currentArgValue = args[++i]; - percentPinned = float.Parse(currentArgValue); - } - - if (currentArg.StartsWith("strategy")) //strategy that if the object died or not - { - currentArgValue = args[++i]; - strategy = currentArgValue; - } - - if (currentArg.StartsWith("notimer")) - { - noTimer = true; - } - - if (currentArg.StartsWith("dataweak") || currentArg.StartsWith("dw") ) - { - currentArgValue = args[++i]; - percentWeak = float.Parse(currentArgValue); - } - - if (currentArg.StartsWith("objectgraph") || currentArg.StartsWith("og") ) - { - currentArgValue = args[++i]; - objectGraph = currentArgValue; - } - } - - return true; - } - - public static void Usage() - { - Console.WriteLine("GCSimulator [-?] [-i ] [-dz ] [-lt ] [-t ] [-f] [-dp ]"); - Console.WriteLine("Options"); - Console.WriteLine("-? Display the usage and exit"); - Console.WriteLine("-i [-iter] : specify number of iterations for the test, default is " + countIters); - Console.WriteLine("-dz [-datasize] : specify the data size in bytes, default is " + mediumDataSize); - Console.WriteLine("-sdz [sdatasize] : specify the short lived data size in bytes, default is " + shortDataSize); - Console.WriteLine("-dc [datacount] : specify the medium lived data count , default is " + mediumDataCount); - Console.WriteLine("-sdc [sdatacount] : specify the short lived data count, default is " + shortDataCount); - Console.WriteLine("-lt [-lifetime] : specify the life time of the objects, default is " + shortLifeTime); - Console.WriteLine("-t [-threads] : specifiy number of threads , default is " + numThreads); - Console.WriteLine("-f [-fin] : specify whether to do allocation in finalizer or not, default is no"); - Console.WriteLine("-dp [-datapinned] : specify the percentage of data that we want to pin, default is " + percentPinned); - Console.WriteLine("-dw [-dataweak] : specify the percentage of data that we want to weak reference, default is " + percentWeak); - Console.WriteLine("-strategy < indicate the strategy for deciding when the objects should die, right now we support only Random and Time strategy, default is Random"); - Console.WriteLine("-og [-objectgraph] : specify whether to use a List- or Tree-based object graph, default is " + objectGraph); - Console.WriteLine("-notimer < indicate that we do not want to run the performance timer and output any results , default is no"); - } - - } -} diff --git a/src/coreclr/tests/src/GC/Performance/Tests/WeakReferenceTest.cs b/src/coreclr/tests/src/GC/Performance/Tests/WeakReferenceTest.cs deleted file mode 100644 index 4c98e2ca3084..000000000000 --- a/src/coreclr/tests/src/GC/Performance/Tests/WeakReferenceTest.cs +++ /dev/null @@ -1,384 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -class WeakReferenceTest -{ - // test variables - private Object[] m_objectArray; - private WeakReference[] m_wrArray; - private const int m_numWRs = 50; - private long m_numIters; - private bool m_alive = true; - - public static void Usage() - { - Console.WriteLine("USAGE: WeakReference.exe "); - } - - static void Main(string[] args) - { - if (args.Length!=3) - { - Usage(); - return; - } - - long iterations = 0; - if (!long.TryParse(args[0], out iterations)) - { - Usage(); - return; - } - - bool alive = true; - if (args[1].ToLower()=="dead") - { - alive = false; - Console.WriteLine("Using dead targets"); - } - - WeakReferenceTest test = new WeakReferenceTest(iterations, alive); - test.Init(); - - switch (args[2].ToLower()) - { - case "gettarget": - test.GetTargetTest(); - break; - case "settarget": - test.SetTargetTest(); - break; - case "isalive": - test.IsAliveTest(); - break; - case "alloc": - test.AllocTest(false); - break; - case "alloctrack": - test.AllocTest(true); - break; - default: - Usage(); - break; - } - - } - - - public WeakReferenceTest(long numIters, bool alive) - { - m_numIters = numIters; - m_alive = alive; - - m_objectArray = new Object[m_numWRs]; - m_wrArray = new WeakReference[m_numWRs]; - - for (int i = 0; i < m_numWRs; ++i) - { - if (m_alive) - { - // create a new string object - String s = "blah" + i; - m_objectArray[i] = s; - } - else - { - // set to null - m_objectArray[i] = null; - } - - } - - //GC now to get that out of the way - GC.Collect(); - } - - - public void Init() - { - - for (int i = 0; i < m_numWRs; ++i) - { - m_wrArray[i] = new WeakReference(m_objectArray[i]); - } - GC.Collect(); - - } - - public void AllocTest(bool trackResurrection) - { - - for (long i = 0; i < m_numIters; i++) - { - m_wrArray[0] = new WeakReference(m_objectArray[0], trackResurrection); - m_wrArray[1] = new WeakReference(m_objectArray[1], trackResurrection); - m_wrArray[2] = new WeakReference(m_objectArray[2], trackResurrection); - m_wrArray[3] = new WeakReference(m_objectArray[3], trackResurrection); - m_wrArray[4] = new WeakReference(m_objectArray[4], trackResurrection); - m_wrArray[5] = new WeakReference(m_objectArray[5], trackResurrection); - m_wrArray[6] = new WeakReference(m_objectArray[6], trackResurrection); - m_wrArray[7] = new WeakReference(m_objectArray[7], trackResurrection); - m_wrArray[8] = new WeakReference(m_objectArray[8], trackResurrection); - m_wrArray[9] = new WeakReference(m_objectArray[9], trackResurrection); - - m_wrArray[10] = new WeakReference(m_objectArray[10], trackResurrection); - m_wrArray[11] = new WeakReference(m_objectArray[11], trackResurrection); - m_wrArray[12] = new WeakReference(m_objectArray[12], trackResurrection); - m_wrArray[13] = new WeakReference(m_objectArray[13], trackResurrection); - m_wrArray[14] = new WeakReference(m_objectArray[14], trackResurrection); - m_wrArray[15] = new WeakReference(m_objectArray[15], trackResurrection); - m_wrArray[16] = new WeakReference(m_objectArray[16], trackResurrection); - m_wrArray[17] = new WeakReference(m_objectArray[17], trackResurrection); - m_wrArray[18] = new WeakReference(m_objectArray[18], trackResurrection); - m_wrArray[19] = new WeakReference(m_objectArray[19], trackResurrection); - - m_wrArray[20] = new WeakReference(m_objectArray[20], trackResurrection); - m_wrArray[21] = new WeakReference(m_objectArray[21], trackResurrection); - m_wrArray[22] = new WeakReference(m_objectArray[22], trackResurrection); - m_wrArray[23] = new WeakReference(m_objectArray[23], trackResurrection); - m_wrArray[24] = new WeakReference(m_objectArray[24], trackResurrection); - m_wrArray[25] = new WeakReference(m_objectArray[25], trackResurrection); - m_wrArray[26] = new WeakReference(m_objectArray[26], trackResurrection); - m_wrArray[27] = new WeakReference(m_objectArray[27], trackResurrection); - m_wrArray[28] = new WeakReference(m_objectArray[28], trackResurrection); - m_wrArray[29] = new WeakReference(m_objectArray[29], trackResurrection); - - m_wrArray[30] = new WeakReference(m_objectArray[30], trackResurrection); - m_wrArray[31] = new WeakReference(m_objectArray[31], trackResurrection); - m_wrArray[32] = new WeakReference(m_objectArray[32], trackResurrection); - m_wrArray[33] = new WeakReference(m_objectArray[33], trackResurrection); - m_wrArray[34] = new WeakReference(m_objectArray[34], trackResurrection); - m_wrArray[35] = new WeakReference(m_objectArray[35], trackResurrection); - m_wrArray[36] = new WeakReference(m_objectArray[36], trackResurrection); - m_wrArray[37] = new WeakReference(m_objectArray[37], trackResurrection); - m_wrArray[38] = new WeakReference(m_objectArray[38], trackResurrection); - m_wrArray[39] = new WeakReference(m_objectArray[39], trackResurrection); - - m_wrArray[40] = new WeakReference(m_objectArray[40], trackResurrection); - m_wrArray[41] = new WeakReference(m_objectArray[41], trackResurrection); - m_wrArray[42] = new WeakReference(m_objectArray[42], trackResurrection); - m_wrArray[43] = new WeakReference(m_objectArray[43], trackResurrection); - m_wrArray[44] = new WeakReference(m_objectArray[44], trackResurrection); - m_wrArray[45] = new WeakReference(m_objectArray[45], trackResurrection); - m_wrArray[46] = new WeakReference(m_objectArray[46], trackResurrection); - m_wrArray[47] = new WeakReference(m_objectArray[47], trackResurrection); - m_wrArray[48] = new WeakReference(m_objectArray[48], trackResurrection); - m_wrArray[49] = new WeakReference(m_objectArray[49], trackResurrection); - - for (int j=0; j< m_wrArray.Length; j++) - { - m_wrArray[j] = null; - } - - GC.Collect(); - - } - - } - - - - public void SetTargetTest() - { - Init(); - - for (long i = 0; i < m_numIters; i++) - { - m_wrArray[0].Target = m_objectArray[0]; - m_wrArray[1].Target = m_objectArray[1]; - m_wrArray[2].Target = m_objectArray[2]; - m_wrArray[3].Target = m_objectArray[3]; - m_wrArray[4].Target = m_objectArray[4]; - m_wrArray[5].Target = m_objectArray[5]; - m_wrArray[6].Target = m_objectArray[6]; - m_wrArray[7].Target = m_objectArray[7]; - m_wrArray[8].Target = m_objectArray[8]; - m_wrArray[9].Target = m_objectArray[9]; - - m_wrArray[10].Target = m_objectArray[10]; - m_wrArray[11].Target = m_objectArray[11]; - m_wrArray[12].Target = m_objectArray[12]; - m_wrArray[13].Target = m_objectArray[13]; - m_wrArray[14].Target = m_objectArray[14]; - m_wrArray[15].Target = m_objectArray[15]; - m_wrArray[16].Target = m_objectArray[16]; - m_wrArray[17].Target = m_objectArray[17]; - m_wrArray[18].Target = m_objectArray[18]; - m_wrArray[19].Target = m_objectArray[19]; - - m_wrArray[20].Target = m_objectArray[20]; - m_wrArray[21].Target = m_objectArray[21]; - m_wrArray[22].Target = m_objectArray[22]; - m_wrArray[23].Target = m_objectArray[23]; - m_wrArray[24].Target = m_objectArray[24]; - m_wrArray[25].Target = m_objectArray[25]; - m_wrArray[26].Target = m_objectArray[26]; - m_wrArray[27].Target = m_objectArray[27]; - m_wrArray[28].Target = m_objectArray[28]; - m_wrArray[29].Target = m_objectArray[29]; - - m_wrArray[30].Target = m_objectArray[30]; - m_wrArray[31].Target = m_objectArray[31]; - m_wrArray[32].Target = m_objectArray[32]; - m_wrArray[33].Target = m_objectArray[33]; - m_wrArray[34].Target = m_objectArray[34]; - m_wrArray[35].Target = m_objectArray[35]; - m_wrArray[36].Target = m_objectArray[36]; - m_wrArray[37].Target = m_objectArray[37]; - m_wrArray[38].Target = m_objectArray[38]; - m_wrArray[39].Target = m_objectArray[39]; - - m_wrArray[40].Target = m_objectArray[40]; - m_wrArray[41].Target = m_objectArray[41]; - m_wrArray[42].Target = m_objectArray[42]; - m_wrArray[43].Target = m_objectArray[43]; - m_wrArray[44].Target = m_objectArray[44]; - m_wrArray[45].Target = m_objectArray[45]; - m_wrArray[46].Target = m_objectArray[46]; - m_wrArray[47].Target = m_objectArray[47]; - m_wrArray[48].Target = m_objectArray[48]; - m_wrArray[49].Target = m_objectArray[49]; - - } - - } - - public void GetTargetTest() - { - - Init(); - Object o = null; - - for (long i = 0; i < m_numIters; i++) - { - o = m_wrArray[0].Target; - o = m_wrArray[1].Target; - o = m_wrArray[2].Target; - o = m_wrArray[3].Target; - o = m_wrArray[4].Target; - o = m_wrArray[5].Target; - o = m_wrArray[6].Target; - o = m_wrArray[7].Target; - o = m_wrArray[8].Target; - o = m_wrArray[9].Target; - - o = m_wrArray[10].Target; - o = m_wrArray[11].Target; - o = m_wrArray[12].Target; - o = m_wrArray[13].Target; - o = m_wrArray[14].Target; - o = m_wrArray[15].Target; - o = m_wrArray[16].Target; - o = m_wrArray[17].Target; - o = m_wrArray[18].Target; - o = m_wrArray[19].Target; - - o = m_wrArray[20].Target; - o = m_wrArray[21].Target; - o = m_wrArray[22].Target; - o = m_wrArray[23].Target; - o = m_wrArray[24].Target; - o = m_wrArray[25].Target; - o = m_wrArray[26].Target; - o = m_wrArray[27].Target; - o = m_wrArray[28].Target; - o = m_wrArray[29].Target; - - o = m_wrArray[30].Target; - o = m_wrArray[31].Target; - o = m_wrArray[32].Target; - o = m_wrArray[33].Target; - o = m_wrArray[34].Target; - o = m_wrArray[35].Target; - o = m_wrArray[36].Target; - o = m_wrArray[37].Target; - o = m_wrArray[38].Target; - o = m_wrArray[39].Target; - - o = m_wrArray[40].Target; - o = m_wrArray[41].Target; - o = m_wrArray[42].Target; - o = m_wrArray[43].Target; - o = m_wrArray[44].Target; - o = m_wrArray[45].Target; - o = m_wrArray[46].Target; - o = m_wrArray[47].Target; - o = m_wrArray[48].Target; - o = m_wrArray[49].Target; - - } - - } - - - public void IsAliveTest() - { - bool b = false; - Init(); - - for (int i = 0; i < m_numIters; i++) - { - - b = m_wrArray[0].IsAlive; - b = m_wrArray[1].IsAlive; - b = m_wrArray[2].IsAlive; - b = m_wrArray[3].IsAlive; - b = m_wrArray[4].IsAlive; - b = m_wrArray[5].IsAlive; - b = m_wrArray[6].IsAlive; - b = m_wrArray[7].IsAlive; - b = m_wrArray[8].IsAlive; - b = m_wrArray[9].IsAlive; - - b = m_wrArray[10].IsAlive; - b = m_wrArray[11].IsAlive; - b = m_wrArray[12].IsAlive; - b = m_wrArray[13].IsAlive; - b = m_wrArray[14].IsAlive; - b = m_wrArray[15].IsAlive; - b = m_wrArray[16].IsAlive; - b = m_wrArray[17].IsAlive; - b = m_wrArray[18].IsAlive; - b = m_wrArray[19].IsAlive; - - b = m_wrArray[20].IsAlive; - b = m_wrArray[21].IsAlive; - b = m_wrArray[22].IsAlive; - b = m_wrArray[23].IsAlive; - b = m_wrArray[24].IsAlive; - b = m_wrArray[25].IsAlive; - b = m_wrArray[26].IsAlive; - b = m_wrArray[27].IsAlive; - b = m_wrArray[28].IsAlive; - b = m_wrArray[29].IsAlive; - - b = m_wrArray[30].IsAlive; - b = m_wrArray[31].IsAlive; - b = m_wrArray[32].IsAlive; - b = m_wrArray[33].IsAlive; - b = m_wrArray[34].IsAlive; - b = m_wrArray[35].IsAlive; - b = m_wrArray[36].IsAlive; - b = m_wrArray[37].IsAlive; - b = m_wrArray[38].IsAlive; - b = m_wrArray[39].IsAlive; - - b = m_wrArray[40].IsAlive; - b = m_wrArray[41].IsAlive; - b = m_wrArray[42].IsAlive; - b = m_wrArray[43].IsAlive; - b = m_wrArray[44].IsAlive; - b = m_wrArray[45].IsAlive; - b = m_wrArray[46].IsAlive; - b = m_wrArray[47].IsAlive; - b = m_wrArray[48].IsAlive; - b = m_wrArray[49].IsAlive; - - } - - } - -} diff --git a/src/coreclr/tests/src/GC/Performance/Tests/lifetimefx.cs b/src/coreclr/tests/src/GC/Performance/Tests/lifetimefx.cs deleted file mode 100644 index 5356b6cf08cf..000000000000 --- a/src/coreclr/tests/src/GC/Performance/Tests/lifetimefx.cs +++ /dev/null @@ -1,310 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/* - * A Simple Framework to manage the life time of of objects - * Objects are required to implement LifeTime Interface in order to keep track of their lifetime. - * TODO: we need to add flexibility to the framework to control the type of datastructure used to keep track - * of the objects. Right now we are using a simple 1 D array , but other interesting datastructures can be - * used instead like a HashTable. - */ -using System; -using System.Collections.Generic; - -namespace LifeTimeFX -{ - public enum LifeTimeENUM - { - Short, - Medium, - Long - } - - public interface LifeTime - { - LifeTimeENUM LifeTime - { - get; - set; - } - - } - - public interface LifeTimeStrategy - { - int NextObject(LifeTimeENUM lifeTime); - bool ShouldDie(LifeTime o, int index); - } - - /// - /// This interfact abstract the object contaienr , allowing us to specify differnt datastructures - /// implementation. - /// The only restriction on the ObjectContainer is that the objects contained in it must implement - /// LifeTime interface. - /// Right now we have a simple array container as a stock implementation for that. for more information - /// see code:#ArrayContainer - /// - /// - /// - - public interface ObjectContainer where T:LifeTime - { - void Init(int numberOfObjects); - void AddObjectAt(T o, int index); - T GetObject(int index); - T SetObjectAt(T o , int index); - int Count - { - get; - } - } - - - public sealed class BinaryTreeObjectContainer : ObjectContainer where T:LifeTime - { - - class Node - { - public Node LeftChild; - public Node RightChild; - public int id; - public T Data; - - } - - - - private Node root; - private int count; - - public BinaryTreeObjectContainer() - { - root = null; - count = 0; - } - - public void Init(int numberOfObjects) - { - - if (numberOfObjects<=0) - { - return; - } - - root = new Node(); - root.id = 0; - count = numberOfObjects; - if (numberOfObjects>1) - { - int depth = (int)Math.Log(numberOfObjects,2)+1; - - root.LeftChild = CreateTree(depth-1, 1); - root.RightChild = CreateTree(depth-1, 2); - } - - - } - - public void AddObjectAt(T o, int index) - { - Node node = Find(index); - - if (node!=null) - { - node.Data = o; - } - - } - - - public T GetObject(int index) - { - - - Node node = Find(index); - - if (node==null) - { - return default(T); - } - - return node.Data; - - } - - public T SetObjectAt(T o , int index) - { - - Node node = Find(index); - - if (node==null) - { - return default(T); - } - - T old = node.Data; - node.Data = o; - return old; - - } - - public int Count - { - get - { - return count; - } - } - - - - private Node CreateTree(int depth, int id) - { - if (depth<=0) - { - return null; - } - - Node node = new Node(); - node.id = id; - node.LeftChild = CreateTree(depth-1, id*2+1); - node.RightChild = CreateTree(depth-1, id*2+2); - - return node; - } - - private Node Find(int id) - { - - List path = new List(); - - // find the path from node to root - int n=id; - while (n>0) - { - path.Add(n); - n = (int)Math.Ceiling( ((double)n/2.0) ) - 1; - } - - // follow the path from root to node - Node node = root; - for (int i=path.Count-1; i>=0; i--) - { - if (path[i]==(id*2+1)) - { - node = node.LeftChild; - } - else - { - node = node.RightChild; - } - - } - - return node; - } - - } - - - -//#ArrayContainer Simple Array Stock Implemntation for ObjectContainer - public sealed class ArrayObjectContainer : ObjectContainer where T:LifeTime - { - private T[] objContainer = null; - public void Init(int numberOfObjects) - { - objContainer = new T[numberOfObjects]; - - } - - public void AddObjectAt(T o, int index) - { - objContainer[index] = o; - } - - public T GetObject(int index) - { - return objContainer[index]; - } - - public T SetObjectAt(T o, int index) - { - T old = objContainer[index]; - objContainer[index] = o; - return old; - } - - public int Count - { - get - { - return objContainer.Length; - } - } - } - - - - public delegate void ObjectDiedEventHandler(LifeTime o, int index ); - - public sealed class ObjectLifeTimeManager - { - private LifeTimeStrategy strategy; - - private ObjectContainer objectContainer = null; - // - - public void SetObjectContainer (ObjectContainer objectContainer) - { - this.objectContainer = objectContainer; - } - - public event ObjectDiedEventHandler objectDied; - - public void Init(int numberObjects) - { - objectContainer.Init(numberObjects); - //objContainer = new object[numberObjects]; - } - - public LifeTimeStrategy LifeTimeStrategy - { - set - { - strategy = value; - } - } - - public void AddObject(LifeTime o, int index) - { - objectContainer.AddObjectAt(o, index); - //objContainer[index] = o; - } - - public void Run() - { - - - LifeTime objLifeTime; - - for (int i = 0; i < objectContainer.Count; ++i) - { - objLifeTime = objectContainer.GetObject(i); - //object o = objContainer[i]; - //objLifeTime = o as LifeTime; - - if (strategy.ShouldDie(objLifeTime, i)) - { - int index = strategy.NextObject(objLifeTime.LifeTime); - LifeTime oldObject = objectContainer.SetObjectAt(null, index); - //objContainer[index] = null; - // fire the event - objectDied(oldObject, index); - } - - } - } - } -} diff --git a/src/coreclr/tests/src/GC/Scenarios/GCSimulator/GCSimulator.cs b/src/coreclr/tests/src/GC/Scenarios/GCSimulator/GCSimulator.cs deleted file mode 100644 index 803fca2706d6..000000000000 --- a/src/coreclr/tests/src/GC/Scenarios/GCSimulator/GCSimulator.cs +++ /dev/null @@ -1,523 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Threading; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using LifeTimeFX; - -interface PinnedObject -{ - void CleanUp(); - bool IsPinned(); - -} - -namespace GCSimulator -{ - - class RandomLifeTimeStrategy : LifeTimeStrategy - { - private int counter = 0; - private int mediumLifeTime = 30; - private int shortLifeTime = 3; - private int mediumDataCount = 1000000; - private int shortDataCount = 5000; - - private Random rand = new Random(123456); - - public RandomLifeTimeStrategy(int mediumlt, int shortlt, int mdc, int sdc) - { - mediumLifeTime = mediumlt; - shortLifeTime = shortlt; - mediumDataCount = mdc; - shortDataCount = sdc; - - } - public int MediumLifeTime - { - set - { - mediumLifeTime = value; - } - } - public int ShortLifeTime - { - set - { - shortLifeTime = value; - } - } - - public int NextObject(LifeTimeENUM lifeTime) - { - switch (lifeTime) - { - case LifeTimeENUM.Short: - return rand.Next() % shortDataCount; - - case LifeTimeENUM.Medium: - return (rand.Next() % mediumDataCount) + shortDataCount; - - - case LifeTimeENUM.Long: - return 0; - } - return 0; - } - public bool ShouldDie(LifeTime o, int index) - { - counter++; - LifeTimeENUM lifeTime = o.LifeTime; - switch (lifeTime) - { - case LifeTimeENUM.Short: - if (counter % shortLifeTime == 0) - return true; - break; - case LifeTimeENUM.Medium: - if (counter % mediumLifeTime == 0) - return true; - break; - case LifeTimeENUM.Long: - return false; - - } - return false; - } - } - - /// - /// we might want to implement a different strategy that decide the life time of the object based on the time - /// elapsed since the last object access. - /// - /// - class TimeBasedLifeTimeStrategy : LifeTimeStrategy - { - private int lastMediumTickCount = Environment.TickCount; - private int lastShortTickCount = Environment.TickCount; - private int lastMediumIndex = 0; - private int lastShortIndex = 0; - - public int NextObject(LifeTimeENUM lifeTime) - { - switch (lifeTime) - { - case LifeTimeENUM.Short: - return lastShortIndex; - case LifeTimeENUM.Medium: - return lastMediumIndex; - case LifeTimeENUM.Long: - return 0; - } - return 0; - } - - public bool ShouldDie(LifeTime o, int index) - { - - LifeTimeENUM lifeTime = o.LifeTime; - // short objects will live for 20 seconds, long objects will live for more. - switch (lifeTime) - { - case LifeTimeENUM.Short: - if (Environment.TickCount - lastShortTickCount > 1) // this is in accureat enumber, since - // we will be finsh iterating throuh the short life time object in less than 1 ms , so we need - // to switch either to QueryPeroformanceCounter, or to block the loop for some time through - // Thread.Sleep, the other solution is to increase the number of objects a lot. - { - lastShortTickCount = Environment.TickCount; - lastShortIndex = index; - return true; - } - - break; - case LifeTimeENUM.Medium: - if (Environment.TickCount - lastMediumTickCount > 20) - { - lastMediumTickCount = Environment.TickCount; - lastMediumIndex = index; - return true; - } - - break; - case LifeTimeENUM.Long: - break; - } - return false; - } - } - - class ObjectWrapper : LifeTime, PinnedObject - { - - private bool pinned; - private bool weakReferenced; - private GCHandle gcHandle; - private LifeTimeENUM lifeTime; - private WeakReference weakRef; - - private byte[] data; - private int dataSize; - public int DataSize - { - set - { - dataSize = value; - data = new byte[dataSize]; - if (pinned) - { - gcHandle = GCHandle.Alloc(data, GCHandleType.Pinned); - } - - if (weakReferenced) - { - weakRef = new WeakReference(data); - } - } - - } - - public LifeTimeENUM LifeTime - { - get - { - return lifeTime; - } - set - { - this.lifeTime = value; - } - } - - public bool IsPinned() - { - return pinned; - } - - public bool IsWeak() - { - return weakReferenced; - } - - - public void CleanUp() - { - if (pinned) - { - gcHandle.Free(); - } - } - - public ObjectWrapper(bool runFinalizer, bool pinned, bool weakReferenced) - { - this.pinned = pinned; - this.weakReferenced = weakReferenced; - if (!runFinalizer) - { - GC.SuppressFinalize(this); - } - } - - - ~ObjectWrapper() - { - // DO SOMETHING BAD IN FINALIZER - data = new byte[dataSize]; - } - } - - class ClientSimulator - { - [ThreadStatic] - private static ObjectLifeTimeManager lifeTimeManager; - - private static int meanAllocSize = 17; - - private static int mediumLifeTime = 30; - private static int shortLifeTime = 3; - - private static int mediumDataSize = meanAllocSize; - private static int shortDataSize = meanAllocSize; - - private static int mediumDataCount = 1000000; - private static int shortDataCount = 5000; - - private static int countIters = 500; - private static float percentPinned = 0.02F; - private static float percentWeak = 0.0F; - - private static int numThreads = 1; - - private static bool runFinalizer = false; - private static string strategy = "Random"; - - private static bool noTimer = false; - - private static string objectGraph = "List"; - - - private static List threadList = new List(); - public static int Main(string[] args) - { - - bool shouldContinue = ParseArgs(args); - if (!shouldContinue) - { - return 1; - } - - int timer = 0; - // Run the test. - - for (int i = 0; i < numThreads; ++i) - { - Thread thread = new Thread(RunTest); - threadList.Add(thread); - thread.Start(); - - } - - foreach (Thread t in threadList) - { - t.Join(); - } - - return 100; - } - - - public static void RunTest(object threadInfoObj) - { - - // Allocate the objects. - lifeTimeManager = new ObjectLifeTimeManager(); - LifeTimeStrategy ltStrategy; - - int threadMediumLifeTime = mediumLifeTime; - int threadShortLifeTime = shortLifeTime; - int threadMediumDataSize = mediumDataSize; - int threadShortDataSize = shortDataSize; - int threadMediumDataCount = mediumDataCount; - int threadShortDataCount = shortDataCount; - float threadPercentPinned = percentPinned; - float threadPercentWeak = percentWeak; - bool threadRunFinalizer = runFinalizer; - string threadStrategy = strategy; - string threadObjectGraph = objectGraph; - - if (threadObjectGraph.ToLower() == "tree") - { - lifeTimeManager.SetObjectContainer(new BinaryTreeObjectContainer()); - } - else - { - lifeTimeManager.SetObjectContainer(new ArrayObjectContainer()); - } - - lifeTimeManager.Init(threadShortDataCount + threadMediumDataCount); - - - if (threadStrategy.ToLower()=="random") - { - ltStrategy = new RandomLifeTimeStrategy(threadMediumLifeTime, threadShortLifeTime, threadMediumDataCount, threadShortDataCount); - } - else - { - // may be we need to specify the elapsed time. - ltStrategy = new TimeBasedLifeTimeStrategy(); - } - - lifeTimeManager.LifeTimeStrategy = ltStrategy; - lifeTimeManager.objectDied += new ObjectDiedEventHandler(objectDied); - - for (int i=0; i < threadShortDataCount + threadMediumDataCount; ++i) - { - bool pinned = false; - if (threadPercentPinned!=0) - { - pinned = (i % ((int)(1/threadPercentPinned))==0); - } - - bool weak = false; - if (threadPercentWeak!=0) - { - weak = (i % ((int)(1/threadPercentWeak))==0); - } - - ObjectWrapper oWrapper = new ObjectWrapper(threadRunFinalizer, pinned, weak); - if (i < threadShortDataCount) - { - oWrapper.DataSize = threadShortDataSize; - oWrapper.LifeTime = LifeTimeENUM.Short; - } - else - { - oWrapper.DataSize = threadMediumDataSize; - oWrapper.LifeTime = LifeTimeENUM.Medium; - } - - lifeTimeManager.AddObject(oWrapper, i); - } - - for (int i = 0; i < countIters; ++i) - { - - // Run the test. - lifeTimeManager.Run(); - } - - } - - private static void objectDied(LifeTime lifeTime, int index) - { - // put a new fresh object instead; - - LifeTimeENUM lifeTimeEnum; - lifeTimeEnum = lifeTime.LifeTime; - - ObjectWrapper oWrapper = lifeTime as ObjectWrapper; - bool weakReferenced = oWrapper.IsWeak(); - bool pinned = oWrapper.IsPinned(); - if (pinned) - { - oWrapper.CleanUp(); - } - - oWrapper = new ObjectWrapper(runFinalizer, pinned, weakReferenced); - oWrapper.LifeTime = lifeTimeEnum; - oWrapper.DataSize = lifeTime.LifeTime == LifeTimeENUM.Short ? shortDataSize : mediumDataSize; - lifeTimeManager.AddObject(oWrapper, index); - } - - /// - /// Parse the arguments, no error checking is done yet. - /// TODO: Add more error checking. - /// - /// Populate variables with defaults, then overwrite them with config settings. Finally overwrite them with command line parameters - /// - public static bool ParseArgs(string[] args) - { - - for (int i = 0; i < args.Length; ++i) - { - string currentArg = args[i]; - string currentArgValue; - if (currentArg.StartsWith("-") || currentArg.StartsWith("/")) - { - currentArg = currentArg.Substring(1); - } - else - { - continue; - } - - if (currentArg.StartsWith("?")) - { - Usage(); - return false; - } - if (currentArg.StartsWith("iter") || currentArg.Equals("i")) // number of iterations - { - currentArgValue = args[++i]; - countIters = Int32.Parse(currentArgValue); - } - if (currentArg.StartsWith("datasize") || currentArg.Equals("dz")) - { - currentArgValue = args[++i]; - mediumDataSize = Int32.Parse(currentArgValue); - } - - if (currentArg.StartsWith("sdatasize") || currentArg.Equals("sdz")) - { - currentArgValue = args[++i]; - shortDataSize = Int32.Parse(currentArgValue); - } - - if (currentArg.StartsWith("datacount") || currentArg.Equals("dc")) - { - currentArgValue = args[++i]; - mediumDataCount = Int32.Parse(currentArgValue); - } - - if (currentArg.StartsWith("sdatacount") || currentArg.Equals("sdc")) - { - currentArgValue = args[++i]; - shortDataCount = Int32.Parse(currentArgValue); - } - - - if (currentArg.StartsWith("lifetime") || currentArg.Equals("lt")) - { - currentArgValue = args[++i]; - shortLifeTime = Int32.Parse(currentArgValue); - mediumLifeTime = shortLifeTime * 10; - } - - if (currentArg.StartsWith("threads") || currentArg.Equals("t")) - { - currentArgValue = args[++i]; - numThreads = Int32.Parse(currentArgValue); - } - if (currentArg.StartsWith("fin") || currentArg.Equals("f")) - { - runFinalizer = true; - } - - if (currentArg.StartsWith("datapinned") || currentArg.StartsWith("dp")) // percentage data pinned - { - currentArgValue = args[++i]; - percentPinned = float.Parse(currentArgValue); - } - - if (currentArg.StartsWith("strategy")) //strategy that if the object died or not - { - currentArgValue = args[++i]; - strategy = currentArgValue; - } - - if (currentArg.StartsWith("notimer")) - { - noTimer = true; - } - - if (currentArg.StartsWith("dataweak") || currentArg.StartsWith("dw") ) - { - currentArgValue = args[++i]; - percentWeak = float.Parse(currentArgValue); - } - - if (currentArg.StartsWith("objectgraph") || currentArg.StartsWith("og") ) - { - currentArgValue = args[++i]; - objectGraph = currentArgValue; - } - } - - return true; - } - - public static void Usage() - { - Console.WriteLine("GCSimulator [-?] [-i ] [-dz ] [-lt ] [-t ] [-f] [-dp ]"); - Console.WriteLine("Options"); - Console.WriteLine("-? Display the usage and exit"); - Console.WriteLine("-i [-iter] : specify number of iterations for the test, default is " + countIters); - Console.WriteLine("-dz [-datasize] : specify the data size in bytes, default is " + mediumDataSize); - Console.WriteLine("-sdz [sdatasize] : specify the short lived data size in bytes, default is " + shortDataSize); - Console.WriteLine("-dc [datacount] : specify the medium lived data count , default is " + mediumDataCount); - Console.WriteLine("-sdc [sdatacount] : specify the short lived data count, default is " + shortDataCount); - Console.WriteLine("-lt [-lifetime] : specify the life time of the objects, default is " + shortLifeTime); - Console.WriteLine("-t [-threads] : specifiy number of threads , default is " + numThreads); - Console.WriteLine("-f [-fin] : specify whether to do allocation in finalizer or not, default is no"); - Console.WriteLine("-dp [-datapinned] : specify the percentage of data that we want to pin, default is " + percentPinned); - Console.WriteLine("-dw [-dataweak] : specify the percentage of data that we want to weak reference, default is " + percentWeak); - Console.WriteLine("-strategy < indicate the strategy for deciding when the objects should die, right now we support only Random and Time strategy, default is Random"); - Console.WriteLine("-og [-objectgraph] : specify whether to use a List- or Tree-based object graph, default is " + objectGraph); - Console.WriteLine("-notimer < indicate that we do not want to run the performance timer and output any results , default is no"); - } - - } -} diff --git a/src/coreclr/tests/src/GC/Scenarios/GCSimulator/lifetimefx.cs b/src/coreclr/tests/src/GC/Scenarios/GCSimulator/lifetimefx.cs deleted file mode 100644 index 5356b6cf08cf..000000000000 --- a/src/coreclr/tests/src/GC/Scenarios/GCSimulator/lifetimefx.cs +++ /dev/null @@ -1,310 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/* - * A Simple Framework to manage the life time of of objects - * Objects are required to implement LifeTime Interface in order to keep track of their lifetime. - * TODO: we need to add flexibility to the framework to control the type of datastructure used to keep track - * of the objects. Right now we are using a simple 1 D array , but other interesting datastructures can be - * used instead like a HashTable. - */ -using System; -using System.Collections.Generic; - -namespace LifeTimeFX -{ - public enum LifeTimeENUM - { - Short, - Medium, - Long - } - - public interface LifeTime - { - LifeTimeENUM LifeTime - { - get; - set; - } - - } - - public interface LifeTimeStrategy - { - int NextObject(LifeTimeENUM lifeTime); - bool ShouldDie(LifeTime o, int index); - } - - /// - /// This interfact abstract the object contaienr , allowing us to specify differnt datastructures - /// implementation. - /// The only restriction on the ObjectContainer is that the objects contained in it must implement - /// LifeTime interface. - /// Right now we have a simple array container as a stock implementation for that. for more information - /// see code:#ArrayContainer - /// - /// - /// - - public interface ObjectContainer where T:LifeTime - { - void Init(int numberOfObjects); - void AddObjectAt(T o, int index); - T GetObject(int index); - T SetObjectAt(T o , int index); - int Count - { - get; - } - } - - - public sealed class BinaryTreeObjectContainer : ObjectContainer where T:LifeTime - { - - class Node - { - public Node LeftChild; - public Node RightChild; - public int id; - public T Data; - - } - - - - private Node root; - private int count; - - public BinaryTreeObjectContainer() - { - root = null; - count = 0; - } - - public void Init(int numberOfObjects) - { - - if (numberOfObjects<=0) - { - return; - } - - root = new Node(); - root.id = 0; - count = numberOfObjects; - if (numberOfObjects>1) - { - int depth = (int)Math.Log(numberOfObjects,2)+1; - - root.LeftChild = CreateTree(depth-1, 1); - root.RightChild = CreateTree(depth-1, 2); - } - - - } - - public void AddObjectAt(T o, int index) - { - Node node = Find(index); - - if (node!=null) - { - node.Data = o; - } - - } - - - public T GetObject(int index) - { - - - Node node = Find(index); - - if (node==null) - { - return default(T); - } - - return node.Data; - - } - - public T SetObjectAt(T o , int index) - { - - Node node = Find(index); - - if (node==null) - { - return default(T); - } - - T old = node.Data; - node.Data = o; - return old; - - } - - public int Count - { - get - { - return count; - } - } - - - - private Node CreateTree(int depth, int id) - { - if (depth<=0) - { - return null; - } - - Node node = new Node(); - node.id = id; - node.LeftChild = CreateTree(depth-1, id*2+1); - node.RightChild = CreateTree(depth-1, id*2+2); - - return node; - } - - private Node Find(int id) - { - - List path = new List(); - - // find the path from node to root - int n=id; - while (n>0) - { - path.Add(n); - n = (int)Math.Ceiling( ((double)n/2.0) ) - 1; - } - - // follow the path from root to node - Node node = root; - for (int i=path.Count-1; i>=0; i--) - { - if (path[i]==(id*2+1)) - { - node = node.LeftChild; - } - else - { - node = node.RightChild; - } - - } - - return node; - } - - } - - - -//#ArrayContainer Simple Array Stock Implemntation for ObjectContainer - public sealed class ArrayObjectContainer : ObjectContainer where T:LifeTime - { - private T[] objContainer = null; - public void Init(int numberOfObjects) - { - objContainer = new T[numberOfObjects]; - - } - - public void AddObjectAt(T o, int index) - { - objContainer[index] = o; - } - - public T GetObject(int index) - { - return objContainer[index]; - } - - public T SetObjectAt(T o, int index) - { - T old = objContainer[index]; - objContainer[index] = o; - return old; - } - - public int Count - { - get - { - return objContainer.Length; - } - } - } - - - - public delegate void ObjectDiedEventHandler(LifeTime o, int index ); - - public sealed class ObjectLifeTimeManager - { - private LifeTimeStrategy strategy; - - private ObjectContainer objectContainer = null; - // - - public void SetObjectContainer (ObjectContainer objectContainer) - { - this.objectContainer = objectContainer; - } - - public event ObjectDiedEventHandler objectDied; - - public void Init(int numberObjects) - { - objectContainer.Init(numberObjects); - //objContainer = new object[numberObjects]; - } - - public LifeTimeStrategy LifeTimeStrategy - { - set - { - strategy = value; - } - } - - public void AddObject(LifeTime o, int index) - { - objectContainer.AddObjectAt(o, index); - //objContainer[index] = o; - } - - public void Run() - { - - - LifeTime objLifeTime; - - for (int i = 0; i < objectContainer.Count; ++i) - { - objLifeTime = objectContainer.GetObject(i); - //object o = objContainer[i]; - //objLifeTime = o as LifeTime; - - if (strategy.ShouldDie(objLifeTime, i)) - { - int index = strategy.NextObject(objLifeTime.LifeTime); - LifeTime oldObject = objectContainer.SetObjectAt(null, index); - //objContainer[index] = null; - // fire the event - objectDied(oldObject, index); - } - - } - } - } -} diff --git a/src/coreclr/tests/src/GC/Scenarios/Samples/gc.cs b/src/coreclr/tests/src/GC/Scenarios/Samples/gc.cs deleted file mode 100644 index 7b3e38f68c24..000000000000 --- a/src/coreclr/tests/src/GC/Scenarios/Samples/gc.cs +++ /dev/null @@ -1,532 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*===================================================================== - File: GC.cs - - Summary: Demonstrates how the garbage collector works. - ---------------------------------------------------------------------- - This file is part of the Microsoft COM+ 2.0 SDK Code Samples. - - Copyright (C) 2000 Microsoft Corporation. All rights reserved. - -This source code is intended only as a supplement to Microsoft -Development Tools and/or on-line documentation. See these other -materials for detailed information regarding Microsoft code samples. - -THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A -PARTICULAR PURPOSE. -=====================================================================*/ - - -// Add the classes in the following namespaces to our namespace -using System; -using System.Threading; - - -/////////////////////////////////////////////////////////////////////////////// - - -// Note that deriving from Object is optional since it is always implied -public class BaseObj : Object { - private String name; // Each object has a name to help identify it - - // Note that explicitly calling the base class's constructor is - // optional since the compiler ensures it anyway. - // Also note that there is no concept of a destructor. - public BaseObj(String name) : base() { - this.name = name; - Display("BaseObj Constructor"); - } - - public void Display(String status) { - Application.Display(String.Format("Obj({0}): {1}", name, status)); - } - - // A Finalize method is the closest thing to a destructor but many of the - // semantics are different. The demos in this application demonstrate this. - //protected override void Finalize() { - ~BaseObj() { - Display("BaseObj Finalize"); - - // If possible, do not have a Finalize method for your class. Finalize - // methods usually run when the heap is low on available storage - // and needs to be garbage collected. This can hurt application - // performance significantly. - - // If you must implement a Finalize method, make it run fast, avoid - // synchronizing on other threads, do not block, and - // avoid raising any exceptions (although the Finalizer thread - // automatically recovers from any unhandled exceptions). - - // NOTE: In the future, exceptions may be caught using an - // AppDomain-registered unhandled Finalize Exception Handler - - // While discouraged, you may call methods on object's referred - // to by this object. However, you must be aware that the other - // objects may have already had their Finalize method called - // causing these objects to be in an unpredictable state. - // This is because the system does not guarantees that - // Finalizers will be called in any particular order. - } -} - - -/////////////////////////////////////////////////////////////////////////////// - - -// This class shows how to derive a class from another class and how base class -// Finalize methods are NOT automatically called. By contrast, base class -// destructors (in unmanaged code) are automatically called. -// This is one example of how destructors and Finalize methods differ. -public class DerivedObj : BaseObj { - public DerivedObj(String s) : base(s) { - Display("DerivedObj Constructor"); - } - - //protected override void Finalize() { - ~DerivedObj() { - Display("DerivedObj Finalize"); - - // The GC has a special thread dedicated to executing Finalize - // methods. You can tell that this thread is different from the - // application's main thread by comparing the thread's hash codes. - Display("Finalize thread's hash code: " - + Thread.CurrentThread.GetHashCode()); - - // BaseObj's Finalize is NOT called unless you execute the line below - // base.Finalize(); //commented by vaishak due to breaking change - } -} - - -/////////////////////////////////////////////////////////////////////////////// - - -// This class shows how an object can resurrect itself -public class ResurrectObj : BaseObj { - - // Indicates if object should resurrect itself when collected - private Boolean allowResurrection = true; // Assume resurrection - - public ResurrectObj(String s) : base(s) { - Display("ResurrectObj Constructor"); - } - - public void SetResurrection(Boolean allowResurrection) { - this.allowResurrection = allowResurrection; - } - - //protected override void Finalize() { - ~ResurrectObj() { - Display("ResurrectObj Finalize"); - if (allowResurrection) { - Display("This object is being resurrected"); - // Resurrect this object by making something refer to it - Application.ResObjHolder = this; - - // When the GC calls an object's Finalize method, it assumes that - // there is no need to ever call it again. However, we've now - // resurrected this object and the line below forces the GC to call - // this object's Finalize again when the object is destroyed again. - // BEWARE: If ReRegisterForFinalize is called multiple times, the - // object's Finalize method will be called multiple times. - GC.ReRegisterForFinalize(this); - - // If this object contains a member referencing another object, - // The other object may have been finalized before this object - // gets resurrected. Note that resurrecting this object forces - // the referenced object to be resurrected as well. This object - // can continue to use the referenced object even though it was - // finalized. - - } else { - Display("This object is NOT being resurrected"); - } - } -} - - -/////////////////////////////////////////////////////////////////////////////// - - -// This class shows how the GC improves performance using generations -public class GenObj : BaseObj { - public GenObj(String s) : base(s) { - Display("GenObj Constructor"); - } - - public void DisplayGeneration() { - Display(String.Format("Generation: {0}", GC.GetGeneration(this))); - } -} - - -/////////////////////////////////////////////////////////////////////////////// - - -// This class shows the proper way to implement explicit cleanup. -public class DisposeObj : BaseObj { - public DisposeObj(String s) : base(s) { - Display("DisposeObj Constructor"); - } - - // When an object of this type wants to be explicitly cleaned-up, the user - // of this object should call Dispose at the desired code location. - public void Dispose() { - Display("DisposeObj Dispose"); - // Usually Dispose() calls Finalize so that you can - // implement all the cleanup code in one place. - // Finalize(); //commented by vaishak due to breaking change - - // Tell the garbage collector that the object doesn't require any - // cleanup when collected since Dispose was called explicitly. - GC.SuppressFinalize(this); - } - - // Put the object cleanup code in the Finalize method - //protected override void Finalize() { - ~DisposeObj(){ - Display("DisposeObj Finalize"); - // This function can be called by Dispose() or by the GC - // If called by Dispose, the application's thread executes this code - // If called by the GC, then a special GC thread executes this code - } -} - - -/////////////////////////////////////////////////////////////////////////////// - - -// This class represents the application itself -class Application { - static private int indent = 0; - - static public void Display(String s) { - for (int x = 0; x < indent * 3; x++) - Console.Write(" "); - Console.WriteLine(s); - } - - static public void Display(int preIndent, String s, int postIndent) { - indent += preIndent; - Display(s); - indent += postIndent; - } - - static public void Collect() { - Display(0, "Forcing a garbage collection", 0); - GC.Collect(); - } - - static public void Collect(int generation) { - Display(0, "Forcing a garbage collection of generation " + generation, 0); - GC.Collect(generation); - } - - static public void WaitForFinalizers() { - Display(0, "Waiting for Finalizers to complete", +1); - GC.WaitForPendingFinalizers(); - Display(-1, "Finalizers are complete", 0); - } - - // This method demonstrates how the GC works. - private static void Introduction() { - Display(0, "\n\nDemo start: Introduction to Garbage Collection.", +1); - - // Create a new DerivedObj in the managed heap - // Note: Both BaseObj and DerivedObj constructors are called - DerivedObj obj = new DerivedObj("Introduction"); - - obj = null; // We no longer need this object - - // The object is unreachable so forcing a GC causes it to be finalized. - Collect(); - - // Wait for the GC's Finalize thread to finish - // executing all queued Finalize methods. - WaitForFinalizers(); - // NOTE: The GC calls the most-derived (farthest away from - // the Object base class) Finalize only. - // Base class Finalize functions are called only if the most-derived - // Finalize method explicitly calls its base class's Finalize method. - - // This is the same test as above with one slight variation - obj = new DerivedObj("Introduction"); - // obj = null; // Variation: this line is commented out - Collect(); - WaitForFinalizers(); - // Notice that we get identical results as above: the Finalize method - // runs because the jitter's optimizer knows that obj is not - // referenced later in this function. - - Display(-1, "Demo stop: Introduction to Garbage Collection.", 0); - } - - - // This reference is accessed in the ResurrectObj.Finalize method and - // is used to create a strong reference to an object (resurrecting it). - static public ResurrectObj ResObjHolder; // Defaults to null - - - // These methods demonstrate how the GC supports resurrection. - // NOTE: Resurrection is discouraged. - private static void ResurrectionInit() { - // Create a ResurrectionObj - ResurrectObj obj = new ResurrectObj("Resurrection"); - - // Destroy all strong references to the new ResurrectionObj - obj = null; - } - - private static void ResurrectionDemo() { - Display(0, "\n\nDemo start: Object Resurrection.", +1); - - // Create a ResurrectionObj and drop it on the floor. - ResurrectionInit(); - - // Force the GC to determine that the object is unreachable. - Collect(); - WaitForFinalizers(); // You should see the Finalize method called. - - // However, the ResurrectionObj's Finalize method - // resurrects the object keeping it alive. It does this by placing a - // reference to the dying-object in Application.ResObjHolder - - // You can see that ResurrectionObj still exists because - // the following line doesn't raise an exception. - ResObjHolder.Display("Still alive after Finalize called"); - - // Prevent the ResurrectionObj object from resurrecting itself again, - ResObjHolder.SetResurrection(false); - - // Now, let's destroy this last reference to the ResurrectionObj - ResObjHolder = null; - - // Force the GC to determine that the object is unreachable. - Collect(); - WaitForFinalizers(); // You should see the Finalize method called. - Display(-1, "Demo stop: Object Resurrection.", 0); - } - - - // This method demonstrates how to implement a type that allows its users - // to explicitly dispose/close the object. For many object's this paradigm - // is strongly encouranged. - private static void DisposeDemo() { - Display(0, "\n\nDemo start: Disposing an object versus Finalize.", +1); - DisposeObj obj = new DisposeObj("Explicitly disposed"); - obj.Dispose(); // Explicitly cleanup this object, Finalize should run - obj = null; - Collect(); - WaitForFinalizers(); // Finalize should NOT run (it was suppressed) - - obj = new DisposeObj("Implicitly disposed"); - obj = null; - Collect(); - WaitForFinalizers(); // No explicit cleanup, Finalize SHOULD run - Display(-1, "Demo stop: Disposing an object versus Finalize.", 0); - } - - - // This method demonstrates the unbalanced nature of ReRegisterForFinalize - // and SuppressFinalize. The main point is if your code makes multiple - // calls to ReRegisterForFinalize (without intervening calls to - // SuppressFinalize) the Finalize method may get called multiple times. - private static void FinalizationQDemo() { - Display(0, "\n\nDemo start: Suppressing and ReRegistering for Finalize.", +1); - // Since this object has a Finalize method, a reference to the object - // will be added to the finalization queue. - BaseObj obj = new BaseObj("Finalization Queue"); - - // Add another 2 references onto the finalization queue - // NOTE: Don't do this in a normal app. This is only for demo purposes. - GC.ReRegisterForFinalize(obj); - GC.ReRegisterForFinalize(obj); - - // There are now 3 references to this object on the finalization queue. - - // Set a bit flag on this object indicating that it should NOT be finalized. - GC.SuppressFinalize(obj); - - // There are now 3 references to this object on the finalization queue. - // If the object were unreachable, the 1st call to this object's Finalize - // method will be discarded but the 2nd & 3rd calls to Finalize will execute. - - // Sets the same bit effectively doing nothing! - GC.SuppressFinalize(obj); - - obj = null; // Remove the strong reference to the object. - - // Force a GC so that the object gets finalized - Collect(); - // NOTE: Finalize is called twice because only the 1st call is suppressed! - WaitForFinalizers(); - Display(-1, "Demo stop: Suppressing and ReRegistering for Finalize.", 0); - } - - - // This method demonstrates how objects are promoted between generations. - // Applications could take advantage of this info to improve performance - // but most applications will ignore this information. - private static void GenerationDemo() { - Display(0, "\n\nDemo start: Understanding Generations.", +1); - - // Let's see how many generations the managed heap supports (we know it's 2) - Display("Maximum GC generations: " + GC.MaxGeneration); - - // Create a new BaseObj in the heap - GenObj obj = new GenObj("Generation"); - - // Since this object is newly created, it should be in generation 0 - obj.DisplayGeneration(); // Displays 0 - - // Performing a GC promotes the object's generation - Collect(); - obj.DisplayGeneration(); // Displays 1 - - Collect(); - obj.DisplayGeneration(); // Displays 2 - - Collect(); - obj.DisplayGeneration(); // Displays 2 (max generation) - - obj = null; // Destroy the strong reference to this object - - Collect(0); // Collect objects in generation 0 - WaitForFinalizers(); // We should see nothing - - Collect(1); // Collect objects in generation 1 - WaitForFinalizers(); // We should see nothing - - Collect(2); // Same as Collect() - WaitForFinalizers(); // Now, we should see the Finalize method run - - Display(-1, "Demo stop: Understanding Generations.", 0); - } - - - // This method demonstrates how weak references (WR) work. A WR allows - // the GC to collect objects if the managed heap is low on memory. - // WRs are useful to apps that have large amounts of easily-reconstructed - // data that they want to keep around to improve performance. But, if the - // system is low on memory, the objects can be destroyed and replaced when - // the app knows that it needs it again. - private static void WeakRefDemo(Boolean trackResurrection) { - Display(0, String.Format( - "\n\nDemo start: WeakReferences that {0}track resurrections.", - trackResurrection ? "" : "do not "), +1); - - // Create an object - BaseObj obj = new BaseObj("WeakRef"); - - // Create a WeakReference object that refers to the new object - WeakReference wr = new WeakReference(obj, trackResurrection); - - // The object is still reachable, so it is not finalized. - Collect(); - WaitForFinalizers(); // The Finalize method should NOT execute - obj.Display("Still exists"); - - // Let's remove the strong reference to the object - obj = null; // Destroy strong reference to this object - - // The following line creates a strong reference to the object - obj = (BaseObj) wr.Target; - Display("Strong reference to object obtained: " + (obj != null)); - - obj = null; // Destroy strong reference to this object again. - - // The GC considers the object to be unreachable and collects it. - Collect(); - WaitForFinalizers(); // Finalize should run. - - // This object resurrects itself when its Finalize method is called. - // If wr is NOT tracking resurrection, wr thinks the object is dead - // If wr is tracking resurrection, wr thinks the object is still alive - - // NOTE: If the object referred to by wr doesn't have a Finalize method, - // then wr would think that the object is dead regardless of whether - // wr is tracking resurrection or not. For example: - // Object obj = new Object(); // Object doesn't have a Finalize method - // WeakReference wr = new WeakReference(obj, true); - // obj = null; - // Collect(); - // WaitForFinalizers(); // Does nothing - // obj = (Object) wr.Target; // returns null - - // The following line attempts to create a strong reference to the object - obj = (BaseObj) wr.Target; - Display("Strong reference to object obtained: " + (obj != null)); - - if (obj != null) { - // The strong reference was obtained so this wr must be - // tracking resurrection. At this point we have a strong - // reference to an object that has been finalized but its memory - // has not yet been reclaimed by the collector. - obj.Display("See, I'm still alive"); - - obj = null; // Destroy the strong reference to the object - - // Collect reclaims the object's memory since this object - // has no Finalize method registered for it anymore. - Collect(); - WaitForFinalizers(); // We should see nothing here - - obj = (BaseObj) wr.Target; // This now returns null - Display("Strong reference to object obtained: " + (obj != null)); - } - - // Cleanup everything about this demo so there is no affect on the next demo - obj = null; // Destroy strong reference (if it exists) - wr = null; // Destroy the WeakReference object (optional) - Collect(); - WaitForFinalizers(); - - // NOTE: You are dicouraged from using the WeakReference.IsAlive property - // because the object may be killed immediately after IsAlive returns - // making the return value incorrect. If the Target property returns - // a non-null value, then the object is alive and will stay alive - // since you have a reference to it. If Target returns null, then the - // object is dead. - Display(-1, String.Format("Demo stop: WeakReferences that {0}track resurrections.", - trackResurrection ? "" : "do not "), 0); - } - - - public static int Main(String[] args) { - // Environment.ExitCode = 1; - Display("To fully understand this sample, you should step through the"); - Display("code in the debugger while monitoring the output generated.\n"); - Display("NOTE: The demos in this application assume that no garbage"); - Display(" collections occur naturally. To ensure this, the sample"); - Display(" objects are small in size and few are allocated.\n"); - Display("Main thread's hash code: " + Thread.CurrentThread.GetHashCode()); - - Introduction(); // GC introduction - ResurrectionDemo(); // Demos object resurrection - DisposeDemo(); // Demos the use of Dispose & Finalize - FinalizationQDemo(); // Demos the use of SuppressFinalize & ReRegisterForFinalize - GenerationDemo(); // Demos GC generations - WeakRefDemo(false); // Demos WeakReferences without resurrection tracking - WeakRefDemo(true); // Demos WeakReferences with resurrection tracking - - // Demos Finalize on Shutdown symantics (this demo is inline) - Display(0, "\n\nDemo start: Finalize on shutdown.", +1); - - // When Main returns, obj will have its Finalize method called. - BaseObj obj = new BaseObj("Shutdown"); - - // This is the last line of code executed before the application terminates. - Display(-1, "Demo stop: Finalize on shutdown (application is now terminating)", 0); - - return 100; - } -} - - -///////////////////////////////// End of File ///////////////////////////////// diff --git a/src/coreclr/tests/src/GC/Stress/Tests/GCSimulator.cs b/src/coreclr/tests/src/GC/Stress/Tests/GCSimulator.cs deleted file mode 100644 index 32a95f5f09dd..000000000000 --- a/src/coreclr/tests/src/GC/Stress/Tests/GCSimulator.cs +++ /dev/null @@ -1,916 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Diagnostics; -using System; -using System.Threading; -using System.Collections.Generic; -using System.Runtime.InteropServices; - -// disable warning about unused weakref -#pragma warning disable 414 - -internal interface PinnedObject -{ - void CleanUp(); - bool IsPinned(); -} - -namespace GCSimulator -{ - public enum LifeTimeENUM - { - Short, - Medium, - Long - } - - public interface LifeTime - { - LifeTimeENUM LifeTime - { - get; - set; - } - } - - public interface LifeTimeStrategy - { - int NextObject(LifeTimeENUM lifeTime); - bool ShouldDie(LifeTime o, int index); - } - - /// - /// This interfact abstract the object contaienr , allowing us to specify differnt datastructures - /// implementation. - /// The only restriction on the ObjectContainer is that the objects contained in it must implement - /// LifeTime interface. - /// Right now we have a simple array container as a stock implementation for that. for more information - /// see code:#ArrayContainer - /// - /// - /// - - public interface ObjectContainer where T : LifeTime - { - void Init(int numberOfObjects); - void AddObjectAt(T o, int index); - T GetObject(int index); - T SetObjectAt(T o, int index); - int Count - { - get; - } - } - - - public sealed class BinaryTreeObjectContainer : ObjectContainer where T : LifeTime - { - private class Node - { - public Node LeftChild; - public Node RightChild; - public int id; - public T Data; - } - - - - private Node _root; - private int _count; - - public BinaryTreeObjectContainer() - { - _root = null; - _count = 0; - } - - public void Init(int numberOfObjects) - { - if (numberOfObjects <= 0) - { - return; - } - - _root = new Node(); - _root.id = 0; - // the total number of objects in a binary search tree = (2^n+1) - 1 - // where n is the depth of the tree - int depth = (int)Math.Log(numberOfObjects, 2); - - _count = numberOfObjects; - - _root.LeftChild = CreateTree(depth, 1); - _root.RightChild = CreateTree(depth, 2); - } - - public void AddObjectAt(T o, int index) - { - Node node = Find(index, _root); - - if (node != null) - { - node.Data = o; - } - } - - - public T GetObject(int index) - { - Node node = Find(index, _root); - - if (node == null) - { - return default(T); - } - - return node.Data; - } - - public T SetObjectAt(T o, int index) - { - Node node = Find(index, _root); - - if (node == null) - { - return default(T); - } - - T old = node.Data; - node.Data = o; - return old; - } - - public int Count - { - get - { - return _count; - } - } - - - - private Node CreateTree(int depth, int id) - { - if (depth <= 0 || id >= Count) - { - return null; - } - - - Node node = new Node(); - node.id = id; - - node.LeftChild = CreateTree(depth - 1, id * 2 + 1); - node.RightChild = CreateTree(depth - 1, id * 2 + 2); - - return node; - } - - private Node Find(int id, Node node) - { - // we want to implement find and try to avoid creating temp objects.. - // Our Tree is fixed size, we don;t allow modifying the actual - // tree by adding or deleting nodes ( that would be more - // interesting, but would give us inconsistent perf numbers. - - // Traverse the tree ( slow, but avoids allocation ), we can write - // another tree that is a BST, or use SortedList which uses - // BST as the implementation - - if (node == null) - return null; - if (id == node.id) - return node; - - Node retNode = null; - // find in the left child - retNode = Find(id, node.LeftChild); - - // if not found, try the right child. - if (retNode == null) - retNode = Find(id, node.RightChild); - - return retNode; - } - } - - - - //#ArrayContainer Simple Array Stock Implemntation for ObjectContainer - public sealed class ArrayObjectContainer : ObjectContainer where T : LifeTime - { - private T[] _objContainer = null; - public void Init(int numberOfObjects) - { - _objContainer = new T[numberOfObjects]; - } - - public void AddObjectAt(T o, int index) - { - _objContainer[index] = o; - } - - public T GetObject(int index) - { - return _objContainer[index]; - } - - public T SetObjectAt(T o, int index) - { - T old = _objContainer[index]; - _objContainer[index] = o; - return old; - } - - public int Count - { - get - { - return _objContainer.Length; - } - } - } - - - - public delegate void ObjectDiedEventHandler(LifeTime o, int index); - - public sealed class ObjectLifeTimeManager - { - private LifeTimeStrategy _strategy; - - private ObjectContainer _objectContainer = null; - // - - public void SetObjectContainer(ObjectContainer objectContainer) - { - _objectContainer = objectContainer; - } - - public event ObjectDiedEventHandler objectDied; - - public void Init(int numberObjects) - { - _objectContainer.Init(numberObjects); - //objContainer = new object[numberObjects]; - } - - public LifeTimeStrategy LifeTimeStrategy - { - set - { - _strategy = value; - } - } - - public void AddObject(LifeTime o, int index) - { - _objectContainer.AddObjectAt(o, index); - //objContainer[index] = o; - } - - public void Run() - { - LifeTime objLifeTime; - - for (int i = 0; i < _objectContainer.Count; ++i) - { - objLifeTime = _objectContainer.GetObject(i); - //object o = objContainer[i]; - //objLifeTime = o as LifeTime; - - if (_strategy.ShouldDie(objLifeTime, i)) - { - int index = _strategy.NextObject(objLifeTime.LifeTime); - LifeTime oldObject = _objectContainer.SetObjectAt(null, index); - //objContainer[index] = null; - // fire the event - objectDied(oldObject, index); - } - } - } - } - - internal class RandomLifeTimeStrategy : LifeTimeStrategy - { - private int _counter = 0; - private int _mediumLifeTime = 30; - private int _shortLifeTime = 3; - private int _mediumDataCount = 1000000; - private int _shortDataCount = 5000; - - private Random _rand = new Random(123456); - - public RandomLifeTimeStrategy(int mediumlt, int shortlt, int mdc, int sdc) - { - _mediumLifeTime = mediumlt; - _shortLifeTime = shortlt; - _mediumDataCount = mdc; - _shortDataCount = sdc; - } - public int MediumLifeTime - { - set - { - _mediumLifeTime = value; - } - } - public int ShortLifeTime - { - set - { - _shortLifeTime = value; - } - } - - public int NextObject(LifeTimeENUM lifeTime) - { - switch (lifeTime) - { - case LifeTimeENUM.Short: - return _rand.Next() % _shortDataCount; - - case LifeTimeENUM.Medium: - return (_rand.Next() % _mediumDataCount) + _shortDataCount; - - - case LifeTimeENUM.Long: - return 0; - } - return 0; - } - public bool ShouldDie(LifeTime o, int index) - { - _counter++; - LifeTimeENUM lifeTime = o.LifeTime; - switch (lifeTime) - { - case LifeTimeENUM.Short: - if (_counter % _shortLifeTime == 0) - return true; - break; - case LifeTimeENUM.Medium: - if (_counter % _mediumLifeTime == 0) - return true; - break; - case LifeTimeENUM.Long: - return false; - } - return false; - } - } - - /// - /// we might want to implement a different strategy that decide the life time of the object based on the time - /// elapsed since the last object access. - /// - /// - internal class TimeBasedLifeTimeStrategy : LifeTimeStrategy - { - private int _lastMediumTickCount = Environment.TickCount; - private int _lastShortTickCount = Environment.TickCount; - private int _lastMediumIndex = 0; - private int _lastShortIndex = 0; - - public int NextObject(LifeTimeENUM lifeTime) - { - switch (lifeTime) - { - case LifeTimeENUM.Short: - return _lastShortIndex; - case LifeTimeENUM.Medium: - return _lastMediumIndex; - case LifeTimeENUM.Long: - return 0; - } - return 0; - } - - public bool ShouldDie(LifeTime o, int index) - { - LifeTimeENUM lifeTime = o.LifeTime; - // short objects will live for 20 seconds, long objects will live for more. - switch (lifeTime) - { - case LifeTimeENUM.Short: - if (Environment.TickCount - _lastShortTickCount > 1) // this is in accureat enumber, since - // we will be finsh iterating throuh the short life time object in less than 1 ms , so we need - // to switch either to QueryPeroformanceCounter, or to block the loop for some time through - // Thread.Sleep, the other solution is to increase the number of objects a lot. - { - _lastShortTickCount = Environment.TickCount; - _lastShortIndex = index; - return true; - } - - break; - case LifeTimeENUM.Medium: - if (Environment.TickCount - _lastMediumTickCount > 20) - { - _lastMediumTickCount = Environment.TickCount; - _lastMediumIndex = index; - return true; - } - - break; - case LifeTimeENUM.Long: - break; - } - return false; - } - } - - internal class ObjectWrapper : LifeTime, PinnedObject - { - private bool _pinned; - private bool _weakReferenced; - private GCHandle _gcHandle; - private LifeTimeENUM _lifeTime; - private WeakReference _weakRef; - - private byte[] _data; - private int _dataSize; - public int DataSize - { - set - { - _dataSize = value; - _data = new byte[_dataSize]; - if (_pinned) - { - _gcHandle = GCHandle.Alloc(_data, GCHandleType.Pinned); - } - - if (_weakReferenced) - { - _weakRef = new WeakReference(_data); - _data = null; - } - } - } - - public LifeTimeENUM LifeTime - { - get - { - return _lifeTime; - } - set - { - _lifeTime = value; - } - } - - public bool IsPinned() - { - return _pinned; - } - - public bool IsWeak() - { - return _weakReferenced; - } - - - public void CleanUp() - { - if (_gcHandle.IsAllocated) - { - _gcHandle.Free(); - } - } - - public ObjectWrapper(bool runFinalizer, bool pinned, bool weakReferenced) - { - _pinned = pinned; - _weakReferenced = weakReferenced; - if (!runFinalizer) - { - GC.SuppressFinalize(this); - } - } - - - ~ObjectWrapper() - { - // DO SOMETHING UNCONVENTIONAL IN FINALIZER - _data = new byte[_dataSize]; - CleanUp(); - } - } - - internal class ClientSimulator - { - [ThreadStatic] - private static ObjectLifeTimeManager s_lifeTimeManager; - - private static int s_meanAllocSize = 17; - - private static int s_mediumLifeTime = 30; - private static int s_shortLifeTime = 3; - - private static int s_mediumDataSize = s_meanAllocSize; - private static int s_shortDataSize = s_meanAllocSize; - - private static int s_mediumDataCount = 1000000; - private static int s_shortDataCount = 5000; - - private static int s_countIters = 500; - private static float s_percentPinned = 0.1F; - private static float s_percentWeak = 0.0F; - - private static int s_numThreads = 1; - - private static bool s_runFinalizer = false; - private static string s_strategy = "Random"; - - private static string s_objectGraph = "List"; - - private static List s_threadList = new List(); - - private static Stopwatch s_stopWatch = new Stopwatch(); - private static Object s_objLock = new Object(); - private static uint s_currentIterations = 0; - - //keep track of the collection count for generations 0, 1, 2 - private static int[] s_currentCollections = new int[3]; - private static int s_outputFrequency = 0; //after how many iterations the data is printed - private static System.TimeSpan s_totalTime; - - public static int Main(string[] args) - { - s_stopWatch.Start(); - - for (int i = 0; i < 3; i++) - { - s_currentCollections[i] = 0; - } - - if (!ParseArgs(args)) - return 101; - - // Run the test. - for (int i = 0; i < s_numThreads; ++i) - { - Thread thread = new Thread(RunTest); - s_threadList.Add(thread); - thread.Start(); - } - - foreach (Thread t in s_threadList) - { - t.Join(); - } - - return 100; - } - - - public static void RunTest() - { - // Allocate the objects. - s_lifeTimeManager = new ObjectLifeTimeManager(); - LifeTimeStrategy ltStrategy; - - int threadMediumLifeTime = s_mediumLifeTime; - int threadShortLifeTime = s_shortLifeTime; - int threadMediumDataSize = s_mediumDataSize; - int threadShortDataSize = s_shortDataSize; - int threadMediumDataCount = s_mediumDataCount; - int threadShortDataCount = s_shortDataCount; - float threadPercentPinned = s_percentPinned; - float threadPercentWeak = s_percentWeak; - bool threadRunFinalizer = s_runFinalizer; - string threadStrategy = s_strategy; - string threadObjectGraph = s_objectGraph; - - if (threadObjectGraph.ToLower() == "tree") - { - s_lifeTimeManager.SetObjectContainer(new BinaryTreeObjectContainer()); - } - else - { - s_lifeTimeManager.SetObjectContainer(new ArrayObjectContainer()); - } - - s_lifeTimeManager.Init(threadShortDataCount + threadMediumDataCount); - - - if (threadStrategy.ToLower() == "random") - { - ltStrategy = new RandomLifeTimeStrategy(threadMediumLifeTime, threadShortLifeTime, threadMediumDataCount, threadShortDataCount); - } - else - { - // may be we need to specify the elapsed time. - ltStrategy = new TimeBasedLifeTimeStrategy(); - } - - s_lifeTimeManager.LifeTimeStrategy = ltStrategy; - s_lifeTimeManager.objectDied += new ObjectDiedEventHandler(objectDied); - - for (int i = 0; i < threadShortDataCount + threadMediumDataCount; ++i) - { - bool pinned = false; - if (threadPercentPinned != 0) - { - pinned = (i % ((int)(1 / threadPercentPinned)) == 0); - } - - bool weak = false; - if (threadPercentWeak != 0) - { - weak = (i % ((int)(1 / threadPercentWeak)) == 0); - } - - ObjectWrapper oWrapper = new ObjectWrapper(threadRunFinalizer, pinned, weak); - if (i < threadShortDataCount) - { - oWrapper.DataSize = threadShortDataSize; - oWrapper.LifeTime = LifeTimeENUM.Short; - } - else - { - oWrapper.DataSize = threadMediumDataSize; - oWrapper.LifeTime = LifeTimeENUM.Medium; - } - - s_lifeTimeManager.AddObject(oWrapper, i); - } - - lock (s_objLock) - { - Console.WriteLine("Thread {0} Running With Configuration: ", System.Threading.Thread.CurrentThread.ManagedThreadId); - Console.WriteLine("=============================="); - Console.WriteLine("[Thread] Medium Lifetime " + threadMediumLifeTime); - Console.WriteLine("[Thread] Short Lifetime " + threadShortLifeTime); - Console.WriteLine("[Thread] Medium Data Size " + threadMediumDataSize); - Console.WriteLine("[Thread] Short Data Size " + threadShortDataSize); - Console.WriteLine("[Thread] Medium Data Count " + threadMediumDataCount); - Console.WriteLine("[Thread] Short Data Count " + threadShortDataCount); - Console.WriteLine("[Thread] % Pinned " + threadPercentPinned); - Console.WriteLine("[Thread] % Weak " + threadPercentWeak); - Console.WriteLine("[Thread] RunFinalizers " + threadRunFinalizer); - Console.WriteLine("[Thread] Strategy " + threadStrategy); - Console.WriteLine("[Thread] Object Graph " + threadObjectGraph); - Console.WriteLine("=============================="); - } - - - for (int i = 0; i < s_countIters; ++i) - { - // Run the test. - s_lifeTimeManager.Run(); - - if (s_outputFrequency > 0) - { - lock (s_objLock) - { - s_currentIterations++; - if (s_currentIterations % s_outputFrequency == 0) - { - Console.WriteLine("Iterations = {0}", s_currentIterations); - Console.WriteLine("AllocatedMemory = {0} bytes", GC.GetTotalMemory(false)); - - //get the number of collections and the elapsed time for this group of iterations - int[] collectionCount = new int[3]; - for (int j = 0; j < 3; j++) - { - collectionCount[j] = GC.CollectionCount(j); - } - - int[] newCollections = new int[3]; - for (int j = 0; j < 3; j++) - { - newCollections[j] = collectionCount[j] - s_currentCollections[j]; - } - - //update the running count of collections - for (int j = 0; j < 3; j++) - { - s_currentCollections[j] = collectionCount[j]; - } - - Console.WriteLine("Gen 0 Collections = {0}", newCollections[0]); - Console.WriteLine("Gen 1 Collections = {0}", newCollections[1]); - Console.WriteLine("Gen 2 Collections = {0}", newCollections[2]); - - s_stopWatch.Stop(); - Console.Write("Elapsed time: "); - System.TimeSpan tSpan = s_stopWatch.Elapsed; - if (tSpan.Days > 0) - Console.Write("{0} days, ", tSpan.Days); - if (tSpan.Hours > 0) - Console.Write("{0} hours, ", tSpan.Hours); - if (tSpan.Minutes > 0) - Console.Write("{0} minutes, ", tSpan.Minutes); - Console.Write("{0} seconds, ", tSpan.Seconds); - Console.Write("{0} milliseconds", tSpan.Milliseconds); - - s_totalTime += tSpan; - s_stopWatch.Reset(); - s_stopWatch.Start(); - - Console.Write(" (Total time: "); - if (s_totalTime.Days > 0) - Console.Write("{0} days, ", s_totalTime.Days); - if (s_totalTime.Hours > 0) - Console.Write("{0} hours, ", s_totalTime.Hours); - if (s_totalTime.Minutes > 0) - Console.Write("{0} minutes, ", s_totalTime.Minutes); - Console.Write("{0} seconds, ", s_totalTime.Seconds); - Console.WriteLine("{0} milliseconds)", s_totalTime.Milliseconds); - Console.WriteLine("----------------------------------"); - } - } - } - } - } - - private static void objectDied(LifeTime lifeTime, int index) - { - // put a new fresh object instead; - - ObjectWrapper oWrapper = lifeTime as ObjectWrapper; - oWrapper.CleanUp(); - - oWrapper = new ObjectWrapper(s_runFinalizer, oWrapper.IsPinned(), oWrapper.IsWeak()); - oWrapper.LifeTime = lifeTime.LifeTime; - oWrapper.DataSize = lifeTime.LifeTime == LifeTimeENUM.Short ? s_shortDataSize : s_mediumDataSize; - - s_lifeTimeManager.AddObject(oWrapper, index); - } - - /// - /// Parse the arguments, no error checking is done yet. - /// TODO: Add more error checking. - /// - /// Populate variables with defaults, then overwrite them with config settings. Finally overwrite them with command line parameters - /// - public static bool ParseArgs(string[] args) - { - s_countIters = 500; - - try - { - for (int i = 0; i < args.Length; ++i) - { - string currentArg = args[i]; - string currentArgValue; - if (currentArg.StartsWith("-") || currentArg.StartsWith("/")) - { - currentArg = currentArg.Substring(1); - } - else - { - Console.WriteLine("Error! Unexpected argument {0}", currentArg); - return false; - } - - if (currentArg.StartsWith("?")) - { - Usage(); - System.Environment.FailFast("displayed help"); - } - else if (currentArg.StartsWith("iter") || currentArg.Equals("i")) // number of iterations - { - currentArgValue = args[++i]; - s_countIters = Int32.Parse(currentArgValue); - } - else if (currentArg.StartsWith("datasize") || currentArg.Equals("dz")) - { - currentArgValue = args[++i]; - s_mediumDataSize = Int32.Parse(currentArgValue); - } - - else if (currentArg.StartsWith("sdatasize") || currentArg.Equals("sdz")) - { - currentArgValue = args[++i]; - s_shortDataSize = Int32.Parse(currentArgValue); - } - - else if (currentArg.StartsWith("datacount") || currentArg.Equals("dc")) - { - currentArgValue = args[++i]; - s_mediumDataCount = Int32.Parse(currentArgValue); - } - - else if (currentArg.StartsWith("sdatacount") || currentArg.Equals("sdc")) - { - currentArgValue = args[++i]; - s_shortDataCount = Int32.Parse(currentArgValue); - } - - - else if (currentArg.StartsWith("lifetime") || currentArg.Equals("lt")) - { - currentArgValue = args[++i]; - s_shortLifeTime = Int32.Parse(currentArgValue); - s_mediumLifeTime = s_shortLifeTime * 10; - } - - else if (currentArg.StartsWith("threads") || currentArg.Equals("t")) - { - currentArgValue = args[++i]; - s_numThreads = Int32.Parse(currentArgValue); - } - - else if (currentArg.StartsWith("fin") || currentArg.Equals("f")) - { - s_runFinalizer = true; - } - - else if (currentArg.StartsWith("datapinned") || currentArg.StartsWith("dp")) // percentage data pinned - { - currentArgValue = args[++i]; - s_percentPinned = float.Parse(currentArgValue, System.Globalization.CultureInfo.InvariantCulture); - if (s_percentPinned < 0 || s_percentPinned > 1) - { - Console.WriteLine("Error! datapinned should be a number from 0 to 1"); - return false; - } - } - - else if (currentArg.StartsWith("strategy")) //strategy that if the object died or not - { - currentArgValue = args[++i]; - if ((currentArgValue.ToLower() == "random") || (currentArgValue.ToLower() == "time")) - s_strategy = currentArgValue; - else - { - Console.WriteLine("Error! Unexpected argument for strategy: {0}", currentArgValue); - return false; - } - } - - else if (currentArg.StartsWith("dataweak") || currentArg.StartsWith("dw")) - { - currentArgValue = args[++i]; - s_percentWeak = float.Parse(currentArgValue, System.Globalization.CultureInfo.InvariantCulture); - if (s_percentWeak < 0 || s_percentWeak > 1) - { - Console.WriteLine("Error! dataweak should be a number from 0 to 1"); - return false; - } - } - - else if (currentArg.StartsWith("objectgraph") || currentArg.StartsWith("og")) - { - currentArgValue = args[++i]; - if ((currentArgValue.ToLower() == "tree") || (currentArgValue.ToLower() == "list")) - s_objectGraph = currentArgValue; - else - { - Console.WriteLine("Error! Unexpected argument for objectgraph: {0}", currentArgValue); - return false; - } - } - else if (currentArg.Equals("out")) //output frequency - { - currentArgValue = args[++i]; - s_outputFrequency = int.Parse(currentArgValue); - } - else - { - Console.WriteLine("Error! Unexpected argument {0}", currentArg); - return false; - } - } - } - catch (System.Exception e) - { - Console.WriteLine("Incorrect arguments"); - Console.WriteLine(e.ToString()); - return false; - } - return true; - } - - - public static void Usage() - { - Console.WriteLine("GCSimulator [-?] [options]"); - Console.WriteLine("\nOptions"); - Console.WriteLine("\nGlobal:"); - Console.WriteLine("-? Display the usage and exit"); - Console.WriteLine("-i [-iter] : specify number of iterations for the test, default is " + s_countIters); - Console.WriteLine("\nThreads:"); - Console.WriteLine("-t [-threads] : specifiy number of threads, default is " + s_numThreads); - Console.WriteLine("\nData:"); - Console.WriteLine("-dz [-datasize] : specify the data size in bytes, default is " + s_mediumDataSize); - Console.WriteLine("-sdz [sdatasize] : specify the short lived data size in bytes, default is " + s_shortDataSize); - Console.WriteLine("-dc [datacount] : specify the medium lived data count, default is " + s_mediumDataCount); - Console.WriteLine("-sdc [sdatacount] : specify the short lived data count, default is " + s_shortDataCount); - Console.WriteLine("-lt [-lifetime] : specify the life time of the objects, default is " + s_shortLifeTime); - Console.WriteLine("-f [-fin] : specify whether to do allocation in finalizer or not, default is no"); - Console.WriteLine("-dp [-datapinned] : specify the percentage of data that we want to pin (number from 0 to 1), default is " + s_percentPinned); - Console.WriteLine("-dw [-dataweak] : specify the percentage of data that we want to weak reference, (number from 0 to 1) default is " + s_percentWeak); - Console.WriteLine("-strategy < indicate the strategy for deciding when the objects should die, right now we support only Random and Time strategy, default is Random"); - Console.WriteLine("-og [-objectgraph] : specify whether to use a List- or Tree-based object graph, default is " + s_objectGraph); - Console.WriteLine("-out : after how many iterations to output data"); - } - } -} diff --git a/src/coreclr/tests/src/GC/Stress/Tests/LargeObjectAlloc.cs b/src/coreclr/tests/src/GC/Stress/Tests/LargeObjectAlloc.cs deleted file mode 100644 index 7607a1966194..000000000000 --- a/src/coreclr/tests/src/GC/Stress/Tests/LargeObjectAlloc.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// Bug#94878 Problem with the Large Object Allocator -// Repro test from MStanton - -using System; -using System.Threading; -using System.Security; - -internal class Mainy -{ - public static void DoWork() - { - int k = 0; - while (k < 3) - { - TestLibrary.Logging.WriteLine("{0}: Restarting run {1}", Thread.CurrentThread.Name, k); - int[] largeArray = new int[1000000]; - for (int i = 0; i <= 100; i++) - { - int[] saveArray = largeArray; - largeArray = new int[largeArray.Length + 100000]; - saveArray = null; - //TestLibrary.Logging.WriteLine("{0} at size {1}",Thread.CurrentThread.Name,largeArray.Length.ToString()); - } - k++; - } - } - - public static int Main(string[] args) - { - long Threads = 1; - - if (args.Length > 1) - { - TestLibrary.Logging.WriteLine("usage: LargeObjectAlloc "); - return 1; - } - else if (args.Length == 1) - { - Threads = Int64.Parse(args[0]); - } - - TestLibrary.Logging.WriteLine("LargeObjectAlloc started with {0} threads. Control-C to exit", Threads.ToString()); - - Thread myThread = null; - for (long i = 0; i < Threads; i++) - { - myThread = new Thread(new ThreadStart(Mainy.DoWork)); - myThread.Name = i.ToString(); - myThread.Start(); - } - - TestLibrary.Logging.WriteLine("All threads started"); - myThread.Join(); - - - TestLibrary.Logging.WriteLine("Test Passed"); - return 100; - } -} - diff --git a/src/coreclr/tests/src/GC/Stress/Tests/LargeObjectAlloc2.cs b/src/coreclr/tests/src/GC/Stress/Tests/LargeObjectAlloc2.cs deleted file mode 100644 index e6a8c75123d3..000000000000 --- a/src/coreclr/tests/src/GC/Stress/Tests/LargeObjectAlloc2.cs +++ /dev/null @@ -1,109 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// Allocate nested objects of ~ 25 MB -// If memory is low, after every loop, the large objects should be collected -// and committed from the LargeObjectHeap -// The Finalizer makes sure that the GC is actually collecting the large objects - - -using System; -using System.Runtime.CompilerServices; - -namespace LargeObjectTest -{ - public class OtherLargeObject - { - // disabling unused variable warning -#pragma warning disable 0414 - private int[] _otherarray; -#pragma warning restore 0414 - - public OtherLargeObject() - { - _otherarray = new int[5000]; // 20 KB - } - } - - public class LargeObject - { - // disabling unused variable warning -#pragma warning disable 0414 - private int[] _array; -#pragma warning restore 0414 - private OtherLargeObject[] _olargeobj; - - public LargeObject() - { - _array = new int[1250000]; // 5 MB - _olargeobj = new OtherLargeObject[1000]; //20 MB - for (int i = 0; i < 1000; i++) - { - _olargeobj[i] = new OtherLargeObject(); - } - } - - ~LargeObject() - { - TestLibrary.Logging.WriteLine("In finalizer"); - Test.ExitCode = 100; - } - } - - public class Test - { - public static int ExitCode = -1; - - [MethodImplAttribute(MethodImplOptions.NoInlining)] - public static bool AllocAndCollect(int loop) - { - LargeObject largeobj; - try - { - largeobj = new LargeObject(); - TestLibrary.Logging.WriteLine("Allocated LargeObject"); - } - catch (Exception e) - { - TestLibrary.Logging.WriteLine("Failure to allocate at loop {0}\n", loop); - TestLibrary.Logging.WriteLine("Caught Exception: {0}", e); - return false; - } - - largeobj = null; - return true; - } - - public static int Main(string[] args) - { - int loop = 0; - - TestLibrary.Logging.WriteLine("Test should pass with ExitCode 100\n"); - - - while (loop <= 200) - { - loop++; - TestLibrary.Logging.Write(String.Format("LOOP: {0}\n", loop)); - - if (!AllocAndCollect(loop)) - { - return 1; - } - - GC.Collect(); - GC.WaitForPendingFinalizers(); - GC.Collect(); - - TestLibrary.Logging.WriteLine("LargeObject Collected\n"); - } - - TestLibrary.Logging.WriteLine("Test Passed"); - GC.Collect(); - GC.WaitForPendingFinalizers(); - - return ExitCode; - } - } -} diff --git a/src/coreclr/tests/src/GC/Stress/Tests/bestfit-finalize.cs b/src/coreclr/tests/src/GC/Stress/Tests/bestfit-finalize.cs deleted file mode 100644 index a4d5e7c358cb..000000000000 --- a/src/coreclr/tests/src/GC/Stress/Tests/bestfit-finalize.cs +++ /dev/null @@ -1,197 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// - -//This is modeled after a server executing requests -//which pin some of their newly allocated objects. - -using System; -using System.Threading; -using System.Runtime.InteropServices; -using System.Security; - -namespace Fragment -{ - [SecuritySafeCritical] - public class Request - { - private Object[] _survivors; - private GCHandle _pin; - - [SecuritySafeCritical] - public Request() - { - _survivors = new Object[1 + (int)(Test.AllocationVolume * Test.SurvivalRate) / 100]; - int i = 0; - int volume = 0; - - //allocate half of the request size. - while (volume < Test.AllocationVolume / 2) - { - volume += AllocHalfVolume(++i, Test.SurvivalRate); - } - - //allocate one pinned buffer - _pin = GCHandle.Alloc(new byte[100], GCHandleType.Pinned); - - //allocate the rest of the request - while (volume < Test.AllocationVolume) - { - volume += AllocHalfVolume(++i, Test.SurvivalRate); - } - } - - // unpins and releases the pinned buffer - [SecuritySafeCritical] - ~Request() - { - _pin.Free(); - } - - [SecuritySafeCritical] - private int AllocHalfVolume(int index, float survFraction) - { - int allocSurv = Test.Rand.Next(100, 2000 + 2 * index); - int alloc = (int)(allocSurv / survFraction) - allocSurv; - - // create garbage - int garbage = 0; - while (garbage < alloc) - { - int size = Test.Rand.Next(10, 200 + 2 * garbage); - Object x = new byte[size]; - garbage += size; - } - _survivors[index] = new byte[allocSurv]; - return allocSurv + alloc; - } - } - - public class Test - { - public static Random Rand; - public static int NumRequests = 0; - public static int AllocationVolume = 0; - public static float SurvivalRate = 0.6f; - - public void Go() - { - int steadyStateFactor = 5; - Request[] requests = new Request[NumRequests]; - int instRequests = 0; - int totalReqs = 0; - int nreqsToSteady = 0; - bool done = false; - - while (!done) - { - totalReqs++; - int i = Rand.Next(0, NumRequests); - if (requests[i] != null) - { - requests[i] = null; - } - else - { - instRequests++; - } - requests[i] = new Request(); - - if (instRequests == NumRequests) - { - if (nreqsToSteady == 0) - { - nreqsToSteady = totalReqs; - Console.WriteLine("Took {0} iterations to reach steady state", nreqsToSteady); - } - else if (totalReqs == steadyStateFactor * nreqsToSteady) - { - done = true; - } - } - } - - for (int i = 0; i < NumRequests; i++) - { - requests[i] = null; - } - } - - - public static void Usage() - { - Console.WriteLine("Usage:"); - Console.WriteLine("Fragment [random seed]"); - } - - - static public int Main(string[] args) - { - int numIterations = 0; - int randomSeed = 0; - - switch (args.Length) - { - case 0: - // use defaults - numIterations = 1; - NumRequests = 1200; - AllocationVolume = 100000; - randomSeed = (int)DateTime.Now.Ticks; - Console.WriteLine("Using defaults: {0} {1} {2}", numIterations, NumRequests, AllocationVolume); - - break; - case 3: - case 4: - if ((!Int32.TryParse(args[0], out numIterations)) || - (!Int32.TryParse(args[1], out NumRequests)) || - (!Int32.TryParse(args[2], out AllocationVolume))) - { - goto default; - } - - if (args.Length == 4) - { - if (!Int32.TryParse(args[3], out randomSeed)) - { - goto default; - } - } - else - { - randomSeed = (int)DateTime.Now.Ticks; - } - - break; - default: - Usage(); - return 1; - } - - Console.WriteLine("Using random seed: {0}", randomSeed); - Rand = new Random(randomSeed); - - try - { - for (int j = 0; j < numIterations; j++) - { - Test t = new Test(); - t.Go(); - } - } - catch (OutOfMemoryException) - { - Console.WriteLine("OOM"); - Console.WriteLine(GC.GetTotalMemory(false)); - Console.WriteLine("Test Failed"); - return 1; - } - - Console.WriteLine("Test Passed"); - return 100; - } - } -} diff --git a/src/coreclr/tests/src/GC/Stress/Tests/concurrentspin2.cs b/src/coreclr/tests/src/GC/Stress/Tests/concurrentspin2.cs deleted file mode 100644 index 93ccc4ba2c7e..000000000000 --- a/src/coreclr/tests/src/GC/Stress/Tests/concurrentspin2.cs +++ /dev/null @@ -1,182 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// - -using System; -using System.Diagnostics; -using System.Threading; - -internal class PriorityTest -{ - private byte[][] _old; - private byte[][] _med; - private Random _rand; - - private int _oldDataSize; - private int _medDataSize; - private int _iterCount; - private int _meanAllocSize; - private int _medTime; - private int _youngTime; - - - public PriorityTest(int oldDataSize, int medDataSize, - int iterCount, int meanAllocSize, - int medTime, int youngTime) - { - _rand = new Random(314159); - _oldDataSize = oldDataSize; - _medDataSize = medDataSize; - _iterCount = iterCount; - _meanAllocSize = meanAllocSize; - _medTime = medTime; - _youngTime = youngTime; - } - - // creates initial arrays - private void AllocTest(int oldDataSize, int medDataSize, int meanAllocSize) - { - _old = new byte[oldDataSize][]; - _med = new byte[medDataSize][]; - - for (int i = 0; i < _old.Length; i++) - { - _old[i] = new byte[meanAllocSize]; - } - - for (int i = 0; i < _med.Length; i++) - { - _med[i] = new byte[meanAllocSize]; - } - } - - // churns data in the heap by replacing byte arrays with new ones of random length - // this should induce concurrent GCs - private void SteadyState(int oldDataSize, int medDataSize, - int iterCount, int meanAllocSize, - int medTime, int youngTime) - { - for (int i = 0; i < iterCount; i++) - { - byte[] newarray = new byte[meanAllocSize]; - - if ((i % medTime) == 0) - { - _old[_rand.Next(0, _old.Length)] = newarray; - } - if ((i % youngTime) == 0) - { - _med[_rand.Next(0, _med.Length)] = newarray; - } - //if (((i % 5000) == 0) && (Thread.CurrentThread.Priority != ThreadPriority.Lowest)) - //{ - // Thread.Sleep(200); - //} - } - } - - // method that runs the test - public void RunTest() - { - for (int iteration = 0; iteration < _iterCount; iteration++) - { - AllocTest(_oldDataSize, _medDataSize, _meanAllocSize); - - SteadyState(_oldDataSize, _medDataSize, - _iterCount, _meanAllocSize, - _medTime, _youngTime); - - if (((iteration + 1) % 20) == 0) - Console.WriteLine("Thread: {1} Finished iteration {0}", iteration, System.Threading.Thread.CurrentThread.Name); - } - } -} - - -internal class ConcurrentRepro -{ - public static void Usage() - { - Console.WriteLine("Usage:"); - Console.WriteLine("\t "); - } - - public static int[] ParseArgs(string[] args) - { - int[] parameters = new int[2]; - - // set defaults - parameters[0] = 100; - parameters[1] = 4; - - if (args.Length == 0) - { - //use defaults - Console.WriteLine("Using defaults: 100 iterations, 4 threads"); - return parameters; - } - if (args.Length == parameters.Length) - { - for (int i = 0; i < args.Length; i++) - { - int j = 0; - if (!int.TryParse(args[i], out j)) - { - Usage(); - return null; - } - parameters[i] = j; - } - - return parameters; - } - - // incorrect number of arguments - Usage(); - return null; - } - - - public static int Main(string[] args) - { - // parse arguments - int[] parameters = ParseArgs(args); - if (parameters == null) - { - return 0; - } - - // set process affinity to 1 to repro bug easier - //Process.GetCurrentProcess().ProcessorAffinity = (IntPtr)1; - - - PriorityTest priorityTest = new PriorityTest(1000000, 5000, parameters[0], 17, 30, 3); - ThreadStart startDelegate = new ThreadStart(priorityTest.RunTest); - - // create threads - Thread[] threads = new Thread[parameters[1]]; - for (int i = 0; i < threads.Length; i++) - { - threads[i] = new Thread(startDelegate); - threads[i].Name = String.Format("Thread{0}", i); - //if (i % 2 == 0) - //{ - // threads[i].Priority = ThreadPriority.Lowest; - //} - threads[i].Start(); - } - - // wait for threads to complete - for (int i = 0; i < threads.Length; i++) - { - threads[i].Join(); - } - - return 100; - } -} - - diff --git a/src/coreclr/tests/src/GC/Stress/Tests/plug.cs b/src/coreclr/tests/src/GC/Stress/Tests/plug.cs deleted file mode 100644 index b118d0460903..000000000000 --- a/src/coreclr/tests/src/GC/Stress/Tests/plug.cs +++ /dev/null @@ -1,86 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// - -using System; -using System.Runtime.InteropServices; -using System.Collections.Generic; -using System.Security; - -public class Test -{ - public static void Usage() - { - Console.WriteLine("USAGE:"); - Console.WriteLine("plug.exe [numIterations]"); - } - - [SecuritySafeCritical] - public static int Main(string[] args) - { - int size = 10000; - int power = 20; - int numIterations = 0; - GCHandle[] list = new GCHandle[size]; - - if (args.Length == 0) - { - //using defaults - numIterations = 100; - } - else if (args.Length == 1) - { - if (!Int32.TryParse(args[0], out numIterations)) - { - Usage(); - return 1; - } - } - else - { - Usage(); - return 1; - } - - Console.WriteLine("Running {0} iterations", numIterations); - - for (int j = 0; j < numIterations; j++) - { - for (int i = 0; i < size; i++) - { - GCHandleType type = GCHandleType.Normal; - - if (i % 5 == 0) - { - // pin every 5th handle - type = GCHandleType.Pinned; - } - - if (!list[i].IsAllocated) - { - try - { - byte[] b = new byte[(int)Math.Pow(2, (i % power))]; - list[i] = (GCHandle.Alloc(b, type)); - } - catch (OutOfMemoryException) - { - Console.WriteLine("OOM"); - Console.WriteLine("Heap size: {0}", GC.GetTotalMemory(false)); - Console.WriteLine("Trying to allocate array of size: {0}", Math.Pow(2, (i % power))); - } - } - else - { - list[i].Free(); - } - } - } - - return 100; - } -} - diff --git a/src/coreclr/tests/src/Interop/BestFitMapping/BestFitMapping.cs b/src/coreclr/tests/src/Interop/BestFitMapping/BestFitMapping.cs deleted file mode 100755 index 1778d79e4ecb..000000000000 Binary files a/src/coreclr/tests/src/Interop/BestFitMapping/BestFitMapping.cs and /dev/null differ diff --git a/src/coreclr/tests/src/Interop/BestFitMapping/BestFitMappingNative.cpp b/src/coreclr/tests/src/Interop/BestFitMapping/BestFitMappingNative.cpp deleted file mode 100755 index bd92382a2da8..000000000000 --- a/src/coreclr/tests/src/Interop/BestFitMapping/BestFitMappingNative.cpp +++ /dev/null @@ -1,477 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -#include -#include -#include -#include -#include - -#pragma warning( push ) -#pragma warning( disable : 4996) - - -static int fails = 0; //record the fail numbers -// Overload methods for reportfailure -static int ReportFailure(const char* s) -{ - printf(" === Fail:%s\n", s); - return (++fails); -} - -extern "C" DLL_EXPORT int __cdecl GetResult() -{ - return fails; -} - -//This method is used on Windows Only -extern "C" DLL_EXPORT char __cdecl GetByteForWideChar() -{ -#ifdef WINDOWS - char * p = new char[3]; - WideCharToMultiByte(CP_ACP, 0, W("\x263c"), -1, p, 2, NULL, NULL); - p[1] = '\0'; - char breturn = p[0]; - - delete p; - - return breturn; -#else - return 0; //It wont be called MAC -#endif - -} - -//x86: Managed(Encoding: utf8)---->Marshaler(Encoding:ASCII)---->Native(Encoding:utf8) -//MAC(x64):Managed(Encoding:utf8)----->Marshaler(Encoding:utf8)---->Native(Encoding:utf8) -//Now both side(Managed Side and native side) takes the utf8 encoding when comparing string -bool CheckInput(LPSTR str) -{ - //int WideCharToMultiByte( - // UINT CodePage, - // DWORD dwFlags, - // LPCWSTR lpWideCharStr, - // int cchWideChar, - // LPSTR lpMultiByteStr, - // int cbMultiByte, - // LPCSTR lpDefaultChar, - // LPBOOL lpUsedDefaultChar - //); -#ifdef WINDOWS - char * p = new char[3]; - WideCharToMultiByte(CP_ACP, 0, W("\x263c"), -1, p, 2, NULL, NULL); - p[1] = '\0'; -#else - char* p = new char[4]; //00bc98e2,the utf8 code of "\263c",we can get these char value through the following code with C# - p[0] = (char)0xe2; //Encoding enc = Encoding.Default;//UTF8 Encoding - p[1] = (char)0x98; //Byte[] by = enc.GetBytes("\x263c"); - p[2] = (char)0xbc; - p[3] = (char)0; -#endif - if (0 != strncmp(str, p, 4)) - { - printf("CheckInput:Expected:%s,Actual:%d\n", p, str[0]); - delete[]p; - return false; - } - delete[]p; - return true; - -} - -//C Call,In attribute,LPstr -extern "C" DLL_EXPORT LPSTR __cdecl CLPStr_In(LPSTR pStr) -{ - //Check the Input - if (!CheckInput(pStr)) - { - ReportFailure("CLPStr_In:Native Side"); - } - - //alloc,copy, since we cannot depend the Marshaler's activity. - size_t len = strlen(pStr) + 1; //+1, Include the NULL Character. - LPSTR pBack = (LPSTR)CoreClrAlloc(sizeof(char) * len); - strncpy(pBack, pStr, len); - - return pBack; -} - -extern "C" DLL_EXPORT LPSTR __cdecl CLPStr_Out(LPSTR pStr) -{ - const char* pTemp = "AAAA"; - size_t len = strlen(pTemp) + 1; //+1, Include the NULL Character. - LPSTR pBack = (LPSTR)CoreClrAlloc(sizeof(char) * len); - strncpy(pBack, pTemp, strlen(pTemp) + 1); - - strncpy(pStr, pTemp, strlen(pTemp) + 1); - - return pBack; -} - -extern "C" DLL_EXPORT LPSTR __cdecl CLPStr_InOut(LPSTR pStr) -{ - //Check the Input - if (!CheckInput(pStr)) - { - ReportFailure("CLPStr_InOut:Native Side"); - } - - //alloc,copy, since we cannot depend the Marshaler's activity. - size_t len = strlen(pStr) + 1; //+1, Include the NULL Character. - LPSTR pBack = (LPSTR)CoreClrAlloc(len); - strncpy(pBack, pStr, len); - - return pBack; -} - -extern "C" DLL_EXPORT LPSTR __cdecl CLPStr_InByRef(LPSTR* ppStr) -{ - //Check the Input - if (!CheckInput(*ppStr)) - { - ReportFailure("CLPStr_InByRef:Native Side"); - } - - //alloc,copy, since we cannot depend the Marshaler's activity. - size_t len = strlen(*ppStr) + 1; //+1, Include the NULL Character. - LPSTR pBack = (LPSTR)CoreClrAlloc(len); - strncpy(pBack, *ppStr, len); - - return pBack; -} - -extern "C" DLL_EXPORT LPSTR __cdecl CLPStr_OutByRef(LPSTR* ppStr) -{ - const char* pTemp = "AAAA"; - size_t len = strlen(pTemp) + 1; //+1, Include the NULL Character. - LPSTR pBack = (LPSTR)CoreClrAlloc(sizeof(char) * len); - strncpy(pBack, pTemp, strlen(pTemp) + 1); - - *ppStr = (LPSTR)CoreClrAlloc(sizeof(char) * len); - strncpy(*ppStr, pTemp, strlen(pTemp) + 1); - return pBack; -} - -extern "C" DLL_EXPORT LPSTR __cdecl CLPStr_InOutByRef(LPSTR* ppStr) -{ - //Check the Input - if (!CheckInput(*ppStr)) - { - ReportFailure("CLPStr_InOutByRef:Native Side"); - } - - //alloc,copy, since we cannot depend the Marshaler's activity. - size_t len = strlen(*ppStr) + 1; //+1, Include the NULL Character. - LPSTR pBack = (LPSTR)CoreClrAlloc(len); - strncpy(pBack, *ppStr, len); - return pBack; -} - - -typedef LPSTR (__cdecl* delegate_cdecl)(LPSTR* ppstr); -extern "C" DLL_EXPORT delegate_cdecl __cdecl CLPStr_DelegatePInvoke() -{ - return CLPStr_InOutByRef; -} - -//stdcall - -extern "C" DLL_EXPORT LPSTR STDMETHODCALLTYPE SLPStr_In(LPSTR pStr) -{ - //Check the Input - if (!CheckInput(pStr)) - { - ReportFailure("SLPStr_In:NativeSide"); - } - - //alloc,copy, since we cannot depend the Marshaler's activity. - size_t len = strlen(pStr) + 1; //+1, Include the NULL Character. - LPSTR pBack = (LPSTR)CoreClrAlloc(len); - strncpy(pBack, pStr, len); - return pBack; -} - -extern "C" DLL_EXPORT LPSTR STDMETHODCALLTYPE SLPStr_Out(LPSTR pStr) -{ - const char* pTemp = "AAAA"; - size_t len = strlen(pTemp) + 1; //+1, Include the NULL Character. - LPSTR pBack = (LPSTR)CoreClrAlloc(sizeof(char) * len); - strncpy(pBack, pTemp, strlen(pTemp) + 1); - - strncpy(pStr, pTemp, strlen(pTemp) + 1); - return pBack; -} - -extern "C" DLL_EXPORT LPSTR STDMETHODCALLTYPE SLPStr_InOut(LPSTR pStr) -{ - //Check the Input - if (!CheckInput(pStr)) - { - ReportFailure("SLPStr_InOut:NativeSide"); - } - - //alloc,copy, since we cannot depend the Marshaler's activity. - size_t len = strlen(pStr) + 1; //+1, Include the NULL Character. - LPSTR pBack = (LPSTR)CoreClrAlloc(len); - strncpy(pBack, pStr, len); - return pBack; -} - -extern "C" DLL_EXPORT LPSTR STDMETHODCALLTYPE SLPStr_InByRef(LPSTR* ppStr) -{ - //Check the Input - if (!CheckInput(*ppStr)) - { - ReportFailure("SLPStr_InByRef:NativeSide"); - } - //alloc,copy, since we cannot depend the Marshaler's activity. - size_t len = strlen(*ppStr) + 1; //+1, Include the NULL Character. - LPSTR pBack = (LPSTR)CoreClrAlloc(len); - strncpy(pBack, *ppStr, len); - return pBack; -} - -extern "C" DLL_EXPORT LPSTR STDMETHODCALLTYPE SLPStr_OutByRef(LPSTR* ppStr) -{ - const char* pTemp = "AAAA"; - size_t len = strlen(pTemp) + 1; //+1, Include the NULL Character. - LPSTR pBack = (LPSTR)CoreClrAlloc(sizeof(char) * len); - strncpy(pBack, pTemp, strlen(pTemp) + 1); - - *ppStr = (LPSTR)CoreClrAlloc(sizeof(char) * len); - strncpy(*ppStr, pTemp, strlen(pTemp) + 1); - - return pBack; -} - -extern "C" DLL_EXPORT LPSTR STDMETHODCALLTYPE SLPStr_InOutByRef(LPSTR* ppStr) -{ - //Check the Input - if (!CheckInput(*ppStr)) - { - ReportFailure("SLPStr_InOutByRef:NativeSide"); - } - - //alloc,copy, since we cannot depend the Marshaler's activity. - size_t len = strlen(*ppStr) + 1; //+1, Include the NULL Character. - LPSTR pBack = (LPSTR)CoreClrAlloc(len); - strncpy(pBack, *ppStr, len); - return pBack; -} - -typedef LPSTR (STDMETHODCALLTYPE *delegate_stdcall)(LPSTR* ppstr); -extern "C" DLL_EXPORT delegate_stdcall SLPStr_DelegatePInvoke() -{ - return SLPStr_InOutByRef; -} - -///Cdecl, Reverse PInvoke - -typedef LPSTR (__cdecl *CCallBackIn)(LPSTR pstr); -extern "C" DLL_EXPORT void __cdecl DoCCallBack_LPSTR_In(CCallBackIn callback) -{ - const char* pTemp = "AAAA"; - size_t len = strlen(pTemp)+1; - LPSTR pStr = (LPSTR)CoreClrAlloc(len); - strncpy(pStr,pTemp,len); - - if(!CheckInput(callback(pStr))) - { - ReportFailure("DoCCallBack_LPSTR_In:NativeSide"); - } - CoreClrFree(pStr); -} - -typedef LPSTR (__cdecl *CCallBackOut)(LPSTR pstr); -extern "C" DLL_EXPORT void __cdecl DoCCallBack_LPSTR_Out(CCallBackOut callback) -{ - size_t len = 10; - LPSTR pStr = (LPSTR)CoreClrAlloc(len); - - //Check the return value - if (!CheckInput(callback(pStr))) - { - ReportFailure("DoCCallBack_LPSTR_Out:NativeSide,the first check"); - } - if (!CheckInput(pStr)) - { - ReportFailure("DoCCallBack_LPSTR_Out:NativeSide,the Second Check"); - } - CoreClrFree(pStr); -} - -typedef LPSTR (__cdecl *CCallBackInOut)(LPSTR pstr); -extern "C" DLL_EXPORT void __cdecl DoCCallBack_LPSTR_InOut(CCallBackInOut callback) -{ - const char* pTemp = "AAAA"; - size_t len = strlen(pTemp) + 1; - LPSTR pStr = (LPSTR)CoreClrAlloc(len); - strncpy(pStr, pTemp, len); - - if (!CheckInput(callback(pStr))) - { - ReportFailure("DoCCallBack_LPSTR_InOut:NativeSide,the first check"); - } - if (!CheckInput(pStr)) - { - ReportFailure("DoCCallBack_LPSTR_InOut:NativeSide,the Second Check"); - } - CoreClrFree(pStr); -} - -typedef LPSTR (__cdecl *CallBackInByRef)(LPSTR* pstr); -extern "C" DLL_EXPORT void __cdecl DoCCallBack_LPSTR_InByRef(CallBackInByRef callback) -{ - const char* pTemp = "AAAA"; - size_t len = strlen(pTemp) + 1; - LPSTR pStr = (LPSTR)CoreClrAlloc(len); - strncpy(pStr, pTemp, len); - - if (!CheckInput(callback(&pStr))) - { - ReportFailure("DoCCallBack_LPSTR_InByRef:NativeSide"); - } - CoreClrFree(pStr); -} - -typedef LPSTR (__cdecl *CCallBackOutByRef)(LPSTR* pstr); -extern "C" DLL_EXPORT void __cdecl DoCCallBack_LPSTR_OutByRef(CCallBackOutByRef callback) -{ - size_t len = 10; - LPSTR pStr = (LPSTR)CoreClrAlloc(len); - - if (!CheckInput(callback(&pStr))) - { - ReportFailure("DoCCallBack_LPSTR_OutByRef:NativeSide,the first Check"); - } - if (!CheckInput(pStr)) - { - ReportFailure("DoCCallBack_LPSTR_OutByRef:NativeSide,the Second Check"); - } - CoreClrFree(pStr); -} - -typedef LPSTR (__cdecl *CCallBackInOutByRef)(LPSTR* pstr); -extern "C" DLL_EXPORT void __cdecl DoCCallBack_LPSTR_InOutByRef(CCallBackInOutByRef callback) -{ - const char* pTemp = "AAAA"; - size_t len = strlen(pTemp) + 1; - LPSTR pStr = (LPSTR)CoreClrAlloc(len); - strncpy(pStr, pTemp, len); - - if (!CheckInput(callback(&pStr))) - { - ReportFailure("DoCCallBack_LPSTR_InOutByRef:NativeSide"); - } - if (!CheckInput(pStr)) - { - ReportFailure("DoCCallBack_LPSTR_InOutByRef:NativeSide,the Second Check"); - } - CoreClrFree(pStr); -} - -///STDCALL Reverse PInvoke -typedef LPSTR (STDMETHODCALLTYPE *SCallBackIn)(LPSTR pstr); -extern "C" DLL_EXPORT void __cdecl DoSCallBack_LPSTR_In(SCallBackIn callback) -{ - const char* pTemp = "AAAA"; - size_t len = strlen(pTemp) + 1; - LPSTR pStr = (LPSTR)CoreClrAlloc(len); - strncpy(pStr, pTemp, len); - - if (!CheckInput(callback(pStr))) - { - ReportFailure("DoSCallBack_LPSTR_In:NativeSide"); - } - CoreClrFree(pStr); -} - -typedef LPSTR (STDMETHODCALLTYPE *SCallBackOut)(LPSTR pstr); -extern "C" DLL_EXPORT void __cdecl DoSCallBack_LPSTR_Out(SCallBackOut callback) -{ - - size_t len = 10; - LPSTR pStr = (LPSTR)CoreClrAlloc(len); - - if (!CheckInput(callback(pStr))) - { - ReportFailure("DoSCallBack_LPSTR_Out:NativeSide,the first check"); - } - if (!CheckInput(pStr)) - { - ReportFailure("DoSCallBack_LPSTR_Out:NativeSide,the Second Check"); - } - CoreClrFree(pStr); -} - -typedef LPSTR (STDMETHODCALLTYPE *SCallBackInOut)(LPSTR pstr); -extern "C" DLL_EXPORT void __cdecl DoSCallBack_LPSTR_InOut(SCallBackInOut callback) -{ - const char* pTemp = "AAAA"; - size_t len = strlen(pTemp) + 1; - LPSTR pStr = (LPSTR)CoreClrAlloc(len); - strncpy(pStr, pTemp, len); - - if (!CheckInput(callback(pStr))) - { - ReportFailure("DoSCallBack_LPSTR_InOut:NativeSide,the first check"); - } - if (!CheckInput(pStr)) - { - ReportFailure("DoSCallBack_LPSTR_InOut:NativeSide,the second Check"); - } - CoreClrFree(pStr); -} - -typedef LPSTR (STDMETHODCALLTYPE *SCallBackInByRef)(LPSTR* pstr); -extern "C" DLL_EXPORT void __cdecl DoSCallBack_LPSTR_InByRef(SCallBackInByRef callback) -{ - const char* pTemp = "AAAA"; - size_t len = strlen(pTemp) + 1; - LPSTR pStr = (LPSTR)CoreClrAlloc(len); - strncpy(pStr, pTemp, len); - - if (!CheckInput(callback(&pStr))) - { - ReportFailure("DoSCallBack_LPSTR_InByRef:NativeSide"); - } - CoreClrFree(pStr); -} - -typedef LPSTR (STDMETHODCALLTYPE *SCallBackOutByRef)(LPSTR* pstr); -extern "C" DLL_EXPORT void __cdecl DoSCallBack_LPSTR_OutByRef(SCallBackOutByRef callback) -{ - size_t len = 10; - LPSTR pStr = (LPSTR)CoreClrAlloc(len); - - if (!CheckInput(callback(&pStr))) - { - ReportFailure("DoSCallBack_LPSTR_OutByRef:NativeSide,the first check"); - } - if (!CheckInput(pStr)) - { - ReportFailure("DoSCallBack_LPSTR_OutByRef:NativeSide,the second Check"); - } - CoreClrFree(pStr); -} - -typedef LPSTR (STDMETHODCALLTYPE *SCallBackInOutByRef)(LPSTR* pstr); -extern "C" DLL_EXPORT void __cdecl DoSCallBack_LPSTR_InOutByRef(SCallBackInOutByRef callback) -{ - const char* pTemp = "AAAA"; - size_t len = strlen(pTemp) + 1; - LPSTR pStr = (LPSTR)CoreClrAlloc(len); - strncpy(pStr, pTemp, len); - - if (!CheckInput(callback(&pStr))) - { - ReportFailure("DoSCallBack_LPSTR_InOutByRef:NativeSide,the first check"); - } - if (!CheckInput(pStr)) - { - ReportFailure("DoSCallBack_LPSTR_InOutByRef:NativeSide,the second Check"); - } - CoreClrFree(pStr); -} -#pragma warning( pop ) diff --git a/src/coreclr/tests/src/Interop/COM/Activator/Program.cs b/src/coreclr/tests/src/Interop/COM/Activator/Program.cs deleted file mode 100644 index 511d9327f508..000000000000 --- a/src/coreclr/tests/src/Interop/COM/Activator/Program.cs +++ /dev/null @@ -1,270 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace Activator -{ - using Internal.Runtime.InteropServices; - - using System; - using System.IO; - using System.Runtime.InteropServices; - - using TestLibrary; - - using Console = Internal.Console; - - class Program - { - static void InvalidInterfaceRequest() - { - Console.WriteLine($"Running {nameof(InvalidInterfaceRequest)}..."); - - Assert.Throws( - () => - { - var notIClassFactory = new Guid("ED53F949-63E4-43B5-A13D-5655478AADD5"); - var cxt = new ComActivationContext() - { - InterfaceId = notIClassFactory - }; - ComActivator.GetClassFactoryForType(cxt); - }, - "Non-IClassFactory request should fail"); - } - - static void NonrootedAssemblyPath() - { - Console.WriteLine($"Running {nameof(NonrootedAssemblyPath)}..."); - - ArgumentException e = Assert.Throws( - () => - { - var cxt = new ComActivationContext() - { - InterfaceId = typeof(IClassFactory).GUID, - AssemblyPath = "foo.dll" - }; - ComActivator.GetClassFactoryForType(cxt); - }, - "Non-root assembly path should not be valid"); - } - - static void ClassNotRegistered() - { - Console.WriteLine($"Running {nameof(ClassNotRegistered)}..."); - - COMException e = Assert.Throws( - () => - { - var CLSID_NotRegistered = new Guid("328FF83E-3F6C-4BE9-A742-752562032925"); // Random GUID - var cxt = new ComActivationContext() - { - ClassId = CLSID_NotRegistered, - InterfaceId = typeof(IClassFactory).GUID, - AssemblyPath = @"C:\foo.dll" - }; - ComActivator.GetClassFactoryForType(cxt); - }, - "Class should not be found"); - - const int CLASS_E_CLASSNOTAVAILABLE = unchecked((int)0x80040111); - Assert.AreEqual(CLASS_E_CLASSNOTAVAILABLE, e.HResult, "Unexpected HRESULT"); - } - - static void ValidateAssemblyIsolation() - { - Console.WriteLine($"Running {nameof(ValidateAssemblyIsolation)}..."); - - string assemblySubPath = Path.Combine(Environment.CurrentDirectory, "Servers"); - string assemblyAPath = Path.Combine(assemblySubPath, "AssemblyA.dll"); - string assemblyBPath = Path.Combine(assemblySubPath, "AssemblyB.dll"); - string assemblyCPath = Path.Combine(assemblySubPath, "AssemblyC.dll"); - string assemblyPaths = $"{assemblyAPath}{Path.PathSeparator}{assemblyBPath}{Path.PathSeparator}{assemblyCPath}"; - - HostPolicyMock.Initialize(Environment.CurrentDirectory, null); - - var CLSID_NotUsed = Guid.Empty; // During this phase of activation the GUID is not used. - Guid iid = typeof(IGetTypeFromC).GUID; - Type typeCFromAssemblyA; - Type typeCFromAssemblyB; - - using (HostPolicyMock.Mock_corehost_resolve_component_dependencies( - 0, - assemblyPaths, - string.Empty, - string.Empty)) - { - var cxt = new ComActivationContext() - { - ClassId = CLSID_NotUsed, - InterfaceId = typeof(IClassFactory).GUID, - AssemblyPath = assemblyAPath, - AssemblyName = "AssemblyA", - TypeName = "ClassFromA" - }; - - var factory = (IClassFactory)ComActivator.GetClassFactoryForType(cxt); - - object svr; - factory.CreateInstance(null, ref iid, out svr); - typeCFromAssemblyA = (Type)((IGetTypeFromC)svr).GetTypeFromC(); - } - - using (HostPolicyMock.Mock_corehost_resolve_component_dependencies( - 0, - assemblyPaths, - string.Empty, - string.Empty)) - { - var cxt = new ComActivationContext() - { - ClassId = CLSID_NotUsed, - InterfaceId = typeof(IClassFactory).GUID, - AssemblyPath = assemblyBPath, - AssemblyName = "AssemblyB", - TypeName = "ClassFromB" - }; - - var factory = (IClassFactory)ComActivator.GetClassFactoryForType(cxt); - - object svr; - factory.CreateInstance(null, ref iid, out svr); - typeCFromAssemblyB = (Type)((IGetTypeFromC)svr).GetTypeFromC(); - } - - Assert.AreNotEqual(typeCFromAssemblyA, typeCFromAssemblyB, "Types should be from different AssemblyLoadContexts"); - } - - static void ValidateUserDefinedRegistrationCallbacks() - { - Console.WriteLine($"Running {nameof(ValidateUserDefinedRegistrationCallbacks)}..."); - - string assemblySubPath = Path.Combine(Environment.CurrentDirectory, "Servers"); - string assemblyAPath = Path.Combine(assemblySubPath, "AssemblyA.dll"); - string assemblyBPath = Path.Combine(assemblySubPath, "AssemblyB.dll"); - string assemblyCPath = Path.Combine(assemblySubPath, "AssemblyC.dll"); - string assemblyPaths = $"{assemblyAPath}{Path.PathSeparator}{assemblyBPath}{Path.PathSeparator}{assemblyCPath}"; - - HostPolicyMock.Initialize(Environment.CurrentDirectory, null); - - var CLSID_NotUsed = Guid.Empty; // During this phase of activation the GUID is not used. - Guid iid = typeof(IValidateRegistrationCallbacks).GUID; - - using (HostPolicyMock.Mock_corehost_resolve_component_dependencies( - 0, - assemblyPaths, - string.Empty, - string.Empty)) - { - string[] typeNamesToValidate = { - "ValidRegistrationTypeCallbacks", - "ValidRegistrationStringCallbacks", - "InheritedRegistrationTypeCallbacks", - "InheritedRegistrationStringCallbacks" - }; - - foreach (string typeName in typeNamesToValidate) - { - Console.WriteLine($"Validating {typeName}..."); - - var cxt = new ComActivationContext() - { - ClassId = CLSID_NotUsed, - InterfaceId = typeof(IClassFactory).GUID, - AssemblyPath = assemblyAPath, - AssemblyName = "AssemblyA", - TypeName = typeName - }; - - var factory = (IClassFactory)ComActivator.GetClassFactoryForType(cxt); - - object svr; - factory.CreateInstance(null, ref iid, out svr); - - var inst = (IValidateRegistrationCallbacks)svr; - Assert.IsFalse(inst.DidRegister()); - Assert.IsFalse(inst.DidUnregister()); - - cxt.InterfaceId = Guid.Empty; - ComActivator.ClassRegistrationScenarioForType(cxt, register: true); - ComActivator.ClassRegistrationScenarioForType(cxt, register: false); - - Assert.IsTrue(inst.DidRegister(), $"User-defined register function should have been called."); - Assert.IsTrue(inst.DidUnregister(), $"User-defined unregister function should have been called."); - } - } - - using (HostPolicyMock.Mock_corehost_resolve_component_dependencies( - 0, - assemblyPaths, - string.Empty, - string.Empty)) - { - foreach (string typename in new[] { "NoRegistrationCallbacks", "InvalidArgRegistrationCallbacks", "InvalidInstanceRegistrationCallbacks", "MultipleRegistrationCallbacks" }) - { - Console.WriteLine($"Validating {typename}..."); - - var cxt = new ComActivationContext() - { - ClassId = CLSID_NotUsed, - InterfaceId = typeof(IClassFactory).GUID, - AssemblyPath = assemblyAPath, - AssemblyName = "AssemblyA", - TypeName = typename - }; - - var factory = (IClassFactory)ComActivator.GetClassFactoryForType(cxt); - - object svr; - factory.CreateInstance(null, ref iid, out svr); - - var inst = (IValidateRegistrationCallbacks)svr; - cxt.InterfaceId = Guid.Empty; - bool exceptionThrown = false; - try - { - ComActivator.ClassRegistrationScenarioForType(cxt, register: true); - } - catch - { - exceptionThrown = true; - } - - Assert.IsTrue(exceptionThrown || !inst.DidRegister()); - - exceptionThrown = false; - try - { - ComActivator.ClassRegistrationScenarioForType(cxt, register: false); - } - catch - { - exceptionThrown = true; - } - - Assert.IsTrue(exceptionThrown || !inst.DidUnregister()); - } - } - } - - static int Main(string[] doNotUse) - { - try - { - InvalidInterfaceRequest(); - ClassNotRegistered(); - NonrootedAssemblyPath(); - ValidateAssemblyIsolation(); - ValidateUserDefinedRegistrationCallbacks(); - } - catch (Exception e) - { - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - - return 100; - } - } -} diff --git a/src/coreclr/tests/src/Interop/COM/Activator/Servers/AssemblyC.cs b/src/coreclr/tests/src/Interop/COM/Activator/Servers/AssemblyC.cs deleted file mode 100644 index fbb79f65f4d3..000000000000 --- a/src/coreclr/tests/src/Interop/COM/Activator/Servers/AssemblyC.cs +++ /dev/null @@ -1,9 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -public class ClassFromC -{ -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/COM/ComWrappers/API/Program.cs b/src/coreclr/tests/src/Interop/COM/ComWrappers/API/Program.cs deleted file mode 100644 index 2e76a65469fc..000000000000 --- a/src/coreclr/tests/src/Interop/COM/ComWrappers/API/Program.cs +++ /dev/null @@ -1,420 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace ComWrappersTests -{ - using System; - using System.Collections; - using System.Collections.Generic; - using System.Runtime.CompilerServices; - using System.Runtime.InteropServices; - - using ComWrappersTests.Common; - using TestLibrary; - - class Program - { - class TestComWrappers : ComWrappers - { - protected unsafe override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) - { - Assert.IsTrue(obj is Test); - - IntPtr fpQueryInteface = default; - IntPtr fpAddRef = default; - IntPtr fpRelease = default; - ComWrappers.GetIUnknownImpl(out fpQueryInteface, out fpAddRef, out fpRelease); - - var vtbl = new ITestVtbl() - { - IUnknownImpl = new IUnknownVtbl() - { - QueryInterface = fpQueryInteface, - AddRef = fpAddRef, - Release = fpRelease - }, - SetValue = Marshal.GetFunctionPointerForDelegate(ITestVtbl.pSetValue) - }; - var vtblRaw = RuntimeHelpers.AllocateTypeAssociatedMemory(typeof(ITestVtbl), sizeof(ITestVtbl)); - Marshal.StructureToPtr(vtbl, vtblRaw, false); - - var entryRaw = (ComInterfaceEntry*)RuntimeHelpers.AllocateTypeAssociatedMemory(typeof(ITestVtbl), sizeof(ComInterfaceEntry)); - entryRaw->IID = typeof(ITest).GUID; - entryRaw->Vtable = vtblRaw; - - count = 1; - return entryRaw; - } - - protected override object CreateObject(IntPtr externalComObject, CreateObjectFlags flag) - { - var iid = typeof(ITrackerObject).GUID; - IntPtr iTrackerComObject; - int hr = Marshal.QueryInterface(externalComObject, ref iid, out iTrackerComObject); - Assert.AreEqual(0, hr); - - return new ITrackerObjectWrapper(iTrackerComObject); - } - - public const int ReleaseObjectsCallAck = unchecked((int)-1); - - protected override void ReleaseObjects(IEnumerable objects) - { - throw new Exception() { HResult = ReleaseObjectsCallAck }; - } - - public static void ValidateIUnknownImpls() - { - Console.WriteLine($"Running {nameof(ValidateIUnknownImpls)}..."); - - ComWrappers.GetIUnknownImpl(out IntPtr fpQueryInteface, out IntPtr fpAddRef, out IntPtr fpRelease); - - Assert.AreNotEqual(fpQueryInteface, IntPtr.Zero); - Assert.AreNotEqual(fpAddRef, IntPtr.Zero); - Assert.AreNotEqual(fpRelease, IntPtr.Zero); - } - } - - static void ValidateComInterfaceCreation() - { - Console.WriteLine($"Running {nameof(ValidateComInterfaceCreation)}..."); - - var testObj = new Test(); - - var wrappers = new TestComWrappers(); - - // Allocate a wrapper for the object - IntPtr comWrapper = wrappers.GetOrCreateComInterfaceForObject(testObj, CreateComInterfaceFlags.TrackerSupport); - Assert.AreNotEqual(comWrapper, IntPtr.Zero); - - // Get a wrapper for an object and verify it is the same one. - IntPtr comWrapperMaybe = wrappers.GetOrCreateComInterfaceForObject(testObj, CreateComInterfaceFlags.TrackerSupport); - Assert.AreEqual(comWrapper, comWrapperMaybe); - - // Release the wrapper - int count = Marshal.Release(comWrapper); - Assert.AreEqual(count, 1); - count = Marshal.Release(comWrapperMaybe); - Assert.AreEqual(count, 0); - - // Create a new wrapper - IntPtr comWrapperNew = wrappers.GetOrCreateComInterfaceForObject(testObj, CreateComInterfaceFlags.TrackerSupport); - - // Once a wrapper is created for a managed object it is always present - Assert.AreEqual(comWrapperNew, comWrapper); - - // Release the new wrapper - count = Marshal.Release(comWrapperNew); - Assert.AreEqual(count, 0); - } - - static void ValidateFallbackQueryInterface() - { - Console.WriteLine($"Running {nameof(ValidateFallbackQueryInterface)}..."); - - var testObj = new Test() - { - EnableICustomQueryInterface = true - }; - - var wrappers = new TestComWrappers(); - - // Allocate a wrapper for the object - IntPtr comWrapper = wrappers.GetOrCreateComInterfaceForObject(testObj, CreateComInterfaceFlags.None); - - testObj.ICustomQueryInterface_GetInterfaceResult = new IntPtr(0x2000000); - - IntPtr result; - var anyGuid = new Guid("1E42439C-DCB5-4701-ACBD-87FE92E785DE"); - testObj.ICustomQueryInterface_GetInterfaceIID = anyGuid; - int hr = Marshal.QueryInterface(comWrapper, ref anyGuid, out result); - Assert.AreEqual(hr, 0); - Assert.AreEqual(result, testObj.ICustomQueryInterface_GetInterfaceResult); - - var anyGuid2 = new Guid("7996D0F9-C8DD-4544-B708-0F75C6FF076F"); - hr = Marshal.QueryInterface(comWrapper, ref anyGuid2, out result); - const int E_NOINTERFACE = unchecked((int)0x80004002); - Assert.AreEqual(hr, E_NOINTERFACE); - Assert.AreEqual(result, IntPtr.Zero); - } - - static void ValidateCreateObjectCachingScenario() - { - Console.WriteLine($"Running {nameof(ValidateCreateObjectCachingScenario)}..."); - - var cw = new TestComWrappers(); - - // Get an object from a tracker runtime. - IntPtr trackerObjRaw = MockReferenceTrackerRuntime.CreateTrackerObject(); - - var trackerObj1 = (ITrackerObjectWrapper)cw.GetOrCreateObjectForComInstance(trackerObjRaw, CreateObjectFlags.TrackerObject); - var trackerObj2 = (ITrackerObjectWrapper)cw.GetOrCreateObjectForComInstance(trackerObjRaw, CreateObjectFlags.TrackerObject); - Assert.AreEqual(trackerObj1, trackerObj2); - - // Ownership has been transferred to the wrapper. - Marshal.Release(trackerObjRaw); - - var trackerObj3 = (ITrackerObjectWrapper)cw.GetOrCreateObjectForComInstance(trackerObjRaw, CreateObjectFlags.TrackerObject | CreateObjectFlags.UniqueInstance); - Assert.AreNotEqual(trackerObj1, trackerObj3); - } - - static void ValidateWrappersInstanceIsolation() - { - Console.WriteLine($"Running {nameof(ValidateWrappersInstanceIsolation)}..."); - - var cw1 = new TestComWrappers(); - var cw2 = new TestComWrappers(); - - var testObj = new Test(); - - // Allocate a wrapper for the object - IntPtr comWrapper1 = cw1.GetOrCreateComInterfaceForObject(testObj, CreateComInterfaceFlags.TrackerSupport); - IntPtr comWrapper2 = cw2.GetOrCreateComInterfaceForObject(testObj, CreateComInterfaceFlags.TrackerSupport); - Assert.AreNotEqual(comWrapper1, IntPtr.Zero); - Assert.AreNotEqual(comWrapper2, IntPtr.Zero); - Assert.AreNotEqual(comWrapper1, comWrapper2); - - IntPtr comWrapper3 = cw1.GetOrCreateComInterfaceForObject(testObj, CreateComInterfaceFlags.TrackerSupport); - IntPtr comWrapper4 = cw2.GetOrCreateComInterfaceForObject(testObj, CreateComInterfaceFlags.TrackerSupport); - Assert.AreNotEqual(comWrapper3, comWrapper4); - Assert.AreEqual(comWrapper1, comWrapper3); - Assert.AreEqual(comWrapper2, comWrapper4); - - Marshal.Release(comWrapper1); - Marshal.Release(comWrapper2); - Marshal.Release(comWrapper3); - Marshal.Release(comWrapper4); - - // Get an object from a tracker runtime. - IntPtr trackerObjRaw = MockReferenceTrackerRuntime.CreateTrackerObject(); - - // Create objects for the COM instance - var trackerObj1 = (ITrackerObjectWrapper)cw1.GetOrCreateObjectForComInstance(trackerObjRaw, CreateObjectFlags.TrackerObject); - var trackerObj2 = (ITrackerObjectWrapper)cw2.GetOrCreateObjectForComInstance(trackerObjRaw, CreateObjectFlags.TrackerObject); - Assert.AreNotEqual(trackerObj1, trackerObj2); - - var trackerObj3 = (ITrackerObjectWrapper)cw1.GetOrCreateObjectForComInstance(trackerObjRaw, CreateObjectFlags.TrackerObject); - var trackerObj4 = (ITrackerObjectWrapper)cw2.GetOrCreateObjectForComInstance(trackerObjRaw, CreateObjectFlags.TrackerObject); - Assert.AreNotEqual(trackerObj3, trackerObj4); - Assert.AreEqual(trackerObj1, trackerObj3); - Assert.AreEqual(trackerObj2, trackerObj4); - - Marshal.Release(trackerObjRaw); - } - - static void ValidatePrecreatedExternalWrapper() - { - Console.WriteLine($"Running {nameof(ValidatePrecreatedExternalWrapper)}..."); - - var cw = new TestComWrappers(); - - // Get an object from a tracker runtime. - IntPtr trackerObjRaw = MockReferenceTrackerRuntime.CreateTrackerObject(); - - // Manually create a wrapper - var iid = typeof(ITrackerObject).GUID; - IntPtr iTestComObject; - int hr = Marshal.QueryInterface(trackerObjRaw, ref iid, out iTestComObject); - Assert.AreEqual(hr, 0); - var nativeWrapper = new ITrackerObjectWrapper(iTestComObject); - - // Register wrapper, but supply the wrapper. - var nativeWrapper2 = (ITrackerObjectWrapper)cw.GetOrRegisterObjectForComInstance(trackerObjRaw, CreateObjectFlags.TrackerObject, nativeWrapper); - Assert.AreEqual(nativeWrapper, nativeWrapper2); - - // Ownership has been transferred to the wrapper. - Marshal.Release(trackerObjRaw); - - // Validate reuse of a wrapper fails. - IntPtr trackerObjRaw2 = MockReferenceTrackerRuntime.CreateTrackerObject(); - Assert.Throws( - () => - { - cw.GetOrRegisterObjectForComInstance(trackerObjRaw2, CreateObjectFlags.None, nativeWrapper2); - }); - Marshal.Release(trackerObjRaw2); - - // Validate passing null wrapper fails. - Assert.Throws( - () => - { - cw.GetOrRegisterObjectForComInstance(trackerObjRaw, CreateObjectFlags.None, null); - }); - } - - static void ValidateIUnknownImpls() - => TestComWrappers.ValidateIUnknownImpls(); - - class BadComWrappers : ComWrappers - { - public enum FailureMode - { - ReturnInvalid, - ThrowException, - } - - public const int ExceptionErrorCode = 0x27; - - public FailureMode ComputeVtablesMode { get; set; } - public FailureMode CreateObjectMode { get; set; } - - protected unsafe override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) - { - switch (ComputeVtablesMode) - { - case FailureMode.ReturnInvalid: - { - count = -1; - return null; - } - case FailureMode.ThrowException: - throw new Exception() { HResult = ExceptionErrorCode }; - default: - Assert.Fail("Invalid failure mode"); - throw new Exception("UNREACHABLE"); - } - } - - protected override object CreateObject(IntPtr externalComObject, CreateObjectFlags flags) - { - switch (CreateObjectMode) - { - case FailureMode.ReturnInvalid: - return null; - case FailureMode.ThrowException: - throw new Exception() { HResult = ExceptionErrorCode }; - default: - Assert.Fail("Invalid failure mode"); - throw new Exception("UNREACHABLE"); - } - } - - protected override void ReleaseObjects(IEnumerable objects) - { - throw new NotSupportedException(); - } - } - - static void ValidateBadComWrapperImpl() - { - Console.WriteLine($"Running {nameof(ValidateBadComWrapperImpl)}..."); - - var wrapper = new BadComWrappers(); - - Assert.Throws( - () => - { - wrapper.ComputeVtablesMode = BadComWrappers.FailureMode.ReturnInvalid; - wrapper.GetOrCreateComInterfaceForObject(new Test(), CreateComInterfaceFlags.None); - }); - - try - { - wrapper.ComputeVtablesMode = BadComWrappers.FailureMode.ThrowException; - wrapper.GetOrCreateComInterfaceForObject(new Test(), CreateComInterfaceFlags.None); - } - catch (Exception e) - { - Assert.AreEqual(BadComWrappers.ExceptionErrorCode, e.HResult); - } - - IntPtr trackerObjRaw = MockReferenceTrackerRuntime.CreateTrackerObject(); - - Assert.Throws( - () => - { - wrapper.CreateObjectMode = BadComWrappers.FailureMode.ReturnInvalid; - wrapper.GetOrCreateObjectForComInstance(trackerObjRaw, CreateObjectFlags.None); - }); - - try - { - wrapper.CreateObjectMode = BadComWrappers.FailureMode.ThrowException; - wrapper.GetOrCreateObjectForComInstance(trackerObjRaw, CreateObjectFlags.None); - } - catch (Exception e) - { - Assert.AreEqual(BadComWrappers.ExceptionErrorCode, e.HResult); - } - - Marshal.Release(trackerObjRaw); - } - - static void ValidateRuntimeTrackerScenario() - { - Console.WriteLine($"Running {nameof(ValidateRuntimeTrackerScenario)}..."); - - var cw = new TestComWrappers(); - - // Get an object from a tracker runtime. - IntPtr trackerObjRaw = MockReferenceTrackerRuntime.CreateTrackerObject(); - - // Create a managed wrapper for the native object. - var trackerObj = (ITrackerObjectWrapper)cw.GetOrCreateObjectForComInstance(trackerObjRaw, CreateObjectFlags.TrackerObject); - - // Ownership has been transferred to the wrapper. - Marshal.Release(trackerObjRaw); - - var testWrapperIds = new List(); - for (int i = 0; i < 1000; ++i) - { - // Create a native wrapper for the managed object. - IntPtr testWrapper = cw.GetOrCreateComInterfaceForObject(new Test(), CreateComInterfaceFlags.TrackerSupport); - - // Pass the managed object to the native object. - int id = trackerObj.AddObjectRef(testWrapper); - - // Retain the managed object wrapper ptr. - testWrapperIds.Add(id); - } - - Assert.IsTrue(testWrapperIds.Count <= Test.InstanceCount); - - GC.Collect(); - GC.Collect(); - GC.Collect(); - GC.Collect(); - GC.Collect(); - - Assert.IsTrue(testWrapperIds.Count <= Test.InstanceCount); - - // Remove the managed object ref from the native object. - foreach (int id in testWrapperIds) - { - trackerObj.DropObjectRef(id); - } - - testWrapperIds.Clear(); - - GC.Collect(); - GC.Collect(); - GC.Collect(); - GC.Collect(); - GC.Collect(); - } - - static int Main(string[] doNotUse) - { - try - { - ValidateComInterfaceCreation(); - ValidateFallbackQueryInterface(); - ValidateCreateObjectCachingScenario(); - ValidateWrappersInstanceIsolation(); - ValidatePrecreatedExternalWrapper(); - ValidateIUnknownImpls(); - ValidateBadComWrapperImpl(); - ValidateRuntimeTrackerScenario(); - } - catch (Exception e) - { - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - - return 100; - } - } -} - diff --git a/src/coreclr/tests/src/Interop/COM/ComWrappers/WeakReference/WeakReferenceTest.cs b/src/coreclr/tests/src/Interop/COM/ComWrappers/WeakReference/WeakReferenceTest.cs deleted file mode 100644 index 64d32d621839..000000000000 --- a/src/coreclr/tests/src/Interop/COM/ComWrappers/WeakReference/WeakReferenceTest.cs +++ /dev/null @@ -1,249 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace ComWrappersTests -{ - using System; - using System.Collections; - using System.Collections.Generic; - using System.Runtime.CompilerServices; - using System.Runtime.InteropServices; - using TestLibrary; - - static class WeakReferenceNative - { - [DllImport(nameof(WeakReferenceNative))] - public static extern IntPtr CreateWeakReferencableObject(); - } - - public struct VtblPtr - { - public IntPtr Vtbl; - } - - public enum WrapperRegistration - { - Local, - TrackerSupport, - Marshalling, - } - - public class WeakReferenceableWrapper - { - private struct Vtbl - { - public IntPtr QueryInterface; - public _AddRef AddRef; - public _Release Release; - } - - private delegate int _AddRef(IntPtr This); - private delegate int _Release(IntPtr This); - - private readonly IntPtr instance; - private readonly Vtbl vtable; - - public WrapperRegistration Registration { get; } - - public WeakReferenceableWrapper(IntPtr instance, WrapperRegistration reg) - { - var inst = Marshal.PtrToStructure(instance); - this.vtable = Marshal.PtrToStructure(inst.Vtbl); - this.instance = instance; - Registration = reg; - } - - ~WeakReferenceableWrapper() - { - if (this.instance != IntPtr.Zero) - { - this.vtable.Release(this.instance); - } - } - } - - class Program - { - class TestComWrappers : ComWrappers - { - public WrapperRegistration Registration { get; } - - public TestComWrappers(WrapperRegistration reg = WrapperRegistration.Local) - { - Registration = reg; - } - - protected unsafe override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) - { - count = 0; - return null; - } - - protected override object CreateObject(IntPtr externalComObject, CreateObjectFlags flag) - { - Marshal.AddRef(externalComObject); - return new WeakReferenceableWrapper(externalComObject, Registration); - } - - protected override void ReleaseObjects(IEnumerable objects) - { - } - - public static readonly TestComWrappers TrackerSupportInstance = new TestComWrappers(WrapperRegistration.TrackerSupport); - public static readonly TestComWrappers MarshallingInstance = new TestComWrappers(WrapperRegistration.Marshalling); - } - - private static void ValidateWeakReferenceState(WeakReference wr, bool expectedIsAlive, TestComWrappers sourceWrappers = null) - { - WeakReferenceableWrapper target; - bool isAlive = wr.TryGetTarget(out target); - Assert.AreEqual(expectedIsAlive, isAlive); - - if (isAlive && sourceWrappers != null) - Assert.AreEqual(sourceWrappers.Registration, target.Registration); - } - - private static (WeakReference, IntPtr) GetWeakReference(TestComWrappers cw) - { - IntPtr objRaw = WeakReferenceNative.CreateWeakReferencableObject(); - var obj = (WeakReferenceableWrapper)cw.GetOrCreateObjectForComInstance(objRaw, CreateObjectFlags.None); - var wr = new WeakReference(obj); - ValidateWeakReferenceState(wr, expectedIsAlive: true, cw); - return (wr, objRaw); - } - - private static IntPtr SetWeakReferenceTarget(WeakReference wr, TestComWrappers cw) - { - IntPtr objRaw = WeakReferenceNative.CreateWeakReferencableObject(); - var obj = (WeakReferenceableWrapper)cw.GetOrCreateObjectForComInstance(objRaw, CreateObjectFlags.None); - wr.SetTarget(obj); - ValidateWeakReferenceState(wr, expectedIsAlive: true, cw); - return objRaw; - } - - private static void ValidateNativeWeakReference(TestComWrappers cw) - { - Console.WriteLine($" -- Validate weak reference creation"); - var (weakRef, nativeRef) = GetWeakReference(cw); - - // Make sure RCW is collected - GC.Collect(); - GC.WaitForPendingFinalizers(); - - // Non-globally registered ComWrappers instances do not support rehydration. - // A weak reference to an RCW wrapping an IWeakReference can stay alive if the RCW was created through - // a global ComWrappers instance. If the RCW was created throug a local ComWrappers instance, the weak - // reference should be dead and stay dead once the RCW is collected. - bool supportsRehydration = cw.Registration != WrapperRegistration.Local; - - Console.WriteLine($" -- Validate RCW recreation"); - ValidateWeakReferenceState(weakRef, expectedIsAlive: supportsRehydration, cw); - - // Release the last native reference. - Marshal.Release(nativeRef); - GC.Collect(); - GC.WaitForPendingFinalizers(); - - // After all native references die and the RCW is collected, the weak reference should be dead and stay dead. - Console.WriteLine($" -- Validate release"); - ValidateWeakReferenceState(weakRef, expectedIsAlive: false); - - // Reset the weak reference target - Console.WriteLine($" -- Validate target reset"); - nativeRef = SetWeakReferenceTarget(weakRef, cw); - - // Make sure RCW is collected - GC.Collect(); - GC.WaitForPendingFinalizers(); - - Console.WriteLine($" -- Validate RCW recreation"); - ValidateWeakReferenceState(weakRef, expectedIsAlive: supportsRehydration, cw); - - // Release the last native reference. - Marshal.Release(nativeRef); - GC.Collect(); - GC.WaitForPendingFinalizers(); - - // After all native references die and the RCW is collected, the weak reference should be dead and stay dead. - Console.WriteLine($" -- Validate release"); - ValidateWeakReferenceState(weakRef, expectedIsAlive: false); - } - - static void ValidateGlobalInstanceTrackerSupport() - { - Console.WriteLine($"Running {nameof(ValidateGlobalInstanceTrackerSupport)}..."); - ValidateNativeWeakReference(TestComWrappers.TrackerSupportInstance); - } - - static void ValidateGlobalInstanceMarshalling() - { - Console.WriteLine($"Running {nameof(ValidateGlobalInstanceMarshalling)}..."); - ValidateNativeWeakReference(TestComWrappers.MarshallingInstance); - } - - static void ValidateLocalInstance() - { - Console.WriteLine($"Running {nameof(ValidateLocalInstance)}..."); - ValidateNativeWeakReference(new TestComWrappers()); - } - - static void ValidateNonComWrappers() - { - Console.WriteLine($"Running {nameof(ValidateNonComWrappers)}..."); - - (WeakReference, IntPtr) GetWeakReference() - { - IntPtr objRaw = WeakReferenceNative.CreateWeakReferencableObject(); - var obj = Marshal.GetObjectForIUnknown(objRaw); - return (new WeakReference(obj), objRaw); - } - - bool HasTarget(WeakReference wr) - { - return wr.Target != null; - } - - var (weakRef, nativeRef) = GetWeakReference(); - GC.Collect(); - GC.WaitForPendingFinalizers(); - - // A weak reference to an RCW wrapping an IWeakReference created throguh the built-in system - // should stay alive even after the RCW dies - Assert.IsFalse(weakRef.IsAlive); - Assert.IsTrue(HasTarget(weakRef)); - - // Release the last native reference. - Marshal.Release(nativeRef); - GC.Collect(); - GC.WaitForPendingFinalizers(); - - // After all native references die and the RCW is collected, the weak reference should be dead and stay dead. - Assert.IsNull(weakRef.Target); - } - - static int Main(string[] doNotUse) - { - try - { - ValidateNonComWrappers(); - - ComWrappers.RegisterForTrackerSupport(TestComWrappers.TrackerSupportInstance); - ValidateGlobalInstanceTrackerSupport(); - - ComWrappers.RegisterForMarshalling(TestComWrappers.MarshallingInstance); - ValidateGlobalInstanceMarshalling(); - - ValidateLocalInstance(); - } - catch (Exception e) - { - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - - return 100; - } - } -} - diff --git a/src/coreclr/tests/src/Interop/COM/Dynamic/BasicTest.cs b/src/coreclr/tests/src/Interop/COM/Dynamic/BasicTest.cs deleted file mode 100644 index 3ace7ed6c006..000000000000 --- a/src/coreclr/tests/src/Interop/COM/Dynamic/BasicTest.cs +++ /dev/null @@ -1,485 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace Dynamic -{ - using System; - using System.Runtime.InteropServices; - using TestLibrary; - - internal class BasicTest - { - private Random rand; - private dynamic obj; - - public BasicTest(int seed = 123) - { - Type t = Type.GetTypeFromCLSID(Guid.Parse(ServerGuids.BasicTest)); - obj = Activator.CreateInstance(t); - rand = new Random(seed); - } - - public void Run() - { - Console.WriteLine($"Running {nameof(BasicTest)}"); - - DefaultMember(); - - Boolean(); - SByte(); - Byte(); - Short(); - UShort(); - Int(); - UInt(); - Int64(); - UInt64(); - - Float(); - Double(); - - String(); - Date(); - ComObject(); - Null(); - - ErrorWrapper(); - CurrencyWrapper(); - VariantWrapper(); - - Fail(); - } - - private void DefaultMember() - { - int val = (int)rand.Next(int.MinValue / 2, int.MaxValue / 2); - int expected = val * 2; - - // Invoke default member - Assert.AreEqual(expected, obj(val)); - Assert.AreEqual(expected, obj.Default(val)); - } - - private void Boolean() - { - // Get and set property - obj.Boolean_Property = true; - Assert.IsTrue(obj.Boolean_Property); - - // Call method with return value - Assert.IsFalse(obj.Boolean_Inverse_Ret(true)); - - // Call method passing by ref - bool inout = true; - obj.Boolean_Inverse_InOut(ref inout); - Assert.IsFalse(inout); - - // Pass as variant - Variant(true, false); - } - - private void SByte() - { - sbyte val = (sbyte)rand.Next(sbyte.MinValue / 2, sbyte.MaxValue / 2); - sbyte expected = (sbyte)(val * 2); - - // Get and set property - obj.SByte_Property = val; - Assert.AreEqual(val, obj.SByte_Property); - - // Call method with return value - Assert.AreEqual(expected, obj.SByte_Doubled_Ret(val)); - - // Call method passing by ref - sbyte inout = val; - obj.SByte_Doubled_InOut(ref inout); - Assert.AreEqual(expected, inout); - - // Pass as variant - Variant(val, expected); - } - - private void Byte() - { - byte val = (byte)rand.Next(byte.MaxValue / 2); - byte expected = (byte)(val * 2); - - // Get and set property - obj.Byte_Property = val; - Assert.AreEqual(val, obj.Byte_Property); - - // Call method with return value - Assert.AreEqual(expected, obj.Byte_Doubled_Ret(val)); - - // Call method passing by ref - byte inout = val; - obj.Byte_Doubled_InOut(ref inout); - Assert.AreEqual(expected, inout); - - // Pass as variant - Variant(val, expected); - } - - private void Short() - { - short val = (short)rand.Next(short.MinValue / 2, short.MaxValue / 2); - short expected = (short)(val * 2); - - // Get and set property - obj.Short_Property = val; - Assert.AreEqual(val, obj.Short_Property); - - // Call method with return value - Assert.AreEqual(expected, obj.Short_Doubled_Ret(val)); - - // Call method passing by ref - short inout = val; - obj.Short_Doubled_InOut(ref inout); - Assert.AreEqual(expected, inout); - - // Pass as variant - Variant(val, expected); - } - - private void UShort() - { - ushort val = (ushort)rand.Next(ushort.MaxValue / 2); - ushort expected = (ushort)(val * 2); - - // Get and set property - obj.UShort_Property = val; - Assert.AreEqual(val, obj.UShort_Property); - - // Call method with return value - Assert.AreEqual(expected, obj.UShort_Doubled_Ret(val)); - - // Call method passing by ref - ushort inout = val; - obj.UShort_Doubled_InOut(ref inout); - Assert.AreEqual(expected, inout); - - // Pass as variant - Variant(val, expected); - } - - private void Int() - { - int val = (int)rand.Next(int.MinValue / 2, int.MaxValue / 2); - int expected = val * 2; - - // Get and set property - obj.Int_Property = val; - Assert.AreEqual(val, obj.Int_Property); - - // Call method with return value - Assert.AreEqual(expected, obj.Int_Doubled_Ret(val)); - - // Call method passing by ref - int inout = val; - obj.Int_Doubled_InOut(ref inout); - Assert.AreEqual(expected, inout); - - // Pass as variant - Variant(val, expected); - } - - private void UInt() - { - uint val = (uint)rand.Next(); - uint expected = val * 2; - - // Get and set property - obj.UInt_Property = val; - Assert.AreEqual(val, obj.UInt_Property); - - // Call method with return value - Assert.AreEqual(expected, obj.UInt_Doubled_Ret(val)); - - // Call method passing by ref - uint inout = val; - obj.UInt_Doubled_InOut(ref inout); - Assert.AreEqual(expected, inout); - - // Pass as variant - Variant(val, expected); - } - - private void Int64() - { - long val = (long)rand.Next(); - long expected = val * 2; - - // Get and set property - obj.Int64_Property = val; - Assert.AreEqual(val, obj.Int64_Property); - - // Call method with return value - Assert.AreEqual(expected, obj.Int64_Doubled_Ret(val)); - - // Call method passing by ref - long inout = val; - obj.Int64_Doubled_InOut(ref inout); - Assert.AreEqual(expected, inout); - - // Pass as variant - Variant(val, expected); - } - - private void UInt64() - { - ulong val = (ulong)rand.Next(); - ulong expected = val * 2; - - // Get and set property - obj.UInt64_Property = val; - Assert.AreEqual(val, obj.UInt64_Property); - - // Call method with return value - Assert.AreEqual(expected, obj.UInt64_Doubled_Ret(val)); - - // Call method passing by ref - ulong inout = val; - obj.UInt64_Doubled_InOut(ref inout); - Assert.AreEqual(expected, inout); - - // Pass as variant - Variant(val, expected); - } - - private void Float() - { - float val = rand.Next() / 10f; - float expected = (float)Math.Ceiling(val); - - // Get and set property - obj.Float_Property = val; - Assert.AreEqual(val, obj.Float_Property); - - // Call method with return value - Assert.AreEqual(expected, obj.Float_Ceil_Ret(val)); - - // Call method passing by ref - float inout = val; - obj.Float_Ceil_InOut(ref inout); - Assert.AreEqual(expected, inout); - - // Pass as variant - Variant(val, expected); - } - - private void Double() - { - double val = rand.Next() / 10.0; - double expected = Math.Ceiling(val); - - // Get and set property - obj.Double_Property = val; - Assert.AreEqual(val, obj.Double_Property); - - // Call method with return value - Assert.AreEqual(expected, obj.Double_Ceil_Ret(val)); - - // Call method passing by ref - double inout = val; - obj.Double_Ceil_InOut(ref inout); - Assert.AreEqual(expected, inout); - - // Pass as variant - Variant(val, expected); - } - - private void String() - { - string val = System.IO.Path.GetRandomFileName(); - char[] chars = val.ToCharArray(); - Array.Reverse(chars); - string expected = new string(chars); - - // Get and set property - obj.String_Property = val; - Assert.AreEqual(val, obj.String_Property); - - // Call method with return value - Assert.AreEqual(expected, obj.String_Reverse_Ret(val)); - - // Call method passing by ref - string inout = val; - obj.String_Reverse_InOut(ref inout); - Assert.AreEqual(expected, inout); - - // Pass as variant - Variant(val, expected); - - StringWrapper(val, expected); - } - - private void Date() - { - DateTime val = new DateTime(rand.Next(DateTime.MinValue.Year, DateTime.Now.Year), rand.Next(1, 12), rand.Next(1, 28)); - DateTime expected = val.AddDays(1); - - // Get and set property - obj.Date_Property = val; - Assert.AreEqual(val, obj.Date_Property); - - // Call method with return value - Assert.AreEqual(expected, obj.Date_AddDay_Ret(val)); - - // Call method passing by ref - DateTime inout = val; - obj.Date_AddDay_InOut(ref inout); - Assert.AreEqual(expected, inout); - - // Pass as variant - Variant(val, expected); - } - - private void ComObject() - { - Type t = Type.GetTypeFromCLSID(Guid.Parse(ServerGuids.BasicTest)); - dynamic val = Activator.CreateInstance(t); - - // Get and set property - obj.Dispatch_Property = val; - Assert.AreEqual(val, obj.Dispatch_Property); - - // Update dispatch object - obj.Dispatch_Property.Boolean_Property = false; - Assert.IsFalse(obj.Dispatch_Property.Boolean_Property); - Assert.IsFalse(val.Boolean_Property); - - // Call method with return value - dynamic ret = obj.Dispatch_Ret(val); - Assert.IsTrue(ret.Boolean_Property); - Assert.IsFalse(val.Boolean_Property); - - // Call method passing by ref - obj.Dispatch_InOut(ref val); - Assert.IsTrue(val.Boolean_Property); - - val.Boolean_Property = false; - Variant(val, new Action(d => Assert.IsTrue(d.Boolean_Property))); - Assert.IsTrue(val.Boolean_Property); - - val.Boolean_Property = false; - UnknownWrapper(val); - } - - private void Null() - { - obj.Variant_Property = null; - Assert.IsNull(obj.Variant_Property); - - obj.String_Property = null; - Assert.AreEqual(string.Empty, obj.String_Property); - } - - private void StringWrapper(string toWrap, string expected) - { - var val = new BStrWrapper(toWrap); - - // Get and set property - obj.String_Property = val; - Assert.AreEqual(val.WrappedObject, obj.String_Property); - - // Call method with return value - Assert.AreEqual(expected, obj.String_Reverse_Ret(val)); - - // Call method passing by ref - BStrWrapper inout = new BStrWrapper(val.WrappedObject); - obj.String_Reverse_InOut(ref inout); - Assert.AreEqual(expected, inout.WrappedObject); - } - - private void UnknownWrapper(dynamic toWrap) - { - var val = new UnknownWrapper(toWrap); - - // Get and set property - obj.Variant_Property = val; - Assert.AreEqual(val.WrappedObject, obj.Variant_Property); - - // Call method with return value - dynamic ret = obj.Variant_Ret(val); - Assert.IsTrue(ret.Boolean_Property); - Assert.IsTrue(toWrap.Boolean_Property); - - // Call method passing by ref - obj.Variant_InOut(ref val); - Assert.IsTrue(toWrap.Boolean_Property); - } - - private void ErrorWrapper() - { - const int E_NOTIMPL = unchecked((int)0X80004001); - var val = new ErrorWrapper(E_NOTIMPL); - - // Get and set property - obj.Variant_Property = val; - Assert.AreEqual(val.ErrorCode, obj.Variant_Property); - } - -#pragma warning disable 618 // CurrencyWrapper is marked obsolete - private void CurrencyWrapper() - { - decimal toWrap = rand.Next() / 10.0m; - var val = new CurrencyWrapper(toWrap); - - // Get and set property - obj.Variant_Property = val; - Assert.AreEqual(val.WrappedObject, obj.Variant_Property); - } -#pragma warning restore 618 - - private void VariantWrapper() - { - long toWrap = (long)rand.Next(); - var val = new VariantWrapper(toWrap); - long expected = toWrap * 2; - - // Get and set property - obj.Variant_Property = val; - Assert.AreEqual(val.WrappedObject, obj.Variant_Property); - - // Call method with return value - dynamic ret = obj.Variant_Ret(val); - Assert.AreEqual(expected, ret); - - // Call method passing by ref - obj.Variant_InOut(ref val); - Assert.AreEqual(expected, val.WrappedObject); - } - - private void Variant(T val, Action validate) - { - // Get and set property - obj.Variant_Property = val; - Assert.AreEqual(val, obj.Variant_Property); - - // Call method with return value - validate(obj.Variant_Ret(val)); - - // Call method passing by ref - T inout = val; - obj.Variant_InOut(ref inout); - validate(inout); - } - - private void Variant(T val, T expected) - { - Variant(val, v => Assert.AreEqual(expected, v)); - } - - private void Fail() - { - const int E_ABORT = unchecked((int)0x80004004); - string message = "CUSTOM ERROR MESSAGE"; - COMException comException = Assert.Throws(() => obj.Fail(E_ABORT, message)); - Assert.AreEqual(E_ABORT, comException.HResult, "Unexpected HRESULT on COMException"); - Assert.AreEqual(message, comException.Message, "Unexpected message on COMException"); - - Assert.Throws(() => obj.Throw()); - } - } -} diff --git a/src/coreclr/tests/src/Interop/COM/Dynamic/Program.cs b/src/coreclr/tests/src/Interop/COM/Dynamic/Program.cs deleted file mode 100644 index e25a5bea7a11..000000000000 --- a/src/coreclr/tests/src/Interop/COM/Dynamic/Program.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace Dynamic -{ - using System; - using TestLibrary; - - class Program - { - static int Main(string[] doNotUse) - { - // RegFree COM is not supported on Windows Nano - if (Utilities.IsWindowsNanoServer) - { - return 100; - } - - try - { - new BasicTest().Run(); - new CollectionTest().Run(); - new EventTest().Run(); - new ParametersTest().Run(); - } - catch (Exception e) - { - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - - return 100; - } - } -} diff --git a/src/coreclr/tests/src/Interop/COM/Dynamic/ServerGuids.cs b/src/coreclr/tests/src/Interop/COM/Dynamic/ServerGuids.cs deleted file mode 100644 index aa8c07e09b3b..000000000000 --- a/src/coreclr/tests/src/Interop/COM/Dynamic/ServerGuids.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -namespace Dynamic -{ - /// - /// CLSIDs for COM servers used for dynamic binding - /// - internal static class ServerGuids - { - public const string BasicTest = "ED349A5B-257B-4349-8CB8-2C30B0C05FC3"; - public const string CollectionTest = "1FFF64AE-FF9C-41AB-BF80-3ECA831AEC40"; - public const string EventTest = "23425222-10FE-46BA-8B1A-1D42D2D73464"; - public const string ParametersTest = "787FEAF2-34F6-4244-884A-0A142DAB3B77"; - } -} diff --git a/src/coreclr/tests/src/Interop/COM/NETClients/Aggregation/Program.cs b/src/coreclr/tests/src/Interop/COM/NETClients/Aggregation/Program.cs deleted file mode 100644 index 50cc7618a174..000000000000 --- a/src/coreclr/tests/src/Interop/COM/NETClients/Aggregation/Program.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace NetClient -{ - using System; - using System.Runtime.InteropServices; - - using TestLibrary; - using Server.Contract; - using Server.Contract.Servers; - - class Program - { - class ManagedInner : AggregationTestingClass - { - } - - static void ValidateNativeOuter() - { - var managedInner = new ManagedInner(); - var nativeOuter = (AggregationTesting)managedInner; - - Assert.IsTrue(nativeOuter.IsAggregated()); - Assert.IsTrue(nativeOuter.AreAggregated(managedInner, nativeOuter)); - Assert.IsFalse(nativeOuter.AreAggregated(nativeOuter, new object())); - } - - static int Main(string[] doNotUse) - { - // RegFree COM is not supported on Windows Nano - if (Utilities.IsWindowsNanoServer) - { - return 100; - } - - try - { - ValidateNativeOuter(); - } - catch (Exception e) - { - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - - return 100; - } - } -} diff --git a/src/coreclr/tests/src/Interop/COM/NETClients/ConsumeNETServer/Program.cs b/src/coreclr/tests/src/Interop/COM/NETClients/ConsumeNETServer/Program.cs deleted file mode 100644 index 1a2aa68d9931..000000000000 --- a/src/coreclr/tests/src/Interop/COM/NETClients/ConsumeNETServer/Program.cs +++ /dev/null @@ -1,117 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace NetClient -{ - using System; - using System.Collections.Generic; - using System.Runtime.CompilerServices; - using System.Runtime.InteropServices; - - using TestLibrary; - using Server.Contract; - - using CoClass = Server.Contract.Servers; - - class Program - { - static void Validate_Activation() - { - Console.WriteLine($"{nameof(Validate_Activation)}..."); - - var test = new CoClass.ConsumeNETServerTesting(); - test.ReleaseResources(); - - // The CoClass should be the activated type, _not_ the activation interface. - Assert.AreEqual(test.GetType(), typeof(CoClass.ConsumeNETServerTestingClass)); - } - - static void Validate_CCW_Wasnt_Unwrapped() - { - Console.WriteLine($"{nameof(Validate_CCW_Wasnt_Unwrapped)}..."); - - var test = new CoClass.ConsumeNETServerTesting(); - test.ReleaseResources(); - - // The CoClass should be the activated type, _not_ the implementation class. - // This indicates the real implementation class is wrapped in its CCW and exposed - // to the runtime as an RCW. - Assert.AreNotEqual(test.GetType(), typeof(ConsumeNETServerTesting)); - } - - static void Validate_Client_CCW_RCW() - { - Console.WriteLine($"{nameof(Validate_Client_CCW_RCW)}..."); - - IntPtr ccw = IntPtr.Zero; - - // Validate the client side view is consistent - var test = new CoClass.ConsumeNETServerTesting(); - try - { - ccw = test.GetCCW(); - object rcw = Marshal.GetObjectForIUnknown(ccw); - object inst = test.GetRCW(); - Assert.AreEqual(rcw, inst); - } - finally - { - test.ReleaseResources(); - } - } - - static void Validate_Server_CCW_RCW() - { - Console.WriteLine($"{nameof(Validate_Server_CCW_RCW)}..."); - - // Validate the server side view is consistent - var test = new CoClass.ConsumeNETServerTesting(); - try - { - Assert.IsTrue(test.EqualByCCW(test)); - Assert.IsTrue(test.NotEqualByRCW(test)); - } - finally - { - test.ReleaseResources(); - } - } - - static int Main(string[] doNotUse) - { - // RegFree COM is not supported on Windows Nano - if (Utilities.IsWindowsNanoServer) - { - return 100; - } - - // Initialize CoreShim and hostpolicymock - HostPolicyMock.Initialize(Environment.CurrentDirectory, null); - Environment.SetEnvironmentVariable("CORESHIM_COMACT_ASSEMBLYNAME", "NETServer"); - Environment.SetEnvironmentVariable("CORESHIM_COMACT_TYPENAME", "ConsumeNETServerTesting"); - - try - { - using (HostPolicyMock.Mock_corehost_resolve_component_dependencies( - 0, - string.Empty, - string.Empty, - string.Empty)) - { - Validate_Activation(); - Validate_CCW_Wasnt_Unwrapped(); - Validate_Client_CCW_RCW(); - Validate_Server_CCW_RCW(); - } - } - catch (Exception e) - { - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - - return 100; - } - } -} diff --git a/src/coreclr/tests/src/Interop/COM/NETClients/Events/Program.cs b/src/coreclr/tests/src/Interop/COM/NETClients/Events/Program.cs deleted file mode 100644 index c6cc282a5c61..000000000000 --- a/src/coreclr/tests/src/Interop/COM/NETClients/Events/Program.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace NetClient -{ - using System; - using System.Reflection; - using System.Runtime.InteropServices; - - using TestLibrary; - using Server.Contract; - using Server.Contract.Servers; - using Server.Contract.Events; - - class Program - { - static void Validate_BasicCOMEvent() - { - Console.WriteLine($"{nameof(Validate_BasicCOMEvent)}..."); - - var eventTesting = (EventTesting)new EventTestingClass(); - - // Verify event handler subscription - - // Add event - eventTesting.OnEvent += OnEventEventHandler; - - bool eventFired = false; - string message = string.Empty; - eventTesting.FireEvent(); - - Assert.IsTrue(eventFired, "Event didn't fire"); - Assert.AreEqual(nameof(EventTesting.FireEvent), message, "Event message is incorrect"); - - // Remove event - eventTesting.OnEvent -= OnEventEventHandler; - - // Verify event handler removed - - eventFired = false; - eventTesting.FireEvent(); - - Assert.IsFalse(eventFired, "Event shouldn't fire"); - - void OnEventEventHandler(string msg) - { - eventFired = true; - message = msg; - } - } - - // The ComAwareEventInfo is used by the compiler when PIAs - // containing COM Events are embedded. - static void Validate_COMEventViaComAwareEventInfo() - { - Console.WriteLine($"{nameof(Validate_COMEventViaComAwareEventInfo)}..."); - - var eventTesting = (EventTesting)new EventTestingClass(); - - // Verify event handler subscription - - // Add event - var comAwareEventInfo = new ComAwareEventInfo(typeof(TestingEvents_Event), nameof(TestingEvents_Event.OnEvent)); - var handler = new TestingEvents_OnEventEventHandler(OnEventEventHandler); - comAwareEventInfo.AddEventHandler(eventTesting, handler); - - bool eventFired = false; - string message = string.Empty; - eventTesting.FireEvent(); - - Assert.IsTrue(eventFired, "Event didn't fire"); - Assert.AreEqual(nameof(EventTesting.FireEvent), message, "Event message is incorrect"); - - comAwareEventInfo.RemoveEventHandler(eventTesting, handler); - - // Verify event handler removed - - eventFired = false; - eventTesting.FireEvent(); - - Assert.IsFalse(eventFired, "Event shouldn't fire"); - - void OnEventEventHandler(string msg) - { - eventFired = true; - message = msg; - } - } - - static int Main(string[] doNotUse) - { - // RegFree COM is not supported on Windows Nano - if (Utilities.IsWindowsNanoServer) - { - return 100; - } - - try - { - Validate_BasicCOMEvent(); - Validate_COMEventViaComAwareEventInfo(); - } - catch (Exception e) - { - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - - return 100; - } - } -} diff --git a/src/coreclr/tests/src/Interop/COM/NETClients/IDispatch/Program.cs b/src/coreclr/tests/src/Interop/COM/NETClients/IDispatch/Program.cs deleted file mode 100644 index bf34a05e613b..000000000000 --- a/src/coreclr/tests/src/Interop/COM/NETClients/IDispatch/Program.cs +++ /dev/null @@ -1,229 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace NetClient -{ - using System; - using System.Globalization; - using System.Reflection; - using System.Runtime.InteropServices; - - using TestLibrary; - using Server.Contract; - using Server.Contract.Servers; - - class Program - { - static void Validate_Numeric_In_ReturnByRef() - { - var dispatchTesting = (DispatchTesting)new DispatchTestingClass(); - - byte b1 = 1; - byte b2 = b1; - short s1 = -1; - short s2 = s1; - ushort us1 = 1; - ushort us2 = us1; - int i1 = -1; - int i2 = i1; - uint ui1 = 1; - uint ui2 = ui1; - long l1 = -1; - long l2 = l1; - ulong ul1 = 1; - ulong ul2 = ul1; - - Console.WriteLine($"Calling {nameof(DispatchTesting.DoubleNumeric_ReturnByRef)} ..."); - dispatchTesting.DoubleNumeric_ReturnByRef ( - b1, ref b2, - s1, ref s2, - us1, ref us2, - i1, ref i2, - ui1, ref ui2, - l1, ref l2, - ul1, ref ul2); - Console.WriteLine($"Call to {nameof(DispatchTesting.DoubleNumeric_ReturnByRef)} complete"); - - Assert.AreEqual(b1 * 2, b2); - Assert.AreEqual(s1 * 2, s2); - Assert.AreEqual(us1 * 2, us2); - Assert.AreEqual(i1 * 2, i2); - Assert.AreEqual(ui1 * 2, ui2); - Assert.AreEqual(l1 * 2, l2); - Assert.AreEqual(ul1 * 2, ul2); - } - - static private bool EqualByBound(float expected, float actual) - { - float low = expected - 0.0001f; - float high = expected + 0.0001f; - float eps = Math.Abs(expected - actual); - return eps < float.Epsilon || (low < actual && actual < high); - } - - static private bool EqualByBound(double expected, double actual) - { - double low = expected - 0.00001; - double high = expected + 0.00001; - double eps = Math.Abs(expected - actual); - return eps < double.Epsilon || (low < actual && actual < high); - } - - static void Validate_Float_In_ReturnAndUpdateByRef() - { - var dispatchTesting = (DispatchTesting)new DispatchTestingClass(); - - float a = .1f; - float b = .2f; - float expected = a + b; - - Console.WriteLine($"Calling {nameof(DispatchTesting.Add_Float_ReturnAndUpdateByRef)} ..."); - float c = b; - float d = dispatchTesting.Add_Float_ReturnAndUpdateByRef (a, ref c); - - Console.WriteLine($"Call to {nameof(DispatchTesting.Add_Float_ReturnAndUpdateByRef)} complete: {a} + {b} = {d}; {c} == {d}"); - Assert.IsTrue(EqualByBound(expected, c)); - Assert.IsTrue(EqualByBound(expected, d)); - } - - static void Validate_Double_In_ReturnAndUpdateByRef() - { - var dispatchTesting = (DispatchTesting)new DispatchTestingClass(); - - double a = .1; - double b = .2; - double expected = a + b; - - Console.WriteLine($"Calling {nameof(DispatchTesting.Add_Double_ReturnAndUpdateByRef)} ..."); - double c = b; - double d = dispatchTesting.Add_Double_ReturnAndUpdateByRef (a, ref c); - - Console.WriteLine($"Call to {nameof(DispatchTesting.Add_Double_ReturnAndUpdateByRef)} complete: {a} + {b} = {d}; {c} == {d}"); - Assert.IsTrue(EqualByBound(expected, c)); - Assert.IsTrue(EqualByBound(expected, d)); - } - - static int GetErrorCodeFromHResult(int hresult) - { - // https://msdn.microsoft.com/en-us/library/cc231198.aspx - return hresult & 0xffff; - } - - static void Validate_Exception() - { - var dispatchTesting = (DispatchTesting)new DispatchTestingClass(); - - int errorCode = 127; - string resultString = errorCode.ToString("x"); - try - { - Console.WriteLine($"Calling {nameof(DispatchTesting.TriggerException)} with {nameof(IDispatchTesting_Exception.Disp)} {errorCode}..."); - dispatchTesting.TriggerException(IDispatchTesting_Exception.Disp, errorCode); - Assert.Fail("DISP exception not thrown properly"); - } - catch (COMException e) - { - Assert.AreEqual(GetErrorCodeFromHResult(e.HResult), errorCode); - Assert.AreEqual(e.Message, resultString); - } - - try - { - Console.WriteLine($"Calling {nameof(DispatchTesting.TriggerException)} with {nameof(IDispatchTesting_Exception.HResult)} {errorCode}..."); - dispatchTesting.TriggerException(IDispatchTesting_Exception.HResult, errorCode); - Assert.Fail("HRESULT exception not thrown properly"); - } - catch (COMException e) - { - Assert.AreEqual(GetErrorCodeFromHResult(e.HResult), errorCode); - // Failing HRESULT exceptions contain CLR generated messages - } - } - - static void Validate_StructNotSupported() - { - Console.WriteLine($"IDispatch with structs not supported..."); - var dispatchTesting = (DispatchTesting)new DispatchTestingClass(); - - var input = new HFA_4() { x = 1f, y = 2f, z = 3f, w = 4f }; - Assert.Throws(() => dispatchTesting.DoubleHVAValues(ref input)); - } - - static void Validate_LCID_Marshaled() - { - var dispatchTesting = (DispatchTesting)new DispatchTestingClass(); - CultureInfo oldCulture = CultureInfo.CurrentCulture; - CultureInfo newCulture = new CultureInfo("es-ES", false); - try - { - CultureInfo englishCulture = new CultureInfo("en-US", false); - CultureInfo.CurrentCulture = newCulture; - int lcid = dispatchTesting.PassThroughLCID(); - Assert.AreEqual(englishCulture.LCID, lcid); // CLR->Dispatch LCID marshalling is explicitly hardcoded to en-US instead of passing the current culture. - } - finally - { - CultureInfo.CurrentCulture = oldCulture; - } - } - - static void Validate_Enumerator() - { - var dispatchTesting = (DispatchTesting)new DispatchTestingClass(); - var expected = System.Linq.Enumerable.Range(0, 10); - - Console.WriteLine($"Calling {nameof(DispatchTesting.GetEnumerator)} ..."); - var enumerator = dispatchTesting.GetEnumerator(); - Assert.AreAllEqual(expected, GetEnumerable(enumerator)); - - enumerator.Reset(); - Assert.AreAllEqual(expected, GetEnumerable(enumerator)); - - Console.WriteLine($"Calling {nameof(DispatchTesting.ExplicitGetEnumerator)} ..."); - var enumeratorExplicit = dispatchTesting.ExplicitGetEnumerator(); - Assert.AreAllEqual(expected, GetEnumerable(enumeratorExplicit)); - - enumeratorExplicit.Reset(); - Assert.AreAllEqual(expected, GetEnumerable(enumeratorExplicit)); - - System.Collections.Generic.IEnumerable GetEnumerable(System.Collections.IEnumerator e) - { - var list = new System.Collections.Generic.List(); - while (e.MoveNext()) - { - list.Add((int)e.Current); - } - - return list; - } - } - - static int Main(string[] doNotUse) - { - // RegFree COM is not supported on Windows Nano - if (Utilities.IsWindowsNanoServer) - { - return 100; - } - - try - { - Validate_Numeric_In_ReturnByRef(); - Validate_Float_In_ReturnAndUpdateByRef(); - Validate_Double_In_ReturnAndUpdateByRef(); - Validate_Exception(); - Validate_StructNotSupported(); - Validate_LCID_Marshaled(); - Validate_Enumerator(); - } - catch (Exception e) - { - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - - return 100; - } - } -} diff --git a/src/coreclr/tests/src/Interop/COM/NETClients/Licensing/Program.cs b/src/coreclr/tests/src/Interop/COM/NETClients/Licensing/Program.cs deleted file mode 100644 index 68ac88184d0f..000000000000 --- a/src/coreclr/tests/src/Interop/COM/NETClients/Licensing/Program.cs +++ /dev/null @@ -1,147 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace NetClient -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.Reflection; - using System.Runtime.InteropServices; - - using TestLibrary; - using Server.Contract; - using Server.Contract.Servers; - - class Program - { - static readonly string DefaultLicKey = "__MOCK_LICENSE_KEY__"; - static void ActivateLicensedObject() - { - Console.WriteLine($"Calling {nameof(ActivateLicensedObject)}..."); - - // Validate activation - var licenseTesting = (LicenseTesting)new LicenseTestingClass(); - - // Validate license denial - licenseTesting.SetNextDenyLicense(true); - try - { - var tmp = (LicenseTesting)new LicenseTestingClass(); - Assert.Fail("Activation of licensed class should fail"); - } - catch (COMException e) - { - const int CLASS_E_NOTLICENSED = unchecked((int)0x80040112); - Assert.AreEqual(CLASS_E_NOTLICENSED, e.HResult); - } - finally - { - licenseTesting.SetNextDenyLicense(false); - } - } - - class MockLicenseContext : LicenseContext - { - private readonly Type _type; - private string _key; - - public MockLicenseContext(Type type, LicenseUsageMode mode) - { - UsageMode = mode; - _type = type; - } - - public override LicenseUsageMode UsageMode { get; } - - public override string GetSavedLicenseKey(Type type, Assembly resourceAssembly) - { - if (type == _type) - { - return _key; - } - - return null; - } - - public override void SetSavedLicenseKey(Type type, string key) - { - if (type == _type) - { - _key = key; - } - } - } - - static void ActivateUnderDesigntimeContext() - { - Console.WriteLine($"Calling {nameof(ActivateUnderDesigntimeContext)}..."); - - LicenseContext prev = LicenseManager.CurrentContext; - try - { - string licKey = "__TEST__"; - LicenseManager.CurrentContext = new MockLicenseContext(typeof(LicenseTestingClass), LicenseUsageMode.Designtime); - LicenseManager.CurrentContext.SetSavedLicenseKey(typeof(LicenseTestingClass), licKey); - - var licenseTesting = (LicenseTesting)new LicenseTestingClass(); - - // During design time the IClassFactory::CreateInstance will be called - no license - Assert.AreEqual(null, licenseTesting.GetLicense()); - - // Verify the value retrieved from the IClassFactory2::RequestLicKey was what was set - Assert.AreEqual(DefaultLicKey, LicenseManager.CurrentContext.GetSavedLicenseKey(typeof(LicenseTestingClass), resourceAssembly: null)); - } - finally - { - LicenseManager.CurrentContext = prev; - } - } - - static void ActivateUnderRuntimeContext() - { - Console.WriteLine($"Calling {nameof(ActivateUnderRuntimeContext)}..."); - - LicenseContext prev = LicenseManager.CurrentContext; - try - { - string licKey = "__TEST__"; - LicenseManager.CurrentContext = new MockLicenseContext(typeof(LicenseTestingClass), LicenseUsageMode.Runtime); - LicenseManager.CurrentContext.SetSavedLicenseKey(typeof(LicenseTestingClass), licKey); - - var licenseTesting = (LicenseTesting)new LicenseTestingClass(); - - // During runtime the IClassFactory::CreateInstance2 will be called with license from context - Assert.AreEqual(licKey, licenseTesting.GetLicense()); - } - finally - { - LicenseManager.CurrentContext = prev; - } - } - - static int Main(string[] doNotUse) - { - // RegFree COM is not supported on Windows Nano - if (Utilities.IsWindowsNanoServer) - { - return 100; - } - - try - { - ActivateLicensedObject(); - ActivateUnderDesigntimeContext(); - ActivateUnderRuntimeContext(); - } - catch (Exception e) - { - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - - return 100; - } - } -} diff --git a/src/coreclr/tests/src/Interop/COM/NETClients/Primitives/ArrayTests.cs b/src/coreclr/tests/src/Interop/COM/NETClients/Primitives/ArrayTests.cs deleted file mode 100644 index 8fb6b22145eb..000000000000 --- a/src/coreclr/tests/src/Interop/COM/NETClients/Primitives/ArrayTests.cs +++ /dev/null @@ -1,168 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace NetClient -{ - using System; - using System.Collections.Generic; - using System.Linq; - using TestLibrary; - - class ArrayTests - { - static private readonly IEnumerable BaseData = Enumerable.Range(0, 10); - - private readonly Server.Contract.Servers.ArrayTesting server; - private readonly double expectedMean; - - public ArrayTests() - { - this.server = (Server.Contract.Servers.ArrayTesting)new Server.Contract.Servers.ArrayTestingClass(); - - double acc = 0.0; - int[] rawData = BaseData.ToArray(); - foreach (var d in rawData) - { - acc += d; - } - - expectedMean = acc / rawData.Length; - } - - public void Run() - { - this.Marshal_ByteArray(); - this.Marshal_ShortArray(); - this.Marshal_UShortArray(); - this.Marshal_IntArray(); - this.Marshal_UIntArray(); - this.Marshal_LongArray(); - this.Marshal_ULongArray(); - this.Marshal_FloatArray(); - this.Marshal_DoubleArray(); - } - - static private bool EqualByBound(double expected, double actual) - { - double low = expected - 0.00001; - double high = expected + 0.00001; - double eps = Math.Abs(expected - actual); - bool isEqual = eps < double.Epsilon || (low < actual && actual < high); - if (!isEqual) - { - Console.WriteLine($"{expected} {actual}"); - } - - return isEqual; - } - - private void Marshal_ByteArray() - { - int len; - byte[] data = BaseData.Select(i => (byte)i).ToArray(); - - Console.WriteLine($"{data.GetType().Name} marshalling"); - Assert.IsTrue(EqualByBound(expectedMean, this.server.Mean_Byte_LP_PreLen(data.Length, data)), $"Mean_Byte_LP_PreLen"); - Assert.IsTrue(EqualByBound(expectedMean, this.server.Mean_Byte_LP_PostLen(data, data.Length)), $"Mean_Byte_LP_PostLen"); - Assert.IsTrue(EqualByBound(expectedMean, this.server.Mean_Byte_SafeArray_OutLen(data, out len)), $"Mean_Byte_SafeArray_OutLen"); - Assert.AreEqual(data.Length, len); - } - - private void Marshal_ShortArray() - { - int len; - short[] data = BaseData.Select(i => (short)i).ToArray(); - - Console.WriteLine($"{data.GetType().Name} marshalling"); - Assert.IsTrue(EqualByBound(expectedMean, this.server.Mean_Short_LP_PreLen(data.Length, data)), $"Mean_Short_LP_PreLen"); - Assert.IsTrue(EqualByBound(expectedMean, this.server.Mean_Short_LP_PostLen(data, data.Length)), $"Mean_Short_LP_PostLen"); - Assert.IsTrue(EqualByBound(expectedMean, this.server.Mean_Short_SafeArray_OutLen(data, out len)), $"Mean_Short_SafeArray_OutLen"); - Assert.AreEqual(data.Length, len); - } - - private void Marshal_UShortArray() - { - int len; - ushort[] data = BaseData.Select(i => (ushort)i).ToArray(); - - Console.WriteLine($"{data.GetType().Name} marshalling"); - Assert.IsTrue(EqualByBound(expectedMean, this.server.Mean_UShort_LP_PreLen(data.Length, data)), $"Mean_UShort_LP_PreLen"); - Assert.IsTrue(EqualByBound(expectedMean, this.server.Mean_UShort_LP_PostLen(data, data.Length)), $"Mean_UShort_LP_PostLen"); - Assert.IsTrue(EqualByBound(expectedMean, this.server.Mean_UShort_SafeArray_OutLen(data, out len)), $"Mean_UShort_SafeArray_OutLen"); - Assert.AreEqual(data.Length, len); - } - - private void Marshal_IntArray() - { - int len; - int[] data = BaseData.Select(i => i).ToArray(); - - Console.WriteLine($"{data.GetType().Name} marshalling"); - Assert.IsTrue(EqualByBound(expectedMean, this.server.Mean_Int_LP_PreLen(data.Length, data)), $"Mean_Int_LP_PreLen"); - Assert.IsTrue(EqualByBound(expectedMean, this.server.Mean_Int_LP_PostLen(data, data.Length)), $"Mean_Int_LP_PostLen"); - Assert.IsTrue(EqualByBound(expectedMean, this.server.Mean_Int_SafeArray_OutLen(data, out len)), $"Mean_Int_SafeArray_OutLen"); - Assert.AreEqual(data.Length, len); - } - - private void Marshal_UIntArray() - { - int len; - uint[] data = BaseData.Select(i => (uint)i).ToArray(); - - Console.WriteLine($"{data.GetType().Name} marshalling"); - Assert.IsTrue(EqualByBound(expectedMean, this.server.Mean_UInt_LP_PreLen(data.Length, data)), $"Mean_UInt_LP_PreLen"); - Assert.IsTrue(EqualByBound(expectedMean, this.server.Mean_UInt_LP_PostLen(data, data.Length)), $"Mean_UInt_LP_PostLen"); - Assert.IsTrue(EqualByBound(expectedMean, this.server.Mean_UInt_SafeArray_OutLen(data, out len)), $"Mean_UInt_SafeArray_OutLen"); - Assert.AreEqual(data.Length, len); - } - - private void Marshal_LongArray() - { - int len; - long[] data = BaseData.Select(i => (long)i).ToArray(); - - Console.WriteLine($"{data.GetType().Name} marshalling"); - Assert.IsTrue(EqualByBound(expectedMean, this.server.Mean_Long_LP_PreLen(data.Length, data)), $"Mean_Long_LP_PreLen"); - Assert.IsTrue(EqualByBound(expectedMean, this.server.Mean_Long_LP_PostLen(data, data.Length)), $"Mean_Long_LP_PostLen"); - Assert.IsTrue(EqualByBound(expectedMean, this.server.Mean_Long_SafeArray_OutLen(data, out len)), $"Mean_Long_SafeArray_OutLen"); - Assert.AreEqual(data.Length, len); - } - - private void Marshal_ULongArray() - { - int len; - ulong[] data = BaseData.Select(i => (ulong)i).ToArray(); - - Console.WriteLine($"{data.GetType().Name} marshalling"); - Assert.IsTrue(EqualByBound(expectedMean, this.server.Mean_ULong_LP_PreLen(data.Length, data)), $"Mean_ULong_LP_PreLen"); - Assert.IsTrue(EqualByBound(expectedMean, this.server.Mean_ULong_LP_PostLen(data, data.Length)), $"Mean_ULong_LP_PostLen"); - Assert.IsTrue(EqualByBound(expectedMean, this.server.Mean_ULong_SafeArray_OutLen(data, out len)), $"Mean_ULong_SafeArray_OutLen"); - Assert.AreEqual(data.Length, len); - } - - private void Marshal_FloatArray() - { - int len; - float[] data = BaseData.Select(i => (float)i).ToArray(); - - Console.WriteLine($"{data.GetType().Name} marshalling"); - Assert.IsTrue(EqualByBound(expectedMean, this.server.Mean_Float_LP_PreLen(data.Length, data)), $"Mean_Float_LP_PreLen"); - Assert.IsTrue(EqualByBound(expectedMean, this.server.Mean_Float_LP_PostLen(data, data.Length)), $"Mean_Float_LP_PostLen"); - Assert.IsTrue(EqualByBound(expectedMean, this.server.Mean_Float_SafeArray_OutLen(data, out len)), $"Mean_Float_SafeArray_OutLen"); - Assert.AreEqual(data.Length, len); - } - - private void Marshal_DoubleArray() - { - int len; - double[] data = BaseData.Select(i => (double)i).ToArray(); - - Console.WriteLine($"{data.GetType().Name} marshalling"); - Assert.IsTrue(EqualByBound(expectedMean, this.server.Mean_Double_LP_PreLen(data.Length, data)), $"Mean_Double_LP_PreLen"); - Assert.IsTrue(EqualByBound(expectedMean, this.server.Mean_Double_LP_PostLen(data, data.Length)), $"Mean_Double_LP_PostLen"); - Assert.IsTrue(EqualByBound(expectedMean, this.server.Mean_Double_SafeArray_OutLen(data, out len)), $"Mean_Double_SafeArray_OutLen"); - Assert.AreEqual(data.Length, len); - } - } -} diff --git a/src/coreclr/tests/src/Interop/COM/NETClients/Primitives/Program.cs b/src/coreclr/tests/src/Interop/COM/NETClients/Primitives/Program.cs deleted file mode 100644 index 3e745e6bd18d..000000000000 --- a/src/coreclr/tests/src/Interop/COM/NETClients/Primitives/Program.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace NetClient -{ - using System; - using System.Threading; - using System.Runtime.InteropServices; - using TestLibrary; - - class Program - { - static int Main(string[] doNotUse) - { - // RegFree COM is not supported on Windows Nano - if (TestLibrary.Utilities.IsWindowsNanoServer) - { - return 100; - } - - try - { - RunTests(); - Console.WriteLine("Testing COM object lifetime control methods."); - Thread.CurrentThread.DisableComObjectEagerCleanup(); - RunTests(); - Marshal.CleanupUnusedObjectsInCurrentContext(); - Assert.IsFalse(Marshal.AreComObjectsAvailableForCleanup()); - } - catch (Exception e) - { - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - - return 100; - } - - private static void RunTests() - { - new NumericTests().Run(); - new ArrayTests().Run(); - new StringTests().Run(); - new ErrorTests().Run(); - new ColorTests().Run(); - } - } -} diff --git a/src/coreclr/tests/src/Interop/COM/NETClients/Primitives/TestInALC.cs b/src/coreclr/tests/src/Interop/COM/NETClients/Primitives/TestInALC.cs deleted file mode 100644 index 19f12722d679..000000000000 --- a/src/coreclr/tests/src/Interop/COM/NETClients/Primitives/TestInALC.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.IO; -using System.Reflection; - -namespace TestInALC -{ - class Test - { - static int Main(string[] args) - { - string currentAssemblyDirectory = Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).AbsolutePath); - string testAssemblyFullPath = Path.Combine(currentAssemblyDirectory, "NETClientPrimitives.dll"); - return TestLibrary.Utilities.ExecuteAndUnload(testAssemblyFullPath, args); - } - } -} diff --git a/src/coreclr/tests/src/Interop/COM/NativeClients/Dispatch/Client.cpp b/src/coreclr/tests/src/Interop/COM/NativeClients/Dispatch/Client.cpp deleted file mode 100644 index cbd0d359deaf..000000000000 --- a/src/coreclr/tests/src/Interop/COM/NativeClients/Dispatch/Client.cpp +++ /dev/null @@ -1,408 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -#include "ClientTests.h" -#include - - -void Validate_Numeric_In_ReturnByRef(); -void Validate_Float_In_ReturnAndUpdateByRef(); -void Validate_Double_In_ReturnAndUpdateByRef(); -void Validate_LCID_Marshaled(); -void Validate_Enumerator(); - -template -struct ComInit -{ - const HRESULT Result; - - ComInit() - : Result{ ::CoInitializeEx(nullptr, TM) } - { } - - ~ComInit() - { - if (SUCCEEDED(Result)) - ::CoUninitialize(); - } -}; - -using ComMTA = ComInit; - -int __cdecl main() -{ - ComMTA init; - if (FAILED(init.Result)) - return -1; - - try - { - Validate_Numeric_In_ReturnByRef(); - Validate_Float_In_ReturnAndUpdateByRef(); - Validate_Double_In_ReturnAndUpdateByRef(); - Validate_LCID_Marshaled(); - Validate_Enumerator(); - } - catch (HRESULT hr) - { - ::printf("Test Failure: 0x%08x\n", hr); - return 101; - } - - return 100; -} - -void Validate_Numeric_In_ReturnByRef() -{ - HRESULT hr; - - CoreShimComActivation csact{ W("NETServer"), W("DispatchTesting") }; - - ComSmartPtr dispatchTesting; - THROW_IF_FAILED(::CoCreateInstance(CLSID_DispatchTesting, nullptr, CLSCTX_INPROC, IID_IDispatchTesting, (void**)&dispatchTesting)); - - LPOLESTR numericMethodName = (LPOLESTR)W("DoubleNumeric_ReturnByRef"); - LCID lcid = MAKELCID(LANG_USER_DEFAULT, SORT_DEFAULT); - DISPID methodId; - - ::wprintf(W("Invoke %s\n"), numericMethodName); - THROW_IF_FAILED(dispatchTesting->GetIDsOfNames( - IID_NULL, - &numericMethodName, - 1, - lcid, - &methodId)); - - BYTE b1 = 24; - BYTE b2; - SHORT s1 = 53; - SHORT s2; - USHORT us1 = 74; - USHORT us2; - LONG i1 = 34; - LONG i2; - ULONG ui1 = 854; - ULONG ui2; - LONGLONG l1 = 894; - LONGLONG l2; - ULONGLONG ul1 = 4168; - ULONGLONG ul2; - - DISPPARAMS params; - params.cArgs = 14; - params.rgvarg = new VARIANTARG[params.cArgs]; - params.cNamedArgs = 0; - params.rgdispidNamedArgs = nullptr; - - V_VT(¶ms.rgvarg[13]) = VT_UI1; - V_UI1(¶ms.rgvarg[13]) = b1; - V_VT(¶ms.rgvarg[12]) = VT_BYREF | VT_UI1; - V_UI1REF(¶ms.rgvarg[12]) = &b2; - V_VT(¶ms.rgvarg[11]) = VT_I2; - V_I2(¶ms.rgvarg[11]) = s1; - V_VT(¶ms.rgvarg[10]) = VT_BYREF | VT_I2; - V_I2REF(¶ms.rgvarg[10]) = &s2; - V_VT(¶ms.rgvarg[9]) = VT_UI2; - V_UI2(¶ms.rgvarg[9]) = us1; - V_VT(¶ms.rgvarg[8]) = VT_BYREF | VT_UI2; - V_UI2REF(¶ms.rgvarg[8]) = &us2; - V_VT(¶ms.rgvarg[7]) = VT_I4; - V_I4(¶ms.rgvarg[7]) = i1; - V_VT(¶ms.rgvarg[6]) = VT_BYREF | VT_I4; - V_I4REF(¶ms.rgvarg[6]) = &i2; - V_VT(¶ms.rgvarg[5]) = VT_UI4; - V_UI4(¶ms.rgvarg[5]) = ui1; - V_VT(¶ms.rgvarg[4]) = VT_BYREF | VT_UI4; - V_UI4REF(¶ms.rgvarg[4]) = &ui2; - V_VT(¶ms.rgvarg[3]) = VT_I8; - V_I8(¶ms.rgvarg[3]) = l1; - V_VT(¶ms.rgvarg[2]) = VT_BYREF | VT_I8; - V_I8REF(¶ms.rgvarg[2]) = &l2; - V_VT(¶ms.rgvarg[1]) = VT_UI8; - V_UI8(¶ms.rgvarg[1]) = ul1; - V_VT(¶ms.rgvarg[0]) = VT_BYREF | VT_UI8; - V_UI8REF(¶ms.rgvarg[0]) = &ul2; - - THROW_IF_FAILED(dispatchTesting->Invoke( - methodId, - IID_NULL, - lcid, - DISPATCH_METHOD, - ¶ms, - nullptr, - nullptr, - nullptr - )); - - THROW_FAIL_IF_FALSE(b2 == b1 * 2); - THROW_FAIL_IF_FALSE(s2 == s1 * 2); - THROW_FAIL_IF_FALSE(us2 == us1 * 2); - THROW_FAIL_IF_FALSE(i2 == i1 * 2); - THROW_FAIL_IF_FALSE(ui2 == ui1 * 2); - THROW_FAIL_IF_FALSE(l2 == l1 * 2); - THROW_FAIL_IF_FALSE(ul2 == ul1 * 2); -} - -namespace -{ - bool EqualByBound(float expected, float actual) - { - float low = expected - 0.0001f; - float high = expected + 0.0001f; - float eps = abs(expected - actual); - return eps < std::numeric_limits::epsilon() || (low < actual && actual < high); - } - - bool EqualByBound(double expected, double actual) - { - double low = expected - 0.00001; - double high = expected + 0.00001; - double eps = abs(expected - actual); - return eps < std::numeric_limits::epsilon() || (low < actual && actual < high); - } -} - -void Validate_Float_In_ReturnAndUpdateByRef() -{ - HRESULT hr; - - CoreShimComActivation csact{ W("NETServer"), W("DispatchTesting") }; - - ComSmartPtr dispatchTesting; - THROW_IF_FAILED(::CoCreateInstance(CLSID_DispatchTesting, nullptr, CLSCTX_INPROC, IID_IDispatchTesting, (void**)&dispatchTesting)); - - LPOLESTR numericMethodName = (LPOLESTR)W("Add_Float_ReturnAndUpdateByRef"); - LCID lcid = MAKELCID(LANG_USER_DEFAULT, SORT_DEFAULT); - DISPID methodId; - - ::wprintf(W("Invoke %s\n"), numericMethodName); - THROW_IF_FAILED(dispatchTesting->GetIDsOfNames( - IID_NULL, - &numericMethodName, - 1, - lcid, - &methodId)); - - float a = 12.34f; - float b = 1.234f; - float expected = b + a; - - DISPPARAMS params; - params.cArgs = 2; - params.rgvarg = new VARIANTARG[params.cArgs]; - params.cNamedArgs = 0; - params.rgdispidNamedArgs = nullptr; - - VARIANT result; - - V_VT(¶ms.rgvarg[1]) = VT_R4; - V_R4(¶ms.rgvarg[1]) = a; - V_VT(¶ms.rgvarg[0]) = VT_BYREF | VT_R4; - V_R4REF(¶ms.rgvarg[0]) = &b; - - - THROW_IF_FAILED(dispatchTesting->Invoke( - methodId, - IID_NULL, - lcid, - DISPATCH_METHOD, - ¶ms, - &result, - nullptr, - nullptr - )); - - THROW_FAIL_IF_FALSE(EqualByBound(expected, V_R4(&result))); - THROW_FAIL_IF_FALSE(EqualByBound(expected, b)); -} - -void Validate_Double_In_ReturnAndUpdateByRef() -{ - HRESULT hr; - - CoreShimComActivation csact{ W("NETServer"), W("DispatchTesting") }; - - ComSmartPtr dispatchTesting; - THROW_IF_FAILED(::CoCreateInstance(CLSID_DispatchTesting, nullptr, CLSCTX_INPROC, IID_IDispatchTesting, (void**)&dispatchTesting)); - - LPOLESTR numericMethodName = (LPOLESTR)W("Add_Double_ReturnAndUpdateByRef"); - LCID lcid = MAKELCID(LANG_USER_DEFAULT, SORT_DEFAULT); - DISPID methodId; - - ::wprintf(W("Invoke %s\n"), numericMethodName); - THROW_IF_FAILED(dispatchTesting->GetIDsOfNames( - IID_NULL, - &numericMethodName, - 1, - lcid, - &methodId)); - - double a = 1856.5634; - double b = 587867.757; - double expected = a + b; - - DISPPARAMS params; - params.cArgs = 2; - params.rgvarg = new VARIANTARG[params.cArgs]; - params.cNamedArgs = 0; - params.rgdispidNamedArgs = nullptr; - - VARIANT result; - - V_VT(¶ms.rgvarg[1]) = VT_R8; - V_R8(¶ms.rgvarg[1]) = a; - V_VT(¶ms.rgvarg[0]) = VT_BYREF | VT_R8; - V_R8REF(¶ms.rgvarg[0]) = &b; - - - THROW_IF_FAILED(dispatchTesting->Invoke( - methodId, - IID_NULL, - lcid, - DISPATCH_METHOD, - ¶ms, - &result, - nullptr, - nullptr - )); - - THROW_FAIL_IF_FALSE(EqualByBound(expected, V_R8(&result))); - THROW_FAIL_IF_FALSE(EqualByBound(expected, b)); -} - -void Validate_LCID_Marshaled() -{ - HRESULT hr; - - CoreShimComActivation csact{ W("NETServer"), W("DispatchTesting") }; - - ComSmartPtr dispatchTesting; - THROW_IF_FAILED(::CoCreateInstance(CLSID_DispatchTesting, nullptr, CLSCTX_INPROC, IID_IDispatchTesting, (void**)&dispatchTesting)); - - LPOLESTR numericMethodName = (LPOLESTR)W("PassThroughLCID"); - LCID lcid = MAKELCID(MAKELANGID(LANG_SPANISH, SUBLANG_SPANISH_CHILE), SORT_DEFAULT); - DISPID methodId; - - ::wprintf(W("Invoke %s\n"), numericMethodName); - THROW_IF_FAILED(dispatchTesting->GetIDsOfNames( - IID_NULL, - &numericMethodName, - 1, - lcid, - &methodId)); - - DISPPARAMS params; - params.cArgs = 0; - params.rgvarg = nullptr; - params.cNamedArgs = 0; - params.rgdispidNamedArgs = nullptr; - - VARIANT result; - - THROW_IF_FAILED(dispatchTesting->Invoke( - methodId, - IID_NULL, - lcid, - DISPATCH_METHOD, - ¶ms, - &result, - nullptr, - nullptr - )); - - THROW_FAIL_IF_FALSE(lcid == V_I4(&result)); -} - -namespace -{ - void ValidateExpectedEnumVariant(IEnumVARIANT *enumVariant, int expectedStart, int expectedCount) - { - HRESULT hr; - VARIANT element; - ULONG numFetched; - for(int i = expectedStart; i < expectedStart + expectedCount; ++i) - { - THROW_IF_FAILED(enumVariant->Next(1, &element, &numFetched)); - THROW_FAIL_IF_FALSE(numFetched == 1); - THROW_FAIL_IF_FALSE(V_I4(&element) == i) - ::VariantClear(&element); - } - - hr = enumVariant->Next(1, &element, &numFetched); - THROW_FAIL_IF_FALSE(hr == S_FALSE && numFetched == 0); - } - - void ValidateReturnedEnumerator(VARIANT *toValidate) - { - HRESULT hr; - THROW_FAIL_IF_FALSE(V_VT(toValidate) == VT_UNKNOWN || V_VT(toValidate) == VT_DISPATCH); - - ComSmartPtr enumVariant; - THROW_IF_FAILED(V_UNKNOWN(toValidate)->QueryInterface(&enumVariant)); - - // Implementation of IDispatchTesting should return [0,9] - ValidateExpectedEnumVariant(enumVariant, 0, 10); - - THROW_IF_FAILED(enumVariant->Reset()); - ValidateExpectedEnumVariant(enumVariant, 0, 10); - - THROW_IF_FAILED(enumVariant->Reset()); - THROW_IF_FAILED(enumVariant->Skip(3)); - ValidateExpectedEnumVariant(enumVariant, 3, 7); - } -} - -void Validate_Enumerator() -{ - HRESULT hr; - - CoreShimComActivation csact{ W("NETServer"), W("DispatchTesting") }; - - ComSmartPtr dispatchTesting; - THROW_IF_FAILED(::CoCreateInstance(CLSID_DispatchTesting, nullptr, CLSCTX_INPROC, IID_IDispatchTesting, (void**)&dispatchTesting)); - LCID lcid = MAKELCID(LANG_USER_DEFAULT, SORT_DEFAULT); - - ::printf("Invoke GetEnumerator (DISPID_NEWENUM)\n"); - DISPPARAMS params {}; - VARIANT result; - THROW_IF_FAILED(dispatchTesting->Invoke( - DISPID_NEWENUM, - IID_NULL, - lcid, - DISPATCH_METHOD, - ¶ms, - &result, - nullptr, - nullptr - )); - - ::printf(" -- Validate returned IEnumVARIANT\n"); - ValidateReturnedEnumerator(&result); - - LPOLESTR methodName = (LPOLESTR)W("ExplicitGetEnumerator"); - - ::wprintf(W("Invoke %s\n"), methodName); - DISPID methodId; - THROW_IF_FAILED(dispatchTesting->GetIDsOfNames( - IID_NULL, - &methodName, - 1, - lcid, - &methodId)); - - ::VariantClear(&result); - THROW_IF_FAILED(dispatchTesting->Invoke( - methodId, - IID_NULL, - lcid, - DISPATCH_METHOD, - ¶ms, - &result, - nullptr, - nullptr - )); - - ::printf(" -- Validate returned IEnumVARIANT\n"); - ValidateReturnedEnumerator(&result); -} diff --git a/src/coreclr/tests/src/Interop/COM/NativeClients/Dispatch/ClientTests.h b/src/coreclr/tests/src/Interop/COM/NativeClients/Dispatch/ClientTests.h deleted file mode 100644 index 58a524ec0b8f..000000000000 --- a/src/coreclr/tests/src/Interop/COM/NativeClients/Dispatch/ClientTests.h +++ /dev/null @@ -1,13 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -#include -#include -#include - -#define COM_CLIENT -#include - -#define THROW_IF_FAILED(exp) { hr = exp; if (FAILED(hr)) { ::printf("FAILURE: 0x%08x = %s\n", hr, #exp); throw hr; } } -#define THROW_FAIL_IF_FALSE(exp) { if (!(exp)) { ::printf("FALSE: %s\n", #exp); throw E_FAIL; } } diff --git a/src/coreclr/tests/src/Interop/COM/NativeClients/Primitives/Client.cpp b/src/coreclr/tests/src/Interop/COM/NativeClients/Primitives/Client.cpp deleted file mode 100644 index 98d5798157bc..000000000000 --- a/src/coreclr/tests/src/Interop/COM/NativeClients/Primitives/Client.cpp +++ /dev/null @@ -1,46 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -#include "ClientTests.h" - -template -struct ComInit -{ - const HRESULT Result; - - ComInit() - : Result{ ::CoInitializeEx(nullptr, TM) } - { } - - ~ComInit() - { - if (SUCCEEDED(Result)) - ::CoUninitialize(); - } -}; - -using ComMTA = ComInit; - -int __cdecl main() -{ - ComMTA init; - if (FAILED(init.Result)) - return -1; - - try - { - Run_NumericTests(); - Run_ArrayTests(); - Run_StringTests(); - Run_ErrorTests(); - Run_ColorTests(); - } - catch (HRESULT hr) - { - ::printf("Test Failure: 0x%08x\n", hr); - return 101; - } - - return 100; -} diff --git a/src/coreclr/tests/src/Interop/COM/NativeClients/Primitives/ClientTests.h b/src/coreclr/tests/src/Interop/COM/NativeClients/Primitives/ClientTests.h deleted file mode 100644 index 84733b4c3e1c..000000000000 --- a/src/coreclr/tests/src/Interop/COM/NativeClients/Primitives/ClientTests.h +++ /dev/null @@ -1,19 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -#include -#include -#include - -#define COM_CLIENT -#include - -#define THROW_IF_FAILED(exp) { hr = exp; if (FAILED(hr)) { ::printf("FAILURE: 0x%08x = %s\n", hr, #exp); throw hr; } } -#define THROW_FAIL_IF_FALSE(exp) { if (!(exp)) { ::printf("FALSE: %s\n", #exp); throw E_FAIL; } } - -void Run_NumericTests(); -void Run_ArrayTests(); -void Run_StringTests(); -void Run_ErrorTests(); -void Run_ColorTests(); diff --git a/src/coreclr/tests/src/Interop/COM/NativeServer/stdafx.cpp b/src/coreclr/tests/src/Interop/COM/NativeServer/stdafx.cpp deleted file mode 100644 index 17b27a03c30e..000000000000 --- a/src/coreclr/tests/src/Interop/COM/NativeServer/stdafx.cpp +++ /dev/null @@ -1,5 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -#include "stdafx.h" diff --git a/src/coreclr/tests/src/Interop/COM/ServerContracts/ServerGuids.cs b/src/coreclr/tests/src/Interop/COM/ServerContracts/ServerGuids.cs deleted file mode 100644 index d03eacf70859..000000000000 --- a/src/coreclr/tests/src/Interop/COM/ServerContracts/ServerGuids.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace Server.Contract -{ - /// - /// Guids for all COM Servers - /// - internal sealed class Guids - { - public const string NumericTesting = "53169A33-E85D-4E3C-B668-24E438D0929B"; - public const string ArrayTesting = "B99ABE6A-DFF6-440F-BFB6-55179B8FE18E"; - public const string StringTesting = "C73C83E8-51A2-47F8-9B5C-4284458E47A6"; - public const string ErrorMarshalTesting = "71CF5C45-106C-4B32-B418-43A463C6041F"; - public const string DispatchTesting = "0F8ACD0C-ECE0-4F2A-BD1B-6BFCA93A0726"; - public const string EventTesting = "4DBD9B61-E372-499F-84DE-EFC70AA8A009"; - public const string AggregationTesting = "4CEFE36D-F377-4B6E-8C34-819A8BB9CB04"; - public const string ColorTesting = "C222F472-DA5A-4FC6-9321-92F4F7053A65"; - public const string LicenseTesting = "66DB7882-E2B0-471D-92C7-B2B52A0EA535"; - public const string DefaultInterfaceTesting = "FAEF42AE-C1A4-419F-A912-B768AC2679EA"; - public const string ConsumeNETServerTesting = "DE4ACF53-5957-4D31-8BE2-EA6C80683246"; - } -} diff --git a/src/coreclr/tests/src/Interop/IDynamicInterfaceCastable/Program.cs b/src/coreclr/tests/src/Interop/IDynamicInterfaceCastable/Program.cs deleted file mode 100644 index 359ab7ecbc3a..000000000000 --- a/src/coreclr/tests/src/Interop/IDynamicInterfaceCastable/Program.cs +++ /dev/null @@ -1,486 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; - -using TestLibrary; - -namespace IDynamicInterfaceCastableTests -{ - public enum ImplementationToCall - { - Class, - Interface, - InterfacePrivate, - InterfaceStatic - } - - public interface ITest - { - Type GetMyType(); - ITest ReturnThis(); - int GetNumber(); - int CallImplemented(ImplementationToCall toCall); - } - - public interface ITestGeneric - { - T ReturnArg(T t); - } - - public interface IDirectlyImplemented - { - int ImplementedMethod(); - } - - public interface INotImplemented { } - - [DynamicInterfaceCastableImplementation] - public interface ITestImpl : ITest - { - ITest ITest.ReturnThis() - { - return this; - } - - Type ITest.GetMyType() - { - return GetType(); - } - - public static int GetNumberReturnValue = 1; - int ITest.GetNumber() - { - return GetNumberReturnValue; - } - - public static int GetNumberPrivateReturnValue = 2; - private int GetNumberPrivate() - { - return GetNumberPrivateReturnValue; - } - - public static int GetNumberStaticReturnValue = 3; - public static int GetNumberStatic() - { - return GetNumberStaticReturnValue; - } - - int ITest.CallImplemented(ImplementationToCall toCall) - { - switch (toCall) - { - case ImplementationToCall.Class: - DynamicInterfaceCastable impl = (DynamicInterfaceCastable)this; - return impl.ImplementedMethod(); - case ImplementationToCall.Interface: - return GetNumber(); - case ImplementationToCall.InterfacePrivate: - return GetNumberPrivate(); - case ImplementationToCall.InterfaceStatic: - return GetNumberStatic(); - } - - return 0; - } - } - - public interface IOverrideTest : ITestImpl { } - - [DynamicInterfaceCastableImplementation] - public interface IOverrideTestImpl : IOverrideTest - { - public static int GetNumberReturnValue_Override = 10; - int ITest.GetNumber() - { - return GetNumberReturnValue_Override; - } - - public static Type GetMyTypeReturnValue = typeof(int); - Type ITest.GetMyType() - { - return GetMyTypeReturnValue; - } - } - - [DynamicInterfaceCastableImplementation] - public interface ITestGenericImpl: ITestGeneric - { - T ITestGeneric.ReturnArg(T t) - { - return t; - } - } - - [DynamicInterfaceCastableImplementation] - public interface ITestGenericIntImpl: ITestGeneric - { - int ITestGeneric.ReturnArg(int i) - { - return i; - } - } - - [DynamicInterfaceCastableImplementation] - public interface IDirectlyImplementedImpl : IDirectlyImplemented - { - int IDirectlyImplemented.ImplementedMethod() - { - return 0; - } - } - - public interface IOther - { - int OtherMethod(); - } - - public class DynamicInterfaceCastableException : Exception - { - public static string ErrorFormat = "REQUESTED={0}"; - public DynamicInterfaceCastableException(RuntimeTypeHandle interfaceType) - : base(string.Format(ErrorFormat, Type.GetTypeFromHandle(interfaceType))) - { } - } - - public class DynamicInterfaceCastable : IDynamicInterfaceCastable, IDirectlyImplemented - { - private Dictionary interfaceToImplMap; - - public DynamicInterfaceCastable(Dictionary interfaceToImplMap) - { - this.interfaceToImplMap = interfaceToImplMap; - } - - public bool IsInterfaceImplemented(RuntimeTypeHandle interfaceType, bool throwIfNotImplemented) - { - if (interfaceToImplMap != null && interfaceToImplMap.ContainsKey(Type.GetTypeFromHandle(interfaceType))) - return true; - - if (throwIfNotImplemented) - throw new DynamicInterfaceCastableException(interfaceType); - - return false; - } - - public RuntimeTypeHandle GetInterfaceImplementation(RuntimeTypeHandle interfaceType) - { - Type implMaybe; - if (interfaceToImplMap != null && interfaceToImplMap.TryGetValue(Type.GetTypeFromHandle(interfaceType), out implMaybe)) - return implMaybe.TypeHandle; - - return default(RuntimeTypeHandle); - } - - public static int ImplementedMethodReturnValue = -1; - public int ImplementedMethod() - { - return ImplementedMethodReturnValue; - } - } - - public class BadDynamicInterfaceCastable : IDynamicInterfaceCastable - { - public enum InvalidReturn - { - DefaultHandle, - Class, - NoAttribute, - NotImplemented, - NoDefaultImplementation, - CallNotImplemented, - UseOtherInterface, - ThrowException - } - - public InvalidReturn InvalidImplementation { get; set; } - - public bool IsInterfaceImplemented(RuntimeTypeHandle interfaceType, bool throwIfNotImplemented) - { - if (InvalidImplementation == InvalidReturn.ThrowException) - throw new DynamicInterfaceCastableException(interfaceType); - - return interfaceType.Equals(typeof(ITest).TypeHandle); - } - - public RuntimeTypeHandle GetInterfaceImplementation(RuntimeTypeHandle interfaceType) - { - if (!interfaceType.Equals(typeof(ITest).TypeHandle)) - return default(RuntimeTypeHandle); - - switch (InvalidImplementation) - { - case InvalidReturn.Class: - return typeof(TestImpl).TypeHandle; - case InvalidReturn.NoAttribute: - return typeof(INoAttributeImpl).TypeHandle; - case InvalidReturn.NotImplemented: - return typeof(INotTestImpl).TypeHandle; - case InvalidReturn.NoDefaultImplementation: - return typeof(ITestNoDefaultImpl).TypeHandle; - case InvalidReturn.CallNotImplemented: - return typeof(ITestPartialImpl).TypeHandle; - case InvalidReturn.UseOtherInterface: - return typeof(ITestOtherImpl).TypeHandle; - case InvalidReturn.ThrowException: - throw new DynamicInterfaceCastableException(interfaceType); - case InvalidReturn.DefaultHandle: - default: - return default(RuntimeTypeHandle); - } - } - - public static int UseOther(IOther other) { return other.OtherMethod(); } - - private class TestImpl : ITestImpl { } - - private interface INoAttributeImpl : ITestImpl { } - - [DynamicInterfaceCastableImplementation] - private interface INotTestImpl { } - - [DynamicInterfaceCastableImplementation] - private interface ITestNoDefaultImpl : ITest { } - - [DynamicInterfaceCastableImplementation] - private interface ITestPartialImpl : ITest - { - ITest ITest.ReturnThis() - { - // Call method without default implementation - CallImplemented(ImplementationToCall.Class); - return this; - } - } - - [DynamicInterfaceCastableImplementation] - private interface ITestOtherImpl : ITestImpl, IOther - { - int ITest.GetNumber() - { - return BadDynamicInterfaceCastable.UseOther(this); - } - } - } - - public class Program - { - private static void ValidateBasicInterface() - { - Console.WriteLine($"Running {nameof(ValidateBasicInterface)}"); - - object castableObj = new DynamicInterfaceCastable(new Dictionary { - { typeof(ITest), typeof(ITestImpl) } - }); - - Console.WriteLine(" -- Validate cast"); - - // ITest -> ITestImpl - Assert.IsTrue(castableObj is ITest, $"Should be castable to {nameof(ITest)} via is"); - Assert.IsNotNull(castableObj as ITest, $"Should be castable to {nameof(ITest)} via as"); - var testObj = (ITest)castableObj; - - Console.WriteLine(" -- Validate method call"); - Assert.AreSame(castableObj, testObj.ReturnThis(), $"{nameof(ITest.ReturnThis)} should return actual object"); - Assert.AreEqual(typeof(DynamicInterfaceCastable), testObj.GetMyType(), $"{nameof(ITest.GetMyType)} should return typeof(DynamicInterfaceCastable)"); - - Console.WriteLine(" -- Validate method call which calls methods using 'this'"); - Assert.AreEqual(DynamicInterfaceCastable.ImplementedMethodReturnValue, testObj.CallImplemented(ImplementationToCall.Class)); - Assert.AreEqual(ITestImpl.GetNumberReturnValue, testObj.CallImplemented(ImplementationToCall.Interface)); - Assert.AreEqual(ITestImpl.GetNumberPrivateReturnValue, testObj.CallImplemented(ImplementationToCall.InterfacePrivate)); - Assert.AreEqual(ITestImpl.GetNumberStaticReturnValue, testObj.CallImplemented(ImplementationToCall.InterfaceStatic)); - - Console.WriteLine(" -- Validate delegate call"); - Func func = new Func(testObj.ReturnThis); - Assert.AreSame(castableObj, func(), $"Delegate call to {nameof(ITest.ReturnThis)} should return this"); - } - - private static void ValidateGenericInterface() - { - Console.WriteLine($"Running {nameof(ValidateGenericInterface)}"); - - object castableObj = new DynamicInterfaceCastable(new Dictionary { - { typeof(ITestGeneric), typeof(ITestGenericIntImpl) }, - { typeof(ITestGeneric), typeof(ITestGenericImpl) }, - }); - - Console.WriteLine(" -- Validate cast"); - - // ITestGeneric -> ITestGenericIntImpl - Assert.IsTrue(castableObj is ITestGeneric, $"Should be castable to {nameof(ITestGeneric)} via is"); - Assert.IsNotNull(castableObj as ITestGeneric, $"Should be castable to {nameof(ITestGeneric)} via as"); - ITestGeneric testInt = (ITestGeneric)castableObj; - - // ITestGeneric -> ITestGenericImpl - Assert.IsTrue(castableObj is ITestGeneric, $"Should be castable to {nameof(ITestGeneric)} via is"); - Assert.IsNotNull(castableObj as ITestGeneric, $"Should be castable to {nameof(ITestGeneric)} via as"); - ITestGeneric testStr = (ITestGeneric)castableObj; - - // ITestGeneric is not recognized - Assert.IsFalse(castableObj is ITestGeneric, $"Should not be castable to {nameof(ITestGeneric)} via is"); - Assert.IsNull(castableObj as ITestGeneric, $"Should not be castable to {nameof(ITestGeneric)} via as"); - var ex = Assert.Throws(() => { var _ = (ITestGeneric)castableObj; }); - Assert.AreEqual(string.Format(DynamicInterfaceCastableException.ErrorFormat, typeof(ITestGeneric)), ex.Message); - - int expectedInt = 42; - string expectedStr = "str"; - - Console.WriteLine(" -- Validate method call"); - Assert.AreEqual(expectedInt, testInt.ReturnArg(42)); - Assert.AreEqual(expectedStr, testStr.ReturnArg(expectedStr)); - - Console.WriteLine(" -- Validate delegate call"); - Func funcInt = new Func(testInt.ReturnArg); - Assert.AreEqual(expectedInt, funcInt(expectedInt)); - Func funcStr = new Func(testStr.ReturnArg); - Assert.AreEqual(expectedStr, funcStr(expectedStr)); - } - - private static void ValidateOverriddenInterface() - { - Console.WriteLine($"Running {nameof(ValidateOverriddenInterface)}"); - - object castableObj = new DynamicInterfaceCastable(new Dictionary { - { typeof(ITest), typeof(IOverrideTestImpl) }, - { typeof(IOverrideTest), typeof(IOverrideTestImpl) }, - }); - - Console.WriteLine(" -- Validate cast"); - - // IOverrideTest -> IOverrideTestImpl - Assert.IsTrue(castableObj is IOverrideTest, $"Should be castable to {nameof(IOverrideTest)} via is"); - Assert.IsNotNull(castableObj as IOverrideTest, $"Should be castable to {nameof(IOverrideTest)} via as"); - var testObj = (IOverrideTest)castableObj; - - Console.WriteLine(" -- Validate method call"); - Assert.AreSame(castableObj, testObj.ReturnThis(), $"{nameof(IOverrideTest.ReturnThis)} should return actual object"); - Assert.AreEqual(IOverrideTestImpl.GetMyTypeReturnValue, testObj.GetMyType(), $"{nameof(IOverrideTest.GetMyType)} should return {IOverrideTestImpl.GetMyTypeReturnValue}"); - - Console.WriteLine(" -- Validate method call which calls methods using 'this'"); - Assert.AreEqual(DynamicInterfaceCastable.ImplementedMethodReturnValue, testObj.CallImplemented(ImplementationToCall.Class)); - Assert.AreEqual(IOverrideTestImpl.GetNumberReturnValue_Override, testObj.CallImplemented(ImplementationToCall.Interface)); - Assert.AreEqual(ITestImpl.GetNumberPrivateReturnValue, testObj.CallImplemented(ImplementationToCall.InterfacePrivate)); - Assert.AreEqual(ITestImpl.GetNumberStaticReturnValue, testObj.CallImplemented(ImplementationToCall.InterfaceStatic)); - - Console.WriteLine(" -- Validate delegate call"); - Func func = new Func(testObj.ReturnThis); - Assert.AreSame(castableObj, func(), $"Delegate call to {nameof(IOverrideTest.ReturnThis)} should return this"); - Func funcGetType = new Func(testObj.GetMyType); - Assert.AreEqual(IOverrideTestImpl.GetMyTypeReturnValue, funcGetType(), $"Delegate call to {nameof(IOverrideTest.GetMyType)} should return {IOverrideTestImpl.GetMyTypeReturnValue}"); - } - - private static void ValidateNotImplemented() - { - Console.WriteLine($"Running {nameof(ValidateNotImplemented)}"); - - object castableObj = new DynamicInterfaceCastable(new Dictionary { - { typeof(ITest), typeof(ITestImpl) } - }); - - Assert.IsFalse(castableObj is INotImplemented, $"Should not be castable to {nameof(INotImplemented)} via is"); - Assert.IsNull(castableObj as INotImplemented, $"Should not be castable to {nameof(INotImplemented)} via as"); - var ex = Assert.Throws(() => { var _ = (INotImplemented)castableObj; }); - Assert.AreEqual(string.Format(DynamicInterfaceCastableException.ErrorFormat, typeof(INotImplemented)), ex.Message); - } - - private static void ValidateDirectlyImplemented() - { - Console.WriteLine($"Running {nameof(ValidateDirectlyImplemented)}"); - - object castableObj = new DynamicInterfaceCastable(new Dictionary { - { typeof(ITest), typeof(ITestImpl) }, - { typeof(IDirectlyImplemented), typeof(IDirectlyImplementedImpl) }, - }); - - Console.WriteLine(" -- Validate cast"); - Assert.IsTrue(castableObj is IDirectlyImplemented, $"Should be castable to {nameof(IDirectlyImplemented)} via is"); - Assert.IsNotNull(castableObj as IDirectlyImplemented, $"Should be castable to {nameof(IDirectlyImplemented)} via as"); - var direct = (IDirectlyImplemented)castableObj; - - Console.WriteLine(" -- Validate method call"); - Assert.AreEqual(DynamicInterfaceCastable.ImplementedMethodReturnValue, direct.ImplementedMethod()); - - Console.WriteLine(" -- Validate delegate call"); - Func func = new Func(direct.ImplementedMethod); - Assert.AreEqual(DynamicInterfaceCastable.ImplementedMethodReturnValue, func()); - } - - private static void ValidateErrorHandling() - { - Console.WriteLine($"Running {nameof(ValidateErrorHandling)}"); - - var castableObj = new BadDynamicInterfaceCastable(); - var testObj = (ITest)castableObj; - Exception ex; - - Console.WriteLine(" -- Validate non-interface"); - castableObj.InvalidImplementation = BadDynamicInterfaceCastable.InvalidReturn.Class; - ex = Assert.Throws(() => testObj.GetMyType()); - Console.WriteLine($" ---- {ex.GetType().Name}: {ex.Message}"); - - Console.WriteLine(" -- Validate missing attribute"); - castableObj.InvalidImplementation = BadDynamicInterfaceCastable.InvalidReturn.NoAttribute; - ex = Assert.Throws(() => testObj.GetMyType()); - Console.WriteLine($" ---- {ex.GetType().Name}: {ex.Message}"); - - Console.WriteLine(" -- Validate requested interface not implemented"); - castableObj.InvalidImplementation = BadDynamicInterfaceCastable.InvalidReturn.NotImplemented; - ex = Assert.Throws(() => testObj.GetMyType()); - Console.WriteLine($" ---- {ex.GetType().Name}: {ex.Message}"); - - Console.WriteLine(" -- Validate no default implementation"); - castableObj.InvalidImplementation = BadDynamicInterfaceCastable.InvalidReturn.NoDefaultImplementation; - var noDefaultImpl = (ITest)castableObj; - ex = Assert.Throws(() => noDefaultImpl.ReturnThis()); - Console.WriteLine($" ---- {ex.GetType().Name}: {ex.Message}"); - - Console.WriteLine(" -- Validate default implementation calling method with no default implementation"); - castableObj.InvalidImplementation = BadDynamicInterfaceCastable.InvalidReturn.CallNotImplemented; - var callNotImpl = (ITest)castableObj; - ex = Assert.Throws(() => callNotImpl.ReturnThis()); - Console.WriteLine($" ---- {ex.GetType().Name}: {ex.Message}"); - - Console.WriteLine(" -- Validate default implementation calling method taking different interface"); - castableObj.InvalidImplementation = BadDynamicInterfaceCastable.InvalidReturn.UseOtherInterface; - var useOther = (ITest)castableObj; - ex = Assert.Throws(() => useOther.GetNumber()); - Console.WriteLine($" ---- {ex.GetType().Name}: {ex.Message}"); - - Console.WriteLine(" -- Validate exception thrown"); - castableObj.InvalidImplementation = BadDynamicInterfaceCastable.InvalidReturn.ThrowException; - ex = Assert.Throws(() => { var _ = (ITest)castableObj; }); - Assert.AreEqual(string.Format(DynamicInterfaceCastableException.ErrorFormat, typeof(ITest)), ex.Message); - Console.WriteLine($" ---- {ex.GetType().Name}: {ex.Message}"); - - Console.WriteLine(" -- Validate return default handle"); - castableObj.InvalidImplementation = BadDynamicInterfaceCastable.InvalidReturn.DefaultHandle; - ex = Assert.Throws(() => testObj.GetMyType()); - Console.WriteLine($" ---- {ex.GetType().Name}: {ex.Message}"); - } - - public static int Main() - { - try - { - ValidateBasicInterface(); - ValidateGenericInterface(); - ValidateOverriddenInterface(); - - ValidateDirectlyImplemented(); - ValidateNotImplemented(); - - ValidateErrorHandling(); - } - catch (Exception e) - { - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - - return 100; - } - } -} diff --git a/src/coreclr/tests/src/Interop/MarshalAPI/IUnknown/TestInALC.cs b/src/coreclr/tests/src/Interop/MarshalAPI/IUnknown/TestInALC.cs deleted file mode 100644 index 70e6abf6f753..000000000000 --- a/src/coreclr/tests/src/Interop/MarshalAPI/IUnknown/TestInALC.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.IO; -using System.Reflection; - -namespace TestInALC -{ - class Test - { - static int Main(string[] args) - { - string currentAssemblyDirectory = Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).AbsolutePath); - string testAssemblyFullPath = Path.Combine(currentAssemblyDirectory, "IUnknownTest.dll"); - return TestLibrary.Utilities.ExecuteAndUnload(testAssemblyFullPath, args); - } - } -} diff --git a/src/coreclr/tests/src/Interop/PInvoke/Array/MarshalArrayAsField/AsLPArray/AsLPArrayTest.cs b/src/coreclr/tests/src/Interop/PInvoke/Array/MarshalArrayAsField/AsLPArray/AsLPArrayTest.cs deleted file mode 100644 index 93404e86c32e..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/Array/MarshalArrayAsField/AsLPArray/AsLPArrayTest.cs +++ /dev/null @@ -1,445 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Runtime.InteropServices; -using TestLibrary; - -class Test -{ - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeIntArraySeqStructByVal([In]S_INTArray_Seq s, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeUIntArraySeqStructByVal([In]S_UINTArray_Seq s, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeShortArraySeqStructByVal([In]S_SHORTArray_Seq s, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeWordArraySeqStructByVal([In]S_WORDArray_Seq s, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeLong64ArraySeqStructByVal([In]S_LONG64Array_Seq s, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeULong64ArraySeqStructByVal([In]S_ULONG64Array_Seq s, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeDoubleArraySeqStructByVal([In]S_DOUBLEArray_Seq s, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeFloatArraySeqStructByVal([In]S_FLOATArray_Seq s, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeByteArraySeqStructByVal([In]S_BYTEArray_Seq s, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeCharArraySeqStructByVal([In]S_CHARArray_Seq s, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeLPSTRArraySeqStructByVal([In]S_LPSTRArray_Seq s, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeLPCSTRArraySeqStructByVal([In]S_LPCSTRArray_Seq s, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeBSTRArraySeqStructByVal([In]S_BSTRArray_Seq s, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeStructArraySeqStructByVal([In]S_StructArray_Seq s, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeIntArraySeqClassByVal([In]C_INTArray_Seq c, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeUIntArraySeqClassByVal([In]C_UINTArray_Seq c, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeShortArraySeqClassByVal([In]C_SHORTArray_Seq c, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeWordArraySeqClassByVal([In]C_WORDArray_Seq c, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeLong64ArraySeqClassByVal([In]C_LONG64Array_Seq c, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeULong64ArraySeqClassByVal([In]C_ULONG64Array_Seq c, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeDoubleArraySeqClassByVal([In]C_DOUBLEArray_Seq c, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeFloatArraySeqClassByVal([In]C_FLOATArray_Seq c, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeByteArraySeqClassByVal([In]C_BYTEArray_Seq c, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeCharArraySeqClassByVal([In]C_CHARArray_Seq c, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeLPSTRArraySeqClassByVal([In]C_LPSTRArray_Seq c, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeLPCSTRArraySeqClassByVal([In]C_LPCSTRArray_Seq c, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeBSTRArraySeqClassByVal([In]C_BSTRArray_Seq c, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeStructArraySeqClassByVal([In]C_StructArray_Seq c, [In]int size); - - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeIntArrayExpStructByVal([In]S_INTArray_Exp s, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeUIntArrayExpStructByVal([In]S_UINTArray_Exp s, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeShortArrayExpStructByVal([In]S_SHORTArray_Exp s, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeWordArrayExpStructByVal([In]S_WORDArray_Exp s, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeLong64ArrayExpStructByVal([In]S_LONG64Array_Exp s, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeULong64ArrayExpStructByVal([In]S_ULONG64Array_Exp s, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeDoubleArrayExpStructByVal([In]S_DOUBLEArray_Exp s, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeFloatArrayExpStructByVal([In]S_FLOATArray_Exp s, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeByteArrayExpStructByVal([In]S_BYTEArray_Exp s, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeCharArrayExpStructByVal([In]S_CHARArray_Exp s, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeLPSTRArrayExpStructByVal([In]S_LPSTRArray_Exp s, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeLPCSTRArrayExpStructByVal([In]S_LPCSTRArray_Exp s, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeBSTRArrayExpStructByVal([In]S_BSTRArray_Exp s, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeStructArrayExpStructByVal([In]S_StructArray_Exp s, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeIntArrayExpClassByVal([In]C_INTArray_Exp c, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeUIntArrayExpClassByVal([In]C_UINTArray_Exp c, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeShortArrayExpClassByVal([In]C_SHORTArray_Exp c, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeWordArrayExpClassByVal([In]C_WORDArray_Exp c, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeLong64ArrayExpClassByVal([In]C_LONG64Array_Exp c, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeULong64ArrayExpClassByVal([In]C_ULONG64Array_Exp c, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeDoubleArrayExpClassByVal([In]C_DOUBLEArray_Exp c, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeFloatArrayExpClassByVal([In]C_FLOATArray_Exp c, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeByteArrayExpClassByVal([In]C_BYTEArray_Exp c, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeCharArrayExpClassByVal([In]C_CHARArray_Exp c, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeLPSTRArrayExpClassByVal([In]C_LPSTRArray_Exp c, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeLPCSTRArrayExpClassByVal([In]C_LPCSTRArray_Exp c, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeBSTRArrayExpClassByVal([In]C_BSTRArray_Exp c, [In]int size); - [DllImport("MarshalArrayByValArrayNative", CallingConvention = CallingConvention.Cdecl)] - static extern bool TakeStructArrayExpClassByVal([In]C_StructArray_Exp c, [In]int size); - - #region Helper - - internal const int ARRAY_SIZE = 100; - - static T[] InitArray(int size) - { - T[] array = new T[size]; - - for (int i = 0; i < array.Length; i++) - array[i] = (T)Convert.ChangeType(i, typeof(T)); - - return array; - } - - static TestStruct[] InitStructArray(int size) - { - TestStruct[] array = new TestStruct[size]; - - for (int i = 0; i < array.Length; i++) - { - array[i].x = i; - array[i].d = i; - array[i].l = i; - array[i].str = i.ToString(); - } - - return array; - } - - static bool[] InitBoolArray(int size) - { - bool[] array = new bool[size]; - - for (int i = 0; i < array.Length; i++) - { - if (i % 2 == 0) - array[i] = true; - else - array[i] = false; - } - - return array; - } - - #endregion - - static void RunTest1(string report) - { - Console.WriteLine(report); - S_INTArray_Seq s1 = new S_INTArray_Seq(); - s1.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeIntArraySeqStructByVal(s1, ARRAY_SIZE), "TakeIntArraySeqStructByVal"); - - S_UINTArray_Seq s2 = new S_UINTArray_Seq(); - s2.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeUIntArraySeqStructByVal(s2, ARRAY_SIZE), "TakeUIntArraySeqStructByVal"); - - S_SHORTArray_Seq s3 = new S_SHORTArray_Seq(); - s3.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeShortArraySeqStructByVal(s3, ARRAY_SIZE), "TakeShortArraySeqStructByVal"); - - S_WORDArray_Seq s4 = new S_WORDArray_Seq(); - s4.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeWordArraySeqStructByVal(s4, ARRAY_SIZE), "TakeWordArraySeqStructByVal"); - - S_LONG64Array_Seq s5 = new S_LONG64Array_Seq(); - s5.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeLong64ArraySeqStructByVal(s5, ARRAY_SIZE), "TakeLong64ArraySeqStructByVal"); - - S_ULONG64Array_Seq s6 = new S_ULONG64Array_Seq(); - s6.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeULong64ArraySeqStructByVal(s6, ARRAY_SIZE), "TakeULong64ArraySeqStructByVal"); - - S_DOUBLEArray_Seq s7 = new S_DOUBLEArray_Seq(); - s7.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeDoubleArraySeqStructByVal(s7, ARRAY_SIZE), "TakeDoubleArraySeqStructByVal"); - - S_FLOATArray_Seq s8 = new S_FLOATArray_Seq(); - s8.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeFloatArraySeqStructByVal(s8, ARRAY_SIZE), "TakeFloatArraySeqStructByVal"); - - S_BYTEArray_Seq s9 = new S_BYTEArray_Seq(); - s9.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeByteArraySeqStructByVal(s9, ARRAY_SIZE), "TakeByteArraySeqStructByVal"); - - S_CHARArray_Seq s10 = new S_CHARArray_Seq(); - s10.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeCharArraySeqStructByVal(s10, ARRAY_SIZE), "TakeCharArraySeqStructByVal"); - - S_LPSTRArray_Seq s11 = new S_LPSTRArray_Seq(); - s11.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeLPSTRArraySeqStructByVal(s11, ARRAY_SIZE), "TakeLPSTRArraySeqStructByVal"); - - S_LPCSTRArray_Seq s12 = new S_LPCSTRArray_Seq(); - s12.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeLPCSTRArraySeqStructByVal(s12, ARRAY_SIZE), "TakeLPCSTRArraySeqStructByVal"); - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - S_BSTRArray_Seq s13 = new S_BSTRArray_Seq(); - s13.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeBSTRArraySeqStructByVal(s13, ARRAY_SIZE), "TakeBSTRArraySeqStructByVal"); - } - - S_StructArray_Seq s14 = new S_StructArray_Seq(); - s14.arr = InitStructArray(ARRAY_SIZE); - Assert.Throws(() => TakeStructArraySeqStructByVal(s14, ARRAY_SIZE), "TakeStructArraySeqStructByVal"); - } - - static void RunTest2(string report) - { - Console.WriteLine(report); - C_INTArray_Seq c1 = new C_INTArray_Seq(); - c1.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeIntArraySeqClassByVal(c1, ARRAY_SIZE), "TakeIntArraySeqClassByVal"); - - C_UINTArray_Seq c2 = new C_UINTArray_Seq(); - c2.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeUIntArraySeqClassByVal(c2, ARRAY_SIZE), "TakeUIntArraySeqClassByVal"); - - C_SHORTArray_Seq c3 = new C_SHORTArray_Seq(); - c3.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeShortArraySeqClassByVal(c3, ARRAY_SIZE), "TakeShortArraySeqClassByVal"); - - C_WORDArray_Seq c4 = new C_WORDArray_Seq(); - c4.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeWordArraySeqClassByVal(c4, ARRAY_SIZE), "TakeWordArraySeqClassByVal"); - - C_LONG64Array_Seq c5 = new C_LONG64Array_Seq(); - c5.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeLong64ArraySeqClassByVal(c5, ARRAY_SIZE), "TakeLong64ArraySeqClassByVal"); - - C_ULONG64Array_Seq c6 = new C_ULONG64Array_Seq(); - c6.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeULong64ArraySeqClassByVal(c6, ARRAY_SIZE), "TakeULong64ArraySeqClassByVal"); - - C_DOUBLEArray_Seq c7 = new C_DOUBLEArray_Seq(); - c7.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeDoubleArraySeqClassByVal(c7, ARRAY_SIZE), "TakeDoubleArraySeqClassByVal"); - - C_FLOATArray_Seq c8 = new C_FLOATArray_Seq(); - c8.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeFloatArraySeqClassByVal(c8, ARRAY_SIZE), "TakeFloatArraySeqClassByVal"); - - C_BYTEArray_Seq c9 = new C_BYTEArray_Seq(); - c9.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeByteArraySeqClassByVal(c9, ARRAY_SIZE), "TakeByteArraySeqClassByVal"); - - C_CHARArray_Seq c10 = new C_CHARArray_Seq(); - c10.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeCharArraySeqClassByVal(c10, ARRAY_SIZE), "TakeCharArraySeqClassByVal"); - - C_LPSTRArray_Seq c11 = new C_LPSTRArray_Seq(); - c11.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeLPSTRArraySeqClassByVal(c11, ARRAY_SIZE), "TakeLPSTRArraySeqClassByVal"); - - C_LPCSTRArray_Seq c12 = new C_LPCSTRArray_Seq(); - c12.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeLPCSTRArraySeqClassByVal(c12, ARRAY_SIZE), "TakeLPCSTRArraySeqClassByVal"); - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - C_BSTRArray_Seq c13 = new C_BSTRArray_Seq(); - c13.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeBSTRArraySeqClassByVal(c13, ARRAY_SIZE), "TakeBSTRArraySeqClassByVal"); - } - - C_StructArray_Seq c14 = new C_StructArray_Seq(); - c14.arr = InitStructArray(ARRAY_SIZE); - Assert.Throws(() => TakeStructArraySeqClassByVal(c14, ARRAY_SIZE), "TakeStructArraySeqClassByVal"); - } - - static void RunTest3(string report) - { - Console.WriteLine(report); - - S_INTArray_Exp s1 = new S_INTArray_Exp(); - s1.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeIntArrayExpStructByVal(s1, ARRAY_SIZE), "TakeIntArrayExpStructByVal"); - - S_UINTArray_Exp s2 = new S_UINTArray_Exp(); - s2.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeUIntArrayExpStructByVal(s2, ARRAY_SIZE), "TakeUIntArrayExpStructByVal"); - - S_SHORTArray_Exp s3 = new S_SHORTArray_Exp(); - s3.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeShortArrayExpStructByVal(s3, ARRAY_SIZE), "TakeShortArrayExpStructByVal"); - - S_WORDArray_Exp s4 = new S_WORDArray_Exp(); - s4.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeWordArrayExpStructByVal(s4, ARRAY_SIZE), "TakeWordArrayExpStructByVal"); - - S_LONG64Array_Exp s5 = new S_LONG64Array_Exp(); - s5.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeLong64ArrayExpStructByVal(s5, ARRAY_SIZE), "TakeLong64ArrayExpStructByVal"); - - S_ULONG64Array_Exp s6 = new S_ULONG64Array_Exp(); - s6.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeULong64ArrayExpStructByVal(s6, ARRAY_SIZE), "TakeULong64ArrayExpStructByVal"); - - S_DOUBLEArray_Exp s7 = new S_DOUBLEArray_Exp(); - s7.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeDoubleArrayExpStructByVal(s7, ARRAY_SIZE), "TakeDoubleArrayExpStructByVal"); - - S_FLOATArray_Exp s8 = new S_FLOATArray_Exp(); - s8.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeFloatArrayExpStructByVal(s8, ARRAY_SIZE), "TakeFloatArrayExpStructByVal"); - - S_BYTEArray_Exp s9 = new S_BYTEArray_Exp(); - s9.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeByteArrayExpStructByVal(s9, ARRAY_SIZE), "TakeByteArrayExpStructByVal"); - - S_CHARArray_Exp s10 = new S_CHARArray_Exp(); - s10.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeCharArrayExpStructByVal(s10, ARRAY_SIZE), "TakeCharArrayExpStructByVal"); - - S_LPSTRArray_Exp s11 = new S_LPSTRArray_Exp(); - s11.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeLPSTRArrayExpStructByVal(s11, ARRAY_SIZE), "TakeLPSTRArrayExpStructByVal"); - - S_LPCSTRArray_Exp s12 = new S_LPCSTRArray_Exp(); - s12.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeLPCSTRArrayExpStructByVal(s12, ARRAY_SIZE), "TakeLPCSTRArrayExpStructByVal"); - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - S_BSTRArray_Exp s13 = new S_BSTRArray_Exp(); - s13.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeBSTRArrayExpStructByVal(s13, ARRAY_SIZE), "TakeBSTRArrayExpStructByVal"); - } - - S_StructArray_Exp s14 = new S_StructArray_Exp(); - s14.arr = InitStructArray(ARRAY_SIZE); - Assert.Throws(() => TakeStructArrayExpStructByVal(s14, ARRAY_SIZE), "TakeStructArrayExpStructByVal"); - } - - static void RunTest4(string report) - { - Console.WriteLine(report); - - C_INTArray_Exp c1 = new C_INTArray_Exp(); - c1.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeIntArrayExpClassByVal(c1, ARRAY_SIZE), "TakeIntArrayExpClassByVal"); - - C_UINTArray_Exp c2 = new C_UINTArray_Exp(); - c2.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeUIntArrayExpClassByVal(c2, ARRAY_SIZE), "TakeUIntArrayExpClassByVal"); - - C_SHORTArray_Exp c3 = new C_SHORTArray_Exp(); - c3.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeShortArrayExpClassByVal(c3, ARRAY_SIZE), "TakeShortArrayExpClassByVal"); - - C_WORDArray_Exp c4 = new C_WORDArray_Exp(); - c4.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeWordArrayExpClassByVal(c4, ARRAY_SIZE), "TakeWordArrayExpClassByVal"); - - C_LONG64Array_Exp c5 = new C_LONG64Array_Exp(); - c5.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeLong64ArrayExpClassByVal(c5, ARRAY_SIZE), "TakeLong64ArrayExpClassByVal"); - - C_ULONG64Array_Exp c6 = new C_ULONG64Array_Exp(); - c6.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeULong64ArrayExpClassByVal(c6, ARRAY_SIZE), "TakeULong64ArrayExpClassByVal"); - - C_DOUBLEArray_Exp c7 = new C_DOUBLEArray_Exp(); - c7.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeDoubleArrayExpClassByVal(c7, ARRAY_SIZE), "TakeDoubleArrayExpClassByVal"); - - C_FLOATArray_Exp c8 = new C_FLOATArray_Exp(); - c8.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeFloatArrayExpClassByVal(c8, ARRAY_SIZE), "TakeFloatArrayExpClassByVal"); - - C_BYTEArray_Exp c9 = new C_BYTEArray_Exp(); - c9.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeByteArrayExpClassByVal(c9, ARRAY_SIZE), "TakeByteArrayExpClassByVal"); - - C_CHARArray_Exp c10 = new C_CHARArray_Exp(); - c10.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeCharArrayExpClassByVal(c10, ARRAY_SIZE), "TakeCharArrayExpClassByVal"); - - C_LPSTRArray_Exp c11 = new C_LPSTRArray_Exp(); - c11.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeLPSTRArrayExpClassByVal(c11, ARRAY_SIZE), "TakeLPSTRArrayExpClassByVal"); - - C_LPCSTRArray_Exp c12 = new C_LPCSTRArray_Exp(); - c12.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeLPCSTRArrayExpClassByVal(c12, ARRAY_SIZE), "TakeLPCSTRArrayExpClassByVal"); - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - C_BSTRArray_Exp c13 = new C_BSTRArray_Exp(); - c13.arr = InitArray(ARRAY_SIZE); - Assert.Throws(() => TakeBSTRArrayExpClassByVal(c13, ARRAY_SIZE), "TakeBSTRArrayExpClassByVal"); - } - - C_StructArray_Exp c14 = new C_StructArray_Exp(); - c14.arr = InitStructArray(ARRAY_SIZE); - Assert.Throws(() => TakeStructArrayExpClassByVal(c14, ARRAY_SIZE), "TakeStructArrayExpClassByVal"); - } - - static int Main(string[] args) - { - try - { - RunTest1("RunTest 1 : Marshal Array In Sequential Struct As LPArray. "); - RunTest2("RunTest 2 : Marshal Array In Sequential Class As LPArray. "); - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - RunTest3("RunTest 3 : Marshal Array In Explicit Struct As LPArray. "); - } - RunTest4("RunTest 4 : Marshal Array In Explicit Class As LPArray. "); - Console.WriteLine("\nTest PASS."); - return 100; - } - catch (Exception e) - { - Console.WriteLine($"\nTest FAIL: {e}"); - return 101; - } - } -} diff --git a/src/coreclr/tests/src/Interop/PInvoke/Array/MarshalArrayAsParam/AsLPArray/AsLPArrayTest.cs b/src/coreclr/tests/src/Interop/PInvoke/Array/MarshalArrayAsParam/AsLPArray/AsLPArrayTest.cs deleted file mode 100644 index b8d85780f043..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/Array/MarshalArrayAsParam/AsLPArray/AsLPArrayTest.cs +++ /dev/null @@ -1,650 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Runtime.InteropServices; -using TestLibrary; - -public class ArrayMarshal -{ - private static int NumArrOfStructElements1 = 10; - - public struct TestStruct - { - public int x; - public double d; - public long l; - public string str; - } - public struct S2 - { - public int i32; - public uint ui32; - public short s1; - public ushort us1; - public Byte b; - public SByte sb; - public Int16 i16; - public UInt16 ui16; - public Int64 i64; - public UInt64 ui64; - public Single sgl; - public Double d; - } - - #region ByVal PInvoke method with no attributes applied - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Int([MarshalAs(UnmanagedType.LPArray)] int[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Object([MarshalAs(UnmanagedType.LPArray)] object[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Uint([MarshalAs(UnmanagedType.LPArray)] uint[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Short([MarshalAs(UnmanagedType.LPArray)] short[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Word([MarshalAs(UnmanagedType.LPArray)] ushort[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Long64([MarshalAs(UnmanagedType.LPArray)] long[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_ULong64([MarshalAs(UnmanagedType.LPArray)] ulong[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Double([MarshalAs(UnmanagedType.LPArray)] double[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Float([MarshalAs(UnmanagedType.LPArray)] float[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Byte([MarshalAs(UnmanagedType.LPArray)] byte[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Char([MarshalAs(UnmanagedType.LPArray)] char[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_LPCSTR([MarshalAs(UnmanagedType.LPArray)] string[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_LPSTR([MarshalAs(UnmanagedType.LPArray)] string[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Struct([MarshalAs(UnmanagedType.LPArray)] TestStruct[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Bool([MarshalAs(UnmanagedType.LPArray)] bool[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool MarshalArrayOfStructAsLPArrayByVal([MarshalAs(UnmanagedType.LPArray, SizeConst = ARRAY_SIZE)] S2[] arrS2, int cActual, [In, MarshalAs(UnmanagedType.LPArray, SizeConst = ARRAY_SIZE)]S2[] pExpect); - - #endregion - - #region ByVal PInvoke method with InAttribute applied - [DllImport("MarshalArrayLPArrayNative", EntryPoint = "CStyle_Array_Int")] - private static extern bool CStyle_Array_Int_In([In, MarshalAs(UnmanagedType.LPArray)] int[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative", EntryPoint = "CStyle_Array_Object")] - private static extern bool CStyle_Array_Object_In( - [In, MarshalAs(UnmanagedType.LPArray)] object[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative", EntryPoint = "CStyle_Array_Uint")] - private static extern bool CStyle_Array_Uint_In([In, MarshalAs(UnmanagedType.LPArray)] uint[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative", EntryPoint = "CStyle_Array_Short")] - private static extern bool CStyle_Array_Short_In([In, MarshalAs(UnmanagedType.LPArray)] short[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative", EntryPoint = "CStyle_Array_Word")] - private static extern bool CStyle_Array_Word_In([In, MarshalAs(UnmanagedType.LPArray)] ushort[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative", EntryPoint = "CStyle_Array_Long64")] - private static extern bool CStyle_Array_Long64_In([In, MarshalAs(UnmanagedType.LPArray)] long[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative", EntryPoint = "CStyle_Array_ULong64")] - private static extern bool CStyle_Array_ULong64_In([In, MarshalAs(UnmanagedType.LPArray)] ulong[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative", EntryPoint = "CStyle_Array_Double")] - private static extern bool CStyle_Array_Double_In([In, MarshalAs(UnmanagedType.LPArray)] double[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative", EntryPoint = "CStyle_Array_Float")] - private static extern bool CStyle_Array_Float_In([In, MarshalAs(UnmanagedType.LPArray)] float[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative", EntryPoint = "CStyle_Array_Byte")] - private static extern bool CStyle_Array_Byte_In([In, MarshalAs(UnmanagedType.LPArray)] byte[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative", EntryPoint = "CStyle_Array_Char")] - private static extern bool CStyle_Array_Char_In([In, MarshalAs(UnmanagedType.LPArray)] char[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative", EntryPoint = "CStyle_Array_LPCSTR")] - private static extern bool CStyle_Array_LPCSTR_In([In, MarshalAs(UnmanagedType.LPArray)] string[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative", EntryPoint = "CStyle_Array_LPSTR")] - private static extern bool CStyle_Array_LPSTR_In([In, MarshalAs(UnmanagedType.LPArray)] string[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative", EntryPoint = "CStyle_Array_Struct")] - private static extern bool CStyle_Array_Struct_In([In, MarshalAs(UnmanagedType.LPArray)] TestStruct[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative", EntryPoint = "CStyle_Array_Bool")] - private static extern bool CStyle_Array_Bool_In([In, MarshalAs(UnmanagedType.LPArray)] bool[] actual, int cActual); - - - [DllImport("MarshalArrayLPArrayNative", EntryPoint = "MarshalArrayOfStructAsLPArrayByVal")] - private static extern bool MarshalArrayOfStructAsLPArrayByValIn([In, MarshalAs(UnmanagedType.LPArray, SizeConst = ARRAY_SIZE)] S2[] arrS2, int cActual, [In, MarshalAs(UnmanagedType.LPArray, SizeConst = ARRAY_SIZE)]S2[] pExpect); - #endregion - - #region ByVal PInvoke method with InAttribute and OutAttribute applied - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Int_InOut([In, Out, MarshalAs(UnmanagedType.LPArray)] int[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Int_InOut_Null([In, Out, MarshalAs(UnmanagedType.LPArray)] int[] actual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Int_InOut_ZeroLength([In, Out, MarshalAs(UnmanagedType.LPArray)] int[] actual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Object_InOut([In, Out, MarshalAs(UnmanagedType.LPArray)] object[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Uint_InOut([In, Out, MarshalAs(UnmanagedType.LPArray)] uint[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Short_InOut([In, Out, MarshalAs(UnmanagedType.LPArray)] short[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Word_InOut([In, Out, MarshalAs(UnmanagedType.LPArray)] ushort[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Long64_InOut([In, Out, MarshalAs(UnmanagedType.LPArray)] long[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_ULong64_InOut([In, Out, MarshalAs(UnmanagedType.LPArray)] ulong[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Double_InOut([In, Out, MarshalAs(UnmanagedType.LPArray)] double[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Float_InOut([In, Out, MarshalAs(UnmanagedType.LPArray)] float[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Byte_InOut([In, Out, MarshalAs(UnmanagedType.LPArray)] byte[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Char_InOut([In, Out, MarshalAs(UnmanagedType.LPArray)] char[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_LPSTR_InOut([In, Out, MarshalAs(UnmanagedType.LPArray)] string[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Struct_InOut([In, Out, MarshalAs(UnmanagedType.LPArray)] TestStruct[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Bool_InOut([In, Out, MarshalAs(UnmanagedType.LPArray)] bool[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool MarshalArrayOfStructAsLPArrayByValInOut([In, Out, MarshalAs(UnmanagedType.LPArray, SizeConst = ARRAY_SIZE)] S2[] arrS2, int cActual, [In, MarshalAs(UnmanagedType.LPArray, SizeConst = ARRAY_SIZE)]S2[] pExpect); - - #endregion - - #region ByVal PInvoke method with OutAttribute applied - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Int_Out([Out, MarshalAs(UnmanagedType.LPArray)] int[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Int_Out_Null([Out, MarshalAs(UnmanagedType.LPArray)] int[] actual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Int_Out_ZeroLength([Out, MarshalAs(UnmanagedType.LPArray)] int[] actual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Object_Out([Out, MarshalAs(UnmanagedType.LPArray)] object[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Uint_Out([Out, MarshalAs(UnmanagedType.LPArray)] uint[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Short_Out([Out, MarshalAs(UnmanagedType.LPArray)] short[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Word_Out([Out, MarshalAs(UnmanagedType.LPArray)] ushort[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Long64_Out([Out, MarshalAs(UnmanagedType.LPArray)] long[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_ULong64_Out([Out, MarshalAs(UnmanagedType.LPArray)] ulong[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Double_Out([Out, MarshalAs(UnmanagedType.LPArray)] double[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Float_Out([Out, MarshalAs(UnmanagedType.LPArray)] float[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Byte_Out([Out, MarshalAs(UnmanagedType.LPArray)] byte[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Char_Out([Out, MarshalAs(UnmanagedType.LPArray)] char[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_LPSTR_Out([Out, MarshalAs(UnmanagedType.LPArray)] string[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Struct_Out([Out, MarshalAs(UnmanagedType.LPArray)] TestStruct[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool CStyle_Array_Bool_Out([Out, MarshalAs(UnmanagedType.LPArray)] bool[] actual, int cActual); - - [DllImport("MarshalArrayLPArrayNative")] - private static extern bool MarshalArrayOfStructAsLPArrayByValOut([Out, MarshalAs(UnmanagedType.LPArray, SizeConst = ARRAY_SIZE)] S2[] arrS2, int cActual); - - #endregion - - #region Marshal ByVal - private const int ARRAY_SIZE = 100; - - private static T[] InitArray(int size) - { - T[] array = new T[size]; - - for (int i = 0; i < array.Length; ++i) - array[i] = (T)Convert.ChangeType(i, typeof(T)); - - return array; - } - - private static T[] CopyArray(T[] srcarr, int size) - { - T[] array = new T[size]; - - Array.Copy(srcarr, array, ARRAY_SIZE); - return array; - } - - private static bool[] InitBoolArray(int size) - { - bool[] array = new bool[size]; - - for (int i = 0; i < array.Length; ++i) - { - if (i % 2 == 0) - array[i] = true; - else - array[i] = false; - } - - return array; - } - - private static TestStruct[] InitStructArray(int size) - { - TestStruct[] array = new TestStruct[size]; - - for (int i = 0; i < array.Length; ++i) - { - array[i].x = i; - array[i].d = i; - array[i].l = i; - array[i].str = i.ToString(); - } - - return array; - } - private static void TestMarshalByVal_NoAttributes() - { - Console.WriteLine("ByVal marshaling CLR array as c-style-array no attributes"); - - Assert.IsTrue(CStyle_Array_Int(InitArray(ARRAY_SIZE), ARRAY_SIZE), "CStyle_Array_Int"); - Assert.IsTrue(CStyle_Array_Uint(InitArray(ARRAY_SIZE), ARRAY_SIZE), "CStyle_Array_Uint"); - Assert.IsTrue(CStyle_Array_Short(InitArray(ARRAY_SIZE), ARRAY_SIZE), "CStyle_Array_Short"); - Assert.IsTrue(CStyle_Array_Word(InitArray(ARRAY_SIZE), ARRAY_SIZE), "CStyle_Array_Word"); - Assert.IsTrue(CStyle_Array_Long64(InitArray(ARRAY_SIZE), ARRAY_SIZE), "CStyle_Array_Long64"); - Assert.IsTrue(CStyle_Array_ULong64(InitArray(ARRAY_SIZE), ARRAY_SIZE), "CStyle_Array_ULong64"); - Assert.IsTrue(CStyle_Array_Double(InitArray(ARRAY_SIZE), ARRAY_SIZE), "CStyle_Array_Double"); - Assert.IsTrue(CStyle_Array_Float(InitArray(ARRAY_SIZE), ARRAY_SIZE), "CStyle_Array_Float"); - Assert.IsTrue(CStyle_Array_Byte(InitArray(ARRAY_SIZE), ARRAY_SIZE), "CStyle_Array_Byte"); - Assert.IsTrue(CStyle_Array_Char(InitArray(ARRAY_SIZE), ARRAY_SIZE), "CStyle_Array_Char"); - - string[] strArr = InitArray(ARRAY_SIZE); - // Test nesting null value scenario - strArr[strArr.Length / 2] = null; - Assert.IsTrue(CStyle_Array_LPCSTR(strArr, ARRAY_SIZE), "CStyle_Array_LPCSTR"); - Assert.IsTrue(CStyle_Array_LPSTR(strArr, ARRAY_SIZE), "CStyle_Array_LPSTRs"); - Assert.IsTrue(CStyle_Array_Struct(InitStructArray(ARRAY_SIZE), ARRAY_SIZE), "CStyle_Array_Struct"); - Assert.IsTrue(CStyle_Array_Bool(InitBoolArray(ARRAY_SIZE), ARRAY_SIZE), "CStyle_Array_Bool"); - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - object[] oArr = InitArray(ARRAY_SIZE); - // Test nesting null value scenario - oArr[oArr.Length / 2] = null; - Assert.IsTrue(CStyle_Array_Object(oArr, ARRAY_SIZE), "CStyle_Array_Object"); - } - - } - - private static void TestMarshalByVal_In() - { - Console.WriteLine("ByVal marshaling CLR array as c-style-array with InAttribute applied"); - - Assert.IsTrue(CStyle_Array_Int_In(InitArray(ARRAY_SIZE), ARRAY_SIZE), "CStyle_Array_Int_In"); - Assert.IsTrue(CStyle_Array_Uint_In(InitArray(ARRAY_SIZE), ARRAY_SIZE), "CStyle_Array_Uint_In"); - Assert.IsTrue(CStyle_Array_Short_In(InitArray(ARRAY_SIZE), ARRAY_SIZE), "CStyle_Array_Short_In"); - Assert.IsTrue(CStyle_Array_Word_In(InitArray(ARRAY_SIZE), ARRAY_SIZE), "CStyle_Array_Word_In"); - Assert.IsTrue(CStyle_Array_Long64_In(InitArray(ARRAY_SIZE), ARRAY_SIZE), "CStyle_Array_Long64_In"); - Assert.IsTrue(CStyle_Array_ULong64_In(InitArray(ARRAY_SIZE), ARRAY_SIZE), "CStyle_Array_ULong64_In"); - Assert.IsTrue(CStyle_Array_Double_In(InitArray(ARRAY_SIZE), ARRAY_SIZE), "CStyle_Array_Double_In"); - Assert.IsTrue(CStyle_Array_Float_In(InitArray(ARRAY_SIZE), ARRAY_SIZE), "CStyle_Array_Float_In"); - Assert.IsTrue(CStyle_Array_Byte_In(InitArray(ARRAY_SIZE), ARRAY_SIZE), "CStyle_Array_Byte_In"); - Assert.IsTrue(CStyle_Array_Char_In(InitArray(ARRAY_SIZE), ARRAY_SIZE), "CStyle_Array_Char_In"); - - string[] strArr = InitArray(ARRAY_SIZE); - // Test nesting null value scenario - strArr[strArr.Length / 2] = null; - Assert.IsTrue(CStyle_Array_LPCSTR_In(strArr, ARRAY_SIZE), "CStyle_Array_LPCSTR_In"); - Assert.IsTrue(CStyle_Array_LPSTR_In(strArr, ARRAY_SIZE), "CStyle_Array_LPSTR_In"); - Assert.IsTrue(CStyle_Array_Struct_In(InitStructArray(ARRAY_SIZE), ARRAY_SIZE), "CStyle_Array_Struct_In"); - Assert.IsTrue(CStyle_Array_Bool_In(InitBoolArray(ARRAY_SIZE), ARRAY_SIZE), "CStyle_Array_Bool_In"); - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - object[] oArr = InitArray(ARRAY_SIZE); - // Test nesting null value scenario - oArr[oArr.Length / 2] = null; - Assert.IsTrue(CStyle_Array_Object_In(oArr, ARRAY_SIZE), "CStyle_Array_Object_In"); - } - } - #endregion - - #region Marshal InOut ByVal - private static void TestMarshalByVal_InOut() - { - Console.WriteLine("By value marshaling CLR array as c-style-array with InAttribute and OutAttribute applied"); - int[] iArr = InitArray(ARRAY_SIZE); - Assert.IsTrue(CStyle_Array_Int_InOut(iArr, ARRAY_SIZE), "CStyle_Array_Int_InOut"); - Assert.IsTrue(Equals(iArr, GetExpectedOutArray(ARRAY_SIZE)), "CStyle_Array_Int_InOut:Equals"); - - int[] iArrNull = null; - Assert.IsTrue(CStyle_Array_Int_InOut_Null(iArrNull), "CStyle_Array_Int_InOut_Null"); - Assert.IsNull(iArrNull, "CStyle_Array_Int_InOut_Null:Equals"); - - int[] iArrLength0 = InitArray(0); - Assert.IsTrue(CStyle_Array_Int_InOut_ZeroLength(iArrLength0), "CStyle_Array_Int_InOut_ZeroLength"); - Assert.AreEqual(0, iArrLength0.Length, "CStyle_Array_Int_InOut_ZeroLength:Length"); - - uint[] uiArr = InitArray(ARRAY_SIZE); - Assert.IsTrue(CStyle_Array_Uint_InOut(uiArr, ARRAY_SIZE), "CStyle_Array_Uint_InOut"); - Assert.IsTrue(Equals(uiArr, GetExpectedOutArray(ARRAY_SIZE)), "CStyle_Array_Uint_InOut:Equals"); - - short[] sArr = InitArray(ARRAY_SIZE); - Assert.IsTrue(CStyle_Array_Short_InOut(sArr, ARRAY_SIZE), "CStyle_Array_Short_InOut"); - Assert.IsTrue(Equals(sArr, GetExpectedOutArray(ARRAY_SIZE)), "CStyle_Array_Short_InOut:Equals"); - - ushort[] usArr = InitArray(ARRAY_SIZE); - Assert.IsTrue(CStyle_Array_Word_InOut(usArr, ARRAY_SIZE), "CStyle_Array_Word_InOut"); - Assert.IsTrue(Equals(usArr, GetExpectedOutArray(ARRAY_SIZE)), "CStyle_Array_Word_InOut:Equals"); - - long[] lArr = InitArray(ARRAY_SIZE); - Assert.IsTrue(CStyle_Array_Long64_InOut(lArr, ARRAY_SIZE), "CStyle_Array_Long64_InOut"); - Assert.IsTrue(Equals(lArr, GetExpectedOutArray(ARRAY_SIZE)), "CStyle_Array_Long64_InOut:Equals"); - - ulong[] ulArr = InitArray(ARRAY_SIZE); - Assert.IsTrue(CStyle_Array_ULong64_InOut(ulArr, ARRAY_SIZE), "CStyle_Array_ULong64_InOut"); - Assert.IsTrue(Equals(ulArr, GetExpectedOutArray(ARRAY_SIZE)), "CStyle_Array_ULong64_InOut:Equals"); - - double[] dArr = InitArray(ARRAY_SIZE); - Assert.IsTrue(CStyle_Array_Double_InOut(dArr, ARRAY_SIZE), "CStyle_Array_Double_InOut"); - Assert.IsTrue(Equals(dArr, GetExpectedOutArray(ARRAY_SIZE)), "CStyle_Array_Double_InOut:Equals"); - - float[] fArr = InitArray(ARRAY_SIZE); - Assert.IsTrue(CStyle_Array_Float_InOut(fArr, ARRAY_SIZE), "CStyle_Array_Float_InOut"); - Assert.IsTrue(Equals(fArr, GetExpectedOutArray(ARRAY_SIZE)), "CStyle_Array_Float_InOut:Equals"); - - byte[] bArr = InitArray(ARRAY_SIZE); - Assert.IsTrue(CStyle_Array_Byte_InOut(bArr, ARRAY_SIZE), "CStyle_Array_Byte_InOut"); - Assert.IsTrue(Equals(bArr, GetExpectedOutArray(ARRAY_SIZE)), "CStyle_Array_Byte_InOut:Equals"); - - char[] cArr = InitArray(ARRAY_SIZE); - Assert.IsTrue(CStyle_Array_Char_InOut(cArr, ARRAY_SIZE), "CStyle_Array_Char_InOut"); - Assert.IsTrue(Equals(cArr, GetExpectedOutArray(ARRAY_SIZE)), "CStyle_Array_Char_InOut:Equals"); - - string[] strArr = InitArray(ARRAY_SIZE); - strArr[strArr.Length / 2] = null; - Assert.IsTrue(CStyle_Array_LPSTR_InOut(strArr, ARRAY_SIZE), "CStyle_Array_LPSTR_InOut"); - - string[] expectedArr = GetExpectedOutArray(ARRAY_SIZE); - // Test nesting null value scenario - expectedArr[expectedArr.Length / 2 - 1] = null; - Assert.IsTrue(Equals(strArr, expectedArr), "CStyle_Array_LPSTR_InOut:Equals"); - - TestStruct[] tsArr = InitStructArray(ARRAY_SIZE); - Assert.IsTrue(CStyle_Array_Struct_InOut(tsArr, ARRAY_SIZE), "CStyle_Array_Struct_InOut"); - Assert.IsTrue(Equals(tsArr, GetExpectedOutStructArray(ARRAY_SIZE)), "CStyle_Array_Struct_InOut:Equals"); - - bool[] boolArr = InitBoolArray(ARRAY_SIZE); - Assert.IsTrue(CStyle_Array_Bool_InOut(boolArr, ARRAY_SIZE), "CStyle_Array_Bool_InOut"); - Assert.IsTrue(Equals(boolArr, GetExpectedOutBoolArray(ARRAY_SIZE)), "CStyle_Array_Bool_InOut:Equals"); - } - - private static bool Equals(T[] arr1, T[] arr2) - { - if (arr1 == null && arr2 == null) - return true; - else if (arr1 == null && arr2 != null) - return false; - else if (arr1 != null && arr2 == null) - return false; - else if (arr1.Length != arr2.Length) - return false; - - for (int i = 0; i < arr2.Length; ++i) - { - if (!Object.Equals(arr1[i], arr2[i])) - { - Console.WriteLine("Array marshaling error, Index: {0} , Expected:{1}, Actual:{2}", i, arr2[i], arr1[i]); - return false; - } - } - return true; - } - - private static T[] GetExpectedOutArray(int size) - { - T[] array = new T[size]; - for (int i = array.Length - 1; i >= 0; --i) - array[i] = (T)Convert.ChangeType(array.Length - 1 - i, typeof(T)); - return array; - } - - private static bool[] GetExpectedOutBoolArray(int size) - { - bool[] array = new bool[size]; - for (int i = 0; i < array.Length; ++i) - { - if (i % 2 != 0) - array[i] = true; - else - array[i] = false; - } - return array; - } - - private static TestStruct[] GetExpectedOutStructArray(int size) - { - TestStruct[] array = new TestStruct[size]; - for (int i = array.Length - 1; i >= 0; --i) - { - int v = array.Length - 1 - i; - array[i].x = v; - array[i].d = v; - array[i].l = v; - array[i].str = v.ToString(); - } - return array; - } - #endregion - - #region Marshal InOut ByVal - private static void TestMarshalByVal_Out() - { - Console.WriteLine("By value marshaling CLR array as c-style-array with OutAttribute applied"); - - int[] iArr = new int[ARRAY_SIZE]; - Assert.IsTrue(CStyle_Array_Int_Out(iArr, ARRAY_SIZE), "CStyle_Array_Int_Out"); - Assert.IsTrue(Equals(iArr, GetExpectedOutArray(ARRAY_SIZE)), "CStyle_Array_Int_Out:Equals"); - - int[] iArrNull = null; - Assert.IsTrue(CStyle_Array_Int_Out_Null(iArrNull), "CStyle_Array_Int_Out_Null"); - Assert.IsNull(iArrNull, "CStyle_Array_Int_Out_Null:Equals"); - - int[] iArrLength0 = new int[0]; - Assert.IsTrue(CStyle_Array_Int_Out_ZeroLength(iArrLength0), "CStyle_Array_Int_Out_ZeroLength"); - Assert.AreEqual(0, iArrLength0.Length, "CStyle_Array_Int_Out_ZeroLength:Length"); - - uint[] uiArr = new uint[ARRAY_SIZE]; - Assert.IsTrue(CStyle_Array_Uint_Out(uiArr, ARRAY_SIZE), "CStyle_Array_Uint_Out"); - Assert.IsTrue(Equals(uiArr, GetExpectedOutArray(ARRAY_SIZE)), "CStyle_Array_Uint_Out:Equals"); - - short[] sArr = new short[ARRAY_SIZE]; - Assert.IsTrue(CStyle_Array_Short_Out(sArr, ARRAY_SIZE), "CStyle_Array_Short_Out"); - Assert.IsTrue(Equals(sArr, GetExpectedOutArray(ARRAY_SIZE)), "CStyle_Array_Short_Out:Equals"); - - ushort[] usArr = new ushort[ARRAY_SIZE]; - Assert.IsTrue(CStyle_Array_Word_Out(usArr, ARRAY_SIZE), "CStyle_Array_Word_Out"); - Assert.IsTrue(Equals(usArr, GetExpectedOutArray(ARRAY_SIZE)), "CStyle_Array_Word_Out:Equals"); - - long[] lArr = new long[ARRAY_SIZE]; - Assert.IsTrue(CStyle_Array_Long64_Out(lArr, ARRAY_SIZE), "CStyle_Array_Long64_Out"); - Assert.IsTrue(Equals(lArr, GetExpectedOutArray(ARRAY_SIZE)), "CStyle_Array_Long64_Out:Equals"); - - ulong[] ulArr = new ulong[ARRAY_SIZE]; - Assert.IsTrue(CStyle_Array_ULong64_Out(ulArr, ARRAY_SIZE), "CStyle_Array_ULong64_Out"); - Assert.IsTrue(Equals(ulArr, GetExpectedOutArray(ARRAY_SIZE)), "CStyle_Array_ULong64_Out:Equals"); - - double[] dArr = new double[ARRAY_SIZE]; - Assert.IsTrue(CStyle_Array_Double_Out(dArr, ARRAY_SIZE), "CStyle_Array_Double_Out"); - Assert.IsTrue(Equals(dArr, GetExpectedOutArray(ARRAY_SIZE)), "CStyle_Array_Double_Out:Equals"); - - float[] fArr = new float[ARRAY_SIZE]; - Assert.IsTrue(CStyle_Array_Float_Out(fArr, ARRAY_SIZE), "CStyle_Array_Float_Out"); - Assert.IsTrue(Equals(fArr, GetExpectedOutArray(ARRAY_SIZE)), "CStyle_Array_Float_Out:Equals"); - - byte[] bArr = new byte[ARRAY_SIZE]; - Assert.IsTrue(CStyle_Array_Byte_Out(bArr, ARRAY_SIZE), "CStyle_Array_Byte_Out"); - Assert.IsTrue(Equals(bArr, GetExpectedOutArray(ARRAY_SIZE)), "CStyle_Array_Byte_Out:Equals"); - - char[] cArr = new char[ARRAY_SIZE]; - Assert.IsTrue(CStyle_Array_Char_Out(cArr, ARRAY_SIZE), "CStyle_Array_Char_Out"); - Assert.IsTrue(Equals(cArr, GetExpectedOutArray(ARRAY_SIZE)), "CStyle_Array_Char_Out:Equals"); - - string[] strArr = new string[ARRAY_SIZE]; - Assert.IsTrue(CStyle_Array_LPSTR_Out(strArr, ARRAY_SIZE), "CStyle_Array_LPSTR_Out"); - - string[] expectedArr = GetExpectedOutArray(ARRAY_SIZE); - // Test nesting null value scenario - expectedArr[expectedArr.Length / 2 - 1] = null; - Assert.IsTrue(Equals(strArr, expectedArr), "CStyle_Array_LPSTR_Out:Equals"); - - TestStruct[] tsArr = new TestStruct[ARRAY_SIZE]; - Assert.IsTrue(CStyle_Array_Struct_Out(tsArr, ARRAY_SIZE), "CStyle_Array_Struct_Out"); - Assert.IsTrue(Equals(tsArr, GetExpectedOutStructArray(ARRAY_SIZE)), "CStyle_Array_Struct_Out:Equals"); - - bool[] boolArr = new bool[ARRAY_SIZE]; - Assert.IsTrue(CStyle_Array_Bool_Out(boolArr, ARRAY_SIZE), "CStyle_Array_Bool_Out"); - Assert.IsTrue(Equals(boolArr, GetExpectedOutBoolArray(ARRAY_SIZE)), "CStyle_Array_Bool_Out:Equals"); - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - object[] oArr = new object[ARRAY_SIZE]; - Assert.IsTrue(CStyle_Array_Object_Out(oArr, ARRAY_SIZE), "CStyle_Array_Object_Out"); - object[] expectedOArr = GetExpectedOutArray(ARRAY_SIZE); - // Test nesting null value scenario - expectedOArr[expectedOArr.Length / 2 - 1] = null; - Assert.IsTrue(Equals(oArr, expectedOArr), "CStyle_Array_Object_Out:Equals"); - } - - } - #endregion - - #region methods for S2 struct array - public static S2[] NewS2arr(int NumArrElements, int i32, uint ui32, short s1, ushort us1, - Byte b, SByte sb, Int16 i16, UInt16 ui16, Int64 i64, UInt64 ui64, Single sgl, Double d) - { - S2[] arrS2 = new S2[NumArrElements]; - for (int i = 0; i < NumArrElements; i++) - { - arrS2[i].i32 = i32; - arrS2[i].ui32 = ui32; - arrS2[i].s1 = s1; - arrS2[i].us1 = us1; - arrS2[i].b = b; - arrS2[i].sb = sb; - arrS2[i].i16 = i16; - arrS2[i].ui16 = ui16; - arrS2[i].i64 = i64; - arrS2[i].ui64 = ui64; - arrS2[i].sgl = sgl; - arrS2[i].d = d; - } - return arrS2; - } - public static void PrintS2arr(string name, S2[] arrS2) - { - for (int i = 0; i < arrS2.Length; i++) - { - Console.WriteLine("{0}[{1}].i32 = {2}", name, i, arrS2[i].i32); - Console.WriteLine("{0}[{1}].ui32 = {2}", name, i, arrS2[i].ui32); - Console.WriteLine("{0}[{1}].s1 = {2}", name, i, arrS2[i].s1); - Console.WriteLine("{0}[{1}].us1 = {2}", name, i, arrS2[i].us1); - Console.WriteLine("{0}[{1}].b = {2}", name, i, arrS2[i].b); - Console.WriteLine("{0}[{1}].sb = {2}", name, i, arrS2[i].sb); - Console.WriteLine("{0}[{1}].i16 = {2}", name, i, arrS2[i].i16); - Console.WriteLine("{0}[{1}].ui16 = {2}", name, i, arrS2[i].ui16); - Console.WriteLine("{0}[{1}].i64 = {2}", name, i, arrS2[i].i64); - Console.WriteLine("{0}[{1}].ui64 = {2}", name, i, arrS2[i].ui64); - Console.WriteLine("{0}[{1}].sgl = {2}", name, i, arrS2[i].sgl); - Console.WriteLine("{0}[{1}].d = {2}", name, i, arrS2[i].d); - } - } - public static bool IsCorrect(S2[] actual, S2[] expected) - { - if (actual.Length != expected.Length) - { - return false; - } - for (int i = 0; i < actual.Length; i++) - { - if (actual[i].i32 != expected[i].i32 || actual[i].ui32 != expected[i].ui32 || actual[i].s1 != expected[i].s1 || actual[i].us1 != expected[i].us1 || - actual[i].b != expected[i].b || actual[i].sb != expected[i].sb || actual[i].i16 != expected[i].i16 || - actual[i].ui16 != expected[i].ui16 || actual[i].i64 != expected[i].i64 || actual[i].ui64 != expected[i].ui64 || - actual[i].sgl != expected[i].sgl || actual[i].d != expected[i].d) - { - return false; - } - } - return true; - } - #endregion - - public static int Main() - { - try{ - TestMarshalByVal_NoAttributes(); - TestMarshalByVal_In(); - TestMarshalByVal_InOut(); - TestMarshalByVal_Out(); - - Console.WriteLine("\nTest PASS."); - return 100; - } - catch (Exception e) - { - Console.WriteLine($"\nTEST FAIL: {e}"); - return 101; - } - } -} diff --git a/src/coreclr/tests/src/Interop/PInvoke/ArrayWithOffset/PInvokeDefs.cs b/src/coreclr/tests/src/Interop/PInvoke/ArrayWithOffset/PInvokeDefs.cs deleted file mode 100644 index 57f47f4d406d..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/ArrayWithOffset/PInvokeDefs.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; - -unsafe class ArrayWithOffsetNative -{ - [DllImport(nameof(ArrayWithOffsetNative))] - public static extern bool Marshal_InOut(int* expected, [In, Out] ArrayWithOffset actual, int numElements, int* newValue); - - [DllImport(nameof(ArrayWithOffsetNative))] - public static extern bool Marshal_Invalid(ArrayWithOffset invalidArray); - - [DllImport(nameof(ArrayWithOffsetNative))] - public static extern bool Marshal_Invalid(ref ArrayWithOffset array); - - [DllImport(nameof(ArrayWithOffsetNative))] - public static extern ArrayWithOffset Marshal_Invalid_Return(); -} diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/AFF_PFF/AFF_PFF.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/AFF_PFF/AFF_PFF.cs deleted file mode 100644 index d26faffb0948..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/AFF_PFF/AFF_PFF.cs +++ /dev/null @@ -1,181 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(false, ThrowOnUnmappableChar = false)] - -public class BFM_CharMarshaler -{ - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool Char_In([In]char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool Char_InByRef([In]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool Char_InOutByRef([In, Out]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_In_String([In]String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InByRef_String([In]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InOutByRef_String([In, Out]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_In_StringBuilder([In]StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InByRef_StringBuilder([In]ref StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InOutByRef_StringBuilder([In, Out]ref StringBuilder s); - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static char GetInvalidChar() - { - return (char)0x2216; - } - - static char GetValidChar() - { - return 'c'; - } - - static void testChar() - { - Assert.IsTrue(Char_In(GetInvalidChar()), "[Error] Location tc1"); - - Assert.IsTrue(Char_In(GetValidChar()), "[Error] Location tc2"); - - char cTemp = GetInvalidChar(); - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc3"); - - cTemp = GetValidChar(); - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc4"); - - cTemp = GetInvalidChar(); - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc5"); - Assert.AreEqual('?', cTemp, "[Error] Location tc6"); - - cTemp = GetValidChar(); - char cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc7"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tc8"); - } - - static void testCharBufferString() - { - Assert.IsTrue(CharBuffer_In_String(GetInvalidString()), "[Error] Location tcbs1"); - - Assert.IsTrue(CharBuffer_In_String(GetValidString()), "[Error] Location tcbs2"); - - String cTemp = GetInvalidString(); - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs3"); - - cTemp = GetValidString(); - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs4"); - - cTemp = GetInvalidString(); - String cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs5"); - Assert.AreNotEqual(cTempClone, cTemp, "[Error] Location tcbs6"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs7"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tcbs8"); - } - - static void testCharBufferStringBuilder() - { - StringBuilder sb = GetInvalidStringBuilder(); - Assert.IsTrue(CharBuffer_In_StringBuilder(sb), "[Error] Location tcbsb1"); - - Assert.IsTrue(CharBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tcbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb3"); - - cTemp = GetValidStringBuilder(); - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb4"); - - cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb5"); - Assert.AreNotEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb6"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb7"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb8"); - } - - static void runTest() - { - testChar(); - testCharBufferString(); - testCharBufferStringBuilder(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } catch (Exception e){ - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/AFF_PFT/AFF_PFT.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/AFF_PFT/AFF_PFT.cs deleted file mode 100644 index 8741391d04c1..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/AFF_PFT/AFF_PFT.cs +++ /dev/null @@ -1,173 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(false, ThrowOnUnmappableChar = false)] - -public class BFM_CharMarshaler -{ - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool Char_In([In]char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool Char_InByRef([In]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool Char_InOutByRef([In, Out]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_In_String([In]String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InByRef_String([In]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InOutByRef_String([In, Out]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_In_StringBuilder([In]StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InByRef_StringBuilder([In]ref StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InOutByRef_StringBuilder([In, Out]ref StringBuilder s); - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static char GetInvalidChar() - { - return (char)0x2216; - } - - static char GetValidChar() - { - return 'c'; - } - - static void testChar() - { - Assert.Throws(() => Char_In(GetInvalidChar()), "[Error] Location tc1"); - - Assert.IsTrue(Char_In(GetValidChar()), "[Error] Location tc2"); - - char cTemp = GetInvalidChar(); - Assert.Throws(() => Char_InByRef(ref cTemp), "[Error] Location tc3"); - - cTemp = GetValidChar(); - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc4"); - - cTemp = GetInvalidChar(); - Assert.Throws(() => Char_InOutByRef(ref cTemp), "[Error] Location tc5"); - - cTemp = GetValidChar(); - char cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc6"); - } - - static void testCharBufferString() - { - Assert.Throws(() => CharBuffer_In_String(GetInvalidString()), "[Error] Location tcbs1"); - - Assert.IsTrue(CharBuffer_In_String(GetValidString()), "[Error] Location tcbs2"); - - String cTemp = GetInvalidString(); - Assert.Throws(() => CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs3"); - - cTemp = GetValidString(); - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs4"); - - cTemp = GetInvalidString(); - Assert.Throws(() => CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs5"); - - cTemp = GetValidString(); - String cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs6"); - } - - static void testCharBufferStringBuilder() - { - Assert.Throws(() => CharBuffer_In_StringBuilder(GetInvalidStringBuilder()), "[Error] Location tcbsb1"); - - Assert.IsTrue(CharBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tcbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - Assert.Throws(() => CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb3"); - - cTemp = GetValidStringBuilder(); - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb4"); - - cTemp = GetInvalidStringBuilder(); - Assert.Throws(() => CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb"); - - cTemp = GetValidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb6"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb7"); - } - - static void runTest() - { - testChar(); - testCharBufferString(); - testCharBufferStringBuilder(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } catch (Exception e){ - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/AFF_PTF/AFF_PTF.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/AFF_PTF/AFF_PTF.cs deleted file mode 100644 index 7a9c8699535a..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/AFF_PTF/AFF_PTF.cs +++ /dev/null @@ -1,192 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(false, ThrowOnUnmappableChar = false)] - -public class BFM_CharMarshaler -{ - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool Char_In([In]char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool Char_InByRef([In]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool Char_InOutByRef([In, Out]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_In_String([In]String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InByRef_String([In]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InOutByRef_String([In, Out]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_In_StringBuilder([In]StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InByRef_StringBuilder([In]ref StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InOutByRef_StringBuilder([In, Out]ref StringBuilder s); - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static char GetInvalidChar() - { - return (char)0x2216; - } - - static char GetValidChar() - { - return 'c'; - } - - static void testChar() - { - Assert.IsTrue(Char_In(GetInvalidChar()), "[Error] Location tc1"); - Assert.IsTrue(Char_In(GetValidChar()), "[Error] Location tc2"); - - char cTemp = GetInvalidChar(); - char cTempClone = cTemp; - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc3"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tc4"); - - cTemp = GetValidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc5"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tc6"); - - cTemp = GetInvalidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc7"); - Assert.AreNotEqual(cTempClone, cTemp, "[Error] Location tc8"); - - cTemp = GetValidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc9"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tc10"); - } - - static void testCharBufferString() - { - Assert.IsTrue(CharBuffer_In_String(GetInvalidString()), "[Error] Location tcbs1"); - - Assert.IsTrue(CharBuffer_In_String(GetValidString()), "[Error] Location tcbs2"); - - String cTemp = GetInvalidString(); - String cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs3"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tcbs4"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs5"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tcbs6"); - - cTemp = GetInvalidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs7"); - Assert.AreNotEqual(cTempClone, cTemp, "[Error] Location tcbs8"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs9"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tcbs10"); - } - - static void testCharBufferStringBuilder() - { - Assert.IsTrue(CharBuffer_In_StringBuilder(GetInvalidStringBuilder()), "[Error] Location tcbsb1"); - - Assert.IsTrue(CharBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tcbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb3"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb4"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb5"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb6"); - - cTemp = GetInvalidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb7"); - Assert.AreNotEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb8"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb9"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb10"); - } - - static void runTest() - { - testChar(); - testCharBufferString(); - testCharBufferStringBuilder(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } catch (Exception e){ - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/AFF_PTT/AFF_PTT.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/AFF_PTT/AFF_PTT.cs deleted file mode 100644 index 6bcc58d56e5b..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/AFF_PTT/AFF_PTT.cs +++ /dev/null @@ -1,181 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(false, ThrowOnUnmappableChar = false)] - -public class BFM_CharMarshaler -{ - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool Char_In([In]char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool Char_InByRef([In]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool Char_InOutByRef([In, Out]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_In_String([In]String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InByRef_String([In]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InOutByRef_String([In, Out]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_In_StringBuilder([In]StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InByRef_StringBuilder([In]ref StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InOutByRef_StringBuilder([In, Out]ref StringBuilder s); - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - //sbl.Append ('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - //sbl.Append ('乀'); - return sbl; - } - - static char GetInvalidChar() - { - return (char)0x2216; - } - - static char GetValidChar() - { - return 'c'; - } - - static void testChar() - { - Assert.IsTrue(Char_In(GetInvalidChar()), "[Error] Location tc1"); - - Assert.IsTrue(Char_In(GetValidChar()), "[Error] Location tc2"); - - char cTemp = GetInvalidChar(); - char cTempClone = GetInvalidChar(); - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc3"); - - cTemp = GetValidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc4"); - - cTemp = GetInvalidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc5"); - - cTemp = GetValidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc6"); - } - - static void testCharBufferString() - { - Assert.IsTrue(CharBuffer_In_String(GetInvalidString()), "[Error] Location tcbs1"); - - Assert.IsTrue(CharBuffer_In_String(GetValidString()), "[Error] Location tcbs2"); - - String cTemp = GetInvalidString(); - String cTempClone = GetInvalidString(); - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs3"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs4"); - - cTemp = GetInvalidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs5"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs6"); - } - - static void testCharBufferStringBuilder() - { - Assert.IsTrue(CharBuffer_In_StringBuilder(GetInvalidStringBuilder()), "[Error] Location tcbsb1"); - - Assert.IsTrue(CharBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tcbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb3"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb4"); - - cTemp = GetInvalidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb5"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb6"); - } - - static void runTest() - { - testChar(); - testCharBufferString(); - testCharBufferStringBuilder(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } catch (Exception e){ - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/AFT_PFF/AFT_PFF.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/AFT_PFF/AFT_PFF.cs deleted file mode 100644 index f4d612cf39a6..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/AFT_PFF/AFT_PFF.cs +++ /dev/null @@ -1,181 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(false, ThrowOnUnmappableChar = true)] - -public class BFM_CharMarshaler -{ - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool Char_In([In]char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool Char_InByRef([In]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool Char_InOutByRef([In, Out]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_In_String([In]String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InByRef_String([In]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InOutByRef_String([In, Out]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_In_StringBuilder([In]StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InByRef_StringBuilder([In]ref StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InOutByRef_StringBuilder([In, Out]ref StringBuilder s); - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static char GetInvalidChar() - { - return (char)0x2216; - } - - static char GetValidChar() - { - return 'c'; - } - - static void testChar() - { - Assert.IsTrue(Char_In(GetInvalidChar()), "[Error] Location tc1"); - - Assert.IsTrue(Char_In(GetValidChar()), "[Error] Location tc2"); - - char cTemp = GetInvalidChar(); - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc3"); - - cTemp = GetValidChar(); - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc4"); - - cTemp = GetInvalidChar(); - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc5"); - Assert.AreEqual('?', cTemp, "[Error] Location tc66"); - - cTemp = GetValidChar(); - char cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc7"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tc8"); - } - - static void testCharBufferString() - { - Assert.IsTrue(CharBuffer_In_String(GetInvalidString()), "[Error] Location tcbs1"); - - Assert.IsTrue(CharBuffer_In_String(GetValidString()), "[Error] Location tcbs2"); - - String cTemp = GetInvalidString(); - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs3"); - - cTemp = GetValidString(); - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs4"); - - cTemp = GetInvalidString(); - String cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs5"); - Assert.AreNotEqual(cTempClone, cTemp, "[Error] Location tcbs6"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs7"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tcbs88"); - } - - static void testCharBufferStringBuilder() - { - StringBuilder sb = GetInvalidStringBuilder(); - Assert.IsTrue(CharBuffer_In_StringBuilder(sb), "[Error] Location tcbsb1"); - - Assert.IsTrue(CharBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tcbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb3"); - - cTemp = GetValidStringBuilder(); - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb4"); - - cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb5"); - Assert.AreNotEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb6"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb7"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb8"); - } - - static void runTest() - { - testChar(); - testCharBufferString(); - testCharBufferStringBuilder(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } catch (Exception e){ - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/AFT_PFT/AFT_PFT.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/AFT_PFT/AFT_PFT.cs deleted file mode 100644 index 20f4cbf531d9..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/AFT_PFT/AFT_PFT.cs +++ /dev/null @@ -1,175 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(false, ThrowOnUnmappableChar = true)] - -public class BFM_CharMarshaler -{ - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool Char_In([In]char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool Char_InByRef([In]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool Char_InOutByRef([In, Out]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_In_String([In]String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InByRef_String([In]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InOutByRef_String([In, Out]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_In_StringBuilder([In]StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InByRef_StringBuilder([In]ref StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InOutByRef_StringBuilder([In, Out]ref StringBuilder s); - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static char GetInvalidChar() - { - return (char)0x2216; - } - - static char GetValidChar() - { - return 'c'; - } - - static void testChar() - { - Assert.Throws(() => Char_In(GetInvalidChar()), "[Error] Location tc1"); - - Assert.IsTrue(Char_In(GetValidChar()), "[Error] Location tc2"); - - char cTemp = GetInvalidChar(); - Assert.Throws(() => Char_InByRef(ref cTemp), "[Error] Location tc3"); - - cTemp = GetValidChar(); - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc4"); - - cTemp = GetInvalidChar(); - Assert.Throws(() => Char_InOutByRef(ref cTemp), "[Error] Location tc5"); - - cTemp = GetValidChar(); - char cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc6"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tc7"); - } - - static void testCharBufferString() - { - Assert.Throws(() => CharBuffer_In_String(GetInvalidString()), "[Error] Location tcbs1"); - - Assert.IsTrue(CharBuffer_In_String(GetValidString()), "[Error] Location tcbs2"); - - String cTemp = GetInvalidString(); - Assert.Throws(() => CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs3"); - - cTemp = GetValidString(); - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs4"); - - cTemp = GetInvalidString(); - Assert.Throws(() => CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs5"); - - cTemp = GetValidString(); - String cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs6"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tcbs7"); - } - - static void testCharBufferStringBuilder() - { - Assert.Throws(() => CharBuffer_In_StringBuilder(GetInvalidStringBuilder()), "[Error] Location tcbsb1"); - - Assert.IsTrue(CharBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tcbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - Assert.Throws(() => CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb3"); - - cTemp = GetValidStringBuilder(); - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb4"); - - cTemp = GetInvalidStringBuilder(); - Assert.Throws(() => CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb5"); - - cTemp = GetValidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb6"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb7"); - } - - static void runTest() - { - testChar(); - testCharBufferString(); - testCharBufferStringBuilder(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } catch (Exception e){ - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/AFT_PTF/AFT_PTF.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/AFT_PTF/AFT_PTF.cs deleted file mode 100644 index dbf710298517..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/AFT_PTF/AFT_PTF.cs +++ /dev/null @@ -1,193 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(false, ThrowOnUnmappableChar = true)] - -public class BFM_CharMarshaler -{ - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool Char_In([In]char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool Char_InByRef([In]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool Char_InOutByRef([In, Out]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_In_String([In]String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InByRef_String([In]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InOutByRef_String([In, Out]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_In_StringBuilder([In]StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InByRef_StringBuilder([In]ref StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InOutByRef_StringBuilder([In, Out]ref StringBuilder s); - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static char GetInvalidChar() - { - return (char)0x2216; - } - - static char GetValidChar() - { - return 'c'; - } - - static void testChar() - { - Assert.IsTrue(Char_In(GetInvalidChar()), "[Error] Location tc1"); - - Assert.IsTrue(Char_In(GetValidChar()), "[Error] Location tc2"); - - char cTemp = GetInvalidChar(); - char cTempClone = cTemp; - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc3"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tc4"); - - cTemp = GetValidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc5"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tc6"); - - cTemp = GetInvalidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc7"); - Assert.AreNotEqual(cTempClone, cTemp, "[Error] Location tc8"); - - cTemp = GetValidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc9"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tc10"); - } - - static void testCharBufferString() - { - Assert.IsTrue(CharBuffer_In_String(GetInvalidString()), "[Error] Location tcbs1"); - - Assert.IsTrue(CharBuffer_In_String(GetValidString()), "[Error] Location tcbs2"); - - String cTemp = GetInvalidString(); - String cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs3"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tcbs4"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs5"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tcbs6"); - - cTemp = GetInvalidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs7"); - Assert.AreNotEqual(cTempClone, cTemp, "[Error] Location tcbs8"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Locationtcbs9"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tcbs10"); - } - - static void testCharBufferStringBuilder() - { - Assert.IsTrue(CharBuffer_In_StringBuilder(GetInvalidStringBuilder()), "[Error] Location tcbsb1"); - - Assert.IsTrue(CharBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tcbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb3"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb4"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb5"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb6"); - - cTemp = GetInvalidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb7"); - Assert.AreNotEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb8"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb9"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb10"); - } - - static void runTest() - { - testChar(); - testCharBufferString(); - testCharBufferStringBuilder(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } catch (Exception e){ - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/AFT_PTT/AFT_PTT.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/AFT_PTT/AFT_PTT.cs deleted file mode 100644 index 2ed457c18459..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/AFT_PTT/AFT_PTT.cs +++ /dev/null @@ -1,181 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(false, ThrowOnUnmappableChar = true)] - -public class BFM_CharMarshaler -{ - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool Char_In([In]char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool Char_InByRef([In]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool Char_InOutByRef([In, Out]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_In_String([In]String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InByRef_String([In]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InOutByRef_String([In, Out]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_In_StringBuilder([In]StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InByRef_StringBuilder([In]ref StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InOutByRef_StringBuilder([In, Out]ref StringBuilder s); - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - //sbl.Append ('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - //sbl.Append ('乀'); - return sbl; - } - - static char GetInvalidChar() - { - return (char)0x2216; - } - - static char GetValidChar() - { - return 'c'; - } - - static void testChar() - { - Assert.IsTrue(Char_In(GetInvalidChar()), "[Error] Location tc1"); - - Assert.IsTrue(Char_In(GetValidChar()), "[Error] Location tc2"); - - char cTemp = GetInvalidChar(); - char cTempClone = GetInvalidChar(); - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc3"); - - cTemp = GetValidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc4"); - - cTemp = GetInvalidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc5"); - - cTemp = GetValidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc6"); - } - - static void testCharBufferString() - { - Assert.IsTrue(CharBuffer_In_String(GetInvalidString()), "[Error] Location tcbs1"); - - Assert.IsTrue(CharBuffer_In_String(GetValidString()), "[Error] Location tcbs2"); - - String cTemp = GetInvalidString(); - String cTempClone = GetInvalidString(); - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs3"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs4"); - - cTemp = GetInvalidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs5"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs6"); - } - - static void testCharBufferStringBuilder() - { - Assert.IsTrue(CharBuffer_In_StringBuilder(GetInvalidStringBuilder()), "[Error] Location tcbsb1"); - - Assert.IsTrue(CharBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tcbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb3"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb4"); - - cTemp = GetInvalidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb5"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb6"); - } - - static void runTest() - { - testChar(); - testCharBufferString(); - testCharBufferStringBuilder(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } catch (Exception e){ - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/ATF_PFF/ATF_PFF.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/ATF_PFF/ATF_PFF.cs deleted file mode 100644 index 44c94c639e7b..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/ATF_PFF/ATF_PFF.cs +++ /dev/null @@ -1,181 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(true, ThrowOnUnmappableChar = false)] - -public class BFM_CharMarshaler -{ - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool Char_In([In]char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool Char_InByRef([In]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool Char_InOutByRef([In, Out]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_In_String([In]String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InByRef_String([In]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InOutByRef_String([In, Out]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_In_StringBuilder([In]StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InByRef_StringBuilder([In]ref StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InOutByRef_StringBuilder([In, Out]ref StringBuilder s); - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static char GetInvalidChar() - { - return (char)0x2216; - } - - static char GetValidChar() - { - return 'c'; - } - - static void testChar() - { - Assert.IsTrue(Char_In(GetInvalidChar()), "[Error] Location tc1"); - - Assert.IsTrue(Char_In(GetValidChar()), "[Error] Location tc2"); - - char cTemp = GetInvalidChar(); - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc3"); - - cTemp = GetValidChar(); - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc4"); - - cTemp = GetInvalidChar(); - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc5"); - Assert.AreEqual('?', cTemp, "[Error] Location tc6"); - - cTemp = GetValidChar(); - char cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc7"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tc8"); - } - - static void testCharBufferString() - { - Assert.IsTrue(CharBuffer_In_String(GetInvalidString()), "[Error] Location tcbs1"); - - Assert.IsTrue(CharBuffer_In_String(GetValidString()), "[Error] Location tcbs2"); - - String cTemp = GetInvalidString(); - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs3"); - - cTemp = GetValidString(); - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs4"); - - cTemp = GetInvalidString(); - String cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs5"); - Assert.AreNotEqual(cTempClone, cTemp, "[Error] Location tcbs6"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs7"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tcbs8"); - } - - static void testCharBufferStringBuilder() - { - StringBuilder sb = GetInvalidStringBuilder(); - Assert.IsTrue(CharBuffer_In_StringBuilder(sb), "[Error] Location tcbsb1"); - - Assert.IsTrue(CharBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tcbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb3"); - - cTemp = GetValidStringBuilder(); - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb4"); - - cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb5"); - Assert.AreNotEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb6"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb7"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb8"); - } - - static void runTest() - { - testChar(); - testCharBufferString(); - testCharBufferStringBuilder(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } catch (Exception e){ - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/ATF_PFT/ATF_PFT.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/ATF_PFT/ATF_PFT.cs deleted file mode 100644 index 11fbc4845ecc..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/ATF_PFT/ATF_PFT.cs +++ /dev/null @@ -1,174 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(true, ThrowOnUnmappableChar = false)] - -public class BFM_CharMarshaler -{ - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool Char_In([In]char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool Char_InByRef([In]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool Char_InOutByRef([In, Out]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_In_String([In]String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InByRef_String([In]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InOutByRef_String([In, Out]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_In_StringBuilder([In]StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InByRef_StringBuilder([In]ref StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InOutByRef_StringBuilder([In, Out]ref StringBuilder s); - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static char GetInvalidChar() - { - return (char)0x2216; - } - - static char GetValidChar() - { - return 'c'; - } - - static void testChar() - { - Assert.Throws(() => Char_In(GetInvalidChar()), "[Error] Location tc1"); - - Assert.IsTrue(Char_In(GetValidChar()), "[Error] Location tc2"); - - char cTemp = GetInvalidChar(); - Assert.Throws(() => Char_InByRef(ref cTemp), "[Error] Location tc3"); - - cTemp = GetValidChar(); - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc4"); - - cTemp = GetInvalidChar(); - Assert.Throws(() => Char_InOutByRef(ref cTemp), "[Error] Location tc5"); - - cTemp = GetValidChar(); - char cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc6"); - } - - static void testCharBufferString() - { - Assert.Throws(() => CharBuffer_In_String(GetInvalidString()), "[Error] Location tcbs1"); - - Assert.IsTrue(CharBuffer_In_String(GetValidString()), "[Error] Location tcbs2"); - - String cTemp = GetInvalidString(); - Assert.Throws(() => CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs3"); - - cTemp = GetValidString(); - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs4"); - - cTemp = GetInvalidString(); - Assert.Throws(() => CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs5"); - - cTemp = GetValidString(); - String cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs6"); - } - - static void testCharBufferStringBuilder() - { - Assert.Throws(() => CharBuffer_In_StringBuilder(GetInvalidStringBuilder()), "[Error] Location tcbsb1"); - - Assert.IsTrue(CharBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tcbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - Assert.Throws(() => CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb3"); - - cTemp = GetValidStringBuilder(); - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb4"); - - cTemp = GetInvalidStringBuilder(); - Assert.Throws(() => CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb5"); - - cTemp = GetValidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb6"); - - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb7"); - } - - static void runTest() - { - testChar(); - testCharBufferString(); - testCharBufferStringBuilder(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } catch (Exception e){ - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/ATF_PTF/ATF_PTF.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/ATF_PTF/ATF_PTF.cs deleted file mode 100644 index 22960059ef39..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/ATF_PTF/ATF_PTF.cs +++ /dev/null @@ -1,193 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(true, ThrowOnUnmappableChar = false)] - -public class BFM_CharMarshaler -{ - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool Char_In([In]char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool Char_InByRef([In]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool Char_InOutByRef([In, Out]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_In_String([In]String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InByRef_String([In]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InOutByRef_String([In, Out]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_In_StringBuilder([In]StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InByRef_StringBuilder([In]ref StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InOutByRef_StringBuilder([In, Out]ref StringBuilder s); - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static char GetInvalidChar() - { - return (char)0x2216; - } - - static char GetValidChar() - { - return 'c'; - } - - static void testChar() - { - Assert.IsTrue(Char_In(GetInvalidChar()), "[Error] Location tc1"); - - Assert.IsTrue(Char_In(GetValidChar()), "[Error] Location tc2"); - - char cTemp = GetInvalidChar(); - char cTempClone = cTemp; - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc3"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tc4"); - - cTemp = GetValidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc5"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tc6"); - - cTemp = GetInvalidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc7"); - Assert.AreNotEqual(cTempClone, cTemp, "[Error] Location tc8"); - - cTemp = GetValidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc9"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tc10"); - } - - static void testCharBufferString() - { - Assert.IsTrue(CharBuffer_In_String(GetInvalidString()), "Error location tcbs1"); - - Assert.IsTrue(CharBuffer_In_String(GetValidString()), "Error location tcbs2"); - - String cTemp = GetInvalidString(); - String cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "Error location tcbs3"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tcbs4"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "Error location tcbs5"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tcbs6"); - - cTemp = GetInvalidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "Error location tcbs7"); - Assert.AreNotEqual(cTempClone, cTemp, "[Error] Location tcbs8"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "Error location tcbs9"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tcbs10"); - } - - static void testCharBufferStringBuilder() - { - Assert.IsTrue(CharBuffer_In_StringBuilder(GetInvalidStringBuilder()), "Error location tcbsb1"); - - Assert.IsTrue(CharBuffer_In_StringBuilder(GetValidStringBuilder()), "Error location tcbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "Error location tcbsb3"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "Error location tcbsb4"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "Error location tcbsb5"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "Error location tcbsb6"); - - cTemp = GetInvalidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "Error location tcbsb7"); - Assert.AreNotEqual(cTempClone.ToString(), cTemp.ToString(), "Error location tcbsb8"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "Error location tcbsb9"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "Error location tcbsb10"); - } - - static void runTest() - { - testChar(); - testCharBufferString(); - testCharBufferStringBuilder(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } catch (Exception e){ - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/ATF_PTT/ATF_PTT.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/ATF_PTT/ATF_PTT.cs deleted file mode 100644 index c09bd966cbaa..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/ATF_PTT/ATF_PTT.cs +++ /dev/null @@ -1,181 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(true, ThrowOnUnmappableChar = false)] - -public class BFM_CharMarshaler -{ - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool Char_In([In]char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool Char_InByRef([In]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool Char_InOutByRef([In, Out]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_In_String([In]String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InByRef_String([In]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InOutByRef_String([In, Out]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_In_StringBuilder([In]StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InByRef_StringBuilder([In]ref StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InOutByRef_StringBuilder([In, Out]ref StringBuilder s); - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - //sbl.Append ('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - //sbl.Append ('乀'); - return sbl; - } - - static char GetInvalidChar() - { - return (char)0x2216; - } - - static char GetValidChar() - { - return 'c'; - } - - static void testChar() - { - Assert.IsTrue(Char_In(GetInvalidChar()), "[Error] Location tc1"); - - Assert.IsTrue(Char_In(GetValidChar()), "[Error] Location tc2"); - - char cTemp = GetInvalidChar(); - char cTempClone = GetInvalidChar(); - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc3"); - - cTemp = GetValidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc4"); - - cTemp = GetInvalidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc5"); - - cTemp = GetValidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc6"); - } - - static void testCharBufferString() - { - Assert.IsTrue(CharBuffer_In_String(GetInvalidString()), "[Error] Location tcbs1"); - - Assert.IsTrue(CharBuffer_In_String(GetValidString()), "[Error] Location tcbs2"); - - String cTemp = GetInvalidString(); - String cTempClone = GetInvalidString(); - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs3"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs4"); - - cTemp = GetInvalidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs5"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs6"); - } - - static void testCharBufferStringBuilder() - { - Assert.IsTrue(CharBuffer_In_StringBuilder(GetInvalidStringBuilder()), "[Error] Location tcbsb1"); - - Assert.IsTrue(CharBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tcbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb3"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb4"); - - cTemp = GetInvalidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb5"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb6"); - } - - static void runTest() - { - testChar(); - testCharBufferString(); - testCharBufferStringBuilder(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } catch (Exception e){ - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/ATT_PFF/ATT_PFF.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/ATT_PFF/ATT_PFF.cs deleted file mode 100644 index 2dc352e054c1..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/ATT_PFF/ATT_PFF.cs +++ /dev/null @@ -1,181 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(true, ThrowOnUnmappableChar = true)] - -public class BFM_CharMarshaler -{ - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool Char_In([In]char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool Char_InByRef([In]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool Char_InOutByRef([In, Out]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_In_String([In]String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InByRef_String([In]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InOutByRef_String([In, Out]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_In_StringBuilder([In]StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InByRef_StringBuilder([In]ref StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InOutByRef_StringBuilder([In, Out]ref StringBuilder s); - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static char GetInvalidChar() - { - return (char)0x2216; - } - - static char GetValidChar() - { - return 'c'; - } - - static void testChar() - { - Assert.IsTrue(Char_In(GetInvalidChar()), "[Error] Location tc1"); - - Assert.IsTrue(Char_In(GetValidChar()), "[Error] Location tc2"); - - char cTemp = GetInvalidChar(); - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc3"); - - cTemp = GetValidChar(); - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc4"); - - cTemp = GetInvalidChar(); - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc5"); - Assert.AreEqual('?', cTemp, "[Error] Location tc6"); - - cTemp = GetValidChar(); - char cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc7"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tc6"); - } - - static void testCharBufferString() - { - Assert.IsTrue(CharBuffer_In_String(GetInvalidString()), "[Error] Location tcbs1"); - - Assert.IsTrue(CharBuffer_In_String(GetValidString()), "[Error] Location tcbs2"); - - String cTemp = GetInvalidString(); - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs3"); - - cTemp = GetValidString(); - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs4"); - - cTemp = GetInvalidString(); - String cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs5"); - Assert.AreNotEqual(cTempClone, cTemp, "[Error] Location tcbs6"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs7"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tcbs8"); - } - - static void testCharBufferStringBuilder() - { - StringBuilder sb = GetInvalidStringBuilder(); - Assert.IsTrue(CharBuffer_In_StringBuilder(sb), "[Error] Location tcbsb1"); - - Assert.IsTrue(CharBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tcbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb3"); - - cTemp = GetValidStringBuilder(); - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb4"); - - cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb5"); - Assert.AreNotEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb6"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb7"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb8"); - } - - static void runTest() - { - testChar(); - testCharBufferString(); - testCharBufferStringBuilder(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } catch (Exception e){ - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/ATT_PFT/ATT_PFT.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/ATT_PFT/ATT_PFT.cs deleted file mode 100644 index abe09f96d8d1..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/ATT_PFT/ATT_PFT.cs +++ /dev/null @@ -1,175 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(true, ThrowOnUnmappableChar = true)] - -public class BFM_CharMarshaler -{ - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool Char_In([In]char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool Char_InByRef([In]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool Char_InOutByRef([In, Out]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_In_String([In]String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InByRef_String([In]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InOutByRef_String([In, Out]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_In_StringBuilder([In]StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InByRef_StringBuilder([In]ref StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InOutByRef_StringBuilder([In, Out]ref StringBuilder s); - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static char GetInvalidChar() - { - return (char)0x2216; - } - - static char GetValidChar() - { - return 'c'; - } - - static void testChar() - { - Assert.Throws(() => Char_In(GetInvalidChar()), "[Error] Location tc1"); - - Assert.IsTrue(Char_In(GetValidChar()), "[Error] Location tc2"); - - char cTemp = GetInvalidChar(); - Assert.Throws(() => Char_InByRef(ref cTemp), "[Error] Location tc3"); - - cTemp = GetValidChar(); - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location t4"); - - cTemp = GetInvalidChar(); - Assert.Throws(() => Char_InOutByRef(ref cTemp), "[Error] Location tc55"); - - cTemp = GetValidChar(); - char cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc6"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tc7"); - } - - static void testCharBufferString() - { - Assert.Throws(() => CharBuffer_In_String(GetInvalidString()), "[Error] Location tcbs1"); - - Assert.IsTrue(CharBuffer_In_String(GetValidString()), "[Error] Location tcbs2"); - - String cTemp = GetInvalidString(); - Assert.Throws(() => CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs3"); - - cTemp = GetValidString(); - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs4"); - - cTemp = GetInvalidString(); - Assert.Throws(() => CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs5"); - - cTemp = GetValidString(); - String cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs6"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tcbs7"); - } - - static void testCharBufferStringBuilder() - { - Assert.Throws(() => CharBuffer_In_StringBuilder(GetInvalidStringBuilder()), "[Error] Location tcbsb1"); - - Assert.IsTrue(CharBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tcbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - Assert.Throws(() => CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb3"); - - cTemp = GetValidStringBuilder(); - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb4"); - - cTemp = GetInvalidStringBuilder(); - Assert.Throws(() => CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb5"); - - cTemp = GetValidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb6"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb7"); - } - - static void runTest() - { - testChar(); - testCharBufferString(); - testCharBufferStringBuilder(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } catch (Exception e){ - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/ATT_PTF/ATT_PTF.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/ATT_PTF/ATT_PTF.cs deleted file mode 100644 index cd4761cc8edd..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/ATT_PTF/ATT_PTF.cs +++ /dev/null @@ -1,193 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(true, ThrowOnUnmappableChar = true)] - -public class BFM_CharMarshaler -{ - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool Char_In([In]char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool Char_InByRef([In]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool Char_InOutByRef([In, Out]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_In_String([In]String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InByRef_String([In]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InOutByRef_String([In, Out]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_In_StringBuilder([In]StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InByRef_StringBuilder([In]ref StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InOutByRef_StringBuilder([In, Out]ref StringBuilder s); - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static char GetInvalidChar() - { - return (char)0x2216; - } - - static char GetValidChar() - { - return 'c'; - } - - static void testChar() - { - Assert.IsTrue(Char_In(GetInvalidChar()), "[Error] Location tc1"); - - Assert.IsTrue(Char_In(GetValidChar()), "[Error] Location tc2"); - - char cTemp = GetInvalidChar(); - char cTempClone = cTemp; - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc3"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tc4"); - - cTemp = GetValidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc5"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tc6"); - - cTemp = GetInvalidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc7"); - Assert.AreNotEqual(cTempClone, cTemp, "[Error] Location tc8"); - - cTemp = GetValidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc9"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tc10"); - } - - static void testCharBufferString() - { - Assert.IsTrue(CharBuffer_In_String(GetInvalidString()), "[Error] Location tcbs1"); - - Assert.IsTrue(CharBuffer_In_String(GetValidString()), "[Error] Location tcbs2"); - - String cTemp = GetInvalidString(); - String cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs3"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tcbs4"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs5"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tcbs6"); - - cTemp = GetInvalidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs7"); - Assert.AreNotEqual(cTempClone, cTemp, "[Error] Location tcbs8"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs9"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tcbs10"); - } - - static void testCharBufferStringBuilder() - { - Assert.IsTrue(CharBuffer_In_StringBuilder(GetInvalidStringBuilder()), "[Error] Location tcbsb1"); - - Assert.IsTrue(CharBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tcbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb3"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb4"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb5"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb6"); - - cTemp = GetInvalidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb7"); - Assert.AreNotEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb8"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb9"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb10"); - } - - static void runTest() - { - testChar(); - testCharBufferString(); - testCharBufferStringBuilder(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } catch (Exception e){ - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/ATT_PTT/ATT_PTT.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/ATT_PTT/ATT_PTT.cs deleted file mode 100644 index 46b8c219c342..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/ATT_PTT/ATT_PTT.cs +++ /dev/null @@ -1,181 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(true, ThrowOnUnmappableChar = true)] - -public class BFM_CharMarshaler -{ - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool Char_In([In]char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool Char_InByRef([In]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool Char_InOutByRef([In, Out]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_In_String([In]String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InByRef_String([In]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InOutByRef_String([In, Out]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_In_StringBuilder([In]StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InByRef_StringBuilder([In]ref StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InOutByRef_StringBuilder([In, Out]ref StringBuilder s); - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - //sbl.Append ('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - //sbl.Append ('乀'); - return sbl; - } - - static char GetInvalidChar() - { - return (char)0x2216; - } - - static char GetValidChar() - { - return 'c'; - } - - static void testChar() - { - Assert.IsTrue(Char_In(GetInvalidChar()), "[Error] Location tc1"); - - Assert.IsTrue(Char_In(GetValidChar()), "[Error] Location tc2"); - - char cTemp = GetInvalidChar(); - char cTempClone = GetInvalidChar(); - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc3"); - - cTemp = GetValidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc4"); - - cTemp = GetInvalidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc5"); - - cTemp = GetValidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc6"); - } - - static void testCharBufferString() - { - Assert.IsTrue(CharBuffer_In_String(GetInvalidString()), "[Error] Location tcbs1"); - - Assert.IsTrue(CharBuffer_In_String(GetValidString()), "[Error] Location tcbs2"); - - String cTemp = GetInvalidString(); - String cTempClone = GetInvalidString(); - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs3"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs4"); - - cTemp = GetInvalidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs5"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs6"); - } - - static void testCharBufferStringBuilder() - { - Assert.IsTrue(CharBuffer_In_StringBuilder(GetInvalidStringBuilder()), "[Error] Location tcbsb1"); - - Assert.IsTrue(CharBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tcbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb3"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb4"); - - cTemp = GetInvalidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb5"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb6"); - } - - static void runTest() - { - testChar(); - testCharBufferString(); - testCharBufferStringBuilder(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } catch (Exception e){ - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/Assembly_False_False/Assembly_False_False.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/Assembly_False_False/Assembly_False_False.cs deleted file mode 100644 index f776402cf1e3..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/Assembly_False_False/Assembly_False_False.cs +++ /dev/null @@ -1,181 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(false, ThrowOnUnmappableChar = false)] - -public class BFM_CharMarshaler -{ - [DllImport("Char_BestFitMappingNative")] - public static extern bool Char_In([In]char c); - - [DllImport("Char_BestFitMappingNative")] - public static extern bool Char_InByRef([In]ref char c); - - [DllImport("Char_BestFitMappingNative")] - public static extern bool Char_InOutByRef([In, Out]ref char c); - - [DllImport("Char_BestFitMappingNative")] - public static extern bool CharBuffer_In_String([In]String s); - - [DllImport("Char_BestFitMappingNative")] - public static extern bool CharBuffer_InByRef_String([In]ref String s); - - [DllImport("Char_BestFitMappingNative")] - public static extern bool CharBuffer_InOutByRef_String([In, Out]ref String s); - - [DllImport("Char_BestFitMappingNative")] - public static extern bool CharBuffer_In_StringBuilder([In]StringBuilder s); - - [DllImport("Char_BestFitMappingNative")] - public static extern bool CharBuffer_InByRef_StringBuilder([In]ref StringBuilder s); - - [DllImport("Char_BestFitMappingNative")] - public static extern bool CharBuffer_InOutByRef_StringBuilder([In, Out]ref StringBuilder s); - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static char GetInvalidChar() - { - return (char)0x2216; - } - - static char GetValidChar() - { - return 'c'; - } - - static void testChar() - { - Assert.IsTrue(Char_In(GetInvalidChar()), "[Error] Location tc1"); - - Assert.IsTrue(Char_In(GetValidChar()), "[Error] Location tc2"); - - char cTemp = GetInvalidChar(); - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc3"); - - cTemp = GetValidChar(); - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc4"); - - cTemp = GetInvalidChar(); - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc5"); - Assert.AreEqual('?', cTemp, "[Error] Location tc6"); - - cTemp = GetValidChar(); - char cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc7"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tc8"); - } - - static void testCharBufferString() - { - Assert.IsTrue(CharBuffer_In_String(GetInvalidString()), "[Error] Location tcbs1"); - - Assert.IsTrue(CharBuffer_In_String(GetValidString()), "[Error] Location tcbs2"); - - String cTemp = GetInvalidString(); - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs3"); - - cTemp = GetValidString(); - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs4"); - - cTemp = GetInvalidString(); - String cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs5"); - Assert.AreNotEqual(cTempClone, cTemp, "[Error] Location tcbs6"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs7"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tcbs8"); - } - - static void testCharBufferStringBuilder() - { - StringBuilder sb = GetInvalidStringBuilder(); - Assert.IsTrue(CharBuffer_In_StringBuilder(sb), "[Error] Location tcbsb1"); - - Assert.IsTrue(CharBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tcbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb3"); - - cTemp = GetValidStringBuilder(); - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb4"); - - cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb5"); - Assert.AreNotEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb6"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb7"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb8"); - } - - static void runTest() - { - testChar(); - testCharBufferString(); - testCharBufferStringBuilder(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } catch (Exception e){ - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/Assembly_False_True/Assembly_False_True.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/Assembly_False_True/Assembly_False_True.cs deleted file mode 100644 index 5310ab5c64bf..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/Assembly_False_True/Assembly_False_True.cs +++ /dev/null @@ -1,175 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(false, ThrowOnUnmappableChar = true)] - -public class BFM_CharMarshaler -{ - [DllImport("Char_BestFitMappingNative")] - public static extern bool Char_In([In]char c); - - [DllImport("Char_BestFitMappingNative")] - public static extern bool Char_InByRef([In]ref char c); - - [DllImport("Char_BestFitMappingNative")] - public static extern bool Char_InOutByRef([In, Out]ref char c); - - [DllImport("Char_BestFitMappingNative")] - public static extern bool CharBuffer_In_String([In]String s); - - [DllImport("Char_BestFitMappingNative")] - public static extern bool CharBuffer_InByRef_String([In]ref String s); - - [DllImport("Char_BestFitMappingNative")] - public static extern bool CharBuffer_InOutByRef_String([In, Out]ref String s); - - [DllImport("Char_BestFitMappingNative")] - public static extern bool CharBuffer_In_StringBuilder([In]StringBuilder s); - - [DllImport("Char_BestFitMappingNative")] - public static extern bool CharBuffer_InByRef_StringBuilder([In]ref StringBuilder s); - - [DllImport("Char_BestFitMappingNative")] - public static extern bool CharBuffer_InOutByRef_StringBuilder([In, Out]ref StringBuilder s); - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static char GetInvalidChar() - { - return (char)0x2216; - } - - static char GetValidChar() - { - return 'c'; - } - - static void testChar() - { - Assert.Throws(() => Char_In(GetInvalidChar()), "[Error] Location tc1"); - - Assert.IsTrue(Char_In(GetValidChar()), "[Error] Location tc2"); - - char cTemp = GetInvalidChar(); - Assert.Throws(() => Char_InByRef(ref cTemp), "[Error] Location tc3"); - - cTemp = GetValidChar(); - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc4"); - - cTemp = GetInvalidChar(); - Assert.Throws(() => Char_InOutByRef(ref cTemp), "[Error] Location tc5"); - - cTemp = GetValidChar(); - char cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc6"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tc7"); - } - - static void testCharBufferString() - { - Assert.Throws(() => CharBuffer_In_String(GetInvalidString()), "[Error] Location tcbs1"); - - Assert.IsTrue(CharBuffer_In_String(GetValidString()), "[Error] Location tcbs2"); - - String cTemp = GetInvalidString(); - Assert.Throws(() => CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs3"); - - cTemp = GetValidString(); - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs4"); - - cTemp = GetInvalidString(); - Assert.Throws(() => CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs5"); - - cTemp = GetValidString(); - String cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs6"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tcbs7"); - } - - static void testCharBufferStringBuilder() - { - Assert.Throws(() => CharBuffer_In_StringBuilder(GetInvalidStringBuilder()), "[Error] Location tcbsb1"); - - Assert.IsTrue(CharBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tcbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - Assert.Throws(() => CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb3"); - - cTemp = GetValidStringBuilder(); - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb4"); - - cTemp = GetInvalidStringBuilder(); - Assert.Throws(() => CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb5"); - - cTemp = GetValidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb6"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb7"); - } - - static void runTest() - { - testChar(); - testCharBufferString(); - testCharBufferStringBuilder(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } catch (Exception e){ - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/Assembly_True_False/Assembly_True_False.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/Assembly_True_False/Assembly_True_False.cs deleted file mode 100644 index d89aeb0500ba..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/Assembly_True_False/Assembly_True_False.cs +++ /dev/null @@ -1,230 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(true, ThrowOnUnmappableChar = false)] - -public class BFM_CharMarshaler -{ - [DllImport("Char_BestFitMappingNative")] - public static extern bool Char_In([In]char c); - - [DllImport("Char_BestFitMappingNative")] - public static extern bool Char_InByRef([In]ref char c); - - [DllImport("Char_BestFitMappingNative")] - public static extern bool Char_InOutByRef([In, Out]ref char c); - - [DllImport("Char_BestFitMappingNative")] - public static extern bool CharBuffer_In_String([In]String s); - - [DllImport("Char_BestFitMappingNative")] - public static extern bool CharBuffer_InByRef_String([In]ref String s); - - [DllImport("Char_BestFitMappingNative")] - public static extern bool CharBuffer_InOutByRef_String([In, Out]ref String s); - - [DllImport("Char_BestFitMappingNative")] - public static extern bool CharBuffer_In_StringBuilder([In]StringBuilder s); - - [DllImport("Char_BestFitMappingNative")] - public static extern bool CharBuffer_InByRef_StringBuilder([In]ref StringBuilder s); - - [DllImport("Char_BestFitMappingNative")] - public static extern bool CharBuffer_InOutByRef_StringBuilder([In, Out]ref StringBuilder s); - - [DllImport("Char_BestFitMappingNative")] - public static extern bool Char_InOut_ArrayWithOffset([In, Out]ArrayWithOffset charArrayWithOffset); - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static char GetInvalidChar() - { - return (char)0x2216; - } - - static char GetValidChar() - { - return 'c'; - } - - static void testChar() - { - Assert.IsTrue(Char_In(GetInvalidChar()), "[Error] Location tc1"); - - Assert.IsTrue(Char_In(GetValidChar()), "[Error] Location tc2"); - - char cTemp = GetInvalidChar(); - char cTempClone = cTemp; - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc3"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tc4"); - - cTemp = GetValidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc5"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tc6"); - - cTemp = GetInvalidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc7"); - Assert.AreNotEqual(cTempClone, cTemp, "[Error] Location tc8"); - - cTemp = GetValidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc9"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tc10"); - } - - static void testCharBufferString() - { - Assert.IsTrue(CharBuffer_In_String(GetInvalidString()), "[Error] Location tcbs1"); - - Assert.IsTrue(CharBuffer_In_String(GetValidString()), "[Error] Location tcbs2"); - - String cTemp = GetInvalidString(); - String cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs3"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tcbs4"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs5"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tcbs6"); - - cTemp = GetInvalidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs7"); - Assert.AreNotEqual(cTempClone, cTemp, "[Error] Location tcbs8"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs9"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tcbs10"); - } - - static void testCharBufferStringBuilder() - { - Assert.IsTrue(CharBuffer_In_StringBuilder(GetInvalidStringBuilder()), "[Error] Location tcbsb1"); - - Assert.IsTrue(CharBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tcbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb3"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb4"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb5"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb6"); - - cTemp = GetInvalidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb7"); - Assert.AreNotEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb8"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb9"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb10"); - } - - static char[] GetInvalidArray() - { - char[] c = new char[3]; - - c[0] = (char)0x2216; - c[1] = (char)0x2216; - c[2] = (char)0x2216; - - return c; - } - - static char[] GetValidArray() - { - char[] c = new char[3]; - - c[0] = 'a'; - c[1] = 'b'; - c[2] = 'c'; - - return c; - } - - static void testCharArrayWithOffset() - { - char[] c = GetInvalidArray(); - ArrayWithOffset arrWOff_0 = new ArrayWithOffset(c, 0); - Assert.IsTrue(Char_InOut_ArrayWithOffset(arrWOff_0), "[Error] Location ctlpsawo11"); - - c = GetValidArray(); - ArrayWithOffset arrWOff_1 = new ArrayWithOffset(c, 1); - Assert.IsTrue(Char_InOut_ArrayWithOffset(arrWOff_1), "[Error] Location ctlpsawo22"); - } - - static void runTest() - { - testChar(); - testCharBufferString(); - testCharBufferStringBuilder(); - testCharArrayWithOffset(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } catch (Exception e){ - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/Assembly_True_True/Assembly_True_True.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/Assembly_True_True/Assembly_True_True.cs deleted file mode 100644 index 9f707cd278e1..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/Assembly_True_True/Assembly_True_True.cs +++ /dev/null @@ -1,182 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(true, ThrowOnUnmappableChar = true)] - -public class BFM_CharMarshaler -{ - [DllImport("Char_BestFitMappingNative")] - public static extern bool Char_In([In]char c); - - [DllImport("Char_BestFitMappingNative")] - public static extern bool Char_InByRef([In]ref char c); - - [DllImport("Char_BestFitMappingNative")] - public static extern bool Char_InOutByRef([In, Out]ref char c); - - [DllImport("Char_BestFitMappingNative")] - public static extern bool CharBuffer_In_String([In]String s); - - [DllImport("Char_BestFitMappingNative")] - public static extern bool CharBuffer_InByRef_String([In]ref String s); - - [DllImport("Char_BestFitMappingNative")] - public static extern bool CharBuffer_InOutByRef_String([In, Out]ref String s); - - [DllImport("Char_BestFitMappingNative")] - public static extern bool CharBuffer_In_StringBuilder([In]StringBuilder s); - - [DllImport("Char_BestFitMappingNative")] - public static extern bool CharBuffer_InByRef_StringBuilder([In]ref StringBuilder s); - - [DllImport("Char_BestFitMappingNative")] - public static extern bool CharBuffer_InOutByRef_StringBuilder([In, Out]ref StringBuilder s); - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - //sbl.Append ('乀'); - - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - //sbl.Append ('乀'); - return sbl; - } - - static char GetInvalidChar() - { - return (char)0x2216; - } - - static char GetValidChar() - { - return 'c'; - } - - static void testChar() - { - Assert.IsTrue(Char_In(GetInvalidChar()), "[Error] Location tc1"); - - Assert.IsTrue(Char_In(GetValidChar()), "[Error] Location tc2"); - - char cTemp = GetInvalidChar(); - char cTempClone = GetInvalidChar(); - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc3"); - - cTemp = GetValidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc4"); - - cTemp = GetInvalidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc5"); - - cTemp = GetValidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc6"); - } - - static void testCharBufferString() - { - Assert.IsTrue(CharBuffer_In_String(GetInvalidString()), "[Error] Location tcbs1"); - - Assert.IsTrue(CharBuffer_In_String(GetValidString()), "[Error] Location tcbs2"); - - String cTemp = GetInvalidString(); - String cTempClone = GetInvalidString(); - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs3"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs4"); - - cTemp = GetInvalidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs5"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs6"); - } - - static void testCharBufferStringBuilder() - { - Assert.IsTrue(CharBuffer_In_StringBuilder(GetInvalidStringBuilder()), "[Error] Location tcbsb1"); - - Assert.IsTrue(CharBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tcbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb3"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb4"); - - cTemp = GetInvalidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb5"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb6"); - } - - static void runTest() - { - testChar(); - testCharBufferString(); - testCharBufferStringBuilder(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } catch (Exception e){ - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/BestFitMappingNative.cpp b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/BestFitMappingNative.cpp deleted file mode 100644 index e691b2ef3c0d..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/BestFitMappingNative.cpp +++ /dev/null @@ -1,98 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -#include -#include -#include -#include - - -extern "C" bool DLL_EXPORT STDMETHODCALLTYPE Char_In(char c) -{ - printf ("Char_In "); - printf ("%c",c); - printf ("\n"); - - return TRUE; -} - -extern "C" bool DLL_EXPORT STDMETHODCALLTYPE Char_InByRef(char* c) -{ - printf ("Char_InByRef "); - printf ("%c",*c); - printf ("\n"); - - return TRUE; -} - -extern "C" bool DLL_EXPORT STDMETHODCALLTYPE Char_InOutByRef(char* c) -{ - printf ("Char_InOutByRef "); - printf ("%c",*c); - printf ("\n"); - - return TRUE; -} - -extern "C" bool DLL_EXPORT STDMETHODCALLTYPE CharBuffer_In_String(char* c) -{ - printf ("native %s \n", c); - - return TRUE; -} - -extern "C" bool DLL_EXPORT STDMETHODCALLTYPE CharBuffer_InByRef_String(char** c) -{ - printf ("native %s \n", *c); - - return TRUE; -} - -extern "C" bool DLL_EXPORT STDMETHODCALLTYPE CharBuffer_InOutByRef_String(char** c) -{ - printf ("native %s \n", *c); - - return TRUE; -} - -extern "C" bool DLL_EXPORT STDMETHODCALLTYPE CharBuffer_In_StringBuilder(char* c) -{ - printf ("native %s \n", c); - - return TRUE; -} - -extern "C" bool DLL_EXPORT STDMETHODCALLTYPE CharBuffer_InByRef_StringBuilder(char** c) -{ - printf ("native %s \n", *c); - - return TRUE; -} - -extern "C" bool DLL_EXPORT STDMETHODCALLTYPE CharBuffer_InOutByRef_StringBuilder(char** c) -{ - printf ("native %s \n", *c); - - return TRUE; -} - -extern "C" bool DLL_EXPORT STDMETHODCALLTYPE Char_In_ArrayWithOffset (char* pArrayWithOffset) -{ - return TRUE; -} - -extern "C" bool DLL_EXPORT STDMETHODCALLTYPE Char_InOut_ArrayWithOffset (char* pArrayWithOffset) -{ - return TRUE; -} - -extern "C" bool DLL_EXPORT STDMETHODCALLTYPE Char_InByRef_ArrayWithOffset (char** ppArrayWithOffset) -{ - return TRUE; -} - -extern "C" bool DLL_EXPORT STDMETHODCALLTYPE Char_InOutByRef_ArrayWithOffset (char** ppArrayWithOffset) -{ - return TRUE; -} diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/Pinvoke_False_False/Pinvoke_False_False.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/Pinvoke_False_False/Pinvoke_False_False.cs deleted file mode 100644 index 0d8061479a4f..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/Pinvoke_False_False/Pinvoke_False_False.cs +++ /dev/null @@ -1,179 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -public class BFM_CharMarshaler -{ - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool Char_In([In]char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool Char_InByRef([In]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool Char_InOutByRef([In, Out]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_In_String([In]String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InByRef_String([In]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InOutByRef_String([In, Out]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_In_StringBuilder([In]StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InByRef_StringBuilder([In]ref StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InOutByRef_StringBuilder([In, Out]ref StringBuilder s); - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static char GetInvalidChar() - { - return (char)0x2216; - } - - static char GetValidChar() - { - return 'c'; - } - - static void testChar() - { - Assert.IsTrue(Char_In(GetInvalidChar()), "[Error] Location tc1"); - - Assert.IsTrue(Char_In(GetValidChar()), "[Error] Location tc2"); - - char cTemp = GetInvalidChar(); - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc3"); - - cTemp = GetValidChar(); - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location t4"); - - cTemp = GetInvalidChar(); - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc55"); - Assert.AreEqual('?', cTemp, "[Error] Location tc6"); - - cTemp = GetValidChar(); - char cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc7"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tc6"); - } - - static void testCharBufferString() - { - Assert.IsTrue(CharBuffer_In_String(GetInvalidString()), "[Error] Location tcbs1"); - - Assert.IsTrue(CharBuffer_In_String(GetValidString()), "[Error] Location tcbs2"); - - String cTemp = GetInvalidString(); - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs3"); - - cTemp = GetValidString(); - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs4"); - - cTemp = GetInvalidString(); - String cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs5"); - Assert.AreNotEqual(cTempClone, cTemp, "[Error] Location tcbs6"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs77"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tcbs8"); - } - - static void testCharBufferStringBuilder() - { - StringBuilder sb = GetInvalidStringBuilder(); - Assert.IsTrue(CharBuffer_In_StringBuilder(sb), "[Error] Location tcbsb1"); - - Assert.IsTrue(CharBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tcbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb3"); - - cTemp = GetValidStringBuilder(); - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb4"); - - cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb5"); - Assert.AreNotEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb6"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb7"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb8"); - } - - static void runTest() - { - testChar(); - testCharBufferString(); - testCharBufferStringBuilder(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } catch (Exception e){ - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/Pinvoke_False_True/Pinvoke_False_True.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/Pinvoke_False_True/Pinvoke_False_True.cs deleted file mode 100644 index 65cc722f6047..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/Pinvoke_False_True/Pinvoke_False_True.cs +++ /dev/null @@ -1,173 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -public class BFM_CharMarshaler -{ - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool Char_In([In]char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool Char_InByRef([In]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool Char_InOutByRef([In, Out]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_In_String([In]String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InByRef_String([In]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InOutByRef_String([In, Out]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_In_StringBuilder([In]StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InByRef_StringBuilder([In]ref StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InOutByRef_StringBuilder([In, Out]ref StringBuilder s); - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static char GetInvalidChar() - { - return (char)0x2216; - } - - static char GetValidChar() - { - return 'c'; - } - - static void testChar() - { - Assert.Throws(() => Char_In(GetInvalidChar()), "[Error] Location tc1"); - - Assert.IsTrue(Char_In(GetValidChar()), "[Error] Location tc2"); - - char cTemp = GetInvalidChar(); - Assert.Throws(() => Char_InByRef(ref cTemp), "[Error] Location tc3"); - - cTemp = GetValidChar(); - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc4"); - - cTemp = GetInvalidChar(); - Assert.Throws(() => Char_InOutByRef(ref cTemp), "[Error] Location tc5"); - - cTemp = GetValidChar(); - char cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc6"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tc7"); - } - - static void testCharBufferString() - { - Assert.Throws(() => CharBuffer_In_String(GetInvalidString()), "[Error] Location tcbs1"); - - Assert.IsTrue(CharBuffer_In_String(GetValidString()), "[Error] Location tcbs2"); - - String cTemp = GetInvalidString(); - Assert.Throws(() => CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs3"); - - cTemp = GetValidString(); - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs4"); - - cTemp = GetInvalidString(); - Assert.Throws(() => CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs5"); - - cTemp = GetValidString(); - String cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs6"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tcbs7"); - } - - static void testCharBufferStringBuilder() - { - Assert.Throws(() => CharBuffer_In_StringBuilder(GetInvalidStringBuilder()), "[Error] Location tcbsb1"); - - Assert.IsTrue(CharBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tcbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - Assert.Throws(() => CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb3"); - - cTemp = GetValidStringBuilder(); - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb4"); - - cTemp = GetInvalidStringBuilder(); - Assert.Throws(() => CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb5"); - - cTemp = GetValidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb6"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb7"); - } - - static void runTest() - { - testChar(); - testCharBufferString(); - testCharBufferStringBuilder(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } catch (Exception e){ - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/Pinvoke_True_False/Pinvoke_True_False.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/Pinvoke_True_False/Pinvoke_True_False.cs deleted file mode 100644 index bbf1fc921818..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/Pinvoke_True_False/Pinvoke_True_False.cs +++ /dev/null @@ -1,191 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -public class BFM_CharMarshaler -{ - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool Char_In([In]char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool Char_InByRef([In]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool Char_InOutByRef([In, Out]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_In_String([In]String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InByRef_String([In]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InOutByRef_String([In, Out]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_In_StringBuilder([In]StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InByRef_StringBuilder([In]ref StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool CharBuffer_InOutByRef_StringBuilder([In, Out]ref StringBuilder s); - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static char GetInvalidChar() - { - return (char)0x2216; - } - - static char GetValidChar() - { - return 'c'; - } - - static void testChar() - { - Assert.IsTrue(Char_In(GetInvalidChar()), "[Error] Location tc1"); - - Assert.IsTrue(Char_In(GetValidChar()), "[Error] Location tc2"); - - char cTemp = GetInvalidChar(); - char cTempClone = cTemp; - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc3"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tc4"); - - cTemp = GetValidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc5"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tc6"); - - cTemp = GetInvalidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc7"); - Assert.AreNotEqual(cTempClone, cTemp, "[Error] Location tc8"); - - cTemp = GetValidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc9"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tc10"); - } - - static void testCharBufferString() - { - Assert.IsTrue(CharBuffer_In_String(GetInvalidString()), "Error location tcbs1"); - - Assert.IsTrue(CharBuffer_In_String(GetValidString()), "Error location tcbs2"); - - String cTemp = GetInvalidString(); - String cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "Error location tcbs3"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tcbs4"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "Error location tcbs5"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tcbs6"); - - cTemp = GetInvalidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "Error location tcbs7"); - Assert.AreNotEqual(cTempClone, cTemp, "[Error] Location tcbs8"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "Error location tcbs9"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tcbs10"); - } - - static void testCharBufferStringBuilder() - { - Assert.IsTrue(CharBuffer_In_StringBuilder(GetInvalidStringBuilder()), "Error location tcbsb1"); - - Assert.IsTrue(CharBuffer_In_StringBuilder(GetValidStringBuilder()), "Error location tcbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "Error location tcbsb3"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb4"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "Error location tcbsb5"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb6"); - - cTemp = GetInvalidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "Error location tcbsb7"); - Assert.AreNotEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb8"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "Error location tcbsb9"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb10"); - } - - static void runTest() - { - testChar(); - testCharBufferString(); - testCharBufferStringBuilder(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } catch (Exception e){ - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/Pinvoke_True_True/Pinvoke_True_True.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/Pinvoke_True_True/Pinvoke_True_True.cs deleted file mode 100644 index 5e214969dca9..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/Char/Pinvoke_True_True/Pinvoke_True_True.cs +++ /dev/null @@ -1,179 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -public class BFM_CharMarshaler -{ - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool Char_In([In]char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool Char_InByRef([In]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool Char_InOutByRef([In, Out]ref char c); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_In_String([In]String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InByRef_String([In]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InOutByRef_String([In, Out]ref String s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_In_StringBuilder([In]StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InByRef_StringBuilder([In]ref StringBuilder s); - - [DllImport("Char_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool CharBuffer_InOutByRef_StringBuilder([In, Out]ref StringBuilder s); - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - //sbl.Append ('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - //sbl.Append ('乀'); - return sbl; - } - - static char GetInvalidChar() - { - return (char)0x2216; - } - - static char GetValidChar() - { - return 'c'; - } - - static void testChar() - { - Assert.IsTrue(Char_In(GetInvalidChar()), "[Error] Location tc1"); - - Assert.IsTrue(Char_In(GetValidChar()), "[Error] Location tc2"); - - char cTemp = GetInvalidChar(); - char cTempClone = GetInvalidChar(); - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc3"); - - cTemp = GetValidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InByRef(ref cTemp), "[Error] Location tc4"); - - cTemp = GetInvalidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location t5"); - - cTemp = GetValidChar(); - cTempClone = cTemp; - Assert.IsTrue(Char_InOutByRef(ref cTemp), "[Error] Location tc6"); - } - - static void testCharBufferString() - { - Assert.IsTrue(CharBuffer_In_String(GetInvalidString()), "[Error] Location tcbs1"); - - Assert.IsTrue(CharBuffer_In_String(GetValidString()), "[Error] Location tcbs2"); - - String cTemp = GetInvalidString(); - String cTempClone = GetInvalidString(); - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs3"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs4"); - - cTemp = GetInvalidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs5"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs6"); - } - - static void testCharBufferStringBuilder() - { - Assert.IsTrue(CharBuffer_In_StringBuilder(GetInvalidStringBuilder()), "[Error] Location tcbsb1"); - - Assert.IsTrue(CharBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tcbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb3"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb4"); - - cTemp = GetInvalidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb5"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(CharBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb6"); - } - - static void runTest() - { - testChar(); - testCharBufferString(); - testCharBufferStringBuilder(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } catch (Exception e){ - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/AFF_PFF/AFF_PFF.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/AFF_PFF/AFF_PFF.cs deleted file mode 100644 index a2a59a7334b2..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/AFF_PFF/AFF_PFF.cs +++ /dev/null @@ -1,357 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(false, ThrowOnUnmappableChar = false)] - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(false, ThrowOnUnmappableChar = false)] -public struct LPStrTestStruct -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(false, ThrowOnUnmappableChar = false)] -public class LPStrTestClass -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -public class BFM_LPStrMarshaler -{ -#pragma warning disable 618 - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_String([In][MarshalAs(UnmanagedType.LPStr)]String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_String([In][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_String([In, Out][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_StringBuilder([In, Out][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Struct_String([In][MarshalAs(UnmanagedType.Struct)]LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Struct_String([In][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Struct_String([In, Out][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Array_String([In][MarshalAs(UnmanagedType.LPArray)]String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Array_String([In][MarshalAs(UnmanagedType.LPArray)]ref String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Array_String([In, Out][MarshalAs(UnmanagedType.LPArray)]ref String[] Array); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Class_String([In, Out][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Array_Struct([In, Out][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); -#pragma warning restore 618 - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static void testLPStrBufferString() - { - Assert.IsTrue(LPStrBuffer_In_String(GetInvalidString()), "[Error] Location tcbs1"); - - Assert.IsTrue(LPStrBuffer_In_String(GetValidString()), "[Error] Location tcbs2"); - - String cTemp = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs3"); - - cTemp = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs4"); - - cTemp = GetInvalidString(); - String cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs5"); - Assert.AreNotEqual(cTempClone, cTemp, "[Error] Location tcbs6"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs7"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tcbs88"); - } - - static void testLPStrBufferStringBuilder() - { - StringBuilder sb = GetInvalidStringBuilder(); - Assert.IsTrue(LPStrBuffer_In_StringBuilder(sb), "[Error] Location tcbsb1"); - - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tcbsb2"); -; - StringBuilder cTemp = GetInvalidStringBuilder(); - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb3"); - - cTemp = GetValidStringBuilder(); - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb4"); - - cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb5"); - Assert.AreNotEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb6"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb7"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tcbsb8"); - } - - static LPStrTestStruct GetInvalidStruct() - { - LPStrTestStruct inValidStruct = new LPStrTestStruct(); - inValidStruct.str = GetInvalidString(); - - return inValidStruct; - } - - static LPStrTestStruct GetValidStruct() - { - LPStrTestStruct validStruct = new LPStrTestStruct(); - validStruct.str = GetValidString(); - - return validStruct; - } - - static String[] GetValidArray() - { - String[] s = new String[3]; - - s[0] = GetValidString(); - s[1] = GetValidString(); - s[2] = GetValidString(); - - return s; - } - - static String[] GetInvalidArray() - { - String[] s = new String[3]; - - s[0] = GetInvalidString(); - s[1] = GetInvalidString(); - s[2] = GetInvalidString(); - - return s; - } - - static void testLPStrBufferStruct() - { - LPStrTestStruct lpss = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_In_Struct_String(lpss), "[Error] Location tlpsbs1"); - - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetValidStruct()), "[Error] Location tlpsbs2"); - - LPStrTestStruct cTemp = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref cTemp), "[Error] Location tlpsbs3"); - - cTemp = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref cTemp), "[Error] Location tlpsbs4"); - - cTemp = GetInvalidStruct(); - LPStrTestStruct cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref cTemp), "[Error] Location tlpsbs5"); - Assert.AreNotEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbs6"); - - cTemp = GetValidStruct(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref cTemp), "[Error] Location tlpsbs7"); - Assert.AreEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbs8"); - } - - static void testLPStrBufferClass() - { - LPStrTestClass lpss = new LPStrTestClass(); - lpss.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(lpss), "[Error] Location tlpsbc1"); - - lpss.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(lpss), "[Error] Location tlpsbc2"); - - LPStrTestClass cTemp = new LPStrTestClass(); - cTemp.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref cTemp), "[Error] Location tlpsbc3"); - - cTemp.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref cTemp), "[Error] Location tlpsbc4"); - - cTemp.str = GetInvalidString(); - LPStrTestClass cTempClone = new LPStrTestClass(); - cTempClone.str = cTemp.str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref cTemp), "[Error] Location tlpsbc5"); - Assert.AreNotEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbc6"); - - cTemp.str = GetValidString(); - cTempClone.str = cTemp.str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref cTemp), "[Error] Location tlpsbc7"); - Assert.AreEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbc8"); - } - - static void testLPStrBufferArray() - { - String[] lpss = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(lpss), "[Error] Location tlpsba1"); - - Assert.IsTrue(LPStrBuffer_In_Array_String(GetValidArray()), "[Error] Location tlpsba2"); - - String[] cTemp = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref cTemp), "[Error] Location tlpsba3"); - - cTemp = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref cTemp), "[Error] Location tlpsba4"); - - cTemp = GetInvalidArray(); - String[] cTempClone = new String[3]; - cTempClone[0] = cTemp[0]; - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref cTemp), "[Error] Location tlpsba5"); - Assert.AreNotEqual(cTempClone[0], cTemp[0], "[Error] Location tlpsba6"); - - cTemp = GetValidArray(); - cTempClone[0] = cTemp[0]; - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref cTemp), "[Error] Location tlpsba7"); - Assert.AreEqual(cTempClone[0], cTemp[0], "[Error] Location tlpsba8"); - } - - static void testLPStrBufferArrayOfStructs() - { - LPStrTestStruct[] lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsba11"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsba22"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsba33"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsba44"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - - LPStrTestStruct[] lpssClone = new LPStrTestStruct[2]; - lpssClone[0].str = lpss[0].str; - lpssClone[1].str = lpss[1].str; - - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsba55"); - Assert.AreNotEqual(lpssClone[0].str, lpss[0].str, "[Error] Location tlpsba66"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - - lpssClone = new LPStrTestStruct[2]; - lpssClone[0].str = lpss[0].str; - lpssClone[1].str = lpss[1].str; - - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsba77"); - Assert.AreEqual(lpssClone[0].str, lpss[0].str, "[Error] Location tlpsba88"); - } - - static void runTest() - { - testLPStrBufferString(); - testLPStrBufferStringBuilder(); - testLPStrBufferStruct(); - testLPStrBufferArray(); - testLPStrBufferClass(); - testLPStrBufferArrayOfStructs(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } catch (Exception e){ - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/AFF_PFT/AFF_PFT.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/AFF_PFT/AFF_PFT.cs deleted file mode 100644 index 8398f51e3411..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/AFF_PFT/AFF_PFT.cs +++ /dev/null @@ -1,344 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(false, ThrowOnUnmappableChar = false)] - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(false, ThrowOnUnmappableChar = true)] -public struct LPStrTestStruct -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(false, ThrowOnUnmappableChar = true)] -public class LPStrTestClass -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -public class BFM_LPStrMarshaler -{ -#pragma warning disable 618 - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_String([In][MarshalAs(UnmanagedType.LPStr)]String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_String([In][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_String([In, Out][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_StringBuilder([In, Out][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Struct_String([In][MarshalAs(UnmanagedType.Struct)]LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Struct_String([In][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Struct_String([In, Out][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Array_String([In][MarshalAs(UnmanagedType.LPArray)]String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Array_String([In][MarshalAs(UnmanagedType.LPArray)]ref String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Array_String([In, Out][MarshalAs(UnmanagedType.LPArray)]ref String[] Array); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Class_String([In, Out][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - // struct attribute should override PI flags for BFM - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Array_Struct([In, Out][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); -#pragma warning restore 618 - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static void testLPStrBufferString() - { - Assert.Throws(() => LPStrBuffer_In_String(GetInvalidString()), "[Error] Location tlpsbs1"); - - Assert.IsTrue(LPStrBuffer_In_String(GetValidString()), "[Error] Location tlpsbs2"); - - String cTemp = GetInvalidString(); - Assert.Throws(() => LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs3"); - - cTemp = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs4"); - - cTemp = GetInvalidString(); - Assert.Throws(() => LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs5"); - - cTemp = GetValidString(); - String cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs6"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tlpsbs7"); - } - - static void testLPStrBufferStringBuilder() - { - Assert.Throws(() => LPStrBuffer_In_StringBuilder(GetInvalidStringBuilder()), "[Error] Location tlpsbsb1"); - - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tlpsbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - Assert.Throws(() => LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb3"); - - cTemp = GetValidStringBuilder(); - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb4"); - - cTemp = GetInvalidStringBuilder(); - Assert.Throws(() => LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb5"); - - cTemp = GetValidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb6"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb7"); - } - - static LPStrTestStruct GetInvalidStruct() - { - LPStrTestStruct inValidStruct = new LPStrTestStruct(); - inValidStruct.str = GetInvalidString(); - - return inValidStruct; - } - - static LPStrTestStruct GetValidStruct() - { - LPStrTestStruct validStruct = new LPStrTestStruct(); - validStruct.str = GetValidString(); - - return validStruct; - } - - static String[] GetValidArray() - { - String[] s = new String[3]; - - s[0] = GetValidString(); - s[1] = GetValidString(); - s[2] = GetValidString(); - - return s; - } - - static String[] GetInvalidArray() - { - String[] s = new String[3]; - - s[0] = GetInvalidString(); - s[1] = GetInvalidString(); - s[2] = GetInvalidString(); - - return s; - } - - static void testLPStrBufferStruct() - { - Assert.Throws(() => LPStrBuffer_In_Struct_String(GetInvalidStruct()), "[Error] Location tlpsbst1"); - - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetValidStruct()), "[Error] Location tlpsbst2"); - - LPStrTestStruct cTemp = GetInvalidStruct(); - Assert.Throws(() => LPStrBuffer_InByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst3"); - - cTemp = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst4"); - - cTemp = GetInvalidStruct(); - Assert.Throws(() => LPStrBuffer_InOutByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst5"); - - cTemp = GetValidStruct(); - LPStrTestStruct cTempClone = new LPStrTestStruct(); - cTempClone.str = cTemp.str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst6"); - Assert.AreEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbst7"); - } - - static void testLPStrBufferClass() - { - LPStrTestClass cTest = new LPStrTestClass(); - cTest.str = GetInvalidString(); - Assert.Throws(() => LPStrBuffer_In_Class_String(cTest), "[Error] Location tlpsbc1"); - - cTest.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(cTest), "[Error] Location tlpsbc2"); - - LPStrTestClass cTemp = new LPStrTestClass(); - cTemp.str = GetInvalidString(); - Assert.Throws(() => LPStrBuffer_InByRef_Class_String(ref cTemp), "[Error] Location tlpsbc3"); - - cTemp.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref cTemp), "[Error] Location tlpsbc4"); - - cTemp.str = GetInvalidString(); - Assert.Throws(() => LPStrBuffer_InOutByRef_Class_String(ref cTemp), "[Error] Location tlpsbc5"); - - LPStrTestClass cTempClone = new LPStrTestClass(); - cTemp.str = GetValidString(); - cTempClone.str = cTemp.str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref cTemp), "[Error] Location tlpsbc6"); - Assert.AreEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbc7"); - } - - static void testLPStrBufferArray() - { - String[] cTest = null; - cTest = GetInvalidArray(); - Assert.Throws(() => LPStrBuffer_In_Array_String(cTest), "[Error] Location tlpsba1"); - - cTest = GetValidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(cTest), "[Error] Location tlpsba2"); - - String[] cTemp = GetInvalidArray(); - Assert.Throws(() => LPStrBuffer_InByRef_Array_String(ref cTemp), "[Error] Location tlpsba3"); - - cTemp = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref cTemp), "[Error] Location tlpsba4"); - - cTemp = GetInvalidArray(); - Assert.Throws(() => LPStrBuffer_InOutByRef_Array_String(ref cTemp), "[Error] Location tlpsba5"); - - String[] cTempClone = new String[3]; - cTemp = GetValidArray(); - cTempClone[0] = cTemp[0]; - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref cTemp), "[Error] Location tlpsba6"); - Assert.AreEqual(cTempClone[0], cTemp[0], "[Error] Location tlpsba7"); - } - - static void testLPStrBufferArrayOfStructs() - { - LPStrTestStruct[] lpss = null; - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.Throws(() => LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos1"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos2"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.Throws(() => LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos3"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos4"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.Throws(() => LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos5"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - LPStrTestStruct[] lpssClone = new LPStrTestStruct[2]; - lpssClone[0].str = lpss[0].str; - lpssClone[1].str = lpss[1].str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos6"); - Assert.AreEqual(lpss[0].str, lpssClone[0].str, "[Error] Location tlpsbaos7"); - } - - static void runTest() - { - testLPStrBufferString(); - testLPStrBufferStringBuilder(); - testLPStrBufferStruct(); - testLPStrBufferArray(); - testLPStrBufferClass(); - testLPStrBufferArrayOfStructs(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } - catch (Exception e) - { - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/AFF_PTF/AFF_PTF.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/AFF_PTF/AFF_PTF.cs deleted file mode 100644 index 882d298e0836..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/AFF_PTF/AFF_PTF.cs +++ /dev/null @@ -1,341 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(false, ThrowOnUnmappableChar = false)] - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(true, ThrowOnUnmappableChar = false)] -public struct LPStrTestStruct -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(true, ThrowOnUnmappableChar = false)] -public class LPStrTestClass -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -public class BFM_LPStrMarshaler -{ -#pragma warning disable 618 - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_String([In][MarshalAs(UnmanagedType.LPStr)]String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_String([In][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_String([In, Out][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_StringBuilder([In, Out][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Struct_String([In][MarshalAs(UnmanagedType.Struct)]LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Struct_String([In][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Struct_String([In, Out][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Array_String([In][MarshalAs(UnmanagedType.LPArray)]String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Array_String([In][MarshalAs(UnmanagedType.LPArray)]ref String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Array_String([In, Out][MarshalAs(UnmanagedType.LPArray)]ref String[] Array); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Class_String([In, Out][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Array_Struct([In, Out][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); -#pragma warning restore 618 - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static void testLPStrBufferString() - { - Assert.IsTrue(LPStrBuffer_In_String(GetInvalidString()), "[Error] Location tlpsbs1"); - - Assert.IsTrue(LPStrBuffer_In_String(GetValidString()), "[Error] Location tlpsbs2"); - - String cTemp = GetInvalidString(); - String cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs3"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tlpsbs4"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs5"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tlpsbs6"); - - cTemp = GetInvalidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs7"); - Assert.AreNotEqual(cTempClone, cTemp, "[Error] Location tlpsbs8"); - - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs9"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tlpsbs10"); - } - - static void testLPStrBufferStringBuilder() - { - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetInvalidStringBuilder()), "[Error] Location tlpsbsb1"); - - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tlpsbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb3"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb4"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb5"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb6"); - - cTemp = GetInvalidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb7"); - Assert.AreNotEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb8"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb9"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb10"); - } - - static LPStrTestStruct GetInvalidStruct() - { - LPStrTestStruct inValidStruct = new LPStrTestStruct(); - inValidStruct.str = GetInvalidString(); - - return inValidStruct; - } - - static LPStrTestStruct GetValidStruct() - { - LPStrTestStruct validStruct = new LPStrTestStruct(); - validStruct.str = GetValidString(); - - return validStruct; - } - - static void testLPStrBufferStruct() - { - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetInvalidStruct()), "[Error] Location tlpsbst1"); - - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetValidStruct()), "[Error] Location tlpsbst2"); - - LPStrTestStruct lpss = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref lpss), "[Error] Location tlpsbst3"); - - lpss = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref lpss), "[Error] Location tlpsbst4"); - - lpss = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref lpss), "[Error] Location tlpsbst5"); - - lpss = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref lpss), "[Error] Location tlpsbst6"); - } - - static String[] GetValidArray() - { - String[] s = new String[3]; - - s[0] = GetValidString(); - s[1] = GetValidString(); - s[2] = GetValidString(); - - return s; - } - - static String[] GetInvalidArray() - { - String[] s = new String[3]; - - s[0] = GetInvalidString(); - s[1] = GetInvalidString(); - s[2] = GetInvalidString(); - - return s; - } - - static void testLPStrBufferArray() - { - String[] s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(s), "[Error] Location tlpsba1"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(s), "[Error] Location tlpsba2"); - - s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref s), "[Error] Location tlpsba3"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref s), "[Error] Location tlpsba4"); - - s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref s), "[Error] Location tlpsba5"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref s), "[Error] Location tlpsba6"); - } - - static void testLPStrBufferClass() - { - LPStrTestClass sClass = new LPStrTestClass(); - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(sClass), "[Error] Location tlpsbc1"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(sClass), "[Error] Location tlpsbc2"); - - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref sClass), "[Error] Location tlpsbc3"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref sClass), "[Error] Location tlpsbc4"); - - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref sClass), "[Error] Location tlpsbc5"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref sClass), "[Error] Location tlpsbc6"); - } - - static void testLPStrBufferArrayOfStructs() - { - LPStrTestStruct[] lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos1"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos2"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos3"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos4"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos5"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos6"); - - } - - static void runTest() - { - testLPStrBufferString(); - testLPStrBufferStringBuilder(); - testLPStrBufferStruct(); - testLPStrBufferArray(); - testLPStrBufferClass(); - testLPStrBufferArrayOfStructs(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } - catch (Exception e) - { - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/AFF_PTT/AFF_PTT.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/AFF_PTT/AFF_PTT.cs deleted file mode 100644 index d995e6b94eb3..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/AFF_PTT/AFF_PTT.cs +++ /dev/null @@ -1,330 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(false, ThrowOnUnmappableChar = false)] - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(true, ThrowOnUnmappableChar = true)] -public struct LPStrTestStruct -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(true, ThrowOnUnmappableChar = true)] -public class LPStrTestClass -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -public class BFM_LPStrMarshaler -{ -#pragma warning disable 618 - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_String([In][MarshalAs(UnmanagedType.LPStr)]String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_String([In][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_String([In, Out][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_StringBuilder([In, Out][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Struct_String([In][MarshalAs(UnmanagedType.Struct)]LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Struct_String([In][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Struct_String([In, Out][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Array_String([In][MarshalAs(UnmanagedType.LPArray)]String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Array_String([In][MarshalAs(UnmanagedType.LPArray)]ref String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Array_String([In, Out][MarshalAs(UnmanagedType.LPArray)]ref String[] Array); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Class_String([In, Out][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Array_Struct([In, Out][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); -#pragma warning restore 618 - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - //sbl.Append ('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - //sbl.Append ('乀'); - return sbl; - } - - static void testLPStrBufferString() - { - Assert.IsTrue(LPStrBuffer_In_String(GetInvalidString()), "[Error] Location tlpsbs1"); - - Assert.IsTrue(LPStrBuffer_In_String(GetValidString()), "[Error] Location tlpsbs2"); - - String cTemp = GetInvalidString(); - String cTempClone = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs3"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs4"); - - cTemp = GetInvalidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs5"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs6"); - } - - static void testLPStrBufferStringBuilder() - { - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetInvalidStringBuilder()), "[Error] Location tlpsbsb1"); - - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tlpsbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb3"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb4"); - - cTemp = GetInvalidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb5"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb6"); - } - - static LPStrTestStruct GetInvalidStruct() - { - LPStrTestStruct inValidStruct = new LPStrTestStruct(); - inValidStruct.str = GetInvalidString(); - - return inValidStruct; - } - - static LPStrTestStruct GetValidStruct() - { - LPStrTestStruct validStruct = new LPStrTestStruct(); - validStruct.str = GetValidString(); - - return validStruct; - } - - static void testLPStrBufferStruct() - { - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetInvalidStruct()), "[Error] Location tlpsbst1"); - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetValidStruct()), "[Error] Location tlpsbst2"); - - LPStrTestStruct lpss = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref lpss), "[Error] Location tlpsbst3"); - - lpss = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref lpss), "[Error] Location tlpsbst4"); - - lpss = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref lpss), "[Error] Location tlpsbst5"); - - lpss = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref lpss), "[Error] Location tlpsbst6"); - } - - static String[] GetValidArray() - { - String[] s = new String[3]; - - s[0] = GetValidString(); - s[1] = GetValidString(); - s[2] = GetValidString(); - - return s; - } - - static String[] GetInvalidArray() - { - String[] s = new String[3]; - - s[0] = GetInvalidString(); - s[1] = GetInvalidString(); - s[2] = GetInvalidString(); - - return s; - } - - static void testLPStrBufferArray() - { - String[] s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(s), "[Error] Location tlpsba1"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(s), "[Error] Location tlpsba2"); - - s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref s), "[Error] Location tlpsba3"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref s), "[Error] Location tlpsba4"); - - s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref s), "[Error] Location tlpsba5"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref s), "[Error] Location tlpsba6"); - } - - static void testLPStrBufferClass() - { - LPStrTestClass sClass = new LPStrTestClass(); - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(sClass), "[Error] Location tlpsbc1"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(sClass), "[Error] Location tlpsbc2"); - - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref sClass), "[Error] Location tlpsbc3"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref sClass), "[Error] Location tlpsbc4"); - - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref sClass), "[Error] Location tlpsbc5"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref sClass), "[Error] Location tlpsbc6"); - } - - static void testLPStrBufferArrayOfStructs() - { - LPStrTestStruct[] lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos1"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos2"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos3"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos4"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos5"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos6"); - } - - static void runTest() - { - testLPStrBufferString(); - testLPStrBufferStringBuilder(); - testLPStrBufferStruct(); - testLPStrBufferArray(); - testLPStrBufferClass(); - testLPStrBufferArrayOfStructs(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } - catch (Exception e) - { - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/AFT_PFF/AFT_PFF.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/AFT_PFF/AFT_PFF.cs deleted file mode 100644 index fe4e43dffa2f..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/AFT_PFF/AFT_PFF.cs +++ /dev/null @@ -1,353 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(false, ThrowOnUnmappableChar = true)] - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(false, ThrowOnUnmappableChar = false)] -public struct LPStrTestStruct -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(false, ThrowOnUnmappableChar = false)] -public class LPStrTestClass -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -public class BFM_LPStrMarshaler -{ -#pragma warning disable 618 - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_String([In][MarshalAs(UnmanagedType.LPStr)]String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_String([In][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_String([In, Out][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_StringBuilder([In, Out][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Struct_String([In][MarshalAs(UnmanagedType.Struct)]LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Struct_String([In][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Struct_String([In, Out][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Array_String([In][MarshalAs(UnmanagedType.LPArray)]String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Array_String([In][MarshalAs(UnmanagedType.LPArray)]ref String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Array_String([In, Out][MarshalAs(UnmanagedType.LPArray)]ref String[] Array); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Class_String([In, Out][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Array_Struct([In, Out][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); -#pragma warning restore 618 - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static void testLPStrBufferString() - { - Assert.IsTrue(LPStrBuffer_In_String(GetInvalidString()), "[Error] Location tcbs1"); - - Assert.IsTrue(LPStrBuffer_In_String(GetValidString()), "[Error] Location tcbs2"); - - String cTemp = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs3"); - - cTemp = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs4"); - - cTemp = GetInvalidString(); - String cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs5"); - Assert.AreNotEqual(cTempClone, cTemp, "[Error] Location tcbs6"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs7"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tcbs8"); - } - - static void testLPStrBufferStringBuilder() - { - StringBuilder sb = GetInvalidStringBuilder(); - Assert.IsTrue(LPStrBuffer_In_StringBuilder(sb), "[Error] Location tlpsbsb1"); - - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tlpsbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb3"); - - cTemp = GetValidStringBuilder(); - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb4"); - - cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb5"); - Assert.AreNotEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb6"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb7"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb8"); - } - - static LPStrTestStruct GetInvalidStruct() - { - LPStrTestStruct inValidStruct = new LPStrTestStruct(); - inValidStruct.str = GetInvalidString(); - - return inValidStruct; - } - - static LPStrTestStruct GetValidStruct() - { - LPStrTestStruct validStruct = new LPStrTestStruct(); - validStruct.str = GetValidString(); - - return validStruct; - } - - static String[] GetValidArray() - { - String[] s = new String[3]; - - s[0] = GetValidString(); - s[1] = GetValidString(); - s[2] = GetValidString(); - - return s; - } - - static String[] GetInvalidArray() - { - String[] s = new String[3]; - - s[0] = GetInvalidString(); - s[1] = GetInvalidString(); - s[2] = GetInvalidString(); - - return s; - } - - static void testLPStrBufferStruct() - { - LPStrTestStruct lpss = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_In_Struct_String(lpss), "[Error] Location tlpsbst1"); - - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetValidStruct()), "[Error] Location tlpsbst2"); - - LPStrTestStruct cTemp = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst3"); - - cTemp = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst4"); - - cTemp = GetInvalidStruct(); - LPStrTestStruct cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst5"); - Assert.AreNotEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbst6"); - - cTemp = GetValidStruct(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst7"); - Assert.AreEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbst8"); - } - - static void testLPStrBufferClass() - { - LPStrTestClass lpss = new LPStrTestClass(); - lpss.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(lpss), "[Error] Location tlpsbc1"); - - lpss.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(lpss), "[Error] Location tlpsbc2"); - - LPStrTestClass cTemp = new LPStrTestClass(); - cTemp.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref cTemp), "[Error] Location tlpsbc3"); - - cTemp.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref cTemp), "[Error] Location tlpsbc4"); - - cTemp.str = GetInvalidString(); - LPStrTestClass cTempClone = new LPStrTestClass(); - cTempClone.str = cTemp.str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref cTemp), "[Error] Location tlpsbc5"); - Assert.AreNotEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbc6"); - - cTemp.str = GetValidString(); - cTempClone.str = cTemp.str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref cTemp), "[Error] Location tlpsbc7"); - Assert.AreEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbc8"); - } - - static void testLPStrBufferArray() - { - String[] lpss = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(lpss), "[Error] Location tlpsba1"); - Assert.IsTrue(LPStrBuffer_In_Array_String(GetValidArray()), "[Error] Location tlpsba2"); - - String[] cTemp = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref cTemp), "[Error] Location tlpsba3"); - - cTemp = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref cTemp), "[Error] Location tlpsba4"); - - cTemp = GetInvalidArray(); - String[] cTempClone = new String[3]; - cTempClone[0] = cTemp[0]; - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref cTemp), "[Error] Location tlpsba5"); - Assert.AreNotEqual(cTempClone[0], cTemp[0], "[Error] Location ttlpsba6"); - - cTemp = GetValidArray(); - cTempClone[0] = cTemp[0]; - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref cTemp), "[Error] Location tlpsba7"); - Assert.AreEqual(cTempClone[0], cTemp[0], "[Error] Location tlpsba8"); - } - - static void testLPStrBufferArrayOfStructs() - { - LPStrTestStruct[] lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos1"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos2"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos3"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos4"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - LPStrTestStruct[] lpssClone = new LPStrTestStruct[2]; - lpssClone[0].str = lpss[0].str; - lpssClone[1].str = lpss[1].str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos5"); - Assert.AreNotEqual(lpss[0].str, lpssClone[0].str, "[Error] Location tlpsbaos6"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - lpssClone = new LPStrTestStruct[2]; - lpssClone[0].str = lpss[0].str; - lpssClone[1].str = lpss[1].str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos7"); - Assert.AreEqual(lpss[0].str, lpssClone[0].str, "[Error] Location tlpsbaos8"); - } - - static void runTest() - { - testLPStrBufferString(); - testLPStrBufferStringBuilder(); - testLPStrBufferStruct(); - testLPStrBufferArray(); - testLPStrBufferClass(); - testLPStrBufferArrayOfStructs(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } - catch (Exception e) - { - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/AFT_PFT/AFT_PFT.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/AFT_PFT/AFT_PFT.cs deleted file mode 100644 index 97ce237845a2..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/AFT_PFT/AFT_PFT.cs +++ /dev/null @@ -1,342 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(false, ThrowOnUnmappableChar = true)] - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(false, ThrowOnUnmappableChar = true)] -public struct LPStrTestStruct -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(false, ThrowOnUnmappableChar = true)] -public class LPStrTestClass -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -public class BFM_LPStrMarshaler -{ -#pragma warning disable 618 - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_String([In][MarshalAs(UnmanagedType.LPStr)]String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_String([In][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_String([In, Out][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_StringBuilder([In, Out][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Struct_String([In][MarshalAs(UnmanagedType.Struct)]LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Struct_String([In][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Struct_String([In, Out][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Array_String([In][MarshalAs(UnmanagedType.LPArray)]String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Array_String([In][MarshalAs(UnmanagedType.LPArray)]ref String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Array_String([In, Out][MarshalAs(UnmanagedType.LPArray)]ref String[] Array); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Class_String([In, Out][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Array_Struct([In, Out][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); -#pragma warning restore 618 - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static void testLPStrBufferString() - { - Assert.Throws(() => LPStrBuffer_In_String(GetInvalidString()), "[Error] Location tlpsbs1"); - - Assert.IsTrue(LPStrBuffer_In_String(GetValidString()), "[Error] Location tlpsbs2"); - - String cTemp = GetInvalidString(); - Assert.Throws(() => LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs3"); - - cTemp = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs4"); - - cTemp = GetInvalidString(); - Assert.Throws(() => LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs5"); - - cTemp = GetValidString(); - String cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs6"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tlpsbs7"); - } - - static void testLPStrBufferStringBuilder() - { - Assert.Throws(() => LPStrBuffer_In_StringBuilder(GetInvalidStringBuilder()), "[Error] Location tlpsbsb1"); - - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tlpsbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - Assert.Throws(() => LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb3"); - - cTemp = GetValidStringBuilder(); - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb4"); - - cTemp = GetInvalidStringBuilder(); - Assert.Throws(() => LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb5"); - - cTemp = GetValidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb6"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb7"); - } - - static LPStrTestStruct GetInvalidStruct() - { - LPStrTestStruct inValidStruct = new LPStrTestStruct(); - inValidStruct.str = GetInvalidString(); - - return inValidStruct; - } - - static LPStrTestStruct GetValidStruct() - { - LPStrTestStruct validStruct = new LPStrTestStruct(); - validStruct.str = GetValidString(); - - return validStruct; - } - - static String[] GetValidArray() - { - String[] s = new String[3]; - - s[0] = GetValidString(); - s[1] = GetValidString(); - s[2] = GetValidString(); - - return s; - } - - static String[] GetInvalidArray() - { - String[] s = new String[3]; - - s[0] = GetInvalidString(); - s[1] = GetInvalidString(); - s[2] = GetInvalidString(); - - return s; - } - - static void testLPStrBufferStruct() - { - Assert.Throws(() => LPStrBuffer_In_Struct_String(GetInvalidStruct()), "[Error] Location tlpsbst1"); - - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetValidStruct()), "[Error] Location tlpsbst2"); - - LPStrTestStruct cTemp = GetInvalidStruct(); - Assert.Throws(() => LPStrBuffer_InByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst3"); - - cTemp = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst4"); - - cTemp = GetInvalidStruct(); - Assert.Throws(() => LPStrBuffer_InOutByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst5"); - - cTemp = GetValidStruct(); - LPStrTestStruct cTempClone = new LPStrTestStruct(); - cTempClone.str = cTemp.str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst6"); - Assert.AreEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbst7"); - } - - static void testLPStrBufferClass() - { - LPStrTestClass cTest = new LPStrTestClass(); - cTest.str = GetInvalidString(); - Assert.Throws(() => LPStrBuffer_In_Class_String(cTest), "[Error] Location tlpsbc1"); - - cTest.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(cTest), "[Error] Location tlpsbc2"); - - LPStrTestClass cTemp = new LPStrTestClass(); - cTemp.str = GetInvalidString(); - Assert.Throws(() => LPStrBuffer_InByRef_Class_String(ref cTemp), "[Error] Location tlpsbc3"); - - cTemp.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref cTemp), "[Error] Location tlpsbc4"); - - cTemp.str = GetInvalidString(); - Assert.Throws(() => LPStrBuffer_InOutByRef_Class_String(ref cTemp), "[Error] Location tlpsbc5"); - - cTemp.str = GetValidString(); - LPStrTestClass cTempClone = new LPStrTestClass(); - cTempClone.str = cTemp.str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref cTemp), "[Error] Location tlpsbc6"); - Assert.AreEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbc7"); - } - - static void testLPStrBufferArray() - { - String[] cTest = null; - cTest = GetInvalidArray(); - Assert.Throws(() => LPStrBuffer_In_Array_String(cTest), "[Error] Location tlpsba1"); - - cTest = GetValidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(cTest), "[Error] Location tlpsba2"); - - String[] cTemp = GetInvalidArray(); - Assert.Throws(() => LPStrBuffer_InByRef_Array_String(ref cTemp), "[Error] Location tlpsba3"); - - cTemp = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref cTemp), "[Error] Location tlpsba4"); - - cTemp = GetInvalidArray(); - Assert.Throws(() => LPStrBuffer_InOutByRef_Array_String(ref cTemp), "[Error] Location tlpsba5"); - - cTemp = GetValidArray(); - String[] cTempClone = new String[3]; - cTempClone[0] = cTemp[0]; - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref cTemp), "[Error] Location tlpsba6"); - Assert.AreEqual(cTempClone[0], cTemp[0], "[Error] Location tlpsba7"); - } - - static void testLPStrBufferArrayOfStructs() - { - LPStrTestStruct[] lpss = null; - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.Throws(() => LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos1"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos2"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.Throws(() => LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos3"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos4"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.Throws(() => LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos5"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - LPStrTestStruct[] lpssClone = new LPStrTestStruct[2]; - lpssClone[0].str = lpss[0].str; - lpssClone[1].str = lpss[1].str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos6"); - Assert.AreEqual(lpss[0].str, lpssClone[0].str, "[Error] Location tlpsbaos7"); - } - - static void runTest() - { - testLPStrBufferString(); - testLPStrBufferStringBuilder(); - testLPStrBufferStruct(); - testLPStrBufferArray(); - testLPStrBufferClass(); - testLPStrBufferArrayOfStructs(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } - catch (Exception e) - { - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/AFT_PTF/AFT_PTF.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/AFT_PTF/AFT_PTF.cs deleted file mode 100644 index 5e8c23bf2102..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/AFT_PTF/AFT_PTF.cs +++ /dev/null @@ -1,336 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(false, ThrowOnUnmappableChar = true)] - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(true, ThrowOnUnmappableChar = false)] -public struct LPStrTestStruct -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(true, ThrowOnUnmappableChar = false)] -public class LPStrTestClass -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -public class BFM_LPStrMarshaler -{ -#pragma warning disable 618 - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_String([In][MarshalAs(UnmanagedType.LPStr)]String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_String([In][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_String([In, Out][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_StringBuilder([In, Out][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Struct_String([In][MarshalAs(UnmanagedType.Struct)]LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Struct_String([In][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Struct_String([In, Out][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Array_String([In][MarshalAs(UnmanagedType.LPArray)]String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Array_String([In][MarshalAs(UnmanagedType.LPArray)]ref String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Array_String([In, Out][MarshalAs(UnmanagedType.LPArray)]ref String[] Array); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Class_String([In, Out][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Array_Struct([In, Out][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); -#pragma warning restore 618 - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static void testLPStrBufferString() - { - Assert.IsTrue(LPStrBuffer_In_String(GetInvalidString()), "[Error] Location tlpsbs1"); - Assert.IsTrue(LPStrBuffer_In_String(GetValidString()), "[Error] Location tlpsbs2"); - - String cTemp = GetInvalidString(); - String cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs3"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tlpsbs4"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs5"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tlpsbs6"); - - cTemp = GetInvalidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs7"); - Assert.AreNotEqual(cTempClone, cTemp, "[Error] Location tlpsbs8"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs9"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tlpsbs10"); - } - - static void testLPStrBufferStringBuilder() - { - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetInvalidStringBuilder()), "[Error] Location tlpsbsb1"); - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tlpsbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb3"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb4"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb5"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb6"); - - cTemp = GetInvalidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb7"); - Assert.AreNotEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb8"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb9"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb10"); - } - - static LPStrTestStruct GetInvalidStruct() - { - LPStrTestStruct inValidStruct = new LPStrTestStruct(); - inValidStruct.str = GetInvalidString(); - - return inValidStruct; - } - - static LPStrTestStruct GetValidStruct() - { - LPStrTestStruct validStruct = new LPStrTestStruct(); - validStruct.str = GetValidString(); - - return validStruct; - } - - static void testLPStrBufferStruct() - { - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetInvalidStruct()), "[Error] Location tlpsbst1"); - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetValidStruct()), "[Error] Location tlpsbst2"); - - LPStrTestStruct lpss = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref lpss), "[Error] Location tlpsbst3"); - - lpss = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref lpss), "[Error] Location tlpsbst4"); - - lpss = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref lpss), "[Error] Location tlpsbst5"); - - lpss = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref lpss), "[Error] Location tlpsbst6"); - } - - static String[] GetValidArray() - { - String[] s = new String[3]; - - s[0] = GetValidString(); - s[1] = GetValidString(); - s[2] = GetValidString(); - - return s; - } - - static String[] GetInvalidArray() - { - String[] s = new String[3]; - - s[0] = GetInvalidString(); - s[1] = GetInvalidString(); - s[2] = GetInvalidString(); - - return s; - } - - static void testLPStrBufferArray() - { - String[] s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(s), "[Error] Location tlpsba1"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(s), "[Error] Location tlpsba2"); - - s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref s), "[Error] Location tlpsba3"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref s), "[Error] Location tlpsba4"); - - s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref s), "[Error] Location tlpsba5"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref s), "[Error] Location tlpsba6"); - } - - static void testLPStrBufferClass() - { - LPStrTestClass sClass = new LPStrTestClass(); - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(sClass), "[Error] Location tlpsbc1"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(sClass), "[Error] Location tlpsbc2"); - - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref sClass), "[Error] Location tlpsbc3"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref sClass), "[Error] Location tlpsbc4"); - - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref sClass), "[Error] Location tlpsbc5"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref sClass), "[Error] Location tlpsbc6"); - } - - static void testLPStrBufferArrayOfStructs() - { - LPStrTestStruct[] lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos1"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos2"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos3"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos4"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos5"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos6"); - } - - static void runTest() - { - testLPStrBufferString(); - testLPStrBufferStringBuilder(); - testLPStrBufferStruct(); - testLPStrBufferArray(); - testLPStrBufferClass(); - testLPStrBufferArrayOfStructs(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } - catch (Exception e) - { - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/AFT_PTT/AFT_PTT.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/AFT_PTT/AFT_PTT.cs deleted file mode 100644 index d5e3b8b180a4..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/AFT_PTT/AFT_PTT.cs +++ /dev/null @@ -1,364 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - - -[assembly: BestFitMapping(false, ThrowOnUnmappableChar = true)] - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(true)] -public struct LPStrTestStruct_nothrow -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(true, ThrowOnUnmappableChar = true)] -public struct LPStrTestStruct -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(true, ThrowOnUnmappableChar = true)] -public class LPStrTestClass -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -public class BFM_LPStrMarshaler -{ -#pragma warning disable 618 - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_String([In][MarshalAs(UnmanagedType.LPStr)]String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_String([In][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_String([In, Out][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_StringBuilder([In, Out][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Struct_String_nothrow([In][MarshalAs(UnmanagedType.Struct)]LPStrTestStruct_nothrow strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Struct_String([In][MarshalAs(UnmanagedType.Struct)]LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Struct_String([In][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Struct_String([In, Out][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Array_String([In][MarshalAs(UnmanagedType.LPArray)]String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Array_String([In][MarshalAs(UnmanagedType.LPArray)]ref String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Array_String([In, Out][MarshalAs(UnmanagedType.LPArray)]ref String[] Array); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Class_String([In, Out][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Array_Struct([In, Out][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); -#pragma warning restore 618 - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - //sbl.Append ('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - //sbl.Append ('乀'); - return sbl; - } - - static void testLPStrBufferString() - { - Assert.IsTrue(LPStrBuffer_In_String(GetInvalidString()), "[Error] Location tlpsbs1"); - Assert.IsTrue(LPStrBuffer_In_String(GetValidString()), "[Error] Location tlpsbs2"); - - String cTemp = GetInvalidString(); - String cTempClone = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs3"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs4"); - - cTemp = GetInvalidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs5"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs6"); - } - - static void testLPStrBufferStringBuilder() - { - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetInvalidStringBuilder()), "[Error] Location tlpsbsb1"); - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tlpsbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb3"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb4"); - - cTemp = GetInvalidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb5"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb6"); - } - - static LPStrTestStruct GetInvalidStruct() - { - LPStrTestStruct inValidStruct = new LPStrTestStruct(); - inValidStruct.str = GetInvalidString(); - - return inValidStruct; - } - - static LPStrTestStruct GetValidStruct() - { - LPStrTestStruct validStruct = new LPStrTestStruct(); - validStruct.str = GetValidString(); - - return validStruct; - } - - static LPStrTestStruct_nothrow GetInvalidStruct_nothrow() - { - LPStrTestStruct_nothrow inValidStruct = new LPStrTestStruct_nothrow(); - inValidStruct.str = GetInvalidString(); - - return inValidStruct; - } - - static LPStrTestStruct_nothrow GetValidStruct_nothrow() - { - LPStrTestStruct_nothrow validStruct = new LPStrTestStruct_nothrow(); - validStruct.str = GetValidString(); - - return validStruct; - } - - static void testLPStrBufferStruct() - { - LPStrTestStruct_nothrow lpss_nt = GetInvalidStruct_nothrow(); - Assert.IsTrue(LPStrBuffer_In_Struct_String_nothrow(lpss_nt), "[Error] Location tlpsbst1"); - - lpss_nt = GetValidStruct_nothrow(); - Assert.IsTrue(LPStrBuffer_In_Struct_String_nothrow(lpss_nt), "[Error] Location tlpsbst2"); - - LPStrTestStruct lpss = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_In_Struct_String(lpss), "[Error] Location tlpsbst3"); - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetValidStruct()), "[Error] Location tlpsbst4"); - - lpss = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref lpss), "[Error] Location tlpsbst5"); - - lpss = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref lpss), "[Error] Location tlpsbst6"); - - lpss = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref lpss), "[Error] Location tlpsbst7"); - - lpss = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref lpss), "[Error] Location tlpsbst8"); - } - - static String[] GetValidArray() - { - String[] s = new String[3]; - - s[0] = GetValidString(); - s[1] = GetValidString(); - s[2] = GetValidString(); - - return s; - } - - static String[] GetInvalidArray() - { - String[] s = new String[3]; - - s[0] = GetInvalidString(); - s[1] = GetInvalidString(); - s[2] = GetInvalidString(); - - return s; - } - - static void testLPStrBufferArray() - { - String[] s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(s), "[Error] Location tlpsba1"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(s), "[Error] Location tlpsba2"); - - s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref s), "[Error] Location tlpsba3"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref s), "[Error] Location tlpsba4"); - - s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref s), "[Error] Location tlpsba5"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref s), "[Error] Location tlpsba6"); - } - - static void testLPStrBufferClass() - { - LPStrTestClass sClass = new LPStrTestClass(); - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(sClass), "[Error] Location tlpsbc1"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(sClass), "[Error] Location tlpsbc2"); - - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref sClass), "[Error] Location tlpsbc3"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref sClass), "[Error] Location tlpsbc4"); - - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref sClass), "[Error] Location tlpsbc5"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref sClass), "[Error] Location tlpsbc6"); - } - - static void testLPStrBufferArrayOfStructs() - { - LPStrTestStruct[] lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos1"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos2"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos3"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos4"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos5"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos6"); - } - - static void runTest() - { - testLPStrBufferString(); - testLPStrBufferStringBuilder(); - testLPStrBufferStruct(); - testLPStrBufferArray(); - testLPStrBufferClass(); - testLPStrBufferArrayOfStructs(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } - catch (Exception e) - { - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/ATF_PFF/ATF_PFF.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/ATF_PFF/ATF_PFF.cs deleted file mode 100644 index 52b9b8463859..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/ATF_PFF/ATF_PFF.cs +++ /dev/null @@ -1,352 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(true, ThrowOnUnmappableChar = false)] - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(false, ThrowOnUnmappableChar = false)] -public struct LPStrTestStruct -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(false, ThrowOnUnmappableChar = false)] -public class LPStrTestClass -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -public class BFM_LPStrMarshaler -{ -#pragma warning disable 618 - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_String([In][MarshalAs(UnmanagedType.LPStr)]String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_String([In][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_String([In, Out][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_StringBuilder([In, Out][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Struct_String([In][MarshalAs(UnmanagedType.Struct)]LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Struct_String([In][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Struct_String([In, Out][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Array_String([In][MarshalAs(UnmanagedType.LPArray)]String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Array_String([In][MarshalAs(UnmanagedType.LPArray)]ref String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Array_String([In, Out][MarshalAs(UnmanagedType.LPArray)]ref String[] Array); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Class_String([In, Out][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Array_Struct([In, Out][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); -#pragma warning restore 618 - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static void testLPStrBufferString() - { - Assert.IsTrue(LPStrBuffer_In_String(GetInvalidString()), "[Error] Location tlpsbs1"); - Assert.IsTrue(LPStrBuffer_In_String(GetValidString()), "[Error] Location tlpsbs2"); - - String cTemp = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs3"); - - cTemp = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs4"); - - cTemp = GetInvalidString(); - String cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs5"); - Assert.AreNotEqual(cTempClone, cTemp, "[Error] Location tlpsbs6"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs7"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tlpsbs8"); - } - - static void testLPStrBufferStringBuilder() - { - StringBuilder sb = GetInvalidStringBuilder(); - Assert.IsTrue(LPStrBuffer_In_StringBuilder(sb), "[Error] Location tlpsbsb1"); - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tlpsbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb3"); - - cTemp = GetValidStringBuilder(); - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb4"); - - cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb5"); - Assert.AreNotEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb6"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb7"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb8"); - } - - static LPStrTestStruct GetInvalidStruct() - { - LPStrTestStruct inValidStruct = new LPStrTestStruct(); - inValidStruct.str = GetInvalidString(); - - return inValidStruct; - } - - static LPStrTestStruct GetValidStruct() - { - LPStrTestStruct validStruct = new LPStrTestStruct(); - validStruct.str = GetValidString(); - - return validStruct; - } - - static String[] GetValidArray() - { - String[] s = new String[3]; - - s[0] = GetValidString(); - s[1] = GetValidString(); - s[2] = GetValidString(); - - return s; - } - - static String[] GetInvalidArray() - { - String[] s = new String[3]; - - s[0] = GetInvalidString(); - s[1] = GetInvalidString(); - s[2] = GetInvalidString(); - - return s; - } - - static void testLPStrBufferStruct() - { - LPStrTestStruct lpss = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_In_Struct_String(lpss), "[Error] Location tlpsbst1"); - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetValidStruct()), "[Error] Location tlpsbst2"); - - LPStrTestStruct cTemp = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst3"); - - cTemp = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst4"); - - cTemp = GetInvalidStruct(); - LPStrTestStruct cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst5"); - Assert.AreNotEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbst6"); - - cTemp = GetValidStruct(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst7"); - Assert.AreEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbst8"); - } - - static void testLPStrBufferClass() - { - LPStrTestClass lpss = new LPStrTestClass(); - lpss.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(lpss), "[Error] Location tlpsbc1"); - - lpss.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(lpss), "[Error] Location tlpsbc2"); - - LPStrTestClass cTemp = new LPStrTestClass(); - cTemp.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref cTemp), "[Error] Location tlpsbc3"); - - cTemp.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref cTemp), "[Error] Location tlpsbc4"); - - cTemp.str = GetInvalidString(); - LPStrTestClass cTempClone = new LPStrTestClass(); - cTempClone.str = cTemp.str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref cTemp), "[Error] Location tlpsbc5"); - Assert.AreNotEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbc6"); - - cTemp.str = GetValidString(); - cTempClone.str = cTemp.str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref cTemp), "[Error] Location tlpsbc7"); - Assert.AreEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbc8"); - } - - static void testLPStrBufferArray() - { - String[] lpss = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(lpss), "[Error] Location tlpsba1"); - Assert.IsTrue(LPStrBuffer_In_Array_String(GetValidArray()), "[Error] Location tlpsba2"); - - String[] cTemp = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref cTemp), "[Error] Location tlpsba3"); - - cTemp = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref cTemp), "[Error] Location tlpsba4"); - - cTemp = GetInvalidArray(); - String[] cTempClone = new String[3]; - cTempClone[0] = cTemp[0]; - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref cTemp), "[Error] Location tlpsba5"); - Assert.AreNotEqual(cTempClone[0], cTemp[0], "[Error] Location tlpsba6"); - - cTemp = GetValidArray(); - cTempClone[0] = cTemp[0]; - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref cTemp), "[Error] Location tlpsba7"); - Assert.AreEqual(cTempClone[0], cTemp[0], "[Error] Location tlpsba8"); - } - - static void testLPStrBufferArrayOfStructs() - { - LPStrTestStruct[] lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos1"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos2"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos3"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos4"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - - LPStrTestStruct[] lpssClone = new LPStrTestStruct[2]; - lpssClone[0].str = lpss[0].str; - lpssClone[1].str = lpss[1].str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos5"); - Assert.AreNotEqual(lpss[0].str, lpssClone[0].str, "[Error] Location tlpsbaos6"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - lpssClone = new LPStrTestStruct[2]; - lpssClone[0].str = lpss[0].str; - lpssClone[1].str = lpss[1].str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos7"); - Assert.AreEqual(lpss[0].str, lpssClone[0].str, "[Error] Location tlpsbaos8"); - } - - static void runTest() - { - testLPStrBufferString(); - testLPStrBufferStringBuilder(); - testLPStrBufferStruct(); - testLPStrBufferArray(); - testLPStrBufferClass(); - testLPStrBufferArrayOfStructs(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } - catch (Exception e) - { - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/ATF_PFT/ATF_PFT.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/ATF_PFT/ATF_PFT.cs deleted file mode 100644 index 25bb28428cb9..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/ATF_PFT/ATF_PFT.cs +++ /dev/null @@ -1,340 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(true, ThrowOnUnmappableChar = false)] - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(false, ThrowOnUnmappableChar = true)] -public struct LPStrTestStruct -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(false, ThrowOnUnmappableChar = true)] -public class LPStrTestClass -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -public class BFM_LPStrMarshaler -{ -#pragma warning disable 618 - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_String([In][MarshalAs(UnmanagedType.LPStr)]String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_String([In][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_String([In, Out][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_StringBuilder([In, Out][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Struct_String([In][MarshalAs(UnmanagedType.Struct)]LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Struct_String([In][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Struct_String([In, Out][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Array_String([In][MarshalAs(UnmanagedType.LPArray)]String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Array_String([In][MarshalAs(UnmanagedType.LPArray)]ref String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Array_String([In, Out][MarshalAs(UnmanagedType.LPArray)]ref String[] Array); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Class_String([In, Out][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Array_Struct([In, Out][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); -#pragma warning restore 618 - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static void testLPStrBufferString() - { - Assert.Throws(() => LPStrBuffer_In_String(GetInvalidString()), "[Error] Location tlpsbs1"); - Assert.IsTrue(LPStrBuffer_In_String(GetValidString()), "[Error] Location tlpsbs2"); - - String cTemp = GetInvalidString(); - Assert.Throws(() => LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs3"); - - cTemp = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs4"); - - cTemp = GetInvalidString(); - Assert.Throws(() => LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs5"); - - cTemp = GetValidString(); - String cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs6"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tlpsbs7"); - } - - static void testLPStrBufferStringBuilder() - { - Assert.Throws(() => LPStrBuffer_In_StringBuilder(GetInvalidStringBuilder()), "[Error] Location tlpsbsb1"); - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tlpsbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - Assert.Throws(() => LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb3"); - - cTemp = GetValidStringBuilder(); - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb4"); - - cTemp = GetInvalidStringBuilder(); - Assert.Throws(() => LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb5"); - - cTemp = GetValidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb6"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb7"); - } - - static LPStrTestStruct GetInvalidStruct() - { - LPStrTestStruct inValidStruct = new LPStrTestStruct(); - inValidStruct.str = GetInvalidString(); - - return inValidStruct; - } - - static LPStrTestStruct GetValidStruct() - { - LPStrTestStruct validStruct = new LPStrTestStruct(); - validStruct.str = GetValidString(); - - return validStruct; - } - - static String[] GetValidArray() - { - String[] s = new String[3]; - - s[0] = GetValidString(); - s[1] = GetValidString(); - s[2] = GetValidString(); - - return s; - } - - static String[] GetInvalidArray() - { - String[] s = new String[3]; - - s[0] = GetInvalidString(); - s[1] = GetInvalidString(); - s[2] = GetInvalidString(); - - return s; - } - - static void testLPStrBufferStruct() - { - Assert.Throws(() => LPStrBuffer_In_Struct_String(GetInvalidStruct()), "[Error] Location tlpsbst1"); - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetValidStruct()), "[Error] Location tlpsbst2"); - - LPStrTestStruct cTemp = GetInvalidStruct(); - Assert.Throws(() => LPStrBuffer_InByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst3"); - - cTemp = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst4"); - - cTemp = GetInvalidStruct(); - Assert.Throws(() => LPStrBuffer_InOutByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst5"); - - cTemp = GetValidStruct(); - LPStrTestStruct cTempClone = new LPStrTestStruct(); - cTempClone.str = cTemp.str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst6"); - Assert.AreEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbst7"); - } - - static void testLPStrBufferClass() - { - LPStrTestClass cTest = new LPStrTestClass(); - cTest.str = GetInvalidString(); - Assert.Throws(() => LPStrBuffer_In_Class_String(cTest), "[Error] Location tlpsbc1"); - - cTest.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(cTest), "[Error] Location tlpsbc2"); - - LPStrTestClass cTemp = new LPStrTestClass(); - cTemp.str = GetInvalidString(); - Assert.Throws(() => LPStrBuffer_InByRef_Class_String(ref cTemp), "[Error] Location tlpsbc3"); - - cTemp.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref cTemp), "[Error] Location tlpsbc4"); - - cTemp.str = GetInvalidString(); - Assert.Throws(() => LPStrBuffer_InOutByRef_Class_String(ref cTemp), "[Error] Location tlpsbc5"); - - cTemp.str = GetValidString(); - LPStrTestClass cTempClone = new LPStrTestClass(); - cTempClone.str = cTemp.str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref cTemp), "[Error] Location tlpsbc6"); - Assert.AreEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbc7"); - } - - static void testLPStrBufferArray() - { - String[] cTest = null; - cTest = GetInvalidArray(); - Assert.Throws(() => LPStrBuffer_In_Array_String(cTest), "[Error] Location tlpsba1"); - - cTest = GetValidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(cTest), "[Error] Location tlpsba2"); - - String[] cTemp = GetInvalidArray(); - Assert.Throws(() => LPStrBuffer_InByRef_Array_String(ref cTemp), "[Error] Location tlpsba3"); - - cTemp = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref cTemp), "[Error] Location tlpsba4"); - - cTemp = GetInvalidArray(); - Assert.Throws(() => LPStrBuffer_InOutByRef_Array_String(ref cTemp), "[Error] Location tlpsba5"); - - cTemp = GetValidArray(); - String[] cTempClone = new String[3]; - cTempClone[0] = cTemp[0]; - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref cTemp), "[Error] Location tlpsba6"); - Assert.AreEqual(cTempClone[0], cTemp[0], "[Error] Location tlpsba7"); - } - - static void testLPStrBufferArrayOfStructs() - { - LPStrTestStruct[] lpss = null; - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.Throws(() => LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos1"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos2"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.Throws(() => LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos3"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos4"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.Throws(() => LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos5"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - LPStrTestStruct[] lpssClone = new LPStrTestStruct[2]; - lpssClone[0].str = lpss[0].str; - lpssClone[1].str = lpss[1].str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos6"); - Assert.AreEqual(lpss[0].str, lpssClone[0].str, "[Error] Location tlpsbaos7"); - } - - static void runTest() - { - testLPStrBufferString(); - testLPStrBufferStringBuilder(); - testLPStrBufferStruct(); - testLPStrBufferArray(); - testLPStrBufferClass(); - testLPStrBufferArrayOfStructs(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } - catch (Exception e) - { - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/ATF_PTF/ATF_PTF.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/ATF_PTF/ATF_PTF.cs deleted file mode 100644 index 582d6847a32f..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/ATF_PTF/ATF_PTF.cs +++ /dev/null @@ -1,337 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(true, ThrowOnUnmappableChar = false)] - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(true, ThrowOnUnmappableChar = false)] -public struct LPStrTestStruct -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(true, ThrowOnUnmappableChar = false)] -public class LPStrTestClass -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -public class BFM_LPStrMarshaler -{ -#pragma warning disable 618 - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_String([In][MarshalAs(UnmanagedType.LPStr)]String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_String([In][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_String([In, Out][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_StringBuilder([In, Out][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Struct_String([In][MarshalAs(UnmanagedType.Struct)]LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Struct_String([In][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Struct_String([In, Out][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Array_String([In][MarshalAs(UnmanagedType.LPArray)]String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Array_String([In][MarshalAs(UnmanagedType.LPArray)]ref String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Array_String([In, Out][MarshalAs(UnmanagedType.LPArray)]ref String[] Array); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Class_String([In, Out][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Array_Struct([In, Out][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); -#pragma warning restore 618 - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static void testLPStrBufferString() - { - Assert.IsTrue(LPStrBuffer_In_String(GetInvalidString()), "[Error] Location tlpsbs1"); - Assert.IsTrue(LPStrBuffer_In_String(GetValidString()), "[Error] Location tlpsbs2"); - - String cTemp = GetInvalidString(); - String cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs3"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tlpsbs4"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs5"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tlpsbs6"); - - cTemp = GetInvalidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs7"); - Assert.AreNotEqual(cTempClone, cTemp, "[Error] Location tlpsbs8"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs9"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tlpsbs10"); - } - - static void testLPStrBufferStringBuilder() - { - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetInvalidStringBuilder()), "[Error] Location tlpsbsb1"); - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tlpsbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb3"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb4"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb5"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb6"); - - cTemp = GetInvalidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb7"); - Assert.AreNotEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb8"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb9"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb10"); - } - - static LPStrTestStruct GetInvalidStruct() - { - LPStrTestStruct inValidStruct = new LPStrTestStruct(); - inValidStruct.str = GetInvalidString(); - - return inValidStruct; - } - - - static LPStrTestStruct GetValidStruct() - { - LPStrTestStruct validStruct = new LPStrTestStruct(); - validStruct.str = GetValidString(); - - return validStruct; - } - - static void testLPStrBufferStruct() - { - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetInvalidStruct()), "[Error] Location tlpsbst1"); - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetValidStruct()), "[Error] Location tlpsbst2"); - - LPStrTestStruct lpss = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref lpss), "[Error] Location tlpsbst3"); - - lpss = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref lpss), "[Error] Location tlpsbst4"); - - lpss = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref lpss), "[Error] Location tlpsbst5"); - - lpss = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref lpss), "[Error] Location tlpsbst6"); - } - - static String[] GetValidArray() - { - String[] s = new String[3]; - - s[0] = GetValidString(); - s[1] = GetValidString(); - s[2] = GetValidString(); - - return s; - } - - static String[] GetInvalidArray() - { - String[] s = new String[3]; - - s[0] = GetInvalidString(); - s[1] = GetInvalidString(); - s[2] = GetInvalidString(); - - return s; - } - - static void testLPStrBufferArray() - { - String[] s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(s), "[Error] Location tlpsba1"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(s), "[Error] Location tlpsba2"); - - s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref s), "[Error] Location tlpsba3"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref s), "[Error] Location tlpsba4"); - - s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref s), "[Error] Location tlpsba5"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref s), "[Error] Location tlpsba6"); - } - - static void testLPStrBufferClass() - { - LPStrTestClass sClass = new LPStrTestClass(); - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(sClass), "[Error] Location tlpsbc1"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(sClass), "[Error] Location tlpsbc2"); - - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref sClass), "[Error] Location tlpsbc3"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref sClass), "[Error] Location tlpsbc4"); - - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref sClass), "[Error] Location tlpsbc5"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref sClass), "[Error] Location tlpsbc6"); - } - - static void testLPStrBufferArrayOfStructs() - { - LPStrTestStruct[] lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos1"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos2"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos3"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos4"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos5"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos6"); - } - - static void runTest() - { - testLPStrBufferString(); - testLPStrBufferStringBuilder(); - testLPStrBufferStruct(); - testLPStrBufferArray(); - testLPStrBufferClass(); - testLPStrBufferArrayOfStructs(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } - catch (Exception e) - { - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/ATF_PTT/ATF_PTT.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/ATF_PTT/ATF_PTT.cs deleted file mode 100644 index 6e241542c6ba..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/ATF_PTT/ATF_PTT.cs +++ /dev/null @@ -1,329 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(true, ThrowOnUnmappableChar = false)] - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(true, ThrowOnUnmappableChar = true)] -public struct LPStrTestStruct -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(true, ThrowOnUnmappableChar = true)] -public class LPStrTestClass -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -public class BFM_LPStrMarshaler -{ -#pragma warning disable 618 - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_String([In][MarshalAs(UnmanagedType.LPStr)]String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_String([In][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_String([In, Out][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_StringBuilder([In, Out][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Struct_String([In][MarshalAs(UnmanagedType.Struct)]LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Struct_String([In][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Struct_String([In, Out][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Array_String([In][MarshalAs(UnmanagedType.LPArray)]String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Array_String([In][MarshalAs(UnmanagedType.LPArray)]ref String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Array_String([In, Out][MarshalAs(UnmanagedType.LPArray)]ref String[] Array); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Class_String([In, Out][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Array_Struct([In, Out][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); -#pragma warning restore 618 - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - //sbl.Append ('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - //sbl.Append ('乀'); - return sbl; - } - - static void testLPStrBufferString() - { - Assert.IsTrue(LPStrBuffer_In_String(GetInvalidString()), "[Error] Location tlpsbs1"); - - Assert.IsTrue(LPStrBuffer_In_String(GetValidString()), "[Error] Location tlpsbs2"); - - String cTemp = GetInvalidString(); - String cTempClone = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs3"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs4"); - - cTemp = GetInvalidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs5"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs6"); - } - - static void testLPStrBufferStringBuilder() - { - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetInvalidStringBuilder()), "[Error] Location tlpsbsb1"); - - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tlpsbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb3"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb4"); - - cTemp = GetInvalidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb5"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb6"); - } - - static LPStrTestStruct GetInvalidStruct() - { - LPStrTestStruct inValidStruct = new LPStrTestStruct(); - inValidStruct.str = GetInvalidString(); - - return inValidStruct; - } - - static LPStrTestStruct GetValidStruct() - { - LPStrTestStruct validStruct = new LPStrTestStruct(); - validStruct.str = GetValidString(); - - return validStruct; - } - - static void testLPStrBufferStruct() - { - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetInvalidStruct()), "[Error] Location tlpsbst1"); - - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetValidStruct()), "[Error] Location tlpsbst2"); - - LPStrTestStruct lpss = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref lpss), "[Error] Location tlpsbst3"); - - lpss = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref lpss), "[Error] Location tlpsbst4"); - - lpss = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref lpss), "[Error] Location tlpsbst5"); - - lpss = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref lpss), "[Error] Location tlpsbst6"); - } - - static String[] GetValidArray() - { - String[] s = new String[3]; - - s[0] = GetValidString(); - s[1] = GetValidString(); - s[2] = GetValidString(); - - return s; - } - - static String[] GetInvalidArray() - { - String[] s = new String[3]; - - s[0] = GetInvalidString(); - s[1] = GetInvalidString(); - s[2] = GetInvalidString(); - - return s; - } - - static void testLPStrBufferArray() - { - String[] s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(s), "[Error] Location tlpsba1"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(s), "[Error] Location tlpsba2"); - - s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref s), "[Error] Location tlpsba3"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref s), "[Error] Location tlpsba4"); - - s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref s), "[Error] Location tlpsba5"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref s), "[Error] Location tlpsba6"); - } - - static void testLPStrBufferClass() - { - LPStrTestClass sClass = new LPStrTestClass(); - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(sClass), "[Error] Location tlpbc1"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(sClass), "[Error] Location tlpbc2"); - - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref sClass), "[Error] Location tlpbc3"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref sClass), "[Error] Location tlpbc4"); - - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref sClass), "[Error] Location tlpbc5"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref sClass), "[Error] Location tlpbc6"); - } - - static void testLPStrBufferArrayOfStructs() - { - LPStrTestStruct[] lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos1"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos2"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos3"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos4"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos5"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos6"); - } - - static void runTest() - { - testLPStrBufferString(); - testLPStrBufferStringBuilder(); - testLPStrBufferStruct(); - testLPStrBufferArray(); - testLPStrBufferClass(); - testLPStrBufferArrayOfStructs(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } catch (Exception e){ - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/ATT_PFF/ATT_PFF.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/ATT_PFF/ATT_PFF.cs deleted file mode 100644 index 227b7e010ac7..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/ATT_PFF/ATT_PFF.cs +++ /dev/null @@ -1,354 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(true, ThrowOnUnmappableChar = true)] - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(false, ThrowOnUnmappableChar = false)] -public struct LPStrTestStruct -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(false, ThrowOnUnmappableChar = false)] -public class LPStrTestClass -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -public class BFM_LPStrMarshaler -{ -#pragma warning disable 618 - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_String([In][MarshalAs(UnmanagedType.LPStr)]String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_String([In][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_String([In, Out][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_StringBuilder([In, Out][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Struct_String([In][MarshalAs(UnmanagedType.Struct)]LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Struct_String([In][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Struct_String([In, Out][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Array_String([In][MarshalAs(UnmanagedType.LPArray)]String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Array_String([In][MarshalAs(UnmanagedType.LPArray)]ref String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Array_String([In, Out][MarshalAs(UnmanagedType.LPArray)]ref String[] Array); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Class_String([In, Out][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Array_Struct([In, Out][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); -#pragma warning restore 618 - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static void testLPStrBufferString() - { - Assert.IsTrue(LPStrBuffer_In_String(GetInvalidString()), "[Error] Location tlpsbs1"); - - Assert.IsTrue(LPStrBuffer_In_String(GetValidString()), "[Error] Location tlpsbs2"); - - String cTemp = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs3"); - - cTemp = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs4"); - - cTemp = GetInvalidString(); - String cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs5"); - Assert.AreNotEqual(cTempClone, cTemp, "[Error] Location tlpsbs6"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs7"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tlpsbs6"); - } - - static void testLPStrBufferStringBuilder() - { - StringBuilder sb = GetInvalidStringBuilder(); - Assert.IsTrue(LPStrBuffer_In_StringBuilder(sb), "[Error] Location tlpsbsb1"); - - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tlpsbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb3"); - - cTemp = GetValidStringBuilder(); - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb4"); - - cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb5"); - Assert.AreNotEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb6"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb7"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb8"); - } - - static LPStrTestStruct GetInvalidStruct() - { - LPStrTestStruct inValidStruct = new LPStrTestStruct(); - inValidStruct.str = GetInvalidString(); - - return inValidStruct; - } - - - static LPStrTestStruct GetValidStruct() - { - LPStrTestStruct validStruct = new LPStrTestStruct(); - validStruct.str = GetValidString(); - - return validStruct; - } - - static String[] GetValidArray() - { - String[] s = new String[3]; - - s[0] = GetValidString(); - s[1] = GetValidString(); - s[2] = GetValidString(); - - return s; - } - - static String[] GetInvalidArray() - { - String[] s = new String[3]; - - s[0] = GetInvalidString(); - s[1] = GetInvalidString(); - s[2] = GetInvalidString(); - - return s; - } - - static void testLPStrBufferStruct() - { - LPStrTestStruct lpss = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_In_Struct_String(lpss), "[Error] Location tlpsbst1"); - - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetValidStruct()), "[Error] Location tlpsbst2"); - - LPStrTestStruct cTemp = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst3"); - - cTemp = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst4"); - - cTemp = GetInvalidStruct(); - LPStrTestStruct cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst5"); - Assert.AreNotEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbsqt6"); - - cTemp = GetValidStruct(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst7"); - Assert.AreEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbst8"); - } - - static void testLPStrBufferClass() - { - LPStrTestClass lpss = new LPStrTestClass(); - lpss.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(lpss), "[Error] Location tlpsbc1"); - - lpss.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(lpss), "[Error] Location tlpsbc2"); - - LPStrTestClass cTemp = new LPStrTestClass(); - cTemp.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref cTemp), "[Error] Location tlpsbc3"); - - cTemp.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref cTemp), "[Error] Location tlpsbc4"); - - cTemp.str = GetInvalidString(); - LPStrTestClass cTempClone = new LPStrTestClass(); - cTempClone.str = cTemp.str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref cTemp), "[Error] Location tlpsbc5"); - Assert.AreNotEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbc6"); - - cTemp.str = GetValidString(); - cTempClone.str = cTemp.str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref cTemp), "[Error] Location tlpsbc7"); - Assert.AreEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbc8"); - } - - static void testLPStrBufferArray() - { - String[] lpss = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(lpss), "[Error] Location tlpsba1"); - - Assert.IsTrue(LPStrBuffer_In_Array_String(GetValidArray()), "[Error] Location tlpsba2"); - - String[] cTemp = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref cTemp), "[Error] Location tlpsba3"); - - cTemp = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref cTemp), "[Error] Location tlpsba4"); - - cTemp = GetInvalidArray(); - String[] cTempClone = new String[3]; - cTempClone[0] = cTemp[0]; - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref cTemp), "[Error] Location tlpsba5"); - Assert.AreNotEqual(cTempClone[0], cTemp[0], "[Error] Location tlpsba6"); - - cTemp = GetValidArray(); - cTempClone[0] = cTemp[0]; - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref cTemp), "[Error] Location tlpsba7"); - Assert.AreEqual(cTempClone[0], cTemp[0], "[Error] Location tlpsba8"); - } - - static void testLPStrBufferArrayOfStructs() - { - LPStrTestStruct[] lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos1"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos2"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos3"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos4"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - LPStrTestStruct[] lpssClone = new LPStrTestStruct[2]; - lpssClone[0].str = lpss[0].str; - lpssClone[1].str = lpss[1].str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos5"); - Assert.AreNotEqual(lpssClone[0].str, lpss[0].str, "[Error] Location tlpsbaos6"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - lpssClone = new LPStrTestStruct[2]; - lpssClone[0].str = lpss[0].str; - lpssClone[1].str = lpss[1].str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos7"); - Assert.AreEqual(lpssClone[0].str, lpss[0].str, "[Error] Location tlpsbaos8"); - } - - static void runTest() - { - testLPStrBufferString(); - testLPStrBufferStringBuilder(); - testLPStrBufferStruct(); - testLPStrBufferArray(); - testLPStrBufferClass(); - testLPStrBufferArrayOfStructs(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } catch (Exception e){ - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/ATT_PFT/ATT_PFT.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/ATT_PFT/ATT_PFT.cs deleted file mode 100644 index 943f4597af9d..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/ATT_PFT/ATT_PFT.cs +++ /dev/null @@ -1,343 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(true, ThrowOnUnmappableChar = true)] - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(false, ThrowOnUnmappableChar = true)] -public struct LPStrTestStruct -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(false, ThrowOnUnmappableChar = true)] -public class LPStrTestClass -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -public class BFM_LPStrMarshaler -{ -#pragma warning disable 618 - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_String([In][MarshalAs(UnmanagedType.LPStr)]String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_String([In][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_String([In, Out][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_StringBuilder([In, Out][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Struct_String([In][MarshalAs(UnmanagedType.Struct)]LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Struct_String([In][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Struct_String([In, Out][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Array_String([In][MarshalAs(UnmanagedType.LPArray)]String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Array_String([In][MarshalAs(UnmanagedType.LPArray)]ref String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Array_String([In, Out][MarshalAs(UnmanagedType.LPArray)]ref String[] Array); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Class_String([In, Out][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Array_Struct([In, Out][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); -#pragma warning restore 618 - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static void testLPStrBufferString() - { - Assert.Throws(() => LPStrBuffer_In_String(GetInvalidString()), "[Error] Location tlpsbs1"); - - Assert.IsTrue(LPStrBuffer_In_String(GetValidString()), "[Error] Location tlpsbs2"); - - String cTemp = GetInvalidString(); - Assert.Throws(() => LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs3"); - - cTemp = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs4"); - - cTemp = GetInvalidString(); - Assert.Throws(() => LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs5"); - - cTemp = GetValidString(); - String cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs6"); - - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tlpsbs7"); - } - - static void testLPStrBufferStringBuilder() - { - Assert.Throws(() => LPStrBuffer_In_StringBuilder(GetInvalidStringBuilder()), "[Error] Location tlpsbsb1"); - - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tlpsbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - Assert.Throws(() => LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb3"); - - cTemp = GetValidStringBuilder(); - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb4"); - - cTemp = GetInvalidStringBuilder(); - Assert.Throws(() => LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb5"); - - cTemp = GetValidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb6"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb7"); - } - - static LPStrTestStruct GetInvalidStruct() - { - LPStrTestStruct inValidStruct = new LPStrTestStruct(); - inValidStruct.str = GetInvalidString(); - - return inValidStruct; - } - - static LPStrTestStruct GetValidStruct() - { - LPStrTestStruct validStruct = new LPStrTestStruct(); - validStruct.str = GetValidString(); - - return validStruct; - } - - static String[] GetValidArray() - { - String[] s = new String[3]; - - s[0] = GetValidString(); - s[1] = GetValidString(); - s[2] = GetValidString(); - - return s; - } - - static String[] GetInvalidArray() - { - String[] s = new String[3]; - - s[0] = GetInvalidString(); - s[1] = GetInvalidString(); - s[2] = GetInvalidString(); - - return s; - } - - static void testLPStrBufferStruct() - { - Assert.Throws(() => LPStrBuffer_In_Struct_String(GetInvalidStruct()), "[Error] Location tlpsbst1"); - - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetValidStruct()), "[Error] Location tlpsbst2"); - - LPStrTestStruct cTemp = GetInvalidStruct(); - Assert.Throws(() => LPStrBuffer_InByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst3"); - - cTemp = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst4"); - - cTemp = GetInvalidStruct(); - Assert.Throws(() => LPStrBuffer_InOutByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst5"); - - cTemp = GetValidStruct(); - LPStrTestStruct cTempClone = new LPStrTestStruct(); - cTempClone.str = cTemp.str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst6"); - Assert.AreEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbst7"); - } - - static void testLPStrBufferClass() - { - LPStrTestClass cTest = new LPStrTestClass(); - cTest.str = GetInvalidString(); - Assert.Throws(() => LPStrBuffer_In_Class_String(cTest), "[Error] Location tlpsbc1"); - - cTest.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(cTest), "[Error] Location tlpsbc2"); - - LPStrTestClass cTemp = new LPStrTestClass(); - cTemp.str = GetInvalidString(); - Assert.Throws(() => LPStrBuffer_InByRef_Class_String(ref cTemp), "[Error] Location tlpsbc3"); - - cTemp.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref cTemp), "[Error] Location tlpsbc4"); - - cTemp.str = GetInvalidString(); - Assert.Throws(() => LPStrBuffer_InOutByRef_Class_String(ref cTemp), "[Error] Location tlpsbc5"); - - cTemp.str = GetValidString(); - LPStrTestClass cTempClone = new LPStrTestClass(); - cTempClone.str = cTemp.str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref cTemp), "[Error] Location tlpsbc6"); - Assert.AreEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbc7"); - } - - static void testLPStrBufferArray() - { - String[] cTest = null; - cTest = GetInvalidArray(); - Assert.Throws(() => LPStrBuffer_In_Array_String(cTest), "[Error] Location tlpsba1"); - - cTest = GetValidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(cTest), "[Error] Location tlpsba2"); - - String[] cTemp = GetInvalidArray(); - Assert.Throws(() => LPStrBuffer_InByRef_Array_String(ref cTemp), "[Error] Location tlpsba3"); - - cTemp = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref cTemp), "[Error] Location tlpsba4"); - - cTemp = GetInvalidArray(); - Assert.Throws(() => LPStrBuffer_InOutByRef_Array_String(ref cTemp), "[Error] Location tlpsba5"); - - cTemp = GetValidArray(); - String[] cTempClone = new String[3]; - cTempClone[0] = cTemp[0]; - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref cTemp), "[Error] Location tlpsba6"); - Assert.AreEqual(cTempClone[0], cTemp[0], "[Error] Location tlpsba7"); - } - - static void testLPStrBufferArrayOfStructs() - { - LPStrTestStruct[] lpss = null; - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.Throws(() => LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos1"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos2"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.Throws(() => LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos3"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos4"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.Throws(() => LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos5"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - - LPStrTestStruct[] lpssClone = new LPStrTestStruct[2]; - lpssClone[0].str = lpss[0].str; - lpssClone[1].str = lpss[1].str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos6"); - Assert.AreEqual(lpss[0].str, lpssClone[0].str, "[Error] Location tlpsbaos7"); - } - - static void runTest() - { - testLPStrBufferString(); - testLPStrBufferStringBuilder(); - testLPStrBufferStruct(); - testLPStrBufferArray(); - testLPStrBufferClass(); - testLPStrBufferArrayOfStructs(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } catch (Exception e){ - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/ATT_PTF/ATT_PTF.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/ATT_PTF/ATT_PTF.cs deleted file mode 100644 index 8d7f542455e1..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/ATT_PTF/ATT_PTF.cs +++ /dev/null @@ -1,338 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(true, ThrowOnUnmappableChar = true)] - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(true, ThrowOnUnmappableChar = false)] -public struct LPStrTestStruct -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(true, ThrowOnUnmappableChar = false)] -public class LPStrTestClass -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -public class BFM_LPStrMarshaler -{ -#pragma warning disable 618 - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_String([In][MarshalAs(UnmanagedType.LPStr)]String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_String([In][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_String([In, Out][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_StringBuilder([In, Out][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Struct_String([In][MarshalAs(UnmanagedType.Struct)]LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Struct_String([In][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Struct_String([In, Out][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Array_String([In][MarshalAs(UnmanagedType.LPArray)]String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Array_String([In][MarshalAs(UnmanagedType.LPArray)]ref String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Array_String([In, Out][MarshalAs(UnmanagedType.LPArray)]ref String[] Array); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Class_String([In, Out][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Array_Struct([In, Out][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); -#pragma warning restore 618 - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static void testLPStrBufferString() - { - Assert.IsTrue(LPStrBuffer_In_String(GetInvalidString()), "[Error] Location tlpsbs1"); - - Assert.IsTrue(LPStrBuffer_In_String(GetValidString()), "[Error] Location tlpsbs2"); - - String cTemp = GetInvalidString(); - String cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs3"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tlpsbs4"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs5"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tlpsbs6"); - - cTemp = GetInvalidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs7"); - Assert.AreNotEqual(cTempClone, cTemp, "[Error] Location tlpsbs8"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs9"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tlpsbs10"); - } - - static void testLPStrBufferStringBuilder() - { - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetInvalidStringBuilder()), "[Error] Location tlpsbsb1"); - - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tlpsbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb3"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb4"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb5"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb6"); - - cTemp = GetInvalidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb7"); - Assert.AreNotEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb8"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb9"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb10"); - } - - static LPStrTestStruct GetInvalidStruct() - { - LPStrTestStruct inValidStruct = new LPStrTestStruct(); - inValidStruct.str = GetInvalidString(); - - return inValidStruct; - } - - - static LPStrTestStruct GetValidStruct() - { - LPStrTestStruct validStruct = new LPStrTestStruct(); - validStruct.str = GetValidString(); - - return validStruct; - } - - static void testLPStrBufferStruct() - { - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetInvalidStruct()), "[Error] Location tlpsbst1"); - - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetValidStruct()), "[Error] Location tlpsbst2"); - - LPStrTestStruct lpss = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref lpss), "[Error] Location tlpsbst3"); - - lpss = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref lpss), "[Error] Location tlpsbst4"); - - lpss = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref lpss), "[Error] Location tlpsbst5"); - - lpss = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref lpss), "[Error] Location tlpsbst6"); - } - - static String[] GetValidArray() - { - String[] s = new String[3]; - - s[0] = GetValidString(); - s[1] = GetValidString(); - s[2] = GetValidString(); - - return s; - } - - static String[] GetInvalidArray() - { - String[] s = new String[3]; - - s[0] = GetInvalidString(); - s[1] = GetInvalidString(); - s[2] = GetInvalidString(); - - return s; - } - - static void testLPStrBufferArray() - { - String[] s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(s), "[Error] Location tlpsba1"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(s), "[Error] Location tlpsba2"); - - s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref s), "[Error] Location tlpsba3"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref s), "[Error] Location tlpsba4"); - - s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref s), "[Error] Location tlpsba5"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref s), "[Error] Location tlpsba6"); - } - - static void testLPStrBufferClass() - { - LPStrTestClass sClass = new LPStrTestClass(); - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(sClass), "[Error] Location tlpbc1"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(sClass), "[Error] Location tlpbc2"); - - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref sClass), "[Error] Location tlpbc3"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref sClass), "[Error] Location tlpbc4"); - - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref sClass), "[Error] Location tlpbc5"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref sClass), "[Error] Location tlpbc6"); - } - - static void testLPStrBufferArrayOfStructs() - { - LPStrTestStruct[] lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos1"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos2"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos3"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos4"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos5"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos6"); - } - - static void runTest() - { - testLPStrBufferString(); - testLPStrBufferStringBuilder(); - testLPStrBufferStruct(); - testLPStrBufferArray(); - testLPStrBufferClass(); - testLPStrBufferArrayOfStructs(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } catch (Exception e){ - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/ATT_PTT/ATT_PTT.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/ATT_PTT/ATT_PTT.cs deleted file mode 100644 index 7234ac34b958..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/ATT_PTT/ATT_PTT.cs +++ /dev/null @@ -1,331 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(true, ThrowOnUnmappableChar = true)] - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(true, ThrowOnUnmappableChar = true)] -public struct LPStrTestStruct -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(true, ThrowOnUnmappableChar = true)] -public class LPStrTestClass -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -public class BFM_LPStrMarshaler -{ -#pragma warning disable 618 - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_String([In][MarshalAs(UnmanagedType.LPStr)]String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_String([In][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_String([In, Out][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_StringBuilder([In, Out][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Struct_String([In][MarshalAs(UnmanagedType.Struct)]LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Struct_String([In][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Struct_String([In, Out][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Array_String([In][MarshalAs(UnmanagedType.LPArray)]String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Array_String([In][MarshalAs(UnmanagedType.LPArray)]ref String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Array_String([In, Out][MarshalAs(UnmanagedType.LPArray)]ref String[] Array); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Class_String([In, Out][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Array_Struct([In, Out][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); -#pragma warning restore 618 - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - //sbl.Append ('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - //sbl.Append ('乀'); - return sbl; - } - - static void testLPStrBufferString() - { - Assert.IsTrue(LPStrBuffer_In_String(GetInvalidString()), "[Error] Location tlpsbs1"); - - Assert.IsTrue(LPStrBuffer_In_String(GetValidString()), "[Error] Location tlpsbs2"); - - String cTemp = GetInvalidString(); - String cTempClone = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs3"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs4"); - - cTemp = GetInvalidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs5"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs6"); - } - - static void testLPStrBufferStringBuilder() - { - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetInvalidStringBuilder()), "[Error] Location tlpsbsb1"); - - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tlpsbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb3"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb4"); - - cTemp = GetInvalidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb5"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb6"); - } - - static LPStrTestStruct GetInvalidStruct() - { - LPStrTestStruct inValidStruct = new LPStrTestStruct(); - inValidStruct.str = GetInvalidString(); - - return inValidStruct; - } - - static LPStrTestStruct GetValidStruct() - { - LPStrTestStruct validStruct = new LPStrTestStruct(); - validStruct.str = GetValidString(); - - return validStruct; - } - - static void testLPStrBufferStruct() - { - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetInvalidStruct()), "[Error] Location tlpsbst1"); - - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetValidStruct()), "[Error] Location tlpsbst2"); - - LPStrTestStruct lpss = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref lpss), "[Error] Location tlpsbst3"); - - lpss = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref lpss), "[Error] Location tlpsbst4"); - - lpss = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref lpss), "[Error] Location tlpsbst5"); - - lpss = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref lpss), "[Error] Location tlpsbst6"); - } - - static String[] GetValidArray() - { - String[] s = new String[3]; - - s[0] = GetValidString(); - s[1] = GetValidString(); - s[2] = GetValidString(); - - return s; - } - - static String[] GetInvalidArray() - { - String[] s = new String[3]; - - s[0] = GetInvalidString(); - s[1] = GetInvalidString(); - s[2] = GetInvalidString(); - - return s; - } - - static void testLPStrBufferArray() - { - String[] s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(s), "[Error] Location tlpsba1"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(s), "[Error] Location tlpsba2"); - - s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref s), "[Error] Location tlpsba3"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref s), "[Error] Location tlpsba4"); - - s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref s), "[Error] Location tlpsba5"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref s), "[Error] Location tlpsba6"); - } - - static void testLPStrBufferClass() - { - LPStrTestClass sClass = new LPStrTestClass(); - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(sClass), "[Error] Location tlpbc1"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(sClass), "[Error] Location tlpbc2"); - - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref sClass), "[Error] Location tlpbc3"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref sClass), "[Error] Location tlpbc4"); - - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref sClass), "[Error] Location tlpbc5"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref sClass), "[Error] Location tlpbc6"); - } - - static void testLPStrBufferArrayOfStructs() - { - LPStrTestStruct[] lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos1"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos2"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos3"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos4"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos5"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos6"); - } - - static void runTest() - { - testLPStrBufferString(); - testLPStrBufferStringBuilder(); - testLPStrBufferStruct(); - testLPStrBufferArray(); - testLPStrBufferClass(); - testLPStrBufferArrayOfStructs(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } catch (Exception e){ - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/Assembly_False_False/Assembly_False_False.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/Assembly_False_False/Assembly_False_False.cs deleted file mode 100644 index 7432475c243e..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/Assembly_False_False/Assembly_False_False.cs +++ /dev/null @@ -1,349 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(false, ThrowOnUnmappableChar = false)] - -[StructLayout(LayoutKind.Sequential)] -public struct LPStrTestStruct -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -[StructLayout(LayoutKind.Sequential)] -public class LPStrTestClass -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -public class BFM_LPStrMarshaler -{ -#pragma warning disable 618 - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_In_String([In][MarshalAs(UnmanagedType.LPStr)]String s); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InByRef_String([In][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InOutByRef_String([In, Out][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_In_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InByRef_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InOutByRef_StringBuilder([In, Out][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_In_Struct_String([In][MarshalAs(UnmanagedType.Struct)]LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InByRef_Struct_String([In][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InOutByRef_Struct_String([In, Out][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_In_Array_String([In][MarshalAs(UnmanagedType.LPArray)]String[] strArray); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InByRef_Array_String([In][MarshalAs(UnmanagedType.LPArray)]ref String[] strArray); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InOutByRef_Array_String([In, Out][MarshalAs(UnmanagedType.LPArray)]ref String[] Array); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_In_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InByRef_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InOutByRef_Class_String([In, Out][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_In_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InByRef_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InOutByRef_Array_Struct([In, Out][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); -#pragma warning restore 618 - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static void testLPStrBufferString() - { - Assert.IsTrue(LPStrBuffer_In_String(GetInvalidString()), "[Error] Location tlpsbs1"); - Assert.IsTrue(LPStrBuffer_In_String(GetValidString()), "[Error] Location tlpsbs2"); - - String cTemp = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs3"); - - cTemp = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs4"); - - cTemp = GetInvalidString(); - String cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs5"); - Assert.AreNotEqual(cTempClone, cTemp, "[Error] Location tlpsbs6"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs7"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tlpsbs8"); - } - - static void testLPStrBufferStringBuilder() - { - StringBuilder sb = GetInvalidStringBuilder(); - Assert.IsTrue(LPStrBuffer_In_StringBuilder(sb), "[Error] Location tlpsbsb1"); - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tlpsbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb3"); - - cTemp = GetValidStringBuilder(); - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb4"); - - cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb5"); - Assert.AreNotEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb6"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb7"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb8"); - } - - static LPStrTestStruct GetInvalidStruct() - { - LPStrTestStruct inValidStruct = new LPStrTestStruct(); - inValidStruct.str = GetInvalidString(); - - return inValidStruct; - } - - static LPStrTestStruct GetValidStruct() - { - LPStrTestStruct validStruct = new LPStrTestStruct(); - validStruct.str = GetValidString(); - - return validStruct; - } - - static String[] GetValidArray() - { - String[] s = new String[3]; - - s[0] = GetValidString(); - s[1] = GetValidString(); - s[2] = GetValidString(); - - return s; - } - - static String[] GetInvalidArray() - { - String[] s = new String[3]; - - s[0] = GetInvalidString(); - s[1] = GetInvalidString(); - s[2] = GetInvalidString(); - - return s; - } - - static void testLPStrBufferStruct() - { - LPStrTestStruct lpss = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_In_Struct_String(lpss), "[Error] Location tlpsbst1"); - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetValidStruct()), "[Error] Location tlpsbst2"); - - LPStrTestStruct cTemp = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst3"); - - cTemp = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst4"); - - cTemp = GetInvalidStruct(); - LPStrTestStruct cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst5"); - Assert.AreNotEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbst6"); - - cTemp = GetValidStruct(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst7"); - Assert.AreEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbst8"); - } - - static void testLPStrBufferClass() - { - LPStrTestClass lpss = new LPStrTestClass(); - lpss.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(lpss), "[Error] Location tlpsbc1"); - - lpss.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(lpss), "[Error] Location tlpsbc2"); - - LPStrTestClass cTemp = new LPStrTestClass(); - cTemp.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref cTemp), "[Error] Location tlpsbc3"); - - cTemp.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref cTemp), "[Error] Location tlpsbc4"); - - cTemp.str = GetInvalidString(); - LPStrTestClass cTempClone = new LPStrTestClass(); - cTempClone.str = cTemp.str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref cTemp), "[Error] Location tlpsbc5"); - Assert.AreNotEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbc6"); - - cTemp.str = GetValidString(); - cTempClone.str = cTemp.str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref cTemp), "[Error] Location tlpsbc7"); - Assert.AreEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbc8"); - } - - static void testLPStrBufferArray() - { - String[] lpss = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(lpss), "[Error] Location tlpsba1"); - Assert.IsTrue(LPStrBuffer_In_Array_String(GetValidArray()), "[Error] Location tlpsba2"); - - String[] cTemp = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref cTemp), "[Error] Location tlpsba3"); - - cTemp = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref cTemp), "[Error] Location tlpsba4"); - - cTemp = GetInvalidArray(); - String[] cTempClone = new String[3]; - cTempClone[0] = cTemp[0]; - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref cTemp), "[Error] Location tlpsba5"); - Assert.AreNotEqual(cTempClone[0], cTemp[0], "[Error] Location tlpsba6"); - - cTemp = GetValidArray(); - cTempClone[0] = cTemp[0]; - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref cTemp), "[Error] Location tlpsba7"); - Assert.AreEqual(cTempClone[0], cTemp[0], "[Error] Location tlpsba8"); - } - - static void testLPStrBufferArrayOfStructs() - { - LPStrTestStruct[] lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos1"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos2"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos3"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos4"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - LPStrTestStruct[] lpssClone = new LPStrTestStruct[2]; - lpssClone[0].str = lpss[0].str; - lpssClone[1].str = lpss[1].str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos5"); - Assert.AreNotEqual(lpss[0].str, lpssClone[0].str, "[Error] Location tlpsbaos6"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - lpssClone = new LPStrTestStruct[2]; - lpssClone[0].str = lpss[0].str; - lpssClone[1].str = lpss[1].str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos7"); - Assert.AreEqual(lpss[0].str, lpssClone[0].str , "[Error] Location tlpsbaos8"); - } - - static void runTest() - { - testLPStrBufferString(); - testLPStrBufferStringBuilder(); - testLPStrBufferStruct(); - testLPStrBufferArray(); - testLPStrBufferClass(); - testLPStrBufferArrayOfStructs(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } - catch (Exception e) - { - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/Assembly_False_True/Assembly_False_True.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/Assembly_False_True/Assembly_False_True.cs deleted file mode 100644 index 83fad7cb2c55..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/Assembly_False_True/Assembly_False_True.cs +++ /dev/null @@ -1,338 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(false, ThrowOnUnmappableChar = true)] - -[StructLayout(LayoutKind.Sequential)] -public struct LPStrTestStruct -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -[StructLayout(LayoutKind.Sequential)] -public class LPStrTestClass -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -public class BFM_LPStrMarshaler -{ -#pragma warning disable 618 - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_In_String([In][MarshalAs(UnmanagedType.LPStr)]String s); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InByRef_String([In][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InOutByRef_String([In, Out][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_In_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InByRef_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InOutByRef_StringBuilder([In, Out][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_In_Struct_String([In][MarshalAs(UnmanagedType.Struct)]LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InByRef_Struct_String([In][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InOutByRef_Struct_String([In, Out][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_In_Array_String([In][MarshalAs(UnmanagedType.LPArray)]String[] strArray); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InByRef_Array_String([In][MarshalAs(UnmanagedType.LPArray)]ref String[] strArray); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InOutByRef_Array_String([In, Out][MarshalAs(UnmanagedType.LPArray)]ref String[] Array); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_In_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InByRef_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InOutByRef_Class_String([In, Out][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_In_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InByRef_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InOutByRef_Array_Struct([In, Out][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); -#pragma warning restore 618 - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static void testLPStrBufferString() - { - Assert.Throws(() => LPStrBuffer_In_String(GetInvalidString()), "[Error] Location tlpsbs1"); - Assert.IsTrue(LPStrBuffer_In_String(GetValidString()), "[Error] Location tlpsbs2"); - - String cTemp = GetInvalidString(); - Assert.Throws(() => LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs3"); - - cTemp = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs4"); - - cTemp = GetInvalidString(); - Assert.Throws(() => LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs5"); - - cTemp = GetValidString(); - String cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs6"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tlpsbs7"); - } - - static void testLPStrBufferStringBuilder() - { - Assert.Throws(() => LPStrBuffer_In_StringBuilder(GetInvalidStringBuilder()), "[Error] Location tlpsbsb1"); - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tlpsbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - Assert.Throws(() => LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb3"); - - cTemp = GetValidStringBuilder(); - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb4"); - - cTemp = GetInvalidStringBuilder(); - Assert.Throws(() => LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb5"); - - cTemp = GetValidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb6"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString() , "[Error] Location tlpsbsb7"); - } - - static LPStrTestStruct GetInvalidStruct() - { - LPStrTestStruct inValidStruct = new LPStrTestStruct(); - inValidStruct.str = GetInvalidString(); - - return inValidStruct; - } - - static LPStrTestStruct GetValidStruct() - { - LPStrTestStruct validStruct = new LPStrTestStruct(); - validStruct.str = GetValidString(); - - return validStruct; - } - - static String[] GetValidArray() - { - String[] s = new String[3]; - - s[0] = GetValidString(); - s[1] = GetValidString(); - s[2] = GetValidString(); - - return s; - } - - static String[] GetInvalidArray() - { - String[] s = new String[3]; - - s[0] = GetInvalidString(); - s[1] = GetInvalidString(); - s[2] = GetInvalidString(); - - return s; - } - - static void testLPStrBufferStruct() - { - Assert.Throws(() => LPStrBuffer_In_Struct_String(GetInvalidStruct()), "[Error] Location tlpsbst1"); - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetValidStruct()), "[Error] Location tlpsbst2"); - - LPStrTestStruct cTemp = GetInvalidStruct(); - Assert.Throws(() => LPStrBuffer_InByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst3"); - - cTemp = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst4"); - - cTemp = GetInvalidStruct(); - Assert.Throws(() => LPStrBuffer_InOutByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst5"); - - cTemp = GetValidStruct(); - LPStrTestStruct cTempClone = new LPStrTestStruct(); - cTempClone.str = cTemp.str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst6"); - Assert.AreEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbst7"); - } - - static void testLPStrBufferClass() - { - LPStrTestClass cTest = new LPStrTestClass(); - cTest.str = GetInvalidString(); - Assert.Throws(() => LPStrBuffer_In_Class_String(cTest), "[Error] Location tlpsbc1"); - - cTest.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(cTest), "[Error] Location tlpsbc2"); - - LPStrTestClass cTemp = new LPStrTestClass(); - cTemp.str = GetInvalidString(); - Assert.Throws(() => LPStrBuffer_InByRef_Class_String(ref cTemp), "[Error] Location tlpsbc3"); - - cTemp.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref cTemp), "[Error] Location tlpsbc4"); - - cTemp.str = GetInvalidString(); - Assert.Throws(() => LPStrBuffer_InOutByRef_Class_String(ref cTemp), "[Error] Location tlpsbc5"); - - cTemp.str = GetValidString(); - LPStrTestClass cTempClone = new LPStrTestClass(); - cTempClone.str = cTemp.str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref cTemp), "[Error] Location tlpsbc6"); - Assert.AreEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbc7"); - } - - static void testLPStrBufferArray() - { - String[] cTest = null; - cTest = GetInvalidArray(); - Assert.Throws(() => LPStrBuffer_In_Array_String(cTest), "[Error] Location tlpsba1"); - - cTest = GetValidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(cTest), "[Error] Location tlpsba2"); - - String[] cTemp = GetInvalidArray(); - Assert.Throws(() => LPStrBuffer_InByRef_Array_String(ref cTemp), "[Error] Location tlpsba3"); - - cTemp = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref cTemp), "[Error] Location tlpsba4"); - - cTemp = GetInvalidArray(); - Assert.Throws(() => LPStrBuffer_InOutByRef_Array_String(ref cTemp), "[Error] Location tlpsba5"); - - cTemp = GetValidArray(); - String[] cTempClone = new String[3]; - cTempClone[0] = cTemp[0]; - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref cTemp), "[Error] Location tlpsba6"); - Assert.AreEqual(cTempClone[0], cTemp[0], "[Error] Location tlpsba7"); - } - - static void testLPStrBufferArrayOfStructs() - { - LPStrTestStruct[] lpss = null; - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.Throws(() => LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos1"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos2"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.Throws(() => LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos3"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos4"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.Throws(() => LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos5"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - LPStrTestStruct[] lpssClone = new LPStrTestStruct[2]; - lpssClone[0].str = lpss[0].str; - lpssClone[1].str = lpss[1].str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos6"); - Assert.AreEqual(lpss[0].str, lpssClone[0].str, "[Error] Location tlpsbaos7"); - } - - static void runTest() - { - testLPStrBufferString(); - testLPStrBufferStringBuilder(); - testLPStrBufferStruct(); - testLPStrBufferArray(); - testLPStrBufferClass(); - testLPStrBufferArrayOfStructs(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } - catch (Exception e) - { - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/Assembly_True_False/Assembly_True_False.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/Assembly_True_False/Assembly_True_False.cs deleted file mode 100644 index 4212fcfb9c78..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/Assembly_True_False/Assembly_True_False.cs +++ /dev/null @@ -1,334 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(true, ThrowOnUnmappableChar = false)] - -[StructLayout(LayoutKind.Sequential)] -public struct LPStrTestStruct -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -[StructLayout(LayoutKind.Sequential)] -public class LPStrTestClass -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -public class BFM_LPStrMarshaler -{ -#pragma warning disable 618 - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_In_String([In][MarshalAs(UnmanagedType.LPStr)]String s); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InByRef_String([In][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InOutByRef_String([In, Out][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_In_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InByRef_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InOutByRef_StringBuilder([In, Out][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_In_Struct_String([In][MarshalAs(UnmanagedType.Struct)]LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InByRef_Struct_String([In][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InOutByRef_Struct_String([In, Out][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_In_Array_String([In][MarshalAs(UnmanagedType.LPArray)]String[] strArray); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InByRef_Array_String([In][MarshalAs(UnmanagedType.LPArray)]ref String[] strArray); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InOutByRef_Array_String([In, Out][MarshalAs(UnmanagedType.LPArray)]ref String[] Array); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_In_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InByRef_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InOutByRef_Class_String([In, Out][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_In_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InByRef_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InOutByRef_Array_Struct([In, Out][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); -#pragma warning restore 618 - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static void testLPStrBufferString() - { - Assert.IsTrue(LPStrBuffer_In_String(GetInvalidString()), "[Error] Location tlpsbs1"); - Assert.IsTrue(LPStrBuffer_In_String(GetValidString()), "[Error] Location tlpsbs2"); - - String cTemp = GetInvalidString(); - String cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs3"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tlpsbs4"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs5"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tlpsbs6"); - - cTemp = GetInvalidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs7"); - Assert.AreNotEqual(cTempClone, cTemp, "[Error] Location tlpsbs8"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs9"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tlpsbs10"); - } - - static void testLPStrBufferStringBuilder() - { - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetInvalidStringBuilder()), "[Error] Location tlpsbsb1"); - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tlpsbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb3"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb4"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb5"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb6"); - - cTemp = GetInvalidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb7"); - Assert.AreNotEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb8"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb9"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb10"); - } - - static LPStrTestStruct GetInvalidStruct() - { - LPStrTestStruct inValidStruct = new LPStrTestStruct(); - inValidStruct.str = GetInvalidString(); - - return inValidStruct; - } - - static LPStrTestStruct GetValidStruct() - { - LPStrTestStruct validStruct = new LPStrTestStruct(); - validStruct.str = GetValidString(); - - return validStruct; - } - - static void testLPStrBufferStruct() - { - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetInvalidStruct()), "[Error] Location tlpsbst1"); - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetValidStruct()), "[Error] Location tlpsbst2"); - - LPStrTestStruct lpss = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref lpss), "[Error] Location tlpsbst3"); - - lpss = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref lpss), "[Error] Location tlpsbst4"); - - lpss = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref lpss), "[Error] Location tlpsbst5"); - - lpss = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref lpss), "[Error] Location tlpsbst6"); - } - - static String[] GetValidArray() - { - String[] s = new String[3]; - - s[0] = GetValidString(); - s[1] = GetValidString(); - s[2] = GetValidString(); - - return s; - } - - static String[] GetInvalidArray() - { - String[] s = new String[3]; - - s[0] = GetInvalidString(); - s[1] = GetInvalidString(); - s[2] = GetInvalidString(); - - return s; - } - - static void testLPStrBufferArray() - { - String[] s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(s), "[Error] Location tlpsba1"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(s), "[Error] Location tlpsba2"); - - s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref s), "[Error] Location tlpsba3"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref s), "[Error] Location tlpsba4"); - - s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref s), "[Error] Location tlpsba5"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref s), "[Error] Location tlpsba6"); - } - - static void testLPStrBufferClass() - { - LPStrTestClass sClass = new LPStrTestClass(); - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(sClass), "[Error] Location tlpsbc1"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(sClass), "[Error] Location tlpsbc2"); - - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref sClass), "[Error] Location tlpsbc3"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref sClass), "[Error] Location tlpsbc4"); - - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref sClass), "[Error] Location tlpsbc5"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref sClass), "[Error] Location tlpsbc6"); - } - - static void testLPStrBufferArrayOfStructs() - { - LPStrTestStruct[] lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos1"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos2"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos3"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos4"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos5"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos6"); - } - - static void runTest() - { - testLPStrBufferString(); - testLPStrBufferStringBuilder(); - testLPStrBufferStruct(); - testLPStrBufferArray(); - testLPStrBufferClass(); - testLPStrBufferArrayOfStructs(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } - catch (Exception e) - { - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/Assembly_True_True/Assembly_True_True.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/Assembly_True_True/Assembly_True_True.cs deleted file mode 100644 index bf7818cf0ad7..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/Assembly_True_True/Assembly_True_True.cs +++ /dev/null @@ -1,330 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[assembly: BestFitMapping(true, ThrowOnUnmappableChar = true)] - -[StructLayout(LayoutKind.Sequential)] -//[BestFitMapping(true, ThrowOnUnmappableChar=true)] -public struct LPStrTestStruct -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -[StructLayout(LayoutKind.Sequential)] -//[BestFitMapping(true, ThrowOnUnmappableChar=true)] -public class LPStrTestClass -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -public class BFM_LPStrMarshaler -{ -#pragma warning disable 618 - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_In_String([In][MarshalAs(UnmanagedType.LPStr)]String s); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InByRef_String([In][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InOutByRef_String([In, Out][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_In_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InByRef_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InOutByRef_StringBuilder([In, Out][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_In_Struct_String([In][MarshalAs(UnmanagedType.Struct)]LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InByRef_Struct_String([In][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InOutByRef_Struct_String([In, Out][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_In_Array_String([In][MarshalAs(UnmanagedType.LPArray)]String[] strArray); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InByRef_Array_String([In][MarshalAs(UnmanagedType.LPArray)]ref String[] strArray); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InOutByRef_Array_String([In, Out][MarshalAs(UnmanagedType.LPArray)]ref String[] Array); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_In_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InByRef_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InOutByRef_Class_String([In, Out][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_In_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InByRef_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative")] - public static extern bool LPStrBuffer_InOutByRef_Array_Struct([In, Out][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); -#pragma warning restore 618 - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - //sbl.Append ('乀'); - - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - //sbl.Append ('乀'); - return sbl; - } - - static void testLPStrBufferString() - { - Assert.IsTrue(LPStrBuffer_In_String(GetInvalidString()), "[Error] Location tlpsbs1"); - Assert.IsTrue(LPStrBuffer_In_String(GetValidString()), "[Error] Location tlpsbs2"); - - String cTemp = GetInvalidString(); - String cTempClone = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs3"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs4"); - - cTemp = GetInvalidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs5"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs6"); - - } - - static void testLPStrBufferStringBuilder() - { - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetInvalidStringBuilder()), "[Error] Location tlpsbsb1"); - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tlpsbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb3"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb4"); - - cTemp = GetInvalidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb5"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb6"); - } - - static LPStrTestStruct GetInvalidStruct() - { - LPStrTestStruct inValidStruct = new LPStrTestStruct(); - inValidStruct.str = GetInvalidString(); - - return inValidStruct; - } - - static LPStrTestStruct GetValidStruct() - { - LPStrTestStruct validStruct = new LPStrTestStruct(); - validStruct.str = GetValidString(); - - return validStruct; - } - - static void testLPStrBufferStruct() - { - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetInvalidStruct()), "[Error] Location tlpsbst1"); - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetValidStruct()), "[Error] Location tlpsbst2"); - - LPStrTestStruct lpss = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref lpss), "[Error] Location tlpsbst3"); - - lpss = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref lpss), "[Error] Location tlpsbst4"); - - lpss = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref lpss), "[Error] Location tlpsbst5"); - - lpss = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref lpss), "[Error] Location tlpsbst6"); - } - - static String[] GetValidArray() - { - String[] s = new String[3]; - - s[0] = GetValidString(); - s[1] = GetValidString(); - s[2] = GetValidString(); - - return s; - } - - static String[] GetInvalidArray() - { - String[] s = new String[3]; - - s[0] = GetInvalidString(); - s[1] = GetInvalidString(); - s[2] = GetInvalidString(); - - return s; - } - - static void testLPStrBufferArray() - { - String[] s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(s), "[Error] Location tlpsba1"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(s), "[Error] Location tlpsba2"); - - s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref s), "[Error] Location tlpsba3"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref s), "[Error] Location tlpsba4"); - - s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref s), "[Error] Location tlpsba5"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref s), "[Error] Location tlpsba6"); - } - - static void testLPStrBufferClass() - { - LPStrTestClass sClass = new LPStrTestClass(); - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(sClass), "[Error] Location tlpsbc1"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(sClass), "[Error] Location tlpsbc2"); - - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref sClass), "[Error] Location tlpsbc3"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref sClass), "[Error] Location tlpsbc4"); - - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref sClass), "[Error] Location tlpsbc5"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref sClass), "[Error] Location tlpsbc6"); - } - - static void testLPStrBufferArrayOfStructs() - { - LPStrTestStruct[] lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos1"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos2"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos3"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos4"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos5"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos6"); - } - - static void runTest() - { - testLPStrBufferString(); - testLPStrBufferStringBuilder(); - testLPStrBufferStruct(); - testLPStrBufferArray(); - testLPStrBufferClass(); - testLPStrBufferArrayOfStructs(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } - catch (Exception e) - { - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/BestFitMappingNative.cpp b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/BestFitMappingNative.cpp deleted file mode 100644 index f5326f29407c..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/BestFitMappingNative.cpp +++ /dev/null @@ -1,146 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -#include -#include -#include -#include - -typedef struct TLPStr_Test_Struct -{ - LPSTR pStr; -} LPStr_Test_Struct; - -typedef struct TLPStr_Test_Class -{ - LPSTR pStr; -} LPStr_Test_Class; - -typedef struct TLPStrTestStructOfArrays -{ - LPSTR pStr1; - LPSTR pStr2; -} LPStrTestStructOfArrays; - -extern "C" bool DLL_EXPORT STDMETHODCALLTYPE LPStrBuffer_In_String(LPSTR pStr) -{ - printf ("xx %s \n", pStr); - - return TRUE; -} - -extern "C" bool DLL_EXPORT STDMETHODCALLTYPE LPStrBuffer_InByRef_String(LPSTR* ppStr) -{ - printf ("yy %s \n", *ppStr); - - return TRUE; -} - -extern "C" bool DLL_EXPORT STDMETHODCALLTYPE LPStrBuffer_InOutByRef_String(LPSTR* ppStr) -{ - printf ("zz %s \n", *ppStr); - - return TRUE; -} - -extern "C" bool DLL_EXPORT STDMETHODCALLTYPE LPStrBuffer_In_StringBuilder(LPSTR pStr) -{ - return TRUE; -} - -extern "C" bool DLL_EXPORT STDMETHODCALLTYPE LPStrBuffer_InByRef_StringBuilder(LPSTR* ppStr) -{ - return TRUE; -} - -extern "C" bool DLL_EXPORT STDMETHODCALLTYPE LPStrBuffer_InOutByRef_StringBuilder(LPSTR* ppStr) -{ - return TRUE; -} - -extern "C" bool DLL_EXPORT STDMETHODCALLTYPE LPStrBuffer_In_Struct_String (LPStr_Test_Struct strStruct) -{ - return TRUE; -} - -extern "C" bool DLL_EXPORT STDMETHODCALLTYPE LPStrBuffer_InByRef_Struct_String (LPStr_Test_Struct* pSstrStruct) -{ - return TRUE; -} - -extern "C" bool DLL_EXPORT STDMETHODCALLTYPE LPStrBuffer_InOutByRef_Struct_String (LPStr_Test_Struct* pStrStruct) -{ - return TRUE; -} - -extern "C" bool DLL_EXPORT STDMETHODCALLTYPE LPStrBuffer_In_Array_String (LPSTR str[]) -{ - printf ("%s \n", str[0]); - printf ("%s \n", str[1]); - printf ("%s \n", str[2]); - - return TRUE; -} - -extern "C" bool DLL_EXPORT STDMETHODCALLTYPE LPStrBuffer_InByRef_Array_String (LPSTR* str[]) -{ - printf ("%s \n", (*str)[0]); - printf ("%s \n", (*str)[1]); - printf ("%s \n", (*str)[2]); - - return TRUE; -} - -extern "C" bool DLL_EXPORT STDMETHODCALLTYPE LPStrBuffer_InOutByRef_Array_String (LPSTR* str[]) -{ - printf ("%s \n", (*str)[0]); - printf ("%s \n", (*str)[1]); - printf ("%s \n", (*str)[2]); - - return TRUE; -} - -extern "C" bool DLL_EXPORT STDMETHODCALLTYPE LPStrBuffer_In_Class_String (LPStr_Test_Class strClass) -{ - return TRUE; -} - -extern "C" bool DLL_EXPORT STDMETHODCALLTYPE LPStrBuffer_InByRef_Class_String (LPStr_Test_Class* pSstrClass) -{ - return TRUE; -} - -extern "C" bool DLL_EXPORT STDMETHODCALLTYPE LPStrBuffer_InOutByRef_Class_String (LPStr_Test_Class* pStrClass) -{ - return TRUE; -} - -extern "C" bool DLL_EXPORT STDMETHODCALLTYPE LPStrBuffer_In_Array_Struct (LPStr_Test_Struct str[]) -{ - printf ("** %s \n", str[0].pStr); - printf ("** %s \n", str[1].pStr); - - return TRUE; -} - -extern "C" bool DLL_EXPORT STDMETHODCALLTYPE LPStrBuffer_InByRef_Array_Struct (LPStr_Test_Struct* str[]) -{ - printf ("++ %s \n", (*str)[0].pStr); - printf ("++ %s \n", (*str)[1].pStr); - - return TRUE; -} - -extern "C" bool DLL_EXPORT STDMETHODCALLTYPE LPStrBuffer_InOutByRef_Array_Struct (LPStr_Test_Struct* str[]) -{ - printf ("-- %s \n", (*str)[0].pStr); - printf ("-- %s \n", (*str)[1].pStr); - - return TRUE; -} - -extern "C" bool DLL_EXPORT STDMETHODCALLTYPE LPStrBuffer_In_Struct_String_nothrow (LPStr_Test_Struct strStruct) -{ - return TRUE; -} diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/Pinvoke_False_False/Pinvoke_False_False.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/Pinvoke_False_False/Pinvoke_False_False.cs deleted file mode 100644 index 1f6629fabed1..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/Pinvoke_False_False/Pinvoke_False_False.cs +++ /dev/null @@ -1,352 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(false, ThrowOnUnmappableChar = false)] -public struct LPStrTestStruct -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(false, ThrowOnUnmappableChar = false)] -public class LPStrTestClass -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -public class BFM_LPStrMarshaler -{ -#pragma warning disable 618 - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_String([In][MarshalAs(UnmanagedType.LPStr)]String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_String([In][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_String([In, Out][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_StringBuilder([In, Out][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Struct_String([In][MarshalAs(UnmanagedType.Struct)]LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Struct_String([In][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Struct_String([In, Out][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Array_String([In][MarshalAs(UnmanagedType.LPArray)]String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Array_String([In][MarshalAs(UnmanagedType.LPArray)]ref String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Array_String([In, Out][MarshalAs(UnmanagedType.LPArray)]ref String[] Array); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Class_String([In, Out][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Array_Struct([In, Out][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); -#pragma warning restore 618 - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static void testLPStrBufferString() - { - Assert.IsTrue(LPStrBuffer_In_String(GetInvalidString()), "[Error] Location tlpsbs1"); - - Assert.IsTrue(LPStrBuffer_In_String(GetValidString()), "[Error] Location tlpsbs2"); - - String cTemp = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs3"); - - cTemp = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs4"); - - cTemp = GetInvalidString(); - String cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs5"); - Assert.AreNotEqual(cTempClone, cTemp, "[Error] Location tlpsbs6"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs7"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tlpsbs8"); - } - - static void testLPStrBufferStringBuilder() - { - StringBuilder sb = GetInvalidStringBuilder(); - Assert.IsTrue(LPStrBuffer_In_StringBuilder(sb), "[Error] Location tlpsbsb1"); - - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tlpsbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb3"); - - cTemp = GetValidStringBuilder(); - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb4"); - - cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb5"); - Assert.AreNotEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb6"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb7"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb8"); - } - - static LPStrTestStruct GetInvalidStruct() - { - LPStrTestStruct inValidStruct = new LPStrTestStruct(); - inValidStruct.str = GetInvalidString(); - - return inValidStruct; - } - - - static LPStrTestStruct GetValidStruct() - { - LPStrTestStruct validStruct = new LPStrTestStruct(); - validStruct.str = GetValidString(); - - return validStruct; - } - - static String[] GetValidArray() - { - String[] s = new String[3]; - - s[0] = GetValidString(); - s[1] = GetValidString(); - s[2] = GetValidString(); - - return s; - } - - static String[] GetInvalidArray() - { - String[] s = new String[3]; - - s[0] = GetInvalidString(); - s[1] = GetInvalidString(); - s[2] = GetInvalidString(); - - return s; - } - - static void testLPStrBufferStruct() - { - LPStrTestStruct lpss = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_In_Struct_String(lpss), "[Error] Location tlpsbst1"); - - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetValidStruct()), "[Error] Location tlpsbst2"); - - LPStrTestStruct cTemp = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst3"); - - cTemp = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst4"); - - cTemp = GetInvalidStruct(); - LPStrTestStruct cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst5"); - Assert.AreNotEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbst6"); - - cTemp = GetValidStruct(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst7"); - Assert.AreEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbst8"); - } - - static void testLPStrBufferClass() - { - LPStrTestClass lpss = new LPStrTestClass(); - lpss.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(lpss), "[Error] Location tlpsbc1"); - - lpss.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(lpss), "[Error] Location tlpsbc2"); - - LPStrTestClass cTemp = new LPStrTestClass(); - cTemp.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref cTemp), "[Error] Location tlpsbc3"); - - cTemp.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref cTemp), "[Error] Location tlpsbc4"); - - cTemp.str = GetInvalidString(); - LPStrTestClass cTempClone = new LPStrTestClass(); - cTempClone.str = cTemp.str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref cTemp), "[Error] Location tlpsbc5"); - Assert.AreNotEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbc6"); - - cTemp.str = GetValidString(); - cTempClone.str = cTemp.str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref cTemp), "[Error] Location tlpsbc7"); - Assert.AreEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbc8"); - } - - static void testLPStrBufferArray() - { - String[] lpss = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(lpss), "[Error] Location tlpsba1"); - - Assert.IsTrue(LPStrBuffer_In_Array_String(GetValidArray()), "[Error] Location tlpsba2"); - - String[] cTemp = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref cTemp), "[Error] Location tlpsba3"); - - cTemp = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref cTemp), "[Error] Location tlpsba4"); - - cTemp = GetInvalidArray(); - String[] cTempClone = new String[3]; - cTempClone[0] = cTemp[0]; - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref cTemp), "[Error] Location tlpsba5"); - Assert.AreNotEqual(cTempClone[0], cTemp[0], "[Error] Location tlpsba6"); - - cTemp = GetValidArray(); - cTempClone[0] = cTemp[0]; - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref cTemp), "[Error] Location tlpsba7"); - Assert.AreEqual(cTempClone[0], cTemp[0], "[Error] Location tlpsba8"); - } - - static void testLPStrBufferArrayOfStructs() - { - LPStrTestStruct[] lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos1"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos2"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos3"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos4"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - LPStrTestStruct[] lpssClone = new LPStrTestStruct[2]; - lpssClone[0].str = lpss[0].str; - lpssClone[1].str = lpss[1].str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos5"); - Assert.AreNotEqual(lpss[0].str, lpssClone[0].str, "[Error] Location tlpsbaos6"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - lpssClone = new LPStrTestStruct[2]; - lpssClone[0].str = lpss[0].str; - lpssClone[1].str = lpss[1].str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos7"); - Assert.AreEqual(lpss[0].str, lpssClone[0].str, "[Error] Location tlpsbaos8"); - } - - static void runTest() - { - testLPStrBufferString(); - testLPStrBufferStringBuilder(); - testLPStrBufferStruct(); - testLPStrBufferArray(); - testLPStrBufferClass(); - testLPStrBufferArrayOfStructs(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } catch (Exception e){ - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/Pinvoke_False_True/Pinvoke_False_True.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/Pinvoke_False_True/Pinvoke_False_True.cs deleted file mode 100644 index 1b0169ee129d..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/Pinvoke_False_True/Pinvoke_False_True.cs +++ /dev/null @@ -1,339 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(false, ThrowOnUnmappableChar = true)] -public struct LPStrTestStruct -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(false, ThrowOnUnmappableChar = true)] -public class LPStrTestClass -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -public class BFM_LPStrMarshaler -{ -#pragma warning disable 618 - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_String([In][MarshalAs(UnmanagedType.LPStr)]String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_String([In][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_String([In, Out][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_StringBuilder([In, Out][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Struct_String([In][MarshalAs(UnmanagedType.Struct)]LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Struct_String([In][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Struct_String([In, Out][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Array_String([In][MarshalAs(UnmanagedType.LPArray)]String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Array_String([In][MarshalAs(UnmanagedType.LPArray)]ref String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Array_String([In, Out][MarshalAs(UnmanagedType.LPArray)]ref String[] Array); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Class_String([In, Out][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Array_Struct([In, Out][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); -#pragma warning restore 618 - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static void testLPStrBufferString() - { - Assert.Throws(() => LPStrBuffer_In_String(GetInvalidString()), "[Error] Location tlpsbs1"); - - Assert.IsTrue(LPStrBuffer_In_String(GetValidString()), "[Error] Location tlpsbs2"); - - String cTemp = GetInvalidString(); - Assert.Throws(() => LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs3"); - - cTemp = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs4"); - - cTemp = GetInvalidString(); - Assert.Throws(() => LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs5"); - - cTemp = GetValidString(); - String cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs6"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tlpsbs7"); - } - - static void testLPStrBufferStringBuilder() - { - Assert.Throws(() => LPStrBuffer_In_StringBuilder(GetInvalidStringBuilder()), "[Error] Location tlpsbsb1"); - - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tlpsbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - Assert.Throws(() => LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb3"); - - cTemp = GetValidStringBuilder(); - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb4"); - - cTemp = GetInvalidStringBuilder(); - Assert.Throws(() => LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb5"); - - cTemp = GetValidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb6"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb7"); - } - - static LPStrTestStruct GetInvalidStruct() - { - LPStrTestStruct inValidStruct = new LPStrTestStruct(); - inValidStruct.str = GetInvalidString(); - - return inValidStruct; - } - - static LPStrTestStruct GetValidStruct() - { - LPStrTestStruct validStruct = new LPStrTestStruct(); - validStruct.str = GetValidString(); - - return validStruct; - } - - static String[] GetValidArray() - { - String[] s = new String[3]; - - s[0] = GetValidString(); - s[1] = GetValidString(); - s[2] = GetValidString(); - - return s; - } - - static String[] GetInvalidArray() - { - String[] s = new String[3]; - - s[0] = GetInvalidString(); - s[1] = GetInvalidString(); - s[2] = GetInvalidString(); - - return s; - } - - static void testLPStrBufferStruct() - { - Assert.Throws(() => LPStrBuffer_In_Struct_String(GetInvalidStruct()), "[Error] Location tlpsbst1"); - - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetValidStruct()), "[Error] Location tlpsbst2"); - - LPStrTestStruct cTemp = GetInvalidStruct(); - Assert.Throws(() => LPStrBuffer_InByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst3"); - - cTemp = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst4"); - - cTemp = GetInvalidStruct(); - Assert.Throws(() => LPStrBuffer_InOutByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst5"); - - cTemp = GetValidStruct(); - LPStrTestStruct cTempClone = new LPStrTestStruct(); - cTempClone.str = cTemp.str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref cTemp), "[Error] Location tlpsbst6"); - Assert.AreEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbst7"); - } - - static void testLPStrBufferClass() - { - LPStrTestClass cTest = new LPStrTestClass(); - cTest.str = GetInvalidString(); - Assert.Throws(() => LPStrBuffer_In_Class_String(cTest), "[Error] Location tlpsbc1"); - - cTest.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(cTest), "[Error] Location tlpsbc2"); - - LPStrTestClass cTemp = new LPStrTestClass(); - cTemp.str = GetInvalidString(); - Assert.Throws(() => LPStrBuffer_InByRef_Class_String(ref cTemp), "[Error] Location tlpsbc3"); - - cTemp.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref cTemp), "[Error] Location tlpsbc4"); - - cTemp.str = GetInvalidString(); - Assert.Throws(() => LPStrBuffer_InOutByRef_Class_String(ref cTemp), "[Error] Location tlpsbc5"); - - cTemp.str = GetValidString(); - LPStrTestClass cTempClone = new LPStrTestClass(); - cTempClone.str = cTemp.str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref cTemp), "[Error] Location tlpsbc6"); - Assert.AreEqual(cTempClone.str, cTemp.str, "[Error] Location tlpsbc7"); - } - - static void testLPStrBufferArray() - { - String[] cTest = null; - cTest = GetInvalidArray(); - Assert.Throws(() => LPStrBuffer_In_Array_String(cTest), "[Error] Location tlpsba1"); - - cTest = GetValidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(cTest), "[Error] Location tlpsba2"); - - String[] cTemp = GetInvalidArray(); - Assert.Throws(() => LPStrBuffer_InByRef_Array_String(ref cTemp), "[Error] Location tlpsba3"); - - cTemp = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref cTemp), "[Error] Location tlpsba4"); - - cTemp = GetInvalidArray(); - Assert.Throws(() => LPStrBuffer_InOutByRef_Array_String(ref cTemp), "[Error] Location tlpsba5"); - - cTemp = GetValidArray(); - String[] cTempClone = new String[3]; - cTempClone[0] = cTemp[0]; - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref cTemp), "[Error] Location tlpsba6"); - Assert.AreEqual(cTempClone[0], cTemp[0], "[Error] Location tlpsba7"); - } - - static void testLPStrBufferArrayOfStructs() - { - LPStrTestStruct[] lpss = null; - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.Throws(() => LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos1"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos2"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.Throws(() => LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos3"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos4"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.Throws(() => LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos5"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - LPStrTestStruct[] lpssClone = new LPStrTestStruct[2]; - lpssClone[0].str = lpss[0].str; - lpssClone[1].str = lpss[1].str; - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos6"); - Assert.AreEqual(lpss[0].str, lpssClone[0].str, "[Error] Location tlpsbaos7"); - } - - static void runTest() - { - testLPStrBufferString(); - testLPStrBufferStringBuilder(); - testLPStrBufferStruct(); - testLPStrBufferArray(); - testLPStrBufferClass(); - testLPStrBufferArrayOfStructs(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } catch (Exception e){ - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/Pinvoke_True_False/Pinvoke_True_False.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/Pinvoke_True_False/Pinvoke_True_False.cs deleted file mode 100644 index d9a549c3ccfd..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/Pinvoke_True_False/Pinvoke_True_False.cs +++ /dev/null @@ -1,336 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(true, ThrowOnUnmappableChar = false)] -public struct LPStrTestStruct -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(true, ThrowOnUnmappableChar = false)] -public class LPStrTestClass -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -public class BFM_LPStrMarshaler -{ -#pragma warning disable 618 - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_String([In][MarshalAs(UnmanagedType.LPStr)]String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_String([In][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_String([In, Out][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_StringBuilder([In, Out][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Struct_String([In][MarshalAs(UnmanagedType.Struct)]LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Struct_String([In][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Struct_String([In, Out][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Array_String([In][MarshalAs(UnmanagedType.LPArray)]String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Array_String([In][MarshalAs(UnmanagedType.LPArray)]ref String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Array_String([In, Out][MarshalAs(UnmanagedType.LPArray)]ref String[] Array); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Class_String([In, Out][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Array_Struct([In, Out][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); -#pragma warning restore 618 - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - sbl.Append('乀'); - return sbl; - } - - static void testLPStrBufferString() - { - Assert.IsTrue(LPStrBuffer_In_String(GetInvalidString()), "[Error] Location tlpsbs1"); - - Assert.IsTrue(LPStrBuffer_In_String(GetValidString()), "[Error] Location tlpsbs2"); - - String cTemp = GetInvalidString(); - String cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs3"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tlpsbs4"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tlpsbs5"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tlpsbs6"); - - cTemp = GetInvalidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs7"); - Assert.AreNotEqual(cTempClone, cTemp, "[Error] Location tlpsbs8"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tlpsbs9"); - Assert.AreEqual(cTempClone, cTemp, "[Error] Location tlpsbs10"); - } - - static void testLPStrBufferStringBuilder() - { - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetInvalidStringBuilder()), "[Error] Location tlpsbsb1"); - - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tlpsbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb3"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb4"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb5"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb6"); - - cTemp = GetInvalidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb7"); - Assert.AreNotEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb8"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tlpsbsb9"); - Assert.AreEqual(cTempClone.ToString(), cTemp.ToString(), "[Error] Location tlpsbsb10"); - } - - static LPStrTestStruct GetInvalidStruct() - { - LPStrTestStruct inValidStruct = new LPStrTestStruct(); - inValidStruct.str = GetInvalidString(); - - return inValidStruct; - } - - - static LPStrTestStruct GetValidStruct() - { - LPStrTestStruct validStruct = new LPStrTestStruct(); - validStruct.str = GetValidString(); - - return validStruct; - } - - static void testLPStrBufferStruct() - { - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetInvalidStruct()), "[Error] Location tlpsbst1"); - - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetValidStruct()), "[Error] Location tlpsbst2"); - - LPStrTestStruct lpss = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref lpss), "[Error] Location tlpsbst3"); - - lpss = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref lpss), "[Error] Location tlpsbst4"); - - lpss = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref lpss), "[Error] Location tlpsbst5"); - - lpss = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref lpss), "[Error] Location tlpsbst6"); - } - - static String[] GetValidArray() - { - String[] s = new String[3]; - - s[0] = GetValidString(); - s[1] = GetValidString(); - s[2] = GetValidString(); - - return s; - } - - static String[] GetInvalidArray() - { - String[] s = new String[3]; - - s[0] = GetInvalidString(); - s[1] = GetInvalidString(); - s[2] = GetInvalidString(); - - return s; - } - - static void testLPStrBufferArray() - { - String[] s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(s), "[Error] Location tlpsba1"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(s), "[Error] Location tlpsba2"); - - s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref s), "[Error] Location tlpsba3"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref s), "[Error] Location tlpsba4"); - - s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref s), "[Error] Location tlpsba5"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref s), "[Error] Location tlpsba6"); - } - - static void testLPStrBufferClass() - { - LPStrTestClass sClass = new LPStrTestClass(); - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(sClass), "[Error] Location tlpsbc1"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(sClass), "[Error] Location tlpsbc2"); - - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref sClass), "[Error] Location tlpsbc3"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref sClass), "[Error] Location tlpsbc4"); - - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref sClass), "[Error] Location tlpsbc5"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref sClass), "[Error] Location tlpsbc6"); - } - - static void testLPStrBufferArrayOfStructs() - { - LPStrTestStruct[] lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos11"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos2"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos3"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos4"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos5"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos6"); - } - - static void runTest() - { - testLPStrBufferString(); - testLPStrBufferStringBuilder(); - testLPStrBufferStruct(); - testLPStrBufferArray(); - testLPStrBufferClass(); - testLPStrBufferArrayOfStructs(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } catch (Exception e){ - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/Pinvoke_True_True/Pinvoke_True_True.cs b/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/Pinvoke_True_True/Pinvoke_True_True.cs deleted file mode 100644 index f2076b7d4b8a..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/BestFitMapping/LPStr/Pinvoke_True_True/Pinvoke_True_True.cs +++ /dev/null @@ -1,328 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using TestLibrary; - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(true, ThrowOnUnmappableChar = true)] -public struct LPStrTestStruct -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -[StructLayout(LayoutKind.Sequential)] -[BestFitMapping(true, ThrowOnUnmappableChar = true)] -public class LPStrTestClass -{ - [MarshalAs(UnmanagedType.LPStr)] - public String str; -} - -public class BFM_LPStrMarshaler -{ -#pragma warning disable 618 - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_String([In][MarshalAs(UnmanagedType.LPStr)]String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_String([In][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_String([In, Out][MarshalAs(UnmanagedType.LPStr)]ref String s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_StringBuilder([In][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_StringBuilder([In, Out][MarshalAs(UnmanagedType.LPStr)]ref StringBuilder s); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Struct_String([In][MarshalAs(UnmanagedType.Struct)]LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Struct_String([In][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Struct_String([In, Out][MarshalAs(UnmanagedType.Struct)]ref LPStrTestStruct strStruct); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Array_String([In][MarshalAs(UnmanagedType.LPArray)]String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Array_String([In][MarshalAs(UnmanagedType.LPArray)]ref String[] strArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Array_String([In, Out][MarshalAs(UnmanagedType.LPArray)]ref String[] Array); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_In_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InByRef_Class_String([In][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = true, ThrowOnUnmappableChar = true)] - public static extern bool LPStrBuffer_InOutByRef_Class_String([In, Out][MarshalAs(UnmanagedType.LPStruct)]ref LPStrTestClass strClass); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_In_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InByRef_Array_Struct([In][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); - - [DllImport("LPStr_BestFitMappingNative", BestFitMapping = false, ThrowOnUnmappableChar = false)] - public static extern bool LPStrBuffer_InOutByRef_Array_Struct([In, Out][MarshalAs(UnmanagedType.LPArray)]ref LPStrTestStruct[] structArray); -#pragma warning restore 618 - - static String GetValidString() - { - return "This is the initial test string."; - } - - static String GetInvalidString() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - //sbl.Append ('乀'); - return sbl.ToString(); - } - - static StringBuilder GetValidStringBuilder() - { - StringBuilder sb = new StringBuilder("test string."); - return sb; - } - - static StringBuilder GetInvalidStringBuilder() - { - StringBuilder sbl = new StringBuilder(); - sbl.Append((char)0x2216); - sbl.Append((char)0x2044); - sbl.Append((char)0x2215); - sbl.Append((char)0x0589); - sbl.Append((char)0x2236); - //sbl.Append ('乀'); - return sbl; - } - - static void testLPStrBufferString() - { - Assert.IsTrue(LPStrBuffer_In_String(GetInvalidString()), "[Error] Location tcbs1"); - - Assert.IsTrue(LPStrBuffer_In_String(GetValidString()), "[Error] Location tcbs2"); - - String cTemp = GetInvalidString(); - String cTempClone = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs3"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_String(ref cTemp), "[Error] Location tcbs4"); - - cTemp = GetInvalidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs5"); - - cTemp = GetValidString(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_String(ref cTemp), "[Error] Location tcbs6"); - } - - static void testLPStrBufferStringBuilder() - { - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetInvalidStringBuilder()), "[Error] Location tcbsb1"); - - Assert.IsTrue(LPStrBuffer_In_StringBuilder(GetValidStringBuilder()), "[Error] Location tcbsb2"); - - StringBuilder cTemp = GetInvalidStringBuilder(); - StringBuilder cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb3"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb4"); - - cTemp = GetInvalidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb5"); - - cTemp = GetValidStringBuilder(); - cTempClone = cTemp; - Assert.IsTrue(LPStrBuffer_InOutByRef_StringBuilder(ref cTemp), "[Error] Location tcbsb6"); - } - - static LPStrTestStruct GetInvalidStruct() - { - LPStrTestStruct inValidStruct = new LPStrTestStruct(); - inValidStruct.str = GetInvalidString(); - - return inValidStruct; - } - - - static LPStrTestStruct GetValidStruct() - { - LPStrTestStruct validStruct = new LPStrTestStruct(); - validStruct.str = GetValidString(); - - return validStruct; - } - - static void testLPStrBufferStruct() - { - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetInvalidStruct()), "[Error] Location tlpsbst1"); - - Assert.IsTrue(LPStrBuffer_In_Struct_String(GetValidStruct()), "[Error] Location tlpsbst2"); - - LPStrTestStruct lpss = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref lpss), "[Error] Location tlpsbst3"); - - lpss = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Struct_String(ref lpss), "[Error] Location tlpsbst4"); - - lpss = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref lpss), "[Error] Location tlpsbst5"); - - lpss = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Struct_String(ref lpss), "[Error] Location tlpsbst6"); - } - - static String[] GetValidArray() - { - String[] s = new String[3]; - - s[0] = GetValidString(); - s[1] = GetValidString(); - s[2] = GetValidString(); - - return s; - } - - static String[] GetInvalidArray() - { - String[] s = new String[3]; - - s[0] = GetInvalidString(); - s[1] = GetInvalidString(); - s[2] = GetInvalidString(); - - return s; - } - - static void testLPStrBufferArray() - { - String[] s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(s), "[Error] Location tlpsba1"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_In_Array_String(s), "[Error] Location tlpsba2"); - - s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref s), "[Error] Location tlpsba3"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_String(ref s), "[Error] Location tlpsba4"); - - s = GetInvalidArray(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref s), "[Error] Location tlpsba5"); - - s = GetValidArray(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_String(ref s), "[Error] Location tlpsba6"); - } - - static void testLPStrBufferClass() - { - LPStrTestClass sClass = new LPStrTestClass(); - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(sClass), "[Error] Location tlpbc1"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_In_Class_String(sClass), "[Error] Location tlpbc2"); - - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref sClass), "[Error] Location tlpbc3"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InByRef_Class_String(ref sClass), "[Error] Location tlpbc4"); - - sClass.str = GetInvalidString(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref sClass), "[Error] Location tlpbc5"); - - sClass.str = GetValidString(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Class_String(ref sClass), "[Error] Location tlpbc6"); - } - - static void testLPStrBufferArrayOfStructs() - { - LPStrTestStruct[] lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos1"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_In_Array_Struct(lpss), "[Error] Location tlpsbaos2"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos3"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos4"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetInvalidStruct(); - lpss[1] = GetInvalidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos5"); - - lpss = new LPStrTestStruct[2]; - lpss[0] = GetValidStruct(); - lpss[1] = GetValidStruct(); - Assert.IsTrue(LPStrBuffer_InOutByRef_Array_Struct(ref lpss), "[Error] Location tlpsbaos6"); - } - - static void runTest() - { - testLPStrBufferString(); - testLPStrBufferStringBuilder(); - testLPStrBufferStruct(); - testLPStrBufferArray(); - testLPStrBufferClass(); - testLPStrBufferArrayOfStructs(); - } - - public static int Main() - { - if (System.Globalization.CultureInfo.CurrentCulture.Name != "en-US") - { - Console.WriteLine("Non-US English platforms are not supported.\nPassing without running tests"); - - Console.WriteLine("--- Success"); - return 100; - } - - try - { - runTest(); - return 100; - } catch (Exception e){ - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/CriticalHandles/Test/Test.cs b/src/coreclr/tests/src/Interop/PInvoke/CriticalHandles/Test/Test.cs deleted file mode 100644 index cb503c797d86..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/CriticalHandles/Test/Test.cs +++ /dev/null @@ -1,393 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using TestLibrary; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Runtime.CompilerServices; - -internal class MyCriticalHandle : CriticalHandle -{ - static int s_uniqueHandleValue; - static HashSet s_closedHandles = new HashSet(); - - public MyCriticalHandle() : base(new IntPtr(-1)) - { - - } - - public override bool IsInvalid - { - get { return false; } - } - - protected override bool ReleaseHandle() - { - if (!s_closedHandles.Contains(handle.ToInt32())) - { - s_closedHandles.Add(handle.ToInt32()); - return true; - } - - return false; - } - - internal IntPtr Handle - { - get - { - return handle; - } - set - { - handle = value; - } - } - - internal static IntPtr GetUniqueHandle() - { - return new IntPtr(s_uniqueHandleValue++); - } - - internal static bool IsHandleClosed(IntPtr handle) - { - return s_closedHandles.Contains(handle.ToInt32()); - } -} - -public abstract class AbstractCriticalHandle : CriticalHandle -{ - public AbstractCriticalHandle() : base(new IntPtr(-1)) - { - - } - - internal IntPtr Handle - { - get - { - return handle; - } - } -} - -public class CriticalHandleWithNoDefaultCtor : AbstractCriticalHandle -{ - public CriticalHandleWithNoDefaultCtor(IntPtr handle) - { - this.handle = handle; - } - - public override bool IsInvalid - { - get { return false; } - } - - protected override bool ReleaseHandle() - { - return true; - } -} - -public class CriticalHandleTest -{ - private static Native.HandleCallback s_handleCallback = (handleValue) => - { - GC.Collect(); - GC.WaitForPendingFinalizers(); - return !MyCriticalHandle.IsHandleClosed(handleValue); - }; - - public static void In() - { - IntPtr handleValue = MyCriticalHandle.GetUniqueHandle(); - InWorker(handleValue); - GC.Collect(); - GC.WaitForPendingFinalizers(); - Assert.IsTrue(MyCriticalHandle.IsHandleClosed(handleValue), "Handle was not closed"); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - private static void InWorker(IntPtr handleValue) - { - MyCriticalHandle hande = new MyCriticalHandle() { Handle = handleValue }; - IntPtr value; - value = Native.In(hande, s_handleCallback); - Assert.AreEqual(handleValue.ToInt32(), value.ToInt32(), "Handle value"); - } - - public static void Ret() - { - IntPtr handleValue = MyCriticalHandle.GetUniqueHandle(); - RetWorker(handleValue); - GC.Collect(); - GC.WaitForPendingFinalizers(); - Assert.IsTrue(MyCriticalHandle.IsHandleClosed(handleValue), "Handle was not closed"); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - private static void RetWorker(IntPtr handleValue) - { - MyCriticalHandle hande = Native.Ret(handleValue); - Assert.AreEqual(handleValue.ToInt32(), hande.Handle.ToInt32(), "Handle value"); - } - - public static void Out() - { - IntPtr handleValue = MyCriticalHandle.GetUniqueHandle(); - OutWorker(handleValue); - GC.Collect(); - GC.WaitForPendingFinalizers(); - Assert.IsTrue(MyCriticalHandle.IsHandleClosed(handleValue), "Handle was not closed"); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - private static void OutWorker(IntPtr handleValue) - { - MyCriticalHandle hande; - Native.Out(handleValue, out hande); - Assert.AreEqual(handleValue.ToInt32(), hande.Handle.ToInt32(), "Handle value"); - } - - public static void InRef() - { - IntPtr handleValue = MyCriticalHandle.GetUniqueHandle(); - InRefWorker(handleValue); - GC.Collect(); - GC.WaitForPendingFinalizers(); - Assert.IsTrue(MyCriticalHandle.IsHandleClosed(handleValue), "Handle was not closed"); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - private static void InRefWorker(IntPtr handleValue) - { - MyCriticalHandle hande = new MyCriticalHandle() { Handle = handleValue }; - Native.InRef(ref hande, s_handleCallback); - Assert.AreEqual(handleValue.ToInt32(), hande.Handle.ToInt32(), "Handle value"); - } - - public static void Ref() - { - IntPtr handleValue = MyCriticalHandle.GetUniqueHandle(); - RefWorker(handleValue); - GC.Collect(); - GC.WaitForPendingFinalizers(); - Assert.IsTrue(MyCriticalHandle.IsHandleClosed(handleValue), "Handle was not closed"); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - private static void RefWorker(IntPtr handleValue) - { - MyCriticalHandle hande = new MyCriticalHandle() { Handle = handleValue }; - Native.Ref(ref hande, s_handleCallback); - Assert.AreEqual(handleValue.ToInt32(), hande.Handle.ToInt32(), "Handle value"); - } - - public static void RefModify() - { - IntPtr handleValue1 = MyCriticalHandle.GetUniqueHandle(); - IntPtr handleValue2 = MyCriticalHandle.GetUniqueHandle(); - RefModifyWorker(handleValue1, handleValue2); - GC.Collect(); - GC.WaitForPendingFinalizers(); - Assert.IsTrue(MyCriticalHandle.IsHandleClosed(handleValue1), "Handle 1 was not closed"); - Assert.IsTrue(MyCriticalHandle.IsHandleClosed(handleValue2), "Handle 2 was not closed"); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - private static void RefModifyWorker(IntPtr handleValue1, IntPtr handleValue2) - { - MyCriticalHandle hande = new MyCriticalHandle() { Handle = handleValue1 }; - Native.RefModify(handleValue2, ref hande, s_handleCallback); - Assert.AreEqual(handleValue2.ToInt32(), hande.Handle.ToInt32(), "Handle value"); - } - - internal class Native - { - [UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)] - [return: MarshalAs(UnmanagedType.Bool)] - internal delegate bool HandleCallback(IntPtr handle); - - [DllImport("CriticalHandlesNative", CallingConvention = CallingConvention.StdCall)] - internal static extern IntPtr In(MyCriticalHandle handle, HandleCallback handleCallback); - - [DllImport("CriticalHandlesNative", CallingConvention = CallingConvention.StdCall)] - internal static extern void Out(IntPtr handleValue, out MyCriticalHandle handle); - - [DllImport("CriticalHandlesNative", EntryPoint = "Ref", CallingConvention = CallingConvention.StdCall)] - internal static extern IntPtr InRef([In]ref MyCriticalHandle handle, HandleCallback handleCallback); - - [DllImport("CriticalHandlesNative", CallingConvention = CallingConvention.StdCall)] - internal static extern IntPtr Ref(ref MyCriticalHandle handle, HandleCallback handleCallback); - - [DllImport("CriticalHandlesNative", CallingConvention = CallingConvention.StdCall)] - internal static extern IntPtr RefModify(IntPtr handleValue, ref MyCriticalHandle handle, HandleCallback handleCallback); - - [DllImport("CriticalHandlesNative", CallingConvention = CallingConvention.StdCall)] - internal static extern MyCriticalHandle Ret(IntPtr handleValue); - } -} - -public class AbstractCriticalHandleTest -{ - public static void In() - { - IntPtr handleValue = new IntPtr(1); - AbstractCriticalHandle handle = new CriticalHandleWithNoDefaultCtor(handleValue); - IntPtr value; - value = Native.In(handle, null); - Assert.AreEqual(handleValue.ToInt32(), value.ToInt32(), "Handle value"); - } - - public static void Ret() - { - IntPtr handleValue = new IntPtr(2); - Assert.Throws(() => Native.Ret(handleValue), "Calling P/Invoke that returns an abstract critical handle"); - } - - public static void Out() - { - IntPtr handleValue = new IntPtr(3); - AbstractCriticalHandle handle; - Assert.Throws(() => Native.Out(handleValue, out handle), "Calling P/Invoke that has an out abstract critical handle parameter"); - } - - public static void InRef() - { - IntPtr handleValue = new IntPtr(4); - AbstractCriticalHandle handle = new CriticalHandleWithNoDefaultCtor(handleValue); - Native.InRef(ref handle, null); - Assert.AreEqual(handleValue.ToInt32(), handle.Handle.ToInt32(), "Handle value"); - } - - public static void Ref() - { - IntPtr handleValue = new IntPtr(5); - AbstractCriticalHandle handle = new CriticalHandleWithNoDefaultCtor(handleValue); - Assert.Throws(() => Native.Ref(ref handle, null), "Calling P/Invoke that has a ref abstract critical handle parameter"); - } - - internal class Native - { - [UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)] - [return: MarshalAs(UnmanagedType.Bool)] - internal delegate bool HandleCallback(IntPtr handle); - - [DllImport("CriticalHandlesNative", CallingConvention = CallingConvention.StdCall)] - internal static extern IntPtr In(AbstractCriticalHandle handle, HandleCallback handleCallback); - - [DllImport("CriticalHandlesNative", CallingConvention = CallingConvention.StdCall)] - internal static extern void Out(IntPtr handleValue, out AbstractCriticalHandle handle); - - [DllImport("CriticalHandlesNative", EntryPoint = "Ref", CallingConvention = CallingConvention.StdCall)] - internal static extern IntPtr InRef([In]ref AbstractCriticalHandle handle, HandleCallback handleCallback); - - [DllImport("CriticalHandlesNative", CallingConvention = CallingConvention.StdCall)] - internal static extern IntPtr Ref(ref AbstractCriticalHandle handle, HandleCallback handleCallback); - - [DllImport("CriticalHandlesNative", CallingConvention = CallingConvention.StdCall)] - internal static extern AbstractCriticalHandle Ret(IntPtr handleValue); - } -} - -public class NoDefaultCtorCriticalHandleTest -{ - public static void In() - { - IntPtr handleValue = new IntPtr(1); - CriticalHandleWithNoDefaultCtor handle = new CriticalHandleWithNoDefaultCtor(handleValue); - IntPtr value; - value = Native.In(handle, null); - Assert.AreEqual(handleValue.ToInt32(), value.ToInt32(), "Handle value"); - } - - public static void Ret() - { - IntPtr handleValue = new IntPtr(2); - //TODO: Expected MissingMemberException but throws MissingMethodException - Assert.Throws(() => Native.Ret(handleValue), "Calling P/Invoke that returns an no default ctor critical handle"); - } - - public static void Out() - { - IntPtr handleValue = new IntPtr(3); - CriticalHandleWithNoDefaultCtor handle; - //TODO: Expected MissingMemberException but throws MissingMethodException - Assert.Throws(() => Native.Out(handleValue, out handle), "Calling P/Invoke that has an out no default ctor critical handle parameter"); - } - - public static void InRef() - { - IntPtr handleValue = new IntPtr(4); - CriticalHandleWithNoDefaultCtor handle = new CriticalHandleWithNoDefaultCtor(handleValue); - //TODO: Expected MissingMemberException but throws MissingMethodException - Assert.Throws(() => Native.InRef(ref handle, null), "Calling P/Invoke that has a [In] ref no default ctor critical handle parameter"); - } - - public static void Ref() - { - IntPtr handleValue = new IntPtr(5); - CriticalHandleWithNoDefaultCtor handle = new CriticalHandleWithNoDefaultCtor(handleValue); - //TODO: Expected MissingMemberException but throws MissingMethodException - Assert.Throws(() => Native.Ref(ref handle, null), "Calling P/Invoke that has a ref no default ctor critical handle parameter"); - } - - internal class Native - { - [UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)] - [return: MarshalAs(UnmanagedType.Bool)] - internal delegate bool HandleCallback(IntPtr handle); - - [DllImport("CriticalHandlesNative", CallingConvention = CallingConvention.StdCall)] - internal static extern IntPtr In(CriticalHandleWithNoDefaultCtor handle, HandleCallback handleCallback); - - [DllImport("CriticalHandlesNative", CallingConvention = CallingConvention.StdCall)] - internal static extern void Out(IntPtr handleValue, out CriticalHandleWithNoDefaultCtor handle); - - [DllImport("CriticalHandlesNative", EntryPoint = "Ref", CallingConvention = CallingConvention.StdCall)] - internal static extern IntPtr InRef([In]ref CriticalHandleWithNoDefaultCtor handle, HandleCallback handleCallback); - - [DllImport("CriticalHandlesNative", CallingConvention = CallingConvention.StdCall)] - internal static extern IntPtr Ref(ref CriticalHandleWithNoDefaultCtor handle, HandleCallback handleCallback); - - [DllImport("CriticalHandlesNative", CallingConvention = CallingConvention.StdCall)] - internal static extern CriticalHandleWithNoDefaultCtor Ret(IntPtr handleValue); - } -} - -public class Test -{ - public static int Main(string[] args) - { - try - { - CriticalHandleTest.In(); - CriticalHandleTest.Ret(); - CriticalHandleTest.Out(); - CriticalHandleTest.InRef(); - CriticalHandleTest.Ref(); - CriticalHandleTest.RefModify(); - - AbstractCriticalHandleTest.In(); - AbstractCriticalHandleTest.Ret(); - AbstractCriticalHandleTest.Out(); - AbstractCriticalHandleTest.InRef(); - AbstractCriticalHandleTest.Ref(); - - NoDefaultCtorCriticalHandleTest.In(); - NoDefaultCtorCriticalHandleTest.Ret(); - NoDefaultCtorCriticalHandleTest.Out(); - NoDefaultCtorCriticalHandleTest.InRef(); - NoDefaultCtorCriticalHandleTest.Ref(); - - return 100; - } - catch (Exception e) - { - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} diff --git a/src/coreclr/tests/src/Interop/PInvoke/NativeCallManagedComVisible/Default/TestInALC.cs b/src/coreclr/tests/src/Interop/PInvoke/NativeCallManagedComVisible/Default/TestInALC.cs deleted file mode 100644 index 99ce3bb91756..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/NativeCallManagedComVisible/Default/TestInALC.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.IO; -using System.Reflection; - -namespace TestInALC -{ - class Test - { - static int Main(string[] args) - { - string currentAssemblyDirectory = Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).AbsolutePath); - string testAssemblyFullPath = Path.Combine(currentAssemblyDirectory, "DefaultTest.dll"); - return TestLibrary.Utilities.ExecuteAndUnload(testAssemblyFullPath, args); - } - } -} diff --git a/src/coreclr/tests/src/Interop/PInvoke/NativeCallManagedComVisible/Helpers.cs b/src/coreclr/tests/src/Interop/PInvoke/NativeCallManagedComVisible/Helpers.cs deleted file mode 100644 index 47d7753fd962..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/NativeCallManagedComVisible/Helpers.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace NativeCallManagedComVisible -{ - public static class Helpers - { - public static int S_OK = 0; - public static int E_NOINTERFACE = unchecked((int)0x80004002); - public static int COR_E_INVALIDOPERATION = unchecked((int)0x80131509); - public static int COR_E_GENERICMETHOD = unchecked((int)0x80131535); - } -} diff --git a/src/coreclr/tests/src/Interop/PInvoke/Primitives/Pointer/Program.cs b/src/coreclr/tests/src/Interop/PInvoke/Primitives/Pointer/Program.cs deleted file mode 100644 index 55f0fa48c05b..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/Primitives/Pointer/Program.cs +++ /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. -// See the LICENSE file in the project root for more information. - -using System; -using System.Runtime.InteropServices; - -namespace NonBlittablePointer -{ - static class NonBlittablePointerNative - { - [DllImport(nameof(NonBlittablePointerNative))] - public static unsafe extern void Negate(bool* ptr); - } - - class Program - { - static unsafe int Main(string[] args) - { - bool value = true; - NonBlittablePointerNative.Negate(&value); - return value == false ? 100 : 101; - } - } -} diff --git a/src/coreclr/tests/src/Interop/PInvoke/SafeHandles/Program.cs b/src/coreclr/tests/src/Interop/PInvoke/SafeHandles/Program.cs deleted file mode 100644 index 74604fdc6191..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/SafeHandles/Program.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Runtime.InteropServices; -using System.Text; -using System.Collections.Generic; - -namespace SafeHandleTests -{ - class Test - { - public static int Main(string[] args) - { - try - { - Console.WriteLine("Running SafeHandleTest tests"); - SafeHandleTest.RunTest(); - Console.WriteLine("Running ReliableUnmarshal test"); - ReliableUnmarshalTest.RunTest(); - Console.WriteLine("Running InvalidSafeHandleMarshalling tests"); - InvalidSafeHandleMarshallingTests.RunTest(); - Console.WriteLine("Running SafeHandleLifetime tests"); - SafeHandleLifetimeTests.RunTest(); - } - catch (Exception ex) - { - Console.WriteLine(ex.ToString()); - } - return 100; - } - } -} diff --git a/src/coreclr/tests/src/Interop/PInvoke/SizeParamIndex/PInvoke/PassingByOut/PassingByOutTest.cs b/src/coreclr/tests/src/Interop/PInvoke/SizeParamIndex/PInvoke/PassingByOut/PassingByOutTest.cs deleted file mode 100644 index 555ed11cb555..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/SizeParamIndex/PInvoke/PassingByOut/PassingByOutTest.cs +++ /dev/null @@ -1,257 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Runtime.InteropServices; -using TestLibrary; - -/// -/// Pass Array Size by out keyword using SizeParamIndex Attributes -/// -public class ClientMarshalArrayAsSizeParamIndexByOutTest -{ - - #region ByOut - - [DllImport("PInvokePassingByOutNative")] - private static extern bool MarshalCStyleArrayByte_AsByOut_AsSizeParamIndex( - out byte arrSize, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] out byte[] arrByte); - - [DllImport("PInvokePassingByOutNative")] - private static extern bool MarshalCStyleArraySbyte_AsByOut_AsSizeParamIndex( - out sbyte arrSize, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] out sbyte[] arrSbyte); - - [DllImport("PInvokePassingByOutNative")] - private static extern bool MarshalCStyleArrayShort_AsByOut_AsSizeParamIndex( - out short arrSize, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] out short[] arrShort); - - [DllImport("PInvokePassingByOutNative")] - private static extern bool MarshalCStyleArrayShortReturnNegative_AsByOut_AsSizeParamIndex( - out short arrSize, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] out short[] arrShort); - - [DllImport("PInvokePassingByOutNative")] - private static extern bool MarshalCStyleArrayUshort_AsByOut_AsSizeParamIndex( - [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] out ushort[] arrUshort, out ushort arrSize); - - [DllImport("PInvokePassingByOutNative")] - private static extern bool MarshalCStyleArrayInt_AsByOut_AsSizeParamIndex( - out Int32 arrSize, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] out Int32[] arrInt32); - - [DllImport("PInvokePassingByOutNative")] - private static extern bool MarshalCStyleArrayUInt_AsByOut_AsSizeParamIndex( - out UInt32 arrSize, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] out UInt32[] arrUInt32); - - [DllImport("PInvokePassingByOutNative")] - private static extern bool MarshalCStyleArrayLong_AsByOut_AsSizeParamIndex( - out long arrSize, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] out long[] arrLong); - - [DllImport("PInvokePassingByOutNative")] - private static extern bool MarshalCStyleArrayUlong_AsByOut_AsSizeParamIndex( - [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] out ulong[] arrUlong, out ulong arrSize, ulong unused); - - [DllImport("PInvokePassingByOutNative")] - private static extern bool MarshalCStyleArrayString_AsByOut_AsSizeParamIndex( - [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1, ArraySubType = UnmanagedType.BStr)] out string[] arrInt32, out int arrSize); - - #endregion - - static void SizeParamTypeIsByte() - { - string strDescription = "Scenario(byte ==> BYTE): Array_Size(N->M) = 1"; - Console.WriteLine(); - Console.WriteLine(strDescription + " Starts!"); - - byte byte_Array_Size; - byte[] arrByte; - Assert.IsTrue(MarshalCStyleArrayByte_AsByOut_AsSizeParamIndex(out byte_Array_Size, out arrByte)); - - //Construct Expected array - int expected_ByteArray_Size = 1; - byte[] expectedArrByte = Helper.GetExpChangeArray(expected_ByteArray_Size); - Assert.IsTrue(Helper.EqualArray(arrByte, (int)byte_Array_Size, expectedArrByte, (int)expectedArrByte.Length)); - - Console.WriteLine(strDescription + " Ends!"); - } - - static void SizeParamTypeIsSByte() - { - string strDescription = "Scenario(sbyte ==> CHAR):Array_Size(N->M) = sbyte.Max"; - Console.WriteLine(); - Console.WriteLine(strDescription + " Starts!"); - - sbyte sbyte_Array_Size; - sbyte[] arrSbyte; - Assert.IsTrue(MarshalCStyleArraySbyte_AsByOut_AsSizeParamIndex(out sbyte_Array_Size, out arrSbyte)); - - sbyte[] expectedArrSbyte = Helper.GetExpChangeArray(sbyte.MaxValue); - Assert.IsTrue(Helper.EqualArray(arrSbyte, (int)sbyte_Array_Size, expectedArrSbyte, (int)expectedArrSbyte.Length)); - - Console.WriteLine(strDescription + " Ends!"); - } - - static void SizeParamTypeIsShort1() - { - string strDescription = "Scenario(short ==> SHORT)1,Array_Size(M->N) = -1, Array_Size(N->M)=(ShortMax+1)/2"; - Console.WriteLine(); - Console.WriteLine(strDescription + " Starts!"); - - short shortArray_Size = (short)-1; - short[] arrShort = Helper.InitArray(10); - Assert.IsTrue(MarshalCStyleArrayShort_AsByOut_AsSizeParamIndex(out shortArray_Size, out arrShort)); - - //Construct Expected Array - int expected_ShortArray_Size = 16384;//(SHRT_MAX+1)/2 - short[] expectedArrShort = Helper.GetExpChangeArray(expected_ShortArray_Size); - Assert.IsTrue(Helper.EqualArray(arrShort, (int)shortArray_Size, expectedArrShort, (int)expectedArrShort.Length)); - - Console.WriteLine(strDescription + " Ends!"); - } - - static void SizeParamTypeIsShort2() - { - string strDescription = "Scenario(short ==> SHORT)2, Array_Size = 10, Array_Size(N->M) = -1"; - Console.WriteLine(); - Console.WriteLine(strDescription + " Starts!"); - - short short_Array_Size = (short)10; - short[] arrShort = Helper.InitArray(short_Array_Size); - Assert.Throws(() => MarshalCStyleArrayShortReturnNegative_AsByOut_AsSizeParamIndex(out short_Array_Size, out arrShort)); - Console.WriteLine(strDescription + " Ends!"); - } - - static void SizeParamTypeIsUShort() - { - string strDescription = "Scenario(ushort==>USHORT): Array_Size(N->M) = ushort.MaxValue"; - Console.WriteLine(); - Console.WriteLine(strDescription + " Starts!"); - - ushort ushort_Array_Size; - ushort[] arrUshort; - Assert.IsTrue(MarshalCStyleArrayUshort_AsByOut_AsSizeParamIndex(out arrUshort, out ushort_Array_Size)); - - //Expected Array - ushort[] expectedArrUshort = Helper.GetExpChangeArray(ushort.MaxValue); - Assert.IsTrue(Helper.EqualArray(arrUshort, (int)ushort_Array_Size, expectedArrUshort, (ushort)expectedArrUshort.Length)); - - Console.WriteLine(strDescription + " Ends!"); - } - - static void SizeParamTypeIsInt32() - { - string strDescription = "Scenario(Int32 ==> LONG): Array_Size(N->M) = 0 "; - - Console.WriteLine(); - Console.WriteLine(strDescription + " Starts!"); - - Int32 Int32_Array_Size; - Int32[] arrInt32; - Assert.IsTrue(MarshalCStyleArrayInt_AsByOut_AsSizeParamIndex(out Int32_Array_Size, out arrInt32)); - - //Expected Array - Int32[] expectedArrInt32 = Helper.GetExpChangeArray(0); - Assert.IsTrue(Helper.EqualArray(arrInt32, Int32_Array_Size, expectedArrInt32, expectedArrInt32.Length)); - - Console.WriteLine(strDescription + " Ends!"); - } - - static void SizeParamTypeIsUInt32() - { - string strDescription = "Scenario(UInt32 ==> ULONG): Array_Size(N->M) = 20"; - - Console.WriteLine(); - Console.WriteLine(strDescription + " Starts!"); - - int expected_UInt32ArraySize = 20; - - UInt32 UInt32_Array_Size = (UInt32)10; - UInt32[] arrUInt32 = Helper.InitArray((Int32)UInt32_Array_Size); - Assert.IsTrue(MarshalCStyleArrayUInt_AsByOut_AsSizeParamIndex(out UInt32_Array_Size, out arrUInt32)); - - //Construct expected - UInt32[] expectedArrUInt32 = Helper.GetExpChangeArray(expected_UInt32ArraySize); - Assert.IsTrue(Helper.EqualArray(arrUInt32, (Int32)UInt32_Array_Size, expectedArrUInt32, (Int32)expectedArrUInt32.Length)); - - Console.WriteLine(strDescription + " Ends!"); - } - - static void SizeParamTypeIsLong() - { - string strDescription = "Scenario(long ==> LONGLONG): Array_Size(N->M) = 20"; - - Console.WriteLine(); - Console.WriteLine(strDescription + " Starts!"); - - int expected_LongArraySize = 20; - - long long_Array_Size = (long)10; - long[] arrLong = Helper.InitArray((Int32)long_Array_Size); - Assert.IsTrue(MarshalCStyleArrayLong_AsByOut_AsSizeParamIndex(out long_Array_Size, out arrLong)); - - long[] expectedArrLong = Helper.GetExpChangeArray(expected_LongArraySize); - Assert.IsTrue(Helper.EqualArray(arrLong, (Int32)long_Array_Size, expectedArrLong, (Int32)expectedArrLong.Length)); - - Console.WriteLine(strDescription + " Ends!"); - } - - static void SizeParamTypeIsULong() - { - string strDescription = "Scenario(ulong ==> ULONGLONG): Array_Size(N->M) = 1000"; - - Console.WriteLine(); - Console.WriteLine(strDescription + " Starts!"); - - int expected_ULongArraySize = 1000; - - ulong ulong_Array_Size = (ulong)10; - ulong[] arrUlong = Helper.InitArray((Int32)ulong_Array_Size); - Assert.IsTrue(MarshalCStyleArrayUlong_AsByOut_AsSizeParamIndex(out arrUlong, out ulong_Array_Size, ulong_Array_Size)); - - ulong[] expectedArrUlong = Helper.GetExpChangeArray(expected_ULongArraySize); - Assert.IsTrue(Helper.EqualArray(arrUlong, (Int32)ulong_Array_Size, expectedArrUlong, (Int32)expectedArrUlong.Length)); - - Console.WriteLine(strDescription + " Ends!"); - } - - static void SizeParamTypeIsString() - { - string strDescription = "Scenario(String ==> BSTR): Array_Size(N->M) = 20"; - - Console.WriteLine(); - Console.WriteLine(strDescription + " Starts!"); - - int expected_StringArraySize = 20; - int string_Array_Size = 10; - String[] arrString = Helper.InitArray(string_Array_Size); - Assert.IsTrue(MarshalCStyleArrayString_AsByOut_AsSizeParamIndex(out arrString, out string_Array_Size)); - - String[] expArrString = Helper.GetExpChangeArray(expected_StringArraySize); - Assert.IsTrue(Helper.EqualArray(arrString, string_Array_Size, expArrString, expArrString.Length)); - Console.WriteLine(strDescription + " Ends!"); - } - - static int Main() - { - try{ - SizeParamTypeIsByte(); - SizeParamTypeIsSByte(); - SizeParamTypeIsShort1(); - SizeParamTypeIsShort2(); - SizeParamTypeIsUShort(); - SizeParamTypeIsInt32(); - SizeParamTypeIsUInt32(); - SizeParamTypeIsLong(); - SizeParamTypeIsULong(); - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - SizeParamTypeIsString(); - } - return 100; - } - catch (Exception e) - { - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} diff --git a/src/coreclr/tests/src/Interop/PInvoke/SizeParamIndex/PInvoke/PassingByRef/PassingByRefTest.cs b/src/coreclr/tests/src/Interop/PInvoke/SizeParamIndex/PInvoke/PassingByRef/PassingByRefTest.cs deleted file mode 100644 index c562e133f071..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/SizeParamIndex/PInvoke/PassingByRef/PassingByRefTest.cs +++ /dev/null @@ -1,265 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Runtime.InteropServices; -using TestLibrary; - -/// -/// Pass LPArray Size by ref keyword using SizeParamIndex Attributes -/// - -public class ClientMarshalArrayAsSizeParamIndexByRefTest -{ - - #region ByRef - - [DllImport("PInvokePassingByRefNative")] - private static extern bool MarshalCStyleArrayByte_AsByRef_AsSizeParamIndex( - ref byte arrSize, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ref byte[] arrByte); - - [DllImport("PInvokePassingByRefNative")] - private static extern bool MarshalCStyleArraySbyte_AsByRef_AsSizeParamIndex( - ref sbyte arrSize, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ref sbyte[] arrSbyte); - - [DllImport("PInvokePassingByRefNative")] - private static extern bool MarshalCStyleArrayShort_AsByRef_AsSizeParamIndex( - ref short arrSize, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ref short[] arrShort); - - [DllImport("PInvokePassingByRefNative")] - private static extern bool MarshalCStyleArrayShortReturnNegative_AsByRef_AsSizeParamIndex( - ref short arrSize, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ref short[] arrShort); - - [DllImport("PInvokePassingByRefNative")] - private static extern bool MarshalCStyleArrayUshort_AsByRef_AsSizeParamIndex( - [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] ref ushort[] arrUshort, ref ushort arrSize); - - [DllImport("PInvokePassingByRefNative")] - private static extern bool MarshalCStyleArrayInt_AsByRef_AsSizeParamIndex( - ref Int32 arrSize, Int32 unused, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ref Int32[] arrInt32); - - [DllImport("PInvokePassingByRefNative")] - private static extern bool MarshalCStyleArrayUInt_AsByRef_AsSizeParamIndex( - [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] ref UInt32[] arrUInt32, UInt32 unused, ref UInt32 arrSize); - - [DllImport("PInvokePassingByRefNative")] - private static extern bool MarshalCStyleArrayLong_AsByRef_AsSizeParamIndex( - ref long arrSize, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ref long[] arrLong); - - [DllImport("PInvokePassingByRefNative")] - private static extern bool MarshalCStyleArrayUlong_AsByRef_AsSizeParamIndex( - ref ulong arrSize, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ref ulong[] arrUlong); - - [DllImport("PInvokePassingByRefNative")] - private static extern bool MarshalCStyleArrayString_AsByRef_AsSizeParamIndex( - ref int arrSize, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0, ArraySubType = UnmanagedType.BStr)] ref string[] arrStr, - [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0, ArraySubType = UnmanagedType.LPStr)] ref string[] arrStr2); - - #endregion - - static void SizeParamTypeIsByte() - { - string strDescription = "Scenario(byte==>BYTE):Array_Size(M->N)=1,Array_Size(N->M)= byte.MinValue"; - Console.WriteLine(); - Console.WriteLine(strDescription + " Starts!"); - - byte byte_Array_Size = 1; - byte[] arrByte = Helper.InitArray(byte_Array_Size); - Assert.IsTrue(MarshalCStyleArrayByte_AsByRef_AsSizeParamIndex(ref byte_Array_Size, ref arrByte)); - - //Construct Expected array - int expected_ByteArray_Size = Byte.MinValue; - byte[] expectedArrByte = Helper.GetExpChangeArray(expected_ByteArray_Size); - Assert.IsTrue(Helper.EqualArray(arrByte, (int)byte_Array_Size, expectedArrByte, (int)expectedArrByte.Length)); - - Console.WriteLine(strDescription + " Ends!"); - } - - static void SizeParamTypeIsSByte() - { - string strDescription = "Scenario(sbyte==>CHAR): Array_Size(M->N) = 10, Array_Size(N->M) = sbyte.Max"; - Console.WriteLine(); - Console.WriteLine(strDescription + " Starts!"); - - sbyte sbyte_Array_Size = (sbyte)10; - sbyte[] arrSbyte = Helper.InitArray(sbyte_Array_Size); - - Assert.IsTrue(MarshalCStyleArraySbyte_AsByRef_AsSizeParamIndex(ref sbyte_Array_Size, ref arrSbyte)); - - //Construct Expected - sbyte[] expectedArrSbyte = Helper.GetExpChangeArray(sbyte.MaxValue); - Assert.IsTrue(Helper.EqualArray(arrSbyte, (int)sbyte_Array_Size, expectedArrSbyte, (int)sbyte.MaxValue)); - - Console.WriteLine(strDescription + " Ends!"); - } - - static void SizeParamTypeIsShort1() - { - string strDescription = "Scenario(short==>SHORT)1: Array_Size(M->N) = -1, Array_Size(N->M) = 20"; - Console.WriteLine(); - Console.WriteLine(strDescription + " Starts!"); - - short short_Array_Size = (short)-1; - short[] arrShort = Helper.InitArray(10); - int expected_ByteArraySize = 20; - - Assert.IsTrue(MarshalCStyleArrayShort_AsByRef_AsSizeParamIndex(ref short_Array_Size, ref arrShort)); - - //Construct Expected - short[] expectedArrShort = Helper.GetExpChangeArray(expected_ByteArraySize); - Assert.IsTrue(Helper.EqualArray(arrShort, (int)short_Array_Size, expectedArrShort, expectedArrShort.Length)); - - Console.WriteLine(strDescription + " Ends!"); - } - - static void SizeParamTypeIsShort2() - { - string strDescription = "Scenario(short==>SHORT)2: Array_Size(M->N) = 10, Array_Size(N->M) = -1"; - Console.WriteLine(); - Console.WriteLine(strDescription + " Starts!"); - - short short_Array_Size = (short)10; - short[] arrShort = Helper.InitArray(10); - Assert.Throws(() => MarshalCStyleArrayShortReturnNegative_AsByRef_AsSizeParamIndex(ref short_Array_Size, ref arrShort)); - Console.WriteLine(strDescription + " Ends!"); - } - - static void SizeParamTypeIsUShort() - { - string strDescription = "Scenario(ushort==>USHORT): Array_Size(M->N) = 0, Array_Size(N->M) = ushort.MaxValue"; - Console.WriteLine(); - Console.WriteLine(strDescription + " Starts!"); - - ushort ushort_Array_Size = 20; - ushort[] arrUshort = Helper.InitArray(ushort_Array_Size); - - int expected_UshortArraySize = ushort.MaxValue; - Assert.IsTrue(MarshalCStyleArrayUshort_AsByRef_AsSizeParamIndex(ref arrUshort, ref ushort_Array_Size)); - - //Construct Expected - ushort[] expectedArrShort = Helper.GetExpChangeArray(expected_UshortArraySize); - Assert.IsTrue(Helper.EqualArray(arrUshort, (int)ushort_Array_Size, expectedArrShort, expectedArrShort.Length)); - - Console.WriteLine(strDescription + " Ends!"); - } - - static void SizeParamTypeIsInt32() - { - string strDescription = "Scenario(Int32==>LONG):Array_Size(M->N)=10, Array_Size(N->M)=1"; - Console.WriteLine(); - Console.WriteLine(strDescription + " Starts!"); - - Int32 Int32_Array_Size = (Int32)10; - Int32[] arrInt32 = Helper.InitArray(Int32_Array_Size); - - Assert.IsTrue(MarshalCStyleArrayInt_AsByRef_AsSizeParamIndex(ref Int32_Array_Size, Int32.MaxValue, ref arrInt32)); - - //Construct Expected - int expected_UshortArraySize = 1; - Int32[] expectedArrInt32 = Helper.GetExpChangeArray(expected_UshortArraySize); - Assert.IsTrue(Helper.EqualArray(arrInt32, Int32_Array_Size, expectedArrInt32, expectedArrInt32.Length)); - - Console.WriteLine(strDescription + " Ends!"); - } - - static void SizeParamTypeIsUInt32() - { - string strDescription = "Scenario(UInt32==>ULONG):Array_Size(M->N)=1234,Array_Size(N->M)=4321"; - Console.WriteLine(); - Console.WriteLine(strDescription + " Starts!"); - - UInt32 UInt32_Array_Size = (UInt32)1234; - UInt32[] arrUInt32 = Helper.InitArray((Int32)UInt32_Array_Size); - Assert.IsTrue(MarshalCStyleArrayUInt_AsByRef_AsSizeParamIndex(ref arrUInt32, 1234, ref UInt32_Array_Size)); - - //Construct Expected - int expected_UInt32ArraySize = 4321; - UInt32[] expectedArrUInt32 = Helper.GetExpChangeArray(expected_UInt32ArraySize); - Assert.IsTrue(Helper.EqualArray(arrUInt32, (Int32)UInt32_Array_Size, expectedArrUInt32, (Int32)expectedArrUInt32.Length)); - - Console.WriteLine(strDescription + " Ends!"); - } - - static void SizeParamTypeIsLong() - { - string strDescription = "Scenario(long==>LONGLONG):Array_Size(M->N)=10,Array_Size(N->M)=20"; - Console.WriteLine(); - Console.WriteLine(strDescription + " Starts!"); - - long long_Array_Size = (long)10; - long[] arrLong = Helper.InitArray((Int32)long_Array_Size); - Assert.IsTrue(MarshalCStyleArrayLong_AsByRef_AsSizeParamIndex(ref long_Array_Size, ref arrLong)); - - //Construct Expected Array - int expected_LongArraySize = 20; - long[] expectedArrLong = Helper.GetExpChangeArray(expected_LongArraySize); - Assert.IsTrue(Helper.EqualArray(arrLong, (Int32)long_Array_Size, expectedArrLong, (Int32)expectedArrLong.Length)); - - Console.WriteLine(strDescription + " Ends!"); - } - - static void SizeParamTypeIsULong() - { - string strDescription = "Scenario(ulong==>ULONGLONG):Array_Size(M->N)=0, Array_Size(N->M)=0"; - Console.WriteLine(); - Console.WriteLine(strDescription + " Starts!"); - - ulong ulong_Array_Size = (ulong)0; - ulong[] arrUlong = Helper.InitArray((Int32)ulong_Array_Size); - - Assert.IsTrue(MarshalCStyleArrayUlong_AsByRef_AsSizeParamIndex(ref ulong_Array_Size, ref arrUlong)); - - //Construct Expected - int expected_ULongArraySize = 0; - ulong[] expectedArrUlong = Helper.GetExpChangeArray(expected_ULongArraySize); - Assert.IsTrue(Helper.EqualArray(arrUlong, (Int32)ulong_Array_Size, expectedArrUlong, (Int32)expectedArrUlong.Length)); - - Console.WriteLine(strDescription + " Ends!"); - } - - static void SizeParamTypeIsString() - { - string strDescription = "Scenario(String==>BSTR):Array_Size(M->N)= 20, Array_Size(N->M)=10"; - Console.WriteLine(); - Console.WriteLine(strDescription + " Starts!"); - - int array_Size = 20; - String[] arrString = Helper.InitArray(array_Size); - String[] arrString2 = Helper.InitArray(array_Size); - - Assert.IsTrue(MarshalCStyleArrayString_AsByRef_AsSizeParamIndex(ref array_Size, ref arrString, ref arrString2)); - - //Construct Expected - int expected_StringArraySize = 10; - String[] expArrString = Helper.GetExpChangeArray(expected_StringArraySize); - Assert.IsTrue(Helper.EqualArray(arrString, array_Size, expArrString, expArrString.Length)); - - Console.WriteLine(strDescription + " Ends!"); - } - - static int Main() - { - try{ - SizeParamTypeIsByte(); - SizeParamTypeIsSByte(); - SizeParamTypeIsShort1(); - SizeParamTypeIsShort2(); - SizeParamTypeIsUShort(); - SizeParamTypeIsInt32(); - SizeParamTypeIsUInt32(); - SizeParamTypeIsLong(); - SizeParamTypeIsULong(); - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - SizeParamTypeIsString(); - } - return 100; - } - catch (Exception e) - { - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} diff --git a/src/coreclr/tests/src/Interop/PInvoke/SizeParamIndex/PInvoke/helper.cs b/src/coreclr/tests/src/Interop/PInvoke/SizeParamIndex/PInvoke/helper.cs deleted file mode 100644 index 7074c9e174cb..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/SizeParamIndex/PInvoke/helper.cs +++ /dev/null @@ -1,85 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Runtime.InteropServices; - -public class Helper -{ - - #region General method - - public static T[] InitArray(int arrSize) - { - T[] array = new T[arrSize]; - for (int i = 0; i < array.Length; i++) - { - array[i] = (T)Convert.ChangeType(i, typeof(T)); - } - return array; - } - - public static bool EqualArray(T[] actualArray, int actualSize, T[] expectedArray, int expectedSize) - { - int failures = 0; - if (actualArray == null && expectedArray == null) - { - Console.WriteLine("\tTwo array are equal.Both of them null"); - return true; - } - else if (actualArray == null && expectedArray != null) - { - Console.WriteLine("\tTwo array are not equal.The sourcArr is null,but the expectedArray is not null"); - return false; - } - else if (actualArray != null && expectedArray == null) - { - Console.WriteLine("\tTwo array are not equal.The sourcArr is not null but the expectedArray is null"); - return false; - } - else if (!actualSize.Equals(expectedSize)) - { - Console.WriteLine("\tTwo array are not equal.The sizes are not equal:Expected:{0},Actaul:{1}", expectedSize, actualSize); - return false; - } - for (int i = 0; i < expectedSize; ++i) - { - if (!actualArray[i].Equals(expectedArray[i])) - { - Console.WriteLine("\tTwo array are not equal.The values of index {0} are not equal!", i); - Console.WriteLine("\t\tThe actualArray is {0},the expectedArray is {1}", actualArray[i].ToString(), expectedArray[i].ToString()); - failures++; - } - } - if (failures > 0) - return false; - return true; - } - - public static T[] GetExpChangeArray(int cSize) - { - T[] array = new T[cSize]; - - for (int i = array.Length - 1; i >= 0; --i) - array[i] = (T)Convert.ChangeType(array.Length - 1 - i, typeof(T)); - - return array; - } - - public static bool CheckAndChangeArray(ref T[] arrArg, ref T arrSize, int actualArrSize, int expectedArrSize) - { - T[] actualArr = InitArray(actualArrSize); - if (!EqualArray(arrArg, actualArrSize, actualArr, actualArrSize)) - { - return false; - } - - arrSize = (T)Convert.ChangeType(expectedArrSize, typeof(T)); - arrArg = GetExpChangeArray(expectedArrSize); - return true; - } - - #endregion - -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/SizeParamIndex/PInvoke/helper.h b/src/coreclr/tests/src/Interop/PInvoke/SizeParamIndex/PInvoke/helper.h deleted file mode 100644 index 5d82e6314240..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/SizeParamIndex/PInvoke/helper.h +++ /dev/null @@ -1,232 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// helper.h : Defines helper functions -#include -#include "platformdefines.h" - - -const LONG Array_Size = 10; -const LONG CArray_Size = 20; - -////////////////////////////////////////////////////////////////////////////// -// Verify helper methods -////////////////////////////////////////////////////////////////////////////// -template BOOL IsObjectEquals(T o1, T o2) -{ - // T::operator== required. - return o1 == o2; -} - -//Int32 helper -template -T* InitArray(SIZE_T arrSize) -{ - T* pExpectArr = (T*)CoreClrAlloc(sizeof(T)*arrSize); - for(SIZE_T i = 0;i -T* InitExpectedArray(SIZE_T arrSize) -{ - T* pExpectArr = (T*)CoreClrAlloc(sizeof(T)*arrSize); - for(SIZE_T i = 0;i -BOOL EqualArray(T* actualArray, SIZE_T actualSize, T* expectedArray, SIZE_T expectedSize) -{ - int failures = 0; - - if(actualArray == NULL && expectedArray == NULL) - { - printf("Two arrays are equal. Both of them are NULL\n"); - return TRUE; - } - else if(actualArray == NULL && expectedArray != NULL) - { - printf("Two arrays aren't equal. Array from Managed to Native is NULL,but the Compared is not NULL!\n"); - return FALSE; - } - else if(actualArray != NULL && expectedArray == NULL) - { - printf("Two arrays aren't equal. Array from Managed to Native is not NULL,but the Compared is NULL!\n"); - return FALSE; - } - else if(actualSize != expectedSize) - { - printf("Two arrays aren't equal. The arrays size are not equal. Expected:%d, Actual:%d!\n",(int)expectedSize,(int)actualSize); - return FALSE; - } - for(SIZE_T i = 0;i0) - return FALSE; - return TRUE; -} - -template -BOOL CheckAndChangeArrayByRef(T ** ppActual, T* Actual_Array_Size, SIZE_T Expected_Array_Size, SIZE_T Return_Array_Size) -{ - T* pExpectedArr = InitArray(Expected_Array_Size); - if(!EqualArray(*ppActual, (SIZE_T)*Actual_Array_Size, pExpectedArr, Expected_Array_Size)) - { - printf("ManagedtoNative Error in Method: %s!\n",__FUNCTION__); - return FALSE; - } - - CoreClrFree(pExpectedArr); - CoreClrFree(*ppActual); - *ppActual = (T*)CoreClrAlloc(sizeof(T)*Return_Array_Size); - - *Actual_Array_Size = ((T)Return_Array_Size); - for(SIZE_T i = 0; i < Return_Array_Size; ++i) - { - (*ppActual)[i] = (T)(Return_Array_Size - 1 - i); - } - return TRUE; -} - -template -BOOL CheckAndChangeArrayByOut(T ** ppActual, T* Actual_Array_Size, SIZE_T Array_Size) -{ - if(*ppActual != NULL ) - { - printf("ManagedtoNative Error in Method: %s!\n",__FUNCTION__); - printf("Array is not NULL"); - return FALSE; - } - - *ppActual = (T*)CoreClrAlloc(sizeof(T)*Array_Size); - *Actual_Array_Size = ((T)Array_Size); - - for(SIZE_T i = 0; i < Array_Size; ++i) - { - (*ppActual)[i] = (T)(Array_Size - 1 - i); - } - return TRUE; -} - -//template -//BOOL CheckReturnArray(T* pReturnArr, T Actual_Array_Size, T Expected_Array_Size) -//{ -// T* pExpectedArr = InitExpectedArray(Expected_Array_Size); -// -// if(!EqualArray(pReturnArr, Actual_Array_Size, pExpectedArr, Expected_Array_Size)) -// { -// printf("ManagedtoNative Error in Method: %s!\n",__FUNCTION__); -// CoreClrFree(pExpectedArr); -// return FALSE; -// } -// else -// { -// //printf("Managed to Native:Passed!\n"); -// CoreClrFree(pExpectedArr); -// return TRUE; -// } -//} - -//BSTR helper -#ifdef _WIN32 -template<> BOOL IsObjectEquals(BSTR o1, BSTR o2) -{ - if ( o1 == NULL && o2 == NULL ) - return TRUE; - else if ( o1 == NULL && o2 != NULL ) - return FALSE; - else if ( o1 != NULL && o2 == NULL ) - return FALSE; - - UINT uLen1 = SysStringLen(o1); - UINT uLen2 = SysStringLen(o2); - - if (uLen1 != uLen2 ) - return FALSE; - - return memcmp(o1, o2, uLen1) == 0; -} - -BSTR ToBSTR(int i) -{ - BSTR bstrRet = NULL; - VarBstrFromI4(i, 0, 0, &bstrRet); - - return bstrRet; -} - -BOOL CmpBSTR(BSTR bstr1, BSTR bstr2) -{ - UINT uLen1 = SysStringLen(bstr1); - UINT uLen2 = SysStringLen(bstr2); - - if (uLen1 != uLen2 ) - return FALSE; - return memcmp(bstr1, bstr2, uLen1) == 0; -} - -BSTR* InitArrayBSTR(LONG arrSize) -{ - BSTR* pExpectArr = (BSTR*)CoreClrAlloc(sizeof(BSTR)*arrSize); - for(LONG i = 0;i0) - return FALSE; - return TRUE; -} -#endif diff --git a/src/coreclr/tests/src/Interop/PInvoke/SizeParamIndex/ReversePInvoke/PassingByOut/PassingByOutTest.cs b/src/coreclr/tests/src/Interop/PInvoke/SizeParamIndex/ReversePInvoke/PassingByOut/PassingByOutTest.cs deleted file mode 100644 index ab0f37a2b063..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/SizeParamIndex/ReversePInvoke/PassingByOut/PassingByOutTest.cs +++ /dev/null @@ -1,208 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Runtime.InteropServices; -using TestLibrary; - -public class ReversePInvoke_MashalArrayByOut_AsManagedTest -{ - public static int arrSize = 10; - - public static int failures = 0; - - #region Func Sig - - [DllImport("ReversePInvokePassingByOutNative", CallingConvention = CallingConvention.Cdecl)] - private static extern bool DoCallBack_MarshalByteArray_AsParam_AsByOut([MarshalAs(UnmanagedType.FunctionPtr)]DelByteArrByOutAsCdeclCaller caller); - [DllImport("ReversePInvokePassingByOutNative", CallingConvention = CallingConvention.Cdecl)] - private static extern bool DoCallBack_MarshalSbyteArray_AsParam_AsByOut([MarshalAs(UnmanagedType.FunctionPtr)]DelSbyteArrByOutAsCdeclCaller caller); - [DllImport("ReversePInvokePassingByOutNative", CallingConvention = CallingConvention.Cdecl)] - private static extern bool DoCallBack_MarshalShortArray_AsParam_AsByOut([MarshalAs(UnmanagedType.FunctionPtr)]DelShortArrByOutAsCdeclCaller caller); - [DllImport("ReversePInvokePassingByOutNative", CallingConvention = CallingConvention.Cdecl)] - private static extern bool DoCallBack_MarshalShortArrayReturnNegativeSize_AsParam_AsByOut([MarshalAs(UnmanagedType.FunctionPtr)]DelShortArrByOutAsCdeclCaller caller); - [DllImport("ReversePInvokePassingByOutNative", CallingConvention = CallingConvention.Cdecl)] - private static extern bool DoCallBack_MarshalUshortArray_AsParam_AsByOut([MarshalAs(UnmanagedType.FunctionPtr)]DelUshortArrByOutAsCdeclCaller caller); - [DllImport("ReversePInvokePassingByOutNative", CallingConvention = CallingConvention.Cdecl)] - private static extern bool DoCallBack_MarshalInt32Array_AsParam_AsByOut([MarshalAs(UnmanagedType.FunctionPtr)]DelInt32ArrByOutAsCdeclCaller caller); - [DllImport("ReversePInvokePassingByOutNative", CallingConvention = CallingConvention.Cdecl)] - private static extern bool DoCallBack_MarshalUint32Array_AsParam_AsByOut([MarshalAs(UnmanagedType.FunctionPtr)]DelUint32ArrByOutAsCdeclCaller caller); - [DllImport("ReversePInvokePassingByOutNative", CallingConvention = CallingConvention.Cdecl)] - private static extern bool DoCallBack_MarshalLongArray_AsParam_AsByOut([MarshalAs(UnmanagedType.FunctionPtr)]DelLongArrByOutAsCdeclCaller caller); - [DllImport("ReversePInvokePassingByOutNative", CallingConvention = CallingConvention.Cdecl)] - private static extern bool DoCallBack_MarshalUlongArray_AsParam_AsByOut([MarshalAs(UnmanagedType.FunctionPtr)]DelUlongArrByOutAsCdeclCaller caller); - [DllImport("ReversePInvokePassingByOutNative", CallingConvention = CallingConvention.Cdecl)] - private static extern bool DoCallBack_MarshalStringArray_AsParam_AsByOut([MarshalAs(UnmanagedType.FunctionPtr)]DelStringArrByOutAsCdeclCaller caller); - - #endregion - - #region Delegate Method - - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate bool DelByteArrByOutAsCdeclCaller([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] out byte[] arrArg, out byte arraySize); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate bool DelSbyteArrByOutAsCdeclCaller(out sbyte arraySize, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] out sbyte[] arrArg); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate bool DelShortArrByOutAsCdeclCaller([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] out short[] arrArg, out short arraySize); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate bool DelUshortArrByOutAsCdeclCaller([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] out ushort[] arrArg, out ushort arraySize); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate bool DelInt32ArrByOutAsCdeclCaller([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] out Int32[] arrArg, out Int32 arraySize); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate bool DelUint32ArrByOutAsCdeclCaller([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] out UInt32[] arrArg, out UInt32 arraySize); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate bool DelLongArrByOutAsCdeclCaller([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] out long[] arrArg, out long arraySize); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate bool DelUlongArrByOutAsCdeclCaller([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] out ulong[] arrArg, out ulong arraySize); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate bool DelStringArrByOutAsCdeclCaller([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1, ArraySubType = UnmanagedType.BStr)] out string[] arrArg, out Int32 arraySize); - - #endregion - - #region Test Method - - //Type: byte ==> BYTE Array Size: byte.MinValue ==> 20 - public static bool TestMethodForByteArray_AsReversePInvokeByOut_AsCdecl([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] out byte[] arrArg, out byte arraySize) - { - arrArg = Helper.GetExpChangeArray(20); - arraySize = 20; - return true; - } - - //Type: sbyte ==> CHAR Array Size: 1 ==> sbyte.MaxValue - public static bool TestMethodForSbyteArray_AsReversePInvokeByOut_AsCdecl(out sbyte arraySize, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] out sbyte[] arrArg) - { - arrArg = Helper.GetExpChangeArray(sbyte.MaxValue); - arraySize = sbyte.MaxValue; - return true; - } - - //Type: short ==> SHORT Array Size: -1 ==> 20(Actual 10 ==> 20) - public static bool TestMethodForShortArray_AsReversePInvokeByOut_AsCdecl([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] out short[] arrArg, out short arraySize) - { - arrArg = Helper.GetExpChangeArray(20); - arraySize = 20; - return true; - } - - //Type: short ==> SHORT Array Size: 10 ==> -1(Actual 10 ==> 20) - public static bool TestMethodForShortArrayReturnNegativeSize_AsReversePInvokeByOut_AsCdecl([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] out short[] arrArg, out short arraySize) - { - arrArg = Helper.GetExpChangeArray(20); - arraySize = -1; - return true; - } - - //Type: ushort ==> USHORT Array Size: ushort.MaxValue ==> 20 - public static bool TestMethodForUshortArray_AsReversePInvokeByOut_AsCdecl([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] out ushort[] arrArg, out ushort arraySize) - { - arrArg = Helper.GetExpChangeArray(20); - arraySize = 20; - return true; - } - - //Type: Int32 ==> LONG Array Size: 10 ==> 20 - public static bool TestMethodForInt32Array_AsReversePInvokeByOut_AsCdecl([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] out Int32[] arrArg, out Int32 arraySize) - { - arrArg = Helper.GetExpChangeArray(20); - arraySize = 20; - return true; - } - - //Type: UInt32 ==> ULONG Array Size: 10 ==> 20 - public static bool TestMethodForUint32Array_AsReversePInvokeByOut_AsCdecl([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] out UInt32[] arrArg, out UInt32 arraySize) - { - arrArg = Helper.GetExpChangeArray(20); - arraySize = 20; - return true; - } - - //Type: long ==> LONGLONG Array Size: 10 ==> 20 - public static bool TestMethodForLongArray_AsReversePInvokeByOut_AsCdecl([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] out long[] arrArg, out long arraySize) - { - arrArg = Helper.GetExpChangeArray(20); - arraySize = 20; - return true; - } - - //Type: ulong ==> ULONGLONG Array Size: 10 ==> 20 - public static bool TestMethodForUlongArray_AsReversePInvokeByOut_AsCdecl([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] out ulong[] arrArg, out ulong arraySize) - { - arrArg = Helper.GetExpChangeArray(20); - arraySize = 20; - return true; - } - - //Type: string ==> BSTR Array Size: 10 ==> 20 - public static bool TestMethodForStringArray_AsReversePInvokeByOut_AsCdecl([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1, ArraySubType = UnmanagedType.BStr)] out string[] arrArg, out Int32 arraySize) - { - arrArg = Helper.GetExpChangeArray(20); - arraySize = 20; - return true; - } - - #endregion - - public static void RunTestByOut() - { - Console.WriteLine("ReversePInvoke C-Style Array marshaled by out with SizeParamIndex attribute(by out Array size)."); - - //Common value type - Console.WriteLine("\tScenario 1 : byte ==> BYTE, Array_Size = byte.MinValue, Return_Array_Size = 20"); - Assert.IsTrue(DoCallBack_MarshalByteArray_AsParam_AsByOut(new DelByteArrByOutAsCdeclCaller(TestMethodForByteArray_AsReversePInvokeByOut_AsCdecl))); - Console.WriteLine("\t\tMarshalByteArray_AsReversePInvokeByOut_AsCdecl Passed!"); - - Console.WriteLine("\tScenario 2 : sbyte ==> CHAR, Array_Size = 1, Return_Array_Size = sbyte.Max"); - Assert.IsTrue(DoCallBack_MarshalSbyteArray_AsParam_AsByOut(new DelSbyteArrByOutAsCdeclCaller(TestMethodForSbyteArray_AsReversePInvokeByOut_AsCdecl))); - Console.WriteLine("\t\tMarshalSbyteArray_AsReversePInvokeByOut_AsCdecl Passed!"); - - Console.WriteLine("\tScenario 3 : short ==> SHORT, Array_Size = -1, Return_Array_Size = 20"); - Assert.IsTrue(DoCallBack_MarshalShortArray_AsParam_AsByOut(new DelShortArrByOutAsCdeclCaller(TestMethodForShortArray_AsReversePInvokeByOut_AsCdecl))); - Console.WriteLine("\t\tMarshalShortArray_AsReversePInvokeByOut_AsCdecl Failed!"); - - Console.WriteLine("\tScenario 4 : short ==> SHORT, Array_Size = 10, Return_Array_Size = -1"); - Assert.IsTrue(DoCallBack_MarshalShortArrayReturnNegativeSize_AsParam_AsByOut(new DelShortArrByOutAsCdeclCaller(TestMethodForShortArrayReturnNegativeSize_AsReversePInvokeByOut_AsCdecl))); - Console.WriteLine("\t\tMarshalShortArray_AsReversePInvokeByOut_AsCdecl Passed!"); - - Console.WriteLine("\tScenario 5 : ushort ==> USHORT, Array_Size = ushort.MaxValue, Return_Array_Size = 20"); - Assert.IsTrue(DoCallBack_MarshalUshortArray_AsParam_AsByOut(new DelUshortArrByOutAsCdeclCaller(TestMethodForUshortArray_AsReversePInvokeByOut_AsCdecl))); - Console.WriteLine("\t\tMarshalUshortArray_AsReversePInvokeByOut_AsCdecl Passed!"); - - Console.WriteLine("\tScenario 6 : Int32 ==> LONG, Array_Size = 10, Return_Array_Size = 20"); - Assert.IsTrue(DoCallBack_MarshalInt32Array_AsParam_AsByOut(new DelInt32ArrByOutAsCdeclCaller(TestMethodForInt32Array_AsReversePInvokeByOut_AsCdecl))); - Console.WriteLine("\t\tMarshalInt32Array_AsReversePInvokeByOut_AsCdecl Passed!"); - - Console.WriteLine("\tScenario 7 : UInt32 ==> ULONG, Array_Size = 10, Return_Array_Size = 20"); - Assert.IsTrue(DoCallBack_MarshalUint32Array_AsParam_AsByOut(new DelUint32ArrByOutAsCdeclCaller(TestMethodForUint32Array_AsReversePInvokeByOut_AsCdecl))); - Console.WriteLine("\t\tMarshalUint32Array_AsReversePInvokeByOut_AsCdecl Passed!"); - - Console.WriteLine("\tScenario 8 : long ==> LONGLONG, Array_Size = 10, Return_Array_Size = 20"); - Assert.IsTrue(DoCallBack_MarshalLongArray_AsParam_AsByOut(new DelLongArrByOutAsCdeclCaller(TestMethodForLongArray_AsReversePInvokeByOut_AsCdecl))); - Console.WriteLine("\t\tMarshalLongArray_AsReversePInvokeByOut_AsCdecl Passed!"); - - Console.WriteLine("\tScenario 9 : ulong ==> ULONGLONG, Array_Size = 10, Return_Array_Size = 20"); - Assert.IsTrue(DoCallBack_MarshalUlongArray_AsParam_AsByOut(new DelUlongArrByOutAsCdeclCaller(TestMethodForUlongArray_AsReversePInvokeByOut_AsCdecl))); - Console.WriteLine("\t\tMarshalUlongArray_AsReversePInvokeByOut_AsCdecl Passed!"); - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - Console.WriteLine("\tScenario 10 : string ==> BSTR, Array_Size = 10, Return_Array_Size = 20"); - Assert.IsTrue(DoCallBack_MarshalStringArray_AsParam_AsByOut(new DelStringArrByOutAsCdeclCaller(TestMethodForStringArray_AsReversePInvokeByOut_AsCdecl))); - Console.WriteLine("\t\tMarshalStringArray_AsReversePInvokeByOut_AsCdecl Passed!"); - } - } - - public static int Main() - { - try{ - RunTestByOut(); - return 100; - } - catch (Exception e) - { - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} diff --git a/src/coreclr/tests/src/Interop/PInvoke/SizeParamIndex/ReversePInvoke/PassingByRef/PassingByRefTest.cs b/src/coreclr/tests/src/Interop/PInvoke/SizeParamIndex/ReversePInvoke/PassingByRef/PassingByRefTest.cs deleted file mode 100644 index 5b31b4ac1a30..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/SizeParamIndex/ReversePInvoke/PassingByRef/PassingByRefTest.cs +++ /dev/null @@ -1,223 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Runtime.InteropServices; -using TestLibrary; - -public class ReversePInvoke_MashalArrayByRef_AsManagedTest -{ - public static int arrSize = 10; - - public static int failures = 0; - - #region Func Sig - - [DllImport("ReversePInvokePassingByRefNative", CallingConvention = CallingConvention.Cdecl)] - private static extern bool DoCallBack_MarshalByteArray_AsParam_AsByRef([MarshalAs(UnmanagedType.FunctionPtr)]DelByteArrByRefAsCdeclCaller caller); - [DllImport("ReversePInvokePassingByRefNative", CallingConvention = CallingConvention.Cdecl)] - private static extern bool DoCallBack_MarshalSbyteArray_AsParam_AsByRef([MarshalAs(UnmanagedType.FunctionPtr)]DelSbyteArrByRefAsCdeclCaller caller); - [DllImport("ReversePInvokePassingByRefNative", CallingConvention = CallingConvention.Cdecl)] - private static extern bool DoCallBack_MarshalShortArray_AsParam_AsByRef([MarshalAs(UnmanagedType.FunctionPtr)]DelShortArrByRefAsCdeclCaller caller); - [DllImport("ReversePInvokePassingByRefNative", CallingConvention = CallingConvention.Cdecl)] - private static extern bool DoCallBack_MarshalShortArrayReturnNegativeSize_AsParam_AsByRef([MarshalAs(UnmanagedType.FunctionPtr)]DelShortArrByRefAsCdeclCaller caller); - [DllImport("ReversePInvokePassingByRefNative", CallingConvention = CallingConvention.Cdecl)] - private static extern bool DoCallBack_MarshalUshortArray_AsParam_AsByRef([MarshalAs(UnmanagedType.FunctionPtr)]DelUshortArrByRefAsCdeclCaller caller); - [DllImport("ReversePInvokePassingByRefNative", CallingConvention = CallingConvention.Cdecl)] - private static extern bool DoCallBack_MarshalInt32Array_AsParam_AsByRef([MarshalAs(UnmanagedType.FunctionPtr)]DelInt32ArrByRefAsCdeclCaller caller); - [DllImport("ReversePInvokePassingByRefNative", CallingConvention = CallingConvention.Cdecl)] - private static extern bool DoCallBack_MarshalUint32Array_AsParam_AsByRef([MarshalAs(UnmanagedType.FunctionPtr)]DelUint32ArrByRefAsCdeclCaller caller); - [DllImport("ReversePInvokePassingByRefNative", CallingConvention = CallingConvention.Cdecl)] - private static extern bool DoCallBack_MarshalLongArray_AsParam_AsByRef([MarshalAs(UnmanagedType.FunctionPtr)]DelLongArrByRefAsCdeclCaller caller); - [DllImport("ReversePInvokePassingByRefNative", CallingConvention = CallingConvention.Cdecl)] - private static extern bool DoCallBack_MarshalUlongArray_AsParam_AsByRef([MarshalAs(UnmanagedType.FunctionPtr)]DelUlongArrByRefAsCdeclCaller caller); - [DllImport("ReversePInvokePassingByRefNative", CallingConvention = CallingConvention.Cdecl)] - private static extern bool DoCallBack_MarshalStringArray_AsParam_AsByRef([MarshalAs(UnmanagedType.FunctionPtr)]DelStringArrByRefAsCdeclCaller caller); - - #endregion - - #region Delegate Method - - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate bool DelByteArrByRefAsCdeclCaller([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] ref byte[] arrArg, ref byte arraySize); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate bool DelSbyteArrByRefAsCdeclCaller(ref sbyte arraySize, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ref sbyte[] arrArg); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate bool DelShortArrByRefAsCdeclCaller([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] ref short[] arrArg, ref short arraySize); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate bool DelUshortArrByRefAsCdeclCaller([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] ref ushort[] arrArg, ref ushort arraySize); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate bool DelInt32ArrByRefAsCdeclCaller([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] ref Int32[] arrArg, ref Int32 arraySize); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate bool DelUint32ArrByRefAsCdeclCaller([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] ref UInt32[] arrArg, ref UInt32 arraySize); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate bool DelLongArrByRefAsCdeclCaller([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] ref long[] arrArg, ref long arraySize); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate bool DelUlongArrByRefAsCdeclCaller([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] ref ulong[] arrArg, ref ulong arraySize); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate bool DelStringArrByRefAsCdeclCaller([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1, ArraySubType = UnmanagedType.BStr)] ref string[] arrArg, ref Int32 arraySize); - - #endregion - - #region Test Method - - //Type: byte ==> BYTE Array Size: byte.MinValue ==> 20 - public static bool TestMethodForByteArray_AsReversePInvokeByRef_AsCdecl([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] ref byte[] arrArg, ref byte arraySize) - { - if (arraySize == byte.MinValue) - return Helper.CheckAndChangeArray(ref arrArg, ref arraySize, (Int32)byte.MinValue, 20); - return false; - } - - //Type: sbyte ==> CHAR Array Size: 1 ==> sbyte.MaxValue - public static bool TestMethodForSbyteArray_AsReversePInvokeByRef_AsCdecl(ref sbyte arraySize, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ref sbyte[] arrArg) - { - if (arraySize == 1) - return Helper.CheckAndChangeArray(ref arrArg, ref arraySize, 1, (Int32)sbyte.MaxValue); - return false; - } - - //Type: short ==> SHORT Array Size: -1 ==> 20(Actual 10 ==> 20) - public static bool TestMethodForShortArray_AsReversePInvokeByRef_AsCdecl([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] ref short[] arrArg, ref short arraySize) - { - if (arraySize == -1) - return Helper.CheckAndChangeArray(ref arrArg, ref arraySize, 10, 20); - return false; - } - - //Type: short ==> SHORT Array Size: 10 ==> -1(Actual 10 ==> 20) - public static bool TestMethodForShortArrayReturnNegativeSize_AsReversePInvokeByRef_AsCdecl([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] ref short[] arrArg, ref short arraySize) - { - if (arraySize == 10) - { - Helper.CheckAndChangeArray(ref arrArg, ref arraySize, 10, 20); - arraySize = -1; - return true; - } - return false; - } - - //Type: ushort ==> USHORT Array Size: ushort.MaxValue ==> 20 - public static bool TestMethodForUshortArray_AsReversePInvokeByRef_AsCdecl([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] ref ushort[] arrArg, ref ushort arraySize) - { - if (arraySize == ushort.MaxValue) - return Helper.CheckAndChangeArray(ref arrArg, ref arraySize, (Int32)ushort.MaxValue, 20); - return false; - } - - //Type: Int32 ==> LONG Array Size: 10 ==> 20 - public static bool TestMethodForInt32Array_AsReversePInvokeByRef_AsCdecl([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] ref Int32[] arrArg, ref Int32 arraySize) - { - if (arraySize == 10) - return Helper.CheckAndChangeArray(ref arrArg, ref arraySize, 10, 20); - return false; - } - - //Type: UInt32 ==> ULONG Array Size: 10 ==> 20 - public static bool TestMethodForUint32Array_AsReversePInvokeByRef_AsCdecl([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] ref UInt32[] arrArg, ref UInt32 arraySize) - { - if (arraySize == 10) - return Helper.CheckAndChangeArray(ref arrArg, ref arraySize, 10, 20); - return false; - } - - //Type: long ==> LONGLONG Array Size: 10 ==> 20 - public static bool TestMethodForLongArray_AsReversePInvokeByRef_AsCdecl([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] ref long[] arrArg, ref long arraySize) - { - if (arraySize == 10) - return Helper.CheckAndChangeArray(ref arrArg, ref arraySize, 10, 20); - return false; - } - - //Type: ulong ==> ULONGLONG Array Size: 10 ==> 20 - public static bool TestMethodForUlongArray_AsReversePInvokeByRef_AsCdecl([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] ref ulong[] arrArg, ref ulong arraySize) - { - if (arraySize == 10) - return Helper.CheckAndChangeArray(ref arrArg, ref arraySize, 10, 20); - return false; - } - - //Type: string ==> BSTR Array Size: 10 ==> 20 - public static bool TestMethodForStringArray_AsReversePInvokeByRef_AsCdecl([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1, ArraySubType = UnmanagedType.BStr)] ref string[] arrArg, ref Int32 arraySize) - { - string[] actualArr = Helper.InitArray(10); - if (!Helper.EqualArray(arrArg, arraySize, actualArr, 10)) - { - return false; - } - - arraySize = 20; - arrArg = Helper.GetExpChangeArray(20); - return true; - } - - #endregion - - public static void RunTestByRef() - { - Console.WriteLine("ReversePInvoke C-Style Array marshaled by ref with SizeParamIndex attribute(by ref Array size)."); - - //Common value type - Console.WriteLine("\tScenario 1 : byte ==> BYTE, Array_Size = byte.MinValue, Return_Array_Size = 20"); - Assert.IsTrue(DoCallBack_MarshalByteArray_AsParam_AsByRef(new DelByteArrByRefAsCdeclCaller(TestMethodForByteArray_AsReversePInvokeByRef_AsCdecl))); - Console.WriteLine("\t\tMarshalByteArray_AsReversePInvokeByRef_AsCdecl Passed!"); - - Console.WriteLine("\tScenario 2 : sbyte ==> CHAR, Array_Size = 1, Return_Array_Size = sbyte.Max"); - Assert.IsTrue(DoCallBack_MarshalSbyteArray_AsParam_AsByRef(new DelSbyteArrByRefAsCdeclCaller(TestMethodForSbyteArray_AsReversePInvokeByRef_AsCdecl))); - Console.WriteLine("\t\tMarshalSbyteArray_AsReversePInvokeByRef_AsCdecl Passed!"); - - // We don't support exception interop in .NET off-Windows. - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - Console.WriteLine("\tScenario 3 : short ==> SHORT, Array_Size = -1, Return_Array_Size = 20"); - Assert.Throws(() => DoCallBack_MarshalShortArray_AsParam_AsByRef(new DelShortArrByRefAsCdeclCaller(TestMethodForShortArray_AsReversePInvokeByRef_AsCdecl))); - Console.WriteLine("\t\tMarshalShortArray_AsReversePInvokeByRef_AsCdecl Passed!"); - } - - - Console.WriteLine("\tScenario 4 : short ==> SHORT, Array_Size = 10, Return_Array_Size = -1"); - Assert.IsTrue(DoCallBack_MarshalShortArrayReturnNegativeSize_AsParam_AsByRef(new DelShortArrByRefAsCdeclCaller(TestMethodForShortArrayReturnNegativeSize_AsReversePInvokeByRef_AsCdecl))); - Console.WriteLine("\t\tMarshalShortArray_AsReversePInvokeByRef_AsCdecl Passed!"); - - Console.WriteLine("\tScenario 5 : ushort ==> USHORT, Array_Size = ushort.MaxValue, Return_Array_Size = 20"); - Assert.IsTrue(DoCallBack_MarshalUshortArray_AsParam_AsByRef(new DelUshortArrByRefAsCdeclCaller(TestMethodForUshortArray_AsReversePInvokeByRef_AsCdecl))); - Console.WriteLine("\t\tMarshalUshortArray_AsReversePInvokeByRef_AsCdecl Passed!"); - - Console.WriteLine("\tScenario 6 : Int32 ==> LONG, Array_Size = 10, Return_Array_Size = 20"); - Assert.IsTrue(DoCallBack_MarshalInt32Array_AsParam_AsByRef(new DelInt32ArrByRefAsCdeclCaller(TestMethodForInt32Array_AsReversePInvokeByRef_AsCdecl))); - Console.WriteLine("\t\tMarshalInt32Array_AsReversePInvokeByRef_AsCdecl Passed!"); - - Console.WriteLine("\tScenario 7 : UInt32 ==> ULONG, Array_Size = 10, Return_Array_Size = 20"); - Assert.IsTrue(DoCallBack_MarshalUint32Array_AsParam_AsByRef(new DelUint32ArrByRefAsCdeclCaller(TestMethodForUint32Array_AsReversePInvokeByRef_AsCdecl))); - Console.WriteLine("\t\tMarshalUint32Array_AsReversePInvokeByRef_AsCdecl Passed!"); - - Console.WriteLine("\tScenario 8 : long ==> LONGLONG, Array_Size = 10, Return_Array_Size = 20"); - Assert.IsTrue(DoCallBack_MarshalLongArray_AsParam_AsByRef(new DelLongArrByRefAsCdeclCaller(TestMethodForLongArray_AsReversePInvokeByRef_AsCdecl))); - Console.WriteLine("\t\tMarshalLongArray_AsReversePInvokeByRef_AsCdecl Passed!"); - - Console.WriteLine("\tScenario 9 : ulong ==> ULONGLONG, Array_Size = 10, Return_Array_Size = 20"); - Assert.IsTrue(DoCallBack_MarshalUlongArray_AsParam_AsByRef(new DelUlongArrByRefAsCdeclCaller(TestMethodForUlongArray_AsReversePInvokeByRef_AsCdecl))); - Console.WriteLine("\t\tMarshalUlongArray_AsReversePInvokeByRef_AsCdecl Passed!"); - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - Console.WriteLine("\tScenario 10 : string ==> BSTR, Array_Size = 10, Return_Array_Size = 20"); - Assert.IsTrue(DoCallBack_MarshalStringArray_AsParam_AsByRef(new DelStringArrByRefAsCdeclCaller(TestMethodForStringArray_AsReversePInvokeByRef_AsCdecl))); - Console.WriteLine("\t\tMarshalStringArray_AsReversePInvokeByRef_AsCdecl Passed!"); - } - } - - public static int Main() - { - try{ - RunTestByRef(); - return 100; - } - catch (Exception e) - { - Console.WriteLine($"Test Failure: {e}"); - return 101; - } - } -} diff --git a/src/coreclr/tests/src/Interop/PInvoke/SizeParamIndex/ReversePInvoke/helper.cs b/src/coreclr/tests/src/Interop/PInvoke/SizeParamIndex/ReversePInvoke/helper.cs deleted file mode 100644 index a02e2190d3b2..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/SizeParamIndex/ReversePInvoke/helper.cs +++ /dev/null @@ -1,83 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Runtime.InteropServices; - -public class Helper -{ - #region General method - - public static T[] InitArray(int arrSize) - { - T[] array = new T[arrSize]; - for (int i = 0; i < array.Length; i++) - { - array[i] = (T)Convert.ChangeType(i, typeof(T)); - } - return array; - } - - public static bool EqualArray(T[] actualArray, int actualSize, T[] expArr, int arrSize2) - { - int failures = 0; - if (actualArray == null && expArr == null) - { - Console.WriteLine("\tTwo array are equal.Both of them null"); - return true; - } - else if (actualArray == null && expArr != null) - { - Console.WriteLine("\tTwo array are not equal.The sourcArr is null,but the expArr is not null"); - return false; - } - else if (actualArray != null && expArr == null) - { - Console.WriteLine("\tTwo array are not equal.The sourcArr is not null but the expArr is null"); - return false; - } - else if (!actualSize.Equals(arrSize2)) - { - Console.WriteLine("\tTwo array are not equal.The sizes are not equal"); - return false; - } - for (int i = 0; i < arrSize2; ++i) - { - if (!actualArray[i].Equals(expArr[i])) - { - Console.WriteLine("\tTwo array are not equal.The values of index {0} are not equal!", i); - Console.WriteLine("\t\tThe actualArray is {0},the expArr is {1}", actualArray[i].ToString(), expArr[i].ToString()); - failures++; - } - } - if (failures > 0) - return false; - return true; - } - - public static T[] GetExpChangeArray(int cSize) - { - T[] array = new T[cSize]; - - for (int i = array.Length - 1; i >= 0; --i) - array[i] = (T)Convert.ChangeType(array.Length - 1 - i, typeof(T)); - - return array; - } - - public static bool CheckAndChangeArray(ref T[] arrArg, ref T arrSize, int actualArrSize, int expectedArrSize) - { - T[] actualArr = InitArray(actualArrSize); - if (!EqualArray(arrArg, actualArrSize, actualArr, actualArrSize)) - { - return false; - } - - arrSize = (T)Convert.ChangeType(expectedArrSize, typeof(T)); - arrArg = GetExpChangeArray(expectedArrSize); - return true; - } - - #endregion -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Interop/PInvoke/SizeParamIndex/ReversePInvoke/helper.h b/src/coreclr/tests/src/Interop/PInvoke/SizeParamIndex/ReversePInvoke/helper.h deleted file mode 100644 index 9b0a6b0e0b3a..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/SizeParamIndex/ReversePInvoke/helper.h +++ /dev/null @@ -1,229 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// helper.h : Defines helper functions -#include - -const LONG Array_Size = 10; -const LONG CArray_Size = 20; - -////////////////////////////////////////////////////////////////////////////// -// Verify helper methods -////////////////////////////////////////////////////////////////////////////// -template -BOOL IsObjectEquals(T o1, T o2) -{ - // T::operator== required. - return o1 == o2; -} - -//Int32 helper -template -T* InitArray(SIZE_T arrSize) -{ - T* pExpectArr = (T*)CoreClrAlloc(sizeof(T)*arrSize); - for(SIZE_T i = 0;i -T* InitExpectedArray(SIZE_T arrSize) -{ - T* pExpectArr = (T*)CoreClrAlloc(sizeof(T)*arrSize); - for(SIZE_T i = 0;i -BOOL EqualArray(T* actualArray, SIZE_T actualSize, T* expectedArray, SIZE_T expectedSize) -{ - int failures = 0; - - if(actualArray == NULL && expectedArray == NULL) - { - printf("Two arrays are equal. Both of them NULL\n"); - return TRUE; - } - else if(actualArray == NULL && expectedArray != NULL) - { - printf("Two arrays aren't equal. Array from Managed to Native is NULL,but the Compared is not NULL!\n"); - return FALSE; - } - else if(actualArray != NULL && expectedArray == NULL) - { - printf("Two arrays aren't equal. Array from Managed to Native is not NULL,but the Compared is NULL!\n"); - return FALSE; - } - else if(actualSize != expectedSize) - { - printf("Two arrays aren't equal. The arrays size are not equal!\n"); - return FALSE; - } - for(SIZE_T i = 0;i < actualSize; ++i) - { - if(actualArray[i] != expectedArray[i]) - { - printf("Two arrays aren't equal.The value of index of %d isn't equal!\n",(int)i); - printf("\tThe value in actual rray is %d\n",(int)actualArray[i]); - printf("\tThe value in expected array is %d\n",(int)expectedArray[i]); - failures++; - } - } - if( failures > 0 ) - return FALSE; - return TRUE; -} - -template -BOOL CheckAndChangeArrayByRef(T ** ppActual, T* Actual_Array_Size, SIZE_T Expected_Array_Size, SIZE_T Return_Array_Size) -{ - T* pExpectedArr = InitArray(Expected_Array_Size); - if(!EqualArray(*ppActual, *Actual_Array_Size, pExpectedArr, Expected_Array_Size)) - { - printf("ManagedtoNative Error in Method: %s!\n",__FUNCTION__); - return FALSE; - } - - CoreClrFree(pExpectedArr); - CoreClrFree(*ppActual); - *ppActual = (T*)CoreClrAlloc(sizeof(T)*Return_Array_Size); - - *Actual_Array_Size = ((T)Return_Array_Size); - for(SIZE_T i = 0; i < Return_Array_Size; ++i) - { - (*ppActual)[i] = Return_Array_Size - 1 - i; - } - return TRUE; -} - -template -BOOL CheckAndChangeArrayByOut(T ** ppActual, T* Actual_Array_Size, SIZE_T Return_Array_Size) -{ - if(*ppActual != NULL ) - { - printf("ManagedtoNative Error in Method: %s!\n",__FUNCTION__); - printf("Array is not NULL"); - return FALSE; - } - - CoreClrFree(*ppActual); - *ppActual = (T*)CoreClrAlloc(sizeof(T)*Return_Array_Size); - - *Actual_Array_Size = ((T)Return_Array_Size); - for(SIZE_T i = 0; i < Return_Array_Size; ++i) - { - (*ppActual)[i] = Return_Array_Size - 1 - i; - } - return TRUE; -} - -template -BOOL CheckArray(T* pReturnArr, SIZE_T actualArraySize, SIZE_T expectedArraySize) -{ - T* pExpectedArr = InitExpectedArray(expectedArraySize); - - if(!EqualArray(pReturnArr, actualArraySize, pExpectedArr, expectedArraySize)) - { - printf("ManagedtoNative Error in Method: %s!\n",__FUNCTION__); - CoreClrFree(pExpectedArr); - return FALSE; - } - else - { - CoreClrFree(pExpectedArr); - return TRUE; - } -} - -//BSTR helper -#ifdef _WIN32 -template<> -BOOL IsObjectEquals(BSTR o1, BSTR o2) -{ - if ( o1 == NULL && o2 == NULL ) - return TRUE; - else if ( o1 == NULL && o2 != NULL ) - return FALSE; - else if ( o1 != NULL && o2 == NULL ) - return FALSE; - - UINT uLen1 = SysStringLen(o1); - UINT uLen2 = SysStringLen(o2); - - if (uLen1 != uLen2 ) - return FALSE; - - return memcmp(o1, o2, uLen1) == 0; -} - -BSTR ToBSTR(int i) -{ - BSTR bstrRet = NULL; - VarBstrFromI4(i, 0, 0, &bstrRet); - - return bstrRet; -} -BOOL CmpBSTR(BSTR bstr1, BSTR bstr2) -{ - UINT uLen1 = SysStringLen(bstr1); - UINT uLen2 = SysStringLen(bstr2); - - if (uLen1 != uLen2 ) - return FALSE; - return memcmp(bstr1, bstr2, uLen1) == 0; -} -BSTR* InitArrayBSTR(LONG arrSize) -{ - BSTR* pExpectArr = (BSTR*)CoreClrAlloc(sizeof(BSTR)*arrSize); - for(LONG i = 0;i0) - return FALSE; - return TRUE; -} -#endif diff --git a/src/coreclr/tests/src/Interop/PInvoke/Variant/PInvokeDefs.cs b/src/coreclr/tests/src/Interop/PInvoke/Variant/PInvokeDefs.cs deleted file mode 100644 index 27e90ca2fffb..000000000000 --- a/src/coreclr/tests/src/Interop/PInvoke/Variant/PInvokeDefs.cs +++ /dev/null @@ -1,200 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Runtime.InteropServices; - -#pragma warning disable CS0612, CS0618 -class VariantNative -{ - public struct CustomStruct - { - } - - public struct ObjectWrapper - { - [MarshalAs(UnmanagedType.Struct)] - public object value; - } - - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByValue_Byte(object obj, byte expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByValue_SByte(object obj, sbyte expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByValue_Int16(object obj, short expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByValue_UInt16(object obj, ushort expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByValue_Int32(object obj, int expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByValue_UInt32(object obj, uint expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByValue_Int64(object obj, long expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByValue_UInt64(object obj, ulong expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByValue_Single(object obj, float expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByValue_Double(object obj, double expected); - [DllImport(nameof(VariantNative), CharSet = CharSet.Unicode)] - public static extern bool Marshal_ByValue_String(object obj, [MarshalAs(UnmanagedType.BStr)] string expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByValue_Char(object obj, char expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByValue_Boolean(object obj, [MarshalAs(UnmanagedType.VariantBool)] bool expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByValue_DateTime(object obj, DateTime expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByValue_Decimal(object obj, decimal expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByValue_Currency(object obj, [MarshalAs(UnmanagedType.Currency)] decimal expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByValue_Missing(object obj); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByValue_Object(object obj); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByValue_Object_IUnknown(object obj); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByValue_Empty(object obj); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByValue_Null(object obj); - - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByValue_Invalid(object obj); - - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByRef_Byte(ref object obj, byte expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByRef_SByte(ref object obj, sbyte expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByRef_Int16(ref object obj, short expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByRef_UInt16(ref object obj, ushort expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByRef_Int32(ref object obj, int expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByRef_UInt32(ref object obj, uint expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByRef_Int64(ref object obj, long expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByRef_UInt64(ref object obj, ulong expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByRef_Single(ref object obj, float expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByRef_Double(ref object obj, double expected); - [DllImport(nameof(VariantNative), CharSet = CharSet.Unicode)] - public static extern bool Marshal_ByRef_String(ref object obj, [MarshalAs(UnmanagedType.BStr)] string expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByRef_Char(ref object obj, char expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByRef_Boolean(ref object obj, [MarshalAs(UnmanagedType.VariantBool)] bool expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByRef_DateTime(ref object obj, DateTime expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByRef_Decimal(ref object obj, decimal expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByRef_Currency(ref object obj, [MarshalAs(UnmanagedType.Currency)] decimal expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByRef_Missing(ref object obj); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByRef_Object(ref object obj); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByRef_Object_IUnknown(ref object obj); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByRef_Empty(ref object obj); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ByRef_Null(ref object obj); - - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_ChangeVariantType(ref object obj, int expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Out(out object obj, int expected); - - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByValue_Byte(ObjectWrapper wrapper, byte expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByValue_SByte(ObjectWrapper wrapper, sbyte expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByValue_Int16(ObjectWrapper wrapper, short expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByValue_UInt16(ObjectWrapper wrapper, ushort expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByValue_Int32(ObjectWrapper wrapper, int expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByValue_UInt32(ObjectWrapper wrapper, uint expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByValue_Int64(ObjectWrapper wrapper, long expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByValue_UInt64(ObjectWrapper wrapper, ulong expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByValue_Single(ObjectWrapper wrapper, float expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByValue_Double(ObjectWrapper wrapper, double expected); - [DllImport(nameof(VariantNative), CharSet = CharSet.Unicode)] - public static extern bool Marshal_Struct_ByValue_String(ObjectWrapper wrapper, [MarshalAs(UnmanagedType.BStr)] string expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByValue_Char(ObjectWrapper wrapper, char expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByValue_Boolean(ObjectWrapper wrapper, [MarshalAs(UnmanagedType.VariantBool)] bool expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByValue_DateTime(ObjectWrapper wrapper, DateTime expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByValue_Decimal(ObjectWrapper wrapper, decimal expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByValue_Currency(ObjectWrapper wrapper, [MarshalAs(UnmanagedType.Currency)] decimal expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByValue_Missing(ObjectWrapper wrapper); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByValue_Object(ObjectWrapper wrapper); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByValue_Object_IUnknown(ObjectWrapper wrapper); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByValue_Empty(ObjectWrapper wrapper); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByValue_Null(ObjectWrapper wrapper); - - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByRef_Byte(ref ObjectWrapper wrapper, byte expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByRef_SByte(ref ObjectWrapper wrapper, sbyte expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByRef_Int16(ref ObjectWrapper wrapper, short expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByRef_UInt16(ref ObjectWrapper wrapper, ushort expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByRef_Int32(ref ObjectWrapper wrapper, int expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByRef_UInt32(ref ObjectWrapper wrapper, uint expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByRef_Int64(ref ObjectWrapper wrapper, long expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByRef_UInt64(ref ObjectWrapper wrapper, ulong expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByRef_Single(ref ObjectWrapper wrapper, float expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByRef_Double(ref ObjectWrapper wrapper, double expected); - [DllImport(nameof(VariantNative), CharSet = CharSet.Unicode)] - public static extern bool Marshal_Struct_ByRef_String(ref ObjectWrapper wrapper, [MarshalAs(UnmanagedType.BStr)] string expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByRef_Char(ref ObjectWrapper wrapper, char expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByRef_Boolean(ref ObjectWrapper wrapper, [MarshalAs(UnmanagedType.VariantBool)] bool expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByRef_DateTime(ref ObjectWrapper wrapper, DateTime expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByRef_Decimal(ref ObjectWrapper wrapper, decimal expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByRef_Currency(ref ObjectWrapper wrapper, [MarshalAs(UnmanagedType.Currency)] decimal expected); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByRef_Missing(ref ObjectWrapper wrapper); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByRef_Object(ref ObjectWrapper wrapper); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByRef_Object_IUnknown(ref ObjectWrapper wrapper); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByRef_Empty(ref ObjectWrapper wrapper); - [DllImport(nameof(VariantNative))] - public static extern bool Marshal_Struct_ByRef_Null(ref ObjectWrapper wrapper); -} diff --git a/src/coreclr/tests/src/Interop/RefInt/RefIntTest.cs b/src/coreclr/tests/src/Interop/RefInt/RefIntTest.cs deleted file mode 100644 index ac648f754d78..000000000000 Binary files a/src/coreclr/tests/src/Interop/RefInt/RefIntTest.cs and /dev/null differ diff --git a/src/coreclr/tests/src/Interop/StringMarshalling/Common/Helpers.cs b/src/coreclr/tests/src/Interop/StringMarshalling/Common/Helpers.cs deleted file mode 100644 index 2a05d6cecbb1..000000000000 --- a/src/coreclr/tests/src/Interop/StringMarshalling/Common/Helpers.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -class Helpers -{ - public static string Reverse(string s) - { - var chars = s.ToCharArray(); - Array.Reverse(chars); - return new string(chars); - } -} diff --git a/src/coreclr/tests/src/Interop/StructMarshalling/ReversePInvoke/Helper.cs b/src/coreclr/tests/src/Interop/StructMarshalling/ReversePInvoke/Helper.cs deleted file mode 100644 index 4f2f709d702f..000000000000 --- a/src/coreclr/tests/src/Interop/StructMarshalling/ReversePInvoke/Helper.cs +++ /dev/null @@ -1,1318 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Runtime.InteropServices; -using System.IO; -using System.Text; -using System.Globalization; -using System.Collections; -using System.IO.IsolatedStorage; -using System.Security.Policy; - -public class Helper -{ - - #region methods for InnerSequential struct - - // Return new InnerSequential instance - public static InnerSequential NewInnerSequential(int f1, float f2, string f3) - { - InnerSequential inner_seq = new InnerSequential(); - inner_seq.f1 = f1; - inner_seq.f2 = f2; - inner_seq.f3 = f3; - return inner_seq; - } - - // Prints InnerSequential - public static void PrintInnerSequential(InnerSequential inner_seq, string name) - { - Console.WriteLine("\t{0}.f1 = {1}", name, inner_seq.f1); - Console.WriteLine("\t{0}.f2 = {1}", name, inner_seq.f2); - Console.WriteLine("\t{0}.f3 = {1}", name, inner_seq.f3); - } - - public static bool ValidateInnerSequential(InnerSequential s1, InnerSequential s2, string methodName) - { - if (s1.f1 != s2.f1 || s1.f2 != s2.f2 || s1.f3 != s2.f3) - { - Console.WriteLine("\tFAILED! " + methodName + "did not receive result as expected."); - Console.WriteLine("\tThe Actual is..."); - PrintInnerSequential(s1, s1.ToString()); - Console.WriteLine("\tThe Expected is..."); - PrintInnerSequential(s2, s2.ToString()); - return false; - } - else - { - Console.WriteLine("\tPASSED!"); - return true; - } - } - - #endregion - - #region methods for INNER2 struct - - // Return new INNER2 instance - public static INNER2 NewINNER2(int f1, float f2, string f3) - { - INNER2 inner = new INNER2(); - inner.f1 = f1; - inner.f2 = f2; - inner.f3 = f3; - return inner; - } - - // Prints INNER2 - public static void PrintINNER2(INNER2 inner, string name) - { - Console.WriteLine("\t{0}.f1 = {1}", name, inner.f1); - Console.WriteLine("\t{0}.f2 = {1}", name, inner.f2); - Console.WriteLine("\t{0}.f3 = {1}", name, inner.f3); - } - - public static bool ValidateINNER2(INNER2 inner1, INNER2 inner2, string methodName) - { - if (inner1.f1 != inner2.f1 || inner1.f2 != inner2.f2 || inner1.f3 != inner2.f3) - { - Console.WriteLine("\tFAILED! " + methodName + "did not receive result as expected."); - Console.WriteLine("\tThe Actual is..."); - PrintINNER2(inner1, inner1.ToString()); - Console.WriteLine("\tThe Expected is..."); - PrintINNER2(inner2, inner2.ToString()); - return false; - } - else - { - Console.WriteLine("\tPASSED!"); - return true; - } - } - - #endregion - - #region methods for InnerExplicit struct - - // Return new InnerExplicit instance - public static InnerExplicit NewInnerExplicit(int f1, float f2, string f3) - { - InnerExplicit inner = new InnerExplicit(); - inner.f1 = f1; - inner.f2 = f2; - inner.f3 = f3; - return inner; - } - - // Prints InnerExplicit - public static void PrintInnerExplicit(InnerExplicit inner, string name) - { - Console.WriteLine("\t{0}.f1 = {1}", name, inner.f1); - Console.WriteLine("\t{0}.f2 = {1}", name, inner.f2); - Console.WriteLine("\t{0}.f3 = {1}", name, inner.f3); - } - - public static bool ValidateInnerExplicit(InnerExplicit inner1, InnerExplicit inner2, string methodName) - { - if (inner1.f1 != inner2.f1 || inner1.f2 != inner2.f2 || inner1.f3 != inner2.f3) - { - Console.WriteLine("\tFAILED! " + methodName + "did not receive result as expected."); - Console.WriteLine("\tThe Actual is..."); - PrintInnerExplicit(inner1, inner1.ToString()); - Console.WriteLine("\tThe Expected is..."); - PrintInnerExplicit(inner2, inner2.ToString()); - return false; - } - else - { - Console.WriteLine("\tPASSED!"); - return true; - } - } - - #endregion - - #region methods for InnerArraySequential struct - - // Returns new OUTER instance; the params are the fields of INNER; - // all the INNER elements have the same field values - public static InnerArraySequential NewInnerArraySequential(int f1, float f2, string f3) - { - InnerArraySequential outer = new InnerArraySequential(); - outer.arr = new InnerSequential[Common.NumArrElements]; - for (int i = 0; i < Common.NumArrElements; i++) - { - outer.arr[i].f1 = f1; - outer.arr[i].f2 = f2; - outer.arr[i].f3 = f3; - } - return outer; - } - - // Prints InnerArraySequential - public static void PrintInnerArraySequential(InnerArraySequential outer, string name) - { - for (int i = 0; i < Common.NumArrElements; i++) - { - Console.WriteLine("\t{0}.arr[{1}].f1 = {2}", name, i, outer.arr[i].f1); - Console.WriteLine("\t{0}.arr[{1}].f2 = {2}", name, i, outer.arr[i].f2); - Console.WriteLine("\t{0}.arr[{1}].f3 = {2}", name, i, outer.arr[i].f3); - } - } - - // Returns true if the two params have the same fields - public static bool ValidateInnerArraySequential(InnerArraySequential outer1, InnerArraySequential outer2, string methodName) - { - for (int i = 0; i < Common.NumArrElements; i++) - { - if (outer1.arr[i].f1 != outer2.arr[i].f1 || - outer1.arr[i].f2 != outer2.arr[i].f2 || - outer1.arr[i].f3 != outer2.arr[i].f3) - { - Console.WriteLine("\tFAILED! " + methodName + "did not receive result as expected."); - Console.WriteLine("\tThe Actual is..."); - Console.WriteLine("\t{0}.arr[{1}].f1 = {2}", outer1.ToString(), i, outer1.arr[i].f1); - Console.WriteLine("\t{0}.arr[{1}].f2 = {2}", outer1.ToString(), i, outer1.arr[i].f2); - Console.WriteLine("\t{0}.arr[{1}].f3 = {2}", outer1.ToString(), i, outer1.arr[i].f3); - Console.WriteLine("\tThe Expected is..."); - Console.WriteLine("\t{0}.arr[{1}].f1 = {2}", outer2.ToString(), i, outer2.arr[i].f1); - Console.WriteLine("\t{0}.arr[{1}].f2 = {2}", outer2.ToString(), i, outer2.arr[i].f2); - Console.WriteLine("\t{0}.arr[{1}].f3 = {2}", outer2.ToString(), i, outer2.arr[i].f3); - return false; - } - } - Console.WriteLine("\tPASSED!"); - return true; - } - - #endregion - - #region methods for InnerArrayExplicit struct - - // Returns new InnerArrayExplicit instance; the params are the fields of INNER; - // all the INNER elements have the same field values - public static InnerArrayExplicit NewInnerArrayExplicit(int f1, float f2, string f3, string f4) - { - InnerArrayExplicit outer = new InnerArrayExplicit(); - outer.arr = new InnerSequential[Common.NumArrElements]; - for (int i = 0; i < Common.NumArrElements; i++) - { - outer.arr[i].f1 = f1; - outer.arr[i].f2 = f2; - outer.arr[i].f3 = f3; - } - outer.f4 = f4; - return outer; - } - - // Prints InnerArrayExplicit - public static void PrintInnerArrayExplicit(InnerArrayExplicit outer, string name) - { - for (int i = 0; i < Common.NumArrElements; i++) - { - Console.WriteLine("\t{0}.arr[{1}].f1 = {2}", name, i, outer.arr[i].f1); - Console.WriteLine("\t{0}.arr[{1}].f2 = {2}", name, i, outer.arr[i].f2); - Console.WriteLine("\t{0}.arr[{1}].f3 = {2}", name, i, outer.arr[i].f3); - } - Console.WriteLine("\t{0}.f4 = {1}", name, outer.f4); - } - - // Returns true if the two params have the same fields - public static bool ValidateInnerArrayExplicit(InnerArrayExplicit outer1, InnerArrayExplicit InnerArrayExplicit, string methodName) - { - for (int i = 0; i < Common.NumArrElements; i++) - { - if (outer1.arr[i].f1 != InnerArrayExplicit.arr[i].f1) - { - Console.WriteLine("\tFAILED! " + methodName + "did not receive result as expected."); - Console.WriteLine("\tThe Actual f1 field is..."); - Console.WriteLine("\t{0}.arr[{1}].f1 = {2}", outer1.ToString(), i, outer1.arr[i].f1); - Console.WriteLine("\tThe Expected f1 field is..."); - Console.WriteLine("\t{0}.arr[{1}].f1 = {2}", InnerArrayExplicit.ToString(), i, InnerArrayExplicit.arr[i].f1); - return false; - } - } - if (outer1.f4 != InnerArrayExplicit.f4) - { - Console.WriteLine("\tFAILED! " + methodName + "did not receive result as expected."); - Console.WriteLine("\tThe Actual f4 field is..."); - Console.WriteLine("\t{0}.f4 = {1}", outer1.ToString(), outer1.f4); - Console.WriteLine("\tThe Expected f4 field is..."); - Console.WriteLine("\t{0}.f4 = {1}", InnerArrayExplicit.ToString(), InnerArrayExplicit.f4); - return false; - } - Console.WriteLine("\tPASSED!"); - return true; - } - - #endregion - - #region methods for OUTER3 struct - - // Returns new OUTER3 instance; the params are the fields of INNER; - // all the INNER elements have the same field values - public static OUTER3 NewOUTER3(int f1, float f2, string f3, string f4) - { - OUTER3 outer = new OUTER3(); - outer.arr = new InnerSequential[Common.NumArrElements]; - for (int i = 0; i < Common.NumArrElements; i++) - { - outer.arr[i].f1 = f1; - outer.arr[i].f2 = f2; - outer.arr[i].f3 = f3; - } - outer.f4 = f4; - return outer; - } - - // Prints OUTER3 - public static void PrintOUTER3(OUTER3 outer, string name) - { - for (int i = 0; i < Common.NumArrElements; i++) - { - Console.WriteLine("\t{0}.arr[{1}].f1 = {2}", name, i, outer.arr[i].f1); - Console.WriteLine("\t{0}.arr[{1}].f2 = {2}", name, i, outer.arr[i].f2); - Console.WriteLine("\t{0}.arr[{1}].f3 = {2}", name, i, outer.arr[i].f3); - } - Console.WriteLine("\t{0}.f4 = {1}", name, outer.f4); - } - - // Returns true if the two params have the same fields - public static bool ValidateOUTER3(OUTER3 outer1, OUTER3 InnerArrayExplicit, string methodName) - { - for (int i = 0; i < Common.NumArrElements; i++) - { - if (outer1.arr[i].f1 != InnerArrayExplicit.arr[i].f1 || - outer1.arr[i].f2 != InnerArrayExplicit.arr[i].f2 || - outer1.arr[i].f3 != InnerArrayExplicit.arr[i].f3) - { - Console.WriteLine("\tFAILED! " + methodName + "did not receive result as expected."); - Console.WriteLine("\tThe Actual is..."); - Console.WriteLine("\t{0}.arr[{1}].f1 = {2}", outer1.ToString(), i, outer1.arr[i].f1); - Console.WriteLine("\t{0}.arr[{1}].f2 = {2}", outer1.ToString(), i, outer1.arr[i].f2); - Console.WriteLine("\t{0}.arr[{1}].f3 = {2}", outer1.ToString(), i, outer1.arr[i].f3); - Console.WriteLine("\tThe Expected is..."); - Console.WriteLine("\t{0}.arr[{1}].f1 = {2}", InnerArrayExplicit.ToString(), i, InnerArrayExplicit.arr[i].f1); - Console.WriteLine("\t{0}.arr[{1}].f2 = {2}", InnerArrayExplicit.ToString(), i, InnerArrayExplicit.arr[i].f2); - Console.WriteLine("\t{0}.arr[{1}].f3 = {2}", InnerArrayExplicit.ToString(), i, InnerArrayExplicit.arr[i].f3); - return false; - } - } - if (outer1.f4 != InnerArrayExplicit.f4) - { - Console.WriteLine("\tFAILED! " + methodName + "did not receive result as expected."); - Console.WriteLine("\tThe Actual f4 field is..."); - Console.WriteLine("\t{0}.f4 = {1}", outer1.ToString(), outer1.f4); - Console.WriteLine("\tThe Expected f4 field is..."); - Console.WriteLine("\t{0}.f4 = {1}", InnerArrayExplicit.ToString(), InnerArrayExplicit.f4); - return false; - } - Console.WriteLine("\tPASSED!"); - return true; - } - - #endregion - - #region methods for CharSetAnsiSequential struct - - //return CharSetAnsiSequential struct instance - public static CharSetAnsiSequential NewCharSetAnsiSequential(string f1, char f2) - { - CharSetAnsiSequential str1 = new CharSetAnsiSequential(); - str1.f1 = f1; - str1.f2 = f2; - return str1; - } - - //print the struct CharSetAnsiSequential element - public static void PrintCharSetAnsiSequential(CharSetAnsiSequential str1, string name) - { - Console.WriteLine("\t{0}.f1 = {1}", name, str1.f1); - Console.WriteLine("\t{0}.f2 = {1}", name, str1.f2); - } - - // Returns true if the two params have the same fields - public static bool ValidateCharSetAnsiSequential(CharSetAnsiSequential str1, CharSetAnsiSequential str2, string methodName) - { - if (str1.f1 != str2.f1 || str1.f2 != str2.f2) - { - Console.WriteLine("\tFAILED! " + methodName + "did not receive result as expected."); - Console.WriteLine("\tThe Actual is..."); - PrintCharSetAnsiSequential(str1, str1.ToString()); - Console.WriteLine("\tThe Expected is..."); - PrintCharSetAnsiSequential(str2, str2.ToString()); - return false; - } - else - { - Console.WriteLine("\tPASSED!"); - return true; - } - } - - #endregion - - #region methods for CharSetUnicodeSequential struct - - //return the struct CharSetUnicodeSequential instance - public static CharSetUnicodeSequential NewCharSetUnicodeSequential(string f1, char f2) - { - CharSetUnicodeSequential str1 = new CharSetUnicodeSequential(); - str1.f1 = f1; - str1.f2 = f2; - return str1; - } - - //print the struct CharSetUnicodeSequential element - public static void PrintCharSetUnicodeSequential(CharSetUnicodeSequential str1, string name) - { - Console.WriteLine("\t{0}.f1 = {1}", name, str1.f1); - Console.WriteLine("\t{0}.f2 = {1}", name, str1.f2); - } - - // Returns true if the two params have the same fields - public static bool ValidateCharSetUnicodeSequential(CharSetUnicodeSequential str1, CharSetUnicodeSequential str2, string methodName) - { - if (str1.f1 != str2.f1 || str1.f2 != str2.f2) - { - Console.WriteLine("\tFAILED! " + methodName + "did not receive result as expected."); - Console.WriteLine("\tThe Actual is..."); - PrintCharSetUnicodeSequential(str1, str1.ToString()); - Console.WriteLine("\tThe Expected is..."); - PrintCharSetUnicodeSequential(str2, str2.ToString()); - return false; - } - else - { - Console.WriteLine("\tPASSED!"); - return true; - } - } - - #endregion - - #region methods for NumberSequential struct - - public static NumberSequential NewNumberSequential(int i32, uint ui32, short s1, ushort us1, Byte b, SByte sb, - Int16 i16, UInt16 ui16, Int64 i64, UInt64 ui64, Single sgl, Double d) - { - NumberSequential str1 = new NumberSequential(); - str1.i32 = i32; - str1.ui32 = ui32; - str1.s1 = s1; - str1.us1 = us1; - str1.b = b; - str1.sb = sb; - str1.i16 = i16; - str1.ui16 = ui16; - str1.i64 = i64; - str1.ui64 = ui64; - str1.sgl = sgl; - str1.d = d; - return str1; - } - - public static void PrintNumberSequential(NumberSequential str1, string name) - { - Console.WriteLine("\t{0}.i32 = {1}", name, str1.i32); - Console.WriteLine("\t{0}.ui32 = {1}", name, str1.ui32); - Console.WriteLine("\t{0}.s1 = {1}", name, str1.s1); - Console.WriteLine("\t{0}.us1 = {1}", name, str1.us1); - Console.WriteLine("\t{0}.b = {1}", name, str1.b); - Console.WriteLine("\t{0}.sb = {1}", name, str1.sb); - Console.WriteLine("\t{0}.i16 = {1}", name, str1.i16); - Console.WriteLine("\t{0}.ui16 = {1}", name, str1.ui16); - Console.WriteLine("\t{0}.i64 = {1}", name, str1.i64); - Console.WriteLine("\t{0}.ui64 = {1}", name, str1.ui64); - Console.WriteLine("\t{0}.sgl = {1}", name, str1.sgl); - Console.WriteLine("\t{0}.d = {1}", name, str1.d); - } - - public static bool ValidateNumberSequential(NumberSequential str1, NumberSequential str2, string methodName) - { - if (str1.i32 != str2.i32 || str1.ui32 != str2.ui32 || str1.s1 != str2.s1 || - str1.us1 != str2.us1 || str1.b != str2.b || str1.sb != str2.sb || str1.i16 != str2.i16 || - str1.ui16 != str2.ui16 || str1.i64 != str2.i64 || str1.ui64 != str2.ui64 || - str1.sgl != str2.sgl || str1.d != str2.d) - { - Console.WriteLine("\tFAILED! " + methodName + "did not receive result as expected."); - Console.WriteLine("\tThe Actual is..."); - PrintNumberSequential(str1, str1.ToString()); - Console.WriteLine("\tThe Expected is..."); - PrintNumberSequential(str2, str2.ToString()); - return false; - } - else - { - Console.WriteLine("\tPASSED!"); - return true; - } - } - - #endregion - - #region methods for S3 struct - - public static void InitialArray(int[] iarr, int[] icarr) - { - for (int i = 0; i < iarr.Length; i++) - { - iarr[i] = i; - } - - for (int i = 1; i < icarr.Length + 1; i++) - { - icarr[i - 1] = i; - } - } - - public static S3 NewS3(bool flag, string str, int[] vals) - { - S3 str1 = new S3(); - str1.flag = flag; - str1.str = str; - str1.vals = vals; - return str1; - } - - public static void PrintS3(S3 str1, string name) - { - Console.WriteLine("\t{0}.flag = {1}", name, str1.flag); - Console.WriteLine("\t{0}.flag = {1}", name, str1.str); - for (int i = 0; i < str1.vals.Length; i++) - { - Console.WriteLine("\t{0}.vals[{1}] = {2}", name, i, str1.vals[i]); - } - } - - public static bool ValidateS3(S3 str1, S3 str2, string methodName) - { - int iflag = 0; - if (str1.flag != str2.flag || str1.str != str2.str) - { - Console.WriteLine("\tFAILED! " + methodName + "did not receive result as expected."); - Console.WriteLine("\tThe Actual flag field is..."); - Console.WriteLine("\t{0}.flag = {1}", str1.ToString(), str1.flag); - Console.WriteLine("\t{0}.str = {1}", str1.ToString(), str1.str); - Console.WriteLine("\tThe Expected is..."); - Console.WriteLine("\t{0}.flag = {1}", str2.ToString(), str2.flag); - Console.WriteLine("\t{0}.str = {1}", str2.ToString(), str2.str); - return false; - } - for (int i = 0; i < 256; i++) - { - if (str1.vals[i] != str2.vals[i]) - { - Console.WriteLine("\tFAILED! " + methodName + "did not receive result as expected."); - Console.WriteLine("\tThe Actual vals field is..."); - Console.WriteLine("\t{0}.vals[{1}] = {2}", str1.ToString(), i, str1.vals[i]); - Console.WriteLine("\tThe Expected vals field is..."); - Console.WriteLine("\t{0}.vals[{1}] = {2}", str2.ToString(), i, str2.vals[i]); - iflag++; - } - } - if (iflag != 0) - { - return false; - } - Console.WriteLine("\tPASSED!"); - return true; - } - - #endregion - - #region methods for S5 struct - - public static S5 NewS5(int age, string name, Enum1 ef) - { - S4 s4 = new S4(); - s4.age = age; - s4.name = name; - - S5 s5 = new S5(); - s5.s4 = s4; - s5.ef = ef; - - return s5; - } - - public static void PrintS5(S5 str1, string name) - { - Console.WriteLine("\t{0}.s4.age = {1}", str1.s4.age); - Console.WriteLine("\t{0}.s4.name = {1}", str1.s4.name); - Console.WriteLine("\t{0}.ef = {1}", str1.ef.ToString()); - } - - public static bool ValidateS5(S5 str1, S5 str2, string methodName) - { - if (str1.s4.age != str2.s4.age || str1.s4.name != str2.s4.name) - { - Console.WriteLine("\tFAILED! " + methodName + "did not receive result as expected."); - Console.WriteLine("\tThe Actual s4 field is..."); - Console.WriteLine("\t{0}.s4.age = {1}", str1.ToString(), str1.s4.age); - Console.WriteLine("\t{0}.s4.name = {1}", str1.ToString(), str1.s4.name); - Console.WriteLine("\tThe Expected s4 field is..."); - Console.WriteLine("\t{0}.s4.age = {1}", str2.ToString(), str2.s4.age); - Console.WriteLine("\t{0}.s4.name = {1}", str2.ToString(), str2.s4.name); - return false; - } - if (str1.ef != str2.ef) - { - Console.WriteLine("\tFAILED! " + methodName + "did not receive result as expected."); - Console.WriteLine("\tThe Actual ef field is..."); - Console.WriteLine("\t{0}.ef = {1}", str1.ToString(), str1.ef); - Console.WriteLine("\tThe Expected s4 field is..."); - Console.WriteLine("\t{0}.ef = {1}", str2.ToString(), str2.ef); - return false; - } - Console.WriteLine("\tPASSED!"); - return true; - } - - #endregion - - #region methods for StringStructSequentialAnsi struct - - public static StringStructSequentialAnsi NewStringStructSequentialAnsi(string first, string last) - { - StringStructSequentialAnsi s6 = new StringStructSequentialAnsi(); - s6.first = first; - s6.last = last; - - return s6; - } - - public static void PrintStringStructSequentialAnsi(StringStructSequentialAnsi str1, string name) - { - Console.WriteLine("\t{0}.first = {1}", name, str1.first); - Console.WriteLine("\t{0}.last = {1}", name, str1.last); - } - - public static bool ValidateStringStructSequentialAnsi(StringStructSequentialAnsi str1, StringStructSequentialAnsi str2, string methodName) - { - if (str1.first != str2.first || str1.last != str2.last) - { - Console.WriteLine("\tFAILED! " + methodName + "did not receive result as expected."); - Console.WriteLine("\tThe Actual is..."); - PrintStringStructSequentialAnsi(str1, str1.ToString()); - Console.WriteLine("\tThe Expected is..."); - PrintStringStructSequentialAnsi(str2, str2.ToString()); - return false; - } - else - { - Console.WriteLine("\tPASSED!"); - return true; - } - } - - #endregion - - #region methods for StringStructSequentialUnicode struct - - public static StringStructSequentialUnicode NewStringStructSequentialUnicode(string first, string last) - { - StringStructSequentialUnicode s7 = new StringStructSequentialUnicode(); - s7.first = first; - s7.last = last; - - return s7; - } - - public static void PrintStringStructSequentialUnicode(StringStructSequentialUnicode str1, string name) - { - Console.WriteLine("\t{0}.first = {1}", name, str1.first); - Console.WriteLine("\t{0}.last = {1}", name, str1.last); - } - - public static bool ValidateStringStructSequentialUnicode(StringStructSequentialUnicode str1, StringStructSequentialUnicode str2, string methodName) - { - if (str1.first != str2.first || str1.last != str2.last) - { - Console.WriteLine("\tFAILED! " + methodName + "did not receive result as expected."); - Console.WriteLine("\tThe Actual is..."); - PrintStringStructSequentialUnicode(str1, str1.ToString()); - Console.WriteLine("\tThe Expected is..."); - PrintStringStructSequentialUnicode(str2, str2.ToString()); - return false; - } - else - { - Console.WriteLine("\tPASSED!"); - return true; - } - } - - #endregion - - #region methods for S8 struct - - public static S8 NewS8(string name, bool gender, UInt16 jobNum, int i32, uint ui32, sbyte mySByte) - { - S8 s8 = new S8(); - s8.name = name; - s8.gender = gender; - s8.i32 = i32; - s8.ui32 = ui32; - s8.jobNum = jobNum; - s8.mySByte = mySByte; - return s8; - } - - public static void PrintS8(S8 str1, string name) - { - Console.WriteLine("\t{0}.name = {1}", name, str1.name); - Console.WriteLine("\t{0}.gender = {1}", name, str1.gender); - Console.WriteLine("\t{0}.jobNum = {1}", name, str1.jobNum); - Console.WriteLine("\t{0}.i32 = {1}", name, str1.i32); - Console.WriteLine("\t{0}.ui32 = {1}", name, str1.ui32); - Console.WriteLine("\t{0}.mySByte = {1}", name, str1.mySByte); - } - - public static bool ValidateS8(S8 str1, S8 str2, string methodName) - { - if (str1.name != str2.name || str1.gender != str2.gender || - str1.jobNum != str2.jobNum || - str1.i32 != str2.i32 || str1.ui32 != str2.ui32 || str1.mySByte != str2.mySByte) - { - Console.WriteLine("\tFAILED! " + methodName + "did not receive result as expected."); - Console.WriteLine("\tThe Actual is..."); - PrintS8(str1, str1.ToString()); - Console.WriteLine("\tThe Expected is..."); - PrintS8(str2, str2.ToString()); - return false; - } - Console.WriteLine("\tPASSED!"); - return true; - - } - - #endregion - - #region methods for S9 struct - - public static S9 NewS9(int i32, TestDelegate1 testDel1) - { - S9 s9 = new S9(); - s9.i32 = i32; - s9.myDelegate1 = testDel1; - return s9; - } - - public static bool ValidateS9(S9 str1, S9 str2, string methodName) - { - if (str1.i32 != str2.i32 || str1.myDelegate1 != str2.myDelegate1) - { - Console.WriteLine("\tFAILED! " + methodName + "did not receive result as expected."); - Console.WriteLine("\tThe Actual is..."); - Console.WriteLine("\t{0}.i32 = {1}", str1.ToString(), str1.i32); - Console.WriteLine("\t{0}.myDelegate1 = {1}", str1.ToString(), str1.myDelegate1); - Console.WriteLine("\tThe Expected is..."); - Console.WriteLine("\t{0}.i32 = {1}", str2.ToString(), str2.i32); - Console.WriteLine("\t{0}.myDelegate1 = {1}", str2.ToString(), str2.myDelegate1); - return false; - } - Console.WriteLine("\tPASSED!"); - return true; - } - - #endregion - - #region methods for IncludeOuterIntergerStructSequential struct - - public static IncludeOuterIntergerStructSequential NewIncludeOuterIntergerStructSequential(int i321, int i322) - { - IncludeOuterIntergerStructSequential s10 = new IncludeOuterIntergerStructSequential(); - s10.s.s_int.i = i321; - s10.s.i = i322; - return s10; - } - - public static void PrintIncludeOuterIntergerStructSequential(IncludeOuterIntergerStructSequential str1, string name) - { - Console.WriteLine("\t{0}.s.s_int.i = {1}", name, str1.s.s_int.i); - Console.WriteLine("\t{0}.s.i = {1}", name, str1.s.i); - } - - public static bool ValidateIncludeOuterIntergerStructSequential(IncludeOuterIntergerStructSequential str1, IncludeOuterIntergerStructSequential str2, string methodName) - { - if (str1.s.s_int.i != str2.s.s_int.i || str1.s.i != str2.s.i) - { - Console.WriteLine("\tFAILED! " + methodName + "did not receive result as expected."); - Console.WriteLine("\tThe Actual is..."); - PrintIncludeOuterIntergerStructSequential(str1, str1.ToString()); - Console.WriteLine("\tThe Expected is..."); - PrintIncludeOuterIntergerStructSequential(str2, str2.ToString()); - return false; - } - else - { - Console.WriteLine("\tPASSED!"); - return true; - } - } - - #endregion - - #region methods for S11 struct - - unsafe public static void PrintS11(S11 str1, string name) - { - Console.WriteLine("\t{0}.i32 = {1}", name, (int)(str1.i32)); - Console.WriteLine("\t{0}.i = {1}", name, str1.i); - } - - unsafe public static S11 NewS11(int* i32, int i) - { - S11 s11 = new S11(); - s11.i32 = i32; - s11.i = i; - return s11; - } - - unsafe public static bool ValidateS11(S11 str1, S11 str2, string methodName) - { - if (str1.i32 != str2.i32 || str1.i != str2.i) - { - Console.WriteLine("\tFAILED! " + methodName + "did not receive result as expected."); - Console.WriteLine("\tThe Actual is..."); - PrintS11(str1, str1.ToString()); - Console.WriteLine("\tThe Expected is..."); - PrintS11(str2, str2.ToString()); - return false; - } - Console.WriteLine("\tPASSED!"); - return true; - } - - #endregion - - #region methods for U struct - - public static U NewU(int i32, uint ui32, IntPtr iPtr, UIntPtr uiPtr, short s, ushort us, byte b, sbyte sb, long l, ulong ul, float f, double d) - { - U u = new U(); - u.i32 = i32; - u.ui32 = ui32; - u.iPtr = iPtr; - u.uiPtr = uiPtr; - u.s = s; - u.us = us; - u.b = b; - u.sb = sb; - u.l = l; - u.ul = ul; - u.f = f; - u.d = d; - - return u; - } - - public static void PrintU(U str1, string name) - { - Console.WriteLine("\t{0}.i32 = {1}", name, str1.i32); - Console.WriteLine("\t{0}.ui32 = {1}", name, str1.ui32); - Console.WriteLine("\t{0}.iPtr = {1}", name, str1.iPtr); - Console.WriteLine("\t{0}.uiPtr = {1}", name, str1.uiPtr); - Console.WriteLine("\t{0}.s = {1}", name, str1.s); - Console.WriteLine("\t{0}.us = {1}", name, str1.us); - Console.WriteLine("\t{0}.b = {1}", name, str1.b); - Console.WriteLine("\t{0}.sb = {1}", name, str1.sb); - Console.WriteLine("\t{0}.l = {1}", name, str1.l); - Console.WriteLine("\t{0}.ul = {1}", name, str1.ul); - Console.WriteLine("\t{0}.f = {1}", name, str1.f); - Console.WriteLine("\t{0}.d = {1}", name, str1.d); - } - - public static bool ValidateU(U str1, U str2, string methodName) - { - if (str1.i32 != str2.i32 || str1.ui32 != str2.ui32 || str1.iPtr != str2.iPtr || - str1.uiPtr != str2.uiPtr || str1.s != str2.s || str1.us != str2.us || - str1.b != str2.b || str1.sb != str2.sb || str1.l != str2.l || str1.ul != str2.ul || - str1.f != str2.f || str1.d != str2.d) - { - Console.WriteLine("\tFAILED! " + methodName + "did not receive result as expected."); - Console.WriteLine("\tThe Actual is..."); - PrintU(str1, str1.ToString()); - Console.WriteLine("\tThe Expected is..."); - PrintU(str2, str2.ToString()); - return false; - } - Console.WriteLine("\tPASSED!"); - return true; - } - - #endregion - - #region methods for ByteStructPack2Explicit struct - - public static ByteStructPack2Explicit NewByteStructPack2Explicit(byte b1, byte b2) - { - ByteStructPack2Explicit u1 = new ByteStructPack2Explicit(); - u1.b1 = b1; - u1.b2 = b2; - - return u1; - } - - public static void PrintByteStructPack2Explicit(ByteStructPack2Explicit str1, string name) - { - Console.WriteLine("\t{0}.b1 = {1}", name, str1.b1); - Console.WriteLine("\t{0}.b2 = {1}", name, str1.b2); - } - - public static bool ValidateByteStructPack2Explicit(ByteStructPack2Explicit str1, ByteStructPack2Explicit str2, string methodName) - { - if (str1.b1 != str2.b1 || str1.b2 != str2.b2) - { - Console.WriteLine("\tFAILED! " + methodName + "did not receive result as expected."); - Console.WriteLine("\tThe Actual is..."); - PrintByteStructPack2Explicit(str1, str1.ToString()); - Console.WriteLine("\tThe Expected is..."); - PrintByteStructPack2Explicit(str2, str2.ToString()); - return false; - } - else - { - Console.WriteLine("\tPASSED!"); - return true; - } - } - - #endregion - - #region methods for ShortStructPack4Explicit struct - - public static ShortStructPack4Explicit NewShortStructPack4Explicit(short s1, short s2) - { - ShortStructPack4Explicit u2 = new ShortStructPack4Explicit(); - u2.s1 = s1; - u2.s2 = s2; - - return u2; - } - - public static void PrintShortStructPack4Explicit(ShortStructPack4Explicit str1, string name) - { - Console.WriteLine("\t{0}.s1 = {1}", name, str1.s1); - Console.WriteLine("\t{0}.s2 = {1}", name, str1.s2); - } - - public static bool ValidateShortStructPack4Explicit(ShortStructPack4Explicit str1, ShortStructPack4Explicit str2, string methodName) - { - if (str1.s1 != str2.s1 || str1.s2 != str2.s2) - { - Console.WriteLine("\tFAILED! " + methodName + "did not receive result as expected."); - Console.WriteLine("\tThe Actual is..."); - PrintShortStructPack4Explicit(str1, str1.ToString()); - Console.WriteLine("\tThe Expected is..."); - PrintShortStructPack4Explicit(str2, str2.ToString()); - return false; - } - else - { - Console.WriteLine("\tPASSED!"); - return true; - } - } - - #endregion - - #region methods for IntStructPack8Explicit struct - - public static IntStructPack8Explicit NewIntStructPack8Explicit(int i1, int i2) - { - IntStructPack8Explicit u3 = new IntStructPack8Explicit(); - u3.i1 = i1; - u3.i2 = i2; - - return u3; - } - - public static void PrintIntStructPack8Explicit(IntStructPack8Explicit str1, string name) - { - Console.WriteLine("\t{0}.i1 = {1}", name, str1.i1); - Console.WriteLine("\t{0}.i2 = {1}", name, str1.i2); - } - - public static bool ValidateIntStructPack8Explicit(IntStructPack8Explicit str1, IntStructPack8Explicit str2, string methodName) - { - if (str1.i1 != str2.i1 || str1.i2 != str2.i2) - { - Console.WriteLine("\tFAILED! " + methodName + "did not receive result as expected."); - Console.WriteLine("\tThe Actual is..."); - PrintIntStructPack8Explicit(str1, str1.ToString()); - Console.WriteLine("\tThe Expected is..."); - PrintIntStructPack8Explicit(str2, str2.ToString()); - return false; - } - else - { - Console.WriteLine("\tPASSED!"); - return true; - } - } - - #endregion - - #region methods for LongStructPack16Explicit struct - - public static LongStructPack16Explicit NewLongStructPack16Explicit(long l1, long l2) - { - LongStructPack16Explicit u4 = new LongStructPack16Explicit(); - u4.l1 = l1; - u4.l2 = l2; - - return u4; - } - - public static void PrintLongStructPack16Explicit(LongStructPack16Explicit str1, string name) - { - Console.WriteLine("\t{0}.l1 = {1}", name, str1.l1); - Console.WriteLine("\t{0}.l2 = {1}", name, str1.l2); - } - - public static bool ValidateLongStructPack16Explicit(LongStructPack16Explicit str1, LongStructPack16Explicit str2, string methodName) - { - if (str1.l1 != str2.l1 || str1.l2 != str2.l2) - { - Console.WriteLine("\tFAILED! " + methodName + "did not receive result as expected."); - Console.WriteLine("\tThe Actual is..."); - PrintLongStructPack16Explicit(str1, str1.ToString()); - Console.WriteLine("\tThe Expected is..."); - PrintLongStructPack16Explicit(str2, str2.ToString()); - return false; - } - else - { - Console.WriteLine("\tPASSED!"); - return true; - } - } - - #endregion - - #region methods for ByteStruct3Byte struct - public static ByteStruct3Byte NewByteStruct3Byte(byte b1, byte b2, byte b3) - { - ByteStruct3Byte u1 = new ByteStruct3Byte(); - u1.b1 = b1; - u1.b2 = b2; - u1.b3 = b3; - - return u1; - } - public static void PrintByteStruct3Byte(ByteStruct3Byte str1, string name) - { - Console.WriteLine("\t{0}.b1 = {1}", name, str1.b1); - Console.WriteLine("\t{0}.b2 = {1}", name, str1.b2); - Console.WriteLine("\t{0}.b3 = {1}", name, str1.b3); - } - public static bool ValidateByteStruct3Byte(ByteStruct3Byte str1, ByteStruct3Byte str2, string methodName) - { - if (str1.b1 != str2.b1 || str1.b2 != str2.b2) - { - Console.WriteLine("\tFAILED! " + methodName + "did not receive result as expected."); - Console.WriteLine("\tThe Actual is..."); - PrintByteStruct3Byte(str1, str1.ToString()); - Console.WriteLine("\tThe Expected is..."); - PrintByteStruct3Byte(str2, str2.ToString()); - return false; - } - else - { - Console.WriteLine("\tPASSED!"); - return true; - } - } - #endregion - - #region methods for IntergerStructSequential struct - public static IntergerStructSequential NewIntergerStructSequential(int i1) - { - IntergerStructSequential u1 = new IntergerStructSequential(); - u1.i = i1; - - return u1; - } - public static void PrintIntergerStructSequential(IntergerStructSequential str1, string name) - { - Console.WriteLine("\t{0}.i = {1}", name, str1.i); - } - public static bool ValidateIntergerStructSequential(IntergerStructSequential str1, IntergerStructSequential str2, string methodName) - { - if (str1.i != str2.i) - { - Console.WriteLine("\tFAILED! " + methodName + "did not receive result as expected."); - Console.WriteLine("\tThe Actual is..."); - PrintIntergerStructSequential(str1, str1.ToString()); - Console.WriteLine("\tThe Expected is..."); - PrintIntergerStructSequential(str2, str2.ToString()); - return false; - } - else - { - Console.WriteLine("\tPASSED!"); - return true; - } - } - #endregion - -} - -public static class TestFramework -{ - public static void LogInformation(string str) - { - Logging.WriteLine(str); - } - public static void LogError(string id, string msg) - { - Logging.WriteLine("ERROR!!!-" + id + ": " + msg); - } - public static void BeginScenario(string name) - { - Logging.WriteLine("Beginning scenario: " + name); - } -} - -public static class Logging -{ - static TextWriter stdout = Console.Out; - -#if (!WIN_8_P) - static TextWriter loggingFile = null; -#endif - - public static void SetConsole(string fileName) - { -#if (!WIN_8_P) - FileStream fs = new FileStream(fileName, FileMode.Append, FileAccess.Write, FileShare.ReadWrite); - loggingFile = new StreamWriter(fs, Encoding.Unicode); - Console.SetOut(loggingFile); -#endif - } - - public static void ResetConsole() - { -#if (!WIN_8_P) - loggingFile.Close(); -#endif - Console.SetOut(stdout); - } - - public static void WriteLine() - { - Console.WriteLine(); - Console.Out.Flush(); - } - - public static void WriteLine(bool value) - { - Console.WriteLine(value); - Console.Out.Flush(); - } - - public static void WriteLine(char value) - { - Console.WriteLine(value); - Console.Out.Flush(); - } - - public static void WriteLine(char[] buffer) - { - Console.WriteLine(buffer); - Console.Out.Flush(); - } - - public static void WriteLine(char[] buffer, int index, int count) - { - Console.WriteLine(new string(buffer, index, count)); - Console.Out.Flush(); - } - - public static void WriteLine(decimal value) - { - Console.WriteLine(value); - Console.Out.Flush(); - } - - public static void WriteLine(double value) - { - Console.WriteLine(value); - Console.Out.Flush(); - } - - public static void WriteLine(float value) - { - Console.WriteLine(value); - Console.Out.Flush(); - } - - public static void WriteLine(int value) - { - Console.WriteLine(value); - Console.Out.Flush(); - } - - public static void WriteLine(uint value) - { - Console.WriteLine(value); - Console.Out.Flush(); - } - - public static void WriteLine(long value) - { - Console.WriteLine(value); - Console.Out.Flush(); - } - - public static void WriteLine(ulong value) - { - Console.WriteLine(value); - Console.Out.Flush(); - } - - public static void WriteLine(Object value) - { - Console.WriteLine(value); - Console.Out.Flush(); - } - - public static void WriteLine(String value) - { - Console.WriteLine(value); - Console.Out.Flush(); - } - - public static void WriteLine(String format, Object arg0) - { - Console.WriteLine(format, arg0); - Console.Out.Flush(); - } - - public static void WriteLine(String format, Object arg0, Object arg1) - { - Console.WriteLine(format, arg0, arg1); - Console.Out.Flush(); - } - - public static void WriteLine(String format, Object arg0, Object arg1, Object arg2) - { - Console.WriteLine(format, arg0, arg1, arg2); - Console.Out.Flush(); - } - - public static void WriteLine(String format, params Object[] arg) - { - Console.WriteLine(format, arg); - Console.Out.Flush(); - } - - public static void Write(String format, Object arg0) - { - Console.Write(format, arg0); - Console.Out.Flush(); - } - - public static void Write(String format, Object arg0, Object arg1) - { - Console.Write(format, arg0, arg1); - Console.Out.Flush(); - } - - public static void Write(String format, Object arg0, Object arg1, Object arg2) - { - Console.Write(format, arg0, arg1, arg2); - Console.Out.Flush(); - } - - public static void Write(String format, params Object[] arg) - { - Console.Write(format, arg); - Console.Out.Flush(); - } - - public static void Write(bool value) - { - Console.Write(value); - Console.Out.Flush(); - } - - public static void Write(char value) - { - Console.Write(value); - Console.Out.Flush(); - } - - public static void Write(char[] buffer) - { - Console.Write(buffer); - Console.Out.Flush(); - } - -#if (!WIN_8_P) - public static void Write(char[] buffer, int index, int count) - { - Console.Write(buffer, index, count); - Console.Out.Flush(); - } -#endif - - public static void Write(double value) - { - Console.Write(value); - Console.Out.Flush(); - } - - public static void Write(decimal value) - { - Console.Write(value); - Console.Out.Flush(); - } - - public static void Write(float value) - { - Console.Write(value); - Console.Out.Flush(); - } - - public static void Write(int value) - { - Console.Write(value); - Console.Out.Flush(); - } - - public static void Write(uint value) - { - Console.Write(value); - Console.Out.Flush(); - } - - public static void Write(long value) - { - Console.Write(value); - Console.Out.Flush(); - } - - public static void Write(ulong value) - { - Console.Write(value); - Console.Out.Flush(); - } - - public static void Write(Object value) - { - Console.Write(value); - Console.Out.Flush(); - } - - public static void Write(String value) - { - Console.Write(value); - Console.Out.Flush(); - } - -} diff --git a/src/coreclr/tests/src/Interop/StructMarshalling/ReversePInvoke/MarshalExpStruct/DelegatePInvoke/DelegatePInvokeTest.cs b/src/coreclr/tests/src/Interop/StructMarshalling/ReversePInvoke/MarshalExpStruct/DelegatePInvoke/DelegatePInvokeTest.cs deleted file mode 100644 index a76dd892fc7d..000000000000 Binary files a/src/coreclr/tests/src/Interop/StructMarshalling/ReversePInvoke/MarshalExpStruct/DelegatePInvoke/DelegatePInvokeTest.cs and /dev/null differ diff --git a/src/coreclr/tests/src/Interop/StructMarshalling/ReversePInvoke/MarshalSeqStruct/DelegatePInvoke/DelegatePInvokeTest.cs b/src/coreclr/tests/src/Interop/StructMarshalling/ReversePInvoke/MarshalSeqStruct/DelegatePInvoke/DelegatePInvokeTest.cs deleted file mode 100644 index ad63deebdd25..000000000000 Binary files a/src/coreclr/tests/src/Interop/StructMarshalling/ReversePInvoke/MarshalSeqStruct/DelegatePInvoke/DelegatePInvokeTest.cs and /dev/null differ diff --git a/src/coreclr/tests/src/Interop/UnmanagedCallersOnly/CMakeLists.txt b/src/coreclr/tests/src/Interop/UnmanagedCallersOnly/CMakeLists.txt deleted file mode 100644 index d770209f9823..000000000000 --- a/src/coreclr/tests/src/Interop/UnmanagedCallersOnly/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -project (UnmanagedCallersOnlyDll) -include ("${CLR_INTEROP_TEST_ROOT}/Interop.cmake") -set(SOURCES UnmanagedCallersOnlyDll.cpp ) - -# add the executable -add_library (UnmanagedCallersOnlyDll SHARED ${SOURCES}) -target_link_libraries(UnmanagedCallersOnlyDll ${LINK_LIBRARIES_ADDITIONAL}) - -# add the install targets -install (TARGETS UnmanagedCallersOnlyDll DESTINATION bin) diff --git a/src/coreclr/tests/src/Interop/WinRT/Program.cs b/src/coreclr/tests/src/Interop/WinRT/Program.cs deleted file mode 100644 index c76afb5837eb..000000000000 --- a/src/coreclr/tests/src/Interop/WinRT/Program.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices.WindowsRuntime; -using TestLibrary; - -namespace WinRT -{ - [WindowsRuntimeImport] - interface I {} - - class Program - { - [MethodImpl(MethodImplOptions.NoInlining)] - private static bool ObjectIsI(object o) => o is I; - - public static int Main(string[] args) - { - try - { - Assert.Throws(() => ObjectIsI(new object())); - } - catch (System.Exception ex) - { - Console.WriteLine(ex); - return 101; - } - return 100; - } - } -} - diff --git a/src/coreclr/tests/src/JIT/CodeGenBringUpTests/Array1.cs b/src/coreclr/tests/src/JIT/CodeGenBringUpTests/Array1.cs deleted file mode 100644 index 02816151861b..000000000000 --- a/src/coreclr/tests/src/JIT/CodeGenBringUpTests/Array1.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; - -public class BringUpTest -{ - const int Pass = 100; - const int Fail = -1; - - [MethodImplAttribute(MethodImplOptions.NoInlining)] - static void Array1(int[] a) - { - a[1] = 5; - } - - static int Main() - { - int[] a = {1, 2, 3, 4}; - Array1(a); - - if (a[1] != 5) return Fail; - return Pass; - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/JIT/CodeGenBringUpTests/Array2.cs b/src/coreclr/tests/src/JIT/CodeGenBringUpTests/Array2.cs deleted file mode 100644 index e73b2712db1c..000000000000 --- a/src/coreclr/tests/src/JIT/CodeGenBringUpTests/Array2.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; - -public class BringUpTest -{ - const int Pass = 100; - const int Fail = -1; - - [MethodImplAttribute(MethodImplOptions.NoInlining)] - static int Array2(int[] a) - { - return a[1]; - } - - static int Main() - { - int[] a = {1, 2, 3, 4}; - if (Array2(a) != 2) return Fail; - return Pass; - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/JIT/Directed/Arrays/simple1.cs b/src/coreclr/tests/src/JIT/Directed/Arrays/simple1.cs deleted file mode 100644 index 49e6414108f2..000000000000 --- a/src/coreclr/tests/src/JIT/Directed/Arrays/simple1.cs +++ /dev/null @@ -1,72 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -public -// Do a simple 5 dimensional Jagged array. - -class Simple_Array_Test -{ - public static int Main( String[] args ) - { - Console.WriteLine("Starting..."); - int SIZE = 10; - - //Create an array that is jagged. - // in last 2d, the array looks like: - // Int32 - // Int32 Int32 - // Int32 Int32 Int32 - // Int32 Int32 Int32 Int32 - // Int32 Int32 Int32 Int32 Int32 - // - - Int32 [][][][][] foo = new Int32[SIZE][][][][]; - int i,j,k,l,m; - Int64 sum=0; - - for(i=0;iNullable types have a default single-parameter constructor -// -// A nullable type can be created with a single argument constructor -// The HasValue property will be set to true, and the Value property will get the value of the constructor -// - -#pragma warning disable 0649 - -using System; - - -interface BaseInter { } -interface GenInter { } - -struct Struct { } -struct ImplStruct : BaseInter { } -struct OpenGenImplStruct : GenInter { } -struct CloseGenImplStruct : GenInter { } - -class Foo { } - -class NullableTest1 -{ - static int? i = new int?(1); - static Struct? s = new Struct?(new Struct()); - static ImplStruct? imps = new ImplStruct?(new ImplStruct()); - static OpenGenImplStruct? genfoo = new OpenGenImplStruct?(new OpenGenImplStruct()); - static CloseGenImplStruct? genint = new CloseGenImplStruct?(new CloseGenImplStruct()); - - - public static void Run() - { - Test.Eval(i.HasValue); - Test.Eval(i.Value, 1); - Test.Eval(s.HasValue); - Test.Eval(s.Value, default(Struct)); - Test.Eval(imps.HasValue); - Test.Eval(imps.Value, default(ImplStruct)); - Test.Eval(genfoo.HasValue); - Test.Eval(genfoo.Value, default(OpenGenImplStruct)); - Test.Eval(genint.HasValue); - Test.Eval(genint.Value, default(CloseGenImplStruct)); - } -} - -class NullableTests -{ - public static void Run() - { - NullableTest1.Run(); - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/JIT/Directed/perffix/primitivevt/callconv1.cs b/src/coreclr/tests/src/JIT/Directed/perffix/primitivevt/callconv1.cs deleted file mode 100644 index b9b417431c82..000000000000 --- a/src/coreclr/tests/src/JIT/Directed/perffix/primitivevt/callconv1.cs +++ /dev/null @@ -1,116 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -namespace PrimitiveVT -{ - internal unsafe class CallConv1 - { - private static Random s_rand = new Random(); - private VT1A _vt1a; - private static VT1A s_x; - - private static int f1(VT1B x, VT1B y) { return x.m + y.m; } - private VT1B f2a(VT1A x, VT1B y) { VT1B z; z.m = x.m + y.m; return z; } - private VT1B f2b(VT1A x, VT1B y) { return f2a(x, y); } - private VT1B f2(VT1A x, VT1B y) { return f2b(x, y); } - private static int f3(ref VT1B x, VT1B y) { return x.m - y.m; } - private VT1B f4(VT1A x, VT1B y) { VT1B z; z.m = x.m - y.m; return z; } - private static int f5(VT1B x, VT1A y) { return x.m * y.m; } - private int f6(VT1B[] x, VT1B y) { return x[0].m * y.m; } - private VT1B f7(VT1A x, VT1B y) { return f4(x, y); } - private float f8(VT1A x, VT1B y) { return x.m / y.m; } - - private static VT1B[,] f9a() { return new VT1B[1, 2]; } - private static VT1B[,] f9() { return f9a(); } - private int f10(params VT1B[] args) { int sum = 0; for (int i = 0; i < args.Length; sum += args[i], i++) { }; return sum; } - - - private static int Main() - { - int a = s_rand.Next(); - - CallConv1 t = new CallConv1(); - t._vt1a.m = a; - - VT1B vt1b = (VT1B)t._vt1a; - - int b = vt1b; - if (b != a) - { - Console.WriteLine("FAILED, b!=a"); - return 1; - } - - int c = (int)(VT1B)(VT1A)(VT1B)(int)(VT1B)t._vt1a; - if (c != b) - { - Console.WriteLine("FAILED, c!=b"); - return 1; - } - - int d = s_rand.Next(); - int e = Int32.MinValue; - int f = Int32.MaxValue / 2; - s_x = new VT1A(); - VT1B[] yarr = new VT1B[2]; - yarr[0] = new VT1B(e); - VT1B y = yarr[0]; - s_x.m = d; - VT1B u = s_x * y - (new VT1B(f)) + yarr[0] + (VT1B)s_x + (VT1B)f + y * s_x + (int)(s_x / (d % 2 == 0 ? (VT1B)(d / 2) : (VT1B)(d + 1 / 2))); - int w = f5((VT1B)s_x, (VT1A)y) + t.f6(yarr, (VT1B)s_x) + f1(y, d) + (int)t.f8((VT1A)(VT1B)d, (d % 2 == 0 ? (VT1B)(d / 2) : (VT1B)(d + 1 / 2))); - if (u != w) - { - Console.WriteLine("FAILED, u!=w"); - Console.WriteLine(u); - Console.WriteLine(w); - return 1; - } - - for (VT1B z = 3; z <= 10; z++, t.f2((VT1A)y, 1)) { } - - if (f3(ref y, Int32.MinValue) != 0) - { - Console.WriteLine("FAILED, f3(y,Int32.MinValue)!=0"); - Console.WriteLine(f3(ref y, Int32.MinValue)); - return 1; - } - - VT1B* o = stackalloc VT1B[3]; - o[0] = 1; - o[1] = 2; - o[2] = 3; - - if ((t.f7((VT1A)o[2], o[0])) != 2) - { - Console.WriteLine("FAILED (t.f7((VT1A)o[2], o[0]))!=2"); - Console.WriteLine(t.f7((VT1A)o[2], o[0])); - return 1; - } - - VT1B[][,] arr = new VT1B[2][,]; - arr[1] = f9(); - arr[1][0, 0] = (VT1B)(*o); - - if ((t.f10(arr[1][0, 0])) != 1) - { - Console.WriteLine("FAILED (t.f10(arr[1][0,0]))!=1"); - Console.WriteLine(t.f10(arr[1][0, 0])); - return 1; - } - - if ((t.f10(arr[1][0, 0], t.f7((VT1A)(new VT1B(2)), (VT1B)o[0]), 4)) != 6) - { - Console.WriteLine("FAILED (t.f10(arr[1][0,0], t.f7((VT1A)(new VT1B(2)), (VT1B)o[0]), 4))!=6"); - Console.WriteLine(t.f10(arr[1][0, 0], t.f7((VT1A)(new VT1B(2)), (VT1B)o[0]), 4)); - return 1; - } - - Console.WriteLine("PASSED"); - return 100; - } - } -} - diff --git a/src/coreclr/tests/src/JIT/Directed/perffix/primitivevt/callconv2.cs b/src/coreclr/tests/src/JIT/Directed/perffix/primitivevt/callconv2.cs deleted file mode 100644 index ad1a4ae8e4cc..000000000000 --- a/src/coreclr/tests/src/JIT/Directed/perffix/primitivevt/callconv2.cs +++ /dev/null @@ -1,116 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -namespace PrimitiveVT -{ - internal unsafe class CallConv2 - { - private static Random s_rand = new Random(); - private VT2A _vt1a; - private static VT2A s_x; - - private static uint f1(VT2B x, VT2B y) { return x.m + y.m; } - private VT2B f2a(VT2A x, VT2B y) { VT2B z; z.m = x.m + y.m; return z; } - private VT2B f2b(VT2A x, VT2B y) { return f2a(x, y); } - private VT2B f2(VT2A x, VT2B y) { return f2b(x, y); } - private static uint f3(ref VT2B x, VT2B y) { return x.m - y.m; } - private VT2B f4(VT2A x, VT2B y) { VT2B z; z.m = x.m - y.m; return z; } - private static uint f5(VT2B x, VT2A y) { return x.m * y.m; } - private uint f6(VT2B[] x, VT2B y) { return x[0].m * y.m; } - private VT2B f7(VT2A x, VT2B y) { return f4(x, y); } - private float f8(VT2A x, VT2B y) { return x.m / y.m; } - - private static VT2B[,] f9a() { return new VT2B[1, 2]; } - private static VT2B[,] f9() { return f9a(); } - private uint f10(params VT2B[] args) { uint sum = 0; for (uint i = 0; i < args.Length; sum += args[i], i++) { }; return sum; } - - - private static int Main() - { - uint a = (uint)s_rand.Next(); - - CallConv2 t = new CallConv2(); - t._vt1a.m = a; - - VT2B vt1b = (VT2B)t._vt1a; - - uint b = vt1b; - if (b != a) - { - Console.WriteLine("FAILED, b!=a"); - return 1; - } - - uint c = (uint)(VT2B)(VT2A)(VT2B)(uint)(VT2B)t._vt1a; - if (c != b) - { - Console.WriteLine("FAILED, c!=b"); - return 1; - } - - uint d = (uint)s_rand.Next(); - uint e = UInt32.MinValue + 2; - uint f = UInt32.MaxValue / 2; - s_x = new VT2A(); - VT2B[] yarr = new VT2B[2]; - yarr[0] = new VT2B(e); - VT2B y = yarr[0]; - s_x.m = d; - VT2B u = s_x * y - (new VT2B(f)) + yarr[0] + (VT2B)s_x + (VT2B)f + y * s_x + (uint)(s_x / (d % 2 == 0 ? (VT2B)(d / 2) : (VT2B)(d + 1 / 2))); - uint w = f5((VT2B)s_x, (VT2A)y) + t.f6(yarr, (VT2B)s_x) + f1(y, d) + (uint)t.f8((VT2A)(VT2B)d, (d % 2 == 0 ? (VT2B)(d / 2) : (VT2B)(d + 1 / 2))); - if (u != w) - { - Console.WriteLine("FAILED, u!=w"); - Console.WriteLine(u); - Console.WriteLine(w); - return 1; - } - - for (VT2B z = 3; z <= 10; z++, t.f2((VT2A)y, 1)) { } - - if (f3(ref y, UInt32.MinValue) != 2) - { - Console.WriteLine("FAILED, f3(y,UInt32.MinValue)!=2"); - Console.WriteLine(f3(ref y, UInt32.MinValue)); - return 1; - } - - VT2B* o = stackalloc VT2B[3]; - o[0] = 1; - o[1] = 2; - o[2] = 3; - - if ((t.f7((VT2A)o[2], o[0])) != 2) - { - Console.WriteLine("FAILED (t.f7((VT2A)o[2], o[0]))!=2"); - Console.WriteLine(t.f7((VT2A)o[2], o[0])); - return 1; - } - - VT2B[][,] arr = new VT2B[2][,]; - arr[1] = f9(); - arr[1][0, 0] = (VT2B)(*o); - - if ((t.f10(arr[1][0, 0])) != 1) - { - Console.WriteLine("FAILED (t.f10(arr[1][0,0]))!=1"); - Console.WriteLine(t.f10(arr[1][0, 0])); - return 1; - } - - if ((t.f10(arr[1][0, 0], t.f7((VT2A)(new VT2B(2)), (VT2B)o[0]), 4)) != 6) - { - Console.WriteLine("FAILED (t.f10(arr[1][0,0], t.f7((VT2A)(new VT2B(2)), (VT2B)o[0]), 4))!=6"); - Console.WriteLine(t.f10(arr[1][0, 0], t.f7((VT2A)(new VT2B(2)), (VT2B)o[0]), 4)); - return 1; - } - - Console.WriteLine("PASSED"); - return 100; - } - } -} - diff --git a/src/coreclr/tests/src/JIT/Directed/pinvoke/jump.il b/src/coreclr/tests/src/JIT/Directed/pinvoke/jump.il deleted file mode 100644 index 609bd8036a8b..000000000000 --- a/src/coreclr/tests/src/JIT/Directed/pinvoke/jump.il +++ /dev/null @@ -1,88 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly jump { } -.namespace JitTest -{ - .class private sequential ansi sealed beforefieldinit SYSTEM_INFO - extends [mscorlib]System.ValueType - { - .field private unsigned int32 dwOemId - .field private unsigned int32 dwPageSize - .field private native uint lpMinimumApplicationAddress - .field private native uint lpMaximumApplicationAddress - .field private native uint dwActiveProcessorMask - .field private unsigned int32 dwNumberOfProcessors - .field private unsigned int32 dwProcessorType - .field private unsigned int32 dwAllocationGranularity - .field private unsigned int16 wProcessorLevel - .field private unsigned int16 wProcessorRevision - .method public hidebysig static pinvokeimpl("kernel32" ansi winapi) - void GetSystemInfo(valuetype JitTest.SYSTEM_INFO& si) cil managed preservesig - { - } - .method public hidebysig static void MyGetSystemInfo(valuetype JitTest.SYSTEM_INFO& si) cil managed - { - .maxstack 100 - ldstr "in MyGetSystemInfo" - call void [System.Console]System.Console::WriteLine(string) - jmp void JitTest.SYSTEM_INFO::GetSystemInfo(valuetype JitTest.SYSTEM_INFO& si) - } - .method public hidebysig static int32 - Main() cil managed - { - .entrypoint - // Code size 83 (0x53) - .maxstack 3 - .locals (valuetype JitTest.SYSTEM_INFO V_0, - int32 V_1) - IL_0000: ldloca.s V_0 - IL_0002: initobj JitTest.SYSTEM_INFO - .try - { - IL_0008: ldloca.s V_0 - IL_000a: call void JitTest.SYSTEM_INFO::MyGetSystemInfo(valuetype JitTest.SYSTEM_INFO&) - IL_000f: leave.s IL_004d - - } // end .try - finally - { - IL_0011: ldloca.s V_0 - IL_0013: ldflda unsigned int32 JitTest.SYSTEM_INFO::dwNumberOfProcessors - IL_0018: call instance string [mscorlib]System.UInt32::ToString() - IL_001d: ldstr " processor(s) found" - IL_0022: call string [mscorlib]System.String::Concat(string, - string) - IL_0027: call void [System.Console]System.Console::WriteLine(string) - IL_002c: ldstr "Allocation granularity is " - IL_0031: ldloca.s V_0 - IL_0033: ldflda unsigned int32 JitTest.SYSTEM_INFO::dwAllocationGranularity - IL_0038: call instance string [mscorlib]System.UInt32::ToString() - IL_003d: ldstr " for this system." - IL_0042: call string [mscorlib]System.String::Concat(string, - string, - string) - IL_0047: call void [System.Console]System.Console::WriteLine(string) - IL_004c: endfinally - } // end handler - IL_004d: ldc.i4 100 - IL_004e: stloc.1 - IL_004f: br.s IL_0051 - - IL_0051: ldloc.1 - IL_0052: ret - } // end of method SYSTEM_INFO::Main - - } // end of class SYSTEM_INFO - -} // end of namespace JitTest - -//*********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file jump.res diff --git a/src/coreclr/tests/src/JIT/Directed/pinvoke/sin.cs b/src/coreclr/tests/src/JIT/Directed/pinvoke/sin.cs deleted file mode 100644 index 2ad75e410516..000000000000 --- a/src/coreclr/tests/src/JIT/Directed/pinvoke/sin.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace JitTest -{ - using System; - using System.Text; - using System.Runtime.InteropServices; - - internal class Test - { - [DllImport("msvcrt", EntryPoint = "sin", CallingConvention = CallingConvention.Cdecl)] - private static extern double sin(double x); - - [DllImport("msvcrt", EntryPoint = "acos", CallingConvention = CallingConvention.Cdecl)] - private static extern double acos(double x); - - private static int Main() - { - for (double x = 0.0; x <= 3.1415926535897; x += 0.14) - { - if (Math.Abs(sin(x) - Math.Sin(x)) > 0.00001) - { - Console.WriteLine("=== FAILED ==="); - Console.WriteLine("for x = " + x.ToString()); - return 101; - } - } - for (double x = -1.0; x <= 1.0; x += 0.1) - { - if (Math.Abs(acos(x) - Math.Acos(x)) > 0.00001) - { - Console.WriteLine("=== FAILED ==="); - Console.WriteLine("for x = " + x.ToString()); - return 102; - } - } - Console.WriteLine("=== PASSED ==="); - return 100; - } - } -} diff --git a/src/coreclr/tests/src/JIT/Directed/pinvoke/tail.il b/src/coreclr/tests/src/JIT/Directed/pinvoke/tail.il deleted file mode 100644 index 6237a6aba58e..000000000000 --- a/src/coreclr/tests/src/JIT/Directed/pinvoke/tail.il +++ /dev/null @@ -1,225 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - -.assembly extern mscorlib { } -.assembly menus { } -.namespace JitTest -{ - .class private auto ansi beforefieldinit Test - extends [mscorlib]System.Object - { - .method private hidebysig static pinvokeimpl("PInvokeExampleNative" ansi winapi) - native uint CreatePopupMenu() cil managed preservesig - { - } - .method private hidebysig static pinvokeimpl("PInvokeExampleNative" ansi winapi) - bool DestroyMenu(native uint hMenu) cil managed preservesig - { - } - .method private hidebysig static pinvokeimpl("PInvokeExampleNative" ansi winapi) - bool AppendMenu(native uint hMenu, - unsigned int32 uFlags, - unsigned int32 uID, - string item) cil managed preservesig - { - } - .method private hidebysig static pinvokeimpl("PInvokeExampleNative" ansi winapi) - int32 GetMenuString(native uint hMenu, - unsigned int32 uIDItem, - class [mscorlib]System.Text.StringBuilder data, - int32 nMaxCount, - unsigned int32 uFlag) cil managed preservesig - { - } - - .method private hidebysig static native uint __CreatePopupMenu() cil managed - { - tail. call native uint JitTest.Test::CreatePopupMenu() - ret - } - .method private hidebysig static bool __DestroyMenu(native uint hMenu) cil managed - { - ldarg.0 - ldftn bool JitTest.Test::DestroyMenu(native uint) - tail. calli bool(native uint) - ret - } - .method private hidebysig static bool __AppendMenu(native uint hMenu, - unsigned int32 uFlags, - unsigned int32 uID, - string item) cil managed - { - .locals (bool) - .try { - ldarg.0 - ldarg.1 - ldarg.2 - ldarg.3 - call bool JitTest.Test::AppendMenu(native uint, - unsigned int32, - unsigned int32, - string) - stloc.0 - leave.s IL_END - } - catch [mscorlib]System.Exception - { - ldc.i4.0 - stloc.0 - leave.s IL_END - } - IL_END: - ldloc.0 - ret - } - .method private hidebysig static int32 __GetMenuString(native uint hMenu, - unsigned int32 uIDItem, - class [mscorlib]System.Text.StringBuilder data, - int32 nMaxCount, - unsigned int32 uFlag) cil managed - { - ldarga.s 0 - pop - jmp int32 JitTest.Test::GetMenuString(native uint, - unsigned int32, - class [mscorlib]System.Text.StringBuilder, - int32, - unsigned int32) - } - - .method private hidebysig static int32 - Main() cil managed - { - .entrypoint - .maxstack 5 - .locals (native uint V_0, - unsigned int32 V_1, - class [mscorlib]System.Text.StringBuilder V_2, - int32 V_3) - IL_0000: call native uint JitTest.Test::__CreatePopupMenu() - IL_0005: stloc.0 - IL_0006: ldloc.0 - IL_0007: brtrue.s IL_001b - - IL_0009: ldstr "CreatePopupMenu failed" - IL_000e: call void [System.Console]System.Console::WriteLine(string) - IL_0013: ldc.i4.s 101 - IL_0015: stloc.3 - IL_0016: br IL_00af - - .try - { - IL_001b: ldc.i4.0 - IL_001c: stloc.1 - IL_001d: br.s IL_003c - - IL_001f: ldloc.0 - IL_0020: ldc.i4.0 - IL_0021: ldloc.1 - IL_0022: ldc.i4.1 - IL_0023: add - IL_0024: ldloca.s V_1 - IL_0026: call instance string [mscorlib]System.UInt32::ToString() - IL_002b: call bool JitTest.Test::__AppendMenu(native uint, - unsigned int32, - unsigned int32, - string) - IL_0030: brtrue.s IL_0038 - - IL_0032: newobj instance void [mscorlib]System.Exception::.ctor() - IL_0037: throw - - IL_0038: ldloc.1 - IL_0039: ldc.i4.1 - IL_003a: add - IL_003b: stloc.1 - IL_003c: ldloc.1 - IL_003d: ldc.i4.s 30 - IL_003f: blt.un.s IL_001f - - IL_0041: ldloc.1 - IL_0042: ldc.i4.1 - IL_0043: sub - IL_0044: stloc.1 - IL_0045: br.s IL_008a - - IL_0047: ldc.i4 0x3e8 - IL_004c: newobj instance void [mscorlib]System.Text.StringBuilder::.ctor(int32) - IL_0051: stloc.2 - IL_0052: ldloc.0 - IL_0053: ldloc.1 - IL_0054: ldloc.2 - IL_0055: ldc.i4 0x3e7 - IL_005a: ldc.i4 0x400 - IL_005f: call int32 JitTest.Test::__GetMenuString(native uint, - unsigned int32, - class [mscorlib]System.Text.StringBuilder, - int32, - unsigned int32) - IL_0064: brtrue.s IL_006c - - IL_0066: newobj instance void [mscorlib]System.Exception::.ctor() - IL_006b: throw - - IL_006c: ldloc.2 - IL_006d: callvirt instance string [mscorlib]System.Text.StringBuilder::ToString() - IL_0072: ldloca.s V_1 - IL_0074: call instance string [mscorlib]System.UInt32::ToString() - IL_0079: call bool [mscorlib]System.String::op_Inequality(string, - string) - IL_007e: brfalse.s IL_0086 - - IL_0080: newobj instance void [mscorlib]System.Exception::.ctor() - IL_0085: throw - - IL_0086: ldloc.1 - IL_0087: ldc.i4.1 - IL_0088: sub - IL_0089: stloc.1 - IL_008a: ldloc.1 - IL_008b: ldc.i4.s 30 - IL_008d: blt.un.s IL_0047 - - IL_008f: leave.s IL_00a0 - - } // end .try - finally - { - IL_0091: ldloc.0 - IL_0092: call bool JitTest.Test::__DestroyMenu(native uint) - IL_0097: brtrue.s IL_009f - - IL_0099: newobj instance void [mscorlib]System.Exception::.ctor() - IL_009e: throw - - IL_009f: endfinally - } // end handler - IL_00a0: ldstr "=== PASSED ===" - IL_00a5: call void [System.Console]System.Console::WriteLine(string) - IL_00aa: ldc.i4.s 100 - IL_00ac: stloc.3 - IL_00ad: br.s IL_00af - - IL_00af: ldloc.3 - IL_00b0: ret - } // end of method Test::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method Test::.ctor - - } // end of class Test - -} // end of namespace JitTest diff --git a/src/coreclr/tests/src/JIT/Directed/tailcall/tailcall.il b/src/coreclr/tests/src/JIT/Directed/tailcall/tailcall.il deleted file mode 100644 index 171d986b74bb..000000000000 --- a/src/coreclr/tests/src/JIT/Directed/tailcall/tailcall.il +++ /dev/null @@ -1,331 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - -.assembly extern System.Console { auto } -.assembly extern System.Runtime.Extensions { auto } -.assembly extern mscorlib { auto } - -.assembly tailcall -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module tailcall.exe -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 -.corflags 0x00000001 - - - -.class interface private abstract auto ansi IFace1 -{ - .method public hidebysig newslot abstract virtual - instance int32 Recurse3(int32 depth) cil managed - { - } - - .method public hidebysig newslot abstract virtual - instance int32 Recurse4(int32 depth, - object o1, - object o2) cil managed - { - } - -} - -.class public auto ansi beforefieldinit Class1 - extends [mscorlib]System.Object - implements IFace1 -{ - .field private static int32 MaxDepth - .field private static int32 Expected - .field private int32 'value' - .method public hidebysig instance int32 - Recurse1(int32 depth) cil managed - { - .maxstack 5 - IL_0000: ldarg.1 - IL_0001: brtrue.s IL_000a - - IL_0003: ldarg.0 - IL_0004: ldfld int32 Class1::'value' - IL_0009: ret - - IL_000a: ldarg.0 - IL_000b: dup - IL_000c: ldfld int32 Class1::'value' - IL_0011: ldarg.1 - IL_0012: add - IL_0013: stfld int32 Class1::'value' - IL_0018: ldarg.1 - IL_0019: ldc.i4 0x80 - IL_001e: rem - IL_001f: ldc.i4.s 43 - IL_0021: bne.un.s IL_002d - - IL_0023: ldarg.0 - IL_0024: ldarg.1 - IL_0025: ldc.i4.1 - IL_0026: sub - IL_0027: tail. callvirt instance int32 Class1::Recurse3(int32) - IL_002c: ret - - IL_002d: ldarg.0 - IL_002e: ldarg.1 - IL_002f: ldc.i4.1 - IL_0030: sub - IL_0031: ldarg.1 - IL_0032: box [mscorlib]System.Int32 - IL_0037: ldarg.1 - IL_0038: ldc.i4.1 - IL_0039: add - IL_003a: box [mscorlib]System.Int32 - IL_003f: tail. call instance int32 Class1::Recurse2(int32, - object, - object) - IL_0044: ret - } - - .method public hidebysig instance int32 - Recurse2(int32 depth, - object o1, - object o2) cil managed - { - .maxstack 4 - .locals init (string V_0) - IL_0000: ldarg.1 - IL_0001: brtrue.s IL_000a - - IL_0003: ldarg.0 - IL_0004: ldfld int32 Class1::'value' - IL_0009: ret - - IL_000a: ldarg.1 - IL_000b: ldsfld int32 Class1::MaxDepth - IL_0010: ldc.i4.s 10 - IL_0012: div - IL_0013: rem - IL_0014: ldc.i4.s 100 - IL_0016: bne.un.s IL_0051 - - IL_0018: call string [System.Runtime.Extensions]System.Environment::get_StackTrace() - IL_001d: stloc.0 - IL_001e: ldloc.0 - IL_001f: ldstr "Main" - IL_0024: callvirt instance int32 [mscorlib]System.String::IndexOf(string) - IL_0029: ldc.i4.m1 - IL_002a: bne.un.s IL_004c - - IL_002c: ldstr "Unexpected stack trace: " - IL_0031: ldloc.0 - IL_0032: call string [mscorlib]System.String::Concat(string, - string) - IL_0037: call void [System.Console]System.Console::WriteLine(string) - IL_003c: ldstr "Test Failed" - IL_0041: call void [System.Console]System.Console::WriteLine(string) - IL_0046: ldc.i4.0 - IL_0047: call void [System.Runtime.Extensions]System.Environment::Exit(int32) - IL_004c: call void [mscorlib]System.GC::Collect() - IL_0051: ldarg.0 - IL_0052: dup - IL_0053: ldfld int32 Class1::'value' - IL_0058: ldarg.2 - IL_0059: unbox [mscorlib]System.Int32 - IL_005e: ldind.i4 - IL_005f: ldarg.3 - IL_0060: unbox [mscorlib]System.Int32 - IL_0065: ldind.i4 - IL_0066: add - IL_0067: add - IL_0068: stfld int32 Class1::'value' - IL_006d: ldarg.0 - IL_006e: ldarg.1 - IL_006f: ldc.i4.1 - IL_0070: sub - IL_0071: tail. callvirt instance int32 IFace1::Recurse3(int32) - IL_0076: ret - } - - .method public hidebysig newslot virtual - instance int32 Recurse3(int32 depth) cil managed - { - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: brtrue.s IL_000a - - IL_0003: ldarg.0 - IL_0004: ldfld int32 Class1::'value' - IL_0009: ret - - IL_000a: ldarg.1 - IL_000b: ldc.i4 0x80 - IL_0010: rem - IL_0011: ldc.i4.s 21 - IL_0013: bne.un.s IL_001f - - IL_0015: ldarg.0 - IL_0016: ldarg.1 - IL_0017: ldc.i4.1 - IL_0018: sub - IL_0019: tail. call instance int32 Class1::Recurse1(int32) - IL_001e: ret - - IL_001f: ldarg.0 - IL_0020: ldarg.1 - IL_0021: ldc.i4.1 - IL_0022: sub - IL_0023: ldarg.1 - IL_0024: ldc.i4.1 - IL_0025: add - IL_0026: box [mscorlib]System.Int32 - IL_002b: ldarg.1 - IL_002c: ldc.i4.2 - IL_002d: add - IL_002e: box [mscorlib]System.Int32 - IL_0033: tail. callvirt instance int32 IFace1::Recurse4(int32, - object, - object) - IL_0038: ret - } - - .method public hidebysig newslot virtual - instance int32 Recurse4(int32 depth, - object o1, - object o2) cil managed - { - .maxstack 4 - .locals init (string V_0) - IL_0000: ldarg.1 - IL_0001: brtrue.s IL_000a - - IL_0003: ldarg.0 - IL_0004: ldfld int32 Class1::'value' - IL_0009: ret - - IL_000a: ldarg.1 - IL_000b: ldsfld int32 Class1::MaxDepth - IL_0010: ldc.i4.s 10 - IL_0012: div - IL_0013: rem - IL_0014: ldc.i4 0xc8 - IL_0019: bne.un.s IL_0054 - - IL_001b: call void [mscorlib]System.GC::Collect() - IL_0020: call string [System.Runtime.Extensions]System.Environment::get_StackTrace() - IL_0025: stloc.0 - IL_0026: ldloc.0 - IL_0027: ldstr "Main" - IL_002c: callvirt instance int32 [mscorlib]System.String::IndexOf(string) - IL_0031: ldc.i4.m1 - IL_0032: bne.un.s IL_0054 - - IL_0034: ldstr "Unexpected stack trace: " - IL_0039: ldloc.0 - IL_003a: call string [mscorlib]System.String::Concat(string, - string) - IL_003f: call void [System.Console]System.Console::WriteLine(string) - IL_0044: ldstr "Test Failed" - IL_0049: call void [System.Console]System.Console::WriteLine(string) - IL_004e: ldc.i4.0 - IL_004f: call void [System.Runtime.Extensions]System.Environment::Exit(int32) - IL_0054: ldarg.0 - IL_0055: dup - IL_0056: ldfld int32 Class1::'value' - IL_005b: ldarg.2 - IL_005c: unbox [mscorlib]System.Int32 - IL_0061: ldind.i4 - IL_0062: ldarg.3 - IL_0063: unbox [mscorlib]System.Int32 - IL_0068: ldind.i4 - IL_0069: add - IL_006a: add - IL_006b: stfld int32 Class1::'value' - IL_0070: ldarg.0 - IL_0071: ldarg.1 - IL_0072: ldc.i4.1 - IL_0073: sub - IL_0074: tail. call instance int32 Class1::Recurse1(int32) - IL_0079: ret - } - - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - .maxstack 3 - .locals init (class Class1 V_0, - object[] V_1) - IL_0000: ldstr "Test Start" - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: newobj instance void Class1::.ctor() - IL_000f: stloc.0 - IL_0010: ldloc.0 - IL_0011: ldsfld int32 Class1::MaxDepth - IL_0016: callvirt instance int32 Class1::Recurse1(int32) - IL_001b: pop - IL_001c: ldloc.0 - IL_001d: ldfld int32 Class1::'value' - IL_0022: ldsfld int32 Class1::Expected - IL_0027: beq.s IL_006e - - IL_0029: ldc.i4.4 - IL_002a: newarr [mscorlib]System.Object - IL_002f: stloc.1 - IL_0030: ldloc.1 - IL_0031: ldc.i4.0 - IL_0032: ldstr "Expected result: " - IL_0037: stelem.ref - IL_0038: ldloc.1 - IL_0039: ldc.i4.1 - IL_003a: ldc.i4.1 - IL_003b: box [mscorlib]System.Int32 - IL_0040: stelem.ref - IL_0041: ldloc.1 - IL_0042: ldc.i4.2 - IL_0043: ldstr " Actual result: " - IL_0048: stelem.ref - IL_0049: ldloc.1 - IL_004a: ldc.i4.3 - IL_004b: ldloc.0 - IL_004c: ldfld int32 Class1::'value' - IL_0051: box [mscorlib]System.Int32 - IL_0056: stelem.ref - IL_0057: ldloc.1 - IL_0058: call string [mscorlib]System.String::Concat(object[]) - IL_005d: call void [System.Console]System.Console::WriteLine(string) - IL_0062: ldstr "Test Failed" - IL_0067: call void [System.Console]System.Console::WriteLine(string) - IL_006c: ldc.i4.0 - IL_006d: ret - - IL_006e: ldstr "Test SUCCESS" - IL_0073: call void [System.Console]System.Console::WriteLine(string) - IL_0078: ldc.i4.s 100 - IL_007a: ret - } - - .method private hidebysig specialname rtspecialname static - void .cctor() cil managed - { - .maxstack 8 - IL_0000: ldc.i4 0x100000 - IL_0005: stsfld int32 Class1::MaxDepth - IL_000a: ldc.i4 0x280000 - IL_000f: stsfld int32 Class1::Expected - IL_0014: ret - } - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } - -} diff --git a/src/coreclr/tests/src/JIT/Directed/throwbox/fault.il b/src/coreclr/tests/src/JIT/Directed/throwbox/fault.il deleted file mode 100644 index 3f29ede78bc5..000000000000 --- a/src/coreclr/tests/src/JIT/Directed/throwbox/fault.il +++ /dev/null @@ -1,117 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly 'fault' { } -.namespace JitTest -{ - .class private auto ansi beforefieldinit Test - extends [mscorlib]System.Object - { - .method private hidebysig static int32 - Main() cil managed - { - .entrypoint - // Code size 115 (0x73) - .maxstack 2 - .locals (bool V_0, - bool V_1, - bool V_2, - int32 V_3) - IL_0000: ldc.i4.1 - IL_0001: stloc.0 - IL_0002: ldc.i4.0 - IL_0003: stloc.1 - IL_0004: ldc.i4.0 - IL_0005: stloc.2 - .try - { - IL_0006: ldstr "before try...fault" - IL_000b: call void [System.Console]System.Console::WriteLine(string) - .try - { - IL_0010: ldstr "inside try" - IL_0015: call void [System.Console]System.Console::WriteLine(string) - IL_001a: ldloc.0 - IL_001b: brfalse.s IL_0023 - - ldc.r8 1.0 - box float64 - throw - - IL_0023: leave.s IL_0032 - - } // end .try - fault - { - IL_0025: ldc.i4.1 - IL_0026: stloc.1 - IL_0027: ldstr "inside fault" - IL_002c: call void [System.Console]System.Console::WriteLine(string) - IL_0031: endfinally - } // end handler - IL_0032: ldstr "after try...fault" - IL_0037: call void [System.Console]System.Console::WriteLine(string) - IL_003c: leave.s IL_004d - - } // end .try - catch [mscorlib]System.Double - { - unbox float64 - ldind.r8 - ldc.r8 1.0 - ceq - brfalse LEAVE - - IL_003f: ldstr "inside catch" - IL_0044: call void [System.Console]System.Console::WriteLine(string) - IL_0049: ldc.i4.1 - IL_004a: stloc.2 - LEAVE: - IL_004b: leave.s IL_004d - - } // end handler - IL_004d: ldloc.1 - IL_004e: brfalse.s IL_0062 - - IL_0050: ldloc.2 - IL_0051: brfalse.s IL_0062 - - IL_0053: ldstr "Passed => 100" - IL_0058: call void [System.Console]System.Console::WriteLine(string) - IL_005d: ldc.i4.s 100 - IL_005f: stloc.3 - IL_0060: br.s IL_0071 - - IL_0062: ldstr "Failed => 101" - IL_0067: call void [System.Console]System.Console::WriteLine(string) - IL_006c: ldc.i4.s 101 - IL_006e: stloc.3 - IL_006f: br.s IL_0071 - - IL_0071: ldloc.3 - IL_0072: ret - } // end of method Test::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method Test::.ctor - - } // end of class Test - -} // end of namespace JitTest - -//*********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file finally.res diff --git a/src/coreclr/tests/src/JIT/Directed/throwbox/filter.il b/src/coreclr/tests/src/JIT/Directed/throwbox/filter.il deleted file mode 100644 index 727df80c54c6..000000000000 --- a/src/coreclr/tests/src/JIT/Directed/throwbox/filter.il +++ /dev/null @@ -1,82 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly 'filter' { } -.namespace JitTest -{ - .class private auto ansi beforefieldinit Test - extends [mscorlib]System.Object - { - .method private hidebysig static int32 - Main() cil managed - { - .entrypoint - // Code size 120 (0x78) - .maxstack 2 - - TRY_1: - ldstr "inside 1st try" - call void [System.Console]System.Console::WriteLine(string) - ldc.r4 1.0 - box float32 - throw - leave.s END_1 - - FILTER_1: - ldstr "entering filter" - call void [System.Console]System.Console::WriteLine(string) - isinst [mscorlib]System.Single - br MAKE_JIT_WORK - - MAKE_JIT_WORK: - unbox float32 - ldind.r4 - ldc.r4 1.0 - ceq - brtrue OK_1 - - ldstr "bad value in filter!" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.0 - br.s MERGE_1 - - OK_1: - ldstr "leaving filter" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.1 - - MERGE_1: - endfilter - - HANDLER_1: - ldstr "inside _except" - call void [System.Console]System.Console::WriteLine(string) - pop - leave.s END_1 - - END_1: - ldc.i4 100 - ret - .try TRY_1 to FILTER_1 filter FILTER_1 handler HANDLER_1 to END_1 - } // end of method Test::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method Test::.ctor - - } // end of class Test - -} // end of namespace JitTest diff --git a/src/coreclr/tests/src/JIT/Directed/throwbox/finally.il b/src/coreclr/tests/src/JIT/Directed/throwbox/finally.il deleted file mode 100644 index 37e9d1923a98..000000000000 --- a/src/coreclr/tests/src/JIT/Directed/throwbox/finally.il +++ /dev/null @@ -1,117 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly 'finally' { } -.namespace JitTest -{ - .class private auto ansi beforefieldinit Test - extends [mscorlib]System.Object - { - .method private hidebysig static int32 - Main() cil managed - { - .entrypoint - // Code size 115 (0x73) - .maxstack 2 - .locals (bool V_0, - bool V_1, - bool V_2, - int32 V_3) - IL_0000: ldc.i4.1 - IL_0001: stloc.0 - IL_0002: ldc.i4.0 - IL_0003: stloc.1 - IL_0004: ldc.i4.0 - IL_0005: stloc.2 - .try - { - IL_0006: ldstr "before try...finally" - IL_000b: call void [System.Console]System.Console::WriteLine(string) - .try - { - IL_0010: ldstr "inside try" - IL_0015: call void [System.Console]System.Console::WriteLine(string) - IL_001a: ldloc.0 - IL_001b: brfalse.s IL_0023 - - ldc.r8 1.0 - box float64 - throw - - IL_0023: leave.s IL_0032 - - } // end .try - finally - { - IL_0025: ldc.i4.1 - IL_0026: stloc.1 - IL_0027: ldstr "inside finally" - IL_002c: call void [System.Console]System.Console::WriteLine(string) - IL_0031: endfinally - } // end handler - IL_0032: ldstr "after try...finally" - IL_0037: call void [System.Console]System.Console::WriteLine(string) - IL_003c: leave.s IL_004d - - } // end .try - catch [mscorlib]System.Double - { - unbox float64 - ldind.r8 - ldc.r8 1.0 - ceq - brfalse LEAVE - - IL_003f: ldstr "inside catch" - IL_0044: call void [System.Console]System.Console::WriteLine(string) - IL_0049: ldc.i4.1 - IL_004a: stloc.2 - LEAVE: - IL_004b: leave.s IL_004d - - } // end handler - IL_004d: ldloc.1 - IL_004e: brfalse.s IL_0062 - - IL_0050: ldloc.2 - IL_0051: brfalse.s IL_0062 - - IL_0053: ldstr "Passed => 100" - IL_0058: call void [System.Console]System.Console::WriteLine(string) - IL_005d: ldc.i4.s 100 - IL_005f: stloc.3 - IL_0060: br.s IL_0071 - - IL_0062: ldstr "Failed => 101" - IL_0067: call void [System.Console]System.Console::WriteLine(string) - IL_006c: ldc.i4.s 101 - IL_006e: stloc.3 - IL_006f: br.s IL_0071 - - IL_0071: ldloc.3 - IL_0072: ret - } // end of method Test::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method Test::.ctor - - } // end of class Test - -} // end of namespace JitTest - -//*********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file finally.res diff --git a/src/coreclr/tests/src/JIT/Directed/zeroinit/init_byte.il b/src/coreclr/tests/src/JIT/Directed/zeroinit/init_byte.il deleted file mode 100644 index 5b5ed8ba6776..000000000000 --- a/src/coreclr/tests/src/JIT/Directed/zeroinit/init_byte.il +++ /dev/null @@ -1,778 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly init_byte { } -.class private auto ansi beforefieldinit Test - extends [mscorlib]System.Object -{ - .field private int8 m_ret - .field private static class Test global - .method private hidebysig static int8 - noinline1(int8 'ret') cil managed - { - .maxstack 1 - ldarga.s 0 - ldind.i4 - ret - } - - .method private hidebysig static int8 - noinline2(int8& 'ret') cil managed - { - .maxstack 1 - ldarga.s 0 - ldind.i - ldind.i1 - ret - } // end of method Test::noinline2 - - .method private hidebysig static int8 - test1() cil managed - { - // Code size 8 (0x8) - .maxstack 1 - .locals init (int8 V_0, - int8 V_1) - IL_0006: ldloc.1 - IL_0007: ret - } // end of method Test::test1 - - .method private hidebysig static int8 - test2() cil managed - { - // Code size 21 (0x15) - .maxstack 3 - .locals init (int8 V_0, - int8 V_1, - int8 V_2) - IL_0004: ldloc.0 - IL_0005: ldc.i4.1 - IL_0006: shr - IL_0007: ldc.i4 1 - IL_0008: and - IL_0009: ldloc.1 - IL_000a: ldc.i4.2 - IL_000b: shl - IL_000c: sub - IL_000d: ldc.i4 11 - IL_000f: add - IL_0010: stloc.2 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.2 - IL_0014: ret - } // end of method Test::test2 - - .method private hidebysig static int8 - test3() cil managed - { - // Code size 13 (0xd) - .maxstack 1 - .locals init (int8 V_0, - int8 V_1) - IL_0002: ldloc.0 - IL_0003: call int8 Test::noinline1(int8) - IL_0008: stloc.1 - IL_0009: br.s IL_000b - - IL_000b: ldloc.1 - IL_000c: ret - } // end of method Test::test3 - - .method private hidebysig static int8 - test4() cil managed - { - // Code size 14 (0xe) - .maxstack 1 - .locals init (int8 V_0, - int8 V_1) - IL_0002: ldloca.s V_0 - IL_0004: call int8 Test::noinline2(int8&) - IL_0009: stloc.1 - IL_000a: br.s IL_000c - - IL_000c: ldloc.1 - IL_000d: ret - } // end of method Test::test4 - - .method private hidebysig static void test5(int8& 'ret') cil managed - { - // Code size 11 (0xb) - .maxstack 2 - .locals init (int8 V_0) - IL_0002: ldarg.0 - IL_0003: ldloc.0 - IL_0004: call int8 Test::noinline1(int8) - IL_0009: stind.i1 - IL_000a: ret - } // end of method Test::test5 - - .method private hidebysig static void test6(int8& 'ret') cil managed - { - // Code size 12 (0xc) - .maxstack 2 - .locals init (int8 V_0) - IL_0002: ldarg.0 - IL_0003: ldloca.s V_0 - IL_0005: call int8 Test::noinline2(int8&) - IL_000a: stind.i1 - IL_000b: ret - } // end of method Test::test6 - - .method private hidebysig static void test7() cil managed - { - // Code size 14 (0xe) - .maxstack 2 - .locals init (int8 V_0) - IL_0002: ldsfld class Test Test::global - IL_0007: ldloc.0 - IL_0008: stfld int8 Test::m_ret - IL_000d: ret - } // end of method Test::test7 - - .method private hidebysig static void test8() cil managed - { - // Code size 27 (0x1b) - .maxstack 4 - .locals init (int8 V_0, - int8 V_1) - IL_0004: ldsfld class Test Test::global - IL_0009: ldloc.0 - IL_000a: ldc.i4.1 - IL_000b: shr - IL_000c: ldc.i4 1 - IL_000d: and - IL_000e: ldloc.1 - IL_000f: ldc.i4.2 - IL_0010: shl - IL_0011: sub - IL_0012: ldc.i4 11 - IL_0014: add - IL_0015: stfld int8 Test::m_ret - IL_001a: ret - } // end of method Test::test8 - - .method private hidebysig static void test9() cil managed - { - // Code size 19 (0x13) - .maxstack 2 - .locals init (int8 V_0) - IL_0002: ldsfld class Test Test::global - IL_0007: ldloc.0 - IL_0008: call int8 Test::noinline1(int8) - IL_000d: stfld int8 Test::m_ret - IL_0012: ret - } // end of method Test::test9 - - .method private hidebysig static void test10() cil managed - { - // Code size 20 (0x14) - .maxstack 2 - .locals init (int8 V_0) - IL_0002: ldsfld class Test Test::global - IL_0007: ldloca.s V_0 - IL_0009: call int8 Test::noinline2(int8&) - IL_000e: stfld int8 Test::m_ret - IL_0013: ret - } // end of method Test::test10 - - .method private hidebysig static void test11(int8[] arr, - int8 index) cil managed - { - // Code size 7 (0x7) - .maxstack 3 - .locals init (int8 V_0) - IL_0002: ldarg.0 - IL_0003: ldarg.1 - conv.i4 - IL_0004: ldloc.0 - IL_0005: stelem.i1 - IL_0006: ret - } // end of method Test::test11 - - .method private hidebysig static void test12(int8[] arr, - int8 index) cil managed - { - // Code size 20 (0x14) - .maxstack 5 - .locals init (int8 V_0, - int8 V_1) - IL_0004: ldarg.0 - IL_0005: ldarg.1 - conv.i4 - IL_0006: ldloc.0 - IL_0007: ldc.i4.1 - IL_0008: shr - IL_0009: ldc.i4 1 - IL_000a: and - IL_000b: ldloc.1 - IL_000c: ldc.i4.2 - IL_000d: shl - IL_000e: sub - IL_000f: ldc.i4 11 - IL_0011: add - IL_0012: stelem.i1 - IL_0013: ret - } // end of method Test::test12 - - .method private hidebysig static void test13(int8[] arr, - int8 index) cil managed - { - // Code size 12 (0xc) - .maxstack 3 - .locals init (int8 V_0) - IL_0002: ldarg.0 - IL_0003: ldarg.1 - conv.i4 - IL_0004: ldloc.0 - IL_0005: call int8 Test::noinline1(int8) - IL_000a: stelem.i1 - IL_000b: ret - } // end of method Test::test13 - - .method private hidebysig static void test14(int8[] arr, - int8 index) cil managed - { - // Code size 13 (0xd) - .maxstack 3 - .locals init (int8 V_0) - IL_0002: ldarg.0 - IL_0003: ldarg.1 - conv.i4 - IL_0004: ldloca.s V_0 - IL_0006: call int8 Test::noinline2(int8&) - IL_000b: stelem.i1 - IL_000c: ret - } // end of method Test::test14 - - .method private hidebysig static void test15(int8[0...,0...,0...] arr, - int8 index1, - int8 index3) cil managed - { - // Code size 13 (0xd) - .maxstack 5 - .locals init (int8 V_0) - IL_0002: ldarg.0 - IL_0003: ldarg.1 - conv.i4 - IL_0004: ldc.i4 2 - conv.i4 - IL_0005: ldarg.2 - conv.i4 - IL_0006: ldloc.0 - IL_0007: call instance void int8[0...,0...,0...]::Set(int32, - int32, - int32, - int8) - IL_000c: ret - } // end of method Test::test15 - - .method private hidebysig static void test16(int8[0...,0...,0...] arr, - int8 index1, - int8 index3) cil managed - { - // Code size 26 (0x1a) - .maxstack 7 - .locals init (int8 V_0, - int8 V_1) - IL_0004: ldarg.0 - IL_0005: ldarg.1 - conv.i4 - IL_0006: ldc.i4.2 - IL_0007: ldarg.2 - conv.i4 - IL_0008: ldloc.0 - IL_0009: ldc.i4.1 - IL_000a: shr - IL_000b: ldc.i4 1 - IL_000c: and - IL_000d: ldloc.1 - IL_000e: ldc.i4.2 - IL_000f: shl - IL_0010: sub - IL_0011: ldc.i4 11 - IL_0013: add - IL_0014: call instance void int8[0...,0...,0...]::Set(int32, - int32, - int32, - int8) - IL_0019: ret - } // end of method Test::test16 - - .method private hidebysig static void test17(int8[0...,0...,0...] arr, - int8 index1, - int8 index3) cil managed - { - // Code size 18 (0x12) - .maxstack 5 - .locals init (int8 V_0) - IL_0002: ldarg.0 - IL_0003: ldarg.1 - conv.i4 - IL_0004: ldc.i4.2 - IL_0005: ldarg.2 - conv.i4 - IL_0006: ldloc.0 - IL_0007: call int8 Test::noinline1(int8) - IL_000c: call instance void int8[0...,0...,0...]::Set(int32, - int32, - int32, - int8) - IL_0011: ret - } // end of method Test::test17 - - .method private hidebysig static void test18(int8[0...,0...,0...] arr, - int8 index1, - int8 index3) cil managed - { - // Code size 19 (0x13) - .maxstack 5 - .locals init (int8 V_0) - IL_0002: ldarg.0 - IL_0003: ldarg.1 - conv.i4 - IL_0004: ldc.i4 2 - conv.i - IL_0005: ldarg.2 - conv.u4 - IL_0006: ldloca.s V_0 - IL_0008: call int8 Test::noinline2(int8&) - IL_000d: call instance void int8[0...,0...,0...]::Set(int32, - int32, - int32, - int8) - IL_0012: ret - } // end of method Test::test18 - - .method private hidebysig static int8 - test19() cil managed - { - // Code size 9 (0x9) - .maxstack 1 - .locals init (int8 V_0, - int8 V_1) - IL_0002: ldloc.0 - IL_0003: conv.i4 - IL_0004: stloc.1 - IL_0005: br.s IL_0007 - - IL_0007: ldloc.1 - IL_0008: ret - } // end of method Test::test19 - - .method private hidebysig static unsigned int8 - test20() cil managed - { - // Code size 23 (0x17) - .maxstack 3 - .locals init (int8 V_0, - int8 V_1, - unsigned int8 V_2) - IL_0004: ldloc.0 - IL_0005: ldc.i4.1 - IL_0006: shr - IL_0007: ldc.i4 1 - IL_0008: and - IL_0009: ldloc.1 - IL_000a: ldc.i4.s 2 - IL_000b: shl - IL_000c: sub - IL_000d: conv.i4 - IL_000e: ldc.i4 11 - IL_0010: conv.i4 - IL_0011: add - IL_0012: stloc.2 - IL_0013: br.s IL_0015 - - IL_0015: ldloc.2 - IL_0016: ret - } // end of method Test::test20 - - .method private hidebysig static unsigned int8 - test21() cil managed - { - // Code size 14 (0xe) - .maxstack 1 - .locals init (int8 V_0, - unsigned int8 V_1) - IL_0002: ldloc.0 - IL_0003: call int8 Test::noinline1(int8) - IL_0008: conv.u1 - IL_0009: stloc.1 - IL_000a: br.s IL_000c - - IL_000c: ldloc.1 - IL_000d: ret - } // end of method Test::test21 - - .method private hidebysig static unsigned int16 - test22() cil managed - { - // Code size 15 (0xf) - .maxstack 1 - .locals init (int8 V_0, - unsigned int16 V_1) - IL_0002: ldloca.s V_0 - IL_0004: call int8 Test::noinline2(int8&) - IL_0009: conv.ovf.u2 - IL_000a: stloc.1 - IL_000b: br.s IL_000d - - IL_000d: ldloc.1 - IL_000e: ret - } // end of method Test::test22 - - .method private hidebysig static int32 Main() cil managed - { - .entrypoint - // Code size 709 (0x2c5) - .maxstack 4 - .locals init (int8 V_0, - int8[] V_1, - int8[0...,0...,0...] V_2, - int8 V_3) - IL_0000: call int8 Test::test1() - IL_0005: brfalse.s IL_0019 - - IL_0007: ldstr "Error 101" - IL_000c: call void [System.Console]System.Console::WriteLine(string) - IL_0011: ldc.i4 101 - IL_0013: stloc.3 - IL_0014: br IL_02c3 - - IL_0019: call int8 Test::test2() - IL_001e: ldc.i4 11 - IL_0020: beq.s IL_0034 - - IL_0022: ldstr "Error 102" - IL_0027: call void [System.Console]System.Console::WriteLine(string) - IL_002c: ldc.i4 102 - IL_002e: stloc.3 - IL_002f: br IL_02c3 - - IL_0034: call int8 Test::test3() - IL_0039: brfalse.s IL_004d - - IL_003b: ldstr "Error 103" - IL_0040: call void [System.Console]System.Console::WriteLine(string) - IL_0045: ldc.i4 103 - IL_0047: stloc.3 - IL_0048: br IL_02c3 - - IL_004d: call int8 Test::test4() - IL_0052: brfalse.s IL_0066 - - IL_0054: ldstr "Error 104" - IL_0059: call void [System.Console]System.Console::WriteLine(string) - IL_005e: ldc.i4 104 - IL_0060: stloc.3 - IL_0061: br IL_02c3 - - IL_0066: ldc.i4 0 - IL_0067: stloc.0 - IL_0068: ldloca.s V_0 - IL_006a: call void Test::test5(int8&) - IL_006f: ldloc.0 - IL_0070: brfalse.s IL_0084 - - IL_0072: ldstr "Error 105" - IL_0077: call void [System.Console]System.Console::WriteLine(string) - IL_007c: ldc.i4 105 - IL_007e: stloc.3 - IL_007f: br IL_02c3 - - IL_0084: ldloca.s V_0 - IL_0086: call void Test::test6(int8&) - IL_008b: ldloc.0 - IL_008c: brfalse.s IL_00a0 - - IL_008e: ldstr "Error 106" - IL_0093: call void [System.Console]System.Console::WriteLine(string) - IL_0098: ldc.i4 106 - IL_009a: stloc.3 - IL_009b: br IL_02c3 - - IL_00a0: call void Test::test7() - IL_00a5: ldsfld class Test Test::global - IL_00aa: ldfld int8 Test::m_ret - IL_00af: brfalse.s IL_00c3 - - IL_00b1: ldstr "Error 107" - IL_00b6: call void [System.Console]System.Console::WriteLine(string) - IL_00bb: ldc.i4 107 - IL_00bd: stloc.3 - IL_00be: br IL_02c3 - - IL_00c3: call void Test::test8() - IL_00c8: ldsfld class Test Test::global - IL_00cd: ldfld int8 Test::m_ret - IL_00d2: ldc.i4 11 - IL_00d4: beq.s IL_00e8 - - IL_00d6: ldstr "Error 108" - IL_00db: call void [System.Console]System.Console::WriteLine(string) - IL_00e0: ldc.i4 108 - IL_00e2: stloc.3 - IL_00e3: br IL_02c3 - - IL_00e8: call void Test::test9() - IL_00ed: ldsfld class Test Test::global - IL_00f2: ldfld int8 Test::m_ret - IL_00f7: brfalse.s IL_010b - - IL_00f9: ldstr "Error 109" - IL_00fe: call void [System.Console]System.Console::WriteLine(string) - IL_0103: ldc.i4 109 - IL_0105: stloc.3 - IL_0106: br IL_02c3 - - IL_010b: call void Test::test10() - IL_0110: ldsfld class Test Test::global - IL_0115: ldfld int8 Test::m_ret - IL_011a: brfalse.s IL_012e - - IL_011c: ldstr "Error 110" - IL_0121: call void [System.Console]System.Console::WriteLine(string) - IL_0126: ldc.i4 110 - IL_0128: stloc.3 - IL_0129: br IL_02c3 - - IL_012e: ldc.i4.5 - IL_012f: newarr [mscorlib]System.Byte - IL_013f: stloc.1 - IL_0140: ldloc.1 - IL_0141: ldc.i4 1 - IL_0142: call void Test::test11(int8[], - int8) - IL_0147: ldloc.1 - IL_0148: ldc.i4.1 - IL_0149: ldelem.i1 - IL_014a: brfalse.s IL_015e - - IL_014c: ldstr "Error 111" - IL_0151: call void [System.Console]System.Console::WriteLine(string) - IL_0156: ldc.i4 111 - IL_0158: stloc.3 - IL_0159: br IL_02c3 - - IL_015e: ldloc.1 - IL_015f: ldc.i4 2 - IL_0160: call void Test::test12(int8[], - int8) - IL_0165: ldloc.1 - IL_0166: ldc.i4.2 - IL_0167: ldelem.i1 - IL_0168: ldc.i4 11 - IL_016a: beq.s IL_017e - - IL_016c: ldstr "Error 112" - IL_0171: call void [System.Console]System.Console::WriteLine(string) - IL_0176: ldc.i4 112 - IL_0178: stloc.3 - IL_0179: br IL_02c3 - - IL_017e: ldloc.1 - IL_017f: ldc.i4 3 - IL_0180: call void Test::test13(int8[], - int8) - IL_0185: ldloc.1 - IL_0186: ldc.i4.3 - IL_0187: ldelem.i1 - IL_0188: brfalse.s IL_019c - - IL_018a: ldstr "Error 113" - IL_018f: call void [System.Console]System.Console::WriteLine(string) - IL_0194: ldc.i4 113 - IL_0196: stloc.3 - IL_0197: br IL_02c3 - - IL_019c: ldloc.1 - IL_019d: ldc.i4 4 - IL_019e: call void Test::test14(int8[], - int8) - IL_01a3: ldloc.1 - IL_01a4: ldc.i4.4 - IL_01a5: ldelem.i1 - IL_01a6: brfalse.s IL_01ba - - IL_01a8: ldstr "Error 114" - IL_01ad: call void [System.Console]System.Console::WriteLine(string) - IL_01b2: ldc.i4 114 - IL_01b4: stloc.3 - IL_01b5: br IL_02c3 - - IL_01ba: ldc.i4.5 - IL_01bb: ldc.i4.3 - IL_01bc: ldc.i4.5 - IL_01bd: newobj instance void int8[0...,0...,0...]::.ctor(int32, - int32, - int32) - IL_01c2: stloc.2 - IL_01c3: ldloc.2 - IL_01c4: ldc.i4 1 - IL_01c5: ldc.i4 1 - IL_01c6: call void Test::test15(int8[0...,0...,0...], - int8, - int8) - IL_01cb: ldloc.2 - IL_01cc: ldc.i4.1 - IL_01cd: ldc.i4.2 - IL_01ce: ldc.i4.1 - IL_01cf: call instance int8 int8[0...,0...,0...]::Get(int32, - int32, - int32) - IL_01d4: brfalse.s IL_01e8 - - IL_01d6: ldstr "Error 115" - IL_01db: call void [System.Console]System.Console::WriteLine(string) - IL_01e0: ldc.i4 115 - IL_01e2: stloc.3 - IL_01e3: br IL_02c3 - - IL_01e8: ldloc.2 - IL_01e9: ldc.i4 2 - IL_01ea: ldc.i4 2 - IL_01eb: call void Test::test16(int8[0...,0...,0...], - int8, - int8) - IL_01f0: ldloc.2 - IL_01f1: ldc.i4.2 - IL_01f2: dup - IL_01f3: dup - IL_01f4: call instance int8 int8[0...,0...,0...]::Get(int32, - int32, - int32) - IL_01f9: ldc.i4 11 - IL_01fb: beq.s IL_020f - - IL_01fd: ldstr "Error 116" - IL_0202: call void [System.Console]System.Console::WriteLine(string) - IL_0207: ldc.i4 116 - IL_0209: stloc.3 - IL_020a: br IL_02c3 - - IL_020f: ldloc.2 - IL_0210: ldc.i4 3 - IL_0211: ldc.i4 3 - IL_0212: call void Test::test17(int8[0...,0...,0...], - int8, - int8) - IL_0217: ldloc.2 - IL_0218: ldc.i4.3 - IL_0219: ldc.i4.2 - IL_021a: ldc.i4.3 - IL_021b: call instance int8 int8[0...,0...,0...]::Get(int32, - int32, - int32) - IL_0220: brfalse.s IL_0234 - - IL_0222: ldstr "Error 117" - IL_0227: call void [System.Console]System.Console::WriteLine(string) - IL_022c: ldc.i4 117 - IL_022e: stloc.3 - IL_022f: br IL_02c3 - - IL_0234: ldloc.2 - IL_0235: ldc.i4 4 - IL_0236: ldc.i4 4 - IL_0237: call void Test::test18(int8[0...,0...,0...], - int8, - int8) - IL_023c: ldloc.2 - IL_023d: ldc.i4.4 - IL_023e: ldc.i4.2 - IL_023f: ldc.i4.4 - IL_0240: call instance int8 int8[0...,0...,0...]::Get(int32, - int32, - int32) - IL_0245: brfalse.s IL_0256 - - IL_0247: ldstr "Error 118" - IL_024c: call void [System.Console]System.Console::WriteLine(string) - IL_0251: ldc.i4 118 - IL_0253: stloc.3 - IL_0254: br IL_02c3 - - IL_0256: call int8 Test::test19() - IL_025b: ldc.i4 0 - IL_025c: conv.i4 - IL_025d: beq.s IL_026e - - IL_025f: ldstr "Error 119" - IL_0264: call void [System.Console]System.Console::WriteLine(string) - IL_0269: ldc.i4 119 - IL_026b: stloc.3 - IL_026c: br.s IL_02c3 - - IL_026e: call unsigned int8 Test::test20() - IL_0273: ldc.i4 11 - IL_0275: conv.i4 - IL_0276: beq.s IL_0287 - - IL_0278: ldstr "Error 120" - IL_027d: call void [System.Console]System.Console::WriteLine(string) - IL_0282: ldc.i4 120 - IL_0284: stloc.3 - IL_0285: br.s IL_02c3 - - IL_0287: call unsigned int8 Test::test21() - IL_028c: brfalse.s IL_029d - - IL_028e: ldstr "Error 121" - IL_0293: call void [System.Console]System.Console::WriteLine(string) - IL_0298: ldc.i4 121 - IL_029a: stloc.3 - IL_029b: br.s IL_02c3 - - IL_029d: call unsigned int16 Test::test22() - IL_02a2: conv.i4 - IL_02a3: brfalse.s IL_02b4 - - IL_02a5: ldstr "Error 122" - IL_02aa: call void [System.Console]System.Console::WriteLine(string) - IL_02af: ldc.i4 122 - IL_02b1: stloc.3 - IL_02b2: br.s IL_02c3 - - IL_02b4: ldstr "Passed" - IL_02b9: call void [System.Console]System.Console::WriteLine(string) - IL_02be: ldc.i4 100 - IL_02c0: stloc.3 - IL_02c1: br.s IL_02c3 - - IL_02c3: ldloc.3 - conv.ovf.i4 - IL_02c4: ret - } // end of method Test::Main - - .method private hidebysig specialname rtspecialname static - void .cctor() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - IL_0000: newobj instance void Test::.ctor() - IL_0005: stsfld class Test Test::global - IL_000a: ret - } // end of method Test::.cctor - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 14 (0xe) - .maxstack 2 - IL_0000: ldarg.0 - IL_0001: ldc.i4 0 - IL_0002: stfld int8 Test::m_ret - IL_0007: ldarg.0 - IL_0008: call instance void [mscorlib]System.Object::.ctor() - IL_000d: ret - } // end of method Test::.ctor - -} // end of class Test diff --git a/src/coreclr/tests/src/JIT/Directed/zeroinit/tail.il b/src/coreclr/tests/src/JIT/Directed/zeroinit/tail.il deleted file mode 100644 index db7be485ed6b..000000000000 --- a/src/coreclr/tests/src/JIT/Directed/zeroinit/tail.il +++ /dev/null @@ -1,139 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly tail { } -.class private auto ansi beforefieldinit AA - extends [mscorlib]System.Object -{ - .method private hidebysig static void Callee1(int64& B) cil managed - { - // Code size 7 (0x7) - .maxstack 2 - .locals init (int64 V_0) - ldarg.0 - ldloca.s 0 - ldind.i8 - stind.i8 - ret - } // end of method AA::Callee1 - - .method private hidebysig static void Caller1(int64& A, - int64& B) cil managed - { - .maxstack 2 - .locals init (int64 V_0) - ldarg.0 - ldloca.s 0 - ldind.i8 - stind.i8 - ldarg.1 - tail. call void AA::Callee1(int64&) - ret - } // end of method AA::Caller1 - - .method private hidebysig static int64 - Callee2() cil managed - { - // Code size 9 (0x9) - .maxstack 1 - .locals init (int64 V_0) - ldloca.s 0 - ldind.i8 - ret - } // end of method AA::Callee2 - - .method private hidebysig static int64 - Caller2() cil managed - { - // Code size 15 (0xf) - .maxstack 2 - .locals init (int64 V_0) - ldloca.s 0 - ldind.i8 - brfalse.s IL_JMP - newobj instance void [mscorlib]System.Exception::.ctor() - throw - IL_JMP: - jmp int64 AA::Callee2() - } // end of method AA::Caller2 - - .method private hidebysig static int32 - Main() cil managed - { - .entrypoint - // Code size 81 (0x51) - .maxstack 2 - .locals init (int64 V_0, - int64 V_1, - int32 V_2) - IL_0000: ldc.i4.0 - IL_0001: conv.i8 - IL_0002: stloc.0 - IL_0003: ldc.i4.0 - IL_0004: conv.i8 - IL_0005: stloc.1 - IL_0006: ldloca.s V_0 - IL_0008: ldloca.s V_1 - IL_000a: call void AA::Caller1(int64&, - int64&) - IL_000f: ldloc.0 - IL_0010: ldc.i4.0 - IL_0011: conv.i8 - IL_0012: bne.un.s IL_0019 - - IL_0014: ldloc.1 - IL_0015: ldc.i4.0 - IL_0016: conv.i8 - IL_0017: beq.s IL_0028 - - IL_0019: ldstr "Error 101" - IL_001e: call void [System.Console]System.Console::WriteLine(string) - IL_0023: ldc.i4.s 101 - IL_0025: stloc.2 - IL_0026: br.s IL_004f - - IL_0028: call int64 AA::Caller2() - IL_002d: ldc.i4.0 - IL_002e: conv.i8 - IL_002f: beq.s IL_0040 - - IL_0031: ldstr "Error 102" - IL_0036: call void [System.Console]System.Console::WriteLine(string) - IL_003b: ldc.i4.s 102 - IL_003d: stloc.2 - IL_003e: br.s IL_004f - - IL_0040: ldstr "Passed" - IL_0045: call void [System.Console]System.Console::WriteLine(string) - IL_004a: ldc.i4.s 100 - IL_004c: stloc.2 - IL_004d: br.s IL_004f - - IL_004f: ldloc.2 - IL_0050: ret - } // end of method AA::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 1 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method AA::.ctor - -} // end of class AA - - -// ============================================================= - -//*********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file tail.res diff --git a/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/Struct01.cs b/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/Struct01.cs deleted file mode 100644 index 7756598c44db..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/Struct01.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - - -public struct ValX1 -{ - public T t; - public ValX1(T t) - { - this.t = t; - } - -} -public class RefX1 -{ - public T t; - public RefX1(T t) - { - this.t = t; - } -} - - -public struct Gen -{ - public T Fld1; - - public Gen(T fld1) - { - Fld1 = fld1; - } - - -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - int size = 10; - int i, j, k, l, m; - double sum = 0; - - Gen[][][][][] GenArray = new Gen[size][][][][]; - - - - for (i = 0; i < size; i++) - { - GenArray[i] = new Gen[i][][][]; - for (j = 0; j < i; j++) - { - GenArray[i][j] = new Gen[j][][]; - for (k = 0; k < j; k++) - { - GenArray[i][j][k] = new Gen[k][]; - for (l = 0; l < k; l++) - { - GenArray[i][j][k][l] = new Gen[l]; - for (m = 0; m < l; m++) - { - GenArray[i][j][k][l][m] = new Gen(i * j * k * l * m); - } - } - } - } - } - - for (i = 0; i < size; i++) - { - for (j = 0; j < i; j++) - { - for (k = 0; k < j; k++) - { - for (l = 0; l < k; l++) - { - for (m = 0; m < l; m++) - { - sum += GenArray[i][j][k][l][m].Fld1; - } - } - } - } - } - - Eval(sum == 269325); - sum = 0; - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} - diff --git a/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class01.cs b/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class01.cs deleted file mode 100644 index 5721a1d7f2b0..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class01.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - - -public struct ValX1 -{ - public T t; - public ValX1(T t) - { - this.t = t; - } - -} -public class RefX1 -{ - public T t; - public RefX1(T t) - { - this.t = t; - } -} - - -public class Gen -{ - public T Fld1; - - public Gen(T fld1) - { - Fld1 = fld1; - } - - -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - int size = 10; - int i, j, k, l, m; - double sum = 0; - - Gen[][][][][] GenArray = new Gen[size][][][][]; - - - - for (i = 0; i < size; i++) - { - GenArray[i] = new Gen[i][][][]; - for (j = 0; j < i; j++) - { - GenArray[i][j] = new Gen[j][][]; - for (k = 0; k < j; k++) - { - GenArray[i][j][k] = new Gen[k][]; - for (l = 0; l < k; l++) - { - GenArray[i][j][k][l] = new Gen[l]; - for (m = 0; m < l; m++) - { - GenArray[i][j][k][l][m] = new Gen(i * j * k * l * m); - } - } - } - } - } - - for (i = 0; i < size; i++) - { - for (j = 0; j < i; j++) - { - for (k = 0; k < j; k++) - { - for (l = 0; l < k; l++) - { - for (m = 0; m < l; m++) - { - sum += GenArray[i][j][k][l][m].Fld1; - } - } - } - } - } - - Eval(sum == 269325); - sum = 0; - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} - diff --git a/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class01_static.cs b/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class01_static.cs deleted file mode 100644 index d0b0930ae7c1..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class01_static.cs +++ /dev/null @@ -1,122 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - - -public struct ValX1 -{ - public T t; - public ValX1(T t) - { - this.t = t; - } - -} -public class RefX1 -{ - public T t; - public RefX1(T t) - { - this.t = t; - } -} - - -public class Gen -{ - public T Fld1; - - public Gen(T fld1) - { - Fld1 = fld1; - } - - -} - - -public class ArrayHolder -{ - public static Gen[][][][][] GenArray = new Gen[10][][][][]; -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - - public static int Main() - { - int size = 10; - int i, j, k, l, m; - double sum = 0; - - for (i = 0; i < size; i++) - { - ArrayHolder.GenArray[i] = new Gen[i][][][]; - for (j = 0; j < i; j++) - { - ArrayHolder.GenArray[i][j] = new Gen[j][][]; - for (k = 0; k < j; k++) - { - ArrayHolder.GenArray[i][j][k] = new Gen[k][]; - for (l = 0; l < k; l++) - { - ArrayHolder.GenArray[i][j][k][l] = new Gen[l]; - for (m = 0; m < l; m++) - { - ArrayHolder.GenArray[i][j][k][l][m] = new Gen(i * j * k * l * m); - } - } - } - } - } - - for (i = 0; i < size; i++) - { - for (j = 0; j < i; j++) - { - for (k = 0; k < j; k++) - { - for (l = 0; l < k; l++) - { - for (m = 0; m < l; m++) - { - sum += ArrayHolder.GenArray[i][j][k][l][m].Fld1; - } - } - } - } - } - - Eval(sum == 269325); - sum = 0; - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} - diff --git a/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class02.cs b/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class02.cs deleted file mode 100644 index 2217091d95b8..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class02.cs +++ /dev/null @@ -1,117 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - - -public struct ValX1 -{ - public T t; - public ValX1(T t) - { - this.t = t; - } - -} -public class RefX1 -{ - public T t; - public RefX1(T t) - { - this.t = t; - } -} - - -public class Gen -{ - public T Fld1; - - public Gen(T fld1) - { - Fld1 = fld1; - } - - -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - int size = 10; - int i, j, k, l, m; - double sum = 0; - - Gen[][][][][] GenDoubleArray = new Gen[size][][][][]; - - for (i = 0; i < size; i++) - { - GenDoubleArray[i] = new Gen[i][][][]; - for (j = 0; j < i; j++) - { - GenDoubleArray[i][j] = new Gen[j][][]; - for (k = 0; k < j; k++) - { - GenDoubleArray[i][j][k] = new Gen[k][]; - for (l = 0; l < k; l++) - { - GenDoubleArray[i][j][k][l] = new Gen[l]; - for (m = 0; m < l; m++) - { - GenDoubleArray[i][j][k][l][m] = new Gen(i * j * k * l * m); - } - } - } - } - } - - for (i = 0; i < size; i++) - { - for (j = 0; j < i; j++) - { - for (k = 0; k < j; k++) - { - for (l = 0; l < k; l++) - { - for (m = 0; m < l; m++) - { - sum += GenDoubleArray[i][j][k][l][m].Fld1; - } - } - } - } - } - - Eval(sum == 269325); - sum = 0; - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} - diff --git a/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class03.cs b/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class03.cs deleted file mode 100644 index b1f6b34f1b2b..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class03.cs +++ /dev/null @@ -1,116 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - - -public struct ValX1 -{ - public T t; - public ValX1(T t) - { - this.t = t; - } - -} -public class RefX1 -{ - public T t; - public RefX1(T t) - { - this.t = t; - } -} - - -public class Gen -{ - public T Fld1; - - public Gen(T fld1) - { - Fld1 = fld1; - } - - -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - int size = 10; - int i, j, k, l, m; - double sum = 0; - - Gen[][][][][] GenStringArray = new Gen[size][][][][]; - for (i = 0; i < size; i++) - { - GenStringArray[i] = new Gen[i][][][]; - for (j = 0; j < i; j++) - { - GenStringArray[i][j] = new Gen[j][][]; - for (k = 0; k < j; k++) - { - GenStringArray[i][j][k] = new Gen[k][]; - for (l = 0; l < k; l++) - { - GenStringArray[i][j][k][l] = new Gen[l]; - for (m = 0; m < l; m++) - { - GenStringArray[i][j][k][l][m] = new Gen((i * j * k * l * m).ToString()); - } - } - } - } - } - - for (i = 0; i < size; i++) - { - for (j = 0; j < i; j++) - { - for (k = 0; k < j; k++) - { - for (l = 0; l < k; l++) - { - for (m = 0; m < l; m++) - { - sum += System.Int32.Parse(GenStringArray[i][j][k][l][m].Fld1); - } - } - } - } - } - - Eval(sum == 269325); - sum = 0; - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} - diff --git a/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct01_static.cs b/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct01_static.cs deleted file mode 100644 index 40108b9648df..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct01_static.cs +++ /dev/null @@ -1,122 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - - -public struct ValX1 -{ - public T t; - public ValX1(T t) - { - this.t = t; - } - -} -public class RefX1 -{ - public T t; - public RefX1(T t) - { - this.t = t; - } -} - - -public struct Gen -{ - public T Fld1; - - public Gen(T fld1) - { - Fld1 = fld1; - } - - -} - - -public class ArrayHolder -{ - public static Gen[][][][][] GenArray = new Gen[10][][][][]; -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - - public static int Main() - { - int size = 10; - int i, j, k, l, m; - double sum = 0; - - for (i = 0; i < size; i++) - { - ArrayHolder.GenArray[i] = new Gen[i][][][]; - for (j = 0; j < i; j++) - { - ArrayHolder.GenArray[i][j] = new Gen[j][][]; - for (k = 0; k < j; k++) - { - ArrayHolder.GenArray[i][j][k] = new Gen[k][]; - for (l = 0; l < k; l++) - { - ArrayHolder.GenArray[i][j][k][l] = new Gen[l]; - for (m = 0; m < l; m++) - { - ArrayHolder.GenArray[i][j][k][l][m] = new Gen(i * j * k * l * m); - } - } - } - } - } - - for (i = 0; i < size; i++) - { - for (j = 0; j < i; j++) - { - for (k = 0; k < j; k++) - { - for (l = 0; l < k; l++) - { - for (m = 0; m < l; m++) - { - sum += ArrayHolder.GenArray[i][j][k][l][m].Fld1; - } - } - } - } - } - - Eval(sum == 269325); - sum = 0; - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} - diff --git a/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct02.cs b/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct02.cs deleted file mode 100644 index bf08d45311e6..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct02.cs +++ /dev/null @@ -1,117 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - - -public struct ValX1 -{ - public T t; - public ValX1(T t) - { - this.t = t; - } - -} -public class RefX1 -{ - public T t; - public RefX1(T t) - { - this.t = t; - } -} - - -public struct Gen -{ - public T Fld1; - - public Gen(T fld1) - { - Fld1 = fld1; - } - - -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - int size = 10; - int i, j, k, l, m; - double sum = 0; - - Gen[][][][][] GenDoubleArray = new Gen[size][][][][]; - - for (i = 0; i < size; i++) - { - GenDoubleArray[i] = new Gen[i][][][]; - for (j = 0; j < i; j++) - { - GenDoubleArray[i][j] = new Gen[j][][]; - for (k = 0; k < j; k++) - { - GenDoubleArray[i][j][k] = new Gen[k][]; - for (l = 0; l < k; l++) - { - GenDoubleArray[i][j][k][l] = new Gen[l]; - for (m = 0; m < l; m++) - { - GenDoubleArray[i][j][k][l][m] = new Gen(i * j * k * l * m); - } - } - } - } - } - - for (i = 0; i < size; i++) - { - for (j = 0; j < i; j++) - { - for (k = 0; k < j; k++) - { - for (l = 0; l < k; l++) - { - for (m = 0; m < l; m++) - { - sum += GenDoubleArray[i][j][k][l][m].Fld1; - } - } - } - } - } - - Eval(sum == 269325); - sum = 0; - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} - diff --git a/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct03.cs b/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct03.cs deleted file mode 100644 index 411d7f099d58..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct03.cs +++ /dev/null @@ -1,116 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - - -public struct ValX1 -{ - public T t; - public ValX1(T t) - { - this.t = t; - } - -} -public class RefX1 -{ - public T t; - public RefX1(T t) - { - this.t = t; - } -} - - -public struct Gen -{ - public T Fld1; - - public Gen(T fld1) - { - Fld1 = fld1; - } - - -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - int size = 10; - int i, j, k, l, m; - double sum = 0; - - Gen[][][][][] GenStringArray = new Gen[size][][][][]; - for (i = 0; i < size; i++) - { - GenStringArray[i] = new Gen[i][][][]; - for (j = 0; j < i; j++) - { - GenStringArray[i][j] = new Gen[j][][]; - for (k = 0; k < j; k++) - { - GenStringArray[i][j][k] = new Gen[k][]; - for (l = 0; l < k; l++) - { - GenStringArray[i][j][k][l] = new Gen[l]; - for (m = 0; m < l; m++) - { - GenStringArray[i][j][k][l][m] = new Gen((i * j * k * l * m).ToString()); - } - } - } - } - } - - for (i = 0; i < size; i++) - { - for (j = 0; j < i; j++) - { - for (k = 0; k < j; k++) - { - for (l = 0; l < k; l++) - { - for (m = 0; m < l; m++) - { - sum += System.Int32.Parse(GenStringArray[i][j][k][l][m].Fld1); - } - } - } - } - } - - Eval(sum == 269325); - sum = 0; - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} - diff --git a/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/class01.cs b/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/class01.cs deleted file mode 100644 index a8706273b7f8..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/class01.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - - -public struct ValX1 -{ - public T t; - public ValX1(T t) - { - this.t = t; - } - -} -public class RefX1 -{ - public T t; - public RefX1(T t) - { - this.t = t; - } -} - - -public class Gen -{ - public T Fld1; - - public Gen(T fld1) - { - Fld1 = fld1; - } - - -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - int size = 10; - int i, j, k; - double sum = 0; - int cLoc = 0; - - Gen[, ,] GenArray = new Gen[size, size, size]; - for (i = 0; (i < size); i++) - { - for (j = 0; (j < size); j++) - { - for (k = 0; (k < size); k++) - { - GenArray[i, j, k] = new Gen(cLoc); - cLoc++; - } - } - } - - for (i = 0; (i < size); i++) - { - for (j = 0; (j < size); j++) - { - for (k = 0; (k < size); k++) - { - sum += GenArray[i, j, k].Fld1; - cLoc++; - } - } - } - - - - - Eval(sum == 499500); - sum = 0; - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} - diff --git a/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/class01_static.cs b/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/class01_static.cs deleted file mode 100644 index 853f4f33ed13..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/class01_static.cs +++ /dev/null @@ -1,111 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - - -public struct ValX1 -{ - public T t; - public ValX1(T t) - { - this.t = t; - } - -} -public class RefX1 -{ - public T t; - public RefX1(T t) - { - this.t = t; - } -} - - -public class Gen -{ - public T Fld1; - - public Gen(T fld1) - { - Fld1 = fld1; - } - - -} - -public class ArrayHolder -{ - public static Gen[, ,] GenArray = new Gen[10, 10, 10]; -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - int size = 10; - int i, j, k; - double sum = 0; - int cLoc = 0; - - - for (i = 0; (i < size); i++) - { - for (j = 0; (j < size); j++) - { - for (k = 0; (k < size); k++) - { - ArrayHolder.GenArray[i, j, k] = new Gen(cLoc); - cLoc++; - } - } - } - - for (i = 0; (i < size); i++) - { - for (j = 0; (j < size); j++) - { - for (k = 0; (k < size); k++) - { - sum += ArrayHolder.GenArray[i, j, k].Fld1; - cLoc++; - } - } - } - - - - - Eval(sum == 499500); - sum = 0; - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} - diff --git a/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/struct01.cs b/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/struct01.cs deleted file mode 100644 index 624b19a18018..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/struct01.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - - -public struct ValX1 -{ - public T t; - public ValX1(T t) - { - this.t = t; - } - -} -public class RefX1 -{ - public T t; - public RefX1(T t) - { - this.t = t; - } -} - - -public struct Gen -{ - public T Fld1; - - public Gen(T fld1) - { - Fld1 = fld1; - } - - -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - int size = 10; - int i, j, k; - double sum = 0; - int cLoc = 0; - - Gen[, ,] GenArray = new Gen[size, size, size]; - for (i = 0; (i < size); i++) - { - for (j = 0; (j < size); j++) - { - for (k = 0; (k < size); k++) - { - GenArray[i, j, k] = new Gen(cLoc); - cLoc++; - } - } - } - - for (i = 0; (i < size); i++) - { - for (j = 0; (j < size); j++) - { - for (k = 0; (k < size); k++) - { - sum += GenArray[i, j, k].Fld1; - cLoc++; - } - } - } - - - - - Eval(sum == 499500); - sum = 0; - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} - diff --git a/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/struct01_static.cs b/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/struct01_static.cs deleted file mode 100644 index ba22cb311e82..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/struct01_static.cs +++ /dev/null @@ -1,111 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - - -public struct ValX1 -{ - public T t; - public ValX1(T t) - { - this.t = t; - } - -} -public class RefX1 -{ - public T t; - public RefX1(T t) - { - this.t = t; - } -} - - -public struct Gen -{ - public T Fld1; - - public Gen(T fld1) - { - Fld1 = fld1; - } - - -} - -public class ArrayHolder -{ - public static Gen[, ,] GenArray = new Gen[10, 10, 10]; -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - int size = 10; - int i, j, k; - double sum = 0; - int cLoc = 0; - - - for (i = 0; (i < size); i++) - { - for (j = 0; (j < size); j++) - { - for (k = 0; (k < size); k++) - { - ArrayHolder.GenArray[i, j, k] = new Gen(cLoc); - cLoc++; - } - } - } - - for (i = 0; (i < size); i++) - { - for (j = 0; (j < size); j++) - { - for (k = 0; (k < size); k++) - { - sum += ArrayHolder.GenArray[i, j, k].Fld1; - cLoc++; - } - } - } - - - - - Eval(sum == 499500); - sum = 0; - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} - diff --git a/src/coreclr/tests/src/JIT/Generics/Arrays/TypeParameters/Jagged/class01.cs b/src/coreclr/tests/src/JIT/Generics/Arrays/TypeParameters/Jagged/class01.cs deleted file mode 100644 index 9e8ebb66a6a0..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Arrays/TypeParameters/Jagged/class01.cs +++ /dev/null @@ -1,153 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - - -public struct ValX1 -{ - public T t; - public ValX1(T t) - { - this.t = t; - } - -} -public class RefX1 -{ - public T t; - public RefX1(T t) - { - this.t = t; - } -} - - -public class Gen -{ - public static int size = 10; - - - - public T[][] TArray; - - public void StoreTArray(T[] arr) - { - TArray = new T[size][]; - int i, j; - - for (i = 0; (i < size); i++) - { - TArray[i] = new T[size]; - for (j = 0; (j < size); j++) - { - TArray[i][j] = arr[(i * 10) + j]; - } - } - } - - public void LoadTArray(out T[] arr) - { - arr = new T[size * size]; - int i, j; - for (i = 0; (i < size); i++) - { - for (j = 0; (j < size); j++) - { - arr[(i * 10) + j] = TArray[i][j]; - } - } - } - - public bool VerifyTArray(T[] arr) - { - int i, j; - for (i = 0; (i < size); i++) - { - for (j = 0; (j < size); j++) - { - if (!(arr[(i * 10) + j].Equals(TArray[i][j]))) - { - Console.WriteLine("Failed Verification of Element TArray[{0}][{1}]", i, j); - return false; - } - } - } - return true; - } - -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - int i = 0; - - int[] IntArr_in = new int[100]; - for (i = 0; (i < (10 * 10)); i++) - { - IntArr_in[i] = i; - } - - int[] IntArr_out; - Gen GenInt = new Gen(); - GenInt.StoreTArray(IntArr_in); - GenInt.LoadTArray(out IntArr_out); - Eval(GenInt.VerifyTArray(IntArr_out)); - - double[] DoubleArr_in = new double[100]; - for (i = 0; (i < 10 * 10); i++) - { - DoubleArr_in[i] = i; - } - - double[] DoubleArr_out; - Gen GenDouble = new Gen(); - GenDouble.StoreTArray(DoubleArr_in); - GenDouble.LoadTArray(out DoubleArr_out); - Eval(GenDouble.VerifyTArray(DoubleArr_out)); - - - string[] StringArr_in = new String[100]; - for (i = 0; (i < 10 * 10); i++) - { - StringArr_in[i] = i.ToString(); - } - - String[] StringArr_out; - Gen GenString = new Gen(); - GenString.StoreTArray(StringArr_in); - GenString.LoadTArray(out StringArr_out); - Eval(GenString.VerifyTArray(StringArr_out)); - - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} - diff --git a/src/coreclr/tests/src/JIT/Generics/Arrays/TypeParameters/Jagged/struct01.cs b/src/coreclr/tests/src/JIT/Generics/Arrays/TypeParameters/Jagged/struct01.cs deleted file mode 100644 index 4998b55c205c..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Arrays/TypeParameters/Jagged/struct01.cs +++ /dev/null @@ -1,153 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - - -public struct ValX1 -{ - public T t; - public ValX1(T t) - { - this.t = t; - } - -} -public class RefX1 -{ - public T t; - public RefX1(T t) - { - this.t = t; - } -} - - -public struct Gen -{ - public static int size = 10; - - - - public T[][] TArray; - - public void StoreTArray(T[] arr) - { - TArray = new T[size][]; - int i, j; - - for (i = 0; (i < size); i++) - { - TArray[i] = new T[size]; - for (j = 0; (j < size); j++) - { - TArray[i][j] = arr[(i * 10) + j]; - } - } - } - - public void LoadTArray(out T[] arr) - { - arr = new T[size * size]; - int i, j; - for (i = 0; (i < size); i++) - { - for (j = 0; (j < size); j++) - { - arr[(i * 10) + j] = TArray[i][j]; - } - } - } - - public bool VerifyTArray(T[] arr) - { - int i, j; - for (i = 0; (i < size); i++) - { - for (j = 0; (j < size); j++) - { - if (!(arr[(i * 10) + j].Equals(TArray[i][j]))) - { - Console.WriteLine("Failed Verification of Element TArray[{0}][{1}]", i, j); - return false; - } - } - } - return true; - } - -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - int i = 0; - - int[] IntArr_in = new int[100]; - for (i = 0; (i < (10 * 10)); i++) - { - IntArr_in[i] = i; - } - - int[] IntArr_out; - Gen GenInt = new Gen(); - GenInt.StoreTArray(IntArr_in); - GenInt.LoadTArray(out IntArr_out); - Eval(GenInt.VerifyTArray(IntArr_out)); - - double[] DoubleArr_in = new double[100]; - for (i = 0; (i < 10 * 10); i++) - { - DoubleArr_in[i] = i; - } - - double[] DoubleArr_out; - Gen GenDouble = new Gen(); - GenDouble.StoreTArray(DoubleArr_in); - GenDouble.LoadTArray(out DoubleArr_out); - Eval(GenDouble.VerifyTArray(DoubleArr_out)); - - - string[] StringArr_in = new String[100]; - for (i = 0; (i < 10 * 10); i++) - { - StringArr_in[i] = i.ToString(); - } - - String[] StringArr_out; - Gen GenString = new Gen(); - GenString.StoreTArray(StringArr_in); - GenString.LoadTArray(out StringArr_out); - Eval(GenString.VerifyTArray(StringArr_out)); - - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} - diff --git a/src/coreclr/tests/src/JIT/Generics/Arrays/TypeParameters/MultiDim/class01.cs b/src/coreclr/tests/src/JIT/Generics/Arrays/TypeParameters/MultiDim/class01.cs deleted file mode 100644 index 9f42f64b2dbb..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Arrays/TypeParameters/MultiDim/class01.cs +++ /dev/null @@ -1,152 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - - -public struct ValX1 -{ - public T t; - public ValX1(T t) - { - this.t = t; - } - -} -public class RefX1 -{ - public T t; - public RefX1(T t) - { - this.t = t; - } -} - - -public class Gen -{ - public static int size = 10; - - - - public T[,] TArray; - - public void StoreTArray(T[] arr) - { - TArray = new T[size, size]; - int i, j; - - for (i = 0; (i < size); i++) - { - for (j = 0; (j < size); j++) - { - TArray[i, j] = arr[(i * 10) + j]; - } - } - } - - public void LoadTArray(out T[] arr) - { - arr = new T[size * size]; - int i, j; - for (i = 0; (i < size); i++) - { - for (j = 0; (j < size); j++) - { - arr[(i * 10) + j] = TArray[i, j]; - } - } - } - - public bool VerifyTArray(T[] arr) - { - int i, j; - for (i = 0; (i < size); i++) - { - for (j = 0; (j < size); j++) - { - if (!(arr[(i * 10) + j].Equals(TArray[i, j]))) - { - Console.WriteLine("Failed Verification of Element TArray[{0}][{1}]", i, j); - return false; - } - } - } - return true; - } - -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - int i = 0; - - int[] IntArr_in = new int[100]; - for (i = 0; (i < (10 * 10)); i++) - { - IntArr_in[i] = i; - } - - int[] IntArr_out; - Gen GenInt = new Gen(); - GenInt.StoreTArray(IntArr_in); - GenInt.LoadTArray(out IntArr_out); - Eval(GenInt.VerifyTArray(IntArr_out)); - - double[] DoubleArr_in = new double[100]; - for (i = 0; (i < 10 * 10); i++) - { - DoubleArr_in[i] = i; - } - - double[] DoubleArr_out; - Gen GenDouble = new Gen(); - GenDouble.StoreTArray(DoubleArr_in); - GenDouble.LoadTArray(out DoubleArr_out); - Eval(GenDouble.VerifyTArray(DoubleArr_out)); - - - string[] StringArr_in = new String[100]; - for (i = 0; (i < 10 * 10); i++) - { - StringArr_in[i] = i.ToString(); - } - - String[] StringArr_out; - Gen GenString = new Gen(); - GenString.StoreTArray(StringArr_in); - GenString.LoadTArray(out StringArr_out); - Eval(GenString.VerifyTArray(StringArr_out)); - - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} - diff --git a/src/coreclr/tests/src/JIT/Generics/Arrays/TypeParameters/MultiDim/struct01.cs b/src/coreclr/tests/src/JIT/Generics/Arrays/TypeParameters/MultiDim/struct01.cs deleted file mode 100644 index 551ebdb839f0..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Arrays/TypeParameters/MultiDim/struct01.cs +++ /dev/null @@ -1,152 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - - -public struct ValX1 -{ - public T t; - public ValX1(T t) - { - this.t = t; - } - -} -public class RefX1 -{ - public T t; - public RefX1(T t) - { - this.t = t; - } -} - - -public struct Gen -{ - public static int size = 10; - - - - public T[,] TArray; - - public void StoreTArray(T[] arr) - { - TArray = new T[size, size]; - int i, j; - - for (i = 0; (i < size); i++) - { - for (j = 0; (j < size); j++) - { - TArray[i, j] = arr[(i * 10) + j]; - } - } - } - - public void LoadTArray(out T[] arr) - { - arr = new T[size * size]; - int i, j; - for (i = 0; (i < size); i++) - { - for (j = 0; (j < size); j++) - { - arr[(i * 10) + j] = TArray[i, j]; - } - } - } - - public bool VerifyTArray(T[] arr) - { - int i, j; - for (i = 0; (i < size); i++) - { - for (j = 0; (j < size); j++) - { - if (!(arr[(i * 10) + j].Equals(TArray[i, j]))) - { - Console.WriteLine("Failed Verification of Element TArray[{0}][{1}]", i, j); - return false; - } - } - } - return true; - } - -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - int i = 0; - - int[] IntArr_in = new int[100]; - for (i = 0; (i < (10 * 10)); i++) - { - IntArr_in[i] = i; - } - - int[] IntArr_out; - Gen GenInt = new Gen(); - GenInt.StoreTArray(IntArr_in); - GenInt.LoadTArray(out IntArr_out); - Eval(GenInt.VerifyTArray(IntArr_out)); - - double[] DoubleArr_in = new double[100]; - for (i = 0; (i < 10 * 10); i++) - { - DoubleArr_in[i] = i; - } - - double[] DoubleArr_out; - Gen GenDouble = new Gen(); - GenDouble.StoreTArray(DoubleArr_in); - GenDouble.LoadTArray(out DoubleArr_out); - Eval(GenDouble.VerifyTArray(DoubleArr_out)); - - - string[] StringArr_in = new String[100]; - for (i = 0; (i < 10 * 10); i++) - { - StringArr_in[i] = i.ToString(); - } - - String[] StringArr_out; - Gen GenString = new Gen(); - GenString.StoreTArray(StringArr_in); - GenString.LoadTArray(out StringArr_out); - Eval(GenString.VerifyTArray(StringArr_out)); - - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} - diff --git a/src/coreclr/tests/src/JIT/Generics/Fields/instance_assignment_class01.cs b/src/coreclr/tests/src/JIT/Generics/Fields/instance_assignment_class01.cs deleted file mode 100644 index 48cc37fa64fd..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Fields/instance_assignment_class01.cs +++ /dev/null @@ -1,82 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public class Gen -{ - public T Fld1; - - public T Assign(T t) - { - Fld1 = t; - return Fld1; - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int = 1; - Eval(new Gen().Assign(_int).Equals(_int)); - - double _double = 1; - Eval(new Gen().Assign(_double).Equals(_double)); - - string _string = "string"; - Eval(new Gen().Assign(_string).Equals(_string)); - - object _object = new object(); - Eval(new Gen().Assign(_object).Equals(_object)); - - Guid _Guid = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); - Eval(new Gen().Assign(_Guid).Equals(_Guid)); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Fields/instance_assignment_struct01.cs b/src/coreclr/tests/src/JIT/Generics/Fields/instance_assignment_struct01.cs deleted file mode 100644 index f4c553f7b206..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Fields/instance_assignment_struct01.cs +++ /dev/null @@ -1,82 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public struct Gen -{ - public T Fld1; - - public T Assign(T t) - { - Fld1 = t; - return Fld1; - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int = 1; - Eval(new Gen().Assign(_int).Equals(_int)); - - double _double = 1; - Eval(new Gen().Assign(_double).Equals(_double)); - - string _string = "string"; - Eval(new Gen().Assign(_string).Equals(_string)); - - object _object = new object(); - Eval(new Gen().Assign(_object).Equals(_object)); - - Guid _Guid = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); - Eval(new Gen().Assign(_Guid).Equals(_Guid)); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Fields/instance_equalnull_class01.cs b/src/coreclr/tests/src/JIT/Generics/Fields/instance_equalnull_class01.cs deleted file mode 100644 index a00f241e0109..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Fields/instance_equalnull_class01.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public class Gen -{ - public T Fld1; - - public bool EqualNull(T t) - { - Fld1 = t; - return ((object)Fld1 == null); - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int = 0; - Eval(false == new Gen().EqualNull(_int)); - - double _double = 0; - Eval(false == new Gen().EqualNull(_double)); - - Guid _Guid = new Guid(); - Eval(false == new Gen().EqualNull(_Guid)); - - string _string = "string"; - Eval(false == new Gen().EqualNull(_string)); - Eval(true == new Gen().EqualNull(null)); - - object _object = new object(); - Eval(false == new Gen().EqualNull(_string)); - Eval(true == new Gen().EqualNull(null)); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Fields/instance_equalnull_struct01.cs b/src/coreclr/tests/src/JIT/Generics/Fields/instance_equalnull_struct01.cs deleted file mode 100644 index a9e0ef2fb4c9..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Fields/instance_equalnull_struct01.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public struct Gen -{ - public T Fld1; - - public bool EqualNull(T t) - { - Fld1 = t; - return ((object)Fld1 == null); - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int = 0; - Eval(false == new Gen().EqualNull(_int)); - - double _double = 0; - Eval(false == new Gen().EqualNull(_double)); - - Guid _Guid = new Guid(); - Eval(false == new Gen().EqualNull(_Guid)); - - string _string = "string"; - Eval(false == new Gen().EqualNull(_string)); - Eval(true == new Gen().EqualNull(null)); - - object _object = new object(); - Eval(false == new Gen().EqualNull(_string)); - Eval(true == new Gen().EqualNull(null)); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Fields/instance_passing_class01.cs b/src/coreclr/tests/src/JIT/Generics/Fields/instance_passing_class01.cs deleted file mode 100644 index c8ca582d94a2..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Fields/instance_passing_class01.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public class Gen -{ - public T Fld1; - public T Fld2; - - public T PassAsIn(T t) - { - return t; - } - - public T PassAsRef(ref T t) - { - T temp = t; - t = Fld2; - return temp; - } - - public void PassAsOut(out T t) - { - t = Fld2; - } - public void PassAsParameter(T t1, T t2) - { - Fld1 = t1; - Fld2 = t2; - - T temp = t1; - - Test.Eval(Fld1.Equals(PassAsIn(temp))); - Test.Eval(Fld1.Equals(PassAsRef(ref temp))); - Test.Eval(Fld2.Equals(temp)); - temp = t1; - PassAsOut(out temp); - Test.Eval(Fld2.Equals(temp)); - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int1 = 1; - int _int2 = -1; - new Gen().PassAsParameter(_int1, _int2); - - double _double1 = 1; - double _double2 = -1; - new Gen().PassAsParameter(_double1, _double2); - - string _string1 = "string1"; - string _string2 = "string2"; - new Gen().PassAsParameter(_string1, _string2); - - object _object1 = (object)_string1; - object _object2 = (object)_string2; - new Gen().PassAsParameter(_object1, _object2); - - Guid _Guid1 = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); - Guid _Guid2 = new Guid(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); - new Gen().PassAsParameter(_Guid1, _Guid2); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Fields/instance_passing_struct01.cs b/src/coreclr/tests/src/JIT/Generics/Fields/instance_passing_struct01.cs deleted file mode 100644 index 790190045524..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Fields/instance_passing_struct01.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public struct Gen -{ - public T Fld1; - public T Fld2; - - public T PassAsIn(T t) - { - return t; - } - - public T PassAsRef(ref T t) - { - T temp = t; - t = Fld2; - return temp; - } - - public void PassAsOut(out T t) - { - t = Fld2; - } - public void PassAsParameter(T t1, T t2) - { - Fld1 = t1; - Fld2 = t2; - - T temp = t1; - - Test.Eval(Fld1.Equals(PassAsIn(temp))); - Test.Eval(Fld1.Equals(PassAsRef(ref temp))); - Test.Eval(Fld2.Equals(temp)); - temp = t1; - PassAsOut(out temp); - Test.Eval(Fld2.Equals(temp)); - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int1 = 1; - int _int2 = -1; - new Gen().PassAsParameter(_int1, _int2); - - double _double1 = 1; - double _double2 = -1; - new Gen().PassAsParameter(_double1, _double2); - - string _string1 = "string1"; - string _string2 = "string2"; - new Gen().PassAsParameter(_string1, _string2); - - object _object1 = (object)_string1; - object _object2 = (object)_string2; - new Gen().PassAsParameter(_object1, _object2); - - Guid _Guid1 = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); - Guid _Guid2 = new Guid(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); - new Gen().PassAsParameter(_Guid1, _Guid2); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Fields/static_assignment_class01.cs b/src/coreclr/tests/src/JIT/Generics/Fields/static_assignment_class01.cs deleted file mode 100644 index 31fbcb2e5d27..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Fields/static_assignment_class01.cs +++ /dev/null @@ -1,82 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public class Gen -{ - public static T Fld1; - - public T Assign(T t) - { - Fld1 = t; - return Fld1; - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int = 1; - Eval(new Gen().Assign(_int).Equals(_int)); - - double _double = 1; - Eval(new Gen().Assign(_double).Equals(_double)); - - string _string = "string"; - Eval(new Gen().Assign(_string).Equals(_string)); - - object _object = new object(); - Eval(new Gen().Assign(_object).Equals(_object)); - - Guid _Guid = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); - Eval(new Gen().Assign(_Guid).Equals(_Guid)); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Fields/static_assignment_struct01.cs b/src/coreclr/tests/src/JIT/Generics/Fields/static_assignment_struct01.cs deleted file mode 100644 index 9e9ad24050c6..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Fields/static_assignment_struct01.cs +++ /dev/null @@ -1,82 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public struct Gen -{ - public static T Fld1; - - public T Assign(T t) - { - Fld1 = t; - return Fld1; - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int = 1; - Eval(new Gen().Assign(_int).Equals(_int)); - - double _double = 1; - Eval(new Gen().Assign(_double).Equals(_double)); - - string _string = "string"; - Eval(new Gen().Assign(_string).Equals(_string)); - - object _object = new object(); - Eval(new Gen().Assign(_object).Equals(_object)); - - Guid _Guid = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); - Eval(new Gen().Assign(_Guid).Equals(_Guid)); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Fields/static_equalnull_class01.cs b/src/coreclr/tests/src/JIT/Generics/Fields/static_equalnull_class01.cs deleted file mode 100644 index 546df3dcd606..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Fields/static_equalnull_class01.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public class Gen -{ - public static T Fld1; - - public bool EqualNull(T t) - { - Fld1 = t; - return ((object)Fld1 == null); - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int = 0; - Eval(false == new Gen().EqualNull(_int)); - - double _double = 0; - Eval(false == new Gen().EqualNull(_double)); - - Guid _Guid = new Guid(); - Eval(false == new Gen().EqualNull(_Guid)); - - string _string = "string"; - Eval(false == new Gen().EqualNull(_string)); - Eval(true == new Gen().EqualNull(null)); - - object _object = new object(); - Eval(false == new Gen().EqualNull(_string)); - Eval(true == new Gen().EqualNull(null)); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Fields/static_equalnull_struct01.cs b/src/coreclr/tests/src/JIT/Generics/Fields/static_equalnull_struct01.cs deleted file mode 100644 index e31f8c5e2f97..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Fields/static_equalnull_struct01.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public struct Gen -{ - public static T Fld1; - - public bool EqualNull(T t) - { - Fld1 = t; - return ((object)Fld1 == null); - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int = 0; - Eval(false == new Gen().EqualNull(_int)); - - double _double = 0; - Eval(false == new Gen().EqualNull(_double)); - - Guid _Guid = new Guid(); - Eval(false == new Gen().EqualNull(_Guid)); - - string _string = "string"; - Eval(false == new Gen().EqualNull(_string)); - Eval(true == new Gen().EqualNull(null)); - - object _object = new object(); - Eval(false == new Gen().EqualNull(_string)); - Eval(true == new Gen().EqualNull(null)); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Fields/static_passing_class01.cs b/src/coreclr/tests/src/JIT/Generics/Fields/static_passing_class01.cs deleted file mode 100644 index d5938e3b0d23..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Fields/static_passing_class01.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public class Gen -{ - public static T Fld1; - public static T Fld2; - - public T PassAsIn(T t) - { - return t; - } - - public T PassAsRef(ref T t) - { - T temp = t; - t = Fld2; - return temp; - } - - public void PassAsOut(out T t) - { - t = Fld2; - } - public void PassAsParameter(T t1, T t2) - { - Fld1 = t1; - Fld2 = t2; - - T temp = t1; - - Test.Eval(Fld1.Equals(PassAsIn(temp))); - Test.Eval(Fld1.Equals(PassAsRef(ref temp))); - Test.Eval(Fld2.Equals(temp)); - temp = t1; - PassAsOut(out temp); - Test.Eval(Fld2.Equals(temp)); - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int1 = 1; - int _int2 = -1; - new Gen().PassAsParameter(_int1, _int2); - - double _double1 = 1; - double _double2 = -1; - new Gen().PassAsParameter(_double1, _double2); - - string _string1 = "string1"; - string _string2 = "string2"; - new Gen().PassAsParameter(_string1, _string2); - - object _object1 = (object)_string1; - object _object2 = (object)_string2; - new Gen().PassAsParameter(_object1, _object2); - - Guid _Guid1 = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); - Guid _Guid2 = new Guid(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); - new Gen().PassAsParameter(_Guid1, _Guid2); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Fields/static_passing_struct01.cs b/src/coreclr/tests/src/JIT/Generics/Fields/static_passing_struct01.cs deleted file mode 100644 index 96d019f5a041..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Fields/static_passing_struct01.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public struct Gen -{ - public static T Fld1; - public static T Fld2; - - public T PassAsIn(T t) - { - return t; - } - - public T PassAsRef(ref T t) - { - T temp = t; - t = Fld2; - return temp; - } - - public void PassAsOut(out T t) - { - t = Fld2; - } - public void PassAsParameter(T t1, T t2) - { - Fld1 = t1; - Fld2 = t2; - - T temp = t1; - - Test.Eval(Fld1.Equals(PassAsIn(temp))); - Test.Eval(Fld1.Equals(PassAsRef(ref temp))); - Test.Eval(Fld2.Equals(temp)); - temp = t1; - PassAsOut(out temp); - Test.Eval(Fld2.Equals(temp)); - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int1 = 1; - int _int2 = -1; - new Gen().PassAsParameter(_int1, _int2); - - double _double1 = 1; - double _double2 = -1; - new Gen().PassAsParameter(_double1, _double2); - - string _string1 = "string1"; - string _string2 = "string2"; - new Gen().PassAsParameter(_string1, _string2); - - object _object1 = (object)_string1; - object _object2 = (object)_string2; - new Gen().PassAsParameter(_object1, _object2); - - Guid _Guid1 = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); - Guid _Guid2 = new Guid(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); - new Gen().PassAsParameter(_Guid1, _Guid2); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Instantiation/Classes/class01.cs b/src/coreclr/tests/src/JIT/Generics/Instantiation/Classes/class01.cs deleted file mode 100644 index ede9fb39a3eb..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Instantiation/Classes/class01.cs +++ /dev/null @@ -1,143 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public class Gen -{ - public T Fld1; - - public Gen(T fld1) - { - Fld1 = fld1; - } - - public bool InstVerify(System.Type t1) - { - bool result = true; - - if (!(Fld1.GetType().Equals(t1))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(Gen)); - } - - return result; - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Eval((new Gen(new int())).InstVerify(typeof(int))); - Eval((new Gen(new double())).InstVerify(typeof(double))); - Eval((new Gen("string")).InstVerify(typeof(string))); - Eval((new Gen(new object())).InstVerify(typeof(object))); - Eval((new Gen(new Guid())).InstVerify(typeof(Guid))); - - Eval((new Gen(new int[1])).InstVerify(typeof(int[]))); - Eval((new Gen(new double[1, 1])).InstVerify(typeof(double[,]))); - Eval((new Gen(new string[1][][])).InstVerify(typeof(string[][][]))); - Eval((new Gen(new object[1, 1, 1, 1])).InstVerify(typeof(object[, , ,]))); - Eval((new Gen(new Guid[1][, , ,][])).InstVerify(typeof(Guid[][, , ,][]))); - - Eval((new Gen[]>(new RefX1[] { })).InstVerify(typeof(RefX1[]))); - Eval((new Gen[,]>(new RefX1[1, 1])).InstVerify(typeof(RefX1[,]))); - Eval((new Gen[][][]>(new RefX1[1][][])).InstVerify(typeof(RefX1[][][]))); - Eval((new Gen[, , ,]>(new RefX1[1, 1, 1, 1])).InstVerify(typeof(RefX1[, , ,]))); - Eval((new Gen[][, , ,][]>(new RefX1[1][, , ,][])).InstVerify(typeof(RefX1[][, , ,][]))); - - Eval((new Gen[]>(new RefX2[] { })).InstVerify(typeof(RefX2[]))); - Eval((new Gen[,]>(new RefX2[1, 1])).InstVerify(typeof(RefX2[,]))); - Eval((new Gen[][][]>(new RefX2[1][][])).InstVerify(typeof(RefX2[][][]))); - Eval((new Gen[, , ,]>(new RefX2[1, 1, 1, 1])).InstVerify(typeof(RefX2[, , ,]))); - Eval((new Gen[][, , ,][]>(new RefX2[1][, , ,][])).InstVerify(typeof(RefX2[][, , ,][]))); - - Eval((new Gen[]>(new ValX1[] { })).InstVerify(typeof(ValX1[]))); - Eval((new Gen[,]>(new ValX1[1, 1])).InstVerify(typeof(ValX1[,]))); - Eval((new Gen[][][]>(new ValX1[1][][])).InstVerify(typeof(ValX1[][][]))); - Eval((new Gen[, , ,]>(new ValX1[1, 1, 1, 1])).InstVerify(typeof(ValX1[, , ,]))); - Eval((new Gen[][, , ,][]>(new ValX1[1][, , ,][])).InstVerify(typeof(ValX1[][, , ,][]))); - - Eval((new Gen[]>(new ValX2[] { })).InstVerify(typeof(ValX2[]))); - Eval((new Gen[,]>(new ValX2[1, 1])).InstVerify(typeof(ValX2[,]))); - Eval((new Gen[][][]>(new ValX2[1][][])).InstVerify(typeof(ValX2[][][]))); - Eval((new Gen[, , ,]>(new ValX2[1, 1, 1, 1])).InstVerify(typeof(ValX2[, , ,]))); - - Eval((new Gen[][, , ,][]>(new ValX2[1][, , ,][])).InstVerify(typeof(ValX2[][, , ,][]))); - - Eval((new Gen>(new RefX1())).InstVerify(typeof(RefX1))); - Eval((new Gen>>(new RefX1>())).InstVerify(typeof(RefX1>))); - Eval((new Gen>(new RefX2())).InstVerify(typeof(RefX2))); - Eval((new Gen>(new RefX3())).InstVerify(typeof(RefX3))); - - Eval((new Gen>>(new RefX1>())).InstVerify(typeof(RefX1>))); - Eval((new Gen>>>(new RefX1>>())).InstVerify(typeof(RefX1>>))); - Eval((new Gen>>>>(new RefX1>>>())).InstVerify(typeof(RefX1>>>))); - - Eval((new Gen>>(new RefX1>())).InstVerify(typeof(RefX1>))); - Eval((new Gen, RefX3>>>, RefX2, RefX3>>>>>(new RefX2, RefX3>>>, RefX2, RefX3>>>>())).InstVerify(typeof(RefX2, RefX3>>>, RefX2, RefX3>>>>))); - Eval((new Gen, RefX2, RefX3>>(new RefX3, RefX2, RefX3>())).InstVerify(typeof(RefX3, RefX2, RefX3>))); - - Eval((new Gen>(new ValX1())).InstVerify(typeof(ValX1))); - Eval((new Gen>>(new ValX1>())).InstVerify(typeof(ValX1>))); - Eval((new Gen>(new ValX2())).InstVerify(typeof(ValX2))); - Eval((new Gen>(new ValX3())).InstVerify(typeof(ValX3))); - - Eval((new Gen>>(new ValX1>())).InstVerify(typeof(ValX1>))); - Eval((new Gen>>>(new ValX1>>())).InstVerify(typeof(ValX1>>))); - Eval((new Gen>>>>(new ValX1>>>())).InstVerify(typeof(ValX1>>>))); - - Eval((new Gen>>(new ValX1>())).InstVerify(typeof(ValX1>))); - Eval((new Gen, ValX3>>>, ValX2, ValX3>>>>>(new ValX2, ValX3>>>, ValX2, ValX3>>>>())).InstVerify(typeof(ValX2, ValX3>>>, ValX2, ValX3>>>>))); - Eval((new Gen, ValX2, ValX3>>(new ValX3, ValX2, ValX3>())).InstVerify(typeof(ValX3, ValX2, ValX3>))); - - - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Instantiation/Classes/class02.cs b/src/coreclr/tests/src/JIT/Generics/Instantiation/Classes/class02.cs deleted file mode 100644 index c13925cd8df3..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Instantiation/Classes/class02.cs +++ /dev/null @@ -1,170 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public class Gen -{ - public T Fld1; - public U Fld2; - - public Gen(T fld1, U fld2) - { - Fld1 = fld1; - Fld2 = fld2; - } - - public bool InstVerify(System.Type t1, System.Type t2) - { - bool result = true; - - if (!(Fld1.GetType().Equals(t1))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(Gen)); - } - - if (!(Fld2.GetType().Equals(t2))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld2 in: " + typeof(Gen)); - } - - return result; - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Eval((new Gen(new int(), new int())).InstVerify(typeof(int), typeof(int))); - Eval((new Gen(new int(), new double())).InstVerify(typeof(int), typeof(double))); - Eval((new Gen(new int(), "string")).InstVerify(typeof(int), typeof(string))); - Eval((new Gen(new int(), new object())).InstVerify(typeof(int), typeof(object))); - Eval((new Gen(new int(), new Guid())).InstVerify(typeof(int), typeof(Guid))); - Eval((new Gen>(new int(), new RefX1())).InstVerify(typeof(int), typeof(RefX1))); - Eval((new Gen>(new int(), new RefX1())).InstVerify(typeof(int), typeof(RefX1))); - Eval((new Gen>(new int(), new RefX1())).InstVerify(typeof(int), typeof(RefX1))); - Eval((new Gen>(new int(), new ValX1())).InstVerify(typeof(int), typeof(ValX1))); - Eval((new Gen>(new int(), new ValX1())).InstVerify(typeof(int), typeof(ValX1))); - Eval((new Gen>(new int(), new ValX1())).InstVerify(typeof(int), typeof(ValX1))); - - Eval((new Gen(new double(), new int())).InstVerify(typeof(double), typeof(int))); - Eval((new Gen(new double(), new double())).InstVerify(typeof(double), typeof(double))); - Eval((new Gen(new double(), "string")).InstVerify(typeof(double), typeof(string))); - Eval((new Gen(new double(), new object())).InstVerify(typeof(double), typeof(object))); - Eval((new Gen(new double(), new Guid())).InstVerify(typeof(double), typeof(Guid))); - Eval((new Gen>(new double(), new RefX1())).InstVerify(typeof(double), typeof(RefX1))); - Eval((new Gen>(new double(), new RefX1())).InstVerify(typeof(double), typeof(RefX1))); - Eval((new Gen>(new double(), new RefX1())).InstVerify(typeof(double), typeof(RefX1))); - Eval((new Gen>(new double(), new ValX1())).InstVerify(typeof(double), typeof(ValX1))); - Eval((new Gen>(new double(), new ValX1())).InstVerify(typeof(double), typeof(ValX1))); - Eval((new Gen>(new double(), new ValX1())).InstVerify(typeof(double), typeof(ValX1))); - - Eval((new Gen("string", new int())).InstVerify(typeof(string), typeof(int))); - Eval((new Gen("string", new double())).InstVerify(typeof(string), typeof(double))); - Eval((new Gen("string", "string")).InstVerify(typeof(string), typeof(string))); - Eval((new Gen("string", new object())).InstVerify(typeof(string), typeof(object))); - Eval((new Gen("string", new Guid())).InstVerify(typeof(string), typeof(Guid))); - Eval((new Gen>("string", new RefX1())).InstVerify(typeof(string), typeof(RefX1))); - Eval((new Gen>("string", new RefX1())).InstVerify(typeof(string), typeof(RefX1))); - Eval((new Gen>("string", new RefX1())).InstVerify(typeof(string), typeof(RefX1))); - Eval((new Gen>("string", new ValX1())).InstVerify(typeof(string), typeof(ValX1))); - Eval((new Gen>("string", new ValX1())).InstVerify(typeof(string), typeof(ValX1))); - Eval((new Gen>("string", new ValX1())).InstVerify(typeof(string), typeof(ValX1))); - - Eval((new Gen(new object(), new int())).InstVerify(typeof(object), typeof(int))); - Eval((new Gen(new object(), new double())).InstVerify(typeof(object), typeof(double))); - Eval((new Gen(new object(), "string")).InstVerify(typeof(object), typeof(string))); - Eval((new Gen(new object(), new object())).InstVerify(typeof(object), typeof(object))); - Eval((new Gen(new object(), new Guid())).InstVerify(typeof(object), typeof(Guid))); - Eval((new Gen>(new object(), new RefX1())).InstVerify(typeof(object), typeof(RefX1))); - Eval((new Gen>(new object(), new RefX1())).InstVerify(typeof(object), typeof(RefX1))); - Eval((new Gen>(new object(), new RefX1())).InstVerify(typeof(object), typeof(RefX1))); - Eval((new Gen>(new object(), new ValX1())).InstVerify(typeof(object), typeof(ValX1))); - Eval((new Gen>(new object(), new ValX1())).InstVerify(typeof(object), typeof(ValX1))); - Eval((new Gen>(new object(), new ValX1())).InstVerify(typeof(object), typeof(ValX1))); - - Eval((new Gen(new Guid(), new int())).InstVerify(typeof(Guid), typeof(int))); - Eval((new Gen(new Guid(), new double())).InstVerify(typeof(Guid), typeof(double))); - Eval((new Gen(new Guid(), "string")).InstVerify(typeof(Guid), typeof(string))); - Eval((new Gen(new Guid(), new object())).InstVerify(typeof(Guid), typeof(object))); - Eval((new Gen(new Guid(), new Guid())).InstVerify(typeof(Guid), typeof(Guid))); - Eval((new Gen>(new Guid(), new RefX1())).InstVerify(typeof(Guid), typeof(RefX1))); - Eval((new Gen>(new Guid(), new RefX1())).InstVerify(typeof(Guid), typeof(RefX1))); - Eval((new Gen>(new Guid(), new RefX1())).InstVerify(typeof(Guid), typeof(RefX1))); - Eval((new Gen>(new Guid(), new ValX1())).InstVerify(typeof(Guid), typeof(ValX1))); - Eval((new Gen>(new Guid(), new ValX1())).InstVerify(typeof(Guid), typeof(ValX1))); - Eval((new Gen>(new Guid(), new ValX1())).InstVerify(typeof(Guid), typeof(ValX1))); - - Eval((new Gen, int>(new RefX1(), new int())).InstVerify(typeof(RefX1), typeof(int))); - Eval((new Gen, double>(new RefX1(), new double())).InstVerify(typeof(RefX1), typeof(double))); - Eval((new Gen, string>(new RefX1(), "string")).InstVerify(typeof(RefX1), typeof(string))); - Eval((new Gen, object>(new RefX1(), new object())).InstVerify(typeof(RefX1), typeof(object))); - Eval((new Gen, Guid>(new RefX1(), new Guid())).InstVerify(typeof(RefX1), typeof(Guid))); - Eval((new Gen, RefX1>>(new RefX1(), new RefX1>())).InstVerify(typeof(RefX1), typeof(RefX1>))); - Eval((new Gen, RefX1>(new RefX1(), new RefX1())).InstVerify(typeof(RefX1), typeof(RefX1))); - Eval((new Gen, RefX1>>(new RefX1(), new RefX1>())).InstVerify(typeof(RefX1), typeof(RefX1>))); - Eval((new Gen, ValX1>>(new RefX1(), new ValX1>())).InstVerify(typeof(RefX1), typeof(ValX1>))); - Eval((new Gen, ValX1>(new RefX1(), new ValX1())).InstVerify(typeof(RefX1), typeof(ValX1))); - Eval((new Gen, ValX1[][, , ,][]>>(new RefX1(), new ValX1[][, , ,][]>())).InstVerify(typeof(RefX1), typeof(ValX1[][, , ,][]>))); - - Eval((new Gen, int>(new ValX1(), new int())).InstVerify(typeof(ValX1), typeof(int))); - Eval((new Gen, double>(new ValX1(), new double())).InstVerify(typeof(ValX1), typeof(double))); - Eval((new Gen, string>(new ValX1(), "string")).InstVerify(typeof(ValX1), typeof(string))); - Eval((new Gen, object>(new ValX1(), new object())).InstVerify(typeof(ValX1), typeof(object))); - Eval((new Gen, Guid>(new ValX1(), new Guid())).InstVerify(typeof(ValX1), typeof(Guid))); - Eval((new Gen, RefX1>>(new ValX1(), new RefX1>())).InstVerify(typeof(ValX1), typeof(RefX1>))); - Eval((new Gen, RefX1>(new ValX1(), new RefX1())).InstVerify(typeof(ValX1), typeof(RefX1))); - Eval((new Gen, RefX1[][, , ,][]>>(new ValX1(), new RefX1[][, , ,][]>())).InstVerify(typeof(ValX1), typeof(RefX1[][, , ,][]>))); - Eval((new Gen, ValX1>>(new ValX1(), new ValX1>())).InstVerify(typeof(ValX1), typeof(ValX1>))); - Eval((new Gen, ValX1>(new ValX1(), new ValX1())).InstVerify(typeof(ValX1), typeof(ValX1))); - Eval((new Gen, ValX1[][, , ,][]>>(new ValX1(), new ValX1[][, , ,][]>())).InstVerify(typeof(ValX1), typeof(ValX1[][, , ,][]>))); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Instantiation/Classes/class03.cs b/src/coreclr/tests/src/JIT/Generics/Instantiation/Classes/class03.cs deleted file mode 100644 index 46c41a1176e2..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Instantiation/Classes/class03.cs +++ /dev/null @@ -1,100 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - -public class Gen -{ - public T Fld1; - public U Fld2; - public V Fld3; - - public Gen(T fld1, U fld2, V fld3) - { - Fld1 = fld1; - Fld2 = fld2; - Fld3 = fld3; - } - - public bool InstVerify(System.Type t1, System.Type t2, System.Type t3) - { - bool result = true; - - if (!(Fld1.GetType().Equals(t1))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(Gen)); - } - - if (!(Fld2.GetType().Equals(t2))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld2 in: " + typeof(Gen)); - } - - if (!(Fld3.GetType().Equals(t3))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld3 in: " + typeof(Gen)); - } - - return result; - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Eval((new Gen(new int(), new double(), new Guid())).InstVerify(typeof(int), typeof(double), typeof(Guid))); - Eval((new Gen(new double(), new Guid(), "string")).InstVerify(typeof(double), typeof(Guid), typeof(string))); - Eval((new Gen(new Guid(), "string", new object())).InstVerify(typeof(Guid), typeof(string), typeof(object))); - Eval((new Gen("string", new object(), new int[1])).InstVerify(typeof(string), typeof(object), typeof(int[]))); - Eval((new Gen>>(new object(), new int[1], new RefX1>())).InstVerify(typeof(object), typeof(int[]), typeof(RefX1>))); - Eval((new Gen>, ValX1>>(new int[1], new RefX1>(), new ValX1>())).InstVerify(typeof(int[]), typeof(RefX1>), typeof(ValX1>))); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Instantiation/Interfaces/Struct01.cs b/src/coreclr/tests/src/JIT/Generics/Instantiation/Interfaces/Struct01.cs deleted file mode 100644 index 93ae2c8fcd6c..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Instantiation/Interfaces/Struct01.cs +++ /dev/null @@ -1,342 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public interface IGen -{ - void _Init(T fld1); - bool InstVerify(System.Type t1); -} - -public interface IGenSub : IGen { } - -public struct GenInt : IGenSub -{ - int Fld1; - - public void _Init(int fld1) - { - Fld1 = fld1; - } - - public bool InstVerify(System.Type t1) - { - bool result = true; - - if (!(Fld1.GetType().Equals(t1))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); - } - - return result; - } -} - -public struct GenDouble : IGen -{ - double Fld1; - - public void _Init(double fld1) - { - Fld1 = fld1; - } - - - public bool InstVerify(System.Type t1) - { - bool result = true; - - if (!(Fld1.GetType().Equals(t1))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); - } - - return result; - } -} - -public struct GenString : IGen -{ - string Fld1; - - public void _Init(string fld1) - { - Fld1 = fld1; - } - - - public bool InstVerify(System.Type t1) - { - bool result = true; - - if (!(Fld1.GetType().Equals(t1))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); - } - - return result; - } -} - -public struct GenObject : IGen -{ - object Fld1; - - public void _Init(object fld1) - { - Fld1 = fld1; - } - - public bool InstVerify(System.Type t1) - { - bool result = true; - - if (!(Fld1.GetType().Equals(t1))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); - } - - return result; - } -} - -public struct GenGuid : IGen -{ - Guid Fld1; - - public void _Init(Guid fld1) - { - Fld1 = fld1; - } - - - public bool InstVerify(System.Type t1) - { - bool result = true; - - if (!(Fld1.GetType().Equals(t1))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); - } - - return result; - } -} - -public struct GenConstructedReference : IGen> -{ - RefX1 Fld1; - - public void _Init(RefX1 fld1) - { - Fld1 = fld1; - } - - - public bool InstVerify(System.Type t1) - { - bool result = true; - - if (!(Fld1.GetType().Equals(t1))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen>)); - } - - return result; - } -} - -public struct GenConstructedValue : IGen> -{ - ValX1 Fld1; - - public void _Init(ValX1 fld1) - { - Fld1 = fld1; - } - - - public bool InstVerify(System.Type t1) - { - bool result = true; - - if (!(Fld1.GetType().Equals(t1))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen>)); - } - - return result; - } -} - - -public struct Gen1DIntArray : IGen -{ - int[] Fld1; - - public void _Init(int[] fld1) - { - Fld1 = fld1; - } - - public bool InstVerify(System.Type t1) - { - bool result = true; - - if (!(Fld1.GetType().Equals(t1))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); - } - - return result; - } -} - -public struct Gen2DStringArray : IGen -{ - string[,] Fld1; - - public void _Init(string[,] fld1) - { - Fld1 = fld1; - } - - - public bool InstVerify(System.Type t1) - { - bool result = true; - - if (!(Fld1.GetType().Equals(t1))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); - } - - return result; - } -} - -public struct GenJaggedObjectArray : IGen -{ - object[][] Fld1; - - public void _Init(object[][] fld1) - { - Fld1 = fld1; - } - - - public bool InstVerify(System.Type t1) - { - bool result = true; - - if (!(Fld1.GetType().Equals(t1))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); - } - - return result; - } -} - - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - IGen IGenInt = new GenInt(); - IGenInt._Init(new int()); - Eval(IGenInt.InstVerify(typeof(int))); - - IGen IGenDouble = new GenDouble(); - IGenDouble._Init(new double()); - Eval(IGenDouble.InstVerify(typeof(double))); - - IGen IGenString = new GenString(); - IGenString._Init("string"); - Eval(IGenString.InstVerify(typeof(string))); - - IGen IGenObject = new GenObject(); - IGenObject._Init(new object()); - Eval(IGenObject.InstVerify(typeof(object))); - - IGen IGenGuid = new GenGuid(); - IGenGuid._Init(new Guid()); - Eval(IGenGuid.InstVerify(typeof(Guid))); - - IGen> IGenConstructedReference = new GenConstructedReference(); - IGenConstructedReference._Init(new RefX1()); - Eval(IGenConstructedReference.InstVerify(typeof(RefX1))); - - IGen> IGenConstructedValue = new GenConstructedValue(); - IGenConstructedValue._Init(new ValX1()); - Eval(IGenConstructedValue.InstVerify(typeof(ValX1))); - - IGen IGen1DIntArray = new Gen1DIntArray(); - IGen1DIntArray._Init(new int[1]); - Eval(IGen1DIntArray.InstVerify(typeof(int[]))); - - IGen IGen2DStringArray = new Gen2DStringArray(); - IGen2DStringArray._Init(new string[1, 1]); - Eval(IGen2DStringArray.InstVerify(typeof(string[,]))); - - IGen IGenJaggedObjectArray = new GenJaggedObjectArray(); - IGenJaggedObjectArray._Init(new object[1][]); - Eval(IGenJaggedObjectArray.InstVerify(typeof(object[][]))); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Instantiation/Interfaces/Struct02.cs b/src/coreclr/tests/src/JIT/Generics/Instantiation/Interfaces/Struct02.cs deleted file mode 100644 index 62feaf6afcf0..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Instantiation/Interfaces/Struct02.cs +++ /dev/null @@ -1,114 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public interface IGen -{ - bool InstVerify(System.Type t1); -} - -public struct Gen : IGen -{ - public T Fld1; - - public Gen(T fld1) - { - Fld1 = fld1; - } - - public bool InstVerify(System.Type t1) - { - bool result = true; - - if (!(Fld1.GetType().Equals(t1))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); - } - - return result; - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - IGen IGenInt = new Gen(new int()); - Eval(IGenInt.InstVerify(typeof(int))); - - IGen IGenDouble = new Gen(new double()); - Eval(IGenDouble.InstVerify(typeof(double))); - - IGen IGenString = new Gen("string"); - Eval(IGenString.InstVerify(typeof(string))); - - IGen IGenObject = new Gen(new object()); - Eval(IGenObject.InstVerify(typeof(object))); - - IGen IGenGuid = new Gen(new Guid()); - Eval(IGenGuid.InstVerify(typeof(Guid))); - - IGen> IGenConstructedReference = new Gen>(new RefX1()); - Eval(IGenConstructedReference.InstVerify(typeof(RefX1))); - - IGen> IGenConstructedValue = new Gen>(new ValX1()); - Eval(IGenConstructedValue.InstVerify(typeof(ValX1))); - - IGen IGen1DIntArray = new Gen(new int[1]); - Eval(IGen1DIntArray.InstVerify(typeof(int[]))); - - IGen IGen2DStringArray = new Gen(new string[1, 1]); - Eval(IGen2DStringArray.InstVerify(typeof(string[,]))); - - IGen IGenJaggedObjectArray = new Gen(new object[1][]); - Eval(IGenJaggedObjectArray.InstVerify(typeof(object[][]))); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Instantiation/Structs/struct01.cs b/src/coreclr/tests/src/JIT/Generics/Instantiation/Structs/struct01.cs deleted file mode 100644 index 050131fc7e99..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Instantiation/Structs/struct01.cs +++ /dev/null @@ -1,142 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - -public struct Gen -{ - public T Fld1; - - public Gen(T fld1) - { - Fld1 = fld1; - } - - public bool InstVerify(System.Type t1) - { - bool result = true; - - if (!(Fld1.GetType().Equals(t1))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(Gen)); - } - - return result; - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Eval((new Gen(new int())).InstVerify(typeof(int))); - Eval((new Gen(new double())).InstVerify(typeof(double))); - Eval((new Gen("string")).InstVerify(typeof(string))); - Eval((new Gen(new object())).InstVerify(typeof(object))); - Eval((new Gen(new Guid())).InstVerify(typeof(Guid))); - - Eval((new Gen(new int[1])).InstVerify(typeof(int[]))); - Eval((new Gen(new double[1, 1])).InstVerify(typeof(double[,]))); - Eval((new Gen(new string[1][][])).InstVerify(typeof(string[][][]))); - Eval((new Gen(new object[1, 1, 1, 1])).InstVerify(typeof(object[, , ,]))); - Eval((new Gen(new Guid[1][, , ,][])).InstVerify(typeof(Guid[][, , ,][]))); - - Eval((new Gen[]>(new RefX1[] { })).InstVerify(typeof(RefX1[]))); - Eval((new Gen[,]>(new RefX1[1, 1])).InstVerify(typeof(RefX1[,]))); - Eval((new Gen[][][]>(new RefX1[1][][])).InstVerify(typeof(RefX1[][][]))); - Eval((new Gen[, , ,]>(new RefX1[1, 1, 1, 1])).InstVerify(typeof(RefX1[, , ,]))); - Eval((new Gen[][, , ,][]>(new RefX1[1][, , ,][])).InstVerify(typeof(RefX1[][, , ,][]))); - - Eval((new Gen[]>(new RefX2[] { })).InstVerify(typeof(RefX2[]))); - Eval((new Gen[,]>(new RefX2[1, 1])).InstVerify(typeof(RefX2[,]))); - Eval((new Gen[][][]>(new RefX2[1][][])).InstVerify(typeof(RefX2[][][]))); - Eval((new Gen[, , ,]>(new RefX2[1, 1, 1, 1])).InstVerify(typeof(RefX2[, , ,]))); - Eval((new Gen[][, , ,][]>(new RefX2[1][, , ,][])).InstVerify(typeof(RefX2[][, , ,][]))); - - Eval((new Gen[]>(new ValX1[] { })).InstVerify(typeof(ValX1[]))); - Eval((new Gen[,]>(new ValX1[1, 1])).InstVerify(typeof(ValX1[,]))); - Eval((new Gen[][][]>(new ValX1[1][][])).InstVerify(typeof(ValX1[][][]))); - Eval((new Gen[, , ,]>(new ValX1[1, 1, 1, 1])).InstVerify(typeof(ValX1[, , ,]))); - Eval((new Gen[][, , ,][]>(new ValX1[1][, , ,][])).InstVerify(typeof(ValX1[][, , ,][]))); - - Eval((new Gen[]>(new ValX2[] { })).InstVerify(typeof(ValX2[]))); - Eval((new Gen[,]>(new ValX2[1, 1])).InstVerify(typeof(ValX2[,]))); - Eval((new Gen[][][]>(new ValX2[1][][])).InstVerify(typeof(ValX2[][][]))); - Eval((new Gen[, , ,]>(new ValX2[1, 1, 1, 1])).InstVerify(typeof(ValX2[, , ,]))); - - Eval((new Gen[][, , ,][]>(new ValX2[1][, , ,][])).InstVerify(typeof(ValX2[][, , ,][]))); - - Eval((new Gen>(new RefX1())).InstVerify(typeof(RefX1))); - Eval((new Gen>>(new RefX1>())).InstVerify(typeof(RefX1>))); - Eval((new Gen>(new RefX2())).InstVerify(typeof(RefX2))); - Eval((new Gen>(new RefX3())).InstVerify(typeof(RefX3))); - - Eval((new Gen>>(new RefX1>())).InstVerify(typeof(RefX1>))); - Eval((new Gen>>>(new RefX1>>())).InstVerify(typeof(RefX1>>))); - Eval((new Gen>>>>(new RefX1>>>())).InstVerify(typeof(RefX1>>>))); - - Eval((new Gen>>(new RefX1>())).InstVerify(typeof(RefX1>))); - Eval((new Gen, RefX3>>>, RefX2, RefX3>>>>>(new RefX2, RefX3>>>, RefX2, RefX3>>>>())).InstVerify(typeof(RefX2, RefX3>>>, RefX2, RefX3>>>>))); - Eval((new Gen, RefX2, RefX3>>(new RefX3, RefX2, RefX3>())).InstVerify(typeof(RefX3, RefX2, RefX3>))); - - Eval((new Gen>(new ValX1())).InstVerify(typeof(ValX1))); - Eval((new Gen>>(new ValX1>())).InstVerify(typeof(ValX1>))); - Eval((new Gen>(new ValX2())).InstVerify(typeof(ValX2))); - Eval((new Gen>(new ValX3())).InstVerify(typeof(ValX3))); - - Eval((new Gen>>(new ValX1>())).InstVerify(typeof(ValX1>))); - Eval((new Gen>>>(new ValX1>>())).InstVerify(typeof(ValX1>>))); - Eval((new Gen>>>>(new ValX1>>>())).InstVerify(typeof(ValX1>>>))); - - Eval((new Gen>>(new ValX1>())).InstVerify(typeof(ValX1>))); - Eval((new Gen, ValX3>>>, ValX2, ValX3>>>>>(new ValX2, ValX3>>>, ValX2, ValX3>>>>())).InstVerify(typeof(ValX2, ValX3>>>, ValX2, ValX3>>>>))); - Eval((new Gen, ValX2, ValX3>>(new ValX3, ValX2, ValX3>())).InstVerify(typeof(ValX3, ValX2, ValX3>))); - - - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Instantiation/Structs/struct02.cs b/src/coreclr/tests/src/JIT/Generics/Instantiation/Structs/struct02.cs deleted file mode 100644 index 1e4204ddaad6..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Instantiation/Structs/struct02.cs +++ /dev/null @@ -1,170 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public struct Gen -{ - public T Fld1; - public U Fld2; - - public Gen(T fld1, U fld2) - { - Fld1 = fld1; - Fld2 = fld2; - } - - public bool InstVerify(System.Type t1, System.Type t2) - { - bool result = true; - - if (!(Fld1.GetType().Equals(t1))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(Gen)); - } - - if (!(Fld2.GetType().Equals(t2))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld2 in: " + typeof(Gen)); - } - - return result; - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Eval((new Gen(new int(), new int())).InstVerify(typeof(int), typeof(int))); - Eval((new Gen(new int(), new double())).InstVerify(typeof(int), typeof(double))); - Eval((new Gen(new int(), "string")).InstVerify(typeof(int), typeof(string))); - Eval((new Gen(new int(), new object())).InstVerify(typeof(int), typeof(object))); - Eval((new Gen(new int(), new Guid())).InstVerify(typeof(int), typeof(Guid))); - Eval((new Gen>(new int(), new RefX1())).InstVerify(typeof(int), typeof(RefX1))); - Eval((new Gen>(new int(), new RefX1())).InstVerify(typeof(int), typeof(RefX1))); - Eval((new Gen>(new int(), new RefX1())).InstVerify(typeof(int), typeof(RefX1))); - Eval((new Gen>(new int(), new ValX1())).InstVerify(typeof(int), typeof(ValX1))); - Eval((new Gen>(new int(), new ValX1())).InstVerify(typeof(int), typeof(ValX1))); - Eval((new Gen>(new int(), new ValX1())).InstVerify(typeof(int), typeof(ValX1))); - - Eval((new Gen(new double(), new int())).InstVerify(typeof(double), typeof(int))); - Eval((new Gen(new double(), new double())).InstVerify(typeof(double), typeof(double))); - Eval((new Gen(new double(), "string")).InstVerify(typeof(double), typeof(string))); - Eval((new Gen(new double(), new object())).InstVerify(typeof(double), typeof(object))); - Eval((new Gen(new double(), new Guid())).InstVerify(typeof(double), typeof(Guid))); - Eval((new Gen>(new double(), new RefX1())).InstVerify(typeof(double), typeof(RefX1))); - Eval((new Gen>(new double(), new RefX1())).InstVerify(typeof(double), typeof(RefX1))); - Eval((new Gen>(new double(), new RefX1())).InstVerify(typeof(double), typeof(RefX1))); - Eval((new Gen>(new double(), new ValX1())).InstVerify(typeof(double), typeof(ValX1))); - Eval((new Gen>(new double(), new ValX1())).InstVerify(typeof(double), typeof(ValX1))); - Eval((new Gen>(new double(), new ValX1())).InstVerify(typeof(double), typeof(ValX1))); - - Eval((new Gen("string", new int())).InstVerify(typeof(string), typeof(int))); - Eval((new Gen("string", new double())).InstVerify(typeof(string), typeof(double))); - Eval((new Gen("string", "string")).InstVerify(typeof(string), typeof(string))); - Eval((new Gen("string", new object())).InstVerify(typeof(string), typeof(object))); - Eval((new Gen("string", new Guid())).InstVerify(typeof(string), typeof(Guid))); - Eval((new Gen>("string", new RefX1())).InstVerify(typeof(string), typeof(RefX1))); - Eval((new Gen>("string", new RefX1())).InstVerify(typeof(string), typeof(RefX1))); - Eval((new Gen>("string", new RefX1())).InstVerify(typeof(string), typeof(RefX1))); - Eval((new Gen>("string", new ValX1())).InstVerify(typeof(string), typeof(ValX1))); - Eval((new Gen>("string", new ValX1())).InstVerify(typeof(string), typeof(ValX1))); - Eval((new Gen>("string", new ValX1())).InstVerify(typeof(string), typeof(ValX1))); - - Eval((new Gen(new object(), new int())).InstVerify(typeof(object), typeof(int))); - Eval((new Gen(new object(), new double())).InstVerify(typeof(object), typeof(double))); - Eval((new Gen(new object(), "string")).InstVerify(typeof(object), typeof(string))); - Eval((new Gen(new object(), new object())).InstVerify(typeof(object), typeof(object))); - Eval((new Gen(new object(), new Guid())).InstVerify(typeof(object), typeof(Guid))); - Eval((new Gen>(new object(), new RefX1())).InstVerify(typeof(object), typeof(RefX1))); - Eval((new Gen>(new object(), new RefX1())).InstVerify(typeof(object), typeof(RefX1))); - Eval((new Gen>(new object(), new RefX1())).InstVerify(typeof(object), typeof(RefX1))); - Eval((new Gen>(new object(), new ValX1())).InstVerify(typeof(object), typeof(ValX1))); - Eval((new Gen>(new object(), new ValX1())).InstVerify(typeof(object), typeof(ValX1))); - Eval((new Gen>(new object(), new ValX1())).InstVerify(typeof(object), typeof(ValX1))); - - Eval((new Gen(new Guid(), new int())).InstVerify(typeof(Guid), typeof(int))); - Eval((new Gen(new Guid(), new double())).InstVerify(typeof(Guid), typeof(double))); - Eval((new Gen(new Guid(), "string")).InstVerify(typeof(Guid), typeof(string))); - Eval((new Gen(new Guid(), new object())).InstVerify(typeof(Guid), typeof(object))); - Eval((new Gen(new Guid(), new Guid())).InstVerify(typeof(Guid), typeof(Guid))); - Eval((new Gen>(new Guid(), new RefX1())).InstVerify(typeof(Guid), typeof(RefX1))); - Eval((new Gen>(new Guid(), new RefX1())).InstVerify(typeof(Guid), typeof(RefX1))); - Eval((new Gen>(new Guid(), new RefX1())).InstVerify(typeof(Guid), typeof(RefX1))); - Eval((new Gen>(new Guid(), new ValX1())).InstVerify(typeof(Guid), typeof(ValX1))); - Eval((new Gen>(new Guid(), new ValX1())).InstVerify(typeof(Guid), typeof(ValX1))); - Eval((new Gen>(new Guid(), new ValX1())).InstVerify(typeof(Guid), typeof(ValX1))); - - Eval((new Gen, int>(new RefX1(), new int())).InstVerify(typeof(RefX1), typeof(int))); - Eval((new Gen, double>(new RefX1(), new double())).InstVerify(typeof(RefX1), typeof(double))); - Eval((new Gen, string>(new RefX1(), "string")).InstVerify(typeof(RefX1), typeof(string))); - Eval((new Gen, object>(new RefX1(), new object())).InstVerify(typeof(RefX1), typeof(object))); - Eval((new Gen, Guid>(new RefX1(), new Guid())).InstVerify(typeof(RefX1), typeof(Guid))); - Eval((new Gen, RefX1>>(new RefX1(), new RefX1>())).InstVerify(typeof(RefX1), typeof(RefX1>))); - Eval((new Gen, RefX1>(new RefX1(), new RefX1())).InstVerify(typeof(RefX1), typeof(RefX1))); - Eval((new Gen, RefX1>>(new RefX1(), new RefX1>())).InstVerify(typeof(RefX1), typeof(RefX1>))); - Eval((new Gen, ValX1>>(new RefX1(), new ValX1>())).InstVerify(typeof(RefX1), typeof(ValX1>))); - Eval((new Gen, ValX1>(new RefX1(), new ValX1())).InstVerify(typeof(RefX1), typeof(ValX1))); - Eval((new Gen, ValX1[][, , ,][]>>(new RefX1(), new ValX1[][, , ,][]>())).InstVerify(typeof(RefX1), typeof(ValX1[][, , ,][]>))); - - Eval((new Gen, int>(new ValX1(), new int())).InstVerify(typeof(ValX1), typeof(int))); - Eval((new Gen, double>(new ValX1(), new double())).InstVerify(typeof(ValX1), typeof(double))); - Eval((new Gen, string>(new ValX1(), "string")).InstVerify(typeof(ValX1), typeof(string))); - Eval((new Gen, object>(new ValX1(), new object())).InstVerify(typeof(ValX1), typeof(object))); - Eval((new Gen, Guid>(new ValX1(), new Guid())).InstVerify(typeof(ValX1), typeof(Guid))); - Eval((new Gen, RefX1>>(new ValX1(), new RefX1>())).InstVerify(typeof(ValX1), typeof(RefX1>))); - Eval((new Gen, RefX1>(new ValX1(), new RefX1())).InstVerify(typeof(ValX1), typeof(RefX1))); - Eval((new Gen, RefX1[][, , ,][]>>(new ValX1(), new RefX1[][, , ,][]>())).InstVerify(typeof(ValX1), typeof(RefX1[][, , ,][]>))); - Eval((new Gen, ValX1>>(new ValX1(), new ValX1>())).InstVerify(typeof(ValX1), typeof(ValX1>))); - Eval((new Gen, ValX1>(new ValX1(), new ValX1())).InstVerify(typeof(ValX1), typeof(ValX1))); - Eval((new Gen, ValX1[][, , ,][]>>(new ValX1(), new ValX1[][, , ,][]>())).InstVerify(typeof(ValX1), typeof(ValX1[][, , ,][]>))); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Instantiation/Structs/struct03.cs b/src/coreclr/tests/src/JIT/Generics/Instantiation/Structs/struct03.cs deleted file mode 100644 index b1129c5acdcc..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Instantiation/Structs/struct03.cs +++ /dev/null @@ -1,100 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - -public struct Gen -{ - public T Fld1; - public U Fld2; - public V Fld3; - - public Gen(T fld1, U fld2, V fld3) - { - Fld1 = fld1; - Fld2 = fld2; - Fld3 = fld3; - } - - public bool InstVerify(System.Type t1, System.Type t2, System.Type t3) - { - bool result = true; - - if (!(Fld1.GetType().Equals(t1))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(Gen)); - } - - if (!(Fld2.GetType().Equals(t2))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld2 in: " + typeof(Gen)); - } - - if (!(Fld3.GetType().Equals(t3))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld3 in: " + typeof(Gen)); - } - - return result; - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Eval((new Gen(new int(), new double(), new Guid())).InstVerify(typeof(int), typeof(double), typeof(Guid))); - Eval((new Gen(new double(), new Guid(), "string")).InstVerify(typeof(double), typeof(Guid), typeof(string))); - Eval((new Gen(new Guid(), "string", new object())).InstVerify(typeof(Guid), typeof(string), typeof(object))); - Eval((new Gen("string", new object(), new int[1])).InstVerify(typeof(string), typeof(object), typeof(int[]))); - Eval((new Gen>>(new object(), new int[1], new RefX1>())).InstVerify(typeof(object), typeof(int[]), typeof(RefX1>))); - Eval((new Gen>, ValX1>>(new int[1], new RefX1>(), new ValX1>())).InstVerify(typeof(int[]), typeof(RefX1>), typeof(ValX1>))); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Locals/instance_assignment_class01.cs b/src/coreclr/tests/src/JIT/Generics/Locals/instance_assignment_class01.cs deleted file mode 100644 index 2928e7f5f200..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Locals/instance_assignment_class01.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public class Gen -{ - public T Assign(T t) - { - T Fld1 = t; - return Fld1; - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int = 1; - Eval(new Gen().Assign(_int).Equals(_int)); - - double _double = 1; - Eval(new Gen().Assign(_double).Equals(_double)); - - string _string = "string"; - Eval(new Gen().Assign(_string).Equals(_string)); - - object _object = new object(); - Eval(new Gen().Assign(_object).Equals(_object)); - - Guid _Guid = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); - Eval(new Gen().Assign(_Guid).Equals(_Guid)); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Locals/instance_assignment_struct01.cs b/src/coreclr/tests/src/JIT/Generics/Locals/instance_assignment_struct01.cs deleted file mode 100644 index 1991fe0b0057..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Locals/instance_assignment_struct01.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public struct Gen -{ - public T Assign(T t) - { - T Fld1 = t; - return Fld1; - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int = 1; - Eval(new Gen().Assign(_int).Equals(_int)); - - double _double = 1; - Eval(new Gen().Assign(_double).Equals(_double)); - - string _string = "string"; - Eval(new Gen().Assign(_string).Equals(_string)); - - object _object = new object(); - Eval(new Gen().Assign(_object).Equals(_object)); - - Guid _Guid = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); - Eval(new Gen().Assign(_Guid).Equals(_Guid)); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Locals/instance_equalnull_class01.cs b/src/coreclr/tests/src/JIT/Generics/Locals/instance_equalnull_class01.cs deleted file mode 100644 index 4cdc252a2792..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Locals/instance_equalnull_class01.cs +++ /dev/null @@ -1,82 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public class Gen -{ - public bool EqualNull(T t) - { - T Fld1 = t; - return ((object)Fld1 == null); - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int = 0; - Eval(false == new Gen().EqualNull(_int)); - - double _double = 0; - Eval(false == new Gen().EqualNull(_double)); - - Guid _Guid = new Guid(); - Eval(false == new Gen().EqualNull(_Guid)); - - string _string = "string"; - Eval(false == new Gen().EqualNull(_string)); - Eval(true == new Gen().EqualNull(null)); - - object _object = new object(); - Eval(false == new Gen().EqualNull(_string)); - Eval(true == new Gen().EqualNull(null)); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Locals/instance_equalnull_struct01.cs b/src/coreclr/tests/src/JIT/Generics/Locals/instance_equalnull_struct01.cs deleted file mode 100644 index 46b0d3058ebc..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Locals/instance_equalnull_struct01.cs +++ /dev/null @@ -1,82 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public struct Gen -{ - public bool EqualNull(T t) - { - T Fld1 = t; - return ((object)Fld1 == null); - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int = 0; - Eval(false == new Gen().EqualNull(_int)); - - double _double = 0; - Eval(false == new Gen().EqualNull(_double)); - - Guid _Guid = new Guid(); - Eval(false == new Gen().EqualNull(_Guid)); - - string _string = "string"; - Eval(false == new Gen().EqualNull(_string)); - Eval(true == new Gen().EqualNull(null)); - - object _object = new object(); - Eval(false == new Gen().EqualNull(_string)); - Eval(true == new Gen().EqualNull(null)); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Locals/instance_passing_class01.cs b/src/coreclr/tests/src/JIT/Generics/Locals/instance_passing_class01.cs deleted file mode 100644 index d2e3772d0498..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Locals/instance_passing_class01.cs +++ /dev/null @@ -1,110 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public class Gen -{ - public T PassAsIn(T t) - { - return t; - } - - public T PassAsRef(ref T t, T Fld2) - { - T temp = t; - t = Fld2; - return temp; - } - - public void PassAsOut(out T t, T Fld2) - { - t = Fld2; - } - public void PassAsParameter(T t1, T t2) - { - T Fld1 = t1; - T Fld2 = t2; - - T temp = t1; - - Test.Eval(Fld1.Equals(PassAsIn(temp))); - Test.Eval(Fld1.Equals(PassAsRef(ref temp, Fld2))); - Test.Eval(Fld2.Equals(temp)); - temp = t1; - PassAsOut(out temp, Fld2); - Test.Eval(Fld2.Equals(temp)); - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int1 = 1; - int _int2 = -1; - new Gen().PassAsParameter(_int1, _int2); - - double _double1 = 1; - double _double2 = -1; - new Gen().PassAsParameter(_double1, _double2); - - string _string1 = "string1"; - string _string2 = "string2"; - new Gen().PassAsParameter(_string1, _string2); - - object _object1 = (object)_string1; - object _object2 = (object)_string2; - new Gen().PassAsParameter(_object1, _object2); - - Guid _Guid1 = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); - Guid _Guid2 = new Guid(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); - new Gen().PassAsParameter(_Guid1, _Guid2); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Locals/instance_passing_struct01.cs b/src/coreclr/tests/src/JIT/Generics/Locals/instance_passing_struct01.cs deleted file mode 100644 index b582ae4cee76..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Locals/instance_passing_struct01.cs +++ /dev/null @@ -1,110 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public struct Gen -{ - public T PassAsIn(T t) - { - return t; - } - - public T PassAsRef(ref T t, T Fld2) - { - T temp = t; - t = Fld2; - return temp; - } - - public void PassAsOut(out T t, T Fld2) - { - t = Fld2; - } - public void PassAsParameter(T t1, T t2) - { - T Fld1 = t1; - T Fld2 = t2; - - T temp = t1; - - Test.Eval(Fld1.Equals(PassAsIn(temp))); - Test.Eval(Fld1.Equals(PassAsRef(ref temp, Fld2))); - Test.Eval(Fld2.Equals(temp)); - temp = t1; - PassAsOut(out temp, Fld2); - Test.Eval(Fld2.Equals(temp)); - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int1 = 1; - int _int2 = -1; - new Gen().PassAsParameter(_int1, _int2); - - double _double1 = 1; - double _double2 = -1; - new Gen().PassAsParameter(_double1, _double2); - - string _string1 = "string1"; - string _string2 = "string2"; - new Gen().PassAsParameter(_string1, _string2); - - object _object1 = (object)_string1; - object _object2 = (object)_string2; - new Gen().PassAsParameter(_object1, _object2); - - Guid _Guid1 = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); - Guid _Guid2 = new Guid(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); - new Gen().PassAsParameter(_Guid1, _Guid2); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Locals/static_assignment_class01.cs b/src/coreclr/tests/src/JIT/Generics/Locals/static_assignment_class01.cs deleted file mode 100644 index 13add02fb5c7..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Locals/static_assignment_class01.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public class Gen -{ - public static T Assign(T t) - { - T Fld1 = t; - return Fld1; - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int = 1; - Eval(Gen.Assign(_int).Equals(_int)); - - double _double = 1; - Eval(Gen.Assign(_double).Equals(_double)); - - string _string = "string"; - Eval(Gen.Assign(_string).Equals(_string)); - - object _object = new object(); - Eval(Gen.Assign(_object).Equals(_object)); - - Guid _Guid = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); - Eval(Gen.Assign(_Guid).Equals(_Guid)); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Locals/static_assignment_struct01.cs b/src/coreclr/tests/src/JIT/Generics/Locals/static_assignment_struct01.cs deleted file mode 100644 index b4e7d0d27d1d..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Locals/static_assignment_struct01.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public struct Gen -{ - public static T Assign(T t) - { - T Fld1 = t; - return Fld1; - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int = 1; - Eval(Gen.Assign(_int).Equals(_int)); - - double _double = 1; - Eval(Gen.Assign(_double).Equals(_double)); - - string _string = "string"; - Eval(Gen.Assign(_string).Equals(_string)); - - object _object = new object(); - Eval(Gen.Assign(_object).Equals(_object)); - - Guid _Guid = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); - Eval(Gen.Assign(_Guid).Equals(_Guid)); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Locals/static_equalnull_class01.cs b/src/coreclr/tests/src/JIT/Generics/Locals/static_equalnull_class01.cs deleted file mode 100644 index f425993d4927..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Locals/static_equalnull_class01.cs +++ /dev/null @@ -1,82 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public class Gen -{ - public static bool EqualNull(T t) - { - T Fld1 = t; - return ((object)Fld1 == null); - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int = 0; - Eval(false == Gen.EqualNull(_int)); - - double _double = 0; - Eval(false == Gen.EqualNull(_double)); - - Guid _Guid = new Guid(); - Eval(false == Gen.EqualNull(_Guid)); - - string _string = "string"; - Eval(false == Gen.EqualNull(_string)); - Eval(true == Gen.EqualNull(null)); - - object _object = new object(); - Eval(false == Gen.EqualNull(_string)); - Eval(true == Gen.EqualNull(null)); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Locals/static_equalnull_struct01.cs b/src/coreclr/tests/src/JIT/Generics/Locals/static_equalnull_struct01.cs deleted file mode 100644 index 8505f763fd2d..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Locals/static_equalnull_struct01.cs +++ /dev/null @@ -1,82 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public struct Gen -{ - public static bool EqualNull(T t) - { - T Fld1 = t; - return ((object)Fld1 == null); - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int = 0; - Eval(false == Gen.EqualNull(_int)); - - double _double = 0; - Eval(false == Gen.EqualNull(_double)); - - Guid _Guid = new Guid(); - Eval(false == Gen.EqualNull(_Guid)); - - string _string = "string"; - Eval(false == Gen.EqualNull(_string)); - Eval(true == Gen.EqualNull(null)); - - object _object = new object(); - Eval(false == Gen.EqualNull(_string)); - Eval(true == Gen.EqualNull(null)); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Locals/static_passing_class01.cs b/src/coreclr/tests/src/JIT/Generics/Locals/static_passing_class01.cs deleted file mode 100644 index e8779cd9728b..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Locals/static_passing_class01.cs +++ /dev/null @@ -1,110 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public class Gen -{ - public static T PassAsIn(T t) - { - return t; - } - - public static T PassAsRef(ref T t, T Fld2) - { - T temp = t; - t = Fld2; - return temp; - } - - public static void PassAsOut(out T t, T Fld2) - { - t = Fld2; - } - public static void PassAsParameter(T t1, T t2) - { - T Fld1 = t1; - T Fld2 = t2; - - T temp = t1; - - Test.Eval(Fld1.Equals(PassAsIn(temp))); - Test.Eval(Fld1.Equals(PassAsRef(ref temp, Fld2))); - Test.Eval(Fld2.Equals(temp)); - temp = t1; - PassAsOut(out temp, Fld2); - Test.Eval(Fld2.Equals(temp)); - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int1 = 1; - int _int2 = -1; - Gen.PassAsParameter(_int1, _int2); - - double _double1 = 1; - double _double2 = -1; - Gen.PassAsParameter(_double1, _double2); - - string _string1 = "string1"; - string _string2 = "string2"; - Gen.PassAsParameter(_string1, _string2); - - object _object1 = (object)_string1; - object _object2 = (object)_string2; - Gen.PassAsParameter(_object1, _object2); - - Guid _Guid1 = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); - Guid _Guid2 = new Guid(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); - Gen.PassAsParameter(_Guid1, _Guid2); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Locals/static_passing_struct01.cs b/src/coreclr/tests/src/JIT/Generics/Locals/static_passing_struct01.cs deleted file mode 100644 index 4dc1f7ed74b9..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Locals/static_passing_struct01.cs +++ /dev/null @@ -1,110 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public struct Gen -{ - public static T PassAsIn(T t) - { - return t; - } - - public static T PassAsRef(ref T t, T Fld2) - { - T temp = t; - t = Fld2; - return temp; - } - - public static void PassAsOut(out T t, T Fld2) - { - t = Fld2; - } - public static void PassAsParameter(T t1, T t2) - { - T Fld1 = t1; - T Fld2 = t2; - - T temp = t1; - - Test.Eval(Fld1.Equals(PassAsIn(temp))); - Test.Eval(Fld1.Equals(PassAsRef(ref temp, Fld2))); - Test.Eval(Fld2.Equals(temp)); - temp = t1; - PassAsOut(out temp, Fld2); - Test.Eval(Fld2.Equals(temp)); - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int1 = 1; - int _int2 = -1; - Gen.PassAsParameter(_int1, _int2); - - double _double1 = 1; - double _double2 = -1; - Gen.PassAsParameter(_double1, _double2); - - string _string1 = "string1"; - string _string2 = "string2"; - Gen.PassAsParameter(_string1, _string2); - - object _object1 = (object)_string1; - object _object2 = (object)_string2; - Gen.PassAsParameter(_object1, _object2); - - Guid _Guid1 = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); - Guid _Guid2 = new Guid(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); - Gen.PassAsParameter(_Guid1, _Guid2); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Parameters/instance_assignment_class01.cs b/src/coreclr/tests/src/JIT/Generics/Parameters/instance_assignment_class01.cs deleted file mode 100644 index ff84fa18f576..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Parameters/instance_assignment_class01.cs +++ /dev/null @@ -1,109 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public class Gen -{ - public void AssignRef(T tin, ref T tref) - { - tref = tin; - } - - public void AssignOut(T tin, out T tout) - { - tout = tin; - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int1 = 1; - int _int2 = 2; - new Gen().AssignRef(_int1, ref _int2); - Eval(_int1.Equals(_int2)); - _int2 = 2; - new Gen().AssignOut(_int1, out _int2); - Eval(_int1.Equals(_int2)); - - double _double1 = 1; - double _double2 = 2; - new Gen().AssignRef(_double1, ref _double2); - Eval(_double1.Equals(_double2)); - _double2 = 2; - new Gen().AssignOut(_double1, out _double2); - Eval(_double1.Equals(_double2)); - - string _string1 = "string1"; - string _string2 = "string2"; - new Gen().AssignRef(_string1, ref _string2); - Eval(_string1.Equals(_string2)); - _string2 = "string2"; - new Gen().AssignOut(_string1, out _string2); - Eval(_string1.Equals(_string2)); - - object _object1 = (object)_int1; - object _object2 = (object)_string2; - new Gen().AssignRef(_object1, ref _object2); - Eval(_object1.Equals(_object2)); - _object2 = (object)_string2; - new Gen().AssignOut(_object1, out _object2); - Eval(_object1.Equals(_object2)); - - Guid _Guid1 = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); - Guid _Guid2 = new Guid(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12); - new Gen().AssignRef(_Guid1, ref _Guid2); - Eval(_Guid1.Equals(_Guid2)); - _Guid2 = new Guid(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12); - new Gen().AssignOut(_Guid1, out _Guid2); - Eval(_Guid1.Equals(_Guid2)); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Parameters/instance_assignment_struct01.cs b/src/coreclr/tests/src/JIT/Generics/Parameters/instance_assignment_struct01.cs deleted file mode 100644 index b3ed088d0251..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Parameters/instance_assignment_struct01.cs +++ /dev/null @@ -1,109 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public struct Gen -{ - public void AssignRef(T tin, ref T tref) - { - tref = tin; - } - - public void AssignOut(T tin, out T tout) - { - tout = tin; - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int1 = 1; - int _int2 = 2; - new Gen().AssignRef(_int1, ref _int2); - Eval(_int1.Equals(_int2)); - _int2 = 2; - new Gen().AssignOut(_int1, out _int2); - Eval(_int1.Equals(_int2)); - - double _double1 = 1; - double _double2 = 2; - new Gen().AssignRef(_double1, ref _double2); - Eval(_double1.Equals(_double2)); - _double2 = 2; - new Gen().AssignOut(_double1, out _double2); - Eval(_double1.Equals(_double2)); - - string _string1 = "string1"; - string _string2 = "string2"; - new Gen().AssignRef(_string1, ref _string2); - Eval(_string1.Equals(_string2)); - _string2 = "string2"; - new Gen().AssignOut(_string1, out _string2); - Eval(_string1.Equals(_string2)); - - object _object1 = (object)_int1; - object _object2 = (object)_string2; - new Gen().AssignRef(_object1, ref _object2); - Eval(_object1.Equals(_object2)); - _object2 = (object)_string2; - new Gen().AssignOut(_object1, out _object2); - Eval(_object1.Equals(_object2)); - - Guid _Guid1 = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); - Guid _Guid2 = new Guid(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12); - new Gen().AssignRef(_Guid1, ref _Guid2); - Eval(_Guid1.Equals(_Guid2)); - _Guid2 = new Guid(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12); - new Gen().AssignOut(_Guid1, out _Guid2); - Eval(_Guid1.Equals(_Guid2)); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Parameters/instance_equalnull_class01.cs b/src/coreclr/tests/src/JIT/Generics/Parameters/instance_equalnull_class01.cs deleted file mode 100644 index 71fc86b7d7ad..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Parameters/instance_equalnull_class01.cs +++ /dev/null @@ -1,81 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public class Gen -{ - public bool EqualNull(T t) - { - return ((object)t == null); - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int = 0; - Eval(false == new Gen().EqualNull(_int)); - - double _double = 0; - Eval(false == new Gen().EqualNull(_double)); - - Guid _Guid = new Guid(); - Eval(false == new Gen().EqualNull(_Guid)); - - string _string = "string"; - Eval(false == new Gen().EqualNull(_string)); - Eval(true == new Gen().EqualNull(null)); - - object _object = new object(); - Eval(false == new Gen().EqualNull(_string)); - Eval(true == new Gen().EqualNull(null)); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Parameters/instance_equalnull_struct01.cs b/src/coreclr/tests/src/JIT/Generics/Parameters/instance_equalnull_struct01.cs deleted file mode 100644 index 486406b9269a..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Parameters/instance_equalnull_struct01.cs +++ /dev/null @@ -1,81 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public struct Gen -{ - public bool EqualNull(T t) - { - return ((object)t == null); - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int = 0; - Eval(false == new Gen().EqualNull(_int)); - - double _double = 0; - Eval(false == new Gen().EqualNull(_double)); - - Guid _Guid = new Guid(); - Eval(false == new Gen().EqualNull(_Guid)); - - string _string = "string"; - Eval(false == new Gen().EqualNull(_string)); - Eval(true == new Gen().EqualNull(null)); - - object _object = new object(); - Eval(false == new Gen().EqualNull(_string)); - Eval(true == new Gen().EqualNull(null)); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Parameters/instance_passing_class01.cs b/src/coreclr/tests/src/JIT/Generics/Parameters/instance_passing_class01.cs deleted file mode 100644 index 7f59403d8d83..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Parameters/instance_passing_class01.cs +++ /dev/null @@ -1,107 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public class Gen -{ - public T PassAsIn(T t) - { - return t; - } - - public T PassAsRef(ref T t, T Fld2) - { - T temp = t; - t = Fld2; - return temp; - } - - public void PassAsOut(out T t, T Fld2) - { - t = Fld2; - } - public void PassAsParameter(T t1, T t2) - { - T temp = t1; - - Test.Eval(t1.Equals(PassAsIn(temp))); - Test.Eval(t1.Equals(PassAsRef(ref temp, t2))); - Test.Eval(t2.Equals(temp)); - temp = t1; - PassAsOut(out temp, t2); - Test.Eval(t2.Equals(temp)); - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int1 = 1; - int _int2 = -1; - new Gen().PassAsParameter(_int1, _int2); - - double _double1 = 1; - double _double2 = -1; - new Gen().PassAsParameter(_double1, _double2); - - string _string1 = "string1"; - string _string2 = "string2"; - new Gen().PassAsParameter(_string1, _string2); - - object _object1 = (object)_string1; - object _object2 = (object)_string2; - new Gen().PassAsParameter(_object1, _object2); - - Guid _Guid1 = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); - Guid _Guid2 = new Guid(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); - new Gen().PassAsParameter(_Guid1, _Guid2); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Parameters/instance_passing_struct01.cs b/src/coreclr/tests/src/JIT/Generics/Parameters/instance_passing_struct01.cs deleted file mode 100644 index 4c9ec69cf61d..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Parameters/instance_passing_struct01.cs +++ /dev/null @@ -1,107 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public struct Gen -{ - public T PassAsIn(T t) - { - return t; - } - - public T PassAsRef(ref T t, T Fld2) - { - T temp = t; - t = Fld2; - return temp; - } - - public void PassAsOut(out T t, T Fld2) - { - t = Fld2; - } - public void PassAsParameter(T t1, T t2) - { - T temp = t1; - - Test.Eval(t1.Equals(PassAsIn(temp))); - Test.Eval(t1.Equals(PassAsRef(ref temp, t2))); - Test.Eval(t2.Equals(temp)); - temp = t1; - PassAsOut(out temp, t2); - Test.Eval(t2.Equals(temp)); - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int1 = 1; - int _int2 = -1; - new Gen().PassAsParameter(_int1, _int2); - - double _double1 = 1; - double _double2 = -1; - new Gen().PassAsParameter(_double1, _double2); - - string _string1 = "string1"; - string _string2 = "string2"; - new Gen().PassAsParameter(_string1, _string2); - - object _object1 = (object)_string1; - object _object2 = (object)_string2; - new Gen().PassAsParameter(_object1, _object2); - - Guid _Guid1 = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); - Guid _Guid2 = new Guid(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); - new Gen().PassAsParameter(_Guid1, _Guid2); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Parameters/static_assignment_class01.cs b/src/coreclr/tests/src/JIT/Generics/Parameters/static_assignment_class01.cs deleted file mode 100644 index d58eb178bcaf..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Parameters/static_assignment_class01.cs +++ /dev/null @@ -1,109 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public class Gen -{ - public static void AssignRef(T tin, ref T tref) - { - tref = tin; - } - - public static void AssignOut(T tin, out T tout) - { - tout = tin; - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int1 = 1; - int _int2 = 2; - Gen.AssignRef(_int1, ref _int2); - Eval(_int1.Equals(_int2)); - _int2 = 2; - Gen.AssignOut(_int1, out _int2); - Eval(_int1.Equals(_int2)); - - double _double1 = 1; - double _double2 = 2; - Gen.AssignRef(_double1, ref _double2); - Eval(_double1.Equals(_double2)); - _double2 = 2; - Gen.AssignOut(_double1, out _double2); - Eval(_double1.Equals(_double2)); - - string _string1 = "string1"; - string _string2 = "string2"; - Gen.AssignRef(_string1, ref _string2); - Eval(_string1.Equals(_string2)); - _string2 = "string2"; - Gen.AssignOut(_string1, out _string2); - Eval(_string1.Equals(_string2)); - - object _object1 = (object)_int1; - object _object2 = (object)_string2; - Gen.AssignRef(_object1, ref _object2); - Eval(_object1.Equals(_object2)); - _object2 = (object)_string2; - Gen.AssignOut(_object1, out _object2); - Eval(_object1.Equals(_object2)); - - Guid _Guid1 = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); - Guid _Guid2 = new Guid(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12); - Gen.AssignRef(_Guid1, ref _Guid2); - Eval(_Guid1.Equals(_Guid2)); - _Guid2 = new Guid(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12); - Gen.AssignOut(_Guid1, out _Guid2); - Eval(_Guid1.Equals(_Guid2)); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Parameters/static_assignment_struct01.cs b/src/coreclr/tests/src/JIT/Generics/Parameters/static_assignment_struct01.cs deleted file mode 100644 index c420fb5c399b..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Parameters/static_assignment_struct01.cs +++ /dev/null @@ -1,109 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public struct Gen -{ - public static void AssignRef(T tin, ref T tref) - { - tref = tin; - } - - public static void AssignOut(T tin, out T tout) - { - tout = tin; - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int1 = 1; - int _int2 = 2; - Gen.AssignRef(_int1, ref _int2); - Eval(_int1.Equals(_int2)); - _int2 = 2; - Gen.AssignOut(_int1, out _int2); - Eval(_int1.Equals(_int2)); - - double _double1 = 1; - double _double2 = 2; - Gen.AssignRef(_double1, ref _double2); - Eval(_double1.Equals(_double2)); - _double2 = 2; - Gen.AssignOut(_double1, out _double2); - Eval(_double1.Equals(_double2)); - - string _string1 = "string1"; - string _string2 = "string2"; - Gen.AssignRef(_string1, ref _string2); - Eval(_string1.Equals(_string2)); - _string2 = "string2"; - Gen.AssignOut(_string1, out _string2); - Eval(_string1.Equals(_string2)); - - object _object1 = (object)_int1; - object _object2 = (object)_string2; - Gen.AssignRef(_object1, ref _object2); - Eval(_object1.Equals(_object2)); - _object2 = (object)_string2; - Gen.AssignOut(_object1, out _object2); - Eval(_object1.Equals(_object2)); - - Guid _Guid1 = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); - Guid _Guid2 = new Guid(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12); - Gen.AssignRef(_Guid1, ref _Guid2); - Eval(_Guid1.Equals(_Guid2)); - _Guid2 = new Guid(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12); - Gen.AssignOut(_Guid1, out _Guid2); - Eval(_Guid1.Equals(_Guid2)); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Parameters/static_equalnull_class01.cs b/src/coreclr/tests/src/JIT/Generics/Parameters/static_equalnull_class01.cs deleted file mode 100644 index fe6ed72ab224..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Parameters/static_equalnull_class01.cs +++ /dev/null @@ -1,81 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public class Gen -{ - public static bool EqualNull(T t) - { - return ((object)t == null); - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int = 0; - Eval(false == Gen.EqualNull(_int)); - - double _double = 0; - Eval(false == Gen.EqualNull(_double)); - - Guid _Guid = new Guid(); - Eval(false == Gen.EqualNull(_Guid)); - - string _string = "string"; - Eval(false == Gen.EqualNull(_string)); - Eval(true == Gen.EqualNull(null)); - - object _object = new object(); - Eval(false == Gen.EqualNull(_string)); - Eval(true == Gen.EqualNull(null)); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Parameters/static_equalnull_struct01.cs b/src/coreclr/tests/src/JIT/Generics/Parameters/static_equalnull_struct01.cs deleted file mode 100644 index e167bbb453bf..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Parameters/static_equalnull_struct01.cs +++ /dev/null @@ -1,81 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public struct Gen -{ - public static bool EqualNull(T t) - { - return ((object)t == null); - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int = 0; - Eval(false == Gen.EqualNull(_int)); - - double _double = 0; - Eval(false == Gen.EqualNull(_double)); - - Guid _Guid = new Guid(); - Eval(false == Gen.EqualNull(_Guid)); - - string _string = "string"; - Eval(false == Gen.EqualNull(_string)); - Eval(true == Gen.EqualNull(null)); - - object _object = new object(); - Eval(false == Gen.EqualNull(_string)); - Eval(true == Gen.EqualNull(null)); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Parameters/static_passing_class01.cs b/src/coreclr/tests/src/JIT/Generics/Parameters/static_passing_class01.cs deleted file mode 100644 index 06b4077de6fb..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Parameters/static_passing_class01.cs +++ /dev/null @@ -1,107 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public class Gen -{ - public static T PassAsIn(T t) - { - return t; - } - - public static T PassAsRef(ref T t, T Fld2) - { - T temp = t; - t = Fld2; - return temp; - } - - public static void PassAsOut(out T t, T Fld2) - { - t = Fld2; - } - public static void PassAsParameter(T t1, T t2) - { - T temp = t1; - - Test.Eval(t1.Equals(PassAsIn(temp))); - Test.Eval(t1.Equals(PassAsRef(ref temp, t2))); - Test.Eval(t2.Equals(temp)); - temp = t1; - PassAsOut(out temp, t2); - Test.Eval(t2.Equals(temp)); - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int1 = 1; - int _int2 = -1; - Gen.PassAsParameter(_int1, _int2); - - double _double1 = 1; - double _double2 = -1; - Gen.PassAsParameter(_double1, _double2); - - string _string1 = "string1"; - string _string2 = "string2"; - Gen.PassAsParameter(_string1, _string2); - - object _object1 = (object)_string1; - object _object2 = (object)_string2; - Gen.PassAsParameter(_object1, _object2); - - Guid _Guid1 = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); - Guid _Guid2 = new Guid(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); - Gen.PassAsParameter(_Guid1, _Guid2); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Parameters/static_passing_struct01.cs b/src/coreclr/tests/src/JIT/Generics/Parameters/static_passing_struct01.cs deleted file mode 100644 index 1c63890315c4..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Parameters/static_passing_struct01.cs +++ /dev/null @@ -1,107 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public struct Gen -{ - public static T PassAsIn(T t) - { - return t; - } - - public static T PassAsRef(ref T t, T Fld2) - { - T temp = t; - t = Fld2; - return temp; - } - - public static void PassAsOut(out T t, T Fld2) - { - t = Fld2; - } - public static void PassAsParameter(T t1, T t2) - { - T temp = t1; - - Test.Eval(t1.Equals(PassAsIn(temp))); - Test.Eval(t1.Equals(PassAsRef(ref temp, t2))); - Test.Eval(t2.Equals(temp)); - temp = t1; - PassAsOut(out temp, t2); - Test.Eval(t2.Equals(temp)); - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - int _int1 = 1; - int _int2 = -1; - Gen.PassAsParameter(_int1, _int2); - - double _double1 = 1; - double _double2 = -1; - Gen.PassAsParameter(_double1, _double2); - - string _string1 = "string1"; - string _string2 = "string2"; - Gen.PassAsParameter(_string1, _string2); - - object _object1 = (object)_string1; - object _object2 = (object)_string2; - Gen.PassAsParameter(_object1, _object2); - - Guid _Guid1 = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); - Guid _Guid2 = new Guid(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); - Gen.PassAsParameter(_Guid1, _Guid2); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Typeof/Struct02.cs b/src/coreclr/tests/src/JIT/Generics/Typeof/Struct02.cs deleted file mode 100644 index ecf2d950fb1e..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Typeof/Struct02.cs +++ /dev/null @@ -1,170 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public struct Gen -{ - public T Fld1; - public U Fld2; - - public Gen(T fld1, U fld2) - { - Fld1 = fld1; - Fld2 = fld2; - } - - public bool InstVerify(System.Type t1, System.Type t2) - { - bool result = true; - - if (!(typeof(T).Equals(t1))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(Gen)); - } - - if (!(typeof(U).Equals(t2))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld2 in: " + typeof(Gen)); - } - - return result; - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Eval((new Gen(new int(), new int())).InstVerify(typeof(int), typeof(int))); - Eval((new Gen(new int(), new double())).InstVerify(typeof(int), typeof(double))); - Eval((new Gen(new int(), "string")).InstVerify(typeof(int), typeof(string))); - Eval((new Gen(new int(), new object())).InstVerify(typeof(int), typeof(object))); - Eval((new Gen(new int(), new Guid())).InstVerify(typeof(int), typeof(Guid))); - Eval((new Gen>(new int(), new RefX1())).InstVerify(typeof(int), typeof(RefX1))); - Eval((new Gen>(new int(), new RefX1())).InstVerify(typeof(int), typeof(RefX1))); - Eval((new Gen>(new int(), new RefX1())).InstVerify(typeof(int), typeof(RefX1))); - Eval((new Gen>(new int(), new ValX1())).InstVerify(typeof(int), typeof(ValX1))); - Eval((new Gen>(new int(), new ValX1())).InstVerify(typeof(int), typeof(ValX1))); - Eval((new Gen>(new int(), new ValX1())).InstVerify(typeof(int), typeof(ValX1))); - - Eval((new Gen(new double(), new int())).InstVerify(typeof(double), typeof(int))); - Eval((new Gen(new double(), new double())).InstVerify(typeof(double), typeof(double))); - Eval((new Gen(new double(), "string")).InstVerify(typeof(double), typeof(string))); - Eval((new Gen(new double(), new object())).InstVerify(typeof(double), typeof(object))); - Eval((new Gen(new double(), new Guid())).InstVerify(typeof(double), typeof(Guid))); - Eval((new Gen>(new double(), new RefX1())).InstVerify(typeof(double), typeof(RefX1))); - Eval((new Gen>(new double(), new RefX1())).InstVerify(typeof(double), typeof(RefX1))); - Eval((new Gen>(new double(), new RefX1())).InstVerify(typeof(double), typeof(RefX1))); - Eval((new Gen>(new double(), new ValX1())).InstVerify(typeof(double), typeof(ValX1))); - Eval((new Gen>(new double(), new ValX1())).InstVerify(typeof(double), typeof(ValX1))); - Eval((new Gen>(new double(), new ValX1())).InstVerify(typeof(double), typeof(ValX1))); - - Eval((new Gen("string", new int())).InstVerify(typeof(string), typeof(int))); - Eval((new Gen("string", new double())).InstVerify(typeof(string), typeof(double))); - Eval((new Gen("string", "string")).InstVerify(typeof(string), typeof(string))); - Eval((new Gen("string", new object())).InstVerify(typeof(string), typeof(object))); - Eval((new Gen("string", new Guid())).InstVerify(typeof(string), typeof(Guid))); - Eval((new Gen>("string", new RefX1())).InstVerify(typeof(string), typeof(RefX1))); - Eval((new Gen>("string", new RefX1())).InstVerify(typeof(string), typeof(RefX1))); - Eval((new Gen>("string", new RefX1())).InstVerify(typeof(string), typeof(RefX1))); - Eval((new Gen>("string", new ValX1())).InstVerify(typeof(string), typeof(ValX1))); - Eval((new Gen>("string", new ValX1())).InstVerify(typeof(string), typeof(ValX1))); - Eval((new Gen>("string", new ValX1())).InstVerify(typeof(string), typeof(ValX1))); - - Eval((new Gen(new object(), new int())).InstVerify(typeof(object), typeof(int))); - Eval((new Gen(new object(), new double())).InstVerify(typeof(object), typeof(double))); - Eval((new Gen(new object(), "string")).InstVerify(typeof(object), typeof(string))); - Eval((new Gen(new object(), new object())).InstVerify(typeof(object), typeof(object))); - Eval((new Gen(new object(), new Guid())).InstVerify(typeof(object), typeof(Guid))); - Eval((new Gen>(new object(), new RefX1())).InstVerify(typeof(object), typeof(RefX1))); - Eval((new Gen>(new object(), new RefX1())).InstVerify(typeof(object), typeof(RefX1))); - Eval((new Gen>(new object(), new RefX1())).InstVerify(typeof(object), typeof(RefX1))); - Eval((new Gen>(new object(), new ValX1())).InstVerify(typeof(object), typeof(ValX1))); - Eval((new Gen>(new object(), new ValX1())).InstVerify(typeof(object), typeof(ValX1))); - Eval((new Gen>(new object(), new ValX1())).InstVerify(typeof(object), typeof(ValX1))); - - Eval((new Gen(new Guid(), new int())).InstVerify(typeof(Guid), typeof(int))); - Eval((new Gen(new Guid(), new double())).InstVerify(typeof(Guid), typeof(double))); - Eval((new Gen(new Guid(), "string")).InstVerify(typeof(Guid), typeof(string))); - Eval((new Gen(new Guid(), new object())).InstVerify(typeof(Guid), typeof(object))); - Eval((new Gen(new Guid(), new Guid())).InstVerify(typeof(Guid), typeof(Guid))); - Eval((new Gen>(new Guid(), new RefX1())).InstVerify(typeof(Guid), typeof(RefX1))); - Eval((new Gen>(new Guid(), new RefX1())).InstVerify(typeof(Guid), typeof(RefX1))); - Eval((new Gen>(new Guid(), new RefX1())).InstVerify(typeof(Guid), typeof(RefX1))); - Eval((new Gen>(new Guid(), new ValX1())).InstVerify(typeof(Guid), typeof(ValX1))); - Eval((new Gen>(new Guid(), new ValX1())).InstVerify(typeof(Guid), typeof(ValX1))); - Eval((new Gen>(new Guid(), new ValX1())).InstVerify(typeof(Guid), typeof(ValX1))); - - Eval((new Gen, int>(new RefX1(), new int())).InstVerify(typeof(RefX1), typeof(int))); - Eval((new Gen, double>(new RefX1(), new double())).InstVerify(typeof(RefX1), typeof(double))); - Eval((new Gen, string>(new RefX1(), "string")).InstVerify(typeof(RefX1), typeof(string))); - Eval((new Gen, object>(new RefX1(), new object())).InstVerify(typeof(RefX1), typeof(object))); - Eval((new Gen, Guid>(new RefX1(), new Guid())).InstVerify(typeof(RefX1), typeof(Guid))); - Eval((new Gen, RefX1>>(new RefX1(), new RefX1>())).InstVerify(typeof(RefX1), typeof(RefX1>))); - Eval((new Gen, RefX1>(new RefX1(), new RefX1())).InstVerify(typeof(RefX1), typeof(RefX1))); - Eval((new Gen, RefX1>>(new RefX1(), new RefX1>())).InstVerify(typeof(RefX1), typeof(RefX1>))); - Eval((new Gen, ValX1>>(new RefX1(), new ValX1>())).InstVerify(typeof(RefX1), typeof(ValX1>))); - Eval((new Gen, ValX1>(new RefX1(), new ValX1())).InstVerify(typeof(RefX1), typeof(ValX1))); - Eval((new Gen, ValX1[][, , ,][]>>(new RefX1(), new ValX1[][, , ,][]>())).InstVerify(typeof(RefX1), typeof(ValX1[][, , ,][]>))); - - Eval((new Gen, int>(new ValX1(), new int())).InstVerify(typeof(ValX1), typeof(int))); - Eval((new Gen, double>(new ValX1(), new double())).InstVerify(typeof(ValX1), typeof(double))); - Eval((new Gen, string>(new ValX1(), "string")).InstVerify(typeof(ValX1), typeof(string))); - Eval((new Gen, object>(new ValX1(), new object())).InstVerify(typeof(ValX1), typeof(object))); - Eval((new Gen, Guid>(new ValX1(), new Guid())).InstVerify(typeof(ValX1), typeof(Guid))); - Eval((new Gen, RefX1>>(new ValX1(), new RefX1>())).InstVerify(typeof(ValX1), typeof(RefX1>))); - Eval((new Gen, RefX1>(new ValX1(), new RefX1())).InstVerify(typeof(ValX1), typeof(RefX1))); - Eval((new Gen, RefX1[][, , ,][]>>(new ValX1(), new RefX1[][, , ,][]>())).InstVerify(typeof(ValX1), typeof(RefX1[][, , ,][]>))); - Eval((new Gen, ValX1>>(new ValX1(), new ValX1>())).InstVerify(typeof(ValX1), typeof(ValX1>))); - Eval((new Gen, ValX1>(new ValX1(), new ValX1())).InstVerify(typeof(ValX1), typeof(ValX1))); - Eval((new Gen, ValX1[][, , ,][]>>(new ValX1(), new ValX1[][, , ,][]>())).InstVerify(typeof(ValX1), typeof(ValX1[][, , ,][]>))); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Typeof/class01.cs b/src/coreclr/tests/src/JIT/Generics/Typeof/class01.cs deleted file mode 100644 index eb29dc64470a..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Typeof/class01.cs +++ /dev/null @@ -1,143 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public class Gen -{ - public T Fld1; - - public Gen(T fld1) - { - Fld1 = fld1; - } - - public bool InstVerify(System.Type t1) - { - bool result = true; - - if (!(typeof(T).Equals(t1))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(Gen)); - } - - return result; - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Eval((new Gen(new int())).InstVerify(typeof(int))); - Eval((new Gen(new double())).InstVerify(typeof(double))); - Eval((new Gen("string")).InstVerify(typeof(string))); - Eval((new Gen(new object())).InstVerify(typeof(object))); - Eval((new Gen(new Guid())).InstVerify(typeof(Guid))); - - Eval((new Gen(new int[1])).InstVerify(typeof(int[]))); - Eval((new Gen(new double[1, 1])).InstVerify(typeof(double[,]))); - Eval((new Gen(new string[1][][])).InstVerify(typeof(string[][][]))); - Eval((new Gen(new object[1, 1, 1, 1])).InstVerify(typeof(object[, , ,]))); - Eval((new Gen(new Guid[1][, , ,][])).InstVerify(typeof(Guid[][, , ,][]))); - - Eval((new Gen[]>(new RefX1[] { })).InstVerify(typeof(RefX1[]))); - Eval((new Gen[,]>(new RefX1[1, 1])).InstVerify(typeof(RefX1[,]))); - Eval((new Gen[][][]>(new RefX1[1][][])).InstVerify(typeof(RefX1[][][]))); - Eval((new Gen[, , ,]>(new RefX1[1, 1, 1, 1])).InstVerify(typeof(RefX1[, , ,]))); - Eval((new Gen[][, , ,][]>(new RefX1[1][, , ,][])).InstVerify(typeof(RefX1[][, , ,][]))); - - Eval((new Gen[]>(new RefX2[] { })).InstVerify(typeof(RefX2[]))); - Eval((new Gen[,]>(new RefX2[1, 1])).InstVerify(typeof(RefX2[,]))); - Eval((new Gen[][][]>(new RefX2[1][][])).InstVerify(typeof(RefX2[][][]))); - Eval((new Gen[, , ,]>(new RefX2[1, 1, 1, 1])).InstVerify(typeof(RefX2[, , ,]))); - Eval((new Gen[][, , ,][]>(new RefX2[1][, , ,][])).InstVerify(typeof(RefX2[][, , ,][]))); - - Eval((new Gen[]>(new ValX1[] { })).InstVerify(typeof(ValX1[]))); - Eval((new Gen[,]>(new ValX1[1, 1])).InstVerify(typeof(ValX1[,]))); - Eval((new Gen[][][]>(new ValX1[1][][])).InstVerify(typeof(ValX1[][][]))); - Eval((new Gen[, , ,]>(new ValX1[1, 1, 1, 1])).InstVerify(typeof(ValX1[, , ,]))); - Eval((new Gen[][, , ,][]>(new ValX1[1][, , ,][])).InstVerify(typeof(ValX1[][, , ,][]))); - - Eval((new Gen[]>(new ValX2[] { })).InstVerify(typeof(ValX2[]))); - Eval((new Gen[,]>(new ValX2[1, 1])).InstVerify(typeof(ValX2[,]))); - Eval((new Gen[][][]>(new ValX2[1][][])).InstVerify(typeof(ValX2[][][]))); - Eval((new Gen[, , ,]>(new ValX2[1, 1, 1, 1])).InstVerify(typeof(ValX2[, , ,]))); - - Eval((new Gen[][, , ,][]>(new ValX2[1][, , ,][])).InstVerify(typeof(ValX2[][, , ,][]))); - - Eval((new Gen>(new RefX1())).InstVerify(typeof(RefX1))); - Eval((new Gen>>(new RefX1>())).InstVerify(typeof(RefX1>))); - Eval((new Gen>(new RefX2())).InstVerify(typeof(RefX2))); - Eval((new Gen>(new RefX3())).InstVerify(typeof(RefX3))); - - Eval((new Gen>>(new RefX1>())).InstVerify(typeof(RefX1>))); - Eval((new Gen>>>(new RefX1>>())).InstVerify(typeof(RefX1>>))); - Eval((new Gen>>>>(new RefX1>>>())).InstVerify(typeof(RefX1>>>))); - - Eval((new Gen>>(new RefX1>())).InstVerify(typeof(RefX1>))); - Eval((new Gen, RefX3>>>, RefX2, RefX3>>>>>(new RefX2, RefX3>>>, RefX2, RefX3>>>>())).InstVerify(typeof(RefX2, RefX3>>>, RefX2, RefX3>>>>))); - Eval((new Gen, RefX2, RefX3>>(new RefX3, RefX2, RefX3>())).InstVerify(typeof(RefX3, RefX2, RefX3>))); - - Eval((new Gen>(new ValX1())).InstVerify(typeof(ValX1))); - Eval((new Gen>>(new ValX1>())).InstVerify(typeof(ValX1>))); - Eval((new Gen>(new ValX2())).InstVerify(typeof(ValX2))); - Eval((new Gen>(new ValX3())).InstVerify(typeof(ValX3))); - - Eval((new Gen>>(new ValX1>())).InstVerify(typeof(ValX1>))); - Eval((new Gen>>>(new ValX1>>())).InstVerify(typeof(ValX1>>))); - Eval((new Gen>>>>(new ValX1>>>())).InstVerify(typeof(ValX1>>>))); - - Eval((new Gen>>(new ValX1>())).InstVerify(typeof(ValX1>))); - Eval((new Gen, ValX3>>>, ValX2, ValX3>>>>>(new ValX2, ValX3>>>, ValX2, ValX3>>>>())).InstVerify(typeof(ValX2, ValX3>>>, ValX2, ValX3>>>>))); - Eval((new Gen, ValX2, ValX3>>(new ValX3, ValX2, ValX3>())).InstVerify(typeof(ValX3, ValX2, ValX3>))); - - - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Typeof/class02.cs b/src/coreclr/tests/src/JIT/Generics/Typeof/class02.cs deleted file mode 100644 index 50419efa2bd5..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Typeof/class02.cs +++ /dev/null @@ -1,170 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public class Gen -{ - public T Fld1; - public U Fld2; - - public Gen(T fld1, U fld2) - { - Fld1 = fld1; - Fld2 = fld2; - } - - public bool InstVerify(System.Type t1, System.Type t2) - { - bool result = true; - - if (!(typeof(T).Equals(t1))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(Gen)); - } - - if (!(typeof(U).Equals(t2))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld2 in: " + typeof(Gen)); - } - - return result; - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Eval((new Gen(new int(), new int())).InstVerify(typeof(int), typeof(int))); - Eval((new Gen(new int(), new double())).InstVerify(typeof(int), typeof(double))); - Eval((new Gen(new int(), "string")).InstVerify(typeof(int), typeof(string))); - Eval((new Gen(new int(), new object())).InstVerify(typeof(int), typeof(object))); - Eval((new Gen(new int(), new Guid())).InstVerify(typeof(int), typeof(Guid))); - Eval((new Gen>(new int(), new RefX1())).InstVerify(typeof(int), typeof(RefX1))); - Eval((new Gen>(new int(), new RefX1())).InstVerify(typeof(int), typeof(RefX1))); - Eval((new Gen>(new int(), new RefX1())).InstVerify(typeof(int), typeof(RefX1))); - Eval((new Gen>(new int(), new ValX1())).InstVerify(typeof(int), typeof(ValX1))); - Eval((new Gen>(new int(), new ValX1())).InstVerify(typeof(int), typeof(ValX1))); - Eval((new Gen>(new int(), new ValX1())).InstVerify(typeof(int), typeof(ValX1))); - - Eval((new Gen(new double(), new int())).InstVerify(typeof(double), typeof(int))); - Eval((new Gen(new double(), new double())).InstVerify(typeof(double), typeof(double))); - Eval((new Gen(new double(), "string")).InstVerify(typeof(double), typeof(string))); - Eval((new Gen(new double(), new object())).InstVerify(typeof(double), typeof(object))); - Eval((new Gen(new double(), new Guid())).InstVerify(typeof(double), typeof(Guid))); - Eval((new Gen>(new double(), new RefX1())).InstVerify(typeof(double), typeof(RefX1))); - Eval((new Gen>(new double(), new RefX1())).InstVerify(typeof(double), typeof(RefX1))); - Eval((new Gen>(new double(), new RefX1())).InstVerify(typeof(double), typeof(RefX1))); - Eval((new Gen>(new double(), new ValX1())).InstVerify(typeof(double), typeof(ValX1))); - Eval((new Gen>(new double(), new ValX1())).InstVerify(typeof(double), typeof(ValX1))); - Eval((new Gen>(new double(), new ValX1())).InstVerify(typeof(double), typeof(ValX1))); - - Eval((new Gen("string", new int())).InstVerify(typeof(string), typeof(int))); - Eval((new Gen("string", new double())).InstVerify(typeof(string), typeof(double))); - Eval((new Gen("string", "string")).InstVerify(typeof(string), typeof(string))); - Eval((new Gen("string", new object())).InstVerify(typeof(string), typeof(object))); - Eval((new Gen("string", new Guid())).InstVerify(typeof(string), typeof(Guid))); - Eval((new Gen>("string", new RefX1())).InstVerify(typeof(string), typeof(RefX1))); - Eval((new Gen>("string", new RefX1())).InstVerify(typeof(string), typeof(RefX1))); - Eval((new Gen>("string", new RefX1())).InstVerify(typeof(string), typeof(RefX1))); - Eval((new Gen>("string", new ValX1())).InstVerify(typeof(string), typeof(ValX1))); - Eval((new Gen>("string", new ValX1())).InstVerify(typeof(string), typeof(ValX1))); - Eval((new Gen>("string", new ValX1())).InstVerify(typeof(string), typeof(ValX1))); - - Eval((new Gen(new object(), new int())).InstVerify(typeof(object), typeof(int))); - Eval((new Gen(new object(), new double())).InstVerify(typeof(object), typeof(double))); - Eval((new Gen(new object(), "string")).InstVerify(typeof(object), typeof(string))); - Eval((new Gen(new object(), new object())).InstVerify(typeof(object), typeof(object))); - Eval((new Gen(new object(), new Guid())).InstVerify(typeof(object), typeof(Guid))); - Eval((new Gen>(new object(), new RefX1())).InstVerify(typeof(object), typeof(RefX1))); - Eval((new Gen>(new object(), new RefX1())).InstVerify(typeof(object), typeof(RefX1))); - Eval((new Gen>(new object(), new RefX1())).InstVerify(typeof(object), typeof(RefX1))); - Eval((new Gen>(new object(), new ValX1())).InstVerify(typeof(object), typeof(ValX1))); - Eval((new Gen>(new object(), new ValX1())).InstVerify(typeof(object), typeof(ValX1))); - Eval((new Gen>(new object(), new ValX1())).InstVerify(typeof(object), typeof(ValX1))); - - Eval((new Gen(new Guid(), new int())).InstVerify(typeof(Guid), typeof(int))); - Eval((new Gen(new Guid(), new double())).InstVerify(typeof(Guid), typeof(double))); - Eval((new Gen(new Guid(), "string")).InstVerify(typeof(Guid), typeof(string))); - Eval((new Gen(new Guid(), new object())).InstVerify(typeof(Guid), typeof(object))); - Eval((new Gen(new Guid(), new Guid())).InstVerify(typeof(Guid), typeof(Guid))); - Eval((new Gen>(new Guid(), new RefX1())).InstVerify(typeof(Guid), typeof(RefX1))); - Eval((new Gen>(new Guid(), new RefX1())).InstVerify(typeof(Guid), typeof(RefX1))); - Eval((new Gen>(new Guid(), new RefX1())).InstVerify(typeof(Guid), typeof(RefX1))); - Eval((new Gen>(new Guid(), new ValX1())).InstVerify(typeof(Guid), typeof(ValX1))); - Eval((new Gen>(new Guid(), new ValX1())).InstVerify(typeof(Guid), typeof(ValX1))); - Eval((new Gen>(new Guid(), new ValX1())).InstVerify(typeof(Guid), typeof(ValX1))); - - Eval((new Gen, int>(new RefX1(), new int())).InstVerify(typeof(RefX1), typeof(int))); - Eval((new Gen, double>(new RefX1(), new double())).InstVerify(typeof(RefX1), typeof(double))); - Eval((new Gen, string>(new RefX1(), "string")).InstVerify(typeof(RefX1), typeof(string))); - Eval((new Gen, object>(new RefX1(), new object())).InstVerify(typeof(RefX1), typeof(object))); - Eval((new Gen, Guid>(new RefX1(), new Guid())).InstVerify(typeof(RefX1), typeof(Guid))); - Eval((new Gen, RefX1>>(new RefX1(), new RefX1>())).InstVerify(typeof(RefX1), typeof(RefX1>))); - Eval((new Gen, RefX1>(new RefX1(), new RefX1())).InstVerify(typeof(RefX1), typeof(RefX1))); - Eval((new Gen, RefX1>>(new RefX1(), new RefX1>())).InstVerify(typeof(RefX1), typeof(RefX1>))); - Eval((new Gen, ValX1>>(new RefX1(), new ValX1>())).InstVerify(typeof(RefX1), typeof(ValX1>))); - Eval((new Gen, ValX1>(new RefX1(), new ValX1())).InstVerify(typeof(RefX1), typeof(ValX1))); - Eval((new Gen, ValX1[][, , ,][]>>(new RefX1(), new ValX1[][, , ,][]>())).InstVerify(typeof(RefX1), typeof(ValX1[][, , ,][]>))); - - Eval((new Gen, int>(new ValX1(), new int())).InstVerify(typeof(ValX1), typeof(int))); - Eval((new Gen, double>(new ValX1(), new double())).InstVerify(typeof(ValX1), typeof(double))); - Eval((new Gen, string>(new ValX1(), "string")).InstVerify(typeof(ValX1), typeof(string))); - Eval((new Gen, object>(new ValX1(), new object())).InstVerify(typeof(ValX1), typeof(object))); - Eval((new Gen, Guid>(new ValX1(), new Guid())).InstVerify(typeof(ValX1), typeof(Guid))); - Eval((new Gen, RefX1>>(new ValX1(), new RefX1>())).InstVerify(typeof(ValX1), typeof(RefX1>))); - Eval((new Gen, RefX1>(new ValX1(), new RefX1())).InstVerify(typeof(ValX1), typeof(RefX1))); - Eval((new Gen, RefX1[][, , ,][]>>(new ValX1(), new RefX1[][, , ,][]>())).InstVerify(typeof(ValX1), typeof(RefX1[][, , ,][]>))); - Eval((new Gen, ValX1>>(new ValX1(), new ValX1>())).InstVerify(typeof(ValX1), typeof(ValX1>))); - Eval((new Gen, ValX1>(new ValX1(), new ValX1())).InstVerify(typeof(ValX1), typeof(ValX1))); - Eval((new Gen, ValX1[][, , ,][]>>(new ValX1(), new ValX1[][, , ,][]>())).InstVerify(typeof(ValX1), typeof(ValX1[][, , ,][]>))); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Typeof/class03.cs b/src/coreclr/tests/src/JIT/Generics/Typeof/class03.cs deleted file mode 100644 index e177fce8d526..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Typeof/class03.cs +++ /dev/null @@ -1,100 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - -public class Gen -{ - public T Fld1; - public U Fld2; - public V Fld3; - - public Gen(T fld1, U fld2, V fld3) - { - Fld1 = fld1; - Fld2 = fld2; - Fld3 = fld3; - } - - public bool InstVerify(System.Type t1, System.Type t2, System.Type t3) - { - bool result = true; - - if (!(typeof(T).Equals(t1))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(Gen)); - } - - if (!(typeof(U).Equals(t2))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld2 in: " + typeof(Gen)); - } - - if (!(typeof(V).Equals(t3))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld3 in: " + typeof(Gen)); - } - - return result; - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Eval((new Gen(new int(), new double(), new Guid())).InstVerify(typeof(int), typeof(double), typeof(Guid))); - Eval((new Gen(new double(), new Guid(), "string")).InstVerify(typeof(double), typeof(Guid), typeof(string))); - Eval((new Gen(new Guid(), "string", new object())).InstVerify(typeof(Guid), typeof(string), typeof(object))); - Eval((new Gen("string", new object(), new int[1])).InstVerify(typeof(string), typeof(object), typeof(int[]))); - Eval((new Gen>>(new object(), new int[1], new RefX1>())).InstVerify(typeof(object), typeof(int[]), typeof(RefX1>))); - Eval((new Gen>, ValX1>>(new int[1], new RefX1>(), new ValX1>())).InstVerify(typeof(int[]), typeof(RefX1>), typeof(ValX1>))); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Typeof/struct01.cs b/src/coreclr/tests/src/JIT/Generics/Typeof/struct01.cs deleted file mode 100644 index ec5486633f4a..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Typeof/struct01.cs +++ /dev/null @@ -1,143 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - - -public struct Gen -{ - public T Fld1; - - public Gen(T fld1) - { - Fld1 = fld1; - } - - public bool InstVerify(System.Type t1) - { - bool result = true; - - if (!(typeof(T).Equals(t1))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(Gen)); - } - - return result; - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Eval((new Gen(new int())).InstVerify(typeof(int))); - Eval((new Gen(new double())).InstVerify(typeof(double))); - Eval((new Gen("string")).InstVerify(typeof(string))); - Eval((new Gen(new object())).InstVerify(typeof(object))); - Eval((new Gen(new Guid())).InstVerify(typeof(Guid))); - - Eval((new Gen(new int[1])).InstVerify(typeof(int[]))); - Eval((new Gen(new double[1, 1])).InstVerify(typeof(double[,]))); - Eval((new Gen(new string[1][][])).InstVerify(typeof(string[][][]))); - Eval((new Gen(new object[1, 1, 1, 1])).InstVerify(typeof(object[, , ,]))); - Eval((new Gen(new Guid[1][, , ,][])).InstVerify(typeof(Guid[][, , ,][]))); - - Eval((new Gen[]>(new RefX1[] { })).InstVerify(typeof(RefX1[]))); - Eval((new Gen[,]>(new RefX1[1, 1])).InstVerify(typeof(RefX1[,]))); - Eval((new Gen[][][]>(new RefX1[1][][])).InstVerify(typeof(RefX1[][][]))); - Eval((new Gen[, , ,]>(new RefX1[1, 1, 1, 1])).InstVerify(typeof(RefX1[, , ,]))); - Eval((new Gen[][, , ,][]>(new RefX1[1][, , ,][])).InstVerify(typeof(RefX1[][, , ,][]))); - - Eval((new Gen[]>(new RefX2[] { })).InstVerify(typeof(RefX2[]))); - Eval((new Gen[,]>(new RefX2[1, 1])).InstVerify(typeof(RefX2[,]))); - Eval((new Gen[][][]>(new RefX2[1][][])).InstVerify(typeof(RefX2[][][]))); - Eval((new Gen[, , ,]>(new RefX2[1, 1, 1, 1])).InstVerify(typeof(RefX2[, , ,]))); - Eval((new Gen[][, , ,][]>(new RefX2[1][, , ,][])).InstVerify(typeof(RefX2[][, , ,][]))); - - Eval((new Gen[]>(new ValX1[] { })).InstVerify(typeof(ValX1[]))); - Eval((new Gen[,]>(new ValX1[1, 1])).InstVerify(typeof(ValX1[,]))); - Eval((new Gen[][][]>(new ValX1[1][][])).InstVerify(typeof(ValX1[][][]))); - Eval((new Gen[, , ,]>(new ValX1[1, 1, 1, 1])).InstVerify(typeof(ValX1[, , ,]))); - Eval((new Gen[][, , ,][]>(new ValX1[1][, , ,][])).InstVerify(typeof(ValX1[][, , ,][]))); - - Eval((new Gen[]>(new ValX2[] { })).InstVerify(typeof(ValX2[]))); - Eval((new Gen[,]>(new ValX2[1, 1])).InstVerify(typeof(ValX2[,]))); - Eval((new Gen[][][]>(new ValX2[1][][])).InstVerify(typeof(ValX2[][][]))); - Eval((new Gen[, , ,]>(new ValX2[1, 1, 1, 1])).InstVerify(typeof(ValX2[, , ,]))); - - Eval((new Gen[][, , ,][]>(new ValX2[1][, , ,][])).InstVerify(typeof(ValX2[][, , ,][]))); - - Eval((new Gen>(new RefX1())).InstVerify(typeof(RefX1))); - Eval((new Gen>>(new RefX1>())).InstVerify(typeof(RefX1>))); - Eval((new Gen>(new RefX2())).InstVerify(typeof(RefX2))); - Eval((new Gen>(new RefX3())).InstVerify(typeof(RefX3))); - - Eval((new Gen>>(new RefX1>())).InstVerify(typeof(RefX1>))); - Eval((new Gen>>>(new RefX1>>())).InstVerify(typeof(RefX1>>))); - Eval((new Gen>>>>(new RefX1>>>())).InstVerify(typeof(RefX1>>>))); - - Eval((new Gen>>(new RefX1>())).InstVerify(typeof(RefX1>))); - Eval((new Gen, RefX3>>>, RefX2, RefX3>>>>>(new RefX2, RefX3>>>, RefX2, RefX3>>>>())).InstVerify(typeof(RefX2, RefX3>>>, RefX2, RefX3>>>>))); - Eval((new Gen, RefX2, RefX3>>(new RefX3, RefX2, RefX3>())).InstVerify(typeof(RefX3, RefX2, RefX3>))); - - Eval((new Gen>(new ValX1())).InstVerify(typeof(ValX1))); - Eval((new Gen>>(new ValX1>())).InstVerify(typeof(ValX1>))); - Eval((new Gen>(new ValX2())).InstVerify(typeof(ValX2))); - Eval((new Gen>(new ValX3())).InstVerify(typeof(ValX3))); - - Eval((new Gen>>(new ValX1>())).InstVerify(typeof(ValX1>))); - Eval((new Gen>>>(new ValX1>>())).InstVerify(typeof(ValX1>>))); - Eval((new Gen>>>>(new ValX1>>>())).InstVerify(typeof(ValX1>>>))); - - Eval((new Gen>>(new ValX1>())).InstVerify(typeof(ValX1>))); - Eval((new Gen, ValX3>>>, ValX2, ValX3>>>>>(new ValX2, ValX3>>>, ValX2, ValX3>>>>())).InstVerify(typeof(ValX2, ValX3>>>, ValX2, ValX3>>>>))); - Eval((new Gen, ValX2, ValX3>>(new ValX3, ValX2, ValX3>())).InstVerify(typeof(ValX3, ValX2, ValX3>))); - - - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Generics/Typeof/struct03.cs b/src/coreclr/tests/src/JIT/Generics/Typeof/struct03.cs deleted file mode 100644 index 1f3189df8ee2..000000000000 --- a/src/coreclr/tests/src/JIT/Generics/Typeof/struct03.cs +++ /dev/null @@ -1,100 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public struct ValX0 { } -public struct ValY0 { } -public struct ValX1 { } -public struct ValY1 { } -public struct ValX2 { } -public struct ValY2 { } -public struct ValX3 { } -public struct ValY3 { } -public class RefX0 { } -public class RefY0 { } -public class RefX1 { } -public class RefY1 { } -public class RefX2 { } -public class RefY2 { } -public class RefX3 { } -public class RefY3 { } - -public struct Gen -{ - public T Fld1; - public U Fld2; - public V Fld3; - - public Gen(T fld1, U fld2, V fld3) - { - Fld1 = fld1; - Fld2 = fld2; - Fld3 = fld3; - } - - public bool InstVerify(System.Type t1, System.Type t2, System.Type t3) - { - bool result = true; - - if (!(typeof(T).Equals(t1))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(Gen)); - } - - if (!(typeof(U).Equals(t2))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld2 in: " + typeof(Gen)); - } - - if (!(typeof(V).Equals(t3))) - { - result = false; - Console.WriteLine("Failed to verify type of Fld3 in: " + typeof(Gen)); - } - - return result; - } -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Eval((new Gen(new int(), new double(), new Guid())).InstVerify(typeof(int), typeof(double), typeof(Guid))); - Eval((new Gen(new double(), new Guid(), "string")).InstVerify(typeof(double), typeof(Guid), typeof(string))); - Eval((new Gen(new Guid(), "string", new object())).InstVerify(typeof(Guid), typeof(string), typeof(object))); - Eval((new Gen("string", new object(), new int[1])).InstVerify(typeof(string), typeof(object), typeof(int[]))); - Eval((new Gen>>(new object(), new int[1], new RefX1>())).InstVerify(typeof(object), typeof(int[]), typeof(RefX1>))); - Eval((new Gen>, ValX1>>(new int[1], new RefX1>(), new ValX1>())).InstVerify(typeof(int[]), typeof(RefX1>), typeof(ValX1>))); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } - -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/AddSaturateScalar.Vector64.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/AddSaturateScalar.Vector64.Byte.cs deleted file mode 100644 index fdc7c08a356a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/AddSaturateScalar.Vector64.Byte.cs +++ /dev/null @@ -1,537 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void AddSaturateScalar_Vector64_Byte() - { - var test = new SimpleBinaryOpTest__AddSaturateScalar_Vector64_Byte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddSaturateScalar_Vector64_Byte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector64 _fld1; - public Vector64 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddSaturateScalar_Vector64_Byte testClass) - { - var result = AdvSimd.Arm64.AddSaturateScalar(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddSaturateScalar_Vector64_Byte testClass) - { - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((Byte*)(pFld1)), - AdvSimd.LoadVector64((Byte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 8; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector64 _clsVar1; - private static Vector64 _clsVar2; - - private Vector64 _fld1; - private Vector64 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddSaturateScalar_Vector64_Byte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddSaturateScalar_Vector64_Byte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.Arm64.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.Arm64.AddSaturateScalar( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((Byte*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd.Arm64).GetMethod(nameof(AdvSimd.Arm64.AddSaturateScalar), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd.Arm64).GetMethod(nameof(AdvSimd.Arm64.AddSaturateScalar), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector64((Byte*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.Arm64.AddSaturateScalar( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector64* pClsVar1 = &_clsVar1) - fixed (Vector64* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((Byte*)(pClsVar1)), - AdvSimd.LoadVector64((Byte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.Arm64.AddSaturateScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector64((Byte*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector64((Byte*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.Arm64.AddSaturateScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddSaturateScalar_Vector64_Byte(); - var result = AdvSimd.Arm64.AddSaturateScalar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddSaturateScalar_Vector64_Byte(); - - fixed (Vector64* pFld1 = &test._fld1) - fixed (Vector64* pFld2 = &test._fld2) - { - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((Byte*)(pFld1)), - AdvSimd.LoadVector64((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.Arm64.AddSaturateScalar(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((Byte*)(pFld1)), - AdvSimd.LoadVector64((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.Arm64.AddSaturateScalar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((Byte*)(&test._fld1)), - AdvSimd.LoadVector64((Byte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector64 op1, Vector64 op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (Helpers.AddSaturate(left[0], right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd.Arm64)}.{nameof(AdvSimd.Arm64.AddSaturateScalar)}(Vector64, Vector64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/AddSaturateScalar.Vector64.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/AddSaturateScalar.Vector64.Int16.cs deleted file mode 100644 index 29edf93f04ef..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/AddSaturateScalar.Vector64.Int16.cs +++ /dev/null @@ -1,537 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void AddSaturateScalar_Vector64_Int16() - { - var test = new SimpleBinaryOpTest__AddSaturateScalar_Vector64_Int16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddSaturateScalar_Vector64_Int16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector64 _fld1; - public Vector64 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddSaturateScalar_Vector64_Int16 testClass) - { - var result = AdvSimd.Arm64.AddSaturateScalar(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddSaturateScalar_Vector64_Int16 testClass) - { - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((Int16*)(pFld1)), - AdvSimd.LoadVector64((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 8; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector64 _clsVar1; - private static Vector64 _clsVar2; - - private Vector64 _fld1; - private Vector64 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddSaturateScalar_Vector64_Int16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddSaturateScalar_Vector64_Int16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.Arm64.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.Arm64.AddSaturateScalar( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((Int16*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd.Arm64).GetMethod(nameof(AdvSimd.Arm64.AddSaturateScalar), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd.Arm64).GetMethod(nameof(AdvSimd.Arm64.AddSaturateScalar), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector64((Int16*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.Arm64.AddSaturateScalar( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector64* pClsVar1 = &_clsVar1) - fixed (Vector64* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((Int16*)(pClsVar1)), - AdvSimd.LoadVector64((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.Arm64.AddSaturateScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector64((Int16*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector64((Int16*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.Arm64.AddSaturateScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddSaturateScalar_Vector64_Int16(); - var result = AdvSimd.Arm64.AddSaturateScalar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddSaturateScalar_Vector64_Int16(); - - fixed (Vector64* pFld1 = &test._fld1) - fixed (Vector64* pFld2 = &test._fld2) - { - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((Int16*)(pFld1)), - AdvSimd.LoadVector64((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.Arm64.AddSaturateScalar(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((Int16*)(pFld1)), - AdvSimd.LoadVector64((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.Arm64.AddSaturateScalar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((Int16*)(&test._fld1)), - AdvSimd.LoadVector64((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector64 op1, Vector64 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (Helpers.AddSaturate(left[0], right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd.Arm64)}.{nameof(AdvSimd.Arm64.AddSaturateScalar)}(Vector64, Vector64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/AddSaturateScalar.Vector64.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/AddSaturateScalar.Vector64.Int32.cs deleted file mode 100644 index 0a4f5f43a8a5..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/AddSaturateScalar.Vector64.Int32.cs +++ /dev/null @@ -1,537 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void AddSaturateScalar_Vector64_Int32() - { - var test = new SimpleBinaryOpTest__AddSaturateScalar_Vector64_Int32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddSaturateScalar_Vector64_Int32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector64 _fld1; - public Vector64 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddSaturateScalar_Vector64_Int32 testClass) - { - var result = AdvSimd.Arm64.AddSaturateScalar(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddSaturateScalar_Vector64_Int32 testClass) - { - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((Int32*)(pFld1)), - AdvSimd.LoadVector64((Int32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 8; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector64 _clsVar1; - private static Vector64 _clsVar2; - - private Vector64 _fld1; - private Vector64 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddSaturateScalar_Vector64_Int32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddSaturateScalar_Vector64_Int32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.Arm64.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.Arm64.AddSaturateScalar( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((Int32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd.Arm64).GetMethod(nameof(AdvSimd.Arm64.AddSaturateScalar), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd.Arm64).GetMethod(nameof(AdvSimd.Arm64.AddSaturateScalar), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector64((Int32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.Arm64.AddSaturateScalar( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector64* pClsVar1 = &_clsVar1) - fixed (Vector64* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((Int32*)(pClsVar1)), - AdvSimd.LoadVector64((Int32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.Arm64.AddSaturateScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector64((Int32*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector64((Int32*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.Arm64.AddSaturateScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddSaturateScalar_Vector64_Int32(); - var result = AdvSimd.Arm64.AddSaturateScalar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddSaturateScalar_Vector64_Int32(); - - fixed (Vector64* pFld1 = &test._fld1) - fixed (Vector64* pFld2 = &test._fld2) - { - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((Int32*)(pFld1)), - AdvSimd.LoadVector64((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.Arm64.AddSaturateScalar(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((Int32*)(pFld1)), - AdvSimd.LoadVector64((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.Arm64.AddSaturateScalar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((Int32*)(&test._fld1)), - AdvSimd.LoadVector64((Int32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector64 op1, Vector64 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (Helpers.AddSaturate(left[0], right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd.Arm64)}.{nameof(AdvSimd.Arm64.AddSaturateScalar)}(Vector64, Vector64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/AddSaturateScalar.Vector64.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/AddSaturateScalar.Vector64.SByte.cs deleted file mode 100644 index e11e5911d631..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/AddSaturateScalar.Vector64.SByte.cs +++ /dev/null @@ -1,537 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void AddSaturateScalar_Vector64_SByte() - { - var test = new SimpleBinaryOpTest__AddSaturateScalar_Vector64_SByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddSaturateScalar_Vector64_SByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector64 _fld1; - public Vector64 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddSaturateScalar_Vector64_SByte testClass) - { - var result = AdvSimd.Arm64.AddSaturateScalar(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddSaturateScalar_Vector64_SByte testClass) - { - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((SByte*)(pFld1)), - AdvSimd.LoadVector64((SByte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 8; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector64 _clsVar1; - private static Vector64 _clsVar2; - - private Vector64 _fld1; - private Vector64 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddSaturateScalar_Vector64_SByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddSaturateScalar_Vector64_SByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.Arm64.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.Arm64.AddSaturateScalar( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((SByte*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd.Arm64).GetMethod(nameof(AdvSimd.Arm64.AddSaturateScalar), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd.Arm64).GetMethod(nameof(AdvSimd.Arm64.AddSaturateScalar), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector64((SByte*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.Arm64.AddSaturateScalar( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector64* pClsVar1 = &_clsVar1) - fixed (Vector64* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((SByte*)(pClsVar1)), - AdvSimd.LoadVector64((SByte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.Arm64.AddSaturateScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector64((SByte*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector64((SByte*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.Arm64.AddSaturateScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddSaturateScalar_Vector64_SByte(); - var result = AdvSimd.Arm64.AddSaturateScalar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddSaturateScalar_Vector64_SByte(); - - fixed (Vector64* pFld1 = &test._fld1) - fixed (Vector64* pFld2 = &test._fld2) - { - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((SByte*)(pFld1)), - AdvSimd.LoadVector64((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.Arm64.AddSaturateScalar(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((SByte*)(pFld1)), - AdvSimd.LoadVector64((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.Arm64.AddSaturateScalar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((SByte*)(&test._fld1)), - AdvSimd.LoadVector64((SByte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector64 op1, Vector64 op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (Helpers.AddSaturate(left[0], right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd.Arm64)}.{nameof(AdvSimd.Arm64.AddSaturateScalar)}(Vector64, Vector64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/AddSaturateScalar.Vector64.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/AddSaturateScalar.Vector64.UInt16.cs deleted file mode 100644 index 8dd609e0ee05..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/AddSaturateScalar.Vector64.UInt16.cs +++ /dev/null @@ -1,537 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void AddSaturateScalar_Vector64_UInt16() - { - var test = new SimpleBinaryOpTest__AddSaturateScalar_Vector64_UInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddSaturateScalar_Vector64_UInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector64 _fld1; - public Vector64 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddSaturateScalar_Vector64_UInt16 testClass) - { - var result = AdvSimd.Arm64.AddSaturateScalar(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddSaturateScalar_Vector64_UInt16 testClass) - { - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((UInt16*)(pFld1)), - AdvSimd.LoadVector64((UInt16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 8; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector64 _clsVar1; - private static Vector64 _clsVar2; - - private Vector64 _fld1; - private Vector64 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddSaturateScalar_Vector64_UInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddSaturateScalar_Vector64_UInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.Arm64.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.Arm64.AddSaturateScalar( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((UInt16*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd.Arm64).GetMethod(nameof(AdvSimd.Arm64.AddSaturateScalar), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd.Arm64).GetMethod(nameof(AdvSimd.Arm64.AddSaturateScalar), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector64((UInt16*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.Arm64.AddSaturateScalar( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector64* pClsVar1 = &_clsVar1) - fixed (Vector64* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((UInt16*)(pClsVar1)), - AdvSimd.LoadVector64((UInt16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.Arm64.AddSaturateScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector64((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector64((UInt16*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.Arm64.AddSaturateScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddSaturateScalar_Vector64_UInt16(); - var result = AdvSimd.Arm64.AddSaturateScalar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddSaturateScalar_Vector64_UInt16(); - - fixed (Vector64* pFld1 = &test._fld1) - fixed (Vector64* pFld2 = &test._fld2) - { - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((UInt16*)(pFld1)), - AdvSimd.LoadVector64((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.Arm64.AddSaturateScalar(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((UInt16*)(pFld1)), - AdvSimd.LoadVector64((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.Arm64.AddSaturateScalar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((UInt16*)(&test._fld1)), - AdvSimd.LoadVector64((UInt16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector64 op1, Vector64 op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (Helpers.AddSaturate(left[0], right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd.Arm64)}.{nameof(AdvSimd.Arm64.AddSaturateScalar)}(Vector64, Vector64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/AddSaturateScalar.Vector64.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/AddSaturateScalar.Vector64.UInt32.cs deleted file mode 100644 index 83a655104303..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/AddSaturateScalar.Vector64.UInt32.cs +++ /dev/null @@ -1,537 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void AddSaturateScalar_Vector64_UInt32() - { - var test = new SimpleBinaryOpTest__AddSaturateScalar_Vector64_UInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddSaturateScalar_Vector64_UInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector64 _fld1; - public Vector64 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddSaturateScalar_Vector64_UInt32 testClass) - { - var result = AdvSimd.Arm64.AddSaturateScalar(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddSaturateScalar_Vector64_UInt32 testClass) - { - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((UInt32*)(pFld1)), - AdvSimd.LoadVector64((UInt32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 8; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector64 _clsVar1; - private static Vector64 _clsVar2; - - private Vector64 _fld1; - private Vector64 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddSaturateScalar_Vector64_UInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddSaturateScalar_Vector64_UInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.Arm64.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.Arm64.AddSaturateScalar( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((UInt32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd.Arm64).GetMethod(nameof(AdvSimd.Arm64.AddSaturateScalar), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd.Arm64).GetMethod(nameof(AdvSimd.Arm64.AddSaturateScalar), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector64((UInt32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.Arm64.AddSaturateScalar( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector64* pClsVar1 = &_clsVar1) - fixed (Vector64* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((UInt32*)(pClsVar1)), - AdvSimd.LoadVector64((UInt32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.Arm64.AddSaturateScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector64((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector64((UInt32*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.Arm64.AddSaturateScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddSaturateScalar_Vector64_UInt32(); - var result = AdvSimd.Arm64.AddSaturateScalar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddSaturateScalar_Vector64_UInt32(); - - fixed (Vector64* pFld1 = &test._fld1) - fixed (Vector64* pFld2 = &test._fld2) - { - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((UInt32*)(pFld1)), - AdvSimd.LoadVector64((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.Arm64.AddSaturateScalar(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((UInt32*)(pFld1)), - AdvSimd.LoadVector64((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.Arm64.AddSaturateScalar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.Arm64.AddSaturateScalar( - AdvSimd.LoadVector64((UInt32*)(&test._fld1)), - AdvSimd.LoadVector64((UInt32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector64 op1, Vector64 op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (Helpers.AddSaturate(left[0], right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd.Arm64)}.{nameof(AdvSimd.Arm64.AddSaturateScalar)}(Vector64, Vector64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/AdvSimd.Arm64_Part0_r.csproj b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/AdvSimd.Arm64_Part0_r.csproj deleted file mode 100644 index cdfa9843824b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/AdvSimd.Arm64_Part0_r.csproj +++ /dev/null @@ -1,271 +0,0 @@ - - - Exe - true - - - Embedded - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/AdvSimd.Arm64_Part0_ro.csproj b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/AdvSimd.Arm64_Part0_ro.csproj deleted file mode 100644 index c036d11adf0c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/AdvSimd.Arm64_Part0_ro.csproj +++ /dev/null @@ -1,271 +0,0 @@ - - - Exe - true - - - Embedded - True - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/AdvSimd.Arm64_Part1_r.csproj b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/AdvSimd.Arm64_Part1_r.csproj deleted file mode 100644 index 2f403fb56c78..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/AdvSimd.Arm64_Part1_r.csproj +++ /dev/null @@ -1,183 +0,0 @@ - - - Exe - true - - - Embedded - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/AdvSimd.Arm64_Part1_ro.csproj b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/AdvSimd.Arm64_Part1_ro.csproj deleted file mode 100644 index 34a02020865e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/AdvSimd.Arm64_Part1_ro.csproj +++ /dev/null @@ -1,183 +0,0 @@ - - - Exe - true - - - Embedded - True - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/Program.AdvSimd.Arm64_Part0.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/Program.AdvSimd.Arm64_Part0.cs deleted file mode 100644 index e96aa425a27e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/Program.AdvSimd.Arm64_Part0.cs +++ /dev/null @@ -1,274 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - static Program() - { - TestList = new Dictionary() { - ["Abs.Vector128.Double"] = Abs_Vector128_Double, - ["Abs.Vector128.Int64"] = Abs_Vector128_Int64, - ["AbsScalar.Vector64.Int64"] = AbsScalar_Vector64_Int64, - ["AbsoluteCompareGreaterThan.Vector128.Double"] = AbsoluteCompareGreaterThan_Vector128_Double, - ["AbsoluteCompareGreaterThanScalar.Vector64.Double"] = AbsoluteCompareGreaterThanScalar_Vector64_Double, - ["AbsoluteCompareGreaterThanScalar.Vector64.Single"] = AbsoluteCompareGreaterThanScalar_Vector64_Single, - ["AbsoluteCompareGreaterThanOrEqual.Vector128.Double"] = AbsoluteCompareGreaterThanOrEqual_Vector128_Double, - ["AbsoluteCompareGreaterThanOrEqualScalar.Vector64.Double"] = AbsoluteCompareGreaterThanOrEqualScalar_Vector64_Double, - ["AbsoluteCompareGreaterThanOrEqualScalar.Vector64.Single"] = AbsoluteCompareGreaterThanOrEqualScalar_Vector64_Single, - ["AbsoluteCompareLessThan.Vector128.Double"] = AbsoluteCompareLessThan_Vector128_Double, - ["AbsoluteCompareLessThanScalar.Vector64.Double"] = AbsoluteCompareLessThanScalar_Vector64_Double, - ["AbsoluteCompareLessThanScalar.Vector64.Single"] = AbsoluteCompareLessThanScalar_Vector64_Single, - ["AbsoluteCompareLessThanOrEqual.Vector128.Double"] = AbsoluteCompareLessThanOrEqual_Vector128_Double, - ["AbsoluteCompareLessThanOrEqualScalar.Vector64.Double"] = AbsoluteCompareLessThanOrEqualScalar_Vector64_Double, - ["AbsoluteCompareLessThanOrEqualScalar.Vector64.Single"] = AbsoluteCompareLessThanOrEqualScalar_Vector64_Single, - ["AbsoluteDifference.Vector128.Double"] = AbsoluteDifference_Vector128_Double, - ["AbsoluteDifferenceScalar.Vector64.Double"] = AbsoluteDifferenceScalar_Vector64_Double, - ["AbsoluteDifferenceScalar.Vector64.Single"] = AbsoluteDifferenceScalar_Vector64_Single, - ["Add.Vector128.Double"] = Add_Vector128_Double, - ["AddAcross.Vector64.Byte"] = AddAcross_Vector64_Byte, - ["AddAcross.Vector64.Int16"] = AddAcross_Vector64_Int16, - ["AddAcross.Vector64.SByte"] = AddAcross_Vector64_SByte, - ["AddAcross.Vector64.UInt16"] = AddAcross_Vector64_UInt16, - ["AddAcross.Vector128.Byte"] = AddAcross_Vector128_Byte, - ["AddAcross.Vector128.Int16"] = AddAcross_Vector128_Int16, - ["AddAcross.Vector128.Int32"] = AddAcross_Vector128_Int32, - ["AddAcross.Vector128.SByte"] = AddAcross_Vector128_SByte, - ["AddAcross.Vector128.UInt16"] = AddAcross_Vector128_UInt16, - ["AddAcross.Vector128.UInt32"] = AddAcross_Vector128_UInt32, - ["AddPairwise.Vector128.Byte"] = AddPairwise_Vector128_Byte, - ["AddPairwise.Vector128.Double"] = AddPairwise_Vector128_Double, - ["AddPairwise.Vector128.Int16"] = AddPairwise_Vector128_Int16, - ["AddPairwise.Vector128.Int32"] = AddPairwise_Vector128_Int32, - ["AddPairwise.Vector128.Int64"] = AddPairwise_Vector128_Int64, - ["AddPairwise.Vector128.SByte"] = AddPairwise_Vector128_SByte, - ["AddPairwise.Vector128.Single"] = AddPairwise_Vector128_Single, - ["AddPairwise.Vector128.UInt16"] = AddPairwise_Vector128_UInt16, - ["AddPairwise.Vector128.UInt32"] = AddPairwise_Vector128_UInt32, - ["AddPairwise.Vector128.UInt64"] = AddPairwise_Vector128_UInt64, - ["AddPairwiseScalar.Vector64.Single"] = AddPairwiseScalar_Vector64_Single, - ["AddPairwiseScalar.Vector128.Double"] = AddPairwiseScalar_Vector128_Double, - ["AddPairwiseScalar.Vector128.Int64"] = AddPairwiseScalar_Vector128_Int64, - ["AddPairwiseScalar.Vector128.UInt64"] = AddPairwiseScalar_Vector128_UInt64, - ["AddSaturateScalar.Vector64.Byte"] = AddSaturateScalar_Vector64_Byte, - ["AddSaturateScalar.Vector64.Int16"] = AddSaturateScalar_Vector64_Int16, - ["AddSaturateScalar.Vector64.Int32"] = AddSaturateScalar_Vector64_Int32, - ["AddSaturateScalar.Vector64.SByte"] = AddSaturateScalar_Vector64_SByte, - ["AddSaturateScalar.Vector64.UInt16"] = AddSaturateScalar_Vector64_UInt16, - ["AddSaturateScalar.Vector64.UInt32"] = AddSaturateScalar_Vector64_UInt32, - ["CompareEqual.Vector128.Double"] = CompareEqual_Vector128_Double, - ["CompareEqual.Vector128.Int64"] = CompareEqual_Vector128_Int64, - ["CompareEqual.Vector128.UInt64"] = CompareEqual_Vector128_UInt64, - ["CompareEqualScalar.Vector64.Double"] = CompareEqualScalar_Vector64_Double, - ["CompareEqualScalar.Vector64.Int64"] = CompareEqualScalar_Vector64_Int64, - ["CompareEqualScalar.Vector64.Single"] = CompareEqualScalar_Vector64_Single, - ["CompareEqualScalar.Vector64.UInt64"] = CompareEqualScalar_Vector64_UInt64, - ["CompareGreaterThan.Vector128.Double"] = CompareGreaterThan_Vector128_Double, - ["CompareGreaterThan.Vector128.Int64"] = CompareGreaterThan_Vector128_Int64, - ["CompareGreaterThan.Vector128.UInt64"] = CompareGreaterThan_Vector128_UInt64, - ["CompareGreaterThanScalar.Vector64.Double"] = CompareGreaterThanScalar_Vector64_Double, - ["CompareGreaterThanScalar.Vector64.Int64"] = CompareGreaterThanScalar_Vector64_Int64, - ["CompareGreaterThanScalar.Vector64.Single"] = CompareGreaterThanScalar_Vector64_Single, - ["CompareGreaterThanScalar.Vector64.UInt64"] = CompareGreaterThanScalar_Vector64_UInt64, - ["CompareGreaterThanOrEqual.Vector128.Double"] = CompareGreaterThanOrEqual_Vector128_Double, - ["CompareGreaterThanOrEqual.Vector128.Int64"] = CompareGreaterThanOrEqual_Vector128_Int64, - ["CompareGreaterThanOrEqual.Vector128.UInt64"] = CompareGreaterThanOrEqual_Vector128_UInt64, - ["CompareGreaterThanOrEqualScalar.Vector64.Double"] = CompareGreaterThanOrEqualScalar_Vector64_Double, - ["CompareGreaterThanOrEqualScalar.Vector64.Int64"] = CompareGreaterThanOrEqualScalar_Vector64_Int64, - ["CompareGreaterThanOrEqualScalar.Vector64.Single"] = CompareGreaterThanOrEqualScalar_Vector64_Single, - ["CompareGreaterThanOrEqualScalar.Vector64.UInt64"] = CompareGreaterThanOrEqualScalar_Vector64_UInt64, - ["CompareLessThan.Vector128.Double"] = CompareLessThan_Vector128_Double, - ["CompareLessThan.Vector128.Int64"] = CompareLessThan_Vector128_Int64, - ["CompareLessThan.Vector128.UInt64"] = CompareLessThan_Vector128_UInt64, - ["CompareLessThanScalar.Vector64.Double"] = CompareLessThanScalar_Vector64_Double, - ["CompareLessThanScalar.Vector64.Int64"] = CompareLessThanScalar_Vector64_Int64, - ["CompareLessThanScalar.Vector64.Single"] = CompareLessThanScalar_Vector64_Single, - ["CompareLessThanScalar.Vector64.UInt64"] = CompareLessThanScalar_Vector64_UInt64, - ["CompareLessThanOrEqual.Vector128.Double"] = CompareLessThanOrEqual_Vector128_Double, - ["CompareLessThanOrEqual.Vector128.Int64"] = CompareLessThanOrEqual_Vector128_Int64, - ["CompareLessThanOrEqual.Vector128.UInt64"] = CompareLessThanOrEqual_Vector128_UInt64, - ["CompareLessThanOrEqualScalar.Vector64.Double"] = CompareLessThanOrEqualScalar_Vector64_Double, - ["CompareLessThanOrEqualScalar.Vector64.Int64"] = CompareLessThanOrEqualScalar_Vector64_Int64, - ["CompareLessThanOrEqualScalar.Vector64.Single"] = CompareLessThanOrEqualScalar_Vector64_Single, - ["CompareLessThanOrEqualScalar.Vector64.UInt64"] = CompareLessThanOrEqualScalar_Vector64_UInt64, - ["CompareTest.Vector128.Double"] = CompareTest_Vector128_Double, - ["CompareTest.Vector128.Int64"] = CompareTest_Vector128_Int64, - ["CompareTest.Vector128.UInt64"] = CompareTest_Vector128_UInt64, - ["CompareTestScalar.Vector64.Double"] = CompareTestScalar_Vector64_Double, - ["CompareTestScalar.Vector64.Int64"] = CompareTestScalar_Vector64_Int64, - ["CompareTestScalar.Vector64.UInt64"] = CompareTestScalar_Vector64_UInt64, - ["Divide.Vector64.Single"] = Divide_Vector64_Single, - ["Divide.Vector128.Double"] = Divide_Vector128_Double, - ["Divide.Vector128.Single"] = Divide_Vector128_Single, - ["DuplicateSelectedScalarToVector128.V128.Double.1"] = DuplicateSelectedScalarToVector128_V128_Double_1, - ["DuplicateSelectedScalarToVector128.V128.Int64.1"] = DuplicateSelectedScalarToVector128_V128_Int64_1, - ["DuplicateSelectedScalarToVector128.V128.UInt64.1"] = DuplicateSelectedScalarToVector128_V128_UInt64_1, - ["DuplicateToVector128.Double"] = DuplicateToVector128_Double, - ["DuplicateToVector128.Double.31"] = DuplicateToVector128_Double_31, - ["DuplicateToVector128.Int64"] = DuplicateToVector128_Int64, - ["DuplicateToVector128.Int64.31"] = DuplicateToVector128_Int64_31, - ["DuplicateToVector128.UInt64"] = DuplicateToVector128_UInt64, - ["DuplicateToVector128.UInt64.31"] = DuplicateToVector128_UInt64_31, - ["FusedMultiplyAdd.Vector128.Double"] = FusedMultiplyAdd_Vector128_Double, - ["FusedMultiplyAddByScalar.Vector64.Single"] = FusedMultiplyAddByScalar_Vector64_Single, - ["FusedMultiplyAddByScalar.Vector128.Double"] = FusedMultiplyAddByScalar_Vector128_Double, - ["FusedMultiplyAddByScalar.Vector128.Single"] = FusedMultiplyAddByScalar_Vector128_Single, - ["FusedMultiplyAddBySelectedScalar.Vector64.Single.Vector64.Single.1"] = FusedMultiplyAddBySelectedScalar_Vector64_Single_Vector64_Single_1, - ["FusedMultiplyAddBySelectedScalar.Vector64.Single.Vector128.Single.3"] = FusedMultiplyAddBySelectedScalar_Vector64_Single_Vector128_Single_3, - ["FusedMultiplyAddBySelectedScalar.Vector128.Double.Vector128.Double.1"] = FusedMultiplyAddBySelectedScalar_Vector128_Double_Vector128_Double_1, - ["FusedMultiplyAddBySelectedScalar.Vector128.Single.Vector64.Single.1"] = FusedMultiplyAddBySelectedScalar_Vector128_Single_Vector64_Single_1, - ["FusedMultiplyAddBySelectedScalar.Vector128.Single.Vector128.Single.3"] = FusedMultiplyAddBySelectedScalar_Vector128_Single_Vector128_Single_3, - ["FusedMultiplyAddScalarBySelectedScalar.Vector64.Double.Vector128.Double.1"] = FusedMultiplyAddScalarBySelectedScalar_Vector64_Double_Vector128_Double_1, - ["FusedMultiplyAddScalarBySelectedScalar.Vector64.Single.Vector64.Single.1"] = FusedMultiplyAddScalarBySelectedScalar_Vector64_Single_Vector64_Single_1, - ["FusedMultiplyAddScalarBySelectedScalar.Vector64.Single.Vector128.Single.3"] = FusedMultiplyAddScalarBySelectedScalar_Vector64_Single_Vector128_Single_3, - ["FusedMultiplySubtract.Vector128.Double"] = FusedMultiplySubtract_Vector128_Double, - ["FusedMultiplySubtractByScalar.Vector64.Single"] = FusedMultiplySubtractByScalar_Vector64_Single, - ["FusedMultiplySubtractByScalar.Vector128.Double"] = FusedMultiplySubtractByScalar_Vector128_Double, - ["FusedMultiplySubtractByScalar.Vector128.Single"] = FusedMultiplySubtractByScalar_Vector128_Single, - ["FusedMultiplySubtractBySelectedScalar.Vector64.Single.Vector64.Single.1"] = FusedMultiplySubtractBySelectedScalar_Vector64_Single_Vector64_Single_1, - ["FusedMultiplySubtractBySelectedScalar.Vector64.Single.Vector128.Single.3"] = FusedMultiplySubtractBySelectedScalar_Vector64_Single_Vector128_Single_3, - ["FusedMultiplySubtractBySelectedScalar.Vector128.Double.Vector128.Double.1"] = FusedMultiplySubtractBySelectedScalar_Vector128_Double_Vector128_Double_1, - ["FusedMultiplySubtractBySelectedScalar.Vector128.Single.Vector64.Single.1"] = FusedMultiplySubtractBySelectedScalar_Vector128_Single_Vector64_Single_1, - ["FusedMultiplySubtractBySelectedScalar.Vector128.Single.Vector128.Single.3"] = FusedMultiplySubtractBySelectedScalar_Vector128_Single_Vector128_Single_3, - ["FusedMultiplySubtractScalarBySelectedScalar.Vector64.Double.Vector128.Double.1"] = FusedMultiplySubtractScalarBySelectedScalar_Vector64_Double_Vector128_Double_1, - ["FusedMultiplySubtractScalarBySelectedScalar.Vector64.Single.Vector64.Single.1"] = FusedMultiplySubtractScalarBySelectedScalar_Vector64_Single_Vector64_Single_1, - ["FusedMultiplySubtractScalarBySelectedScalar.Vector64.Single.Vector128.Single.3"] = FusedMultiplySubtractScalarBySelectedScalar_Vector64_Single_Vector128_Single_3, - ["InsertSelectedScalar.Vector64.Byte.7.Vector64.Byte.7"] = InsertSelectedScalar_Vector64_Byte_7_Vector64_Byte_7, - ["InsertSelectedScalar.Vector64.Byte.7.Vector128.Byte.15"] = InsertSelectedScalar_Vector64_Byte_7_Vector128_Byte_15, - ["InsertSelectedScalar.Vector64.Int16.3.Vector64.Int16.3"] = InsertSelectedScalar_Vector64_Int16_3_Vector64_Int16_3, - ["InsertSelectedScalar.Vector64.Int16.3.Vector128.Int16.7"] = InsertSelectedScalar_Vector64_Int16_3_Vector128_Int16_7, - ["InsertSelectedScalar.Vector64.Int32.1.Vector64.Int32.1"] = InsertSelectedScalar_Vector64_Int32_1_Vector64_Int32_1, - ["InsertSelectedScalar.Vector64.Int32.1.Vector128.Int32.3"] = InsertSelectedScalar_Vector64_Int32_1_Vector128_Int32_3, - ["InsertSelectedScalar.Vector64.SByte.7.Vector64.SByte.7"] = InsertSelectedScalar_Vector64_SByte_7_Vector64_SByte_7, - ["InsertSelectedScalar.Vector64.SByte.7.Vector128.SByte.15"] = InsertSelectedScalar_Vector64_SByte_7_Vector128_SByte_15, - ["InsertSelectedScalar.Vector64.Single.1.Vector64.Single.1"] = InsertSelectedScalar_Vector64_Single_1_Vector64_Single_1, - ["InsertSelectedScalar.Vector64.Single.1.Vector128.Single.3"] = InsertSelectedScalar_Vector64_Single_1_Vector128_Single_3, - ["InsertSelectedScalar.Vector64.UInt16.3.Vector64.UInt16.3"] = InsertSelectedScalar_Vector64_UInt16_3_Vector64_UInt16_3, - ["InsertSelectedScalar.Vector64.UInt16.3.Vector128.UInt16.7"] = InsertSelectedScalar_Vector64_UInt16_3_Vector128_UInt16_7, - ["InsertSelectedScalar.Vector64.UInt32.1.Vector64.UInt32.1"] = InsertSelectedScalar_Vector64_UInt32_1_Vector64_UInt32_1, - ["InsertSelectedScalar.Vector64.UInt32.1.Vector128.UInt32.3"] = InsertSelectedScalar_Vector64_UInt32_1_Vector128_UInt32_3, - ["InsertSelectedScalar.Vector128.Byte.15.Vector64.Byte.7"] = InsertSelectedScalar_Vector128_Byte_15_Vector64_Byte_7, - ["InsertSelectedScalar.Vector128.Byte.15.Vector128.Byte.15"] = InsertSelectedScalar_Vector128_Byte_15_Vector128_Byte_15, - ["InsertSelectedScalar.Vector128.Double.1.Vector128.Double.1"] = InsertSelectedScalar_Vector128_Double_1_Vector128_Double_1, - ["InsertSelectedScalar.Vector128.Int16.7.Vector64.Int16.3"] = InsertSelectedScalar_Vector128_Int16_7_Vector64_Int16_3, - ["InsertSelectedScalar.Vector128.Int16.7.Vector128.Int16.7"] = InsertSelectedScalar_Vector128_Int16_7_Vector128_Int16_7, - ["InsertSelectedScalar.Vector128.Int32.3.Vector64.Int32.1"] = InsertSelectedScalar_Vector128_Int32_3_Vector64_Int32_1, - ["InsertSelectedScalar.Vector128.Int32.3.Vector128.Int32.3"] = InsertSelectedScalar_Vector128_Int32_3_Vector128_Int32_3, - ["InsertSelectedScalar.Vector128.Int64.1.Vector128.Int64.1"] = InsertSelectedScalar_Vector128_Int64_1_Vector128_Int64_1, - ["InsertSelectedScalar.Vector128.SByte.15.Vector64.SByte.7"] = InsertSelectedScalar_Vector128_SByte_15_Vector64_SByte_7, - ["InsertSelectedScalar.Vector128.SByte.15.Vector128.SByte.15"] = InsertSelectedScalar_Vector128_SByte_15_Vector128_SByte_15, - ["InsertSelectedScalar.Vector128.Single.3.Vector64.Single.1"] = InsertSelectedScalar_Vector128_Single_3_Vector64_Single_1, - ["InsertSelectedScalar.Vector128.Single.3.Vector128.Single.3"] = InsertSelectedScalar_Vector128_Single_3_Vector128_Single_3, - ["InsertSelectedScalar.Vector128.UInt16.7.Vector64.UInt16.3"] = InsertSelectedScalar_Vector128_UInt16_7_Vector64_UInt16_3, - ["InsertSelectedScalar.Vector128.UInt16.7.Vector128.UInt16.7"] = InsertSelectedScalar_Vector128_UInt16_7_Vector128_UInt16_7, - ["InsertSelectedScalar.Vector128.UInt32.3.Vector64.UInt32.1"] = InsertSelectedScalar_Vector128_UInt32_3_Vector64_UInt32_1, - ["InsertSelectedScalar.Vector128.UInt32.3.Vector128.UInt32.3"] = InsertSelectedScalar_Vector128_UInt32_3_Vector128_UInt32_3, - ["InsertSelectedScalar.Vector128.UInt64.1.Vector128.UInt64.1"] = InsertSelectedScalar_Vector128_UInt64_1_Vector128_UInt64_1, - ["LoadAndReplicateToVector128.Double"] = LoadAndReplicateToVector128_Double, - ["LoadAndReplicateToVector128.Int64"] = LoadAndReplicateToVector128_Int64, - ["LoadAndReplicateToVector128.UInt64"] = LoadAndReplicateToVector128_UInt64, - ["Max.Vector128.Double"] = Max_Vector128_Double, - ["MaxAcross.Vector64.Byte"] = MaxAcross_Vector64_Byte, - ["MaxAcross.Vector64.Int16"] = MaxAcross_Vector64_Int16, - ["MaxAcross.Vector64.SByte"] = MaxAcross_Vector64_SByte, - ["MaxAcross.Vector64.UInt16"] = MaxAcross_Vector64_UInt16, - ["MaxAcross.Vector128.Byte"] = MaxAcross_Vector128_Byte, - ["MaxAcross.Vector128.Int16"] = MaxAcross_Vector128_Int16, - ["MaxAcross.Vector128.Int32"] = MaxAcross_Vector128_Int32, - ["MaxAcross.Vector128.SByte"] = MaxAcross_Vector128_SByte, - ["MaxAcross.Vector128.Single"] = MaxAcross_Vector128_Single, - ["MaxAcross.Vector128.UInt16"] = MaxAcross_Vector128_UInt16, - ["MaxAcross.Vector128.UInt32"] = MaxAcross_Vector128_UInt32, - ["MaxNumber.Vector128.Double"] = MaxNumber_Vector128_Double, - ["MaxNumberAcross.Vector128.Single"] = MaxNumberAcross_Vector128_Single, - ["MaxNumberPairwise.Vector64.Single"] = MaxNumberPairwise_Vector64_Single, - ["MaxNumberPairwise.Vector128.Double"] = MaxNumberPairwise_Vector128_Double, - ["MaxNumberPairwise.Vector128.Single"] = MaxNumberPairwise_Vector128_Single, - ["MaxNumberPairwiseScalar.Vector64.Single"] = MaxNumberPairwiseScalar_Vector64_Single, - ["MaxNumberPairwiseScalar.Vector128.Double"] = MaxNumberPairwiseScalar_Vector128_Double, - ["MaxPairwise.Vector128.Byte"] = MaxPairwise_Vector128_Byte, - ["MaxPairwise.Vector128.Double"] = MaxPairwise_Vector128_Double, - ["MaxPairwise.Vector128.Int16"] = MaxPairwise_Vector128_Int16, - ["MaxPairwise.Vector128.Int32"] = MaxPairwise_Vector128_Int32, - ["MaxPairwise.Vector128.SByte"] = MaxPairwise_Vector128_SByte, - ["MaxPairwise.Vector128.Single"] = MaxPairwise_Vector128_Single, - ["MaxPairwise.Vector128.UInt16"] = MaxPairwise_Vector128_UInt16, - ["MaxPairwise.Vector128.UInt32"] = MaxPairwise_Vector128_UInt32, - ["MaxPairwiseScalar.Vector64.Single"] = MaxPairwiseScalar_Vector64_Single, - ["MaxPairwiseScalar.Vector128.Double"] = MaxPairwiseScalar_Vector128_Double, - ["MaxScalar.Vector64.Double"] = MaxScalar_Vector64_Double, - ["MaxScalar.Vector64.Single"] = MaxScalar_Vector64_Single, - ["Min.Vector128.Double"] = Min_Vector128_Double, - ["MinAcross.Vector64.Byte"] = MinAcross_Vector64_Byte, - ["MinAcross.Vector64.Int16"] = MinAcross_Vector64_Int16, - ["MinAcross.Vector64.SByte"] = MinAcross_Vector64_SByte, - ["MinAcross.Vector64.UInt16"] = MinAcross_Vector64_UInt16, - ["MinAcross.Vector128.Byte"] = MinAcross_Vector128_Byte, - ["MinAcross.Vector128.Int16"] = MinAcross_Vector128_Int16, - ["MinAcross.Vector128.Int32"] = MinAcross_Vector128_Int32, - ["MinAcross.Vector128.SByte"] = MinAcross_Vector128_SByte, - ["MinAcross.Vector128.Single"] = MinAcross_Vector128_Single, - ["MinAcross.Vector128.UInt16"] = MinAcross_Vector128_UInt16, - ["MinAcross.Vector128.UInt32"] = MinAcross_Vector128_UInt32, - ["MinNumber.Vector128.Double"] = MinNumber_Vector128_Double, - ["MinNumberAcross.Vector128.Single"] = MinNumberAcross_Vector128_Single, - ["MinNumberPairwise.Vector64.Single"] = MinNumberPairwise_Vector64_Single, - ["MinNumberPairwise.Vector128.Double"] = MinNumberPairwise_Vector128_Double, - ["MinNumberPairwise.Vector128.Single"] = MinNumberPairwise_Vector128_Single, - ["MinNumberPairwiseScalar.Vector64.Single"] = MinNumberPairwiseScalar_Vector64_Single, - ["MinNumberPairwiseScalar.Vector128.Double"] = MinNumberPairwiseScalar_Vector128_Double, - ["MinPairwise.Vector128.Byte"] = MinPairwise_Vector128_Byte, - ["MinPairwise.Vector128.Double"] = MinPairwise_Vector128_Double, - ["MinPairwise.Vector128.Int16"] = MinPairwise_Vector128_Int16, - ["MinPairwise.Vector128.Int32"] = MinPairwise_Vector128_Int32, - ["MinPairwise.Vector128.SByte"] = MinPairwise_Vector128_SByte, - ["MinPairwise.Vector128.Single"] = MinPairwise_Vector128_Single, - ["MinPairwise.Vector128.UInt16"] = MinPairwise_Vector128_UInt16, - ["MinPairwise.Vector128.UInt32"] = MinPairwise_Vector128_UInt32, - ["MinPairwiseScalar.Vector64.Single"] = MinPairwiseScalar_Vector64_Single, - ["MinPairwiseScalar.Vector128.Double"] = MinPairwiseScalar_Vector128_Double, - ["MinScalar.Vector64.Double"] = MinScalar_Vector64_Double, - ["MinScalar.Vector64.Single"] = MinScalar_Vector64_Single, - ["Multiply.Vector128.Double"] = Multiply_Vector128_Double, - ["MultiplyByScalar.Vector128.Double"] = MultiplyByScalar_Vector128_Double, - ["MultiplyBySelectedScalar.Vector128.Double.Vector128.Double.1"] = MultiplyBySelectedScalar_Vector128_Double_Vector128_Double_1, - ["MultiplyExtended.Vector64.Single"] = MultiplyExtended_Vector64_Single, - ["MultiplyExtended.Vector128.Double"] = MultiplyExtended_Vector128_Double, - ["MultiplyExtended.Vector128.Single"] = MultiplyExtended_Vector128_Single, - ["MultiplyExtendedByScalar.Vector128.Double"] = MultiplyExtendedByScalar_Vector128_Double, - ["MultiplyExtendedBySelectedScalar.Vector128.Double.Vector128.Double.1"] = MultiplyExtendedBySelectedScalar_Vector128_Double_Vector128_Double_1, - ["MultiplyExtendedScalar.Vector64.Double"] = MultiplyExtendedScalar_Vector64_Double, - ["MultiplyExtendedScalar.Vector64.Single"] = MultiplyExtendedScalar_Vector64_Single, - ["MultiplyExtendedScalarBySelectedScalar.Vector64.Double.Vector128.Double.1"] = MultiplyExtendedScalarBySelectedScalar_Vector64_Double_Vector128_Double_1, - ["MultiplyExtendedScalarBySelectedScalar.Vector64.Single.Vector64.Single.1"] = MultiplyExtendedScalarBySelectedScalar_Vector64_Single_Vector64_Single_1, - ["MultiplyExtendedScalarBySelectedScalar.Vector64.Single.Vector128.Single.3"] = MultiplyExtendedScalarBySelectedScalar_Vector64_Single_Vector128_Single_3, - ["MultiplyScalarBySelectedScalar.Vector64.Double.Vector128.Double.1"] = MultiplyScalarBySelectedScalar_Vector64_Double_Vector128_Double_1, - ["Negate.Vector128.Double"] = Negate_Vector128_Double, - ["Negate.Vector128.Int64"] = Negate_Vector128_Int64, - ["NegateScalar.Vector64.Int64"] = NegateScalar_Vector64_Int64, - ["ReciprocalEstimate.Vector128.Double"] = ReciprocalEstimate_Vector128_Double, - ["ReciprocalEstimateScalar.Vector64.Double"] = ReciprocalEstimateScalar_Vector64_Double, - ["ReciprocalEstimateScalar.Vector64.Single"] = ReciprocalEstimateScalar_Vector64_Single, - ["ReciprocalExponentScalar.Vector64.Double"] = ReciprocalExponentScalar_Vector64_Double, - ["ReciprocalExponentScalar.Vector64.Single"] = ReciprocalExponentScalar_Vector64_Single, - ["ReciprocalSquareRootEstimate.Vector128.Double"] = ReciprocalSquareRootEstimate_Vector128_Double, - ["ReciprocalSquareRootEstimateScalar.Vector64.Double"] = ReciprocalSquareRootEstimateScalar_Vector64_Double, - ["ReciprocalSquareRootEstimateScalar.Vector64.Single"] = ReciprocalSquareRootEstimateScalar_Vector64_Single, - ["ReciprocalSquareRootStep.Vector128.Double"] = ReciprocalSquareRootStep_Vector128_Double, - ["ReciprocalSquareRootStepScalar.Vector64.Double"] = ReciprocalSquareRootStepScalar_Vector64_Double, - ["ReciprocalSquareRootStepScalar.Vector64.Single"] = ReciprocalSquareRootStepScalar_Vector64_Single, - ["ReciprocalStep.Vector128.Double"] = ReciprocalStep_Vector128_Double, - ["ReciprocalStepScalar.Vector64.Double"] = ReciprocalStepScalar_Vector64_Double, - ["ReciprocalStepScalar.Vector64.Single"] = ReciprocalStepScalar_Vector64_Single, - ["ReverseElementBits.Vector128.Byte"] = ReverseElementBits_Vector128_Byte, - ["ReverseElementBits.Vector128.SByte"] = ReverseElementBits_Vector128_SByte, - ["ReverseElementBits.Vector64.Byte"] = ReverseElementBits_Vector64_Byte, - }; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/Program.AdvSimd.Arm64_Part1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/Program.AdvSimd.Arm64_Part1.cs deleted file mode 100644 index e5622496fa66..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd.Arm64/Program.AdvSimd.Arm64_Part1.cs +++ /dev/null @@ -1,186 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - static Program() - { - TestList = new Dictionary() { - ["ReverseElementBits.Vector64.SByte"] = ReverseElementBits_Vector64_SByte, - ["ShiftArithmeticRoundedSaturateScalar.Vector64.Int16"] = ShiftArithmeticRoundedSaturateScalar_Vector64_Int16, - ["ShiftArithmeticRoundedSaturateScalar.Vector64.Int32"] = ShiftArithmeticRoundedSaturateScalar_Vector64_Int32, - ["ShiftArithmeticRoundedSaturateScalar.Vector64.SByte"] = ShiftArithmeticRoundedSaturateScalar_Vector64_SByte, - ["ShiftArithmeticSaturateScalar.Vector64.Int16"] = ShiftArithmeticSaturateScalar_Vector64_Int16, - ["ShiftArithmeticSaturateScalar.Vector64.Int32"] = ShiftArithmeticSaturateScalar_Vector64_Int32, - ["ShiftArithmeticSaturateScalar.Vector64.SByte"] = ShiftArithmeticSaturateScalar_Vector64_SByte, - ["ShiftLeftLogicalSaturateScalar.Vector64.Byte.7"] = ShiftLeftLogicalSaturateScalar_Vector64_Byte_7, - ["ShiftLeftLogicalSaturateScalar.Vector64.Int16.15"] = ShiftLeftLogicalSaturateScalar_Vector64_Int16_15, - ["ShiftLeftLogicalSaturateScalar.Vector64.Int32.31"] = ShiftLeftLogicalSaturateScalar_Vector64_Int32_31, - ["ShiftLeftLogicalSaturateScalar.Vector64.SByte.1"] = ShiftLeftLogicalSaturateScalar_Vector64_SByte_1, - ["ShiftLeftLogicalSaturateScalar.Vector64.UInt16.1"] = ShiftLeftLogicalSaturateScalar_Vector64_UInt16_1, - ["ShiftLeftLogicalSaturateScalar.Vector64.UInt32.1"] = ShiftLeftLogicalSaturateScalar_Vector64_UInt32_1, - ["ShiftLeftLogicalSaturateUnsignedScalar.Vector64.Int16.5"] = ShiftLeftLogicalSaturateUnsignedScalar_Vector64_Int16_5, - ["ShiftLeftLogicalSaturateUnsignedScalar.Vector64.Int32.7"] = ShiftLeftLogicalSaturateUnsignedScalar_Vector64_Int32_7, - ["ShiftLeftLogicalSaturateUnsignedScalar.Vector64.SByte.3"] = ShiftLeftLogicalSaturateUnsignedScalar_Vector64_SByte_3, - ["ShiftLogicalRoundedSaturateScalar.Vector64.Byte"] = ShiftLogicalRoundedSaturateScalar_Vector64_Byte, - ["ShiftLogicalRoundedSaturateScalar.Vector64.Int16"] = ShiftLogicalRoundedSaturateScalar_Vector64_Int16, - ["ShiftLogicalRoundedSaturateScalar.Vector64.Int32"] = ShiftLogicalRoundedSaturateScalar_Vector64_Int32, - ["ShiftLogicalRoundedSaturateScalar.Vector64.SByte"] = ShiftLogicalRoundedSaturateScalar_Vector64_SByte, - ["ShiftLogicalRoundedSaturateScalar.Vector64.UInt16"] = ShiftLogicalRoundedSaturateScalar_Vector64_UInt16, - ["ShiftLogicalRoundedSaturateScalar.Vector64.UInt32"] = ShiftLogicalRoundedSaturateScalar_Vector64_UInt32, - ["ShiftLogicalSaturateScalar.Vector64.Byte"] = ShiftLogicalSaturateScalar_Vector64_Byte, - ["ShiftLogicalSaturateScalar.Vector64.Int16"] = ShiftLogicalSaturateScalar_Vector64_Int16, - ["ShiftLogicalSaturateScalar.Vector64.Int32"] = ShiftLogicalSaturateScalar_Vector64_Int32, - ["ShiftLogicalSaturateScalar.Vector64.SByte"] = ShiftLogicalSaturateScalar_Vector64_SByte, - ["ShiftLogicalSaturateScalar.Vector64.UInt16"] = ShiftLogicalSaturateScalar_Vector64_UInt16, - ["ShiftLogicalSaturateScalar.Vector64.UInt32"] = ShiftLogicalSaturateScalar_Vector64_UInt32, - ["ShiftRightArithmeticNarrowingSaturateScalar.Vector64.Int16.16"] = ShiftRightArithmeticNarrowingSaturateScalar_Vector64_Int16_16, - ["ShiftRightArithmeticNarrowingSaturateScalar.Vector64.Int32.32"] = ShiftRightArithmeticNarrowingSaturateScalar_Vector64_Int32_32, - ["ShiftRightArithmeticNarrowingSaturateScalar.Vector64.SByte.8"] = ShiftRightArithmeticNarrowingSaturateScalar_Vector64_SByte_8, - ["ShiftRightArithmeticNarrowingSaturateUnsignedScalar.Vector64.Byte.3"] = ShiftRightArithmeticNarrowingSaturateUnsignedScalar_Vector64_Byte_3, - ["ShiftRightArithmeticNarrowingSaturateUnsignedScalar.Vector64.UInt16.5"] = ShiftRightArithmeticNarrowingSaturateUnsignedScalar_Vector64_UInt16_5, - ["ShiftRightArithmeticNarrowingSaturateUnsignedScalar.Vector64.UInt32.7"] = ShiftRightArithmeticNarrowingSaturateUnsignedScalar_Vector64_UInt32_7, - ["ShiftRightArithmeticRoundedNarrowingSaturateScalar.Vector64.Int16.32"] = ShiftRightArithmeticRoundedNarrowingSaturateScalar_Vector64_Int16_32, - ["ShiftRightArithmeticRoundedNarrowingSaturateScalar.Vector64.Int32.64"] = ShiftRightArithmeticRoundedNarrowingSaturateScalar_Vector64_Int32_64, - ["ShiftRightArithmeticRoundedNarrowingSaturateScalar.Vector64.SByte.16"] = ShiftRightArithmeticRoundedNarrowingSaturateScalar_Vector64_SByte_16, - ["ShiftRightArithmeticRoundedNarrowingSaturateUnsignedScalar.Vector64.Byte.1"] = ShiftRightArithmeticRoundedNarrowingSaturateUnsignedScalar_Vector64_Byte_1, - ["ShiftRightArithmeticRoundedNarrowingSaturateUnsignedScalar.Vector64.UInt16.1"] = ShiftRightArithmeticRoundedNarrowingSaturateUnsignedScalar_Vector64_UInt16_1, - ["ShiftRightArithmeticRoundedNarrowingSaturateUnsignedScalar.Vector64.UInt32.1"] = ShiftRightArithmeticRoundedNarrowingSaturateUnsignedScalar_Vector64_UInt32_1, - ["ShiftRightLogicalNarrowingSaturateScalar.Vector64.Byte.5"] = ShiftRightLogicalNarrowingSaturateScalar_Vector64_Byte_5, - ["ShiftRightLogicalNarrowingSaturateScalar.Vector64.Int16.7"] = ShiftRightLogicalNarrowingSaturateScalar_Vector64_Int16_7, - ["ShiftRightLogicalNarrowingSaturateScalar.Vector64.Int32.11"] = ShiftRightLogicalNarrowingSaturateScalar_Vector64_Int32_11, - ["ShiftRightLogicalNarrowingSaturateScalar.Vector64.SByte.3"] = ShiftRightLogicalNarrowingSaturateScalar_Vector64_SByte_3, - ["ShiftRightLogicalNarrowingSaturateScalar.Vector64.UInt16.5"] = ShiftRightLogicalNarrowingSaturateScalar_Vector64_UInt16_5, - ["ShiftRightLogicalNarrowingSaturateScalar.Vector64.UInt32.7"] = ShiftRightLogicalNarrowingSaturateScalar_Vector64_UInt32_7, - ["ShiftRightLogicalRoundedNarrowingSaturateScalar.Vector64.Byte.1"] = ShiftRightLogicalRoundedNarrowingSaturateScalar_Vector64_Byte_1, - ["ShiftRightLogicalRoundedNarrowingSaturateScalar.Vector64.Int16.1"] = ShiftRightLogicalRoundedNarrowingSaturateScalar_Vector64_Int16_1, - ["ShiftRightLogicalRoundedNarrowingSaturateScalar.Vector64.Int32.1"] = ShiftRightLogicalRoundedNarrowingSaturateScalar_Vector64_Int32_1, - ["ShiftRightLogicalRoundedNarrowingSaturateScalar.Vector64.SByte.1"] = ShiftRightLogicalRoundedNarrowingSaturateScalar_Vector64_SByte_1, - ["ShiftRightLogicalRoundedNarrowingSaturateScalar.Vector64.UInt16.1"] = ShiftRightLogicalRoundedNarrowingSaturateScalar_Vector64_UInt16_1, - ["ShiftRightLogicalRoundedNarrowingSaturateScalar.Vector64.UInt32.1"] = ShiftRightLogicalRoundedNarrowingSaturateScalar_Vector64_UInt32_1, - ["Sqrt.Vector64.Single"] = Sqrt_Vector64_Single, - ["Sqrt.Vector128.Double"] = Sqrt_Vector128_Double, - ["Sqrt.Vector128.Single"] = Sqrt_Vector128_Single, - ["Subtract.Vector128.Double"] = Subtract_Vector128_Double, - ["SubtractSaturateScalar.Vector64.Byte"] = SubtractSaturateScalar_Vector64_Byte, - ["SubtractSaturateScalar.Vector64.Int16"] = SubtractSaturateScalar_Vector64_Int16, - ["SubtractSaturateScalar.Vector64.Int32"] = SubtractSaturateScalar_Vector64_Int32, - ["SubtractSaturateScalar.Vector64.SByte"] = SubtractSaturateScalar_Vector64_SByte, - ["SubtractSaturateScalar.Vector64.UInt16"] = SubtractSaturateScalar_Vector64_UInt16, - ["SubtractSaturateScalar.Vector64.UInt32"] = SubtractSaturateScalar_Vector64_UInt32, - ["TransposeEven.Vector64.Byte"] = TransposeEven_Vector64_Byte, - ["TransposeEven.Vector64.Int16"] = TransposeEven_Vector64_Int16, - ["TransposeEven.Vector64.Int32"] = TransposeEven_Vector64_Int32, - ["TransposeEven.Vector64.SByte"] = TransposeEven_Vector64_SByte, - ["TransposeEven.Vector64.Single"] = TransposeEven_Vector64_Single, - ["TransposeEven.Vector64.UInt16"] = TransposeEven_Vector64_UInt16, - ["TransposeEven.Vector64.UInt32"] = TransposeEven_Vector64_UInt32, - ["TransposeEven.Vector128.Byte"] = TransposeEven_Vector128_Byte, - ["TransposeEven.Vector128.Double"] = TransposeEven_Vector128_Double, - ["TransposeEven.Vector128.Int16"] = TransposeEven_Vector128_Int16, - ["TransposeEven.Vector128.Int32"] = TransposeEven_Vector128_Int32, - ["TransposeEven.Vector128.Int64"] = TransposeEven_Vector128_Int64, - ["TransposeEven.Vector128.SByte"] = TransposeEven_Vector128_SByte, - ["TransposeEven.Vector128.Single"] = TransposeEven_Vector128_Single, - ["TransposeEven.Vector128.UInt16"] = TransposeEven_Vector128_UInt16, - ["TransposeEven.Vector128.UInt32"] = TransposeEven_Vector128_UInt32, - ["TransposeEven.Vector128.UInt64"] = TransposeEven_Vector128_UInt64, - ["TransposeOdd.Vector64.Byte"] = TransposeOdd_Vector64_Byte, - ["TransposeOdd.Vector64.Int16"] = TransposeOdd_Vector64_Int16, - ["TransposeOdd.Vector64.Int32"] = TransposeOdd_Vector64_Int32, - ["TransposeOdd.Vector64.SByte"] = TransposeOdd_Vector64_SByte, - ["TransposeOdd.Vector64.Single"] = TransposeOdd_Vector64_Single, - ["TransposeOdd.Vector64.UInt16"] = TransposeOdd_Vector64_UInt16, - ["TransposeOdd.Vector64.UInt32"] = TransposeOdd_Vector64_UInt32, - ["TransposeOdd.Vector128.Byte"] = TransposeOdd_Vector128_Byte, - ["TransposeOdd.Vector128.Double"] = TransposeOdd_Vector128_Double, - ["TransposeOdd.Vector128.Int16"] = TransposeOdd_Vector128_Int16, - ["TransposeOdd.Vector128.Int32"] = TransposeOdd_Vector128_Int32, - ["TransposeOdd.Vector128.Int64"] = TransposeOdd_Vector128_Int64, - ["TransposeOdd.Vector128.SByte"] = TransposeOdd_Vector128_SByte, - ["TransposeOdd.Vector128.Single"] = TransposeOdd_Vector128_Single, - ["TransposeOdd.Vector128.UInt16"] = TransposeOdd_Vector128_UInt16, - ["TransposeOdd.Vector128.UInt32"] = TransposeOdd_Vector128_UInt32, - ["TransposeOdd.Vector128.UInt64"] = TransposeOdd_Vector128_UInt64, - ["VectorTableLookup.Vector128.Byte"] = VectorTableLookup_Vector128_Byte, - ["VectorTableLookup.Vector128.SByte"] = VectorTableLookup_Vector128_SByte, - ["VectorTableLookupExtension.Vector128.Byte"] = VectorTableLookupExtension_Vector128_Byte, - ["VectorTableLookupExtension.Vector128.SByte"] = VectorTableLookupExtension_Vector128_SByte, - ["UnzipEven.Vector64.Byte"] = UnzipEven_Vector64_Byte, - ["UnzipEven.Vector64.Int16"] = UnzipEven_Vector64_Int16, - ["UnzipEven.Vector64.Int32"] = UnzipEven_Vector64_Int32, - ["UnzipEven.Vector64.SByte"] = UnzipEven_Vector64_SByte, - ["UnzipEven.Vector64.Single"] = UnzipEven_Vector64_Single, - ["UnzipEven.Vector64.UInt16"] = UnzipEven_Vector64_UInt16, - ["UnzipEven.Vector64.UInt32"] = UnzipEven_Vector64_UInt32, - ["UnzipEven.Vector128.Byte"] = UnzipEven_Vector128_Byte, - ["UnzipEven.Vector128.Double"] = UnzipEven_Vector128_Double, - ["UnzipEven.Vector128.Int16"] = UnzipEven_Vector128_Int16, - ["UnzipEven.Vector128.Int32"] = UnzipEven_Vector128_Int32, - ["UnzipEven.Vector128.Int64"] = UnzipEven_Vector128_Int64, - ["UnzipEven.Vector128.SByte"] = UnzipEven_Vector128_SByte, - ["UnzipEven.Vector128.Single"] = UnzipEven_Vector128_Single, - ["UnzipEven.Vector128.UInt16"] = UnzipEven_Vector128_UInt16, - ["UnzipEven.Vector128.UInt32"] = UnzipEven_Vector128_UInt32, - ["UnzipEven.Vector128.UInt64"] = UnzipEven_Vector128_UInt64, - ["UnzipOdd.Vector64.Byte"] = UnzipOdd_Vector64_Byte, - ["UnzipOdd.Vector64.Int16"] = UnzipOdd_Vector64_Int16, - ["UnzipOdd.Vector64.Int32"] = UnzipOdd_Vector64_Int32, - ["UnzipOdd.Vector64.SByte"] = UnzipOdd_Vector64_SByte, - ["UnzipOdd.Vector64.Single"] = UnzipOdd_Vector64_Single, - ["UnzipOdd.Vector64.UInt16"] = UnzipOdd_Vector64_UInt16, - ["UnzipOdd.Vector64.UInt32"] = UnzipOdd_Vector64_UInt32, - ["UnzipOdd.Vector128.Byte"] = UnzipOdd_Vector128_Byte, - ["UnzipOdd.Vector128.Double"] = UnzipOdd_Vector128_Double, - ["UnzipOdd.Vector128.Int16"] = UnzipOdd_Vector128_Int16, - ["UnzipOdd.Vector128.Int32"] = UnzipOdd_Vector128_Int32, - ["UnzipOdd.Vector128.Int64"] = UnzipOdd_Vector128_Int64, - ["UnzipOdd.Vector128.SByte"] = UnzipOdd_Vector128_SByte, - ["UnzipOdd.Vector128.Single"] = UnzipOdd_Vector128_Single, - ["UnzipOdd.Vector128.UInt16"] = UnzipOdd_Vector128_UInt16, - ["UnzipOdd.Vector128.UInt32"] = UnzipOdd_Vector128_UInt32, - ["UnzipOdd.Vector128.UInt64"] = UnzipOdd_Vector128_UInt64, - ["ZipHigh.Vector64.Byte"] = ZipHigh_Vector64_Byte, - ["ZipHigh.Vector64.Int16"] = ZipHigh_Vector64_Int16, - ["ZipHigh.Vector64.Int32"] = ZipHigh_Vector64_Int32, - ["ZipHigh.Vector64.SByte"] = ZipHigh_Vector64_SByte, - ["ZipHigh.Vector64.Single"] = ZipHigh_Vector64_Single, - ["ZipHigh.Vector64.UInt16"] = ZipHigh_Vector64_UInt16, - ["ZipHigh.Vector64.UInt32"] = ZipHigh_Vector64_UInt32, - ["ZipHigh.Vector128.Byte"] = ZipHigh_Vector128_Byte, - ["ZipHigh.Vector128.Double"] = ZipHigh_Vector128_Double, - ["ZipHigh.Vector128.Int16"] = ZipHigh_Vector128_Int16, - ["ZipHigh.Vector128.Int32"] = ZipHigh_Vector128_Int32, - ["ZipHigh.Vector128.Int64"] = ZipHigh_Vector128_Int64, - ["ZipHigh.Vector128.SByte"] = ZipHigh_Vector128_SByte, - ["ZipHigh.Vector128.Single"] = ZipHigh_Vector128_Single, - ["ZipHigh.Vector128.UInt16"] = ZipHigh_Vector128_UInt16, - ["ZipHigh.Vector128.UInt32"] = ZipHigh_Vector128_UInt32, - ["ZipHigh.Vector128.UInt64"] = ZipHigh_Vector128_UInt64, - ["ZipLow.Vector64.Byte"] = ZipLow_Vector64_Byte, - ["ZipLow.Vector64.Int16"] = ZipLow_Vector64_Int16, - ["ZipLow.Vector64.Int32"] = ZipLow_Vector64_Int32, - ["ZipLow.Vector64.SByte"] = ZipLow_Vector64_SByte, - ["ZipLow.Vector64.Single"] = ZipLow_Vector64_Single, - ["ZipLow.Vector64.UInt16"] = ZipLow_Vector64_UInt16, - ["ZipLow.Vector64.UInt32"] = ZipLow_Vector64_UInt32, - ["ZipLow.Vector128.Byte"] = ZipLow_Vector128_Byte, - ["ZipLow.Vector128.Double"] = ZipLow_Vector128_Double, - ["ZipLow.Vector128.Int16"] = ZipLow_Vector128_Int16, - ["ZipLow.Vector128.Int32"] = ZipLow_Vector128_Int32, - ["ZipLow.Vector128.Int64"] = ZipLow_Vector128_Int64, - ["ZipLow.Vector128.SByte"] = ZipLow_Vector128_SByte, - ["ZipLow.Vector128.Single"] = ZipLow_Vector128_Single, - ["ZipLow.Vector128.UInt16"] = ZipLow_Vector128_UInt16, - ["ZipLow.Vector128.UInt32"] = ZipLow_Vector128_UInt32, - ["ZipLow.Vector128.UInt64"] = ZipLow_Vector128_UInt64, - }; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector128.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector128.Byte.cs deleted file mode 100644 index ad0224259578..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector128.Byte.cs +++ /dev/null @@ -1,530 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void AddSaturate_Vector128_Byte() - { - var test = new SimpleBinaryOpTest__AddSaturate_Vector128_Byte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddSaturate_Vector128_Byte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddSaturate_Vector128_Byte testClass) - { - var result = AdvSimd.AddSaturate(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddSaturate_Vector128_Byte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((Byte*)(pFld1)), - AdvSimd.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddSaturate_Vector128_Byte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddSaturate_Vector128_Byte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.AddSaturate( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturate), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturate), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.AddSaturate( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((Byte*)(pClsVar1)), - AdvSimd.LoadVector128((Byte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.AddSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.AddSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddSaturate_Vector128_Byte(); - var result = AdvSimd.AddSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddSaturate_Vector128_Byte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((Byte*)(pFld1)), - AdvSimd.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.AddSaturate(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((Byte*)(pFld1)), - AdvSimd.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.AddSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((Byte*)(&test._fld1)), - AdvSimd.LoadVector128((Byte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.AddSaturate(left[i], right[i]) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.AddSaturate)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector128.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector128.Int16.cs deleted file mode 100644 index ebf2a2fa545b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector128.Int16.cs +++ /dev/null @@ -1,530 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void AddSaturate_Vector128_Int16() - { - var test = new SimpleBinaryOpTest__AddSaturate_Vector128_Int16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddSaturate_Vector128_Int16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddSaturate_Vector128_Int16 testClass) - { - var result = AdvSimd.AddSaturate(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddSaturate_Vector128_Int16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((Int16*)(pFld1)), - AdvSimd.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddSaturate_Vector128_Int16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddSaturate_Vector128_Int16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.AddSaturate( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturate), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturate), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.AddSaturate( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((Int16*)(pClsVar1)), - AdvSimd.LoadVector128((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.AddSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.AddSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddSaturate_Vector128_Int16(); - var result = AdvSimd.AddSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddSaturate_Vector128_Int16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((Int16*)(pFld1)), - AdvSimd.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.AddSaturate(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((Int16*)(pFld1)), - AdvSimd.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.AddSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((Int16*)(&test._fld1)), - AdvSimd.LoadVector128((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.AddSaturate(left[i], right[i]) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.AddSaturate)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector128.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector128.Int32.cs deleted file mode 100644 index 965a3a862136..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector128.Int32.cs +++ /dev/null @@ -1,530 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void AddSaturate_Vector128_Int32() - { - var test = new SimpleBinaryOpTest__AddSaturate_Vector128_Int32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddSaturate_Vector128_Int32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddSaturate_Vector128_Int32 testClass) - { - var result = AdvSimd.AddSaturate(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddSaturate_Vector128_Int32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((Int32*)(pFld1)), - AdvSimd.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddSaturate_Vector128_Int32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddSaturate_Vector128_Int32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.AddSaturate( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturate), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturate), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.AddSaturate( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((Int32*)(pClsVar1)), - AdvSimd.LoadVector128((Int32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.AddSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.AddSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddSaturate_Vector128_Int32(); - var result = AdvSimd.AddSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddSaturate_Vector128_Int32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((Int32*)(pFld1)), - AdvSimd.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.AddSaturate(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((Int32*)(pFld1)), - AdvSimd.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.AddSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((Int32*)(&test._fld1)), - AdvSimd.LoadVector128((Int32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.AddSaturate(left[i], right[i]) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.AddSaturate)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector128.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector128.Int64.cs deleted file mode 100644 index 00bc234ca5da..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector128.Int64.cs +++ /dev/null @@ -1,530 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void AddSaturate_Vector128_Int64() - { - var test = new SimpleBinaryOpTest__AddSaturate_Vector128_Int64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddSaturate_Vector128_Int64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int64[] inArray1, Int64[] inArray2, Int64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddSaturate_Vector128_Int64 testClass) - { - var result = AdvSimd.AddSaturate(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddSaturate_Vector128_Int64 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((Int64*)(pFld1)), - AdvSimd.LoadVector128((Int64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddSaturate_Vector128_Int64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddSaturate_Vector128_Int64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.AddSaturate( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturate), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturate), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.AddSaturate( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((Int64*)(pClsVar1)), - AdvSimd.LoadVector128((Int64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.AddSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((Int64*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.AddSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddSaturate_Vector128_Int64(); - var result = AdvSimd.AddSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddSaturate_Vector128_Int64(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((Int64*)(pFld1)), - AdvSimd.LoadVector128((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.AddSaturate(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((Int64*)(pFld1)), - AdvSimd.LoadVector128((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.AddSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((Int64*)(&test._fld1)), - AdvSimd.LoadVector128((Int64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.AddSaturate(left[i], right[i]) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.AddSaturate)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector128.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector128.SByte.cs deleted file mode 100644 index d46682cd2378..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector128.SByte.cs +++ /dev/null @@ -1,530 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void AddSaturate_Vector128_SByte() - { - var test = new SimpleBinaryOpTest__AddSaturate_Vector128_SByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddSaturate_Vector128_SByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddSaturate_Vector128_SByte testClass) - { - var result = AdvSimd.AddSaturate(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddSaturate_Vector128_SByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((SByte*)(pFld1)), - AdvSimd.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddSaturate_Vector128_SByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddSaturate_Vector128_SByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.AddSaturate( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturate), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturate), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.AddSaturate( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((SByte*)(pClsVar1)), - AdvSimd.LoadVector128((SByte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.AddSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.AddSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddSaturate_Vector128_SByte(); - var result = AdvSimd.AddSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddSaturate_Vector128_SByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((SByte*)(pFld1)), - AdvSimd.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.AddSaturate(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((SByte*)(pFld1)), - AdvSimd.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.AddSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((SByte*)(&test._fld1)), - AdvSimd.LoadVector128((SByte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.AddSaturate(left[i], right[i]) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.AddSaturate)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector128.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector128.UInt16.cs deleted file mode 100644 index 52a934e9cabc..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector128.UInt16.cs +++ /dev/null @@ -1,530 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void AddSaturate_Vector128_UInt16() - { - var test = new SimpleBinaryOpTest__AddSaturate_Vector128_UInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddSaturate_Vector128_UInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddSaturate_Vector128_UInt16 testClass) - { - var result = AdvSimd.AddSaturate(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddSaturate_Vector128_UInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((UInt16*)(pFld1)), - AdvSimd.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddSaturate_Vector128_UInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddSaturate_Vector128_UInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.AddSaturate( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturate), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturate), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.AddSaturate( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((UInt16*)(pClsVar1)), - AdvSimd.LoadVector128((UInt16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.AddSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.AddSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddSaturate_Vector128_UInt16(); - var result = AdvSimd.AddSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddSaturate_Vector128_UInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((UInt16*)(pFld1)), - AdvSimd.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.AddSaturate(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((UInt16*)(pFld1)), - AdvSimd.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.AddSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((UInt16*)(&test._fld1)), - AdvSimd.LoadVector128((UInt16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.AddSaturate(left[i], right[i]) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.AddSaturate)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector128.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector128.UInt32.cs deleted file mode 100644 index ea14479308f8..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector128.UInt32.cs +++ /dev/null @@ -1,530 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void AddSaturate_Vector128_UInt32() - { - var test = new SimpleBinaryOpTest__AddSaturate_Vector128_UInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddSaturate_Vector128_UInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddSaturate_Vector128_UInt32 testClass) - { - var result = AdvSimd.AddSaturate(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddSaturate_Vector128_UInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((UInt32*)(pFld1)), - AdvSimd.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddSaturate_Vector128_UInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddSaturate_Vector128_UInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.AddSaturate( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturate), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturate), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.AddSaturate( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((UInt32*)(pClsVar1)), - AdvSimd.LoadVector128((UInt32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.AddSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.AddSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddSaturate_Vector128_UInt32(); - var result = AdvSimd.AddSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddSaturate_Vector128_UInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((UInt32*)(pFld1)), - AdvSimd.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.AddSaturate(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((UInt32*)(pFld1)), - AdvSimd.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.AddSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((UInt32*)(&test._fld1)), - AdvSimd.LoadVector128((UInt32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.AddSaturate(left[i], right[i]) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.AddSaturate)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector128.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector128.UInt64.cs deleted file mode 100644 index d4a60ae1edb9..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector128.UInt64.cs +++ /dev/null @@ -1,530 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void AddSaturate_Vector128_UInt64() - { - var test = new SimpleBinaryOpTest__AddSaturate_Vector128_UInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddSaturate_Vector128_UInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt64[] inArray1, UInt64[] inArray2, UInt64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddSaturate_Vector128_UInt64 testClass) - { - var result = AdvSimd.AddSaturate(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddSaturate_Vector128_UInt64 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((UInt64*)(pFld1)), - AdvSimd.LoadVector128((UInt64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddSaturate_Vector128_UInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddSaturate_Vector128_UInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.AddSaturate( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturate), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturate), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.AddSaturate( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((UInt64*)(pClsVar1)), - AdvSimd.LoadVector128((UInt64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.AddSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.AddSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddSaturate_Vector128_UInt64(); - var result = AdvSimd.AddSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddSaturate_Vector128_UInt64(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((UInt64*)(pFld1)), - AdvSimd.LoadVector128((UInt64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.AddSaturate(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((UInt64*)(pFld1)), - AdvSimd.LoadVector128((UInt64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.AddSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector128((UInt64*)(&test._fld1)), - AdvSimd.LoadVector128((UInt64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt64[] left, UInt64[] right, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.AddSaturate(left[i], right[i]) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.AddSaturate)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector64.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector64.Byte.cs deleted file mode 100644 index a46cb529fa69..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector64.Byte.cs +++ /dev/null @@ -1,530 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void AddSaturate_Vector64_Byte() - { - var test = new SimpleBinaryOpTest__AddSaturate_Vector64_Byte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddSaturate_Vector64_Byte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector64 _fld1; - public Vector64 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddSaturate_Vector64_Byte testClass) - { - var result = AdvSimd.AddSaturate(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddSaturate_Vector64_Byte testClass) - { - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((Byte*)(pFld1)), - AdvSimd.LoadVector64((Byte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 8; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector64 _clsVar1; - private static Vector64 _clsVar2; - - private Vector64 _fld1; - private Vector64 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddSaturate_Vector64_Byte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddSaturate_Vector64_Byte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.AddSaturate( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((Byte*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturate), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturate), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector64((Byte*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.AddSaturate( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector64* pClsVar1 = &_clsVar1) - fixed (Vector64* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((Byte*)(pClsVar1)), - AdvSimd.LoadVector64((Byte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.AddSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector64((Byte*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector64((Byte*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.AddSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddSaturate_Vector64_Byte(); - var result = AdvSimd.AddSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddSaturate_Vector64_Byte(); - - fixed (Vector64* pFld1 = &test._fld1) - fixed (Vector64* pFld2 = &test._fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((Byte*)(pFld1)), - AdvSimd.LoadVector64((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.AddSaturate(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((Byte*)(pFld1)), - AdvSimd.LoadVector64((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.AddSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((Byte*)(&test._fld1)), - AdvSimd.LoadVector64((Byte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector64 op1, Vector64 op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.AddSaturate(left[i], right[i]) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.AddSaturate)}(Vector64, Vector64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector64.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector64.Int16.cs deleted file mode 100644 index fc1e0e1f8898..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector64.Int16.cs +++ /dev/null @@ -1,530 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void AddSaturate_Vector64_Int16() - { - var test = new SimpleBinaryOpTest__AddSaturate_Vector64_Int16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddSaturate_Vector64_Int16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector64 _fld1; - public Vector64 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddSaturate_Vector64_Int16 testClass) - { - var result = AdvSimd.AddSaturate(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddSaturate_Vector64_Int16 testClass) - { - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((Int16*)(pFld1)), - AdvSimd.LoadVector64((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 8; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector64 _clsVar1; - private static Vector64 _clsVar2; - - private Vector64 _fld1; - private Vector64 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddSaturate_Vector64_Int16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddSaturate_Vector64_Int16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.AddSaturate( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((Int16*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturate), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturate), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector64((Int16*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.AddSaturate( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector64* pClsVar1 = &_clsVar1) - fixed (Vector64* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((Int16*)(pClsVar1)), - AdvSimd.LoadVector64((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.AddSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector64((Int16*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector64((Int16*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.AddSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddSaturate_Vector64_Int16(); - var result = AdvSimd.AddSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddSaturate_Vector64_Int16(); - - fixed (Vector64* pFld1 = &test._fld1) - fixed (Vector64* pFld2 = &test._fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((Int16*)(pFld1)), - AdvSimd.LoadVector64((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.AddSaturate(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((Int16*)(pFld1)), - AdvSimd.LoadVector64((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.AddSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((Int16*)(&test._fld1)), - AdvSimd.LoadVector64((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector64 op1, Vector64 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.AddSaturate(left[i], right[i]) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.AddSaturate)}(Vector64, Vector64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector64.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector64.Int32.cs deleted file mode 100644 index 1a1d3640ce5e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector64.Int32.cs +++ /dev/null @@ -1,530 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void AddSaturate_Vector64_Int32() - { - var test = new SimpleBinaryOpTest__AddSaturate_Vector64_Int32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddSaturate_Vector64_Int32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector64 _fld1; - public Vector64 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddSaturate_Vector64_Int32 testClass) - { - var result = AdvSimd.AddSaturate(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddSaturate_Vector64_Int32 testClass) - { - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((Int32*)(pFld1)), - AdvSimd.LoadVector64((Int32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 8; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector64 _clsVar1; - private static Vector64 _clsVar2; - - private Vector64 _fld1; - private Vector64 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddSaturate_Vector64_Int32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddSaturate_Vector64_Int32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.AddSaturate( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((Int32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturate), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturate), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector64((Int32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.AddSaturate( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector64* pClsVar1 = &_clsVar1) - fixed (Vector64* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((Int32*)(pClsVar1)), - AdvSimd.LoadVector64((Int32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.AddSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector64((Int32*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector64((Int32*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.AddSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddSaturate_Vector64_Int32(); - var result = AdvSimd.AddSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddSaturate_Vector64_Int32(); - - fixed (Vector64* pFld1 = &test._fld1) - fixed (Vector64* pFld2 = &test._fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((Int32*)(pFld1)), - AdvSimd.LoadVector64((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.AddSaturate(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((Int32*)(pFld1)), - AdvSimd.LoadVector64((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.AddSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((Int32*)(&test._fld1)), - AdvSimd.LoadVector64((Int32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector64 op1, Vector64 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.AddSaturate(left[i], right[i]) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.AddSaturate)}(Vector64, Vector64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector64.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector64.SByte.cs deleted file mode 100644 index a86e4ce7966f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector64.SByte.cs +++ /dev/null @@ -1,530 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void AddSaturate_Vector64_SByte() - { - var test = new SimpleBinaryOpTest__AddSaturate_Vector64_SByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddSaturate_Vector64_SByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector64 _fld1; - public Vector64 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddSaturate_Vector64_SByte testClass) - { - var result = AdvSimd.AddSaturate(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddSaturate_Vector64_SByte testClass) - { - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((SByte*)(pFld1)), - AdvSimd.LoadVector64((SByte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 8; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector64 _clsVar1; - private static Vector64 _clsVar2; - - private Vector64 _fld1; - private Vector64 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddSaturate_Vector64_SByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddSaturate_Vector64_SByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.AddSaturate( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((SByte*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturate), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturate), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector64((SByte*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.AddSaturate( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector64* pClsVar1 = &_clsVar1) - fixed (Vector64* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((SByte*)(pClsVar1)), - AdvSimd.LoadVector64((SByte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.AddSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector64((SByte*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector64((SByte*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.AddSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddSaturate_Vector64_SByte(); - var result = AdvSimd.AddSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddSaturate_Vector64_SByte(); - - fixed (Vector64* pFld1 = &test._fld1) - fixed (Vector64* pFld2 = &test._fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((SByte*)(pFld1)), - AdvSimd.LoadVector64((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.AddSaturate(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((SByte*)(pFld1)), - AdvSimd.LoadVector64((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.AddSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((SByte*)(&test._fld1)), - AdvSimd.LoadVector64((SByte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector64 op1, Vector64 op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.AddSaturate(left[i], right[i]) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.AddSaturate)}(Vector64, Vector64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector64.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector64.UInt16.cs deleted file mode 100644 index b950c219ffef..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector64.UInt16.cs +++ /dev/null @@ -1,530 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void AddSaturate_Vector64_UInt16() - { - var test = new SimpleBinaryOpTest__AddSaturate_Vector64_UInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddSaturate_Vector64_UInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector64 _fld1; - public Vector64 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddSaturate_Vector64_UInt16 testClass) - { - var result = AdvSimd.AddSaturate(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddSaturate_Vector64_UInt16 testClass) - { - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((UInt16*)(pFld1)), - AdvSimd.LoadVector64((UInt16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 8; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector64 _clsVar1; - private static Vector64 _clsVar2; - - private Vector64 _fld1; - private Vector64 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddSaturate_Vector64_UInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddSaturate_Vector64_UInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.AddSaturate( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((UInt16*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturate), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturate), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector64((UInt16*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.AddSaturate( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector64* pClsVar1 = &_clsVar1) - fixed (Vector64* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((UInt16*)(pClsVar1)), - AdvSimd.LoadVector64((UInt16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.AddSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector64((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector64((UInt16*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.AddSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddSaturate_Vector64_UInt16(); - var result = AdvSimd.AddSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddSaturate_Vector64_UInt16(); - - fixed (Vector64* pFld1 = &test._fld1) - fixed (Vector64* pFld2 = &test._fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((UInt16*)(pFld1)), - AdvSimd.LoadVector64((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.AddSaturate(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((UInt16*)(pFld1)), - AdvSimd.LoadVector64((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.AddSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((UInt16*)(&test._fld1)), - AdvSimd.LoadVector64((UInt16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector64 op1, Vector64 op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.AddSaturate(left[i], right[i]) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.AddSaturate)}(Vector64, Vector64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector64.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector64.UInt32.cs deleted file mode 100644 index 90a44250f9be..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector64.UInt32.cs +++ /dev/null @@ -1,530 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void AddSaturate_Vector64_UInt32() - { - var test = new SimpleBinaryOpTest__AddSaturate_Vector64_UInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddSaturate_Vector64_UInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector64 _fld1; - public Vector64 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddSaturate_Vector64_UInt32 testClass) - { - var result = AdvSimd.AddSaturate(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddSaturate_Vector64_UInt32 testClass) - { - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((UInt32*)(pFld1)), - AdvSimd.LoadVector64((UInt32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 8; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector64 _clsVar1; - private static Vector64 _clsVar2; - - private Vector64 _fld1; - private Vector64 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddSaturate_Vector64_UInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddSaturate_Vector64_UInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.AddSaturate( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((UInt32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturate), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturate), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector64((UInt32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.AddSaturate( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector64* pClsVar1 = &_clsVar1) - fixed (Vector64* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((UInt32*)(pClsVar1)), - AdvSimd.LoadVector64((UInt32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.AddSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector64((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector64((UInt32*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.AddSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddSaturate_Vector64_UInt32(); - var result = AdvSimd.AddSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddSaturate_Vector64_UInt32(); - - fixed (Vector64* pFld1 = &test._fld1) - fixed (Vector64* pFld2 = &test._fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((UInt32*)(pFld1)), - AdvSimd.LoadVector64((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.AddSaturate(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((UInt32*)(pFld1)), - AdvSimd.LoadVector64((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.AddSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.AddSaturate( - AdvSimd.LoadVector64((UInt32*)(&test._fld1)), - AdvSimd.LoadVector64((UInt32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector64 op1, Vector64 op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.AddSaturate(left[i], right[i]) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.AddSaturate)}(Vector64, Vector64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturateScalar.Vector64.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturateScalar.Vector64.Int64.cs deleted file mode 100644 index 444245ffeffd..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturateScalar.Vector64.Int64.cs +++ /dev/null @@ -1,537 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void AddSaturateScalar_Vector64_Int64() - { - var test = new SimpleBinaryOpTest__AddSaturateScalar_Vector64_Int64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddSaturateScalar_Vector64_Int64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int64[] inArray1, Int64[] inArray2, Int64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector64 _fld1; - public Vector64 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddSaturateScalar_Vector64_Int64 testClass) - { - var result = AdvSimd.AddSaturateScalar(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddSaturateScalar_Vector64_Int64 testClass) - { - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.AddSaturateScalar( - AdvSimd.LoadVector64((Int64*)(pFld1)), - AdvSimd.LoadVector64((Int64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 8; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector64 _clsVar1; - private static Vector64 _clsVar2; - - private Vector64 _fld1; - private Vector64 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddSaturateScalar_Vector64_Int64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddSaturateScalar_Vector64_Int64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.AddSaturateScalar( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.AddSaturateScalar( - AdvSimd.LoadVector64((Int64*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturateScalar), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturateScalar), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector64((Int64*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.AddSaturateScalar( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector64* pClsVar1 = &_clsVar1) - fixed (Vector64* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.AddSaturateScalar( - AdvSimd.LoadVector64((Int64*)(pClsVar1)), - AdvSimd.LoadVector64((Int64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.AddSaturateScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector64((Int64*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector64((Int64*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.AddSaturateScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddSaturateScalar_Vector64_Int64(); - var result = AdvSimd.AddSaturateScalar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddSaturateScalar_Vector64_Int64(); - - fixed (Vector64* pFld1 = &test._fld1) - fixed (Vector64* pFld2 = &test._fld2) - { - var result = AdvSimd.AddSaturateScalar( - AdvSimd.LoadVector64((Int64*)(pFld1)), - AdvSimd.LoadVector64((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.AddSaturateScalar(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.AddSaturateScalar( - AdvSimd.LoadVector64((Int64*)(pFld1)), - AdvSimd.LoadVector64((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.AddSaturateScalar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.AddSaturateScalar( - AdvSimd.LoadVector64((Int64*)(&test._fld1)), - AdvSimd.LoadVector64((Int64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector64 op1, Vector64 op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (Helpers.AddSaturate(left[0], right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.AddSaturateScalar)}(Vector64, Vector64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturateScalar.Vector64.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturateScalar.Vector64.UInt64.cs deleted file mode 100644 index 5dc50d09e021..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturateScalar.Vector64.UInt64.cs +++ /dev/null @@ -1,537 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void AddSaturateScalar_Vector64_UInt64() - { - var test = new SimpleBinaryOpTest__AddSaturateScalar_Vector64_UInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddSaturateScalar_Vector64_UInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt64[] inArray1, UInt64[] inArray2, UInt64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector64 _fld1; - public Vector64 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddSaturateScalar_Vector64_UInt64 testClass) - { - var result = AdvSimd.AddSaturateScalar(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddSaturateScalar_Vector64_UInt64 testClass) - { - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.AddSaturateScalar( - AdvSimd.LoadVector64((UInt64*)(pFld1)), - AdvSimd.LoadVector64((UInt64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 8; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector64 _clsVar1; - private static Vector64 _clsVar2; - - private Vector64 _fld1; - private Vector64 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddSaturateScalar_Vector64_UInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddSaturateScalar_Vector64_UInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.AddSaturateScalar( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.AddSaturateScalar( - AdvSimd.LoadVector64((UInt64*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturateScalar), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturateScalar), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector64((UInt64*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.AddSaturateScalar( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector64* pClsVar1 = &_clsVar1) - fixed (Vector64* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.AddSaturateScalar( - AdvSimd.LoadVector64((UInt64*)(pClsVar1)), - AdvSimd.LoadVector64((UInt64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.AddSaturateScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector64((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector64((UInt64*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.AddSaturateScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddSaturateScalar_Vector64_UInt64(); - var result = AdvSimd.AddSaturateScalar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddSaturateScalar_Vector64_UInt64(); - - fixed (Vector64* pFld1 = &test._fld1) - fixed (Vector64* pFld2 = &test._fld2) - { - var result = AdvSimd.AddSaturateScalar( - AdvSimd.LoadVector64((UInt64*)(pFld1)), - AdvSimd.LoadVector64((UInt64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.AddSaturateScalar(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.AddSaturateScalar( - AdvSimd.LoadVector64((UInt64*)(pFld1)), - AdvSimd.LoadVector64((UInt64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.AddSaturateScalar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.AddSaturateScalar( - AdvSimd.LoadVector64((UInt64*)(&test._fld1)), - AdvSimd.LoadVector64((UInt64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector64 op1, Vector64 op2, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt64[] left, UInt64[] right, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (Helpers.AddSaturate(left[0], right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.AddSaturateScalar)}(Vector64, Vector64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AdvSimd_Part1_r.csproj b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AdvSimd_Part1_r.csproj deleted file mode 100644 index 30d6cb8d0bf3..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AdvSimd_Part1_r.csproj +++ /dev/null @@ -1,271 +0,0 @@ - - - Exe - true - - - Embedded - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AdvSimd_Part1_ro.csproj b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AdvSimd_Part1_ro.csproj deleted file mode 100644 index 0f9dd22a6005..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AdvSimd_Part1_ro.csproj +++ /dev/null @@ -1,271 +0,0 @@ - - - Exe - true - - - Embedded - True - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AdvSimd_Part2_r.csproj b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AdvSimd_Part2_r.csproj deleted file mode 100644 index 0472305204a8..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AdvSimd_Part2_r.csproj +++ /dev/null @@ -1,271 +0,0 @@ - - - Exe - true - - - Embedded - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AdvSimd_Part2_ro.csproj b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AdvSimd_Part2_ro.csproj deleted file mode 100644 index 257343e46564..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AdvSimd_Part2_ro.csproj +++ /dev/null @@ -1,271 +0,0 @@ - - - Exe - true - - - Embedded - True - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AdvSimd_Part3_r.csproj b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AdvSimd_Part3_r.csproj deleted file mode 100644 index b11a51aea9ad..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AdvSimd_Part3_r.csproj +++ /dev/null @@ -1,271 +0,0 @@ - - - Exe - true - - - Embedded - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AdvSimd_Part3_ro.csproj b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AdvSimd_Part3_ro.csproj deleted file mode 100644 index 0cbbc1b6a0b1..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AdvSimd_Part3_ro.csproj +++ /dev/null @@ -1,271 +0,0 @@ - - - Exe - true - - - Embedded - True - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AdvSimd_Part4_r.csproj b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AdvSimd_Part4_r.csproj deleted file mode 100644 index b1509a00a5b0..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AdvSimd_Part4_r.csproj +++ /dev/null @@ -1,271 +0,0 @@ - - - Exe - true - - - Embedded - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AdvSimd_Part4_ro.csproj b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AdvSimd_Part4_ro.csproj deleted file mode 100644 index ad9231cea2fa..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AdvSimd_Part4_ro.csproj +++ /dev/null @@ -1,271 +0,0 @@ - - - Exe - true - - - Embedded - True - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AdvSimd_Part5_r.csproj b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AdvSimd_Part5_r.csproj deleted file mode 100644 index 13ce2301c91f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AdvSimd_Part5_r.csproj +++ /dev/null @@ -1,160 +0,0 @@ - - - Exe - true - - - Embedded - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AdvSimd_Part5_ro.csproj b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AdvSimd_Part5_ro.csproj deleted file mode 100644 index b1bf5c60bcd0..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/AdvSimd_Part5_ro.csproj +++ /dev/null @@ -1,160 +0,0 @@ - - - Exe - true - - - Embedded - True - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractNarrowingLower.Vector128.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractNarrowingLower.Vector128.Int16.cs deleted file mode 100644 index c6bc0bca5bec..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractNarrowingLower.Vector128.Int16.cs +++ /dev/null @@ -1,489 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ExtractNarrowingLower_Vector128_Int16() - { - var test = new SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_Int16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_Int16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_Int16 testClass) - { - var result = AdvSimd.ExtractNarrowingLower(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_Int16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((Int16*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_Int16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_Int16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ExtractNarrowingLower( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((Int16*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractNarrowingLower), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractNarrowingLower), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((Int16*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ExtractNarrowingLower( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((Int16*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = AdvSimd.ExtractNarrowingLower(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((Int16*)(_dataTable.inArray1Ptr)); - var result = AdvSimd.ExtractNarrowingLower(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_Int16(); - var result = AdvSimd.ExtractNarrowingLower(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_Int16(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((Int16*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ExtractNarrowingLower(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((Int16*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractNarrowingLower(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((Int16*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Int16[] firstOp, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.ExtractNarrowing(firstOp[i]) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ExtractNarrowingLower)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractNarrowingLower.Vector128.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractNarrowingLower.Vector128.Int32.cs deleted file mode 100644 index 5f7391b3d165..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractNarrowingLower.Vector128.Int32.cs +++ /dev/null @@ -1,489 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ExtractNarrowingLower_Vector128_Int32() - { - var test = new SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_Int32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_Int32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_Int32 testClass) - { - var result = AdvSimd.ExtractNarrowingLower(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_Int32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((Int32*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_Int32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_Int32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ExtractNarrowingLower( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((Int32*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractNarrowingLower), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractNarrowingLower), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((Int32*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ExtractNarrowingLower( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((Int32*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = AdvSimd.ExtractNarrowingLower(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((Int32*)(_dataTable.inArray1Ptr)); - var result = AdvSimd.ExtractNarrowingLower(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_Int32(); - var result = AdvSimd.ExtractNarrowingLower(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_Int32(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((Int32*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ExtractNarrowingLower(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((Int32*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractNarrowingLower(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((Int32*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Int32[] firstOp, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.ExtractNarrowing(firstOp[i]) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ExtractNarrowingLower)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractNarrowingLower.Vector128.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractNarrowingLower.Vector128.Int64.cs deleted file mode 100644 index b40982644508..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractNarrowingLower.Vector128.Int64.cs +++ /dev/null @@ -1,489 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ExtractNarrowingLower_Vector128_Int64() - { - var test = new SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_Int64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_Int64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int64[] inArray1, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_Int64 testClass) - { - var result = AdvSimd.ExtractNarrowingLower(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_Int64 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((Int64*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_Int64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_Int64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new DataTable(_data1, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ExtractNarrowingLower( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((Int64*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractNarrowingLower), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractNarrowingLower), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((Int64*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ExtractNarrowingLower( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((Int64*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = AdvSimd.ExtractNarrowingLower(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((Int64*)(_dataTable.inArray1Ptr)); - var result = AdvSimd.ExtractNarrowingLower(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_Int64(); - var result = AdvSimd.ExtractNarrowingLower(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_Int64(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((Int64*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ExtractNarrowingLower(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((Int64*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractNarrowingLower(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((Int64*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Int64[] firstOp, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.ExtractNarrowing(firstOp[i]) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ExtractNarrowingLower)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractNarrowingLower.Vector128.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractNarrowingLower.Vector128.UInt16.cs deleted file mode 100644 index 5c739b97a994..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractNarrowingLower.Vector128.UInt16.cs +++ /dev/null @@ -1,489 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ExtractNarrowingLower_Vector128_UInt16() - { - var test = new SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_UInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_UInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_UInt16 testClass) - { - var result = AdvSimd.ExtractNarrowingLower(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_UInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((UInt16*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_UInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_UInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ExtractNarrowingLower( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractNarrowingLower), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractNarrowingLower), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ExtractNarrowingLower( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((UInt16*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = AdvSimd.ExtractNarrowingLower(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)); - var result = AdvSimd.ExtractNarrowingLower(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_UInt16(); - var result = AdvSimd.ExtractNarrowingLower(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_UInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((UInt16*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ExtractNarrowingLower(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((UInt16*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractNarrowingLower(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((UInt16*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(UInt16[] firstOp, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.ExtractNarrowing(firstOp[i]) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ExtractNarrowingLower)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractNarrowingLower.Vector128.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractNarrowingLower.Vector128.UInt32.cs deleted file mode 100644 index 8630a333377e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractNarrowingLower.Vector128.UInt32.cs +++ /dev/null @@ -1,489 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ExtractNarrowingLower_Vector128_UInt32() - { - var test = new SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_UInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_UInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_UInt32 testClass) - { - var result = AdvSimd.ExtractNarrowingLower(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_UInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((UInt32*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_UInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_UInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ExtractNarrowingLower( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractNarrowingLower), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractNarrowingLower), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ExtractNarrowingLower( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((UInt32*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = AdvSimd.ExtractNarrowingLower(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)); - var result = AdvSimd.ExtractNarrowingLower(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_UInt32(); - var result = AdvSimd.ExtractNarrowingLower(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_UInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((UInt32*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ExtractNarrowingLower(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((UInt32*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractNarrowingLower(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((UInt32*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(UInt32[] firstOp, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.ExtractNarrowing(firstOp[i]) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ExtractNarrowingLower)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractNarrowingLower.Vector128.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractNarrowingLower.Vector128.UInt64.cs deleted file mode 100644 index 84abecc87998..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractNarrowingLower.Vector128.UInt64.cs +++ /dev/null @@ -1,489 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ExtractNarrowingLower_Vector128_UInt64() - { - var test = new SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_UInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_UInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt64[] inArray1, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_UInt64 testClass) - { - var result = AdvSimd.ExtractNarrowingLower(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_UInt64 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((UInt64*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_UInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_UInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new DataTable(_data1, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ExtractNarrowingLower( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractNarrowingLower), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractNarrowingLower), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ExtractNarrowingLower( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((UInt64*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = AdvSimd.ExtractNarrowingLower(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)); - var result = AdvSimd.ExtractNarrowingLower(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_UInt64(); - var result = AdvSimd.ExtractNarrowingLower(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__ExtractNarrowingLower_Vector128_UInt64(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((UInt64*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ExtractNarrowingLower(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((UInt64*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractNarrowingLower(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractNarrowingLower( - AdvSimd.LoadVector128((UInt64*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(UInt64[] firstOp, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.ExtractNarrowing(firstOp[i]) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ExtractNarrowingLower)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractNarrowingUpper.Vector128.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractNarrowingUpper.Vector128.Int64.cs deleted file mode 100644 index b5316d0d700d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractNarrowingUpper.Vector128.Int64.cs +++ /dev/null @@ -1,530 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ExtractNarrowingUpper_Vector128_Int64() - { - var test = new SimpleBinaryOpTest__ExtractNarrowingUpper_Vector128_Int64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__ExtractNarrowingUpper_Vector128_Int64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int64[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector64 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__ExtractNarrowingUpper_Vector128_Int64 testClass) - { - var result = AdvSimd.ExtractNarrowingUpper(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__ExtractNarrowingUpper_Vector128_Int64 testClass) - { - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ExtractNarrowingUpper( - AdvSimd.LoadVector64((Int32*)(pFld1)), - AdvSimd.LoadVector128((Int64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector64 _clsVar1; - private static Vector128 _clsVar2; - - private Vector64 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__ExtractNarrowingUpper_Vector128_Int64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__ExtractNarrowingUpper_Vector128_Int64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ExtractNarrowingUpper( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ExtractNarrowingUpper( - AdvSimd.LoadVector64((Int32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractNarrowingUpper), new Type[] { typeof(Vector64), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractNarrowingUpper), new Type[] { typeof(Vector64), typeof(Vector128) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector64((Int32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ExtractNarrowingUpper( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector64* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.ExtractNarrowingUpper( - AdvSimd.LoadVector64((Int32*)(pClsVar1)), - AdvSimd.LoadVector128((Int64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.ExtractNarrowingUpper(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector64((Int32*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.ExtractNarrowingUpper(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__ExtractNarrowingUpper_Vector128_Int64(); - var result = AdvSimd.ExtractNarrowingUpper(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__ExtractNarrowingUpper_Vector128_Int64(); - - fixed (Vector64* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = AdvSimd.ExtractNarrowingUpper( - AdvSimd.LoadVector64((Int32*)(pFld1)), - AdvSimd.LoadVector128((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ExtractNarrowingUpper(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ExtractNarrowingUpper( - AdvSimd.LoadVector64((Int32*)(pFld1)), - AdvSimd.LoadVector128((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractNarrowingUpper(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractNarrowingUpper( - AdvSimd.LoadVector64((Int32*)(&test._fld1)), - AdvSimd.LoadVector128((Int64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector64 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int64[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.ExtractNarrowingUpper(left, right, i) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ExtractNarrowingUpper)}(Vector64, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractNarrowingUpper.Vector128.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractNarrowingUpper.Vector128.UInt64.cs deleted file mode 100644 index e1606c139aa8..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractNarrowingUpper.Vector128.UInt64.cs +++ /dev/null @@ -1,530 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ExtractNarrowingUpper_Vector128_UInt64() - { - var test = new SimpleBinaryOpTest__ExtractNarrowingUpper_Vector128_UInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__ExtractNarrowingUpper_Vector128_UInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt64[] inArray2, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector64 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__ExtractNarrowingUpper_Vector128_UInt64 testClass) - { - var result = AdvSimd.ExtractNarrowingUpper(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__ExtractNarrowingUpper_Vector128_UInt64 testClass) - { - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ExtractNarrowingUpper( - AdvSimd.LoadVector64((UInt32*)(pFld1)), - AdvSimd.LoadVector128((UInt64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector64 _clsVar1; - private static Vector128 _clsVar2; - - private Vector64 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__ExtractNarrowingUpper_Vector128_UInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__ExtractNarrowingUpper_Vector128_UInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ExtractNarrowingUpper( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ExtractNarrowingUpper( - AdvSimd.LoadVector64((UInt32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractNarrowingUpper), new Type[] { typeof(Vector64), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractNarrowingUpper), new Type[] { typeof(Vector64), typeof(Vector128) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector64((UInt32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ExtractNarrowingUpper( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector64* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.ExtractNarrowingUpper( - AdvSimd.LoadVector64((UInt32*)(pClsVar1)), - AdvSimd.LoadVector128((UInt64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.ExtractNarrowingUpper(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector64((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.ExtractNarrowingUpper(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__ExtractNarrowingUpper_Vector128_UInt64(); - var result = AdvSimd.ExtractNarrowingUpper(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__ExtractNarrowingUpper_Vector128_UInt64(); - - fixed (Vector64* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = AdvSimd.ExtractNarrowingUpper( - AdvSimd.LoadVector64((UInt32*)(pFld1)), - AdvSimd.LoadVector128((UInt64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ExtractNarrowingUpper(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ExtractNarrowingUpper( - AdvSimd.LoadVector64((UInt32*)(pFld1)), - AdvSimd.LoadVector128((UInt64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractNarrowingUpper(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractNarrowingUpper( - AdvSimd.LoadVector64((UInt32*)(&test._fld1)), - AdvSimd.LoadVector128((UInt64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector64 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt64[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.ExtractNarrowingUpper(left, right, i) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ExtractNarrowingUpper)}(Vector64, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractVector128.Byte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractVector128.Byte.1.cs deleted file mode 100644 index 9796b77b5864..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractVector128.Byte.1.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ExtractVector128_Byte_1() - { - var test = new ExtractVectorTest__ExtractVector128_Byte_1(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ExtractVectorTest__ExtractVector128_Byte_1 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ExtractVectorTest__ExtractVector128_Byte_1 testClass) - { - var result = AdvSimd.ExtractVector128(_fld1, _fld2, ElementIndex); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(ExtractVectorTest__ExtractVector128_Byte_1 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Byte*)pFld1), - AdvSimd.LoadVector128((Byte*)pFld2), - ElementIndex - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly byte ElementIndex = 1; - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static ExtractVectorTest__ExtractVector128_Byte_1() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ExtractVectorTest__ExtractVector128_Byte_1() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ExtractVector128( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((Byte*)(_dataTable.inArray2Ptr)), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractVector128), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - ElementIndex - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractVector128), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((Byte*)(_dataTable.inArray2Ptr)), - ElementIndex - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ExtractVector128( - _clsVar1, - _clsVar2, - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Byte*)(pClsVar1)), - AdvSimd.LoadVector128((Byte*)(pClsVar2)), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.ExtractVector128(op1, op2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.ExtractVector128(op1, op2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ExtractVectorTest__ExtractVector128_Byte_1(); - var result = AdvSimd.ExtractVector128(test._fld1, test._fld2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new ExtractVectorTest__ExtractVector128_Byte_1(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Byte*)pFld1), - AdvSimd.LoadVector128((Byte*)pFld2), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ExtractVector128(_fld1, _fld2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Byte*)pFld1), - AdvSimd.LoadVector128((Byte*)pFld2), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractVector128(test._fld1, test._fld2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Byte*)(&test._fld1)), - AdvSimd.LoadVector128((Byte*)(&test._fld2)), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Byte[] firstOp, Byte[] secondOp, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.ExtractVector(firstOp, secondOp, ElementIndex, i) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ExtractVector128)}(Vector128, Vector128, 1): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractVector128.Double.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractVector128.Double.1.cs deleted file mode 100644 index f6af47e4779a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractVector128.Double.1.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ExtractVector128_Double_1() - { - var test = new ExtractVectorTest__ExtractVector128_Double_1(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ExtractVectorTest__ExtractVector128_Double_1 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ExtractVectorTest__ExtractVector128_Double_1 testClass) - { - var result = AdvSimd.ExtractVector128(_fld1, _fld2, ElementIndex); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(ExtractVectorTest__ExtractVector128_Double_1 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Double*)pFld1), - AdvSimd.LoadVector128((Double*)pFld2), - ElementIndex - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly byte ElementIndex = 1; - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static ExtractVectorTest__ExtractVector128_Double_1() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ExtractVectorTest__ExtractVector128_Double_1() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ExtractVector128( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((Double*)(_dataTable.inArray2Ptr)), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractVector128), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - ElementIndex - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractVector128), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((Double*)(_dataTable.inArray2Ptr)), - ElementIndex - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ExtractVector128( - _clsVar1, - _clsVar2, - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Double*)(pClsVar1)), - AdvSimd.LoadVector128((Double*)(pClsVar2)), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.ExtractVector128(op1, op2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.ExtractVector128(op1, op2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ExtractVectorTest__ExtractVector128_Double_1(); - var result = AdvSimd.ExtractVector128(test._fld1, test._fld2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new ExtractVectorTest__ExtractVector128_Double_1(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Double*)pFld1), - AdvSimd.LoadVector128((Double*)pFld2), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ExtractVector128(_fld1, _fld2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Double*)pFld1), - AdvSimd.LoadVector128((Double*)pFld2), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractVector128(test._fld1, test._fld2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Double*)(&test._fld1)), - AdvSimd.LoadVector128((Double*)(&test._fld2)), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] secondOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(Helpers.ExtractVector(firstOp, secondOp, ElementIndex, i)) != BitConverter.DoubleToInt64Bits(result[i])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ExtractVector128)}(Vector128, Vector128, 1): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractVector128.Int16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractVector128.Int16.1.cs deleted file mode 100644 index 53da831c0785..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractVector128.Int16.1.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ExtractVector128_Int16_1() - { - var test = new ExtractVectorTest__ExtractVector128_Int16_1(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ExtractVectorTest__ExtractVector128_Int16_1 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ExtractVectorTest__ExtractVector128_Int16_1 testClass) - { - var result = AdvSimd.ExtractVector128(_fld1, _fld2, ElementIndex); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(ExtractVectorTest__ExtractVector128_Int16_1 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Int16*)pFld1), - AdvSimd.LoadVector128((Int16*)pFld2), - ElementIndex - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly byte ElementIndex = 1; - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static ExtractVectorTest__ExtractVector128_Int16_1() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ExtractVectorTest__ExtractVector128_Int16_1() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ExtractVector128( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((Int16*)(_dataTable.inArray2Ptr)), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractVector128), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - ElementIndex - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractVector128), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((Int16*)(_dataTable.inArray2Ptr)), - ElementIndex - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ExtractVector128( - _clsVar1, - _clsVar2, - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Int16*)(pClsVar1)), - AdvSimd.LoadVector128((Int16*)(pClsVar2)), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.ExtractVector128(op1, op2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.ExtractVector128(op1, op2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ExtractVectorTest__ExtractVector128_Int16_1(); - var result = AdvSimd.ExtractVector128(test._fld1, test._fld2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new ExtractVectorTest__ExtractVector128_Int16_1(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Int16*)pFld1), - AdvSimd.LoadVector128((Int16*)pFld2), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ExtractVector128(_fld1, _fld2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Int16*)pFld1), - AdvSimd.LoadVector128((Int16*)pFld2), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractVector128(test._fld1, test._fld2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Int16*)(&test._fld1)), - AdvSimd.LoadVector128((Int16*)(&test._fld2)), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] firstOp, Int16[] secondOp, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.ExtractVector(firstOp, secondOp, ElementIndex, i) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ExtractVector128)}(Vector128, Vector128, 1): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractVector128.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractVector128.Int32.1.cs deleted file mode 100644 index d5c90412f4a5..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractVector128.Int32.1.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ExtractVector128_Int32_1() - { - var test = new ExtractVectorTest__ExtractVector128_Int32_1(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ExtractVectorTest__ExtractVector128_Int32_1 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ExtractVectorTest__ExtractVector128_Int32_1 testClass) - { - var result = AdvSimd.ExtractVector128(_fld1, _fld2, ElementIndex); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(ExtractVectorTest__ExtractVector128_Int32_1 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Int32*)pFld1), - AdvSimd.LoadVector128((Int32*)pFld2), - ElementIndex - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly byte ElementIndex = 1; - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static ExtractVectorTest__ExtractVector128_Int32_1() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ExtractVectorTest__ExtractVector128_Int32_1() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ExtractVector128( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((Int32*)(_dataTable.inArray2Ptr)), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractVector128), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - ElementIndex - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractVector128), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((Int32*)(_dataTable.inArray2Ptr)), - ElementIndex - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ExtractVector128( - _clsVar1, - _clsVar2, - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Int32*)(pClsVar1)), - AdvSimd.LoadVector128((Int32*)(pClsVar2)), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.ExtractVector128(op1, op2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.ExtractVector128(op1, op2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ExtractVectorTest__ExtractVector128_Int32_1(); - var result = AdvSimd.ExtractVector128(test._fld1, test._fld2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new ExtractVectorTest__ExtractVector128_Int32_1(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Int32*)pFld1), - AdvSimd.LoadVector128((Int32*)pFld2), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ExtractVector128(_fld1, _fld2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Int32*)pFld1), - AdvSimd.LoadVector128((Int32*)pFld2), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractVector128(test._fld1, test._fld2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Int32*)(&test._fld1)), - AdvSimd.LoadVector128((Int32*)(&test._fld2)), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] firstOp, Int32[] secondOp, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.ExtractVector(firstOp, secondOp, ElementIndex, i) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ExtractVector128)}(Vector128, Vector128, 1): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractVector128.Int64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractVector128.Int64.1.cs deleted file mode 100644 index 25a5c038150a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractVector128.Int64.1.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ExtractVector128_Int64_1() - { - var test = new ExtractVectorTest__ExtractVector128_Int64_1(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ExtractVectorTest__ExtractVector128_Int64_1 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int64[] inArray1, Int64[] inArray2, Int64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ExtractVectorTest__ExtractVector128_Int64_1 testClass) - { - var result = AdvSimd.ExtractVector128(_fld1, _fld2, ElementIndex); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(ExtractVectorTest__ExtractVector128_Int64_1 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Int64*)pFld1), - AdvSimd.LoadVector128((Int64*)pFld2), - ElementIndex - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly byte ElementIndex = 1; - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static ExtractVectorTest__ExtractVector128_Int64_1() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ExtractVectorTest__ExtractVector128_Int64_1() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ExtractVector128( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((Int64*)(_dataTable.inArray2Ptr)), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractVector128), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - ElementIndex - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractVector128), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((Int64*)(_dataTable.inArray2Ptr)), - ElementIndex - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ExtractVector128( - _clsVar1, - _clsVar2, - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Int64*)(pClsVar1)), - AdvSimd.LoadVector128((Int64*)(pClsVar2)), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.ExtractVector128(op1, op2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((Int64*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.ExtractVector128(op1, op2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ExtractVectorTest__ExtractVector128_Int64_1(); - var result = AdvSimd.ExtractVector128(test._fld1, test._fld2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new ExtractVectorTest__ExtractVector128_Int64_1(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Int64*)pFld1), - AdvSimd.LoadVector128((Int64*)pFld2), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ExtractVector128(_fld1, _fld2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Int64*)pFld1), - AdvSimd.LoadVector128((Int64*)pFld2), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractVector128(test._fld1, test._fld2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Int64*)(&test._fld1)), - AdvSimd.LoadVector128((Int64*)(&test._fld2)), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int64[] firstOp, Int64[] secondOp, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.ExtractVector(firstOp, secondOp, ElementIndex, i) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ExtractVector128)}(Vector128, Vector128, 1): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractVector128.SByte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractVector128.SByte.1.cs deleted file mode 100644 index 0ac735f5ae66..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractVector128.SByte.1.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ExtractVector128_SByte_1() - { - var test = new ExtractVectorTest__ExtractVector128_SByte_1(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ExtractVectorTest__ExtractVector128_SByte_1 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ExtractVectorTest__ExtractVector128_SByte_1 testClass) - { - var result = AdvSimd.ExtractVector128(_fld1, _fld2, ElementIndex); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(ExtractVectorTest__ExtractVector128_SByte_1 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((SByte*)pFld1), - AdvSimd.LoadVector128((SByte*)pFld2), - ElementIndex - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly byte ElementIndex = 1; - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static ExtractVectorTest__ExtractVector128_SByte_1() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ExtractVectorTest__ExtractVector128_SByte_1() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ExtractVector128( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((SByte*)(_dataTable.inArray2Ptr)), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractVector128), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - ElementIndex - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractVector128), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((SByte*)(_dataTable.inArray2Ptr)), - ElementIndex - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ExtractVector128( - _clsVar1, - _clsVar2, - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((SByte*)(pClsVar1)), - AdvSimd.LoadVector128((SByte*)(pClsVar2)), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.ExtractVector128(op1, op2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.ExtractVector128(op1, op2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ExtractVectorTest__ExtractVector128_SByte_1(); - var result = AdvSimd.ExtractVector128(test._fld1, test._fld2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new ExtractVectorTest__ExtractVector128_SByte_1(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((SByte*)pFld1), - AdvSimd.LoadVector128((SByte*)pFld2), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ExtractVector128(_fld1, _fld2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((SByte*)pFld1), - AdvSimd.LoadVector128((SByte*)pFld2), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractVector128(test._fld1, test._fld2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((SByte*)(&test._fld1)), - AdvSimd.LoadVector128((SByte*)(&test._fld2)), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(SByte[] firstOp, SByte[] secondOp, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.ExtractVector(firstOp, secondOp, ElementIndex, i) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ExtractVector128)}(Vector128, Vector128, 1): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractVector128.Single.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractVector128.Single.1.cs deleted file mode 100644 index 8a497dd8eb3d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractVector128.Single.1.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ExtractVector128_Single_1() - { - var test = new ExtractVectorTest__ExtractVector128_Single_1(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ExtractVectorTest__ExtractVector128_Single_1 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ExtractVectorTest__ExtractVector128_Single_1 testClass) - { - var result = AdvSimd.ExtractVector128(_fld1, _fld2, ElementIndex); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(ExtractVectorTest__ExtractVector128_Single_1 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Single*)pFld1), - AdvSimd.LoadVector128((Single*)pFld2), - ElementIndex - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly byte ElementIndex = 1; - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static ExtractVectorTest__ExtractVector128_Single_1() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ExtractVectorTest__ExtractVector128_Single_1() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ExtractVector128( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((Single*)(_dataTable.inArray2Ptr)), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractVector128), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - ElementIndex - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractVector128), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((Single*)(_dataTable.inArray2Ptr)), - ElementIndex - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ExtractVector128( - _clsVar1, - _clsVar2, - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Single*)(pClsVar1)), - AdvSimd.LoadVector128((Single*)(pClsVar2)), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.ExtractVector128(op1, op2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.ExtractVector128(op1, op2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ExtractVectorTest__ExtractVector128_Single_1(); - var result = AdvSimd.ExtractVector128(test._fld1, test._fld2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new ExtractVectorTest__ExtractVector128_Single_1(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Single*)pFld1), - AdvSimd.LoadVector128((Single*)pFld2), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ExtractVector128(_fld1, _fld2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Single*)pFld1), - AdvSimd.LoadVector128((Single*)pFld2), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractVector128(test._fld1, test._fld2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((Single*)(&test._fld1)), - AdvSimd.LoadVector128((Single*)(&test._fld2)), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] secondOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(Helpers.ExtractVector(firstOp, secondOp, ElementIndex, i)) != BitConverter.SingleToInt32Bits(result[i])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ExtractVector128)}(Vector128, Vector128, 1): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractVector128.UInt16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractVector128.UInt16.1.cs deleted file mode 100644 index ca5c15cb5aca..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractVector128.UInt16.1.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ExtractVector128_UInt16_1() - { - var test = new ExtractVectorTest__ExtractVector128_UInt16_1(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ExtractVectorTest__ExtractVector128_UInt16_1 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ExtractVectorTest__ExtractVector128_UInt16_1 testClass) - { - var result = AdvSimd.ExtractVector128(_fld1, _fld2, ElementIndex); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(ExtractVectorTest__ExtractVector128_UInt16_1 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((UInt16*)pFld1), - AdvSimd.LoadVector128((UInt16*)pFld2), - ElementIndex - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly byte ElementIndex = 1; - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static ExtractVectorTest__ExtractVector128_UInt16_1() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ExtractVectorTest__ExtractVector128_UInt16_1() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ExtractVector128( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractVector128), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - ElementIndex - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractVector128), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)), - ElementIndex - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ExtractVector128( - _clsVar1, - _clsVar2, - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((UInt16*)(pClsVar1)), - AdvSimd.LoadVector128((UInt16*)(pClsVar2)), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.ExtractVector128(op1, op2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.ExtractVector128(op1, op2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ExtractVectorTest__ExtractVector128_UInt16_1(); - var result = AdvSimd.ExtractVector128(test._fld1, test._fld2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new ExtractVectorTest__ExtractVector128_UInt16_1(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((UInt16*)pFld1), - AdvSimd.LoadVector128((UInt16*)pFld2), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ExtractVector128(_fld1, _fld2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((UInt16*)pFld1), - AdvSimd.LoadVector128((UInt16*)pFld2), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractVector128(test._fld1, test._fld2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((UInt16*)(&test._fld1)), - AdvSimd.LoadVector128((UInt16*)(&test._fld2)), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt16[] firstOp, UInt16[] secondOp, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.ExtractVector(firstOp, secondOp, ElementIndex, i) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ExtractVector128)}(Vector128, Vector128, 1): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractVector128.UInt32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractVector128.UInt32.1.cs deleted file mode 100644 index d211563e47fb..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractVector128.UInt32.1.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ExtractVector128_UInt32_1() - { - var test = new ExtractVectorTest__ExtractVector128_UInt32_1(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ExtractVectorTest__ExtractVector128_UInt32_1 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ExtractVectorTest__ExtractVector128_UInt32_1 testClass) - { - var result = AdvSimd.ExtractVector128(_fld1, _fld2, ElementIndex); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(ExtractVectorTest__ExtractVector128_UInt32_1 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((UInt32*)pFld1), - AdvSimd.LoadVector128((UInt32*)pFld2), - ElementIndex - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly byte ElementIndex = 1; - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static ExtractVectorTest__ExtractVector128_UInt32_1() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ExtractVectorTest__ExtractVector128_UInt32_1() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ExtractVector128( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractVector128), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - ElementIndex - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractVector128), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)), - ElementIndex - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ExtractVector128( - _clsVar1, - _clsVar2, - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((UInt32*)(pClsVar1)), - AdvSimd.LoadVector128((UInt32*)(pClsVar2)), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.ExtractVector128(op1, op2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.ExtractVector128(op1, op2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ExtractVectorTest__ExtractVector128_UInt32_1(); - var result = AdvSimd.ExtractVector128(test._fld1, test._fld2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new ExtractVectorTest__ExtractVector128_UInt32_1(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((UInt32*)pFld1), - AdvSimd.LoadVector128((UInt32*)pFld2), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ExtractVector128(_fld1, _fld2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((UInt32*)pFld1), - AdvSimd.LoadVector128((UInt32*)pFld2), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractVector128(test._fld1, test._fld2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((UInt32*)(&test._fld1)), - AdvSimd.LoadVector128((UInt32*)(&test._fld2)), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] firstOp, UInt32[] secondOp, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.ExtractVector(firstOp, secondOp, ElementIndex, i) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ExtractVector128)}(Vector128, Vector128, 1): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractVector128.UInt64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractVector128.UInt64.1.cs deleted file mode 100644 index 9cdaca196e2c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ExtractVector128.UInt64.1.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ExtractVector128_UInt64_1() - { - var test = new ExtractVectorTest__ExtractVector128_UInt64_1(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ExtractVectorTest__ExtractVector128_UInt64_1 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt64[] inArray1, UInt64[] inArray2, UInt64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ExtractVectorTest__ExtractVector128_UInt64_1 testClass) - { - var result = AdvSimd.ExtractVector128(_fld1, _fld2, ElementIndex); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(ExtractVectorTest__ExtractVector128_UInt64_1 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((UInt64*)pFld1), - AdvSimd.LoadVector128((UInt64*)pFld2), - ElementIndex - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly byte ElementIndex = 1; - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static ExtractVectorTest__ExtractVector128_UInt64_1() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ExtractVectorTest__ExtractVector128_UInt64_1() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ExtractVector128( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractVector128), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - ElementIndex - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ExtractVector128), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)), - ElementIndex - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ExtractVector128( - _clsVar1, - _clsVar2, - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((UInt64*)(pClsVar1)), - AdvSimd.LoadVector128((UInt64*)(pClsVar2)), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.ExtractVector128(op1, op2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.ExtractVector128(op1, op2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ExtractVectorTest__ExtractVector128_UInt64_1(); - var result = AdvSimd.ExtractVector128(test._fld1, test._fld2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new ExtractVectorTest__ExtractVector128_UInt64_1(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((UInt64*)pFld1), - AdvSimd.LoadVector128((UInt64*)pFld2), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ExtractVector128(_fld1, _fld2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((UInt64*)pFld1), - AdvSimd.LoadVector128((UInt64*)pFld2), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractVector128(test._fld1, test._fld2, ElementIndex); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ExtractVector128( - AdvSimd.LoadVector128((UInt64*)(&test._fld1)), - AdvSimd.LoadVector128((UInt64*)(&test._fld2)), - ElementIndex - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt64[] firstOp, UInt64[] secondOp, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.ExtractVector(firstOp, secondOp, ElementIndex, i) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ExtractVector128)}(Vector128, Vector128, 1): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/LoadVector128.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/LoadVector128.Byte.cs deleted file mode 100644 index c8d42f78cb39..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/LoadVector128.Byte.cs +++ /dev/null @@ -1,203 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void LoadVector128_Byte() - { - var test = new LoadUnaryOpTest__LoadVector128_Byte(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class LoadUnaryOpTest__LoadVector128_Byte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data = new Byte[Op1ElementCount]; - - private DataTable _dataTable; - - public LoadUnaryOpTest__LoadVector128_Byte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.LoadVector128( - (Byte*)(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.LoadVector128), new Type[] { typeof(Byte*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(Byte*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray = new Byte[Op1ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray = new Byte[Op1ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Byte[] firstOp, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (firstOp[i] != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.LoadVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/LoadVector128.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/LoadVector128.Double.cs deleted file mode 100644 index 93e05c2207e0..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/LoadVector128.Double.cs +++ /dev/null @@ -1,203 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void LoadVector128_Double() - { - var test = new LoadUnaryOpTest__LoadVector128_Double(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class LoadUnaryOpTest__LoadVector128_Double - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data = new Double[Op1ElementCount]; - - private DataTable _dataTable; - - public LoadUnaryOpTest__LoadVector128_Double() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.LoadVector128( - (Double*)(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.LoadVector128), new Type[] { typeof(Double*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(Double*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Double[] inArray = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Double[] inArray = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(firstOp[i]) != BitConverter.DoubleToInt64Bits(result[i])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.LoadVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/LoadVector128.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/LoadVector128.Int16.cs deleted file mode 100644 index c05d18963ef2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/LoadVector128.Int16.cs +++ /dev/null @@ -1,203 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void LoadVector128_Int16() - { - var test = new LoadUnaryOpTest__LoadVector128_Int16(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class LoadUnaryOpTest__LoadVector128_Int16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data = new Int16[Op1ElementCount]; - - private DataTable _dataTable; - - public LoadUnaryOpTest__LoadVector128_Int16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.LoadVector128( - (Int16*)(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.LoadVector128), new Type[] { typeof(Int16*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(Int16*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int16[] firstOp, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (firstOp[i] != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.LoadVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/LoadVector128.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/LoadVector128.Int32.cs deleted file mode 100644 index 46d3239af54f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/LoadVector128.Int32.cs +++ /dev/null @@ -1,203 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void LoadVector128_Int32() - { - var test = new LoadUnaryOpTest__LoadVector128_Int32(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class LoadUnaryOpTest__LoadVector128_Int32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data = new Int32[Op1ElementCount]; - - private DataTable _dataTable; - - public LoadUnaryOpTest__LoadVector128_Int32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.LoadVector128( - (Int32*)(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.LoadVector128), new Type[] { typeof(Int32*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(Int32*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int32[] firstOp, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (firstOp[i] != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.LoadVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/LoadVector128.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/LoadVector128.Int64.cs deleted file mode 100644 index e34e5d7ba1d9..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/LoadVector128.Int64.cs +++ /dev/null @@ -1,203 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void LoadVector128_Int64() - { - var test = new LoadUnaryOpTest__LoadVector128_Int64(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class LoadUnaryOpTest__LoadVector128_Int64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int64[] inArray1, Int64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data = new Int64[Op1ElementCount]; - - private DataTable _dataTable; - - public LoadUnaryOpTest__LoadVector128_Int64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new DataTable(_data, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.LoadVector128( - (Int64*)(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.LoadVector128), new Type[] { typeof(Int64*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(Int64*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int64[] firstOp, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (firstOp[i] != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.LoadVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/LoadVector128.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/LoadVector128.SByte.cs deleted file mode 100644 index 8ce9e45d1967..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/LoadVector128.SByte.cs +++ /dev/null @@ -1,203 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void LoadVector128_SByte() - { - var test = new LoadUnaryOpTest__LoadVector128_SByte(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class LoadUnaryOpTest__LoadVector128_SByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data = new SByte[Op1ElementCount]; - - private DataTable _dataTable; - - public LoadUnaryOpTest__LoadVector128_SByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.LoadVector128( - (SByte*)(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.LoadVector128), new Type[] { typeof(SByte*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(SByte*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray = new SByte[Op1ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray = new SByte[Op1ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(SByte[] firstOp, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (firstOp[i] != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.LoadVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/LoadVector128.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/LoadVector128.Single.cs deleted file mode 100644 index 96e4c38bf1b7..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/LoadVector128.Single.cs +++ /dev/null @@ -1,203 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void LoadVector128_Single() - { - var test = new LoadUnaryOpTest__LoadVector128_Single(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class LoadUnaryOpTest__LoadVector128_Single - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data = new Single[Op1ElementCount]; - - private DataTable _dataTable; - - public LoadUnaryOpTest__LoadVector128_Single() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.LoadVector128( - (Single*)(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.LoadVector128), new Type[] { typeof(Single*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(Single*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Single[] inArray = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Single[] inArray = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(firstOp[i]) != BitConverter.SingleToInt32Bits(result[i])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.LoadVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/LoadVector128.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/LoadVector128.UInt16.cs deleted file mode 100644 index 744300f42f6b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/LoadVector128.UInt16.cs +++ /dev/null @@ -1,203 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void LoadVector128_UInt16() - { - var test = new LoadUnaryOpTest__LoadVector128_UInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class LoadUnaryOpTest__LoadVector128_UInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data = new UInt16[Op1ElementCount]; - - private DataTable _dataTable; - - public LoadUnaryOpTest__LoadVector128_UInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.LoadVector128( - (UInt16*)(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.LoadVector128), new Type[] { typeof(UInt16*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(UInt16*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt16[] firstOp, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (firstOp[i] != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.LoadVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/LoadVector128.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/LoadVector128.UInt32.cs deleted file mode 100644 index a8423cb6dad2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/LoadVector128.UInt32.cs +++ /dev/null @@ -1,203 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void LoadVector128_UInt32() - { - var test = new LoadUnaryOpTest__LoadVector128_UInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class LoadUnaryOpTest__LoadVector128_UInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data = new UInt32[Op1ElementCount]; - - private DataTable _dataTable; - - public LoadUnaryOpTest__LoadVector128_UInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.LoadVector128( - (UInt32*)(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.LoadVector128), new Type[] { typeof(UInt32*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(UInt32*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt32[] firstOp, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (firstOp[i] != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.LoadVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/LoadVector128.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/LoadVector128.UInt64.cs deleted file mode 100644 index 890cbc311328..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/LoadVector128.UInt64.cs +++ /dev/null @@ -1,203 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void LoadVector128_UInt64() - { - var test = new LoadUnaryOpTest__LoadVector128_UInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class LoadUnaryOpTest__LoadVector128_UInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt64[] inArray1, UInt64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data = new UInt64[Op1ElementCount]; - - private DataTable _dataTable; - - public LoadUnaryOpTest__LoadVector128_UInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.LoadVector128( - (UInt64*)(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.LoadVector128), new Type[] { typeof(UInt64*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(UInt64*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt64[] firstOp, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (firstOp[i] != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.LoadVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/Program.AdvSimd_Part1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/Program.AdvSimd_Part1.cs deleted file mode 100644 index 9c59fe8cad24..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/Program.AdvSimd_Part1.cs +++ /dev/null @@ -1,274 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - static Program() - { - TestList = new Dictionary() { - ["CompareEqual.Vector128.UInt32"] = CompareEqual_Vector128_UInt32, - ["CompareGreaterThan.Vector64.Byte"] = CompareGreaterThan_Vector64_Byte, - ["CompareGreaterThan.Vector64.Int16"] = CompareGreaterThan_Vector64_Int16, - ["CompareGreaterThan.Vector64.Int32"] = CompareGreaterThan_Vector64_Int32, - ["CompareGreaterThan.Vector64.SByte"] = CompareGreaterThan_Vector64_SByte, - ["CompareGreaterThan.Vector64.Single"] = CompareGreaterThan_Vector64_Single, - ["CompareGreaterThan.Vector64.UInt16"] = CompareGreaterThan_Vector64_UInt16, - ["CompareGreaterThan.Vector64.UInt32"] = CompareGreaterThan_Vector64_UInt32, - ["CompareGreaterThan.Vector128.Byte"] = CompareGreaterThan_Vector128_Byte, - ["CompareGreaterThan.Vector128.Int16"] = CompareGreaterThan_Vector128_Int16, - ["CompareGreaterThan.Vector128.Int32"] = CompareGreaterThan_Vector128_Int32, - ["CompareGreaterThan.Vector128.SByte"] = CompareGreaterThan_Vector128_SByte, - ["CompareGreaterThan.Vector128.Single"] = CompareGreaterThan_Vector128_Single, - ["CompareGreaterThan.Vector128.UInt16"] = CompareGreaterThan_Vector128_UInt16, - ["CompareGreaterThan.Vector128.UInt32"] = CompareGreaterThan_Vector128_UInt32, - ["CompareGreaterThanOrEqual.Vector64.Byte"] = CompareGreaterThanOrEqual_Vector64_Byte, - ["CompareGreaterThanOrEqual.Vector64.Int16"] = CompareGreaterThanOrEqual_Vector64_Int16, - ["CompareGreaterThanOrEqual.Vector64.Int32"] = CompareGreaterThanOrEqual_Vector64_Int32, - ["CompareGreaterThanOrEqual.Vector64.SByte"] = CompareGreaterThanOrEqual_Vector64_SByte, - ["CompareGreaterThanOrEqual.Vector64.Single"] = CompareGreaterThanOrEqual_Vector64_Single, - ["CompareGreaterThanOrEqual.Vector64.UInt16"] = CompareGreaterThanOrEqual_Vector64_UInt16, - ["CompareGreaterThanOrEqual.Vector64.UInt32"] = CompareGreaterThanOrEqual_Vector64_UInt32, - ["CompareGreaterThanOrEqual.Vector128.Byte"] = CompareGreaterThanOrEqual_Vector128_Byte, - ["CompareGreaterThanOrEqual.Vector128.Int16"] = CompareGreaterThanOrEqual_Vector128_Int16, - ["CompareGreaterThanOrEqual.Vector128.Int32"] = CompareGreaterThanOrEqual_Vector128_Int32, - ["CompareGreaterThanOrEqual.Vector128.SByte"] = CompareGreaterThanOrEqual_Vector128_SByte, - ["CompareGreaterThanOrEqual.Vector128.Single"] = CompareGreaterThanOrEqual_Vector128_Single, - ["CompareGreaterThanOrEqual.Vector128.UInt16"] = CompareGreaterThanOrEqual_Vector128_UInt16, - ["CompareGreaterThanOrEqual.Vector128.UInt32"] = CompareGreaterThanOrEqual_Vector128_UInt32, - ["CompareLessThan.Vector64.Byte"] = CompareLessThan_Vector64_Byte, - ["CompareLessThan.Vector64.Int16"] = CompareLessThan_Vector64_Int16, - ["CompareLessThan.Vector64.Int32"] = CompareLessThan_Vector64_Int32, - ["CompareLessThan.Vector64.SByte"] = CompareLessThan_Vector64_SByte, - ["CompareLessThan.Vector64.Single"] = CompareLessThan_Vector64_Single, - ["CompareLessThan.Vector64.UInt16"] = CompareLessThan_Vector64_UInt16, - ["CompareLessThan.Vector64.UInt32"] = CompareLessThan_Vector64_UInt32, - ["CompareLessThan.Vector128.Byte"] = CompareLessThan_Vector128_Byte, - ["CompareLessThan.Vector128.Int16"] = CompareLessThan_Vector128_Int16, - ["CompareLessThan.Vector128.Int32"] = CompareLessThan_Vector128_Int32, - ["CompareLessThan.Vector128.SByte"] = CompareLessThan_Vector128_SByte, - ["CompareLessThan.Vector128.Single"] = CompareLessThan_Vector128_Single, - ["CompareLessThan.Vector128.UInt16"] = CompareLessThan_Vector128_UInt16, - ["CompareLessThan.Vector128.UInt32"] = CompareLessThan_Vector128_UInt32, - ["CompareLessThanOrEqual.Vector64.Byte"] = CompareLessThanOrEqual_Vector64_Byte, - ["CompareLessThanOrEqual.Vector64.Int16"] = CompareLessThanOrEqual_Vector64_Int16, - ["CompareLessThanOrEqual.Vector64.Int32"] = CompareLessThanOrEqual_Vector64_Int32, - ["CompareLessThanOrEqual.Vector64.SByte"] = CompareLessThanOrEqual_Vector64_SByte, - ["CompareLessThanOrEqual.Vector64.Single"] = CompareLessThanOrEqual_Vector64_Single, - ["CompareLessThanOrEqual.Vector64.UInt16"] = CompareLessThanOrEqual_Vector64_UInt16, - ["CompareLessThanOrEqual.Vector64.UInt32"] = CompareLessThanOrEqual_Vector64_UInt32, - ["CompareLessThanOrEqual.Vector128.Byte"] = CompareLessThanOrEqual_Vector128_Byte, - ["CompareLessThanOrEqual.Vector128.Int16"] = CompareLessThanOrEqual_Vector128_Int16, - ["CompareLessThanOrEqual.Vector128.Int32"] = CompareLessThanOrEqual_Vector128_Int32, - ["CompareLessThanOrEqual.Vector128.SByte"] = CompareLessThanOrEqual_Vector128_SByte, - ["CompareLessThanOrEqual.Vector128.Single"] = CompareLessThanOrEqual_Vector128_Single, - ["CompareLessThanOrEqual.Vector128.UInt16"] = CompareLessThanOrEqual_Vector128_UInt16, - ["CompareLessThanOrEqual.Vector128.UInt32"] = CompareLessThanOrEqual_Vector128_UInt32, - ["CompareTest.Vector64.Byte"] = CompareTest_Vector64_Byte, - ["CompareTest.Vector64.Int16"] = CompareTest_Vector64_Int16, - ["CompareTest.Vector64.Int32"] = CompareTest_Vector64_Int32, - ["CompareTest.Vector64.SByte"] = CompareTest_Vector64_SByte, - ["CompareTest.Vector64.Single"] = CompareTest_Vector64_Single, - ["CompareTest.Vector64.UInt16"] = CompareTest_Vector64_UInt16, - ["CompareTest.Vector64.UInt32"] = CompareTest_Vector64_UInt32, - ["CompareTest.Vector128.Byte"] = CompareTest_Vector128_Byte, - ["CompareTest.Vector128.Int16"] = CompareTest_Vector128_Int16, - ["CompareTest.Vector128.Int32"] = CompareTest_Vector128_Int32, - ["CompareTest.Vector128.SByte"] = CompareTest_Vector128_SByte, - ["CompareTest.Vector128.Single"] = CompareTest_Vector128_Single, - ["CompareTest.Vector128.UInt16"] = CompareTest_Vector128_UInt16, - ["CompareTest.Vector128.UInt32"] = CompareTest_Vector128_UInt32, - ["DivideScalar.Vector64.Double"] = DivideScalar_Vector64_Double, - ["DivideScalar.Vector64.Single"] = DivideScalar_Vector64_Single, - ["DuplicateSelectedScalarToVector64.Vector64.Byte.1"] = DuplicateSelectedScalarToVector64_Vector64_Byte_1, - ["DuplicateSelectedScalarToVector64.Vector64.Int16.1"] = DuplicateSelectedScalarToVector64_Vector64_Int16_1, - ["DuplicateSelectedScalarToVector64.Vector64.Int32.1"] = DuplicateSelectedScalarToVector64_Vector64_Int32_1, - ["DuplicateSelectedScalarToVector64.Vector64.SByte.1"] = DuplicateSelectedScalarToVector64_Vector64_SByte_1, - ["DuplicateSelectedScalarToVector64.Vector64.Single.1"] = DuplicateSelectedScalarToVector64_Vector64_Single_1, - ["DuplicateSelectedScalarToVector64.Vector64.UInt16.1"] = DuplicateSelectedScalarToVector64_Vector64_UInt16_1, - ["DuplicateSelectedScalarToVector64.Vector64.UInt32.1"] = DuplicateSelectedScalarToVector64_Vector64_UInt32_1, - ["DuplicateSelectedScalarToVector64.Vector128.Byte.8"] = DuplicateSelectedScalarToVector64_Vector128_Byte_8, - ["DuplicateSelectedScalarToVector64.Vector128.Int16.4"] = DuplicateSelectedScalarToVector64_Vector128_Int16_4, - ["DuplicateSelectedScalarToVector64.Vector128.Int32.2"] = DuplicateSelectedScalarToVector64_Vector128_Int32_2, - ["DuplicateSelectedScalarToVector64.Vector128.SByte.8"] = DuplicateSelectedScalarToVector64_Vector128_SByte_8, - ["DuplicateSelectedScalarToVector64.Vector128.Single.2"] = DuplicateSelectedScalarToVector64_Vector128_Single_2, - ["DuplicateSelectedScalarToVector64.Vector128.UInt16.4"] = DuplicateSelectedScalarToVector64_Vector128_UInt16_4, - ["DuplicateSelectedScalarToVector64.Vector128.UInt32.2"] = DuplicateSelectedScalarToVector64_Vector128_UInt32_2, - ["DuplicateSelectedScalarToVector128.Vector64.Byte.1"] = DuplicateSelectedScalarToVector128_Vector64_Byte_1, - ["DuplicateSelectedScalarToVector128.Vector64.Int16.1"] = DuplicateSelectedScalarToVector128_Vector64_Int16_1, - ["DuplicateSelectedScalarToVector128.Vector64.Int32.1"] = DuplicateSelectedScalarToVector128_Vector64_Int32_1, - ["DuplicateSelectedScalarToVector128.Vector64.SByte.1"] = DuplicateSelectedScalarToVector128_Vector64_SByte_1, - ["DuplicateSelectedScalarToVector128.Vector64.Single.1"] = DuplicateSelectedScalarToVector128_Vector64_Single_1, - ["DuplicateSelectedScalarToVector128.Vector64.UInt16.1"] = DuplicateSelectedScalarToVector128_Vector64_UInt16_1, - ["DuplicateSelectedScalarToVector128.Vector64.UInt32.1"] = DuplicateSelectedScalarToVector128_Vector64_UInt32_1, - ["DuplicateSelectedScalarToVector128.Vector128.Byte.8"] = DuplicateSelectedScalarToVector128_Vector128_Byte_8, - ["DuplicateSelectedScalarToVector128.Vector128.Int16.4"] = DuplicateSelectedScalarToVector128_Vector128_Int16_4, - ["DuplicateSelectedScalarToVector128.Vector128.Int32.2"] = DuplicateSelectedScalarToVector128_Vector128_Int32_2, - ["DuplicateSelectedScalarToVector128.Vector128.SByte.8"] = DuplicateSelectedScalarToVector128_Vector128_SByte_8, - ["DuplicateSelectedScalarToVector128.Vector128.Single.2"] = DuplicateSelectedScalarToVector128_Vector128_Single_2, - ["DuplicateSelectedScalarToVector128.Vector128.UInt16.4"] = DuplicateSelectedScalarToVector128_Vector128_UInt16_4, - ["DuplicateSelectedScalarToVector128.Vector128.UInt32.2"] = DuplicateSelectedScalarToVector128_Vector128_UInt32_2, - ["DuplicateToVector64.Byte"] = DuplicateToVector64_Byte, - ["DuplicateToVector64.Byte.31"] = DuplicateToVector64_Byte_31, - ["DuplicateToVector64.Int16"] = DuplicateToVector64_Int16, - ["DuplicateToVector64.Int16.31"] = DuplicateToVector64_Int16_31, - ["DuplicateToVector64.Int32"] = DuplicateToVector64_Int32, - ["DuplicateToVector64.Int32.31"] = DuplicateToVector64_Int32_31, - ["DuplicateToVector64.SByte"] = DuplicateToVector64_SByte, - ["DuplicateToVector64.SByte.31"] = DuplicateToVector64_SByte_31, - ["DuplicateToVector64.Single"] = DuplicateToVector64_Single, - ["DuplicateToVector64.Single.31"] = DuplicateToVector64_Single_31, - ["DuplicateToVector64.UInt16"] = DuplicateToVector64_UInt16, - ["DuplicateToVector64.UInt16.31"] = DuplicateToVector64_UInt16_31, - ["DuplicateToVector64.UInt32"] = DuplicateToVector64_UInt32, - ["DuplicateToVector64.UInt32.31"] = DuplicateToVector64_UInt32_31, - ["DuplicateToVector128.Byte"] = DuplicateToVector128_Byte, - ["DuplicateToVector128.Byte.31"] = DuplicateToVector128_Byte_31, - ["DuplicateToVector128.Int16"] = DuplicateToVector128_Int16, - ["DuplicateToVector128.Int16.31"] = DuplicateToVector128_Int16_31, - ["DuplicateToVector128.Int32"] = DuplicateToVector128_Int32, - ["DuplicateToVector128.Int32.31"] = DuplicateToVector128_Int32_31, - ["DuplicateToVector128.SByte"] = DuplicateToVector128_SByte, - ["DuplicateToVector128.SByte.31"] = DuplicateToVector128_SByte_31, - ["DuplicateToVector128.Single"] = DuplicateToVector128_Single, - ["DuplicateToVector128.Single.31"] = DuplicateToVector128_Single_31, - ["DuplicateToVector128.UInt16"] = DuplicateToVector128_UInt16, - ["DuplicateToVector128.UInt16.31"] = DuplicateToVector128_UInt16_31, - ["DuplicateToVector128.UInt32"] = DuplicateToVector128_UInt32, - ["DuplicateToVector128.UInt32.31"] = DuplicateToVector128_UInt32_31, - ["Extract.Vector64.Byte.1"] = Extract_Vector64_Byte_1, - ["Extract.Vector64.Int16.1"] = Extract_Vector64_Int16_1, - ["Extract.Vector64.Int32.1"] = Extract_Vector64_Int32_1, - ["Extract.Vector64.SByte.1"] = Extract_Vector64_SByte_1, - ["Extract.Vector64.Single.1"] = Extract_Vector64_Single_1, - ["Extract.Vector64.UInt16.1"] = Extract_Vector64_UInt16_1, - ["Extract.Vector64.UInt32.1"] = Extract_Vector64_UInt32_1, - ["Extract.Vector128.Byte.1"] = Extract_Vector128_Byte_1, - ["Extract.Vector128.Double.1"] = Extract_Vector128_Double_1, - ["Extract.Vector128.Int16.1"] = Extract_Vector128_Int16_1, - ["Extract.Vector128.Int32.1"] = Extract_Vector128_Int32_1, - ["Extract.Vector128.Int64.1"] = Extract_Vector128_Int64_1, - ["Extract.Vector128.SByte.1"] = Extract_Vector128_SByte_1, - ["Extract.Vector128.Single.1"] = Extract_Vector128_Single_1, - ["Extract.Vector128.UInt16.1"] = Extract_Vector128_UInt16_1, - ["Extract.Vector128.UInt32.1"] = Extract_Vector128_UInt32_1, - ["Extract.Vector128.UInt64.1"] = Extract_Vector128_UInt64_1, - ["ExtractNarrowingUpper.Vector128.Int16"] = ExtractNarrowingUpper_Vector128_Int16, - ["ExtractNarrowingUpper.Vector128.Int32"] = ExtractNarrowingUpper_Vector128_Int32, - ["ExtractNarrowingUpper.Vector128.Int64"] = ExtractNarrowingUpper_Vector128_Int64, - ["ExtractNarrowingUpper.Vector128.UInt16"] = ExtractNarrowingUpper_Vector128_UInt16, - ["ExtractNarrowingUpper.Vector128.UInt32"] = ExtractNarrowingUpper_Vector128_UInt32, - ["ExtractNarrowingUpper.Vector128.UInt64"] = ExtractNarrowingUpper_Vector128_UInt64, - ["ExtractNarrowingLower.Vector128.Int16"] = ExtractNarrowingLower_Vector128_Int16, - ["ExtractNarrowingLower.Vector128.Int32"] = ExtractNarrowingLower_Vector128_Int32, - ["ExtractNarrowingLower.Vector128.Int64"] = ExtractNarrowingLower_Vector128_Int64, - ["ExtractNarrowingLower.Vector128.UInt16"] = ExtractNarrowingLower_Vector128_UInt16, - ["ExtractNarrowingLower.Vector128.UInt32"] = ExtractNarrowingLower_Vector128_UInt32, - ["ExtractNarrowingLower.Vector128.UInt64"] = ExtractNarrowingLower_Vector128_UInt64, - ["ExtractVector64.Byte.1"] = ExtractVector64_Byte_1, - ["ExtractVector64.Int16.1"] = ExtractVector64_Int16_1, - ["ExtractVector64.Int32.1"] = ExtractVector64_Int32_1, - ["ExtractVector64.SByte.1"] = ExtractVector64_SByte_1, - ["ExtractVector64.Single.1"] = ExtractVector64_Single_1, - ["ExtractVector64.UInt16.1"] = ExtractVector64_UInt16_1, - ["ExtractVector64.UInt32.1"] = ExtractVector64_UInt32_1, - ["ExtractVector128.Byte.1"] = ExtractVector128_Byte_1, - ["ExtractVector128.Double.1"] = ExtractVector128_Double_1, - ["ExtractVector128.Int16.1"] = ExtractVector128_Int16_1, - ["ExtractVector128.Int32.1"] = ExtractVector128_Int32_1, - ["ExtractVector128.Int64.1"] = ExtractVector128_Int64_1, - ["ExtractVector128.SByte.1"] = ExtractVector128_SByte_1, - ["ExtractVector128.Single.1"] = ExtractVector128_Single_1, - ["ExtractVector128.UInt16.1"] = ExtractVector128_UInt16_1, - ["ExtractVector128.UInt32.1"] = ExtractVector128_UInt32_1, - ["ExtractVector128.UInt64.1"] = ExtractVector128_UInt64_1, - ["FusedAddHalving.Vector64.Byte"] = FusedAddHalving_Vector64_Byte, - ["FusedAddHalving.Vector64.Int16"] = FusedAddHalving_Vector64_Int16, - ["FusedAddHalving.Vector64.Int32"] = FusedAddHalving_Vector64_Int32, - ["FusedAddHalving.Vector64.SByte"] = FusedAddHalving_Vector64_SByte, - ["FusedAddHalving.Vector64.UInt16"] = FusedAddHalving_Vector64_UInt16, - ["FusedAddHalving.Vector64.UInt32"] = FusedAddHalving_Vector64_UInt32, - ["FusedAddHalving.Vector128.Byte"] = FusedAddHalving_Vector128_Byte, - ["FusedAddHalving.Vector128.Int16"] = FusedAddHalving_Vector128_Int16, - ["FusedAddHalving.Vector128.Int32"] = FusedAddHalving_Vector128_Int32, - ["FusedAddHalving.Vector128.SByte"] = FusedAddHalving_Vector128_SByte, - ["FusedAddHalving.Vector128.UInt16"] = FusedAddHalving_Vector128_UInt16, - ["FusedAddHalving.Vector128.UInt32"] = FusedAddHalving_Vector128_UInt32, - ["FusedAddRoundedHalving.Vector64.Byte"] = FusedAddRoundedHalving_Vector64_Byte, - ["FusedAddRoundedHalving.Vector64.Int16"] = FusedAddRoundedHalving_Vector64_Int16, - ["FusedAddRoundedHalving.Vector64.Int32"] = FusedAddRoundedHalving_Vector64_Int32, - ["FusedAddRoundedHalving.Vector64.SByte"] = FusedAddRoundedHalving_Vector64_SByte, - ["FusedAddRoundedHalving.Vector64.UInt16"] = FusedAddRoundedHalving_Vector64_UInt16, - ["FusedAddRoundedHalving.Vector64.UInt32"] = FusedAddRoundedHalving_Vector64_UInt32, - ["FusedAddRoundedHalving.Vector128.Byte"] = FusedAddRoundedHalving_Vector128_Byte, - ["FusedAddRoundedHalving.Vector128.Int16"] = FusedAddRoundedHalving_Vector128_Int16, - ["FusedAddRoundedHalving.Vector128.Int32"] = FusedAddRoundedHalving_Vector128_Int32, - ["FusedAddRoundedHalving.Vector128.SByte"] = FusedAddRoundedHalving_Vector128_SByte, - ["FusedAddRoundedHalving.Vector128.UInt16"] = FusedAddRoundedHalving_Vector128_UInt16, - ["FusedAddRoundedHalving.Vector128.UInt32"] = FusedAddRoundedHalving_Vector128_UInt32, - ["FusedMultiplyAdd.Vector64.Single"] = FusedMultiplyAdd_Vector64_Single, - ["FusedMultiplyAdd.Vector128.Single"] = FusedMultiplyAdd_Vector128_Single, - ["FusedMultiplyAddScalar.Vector64.Double"] = FusedMultiplyAddScalar_Vector64_Double, - ["FusedMultiplyAddScalar.Vector64.Single"] = FusedMultiplyAddScalar_Vector64_Single, - ["FusedMultiplyAddNegatedScalar.Vector64.Double"] = FusedMultiplyAddNegatedScalar_Vector64_Double, - ["FusedMultiplyAddNegatedScalar.Vector64.Single"] = FusedMultiplyAddNegatedScalar_Vector64_Single, - ["FusedMultiplySubtract.Vector64.Single"] = FusedMultiplySubtract_Vector64_Single, - ["FusedMultiplySubtract.Vector128.Single"] = FusedMultiplySubtract_Vector128_Single, - ["FusedMultiplySubtractScalar.Vector64.Double"] = FusedMultiplySubtractScalar_Vector64_Double, - ["FusedMultiplySubtractScalar.Vector64.Single"] = FusedMultiplySubtractScalar_Vector64_Single, - ["FusedMultiplySubtractNegatedScalar.Vector64.Double"] = FusedMultiplySubtractNegatedScalar_Vector64_Double, - ["FusedMultiplySubtractNegatedScalar.Vector64.Single"] = FusedMultiplySubtractNegatedScalar_Vector64_Single, - ["FusedSubtractHalving.Vector64.Byte"] = FusedSubtractHalving_Vector64_Byte, - ["FusedSubtractHalving.Vector64.Int16"] = FusedSubtractHalving_Vector64_Int16, - ["FusedSubtractHalving.Vector64.Int32"] = FusedSubtractHalving_Vector64_Int32, - ["FusedSubtractHalving.Vector64.SByte"] = FusedSubtractHalving_Vector64_SByte, - ["FusedSubtractHalving.Vector64.UInt16"] = FusedSubtractHalving_Vector64_UInt16, - ["FusedSubtractHalving.Vector64.UInt32"] = FusedSubtractHalving_Vector64_UInt32, - ["FusedSubtractHalving.Vector128.Byte"] = FusedSubtractHalving_Vector128_Byte, - ["FusedSubtractHalving.Vector128.Int16"] = FusedSubtractHalving_Vector128_Int16, - ["FusedSubtractHalving.Vector128.Int32"] = FusedSubtractHalving_Vector128_Int32, - ["FusedSubtractHalving.Vector128.SByte"] = FusedSubtractHalving_Vector128_SByte, - ["FusedSubtractHalving.Vector128.UInt16"] = FusedSubtractHalving_Vector128_UInt16, - ["FusedSubtractHalving.Vector128.UInt32"] = FusedSubtractHalving_Vector128_UInt32, - ["Insert.Vector64.Byte.1"] = Insert_Vector64_Byte_1, - ["Insert.Vector64.Int16.1"] = Insert_Vector64_Int16_1, - ["Insert.Vector64.Int32.1"] = Insert_Vector64_Int32_1, - ["Insert.Vector64.SByte.1"] = Insert_Vector64_SByte_1, - ["Insert.Vector64.Single.1"] = Insert_Vector64_Single_1, - ["Insert.Vector64.UInt16.1"] = Insert_Vector64_UInt16_1, - ["Insert.Vector64.UInt32.1"] = Insert_Vector64_UInt32_1, - ["Insert.Vector128.Byte.1"] = Insert_Vector128_Byte_1, - ["Insert.Vector128.Double.1"] = Insert_Vector128_Double_1, - ["Insert.Vector128.Int16.1"] = Insert_Vector128_Int16_1, - ["Insert.Vector128.Int32.1"] = Insert_Vector128_Int32_1, - ["Insert.Vector128.Int64.1"] = Insert_Vector128_Int64_1, - ["Insert.Vector128.SByte.1"] = Insert_Vector128_SByte_1, - ["Insert.Vector128.Single.1"] = Insert_Vector128_Single_1, - ["Insert.Vector128.UInt16.1"] = Insert_Vector128_UInt16_1, - ["Insert.Vector128.UInt32.1"] = Insert_Vector128_UInt32_1, - ["Insert.Vector128.UInt64.1"] = Insert_Vector128_UInt64_1, - ["LeadingSignCount.Vector64.Int16"] = LeadingSignCount_Vector64_Int16, - ["LeadingSignCount.Vector64.Int32"] = LeadingSignCount_Vector64_Int32, - ["LeadingSignCount.Vector64.SByte"] = LeadingSignCount_Vector64_SByte, - ["LeadingSignCount.Vector128.Int16"] = LeadingSignCount_Vector128_Int16, - ["LeadingSignCount.Vector128.Int32"] = LeadingSignCount_Vector128_Int32, - ["LeadingSignCount.Vector128.SByte"] = LeadingSignCount_Vector128_SByte, - ["LeadingZeroCount.Vector64.Byte"] = LeadingZeroCount_Vector64_Byte, - ["LeadingZeroCount.Vector64.Int16"] = LeadingZeroCount_Vector64_Int16, - ["LeadingZeroCount.Vector64.Int32"] = LeadingZeroCount_Vector64_Int32, - ["LeadingZeroCount.Vector64.SByte"] = LeadingZeroCount_Vector64_SByte, - ["LeadingZeroCount.Vector64.UInt16"] = LeadingZeroCount_Vector64_UInt16, - ["LeadingZeroCount.Vector64.UInt32"] = LeadingZeroCount_Vector64_UInt32, - ["LeadingZeroCount.Vector128.Byte"] = LeadingZeroCount_Vector128_Byte, - ["LeadingZeroCount.Vector128.Int16"] = LeadingZeroCount_Vector128_Int16, - ["LeadingZeroCount.Vector128.Int32"] = LeadingZeroCount_Vector128_Int32, - ["LeadingZeroCount.Vector128.SByte"] = LeadingZeroCount_Vector128_SByte, - }; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/Program.AdvSimd_Part2.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/Program.AdvSimd_Part2.cs deleted file mode 100644 index a0b06ed7d48c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/Program.AdvSimd_Part2.cs +++ /dev/null @@ -1,274 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - static Program() - { - TestList = new Dictionary() { - ["LeadingZeroCount.Vector128.UInt16"] = LeadingZeroCount_Vector128_UInt16, - ["LeadingZeroCount.Vector128.UInt32"] = LeadingZeroCount_Vector128_UInt32, - ["LoadAndInsertScalar.Vector64.Byte.7"] = LoadAndInsertScalar_Vector64_Byte_7, - ["LoadAndInsertScalar.Vector64.Int16.3"] = LoadAndInsertScalar_Vector64_Int16_3, - ["LoadAndInsertScalar.Vector64.Int32.1"] = LoadAndInsertScalar_Vector64_Int32_1, - ["LoadAndInsertScalar.Vector64.SByte.7"] = LoadAndInsertScalar_Vector64_SByte_7, - ["LoadAndInsertScalar.Vector64.Single.1"] = LoadAndInsertScalar_Vector64_Single_1, - ["LoadAndInsertScalar.Vector64.UInt16.3"] = LoadAndInsertScalar_Vector64_UInt16_3, - ["LoadAndInsertScalar.Vector64.UInt32.1"] = LoadAndInsertScalar_Vector64_UInt32_1, - ["LoadAndInsertScalar.Vector128.Byte.15"] = LoadAndInsertScalar_Vector128_Byte_15, - ["LoadAndInsertScalar.Vector128.Double.1"] = LoadAndInsertScalar_Vector128_Double_1, - ["LoadAndInsertScalar.Vector128.Int16.7"] = LoadAndInsertScalar_Vector128_Int16_7, - ["LoadAndInsertScalar.Vector128.Int32.3"] = LoadAndInsertScalar_Vector128_Int32_3, - ["LoadAndInsertScalar.Vector128.Int64.1"] = LoadAndInsertScalar_Vector128_Int64_1, - ["LoadAndInsertScalar.Vector128.SByte.15"] = LoadAndInsertScalar_Vector128_SByte_15, - ["LoadAndInsertScalar.Vector128.Single.3"] = LoadAndInsertScalar_Vector128_Single_3, - ["LoadAndInsertScalar.Vector128.UInt16.7"] = LoadAndInsertScalar_Vector128_UInt16_7, - ["LoadAndInsertScalar.Vector128.UInt32.3"] = LoadAndInsertScalar_Vector128_UInt32_3, - ["LoadAndInsertScalar.Vector128.UInt64.1"] = LoadAndInsertScalar_Vector128_UInt64_1, - ["LoadAndReplicateToVector64.Byte"] = LoadAndReplicateToVector64_Byte, - ["LoadAndReplicateToVector64.Int16"] = LoadAndReplicateToVector64_Int16, - ["LoadAndReplicateToVector64.Int32"] = LoadAndReplicateToVector64_Int32, - ["LoadAndReplicateToVector64.SByte"] = LoadAndReplicateToVector64_SByte, - ["LoadAndReplicateToVector64.Single"] = LoadAndReplicateToVector64_Single, - ["LoadAndReplicateToVector64.UInt16"] = LoadAndReplicateToVector64_UInt16, - ["LoadAndReplicateToVector64.UInt32"] = LoadAndReplicateToVector64_UInt32, - ["LoadAndReplicateToVector128.Byte"] = LoadAndReplicateToVector128_Byte, - ["LoadAndReplicateToVector128.Int16"] = LoadAndReplicateToVector128_Int16, - ["LoadAndReplicateToVector128.Int32"] = LoadAndReplicateToVector128_Int32, - ["LoadAndReplicateToVector128.SByte"] = LoadAndReplicateToVector128_SByte, - ["LoadAndReplicateToVector128.Single"] = LoadAndReplicateToVector128_Single, - ["LoadAndReplicateToVector128.UInt16"] = LoadAndReplicateToVector128_UInt16, - ["LoadAndReplicateToVector128.UInt32"] = LoadAndReplicateToVector128_UInt32, - ["LoadVector64.Byte"] = LoadVector64_Byte, - ["LoadVector64.Double"] = LoadVector64_Double, - ["LoadVector64.Int16"] = LoadVector64_Int16, - ["LoadVector64.Int32"] = LoadVector64_Int32, - ["LoadVector64.Int64"] = LoadVector64_Int64, - ["LoadVector64.SByte"] = LoadVector64_SByte, - ["LoadVector64.Single"] = LoadVector64_Single, - ["LoadVector64.UInt16"] = LoadVector64_UInt16, - ["LoadVector64.UInt32"] = LoadVector64_UInt32, - ["LoadVector64.UInt64"] = LoadVector64_UInt64, - ["LoadVector128.Byte"] = LoadVector128_Byte, - ["LoadVector128.Double"] = LoadVector128_Double, - ["LoadVector128.Int16"] = LoadVector128_Int16, - ["LoadVector128.Int32"] = LoadVector128_Int32, - ["LoadVector128.Int64"] = LoadVector128_Int64, - ["LoadVector128.SByte"] = LoadVector128_SByte, - ["LoadVector128.Single"] = LoadVector128_Single, - ["LoadVector128.UInt16"] = LoadVector128_UInt16, - ["LoadVector128.UInt32"] = LoadVector128_UInt32, - ["LoadVector128.UInt64"] = LoadVector128_UInt64, - ["Max.Vector64.Byte"] = Max_Vector64_Byte, - ["Max.Vector64.Int16"] = Max_Vector64_Int16, - ["Max.Vector64.Int32"] = Max_Vector64_Int32, - ["Max.Vector64.SByte"] = Max_Vector64_SByte, - ["Max.Vector64.Single"] = Max_Vector64_Single, - ["Max.Vector64.UInt16"] = Max_Vector64_UInt16, - ["Max.Vector64.UInt32"] = Max_Vector64_UInt32, - ["Max.Vector128.Byte"] = Max_Vector128_Byte, - ["Max.Vector128.Int16"] = Max_Vector128_Int16, - ["Max.Vector128.Int32"] = Max_Vector128_Int32, - ["Max.Vector128.SByte"] = Max_Vector128_SByte, - ["Max.Vector128.Single"] = Max_Vector128_Single, - ["Max.Vector128.UInt16"] = Max_Vector128_UInt16, - ["Max.Vector128.UInt32"] = Max_Vector128_UInt32, - ["MaxNumber.Vector64.Single"] = MaxNumber_Vector64_Single, - ["MaxNumber.Vector128.Single"] = MaxNumber_Vector128_Single, - ["MaxNumberScalar.Vector64.Double"] = MaxNumberScalar_Vector64_Double, - ["MaxNumberScalar.Vector64.Single"] = MaxNumberScalar_Vector64_Single, - ["MaxPairwise.Vector64.Byte"] = MaxPairwise_Vector64_Byte, - ["MaxPairwise.Vector64.Int16"] = MaxPairwise_Vector64_Int16, - ["MaxPairwise.Vector64.Int32"] = MaxPairwise_Vector64_Int32, - ["MaxPairwise.Vector64.SByte"] = MaxPairwise_Vector64_SByte, - ["MaxPairwise.Vector64.Single"] = MaxPairwise_Vector64_Single, - ["MaxPairwise.Vector64.UInt16"] = MaxPairwise_Vector64_UInt16, - ["MaxPairwise.Vector64.UInt32"] = MaxPairwise_Vector64_UInt32, - ["Min.Vector64.Byte"] = Min_Vector64_Byte, - ["Min.Vector64.Int16"] = Min_Vector64_Int16, - ["Min.Vector64.Int32"] = Min_Vector64_Int32, - ["Min.Vector64.SByte"] = Min_Vector64_SByte, - ["Min.Vector64.Single"] = Min_Vector64_Single, - ["Min.Vector64.UInt16"] = Min_Vector64_UInt16, - ["Min.Vector64.UInt32"] = Min_Vector64_UInt32, - ["Min.Vector128.Byte"] = Min_Vector128_Byte, - ["Min.Vector128.Int16"] = Min_Vector128_Int16, - ["Min.Vector128.Int32"] = Min_Vector128_Int32, - ["Min.Vector128.SByte"] = Min_Vector128_SByte, - ["Min.Vector128.Single"] = Min_Vector128_Single, - ["Min.Vector128.UInt16"] = Min_Vector128_UInt16, - ["Min.Vector128.UInt32"] = Min_Vector128_UInt32, - ["MinNumber.Vector64.Single"] = MinNumber_Vector64_Single, - ["MinNumber.Vector128.Single"] = MinNumber_Vector128_Single, - ["MinNumberScalar.Vector64.Double"] = MinNumberScalar_Vector64_Double, - ["MinNumberScalar.Vector64.Single"] = MinNumberScalar_Vector64_Single, - ["MinPairwise.Vector64.Byte"] = MinPairwise_Vector64_Byte, - ["MinPairwise.Vector64.Int16"] = MinPairwise_Vector64_Int16, - ["MinPairwise.Vector64.Int32"] = MinPairwise_Vector64_Int32, - ["MinPairwise.Vector64.SByte"] = MinPairwise_Vector64_SByte, - ["MinPairwise.Vector64.Single"] = MinPairwise_Vector64_Single, - ["MinPairwise.Vector64.UInt16"] = MinPairwise_Vector64_UInt16, - ["MinPairwise.Vector64.UInt32"] = MinPairwise_Vector64_UInt32, - ["Multiply.Vector64.Byte"] = Multiply_Vector64_Byte, - ["Multiply.Vector64.Int16"] = Multiply_Vector64_Int16, - ["Multiply.Vector64.Int32"] = Multiply_Vector64_Int32, - ["Multiply.Vector64.SByte"] = Multiply_Vector64_SByte, - ["Multiply.Vector64.Single"] = Multiply_Vector64_Single, - ["Multiply.Vector64.UInt16"] = Multiply_Vector64_UInt16, - ["Multiply.Vector64.UInt32"] = Multiply_Vector64_UInt32, - ["Multiply.Vector128.Byte"] = Multiply_Vector128_Byte, - ["Multiply.Vector128.Int16"] = Multiply_Vector128_Int16, - ["Multiply.Vector128.Int32"] = Multiply_Vector128_Int32, - ["Multiply.Vector128.SByte"] = Multiply_Vector128_SByte, - ["Multiply.Vector128.Single"] = Multiply_Vector128_Single, - ["Multiply.Vector128.UInt16"] = Multiply_Vector128_UInt16, - ["Multiply.Vector128.UInt32"] = Multiply_Vector128_UInt32, - ["MultiplyScalar.Vector64.Double"] = MultiplyScalar_Vector64_Double, - ["MultiplyScalar.Vector64.Single"] = MultiplyScalar_Vector64_Single, - ["MultiplyAdd.Vector64.Byte"] = MultiplyAdd_Vector64_Byte, - ["MultiplyAdd.Vector64.Int16"] = MultiplyAdd_Vector64_Int16, - ["MultiplyAdd.Vector64.Int32"] = MultiplyAdd_Vector64_Int32, - ["MultiplyAdd.Vector64.SByte"] = MultiplyAdd_Vector64_SByte, - ["MultiplyAdd.Vector64.UInt16"] = MultiplyAdd_Vector64_UInt16, - ["MultiplyAdd.Vector64.UInt32"] = MultiplyAdd_Vector64_UInt32, - ["MultiplyAdd.Vector128.Byte"] = MultiplyAdd_Vector128_Byte, - ["MultiplyAdd.Vector128.Int16"] = MultiplyAdd_Vector128_Int16, - ["MultiplyAdd.Vector128.Int32"] = MultiplyAdd_Vector128_Int32, - ["MultiplyAdd.Vector128.SByte"] = MultiplyAdd_Vector128_SByte, - ["MultiplyAdd.Vector128.UInt16"] = MultiplyAdd_Vector128_UInt16, - ["MultiplyAdd.Vector128.UInt32"] = MultiplyAdd_Vector128_UInt32, - ["MultiplyAddByScalar.Vector64.Int16"] = MultiplyAddByScalar_Vector64_Int16, - ["MultiplyAddByScalar.Vector64.Int32"] = MultiplyAddByScalar_Vector64_Int32, - ["MultiplyAddByScalar.Vector64.UInt16"] = MultiplyAddByScalar_Vector64_UInt16, - ["MultiplyAddByScalar.Vector64.UInt32"] = MultiplyAddByScalar_Vector64_UInt32, - ["MultiplyAddByScalar.Vector128.Int16"] = MultiplyAddByScalar_Vector128_Int16, - ["MultiplyAddByScalar.Vector128.Int32"] = MultiplyAddByScalar_Vector128_Int32, - ["MultiplyAddByScalar.Vector128.UInt16"] = MultiplyAddByScalar_Vector128_UInt16, - ["MultiplyAddByScalar.Vector128.UInt32"] = MultiplyAddByScalar_Vector128_UInt32, - ["MultiplyAddBySelectedScalar.Vector64.Int16.Vector64.Int16.3"] = MultiplyAddBySelectedScalar_Vector64_Int16_Vector64_Int16_3, - ["MultiplyAddBySelectedScalar.Vector64.Int16.Vector128.Int16.7"] = MultiplyAddBySelectedScalar_Vector64_Int16_Vector128_Int16_7, - ["MultiplyAddBySelectedScalar.Vector64.Int32.Vector64.Int32.1"] = MultiplyAddBySelectedScalar_Vector64_Int32_Vector64_Int32_1, - ["MultiplyAddBySelectedScalar.Vector64.Int32.Vector128.Int32.3"] = MultiplyAddBySelectedScalar_Vector64_Int32_Vector128_Int32_3, - ["MultiplyAddBySelectedScalar.Vector64.UInt16.Vector64.UInt16.3"] = MultiplyAddBySelectedScalar_Vector64_UInt16_Vector64_UInt16_3, - ["MultiplyAddBySelectedScalar.Vector64.UInt16.Vector128.UInt16.7"] = MultiplyAddBySelectedScalar_Vector64_UInt16_Vector128_UInt16_7, - ["MultiplyAddBySelectedScalar.Vector64.UInt32.Vector64.UInt32.1"] = MultiplyAddBySelectedScalar_Vector64_UInt32_Vector64_UInt32_1, - ["MultiplyAddBySelectedScalar.Vector64.UInt32.Vector128.UInt32.3"] = MultiplyAddBySelectedScalar_Vector64_UInt32_Vector128_UInt32_3, - ["MultiplyAddBySelectedScalar.Vector128.Int16.Vector64.Int16.3"] = MultiplyAddBySelectedScalar_Vector128_Int16_Vector64_Int16_3, - ["MultiplyAddBySelectedScalar.Vector128.Int16.Vector128.Int16.7"] = MultiplyAddBySelectedScalar_Vector128_Int16_Vector128_Int16_7, - ["MultiplyAddBySelectedScalar.Vector128.Int32.Vector64.Int32.1"] = MultiplyAddBySelectedScalar_Vector128_Int32_Vector64_Int32_1, - ["MultiplyAddBySelectedScalar.Vector128.Int32.Vector128.Int32.3"] = MultiplyAddBySelectedScalar_Vector128_Int32_Vector128_Int32_3, - ["MultiplyAddBySelectedScalar.Vector128.UInt16.Vector64.UInt16.3"] = MultiplyAddBySelectedScalar_Vector128_UInt16_Vector64_UInt16_3, - ["MultiplyAddBySelectedScalar.Vector128.UInt16.Vector128.UInt16.7"] = MultiplyAddBySelectedScalar_Vector128_UInt16_Vector128_UInt16_7, - ["MultiplyAddBySelectedScalar.Vector128.UInt32.Vector64.UInt32.1"] = MultiplyAddBySelectedScalar_Vector128_UInt32_Vector64_UInt32_1, - ["MultiplyAddBySelectedScalar.Vector128.UInt32.Vector128.UInt32.3"] = MultiplyAddBySelectedScalar_Vector128_UInt32_Vector128_UInt32_3, - ["MultiplyByScalar.Vector64.Int16"] = MultiplyByScalar_Vector64_Int16, - ["MultiplyByScalar.Vector64.Int32"] = MultiplyByScalar_Vector64_Int32, - ["MultiplyByScalar.Vector64.Single"] = MultiplyByScalar_Vector64_Single, - ["MultiplyByScalar.Vector64.UInt16"] = MultiplyByScalar_Vector64_UInt16, - ["MultiplyByScalar.Vector64.UInt32"] = MultiplyByScalar_Vector64_UInt32, - ["MultiplyByScalar.Vector128.Int16"] = MultiplyByScalar_Vector128_Int16, - ["MultiplyByScalar.Vector128.Int32"] = MultiplyByScalar_Vector128_Int32, - ["MultiplyByScalar.Vector128.Single"] = MultiplyByScalar_Vector128_Single, - ["MultiplyByScalar.Vector128.UInt16"] = MultiplyByScalar_Vector128_UInt16, - ["MultiplyByScalar.Vector128.UInt32"] = MultiplyByScalar_Vector128_UInt32, - ["MultiplyBySelectedScalar.Vector64.Int16.Vector64.Int16.1"] = MultiplyBySelectedScalar_Vector64_Int16_Vector64_Int16_1, - ["MultiplyBySelectedScalar.Vector64.Int16.Vector128.Int16.7"] = MultiplyBySelectedScalar_Vector64_Int16_Vector128_Int16_7, - ["MultiplyBySelectedScalar.Vector64.Int32.Vector64.Int32.1"] = MultiplyBySelectedScalar_Vector64_Int32_Vector64_Int32_1, - ["MultiplyBySelectedScalar.Vector64.Int32.Vector128.Int32.3"] = MultiplyBySelectedScalar_Vector64_Int32_Vector128_Int32_3, - ["MultiplyBySelectedScalar.Vector64.Single.Vector64.Single.1"] = MultiplyBySelectedScalar_Vector64_Single_Vector64_Single_1, - ["MultiplyBySelectedScalar.Vector64.Single.Vector128.Single.3"] = MultiplyBySelectedScalar_Vector64_Single_Vector128_Single_3, - ["MultiplyBySelectedScalar.Vector64.UInt16.Vector64.UInt16.1"] = MultiplyBySelectedScalar_Vector64_UInt16_Vector64_UInt16_1, - ["MultiplyBySelectedScalar.Vector64.UInt16.Vector128.UInt16.7"] = MultiplyBySelectedScalar_Vector64_UInt16_Vector128_UInt16_7, - ["MultiplyBySelectedScalar.Vector64.UInt32.Vector64.UInt32.1"] = MultiplyBySelectedScalar_Vector64_UInt32_Vector64_UInt32_1, - ["MultiplyBySelectedScalar.Vector64.UInt32.Vector128.UInt32.3"] = MultiplyBySelectedScalar_Vector64_UInt32_Vector128_UInt32_3, - ["MultiplyBySelectedScalar.Vector128.Int16.Vector64.Int16.1"] = MultiplyBySelectedScalar_Vector128_Int16_Vector64_Int16_1, - ["MultiplyBySelectedScalar.Vector128.Int16.Vector128.Int16.7"] = MultiplyBySelectedScalar_Vector128_Int16_Vector128_Int16_7, - ["MultiplyBySelectedScalar.Vector128.Int32.Vector64.Int32.1"] = MultiplyBySelectedScalar_Vector128_Int32_Vector64_Int32_1, - ["MultiplyBySelectedScalar.Vector128.Int32.Vector128.Int32.3"] = MultiplyBySelectedScalar_Vector128_Int32_Vector128_Int32_3, - ["MultiplyBySelectedScalar.Vector128.Single.Vector64.Single.1"] = MultiplyBySelectedScalar_Vector128_Single_Vector64_Single_1, - ["MultiplyBySelectedScalar.Vector128.Single.Vector128.Single.3"] = MultiplyBySelectedScalar_Vector128_Single_Vector128_Single_3, - ["MultiplyBySelectedScalar.Vector128.UInt16.Vector64.UInt16.1"] = MultiplyBySelectedScalar_Vector128_UInt16_Vector64_UInt16_1, - ["MultiplyBySelectedScalar.Vector128.UInt16.Vector128.UInt16.7"] = MultiplyBySelectedScalar_Vector128_UInt16_Vector128_UInt16_7, - ["MultiplyBySelectedScalar.Vector128.UInt32.Vector64.UInt32.1"] = MultiplyBySelectedScalar_Vector128_UInt32_Vector64_UInt32_1, - ["MultiplyBySelectedScalar.Vector128.UInt32.Vector128.UInt32.3"] = MultiplyBySelectedScalar_Vector128_UInt32_Vector128_UInt32_3, - ["MultiplyBySelectedScalarWideningLower.Vector64.Int16.Vector64.Int16.3"] = MultiplyBySelectedScalarWideningLower_Vector64_Int16_Vector64_Int16_3, - ["MultiplyBySelectedScalarWideningLower.Vector64.Int16.Vector128.Int16.7"] = MultiplyBySelectedScalarWideningLower_Vector64_Int16_Vector128_Int16_7, - ["MultiplyBySelectedScalarWideningLower.Vector64.Int32.Vector64.Int32.1"] = MultiplyBySelectedScalarWideningLower_Vector64_Int32_Vector64_Int32_1, - ["MultiplyBySelectedScalarWideningLower.Vector64.Int32.Vector128.Int32.3"] = MultiplyBySelectedScalarWideningLower_Vector64_Int32_Vector128_Int32_3, - ["MultiplyBySelectedScalarWideningLower.Vector64.UInt16.Vector64.UInt16.3"] = MultiplyBySelectedScalarWideningLower_Vector64_UInt16_Vector64_UInt16_3, - ["MultiplyBySelectedScalarWideningLower.Vector64.UInt16.Vector128.UInt16.7"] = MultiplyBySelectedScalarWideningLower_Vector64_UInt16_Vector128_UInt16_7, - ["MultiplyBySelectedScalarWideningLower.Vector64.UInt32.Vector64.UInt32.1"] = MultiplyBySelectedScalarWideningLower_Vector64_UInt32_Vector64_UInt32_1, - ["MultiplyBySelectedScalarWideningLower.Vector64.UInt32.Vector128.UInt32.3"] = MultiplyBySelectedScalarWideningLower_Vector64_UInt32_Vector128_UInt32_3, - ["MultiplyBySelectedScalarWideningLowerAndAdd.Vector64.Int16.Vector64.Int16.3"] = MultiplyBySelectedScalarWideningLowerAndAdd_Vector64_Int16_Vector64_Int16_3, - ["MultiplyBySelectedScalarWideningLowerAndAdd.Vector64.Int16.Vector128.Int16.7"] = MultiplyBySelectedScalarWideningLowerAndAdd_Vector64_Int16_Vector128_Int16_7, - ["MultiplyBySelectedScalarWideningLowerAndAdd.Vector64.Int32.Vector64.Int32.1"] = MultiplyBySelectedScalarWideningLowerAndAdd_Vector64_Int32_Vector64_Int32_1, - ["MultiplyBySelectedScalarWideningLowerAndAdd.Vector64.Int32.Vector128.Int32.3"] = MultiplyBySelectedScalarWideningLowerAndAdd_Vector64_Int32_Vector128_Int32_3, - ["MultiplyBySelectedScalarWideningLowerAndAdd.Vector64.UInt16.Vector64.UInt16.3"] = MultiplyBySelectedScalarWideningLowerAndAdd_Vector64_UInt16_Vector64_UInt16_3, - ["MultiplyBySelectedScalarWideningLowerAndAdd.Vector64.UInt16.Vector128.UInt16.7"] = MultiplyBySelectedScalarWideningLowerAndAdd_Vector64_UInt16_Vector128_UInt16_7, - ["MultiplyBySelectedScalarWideningLowerAndAdd.Vector64.UInt32.Vector64.UInt32.1"] = MultiplyBySelectedScalarWideningLowerAndAdd_Vector64_UInt32_Vector64_UInt32_1, - ["MultiplyBySelectedScalarWideningLowerAndAdd.Vector64.UInt32.Vector128.UInt32.3"] = MultiplyBySelectedScalarWideningLowerAndAdd_Vector64_UInt32_Vector128_UInt32_3, - ["MultiplyBySelectedScalarWideningLowerAndSubtract.Vector64.Int16.Vector64.Int16.3"] = MultiplyBySelectedScalarWideningLowerAndSubtract_Vector64_Int16_Vector64_Int16_3, - ["MultiplyBySelectedScalarWideningLowerAndSubtract.Vector64.Int16.Vector128.Int16.7"] = MultiplyBySelectedScalarWideningLowerAndSubtract_Vector64_Int16_Vector128_Int16_7, - ["MultiplyBySelectedScalarWideningLowerAndSubtract.Vector64.Int32.Vector64.Int32.1"] = MultiplyBySelectedScalarWideningLowerAndSubtract_Vector64_Int32_Vector64_Int32_1, - ["MultiplyBySelectedScalarWideningLowerAndSubtract.Vector64.Int32.Vector128.Int32.3"] = MultiplyBySelectedScalarWideningLowerAndSubtract_Vector64_Int32_Vector128_Int32_3, - ["MultiplyBySelectedScalarWideningLowerAndSubtract.Vector64.UInt16.Vector64.UInt16.3"] = MultiplyBySelectedScalarWideningLowerAndSubtract_Vector64_UInt16_Vector64_UInt16_3, - ["MultiplyBySelectedScalarWideningLowerAndSubtract.Vector64.UInt16.Vector128.UInt16.7"] = MultiplyBySelectedScalarWideningLowerAndSubtract_Vector64_UInt16_Vector128_UInt16_7, - ["MultiplyBySelectedScalarWideningLowerAndSubtract.Vector64.UInt32.Vector64.UInt32.1"] = MultiplyBySelectedScalarWideningLowerAndSubtract_Vector64_UInt32_Vector64_UInt32_1, - ["MultiplyBySelectedScalarWideningLowerAndSubtract.Vector64.UInt32.Vector128.UInt32.3"] = MultiplyBySelectedScalarWideningLowerAndSubtract_Vector64_UInt32_Vector128_UInt32_3, - ["MultiplyBySelectedScalarWideningUpper.Vector128.Int16.Vector64.Int16.3"] = MultiplyBySelectedScalarWideningUpper_Vector128_Int16_Vector64_Int16_3, - ["MultiplyBySelectedScalarWideningUpper.Vector128.Int16.Vector128.Int16.7"] = MultiplyBySelectedScalarWideningUpper_Vector128_Int16_Vector128_Int16_7, - ["MultiplyBySelectedScalarWideningUpper.Vector128.Int32.Vector64.Int32.1"] = MultiplyBySelectedScalarWideningUpper_Vector128_Int32_Vector64_Int32_1, - ["MultiplyBySelectedScalarWideningUpper.Vector128.Int32.Vector128.Int32.3"] = MultiplyBySelectedScalarWideningUpper_Vector128_Int32_Vector128_Int32_3, - ["MultiplyBySelectedScalarWideningUpper.Vector128.UInt16.Vector64.UInt16.3"] = MultiplyBySelectedScalarWideningUpper_Vector128_UInt16_Vector64_UInt16_3, - ["MultiplyBySelectedScalarWideningUpper.Vector128.UInt16.Vector128.UInt16.7"] = MultiplyBySelectedScalarWideningUpper_Vector128_UInt16_Vector128_UInt16_7, - ["MultiplyBySelectedScalarWideningUpper.Vector128.UInt32.Vector64.UInt32.1"] = MultiplyBySelectedScalarWideningUpper_Vector128_UInt32_Vector64_UInt32_1, - ["MultiplyBySelectedScalarWideningUpper.Vector128.UInt32.Vector128.UInt32.3"] = MultiplyBySelectedScalarWideningUpper_Vector128_UInt32_Vector128_UInt32_3, - ["MultiplyBySelectedScalarWideningUpperAndAdd.Vector128.Int16.Vector64.Int16.3"] = MultiplyBySelectedScalarWideningUpperAndAdd_Vector128_Int16_Vector64_Int16_3, - ["MultiplyBySelectedScalarWideningUpperAndAdd.Vector128.Int16.Vector128.Int16.7"] = MultiplyBySelectedScalarWideningUpperAndAdd_Vector128_Int16_Vector128_Int16_7, - ["MultiplyBySelectedScalarWideningUpperAndAdd.Vector128.Int32.Vector64.Int32.1"] = MultiplyBySelectedScalarWideningUpperAndAdd_Vector128_Int32_Vector64_Int32_1, - ["MultiplyBySelectedScalarWideningUpperAndAdd.Vector128.Int32.Vector128.Int32.3"] = MultiplyBySelectedScalarWideningUpperAndAdd_Vector128_Int32_Vector128_Int32_3, - ["MultiplyBySelectedScalarWideningUpperAndAdd.Vector128.UInt16.Vector64.UInt16.3"] = MultiplyBySelectedScalarWideningUpperAndAdd_Vector128_UInt16_Vector64_UInt16_3, - ["MultiplyBySelectedScalarWideningUpperAndAdd.Vector128.UInt16.Vector128.UInt16.7"] = MultiplyBySelectedScalarWideningUpperAndAdd_Vector128_UInt16_Vector128_UInt16_7, - ["MultiplyBySelectedScalarWideningUpperAndAdd.Vector128.UInt32.Vector64.UInt32.1"] = MultiplyBySelectedScalarWideningUpperAndAdd_Vector128_UInt32_Vector64_UInt32_1, - ["MultiplyBySelectedScalarWideningUpperAndAdd.Vector128.UInt32.Vector128.UInt32.3"] = MultiplyBySelectedScalarWideningUpperAndAdd_Vector128_UInt32_Vector128_UInt32_3, - ["MultiplyBySelectedScalarWideningUpperAndSubtract.Vector128.Int16.Vector64.Int16.3"] = MultiplyBySelectedScalarWideningUpperAndSubtract_Vector128_Int16_Vector64_Int16_3, - ["MultiplyBySelectedScalarWideningUpperAndSubtract.Vector128.Int16.Vector128.Int16.7"] = MultiplyBySelectedScalarWideningUpperAndSubtract_Vector128_Int16_Vector128_Int16_7, - ["MultiplyBySelectedScalarWideningUpperAndSubtract.Vector128.Int32.Vector64.Int32.1"] = MultiplyBySelectedScalarWideningUpperAndSubtract_Vector128_Int32_Vector64_Int32_1, - ["MultiplyBySelectedScalarWideningUpperAndSubtract.Vector128.Int32.Vector128.Int32.3"] = MultiplyBySelectedScalarWideningUpperAndSubtract_Vector128_Int32_Vector128_Int32_3, - ["MultiplyBySelectedScalarWideningUpperAndSubtract.Vector128.UInt16.Vector64.UInt16.3"] = MultiplyBySelectedScalarWideningUpperAndSubtract_Vector128_UInt16_Vector64_UInt16_3, - ["MultiplyBySelectedScalarWideningUpperAndSubtract.Vector128.UInt16.Vector128.UInt16.7"] = MultiplyBySelectedScalarWideningUpperAndSubtract_Vector128_UInt16_Vector128_UInt16_7, - ["MultiplyBySelectedScalarWideningUpperAndSubtract.Vector128.UInt32.Vector64.UInt32.1"] = MultiplyBySelectedScalarWideningUpperAndSubtract_Vector128_UInt32_Vector64_UInt32_1, - ["MultiplyBySelectedScalarWideningUpperAndSubtract.Vector128.UInt32.Vector128.UInt32.3"] = MultiplyBySelectedScalarWideningUpperAndSubtract_Vector128_UInt32_Vector128_UInt32_3, - ["MultiplyScalarBySelectedScalar.Vector64.Single.Vector64.Single.1"] = MultiplyScalarBySelectedScalar_Vector64_Single_Vector64_Single_1, - ["MultiplyScalarBySelectedScalar.Vector64.Single.Vector128.Single.3"] = MultiplyScalarBySelectedScalar_Vector64_Single_Vector128_Single_3, - ["MultiplySubtract.Vector64.Byte"] = MultiplySubtract_Vector64_Byte, - ["MultiplySubtract.Vector64.Int16"] = MultiplySubtract_Vector64_Int16, - ["MultiplySubtract.Vector64.Int32"] = MultiplySubtract_Vector64_Int32, - ["MultiplySubtract.Vector64.SByte"] = MultiplySubtract_Vector64_SByte, - ["MultiplySubtract.Vector64.UInt16"] = MultiplySubtract_Vector64_UInt16, - ["MultiplySubtract.Vector64.UInt32"] = MultiplySubtract_Vector64_UInt32, - ["MultiplySubtract.Vector128.Byte"] = MultiplySubtract_Vector128_Byte, - ["MultiplySubtract.Vector128.Int16"] = MultiplySubtract_Vector128_Int16, - ["MultiplySubtract.Vector128.Int32"] = MultiplySubtract_Vector128_Int32, - ["MultiplySubtract.Vector128.SByte"] = MultiplySubtract_Vector128_SByte, - ["MultiplySubtract.Vector128.UInt16"] = MultiplySubtract_Vector128_UInt16, - ["MultiplySubtract.Vector128.UInt32"] = MultiplySubtract_Vector128_UInt32, - ["MultiplySubtractBySelectedScalar.Vector64.Int16.Vector64.Int16.3"] = MultiplySubtractBySelectedScalar_Vector64_Int16_Vector64_Int16_3, - ["MultiplySubtractBySelectedScalar.Vector64.Int16.Vector128.Int16.7"] = MultiplySubtractBySelectedScalar_Vector64_Int16_Vector128_Int16_7, - ["MultiplySubtractBySelectedScalar.Vector64.Int32.Vector64.Int32.1"] = MultiplySubtractBySelectedScalar_Vector64_Int32_Vector64_Int32_1, - ["MultiplySubtractBySelectedScalar.Vector64.Int32.Vector128.Int32.3"] = MultiplySubtractBySelectedScalar_Vector64_Int32_Vector128_Int32_3, - ["MultiplySubtractBySelectedScalar.Vector64.UInt16.Vector64.UInt16.3"] = MultiplySubtractBySelectedScalar_Vector64_UInt16_Vector64_UInt16_3, - ["MultiplySubtractBySelectedScalar.Vector64.UInt16.Vector128.UInt16.7"] = MultiplySubtractBySelectedScalar_Vector64_UInt16_Vector128_UInt16_7, - ["MultiplySubtractBySelectedScalar.Vector64.UInt32.Vector64.UInt32.1"] = MultiplySubtractBySelectedScalar_Vector64_UInt32_Vector64_UInt32_1, - ["MultiplySubtractBySelectedScalar.Vector64.UInt32.Vector128.UInt32.3"] = MultiplySubtractBySelectedScalar_Vector64_UInt32_Vector128_UInt32_3, - ["MultiplySubtractBySelectedScalar.Vector128.Int16.Vector64.Int16.3"] = MultiplySubtractBySelectedScalar_Vector128_Int16_Vector64_Int16_3, - }; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/Program.AdvSimd_Part3.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/Program.AdvSimd_Part3.cs deleted file mode 100644 index 03bc7e381aee..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/Program.AdvSimd_Part3.cs +++ /dev/null @@ -1,274 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - static Program() - { - TestList = new Dictionary() { - ["MultiplySubtractBySelectedScalar.Vector128.Int16.Vector128.Int16.7"] = MultiplySubtractBySelectedScalar_Vector128_Int16_Vector128_Int16_7, - ["MultiplySubtractBySelectedScalar.Vector128.Int32.Vector64.Int32.1"] = MultiplySubtractBySelectedScalar_Vector128_Int32_Vector64_Int32_1, - ["MultiplySubtractBySelectedScalar.Vector128.Int32.Vector128.Int32.3"] = MultiplySubtractBySelectedScalar_Vector128_Int32_Vector128_Int32_3, - ["MultiplySubtractBySelectedScalar.Vector128.UInt16.Vector64.UInt16.3"] = MultiplySubtractBySelectedScalar_Vector128_UInt16_Vector64_UInt16_3, - ["MultiplySubtractBySelectedScalar.Vector128.UInt16.Vector128.UInt16.7"] = MultiplySubtractBySelectedScalar_Vector128_UInt16_Vector128_UInt16_7, - ["MultiplySubtractBySelectedScalar.Vector128.UInt32.Vector64.UInt32.1"] = MultiplySubtractBySelectedScalar_Vector128_UInt32_Vector64_UInt32_1, - ["MultiplySubtractBySelectedScalar.Vector128.UInt32.Vector128.UInt32.3"] = MultiplySubtractBySelectedScalar_Vector128_UInt32_Vector128_UInt32_3, - ["MultiplySubtractByScalar.Vector64.Int16"] = MultiplySubtractByScalar_Vector64_Int16, - ["MultiplySubtractByScalar.Vector64.Int32"] = MultiplySubtractByScalar_Vector64_Int32, - ["MultiplySubtractByScalar.Vector64.UInt16"] = MultiplySubtractByScalar_Vector64_UInt16, - ["MultiplySubtractByScalar.Vector64.UInt32"] = MultiplySubtractByScalar_Vector64_UInt32, - ["MultiplySubtractByScalar.Vector128.Int16"] = MultiplySubtractByScalar_Vector128_Int16, - ["MultiplySubtractByScalar.Vector128.Int32"] = MultiplySubtractByScalar_Vector128_Int32, - ["MultiplySubtractByScalar.Vector128.UInt16"] = MultiplySubtractByScalar_Vector128_UInt16, - ["MultiplySubtractByScalar.Vector128.UInt32"] = MultiplySubtractByScalar_Vector128_UInt32, - ["MultiplyWideningLower.Vector64.Byte"] = MultiplyWideningLower_Vector64_Byte, - ["MultiplyWideningLower.Vector64.Int16"] = MultiplyWideningLower_Vector64_Int16, - ["MultiplyWideningLower.Vector64.Int32"] = MultiplyWideningLower_Vector64_Int32, - ["MultiplyWideningLower.Vector64.SByte"] = MultiplyWideningLower_Vector64_SByte, - ["MultiplyWideningLower.Vector64.UInt16"] = MultiplyWideningLower_Vector64_UInt16, - ["MultiplyWideningLower.Vector64.UInt32"] = MultiplyWideningLower_Vector64_UInt32, - ["MultiplyWideningLowerAndAdd.Vector64.Byte"] = MultiplyWideningLowerAndAdd_Vector64_Byte, - ["MultiplyWideningLowerAndAdd.Vector64.Int16"] = MultiplyWideningLowerAndAdd_Vector64_Int16, - ["MultiplyWideningLowerAndAdd.Vector64.Int32"] = MultiplyWideningLowerAndAdd_Vector64_Int32, - ["MultiplyWideningLowerAndAdd.Vector64.SByte"] = MultiplyWideningLowerAndAdd_Vector64_SByte, - ["MultiplyWideningLowerAndAdd.Vector64.UInt16"] = MultiplyWideningLowerAndAdd_Vector64_UInt16, - ["MultiplyWideningLowerAndAdd.Vector64.UInt32"] = MultiplyWideningLowerAndAdd_Vector64_UInt32, - ["MultiplyWideningLowerAndSubtract.Vector64.Byte"] = MultiplyWideningLowerAndSubtract_Vector64_Byte, - ["MultiplyWideningLowerAndSubtract.Vector64.Int16"] = MultiplyWideningLowerAndSubtract_Vector64_Int16, - ["MultiplyWideningLowerAndSubtract.Vector64.Int32"] = MultiplyWideningLowerAndSubtract_Vector64_Int32, - ["MultiplyWideningLowerAndSubtract.Vector64.SByte"] = MultiplyWideningLowerAndSubtract_Vector64_SByte, - ["MultiplyWideningLowerAndSubtract.Vector64.UInt16"] = MultiplyWideningLowerAndSubtract_Vector64_UInt16, - ["MultiplyWideningLowerAndSubtract.Vector64.UInt32"] = MultiplyWideningLowerAndSubtract_Vector64_UInt32, - ["MultiplyWideningUpper.Vector128.Byte"] = MultiplyWideningUpper_Vector128_Byte, - ["MultiplyWideningUpper.Vector128.Int16"] = MultiplyWideningUpper_Vector128_Int16, - ["MultiplyWideningUpper.Vector128.Int32"] = MultiplyWideningUpper_Vector128_Int32, - ["MultiplyWideningUpper.Vector128.SByte"] = MultiplyWideningUpper_Vector128_SByte, - ["MultiplyWideningUpper.Vector128.UInt16"] = MultiplyWideningUpper_Vector128_UInt16, - ["MultiplyWideningUpper.Vector128.UInt32"] = MultiplyWideningUpper_Vector128_UInt32, - ["MultiplyWideningUpperAndAdd.Vector128.Byte"] = MultiplyWideningUpperAndAdd_Vector128_Byte, - ["MultiplyWideningUpperAndAdd.Vector128.Int16"] = MultiplyWideningUpperAndAdd_Vector128_Int16, - ["MultiplyWideningUpperAndAdd.Vector128.Int32"] = MultiplyWideningUpperAndAdd_Vector128_Int32, - ["MultiplyWideningUpperAndAdd.Vector128.SByte"] = MultiplyWideningUpperAndAdd_Vector128_SByte, - ["MultiplyWideningUpperAndAdd.Vector128.UInt16"] = MultiplyWideningUpperAndAdd_Vector128_UInt16, - ["MultiplyWideningUpperAndAdd.Vector128.UInt32"] = MultiplyWideningUpperAndAdd_Vector128_UInt32, - ["MultiplyWideningUpperAndSubtract.Vector128.Byte"] = MultiplyWideningUpperAndSubtract_Vector128_Byte, - ["MultiplyWideningUpperAndSubtract.Vector128.Int16"] = MultiplyWideningUpperAndSubtract_Vector128_Int16, - ["MultiplyWideningUpperAndSubtract.Vector128.Int32"] = MultiplyWideningUpperAndSubtract_Vector128_Int32, - ["MultiplyWideningUpperAndSubtract.Vector128.SByte"] = MultiplyWideningUpperAndSubtract_Vector128_SByte, - ["MultiplyWideningUpperAndSubtract.Vector128.UInt16"] = MultiplyWideningUpperAndSubtract_Vector128_UInt16, - ["MultiplyWideningUpperAndSubtract.Vector128.UInt32"] = MultiplyWideningUpperAndSubtract_Vector128_UInt32, - ["Negate.Vector64.Int16"] = Negate_Vector64_Int16, - ["Negate.Vector64.Int32"] = Negate_Vector64_Int32, - ["Negate.Vector64.SByte"] = Negate_Vector64_SByte, - ["Negate.Vector64.Single"] = Negate_Vector64_Single, - ["Negate.Vector128.Int16"] = Negate_Vector128_Int16, - ["Negate.Vector128.Int32"] = Negate_Vector128_Int32, - ["Negate.Vector128.SByte"] = Negate_Vector128_SByte, - ["Negate.Vector128.Single"] = Negate_Vector128_Single, - ["NegateScalar.Vector64.Double"] = NegateScalar_Vector64_Double, - ["NegateScalar.Vector64.Single"] = NegateScalar_Vector64_Single, - ["Not.Vector64.Byte"] = Not_Vector64_Byte, - ["Not.Vector64.Double"] = Not_Vector64_Double, - ["Not.Vector64.Int16"] = Not_Vector64_Int16, - ["Not.Vector64.Int32"] = Not_Vector64_Int32, - ["Not.Vector64.Int64"] = Not_Vector64_Int64, - ["Not.Vector64.SByte"] = Not_Vector64_SByte, - ["Not.Vector64.Single"] = Not_Vector64_Single, - ["Not.Vector64.UInt16"] = Not_Vector64_UInt16, - ["Not.Vector64.UInt32"] = Not_Vector64_UInt32, - ["Not.Vector64.UInt64"] = Not_Vector64_UInt64, - ["Not.Vector128.Byte"] = Not_Vector128_Byte, - ["Not.Vector128.Double"] = Not_Vector128_Double, - ["Not.Vector128.Int16"] = Not_Vector128_Int16, - ["Not.Vector128.Int32"] = Not_Vector128_Int32, - ["Not.Vector128.Int64"] = Not_Vector128_Int64, - ["Not.Vector128.SByte"] = Not_Vector128_SByte, - ["Not.Vector128.Single"] = Not_Vector128_Single, - ["Not.Vector128.UInt16"] = Not_Vector128_UInt16, - ["Not.Vector128.UInt32"] = Not_Vector128_UInt32, - ["Not.Vector128.UInt64"] = Not_Vector128_UInt64, - ["Or.Vector64.Byte"] = Or_Vector64_Byte, - ["Or.Vector64.Double"] = Or_Vector64_Double, - ["Or.Vector64.Int16"] = Or_Vector64_Int16, - ["Or.Vector64.Int32"] = Or_Vector64_Int32, - ["Or.Vector64.Int64"] = Or_Vector64_Int64, - ["Or.Vector64.SByte"] = Or_Vector64_SByte, - ["Or.Vector64.Single"] = Or_Vector64_Single, - ["Or.Vector64.UInt16"] = Or_Vector64_UInt16, - ["Or.Vector64.UInt32"] = Or_Vector64_UInt32, - ["Or.Vector64.UInt64"] = Or_Vector64_UInt64, - ["Or.Vector128.Byte"] = Or_Vector128_Byte, - ["Or.Vector128.Double"] = Or_Vector128_Double, - ["Or.Vector128.Int16"] = Or_Vector128_Int16, - ["Or.Vector128.Int32"] = Or_Vector128_Int32, - ["Or.Vector128.Int64"] = Or_Vector128_Int64, - ["Or.Vector128.SByte"] = Or_Vector128_SByte, - ["Or.Vector128.Single"] = Or_Vector128_Single, - ["Or.Vector128.UInt16"] = Or_Vector128_UInt16, - ["Or.Vector128.UInt32"] = Or_Vector128_UInt32, - ["Or.Vector128.UInt64"] = Or_Vector128_UInt64, - ["OrNot.Vector64.Byte"] = OrNot_Vector64_Byte, - ["OrNot.Vector64.Double"] = OrNot_Vector64_Double, - ["OrNot.Vector64.Int16"] = OrNot_Vector64_Int16, - ["OrNot.Vector64.Int32"] = OrNot_Vector64_Int32, - ["OrNot.Vector64.Int64"] = OrNot_Vector64_Int64, - ["OrNot.Vector64.SByte"] = OrNot_Vector64_SByte, - ["OrNot.Vector64.Single"] = OrNot_Vector64_Single, - ["OrNot.Vector64.UInt16"] = OrNot_Vector64_UInt16, - ["OrNot.Vector64.UInt32"] = OrNot_Vector64_UInt32, - ["OrNot.Vector64.UInt64"] = OrNot_Vector64_UInt64, - ["OrNot.Vector128.Byte"] = OrNot_Vector128_Byte, - ["OrNot.Vector128.Double"] = OrNot_Vector128_Double, - ["OrNot.Vector128.Int16"] = OrNot_Vector128_Int16, - ["OrNot.Vector128.Int32"] = OrNot_Vector128_Int32, - ["OrNot.Vector128.Int64"] = OrNot_Vector128_Int64, - ["OrNot.Vector128.SByte"] = OrNot_Vector128_SByte, - ["OrNot.Vector128.Single"] = OrNot_Vector128_Single, - ["OrNot.Vector128.UInt16"] = OrNot_Vector128_UInt16, - ["OrNot.Vector128.UInt32"] = OrNot_Vector128_UInt32, - ["OrNot.Vector128.UInt64"] = OrNot_Vector128_UInt64, - ["PolynomialMultiply.Vector64.Byte"] = PolynomialMultiply_Vector64_Byte, - ["PolynomialMultiply.Vector64.SByte"] = PolynomialMultiply_Vector64_SByte, - ["PolynomialMultiply.Vector128.Byte"] = PolynomialMultiply_Vector128_Byte, - ["PolynomialMultiply.Vector128.SByte"] = PolynomialMultiply_Vector128_SByte, - ["PolynomialMultiplyWideningLower.Vector64.Byte"] = PolynomialMultiplyWideningLower_Vector64_Byte, - ["PolynomialMultiplyWideningLower.Vector64.SByte"] = PolynomialMultiplyWideningLower_Vector64_SByte, - ["PolynomialMultiplyWideningUpper.Vector128.Byte"] = PolynomialMultiplyWideningUpper_Vector128_Byte, - ["PolynomialMultiplyWideningUpper.Vector128.SByte"] = PolynomialMultiplyWideningUpper_Vector128_SByte, - ["PopCount.Vector64.Byte"] = PopCount_Vector64_Byte, - ["PopCount.Vector64.SByte"] = PopCount_Vector64_SByte, - ["PopCount.Vector128.Byte"] = PopCount_Vector128_Byte, - ["PopCount.Vector128.SByte"] = PopCount_Vector128_SByte, - ["ReciprocalEstimate.Vector64.Single"] = ReciprocalEstimate_Vector64_Single, - ["ReciprocalEstimate.Vector64.UInt32"] = ReciprocalEstimate_Vector64_UInt32, - ["ReciprocalEstimate.Vector128.Single"] = ReciprocalEstimate_Vector128_Single, - ["ReciprocalEstimate.Vector128.UInt32"] = ReciprocalEstimate_Vector128_UInt32, - ["ReciprocalSquareRootEstimate.Vector64.Single"] = ReciprocalSquareRootEstimate_Vector64_Single, - ["ReciprocalSquareRootEstimate.Vector64.UInt32"] = ReciprocalSquareRootEstimate_Vector64_UInt32, - ["ReciprocalSquareRootEstimate.Vector128.Single"] = ReciprocalSquareRootEstimate_Vector128_Single, - ["ReciprocalSquareRootEstimate.Vector128.UInt32"] = ReciprocalSquareRootEstimate_Vector128_UInt32, - ["ReciprocalSquareRootStep.Vector64.Single"] = ReciprocalSquareRootStep_Vector64_Single, - ["ReciprocalSquareRootStep.Vector128.Single"] = ReciprocalSquareRootStep_Vector128_Single, - ["ReciprocalStep.Vector64.Single"] = ReciprocalStep_Vector64_Single, - ["ReciprocalStep.Vector128.Single"] = ReciprocalStep_Vector128_Single, - ["ShiftArithmetic.Vector64.Int16"] = ShiftArithmetic_Vector64_Int16, - ["ShiftArithmetic.Vector64.Int32"] = ShiftArithmetic_Vector64_Int32, - ["ShiftArithmetic.Vector64.SByte"] = ShiftArithmetic_Vector64_SByte, - ["ShiftArithmetic.Vector128.Int16"] = ShiftArithmetic_Vector128_Int16, - ["ShiftArithmetic.Vector128.Int32"] = ShiftArithmetic_Vector128_Int32, - ["ShiftArithmetic.Vector128.Int64"] = ShiftArithmetic_Vector128_Int64, - ["ShiftArithmetic.Vector128.SByte"] = ShiftArithmetic_Vector128_SByte, - ["ShiftArithmeticRounded.Vector64.Int16"] = ShiftArithmeticRounded_Vector64_Int16, - ["ShiftArithmeticRounded.Vector64.Int32"] = ShiftArithmeticRounded_Vector64_Int32, - ["ShiftArithmeticRounded.Vector64.SByte"] = ShiftArithmeticRounded_Vector64_SByte, - ["ShiftArithmeticRounded.Vector128.Int16"] = ShiftArithmeticRounded_Vector128_Int16, - ["ShiftArithmeticRounded.Vector128.Int32"] = ShiftArithmeticRounded_Vector128_Int32, - ["ShiftArithmeticRounded.Vector128.Int64"] = ShiftArithmeticRounded_Vector128_Int64, - ["ShiftArithmeticRounded.Vector128.SByte"] = ShiftArithmeticRounded_Vector128_SByte, - ["ShiftArithmeticRoundedSaturate.Vector64.Int16"] = ShiftArithmeticRoundedSaturate_Vector64_Int16, - ["ShiftArithmeticRoundedSaturate.Vector64.Int32"] = ShiftArithmeticRoundedSaturate_Vector64_Int32, - ["ShiftArithmeticRoundedSaturate.Vector64.SByte"] = ShiftArithmeticRoundedSaturate_Vector64_SByte, - ["ShiftArithmeticRoundedSaturate.Vector128.Int16"] = ShiftArithmeticRoundedSaturate_Vector128_Int16, - ["ShiftArithmeticRoundedSaturate.Vector128.Int32"] = ShiftArithmeticRoundedSaturate_Vector128_Int32, - ["ShiftArithmeticRoundedSaturate.Vector128.Int64"] = ShiftArithmeticRoundedSaturate_Vector128_Int64, - ["ShiftArithmeticRoundedSaturate.Vector128.SByte"] = ShiftArithmeticRoundedSaturate_Vector128_SByte, - ["ShiftArithmeticRoundedSaturateScalar.Vector64.Int64"] = ShiftArithmeticRoundedSaturateScalar_Vector64_Int64, - ["ShiftArithmeticRoundedScalar.Vector64.Int64"] = ShiftArithmeticRoundedScalar_Vector64_Int64, - ["ShiftArithmeticSaturate.Vector64.Int16"] = ShiftArithmeticSaturate_Vector64_Int16, - ["ShiftArithmeticSaturate.Vector64.Int32"] = ShiftArithmeticSaturate_Vector64_Int32, - ["ShiftArithmeticSaturate.Vector64.SByte"] = ShiftArithmeticSaturate_Vector64_SByte, - ["ShiftArithmeticSaturate.Vector128.Int16"] = ShiftArithmeticSaturate_Vector128_Int16, - ["ShiftArithmeticSaturate.Vector128.Int32"] = ShiftArithmeticSaturate_Vector128_Int32, - ["ShiftArithmeticSaturate.Vector128.Int64"] = ShiftArithmeticSaturate_Vector128_Int64, - ["ShiftArithmeticSaturate.Vector128.SByte"] = ShiftArithmeticSaturate_Vector128_SByte, - ["ShiftArithmeticSaturateScalar.Vector64.Int64"] = ShiftArithmeticSaturateScalar_Vector64_Int64, - ["ShiftArithmeticScalar.Vector64.Int64"] = ShiftArithmeticScalar_Vector64_Int64, - ["ShiftLeftLogical.Vector64.Byte.1"] = ShiftLeftLogical_Vector64_Byte_1, - ["ShiftLeftLogical.Vector64.Int16.1"] = ShiftLeftLogical_Vector64_Int16_1, - ["ShiftLeftLogical.Vector64.Int32.1"] = ShiftLeftLogical_Vector64_Int32_1, - ["ShiftLeftLogical.Vector64.SByte.1"] = ShiftLeftLogical_Vector64_SByte_1, - ["ShiftLeftLogical.Vector64.UInt16.1"] = ShiftLeftLogical_Vector64_UInt16_1, - ["ShiftLeftLogical.Vector64.UInt32.1"] = ShiftLeftLogical_Vector64_UInt32_1, - ["ShiftLeftLogical.Vector128.Byte.1"] = ShiftLeftLogical_Vector128_Byte_1, - ["ShiftLeftLogical.Vector128.Int16.1"] = ShiftLeftLogical_Vector128_Int16_1, - ["ShiftLeftLogical.Vector128.Int64.1"] = ShiftLeftLogical_Vector128_Int64_1, - ["ShiftLeftLogical.Vector128.SByte.1"] = ShiftLeftLogical_Vector128_SByte_1, - ["ShiftLeftLogical.Vector128.UInt16.1"] = ShiftLeftLogical_Vector128_UInt16_1, - ["ShiftLeftLogical.Vector128.UInt32.1"] = ShiftLeftLogical_Vector128_UInt32_1, - ["ShiftLeftLogical.Vector128.UInt64.1"] = ShiftLeftLogical_Vector128_UInt64_1, - ["ShiftLeftLogicalAndInsert.Vector64.Byte"] = ShiftLeftLogicalAndInsert_Vector64_Byte, - ["ShiftLeftLogicalAndInsert.Vector64.Int16"] = ShiftLeftLogicalAndInsert_Vector64_Int16, - ["ShiftLeftLogicalAndInsert.Vector64.Int32"] = ShiftLeftLogicalAndInsert_Vector64_Int32, - ["ShiftLeftLogicalAndInsert.Vector64.SByte"] = ShiftLeftLogicalAndInsert_Vector64_SByte, - ["ShiftLeftLogicalAndInsert.Vector64.UInt16"] = ShiftLeftLogicalAndInsert_Vector64_UInt16, - ["ShiftLeftLogicalAndInsert.Vector64.UInt32"] = ShiftLeftLogicalAndInsert_Vector64_UInt32, - ["ShiftLeftLogicalAndInsert.Vector128.Byte"] = ShiftLeftLogicalAndInsert_Vector128_Byte, - ["ShiftLeftLogicalAndInsert.Vector128.Int16"] = ShiftLeftLogicalAndInsert_Vector128_Int16, - ["ShiftLeftLogicalAndInsert.Vector128.Int32"] = ShiftLeftLogicalAndInsert_Vector128_Int32, - ["ShiftLeftLogicalAndInsert.Vector128.Int64"] = ShiftLeftLogicalAndInsert_Vector128_Int64, - ["ShiftLeftLogicalAndInsert.Vector128.SByte"] = ShiftLeftLogicalAndInsert_Vector128_SByte, - ["ShiftLeftLogicalAndInsert.Vector128.UInt16"] = ShiftLeftLogicalAndInsert_Vector128_UInt16, - ["ShiftLeftLogicalAndInsert.Vector128.UInt32"] = ShiftLeftLogicalAndInsert_Vector128_UInt32, - ["ShiftLeftLogicalAndInsert.Vector128.UInt64"] = ShiftLeftLogicalAndInsert_Vector128_UInt64, - ["ShiftLeftLogicalAndInsertScalar.Vector64.Int64"] = ShiftLeftLogicalAndInsertScalar_Vector64_Int64, - ["ShiftLeftLogicalAndInsertScalar.Vector64.UInt64"] = ShiftLeftLogicalAndInsertScalar_Vector64_UInt64, - ["ShiftLeftLogicalSaturate.Vector64.Byte.1"] = ShiftLeftLogicalSaturate_Vector64_Byte_1, - ["ShiftLeftLogicalSaturate.Vector64.Int16.1"] = ShiftLeftLogicalSaturate_Vector64_Int16_1, - ["ShiftLeftLogicalSaturate.Vector64.Int32.1"] = ShiftLeftLogicalSaturate_Vector64_Int32_1, - ["ShiftLeftLogicalSaturate.Vector64.SByte.1"] = ShiftLeftLogicalSaturate_Vector64_SByte_1, - ["ShiftLeftLogicalSaturate.Vector64.UInt16.1"] = ShiftLeftLogicalSaturate_Vector64_UInt16_1, - ["ShiftLeftLogicalSaturate.Vector64.UInt32.1"] = ShiftLeftLogicalSaturate_Vector64_UInt32_1, - ["ShiftLeftLogicalSaturate.Vector128.Byte.1"] = ShiftLeftLogicalSaturate_Vector128_Byte_1, - ["ShiftLeftLogicalSaturate.Vector128.Int16.1"] = ShiftLeftLogicalSaturate_Vector128_Int16_1, - ["ShiftLeftLogicalSaturate.Vector128.Int32.1"] = ShiftLeftLogicalSaturate_Vector128_Int32_1, - ["ShiftLeftLogicalSaturate.Vector128.Int64.1"] = ShiftLeftLogicalSaturate_Vector128_Int64_1, - ["ShiftLeftLogicalSaturate.Vector128.SByte.1"] = ShiftLeftLogicalSaturate_Vector128_SByte_1, - ["ShiftLeftLogicalSaturate.Vector128.UInt16.1"] = ShiftLeftLogicalSaturate_Vector128_UInt16_1, - ["ShiftLeftLogicalSaturate.Vector128.UInt32.1"] = ShiftLeftLogicalSaturate_Vector128_UInt32_1, - ["ShiftLeftLogicalSaturate.Vector128.UInt64.1"] = ShiftLeftLogicalSaturate_Vector128_UInt64_1, - ["ShiftLeftLogicalSaturateScalar.Vector64.Int64.1"] = ShiftLeftLogicalSaturateScalar_Vector64_Int64_1, - ["ShiftLeftLogicalSaturateScalar.Vector64.UInt64.1"] = ShiftLeftLogicalSaturateScalar_Vector64_UInt64_1, - ["ShiftLeftLogicalSaturateUnsigned.Vector64.Int16.1"] = ShiftLeftLogicalSaturateUnsigned_Vector64_Int16_1, - ["ShiftLeftLogicalSaturateUnsigned.Vector64.Int32.1"] = ShiftLeftLogicalSaturateUnsigned_Vector64_Int32_1, - ["ShiftLeftLogicalSaturateUnsigned.Vector64.SByte.1"] = ShiftLeftLogicalSaturateUnsigned_Vector64_SByte_1, - ["ShiftLeftLogicalSaturateUnsigned.Vector128.Int16.1"] = ShiftLeftLogicalSaturateUnsigned_Vector128_Int16_1, - ["ShiftLeftLogicalSaturateUnsigned.Vector128.Int32.1"] = ShiftLeftLogicalSaturateUnsigned_Vector128_Int32_1, - ["ShiftLeftLogicalSaturateUnsigned.Vector128.Int64.1"] = ShiftLeftLogicalSaturateUnsigned_Vector128_Int64_1, - ["ShiftLeftLogicalSaturateUnsigned.Vector128.SByte.1"] = ShiftLeftLogicalSaturateUnsigned_Vector128_SByte_1, - ["ShiftLeftLogicalSaturateUnsignedScalar.Vector64.Int64.1"] = ShiftLeftLogicalSaturateUnsignedScalar_Vector64_Int64_1, - ["ShiftLeftLogicalScalar.Vector64.Int64.1"] = ShiftLeftLogicalScalar_Vector64_Int64_1, - ["ShiftLeftLogicalScalar.Vector64.UInt64.1"] = ShiftLeftLogicalScalar_Vector64_UInt64_1, - ["ShiftLeftLogicalWideningLower.Vector64.Byte.1"] = ShiftLeftLogicalWideningLower_Vector64_Byte_1, - ["ShiftLeftLogicalWideningLower.Vector64.Int16.1"] = ShiftLeftLogicalWideningLower_Vector64_Int16_1, - ["ShiftLeftLogicalWideningLower.Vector64.Int32.1"] = ShiftLeftLogicalWideningLower_Vector64_Int32_1, - ["ShiftLeftLogicalWideningLower.Vector64.SByte.1"] = ShiftLeftLogicalWideningLower_Vector64_SByte_1, - ["ShiftLeftLogicalWideningLower.Vector64.UInt16.1"] = ShiftLeftLogicalWideningLower_Vector64_UInt16_1, - ["ShiftLeftLogicalWideningLower.Vector64.UInt32.1"] = ShiftLeftLogicalWideningLower_Vector64_UInt32_1, - ["ShiftLeftLogicalWideningUpper.Vector128.Byte.1"] = ShiftLeftLogicalWideningUpper_Vector128_Byte_1, - ["ShiftLeftLogicalWideningUpper.Vector128.Int16.1"] = ShiftLeftLogicalWideningUpper_Vector128_Int16_1, - ["ShiftLeftLogicalWideningUpper.Vector128.Int32.1"] = ShiftLeftLogicalWideningUpper_Vector128_Int32_1, - ["ShiftLeftLogicalWideningUpper.Vector128.SByte.1"] = ShiftLeftLogicalWideningUpper_Vector128_SByte_1, - ["ShiftLeftLogicalWideningUpper.Vector128.UInt16.1"] = ShiftLeftLogicalWideningUpper_Vector128_UInt16_1, - ["ShiftLeftLogicalWideningUpper.Vector128.UInt32.1"] = ShiftLeftLogicalWideningUpper_Vector128_UInt32_1, - ["ShiftLogical.Vector64.Byte"] = ShiftLogical_Vector64_Byte, - ["ShiftLogical.Vector64.Int16"] = ShiftLogical_Vector64_Int16, - ["ShiftLogical.Vector64.Int32"] = ShiftLogical_Vector64_Int32, - ["ShiftLogical.Vector64.SByte"] = ShiftLogical_Vector64_SByte, - ["ShiftLogical.Vector64.UInt16"] = ShiftLogical_Vector64_UInt16, - ["ShiftLogical.Vector64.UInt32"] = ShiftLogical_Vector64_UInt32, - ["ShiftLogical.Vector128.Byte"] = ShiftLogical_Vector128_Byte, - ["ShiftLogical.Vector128.Int16"] = ShiftLogical_Vector128_Int16, - ["ShiftLogical.Vector128.Int32"] = ShiftLogical_Vector128_Int32, - ["ShiftLogical.Vector128.Int64"] = ShiftLogical_Vector128_Int64, - ["ShiftLogical.Vector128.SByte"] = ShiftLogical_Vector128_SByte, - ["ShiftLogical.Vector128.UInt16"] = ShiftLogical_Vector128_UInt16, - }; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/Program.AdvSimd_Part4.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/Program.AdvSimd_Part4.cs deleted file mode 100644 index 0401e9de9039..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/Program.AdvSimd_Part4.cs +++ /dev/null @@ -1,274 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - static Program() - { - TestList = new Dictionary() { - ["ShiftLogical.Vector128.UInt32"] = ShiftLogical_Vector128_UInt32, - ["ShiftLogical.Vector128.UInt64"] = ShiftLogical_Vector128_UInt64, - ["ShiftLogicalRounded.Vector64.Byte"] = ShiftLogicalRounded_Vector64_Byte, - ["ShiftLogicalRounded.Vector64.Int16"] = ShiftLogicalRounded_Vector64_Int16, - ["ShiftLogicalRounded.Vector64.Int32"] = ShiftLogicalRounded_Vector64_Int32, - ["ShiftLogicalRounded.Vector64.SByte"] = ShiftLogicalRounded_Vector64_SByte, - ["ShiftLogicalRounded.Vector64.UInt16"] = ShiftLogicalRounded_Vector64_UInt16, - ["ShiftLogicalRounded.Vector64.UInt32"] = ShiftLogicalRounded_Vector64_UInt32, - ["ShiftLogicalRounded.Vector128.Byte"] = ShiftLogicalRounded_Vector128_Byte, - ["ShiftLogicalRounded.Vector128.Int16"] = ShiftLogicalRounded_Vector128_Int16, - ["ShiftLogicalRounded.Vector128.Int32"] = ShiftLogicalRounded_Vector128_Int32, - ["ShiftLogicalRounded.Vector128.Int64"] = ShiftLogicalRounded_Vector128_Int64, - ["ShiftLogicalRounded.Vector128.SByte"] = ShiftLogicalRounded_Vector128_SByte, - ["ShiftLogicalRounded.Vector128.UInt16"] = ShiftLogicalRounded_Vector128_UInt16, - ["ShiftLogicalRounded.Vector128.UInt32"] = ShiftLogicalRounded_Vector128_UInt32, - ["ShiftLogicalRounded.Vector128.UInt64"] = ShiftLogicalRounded_Vector128_UInt64, - ["ShiftLogicalRoundedSaturate.Vector64.Byte"] = ShiftLogicalRoundedSaturate_Vector64_Byte, - ["ShiftLogicalRoundedSaturate.Vector64.Int16"] = ShiftLogicalRoundedSaturate_Vector64_Int16, - ["ShiftLogicalRoundedSaturate.Vector64.Int32"] = ShiftLogicalRoundedSaturate_Vector64_Int32, - ["ShiftLogicalRoundedSaturate.Vector64.SByte"] = ShiftLogicalRoundedSaturate_Vector64_SByte, - ["ShiftLogicalRoundedSaturate.Vector64.UInt16"] = ShiftLogicalRoundedSaturate_Vector64_UInt16, - ["ShiftLogicalRoundedSaturate.Vector64.UInt32"] = ShiftLogicalRoundedSaturate_Vector64_UInt32, - ["ShiftLogicalRoundedSaturate.Vector128.Byte"] = ShiftLogicalRoundedSaturate_Vector128_Byte, - ["ShiftLogicalRoundedSaturate.Vector128.Int16"] = ShiftLogicalRoundedSaturate_Vector128_Int16, - ["ShiftLogicalRoundedSaturate.Vector128.Int32"] = ShiftLogicalRoundedSaturate_Vector128_Int32, - ["ShiftLogicalRoundedSaturate.Vector128.Int64"] = ShiftLogicalRoundedSaturate_Vector128_Int64, - ["ShiftLogicalRoundedSaturate.Vector128.SByte"] = ShiftLogicalRoundedSaturate_Vector128_SByte, - ["ShiftLogicalRoundedSaturate.Vector128.UInt16"] = ShiftLogicalRoundedSaturate_Vector128_UInt16, - ["ShiftLogicalRoundedSaturate.Vector128.UInt32"] = ShiftLogicalRoundedSaturate_Vector128_UInt32, - ["ShiftLogicalRoundedSaturate.Vector128.UInt64"] = ShiftLogicalRoundedSaturate_Vector128_UInt64, - ["ShiftLogicalRoundedSaturateScalar.Vector64.Int64"] = ShiftLogicalRoundedSaturateScalar_Vector64_Int64, - ["ShiftLogicalRoundedSaturateScalar.Vector64.UInt64"] = ShiftLogicalRoundedSaturateScalar_Vector64_UInt64, - ["ShiftLogicalRoundedScalar.Vector64.Int64"] = ShiftLogicalRoundedScalar_Vector64_Int64, - ["ShiftLogicalRoundedScalar.Vector64.UInt64"] = ShiftLogicalRoundedScalar_Vector64_UInt64, - ["ShiftLogicalSaturate.Vector64.Byte"] = ShiftLogicalSaturate_Vector64_Byte, - ["ShiftLogicalSaturate.Vector64.Int16"] = ShiftLogicalSaturate_Vector64_Int16, - ["ShiftLogicalSaturate.Vector64.Int32"] = ShiftLogicalSaturate_Vector64_Int32, - ["ShiftLogicalSaturate.Vector64.SByte"] = ShiftLogicalSaturate_Vector64_SByte, - ["ShiftLogicalSaturate.Vector64.UInt16"] = ShiftLogicalSaturate_Vector64_UInt16, - ["ShiftLogicalSaturate.Vector64.UInt32"] = ShiftLogicalSaturate_Vector64_UInt32, - ["ShiftLogicalSaturate.Vector128.Byte"] = ShiftLogicalSaturate_Vector128_Byte, - ["ShiftLogicalSaturate.Vector128.Int16"] = ShiftLogicalSaturate_Vector128_Int16, - ["ShiftLogicalSaturate.Vector128.Int32"] = ShiftLogicalSaturate_Vector128_Int32, - ["ShiftLogicalSaturate.Vector128.Int64"] = ShiftLogicalSaturate_Vector128_Int64, - ["ShiftLogicalSaturate.Vector128.SByte"] = ShiftLogicalSaturate_Vector128_SByte, - ["ShiftLogicalSaturate.Vector128.UInt16"] = ShiftLogicalSaturate_Vector128_UInt16, - ["ShiftLogicalSaturate.Vector128.UInt32"] = ShiftLogicalSaturate_Vector128_UInt32, - ["ShiftLogicalSaturate.Vector128.UInt64"] = ShiftLogicalSaturate_Vector128_UInt64, - ["ShiftLogicalSaturateScalar.Vector64.Int64"] = ShiftLogicalSaturateScalar_Vector64_Int64, - ["ShiftLogicalSaturateScalar.Vector64.UInt64"] = ShiftLogicalSaturateScalar_Vector64_UInt64, - ["ShiftLogicalScalar.Vector64.Int64"] = ShiftLogicalScalar_Vector64_Int64, - ["ShiftLogicalScalar.Vector64.UInt64"] = ShiftLogicalScalar_Vector64_UInt64, - ["ShiftRightAndInsert.Vector64.Byte"] = ShiftRightAndInsert_Vector64_Byte, - ["ShiftRightAndInsert.Vector64.Int16"] = ShiftRightAndInsert_Vector64_Int16, - ["ShiftRightAndInsert.Vector64.Int32"] = ShiftRightAndInsert_Vector64_Int32, - ["ShiftRightAndInsert.Vector64.SByte"] = ShiftRightAndInsert_Vector64_SByte, - ["ShiftRightAndInsert.Vector64.UInt16"] = ShiftRightAndInsert_Vector64_UInt16, - ["ShiftRightAndInsert.Vector64.UInt32"] = ShiftRightAndInsert_Vector64_UInt32, - ["ShiftRightAndInsert.Vector128.Byte"] = ShiftRightAndInsert_Vector128_Byte, - ["ShiftRightAndInsert.Vector128.Int16"] = ShiftRightAndInsert_Vector128_Int16, - ["ShiftRightAndInsert.Vector128.Int32"] = ShiftRightAndInsert_Vector128_Int32, - ["ShiftRightAndInsert.Vector128.Int64"] = ShiftRightAndInsert_Vector128_Int64, - ["ShiftRightAndInsert.Vector128.SByte"] = ShiftRightAndInsert_Vector128_SByte, - ["ShiftRightAndInsert.Vector128.UInt16"] = ShiftRightAndInsert_Vector128_UInt16, - ["ShiftRightAndInsert.Vector128.UInt32"] = ShiftRightAndInsert_Vector128_UInt32, - ["ShiftRightAndInsert.Vector128.UInt64"] = ShiftRightAndInsert_Vector128_UInt64, - ["ShiftRightArithmetic.Vector64.Int16.1"] = ShiftRightArithmetic_Vector64_Int16_1, - ["ShiftRightArithmetic.Vector64.Int32.1"] = ShiftRightArithmetic_Vector64_Int32_1, - ["ShiftRightArithmetic.Vector64.SByte.1"] = ShiftRightArithmetic_Vector64_SByte_1, - ["ShiftRightArithmetic.Vector128.Int16.1"] = ShiftRightArithmetic_Vector128_Int16_1, - ["ShiftRightArithmetic.Vector128.Int32.1"] = ShiftRightArithmetic_Vector128_Int32_1, - ["ShiftRightArithmetic.Vector128.Int64.1"] = ShiftRightArithmetic_Vector128_Int64_1, - ["ShiftRightArithmetic.Vector128.SByte.1"] = ShiftRightArithmetic_Vector128_SByte_1, - ["ShiftRightArithmeticAdd.Vector64.Int16.1"] = ShiftRightArithmeticAdd_Vector64_Int16_1, - ["ShiftRightArithmeticAdd.Vector64.Int32.1"] = ShiftRightArithmeticAdd_Vector64_Int32_1, - ["ShiftRightArithmeticAdd.Vector64.SByte.1"] = ShiftRightArithmeticAdd_Vector64_SByte_1, - ["ShiftRightArithmeticAdd.Vector128.Int16.1"] = ShiftRightArithmeticAdd_Vector128_Int16_1, - ["ShiftRightArithmeticAdd.Vector128.Int32.1"] = ShiftRightArithmeticAdd_Vector128_Int32_1, - ["ShiftRightArithmeticAdd.Vector128.Int64.1"] = ShiftRightArithmeticAdd_Vector128_Int64_1, - ["ShiftRightArithmeticAdd.Vector128.SByte.1"] = ShiftRightArithmeticAdd_Vector128_SByte_1, - ["ShiftRightArithmeticAddScalar.Vector64.Int64.1"] = ShiftRightArithmeticAddScalar_Vector64_Int64_1, - ["ShiftRightArithmeticNarrowingSaturateLower.Vector64.Int16.1"] = ShiftRightArithmeticNarrowingSaturateLower_Vector64_Int16_1, - ["ShiftRightArithmeticNarrowingSaturateLower.Vector64.Int32.1"] = ShiftRightArithmeticNarrowingSaturateLower_Vector64_Int32_1, - ["ShiftRightArithmeticNarrowingSaturateLower.Vector64.SByte.1"] = ShiftRightArithmeticNarrowingSaturateLower_Vector64_SByte_1, - ["ShiftRightArithmeticNarrowingSaturateUnsignedLower.Vector64.Byte.1"] = ShiftRightArithmeticNarrowingSaturateUnsignedLower_Vector64_Byte_1, - ["ShiftRightArithmeticNarrowingSaturateUnsignedLower.Vector64.UInt16.1"] = ShiftRightArithmeticNarrowingSaturateUnsignedLower_Vector64_UInt16_1, - ["ShiftRightArithmeticNarrowingSaturateUnsignedLower.Vector64.UInt32.1"] = ShiftRightArithmeticNarrowingSaturateUnsignedLower_Vector64_UInt32_1, - ["ShiftRightArithmeticNarrowingSaturateUnsignedUpper.Vector128.Byte.1"] = ShiftRightArithmeticNarrowingSaturateUnsignedUpper_Vector128_Byte_1, - ["ShiftRightArithmeticNarrowingSaturateUnsignedUpper.Vector128.UInt16.1"] = ShiftRightArithmeticNarrowingSaturateUnsignedUpper_Vector128_UInt16_1, - ["ShiftRightArithmeticNarrowingSaturateUnsignedUpper.Vector128.UInt32.1"] = ShiftRightArithmeticNarrowingSaturateUnsignedUpper_Vector128_UInt32_1, - ["ShiftRightArithmeticNarrowingSaturateUpper.Vector128.Int16.1"] = ShiftRightArithmeticNarrowingSaturateUpper_Vector128_Int16_1, - ["ShiftRightArithmeticNarrowingSaturateUpper.Vector128.Int32.1"] = ShiftRightArithmeticNarrowingSaturateUpper_Vector128_Int32_1, - ["ShiftRightArithmeticNarrowingSaturateUpper.Vector128.SByte.1"] = ShiftRightArithmeticNarrowingSaturateUpper_Vector128_SByte_1, - ["ShiftRightArithmeticRounded.Vector64.Int16.1"] = ShiftRightArithmeticRounded_Vector64_Int16_1, - ["ShiftRightArithmeticRounded.Vector64.Int32.1"] = ShiftRightArithmeticRounded_Vector64_Int32_1, - ["ShiftRightArithmeticRounded.Vector64.SByte.1"] = ShiftRightArithmeticRounded_Vector64_SByte_1, - ["ShiftRightArithmeticRounded.Vector128.Int16.1"] = ShiftRightArithmeticRounded_Vector128_Int16_1, - ["ShiftRightArithmeticRounded.Vector128.Int32.1"] = ShiftRightArithmeticRounded_Vector128_Int32_1, - ["ShiftRightArithmeticRounded.Vector128.Int64.1"] = ShiftRightArithmeticRounded_Vector128_Int64_1, - ["ShiftRightArithmeticRounded.Vector128.SByte.1"] = ShiftRightArithmeticRounded_Vector128_SByte_1, - ["ShiftRightArithmeticRoundedAdd.Vector64.Int16.1"] = ShiftRightArithmeticRoundedAdd_Vector64_Int16_1, - ["ShiftRightArithmeticRoundedAdd.Vector64.Int32.1"] = ShiftRightArithmeticRoundedAdd_Vector64_Int32_1, - ["ShiftRightArithmeticRoundedAdd.Vector64.SByte.1"] = ShiftRightArithmeticRoundedAdd_Vector64_SByte_1, - ["ShiftRightArithmeticRoundedAdd.Vector128.Int16.1"] = ShiftRightArithmeticRoundedAdd_Vector128_Int16_1, - ["ShiftRightArithmeticRoundedAdd.Vector128.Int32.1"] = ShiftRightArithmeticRoundedAdd_Vector128_Int32_1, - ["ShiftRightArithmeticRoundedAdd.Vector128.Int64.1"] = ShiftRightArithmeticRoundedAdd_Vector128_Int64_1, - ["ShiftRightArithmeticRoundedAdd.Vector128.SByte.1"] = ShiftRightArithmeticRoundedAdd_Vector128_SByte_1, - ["ShiftRightArithmeticRoundedAddScalar.Vector64.Int64.1"] = ShiftRightArithmeticRoundedAddScalar_Vector64_Int64_1, - ["ShiftRightArithmeticRoundedNarrowingSaturateLower.Vector64.Int16.1"] = ShiftRightArithmeticRoundedNarrowingSaturateLower_Vector64_Int16_1, - ["ShiftRightArithmeticRoundedNarrowingSaturateLower.Vector64.Int32.1"] = ShiftRightArithmeticRoundedNarrowingSaturateLower_Vector64_Int32_1, - ["ShiftRightArithmeticRoundedNarrowingSaturateLower.Vector64.SByte.1"] = ShiftRightArithmeticRoundedNarrowingSaturateLower_Vector64_SByte_1, - ["ShiftRightArithmeticRoundedNarrowingSaturateUnsignedLower.Vector64.Byte.1"] = ShiftRightArithmeticRoundedNarrowingSaturateUnsignedLower_Vector64_Byte_1, - ["ShiftRightArithmeticRoundedNarrowingSaturateUnsignedLower.Vector64.UInt16.1"] = ShiftRightArithmeticRoundedNarrowingSaturateUnsignedLower_Vector64_UInt16_1, - ["ShiftRightArithmeticRoundedNarrowingSaturateUnsignedLower.Vector64.UInt32.1"] = ShiftRightArithmeticRoundedNarrowingSaturateUnsignedLower_Vector64_UInt32_1, - ["ShiftRightArithmeticRoundedNarrowingSaturateUnsignedUpper.Vector128.Byte.1"] = ShiftRightArithmeticRoundedNarrowingSaturateUnsignedUpper_Vector128_Byte_1, - ["ShiftRightArithmeticRoundedNarrowingSaturateUnsignedUpper.Vector128.UInt16.1"] = ShiftRightArithmeticRoundedNarrowingSaturateUnsignedUpper_Vector128_UInt16_1, - ["ShiftRightArithmeticRoundedNarrowingSaturateUnsignedUpper.Vector128.UInt32.1"] = ShiftRightArithmeticRoundedNarrowingSaturateUnsignedUpper_Vector128_UInt32_1, - ["ShiftRightArithmeticRoundedNarrowingSaturateUpper.Vector128.Int16.1"] = ShiftRightArithmeticRoundedNarrowingSaturateUpper_Vector128_Int16_1, - ["ShiftRightArithmeticRoundedNarrowingSaturateUpper.Vector128.Int32.1"] = ShiftRightArithmeticRoundedNarrowingSaturateUpper_Vector128_Int32_1, - ["ShiftRightArithmeticRoundedNarrowingSaturateUpper.Vector128.SByte.1"] = ShiftRightArithmeticRoundedNarrowingSaturateUpper_Vector128_SByte_1, - ["ShiftRightArithmeticRoundedScalar.Vector64.Int64.1"] = ShiftRightArithmeticRoundedScalar_Vector64_Int64_1, - ["ShiftRightArithmeticScalar.Vector64.Int64.1"] = ShiftRightArithmeticScalar_Vector64_Int64_1, - ["ShiftRightLogical.Vector64.Byte.1"] = ShiftRightLogical_Vector64_Byte_1, - ["ShiftRightLogical.Vector64.Int16.1"] = ShiftRightLogical_Vector64_Int16_1, - ["ShiftRightLogical.Vector64.Int32.1"] = ShiftRightLogical_Vector64_Int32_1, - ["ShiftRightLogical.Vector64.SByte.1"] = ShiftRightLogical_Vector64_SByte_1, - ["ShiftRightLogical.Vector64.UInt16.1"] = ShiftRightLogical_Vector64_UInt16_1, - ["ShiftRightLogical.Vector64.UInt32.1"] = ShiftRightLogical_Vector64_UInt32_1, - ["ShiftRightLogical.Vector128.Byte.1"] = ShiftRightLogical_Vector128_Byte_1, - ["ShiftRightLogical.Vector128.Int16.1"] = ShiftRightLogical_Vector128_Int16_1, - ["ShiftRightLogical.Vector128.Int32.1"] = ShiftRightLogical_Vector128_Int32_1, - ["ShiftRightLogical.Vector128.Int64.1"] = ShiftRightLogical_Vector128_Int64_1, - ["ShiftRightLogical.Vector128.SByte.1"] = ShiftRightLogical_Vector128_SByte_1, - ["ShiftRightLogical.Vector128.UInt16.1"] = ShiftRightLogical_Vector128_UInt16_1, - ["ShiftRightLogical.Vector128.UInt32.1"] = ShiftRightLogical_Vector128_UInt32_1, - ["ShiftRightLogical.Vector128.UInt64.1"] = ShiftRightLogical_Vector128_UInt64_1, - ["ShiftRightLogicalAdd.Vector64.Byte.1"] = ShiftRightLogicalAdd_Vector64_Byte_1, - ["ShiftRightLogicalAdd.Vector64.Int16.1"] = ShiftRightLogicalAdd_Vector64_Int16_1, - ["ShiftRightLogicalAdd.Vector64.Int32.1"] = ShiftRightLogicalAdd_Vector64_Int32_1, - ["ShiftRightLogicalAdd.Vector64.SByte.1"] = ShiftRightLogicalAdd_Vector64_SByte_1, - ["ShiftRightLogicalAdd.Vector64.UInt16.1"] = ShiftRightLogicalAdd_Vector64_UInt16_1, - ["ShiftRightLogicalAdd.Vector64.UInt32.1"] = ShiftRightLogicalAdd_Vector64_UInt32_1, - ["ShiftRightLogicalAdd.Vector128.Byte.1"] = ShiftRightLogicalAdd_Vector128_Byte_1, - ["ShiftRightLogicalAdd.Vector128.Int16.1"] = ShiftRightLogicalAdd_Vector128_Int16_1, - ["ShiftRightLogicalAdd.Vector128.Int32.1"] = ShiftRightLogicalAdd_Vector128_Int32_1, - ["ShiftRightLogicalAdd.Vector128.Int64.1"] = ShiftRightLogicalAdd_Vector128_Int64_1, - ["ShiftRightLogicalAdd.Vector128.SByte.1"] = ShiftRightLogicalAdd_Vector128_SByte_1, - ["ShiftRightLogicalAdd.Vector128.UInt16.1"] = ShiftRightLogicalAdd_Vector128_UInt16_1, - ["ShiftRightLogicalAdd.Vector128.UInt32.1"] = ShiftRightLogicalAdd_Vector128_UInt32_1, - ["ShiftRightLogicalAdd.Vector128.UInt64.1"] = ShiftRightLogicalAdd_Vector128_UInt64_1, - ["ShiftRightLogicalAddScalar.Vector64.Int64.1"] = ShiftRightLogicalAddScalar_Vector64_Int64_1, - ["ShiftRightLogicalAddScalar.Vector64.UInt64.1"] = ShiftRightLogicalAddScalar_Vector64_UInt64_1, - ["ShiftRightLogicalAndInsertScalar.Vector64.Int64"] = ShiftRightLogicalAndInsertScalar_Vector64_Int64, - ["ShiftRightLogicalAndInsertScalar.Vector64.UInt64"] = ShiftRightLogicalAndInsertScalar_Vector64_UInt64, - ["ShiftRightLogicalNarrowingLower.Vector64.Byte.1"] = ShiftRightLogicalNarrowingLower_Vector64_Byte_1, - ["ShiftRightLogicalNarrowingLower.Vector64.Int16.1"] = ShiftRightLogicalNarrowingLower_Vector64_Int16_1, - ["ShiftRightLogicalNarrowingLower.Vector64.Int32.1"] = ShiftRightLogicalNarrowingLower_Vector64_Int32_1, - ["ShiftRightLogicalNarrowingLower.Vector64.SByte.1"] = ShiftRightLogicalNarrowingLower_Vector64_SByte_1, - ["ShiftRightLogicalNarrowingLower.Vector64.UInt16.1"] = ShiftRightLogicalNarrowingLower_Vector64_UInt16_1, - ["ShiftRightLogicalNarrowingLower.Vector64.UInt32.1"] = ShiftRightLogicalNarrowingLower_Vector64_UInt32_1, - ["ShiftRightLogicalNarrowingSaturateLower.Vector64.Byte.1"] = ShiftRightLogicalNarrowingSaturateLower_Vector64_Byte_1, - ["ShiftRightLogicalNarrowingSaturateLower.Vector64.Int16.1"] = ShiftRightLogicalNarrowingSaturateLower_Vector64_Int16_1, - ["ShiftRightLogicalNarrowingSaturateLower.Vector64.Int32.1"] = ShiftRightLogicalNarrowingSaturateLower_Vector64_Int32_1, - ["ShiftRightLogicalNarrowingSaturateLower.Vector64.SByte.1"] = ShiftRightLogicalNarrowingSaturateLower_Vector64_SByte_1, - ["ShiftRightLogicalNarrowingSaturateLower.Vector64.UInt16.1"] = ShiftRightLogicalNarrowingSaturateLower_Vector64_UInt16_1, - ["ShiftRightLogicalNarrowingSaturateLower.Vector64.UInt32.1"] = ShiftRightLogicalNarrowingSaturateLower_Vector64_UInt32_1, - ["ShiftRightLogicalNarrowingSaturateUpper.Vector128.Byte.1"] = ShiftRightLogicalNarrowingSaturateUpper_Vector128_Byte_1, - ["ShiftRightLogicalNarrowingSaturateUpper.Vector128.Int16.1"] = ShiftRightLogicalNarrowingSaturateUpper_Vector128_Int16_1, - ["ShiftRightLogicalNarrowingSaturateUpper.Vector128.Int32.1"] = ShiftRightLogicalNarrowingSaturateUpper_Vector128_Int32_1, - ["ShiftRightLogicalNarrowingSaturateUpper.Vector128.SByte.1"] = ShiftRightLogicalNarrowingSaturateUpper_Vector128_SByte_1, - ["ShiftRightLogicalNarrowingSaturateUpper.Vector128.UInt16.1"] = ShiftRightLogicalNarrowingSaturateUpper_Vector128_UInt16_1, - ["ShiftRightLogicalNarrowingSaturateUpper.Vector128.UInt32.1"] = ShiftRightLogicalNarrowingSaturateUpper_Vector128_UInt32_1, - ["ShiftRightLogicalNarrowingUpper.Vector128.Byte.1"] = ShiftRightLogicalNarrowingUpper_Vector128_Byte_1, - ["ShiftRightLogicalNarrowingUpper.Vector128.Int16.1"] = ShiftRightLogicalNarrowingUpper_Vector128_Int16_1, - ["ShiftRightLogicalNarrowingUpper.Vector128.Int32.1"] = ShiftRightLogicalNarrowingUpper_Vector128_Int32_1, - ["ShiftRightLogicalNarrowingUpper.Vector128.SByte.1"] = ShiftRightLogicalNarrowingUpper_Vector128_SByte_1, - ["ShiftRightLogicalNarrowingUpper.Vector128.UInt16.1"] = ShiftRightLogicalNarrowingUpper_Vector128_UInt16_1, - ["ShiftRightLogicalNarrowingUpper.Vector128.UInt32.1"] = ShiftRightLogicalNarrowingUpper_Vector128_UInt32_1, - ["ShiftRightLogicalRounded.Vector64.Byte.1"] = ShiftRightLogicalRounded_Vector64_Byte_1, - ["ShiftRightLogicalRounded.Vector64.Int16.1"] = ShiftRightLogicalRounded_Vector64_Int16_1, - ["ShiftRightLogicalRounded.Vector64.Int32.1"] = ShiftRightLogicalRounded_Vector64_Int32_1, - ["ShiftRightLogicalRounded.Vector64.SByte.1"] = ShiftRightLogicalRounded_Vector64_SByte_1, - ["ShiftRightLogicalRounded.Vector64.UInt16.1"] = ShiftRightLogicalRounded_Vector64_UInt16_1, - ["ShiftRightLogicalRounded.Vector64.UInt32.1"] = ShiftRightLogicalRounded_Vector64_UInt32_1, - ["ShiftRightLogicalRounded.Vector128.Byte.1"] = ShiftRightLogicalRounded_Vector128_Byte_1, - ["ShiftRightLogicalRounded.Vector128.Int16.1"] = ShiftRightLogicalRounded_Vector128_Int16_1, - ["ShiftRightLogicalRounded.Vector128.Int32.1"] = ShiftRightLogicalRounded_Vector128_Int32_1, - ["ShiftRightLogicalRounded.Vector128.Int64.1"] = ShiftRightLogicalRounded_Vector128_Int64_1, - ["ShiftRightLogicalRounded.Vector128.SByte.1"] = ShiftRightLogicalRounded_Vector128_SByte_1, - ["ShiftRightLogicalRounded.Vector128.UInt16.1"] = ShiftRightLogicalRounded_Vector128_UInt16_1, - ["ShiftRightLogicalRounded.Vector128.UInt32.1"] = ShiftRightLogicalRounded_Vector128_UInt32_1, - ["ShiftRightLogicalRounded.Vector128.UInt64.1"] = ShiftRightLogicalRounded_Vector128_UInt64_1, - ["ShiftRightLogicalRoundedAdd.Vector64.Byte.1"] = ShiftRightLogicalRoundedAdd_Vector64_Byte_1, - ["ShiftRightLogicalRoundedAdd.Vector64.Int16.1"] = ShiftRightLogicalRoundedAdd_Vector64_Int16_1, - ["ShiftRightLogicalRoundedAdd.Vector64.Int32.1"] = ShiftRightLogicalRoundedAdd_Vector64_Int32_1, - ["ShiftRightLogicalRoundedAdd.Vector64.SByte.1"] = ShiftRightLogicalRoundedAdd_Vector64_SByte_1, - ["ShiftRightLogicalRoundedAdd.Vector64.UInt16.1"] = ShiftRightLogicalRoundedAdd_Vector64_UInt16_1, - ["ShiftRightLogicalRoundedAdd.Vector64.UInt32.1"] = ShiftRightLogicalRoundedAdd_Vector64_UInt32_1, - ["ShiftRightLogicalRoundedAdd.Vector128.Byte.1"] = ShiftRightLogicalRoundedAdd_Vector128_Byte_1, - ["ShiftRightLogicalRoundedAdd.Vector128.Int16.1"] = ShiftRightLogicalRoundedAdd_Vector128_Int16_1, - ["ShiftRightLogicalRoundedAdd.Vector128.Int32.1"] = ShiftRightLogicalRoundedAdd_Vector128_Int32_1, - ["ShiftRightLogicalRoundedAdd.Vector128.Int64.1"] = ShiftRightLogicalRoundedAdd_Vector128_Int64_1, - ["ShiftRightLogicalRoundedAdd.Vector128.SByte.1"] = ShiftRightLogicalRoundedAdd_Vector128_SByte_1, - ["ShiftRightLogicalRoundedAdd.Vector128.UInt16.1"] = ShiftRightLogicalRoundedAdd_Vector128_UInt16_1, - ["ShiftRightLogicalRoundedAdd.Vector128.UInt32.1"] = ShiftRightLogicalRoundedAdd_Vector128_UInt32_1, - ["ShiftRightLogicalRoundedAdd.Vector128.UInt64.1"] = ShiftRightLogicalRoundedAdd_Vector128_UInt64_1, - ["ShiftRightLogicalRoundedAddScalar.Vector64.Int64.1"] = ShiftRightLogicalRoundedAddScalar_Vector64_Int64_1, - ["ShiftRightLogicalRoundedAddScalar.Vector64.UInt64.1"] = ShiftRightLogicalRoundedAddScalar_Vector64_UInt64_1, - ["ShiftRightLogicalRoundedNarrowingLower.Vector64.Byte.1"] = ShiftRightLogicalRoundedNarrowingLower_Vector64_Byte_1, - ["ShiftRightLogicalRoundedNarrowingLower.Vector64.Int16.1"] = ShiftRightLogicalRoundedNarrowingLower_Vector64_Int16_1, - ["ShiftRightLogicalRoundedNarrowingLower.Vector64.Int32.1"] = ShiftRightLogicalRoundedNarrowingLower_Vector64_Int32_1, - ["ShiftRightLogicalRoundedNarrowingLower.Vector64.SByte.1"] = ShiftRightLogicalRoundedNarrowingLower_Vector64_SByte_1, - ["ShiftRightLogicalRoundedNarrowingLower.Vector64.UInt16.1"] = ShiftRightLogicalRoundedNarrowingLower_Vector64_UInt16_1, - ["ShiftRightLogicalRoundedNarrowingLower.Vector64.UInt32.1"] = ShiftRightLogicalRoundedNarrowingLower_Vector64_UInt32_1, - ["ShiftRightLogicalRoundedNarrowingSaturateLower.Vector64.Byte.1"] = ShiftRightLogicalRoundedNarrowingSaturateLower_Vector64_Byte_1, - ["ShiftRightLogicalRoundedNarrowingSaturateLower.Vector64.Int16.1"] = ShiftRightLogicalRoundedNarrowingSaturateLower_Vector64_Int16_1, - ["ShiftRightLogicalRoundedNarrowingSaturateLower.Vector64.Int32.1"] = ShiftRightLogicalRoundedNarrowingSaturateLower_Vector64_Int32_1, - ["ShiftRightLogicalRoundedNarrowingSaturateLower.Vector64.SByte.1"] = ShiftRightLogicalRoundedNarrowingSaturateLower_Vector64_SByte_1, - ["ShiftRightLogicalRoundedNarrowingSaturateLower.Vector64.UInt16.1"] = ShiftRightLogicalRoundedNarrowingSaturateLower_Vector64_UInt16_1, - ["ShiftRightLogicalRoundedNarrowingSaturateLower.Vector64.UInt32.1"] = ShiftRightLogicalRoundedNarrowingSaturateLower_Vector64_UInt32_1, - ["ShiftRightLogicalRoundedNarrowingSaturateUpper.Vector128.Byte.1"] = ShiftRightLogicalRoundedNarrowingSaturateUpper_Vector128_Byte_1, - ["ShiftRightLogicalRoundedNarrowingSaturateUpper.Vector128.Int16.1"] = ShiftRightLogicalRoundedNarrowingSaturateUpper_Vector128_Int16_1, - ["ShiftRightLogicalRoundedNarrowingSaturateUpper.Vector128.Int32.1"] = ShiftRightLogicalRoundedNarrowingSaturateUpper_Vector128_Int32_1, - ["ShiftRightLogicalRoundedNarrowingSaturateUpper.Vector128.SByte.1"] = ShiftRightLogicalRoundedNarrowingSaturateUpper_Vector128_SByte_1, - ["ShiftRightLogicalRoundedNarrowingSaturateUpper.Vector128.UInt16.1"] = ShiftRightLogicalRoundedNarrowingSaturateUpper_Vector128_UInt16_1, - ["ShiftRightLogicalRoundedNarrowingSaturateUpper.Vector128.UInt32.1"] = ShiftRightLogicalRoundedNarrowingSaturateUpper_Vector128_UInt32_1, - ["ShiftRightLogicalRoundedNarrowingUpper.Vector128.Byte.1"] = ShiftRightLogicalRoundedNarrowingUpper_Vector128_Byte_1, - ["ShiftRightLogicalRoundedNarrowingUpper.Vector128.Int16.1"] = ShiftRightLogicalRoundedNarrowingUpper_Vector128_Int16_1, - ["ShiftRightLogicalRoundedNarrowingUpper.Vector128.Int32.1"] = ShiftRightLogicalRoundedNarrowingUpper_Vector128_Int32_1, - ["ShiftRightLogicalRoundedNarrowingUpper.Vector128.SByte.1"] = ShiftRightLogicalRoundedNarrowingUpper_Vector128_SByte_1, - ["ShiftRightLogicalRoundedNarrowingUpper.Vector128.UInt16.1"] = ShiftRightLogicalRoundedNarrowingUpper_Vector128_UInt16_1, - ["ShiftRightLogicalRoundedNarrowingUpper.Vector128.UInt32.1"] = ShiftRightLogicalRoundedNarrowingUpper_Vector128_UInt32_1, - ["ShiftRightLogicalRoundedScalar.Vector64.Int64.1"] = ShiftRightLogicalRoundedScalar_Vector64_Int64_1, - ["ShiftRightLogicalRoundedScalar.Vector64.UInt64.1"] = ShiftRightLogicalRoundedScalar_Vector64_UInt64_1, - ["ShiftRightLogicalScalar.Vector64.Int64.1"] = ShiftRightLogicalScalar_Vector64_Int64_1, - ["ShiftRightLogicalScalar.Vector64.UInt64.1"] = ShiftRightLogicalScalar_Vector64_UInt64_1, - ["SignExtendWideningLower.Vector64.Int16"] = SignExtendWideningLower_Vector64_Int16, - ["SignExtendWideningLower.Vector64.Int32"] = SignExtendWideningLower_Vector64_Int32, - ["SignExtendWideningLower.Vector64.SByte"] = SignExtendWideningLower_Vector64_SByte, - ["SignExtendWideningUpper.Vector128.Int16"] = SignExtendWideningUpper_Vector128_Int16, - ["SignExtendWideningUpper.Vector128.Int32"] = SignExtendWideningUpper_Vector128_Int32, - ["SignExtendWideningUpper.Vector128.SByte"] = SignExtendWideningUpper_Vector128_SByte, - ["SqrtScalar.Vector64.Double"] = SqrtScalar_Vector64_Double, - ["SqrtScalar.Vector64.Single"] = SqrtScalar_Vector64_Single, - ["Store.Vector64.Byte"] = Store_Vector64_Byte, - ["Store.Vector64.Double"] = Store_Vector64_Double, - ["Store.Vector64.Int16"] = Store_Vector64_Int16, - ["Store.Vector64.Int32"] = Store_Vector64_Int32, - ["Store.Vector64.Int64"] = Store_Vector64_Int64, - ["Store.Vector64.SByte"] = Store_Vector64_SByte, - ["Store.Vector64.Single"] = Store_Vector64_Single, - ["Store.Vector64.UInt16"] = Store_Vector64_UInt16, - ["Store.Vector64.UInt32"] = Store_Vector64_UInt32, - ["Store.Vector64.UInt64"] = Store_Vector64_UInt64, - ["Store.Vector128.Byte"] = Store_Vector128_Byte, - ["Store.Vector128.Double"] = Store_Vector128_Double, - }; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/Program.AdvSimd_Part5.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/Program.AdvSimd_Part5.cs deleted file mode 100644 index 7093ffad0d41..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/Program.AdvSimd_Part5.cs +++ /dev/null @@ -1,163 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - static Program() - { - TestList = new Dictionary() { - ["Store.Vector128.Int16"] = Store_Vector128_Int16, - ["Store.Vector128.Int32"] = Store_Vector128_Int32, - ["Store.Vector128.Int64"] = Store_Vector128_Int64, - ["Store.Vector128.SByte"] = Store_Vector128_SByte, - ["Store.Vector128.Single"] = Store_Vector128_Single, - ["Store.Vector128.UInt16"] = Store_Vector128_UInt16, - ["Store.Vector128.UInt32"] = Store_Vector128_UInt32, - ["Store.Vector128.UInt64"] = Store_Vector128_UInt64, - ["StoreSelectedScalar.Vector64.Byte.7"] = StoreSelectedScalar_Vector64_Byte_7, - ["StoreSelectedScalar.Vector64.Int16.3"] = StoreSelectedScalar_Vector64_Int16_3, - ["StoreSelectedScalar.Vector64.Int32.1"] = StoreSelectedScalar_Vector64_Int32_1, - ["StoreSelectedScalar.Vector64.SByte.7"] = StoreSelectedScalar_Vector64_SByte_7, - ["StoreSelectedScalar.Vector64.Single.1"] = StoreSelectedScalar_Vector64_Single_1, - ["StoreSelectedScalar.Vector64.UInt16.3"] = StoreSelectedScalar_Vector64_UInt16_3, - ["StoreSelectedScalar.Vector64.UInt32.1"] = StoreSelectedScalar_Vector64_UInt32_1, - ["StoreSelectedScalar.Vector128.Byte.15"] = StoreSelectedScalar_Vector128_Byte_15, - ["StoreSelectedScalar.Vector128.Double.1"] = StoreSelectedScalar_Vector128_Double_1, - ["StoreSelectedScalar.Vector128.Int16.7"] = StoreSelectedScalar_Vector128_Int16_7, - ["StoreSelectedScalar.Vector128.Int32.3"] = StoreSelectedScalar_Vector128_Int32_3, - ["StoreSelectedScalar.Vector128.Int64.1"] = StoreSelectedScalar_Vector128_Int64_1, - ["StoreSelectedScalar.Vector128.SByte.15"] = StoreSelectedScalar_Vector128_SByte_15, - ["StoreSelectedScalar.Vector128.Single.3"] = StoreSelectedScalar_Vector128_Single_3, - ["StoreSelectedScalar.Vector128.UInt16.7"] = StoreSelectedScalar_Vector128_UInt16_7, - ["StoreSelectedScalar.Vector128.UInt32.3"] = StoreSelectedScalar_Vector128_UInt32_3, - ["StoreSelectedScalar.Vector128.UInt64.1"] = StoreSelectedScalar_Vector128_UInt64_1, - ["Subtract.Vector64.Byte"] = Subtract_Vector64_Byte, - ["Subtract.Vector64.Int16"] = Subtract_Vector64_Int16, - ["Subtract.Vector64.Int32"] = Subtract_Vector64_Int32, - ["Subtract.Vector64.SByte"] = Subtract_Vector64_SByte, - ["Subtract.Vector64.Single"] = Subtract_Vector64_Single, - ["Subtract.Vector64.UInt16"] = Subtract_Vector64_UInt16, - ["Subtract.Vector64.UInt32"] = Subtract_Vector64_UInt32, - ["Subtract.Vector128.Byte"] = Subtract_Vector128_Byte, - ["Subtract.Vector128.Int16"] = Subtract_Vector128_Int16, - ["Subtract.Vector128.Int32"] = Subtract_Vector128_Int32, - ["Subtract.Vector128.Int64"] = Subtract_Vector128_Int64, - ["Subtract.Vector128.SByte"] = Subtract_Vector128_SByte, - ["Subtract.Vector128.Single"] = Subtract_Vector128_Single, - ["Subtract.Vector128.UInt16"] = Subtract_Vector128_UInt16, - ["Subtract.Vector128.UInt32"] = Subtract_Vector128_UInt32, - ["Subtract.Vector128.UInt64"] = Subtract_Vector128_UInt64, - ["SubtractHighNarrowingLower.Vector64.Byte"] = SubtractHighNarrowingLower_Vector64_Byte, - ["SubtractHighNarrowingLower.Vector64.Int16"] = SubtractHighNarrowingLower_Vector64_Int16, - ["SubtractHighNarrowingLower.Vector64.Int32"] = SubtractHighNarrowingLower_Vector64_Int32, - ["SubtractHighNarrowingLower.Vector64.SByte"] = SubtractHighNarrowingLower_Vector64_SByte, - ["SubtractHighNarrowingLower.Vector64.UInt16"] = SubtractHighNarrowingLower_Vector64_UInt16, - ["SubtractHighNarrowingLower.Vector64.UInt32"] = SubtractHighNarrowingLower_Vector64_UInt32, - ["SubtractHighNarrowingUpper.Vector128.Byte"] = SubtractHighNarrowingUpper_Vector128_Byte, - ["SubtractHighNarrowingUpper.Vector128.Int16"] = SubtractHighNarrowingUpper_Vector128_Int16, - ["SubtractHighNarrowingUpper.Vector128.Int32"] = SubtractHighNarrowingUpper_Vector128_Int32, - ["SubtractHighNarrowingUpper.Vector128.SByte"] = SubtractHighNarrowingUpper_Vector128_SByte, - ["SubtractHighNarrowingUpper.Vector128.UInt16"] = SubtractHighNarrowingUpper_Vector128_UInt16, - ["SubtractHighNarrowingUpper.Vector128.UInt32"] = SubtractHighNarrowingUpper_Vector128_UInt32, - ["SubtractRoundedHighNarrowingLower.Vector64.Byte"] = SubtractRoundedHighNarrowingLower_Vector64_Byte, - ["SubtractRoundedHighNarrowingLower.Vector64.Int16"] = SubtractRoundedHighNarrowingLower_Vector64_Int16, - ["SubtractRoundedHighNarrowingLower.Vector64.Int32"] = SubtractRoundedHighNarrowingLower_Vector64_Int32, - ["SubtractRoundedHighNarrowingLower.Vector64.SByte"] = SubtractRoundedHighNarrowingLower_Vector64_SByte, - ["SubtractRoundedHighNarrowingLower.Vector64.UInt16"] = SubtractRoundedHighNarrowingLower_Vector64_UInt16, - ["SubtractRoundedHighNarrowingLower.Vector64.UInt32"] = SubtractRoundedHighNarrowingLower_Vector64_UInt32, - ["SubtractRoundedHighNarrowingUpper.Vector128.Byte"] = SubtractRoundedHighNarrowingUpper_Vector128_Byte, - ["SubtractRoundedHighNarrowingUpper.Vector128.Int16"] = SubtractRoundedHighNarrowingUpper_Vector128_Int16, - ["SubtractRoundedHighNarrowingUpper.Vector128.Int32"] = SubtractRoundedHighNarrowingUpper_Vector128_Int32, - ["SubtractRoundedHighNarrowingUpper.Vector128.SByte"] = SubtractRoundedHighNarrowingUpper_Vector128_SByte, - ["SubtractRoundedHighNarrowingUpper.Vector128.UInt16"] = SubtractRoundedHighNarrowingUpper_Vector128_UInt16, - ["SubtractRoundedHighNarrowingUpper.Vector128.UInt32"] = SubtractRoundedHighNarrowingUpper_Vector128_UInt32, - ["SubtractSaturate.Vector64.Byte"] = SubtractSaturate_Vector64_Byte, - ["SubtractSaturate.Vector64.Int16"] = SubtractSaturate_Vector64_Int16, - ["SubtractSaturate.Vector64.Int32"] = SubtractSaturate_Vector64_Int32, - ["SubtractSaturate.Vector64.SByte"] = SubtractSaturate_Vector64_SByte, - ["SubtractSaturate.Vector64.UInt16"] = SubtractSaturate_Vector64_UInt16, - ["SubtractSaturate.Vector64.UInt32"] = SubtractSaturate_Vector64_UInt32, - ["SubtractSaturate.Vector128.Byte"] = SubtractSaturate_Vector128_Byte, - ["SubtractSaturate.Vector128.Int16"] = SubtractSaturate_Vector128_Int16, - ["SubtractSaturate.Vector128.Int32"] = SubtractSaturate_Vector128_Int32, - ["SubtractSaturate.Vector128.Int64"] = SubtractSaturate_Vector128_Int64, - ["SubtractSaturate.Vector128.SByte"] = SubtractSaturate_Vector128_SByte, - ["SubtractSaturate.Vector128.UInt16"] = SubtractSaturate_Vector128_UInt16, - ["SubtractSaturate.Vector128.UInt32"] = SubtractSaturate_Vector128_UInt32, - ["SubtractSaturate.Vector128.UInt64"] = SubtractSaturate_Vector128_UInt64, - ["SubtractSaturateScalar.Vector64.Int64"] = SubtractSaturateScalar_Vector64_Int64, - ["SubtractSaturateScalar.Vector64.UInt64"] = SubtractSaturateScalar_Vector64_UInt64, - ["SubtractScalar.Vector64.Double"] = SubtractScalar_Vector64_Double, - ["SubtractScalar.Vector64.Int64"] = SubtractScalar_Vector64_Int64, - ["SubtractScalar.Vector64.Single"] = SubtractScalar_Vector64_Single, - ["SubtractScalar.Vector64.UInt64"] = SubtractScalar_Vector64_UInt64, - ["SubtractWideningLower.Vector64.Byte"] = SubtractWideningLower_Vector64_Byte, - ["SubtractWideningLower.Vector64.Int16"] = SubtractWideningLower_Vector64_Int16, - ["SubtractWideningLower.Vector64.Int32"] = SubtractWideningLower_Vector64_Int32, - ["SubtractWideningLower.Vector64.SByte"] = SubtractWideningLower_Vector64_SByte, - ["SubtractWideningLower.Vector64.UInt16"] = SubtractWideningLower_Vector64_UInt16, - ["SubtractWideningLower.Vector64.UInt32"] = SubtractWideningLower_Vector64_UInt32, - ["SubtractWideningLower.Vector128.Int16"] = SubtractWideningLower_Vector128_Int16, - ["SubtractWideningLower.Vector128.Int32"] = SubtractWideningLower_Vector128_Int32, - ["SubtractWideningLower.Vector128.Int64"] = SubtractWideningLower_Vector128_Int64, - ["SubtractWideningLower.Vector128.UInt16"] = SubtractWideningLower_Vector128_UInt16, - ["SubtractWideningLower.Vector128.UInt32"] = SubtractWideningLower_Vector128_UInt32, - ["SubtractWideningLower.Vector128.UInt64"] = SubtractWideningLower_Vector128_UInt64, - ["SubtractWideningUpper.Vector128.Byte.Vector128.Byte"] = SubtractWideningUpper_Vector128_Byte_Vector128_Byte, - ["SubtractWideningUpper.Vector128.Int16.Vector128.Int16"] = SubtractWideningUpper_Vector128_Int16_Vector128_Int16, - ["SubtractWideningUpper.Vector128.Int16.Vector128.SByte"] = SubtractWideningUpper_Vector128_Int16_Vector128_SByte, - ["SubtractWideningUpper.Vector128.Int32.Vector128.Int16"] = SubtractWideningUpper_Vector128_Int32_Vector128_Int16, - ["SubtractWideningUpper.Vector128.Int32.Vector128.Int32"] = SubtractWideningUpper_Vector128_Int32_Vector128_Int32, - ["SubtractWideningUpper.Vector128.Int64.Vector128.Int32"] = SubtractWideningUpper_Vector128_Int64_Vector128_Int32, - ["SubtractWideningUpper.Vector128.SByte.Vector128.SByte"] = SubtractWideningUpper_Vector128_SByte_Vector128_SByte, - ["SubtractWideningUpper.Vector128.UInt16.Vector128.Byte"] = SubtractWideningUpper_Vector128_UInt16_Vector128_Byte, - ["SubtractWideningUpper.Vector128.UInt16.Vector128.UInt16"] = SubtractWideningUpper_Vector128_UInt16_Vector128_UInt16, - ["SubtractWideningUpper.Vector128.UInt32.Vector128.UInt16"] = SubtractWideningUpper_Vector128_UInt32_Vector128_UInt16, - ["SubtractWideningUpper.Vector128.UInt32.Vector128.UInt32"] = SubtractWideningUpper_Vector128_UInt32_Vector128_UInt32, - ["SubtractWideningUpper.Vector128.UInt64.Vector128.UInt32"] = SubtractWideningUpper_Vector128_UInt64_Vector128_UInt32, - ["VectorTableLookup.Vector64.Byte"] = VectorTableLookup_Vector64_Byte, - ["VectorTableLookup.Vector64.SByte"] = VectorTableLookup_Vector64_SByte, - ["VectorTableLookupExtension.Vector64.Byte"] = VectorTableLookupExtension_Vector64_Byte, - ["VectorTableLookupExtension.Vector64.SByte"] = VectorTableLookupExtension_Vector64_SByte, - ["Xor.Vector64.Byte"] = Xor_Vector64_Byte, - ["Xor.Vector64.Double"] = Xor_Vector64_Double, - ["Xor.Vector64.Int16"] = Xor_Vector64_Int16, - ["Xor.Vector64.Int32"] = Xor_Vector64_Int32, - ["Xor.Vector64.Int64"] = Xor_Vector64_Int64, - ["Xor.Vector64.SByte"] = Xor_Vector64_SByte, - ["Xor.Vector64.Single"] = Xor_Vector64_Single, - ["Xor.Vector64.UInt16"] = Xor_Vector64_UInt16, - ["Xor.Vector64.UInt32"] = Xor_Vector64_UInt32, - ["Xor.Vector64.UInt64"] = Xor_Vector64_UInt64, - ["Xor.Vector128.Byte"] = Xor_Vector128_Byte, - ["Xor.Vector128.Double"] = Xor_Vector128_Double, - ["Xor.Vector128.Int16"] = Xor_Vector128_Int16, - ["Xor.Vector128.Int32"] = Xor_Vector128_Int32, - ["Xor.Vector128.Int64"] = Xor_Vector128_Int64, - ["Xor.Vector128.SByte"] = Xor_Vector128_SByte, - ["Xor.Vector128.Single"] = Xor_Vector128_Single, - ["Xor.Vector128.UInt16"] = Xor_Vector128_UInt16, - ["Xor.Vector128.UInt32"] = Xor_Vector128_UInt32, - ["Xor.Vector128.UInt64"] = Xor_Vector128_UInt64, - ["ZeroExtendWideningLower.Vector64.Byte"] = ZeroExtendWideningLower_Vector64_Byte, - ["ZeroExtendWideningLower.Vector64.Int16"] = ZeroExtendWideningLower_Vector64_Int16, - ["ZeroExtendWideningLower.Vector64.Int32"] = ZeroExtendWideningLower_Vector64_Int32, - ["ZeroExtendWideningLower.Vector64.SByte"] = ZeroExtendWideningLower_Vector64_SByte, - ["ZeroExtendWideningLower.Vector64.UInt16"] = ZeroExtendWideningLower_Vector64_UInt16, - ["ZeroExtendWideningLower.Vector64.UInt32"] = ZeroExtendWideningLower_Vector64_UInt32, - ["ZeroExtendWideningUpper.Vector128.Byte"] = ZeroExtendWideningUpper_Vector128_Byte, - ["ZeroExtendWideningUpper.Vector128.Int16"] = ZeroExtendWideningUpper_Vector128_Int16, - ["ZeroExtendWideningUpper.Vector128.Int32"] = ZeroExtendWideningUpper_Vector128_Int32, - ["ZeroExtendWideningUpper.Vector128.SByte"] = ZeroExtendWideningUpper_Vector128_SByte, - ["ZeroExtendWideningUpper.Vector128.UInt16"] = ZeroExtendWideningUpper_Vector128_UInt16, - ["ZeroExtendWideningUpper.Vector128.UInt32"] = ZeroExtendWideningUpper_Vector128_UInt32, - }; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector128.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector128.Byte.cs deleted file mode 100644 index 752f5ac35d4f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector128.Byte.cs +++ /dev/null @@ -1,540 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ShiftLeftLogicalAndInsert_Vector128_Byte() - { - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_Byte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_Byte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_Byte testClass) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert(_fld1, _fld2, 4); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_Byte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((Byte*)(pFld1)), - AdvSimd.LoadVector128((Byte*)(pFld2)), - 4 - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly byte Imm = 4; - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_Byte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_Byte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((Byte*)(_dataTable.inArray2Ptr)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftLeftLogicalAndInsert), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)4 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftLeftLogicalAndInsert), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((Byte*)(_dataTable.inArray2Ptr)), - (byte)4 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - _clsVar1, - _clsVar2, - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((Byte*)(pClsVar1)), - AdvSimd.LoadVector128((Byte*)(pClsVar2)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.ShiftLeftLogicalAndInsert(op1, op2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.ShiftLeftLogicalAndInsert(op1, op2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_Byte(); - var result = AdvSimd.ShiftLeftLogicalAndInsert(test._fld1, test._fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_Byte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((Byte*)(pFld1)), - AdvSimd.LoadVector128((Byte*)(pFld2)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert(_fld1, _fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((Byte*)(pFld1)), - AdvSimd.LoadVector128((Byte*)(pFld2)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftLeftLogicalAndInsert(test._fld1, test._fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((Byte*)(&test._fld1)), - AdvSimd.LoadVector128((Byte*)(&test._fld2)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, Vector128 secondOp, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), firstOp); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), secondOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* firstOp, void* secondOp, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(secondOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Byte[] firstOp, Byte[] secondOp, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.ShiftLeftLogicalAndInsert(firstOp[i], secondOp[i], Imm) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ShiftLeftLogicalAndInsert)}(Vector128, Vector128, 4): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector128.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector128.Int16.cs deleted file mode 100644 index 8715e5270249..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector128.Int16.cs +++ /dev/null @@ -1,540 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ShiftLeftLogicalAndInsert_Vector128_Int16() - { - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_Int16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_Int16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_Int16 testClass) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert(_fld1, _fld2, 8); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_Int16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((Int16*)(pFld1)), - AdvSimd.LoadVector128((Int16*)(pFld2)), - 8 - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly byte Imm = 8; - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_Int16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_Int16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((Int16*)(_dataTable.inArray2Ptr)), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftLeftLogicalAndInsert), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)8 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftLeftLogicalAndInsert), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((Int16*)(_dataTable.inArray2Ptr)), - (byte)8 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - _clsVar1, - _clsVar2, - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((Int16*)(pClsVar1)), - AdvSimd.LoadVector128((Int16*)(pClsVar2)), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.ShiftLeftLogicalAndInsert(op1, op2, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.ShiftLeftLogicalAndInsert(op1, op2, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_Int16(); - var result = AdvSimd.ShiftLeftLogicalAndInsert(test._fld1, test._fld2, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_Int16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((Int16*)(pFld1)), - AdvSimd.LoadVector128((Int16*)(pFld2)), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert(_fld1, _fld2, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((Int16*)(pFld1)), - AdvSimd.LoadVector128((Int16*)(pFld2)), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftLeftLogicalAndInsert(test._fld1, test._fld2, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((Int16*)(&test._fld1)), - AdvSimd.LoadVector128((Int16*)(&test._fld2)), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, Vector128 secondOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), firstOp); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), secondOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* firstOp, void* secondOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(secondOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] firstOp, Int16[] secondOp, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.ShiftLeftLogicalAndInsert(firstOp[i], secondOp[i], Imm) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ShiftLeftLogicalAndInsert)}(Vector128, Vector128, 8): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector128.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector128.Int32.cs deleted file mode 100644 index 50aa9c8bf5e6..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector128.Int32.cs +++ /dev/null @@ -1,540 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ShiftLeftLogicalAndInsert_Vector128_Int32() - { - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_Int32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_Int32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_Int32 testClass) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert(_fld1, _fld2, 16); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_Int32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((Int32*)(pFld1)), - AdvSimd.LoadVector128((Int32*)(pFld2)), - 16 - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly byte Imm = 16; - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_Int32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_Int32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((Int32*)(_dataTable.inArray2Ptr)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftLeftLogicalAndInsert), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftLeftLogicalAndInsert), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((Int32*)(_dataTable.inArray2Ptr)), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - _clsVar1, - _clsVar2, - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((Int32*)(pClsVar1)), - AdvSimd.LoadVector128((Int32*)(pClsVar2)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.ShiftLeftLogicalAndInsert(op1, op2, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.ShiftLeftLogicalAndInsert(op1, op2, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_Int32(); - var result = AdvSimd.ShiftLeftLogicalAndInsert(test._fld1, test._fld2, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_Int32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((Int32*)(pFld1)), - AdvSimd.LoadVector128((Int32*)(pFld2)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert(_fld1, _fld2, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((Int32*)(pFld1)), - AdvSimd.LoadVector128((Int32*)(pFld2)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftLeftLogicalAndInsert(test._fld1, test._fld2, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((Int32*)(&test._fld1)), - AdvSimd.LoadVector128((Int32*)(&test._fld2)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, Vector128 secondOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), firstOp); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), secondOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* firstOp, void* secondOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(secondOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] firstOp, Int32[] secondOp, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.ShiftLeftLogicalAndInsert(firstOp[i], secondOp[i], Imm) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ShiftLeftLogicalAndInsert)}(Vector128, Vector128, 16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector128.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector128.Int64.cs deleted file mode 100644 index 5b25cdb0655b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector128.Int64.cs +++ /dev/null @@ -1,540 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ShiftLeftLogicalAndInsert_Vector128_Int64() - { - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_Int64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_Int64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int64[] inArray1, Int64[] inArray2, Int64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_Int64 testClass) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert(_fld1, _fld2, 32); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_Int64 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((Int64*)(pFld1)), - AdvSimd.LoadVector128((Int64*)(pFld2)), - 32 - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly byte Imm = 32; - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_Int64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_Int64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((Int64*)(_dataTable.inArray2Ptr)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftLeftLogicalAndInsert), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftLeftLogicalAndInsert), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((Int64*)(_dataTable.inArray2Ptr)), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - _clsVar1, - _clsVar2, - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((Int64*)(pClsVar1)), - AdvSimd.LoadVector128((Int64*)(pClsVar2)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.ShiftLeftLogicalAndInsert(op1, op2, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((Int64*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.ShiftLeftLogicalAndInsert(op1, op2, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_Int64(); - var result = AdvSimd.ShiftLeftLogicalAndInsert(test._fld1, test._fld2, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_Int64(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((Int64*)(pFld1)), - AdvSimd.LoadVector128((Int64*)(pFld2)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert(_fld1, _fld2, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((Int64*)(pFld1)), - AdvSimd.LoadVector128((Int64*)(pFld2)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftLeftLogicalAndInsert(test._fld1, test._fld2, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((Int64*)(&test._fld1)), - AdvSimd.LoadVector128((Int64*)(&test._fld2)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, Vector128 secondOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), firstOp); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), secondOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* firstOp, void* secondOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(secondOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int64[] firstOp, Int64[] secondOp, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.ShiftLeftLogicalAndInsert(firstOp[i], secondOp[i], Imm) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ShiftLeftLogicalAndInsert)}(Vector128, Vector128, 32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector128.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector128.SByte.cs deleted file mode 100644 index 40e2015ad288..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector128.SByte.cs +++ /dev/null @@ -1,540 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ShiftLeftLogicalAndInsert_Vector128_SByte() - { - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_SByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_SByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_SByte testClass) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert(_fld1, _fld2, 4); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_SByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((SByte*)(pFld1)), - AdvSimd.LoadVector128((SByte*)(pFld2)), - 4 - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly byte Imm = 4; - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_SByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_SByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((SByte*)(_dataTable.inArray2Ptr)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftLeftLogicalAndInsert), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)4 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftLeftLogicalAndInsert), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((SByte*)(_dataTable.inArray2Ptr)), - (byte)4 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - _clsVar1, - _clsVar2, - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((SByte*)(pClsVar1)), - AdvSimd.LoadVector128((SByte*)(pClsVar2)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.ShiftLeftLogicalAndInsert(op1, op2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.ShiftLeftLogicalAndInsert(op1, op2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_SByte(); - var result = AdvSimd.ShiftLeftLogicalAndInsert(test._fld1, test._fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_SByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((SByte*)(pFld1)), - AdvSimd.LoadVector128((SByte*)(pFld2)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert(_fld1, _fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((SByte*)(pFld1)), - AdvSimd.LoadVector128((SByte*)(pFld2)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftLeftLogicalAndInsert(test._fld1, test._fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((SByte*)(&test._fld1)), - AdvSimd.LoadVector128((SByte*)(&test._fld2)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, Vector128 secondOp, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), firstOp); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), secondOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* firstOp, void* secondOp, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(secondOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(SByte[] firstOp, SByte[] secondOp, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.ShiftLeftLogicalAndInsert(firstOp[i], secondOp[i], Imm) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ShiftLeftLogicalAndInsert)}(Vector128, Vector128, 4): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector128.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector128.UInt16.cs deleted file mode 100644 index 01b01171cca3..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector128.UInt16.cs +++ /dev/null @@ -1,540 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ShiftLeftLogicalAndInsert_Vector128_UInt16() - { - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_UInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_UInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_UInt16 testClass) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert(_fld1, _fld2, 8); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_UInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((UInt16*)(pFld1)), - AdvSimd.LoadVector128((UInt16*)(pFld2)), - 8 - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly byte Imm = 8; - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_UInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_UInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftLeftLogicalAndInsert), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)8 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftLeftLogicalAndInsert), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)), - (byte)8 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - _clsVar1, - _clsVar2, - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((UInt16*)(pClsVar1)), - AdvSimd.LoadVector128((UInt16*)(pClsVar2)), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.ShiftLeftLogicalAndInsert(op1, op2, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.ShiftLeftLogicalAndInsert(op1, op2, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_UInt16(); - var result = AdvSimd.ShiftLeftLogicalAndInsert(test._fld1, test._fld2, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_UInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((UInt16*)(pFld1)), - AdvSimd.LoadVector128((UInt16*)(pFld2)), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert(_fld1, _fld2, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((UInt16*)(pFld1)), - AdvSimd.LoadVector128((UInt16*)(pFld2)), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftLeftLogicalAndInsert(test._fld1, test._fld2, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((UInt16*)(&test._fld1)), - AdvSimd.LoadVector128((UInt16*)(&test._fld2)), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, Vector128 secondOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), firstOp); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), secondOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* firstOp, void* secondOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(secondOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt16[] firstOp, UInt16[] secondOp, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.ShiftLeftLogicalAndInsert(firstOp[i], secondOp[i], Imm) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ShiftLeftLogicalAndInsert)}(Vector128, Vector128, 8): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector128.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector128.UInt32.cs deleted file mode 100644 index f514ff210d11..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector128.UInt32.cs +++ /dev/null @@ -1,540 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ShiftLeftLogicalAndInsert_Vector128_UInt32() - { - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_UInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_UInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_UInt32 testClass) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert(_fld1, _fld2, 16); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_UInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((UInt32*)(pFld1)), - AdvSimd.LoadVector128((UInt32*)(pFld2)), - 16 - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly byte Imm = 16; - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_UInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_UInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftLeftLogicalAndInsert), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftLeftLogicalAndInsert), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - _clsVar1, - _clsVar2, - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((UInt32*)(pClsVar1)), - AdvSimd.LoadVector128((UInt32*)(pClsVar2)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.ShiftLeftLogicalAndInsert(op1, op2, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.ShiftLeftLogicalAndInsert(op1, op2, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_UInt32(); - var result = AdvSimd.ShiftLeftLogicalAndInsert(test._fld1, test._fld2, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_UInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((UInt32*)(pFld1)), - AdvSimd.LoadVector128((UInt32*)(pFld2)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert(_fld1, _fld2, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((UInt32*)(pFld1)), - AdvSimd.LoadVector128((UInt32*)(pFld2)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftLeftLogicalAndInsert(test._fld1, test._fld2, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((UInt32*)(&test._fld1)), - AdvSimd.LoadVector128((UInt32*)(&test._fld2)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, Vector128 secondOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), firstOp); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), secondOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* firstOp, void* secondOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(secondOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] firstOp, UInt32[] secondOp, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.ShiftLeftLogicalAndInsert(firstOp[i], secondOp[i], Imm) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ShiftLeftLogicalAndInsert)}(Vector128, Vector128, 16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector128.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector128.UInt64.cs deleted file mode 100644 index d33c9ef0cb84..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector128.UInt64.cs +++ /dev/null @@ -1,540 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ShiftLeftLogicalAndInsert_Vector128_UInt64() - { - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_UInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_UInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt64[] inArray1, UInt64[] inArray2, UInt64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_UInt64 testClass) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert(_fld1, _fld2, 32); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_UInt64 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((UInt64*)(pFld1)), - AdvSimd.LoadVector128((UInt64*)(pFld2)), - 32 - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly byte Imm = 32; - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_UInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_UInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftLeftLogicalAndInsert), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftLeftLogicalAndInsert), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - _clsVar1, - _clsVar2, - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((UInt64*)(pClsVar1)), - AdvSimd.LoadVector128((UInt64*)(pClsVar2)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.ShiftLeftLogicalAndInsert(op1, op2, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.ShiftLeftLogicalAndInsert(op1, op2, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_UInt64(); - var result = AdvSimd.ShiftLeftLogicalAndInsert(test._fld1, test._fld2, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector128_UInt64(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((UInt64*)(pFld1)), - AdvSimd.LoadVector128((UInt64*)(pFld2)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert(_fld1, _fld2, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((UInt64*)(pFld1)), - AdvSimd.LoadVector128((UInt64*)(pFld2)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftLeftLogicalAndInsert(test._fld1, test._fld2, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector128((UInt64*)(&test._fld1)), - AdvSimd.LoadVector128((UInt64*)(&test._fld2)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, Vector128 secondOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), firstOp); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), secondOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* firstOp, void* secondOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(secondOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt64[] firstOp, UInt64[] secondOp, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.ShiftLeftLogicalAndInsert(firstOp[i], secondOp[i], Imm) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ShiftLeftLogicalAndInsert)}(Vector128, Vector128, 32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector64.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector64.Byte.cs deleted file mode 100644 index 4e3b8cc06531..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector64.Byte.cs +++ /dev/null @@ -1,540 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ShiftLeftLogicalAndInsert_Vector64_Byte() - { - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_Byte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_Byte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector64 _fld1; - public Vector64 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_Byte testClass) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert(_fld1, _fld2, 4); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_Byte testClass) - { - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((Byte*)(pFld1)), - AdvSimd.LoadVector64((Byte*)(pFld2)), - 4 - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 8; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly byte Imm = 4; - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector64 _clsVar1; - private static Vector64 _clsVar2; - - private Vector64 _fld1; - private Vector64 _fld2; - - private DataTable _dataTable; - - static ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_Byte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_Byte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((Byte*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((Byte*)(_dataTable.inArray2Ptr)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftLeftLogicalAndInsert), new Type[] { typeof(Vector64), typeof(Vector64), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)4 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftLeftLogicalAndInsert), new Type[] { typeof(Vector64), typeof(Vector64), typeof(byte) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector64((Byte*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((Byte*)(_dataTable.inArray2Ptr)), - (byte)4 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - _clsVar1, - _clsVar2, - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector64* pClsVar1 = &_clsVar1) - fixed (Vector64* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((Byte*)(pClsVar1)), - AdvSimd.LoadVector64((Byte*)(pClsVar2)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.ShiftLeftLogicalAndInsert(op1, op2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector64((Byte*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector64((Byte*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.ShiftLeftLogicalAndInsert(op1, op2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_Byte(); - var result = AdvSimd.ShiftLeftLogicalAndInsert(test._fld1, test._fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_Byte(); - - fixed (Vector64* pFld1 = &test._fld1) - fixed (Vector64* pFld2 = &test._fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((Byte*)(pFld1)), - AdvSimd.LoadVector64((Byte*)(pFld2)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert(_fld1, _fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((Byte*)(pFld1)), - AdvSimd.LoadVector64((Byte*)(pFld2)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftLeftLogicalAndInsert(test._fld1, test._fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((Byte*)(&test._fld1)), - AdvSimd.LoadVector64((Byte*)(&test._fld2)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector64 firstOp, Vector64 secondOp, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), firstOp); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), secondOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* firstOp, void* secondOp, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(secondOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Byte[] firstOp, Byte[] secondOp, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.ShiftLeftLogicalAndInsert(firstOp[i], secondOp[i], Imm) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ShiftLeftLogicalAndInsert)}(Vector64, Vector64, 4): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector64.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector64.Int16.cs deleted file mode 100644 index 0d44b3b7a043..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector64.Int16.cs +++ /dev/null @@ -1,540 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ShiftLeftLogicalAndInsert_Vector64_Int16() - { - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_Int16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_Int16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector64 _fld1; - public Vector64 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_Int16 testClass) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert(_fld1, _fld2, 8); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_Int16 testClass) - { - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((Int16*)(pFld1)), - AdvSimd.LoadVector64((Int16*)(pFld2)), - 8 - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 8; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly byte Imm = 8; - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector64 _clsVar1; - private static Vector64 _clsVar2; - - private Vector64 _fld1; - private Vector64 _fld2; - - private DataTable _dataTable; - - static ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_Int16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_Int16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((Int16*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((Int16*)(_dataTable.inArray2Ptr)), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftLeftLogicalAndInsert), new Type[] { typeof(Vector64), typeof(Vector64), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)8 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftLeftLogicalAndInsert), new Type[] { typeof(Vector64), typeof(Vector64), typeof(byte) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector64((Int16*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((Int16*)(_dataTable.inArray2Ptr)), - (byte)8 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - _clsVar1, - _clsVar2, - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector64* pClsVar1 = &_clsVar1) - fixed (Vector64* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((Int16*)(pClsVar1)), - AdvSimd.LoadVector64((Int16*)(pClsVar2)), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.ShiftLeftLogicalAndInsert(op1, op2, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector64((Int16*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector64((Int16*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.ShiftLeftLogicalAndInsert(op1, op2, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_Int16(); - var result = AdvSimd.ShiftLeftLogicalAndInsert(test._fld1, test._fld2, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_Int16(); - - fixed (Vector64* pFld1 = &test._fld1) - fixed (Vector64* pFld2 = &test._fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((Int16*)(pFld1)), - AdvSimd.LoadVector64((Int16*)(pFld2)), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert(_fld1, _fld2, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((Int16*)(pFld1)), - AdvSimd.LoadVector64((Int16*)(pFld2)), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftLeftLogicalAndInsert(test._fld1, test._fld2, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((Int16*)(&test._fld1)), - AdvSimd.LoadVector64((Int16*)(&test._fld2)), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector64 firstOp, Vector64 secondOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), firstOp); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), secondOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* firstOp, void* secondOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(secondOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] firstOp, Int16[] secondOp, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.ShiftLeftLogicalAndInsert(firstOp[i], secondOp[i], Imm) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ShiftLeftLogicalAndInsert)}(Vector64, Vector64, 8): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector64.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector64.Int32.cs deleted file mode 100644 index 18e54faf1f5e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector64.Int32.cs +++ /dev/null @@ -1,540 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ShiftLeftLogicalAndInsert_Vector64_Int32() - { - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_Int32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_Int32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector64 _fld1; - public Vector64 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_Int32 testClass) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert(_fld1, _fld2, 16); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_Int32 testClass) - { - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((Int32*)(pFld1)), - AdvSimd.LoadVector64((Int32*)(pFld2)), - 16 - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 8; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly byte Imm = 16; - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector64 _clsVar1; - private static Vector64 _clsVar2; - - private Vector64 _fld1; - private Vector64 _fld2; - - private DataTable _dataTable; - - static ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_Int32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_Int32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((Int32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((Int32*)(_dataTable.inArray2Ptr)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftLeftLogicalAndInsert), new Type[] { typeof(Vector64), typeof(Vector64), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftLeftLogicalAndInsert), new Type[] { typeof(Vector64), typeof(Vector64), typeof(byte) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector64((Int32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((Int32*)(_dataTable.inArray2Ptr)), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - _clsVar1, - _clsVar2, - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector64* pClsVar1 = &_clsVar1) - fixed (Vector64* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((Int32*)(pClsVar1)), - AdvSimd.LoadVector64((Int32*)(pClsVar2)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.ShiftLeftLogicalAndInsert(op1, op2, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector64((Int32*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector64((Int32*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.ShiftLeftLogicalAndInsert(op1, op2, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_Int32(); - var result = AdvSimd.ShiftLeftLogicalAndInsert(test._fld1, test._fld2, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_Int32(); - - fixed (Vector64* pFld1 = &test._fld1) - fixed (Vector64* pFld2 = &test._fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((Int32*)(pFld1)), - AdvSimd.LoadVector64((Int32*)(pFld2)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert(_fld1, _fld2, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((Int32*)(pFld1)), - AdvSimd.LoadVector64((Int32*)(pFld2)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftLeftLogicalAndInsert(test._fld1, test._fld2, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((Int32*)(&test._fld1)), - AdvSimd.LoadVector64((Int32*)(&test._fld2)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector64 firstOp, Vector64 secondOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), firstOp); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), secondOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* firstOp, void* secondOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(secondOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] firstOp, Int32[] secondOp, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.ShiftLeftLogicalAndInsert(firstOp[i], secondOp[i], Imm) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ShiftLeftLogicalAndInsert)}(Vector64, Vector64, 16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector64.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector64.SByte.cs deleted file mode 100644 index 0a1c6f13ed82..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector64.SByte.cs +++ /dev/null @@ -1,540 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ShiftLeftLogicalAndInsert_Vector64_SByte() - { - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_SByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_SByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector64 _fld1; - public Vector64 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_SByte testClass) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert(_fld1, _fld2, 4); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_SByte testClass) - { - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((SByte*)(pFld1)), - AdvSimd.LoadVector64((SByte*)(pFld2)), - 4 - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 8; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly byte Imm = 4; - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector64 _clsVar1; - private static Vector64 _clsVar2; - - private Vector64 _fld1; - private Vector64 _fld2; - - private DataTable _dataTable; - - static ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_SByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_SByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((SByte*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((SByte*)(_dataTable.inArray2Ptr)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftLeftLogicalAndInsert), new Type[] { typeof(Vector64), typeof(Vector64), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)4 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftLeftLogicalAndInsert), new Type[] { typeof(Vector64), typeof(Vector64), typeof(byte) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector64((SByte*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((SByte*)(_dataTable.inArray2Ptr)), - (byte)4 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - _clsVar1, - _clsVar2, - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector64* pClsVar1 = &_clsVar1) - fixed (Vector64* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((SByte*)(pClsVar1)), - AdvSimd.LoadVector64((SByte*)(pClsVar2)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.ShiftLeftLogicalAndInsert(op1, op2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector64((SByte*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector64((SByte*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.ShiftLeftLogicalAndInsert(op1, op2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_SByte(); - var result = AdvSimd.ShiftLeftLogicalAndInsert(test._fld1, test._fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_SByte(); - - fixed (Vector64* pFld1 = &test._fld1) - fixed (Vector64* pFld2 = &test._fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((SByte*)(pFld1)), - AdvSimd.LoadVector64((SByte*)(pFld2)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert(_fld1, _fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((SByte*)(pFld1)), - AdvSimd.LoadVector64((SByte*)(pFld2)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftLeftLogicalAndInsert(test._fld1, test._fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((SByte*)(&test._fld1)), - AdvSimd.LoadVector64((SByte*)(&test._fld2)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector64 firstOp, Vector64 secondOp, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), firstOp); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), secondOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* firstOp, void* secondOp, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(secondOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(SByte[] firstOp, SByte[] secondOp, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.ShiftLeftLogicalAndInsert(firstOp[i], secondOp[i], Imm) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ShiftLeftLogicalAndInsert)}(Vector64, Vector64, 4): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector64.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector64.UInt16.cs deleted file mode 100644 index 2ce06c62d9a6..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector64.UInt16.cs +++ /dev/null @@ -1,540 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ShiftLeftLogicalAndInsert_Vector64_UInt16() - { - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_UInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_UInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector64 _fld1; - public Vector64 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_UInt16 testClass) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert(_fld1, _fld2, 8); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_UInt16 testClass) - { - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((UInt16*)(pFld1)), - AdvSimd.LoadVector64((UInt16*)(pFld2)), - 8 - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 8; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly byte Imm = 8; - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector64 _clsVar1; - private static Vector64 _clsVar2; - - private Vector64 _fld1; - private Vector64 _fld2; - - private DataTable _dataTable; - - static ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_UInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_UInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((UInt16*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((UInt16*)(_dataTable.inArray2Ptr)), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftLeftLogicalAndInsert), new Type[] { typeof(Vector64), typeof(Vector64), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)8 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftLeftLogicalAndInsert), new Type[] { typeof(Vector64), typeof(Vector64), typeof(byte) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector64((UInt16*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((UInt16*)(_dataTable.inArray2Ptr)), - (byte)8 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - _clsVar1, - _clsVar2, - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector64* pClsVar1 = &_clsVar1) - fixed (Vector64* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((UInt16*)(pClsVar1)), - AdvSimd.LoadVector64((UInt16*)(pClsVar2)), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.ShiftLeftLogicalAndInsert(op1, op2, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector64((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector64((UInt16*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.ShiftLeftLogicalAndInsert(op1, op2, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_UInt16(); - var result = AdvSimd.ShiftLeftLogicalAndInsert(test._fld1, test._fld2, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_UInt16(); - - fixed (Vector64* pFld1 = &test._fld1) - fixed (Vector64* pFld2 = &test._fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((UInt16*)(pFld1)), - AdvSimd.LoadVector64((UInt16*)(pFld2)), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert(_fld1, _fld2, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((UInt16*)(pFld1)), - AdvSimd.LoadVector64((UInt16*)(pFld2)), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftLeftLogicalAndInsert(test._fld1, test._fld2, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((UInt16*)(&test._fld1)), - AdvSimd.LoadVector64((UInt16*)(&test._fld2)), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector64 firstOp, Vector64 secondOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), firstOp); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), secondOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* firstOp, void* secondOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(secondOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt16[] firstOp, UInt16[] secondOp, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.ShiftLeftLogicalAndInsert(firstOp[i], secondOp[i], Imm) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ShiftLeftLogicalAndInsert)}(Vector64, Vector64, 8): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector64.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector64.UInt32.cs deleted file mode 100644 index a70e7f29ff92..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsert.Vector64.UInt32.cs +++ /dev/null @@ -1,540 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ShiftLeftLogicalAndInsert_Vector64_UInt32() - { - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_UInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_UInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector64 _fld1; - public Vector64 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_UInt32 testClass) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert(_fld1, _fld2, 16); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_UInt32 testClass) - { - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((UInt32*)(pFld1)), - AdvSimd.LoadVector64((UInt32*)(pFld2)), - 16 - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 8; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly byte Imm = 16; - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector64 _clsVar1; - private static Vector64 _clsVar2; - - private Vector64 _fld1; - private Vector64 _fld2; - - private DataTable _dataTable; - - static ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_UInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_UInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((UInt32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((UInt32*)(_dataTable.inArray2Ptr)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftLeftLogicalAndInsert), new Type[] { typeof(Vector64), typeof(Vector64), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftLeftLogicalAndInsert), new Type[] { typeof(Vector64), typeof(Vector64), typeof(byte) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector64((UInt32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((UInt32*)(_dataTable.inArray2Ptr)), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert( - _clsVar1, - _clsVar2, - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector64* pClsVar1 = &_clsVar1) - fixed (Vector64* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((UInt32*)(pClsVar1)), - AdvSimd.LoadVector64((UInt32*)(pClsVar2)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.ShiftLeftLogicalAndInsert(op1, op2, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector64((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector64((UInt32*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.ShiftLeftLogicalAndInsert(op1, op2, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_UInt32(); - var result = AdvSimd.ShiftLeftLogicalAndInsert(test._fld1, test._fld2, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsert_Vector64_UInt32(); - - fixed (Vector64* pFld1 = &test._fld1) - fixed (Vector64* pFld2 = &test._fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((UInt32*)(pFld1)), - AdvSimd.LoadVector64((UInt32*)(pFld2)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ShiftLeftLogicalAndInsert(_fld1, _fld2, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((UInt32*)(pFld1)), - AdvSimd.LoadVector64((UInt32*)(pFld2)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftLeftLogicalAndInsert(test._fld1, test._fld2, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftLeftLogicalAndInsert( - AdvSimd.LoadVector64((UInt32*)(&test._fld1)), - AdvSimd.LoadVector64((UInt32*)(&test._fld2)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector64 firstOp, Vector64 secondOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), firstOp); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), secondOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* firstOp, void* secondOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(secondOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] firstOp, UInt32[] secondOp, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if (Helpers.ShiftLeftLogicalAndInsert(firstOp[i], secondOp[i], Imm) != result[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ShiftLeftLogicalAndInsert)}(Vector64, Vector64, 16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsertScalar.Vector64.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsertScalar.Vector64.Int64.cs deleted file mode 100644 index 8de3b258454d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsertScalar.Vector64.Int64.cs +++ /dev/null @@ -1,547 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ShiftLeftLogicalAndInsertScalar_Vector64_Int64() - { - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsertScalar_Vector64_Int64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__ShiftLeftLogicalAndInsertScalar_Vector64_Int64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int64[] inArray1, Int64[] inArray2, Int64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector64 _fld1; - public Vector64 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__ShiftLeftLogicalAndInsertScalar_Vector64_Int64 testClass) - { - var result = AdvSimd.ShiftLeftLogicalAndInsertScalar(_fld1, _fld2, 32); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(ImmBinaryOpTest__ShiftLeftLogicalAndInsertScalar_Vector64_Int64 testClass) - { - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsertScalar( - AdvSimd.LoadVector64((Int64*)(pFld1)), - AdvSimd.LoadVector64((Int64*)(pFld2)), - 32 - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 8; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly byte Imm = 32; - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector64 _clsVar1; - private static Vector64 _clsVar2; - - private Vector64 _fld1; - private Vector64 _fld2; - - private DataTable _dataTable; - - static ImmBinaryOpTest__ShiftLeftLogicalAndInsertScalar_Vector64_Int64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__ShiftLeftLogicalAndInsertScalar_Vector64_Int64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ShiftLeftLogicalAndInsertScalar( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ShiftLeftLogicalAndInsertScalar( - AdvSimd.LoadVector64((Int64*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((Int64*)(_dataTable.inArray2Ptr)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftLeftLogicalAndInsertScalar), new Type[] { typeof(Vector64), typeof(Vector64), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftLeftLogicalAndInsertScalar), new Type[] { typeof(Vector64), typeof(Vector64), typeof(byte) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector64((Int64*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((Int64*)(_dataTable.inArray2Ptr)), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ShiftLeftLogicalAndInsertScalar( - _clsVar1, - _clsVar2, - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector64* pClsVar1 = &_clsVar1) - fixed (Vector64* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsertScalar( - AdvSimd.LoadVector64((Int64*)(pClsVar1)), - AdvSimd.LoadVector64((Int64*)(pClsVar2)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.ShiftLeftLogicalAndInsertScalar(op1, op2, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector64((Int64*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector64((Int64*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.ShiftLeftLogicalAndInsertScalar(op1, op2, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsertScalar_Vector64_Int64(); - var result = AdvSimd.ShiftLeftLogicalAndInsertScalar(test._fld1, test._fld2, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsertScalar_Vector64_Int64(); - - fixed (Vector64* pFld1 = &test._fld1) - fixed (Vector64* pFld2 = &test._fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsertScalar( - AdvSimd.LoadVector64((Int64*)(pFld1)), - AdvSimd.LoadVector64((Int64*)(pFld2)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ShiftLeftLogicalAndInsertScalar(_fld1, _fld2, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsertScalar( - AdvSimd.LoadVector64((Int64*)(pFld1)), - AdvSimd.LoadVector64((Int64*)(pFld2)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftLeftLogicalAndInsertScalar(test._fld1, test._fld2, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftLeftLogicalAndInsertScalar( - AdvSimd.LoadVector64((Int64*)(&test._fld1)), - AdvSimd.LoadVector64((Int64*)(&test._fld2)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector64 firstOp, Vector64 secondOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), firstOp); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), secondOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* firstOp, void* secondOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(secondOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int64[] firstOp, Int64[] secondOp, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (Helpers.ShiftLeftLogicalAndInsert(firstOp[0], secondOp[0], Imm) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ShiftLeftLogicalAndInsertScalar)}(Vector64, Vector64, 32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsertScalar.Vector64.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsertScalar.Vector64.UInt64.cs deleted file mode 100644 index 72419837a33a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftLeftLogicalAndInsertScalar.Vector64.UInt64.cs +++ /dev/null @@ -1,547 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ShiftLeftLogicalAndInsertScalar_Vector64_UInt64() - { - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsertScalar_Vector64_UInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__ShiftLeftLogicalAndInsertScalar_Vector64_UInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt64[] inArray1, UInt64[] inArray2, UInt64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector64 _fld1; - public Vector64 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__ShiftLeftLogicalAndInsertScalar_Vector64_UInt64 testClass) - { - var result = AdvSimd.ShiftLeftLogicalAndInsertScalar(_fld1, _fld2, 32); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(ImmBinaryOpTest__ShiftLeftLogicalAndInsertScalar_Vector64_UInt64 testClass) - { - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsertScalar( - AdvSimd.LoadVector64((UInt64*)(pFld1)), - AdvSimd.LoadVector64((UInt64*)(pFld2)), - 32 - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 8; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly byte Imm = 32; - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector64 _clsVar1; - private static Vector64 _clsVar2; - - private Vector64 _fld1; - private Vector64 _fld2; - - private DataTable _dataTable; - - static ImmBinaryOpTest__ShiftLeftLogicalAndInsertScalar_Vector64_UInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__ShiftLeftLogicalAndInsertScalar_Vector64_UInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ShiftLeftLogicalAndInsertScalar( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ShiftLeftLogicalAndInsertScalar( - AdvSimd.LoadVector64((UInt64*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((UInt64*)(_dataTable.inArray2Ptr)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftLeftLogicalAndInsertScalar), new Type[] { typeof(Vector64), typeof(Vector64), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftLeftLogicalAndInsertScalar), new Type[] { typeof(Vector64), typeof(Vector64), typeof(byte) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector64((UInt64*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((UInt64*)(_dataTable.inArray2Ptr)), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ShiftLeftLogicalAndInsertScalar( - _clsVar1, - _clsVar2, - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector64* pClsVar1 = &_clsVar1) - fixed (Vector64* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsertScalar( - AdvSimd.LoadVector64((UInt64*)(pClsVar1)), - AdvSimd.LoadVector64((UInt64*)(pClsVar2)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.ShiftLeftLogicalAndInsertScalar(op1, op2, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector64((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector64((UInt64*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.ShiftLeftLogicalAndInsertScalar(op1, op2, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsertScalar_Vector64_UInt64(); - var result = AdvSimd.ShiftLeftLogicalAndInsertScalar(test._fld1, test._fld2, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - var test = new ImmBinaryOpTest__ShiftLeftLogicalAndInsertScalar_Vector64_UInt64(); - - fixed (Vector64* pFld1 = &test._fld1) - fixed (Vector64* pFld2 = &test._fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsertScalar( - AdvSimd.LoadVector64((UInt64*)(pFld1)), - AdvSimd.LoadVector64((UInt64*)(pFld2)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ShiftLeftLogicalAndInsertScalar(_fld1, _fld2, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftLeftLogicalAndInsertScalar( - AdvSimd.LoadVector64((UInt64*)(pFld1)), - AdvSimd.LoadVector64((UInt64*)(pFld2)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftLeftLogicalAndInsertScalar(test._fld1, test._fld2, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftLeftLogicalAndInsertScalar( - AdvSimd.LoadVector64((UInt64*)(&test._fld1)), - AdvSimd.LoadVector64((UInt64*)(&test._fld2)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector64 firstOp, Vector64 secondOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), firstOp); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), secondOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* firstOp, void* secondOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(secondOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt64[] firstOp, UInt64[] secondOp, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (Helpers.ShiftLeftLogicalAndInsert(firstOp[0], secondOp[0], Imm) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ShiftLeftLogicalAndInsertScalar)}(Vector64, Vector64, 32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftRightLogicalAndInsertScalar.Vector64.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftRightLogicalAndInsertScalar.Vector64.Int64.cs deleted file mode 100644 index 50c24e04e464..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftRightLogicalAndInsertScalar.Vector64.Int64.cs +++ /dev/null @@ -1,547 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ShiftRightLogicalAndInsertScalar_Vector64_Int64() - { - var test = new ImmBinaryOpTest__ShiftRightLogicalAndInsertScalar_Vector64_Int64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__ShiftRightLogicalAndInsertScalar_Vector64_Int64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int64[] inArray1, Int64[] inArray2, Int64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector64 _fld1; - public Vector64 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__ShiftRightLogicalAndInsertScalar_Vector64_Int64 testClass) - { - var result = AdvSimd.ShiftRightLogicalAndInsertScalar(_fld1, _fld2, 32); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(ImmBinaryOpTest__ShiftRightLogicalAndInsertScalar_Vector64_Int64 testClass) - { - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftRightLogicalAndInsertScalar( - AdvSimd.LoadVector64((Int64*)(pFld1)), - AdvSimd.LoadVector64((Int64*)(pFld2)), - 32 - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 8; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly byte Imm = 32; - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector64 _clsVar1; - private static Vector64 _clsVar2; - - private Vector64 _fld1; - private Vector64 _fld2; - - private DataTable _dataTable; - - static ImmBinaryOpTest__ShiftRightLogicalAndInsertScalar_Vector64_Int64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__ShiftRightLogicalAndInsertScalar_Vector64_Int64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ShiftRightLogicalAndInsertScalar( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ShiftRightLogicalAndInsertScalar( - AdvSimd.LoadVector64((Int64*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((Int64*)(_dataTable.inArray2Ptr)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftRightLogicalAndInsertScalar), new Type[] { typeof(Vector64), typeof(Vector64), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftRightLogicalAndInsertScalar), new Type[] { typeof(Vector64), typeof(Vector64), typeof(byte) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector64((Int64*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((Int64*)(_dataTable.inArray2Ptr)), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ShiftRightLogicalAndInsertScalar( - _clsVar1, - _clsVar2, - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector64* pClsVar1 = &_clsVar1) - fixed (Vector64* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.ShiftRightLogicalAndInsertScalar( - AdvSimd.LoadVector64((Int64*)(pClsVar1)), - AdvSimd.LoadVector64((Int64*)(pClsVar2)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.ShiftRightLogicalAndInsertScalar(op1, op2, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector64((Int64*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector64((Int64*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.ShiftRightLogicalAndInsertScalar(op1, op2, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__ShiftRightLogicalAndInsertScalar_Vector64_Int64(); - var result = AdvSimd.ShiftRightLogicalAndInsertScalar(test._fld1, test._fld2, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - var test = new ImmBinaryOpTest__ShiftRightLogicalAndInsertScalar_Vector64_Int64(); - - fixed (Vector64* pFld1 = &test._fld1) - fixed (Vector64* pFld2 = &test._fld2) - { - var result = AdvSimd.ShiftRightLogicalAndInsertScalar( - AdvSimd.LoadVector64((Int64*)(pFld1)), - AdvSimd.LoadVector64((Int64*)(pFld2)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ShiftRightLogicalAndInsertScalar(_fld1, _fld2, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftRightLogicalAndInsertScalar( - AdvSimd.LoadVector64((Int64*)(pFld1)), - AdvSimd.LoadVector64((Int64*)(pFld2)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftRightLogicalAndInsertScalar(test._fld1, test._fld2, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftRightLogicalAndInsertScalar( - AdvSimd.LoadVector64((Int64*)(&test._fld1)), - AdvSimd.LoadVector64((Int64*)(&test._fld2)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector64 firstOp, Vector64 secondOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), firstOp); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), secondOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* firstOp, void* secondOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(secondOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int64[] firstOp, Int64[] secondOp, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (Helpers.ShiftRightAndInsert(firstOp[0], secondOp[0], Imm) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ShiftRightLogicalAndInsertScalar)}(Vector64, Vector64, 32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftRightLogicalAndInsertScalar.Vector64.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftRightLogicalAndInsertScalar.Vector64.UInt64.cs deleted file mode 100644 index 74835b4bc028..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/AdvSimd/ShiftRightLogicalAndInsertScalar.Vector64.UInt64.cs +++ /dev/null @@ -1,547 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ShiftRightLogicalAndInsertScalar_Vector64_UInt64() - { - var test = new ImmBinaryOpTest__ShiftRightLogicalAndInsertScalar_Vector64_UInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__ShiftRightLogicalAndInsertScalar_Vector64_UInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt64[] inArray1, UInt64[] inArray2, UInt64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector64 _fld1; - public Vector64 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__ShiftRightLogicalAndInsertScalar_Vector64_UInt64 testClass) - { - var result = AdvSimd.ShiftRightLogicalAndInsertScalar(_fld1, _fld2, 32); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(ImmBinaryOpTest__ShiftRightLogicalAndInsertScalar_Vector64_UInt64 testClass) - { - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftRightLogicalAndInsertScalar( - AdvSimd.LoadVector64((UInt64*)(pFld1)), - AdvSimd.LoadVector64((UInt64*)(pFld2)), - 32 - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 8; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly byte Imm = 32; - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector64 _clsVar1; - private static Vector64 _clsVar2; - - private Vector64 _fld1; - private Vector64 _fld2; - - private DataTable _dataTable; - - static ImmBinaryOpTest__ShiftRightLogicalAndInsertScalar_Vector64_UInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__ShiftRightLogicalAndInsertScalar_Vector64_UInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => AdvSimd.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = AdvSimd.ShiftRightLogicalAndInsertScalar( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = AdvSimd.ShiftRightLogicalAndInsertScalar( - AdvSimd.LoadVector64((UInt64*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((UInt64*)(_dataTable.inArray2Ptr)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftRightLogicalAndInsertScalar), new Type[] { typeof(Vector64), typeof(Vector64), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.ShiftRightLogicalAndInsertScalar), new Type[] { typeof(Vector64), typeof(Vector64), typeof(byte) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector64((UInt64*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector64((UInt64*)(_dataTable.inArray2Ptr)), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector64)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = AdvSimd.ShiftRightLogicalAndInsertScalar( - _clsVar1, - _clsVar2, - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector64* pClsVar1 = &_clsVar1) - fixed (Vector64* pClsVar2 = &_clsVar2) - { - var result = AdvSimd.ShiftRightLogicalAndInsertScalar( - AdvSimd.LoadVector64((UInt64*)(pClsVar1)), - AdvSimd.LoadVector64((UInt64*)(pClsVar2)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = AdvSimd.ShiftRightLogicalAndInsertScalar(op1, op2, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector64((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector64((UInt64*)(_dataTable.inArray2Ptr)); - var result = AdvSimd.ShiftRightLogicalAndInsertScalar(op1, op2, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__ShiftRightLogicalAndInsertScalar_Vector64_UInt64(); - var result = AdvSimd.ShiftRightLogicalAndInsertScalar(test._fld1, test._fld2, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - var test = new ImmBinaryOpTest__ShiftRightLogicalAndInsertScalar_Vector64_UInt64(); - - fixed (Vector64* pFld1 = &test._fld1) - fixed (Vector64* pFld2 = &test._fld2) - { - var result = AdvSimd.ShiftRightLogicalAndInsertScalar( - AdvSimd.LoadVector64((UInt64*)(pFld1)), - AdvSimd.LoadVector64((UInt64*)(pFld2)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = AdvSimd.ShiftRightLogicalAndInsertScalar(_fld1, _fld2, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector64* pFld1 = &_fld1) - fixed (Vector64* pFld2 = &_fld2) - { - var result = AdvSimd.ShiftRightLogicalAndInsertScalar( - AdvSimd.LoadVector64((UInt64*)(pFld1)), - AdvSimd.LoadVector64((UInt64*)(pFld2)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftRightLogicalAndInsertScalar(test._fld1, test._fld2, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = AdvSimd.ShiftRightLogicalAndInsertScalar( - AdvSimd.LoadVector64((UInt64*)(&test._fld1)), - AdvSimd.LoadVector64((UInt64*)(&test._fld2)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector64 firstOp, Vector64 secondOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), firstOp); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), secondOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* firstOp, void* secondOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(secondOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt64[] firstOp, UInt64[] secondOp, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (Helpers.ShiftRightAndInsert(firstOp[0], secondOp[0], Imm) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.ShiftRightLogicalAndInsertScalar)}(Vector64, Vector64, 32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Sha1/ScheduleUpdate0.Vector128.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Sha1/ScheduleUpdate0.Vector128.UInt32.cs deleted file mode 100644 index eacc2108d6aa..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Sha1/ScheduleUpdate0.Vector128.UInt32.cs +++ /dev/null @@ -1,573 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ScheduleUpdate0_Vector128_UInt32() - { - var test = new SecureHashTernaryOpTest__ScheduleUpdate0_Vector128_UInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SecureHashTernaryOpTest__ScheduleUpdate0_Vector128_UInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, UInt32[] inArray3, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - public Vector128 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = 0x00112233; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = 0x44556677; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = 0x8899AABB; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SecureHashTernaryOpTest__ScheduleUpdate0_Vector128_UInt32 testClass) - { - var result = Sha1.ScheduleUpdate0(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SecureHashTernaryOpTest__ScheduleUpdate0_Vector128_UInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Sha1.ScheduleUpdate0( - AdvSimd.LoadVector128((UInt32*)(pFld1)), - AdvSimd.LoadVector128((UInt32*)(pFld2)), - AdvSimd.LoadVector128((UInt32*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - private static UInt32[] _data3 = new UInt32[Op3ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - private static Vector128 _clsVar3; - - private Vector128 _fld1; - private Vector128 _fld2; - private Vector128 _fld3; - - private DataTable _dataTable; - - static SecureHashTernaryOpTest__ScheduleUpdate0_Vector128_UInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = 0x00112233; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = 0x44556677; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = 0x8899AABB; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SecureHashTernaryOpTest__ScheduleUpdate0_Vector128_UInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = 0x00112233; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = 0x44556677; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = 0x8899AABB; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = 0x00112233; } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = 0x44556677; } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = 0x8899AABB; } - _dataTable = new DataTable(_data1, _data2, _data3, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sha1.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sha1.ScheduleUpdate0( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sha1.ScheduleUpdate0( - AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)), - AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sha1).GetMethod(nameof(Sha1.ScheduleUpdate0), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sha1).GetMethod(nameof(Sha1.ScheduleUpdate0), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)), - AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sha1.ScheduleUpdate0( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - fixed (Vector128* pClsVar3 = &_clsVar3) - { - var result = Sha1.ScheduleUpdate0( - AdvSimd.LoadVector128((UInt32*)(pClsVar1)), - AdvSimd.LoadVector128((UInt32*)(pClsVar2)), - AdvSimd.LoadVector128((UInt32*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Sha1.ScheduleUpdate0(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)); - var op3 = AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray3Ptr)); - var result = Sha1.ScheduleUpdate0(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SecureHashTernaryOpTest__ScheduleUpdate0_Vector128_UInt32(); - var result = Sha1.ScheduleUpdate0(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SecureHashTernaryOpTest__ScheduleUpdate0_Vector128_UInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - fixed (Vector128* pFld3 = &test._fld3) - { - var result = Sha1.ScheduleUpdate0( - AdvSimd.LoadVector128((UInt32*)(pFld1)), - AdvSimd.LoadVector128((UInt32*)(pFld2)), - AdvSimd.LoadVector128((UInt32*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sha1.ScheduleUpdate0(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Sha1.ScheduleUpdate0( - AdvSimd.LoadVector128((UInt32*)(pFld1)), - AdvSimd.LoadVector128((UInt32*)(pFld2)), - AdvSimd.LoadVector128((UInt32*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sha1.ScheduleUpdate0(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sha1.ScheduleUpdate0( - AdvSimd.LoadVector128((UInt32*)(&test._fld1)), - AdvSimd.LoadVector128((UInt32*)(&test._fld2)), - AdvSimd.LoadVector128((UInt32*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, Vector128 op3, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] inArray3 = new UInt32[Op3ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] inArray3 = new UInt32[Op3ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(UInt32[] firstOp, UInt32[] secondOp, UInt32[] thirdOp, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - UInt32[] expectedResult = new UInt32[]{0x8899AABB, 0x8899AABB, 0xCCDDEEFF, 0xCCDDEEFF}; - - for (int i = 0; i < RetElementCount; i++) - { - if (result[i] != expectedResult[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sha1)}.{nameof(Sha1.ScheduleUpdate0)}(Vector128, Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Sha1/ScheduleUpdate1.Vector128.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Sha1/ScheduleUpdate1.Vector128.UInt32.cs deleted file mode 100644 index 615b36cb70da..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Sha1/ScheduleUpdate1.Vector128.UInt32.cs +++ /dev/null @@ -1,532 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ScheduleUpdate1_Vector128_UInt32() - { - var test = new SecureHashBinaryOpTest__ScheduleUpdate1_Vector128_UInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SecureHashBinaryOpTest__ScheduleUpdate1_Vector128_UInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = 0x00112233; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = 0x44556677; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SecureHashBinaryOpTest__ScheduleUpdate1_Vector128_UInt32 testClass) - { - var result = Sha1.ScheduleUpdate1(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SecureHashBinaryOpTest__ScheduleUpdate1_Vector128_UInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sha1.ScheduleUpdate1( - AdvSimd.LoadVector128((UInt32*)(pFld1)), - AdvSimd.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SecureHashBinaryOpTest__ScheduleUpdate1_Vector128_UInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = 0x00112233; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = 0x44556677; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SecureHashBinaryOpTest__ScheduleUpdate1_Vector128_UInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = 0x00112233; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = 0x44556677; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = 0x00112233; } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = 0x44556677; } - _dataTable = new DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sha1.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sha1.ScheduleUpdate1( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sha1.ScheduleUpdate1( - AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sha1).GetMethod(nameof(Sha1.ScheduleUpdate1), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sha1).GetMethod(nameof(Sha1.ScheduleUpdate1), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sha1.ScheduleUpdate1( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sha1.ScheduleUpdate1( - AdvSimd.LoadVector128((UInt32*)(pClsVar1)), - AdvSimd.LoadVector128((UInt32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sha1.ScheduleUpdate1(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Sha1.ScheduleUpdate1(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SecureHashBinaryOpTest__ScheduleUpdate1_Vector128_UInt32(); - var result = Sha1.ScheduleUpdate1(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SecureHashBinaryOpTest__ScheduleUpdate1_Vector128_UInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sha1.ScheduleUpdate1( - AdvSimd.LoadVector128((UInt32*)(pFld1)), - AdvSimd.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sha1.ScheduleUpdate1(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sha1.ScheduleUpdate1( - AdvSimd.LoadVector128((UInt32*)(pFld1)), - AdvSimd.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sha1.ScheduleUpdate1(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sha1.ScheduleUpdate1( - AdvSimd.LoadVector128((UInt32*)(&test._fld1)), - AdvSimd.LoadVector128((UInt32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - UInt32[] expectedResult = new UInt32[]{0x88888888, 0x88888888, 0x88888888, 0x11335577}; - - for (int i = 0; i < RetElementCount; i++) - { - if (result[i] != expectedResult[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sha1)}.{nameof(Sha1.ScheduleUpdate1)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Sha256/ScheduleUpdate0.Vector128.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Sha256/ScheduleUpdate0.Vector128.UInt32.cs deleted file mode 100644 index 56b5e5e2c281..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Sha256/ScheduleUpdate0.Vector128.UInt32.cs +++ /dev/null @@ -1,532 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ScheduleUpdate0_Vector128_UInt32() - { - var test = new SecureHashBinaryOpTest__ScheduleUpdate0_Vector128_UInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SecureHashBinaryOpTest__ScheduleUpdate0_Vector128_UInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = 0x00112233; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = 0x44556677; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SecureHashBinaryOpTest__ScheduleUpdate0_Vector128_UInt32 testClass) - { - var result = Sha256.ScheduleUpdate0(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SecureHashBinaryOpTest__ScheduleUpdate0_Vector128_UInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sha256.ScheduleUpdate0( - AdvSimd.LoadVector128((UInt32*)(pFld1)), - AdvSimd.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SecureHashBinaryOpTest__ScheduleUpdate0_Vector128_UInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = 0x00112233; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = 0x44556677; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SecureHashBinaryOpTest__ScheduleUpdate0_Vector128_UInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = 0x00112233; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = 0x44556677; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = 0x00112233; } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = 0x44556677; } - _dataTable = new DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sha256.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sha256.ScheduleUpdate0( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sha256.ScheduleUpdate0( - AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sha256).GetMethod(nameof(Sha256.ScheduleUpdate0), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sha256).GetMethod(nameof(Sha256.ScheduleUpdate0), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sha256.ScheduleUpdate0( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sha256.ScheduleUpdate0( - AdvSimd.LoadVector128((UInt32*)(pClsVar1)), - AdvSimd.LoadVector128((UInt32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sha256.ScheduleUpdate0(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Sha256.ScheduleUpdate0(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SecureHashBinaryOpTest__ScheduleUpdate0_Vector128_UInt32(); - var result = Sha256.ScheduleUpdate0(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SecureHashBinaryOpTest__ScheduleUpdate0_Vector128_UInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sha256.ScheduleUpdate0( - AdvSimd.LoadVector128((UInt32*)(pFld1)), - AdvSimd.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sha256.ScheduleUpdate0(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sha256.ScheduleUpdate0( - AdvSimd.LoadVector128((UInt32*)(pFld1)), - AdvSimd.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sha256.ScheduleUpdate0(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sha256.ScheduleUpdate0( - AdvSimd.LoadVector128((UInt32*)(&test._fld1)), - AdvSimd.LoadVector128((UInt32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - UInt32[] expectedResult = new UInt32[]{0x2E9FE839, 0x2E9FE839, 0x2E9FE839, 0xBFB0F94A}; - - for (int i = 0; i < RetElementCount; i++) - { - if (result[i] != expectedResult[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sha256)}.{nameof(Sha256.ScheduleUpdate0)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Sha256/ScheduleUpdate1.Vector128.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Sha256/ScheduleUpdate1.Vector128.UInt32.cs deleted file mode 100644 index cab4d33cb8b1..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Sha256/ScheduleUpdate1.Vector128.UInt32.cs +++ /dev/null @@ -1,573 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void ScheduleUpdate1_Vector128_UInt32() - { - var test = new SecureHashTernaryOpTest__ScheduleUpdate1_Vector128_UInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (AdvSimd.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (AdvSimd.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SecureHashTernaryOpTest__ScheduleUpdate1_Vector128_UInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, UInt32[] inArray3, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - public Vector128 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = 0x00112233; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = 0x44556677; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = 0x8899AABB; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SecureHashTernaryOpTest__ScheduleUpdate1_Vector128_UInt32 testClass) - { - var result = Sha256.ScheduleUpdate1(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SecureHashTernaryOpTest__ScheduleUpdate1_Vector128_UInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Sha256.ScheduleUpdate1( - AdvSimd.LoadVector128((UInt32*)(pFld1)), - AdvSimd.LoadVector128((UInt32*)(pFld2)), - AdvSimd.LoadVector128((UInt32*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - private static UInt32[] _data3 = new UInt32[Op3ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - private static Vector128 _clsVar3; - - private Vector128 _fld1; - private Vector128 _fld2; - private Vector128 _fld3; - - private DataTable _dataTable; - - static SecureHashTernaryOpTest__ScheduleUpdate1_Vector128_UInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = 0x00112233; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = 0x44556677; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = 0x8899AABB; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SecureHashTernaryOpTest__ScheduleUpdate1_Vector128_UInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = 0x00112233; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = 0x44556677; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = 0x8899AABB; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = 0x00112233; } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = 0x44556677; } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = 0x8899AABB; } - _dataTable = new DataTable(_data1, _data2, _data3, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sha256.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sha256.ScheduleUpdate1( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sha256.ScheduleUpdate1( - AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)), - AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sha256).GetMethod(nameof(Sha256.ScheduleUpdate1), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sha256).GetMethod(nameof(Sha256.ScheduleUpdate1), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)), - AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sha256.ScheduleUpdate1( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - fixed (Vector128* pClsVar3 = &_clsVar3) - { - var result = Sha256.ScheduleUpdate1( - AdvSimd.LoadVector128((UInt32*)(pClsVar1)), - AdvSimd.LoadVector128((UInt32*)(pClsVar2)), - AdvSimd.LoadVector128((UInt32*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Sha256.ScheduleUpdate1(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)); - var op3 = AdvSimd.LoadVector128((UInt32*)(_dataTable.inArray3Ptr)); - var result = Sha256.ScheduleUpdate1(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SecureHashTernaryOpTest__ScheduleUpdate1_Vector128_UInt32(); - var result = Sha256.ScheduleUpdate1(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SecureHashTernaryOpTest__ScheduleUpdate1_Vector128_UInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - fixed (Vector128* pFld3 = &test._fld3) - { - var result = Sha256.ScheduleUpdate1( - AdvSimd.LoadVector128((UInt32*)(pFld1)), - AdvSimd.LoadVector128((UInt32*)(pFld2)), - AdvSimd.LoadVector128((UInt32*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sha256.ScheduleUpdate1(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Sha256.ScheduleUpdate1( - AdvSimd.LoadVector128((UInt32*)(pFld1)), - AdvSimd.LoadVector128((UInt32*)(pFld2)), - AdvSimd.LoadVector128((UInt32*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sha256.ScheduleUpdate1(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sha256.ScheduleUpdate1( - AdvSimd.LoadVector128((UInt32*)(&test._fld1)), - AdvSimd.LoadVector128((UInt32*)(&test._fld2)), - AdvSimd.LoadVector128((UInt32*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, Vector128 op3, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] inArray3 = new UInt32[Op3ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] inArray3 = new UInt32[Op3ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(UInt32[] firstOp, UInt32[] secondOp, UInt32[] thirdOp, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - UInt32[] expectedResult = new UInt32[]{0x248F1BDF, 0x248F1BDF, 0xB303DDBA, 0xF74821FE}; - - for (int i = 0; i < RetElementCount; i++) - { - if (result[i] != expectedResult[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sha256)}.{nameof(Sha256.ScheduleUpdate1)}(Vector128, Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/AesBinOpTest.template b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/AesBinOpTest.template deleted file mode 100644 index 3a5174142629..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/AesBinOpTest.template +++ /dev/null @@ -1,509 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void {TestName}() - { - var test = new AesBinaryOpTest__{TestName}(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class AesBinaryOpTest__{TestName} - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable({Op1BaseType}[] inArray1, {Op2BaseType}[] inArray2, {RetBaseType}[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf<{Op1BaseType}>(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf<{Op2BaseType}>(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf<{RetBaseType}>(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As<{Op2BaseType}, byte>(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public {Op1VectorType}<{Op1BaseType}> _fld1; - public {Op2VectorType}<{Op2BaseType}> _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref testStruct._fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref testStruct._fld2), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); - - return testStruct; - } - - public void RunStructFldScenario(AesBinaryOpTest__{TestName} testClass) - { - var result = {Isa}.{Method}(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(AesBinaryOpTest__{TestName} testClass) - { - fixed ({Op1VectorType}<{Op1BaseType}>* pFld1 = &_fld1) - fixed ({Op2VectorType}<{Op2BaseType}>* pFld2 = &_fld2) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pFld1)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = {LargestVectorSize}; - - private static readonly int RetElementCount = Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>() / sizeof({RetBaseType}); - - - private static {Op1BaseType}[] _data1 = new {Op1BaseType}[{InputSize}] {Input}; - private static {Op2BaseType}[] _data2 = new {Op2BaseType}[{KeySize}] {Key}; - private static {RetBaseType}[] _expectedRet = new {RetBaseType}[{ExpectedRetSize}] {ExpectedRet}; - - private static {Op1VectorType}<{Op1BaseType}> _clsVar1; - private static {Op2VectorType}<{Op2BaseType}> _clsVar2; - - private {Op1VectorType}<{Op1BaseType}> _fld1; - private {Op2VectorType}<{Op2BaseType}> _fld2; - - private DataTable _dataTable; - - static AesBinaryOpTest__{TestName}() - { - - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _clsVar1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref _clsVar2), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); - } - - public AesBinaryOpTest__{TestName}() - { - Succeeded = true; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref _fld2), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); - - _dataTable = new DataTable(_data1, _data2, new {RetBaseType}[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => {Isa}.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = {Isa}.{Method}( - Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr), - Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>), typeof({Op2VectorType}<{Op2BaseType}>) }) - .Invoke(null, new object[] { - Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr), - Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, ({RetVectorType}<{RetBaseType}>)(result)); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>), typeof({Op2VectorType}<{Op2BaseType}>) }) - .Invoke(null, new object[] { - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, ({RetVectorType}<{RetBaseType}>)(result)); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = {Isa}.{Method}( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed ({Op1VectorType}<{Op1BaseType}>* pClsVar1 = &_clsVar1) - fixed ({Op2VectorType}<{Op2BaseType}>* pClsVar2 = &_clsVar2) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pClsVar1)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr); - var right = Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr); - var result = {Isa}.{Method}(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)); - var right = {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray2Ptr)); - var result = {Isa}.{Method}(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new AesBinaryOpTest__{TestName}(); - var result = {Isa}.{Method}(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new AesBinaryOpTest__{TestName}(); - - fixed ({Op1VectorType}<{Op1BaseType}>* pFld1 = &test._fld1) - fixed ({Op2VectorType}<{Op2BaseType}>* pFld2 = &test._fld2) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pFld1)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = {Isa}.{Method}(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed ({Op1VectorType}<{Op1BaseType}>* pFld1 = &_fld1) - fixed ({Op2VectorType}<{Op2BaseType}>* pFld2 = &_fld2) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pFld1)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = {Isa}.{Method}(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(&test._fld1)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(void* result, [CallerMemberName] string method = "") - { - - {RetBaseType}[] outArray = new {RetBaseType}[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>()); - - ValidateResult(outArray, method); - } - - - private void ValidateResult({RetBaseType}[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < result.Length; i++) - { - if (result[i] != _expectedRet[i] ) - { - succeeded = false; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>, {Op2VectorType}<{Op2BaseType}>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" expectedRet: ({string.Join(", ", _expectedRet)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/AesUnOpTest.template b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/AesUnOpTest.template deleted file mode 100644 index 4d47a7a44c9c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/AesUnOpTest.template +++ /dev/null @@ -1,476 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void {TestName}() - { - var test = new AesUnaryOpTest__{TestName}(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class AesUnaryOpTest__{TestName} - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable({Op1BaseType}[] inArray1, {RetBaseType}[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf<{Op1BaseType}>(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf<{RetBaseType}>(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public {Op1VectorType}<{Op1BaseType}> _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref testStruct._fld), ref Unsafe.As<{Op1BaseType}, byte>(ref _data[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - - return testStruct; - } - - public void RunStructFldScenario(AesUnaryOpTest__{TestName} testClass) - { - var result = {Isa}.{Method}(_fld); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(AesUnaryOpTest__{TestName} testClass) - { - fixed ({Op1VectorType}<{Op1BaseType}>* pFld = &_fld) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pFld)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = {LargestVectorSize}; - - private static readonly int RetElementCount = Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>() / sizeof({RetBaseType}); - - private static {Op1BaseType}[] _data = new {Op1BaseType}[{InputSize}] {Input}; - private static {RetBaseType}[] _expectedRet = new {RetBaseType}[{ExpectedRetSize}] {ExpectedRet}; - - private static {Op1VectorType}<{Op1BaseType}> _clsVar; - - private {Op1VectorType}<{Op1BaseType}> _fld; - - private DataTable _dataTable; - - static AesUnaryOpTest__{TestName}() - { - - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _clsVar), ref Unsafe.As<{Op1BaseType}, byte>(ref _data[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - } - - public AesUnaryOpTest__{TestName}() - { - Succeeded = true; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _fld), ref Unsafe.As<{Op1BaseType}, byte>(ref _data[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - - - _dataTable = new DataTable(_data, new {RetBaseType}[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => {Isa}.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = {Isa}.{Method}( - Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult( _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>) }) - .Invoke(null, new object[] { - Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, ({RetVectorType}<{RetBaseType}>)(result)); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>) }) - .Invoke(null, new object[] { - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, ({RetVectorType}<{RetBaseType}>)(result)); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = {Isa}.{Method}( - _clsVar - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed ({Op1VectorType}<{Op1BaseType}>* pClsVar = &_clsVar) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pClsVar)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr); - var result = {Isa}.{Method}(firstOp); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)); - var result = {Isa}.{Method}(firstOp); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new AesUnaryOpTest__{TestName}(); - var result = {Isa}.{Method}(test._fld); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new AesUnaryOpTest__{TestName}(); - - fixed ({Op1VectorType}<{Op1BaseType}>* pFld = &test._fld) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pFld)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = {Isa}.{Method}(_fld); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed ({Op1VectorType}<{Op1BaseType}>* pFld = &_fld) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pFld)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = {Isa}.{Method}(test._fld); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(&test._fld)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - - private void ValidateResult(void* result, [CallerMemberName] string method = "") - { - - {RetBaseType}[] outArray = new {RetBaseType}[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>()); - - ValidateResult(outArray, method); - } - - private void ValidateResult({RetBaseType}[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < result.Length; i++) - { - if (result[i] != _expectedRet[i] ) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" expectedRet: ({string.Join(", ", _expectedRet)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/GenerateTests.csx b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/GenerateTests.csx deleted file mode 100644 index b52cb4feaea7..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/GenerateTests.csx +++ /dev/null @@ -1,2179 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; - -// DIRECTIONS: -// This file isn't very robust and makes several assumptions -// You can execute it by calling "csi .\GenerateTests.csx" -// -// csi can be found under the \tools\net46\roslyn directory -// It must be run such from the directory that contains the csx script -// -// New tests can be generated from the template by adding an entry to the -// appropriate Inputs array below. -// -// You can support a new Isa by creating a new array and adding a new -// "ProcessInputs" call at the bottom of the script. - -private const string SimpleOpTest_ValidationLogic = @"if ({ValidateFirstResult}) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ({ValidateRemainingResults}) - { - succeeded = false; - break; - } - } - }"; - -private const string SimpleVecOpTest_ValidationLogic = @"for (var i = 0; i < RetElementCount; i++) - { - if ({ValidateIterResult}) - { - succeeded = false; - break; - } - }"; - -private const string VecPairBinOpTest_ValidationLogic = @" - int index = 0; - int half = RetElementCount / 2; - for (var i = 0; i < RetElementCount; i+=2, index++) - { - if ({ValidateEntry}) - { - succeeded = false; - break; - } - }"; - -private const string VecReduceOpTest_ValidationLogic = @"if ({ValidateReduceOpResult}) - { - succeeded = false; - } - else - { - for (int i = 1; i < RetElementCount; i++) - { - if ({ValidateRemainingResults}) - { - succeeded = false; - break; - } - } - }"; - -private const string SecureHashOpTest_ValidationLogic = @"{RetBaseType}[] expectedResult = new {RetBaseType}[]{ExpectedResult}; - - for (int i = 0; i < RetElementCount; i++) - { - if (result[i] != expectedResult[i]) - { - succeeded = false; - break; - } - }"; - -private static readonly (string templateFileName, string outputTemplateName, Dictionary templateData)[] Templates = new[] -{ - ("_UnaryOpScalarTestTemplate.template", "DuplicateTest.template", new Dictionary { ["TemplateName"] = "Duplicate", ["TemplateValidationLogic"] = SimpleOpTest_ValidationLogic }), - ("_ImmUnaryOpTestTemplate.template", "ImmUnOpTest.template", new Dictionary { ["TemplateName"] = "Imm", ["TemplateValidationLogic"] = SimpleOpTest_ValidationLogic }), - ("_ImmUnaryOpTestTemplate.template", "VecImmUnOpTest.template", new Dictionary { ["TemplateName"] = "Imm", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogic }), - ("_ImmTernaryOpTestTemplate.template", "ImmTernOpTest.template", new Dictionary { ["TemplateName"] = "Imm", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogic }), - ("_ImmOpTestTemplate.template", "ImmOpTest.template", new Dictionary { ["TemplateName"] = "Imm", ["TemplateValidationLogic"] = SimpleOpTest_ValidationLogic }), - ("_ImmBinaryOpTestTemplate.template", "ImmBinOpTest.template", new Dictionary { ["TemplateName"] = "Imm", ["TemplateValidationLogic"] = SimpleOpTest_ValidationLogic }), - ("_ImmBinaryOpTestTemplate.template", "VecImmBinOpTest.template", new Dictionary { ["TemplateName"] = "Imm", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogic }), - ("_BinaryOpTestTemplate.template", "SimpleBinOpTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleOpTest_ValidationLogic }), - ("_TernaryOpTestTemplate.template", "VecTernOpTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogic }), - ("_ImmTernaryOpTestTemplate.template", "VecImmTernOpTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogic }), - ("_ImmTernaryOpTestTemplate.template", "SimpleImmTernOpTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleOpTest_ValidationLogic }), - ("_UnaryOpTestTemplate.template", "SimpleUnOpTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleOpTest_ValidationLogic }), - ("_UnaryOpTestTemplate.template", "SimpleVecOpTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogic }), - ("_BinaryOpTestTemplate.template", "VecPairBinOpTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = VecPairBinOpTest_ValidationLogic }), - ("_UnaryOpTestTemplate.template", "VecReduceUnOpTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = VecReduceOpTest_ValidationLogic }), - ("_BinaryOpTestTemplate.template", "VecBinOpTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogic }), - ("_TernaryOpTestTemplate.template", "SimpleTernOpTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleOpTest_ValidationLogic }), - ("_UnaryOpTestTemplate.template", "SecureHashUnOpTest.template", new Dictionary { ["TemplateName"] = "SecureHash", ["TemplateValidationLogic"] = SecureHashOpTest_ValidationLogic }), - ("_BinaryOpTestTemplate.template", "SecureHashBinOpTest.template", new Dictionary { ["TemplateName"] = "SecureHash", ["TemplateValidationLogic"] = SecureHashOpTest_ValidationLogic }), - ("_TernaryOpTestTemplate.template", "SecureHashTernOpTest.template", new Dictionary { ["TemplateName"] = "SecureHash", ["TemplateValidationLogic"] = SecureHashOpTest_ValidationLogic }) -}; - -private static readonly (string templateFileName, Dictionary templateData)[] AdvSimdInputs = new [] -{ - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Abs_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Abs", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "(short)-TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.Abs(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Abs_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Abs", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.Abs(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Abs_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Abs", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "(sbyte)-TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.Abs(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Abs_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Abs", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "-TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Abs(firstOp[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Abs_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Abs", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(short)-TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.Abs(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Abs_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Abs", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.Abs(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Abs_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Abs", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(sbyte)-TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.Abs(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Abs_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Abs", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "-TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Abs(firstOp[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["TestName"] = "AbsScalar_Vector64_Double", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "-TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.Abs(firstOp[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleUnOpTest.template", new Dictionary { ["TestName"] = "AbsScalar_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.Abs(firstOp[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteCompareGreaterThan_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteCompareGreaterThan", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.AbsoluteCompareGreaterThan(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteCompareGreaterThan_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteCompareGreaterThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.AbsoluteCompareGreaterThan(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteCompareGreaterThanOrEqual_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteCompareGreaterThanOrEqual", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.AbsoluteCompareGreaterThanOrEqual(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteCompareGreaterThanOrEqual_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteCompareGreaterThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.AbsoluteCompareGreaterThanOrEqual(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteCompareLessThan_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteCompareLessThan", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.AbsoluteCompareLessThan(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteCompareLessThan_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteCompareLessThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.AbsoluteCompareLessThan(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteCompareLessThanOrEqual_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteCompareLessThanOrEqual", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.AbsoluteCompareLessThanOrEqual(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteCompareLessThanOrEqual_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteCompareLessThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.AbsoluteCompareLessThanOrEqual(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifference_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifference", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.AbsoluteDifference(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifference_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifference", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.AbsoluteDifference(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifference_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifference", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.AbsoluteDifference(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifference_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifference", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.AbsoluteDifference(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifference_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifference", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.AbsoluteDifference(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifference_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifference", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.AbsoluteDifference(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifference_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifference", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.AbsoluteDifference(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifference_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifference", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.AbsoluteDifference(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifference_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifference", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.AbsoluteDifference(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifference_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifference", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.AbsoluteDifference(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifference_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifference", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.AbsoluteDifference(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifference_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifference", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.AbsoluteDifference(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifference_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifference", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.AbsoluteDifference(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifference_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifference", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.AbsoluteDifference(left[i], right[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceAdd_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceAdd_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceAdd_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceAdd_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceAdd_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceAdd_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceAdd_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceAdd_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceAdd_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceAdd_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceAdd_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceAdd_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceWideningLower_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceWideningLower_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceWideningLower_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceWideningLower_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceWideningLower_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceWideningLower_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceWidening(left[i], right[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceWideningLowerAndAdd_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceWideningLowerAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceWideningAndAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceWideningLowerAndAdd_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceWideningLowerAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceWideningAndAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceWideningLowerAndAdd_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceWideningLowerAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceWideningAndAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceWideningLowerAndAdd_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceWideningLowerAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceWideningAndAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceWideningLowerAndAdd_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceWideningLowerAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceWideningAndAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceWideningLowerAndAdd_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceWideningLowerAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceWideningAndAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceWideningUpper_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceWideningUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceWideningUpper_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceWideningUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceWideningUpper_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceWideningUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceWideningUpper_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceWideningUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceWideningUpper_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceWideningUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceWideningUpper_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceWideningUpper(left, right, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceWideningUpperAndAdd_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceWideningUpperAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceWideningUpperAndAdd(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceWideningUpperAndAdd_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceWideningUpperAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceWideningUpperAndAdd(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceWideningUpperAndAdd_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceWideningUpperAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceWideningUpperAndAdd(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceWideningUpperAndAdd_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceWideningUpperAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceWideningUpperAndAdd(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceWideningUpperAndAdd_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceWideningUpperAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceWideningUpperAndAdd(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceWideningUpperAndAdd_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceWideningUpperAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.AbsoluteDifferenceWideningUpperAndAdd(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Add_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Add", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.Add(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Add_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Add", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.Add(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Add_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Add", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.Add(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Add_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Add", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.Add(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Add_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Add", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Add(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Add_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Add", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.Add(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Add_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Add", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.Add(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Add_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Add", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.Add(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Add_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Add", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.Add(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Add_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Add", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.Add(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Add_Vector128_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Add", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.Add(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Add_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Add", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.Add(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Add_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Add", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Add(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Add_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Add", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.Add(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Add_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Add", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.Add(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Add_Vector128_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Add", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.Add(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddHighNarrowingLower_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddHighNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.AddHighNarrowing(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddHighNarrowingLower_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddHighNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.AddHighNarrowing(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddHighNarrowingLower_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddHighNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.AddHighNarrowing(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddHighNarrowingLower_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddHighNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.AddHighNarrowing(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddHighNarrowingLower_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddHighNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.AddHighNarrowing(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddHighNarrowingLower_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddHighNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.AddHighNarrowing(left[i], right[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AddHighNarrowingUpper_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddHighNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.AddHighNarrowingUpper(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AddHighNarrowingUpper_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddHighNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.AddHighNarrowingUpper(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AddHighNarrowingUpper_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddHighNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.AddHighNarrowingUpper(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AddHighNarrowingUpper_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddHighNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.AddHighNarrowingUpper(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AddHighNarrowingUpper_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddHighNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.AddHighNarrowingUpper(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AddHighNarrowingUpper_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddHighNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.AddHighNarrowingUpper(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddPairwise_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwise", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.AddPairwise(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddPairwise_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwise", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.AddPairwise(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddPairwise_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwise", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.AddPairwise(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddPairwise_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwise", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.AddPairwise(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddPairwise_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwise", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.AddPairwise(left, right, i)) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddPairwise_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwise", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.AddPairwise(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddPairwise_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwise", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.AddPairwise(left, right, i) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "AddPairwiseWidening_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwiseWidening", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.AddPairwiseWidening(firstOp, i) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "AddPairwiseWidening_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwiseWidening", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.AddPairwiseWidening(firstOp, i) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "AddPairwiseWidening_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwiseWidening", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.AddPairwiseWidening(firstOp, i) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "AddPairwiseWidening_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwiseWidening", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.AddPairwiseWidening(firstOp, i) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "AddPairwiseWidening_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwiseWidening", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.AddPairwiseWidening(firstOp, i) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "AddPairwiseWidening_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwiseWidening", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.AddPairwiseWidening(firstOp, i) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "AddPairwiseWidening_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwiseWidening", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.AddPairwiseWidening(firstOp, i) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "AddPairwiseWidening_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwiseWidening", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.AddPairwiseWidening(firstOp, i) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "AddPairwiseWidening_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwiseWidening", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.AddPairwiseWidening(firstOp, i) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "AddPairwiseWidening_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwiseWidening", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.AddPairwiseWidening(firstOp, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddPairwiseWideningAndAdd_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwiseWideningAndAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.AddPairwiseWideningAndAdd(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddPairwiseWideningAndAdd_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwiseWideningAndAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.AddPairwiseWideningAndAdd(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddPairwiseWideningAndAdd_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwiseWideningAndAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.AddPairwiseWideningAndAdd(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddPairwiseWideningAndAdd_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwiseWideningAndAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.AddPairwiseWideningAndAdd(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddPairwiseWideningAndAdd_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwiseWideningAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.AddPairwiseWideningAndAdd(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddPairwiseWideningAndAdd_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwiseWideningAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.AddPairwiseWideningAndAdd(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddPairwiseWideningAndAdd_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwiseWideningAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.AddPairwiseWideningAndAdd(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddPairwiseWideningAndAdd_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwiseWideningAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.AddPairwiseWideningAndAdd(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddPairwiseWideningAndAdd_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwiseWideningAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.AddPairwiseWideningAndAdd(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddPairwiseWideningAndAdd_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwiseWideningAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.AddPairwiseWideningAndAdd(left, right, i) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "AddPairwiseWideningAndAddScalar_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwiseWideningAndAddScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "Helpers.AddPairwiseWideningAndAdd(left, right, 0) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "AddPairwiseWideningAndAddScalar_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwiseWideningAndAddScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "Helpers.AddPairwiseWideningAndAdd(left, right, 0) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleUnOpTest.template", new Dictionary { ["TestName"] = "AddPairwiseWideningScalar_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwiseWideningScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "Helpers.AddPairwiseWidening(firstOp, 0) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleUnOpTest.template", new Dictionary { ["TestName"] = "AddPairwiseWideningScalar_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwiseWideningScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "Helpers.AddPairwiseWidening(firstOp, 0) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddRoundedHighNarrowingLower_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddRoundedHighNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.AddRoundedHighNarrowing(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddRoundedHighNarrowingLower_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddRoundedHighNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.AddRoundedHighNarrowing(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddRoundedHighNarrowingLower_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddRoundedHighNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.AddRoundedHighNarrowing(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddRoundedHighNarrowingLower_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddRoundedHighNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.AddRoundedHighNarrowing(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddRoundedHighNarrowingLower_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddRoundedHighNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.AddRoundedHighNarrowing(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddRoundedHighNarrowingLower_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddRoundedHighNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.AddRoundedHighNarrowing(left[i], right[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AddRoundedHighNarrowingUpper_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddRoundedHighNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.AddRoundedHighNarrowingUpper(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AddRoundedHighNarrowingUpper_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddRoundedHighNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.AddRoundedHighNarrowingUpper(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AddRoundedHighNarrowingUpper_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddRoundedHighNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.AddRoundedHighNarrowingUpper(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AddRoundedHighNarrowingUpper_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddRoundedHighNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.AddRoundedHighNarrowingUpper(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AddRoundedHighNarrowingUpper_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddRoundedHighNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.AddRoundedHighNarrowingUpper(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "AddRoundedHighNarrowingUpper_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddRoundedHighNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.AddRoundedHighNarrowingUpper(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddSaturate_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.AddSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddSaturate_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.AddSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddSaturate_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.AddSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddSaturate_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.AddSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddSaturate_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.AddSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddSaturate_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.AddSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddSaturate_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.AddSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddSaturate_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.AddSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddSaturate_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.AddSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddSaturate_Vector128_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.AddSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddSaturate_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.AddSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddSaturate_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.AddSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddSaturate_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.AddSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddSaturate_Vector128_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.AddSaturate(left[i], right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "AddSaturateScalar_Vector64_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "Helpers.AddSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "AddSaturateScalar_Vector64_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "Helpers.AddSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "AddScalar_Vector64_Double", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.Add(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "AddScalar_Vector64_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "Helpers.Add(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "AddScalar_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.Add(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "AddScalar_Vector64_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "Helpers.Add(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddWideningLower_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.AddWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddWideningLower_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.AddWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddWideningLower_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.AddWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddWideningLower_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.AddWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddWideningLower_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.AddWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddWideningLower_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.AddWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddWideningLower_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.AddWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddWideningLower_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.AddWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddWideningLower_Vector128_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.AddWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddWideningLower_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.AddWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddWideningLower_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.AddWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddWideningLower_Vector128_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.AddWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddWideningUpper_Vector128_Byte_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.AddWideningUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddWideningUpper_Vector128_Int16_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.AddWideningUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddWideningUpper_Vector128_Int16_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.AddWideningUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddWideningUpper_Vector128_Int32_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.AddWideningUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddWideningUpper_Vector128_Int32_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.AddWideningUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddWideningUpper_Vector128_Int64_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.AddWideningUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddWideningUpper_Vector128_SByte_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.AddWideningUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddWideningUpper_Vector128_UInt16_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.AddWideningUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddWideningUpper_Vector128_UInt16_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.AddWideningUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddWideningUpper_Vector128_UInt32_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.AddWideningUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddWideningUpper_Vector128_UInt32_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.AddWideningUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddWideningUpper_Vector128_UInt64_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.AddWideningUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "And_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "And", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.And(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "And_Vector64_Double", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "And", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.And(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "And_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "And", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.And(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "And_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "And", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.And(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "And_Vector64_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "And", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.And(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "And_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "And", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.And(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "And_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "And", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.And(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "And_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "And", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.And(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "And_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "And", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.And(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "And_Vector64_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "And", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.And(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "And_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "And", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.And(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "And_Vector128_Double", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "And", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.And(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "And_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "And", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.And(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "And_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "And", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.And(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "And_Vector128_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "And", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.And(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "And_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "And", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.And(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "And_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "And", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.And(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "And_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "And", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.And(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "And_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "And", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.And(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "And_Vector128_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "And", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.And(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "BitwiseClear_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseClear", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.BitwiseClear(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "BitwiseClear_Vector64_Double", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseClear", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.BitwiseClear(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "BitwiseClear_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseClear", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.BitwiseClear(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "BitwiseClear_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseClear", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.BitwiseClear(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "BitwiseClear_Vector64_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseClear", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.BitwiseClear(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "BitwiseClear_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseClear", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.BitwiseClear(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "BitwiseClear_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseClear", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.BitwiseClear(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "BitwiseClear_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseClear", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.BitwiseClear(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "BitwiseClear_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseClear", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.BitwiseClear(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "BitwiseClear_Vector64_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseClear", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.BitwiseClear(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "BitwiseClear_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseClear", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.BitwiseClear(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "BitwiseClear_Vector128_Double", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseClear", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.BitwiseClear(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "BitwiseClear_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseClear", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.BitwiseClear(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "BitwiseClear_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseClear", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.BitwiseClear(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "BitwiseClear_Vector128_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseClear", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.BitwiseClear(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "BitwiseClear_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseClear", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.BitwiseClear(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "BitwiseClear_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseClear", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.BitwiseClear(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "BitwiseClear_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseClear", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.BitwiseClear(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "BitwiseClear_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseClear", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.BitwiseClear(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "BitwiseClear_Vector128_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseClear", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.BitwiseClear(left[i], right[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "BitwiseSelect_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseSelect", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.BitwiseSelect(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "BitwiseSelect_Vector64_Double", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseSelect", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp3"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.BitwiseSelect(firstOp[i], secondOp[i], thirdOp[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "BitwiseSelect_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseSelect", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.BitwiseSelect(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "BitwiseSelect_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseSelect", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.BitwiseSelect(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "BitwiseSelect_Vector64_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseSelect", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.BitwiseSelect(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "BitwiseSelect_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseSelect", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.BitwiseSelect(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "BitwiseSelect_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseSelect", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.BitwiseSelect(firstOp[i], secondOp[i], thirdOp[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "BitwiseSelect_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseSelect", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.BitwiseSelect(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "BitwiseSelect_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseSelect", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.BitwiseSelect(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "BitwiseSelect_Vector64_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseSelect", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt64", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.BitwiseSelect(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "BitwiseSelect_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseSelect", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.BitwiseSelect(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "BitwiseSelect_Vector128_Double", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseSelect", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp3"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.BitwiseSelect(firstOp[i], secondOp[i], thirdOp[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "BitwiseSelect_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseSelect", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.BitwiseSelect(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "BitwiseSelect_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseSelect", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.BitwiseSelect(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "BitwiseSelect_Vector128_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseSelect", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.BitwiseSelect(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "BitwiseSelect_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseSelect", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.BitwiseSelect(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "BitwiseSelect_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseSelect", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.BitwiseSelect(firstOp[i], secondOp[i], thirdOp[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "BitwiseSelect_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseSelect", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.BitwiseSelect(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "BitwiseSelect_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseSelect", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.BitwiseSelect(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "BitwiseSelect_Vector128_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "BitwiseSelect", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.BitwiseSelect(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareEqual_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.CompareEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareEqual_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.CompareEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareEqual_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.CompareEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareEqual_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.CompareEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareEqual_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.CompareEqual(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareEqual_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.CompareEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareEqual_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.CompareEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareEqual_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.CompareEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareEqual_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.CompareEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareEqual_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.CompareEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareEqual_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.CompareEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareEqual_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.CompareEqual(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareEqual_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.CompareEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareEqual_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.CompareEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThan_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThan", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.CompareGreaterThan(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThan_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThan", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.CompareGreaterThan(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThan_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThan", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.CompareGreaterThan(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThan_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThan", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.CompareGreaterThan(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThan_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThan", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.CompareGreaterThan(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThan_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThan", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.CompareGreaterThan(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThan_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThan", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.CompareGreaterThan(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThan_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.CompareGreaterThan(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThan_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.CompareGreaterThan(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThan_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.CompareGreaterThan(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThan_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.CompareGreaterThan(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThan_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.CompareGreaterThan(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThan_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.CompareGreaterThan(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThan_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.CompareGreaterThan(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThanOrEqual_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThanOrEqual", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.CompareGreaterThanOrEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThanOrEqual_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThanOrEqual", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.CompareGreaterThanOrEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThanOrEqual_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThanOrEqual", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.CompareGreaterThanOrEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThanOrEqual_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThanOrEqual", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.CompareGreaterThanOrEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThanOrEqual_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThanOrEqual", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.CompareGreaterThanOrEqual(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThanOrEqual_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThanOrEqual", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.CompareGreaterThanOrEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThanOrEqual_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThanOrEqual", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.CompareGreaterThanOrEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThanOrEqual_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.CompareGreaterThanOrEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThanOrEqual_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.CompareGreaterThanOrEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThanOrEqual_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.CompareGreaterThanOrEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThanOrEqual_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.CompareGreaterThanOrEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThanOrEqual_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.CompareGreaterThanOrEqual(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThanOrEqual_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.CompareGreaterThanOrEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThanOrEqual_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.CompareGreaterThanOrEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThan_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThan", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.CompareLessThan(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThan_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThan", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.CompareLessThan(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThan_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThan", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.CompareLessThan(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThan_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThan", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.CompareLessThan(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThan_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThan", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.CompareLessThan(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThan_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThan", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.CompareLessThan(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThan_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThan", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.CompareLessThan(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThan_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.CompareLessThan(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThan_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.CompareLessThan(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThan_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.CompareLessThan(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThan_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.CompareLessThan(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThan_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.CompareLessThan(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThan_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.CompareLessThan(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThan_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.CompareLessThan(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThanOrEqual_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThanOrEqual", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.CompareLessThanOrEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThanOrEqual_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThanOrEqual", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.CompareLessThanOrEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThanOrEqual_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThanOrEqual", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.CompareLessThanOrEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThanOrEqual_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThanOrEqual", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.CompareLessThanOrEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThanOrEqual_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThanOrEqual", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.CompareLessThanOrEqual(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThanOrEqual_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThanOrEqual", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.CompareLessThanOrEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThanOrEqual_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThanOrEqual", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.CompareLessThanOrEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThanOrEqual_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.CompareLessThanOrEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThanOrEqual_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.CompareLessThanOrEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThanOrEqual_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.CompareLessThanOrEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThanOrEqual_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.CompareLessThanOrEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThanOrEqual_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.CompareLessThanOrEqual(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThanOrEqual_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.CompareLessThanOrEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThanOrEqual_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.CompareLessThanOrEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareTest_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareTest", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.CompareTest(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareTest_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareTest", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.CompareTest(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareTest_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareTest", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.CompareTest(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareTest_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareTest", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.CompareTest(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareTest_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareTest", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.CompareTest(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareTest_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareTest", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.CompareTest(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareTest_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareTest", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.CompareTest(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareTest_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareTest", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.CompareTest(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareTest_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareTest", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.CompareTest(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareTest_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareTest", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.CompareTest(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareTest_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareTest", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.CompareTest(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareTest_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareTest", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.CompareTest(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareTest_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareTest", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.CompareTest(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareTest_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareTest", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.CompareTest(left[i], right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "DivideScalar_Vector64_Double", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DivideScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.Divide(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "DivideScalar_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DivideScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.Divide(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "DuplicateSelectedScalarToVector64_Vector64_Byte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateSelectedScalarToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["Imm"] = "1", ["ValidateIterResult"] = "firstOp[Imm] != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "DuplicateSelectedScalarToVector64_Vector64_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateSelectedScalarToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "firstOp[Imm] != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "DuplicateSelectedScalarToVector64_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateSelectedScalarToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "firstOp[Imm] != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "DuplicateSelectedScalarToVector64_Vector64_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateSelectedScalarToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "1", ["ValidateIterResult"] = "firstOp[Imm] != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "DuplicateSelectedScalarToVector64_Vector64_Single_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateSelectedScalarToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["Imm"] = "1", ["ValidateIterResult"] = "firstOp[Imm] != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "DuplicateSelectedScalarToVector64_Vector64_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateSelectedScalarToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "firstOp[Imm] != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "DuplicateSelectedScalarToVector64_Vector64_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateSelectedScalarToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "firstOp[Imm] != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "DuplicateSelectedScalarToVector64_Vector128_Byte_8", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateSelectedScalarToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["Imm"] = "8", ["ValidateIterResult"] = "firstOp[Imm] != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "DuplicateSelectedScalarToVector64_Vector128_Int16_4", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateSelectedScalarToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "4", ["ValidateIterResult"] = "firstOp[Imm] != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "DuplicateSelectedScalarToVector64_Vector128_Int32_2", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateSelectedScalarToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "2", ["ValidateIterResult"] = "firstOp[Imm] != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "DuplicateSelectedScalarToVector64_Vector128_SByte_8", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateSelectedScalarToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "8", ["ValidateIterResult"] = "firstOp[Imm] != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "DuplicateSelectedScalarToVector64_Vector128_Single_2", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateSelectedScalarToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["Imm"] = "2", ["ValidateIterResult"] = "firstOp[Imm] != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "DuplicateSelectedScalarToVector64_Vector128_UInt16_4", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateSelectedScalarToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "4", ["ValidateIterResult"] = "firstOp[Imm] != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "DuplicateSelectedScalarToVector64_Vector128_UInt32_2", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateSelectedScalarToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "2", ["ValidateIterResult"] = "firstOp[Imm] != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "DuplicateSelectedScalarToVector128_Vector64_Byte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateSelectedScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["Imm"] = "1", ["ValidateIterResult"] = "firstOp[Imm] != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "DuplicateSelectedScalarToVector128_Vector64_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateSelectedScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "firstOp[Imm] != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "DuplicateSelectedScalarToVector128_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateSelectedScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "firstOp[Imm] != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "DuplicateSelectedScalarToVector128_Vector64_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateSelectedScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "1", ["ValidateIterResult"] = "firstOp[Imm] != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "DuplicateSelectedScalarToVector128_Vector64_Single_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateSelectedScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["Imm"] = "1", ["ValidateIterResult"] = "firstOp[Imm] != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "DuplicateSelectedScalarToVector128_Vector64_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateSelectedScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "firstOp[Imm] != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "DuplicateSelectedScalarToVector128_Vector64_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateSelectedScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "firstOp[Imm] != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "DuplicateSelectedScalarToVector128_Vector128_Byte_8", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateSelectedScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["Imm"] = "8", ["ValidateIterResult"] = "firstOp[Imm] != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "DuplicateSelectedScalarToVector128_Vector128_Int16_4", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateSelectedScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "4", ["ValidateIterResult"] = "firstOp[Imm] != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "DuplicateSelectedScalarToVector128_Vector128_Int32_2", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateSelectedScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "2", ["ValidateIterResult"] = "firstOp[Imm] != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "DuplicateSelectedScalarToVector128_Vector128_SByte_8", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateSelectedScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "8", ["ValidateIterResult"] = "firstOp[Imm] != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "DuplicateSelectedScalarToVector128_Vector128_Single_2", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateSelectedScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["Imm"] = "2", ["ValidateIterResult"] = "firstOp[Imm] != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "DuplicateSelectedScalarToVector128_Vector128_UInt16_4", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateSelectedScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "4", ["ValidateIterResult"] = "firstOp[Imm] != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "DuplicateSelectedScalarToVector128_Vector128_UInt32_2", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateSelectedScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "2", ["ValidateIterResult"] = "firstOp[Imm] != result[i]"}), - ("DuplicateTest.template", new Dictionary { ["TestName"] = "DuplicateToVector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != data", ["ValidateRemainingResults"] = "result[i] != data"}), - ("ImmOpTest.template", new Dictionary { ["TestName"] = "DuplicateToVector64_Byte_31", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["Imm"] = "31", ["ValidateFirstResult"] = "result[0] != 31", ["ValidateRemainingResults"] = "result[i] != 31"}), - ("DuplicateTest.template", new Dictionary { ["TestName"] = "DuplicateToVector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != data", ["ValidateRemainingResults"] = "result[i] != data"}), - ("ImmOpTest.template", new Dictionary { ["TestName"] = "DuplicateToVector64_Int16_31", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["Imm"] = "31", ["ValidateFirstResult"] = "result[0] != 31", ["ValidateRemainingResults"] = "result[i] != 31"}), - ("DuplicateTest.template", new Dictionary { ["TestName"] = "DuplicateToVector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != data", ["ValidateRemainingResults"] = "result[i] != data"}), - ("ImmOpTest.template", new Dictionary { ["TestName"] = "DuplicateToVector64_Int32_31", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["Imm"] = "31", ["ValidateFirstResult"] = "result[0] != 31", ["ValidateRemainingResults"] = "result[i] != 31"}), - ("DuplicateTest.template", new Dictionary { ["TestName"] = "DuplicateToVector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != data", ["ValidateRemainingResults"] = "result[i] != data"}), - ("ImmOpTest.template", new Dictionary { ["TestName"] = "DuplicateToVector64_SByte_31", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["Imm"] = "31", ["ValidateFirstResult"] = "result[0] != 31", ["ValidateRemainingResults"] = "result[i] != 31"}), - ("DuplicateTest.template", new Dictionary { ["TestName"] = "DuplicateToVector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "result[0] != data", ["ValidateRemainingResults"] = "result[i] != data"}), - ("ImmOpTest.template", new Dictionary { ["TestName"] = "DuplicateToVector64_Single_31", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "8", ["Imm"] = "31", ["ValidateFirstResult"] = "result[0] != 31", ["ValidateRemainingResults"] = "result[i] != 31"}), - ("DuplicateTest.template", new Dictionary { ["TestName"] = "DuplicateToVector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != data", ["ValidateRemainingResults"] = "result[i] != data"}), - ("ImmOpTest.template", new Dictionary { ["TestName"] = "DuplicateToVector64_UInt16_31", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["Imm"] = "31", ["ValidateFirstResult"] = "result[0] != 31", ["ValidateRemainingResults"] = "result[i] != 31"}), - ("DuplicateTest.template", new Dictionary { ["TestName"] = "DuplicateToVector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != data", ["ValidateRemainingResults"] = "result[i] != data"}), - ("ImmOpTest.template", new Dictionary { ["TestName"] = "DuplicateToVector64_UInt32_31", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["Imm"] = "31", ["ValidateFirstResult"] = "result[0] != 31", ["ValidateRemainingResults"] = "result[i] != 31"}), - ("DuplicateTest.template", new Dictionary { ["TestName"] = "DuplicateToVector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != data", ["ValidateRemainingResults"] = "result[i] != data"}), - ("ImmOpTest.template", new Dictionary { ["TestName"] = "DuplicateToVector128_Byte_31", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["Imm"] = "31", ["ValidateFirstResult"] = "result[0] != 31", ["ValidateRemainingResults"] = "result[i] != 31"}), - ("DuplicateTest.template", new Dictionary { ["TestName"] = "DuplicateToVector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != data", ["ValidateRemainingResults"] = "result[i] != data"}), - ("ImmOpTest.template", new Dictionary { ["TestName"] = "DuplicateToVector128_Int16_31", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["Imm"] = "31", ["ValidateFirstResult"] = "result[0] != 31", ["ValidateRemainingResults"] = "result[i] != 31"}), - ("DuplicateTest.template", new Dictionary { ["TestName"] = "DuplicateToVector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != data", ["ValidateRemainingResults"] = "result[i] != data"}), - ("ImmOpTest.template", new Dictionary { ["TestName"] = "DuplicateToVector128_Int32_31", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["Imm"] = "31", ["ValidateFirstResult"] = "result[0] != 31", ["ValidateRemainingResults"] = "result[i] != 31"}), - ("DuplicateTest.template", new Dictionary { ["TestName"] = "DuplicateToVector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != data", ["ValidateRemainingResults"] = "result[i] != data"}), - ("ImmOpTest.template", new Dictionary { ["TestName"] = "DuplicateToVector128_SByte_31", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["Imm"] = "31", ["ValidateFirstResult"] = "result[0] != 31", ["ValidateRemainingResults"] = "result[i] != 31"}), - ("DuplicateTest.template", new Dictionary { ["TestName"] = "DuplicateToVector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "result[0] != data", ["ValidateRemainingResults"] = "result[i] != data"}), - ("ImmOpTest.template", new Dictionary { ["TestName"] = "DuplicateToVector128_Single_31", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["Imm"] = "31", ["ValidateFirstResult"] = "result[0] != 31", ["ValidateRemainingResults"] = "result[i] != 31"}), - ("DuplicateTest.template", new Dictionary { ["TestName"] = "DuplicateToVector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != data", ["ValidateRemainingResults"] = "result[i] != data"}), - ("ImmOpTest.template", new Dictionary { ["TestName"] = "DuplicateToVector128_UInt16_31", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["Imm"] = "31", ["ValidateFirstResult"] = "result[0] != 31", ["ValidateRemainingResults"] = "result[i] != 31"}), - ("DuplicateTest.template", new Dictionary { ["TestName"] = "DuplicateToVector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != data", ["ValidateRemainingResults"] = "result[i] != data"}), - ("ImmOpTest.template", new Dictionary { ["TestName"] = "DuplicateToVector128_UInt32_31", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["Imm"] = "31", ["ValidateFirstResult"] = "result[0] != 31", ["ValidateRemainingResults"] = "result[i] != 31"}), - ("ExtractTest.template", new Dictionary { ["TestName"] = "Extract_Vector64_Byte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Extract", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ElementIndex"] = "1", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("ExtractTest.template", new Dictionary { ["TestName"] = "Extract_Vector64_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Extract", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ElementIndex"] = "1", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("ExtractTest.template", new Dictionary { ["TestName"] = "Extract_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Extract", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ElementIndex"] = "1", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("ExtractTest.template", new Dictionary { ["TestName"] = "Extract_Vector64_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Extract", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ElementIndex"] = "1", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("ExtractTest.template", new Dictionary { ["TestName"] = "Extract_Vector64_Single_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Extract", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ElementIndex"] = "1", ["ValidateResult"] = "BitConverter.SingleToInt32Bits(firstOp[ElementIndex]) != BitConverter.SingleToInt32Bits(result)"}), - ("ExtractTest.template", new Dictionary { ["TestName"] = "Extract_Vector64_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Extract", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ElementIndex"] = "1", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("ExtractTest.template", new Dictionary { ["TestName"] = "Extract_Vector64_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Extract", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ElementIndex"] = "1", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("ExtractTest.template", new Dictionary { ["TestName"] = "Extract_Vector128_Byte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Extract", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ElementIndex"] = "1", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("ExtractTest.template", new Dictionary { ["TestName"] = "Extract_Vector128_Double_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Extract", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ElementIndex"] = "1", ["ValidateResult"] = "BitConverter.DoubleToInt64Bits(firstOp[ElementIndex]) != BitConverter.DoubleToInt64Bits(result)"}), - ("ExtractTest.template", new Dictionary { ["TestName"] = "Extract_Vector128_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Extract", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ElementIndex"] = "1", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("ExtractTest.template", new Dictionary { ["TestName"] = "Extract_Vector128_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Extract", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ElementIndex"] = "1", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("ExtractTest.template", new Dictionary { ["TestName"] = "Extract_Vector128_Int64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Extract", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ElementIndex"] = "1", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("ExtractTest.template", new Dictionary { ["TestName"] = "Extract_Vector128_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Extract", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ElementIndex"] = "1", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("ExtractTest.template", new Dictionary { ["TestName"] = "Extract_Vector128_Single_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Extract", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ElementIndex"] = "1", ["ValidateResult"] = "BitConverter.SingleToInt32Bits(firstOp[ElementIndex]) != BitConverter.SingleToInt32Bits(result)"}), - ("ExtractTest.template", new Dictionary { ["TestName"] = "Extract_Vector128_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Extract", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ElementIndex"] = "1", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("ExtractTest.template", new Dictionary { ["TestName"] = "Extract_Vector128_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Extract", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ElementIndex"] = "1", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("ExtractTest.template", new Dictionary { ["TestName"] = "Extract_Vector128_UInt64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Extract", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ElementIndex"] = "1", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ExtractNarrowingUpper_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ExtractNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.ExtractNarrowingUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ExtractNarrowingUpper_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ExtractNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.ExtractNarrowingUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ExtractNarrowingUpper_Vector128_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ExtractNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.ExtractNarrowingUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ExtractNarrowingUpper_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ExtractNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.ExtractNarrowingUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ExtractNarrowingUpper_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ExtractNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.ExtractNarrowingUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ExtractNarrowingUpper_Vector128_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ExtractNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ExtractNarrowingUpper(left, right, i) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "ExtractNarrowingLower_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ExtractNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.ExtractNarrowing(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "ExtractNarrowingLower_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ExtractNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.ExtractNarrowing(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "ExtractNarrowingLower_Vector128_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ExtractNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.ExtractNarrowing(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "ExtractNarrowingLower_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ExtractNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.ExtractNarrowing(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "ExtractNarrowingLower_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ExtractNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.ExtractNarrowing(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "ExtractNarrowingLower_Vector128_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ExtractNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ExtractNarrowing(firstOp[i]) != result[i]"}), - ("ExtractVectorTest.template", new Dictionary { ["TestName"] = "ExtractVector64_Byte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ExtractVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ElementIndex"] = "1", ["ValidateIterResult"] = "Helpers.ExtractVector(firstOp, secondOp, ElementIndex, i) != result[i]"}), - ("ExtractVectorTest.template", new Dictionary { ["TestName"] = "ExtractVector64_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ExtractVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ElementIndex"] = "1", ["ValidateIterResult"] = "Helpers.ExtractVector(firstOp, secondOp, ElementIndex, i) != result[i]"}), - ("ExtractVectorTest.template", new Dictionary { ["TestName"] = "ExtractVector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ExtractVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ElementIndex"] = "1", ["ValidateIterResult"] = "Helpers.ExtractVector(firstOp, secondOp, ElementIndex, i) != result[i]"}), - ("ExtractVectorTest.template", new Dictionary { ["TestName"] = "ExtractVector64_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ExtractVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ElementIndex"] = "1", ["ValidateIterResult"] = "Helpers.ExtractVector(firstOp, secondOp, ElementIndex, i) != result[i]"}), - ("ExtractVectorTest.template", new Dictionary { ["TestName"] = "ExtractVector64_Single_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ExtractVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ElementIndex"] = "1", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.ExtractVector(firstOp, secondOp, ElementIndex, i)) != BitConverter.SingleToInt32Bits(result[i])"}), - ("ExtractVectorTest.template", new Dictionary { ["TestName"] = "ExtractVector64_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ExtractVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ElementIndex"] = "1", ["ValidateIterResult"] = "Helpers.ExtractVector(firstOp, secondOp, ElementIndex, i) != result[i]"}), - ("ExtractVectorTest.template", new Dictionary { ["TestName"] = "ExtractVector64_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ExtractVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ElementIndex"] = "1", ["ValidateIterResult"] = "Helpers.ExtractVector(firstOp, secondOp, ElementIndex, i) != result[i]"}), - ("ExtractVectorTest.template", new Dictionary { ["TestName"] = "ExtractVector128_Byte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ElementIndex"] = "1", ["ValidateIterResult"] = "Helpers.ExtractVector(firstOp, secondOp, ElementIndex, i) != result[i]"}), - ("ExtractVectorTest.template", new Dictionary { ["TestName"] = "ExtractVector128_Double_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ElementIndex"] = "1", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.ExtractVector(firstOp, secondOp, ElementIndex, i)) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("ExtractVectorTest.template", new Dictionary { ["TestName"] = "ExtractVector128_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ElementIndex"] = "1", ["ValidateIterResult"] = "Helpers.ExtractVector(firstOp, secondOp, ElementIndex, i) != result[i]"}), - ("ExtractVectorTest.template", new Dictionary { ["TestName"] = "ExtractVector128_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ElementIndex"] = "1", ["ValidateIterResult"] = "Helpers.ExtractVector(firstOp, secondOp, ElementIndex, i) != result[i]"}), - ("ExtractVectorTest.template", new Dictionary { ["TestName"] = "ExtractVector128_Int64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ElementIndex"] = "1", ["ValidateIterResult"] = "Helpers.ExtractVector(firstOp, secondOp, ElementIndex, i) != result[i]"}), - ("ExtractVectorTest.template", new Dictionary { ["TestName"] = "ExtractVector128_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ElementIndex"] = "1", ["ValidateIterResult"] = "Helpers.ExtractVector(firstOp, secondOp, ElementIndex, i) != result[i]"}), - ("ExtractVectorTest.template", new Dictionary { ["TestName"] = "ExtractVector128_Single_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ElementIndex"] = "1", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.ExtractVector(firstOp, secondOp, ElementIndex, i)) != BitConverter.SingleToInt32Bits(result[i])"}), - ("ExtractVectorTest.template", new Dictionary { ["TestName"] = "ExtractVector128_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ElementIndex"] = "1", ["ValidateIterResult"] = "Helpers.ExtractVector(firstOp, secondOp, ElementIndex, i) != result[i]"}), - ("ExtractVectorTest.template", new Dictionary { ["TestName"] = "ExtractVector128_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ElementIndex"] = "1", ["ValidateIterResult"] = "Helpers.ExtractVector(firstOp, secondOp, ElementIndex, i) != result[i]"}), - ("ExtractVectorTest.template", new Dictionary { ["TestName"] = "ExtractVector128_UInt64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ElementIndex"] = "1", ["ValidateIterResult"] = "Helpers.ExtractVector(firstOp, secondOp, ElementIndex, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedAddHalving_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedAddHalving", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.FusedAddHalving(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedAddHalving_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedAddHalving", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.FusedAddHalving(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedAddHalving_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedAddHalving", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.FusedAddHalving(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedAddHalving_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedAddHalving", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.FusedAddHalving(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedAddHalving_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedAddHalving", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.FusedAddHalving(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedAddHalving_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedAddHalving", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.FusedAddHalving(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedAddHalving_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedAddHalving", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.FusedAddHalving(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedAddHalving_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedAddHalving", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.FusedAddHalving(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedAddHalving_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedAddHalving", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.FusedAddHalving(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedAddHalving_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedAddHalving", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.FusedAddHalving(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedAddHalving_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedAddHalving", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.FusedAddHalving(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedAddHalving_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedAddHalving", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.FusedAddHalving(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedAddRoundedHalving_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedAddRoundedHalving", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.FusedAddRoundedHalving(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedAddRoundedHalving_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedAddRoundedHalving", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.FusedAddRoundedHalving(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedAddRoundedHalving_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedAddRoundedHalving", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.FusedAddRoundedHalving(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedAddRoundedHalving_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedAddRoundedHalving", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.FusedAddRoundedHalving(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedAddRoundedHalving_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedAddRoundedHalving", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.FusedAddRoundedHalving(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedAddRoundedHalving_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedAddRoundedHalving", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.FusedAddRoundedHalving(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedAddRoundedHalving_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedAddRoundedHalving", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.FusedAddRoundedHalving(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedAddRoundedHalving_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedAddRoundedHalving", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.FusedAddRoundedHalving(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedAddRoundedHalving_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedAddRoundedHalving", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.FusedAddRoundedHalving(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedAddRoundedHalving_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedAddRoundedHalving", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.FusedAddRoundedHalving(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedAddRoundedHalving_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedAddRoundedHalving", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.FusedAddRoundedHalving(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedAddRoundedHalving_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedAddRoundedHalving", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.FusedAddRoundedHalving(left[i], right[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplyAdd_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplyAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.FusedMultiplyAdd(firstOp[i], secondOp[i], thirdOp[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplyAdd_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplyAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.FusedMultiplyAdd(firstOp[i], secondOp[i], thirdOp[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplyAddScalar_Vector64_Double", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplyAddScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp3"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.FusedMultiplyAdd(firstOp[0], secondOp[0], thirdOp[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplyAddScalar_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplyAddScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.FusedMultiplyAdd(firstOp[0], secondOp[0], thirdOp[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("SimpleTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplyAddNegatedScalar_Vector64_Double", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplyAddNegatedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp3"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.FusedMultiplyAddNegated(firstOp[0], secondOp[0], thirdOp[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplyAddNegatedScalar_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplyAddNegatedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.FusedMultiplyAddNegated(firstOp[0], secondOp[0], thirdOp[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplySubtract_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplySubtract", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.FusedMultiplySubtract(firstOp[i], secondOp[i], thirdOp[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplySubtract_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplySubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.FusedMultiplySubtract(firstOp[i], secondOp[i], thirdOp[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplySubtractScalar_Vector64_Double", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplySubtractScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp3"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.FusedMultiplySubtract(firstOp[0], secondOp[0], thirdOp[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplySubtractScalar_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplySubtractScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.FusedMultiplySubtract(firstOp[0], secondOp[0], thirdOp[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("SimpleTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplySubtractNegatedScalar_Vector64_Double", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplySubtractNegatedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp3"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.FusedMultiplySubtractNegated(firstOp[0], secondOp[0], thirdOp[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplySubtractNegatedScalar_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplySubtractNegatedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.FusedMultiplySubtractNegated(firstOp[0], secondOp[0], thirdOp[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedSubtractHalving_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedSubtractHalving", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.FusedSubtractHalving(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedSubtractHalving_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedSubtractHalving", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.FusedSubtractHalving(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedSubtractHalving_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedSubtractHalving", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.FusedSubtractHalving(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedSubtractHalving_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedSubtractHalving", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.FusedSubtractHalving(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedSubtractHalving_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedSubtractHalving", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.FusedSubtractHalving(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedSubtractHalving_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedSubtractHalving", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.FusedSubtractHalving(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedSubtractHalving_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedSubtractHalving", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.FusedSubtractHalving(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedSubtractHalving_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedSubtractHalving", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.FusedSubtractHalving(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedSubtractHalving_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedSubtractHalving", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.FusedSubtractHalving(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedSubtractHalving_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedSubtractHalving", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.FusedSubtractHalving(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedSubtractHalving_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedSubtractHalving", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.FusedSubtractHalving(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "FusedSubtractHalving_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedSubtractHalving", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.FusedSubtractHalving(left[i], right[i]) != result[i]"}), - ("InsertTest.template", new Dictionary { ["TestName"] = "Insert_Vector64_Byte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Insert", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ElementIndex"] = "1", ["NextValueOp3"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex, thirdOp, i) != result[i]"}), - ("InsertTest.template", new Dictionary { ["TestName"] = "Insert_Vector64_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Insert", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ElementIndex"] = "1", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex, thirdOp, i) != result[i]"}), - ("InsertTest.template", new Dictionary { ["TestName"] = "Insert_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Insert", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ElementIndex"] = "1", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex, thirdOp, i) != result[i]"}), - ("InsertTest.template", new Dictionary { ["TestName"] = "Insert_Vector64_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Insert", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ElementIndex"] = "1", ["NextValueOp3"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex, thirdOp, i) != result[i]"}), - ("InsertTest.template", new Dictionary { ["TestName"] = "Insert_Vector64_Single_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Insert", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ElementIndex"] = "1", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Insert(firstOp, ElementIndex, thirdOp, i)) != BitConverter.SingleToInt32Bits(result[i])"}), - ("InsertTest.template", new Dictionary { ["TestName"] = "Insert_Vector64_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Insert", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ElementIndex"] = "1", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex, thirdOp, i) != result[i]"}), - ("InsertTest.template", new Dictionary { ["TestName"] = "Insert_Vector64_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Insert", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ElementIndex"] = "1", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex, thirdOp, i) != result[i]"}), - ("InsertTest.template", new Dictionary { ["TestName"] = "Insert_Vector128_Byte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ElementIndex"] = "1", ["NextValueOp3"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex, thirdOp, i) != result[i]"}), - ("InsertTest.template", new Dictionary { ["TestName"] = "Insert_Vector128_Double_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ElementIndex"] = "1", ["NextValueOp3"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.Insert(firstOp, ElementIndex, thirdOp, i)) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("InsertTest.template", new Dictionary { ["TestName"] = "Insert_Vector128_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ElementIndex"] = "1", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex, thirdOp, i) != result[i]"}), - ("InsertTest.template", new Dictionary { ["TestName"] = "Insert_Vector128_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ElementIndex"] = "1", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex, thirdOp, i) != result[i]"}), - ("InsertTest.template", new Dictionary { ["TestName"] = "Insert_Vector128_Int64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ElementIndex"] = "1", ["NextValueOp3"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex, thirdOp, i) != result[i]"}), - ("InsertTest.template", new Dictionary { ["TestName"] = "Insert_Vector128_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ElementIndex"] = "1", ["NextValueOp3"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex, thirdOp, i) != result[i]"}), - ("InsertTest.template", new Dictionary { ["TestName"] = "Insert_Vector128_Single_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ElementIndex"] = "1", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Insert(firstOp, ElementIndex, thirdOp, i)) != BitConverter.SingleToInt32Bits(result[i])"}), - ("InsertTest.template", new Dictionary { ["TestName"] = "Insert_Vector128_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ElementIndex"] = "1", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex, thirdOp, i) != result[i]"}), - ("InsertTest.template", new Dictionary { ["TestName"] = "Insert_Vector128_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ElementIndex"] = "1", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex, thirdOp, i) != result[i]"}), - ("InsertTest.template", new Dictionary { ["TestName"] = "Insert_Vector128_UInt64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ElementIndex"] = "1", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex, thirdOp, i) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "LeadingSignCount_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LeadingSignCount", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.CountLeadingSignBits(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "LeadingSignCount_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LeadingSignCount", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.CountLeadingSignBits(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "LeadingSignCount_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LeadingSignCount", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.CountLeadingSignBits(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "LeadingSignCount_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LeadingSignCount", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.CountLeadingSignBits(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "LeadingSignCount_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LeadingSignCount", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.CountLeadingSignBits(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "LeadingSignCount_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LeadingSignCount", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.CountLeadingSignBits(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "LeadingZeroCount_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LeadingZeroCount", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.CountLeadingZeroBits(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "LeadingZeroCount_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LeadingZeroCount", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.CountLeadingZeroBits(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "LeadingZeroCount_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LeadingZeroCount", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.CountLeadingZeroBits(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "LeadingZeroCount_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LeadingZeroCount", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.CountLeadingZeroBits(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "LeadingZeroCount_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LeadingZeroCount", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.CountLeadingZeroBits(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "LeadingZeroCount_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LeadingZeroCount", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.CountLeadingZeroBits(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "LeadingZeroCount_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LeadingZeroCount", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.CountLeadingZeroBits(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "LeadingZeroCount_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LeadingZeroCount", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.CountLeadingZeroBits(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "LeadingZeroCount_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LeadingZeroCount", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.CountLeadingZeroBits(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "LeadingZeroCount_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LeadingZeroCount", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.CountLeadingZeroBits(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "LeadingZeroCount_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LeadingZeroCount", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.CountLeadingZeroBits(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "LeadingZeroCount_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LeadingZeroCount", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.CountLeadingZeroBits(firstOp[i]) != result[i]"}), - ("LoadAndInsertScalarTest.template", new Dictionary { ["TestName"] = "LoadAndInsertScalar_Vector64_Byte_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LoadAndInsertScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ElementIndex"] = "7", ["NextValueOp3"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex, thirdOp, i) != result[i]"}), - ("LoadAndInsertScalarTest.template", new Dictionary { ["TestName"] = "LoadAndInsertScalar_Vector64_Int16_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LoadAndInsertScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ElementIndex"] = "3", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex, thirdOp, i) != result[i]"}), - ("LoadAndInsertScalarTest.template", new Dictionary { ["TestName"] = "LoadAndInsertScalar_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LoadAndInsertScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ElementIndex"] = "1", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex, thirdOp, i) != result[i]"}), - ("LoadAndInsertScalarTest.template", new Dictionary { ["TestName"] = "LoadAndInsertScalar_Vector64_SByte_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LoadAndInsertScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ElementIndex"] = "7", ["NextValueOp3"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex, thirdOp, i) != result[i]"}), - ("LoadAndInsertScalarTest.template", new Dictionary { ["TestName"] = "LoadAndInsertScalar_Vector64_Single_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LoadAndInsertScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ElementIndex"] = "1", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Insert(firstOp, ElementIndex, thirdOp, i)) != BitConverter.SingleToInt32Bits(result[i])"}), - ("LoadAndInsertScalarTest.template", new Dictionary { ["TestName"] = "LoadAndInsertScalar_Vector64_UInt16_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LoadAndInsertScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ElementIndex"] = "3", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex, thirdOp, i) != result[i]"}), - ("LoadAndInsertScalarTest.template", new Dictionary { ["TestName"] = "LoadAndInsertScalar_Vector64_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LoadAndInsertScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ElementIndex"] = "1", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex, thirdOp, i) != result[i]"}), - ("LoadAndInsertScalarTest.template", new Dictionary { ["TestName"] = "LoadAndInsertScalar_Vector128_Byte_15", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LoadAndInsertScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ElementIndex"] = "15", ["NextValueOp3"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex, thirdOp, i) != result[i]"}), - ("LoadAndInsertScalarTest.template", new Dictionary { ["TestName"] = "LoadAndInsertScalar_Vector128_Double_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LoadAndInsertScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ElementIndex"] = "1", ["NextValueOp3"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.Insert(firstOp, ElementIndex, thirdOp, i)) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("LoadAndInsertScalarTest.template", new Dictionary { ["TestName"] = "LoadAndInsertScalar_Vector128_Int16_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LoadAndInsertScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ElementIndex"] = "7", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex, thirdOp, i) != result[i]"}), - ("LoadAndInsertScalarTest.template", new Dictionary { ["TestName"] = "LoadAndInsertScalar_Vector128_Int32_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LoadAndInsertScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ElementIndex"] = "3", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex, thirdOp, i) != result[i]"}), - ("LoadAndInsertScalarTest.template", new Dictionary { ["TestName"] = "LoadAndInsertScalar_Vector128_Int64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LoadAndInsertScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ElementIndex"] = "1", ["NextValueOp3"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex, thirdOp, i) != result[i]"}), - ("LoadAndInsertScalarTest.template", new Dictionary { ["TestName"] = "LoadAndInsertScalar_Vector128_SByte_15", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LoadAndInsertScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ElementIndex"] = "15", ["NextValueOp3"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex, thirdOp, i) != result[i]"}), - ("LoadAndInsertScalarTest.template", new Dictionary { ["TestName"] = "LoadAndInsertScalar_Vector128_Single_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LoadAndInsertScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ElementIndex"] = "3", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Insert(firstOp, ElementIndex, thirdOp, i)) != BitConverter.SingleToInt32Bits(result[i])"}), - ("LoadAndInsertScalarTest.template", new Dictionary { ["TestName"] = "LoadAndInsertScalar_Vector128_UInt16_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LoadAndInsertScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ElementIndex"] = "7", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex, thirdOp, i) != result[i]"}), - ("LoadAndInsertScalarTest.template", new Dictionary { ["TestName"] = "LoadAndInsertScalar_Vector128_UInt32_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LoadAndInsertScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ElementIndex"] = "3", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex, thirdOp, i) != result[i]"}), - ("LoadAndInsertScalarTest.template", new Dictionary { ["TestName"] = "LoadAndInsertScalar_Vector128_UInt64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "LoadAndInsertScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ElementIndex"] = "1", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex, thirdOp, i) != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadAndReplicateToVector64_Byte", ["Isa"] = "AdvSimd", ["Method"] = "LoadAndReplicateToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "firstOp[0] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadAndReplicateToVector64_Int16", ["Isa"] = "AdvSimd", ["Method"] = "LoadAndReplicateToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "firstOp[0] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadAndReplicateToVector64_Int32", ["Isa"] = "AdvSimd", ["Method"] = "LoadAndReplicateToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "firstOp[0] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadAndReplicateToVector64_SByte", ["Isa"] = "AdvSimd", ["Method"] = "LoadAndReplicateToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "firstOp[0] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadAndReplicateToVector64_Single", ["Isa"] = "AdvSimd", ["Method"] = "LoadAndReplicateToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadAndReplicateToVector64_UInt16", ["Isa"] = "AdvSimd", ["Method"] = "LoadAndReplicateToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "firstOp[0] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadAndReplicateToVector64_UInt32", ["Isa"] = "AdvSimd", ["Method"] = "LoadAndReplicateToVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "firstOp[0] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadAndReplicateToVector128_Byte", ["Isa"] = "AdvSimd", ["Method"] = "LoadAndReplicateToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "firstOp[0] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadAndReplicateToVector128_Int16", ["Isa"] = "AdvSimd", ["Method"] = "LoadAndReplicateToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "firstOp[0] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadAndReplicateToVector128_Int32", ["Isa"] = "AdvSimd", ["Method"] = "LoadAndReplicateToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "firstOp[0] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadAndReplicateToVector128_SByte", ["Isa"] = "AdvSimd", ["Method"] = "LoadAndReplicateToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "firstOp[0] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadAndReplicateToVector128_Single", ["Isa"] = "AdvSimd", ["Method"] = "LoadAndReplicateToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadAndReplicateToVector128_UInt16", ["Isa"] = "AdvSimd", ["Method"] = "LoadAndReplicateToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "firstOp[0] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadAndReplicateToVector128_UInt32", ["Isa"] = "AdvSimd", ["Method"] = "LoadAndReplicateToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "firstOp[0] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadVector64_Byte", ["Isa"] = "AdvSimd", ["Method"] = "LoadVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadVector64_Double", ["Isa"] = "AdvSimd", ["Method"] = "LoadVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(firstOp[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadVector64_Int16", ["Isa"] = "AdvSimd", ["Method"] = "LoadVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadVector64_Int32", ["Isa"] = "AdvSimd", ["Method"] = "LoadVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadVector64_Int64", ["Isa"] = "AdvSimd", ["Method"] = "LoadVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadVector64_SByte", ["Isa"] = "AdvSimd", ["Method"] = "LoadVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadVector64_Single", ["Isa"] = "AdvSimd", ["Method"] = "LoadVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(firstOp[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadVector64_UInt16", ["Isa"] = "AdvSimd", ["Method"] = "LoadVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadVector64_UInt32", ["Isa"] = "AdvSimd", ["Method"] = "LoadVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadVector64_UInt64", ["Isa"] = "AdvSimd", ["Method"] = "LoadVector64", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadVector128_Byte", ["Isa"] = "AdvSimd", ["Method"] = "LoadVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadVector128_Double", ["Isa"] = "AdvSimd", ["Method"] = "LoadVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(firstOp[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadVector128_Int16", ["Isa"] = "AdvSimd", ["Method"] = "LoadVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadVector128_Int32", ["Isa"] = "AdvSimd", ["Method"] = "LoadVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadVector128_Int64", ["Isa"] = "AdvSimd", ["Method"] = "LoadVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadVector128_SByte", ["Isa"] = "AdvSimd", ["Method"] = "LoadVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadVector128_Single", ["Isa"] = "AdvSimd", ["Method"] = "LoadVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(firstOp[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadVector128_UInt16", ["Isa"] = "AdvSimd", ["Method"] = "LoadVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadVector128_UInt32", ["Isa"] = "AdvSimd", ["Method"] = "LoadVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadVector128_UInt64", ["Isa"] = "AdvSimd", ["Method"] = "LoadVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Max_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Max", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.Max(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Max_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Max", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.Max(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Max_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Max", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.Max(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Max_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Max", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.Max(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Max_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Max", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Max(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Max_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Max", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.Max(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Max_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Max", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.Max(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Max_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Max", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.Max(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Max_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Max", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.Max(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Max_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Max", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.Max(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Max_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Max", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.Max(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Max_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Max", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Max(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Max_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Max", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.Max(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Max_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Max", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.Max(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MaxNumber_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxNumber", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.MaxNumber(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MaxNumber_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxNumber", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.MaxNumber(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "MaxNumberScalar_Vector64_Double", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxNumberScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.MaxNumber(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "MaxNumberScalar_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxNumberScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.MaxNumber(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MaxPairwise_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxPairwise", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.MaxPairwise(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MaxPairwise_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxPairwise", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.MaxPairwise(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MaxPairwise_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxPairwise", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.MaxPairwise(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MaxPairwise_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxPairwise", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.MaxPairwise(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MaxPairwise_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxPairwise", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.MaxPairwise(left, right, i)) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MaxPairwise_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxPairwise", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.MaxPairwise(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MaxPairwise_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxPairwise", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.MaxPairwise(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Min_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Min", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.Min(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Min_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Min", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.Min(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Min_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Min", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.Min(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Min_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Min", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.Min(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Min_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Min", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Min(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Min_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Min", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.Min(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Min_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Min", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.Min(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Min_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Min", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.Min(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Min_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Min", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.Min(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Min_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Min", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.Min(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Min_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Min", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.Min(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Min_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Min", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Min(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Min_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Min", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.Min(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Min_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Min", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.Min(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MinNumber_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinNumber", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.MinNumber(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MinNumber_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinNumber", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.MinNumber(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "MinNumberScalar_Vector64_Double", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinNumberScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.MinNumber(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "MinNumberScalar_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinNumberScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.MinNumber(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MinPairwise_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinPairwise", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.MinPairwise(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MinPairwise_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinPairwise", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.MinPairwise(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MinPairwise_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinPairwise", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.MinPairwise(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MinPairwise_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinPairwise", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.MinPairwise(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MinPairwise_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinPairwise", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.MinPairwise(left, right, i)) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MinPairwise_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinPairwise", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.MinPairwise(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MinPairwise_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinPairwise", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.MinPairwise(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Multiply_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Multiply", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.Multiply(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Multiply_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Multiply", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.Multiply(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Multiply_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Multiply", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.Multiply(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Multiply_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Multiply", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.Multiply(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Multiply_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Multiply", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Multiply(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Multiply_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Multiply", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.Multiply(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Multiply_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Multiply", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.Multiply(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Multiply_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Multiply", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.Multiply(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Multiply_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Multiply", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.Multiply(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Multiply_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Multiply", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.Multiply(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Multiply_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Multiply", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.Multiply(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Multiply_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Multiply", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Multiply(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Multiply_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Multiply", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.Multiply(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Multiply_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Multiply", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.Multiply(left[i], right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyScalar_Vector64_Double", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.Multiply(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyScalar_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.Multiply(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAdd_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAdd_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAdd_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAdd_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAdd_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAdd_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAdd_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAdd_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAdd_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAdd_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAdd_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAdd_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAddByScalar_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAddByScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[0]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAddByScalar_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAddByScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[0]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAddByScalar_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAddByScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[0]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAddByScalar_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAddByScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[0]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAddByScalar_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAddByScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[0]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAddByScalar_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAddByScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[0]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAddByScalar_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAddByScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[0]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAddByScalar_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAddByScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[0]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAddBySelectedScalar_Vector64_Int16_Vector64_Int16_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAddBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAddBySelectedScalar_Vector64_Int16_Vector128_Int16_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAddBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "7", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAddBySelectedScalar_Vector64_Int32_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAddBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAddBySelectedScalar_Vector64_Int32_Vector128_Int32_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAddBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAddBySelectedScalar_Vector64_UInt16_Vector64_UInt16_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAddBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAddBySelectedScalar_Vector64_UInt16_Vector128_UInt16_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAddBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "7", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAddBySelectedScalar_Vector64_UInt32_Vector64_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAddBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAddBySelectedScalar_Vector64_UInt32_Vector128_UInt32_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAddBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAddBySelectedScalar_Vector128_Int16_Vector64_Int16_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAddBySelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAddBySelectedScalar_Vector128_Int16_Vector128_Int16_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAddBySelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "7", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAddBySelectedScalar_Vector128_Int32_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAddBySelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAddBySelectedScalar_Vector128_Int32_Vector128_Int32_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAddBySelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAddBySelectedScalar_Vector128_UInt16_Vector64_UInt16_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAddBySelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAddBySelectedScalar_Vector128_UInt16_Vector128_UInt16_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAddBySelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "7", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAddBySelectedScalar_Vector128_UInt32_Vector64_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAddBySelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyAddBySelectedScalar_Vector128_UInt32_Vector128_UInt32_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyAddBySelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplyAdd(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyByScalar_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyByScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.Multiply(left[i], right[0]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyByScalar_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyByScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.Multiply(left[i], right[0]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyByScalar_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyByScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Multiply(left[i], right[0])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyByScalar_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyByScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.Multiply(left[i], right[0]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyByScalar_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyByScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.Multiply(left[i], right[0]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyByScalar_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyByScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.Multiply(left[i], right[0]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyByScalar_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyByScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.Multiply(left[i], right[0]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyByScalar_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyByScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Multiply(left[i], right[0])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyByScalar_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyByScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.Multiply(left[i], right[0]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyByScalar_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyByScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.Multiply(left[i], right[0]) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalar_Vector64_Int16_Vector64_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.Multiply(firstOp[i], secondOp[Imm]) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalar_Vector64_Int16_Vector128_Int16_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "7", ["ValidateIterResult"] = "Helpers.Multiply(firstOp[i], secondOp[Imm]) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalar_Vector64_Int32_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.Multiply(firstOp[i], secondOp[Imm]) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalar_Vector64_Int32_Vector128_Int32_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.Multiply(firstOp[i], secondOp[Imm]) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalar_Vector64_Single_Vector64_Single_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["Imm"] = "1", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Multiply(firstOp[i], secondOp[Imm])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalar_Vector64_Single_Vector128_Single_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["Imm"] = "3", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Multiply(firstOp[i], secondOp[Imm])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalar_Vector64_UInt16_Vector64_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.Multiply(firstOp[i], secondOp[Imm]) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalar_Vector64_UInt16_Vector128_UInt16_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "7", ["ValidateIterResult"] = "Helpers.Multiply(firstOp[i], secondOp[Imm]) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalar_Vector64_UInt32_Vector64_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.Multiply(firstOp[i], secondOp[Imm]) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalar_Vector64_UInt32_Vector128_UInt32_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.Multiply(firstOp[i], secondOp[Imm]) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalar_Vector128_Int16_Vector64_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.Multiply(firstOp[i], secondOp[Imm]) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalar_Vector128_Int16_Vector128_Int16_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "7", ["ValidateIterResult"] = "Helpers.Multiply(firstOp[i], secondOp[Imm]) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalar_Vector128_Int32_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.Multiply(firstOp[i], secondOp[Imm]) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalar_Vector128_Int32_Vector128_Int32_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.Multiply(firstOp[i], secondOp[Imm]) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalar_Vector128_Single_Vector64_Single_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["Imm"] = "1", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Multiply(firstOp[i], secondOp[Imm])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalar_Vector128_Single_Vector128_Single_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["Imm"] = "3", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Multiply(firstOp[i], secondOp[Imm])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalar_Vector128_UInt16_Vector64_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.Multiply(firstOp[i], secondOp[Imm]) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalar_Vector128_UInt16_Vector128_UInt16_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "7", ["ValidateIterResult"] = "Helpers.Multiply(firstOp[i], secondOp[Imm]) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalar_Vector128_UInt32_Vector64_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.Multiply(firstOp[i], secondOp[Imm]) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalar_Vector128_UInt32_Vector128_UInt32_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.Multiply(firstOp[i], secondOp[Imm]) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningLower_Vector64_Int16_Vector64_Int16_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplyWidening(firstOp[i], secondOp[Imm]) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningLower_Vector64_Int16_Vector128_Int16_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "7", ["ValidateIterResult"] = "Helpers.MultiplyWidening(firstOp[i], secondOp[Imm]) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningLower_Vector64_Int32_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.MultiplyWidening(firstOp[i], secondOp[Imm]) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningLower_Vector64_Int32_Vector128_Int32_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplyWidening(firstOp[i], secondOp[Imm]) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningLower_Vector64_UInt16_Vector64_UInt16_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplyWidening(firstOp[i], secondOp[Imm]) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningLower_Vector64_UInt16_Vector128_UInt16_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "7", ["ValidateIterResult"] = "Helpers.MultiplyWidening(firstOp[i], secondOp[Imm]) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningLower_Vector64_UInt32_Vector64_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.MultiplyWidening(firstOp[i], secondOp[Imm]) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningLower_Vector64_UInt32_Vector128_UInt32_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplyWidening(firstOp[i], secondOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningLowerAndAdd_Vector64_Int16_Vector64_Int16_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningLowerAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplyWideningAndAdd(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningLowerAndAdd_Vector64_Int16_Vector128_Int16_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningLowerAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "7", ["ValidateIterResult"] = "Helpers.MultiplyWideningAndAdd(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningLowerAndAdd_Vector64_Int32_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningLowerAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.MultiplyWideningAndAdd(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningLowerAndAdd_Vector64_Int32_Vector128_Int32_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningLowerAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplyWideningAndAdd(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningLowerAndAdd_Vector64_UInt16_Vector64_UInt16_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningLowerAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplyWideningAndAdd(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningLowerAndAdd_Vector64_UInt16_Vector128_UInt16_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningLowerAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "7", ["ValidateIterResult"] = "Helpers.MultiplyWideningAndAdd(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningLowerAndAdd_Vector64_UInt32_Vector64_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningLowerAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.MultiplyWideningAndAdd(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningLowerAndAdd_Vector64_UInt32_Vector128_UInt32_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningLowerAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplyWideningAndAdd(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningLowerAndSubtract_Vector64_Int16_Vector64_Int16_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningLowerAndSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplyWideningAndSubtract(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningLowerAndSubtract_Vector64_Int16_Vector128_Int16_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningLowerAndSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "7", ["ValidateIterResult"] = "Helpers.MultiplyWideningAndSubtract(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningLowerAndSubtract_Vector64_Int32_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningLowerAndSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.MultiplyWideningAndSubtract(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningLowerAndSubtract_Vector64_Int32_Vector128_Int32_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningLowerAndSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplyWideningAndSubtract(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningLowerAndSubtract_Vector64_UInt16_Vector64_UInt16_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningLowerAndSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplyWideningAndSubtract(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningLowerAndSubtract_Vector64_UInt16_Vector128_UInt16_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningLowerAndSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "7", ["ValidateIterResult"] = "Helpers.MultiplyWideningAndSubtract(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningLowerAndSubtract_Vector64_UInt32_Vector64_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningLowerAndSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.MultiplyWideningAndSubtract(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningLowerAndSubtract_Vector64_UInt32_Vector128_UInt32_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningLowerAndSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplyWideningAndSubtract(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningUpper_Vector128_Int16_Vector64_Int16_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplyByScalarWideningUpper(firstOp, secondOp[Imm], i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningUpper_Vector128_Int16_Vector128_Int16_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "7", ["ValidateIterResult"] = "Helpers.MultiplyByScalarWideningUpper(firstOp, secondOp[Imm], i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningUpper_Vector128_Int32_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.MultiplyByScalarWideningUpper(firstOp, secondOp[Imm], i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningUpper_Vector128_Int32_Vector128_Int32_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplyByScalarWideningUpper(firstOp, secondOp[Imm], i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningUpper_Vector128_UInt16_Vector64_UInt16_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplyByScalarWideningUpper(firstOp, secondOp[Imm], i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningUpper_Vector128_UInt16_Vector128_UInt16_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "7", ["ValidateIterResult"] = "Helpers.MultiplyByScalarWideningUpper(firstOp, secondOp[Imm], i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningUpper_Vector128_UInt32_Vector64_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.MultiplyByScalarWideningUpper(firstOp, secondOp[Imm], i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningUpper_Vector128_UInt32_Vector128_UInt32_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplyByScalarWideningUpper(firstOp, secondOp[Imm], i) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningUpperAndAdd_Vector128_Int16_Vector64_Int16_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningUpperAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplyByScalarWideningUpperAndAdd(firstOp, secondOp, thirdOp[Imm], i) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningUpperAndAdd_Vector128_Int16_Vector128_Int16_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningUpperAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "7", ["ValidateIterResult"] = "Helpers.MultiplyByScalarWideningUpperAndAdd(firstOp, secondOp, thirdOp[Imm], i) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningUpperAndAdd_Vector128_Int32_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningUpperAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.MultiplyByScalarWideningUpperAndAdd(firstOp, secondOp, thirdOp[Imm], i) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningUpperAndAdd_Vector128_Int32_Vector128_Int32_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningUpperAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplyByScalarWideningUpperAndAdd(firstOp, secondOp, thirdOp[Imm], i) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningUpperAndAdd_Vector128_UInt16_Vector64_UInt16_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningUpperAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplyByScalarWideningUpperAndAdd(firstOp, secondOp, thirdOp[Imm], i) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningUpperAndAdd_Vector128_UInt16_Vector128_UInt16_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningUpperAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "7", ["ValidateIterResult"] = "Helpers.MultiplyByScalarWideningUpperAndAdd(firstOp, secondOp, thirdOp[Imm], i) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningUpperAndAdd_Vector128_UInt32_Vector64_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningUpperAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.MultiplyByScalarWideningUpperAndAdd(firstOp, secondOp, thirdOp[Imm], i) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningUpperAndAdd_Vector128_UInt32_Vector128_UInt32_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningUpperAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplyByScalarWideningUpperAndAdd(firstOp, secondOp, thirdOp[Imm], i) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningUpperAndSubtract_Vector128_Int16_Vector64_Int16_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningUpperAndSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplyByScalarWideningUpperAndSubtract(firstOp, secondOp, thirdOp[Imm], i) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningUpperAndSubtract_Vector128_Int16_Vector128_Int16_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningUpperAndSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "7", ["ValidateIterResult"] = "Helpers.MultiplyByScalarWideningUpperAndSubtract(firstOp, secondOp, thirdOp[Imm], i) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningUpperAndSubtract_Vector128_Int32_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningUpperAndSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.MultiplyByScalarWideningUpperAndSubtract(firstOp, secondOp, thirdOp[Imm], i) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningUpperAndSubtract_Vector128_Int32_Vector128_Int32_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningUpperAndSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplyByScalarWideningUpperAndSubtract(firstOp, secondOp, thirdOp[Imm], i) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningUpperAndSubtract_Vector128_UInt16_Vector64_UInt16_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningUpperAndSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplyByScalarWideningUpperAndSubtract(firstOp, secondOp, thirdOp[Imm], i) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningUpperAndSubtract_Vector128_UInt16_Vector128_UInt16_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningUpperAndSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "7", ["ValidateIterResult"] = "Helpers.MultiplyByScalarWideningUpperAndSubtract(firstOp, secondOp, thirdOp[Imm], i) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningUpperAndSubtract_Vector128_UInt32_Vector64_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningUpperAndSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.MultiplyByScalarWideningUpperAndSubtract(firstOp, secondOp, thirdOp[Imm], i) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalarWideningUpperAndSubtract_Vector128_UInt32_Vector128_UInt32_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalarWideningUpperAndSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplyByScalarWideningUpperAndSubtract(firstOp, secondOp, thirdOp[Imm], i) != result[i]"}), - ("ImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyScalarBySelectedScalar_Vector64_Single_Vector64_Single_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyScalarBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["Imm"] = "1", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.Multiply(firstOp[0], secondOp[Imm])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("ImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyScalarBySelectedScalar_Vector64_Single_Vector128_Single_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyScalarBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["Imm"] = "3", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.Multiply(firstOp[0], secondOp[Imm])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtract_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtract", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtract_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtract", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtract_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtract", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtract_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtract", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtract_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtract", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtract_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtract", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtract_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtract_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtract_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtract_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtract_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtract_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtractBySelectedScalar_Vector64_Int16_Vector64_Int16_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtractBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtractBySelectedScalar_Vector64_Int16_Vector128_Int16_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtractBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "7", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtractBySelectedScalar_Vector64_Int32_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtractBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtractBySelectedScalar_Vector64_Int32_Vector128_Int32_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtractBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtractBySelectedScalar_Vector64_UInt16_Vector64_UInt16_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtractBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtractBySelectedScalar_Vector64_UInt16_Vector128_UInt16_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtractBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "7", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtractBySelectedScalar_Vector64_UInt32_Vector64_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtractBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtractBySelectedScalar_Vector64_UInt32_Vector128_UInt32_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtractBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtractBySelectedScalar_Vector128_Int16_Vector64_Int16_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtractBySelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtractBySelectedScalar_Vector128_Int16_Vector128_Int16_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtractBySelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "7", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtractBySelectedScalar_Vector128_Int32_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtractBySelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtractBySelectedScalar_Vector128_Int32_Vector128_Int32_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtractBySelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtractBySelectedScalar_Vector128_UInt16_Vector64_UInt16_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtractBySelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtractBySelectedScalar_Vector128_UInt16_Vector128_UInt16_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtractBySelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "7", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtractBySelectedScalar_Vector128_UInt32_Vector64_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtractBySelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtractBySelectedScalar_Vector128_UInt32_Vector128_UInt32_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtractBySelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "3", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[Imm]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtractByScalar_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtractByScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[0]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtractByScalar_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtractByScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[0]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtractByScalar_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtractByScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[0]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtractByScalar_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtractByScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[0]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtractByScalar_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtractByScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[0]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtractByScalar_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtractByScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[0]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtractByScalar_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtractByScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[0]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplySubtractByScalar_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplySubtractByScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.MultiplySubtract(firstOp[i], secondOp[i], thirdOp[0]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningLower_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.MultiplyWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningLower_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.MultiplyWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningLower_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.MultiplyWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningLower_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.MultiplyWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningLower_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.MultiplyWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningLower_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.MultiplyWidening(left[i], right[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningLowerAndAdd_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningLowerAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.MultiplyWideningAndAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningLowerAndAdd_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningLowerAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.MultiplyWideningAndAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningLowerAndAdd_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningLowerAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.MultiplyWideningAndAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningLowerAndAdd_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningLowerAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.MultiplyWideningAndAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningLowerAndAdd_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningLowerAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.MultiplyWideningAndAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningLowerAndAdd_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningLowerAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.MultiplyWideningAndAdd(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningLowerAndSubtract_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningLowerAndSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.MultiplyWideningAndSubtract(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningLowerAndSubtract_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningLowerAndSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.MultiplyWideningAndSubtract(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningLowerAndSubtract_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningLowerAndSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.MultiplyWideningAndSubtract(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningLowerAndSubtract_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningLowerAndSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.MultiplyWideningAndSubtract(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningLowerAndSubtract_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningLowerAndSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.MultiplyWideningAndSubtract(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningLowerAndSubtract_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningLowerAndSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.MultiplyWideningAndSubtract(firstOp[i], secondOp[i], thirdOp[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningUpper_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.MultiplyWideningUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningUpper_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.MultiplyWideningUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningUpper_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.MultiplyWideningUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningUpper_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.MultiplyWideningUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningUpper_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.MultiplyWideningUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningUpper_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.MultiplyWideningUpper(left, right, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningUpperAndAdd_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningUpperAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.MultiplyWideningUpperAndAdd(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningUpperAndAdd_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningUpperAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.MultiplyWideningUpperAndAdd(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningUpperAndAdd_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningUpperAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.MultiplyWideningUpperAndAdd(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningUpperAndAdd_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningUpperAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.MultiplyWideningUpperAndAdd(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningUpperAndAdd_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningUpperAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.MultiplyWideningUpperAndAdd(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningUpperAndAdd_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningUpperAndAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.MultiplyWideningUpperAndAdd(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningUpperAndSubtract_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningUpperAndSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.MultiplyWideningUpperAndSubtract(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningUpperAndSubtract_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningUpperAndSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.MultiplyWideningUpperAndSubtract(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningUpperAndSubtract_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningUpperAndSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.MultiplyWideningUpperAndSubtract(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningUpperAndSubtract_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningUpperAndSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.MultiplyWideningUpperAndSubtract(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningUpperAndSubtract_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningUpperAndSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.MultiplyWideningUpperAndSubtract(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "MultiplyWideningUpperAndSubtract_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyWideningUpperAndSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.MultiplyWideningUpperAndSubtract(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Negate_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Negate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.Negate(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Negate_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Negate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.Negate(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Negate_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Negate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.Negate(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Negate_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Negate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Negate(firstOp[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Negate_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Negate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.Negate(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Negate_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Negate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.Negate(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Negate_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Negate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.Negate(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Negate_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Negate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Negate(firstOp[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["TestName"] = "NegateScalar_Vector64_Double", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "NegateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.Negate(firstOp[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleUnOpTest.template", new Dictionary { ["TestName"] = "NegateScalar_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "NegateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.Negate(firstOp[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Not_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Not", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.Not(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Not_Vector64_Double", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Not", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.Not(firstOp[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Not_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Not", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.Not(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Not_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Not", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.Not(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Not_Vector64_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Not", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.Not(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Not_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Not", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.Not(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Not_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Not", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Not(firstOp[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Not_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Not", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.Not(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Not_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Not", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.Not(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Not_Vector64_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Not", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.Not(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Not_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Not", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.Not(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Not_Vector128_Double", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Not", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.Not(firstOp[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Not_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Not", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.Not(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Not_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Not", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.Not(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Not_Vector128_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Not", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.Not(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Not_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Not", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.Not(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Not_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Not", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Not(firstOp[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Not_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Not", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.Not(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Not_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Not", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.Not(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Not_Vector128_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Not", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.Not(firstOp[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Or_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Or", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.Or(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Or_Vector64_Double", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Or", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.Or(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Or_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Or", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.Or(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Or_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Or", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.Or(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Or_Vector64_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Or", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.Or(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Or_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Or", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.Or(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Or_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Or", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Or(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Or_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Or", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.Or(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Or_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Or", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.Or(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Or_Vector64_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Or", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.Or(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Or_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Or", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.Or(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Or_Vector128_Double", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Or", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.Or(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Or_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Or", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.Or(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Or_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Or", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.Or(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Or_Vector128_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Or", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.Or(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Or_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Or", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.Or(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Or_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Or", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Or(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Or_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Or", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.Or(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Or_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Or", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.Or(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Or_Vector128_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Or", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.Or(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "OrNot_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "OrNot", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.OrNot(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "OrNot_Vector64_Double", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "OrNot", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.OrNot(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "OrNot_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "OrNot", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.OrNot(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "OrNot_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "OrNot", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.OrNot(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "OrNot_Vector64_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "OrNot", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.OrNot(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "OrNot_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "OrNot", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.OrNot(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "OrNot_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "OrNot", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.OrNot(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "OrNot_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "OrNot", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.OrNot(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "OrNot_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "OrNot", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.OrNot(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "OrNot_Vector64_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "OrNot", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.OrNot(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "OrNot_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "OrNot", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.OrNot(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "OrNot_Vector128_Double", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "OrNot", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.OrNot(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "OrNot_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "OrNot", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.OrNot(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "OrNot_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "OrNot", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.OrNot(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "OrNot_Vector128_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "OrNot", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.OrNot(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "OrNot_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "OrNot", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.OrNot(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "OrNot_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "OrNot", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.OrNot(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "OrNot_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "OrNot", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.OrNot(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "OrNot_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "OrNot", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.OrNot(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "OrNot_Vector128_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "OrNot", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.OrNot(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "PolynomialMultiply_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "PolynomialMultiply", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.PolynomialMultiply(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "PolynomialMultiply_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "PolynomialMultiply", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.PolynomialMultiply(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "PolynomialMultiply_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "PolynomialMultiply", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.PolynomialMultiply(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "PolynomialMultiply_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "PolynomialMultiply", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.PolynomialMultiply(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "PolynomialMultiplyWideningLower_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "PolynomialMultiplyWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.PolynomialMultiplyWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "PolynomialMultiplyWideningLower_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "PolynomialMultiplyWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.PolynomialMultiplyWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "PolynomialMultiplyWideningUpper_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "PolynomialMultiplyWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.PolynomialMultiplyWideningUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "PolynomialMultiplyWideningUpper_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "PolynomialMultiplyWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.PolynomialMultiplyWideningUpper(left, right, i) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "PopCount_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "PopCount", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.BitCount(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "PopCount_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "PopCount", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.BitCount(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "PopCount_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "PopCount", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.BitCount(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "PopCount_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "PopCount", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.BitCount(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "ReciprocalEstimate_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ReciprocalEstimate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "BitConverter.Int32BitsToSingle(0x3e4ed9ed)", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(result[i]) != 0x409e8000"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "ReciprocalEstimate_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ReciprocalEstimate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.UnsignedRecipEstimate(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "ReciprocalEstimate_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ReciprocalEstimate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "BitConverter.Int32BitsToSingle(0x3e4ed9ed)", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(result[i]) != 0x409e8000"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "ReciprocalEstimate_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ReciprocalEstimate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.UnsignedRecipEstimate(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "ReciprocalSquareRootEstimate_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ReciprocalSquareRootEstimate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "BitConverter.Int32BitsToSingle(0x3e4ed9ed)", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(result[i]) != 0x400e8000"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "ReciprocalSquareRootEstimate_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ReciprocalSquareRootEstimate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.UnsignedRSqrtEstimate(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "ReciprocalSquareRootEstimate_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ReciprocalSquareRootEstimate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "BitConverter.Int32BitsToSingle(0x3e4ed9ed)", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(result[i]) != 0x400e8000"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "ReciprocalSquareRootEstimate_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ReciprocalSquareRootEstimate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.UnsignedRSqrtEstimate(firstOp[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ReciprocalSquareRootStep_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ReciprocalSquareRootStep", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.FPRSqrtStepFused(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ReciprocalSquareRootStep_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ReciprocalSquareRootStep", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.FPRSqrtStepFused(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ReciprocalStep_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ReciprocalStep", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.FPRecipStepFused(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ReciprocalStep_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ReciprocalStep", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.FPRecipStepFused(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmetic_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmetic", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.ShiftArithmetic(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmetic_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmetic", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.ShiftArithmetic(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmetic_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmetic", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.ShiftArithmetic(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmetic_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmetic", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.ShiftArithmetic(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmetic_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmetic", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.ShiftArithmetic(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmetic_Vector128_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmetic", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.ShiftArithmetic(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmetic_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmetic", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.ShiftArithmetic(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmeticRounded_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmeticRounded", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.ShiftArithmeticRounded(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmeticRounded_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmeticRounded", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.ShiftArithmeticRounded(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmeticRounded_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmeticRounded", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.ShiftArithmeticRounded(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmeticRounded_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmeticRounded", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.ShiftArithmeticRounded(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmeticRounded_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmeticRounded", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.ShiftArithmeticRounded(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmeticRounded_Vector128_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmeticRounded", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.ShiftArithmeticRounded(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmeticRounded_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmeticRounded", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.ShiftArithmeticRounded(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmeticRoundedSaturate_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmeticRoundedSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.ShiftArithmeticRoundedSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmeticRoundedSaturate_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmeticRoundedSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.ShiftArithmeticRoundedSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmeticRoundedSaturate_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmeticRoundedSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.ShiftArithmeticRoundedSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmeticRoundedSaturate_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmeticRoundedSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.ShiftArithmeticRoundedSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmeticRoundedSaturate_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmeticRoundedSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.ShiftArithmeticRoundedSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmeticRoundedSaturate_Vector128_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmeticRoundedSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.ShiftArithmeticRoundedSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmeticRoundedSaturate_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmeticRoundedSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.ShiftArithmeticRoundedSaturate(left[i], right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmeticRoundedSaturateScalar_Vector64_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmeticRoundedSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "Helpers.ShiftArithmeticRoundedSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmeticRoundedScalar_Vector64_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmeticRoundedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "Helpers.ShiftArithmeticRounded(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmeticSaturate_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmeticSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.ShiftArithmeticSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmeticSaturate_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmeticSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.ShiftArithmeticSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmeticSaturate_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmeticSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.ShiftArithmeticSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmeticSaturate_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmeticSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.ShiftArithmeticSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmeticSaturate_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmeticSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.ShiftArithmeticSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmeticSaturate_Vector128_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmeticSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.ShiftArithmeticSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmeticSaturate_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmeticSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.ShiftArithmeticSaturate(left[i], right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmeticSaturateScalar_Vector64_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmeticSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "Helpers.ShiftArithmeticSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmeticScalar_Vector64_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmeticScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "Helpers.ShiftArithmetic(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogical_Vector64_Byte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogical(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogical_Vector64_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogical(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogical_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogical(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogical_Vector64_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogical(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogical_Vector64_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogical(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogical_Vector64_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogical(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogical_Vector128_Byte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogical(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogical_Vector128_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogical(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogical_Vector128_Int64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogical(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogical_Vector128_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogical(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogical_Vector128_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogical(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogical_Vector128_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogical(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogical_Vector128_UInt64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogical(firstOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalAndInsert_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalAndInsert", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["Imm"] = "4", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalAndInsert(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalAndInsert_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalAndInsert", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "8", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalAndInsert(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalAndInsert_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalAndInsert", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "16", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalAndInsert(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalAndInsert_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalAndInsert", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "4", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalAndInsert(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalAndInsert_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalAndInsert", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "8", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalAndInsert(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalAndInsert_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalAndInsert", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "16", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalAndInsert(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalAndInsert_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalAndInsert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["Imm"] = "4", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalAndInsert(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalAndInsert_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalAndInsert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "8", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalAndInsert(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalAndInsert_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalAndInsert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "16", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalAndInsert(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalAndInsert_Vector128_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalAndInsert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "32", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalAndInsert(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalAndInsert_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalAndInsert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "4", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalAndInsert(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalAndInsert_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalAndInsert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "8", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalAndInsert(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalAndInsert_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalAndInsert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "16", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalAndInsert(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalAndInsert_Vector128_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalAndInsert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["Imm"] = "32", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalAndInsert(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("ImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalAndInsertScalar_Vector64_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalAndInsertScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "32", ["ValidateFirstResult"] = "Helpers.ShiftLeftLogicalAndInsert(firstOp[0], secondOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalAndInsertScalar_Vector64_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalAndInsertScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["Imm"] = "32", ["ValidateFirstResult"] = "Helpers.ShiftLeftLogicalAndInsert(firstOp[0], secondOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalSaturate_Vector64_Byte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalSaturate(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalSaturate_Vector64_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalSaturate(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalSaturate_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalSaturate(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalSaturate_Vector64_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalSaturate(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalSaturate_Vector64_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalSaturate(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalSaturate_Vector64_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalSaturate(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalSaturate_Vector128_Byte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalSaturate(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalSaturate_Vector128_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalSaturate(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalSaturate_Vector128_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalSaturate(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalSaturate_Vector128_Int64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalSaturate(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalSaturate_Vector128_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalSaturate(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalSaturate_Vector128_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalSaturate(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalSaturate_Vector128_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalSaturate(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalSaturate_Vector128_UInt64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalSaturate(firstOp[i], Imm) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalSaturateScalar_Vector64_Int64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateFirstResult"] = "Helpers.ShiftLeftLogicalSaturate(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalSaturateScalar_Vector64_UInt64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["Imm"] = "1", ["ValidateFirstResult"] = "Helpers.ShiftLeftLogicalSaturate(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalSaturateUnsigned_Vector64_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalSaturateUnsigned", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalSaturateUnsigned(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalSaturateUnsigned_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalSaturateUnsigned", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalSaturateUnsigned(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalSaturateUnsigned_Vector64_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalSaturateUnsigned", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalSaturateUnsigned(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalSaturateUnsigned_Vector128_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalSaturateUnsigned", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalSaturateUnsigned(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalSaturateUnsigned_Vector128_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalSaturateUnsigned", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalSaturateUnsigned(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalSaturateUnsigned_Vector128_Int64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalSaturateUnsigned", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalSaturateUnsigned(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalSaturateUnsigned_Vector128_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalSaturateUnsigned", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalSaturateUnsigned(firstOp[i], Imm) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalSaturateUnsignedScalar_Vector64_Int64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalSaturateUnsignedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateFirstResult"] = "Helpers.ShiftLeftLogicalSaturateUnsigned(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalScalar_Vector64_Int64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateFirstResult"] = "Helpers.ShiftLeftLogical(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalScalar_Vector64_UInt64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["Imm"] = "1", ["ValidateFirstResult"] = "Helpers.ShiftLeftLogical(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalWideningLower_Vector64_Byte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalWidening(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalWideningLower_Vector64_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalWidening(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalWideningLower_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalWidening(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalWideningLower_Vector64_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalWidening(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalWideningLower_Vector64_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalWidening(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalWideningLower_Vector64_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalWidening(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalWideningUpper_Vector128_Byte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalWideningUpper(firstOp, Imm, i) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalWideningUpper_Vector128_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalWideningUpper(firstOp, Imm, i) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalWideningUpper_Vector128_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalWideningUpper(firstOp, Imm, i) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalWideningUpper_Vector128_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalWideningUpper(firstOp, Imm, i) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalWideningUpper_Vector128_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalWideningUpper(firstOp, Imm, i) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalWideningUpper_Vector128_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftLeftLogicalWideningUpper(firstOp, Imm, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogical_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogical", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.ShiftLogical(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogical_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogical", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.ShiftLogical(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogical_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogical", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.ShiftLogical(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogical_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogical", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.ShiftLogical(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogical_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogical", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.ShiftLogical(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogical_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogical", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.ShiftLogical(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogical_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.ShiftLogical(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogical_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.ShiftLogical(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogical_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.ShiftLogical(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogical_Vector128_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.ShiftLogical(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogical_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.ShiftLogical(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogical_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.ShiftLogical(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogical_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.ShiftLogical(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogical_Vector128_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.ShiftLogical(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRounded_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRounded", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.ShiftLogicalRounded(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRounded_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRounded", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.ShiftLogicalRounded(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRounded_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRounded", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.ShiftLogicalRounded(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRounded_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRounded", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.ShiftLogicalRounded(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRounded_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRounded", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.ShiftLogicalRounded(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRounded_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRounded", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.ShiftLogicalRounded(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRounded_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRounded", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.ShiftLogicalRounded(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRounded_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRounded", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.ShiftLogicalRounded(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRounded_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRounded", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.ShiftLogicalRounded(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRounded_Vector128_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRounded", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.ShiftLogicalRounded(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRounded_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRounded", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.ShiftLogicalRounded(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRounded_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRounded", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.ShiftLogicalRounded(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRounded_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRounded", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.ShiftLogicalRounded(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRounded_Vector128_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRounded", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.ShiftLogicalRounded(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRoundedSaturate_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRoundedSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.ShiftLogicalRoundedSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRoundedSaturate_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRoundedSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.ShiftLogicalRoundedSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRoundedSaturate_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRoundedSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.ShiftLogicalRoundedSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRoundedSaturate_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRoundedSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.ShiftLogicalRoundedSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRoundedSaturate_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRoundedSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.ShiftLogicalRoundedSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRoundedSaturate_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRoundedSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.ShiftLogicalRoundedSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRoundedSaturate_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRoundedSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.ShiftLogicalRoundedSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRoundedSaturate_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRoundedSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.ShiftLogicalRoundedSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRoundedSaturate_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRoundedSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.ShiftLogicalRoundedSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRoundedSaturate_Vector128_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRoundedSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.ShiftLogicalRoundedSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRoundedSaturate_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRoundedSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.ShiftLogicalRoundedSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRoundedSaturate_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRoundedSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.ShiftLogicalRoundedSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRoundedSaturate_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRoundedSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.ShiftLogicalRoundedSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRoundedSaturate_Vector128_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRoundedSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.ShiftLogicalRoundedSaturate(left[i], right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRoundedSaturateScalar_Vector64_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRoundedSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "Helpers.ShiftLogicalRoundedSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRoundedSaturateScalar_Vector64_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRoundedSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "Helpers.ShiftLogicalRoundedSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRoundedScalar_Vector64_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRoundedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "Helpers.ShiftLogicalRounded(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRoundedScalar_Vector64_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRoundedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "Helpers.ShiftLogicalRounded(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalSaturate_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.ShiftLogicalSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalSaturate_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.ShiftLogicalSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalSaturate_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.ShiftLogicalSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalSaturate_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.ShiftLogicalSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalSaturate_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.ShiftLogicalSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalSaturate_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.ShiftLogicalSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalSaturate_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.ShiftLogicalSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalSaturate_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.ShiftLogicalSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalSaturate_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.ShiftLogicalSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalSaturate_Vector128_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.ShiftLogicalSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalSaturate_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.ShiftLogicalSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalSaturate_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.ShiftLogicalSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalSaturate_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.ShiftLogicalSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalSaturate_Vector128_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.ShiftLogicalSaturate(left[i], right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalSaturateScalar_Vector64_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "Helpers.ShiftLogicalSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalSaturateScalar_Vector64_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "Helpers.ShiftLogicalSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalScalar_Vector64_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "Helpers.ShiftLogical(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalScalar_Vector64_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "Helpers.ShiftLogical(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightAndInsert_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightAndInsert", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["Imm"] = "4", ["ValidateIterResult"] = "Helpers.ShiftRightAndInsert(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightAndInsert_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightAndInsert", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "8", ["ValidateIterResult"] = "Helpers.ShiftRightAndInsert(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightAndInsert_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightAndInsert", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "16", ["ValidateIterResult"] = "Helpers.ShiftRightAndInsert(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightAndInsert_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightAndInsert", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "4", ["ValidateIterResult"] = "Helpers.ShiftRightAndInsert(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightAndInsert_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightAndInsert", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "8", ["ValidateIterResult"] = "Helpers.ShiftRightAndInsert(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightAndInsert_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightAndInsert", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "16", ["ValidateIterResult"] = "Helpers.ShiftRightAndInsert(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightAndInsert_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightAndInsert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["Imm"] = "4", ["ValidateIterResult"] = "Helpers.ShiftRightAndInsert(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightAndInsert_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightAndInsert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "8", ["ValidateIterResult"] = "Helpers.ShiftRightAndInsert(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightAndInsert_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightAndInsert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "16", ["ValidateIterResult"] = "Helpers.ShiftRightAndInsert(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightAndInsert_Vector128_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightAndInsert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "32", ["ValidateIterResult"] = "Helpers.ShiftRightAndInsert(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightAndInsert_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightAndInsert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "4", ["ValidateIterResult"] = "Helpers.ShiftRightAndInsert(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightAndInsert_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightAndInsert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "8", ["ValidateIterResult"] = "Helpers.ShiftRightAndInsert(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightAndInsert_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightAndInsert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "16", ["ValidateIterResult"] = "Helpers.ShiftRightAndInsert(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightAndInsert_Vector128_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightAndInsert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["Imm"] = "32", ["ValidateIterResult"] = "Helpers.ShiftRightAndInsert(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmetic_Vector64_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmetic(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmetic_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmetic(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmetic_Vector64_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmetic(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmetic_Vector128_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmetic(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmetic_Vector128_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmetic(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmetic_Vector128_Int64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmetic(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmetic_Vector128_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmetic(firstOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticAdd_Vector64_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticAdd_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticAdd_Vector64_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticAdd_Vector128_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticAdd_Vector128_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticAdd_Vector128_Int64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticAdd_Vector128_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("ImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticAddScalar_Vector64_Int64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticAddScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateFirstResult"] = "Helpers.ShiftRightArithmeticAdd(firstOp[0], secondOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticNarrowingSaturateLower_Vector64_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticNarrowingSaturateLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticNarrowingSaturate(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticNarrowingSaturateLower_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticNarrowingSaturateLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticNarrowingSaturate(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticNarrowingSaturateLower_Vector64_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticNarrowingSaturateLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticNarrowingSaturate(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticNarrowingSaturateUnsignedLower_Vector64_Byte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticNarrowingSaturateUnsignedLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticNarrowingSaturateUnsigned(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticNarrowingSaturateUnsignedLower_Vector64_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticNarrowingSaturateUnsignedLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticNarrowingSaturateUnsigned(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticNarrowingSaturateUnsignedLower_Vector64_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticNarrowingSaturateUnsignedLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticNarrowingSaturateUnsigned(firstOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticNarrowingSaturateUnsignedUpper_Vector128_Byte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticNarrowingSaturateUnsignedUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticNarrowingSaturateUnsignedUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticNarrowingSaturateUnsignedUpper_Vector128_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticNarrowingSaturateUnsignedUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticNarrowingSaturateUnsignedUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticNarrowingSaturateUnsignedUpper_Vector128_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticNarrowingSaturateUnsignedUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticNarrowingSaturateUnsignedUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticNarrowingSaturateUpper_Vector128_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticNarrowingSaturateUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticNarrowingSaturateUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticNarrowingSaturateUpper_Vector128_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticNarrowingSaturateUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticNarrowingSaturateUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticNarrowingSaturateUpper_Vector128_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticNarrowingSaturateUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticNarrowingSaturateUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticRounded_Vector64_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticRounded", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticRounded(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticRounded_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticRounded", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticRounded(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticRounded_Vector64_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticRounded", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticRounded(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticRounded_Vector128_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticRounded", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticRounded(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticRounded_Vector128_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticRounded", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticRounded(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticRounded_Vector128_Int64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticRounded", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticRounded(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticRounded_Vector128_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticRounded", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticRounded(firstOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticRoundedAdd_Vector64_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticRoundedAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticRoundedAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticRoundedAdd_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticRoundedAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticRoundedAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticRoundedAdd_Vector64_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticRoundedAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticRoundedAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticRoundedAdd_Vector128_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticRoundedAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticRoundedAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticRoundedAdd_Vector128_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticRoundedAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticRoundedAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticRoundedAdd_Vector128_Int64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticRoundedAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticRoundedAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticRoundedAdd_Vector128_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticRoundedAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticRoundedAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("ImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticRoundedAddScalar_Vector64_Int64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticRoundedAddScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateFirstResult"] = "Helpers.ShiftRightArithmeticRoundedAdd(firstOp[0], secondOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticRoundedNarrowingSaturateLower_Vector64_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticRoundedNarrowingSaturateLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticRoundedNarrowingSaturate(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticRoundedNarrowingSaturateLower_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticRoundedNarrowingSaturateLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticRoundedNarrowingSaturate(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticRoundedNarrowingSaturateLower_Vector64_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticRoundedNarrowingSaturateLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticRoundedNarrowingSaturate(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticRoundedNarrowingSaturateUnsignedLower_Vector64_Byte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticRoundedNarrowingSaturateUnsignedLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticRoundedNarrowingSaturateUnsigned(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticRoundedNarrowingSaturateUnsignedLower_Vector64_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticRoundedNarrowingSaturateUnsignedLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticRoundedNarrowingSaturateUnsigned(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticRoundedNarrowingSaturateUnsignedLower_Vector64_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticRoundedNarrowingSaturateUnsignedLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticRoundedNarrowingSaturateUnsigned(firstOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticRoundedNarrowingSaturateUnsignedUpper_Vector128_Byte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticRoundedNarrowingSaturateUnsignedUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticRoundedNarrowingSaturateUnsignedUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticRoundedNarrowingSaturateUnsignedUpper_Vector128_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticRoundedNarrowingSaturateUnsignedUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticRoundedNarrowingSaturateUnsignedUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticRoundedNarrowingSaturateUnsignedUpper_Vector128_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticRoundedNarrowingSaturateUnsignedUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticRoundedNarrowingSaturateUnsignedUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticRoundedNarrowingSaturateUpper_Vector128_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticRoundedNarrowingSaturateUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticRoundedNarrowingSaturateUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticRoundedNarrowingSaturateUpper_Vector128_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticRoundedNarrowingSaturateUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticRoundedNarrowingSaturateUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticRoundedNarrowingSaturateUpper_Vector128_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticRoundedNarrowingSaturateUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightArithmeticRoundedNarrowingSaturateUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticRoundedScalar_Vector64_Int64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticRoundedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateFirstResult"] = "Helpers.ShiftRightArithmeticRounded(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticScalar_Vector64_Int64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateFirstResult"] = "Helpers.ShiftRightArithmetic(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogical_Vector64_Byte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogical(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogical_Vector64_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogical(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogical_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogical(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogical_Vector64_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogical(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogical_Vector64_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogical(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogical_Vector64_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogical(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogical_Vector128_Byte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogical(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogical_Vector128_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogical(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogical_Vector128_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogical(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogical_Vector128_Int64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogical(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogical_Vector128_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogical(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogical_Vector128_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogical(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogical_Vector128_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogical(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogical_Vector128_UInt64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogical(firstOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalAdd_Vector64_Byte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalAdd_Vector64_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalAdd_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalAdd_Vector64_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalAdd_Vector64_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalAdd_Vector64_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalAdd_Vector128_Byte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalAdd_Vector128_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalAdd_Vector128_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalAdd_Vector128_Int64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalAdd_Vector128_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalAdd_Vector128_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalAdd_Vector128_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalAdd_Vector128_UInt64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("ImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalAddScalar_Vector64_Int64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalAddScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateFirstResult"] = "Helpers.ShiftRightLogicalAdd(firstOp[0], secondOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalAddScalar_Vector64_UInt64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalAddScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["Imm"] = "1", ["ValidateFirstResult"] = "Helpers.ShiftRightLogicalAdd(firstOp[0], secondOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalAndInsertScalar_Vector64_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalAndInsertScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "32", ["ValidateFirstResult"] = "Helpers.ShiftRightAndInsert(firstOp[0], secondOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalAndInsertScalar_Vector64_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalAndInsertScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["Imm"] = "32", ["ValidateFirstResult"] = "Helpers.ShiftRightAndInsert(firstOp[0], secondOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalNarrowingLower_Vector64_Byte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalNarrowing(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalNarrowingLower_Vector64_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalNarrowing(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalNarrowingLower_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalNarrowing(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalNarrowingLower_Vector64_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalNarrowing(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalNarrowingLower_Vector64_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalNarrowing(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalNarrowingLower_Vector64_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalNarrowing(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalNarrowingSaturateLower_Vector64_Byte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalNarrowingSaturateLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalNarrowingSaturate(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalNarrowingSaturateLower_Vector64_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalNarrowingSaturateLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalNarrowingSaturate(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalNarrowingSaturateLower_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalNarrowingSaturateLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalNarrowingSaturate(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalNarrowingSaturateLower_Vector64_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalNarrowingSaturateLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalNarrowingSaturate(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalNarrowingSaturateLower_Vector64_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalNarrowingSaturateLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalNarrowingSaturate(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalNarrowingSaturateLower_Vector64_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalNarrowingSaturateLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalNarrowingSaturate(firstOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalNarrowingSaturateUpper_Vector128_Byte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalNarrowingSaturateUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalNarrowingSaturateUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalNarrowingSaturateUpper_Vector128_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalNarrowingSaturateUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalNarrowingSaturateUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalNarrowingSaturateUpper_Vector128_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalNarrowingSaturateUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalNarrowingSaturateUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalNarrowingSaturateUpper_Vector128_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalNarrowingSaturateUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalNarrowingSaturateUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalNarrowingSaturateUpper_Vector128_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalNarrowingSaturateUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalNarrowingSaturateUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalNarrowingSaturateUpper_Vector128_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalNarrowingSaturateUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalNarrowingSaturateUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalNarrowingUpper_Vector128_Byte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalNarrowingUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalNarrowingUpper_Vector128_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalNarrowingUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalNarrowingUpper_Vector128_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalNarrowingUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalNarrowingUpper_Vector128_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalNarrowingUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalNarrowingUpper_Vector128_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalNarrowingUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalNarrowingUpper_Vector128_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalNarrowingUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRounded_Vector64_Byte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRounded", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRounded(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRounded_Vector64_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRounded", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRounded(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRounded_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRounded", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRounded(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRounded_Vector64_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRounded", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRounded(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRounded_Vector64_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRounded", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRounded(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRounded_Vector64_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRounded", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRounded(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRounded_Vector128_Byte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRounded", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRounded(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRounded_Vector128_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRounded", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRounded(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRounded_Vector128_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRounded", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRounded(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRounded_Vector128_Int64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRounded", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRounded(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRounded_Vector128_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRounded", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRounded(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRounded_Vector128_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRounded", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRounded(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRounded_Vector128_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRounded", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRounded(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRounded_Vector128_UInt64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRounded", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRounded(firstOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedAdd_Vector64_Byte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedAdd_Vector64_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedAdd_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedAdd_Vector64_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedAdd_Vector64_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedAdd_Vector64_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedAdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedAdd_Vector128_Byte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedAdd_Vector128_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedAdd_Vector128_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedAdd_Vector128_Int64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedAdd_Vector128_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedAdd_Vector128_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedAdd_Vector128_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedAdd_Vector128_UInt64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedAdd(firstOp[i], secondOp[i], Imm) != result[i]"}), - ("ImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedAddScalar_Vector64_Int64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedAddScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateFirstResult"] = "Helpers.ShiftRightLogicalRoundedAdd(firstOp[0], secondOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedAddScalar_Vector64_UInt64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedAddScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["Imm"] = "1", ["ValidateFirstResult"] = "Helpers.ShiftRightLogicalRoundedAdd(firstOp[0], secondOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedNarrowingLower_Vector64_Byte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedNarrowing(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedNarrowingLower_Vector64_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedNarrowing(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedNarrowingLower_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedNarrowing(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedNarrowingLower_Vector64_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedNarrowing(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedNarrowingLower_Vector64_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedNarrowing(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedNarrowingLower_Vector64_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedNarrowing(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedNarrowingSaturateLower_Vector64_Byte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedNarrowingSaturateLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedNarrowingSaturate(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedNarrowingSaturateLower_Vector64_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedNarrowingSaturateLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedNarrowingSaturate(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedNarrowingSaturateLower_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedNarrowingSaturateLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedNarrowingSaturate(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedNarrowingSaturateLower_Vector64_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedNarrowingSaturateLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedNarrowingSaturate(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedNarrowingSaturateLower_Vector64_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedNarrowingSaturateLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedNarrowingSaturate(firstOp[i], Imm) != result[i]"}), - ("VecImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedNarrowingSaturateLower_Vector64_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedNarrowingSaturateLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedNarrowingSaturate(firstOp[i], Imm) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedNarrowingSaturateUpper_Vector128_Byte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedNarrowingSaturateUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedNarrowingSaturateUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedNarrowingSaturateUpper_Vector128_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedNarrowingSaturateUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedNarrowingSaturateUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedNarrowingSaturateUpper_Vector128_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedNarrowingSaturateUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedNarrowingSaturateUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedNarrowingSaturateUpper_Vector128_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedNarrowingSaturateUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedNarrowingSaturateUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedNarrowingSaturateUpper_Vector128_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedNarrowingSaturateUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedNarrowingSaturateUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedNarrowingSaturateUpper_Vector128_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedNarrowingSaturateUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedNarrowingSaturateUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedNarrowingUpper_Vector128_Byte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedNarrowingUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedNarrowingUpper_Vector128_Int16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedNarrowingUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedNarrowingUpper_Vector128_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedNarrowingUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedNarrowingUpper_Vector128_SByte_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedNarrowingUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedNarrowingUpper_Vector128_UInt16_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedNarrowingUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedNarrowingUpper_Vector128_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["Imm"] = "1", ["ValidateIterResult"] = "Helpers.ShiftRightLogicalRoundedNarrowingUpper(firstOp, secondOp, Imm, i) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedScalar_Vector64_Int64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateFirstResult"] = "Helpers.ShiftRightLogicalRounded(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedScalar_Vector64_UInt64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["Imm"] = "1", ["ValidateFirstResult"] = "Helpers.ShiftRightLogicalRounded(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalScalar_Vector64_Int64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateFirstResult"] = "Helpers.ShiftRightLogical(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalScalar_Vector64_UInt64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["Imm"] = "1", ["ValidateFirstResult"] = "Helpers.ShiftRightLogical(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "SignExtendWideningLower_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SignExtendWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.SignExtendWidening(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "SignExtendWideningLower_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SignExtendWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.SignExtendWidening(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "SignExtendWideningLower_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SignExtendWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.SignExtendWidening(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "SignExtendWideningUpper_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SignExtendWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.SignExtendWideningUpper(firstOp, i) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "SignExtendWideningUpper_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SignExtendWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.SignExtendWideningUpper(firstOp, i) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "SignExtendWideningUpper_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SignExtendWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.SignExtendWideningUpper(firstOp, i) != result[i]"}), - ("SimpleUnOpTest.template", new Dictionary { ["TestName"] = "SqrtScalar_Vector64_Double", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SqrtScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.Sqrt(firstOp[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleUnOpTest.template", new Dictionary { ["TestName"] = "SqrtScalar_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SqrtScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.Sqrt(firstOp[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("StoreUnOpTest.template", new Dictionary { ["TestName"] = "Store_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Store", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), - ("StoreUnOpTest.template", new Dictionary { ["TestName"] = "Store_Vector64_Double", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Store", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(firstOp[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("StoreUnOpTest.template", new Dictionary { ["TestName"] = "Store_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Store", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), - ("StoreUnOpTest.template", new Dictionary { ["TestName"] = "Store_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Store", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), - ("StoreUnOpTest.template", new Dictionary { ["TestName"] = "Store_Vector64_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Store", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), - ("StoreUnOpTest.template", new Dictionary { ["TestName"] = "Store_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Store", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), - ("StoreUnOpTest.template", new Dictionary { ["TestName"] = "Store_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Store", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(firstOp[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("StoreUnOpTest.template", new Dictionary { ["TestName"] = "Store_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Store", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), - ("StoreUnOpTest.template", new Dictionary { ["TestName"] = "Store_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Store", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), - ("StoreUnOpTest.template", new Dictionary { ["TestName"] = "Store_Vector64_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Store", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), - ("StoreUnOpTest.template", new Dictionary { ["TestName"] = "Store_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Store", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), - ("StoreUnOpTest.template", new Dictionary { ["TestName"] = "Store_Vector128_Double", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Store", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(firstOp[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("StoreUnOpTest.template", new Dictionary { ["TestName"] = "Store_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Store", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), - ("StoreUnOpTest.template", new Dictionary { ["TestName"] = "Store_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Store", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), - ("StoreUnOpTest.template", new Dictionary { ["TestName"] = "Store_Vector128_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Store", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), - ("StoreUnOpTest.template", new Dictionary { ["TestName"] = "Store_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Store", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), - ("StoreUnOpTest.template", new Dictionary { ["TestName"] = "Store_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Store", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(firstOp[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("StoreUnOpTest.template", new Dictionary { ["TestName"] = "Store_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Store", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), - ("StoreUnOpTest.template", new Dictionary { ["TestName"] = "Store_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Store", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), - ("StoreUnOpTest.template", new Dictionary { ["TestName"] = "Store_Vector128_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Store", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), - ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64_Byte_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ElementIndex"] = "7", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64_Int16_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ElementIndex"] = "3", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ElementIndex"] = "1", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64_SByte_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ElementIndex"] = "7", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64_Single_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ElementIndex"] = "1", ["ValidateResult"] = "BitConverter.SingleToInt32Bits(firstOp[ElementIndex]) != BitConverter.SingleToInt32Bits(result)"}), - ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64_UInt16_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ElementIndex"] = "3", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ElementIndex"] = "1", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128_Byte_15", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ElementIndex"] = "15", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128_Double_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ElementIndex"] = "1", ["ValidateResult"] = "BitConverter.DoubleToInt64Bits(firstOp[ElementIndex]) != BitConverter.DoubleToInt64Bits(result)"}), - ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128_Int16_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ElementIndex"] = "7", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128_Int32_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ElementIndex"] = "3", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128_Int64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ElementIndex"] = "1", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128_SByte_15", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ElementIndex"] = "15", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128_Single_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ElementIndex"] = "3", ["ValidateResult"] = "BitConverter.SingleToInt32Bits(firstOp[ElementIndex]) != BitConverter.SingleToInt32Bits(result)"}), - ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128_UInt16_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ElementIndex"] = "7", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128_UInt32_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ElementIndex"] = "3", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128_UInt64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ElementIndex"] = "1", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Subtract_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Subtract", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.Subtract(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Subtract_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Subtract", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.Subtract(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Subtract_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Subtract", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.Subtract(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Subtract_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Subtract", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.Subtract(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Subtract_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Subtract", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Subtract(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Subtract_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Subtract", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.Subtract(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Subtract_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Subtract", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.Subtract(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Subtract_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Subtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.Subtract(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Subtract_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Subtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.Subtract(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Subtract_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Subtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.Subtract(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Subtract_Vector128_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Subtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.Subtract(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Subtract_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Subtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.Subtract(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Subtract_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Subtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Subtract(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Subtract_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Subtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.Subtract(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Subtract_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Subtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.Subtract(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Subtract_Vector128_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Subtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.Subtract(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractHighNarrowingLower_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractHighNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowing(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractHighNarrowingLower_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractHighNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowing(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractHighNarrowingLower_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractHighNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowing(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractHighNarrowingLower_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractHighNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowing(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractHighNarrowingLower_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractHighNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowing(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractHighNarrowingLower_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractHighNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowing(left[i], right[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "SubtractHighNarrowingUpper_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractHighNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowingUpper(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "SubtractHighNarrowingUpper_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractHighNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowingUpper(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "SubtractHighNarrowingUpper_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractHighNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowingUpper(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "SubtractHighNarrowingUpper_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractHighNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowingUpper(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "SubtractHighNarrowingUpper_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractHighNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowingUpper(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "SubtractHighNarrowingUpper_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractHighNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowingUpper(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractRoundedHighNarrowingLower_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractRoundedHighNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.SubtractRoundedHighNarrowing(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractRoundedHighNarrowingLower_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractRoundedHighNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.SubtractRoundedHighNarrowing(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractRoundedHighNarrowingLower_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractRoundedHighNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.SubtractRoundedHighNarrowing(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractRoundedHighNarrowingLower_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractRoundedHighNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.SubtractRoundedHighNarrowing(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractRoundedHighNarrowingLower_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractRoundedHighNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.SubtractRoundedHighNarrowing(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractRoundedHighNarrowingLower_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractRoundedHighNarrowingLower", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.SubtractRoundedHighNarrowing(left[i], right[i]) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "SubtractRoundedHighNarrowingUpper_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractRoundedHighNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.SubtractRoundedHighNarrowingUpper(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "SubtractRoundedHighNarrowingUpper_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractRoundedHighNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.SubtractRoundedHighNarrowingUpper(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "SubtractRoundedHighNarrowingUpper_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractRoundedHighNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.SubtractRoundedHighNarrowingUpper(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "SubtractRoundedHighNarrowingUpper_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractRoundedHighNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.SubtractRoundedHighNarrowingUpper(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "SubtractRoundedHighNarrowingUpper_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractRoundedHighNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.SubtractRoundedHighNarrowingUpper(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "SubtractRoundedHighNarrowingUpper_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractRoundedHighNarrowingUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.SubtractRoundedHighNarrowingUpper(firstOp, secondOp, thirdOp, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractSaturate_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.SubtractSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractSaturate_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.SubtractSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractSaturate_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.SubtractSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractSaturate_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.SubtractSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractSaturate_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.SubtractSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractSaturate_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractSaturate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.SubtractSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractSaturate_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.SubtractSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractSaturate_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.SubtractSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractSaturate_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.SubtractSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractSaturate_Vector128_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.SubtractSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractSaturate_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.SubtractSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractSaturate_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.SubtractSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractSaturate_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.SubtractSaturate(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractSaturate_Vector128_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.SubtractSaturate(left[i], right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "SubtractSaturateScalar_Vector64_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "Helpers.SubtractSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "SubtractSaturateScalar_Vector64_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "Helpers.SubtractSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "SubtractScalar_Vector64_Double", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.Subtract(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "SubtractScalar_Vector64_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "Helpers.Subtract(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "SubtractScalar_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.Subtract(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "SubtractScalar_Vector64_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "Helpers.Subtract(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractWideningLower_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.SubtractWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractWideningLower_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.SubtractWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractWideningLower_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.SubtractWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractWideningLower_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.SubtractWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractWideningLower_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.SubtractWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractWideningLower_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.SubtractWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractWideningLower_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.SubtractWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractWideningLower_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.SubtractWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractWideningLower_Vector128_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.SubtractWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractWideningLower_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.SubtractWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractWideningLower_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.SubtractWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractWideningLower_Vector128_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.SubtractWidening(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractWideningUpper_Vector128_Byte_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.SubtractWideningUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractWideningUpper_Vector128_Int16_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.SubtractWideningUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractWideningUpper_Vector128_Int16_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.SubtractWideningUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractWideningUpper_Vector128_Int32_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.SubtractWideningUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractWideningUpper_Vector128_Int32_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.SubtractWideningUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractWideningUpper_Vector128_Int64_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.SubtractWideningUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractWideningUpper_Vector128_SByte_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.SubtractWideningUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractWideningUpper_Vector128_UInt16_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.SubtractWideningUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractWideningUpper_Vector128_UInt16_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.SubtractWideningUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractWideningUpper_Vector128_UInt32_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.SubtractWideningUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractWideningUpper_Vector128_UInt32_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.SubtractWideningUpper(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "SubtractWideningUpper_Vector128_UInt64_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.SubtractWideningUpper(left, right, i) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "VectorTableLookup_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "VectorTableLookup", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "(Byte)(TestLibrary.Generator.GetByte() % 20)", ["ValidateFirstResult"] = "Helpers.TableVectorLookup(0, right, left) != result[0]", ["ValidateRemainingResults"] = "Helpers.TableVectorLookup(i, right, left) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "VectorTableLookup_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "VectorTableLookup", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "(SByte)(TestLibrary.Generator.GetSByte() % 20)", ["ValidateFirstResult"] = "Helpers.TableVectorLookup(0, right, left) != result[0]", ["ValidateRemainingResults"] = "Helpers.TableVectorLookup(i, right, left) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "VectorTableLookupExtension_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "VectorTableLookupExtension", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["NextValueOp3"] = "(Byte)(TestLibrary.Generator.GetByte() % 20)", ["ValidateIterResult"] = "Helpers.TableVectorExtension(i, firstOp, thirdOp, secondOp) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "VectorTableLookupExtension_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "VectorTableLookupExtension", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp3"] = "(SByte)(TestLibrary.Generator.GetSByte() % 20)", ["ValidateIterResult"] = "Helpers.TableVectorExtension(i, firstOp, thirdOp, secondOp) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Xor_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Xor", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.Xor(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Xor_Vector64_Double", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Xor", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.Xor(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Xor_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Xor", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.Xor(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Xor_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Xor", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.Xor(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Xor_Vector64_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Xor", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.Xor(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Xor_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Xor", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.Xor(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Xor_Vector64_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Xor", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Xor(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Xor_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Xor", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.Xor(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Xor_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Xor", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.Xor(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Xor_Vector64_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Xor", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.Xor(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Xor_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Xor", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.Xor(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Xor_Vector128_Double", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Xor", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.Xor(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Xor_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Xor", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.Xor(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Xor_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Xor", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.Xor(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Xor_Vector128_Int64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Xor", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.Xor(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Xor_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Xor", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.Xor(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Xor_Vector128_Single", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Xor", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Xor(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Xor_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Xor", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.Xor(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Xor_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Xor", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.Xor(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Xor_Vector128_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Xor", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.Xor(left[i], right[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "ZeroExtendWideningLower_Vector64_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZeroExtendWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.ZeroExtendWidening(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "ZeroExtendWideningLower_Vector64_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZeroExtendWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.ZeroExtendWidening(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "ZeroExtendWideningLower_Vector64_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZeroExtendWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.ZeroExtendWidening(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "ZeroExtendWideningLower_Vector64_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZeroExtendWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.ZeroExtendWidening(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "ZeroExtendWideningLower_Vector64_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZeroExtendWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.ZeroExtendWidening(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "ZeroExtendWideningLower_Vector64_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZeroExtendWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.ZeroExtendWidening(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "ZeroExtendWideningUpper_Vector128_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZeroExtendWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.ZeroExtendWideningUpper(firstOp, i) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "ZeroExtendWideningUpper_Vector128_Int16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZeroExtendWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.ZeroExtendWideningUpper(firstOp, i) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "ZeroExtendWideningUpper_Vector128_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZeroExtendWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.ZeroExtendWideningUpper(firstOp, i) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "ZeroExtendWideningUpper_Vector128_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZeroExtendWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.ZeroExtendWideningUpper(firstOp, i) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "ZeroExtendWideningUpper_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZeroExtendWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.ZeroExtendWideningUpper(firstOp, i) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "ZeroExtendWideningUpper_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZeroExtendWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.ZeroExtendWideningUpper(firstOp, i) != result[i]"}) -}; - -private static readonly (string templateFileName, Dictionary templateData)[] AdvSimd_Arm64Inputs = new [] -{ - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Abs_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "Abs", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "-TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.Abs(firstOp[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Abs_Vector128_Int64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "Abs", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "-TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.Abs(firstOp[i]) != result[i]"}), - ("SimpleUnOpTest.template", new Dictionary { ["TestName"] = "AbsScalar_Vector64_Int64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "-TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "Helpers.Abs(firstOp[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteCompareGreaterThan_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteCompareGreaterThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.AbsoluteCompareGreaterThan(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteCompareGreaterThanScalar_Vector64_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteCompareGreaterThanScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.AbsoluteCompareGreaterThan(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteCompareGreaterThanScalar_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteCompareGreaterThanScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.AbsoluteCompareGreaterThan(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteCompareGreaterThanOrEqual_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteCompareGreaterThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.AbsoluteCompareGreaterThanOrEqual(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteCompareGreaterThanOrEqualScalar_Vector64_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteCompareGreaterThanOrEqualScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.AbsoluteCompareGreaterThanOrEqual(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteCompareGreaterThanOrEqualScalar_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteCompareGreaterThanOrEqualScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.AbsoluteCompareGreaterThanOrEqual(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteCompareLessThan_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteCompareLessThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.AbsoluteCompareLessThan(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteCompareLessThanScalar_Vector64_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteCompareLessThanScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.AbsoluteCompareLessThan(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteCompareLessThanScalar_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteCompareLessThanScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.AbsoluteCompareLessThan(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteCompareLessThanOrEqual_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteCompareLessThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.AbsoluteCompareLessThanOrEqual(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteCompareLessThanOrEqualScalar_Vector64_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteCompareLessThanOrEqualScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.AbsoluteCompareLessThanOrEqual(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteCompareLessThanOrEqualScalar_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteCompareLessThanOrEqualScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.AbsoluteCompareLessThanOrEqual(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifference_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifference", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.AbsoluteDifference(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceScalar_Vector64_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.AbsoluteDifference(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "AbsoluteDifferenceScalar_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AbsoluteDifferenceScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.AbsoluteDifference(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Add_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "Add", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.Add(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecReduceUnOpTest.template", new Dictionary { ["TestName"] = "AddAcross_Vector64_Byte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddAcross", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateReduceOpResult"] = "Helpers.AddAcross(firstOp) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecReduceUnOpTest.template", new Dictionary { ["TestName"] = "AddAcross_Vector64_Int16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddAcross", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateReduceOpResult"] = "Helpers.AddAcross(firstOp) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecReduceUnOpTest.template", new Dictionary { ["TestName"] = "AddAcross_Vector64_SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddAcross", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateReduceOpResult"] = "Helpers.AddAcross(firstOp) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecReduceUnOpTest.template", new Dictionary { ["TestName"] = "AddAcross_Vector64_UInt16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddAcross", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateReduceOpResult"] = "Helpers.AddAcross(firstOp) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecReduceUnOpTest.template", new Dictionary { ["TestName"] = "AddAcross_Vector128_Byte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddAcross", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateReduceOpResult"] = "Helpers.AddAcross(firstOp) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecReduceUnOpTest.template", new Dictionary { ["TestName"] = "AddAcross_Vector128_Int16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddAcross", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateReduceOpResult"] = "Helpers.AddAcross(firstOp) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecReduceUnOpTest.template", new Dictionary { ["TestName"] = "AddAcross_Vector128_Int32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddAcross", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateReduceOpResult"] = "Helpers.AddAcross(firstOp) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecReduceUnOpTest.template", new Dictionary { ["TestName"] = "AddAcross_Vector128_SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddAcross", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateReduceOpResult"] = "Helpers.AddAcross(firstOp) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecReduceUnOpTest.template", new Dictionary { ["TestName"] = "AddAcross_Vector128_UInt16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddAcross", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateReduceOpResult"] = "Helpers.AddAcross(firstOp) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecReduceUnOpTest.template", new Dictionary { ["TestName"] = "AddAcross_Vector128_UInt32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddAcross", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateReduceOpResult"] = "Helpers.AddAcross(firstOp) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddPairwise_Vector128_Byte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwise", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.AddPairwise(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddPairwise_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwise", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.AddPairwise(left, right, i)) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddPairwise_Vector128_Int16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwise", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.AddPairwise(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddPairwise_Vector128_Int32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwise", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.AddPairwise(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddPairwise_Vector128_Int64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwise", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.AddPairwise(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddPairwise_Vector128_SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwise", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.AddPairwise(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddPairwise_Vector128_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwise", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.AddPairwise(left, right, i)) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddPairwise_Vector128_UInt16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwise", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.AddPairwise(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddPairwise_Vector128_UInt32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwise", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.AddPairwise(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "AddPairwise_Vector128_UInt64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwise", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.AddPairwise(left, right, i) != result[i]"}), - ("SimpleUnOpTest.template", new Dictionary { ["TestName"] = "AddPairwiseScalar_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwiseScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.AddPairwise(firstOp, 0)) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("SimpleUnOpTest.template", new Dictionary { ["TestName"] = "AddPairwiseScalar_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwiseScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.AddPairwise(firstOp, 0)) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleUnOpTest.template", new Dictionary { ["TestName"] = "AddPairwiseScalar_Vector128_Int64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwiseScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "Helpers.AddPairwise(firstOp, 0) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleUnOpTest.template", new Dictionary { ["TestName"] = "AddPairwiseScalar_Vector128_UInt64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddPairwiseScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "Helpers.AddPairwise(firstOp, 0) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "AddSaturateScalar_Vector64_Byte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "Helpers.AddSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "AddSaturateScalar_Vector64_Int16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "Helpers.AddSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "AddSaturateScalar_Vector64_Int32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "Helpers.AddSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "AddSaturateScalar_Vector64_SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "Helpers.AddSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "AddSaturateScalar_Vector64_UInt16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "Helpers.AddSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "AddSaturateScalar_Vector64_UInt32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "AddSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "Helpers.AddSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareEqual_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.CompareEqual(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareEqual_Vector128_Int64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.CompareEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareEqual_Vector128_UInt64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.CompareEqual(left[i], right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "CompareEqualScalar_Vector64_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareEqualScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.CompareEqual(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "CompareEqualScalar_Vector64_Int64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareEqualScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "Helpers.CompareEqual(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "CompareEqualScalar_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareEqualScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.CompareEqual(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "CompareEqualScalar_Vector64_UInt64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareEqualScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "Helpers.CompareEqual(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThan_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.CompareGreaterThan(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThan_Vector128_Int64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.CompareGreaterThan(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThan_Vector128_UInt64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.CompareGreaterThan(left[i], right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThanScalar_Vector64_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThanScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.CompareGreaterThan(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThanScalar_Vector64_Int64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThanScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "Helpers.CompareGreaterThan(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThanScalar_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThanScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.CompareGreaterThan(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThanScalar_Vector64_UInt64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThanScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "Helpers.CompareGreaterThan(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThanOrEqual_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.CompareGreaterThanOrEqual(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThanOrEqual_Vector128_Int64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.CompareGreaterThanOrEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThanOrEqual_Vector128_UInt64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.CompareGreaterThanOrEqual(left[i], right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThanOrEqualScalar_Vector64_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThanOrEqualScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.CompareGreaterThanOrEqual(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThanOrEqualScalar_Vector64_Int64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThanOrEqualScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "Helpers.CompareGreaterThanOrEqual(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThanOrEqualScalar_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThanOrEqualScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.CompareGreaterThanOrEqual(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "CompareGreaterThanOrEqualScalar_Vector64_UInt64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareGreaterThanOrEqualScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "Helpers.CompareGreaterThanOrEqual(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThan_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.CompareLessThan(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThan_Vector128_Int64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.CompareLessThan(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThan_Vector128_UInt64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.CompareLessThan(left[i], right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThanScalar_Vector64_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThanScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.CompareLessThan(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThanScalar_Vector64_Int64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThanScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "Helpers.CompareLessThan(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThanScalar_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThanScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.CompareLessThan(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThanScalar_Vector64_UInt64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThanScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "Helpers.CompareLessThan(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThanOrEqual_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.CompareLessThanOrEqual(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThanOrEqual_Vector128_Int64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.CompareLessThanOrEqual(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThanOrEqual_Vector128_UInt64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.CompareLessThanOrEqual(left[i], right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThanOrEqualScalar_Vector64_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThanOrEqualScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.CompareLessThanOrEqual(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThanOrEqualScalar_Vector64_Int64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThanOrEqualScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "Helpers.CompareLessThanOrEqual(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThanOrEqualScalar_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThanOrEqualScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.CompareLessThanOrEqual(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "CompareLessThanOrEqualScalar_Vector64_UInt64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareLessThanOrEqualScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "Helpers.CompareLessThanOrEqual(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareTest_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareTest", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.CompareTest(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareTest_Vector128_Int64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareTest", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.CompareTest(left[i], right[i]) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "CompareTest_Vector128_UInt64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareTest", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.CompareTest(left[i], right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "CompareTestScalar_Vector64_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareTestScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.CompareTest(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "CompareTestScalar_Vector64_Int64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareTestScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "Helpers.CompareTest(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "CompareTestScalar_Vector64_UInt64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "CompareTestScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "Helpers.CompareTest(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Divide_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "Divide", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Divide(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Divide_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "Divide", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.Divide(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Divide_Vector128_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "Divide", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Divide(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "DuplicateSelectedScalarToVector128_V128_Double_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateSelectedScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["Imm"] = "1", ["ValidateFirstResult"] = "result[0] != firstOp[1]", ["ValidateRemainingResults"] = "result[i] != firstOp[1]" }), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "DuplicateSelectedScalarToVector128_V128_Int64_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateSelectedScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ValidateFirstResult"] = "result[0] != firstOp[1]", ["ValidateRemainingResults"] = "result[i] != firstOp[1]" }), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "DuplicateSelectedScalarToVector128_V128_UInt64_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateSelectedScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["Imm"] = "1", ["ValidateFirstResult"] = "result[0] != firstOp[1]", ["ValidateRemainingResults"] = "result[i] != firstOp[1]" }), - ("DuplicateTest.template", new Dictionary { ["TestName"] = "DuplicateToVector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "result[0] != data", ["ValidateRemainingResults"] = "result[i] != data"}), - ("ImmOpTest.template", new Dictionary { ["TestName"] = "DuplicateToVector128_Double_31", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["Imm"] = "31", ["ValidateFirstResult"] = "result[0] != 31", ["ValidateRemainingResults"] = "result[i] != 31"}), - ("DuplicateTest.template", new Dictionary { ["TestName"] = "DuplicateToVector128_Int64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != data", ["ValidateRemainingResults"] = "result[i] != data"}), - ("ImmOpTest.template", new Dictionary { ["TestName"] = "DuplicateToVector128_Int64_31", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["Imm"] = "31", ["ValidateFirstResult"] = "result[0] != 31", ["ValidateRemainingResults"] = "result[i] != 31"}), - ("DuplicateTest.template", new Dictionary { ["TestName"] = "DuplicateToVector128_UInt64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "result[0] != data", ["ValidateRemainingResults"] = "result[i] != data"}), - ("ImmOpTest.template", new Dictionary { ["TestName"] = "DuplicateToVector128_UInt64_31", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "DuplicateToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["Imm"] = "31", ["ValidateFirstResult"] = "result[0] != 31", ["ValidateRemainingResults"] = "result[i] != 31"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplyAdd_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplyAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp3"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.FusedMultiplyAdd(firstOp[i], secondOp[i], thirdOp[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplyAddByScalar_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplyAddByScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.FusedMultiplyAdd(firstOp[i], secondOp[i], thirdOp[0])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplyAddByScalar_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplyAddByScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp3"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.FusedMultiplyAdd(firstOp[i], secondOp[i], thirdOp[0])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplyAddByScalar_Vector128_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplyAddByScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.FusedMultiplyAdd(firstOp[i], secondOp[i], thirdOp[0])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplyAddBySelectedScalar_Vector64_Single_Vector64_Single_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplyAddBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["Imm"] = "1", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.FusedMultiplyAdd(firstOp[i], secondOp[i], thirdOp[Imm])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplyAddBySelectedScalar_Vector64_Single_Vector128_Single_3", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplyAddBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["Imm"] = "3", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.FusedMultiplyAdd(firstOp[i], secondOp[i], thirdOp[Imm])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplyAddBySelectedScalar_Vector128_Double_Vector128_Double_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplyAddBySelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp3"] = "TestLibrary.Generator.GetDouble()", ["Imm"] = "1", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.FusedMultiplyAdd(firstOp[i], secondOp[i], thirdOp[Imm])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplyAddBySelectedScalar_Vector128_Single_Vector64_Single_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplyAddBySelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["Imm"] = "1", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.FusedMultiplyAdd(firstOp[i], secondOp[i], thirdOp[Imm])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplyAddBySelectedScalar_Vector128_Single_Vector128_Single_3", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplyAddBySelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["Imm"] = "3", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.FusedMultiplyAdd(firstOp[i], secondOp[i], thirdOp[Imm])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleImmTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplyAddScalarBySelectedScalar_Vector64_Double_Vector128_Double_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplyAddScalarBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp3"] = "TestLibrary.Generator.GetDouble()", ["Imm"] = "1", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.FusedMultiplyAdd(firstOp[0], secondOp[0], thirdOp[Imm])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleImmTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplyAddScalarBySelectedScalar_Vector64_Single_Vector64_Single_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplyAddScalarBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["Imm"] = "1", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.FusedMultiplyAdd(firstOp[0], secondOp[0], thirdOp[Imm])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("SimpleImmTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplyAddScalarBySelectedScalar_Vector64_Single_Vector128_Single_3", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplyAddScalarBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["Imm"] = "3", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.FusedMultiplyAdd(firstOp[0], secondOp[0], thirdOp[Imm])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplySubtract_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplySubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp3"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.FusedMultiplySubtract(firstOp[i], secondOp[i], thirdOp[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplySubtractByScalar_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplySubtractByScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.FusedMultiplySubtract(firstOp[i], secondOp[i], thirdOp[0])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplySubtractByScalar_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplySubtractByScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp3"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.FusedMultiplySubtract(firstOp[i], secondOp[i], thirdOp[0])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplySubtractByScalar_Vector128_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplySubtractByScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.FusedMultiplySubtract(firstOp[i], secondOp[i], thirdOp[0])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplySubtractBySelectedScalar_Vector64_Single_Vector64_Single_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplySubtractBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["Imm"] = "1", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.FusedMultiplySubtract(firstOp[i], secondOp[i], thirdOp[Imm])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplySubtractBySelectedScalar_Vector64_Single_Vector128_Single_3", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplySubtractBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["Imm"] = "3", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.FusedMultiplySubtract(firstOp[i], secondOp[i], thirdOp[Imm])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplySubtractBySelectedScalar_Vector128_Double_Vector128_Double_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplySubtractBySelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp3"] = "TestLibrary.Generator.GetDouble()", ["Imm"] = "1", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.FusedMultiplySubtract(firstOp[i], secondOp[i], thirdOp[Imm])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplySubtractBySelectedScalar_Vector128_Single_Vector64_Single_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplySubtractBySelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["Imm"] = "1", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.FusedMultiplySubtract(firstOp[i], secondOp[i], thirdOp[Imm])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecImmTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplySubtractBySelectedScalar_Vector128_Single_Vector128_Single_3", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplySubtractBySelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["Imm"] = "3", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.FusedMultiplySubtract(firstOp[i], secondOp[i], thirdOp[Imm])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleImmTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplySubtractScalarBySelectedScalar_Vector64_Double_Vector128_Double_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplySubtractScalarBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp3"] = "TestLibrary.Generator.GetDouble()", ["Imm"] = "1", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.FusedMultiplySubtract(firstOp[0], secondOp[0], thirdOp[Imm])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleImmTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplySubtractScalarBySelectedScalar_Vector64_Single_Vector64_Single_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplySubtractScalarBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["Imm"] = "1", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.FusedMultiplySubtract(firstOp[0], secondOp[0], thirdOp[Imm])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("SimpleImmTernOpTest.template", new Dictionary { ["TestName"] = "FusedMultiplySubtractScalarBySelectedScalar_Vector64_Single_Vector128_Single_3", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "FusedMultiplySubtractScalarBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["Imm"] = "3", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.FusedMultiplySubtract(firstOp[0], secondOp[0], thirdOp[Imm])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("InsertSelectedScalarTest.template", new Dictionary { ["TestName"] = "InsertSelectedScalar_Vector64_Byte_7_Vector64_Byte_7", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "InsertSelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ElementIndex1"] = "7", ["ElementIndex2"] = "7", ["NextValueOp3"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex1, thirdOp[ElementIndex2], i) != result[i]"}), - ("InsertSelectedScalarTest.template", new Dictionary { ["TestName"] = "InsertSelectedScalar_Vector64_Byte_7_Vector128_Byte_15", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "InsertSelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ElementIndex1"] = "7", ["ElementIndex2"] = "15", ["NextValueOp3"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex1, thirdOp[ElementIndex2], i) != result[i]"}), - ("InsertSelectedScalarTest.template", new Dictionary { ["TestName"] = "InsertSelectedScalar_Vector64_Int16_3_Vector64_Int16_3", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "InsertSelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ElementIndex1"] = "3", ["ElementIndex2"] = "3", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex1, thirdOp[ElementIndex2], i) != result[i]"}), - ("InsertSelectedScalarTest.template", new Dictionary { ["TestName"] = "InsertSelectedScalar_Vector64_Int16_3_Vector128_Int16_7", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "InsertSelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ElementIndex1"] = "3", ["ElementIndex2"] = "7", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex1, thirdOp[ElementIndex2], i) != result[i]"}), - ("InsertSelectedScalarTest.template", new Dictionary { ["TestName"] = "InsertSelectedScalar_Vector64_Int32_1_Vector64_Int32_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "InsertSelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ElementIndex1"] = "1", ["ElementIndex2"] = "1", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex1, thirdOp[ElementIndex2], i) != result[i]"}), - ("InsertSelectedScalarTest.template", new Dictionary { ["TestName"] = "InsertSelectedScalar_Vector64_Int32_1_Vector128_Int32_3", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "InsertSelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ElementIndex1"] = "1", ["ElementIndex2"] = "3", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex1, thirdOp[ElementIndex2], i) != result[i]"}), - ("InsertSelectedScalarTest.template", new Dictionary { ["TestName"] = "InsertSelectedScalar_Vector64_SByte_7_Vector64_SByte_7", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "InsertSelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ElementIndex1"] = "7", ["ElementIndex2"] = "7", ["NextValueOp3"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex1, thirdOp[ElementIndex2], i) != result[i]"}), - ("InsertSelectedScalarTest.template", new Dictionary { ["TestName"] = "InsertSelectedScalar_Vector64_SByte_7_Vector128_SByte_15", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "InsertSelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ElementIndex1"] = "7", ["ElementIndex2"] = "15", ["NextValueOp3"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex1, thirdOp[ElementIndex2], i) != result[i]"}), - ("InsertSelectedScalarTest.template", new Dictionary { ["TestName"] = "InsertSelectedScalar_Vector64_Single_1_Vector64_Single_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "InsertSelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ElementIndex1"] = "1", ["ElementIndex2"] = "1", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Insert(firstOp, ElementIndex1, thirdOp[ElementIndex2], i)) != BitConverter.SingleToInt32Bits(result[i])"}), - ("InsertSelectedScalarTest.template", new Dictionary { ["TestName"] = "InsertSelectedScalar_Vector64_Single_1_Vector128_Single_3", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "InsertSelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ElementIndex1"] = "1", ["ElementIndex2"] = "3", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Insert(firstOp, ElementIndex1, thirdOp[ElementIndex2], i)) != BitConverter.SingleToInt32Bits(result[i])"}), - ("InsertSelectedScalarTest.template", new Dictionary { ["TestName"] = "InsertSelectedScalar_Vector64_UInt16_3_Vector64_UInt16_3", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "InsertSelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ElementIndex1"] = "3", ["ElementIndex2"] = "3", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex1, thirdOp[ElementIndex2], i) != result[i]"}), - ("InsertSelectedScalarTest.template", new Dictionary { ["TestName"] = "InsertSelectedScalar_Vector64_UInt16_3_Vector128_UInt16_7", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "InsertSelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ElementIndex1"] = "3", ["ElementIndex2"] = "7", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex1, thirdOp[ElementIndex2], i) != result[i]"}), - ("InsertSelectedScalarTest.template", new Dictionary { ["TestName"] = "InsertSelectedScalar_Vector64_UInt32_1_Vector64_UInt32_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "InsertSelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ElementIndex1"] = "1", ["ElementIndex2"] = "1", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex1, thirdOp[ElementIndex2], i) != result[i]"}), - ("InsertSelectedScalarTest.template", new Dictionary { ["TestName"] = "InsertSelectedScalar_Vector64_UInt32_1_Vector128_UInt32_3", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "InsertSelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ElementIndex1"] = "1", ["ElementIndex2"] = "3", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex1, thirdOp[ElementIndex2], i) != result[i]"}), - ("InsertSelectedScalarTest.template", new Dictionary { ["TestName"] = "InsertSelectedScalar_Vector128_Byte_15_Vector64_Byte_7", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "InsertSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ElementIndex1"] = "15", ["ElementIndex2"] = "7", ["NextValueOp3"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex1, thirdOp[ElementIndex2], i) != result[i]"}), - ("InsertSelectedScalarTest.template", new Dictionary { ["TestName"] = "InsertSelectedScalar_Vector128_Byte_15_Vector128_Byte_15", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "InsertSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ElementIndex1"] = "15", ["ElementIndex2"] = "15", ["NextValueOp3"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex1, thirdOp[ElementIndex2], i) != result[i]"}), - ("InsertSelectedScalarTest.template", new Dictionary { ["TestName"] = "InsertSelectedScalar_Vector128_Double_1_Vector128_Double_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "InsertSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ElementIndex1"] = "1", ["ElementIndex2"] = "1", ["NextValueOp3"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.Insert(firstOp, ElementIndex1, thirdOp[ElementIndex2], i)) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("InsertSelectedScalarTest.template", new Dictionary { ["TestName"] = "InsertSelectedScalar_Vector128_Int16_7_Vector64_Int16_3", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "InsertSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ElementIndex1"] = "7", ["ElementIndex2"] = "3", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex1, thirdOp[ElementIndex2], i) != result[i]"}), - ("InsertSelectedScalarTest.template", new Dictionary { ["TestName"] = "InsertSelectedScalar_Vector128_Int16_7_Vector128_Int16_7", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "InsertSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ElementIndex1"] = "7", ["ElementIndex2"] = "7", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex1, thirdOp[ElementIndex2], i) != result[i]"}), - ("InsertSelectedScalarTest.template", new Dictionary { ["TestName"] = "InsertSelectedScalar_Vector128_Int32_3_Vector64_Int32_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "InsertSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ElementIndex1"] = "3", ["ElementIndex2"] = "1", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex1, thirdOp[ElementIndex2], i) != result[i]"}), - ("InsertSelectedScalarTest.template", new Dictionary { ["TestName"] = "InsertSelectedScalar_Vector128_Int32_3_Vector128_Int32_3", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "InsertSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ElementIndex1"] = "3", ["ElementIndex2"] = "3", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex1, thirdOp[ElementIndex2], i) != result[i]"}), - ("InsertSelectedScalarTest.template", new Dictionary { ["TestName"] = "InsertSelectedScalar_Vector128_Int64_1_Vector128_Int64_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "InsertSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ElementIndex1"] = "1", ["ElementIndex2"] = "1", ["NextValueOp3"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex1, thirdOp[ElementIndex2], i) != result[i]"}), - ("InsertSelectedScalarTest.template", new Dictionary { ["TestName"] = "InsertSelectedScalar_Vector128_SByte_15_Vector64_SByte_7", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "InsertSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ElementIndex1"] = "15", ["ElementIndex2"] = "7", ["NextValueOp3"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex1, thirdOp[ElementIndex2], i) != result[i]"}), - ("InsertSelectedScalarTest.template", new Dictionary { ["TestName"] = "InsertSelectedScalar_Vector128_SByte_15_Vector128_SByte_15", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "InsertSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ElementIndex1"] = "15", ["ElementIndex2"] = "15", ["NextValueOp3"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex1, thirdOp[ElementIndex2], i) != result[i]"}), - ("InsertSelectedScalarTest.template", new Dictionary { ["TestName"] = "InsertSelectedScalar_Vector128_Single_3_Vector64_Single_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "InsertSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ElementIndex1"] = "3", ["ElementIndex2"] = "1", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Insert(firstOp, ElementIndex1, thirdOp[ElementIndex2], i)) != BitConverter.SingleToInt32Bits(result[i])"}), - ("InsertSelectedScalarTest.template", new Dictionary { ["TestName"] = "InsertSelectedScalar_Vector128_Single_3_Vector128_Single_3", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "InsertSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ElementIndex1"] = "3", ["ElementIndex2"] = "3", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Insert(firstOp, ElementIndex1, thirdOp[ElementIndex2], i)) != BitConverter.SingleToInt32Bits(result[i])"}), - ("InsertSelectedScalarTest.template", new Dictionary { ["TestName"] = "InsertSelectedScalar_Vector128_UInt16_7_Vector64_UInt16_3", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "InsertSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ElementIndex1"] = "7", ["ElementIndex2"] = "3", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex1, thirdOp[ElementIndex2], i) != result[i]"}), - ("InsertSelectedScalarTest.template", new Dictionary { ["TestName"] = "InsertSelectedScalar_Vector128_UInt16_7_Vector128_UInt16_7", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "InsertSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ElementIndex1"] = "7", ["ElementIndex2"] = "7", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex1, thirdOp[ElementIndex2], i) != result[i]"}), - ("InsertSelectedScalarTest.template", new Dictionary { ["TestName"] = "InsertSelectedScalar_Vector128_UInt32_3_Vector64_UInt32_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "InsertSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op3VectorType"] = "Vector64", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ElementIndex1"] = "3", ["ElementIndex2"] = "1", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex1, thirdOp[ElementIndex2], i) != result[i]"}), - ("InsertSelectedScalarTest.template", new Dictionary { ["TestName"] = "InsertSelectedScalar_Vector128_UInt32_3_Vector128_UInt32_3", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "InsertSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ElementIndex1"] = "3", ["ElementIndex2"] = "3", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex1, thirdOp[ElementIndex2], i) != result[i]"}), - ("InsertSelectedScalarTest.template", new Dictionary { ["TestName"] = "InsertSelectedScalar_Vector128_UInt64_1_Vector128_UInt64_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "InsertSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ElementIndex1"] = "1", ["ElementIndex2"] = "1", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.Insert(firstOp, ElementIndex1, thirdOp[ElementIndex2], i) != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadAndReplicateToVector128_Double", ["Isa"] = "AdvSimd.Arm64", ["Method"] = "LoadAndReplicateToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadAndReplicateToVector128_Int64", ["Isa"] = "AdvSimd.Arm64", ["Method"] = "LoadAndReplicateToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "firstOp[0] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["TestName"] = "LoadAndReplicateToVector128_UInt64", ["Isa"] = "AdvSimd.Arm64", ["Method"] = "LoadAndReplicateToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "firstOp[0] != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Max_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "Max", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.Max(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecReduceUnOpTest.template", new Dictionary { ["TestName"] = "MaxAcross_Vector64_Byte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxAcross", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateReduceOpResult"] = "Helpers.MaxAcross(firstOp) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecReduceUnOpTest.template", new Dictionary { ["TestName"] = "MaxAcross_Vector64_Int16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxAcross", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateReduceOpResult"] = "Helpers.MaxAcross(firstOp) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecReduceUnOpTest.template", new Dictionary { ["TestName"] = "MaxAcross_Vector64_SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxAcross", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateReduceOpResult"] = "Helpers.MaxAcross(firstOp) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecReduceUnOpTest.template", new Dictionary { ["TestName"] = "MaxAcross_Vector64_UInt16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxAcross", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateReduceOpResult"] = "Helpers.MaxAcross(firstOp) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecReduceUnOpTest.template", new Dictionary { ["TestName"] = "MaxAcross_Vector128_Byte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxAcross", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateReduceOpResult"] = "Helpers.MaxAcross(firstOp) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecReduceUnOpTest.template", new Dictionary { ["TestName"] = "MaxAcross_Vector128_Int16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxAcross", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateReduceOpResult"] = "Helpers.MaxAcross(firstOp) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecReduceUnOpTest.template", new Dictionary { ["TestName"] = "MaxAcross_Vector128_Int32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxAcross", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateReduceOpResult"] = "Helpers.MaxAcross(firstOp) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecReduceUnOpTest.template", new Dictionary { ["TestName"] = "MaxAcross_Vector128_SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxAcross", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateReduceOpResult"] = "Helpers.MaxAcross(firstOp) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecReduceUnOpTest.template", new Dictionary { ["TestName"] = "MaxAcross_Vector128_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxAcross", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateReduceOpResult"] = "BitConverter.SingleToInt32Bits(Helpers.MaxAcross(firstOp)) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("VecReduceUnOpTest.template", new Dictionary { ["TestName"] = "MaxAcross_Vector128_UInt16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxAcross", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateReduceOpResult"] = "Helpers.MaxAcross(firstOp) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecReduceUnOpTest.template", new Dictionary { ["TestName"] = "MaxAcross_Vector128_UInt32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxAcross", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateReduceOpResult"] = "Helpers.MaxAcross(firstOp) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MaxNumber_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxNumber", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.MaxNumber(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecReduceUnOpTest.template", new Dictionary { ["TestName"] = "MaxNumberAcross_Vector128_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxNumberAcross", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateReduceOpResult"] = "BitConverter.SingleToInt32Bits(Helpers.MaxNumberAcross(firstOp)) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MaxNumberPairwise_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxNumberPairwise", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.MaxNumberPairwise(left, right, i)) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MaxNumberPairwise_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxNumberPairwise", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.MaxNumberPairwise(left, right, i)) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MaxNumberPairwise_Vector128_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxNumberPairwise", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.MaxNumberPairwise(left, right, i)) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["TestName"] = "MaxNumberPairwiseScalar_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxNumberPairwiseScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.MaxNumberPairwise(firstOp, 0)) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("SimpleUnOpTest.template", new Dictionary { ["TestName"] = "MaxNumberPairwiseScalar_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxNumberPairwiseScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.MaxNumberPairwise(firstOp, 0)) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MaxPairwise_Vector128_Byte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxPairwise", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.MaxPairwise(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MaxPairwise_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxPairwise", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.MaxPairwise(left, right, i)) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MaxPairwise_Vector128_Int16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxPairwise", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.MaxPairwise(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MaxPairwise_Vector128_Int32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxPairwise", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.MaxPairwise(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MaxPairwise_Vector128_SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxPairwise", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.MaxPairwise(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MaxPairwise_Vector128_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxPairwise", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.MaxPairwise(left, right, i)) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MaxPairwise_Vector128_UInt16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxPairwise", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.MaxPairwise(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MaxPairwise_Vector128_UInt32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxPairwise", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.MaxPairwise(left, right, i) != result[i]"}), - ("SimpleUnOpTest.template", new Dictionary { ["TestName"] = "MaxPairwiseScalar_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxPairwiseScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.MaxPairwise(firstOp, 0)) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("SimpleUnOpTest.template", new Dictionary { ["TestName"] = "MaxPairwiseScalar_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxPairwiseScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.MaxPairwise(firstOp, 0)) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "MaxScalar_Vector64_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.Max(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "MaxScalar_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MaxScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.Max(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Min_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "Min", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.Min(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecReduceUnOpTest.template", new Dictionary { ["TestName"] = "MinAcross_Vector64_Byte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinAcross", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateReduceOpResult"] = "Helpers.MinAcross(firstOp) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecReduceUnOpTest.template", new Dictionary { ["TestName"] = "MinAcross_Vector64_Int16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinAcross", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateReduceOpResult"] = "Helpers.MinAcross(firstOp) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecReduceUnOpTest.template", new Dictionary { ["TestName"] = "MinAcross_Vector64_SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinAcross", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateReduceOpResult"] = "Helpers.MinAcross(firstOp) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecReduceUnOpTest.template", new Dictionary { ["TestName"] = "MinAcross_Vector64_UInt16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinAcross", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateReduceOpResult"] = "Helpers.MinAcross(firstOp) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecReduceUnOpTest.template", new Dictionary { ["TestName"] = "MinAcross_Vector128_Byte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinAcross", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateReduceOpResult"] = "Helpers.MinAcross(firstOp) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecReduceUnOpTest.template", new Dictionary { ["TestName"] = "MinAcross_Vector128_Int16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinAcross", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateReduceOpResult"] = "Helpers.MinAcross(firstOp) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecReduceUnOpTest.template", new Dictionary { ["TestName"] = "MinAcross_Vector128_Int32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinAcross", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateReduceOpResult"] = "Helpers.MinAcross(firstOp) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecReduceUnOpTest.template", new Dictionary { ["TestName"] = "MinAcross_Vector128_SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinAcross", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateReduceOpResult"] = "Helpers.MinAcross(firstOp) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecReduceUnOpTest.template", new Dictionary { ["TestName"] = "MinAcross_Vector128_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinAcross", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateReduceOpResult"] = "BitConverter.SingleToInt32Bits(Helpers.MinAcross(firstOp)) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("VecReduceUnOpTest.template", new Dictionary { ["TestName"] = "MinAcross_Vector128_UInt16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinAcross", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateReduceOpResult"] = "Helpers.MinAcross(firstOp) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecReduceUnOpTest.template", new Dictionary { ["TestName"] = "MinAcross_Vector128_UInt32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinAcross", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateReduceOpResult"] = "Helpers.MinAcross(firstOp) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MinNumber_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinNumber", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.MinNumber(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecReduceUnOpTest.template", new Dictionary { ["TestName"] = "MinNumberAcross_Vector128_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinNumberAcross", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateReduceOpResult"] = "BitConverter.SingleToInt32Bits(Helpers.MinNumberAcross(firstOp)) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MinNumberPairwise_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinNumberPairwise", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.MinNumberPairwise(left, right, i)) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MinNumberPairwise_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinNumberPairwise", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.MinNumberPairwise(left, right, i)) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MinNumberPairwise_Vector128_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinNumberPairwise", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.MinNumberPairwise(left, right, i)) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["TestName"] = "MinNumberPairwiseScalar_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinNumberPairwiseScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.MinNumberPairwise(firstOp, 0)) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("SimpleUnOpTest.template", new Dictionary { ["TestName"] = "MinNumberPairwiseScalar_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinNumberPairwiseScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.MinNumberPairwise(firstOp, 0)) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MinPairwise_Vector128_Byte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinPairwise", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.MinPairwise(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MinPairwise_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinPairwise", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.MinPairwise(left, right, i)) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MinPairwise_Vector128_Int16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinPairwise", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.MinPairwise(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MinPairwise_Vector128_Int32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinPairwise", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.MinPairwise(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MinPairwise_Vector128_SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinPairwise", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.MinPairwise(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MinPairwise_Vector128_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinPairwise", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.MinPairwise(left, right, i)) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MinPairwise_Vector128_UInt16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinPairwise", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.MinPairwise(left, right, i) != result[i]"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MinPairwise_Vector128_UInt32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinPairwise", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.MinPairwise(left, right, i) != result[i]"}), - ("SimpleUnOpTest.template", new Dictionary { ["TestName"] = "MinPairwiseScalar_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinPairwiseScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.MinPairwise(firstOp, 0)) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("SimpleUnOpTest.template", new Dictionary { ["TestName"] = "MinPairwiseScalar_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinPairwiseScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.MinPairwise(firstOp, 0)) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "MinScalar_Vector64_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.Min(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "MinScalar_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MinScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.Min(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Multiply_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "Multiply", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.Multiply(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyByScalar_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyByScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.Multiply(left[i], right[0])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyBySelectedScalar_Vector128_Double_Vector128_Double_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyBySelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["Imm"] = "1", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.Multiply(firstOp[i], secondOp[Imm])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyExtended_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyExtended", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.MultiplyExtended(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyExtended_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyExtended", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.MultiplyExtended(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyExtended_Vector128_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyExtended", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.MultiplyExtended(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyExtendedByScalar_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyExtendedByScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.MultiplyExtended(left[i], right[0])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("VecImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyExtendedBySelectedScalar_Vector128_Double_Vector128_Double_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyExtendedBySelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["Imm"] = "1", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.MultiplyExtended(firstOp[i], secondOp[Imm])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyExtendedScalar_Vector64_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyExtendedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.MultiplyExtended(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyExtendedScalar_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyExtendedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.MultiplyExtended(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("ImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyExtendedScalarBySelectedScalar_Vector64_Double_Vector128_Double_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyExtendedScalarBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["Imm"] = "1", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.MultiplyExtended(firstOp[0], secondOp[Imm])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("ImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyExtendedScalarBySelectedScalar_Vector64_Single_Vector64_Single_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyExtendedScalarBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["Imm"] = "1", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.MultiplyExtended(firstOp[0], secondOp[Imm])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("ImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyExtendedScalarBySelectedScalar_Vector64_Single_Vector128_Single_3", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyExtendedScalarBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["Imm"] = "3", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.MultiplyExtended(firstOp[0], secondOp[Imm])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("ImmBinOpTest.template", new Dictionary { ["TestName"] = "MultiplyScalarBySelectedScalar_Vector64_Double_Vector128_Double_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "MultiplyScalarBySelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["Imm"] = "1", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.Multiply(firstOp[0], secondOp[Imm])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Negate_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "Negate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.Negate(firstOp[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Negate_Vector128_Int64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "Negate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.Negate(firstOp[i]) != result[i]"}), - ("SimpleUnOpTest.template", new Dictionary { ["TestName"] = "NegateScalar_Vector64_Int64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "NegateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "Helpers.Negate(firstOp[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "ReciprocalEstimate_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ReciprocalEstimate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "BitConverter.Int64BitsToDouble(0x3fc9db3dab555868)", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0x4013d00000000000"}), - ("SimpleUnOpTest.template", new Dictionary { ["TestName"] = "ReciprocalEstimateScalar_Vector64_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ReciprocalEstimateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "BitConverter.Int64BitsToDouble(0x3fc9db3dab555868)", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != 0x4013d00000000000", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleUnOpTest.template", new Dictionary { ["TestName"] = "ReciprocalEstimateScalar_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ReciprocalEstimateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "BitConverter.Int32BitsToSingle(0x3e4ed9ed)", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != 0x409e8000", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("SimpleUnOpTest.template", new Dictionary { ["TestName"] = "ReciprocalExponentScalar_Vector64_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ReciprocalExponentScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "BitConverter.Int64BitsToDouble(0x3fc9db3dab555868)", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != 0x4030000000000000", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleUnOpTest.template", new Dictionary { ["TestName"] = "ReciprocalExponentScalar_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ReciprocalExponentScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "BitConverter.Int32BitsToSingle(0x3e4ed9ed)", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != 0x41800000", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "ReciprocalSquareRootEstimate_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ReciprocalSquareRootEstimate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "BitConverter.Int64BitsToDouble(0x3fc9db3dab555868)", ["ValidateIterResult"] = " BitConverter.DoubleToInt64Bits(result[i]) != 0x4001d00000000000"}), - ("SimpleUnOpTest.template", new Dictionary { ["TestName"] = "ReciprocalSquareRootEstimateScalar_Vector64_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ReciprocalSquareRootEstimateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "BitConverter.Int64BitsToDouble(0x3fc9db3dab555868)", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != 0x4001d00000000000", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleUnOpTest.template", new Dictionary { ["TestName"] = "ReciprocalSquareRootEstimateScalar_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ReciprocalSquareRootEstimateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "BitConverter.Int32BitsToSingle(0x3e4ed9ed)", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != 0x400e8000", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ReciprocalSquareRootStep_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ReciprocalSquareRootStep", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.FPRSqrtStepFused(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "ReciprocalSquareRootStepScalar_Vector64_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ReciprocalSquareRootStepScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.FPRSqrtStepFused(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "ReciprocalSquareRootStepScalar_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ReciprocalSquareRootStepScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.FPRSqrtStepFused(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "ReciprocalStep_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ReciprocalStep", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.FPRecipStepFused(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "ReciprocalStepScalar_Vector64_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ReciprocalStepScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Helpers.FPRecipStepFused(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "ReciprocalStepScalar_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ReciprocalStepScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Helpers.FPRecipStepFused(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != 0"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "ReverseElementBits_Vector128_Byte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ReverseElementBits", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.ReverseElementBits(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "ReverseElementBits_Vector128_SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ReverseElementBits", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.ReverseElementBits(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "ReverseElementBits_Vector64_Byte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ReverseElementBits", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.ReverseElementBits(firstOp[i]) != result[i]"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "ReverseElementBits_Vector64_SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ReverseElementBits", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "Helpers.ReverseElementBits(firstOp[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmeticRoundedSaturateScalar_Vector64_Int16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmeticRoundedSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "Helpers.ShiftArithmeticRoundedSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmeticRoundedSaturateScalar_Vector64_Int32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmeticRoundedSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "Helpers.ShiftArithmeticRoundedSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmeticRoundedSaturateScalar_Vector64_SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmeticRoundedSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "Helpers.ShiftArithmeticRoundedSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmeticSaturateScalar_Vector64_Int16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmeticSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "Helpers.ShiftArithmeticSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmeticSaturateScalar_Vector64_Int32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmeticSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "Helpers.ShiftArithmeticSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "ShiftArithmeticSaturateScalar_Vector64_SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftArithmeticSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "Helpers.ShiftArithmeticSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalSaturateScalar_Vector64_Byte_7", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["Imm"] = "7", ["ValidateFirstResult"] = "Helpers.ShiftLeftLogicalSaturate(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalSaturateScalar_Vector64_Int16_15", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "15", ["ValidateFirstResult"] = "Helpers.ShiftLeftLogicalSaturate(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalSaturateScalar_Vector64_Int32_31", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "31", ["ValidateFirstResult"] = "Helpers.ShiftLeftLogicalSaturate(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalSaturateScalar_Vector64_SByte_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "1", ["ValidateFirstResult"] = "Helpers.ShiftLeftLogicalSaturate(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalSaturateScalar_Vector64_UInt16_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "1", ["ValidateFirstResult"] = "Helpers.ShiftLeftLogicalSaturate(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalSaturateScalar_Vector64_UInt32_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ValidateFirstResult"] = "Helpers.ShiftLeftLogicalSaturate(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalSaturateUnsignedScalar_Vector64_Int16_5", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalSaturateUnsignedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "5", ["ValidateFirstResult"] = "Helpers.ShiftLeftLogicalSaturateUnsigned(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalSaturateUnsignedScalar_Vector64_Int32_7", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalSaturateUnsignedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "7", ["ValidateFirstResult"] = "Helpers.ShiftLeftLogicalSaturateUnsigned(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftLeftLogicalSaturateUnsignedScalar_Vector64_SByte_3", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLeftLogicalSaturateUnsignedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "3", ["ValidateFirstResult"] = "Helpers.ShiftLeftLogicalSaturateUnsigned(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRoundedSaturateScalar_Vector64_Byte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRoundedSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "Helpers.ShiftLogicalRoundedSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRoundedSaturateScalar_Vector64_Int16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRoundedSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "Helpers.ShiftLogicalRoundedSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRoundedSaturateScalar_Vector64_Int32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRoundedSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "Helpers.ShiftLogicalRoundedSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRoundedSaturateScalar_Vector64_SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRoundedSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "Helpers.ShiftLogicalRoundedSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRoundedSaturateScalar_Vector64_UInt16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRoundedSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "Helpers.ShiftLogicalRoundedSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalRoundedSaturateScalar_Vector64_UInt32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalRoundedSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "Helpers.ShiftLogicalRoundedSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalSaturateScalar_Vector64_Byte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "Helpers.ShiftLogicalSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalSaturateScalar_Vector64_Int16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "Helpers.ShiftLogicalSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalSaturateScalar_Vector64_Int32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "Helpers.ShiftLogicalSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalSaturateScalar_Vector64_SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "Helpers.ShiftLogicalSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalSaturateScalar_Vector64_UInt16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "Helpers.ShiftLogicalSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "ShiftLogicalSaturateScalar_Vector64_UInt32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftLogicalSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "Helpers.ShiftLogicalSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticNarrowingSaturateScalar_Vector64_Int16_16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticNarrowingSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "16", ["ValidateFirstResult"] = "Helpers.ShiftRightArithmeticNarrowingSaturate(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticNarrowingSaturateScalar_Vector64_Int32_32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticNarrowingSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "32", ["ValidateFirstResult"] = "Helpers.ShiftRightArithmeticNarrowingSaturate(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticNarrowingSaturateScalar_Vector64_SByte_8", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticNarrowingSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "8", ["ValidateFirstResult"] = "Helpers.ShiftRightArithmeticNarrowingSaturate(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticNarrowingSaturateUnsignedScalar_Vector64_Byte_3", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticNarrowingSaturateUnsignedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "3", ["ValidateFirstResult"] = "Helpers.ShiftRightArithmeticNarrowingSaturateUnsigned(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticNarrowingSaturateUnsignedScalar_Vector64_UInt16_5", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticNarrowingSaturateUnsignedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "5", ["ValidateFirstResult"] = "Helpers.ShiftRightArithmeticNarrowingSaturateUnsigned(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticNarrowingSaturateUnsignedScalar_Vector64_UInt32_7", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticNarrowingSaturateUnsignedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "7", ["ValidateFirstResult"] = "Helpers.ShiftRightArithmeticNarrowingSaturateUnsigned(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticRoundedNarrowingSaturateScalar_Vector64_Int16_32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticRoundedNarrowingSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "16", ["ValidateFirstResult"] = "Helpers.ShiftRightArithmeticRoundedNarrowingSaturate(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticRoundedNarrowingSaturateScalar_Vector64_Int32_64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticRoundedNarrowingSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "32", ["ValidateFirstResult"] = "Helpers.ShiftRightArithmeticRoundedNarrowingSaturate(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticRoundedNarrowingSaturateScalar_Vector64_SByte_16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticRoundedNarrowingSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "8", ["ValidateFirstResult"] = "Helpers.ShiftRightArithmeticRoundedNarrowingSaturate(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticRoundedNarrowingSaturateUnsignedScalar_Vector64_Byte_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticRoundedNarrowingSaturateUnsignedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "7", ["ValidateFirstResult"] = "Helpers.ShiftRightArithmeticRoundedNarrowingSaturateUnsigned(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticRoundedNarrowingSaturateUnsignedScalar_Vector64_UInt16_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticRoundedNarrowingSaturateUnsignedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "15", ["ValidateFirstResult"] = "Helpers.ShiftRightArithmeticRoundedNarrowingSaturateUnsigned(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightArithmeticRoundedNarrowingSaturateUnsignedScalar_Vector64_UInt32_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightArithmeticRoundedNarrowingSaturateUnsignedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "31", ["ValidateFirstResult"] = "Helpers.ShiftRightArithmeticRoundedNarrowingSaturateUnsigned(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalNarrowingSaturateScalar_Vector64_Byte_5", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalNarrowingSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "7", ["ValidateFirstResult"] = "Helpers.ShiftRightLogicalNarrowingSaturate(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalNarrowingSaturateScalar_Vector64_Int16_7", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalNarrowingSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "15", ["ValidateFirstResult"] = "Helpers.ShiftRightLogicalNarrowingSaturate(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalNarrowingSaturateScalar_Vector64_Int32_11", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalNarrowingSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "31", ["ValidateFirstResult"] = "Helpers.ShiftRightLogicalNarrowingSaturate(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalNarrowingSaturateScalar_Vector64_SByte_3", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalNarrowingSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "7", ["ValidateFirstResult"] = "Helpers.ShiftRightLogicalNarrowingSaturate(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalNarrowingSaturateScalar_Vector64_UInt16_5", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalNarrowingSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "15", ["ValidateFirstResult"] = "Helpers.ShiftRightLogicalNarrowingSaturate(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalNarrowingSaturateScalar_Vector64_UInt32_7", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalNarrowingSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["Imm"] = "31", ["ValidateFirstResult"] = "Helpers.ShiftRightLogicalNarrowingSaturate(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedNarrowingSaturateScalar_Vector64_Byte_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedNarrowingSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "3", ["ValidateFirstResult"] = "Helpers.ShiftRightLogicalRoundedNarrowingSaturate(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedNarrowingSaturateScalar_Vector64_Int16_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedNarrowingSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "5", ["ValidateFirstResult"] = "Helpers.ShiftRightLogicalRoundedNarrowingSaturate(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedNarrowingSaturateScalar_Vector64_Int32_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedNarrowingSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "7", ["ValidateFirstResult"] = "Helpers.ShiftRightLogicalRoundedNarrowingSaturate(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedNarrowingSaturateScalar_Vector64_SByte_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedNarrowingSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "3", ["ValidateFirstResult"] = "Helpers.ShiftRightLogicalRoundedNarrowingSaturate(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedNarrowingSaturateScalar_Vector64_UInt16_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedNarrowingSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "5", ["ValidateFirstResult"] = "Helpers.ShiftRightLogicalRoundedNarrowingSaturate(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmUnOpTest.template", new Dictionary { ["TestName"] = "ShiftRightLogicalRoundedNarrowingSaturateScalar_Vector64_UInt32_1", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ShiftRightLogicalRoundedNarrowingSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["Imm"] = "7", ["ValidateFirstResult"] = "Helpers.ShiftRightLogicalRoundedNarrowingSaturate(firstOp[0], Imm) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Sqrt_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "Sqrt", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Sqrt(firstOp[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Sqrt_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "Sqrt", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.Sqrt(firstOp[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleVecOpTest.template", new Dictionary { ["TestName"] = "Sqrt_Vector128_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "Sqrt", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateIterResult"] = "BitConverter.SingleToInt32Bits(Helpers.Sqrt(firstOp[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("VecBinOpTest.template", new Dictionary { ["TestName"] = "Subtract_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "Subtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateIterResult"] = "BitConverter.DoubleToInt64Bits(Helpers.Subtract(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "SubtractSaturateScalar_Vector64_Byte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "Helpers.SubtractSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "SubtractSaturateScalar_Vector64_Int16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "Helpers.SubtractSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "SubtractSaturateScalar_Vector64_Int32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "Helpers.SubtractSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "SubtractSaturateScalar_Vector64_SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "Helpers.SubtractSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "SubtractSaturateScalar_Vector64_UInt16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "Helpers.SubtractSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "SubtractSaturateScalar_Vector64_UInt32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "SubtractSaturateScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "Helpers.SubtractSaturate(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "TransposeEven_Vector64_Byte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "TransposeEven", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateEntry"] = "result[index] != left[i] || result[++index] != right[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "TransposeEven_Vector64_Int16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "TransposeEven", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateEntry"] = "result[index] != left[i] || result[++index] != right[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "TransposeEven_Vector64_Int32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "TransposeEven", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateEntry"] = "result[index] != left[i] || result[++index] != right[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "TransposeEven_Vector64_SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "TransposeEven", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateEntry"] = "result[index] != left[i] || result[++index] != right[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "TransposeEven_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "TransposeEven", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateEntry"] = "result[index] != left[i] || result[++index] != right[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "TransposeEven_Vector64_UInt16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "TransposeEven", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateEntry"] = "result[index] != left[i] || result[++index] != right[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "TransposeEven_Vector64_UInt32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "TransposeEven", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateEntry"] = "result[index] != left[i] || result[++index] != right[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "TransposeEven_Vector128_Byte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "TransposeEven", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateEntry"] = "result[index] != left[i] || result[++index] != right[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "TransposeEven_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "TransposeEven", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateEntry"] = "result[index] != left[i] || result[++index] != right[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "TransposeEven_Vector128_Int16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "TransposeEven", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateEntry"] = "result[index] != left[i] || result[++index] != right[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "TransposeEven_Vector128_Int32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "TransposeEven", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateEntry"] = "result[index] != left[i] || result[++index] != right[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "TransposeEven_Vector128_Int64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "TransposeEven", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateEntry"] = "result[index] != left[i] || result[++index] != right[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "TransposeEven_Vector128_SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "TransposeEven", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateEntry"] = "result[index] != left[i] || result[++index] != right[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "TransposeEven_Vector128_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "TransposeEven", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateEntry"] = "result[index] != left[i] || result[++index] != right[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "TransposeEven_Vector128_UInt16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "TransposeEven", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateEntry"] = "result[index] != left[i] || result[++index] != right[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "TransposeEven_Vector128_UInt32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "TransposeEven", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateEntry"] = "result[index] != left[i] || result[++index] != right[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "TransposeEven_Vector128_UInt64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "TransposeEven", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateEntry"] = "result[index] != left[i] || result[++index] != right[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "TransposeOdd_Vector64_Byte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "TransposeOdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateEntry"] = "result[index] != left[i+1] || result[++index] != right[i+1]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "TransposeOdd_Vector64_Int16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "TransposeOdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateEntry"] = "result[index] != left[i+1] || result[++index] != right[i+1]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "TransposeOdd_Vector64_Int32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "TransposeOdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateEntry"] = "result[index] != left[i+1] || result[++index] != right[i+1]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "TransposeOdd_Vector64_SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "TransposeOdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateEntry"] = "result[index] != left[i+1] || result[++index] != right[i+1]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "TransposeOdd_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "TransposeOdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateEntry"] = "result[index] != left[i+1] || result[++index] != right[i+1]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "TransposeOdd_Vector64_UInt16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "TransposeOdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateEntry"] = "result[index] != left[i+1] || result[++index] != right[i+1]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "TransposeOdd_Vector64_UInt32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "TransposeOdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateEntry"] = "result[index] != left[i+1] || result[++index] != right[i+1]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "TransposeOdd_Vector128_Byte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "TransposeOdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateEntry"] = "result[index] != left[i+1] || result[++index] != right[i+1]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "TransposeOdd_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "TransposeOdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateEntry"] = "result[index] != left[i+1] || result[++index] != right[i+1]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "TransposeOdd_Vector128_Int16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "TransposeOdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateEntry"] = "result[index] != left[i+1] || result[++index] != right[i+1]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "TransposeOdd_Vector128_Int32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "TransposeOdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateEntry"] = "result[index] != left[i+1] || result[++index] != right[i+1]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "TransposeOdd_Vector128_Int64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "TransposeOdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateEntry"] = "result[index] != left[i+1] || result[++index] != right[i+1]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "TransposeOdd_Vector128_SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "TransposeOdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateEntry"] = "result[index] != left[i+1] || result[++index] != right[i+1]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "TransposeOdd_Vector128_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "TransposeOdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateEntry"] = "result[index] != left[i+1] || result[++index] != right[i+1]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "TransposeOdd_Vector128_UInt16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "TransposeOdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateEntry"] = "result[index] != left[i+1] || result[++index] != right[i+1]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "TransposeOdd_Vector128_UInt32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "TransposeOdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateEntry"] = "result[index] != left[i+1] || result[++index] != right[i+1]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "TransposeOdd_Vector128_UInt64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "TransposeOdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateEntry"] = "result[index] != left[i+1] || result[++index] != right[i+1]"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "VectorTableLookup_Vector128_Byte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "VectorTableLookup", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "(Byte)(TestLibrary.Generator.GetByte() % 20)", ["ValidateFirstResult"] = "Helpers.TableVectorLookup(0, right, left) != result[0]", ["ValidateRemainingResults"] = "Helpers.TableVectorLookup(i, right, left) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "VectorTableLookup_Vector128_SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "VectorTableLookup", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "(SByte)(TestLibrary.Generator.GetSByte() % 20)", ["ValidateFirstResult"] = "Helpers.TableVectorLookup(0, right, left) != result[0]", ["ValidateRemainingResults"] = "Helpers.TableVectorLookup(i, right, left) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "VectorTableLookupExtension_Vector128_Byte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "VectorTableLookupExtension", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["NextValueOp3"] = "(Byte)(TestLibrary.Generator.GetByte() % 20)", ["ValidateIterResult"] = "Helpers.TableVectorExtension(i, firstOp, thirdOp, secondOp) != result[i]"}), - ("VecTernOpTest.template", new Dictionary { ["TestName"] = "VectorTableLookupExtension_Vector128_SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "VectorTableLookupExtension", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp3"] = "(SByte)(TestLibrary.Generator.GetSByte() % 20)", ["ValidateIterResult"] = "Helpers.TableVectorExtension(i, firstOp, thirdOp, secondOp) != result[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "UnzipEven_Vector64_Byte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "UnzipEven", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateEntry"] = "result[index] != left[i] || result[index + half] != right[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "UnzipEven_Vector64_Int16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "UnzipEven", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateEntry"] = "result[index] != left[i] || result[index + half] != right[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "UnzipEven_Vector64_Int32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "UnzipEven", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateEntry"] = "result[index] != left[i] || result[index + half] != right[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "UnzipEven_Vector64_SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "UnzipEven", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateEntry"] = "result[index] != left[i] || result[index + half] != right[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "UnzipEven_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "UnzipEven", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateEntry"] = "result[index] != left[i] || result[index + half] != right[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "UnzipEven_Vector64_UInt16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "UnzipEven", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateEntry"] = "result[index] != left[i] || result[index + half] != right[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "UnzipEven_Vector64_UInt32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "UnzipEven", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateEntry"] = "result[index] != left[i] || result[index + half] != right[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "UnzipEven_Vector128_Byte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "UnzipEven", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateEntry"] = "result[index] != left[i] || result[index + half] != right[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "UnzipEven_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "UnzipEven", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateEntry"] = "result[index] != left[i] || result[index + half] != right[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "UnzipEven_Vector128_Int16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "UnzipEven", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateEntry"] = "result[index] != left[i] || result[index + half] != right[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "UnzipEven_Vector128_Int32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "UnzipEven", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateEntry"] = "result[index] != left[i] || result[index + half] != right[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "UnzipEven_Vector128_Int64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "UnzipEven", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateEntry"] = "result[index] != left[i] || result[index + half] != right[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "UnzipEven_Vector128_SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "UnzipEven", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateEntry"] = "result[index] != left[i] || result[index + half] != right[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "UnzipEven_Vector128_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "UnzipEven", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateEntry"] = "result[index] != left[i] || result[index + half] != right[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "UnzipEven_Vector128_UInt16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "UnzipEven", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateEntry"] = "result[index] != left[i] || result[index + half] != right[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "UnzipEven_Vector128_UInt32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "UnzipEven", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateEntry"] = "result[index] != left[i] || result[index + half] != right[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "UnzipEven_Vector128_UInt64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "UnzipEven", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateEntry"] = "result[index] != left[i] || result[index + half] != right[i]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "UnzipOdd_Vector64_Byte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "UnzipOdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateEntry"] = "result[index] != left[i+1] || result[index + half] != right[i+1]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "UnzipOdd_Vector64_Int16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "UnzipOdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateEntry"] = "result[index] != left[i+1] || result[index + half] != right[i+1]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "UnzipOdd_Vector64_Int32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "UnzipOdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateEntry"] = "result[index] != left[i+1] || result[index + half] != right[i+1]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "UnzipOdd_Vector64_SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "UnzipOdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateEntry"] = "result[index] != left[i+1] || result[index + half] != right[i+1]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "UnzipOdd_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "UnzipOdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateEntry"] = "result[index] != left[i+1] || result[index + half] != right[i+1]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "UnzipOdd_Vector64_UInt16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "UnzipOdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateEntry"] = "result[index] != left[i+1] || result[index + half] != right[i+1]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "UnzipOdd_Vector64_UInt32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "UnzipOdd", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateEntry"] = "result[index] != left[i+1] || result[index + half] != right[i+1]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "UnzipOdd_Vector128_Byte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "UnzipOdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateEntry"] = "result[index] != left[i+1] || result[index + half] != right[i+1]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "UnzipOdd_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "UnzipOdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateEntry"] = "result[index] != left[i+1] || result[index + half] != right[i+1]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "UnzipOdd_Vector128_Int16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "UnzipOdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateEntry"] = "result[index] != left[i+1] || result[index + half] != right[i+1]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "UnzipOdd_Vector128_Int32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "UnzipOdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateEntry"] = "result[index] != left[i+1] || result[index + half] != right[i+1]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "UnzipOdd_Vector128_Int64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "UnzipOdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateEntry"] = "result[index] != left[i+1] || result[index + half] != right[i+1]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "UnzipOdd_Vector128_SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "UnzipOdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateEntry"] = "result[index] != left[i+1] || result[index + half] != right[i+1]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "UnzipOdd_Vector128_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "UnzipOdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateEntry"] = "result[index] != left[i+1] || result[index + half] != right[i+1]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "UnzipOdd_Vector128_UInt16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "UnzipOdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateEntry"] = "result[index] != left[i+1] || result[index + half] != right[i+1]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "UnzipOdd_Vector128_UInt32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "UnzipOdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateEntry"] = "result[index] != left[i+1] || result[index + half] != right[i+1]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "UnzipOdd_Vector128_UInt64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "UnzipOdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateEntry"] = "result[index] != left[i+1] || result[index + half] != right[i+1]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "ZipHigh_Vector64_Byte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZipHigh", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateEntry"] = "result[i] != left[index+half] || result[i+1] != right[index+half]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "ZipHigh_Vector64_Int16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZipHigh", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateEntry"] = "result[i] != left[index+half] || result[i+1] != right[index+half]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "ZipHigh_Vector64_Int32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZipHigh", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateEntry"] = "result[i] != left[index+half] || result[i+1] != right[index+half]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "ZipHigh_Vector64_SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZipHigh", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateEntry"] = "result[i] != left[index+half] || result[i+1] != right[index+half]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "ZipHigh_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZipHigh", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateEntry"] = "result[i] != left[index+half] || result[i+1] != right[index+half]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "ZipHigh_Vector64_UInt16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZipHigh", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateEntry"] = "result[i] != left[index+half] || result[i+1] != right[index+half]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "ZipHigh_Vector64_UInt32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZipHigh", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateEntry"] = "result[i] != left[index+half] || result[i+1] != right[index+half]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "ZipHigh_Vector128_Byte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZipHigh", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateEntry"] = "result[i] != left[index+half] || result[i+1] != right[index+half]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "ZipHigh_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZipHigh", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateEntry"] = "result[i] != left[index+half] || result[i+1] != right[index+half]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "ZipHigh_Vector128_Int16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZipHigh", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateEntry"] = "result[i] != left[index+half] || result[i+1] != right[index+half]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "ZipHigh_Vector128_Int32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZipHigh", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateEntry"] = "result[i] != left[index+half] || result[i+1] != right[index+half]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "ZipHigh_Vector128_Int64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZipHigh", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateEntry"] = "result[i] != left[index+half] || result[i+1] != right[index+half]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "ZipHigh_Vector128_SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZipHigh", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateEntry"] = "result[i] != left[index+half] || result[i+1] != right[index+half]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "ZipHigh_Vector128_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZipHigh", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateEntry"] = "result[i] != left[index+half] || result[i+1] != right[index+half]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "ZipHigh_Vector128_UInt16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZipHigh", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateEntry"] = "result[i] != left[index+half] || result[i+1] != right[index+half]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "ZipHigh_Vector128_UInt32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZipHigh", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateEntry"] = "result[i] != left[index+half] || result[i+1] != right[index+half]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "ZipHigh_Vector128_UInt64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZipHigh", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateEntry"] = "result[i] != left[index+half] || result[i+1] != right[index+half]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "ZipLow_Vector64_Byte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZipLow", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateEntry"] = "result[i] != left[index] || result[i+1] != right[index]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "ZipLow_Vector64_Int16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZipLow", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateEntry"] = "result[i] != left[index] || result[i+1] != right[index]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "ZipLow_Vector64_Int32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZipLow", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateEntry"] = "result[i] != left[index] || result[i+1] != right[index]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "ZipLow_Vector64_SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZipLow", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateEntry"] = "result[i] != left[index] || result[i+1] != right[index]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "ZipLow_Vector64_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZipLow", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateEntry"] = "result[i] != left[index] || result[i+1] != right[index]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "ZipLow_Vector64_UInt16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZipLow", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateEntry"] = "result[i] != left[index] || result[i+1] != right[index]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "ZipLow_Vector64_UInt32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZipLow", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateEntry"] = "result[i] != left[index] || result[i+1] != right[index]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "ZipLow_Vector128_Byte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZipLow", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateEntry"] = "result[i] != left[index] || result[i+1] != right[index]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "ZipLow_Vector128_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZipLow", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateEntry"] = "result[i] != left[index] || result[i+1] != right[index]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "ZipLow_Vector128_Int16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZipLow", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateEntry"] = "result[i] != left[index] || result[i+1] != right[index]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "ZipLow_Vector128_Int32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZipLow", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateEntry"] = "result[i] != left[index] || result[i+1] != right[index]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "ZipLow_Vector128_Int64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZipLow", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateEntry"] = "result[i] != left[index] || result[i+1] != right[index]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "ZipLow_Vector128_SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZipLow", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateEntry"] = "result[i] != left[index] || result[i+1] != right[index]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "ZipLow_Vector128_Single", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZipLow", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateEntry"] = "result[i] != left[index] || result[i+1] != right[index]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "ZipLow_Vector128_UInt16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZipLow", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateEntry"] = "result[i] != left[index] || result[i+1] != right[index]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "ZipLow_Vector128_UInt32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZipLow", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateEntry"] = "result[i] != left[index] || result[i+1] != right[index]"}), - ("VecPairBinOpTest.template", new Dictionary { ["TestName"] = "ZipLow_Vector128_UInt64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "ZipLow", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateEntry"] = "result[i] != left[index] || result[i+1] != right[index]"}), -}; - -private static readonly (string templateFileName, Dictionary templateData)[] AesInputs = new [] -{ - ("AesBinOpTest.template", new Dictionary { ["TestName"] = "Decrypt_Vector128_Byte", ["Isa"] = "Aes", ["LoadIsa"] = "AdvSimd", ["Method"] = "Decrypt", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["InputSize"] = "16", ["Input"] = "{0xEF, 0xCD, 0xAB, 0x89, 0x67, 0x45, 0x23, 0x01, 0xFF, 0xEE, 0xDD, 0xCC, 0xBB, 0xAA, 0x99, 0x88}", ["KeySize"] = "16", ["Key"] = "{0xFF, 0xDD, 0xBB, 0x99, 0x77, 0x55, 0x33, 0x11, 0xEE, 0xCC, 0xAA, 0x88, 0x66, 0x44, 0x22, 0x00}", ["ExpectedRetSize"] = "16", ["ExpectedRet"] = "{0x7C, 0x99, 0x02, 0x7C, 0x7C, 0x7C, 0xFE, 0x86, 0xE3, 0x7C, 0x7C, 0x97, 0xC9, 0x94, 0x7C, 0x7C}"}), - ("AesBinOpTest.template", new Dictionary { ["TestName"] = "Encrypt_Vector128_Byte", ["Isa"] = "Aes", ["LoadIsa"] = "AdvSimd", ["Method"] = "Encrypt", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["InputSize"] = "16", ["Input"] = "{0xEF, 0xCD, 0xAB, 0x89, 0x67, 0x45, 0x23, 0x01, 0xFF, 0xEE, 0xDD, 0xCC, 0xBB, 0xAA, 0x99, 0x88}", ["KeySize"] = "16", ["Key"] = "{0xFF, 0xDD, 0xBB, 0x99, 0x77, 0x55, 0x33, 0x11, 0xEE, 0xCC, 0xAA, 0x88, 0x66, 0x44, 0x22, 0x00}", ["ExpectedRetSize"] = "16", ["ExpectedRet"] = "{0xCA, 0xCA, 0xF5, 0xC4, 0xCA, 0x93, 0xEA, 0xCA, 0x82, 0x28, 0xCA, 0xCA, 0xC1, 0xCA, 0xCA, 0x1B}"}), - ("AesUnOpTest.template", new Dictionary { ["TestName"] = "InverseMixColumns_Vector128_Byte", ["Isa"] = "Aes", ["LoadIsa"] = "AdvSimd", ["Method"] = "InverseMixColumns", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["InputSize"] = "16", ["Input"] = "{0xEF, 0xCD, 0xAB, 0x89, 0x67, 0x45, 0x23, 0x01, 0xFF, 0xEE, 0xDD, 0xCC, 0xBB, 0xAA, 0x99, 0x88}", ["ExpectedRetSize"] = "16", ["ExpectedRet"] = "{0xA0, 0x0A, 0xE4, 0x4E, 0x28, 0x82, 0x6C, 0xC6, 0x55, 0x00, 0x77, 0x22, 0x11, 0x44, 0x33, 0x66}"}), - ("AesUnOpTest.template", new Dictionary { ["TestName"] = "MixColumns_Vector128_Byte", ["Isa"] = "Aes", ["LoadIsa"] = "AdvSimd", ["Method"] = "MixColumns", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["InputSize"] = "16", ["Input"] = "{0xEF, 0xCD, 0xAB, 0x89, 0x67, 0x45, 0x23, 0x01, 0xFF, 0xEE, 0xDD, 0xCC, 0xBB, 0xAA, 0x99, 0x88}", ["ExpectedRetSize"] = "16", ["ExpectedRet"] = "{0xAB, 0x01, 0xEF, 0x45, 0x23, 0x89, 0x67, 0xCD, 0xDD, 0x88, 0xFF, 0xAA, 0x99, 0xCC, 0xBB, 0xEE}"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "PolynomialMultiplyWideningLower_Vector64_Int64", ["Isa"] = "Aes", ["LoadIsa"] = "AdvSimd", ["Method"] = "PolynomialMultiplyWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "Helpers.PolynomialMultiplyWideningLo64(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "Helpers.PolynomialMultiplyWideningHi64(left[0], right[0]) != result[1]"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "PolynomialMultiplyWideningLower_Vector64_UInt64", ["Isa"] = "Aes", ["LoadIsa"] = "AdvSimd", ["Method"] = "PolynomialMultiplyWideningLower", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "Helpers.PolynomialMultiplyWideningLo64(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "Helpers.PolynomialMultiplyWideningHi64(left[0], right[0]) != result[1]"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "PolynomialMultiplyWideningUpper_Vector128_Int64", ["Isa"] = "Aes", ["LoadIsa"] = "AdvSimd", ["Method"] = "PolynomialMultiplyWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "Helpers.PolynomialMultiplyWideningLo64(left[1], right[1]) != result[0]", ["ValidateRemainingResults"] = "Helpers.PolynomialMultiplyWideningHi64(left[1], right[1]) != result[1]"}), - ("SimpleBinOpTest.template", new Dictionary { ["TestName"] = "PolynomialMultiplyWideningUpper_Vector128_UInt64", ["Isa"] = "Aes", ["LoadIsa"] = "AdvSimd", ["Method"] = "PolynomialMultiplyWideningUpper", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "Helpers.PolynomialMultiplyWideningLo64(left[1], right[1]) != result[0]", ["ValidateRemainingResults"] = "Helpers.PolynomialMultiplyWideningHi64(left[1], right[1]) != result[1]"}) -}; - -private static readonly (string templateFileName, Dictionary templateData)[] ArmBaseInputs = new [] -{ - ("ScalarUnOpTest.template", new Dictionary { ["TestName"] = "LeadingZeroCount_Int32", ["Isa"] = "ArmBase", ["Method"] = "LeadingZeroCount", ["RetBaseType"] = "Int32", ["Op1BaseType"] = "Int32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateResult"] = "int expectedResult = 0; for (int index = 31; (((uint)data >> index) & 1) == 0; index--) { expectedResult++; } isUnexpectedResult = (expectedResult != result);" }), - ("ScalarUnOpTest.template", new Dictionary { ["TestName"] = "LeadingZeroCount_UInt32", ["Isa"] = "ArmBase", ["Method"] = "LeadingZeroCount", ["RetBaseType"] = "Int32", ["Op1BaseType"] = "UInt32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateResult"] = "int expectedResult = 0; for (int index = 31; ((data >> index) & 1) == 0; index--) { expectedResult++; } isUnexpectedResult = (expectedResult != result);" }), - ("ScalarUnOpTest.template", new Dictionary { ["TestName"] = "ReverseElementBits_Int32", ["Isa"] = "ArmBase", ["Method"] = "ReverseElementBits", ["RetBaseType"] = "Int32", ["Op1BaseType"] = "Int32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateResult"] = "isUnexpectedResult = Helpers.ReverseElementBits(data) != result;" }), - ("ScalarUnOpTest.template", new Dictionary { ["TestName"] = "ReverseElementBits_UInt32", ["Isa"] = "ArmBase", ["Method"] = "ReverseElementBits", ["RetBaseType"] = "UInt32", ["Op1BaseType"] = "UInt32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateResult"] = "isUnexpectedResult = Helpers.ReverseElementBits(data) != result;" }), -}; - -private static readonly (string templateFileName, Dictionary templateData)[] ArmBase_Arm64Inputs = new [] -{ - ("ScalarUnOpTest.template", new Dictionary { ["TestName"] = "LeadingSignCount_Int32", ["Isa"] = "ArmBase.Arm64", ["Method"] = "LeadingSignCount", ["RetBaseType"] = "Int32", ["Op1BaseType"] = "Int32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateResult"] = "int expectedResult = 0; for (int index = 30; (((uint)data >> index) & 1) == (((uint)data >> 31) & 1); index--) { expectedResult++; } isUnexpectedResult = (expectedResult != result);" }), - ("ScalarUnOpTest.template", new Dictionary { ["TestName"] = "LeadingSignCount_Int64", ["Isa"] = "ArmBase.Arm64", ["Method"] = "LeadingSignCount", ["RetBaseType"] = "Int32", ["Op1BaseType"] = "Int64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateResult"] = "int expectedResult = 0; for (int index = 62; (((ulong)data >> index) & 1) == (((ulong)data >> 63) & 1); index--) { expectedResult++; } isUnexpectedResult = (expectedResult != result);" }), - ("ScalarUnOpTest.template", new Dictionary { ["TestName"] = "LeadingZeroCount_Int64", ["Isa"] = "ArmBase.Arm64", ["Method"] = "LeadingZeroCount", ["RetBaseType"] = "Int32", ["Op1BaseType"] = "Int64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateResult"] = "int expectedResult = 0; for (int index = 63; (((ulong)data >> index) & 1) == 0; index--) { expectedResult++; } isUnexpectedResult = (expectedResult != result);" }), - ("ScalarUnOpTest.template", new Dictionary { ["TestName"] = "LeadingZeroCount_UInt64", ["Isa"] = "ArmBase.Arm64", ["Method"] = "LeadingZeroCount", ["RetBaseType"] = "Int32", ["Op1BaseType"] = "UInt64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateResult"] = "int expectedResult = 0; for (int index = 63; ((data >> index) & 1) == 0; index--) { expectedResult++; } isUnexpectedResult = (expectedResult != result);" }), - ("ScalarUnOpTest.template", new Dictionary { ["TestName"] = "ReverseElementBits_Int64", ["Isa"] = "ArmBase.Arm64", ["Method"] = "ReverseElementBits", ["RetBaseType"] = "Int64", ["Op1BaseType"] = "Int64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateResult"] = "isUnexpectedResult = Helpers.ReverseElementBits(data) != result;" }), - ("ScalarUnOpTest.template", new Dictionary { ["TestName"] = "ReverseElementBits_UInt64", ["Isa"] = "ArmBase.Arm64", ["Method"] = "ReverseElementBits", ["RetBaseType"] = "UInt64", ["Op1BaseType"] = "UInt64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateResult"] = "isUnexpectedResult = Helpers.ReverseElementBits(data) != result;" }), -}; - -private static readonly (string templateFileName, Dictionary templateData)[] Crc32Inputs = new [] -{ - ("ScalarBinOpTest.template", new Dictionary { ["TestName"] = "ComputeCrc32_Byte", ["Isa"] = "Crc32", ["Method"] = "ComputeCrc32", ["RetBaseType"] = "UInt32", ["Op1BaseType"] = "UInt32", ["Op2BaseType"] = "Byte", ["NextValueOp1"] = "0xFFFFFFFF", ["NextValueOp2"] = "0x20", ["ValidateResult"] = "uint expectedResult = 0x169330BA; isUnexpectedResult = (expectedResult != result);" }), - ("ScalarBinOpTest.template", new Dictionary { ["TestName"] = "ComputeCrc32_UInt16", ["Isa"] = "Crc32", ["Method"] = "ComputeCrc32", ["RetBaseType"] = "UInt32", ["Op1BaseType"] = "UInt32", ["Op2BaseType"] = "UInt16", ["NextValueOp1"] = "0xFFFFFFFF", ["NextValueOp2"] = "0x2019", ["ValidateResult"] = "uint expectedResult = 0x1E4864D0; isUnexpectedResult = (expectedResult != result);" }), - ("ScalarBinOpTest.template", new Dictionary { ["TestName"] = "ComputeCrc32_UInt32", ["Isa"] = "Crc32", ["Method"] = "ComputeCrc32", ["RetBaseType"] = "UInt32", ["Op1BaseType"] = "UInt32", ["Op2BaseType"] = "UInt32", ["NextValueOp1"] = "0xFFFFFFFF", ["NextValueOp2"] = "0x20191113", ["ValidateResult"] = "uint expectedResult = 0x219D9805; isUnexpectedResult = (expectedResult != result);" }), - ("ScalarBinOpTest.template", new Dictionary { ["TestName"] = "ComputeCrc32C_Byte", ["Isa"] = "Crc32", ["Method"] = "ComputeCrc32C", ["RetBaseType"] = "UInt32", ["Op1BaseType"] = "UInt32", ["Op2BaseType"] = "Byte", ["NextValueOp1"] = "0xFFFFFFFF", ["NextValueOp2"] = "0x20", ["ValidateResult"] = "uint expectedResult = 0x8D3F2270; isUnexpectedResult = (expectedResult != result);" }), - ("ScalarBinOpTest.template", new Dictionary { ["TestName"] = "ComputeCrc32C_UInt16", ["Isa"] = "Crc32", ["Method"] = "ComputeCrc32C", ["RetBaseType"] = "UInt32", ["Op1BaseType"] = "UInt32", ["Op2BaseType"] = "UInt16", ["NextValueOp1"] = "0xFFFFFFFF", ["NextValueOp2"] = "0x2019", ["ValidateResult"] = "uint expectedResult = 0x9F50ACBD; isUnexpectedResult = (expectedResult != result);" }), - ("ScalarBinOpTest.template", new Dictionary { ["TestName"] = "ComputeCrc32C_UInt32", ["Isa"] = "Crc32", ["Method"] = "ComputeCrc32C", ["RetBaseType"] = "UInt32", ["Op1BaseType"] = "UInt32", ["Op2BaseType"] = "UInt32", ["NextValueOp1"] = "0xFFFFFFFF", ["NextValueOp2"] = "0x20191113", ["ValidateResult"] = "uint expectedResult = 0x78F34758; isUnexpectedResult = (expectedResult != result);" }), -}; - -private static readonly (string templateFileName, Dictionary templateData)[] Crc32_Arm64Inputs = new [] -{ - ("ScalarBinOpTest.template", new Dictionary { ["TestName"] = "ComputeCrc32_UInt64", ["Isa"] = "Crc32.Arm64", ["Method"] = "ComputeCrc32", ["RetBaseType"] = "UInt32", ["Op1BaseType"] = "UInt32", ["Op2BaseType"] = "UInt64", ["NextValueOp1"] = "0xFFFFFFFF", ["NextValueOp2"] = "0x20191113110219UL", ["ValidateResult"] = "uint expectedResult = 0xEFAAAB74; isUnexpectedResult = (expectedResult != result);" }), - ("ScalarBinOpTest.template", new Dictionary { ["TestName"] = "ComputeCrc32C_UInt64", ["Isa"] = "Crc32.Arm64", ["Method"] = "ComputeCrc32C", ["RetBaseType"] = "UInt32", ["Op1BaseType"] = "UInt32", ["Op2BaseType"] = "UInt64", ["NextValueOp1"] = "0xFFFFFFFF", ["NextValueOp2"] = "0x20191113110219UL", ["ValidateResult"] = "uint expectedResult = 0x6295C71A; isUnexpectedResult = (expectedResult != result);" }), -}; - -private static readonly (string templateFileName, Dictionary templateData)[] Sha1Inputs = new [] -{ - ("SecureHashUnOpTest.template", new Dictionary { ["TestName"] = "FixedRotate_Vector64_UInt32", ["Isa"] = "Sha1", ["LoadIsa"] = "AdvSimd", ["Method"] = "FixedRotate", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "0x00112233", ["ExpectedResult"] = "{0xC004488C, 0x0, 0x0, 0x0}"}), - ("SecureHashTernOpTest.template", new Dictionary { ["TestName"] = "HashUpdateChoose_Vector128_UInt32", ["Isa"] = "Sha1", ["LoadIsa"] = "AdvSimd", ["Method"] = "HashUpdateChoose", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "0x00112233", ["NextValueOp2"] = "0x44556677", ["NextValueOp3"] = "0x8899AABB", ["ExpectedResult"] = "{0x27A38C6D, 0xEFEFCA67, 0xDB4E8169, 0x73C91E71}"}), - ("SecureHashTernOpTest.template", new Dictionary { ["TestName"] = "HashUpdateMajority_Vector128_UInt32", ["Isa"] = "Sha1", ["LoadIsa"] = "AdvSimd", ["Method"] = "HashUpdateMajority", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "0x00112233", ["NextValueOp2"] = "0x44556677", ["NextValueOp3"] = "0x8899AABB", ["ExpectedResult"] = "{0xEC691B1D, 0xF21410C7, 0x9B52C9F6, 0x73C91E71}"}), - ("SecureHashTernOpTest.template", new Dictionary { ["TestName"] = "HashUpdateParity_Vector128_UInt32", ["Isa"] = "Sha1", ["LoadIsa"] = "AdvSimd", ["Method"] = "HashUpdateParity", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "0x00112233", ["NextValueOp2"] = "0x44556677", ["NextValueOp3"] = "0x8899AABB", ["ExpectedResult"] = "{0xDAB2AF34, 0xFF990D18, 0xCB4F938C, 0x73C91E71}"}), - ("SecureHashTernOpTest.template", new Dictionary { ["TestName"] = "ScheduleUpdate0_Vector128_UInt32", ["Isa"] = "Sha1", ["LoadIsa"] = "AdvSimd", ["Method"] = "ScheduleUpdate0", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "0x00112233", ["NextValueOp2"] = "0x44556677", ["NextValueOp3"] = "0x8899AABB", ["ExpectedResult"] = "{0x8899AABB, 0x8899AABB, 0xCCDDEEFF, 0xCCDDEEFF}"}), - ("SecureHashBinOpTest.template", new Dictionary { ["TestName"] = "ScheduleUpdate1_Vector128_UInt32", ["Isa"] = "Sha1", ["LoadIsa"] = "AdvSimd", ["Method"] = "ScheduleUpdate1", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "0x00112233", ["NextValueOp2"] = "0x44556677", ["ExpectedResult"] = "{0x88888888, 0x88888888, 0x88888888, 0x11335577}"}), -}; - -private static readonly (string templateFileName, Dictionary templateData)[] Sha256Inputs = new [] -{ - ("SecureHashTernOpTest.template", new Dictionary { ["TestName"] = "HashUpdate1_Vector128_UInt32", ["Isa"] = "Sha256", ["LoadIsa"] = "AdvSimd", ["Method"] = "HashUpdate1", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "0x00112233", ["NextValueOp2"] = "0x44556677", ["NextValueOp3"] = "0x8899AABB", ["ExpectedResult"] = "{0x3D22118E, 0x987CA5FB, 0x54F4E477, 0xDFB50278}"}), - ("SecureHashTernOpTest.template", new Dictionary { ["TestName"] = "HashUpdate2_Vector128_UInt32", ["Isa"] = "Sha256", ["LoadIsa"] = "AdvSimd", ["Method"] = "HashUpdate2", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "0x00112233", ["NextValueOp2"] = "0x44556677", ["NextValueOp3"] = "0x8899AABB", ["ExpectedResult"] = "{0xFFD38634, 0x2A33F83F, 0x55A1BE45, 0x5002B4C4}"}), - ("SecureHashBinOpTest.template", new Dictionary { ["TestName"] = "ScheduleUpdate0_Vector128_UInt32", ["Isa"] = "Sha256", ["LoadIsa"] = "AdvSimd", ["Method"] = "ScheduleUpdate0", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "0x00112233", ["NextValueOp2"] = "0x44556677", ["ExpectedResult"] = "{0x2E9FE839, 0x2E9FE839, 0x2E9FE839, 0xBFB0F94A}"}), - ("SecureHashTernOpTest.template", new Dictionary { ["TestName"] = "ScheduleUpdate1_Vector128_UInt32", ["Isa"] = "Sha256", ["LoadIsa"] = "AdvSimd", ["Method"] = "ScheduleUpdate1", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "0x00112233", ["NextValueOp2"] = "0x44556677", ["NextValueOp3"] = "0x8899AABB", ["ExpectedResult"] = "{0x248F1BDF, 0x248F1BDF, 0xB303DDBA, 0xF74821FE}"}), -}; - -private static void ProcessInputs(string groupName, (string templateFileName, Dictionary templateData)[] inputs) -{ - // Too many tests may time out in CI or various stress modes - const int MaxGroupSize = 256; - - var numGroups = (inputs.Length + (MaxGroupSize - 1)) / MaxGroupSize; - - if (numGroups == 1) - { - ProcessInputGroup(groupName, -1, inputs); - } - else - { - for (var i = 0; i < numGroups; i++) - { - var groupStart = i * MaxGroupSize; - var groupSize = Math.Min(MaxGroupSize, inputs.Length - groupStart); - - var inputGroup = inputs.Skip(groupStart).Take(groupSize).ToArray(); - ProcessInputGroup(groupName, i, inputGroup); - } - } -} - -private static void ProcessInputGroup(string groupName, int index, (string templateFileName, Dictionary templateData)[] inputs) -{ - var directoryName = Path.Combine("..", groupName); - Directory.CreateDirectory(directoryName); - - var fileGroupName = (index >= 0) ? $"{groupName}_Part{index}" : groupName; - - var debugProjectFileName = Path.Combine(directoryName, $"{fileGroupName}_r.csproj"); - var releaseProjectFileName = Path.Combine(directoryName, $"{fileGroupName}_ro.csproj"); - - var testListFileName = Path.Combine(directoryName, $"Program.{fileGroupName}.cs"); - - using (var debugProjectFile = new StreamWriter(debugProjectFileName, append: false)) - using (var releaseProjectFile = new StreamWriter(releaseProjectFileName, append: false)) - using (var testListFile = new StreamWriter(testListFileName, append: false)) - { - debugProjectFile.WriteLine(@" - - Exe - true - - - Embedded - - - "); - - releaseProjectFile.WriteLine(@" - - Exe - true - - - Embedded - True - - "); - - testListFile.WriteLine(@"// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - static Program() - { - TestList = new Dictionary() {"); - - foreach (var input in inputs) - { - ProcessInput(debugProjectFile, releaseProjectFile, testListFile, groupName, input); - } - - debugProjectFile.WriteLine($@" - - - -"); - - releaseProjectFile.WriteLine($@" - - - -"); - - testListFile.WriteLine(@" }; - } - } -}"); - } -} - -private static void ProcessInput(StreamWriter debugProjectFile, StreamWriter releaseProjectFile, StreamWriter testListFile, string groupName, (string templateFileName, Dictionary templateData) input) -{ - var testName = input.templateData["TestName"]; - var fileName = testName.Replace('_', '.'); - - // Ex: - debugProjectFile.WriteLine($@" "); - releaseProjectFile.WriteLine($@" "); - - // Ex: ["Add.Vector128.Single"] = Add_Vector128_Single - testListFile.WriteLine($@" [""{fileName}""] = {testName},"); - - var testFileName = Path.Combine("..", groupName, $"{fileName}.cs"); - var matchingTemplate = Templates.Where((t) => t.outputTemplateName.Equals(input.templateFileName)).SingleOrDefault(); - var template = string.Empty; - - if (matchingTemplate.templateFileName is null) - { - template = File.ReadAllText(input.templateFileName); - } - else - { - template = File.ReadAllText(matchingTemplate.templateFileName); - - foreach (var kvp in matchingTemplate.templateData) - { - template = template.Replace($"{{{kvp.Key}}}", kvp.Value); - } - } - - foreach (var kvp in input.templateData) - { - template = template.Replace($"{{{kvp.Key}}}", kvp.Value); - } - - File.WriteAllText(testFileName, template); -} - -ProcessInputs("AdvSimd", AdvSimdInputs); -ProcessInputs("AdvSimd.Arm64", AdvSimd_Arm64Inputs); -ProcessInputs("Aes", AesInputs); -ProcessInputs("ArmBase", ArmBaseInputs); -ProcessInputs("ArmBase.Arm64", ArmBase_Arm64Inputs); -ProcessInputs("Crc32", Crc32Inputs); -ProcessInputs("Crc32.Arm64", Crc32_Arm64Inputs); -ProcessInputs("Sha1", Sha1Inputs); -ProcessInputs("Sha256", Sha256Inputs); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/Helpers.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/Helpers.cs deleted file mode 100644 index e90eab0b52ea..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/Helpers.cs +++ /dev/null @@ -1,4830 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// This file is auto-generated from template file Helpers.tt -// In order to make changes to this file, please update Helpers.tt -// and run the following command from Developer Command Prompt for Visual Studio -// "%DevEnvDir%\TextTransform.exe" .\Helpers.tt - -using System; -using System.Linq; - -namespace JIT.HardwareIntrinsics.Arm -{ - static class Helpers - { - public static sbyte CountLeadingSignBits(sbyte op1) - { - return (sbyte)(CountLeadingZeroBits((sbyte)((ulong)op1 ^ ((ulong)op1 >> 1))) - 1); - } - - public static short CountLeadingSignBits(short op1) - { - return (short)(CountLeadingZeroBits((short)((ulong)op1 ^ ((ulong)op1 >> 1))) - 1); - } - - public static int CountLeadingSignBits(int op1) - { - return (int)(CountLeadingZeroBits((int)((ulong)op1 ^ ((ulong)op1 >> 1))) - 1); - } - - public static sbyte CountLeadingZeroBits(sbyte op1) - { - return (sbyte)(8 * sizeof(sbyte) - (HighestSetBit(op1) + 1)); - } - - private static int HighestSetBit(sbyte op1) - { - for (int i = 8 * sizeof(sbyte) - 1; i >= 0; i--) - { - if (((ulong)op1 & (1UL << i)) != 0) - { - return i; - } - } - - return -1; - } - - public static byte CountLeadingZeroBits(byte op1) - { - return (byte)(8 * sizeof(byte) - (HighestSetBit(op1) + 1)); - } - - private static int HighestSetBit(byte op1) - { - for (int i = 8 * sizeof(byte) - 1; i >= 0; i--) - { - if (((ulong)op1 & (1UL << i)) != 0) - { - return i; - } - } - - return -1; - } - - public static short CountLeadingZeroBits(short op1) - { - return (short)(8 * sizeof(short) - (HighestSetBit(op1) + 1)); - } - - private static int HighestSetBit(short op1) - { - for (int i = 8 * sizeof(short) - 1; i >= 0; i--) - { - if (((ulong)op1 & (1UL << i)) != 0) - { - return i; - } - } - - return -1; - } - - public static ushort CountLeadingZeroBits(ushort op1) - { - return (ushort)(8 * sizeof(ushort) - (HighestSetBit(op1) + 1)); - } - - private static int HighestSetBit(ushort op1) - { - for (int i = 8 * sizeof(ushort) - 1; i >= 0; i--) - { - if (((ulong)op1 & (1UL << i)) != 0) - { - return i; - } - } - - return -1; - } - - public static int CountLeadingZeroBits(int op1) - { - return (int)(8 * sizeof(int) - (HighestSetBit(op1) + 1)); - } - - private static int HighestSetBit(int op1) - { - for (int i = 8 * sizeof(int) - 1; i >= 0; i--) - { - if (((ulong)op1 & (1UL << i)) != 0) - { - return i; - } - } - - return -1; - } - - public static uint CountLeadingZeroBits(uint op1) - { - return (uint)(8 * sizeof(uint) - (HighestSetBit(op1) + 1)); - } - - private static int HighestSetBit(uint op1) - { - for (int i = 8 * sizeof(uint) - 1; i >= 0; i--) - { - if (((ulong)op1 & (1UL << i)) != 0) - { - return i; - } - } - - return -1; - } - - public static sbyte BitCount(sbyte op1) - { - int result = 0; - - for (int i = 0; i < 8 * sizeof(sbyte); i++) - { - if (((ulong)op1 & (1UL << i)) != 0) - { - result = result + 1; - } - } - - return (sbyte)result; - } - - public static byte BitCount(byte op1) - { - int result = 0; - - for (int i = 0; i < 8 * sizeof(byte); i++) - { - if (((ulong)op1 & (1UL << i)) != 0) - { - result = result + 1; - } - } - - return (byte)result; - } - - public static byte ReverseElementBits(byte op1) - { - byte val = (byte)op1; - byte result = 0; - const int bitsize = sizeof(byte) * 8; - const byte cst_one = 1; - - for (int i = 0; i < bitsize; i++) - { - if ((val & (cst_one << i)) != 0) - { - result |= (byte)(cst_one << (bitsize - 1 - i)); - } - } - - return (byte)result; - } - - public static int ReverseElementBits(int op1) - { - uint val = (uint)op1; - uint result = 0; - const int bitsize = sizeof(uint) * 8; - const uint cst_one = 1; - - for (int i = 0; i < bitsize; i++) - { - if ((val & (cst_one << i)) != 0) - { - result |= (uint)(cst_one << (bitsize - 1 - i)); - } - } - - return (int)result; - } - - public static long ReverseElementBits(long op1) - { - ulong val = (ulong)op1; - ulong result = 0; - const int bitsize = sizeof(ulong) * 8; - const ulong cst_one = 1; - - for (int i = 0; i < bitsize; i++) - { - if ((val & (cst_one << i)) != 0) - { - result |= (ulong)(cst_one << (bitsize - 1 - i)); - } - } - - return (long)result; - } - - public static sbyte ReverseElementBits(sbyte op1) - { - byte val = (byte)op1; - byte result = 0; - const int bitsize = sizeof(byte) * 8; - const byte cst_one = 1; - - for (int i = 0; i < bitsize; i++) - { - if ((val & (cst_one << i)) != 0) - { - result |= (byte)(cst_one << (bitsize - 1 - i)); - } - } - - return (sbyte)result; - } - - public static uint ReverseElementBits(uint op1) - { - uint val = (uint)op1; - uint result = 0; - const int bitsize = sizeof(uint) * 8; - const uint cst_one = 1; - - for (int i = 0; i < bitsize; i++) - { - if ((val & (cst_one << i)) != 0) - { - result |= (uint)(cst_one << (bitsize - 1 - i)); - } - } - - return (uint)result; - } - - public static ulong ReverseElementBits(ulong op1) - { - ulong val = (ulong)op1; - ulong result = 0; - const int bitsize = sizeof(ulong) * 8; - const ulong cst_one = 1; - - for (int i = 0; i < bitsize; i++) - { - if ((val & (cst_one << i)) != 0) - { - result |= (ulong)(cst_one << (bitsize - 1 - i)); - } - } - - return (ulong)result; - } - - public static sbyte And(sbyte op1, sbyte op2) => (sbyte)(op1 & op2); - - public static sbyte BitwiseClear(sbyte op1, sbyte op2) => (sbyte)(op1 & ~op2); - - public static sbyte BitwiseSelect(sbyte op1, sbyte op2, sbyte op3) - { - ulong result = 0; - - for (int i = 0; i < 8 * sizeof(sbyte); i++) - { - if (((ulong)op1 & (1UL << i)) != 0) - { - result = result | ((ulong)op2 & (1UL << i)); - } - else - { - result = result | ((ulong)op3 & (1UL << i)); - } - } - - return (sbyte)result; - } - - public static sbyte Not(sbyte op1) => (sbyte)(~op1); - - public static sbyte Or(sbyte op1, sbyte op2) => (sbyte)(op1 | op2); - - public static sbyte OrNot(sbyte op1, sbyte op2) => (sbyte)(op1 | ~op2); - - public static sbyte Xor(sbyte op1, sbyte op2) => (sbyte)(op1 ^ op2); - - public static byte And(byte op1, byte op2) => (byte)(op1 & op2); - - public static byte BitwiseClear(byte op1, byte op2) => (byte)(op1 & ~op2); - - public static byte BitwiseSelect(byte op1, byte op2, byte op3) - { - ulong result = 0; - - for (int i = 0; i < 8 * sizeof(byte); i++) - { - if (((ulong)op1 & (1UL << i)) != 0) - { - result = result | ((ulong)op2 & (1UL << i)); - } - else - { - result = result | ((ulong)op3 & (1UL << i)); - } - } - - return (byte)result; - } - - public static byte Not(byte op1) => (byte)(~op1); - - public static byte Or(byte op1, byte op2) => (byte)(op1 | op2); - - public static byte OrNot(byte op1, byte op2) => (byte)(op1 | ~op2); - - public static byte Xor(byte op1, byte op2) => (byte)(op1 ^ op2); - - public static short And(short op1, short op2) => (short)(op1 & op2); - - public static short BitwiseClear(short op1, short op2) => (short)(op1 & ~op2); - - public static short BitwiseSelect(short op1, short op2, short op3) - { - ulong result = 0; - - for (int i = 0; i < 8 * sizeof(short); i++) - { - if (((ulong)op1 & (1UL << i)) != 0) - { - result = result | ((ulong)op2 & (1UL << i)); - } - else - { - result = result | ((ulong)op3 & (1UL << i)); - } - } - - return (short)result; - } - - public static short Not(short op1) => (short)(~op1); - - public static short Or(short op1, short op2) => (short)(op1 | op2); - - public static short OrNot(short op1, short op2) => (short)(op1 | ~op2); - - public static short Xor(short op1, short op2) => (short)(op1 ^ op2); - - public static ushort And(ushort op1, ushort op2) => (ushort)(op1 & op2); - - public static ushort BitwiseClear(ushort op1, ushort op2) => (ushort)(op1 & ~op2); - - public static ushort BitwiseSelect(ushort op1, ushort op2, ushort op3) - { - ulong result = 0; - - for (int i = 0; i < 8 * sizeof(ushort); i++) - { - if (((ulong)op1 & (1UL << i)) != 0) - { - result = result | ((ulong)op2 & (1UL << i)); - } - else - { - result = result | ((ulong)op3 & (1UL << i)); - } - } - - return (ushort)result; - } - - public static ushort Not(ushort op1) => (ushort)(~op1); - - public static ushort Or(ushort op1, ushort op2) => (ushort)(op1 | op2); - - public static ushort OrNot(ushort op1, ushort op2) => (ushort)(op1 | ~op2); - - public static ushort Xor(ushort op1, ushort op2) => (ushort)(op1 ^ op2); - - public static int And(int op1, int op2) => (int)(op1 & op2); - - public static int BitwiseClear(int op1, int op2) => (int)(op1 & ~op2); - - public static int BitwiseSelect(int op1, int op2, int op3) - { - ulong result = 0; - - for (int i = 0; i < 8 * sizeof(int); i++) - { - if (((ulong)op1 & (1UL << i)) != 0) - { - result = result | ((ulong)op2 & (1UL << i)); - } - else - { - result = result | ((ulong)op3 & (1UL << i)); - } - } - - return (int)result; - } - - public static int Not(int op1) => (int)(~op1); - - public static int Or(int op1, int op2) => (int)(op1 | op2); - - public static int OrNot(int op1, int op2) => (int)(op1 | ~op2); - - public static int Xor(int op1, int op2) => (int)(op1 ^ op2); - - public static uint And(uint op1, uint op2) => (uint)(op1 & op2); - - public static uint BitwiseClear(uint op1, uint op2) => (uint)(op1 & ~op2); - - public static uint BitwiseSelect(uint op1, uint op2, uint op3) - { - ulong result = 0; - - for (int i = 0; i < 8 * sizeof(uint); i++) - { - if (((ulong)op1 & (1UL << i)) != 0) - { - result = result | ((ulong)op2 & (1UL << i)); - } - else - { - result = result | ((ulong)op3 & (1UL << i)); - } - } - - return (uint)result; - } - - public static uint Not(uint op1) => (uint)(~op1); - - public static uint Or(uint op1, uint op2) => (uint)(op1 | op2); - - public static uint OrNot(uint op1, uint op2) => (uint)(op1 | ~op2); - - public static uint Xor(uint op1, uint op2) => (uint)(op1 ^ op2); - - public static long And(long op1, long op2) => (long)(op1 & op2); - - public static long BitwiseClear(long op1, long op2) => (long)(op1 & ~op2); - - public static long BitwiseSelect(long op1, long op2, long op3) - { - ulong result = 0; - - for (int i = 0; i < 8 * sizeof(long); i++) - { - if (((ulong)op1 & (1UL << i)) != 0) - { - result = result | ((ulong)op2 & (1UL << i)); - } - else - { - result = result | ((ulong)op3 & (1UL << i)); - } - } - - return (long)result; - } - - public static long Not(long op1) => (long)(~op1); - - public static long Or(long op1, long op2) => (long)(op1 | op2); - - public static long OrNot(long op1, long op2) => (long)(op1 | ~op2); - - public static long Xor(long op1, long op2) => (long)(op1 ^ op2); - - public static ulong And(ulong op1, ulong op2) => (ulong)(op1 & op2); - - public static ulong BitwiseClear(ulong op1, ulong op2) => (ulong)(op1 & ~op2); - - public static ulong BitwiseSelect(ulong op1, ulong op2, ulong op3) - { - ulong result = 0; - - for (int i = 0; i < 8 * sizeof(ulong); i++) - { - if (((ulong)op1 & (1UL << i)) != 0) - { - result = result | ((ulong)op2 & (1UL << i)); - } - else - { - result = result | ((ulong)op3 & (1UL << i)); - } - } - - return (ulong)result; - } - - public static ulong Not(ulong op1) => (ulong)(~op1); - - public static ulong Or(ulong op1, ulong op2) => (ulong)(op1 | op2); - - public static ulong OrNot(ulong op1, ulong op2) => (ulong)(op1 | ~op2); - - public static ulong Xor(ulong op1, ulong op2) => (ulong)(op1 ^ op2); - - public static float Not(float op1) => BitConverter.Int32BitsToSingle(~BitConverter.SingleToInt32Bits(op1)); - - public static double Not(double op1) => BitConverter.Int64BitsToDouble(~BitConverter.DoubleToInt64Bits(op1)); - - public static float And(float op1, float op2) => BitConverter.Int32BitsToSingle(And(BitConverter.SingleToInt32Bits(op1), BitConverter.SingleToInt32Bits(op2))); - - public static double And(double op1, double op2) => BitConverter.Int64BitsToDouble(And(BitConverter.DoubleToInt64Bits(op1), BitConverter.DoubleToInt64Bits(op2))); - - public static float BitwiseClear(float op1, float op2) => BitConverter.Int32BitsToSingle(BitwiseClear(BitConverter.SingleToInt32Bits(op1), BitConverter.SingleToInt32Bits(op2))); - - public static double BitwiseClear(double op1, double op2) => BitConverter.Int64BitsToDouble(BitwiseClear(BitConverter.DoubleToInt64Bits(op1), BitConverter.DoubleToInt64Bits(op2))); - - public static float Or(float op1, float op2) => BitConverter.Int32BitsToSingle(Or(BitConverter.SingleToInt32Bits(op1), BitConverter.SingleToInt32Bits(op2))); - - public static double Or(double op1, double op2) => BitConverter.Int64BitsToDouble(Or(BitConverter.DoubleToInt64Bits(op1), BitConverter.DoubleToInt64Bits(op2))); - - public static float OrNot(float op1, float op2) => BitConverter.Int32BitsToSingle(OrNot(BitConverter.SingleToInt32Bits(op1), BitConverter.SingleToInt32Bits(op2))); - - public static double OrNot(double op1, double op2) => BitConverter.Int64BitsToDouble(OrNot(BitConverter.DoubleToInt64Bits(op1), BitConverter.DoubleToInt64Bits(op2))); - - public static float Xor(float op1, float op2) => BitConverter.Int32BitsToSingle(Xor(BitConverter.SingleToInt32Bits(op1), BitConverter.SingleToInt32Bits(op2))); - - public static double Xor(double op1, double op2) => BitConverter.Int64BitsToDouble(Xor(BitConverter.DoubleToInt64Bits(op1), BitConverter.DoubleToInt64Bits(op2))); - - public static float BitwiseSelect(float op1, float op2, float op3) => BitConverter.Int32BitsToSingle(BitwiseSelect(BitConverter.SingleToInt32Bits(op1), BitConverter.SingleToInt32Bits(op2), BitConverter.SingleToInt32Bits(op3))); - public static double BitwiseSelect(double op1, double op2, double op3) => BitConverter.Int64BitsToDouble(BitwiseSelect(BitConverter.DoubleToInt64Bits(op1), BitConverter.DoubleToInt64Bits(op2), BitConverter.DoubleToInt64Bits(op3))); - - public static sbyte CompareEqual(sbyte left, sbyte right) - { - long result = 0; - - if (left == right) - { - result = -1; - } - - return (sbyte)result; - } - - public static sbyte CompareGreaterThan(sbyte left, sbyte right) - { - long result = 0; - - if (left > right) - { - result = -1; - } - - return (sbyte)result; - } - - public static sbyte CompareGreaterThanOrEqual(sbyte left, sbyte right) - { - long result = 0; - - if (left >= right) - { - result = -1; - } - - return (sbyte)result; - } - - public static sbyte CompareLessThan(sbyte left, sbyte right) - { - long result = 0; - - if (left < right) - { - result = -1; - } - - return (sbyte)result; - } - - public static sbyte CompareLessThanOrEqual(sbyte left, sbyte right) - { - long result = 0; - - if (left <= right) - { - result = -1; - } - - return (sbyte)result; - } - - public static sbyte CompareTest(sbyte left, sbyte right) - { - long result = 0; - - if ((left & right) != 0) - { - result = -1; - } - - return (sbyte)result; - } - - public static byte CompareEqual(byte left, byte right) - { - long result = 0; - - if (left == right) - { - result = -1; - } - - return (byte)result; - } - - public static byte CompareGreaterThan(byte left, byte right) - { - long result = 0; - - if (left > right) - { - result = -1; - } - - return (byte)result; - } - - public static byte CompareGreaterThanOrEqual(byte left, byte right) - { - long result = 0; - - if (left >= right) - { - result = -1; - } - - return (byte)result; - } - - public static byte CompareLessThan(byte left, byte right) - { - long result = 0; - - if (left < right) - { - result = -1; - } - - return (byte)result; - } - - public static byte CompareLessThanOrEqual(byte left, byte right) - { - long result = 0; - - if (left <= right) - { - result = -1; - } - - return (byte)result; - } - - public static byte CompareTest(byte left, byte right) - { - long result = 0; - - if ((left & right) != 0) - { - result = -1; - } - - return (byte)result; - } - - public static short CompareEqual(short left, short right) - { - long result = 0; - - if (left == right) - { - result = -1; - } - - return (short)result; - } - - public static short CompareGreaterThan(short left, short right) - { - long result = 0; - - if (left > right) - { - result = -1; - } - - return (short)result; - } - - public static short CompareGreaterThanOrEqual(short left, short right) - { - long result = 0; - - if (left >= right) - { - result = -1; - } - - return (short)result; - } - - public static short CompareLessThan(short left, short right) - { - long result = 0; - - if (left < right) - { - result = -1; - } - - return (short)result; - } - - public static short CompareLessThanOrEqual(short left, short right) - { - long result = 0; - - if (left <= right) - { - result = -1; - } - - return (short)result; - } - - public static short CompareTest(short left, short right) - { - long result = 0; - - if ((left & right) != 0) - { - result = -1; - } - - return (short)result; - } - - public static ushort CompareEqual(ushort left, ushort right) - { - long result = 0; - - if (left == right) - { - result = -1; - } - - return (ushort)result; - } - - public static ushort CompareGreaterThan(ushort left, ushort right) - { - long result = 0; - - if (left > right) - { - result = -1; - } - - return (ushort)result; - } - - public static ushort CompareGreaterThanOrEqual(ushort left, ushort right) - { - long result = 0; - - if (left >= right) - { - result = -1; - } - - return (ushort)result; - } - - public static ushort CompareLessThan(ushort left, ushort right) - { - long result = 0; - - if (left < right) - { - result = -1; - } - - return (ushort)result; - } - - public static ushort CompareLessThanOrEqual(ushort left, ushort right) - { - long result = 0; - - if (left <= right) - { - result = -1; - } - - return (ushort)result; - } - - public static ushort CompareTest(ushort left, ushort right) - { - long result = 0; - - if ((left & right) != 0) - { - result = -1; - } - - return (ushort)result; - } - - public static int CompareEqual(int left, int right) - { - long result = 0; - - if (left == right) - { - result = -1; - } - - return (int)result; - } - - public static int CompareGreaterThan(int left, int right) - { - long result = 0; - - if (left > right) - { - result = -1; - } - - return (int)result; - } - - public static int CompareGreaterThanOrEqual(int left, int right) - { - long result = 0; - - if (left >= right) - { - result = -1; - } - - return (int)result; - } - - public static int CompareLessThan(int left, int right) - { - long result = 0; - - if (left < right) - { - result = -1; - } - - return (int)result; - } - - public static int CompareLessThanOrEqual(int left, int right) - { - long result = 0; - - if (left <= right) - { - result = -1; - } - - return (int)result; - } - - public static int CompareTest(int left, int right) - { - long result = 0; - - if ((left & right) != 0) - { - result = -1; - } - - return (int)result; - } - - public static uint CompareEqual(uint left, uint right) - { - long result = 0; - - if (left == right) - { - result = -1; - } - - return (uint)result; - } - - public static uint CompareGreaterThan(uint left, uint right) - { - long result = 0; - - if (left > right) - { - result = -1; - } - - return (uint)result; - } - - public static uint CompareGreaterThanOrEqual(uint left, uint right) - { - long result = 0; - - if (left >= right) - { - result = -1; - } - - return (uint)result; - } - - public static uint CompareLessThan(uint left, uint right) - { - long result = 0; - - if (left < right) - { - result = -1; - } - - return (uint)result; - } - - public static uint CompareLessThanOrEqual(uint left, uint right) - { - long result = 0; - - if (left <= right) - { - result = -1; - } - - return (uint)result; - } - - public static uint CompareTest(uint left, uint right) - { - long result = 0; - - if ((left & right) != 0) - { - result = -1; - } - - return (uint)result; - } - - public static long CompareEqual(long left, long right) - { - long result = 0; - - if (left == right) - { - result = -1; - } - - return (long)result; - } - - public static long CompareGreaterThan(long left, long right) - { - long result = 0; - - if (left > right) - { - result = -1; - } - - return (long)result; - } - - public static long CompareGreaterThanOrEqual(long left, long right) - { - long result = 0; - - if (left >= right) - { - result = -1; - } - - return (long)result; - } - - public static long CompareLessThan(long left, long right) - { - long result = 0; - - if (left < right) - { - result = -1; - } - - return (long)result; - } - - public static long CompareLessThanOrEqual(long left, long right) - { - long result = 0; - - if (left <= right) - { - result = -1; - } - - return (long)result; - } - - public static long CompareTest(long left, long right) - { - long result = 0; - - if ((left & right) != 0) - { - result = -1; - } - - return (long)result; - } - - public static ulong CompareEqual(ulong left, ulong right) - { - long result = 0; - - if (left == right) - { - result = -1; - } - - return (ulong)result; - } - - public static ulong CompareGreaterThan(ulong left, ulong right) - { - long result = 0; - - if (left > right) - { - result = -1; - } - - return (ulong)result; - } - - public static ulong CompareGreaterThanOrEqual(ulong left, ulong right) - { - long result = 0; - - if (left >= right) - { - result = -1; - } - - return (ulong)result; - } - - public static ulong CompareLessThan(ulong left, ulong right) - { - long result = 0; - - if (left < right) - { - result = -1; - } - - return (ulong)result; - } - - public static ulong CompareLessThanOrEqual(ulong left, ulong right) - { - long result = 0; - - if (left <= right) - { - result = -1; - } - - return (ulong)result; - } - - public static ulong CompareTest(ulong left, ulong right) - { - long result = 0; - - if ((left & right) != 0) - { - result = -1; - } - - return (ulong)result; - } - - public static double AbsoluteCompareGreaterThan(double left, double right) - { - long result = 0; - - left = Math.Abs(left); - right = Math.Abs(right); - - if (left > right) - { - result = -1; - } - - return BitConverter.Int64BitsToDouble(result); - } - - public static float AbsoluteCompareGreaterThan(float left, float right) - { - int result = 0; - - left = Math.Abs(left); - right = Math.Abs(right); - - if (left > right) - { - result = -1; - } - - return BitConverter.Int32BitsToSingle(result); - } - - public static double AbsoluteCompareGreaterThanOrEqual(double left, double right) - { - long result = 0; - - left = Math.Abs(left); - right = Math.Abs(right); - - if (left >= right) - { - result = -1; - } - - return BitConverter.Int64BitsToDouble(result); - } - - public static float AbsoluteCompareGreaterThanOrEqual(float left, float right) - { - int result = 0; - - left = Math.Abs(left); - right = Math.Abs(right); - - if (left >= right) - { - result = -1; - } - - return BitConverter.Int32BitsToSingle(result); - } - - public static double AbsoluteCompareLessThan(double left, double right) - { - long result = 0; - - left = Math.Abs(left); - right = Math.Abs(right); - - if (left < right) - { - result = -1; - } - - return BitConverter.Int64BitsToDouble(result); - } - - public static float AbsoluteCompareLessThan(float left, float right) - { - int result = 0; - - left = Math.Abs(left); - right = Math.Abs(right); - - if (left < right) - { - result = -1; - } - - return BitConverter.Int32BitsToSingle(result); - } - - public static double AbsoluteCompareLessThanOrEqual(double left, double right) - { - long result = 0; - - left = Math.Abs(left); - right = Math.Abs(right); - - if (left <= right) - { - result = -1; - } - - return BitConverter.Int64BitsToDouble(result); - } - - public static float AbsoluteCompareLessThanOrEqual(float left, float right) - { - int result = 0; - - left = Math.Abs(left); - right = Math.Abs(right); - - if (left <= right) - { - result = -1; - } - - return BitConverter.Int32BitsToSingle(result); - } - - public static double CompareEqual(double left, double right) - { - long result = 0; - - if (left == right) - { - result = -1; - } - - return BitConverter.Int64BitsToDouble(result); - } - - public static float CompareEqual(float left, float right) - { - int result = 0; - - if (left == right) - { - result = -1; - } - - return BitConverter.Int32BitsToSingle(result); - } - - public static double CompareGreaterThan(double left, double right) - { - long result = 0; - - if (left > right) - { - result = -1; - } - - return BitConverter.Int64BitsToDouble(result); - } - - public static float CompareGreaterThan(float left, float right) - { - int result = 0; - - if (left > right) - { - result = -1; - } - - return BitConverter.Int32BitsToSingle(result); - } - - public static double CompareGreaterThanOrEqual(double left, double right) - { - long result = 0; - - if (left >= right) - { - result = -1; - } - - return BitConverter.Int64BitsToDouble(result); - } - - public static float CompareGreaterThanOrEqual(float left, float right) - { - int result = 0; - - if (left >= right) - { - result = -1; - } - - return BitConverter.Int32BitsToSingle(result); - } - - public static double CompareLessThan(double left, double right) - { - long result = 0; - - if (left < right) - { - result = -1; - } - - return BitConverter.Int64BitsToDouble(result); - } - - public static float CompareLessThan(float left, float right) - { - int result = 0; - - if (left < right) - { - result = -1; - } - - return BitConverter.Int32BitsToSingle(result); - } - - public static double CompareLessThanOrEqual(double left, double right) - { - long result = 0; - - if (left <= right) - { - result = -1; - } - - return BitConverter.Int64BitsToDouble(result); - } - - public static float CompareLessThanOrEqual(float left, float right) - { - int result = 0; - - if (left <= right) - { - result = -1; - } - - return BitConverter.Int32BitsToSingle(result); - } - - public static double CompareTest(double left, double right) - { - long result = 0; - - if ((BitConverter.DoubleToInt64Bits(left) & BitConverter.DoubleToInt64Bits(right)) != 0) - { - result = -1; - } - - return BitConverter.Int64BitsToDouble(result); - } - - public static float CompareTest(float left, float right) - { - int result = 0; - - if ((BitConverter.SingleToInt32Bits(left) & BitConverter.SingleToInt32Bits(right)) != 0) - { - result = -1; - } - - return BitConverter.Int32BitsToSingle(result); - } - - public static byte Abs(sbyte value) => value < 0 ? (byte)-value : (byte)value; - - public static ushort Abs(short value) => value < 0 ? (ushort)-value : (ushort)value; - - public static uint Abs(int value) => value < 0 ? (uint)-value : (uint)value; - - public static ulong Abs(long value) => value < 0 ? (ulong)-value : (ulong)value; - - public static float Abs(float value) => Math.Abs(value); - - public static double Abs(double value) => Math.Abs(value); - - public static float Divide(float op1, float op2) => op1 / op2; - - public static double Divide(double op1, double op2) => op1 / op2; - - public static float Sqrt(float value) => MathF.Sqrt(value); - - public static double Sqrt(double value) => Math.Sqrt(value); - - public static byte AbsoluteDifference(sbyte op1, sbyte op2) => op1 < op2 ? (byte)(op2 - op1) : (byte)(op1 - op2); - - public static sbyte AbsoluteDifferenceAdd(sbyte op1, sbyte op2, sbyte op3) => (sbyte)(op1 + AbsoluteDifference(op2, op3)); - - public static ushort AbsoluteDifference(short op1, short op2) => op1 < op2 ? (ushort)(op2 - op1) : (ushort)(op1 - op2); - - public static short AbsoluteDifferenceAdd(short op1, short op2, short op3) => (short)(op1 + AbsoluteDifference(op2, op3)); - - public static uint AbsoluteDifference(int op1, int op2) => op1 < op2 ? (uint)(op2 - op1) : (uint)(op1 - op2); - - public static int AbsoluteDifferenceAdd(int op1, int op2, int op3) => (int)(op1 + AbsoluteDifference(op2, op3)); - - public static byte AbsoluteDifference(byte op1, byte op2) => op1 < op2 ? (byte)(op2 - op1) : (byte)(op1 - op2); - - public static byte AbsoluteDifferenceAdd(byte op1, byte op2, byte op3) => (byte)(op1 + AbsoluteDifference(op2, op3)); - - public static ushort AbsoluteDifference(ushort op1, ushort op2) => op1 < op2 ? (ushort)(op2 - op1) : (ushort)(op1 - op2); - - public static ushort AbsoluteDifferenceAdd(ushort op1, ushort op2, ushort op3) => (ushort)(op1 + AbsoluteDifference(op2, op3)); - - public static uint AbsoluteDifference(uint op1, uint op2) => op1 < op2 ? (uint)(op2 - op1) : (uint)(op1 - op2); - - public static uint AbsoluteDifferenceAdd(uint op1, uint op2, uint op3) => (uint)(op1 + AbsoluteDifference(op2, op3)); - - public static ushort AbsoluteDifferenceWidening(sbyte op1, sbyte op2) => op1 < op2 ? (ushort)(op2 - op1) : (ushort)(op1 - op2); - - public static ushort AbsoluteDifferenceWideningUpper(sbyte[] op1, sbyte[] op2, int i) => AbsoluteDifferenceWidening(op1[i + op1.Length / 2], op2[i + op2.Length / 2]); - - public static short AbsoluteDifferenceWideningAndAdd(short op1, sbyte op2, sbyte op3) => (short)(op1 + (short)AbsoluteDifferenceWidening(op2, op3)); - - public static short AbsoluteDifferenceWideningUpperAndAdd(short[] op1, sbyte[] op2, sbyte[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[i + op2.Length / 2], op3[i + op3.Length / 2]); - - public static short AddPairwiseWidening(sbyte[] op1, int i) => AddWidening(op1[2 * i], op1[2 * i + 1]); - - public static short AddPairwiseWideningAndAdd(short[] op1, sbyte[] op2, int i) => (short)(op1[i] + AddWidening(op2[2 * i], op2[2 * i + 1])); - - private static sbyte HighNarrowing(short op1, bool round) - { - ushort roundConst = 0; - if (round) - { - roundConst = (ushort)1 << (8 * sizeof(sbyte) - 1); - } - return (sbyte)(((ushort)op1 + roundConst) >> (8 * sizeof(sbyte))); - } - - public static sbyte AddHighNarrowing(short op1, short op2) => HighNarrowing((short)(op1 + op2), round: false); - - public static sbyte AddHighNarrowingUpper(sbyte[] op1, short[] op2, short[] op3, int i) => i < op1.Length ? op1[i] : AddHighNarrowing(op2[i - op1.Length], op3[i - op1.Length]); - - public static sbyte AddRoundedHighNarrowing(short op1, short op2) => HighNarrowing((short)(op1 + op2), round: true); - - public static short AddRoundedHighNarrowingUpper(sbyte[] op1, short[] op2, short[] op3, int i) => i < op1.Length ? op1[i] : AddRoundedHighNarrowing(op2[i - op1.Length], op3[i - op1.Length]); - - public static short AddWidening(sbyte op1, sbyte op2) => (short)((short)op1 + (short)op2); - - public static short AddWidening(short op1, sbyte op2) => (short)(op1 + op2); - - public static short AddWideningUpper(sbyte[] op1, sbyte[] op2, int i) => AddWidening(op1[i + op1.Length / 2], op2[i + op2.Length / 2]); - - public static short AddWideningUpper(short[] op1, sbyte[] op2, int i) => AddWidening(op1[i], op2[i + op2.Length / 2]); - - public static sbyte ExtractNarrowing(short op1) => (sbyte)op1; - - public static sbyte ExtractNarrowingUpper(sbyte[] op1, short[] op2, int i) => i < op1.Length ? op1[i] : ExtractNarrowing(op2[i - op1.Length]); - - public static sbyte FusedAddHalving(sbyte op1, sbyte op2) => (sbyte)((ushort)((short)op1 + (short)op2) >> 1); - - public static sbyte FusedAddRoundedHalving(sbyte op1, sbyte op2) => (sbyte)((ushort)((short)op1 + (short)op2 + 1) >> 1); - - public static sbyte FusedSubtractHalving(sbyte op1, sbyte op2) => (sbyte)((ushort)((short)op1 - (short)op2) >> 1); - - public static short MultiplyByScalarWideningUpper(sbyte[] op1, sbyte op2, int i) => MultiplyWidening(op1[i + op1.Length / 2], op2); - - public static short MultiplyByScalarWideningUpperAndAdd(short[] op1, sbyte[] op2, sbyte op3, int i) => MultiplyWideningAndAdd(op1[i], op2[i + op2.Length / 2], op3); - - public static short MultiplyByScalarWideningUpperAndSubtract(short[] op1, sbyte[] op2, sbyte op3, int i) => MultiplyWideningAndSubtract(op1[i], op2[i + op2.Length / 2], op3); - - public static short MultiplyWidening(sbyte op1, sbyte op2) => (short)((short)op1 * (short)op2); - - public static short MultiplyWideningAndAdd(short op1, sbyte op2, sbyte op3) => (short)(op1 + MultiplyWidening(op2, op3)); - - public static short MultiplyWideningAndSubtract(short op1, sbyte op2, sbyte op3) => (short)(op1 - MultiplyWidening(op2, op3)); - - public static short MultiplyWideningUpper(sbyte[] op1, sbyte[] op2, int i) => MultiplyWidening(op1[i + op1.Length / 2], op2[i + op2.Length / 2]); - - public static short MultiplyWideningUpperAndAdd(short[] op1, sbyte[] op2, sbyte[] op3, int i) => MultiplyWideningAndAdd(op1[i], op2[i + op2.Length / 2], op3[i + op3.Length / 2]); - - public static short MultiplyWideningUpperAndSubtract(short[] op1, sbyte[] op2, sbyte[] op3, int i) => MultiplyWideningAndSubtract(op1[i], op2[i + op2.Length / 2], op3[i + op3.Length / 2]); - - public static sbyte SubtractHighNarrowing(short op1, short op2) => HighNarrowing((short)(op1 - op2), round: false); - - public static short SubtractHighNarrowingUpper(sbyte[] op1, short[] op2, short[] op3, int i) => i < op1.Length ? op1[i] : SubtractHighNarrowing(op2[i - op1.Length], op3[i - op1.Length]); - - public static sbyte SubtractRoundedHighNarrowing(short op1, short op2) => HighNarrowing((short)(op1 - op2), round: true); - - public static short SubtractRoundedHighNarrowingUpper(sbyte[] op1, short[] op2, short[] op3, int i) => i < op1.Length ? op1[i] : SubtractRoundedHighNarrowing(op2[i - op1.Length], op3[i - op1.Length]); - - public static short SubtractWidening(sbyte op1, sbyte op2) => (short)((short)op1 - (short)op2); - - public static short SubtractWidening(short op1, sbyte op2) => (short)(op1 - op2); - - public static short SubtractWideningUpper(sbyte[] op1, sbyte[] op2, int i) => SubtractWidening(op1[i + op1.Length / 2], op2[i + op2.Length / 2]); - - public static short SubtractWideningUpper(short[] op1, sbyte[] op2, int i) => SubtractWidening(op1[i], op2[i + op2.Length / 2]); - - public static short ZeroExtendWidening(sbyte op1) => (short)(ushort)op1; - - public static short ZeroExtendWideningUpper(sbyte[] op1, int i) => ZeroExtendWidening(op1[i + op1.Length / 2]); - - public static uint AbsoluteDifferenceWidening(short op1, short op2) => op1 < op2 ? (uint)(op2 - op1) : (uint)(op1 - op2); - - public static uint AbsoluteDifferenceWideningUpper(short[] op1, short[] op2, int i) => AbsoluteDifferenceWidening(op1[i + op1.Length / 2], op2[i + op2.Length / 2]); - - public static int AbsoluteDifferenceWideningAndAdd(int op1, short op2, short op3) => (int)(op1 + (int)AbsoluteDifferenceWidening(op2, op3)); - - public static int AbsoluteDifferenceWideningUpperAndAdd(int[] op1, short[] op2, short[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[i + op2.Length / 2], op3[i + op3.Length / 2]); - - public static int AddPairwiseWidening(short[] op1, int i) => AddWidening(op1[2 * i], op1[2 * i + 1]); - - public static int AddPairwiseWideningAndAdd(int[] op1, short[] op2, int i) => (int)(op1[i] + AddWidening(op2[2 * i], op2[2 * i + 1])); - - private static short HighNarrowing(int op1, bool round) - { - uint roundConst = 0; - if (round) - { - roundConst = (uint)1 << (8 * sizeof(short) - 1); - } - return (short)(((uint)op1 + roundConst) >> (8 * sizeof(short))); - } - - public static short AddHighNarrowing(int op1, int op2) => HighNarrowing((int)(op1 + op2), round: false); - - public static short AddHighNarrowingUpper(short[] op1, int[] op2, int[] op3, int i) => i < op1.Length ? op1[i] : AddHighNarrowing(op2[i - op1.Length], op3[i - op1.Length]); - - public static short AddRoundedHighNarrowing(int op1, int op2) => HighNarrowing((int)(op1 + op2), round: true); - - public static int AddRoundedHighNarrowingUpper(short[] op1, int[] op2, int[] op3, int i) => i < op1.Length ? op1[i] : AddRoundedHighNarrowing(op2[i - op1.Length], op3[i - op1.Length]); - - public static int AddWidening(short op1, short op2) => (int)((int)op1 + (int)op2); - - public static int AddWidening(int op1, short op2) => (int)(op1 + op2); - - public static int AddWideningUpper(short[] op1, short[] op2, int i) => AddWidening(op1[i + op1.Length / 2], op2[i + op2.Length / 2]); - - public static int AddWideningUpper(int[] op1, short[] op2, int i) => AddWidening(op1[i], op2[i + op2.Length / 2]); - - public static short ExtractNarrowing(int op1) => (short)op1; - - public static short ExtractNarrowingUpper(short[] op1, int[] op2, int i) => i < op1.Length ? op1[i] : ExtractNarrowing(op2[i - op1.Length]); - - public static short FusedAddHalving(short op1, short op2) => (short)((uint)((int)op1 + (int)op2) >> 1); - - public static short FusedAddRoundedHalving(short op1, short op2) => (short)((uint)((int)op1 + (int)op2 + 1) >> 1); - - public static short FusedSubtractHalving(short op1, short op2) => (short)((uint)((int)op1 - (int)op2) >> 1); - - public static int MultiplyByScalarWideningUpper(short[] op1, short op2, int i) => MultiplyWidening(op1[i + op1.Length / 2], op2); - - public static int MultiplyByScalarWideningUpperAndAdd(int[] op1, short[] op2, short op3, int i) => MultiplyWideningAndAdd(op1[i], op2[i + op2.Length / 2], op3); - - public static int MultiplyByScalarWideningUpperAndSubtract(int[] op1, short[] op2, short op3, int i) => MultiplyWideningAndSubtract(op1[i], op2[i + op2.Length / 2], op3); - - public static int MultiplyWidening(short op1, short op2) => (int)((int)op1 * (int)op2); - - public static int MultiplyWideningAndAdd(int op1, short op2, short op3) => (int)(op1 + MultiplyWidening(op2, op3)); - - public static int MultiplyWideningAndSubtract(int op1, short op2, short op3) => (int)(op1 - MultiplyWidening(op2, op3)); - - public static int MultiplyWideningUpper(short[] op1, short[] op2, int i) => MultiplyWidening(op1[i + op1.Length / 2], op2[i + op2.Length / 2]); - - public static int MultiplyWideningUpperAndAdd(int[] op1, short[] op2, short[] op3, int i) => MultiplyWideningAndAdd(op1[i], op2[i + op2.Length / 2], op3[i + op3.Length / 2]); - - public static int MultiplyWideningUpperAndSubtract(int[] op1, short[] op2, short[] op3, int i) => MultiplyWideningAndSubtract(op1[i], op2[i + op2.Length / 2], op3[i + op3.Length / 2]); - - public static short SubtractHighNarrowing(int op1, int op2) => HighNarrowing((int)(op1 - op2), round: false); - - public static int SubtractHighNarrowingUpper(short[] op1, int[] op2, int[] op3, int i) => i < op1.Length ? op1[i] : SubtractHighNarrowing(op2[i - op1.Length], op3[i - op1.Length]); - - public static short SubtractRoundedHighNarrowing(int op1, int op2) => HighNarrowing((int)(op1 - op2), round: true); - - public static int SubtractRoundedHighNarrowingUpper(short[] op1, int[] op2, int[] op3, int i) => i < op1.Length ? op1[i] : SubtractRoundedHighNarrowing(op2[i - op1.Length], op3[i - op1.Length]); - - public static int SubtractWidening(short op1, short op2) => (int)((int)op1 - (int)op2); - - public static int SubtractWidening(int op1, short op2) => (int)(op1 - op2); - - public static int SubtractWideningUpper(short[] op1, short[] op2, int i) => SubtractWidening(op1[i + op1.Length / 2], op2[i + op2.Length / 2]); - - public static int SubtractWideningUpper(int[] op1, short[] op2, int i) => SubtractWidening(op1[i], op2[i + op2.Length / 2]); - - public static int ZeroExtendWidening(short op1) => (int)(uint)op1; - - public static int ZeroExtendWideningUpper(short[] op1, int i) => ZeroExtendWidening(op1[i + op1.Length / 2]); - - public static ulong AbsoluteDifferenceWidening(int op1, int op2) => op1 < op2 ? (ulong)(op2 - op1) : (ulong)(op1 - op2); - - public static ulong AbsoluteDifferenceWideningUpper(int[] op1, int[] op2, int i) => AbsoluteDifferenceWidening(op1[i + op1.Length / 2], op2[i + op2.Length / 2]); - - public static long AbsoluteDifferenceWideningAndAdd(long op1, int op2, int op3) => (long)(op1 + (long)AbsoluteDifferenceWidening(op2, op3)); - - public static long AbsoluteDifferenceWideningUpperAndAdd(long[] op1, int[] op2, int[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[i + op2.Length / 2], op3[i + op3.Length / 2]); - - public static long AddPairwiseWidening(int[] op1, int i) => AddWidening(op1[2 * i], op1[2 * i + 1]); - - public static long AddPairwiseWideningAndAdd(long[] op1, int[] op2, int i) => (long)(op1[i] + AddWidening(op2[2 * i], op2[2 * i + 1])); - - private static int HighNarrowing(long op1, bool round) - { - ulong roundConst = 0; - if (round) - { - roundConst = (ulong)1 << (8 * sizeof(int) - 1); - } - return (int)(((ulong)op1 + roundConst) >> (8 * sizeof(int))); - } - - public static int AddHighNarrowing(long op1, long op2) => HighNarrowing((long)(op1 + op2), round: false); - - public static int AddHighNarrowingUpper(int[] op1, long[] op2, long[] op3, int i) => i < op1.Length ? op1[i] : AddHighNarrowing(op2[i - op1.Length], op3[i - op1.Length]); - - public static int AddRoundedHighNarrowing(long op1, long op2) => HighNarrowing((long)(op1 + op2), round: true); - - public static long AddRoundedHighNarrowingUpper(int[] op1, long[] op2, long[] op3, int i) => i < op1.Length ? op1[i] : AddRoundedHighNarrowing(op2[i - op1.Length], op3[i - op1.Length]); - - public static long AddWidening(int op1, int op2) => (long)((long)op1 + (long)op2); - - public static long AddWidening(long op1, int op2) => (long)(op1 + op2); - - public static long AddWideningUpper(int[] op1, int[] op2, int i) => AddWidening(op1[i + op1.Length / 2], op2[i + op2.Length / 2]); - - public static long AddWideningUpper(long[] op1, int[] op2, int i) => AddWidening(op1[i], op2[i + op2.Length / 2]); - - public static int ExtractNarrowing(long op1) => (int)op1; - - public static int ExtractNarrowingUpper(int[] op1, long[] op2, int i) => i < op1.Length ? op1[i] : ExtractNarrowing(op2[i - op1.Length]); - - public static int FusedAddHalving(int op1, int op2) => (int)((ulong)((long)op1 + (long)op2) >> 1); - - public static int FusedAddRoundedHalving(int op1, int op2) => (int)((ulong)((long)op1 + (long)op2 + 1) >> 1); - - public static int FusedSubtractHalving(int op1, int op2) => (int)((ulong)((long)op1 - (long)op2) >> 1); - - public static long MultiplyByScalarWideningUpper(int[] op1, int op2, int i) => MultiplyWidening(op1[i + op1.Length / 2], op2); - - public static long MultiplyByScalarWideningUpperAndAdd(long[] op1, int[] op2, int op3, int i) => MultiplyWideningAndAdd(op1[i], op2[i + op2.Length / 2], op3); - - public static long MultiplyByScalarWideningUpperAndSubtract(long[] op1, int[] op2, int op3, int i) => MultiplyWideningAndSubtract(op1[i], op2[i + op2.Length / 2], op3); - - public static long MultiplyWidening(int op1, int op2) => (long)((long)op1 * (long)op2); - - public static long MultiplyWideningAndAdd(long op1, int op2, int op3) => (long)(op1 + MultiplyWidening(op2, op3)); - - public static long MultiplyWideningAndSubtract(long op1, int op2, int op3) => (long)(op1 - MultiplyWidening(op2, op3)); - - public static long MultiplyWideningUpper(int[] op1, int[] op2, int i) => MultiplyWidening(op1[i + op1.Length / 2], op2[i + op2.Length / 2]); - - public static long MultiplyWideningUpperAndAdd(long[] op1, int[] op2, int[] op3, int i) => MultiplyWideningAndAdd(op1[i], op2[i + op2.Length / 2], op3[i + op3.Length / 2]); - - public static long MultiplyWideningUpperAndSubtract(long[] op1, int[] op2, int[] op3, int i) => MultiplyWideningAndSubtract(op1[i], op2[i + op2.Length / 2], op3[i + op3.Length / 2]); - - public static int SubtractHighNarrowing(long op1, long op2) => HighNarrowing((long)(op1 - op2), round: false); - - public static long SubtractHighNarrowingUpper(int[] op1, long[] op2, long[] op3, int i) => i < op1.Length ? op1[i] : SubtractHighNarrowing(op2[i - op1.Length], op3[i - op1.Length]); - - public static int SubtractRoundedHighNarrowing(long op1, long op2) => HighNarrowing((long)(op1 - op2), round: true); - - public static long SubtractRoundedHighNarrowingUpper(int[] op1, long[] op2, long[] op3, int i) => i < op1.Length ? op1[i] : SubtractRoundedHighNarrowing(op2[i - op1.Length], op3[i - op1.Length]); - - public static long SubtractWidening(int op1, int op2) => (long)((long)op1 - (long)op2); - - public static long SubtractWidening(long op1, int op2) => (long)(op1 - op2); - - public static long SubtractWideningUpper(int[] op1, int[] op2, int i) => SubtractWidening(op1[i + op1.Length / 2], op2[i + op2.Length / 2]); - - public static long SubtractWideningUpper(long[] op1, int[] op2, int i) => SubtractWidening(op1[i], op2[i + op2.Length / 2]); - - public static long ZeroExtendWidening(int op1) => (long)(ulong)op1; - - public static long ZeroExtendWideningUpper(int[] op1, int i) => ZeroExtendWidening(op1[i + op1.Length / 2]); - - public static ushort AbsoluteDifferenceWidening(byte op1, byte op2) => op1 < op2 ? (ushort)(op2 - op1) : (ushort)(op1 - op2); - - public static ushort AbsoluteDifferenceWideningUpper(byte[] op1, byte[] op2, int i) => AbsoluteDifferenceWidening(op1[i + op1.Length / 2], op2[i + op2.Length / 2]); - - public static ushort AbsoluteDifferenceWideningAndAdd(ushort op1, byte op2, byte op3) => (ushort)(op1 + (ushort)AbsoluteDifferenceWidening(op2, op3)); - - public static ushort AbsoluteDifferenceWideningUpperAndAdd(ushort[] op1, byte[] op2, byte[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[i + op2.Length / 2], op3[i + op3.Length / 2]); - - public static ushort AddPairwiseWidening(byte[] op1, int i) => AddWidening(op1[2 * i], op1[2 * i + 1]); - - public static ushort AddPairwiseWideningAndAdd(ushort[] op1, byte[] op2, int i) => (ushort)(op1[i] + AddWidening(op2[2 * i], op2[2 * i + 1])); - - private static byte HighNarrowing(ushort op1, bool round) - { - ushort roundConst = 0; - if (round) - { - roundConst = (ushort)1 << (8 * sizeof(byte) - 1); - } - return (byte)(((ushort)op1 + roundConst) >> (8 * sizeof(byte))); - } - - public static byte AddHighNarrowing(ushort op1, ushort op2) => HighNarrowing((ushort)(op1 + op2), round: false); - - public static byte AddHighNarrowingUpper(byte[] op1, ushort[] op2, ushort[] op3, int i) => i < op1.Length ? op1[i] : AddHighNarrowing(op2[i - op1.Length], op3[i - op1.Length]); - - public static byte AddRoundedHighNarrowing(ushort op1, ushort op2) => HighNarrowing((ushort)(op1 + op2), round: true); - - public static ushort AddRoundedHighNarrowingUpper(byte[] op1, ushort[] op2, ushort[] op3, int i) => i < op1.Length ? op1[i] : AddRoundedHighNarrowing(op2[i - op1.Length], op3[i - op1.Length]); - - public static ushort AddWidening(byte op1, byte op2) => (ushort)((ushort)op1 + (ushort)op2); - - public static ushort AddWidening(ushort op1, byte op2) => (ushort)(op1 + op2); - - public static ushort AddWideningUpper(byte[] op1, byte[] op2, int i) => AddWidening(op1[i + op1.Length / 2], op2[i + op2.Length / 2]); - - public static ushort AddWideningUpper(ushort[] op1, byte[] op2, int i) => AddWidening(op1[i], op2[i + op2.Length / 2]); - - public static byte ExtractNarrowing(ushort op1) => (byte)op1; - - public static byte ExtractNarrowingUpper(byte[] op1, ushort[] op2, int i) => i < op1.Length ? op1[i] : ExtractNarrowing(op2[i - op1.Length]); - - public static byte FusedAddHalving(byte op1, byte op2) => (byte)((ushort)((ushort)op1 + (ushort)op2) >> 1); - - public static byte FusedAddRoundedHalving(byte op1, byte op2) => (byte)((ushort)((ushort)op1 + (ushort)op2 + 1) >> 1); - - public static byte FusedSubtractHalving(byte op1, byte op2) => (byte)((ushort)((ushort)op1 - (ushort)op2) >> 1); - - public static ushort MultiplyByScalarWideningUpper(byte[] op1, byte op2, int i) => MultiplyWidening(op1[i + op1.Length / 2], op2); - - public static ushort MultiplyByScalarWideningUpperAndAdd(ushort[] op1, byte[] op2, byte op3, int i) => MultiplyWideningAndAdd(op1[i], op2[i + op2.Length / 2], op3); - - public static ushort MultiplyByScalarWideningUpperAndSubtract(ushort[] op1, byte[] op2, byte op3, int i) => MultiplyWideningAndSubtract(op1[i], op2[i + op2.Length / 2], op3); - - public static ushort MultiplyWidening(byte op1, byte op2) => (ushort)((ushort)op1 * (ushort)op2); - - public static ushort MultiplyWideningAndAdd(ushort op1, byte op2, byte op3) => (ushort)(op1 + MultiplyWidening(op2, op3)); - - public static ushort MultiplyWideningAndSubtract(ushort op1, byte op2, byte op3) => (ushort)(op1 - MultiplyWidening(op2, op3)); - - public static ushort MultiplyWideningUpper(byte[] op1, byte[] op2, int i) => MultiplyWidening(op1[i + op1.Length / 2], op2[i + op2.Length / 2]); - - public static ushort MultiplyWideningUpperAndAdd(ushort[] op1, byte[] op2, byte[] op3, int i) => MultiplyWideningAndAdd(op1[i], op2[i + op2.Length / 2], op3[i + op3.Length / 2]); - - public static ushort MultiplyWideningUpperAndSubtract(ushort[] op1, byte[] op2, byte[] op3, int i) => MultiplyWideningAndSubtract(op1[i], op2[i + op2.Length / 2], op3[i + op3.Length / 2]); - - public static byte SubtractHighNarrowing(ushort op1, ushort op2) => HighNarrowing((ushort)(op1 - op2), round: false); - - public static ushort SubtractHighNarrowingUpper(byte[] op1, ushort[] op2, ushort[] op3, int i) => i < op1.Length ? op1[i] : SubtractHighNarrowing(op2[i - op1.Length], op3[i - op1.Length]); - - public static byte SubtractRoundedHighNarrowing(ushort op1, ushort op2) => HighNarrowing((ushort)(op1 - op2), round: true); - - public static ushort SubtractRoundedHighNarrowingUpper(byte[] op1, ushort[] op2, ushort[] op3, int i) => i < op1.Length ? op1[i] : SubtractRoundedHighNarrowing(op2[i - op1.Length], op3[i - op1.Length]); - - public static ushort SubtractWidening(byte op1, byte op2) => (ushort)((ushort)op1 - (ushort)op2); - - public static ushort SubtractWidening(ushort op1, byte op2) => (ushort)(op1 - op2); - - public static ushort SubtractWideningUpper(byte[] op1, byte[] op2, int i) => SubtractWidening(op1[i + op1.Length / 2], op2[i + op2.Length / 2]); - - public static ushort SubtractWideningUpper(ushort[] op1, byte[] op2, int i) => SubtractWidening(op1[i], op2[i + op2.Length / 2]); - - public static ushort ZeroExtendWidening(byte op1) => (ushort)(ushort)op1; - - public static ushort ZeroExtendWideningUpper(byte[] op1, int i) => ZeroExtendWidening(op1[i + op1.Length / 2]); - - public static uint AbsoluteDifferenceWidening(ushort op1, ushort op2) => op1 < op2 ? (uint)(op2 - op1) : (uint)(op1 - op2); - - public static uint AbsoluteDifferenceWideningUpper(ushort[] op1, ushort[] op2, int i) => AbsoluteDifferenceWidening(op1[i + op1.Length / 2], op2[i + op2.Length / 2]); - - public static uint AbsoluteDifferenceWideningAndAdd(uint op1, ushort op2, ushort op3) => (uint)(op1 + (uint)AbsoluteDifferenceWidening(op2, op3)); - - public static uint AbsoluteDifferenceWideningUpperAndAdd(uint[] op1, ushort[] op2, ushort[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[i + op2.Length / 2], op3[i + op3.Length / 2]); - - public static uint AddPairwiseWidening(ushort[] op1, int i) => AddWidening(op1[2 * i], op1[2 * i + 1]); - - public static uint AddPairwiseWideningAndAdd(uint[] op1, ushort[] op2, int i) => (uint)(op1[i] + AddWidening(op2[2 * i], op2[2 * i + 1])); - - private static ushort HighNarrowing(uint op1, bool round) - { - uint roundConst = 0; - if (round) - { - roundConst = (uint)1 << (8 * sizeof(ushort) - 1); - } - return (ushort)(((uint)op1 + roundConst) >> (8 * sizeof(ushort))); - } - - public static ushort AddHighNarrowing(uint op1, uint op2) => HighNarrowing((uint)(op1 + op2), round: false); - - public static ushort AddHighNarrowingUpper(ushort[] op1, uint[] op2, uint[] op3, int i) => i < op1.Length ? op1[i] : AddHighNarrowing(op2[i - op1.Length], op3[i - op1.Length]); - - public static ushort AddRoundedHighNarrowing(uint op1, uint op2) => HighNarrowing((uint)(op1 + op2), round: true); - - public static uint AddRoundedHighNarrowingUpper(ushort[] op1, uint[] op2, uint[] op3, int i) => i < op1.Length ? op1[i] : AddRoundedHighNarrowing(op2[i - op1.Length], op3[i - op1.Length]); - - public static uint AddWidening(ushort op1, ushort op2) => (uint)((uint)op1 + (uint)op2); - - public static uint AddWidening(uint op1, ushort op2) => (uint)(op1 + op2); - - public static uint AddWideningUpper(ushort[] op1, ushort[] op2, int i) => AddWidening(op1[i + op1.Length / 2], op2[i + op2.Length / 2]); - - public static uint AddWideningUpper(uint[] op1, ushort[] op2, int i) => AddWidening(op1[i], op2[i + op2.Length / 2]); - - public static ushort ExtractNarrowing(uint op1) => (ushort)op1; - - public static ushort ExtractNarrowingUpper(ushort[] op1, uint[] op2, int i) => i < op1.Length ? op1[i] : ExtractNarrowing(op2[i - op1.Length]); - - public static ushort FusedAddHalving(ushort op1, ushort op2) => (ushort)((uint)((uint)op1 + (uint)op2) >> 1); - - public static ushort FusedAddRoundedHalving(ushort op1, ushort op2) => (ushort)((uint)((uint)op1 + (uint)op2 + 1) >> 1); - - public static ushort FusedSubtractHalving(ushort op1, ushort op2) => (ushort)((uint)((uint)op1 - (uint)op2) >> 1); - - public static uint MultiplyByScalarWideningUpper(ushort[] op1, ushort op2, int i) => MultiplyWidening(op1[i + op1.Length / 2], op2); - - public static uint MultiplyByScalarWideningUpperAndAdd(uint[] op1, ushort[] op2, ushort op3, int i) => MultiplyWideningAndAdd(op1[i], op2[i + op2.Length / 2], op3); - - public static uint MultiplyByScalarWideningUpperAndSubtract(uint[] op1, ushort[] op2, ushort op3, int i) => MultiplyWideningAndSubtract(op1[i], op2[i + op2.Length / 2], op3); - - public static uint MultiplyWidening(ushort op1, ushort op2) => (uint)((uint)op1 * (uint)op2); - - public static uint MultiplyWideningAndAdd(uint op1, ushort op2, ushort op3) => (uint)(op1 + MultiplyWidening(op2, op3)); - - public static uint MultiplyWideningAndSubtract(uint op1, ushort op2, ushort op3) => (uint)(op1 - MultiplyWidening(op2, op3)); - - public static uint MultiplyWideningUpper(ushort[] op1, ushort[] op2, int i) => MultiplyWidening(op1[i + op1.Length / 2], op2[i + op2.Length / 2]); - - public static uint MultiplyWideningUpperAndAdd(uint[] op1, ushort[] op2, ushort[] op3, int i) => MultiplyWideningAndAdd(op1[i], op2[i + op2.Length / 2], op3[i + op3.Length / 2]); - - public static uint MultiplyWideningUpperAndSubtract(uint[] op1, ushort[] op2, ushort[] op3, int i) => MultiplyWideningAndSubtract(op1[i], op2[i + op2.Length / 2], op3[i + op3.Length / 2]); - - public static ushort SubtractHighNarrowing(uint op1, uint op2) => HighNarrowing((uint)(op1 - op2), round: false); - - public static uint SubtractHighNarrowingUpper(ushort[] op1, uint[] op2, uint[] op3, int i) => i < op1.Length ? op1[i] : SubtractHighNarrowing(op2[i - op1.Length], op3[i - op1.Length]); - - public static ushort SubtractRoundedHighNarrowing(uint op1, uint op2) => HighNarrowing((uint)(op1 - op2), round: true); - - public static uint SubtractRoundedHighNarrowingUpper(ushort[] op1, uint[] op2, uint[] op3, int i) => i < op1.Length ? op1[i] : SubtractRoundedHighNarrowing(op2[i - op1.Length], op3[i - op1.Length]); - - public static uint SubtractWidening(ushort op1, ushort op2) => (uint)((uint)op1 - (uint)op2); - - public static uint SubtractWidening(uint op1, ushort op2) => (uint)(op1 - op2); - - public static uint SubtractWideningUpper(ushort[] op1, ushort[] op2, int i) => SubtractWidening(op1[i + op1.Length / 2], op2[i + op2.Length / 2]); - - public static uint SubtractWideningUpper(uint[] op1, ushort[] op2, int i) => SubtractWidening(op1[i], op2[i + op2.Length / 2]); - - public static uint ZeroExtendWidening(ushort op1) => (uint)(uint)op1; - - public static uint ZeroExtendWideningUpper(ushort[] op1, int i) => ZeroExtendWidening(op1[i + op1.Length / 2]); - - public static ulong AbsoluteDifferenceWidening(uint op1, uint op2) => op1 < op2 ? (ulong)(op2 - op1) : (ulong)(op1 - op2); - - public static ulong AbsoluteDifferenceWideningUpper(uint[] op1, uint[] op2, int i) => AbsoluteDifferenceWidening(op1[i + op1.Length / 2], op2[i + op2.Length / 2]); - - public static ulong AbsoluteDifferenceWideningAndAdd(ulong op1, uint op2, uint op3) => (ulong)(op1 + (ulong)AbsoluteDifferenceWidening(op2, op3)); - - public static ulong AbsoluteDifferenceWideningUpperAndAdd(ulong[] op1, uint[] op2, uint[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[i + op2.Length / 2], op3[i + op3.Length / 2]); - - public static ulong AddPairwiseWidening(uint[] op1, int i) => AddWidening(op1[2 * i], op1[2 * i + 1]); - - public static ulong AddPairwiseWideningAndAdd(ulong[] op1, uint[] op2, int i) => (ulong)(op1[i] + AddWidening(op2[2 * i], op2[2 * i + 1])); - - private static uint HighNarrowing(ulong op1, bool round) - { - ulong roundConst = 0; - if (round) - { - roundConst = (ulong)1 << (8 * sizeof(uint) - 1); - } - return (uint)(((ulong)op1 + roundConst) >> (8 * sizeof(uint))); - } - - public static uint AddHighNarrowing(ulong op1, ulong op2) => HighNarrowing((ulong)(op1 + op2), round: false); - - public static uint AddHighNarrowingUpper(uint[] op1, ulong[] op2, ulong[] op3, int i) => i < op1.Length ? op1[i] : AddHighNarrowing(op2[i - op1.Length], op3[i - op1.Length]); - - public static uint AddRoundedHighNarrowing(ulong op1, ulong op2) => HighNarrowing((ulong)(op1 + op2), round: true); - - public static ulong AddRoundedHighNarrowingUpper(uint[] op1, ulong[] op2, ulong[] op3, int i) => i < op1.Length ? op1[i] : AddRoundedHighNarrowing(op2[i - op1.Length], op3[i - op1.Length]); - - public static ulong AddWidening(uint op1, uint op2) => (ulong)((ulong)op1 + (ulong)op2); - - public static ulong AddWidening(ulong op1, uint op2) => (ulong)(op1 + op2); - - public static ulong AddWideningUpper(uint[] op1, uint[] op2, int i) => AddWidening(op1[i + op1.Length / 2], op2[i + op2.Length / 2]); - - public static ulong AddWideningUpper(ulong[] op1, uint[] op2, int i) => AddWidening(op1[i], op2[i + op2.Length / 2]); - - public static uint ExtractNarrowing(ulong op1) => (uint)op1; - - public static uint ExtractNarrowingUpper(uint[] op1, ulong[] op2, int i) => i < op1.Length ? op1[i] : ExtractNarrowing(op2[i - op1.Length]); - - public static uint FusedAddHalving(uint op1, uint op2) => (uint)((ulong)((ulong)op1 + (ulong)op2) >> 1); - - public static uint FusedAddRoundedHalving(uint op1, uint op2) => (uint)((ulong)((ulong)op1 + (ulong)op2 + 1) >> 1); - - public static uint FusedSubtractHalving(uint op1, uint op2) => (uint)((ulong)((ulong)op1 - (ulong)op2) >> 1); - - public static ulong MultiplyByScalarWideningUpper(uint[] op1, uint op2, int i) => MultiplyWidening(op1[i + op1.Length / 2], op2); - - public static ulong MultiplyByScalarWideningUpperAndAdd(ulong[] op1, uint[] op2, uint op3, int i) => MultiplyWideningAndAdd(op1[i], op2[i + op2.Length / 2], op3); - - public static ulong MultiplyByScalarWideningUpperAndSubtract(ulong[] op1, uint[] op2, uint op3, int i) => MultiplyWideningAndSubtract(op1[i], op2[i + op2.Length / 2], op3); - - public static ulong MultiplyWidening(uint op1, uint op2) => (ulong)((ulong)op1 * (ulong)op2); - - public static ulong MultiplyWideningAndAdd(ulong op1, uint op2, uint op3) => (ulong)(op1 + MultiplyWidening(op2, op3)); - - public static ulong MultiplyWideningAndSubtract(ulong op1, uint op2, uint op3) => (ulong)(op1 - MultiplyWidening(op2, op3)); - - public static ulong MultiplyWideningUpper(uint[] op1, uint[] op2, int i) => MultiplyWidening(op1[i + op1.Length / 2], op2[i + op2.Length / 2]); - - public static ulong MultiplyWideningUpperAndAdd(ulong[] op1, uint[] op2, uint[] op3, int i) => MultiplyWideningAndAdd(op1[i], op2[i + op2.Length / 2], op3[i + op3.Length / 2]); - - public static ulong MultiplyWideningUpperAndSubtract(ulong[] op1, uint[] op2, uint[] op3, int i) => MultiplyWideningAndSubtract(op1[i], op2[i + op2.Length / 2], op3[i + op3.Length / 2]); - - public static uint SubtractHighNarrowing(ulong op1, ulong op2) => HighNarrowing((ulong)(op1 - op2), round: false); - - public static ulong SubtractHighNarrowingUpper(uint[] op1, ulong[] op2, ulong[] op3, int i) => i < op1.Length ? op1[i] : SubtractHighNarrowing(op2[i - op1.Length], op3[i - op1.Length]); - - public static uint SubtractRoundedHighNarrowing(ulong op1, ulong op2) => HighNarrowing((ulong)(op1 - op2), round: true); - - public static ulong SubtractRoundedHighNarrowingUpper(uint[] op1, ulong[] op2, ulong[] op3, int i) => i < op1.Length ? op1[i] : SubtractRoundedHighNarrowing(op2[i - op1.Length], op3[i - op1.Length]); - - public static ulong SubtractWidening(uint op1, uint op2) => (ulong)((ulong)op1 - (ulong)op2); - - public static ulong SubtractWidening(ulong op1, uint op2) => (ulong)(op1 - op2); - - public static ulong SubtractWideningUpper(uint[] op1, uint[] op2, int i) => SubtractWidening(op1[i + op1.Length / 2], op2[i + op2.Length / 2]); - - public static ulong SubtractWideningUpper(ulong[] op1, uint[] op2, int i) => SubtractWidening(op1[i], op2[i + op2.Length / 2]); - - public static ulong ZeroExtendWidening(uint op1) => (ulong)(ulong)op1; - - public static ulong ZeroExtendWideningUpper(uint[] op1, int i) => ZeroExtendWidening(op1[i + op1.Length / 2]); - - private static bool SignedSatQ(short val, out sbyte result) - { - bool saturated = false; - - if (val > sbyte.MaxValue) - { - result = sbyte.MaxValue; - saturated = true; - } - else if (val < sbyte.MinValue) - { - result = sbyte.MinValue; - saturated = true; - } - else - { - result = (sbyte)val; - } - - return saturated; - } - - private static bool SignedSatQ(short val, out byte result) - { - bool saturated = false; - - if (val > byte.MaxValue) - { - result = byte.MaxValue; - saturated = true; - } - else if (val < 0) - { - result = 0; - saturated = true; - } - else - { - result = (byte)val; - } - - return saturated; - } - - private static bool UnsignedSatQ(short val, out sbyte result) - { - byte res; - - bool saturated = UnsignedSatQ((ushort)val, out res); - - result = (sbyte)res; - return saturated; - } - - private static bool UnsignedSatQ(ushort val, out byte result) - { - bool saturated = false; - - if (val > byte.MaxValue) - { - result = byte.MaxValue; - saturated = true; - } - else if (val < 0) - { - result = 0; - saturated = true; - } - else - { - result = (byte)val; - } - - return saturated; - } - - public static short ShiftLeftLogicalWidening(sbyte op1, byte op2) => UnsignedShift((short)op1, (short)op2); - - public static ushort ShiftLeftLogicalWidening(byte op1, byte op2) => UnsignedShift((ushort)op1, (short)op2); - - public static short ShiftLeftLogicalWideningUpper(sbyte[] op1, byte op2, int i) => ShiftLeftLogicalWidening(op1[i + op1.Length / 2], op2); - - public static ushort ShiftLeftLogicalWideningUpper(byte[] op1, byte op2, int i) => ShiftLeftLogicalWidening(op1[i + op1.Length / 2], op2); - - public static sbyte ShiftRightArithmeticRoundedNarrowingSaturate(short op1, byte op2) - { - sbyte result; - - SignedSatQ(SignedShift(op1, (short)(-op2), rounding: true), out result); - - return result; - } - - public static byte ShiftRightArithmeticRoundedNarrowingSaturateUnsigned(short op1, byte op2) - { - byte result; - - SignedSatQ(SignedShift(op1, (short)(-op2), rounding: true), out result); - - return result; - } - - public static byte ShiftRightArithmeticRoundedNarrowingSaturateUnsignedUpper(byte[] op1, short[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (byte)ShiftRightArithmeticRoundedNarrowingSaturateUnsigned(op2[i - op1.Length], op3); - - public static sbyte ShiftRightArithmeticRoundedNarrowingSaturateUpper(sbyte[] op1, short[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (sbyte)ShiftRightArithmeticRoundedNarrowingSaturate(op2[i - op1.Length], op3); - - public static sbyte ShiftRightArithmeticNarrowingSaturate(short op1, byte op2) - { - sbyte result; - - SignedSatQ(SignedShift(op1, (short)(-op2)), out result); - - return result; - } - - public static byte ShiftRightArithmeticNarrowingSaturateUnsigned(short op1, byte op2) - { - byte result; - - SignedSatQ(SignedShift(op1, (short)(-op2)), out result); - - return result; - } - - public static byte ShiftRightArithmeticNarrowingSaturateUnsignedUpper(byte[] op1, short[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (byte)ShiftRightArithmeticNarrowingSaturateUnsigned(op2[i - op1.Length], op3); - - public static sbyte ShiftRightArithmeticNarrowingSaturateUpper(sbyte[] op1, short[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (sbyte)ShiftRightArithmeticNarrowingSaturate(op2[i - op1.Length], op3); - - public static sbyte ShiftRightLogicalNarrowing(short op1, byte op2) => (sbyte)UnsignedShift(op1, (short)(-op2)); - - public static byte ShiftRightLogicalNarrowing(ushort op1, byte op2) => (byte)UnsignedShift(op1, (short)(-op2)); - - public static sbyte ShiftRightLogicalRoundedNarrowing(short op1, byte op2) => (sbyte)UnsignedShift(op1, (short)(-op2), rounding: true); - - public static byte ShiftRightLogicalRoundedNarrowing(ushort op1, byte op2) => (byte)UnsignedShift(op1, (short)(-op2), rounding: true); - - public static sbyte ShiftRightLogicalRoundedNarrowingUpper(sbyte[] op1, short[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (sbyte)ShiftRightLogicalRoundedNarrowing(op2[i - op1.Length], op3); - - public static byte ShiftRightLogicalRoundedNarrowingUpper(byte[] op1, ushort[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (byte)ShiftRightLogicalRoundedNarrowing(op2[i - op1.Length], op3); - - public static sbyte ShiftRightLogicalRoundedNarrowingSaturate(short op1, byte op2) - { - sbyte result; - - UnsignedSatQ(UnsignedShift(op1, (short)(-op2), rounding: true), out result); - - return result; - } - - public static byte ShiftRightLogicalRoundedNarrowingSaturate(ushort op1, byte op2) - { - byte result; - - UnsignedSatQ(UnsignedShift(op1, (short)(-op2), rounding: true), out result); - - return result; - } - - public static sbyte ShiftRightLogicalRoundedNarrowingSaturateUpper(sbyte[] op1, short[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (sbyte)ShiftRightLogicalRoundedNarrowingSaturate(op2[i - op1.Length], op3); - - public static byte ShiftRightLogicalRoundedNarrowingSaturateUpper(byte[] op1, ushort[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (byte)ShiftRightLogicalRoundedNarrowingSaturate(op2[i - op1.Length], op3); - - public static sbyte ShiftRightLogicalNarrowingUpper(sbyte[] op1, short[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (sbyte)ShiftRightLogicalNarrowing(op2[i - op1.Length], op3); - - public static byte ShiftRightLogicalNarrowingUpper(byte[] op1, ushort[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (byte)ShiftRightLogicalNarrowing(op2[i - op1.Length], op3); - - public static sbyte ShiftRightLogicalNarrowingSaturate(short op1, byte op2) - { - sbyte result; - - UnsignedSatQ(UnsignedShift(op1, (short)(-op2)), out result); - - return result; - } - - public static byte ShiftRightLogicalNarrowingSaturate(ushort op1, byte op2) - { - byte result; - - UnsignedSatQ(UnsignedShift(op1, (short)(-op2)), out result); - - return result; - } - - public static sbyte ShiftRightLogicalNarrowingSaturateUpper(sbyte[] op1, short[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (sbyte)ShiftRightLogicalNarrowingSaturate(op2[i - op1.Length], op3); - - public static byte ShiftRightLogicalNarrowingSaturateUpper(byte[] op1, ushort[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (byte)ShiftRightLogicalNarrowingSaturate(op2[i - op1.Length], op3); - - public static short SignExtendWidening(sbyte op1) => op1; - - public static short SignExtendWideningUpper(sbyte[] op1, int i) => SignExtendWidening(op1[i + op1.Length / 2]); - - private static bool SignedSatQ(int val, out short result) - { - bool saturated = false; - - if (val > short.MaxValue) - { - result = short.MaxValue; - saturated = true; - } - else if (val < short.MinValue) - { - result = short.MinValue; - saturated = true; - } - else - { - result = (short)val; - } - - return saturated; - } - - private static bool SignedSatQ(int val, out ushort result) - { - bool saturated = false; - - if (val > ushort.MaxValue) - { - result = ushort.MaxValue; - saturated = true; - } - else if (val < 0) - { - result = 0; - saturated = true; - } - else - { - result = (ushort)val; - } - - return saturated; - } - - private static bool UnsignedSatQ(int val, out short result) - { - ushort res; - - bool saturated = UnsignedSatQ((uint)val, out res); - - result = (short)res; - return saturated; - } - - private static bool UnsignedSatQ(uint val, out ushort result) - { - bool saturated = false; - - if (val > ushort.MaxValue) - { - result = ushort.MaxValue; - saturated = true; - } - else if (val < 0) - { - result = 0; - saturated = true; - } - else - { - result = (ushort)val; - } - - return saturated; - } - - public static int ShiftLeftLogicalWidening(short op1, byte op2) => UnsignedShift((int)op1, (int)op2); - - public static uint ShiftLeftLogicalWidening(ushort op1, byte op2) => UnsignedShift((uint)op1, (int)op2); - - public static int ShiftLeftLogicalWideningUpper(short[] op1, byte op2, int i) => ShiftLeftLogicalWidening(op1[i + op1.Length / 2], op2); - - public static uint ShiftLeftLogicalWideningUpper(ushort[] op1, byte op2, int i) => ShiftLeftLogicalWidening(op1[i + op1.Length / 2], op2); - - public static short ShiftRightArithmeticRoundedNarrowingSaturate(int op1, byte op2) - { - short result; - - SignedSatQ(SignedShift(op1, (int)(-op2), rounding: true), out result); - - return result; - } - - public static ushort ShiftRightArithmeticRoundedNarrowingSaturateUnsigned(int op1, byte op2) - { - ushort result; - - SignedSatQ(SignedShift(op1, (int)(-op2), rounding: true), out result); - - return result; - } - - public static ushort ShiftRightArithmeticRoundedNarrowingSaturateUnsignedUpper(ushort[] op1, int[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (ushort)ShiftRightArithmeticRoundedNarrowingSaturateUnsigned(op2[i - op1.Length], op3); - - public static short ShiftRightArithmeticRoundedNarrowingSaturateUpper(short[] op1, int[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (short)ShiftRightArithmeticRoundedNarrowingSaturate(op2[i - op1.Length], op3); - - public static short ShiftRightArithmeticNarrowingSaturate(int op1, byte op2) - { - short result; - - SignedSatQ(SignedShift(op1, (int)(-op2)), out result); - - return result; - } - - public static ushort ShiftRightArithmeticNarrowingSaturateUnsigned(int op1, byte op2) - { - ushort result; - - SignedSatQ(SignedShift(op1, (int)(-op2)), out result); - - return result; - } - - public static ushort ShiftRightArithmeticNarrowingSaturateUnsignedUpper(ushort[] op1, int[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (ushort)ShiftRightArithmeticNarrowingSaturateUnsigned(op2[i - op1.Length], op3); - - public static short ShiftRightArithmeticNarrowingSaturateUpper(short[] op1, int[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (short)ShiftRightArithmeticNarrowingSaturate(op2[i - op1.Length], op3); - - public static short ShiftRightLogicalNarrowing(int op1, byte op2) => (short)UnsignedShift(op1, (int)(-op2)); - - public static ushort ShiftRightLogicalNarrowing(uint op1, byte op2) => (ushort)UnsignedShift(op1, (int)(-op2)); - - public static short ShiftRightLogicalRoundedNarrowing(int op1, byte op2) => (short)UnsignedShift(op1, (int)(-op2), rounding: true); - - public static ushort ShiftRightLogicalRoundedNarrowing(uint op1, byte op2) => (ushort)UnsignedShift(op1, (int)(-op2), rounding: true); - - public static short ShiftRightLogicalRoundedNarrowingUpper(short[] op1, int[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (short)ShiftRightLogicalRoundedNarrowing(op2[i - op1.Length], op3); - - public static ushort ShiftRightLogicalRoundedNarrowingUpper(ushort[] op1, uint[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (ushort)ShiftRightLogicalRoundedNarrowing(op2[i - op1.Length], op3); - - public static short ShiftRightLogicalRoundedNarrowingSaturate(int op1, byte op2) - { - short result; - - UnsignedSatQ(UnsignedShift(op1, (int)(-op2), rounding: true), out result); - - return result; - } - - public static ushort ShiftRightLogicalRoundedNarrowingSaturate(uint op1, byte op2) - { - ushort result; - - UnsignedSatQ(UnsignedShift(op1, (int)(-op2), rounding: true), out result); - - return result; - } - - public static short ShiftRightLogicalRoundedNarrowingSaturateUpper(short[] op1, int[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (short)ShiftRightLogicalRoundedNarrowingSaturate(op2[i - op1.Length], op3); - - public static ushort ShiftRightLogicalRoundedNarrowingSaturateUpper(ushort[] op1, uint[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (ushort)ShiftRightLogicalRoundedNarrowingSaturate(op2[i - op1.Length], op3); - - public static short ShiftRightLogicalNarrowingUpper(short[] op1, int[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (short)ShiftRightLogicalNarrowing(op2[i - op1.Length], op3); - - public static ushort ShiftRightLogicalNarrowingUpper(ushort[] op1, uint[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (ushort)ShiftRightLogicalNarrowing(op2[i - op1.Length], op3); - - public static short ShiftRightLogicalNarrowingSaturate(int op1, byte op2) - { - short result; - - UnsignedSatQ(UnsignedShift(op1, (int)(-op2)), out result); - - return result; - } - - public static ushort ShiftRightLogicalNarrowingSaturate(uint op1, byte op2) - { - ushort result; - - UnsignedSatQ(UnsignedShift(op1, (int)(-op2)), out result); - - return result; - } - - public static short ShiftRightLogicalNarrowingSaturateUpper(short[] op1, int[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (short)ShiftRightLogicalNarrowingSaturate(op2[i - op1.Length], op3); - - public static ushort ShiftRightLogicalNarrowingSaturateUpper(ushort[] op1, uint[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (ushort)ShiftRightLogicalNarrowingSaturate(op2[i - op1.Length], op3); - - public static int SignExtendWidening(short op1) => op1; - - public static int SignExtendWideningUpper(short[] op1, int i) => SignExtendWidening(op1[i + op1.Length / 2]); - - private static bool SignedSatQ(long val, out int result) - { - bool saturated = false; - - if (val > int.MaxValue) - { - result = int.MaxValue; - saturated = true; - } - else if (val < int.MinValue) - { - result = int.MinValue; - saturated = true; - } - else - { - result = (int)val; - } - - return saturated; - } - - private static bool SignedSatQ(long val, out uint result) - { - bool saturated = false; - - if (val > uint.MaxValue) - { - result = uint.MaxValue; - saturated = true; - } - else if (val < 0) - { - result = 0; - saturated = true; - } - else - { - result = (uint)val; - } - - return saturated; - } - - private static bool UnsignedSatQ(long val, out int result) - { - uint res; - - bool saturated = UnsignedSatQ((ulong)val, out res); - - result = (int)res; - return saturated; - } - - private static bool UnsignedSatQ(ulong val, out uint result) - { - bool saturated = false; - - if (val > uint.MaxValue) - { - result = uint.MaxValue; - saturated = true; - } - else if (val < 0) - { - result = 0; - saturated = true; - } - else - { - result = (uint)val; - } - - return saturated; - } - - public static long ShiftLeftLogicalWidening(int op1, byte op2) => UnsignedShift((long)op1, (long)op2); - - public static ulong ShiftLeftLogicalWidening(uint op1, byte op2) => UnsignedShift((ulong)op1, (long)op2); - - public static long ShiftLeftLogicalWideningUpper(int[] op1, byte op2, int i) => ShiftLeftLogicalWidening(op1[i + op1.Length / 2], op2); - - public static ulong ShiftLeftLogicalWideningUpper(uint[] op1, byte op2, int i) => ShiftLeftLogicalWidening(op1[i + op1.Length / 2], op2); - - public static int ShiftRightArithmeticRoundedNarrowingSaturate(long op1, byte op2) - { - int result; - - SignedSatQ(SignedShift(op1, (long)(-op2), rounding: true), out result); - - return result; - } - - public static uint ShiftRightArithmeticRoundedNarrowingSaturateUnsigned(long op1, byte op2) - { - uint result; - - SignedSatQ(SignedShift(op1, (long)(-op2), rounding: true), out result); - - return result; - } - - public static uint ShiftRightArithmeticRoundedNarrowingSaturateUnsignedUpper(uint[] op1, long[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (uint)ShiftRightArithmeticRoundedNarrowingSaturateUnsigned(op2[i - op1.Length], op3); - - public static int ShiftRightArithmeticRoundedNarrowingSaturateUpper(int[] op1, long[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (int)ShiftRightArithmeticRoundedNarrowingSaturate(op2[i - op1.Length], op3); - - public static int ShiftRightArithmeticNarrowingSaturate(long op1, byte op2) - { - int result; - - SignedSatQ(SignedShift(op1, (long)(-op2)), out result); - - return result; - } - - public static uint ShiftRightArithmeticNarrowingSaturateUnsigned(long op1, byte op2) - { - uint result; - - SignedSatQ(SignedShift(op1, (long)(-op2)), out result); - - return result; - } - - public static uint ShiftRightArithmeticNarrowingSaturateUnsignedUpper(uint[] op1, long[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (uint)ShiftRightArithmeticNarrowingSaturateUnsigned(op2[i - op1.Length], op3); - - public static int ShiftRightArithmeticNarrowingSaturateUpper(int[] op1, long[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (int)ShiftRightArithmeticNarrowingSaturate(op2[i - op1.Length], op3); - - public static int ShiftRightLogicalNarrowing(long op1, byte op2) => (int)UnsignedShift(op1, (long)(-op2)); - - public static uint ShiftRightLogicalNarrowing(ulong op1, byte op2) => (uint)UnsignedShift(op1, (long)(-op2)); - - public static int ShiftRightLogicalRoundedNarrowing(long op1, byte op2) => (int)UnsignedShift(op1, (long)(-op2), rounding: true); - - public static uint ShiftRightLogicalRoundedNarrowing(ulong op1, byte op2) => (uint)UnsignedShift(op1, (long)(-op2), rounding: true); - - public static int ShiftRightLogicalRoundedNarrowingUpper(int[] op1, long[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (int)ShiftRightLogicalRoundedNarrowing(op2[i - op1.Length], op3); - - public static uint ShiftRightLogicalRoundedNarrowingUpper(uint[] op1, ulong[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (uint)ShiftRightLogicalRoundedNarrowing(op2[i - op1.Length], op3); - - public static int ShiftRightLogicalRoundedNarrowingSaturate(long op1, byte op2) - { - int result; - - UnsignedSatQ(UnsignedShift(op1, (long)(-op2), rounding: true), out result); - - return result; - } - - public static uint ShiftRightLogicalRoundedNarrowingSaturate(ulong op1, byte op2) - { - uint result; - - UnsignedSatQ(UnsignedShift(op1, (long)(-op2), rounding: true), out result); - - return result; - } - - public static int ShiftRightLogicalRoundedNarrowingSaturateUpper(int[] op1, long[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (int)ShiftRightLogicalRoundedNarrowingSaturate(op2[i - op1.Length], op3); - - public static uint ShiftRightLogicalRoundedNarrowingSaturateUpper(uint[] op1, ulong[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (uint)ShiftRightLogicalRoundedNarrowingSaturate(op2[i - op1.Length], op3); - - public static int ShiftRightLogicalNarrowingUpper(int[] op1, long[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (int)ShiftRightLogicalNarrowing(op2[i - op1.Length], op3); - - public static uint ShiftRightLogicalNarrowingUpper(uint[] op1, ulong[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (uint)ShiftRightLogicalNarrowing(op2[i - op1.Length], op3); - - public static int ShiftRightLogicalNarrowingSaturate(long op1, byte op2) - { - int result; - - UnsignedSatQ(UnsignedShift(op1, (long)(-op2)), out result); - - return result; - } - - public static uint ShiftRightLogicalNarrowingSaturate(ulong op1, byte op2) - { - uint result; - - UnsignedSatQ(UnsignedShift(op1, (long)(-op2)), out result); - - return result; - } - - public static int ShiftRightLogicalNarrowingSaturateUpper(int[] op1, long[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (int)ShiftRightLogicalNarrowingSaturate(op2[i - op1.Length], op3); - - public static uint ShiftRightLogicalNarrowingSaturateUpper(uint[] op1, ulong[] op2, byte op3, int i) => i < op1.Length ? op1[i] : (uint)ShiftRightLogicalNarrowingSaturate(op2[i - op1.Length], op3); - - public static long SignExtendWidening(int op1) => op1; - - public static long SignExtendWideningUpper(int[] op1, int i) => SignExtendWidening(op1[i + op1.Length / 2]); - - public static sbyte ShiftArithmetic(sbyte op1, sbyte op2) => SignedShift(op1, op2); - - public static sbyte ShiftArithmeticRounded(sbyte op1, sbyte op2) => SignedShift(op1, op2, rounding: true); - - public static sbyte ShiftArithmeticSaturate(sbyte op1, sbyte op2) => SignedShift(op1, op2, saturating: true); - - public static sbyte ShiftArithmeticRoundedSaturate(sbyte op1, sbyte op2) => SignedShift(op1, op2, rounding: true, saturating: true); - - private static sbyte SignedShift(sbyte op1, sbyte op2, bool rounding = false, bool saturating = false) - { - int shift = (sbyte)(op2 & 0xFF); - - sbyte rndCns = 0; - - if (rounding) - { - bool ovf; - - (rndCns, ovf) = ShiftOvf((sbyte)1, -shift-1); - - if (ovf) - { - return 0; - } - } - - sbyte result; - - bool addOvf; - - (result, addOvf) = AddOvf(op1, rndCns); - - if (addOvf) - { - result = (sbyte)ShiftOvf((byte)result, shift).val; - } - else - { - bool shiftOvf; - - (result, shiftOvf) = ShiftOvf(result, shift); - - if (saturating) - { - if (shiftOvf) - { - result = sbyte.MaxValue; - } - } - } - - return result; - } - - public static sbyte ShiftLeftLogical(sbyte op1, byte op2) => UnsignedShift(op1, (sbyte)op2); - - public static byte ShiftLeftLogical(byte op1, byte op2) => UnsignedShift(op1, (sbyte)op2); - - public static sbyte ShiftLeftLogicalSaturate(sbyte op1, byte op2) => SignedShift(op1, (sbyte)op2, saturating: true); - - public static byte ShiftLeftLogicalSaturate(byte op1, byte op2) => UnsignedShift(op1, (sbyte)op2, saturating: true); - - public static byte ShiftLeftLogicalSaturateUnsigned(sbyte op1, byte op2) => (byte)UnsignedShift(op1, (sbyte)op2, saturating: true); - - public static sbyte ShiftLogical(sbyte op1, sbyte op2) => UnsignedShift(op1, op2); - - public static byte ShiftLogical(byte op1, sbyte op2) => UnsignedShift(op1, op2); - - public static byte ShiftLogicalRounded(byte op1, sbyte op2) => UnsignedShift(op1, op2, rounding: true); - - public static sbyte ShiftLogicalRounded(sbyte op1, sbyte op2) => UnsignedShift(op1, op2, rounding: true); - - public static byte ShiftLogicalRoundedSaturate(byte op1, sbyte op2) => UnsignedShift(op1, op2, rounding: true, saturating: true); - - public static sbyte ShiftLogicalRoundedSaturate(sbyte op1, sbyte op2) => UnsignedShift(op1, op2, rounding: true, saturating: true); - - public static sbyte ShiftLogicalSaturate(sbyte op1, sbyte op2) => UnsignedShift(op1, op2, saturating: true); - - public static byte ShiftLogicalSaturate(byte op1, sbyte op2) => UnsignedShift(op1, op2, saturating: true); - - public static sbyte ShiftRightArithmetic(sbyte op1, byte op2) => SignedShift(op1, (sbyte)(-op2)); - - public static sbyte ShiftRightArithmeticAdd(sbyte op1, sbyte op2, byte op3) => (sbyte)(op1 + ShiftRightArithmetic(op2, op3)); - - public static sbyte ShiftRightArithmeticRounded(sbyte op1, byte op2) => SignedShift(op1, (sbyte)(-op2), rounding: true); - - public static sbyte ShiftRightArithmeticRoundedAdd(sbyte op1, sbyte op2, byte op3) => (sbyte)(op1 + ShiftRightArithmeticRounded(op2, op3)); - - public static sbyte ShiftRightLogical(sbyte op1, byte op2) => UnsignedShift(op1, (sbyte)(-op2)); - - public static byte ShiftRightLogical(byte op1, byte op2) => UnsignedShift(op1, (sbyte)(-op2)); - - public static sbyte ShiftRightLogicalAdd(sbyte op1, sbyte op2, byte op3) => (sbyte)(op1 + ShiftRightLogical(op2, op3)); - - public static byte ShiftRightLogicalAdd(byte op1, byte op2, byte op3) => (byte)(op1 + ShiftRightLogical(op2, op3)); - - public static sbyte ShiftRightLogicalRounded(sbyte op1, byte op2) => UnsignedShift(op1, (sbyte)(-op2), rounding: true); - - public static byte ShiftRightLogicalRounded(byte op1, byte op2) => UnsignedShift(op1, (sbyte)(-op2), rounding: true); - - public static sbyte ShiftRightLogicalRoundedAdd(sbyte op1, sbyte op2, byte op3) => (sbyte)(op1 + ShiftRightLogicalRounded(op2, op3)); - - public static byte ShiftRightLogicalRoundedAdd(byte op1, byte op2, byte op3) => (byte)(op1 + ShiftRightLogicalRounded(op2, op3)); - - private static byte UnsignedShift(byte op1, sbyte op2, bool rounding = false, bool saturating = false) - { - int shift = (sbyte)(op2 & 0xFF); - - byte rndCns = 0; - - if (rounding) - { - bool ovf; - - (rndCns, ovf) = ShiftOvf((byte)1, -shift-1); - - if (ovf) - { - return 0; - } - } - - (byte result, bool addOvf) = AddOvf(op1, rndCns); - - bool shiftOvf; - - (result, shiftOvf) = ShiftOvf(result, shift); - - if (addOvf) - { - byte shiftedCarry = ShiftOvf((byte)1, 8 * sizeof(byte) + shift).val; - result = (byte)(result | shiftedCarry); - } - - if (saturating) - { - if (shiftOvf) - { - result = byte.MaxValue; - } - } - - return result; - } - - private static sbyte UnsignedShift(sbyte op1, sbyte op2, bool rounding = false, bool saturating = false) => (sbyte)UnsignedShift((byte)op1, op2, rounding, saturating); - - private static (sbyte val, bool ovf) AddOvf(sbyte op1, sbyte op2) - { - sbyte result = (sbyte)(op1 + op2); - - bool ovf = false; - - if ((op1 > 0) && (op2 > 0)) - { - ovf = (result < 0); - } - else if ((op1 < 0) && (op2 < 0)) - { - ovf = (result > 0); - } - - return (result, ovf); - } - - private static (byte val, bool ovf) AddOvf(byte op1, byte op2) - { - byte result = (byte)(op1 + op2); - - bool ovf = (result < op1); - - return (result, ovf); - } - - private static (sbyte val, bool ovf) SubtractOvf(sbyte op1, sbyte op2) - { - sbyte result = (sbyte)(op1 - op2); - - bool ovf = false; - - if ((op1 > 0) && (op2 < 0)) - { - ovf = (result < 0); - } - else if ((op1 < 0) && (op2 > 0)) - { - ovf = (result > 0); - } - - return (result, ovf); - } - - private static (byte val, bool ovf) SubtractOvf(byte op1, byte op2) - { - byte result = (byte)(op1 - op2); - - bool ovf = (op1 < op2); - - return (result, ovf); - } - - public static sbyte AddSaturate(sbyte op1, sbyte op2) - { - var (result, ovf) = AddOvf(op1, op2); - return ovf ? (result > 0 ? sbyte.MinValue : sbyte.MaxValue) : result; - } - - public static byte AddSaturate(byte op1, byte op2) - { - var (result, ovf) = AddOvf(op1, op2); - return ovf ? byte.MaxValue : result; - } - - public static sbyte SubtractSaturate(sbyte op1, sbyte op2) - { - var (result, ovf) = SubtractOvf(op1, op2); - return ovf ? (result > 0 ? sbyte.MinValue : sbyte.MaxValue) : result; - } - - public static byte SubtractSaturate(byte op1, byte op2) - { - var (result, ovf) = SubtractOvf(op1, op2); - return ovf ? byte.MinValue : result; - } - - public static short ShiftArithmetic(short op1, short op2) => SignedShift(op1, op2); - - public static short ShiftArithmeticRounded(short op1, short op2) => SignedShift(op1, op2, rounding: true); - - public static short ShiftArithmeticSaturate(short op1, short op2) => SignedShift(op1, op2, saturating: true); - - public static short ShiftArithmeticRoundedSaturate(short op1, short op2) => SignedShift(op1, op2, rounding: true, saturating: true); - - private static short SignedShift(short op1, short op2, bool rounding = false, bool saturating = false) - { - int shift = (sbyte)(op2 & 0xFF); - - short rndCns = 0; - - if (rounding) - { - bool ovf; - - (rndCns, ovf) = ShiftOvf((short)1, -shift-1); - - if (ovf) - { - return 0; - } - } - - short result; - - bool addOvf; - - (result, addOvf) = AddOvf(op1, rndCns); - - if (addOvf) - { - result = (short)ShiftOvf((ushort)result, shift).val; - } - else - { - bool shiftOvf; - - (result, shiftOvf) = ShiftOvf(result, shift); - - if (saturating) - { - if (shiftOvf) - { - result = short.MaxValue; - } - } - } - - return result; - } - - public static short ShiftLeftLogical(short op1, byte op2) => UnsignedShift(op1, (short)op2); - - public static ushort ShiftLeftLogical(ushort op1, byte op2) => UnsignedShift(op1, (short)op2); - - public static short ShiftLeftLogicalSaturate(short op1, byte op2) => SignedShift(op1, (short)op2, saturating: true); - - public static ushort ShiftLeftLogicalSaturate(ushort op1, byte op2) => UnsignedShift(op1, (short)op2, saturating: true); - - public static ushort ShiftLeftLogicalSaturateUnsigned(short op1, byte op2) => (ushort)UnsignedShift(op1, (short)op2, saturating: true); - - public static short ShiftLogical(short op1, short op2) => UnsignedShift(op1, op2); - - public static ushort ShiftLogical(ushort op1, short op2) => UnsignedShift(op1, op2); - - public static ushort ShiftLogicalRounded(ushort op1, short op2) => UnsignedShift(op1, op2, rounding: true); - - public static short ShiftLogicalRounded(short op1, short op2) => UnsignedShift(op1, op2, rounding: true); - - public static ushort ShiftLogicalRoundedSaturate(ushort op1, short op2) => UnsignedShift(op1, op2, rounding: true, saturating: true); - - public static short ShiftLogicalRoundedSaturate(short op1, short op2) => UnsignedShift(op1, op2, rounding: true, saturating: true); - - public static short ShiftLogicalSaturate(short op1, short op2) => UnsignedShift(op1, op2, saturating: true); - - public static ushort ShiftLogicalSaturate(ushort op1, short op2) => UnsignedShift(op1, op2, saturating: true); - - public static short ShiftRightArithmetic(short op1, byte op2) => SignedShift(op1, (short)(-op2)); - - public static short ShiftRightArithmeticAdd(short op1, short op2, byte op3) => (short)(op1 + ShiftRightArithmetic(op2, op3)); - - public static short ShiftRightArithmeticRounded(short op1, byte op2) => SignedShift(op1, (short)(-op2), rounding: true); - - public static short ShiftRightArithmeticRoundedAdd(short op1, short op2, byte op3) => (short)(op1 + ShiftRightArithmeticRounded(op2, op3)); - - public static short ShiftRightLogical(short op1, byte op2) => UnsignedShift(op1, (short)(-op2)); - - public static ushort ShiftRightLogical(ushort op1, byte op2) => UnsignedShift(op1, (short)(-op2)); - - public static short ShiftRightLogicalAdd(short op1, short op2, byte op3) => (short)(op1 + ShiftRightLogical(op2, op3)); - - public static ushort ShiftRightLogicalAdd(ushort op1, ushort op2, byte op3) => (ushort)(op1 + ShiftRightLogical(op2, op3)); - - public static short ShiftRightLogicalRounded(short op1, byte op2) => UnsignedShift(op1, (short)(-op2), rounding: true); - - public static ushort ShiftRightLogicalRounded(ushort op1, byte op2) => UnsignedShift(op1, (short)(-op2), rounding: true); - - public static short ShiftRightLogicalRoundedAdd(short op1, short op2, byte op3) => (short)(op1 + ShiftRightLogicalRounded(op2, op3)); - - public static ushort ShiftRightLogicalRoundedAdd(ushort op1, ushort op2, byte op3) => (ushort)(op1 + ShiftRightLogicalRounded(op2, op3)); - - private static ushort UnsignedShift(ushort op1, short op2, bool rounding = false, bool saturating = false) - { - int shift = (sbyte)(op2 & 0xFF); - - ushort rndCns = 0; - - if (rounding) - { - bool ovf; - - (rndCns, ovf) = ShiftOvf((ushort)1, -shift-1); - - if (ovf) - { - return 0; - } - } - - (ushort result, bool addOvf) = AddOvf(op1, rndCns); - - bool shiftOvf; - - (result, shiftOvf) = ShiftOvf(result, shift); - - if (addOvf) - { - ushort shiftedCarry = ShiftOvf((ushort)1, 8 * sizeof(ushort) + shift).val; - result = (ushort)(result | shiftedCarry); - } - - if (saturating) - { - if (shiftOvf) - { - result = ushort.MaxValue; - } - } - - return result; - } - - private static short UnsignedShift(short op1, short op2, bool rounding = false, bool saturating = false) => (short)UnsignedShift((ushort)op1, op2, rounding, saturating); - - private static (short val, bool ovf) AddOvf(short op1, short op2) - { - short result = (short)(op1 + op2); - - bool ovf = false; - - if ((op1 > 0) && (op2 > 0)) - { - ovf = (result < 0); - } - else if ((op1 < 0) && (op2 < 0)) - { - ovf = (result > 0); - } - - return (result, ovf); - } - - private static (ushort val, bool ovf) AddOvf(ushort op1, ushort op2) - { - ushort result = (ushort)(op1 + op2); - - bool ovf = (result < op1); - - return (result, ovf); - } - - private static (short val, bool ovf) SubtractOvf(short op1, short op2) - { - short result = (short)(op1 - op2); - - bool ovf = false; - - if ((op1 > 0) && (op2 < 0)) - { - ovf = (result < 0); - } - else if ((op1 < 0) && (op2 > 0)) - { - ovf = (result > 0); - } - - return (result, ovf); - } - - private static (ushort val, bool ovf) SubtractOvf(ushort op1, ushort op2) - { - ushort result = (ushort)(op1 - op2); - - bool ovf = (op1 < op2); - - return (result, ovf); - } - - public static short AddSaturate(short op1, short op2) - { - var (result, ovf) = AddOvf(op1, op2); - return ovf ? (result > 0 ? short.MinValue : short.MaxValue) : result; - } - - public static ushort AddSaturate(ushort op1, ushort op2) - { - var (result, ovf) = AddOvf(op1, op2); - return ovf ? ushort.MaxValue : result; - } - - public static short SubtractSaturate(short op1, short op2) - { - var (result, ovf) = SubtractOvf(op1, op2); - return ovf ? (result > 0 ? short.MinValue : short.MaxValue) : result; - } - - public static ushort SubtractSaturate(ushort op1, ushort op2) - { - var (result, ovf) = SubtractOvf(op1, op2); - return ovf ? ushort.MinValue : result; - } - - public static int ShiftArithmetic(int op1, int op2) => SignedShift(op1, op2); - - public static int ShiftArithmeticRounded(int op1, int op2) => SignedShift(op1, op2, rounding: true); - - public static int ShiftArithmeticSaturate(int op1, int op2) => SignedShift(op1, op2, saturating: true); - - public static int ShiftArithmeticRoundedSaturate(int op1, int op2) => SignedShift(op1, op2, rounding: true, saturating: true); - - private static int SignedShift(int op1, int op2, bool rounding = false, bool saturating = false) - { - int shift = (sbyte)(op2 & 0xFF); - - int rndCns = 0; - - if (rounding) - { - bool ovf; - - (rndCns, ovf) = ShiftOvf((int)1, -shift-1); - - if (ovf) - { - return 0; - } - } - - int result; - - bool addOvf; - - (result, addOvf) = AddOvf(op1, rndCns); - - if (addOvf) - { - result = (int)ShiftOvf((uint)result, shift).val; - } - else - { - bool shiftOvf; - - (result, shiftOvf) = ShiftOvf(result, shift); - - if (saturating) - { - if (shiftOvf) - { - result = int.MaxValue; - } - } - } - - return result; - } - - public static int ShiftLeftLogical(int op1, byte op2) => UnsignedShift(op1, (int)op2); - - public static uint ShiftLeftLogical(uint op1, byte op2) => UnsignedShift(op1, (int)op2); - - public static int ShiftLeftLogicalSaturate(int op1, byte op2) => SignedShift(op1, (int)op2, saturating: true); - - public static uint ShiftLeftLogicalSaturate(uint op1, byte op2) => UnsignedShift(op1, (int)op2, saturating: true); - - public static uint ShiftLeftLogicalSaturateUnsigned(int op1, byte op2) => (uint)UnsignedShift(op1, (int)op2, saturating: true); - - public static int ShiftLogical(int op1, int op2) => UnsignedShift(op1, op2); - - public static uint ShiftLogical(uint op1, int op2) => UnsignedShift(op1, op2); - - public static uint ShiftLogicalRounded(uint op1, int op2) => UnsignedShift(op1, op2, rounding: true); - - public static int ShiftLogicalRounded(int op1, int op2) => UnsignedShift(op1, op2, rounding: true); - - public static uint ShiftLogicalRoundedSaturate(uint op1, int op2) => UnsignedShift(op1, op2, rounding: true, saturating: true); - - public static int ShiftLogicalRoundedSaturate(int op1, int op2) => UnsignedShift(op1, op2, rounding: true, saturating: true); - - public static int ShiftLogicalSaturate(int op1, int op2) => UnsignedShift(op1, op2, saturating: true); - - public static uint ShiftLogicalSaturate(uint op1, int op2) => UnsignedShift(op1, op2, saturating: true); - - public static int ShiftRightArithmetic(int op1, byte op2) => SignedShift(op1, (int)(-op2)); - - public static int ShiftRightArithmeticAdd(int op1, int op2, byte op3) => (int)(op1 + ShiftRightArithmetic(op2, op3)); - - public static int ShiftRightArithmeticRounded(int op1, byte op2) => SignedShift(op1, (int)(-op2), rounding: true); - - public static int ShiftRightArithmeticRoundedAdd(int op1, int op2, byte op3) => (int)(op1 + ShiftRightArithmeticRounded(op2, op3)); - - public static int ShiftRightLogical(int op1, byte op2) => UnsignedShift(op1, (int)(-op2)); - - public static uint ShiftRightLogical(uint op1, byte op2) => UnsignedShift(op1, (int)(-op2)); - - public static int ShiftRightLogicalAdd(int op1, int op2, byte op3) => (int)(op1 + ShiftRightLogical(op2, op3)); - - public static uint ShiftRightLogicalAdd(uint op1, uint op2, byte op3) => (uint)(op1 + ShiftRightLogical(op2, op3)); - - public static int ShiftRightLogicalRounded(int op1, byte op2) => UnsignedShift(op1, (int)(-op2), rounding: true); - - public static uint ShiftRightLogicalRounded(uint op1, byte op2) => UnsignedShift(op1, (int)(-op2), rounding: true); - - public static int ShiftRightLogicalRoundedAdd(int op1, int op2, byte op3) => (int)(op1 + ShiftRightLogicalRounded(op2, op3)); - - public static uint ShiftRightLogicalRoundedAdd(uint op1, uint op2, byte op3) => (uint)(op1 + ShiftRightLogicalRounded(op2, op3)); - - private static uint UnsignedShift(uint op1, int op2, bool rounding = false, bool saturating = false) - { - int shift = (sbyte)(op2 & 0xFF); - - uint rndCns = 0; - - if (rounding) - { - bool ovf; - - (rndCns, ovf) = ShiftOvf((uint)1, -shift-1); - - if (ovf) - { - return 0; - } - } - - (uint result, bool addOvf) = AddOvf(op1, rndCns); - - bool shiftOvf; - - (result, shiftOvf) = ShiftOvf(result, shift); - - if (addOvf) - { - uint shiftedCarry = ShiftOvf((uint)1, 8 * sizeof(uint) + shift).val; - result = (uint)(result | shiftedCarry); - } - - if (saturating) - { - if (shiftOvf) - { - result = uint.MaxValue; - } - } - - return result; - } - - private static int UnsignedShift(int op1, int op2, bool rounding = false, bool saturating = false) => (int)UnsignedShift((uint)op1, op2, rounding, saturating); - - private static (int val, bool ovf) AddOvf(int op1, int op2) - { - int result = (int)(op1 + op2); - - bool ovf = false; - - if ((op1 > 0) && (op2 > 0)) - { - ovf = (result < 0); - } - else if ((op1 < 0) && (op2 < 0)) - { - ovf = (result > 0); - } - - return (result, ovf); - } - - private static (uint val, bool ovf) AddOvf(uint op1, uint op2) - { - uint result = (uint)(op1 + op2); - - bool ovf = (result < op1); - - return (result, ovf); - } - - private static (int val, bool ovf) SubtractOvf(int op1, int op2) - { - int result = (int)(op1 - op2); - - bool ovf = false; - - if ((op1 > 0) && (op2 < 0)) - { - ovf = (result < 0); - } - else if ((op1 < 0) && (op2 > 0)) - { - ovf = (result > 0); - } - - return (result, ovf); - } - - private static (uint val, bool ovf) SubtractOvf(uint op1, uint op2) - { - uint result = (uint)(op1 - op2); - - bool ovf = (op1 < op2); - - return (result, ovf); - } - - public static int AddSaturate(int op1, int op2) - { - var (result, ovf) = AddOvf(op1, op2); - return ovf ? (result > 0 ? int.MinValue : int.MaxValue) : result; - } - - public static uint AddSaturate(uint op1, uint op2) - { - var (result, ovf) = AddOvf(op1, op2); - return ovf ? uint.MaxValue : result; - } - - public static int SubtractSaturate(int op1, int op2) - { - var (result, ovf) = SubtractOvf(op1, op2); - return ovf ? (result > 0 ? int.MinValue : int.MaxValue) : result; - } - - public static uint SubtractSaturate(uint op1, uint op2) - { - var (result, ovf) = SubtractOvf(op1, op2); - return ovf ? uint.MinValue : result; - } - - public static long ShiftArithmetic(long op1, long op2) => SignedShift(op1, op2); - - public static long ShiftArithmeticRounded(long op1, long op2) => SignedShift(op1, op2, rounding: true); - - public static long ShiftArithmeticSaturate(long op1, long op2) => SignedShift(op1, op2, saturating: true); - - public static long ShiftArithmeticRoundedSaturate(long op1, long op2) => SignedShift(op1, op2, rounding: true, saturating: true); - - private static long SignedShift(long op1, long op2, bool rounding = false, bool saturating = false) - { - int shift = (sbyte)(op2 & 0xFF); - - long rndCns = 0; - - if (rounding) - { - bool ovf; - - (rndCns, ovf) = ShiftOvf((long)1, -shift-1); - - if (ovf) - { - return 0; - } - } - - long result; - - bool addOvf; - - (result, addOvf) = AddOvf(op1, rndCns); - - if (addOvf) - { - result = (long)ShiftOvf((ulong)result, shift).val; - } - else - { - bool shiftOvf; - - (result, shiftOvf) = ShiftOvf(result, shift); - - if (saturating) - { - if (shiftOvf) - { - result = long.MaxValue; - } - } - } - - return result; - } - - public static long ShiftLeftLogical(long op1, byte op2) => UnsignedShift(op1, (long)op2); - - public static ulong ShiftLeftLogical(ulong op1, byte op2) => UnsignedShift(op1, (long)op2); - - public static long ShiftLeftLogicalSaturate(long op1, byte op2) => SignedShift(op1, (long)op2, saturating: true); - - public static ulong ShiftLeftLogicalSaturate(ulong op1, byte op2) => UnsignedShift(op1, (long)op2, saturating: true); - - public static ulong ShiftLeftLogicalSaturateUnsigned(long op1, byte op2) => (ulong)UnsignedShift(op1, (long)op2, saturating: true); - - public static long ShiftLogical(long op1, long op2) => UnsignedShift(op1, op2); - - public static ulong ShiftLogical(ulong op1, long op2) => UnsignedShift(op1, op2); - - public static ulong ShiftLogicalRounded(ulong op1, long op2) => UnsignedShift(op1, op2, rounding: true); - - public static long ShiftLogicalRounded(long op1, long op2) => UnsignedShift(op1, op2, rounding: true); - - public static ulong ShiftLogicalRoundedSaturate(ulong op1, long op2) => UnsignedShift(op1, op2, rounding: true, saturating: true); - - public static long ShiftLogicalRoundedSaturate(long op1, long op2) => UnsignedShift(op1, op2, rounding: true, saturating: true); - - public static long ShiftLogicalSaturate(long op1, long op2) => UnsignedShift(op1, op2, saturating: true); - - public static ulong ShiftLogicalSaturate(ulong op1, long op2) => UnsignedShift(op1, op2, saturating: true); - - public static long ShiftRightArithmetic(long op1, byte op2) => SignedShift(op1, (long)(-op2)); - - public static long ShiftRightArithmeticAdd(long op1, long op2, byte op3) => (long)(op1 + ShiftRightArithmetic(op2, op3)); - - public static long ShiftRightArithmeticRounded(long op1, byte op2) => SignedShift(op1, (long)(-op2), rounding: true); - - public static long ShiftRightArithmeticRoundedAdd(long op1, long op2, byte op3) => (long)(op1 + ShiftRightArithmeticRounded(op2, op3)); - - public static long ShiftRightLogical(long op1, byte op2) => UnsignedShift(op1, (long)(-op2)); - - public static ulong ShiftRightLogical(ulong op1, byte op2) => UnsignedShift(op1, (long)(-op2)); - - public static long ShiftRightLogicalAdd(long op1, long op2, byte op3) => (long)(op1 + ShiftRightLogical(op2, op3)); - - public static ulong ShiftRightLogicalAdd(ulong op1, ulong op2, byte op3) => (ulong)(op1 + ShiftRightLogical(op2, op3)); - - public static long ShiftRightLogicalRounded(long op1, byte op2) => UnsignedShift(op1, (long)(-op2), rounding: true); - - public static ulong ShiftRightLogicalRounded(ulong op1, byte op2) => UnsignedShift(op1, (long)(-op2), rounding: true); - - public static long ShiftRightLogicalRoundedAdd(long op1, long op2, byte op3) => (long)(op1 + ShiftRightLogicalRounded(op2, op3)); - - public static ulong ShiftRightLogicalRoundedAdd(ulong op1, ulong op2, byte op3) => (ulong)(op1 + ShiftRightLogicalRounded(op2, op3)); - - private static ulong UnsignedShift(ulong op1, long op2, bool rounding = false, bool saturating = false) - { - int shift = (sbyte)(op2 & 0xFF); - - ulong rndCns = 0; - - if (rounding) - { - bool ovf; - - (rndCns, ovf) = ShiftOvf((ulong)1, -shift-1); - - if (ovf) - { - return 0; - } - } - - (ulong result, bool addOvf) = AddOvf(op1, rndCns); - - bool shiftOvf; - - (result, shiftOvf) = ShiftOvf(result, shift); - - if (addOvf) - { - ulong shiftedCarry = ShiftOvf((ulong)1, 8 * sizeof(ulong) + shift).val; - result = (ulong)(result | shiftedCarry); - } - - if (saturating) - { - if (shiftOvf) - { - result = ulong.MaxValue; - } - } - - return result; - } - - private static long UnsignedShift(long op1, long op2, bool rounding = false, bool saturating = false) => (long)UnsignedShift((ulong)op1, op2, rounding, saturating); - - private static (long val, bool ovf) AddOvf(long op1, long op2) - { - long result = (long)(op1 + op2); - - bool ovf = false; - - if ((op1 > 0) && (op2 > 0)) - { - ovf = (result < 0); - } - else if ((op1 < 0) && (op2 < 0)) - { - ovf = (result > 0); - } - - return (result, ovf); - } - - private static (ulong val, bool ovf) AddOvf(ulong op1, ulong op2) - { - ulong result = (ulong)(op1 + op2); - - bool ovf = (result < op1); - - return (result, ovf); - } - - private static (long val, bool ovf) SubtractOvf(long op1, long op2) - { - long result = (long)(op1 - op2); - - bool ovf = false; - - if ((op1 > 0) && (op2 < 0)) - { - ovf = (result < 0); - } - else if ((op1 < 0) && (op2 > 0)) - { - ovf = (result > 0); - } - - return (result, ovf); - } - - private static (ulong val, bool ovf) SubtractOvf(ulong op1, ulong op2) - { - ulong result = (ulong)(op1 - op2); - - bool ovf = (op1 < op2); - - return (result, ovf); - } - - public static long AddSaturate(long op1, long op2) - { - var (result, ovf) = AddOvf(op1, op2); - return ovf ? (result > 0 ? long.MinValue : long.MaxValue) : result; - } - - public static ulong AddSaturate(ulong op1, ulong op2) - { - var (result, ovf) = AddOvf(op1, op2); - return ovf ? ulong.MaxValue : result; - } - - public static long SubtractSaturate(long op1, long op2) - { - var (result, ovf) = SubtractOvf(op1, op2); - return ovf ? (result > 0 ? long.MinValue : long.MaxValue) : result; - } - - public static ulong SubtractSaturate(ulong op1, ulong op2) - { - var (result, ovf) = SubtractOvf(op1, op2); - return ovf ? ulong.MinValue : result; - } - - - private static (sbyte val, bool ovf) ShiftOvf(sbyte value, int shift) - { - sbyte result = value; - - bool ovf = false; - sbyte msb = 1; - msb = (sbyte)(msb << (8 * sizeof(sbyte) - 1)); - - for (int i = 0; i < shift; i++) - { - ovf = ovf || ((result & msb) != 0); - result <<= 1; - } - - for (int i = 0; i > shift; i--) - { - result >>= 1; - } - - if ((value > 0) && (result < 0)) - { - ovf = true; - } - - return (result, ovf); - } - - - - private static (byte val, bool ovf) ShiftOvf(byte value, int shift) - { - byte result = value; - - bool ovf = false; - byte msb = 1; - msb = (byte)(msb << (8 * sizeof(byte) - 1)); - - for (int i = 0; i < shift; i++) - { - ovf = ovf || ((result & msb) != 0); - result <<= 1; - } - - for (int i = 0; i > shift; i--) - { - result >>= 1; - } - - if ((value > 0) && (result < 0)) - { - ovf = true; - } - - return (result, ovf); - } - - - - private static (short val, bool ovf) ShiftOvf(short value, int shift) - { - short result = value; - - bool ovf = false; - short msb = 1; - msb = (short)(msb << (8 * sizeof(short) - 1)); - - for (int i = 0; i < shift; i++) - { - ovf = ovf || ((result & msb) != 0); - result <<= 1; - } - - for (int i = 0; i > shift; i--) - { - result >>= 1; - } - - if ((value > 0) && (result < 0)) - { - ovf = true; - } - - return (result, ovf); - } - - - - private static (ushort val, bool ovf) ShiftOvf(ushort value, int shift) - { - ushort result = value; - - bool ovf = false; - ushort msb = 1; - msb = (ushort)(msb << (8 * sizeof(ushort) - 1)); - - for (int i = 0; i < shift; i++) - { - ovf = ovf || ((result & msb) != 0); - result <<= 1; - } - - for (int i = 0; i > shift; i--) - { - result >>= 1; - } - - if ((value > 0) && (result < 0)) - { - ovf = true; - } - - return (result, ovf); - } - - - - private static (int val, bool ovf) ShiftOvf(int value, int shift) - { - int result = value; - - bool ovf = false; - int msb = 1; - msb = (int)(msb << (8 * sizeof(int) - 1)); - - for (int i = 0; i < shift; i++) - { - ovf = ovf || ((result & msb) != 0); - result <<= 1; - } - - for (int i = 0; i > shift; i--) - { - result >>= 1; - } - - if ((value > 0) && (result < 0)) - { - ovf = true; - } - - return (result, ovf); - } - - - - private static (uint val, bool ovf) ShiftOvf(uint value, int shift) - { - uint result = value; - - bool ovf = false; - uint msb = 1; - msb = (uint)(msb << (8 * sizeof(uint) - 1)); - - for (int i = 0; i < shift; i++) - { - ovf = ovf || ((result & msb) != 0); - result <<= 1; - } - - for (int i = 0; i > shift; i--) - { - result >>= 1; - } - - if ((value > 0) && (result < 0)) - { - ovf = true; - } - - return (result, ovf); - } - - - - private static (long val, bool ovf) ShiftOvf(long value, int shift) - { - long result = value; - - bool ovf = false; - long msb = 1; - msb = (long)(msb << (8 * sizeof(long) - 1)); - - for (int i = 0; i < shift; i++) - { - ovf = ovf || ((result & msb) != 0); - result <<= 1; - } - - for (int i = 0; i > shift; i--) - { - result >>= 1; - } - - if ((value > 0) && (result < 0)) - { - ovf = true; - } - - return (result, ovf); - } - - - - private static (ulong val, bool ovf) ShiftOvf(ulong value, int shift) - { - ulong result = value; - - bool ovf = false; - ulong msb = 1; - msb = (ulong)(msb << (8 * sizeof(ulong) - 1)); - - for (int i = 0; i < shift; i++) - { - ovf = ovf || ((result & msb) != 0); - result <<= 1; - } - - for (int i = 0; i > shift; i--) - { - result >>= 1; - } - - if ((value > 0) && (result < 0)) - { - ovf = true; - } - - return (result, ovf); - } - - - public static float AbsoluteDifference(float op1, float op2) => MathF.Abs(op1 - op2); - - public static float FusedMultiplyAdd(float op1, float op2, float op3) => MathF.FusedMultiplyAdd(op2, op3, op1); - - public static float FusedMultiplyAddNegated(float op1, float op2, float op3) => MathF.FusedMultiplyAdd(-op2, op3, -op1); - - public static float FusedMultiplySubtract(float op1, float op2, float op3) => MathF.FusedMultiplyAdd(-op2, op3, op1); - - public static float FusedMultiplySubtractNegated(float op1, float op2, float op3) => MathF.FusedMultiplyAdd(op2, op3, -op1); - - public static float MaxNumber(float op1, float op2) => float.IsNaN(op1) ? op2 : (float.IsNaN(op2) ? op1 : MathF.Max(op1, op2)); - - public static float MaxNumberPairwise(float[] op1, int i) => Pairwise(MaxNumber, op1, i); - - public static float MaxNumberPairwise(float[] op1, float[] op2, int i) => Pairwise(MaxNumber, op1, op2, i); - - public static float MinNumber(float op1, float op2) => float.IsNaN(op1) ? op2 : (float.IsNaN(op2) ? op1 : MathF.Min(op1, op2)); - - public static float MinNumberPairwise(float[] op1, int i) => Pairwise(MinNumber, op1, i); - - public static float MinNumberPairwise(float[] op1, float[] op2, int i) => Pairwise(MinNumber, op1, op2, i); - - public static float MultiplyExtended(float op1, float op2) - { - bool inf1 = float.IsInfinity(op1); - bool inf2 = float.IsInfinity(op2); - - bool zero1 = (op1 == 0); - bool zero2 = (op2 == 0); - - if ((inf1 && zero2) || (zero1 && inf2)) - { - return MathF.CopySign(2, (zero1 ? op2 : op1)); - } - else - { - return op1 * op2; - } - } - - public static float FPRecipStepFused(float op1, float op2) => FusedMultiplySubtract(2, op1, op2); - - public static float FPRSqrtStepFused(float op1, float op2) => FusedMultiplySubtract(3, op1, op2) / 2; - - public static double AbsoluteDifference(double op1, double op2) => Math.Abs(op1 - op2); - - public static double FusedMultiplyAdd(double op1, double op2, double op3) => Math.FusedMultiplyAdd(op2, op3, op1); - - public static double FusedMultiplyAddNegated(double op1, double op2, double op3) => Math.FusedMultiplyAdd(-op2, op3, -op1); - - public static double FusedMultiplySubtract(double op1, double op2, double op3) => Math.FusedMultiplyAdd(-op2, op3, op1); - - public static double FusedMultiplySubtractNegated(double op1, double op2, double op3) => Math.FusedMultiplyAdd(op2, op3, -op1); - - public static double MaxNumber(double op1, double op2) => double.IsNaN(op1) ? op2 : (double.IsNaN(op2) ? op1 : Math.Max(op1, op2)); - - public static double MaxNumberPairwise(double[] op1, int i) => Pairwise(MaxNumber, op1, i); - - public static double MaxNumberPairwise(double[] op1, double[] op2, int i) => Pairwise(MaxNumber, op1, op2, i); - - public static double MinNumber(double op1, double op2) => double.IsNaN(op1) ? op2 : (double.IsNaN(op2) ? op1 : Math.Min(op1, op2)); - - public static double MinNumberPairwise(double[] op1, int i) => Pairwise(MinNumber, op1, i); - - public static double MinNumberPairwise(double[] op1, double[] op2, int i) => Pairwise(MinNumber, op1, op2, i); - - public static double MultiplyExtended(double op1, double op2) - { - bool inf1 = double.IsInfinity(op1); - bool inf2 = double.IsInfinity(op2); - - bool zero1 = (op1 == 0); - bool zero2 = (op2 == 0); - - if ((inf1 && zero2) || (zero1 && inf2)) - { - return Math.CopySign(2, (zero1 ? op2 : op1)); - } - else - { - return op1 * op2; - } - } - - public static double FPRecipStepFused(double op1, double op2) => FusedMultiplySubtract(2, op1, op2); - - public static double FPRSqrtStepFused(double op1, double op2) => FusedMultiplySubtract(3, op1, op2) / 2; - - private static uint RecipEstimate(uint a) - { - a = a * 2 + 1; - - uint b = (1 << 19) / a; - uint r = (b + 1) / 2; - - return r; - } - - private static uint RecipSqrtEstimate(uint a) - { - if (a < 256) - { - a = a * 2 + 1; - } - else - { - a = (a >> 1) << 1; - a = (a + 1) * 2; - } - - uint b = 512; - - while (a * (b + 1) * (b + 1) < (1 << 28)) - { - b = b + 1; - } - - uint r = (b + 1) / 2; - - return r; - } - - private static uint ExtractBits(uint val, byte msbPos, byte lsbPos) - { - uint andMask = 0; - - for (byte pos = lsbPos; pos <= msbPos; pos++) - { - andMask |= (uint)1 << pos; - } - - return (val & andMask) >> lsbPos; - } - - public static uint UnsignedRecipEstimate(uint op1) - { - uint result; - - if ((op1 & (1 << 31)) == 0) - { - result = ~0U; - } - else - { - uint estimate = RecipEstimate(ExtractBits(op1, 31, 23)); - result = ExtractBits(estimate, 8, 0) << 31; - } - - return result; - } - - public static uint UnsignedRSqrtEstimate(uint op1) - { - uint result; - - if ((op1 & (3 << 30)) == 0) - { - result = ~0U; - } - else - { - uint estimate = RecipSqrtEstimate(ExtractBits(op1, 31, 23)); - result = ExtractBits(estimate, 8, 0) << 31; - } - - return result; - } - - public static sbyte Add(sbyte op1, sbyte op2) => (sbyte)(op1 + op2); - - public static sbyte AddPairwise(sbyte[] op1, int i) => Pairwise(Add, op1, i); - - public static sbyte AddPairwise(sbyte[] op1, sbyte[] op2, int i) => Pairwise(Add, op1, op2, i); - - public static sbyte Max(sbyte op1, sbyte op2) => Math.Max(op1, op2); - - public static sbyte MaxPairwise(sbyte[] op1, int i) => Pairwise(Max, op1, i); - - public static sbyte MaxPairwise(sbyte[] op1, sbyte[] op2, int i) => Pairwise(Max, op1, op2, i); - - public static sbyte Min(sbyte op1, sbyte op2) => Math.Min(op1, op2); - - public static sbyte MinPairwise(sbyte[] op1, int i) => Pairwise(Min, op1, i); - - public static sbyte MinPairwise(sbyte[] op1, sbyte[] op2, int i) => Pairwise(Min, op1, op2, i); - - public static sbyte Multiply(sbyte op1, sbyte op2) => (sbyte)(op1 * op2); - - public static sbyte MultiplyAdd(sbyte op1, sbyte op2, sbyte op3) => (sbyte)(op1 + (sbyte)(op2 * op3)); - - public static sbyte MultiplySubtract(sbyte op1, sbyte op2, sbyte op3) => (sbyte)(op1 - (sbyte)(op2 * op3)); - - public static sbyte Subtract(sbyte op1, sbyte op2) => (sbyte)(op1 - op2); - - private static sbyte Pairwise(Func pairOp, sbyte[] op1, int i) - { - if (2 * i + 1 < op1.Length) - { - return pairOp(op1[2 * i], op1[2 * i + 1]); - } - else - { - return 0; - } - } - - private static sbyte Pairwise(Func pairOp, sbyte[] op1, sbyte[] op2, int i) - { - if (2 * i + 1 < op1.Length) - { - return pairOp(op1[2 * i], op1[2 * i + 1]); - } - else - { - return pairOp(op2[2 * i - op1.Length], op2[2 * i + 1 - op1.Length]); - } - } - - public static byte Add(byte op1, byte op2) => (byte)(op1 + op2); - - public static byte AddPairwise(byte[] op1, int i) => Pairwise(Add, op1, i); - - public static byte AddPairwise(byte[] op1, byte[] op2, int i) => Pairwise(Add, op1, op2, i); - - public static byte Max(byte op1, byte op2) => Math.Max(op1, op2); - - public static byte MaxPairwise(byte[] op1, int i) => Pairwise(Max, op1, i); - - public static byte MaxPairwise(byte[] op1, byte[] op2, int i) => Pairwise(Max, op1, op2, i); - - public static byte Min(byte op1, byte op2) => Math.Min(op1, op2); - - public static byte MinPairwise(byte[] op1, int i) => Pairwise(Min, op1, i); - - public static byte MinPairwise(byte[] op1, byte[] op2, int i) => Pairwise(Min, op1, op2, i); - - public static byte Multiply(byte op1, byte op2) => (byte)(op1 * op2); - - public static byte MultiplyAdd(byte op1, byte op2, byte op3) => (byte)(op1 + (byte)(op2 * op3)); - - public static byte MultiplySubtract(byte op1, byte op2, byte op3) => (byte)(op1 - (byte)(op2 * op3)); - - public static byte Subtract(byte op1, byte op2) => (byte)(op1 - op2); - - private static byte Pairwise(Func pairOp, byte[] op1, int i) - { - if (2 * i + 1 < op1.Length) - { - return pairOp(op1[2 * i], op1[2 * i + 1]); - } - else - { - return 0; - } - } - - private static byte Pairwise(Func pairOp, byte[] op1, byte[] op2, int i) - { - if (2 * i + 1 < op1.Length) - { - return pairOp(op1[2 * i], op1[2 * i + 1]); - } - else - { - return pairOp(op2[2 * i - op1.Length], op2[2 * i + 1 - op1.Length]); - } - } - - public static short Add(short op1, short op2) => (short)(op1 + op2); - - public static short AddPairwise(short[] op1, int i) => Pairwise(Add, op1, i); - - public static short AddPairwise(short[] op1, short[] op2, int i) => Pairwise(Add, op1, op2, i); - - public static short Max(short op1, short op2) => Math.Max(op1, op2); - - public static short MaxPairwise(short[] op1, int i) => Pairwise(Max, op1, i); - - public static short MaxPairwise(short[] op1, short[] op2, int i) => Pairwise(Max, op1, op2, i); - - public static short Min(short op1, short op2) => Math.Min(op1, op2); - - public static short MinPairwise(short[] op1, int i) => Pairwise(Min, op1, i); - - public static short MinPairwise(short[] op1, short[] op2, int i) => Pairwise(Min, op1, op2, i); - - public static short Multiply(short op1, short op2) => (short)(op1 * op2); - - public static short MultiplyAdd(short op1, short op2, short op3) => (short)(op1 + (short)(op2 * op3)); - - public static short MultiplySubtract(short op1, short op2, short op3) => (short)(op1 - (short)(op2 * op3)); - - public static short Subtract(short op1, short op2) => (short)(op1 - op2); - - private static short Pairwise(Func pairOp, short[] op1, int i) - { - if (2 * i + 1 < op1.Length) - { - return pairOp(op1[2 * i], op1[2 * i + 1]); - } - else - { - return 0; - } - } - - private static short Pairwise(Func pairOp, short[] op1, short[] op2, int i) - { - if (2 * i + 1 < op1.Length) - { - return pairOp(op1[2 * i], op1[2 * i + 1]); - } - else - { - return pairOp(op2[2 * i - op1.Length], op2[2 * i + 1 - op1.Length]); - } - } - - public static ushort Add(ushort op1, ushort op2) => (ushort)(op1 + op2); - - public static ushort AddPairwise(ushort[] op1, int i) => Pairwise(Add, op1, i); - - public static ushort AddPairwise(ushort[] op1, ushort[] op2, int i) => Pairwise(Add, op1, op2, i); - - public static ushort Max(ushort op1, ushort op2) => Math.Max(op1, op2); - - public static ushort MaxPairwise(ushort[] op1, int i) => Pairwise(Max, op1, i); - - public static ushort MaxPairwise(ushort[] op1, ushort[] op2, int i) => Pairwise(Max, op1, op2, i); - - public static ushort Min(ushort op1, ushort op2) => Math.Min(op1, op2); - - public static ushort MinPairwise(ushort[] op1, int i) => Pairwise(Min, op1, i); - - public static ushort MinPairwise(ushort[] op1, ushort[] op2, int i) => Pairwise(Min, op1, op2, i); - - public static ushort Multiply(ushort op1, ushort op2) => (ushort)(op1 * op2); - - public static ushort MultiplyAdd(ushort op1, ushort op2, ushort op3) => (ushort)(op1 + (ushort)(op2 * op3)); - - public static ushort MultiplySubtract(ushort op1, ushort op2, ushort op3) => (ushort)(op1 - (ushort)(op2 * op3)); - - public static ushort Subtract(ushort op1, ushort op2) => (ushort)(op1 - op2); - - private static ushort Pairwise(Func pairOp, ushort[] op1, int i) - { - if (2 * i + 1 < op1.Length) - { - return pairOp(op1[2 * i], op1[2 * i + 1]); - } - else - { - return 0; - } - } - - private static ushort Pairwise(Func pairOp, ushort[] op1, ushort[] op2, int i) - { - if (2 * i + 1 < op1.Length) - { - return pairOp(op1[2 * i], op1[2 * i + 1]); - } - else - { - return pairOp(op2[2 * i - op1.Length], op2[2 * i + 1 - op1.Length]); - } - } - - public static int Add(int op1, int op2) => (int)(op1 + op2); - - public static int AddPairwise(int[] op1, int i) => Pairwise(Add, op1, i); - - public static int AddPairwise(int[] op1, int[] op2, int i) => Pairwise(Add, op1, op2, i); - - public static int Max(int op1, int op2) => Math.Max(op1, op2); - - public static int MaxPairwise(int[] op1, int i) => Pairwise(Max, op1, i); - - public static int MaxPairwise(int[] op1, int[] op2, int i) => Pairwise(Max, op1, op2, i); - - public static int Min(int op1, int op2) => Math.Min(op1, op2); - - public static int MinPairwise(int[] op1, int i) => Pairwise(Min, op1, i); - - public static int MinPairwise(int[] op1, int[] op2, int i) => Pairwise(Min, op1, op2, i); - - public static int Multiply(int op1, int op2) => (int)(op1 * op2); - - public static int MultiplyAdd(int op1, int op2, int op3) => (int)(op1 + (int)(op2 * op3)); - - public static int MultiplySubtract(int op1, int op2, int op3) => (int)(op1 - (int)(op2 * op3)); - - public static int Subtract(int op1, int op2) => (int)(op1 - op2); - - private static int Pairwise(Func pairOp, int[] op1, int i) - { - if (2 * i + 1 < op1.Length) - { - return pairOp(op1[2 * i], op1[2 * i + 1]); - } - else - { - return 0; - } - } - - private static int Pairwise(Func pairOp, int[] op1, int[] op2, int i) - { - if (2 * i + 1 < op1.Length) - { - return pairOp(op1[2 * i], op1[2 * i + 1]); - } - else - { - return pairOp(op2[2 * i - op1.Length], op2[2 * i + 1 - op1.Length]); - } - } - - public static uint Add(uint op1, uint op2) => (uint)(op1 + op2); - - public static uint AddPairwise(uint[] op1, int i) => Pairwise(Add, op1, i); - - public static uint AddPairwise(uint[] op1, uint[] op2, int i) => Pairwise(Add, op1, op2, i); - - public static uint Max(uint op1, uint op2) => Math.Max(op1, op2); - - public static uint MaxPairwise(uint[] op1, int i) => Pairwise(Max, op1, i); - - public static uint MaxPairwise(uint[] op1, uint[] op2, int i) => Pairwise(Max, op1, op2, i); - - public static uint Min(uint op1, uint op2) => Math.Min(op1, op2); - - public static uint MinPairwise(uint[] op1, int i) => Pairwise(Min, op1, i); - - public static uint MinPairwise(uint[] op1, uint[] op2, int i) => Pairwise(Min, op1, op2, i); - - public static uint Multiply(uint op1, uint op2) => (uint)(op1 * op2); - - public static uint MultiplyAdd(uint op1, uint op2, uint op3) => (uint)(op1 + (uint)(op2 * op3)); - - public static uint MultiplySubtract(uint op1, uint op2, uint op3) => (uint)(op1 - (uint)(op2 * op3)); - - public static uint Subtract(uint op1, uint op2) => (uint)(op1 - op2); - - private static uint Pairwise(Func pairOp, uint[] op1, int i) - { - if (2 * i + 1 < op1.Length) - { - return pairOp(op1[2 * i], op1[2 * i + 1]); - } - else - { - return 0; - } - } - - private static uint Pairwise(Func pairOp, uint[] op1, uint[] op2, int i) - { - if (2 * i + 1 < op1.Length) - { - return pairOp(op1[2 * i], op1[2 * i + 1]); - } - else - { - return pairOp(op2[2 * i - op1.Length], op2[2 * i + 1 - op1.Length]); - } - } - - public static long Add(long op1, long op2) => (long)(op1 + op2); - - public static long AddPairwise(long[] op1, int i) => Pairwise(Add, op1, i); - - public static long AddPairwise(long[] op1, long[] op2, int i) => Pairwise(Add, op1, op2, i); - - public static long Max(long op1, long op2) => Math.Max(op1, op2); - - public static long MaxPairwise(long[] op1, int i) => Pairwise(Max, op1, i); - - public static long MaxPairwise(long[] op1, long[] op2, int i) => Pairwise(Max, op1, op2, i); - - public static long Min(long op1, long op2) => Math.Min(op1, op2); - - public static long MinPairwise(long[] op1, int i) => Pairwise(Min, op1, i); - - public static long MinPairwise(long[] op1, long[] op2, int i) => Pairwise(Min, op1, op2, i); - - public static long Multiply(long op1, long op2) => (long)(op1 * op2); - - public static long MultiplyAdd(long op1, long op2, long op3) => (long)(op1 + (long)(op2 * op3)); - - public static long MultiplySubtract(long op1, long op2, long op3) => (long)(op1 - (long)(op2 * op3)); - - public static long Subtract(long op1, long op2) => (long)(op1 - op2); - - private static long Pairwise(Func pairOp, long[] op1, int i) - { - if (2 * i + 1 < op1.Length) - { - return pairOp(op1[2 * i], op1[2 * i + 1]); - } - else - { - return 0; - } - } - - private static long Pairwise(Func pairOp, long[] op1, long[] op2, int i) - { - if (2 * i + 1 < op1.Length) - { - return pairOp(op1[2 * i], op1[2 * i + 1]); - } - else - { - return pairOp(op2[2 * i - op1.Length], op2[2 * i + 1 - op1.Length]); - } - } - - public static ulong Add(ulong op1, ulong op2) => (ulong)(op1 + op2); - - public static ulong AddPairwise(ulong[] op1, int i) => Pairwise(Add, op1, i); - - public static ulong AddPairwise(ulong[] op1, ulong[] op2, int i) => Pairwise(Add, op1, op2, i); - - public static ulong Max(ulong op1, ulong op2) => Math.Max(op1, op2); - - public static ulong MaxPairwise(ulong[] op1, int i) => Pairwise(Max, op1, i); - - public static ulong MaxPairwise(ulong[] op1, ulong[] op2, int i) => Pairwise(Max, op1, op2, i); - - public static ulong Min(ulong op1, ulong op2) => Math.Min(op1, op2); - - public static ulong MinPairwise(ulong[] op1, int i) => Pairwise(Min, op1, i); - - public static ulong MinPairwise(ulong[] op1, ulong[] op2, int i) => Pairwise(Min, op1, op2, i); - - public static ulong Multiply(ulong op1, ulong op2) => (ulong)(op1 * op2); - - public static ulong MultiplyAdd(ulong op1, ulong op2, ulong op3) => (ulong)(op1 + (ulong)(op2 * op3)); - - public static ulong MultiplySubtract(ulong op1, ulong op2, ulong op3) => (ulong)(op1 - (ulong)(op2 * op3)); - - public static ulong Subtract(ulong op1, ulong op2) => (ulong)(op1 - op2); - - private static ulong Pairwise(Func pairOp, ulong[] op1, int i) - { - if (2 * i + 1 < op1.Length) - { - return pairOp(op1[2 * i], op1[2 * i + 1]); - } - else - { - return 0; - } - } - - private static ulong Pairwise(Func pairOp, ulong[] op1, ulong[] op2, int i) - { - if (2 * i + 1 < op1.Length) - { - return pairOp(op1[2 * i], op1[2 * i + 1]); - } - else - { - return pairOp(op2[2 * i - op1.Length], op2[2 * i + 1 - op1.Length]); - } - } - - public static float Add(float op1, float op2) => (float)(op1 + op2); - - public static float AddPairwise(float[] op1, int i) => Pairwise(Add, op1, i); - - public static float AddPairwise(float[] op1, float[] op2, int i) => Pairwise(Add, op1, op2, i); - - public static float Max(float op1, float op2) => Math.Max(op1, op2); - - public static float MaxPairwise(float[] op1, int i) => Pairwise(Max, op1, i); - - public static float MaxPairwise(float[] op1, float[] op2, int i) => Pairwise(Max, op1, op2, i); - - public static float Min(float op1, float op2) => Math.Min(op1, op2); - - public static float MinPairwise(float[] op1, int i) => Pairwise(Min, op1, i); - - public static float MinPairwise(float[] op1, float[] op2, int i) => Pairwise(Min, op1, op2, i); - - public static float Multiply(float op1, float op2) => (float)(op1 * op2); - - public static float MultiplyAdd(float op1, float op2, float op3) => (float)(op1 + (float)(op2 * op3)); - - public static float MultiplySubtract(float op1, float op2, float op3) => (float)(op1 - (float)(op2 * op3)); - - public static float Subtract(float op1, float op2) => (float)(op1 - op2); - - private static float Pairwise(Func pairOp, float[] op1, int i) - { - if (2 * i + 1 < op1.Length) - { - return pairOp(op1[2 * i], op1[2 * i + 1]); - } - else - { - return 0; - } - } - - private static float Pairwise(Func pairOp, float[] op1, float[] op2, int i) - { - if (2 * i + 1 < op1.Length) - { - return pairOp(op1[2 * i], op1[2 * i + 1]); - } - else - { - return pairOp(op2[2 * i - op1.Length], op2[2 * i + 1 - op1.Length]); - } - } - - public static double Add(double op1, double op2) => (double)(op1 + op2); - - public static double AddPairwise(double[] op1, int i) => Pairwise(Add, op1, i); - - public static double AddPairwise(double[] op1, double[] op2, int i) => Pairwise(Add, op1, op2, i); - - public static double Max(double op1, double op2) => Math.Max(op1, op2); - - public static double MaxPairwise(double[] op1, int i) => Pairwise(Max, op1, i); - - public static double MaxPairwise(double[] op1, double[] op2, int i) => Pairwise(Max, op1, op2, i); - - public static double Min(double op1, double op2) => Math.Min(op1, op2); - - public static double MinPairwise(double[] op1, int i) => Pairwise(Min, op1, i); - - public static double MinPairwise(double[] op1, double[] op2, int i) => Pairwise(Min, op1, op2, i); - - public static double Multiply(double op1, double op2) => (double)(op1 * op2); - - public static double MultiplyAdd(double op1, double op2, double op3) => (double)(op1 + (double)(op2 * op3)); - - public static double MultiplySubtract(double op1, double op2, double op3) => (double)(op1 - (double)(op2 * op3)); - - public static double Subtract(double op1, double op2) => (double)(op1 - op2); - - private static double Pairwise(Func pairOp, double[] op1, int i) - { - if (2 * i + 1 < op1.Length) - { - return pairOp(op1[2 * i], op1[2 * i + 1]); - } - else - { - return 0; - } - } - - private static double Pairwise(Func pairOp, double[] op1, double[] op2, int i) - { - if (2 * i + 1 < op1.Length) - { - return pairOp(op1[2 * i], op1[2 * i + 1]); - } - else - { - return pairOp(op2[2 * i - op1.Length], op2[2 * i + 1 - op1.Length]); - } - } - - public static sbyte Negate(sbyte op1) => (sbyte)(-op1); - - public static short Negate(short op1) => (short)(-op1); - - public static int Negate(int op1) => (int)(-op1); - - public static long Negate(long op1) => (long)(-op1); - - public static float Negate(float op1) => (float)(-op1); - - public static double Negate(double op1) => (double)(-op1); - - public static sbyte AddAcross(sbyte[] op1) => Reduce(Add, op1); - - public static sbyte MaxAcross(sbyte[] op1) => Reduce(Max, op1); - - public static sbyte MinAcross(sbyte[] op1) => Reduce(Min, op1); - - private static sbyte Reduce(Func reduceOp, sbyte[] op1) - { - sbyte acc = op1[0]; - - for (int i = 1; i < op1.Length; i++) - { - acc = reduceOp(acc, op1[i]); - } - - return acc; - } - - public static byte AddAcross(byte[] op1) => Reduce(Add, op1); - - public static byte MaxAcross(byte[] op1) => Reduce(Max, op1); - - public static byte MinAcross(byte[] op1) => Reduce(Min, op1); - - private static byte Reduce(Func reduceOp, byte[] op1) - { - byte acc = op1[0]; - - for (int i = 1; i < op1.Length; i++) - { - acc = reduceOp(acc, op1[i]); - } - - return acc; - } - - public static short AddAcross(short[] op1) => Reduce(Add, op1); - - public static short MaxAcross(short[] op1) => Reduce(Max, op1); - - public static short MinAcross(short[] op1) => Reduce(Min, op1); - - private static short Reduce(Func reduceOp, short[] op1) - { - short acc = op1[0]; - - for (int i = 1; i < op1.Length; i++) - { - acc = reduceOp(acc, op1[i]); - } - - return acc; - } - - public static ushort AddAcross(ushort[] op1) => Reduce(Add, op1); - - public static ushort MaxAcross(ushort[] op1) => Reduce(Max, op1); - - public static ushort MinAcross(ushort[] op1) => Reduce(Min, op1); - - private static ushort Reduce(Func reduceOp, ushort[] op1) - { - ushort acc = op1[0]; - - for (int i = 1; i < op1.Length; i++) - { - acc = reduceOp(acc, op1[i]); - } - - return acc; - } - - public static int AddAcross(int[] op1) => Reduce(Add, op1); - - public static int MaxAcross(int[] op1) => Reduce(Max, op1); - - public static int MinAcross(int[] op1) => Reduce(Min, op1); - - private static int Reduce(Func reduceOp, int[] op1) - { - int acc = op1[0]; - - for (int i = 1; i < op1.Length; i++) - { - acc = reduceOp(acc, op1[i]); - } - - return acc; - } - - public static uint AddAcross(uint[] op1) => Reduce(Add, op1); - - public static uint MaxAcross(uint[] op1) => Reduce(Max, op1); - - public static uint MinAcross(uint[] op1) => Reduce(Min, op1); - - private static uint Reduce(Func reduceOp, uint[] op1) - { - uint acc = op1[0]; - - for (int i = 1; i < op1.Length; i++) - { - acc = reduceOp(acc, op1[i]); - } - - return acc; - } - - public static float AddAcross(float[] op1) => Reduce(Add, op1); - - public static float MaxAcross(float[] op1) => Reduce(Max, op1); - - public static float MinAcross(float[] op1) => Reduce(Min, op1); - - private static float Reduce(Func reduceOp, float[] op1) - { - float acc = op1[0]; - - for (int i = 1; i < op1.Length; i++) - { - acc = reduceOp(acc, op1[i]); - } - - return acc; - } - - public static double AddAcross(double[] op1) => Reduce(Add, op1); - - public static double MaxAcross(double[] op1) => Reduce(Max, op1); - - public static double MinAcross(double[] op1) => Reduce(Min, op1); - - private static double Reduce(Func reduceOp, double[] op1) - { - double acc = op1[0]; - - for (int i = 1; i < op1.Length; i++) - { - acc = reduceOp(acc, op1[i]); - } - - return acc; - } - - public static float MaxNumberAcross(float[] op1) => Reduce(MaxNumber, op1); - - public static float MinNumberAcross(float[] op1) => Reduce(MinNumber, op1); - - private struct poly128_t - { - public ulong lo; - public ulong hi; - - public static poly128_t operator ^(poly128_t op1, poly128_t op2) - { - op1.lo ^= op2.lo; - op1.hi ^= op2.hi; - - return op1; - } - - public static poly128_t operator <<(poly128_t val, int shiftAmount) - { - for (int i = 0; i < shiftAmount; i++) - { - val.hi <<= 1; - - if ((val.lo & 0x8000000000000000U) != 0) - { - val.hi |= 1; - } - - val.lo <<= 1; - } - - return val; - } - - public static implicit operator poly128_t(ulong lo) - { - poly128_t result = new poly128_t(); - result.lo = lo; - return result; - } - - public static explicit operator poly128_t(long lo) - { - poly128_t result = new poly128_t(); - result.lo = (ulong)lo; - return result; - } - } - - private static ushort PolynomialMult(byte op1, byte op2) - { - ushort result = default(ushort); - ushort extendedOp2 = (ushort)op2; - - for (int i = 0; i < 8 * sizeof(byte); i++) - { - if ((op1 & ((byte)1 << i)) != 0) - { - result = (ushort)(result ^ (extendedOp2 << i)); - } - } - - return result; - } - - private static short PolynomialMult(sbyte op1, sbyte op2) - { - short result = default(short); - short extendedOp2 = (short)op2; - - for (int i = 0; i < 8 * sizeof(sbyte); i++) - { - if ((op1 & ((sbyte)1 << i)) != 0) - { - result = (short)(result ^ (extendedOp2 << i)); - } - } - - return result; - } - - private static poly128_t PolynomialMult(ulong op1, ulong op2) - { - poly128_t result = default(poly128_t); - poly128_t extendedOp2 = (poly128_t)op2; - - for (int i = 0; i < 8 * sizeof(ulong); i++) - { - if ((op1 & ((ulong)1 << i)) != 0) - { - result = (poly128_t)(result ^ (extendedOp2 << i)); - } - } - - return result; - } - - private static poly128_t PolynomialMult(long op1, long op2) - { - poly128_t result = default(poly128_t); - poly128_t extendedOp2 = (poly128_t)op2; - - for (int i = 0; i < 8 * sizeof(long); i++) - { - if ((op1 & ((long)1 << i)) != 0) - { - result = (poly128_t)(result ^ (extendedOp2 << i)); - } - } - - return result; - } - - public static byte PolynomialMultiply(byte op1, byte op2) => (byte)PolynomialMult(op1, op2); - - public static ushort PolynomialMultiplyWidening(byte op1, byte op2) => PolynomialMult(op1, op2); - - public static ushort PolynomialMultiplyWideningUpper(byte[] op1, byte[] op2, int i) => PolynomialMultiplyWidening(op1[i + op1.Length / 2], op2[i + op2.Length / 2]); - - public static sbyte PolynomialMultiply(sbyte op1, sbyte op2) => (sbyte)PolynomialMult(op1, op2); - - public static short PolynomialMultiplyWidening(sbyte op1, sbyte op2) => PolynomialMult(op1, op2); - - public static short PolynomialMultiplyWideningUpper(sbyte[] op1, sbyte[] op2, int i) => PolynomialMultiplyWidening(op1[i + op1.Length / 2], op2[i + op2.Length / 2]); - - public static ulong PolynomialMultiplyWideningLo64(ulong op1, ulong op2) => PolynomialMult(op1, op2).lo; - - public static long PolynomialMultiplyWideningLo64(long op1, long op2) => (long)PolynomialMult(op1, op2).lo; - - public static ulong PolynomialMultiplyWideningHi64(ulong op1, ulong op2) => PolynomialMult(op1, op2).hi; - - public static long PolynomialMultiplyWideningHi64(long op1, long op2) => (long)PolynomialMult(op1, op2).hi; - - public static sbyte ExtractVector(sbyte[] op1, sbyte[] op2, int op3, int i) => (op3 + i < op1.Length) ? op1[op3 + i] : op2[op3 + i - op1.Length]; - - public static sbyte Insert(sbyte[] op1, int op2, sbyte op3, int i) => (op2 != i) ? op1[i] : op3; - - public static byte ExtractVector(byte[] op1, byte[] op2, int op3, int i) => (op3 + i < op1.Length) ? op1[op3 + i] : op2[op3 + i - op1.Length]; - - public static byte Insert(byte[] op1, int op2, byte op3, int i) => (op2 != i) ? op1[i] : op3; - - public static short ExtractVector(short[] op1, short[] op2, int op3, int i) => (op3 + i < op1.Length) ? op1[op3 + i] : op2[op3 + i - op1.Length]; - - public static short Insert(short[] op1, int op2, short op3, int i) => (op2 != i) ? op1[i] : op3; - - public static ushort ExtractVector(ushort[] op1, ushort[] op2, int op3, int i) => (op3 + i < op1.Length) ? op1[op3 + i] : op2[op3 + i - op1.Length]; - - public static ushort Insert(ushort[] op1, int op2, ushort op3, int i) => (op2 != i) ? op1[i] : op3; - - public static int ExtractVector(int[] op1, int[] op2, int op3, int i) => (op3 + i < op1.Length) ? op1[op3 + i] : op2[op3 + i - op1.Length]; - - public static int Insert(int[] op1, int op2, int op3, int i) => (op2 != i) ? op1[i] : op3; - - public static uint ExtractVector(uint[] op1, uint[] op2, int op3, int i) => (op3 + i < op1.Length) ? op1[op3 + i] : op2[op3 + i - op1.Length]; - - public static uint Insert(uint[] op1, int op2, uint op3, int i) => (op2 != i) ? op1[i] : op3; - - public static long ExtractVector(long[] op1, long[] op2, int op3, int i) => (op3 + i < op1.Length) ? op1[op3 + i] : op2[op3 + i - op1.Length]; - - public static long Insert(long[] op1, int op2, long op3, int i) => (op2 != i) ? op1[i] : op3; - - public static ulong ExtractVector(ulong[] op1, ulong[] op2, int op3, int i) => (op3 + i < op1.Length) ? op1[op3 + i] : op2[op3 + i - op1.Length]; - - public static ulong Insert(ulong[] op1, int op2, ulong op3, int i) => (op2 != i) ? op1[i] : op3; - - public static float ExtractVector(float[] op1, float[] op2, int op3, int i) => (op3 + i < op1.Length) ? op1[op3 + i] : op2[op3 + i - op1.Length]; - - public static float Insert(float[] op1, int op2, float op3, int i) => (op2 != i) ? op1[i] : op3; - - public static double ExtractVector(double[] op1, double[] op2, int op3, int i) => (op3 + i < op1.Length) ? op1[op3 + i] : op2[op3 + i - op1.Length]; - - public static double Insert(double[] op1, int op2, double op3, int i) => (op2 != i) ? op1[i] : op3; - - public static sbyte TableVectorExtension(int i, sbyte[] defaultValues, sbyte[] indices, params sbyte[][] table) - { - sbyte[] fullTable = table.SelectMany(x => x).ToArray(); - int index = indices[i]; - - if (index < 0 || index >= fullTable.Length) - return defaultValues[i]; - - return fullTable[index]; - } - - public static sbyte TableVectorLookup(int i, sbyte[] indices, params sbyte[][] table) - { - sbyte[] zeros = new sbyte[indices.Length]; - Array.Fill(zeros, 0, 0, indices.Length); - - return TableVectorExtension(i, zeros, indices, table); - } - - public static byte Clamp(int i, sbyte value, bool inclusive) - { - sbyte max = (sbyte)((i * 8) - (inclusive ? 0 : 1)); - sbyte min = ( sbyte)(inclusive ? 1 : 0); - return (byte)Math.Max (min, Math.Min(value % max, max)); - } - public static byte TableVectorExtension(int i, byte[] defaultValues, byte[] indices, params byte[][] table) - { - byte[] fullTable = table.SelectMany(x => x).ToArray(); - int index = indices[i]; - - if (index < 0 || index >= fullTable.Length) - return defaultValues[i]; - - return fullTable[index]; - } - - public static byte TableVectorLookup(int i, byte[] indices, params byte[][] table) - { - byte[] zeros = new byte[indices.Length]; - Array.Fill(zeros, 0, 0, indices.Length); - - return TableVectorExtension(i, zeros, indices, table); - } - - public static byte Clamp(int i, byte value, bool inclusive) - { - byte max = (byte)((i * 8) - (inclusive ? 0 : 1)); - byte min = ( byte)(inclusive ? 1 : 0); - return (byte)Math.Max (min, Math.Min(value % max, max)); - } - public static byte ShiftRightAndInsert(byte left, byte right, byte shift) - { - byte mask = (byte)~(byte.MaxValue >> shift); - byte value = (byte)(right >> shift); - byte newval = (byte)(((byte)left & mask) | value); - return newval; - } - - public static byte ShiftLeftLogicalAndInsert(byte left, byte right, byte shift) - { - byte mask = (byte)~(byte.MaxValue << shift); - byte value = (byte)(right << shift); - byte newval = (byte)(((byte)left & mask) | value); - return newval; - } - public static short ShiftRightAndInsert(short left, short right, byte shift) - { - ushort mask = (ushort)~(ushort.MaxValue >> shift); - ushort value = (ushort)(right >> shift); - short newval = (short)(((ushort)left & mask) | value); - return newval; - } - - public static short ShiftLeftLogicalAndInsert(short left, short right, byte shift) - { - ushort mask = (ushort)~(ushort.MaxValue << shift); - ushort value = (ushort)(right << shift); - short newval = (short)(((ushort)left & mask) | value); - return newval; - } - public static int ShiftRightAndInsert(int left, int right, byte shift) - { - uint mask = (uint)~(uint.MaxValue >> shift); - uint value = (uint)(right >> shift); - int newval = (int)(((uint)left & mask) | value); - return newval; - } - - public static int ShiftLeftLogicalAndInsert(int left, int right, byte shift) - { - uint mask = (uint)~(uint.MaxValue << shift); - uint value = (uint)(right << shift); - int newval = (int)(((uint)left & mask) | value); - return newval; - } - public static long ShiftRightAndInsert(long left, long right, byte shift) - { - ulong mask = (ulong)~(ulong.MaxValue >> shift); - ulong value = (ulong)(right >> shift); - long newval = (long)(((ulong)left & mask) | value); - return newval; - } - - public static long ShiftLeftLogicalAndInsert(long left, long right, byte shift) - { - ulong mask = (ulong)~(ulong.MaxValue << shift); - ulong value = (ulong)(right << shift); - long newval = (long)(((ulong)left & mask) | value); - return newval; - } - public static sbyte ShiftRightAndInsert(sbyte left, sbyte right, byte shift) - { - byte mask = (byte)~(byte.MaxValue >> shift); - byte value = (byte)(right >> shift); - sbyte newval = (sbyte)(((byte)left & mask) | value); - return newval; - } - - public static sbyte ShiftLeftLogicalAndInsert(sbyte left, sbyte right, byte shift) - { - byte mask = (byte)~(byte.MaxValue << shift); - byte value = (byte)(right << shift); - sbyte newval = (sbyte)(((byte)left & mask) | value); - return newval; - } - public static ushort ShiftRightAndInsert(ushort left, ushort right, byte shift) - { - ushort mask = (ushort)~(ushort.MaxValue >> shift); - ushort value = (ushort)(right >> shift); - ushort newval = (ushort)(((ushort)left & mask) | value); - return newval; - } - - public static ushort ShiftLeftLogicalAndInsert(ushort left, ushort right, byte shift) - { - ushort mask = (ushort)~(ushort.MaxValue << shift); - ushort value = (ushort)(right << shift); - ushort newval = (ushort)(((ushort)left & mask) | value); - return newval; - } - public static uint ShiftRightAndInsert(uint left, uint right, byte shift) - { - uint mask = (uint)~(uint.MaxValue >> shift); - uint value = (uint)(right >> shift); - uint newval = (uint)(((uint)left & mask) | value); - return newval; - } - - public static uint ShiftLeftLogicalAndInsert(uint left, uint right, byte shift) - { - uint mask = (uint)~(uint.MaxValue << shift); - uint value = (uint)(right << shift); - uint newval = (uint)(((uint)left & mask) | value); - return newval; - } - public static ulong ShiftRightAndInsert(ulong left, ulong right, byte shift) - { - ulong mask = (ulong)~(ulong.MaxValue >> shift); - ulong value = (ulong)(right >> shift); - ulong newval = (ulong)(((ulong)left & mask) | value); - return newval; - } - - public static ulong ShiftLeftLogicalAndInsert(ulong left, ulong right, byte shift) - { - ulong mask = (ulong)~(ulong.MaxValue << shift); - ulong value = (ulong)(right << shift); - ulong newval = (ulong)(((ulong)left & mask) | value); - return newval; - } - - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/LoadUnOpTest.template b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/LoadUnOpTest.template deleted file mode 100644 index 1aa12368c8fc..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/LoadUnOpTest.template +++ /dev/null @@ -1,203 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void {TestName}() - { - var test = new LoadUnaryOpTest__{TestName}(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class LoadUnaryOpTest__{TestName} - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable({Op1BaseType}[] inArray1, {RetBaseType}[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf<{Op1BaseType}>(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf<{RetBaseType}>(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private static readonly int LargestVectorSize = {LargestVectorSize}; - - private static readonly int Op1ElementCount = Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>() / sizeof({Op1BaseType}); - private static readonly int RetElementCount = Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>() / sizeof({RetBaseType}); - - private static {Op1BaseType}[] _data = new {Op1BaseType}[Op1ElementCount]; - - private DataTable _dataTable; - - public LoadUnaryOpTest__{TestName}() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = {NextValueOp1}; } - _dataTable = new DataTable(_data, new {RetBaseType}[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => {Isa}.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = {Isa}.{Method}( - ({Op1BaseType}*)(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1BaseType}*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof({Op1BaseType}*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, ({RetVectorType}<{RetBaseType}>)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult({Op1VectorType}<{Op1BaseType}> firstOp, void* result, [CallerMemberName] string method = "") - { - {Op1BaseType}[] inArray = new {Op1BaseType}[Op1ElementCount]; - {RetBaseType}[] outArray = new {RetBaseType}[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - {Op1BaseType}[] inArray = new {Op1BaseType}[Op1ElementCount]; - {RetBaseType}[] outArray = new {RetBaseType}[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult({Op1BaseType}[] firstOp, {RetBaseType}[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if ({ValidateIterResult}) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/Program.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/Program.cs deleted file mode 100644 index e03d0a4b0b3e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/Program.cs +++ /dev/null @@ -1,100 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private const int PASS = 100; - private const int FAIL = 0; - - private static readonly IDictionary TestList; - - public static int Main(string[] args) - { - var isPassing = true; - - PrintSupportedIsa(); - - foreach (string testToRun in GetTestsToRun(args)) - { - TestLibrary.TestFramework.BeginTestCase(testToRun); - - try - { - TestList[testToRun].Invoke(); - } - catch (Exception e) - { - TestLibrary.TestFramework.LogError(e.GetType().ToString(), e.Message); - TestLibrary.TestFramework.LogVerbose(e.StackTrace); - isPassing = false; - } - - TestLibrary.TestFramework.EndTestCase(); - } - - return isPassing ? PASS : FAIL; - } - - private static ICollection GetTestsToRun(string[] args) - { - var testsToRun = new HashSet(); - - for (var i = 0; i < args.Length; i++) - { - var testName = args[i]; - - if (testName.Equals("all", StringComparison.OrdinalIgnoreCase)) - { - break; - } - - if (!TestList.Keys.Contains(testName, StringComparer.OrdinalIgnoreCase)) - { - PrintUsage(); - } - - testsToRun.Add(testName); - } - - return (testsToRun.Count == 0) ? TestList.Keys : testsToRun; - } - - private static void PrintSupportedIsa() - { - TestLibrary.TestFramework.LogInformation("Supported ISAs:"); - TestLibrary.TestFramework.LogInformation($" AdvSimd: {AdvSimd.IsSupported}"); - TestLibrary.TestFramework.LogInformation($" Aes: {Aes.IsSupported}"); - TestLibrary.TestFramework.LogInformation($" ArmBase: {ArmBase.IsSupported}"); - TestLibrary.TestFramework.LogInformation($" Crc32: {Crc32.IsSupported}"); - TestLibrary.TestFramework.LogInformation($" Sha1: {Sha1.IsSupported}"); - TestLibrary.TestFramework.LogInformation($" Sha256: {Sha256.IsSupported}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - } - - private static void PrintUsage() - { - TestLibrary.TestFramework.LogInformation($@"Usage: -{Environment.GetCommandLineArgs()[0]} [testName] - - [testName]: The name of the function to test. - Defaults to 'all'. - Multiple can be specified. - - Available Test Names:"); - foreach (string testName in TestList.Keys) - { - TestLibrary.TestFramework.LogInformation($" {testName}"); - } - - Environment.Exit(FAIL); - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/ScalarBinOpTest.template b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/ScalarBinOpTest.template deleted file mode 100644 index 5a80db1648e5..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/ScalarBinOpTest.template +++ /dev/null @@ -1,242 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void {TestName}() - { - var test = new ScalarBinaryOpTest__{TestName}(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.ReadUnaligned - test.RunBasicScenario_UnsafeRead(); - - // Validates calling via reflection works, using Unsafe.ReadUnaligned - test.RunReflectionScenario_UnsafeRead(); - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.ReadUnaligned - test.RunLclVarScenario_UnsafeRead(); - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ScalarBinaryOpTest__{TestName} - { - private struct TestStruct - { - public {Op1BaseType} _fld1; - public {Op2BaseType} _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - testStruct._fld1 = {NextValueOp1}; - testStruct._fld2 = {NextValueOp2}; - - return testStruct; - } - - public void RunStructFldScenario(ScalarBinaryOpTest__{TestName} testClass) - { - var result = {Isa}.{Method}(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - } - - private static {Op1BaseType} _data1; - private static {Op2BaseType} _data2; - - private static {Op1BaseType} _clsVar1; - private static {Op2BaseType} _clsVar2; - - private {Op1BaseType} _fld1; - private {Op2BaseType} _fld2; - - static ScalarBinaryOpTest__{TestName}() - { - _clsVar1 = {NextValueOp1}; - _clsVar2 = {NextValueOp2}; - } - - public ScalarBinaryOpTest__{TestName}() - { - Succeeded = true; - - _fld1 = {NextValueOp1}; - _fld2 = {NextValueOp2}; - - _data1 = {NextValueOp1}; - _data2 = {NextValueOp2}; - } - - public bool IsSupported => {Isa}.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = {Isa}.{Method}( - Unsafe.ReadUnaligned<{Op1BaseType}>(ref Unsafe.As<{Op1BaseType}, byte>(ref _data1)), - Unsafe.ReadUnaligned<{Op2BaseType}>(ref Unsafe.As<{Op2BaseType}, byte>(ref _data2)) - ); - - ValidateResult(_data1, _data2, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1BaseType}), typeof({Op2BaseType}) }) - .Invoke(null, new object[] { - Unsafe.ReadUnaligned<{Op1BaseType}>(ref Unsafe.As<{Op1BaseType}, byte>(ref _data1)), - Unsafe.ReadUnaligned<{Op2BaseType}>(ref Unsafe.As<{Op2BaseType}, byte>(ref _data2)) - }); - - ValidateResult(_data1, _data2, ({RetBaseType})result); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = {Isa}.{Method}( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var data1 = Unsafe.ReadUnaligned<{Op1BaseType}>(ref Unsafe.As<{Op1BaseType}, byte>(ref _data1)); - var data2 = Unsafe.ReadUnaligned<{Op2BaseType}>(ref Unsafe.As<{Op2BaseType}, byte>(ref _data2)); - var result = {Isa}.{Method}(data1, data2); - - ValidateResult(data1, data2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ScalarBinaryOpTest__{TestName}(); - var result = {Isa}.{Method}(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = {Isa}.{Method}(_fld1, _fld2); - ValidateResult(_fld1, _fld2, result); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = {Isa}.{Method}(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult({Op1BaseType} left, {Op2BaseType} right, {RetBaseType} result, [CallerMemberName] string method = "") - { - var isUnexpectedResult = false; - - {ValidateResult} - - if (isUnexpectedResult) - { - TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1BaseType}, {Op2BaseType}): {Method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: {left}"); - TestLibrary.TestFramework.LogInformation($" right: {right}"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/ScalarUnOpTest.template b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/ScalarUnOpTest.template deleted file mode 100644 index 5f78b306cbc7..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/ScalarUnOpTest.template +++ /dev/null @@ -1,228 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void {TestName}() - { - var test = new ScalarUnaryOpTest__{TestName}(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.ReadUnaligned - test.RunBasicScenario_UnsafeRead(); - - // Validates calling via reflection works, using Unsafe.ReadUnaligned - test.RunReflectionScenario_UnsafeRead(); - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.ReadUnaligned - test.RunLclVarScenario_UnsafeRead(); - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ScalarUnaryOpTest__{TestName} - { - private struct TestStruct - { - public {Op1BaseType} _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - testStruct._fld = {NextValueOp1}; - return testStruct; - } - - public void RunStructFldScenario(ScalarUnaryOpTest__{TestName} testClass) - { - var result = {Isa}.{Method}(_fld); - testClass.ValidateResult(_fld, result); - } - } - - private static {Op1BaseType} _data; - - private static {Op1BaseType} _clsVar; - - private {Op1BaseType} _fld; - - static ScalarUnaryOpTest__{TestName}() - { - _clsVar = {NextValueOp1}; - } - - public ScalarUnaryOpTest__{TestName}() - { - Succeeded = true; - - - _fld = {NextValueOp1}; - _data = {NextValueOp1}; - } - - public bool IsSupported => {Isa}.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = {Isa}.{Method}( - Unsafe.ReadUnaligned<{Op1BaseType}>(ref Unsafe.As<{Op1BaseType}, byte>(ref _data)) - ); - - ValidateResult(_data, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1BaseType}) }) - .Invoke(null, new object[] { - Unsafe.ReadUnaligned<{Op1BaseType}>(ref Unsafe.As<{Op1BaseType}, byte>(ref _data)) - }); - - ValidateResult(_data, ({RetBaseType})result); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = {Isa}.{Method}( - _clsVar - ); - - ValidateResult(_clsVar, result); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var data = Unsafe.ReadUnaligned<{Op1BaseType}>(ref Unsafe.As<{Op1BaseType}, byte>(ref _data)); - var result = {Isa}.{Method}(data); - - ValidateResult(data, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ScalarUnaryOpTest__{TestName}(); - var result = {Isa}.{Method}(test._fld); - - ValidateResult(test._fld, result); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = {Isa}.{Method}(_fld); - ValidateResult(_fld, result); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = {Isa}.{Method}(test._fld); - - ValidateResult(test._fld, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult({Op1BaseType} data, {RetBaseType} result, [CallerMemberName] string method = "") - { - var isUnexpectedResult = false; - - {ValidateResult} - - if (isUnexpectedResult) - { - TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1BaseType}): {Method} failed:"); - TestLibrary.TestFramework.LogInformation($" data: {data}"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/StoreUnOpTest.template b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/StoreUnOpTest.template deleted file mode 100644 index 4cc48ea034f0..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/StoreUnOpTest.template +++ /dev/null @@ -1,459 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void {TestName}() - { - var test = new StoreUnaryOpTest__{TestName}(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class StoreUnaryOpTest__{TestName} - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable({Op1BaseType}[] inArray1, {RetBaseType}[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf<{Op1BaseType}>(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf<{RetBaseType}>(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public {Op1VectorType}<{Op1BaseType}> _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref testStruct._fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - - return testStruct; - } - - public void RunStructFldScenario(StoreUnaryOpTest__{TestName} testClass) - { - {Isa}.{Method}(({RetBaseType}*)testClass._dataTable.outArrayPtr, _fld1); - - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(StoreUnaryOpTest__{TestName} testClass) - { - fixed ({Op1VectorType}<{Op1BaseType}>* pFld1 = &_fld1) - { - {Isa}.{Method}(({RetBaseType}*)testClass._dataTable.outArrayPtr, {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pFld1))); - - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = {LargestVectorSize}; - - private static readonly int Op1ElementCount = Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>() / sizeof({Op1BaseType}); - private static readonly int RetElementCount = Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>() / sizeof({RetBaseType}); - - private static {Op1BaseType}[] _data1 = new {Op1BaseType}[Op1ElementCount]; - - private static {Op1VectorType}<{Op1BaseType}> _clsVar1; - - private {Op1VectorType}<{Op1BaseType}> _fld1; - - private DataTable _dataTable; - - static StoreUnaryOpTest__{TestName}() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _clsVar1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - } - - public StoreUnaryOpTest__{TestName}() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - _dataTable = new DataTable(_data1, new {RetBaseType}[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => {Isa}.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - {Isa}.{Method}(({RetBaseType}*)_dataTable.outArrayPtr, Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr)); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - {Isa}.{Method}(({RetBaseType}*)_dataTable.outArrayPtr, {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr))); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({RetBaseType}*), typeof({Op1VectorType}<{Op1BaseType}>) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof({RetBaseType}*)), - Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr) }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({RetBaseType}*), typeof({Op1VectorType}<{Op1BaseType}>) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof({RetBaseType}*)), - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - {Isa}.{Method}(({RetBaseType}*)_dataTable.outArrayPtr, _clsVar1); - - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed ({Op1VectorType}<{Op1BaseType}>* pClsVar1 = &_clsVar1) - { - {Isa}.{Method}(({Op1BaseType}*)_dataTable.outArrayPtr, {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pClsVar1))); - - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr); - {Isa}.{Method}(({RetBaseType}*)_dataTable.outArrayPtr, op1); - - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)); - {Isa}.{Method}(({RetBaseType}*)_dataTable.outArrayPtr, op1); - - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new StoreUnaryOpTest__{TestName}(); - {Isa}.{Method}(({RetBaseType}*)_dataTable.outArrayPtr, test._fld1); - - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new StoreUnaryOpTest__{TestName}(); - - fixed ({Op1VectorType}<{Op1BaseType}>* pFld1 = &test._fld1) - { - {Isa}.{Method}(({RetBaseType}*)_dataTable.outArrayPtr, {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pFld1))); - - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - {Isa}.{Method}(({RetBaseType}*)_dataTable.outArrayPtr, _fld1); - - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed ({Op1VectorType}<{Op1BaseType}>* pFld1 = &_fld1) - { - {Isa}.{Method}(({RetBaseType}*)_dataTable.outArrayPtr, {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pFld1))); - - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - {Isa}.{Method}(({RetBaseType}*)_dataTable.outArrayPtr, test._fld1); - - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - {Isa}.{Method}(({RetBaseType}*)_dataTable.outArrayPtr, {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(&test._fld1))); - - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult({Op1VectorType}<{Op1BaseType}> op1, void* result, [CallerMemberName] string method = "") - { - {Op1BaseType}[] inArray1 = new {Op1BaseType}[Op1ElementCount]; - {RetBaseType}[] outArray = new {RetBaseType}[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - {Op1BaseType}[] inArray1 = new {Op1BaseType}[Op1ElementCount]; - {RetBaseType}[] outArray = new {RetBaseType}[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult({Op1BaseType}[] firstOp, {RetBaseType}[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < RetElementCount; i++) - { - if ({ValidateIterResult}) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/_BinaryOpTestTemplate.template b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/_BinaryOpTestTemplate.template deleted file mode 100644 index 761e27aaedc5..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/_BinaryOpTestTemplate.template +++ /dev/null @@ -1,523 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void {TestName}() - { - var test = new {TemplateName}BinaryOpTest__{TestName}(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class {TemplateName}BinaryOpTest__{TestName} - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable({Op1BaseType}[] inArray1, {Op2BaseType}[] inArray2, {RetBaseType}[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf<{Op1BaseType}>(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf<{Op2BaseType}>(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf<{RetBaseType}>(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As<{Op2BaseType}, byte>(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public {Op1VectorType}<{Op1BaseType}> _fld1; - public {Op2VectorType}<{Op2BaseType}> _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref testStruct._fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = {NextValueOp2}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref testStruct._fld2), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); - - return testStruct; - } - - public void RunStructFldScenario({TemplateName}BinaryOpTest__{TestName} testClass) - { - var result = {Isa}.{Method}(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load({TemplateName}BinaryOpTest__{TestName} testClass) - { - fixed ({Op1VectorType}<{Op1BaseType}>* pFld1 = &_fld1) - fixed ({Op2VectorType}<{Op2BaseType}>* pFld2 = &_fld2) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pFld1)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = {LargestVectorSize}; - - private static readonly int Op1ElementCount = Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>() / sizeof({Op1BaseType}); - private static readonly int Op2ElementCount = Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>() / sizeof({Op2BaseType}); - private static readonly int RetElementCount = Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>() / sizeof({RetBaseType}); - - private static {Op1BaseType}[] _data1 = new {Op1BaseType}[Op1ElementCount]; - private static {Op2BaseType}[] _data2 = new {Op2BaseType}[Op2ElementCount]; - - private static {Op1VectorType}<{Op1BaseType}> _clsVar1; - private static {Op2VectorType}<{Op2BaseType}> _clsVar2; - - private {Op1VectorType}<{Op1BaseType}> _fld1; - private {Op2VectorType}<{Op2BaseType}> _fld2; - - private DataTable _dataTable; - - static {TemplateName}BinaryOpTest__{TestName}() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _clsVar1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = {NextValueOp2}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref _clsVar2), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); - } - - public {TemplateName}BinaryOpTest__{TestName}() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = {NextValueOp2}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref _fld2), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = {NextValueOp2}; } - _dataTable = new DataTable(_data1, _data2, new {RetBaseType}[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => {Isa}.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = {Isa}.{Method}( - Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr), - Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>), typeof({Op2VectorType}<{Op2BaseType}>) }) - .Invoke(null, new object[] { - Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr), - Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, ({RetVectorType}<{RetBaseType}>)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>), typeof({Op2VectorType}<{Op2BaseType}>) }) - .Invoke(null, new object[] { - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, ({RetVectorType}<{RetBaseType}>)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = {Isa}.{Method}( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed ({Op1VectorType}<{Op1BaseType}>* pClsVar1 = &_clsVar1) - fixed ({Op2VectorType}<{Op2BaseType}>* pClsVar2 = &_clsVar2) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pClsVar1)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr); - var result = {Isa}.{Method}(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)); - var op2 = {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray2Ptr)); - var result = {Isa}.{Method}(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new {TemplateName}BinaryOpTest__{TestName}(); - var result = {Isa}.{Method}(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new {TemplateName}BinaryOpTest__{TestName}(); - - fixed ({Op1VectorType}<{Op1BaseType}>* pFld1 = &test._fld1) - fixed ({Op2VectorType}<{Op2BaseType}>* pFld2 = &test._fld2) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pFld1)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = {Isa}.{Method}(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed ({Op1VectorType}<{Op1BaseType}>* pFld1 = &_fld1) - fixed ({Op2VectorType}<{Op2BaseType}>* pFld2 = &_fld2) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pFld1)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = {Isa}.{Method}(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(&test._fld1)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult({Op1VectorType}<{Op1BaseType}> op1, {Op2VectorType}<{Op2BaseType}> op2, void* result, [CallerMemberName] string method = "") - { - {Op1BaseType}[] inArray1 = new {Op1BaseType}[Op1ElementCount]; - {Op2BaseType}[] inArray2 = new {Op2BaseType}[Op2ElementCount]; - {RetBaseType}[] outArray = new {RetBaseType}[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - {Op1BaseType}[] inArray1 = new {Op1BaseType}[Op1ElementCount]; - {Op2BaseType}[] inArray2 = new {Op2BaseType}[Op2ElementCount]; - {RetBaseType}[] outArray = new {RetBaseType}[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult({Op1BaseType}[] left, {Op2BaseType}[] right, {RetBaseType}[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - {TemplateValidationLogic} - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>, {Op2VectorType}<{Op2BaseType}>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/_TernaryOpTestTemplate.template b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/_TernaryOpTestTemplate.template deleted file mode 100644 index b4cf45dccee6..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/_TernaryOpTestTemplate.template +++ /dev/null @@ -1,564 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void {TestName}() - { - var test = new {TemplateName}TernaryOpTest__{TestName}(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class {TemplateName}TernaryOpTest__{TestName} - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable({Op1BaseType}[] inArray1, {Op2BaseType}[] inArray2, {Op3BaseType}[] inArray3, {RetBaseType}[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf<{Op1BaseType}>(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf<{Op2BaseType}>(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf<{Op3BaseType}>(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf<{RetBaseType}>(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As<{Op2BaseType}, byte>(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As<{Op3BaseType}, byte>(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public {Op1VectorType}<{Op1BaseType}> _fld1; - public {Op2VectorType}<{Op2BaseType}> _fld2; - public {Op3VectorType}<{Op3BaseType}> _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref testStruct._fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = {NextValueOp2}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref testStruct._fld2), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = {NextValueOp3}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op3VectorType}<{Op3BaseType}>, byte>(ref testStruct._fld3), ref Unsafe.As<{Op3BaseType}, byte>(ref _data3[0]), (uint)Unsafe.SizeOf<{Op3VectorType}<{Op3BaseType}>>()); - - return testStruct; - } - - public void RunStructFldScenario({TemplateName}TernaryOpTest__{TestName} testClass) - { - var result = {Isa}.{Method}(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load({TemplateName}TernaryOpTest__{TestName} testClass) - { - fixed ({Op1VectorType}<{Op1BaseType}>* pFld1 = &_fld1) - fixed ({Op2VectorType}<{Op2BaseType}>* pFld2 = &_fld2) - fixed ({Op3VectorType}<{Op3BaseType}>* pFld3 = &_fld3) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pFld1)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(pFld2)), - {LoadIsa}.Load{Op3VectorType}(({Op3BaseType}*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = {LargestVectorSize}; - - private static readonly int Op1ElementCount = Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>() / sizeof({Op1BaseType}); - private static readonly int Op2ElementCount = Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>() / sizeof({Op2BaseType}); - private static readonly int Op3ElementCount = Unsafe.SizeOf<{Op3VectorType}<{Op3BaseType}>>() / sizeof({Op3BaseType}); - private static readonly int RetElementCount = Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>() / sizeof({RetBaseType}); - - private static {Op1BaseType}[] _data1 = new {Op1BaseType}[Op1ElementCount]; - private static {Op2BaseType}[] _data2 = new {Op2BaseType}[Op2ElementCount]; - private static {Op3BaseType}[] _data3 = new {Op3BaseType}[Op3ElementCount]; - - private static {Op1VectorType}<{Op1BaseType}> _clsVar1; - private static {Op2VectorType}<{Op2BaseType}> _clsVar2; - private static {Op3VectorType}<{Op3BaseType}> _clsVar3; - - private {Op1VectorType}<{Op1BaseType}> _fld1; - private {Op2VectorType}<{Op2BaseType}> _fld2; - private {Op3VectorType}<{Op3BaseType}> _fld3; - - private DataTable _dataTable; - - static {TemplateName}TernaryOpTest__{TestName}() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _clsVar1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = {NextValueOp2}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref _clsVar2), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = {NextValueOp3}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op3VectorType}<{Op3BaseType}>, byte>(ref _clsVar3), ref Unsafe.As<{Op3BaseType}, byte>(ref _data3[0]), (uint)Unsafe.SizeOf<{Op3VectorType}<{Op3BaseType}>>()); - } - - public {TemplateName}TernaryOpTest__{TestName}() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = {NextValueOp2}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref _fld2), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = {NextValueOp3}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op3VectorType}<{Op3BaseType}>, byte>(ref _fld3), ref Unsafe.As<{Op3BaseType}, byte>(ref _data3[0]), (uint)Unsafe.SizeOf<{Op3VectorType}<{Op3BaseType}>>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = {NextValueOp2}; } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = {NextValueOp3}; } - _dataTable = new DataTable(_data1, _data2, _data3, new {RetBaseType}[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => {Isa}.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = {Isa}.{Method}( - Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr), - Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr), - Unsafe.Read<{Op3VectorType}<{Op3BaseType}>>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray2Ptr)), - {LoadIsa}.Load{Op3VectorType}(({Op3BaseType}*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>), typeof({Op2VectorType}<{Op2BaseType}>), typeof({Op3VectorType}<{Op3BaseType}>) }) - .Invoke(null, new object[] { - Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr), - Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr), - Unsafe.Read<{Op3VectorType}<{Op3BaseType}>>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, ({RetVectorType}<{RetBaseType}>)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>), typeof({Op2VectorType}<{Op2BaseType}>), typeof({Op3VectorType}<{Op3BaseType}>) }) - .Invoke(null, new object[] { - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray2Ptr)), - {LoadIsa}.Load{Op3VectorType}(({Op3BaseType}*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, ({RetVectorType}<{RetBaseType}>)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = {Isa}.{Method}( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed ({Op1VectorType}<{Op1BaseType}>* pClsVar1 = &_clsVar1) - fixed ({Op2VectorType}<{Op2BaseType}>* pClsVar2 = &_clsVar2) - fixed ({Op3VectorType}<{Op3BaseType}>* pClsVar3 = &_clsVar3) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pClsVar1)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(pClsVar2)), - {LoadIsa}.Load{Op3VectorType}(({Op3BaseType}*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read<{Op3VectorType}<{Op3BaseType}>>(_dataTable.inArray3Ptr); - var result = {Isa}.{Method}(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)); - var op2 = {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray2Ptr)); - var op3 = {LoadIsa}.Load{Op3VectorType}(({Op3BaseType}*)(_dataTable.inArray3Ptr)); - var result = {Isa}.{Method}(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new {TemplateName}TernaryOpTest__{TestName}(); - var result = {Isa}.{Method}(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new {TemplateName}TernaryOpTest__{TestName}(); - - fixed ({Op1VectorType}<{Op1BaseType}>* pFld1 = &test._fld1) - fixed ({Op2VectorType}<{Op2BaseType}>* pFld2 = &test._fld2) - fixed ({Op3VectorType}<{Op3BaseType}>* pFld3 = &test._fld3) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pFld1)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(pFld2)), - {LoadIsa}.Load{Op3VectorType}(({Op3BaseType}*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = {Isa}.{Method}(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed ({Op1VectorType}<{Op1BaseType}>* pFld1 = &_fld1) - fixed ({Op2VectorType}<{Op2BaseType}>* pFld2 = &_fld2) - fixed ({Op3VectorType}<{Op3BaseType}>* pFld3 = &_fld3) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pFld1)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(pFld2)), - {LoadIsa}.Load{Op3VectorType}(({Op3BaseType}*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = {Isa}.{Method}(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(&test._fld1)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(&test._fld2)), - {LoadIsa}.Load{Op3VectorType}(({Op3BaseType}*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult({Op1VectorType}<{Op1BaseType}> op1, {Op2VectorType}<{Op2BaseType}> op2, {Op3VectorType}<{Op3BaseType}> op3, void* result, [CallerMemberName] string method = "") - { - {Op1BaseType}[] inArray1 = new {Op1BaseType}[Op1ElementCount]; - {Op2BaseType}[] inArray2 = new {Op2BaseType}[Op2ElementCount]; - {Op3BaseType}[] inArray3 = new {Op3BaseType}[Op3ElementCount]; - {RetBaseType}[] outArray = new {RetBaseType}[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As<{Op3BaseType}, byte>(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - {Op1BaseType}[] inArray1 = new {Op1BaseType}[Op1ElementCount]; - {Op2BaseType}[] inArray2 = new {Op2BaseType}[Op2ElementCount]; - {Op3BaseType}[] inArray3 = new {Op3BaseType}[Op3ElementCount]; - {RetBaseType}[] outArray = new {RetBaseType}[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op3BaseType}, byte>(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf<{Op3VectorType}<{Op3BaseType}>>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult({Op1BaseType}[] firstOp, {Op2BaseType}[] secondOp, {Op3BaseType}[] thirdOp, {RetBaseType}[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - {TemplateValidationLogic} - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>, {Op2VectorType}<{Op2BaseType}>, {Op3VectorType}<{Op3BaseType}>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/_UnaryOpTestTemplate.template b/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/_UnaryOpTestTemplate.template deleted file mode 100644 index b885bab23184..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/Arm/Shared/_UnaryOpTestTemplate.template +++ /dev/null @@ -1,482 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; - -namespace JIT.HardwareIntrinsics.Arm -{ - public static partial class Program - { - private static void {TestName}() - { - var test = new {TemplateName}UnaryOpTest__{TestName}(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class {TemplateName}UnaryOpTest__{TestName} - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable({Op1BaseType}[] inArray1, {RetBaseType}[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf<{Op1BaseType}>(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf<{RetBaseType}>(); - if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public {Op1VectorType}<{Op1BaseType}> _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref testStruct._fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - - return testStruct; - } - - public void RunStructFldScenario({TemplateName}UnaryOpTest__{TestName} testClass) - { - var result = {Isa}.{Method}(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load({TemplateName}UnaryOpTest__{TestName} testClass) - { - fixed ({Op1VectorType}<{Op1BaseType}>* pFld1 = &_fld1) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = {LargestVectorSize}; - - private static readonly int Op1ElementCount = Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>() / sizeof({Op1BaseType}); - private static readonly int RetElementCount = Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>() / sizeof({RetBaseType}); - - private static {Op1BaseType}[] _data1 = new {Op1BaseType}[Op1ElementCount]; - - private static {Op1VectorType}<{Op1BaseType}> _clsVar1; - - private {Op1VectorType}<{Op1BaseType}> _fld1; - - private DataTable _dataTable; - - static {TemplateName}UnaryOpTest__{TestName}() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _clsVar1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - } - - public {TemplateName}UnaryOpTest__{TestName}() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - _dataTable = new DataTable(_data1, new {RetBaseType}[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => {Isa}.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = {Isa}.{Method}( - Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>) }) - .Invoke(null, new object[] { - Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, ({RetVectorType}<{RetBaseType}>)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>) }) - .Invoke(null, new object[] { - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, ({RetVectorType}<{RetBaseType}>)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = {Isa}.{Method}( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed ({Op1VectorType}<{Op1BaseType}>* pClsVar1 = &_clsVar1) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr); - var result = {Isa}.{Method}(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)); - var result = {Isa}.{Method}(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new {TemplateName}UnaryOpTest__{TestName}(); - var result = {Isa}.{Method}(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new {TemplateName}UnaryOpTest__{TestName}(); - - fixed ({Op1VectorType}<{Op1BaseType}>* pFld1 = &test._fld1) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = {Isa}.{Method}(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed ({Op1VectorType}<{Op1BaseType}>* pFld1 = &_fld1) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = {Isa}.{Method}(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult({Op1VectorType}<{Op1BaseType}> op1, void* result, [CallerMemberName] string method = "") - { - {Op1BaseType}[] inArray1 = new {Op1BaseType}[Op1ElementCount]; - {RetBaseType}[] outArray = new {RetBaseType}[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - {Op1BaseType}[] inArray1 = new {Op1BaseType}[Op1ElementCount]; - {RetBaseType}[] outArray = new {RetBaseType}[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult({Op1BaseType}[] firstOp, {RetBaseType}[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - {TemplateValidationLogic} - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Shared/GenerateTests.csx b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Shared/GenerateTests.csx deleted file mode 100644 index a2ba1d07e299..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Shared/GenerateTests.csx +++ /dev/null @@ -1,721 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; -using System.IO; - -// DIRECTIONS: -// This file isn't very robust and makes several assumptions -// You can execute it by calling "csi .\GenerateTests.csx" -// -// csi can be found under the \tools\net46\roslyn directory -// It must be run such from the directory that contains the csx script -// -// New tests can be generated from the template by adding an entry to the -// appropriate Inputs array below. -// -// You can support a new Isa by creating a new array and adding a new -// "ProcessInputs" call at the bottom of the script. - -private static readonly (string templateFileName, Dictionary templateData)[] Vector64Inputs = new [] -{ - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "Create", ["VectorType"] = "Vector64", ["BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != expectedValue" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "Create", ["VectorType"] = "Vector64", ["BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != expectedValue" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "Create", ["VectorType"] = "Vector64", ["BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != expectedValue" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "Create", ["VectorType"] = "Vector64", ["BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != expectedValue" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "Create", ["VectorType"] = "Vector64", ["BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != expectedValue" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "Create", ["VectorType"] = "Vector64", ["BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != expectedValue" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "Create", ["VectorType"] = "Vector64", ["BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != expectedValue" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "Create", ["VectorType"] = "Vector64", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != expectedValue" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "Create", ["VectorType"] = "Vector64", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != expectedValue" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "Create", ["VectorType"] = "Vector64", ["BaseType"] = "UInt64", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != expectedValue" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "CreateScalar", ["VectorType"] = "Vector64", ["BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != 0" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "CreateScalar", ["VectorType"] = "Vector64", ["BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != 0" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "CreateScalar", ["VectorType"] = "Vector64", ["BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != 0" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "CreateScalar", ["VectorType"] = "Vector64", ["BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != 0" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "CreateScalar", ["VectorType"] = "Vector64", ["BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != 0" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "CreateScalar", ["VectorType"] = "Vector64", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != 0" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "CreateScalar", ["VectorType"] = "Vector64", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != 0" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "CreateScalarUnsafe", ["VectorType"] = "Vector64", ["BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "false /* value is uninitialized */" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "CreateScalarUnsafe", ["VectorType"] = "Vector64", ["BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "false /* value is uninitialized */" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "CreateScalarUnsafe", ["VectorType"] = "Vector64", ["BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "false /* value is uninitialized */" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "CreateScalarUnsafe", ["VectorType"] = "Vector64", ["BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "false /* value is uninitialized */" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "CreateScalarUnsafe", ["VectorType"] = "Vector64", ["BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "false /* value is uninitialized */" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "CreateScalarUnsafe", ["VectorType"] = "Vector64", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "false /* value is uninitialized */" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "CreateScalarUnsafe", ["VectorType"] = "Vector64", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "false /* value is uninitialized */" }), - - ("VectorCreateElementTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "Create", ["VectorType"] = "Vector64", ["BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetByte()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorCreateElementTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "Create", ["VectorType"] = "Vector64", ["BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetInt16()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorCreateElementTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "Create", ["VectorType"] = "Vector64", ["BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetInt32()", ["ConsumeValues"] = "values[0], values[1]" }), - ("VectorCreateElementTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "Create", ["VectorType"] = "Vector64", ["BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetSByte()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorCreateElementTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "Create", ["VectorType"] = "Vector64", ["BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()", ["ConsumeValues"] = "values[0], values[1]" }), - ("VectorCreateElementTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "Create", ["VectorType"] = "Vector64", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetUInt16()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorCreateElementTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "Create", ["VectorType"] = "Vector64", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetUInt32()", ["ConsumeValues"] = "values[0], values[1]" }), -}; - -private static readonly (string templateFileName, Dictionary templateData)[] Vector64_1Inputs = new [] -{ - ("VectorZeroTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "Zero", ["VectorType"] = "Vector64", ["BaseType"] = "Byte", ["LargestVectorSize"] = "8" }), - ("VectorZeroTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "Zero", ["VectorType"] = "Vector64", ["BaseType"] = "Double", ["LargestVectorSize"] = "8" }), - ("VectorZeroTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "Zero", ["VectorType"] = "Vector64", ["BaseType"] = "Int16", ["LargestVectorSize"] = "8" }), - ("VectorZeroTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "Zero", ["VectorType"] = "Vector64", ["BaseType"] = "Int32", ["LargestVectorSize"] = "8" }), - ("VectorZeroTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "Zero", ["VectorType"] = "Vector64", ["BaseType"] = "Int64", ["LargestVectorSize"] = "8" }), - ("VectorZeroTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "Zero", ["VectorType"] = "Vector64", ["BaseType"] = "SByte", ["LargestVectorSize"] = "8" }), - ("VectorZeroTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "Zero", ["VectorType"] = "Vector64", ["BaseType"] = "Single", ["LargestVectorSize"] = "8" }), - ("VectorZeroTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "Zero", ["VectorType"] = "Vector64", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "8" }), - ("VectorZeroTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "Zero", ["VectorType"] = "Vector64", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "8" }), - ("VectorZeroTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "Zero", ["VectorType"] = "Vector64", ["BaseType"] = "UInt64", ["LargestVectorSize"] = "8" }), - - ("VectorAllBitsSetTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "AllBitsSet", ["VectorType"] = "Vector64", ["BaseType"] = "Byte", ["LargestVectorSize"] = "8" }), - ("VectorAllBitsSetTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "AllBitsSet", ["VectorType"] = "Vector64", ["BaseType"] = "Double", ["LargestVectorSize"] = "8" }), - ("VectorAllBitsSetTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "AllBitsSet", ["VectorType"] = "Vector64", ["BaseType"] = "Int16", ["LargestVectorSize"] = "8" }), - ("VectorAllBitsSetTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "AllBitsSet", ["VectorType"] = "Vector64", ["BaseType"] = "Int32", ["LargestVectorSize"] = "8" }), - ("VectorAllBitsSetTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "AllBitsSet", ["VectorType"] = "Vector64", ["BaseType"] = "Int64", ["LargestVectorSize"] = "8" }), - ("VectorAllBitsSetTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "AllBitsSet", ["VectorType"] = "Vector64", ["BaseType"] = "SByte", ["LargestVectorSize"] = "8" }), - ("VectorAllBitsSetTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "AllBitsSet", ["VectorType"] = "Vector64", ["BaseType"] = "Single", ["LargestVectorSize"] = "8" }), - ("VectorAllBitsSetTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "AllBitsSet", ["VectorType"] = "Vector64", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "8" }), - ("VectorAllBitsSetTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "AllBitsSet", ["VectorType"] = "Vector64", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "8" }), - ("VectorAllBitsSetTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "AllBitsSet", ["VectorType"] = "Vector64", ["BaseType"] = "UInt64", ["LargestVectorSize"] = "8" }), - - ("VectorAsTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "As", ["VectorType"] = "Vector64", ["BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetByte()" }), - ("VectorAsTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "As", ["VectorType"] = "Vector64", ["BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetDouble()" }), - ("VectorAsTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "As", ["VectorType"] = "Vector64", ["BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetInt16()" }), - ("VectorAsTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "As", ["VectorType"] = "Vector64", ["BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetInt32()" }), - ("VectorAsTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "As", ["VectorType"] = "Vector64", ["BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetInt64()" }), - ("VectorAsTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "As", ["VectorType"] = "Vector64", ["BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetSByte()" }), - ("VectorAsTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "As", ["VectorType"] = "Vector64", ["BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()" }), - ("VectorAsTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "As", ["VectorType"] = "Vector64", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetUInt16()" }), - ("VectorAsTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "As", ["VectorType"] = "Vector64", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetUInt32()" }), - ("VectorAsTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "As", ["VectorType"] = "Vector64", ["BaseType"] = "UInt64", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetUInt64()" }), - - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector64", ["BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetByte()", ["Imm"] = "0", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector64", ["BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetByte()", ["Imm"] = "7", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector64", ["BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetDouble()", ["Imm"] = "0", ["ConsumeValues"] = "values[0]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector64", ["BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "0", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector64", ["BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "3", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector64", ["BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "0", ["ConsumeValues"] = "values[0], values[1]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector64", ["BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ConsumeValues"] = "values[0], values[1]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector64", ["BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "0", ["ConsumeValues"] = "values[0]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector64", ["BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "0", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector64", ["BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "7", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector64", ["BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()", ["Imm"] = "0", ["ConsumeValues"] = "values[0], values[1]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector64", ["BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()", ["Imm"] = "1", ["ConsumeValues"] = "values[0], values[1]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector64", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "0", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector64", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "3", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector64", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "0", ["ConsumeValues"] = "values[0], values[1]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector64", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ConsumeValues"] = "values[0], values[1]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector64", ["BaseType"] = "UInt64", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetUInt64()", ["Imm"] = "0", ["ConsumeValues"] = "values[0]" }), - - ("VectorToScalarTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "ToScalar", ["VectorType"] = "Vector64", ["BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetByte()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorToScalarTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "ToScalar", ["VectorType"] = "Vector64", ["BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetDouble()", ["ConsumeValues"] = "values[0]" }), - ("VectorToScalarTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "ToScalar", ["VectorType"] = "Vector64", ["BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetInt16()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorToScalarTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "ToScalar", ["VectorType"] = "Vector64", ["BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetInt32()", ["ConsumeValues"] = "values[0], values[1]" }), - ("VectorToScalarTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "ToScalar", ["VectorType"] = "Vector64", ["BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetInt64()", ["ConsumeValues"] = "values[0]" }), - ("VectorToScalarTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "ToScalar", ["VectorType"] = "Vector64", ["BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetSByte()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorToScalarTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "ToScalar", ["VectorType"] = "Vector64", ["BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()", ["ConsumeValues"] = "values[0], values[1]" }), - ("VectorToScalarTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "ToScalar", ["VectorType"] = "Vector64", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetUInt16()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorToScalarTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "ToScalar", ["VectorType"] = "Vector64", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetUInt32()", ["ConsumeValues"] = "values[0], values[1]" }), - ("VectorToScalarTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "ToScalar", ["VectorType"] = "Vector64", ["BaseType"] = "UInt64", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetUInt64()", ["ConsumeValues"] = "values[0]" }), - - ("VectorExtendTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "ToVector128", ["VectorType"] = "Vector64", ["BaseType"] = "Byte", ["TgtVectorType"] = "Vector128", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetByte()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorExtendTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "ToVector128", ["VectorType"] = "Vector64", ["BaseType"] = "Double", ["TgtVectorType"] = "Vector128", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetDouble()", ["ConsumeValues"] = "values[0]" }), - ("VectorExtendTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "ToVector128", ["VectorType"] = "Vector64", ["BaseType"] = "Int16", ["TgtVectorType"] = "Vector128", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetInt16()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorExtendTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "ToVector128", ["VectorType"] = "Vector64", ["BaseType"] = "Int32", ["TgtVectorType"] = "Vector128", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetInt32()", ["ConsumeValues"] = "values[0], values[1]" }), - ("VectorExtendTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "ToVector128", ["VectorType"] = "Vector64", ["BaseType"] = "Int64", ["TgtVectorType"] = "Vector128", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetInt64()", ["ConsumeValues"] = "values[0]" }), - ("VectorExtendTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "ToVector128", ["VectorType"] = "Vector64", ["BaseType"] = "SByte", ["TgtVectorType"] = "Vector128", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetSByte()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorExtendTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "ToVector128", ["VectorType"] = "Vector64", ["BaseType"] = "Single", ["TgtVectorType"] = "Vector128", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()", ["ConsumeValues"] = "values[0], values[1]" }), - ("VectorExtendTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "ToVector128", ["VectorType"] = "Vector64", ["BaseType"] = "UInt16", ["TgtVectorType"] = "Vector128", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetUInt16()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorExtendTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "ToVector128", ["VectorType"] = "Vector64", ["BaseType"] = "UInt32", ["TgtVectorType"] = "Vector128", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetUInt32()", ["ConsumeValues"] = "values[0], values[1]" }), - ("VectorExtendTest.template", new Dictionary { ["Isa"] = "Vector64", ["Method"] = "ToVector128", ["VectorType"] = "Vector64", ["BaseType"] = "UInt64", ["TgtVectorType"] = "Vector128", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetUInt64()", ["ConsumeValues"] = "values[0]" }), - - ("VectorToStringTest.template", new Dictionary {["Isa"] = "Vector64", ["Method"] = "ToString", ["VectorType"] = "Vector64", ["BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetByte()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorToStringTest.template", new Dictionary {["Isa"] = "Vector64", ["Method"] = "ToString", ["VectorType"] = "Vector64", ["BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetSByte()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorToStringTest.template", new Dictionary {["Isa"] = "Vector64", ["Method"] = "ToString", ["VectorType"] = "Vector64", ["BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetInt16()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorToStringTest.template", new Dictionary {["Isa"] = "Vector64", ["Method"] = "ToString", ["VectorType"] = "Vector64", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetUInt16()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorToStringTest.template", new Dictionary {["Isa"] = "Vector64", ["Method"] = "ToString", ["VectorType"] = "Vector64", ["BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetInt32()", ["ConsumeValues"] = "values[0], values[1]" }), - ("VectorToStringTest.template", new Dictionary {["Isa"] = "Vector64", ["Method"] = "ToString", ["VectorType"] = "Vector64", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetUInt32()", ["ConsumeValues"] = "values[0], values[1]" }), - ("VectorToStringTest.template", new Dictionary {["Isa"] = "Vector64", ["Method"] = "ToString", ["VectorType"] = "Vector64", ["BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()", ["ConsumeValues"] = "values[0], values[1]" }), - ("VectorToStringTest.template", new Dictionary {["Isa"] = "Vector64", ["Method"] = "ToString", ["VectorType"] = "Vector64", ["BaseType"] = "Double", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetDouble()", ["ConsumeValues"] = "values[0]" }), - ("VectorToStringTest.template", new Dictionary {["Isa"] = "Vector64", ["Method"] = "ToString", ["VectorType"] = "Vector64", ["BaseType"] = "Int64", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetInt64()", ["ConsumeValues"] = "values[0]" }), - ("VectorToStringTest.template", new Dictionary {["Isa"] = "Vector64", ["Method"] = "ToString", ["VectorType"] = "Vector64", ["BaseType"] = "UInt64", ["LargestVectorSize"] = "8", ["NextValueOp"] = "TestLibrary.Generator.GetUInt64()", ["ConsumeValues"] = "values[0]" }), -}; - -private static readonly (string templateFileName, Dictionary templateData)[] Vector128Inputs = new [] -{ - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "Create", ["VectorType"] = "Vector128", ["BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != expectedValue" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "Create", ["VectorType"] = "Vector128", ["BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != expectedValue" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "Create", ["VectorType"] = "Vector128", ["BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != expectedValue" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "Create", ["VectorType"] = "Vector128", ["BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != expectedValue" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "Create", ["VectorType"] = "Vector128", ["BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != expectedValue" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "Create", ["VectorType"] = "Vector128", ["BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != expectedValue" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "Create", ["VectorType"] = "Vector128", ["BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != expectedValue" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "Create", ["VectorType"] = "Vector128", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != expectedValue" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "Create", ["VectorType"] = "Vector128", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != expectedValue" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "Create", ["VectorType"] = "Vector128", ["BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != expectedValue" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "CreateScalar", ["VectorType"] = "Vector128", ["BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != 0" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "CreateScalar", ["VectorType"] = "Vector128", ["BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != 0" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "CreateScalar", ["VectorType"] = "Vector128", ["BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != 0" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "CreateScalar", ["VectorType"] = "Vector128", ["BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != 0" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "CreateScalar", ["VectorType"] = "Vector128", ["BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != 0" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "CreateScalar", ["VectorType"] = "Vector128", ["BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != 0" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "CreateScalar", ["VectorType"] = "Vector128", ["BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != 0" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "CreateScalar", ["VectorType"] = "Vector128", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != 0" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "CreateScalar", ["VectorType"] = "Vector128", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != 0" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "CreateScalar", ["VectorType"] = "Vector128", ["BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != 0" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "CreateScalarUnsafe", ["VectorType"] = "Vector128", ["BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "false /* value is uninitialized */" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "CreateScalarUnsafe", ["VectorType"] = "Vector128", ["BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "false /* value is uninitialized */" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "CreateScalarUnsafe", ["VectorType"] = "Vector128", ["BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "false /* value is uninitialized */" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "CreateScalarUnsafe", ["VectorType"] = "Vector128", ["BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "false /* value is uninitialized */" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "CreateScalarUnsafe", ["VectorType"] = "Vector128", ["BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "false /* value is uninitialized */" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "CreateScalarUnsafe", ["VectorType"] = "Vector128", ["BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "false /* value is uninitialized */" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "CreateScalarUnsafe", ["VectorType"] = "Vector128", ["BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "false /* value is uninitialized */" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "CreateScalarUnsafe", ["VectorType"] = "Vector128", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "false /* value is uninitialized */" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "CreateScalarUnsafe", ["VectorType"] = "Vector128", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "false /* value is uninitialized */" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "CreateScalarUnsafe", ["VectorType"] = "Vector128", ["BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "false /* value is uninitialized */" }), - - ("VectorCreateElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "Create", ["VectorType"] = "Vector128", ["BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetByte()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]" }), - ("VectorCreateElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "Create", ["VectorType"] = "Vector128", ["BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetDouble()", ["ConsumeValues"] = "values[0], values[1]" }), - ("VectorCreateElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "Create", ["VectorType"] = "Vector128", ["BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt16()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorCreateElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "Create", ["VectorType"] = "Vector128", ["BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt32()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorCreateElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "Create", ["VectorType"] = "Vector128", ["BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt64()", ["ConsumeValues"] = "values[0], values[1]" }), - ("VectorCreateElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "Create", ["VectorType"] = "Vector128", ["BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetSByte()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]" }), - ("VectorCreateElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "Create", ["VectorType"] = "Vector128", ["BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorCreateElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "Create", ["VectorType"] = "Vector128", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt16()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorCreateElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "Create", ["VectorType"] = "Vector128", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt32()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorCreateElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "Create", ["VectorType"] = "Vector128", ["BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt64()", ["ConsumeValues"] = "values[0], values[1]" }), - - ("VectorCreateVectorTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "Create", ["VectorType"] = "Vector128", ["BaseType"] = "Byte", ["OpVectorType"] = "Vector64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetByte()" }), - ("VectorCreateVectorTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "Create", ["VectorType"] = "Vector128", ["BaseType"] = "Double", ["OpVectorType"] = "Vector64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetDouble()" }), - ("VectorCreateVectorTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "Create", ["VectorType"] = "Vector128", ["BaseType"] = "Int16", ["OpVectorType"] = "Vector64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt16()" }), - ("VectorCreateVectorTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "Create", ["VectorType"] = "Vector128", ["BaseType"] = "Int32", ["OpVectorType"] = "Vector64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt32()" }), - ("VectorCreateVectorTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "Create", ["VectorType"] = "Vector128", ["BaseType"] = "Int64", ["OpVectorType"] = "Vector64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt64()" }), - ("VectorCreateVectorTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "Create", ["VectorType"] = "Vector128", ["BaseType"] = "SByte", ["OpVectorType"] = "Vector64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetSByte()" }), - ("VectorCreateVectorTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "Create", ["VectorType"] = "Vector128", ["BaseType"] = "Single", ["OpVectorType"] = "Vector64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()" }), - ("VectorCreateVectorTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "Create", ["VectorType"] = "Vector128", ["BaseType"] = "UInt16", ["OpVectorType"] = "Vector64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt16()" }), - ("VectorCreateVectorTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "Create", ["VectorType"] = "Vector128", ["BaseType"] = "UInt32", ["OpVectorType"] = "Vector64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt32()" }), - ("VectorCreateVectorTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "Create", ["VectorType"] = "Vector128", ["BaseType"] = "UInt64", ["OpVectorType"] = "Vector64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt64()" }), -}; - -private static readonly (string templateFileName, Dictionary templateData)[] Vector128_1Inputs = new [] -{ - ("VectorZeroTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "Zero", ["VectorType"] = "Vector128", ["BaseType"] = "Byte", ["LargestVectorSize"] = "16" }), - ("VectorZeroTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "Zero", ["VectorType"] = "Vector128", ["BaseType"] = "Double", ["LargestVectorSize"] = "16" }), - ("VectorZeroTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "Zero", ["VectorType"] = "Vector128", ["BaseType"] = "Int16", ["LargestVectorSize"] = "16" }), - ("VectorZeroTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "Zero", ["VectorType"] = "Vector128", ["BaseType"] = "Int32", ["LargestVectorSize"] = "16" }), - ("VectorZeroTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "Zero", ["VectorType"] = "Vector128", ["BaseType"] = "Int64", ["LargestVectorSize"] = "16" }), - ("VectorZeroTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "Zero", ["VectorType"] = "Vector128", ["BaseType"] = "SByte", ["LargestVectorSize"] = "16" }), - ("VectorZeroTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "Zero", ["VectorType"] = "Vector128", ["BaseType"] = "Single", ["LargestVectorSize"] = "16" }), - ("VectorZeroTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "Zero", ["VectorType"] = "Vector128", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "16" }), - ("VectorZeroTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "Zero", ["VectorType"] = "Vector128", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "16" }), - ("VectorZeroTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "Zero", ["VectorType"] = "Vector128", ["BaseType"] = "UInt64", ["LargestVectorSize"] = "16" }), - - ("VectorAllBitsSetTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "AllBitsSet", ["VectorType"] = "Vector128", ["BaseType"] = "Byte", ["LargestVectorSize"] = "16" }), - ("VectorAllBitsSetTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "AllBitsSet", ["VectorType"] = "Vector128", ["BaseType"] = "Double", ["LargestVectorSize"] = "16" }), - ("VectorAllBitsSetTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "AllBitsSet", ["VectorType"] = "Vector128", ["BaseType"] = "Int16", ["LargestVectorSize"] = "16" }), - ("VectorAllBitsSetTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "AllBitsSet", ["VectorType"] = "Vector128", ["BaseType"] = "Int32", ["LargestVectorSize"] = "16" }), - ("VectorAllBitsSetTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "AllBitsSet", ["VectorType"] = "Vector128", ["BaseType"] = "Int64", ["LargestVectorSize"] = "16" }), - ("VectorAllBitsSetTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "AllBitsSet", ["VectorType"] = "Vector128", ["BaseType"] = "SByte", ["LargestVectorSize"] = "16" }), - ("VectorAllBitsSetTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "AllBitsSet", ["VectorType"] = "Vector128", ["BaseType"] = "Single", ["LargestVectorSize"] = "16" }), - ("VectorAllBitsSetTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "AllBitsSet", ["VectorType"] = "Vector128", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "16" }), - ("VectorAllBitsSetTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "AllBitsSet", ["VectorType"] = "Vector128", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "16" }), - ("VectorAllBitsSetTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "AllBitsSet", ["VectorType"] = "Vector128", ["BaseType"] = "UInt64", ["LargestVectorSize"] = "16" }), - - ("VectorAsTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "As", ["VectorType"] = "Vector128", ["BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp"] = "(byte)TestLibrary.Generator.GetByte()" }), - ("VectorAsTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "As", ["VectorType"] = "Vector128", ["BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp"] = "(double)TestLibrary.Generator.GetDouble()" }), - ("VectorAsTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "As", ["VectorType"] = "Vector128", ["BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp"] = "(short)TestLibrary.Generator.GetInt16()" }), - ("VectorAsTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "As", ["VectorType"] = "Vector128", ["BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp"] = "(int)TestLibrary.Generator.GetInt32()" }), - ("VectorAsTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "As", ["VectorType"] = "Vector128", ["BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "(long)TestLibrary.Generator.GetInt64()" }), - ("VectorAsTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "As", ["VectorType"] = "Vector128", ["BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp"] = "(sbyte)TestLibrary.Generator.GetSByte()" }), - ("VectorAsTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "As", ["VectorType"] = "Vector128", ["BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp"] = "(float)TestLibrary.Generator.GetSingle()" }), - ("VectorAsTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "As", ["VectorType"] = "Vector128", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp"] = "(ushort)TestLibrary.Generator.GetUInt16()" }), - ("VectorAsTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "As", ["VectorType"] = "Vector128", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp"] = "(uint)TestLibrary.Generator.GetUInt32()" }), - ("VectorAsTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "As", ["VectorType"] = "Vector128", ["BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "(ulong)TestLibrary.Generator.GetUInt64()" }), - - ("VectorAsNumericsTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "AsVector2", ["VectorType"] = "Vector128", ["BaseType"] = "Single", ["NumericsType"] = "Vector2", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()" }), - ("VectorAsNumericsTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "AsVector3", ["VectorType"] = "Vector128", ["BaseType"] = "Single", ["NumericsType"] = "Vector3", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()" }), - ("VectorAsNumericsTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "AsVector4", ["VectorType"] = "Vector128", ["BaseType"] = "Single", ["NumericsType"] = "Vector4", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()" }), - - ("VectorAsNumericsVectorTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "AsVector", ["VectorType"] = "Vector128", ["BaseType"] = "Byte", ["NumericsType"] = "Vector", ["LargestVectorSize"] = "16", ["NextValueOp"] = "(byte)TestLibrary.Generator.GetByte()" }), - ("VectorAsNumericsVectorTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "AsVector", ["VectorType"] = "Vector128", ["BaseType"] = "Double", ["NumericsType"] = "Vector", ["LargestVectorSize"] = "16", ["NextValueOp"] = "(double)TestLibrary.Generator.GetDouble()" }), - ("VectorAsNumericsVectorTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "AsVector", ["VectorType"] = "Vector128", ["BaseType"] = "Int16", ["NumericsType"] = "Vector", ["LargestVectorSize"] = "16", ["NextValueOp"] = "(short)TestLibrary.Generator.GetInt16()" }), - ("VectorAsNumericsVectorTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "AsVector", ["VectorType"] = "Vector128", ["BaseType"] = "Int32", ["NumericsType"] = "Vector", ["LargestVectorSize"] = "16", ["NextValueOp"] = "(int)TestLibrary.Generator.GetInt32()" }), - ("VectorAsNumericsVectorTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "AsVector", ["VectorType"] = "Vector128", ["BaseType"] = "Int64", ["NumericsType"] = "Vector", ["LargestVectorSize"] = "16", ["NextValueOp"] = "(long)TestLibrary.Generator.GetInt64()" }), - ("VectorAsNumericsVectorTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "AsVector", ["VectorType"] = "Vector128", ["BaseType"] = "SByte", ["NumericsType"] = "Vector", ["LargestVectorSize"] = "16", ["NextValueOp"] = "(sbyte)TestLibrary.Generator.GetSByte()" }), - ("VectorAsNumericsVectorTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "AsVector", ["VectorType"] = "Vector128", ["BaseType"] = "Single", ["NumericsType"] = "Vector", ["LargestVectorSize"] = "16", ["NextValueOp"] = "(float)TestLibrary.Generator.GetSingle()" }), - ("VectorAsNumericsVectorTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "AsVector", ["VectorType"] = "Vector128", ["BaseType"] = "UInt16", ["NumericsType"] = "Vector", ["LargestVectorSize"] = "16", ["NextValueOp"] = "(ushort)TestLibrary.Generator.GetUInt16()" }), - ("VectorAsNumericsVectorTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "AsVector", ["VectorType"] = "Vector128", ["BaseType"] = "UInt32", ["NumericsType"] = "Vector", ["LargestVectorSize"] = "16", ["NextValueOp"] = "(uint)TestLibrary.Generator.GetUInt32()" }), - ("VectorAsNumericsVectorTest.template", new Dictionary { ["Isa"] = "Vector128_1", ["Method"] = "AsVector", ["VectorType"] = "Vector128", ["BaseType"] = "UInt64", ["NumericsType"] = "Vector", ["LargestVectorSize"] = "16", ["NextValueOp"] = "(ulong)TestLibrary.Generator.GetUInt64()" }), - - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector128", ["BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetByte()", ["Imm"] = "0", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector128", ["BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetByte()", ["Imm"] = "7", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector128", ["BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetByte()", ["Imm"] = "15", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector128", ["BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetDouble()", ["Imm"] = "0", ["ConsumeValues"] = "values[0], values[1]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector128", ["BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetDouble()", ["Imm"] = "1", ["ConsumeValues"] = "values[0], values[1]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector128", ["BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "0", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector128", ["BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "3", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector128", ["BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "7", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector128", ["BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "0", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector128", ["BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector128", ["BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "3", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector128", ["BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "0", ["ConsumeValues"] = "values[0], values[1]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector128", ["BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ConsumeValues"] = "values[0], values[1]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector128", ["BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "0", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector128", ["BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "7", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector128", ["BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "15", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector128", ["BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()", ["Imm"] = "0", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector128", ["BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()", ["Imm"] = "1", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector128", ["BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()", ["Imm"] = "3", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector128", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "0", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector128", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "3", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector128", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "7", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector128", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "0", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector128", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector128", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "3", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector128", ["BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt64()", ["Imm"] = "0", ["ConsumeValues"] = "values[0], values[1]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector128", ["BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt64()", ["Imm"] = "1", ["ConsumeValues"] = "values[0], values[1]" }), - - ("VectorGetAndWithLowerAndUpperTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithLowerAndUpper", ["VectorType"] = "Vector128", ["BaseType"] = "Byte", ["TgtVectorType"] = "Vector64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetByte()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]" }), - ("VectorGetAndWithLowerAndUpperTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithLowerAndUpper", ["VectorType"] = "Vector128", ["BaseType"] = "Double", ["TgtVectorType"] = "Vector64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetDouble()", ["ConsumeValues"] = "values[0], values[1]" }), - ("VectorGetAndWithLowerAndUpperTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithLowerAndUpper", ["VectorType"] = "Vector128", ["BaseType"] = "Int16", ["TgtVectorType"] = "Vector64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt16()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorGetAndWithLowerAndUpperTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithLowerAndUpper", ["VectorType"] = "Vector128", ["BaseType"] = "Int32", ["TgtVectorType"] = "Vector64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt32()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorGetAndWithLowerAndUpperTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithLowerAndUpper", ["VectorType"] = "Vector128", ["BaseType"] = "Int64", ["TgtVectorType"] = "Vector64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt64()", ["ConsumeValues"] = "values[0], values[1]" }), - ("VectorGetAndWithLowerAndUpperTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithLowerAndUpper", ["VectorType"] = "Vector128", ["BaseType"] = "SByte", ["TgtVectorType"] = "Vector64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetSByte()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]" }), - ("VectorGetAndWithLowerAndUpperTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithLowerAndUpper", ["VectorType"] = "Vector128", ["BaseType"] = "Single", ["TgtVectorType"] = "Vector64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorGetAndWithLowerAndUpperTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithLowerAndUpper", ["VectorType"] = "Vector128", ["BaseType"] = "UInt16", ["TgtVectorType"] = "Vector64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt16()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorGetAndWithLowerAndUpperTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithLowerAndUpper", ["VectorType"] = "Vector128", ["BaseType"] = "UInt32", ["TgtVectorType"] = "Vector64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt32()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorGetAndWithLowerAndUpperTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "GetAndWithLowerAndUpper", ["VectorType"] = "Vector128", ["BaseType"] = "UInt64", ["TgtVectorType"] = "Vector64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt64()", ["ConsumeValues"] = "values[0], values[1]" }), - - ("VectorToScalarTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "ToScalar", ["VectorType"] = "Vector128", ["BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetByte()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]" }), - ("VectorToScalarTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "ToScalar", ["VectorType"] = "Vector128", ["BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetDouble()", ["ConsumeValues"] = "values[0], values[1]" }), - ("VectorToScalarTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "ToScalar", ["VectorType"] = "Vector128", ["BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt16()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorToScalarTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "ToScalar", ["VectorType"] = "Vector128", ["BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt32()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorToScalarTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "ToScalar", ["VectorType"] = "Vector128", ["BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt64()", ["ConsumeValues"] = "values[0], values[1]" }), - ("VectorToScalarTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "ToScalar", ["VectorType"] = "Vector128", ["BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetSByte()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]" }), - ("VectorToScalarTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "ToScalar", ["VectorType"] = "Vector128", ["BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorToScalarTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "ToScalar", ["VectorType"] = "Vector128", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt16()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorToScalarTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "ToScalar", ["VectorType"] = "Vector128", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt32()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorToScalarTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "ToScalar", ["VectorType"] = "Vector128", ["BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt64()", ["ConsumeValues"] = "values[0], values[1]" }), - - ("VectorExtendTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "ToVector256", ["VectorType"] = "Vector128", ["BaseType"] = "Byte", ["TgtVectorType"] = "Vector256", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetByte()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]" }), - ("VectorExtendTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "ToVector256", ["VectorType"] = "Vector128", ["BaseType"] = "Double", ["TgtVectorType"] = "Vector256", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetDouble()", ["ConsumeValues"] = "values[0], values[1]" }), - ("VectorExtendTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "ToVector256", ["VectorType"] = "Vector128", ["BaseType"] = "Int16", ["TgtVectorType"] = "Vector256", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt16()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorExtendTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "ToVector256", ["VectorType"] = "Vector128", ["BaseType"] = "Int32", ["TgtVectorType"] = "Vector256", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt32()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorExtendTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "ToVector256", ["VectorType"] = "Vector128", ["BaseType"] = "Int64", ["TgtVectorType"] = "Vector256", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt64()", ["ConsumeValues"] = "values[0], values[1]" }), - ("VectorExtendTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "ToVector256", ["VectorType"] = "Vector128", ["BaseType"] = "SByte", ["TgtVectorType"] = "Vector256", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetSByte()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]" }), - ("VectorExtendTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "ToVector256", ["VectorType"] = "Vector128", ["BaseType"] = "Single", ["TgtVectorType"] = "Vector256", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorExtendTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "ToVector256", ["VectorType"] = "Vector128", ["BaseType"] = "UInt16", ["TgtVectorType"] = "Vector256", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt16()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorExtendTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "ToVector256", ["VectorType"] = "Vector128", ["BaseType"] = "UInt32", ["TgtVectorType"] = "Vector256", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt32()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorExtendTest.template", new Dictionary { ["Isa"] = "Vector128", ["Method"] = "ToVector256", ["VectorType"] = "Vector128", ["BaseType"] = "UInt64", ["TgtVectorType"] = "Vector256", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt64()", ["ConsumeValues"] = "values[0], values[1]" }), - - ("VectorToStringTest.template", new Dictionary {["Isa"] = "Vector128", ["Method"] = "ToString", ["VectorType"] = "Vector128", ["BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetByte()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]" }), - ("VectorToStringTest.template", new Dictionary {["Isa"] = "Vector128", ["Method"] = "ToString", ["VectorType"] = "Vector128", ["BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetSByte()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]" }), - ("VectorToStringTest.template", new Dictionary {["Isa"] = "Vector128", ["Method"] = "ToString", ["VectorType"] = "Vector128", ["BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt16()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorToStringTest.template", new Dictionary {["Isa"] = "Vector128", ["Method"] = "ToString", ["VectorType"] = "Vector128", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt16()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorToStringTest.template", new Dictionary {["Isa"] = "Vector128", ["Method"] = "ToString", ["VectorType"] = "Vector128", ["BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt32()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorToStringTest.template", new Dictionary {["Isa"] = "Vector128", ["Method"] = "ToString", ["VectorType"] = "Vector128", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt32()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorToStringTest.template", new Dictionary {["Isa"] = "Vector128", ["Method"] = "ToString", ["VectorType"] = "Vector128", ["BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorToStringTest.template", new Dictionary {["Isa"] = "Vector128", ["Method"] = "ToString", ["VectorType"] = "Vector128", ["BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetDouble()", ["ConsumeValues"] = "values[0], values[1]" }), - ("VectorToStringTest.template", new Dictionary {["Isa"] = "Vector128", ["Method"] = "ToString", ["VectorType"] = "Vector128", ["BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetInt64()", ["ConsumeValues"] = "values[0], values[1]" }), - ("VectorToStringTest.template", new Dictionary {["Isa"] = "Vector128", ["Method"] = "ToString", ["VectorType"] = "Vector128", ["BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp"] = "TestLibrary.Generator.GetUInt64()", ["ConsumeValues"] = "values[0], values[1]" }), -}; - -private static readonly (string templateFileName, Dictionary templateData)[] Vector256Inputs = new [] -{ - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "Create", ["VectorType"] = "Vector256", ["BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != expectedValue" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "Create", ["VectorType"] = "Vector256", ["BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != expectedValue" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "Create", ["VectorType"] = "Vector256", ["BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != expectedValue" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "Create", ["VectorType"] = "Vector256", ["BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != expectedValue" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "Create", ["VectorType"] = "Vector256", ["BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != expectedValue" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "Create", ["VectorType"] = "Vector256", ["BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != expectedValue" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "Create", ["VectorType"] = "Vector256", ["BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != expectedValue" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "Create", ["VectorType"] = "Vector256", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != expectedValue" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "Create", ["VectorType"] = "Vector256", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != expectedValue" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "Create", ["VectorType"] = "Vector256", ["BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != expectedValue" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "CreateScalar", ["VectorType"] = "Vector256", ["BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != 0" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "CreateScalar", ["VectorType"] = "Vector256", ["BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != 0" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "CreateScalar", ["VectorType"] = "Vector256", ["BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != 0" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "CreateScalar", ["VectorType"] = "Vector256", ["BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != 0" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "CreateScalar", ["VectorType"] = "Vector256", ["BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != 0" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "CreateScalar", ["VectorType"] = "Vector256", ["BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != 0" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "CreateScalar", ["VectorType"] = "Vector256", ["BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != 0" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "CreateScalar", ["VectorType"] = "Vector256", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != 0" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "CreateScalar", ["VectorType"] = "Vector256", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != 0" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "CreateScalar", ["VectorType"] = "Vector256", ["BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "resultElements[i] != 0" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "CreateScalarUnsafe", ["VectorType"] = "Vector256", ["BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "false /* value is uninitialized */" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "CreateScalarUnsafe", ["VectorType"] = "Vector256", ["BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "false /* value is uninitialized */" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "CreateScalarUnsafe", ["VectorType"] = "Vector256", ["BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "false /* value is uninitialized */" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "CreateScalarUnsafe", ["VectorType"] = "Vector256", ["BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "false /* value is uninitialized */" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "CreateScalarUnsafe", ["VectorType"] = "Vector256", ["BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "false /* value is uninitialized */" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "CreateScalarUnsafe", ["VectorType"] = "Vector256", ["BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "false /* value is uninitialized */" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "CreateScalarUnsafe", ["VectorType"] = "Vector256", ["BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "false /* value is uninitialized */" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "CreateScalarUnsafe", ["VectorType"] = "Vector256", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "false /* value is uninitialized */" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "CreateScalarUnsafe", ["VectorType"] = "Vector256", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "false /* value is uninitialized */" }), - ("VectorCreateTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "CreateScalarUnsafe", ["VectorType"] = "Vector256", ["BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "resultElements[0] != expectedValue", ["ValidateRemainingResults"] = "false /* value is uninitialized */" }), - - ("VectorCreateElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "Create", ["VectorType"] = "Vector256", ["BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetByte()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]" }), - ("VectorCreateElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "Create", ["VectorType"] = "Vector256", ["BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetDouble()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorCreateElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "Create", ["VectorType"] = "Vector256", ["BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt16()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]" }), - ("VectorCreateElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "Create", ["VectorType"] = "Vector256", ["BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt32()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorCreateElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "Create", ["VectorType"] = "Vector256", ["BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt64()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorCreateElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "Create", ["VectorType"] = "Vector256", ["BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetSByte()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]" }), - ("VectorCreateElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "Create", ["VectorType"] = "Vector256", ["BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorCreateElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "Create", ["VectorType"] = "Vector256", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt16()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]" }), - ("VectorCreateElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "Create", ["VectorType"] = "Vector256", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt32()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorCreateElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "Create", ["VectorType"] = "Vector256", ["BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt64()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - - ("VectorCreateVectorTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "Create", ["VectorType"] = "Vector256", ["BaseType"] = "Byte", ["OpVectorType"] = "Vector128", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetByte()" }), - ("VectorCreateVectorTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "Create", ["VectorType"] = "Vector256", ["BaseType"] = "Double", ["OpVectorType"] = "Vector128", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetDouble()" }), - ("VectorCreateVectorTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "Create", ["VectorType"] = "Vector256", ["BaseType"] = "Int16", ["OpVectorType"] = "Vector128", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt16()" }), - ("VectorCreateVectorTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "Create", ["VectorType"] = "Vector256", ["BaseType"] = "Int32", ["OpVectorType"] = "Vector128", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt32()" }), - ("VectorCreateVectorTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "Create", ["VectorType"] = "Vector256", ["BaseType"] = "Int64", ["OpVectorType"] = "Vector128", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt64()" }), - ("VectorCreateVectorTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "Create", ["VectorType"] = "Vector256", ["BaseType"] = "SByte", ["OpVectorType"] = "Vector128", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetSByte()" }), - ("VectorCreateVectorTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "Create", ["VectorType"] = "Vector256", ["BaseType"] = "Single", ["OpVectorType"] = "Vector128", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()" }), - ("VectorCreateVectorTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "Create", ["VectorType"] = "Vector256", ["BaseType"] = "UInt16", ["OpVectorType"] = "Vector128", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt16()" }), - ("VectorCreateVectorTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "Create", ["VectorType"] = "Vector256", ["BaseType"] = "UInt32", ["OpVectorType"] = "Vector128", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt32()" }), - ("VectorCreateVectorTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "Create", ["VectorType"] = "Vector256", ["BaseType"] = "UInt64", ["OpVectorType"] = "Vector128", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt64()" }), -}; - -private static readonly (string templateFileName, Dictionary templateData)[] Vector256_1Inputs = new [] -{ - ("VectorZeroTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "Zero", ["VectorType"] = "Vector256", ["BaseType"] = "Byte", ["LargestVectorSize"] = "32" }), - ("VectorZeroTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "Zero", ["VectorType"] = "Vector256", ["BaseType"] = "Double", ["LargestVectorSize"] = "32" }), - ("VectorZeroTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "Zero", ["VectorType"] = "Vector256", ["BaseType"] = "Int16", ["LargestVectorSize"] = "32" }), - ("VectorZeroTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "Zero", ["VectorType"] = "Vector256", ["BaseType"] = "Int32", ["LargestVectorSize"] = "32" }), - ("VectorZeroTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "Zero", ["VectorType"] = "Vector256", ["BaseType"] = "Int64", ["LargestVectorSize"] = "32" }), - ("VectorZeroTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "Zero", ["VectorType"] = "Vector256", ["BaseType"] = "SByte", ["LargestVectorSize"] = "32" }), - ("VectorZeroTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "Zero", ["VectorType"] = "Vector256", ["BaseType"] = "Single", ["LargestVectorSize"] = "32" }), - ("VectorZeroTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "Zero", ["VectorType"] = "Vector256", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "32" }), - ("VectorZeroTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "Zero", ["VectorType"] = "Vector256", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "32" }), - ("VectorZeroTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "Zero", ["VectorType"] = "Vector256", ["BaseType"] = "UInt64", ["LargestVectorSize"] = "32" }), - - ("VectorAllBitsSetTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "AllBitsSet", ["VectorType"] = "Vector256", ["BaseType"] = "Byte", ["LargestVectorSize"] = "32" }), - ("VectorAllBitsSetTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "AllBitsSet", ["VectorType"] = "Vector256", ["BaseType"] = "Double", ["LargestVectorSize"] = "32" }), - ("VectorAllBitsSetTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "AllBitsSet", ["VectorType"] = "Vector256", ["BaseType"] = "Int16", ["LargestVectorSize"] = "32" }), - ("VectorAllBitsSetTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "AllBitsSet", ["VectorType"] = "Vector256", ["BaseType"] = "Int32", ["LargestVectorSize"] = "32" }), - ("VectorAllBitsSetTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "AllBitsSet", ["VectorType"] = "Vector256", ["BaseType"] = "Int64", ["LargestVectorSize"] = "32" }), - ("VectorAllBitsSetTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "AllBitsSet", ["VectorType"] = "Vector256", ["BaseType"] = "SByte", ["LargestVectorSize"] = "32" }), - ("VectorAllBitsSetTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "AllBitsSet", ["VectorType"] = "Vector256", ["BaseType"] = "Single", ["LargestVectorSize"] = "32" }), - ("VectorAllBitsSetTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "AllBitsSet", ["VectorType"] = "Vector256", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "32" }), - ("VectorAllBitsSetTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "AllBitsSet", ["VectorType"] = "Vector256", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "32" }), - ("VectorAllBitsSetTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "AllBitsSet", ["VectorType"] = "Vector256", ["BaseType"] = "UInt64", ["LargestVectorSize"] = "32" }), - - - ("VectorAsTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "As", ["VectorType"] = "Vector256", ["BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp"] = "(byte)TestLibrary.Generator.GetByte()" }), - ("VectorAsTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "As", ["VectorType"] = "Vector256", ["BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp"] = "(double)TestLibrary.Generator.GetDouble()" }), - ("VectorAsTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "As", ["VectorType"] = "Vector256", ["BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp"] = "(short)TestLibrary.Generator.GetInt16()" }), - ("VectorAsTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "As", ["VectorType"] = "Vector256", ["BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp"] = "(int)TestLibrary.Generator.GetInt32()" }), - ("VectorAsTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "As", ["VectorType"] = "Vector256", ["BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp"] = "(long)TestLibrary.Generator.GetInt64()" }), - ("VectorAsTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "As", ["VectorType"] = "Vector256", ["BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp"] = "(sbyte)TestLibrary.Generator.GetSByte()" }), - ("VectorAsTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "As", ["VectorType"] = "Vector256", ["BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp"] = "(float)TestLibrary.Generator.GetSingle()" }), - ("VectorAsTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "As", ["VectorType"] = "Vector256", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp"] = "(ushort)TestLibrary.Generator.GetUInt16()" }), - ("VectorAsTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "As", ["VectorType"] = "Vector256", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp"] = "(uint)TestLibrary.Generator.GetUInt32()" }), - ("VectorAsTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "As", ["VectorType"] = "Vector256", ["BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp"] = "(ulong)TestLibrary.Generator.GetUInt64()" }), - - ("VectorAsNumericsVectorTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "AsVector", ["VectorType"] = "Vector256", ["BaseType"] = "Byte", ["NumericsType"] = "Vector", ["LargestVectorSize"] = "32", ["NextValueOp"] = "(byte)TestLibrary.Generator.GetByte()" }), - ("VectorAsNumericsVectorTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "AsVector", ["VectorType"] = "Vector256", ["BaseType"] = "Double", ["NumericsType"] = "Vector", ["LargestVectorSize"] = "32", ["NextValueOp"] = "(double)TestLibrary.Generator.GetDouble()" }), - ("VectorAsNumericsVectorTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "AsVector", ["VectorType"] = "Vector256", ["BaseType"] = "Int16", ["NumericsType"] = "Vector", ["LargestVectorSize"] = "32", ["NextValueOp"] = "(short)TestLibrary.Generator.GetInt16()" }), - ("VectorAsNumericsVectorTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "AsVector", ["VectorType"] = "Vector256", ["BaseType"] = "Int32", ["NumericsType"] = "Vector", ["LargestVectorSize"] = "32", ["NextValueOp"] = "(int)TestLibrary.Generator.GetInt32()" }), - ("VectorAsNumericsVectorTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "AsVector", ["VectorType"] = "Vector256", ["BaseType"] = "Int64", ["NumericsType"] = "Vector", ["LargestVectorSize"] = "32", ["NextValueOp"] = "(long)TestLibrary.Generator.GetInt64()" }), - ("VectorAsNumericsVectorTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "AsVector", ["VectorType"] = "Vector256", ["BaseType"] = "SByte", ["NumericsType"] = "Vector", ["LargestVectorSize"] = "32", ["NextValueOp"] = "(sbyte)TestLibrary.Generator.GetSByte()" }), - ("VectorAsNumericsVectorTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "AsVector", ["VectorType"] = "Vector256", ["BaseType"] = "Single", ["NumericsType"] = "Vector", ["LargestVectorSize"] = "32", ["NextValueOp"] = "(float)TestLibrary.Generator.GetSingle()" }), - ("VectorAsNumericsVectorTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "AsVector", ["VectorType"] = "Vector256", ["BaseType"] = "UInt16", ["NumericsType"] = "Vector", ["LargestVectorSize"] = "32", ["NextValueOp"] = "(ushort)TestLibrary.Generator.GetUInt16()" }), - ("VectorAsNumericsVectorTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "AsVector", ["VectorType"] = "Vector256", ["BaseType"] = "UInt32", ["NumericsType"] = "Vector", ["LargestVectorSize"] = "32", ["NextValueOp"] = "(uint)TestLibrary.Generator.GetUInt32()" }), - ("VectorAsNumericsVectorTest.template", new Dictionary { ["Isa"] = "Vector256_1", ["Method"] = "AsVector", ["VectorType"] = "Vector256", ["BaseType"] = "UInt64", ["NumericsType"] = "Vector", ["LargestVectorSize"] = "32", ["NextValueOp"] = "(ulong)TestLibrary.Generator.GetUInt64()" }), - - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetByte()", ["Imm"] = "0", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetByte()", ["Imm"] = "7", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetByte()", ["Imm"] = "15", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetByte()", ["Imm"] = "31", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetDouble()", ["Imm"] = "0", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetDouble()", ["Imm"] = "1", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetDouble()", ["Imm"] = "3", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "0", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "3", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "7", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt16()", ["Imm"] = "15", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "0", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "1", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "3", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt32()", ["Imm"] = "7", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "0", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "1", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt64()", ["Imm"] = "3", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "0", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "7", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "15", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "31", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()", ["Imm"] = "0", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()", ["Imm"] = "1", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()", ["Imm"] = "3", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()", ["Imm"] = "7", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "0", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "3", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "7", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "15", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "0", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "1", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "3", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "7", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt64()", ["Imm"] = "0", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt64()", ["Imm"] = "1", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorGetAndWithElementTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithElement", ["VectorType"] = "Vector256", ["BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt64()", ["Imm"] = "3", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - - ("VectorGetAndWithLowerAndUpperTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithLowerAndUpper", ["VectorType"] = "Vector256", ["BaseType"] = "Byte", ["TgtVectorType"] = "Vector128", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetByte()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]" }), - ("VectorGetAndWithLowerAndUpperTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithLowerAndUpper", ["VectorType"] = "Vector256", ["BaseType"] = "Double", ["TgtVectorType"] = "Vector128", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetDouble()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorGetAndWithLowerAndUpperTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithLowerAndUpper", ["VectorType"] = "Vector256", ["BaseType"] = "Int16", ["TgtVectorType"] = "Vector128", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt16()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]" }), - ("VectorGetAndWithLowerAndUpperTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithLowerAndUpper", ["VectorType"] = "Vector256", ["BaseType"] = "Int32", ["TgtVectorType"] = "Vector128", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt32()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorGetAndWithLowerAndUpperTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithLowerAndUpper", ["VectorType"] = "Vector256", ["BaseType"] = "Int64", ["TgtVectorType"] = "Vector128", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt64()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorGetAndWithLowerAndUpperTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithLowerAndUpper", ["VectorType"] = "Vector256", ["BaseType"] = "SByte", ["TgtVectorType"] = "Vector128", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetSByte()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]" }), - ("VectorGetAndWithLowerAndUpperTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithLowerAndUpper", ["VectorType"] = "Vector256", ["BaseType"] = "Single", ["TgtVectorType"] = "Vector128", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorGetAndWithLowerAndUpperTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithLowerAndUpper", ["VectorType"] = "Vector256", ["BaseType"] = "UInt16", ["TgtVectorType"] = "Vector128", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt16()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]" }), - ("VectorGetAndWithLowerAndUpperTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithLowerAndUpper", ["VectorType"] = "Vector256", ["BaseType"] = "UInt32", ["TgtVectorType"] = "Vector128", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt32()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorGetAndWithLowerAndUpperTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "GetAndWithLowerAndUpper", ["VectorType"] = "Vector256", ["BaseType"] = "UInt64", ["TgtVectorType"] = "Vector128", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt64()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - - ("VectorToScalarTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "ToScalar", ["VectorType"] = "Vector256", ["BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetByte()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]" }), - ("VectorToScalarTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "ToScalar", ["VectorType"] = "Vector256", ["BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetDouble()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorToScalarTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "ToScalar", ["VectorType"] = "Vector256", ["BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt16()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]" }), - ("VectorToScalarTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "ToScalar", ["VectorType"] = "Vector256", ["BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt32()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorToScalarTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "ToScalar", ["VectorType"] = "Vector256", ["BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt64()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorToScalarTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "ToScalar", ["VectorType"] = "Vector256", ["BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetSByte()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]" }), - ("VectorToScalarTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "ToScalar", ["VectorType"] = "Vector256", ["BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorToScalarTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "ToScalar", ["VectorType"] = "Vector256", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt16()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]" }), - ("VectorToScalarTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "ToScalar", ["VectorType"] = "Vector256", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt32()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorToScalarTest.template", new Dictionary { ["Isa"] = "Vector256", ["Method"] = "ToScalar", ["VectorType"] = "Vector256", ["BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt64()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - - ("VectorToStringTest.template", new Dictionary {["Isa"] = "Vector256", ["Method"] = "ToString", ["VectorType"] = "Vector256", ["BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetByte()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]" }), - ("VectorToStringTest.template", new Dictionary {["Isa"] = "Vector256", ["Method"] = "ToString", ["VectorType"] = "Vector256", ["BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetSByte()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]" }), - ("VectorToStringTest.template", new Dictionary {["Isa"] = "Vector256", ["Method"] = "ToString", ["VectorType"] = "Vector256", ["BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt16()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]" }), - ("VectorToStringTest.template", new Dictionary {["Isa"] = "Vector256", ["Method"] = "ToString", ["VectorType"] = "Vector256", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt16()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]" }), - ("VectorToStringTest.template", new Dictionary {["Isa"] = "Vector256", ["Method"] = "ToString", ["VectorType"] = "Vector256", ["BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt32()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorToStringTest.template", new Dictionary {["Isa"] = "Vector256", ["Method"] = "ToString", ["VectorType"] = "Vector256", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt32()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorToStringTest.template", new Dictionary {["Isa"] = "Vector256", ["Method"] = "ToString", ["VectorType"] = "Vector256", ["BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetSingle()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]" }), - ("VectorToStringTest.template", new Dictionary {["Isa"] = "Vector256", ["Method"] = "ToString", ["VectorType"] = "Vector256", ["BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetDouble()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorToStringTest.template", new Dictionary {["Isa"] = "Vector256", ["Method"] = "ToString", ["VectorType"] = "Vector256", ["BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetInt64()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), - ("VectorToStringTest.template", new Dictionary {["Isa"] = "Vector256", ["Method"] = "ToString", ["VectorType"] = "Vector256", ["BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp"] = "TestLibrary.Generator.GetUInt64()", ["ConsumeValues"] = "values[0], values[1], values[2], values[3]" }), -}; - -private static readonly (string templateFileName, Dictionary templateData)[] NotSupportedInputs = new [] -{ - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64Zero", ["TargetType"] = "Vector64", ["Source"] = "Vector64", ["Method"] = "Zero" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64AllBitsSet", ["TargetType"] = "Vector64", ["Source"] = "Vector64", ["Method"] = "AllBitsSet" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsGeneric_Boolean", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64ByteAsGeneric_Boolean", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64DoubleAsGeneric_Boolean", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64Int16AsGeneric_Boolean", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64Int32AsGeneric_Boolean", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64Int64AsGeneric_Boolean", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64SByteAsGeneric_Boolean", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64SingleAsGeneric_Boolean", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64UInt16AsGeneric_Boolean", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64UInt32AsGeneric_Boolean", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64UInt64AsGeneric_Boolean", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsGeneric_Byte", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsGeneric_Double", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsGeneric_Int16", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsGeneric_Int32", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsGeneric_Int64", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsGeneric_SByte", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsGeneric_Single", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsGeneric_UInt16", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsGeneric_UInt32", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsGeneric_UInt64", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsByte", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsByte()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsDouble", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsDouble()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsInt16", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsInt16()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsInt32", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsInt32()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsInt64", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsInt64()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsSByte", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsSByte()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsSingle", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsSingle()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsUInt16", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsUInt16()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsUInt32", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsUInt32()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsUInt64", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsUInt64()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64GetElementNegativeOne", ["TargetType"] = "bool", ["Source"] = "default(Vector64)", ["Method"] = "GetElement(-1)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64GetElement0", ["TargetType"] = "bool", ["Source"] = "default(Vector64)", ["Method"] = "GetElement(0)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64GetElementMaxValue", ["TargetType"] = "bool", ["Source"] = "default(Vector64)", ["Method"] = "GetElement(int.MaxValue)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64WithElementNegativeOne", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "WithElement(-1, false)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64WithElement0", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "WithElement(0, false)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64WithElementMaxValue", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "WithElement(int.MaxValue, false)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64ToScalar", ["TargetType"] = "bool", ["Source"] = "default(Vector64)", ["Method"] = "ToScalar()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64ToVector128", ["TargetType"] = "Vector128", ["Source"] = "default(Vector64)", ["Method"] = "ToVector128()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64ToVector128Unsafe", ["TargetType"] = "Vector128", ["Source"] = "default(Vector64)", ["Method"] = "ToVector128Unsafe()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64ToString", ["TargetType"] = "string", ["Source"] = "default(Vector64)", ["Method"] = "ToString()" }), - - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128Zero", ["TargetType"] = "Vector128", ["Source"] = "Vector128", ["Method"] = "Zero" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128AllBitsSet", ["TargetType"] = "Vector128", ["Source"] = "Vector128", ["Method"] = "AllBitsSet" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsGeneric_Boolean", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128ByteAsGeneric_Boolean", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128DoubleAsGeneric_Boolean", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128Int16AsGeneric_Boolean", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128Int32AsGeneric_Boolean", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128Int64AsGeneric_Boolean", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128SByteAsGeneric_Boolean", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128SingleAsGeneric_Boolean", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128UInt16AsGeneric_Boolean", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128UInt32AsGeneric_Boolean", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128UInt64AsGeneric_Boolean", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsGeneric_Byte", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsGeneric_Double", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsGeneric_Int16", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsGeneric_Int32", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsGeneric_Int64", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsGeneric_SByte", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsGeneric_Single", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsGeneric_UInt16", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsGeneric_UInt32", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsGeneric_UInt64", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsByte", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsByte()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsDouble", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsDouble()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsInt16", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsInt16()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsInt32", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsInt32()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsInt64", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsInt64()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsSByte", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsSByte()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsSingle", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsSingle()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsUInt16", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsUInt16()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsUInt32", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsUInt32()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsUInt64", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsUInt64()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128GetElementNegativeOne", ["TargetType"] = "bool", ["Source"] = "default(Vector128)", ["Method"] = "GetElement(-1)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128GetElement0", ["TargetType"] = "bool", ["Source"] = "default(Vector128)", ["Method"] = "GetElement(0)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128GetElementMaxValue", ["TargetType"] = "bool", ["Source"] = "default(Vector128)", ["Method"] = "GetElement(int.MaxValue)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128WithElementNegativeOne", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "WithElement(-1, false)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128WithElement0", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "WithElement(0, false)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128WithElementMaxValue", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "WithElement(int.MaxValue, false)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128GetLower", ["TargetType"] = "Vector64", ["Source"] = "default(Vector128)", ["Method"] = "GetLower()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128WithLower", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "WithLower(default(Vector64))" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128GetUpper", ["TargetType"] = "Vector64", ["Source"] = "default(Vector128)", ["Method"] = "GetUpper()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128WithUpper", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "WithUpper(default(Vector64))" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128ToScalar", ["TargetType"] = "bool", ["Source"] = "default(Vector128)", ["Method"] = "ToScalar()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128ToVector256", ["TargetType"] = "Vector256", ["Source"] = "default(Vector128)", ["Method"] = "ToVector256()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128ToVector256Unsafe", ["TargetType"] = "Vector256", ["Source"] = "default(Vector128)", ["Method"] = "ToVector256Unsafe()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128ToString", ["TargetType"] = "string", ["Source"] = "default(Vector128)", ["Method"] = "ToString()" }), - - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256Zero", ["TargetType"] = "Vector256", ["Source"] = "Vector256", ["Method"] = "Zero" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256AllBitsSet", ["TargetType"] = "Vector256", ["Source"] = "Vector256", ["Method"] = "AllBitsSet" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsGeneric_Boolean", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256ByteAsGeneric_Boolean", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256DoubleAsGeneric_Boolean", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256Int16AsGeneric_Boolean", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256Int32AsGeneric_Boolean", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256Int64AsGeneric_Boolean", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256SByteAsGeneric_Boolean", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256SingleAsGeneric_Boolean", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256UInt16AsGeneric_Boolean", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256UInt32AsGeneric_Boolean", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256UInt64AsGeneric_Boolean", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsGeneric_Byte", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsGeneric_Double", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsGeneric_Int16", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsGeneric_Int32", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsGeneric_Int64", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsGeneric_SByte", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsGeneric_Single", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsGeneric_UInt16", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsGeneric_UInt32", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsGeneric_UInt64", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsByte", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsByte()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsDouble", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsDouble()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsInt16", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsInt16()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsInt32", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsInt32()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsInt64", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsInt64()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsSByte", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsSByte()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsSingle", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsSingle()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsUInt16", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsUInt16()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsUInt32", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsUInt32()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsUInt64", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsUInt64()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256GetElementNegativeOne", ["TargetType"] = "bool", ["Source"] = "default(Vector256)", ["Method"] = "GetElement(-1)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256GetElement0", ["TargetType"] = "bool", ["Source"] = "default(Vector256)", ["Method"] = "GetElement(0)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256GetElementMaxValue", ["TargetType"] = "bool", ["Source"] = "default(Vector256)", ["Method"] = "GetElement(int.MaxValue)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256WithElementNegativeOne", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "WithElement(-1, false)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256WithElement0", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "WithElement(0, false)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256WithElementMaxValue", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "WithElement(int.MaxValue, false)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256GetLower", ["TargetType"] = "Vector128", ["Source"] = "default(Vector256)", ["Method"] = "GetLower()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256WithLower", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "WithLower(default(Vector128))" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256GetUpper", ["TargetType"] = "Vector128", ["Source"] = "default(Vector256)", ["Method"] = "GetUpper()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256WithUpper", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "WithUpper(default(Vector128))" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256ToScalar", ["TargetType"] = "bool", ["Source"] = "default(Vector256)", ["Method"] = "ToScalar()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256ToString", ["TargetType"] = "string", ["Source"] = "default(Vector256)", ["Method"] = "ToString()" }), -}; - -private static void ProcessInputs(string groupName, (string templateFileName, Dictionary templateData)[] inputs) -{ - var testListFileName = Path.Combine("..", groupName, $"Program.{groupName}.cs"); - - using (var testListFile = new StreamWriter(testListFileName, append: false)) - { - testListFile.WriteLine(@"// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - static Program() - { - TestList = new Dictionary() {"); - - foreach (var input in inputs) - { - ProcessInput(testListFile, groupName, input); - } - - testListFile.WriteLine(@" }; - } - } -}"); - } -} - -private static void ProcessInput(StreamWriter testListFile, string groupName, (string templateFileName, Dictionary templateData) input) -{ - var testName = ""; - - // Ex: ["Add.Single"] = AddSingle - if (input.templateFileName == "VectorCreateElementTest.template") - { - testName = $"{input.templateData["Method"]}Element.{input.templateData["BaseType"]}"; - testListFile.WriteLine($@" [""{testName}""] = {input.templateData["Method"]}Element{input.templateData["BaseType"]},"); - } - else if (input.templateFileName == "VectorCreateVectorTest.template") - { - testName = $"{input.templateData["Method"]}Vector.{input.templateData["BaseType"]}"; - testListFile.WriteLine($@" [""{testName}""] = {input.templateData["Method"]}Vector{input.templateData["BaseType"]},"); - } - else if (input.templateFileName == "VectorGetAndWithElementTest.template") - { - testName = $"{input.templateData["Method"]}.{input.templateData["BaseType"]}.{input.templateData["Imm"]}"; - testListFile.WriteLine($@" [""{testName}""] = {input.templateData["Method"]}{input.templateData["BaseType"]}{input.templateData["Imm"]},"); - } - else if (input.templateFileName == "VectorNotSupportedTest.template") - { - testName = input.templateData["Name"]; - testListFile.WriteLine($@" [""{testName}""] = {testName},"); - } - else - { - testName = $"{input.templateData["Method"]}.{input.templateData["BaseType"]}"; - testListFile.WriteLine($@" [""{testName}""] = {input.templateData["Method"]}{input.templateData["BaseType"]},"); - } - - var testFileName = Path.Combine("..", groupName, $"{testName}.cs"); - var template = File.ReadAllText(input.templateFileName); - - foreach (var kvp in input.templateData) - { - template = template.Replace($"{{{kvp.Key}}}", kvp.Value); - } - - File.WriteAllText(testFileName, template); -} - -ProcessInputs("Vector64", Vector64Inputs); -ProcessInputs("Vector64_1", Vector64_1Inputs); -ProcessInputs("Vector128", Vector128Inputs); -ProcessInputs("Vector128_1", Vector128_1Inputs); -ProcessInputs("Vector256", Vector256Inputs); -ProcessInputs("Vector256_1", Vector256_1Inputs); -ProcessInputs("NotSupported", NotSupportedInputs); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Shared/Program.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Shared/Program.cs deleted file mode 100644 index d35d5dc823eb..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Shared/Program.cs +++ /dev/null @@ -1,86 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private const int PASS = 100; - private const int FAIL = 0; - - private static readonly IDictionary TestList; - - public static int Main(string[] args) - { - var isPassing = true; - - foreach (string testToRun in GetTestsToRun(args)) - { - TestLibrary.TestFramework.BeginTestCase(testToRun); - - try - { - TestList[testToRun].Invoke(); - } - catch (Exception e) - { - TestLibrary.TestFramework.LogError(e.GetType().ToString(), e.Message); - TestLibrary.TestFramework.LogVerbose(e.StackTrace); - isPassing = false; - } - - TestLibrary.TestFramework.EndTestCase(); - } - - return isPassing ? PASS : FAIL; - } - - private static ICollection GetTestsToRun(string[] args) - { - var testsToRun = new HashSet(); - - for (var i = 0; i < args.Length; i++) - { - var testName = args[i]; - - if (testName.Equals("all", StringComparison.OrdinalIgnoreCase)) - { - break; - } - - if (!TestList.Keys.Contains(testName, StringComparer.OrdinalIgnoreCase)) - { - PrintUsage(); - } - - testsToRun.Add(testName); - } - - return (testsToRun.Count == 0) ? TestList.Keys : testsToRun; - } - - private static void PrintUsage() - { - TestLibrary.TestFramework.LogInformation($@"Usage: -{Environment.GetCommandLineArgs()[0]} [testName] - - [testName]: The name of the function to test. - Defaults to 'all'. - Multiple can be specified. - - Available Test Names:"); - foreach (string testName in TestList.Keys) - { - TestLibrary.TestFramework.LogInformation($" {testName}"); - } - - Environment.Exit(FAIL); - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/Create.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/Create.Byte.cs deleted file mode 100644 index 6fce9043b947..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/Create.Byte.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateByte() - { - var test = new VectorCreate__CreateByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateByte - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Byte value = TestLibrary.Generator.GetByte(); - Vector128 result = Vector128.Create(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Byte value = TestLibrary.Generator.GetByte(); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.Create), new Type[] { typeof(Byte) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector128)(result), value); - } - - private void ValidateResult(Vector128 result, Byte expectedValue, [CallerMemberName] string method = "") - { - Byte[] resultElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Byte[] resultElements, Byte expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != expectedValue) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Create(Byte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/Create.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/Create.Double.cs deleted file mode 100644 index ca135ccee962..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/Create.Double.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateDouble() - { - var test = new VectorCreate__CreateDouble(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateDouble - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Double value = TestLibrary.Generator.GetDouble(); - Vector128 result = Vector128.Create(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Double value = TestLibrary.Generator.GetDouble(); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.Create), new Type[] { typeof(Double) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector128)(result), value); - } - - private void ValidateResult(Vector128 result, Double expectedValue, [CallerMemberName] string method = "") - { - Double[] resultElements = new Double[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Double[] resultElements, Double expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != expectedValue) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Create(Double): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/Create.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/Create.Int16.cs deleted file mode 100644 index c7891f2c1afd..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/Create.Int16.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateInt16() - { - var test = new VectorCreate__CreateInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateInt16 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int16 value = TestLibrary.Generator.GetInt16(); - Vector128 result = Vector128.Create(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int16 value = TestLibrary.Generator.GetInt16(); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.Create), new Type[] { typeof(Int16) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector128)(result), value); - } - - private void ValidateResult(Vector128 result, Int16 expectedValue, [CallerMemberName] string method = "") - { - Int16[] resultElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Int16[] resultElements, Int16 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != expectedValue) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Create(Int16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/Create.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/Create.Int32.cs deleted file mode 100644 index c7878834f7ec..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/Create.Int32.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateInt32() - { - var test = new VectorCreate__CreateInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateInt32 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int32 value = TestLibrary.Generator.GetInt32(); - Vector128 result = Vector128.Create(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int32 value = TestLibrary.Generator.GetInt32(); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.Create), new Type[] { typeof(Int32) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector128)(result), value); - } - - private void ValidateResult(Vector128 result, Int32 expectedValue, [CallerMemberName] string method = "") - { - Int32[] resultElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Int32[] resultElements, Int32 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != expectedValue) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Create(Int32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/Create.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/Create.Int64.cs deleted file mode 100644 index 8251b46f71d1..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/Create.Int64.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateInt64() - { - var test = new VectorCreate__CreateInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateInt64 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int64 value = TestLibrary.Generator.GetInt64(); - Vector128 result = Vector128.Create(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int64 value = TestLibrary.Generator.GetInt64(); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.Create), new Type[] { typeof(Int64) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector128)(result), value); - } - - private void ValidateResult(Vector128 result, Int64 expectedValue, [CallerMemberName] string method = "") - { - Int64[] resultElements = new Int64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Int64[] resultElements, Int64 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != expectedValue) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Create(Int64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/Create.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/Create.SByte.cs deleted file mode 100644 index 9b9c90610585..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/Create.SByte.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateSByte() - { - var test = new VectorCreate__CreateSByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateSByte - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - SByte value = TestLibrary.Generator.GetSByte(); - Vector128 result = Vector128.Create(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - SByte value = TestLibrary.Generator.GetSByte(); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.Create), new Type[] { typeof(SByte) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector128)(result), value); - } - - private void ValidateResult(Vector128 result, SByte expectedValue, [CallerMemberName] string method = "") - { - SByte[] resultElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(SByte[] resultElements, SByte expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != expectedValue) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Create(SByte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/Create.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/Create.Single.cs deleted file mode 100644 index c9c5606a5510..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/Create.Single.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateSingle() - { - var test = new VectorCreate__CreateSingle(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateSingle - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Single value = TestLibrary.Generator.GetSingle(); - Vector128 result = Vector128.Create(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Single value = TestLibrary.Generator.GetSingle(); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.Create), new Type[] { typeof(Single) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector128)(result), value); - } - - private void ValidateResult(Vector128 result, Single expectedValue, [CallerMemberName] string method = "") - { - Single[] resultElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Single[] resultElements, Single expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != expectedValue) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Create(Single): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/Create.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/Create.UInt16.cs deleted file mode 100644 index c1fb65b1fd43..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/Create.UInt16.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateUInt16() - { - var test = new VectorCreate__CreateUInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateUInt16 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt16 value = TestLibrary.Generator.GetUInt16(); - Vector128 result = Vector128.Create(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt16 value = TestLibrary.Generator.GetUInt16(); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.Create), new Type[] { typeof(UInt16) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector128)(result), value); - } - - private void ValidateResult(Vector128 result, UInt16 expectedValue, [CallerMemberName] string method = "") - { - UInt16[] resultElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(UInt16[] resultElements, UInt16 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != expectedValue) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Create(UInt16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/Create.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/Create.UInt32.cs deleted file mode 100644 index ebdb390acc24..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/Create.UInt32.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateUInt32() - { - var test = new VectorCreate__CreateUInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateUInt32 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt32 value = TestLibrary.Generator.GetUInt32(); - Vector128 result = Vector128.Create(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt32 value = TestLibrary.Generator.GetUInt32(); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.Create), new Type[] { typeof(UInt32) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector128)(result), value); - } - - private void ValidateResult(Vector128 result, UInt32 expectedValue, [CallerMemberName] string method = "") - { - UInt32[] resultElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(UInt32[] resultElements, UInt32 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != expectedValue) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Create(UInt32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/Create.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/Create.UInt64.cs deleted file mode 100644 index b774df25ee37..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/Create.UInt64.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateUInt64() - { - var test = new VectorCreate__CreateUInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateUInt64 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt64 value = TestLibrary.Generator.GetUInt64(); - Vector128 result = Vector128.Create(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt64 value = TestLibrary.Generator.GetUInt64(); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.Create), new Type[] { typeof(UInt64) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector128)(result), value); - } - - private void ValidateResult(Vector128 result, UInt64 expectedValue, [CallerMemberName] string method = "") - { - UInt64[] resultElements = new UInt64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(UInt64[] resultElements, UInt64 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != expectedValue) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Create(UInt64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateElement.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateElement.Byte.cs deleted file mode 100644 index 5aef59a04f93..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateElement.Byte.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateElementByte() - { - var test = new VectorCreate__CreateElementByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateElementByte - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Byte[] values = new Byte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetByte(); - } - - Vector128 result = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Type[] operandTypes = new Type[ElementCount]; - Byte[] values = new Byte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - operandTypes[i] = typeof(Byte); - values[i] = TestLibrary.Generator.GetByte(); - } - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.Create), operandTypes) - .Invoke(null, new object[] { values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15] }); - - ValidateResult((Vector128)(result), values); - } - - private void ValidateResult(Vector128 result, Byte[] expectedValues, [CallerMemberName] string method = "") - { - Byte[] resultElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValues, method); - } - - private void ValidateResult(Byte[] resultElements, Byte[] expectedValues, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != expectedValues[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Create(Byte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", expectedValues)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateElement.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateElement.Double.cs deleted file mode 100644 index f6d49053cc5b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateElement.Double.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateElementDouble() - { - var test = new VectorCreate__CreateElementDouble(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateElementDouble - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Double[] values = new Double[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetDouble(); - } - - Vector128 result = Vector128.Create(values[0], values[1]); - - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Type[] operandTypes = new Type[ElementCount]; - Double[] values = new Double[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - operandTypes[i] = typeof(Double); - values[i] = TestLibrary.Generator.GetDouble(); - } - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.Create), operandTypes) - .Invoke(null, new object[] { values[0], values[1] }); - - ValidateResult((Vector128)(result), values); - } - - private void ValidateResult(Vector128 result, Double[] expectedValues, [CallerMemberName] string method = "") - { - Double[] resultElements = new Double[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValues, method); - } - - private void ValidateResult(Double[] resultElements, Double[] expectedValues, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != expectedValues[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Create(Double): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", expectedValues)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateElement.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateElement.Int16.cs deleted file mode 100644 index fee57ccf8284..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateElement.Int16.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateElementInt16() - { - var test = new VectorCreate__CreateElementInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateElementInt16 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int16[] values = new Int16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt16(); - } - - Vector128 result = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Type[] operandTypes = new Type[ElementCount]; - Int16[] values = new Int16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - operandTypes[i] = typeof(Int16); - values[i] = TestLibrary.Generator.GetInt16(); - } - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.Create), operandTypes) - .Invoke(null, new object[] { values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7] }); - - ValidateResult((Vector128)(result), values); - } - - private void ValidateResult(Vector128 result, Int16[] expectedValues, [CallerMemberName] string method = "") - { - Int16[] resultElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValues, method); - } - - private void ValidateResult(Int16[] resultElements, Int16[] expectedValues, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != expectedValues[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Create(Int16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", expectedValues)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateElement.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateElement.Int32.cs deleted file mode 100644 index 9fc1a971cbd5..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateElement.Int32.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateElementInt32() - { - var test = new VectorCreate__CreateElementInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateElementInt32 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int32[] values = new Int32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt32(); - } - - Vector128 result = Vector128.Create(values[0], values[1], values[2], values[3]); - - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Type[] operandTypes = new Type[ElementCount]; - Int32[] values = new Int32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - operandTypes[i] = typeof(Int32); - values[i] = TestLibrary.Generator.GetInt32(); - } - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.Create), operandTypes) - .Invoke(null, new object[] { values[0], values[1], values[2], values[3] }); - - ValidateResult((Vector128)(result), values); - } - - private void ValidateResult(Vector128 result, Int32[] expectedValues, [CallerMemberName] string method = "") - { - Int32[] resultElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValues, method); - } - - private void ValidateResult(Int32[] resultElements, Int32[] expectedValues, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != expectedValues[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Create(Int32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", expectedValues)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateElement.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateElement.Int64.cs deleted file mode 100644 index a414ea39892d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateElement.Int64.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateElementInt64() - { - var test = new VectorCreate__CreateElementInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateElementInt64 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int64[] values = new Int64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt64(); - } - - Vector128 result = Vector128.Create(values[0], values[1]); - - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Type[] operandTypes = new Type[ElementCount]; - Int64[] values = new Int64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - operandTypes[i] = typeof(Int64); - values[i] = TestLibrary.Generator.GetInt64(); - } - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.Create), operandTypes) - .Invoke(null, new object[] { values[0], values[1] }); - - ValidateResult((Vector128)(result), values); - } - - private void ValidateResult(Vector128 result, Int64[] expectedValues, [CallerMemberName] string method = "") - { - Int64[] resultElements = new Int64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValues, method); - } - - private void ValidateResult(Int64[] resultElements, Int64[] expectedValues, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != expectedValues[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Create(Int64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", expectedValues)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateElement.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateElement.SByte.cs deleted file mode 100644 index 851197965e33..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateElement.SByte.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateElementSByte() - { - var test = new VectorCreate__CreateElementSByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateElementSByte - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - SByte[] values = new SByte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSByte(); - } - - Vector128 result = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Type[] operandTypes = new Type[ElementCount]; - SByte[] values = new SByte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - operandTypes[i] = typeof(SByte); - values[i] = TestLibrary.Generator.GetSByte(); - } - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.Create), operandTypes) - .Invoke(null, new object[] { values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15] }); - - ValidateResult((Vector128)(result), values); - } - - private void ValidateResult(Vector128 result, SByte[] expectedValues, [CallerMemberName] string method = "") - { - SByte[] resultElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValues, method); - } - - private void ValidateResult(SByte[] resultElements, SByte[] expectedValues, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != expectedValues[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Create(SByte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", expectedValues)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateElement.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateElement.Single.cs deleted file mode 100644 index e0f3d871abe7..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateElement.Single.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateElementSingle() - { - var test = new VectorCreate__CreateElementSingle(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateElementSingle - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Single[] values = new Single[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSingle(); - } - - Vector128 result = Vector128.Create(values[0], values[1], values[2], values[3]); - - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Type[] operandTypes = new Type[ElementCount]; - Single[] values = new Single[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - operandTypes[i] = typeof(Single); - values[i] = TestLibrary.Generator.GetSingle(); - } - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.Create), operandTypes) - .Invoke(null, new object[] { values[0], values[1], values[2], values[3] }); - - ValidateResult((Vector128)(result), values); - } - - private void ValidateResult(Vector128 result, Single[] expectedValues, [CallerMemberName] string method = "") - { - Single[] resultElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValues, method); - } - - private void ValidateResult(Single[] resultElements, Single[] expectedValues, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != expectedValues[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Create(Single): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", expectedValues)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateElement.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateElement.UInt16.cs deleted file mode 100644 index f32095827ed3..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateElement.UInt16.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateElementUInt16() - { - var test = new VectorCreate__CreateElementUInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateElementUInt16 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt16[] values = new UInt16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt16(); - } - - Vector128 result = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Type[] operandTypes = new Type[ElementCount]; - UInt16[] values = new UInt16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - operandTypes[i] = typeof(UInt16); - values[i] = TestLibrary.Generator.GetUInt16(); - } - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.Create), operandTypes) - .Invoke(null, new object[] { values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7] }); - - ValidateResult((Vector128)(result), values); - } - - private void ValidateResult(Vector128 result, UInt16[] expectedValues, [CallerMemberName] string method = "") - { - UInt16[] resultElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValues, method); - } - - private void ValidateResult(UInt16[] resultElements, UInt16[] expectedValues, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != expectedValues[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Create(UInt16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", expectedValues)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateElement.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateElement.UInt32.cs deleted file mode 100644 index ab33bc98ad7b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateElement.UInt32.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateElementUInt32() - { - var test = new VectorCreate__CreateElementUInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateElementUInt32 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt32[] values = new UInt32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt32(); - } - - Vector128 result = Vector128.Create(values[0], values[1], values[2], values[3]); - - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Type[] operandTypes = new Type[ElementCount]; - UInt32[] values = new UInt32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - operandTypes[i] = typeof(UInt32); - values[i] = TestLibrary.Generator.GetUInt32(); - } - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.Create), operandTypes) - .Invoke(null, new object[] { values[0], values[1], values[2], values[3] }); - - ValidateResult((Vector128)(result), values); - } - - private void ValidateResult(Vector128 result, UInt32[] expectedValues, [CallerMemberName] string method = "") - { - UInt32[] resultElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValues, method); - } - - private void ValidateResult(UInt32[] resultElements, UInt32[] expectedValues, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != expectedValues[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Create(UInt32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", expectedValues)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateElement.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateElement.UInt64.cs deleted file mode 100644 index da0dbcf9b134..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateElement.UInt64.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateElementUInt64() - { - var test = new VectorCreate__CreateElementUInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateElementUInt64 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt64[] values = new UInt64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt64(); - } - - Vector128 result = Vector128.Create(values[0], values[1]); - - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Type[] operandTypes = new Type[ElementCount]; - UInt64[] values = new UInt64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - operandTypes[i] = typeof(UInt64); - values[i] = TestLibrary.Generator.GetUInt64(); - } - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.Create), operandTypes) - .Invoke(null, new object[] { values[0], values[1] }); - - ValidateResult((Vector128)(result), values); - } - - private void ValidateResult(Vector128 result, UInt64[] expectedValues, [CallerMemberName] string method = "") - { - UInt64[] resultElements = new UInt64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValues, method); - } - - private void ValidateResult(UInt64[] resultElements, UInt64[] expectedValues, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != expectedValues[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Create(UInt64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", expectedValues)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalar.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalar.Byte.cs deleted file mode 100644 index 22e8a9572122..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalar.Byte.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarByte() - { - var test = new VectorCreate__CreateScalarByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarByte - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Byte value = TestLibrary.Generator.GetByte(); - Vector128 result = Vector128.CreateScalar(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Byte value = TestLibrary.Generator.GetByte(); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.CreateScalar), new Type[] { typeof(Byte) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector128)(result), value); - } - - private void ValidateResult(Vector128 result, Byte expectedValue, [CallerMemberName] string method = "") - { - Byte[] resultElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Byte[] resultElements, Byte expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.CreateScalar(Byte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalar.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalar.Double.cs deleted file mode 100644 index e1ae004d06b4..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalar.Double.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarDouble() - { - var test = new VectorCreate__CreateScalarDouble(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarDouble - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Double value = TestLibrary.Generator.GetDouble(); - Vector128 result = Vector128.CreateScalar(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Double value = TestLibrary.Generator.GetDouble(); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.CreateScalar), new Type[] { typeof(Double) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector128)(result), value); - } - - private void ValidateResult(Vector128 result, Double expectedValue, [CallerMemberName] string method = "") - { - Double[] resultElements = new Double[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Double[] resultElements, Double expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.CreateScalar(Double): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalar.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalar.Int16.cs deleted file mode 100644 index eb131ffc91ce..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalar.Int16.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarInt16() - { - var test = new VectorCreate__CreateScalarInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarInt16 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int16 value = TestLibrary.Generator.GetInt16(); - Vector128 result = Vector128.CreateScalar(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int16 value = TestLibrary.Generator.GetInt16(); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.CreateScalar), new Type[] { typeof(Int16) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector128)(result), value); - } - - private void ValidateResult(Vector128 result, Int16 expectedValue, [CallerMemberName] string method = "") - { - Int16[] resultElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Int16[] resultElements, Int16 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.CreateScalar(Int16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalar.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalar.Int32.cs deleted file mode 100644 index 61bb9c9be1d9..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalar.Int32.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarInt32() - { - var test = new VectorCreate__CreateScalarInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarInt32 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int32 value = TestLibrary.Generator.GetInt32(); - Vector128 result = Vector128.CreateScalar(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int32 value = TestLibrary.Generator.GetInt32(); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.CreateScalar), new Type[] { typeof(Int32) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector128)(result), value); - } - - private void ValidateResult(Vector128 result, Int32 expectedValue, [CallerMemberName] string method = "") - { - Int32[] resultElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Int32[] resultElements, Int32 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.CreateScalar(Int32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalar.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalar.Int64.cs deleted file mode 100644 index 43b3f673666c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalar.Int64.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarInt64() - { - var test = new VectorCreate__CreateScalarInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarInt64 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int64 value = TestLibrary.Generator.GetInt64(); - Vector128 result = Vector128.CreateScalar(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int64 value = TestLibrary.Generator.GetInt64(); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.CreateScalar), new Type[] { typeof(Int64) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector128)(result), value); - } - - private void ValidateResult(Vector128 result, Int64 expectedValue, [CallerMemberName] string method = "") - { - Int64[] resultElements = new Int64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Int64[] resultElements, Int64 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.CreateScalar(Int64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalar.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalar.SByte.cs deleted file mode 100644 index 1475116179fc..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalar.SByte.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarSByte() - { - var test = new VectorCreate__CreateScalarSByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarSByte - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - SByte value = TestLibrary.Generator.GetSByte(); - Vector128 result = Vector128.CreateScalar(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - SByte value = TestLibrary.Generator.GetSByte(); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.CreateScalar), new Type[] { typeof(SByte) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector128)(result), value); - } - - private void ValidateResult(Vector128 result, SByte expectedValue, [CallerMemberName] string method = "") - { - SByte[] resultElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(SByte[] resultElements, SByte expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.CreateScalar(SByte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalar.Single.cs deleted file mode 100644 index 4a4759a99b5e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalar.Single.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarSingle() - { - var test = new VectorCreate__CreateScalarSingle(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarSingle - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Single value = TestLibrary.Generator.GetSingle(); - Vector128 result = Vector128.CreateScalar(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Single value = TestLibrary.Generator.GetSingle(); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.CreateScalar), new Type[] { typeof(Single) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector128)(result), value); - } - - private void ValidateResult(Vector128 result, Single expectedValue, [CallerMemberName] string method = "") - { - Single[] resultElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Single[] resultElements, Single expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.CreateScalar(Single): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalar.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalar.UInt16.cs deleted file mode 100644 index e628892db48c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalar.UInt16.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUInt16() - { - var test = new VectorCreate__CreateScalarUInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUInt16 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt16 value = TestLibrary.Generator.GetUInt16(); - Vector128 result = Vector128.CreateScalar(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt16 value = TestLibrary.Generator.GetUInt16(); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.CreateScalar), new Type[] { typeof(UInt16) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector128)(result), value); - } - - private void ValidateResult(Vector128 result, UInt16 expectedValue, [CallerMemberName] string method = "") - { - UInt16[] resultElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(UInt16[] resultElements, UInt16 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.CreateScalar(UInt16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalar.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalar.UInt32.cs deleted file mode 100644 index be3fa869d93a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalar.UInt32.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUInt32() - { - var test = new VectorCreate__CreateScalarUInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUInt32 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt32 value = TestLibrary.Generator.GetUInt32(); - Vector128 result = Vector128.CreateScalar(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt32 value = TestLibrary.Generator.GetUInt32(); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.CreateScalar), new Type[] { typeof(UInt32) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector128)(result), value); - } - - private void ValidateResult(Vector128 result, UInt32 expectedValue, [CallerMemberName] string method = "") - { - UInt32[] resultElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(UInt32[] resultElements, UInt32 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.CreateScalar(UInt32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalar.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalar.UInt64.cs deleted file mode 100644 index 02ec93d08bfc..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalar.UInt64.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUInt64() - { - var test = new VectorCreate__CreateScalarUInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUInt64 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt64 value = TestLibrary.Generator.GetUInt64(); - Vector128 result = Vector128.CreateScalar(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt64 value = TestLibrary.Generator.GetUInt64(); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.CreateScalar), new Type[] { typeof(UInt64) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector128)(result), value); - } - - private void ValidateResult(Vector128 result, UInt64 expectedValue, [CallerMemberName] string method = "") - { - UInt64[] resultElements = new UInt64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(UInt64[] resultElements, UInt64 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.CreateScalar(UInt64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalarUnsafe.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalarUnsafe.Byte.cs deleted file mode 100644 index 5dc33f1ee676..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalarUnsafe.Byte.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUnsafeByte() - { - var test = new VectorCreate__CreateScalarUnsafeByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUnsafeByte - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Byte value = TestLibrary.Generator.GetByte(); - Vector128 result = Vector128.CreateScalarUnsafe(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Byte value = TestLibrary.Generator.GetByte(); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.CreateScalarUnsafe), new Type[] { typeof(Byte) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector128)(result), value); - } - - private void ValidateResult(Vector128 result, Byte expectedValue, [CallerMemberName] string method = "") - { - Byte[] resultElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Byte[] resultElements, Byte expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (false /* value is uninitialized */) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.CreateScalarUnsafe(Byte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalarUnsafe.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalarUnsafe.Double.cs deleted file mode 100644 index bad0e4e83552..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalarUnsafe.Double.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUnsafeDouble() - { - var test = new VectorCreate__CreateScalarUnsafeDouble(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUnsafeDouble - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Double value = TestLibrary.Generator.GetDouble(); - Vector128 result = Vector128.CreateScalarUnsafe(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Double value = TestLibrary.Generator.GetDouble(); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.CreateScalarUnsafe), new Type[] { typeof(Double) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector128)(result), value); - } - - private void ValidateResult(Vector128 result, Double expectedValue, [CallerMemberName] string method = "") - { - Double[] resultElements = new Double[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Double[] resultElements, Double expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (false /* value is uninitialized */) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.CreateScalarUnsafe(Double): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalarUnsafe.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalarUnsafe.Int16.cs deleted file mode 100644 index 883753480d94..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalarUnsafe.Int16.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUnsafeInt16() - { - var test = new VectorCreate__CreateScalarUnsafeInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUnsafeInt16 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int16 value = TestLibrary.Generator.GetInt16(); - Vector128 result = Vector128.CreateScalarUnsafe(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int16 value = TestLibrary.Generator.GetInt16(); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.CreateScalarUnsafe), new Type[] { typeof(Int16) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector128)(result), value); - } - - private void ValidateResult(Vector128 result, Int16 expectedValue, [CallerMemberName] string method = "") - { - Int16[] resultElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Int16[] resultElements, Int16 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (false /* value is uninitialized */) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.CreateScalarUnsafe(Int16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalarUnsafe.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalarUnsafe.Int32.cs deleted file mode 100644 index 288a134ed645..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalarUnsafe.Int32.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUnsafeInt32() - { - var test = new VectorCreate__CreateScalarUnsafeInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUnsafeInt32 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int32 value = TestLibrary.Generator.GetInt32(); - Vector128 result = Vector128.CreateScalarUnsafe(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int32 value = TestLibrary.Generator.GetInt32(); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.CreateScalarUnsafe), new Type[] { typeof(Int32) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector128)(result), value); - } - - private void ValidateResult(Vector128 result, Int32 expectedValue, [CallerMemberName] string method = "") - { - Int32[] resultElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Int32[] resultElements, Int32 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (false /* value is uninitialized */) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.CreateScalarUnsafe(Int32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalarUnsafe.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalarUnsafe.Int64.cs deleted file mode 100644 index ea5508be3412..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalarUnsafe.Int64.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUnsafeInt64() - { - var test = new VectorCreate__CreateScalarUnsafeInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUnsafeInt64 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int64 value = TestLibrary.Generator.GetInt64(); - Vector128 result = Vector128.CreateScalarUnsafe(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int64 value = TestLibrary.Generator.GetInt64(); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.CreateScalarUnsafe), new Type[] { typeof(Int64) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector128)(result), value); - } - - private void ValidateResult(Vector128 result, Int64 expectedValue, [CallerMemberName] string method = "") - { - Int64[] resultElements = new Int64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Int64[] resultElements, Int64 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (false /* value is uninitialized */) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.CreateScalarUnsafe(Int64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalarUnsafe.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalarUnsafe.SByte.cs deleted file mode 100644 index b3a3489d197d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalarUnsafe.SByte.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUnsafeSByte() - { - var test = new VectorCreate__CreateScalarUnsafeSByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUnsafeSByte - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - SByte value = TestLibrary.Generator.GetSByte(); - Vector128 result = Vector128.CreateScalarUnsafe(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - SByte value = TestLibrary.Generator.GetSByte(); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.CreateScalarUnsafe), new Type[] { typeof(SByte) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector128)(result), value); - } - - private void ValidateResult(Vector128 result, SByte expectedValue, [CallerMemberName] string method = "") - { - SByte[] resultElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(SByte[] resultElements, SByte expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (false /* value is uninitialized */) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.CreateScalarUnsafe(SByte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalarUnsafe.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalarUnsafe.Single.cs deleted file mode 100644 index ce9664c58b2a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalarUnsafe.Single.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUnsafeSingle() - { - var test = new VectorCreate__CreateScalarUnsafeSingle(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUnsafeSingle - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Single value = TestLibrary.Generator.GetSingle(); - Vector128 result = Vector128.CreateScalarUnsafe(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Single value = TestLibrary.Generator.GetSingle(); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.CreateScalarUnsafe), new Type[] { typeof(Single) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector128)(result), value); - } - - private void ValidateResult(Vector128 result, Single expectedValue, [CallerMemberName] string method = "") - { - Single[] resultElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Single[] resultElements, Single expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (false /* value is uninitialized */) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.CreateScalarUnsafe(Single): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalarUnsafe.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalarUnsafe.UInt16.cs deleted file mode 100644 index a2ca916c85ad..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalarUnsafe.UInt16.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUnsafeUInt16() - { - var test = new VectorCreate__CreateScalarUnsafeUInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUnsafeUInt16 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt16 value = TestLibrary.Generator.GetUInt16(); - Vector128 result = Vector128.CreateScalarUnsafe(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt16 value = TestLibrary.Generator.GetUInt16(); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.CreateScalarUnsafe), new Type[] { typeof(UInt16) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector128)(result), value); - } - - private void ValidateResult(Vector128 result, UInt16 expectedValue, [CallerMemberName] string method = "") - { - UInt16[] resultElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(UInt16[] resultElements, UInt16 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (false /* value is uninitialized */) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.CreateScalarUnsafe(UInt16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalarUnsafe.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalarUnsafe.UInt32.cs deleted file mode 100644 index 44742fb8867a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalarUnsafe.UInt32.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUnsafeUInt32() - { - var test = new VectorCreate__CreateScalarUnsafeUInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUnsafeUInt32 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt32 value = TestLibrary.Generator.GetUInt32(); - Vector128 result = Vector128.CreateScalarUnsafe(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt32 value = TestLibrary.Generator.GetUInt32(); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.CreateScalarUnsafe), new Type[] { typeof(UInt32) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector128)(result), value); - } - - private void ValidateResult(Vector128 result, UInt32 expectedValue, [CallerMemberName] string method = "") - { - UInt32[] resultElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(UInt32[] resultElements, UInt32 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (false /* value is uninitialized */) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.CreateScalarUnsafe(UInt32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalarUnsafe.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalarUnsafe.UInt64.cs deleted file mode 100644 index 572175f36e22..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateScalarUnsafe.UInt64.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUnsafeUInt64() - { - var test = new VectorCreate__CreateScalarUnsafeUInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUnsafeUInt64 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt64 value = TestLibrary.Generator.GetUInt64(); - Vector128 result = Vector128.CreateScalarUnsafe(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt64 value = TestLibrary.Generator.GetUInt64(); - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.CreateScalarUnsafe), new Type[] { typeof(UInt64) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector128)(result), value); - } - - private void ValidateResult(Vector128 result, UInt64 expectedValue, [CallerMemberName] string method = "") - { - UInt64[] resultElements = new UInt64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(UInt64[] resultElements, UInt64 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (false /* value is uninitialized */) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.CreateScalarUnsafe(UInt64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateVector.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateVector.Byte.cs deleted file mode 100644 index fee5002f83d6..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateVector.Byte.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateVectorByte() - { - var test = new VectorCreate__CreateVectorByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateVectorByte - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Byte lowerValue = TestLibrary.Generator.GetByte(); - Vector64 lower = Vector64.Create(lowerValue); - - Byte upperValue = TestLibrary.Generator.GetByte(); - Vector64 upper = Vector64.Create(upperValue); - - Vector128 result = Vector128.Create(lower, upper); - - ValidateResult(result, lowerValue, upperValue); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Byte lowerValue = TestLibrary.Generator.GetByte(); - Vector64 lower = Vector64.Create(lowerValue); - - Byte upperValue = TestLibrary.Generator.GetByte(); - Vector64 upper = Vector64.Create(upperValue); - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.Create), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { lower, upper }); - - ValidateResult((Vector128)(result), lowerValue, upperValue); - } - - private void ValidateResult(Vector128 result, Byte expectedLowerValue, Byte expectedUpperValue, [CallerMemberName] string method = "") - { - Byte[] resultElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedLowerValue, expectedUpperValue, method); - } - - private void ValidateResult(Byte[] resultElements, Byte expectedLowerValue, Byte expectedUpperValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount / 2; i++) - { - if (resultElements[i] != expectedLowerValue) - { - succeeded = false; - break; - } - } - - for (var i = ElementCount / 2; i < ElementCount; i++) - { - if (resultElements[i] != expectedUpperValue) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Create(Byte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" lower: {expectedLowerValue}"); - TestLibrary.TestFramework.LogInformation($" upper: {expectedUpperValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateVector.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateVector.Double.cs deleted file mode 100644 index ce42868bf17c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateVector.Double.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateVectorDouble() - { - var test = new VectorCreate__CreateVectorDouble(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateVectorDouble - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Double lowerValue = TestLibrary.Generator.GetDouble(); - Vector64 lower = Vector64.Create(lowerValue); - - Double upperValue = TestLibrary.Generator.GetDouble(); - Vector64 upper = Vector64.Create(upperValue); - - Vector128 result = Vector128.Create(lower, upper); - - ValidateResult(result, lowerValue, upperValue); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Double lowerValue = TestLibrary.Generator.GetDouble(); - Vector64 lower = Vector64.Create(lowerValue); - - Double upperValue = TestLibrary.Generator.GetDouble(); - Vector64 upper = Vector64.Create(upperValue); - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.Create), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { lower, upper }); - - ValidateResult((Vector128)(result), lowerValue, upperValue); - } - - private void ValidateResult(Vector128 result, Double expectedLowerValue, Double expectedUpperValue, [CallerMemberName] string method = "") - { - Double[] resultElements = new Double[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedLowerValue, expectedUpperValue, method); - } - - private void ValidateResult(Double[] resultElements, Double expectedLowerValue, Double expectedUpperValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount / 2; i++) - { - if (resultElements[i] != expectedLowerValue) - { - succeeded = false; - break; - } - } - - for (var i = ElementCount / 2; i < ElementCount; i++) - { - if (resultElements[i] != expectedUpperValue) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Create(Double): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" lower: {expectedLowerValue}"); - TestLibrary.TestFramework.LogInformation($" upper: {expectedUpperValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateVector.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateVector.Int16.cs deleted file mode 100644 index f1257a379e4e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateVector.Int16.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateVectorInt16() - { - var test = new VectorCreate__CreateVectorInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateVectorInt16 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int16 lowerValue = TestLibrary.Generator.GetInt16(); - Vector64 lower = Vector64.Create(lowerValue); - - Int16 upperValue = TestLibrary.Generator.GetInt16(); - Vector64 upper = Vector64.Create(upperValue); - - Vector128 result = Vector128.Create(lower, upper); - - ValidateResult(result, lowerValue, upperValue); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int16 lowerValue = TestLibrary.Generator.GetInt16(); - Vector64 lower = Vector64.Create(lowerValue); - - Int16 upperValue = TestLibrary.Generator.GetInt16(); - Vector64 upper = Vector64.Create(upperValue); - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.Create), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { lower, upper }); - - ValidateResult((Vector128)(result), lowerValue, upperValue); - } - - private void ValidateResult(Vector128 result, Int16 expectedLowerValue, Int16 expectedUpperValue, [CallerMemberName] string method = "") - { - Int16[] resultElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedLowerValue, expectedUpperValue, method); - } - - private void ValidateResult(Int16[] resultElements, Int16 expectedLowerValue, Int16 expectedUpperValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount / 2; i++) - { - if (resultElements[i] != expectedLowerValue) - { - succeeded = false; - break; - } - } - - for (var i = ElementCount / 2; i < ElementCount; i++) - { - if (resultElements[i] != expectedUpperValue) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Create(Int16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" lower: {expectedLowerValue}"); - TestLibrary.TestFramework.LogInformation($" upper: {expectedUpperValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateVector.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateVector.Int32.cs deleted file mode 100644 index 5dfd86fb5d57..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateVector.Int32.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateVectorInt32() - { - var test = new VectorCreate__CreateVectorInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateVectorInt32 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int32 lowerValue = TestLibrary.Generator.GetInt32(); - Vector64 lower = Vector64.Create(lowerValue); - - Int32 upperValue = TestLibrary.Generator.GetInt32(); - Vector64 upper = Vector64.Create(upperValue); - - Vector128 result = Vector128.Create(lower, upper); - - ValidateResult(result, lowerValue, upperValue); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int32 lowerValue = TestLibrary.Generator.GetInt32(); - Vector64 lower = Vector64.Create(lowerValue); - - Int32 upperValue = TestLibrary.Generator.GetInt32(); - Vector64 upper = Vector64.Create(upperValue); - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.Create), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { lower, upper }); - - ValidateResult((Vector128)(result), lowerValue, upperValue); - } - - private void ValidateResult(Vector128 result, Int32 expectedLowerValue, Int32 expectedUpperValue, [CallerMemberName] string method = "") - { - Int32[] resultElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedLowerValue, expectedUpperValue, method); - } - - private void ValidateResult(Int32[] resultElements, Int32 expectedLowerValue, Int32 expectedUpperValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount / 2; i++) - { - if (resultElements[i] != expectedLowerValue) - { - succeeded = false; - break; - } - } - - for (var i = ElementCount / 2; i < ElementCount; i++) - { - if (resultElements[i] != expectedUpperValue) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Create(Int32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" lower: {expectedLowerValue}"); - TestLibrary.TestFramework.LogInformation($" upper: {expectedUpperValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateVector.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateVector.Int64.cs deleted file mode 100644 index 44882579f368..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateVector.Int64.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateVectorInt64() - { - var test = new VectorCreate__CreateVectorInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateVectorInt64 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int64 lowerValue = TestLibrary.Generator.GetInt64(); - Vector64 lower = Vector64.Create(lowerValue); - - Int64 upperValue = TestLibrary.Generator.GetInt64(); - Vector64 upper = Vector64.Create(upperValue); - - Vector128 result = Vector128.Create(lower, upper); - - ValidateResult(result, lowerValue, upperValue); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int64 lowerValue = TestLibrary.Generator.GetInt64(); - Vector64 lower = Vector64.Create(lowerValue); - - Int64 upperValue = TestLibrary.Generator.GetInt64(); - Vector64 upper = Vector64.Create(upperValue); - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.Create), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { lower, upper }); - - ValidateResult((Vector128)(result), lowerValue, upperValue); - } - - private void ValidateResult(Vector128 result, Int64 expectedLowerValue, Int64 expectedUpperValue, [CallerMemberName] string method = "") - { - Int64[] resultElements = new Int64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedLowerValue, expectedUpperValue, method); - } - - private void ValidateResult(Int64[] resultElements, Int64 expectedLowerValue, Int64 expectedUpperValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount / 2; i++) - { - if (resultElements[i] != expectedLowerValue) - { - succeeded = false; - break; - } - } - - for (var i = ElementCount / 2; i < ElementCount; i++) - { - if (resultElements[i] != expectedUpperValue) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Create(Int64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" lower: {expectedLowerValue}"); - TestLibrary.TestFramework.LogInformation($" upper: {expectedUpperValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateVector.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateVector.SByte.cs deleted file mode 100644 index 686565a9b96d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateVector.SByte.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateVectorSByte() - { - var test = new VectorCreate__CreateVectorSByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateVectorSByte - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - SByte lowerValue = TestLibrary.Generator.GetSByte(); - Vector64 lower = Vector64.Create(lowerValue); - - SByte upperValue = TestLibrary.Generator.GetSByte(); - Vector64 upper = Vector64.Create(upperValue); - - Vector128 result = Vector128.Create(lower, upper); - - ValidateResult(result, lowerValue, upperValue); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - SByte lowerValue = TestLibrary.Generator.GetSByte(); - Vector64 lower = Vector64.Create(lowerValue); - - SByte upperValue = TestLibrary.Generator.GetSByte(); - Vector64 upper = Vector64.Create(upperValue); - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.Create), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { lower, upper }); - - ValidateResult((Vector128)(result), lowerValue, upperValue); - } - - private void ValidateResult(Vector128 result, SByte expectedLowerValue, SByte expectedUpperValue, [CallerMemberName] string method = "") - { - SByte[] resultElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedLowerValue, expectedUpperValue, method); - } - - private void ValidateResult(SByte[] resultElements, SByte expectedLowerValue, SByte expectedUpperValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount / 2; i++) - { - if (resultElements[i] != expectedLowerValue) - { - succeeded = false; - break; - } - } - - for (var i = ElementCount / 2; i < ElementCount; i++) - { - if (resultElements[i] != expectedUpperValue) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Create(SByte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" lower: {expectedLowerValue}"); - TestLibrary.TestFramework.LogInformation($" upper: {expectedUpperValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateVector.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateVector.Single.cs deleted file mode 100644 index 23dc7d6583a2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateVector.Single.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateVectorSingle() - { - var test = new VectorCreate__CreateVectorSingle(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateVectorSingle - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Single lowerValue = TestLibrary.Generator.GetSingle(); - Vector64 lower = Vector64.Create(lowerValue); - - Single upperValue = TestLibrary.Generator.GetSingle(); - Vector64 upper = Vector64.Create(upperValue); - - Vector128 result = Vector128.Create(lower, upper); - - ValidateResult(result, lowerValue, upperValue); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Single lowerValue = TestLibrary.Generator.GetSingle(); - Vector64 lower = Vector64.Create(lowerValue); - - Single upperValue = TestLibrary.Generator.GetSingle(); - Vector64 upper = Vector64.Create(upperValue); - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.Create), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { lower, upper }); - - ValidateResult((Vector128)(result), lowerValue, upperValue); - } - - private void ValidateResult(Vector128 result, Single expectedLowerValue, Single expectedUpperValue, [CallerMemberName] string method = "") - { - Single[] resultElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedLowerValue, expectedUpperValue, method); - } - - private void ValidateResult(Single[] resultElements, Single expectedLowerValue, Single expectedUpperValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount / 2; i++) - { - if (resultElements[i] != expectedLowerValue) - { - succeeded = false; - break; - } - } - - for (var i = ElementCount / 2; i < ElementCount; i++) - { - if (resultElements[i] != expectedUpperValue) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Create(Single): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" lower: {expectedLowerValue}"); - TestLibrary.TestFramework.LogInformation($" upper: {expectedUpperValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateVector.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateVector.UInt16.cs deleted file mode 100644 index eaca06522cc2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateVector.UInt16.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateVectorUInt16() - { - var test = new VectorCreate__CreateVectorUInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateVectorUInt16 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt16 lowerValue = TestLibrary.Generator.GetUInt16(); - Vector64 lower = Vector64.Create(lowerValue); - - UInt16 upperValue = TestLibrary.Generator.GetUInt16(); - Vector64 upper = Vector64.Create(upperValue); - - Vector128 result = Vector128.Create(lower, upper); - - ValidateResult(result, lowerValue, upperValue); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt16 lowerValue = TestLibrary.Generator.GetUInt16(); - Vector64 lower = Vector64.Create(lowerValue); - - UInt16 upperValue = TestLibrary.Generator.GetUInt16(); - Vector64 upper = Vector64.Create(upperValue); - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.Create), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { lower, upper }); - - ValidateResult((Vector128)(result), lowerValue, upperValue); - } - - private void ValidateResult(Vector128 result, UInt16 expectedLowerValue, UInt16 expectedUpperValue, [CallerMemberName] string method = "") - { - UInt16[] resultElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedLowerValue, expectedUpperValue, method); - } - - private void ValidateResult(UInt16[] resultElements, UInt16 expectedLowerValue, UInt16 expectedUpperValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount / 2; i++) - { - if (resultElements[i] != expectedLowerValue) - { - succeeded = false; - break; - } - } - - for (var i = ElementCount / 2; i < ElementCount; i++) - { - if (resultElements[i] != expectedUpperValue) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Create(UInt16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" lower: {expectedLowerValue}"); - TestLibrary.TestFramework.LogInformation($" upper: {expectedUpperValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateVector.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateVector.UInt32.cs deleted file mode 100644 index 721bceae4df6..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateVector.UInt32.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateVectorUInt32() - { - var test = new VectorCreate__CreateVectorUInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateVectorUInt32 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt32 lowerValue = TestLibrary.Generator.GetUInt32(); - Vector64 lower = Vector64.Create(lowerValue); - - UInt32 upperValue = TestLibrary.Generator.GetUInt32(); - Vector64 upper = Vector64.Create(upperValue); - - Vector128 result = Vector128.Create(lower, upper); - - ValidateResult(result, lowerValue, upperValue); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt32 lowerValue = TestLibrary.Generator.GetUInt32(); - Vector64 lower = Vector64.Create(lowerValue); - - UInt32 upperValue = TestLibrary.Generator.GetUInt32(); - Vector64 upper = Vector64.Create(upperValue); - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.Create), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { lower, upper }); - - ValidateResult((Vector128)(result), lowerValue, upperValue); - } - - private void ValidateResult(Vector128 result, UInt32 expectedLowerValue, UInt32 expectedUpperValue, [CallerMemberName] string method = "") - { - UInt32[] resultElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedLowerValue, expectedUpperValue, method); - } - - private void ValidateResult(UInt32[] resultElements, UInt32 expectedLowerValue, UInt32 expectedUpperValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount / 2; i++) - { - if (resultElements[i] != expectedLowerValue) - { - succeeded = false; - break; - } - } - - for (var i = ElementCount / 2; i < ElementCount; i++) - { - if (resultElements[i] != expectedUpperValue) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Create(UInt32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" lower: {expectedLowerValue}"); - TestLibrary.TestFramework.LogInformation($" upper: {expectedUpperValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateVector.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateVector.UInt64.cs deleted file mode 100644 index 61f6316e116a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128/CreateVector.UInt64.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateVectorUInt64() - { - var test = new VectorCreate__CreateVectorUInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateVectorUInt64 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt64 lowerValue = TestLibrary.Generator.GetUInt64(); - Vector64 lower = Vector64.Create(lowerValue); - - UInt64 upperValue = TestLibrary.Generator.GetUInt64(); - Vector64 upper = Vector64.Create(upperValue); - - Vector128 result = Vector128.Create(lower, upper); - - ValidateResult(result, lowerValue, upperValue); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt64 lowerValue = TestLibrary.Generator.GetUInt64(); - Vector64 lower = Vector64.Create(lowerValue); - - UInt64 upperValue = TestLibrary.Generator.GetUInt64(); - Vector64 upper = Vector64.Create(upperValue); - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.Create), new Type[] { typeof(Vector64), typeof(Vector64) }) - .Invoke(null, new object[] { lower, upper }); - - ValidateResult((Vector128)(result), lowerValue, upperValue); - } - - private void ValidateResult(Vector128 result, UInt64 expectedLowerValue, UInt64 expectedUpperValue, [CallerMemberName] string method = "") - { - UInt64[] resultElements = new UInt64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedLowerValue, expectedUpperValue, method); - } - - private void ValidateResult(UInt64[] resultElements, UInt64 expectedLowerValue, UInt64 expectedUpperValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount / 2; i++) - { - if (resultElements[i] != expectedLowerValue) - { - succeeded = false; - break; - } - } - - for (var i = ElementCount / 2; i < ElementCount; i++) - { - if (resultElements[i] != expectedUpperValue) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Create(UInt64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" lower: {expectedLowerValue}"); - TestLibrary.TestFramework.LogInformation($" upper: {expectedUpperValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AllBitsSet.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AllBitsSet.Byte.cs deleted file mode 100644 index 8bd51234ad9d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AllBitsSet.Byte.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AllBitsSetByte() - { - var test = new VectorAllBitsSet__AllBitsSetByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAllBitsSet__AllBitsSetByte - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector128 result = Vector128.AllBitsSet; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector128) - .GetProperty(nameof(Vector128.AllBitsSet), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector128)(result)); - } - - private void ValidateResult(Vector128 result, [CallerMemberName] string method = "") - { - Byte[] resultElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private unsafe void ValidateResult(Byte[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - for (var i = 0; i < ElementCount; i++) - { - if (!HasAllBitsSet(resultElements[i])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.AllBitsSet(Byte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private unsafe bool HasAllBitsSet(Byte value) - { - for (int i = 0; i < sizeof(Byte); i++) - { - if (((byte*)&value)[i] != 0xFF) - return false; - } - return true; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AllBitsSet.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AllBitsSet.Double.cs deleted file mode 100644 index b28d53fb6d0a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AllBitsSet.Double.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AllBitsSetDouble() - { - var test = new VectorAllBitsSet__AllBitsSetDouble(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAllBitsSet__AllBitsSetDouble - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector128 result = Vector128.AllBitsSet; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector128) - .GetProperty(nameof(Vector128.AllBitsSet), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector128)(result)); - } - - private void ValidateResult(Vector128 result, [CallerMemberName] string method = "") - { - Double[] resultElements = new Double[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private unsafe void ValidateResult(Double[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - for (var i = 0; i < ElementCount; i++) - { - if (!HasAllBitsSet(resultElements[i])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.AllBitsSet(Double): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private unsafe bool HasAllBitsSet(Double value) - { - for (int i = 0; i < sizeof(Double); i++) - { - if (((byte*)&value)[i] != 0xFF) - return false; - } - return true; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AllBitsSet.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AllBitsSet.Int16.cs deleted file mode 100644 index 9b7b179028d8..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AllBitsSet.Int16.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AllBitsSetInt16() - { - var test = new VectorAllBitsSet__AllBitsSetInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAllBitsSet__AllBitsSetInt16 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector128 result = Vector128.AllBitsSet; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector128) - .GetProperty(nameof(Vector128.AllBitsSet), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector128)(result)); - } - - private void ValidateResult(Vector128 result, [CallerMemberName] string method = "") - { - Int16[] resultElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private unsafe void ValidateResult(Int16[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - for (var i = 0; i < ElementCount; i++) - { - if (!HasAllBitsSet(resultElements[i])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.AllBitsSet(Int16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private unsafe bool HasAllBitsSet(Int16 value) - { - for (int i = 0; i < sizeof(Int16); i++) - { - if (((byte*)&value)[i] != 0xFF) - return false; - } - return true; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AllBitsSet.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AllBitsSet.Int32.cs deleted file mode 100644 index 6dad97c8c67d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AllBitsSet.Int32.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AllBitsSetInt32() - { - var test = new VectorAllBitsSet__AllBitsSetInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAllBitsSet__AllBitsSetInt32 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector128 result = Vector128.AllBitsSet; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector128) - .GetProperty(nameof(Vector128.AllBitsSet), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector128)(result)); - } - - private void ValidateResult(Vector128 result, [CallerMemberName] string method = "") - { - Int32[] resultElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private unsafe void ValidateResult(Int32[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - for (var i = 0; i < ElementCount; i++) - { - if (!HasAllBitsSet(resultElements[i])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.AllBitsSet(Int32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private unsafe bool HasAllBitsSet(Int32 value) - { - for (int i = 0; i < sizeof(Int32); i++) - { - if (((byte*)&value)[i] != 0xFF) - return false; - } - return true; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AllBitsSet.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AllBitsSet.Int64.cs deleted file mode 100644 index dfcb4ab79c0c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AllBitsSet.Int64.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AllBitsSetInt64() - { - var test = new VectorAllBitsSet__AllBitsSetInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAllBitsSet__AllBitsSetInt64 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector128 result = Vector128.AllBitsSet; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector128) - .GetProperty(nameof(Vector128.AllBitsSet), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector128)(result)); - } - - private void ValidateResult(Vector128 result, [CallerMemberName] string method = "") - { - Int64[] resultElements = new Int64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private unsafe void ValidateResult(Int64[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - for (var i = 0; i < ElementCount; i++) - { - if (!HasAllBitsSet(resultElements[i])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.AllBitsSet(Int64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private unsafe bool HasAllBitsSet(Int64 value) - { - for (int i = 0; i < sizeof(Int64); i++) - { - if (((byte*)&value)[i] != 0xFF) - return false; - } - return true; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AllBitsSet.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AllBitsSet.SByte.cs deleted file mode 100644 index 46d21652e711..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AllBitsSet.SByte.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AllBitsSetSByte() - { - var test = new VectorAllBitsSet__AllBitsSetSByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAllBitsSet__AllBitsSetSByte - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector128 result = Vector128.AllBitsSet; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector128) - .GetProperty(nameof(Vector128.AllBitsSet), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector128)(result)); - } - - private void ValidateResult(Vector128 result, [CallerMemberName] string method = "") - { - SByte[] resultElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private unsafe void ValidateResult(SByte[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - for (var i = 0; i < ElementCount; i++) - { - if (!HasAllBitsSet(resultElements[i])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.AllBitsSet(SByte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private unsafe bool HasAllBitsSet(SByte value) - { - for (int i = 0; i < sizeof(SByte); i++) - { - if (((byte*)&value)[i] != 0xFF) - return false; - } - return true; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AllBitsSet.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AllBitsSet.Single.cs deleted file mode 100644 index 878eb567aed5..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AllBitsSet.Single.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AllBitsSetSingle() - { - var test = new VectorAllBitsSet__AllBitsSetSingle(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAllBitsSet__AllBitsSetSingle - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector128 result = Vector128.AllBitsSet; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector128) - .GetProperty(nameof(Vector128.AllBitsSet), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector128)(result)); - } - - private void ValidateResult(Vector128 result, [CallerMemberName] string method = "") - { - Single[] resultElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private unsafe void ValidateResult(Single[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - for (var i = 0; i < ElementCount; i++) - { - if (!HasAllBitsSet(resultElements[i])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.AllBitsSet(Single): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private unsafe bool HasAllBitsSet(Single value) - { - for (int i = 0; i < sizeof(Single); i++) - { - if (((byte*)&value)[i] != 0xFF) - return false; - } - return true; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AllBitsSet.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AllBitsSet.UInt16.cs deleted file mode 100644 index 8f7f241dc7cd..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AllBitsSet.UInt16.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AllBitsSetUInt16() - { - var test = new VectorAllBitsSet__AllBitsSetUInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAllBitsSet__AllBitsSetUInt16 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector128 result = Vector128.AllBitsSet; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector128) - .GetProperty(nameof(Vector128.AllBitsSet), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector128)(result)); - } - - private void ValidateResult(Vector128 result, [CallerMemberName] string method = "") - { - UInt16[] resultElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private unsafe void ValidateResult(UInt16[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - for (var i = 0; i < ElementCount; i++) - { - if (!HasAllBitsSet(resultElements[i])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.AllBitsSet(UInt16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private unsafe bool HasAllBitsSet(UInt16 value) - { - for (int i = 0; i < sizeof(UInt16); i++) - { - if (((byte*)&value)[i] != 0xFF) - return false; - } - return true; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AllBitsSet.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AllBitsSet.UInt32.cs deleted file mode 100644 index 2521ad706e8a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AllBitsSet.UInt32.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AllBitsSetUInt32() - { - var test = new VectorAllBitsSet__AllBitsSetUInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAllBitsSet__AllBitsSetUInt32 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector128 result = Vector128.AllBitsSet; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector128) - .GetProperty(nameof(Vector128.AllBitsSet), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector128)(result)); - } - - private void ValidateResult(Vector128 result, [CallerMemberName] string method = "") - { - UInt32[] resultElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private unsafe void ValidateResult(UInt32[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - for (var i = 0; i < ElementCount; i++) - { - if (!HasAllBitsSet(resultElements[i])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.AllBitsSet(UInt32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private unsafe bool HasAllBitsSet(UInt32 value) - { - for (int i = 0; i < sizeof(UInt32); i++) - { - if (((byte*)&value)[i] != 0xFF) - return false; - } - return true; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AllBitsSet.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AllBitsSet.UInt64.cs deleted file mode 100644 index 51bc27c467d2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AllBitsSet.UInt64.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AllBitsSetUInt64() - { - var test = new VectorAllBitsSet__AllBitsSetUInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAllBitsSet__AllBitsSetUInt64 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector128 result = Vector128.AllBitsSet; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector128) - .GetProperty(nameof(Vector128.AllBitsSet), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector128)(result)); - } - - private void ValidateResult(Vector128 result, [CallerMemberName] string method = "") - { - UInt64[] resultElements = new UInt64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private unsafe void ValidateResult(UInt64[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - for (var i = 0; i < ElementCount; i++) - { - if (!HasAllBitsSet(resultElements[i])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.AllBitsSet(UInt64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private unsafe bool HasAllBitsSet(UInt64 value) - { - for (int i = 0; i < sizeof(UInt64); i++) - { - if (((byte*)&value)[i] != 0xFF) - return false; - } - return true; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Byte.cs deleted file mode 100644 index c78d13233883..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Byte.cs +++ /dev/null @@ -1,253 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsByte() - { - var test = new VectorAs__AsByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates basic functionality works using the generic form, rather than the type-specific form of the method - test.RunGenericScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsByte - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector128 value; - - value = Vector128.Create((byte)TestLibrary.Generator.GetByte()); - Vector128 byteResult = value.AsByte(); - ValidateResult(byteResult, value); - - value = Vector128.Create((byte)TestLibrary.Generator.GetByte()); - Vector128 doubleResult = value.AsDouble(); - ValidateResult(doubleResult, value); - - value = Vector128.Create((byte)TestLibrary.Generator.GetByte()); - Vector128 shortResult = value.AsInt16(); - ValidateResult(shortResult, value); - - value = Vector128.Create((byte)TestLibrary.Generator.GetByte()); - Vector128 intResult = value.AsInt32(); - ValidateResult(intResult, value); - - value = Vector128.Create((byte)TestLibrary.Generator.GetByte()); - Vector128 longResult = value.AsInt64(); - ValidateResult(longResult, value); - - value = Vector128.Create((byte)TestLibrary.Generator.GetByte()); - Vector128 sbyteResult = value.AsSByte(); - ValidateResult(sbyteResult, value); - - value = Vector128.Create((byte)TestLibrary.Generator.GetByte()); - Vector128 floatResult = value.AsSingle(); - ValidateResult(floatResult, value); - - value = Vector128.Create((byte)TestLibrary.Generator.GetByte()); - Vector128 ushortResult = value.AsUInt16(); - ValidateResult(ushortResult, value); - - value = Vector128.Create((byte)TestLibrary.Generator.GetByte()); - Vector128 uintResult = value.AsUInt32(); - ValidateResult(uintResult, value); - - value = Vector128.Create((byte)TestLibrary.Generator.GetByte()); - Vector128 ulongResult = value.AsUInt64(); - ValidateResult(ulongResult, value); - } - - public void RunGenericScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunGenericScenario)); - Vector128 value; - - value = Vector128.Create((byte)TestLibrary.Generator.GetByte()); - Vector128 byteResult = value.As(); - ValidateResult(byteResult, value); - - value = Vector128.Create((byte)TestLibrary.Generator.GetByte()); - Vector128 doubleResult = value.As(); - ValidateResult(doubleResult, value); - - value = Vector128.Create((byte)TestLibrary.Generator.GetByte()); - Vector128 shortResult = value.As(); - ValidateResult(shortResult, value); - - value = Vector128.Create((byte)TestLibrary.Generator.GetByte()); - Vector128 intResult = value.As(); - ValidateResult(intResult, value); - - value = Vector128.Create((byte)TestLibrary.Generator.GetByte()); - Vector128 longResult = value.As(); - ValidateResult(longResult, value); - - value = Vector128.Create((byte)TestLibrary.Generator.GetByte()); - Vector128 sbyteResult = value.As(); - ValidateResult(sbyteResult, value); - - value = Vector128.Create((byte)TestLibrary.Generator.GetByte()); - Vector128 floatResult = value.As(); - ValidateResult(floatResult, value); - - value = Vector128.Create((byte)TestLibrary.Generator.GetByte()); - Vector128 ushortResult = value.As(); - ValidateResult(ushortResult, value); - - value = Vector128.Create((byte)TestLibrary.Generator.GetByte()); - Vector128 uintResult = value.As(); - ValidateResult(uintResult, value); - - value = Vector128.Create((byte)TestLibrary.Generator.GetByte()); - Vector128 ulongResult = value.As(); - ValidateResult(ulongResult, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector128 value; - - value = Vector128.Create((byte)TestLibrary.Generator.GetByte()); - object byteResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsByte)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(byteResult), value); - - value = Vector128.Create((byte)TestLibrary.Generator.GetByte()); - object doubleResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsDouble)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(doubleResult), value); - - value = Vector128.Create((byte)TestLibrary.Generator.GetByte()); - object shortResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsInt16)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(shortResult), value); - - value = Vector128.Create((byte)TestLibrary.Generator.GetByte()); - object intResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsInt32)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(intResult), value); - - value = Vector128.Create((byte)TestLibrary.Generator.GetByte()); - object longResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsInt64)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(longResult), value); - - value = Vector128.Create((byte)TestLibrary.Generator.GetByte()); - object sbyteResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsSByte)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(sbyteResult), value); - - value = Vector128.Create((byte)TestLibrary.Generator.GetByte()); - object floatResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsSingle)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(floatResult), value); - - value = Vector128.Create((byte)TestLibrary.Generator.GetByte()); - object ushortResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsUInt16)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(ushortResult), value); - - value = Vector128.Create((byte)TestLibrary.Generator.GetByte()); - object uintResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsUInt32)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(uintResult), value); - - value = Vector128.Create((byte)TestLibrary.Generator.GetByte()); - object ulongResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsUInt64)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(ulongResult), value); - } - - private void ValidateResult(Vector128 result, Vector128 value, [CallerMemberName] string method = "") - where T : struct - { - Byte[] resultElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Byte[] valueElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, typeof(T), method); - } - - private void ValidateResult(Byte[] resultElements, Byte[] valueElements, Type targetType, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.As{targetType.Name}: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Double.cs deleted file mode 100644 index 2e176c4634b7..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Double.cs +++ /dev/null @@ -1,253 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsDouble() - { - var test = new VectorAs__AsDouble(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates basic functionality works using the generic form, rather than the type-specific form of the method - test.RunGenericScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsDouble - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector128 value; - - value = Vector128.Create((double)TestLibrary.Generator.GetDouble()); - Vector128 byteResult = value.AsByte(); - ValidateResult(byteResult, value); - - value = Vector128.Create((double)TestLibrary.Generator.GetDouble()); - Vector128 doubleResult = value.AsDouble(); - ValidateResult(doubleResult, value); - - value = Vector128.Create((double)TestLibrary.Generator.GetDouble()); - Vector128 shortResult = value.AsInt16(); - ValidateResult(shortResult, value); - - value = Vector128.Create((double)TestLibrary.Generator.GetDouble()); - Vector128 intResult = value.AsInt32(); - ValidateResult(intResult, value); - - value = Vector128.Create((double)TestLibrary.Generator.GetDouble()); - Vector128 longResult = value.AsInt64(); - ValidateResult(longResult, value); - - value = Vector128.Create((double)TestLibrary.Generator.GetDouble()); - Vector128 sbyteResult = value.AsSByte(); - ValidateResult(sbyteResult, value); - - value = Vector128.Create((double)TestLibrary.Generator.GetDouble()); - Vector128 floatResult = value.AsSingle(); - ValidateResult(floatResult, value); - - value = Vector128.Create((double)TestLibrary.Generator.GetDouble()); - Vector128 ushortResult = value.AsUInt16(); - ValidateResult(ushortResult, value); - - value = Vector128.Create((double)TestLibrary.Generator.GetDouble()); - Vector128 uintResult = value.AsUInt32(); - ValidateResult(uintResult, value); - - value = Vector128.Create((double)TestLibrary.Generator.GetDouble()); - Vector128 ulongResult = value.AsUInt64(); - ValidateResult(ulongResult, value); - } - - public void RunGenericScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunGenericScenario)); - Vector128 value; - - value = Vector128.Create((double)TestLibrary.Generator.GetDouble()); - Vector128 byteResult = value.As(); - ValidateResult(byteResult, value); - - value = Vector128.Create((double)TestLibrary.Generator.GetDouble()); - Vector128 doubleResult = value.As(); - ValidateResult(doubleResult, value); - - value = Vector128.Create((double)TestLibrary.Generator.GetDouble()); - Vector128 shortResult = value.As(); - ValidateResult(shortResult, value); - - value = Vector128.Create((double)TestLibrary.Generator.GetDouble()); - Vector128 intResult = value.As(); - ValidateResult(intResult, value); - - value = Vector128.Create((double)TestLibrary.Generator.GetDouble()); - Vector128 longResult = value.As(); - ValidateResult(longResult, value); - - value = Vector128.Create((double)TestLibrary.Generator.GetDouble()); - Vector128 sbyteResult = value.As(); - ValidateResult(sbyteResult, value); - - value = Vector128.Create((double)TestLibrary.Generator.GetDouble()); - Vector128 floatResult = value.As(); - ValidateResult(floatResult, value); - - value = Vector128.Create((double)TestLibrary.Generator.GetDouble()); - Vector128 ushortResult = value.As(); - ValidateResult(ushortResult, value); - - value = Vector128.Create((double)TestLibrary.Generator.GetDouble()); - Vector128 uintResult = value.As(); - ValidateResult(uintResult, value); - - value = Vector128.Create((double)TestLibrary.Generator.GetDouble()); - Vector128 ulongResult = value.As(); - ValidateResult(ulongResult, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector128 value; - - value = Vector128.Create((double)TestLibrary.Generator.GetDouble()); - object byteResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsByte)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(byteResult), value); - - value = Vector128.Create((double)TestLibrary.Generator.GetDouble()); - object doubleResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsDouble)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(doubleResult), value); - - value = Vector128.Create((double)TestLibrary.Generator.GetDouble()); - object shortResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsInt16)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(shortResult), value); - - value = Vector128.Create((double)TestLibrary.Generator.GetDouble()); - object intResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsInt32)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(intResult), value); - - value = Vector128.Create((double)TestLibrary.Generator.GetDouble()); - object longResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsInt64)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(longResult), value); - - value = Vector128.Create((double)TestLibrary.Generator.GetDouble()); - object sbyteResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsSByte)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(sbyteResult), value); - - value = Vector128.Create((double)TestLibrary.Generator.GetDouble()); - object floatResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsSingle)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(floatResult), value); - - value = Vector128.Create((double)TestLibrary.Generator.GetDouble()); - object ushortResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsUInt16)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(ushortResult), value); - - value = Vector128.Create((double)TestLibrary.Generator.GetDouble()); - object uintResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsUInt32)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(uintResult), value); - - value = Vector128.Create((double)TestLibrary.Generator.GetDouble()); - object ulongResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsUInt64)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(ulongResult), value); - } - - private void ValidateResult(Vector128 result, Vector128 value, [CallerMemberName] string method = "") - where T : struct - { - Double[] resultElements = new Double[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Double[] valueElements = new Double[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, typeof(T), method); - } - - private void ValidateResult(Double[] resultElements, Double[] valueElements, Type targetType, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.As{targetType.Name}: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Int16.cs deleted file mode 100644 index 254e22890ec3..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Int16.cs +++ /dev/null @@ -1,253 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsInt16() - { - var test = new VectorAs__AsInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates basic functionality works using the generic form, rather than the type-specific form of the method - test.RunGenericScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsInt16 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector128 value; - - value = Vector128.Create((short)TestLibrary.Generator.GetInt16()); - Vector128 byteResult = value.AsByte(); - ValidateResult(byteResult, value); - - value = Vector128.Create((short)TestLibrary.Generator.GetInt16()); - Vector128 doubleResult = value.AsDouble(); - ValidateResult(doubleResult, value); - - value = Vector128.Create((short)TestLibrary.Generator.GetInt16()); - Vector128 shortResult = value.AsInt16(); - ValidateResult(shortResult, value); - - value = Vector128.Create((short)TestLibrary.Generator.GetInt16()); - Vector128 intResult = value.AsInt32(); - ValidateResult(intResult, value); - - value = Vector128.Create((short)TestLibrary.Generator.GetInt16()); - Vector128 longResult = value.AsInt64(); - ValidateResult(longResult, value); - - value = Vector128.Create((short)TestLibrary.Generator.GetInt16()); - Vector128 sbyteResult = value.AsSByte(); - ValidateResult(sbyteResult, value); - - value = Vector128.Create((short)TestLibrary.Generator.GetInt16()); - Vector128 floatResult = value.AsSingle(); - ValidateResult(floatResult, value); - - value = Vector128.Create((short)TestLibrary.Generator.GetInt16()); - Vector128 ushortResult = value.AsUInt16(); - ValidateResult(ushortResult, value); - - value = Vector128.Create((short)TestLibrary.Generator.GetInt16()); - Vector128 uintResult = value.AsUInt32(); - ValidateResult(uintResult, value); - - value = Vector128.Create((short)TestLibrary.Generator.GetInt16()); - Vector128 ulongResult = value.AsUInt64(); - ValidateResult(ulongResult, value); - } - - public void RunGenericScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunGenericScenario)); - Vector128 value; - - value = Vector128.Create((short)TestLibrary.Generator.GetInt16()); - Vector128 byteResult = value.As(); - ValidateResult(byteResult, value); - - value = Vector128.Create((short)TestLibrary.Generator.GetInt16()); - Vector128 doubleResult = value.As(); - ValidateResult(doubleResult, value); - - value = Vector128.Create((short)TestLibrary.Generator.GetInt16()); - Vector128 shortResult = value.As(); - ValidateResult(shortResult, value); - - value = Vector128.Create((short)TestLibrary.Generator.GetInt16()); - Vector128 intResult = value.As(); - ValidateResult(intResult, value); - - value = Vector128.Create((short)TestLibrary.Generator.GetInt16()); - Vector128 longResult = value.As(); - ValidateResult(longResult, value); - - value = Vector128.Create((short)TestLibrary.Generator.GetInt16()); - Vector128 sbyteResult = value.As(); - ValidateResult(sbyteResult, value); - - value = Vector128.Create((short)TestLibrary.Generator.GetInt16()); - Vector128 floatResult = value.As(); - ValidateResult(floatResult, value); - - value = Vector128.Create((short)TestLibrary.Generator.GetInt16()); - Vector128 ushortResult = value.As(); - ValidateResult(ushortResult, value); - - value = Vector128.Create((short)TestLibrary.Generator.GetInt16()); - Vector128 uintResult = value.As(); - ValidateResult(uintResult, value); - - value = Vector128.Create((short)TestLibrary.Generator.GetInt16()); - Vector128 ulongResult = value.As(); - ValidateResult(ulongResult, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector128 value; - - value = Vector128.Create((short)TestLibrary.Generator.GetInt16()); - object byteResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsByte)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(byteResult), value); - - value = Vector128.Create((short)TestLibrary.Generator.GetInt16()); - object doubleResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsDouble)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(doubleResult), value); - - value = Vector128.Create((short)TestLibrary.Generator.GetInt16()); - object shortResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsInt16)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(shortResult), value); - - value = Vector128.Create((short)TestLibrary.Generator.GetInt16()); - object intResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsInt32)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(intResult), value); - - value = Vector128.Create((short)TestLibrary.Generator.GetInt16()); - object longResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsInt64)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(longResult), value); - - value = Vector128.Create((short)TestLibrary.Generator.GetInt16()); - object sbyteResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsSByte)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(sbyteResult), value); - - value = Vector128.Create((short)TestLibrary.Generator.GetInt16()); - object floatResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsSingle)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(floatResult), value); - - value = Vector128.Create((short)TestLibrary.Generator.GetInt16()); - object ushortResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsUInt16)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(ushortResult), value); - - value = Vector128.Create((short)TestLibrary.Generator.GetInt16()); - object uintResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsUInt32)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(uintResult), value); - - value = Vector128.Create((short)TestLibrary.Generator.GetInt16()); - object ulongResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsUInt64)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(ulongResult), value); - } - - private void ValidateResult(Vector128 result, Vector128 value, [CallerMemberName] string method = "") - where T : struct - { - Int16[] resultElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Int16[] valueElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, typeof(T), method); - } - - private void ValidateResult(Int16[] resultElements, Int16[] valueElements, Type targetType, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.As{targetType.Name}: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Int32.cs deleted file mode 100644 index ee7f4a35b26d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Int32.cs +++ /dev/null @@ -1,253 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsInt32() - { - var test = new VectorAs__AsInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates basic functionality works using the generic form, rather than the type-specific form of the method - test.RunGenericScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsInt32 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector128 value; - - value = Vector128.Create((int)TestLibrary.Generator.GetInt32()); - Vector128 byteResult = value.AsByte(); - ValidateResult(byteResult, value); - - value = Vector128.Create((int)TestLibrary.Generator.GetInt32()); - Vector128 doubleResult = value.AsDouble(); - ValidateResult(doubleResult, value); - - value = Vector128.Create((int)TestLibrary.Generator.GetInt32()); - Vector128 shortResult = value.AsInt16(); - ValidateResult(shortResult, value); - - value = Vector128.Create((int)TestLibrary.Generator.GetInt32()); - Vector128 intResult = value.AsInt32(); - ValidateResult(intResult, value); - - value = Vector128.Create((int)TestLibrary.Generator.GetInt32()); - Vector128 longResult = value.AsInt64(); - ValidateResult(longResult, value); - - value = Vector128.Create((int)TestLibrary.Generator.GetInt32()); - Vector128 sbyteResult = value.AsSByte(); - ValidateResult(sbyteResult, value); - - value = Vector128.Create((int)TestLibrary.Generator.GetInt32()); - Vector128 floatResult = value.AsSingle(); - ValidateResult(floatResult, value); - - value = Vector128.Create((int)TestLibrary.Generator.GetInt32()); - Vector128 ushortResult = value.AsUInt16(); - ValidateResult(ushortResult, value); - - value = Vector128.Create((int)TestLibrary.Generator.GetInt32()); - Vector128 uintResult = value.AsUInt32(); - ValidateResult(uintResult, value); - - value = Vector128.Create((int)TestLibrary.Generator.GetInt32()); - Vector128 ulongResult = value.AsUInt64(); - ValidateResult(ulongResult, value); - } - - public void RunGenericScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunGenericScenario)); - Vector128 value; - - value = Vector128.Create((int)TestLibrary.Generator.GetInt32()); - Vector128 byteResult = value.As(); - ValidateResult(byteResult, value); - - value = Vector128.Create((int)TestLibrary.Generator.GetInt32()); - Vector128 doubleResult = value.As(); - ValidateResult(doubleResult, value); - - value = Vector128.Create((int)TestLibrary.Generator.GetInt32()); - Vector128 shortResult = value.As(); - ValidateResult(shortResult, value); - - value = Vector128.Create((int)TestLibrary.Generator.GetInt32()); - Vector128 intResult = value.As(); - ValidateResult(intResult, value); - - value = Vector128.Create((int)TestLibrary.Generator.GetInt32()); - Vector128 longResult = value.As(); - ValidateResult(longResult, value); - - value = Vector128.Create((int)TestLibrary.Generator.GetInt32()); - Vector128 sbyteResult = value.As(); - ValidateResult(sbyteResult, value); - - value = Vector128.Create((int)TestLibrary.Generator.GetInt32()); - Vector128 floatResult = value.As(); - ValidateResult(floatResult, value); - - value = Vector128.Create((int)TestLibrary.Generator.GetInt32()); - Vector128 ushortResult = value.As(); - ValidateResult(ushortResult, value); - - value = Vector128.Create((int)TestLibrary.Generator.GetInt32()); - Vector128 uintResult = value.As(); - ValidateResult(uintResult, value); - - value = Vector128.Create((int)TestLibrary.Generator.GetInt32()); - Vector128 ulongResult = value.As(); - ValidateResult(ulongResult, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector128 value; - - value = Vector128.Create((int)TestLibrary.Generator.GetInt32()); - object byteResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsByte)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(byteResult), value); - - value = Vector128.Create((int)TestLibrary.Generator.GetInt32()); - object doubleResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsDouble)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(doubleResult), value); - - value = Vector128.Create((int)TestLibrary.Generator.GetInt32()); - object shortResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsInt16)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(shortResult), value); - - value = Vector128.Create((int)TestLibrary.Generator.GetInt32()); - object intResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsInt32)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(intResult), value); - - value = Vector128.Create((int)TestLibrary.Generator.GetInt32()); - object longResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsInt64)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(longResult), value); - - value = Vector128.Create((int)TestLibrary.Generator.GetInt32()); - object sbyteResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsSByte)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(sbyteResult), value); - - value = Vector128.Create((int)TestLibrary.Generator.GetInt32()); - object floatResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsSingle)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(floatResult), value); - - value = Vector128.Create((int)TestLibrary.Generator.GetInt32()); - object ushortResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsUInt16)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(ushortResult), value); - - value = Vector128.Create((int)TestLibrary.Generator.GetInt32()); - object uintResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsUInt32)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(uintResult), value); - - value = Vector128.Create((int)TestLibrary.Generator.GetInt32()); - object ulongResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsUInt64)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(ulongResult), value); - } - - private void ValidateResult(Vector128 result, Vector128 value, [CallerMemberName] string method = "") - where T : struct - { - Int32[] resultElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Int32[] valueElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, typeof(T), method); - } - - private void ValidateResult(Int32[] resultElements, Int32[] valueElements, Type targetType, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.As{targetType.Name}: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Int64.cs deleted file mode 100644 index e3aaeca2793e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Int64.cs +++ /dev/null @@ -1,253 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsInt64() - { - var test = new VectorAs__AsInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates basic functionality works using the generic form, rather than the type-specific form of the method - test.RunGenericScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsInt64 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector128 value; - - value = Vector128.Create((long)TestLibrary.Generator.GetInt64()); - Vector128 byteResult = value.AsByte(); - ValidateResult(byteResult, value); - - value = Vector128.Create((long)TestLibrary.Generator.GetInt64()); - Vector128 doubleResult = value.AsDouble(); - ValidateResult(doubleResult, value); - - value = Vector128.Create((long)TestLibrary.Generator.GetInt64()); - Vector128 shortResult = value.AsInt16(); - ValidateResult(shortResult, value); - - value = Vector128.Create((long)TestLibrary.Generator.GetInt64()); - Vector128 intResult = value.AsInt32(); - ValidateResult(intResult, value); - - value = Vector128.Create((long)TestLibrary.Generator.GetInt64()); - Vector128 longResult = value.AsInt64(); - ValidateResult(longResult, value); - - value = Vector128.Create((long)TestLibrary.Generator.GetInt64()); - Vector128 sbyteResult = value.AsSByte(); - ValidateResult(sbyteResult, value); - - value = Vector128.Create((long)TestLibrary.Generator.GetInt64()); - Vector128 floatResult = value.AsSingle(); - ValidateResult(floatResult, value); - - value = Vector128.Create((long)TestLibrary.Generator.GetInt64()); - Vector128 ushortResult = value.AsUInt16(); - ValidateResult(ushortResult, value); - - value = Vector128.Create((long)TestLibrary.Generator.GetInt64()); - Vector128 uintResult = value.AsUInt32(); - ValidateResult(uintResult, value); - - value = Vector128.Create((long)TestLibrary.Generator.GetInt64()); - Vector128 ulongResult = value.AsUInt64(); - ValidateResult(ulongResult, value); - } - - public void RunGenericScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunGenericScenario)); - Vector128 value; - - value = Vector128.Create((long)TestLibrary.Generator.GetInt64()); - Vector128 byteResult = value.As(); - ValidateResult(byteResult, value); - - value = Vector128.Create((long)TestLibrary.Generator.GetInt64()); - Vector128 doubleResult = value.As(); - ValidateResult(doubleResult, value); - - value = Vector128.Create((long)TestLibrary.Generator.GetInt64()); - Vector128 shortResult = value.As(); - ValidateResult(shortResult, value); - - value = Vector128.Create((long)TestLibrary.Generator.GetInt64()); - Vector128 intResult = value.As(); - ValidateResult(intResult, value); - - value = Vector128.Create((long)TestLibrary.Generator.GetInt64()); - Vector128 longResult = value.As(); - ValidateResult(longResult, value); - - value = Vector128.Create((long)TestLibrary.Generator.GetInt64()); - Vector128 sbyteResult = value.As(); - ValidateResult(sbyteResult, value); - - value = Vector128.Create((long)TestLibrary.Generator.GetInt64()); - Vector128 floatResult = value.As(); - ValidateResult(floatResult, value); - - value = Vector128.Create((long)TestLibrary.Generator.GetInt64()); - Vector128 ushortResult = value.As(); - ValidateResult(ushortResult, value); - - value = Vector128.Create((long)TestLibrary.Generator.GetInt64()); - Vector128 uintResult = value.As(); - ValidateResult(uintResult, value); - - value = Vector128.Create((long)TestLibrary.Generator.GetInt64()); - Vector128 ulongResult = value.As(); - ValidateResult(ulongResult, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector128 value; - - value = Vector128.Create((long)TestLibrary.Generator.GetInt64()); - object byteResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsByte)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(byteResult), value); - - value = Vector128.Create((long)TestLibrary.Generator.GetInt64()); - object doubleResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsDouble)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(doubleResult), value); - - value = Vector128.Create((long)TestLibrary.Generator.GetInt64()); - object shortResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsInt16)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(shortResult), value); - - value = Vector128.Create((long)TestLibrary.Generator.GetInt64()); - object intResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsInt32)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(intResult), value); - - value = Vector128.Create((long)TestLibrary.Generator.GetInt64()); - object longResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsInt64)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(longResult), value); - - value = Vector128.Create((long)TestLibrary.Generator.GetInt64()); - object sbyteResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsSByte)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(sbyteResult), value); - - value = Vector128.Create((long)TestLibrary.Generator.GetInt64()); - object floatResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsSingle)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(floatResult), value); - - value = Vector128.Create((long)TestLibrary.Generator.GetInt64()); - object ushortResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsUInt16)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(ushortResult), value); - - value = Vector128.Create((long)TestLibrary.Generator.GetInt64()); - object uintResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsUInt32)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(uintResult), value); - - value = Vector128.Create((long)TestLibrary.Generator.GetInt64()); - object ulongResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsUInt64)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(ulongResult), value); - } - - private void ValidateResult(Vector128 result, Vector128 value, [CallerMemberName] string method = "") - where T : struct - { - Int64[] resultElements = new Int64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Int64[] valueElements = new Int64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, typeof(T), method); - } - - private void ValidateResult(Int64[] resultElements, Int64[] valueElements, Type targetType, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.As{targetType.Name}: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.SByte.cs deleted file mode 100644 index 6029c320e14b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.SByte.cs +++ /dev/null @@ -1,253 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsSByte() - { - var test = new VectorAs__AsSByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates basic functionality works using the generic form, rather than the type-specific form of the method - test.RunGenericScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsSByte - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector128 value; - - value = Vector128.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector128 byteResult = value.AsByte(); - ValidateResult(byteResult, value); - - value = Vector128.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector128 doubleResult = value.AsDouble(); - ValidateResult(doubleResult, value); - - value = Vector128.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector128 shortResult = value.AsInt16(); - ValidateResult(shortResult, value); - - value = Vector128.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector128 intResult = value.AsInt32(); - ValidateResult(intResult, value); - - value = Vector128.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector128 longResult = value.AsInt64(); - ValidateResult(longResult, value); - - value = Vector128.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector128 sbyteResult = value.AsSByte(); - ValidateResult(sbyteResult, value); - - value = Vector128.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector128 floatResult = value.AsSingle(); - ValidateResult(floatResult, value); - - value = Vector128.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector128 ushortResult = value.AsUInt16(); - ValidateResult(ushortResult, value); - - value = Vector128.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector128 uintResult = value.AsUInt32(); - ValidateResult(uintResult, value); - - value = Vector128.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector128 ulongResult = value.AsUInt64(); - ValidateResult(ulongResult, value); - } - - public void RunGenericScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunGenericScenario)); - Vector128 value; - - value = Vector128.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector128 byteResult = value.As(); - ValidateResult(byteResult, value); - - value = Vector128.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector128 doubleResult = value.As(); - ValidateResult(doubleResult, value); - - value = Vector128.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector128 shortResult = value.As(); - ValidateResult(shortResult, value); - - value = Vector128.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector128 intResult = value.As(); - ValidateResult(intResult, value); - - value = Vector128.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector128 longResult = value.As(); - ValidateResult(longResult, value); - - value = Vector128.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector128 sbyteResult = value.As(); - ValidateResult(sbyteResult, value); - - value = Vector128.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector128 floatResult = value.As(); - ValidateResult(floatResult, value); - - value = Vector128.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector128 ushortResult = value.As(); - ValidateResult(ushortResult, value); - - value = Vector128.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector128 uintResult = value.As(); - ValidateResult(uintResult, value); - - value = Vector128.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector128 ulongResult = value.As(); - ValidateResult(ulongResult, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector128 value; - - value = Vector128.Create((sbyte)TestLibrary.Generator.GetSByte()); - object byteResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsByte)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(byteResult), value); - - value = Vector128.Create((sbyte)TestLibrary.Generator.GetSByte()); - object doubleResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsDouble)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(doubleResult), value); - - value = Vector128.Create((sbyte)TestLibrary.Generator.GetSByte()); - object shortResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsInt16)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(shortResult), value); - - value = Vector128.Create((sbyte)TestLibrary.Generator.GetSByte()); - object intResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsInt32)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(intResult), value); - - value = Vector128.Create((sbyte)TestLibrary.Generator.GetSByte()); - object longResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsInt64)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(longResult), value); - - value = Vector128.Create((sbyte)TestLibrary.Generator.GetSByte()); - object sbyteResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsSByte)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(sbyteResult), value); - - value = Vector128.Create((sbyte)TestLibrary.Generator.GetSByte()); - object floatResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsSingle)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(floatResult), value); - - value = Vector128.Create((sbyte)TestLibrary.Generator.GetSByte()); - object ushortResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsUInt16)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(ushortResult), value); - - value = Vector128.Create((sbyte)TestLibrary.Generator.GetSByte()); - object uintResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsUInt32)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(uintResult), value); - - value = Vector128.Create((sbyte)TestLibrary.Generator.GetSByte()); - object ulongResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsUInt64)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(ulongResult), value); - } - - private void ValidateResult(Vector128 result, Vector128 value, [CallerMemberName] string method = "") - where T : struct - { - SByte[] resultElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - SByte[] valueElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, typeof(T), method); - } - - private void ValidateResult(SByte[] resultElements, SByte[] valueElements, Type targetType, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.As{targetType.Name}: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Single.cs deleted file mode 100644 index 58b342879a84..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.Single.cs +++ /dev/null @@ -1,253 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsSingle() - { - var test = new VectorAs__AsSingle(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates basic functionality works using the generic form, rather than the type-specific form of the method - test.RunGenericScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsSingle - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector128 value; - - value = Vector128.Create((float)TestLibrary.Generator.GetSingle()); - Vector128 byteResult = value.AsByte(); - ValidateResult(byteResult, value); - - value = Vector128.Create((float)TestLibrary.Generator.GetSingle()); - Vector128 doubleResult = value.AsDouble(); - ValidateResult(doubleResult, value); - - value = Vector128.Create((float)TestLibrary.Generator.GetSingle()); - Vector128 shortResult = value.AsInt16(); - ValidateResult(shortResult, value); - - value = Vector128.Create((float)TestLibrary.Generator.GetSingle()); - Vector128 intResult = value.AsInt32(); - ValidateResult(intResult, value); - - value = Vector128.Create((float)TestLibrary.Generator.GetSingle()); - Vector128 longResult = value.AsInt64(); - ValidateResult(longResult, value); - - value = Vector128.Create((float)TestLibrary.Generator.GetSingle()); - Vector128 sbyteResult = value.AsSByte(); - ValidateResult(sbyteResult, value); - - value = Vector128.Create((float)TestLibrary.Generator.GetSingle()); - Vector128 floatResult = value.AsSingle(); - ValidateResult(floatResult, value); - - value = Vector128.Create((float)TestLibrary.Generator.GetSingle()); - Vector128 ushortResult = value.AsUInt16(); - ValidateResult(ushortResult, value); - - value = Vector128.Create((float)TestLibrary.Generator.GetSingle()); - Vector128 uintResult = value.AsUInt32(); - ValidateResult(uintResult, value); - - value = Vector128.Create((float)TestLibrary.Generator.GetSingle()); - Vector128 ulongResult = value.AsUInt64(); - ValidateResult(ulongResult, value); - } - - public void RunGenericScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunGenericScenario)); - Vector128 value; - - value = Vector128.Create((float)TestLibrary.Generator.GetSingle()); - Vector128 byteResult = value.As(); - ValidateResult(byteResult, value); - - value = Vector128.Create((float)TestLibrary.Generator.GetSingle()); - Vector128 doubleResult = value.As(); - ValidateResult(doubleResult, value); - - value = Vector128.Create((float)TestLibrary.Generator.GetSingle()); - Vector128 shortResult = value.As(); - ValidateResult(shortResult, value); - - value = Vector128.Create((float)TestLibrary.Generator.GetSingle()); - Vector128 intResult = value.As(); - ValidateResult(intResult, value); - - value = Vector128.Create((float)TestLibrary.Generator.GetSingle()); - Vector128 longResult = value.As(); - ValidateResult(longResult, value); - - value = Vector128.Create((float)TestLibrary.Generator.GetSingle()); - Vector128 sbyteResult = value.As(); - ValidateResult(sbyteResult, value); - - value = Vector128.Create((float)TestLibrary.Generator.GetSingle()); - Vector128 floatResult = value.As(); - ValidateResult(floatResult, value); - - value = Vector128.Create((float)TestLibrary.Generator.GetSingle()); - Vector128 ushortResult = value.As(); - ValidateResult(ushortResult, value); - - value = Vector128.Create((float)TestLibrary.Generator.GetSingle()); - Vector128 uintResult = value.As(); - ValidateResult(uintResult, value); - - value = Vector128.Create((float)TestLibrary.Generator.GetSingle()); - Vector128 ulongResult = value.As(); - ValidateResult(ulongResult, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector128 value; - - value = Vector128.Create((float)TestLibrary.Generator.GetSingle()); - object byteResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsByte)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(byteResult), value); - - value = Vector128.Create((float)TestLibrary.Generator.GetSingle()); - object doubleResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsDouble)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(doubleResult), value); - - value = Vector128.Create((float)TestLibrary.Generator.GetSingle()); - object shortResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsInt16)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(shortResult), value); - - value = Vector128.Create((float)TestLibrary.Generator.GetSingle()); - object intResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsInt32)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(intResult), value); - - value = Vector128.Create((float)TestLibrary.Generator.GetSingle()); - object longResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsInt64)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(longResult), value); - - value = Vector128.Create((float)TestLibrary.Generator.GetSingle()); - object sbyteResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsSByte)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(sbyteResult), value); - - value = Vector128.Create((float)TestLibrary.Generator.GetSingle()); - object floatResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsSingle)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(floatResult), value); - - value = Vector128.Create((float)TestLibrary.Generator.GetSingle()); - object ushortResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsUInt16)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(ushortResult), value); - - value = Vector128.Create((float)TestLibrary.Generator.GetSingle()); - object uintResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsUInt32)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(uintResult), value); - - value = Vector128.Create((float)TestLibrary.Generator.GetSingle()); - object ulongResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsUInt64)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(ulongResult), value); - } - - private void ValidateResult(Vector128 result, Vector128 value, [CallerMemberName] string method = "") - where T : struct - { - Single[] resultElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Single[] valueElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, typeof(T), method); - } - - private void ValidateResult(Single[] resultElements, Single[] valueElements, Type targetType, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.As{targetType.Name}: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.UInt16.cs deleted file mode 100644 index b7d4d3deef40..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.UInt16.cs +++ /dev/null @@ -1,253 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsUInt16() - { - var test = new VectorAs__AsUInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates basic functionality works using the generic form, rather than the type-specific form of the method - test.RunGenericScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsUInt16 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector128 value; - - value = Vector128.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector128 byteResult = value.AsByte(); - ValidateResult(byteResult, value); - - value = Vector128.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector128 doubleResult = value.AsDouble(); - ValidateResult(doubleResult, value); - - value = Vector128.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector128 shortResult = value.AsInt16(); - ValidateResult(shortResult, value); - - value = Vector128.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector128 intResult = value.AsInt32(); - ValidateResult(intResult, value); - - value = Vector128.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector128 longResult = value.AsInt64(); - ValidateResult(longResult, value); - - value = Vector128.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector128 sbyteResult = value.AsSByte(); - ValidateResult(sbyteResult, value); - - value = Vector128.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector128 floatResult = value.AsSingle(); - ValidateResult(floatResult, value); - - value = Vector128.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector128 ushortResult = value.AsUInt16(); - ValidateResult(ushortResult, value); - - value = Vector128.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector128 uintResult = value.AsUInt32(); - ValidateResult(uintResult, value); - - value = Vector128.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector128 ulongResult = value.AsUInt64(); - ValidateResult(ulongResult, value); - } - - public void RunGenericScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunGenericScenario)); - Vector128 value; - - value = Vector128.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector128 byteResult = value.As(); - ValidateResult(byteResult, value); - - value = Vector128.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector128 doubleResult = value.As(); - ValidateResult(doubleResult, value); - - value = Vector128.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector128 shortResult = value.As(); - ValidateResult(shortResult, value); - - value = Vector128.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector128 intResult = value.As(); - ValidateResult(intResult, value); - - value = Vector128.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector128 longResult = value.As(); - ValidateResult(longResult, value); - - value = Vector128.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector128 sbyteResult = value.As(); - ValidateResult(sbyteResult, value); - - value = Vector128.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector128 floatResult = value.As(); - ValidateResult(floatResult, value); - - value = Vector128.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector128 ushortResult = value.As(); - ValidateResult(ushortResult, value); - - value = Vector128.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector128 uintResult = value.As(); - ValidateResult(uintResult, value); - - value = Vector128.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector128 ulongResult = value.As(); - ValidateResult(ulongResult, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector128 value; - - value = Vector128.Create((ushort)TestLibrary.Generator.GetUInt16()); - object byteResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsByte)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(byteResult), value); - - value = Vector128.Create((ushort)TestLibrary.Generator.GetUInt16()); - object doubleResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsDouble)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(doubleResult), value); - - value = Vector128.Create((ushort)TestLibrary.Generator.GetUInt16()); - object shortResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsInt16)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(shortResult), value); - - value = Vector128.Create((ushort)TestLibrary.Generator.GetUInt16()); - object intResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsInt32)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(intResult), value); - - value = Vector128.Create((ushort)TestLibrary.Generator.GetUInt16()); - object longResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsInt64)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(longResult), value); - - value = Vector128.Create((ushort)TestLibrary.Generator.GetUInt16()); - object sbyteResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsSByte)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(sbyteResult), value); - - value = Vector128.Create((ushort)TestLibrary.Generator.GetUInt16()); - object floatResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsSingle)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(floatResult), value); - - value = Vector128.Create((ushort)TestLibrary.Generator.GetUInt16()); - object ushortResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsUInt16)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(ushortResult), value); - - value = Vector128.Create((ushort)TestLibrary.Generator.GetUInt16()); - object uintResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsUInt32)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(uintResult), value); - - value = Vector128.Create((ushort)TestLibrary.Generator.GetUInt16()); - object ulongResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsUInt64)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(ulongResult), value); - } - - private void ValidateResult(Vector128 result, Vector128 value, [CallerMemberName] string method = "") - where T : struct - { - UInt16[] resultElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - UInt16[] valueElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, typeof(T), method); - } - - private void ValidateResult(UInt16[] resultElements, UInt16[] valueElements, Type targetType, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.As{targetType.Name}: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.UInt32.cs deleted file mode 100644 index a85289bba2ff..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.UInt32.cs +++ /dev/null @@ -1,253 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsUInt32() - { - var test = new VectorAs__AsUInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates basic functionality works using the generic form, rather than the type-specific form of the method - test.RunGenericScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsUInt32 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector128 value; - - value = Vector128.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector128 byteResult = value.AsByte(); - ValidateResult(byteResult, value); - - value = Vector128.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector128 doubleResult = value.AsDouble(); - ValidateResult(doubleResult, value); - - value = Vector128.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector128 shortResult = value.AsInt16(); - ValidateResult(shortResult, value); - - value = Vector128.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector128 intResult = value.AsInt32(); - ValidateResult(intResult, value); - - value = Vector128.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector128 longResult = value.AsInt64(); - ValidateResult(longResult, value); - - value = Vector128.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector128 sbyteResult = value.AsSByte(); - ValidateResult(sbyteResult, value); - - value = Vector128.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector128 floatResult = value.AsSingle(); - ValidateResult(floatResult, value); - - value = Vector128.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector128 ushortResult = value.AsUInt16(); - ValidateResult(ushortResult, value); - - value = Vector128.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector128 uintResult = value.AsUInt32(); - ValidateResult(uintResult, value); - - value = Vector128.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector128 ulongResult = value.AsUInt64(); - ValidateResult(ulongResult, value); - } - - public void RunGenericScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunGenericScenario)); - Vector128 value; - - value = Vector128.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector128 byteResult = value.As(); - ValidateResult(byteResult, value); - - value = Vector128.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector128 doubleResult = value.As(); - ValidateResult(doubleResult, value); - - value = Vector128.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector128 shortResult = value.As(); - ValidateResult(shortResult, value); - - value = Vector128.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector128 intResult = value.As(); - ValidateResult(intResult, value); - - value = Vector128.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector128 longResult = value.As(); - ValidateResult(longResult, value); - - value = Vector128.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector128 sbyteResult = value.As(); - ValidateResult(sbyteResult, value); - - value = Vector128.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector128 floatResult = value.As(); - ValidateResult(floatResult, value); - - value = Vector128.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector128 ushortResult = value.As(); - ValidateResult(ushortResult, value); - - value = Vector128.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector128 uintResult = value.As(); - ValidateResult(uintResult, value); - - value = Vector128.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector128 ulongResult = value.As(); - ValidateResult(ulongResult, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector128 value; - - value = Vector128.Create((uint)TestLibrary.Generator.GetUInt32()); - object byteResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsByte)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(byteResult), value); - - value = Vector128.Create((uint)TestLibrary.Generator.GetUInt32()); - object doubleResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsDouble)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(doubleResult), value); - - value = Vector128.Create((uint)TestLibrary.Generator.GetUInt32()); - object shortResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsInt16)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(shortResult), value); - - value = Vector128.Create((uint)TestLibrary.Generator.GetUInt32()); - object intResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsInt32)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(intResult), value); - - value = Vector128.Create((uint)TestLibrary.Generator.GetUInt32()); - object longResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsInt64)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(longResult), value); - - value = Vector128.Create((uint)TestLibrary.Generator.GetUInt32()); - object sbyteResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsSByte)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(sbyteResult), value); - - value = Vector128.Create((uint)TestLibrary.Generator.GetUInt32()); - object floatResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsSingle)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(floatResult), value); - - value = Vector128.Create((uint)TestLibrary.Generator.GetUInt32()); - object ushortResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsUInt16)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(ushortResult), value); - - value = Vector128.Create((uint)TestLibrary.Generator.GetUInt32()); - object uintResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsUInt32)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(uintResult), value); - - value = Vector128.Create((uint)TestLibrary.Generator.GetUInt32()); - object ulongResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsUInt64)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(ulongResult), value); - } - - private void ValidateResult(Vector128 result, Vector128 value, [CallerMemberName] string method = "") - where T : struct - { - UInt32[] resultElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - UInt32[] valueElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, typeof(T), method); - } - - private void ValidateResult(UInt32[] resultElements, UInt32[] valueElements, Type targetType, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.As{targetType.Name}: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.UInt64.cs deleted file mode 100644 index 3c81793c8744..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/As.UInt64.cs +++ /dev/null @@ -1,253 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsUInt64() - { - var test = new VectorAs__AsUInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates basic functionality works using the generic form, rather than the type-specific form of the method - test.RunGenericScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsUInt64 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector128 value; - - value = Vector128.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector128 byteResult = value.AsByte(); - ValidateResult(byteResult, value); - - value = Vector128.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector128 doubleResult = value.AsDouble(); - ValidateResult(doubleResult, value); - - value = Vector128.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector128 shortResult = value.AsInt16(); - ValidateResult(shortResult, value); - - value = Vector128.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector128 intResult = value.AsInt32(); - ValidateResult(intResult, value); - - value = Vector128.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector128 longResult = value.AsInt64(); - ValidateResult(longResult, value); - - value = Vector128.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector128 sbyteResult = value.AsSByte(); - ValidateResult(sbyteResult, value); - - value = Vector128.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector128 floatResult = value.AsSingle(); - ValidateResult(floatResult, value); - - value = Vector128.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector128 ushortResult = value.AsUInt16(); - ValidateResult(ushortResult, value); - - value = Vector128.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector128 uintResult = value.AsUInt32(); - ValidateResult(uintResult, value); - - value = Vector128.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector128 ulongResult = value.AsUInt64(); - ValidateResult(ulongResult, value); - } - - public void RunGenericScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunGenericScenario)); - Vector128 value; - - value = Vector128.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector128 byteResult = value.As(); - ValidateResult(byteResult, value); - - value = Vector128.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector128 doubleResult = value.As(); - ValidateResult(doubleResult, value); - - value = Vector128.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector128 shortResult = value.As(); - ValidateResult(shortResult, value); - - value = Vector128.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector128 intResult = value.As(); - ValidateResult(intResult, value); - - value = Vector128.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector128 longResult = value.As(); - ValidateResult(longResult, value); - - value = Vector128.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector128 sbyteResult = value.As(); - ValidateResult(sbyteResult, value); - - value = Vector128.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector128 floatResult = value.As(); - ValidateResult(floatResult, value); - - value = Vector128.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector128 ushortResult = value.As(); - ValidateResult(ushortResult, value); - - value = Vector128.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector128 uintResult = value.As(); - ValidateResult(uintResult, value); - - value = Vector128.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector128 ulongResult = value.As(); - ValidateResult(ulongResult, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector128 value; - - value = Vector128.Create((ulong)TestLibrary.Generator.GetUInt64()); - object byteResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsByte)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(byteResult), value); - - value = Vector128.Create((ulong)TestLibrary.Generator.GetUInt64()); - object doubleResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsDouble)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(doubleResult), value); - - value = Vector128.Create((ulong)TestLibrary.Generator.GetUInt64()); - object shortResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsInt16)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(shortResult), value); - - value = Vector128.Create((ulong)TestLibrary.Generator.GetUInt64()); - object intResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsInt32)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(intResult), value); - - value = Vector128.Create((ulong)TestLibrary.Generator.GetUInt64()); - object longResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsInt64)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(longResult), value); - - value = Vector128.Create((ulong)TestLibrary.Generator.GetUInt64()); - object sbyteResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsSByte)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(sbyteResult), value); - - value = Vector128.Create((ulong)TestLibrary.Generator.GetUInt64()); - object floatResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsSingle)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(floatResult), value); - - value = Vector128.Create((ulong)TestLibrary.Generator.GetUInt64()); - object ushortResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsUInt16)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(ushortResult), value); - - value = Vector128.Create((ulong)TestLibrary.Generator.GetUInt64()); - object uintResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsUInt32)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(uintResult), value); - - value = Vector128.Create((ulong)TestLibrary.Generator.GetUInt64()); - object ulongResult = typeof(Vector128) - .GetMethod(nameof(Vector128.AsUInt64)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector128)(ulongResult), value); - } - - private void ValidateResult(Vector128 result, Vector128 value, [CallerMemberName] string method = "") - where T : struct - { - UInt64[] resultElements = new UInt64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - UInt64[] valueElements = new UInt64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, typeof(T), method); - } - - private void ValidateResult(UInt64[] resultElements, UInt64[] valueElements, Type targetType, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.As{targetType.Name}: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AsVector.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AsVector.Byte.cs deleted file mode 100644 index 8b51c95791e2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AsVector.Byte.cs +++ /dev/null @@ -1,162 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsVectorByte() - { - var test = new VectorAs__AsVectorByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsVectorByte - { - private static readonly int LargestVectorSize = 16; - - private static readonly int VectorElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static readonly int NumericsElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector128 value; - - value = Vector128.Create((byte)TestLibrary.Generator.GetByte()); - Vector result = value.AsVector(); - ValidateResult(result, value); - - value = result.AsVector128(); - ValidateResult(value, result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector128 value; - - value = Vector128.Create((byte)TestLibrary.Generator.GetByte()); - object Result = typeof(Vector128) - .GetMethod(nameof(Vector128.AsVector)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector)(Result), value); - - value = (Vector128)typeof(Vector128) - .GetMethods() - .Where((methodInfo) => { - if (methodInfo.Name == nameof(Vector128.AsVector128)) - { - var parameters = methodInfo.GetParameters(); - return (parameters.Length == 1) && - (parameters[0].ParameterType.IsGenericType) && - (parameters[0].ParameterType.GetGenericTypeDefinition() == typeof(Vector<>)); - } - return false; - }) - .Single() - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { Result }); - ValidateResult(value, (Vector)(Result)); - } - - private void ValidateResult(Vector result, Vector128 value, [CallerMemberName] string method = "") - { - Byte[] resultElements = new Byte[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Byte[] valueElements = new Byte[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(Vector128 result, Vector value, [CallerMemberName] string method = "") - { - Byte[] resultElements = new Byte[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Byte[] valueElements = new Byte[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(Byte[] resultElements, Byte[] valueElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements.Length <= valueElements.Length) - { - for (var i = 0; i < resultElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - } - else - { - for (var i = 0; i < valueElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - for (var i = valueElements.Length; i < resultElements.Length; i++) - { - if (resultElements[i] != default) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.AsVector: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AsVector.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AsVector.Double.cs deleted file mode 100644 index 0db7a5f326d4..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AsVector.Double.cs +++ /dev/null @@ -1,162 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsVectorDouble() - { - var test = new VectorAs__AsVectorDouble(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsVectorDouble - { - private static readonly int LargestVectorSize = 16; - - private static readonly int VectorElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static readonly int NumericsElementCount = Unsafe.SizeOf>() / sizeof(Double); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector128 value; - - value = Vector128.Create((double)TestLibrary.Generator.GetDouble()); - Vector result = value.AsVector(); - ValidateResult(result, value); - - value = result.AsVector128(); - ValidateResult(value, result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector128 value; - - value = Vector128.Create((double)TestLibrary.Generator.GetDouble()); - object Result = typeof(Vector128) - .GetMethod(nameof(Vector128.AsVector)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector)(Result), value); - - value = (Vector128)typeof(Vector128) - .GetMethods() - .Where((methodInfo) => { - if (methodInfo.Name == nameof(Vector128.AsVector128)) - { - var parameters = methodInfo.GetParameters(); - return (parameters.Length == 1) && - (parameters[0].ParameterType.IsGenericType) && - (parameters[0].ParameterType.GetGenericTypeDefinition() == typeof(Vector<>)); - } - return false; - }) - .Single() - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { Result }); - ValidateResult(value, (Vector)(Result)); - } - - private void ValidateResult(Vector result, Vector128 value, [CallerMemberName] string method = "") - { - Double[] resultElements = new Double[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Double[] valueElements = new Double[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(Vector128 result, Vector value, [CallerMemberName] string method = "") - { - Double[] resultElements = new Double[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Double[] valueElements = new Double[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(Double[] resultElements, Double[] valueElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements.Length <= valueElements.Length) - { - for (var i = 0; i < resultElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - } - else - { - for (var i = 0; i < valueElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - for (var i = valueElements.Length; i < resultElements.Length; i++) - { - if (resultElements[i] != default) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.AsVector: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AsVector.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AsVector.Int16.cs deleted file mode 100644 index a064aa9c69ac..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AsVector.Int16.cs +++ /dev/null @@ -1,162 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsVectorInt16() - { - var test = new VectorAs__AsVectorInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsVectorInt16 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int VectorElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static readonly int NumericsElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector128 value; - - value = Vector128.Create((short)TestLibrary.Generator.GetInt16()); - Vector result = value.AsVector(); - ValidateResult(result, value); - - value = result.AsVector128(); - ValidateResult(value, result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector128 value; - - value = Vector128.Create((short)TestLibrary.Generator.GetInt16()); - object Result = typeof(Vector128) - .GetMethod(nameof(Vector128.AsVector)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector)(Result), value); - - value = (Vector128)typeof(Vector128) - .GetMethods() - .Where((methodInfo) => { - if (methodInfo.Name == nameof(Vector128.AsVector128)) - { - var parameters = methodInfo.GetParameters(); - return (parameters.Length == 1) && - (parameters[0].ParameterType.IsGenericType) && - (parameters[0].ParameterType.GetGenericTypeDefinition() == typeof(Vector<>)); - } - return false; - }) - .Single() - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { Result }); - ValidateResult(value, (Vector)(Result)); - } - - private void ValidateResult(Vector result, Vector128 value, [CallerMemberName] string method = "") - { - Int16[] resultElements = new Int16[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Int16[] valueElements = new Int16[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(Vector128 result, Vector value, [CallerMemberName] string method = "") - { - Int16[] resultElements = new Int16[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Int16[] valueElements = new Int16[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(Int16[] resultElements, Int16[] valueElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements.Length <= valueElements.Length) - { - for (var i = 0; i < resultElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - } - else - { - for (var i = 0; i < valueElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - for (var i = valueElements.Length; i < resultElements.Length; i++) - { - if (resultElements[i] != default) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.AsVector: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AsVector.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AsVector.Int32.cs deleted file mode 100644 index bedd3e4f6840..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AsVector.Int32.cs +++ /dev/null @@ -1,162 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsVectorInt32() - { - var test = new VectorAs__AsVectorInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsVectorInt32 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int VectorElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static readonly int NumericsElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector128 value; - - value = Vector128.Create((int)TestLibrary.Generator.GetInt32()); - Vector result = value.AsVector(); - ValidateResult(result, value); - - value = result.AsVector128(); - ValidateResult(value, result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector128 value; - - value = Vector128.Create((int)TestLibrary.Generator.GetInt32()); - object Result = typeof(Vector128) - .GetMethod(nameof(Vector128.AsVector)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector)(Result), value); - - value = (Vector128)typeof(Vector128) - .GetMethods() - .Where((methodInfo) => { - if (methodInfo.Name == nameof(Vector128.AsVector128)) - { - var parameters = methodInfo.GetParameters(); - return (parameters.Length == 1) && - (parameters[0].ParameterType.IsGenericType) && - (parameters[0].ParameterType.GetGenericTypeDefinition() == typeof(Vector<>)); - } - return false; - }) - .Single() - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { Result }); - ValidateResult(value, (Vector)(Result)); - } - - private void ValidateResult(Vector result, Vector128 value, [CallerMemberName] string method = "") - { - Int32[] resultElements = new Int32[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Int32[] valueElements = new Int32[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(Vector128 result, Vector value, [CallerMemberName] string method = "") - { - Int32[] resultElements = new Int32[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Int32[] valueElements = new Int32[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(Int32[] resultElements, Int32[] valueElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements.Length <= valueElements.Length) - { - for (var i = 0; i < resultElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - } - else - { - for (var i = 0; i < valueElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - for (var i = valueElements.Length; i < resultElements.Length; i++) - { - if (resultElements[i] != default) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.AsVector: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AsVector.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AsVector.Int64.cs deleted file mode 100644 index 74b95a8a989c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AsVector.Int64.cs +++ /dev/null @@ -1,162 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsVectorInt64() - { - var test = new VectorAs__AsVectorInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsVectorInt64 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int VectorElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static readonly int NumericsElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector128 value; - - value = Vector128.Create((long)TestLibrary.Generator.GetInt64()); - Vector result = value.AsVector(); - ValidateResult(result, value); - - value = result.AsVector128(); - ValidateResult(value, result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector128 value; - - value = Vector128.Create((long)TestLibrary.Generator.GetInt64()); - object Result = typeof(Vector128) - .GetMethod(nameof(Vector128.AsVector)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector)(Result), value); - - value = (Vector128)typeof(Vector128) - .GetMethods() - .Where((methodInfo) => { - if (methodInfo.Name == nameof(Vector128.AsVector128)) - { - var parameters = methodInfo.GetParameters(); - return (parameters.Length == 1) && - (parameters[0].ParameterType.IsGenericType) && - (parameters[0].ParameterType.GetGenericTypeDefinition() == typeof(Vector<>)); - } - return false; - }) - .Single() - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { Result }); - ValidateResult(value, (Vector)(Result)); - } - - private void ValidateResult(Vector result, Vector128 value, [CallerMemberName] string method = "") - { - Int64[] resultElements = new Int64[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Int64[] valueElements = new Int64[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(Vector128 result, Vector value, [CallerMemberName] string method = "") - { - Int64[] resultElements = new Int64[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Int64[] valueElements = new Int64[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(Int64[] resultElements, Int64[] valueElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements.Length <= valueElements.Length) - { - for (var i = 0; i < resultElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - } - else - { - for (var i = 0; i < valueElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - for (var i = valueElements.Length; i < resultElements.Length; i++) - { - if (resultElements[i] != default) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.AsVector: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AsVector.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AsVector.SByte.cs deleted file mode 100644 index 01276b847cf5..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AsVector.SByte.cs +++ /dev/null @@ -1,162 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsVectorSByte() - { - var test = new VectorAs__AsVectorSByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsVectorSByte - { - private static readonly int LargestVectorSize = 16; - - private static readonly int VectorElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static readonly int NumericsElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector128 value; - - value = Vector128.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector result = value.AsVector(); - ValidateResult(result, value); - - value = result.AsVector128(); - ValidateResult(value, result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector128 value; - - value = Vector128.Create((sbyte)TestLibrary.Generator.GetSByte()); - object Result = typeof(Vector128) - .GetMethod(nameof(Vector128.AsVector)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector)(Result), value); - - value = (Vector128)typeof(Vector128) - .GetMethods() - .Where((methodInfo) => { - if (methodInfo.Name == nameof(Vector128.AsVector128)) - { - var parameters = methodInfo.GetParameters(); - return (parameters.Length == 1) && - (parameters[0].ParameterType.IsGenericType) && - (parameters[0].ParameterType.GetGenericTypeDefinition() == typeof(Vector<>)); - } - return false; - }) - .Single() - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { Result }); - ValidateResult(value, (Vector)(Result)); - } - - private void ValidateResult(Vector result, Vector128 value, [CallerMemberName] string method = "") - { - SByte[] resultElements = new SByte[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - SByte[] valueElements = new SByte[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(Vector128 result, Vector value, [CallerMemberName] string method = "") - { - SByte[] resultElements = new SByte[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - SByte[] valueElements = new SByte[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(SByte[] resultElements, SByte[] valueElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements.Length <= valueElements.Length) - { - for (var i = 0; i < resultElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - } - else - { - for (var i = 0; i < valueElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - for (var i = valueElements.Length; i < resultElements.Length; i++) - { - if (resultElements[i] != default) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.AsVector: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AsVector.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AsVector.Single.cs deleted file mode 100644 index 03277bbedc98..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AsVector.Single.cs +++ /dev/null @@ -1,162 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsVectorSingle() - { - var test = new VectorAs__AsVectorSingle(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsVectorSingle - { - private static readonly int LargestVectorSize = 16; - - private static readonly int VectorElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static readonly int NumericsElementCount = Unsafe.SizeOf>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector128 value; - - value = Vector128.Create((float)TestLibrary.Generator.GetSingle()); - Vector result = value.AsVector(); - ValidateResult(result, value); - - value = result.AsVector128(); - ValidateResult(value, result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector128 value; - - value = Vector128.Create((float)TestLibrary.Generator.GetSingle()); - object Result = typeof(Vector128) - .GetMethod(nameof(Vector128.AsVector)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector)(Result), value); - - value = (Vector128)typeof(Vector128) - .GetMethods() - .Where((methodInfo) => { - if (methodInfo.Name == nameof(Vector128.AsVector128)) - { - var parameters = methodInfo.GetParameters(); - return (parameters.Length == 1) && - (parameters[0].ParameterType.IsGenericType) && - (parameters[0].ParameterType.GetGenericTypeDefinition() == typeof(Vector<>)); - } - return false; - }) - .Single() - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { Result }); - ValidateResult(value, (Vector)(Result)); - } - - private void ValidateResult(Vector result, Vector128 value, [CallerMemberName] string method = "") - { - Single[] resultElements = new Single[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Single[] valueElements = new Single[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(Vector128 result, Vector value, [CallerMemberName] string method = "") - { - Single[] resultElements = new Single[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Single[] valueElements = new Single[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(Single[] resultElements, Single[] valueElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements.Length <= valueElements.Length) - { - for (var i = 0; i < resultElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - } - else - { - for (var i = 0; i < valueElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - for (var i = valueElements.Length; i < resultElements.Length; i++) - { - if (resultElements[i] != default) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.AsVector: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AsVector.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AsVector.UInt16.cs deleted file mode 100644 index 0be39b16076d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AsVector.UInt16.cs +++ /dev/null @@ -1,162 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsVectorUInt16() - { - var test = new VectorAs__AsVectorUInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsVectorUInt16 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int VectorElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static readonly int NumericsElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector128 value; - - value = Vector128.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector result = value.AsVector(); - ValidateResult(result, value); - - value = result.AsVector128(); - ValidateResult(value, result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector128 value; - - value = Vector128.Create((ushort)TestLibrary.Generator.GetUInt16()); - object Result = typeof(Vector128) - .GetMethod(nameof(Vector128.AsVector)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector)(Result), value); - - value = (Vector128)typeof(Vector128) - .GetMethods() - .Where((methodInfo) => { - if (methodInfo.Name == nameof(Vector128.AsVector128)) - { - var parameters = methodInfo.GetParameters(); - return (parameters.Length == 1) && - (parameters[0].ParameterType.IsGenericType) && - (parameters[0].ParameterType.GetGenericTypeDefinition() == typeof(Vector<>)); - } - return false; - }) - .Single() - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { Result }); - ValidateResult(value, (Vector)(Result)); - } - - private void ValidateResult(Vector result, Vector128 value, [CallerMemberName] string method = "") - { - UInt16[] resultElements = new UInt16[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - UInt16[] valueElements = new UInt16[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(Vector128 result, Vector value, [CallerMemberName] string method = "") - { - UInt16[] resultElements = new UInt16[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - UInt16[] valueElements = new UInt16[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(UInt16[] resultElements, UInt16[] valueElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements.Length <= valueElements.Length) - { - for (var i = 0; i < resultElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - } - else - { - for (var i = 0; i < valueElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - for (var i = valueElements.Length; i < resultElements.Length; i++) - { - if (resultElements[i] != default) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.AsVector: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AsVector.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AsVector.UInt32.cs deleted file mode 100644 index 49f5db5024ae..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AsVector.UInt32.cs +++ /dev/null @@ -1,162 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsVectorUInt32() - { - var test = new VectorAs__AsVectorUInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsVectorUInt32 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int VectorElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static readonly int NumericsElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector128 value; - - value = Vector128.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector result = value.AsVector(); - ValidateResult(result, value); - - value = result.AsVector128(); - ValidateResult(value, result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector128 value; - - value = Vector128.Create((uint)TestLibrary.Generator.GetUInt32()); - object Result = typeof(Vector128) - .GetMethod(nameof(Vector128.AsVector)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector)(Result), value); - - value = (Vector128)typeof(Vector128) - .GetMethods() - .Where((methodInfo) => { - if (methodInfo.Name == nameof(Vector128.AsVector128)) - { - var parameters = methodInfo.GetParameters(); - return (parameters.Length == 1) && - (parameters[0].ParameterType.IsGenericType) && - (parameters[0].ParameterType.GetGenericTypeDefinition() == typeof(Vector<>)); - } - return false; - }) - .Single() - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { Result }); - ValidateResult(value, (Vector)(Result)); - } - - private void ValidateResult(Vector result, Vector128 value, [CallerMemberName] string method = "") - { - UInt32[] resultElements = new UInt32[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - UInt32[] valueElements = new UInt32[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(Vector128 result, Vector value, [CallerMemberName] string method = "") - { - UInt32[] resultElements = new UInt32[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - UInt32[] valueElements = new UInt32[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(UInt32[] resultElements, UInt32[] valueElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements.Length <= valueElements.Length) - { - for (var i = 0; i < resultElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - } - else - { - for (var i = 0; i < valueElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - for (var i = valueElements.Length; i < resultElements.Length; i++) - { - if (resultElements[i] != default) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.AsVector: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AsVector.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AsVector.UInt64.cs deleted file mode 100644 index 35a5620a1169..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/AsVector.UInt64.cs +++ /dev/null @@ -1,162 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsVectorUInt64() - { - var test = new VectorAs__AsVectorUInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsVectorUInt64 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int VectorElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static readonly int NumericsElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector128 value; - - value = Vector128.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector result = value.AsVector(); - ValidateResult(result, value); - - value = result.AsVector128(); - ValidateResult(value, result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector128 value; - - value = Vector128.Create((ulong)TestLibrary.Generator.GetUInt64()); - object Result = typeof(Vector128) - .GetMethod(nameof(Vector128.AsVector)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector)(Result), value); - - value = (Vector128)typeof(Vector128) - .GetMethods() - .Where((methodInfo) => { - if (methodInfo.Name == nameof(Vector128.AsVector128)) - { - var parameters = methodInfo.GetParameters(); - return (parameters.Length == 1) && - (parameters[0].ParameterType.IsGenericType) && - (parameters[0].ParameterType.GetGenericTypeDefinition() == typeof(Vector<>)); - } - return false; - }) - .Single() - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { Result }); - ValidateResult(value, (Vector)(Result)); - } - - private void ValidateResult(Vector result, Vector128 value, [CallerMemberName] string method = "") - { - UInt64[] resultElements = new UInt64[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - UInt64[] valueElements = new UInt64[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(Vector128 result, Vector value, [CallerMemberName] string method = "") - { - UInt64[] resultElements = new UInt64[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - UInt64[] valueElements = new UInt64[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(UInt64[] resultElements, UInt64[] valueElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements.Length <= valueElements.Length) - { - for (var i = 0; i < resultElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - } - else - { - for (var i = 0; i < valueElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - for (var i = valueElements.Length; i < resultElements.Length; i++) - { - if (resultElements[i] != default) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.AsVector: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Byte.0.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Byte.0.cs deleted file mode 100644 index 27256f93dff0..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/GetAndWithElement.Byte.0.cs +++ /dev/null @@ -1,229 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void GetAndWithElementByte0() - { - var test = new VectorGetAndWithElement__GetAndWithElementByte0(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - // Validates that invalid indices throws ArgumentOutOfRangeException - test.RunArgumentOutOfRangeScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorGetAndWithElement__GetAndWithElementByte0 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 0, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Byte[] values = new Byte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetByte(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Byte result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.GetElement)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Byte)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result, Byte[] values, Byte insertedValue, [CallerMemberName] string method = "") - { - Byte[] resultElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Byte[] result, Byte[] values, Byte insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 0) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[0] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 15, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Byte[] values = new Byte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetByte(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Byte result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.GetElement)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Byte)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result, Byte[] values, Byte insertedValue, [CallerMemberName] string method = "") - { - Byte[] resultElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Byte[] result, Byte[] values, Byte insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 15) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[15] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 7, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Byte[] values = new Byte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetByte(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Byte result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.GetElement)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Byte)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result, Byte[] values, Byte insertedValue, [CallerMemberName] string method = "") - { - Byte[] resultElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Byte[] result, Byte[] values, Byte insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 7) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[7] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(Double); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 0, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Double[] values = new Double[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetDouble(); - } - - Vector128 value = Vector128.Create(values[0], values[1]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Double result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 value = Vector128.Create(values[0], values[1]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.GetElement)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Double)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result, Double[] values, Double insertedValue, [CallerMemberName] string method = "") - { - Double[] resultElements = new Double[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Double[] result, Double[] values, Double insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 0) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[0] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(Double); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 1, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Double[] values = new Double[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetDouble(); - } - - Vector128 value = Vector128.Create(values[0], values[1]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Double result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 value = Vector128.Create(values[0], values[1]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.GetElement)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Double)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result, Double[] values, Double insertedValue, [CallerMemberName] string method = "") - { - Double[] resultElements = new Double[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Double[] result, Double[] values, Double insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 1) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[1] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 0, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int16[] values = new Int16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt16(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Int16 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.GetElement)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Int16)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result, Int16[] values, Int16 insertedValue, [CallerMemberName] string method = "") - { - Int16[] resultElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Int16[] result, Int16[] values, Int16 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 0) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[0] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 3, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int16[] values = new Int16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt16(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Int16 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.GetElement)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Int16)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result, Int16[] values, Int16 insertedValue, [CallerMemberName] string method = "") - { - Int16[] resultElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Int16[] result, Int16[] values, Int16 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 3) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[3] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 7, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int16[] values = new Int16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt16(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Int16 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.GetElement)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Int16)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result, Int16[] values, Int16 insertedValue, [CallerMemberName] string method = "") - { - Int16[] resultElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Int16[] result, Int16[] values, Int16 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 7) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[7] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 0, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int32[] values = new Int32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt32(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Int32 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.GetElement)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Int32)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result, Int32[] values, Int32 insertedValue, [CallerMemberName] string method = "") - { - Int32[] resultElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Int32[] result, Int32[] values, Int32 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 0) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[0] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 1, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int32[] values = new Int32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt32(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Int32 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.GetElement)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Int32)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result, Int32[] values, Int32 insertedValue, [CallerMemberName] string method = "") - { - Int32[] resultElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Int32[] result, Int32[] values, Int32 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 1) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[1] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 3, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int32[] values = new Int32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt32(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Int32 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.GetElement)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Int32)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result, Int32[] values, Int32 insertedValue, [CallerMemberName] string method = "") - { - Int32[] resultElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Int32[] result, Int32[] values, Int32 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 3) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[3] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(Int64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 0, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int64[] values = new Int64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt64(); - } - - Vector128 value = Vector128.Create(values[0], values[1]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Int64 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 value = Vector128.Create(values[0], values[1]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.GetElement)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Int64)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result, Int64[] values, Int64 insertedValue, [CallerMemberName] string method = "") - { - Int64[] resultElements = new Int64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Int64[] result, Int64[] values, Int64 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 0) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[0] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(Int64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 1, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int64[] values = new Int64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt64(); - } - - Vector128 value = Vector128.Create(values[0], values[1]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Int64 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 value = Vector128.Create(values[0], values[1]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.GetElement)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Int64)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result, Int64[] values, Int64 insertedValue, [CallerMemberName] string method = "") - { - Int64[] resultElements = new Int64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Int64[] result, Int64[] values, Int64 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 1) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[1] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 0, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - SByte[] values = new SByte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSByte(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - SByte result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.GetElement)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((SByte)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result, SByte[] values, SByte insertedValue, [CallerMemberName] string method = "") - { - SByte[] resultElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(SByte[] result, SByte[] values, SByte insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 0) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[0] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 15, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - SByte[] values = new SByte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSByte(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - SByte result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.GetElement)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((SByte)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result, SByte[] values, SByte insertedValue, [CallerMemberName] string method = "") - { - SByte[] resultElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(SByte[] result, SByte[] values, SByte insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 15) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[15] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 7, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - SByte[] values = new SByte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSByte(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - SByte result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.GetElement)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((SByte)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result, SByte[] values, SByte insertedValue, [CallerMemberName] string method = "") - { - SByte[] resultElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(SByte[] result, SByte[] values, SByte insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 7) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[7] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 0, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Single[] values = new Single[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSingle(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Single result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.GetElement)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Single)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result, Single[] values, Single insertedValue, [CallerMemberName] string method = "") - { - Single[] resultElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Single[] result, Single[] values, Single insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 0) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[0] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 1, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Single[] values = new Single[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSingle(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Single result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.GetElement)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Single)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result, Single[] values, Single insertedValue, [CallerMemberName] string method = "") - { - Single[] resultElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Single[] result, Single[] values, Single insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 1) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[1] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 3, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Single[] values = new Single[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSingle(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Single result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.GetElement)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Single)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result, Single[] values, Single insertedValue, [CallerMemberName] string method = "") - { - Single[] resultElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Single[] result, Single[] values, Single insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 3) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[3] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 0, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt16[] values = new UInt16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt16(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - UInt16 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.GetElement)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((UInt16)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result, UInt16[] values, UInt16 insertedValue, [CallerMemberName] string method = "") - { - UInt16[] resultElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(UInt16[] result, UInt16[] values, UInt16 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 0) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[0] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 3, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt16[] values = new UInt16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt16(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - UInt16 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.GetElement)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((UInt16)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result, UInt16[] values, UInt16 insertedValue, [CallerMemberName] string method = "") - { - UInt16[] resultElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(UInt16[] result, UInt16[] values, UInt16 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 3) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[3] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 7, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt16[] values = new UInt16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt16(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - UInt16 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.GetElement)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((UInt16)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result, UInt16[] values, UInt16 insertedValue, [CallerMemberName] string method = "") - { - UInt16[] resultElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(UInt16[] result, UInt16[] values, UInt16 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 7) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[7] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 0, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt32[] values = new UInt32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt32(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - UInt32 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.GetElement)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((UInt32)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result, UInt32[] values, UInt32 insertedValue, [CallerMemberName] string method = "") - { - UInt32[] resultElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(UInt32[] result, UInt32[] values, UInt32 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 0) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[0] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 1, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt32[] values = new UInt32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt32(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - UInt32 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.GetElement)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((UInt32)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result, UInt32[] values, UInt32 insertedValue, [CallerMemberName] string method = "") - { - UInt32[] resultElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(UInt32[] result, UInt32[] values, UInt32 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 1) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[1] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 3, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt32[] values = new UInt32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt32(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - UInt32 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.GetElement)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((UInt32)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result, UInt32[] values, UInt32 insertedValue, [CallerMemberName] string method = "") - { - UInt32[] resultElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(UInt32[] result, UInt32[] values, UInt32 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 3) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[3] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(UInt64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 0, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt64[] values = new UInt64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt64(); - } - - Vector128 value = Vector128.Create(values[0], values[1]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - UInt64 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 value = Vector128.Create(values[0], values[1]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.GetElement)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((UInt64)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result, UInt64[] values, UInt64 insertedValue, [CallerMemberName] string method = "") - { - UInt64[] resultElements = new UInt64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(UInt64[] result, UInt64[] values, UInt64 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 0) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[0] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(UInt64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 1, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt64[] values = new UInt64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt64(); - } - - Vector128 value = Vector128.Create(values[0], values[1]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - UInt64 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 value = Vector128.Create(values[0], values[1]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.GetElement)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((UInt64)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128 result, UInt64[] values, UInt64 insertedValue, [CallerMemberName] string method = "") - { - UInt64[] resultElements = new UInt64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(UInt64[] result, UInt64[] values, UInt64 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 1) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[1] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Byte[] values = new Byte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetByte(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - Vector64 lowerResult = value.GetLower(); - Vector64 upperResult = value.GetUpper(); - ValidateGetResult(lowerResult, upperResult, values); - - Vector128 result = value.WithLower(upperResult); - result = result.WithUpper(lowerResult); - ValidateWithResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Byte[] values = new Byte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetByte(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - object lowerResult = typeof(Vector128) - .GetMethod(nameof(Vector128.GetLower)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - object upperResult = typeof(Vector128) - .GetMethod(nameof(Vector128.GetUpper)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - ValidateGetResult((Vector64)(lowerResult), (Vector64)(upperResult), values); - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithLower)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value, upperResult }); - result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithUpper)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { result, lowerResult }); - ValidateWithResult((Vector128)(result), values); - } - - private void ValidateGetResult(Vector64 lowerResult, Vector64 upperResult, Byte[] values, [CallerMemberName] string method = "") - { - Byte[] lowerElements = new Byte[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref lowerElements[0]), lowerResult); - - Byte[] upperElements = new Byte[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref upperElements[0]), upperResult); - - ValidateGetResult(lowerElements, upperElements, values, method); - } - - private void ValidateGetResult(Byte[] lowerResult, Byte[] upperResult, Byte[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (lowerResult[i] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.GetLower(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", lowerResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - - succeeded = true; - - for (int i = ElementCount / 2; i < ElementCount; i++) - { - if (upperResult[i - (ElementCount / 2)] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.GetUpper(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", upperResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private void ValidateWithResult(Vector128 result, Byte[] values, [CallerMemberName] string method = "") - { - Byte[] resultElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, method); - } - - private void ValidateWithResult(Byte[] result, Byte[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (result[i] != values[i + (ElementCount / 2)]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(Double); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Double[] values = new Double[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetDouble(); - } - - Vector128 value = Vector128.Create(values[0], values[1]); - - Vector64 lowerResult = value.GetLower(); - Vector64 upperResult = value.GetUpper(); - ValidateGetResult(lowerResult, upperResult, values); - - Vector128 result = value.WithLower(upperResult); - result = result.WithUpper(lowerResult); - ValidateWithResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Double[] values = new Double[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetDouble(); - } - - Vector128 value = Vector128.Create(values[0], values[1]); - - object lowerResult = typeof(Vector128) - .GetMethod(nameof(Vector128.GetLower)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - object upperResult = typeof(Vector128) - .GetMethod(nameof(Vector128.GetUpper)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - ValidateGetResult((Vector64)(lowerResult), (Vector64)(upperResult), values); - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithLower)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value, upperResult }); - result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithUpper)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { result, lowerResult }); - ValidateWithResult((Vector128)(result), values); - } - - private void ValidateGetResult(Vector64 lowerResult, Vector64 upperResult, Double[] values, [CallerMemberName] string method = "") - { - Double[] lowerElements = new Double[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref lowerElements[0]), lowerResult); - - Double[] upperElements = new Double[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref upperElements[0]), upperResult); - - ValidateGetResult(lowerElements, upperElements, values, method); - } - - private void ValidateGetResult(Double[] lowerResult, Double[] upperResult, Double[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (lowerResult[i] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.GetLower(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", lowerResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - - succeeded = true; - - for (int i = ElementCount / 2; i < ElementCount; i++) - { - if (upperResult[i - (ElementCount / 2)] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.GetUpper(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", upperResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private void ValidateWithResult(Vector128 result, Double[] values, [CallerMemberName] string method = "") - { - Double[] resultElements = new Double[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, method); - } - - private void ValidateWithResult(Double[] result, Double[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (result[i] != values[i + (ElementCount / 2)]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int16[] values = new Int16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt16(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - Vector64 lowerResult = value.GetLower(); - Vector64 upperResult = value.GetUpper(); - ValidateGetResult(lowerResult, upperResult, values); - - Vector128 result = value.WithLower(upperResult); - result = result.WithUpper(lowerResult); - ValidateWithResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int16[] values = new Int16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt16(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - object lowerResult = typeof(Vector128) - .GetMethod(nameof(Vector128.GetLower)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - object upperResult = typeof(Vector128) - .GetMethod(nameof(Vector128.GetUpper)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - ValidateGetResult((Vector64)(lowerResult), (Vector64)(upperResult), values); - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithLower)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value, upperResult }); - result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithUpper)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { result, lowerResult }); - ValidateWithResult((Vector128)(result), values); - } - - private void ValidateGetResult(Vector64 lowerResult, Vector64 upperResult, Int16[] values, [CallerMemberName] string method = "") - { - Int16[] lowerElements = new Int16[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref lowerElements[0]), lowerResult); - - Int16[] upperElements = new Int16[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref upperElements[0]), upperResult); - - ValidateGetResult(lowerElements, upperElements, values, method); - } - - private void ValidateGetResult(Int16[] lowerResult, Int16[] upperResult, Int16[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (lowerResult[i] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.GetLower(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", lowerResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - - succeeded = true; - - for (int i = ElementCount / 2; i < ElementCount; i++) - { - if (upperResult[i - (ElementCount / 2)] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.GetUpper(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", upperResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private void ValidateWithResult(Vector128 result, Int16[] values, [CallerMemberName] string method = "") - { - Int16[] resultElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, method); - } - - private void ValidateWithResult(Int16[] result, Int16[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (result[i] != values[i + (ElementCount / 2)]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int32[] values = new Int32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt32(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - - Vector64 lowerResult = value.GetLower(); - Vector64 upperResult = value.GetUpper(); - ValidateGetResult(lowerResult, upperResult, values); - - Vector128 result = value.WithLower(upperResult); - result = result.WithUpper(lowerResult); - ValidateWithResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int32[] values = new Int32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt32(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - - object lowerResult = typeof(Vector128) - .GetMethod(nameof(Vector128.GetLower)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - object upperResult = typeof(Vector128) - .GetMethod(nameof(Vector128.GetUpper)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - ValidateGetResult((Vector64)(lowerResult), (Vector64)(upperResult), values); - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithLower)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value, upperResult }); - result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithUpper)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { result, lowerResult }); - ValidateWithResult((Vector128)(result), values); - } - - private void ValidateGetResult(Vector64 lowerResult, Vector64 upperResult, Int32[] values, [CallerMemberName] string method = "") - { - Int32[] lowerElements = new Int32[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref lowerElements[0]), lowerResult); - - Int32[] upperElements = new Int32[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref upperElements[0]), upperResult); - - ValidateGetResult(lowerElements, upperElements, values, method); - } - - private void ValidateGetResult(Int32[] lowerResult, Int32[] upperResult, Int32[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (lowerResult[i] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.GetLower(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", lowerResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - - succeeded = true; - - for (int i = ElementCount / 2; i < ElementCount; i++) - { - if (upperResult[i - (ElementCount / 2)] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.GetUpper(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", upperResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private void ValidateWithResult(Vector128 result, Int32[] values, [CallerMemberName] string method = "") - { - Int32[] resultElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, method); - } - - private void ValidateWithResult(Int32[] result, Int32[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (result[i] != values[i + (ElementCount / 2)]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(Int64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int64[] values = new Int64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt64(); - } - - Vector128 value = Vector128.Create(values[0], values[1]); - - Vector64 lowerResult = value.GetLower(); - Vector64 upperResult = value.GetUpper(); - ValidateGetResult(lowerResult, upperResult, values); - - Vector128 result = value.WithLower(upperResult); - result = result.WithUpper(lowerResult); - ValidateWithResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int64[] values = new Int64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt64(); - } - - Vector128 value = Vector128.Create(values[0], values[1]); - - object lowerResult = typeof(Vector128) - .GetMethod(nameof(Vector128.GetLower)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - object upperResult = typeof(Vector128) - .GetMethod(nameof(Vector128.GetUpper)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - ValidateGetResult((Vector64)(lowerResult), (Vector64)(upperResult), values); - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithLower)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value, upperResult }); - result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithUpper)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { result, lowerResult }); - ValidateWithResult((Vector128)(result), values); - } - - private void ValidateGetResult(Vector64 lowerResult, Vector64 upperResult, Int64[] values, [CallerMemberName] string method = "") - { - Int64[] lowerElements = new Int64[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref lowerElements[0]), lowerResult); - - Int64[] upperElements = new Int64[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref upperElements[0]), upperResult); - - ValidateGetResult(lowerElements, upperElements, values, method); - } - - private void ValidateGetResult(Int64[] lowerResult, Int64[] upperResult, Int64[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (lowerResult[i] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.GetLower(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", lowerResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - - succeeded = true; - - for (int i = ElementCount / 2; i < ElementCount; i++) - { - if (upperResult[i - (ElementCount / 2)] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.GetUpper(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", upperResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private void ValidateWithResult(Vector128 result, Int64[] values, [CallerMemberName] string method = "") - { - Int64[] resultElements = new Int64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, method); - } - - private void ValidateWithResult(Int64[] result, Int64[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (result[i] != values[i + (ElementCount / 2)]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - SByte[] values = new SByte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSByte(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - Vector64 lowerResult = value.GetLower(); - Vector64 upperResult = value.GetUpper(); - ValidateGetResult(lowerResult, upperResult, values); - - Vector128 result = value.WithLower(upperResult); - result = result.WithUpper(lowerResult); - ValidateWithResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - SByte[] values = new SByte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSByte(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - object lowerResult = typeof(Vector128) - .GetMethod(nameof(Vector128.GetLower)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - object upperResult = typeof(Vector128) - .GetMethod(nameof(Vector128.GetUpper)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - ValidateGetResult((Vector64)(lowerResult), (Vector64)(upperResult), values); - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithLower)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value, upperResult }); - result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithUpper)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { result, lowerResult }); - ValidateWithResult((Vector128)(result), values); - } - - private void ValidateGetResult(Vector64 lowerResult, Vector64 upperResult, SByte[] values, [CallerMemberName] string method = "") - { - SByte[] lowerElements = new SByte[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref lowerElements[0]), lowerResult); - - SByte[] upperElements = new SByte[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref upperElements[0]), upperResult); - - ValidateGetResult(lowerElements, upperElements, values, method); - } - - private void ValidateGetResult(SByte[] lowerResult, SByte[] upperResult, SByte[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (lowerResult[i] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.GetLower(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", lowerResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - - succeeded = true; - - for (int i = ElementCount / 2; i < ElementCount; i++) - { - if (upperResult[i - (ElementCount / 2)] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.GetUpper(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", upperResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private void ValidateWithResult(Vector128 result, SByte[] values, [CallerMemberName] string method = "") - { - SByte[] resultElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, method); - } - - private void ValidateWithResult(SByte[] result, SByte[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (result[i] != values[i + (ElementCount / 2)]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Single[] values = new Single[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSingle(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - - Vector64 lowerResult = value.GetLower(); - Vector64 upperResult = value.GetUpper(); - ValidateGetResult(lowerResult, upperResult, values); - - Vector128 result = value.WithLower(upperResult); - result = result.WithUpper(lowerResult); - ValidateWithResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Single[] values = new Single[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSingle(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - - object lowerResult = typeof(Vector128) - .GetMethod(nameof(Vector128.GetLower)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - object upperResult = typeof(Vector128) - .GetMethod(nameof(Vector128.GetUpper)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - ValidateGetResult((Vector64)(lowerResult), (Vector64)(upperResult), values); - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithLower)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value, upperResult }); - result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithUpper)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { result, lowerResult }); - ValidateWithResult((Vector128)(result), values); - } - - private void ValidateGetResult(Vector64 lowerResult, Vector64 upperResult, Single[] values, [CallerMemberName] string method = "") - { - Single[] lowerElements = new Single[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref lowerElements[0]), lowerResult); - - Single[] upperElements = new Single[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref upperElements[0]), upperResult); - - ValidateGetResult(lowerElements, upperElements, values, method); - } - - private void ValidateGetResult(Single[] lowerResult, Single[] upperResult, Single[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (lowerResult[i] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.GetLower(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", lowerResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - - succeeded = true; - - for (int i = ElementCount / 2; i < ElementCount; i++) - { - if (upperResult[i - (ElementCount / 2)] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.GetUpper(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", upperResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private void ValidateWithResult(Vector128 result, Single[] values, [CallerMemberName] string method = "") - { - Single[] resultElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, method); - } - - private void ValidateWithResult(Single[] result, Single[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (result[i] != values[i + (ElementCount / 2)]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt16[] values = new UInt16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt16(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - Vector64 lowerResult = value.GetLower(); - Vector64 upperResult = value.GetUpper(); - ValidateGetResult(lowerResult, upperResult, values); - - Vector128 result = value.WithLower(upperResult); - result = result.WithUpper(lowerResult); - ValidateWithResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt16[] values = new UInt16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt16(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - object lowerResult = typeof(Vector128) - .GetMethod(nameof(Vector128.GetLower)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - object upperResult = typeof(Vector128) - .GetMethod(nameof(Vector128.GetUpper)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - ValidateGetResult((Vector64)(lowerResult), (Vector64)(upperResult), values); - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithLower)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value, upperResult }); - result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithUpper)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { result, lowerResult }); - ValidateWithResult((Vector128)(result), values); - } - - private void ValidateGetResult(Vector64 lowerResult, Vector64 upperResult, UInt16[] values, [CallerMemberName] string method = "") - { - UInt16[] lowerElements = new UInt16[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref lowerElements[0]), lowerResult); - - UInt16[] upperElements = new UInt16[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref upperElements[0]), upperResult); - - ValidateGetResult(lowerElements, upperElements, values, method); - } - - private void ValidateGetResult(UInt16[] lowerResult, UInt16[] upperResult, UInt16[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (lowerResult[i] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.GetLower(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", lowerResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - - succeeded = true; - - for (int i = ElementCount / 2; i < ElementCount; i++) - { - if (upperResult[i - (ElementCount / 2)] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.GetUpper(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", upperResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private void ValidateWithResult(Vector128 result, UInt16[] values, [CallerMemberName] string method = "") - { - UInt16[] resultElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, method); - } - - private void ValidateWithResult(UInt16[] result, UInt16[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (result[i] != values[i + (ElementCount / 2)]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt32[] values = new UInt32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt32(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - - Vector64 lowerResult = value.GetLower(); - Vector64 upperResult = value.GetUpper(); - ValidateGetResult(lowerResult, upperResult, values); - - Vector128 result = value.WithLower(upperResult); - result = result.WithUpper(lowerResult); - ValidateWithResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt32[] values = new UInt32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt32(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - - object lowerResult = typeof(Vector128) - .GetMethod(nameof(Vector128.GetLower)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - object upperResult = typeof(Vector128) - .GetMethod(nameof(Vector128.GetUpper)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - ValidateGetResult((Vector64)(lowerResult), (Vector64)(upperResult), values); - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithLower)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value, upperResult }); - result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithUpper)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { result, lowerResult }); - ValidateWithResult((Vector128)(result), values); - } - - private void ValidateGetResult(Vector64 lowerResult, Vector64 upperResult, UInt32[] values, [CallerMemberName] string method = "") - { - UInt32[] lowerElements = new UInt32[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref lowerElements[0]), lowerResult); - - UInt32[] upperElements = new UInt32[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref upperElements[0]), upperResult); - - ValidateGetResult(lowerElements, upperElements, values, method); - } - - private void ValidateGetResult(UInt32[] lowerResult, UInt32[] upperResult, UInt32[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (lowerResult[i] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.GetLower(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", lowerResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - - succeeded = true; - - for (int i = ElementCount / 2; i < ElementCount; i++) - { - if (upperResult[i - (ElementCount / 2)] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.GetUpper(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", upperResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private void ValidateWithResult(Vector128 result, UInt32[] values, [CallerMemberName] string method = "") - { - UInt32[] resultElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, method); - } - - private void ValidateWithResult(UInt32[] result, UInt32[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (result[i] != values[i + (ElementCount / 2)]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(UInt64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt64[] values = new UInt64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt64(); - } - - Vector128 value = Vector128.Create(values[0], values[1]); - - Vector64 lowerResult = value.GetLower(); - Vector64 upperResult = value.GetUpper(); - ValidateGetResult(lowerResult, upperResult, values); - - Vector128 result = value.WithLower(upperResult); - result = result.WithUpper(lowerResult); - ValidateWithResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt64[] values = new UInt64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt64(); - } - - Vector128 value = Vector128.Create(values[0], values[1]); - - object lowerResult = typeof(Vector128) - .GetMethod(nameof(Vector128.GetLower)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - object upperResult = typeof(Vector128) - .GetMethod(nameof(Vector128.GetUpper)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - ValidateGetResult((Vector64)(lowerResult), (Vector64)(upperResult), values); - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithLower)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value, upperResult }); - result = typeof(Vector128) - .GetMethod(nameof(Vector128.WithUpper)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { result, lowerResult }); - ValidateWithResult((Vector128)(result), values); - } - - private void ValidateGetResult(Vector64 lowerResult, Vector64 upperResult, UInt64[] values, [CallerMemberName] string method = "") - { - UInt64[] lowerElements = new UInt64[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref lowerElements[0]), lowerResult); - - UInt64[] upperElements = new UInt64[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref upperElements[0]), upperResult); - - ValidateGetResult(lowerElements, upperElements, values, method); - } - - private void ValidateGetResult(UInt64[] lowerResult, UInt64[] upperResult, UInt64[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (lowerResult[i] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.GetLower(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", lowerResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - - succeeded = true; - - for (int i = ElementCount / 2; i < ElementCount; i++) - { - if (upperResult[i - (ElementCount / 2)] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.GetUpper(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", upperResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private void ValidateWithResult(Vector128 result, UInt64[] values, [CallerMemberName] string method = "") - { - UInt64[] resultElements = new UInt64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, method); - } - - private void ValidateWithResult(UInt64[] result, UInt64[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (result[i] != values[i + (ElementCount / 2)]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Byte[] values = new Byte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetByte(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - Byte result = value.ToScalar(); - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Byte[] values = new Byte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetByte(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.ToScalar)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - - ValidateResult((Byte)(result), values); - } - - private void ValidateResult(Byte result, Byte[] values, [CallerMemberName] string method = "") - { - if (result != values[0]) - { - TestLibrary.TestFramework.LogInformation($"Vector128.ToScalar(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" values: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Double.cs deleted file mode 100644 index 16beafaf3102..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Double.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ToScalarDouble() - { - var test = new VectorToScalar__ToScalarDouble(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorToScalar__ToScalarDouble - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Double[] values = new Double[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetDouble(); - } - - Vector128 value = Vector128.Create(values[0], values[1]); - - Double result = value.ToScalar(); - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Double[] values = new Double[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetDouble(); - } - - Vector128 value = Vector128.Create(values[0], values[1]); - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.ToScalar)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - - ValidateResult((Double)(result), values); - } - - private void ValidateResult(Double result, Double[] values, [CallerMemberName] string method = "") - { - if (result != values[0]) - { - TestLibrary.TestFramework.LogInformation($"Vector128.ToScalar(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" values: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Int16.cs deleted file mode 100644 index 814508aeaa69..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Int16.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ToScalarInt16() - { - var test = new VectorToScalar__ToScalarInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorToScalar__ToScalarInt16 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int16[] values = new Int16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt16(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - Int16 result = value.ToScalar(); - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int16[] values = new Int16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt16(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.ToScalar)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - - ValidateResult((Int16)(result), values); - } - - private void ValidateResult(Int16 result, Int16[] values, [CallerMemberName] string method = "") - { - if (result != values[0]) - { - TestLibrary.TestFramework.LogInformation($"Vector128.ToScalar(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" values: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Int32.cs deleted file mode 100644 index be6037eb7952..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Int32.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ToScalarInt32() - { - var test = new VectorToScalar__ToScalarInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorToScalar__ToScalarInt32 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int32[] values = new Int32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt32(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - - Int32 result = value.ToScalar(); - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int32[] values = new Int32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt32(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.ToScalar)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - - ValidateResult((Int32)(result), values); - } - - private void ValidateResult(Int32 result, Int32[] values, [CallerMemberName] string method = "") - { - if (result != values[0]) - { - TestLibrary.TestFramework.LogInformation($"Vector128.ToScalar(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" values: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Int64.cs deleted file mode 100644 index 75f18dc528cb..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Int64.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ToScalarInt64() - { - var test = new VectorToScalar__ToScalarInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorToScalar__ToScalarInt64 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int64[] values = new Int64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt64(); - } - - Vector128 value = Vector128.Create(values[0], values[1]); - - Int64 result = value.ToScalar(); - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int64[] values = new Int64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt64(); - } - - Vector128 value = Vector128.Create(values[0], values[1]); - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.ToScalar)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - - ValidateResult((Int64)(result), values); - } - - private void ValidateResult(Int64 result, Int64[] values, [CallerMemberName] string method = "") - { - if (result != values[0]) - { - TestLibrary.TestFramework.LogInformation($"Vector128.ToScalar(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" values: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.SByte.cs deleted file mode 100644 index 393db30b0f5c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.SByte.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ToScalarSByte() - { - var test = new VectorToScalar__ToScalarSByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorToScalar__ToScalarSByte - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - SByte[] values = new SByte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSByte(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - SByte result = value.ToScalar(); - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - SByte[] values = new SByte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSByte(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.ToScalar)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - - ValidateResult((SByte)(result), values); - } - - private void ValidateResult(SByte result, SByte[] values, [CallerMemberName] string method = "") - { - if (result != values[0]) - { - TestLibrary.TestFramework.LogInformation($"Vector128.ToScalar(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" values: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Single.cs deleted file mode 100644 index 8052fc9ee584..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.Single.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ToScalarSingle() - { - var test = new VectorToScalar__ToScalarSingle(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorToScalar__ToScalarSingle - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Single[] values = new Single[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSingle(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - - Single result = value.ToScalar(); - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Single[] values = new Single[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSingle(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.ToScalar)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - - ValidateResult((Single)(result), values); - } - - private void ValidateResult(Single result, Single[] values, [CallerMemberName] string method = "") - { - if (result != values[0]) - { - TestLibrary.TestFramework.LogInformation($"Vector128.ToScalar(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" values: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.UInt16.cs deleted file mode 100644 index b06ec8c885ac..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.UInt16.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ToScalarUInt16() - { - var test = new VectorToScalar__ToScalarUInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorToScalar__ToScalarUInt16 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt16[] values = new UInt16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt16(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - UInt16 result = value.ToScalar(); - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt16[] values = new UInt16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt16(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.ToScalar)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - - ValidateResult((UInt16)(result), values); - } - - private void ValidateResult(UInt16 result, UInt16[] values, [CallerMemberName] string method = "") - { - if (result != values[0]) - { - TestLibrary.TestFramework.LogInformation($"Vector128.ToScalar(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" values: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.UInt32.cs deleted file mode 100644 index e542d0cc7009..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.UInt32.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ToScalarUInt32() - { - var test = new VectorToScalar__ToScalarUInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorToScalar__ToScalarUInt32 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt32[] values = new UInt32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt32(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - - UInt32 result = value.ToScalar(); - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt32[] values = new UInt32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt32(); - } - - Vector128 value = Vector128.Create(values[0], values[1], values[2], values[3]); - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.ToScalar)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - - ValidateResult((UInt32)(result), values); - } - - private void ValidateResult(UInt32 result, UInt32[] values, [CallerMemberName] string method = "") - { - if (result != values[0]) - { - TestLibrary.TestFramework.LogInformation($"Vector128.ToScalar(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" values: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.UInt64.cs deleted file mode 100644 index 525540789e99..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToScalar.UInt64.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ToScalarUInt64() - { - var test = new VectorToScalar__ToScalarUInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorToScalar__ToScalarUInt64 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt64[] values = new UInt64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt64(); - } - - Vector128 value = Vector128.Create(values[0], values[1]); - - UInt64 result = value.ToScalar(); - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt64[] values = new UInt64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt64(); - } - - Vector128 value = Vector128.Create(values[0], values[1]); - - object result = typeof(Vector128) - .GetMethod(nameof(Vector128.ToScalar)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - - ValidateResult((UInt64)(result), values); - } - - private void ValidateResult(UInt64 result, UInt64[] values, [CallerMemberName] string method = "") - { - if (result != values[0]) - { - TestLibrary.TestFramework.LogInformation($"Vector128.ToScalar(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" values: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToString.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToString.Byte.cs deleted file mode 100644 index 3e183666dde7..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToString.Byte.cs +++ /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. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private unsafe static void ToStringByte() - { - int size = Unsafe.SizeOf>() / sizeof(Byte); - Byte[] values = new Byte[size]; - - for (int i = 0; i < size; i++) - { - values[i] = TestLibrary.Generator.GetByte(); - } - - Vector128 vector = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - string actual = vector.ToString(); - - string expected = '<' + string.Join(", ", values.Select(x => x.ToString("G", System.Globalization.CultureInfo.InvariantCulture))) + '>'; - - bool succeeded = string.Equals(expected, actual, StringComparison.Ordinal); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128ByteToString: Vector128.ToString() returned an unexpected result."); - TestLibrary.TestFramework.LogInformation($"Expected: {expected}"); - TestLibrary.TestFramework.LogInformation($"Actual: {actual}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToString.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToString.Double.cs deleted file mode 100644 index 031ce53d54fb..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToString.Double.cs +++ /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. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private unsafe static void ToStringDouble() - { - int size = Unsafe.SizeOf>() / sizeof(Double); - Double[] values = new Double[size]; - - for (int i = 0; i < size; i++) - { - values[i] = TestLibrary.Generator.GetDouble(); - } - - Vector128 vector = Vector128.Create(values[0], values[1]); - string actual = vector.ToString(); - - string expected = '<' + string.Join(", ", values.Select(x => x.ToString("G", System.Globalization.CultureInfo.InvariantCulture))) + '>'; - - bool succeeded = string.Equals(expected, actual, StringComparison.Ordinal); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128DoubleToString: Vector128.ToString() returned an unexpected result."); - TestLibrary.TestFramework.LogInformation($"Expected: {expected}"); - TestLibrary.TestFramework.LogInformation($"Actual: {actual}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToString.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToString.Int16.cs deleted file mode 100644 index ba99452ce142..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToString.Int16.cs +++ /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. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private unsafe static void ToStringInt16() - { - int size = Unsafe.SizeOf>() / sizeof(Int16); - Int16[] values = new Int16[size]; - - for (int i = 0; i < size; i++) - { - values[i] = TestLibrary.Generator.GetInt16(); - } - - Vector128 vector = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - string actual = vector.ToString(); - - string expected = '<' + string.Join(", ", values.Select(x => x.ToString("G", System.Globalization.CultureInfo.InvariantCulture))) + '>'; - - bool succeeded = string.Equals(expected, actual, StringComparison.Ordinal); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128Int16ToString: Vector128.ToString() returned an unexpected result."); - TestLibrary.TestFramework.LogInformation($"Expected: {expected}"); - TestLibrary.TestFramework.LogInformation($"Actual: {actual}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToString.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToString.Int32.cs deleted file mode 100644 index 49dd98f9de70..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToString.Int32.cs +++ /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. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private unsafe static void ToStringInt32() - { - int size = Unsafe.SizeOf>() / sizeof(Int32); - Int32[] values = new Int32[size]; - - for (int i = 0; i < size; i++) - { - values[i] = TestLibrary.Generator.GetInt32(); - } - - Vector128 vector = Vector128.Create(values[0], values[1], values[2], values[3]); - string actual = vector.ToString(); - - string expected = '<' + string.Join(", ", values.Select(x => x.ToString("G", System.Globalization.CultureInfo.InvariantCulture))) + '>'; - - bool succeeded = string.Equals(expected, actual, StringComparison.Ordinal); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128Int32ToString: Vector128.ToString() returned an unexpected result."); - TestLibrary.TestFramework.LogInformation($"Expected: {expected}"); - TestLibrary.TestFramework.LogInformation($"Actual: {actual}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToString.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToString.Int64.cs deleted file mode 100644 index 96efb0242fbf..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToString.Int64.cs +++ /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. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private unsafe static void ToStringInt64() - { - int size = Unsafe.SizeOf>() / sizeof(Int64); - Int64[] values = new Int64[size]; - - for (int i = 0; i < size; i++) - { - values[i] = TestLibrary.Generator.GetInt64(); - } - - Vector128 vector = Vector128.Create(values[0], values[1]); - string actual = vector.ToString(); - - string expected = '<' + string.Join(", ", values.Select(x => x.ToString("G", System.Globalization.CultureInfo.InvariantCulture))) + '>'; - - bool succeeded = string.Equals(expected, actual, StringComparison.Ordinal); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128Int64ToString: Vector128.ToString() returned an unexpected result."); - TestLibrary.TestFramework.LogInformation($"Expected: {expected}"); - TestLibrary.TestFramework.LogInformation($"Actual: {actual}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToString.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToString.SByte.cs deleted file mode 100644 index 2894cd64d3c1..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToString.SByte.cs +++ /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. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private unsafe static void ToStringSByte() - { - int size = Unsafe.SizeOf>() / sizeof(SByte); - SByte[] values = new SByte[size]; - - for (int i = 0; i < size; i++) - { - values[i] = TestLibrary.Generator.GetSByte(); - } - - Vector128 vector = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - string actual = vector.ToString(); - - string expected = '<' + string.Join(", ", values.Select(x => x.ToString("G", System.Globalization.CultureInfo.InvariantCulture))) + '>'; - - bool succeeded = string.Equals(expected, actual, StringComparison.Ordinal); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128SByteToString: Vector128.ToString() returned an unexpected result."); - TestLibrary.TestFramework.LogInformation($"Expected: {expected}"); - TestLibrary.TestFramework.LogInformation($"Actual: {actual}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToString.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToString.Single.cs deleted file mode 100644 index 98d98b982282..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToString.Single.cs +++ /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. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private unsafe static void ToStringSingle() - { - int size = Unsafe.SizeOf>() / sizeof(Single); - Single[] values = new Single[size]; - - for (int i = 0; i < size; i++) - { - values[i] = TestLibrary.Generator.GetSingle(); - } - - Vector128 vector = Vector128.Create(values[0], values[1], values[2], values[3]); - string actual = vector.ToString(); - - string expected = '<' + string.Join(", ", values.Select(x => x.ToString("G", System.Globalization.CultureInfo.InvariantCulture))) + '>'; - - bool succeeded = string.Equals(expected, actual, StringComparison.Ordinal); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128SingleToString: Vector128.ToString() returned an unexpected result."); - TestLibrary.TestFramework.LogInformation($"Expected: {expected}"); - TestLibrary.TestFramework.LogInformation($"Actual: {actual}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToString.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToString.UInt16.cs deleted file mode 100644 index 122f15ebf4cf..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToString.UInt16.cs +++ /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. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private unsafe static void ToStringUInt16() - { - int size = Unsafe.SizeOf>() / sizeof(UInt16); - UInt16[] values = new UInt16[size]; - - for (int i = 0; i < size; i++) - { - values[i] = TestLibrary.Generator.GetUInt16(); - } - - Vector128 vector = Vector128.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - string actual = vector.ToString(); - - string expected = '<' + string.Join(", ", values.Select(x => x.ToString("G", System.Globalization.CultureInfo.InvariantCulture))) + '>'; - - bool succeeded = string.Equals(expected, actual, StringComparison.Ordinal); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128UInt16ToString: Vector128.ToString() returned an unexpected result."); - TestLibrary.TestFramework.LogInformation($"Expected: {expected}"); - TestLibrary.TestFramework.LogInformation($"Actual: {actual}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToString.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToString.UInt32.cs deleted file mode 100644 index 5f8f9f6387d0..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToString.UInt32.cs +++ /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. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private unsafe static void ToStringUInt32() - { - int size = Unsafe.SizeOf>() / sizeof(UInt32); - UInt32[] values = new UInt32[size]; - - for (int i = 0; i < size; i++) - { - values[i] = TestLibrary.Generator.GetUInt32(); - } - - Vector128 vector = Vector128.Create(values[0], values[1], values[2], values[3]); - string actual = vector.ToString(); - - string expected = '<' + string.Join(", ", values.Select(x => x.ToString("G", System.Globalization.CultureInfo.InvariantCulture))) + '>'; - - bool succeeded = string.Equals(expected, actual, StringComparison.Ordinal); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128UInt32ToString: Vector128.ToString() returned an unexpected result."); - TestLibrary.TestFramework.LogInformation($"Expected: {expected}"); - TestLibrary.TestFramework.LogInformation($"Actual: {actual}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToString.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToString.UInt64.cs deleted file mode 100644 index 192535630b5c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/ToString.UInt64.cs +++ /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. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private unsafe static void ToStringUInt64() - { - int size = Unsafe.SizeOf>() / sizeof(UInt64); - UInt64[] values = new UInt64[size]; - - for (int i = 0; i < size; i++) - { - values[i] = TestLibrary.Generator.GetUInt64(); - } - - Vector128 vector = Vector128.Create(values[0], values[1]); - string actual = vector.ToString(); - - string expected = '<' + string.Join(", ", values.Select(x => x.ToString("G", System.Globalization.CultureInfo.InvariantCulture))) + '>'; - - bool succeeded = string.Equals(expected, actual, StringComparison.Ordinal); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128UInt64ToString: Vector128.ToString() returned an unexpected result."); - TestLibrary.TestFramework.LogInformation($"Expected: {expected}"); - TestLibrary.TestFramework.LogInformation($"Actual: {actual}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/Zero.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/Zero.Byte.cs deleted file mode 100644 index d87067c25095..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/Zero.Byte.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ZeroByte() - { - var test = new VectorZero__ZeroByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorZero__ZeroByte - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector128 result = Vector128.Zero; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector128) - .GetProperty(nameof(Vector128.Zero), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector128)(result)); - } - - private void ValidateResult(Vector128 result, [CallerMemberName] string method = "") - { - Byte[] resultElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private void ValidateResult(Byte[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Zero(Byte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/Zero.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/Zero.Double.cs deleted file mode 100644 index 0af1cf45c01e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/Zero.Double.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ZeroDouble() - { - var test = new VectorZero__ZeroDouble(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorZero__ZeroDouble - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector128 result = Vector128.Zero; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector128) - .GetProperty(nameof(Vector128.Zero), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector128)(result)); - } - - private void ValidateResult(Vector128 result, [CallerMemberName] string method = "") - { - Double[] resultElements = new Double[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private void ValidateResult(Double[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Zero(Double): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/Zero.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/Zero.Int16.cs deleted file mode 100644 index 81957f247b3c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/Zero.Int16.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ZeroInt16() - { - var test = new VectorZero__ZeroInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorZero__ZeroInt16 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector128 result = Vector128.Zero; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector128) - .GetProperty(nameof(Vector128.Zero), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector128)(result)); - } - - private void ValidateResult(Vector128 result, [CallerMemberName] string method = "") - { - Int16[] resultElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private void ValidateResult(Int16[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Zero(Int16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/Zero.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/Zero.Int32.cs deleted file mode 100644 index 398c13260cab..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/Zero.Int32.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ZeroInt32() - { - var test = new VectorZero__ZeroInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorZero__ZeroInt32 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector128 result = Vector128.Zero; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector128) - .GetProperty(nameof(Vector128.Zero), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector128)(result)); - } - - private void ValidateResult(Vector128 result, [CallerMemberName] string method = "") - { - Int32[] resultElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private void ValidateResult(Int32[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Zero(Int32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/Zero.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/Zero.Int64.cs deleted file mode 100644 index c4b180f0aa16..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/Zero.Int64.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ZeroInt64() - { - var test = new VectorZero__ZeroInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorZero__ZeroInt64 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector128 result = Vector128.Zero; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector128) - .GetProperty(nameof(Vector128.Zero), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector128)(result)); - } - - private void ValidateResult(Vector128 result, [CallerMemberName] string method = "") - { - Int64[] resultElements = new Int64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private void ValidateResult(Int64[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Zero(Int64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/Zero.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/Zero.SByte.cs deleted file mode 100644 index 258116721377..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/Zero.SByte.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ZeroSByte() - { - var test = new VectorZero__ZeroSByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorZero__ZeroSByte - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector128 result = Vector128.Zero; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector128) - .GetProperty(nameof(Vector128.Zero), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector128)(result)); - } - - private void ValidateResult(Vector128 result, [CallerMemberName] string method = "") - { - SByte[] resultElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private void ValidateResult(SByte[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Zero(SByte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/Zero.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/Zero.Single.cs deleted file mode 100644 index f5eee1b2ac04..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/Zero.Single.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ZeroSingle() - { - var test = new VectorZero__ZeroSingle(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorZero__ZeroSingle - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector128 result = Vector128.Zero; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector128) - .GetProperty(nameof(Vector128.Zero), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector128)(result)); - } - - private void ValidateResult(Vector128 result, [CallerMemberName] string method = "") - { - Single[] resultElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private void ValidateResult(Single[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Zero(Single): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/Zero.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/Zero.UInt16.cs deleted file mode 100644 index f6e926d52598..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/Zero.UInt16.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ZeroUInt16() - { - var test = new VectorZero__ZeroUInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorZero__ZeroUInt16 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector128 result = Vector128.Zero; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector128) - .GetProperty(nameof(Vector128.Zero), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector128)(result)); - } - - private void ValidateResult(Vector128 result, [CallerMemberName] string method = "") - { - UInt16[] resultElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private void ValidateResult(UInt16[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Zero(UInt16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/Zero.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/Zero.UInt32.cs deleted file mode 100644 index 0aef26e19139..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/Zero.UInt32.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ZeroUInt32() - { - var test = new VectorZero__ZeroUInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorZero__ZeroUInt32 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector128 result = Vector128.Zero; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector128) - .GetProperty(nameof(Vector128.Zero), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector128)(result)); - } - - private void ValidateResult(Vector128 result, [CallerMemberName] string method = "") - { - UInt32[] resultElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private void ValidateResult(UInt32[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Zero(UInt32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/Zero.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/Zero.UInt64.cs deleted file mode 100644 index e521928bd647..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector128_1/Zero.UInt64.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ZeroUInt64() - { - var test = new VectorZero__ZeroUInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorZero__ZeroUInt64 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector128 result = Vector128.Zero; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector128) - .GetProperty(nameof(Vector128.Zero), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector128)(result)); - } - - private void ValidateResult(Vector128 result, [CallerMemberName] string method = "") - { - UInt64[] resultElements = new UInt64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private void ValidateResult(UInt64[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector128.Zero(UInt64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/Create.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/Create.Byte.cs deleted file mode 100644 index c9300b33405d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/Create.Byte.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateByte() - { - var test = new VectorCreate__CreateByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateByte - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Byte value = TestLibrary.Generator.GetByte(); - Vector256 result = Vector256.Create(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Byte value = TestLibrary.Generator.GetByte(); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.Create), new Type[] { typeof(Byte) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector256)(result), value); - } - - private void ValidateResult(Vector256 result, Byte expectedValue, [CallerMemberName] string method = "") - { - Byte[] resultElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Byte[] resultElements, Byte expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != expectedValue) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Create(Byte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/Create.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/Create.Double.cs deleted file mode 100644 index b74e52c11a21..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/Create.Double.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateDouble() - { - var test = new VectorCreate__CreateDouble(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateDouble - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Double value = TestLibrary.Generator.GetDouble(); - Vector256 result = Vector256.Create(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Double value = TestLibrary.Generator.GetDouble(); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.Create), new Type[] { typeof(Double) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector256)(result), value); - } - - private void ValidateResult(Vector256 result, Double expectedValue, [CallerMemberName] string method = "") - { - Double[] resultElements = new Double[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Double[] resultElements, Double expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != expectedValue) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Create(Double): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/Create.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/Create.Int16.cs deleted file mode 100644 index dba04752384a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/Create.Int16.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateInt16() - { - var test = new VectorCreate__CreateInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateInt16 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int16 value = TestLibrary.Generator.GetInt16(); - Vector256 result = Vector256.Create(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int16 value = TestLibrary.Generator.GetInt16(); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.Create), new Type[] { typeof(Int16) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector256)(result), value); - } - - private void ValidateResult(Vector256 result, Int16 expectedValue, [CallerMemberName] string method = "") - { - Int16[] resultElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Int16[] resultElements, Int16 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != expectedValue) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Create(Int16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/Create.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/Create.Int32.cs deleted file mode 100644 index 0f9fb25b08b2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/Create.Int32.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateInt32() - { - var test = new VectorCreate__CreateInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateInt32 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int32 value = TestLibrary.Generator.GetInt32(); - Vector256 result = Vector256.Create(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int32 value = TestLibrary.Generator.GetInt32(); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.Create), new Type[] { typeof(Int32) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector256)(result), value); - } - - private void ValidateResult(Vector256 result, Int32 expectedValue, [CallerMemberName] string method = "") - { - Int32[] resultElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Int32[] resultElements, Int32 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != expectedValue) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Create(Int32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/Create.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/Create.Int64.cs deleted file mode 100644 index 13b1882107be..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/Create.Int64.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateInt64() - { - var test = new VectorCreate__CreateInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateInt64 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int64 value = TestLibrary.Generator.GetInt64(); - Vector256 result = Vector256.Create(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int64 value = TestLibrary.Generator.GetInt64(); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.Create), new Type[] { typeof(Int64) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector256)(result), value); - } - - private void ValidateResult(Vector256 result, Int64 expectedValue, [CallerMemberName] string method = "") - { - Int64[] resultElements = new Int64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Int64[] resultElements, Int64 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != expectedValue) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Create(Int64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/Create.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/Create.SByte.cs deleted file mode 100644 index 7ca19826f23d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/Create.SByte.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateSByte() - { - var test = new VectorCreate__CreateSByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateSByte - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - SByte value = TestLibrary.Generator.GetSByte(); - Vector256 result = Vector256.Create(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - SByte value = TestLibrary.Generator.GetSByte(); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.Create), new Type[] { typeof(SByte) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector256)(result), value); - } - - private void ValidateResult(Vector256 result, SByte expectedValue, [CallerMemberName] string method = "") - { - SByte[] resultElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(SByte[] resultElements, SByte expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != expectedValue) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Create(SByte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/Create.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/Create.Single.cs deleted file mode 100644 index 74610b3e9e0f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/Create.Single.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateSingle() - { - var test = new VectorCreate__CreateSingle(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateSingle - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Single value = TestLibrary.Generator.GetSingle(); - Vector256 result = Vector256.Create(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Single value = TestLibrary.Generator.GetSingle(); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.Create), new Type[] { typeof(Single) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector256)(result), value); - } - - private void ValidateResult(Vector256 result, Single expectedValue, [CallerMemberName] string method = "") - { - Single[] resultElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Single[] resultElements, Single expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != expectedValue) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Create(Single): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/Create.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/Create.UInt16.cs deleted file mode 100644 index 4bb6356b5452..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/Create.UInt16.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateUInt16() - { - var test = new VectorCreate__CreateUInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateUInt16 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt16 value = TestLibrary.Generator.GetUInt16(); - Vector256 result = Vector256.Create(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt16 value = TestLibrary.Generator.GetUInt16(); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.Create), new Type[] { typeof(UInt16) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector256)(result), value); - } - - private void ValidateResult(Vector256 result, UInt16 expectedValue, [CallerMemberName] string method = "") - { - UInt16[] resultElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(UInt16[] resultElements, UInt16 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != expectedValue) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Create(UInt16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/Create.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/Create.UInt32.cs deleted file mode 100644 index 3dc4063f0e8c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/Create.UInt32.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateUInt32() - { - var test = new VectorCreate__CreateUInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateUInt32 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt32 value = TestLibrary.Generator.GetUInt32(); - Vector256 result = Vector256.Create(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt32 value = TestLibrary.Generator.GetUInt32(); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.Create), new Type[] { typeof(UInt32) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector256)(result), value); - } - - private void ValidateResult(Vector256 result, UInt32 expectedValue, [CallerMemberName] string method = "") - { - UInt32[] resultElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(UInt32[] resultElements, UInt32 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != expectedValue) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Create(UInt32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/Create.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/Create.UInt64.cs deleted file mode 100644 index 4fdb39a806f9..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/Create.UInt64.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateUInt64() - { - var test = new VectorCreate__CreateUInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateUInt64 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt64 value = TestLibrary.Generator.GetUInt64(); - Vector256 result = Vector256.Create(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt64 value = TestLibrary.Generator.GetUInt64(); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.Create), new Type[] { typeof(UInt64) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector256)(result), value); - } - - private void ValidateResult(Vector256 result, UInt64 expectedValue, [CallerMemberName] string method = "") - { - UInt64[] resultElements = new UInt64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(UInt64[] resultElements, UInt64 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != expectedValue) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Create(UInt64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateElement.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateElement.Byte.cs deleted file mode 100644 index ff68f5ccfc49..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateElement.Byte.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateElementByte() - { - var test = new VectorCreate__CreateElementByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateElementByte - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Byte[] values = new Byte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetByte(); - } - - Vector256 result = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]); - - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Type[] operandTypes = new Type[ElementCount]; - Byte[] values = new Byte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - operandTypes[i] = typeof(Byte); - values[i] = TestLibrary.Generator.GetByte(); - } - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.Create), operandTypes) - .Invoke(null, new object[] { values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31] }); - - ValidateResult((Vector256)(result), values); - } - - private void ValidateResult(Vector256 result, Byte[] expectedValues, [CallerMemberName] string method = "") - { - Byte[] resultElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValues, method); - } - - private void ValidateResult(Byte[] resultElements, Byte[] expectedValues, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != expectedValues[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Create(Byte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", expectedValues)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateElement.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateElement.Double.cs deleted file mode 100644 index 937e9ac712e0..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateElement.Double.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateElementDouble() - { - var test = new VectorCreate__CreateElementDouble(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateElementDouble - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Double[] values = new Double[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetDouble(); - } - - Vector256 result = Vector256.Create(values[0], values[1], values[2], values[3]); - - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Type[] operandTypes = new Type[ElementCount]; - Double[] values = new Double[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - operandTypes[i] = typeof(Double); - values[i] = TestLibrary.Generator.GetDouble(); - } - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.Create), operandTypes) - .Invoke(null, new object[] { values[0], values[1], values[2], values[3] }); - - ValidateResult((Vector256)(result), values); - } - - private void ValidateResult(Vector256 result, Double[] expectedValues, [CallerMemberName] string method = "") - { - Double[] resultElements = new Double[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValues, method); - } - - private void ValidateResult(Double[] resultElements, Double[] expectedValues, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != expectedValues[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Create(Double): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", expectedValues)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateElement.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateElement.Int16.cs deleted file mode 100644 index 9ec72822a1f4..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateElement.Int16.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateElementInt16() - { - var test = new VectorCreate__CreateElementInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateElementInt16 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int16[] values = new Int16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt16(); - } - - Vector256 result = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Type[] operandTypes = new Type[ElementCount]; - Int16[] values = new Int16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - operandTypes[i] = typeof(Int16); - values[i] = TestLibrary.Generator.GetInt16(); - } - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.Create), operandTypes) - .Invoke(null, new object[] { values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15] }); - - ValidateResult((Vector256)(result), values); - } - - private void ValidateResult(Vector256 result, Int16[] expectedValues, [CallerMemberName] string method = "") - { - Int16[] resultElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValues, method); - } - - private void ValidateResult(Int16[] resultElements, Int16[] expectedValues, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != expectedValues[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Create(Int16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", expectedValues)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateElement.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateElement.Int32.cs deleted file mode 100644 index 83defc8a9972..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateElement.Int32.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateElementInt32() - { - var test = new VectorCreate__CreateElementInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateElementInt32 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int32[] values = new Int32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt32(); - } - - Vector256 result = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Type[] operandTypes = new Type[ElementCount]; - Int32[] values = new Int32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - operandTypes[i] = typeof(Int32); - values[i] = TestLibrary.Generator.GetInt32(); - } - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.Create), operandTypes) - .Invoke(null, new object[] { values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7] }); - - ValidateResult((Vector256)(result), values); - } - - private void ValidateResult(Vector256 result, Int32[] expectedValues, [CallerMemberName] string method = "") - { - Int32[] resultElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValues, method); - } - - private void ValidateResult(Int32[] resultElements, Int32[] expectedValues, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != expectedValues[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Create(Int32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", expectedValues)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateElement.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateElement.Int64.cs deleted file mode 100644 index 4c65b67c8e8c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateElement.Int64.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateElementInt64() - { - var test = new VectorCreate__CreateElementInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateElementInt64 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int64[] values = new Int64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt64(); - } - - Vector256 result = Vector256.Create(values[0], values[1], values[2], values[3]); - - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Type[] operandTypes = new Type[ElementCount]; - Int64[] values = new Int64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - operandTypes[i] = typeof(Int64); - values[i] = TestLibrary.Generator.GetInt64(); - } - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.Create), operandTypes) - .Invoke(null, new object[] { values[0], values[1], values[2], values[3] }); - - ValidateResult((Vector256)(result), values); - } - - private void ValidateResult(Vector256 result, Int64[] expectedValues, [CallerMemberName] string method = "") - { - Int64[] resultElements = new Int64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValues, method); - } - - private void ValidateResult(Int64[] resultElements, Int64[] expectedValues, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != expectedValues[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Create(Int64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", expectedValues)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateElement.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateElement.SByte.cs deleted file mode 100644 index b738b3b6f4f3..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateElement.SByte.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateElementSByte() - { - var test = new VectorCreate__CreateElementSByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateElementSByte - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - SByte[] values = new SByte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSByte(); - } - - Vector256 result = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]); - - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Type[] operandTypes = new Type[ElementCount]; - SByte[] values = new SByte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - operandTypes[i] = typeof(SByte); - values[i] = TestLibrary.Generator.GetSByte(); - } - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.Create), operandTypes) - .Invoke(null, new object[] { values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31] }); - - ValidateResult((Vector256)(result), values); - } - - private void ValidateResult(Vector256 result, SByte[] expectedValues, [CallerMemberName] string method = "") - { - SByte[] resultElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValues, method); - } - - private void ValidateResult(SByte[] resultElements, SByte[] expectedValues, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != expectedValues[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Create(SByte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", expectedValues)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateElement.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateElement.Single.cs deleted file mode 100644 index edcc76e417d2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateElement.Single.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateElementSingle() - { - var test = new VectorCreate__CreateElementSingle(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateElementSingle - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Single[] values = new Single[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSingle(); - } - - Vector256 result = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Type[] operandTypes = new Type[ElementCount]; - Single[] values = new Single[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - operandTypes[i] = typeof(Single); - values[i] = TestLibrary.Generator.GetSingle(); - } - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.Create), operandTypes) - .Invoke(null, new object[] { values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7] }); - - ValidateResult((Vector256)(result), values); - } - - private void ValidateResult(Vector256 result, Single[] expectedValues, [CallerMemberName] string method = "") - { - Single[] resultElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValues, method); - } - - private void ValidateResult(Single[] resultElements, Single[] expectedValues, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != expectedValues[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Create(Single): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", expectedValues)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateElement.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateElement.UInt16.cs deleted file mode 100644 index 10c7ca2154cf..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateElement.UInt16.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateElementUInt16() - { - var test = new VectorCreate__CreateElementUInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateElementUInt16 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt16[] values = new UInt16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt16(); - } - - Vector256 result = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Type[] operandTypes = new Type[ElementCount]; - UInt16[] values = new UInt16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - operandTypes[i] = typeof(UInt16); - values[i] = TestLibrary.Generator.GetUInt16(); - } - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.Create), operandTypes) - .Invoke(null, new object[] { values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15] }); - - ValidateResult((Vector256)(result), values); - } - - private void ValidateResult(Vector256 result, UInt16[] expectedValues, [CallerMemberName] string method = "") - { - UInt16[] resultElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValues, method); - } - - private void ValidateResult(UInt16[] resultElements, UInt16[] expectedValues, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != expectedValues[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Create(UInt16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", expectedValues)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateElement.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateElement.UInt32.cs deleted file mode 100644 index 18e761663c96..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateElement.UInt32.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateElementUInt32() - { - var test = new VectorCreate__CreateElementUInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateElementUInt32 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt32[] values = new UInt32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt32(); - } - - Vector256 result = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Type[] operandTypes = new Type[ElementCount]; - UInt32[] values = new UInt32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - operandTypes[i] = typeof(UInt32); - values[i] = TestLibrary.Generator.GetUInt32(); - } - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.Create), operandTypes) - .Invoke(null, new object[] { values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7] }); - - ValidateResult((Vector256)(result), values); - } - - private void ValidateResult(Vector256 result, UInt32[] expectedValues, [CallerMemberName] string method = "") - { - UInt32[] resultElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValues, method); - } - - private void ValidateResult(UInt32[] resultElements, UInt32[] expectedValues, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != expectedValues[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Create(UInt32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", expectedValues)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateElement.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateElement.UInt64.cs deleted file mode 100644 index a15447b4e3fc..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateElement.UInt64.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateElementUInt64() - { - var test = new VectorCreate__CreateElementUInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateElementUInt64 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt64[] values = new UInt64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt64(); - } - - Vector256 result = Vector256.Create(values[0], values[1], values[2], values[3]); - - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Type[] operandTypes = new Type[ElementCount]; - UInt64[] values = new UInt64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - operandTypes[i] = typeof(UInt64); - values[i] = TestLibrary.Generator.GetUInt64(); - } - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.Create), operandTypes) - .Invoke(null, new object[] { values[0], values[1], values[2], values[3] }); - - ValidateResult((Vector256)(result), values); - } - - private void ValidateResult(Vector256 result, UInt64[] expectedValues, [CallerMemberName] string method = "") - { - UInt64[] resultElements = new UInt64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValues, method); - } - - private void ValidateResult(UInt64[] resultElements, UInt64[] expectedValues, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != expectedValues[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Create(UInt64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", expectedValues)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalar.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalar.Byte.cs deleted file mode 100644 index c2edd4b747cd..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalar.Byte.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarByte() - { - var test = new VectorCreate__CreateScalarByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarByte - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Byte value = TestLibrary.Generator.GetByte(); - Vector256 result = Vector256.CreateScalar(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Byte value = TestLibrary.Generator.GetByte(); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.CreateScalar), new Type[] { typeof(Byte) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector256)(result), value); - } - - private void ValidateResult(Vector256 result, Byte expectedValue, [CallerMemberName] string method = "") - { - Byte[] resultElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Byte[] resultElements, Byte expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.CreateScalar(Byte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalar.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalar.Double.cs deleted file mode 100644 index d1d4ebb71ab3..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalar.Double.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarDouble() - { - var test = new VectorCreate__CreateScalarDouble(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarDouble - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Double value = TestLibrary.Generator.GetDouble(); - Vector256 result = Vector256.CreateScalar(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Double value = TestLibrary.Generator.GetDouble(); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.CreateScalar), new Type[] { typeof(Double) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector256)(result), value); - } - - private void ValidateResult(Vector256 result, Double expectedValue, [CallerMemberName] string method = "") - { - Double[] resultElements = new Double[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Double[] resultElements, Double expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.CreateScalar(Double): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalar.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalar.Int16.cs deleted file mode 100644 index 8823769302b6..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalar.Int16.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarInt16() - { - var test = new VectorCreate__CreateScalarInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarInt16 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int16 value = TestLibrary.Generator.GetInt16(); - Vector256 result = Vector256.CreateScalar(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int16 value = TestLibrary.Generator.GetInt16(); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.CreateScalar), new Type[] { typeof(Int16) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector256)(result), value); - } - - private void ValidateResult(Vector256 result, Int16 expectedValue, [CallerMemberName] string method = "") - { - Int16[] resultElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Int16[] resultElements, Int16 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.CreateScalar(Int16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalar.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalar.Int32.cs deleted file mode 100644 index 6459a66d4795..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalar.Int32.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarInt32() - { - var test = new VectorCreate__CreateScalarInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarInt32 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int32 value = TestLibrary.Generator.GetInt32(); - Vector256 result = Vector256.CreateScalar(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int32 value = TestLibrary.Generator.GetInt32(); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.CreateScalar), new Type[] { typeof(Int32) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector256)(result), value); - } - - private void ValidateResult(Vector256 result, Int32 expectedValue, [CallerMemberName] string method = "") - { - Int32[] resultElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Int32[] resultElements, Int32 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.CreateScalar(Int32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalar.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalar.Int64.cs deleted file mode 100644 index 997d43666347..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalar.Int64.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarInt64() - { - var test = new VectorCreate__CreateScalarInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarInt64 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int64 value = TestLibrary.Generator.GetInt64(); - Vector256 result = Vector256.CreateScalar(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int64 value = TestLibrary.Generator.GetInt64(); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.CreateScalar), new Type[] { typeof(Int64) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector256)(result), value); - } - - private void ValidateResult(Vector256 result, Int64 expectedValue, [CallerMemberName] string method = "") - { - Int64[] resultElements = new Int64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Int64[] resultElements, Int64 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.CreateScalar(Int64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalar.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalar.SByte.cs deleted file mode 100644 index 2270b471da76..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalar.SByte.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarSByte() - { - var test = new VectorCreate__CreateScalarSByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarSByte - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - SByte value = TestLibrary.Generator.GetSByte(); - Vector256 result = Vector256.CreateScalar(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - SByte value = TestLibrary.Generator.GetSByte(); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.CreateScalar), new Type[] { typeof(SByte) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector256)(result), value); - } - - private void ValidateResult(Vector256 result, SByte expectedValue, [CallerMemberName] string method = "") - { - SByte[] resultElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(SByte[] resultElements, SByte expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.CreateScalar(SByte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalar.Single.cs deleted file mode 100644 index 5b652253ef74..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalar.Single.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarSingle() - { - var test = new VectorCreate__CreateScalarSingle(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarSingle - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Single value = TestLibrary.Generator.GetSingle(); - Vector256 result = Vector256.CreateScalar(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Single value = TestLibrary.Generator.GetSingle(); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.CreateScalar), new Type[] { typeof(Single) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector256)(result), value); - } - - private void ValidateResult(Vector256 result, Single expectedValue, [CallerMemberName] string method = "") - { - Single[] resultElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Single[] resultElements, Single expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.CreateScalar(Single): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalar.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalar.UInt16.cs deleted file mode 100644 index 970e0a826fad..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalar.UInt16.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUInt16() - { - var test = new VectorCreate__CreateScalarUInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUInt16 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt16 value = TestLibrary.Generator.GetUInt16(); - Vector256 result = Vector256.CreateScalar(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt16 value = TestLibrary.Generator.GetUInt16(); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.CreateScalar), new Type[] { typeof(UInt16) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector256)(result), value); - } - - private void ValidateResult(Vector256 result, UInt16 expectedValue, [CallerMemberName] string method = "") - { - UInt16[] resultElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(UInt16[] resultElements, UInt16 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.CreateScalar(UInt16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalar.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalar.UInt32.cs deleted file mode 100644 index 65513023fedc..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalar.UInt32.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUInt32() - { - var test = new VectorCreate__CreateScalarUInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUInt32 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt32 value = TestLibrary.Generator.GetUInt32(); - Vector256 result = Vector256.CreateScalar(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt32 value = TestLibrary.Generator.GetUInt32(); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.CreateScalar), new Type[] { typeof(UInt32) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector256)(result), value); - } - - private void ValidateResult(Vector256 result, UInt32 expectedValue, [CallerMemberName] string method = "") - { - UInt32[] resultElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(UInt32[] resultElements, UInt32 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.CreateScalar(UInt32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalar.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalar.UInt64.cs deleted file mode 100644 index 4a9a55fc9821..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalar.UInt64.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUInt64() - { - var test = new VectorCreate__CreateScalarUInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUInt64 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt64 value = TestLibrary.Generator.GetUInt64(); - Vector256 result = Vector256.CreateScalar(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt64 value = TestLibrary.Generator.GetUInt64(); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.CreateScalar), new Type[] { typeof(UInt64) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector256)(result), value); - } - - private void ValidateResult(Vector256 result, UInt64 expectedValue, [CallerMemberName] string method = "") - { - UInt64[] resultElements = new UInt64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(UInt64[] resultElements, UInt64 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.CreateScalar(UInt64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalarUnsafe.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalarUnsafe.Byte.cs deleted file mode 100644 index ae4e45210a4c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalarUnsafe.Byte.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUnsafeByte() - { - var test = new VectorCreate__CreateScalarUnsafeByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUnsafeByte - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Byte value = TestLibrary.Generator.GetByte(); - Vector256 result = Vector256.CreateScalarUnsafe(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Byte value = TestLibrary.Generator.GetByte(); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.CreateScalarUnsafe), new Type[] { typeof(Byte) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector256)(result), value); - } - - private void ValidateResult(Vector256 result, Byte expectedValue, [CallerMemberName] string method = "") - { - Byte[] resultElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Byte[] resultElements, Byte expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (false /* value is uninitialized */) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.CreateScalarUnsafe(Byte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalarUnsafe.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalarUnsafe.Double.cs deleted file mode 100644 index 9407ef19c50a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalarUnsafe.Double.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUnsafeDouble() - { - var test = new VectorCreate__CreateScalarUnsafeDouble(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUnsafeDouble - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Double value = TestLibrary.Generator.GetDouble(); - Vector256 result = Vector256.CreateScalarUnsafe(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Double value = TestLibrary.Generator.GetDouble(); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.CreateScalarUnsafe), new Type[] { typeof(Double) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector256)(result), value); - } - - private void ValidateResult(Vector256 result, Double expectedValue, [CallerMemberName] string method = "") - { - Double[] resultElements = new Double[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Double[] resultElements, Double expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (false /* value is uninitialized */) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.CreateScalarUnsafe(Double): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalarUnsafe.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalarUnsafe.Int16.cs deleted file mode 100644 index d21277257aab..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalarUnsafe.Int16.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUnsafeInt16() - { - var test = new VectorCreate__CreateScalarUnsafeInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUnsafeInt16 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int16 value = TestLibrary.Generator.GetInt16(); - Vector256 result = Vector256.CreateScalarUnsafe(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int16 value = TestLibrary.Generator.GetInt16(); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.CreateScalarUnsafe), new Type[] { typeof(Int16) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector256)(result), value); - } - - private void ValidateResult(Vector256 result, Int16 expectedValue, [CallerMemberName] string method = "") - { - Int16[] resultElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Int16[] resultElements, Int16 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (false /* value is uninitialized */) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.CreateScalarUnsafe(Int16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalarUnsafe.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalarUnsafe.Int32.cs deleted file mode 100644 index b49df4ce776e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalarUnsafe.Int32.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUnsafeInt32() - { - var test = new VectorCreate__CreateScalarUnsafeInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUnsafeInt32 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int32 value = TestLibrary.Generator.GetInt32(); - Vector256 result = Vector256.CreateScalarUnsafe(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int32 value = TestLibrary.Generator.GetInt32(); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.CreateScalarUnsafe), new Type[] { typeof(Int32) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector256)(result), value); - } - - private void ValidateResult(Vector256 result, Int32 expectedValue, [CallerMemberName] string method = "") - { - Int32[] resultElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Int32[] resultElements, Int32 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (false /* value is uninitialized */) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.CreateScalarUnsafe(Int32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalarUnsafe.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalarUnsafe.Int64.cs deleted file mode 100644 index ebd592f4bf2f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalarUnsafe.Int64.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUnsafeInt64() - { - var test = new VectorCreate__CreateScalarUnsafeInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUnsafeInt64 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int64 value = TestLibrary.Generator.GetInt64(); - Vector256 result = Vector256.CreateScalarUnsafe(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int64 value = TestLibrary.Generator.GetInt64(); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.CreateScalarUnsafe), new Type[] { typeof(Int64) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector256)(result), value); - } - - private void ValidateResult(Vector256 result, Int64 expectedValue, [CallerMemberName] string method = "") - { - Int64[] resultElements = new Int64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Int64[] resultElements, Int64 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (false /* value is uninitialized */) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.CreateScalarUnsafe(Int64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalarUnsafe.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalarUnsafe.SByte.cs deleted file mode 100644 index 6bc98c13dd3f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalarUnsafe.SByte.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUnsafeSByte() - { - var test = new VectorCreate__CreateScalarUnsafeSByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUnsafeSByte - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - SByte value = TestLibrary.Generator.GetSByte(); - Vector256 result = Vector256.CreateScalarUnsafe(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - SByte value = TestLibrary.Generator.GetSByte(); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.CreateScalarUnsafe), new Type[] { typeof(SByte) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector256)(result), value); - } - - private void ValidateResult(Vector256 result, SByte expectedValue, [CallerMemberName] string method = "") - { - SByte[] resultElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(SByte[] resultElements, SByte expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (false /* value is uninitialized */) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.CreateScalarUnsafe(SByte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalarUnsafe.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalarUnsafe.Single.cs deleted file mode 100644 index 23acf5701512..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalarUnsafe.Single.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUnsafeSingle() - { - var test = new VectorCreate__CreateScalarUnsafeSingle(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUnsafeSingle - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Single value = TestLibrary.Generator.GetSingle(); - Vector256 result = Vector256.CreateScalarUnsafe(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Single value = TestLibrary.Generator.GetSingle(); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.CreateScalarUnsafe), new Type[] { typeof(Single) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector256)(result), value); - } - - private void ValidateResult(Vector256 result, Single expectedValue, [CallerMemberName] string method = "") - { - Single[] resultElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Single[] resultElements, Single expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (false /* value is uninitialized */) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.CreateScalarUnsafe(Single): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalarUnsafe.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalarUnsafe.UInt16.cs deleted file mode 100644 index 79da9166bae5..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalarUnsafe.UInt16.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUnsafeUInt16() - { - var test = new VectorCreate__CreateScalarUnsafeUInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUnsafeUInt16 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt16 value = TestLibrary.Generator.GetUInt16(); - Vector256 result = Vector256.CreateScalarUnsafe(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt16 value = TestLibrary.Generator.GetUInt16(); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.CreateScalarUnsafe), new Type[] { typeof(UInt16) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector256)(result), value); - } - - private void ValidateResult(Vector256 result, UInt16 expectedValue, [CallerMemberName] string method = "") - { - UInt16[] resultElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(UInt16[] resultElements, UInt16 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (false /* value is uninitialized */) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.CreateScalarUnsafe(UInt16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalarUnsafe.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalarUnsafe.UInt32.cs deleted file mode 100644 index 5fef3b92301e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalarUnsafe.UInt32.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUnsafeUInt32() - { - var test = new VectorCreate__CreateScalarUnsafeUInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUnsafeUInt32 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt32 value = TestLibrary.Generator.GetUInt32(); - Vector256 result = Vector256.CreateScalarUnsafe(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt32 value = TestLibrary.Generator.GetUInt32(); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.CreateScalarUnsafe), new Type[] { typeof(UInt32) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector256)(result), value); - } - - private void ValidateResult(Vector256 result, UInt32 expectedValue, [CallerMemberName] string method = "") - { - UInt32[] resultElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(UInt32[] resultElements, UInt32 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (false /* value is uninitialized */) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.CreateScalarUnsafe(UInt32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalarUnsafe.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalarUnsafe.UInt64.cs deleted file mode 100644 index 67a62ab6c881..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateScalarUnsafe.UInt64.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUnsafeUInt64() - { - var test = new VectorCreate__CreateScalarUnsafeUInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUnsafeUInt64 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt64 value = TestLibrary.Generator.GetUInt64(); - Vector256 result = Vector256.CreateScalarUnsafe(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt64 value = TestLibrary.Generator.GetUInt64(); - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.CreateScalarUnsafe), new Type[] { typeof(UInt64) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector256)(result), value); - } - - private void ValidateResult(Vector256 result, UInt64 expectedValue, [CallerMemberName] string method = "") - { - UInt64[] resultElements = new UInt64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(UInt64[] resultElements, UInt64 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (false /* value is uninitialized */) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.CreateScalarUnsafe(UInt64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateVector.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateVector.Byte.cs deleted file mode 100644 index 04066c5b2c7b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateVector.Byte.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateVectorByte() - { - var test = new VectorCreate__CreateVectorByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateVectorByte - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Byte lowerValue = TestLibrary.Generator.GetByte(); - Vector128 lower = Vector128.Create(lowerValue); - - Byte upperValue = TestLibrary.Generator.GetByte(); - Vector128 upper = Vector128.Create(upperValue); - - Vector256 result = Vector256.Create(lower, upper); - - ValidateResult(result, lowerValue, upperValue); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Byte lowerValue = TestLibrary.Generator.GetByte(); - Vector128 lower = Vector128.Create(lowerValue); - - Byte upperValue = TestLibrary.Generator.GetByte(); - Vector128 upper = Vector128.Create(upperValue); - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.Create), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { lower, upper }); - - ValidateResult((Vector256)(result), lowerValue, upperValue); - } - - private void ValidateResult(Vector256 result, Byte expectedLowerValue, Byte expectedUpperValue, [CallerMemberName] string method = "") - { - Byte[] resultElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedLowerValue, expectedUpperValue, method); - } - - private void ValidateResult(Byte[] resultElements, Byte expectedLowerValue, Byte expectedUpperValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount / 2; i++) - { - if (resultElements[i] != expectedLowerValue) - { - succeeded = false; - break; - } - } - - for (var i = ElementCount / 2; i < ElementCount; i++) - { - if (resultElements[i] != expectedUpperValue) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Create(Byte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" lower: {expectedLowerValue}"); - TestLibrary.TestFramework.LogInformation($" upper: {expectedUpperValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateVector.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateVector.Double.cs deleted file mode 100644 index 4f75b5a6c356..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateVector.Double.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateVectorDouble() - { - var test = new VectorCreate__CreateVectorDouble(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateVectorDouble - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Double lowerValue = TestLibrary.Generator.GetDouble(); - Vector128 lower = Vector128.Create(lowerValue); - - Double upperValue = TestLibrary.Generator.GetDouble(); - Vector128 upper = Vector128.Create(upperValue); - - Vector256 result = Vector256.Create(lower, upper); - - ValidateResult(result, lowerValue, upperValue); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Double lowerValue = TestLibrary.Generator.GetDouble(); - Vector128 lower = Vector128.Create(lowerValue); - - Double upperValue = TestLibrary.Generator.GetDouble(); - Vector128 upper = Vector128.Create(upperValue); - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.Create), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { lower, upper }); - - ValidateResult((Vector256)(result), lowerValue, upperValue); - } - - private void ValidateResult(Vector256 result, Double expectedLowerValue, Double expectedUpperValue, [CallerMemberName] string method = "") - { - Double[] resultElements = new Double[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedLowerValue, expectedUpperValue, method); - } - - private void ValidateResult(Double[] resultElements, Double expectedLowerValue, Double expectedUpperValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount / 2; i++) - { - if (resultElements[i] != expectedLowerValue) - { - succeeded = false; - break; - } - } - - for (var i = ElementCount / 2; i < ElementCount; i++) - { - if (resultElements[i] != expectedUpperValue) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Create(Double): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" lower: {expectedLowerValue}"); - TestLibrary.TestFramework.LogInformation($" upper: {expectedUpperValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateVector.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateVector.Int16.cs deleted file mode 100644 index 08f30d2aee34..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateVector.Int16.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateVectorInt16() - { - var test = new VectorCreate__CreateVectorInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateVectorInt16 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int16 lowerValue = TestLibrary.Generator.GetInt16(); - Vector128 lower = Vector128.Create(lowerValue); - - Int16 upperValue = TestLibrary.Generator.GetInt16(); - Vector128 upper = Vector128.Create(upperValue); - - Vector256 result = Vector256.Create(lower, upper); - - ValidateResult(result, lowerValue, upperValue); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int16 lowerValue = TestLibrary.Generator.GetInt16(); - Vector128 lower = Vector128.Create(lowerValue); - - Int16 upperValue = TestLibrary.Generator.GetInt16(); - Vector128 upper = Vector128.Create(upperValue); - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.Create), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { lower, upper }); - - ValidateResult((Vector256)(result), lowerValue, upperValue); - } - - private void ValidateResult(Vector256 result, Int16 expectedLowerValue, Int16 expectedUpperValue, [CallerMemberName] string method = "") - { - Int16[] resultElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedLowerValue, expectedUpperValue, method); - } - - private void ValidateResult(Int16[] resultElements, Int16 expectedLowerValue, Int16 expectedUpperValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount / 2; i++) - { - if (resultElements[i] != expectedLowerValue) - { - succeeded = false; - break; - } - } - - for (var i = ElementCount / 2; i < ElementCount; i++) - { - if (resultElements[i] != expectedUpperValue) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Create(Int16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" lower: {expectedLowerValue}"); - TestLibrary.TestFramework.LogInformation($" upper: {expectedUpperValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateVector.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateVector.Int32.cs deleted file mode 100644 index e0128f82ed5e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateVector.Int32.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateVectorInt32() - { - var test = new VectorCreate__CreateVectorInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateVectorInt32 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int32 lowerValue = TestLibrary.Generator.GetInt32(); - Vector128 lower = Vector128.Create(lowerValue); - - Int32 upperValue = TestLibrary.Generator.GetInt32(); - Vector128 upper = Vector128.Create(upperValue); - - Vector256 result = Vector256.Create(lower, upper); - - ValidateResult(result, lowerValue, upperValue); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int32 lowerValue = TestLibrary.Generator.GetInt32(); - Vector128 lower = Vector128.Create(lowerValue); - - Int32 upperValue = TestLibrary.Generator.GetInt32(); - Vector128 upper = Vector128.Create(upperValue); - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.Create), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { lower, upper }); - - ValidateResult((Vector256)(result), lowerValue, upperValue); - } - - private void ValidateResult(Vector256 result, Int32 expectedLowerValue, Int32 expectedUpperValue, [CallerMemberName] string method = "") - { - Int32[] resultElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedLowerValue, expectedUpperValue, method); - } - - private void ValidateResult(Int32[] resultElements, Int32 expectedLowerValue, Int32 expectedUpperValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount / 2; i++) - { - if (resultElements[i] != expectedLowerValue) - { - succeeded = false; - break; - } - } - - for (var i = ElementCount / 2; i < ElementCount; i++) - { - if (resultElements[i] != expectedUpperValue) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Create(Int32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" lower: {expectedLowerValue}"); - TestLibrary.TestFramework.LogInformation($" upper: {expectedUpperValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateVector.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateVector.Int64.cs deleted file mode 100644 index e312218370a3..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateVector.Int64.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateVectorInt64() - { - var test = new VectorCreate__CreateVectorInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateVectorInt64 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int64 lowerValue = TestLibrary.Generator.GetInt64(); - Vector128 lower = Vector128.Create(lowerValue); - - Int64 upperValue = TestLibrary.Generator.GetInt64(); - Vector128 upper = Vector128.Create(upperValue); - - Vector256 result = Vector256.Create(lower, upper); - - ValidateResult(result, lowerValue, upperValue); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int64 lowerValue = TestLibrary.Generator.GetInt64(); - Vector128 lower = Vector128.Create(lowerValue); - - Int64 upperValue = TestLibrary.Generator.GetInt64(); - Vector128 upper = Vector128.Create(upperValue); - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.Create), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { lower, upper }); - - ValidateResult((Vector256)(result), lowerValue, upperValue); - } - - private void ValidateResult(Vector256 result, Int64 expectedLowerValue, Int64 expectedUpperValue, [CallerMemberName] string method = "") - { - Int64[] resultElements = new Int64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedLowerValue, expectedUpperValue, method); - } - - private void ValidateResult(Int64[] resultElements, Int64 expectedLowerValue, Int64 expectedUpperValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount / 2; i++) - { - if (resultElements[i] != expectedLowerValue) - { - succeeded = false; - break; - } - } - - for (var i = ElementCount / 2; i < ElementCount; i++) - { - if (resultElements[i] != expectedUpperValue) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Create(Int64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" lower: {expectedLowerValue}"); - TestLibrary.TestFramework.LogInformation($" upper: {expectedUpperValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateVector.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateVector.SByte.cs deleted file mode 100644 index 13c1b974d592..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateVector.SByte.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateVectorSByte() - { - var test = new VectorCreate__CreateVectorSByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateVectorSByte - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - SByte lowerValue = TestLibrary.Generator.GetSByte(); - Vector128 lower = Vector128.Create(lowerValue); - - SByte upperValue = TestLibrary.Generator.GetSByte(); - Vector128 upper = Vector128.Create(upperValue); - - Vector256 result = Vector256.Create(lower, upper); - - ValidateResult(result, lowerValue, upperValue); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - SByte lowerValue = TestLibrary.Generator.GetSByte(); - Vector128 lower = Vector128.Create(lowerValue); - - SByte upperValue = TestLibrary.Generator.GetSByte(); - Vector128 upper = Vector128.Create(upperValue); - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.Create), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { lower, upper }); - - ValidateResult((Vector256)(result), lowerValue, upperValue); - } - - private void ValidateResult(Vector256 result, SByte expectedLowerValue, SByte expectedUpperValue, [CallerMemberName] string method = "") - { - SByte[] resultElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedLowerValue, expectedUpperValue, method); - } - - private void ValidateResult(SByte[] resultElements, SByte expectedLowerValue, SByte expectedUpperValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount / 2; i++) - { - if (resultElements[i] != expectedLowerValue) - { - succeeded = false; - break; - } - } - - for (var i = ElementCount / 2; i < ElementCount; i++) - { - if (resultElements[i] != expectedUpperValue) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Create(SByte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" lower: {expectedLowerValue}"); - TestLibrary.TestFramework.LogInformation($" upper: {expectedUpperValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateVector.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateVector.Single.cs deleted file mode 100644 index fd350e157e4f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateVector.Single.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateVectorSingle() - { - var test = new VectorCreate__CreateVectorSingle(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateVectorSingle - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Single lowerValue = TestLibrary.Generator.GetSingle(); - Vector128 lower = Vector128.Create(lowerValue); - - Single upperValue = TestLibrary.Generator.GetSingle(); - Vector128 upper = Vector128.Create(upperValue); - - Vector256 result = Vector256.Create(lower, upper); - - ValidateResult(result, lowerValue, upperValue); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Single lowerValue = TestLibrary.Generator.GetSingle(); - Vector128 lower = Vector128.Create(lowerValue); - - Single upperValue = TestLibrary.Generator.GetSingle(); - Vector128 upper = Vector128.Create(upperValue); - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.Create), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { lower, upper }); - - ValidateResult((Vector256)(result), lowerValue, upperValue); - } - - private void ValidateResult(Vector256 result, Single expectedLowerValue, Single expectedUpperValue, [CallerMemberName] string method = "") - { - Single[] resultElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedLowerValue, expectedUpperValue, method); - } - - private void ValidateResult(Single[] resultElements, Single expectedLowerValue, Single expectedUpperValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount / 2; i++) - { - if (resultElements[i] != expectedLowerValue) - { - succeeded = false; - break; - } - } - - for (var i = ElementCount / 2; i < ElementCount; i++) - { - if (resultElements[i] != expectedUpperValue) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Create(Single): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" lower: {expectedLowerValue}"); - TestLibrary.TestFramework.LogInformation($" upper: {expectedUpperValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateVector.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateVector.UInt16.cs deleted file mode 100644 index 823fb235fee3..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateVector.UInt16.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateVectorUInt16() - { - var test = new VectorCreate__CreateVectorUInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateVectorUInt16 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt16 lowerValue = TestLibrary.Generator.GetUInt16(); - Vector128 lower = Vector128.Create(lowerValue); - - UInt16 upperValue = TestLibrary.Generator.GetUInt16(); - Vector128 upper = Vector128.Create(upperValue); - - Vector256 result = Vector256.Create(lower, upper); - - ValidateResult(result, lowerValue, upperValue); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt16 lowerValue = TestLibrary.Generator.GetUInt16(); - Vector128 lower = Vector128.Create(lowerValue); - - UInt16 upperValue = TestLibrary.Generator.GetUInt16(); - Vector128 upper = Vector128.Create(upperValue); - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.Create), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { lower, upper }); - - ValidateResult((Vector256)(result), lowerValue, upperValue); - } - - private void ValidateResult(Vector256 result, UInt16 expectedLowerValue, UInt16 expectedUpperValue, [CallerMemberName] string method = "") - { - UInt16[] resultElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedLowerValue, expectedUpperValue, method); - } - - private void ValidateResult(UInt16[] resultElements, UInt16 expectedLowerValue, UInt16 expectedUpperValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount / 2; i++) - { - if (resultElements[i] != expectedLowerValue) - { - succeeded = false; - break; - } - } - - for (var i = ElementCount / 2; i < ElementCount; i++) - { - if (resultElements[i] != expectedUpperValue) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Create(UInt16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" lower: {expectedLowerValue}"); - TestLibrary.TestFramework.LogInformation($" upper: {expectedUpperValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateVector.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateVector.UInt32.cs deleted file mode 100644 index 6c4dac3c9831..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateVector.UInt32.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateVectorUInt32() - { - var test = new VectorCreate__CreateVectorUInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateVectorUInt32 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt32 lowerValue = TestLibrary.Generator.GetUInt32(); - Vector128 lower = Vector128.Create(lowerValue); - - UInt32 upperValue = TestLibrary.Generator.GetUInt32(); - Vector128 upper = Vector128.Create(upperValue); - - Vector256 result = Vector256.Create(lower, upper); - - ValidateResult(result, lowerValue, upperValue); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt32 lowerValue = TestLibrary.Generator.GetUInt32(); - Vector128 lower = Vector128.Create(lowerValue); - - UInt32 upperValue = TestLibrary.Generator.GetUInt32(); - Vector128 upper = Vector128.Create(upperValue); - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.Create), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { lower, upper }); - - ValidateResult((Vector256)(result), lowerValue, upperValue); - } - - private void ValidateResult(Vector256 result, UInt32 expectedLowerValue, UInt32 expectedUpperValue, [CallerMemberName] string method = "") - { - UInt32[] resultElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedLowerValue, expectedUpperValue, method); - } - - private void ValidateResult(UInt32[] resultElements, UInt32 expectedLowerValue, UInt32 expectedUpperValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount / 2; i++) - { - if (resultElements[i] != expectedLowerValue) - { - succeeded = false; - break; - } - } - - for (var i = ElementCount / 2; i < ElementCount; i++) - { - if (resultElements[i] != expectedUpperValue) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Create(UInt32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" lower: {expectedLowerValue}"); - TestLibrary.TestFramework.LogInformation($" upper: {expectedUpperValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateVector.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateVector.UInt64.cs deleted file mode 100644 index c46fc300ef07..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256/CreateVector.UInt64.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateVectorUInt64() - { - var test = new VectorCreate__CreateVectorUInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateVectorUInt64 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt64 lowerValue = TestLibrary.Generator.GetUInt64(); - Vector128 lower = Vector128.Create(lowerValue); - - UInt64 upperValue = TestLibrary.Generator.GetUInt64(); - Vector128 upper = Vector128.Create(upperValue); - - Vector256 result = Vector256.Create(lower, upper); - - ValidateResult(result, lowerValue, upperValue); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt64 lowerValue = TestLibrary.Generator.GetUInt64(); - Vector128 lower = Vector128.Create(lowerValue); - - UInt64 upperValue = TestLibrary.Generator.GetUInt64(); - Vector128 upper = Vector128.Create(upperValue); - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.Create), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { lower, upper }); - - ValidateResult((Vector256)(result), lowerValue, upperValue); - } - - private void ValidateResult(Vector256 result, UInt64 expectedLowerValue, UInt64 expectedUpperValue, [CallerMemberName] string method = "") - { - UInt64[] resultElements = new UInt64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedLowerValue, expectedUpperValue, method); - } - - private void ValidateResult(UInt64[] resultElements, UInt64 expectedLowerValue, UInt64 expectedUpperValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount / 2; i++) - { - if (resultElements[i] != expectedLowerValue) - { - succeeded = false; - break; - } - } - - for (var i = ElementCount / 2; i < ElementCount; i++) - { - if (resultElements[i] != expectedUpperValue) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Create(UInt64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" lower: {expectedLowerValue}"); - TestLibrary.TestFramework.LogInformation($" upper: {expectedUpperValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AllBitsSet.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AllBitsSet.Byte.cs deleted file mode 100644 index 99bc1de7180f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AllBitsSet.Byte.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AllBitsSetByte() - { - var test = new VectorAllBitsSet__AllBitsSetByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAllBitsSet__AllBitsSetByte - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector256 result = Vector256.AllBitsSet; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector256) - .GetProperty(nameof(Vector256.AllBitsSet), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector256)(result)); - } - - private void ValidateResult(Vector256 result, [CallerMemberName] string method = "") - { - Byte[] resultElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private unsafe void ValidateResult(Byte[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - for (var i = 0; i < ElementCount; i++) - { - if (!HasAllBitsSet(resultElements[i])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.AllBitsSet(Byte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private unsafe bool HasAllBitsSet(Byte value) - { - for (int i = 0; i < sizeof(Byte); i++) - { - if (((byte*)&value)[i] != 0xFF) - return false; - } - return true; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AllBitsSet.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AllBitsSet.Double.cs deleted file mode 100644 index 5e78af82bafd..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AllBitsSet.Double.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AllBitsSetDouble() - { - var test = new VectorAllBitsSet__AllBitsSetDouble(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAllBitsSet__AllBitsSetDouble - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector256 result = Vector256.AllBitsSet; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector256) - .GetProperty(nameof(Vector256.AllBitsSet), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector256)(result)); - } - - private void ValidateResult(Vector256 result, [CallerMemberName] string method = "") - { - Double[] resultElements = new Double[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private unsafe void ValidateResult(Double[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - for (var i = 0; i < ElementCount; i++) - { - if (!HasAllBitsSet(resultElements[i])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.AllBitsSet(Double): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private unsafe bool HasAllBitsSet(Double value) - { - for (int i = 0; i < sizeof(Double); i++) - { - if (((byte*)&value)[i] != 0xFF) - return false; - } - return true; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AllBitsSet.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AllBitsSet.Int16.cs deleted file mode 100644 index d93610a498fb..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AllBitsSet.Int16.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AllBitsSetInt16() - { - var test = new VectorAllBitsSet__AllBitsSetInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAllBitsSet__AllBitsSetInt16 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector256 result = Vector256.AllBitsSet; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector256) - .GetProperty(nameof(Vector256.AllBitsSet), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector256)(result)); - } - - private void ValidateResult(Vector256 result, [CallerMemberName] string method = "") - { - Int16[] resultElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private unsafe void ValidateResult(Int16[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - for (var i = 0; i < ElementCount; i++) - { - if (!HasAllBitsSet(resultElements[i])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.AllBitsSet(Int16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private unsafe bool HasAllBitsSet(Int16 value) - { - for (int i = 0; i < sizeof(Int16); i++) - { - if (((byte*)&value)[i] != 0xFF) - return false; - } - return true; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AllBitsSet.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AllBitsSet.Int32.cs deleted file mode 100644 index 94e49c8b52f5..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AllBitsSet.Int32.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AllBitsSetInt32() - { - var test = new VectorAllBitsSet__AllBitsSetInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAllBitsSet__AllBitsSetInt32 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector256 result = Vector256.AllBitsSet; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector256) - .GetProperty(nameof(Vector256.AllBitsSet), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector256)(result)); - } - - private void ValidateResult(Vector256 result, [CallerMemberName] string method = "") - { - Int32[] resultElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private unsafe void ValidateResult(Int32[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - for (var i = 0; i < ElementCount; i++) - { - if (!HasAllBitsSet(resultElements[i])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.AllBitsSet(Int32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private unsafe bool HasAllBitsSet(Int32 value) - { - for (int i = 0; i < sizeof(Int32); i++) - { - if (((byte*)&value)[i] != 0xFF) - return false; - } - return true; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AllBitsSet.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AllBitsSet.Int64.cs deleted file mode 100644 index 0944ccec721e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AllBitsSet.Int64.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AllBitsSetInt64() - { - var test = new VectorAllBitsSet__AllBitsSetInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAllBitsSet__AllBitsSetInt64 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector256 result = Vector256.AllBitsSet; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector256) - .GetProperty(nameof(Vector256.AllBitsSet), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector256)(result)); - } - - private void ValidateResult(Vector256 result, [CallerMemberName] string method = "") - { - Int64[] resultElements = new Int64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private unsafe void ValidateResult(Int64[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - for (var i = 0; i < ElementCount; i++) - { - if (!HasAllBitsSet(resultElements[i])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.AllBitsSet(Int64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private unsafe bool HasAllBitsSet(Int64 value) - { - for (int i = 0; i < sizeof(Int64); i++) - { - if (((byte*)&value)[i] != 0xFF) - return false; - } - return true; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AllBitsSet.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AllBitsSet.SByte.cs deleted file mode 100644 index f8f114672d23..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AllBitsSet.SByte.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AllBitsSetSByte() - { - var test = new VectorAllBitsSet__AllBitsSetSByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAllBitsSet__AllBitsSetSByte - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector256 result = Vector256.AllBitsSet; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector256) - .GetProperty(nameof(Vector256.AllBitsSet), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector256)(result)); - } - - private void ValidateResult(Vector256 result, [CallerMemberName] string method = "") - { - SByte[] resultElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private unsafe void ValidateResult(SByte[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - for (var i = 0; i < ElementCount; i++) - { - if (!HasAllBitsSet(resultElements[i])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.AllBitsSet(SByte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private unsafe bool HasAllBitsSet(SByte value) - { - for (int i = 0; i < sizeof(SByte); i++) - { - if (((byte*)&value)[i] != 0xFF) - return false; - } - return true; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AllBitsSet.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AllBitsSet.Single.cs deleted file mode 100644 index 80c2b76e3f49..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AllBitsSet.Single.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AllBitsSetSingle() - { - var test = new VectorAllBitsSet__AllBitsSetSingle(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAllBitsSet__AllBitsSetSingle - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector256 result = Vector256.AllBitsSet; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector256) - .GetProperty(nameof(Vector256.AllBitsSet), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector256)(result)); - } - - private void ValidateResult(Vector256 result, [CallerMemberName] string method = "") - { - Single[] resultElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private unsafe void ValidateResult(Single[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - for (var i = 0; i < ElementCount; i++) - { - if (!HasAllBitsSet(resultElements[i])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.AllBitsSet(Single): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private unsafe bool HasAllBitsSet(Single value) - { - for (int i = 0; i < sizeof(Single); i++) - { - if (((byte*)&value)[i] != 0xFF) - return false; - } - return true; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AllBitsSet.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AllBitsSet.UInt16.cs deleted file mode 100644 index ba940f7f7ce9..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AllBitsSet.UInt16.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AllBitsSetUInt16() - { - var test = new VectorAllBitsSet__AllBitsSetUInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAllBitsSet__AllBitsSetUInt16 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector256 result = Vector256.AllBitsSet; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector256) - .GetProperty(nameof(Vector256.AllBitsSet), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector256)(result)); - } - - private void ValidateResult(Vector256 result, [CallerMemberName] string method = "") - { - UInt16[] resultElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private unsafe void ValidateResult(UInt16[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - for (var i = 0; i < ElementCount; i++) - { - if (!HasAllBitsSet(resultElements[i])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.AllBitsSet(UInt16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private unsafe bool HasAllBitsSet(UInt16 value) - { - for (int i = 0; i < sizeof(UInt16); i++) - { - if (((byte*)&value)[i] != 0xFF) - return false; - } - return true; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AllBitsSet.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AllBitsSet.UInt32.cs deleted file mode 100644 index 6047163ca4b8..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AllBitsSet.UInt32.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AllBitsSetUInt32() - { - var test = new VectorAllBitsSet__AllBitsSetUInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAllBitsSet__AllBitsSetUInt32 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector256 result = Vector256.AllBitsSet; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector256) - .GetProperty(nameof(Vector256.AllBitsSet), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector256)(result)); - } - - private void ValidateResult(Vector256 result, [CallerMemberName] string method = "") - { - UInt32[] resultElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private unsafe void ValidateResult(UInt32[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - for (var i = 0; i < ElementCount; i++) - { - if (!HasAllBitsSet(resultElements[i])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.AllBitsSet(UInt32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private unsafe bool HasAllBitsSet(UInt32 value) - { - for (int i = 0; i < sizeof(UInt32); i++) - { - if (((byte*)&value)[i] != 0xFF) - return false; - } - return true; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AllBitsSet.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AllBitsSet.UInt64.cs deleted file mode 100644 index a12fa33213cd..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AllBitsSet.UInt64.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AllBitsSetUInt64() - { - var test = new VectorAllBitsSet__AllBitsSetUInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAllBitsSet__AllBitsSetUInt64 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector256 result = Vector256.AllBitsSet; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector256) - .GetProperty(nameof(Vector256.AllBitsSet), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector256)(result)); - } - - private void ValidateResult(Vector256 result, [CallerMemberName] string method = "") - { - UInt64[] resultElements = new UInt64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private unsafe void ValidateResult(UInt64[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - for (var i = 0; i < ElementCount; i++) - { - if (!HasAllBitsSet(resultElements[i])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.AllBitsSet(UInt64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private unsafe bool HasAllBitsSet(UInt64 value) - { - for (int i = 0; i < sizeof(UInt64); i++) - { - if (((byte*)&value)[i] != 0xFF) - return false; - } - return true; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Byte.cs deleted file mode 100644 index 9191e1ff0a5e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Byte.cs +++ /dev/null @@ -1,253 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsByte() - { - var test = new VectorAs__AsByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates basic functionality works using the generic form, rather than the type-specific form of the method - test.RunGenericScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsByte - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector256 value; - - value = Vector256.Create((byte)TestLibrary.Generator.GetByte()); - Vector256 byteResult = value.AsByte(); - ValidateResult(byteResult, value); - - value = Vector256.Create((byte)TestLibrary.Generator.GetByte()); - Vector256 doubleResult = value.AsDouble(); - ValidateResult(doubleResult, value); - - value = Vector256.Create((byte)TestLibrary.Generator.GetByte()); - Vector256 shortResult = value.AsInt16(); - ValidateResult(shortResult, value); - - value = Vector256.Create((byte)TestLibrary.Generator.GetByte()); - Vector256 intResult = value.AsInt32(); - ValidateResult(intResult, value); - - value = Vector256.Create((byte)TestLibrary.Generator.GetByte()); - Vector256 longResult = value.AsInt64(); - ValidateResult(longResult, value); - - value = Vector256.Create((byte)TestLibrary.Generator.GetByte()); - Vector256 sbyteResult = value.AsSByte(); - ValidateResult(sbyteResult, value); - - value = Vector256.Create((byte)TestLibrary.Generator.GetByte()); - Vector256 floatResult = value.AsSingle(); - ValidateResult(floatResult, value); - - value = Vector256.Create((byte)TestLibrary.Generator.GetByte()); - Vector256 ushortResult = value.AsUInt16(); - ValidateResult(ushortResult, value); - - value = Vector256.Create((byte)TestLibrary.Generator.GetByte()); - Vector256 uintResult = value.AsUInt32(); - ValidateResult(uintResult, value); - - value = Vector256.Create((byte)TestLibrary.Generator.GetByte()); - Vector256 ulongResult = value.AsUInt64(); - ValidateResult(ulongResult, value); - } - - public void RunGenericScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunGenericScenario)); - Vector256 value; - - value = Vector256.Create((byte)TestLibrary.Generator.GetByte()); - Vector256 byteResult = value.As(); - ValidateResult(byteResult, value); - - value = Vector256.Create((byte)TestLibrary.Generator.GetByte()); - Vector256 doubleResult = value.As(); - ValidateResult(doubleResult, value); - - value = Vector256.Create((byte)TestLibrary.Generator.GetByte()); - Vector256 shortResult = value.As(); - ValidateResult(shortResult, value); - - value = Vector256.Create((byte)TestLibrary.Generator.GetByte()); - Vector256 intResult = value.As(); - ValidateResult(intResult, value); - - value = Vector256.Create((byte)TestLibrary.Generator.GetByte()); - Vector256 longResult = value.As(); - ValidateResult(longResult, value); - - value = Vector256.Create((byte)TestLibrary.Generator.GetByte()); - Vector256 sbyteResult = value.As(); - ValidateResult(sbyteResult, value); - - value = Vector256.Create((byte)TestLibrary.Generator.GetByte()); - Vector256 floatResult = value.As(); - ValidateResult(floatResult, value); - - value = Vector256.Create((byte)TestLibrary.Generator.GetByte()); - Vector256 ushortResult = value.As(); - ValidateResult(ushortResult, value); - - value = Vector256.Create((byte)TestLibrary.Generator.GetByte()); - Vector256 uintResult = value.As(); - ValidateResult(uintResult, value); - - value = Vector256.Create((byte)TestLibrary.Generator.GetByte()); - Vector256 ulongResult = value.As(); - ValidateResult(ulongResult, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector256 value; - - value = Vector256.Create((byte)TestLibrary.Generator.GetByte()); - object byteResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsByte)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(byteResult), value); - - value = Vector256.Create((byte)TestLibrary.Generator.GetByte()); - object doubleResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsDouble)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(doubleResult), value); - - value = Vector256.Create((byte)TestLibrary.Generator.GetByte()); - object shortResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsInt16)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(shortResult), value); - - value = Vector256.Create((byte)TestLibrary.Generator.GetByte()); - object intResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsInt32)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(intResult), value); - - value = Vector256.Create((byte)TestLibrary.Generator.GetByte()); - object longResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsInt64)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(longResult), value); - - value = Vector256.Create((byte)TestLibrary.Generator.GetByte()); - object sbyteResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsSByte)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(sbyteResult), value); - - value = Vector256.Create((byte)TestLibrary.Generator.GetByte()); - object floatResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsSingle)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(floatResult), value); - - value = Vector256.Create((byte)TestLibrary.Generator.GetByte()); - object ushortResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsUInt16)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(ushortResult), value); - - value = Vector256.Create((byte)TestLibrary.Generator.GetByte()); - object uintResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsUInt32)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(uintResult), value); - - value = Vector256.Create((byte)TestLibrary.Generator.GetByte()); - object ulongResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsUInt64)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(ulongResult), value); - } - - private void ValidateResult(Vector256 result, Vector256 value, [CallerMemberName] string method = "") - where T : struct - { - Byte[] resultElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Byte[] valueElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, typeof(T), method); - } - - private void ValidateResult(Byte[] resultElements, Byte[] valueElements, Type targetType, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.As{targetType.Name}: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Double.cs deleted file mode 100644 index 542c1daa57b0..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Double.cs +++ /dev/null @@ -1,253 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsDouble() - { - var test = new VectorAs__AsDouble(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates basic functionality works using the generic form, rather than the type-specific form of the method - test.RunGenericScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsDouble - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector256 value; - - value = Vector256.Create((double)TestLibrary.Generator.GetDouble()); - Vector256 byteResult = value.AsByte(); - ValidateResult(byteResult, value); - - value = Vector256.Create((double)TestLibrary.Generator.GetDouble()); - Vector256 doubleResult = value.AsDouble(); - ValidateResult(doubleResult, value); - - value = Vector256.Create((double)TestLibrary.Generator.GetDouble()); - Vector256 shortResult = value.AsInt16(); - ValidateResult(shortResult, value); - - value = Vector256.Create((double)TestLibrary.Generator.GetDouble()); - Vector256 intResult = value.AsInt32(); - ValidateResult(intResult, value); - - value = Vector256.Create((double)TestLibrary.Generator.GetDouble()); - Vector256 longResult = value.AsInt64(); - ValidateResult(longResult, value); - - value = Vector256.Create((double)TestLibrary.Generator.GetDouble()); - Vector256 sbyteResult = value.AsSByte(); - ValidateResult(sbyteResult, value); - - value = Vector256.Create((double)TestLibrary.Generator.GetDouble()); - Vector256 floatResult = value.AsSingle(); - ValidateResult(floatResult, value); - - value = Vector256.Create((double)TestLibrary.Generator.GetDouble()); - Vector256 ushortResult = value.AsUInt16(); - ValidateResult(ushortResult, value); - - value = Vector256.Create((double)TestLibrary.Generator.GetDouble()); - Vector256 uintResult = value.AsUInt32(); - ValidateResult(uintResult, value); - - value = Vector256.Create((double)TestLibrary.Generator.GetDouble()); - Vector256 ulongResult = value.AsUInt64(); - ValidateResult(ulongResult, value); - } - - public void RunGenericScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunGenericScenario)); - Vector256 value; - - value = Vector256.Create((double)TestLibrary.Generator.GetDouble()); - Vector256 byteResult = value.As(); - ValidateResult(byteResult, value); - - value = Vector256.Create((double)TestLibrary.Generator.GetDouble()); - Vector256 doubleResult = value.As(); - ValidateResult(doubleResult, value); - - value = Vector256.Create((double)TestLibrary.Generator.GetDouble()); - Vector256 shortResult = value.As(); - ValidateResult(shortResult, value); - - value = Vector256.Create((double)TestLibrary.Generator.GetDouble()); - Vector256 intResult = value.As(); - ValidateResult(intResult, value); - - value = Vector256.Create((double)TestLibrary.Generator.GetDouble()); - Vector256 longResult = value.As(); - ValidateResult(longResult, value); - - value = Vector256.Create((double)TestLibrary.Generator.GetDouble()); - Vector256 sbyteResult = value.As(); - ValidateResult(sbyteResult, value); - - value = Vector256.Create((double)TestLibrary.Generator.GetDouble()); - Vector256 floatResult = value.As(); - ValidateResult(floatResult, value); - - value = Vector256.Create((double)TestLibrary.Generator.GetDouble()); - Vector256 ushortResult = value.As(); - ValidateResult(ushortResult, value); - - value = Vector256.Create((double)TestLibrary.Generator.GetDouble()); - Vector256 uintResult = value.As(); - ValidateResult(uintResult, value); - - value = Vector256.Create((double)TestLibrary.Generator.GetDouble()); - Vector256 ulongResult = value.As(); - ValidateResult(ulongResult, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector256 value; - - value = Vector256.Create((double)TestLibrary.Generator.GetDouble()); - object byteResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsByte)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(byteResult), value); - - value = Vector256.Create((double)TestLibrary.Generator.GetDouble()); - object doubleResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsDouble)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(doubleResult), value); - - value = Vector256.Create((double)TestLibrary.Generator.GetDouble()); - object shortResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsInt16)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(shortResult), value); - - value = Vector256.Create((double)TestLibrary.Generator.GetDouble()); - object intResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsInt32)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(intResult), value); - - value = Vector256.Create((double)TestLibrary.Generator.GetDouble()); - object longResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsInt64)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(longResult), value); - - value = Vector256.Create((double)TestLibrary.Generator.GetDouble()); - object sbyteResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsSByte)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(sbyteResult), value); - - value = Vector256.Create((double)TestLibrary.Generator.GetDouble()); - object floatResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsSingle)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(floatResult), value); - - value = Vector256.Create((double)TestLibrary.Generator.GetDouble()); - object ushortResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsUInt16)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(ushortResult), value); - - value = Vector256.Create((double)TestLibrary.Generator.GetDouble()); - object uintResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsUInt32)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(uintResult), value); - - value = Vector256.Create((double)TestLibrary.Generator.GetDouble()); - object ulongResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsUInt64)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(ulongResult), value); - } - - private void ValidateResult(Vector256 result, Vector256 value, [CallerMemberName] string method = "") - where T : struct - { - Double[] resultElements = new Double[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Double[] valueElements = new Double[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, typeof(T), method); - } - - private void ValidateResult(Double[] resultElements, Double[] valueElements, Type targetType, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.As{targetType.Name}: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Int16.cs deleted file mode 100644 index 5e2688f85de6..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Int16.cs +++ /dev/null @@ -1,253 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsInt16() - { - var test = new VectorAs__AsInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates basic functionality works using the generic form, rather than the type-specific form of the method - test.RunGenericScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsInt16 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector256 value; - - value = Vector256.Create((short)TestLibrary.Generator.GetInt16()); - Vector256 byteResult = value.AsByte(); - ValidateResult(byteResult, value); - - value = Vector256.Create((short)TestLibrary.Generator.GetInt16()); - Vector256 doubleResult = value.AsDouble(); - ValidateResult(doubleResult, value); - - value = Vector256.Create((short)TestLibrary.Generator.GetInt16()); - Vector256 shortResult = value.AsInt16(); - ValidateResult(shortResult, value); - - value = Vector256.Create((short)TestLibrary.Generator.GetInt16()); - Vector256 intResult = value.AsInt32(); - ValidateResult(intResult, value); - - value = Vector256.Create((short)TestLibrary.Generator.GetInt16()); - Vector256 longResult = value.AsInt64(); - ValidateResult(longResult, value); - - value = Vector256.Create((short)TestLibrary.Generator.GetInt16()); - Vector256 sbyteResult = value.AsSByte(); - ValidateResult(sbyteResult, value); - - value = Vector256.Create((short)TestLibrary.Generator.GetInt16()); - Vector256 floatResult = value.AsSingle(); - ValidateResult(floatResult, value); - - value = Vector256.Create((short)TestLibrary.Generator.GetInt16()); - Vector256 ushortResult = value.AsUInt16(); - ValidateResult(ushortResult, value); - - value = Vector256.Create((short)TestLibrary.Generator.GetInt16()); - Vector256 uintResult = value.AsUInt32(); - ValidateResult(uintResult, value); - - value = Vector256.Create((short)TestLibrary.Generator.GetInt16()); - Vector256 ulongResult = value.AsUInt64(); - ValidateResult(ulongResult, value); - } - - public void RunGenericScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunGenericScenario)); - Vector256 value; - - value = Vector256.Create((short)TestLibrary.Generator.GetInt16()); - Vector256 byteResult = value.As(); - ValidateResult(byteResult, value); - - value = Vector256.Create((short)TestLibrary.Generator.GetInt16()); - Vector256 doubleResult = value.As(); - ValidateResult(doubleResult, value); - - value = Vector256.Create((short)TestLibrary.Generator.GetInt16()); - Vector256 shortResult = value.As(); - ValidateResult(shortResult, value); - - value = Vector256.Create((short)TestLibrary.Generator.GetInt16()); - Vector256 intResult = value.As(); - ValidateResult(intResult, value); - - value = Vector256.Create((short)TestLibrary.Generator.GetInt16()); - Vector256 longResult = value.As(); - ValidateResult(longResult, value); - - value = Vector256.Create((short)TestLibrary.Generator.GetInt16()); - Vector256 sbyteResult = value.As(); - ValidateResult(sbyteResult, value); - - value = Vector256.Create((short)TestLibrary.Generator.GetInt16()); - Vector256 floatResult = value.As(); - ValidateResult(floatResult, value); - - value = Vector256.Create((short)TestLibrary.Generator.GetInt16()); - Vector256 ushortResult = value.As(); - ValidateResult(ushortResult, value); - - value = Vector256.Create((short)TestLibrary.Generator.GetInt16()); - Vector256 uintResult = value.As(); - ValidateResult(uintResult, value); - - value = Vector256.Create((short)TestLibrary.Generator.GetInt16()); - Vector256 ulongResult = value.As(); - ValidateResult(ulongResult, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector256 value; - - value = Vector256.Create((short)TestLibrary.Generator.GetInt16()); - object byteResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsByte)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(byteResult), value); - - value = Vector256.Create((short)TestLibrary.Generator.GetInt16()); - object doubleResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsDouble)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(doubleResult), value); - - value = Vector256.Create((short)TestLibrary.Generator.GetInt16()); - object shortResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsInt16)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(shortResult), value); - - value = Vector256.Create((short)TestLibrary.Generator.GetInt16()); - object intResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsInt32)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(intResult), value); - - value = Vector256.Create((short)TestLibrary.Generator.GetInt16()); - object longResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsInt64)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(longResult), value); - - value = Vector256.Create((short)TestLibrary.Generator.GetInt16()); - object sbyteResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsSByte)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(sbyteResult), value); - - value = Vector256.Create((short)TestLibrary.Generator.GetInt16()); - object floatResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsSingle)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(floatResult), value); - - value = Vector256.Create((short)TestLibrary.Generator.GetInt16()); - object ushortResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsUInt16)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(ushortResult), value); - - value = Vector256.Create((short)TestLibrary.Generator.GetInt16()); - object uintResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsUInt32)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(uintResult), value); - - value = Vector256.Create((short)TestLibrary.Generator.GetInt16()); - object ulongResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsUInt64)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(ulongResult), value); - } - - private void ValidateResult(Vector256 result, Vector256 value, [CallerMemberName] string method = "") - where T : struct - { - Int16[] resultElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Int16[] valueElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, typeof(T), method); - } - - private void ValidateResult(Int16[] resultElements, Int16[] valueElements, Type targetType, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.As{targetType.Name}: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Int32.cs deleted file mode 100644 index 13bfefc01be1..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Int32.cs +++ /dev/null @@ -1,253 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsInt32() - { - var test = new VectorAs__AsInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates basic functionality works using the generic form, rather than the type-specific form of the method - test.RunGenericScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsInt32 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector256 value; - - value = Vector256.Create((int)TestLibrary.Generator.GetInt32()); - Vector256 byteResult = value.AsByte(); - ValidateResult(byteResult, value); - - value = Vector256.Create((int)TestLibrary.Generator.GetInt32()); - Vector256 doubleResult = value.AsDouble(); - ValidateResult(doubleResult, value); - - value = Vector256.Create((int)TestLibrary.Generator.GetInt32()); - Vector256 shortResult = value.AsInt16(); - ValidateResult(shortResult, value); - - value = Vector256.Create((int)TestLibrary.Generator.GetInt32()); - Vector256 intResult = value.AsInt32(); - ValidateResult(intResult, value); - - value = Vector256.Create((int)TestLibrary.Generator.GetInt32()); - Vector256 longResult = value.AsInt64(); - ValidateResult(longResult, value); - - value = Vector256.Create((int)TestLibrary.Generator.GetInt32()); - Vector256 sbyteResult = value.AsSByte(); - ValidateResult(sbyteResult, value); - - value = Vector256.Create((int)TestLibrary.Generator.GetInt32()); - Vector256 floatResult = value.AsSingle(); - ValidateResult(floatResult, value); - - value = Vector256.Create((int)TestLibrary.Generator.GetInt32()); - Vector256 ushortResult = value.AsUInt16(); - ValidateResult(ushortResult, value); - - value = Vector256.Create((int)TestLibrary.Generator.GetInt32()); - Vector256 uintResult = value.AsUInt32(); - ValidateResult(uintResult, value); - - value = Vector256.Create((int)TestLibrary.Generator.GetInt32()); - Vector256 ulongResult = value.AsUInt64(); - ValidateResult(ulongResult, value); - } - - public void RunGenericScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunGenericScenario)); - Vector256 value; - - value = Vector256.Create((int)TestLibrary.Generator.GetInt32()); - Vector256 byteResult = value.As(); - ValidateResult(byteResult, value); - - value = Vector256.Create((int)TestLibrary.Generator.GetInt32()); - Vector256 doubleResult = value.As(); - ValidateResult(doubleResult, value); - - value = Vector256.Create((int)TestLibrary.Generator.GetInt32()); - Vector256 shortResult = value.As(); - ValidateResult(shortResult, value); - - value = Vector256.Create((int)TestLibrary.Generator.GetInt32()); - Vector256 intResult = value.As(); - ValidateResult(intResult, value); - - value = Vector256.Create((int)TestLibrary.Generator.GetInt32()); - Vector256 longResult = value.As(); - ValidateResult(longResult, value); - - value = Vector256.Create((int)TestLibrary.Generator.GetInt32()); - Vector256 sbyteResult = value.As(); - ValidateResult(sbyteResult, value); - - value = Vector256.Create((int)TestLibrary.Generator.GetInt32()); - Vector256 floatResult = value.As(); - ValidateResult(floatResult, value); - - value = Vector256.Create((int)TestLibrary.Generator.GetInt32()); - Vector256 ushortResult = value.As(); - ValidateResult(ushortResult, value); - - value = Vector256.Create((int)TestLibrary.Generator.GetInt32()); - Vector256 uintResult = value.As(); - ValidateResult(uintResult, value); - - value = Vector256.Create((int)TestLibrary.Generator.GetInt32()); - Vector256 ulongResult = value.As(); - ValidateResult(ulongResult, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector256 value; - - value = Vector256.Create((int)TestLibrary.Generator.GetInt32()); - object byteResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsByte)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(byteResult), value); - - value = Vector256.Create((int)TestLibrary.Generator.GetInt32()); - object doubleResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsDouble)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(doubleResult), value); - - value = Vector256.Create((int)TestLibrary.Generator.GetInt32()); - object shortResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsInt16)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(shortResult), value); - - value = Vector256.Create((int)TestLibrary.Generator.GetInt32()); - object intResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsInt32)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(intResult), value); - - value = Vector256.Create((int)TestLibrary.Generator.GetInt32()); - object longResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsInt64)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(longResult), value); - - value = Vector256.Create((int)TestLibrary.Generator.GetInt32()); - object sbyteResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsSByte)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(sbyteResult), value); - - value = Vector256.Create((int)TestLibrary.Generator.GetInt32()); - object floatResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsSingle)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(floatResult), value); - - value = Vector256.Create((int)TestLibrary.Generator.GetInt32()); - object ushortResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsUInt16)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(ushortResult), value); - - value = Vector256.Create((int)TestLibrary.Generator.GetInt32()); - object uintResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsUInt32)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(uintResult), value); - - value = Vector256.Create((int)TestLibrary.Generator.GetInt32()); - object ulongResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsUInt64)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(ulongResult), value); - } - - private void ValidateResult(Vector256 result, Vector256 value, [CallerMemberName] string method = "") - where T : struct - { - Int32[] resultElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Int32[] valueElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, typeof(T), method); - } - - private void ValidateResult(Int32[] resultElements, Int32[] valueElements, Type targetType, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.As{targetType.Name}: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Int64.cs deleted file mode 100644 index ba52cec5f3b0..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Int64.cs +++ /dev/null @@ -1,253 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsInt64() - { - var test = new VectorAs__AsInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates basic functionality works using the generic form, rather than the type-specific form of the method - test.RunGenericScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsInt64 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector256 value; - - value = Vector256.Create((long)TestLibrary.Generator.GetInt64()); - Vector256 byteResult = value.AsByte(); - ValidateResult(byteResult, value); - - value = Vector256.Create((long)TestLibrary.Generator.GetInt64()); - Vector256 doubleResult = value.AsDouble(); - ValidateResult(doubleResult, value); - - value = Vector256.Create((long)TestLibrary.Generator.GetInt64()); - Vector256 shortResult = value.AsInt16(); - ValidateResult(shortResult, value); - - value = Vector256.Create((long)TestLibrary.Generator.GetInt64()); - Vector256 intResult = value.AsInt32(); - ValidateResult(intResult, value); - - value = Vector256.Create((long)TestLibrary.Generator.GetInt64()); - Vector256 longResult = value.AsInt64(); - ValidateResult(longResult, value); - - value = Vector256.Create((long)TestLibrary.Generator.GetInt64()); - Vector256 sbyteResult = value.AsSByte(); - ValidateResult(sbyteResult, value); - - value = Vector256.Create((long)TestLibrary.Generator.GetInt64()); - Vector256 floatResult = value.AsSingle(); - ValidateResult(floatResult, value); - - value = Vector256.Create((long)TestLibrary.Generator.GetInt64()); - Vector256 ushortResult = value.AsUInt16(); - ValidateResult(ushortResult, value); - - value = Vector256.Create((long)TestLibrary.Generator.GetInt64()); - Vector256 uintResult = value.AsUInt32(); - ValidateResult(uintResult, value); - - value = Vector256.Create((long)TestLibrary.Generator.GetInt64()); - Vector256 ulongResult = value.AsUInt64(); - ValidateResult(ulongResult, value); - } - - public void RunGenericScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunGenericScenario)); - Vector256 value; - - value = Vector256.Create((long)TestLibrary.Generator.GetInt64()); - Vector256 byteResult = value.As(); - ValidateResult(byteResult, value); - - value = Vector256.Create((long)TestLibrary.Generator.GetInt64()); - Vector256 doubleResult = value.As(); - ValidateResult(doubleResult, value); - - value = Vector256.Create((long)TestLibrary.Generator.GetInt64()); - Vector256 shortResult = value.As(); - ValidateResult(shortResult, value); - - value = Vector256.Create((long)TestLibrary.Generator.GetInt64()); - Vector256 intResult = value.As(); - ValidateResult(intResult, value); - - value = Vector256.Create((long)TestLibrary.Generator.GetInt64()); - Vector256 longResult = value.As(); - ValidateResult(longResult, value); - - value = Vector256.Create((long)TestLibrary.Generator.GetInt64()); - Vector256 sbyteResult = value.As(); - ValidateResult(sbyteResult, value); - - value = Vector256.Create((long)TestLibrary.Generator.GetInt64()); - Vector256 floatResult = value.As(); - ValidateResult(floatResult, value); - - value = Vector256.Create((long)TestLibrary.Generator.GetInt64()); - Vector256 ushortResult = value.As(); - ValidateResult(ushortResult, value); - - value = Vector256.Create((long)TestLibrary.Generator.GetInt64()); - Vector256 uintResult = value.As(); - ValidateResult(uintResult, value); - - value = Vector256.Create((long)TestLibrary.Generator.GetInt64()); - Vector256 ulongResult = value.As(); - ValidateResult(ulongResult, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector256 value; - - value = Vector256.Create((long)TestLibrary.Generator.GetInt64()); - object byteResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsByte)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(byteResult), value); - - value = Vector256.Create((long)TestLibrary.Generator.GetInt64()); - object doubleResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsDouble)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(doubleResult), value); - - value = Vector256.Create((long)TestLibrary.Generator.GetInt64()); - object shortResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsInt16)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(shortResult), value); - - value = Vector256.Create((long)TestLibrary.Generator.GetInt64()); - object intResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsInt32)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(intResult), value); - - value = Vector256.Create((long)TestLibrary.Generator.GetInt64()); - object longResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsInt64)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(longResult), value); - - value = Vector256.Create((long)TestLibrary.Generator.GetInt64()); - object sbyteResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsSByte)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(sbyteResult), value); - - value = Vector256.Create((long)TestLibrary.Generator.GetInt64()); - object floatResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsSingle)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(floatResult), value); - - value = Vector256.Create((long)TestLibrary.Generator.GetInt64()); - object ushortResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsUInt16)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(ushortResult), value); - - value = Vector256.Create((long)TestLibrary.Generator.GetInt64()); - object uintResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsUInt32)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(uintResult), value); - - value = Vector256.Create((long)TestLibrary.Generator.GetInt64()); - object ulongResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsUInt64)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(ulongResult), value); - } - - private void ValidateResult(Vector256 result, Vector256 value, [CallerMemberName] string method = "") - where T : struct - { - Int64[] resultElements = new Int64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Int64[] valueElements = new Int64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, typeof(T), method); - } - - private void ValidateResult(Int64[] resultElements, Int64[] valueElements, Type targetType, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.As{targetType.Name}: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.SByte.cs deleted file mode 100644 index a9d631e55a9d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.SByte.cs +++ /dev/null @@ -1,253 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsSByte() - { - var test = new VectorAs__AsSByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates basic functionality works using the generic form, rather than the type-specific form of the method - test.RunGenericScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsSByte - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector256 value; - - value = Vector256.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector256 byteResult = value.AsByte(); - ValidateResult(byteResult, value); - - value = Vector256.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector256 doubleResult = value.AsDouble(); - ValidateResult(doubleResult, value); - - value = Vector256.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector256 shortResult = value.AsInt16(); - ValidateResult(shortResult, value); - - value = Vector256.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector256 intResult = value.AsInt32(); - ValidateResult(intResult, value); - - value = Vector256.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector256 longResult = value.AsInt64(); - ValidateResult(longResult, value); - - value = Vector256.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector256 sbyteResult = value.AsSByte(); - ValidateResult(sbyteResult, value); - - value = Vector256.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector256 floatResult = value.AsSingle(); - ValidateResult(floatResult, value); - - value = Vector256.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector256 ushortResult = value.AsUInt16(); - ValidateResult(ushortResult, value); - - value = Vector256.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector256 uintResult = value.AsUInt32(); - ValidateResult(uintResult, value); - - value = Vector256.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector256 ulongResult = value.AsUInt64(); - ValidateResult(ulongResult, value); - } - - public void RunGenericScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunGenericScenario)); - Vector256 value; - - value = Vector256.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector256 byteResult = value.As(); - ValidateResult(byteResult, value); - - value = Vector256.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector256 doubleResult = value.As(); - ValidateResult(doubleResult, value); - - value = Vector256.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector256 shortResult = value.As(); - ValidateResult(shortResult, value); - - value = Vector256.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector256 intResult = value.As(); - ValidateResult(intResult, value); - - value = Vector256.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector256 longResult = value.As(); - ValidateResult(longResult, value); - - value = Vector256.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector256 sbyteResult = value.As(); - ValidateResult(sbyteResult, value); - - value = Vector256.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector256 floatResult = value.As(); - ValidateResult(floatResult, value); - - value = Vector256.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector256 ushortResult = value.As(); - ValidateResult(ushortResult, value); - - value = Vector256.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector256 uintResult = value.As(); - ValidateResult(uintResult, value); - - value = Vector256.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector256 ulongResult = value.As(); - ValidateResult(ulongResult, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector256 value; - - value = Vector256.Create((sbyte)TestLibrary.Generator.GetSByte()); - object byteResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsByte)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(byteResult), value); - - value = Vector256.Create((sbyte)TestLibrary.Generator.GetSByte()); - object doubleResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsDouble)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(doubleResult), value); - - value = Vector256.Create((sbyte)TestLibrary.Generator.GetSByte()); - object shortResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsInt16)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(shortResult), value); - - value = Vector256.Create((sbyte)TestLibrary.Generator.GetSByte()); - object intResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsInt32)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(intResult), value); - - value = Vector256.Create((sbyte)TestLibrary.Generator.GetSByte()); - object longResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsInt64)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(longResult), value); - - value = Vector256.Create((sbyte)TestLibrary.Generator.GetSByte()); - object sbyteResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsSByte)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(sbyteResult), value); - - value = Vector256.Create((sbyte)TestLibrary.Generator.GetSByte()); - object floatResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsSingle)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(floatResult), value); - - value = Vector256.Create((sbyte)TestLibrary.Generator.GetSByte()); - object ushortResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsUInt16)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(ushortResult), value); - - value = Vector256.Create((sbyte)TestLibrary.Generator.GetSByte()); - object uintResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsUInt32)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(uintResult), value); - - value = Vector256.Create((sbyte)TestLibrary.Generator.GetSByte()); - object ulongResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsUInt64)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(ulongResult), value); - } - - private void ValidateResult(Vector256 result, Vector256 value, [CallerMemberName] string method = "") - where T : struct - { - SByte[] resultElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - SByte[] valueElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, typeof(T), method); - } - - private void ValidateResult(SByte[] resultElements, SByte[] valueElements, Type targetType, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.As{targetType.Name}: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Single.cs deleted file mode 100644 index 8a1c71e4a911..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.Single.cs +++ /dev/null @@ -1,253 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsSingle() - { - var test = new VectorAs__AsSingle(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates basic functionality works using the generic form, rather than the type-specific form of the method - test.RunGenericScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsSingle - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector256 value; - - value = Vector256.Create((float)TestLibrary.Generator.GetSingle()); - Vector256 byteResult = value.AsByte(); - ValidateResult(byteResult, value); - - value = Vector256.Create((float)TestLibrary.Generator.GetSingle()); - Vector256 doubleResult = value.AsDouble(); - ValidateResult(doubleResult, value); - - value = Vector256.Create((float)TestLibrary.Generator.GetSingle()); - Vector256 shortResult = value.AsInt16(); - ValidateResult(shortResult, value); - - value = Vector256.Create((float)TestLibrary.Generator.GetSingle()); - Vector256 intResult = value.AsInt32(); - ValidateResult(intResult, value); - - value = Vector256.Create((float)TestLibrary.Generator.GetSingle()); - Vector256 longResult = value.AsInt64(); - ValidateResult(longResult, value); - - value = Vector256.Create((float)TestLibrary.Generator.GetSingle()); - Vector256 sbyteResult = value.AsSByte(); - ValidateResult(sbyteResult, value); - - value = Vector256.Create((float)TestLibrary.Generator.GetSingle()); - Vector256 floatResult = value.AsSingle(); - ValidateResult(floatResult, value); - - value = Vector256.Create((float)TestLibrary.Generator.GetSingle()); - Vector256 ushortResult = value.AsUInt16(); - ValidateResult(ushortResult, value); - - value = Vector256.Create((float)TestLibrary.Generator.GetSingle()); - Vector256 uintResult = value.AsUInt32(); - ValidateResult(uintResult, value); - - value = Vector256.Create((float)TestLibrary.Generator.GetSingle()); - Vector256 ulongResult = value.AsUInt64(); - ValidateResult(ulongResult, value); - } - - public void RunGenericScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunGenericScenario)); - Vector256 value; - - value = Vector256.Create((float)TestLibrary.Generator.GetSingle()); - Vector256 byteResult = value.As(); - ValidateResult(byteResult, value); - - value = Vector256.Create((float)TestLibrary.Generator.GetSingle()); - Vector256 doubleResult = value.As(); - ValidateResult(doubleResult, value); - - value = Vector256.Create((float)TestLibrary.Generator.GetSingle()); - Vector256 shortResult = value.As(); - ValidateResult(shortResult, value); - - value = Vector256.Create((float)TestLibrary.Generator.GetSingle()); - Vector256 intResult = value.As(); - ValidateResult(intResult, value); - - value = Vector256.Create((float)TestLibrary.Generator.GetSingle()); - Vector256 longResult = value.As(); - ValidateResult(longResult, value); - - value = Vector256.Create((float)TestLibrary.Generator.GetSingle()); - Vector256 sbyteResult = value.As(); - ValidateResult(sbyteResult, value); - - value = Vector256.Create((float)TestLibrary.Generator.GetSingle()); - Vector256 floatResult = value.As(); - ValidateResult(floatResult, value); - - value = Vector256.Create((float)TestLibrary.Generator.GetSingle()); - Vector256 ushortResult = value.As(); - ValidateResult(ushortResult, value); - - value = Vector256.Create((float)TestLibrary.Generator.GetSingle()); - Vector256 uintResult = value.As(); - ValidateResult(uintResult, value); - - value = Vector256.Create((float)TestLibrary.Generator.GetSingle()); - Vector256 ulongResult = value.As(); - ValidateResult(ulongResult, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector256 value; - - value = Vector256.Create((float)TestLibrary.Generator.GetSingle()); - object byteResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsByte)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(byteResult), value); - - value = Vector256.Create((float)TestLibrary.Generator.GetSingle()); - object doubleResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsDouble)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(doubleResult), value); - - value = Vector256.Create((float)TestLibrary.Generator.GetSingle()); - object shortResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsInt16)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(shortResult), value); - - value = Vector256.Create((float)TestLibrary.Generator.GetSingle()); - object intResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsInt32)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(intResult), value); - - value = Vector256.Create((float)TestLibrary.Generator.GetSingle()); - object longResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsInt64)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(longResult), value); - - value = Vector256.Create((float)TestLibrary.Generator.GetSingle()); - object sbyteResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsSByte)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(sbyteResult), value); - - value = Vector256.Create((float)TestLibrary.Generator.GetSingle()); - object floatResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsSingle)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(floatResult), value); - - value = Vector256.Create((float)TestLibrary.Generator.GetSingle()); - object ushortResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsUInt16)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(ushortResult), value); - - value = Vector256.Create((float)TestLibrary.Generator.GetSingle()); - object uintResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsUInt32)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(uintResult), value); - - value = Vector256.Create((float)TestLibrary.Generator.GetSingle()); - object ulongResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsUInt64)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(ulongResult), value); - } - - private void ValidateResult(Vector256 result, Vector256 value, [CallerMemberName] string method = "") - where T : struct - { - Single[] resultElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Single[] valueElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, typeof(T), method); - } - - private void ValidateResult(Single[] resultElements, Single[] valueElements, Type targetType, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.As{targetType.Name}: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.UInt16.cs deleted file mode 100644 index 9025b61bd347..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.UInt16.cs +++ /dev/null @@ -1,253 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsUInt16() - { - var test = new VectorAs__AsUInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates basic functionality works using the generic form, rather than the type-specific form of the method - test.RunGenericScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsUInt16 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector256 value; - - value = Vector256.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector256 byteResult = value.AsByte(); - ValidateResult(byteResult, value); - - value = Vector256.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector256 doubleResult = value.AsDouble(); - ValidateResult(doubleResult, value); - - value = Vector256.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector256 shortResult = value.AsInt16(); - ValidateResult(shortResult, value); - - value = Vector256.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector256 intResult = value.AsInt32(); - ValidateResult(intResult, value); - - value = Vector256.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector256 longResult = value.AsInt64(); - ValidateResult(longResult, value); - - value = Vector256.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector256 sbyteResult = value.AsSByte(); - ValidateResult(sbyteResult, value); - - value = Vector256.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector256 floatResult = value.AsSingle(); - ValidateResult(floatResult, value); - - value = Vector256.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector256 ushortResult = value.AsUInt16(); - ValidateResult(ushortResult, value); - - value = Vector256.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector256 uintResult = value.AsUInt32(); - ValidateResult(uintResult, value); - - value = Vector256.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector256 ulongResult = value.AsUInt64(); - ValidateResult(ulongResult, value); - } - - public void RunGenericScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunGenericScenario)); - Vector256 value; - - value = Vector256.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector256 byteResult = value.As(); - ValidateResult(byteResult, value); - - value = Vector256.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector256 doubleResult = value.As(); - ValidateResult(doubleResult, value); - - value = Vector256.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector256 shortResult = value.As(); - ValidateResult(shortResult, value); - - value = Vector256.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector256 intResult = value.As(); - ValidateResult(intResult, value); - - value = Vector256.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector256 longResult = value.As(); - ValidateResult(longResult, value); - - value = Vector256.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector256 sbyteResult = value.As(); - ValidateResult(sbyteResult, value); - - value = Vector256.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector256 floatResult = value.As(); - ValidateResult(floatResult, value); - - value = Vector256.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector256 ushortResult = value.As(); - ValidateResult(ushortResult, value); - - value = Vector256.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector256 uintResult = value.As(); - ValidateResult(uintResult, value); - - value = Vector256.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector256 ulongResult = value.As(); - ValidateResult(ulongResult, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector256 value; - - value = Vector256.Create((ushort)TestLibrary.Generator.GetUInt16()); - object byteResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsByte)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(byteResult), value); - - value = Vector256.Create((ushort)TestLibrary.Generator.GetUInt16()); - object doubleResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsDouble)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(doubleResult), value); - - value = Vector256.Create((ushort)TestLibrary.Generator.GetUInt16()); - object shortResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsInt16)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(shortResult), value); - - value = Vector256.Create((ushort)TestLibrary.Generator.GetUInt16()); - object intResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsInt32)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(intResult), value); - - value = Vector256.Create((ushort)TestLibrary.Generator.GetUInt16()); - object longResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsInt64)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(longResult), value); - - value = Vector256.Create((ushort)TestLibrary.Generator.GetUInt16()); - object sbyteResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsSByte)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(sbyteResult), value); - - value = Vector256.Create((ushort)TestLibrary.Generator.GetUInt16()); - object floatResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsSingle)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(floatResult), value); - - value = Vector256.Create((ushort)TestLibrary.Generator.GetUInt16()); - object ushortResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsUInt16)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(ushortResult), value); - - value = Vector256.Create((ushort)TestLibrary.Generator.GetUInt16()); - object uintResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsUInt32)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(uintResult), value); - - value = Vector256.Create((ushort)TestLibrary.Generator.GetUInt16()); - object ulongResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsUInt64)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(ulongResult), value); - } - - private void ValidateResult(Vector256 result, Vector256 value, [CallerMemberName] string method = "") - where T : struct - { - UInt16[] resultElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - UInt16[] valueElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, typeof(T), method); - } - - private void ValidateResult(UInt16[] resultElements, UInt16[] valueElements, Type targetType, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.As{targetType.Name}: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.UInt32.cs deleted file mode 100644 index 85c0800da5c1..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.UInt32.cs +++ /dev/null @@ -1,253 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsUInt32() - { - var test = new VectorAs__AsUInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates basic functionality works using the generic form, rather than the type-specific form of the method - test.RunGenericScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsUInt32 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector256 value; - - value = Vector256.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector256 byteResult = value.AsByte(); - ValidateResult(byteResult, value); - - value = Vector256.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector256 doubleResult = value.AsDouble(); - ValidateResult(doubleResult, value); - - value = Vector256.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector256 shortResult = value.AsInt16(); - ValidateResult(shortResult, value); - - value = Vector256.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector256 intResult = value.AsInt32(); - ValidateResult(intResult, value); - - value = Vector256.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector256 longResult = value.AsInt64(); - ValidateResult(longResult, value); - - value = Vector256.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector256 sbyteResult = value.AsSByte(); - ValidateResult(sbyteResult, value); - - value = Vector256.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector256 floatResult = value.AsSingle(); - ValidateResult(floatResult, value); - - value = Vector256.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector256 ushortResult = value.AsUInt16(); - ValidateResult(ushortResult, value); - - value = Vector256.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector256 uintResult = value.AsUInt32(); - ValidateResult(uintResult, value); - - value = Vector256.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector256 ulongResult = value.AsUInt64(); - ValidateResult(ulongResult, value); - } - - public void RunGenericScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunGenericScenario)); - Vector256 value; - - value = Vector256.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector256 byteResult = value.As(); - ValidateResult(byteResult, value); - - value = Vector256.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector256 doubleResult = value.As(); - ValidateResult(doubleResult, value); - - value = Vector256.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector256 shortResult = value.As(); - ValidateResult(shortResult, value); - - value = Vector256.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector256 intResult = value.As(); - ValidateResult(intResult, value); - - value = Vector256.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector256 longResult = value.As(); - ValidateResult(longResult, value); - - value = Vector256.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector256 sbyteResult = value.As(); - ValidateResult(sbyteResult, value); - - value = Vector256.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector256 floatResult = value.As(); - ValidateResult(floatResult, value); - - value = Vector256.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector256 ushortResult = value.As(); - ValidateResult(ushortResult, value); - - value = Vector256.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector256 uintResult = value.As(); - ValidateResult(uintResult, value); - - value = Vector256.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector256 ulongResult = value.As(); - ValidateResult(ulongResult, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector256 value; - - value = Vector256.Create((uint)TestLibrary.Generator.GetUInt32()); - object byteResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsByte)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(byteResult), value); - - value = Vector256.Create((uint)TestLibrary.Generator.GetUInt32()); - object doubleResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsDouble)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(doubleResult), value); - - value = Vector256.Create((uint)TestLibrary.Generator.GetUInt32()); - object shortResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsInt16)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(shortResult), value); - - value = Vector256.Create((uint)TestLibrary.Generator.GetUInt32()); - object intResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsInt32)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(intResult), value); - - value = Vector256.Create((uint)TestLibrary.Generator.GetUInt32()); - object longResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsInt64)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(longResult), value); - - value = Vector256.Create((uint)TestLibrary.Generator.GetUInt32()); - object sbyteResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsSByte)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(sbyteResult), value); - - value = Vector256.Create((uint)TestLibrary.Generator.GetUInt32()); - object floatResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsSingle)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(floatResult), value); - - value = Vector256.Create((uint)TestLibrary.Generator.GetUInt32()); - object ushortResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsUInt16)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(ushortResult), value); - - value = Vector256.Create((uint)TestLibrary.Generator.GetUInt32()); - object uintResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsUInt32)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(uintResult), value); - - value = Vector256.Create((uint)TestLibrary.Generator.GetUInt32()); - object ulongResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsUInt64)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(ulongResult), value); - } - - private void ValidateResult(Vector256 result, Vector256 value, [CallerMemberName] string method = "") - where T : struct - { - UInt32[] resultElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - UInt32[] valueElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, typeof(T), method); - } - - private void ValidateResult(UInt32[] resultElements, UInt32[] valueElements, Type targetType, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.As{targetType.Name}: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.UInt64.cs deleted file mode 100644 index e0561560b136..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/As.UInt64.cs +++ /dev/null @@ -1,253 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsUInt64() - { - var test = new VectorAs__AsUInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates basic functionality works using the generic form, rather than the type-specific form of the method - test.RunGenericScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsUInt64 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector256 value; - - value = Vector256.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector256 byteResult = value.AsByte(); - ValidateResult(byteResult, value); - - value = Vector256.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector256 doubleResult = value.AsDouble(); - ValidateResult(doubleResult, value); - - value = Vector256.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector256 shortResult = value.AsInt16(); - ValidateResult(shortResult, value); - - value = Vector256.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector256 intResult = value.AsInt32(); - ValidateResult(intResult, value); - - value = Vector256.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector256 longResult = value.AsInt64(); - ValidateResult(longResult, value); - - value = Vector256.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector256 sbyteResult = value.AsSByte(); - ValidateResult(sbyteResult, value); - - value = Vector256.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector256 floatResult = value.AsSingle(); - ValidateResult(floatResult, value); - - value = Vector256.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector256 ushortResult = value.AsUInt16(); - ValidateResult(ushortResult, value); - - value = Vector256.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector256 uintResult = value.AsUInt32(); - ValidateResult(uintResult, value); - - value = Vector256.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector256 ulongResult = value.AsUInt64(); - ValidateResult(ulongResult, value); - } - - public void RunGenericScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunGenericScenario)); - Vector256 value; - - value = Vector256.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector256 byteResult = value.As(); - ValidateResult(byteResult, value); - - value = Vector256.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector256 doubleResult = value.As(); - ValidateResult(doubleResult, value); - - value = Vector256.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector256 shortResult = value.As(); - ValidateResult(shortResult, value); - - value = Vector256.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector256 intResult = value.As(); - ValidateResult(intResult, value); - - value = Vector256.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector256 longResult = value.As(); - ValidateResult(longResult, value); - - value = Vector256.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector256 sbyteResult = value.As(); - ValidateResult(sbyteResult, value); - - value = Vector256.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector256 floatResult = value.As(); - ValidateResult(floatResult, value); - - value = Vector256.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector256 ushortResult = value.As(); - ValidateResult(ushortResult, value); - - value = Vector256.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector256 uintResult = value.As(); - ValidateResult(uintResult, value); - - value = Vector256.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector256 ulongResult = value.As(); - ValidateResult(ulongResult, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector256 value; - - value = Vector256.Create((ulong)TestLibrary.Generator.GetUInt64()); - object byteResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsByte)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(byteResult), value); - - value = Vector256.Create((ulong)TestLibrary.Generator.GetUInt64()); - object doubleResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsDouble)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(doubleResult), value); - - value = Vector256.Create((ulong)TestLibrary.Generator.GetUInt64()); - object shortResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsInt16)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(shortResult), value); - - value = Vector256.Create((ulong)TestLibrary.Generator.GetUInt64()); - object intResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsInt32)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(intResult), value); - - value = Vector256.Create((ulong)TestLibrary.Generator.GetUInt64()); - object longResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsInt64)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(longResult), value); - - value = Vector256.Create((ulong)TestLibrary.Generator.GetUInt64()); - object sbyteResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsSByte)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(sbyteResult), value); - - value = Vector256.Create((ulong)TestLibrary.Generator.GetUInt64()); - object floatResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsSingle)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(floatResult), value); - - value = Vector256.Create((ulong)TestLibrary.Generator.GetUInt64()); - object ushortResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsUInt16)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(ushortResult), value); - - value = Vector256.Create((ulong)TestLibrary.Generator.GetUInt64()); - object uintResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsUInt32)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(uintResult), value); - - value = Vector256.Create((ulong)TestLibrary.Generator.GetUInt64()); - object ulongResult = typeof(Vector256) - .GetMethod(nameof(Vector256.AsUInt64)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector256)(ulongResult), value); - } - - private void ValidateResult(Vector256 result, Vector256 value, [CallerMemberName] string method = "") - where T : struct - { - UInt64[] resultElements = new UInt64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - UInt64[] valueElements = new UInt64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, typeof(T), method); - } - - private void ValidateResult(UInt64[] resultElements, UInt64[] valueElements, Type targetType, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.As{targetType.Name}: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AsVector.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AsVector.Byte.cs deleted file mode 100644 index d768bd5e16f2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AsVector.Byte.cs +++ /dev/null @@ -1,162 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsVectorByte() - { - var test = new VectorAs__AsVectorByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsVectorByte - { - private static readonly int LargestVectorSize = 32; - - private static readonly int VectorElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static readonly int NumericsElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector256 value; - - value = Vector256.Create((byte)TestLibrary.Generator.GetByte()); - Vector result = value.AsVector(); - ValidateResult(result, value); - - value = result.AsVector256(); - ValidateResult(value, result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector256 value; - - value = Vector256.Create((byte)TestLibrary.Generator.GetByte()); - object Result = typeof(Vector256) - .GetMethod(nameof(Vector256.AsVector)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector)(Result), value); - - value = (Vector256)typeof(Vector256) - .GetMethods() - .Where((methodInfo) => { - if (methodInfo.Name == nameof(Vector256.AsVector256)) - { - var parameters = methodInfo.GetParameters(); - return (parameters.Length == 1) && - (parameters[0].ParameterType.IsGenericType) && - (parameters[0].ParameterType.GetGenericTypeDefinition() == typeof(Vector<>)); - } - return false; - }) - .Single() - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { Result }); - ValidateResult(value, (Vector)(Result)); - } - - private void ValidateResult(Vector result, Vector256 value, [CallerMemberName] string method = "") - { - Byte[] resultElements = new Byte[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Byte[] valueElements = new Byte[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(Vector256 result, Vector value, [CallerMemberName] string method = "") - { - Byte[] resultElements = new Byte[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Byte[] valueElements = new Byte[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(Byte[] resultElements, Byte[] valueElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements.Length <= valueElements.Length) - { - for (var i = 0; i < resultElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - } - else - { - for (var i = 0; i < valueElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - for (var i = valueElements.Length; i < resultElements.Length; i++) - { - if (resultElements[i] != default) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.AsVector: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AsVector.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AsVector.Double.cs deleted file mode 100644 index a421577a2f04..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AsVector.Double.cs +++ /dev/null @@ -1,162 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsVectorDouble() - { - var test = new VectorAs__AsVectorDouble(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsVectorDouble - { - private static readonly int LargestVectorSize = 32; - - private static readonly int VectorElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static readonly int NumericsElementCount = Unsafe.SizeOf>() / sizeof(Double); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector256 value; - - value = Vector256.Create((double)TestLibrary.Generator.GetDouble()); - Vector result = value.AsVector(); - ValidateResult(result, value); - - value = result.AsVector256(); - ValidateResult(value, result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector256 value; - - value = Vector256.Create((double)TestLibrary.Generator.GetDouble()); - object Result = typeof(Vector256) - .GetMethod(nameof(Vector256.AsVector)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector)(Result), value); - - value = (Vector256)typeof(Vector256) - .GetMethods() - .Where((methodInfo) => { - if (methodInfo.Name == nameof(Vector256.AsVector256)) - { - var parameters = methodInfo.GetParameters(); - return (parameters.Length == 1) && - (parameters[0].ParameterType.IsGenericType) && - (parameters[0].ParameterType.GetGenericTypeDefinition() == typeof(Vector<>)); - } - return false; - }) - .Single() - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { Result }); - ValidateResult(value, (Vector)(Result)); - } - - private void ValidateResult(Vector result, Vector256 value, [CallerMemberName] string method = "") - { - Double[] resultElements = new Double[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Double[] valueElements = new Double[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(Vector256 result, Vector value, [CallerMemberName] string method = "") - { - Double[] resultElements = new Double[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Double[] valueElements = new Double[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(Double[] resultElements, Double[] valueElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements.Length <= valueElements.Length) - { - for (var i = 0; i < resultElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - } - else - { - for (var i = 0; i < valueElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - for (var i = valueElements.Length; i < resultElements.Length; i++) - { - if (resultElements[i] != default) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.AsVector: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AsVector.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AsVector.Int16.cs deleted file mode 100644 index 8391d3f7ec47..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AsVector.Int16.cs +++ /dev/null @@ -1,162 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsVectorInt16() - { - var test = new VectorAs__AsVectorInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsVectorInt16 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int VectorElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static readonly int NumericsElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector256 value; - - value = Vector256.Create((short)TestLibrary.Generator.GetInt16()); - Vector result = value.AsVector(); - ValidateResult(result, value); - - value = result.AsVector256(); - ValidateResult(value, result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector256 value; - - value = Vector256.Create((short)TestLibrary.Generator.GetInt16()); - object Result = typeof(Vector256) - .GetMethod(nameof(Vector256.AsVector)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector)(Result), value); - - value = (Vector256)typeof(Vector256) - .GetMethods() - .Where((methodInfo) => { - if (methodInfo.Name == nameof(Vector256.AsVector256)) - { - var parameters = methodInfo.GetParameters(); - return (parameters.Length == 1) && - (parameters[0].ParameterType.IsGenericType) && - (parameters[0].ParameterType.GetGenericTypeDefinition() == typeof(Vector<>)); - } - return false; - }) - .Single() - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { Result }); - ValidateResult(value, (Vector)(Result)); - } - - private void ValidateResult(Vector result, Vector256 value, [CallerMemberName] string method = "") - { - Int16[] resultElements = new Int16[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Int16[] valueElements = new Int16[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(Vector256 result, Vector value, [CallerMemberName] string method = "") - { - Int16[] resultElements = new Int16[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Int16[] valueElements = new Int16[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(Int16[] resultElements, Int16[] valueElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements.Length <= valueElements.Length) - { - for (var i = 0; i < resultElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - } - else - { - for (var i = 0; i < valueElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - for (var i = valueElements.Length; i < resultElements.Length; i++) - { - if (resultElements[i] != default) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.AsVector: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AsVector.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AsVector.Int32.cs deleted file mode 100644 index 5bb4a7c3450b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AsVector.Int32.cs +++ /dev/null @@ -1,162 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsVectorInt32() - { - var test = new VectorAs__AsVectorInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsVectorInt32 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int VectorElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static readonly int NumericsElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector256 value; - - value = Vector256.Create((int)TestLibrary.Generator.GetInt32()); - Vector result = value.AsVector(); - ValidateResult(result, value); - - value = result.AsVector256(); - ValidateResult(value, result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector256 value; - - value = Vector256.Create((int)TestLibrary.Generator.GetInt32()); - object Result = typeof(Vector256) - .GetMethod(nameof(Vector256.AsVector)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector)(Result), value); - - value = (Vector256)typeof(Vector256) - .GetMethods() - .Where((methodInfo) => { - if (methodInfo.Name == nameof(Vector256.AsVector256)) - { - var parameters = methodInfo.GetParameters(); - return (parameters.Length == 1) && - (parameters[0].ParameterType.IsGenericType) && - (parameters[0].ParameterType.GetGenericTypeDefinition() == typeof(Vector<>)); - } - return false; - }) - .Single() - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { Result }); - ValidateResult(value, (Vector)(Result)); - } - - private void ValidateResult(Vector result, Vector256 value, [CallerMemberName] string method = "") - { - Int32[] resultElements = new Int32[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Int32[] valueElements = new Int32[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(Vector256 result, Vector value, [CallerMemberName] string method = "") - { - Int32[] resultElements = new Int32[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Int32[] valueElements = new Int32[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(Int32[] resultElements, Int32[] valueElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements.Length <= valueElements.Length) - { - for (var i = 0; i < resultElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - } - else - { - for (var i = 0; i < valueElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - for (var i = valueElements.Length; i < resultElements.Length; i++) - { - if (resultElements[i] != default) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.AsVector: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AsVector.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AsVector.Int64.cs deleted file mode 100644 index 70a045dea214..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AsVector.Int64.cs +++ /dev/null @@ -1,162 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsVectorInt64() - { - var test = new VectorAs__AsVectorInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsVectorInt64 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int VectorElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static readonly int NumericsElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector256 value; - - value = Vector256.Create((long)TestLibrary.Generator.GetInt64()); - Vector result = value.AsVector(); - ValidateResult(result, value); - - value = result.AsVector256(); - ValidateResult(value, result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector256 value; - - value = Vector256.Create((long)TestLibrary.Generator.GetInt64()); - object Result = typeof(Vector256) - .GetMethod(nameof(Vector256.AsVector)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector)(Result), value); - - value = (Vector256)typeof(Vector256) - .GetMethods() - .Where((methodInfo) => { - if (methodInfo.Name == nameof(Vector256.AsVector256)) - { - var parameters = methodInfo.GetParameters(); - return (parameters.Length == 1) && - (parameters[0].ParameterType.IsGenericType) && - (parameters[0].ParameterType.GetGenericTypeDefinition() == typeof(Vector<>)); - } - return false; - }) - .Single() - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { Result }); - ValidateResult(value, (Vector)(Result)); - } - - private void ValidateResult(Vector result, Vector256 value, [CallerMemberName] string method = "") - { - Int64[] resultElements = new Int64[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Int64[] valueElements = new Int64[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(Vector256 result, Vector value, [CallerMemberName] string method = "") - { - Int64[] resultElements = new Int64[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Int64[] valueElements = new Int64[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(Int64[] resultElements, Int64[] valueElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements.Length <= valueElements.Length) - { - for (var i = 0; i < resultElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - } - else - { - for (var i = 0; i < valueElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - for (var i = valueElements.Length; i < resultElements.Length; i++) - { - if (resultElements[i] != default) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.AsVector: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AsVector.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AsVector.SByte.cs deleted file mode 100644 index 017a6b0a0244..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AsVector.SByte.cs +++ /dev/null @@ -1,162 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsVectorSByte() - { - var test = new VectorAs__AsVectorSByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsVectorSByte - { - private static readonly int LargestVectorSize = 32; - - private static readonly int VectorElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static readonly int NumericsElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector256 value; - - value = Vector256.Create((sbyte)TestLibrary.Generator.GetSByte()); - Vector result = value.AsVector(); - ValidateResult(result, value); - - value = result.AsVector256(); - ValidateResult(value, result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector256 value; - - value = Vector256.Create((sbyte)TestLibrary.Generator.GetSByte()); - object Result = typeof(Vector256) - .GetMethod(nameof(Vector256.AsVector)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector)(Result), value); - - value = (Vector256)typeof(Vector256) - .GetMethods() - .Where((methodInfo) => { - if (methodInfo.Name == nameof(Vector256.AsVector256)) - { - var parameters = methodInfo.GetParameters(); - return (parameters.Length == 1) && - (parameters[0].ParameterType.IsGenericType) && - (parameters[0].ParameterType.GetGenericTypeDefinition() == typeof(Vector<>)); - } - return false; - }) - .Single() - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { Result }); - ValidateResult(value, (Vector)(Result)); - } - - private void ValidateResult(Vector result, Vector256 value, [CallerMemberName] string method = "") - { - SByte[] resultElements = new SByte[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - SByte[] valueElements = new SByte[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(Vector256 result, Vector value, [CallerMemberName] string method = "") - { - SByte[] resultElements = new SByte[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - SByte[] valueElements = new SByte[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(SByte[] resultElements, SByte[] valueElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements.Length <= valueElements.Length) - { - for (var i = 0; i < resultElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - } - else - { - for (var i = 0; i < valueElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - for (var i = valueElements.Length; i < resultElements.Length; i++) - { - if (resultElements[i] != default) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.AsVector: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AsVector.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AsVector.Single.cs deleted file mode 100644 index 2874cfccf608..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AsVector.Single.cs +++ /dev/null @@ -1,162 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsVectorSingle() - { - var test = new VectorAs__AsVectorSingle(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsVectorSingle - { - private static readonly int LargestVectorSize = 32; - - private static readonly int VectorElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static readonly int NumericsElementCount = Unsafe.SizeOf>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector256 value; - - value = Vector256.Create((float)TestLibrary.Generator.GetSingle()); - Vector result = value.AsVector(); - ValidateResult(result, value); - - value = result.AsVector256(); - ValidateResult(value, result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector256 value; - - value = Vector256.Create((float)TestLibrary.Generator.GetSingle()); - object Result = typeof(Vector256) - .GetMethod(nameof(Vector256.AsVector)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector)(Result), value); - - value = (Vector256)typeof(Vector256) - .GetMethods() - .Where((methodInfo) => { - if (methodInfo.Name == nameof(Vector256.AsVector256)) - { - var parameters = methodInfo.GetParameters(); - return (parameters.Length == 1) && - (parameters[0].ParameterType.IsGenericType) && - (parameters[0].ParameterType.GetGenericTypeDefinition() == typeof(Vector<>)); - } - return false; - }) - .Single() - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { Result }); - ValidateResult(value, (Vector)(Result)); - } - - private void ValidateResult(Vector result, Vector256 value, [CallerMemberName] string method = "") - { - Single[] resultElements = new Single[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Single[] valueElements = new Single[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(Vector256 result, Vector value, [CallerMemberName] string method = "") - { - Single[] resultElements = new Single[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Single[] valueElements = new Single[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(Single[] resultElements, Single[] valueElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements.Length <= valueElements.Length) - { - for (var i = 0; i < resultElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - } - else - { - for (var i = 0; i < valueElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - for (var i = valueElements.Length; i < resultElements.Length; i++) - { - if (resultElements[i] != default) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.AsVector: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AsVector.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AsVector.UInt16.cs deleted file mode 100644 index ede41db60794..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AsVector.UInt16.cs +++ /dev/null @@ -1,162 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsVectorUInt16() - { - var test = new VectorAs__AsVectorUInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsVectorUInt16 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int VectorElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static readonly int NumericsElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector256 value; - - value = Vector256.Create((ushort)TestLibrary.Generator.GetUInt16()); - Vector result = value.AsVector(); - ValidateResult(result, value); - - value = result.AsVector256(); - ValidateResult(value, result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector256 value; - - value = Vector256.Create((ushort)TestLibrary.Generator.GetUInt16()); - object Result = typeof(Vector256) - .GetMethod(nameof(Vector256.AsVector)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector)(Result), value); - - value = (Vector256)typeof(Vector256) - .GetMethods() - .Where((methodInfo) => { - if (methodInfo.Name == nameof(Vector256.AsVector256)) - { - var parameters = methodInfo.GetParameters(); - return (parameters.Length == 1) && - (parameters[0].ParameterType.IsGenericType) && - (parameters[0].ParameterType.GetGenericTypeDefinition() == typeof(Vector<>)); - } - return false; - }) - .Single() - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { Result }); - ValidateResult(value, (Vector)(Result)); - } - - private void ValidateResult(Vector result, Vector256 value, [CallerMemberName] string method = "") - { - UInt16[] resultElements = new UInt16[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - UInt16[] valueElements = new UInt16[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(Vector256 result, Vector value, [CallerMemberName] string method = "") - { - UInt16[] resultElements = new UInt16[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - UInt16[] valueElements = new UInt16[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(UInt16[] resultElements, UInt16[] valueElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements.Length <= valueElements.Length) - { - for (var i = 0; i < resultElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - } - else - { - for (var i = 0; i < valueElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - for (var i = valueElements.Length; i < resultElements.Length; i++) - { - if (resultElements[i] != default) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.AsVector: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AsVector.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AsVector.UInt32.cs deleted file mode 100644 index 4ba2624db3ec..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AsVector.UInt32.cs +++ /dev/null @@ -1,162 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsVectorUInt32() - { - var test = new VectorAs__AsVectorUInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsVectorUInt32 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int VectorElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static readonly int NumericsElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector256 value; - - value = Vector256.Create((uint)TestLibrary.Generator.GetUInt32()); - Vector result = value.AsVector(); - ValidateResult(result, value); - - value = result.AsVector256(); - ValidateResult(value, result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector256 value; - - value = Vector256.Create((uint)TestLibrary.Generator.GetUInt32()); - object Result = typeof(Vector256) - .GetMethod(nameof(Vector256.AsVector)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector)(Result), value); - - value = (Vector256)typeof(Vector256) - .GetMethods() - .Where((methodInfo) => { - if (methodInfo.Name == nameof(Vector256.AsVector256)) - { - var parameters = methodInfo.GetParameters(); - return (parameters.Length == 1) && - (parameters[0].ParameterType.IsGenericType) && - (parameters[0].ParameterType.GetGenericTypeDefinition() == typeof(Vector<>)); - } - return false; - }) - .Single() - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { Result }); - ValidateResult(value, (Vector)(Result)); - } - - private void ValidateResult(Vector result, Vector256 value, [CallerMemberName] string method = "") - { - UInt32[] resultElements = new UInt32[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - UInt32[] valueElements = new UInt32[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(Vector256 result, Vector value, [CallerMemberName] string method = "") - { - UInt32[] resultElements = new UInt32[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - UInt32[] valueElements = new UInt32[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(UInt32[] resultElements, UInt32[] valueElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements.Length <= valueElements.Length) - { - for (var i = 0; i < resultElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - } - else - { - for (var i = 0; i < valueElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - for (var i = valueElements.Length; i < resultElements.Length; i++) - { - if (resultElements[i] != default) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.AsVector: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AsVector.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AsVector.UInt64.cs deleted file mode 100644 index 134282392817..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/AsVector.UInt64.cs +++ /dev/null @@ -1,162 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsVectorUInt64() - { - var test = new VectorAs__AsVectorUInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsVectorUInt64 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int VectorElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static readonly int NumericsElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector256 value; - - value = Vector256.Create((ulong)TestLibrary.Generator.GetUInt64()); - Vector result = value.AsVector(); - ValidateResult(result, value); - - value = result.AsVector256(); - ValidateResult(value, result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector256 value; - - value = Vector256.Create((ulong)TestLibrary.Generator.GetUInt64()); - object Result = typeof(Vector256) - .GetMethod(nameof(Vector256.AsVector)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector)(Result), value); - - value = (Vector256)typeof(Vector256) - .GetMethods() - .Where((methodInfo) => { - if (methodInfo.Name == nameof(Vector256.AsVector256)) - { - var parameters = methodInfo.GetParameters(); - return (parameters.Length == 1) && - (parameters[0].ParameterType.IsGenericType) && - (parameters[0].ParameterType.GetGenericTypeDefinition() == typeof(Vector<>)); - } - return false; - }) - .Single() - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { Result }); - ValidateResult(value, (Vector)(Result)); - } - - private void ValidateResult(Vector result, Vector256 value, [CallerMemberName] string method = "") - { - UInt64[] resultElements = new UInt64[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - UInt64[] valueElements = new UInt64[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(Vector256 result, Vector value, [CallerMemberName] string method = "") - { - UInt64[] resultElements = new UInt64[VectorElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - UInt64[] valueElements = new UInt64[NumericsElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, method); - } - - private void ValidateResult(UInt64[] resultElements, UInt64[] valueElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements.Length <= valueElements.Length) - { - for (var i = 0; i < resultElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - } - else - { - for (var i = 0; i < valueElements.Length; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - for (var i = valueElements.Length; i < resultElements.Length; i++) - { - if (resultElements[i] != default) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.AsVector: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Byte.0.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Byte.0.cs deleted file mode 100644 index af3b1ac8ac6b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/GetAndWithElement.Byte.0.cs +++ /dev/null @@ -1,229 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void GetAndWithElementByte0() - { - var test = new VectorGetAndWithElement__GetAndWithElementByte0(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - // Validates that invalid indices throws ArgumentOutOfRangeException - test.RunArgumentOutOfRangeScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorGetAndWithElement__GetAndWithElementByte0 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 0, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Byte[] values = new Byte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetByte(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Byte result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.GetElement)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Byte)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result, Byte[] values, Byte insertedValue, [CallerMemberName] string method = "") - { - Byte[] resultElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Byte[] result, Byte[] values, Byte insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 0) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[0] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 15, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Byte[] values = new Byte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetByte(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Byte result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.GetElement)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Byte)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result, Byte[] values, Byte insertedValue, [CallerMemberName] string method = "") - { - Byte[] resultElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Byte[] result, Byte[] values, Byte insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 15) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[15] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 7, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Byte[] values = new Byte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetByte(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Byte result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.GetElement)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Byte)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result, Byte[] values, Byte insertedValue, [CallerMemberName] string method = "") - { - Byte[] resultElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Byte[] result, Byte[] values, Byte insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 7) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[7] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(Double); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 0, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Double[] values = new Double[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetDouble(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Double result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.GetElement)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Double)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result, Double[] values, Double insertedValue, [CallerMemberName] string method = "") - { - Double[] resultElements = new Double[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Double[] result, Double[] values, Double insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 0) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[0] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(Double); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 1, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Double[] values = new Double[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetDouble(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Double result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.GetElement)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Double)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result, Double[] values, Double insertedValue, [CallerMemberName] string method = "") - { - Double[] resultElements = new Double[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Double[] result, Double[] values, Double insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 1) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[1] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 0, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int16[] values = new Int16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt16(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Int16 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.GetElement)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Int16)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result, Int16[] values, Int16 insertedValue, [CallerMemberName] string method = "") - { - Int16[] resultElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Int16[] result, Int16[] values, Int16 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 0) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[0] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 3, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int16[] values = new Int16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt16(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Int16 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.GetElement)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Int16)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result, Int16[] values, Int16 insertedValue, [CallerMemberName] string method = "") - { - Int16[] resultElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Int16[] result, Int16[] values, Int16 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 3) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[3] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 7, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int16[] values = new Int16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt16(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Int16 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.GetElement)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Int16)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result, Int16[] values, Int16 insertedValue, [CallerMemberName] string method = "") - { - Int16[] resultElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Int16[] result, Int16[] values, Int16 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 7) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[7] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 0, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int32[] values = new Int32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt32(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Int32 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.GetElement)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Int32)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result, Int32[] values, Int32 insertedValue, [CallerMemberName] string method = "") - { - Int32[] resultElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Int32[] result, Int32[] values, Int32 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 0) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[0] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 1, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int32[] values = new Int32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt32(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Int32 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.GetElement)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Int32)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result, Int32[] values, Int32 insertedValue, [CallerMemberName] string method = "") - { - Int32[] resultElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Int32[] result, Int32[] values, Int32 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 1) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[1] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 3, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int32[] values = new Int32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt32(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Int32 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.GetElement)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Int32)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result, Int32[] values, Int32 insertedValue, [CallerMemberName] string method = "") - { - Int32[] resultElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Int32[] result, Int32[] values, Int32 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 3) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[3] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(Int64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 0, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int64[] values = new Int64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt64(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Int64 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.GetElement)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Int64)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result, Int64[] values, Int64 insertedValue, [CallerMemberName] string method = "") - { - Int64[] resultElements = new Int64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Int64[] result, Int64[] values, Int64 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 0) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[0] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(Int64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 1, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int64[] values = new Int64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt64(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Int64 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.GetElement)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Int64)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result, Int64[] values, Int64 insertedValue, [CallerMemberName] string method = "") - { - Int64[] resultElements = new Int64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Int64[] result, Int64[] values, Int64 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 1) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[1] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 0, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - SByte[] values = new SByte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSByte(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - SByte result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.GetElement)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((SByte)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result, SByte[] values, SByte insertedValue, [CallerMemberName] string method = "") - { - SByte[] resultElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(SByte[] result, SByte[] values, SByte insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 0) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[0] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 15, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - SByte[] values = new SByte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSByte(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - SByte result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.GetElement)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((SByte)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result, SByte[] values, SByte insertedValue, [CallerMemberName] string method = "") - { - SByte[] resultElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(SByte[] result, SByte[] values, SByte insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 15) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[15] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 7, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - SByte[] values = new SByte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSByte(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - SByte result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.GetElement)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((SByte)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result, SByte[] values, SByte insertedValue, [CallerMemberName] string method = "") - { - SByte[] resultElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(SByte[] result, SByte[] values, SByte insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 7) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[7] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 0, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Single[] values = new Single[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSingle(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Single result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.GetElement)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Single)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result, Single[] values, Single insertedValue, [CallerMemberName] string method = "") - { - Single[] resultElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Single[] result, Single[] values, Single insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 0) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[0] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 1, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Single[] values = new Single[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSingle(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Single result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.GetElement)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Single)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result, Single[] values, Single insertedValue, [CallerMemberName] string method = "") - { - Single[] resultElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Single[] result, Single[] values, Single insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 1) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[1] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 3, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Single[] values = new Single[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSingle(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Single result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.GetElement)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Single)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result, Single[] values, Single insertedValue, [CallerMemberName] string method = "") - { - Single[] resultElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Single[] result, Single[] values, Single insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 3) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[3] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 0, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt16[] values = new UInt16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt16(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - UInt16 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.GetElement)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((UInt16)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result, UInt16[] values, UInt16 insertedValue, [CallerMemberName] string method = "") - { - UInt16[] resultElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(UInt16[] result, UInt16[] values, UInt16 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 0) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[0] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 3, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt16[] values = new UInt16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt16(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - UInt16 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.GetElement)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((UInt16)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result, UInt16[] values, UInt16 insertedValue, [CallerMemberName] string method = "") - { - UInt16[] resultElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(UInt16[] result, UInt16[] values, UInt16 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 3) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[3] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 7, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt16[] values = new UInt16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt16(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - UInt16 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.GetElement)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((UInt16)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result, UInt16[] values, UInt16 insertedValue, [CallerMemberName] string method = "") - { - UInt16[] resultElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(UInt16[] result, UInt16[] values, UInt16 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 7) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[7] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 0, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt32[] values = new UInt32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt32(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - UInt32 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.GetElement)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((UInt32)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result, UInt32[] values, UInt32 insertedValue, [CallerMemberName] string method = "") - { - UInt32[] resultElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(UInt32[] result, UInt32[] values, UInt32 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 0) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[0] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 1, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt32[] values = new UInt32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt32(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - UInt32 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.GetElement)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((UInt32)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result, UInt32[] values, UInt32 insertedValue, [CallerMemberName] string method = "") - { - UInt32[] resultElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(UInt32[] result, UInt32[] values, UInt32 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 1) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[1] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 3, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt32[] values = new UInt32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt32(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - UInt32 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.GetElement)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((UInt32)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result, UInt32[] values, UInt32 insertedValue, [CallerMemberName] string method = "") - { - UInt32[] resultElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(UInt32[] result, UInt32[] values, UInt32 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 3) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[3] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(UInt64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 0, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt64[] values = new UInt64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt64(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - UInt64 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.GetElement)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((UInt64)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result, UInt64[] values, UInt64 insertedValue, [CallerMemberName] string method = "") - { - UInt64[] resultElements = new UInt64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(UInt64[] result, UInt64[] values, UInt64 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 0) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[0] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(UInt64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 1, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt64[] values = new UInt64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt64(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - UInt64 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.GetElement)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((UInt64)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256 result, UInt64[] values, UInt64 insertedValue, [CallerMemberName] string method = "") - { - UInt64[] resultElements = new UInt64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(UInt64[] result, UInt64[] values, UInt64 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 1) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[1] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Byte[] values = new Byte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetByte(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]); - - Vector128 lowerResult = value.GetLower(); - Vector128 upperResult = value.GetUpper(); - ValidateGetResult(lowerResult, upperResult, values); - - Vector256 result = value.WithLower(upperResult); - result = result.WithUpper(lowerResult); - ValidateWithResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Byte[] values = new Byte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetByte(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]); - - object lowerResult = typeof(Vector256) - .GetMethod(nameof(Vector256.GetLower)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - object upperResult = typeof(Vector256) - .GetMethod(nameof(Vector256.GetUpper)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - ValidateGetResult((Vector128)(lowerResult), (Vector128)(upperResult), values); - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithLower)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value, upperResult }); - result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithUpper)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { result, lowerResult }); - ValidateWithResult((Vector256)(result), values); - } - - private void ValidateGetResult(Vector128 lowerResult, Vector128 upperResult, Byte[] values, [CallerMemberName] string method = "") - { - Byte[] lowerElements = new Byte[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref lowerElements[0]), lowerResult); - - Byte[] upperElements = new Byte[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref upperElements[0]), upperResult); - - ValidateGetResult(lowerElements, upperElements, values, method); - } - - private void ValidateGetResult(Byte[] lowerResult, Byte[] upperResult, Byte[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (lowerResult[i] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.GetLower(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", lowerResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - - succeeded = true; - - for (int i = ElementCount / 2; i < ElementCount; i++) - { - if (upperResult[i - (ElementCount / 2)] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.GetUpper(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", upperResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private void ValidateWithResult(Vector256 result, Byte[] values, [CallerMemberName] string method = "") - { - Byte[] resultElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, method); - } - - private void ValidateWithResult(Byte[] result, Byte[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (result[i] != values[i + (ElementCount / 2)]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(Double); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Double[] values = new Double[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetDouble(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3]); - - Vector128 lowerResult = value.GetLower(); - Vector128 upperResult = value.GetUpper(); - ValidateGetResult(lowerResult, upperResult, values); - - Vector256 result = value.WithLower(upperResult); - result = result.WithUpper(lowerResult); - ValidateWithResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Double[] values = new Double[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetDouble(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3]); - - object lowerResult = typeof(Vector256) - .GetMethod(nameof(Vector256.GetLower)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - object upperResult = typeof(Vector256) - .GetMethod(nameof(Vector256.GetUpper)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - ValidateGetResult((Vector128)(lowerResult), (Vector128)(upperResult), values); - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithLower)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value, upperResult }); - result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithUpper)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { result, lowerResult }); - ValidateWithResult((Vector256)(result), values); - } - - private void ValidateGetResult(Vector128 lowerResult, Vector128 upperResult, Double[] values, [CallerMemberName] string method = "") - { - Double[] lowerElements = new Double[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref lowerElements[0]), lowerResult); - - Double[] upperElements = new Double[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref upperElements[0]), upperResult); - - ValidateGetResult(lowerElements, upperElements, values, method); - } - - private void ValidateGetResult(Double[] lowerResult, Double[] upperResult, Double[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (lowerResult[i] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.GetLower(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", lowerResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - - succeeded = true; - - for (int i = ElementCount / 2; i < ElementCount; i++) - { - if (upperResult[i - (ElementCount / 2)] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.GetUpper(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", upperResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private void ValidateWithResult(Vector256 result, Double[] values, [CallerMemberName] string method = "") - { - Double[] resultElements = new Double[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, method); - } - - private void ValidateWithResult(Double[] result, Double[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (result[i] != values[i + (ElementCount / 2)]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int16[] values = new Int16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt16(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - Vector128 lowerResult = value.GetLower(); - Vector128 upperResult = value.GetUpper(); - ValidateGetResult(lowerResult, upperResult, values); - - Vector256 result = value.WithLower(upperResult); - result = result.WithUpper(lowerResult); - ValidateWithResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int16[] values = new Int16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt16(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - object lowerResult = typeof(Vector256) - .GetMethod(nameof(Vector256.GetLower)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - object upperResult = typeof(Vector256) - .GetMethod(nameof(Vector256.GetUpper)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - ValidateGetResult((Vector128)(lowerResult), (Vector128)(upperResult), values); - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithLower)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value, upperResult }); - result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithUpper)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { result, lowerResult }); - ValidateWithResult((Vector256)(result), values); - } - - private void ValidateGetResult(Vector128 lowerResult, Vector128 upperResult, Int16[] values, [CallerMemberName] string method = "") - { - Int16[] lowerElements = new Int16[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref lowerElements[0]), lowerResult); - - Int16[] upperElements = new Int16[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref upperElements[0]), upperResult); - - ValidateGetResult(lowerElements, upperElements, values, method); - } - - private void ValidateGetResult(Int16[] lowerResult, Int16[] upperResult, Int16[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (lowerResult[i] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.GetLower(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", lowerResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - - succeeded = true; - - for (int i = ElementCount / 2; i < ElementCount; i++) - { - if (upperResult[i - (ElementCount / 2)] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.GetUpper(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", upperResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private void ValidateWithResult(Vector256 result, Int16[] values, [CallerMemberName] string method = "") - { - Int16[] resultElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, method); - } - - private void ValidateWithResult(Int16[] result, Int16[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (result[i] != values[i + (ElementCount / 2)]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int32[] values = new Int32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt32(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - Vector128 lowerResult = value.GetLower(); - Vector128 upperResult = value.GetUpper(); - ValidateGetResult(lowerResult, upperResult, values); - - Vector256 result = value.WithLower(upperResult); - result = result.WithUpper(lowerResult); - ValidateWithResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int32[] values = new Int32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt32(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - object lowerResult = typeof(Vector256) - .GetMethod(nameof(Vector256.GetLower)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - object upperResult = typeof(Vector256) - .GetMethod(nameof(Vector256.GetUpper)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - ValidateGetResult((Vector128)(lowerResult), (Vector128)(upperResult), values); - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithLower)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value, upperResult }); - result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithUpper)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { result, lowerResult }); - ValidateWithResult((Vector256)(result), values); - } - - private void ValidateGetResult(Vector128 lowerResult, Vector128 upperResult, Int32[] values, [CallerMemberName] string method = "") - { - Int32[] lowerElements = new Int32[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref lowerElements[0]), lowerResult); - - Int32[] upperElements = new Int32[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref upperElements[0]), upperResult); - - ValidateGetResult(lowerElements, upperElements, values, method); - } - - private void ValidateGetResult(Int32[] lowerResult, Int32[] upperResult, Int32[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (lowerResult[i] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.GetLower(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", lowerResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - - succeeded = true; - - for (int i = ElementCount / 2; i < ElementCount; i++) - { - if (upperResult[i - (ElementCount / 2)] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.GetUpper(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", upperResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private void ValidateWithResult(Vector256 result, Int32[] values, [CallerMemberName] string method = "") - { - Int32[] resultElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, method); - } - - private void ValidateWithResult(Int32[] result, Int32[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (result[i] != values[i + (ElementCount / 2)]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(Int64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int64[] values = new Int64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt64(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3]); - - Vector128 lowerResult = value.GetLower(); - Vector128 upperResult = value.GetUpper(); - ValidateGetResult(lowerResult, upperResult, values); - - Vector256 result = value.WithLower(upperResult); - result = result.WithUpper(lowerResult); - ValidateWithResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int64[] values = new Int64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt64(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3]); - - object lowerResult = typeof(Vector256) - .GetMethod(nameof(Vector256.GetLower)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - object upperResult = typeof(Vector256) - .GetMethod(nameof(Vector256.GetUpper)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - ValidateGetResult((Vector128)(lowerResult), (Vector128)(upperResult), values); - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithLower)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value, upperResult }); - result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithUpper)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { result, lowerResult }); - ValidateWithResult((Vector256)(result), values); - } - - private void ValidateGetResult(Vector128 lowerResult, Vector128 upperResult, Int64[] values, [CallerMemberName] string method = "") - { - Int64[] lowerElements = new Int64[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref lowerElements[0]), lowerResult); - - Int64[] upperElements = new Int64[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref upperElements[0]), upperResult); - - ValidateGetResult(lowerElements, upperElements, values, method); - } - - private void ValidateGetResult(Int64[] lowerResult, Int64[] upperResult, Int64[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (lowerResult[i] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.GetLower(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", lowerResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - - succeeded = true; - - for (int i = ElementCount / 2; i < ElementCount; i++) - { - if (upperResult[i - (ElementCount / 2)] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.GetUpper(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", upperResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private void ValidateWithResult(Vector256 result, Int64[] values, [CallerMemberName] string method = "") - { - Int64[] resultElements = new Int64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, method); - } - - private void ValidateWithResult(Int64[] result, Int64[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (result[i] != values[i + (ElementCount / 2)]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - SByte[] values = new SByte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSByte(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]); - - Vector128 lowerResult = value.GetLower(); - Vector128 upperResult = value.GetUpper(); - ValidateGetResult(lowerResult, upperResult, values); - - Vector256 result = value.WithLower(upperResult); - result = result.WithUpper(lowerResult); - ValidateWithResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - SByte[] values = new SByte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSByte(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]); - - object lowerResult = typeof(Vector256) - .GetMethod(nameof(Vector256.GetLower)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - object upperResult = typeof(Vector256) - .GetMethod(nameof(Vector256.GetUpper)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - ValidateGetResult((Vector128)(lowerResult), (Vector128)(upperResult), values); - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithLower)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value, upperResult }); - result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithUpper)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { result, lowerResult }); - ValidateWithResult((Vector256)(result), values); - } - - private void ValidateGetResult(Vector128 lowerResult, Vector128 upperResult, SByte[] values, [CallerMemberName] string method = "") - { - SByte[] lowerElements = new SByte[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref lowerElements[0]), lowerResult); - - SByte[] upperElements = new SByte[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref upperElements[0]), upperResult); - - ValidateGetResult(lowerElements, upperElements, values, method); - } - - private void ValidateGetResult(SByte[] lowerResult, SByte[] upperResult, SByte[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (lowerResult[i] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.GetLower(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", lowerResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - - succeeded = true; - - for (int i = ElementCount / 2; i < ElementCount; i++) - { - if (upperResult[i - (ElementCount / 2)] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.GetUpper(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", upperResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private void ValidateWithResult(Vector256 result, SByte[] values, [CallerMemberName] string method = "") - { - SByte[] resultElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, method); - } - - private void ValidateWithResult(SByte[] result, SByte[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (result[i] != values[i + (ElementCount / 2)]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Single[] values = new Single[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSingle(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - Vector128 lowerResult = value.GetLower(); - Vector128 upperResult = value.GetUpper(); - ValidateGetResult(lowerResult, upperResult, values); - - Vector256 result = value.WithLower(upperResult); - result = result.WithUpper(lowerResult); - ValidateWithResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Single[] values = new Single[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSingle(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - object lowerResult = typeof(Vector256) - .GetMethod(nameof(Vector256.GetLower)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - object upperResult = typeof(Vector256) - .GetMethod(nameof(Vector256.GetUpper)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - ValidateGetResult((Vector128)(lowerResult), (Vector128)(upperResult), values); - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithLower)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value, upperResult }); - result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithUpper)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { result, lowerResult }); - ValidateWithResult((Vector256)(result), values); - } - - private void ValidateGetResult(Vector128 lowerResult, Vector128 upperResult, Single[] values, [CallerMemberName] string method = "") - { - Single[] lowerElements = new Single[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref lowerElements[0]), lowerResult); - - Single[] upperElements = new Single[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref upperElements[0]), upperResult); - - ValidateGetResult(lowerElements, upperElements, values, method); - } - - private void ValidateGetResult(Single[] lowerResult, Single[] upperResult, Single[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (lowerResult[i] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.GetLower(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", lowerResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - - succeeded = true; - - for (int i = ElementCount / 2; i < ElementCount; i++) - { - if (upperResult[i - (ElementCount / 2)] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.GetUpper(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", upperResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private void ValidateWithResult(Vector256 result, Single[] values, [CallerMemberName] string method = "") - { - Single[] resultElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, method); - } - - private void ValidateWithResult(Single[] result, Single[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (result[i] != values[i + (ElementCount / 2)]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt16[] values = new UInt16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt16(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - Vector128 lowerResult = value.GetLower(); - Vector128 upperResult = value.GetUpper(); - ValidateGetResult(lowerResult, upperResult, values); - - Vector256 result = value.WithLower(upperResult); - result = result.WithUpper(lowerResult); - ValidateWithResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt16[] values = new UInt16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt16(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - object lowerResult = typeof(Vector256) - .GetMethod(nameof(Vector256.GetLower)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - object upperResult = typeof(Vector256) - .GetMethod(nameof(Vector256.GetUpper)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - ValidateGetResult((Vector128)(lowerResult), (Vector128)(upperResult), values); - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithLower)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value, upperResult }); - result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithUpper)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { result, lowerResult }); - ValidateWithResult((Vector256)(result), values); - } - - private void ValidateGetResult(Vector128 lowerResult, Vector128 upperResult, UInt16[] values, [CallerMemberName] string method = "") - { - UInt16[] lowerElements = new UInt16[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref lowerElements[0]), lowerResult); - - UInt16[] upperElements = new UInt16[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref upperElements[0]), upperResult); - - ValidateGetResult(lowerElements, upperElements, values, method); - } - - private void ValidateGetResult(UInt16[] lowerResult, UInt16[] upperResult, UInt16[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (lowerResult[i] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.GetLower(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", lowerResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - - succeeded = true; - - for (int i = ElementCount / 2; i < ElementCount; i++) - { - if (upperResult[i - (ElementCount / 2)] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.GetUpper(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", upperResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private void ValidateWithResult(Vector256 result, UInt16[] values, [CallerMemberName] string method = "") - { - UInt16[] resultElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, method); - } - - private void ValidateWithResult(UInt16[] result, UInt16[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (result[i] != values[i + (ElementCount / 2)]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt32[] values = new UInt32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt32(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - Vector128 lowerResult = value.GetLower(); - Vector128 upperResult = value.GetUpper(); - ValidateGetResult(lowerResult, upperResult, values); - - Vector256 result = value.WithLower(upperResult); - result = result.WithUpper(lowerResult); - ValidateWithResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt32[] values = new UInt32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt32(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - object lowerResult = typeof(Vector256) - .GetMethod(nameof(Vector256.GetLower)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - object upperResult = typeof(Vector256) - .GetMethod(nameof(Vector256.GetUpper)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - ValidateGetResult((Vector128)(lowerResult), (Vector128)(upperResult), values); - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithLower)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value, upperResult }); - result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithUpper)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { result, lowerResult }); - ValidateWithResult((Vector256)(result), values); - } - - private void ValidateGetResult(Vector128 lowerResult, Vector128 upperResult, UInt32[] values, [CallerMemberName] string method = "") - { - UInt32[] lowerElements = new UInt32[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref lowerElements[0]), lowerResult); - - UInt32[] upperElements = new UInt32[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref upperElements[0]), upperResult); - - ValidateGetResult(lowerElements, upperElements, values, method); - } - - private void ValidateGetResult(UInt32[] lowerResult, UInt32[] upperResult, UInt32[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (lowerResult[i] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.GetLower(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", lowerResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - - succeeded = true; - - for (int i = ElementCount / 2; i < ElementCount; i++) - { - if (upperResult[i - (ElementCount / 2)] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.GetUpper(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", upperResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private void ValidateWithResult(Vector256 result, UInt32[] values, [CallerMemberName] string method = "") - { - UInt32[] resultElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, method); - } - - private void ValidateWithResult(UInt32[] result, UInt32[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (result[i] != values[i + (ElementCount / 2)]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(UInt64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt64[] values = new UInt64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt64(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3]); - - Vector128 lowerResult = value.GetLower(); - Vector128 upperResult = value.GetUpper(); - ValidateGetResult(lowerResult, upperResult, values); - - Vector256 result = value.WithLower(upperResult); - result = result.WithUpper(lowerResult); - ValidateWithResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt64[] values = new UInt64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt64(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3]); - - object lowerResult = typeof(Vector256) - .GetMethod(nameof(Vector256.GetLower)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - object upperResult = typeof(Vector256) - .GetMethod(nameof(Vector256.GetUpper)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - ValidateGetResult((Vector128)(lowerResult), (Vector128)(upperResult), values); - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithLower)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value, upperResult }); - result = typeof(Vector256) - .GetMethod(nameof(Vector256.WithUpper)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { result, lowerResult }); - ValidateWithResult((Vector256)(result), values); - } - - private void ValidateGetResult(Vector128 lowerResult, Vector128 upperResult, UInt64[] values, [CallerMemberName] string method = "") - { - UInt64[] lowerElements = new UInt64[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref lowerElements[0]), lowerResult); - - UInt64[] upperElements = new UInt64[ElementCount / 2]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref upperElements[0]), upperResult); - - ValidateGetResult(lowerElements, upperElements, values, method); - } - - private void ValidateGetResult(UInt64[] lowerResult, UInt64[] upperResult, UInt64[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (lowerResult[i] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.GetLower(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", lowerResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - - succeeded = true; - - for (int i = ElementCount / 2; i < ElementCount; i++) - { - if (upperResult[i - (ElementCount / 2)] != values[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.GetUpper(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", upperResult)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private void ValidateWithResult(Vector256 result, UInt64[] values, [CallerMemberName] string method = "") - { - UInt64[] resultElements = new UInt64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, method); - } - - private void ValidateWithResult(UInt64[] result, UInt64[] values, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount / 2; i++) - { - if (result[i] != values[i + (ElementCount / 2)]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Byte[] values = new Byte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetByte(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]); - - Byte result = value.ToScalar(); - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Byte[] values = new Byte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetByte(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]); - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.ToScalar)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - - ValidateResult((Byte)(result), values); - } - - private void ValidateResult(Byte result, Byte[] values, [CallerMemberName] string method = "") - { - if (result != values[0]) - { - TestLibrary.TestFramework.LogInformation($"Vector256.ToScalar(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" values: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Double.cs deleted file mode 100644 index 956ecad6226f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Double.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ToScalarDouble() - { - var test = new VectorToScalar__ToScalarDouble(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorToScalar__ToScalarDouble - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Double[] values = new Double[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetDouble(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3]); - - Double result = value.ToScalar(); - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Double[] values = new Double[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetDouble(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3]); - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.ToScalar)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - - ValidateResult((Double)(result), values); - } - - private void ValidateResult(Double result, Double[] values, [CallerMemberName] string method = "") - { - if (result != values[0]) - { - TestLibrary.TestFramework.LogInformation($"Vector256.ToScalar(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" values: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Int16.cs deleted file mode 100644 index f457b6751564..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Int16.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ToScalarInt16() - { - var test = new VectorToScalar__ToScalarInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorToScalar__ToScalarInt16 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int16[] values = new Int16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt16(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - Int16 result = value.ToScalar(); - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int16[] values = new Int16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt16(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.ToScalar)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - - ValidateResult((Int16)(result), values); - } - - private void ValidateResult(Int16 result, Int16[] values, [CallerMemberName] string method = "") - { - if (result != values[0]) - { - TestLibrary.TestFramework.LogInformation($"Vector256.ToScalar(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" values: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Int32.cs deleted file mode 100644 index db347bfd515b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Int32.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ToScalarInt32() - { - var test = new VectorToScalar__ToScalarInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorToScalar__ToScalarInt32 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int32[] values = new Int32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt32(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - Int32 result = value.ToScalar(); - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int32[] values = new Int32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt32(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.ToScalar)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - - ValidateResult((Int32)(result), values); - } - - private void ValidateResult(Int32 result, Int32[] values, [CallerMemberName] string method = "") - { - if (result != values[0]) - { - TestLibrary.TestFramework.LogInformation($"Vector256.ToScalar(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" values: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Int64.cs deleted file mode 100644 index 4478d381e6ad..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Int64.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ToScalarInt64() - { - var test = new VectorToScalar__ToScalarInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorToScalar__ToScalarInt64 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int64[] values = new Int64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt64(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3]); - - Int64 result = value.ToScalar(); - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int64[] values = new Int64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt64(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3]); - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.ToScalar)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - - ValidateResult((Int64)(result), values); - } - - private void ValidateResult(Int64 result, Int64[] values, [CallerMemberName] string method = "") - { - if (result != values[0]) - { - TestLibrary.TestFramework.LogInformation($"Vector256.ToScalar(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" values: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.SByte.cs deleted file mode 100644 index 2f7372e943d4..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.SByte.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ToScalarSByte() - { - var test = new VectorToScalar__ToScalarSByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorToScalar__ToScalarSByte - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - SByte[] values = new SByte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSByte(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]); - - SByte result = value.ToScalar(); - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - SByte[] values = new SByte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSByte(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]); - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.ToScalar)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - - ValidateResult((SByte)(result), values); - } - - private void ValidateResult(SByte result, SByte[] values, [CallerMemberName] string method = "") - { - if (result != values[0]) - { - TestLibrary.TestFramework.LogInformation($"Vector256.ToScalar(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" values: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Single.cs deleted file mode 100644 index 76b1372a3369..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.Single.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ToScalarSingle() - { - var test = new VectorToScalar__ToScalarSingle(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorToScalar__ToScalarSingle - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Single[] values = new Single[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSingle(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - Single result = value.ToScalar(); - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Single[] values = new Single[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSingle(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.ToScalar)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - - ValidateResult((Single)(result), values); - } - - private void ValidateResult(Single result, Single[] values, [CallerMemberName] string method = "") - { - if (result != values[0]) - { - TestLibrary.TestFramework.LogInformation($"Vector256.ToScalar(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" values: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.UInt16.cs deleted file mode 100644 index eea7f3609fc5..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.UInt16.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ToScalarUInt16() - { - var test = new VectorToScalar__ToScalarUInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorToScalar__ToScalarUInt16 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt16[] values = new UInt16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt16(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - UInt16 result = value.ToScalar(); - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt16[] values = new UInt16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt16(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.ToScalar)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - - ValidateResult((UInt16)(result), values); - } - - private void ValidateResult(UInt16 result, UInt16[] values, [CallerMemberName] string method = "") - { - if (result != values[0]) - { - TestLibrary.TestFramework.LogInformation($"Vector256.ToScalar(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" values: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.UInt32.cs deleted file mode 100644 index 76297af86e00..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.UInt32.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ToScalarUInt32() - { - var test = new VectorToScalar__ToScalarUInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorToScalar__ToScalarUInt32 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt32[] values = new UInt32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt32(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - UInt32 result = value.ToScalar(); - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt32[] values = new UInt32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt32(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.ToScalar)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - - ValidateResult((UInt32)(result), values); - } - - private void ValidateResult(UInt32 result, UInt32[] values, [CallerMemberName] string method = "") - { - if (result != values[0]) - { - TestLibrary.TestFramework.LogInformation($"Vector256.ToScalar(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" values: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.UInt64.cs deleted file mode 100644 index 83b48aa4478d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToScalar.UInt64.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ToScalarUInt64() - { - var test = new VectorToScalar__ToScalarUInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorToScalar__ToScalarUInt64 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt64[] values = new UInt64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt64(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3]); - - UInt64 result = value.ToScalar(); - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt64[] values = new UInt64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt64(); - } - - Vector256 value = Vector256.Create(values[0], values[1], values[2], values[3]); - - object result = typeof(Vector256) - .GetMethod(nameof(Vector256.ToScalar)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - - ValidateResult((UInt64)(result), values); - } - - private void ValidateResult(UInt64 result, UInt64[] values, [CallerMemberName] string method = "") - { - if (result != values[0]) - { - TestLibrary.TestFramework.LogInformation($"Vector256.ToScalar(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" values: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToString.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToString.Byte.cs deleted file mode 100644 index d586a37f9419..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToString.Byte.cs +++ /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. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private unsafe static void ToStringByte() - { - int size = Unsafe.SizeOf>() / sizeof(Byte); - Byte[] values = new Byte[size]; - - for (int i = 0; i < size; i++) - { - values[i] = TestLibrary.Generator.GetByte(); - } - - Vector256 vector = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]); - string actual = vector.ToString(); - - string expected = '<' + string.Join(", ", values.Select(x => x.ToString("G", System.Globalization.CultureInfo.InvariantCulture))) + '>'; - - bool succeeded = string.Equals(expected, actual, StringComparison.Ordinal); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256ByteToString: Vector256.ToString() returned an unexpected result."); - TestLibrary.TestFramework.LogInformation($"Expected: {expected}"); - TestLibrary.TestFramework.LogInformation($"Actual: {actual}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToString.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToString.Double.cs deleted file mode 100644 index e348cc8f65c0..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToString.Double.cs +++ /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. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private unsafe static void ToStringDouble() - { - int size = Unsafe.SizeOf>() / sizeof(Double); - Double[] values = new Double[size]; - - for (int i = 0; i < size; i++) - { - values[i] = TestLibrary.Generator.GetDouble(); - } - - Vector256 vector = Vector256.Create(values[0], values[1], values[2], values[3]); - string actual = vector.ToString(); - - string expected = '<' + string.Join(", ", values.Select(x => x.ToString("G", System.Globalization.CultureInfo.InvariantCulture))) + '>'; - - bool succeeded = string.Equals(expected, actual, StringComparison.Ordinal); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256DoubleToString: Vector256.ToString() returned an unexpected result."); - TestLibrary.TestFramework.LogInformation($"Expected: {expected}"); - TestLibrary.TestFramework.LogInformation($"Actual: {actual}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToString.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToString.Int16.cs deleted file mode 100644 index 81cff5f6c18b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToString.Int16.cs +++ /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. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private unsafe static void ToStringInt16() - { - int size = Unsafe.SizeOf>() / sizeof(Int16); - Int16[] values = new Int16[size]; - - for (int i = 0; i < size; i++) - { - values[i] = TestLibrary.Generator.GetInt16(); - } - - Vector256 vector = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - string actual = vector.ToString(); - - string expected = '<' + string.Join(", ", values.Select(x => x.ToString("G", System.Globalization.CultureInfo.InvariantCulture))) + '>'; - - bool succeeded = string.Equals(expected, actual, StringComparison.Ordinal); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256Int16ToString: Vector256.ToString() returned an unexpected result."); - TestLibrary.TestFramework.LogInformation($"Expected: {expected}"); - TestLibrary.TestFramework.LogInformation($"Actual: {actual}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToString.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToString.Int32.cs deleted file mode 100644 index 44023d29a08a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToString.Int32.cs +++ /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. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private unsafe static void ToStringInt32() - { - int size = Unsafe.SizeOf>() / sizeof(Int32); - Int32[] values = new Int32[size]; - - for (int i = 0; i < size; i++) - { - values[i] = TestLibrary.Generator.GetInt32(); - } - - Vector256 vector = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - string actual = vector.ToString(); - - string expected = '<' + string.Join(", ", values.Select(x => x.ToString("G", System.Globalization.CultureInfo.InvariantCulture))) + '>'; - - bool succeeded = string.Equals(expected, actual, StringComparison.Ordinal); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256Int32ToString: Vector256.ToString() returned an unexpected result."); - TestLibrary.TestFramework.LogInformation($"Expected: {expected}"); - TestLibrary.TestFramework.LogInformation($"Actual: {actual}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToString.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToString.Int64.cs deleted file mode 100644 index 228da7136477..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToString.Int64.cs +++ /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. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private unsafe static void ToStringInt64() - { - int size = Unsafe.SizeOf>() / sizeof(Int64); - Int64[] values = new Int64[size]; - - for (int i = 0; i < size; i++) - { - values[i] = TestLibrary.Generator.GetInt64(); - } - - Vector256 vector = Vector256.Create(values[0], values[1], values[2], values[3]); - string actual = vector.ToString(); - - string expected = '<' + string.Join(", ", values.Select(x => x.ToString("G", System.Globalization.CultureInfo.InvariantCulture))) + '>'; - - bool succeeded = string.Equals(expected, actual, StringComparison.Ordinal); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256Int64ToString: Vector256.ToString() returned an unexpected result."); - TestLibrary.TestFramework.LogInformation($"Expected: {expected}"); - TestLibrary.TestFramework.LogInformation($"Actual: {actual}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToString.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToString.SByte.cs deleted file mode 100644 index 5a1cdc25e3fb..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToString.SByte.cs +++ /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. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private unsafe static void ToStringSByte() - { - int size = Unsafe.SizeOf>() / sizeof(SByte); - SByte[] values = new SByte[size]; - - for (int i = 0; i < size; i++) - { - values[i] = TestLibrary.Generator.GetSByte(); - } - - Vector256 vector = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15], values[16], values[17], values[18], values[19], values[20], values[21], values[22], values[23], values[24], values[25], values[26], values[27], values[28], values[29], values[30], values[31]); - string actual = vector.ToString(); - - string expected = '<' + string.Join(", ", values.Select(x => x.ToString("G", System.Globalization.CultureInfo.InvariantCulture))) + '>'; - - bool succeeded = string.Equals(expected, actual, StringComparison.Ordinal); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256SByteToString: Vector256.ToString() returned an unexpected result."); - TestLibrary.TestFramework.LogInformation($"Expected: {expected}"); - TestLibrary.TestFramework.LogInformation($"Actual: {actual}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToString.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToString.Single.cs deleted file mode 100644 index cff279dfd1e6..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToString.Single.cs +++ /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. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private unsafe static void ToStringSingle() - { - int size = Unsafe.SizeOf>() / sizeof(Single); - Single[] values = new Single[size]; - - for (int i = 0; i < size; i++) - { - values[i] = TestLibrary.Generator.GetSingle(); - } - - Vector256 vector = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - string actual = vector.ToString(); - - string expected = '<' + string.Join(", ", values.Select(x => x.ToString("G", System.Globalization.CultureInfo.InvariantCulture))) + '>'; - - bool succeeded = string.Equals(expected, actual, StringComparison.Ordinal); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256SingleToString: Vector256.ToString() returned an unexpected result."); - TestLibrary.TestFramework.LogInformation($"Expected: {expected}"); - TestLibrary.TestFramework.LogInformation($"Actual: {actual}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToString.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToString.UInt16.cs deleted file mode 100644 index 629a26dac114..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToString.UInt16.cs +++ /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. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private unsafe static void ToStringUInt16() - { - int size = Unsafe.SizeOf>() / sizeof(UInt16); - UInt16[] values = new UInt16[size]; - - for (int i = 0; i < size; i++) - { - values[i] = TestLibrary.Generator.GetUInt16(); - } - - Vector256 vector = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]); - string actual = vector.ToString(); - - string expected = '<' + string.Join(", ", values.Select(x => x.ToString("G", System.Globalization.CultureInfo.InvariantCulture))) + '>'; - - bool succeeded = string.Equals(expected, actual, StringComparison.Ordinal); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256UInt16ToString: Vector256.ToString() returned an unexpected result."); - TestLibrary.TestFramework.LogInformation($"Expected: {expected}"); - TestLibrary.TestFramework.LogInformation($"Actual: {actual}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToString.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToString.UInt32.cs deleted file mode 100644 index 5de793c28ac7..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToString.UInt32.cs +++ /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. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private unsafe static void ToStringUInt32() - { - int size = Unsafe.SizeOf>() / sizeof(UInt32); - UInt32[] values = new UInt32[size]; - - for (int i = 0; i < size; i++) - { - values[i] = TestLibrary.Generator.GetUInt32(); - } - - Vector256 vector = Vector256.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - string actual = vector.ToString(); - - string expected = '<' + string.Join(", ", values.Select(x => x.ToString("G", System.Globalization.CultureInfo.InvariantCulture))) + '>'; - - bool succeeded = string.Equals(expected, actual, StringComparison.Ordinal); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256UInt32ToString: Vector256.ToString() returned an unexpected result."); - TestLibrary.TestFramework.LogInformation($"Expected: {expected}"); - TestLibrary.TestFramework.LogInformation($"Actual: {actual}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToString.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToString.UInt64.cs deleted file mode 100644 index cb753105dfac..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/ToString.UInt64.cs +++ /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. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private unsafe static void ToStringUInt64() - { - int size = Unsafe.SizeOf>() / sizeof(UInt64); - UInt64[] values = new UInt64[size]; - - for (int i = 0; i < size; i++) - { - values[i] = TestLibrary.Generator.GetUInt64(); - } - - Vector256 vector = Vector256.Create(values[0], values[1], values[2], values[3]); - string actual = vector.ToString(); - - string expected = '<' + string.Join(", ", values.Select(x => x.ToString("G", System.Globalization.CultureInfo.InvariantCulture))) + '>'; - - bool succeeded = string.Equals(expected, actual, StringComparison.Ordinal); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256UInt64ToString: Vector256.ToString() returned an unexpected result."); - TestLibrary.TestFramework.LogInformation($"Expected: {expected}"); - TestLibrary.TestFramework.LogInformation($"Actual: {actual}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/Zero.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/Zero.Byte.cs deleted file mode 100644 index c7e6eb396f60..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/Zero.Byte.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ZeroByte() - { - var test = new VectorZero__ZeroByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorZero__ZeroByte - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector256 result = Vector256.Zero; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector256) - .GetProperty(nameof(Vector256.Zero), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector256)(result)); - } - - private void ValidateResult(Vector256 result, [CallerMemberName] string method = "") - { - Byte[] resultElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private void ValidateResult(Byte[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Zero(Byte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/Zero.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/Zero.Double.cs deleted file mode 100644 index b72c208813ff..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/Zero.Double.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ZeroDouble() - { - var test = new VectorZero__ZeroDouble(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorZero__ZeroDouble - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector256 result = Vector256.Zero; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector256) - .GetProperty(nameof(Vector256.Zero), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector256)(result)); - } - - private void ValidateResult(Vector256 result, [CallerMemberName] string method = "") - { - Double[] resultElements = new Double[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private void ValidateResult(Double[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Zero(Double): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/Zero.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/Zero.Int16.cs deleted file mode 100644 index 02ed3b3497b5..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/Zero.Int16.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ZeroInt16() - { - var test = new VectorZero__ZeroInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorZero__ZeroInt16 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector256 result = Vector256.Zero; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector256) - .GetProperty(nameof(Vector256.Zero), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector256)(result)); - } - - private void ValidateResult(Vector256 result, [CallerMemberName] string method = "") - { - Int16[] resultElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private void ValidateResult(Int16[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Zero(Int16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/Zero.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/Zero.Int32.cs deleted file mode 100644 index 9a90c7bc2ca7..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/Zero.Int32.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ZeroInt32() - { - var test = new VectorZero__ZeroInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorZero__ZeroInt32 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector256 result = Vector256.Zero; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector256) - .GetProperty(nameof(Vector256.Zero), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector256)(result)); - } - - private void ValidateResult(Vector256 result, [CallerMemberName] string method = "") - { - Int32[] resultElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private void ValidateResult(Int32[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Zero(Int32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/Zero.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/Zero.Int64.cs deleted file mode 100644 index 17766dbf0b5f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/Zero.Int64.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ZeroInt64() - { - var test = new VectorZero__ZeroInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorZero__ZeroInt64 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector256 result = Vector256.Zero; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector256) - .GetProperty(nameof(Vector256.Zero), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector256)(result)); - } - - private void ValidateResult(Vector256 result, [CallerMemberName] string method = "") - { - Int64[] resultElements = new Int64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private void ValidateResult(Int64[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Zero(Int64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/Zero.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/Zero.SByte.cs deleted file mode 100644 index 0d4d385e7ba1..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/Zero.SByte.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ZeroSByte() - { - var test = new VectorZero__ZeroSByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorZero__ZeroSByte - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector256 result = Vector256.Zero; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector256) - .GetProperty(nameof(Vector256.Zero), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector256)(result)); - } - - private void ValidateResult(Vector256 result, [CallerMemberName] string method = "") - { - SByte[] resultElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private void ValidateResult(SByte[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Zero(SByte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/Zero.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/Zero.Single.cs deleted file mode 100644 index 8a0f9877a890..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/Zero.Single.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ZeroSingle() - { - var test = new VectorZero__ZeroSingle(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorZero__ZeroSingle - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector256 result = Vector256.Zero; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector256) - .GetProperty(nameof(Vector256.Zero), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector256)(result)); - } - - private void ValidateResult(Vector256 result, [CallerMemberName] string method = "") - { - Single[] resultElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private void ValidateResult(Single[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Zero(Single): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/Zero.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/Zero.UInt16.cs deleted file mode 100644 index db2d0b2280d8..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/Zero.UInt16.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ZeroUInt16() - { - var test = new VectorZero__ZeroUInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorZero__ZeroUInt16 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector256 result = Vector256.Zero; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector256) - .GetProperty(nameof(Vector256.Zero), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector256)(result)); - } - - private void ValidateResult(Vector256 result, [CallerMemberName] string method = "") - { - UInt16[] resultElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private void ValidateResult(UInt16[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Zero(UInt16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/Zero.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/Zero.UInt32.cs deleted file mode 100644 index a00041ac1b65..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/Zero.UInt32.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ZeroUInt32() - { - var test = new VectorZero__ZeroUInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorZero__ZeroUInt32 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector256 result = Vector256.Zero; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector256) - .GetProperty(nameof(Vector256.Zero), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector256)(result)); - } - - private void ValidateResult(Vector256 result, [CallerMemberName] string method = "") - { - UInt32[] resultElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private void ValidateResult(UInt32[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Zero(UInt32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/Zero.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/Zero.UInt64.cs deleted file mode 100644 index 2b4c8f99e45f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector256_1/Zero.UInt64.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ZeroUInt64() - { - var test = new VectorZero__ZeroUInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorZero__ZeroUInt64 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector256 result = Vector256.Zero; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector256) - .GetProperty(nameof(Vector256.Zero), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector256)(result)); - } - - private void ValidateResult(Vector256 result, [CallerMemberName] string method = "") - { - UInt64[] resultElements = new UInt64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private void ValidateResult(UInt64[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector256.Zero(UInt64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/Create.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/Create.Byte.cs deleted file mode 100644 index 4d3c7298cf73..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/Create.Byte.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateByte() - { - var test = new VectorCreate__CreateByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateByte - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Byte value = TestLibrary.Generator.GetByte(); - Vector64 result = Vector64.Create(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Byte value = TestLibrary.Generator.GetByte(); - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.Create), new Type[] { typeof(Byte) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector64)(result), value); - } - - private void ValidateResult(Vector64 result, Byte expectedValue, [CallerMemberName] string method = "") - { - Byte[] resultElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Byte[] resultElements, Byte expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != expectedValue) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.Create(Byte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/Create.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/Create.Double.cs deleted file mode 100644 index ff17af824ac7..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/Create.Double.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateDouble() - { - var test = new VectorCreate__CreateDouble(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateDouble - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Double value = TestLibrary.Generator.GetDouble(); - Vector64 result = Vector64.Create(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Double value = TestLibrary.Generator.GetDouble(); - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.Create), new Type[] { typeof(Double) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector64)(result), value); - } - - private void ValidateResult(Vector64 result, Double expectedValue, [CallerMemberName] string method = "") - { - Double[] resultElements = new Double[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Double[] resultElements, Double expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != expectedValue) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.Create(Double): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/Create.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/Create.Int16.cs deleted file mode 100644 index 15a9a860748f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/Create.Int16.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateInt16() - { - var test = new VectorCreate__CreateInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateInt16 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int16 value = TestLibrary.Generator.GetInt16(); - Vector64 result = Vector64.Create(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int16 value = TestLibrary.Generator.GetInt16(); - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.Create), new Type[] { typeof(Int16) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector64)(result), value); - } - - private void ValidateResult(Vector64 result, Int16 expectedValue, [CallerMemberName] string method = "") - { - Int16[] resultElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Int16[] resultElements, Int16 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != expectedValue) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.Create(Int16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/Create.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/Create.Int32.cs deleted file mode 100644 index fb210851b62d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/Create.Int32.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateInt32() - { - var test = new VectorCreate__CreateInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateInt32 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int32 value = TestLibrary.Generator.GetInt32(); - Vector64 result = Vector64.Create(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int32 value = TestLibrary.Generator.GetInt32(); - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.Create), new Type[] { typeof(Int32) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector64)(result), value); - } - - private void ValidateResult(Vector64 result, Int32 expectedValue, [CallerMemberName] string method = "") - { - Int32[] resultElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Int32[] resultElements, Int32 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != expectedValue) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.Create(Int32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/Create.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/Create.Int64.cs deleted file mode 100644 index 31a677c915ef..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/Create.Int64.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateInt64() - { - var test = new VectorCreate__CreateInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateInt64 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int64 value = TestLibrary.Generator.GetInt64(); - Vector64 result = Vector64.Create(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int64 value = TestLibrary.Generator.GetInt64(); - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.Create), new Type[] { typeof(Int64) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector64)(result), value); - } - - private void ValidateResult(Vector64 result, Int64 expectedValue, [CallerMemberName] string method = "") - { - Int64[] resultElements = new Int64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Int64[] resultElements, Int64 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != expectedValue) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.Create(Int64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/Create.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/Create.SByte.cs deleted file mode 100644 index 32c28f58f436..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/Create.SByte.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateSByte() - { - var test = new VectorCreate__CreateSByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateSByte - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - SByte value = TestLibrary.Generator.GetSByte(); - Vector64 result = Vector64.Create(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - SByte value = TestLibrary.Generator.GetSByte(); - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.Create), new Type[] { typeof(SByte) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector64)(result), value); - } - - private void ValidateResult(Vector64 result, SByte expectedValue, [CallerMemberName] string method = "") - { - SByte[] resultElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(SByte[] resultElements, SByte expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != expectedValue) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.Create(SByte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/Create.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/Create.Single.cs deleted file mode 100644 index 66d6730eabc7..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/Create.Single.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateSingle() - { - var test = new VectorCreate__CreateSingle(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateSingle - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Single value = TestLibrary.Generator.GetSingle(); - Vector64 result = Vector64.Create(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Single value = TestLibrary.Generator.GetSingle(); - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.Create), new Type[] { typeof(Single) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector64)(result), value); - } - - private void ValidateResult(Vector64 result, Single expectedValue, [CallerMemberName] string method = "") - { - Single[] resultElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Single[] resultElements, Single expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != expectedValue) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.Create(Single): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/Create.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/Create.UInt16.cs deleted file mode 100644 index 5cb70e967f13..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/Create.UInt16.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateUInt16() - { - var test = new VectorCreate__CreateUInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateUInt16 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt16 value = TestLibrary.Generator.GetUInt16(); - Vector64 result = Vector64.Create(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt16 value = TestLibrary.Generator.GetUInt16(); - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.Create), new Type[] { typeof(UInt16) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector64)(result), value); - } - - private void ValidateResult(Vector64 result, UInt16 expectedValue, [CallerMemberName] string method = "") - { - UInt16[] resultElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(UInt16[] resultElements, UInt16 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != expectedValue) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.Create(UInt16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/Create.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/Create.UInt32.cs deleted file mode 100644 index bd3b584da3e5..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/Create.UInt32.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateUInt32() - { - var test = new VectorCreate__CreateUInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateUInt32 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt32 value = TestLibrary.Generator.GetUInt32(); - Vector64 result = Vector64.Create(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt32 value = TestLibrary.Generator.GetUInt32(); - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.Create), new Type[] { typeof(UInt32) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector64)(result), value); - } - - private void ValidateResult(Vector64 result, UInt32 expectedValue, [CallerMemberName] string method = "") - { - UInt32[] resultElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(UInt32[] resultElements, UInt32 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != expectedValue) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.Create(UInt32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/Create.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/Create.UInt64.cs deleted file mode 100644 index ea2a12d37fe2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/Create.UInt64.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateUInt64() - { - var test = new VectorCreate__CreateUInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateUInt64 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt64 value = TestLibrary.Generator.GetUInt64(); - Vector64 result = Vector64.Create(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt64 value = TestLibrary.Generator.GetUInt64(); - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.Create), new Type[] { typeof(UInt64) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector64)(result), value); - } - - private void ValidateResult(Vector64 result, UInt64 expectedValue, [CallerMemberName] string method = "") - { - UInt64[] resultElements = new UInt64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(UInt64[] resultElements, UInt64 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != expectedValue) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.Create(UInt64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateElement.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateElement.Byte.cs deleted file mode 100644 index 4d8ae817139e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateElement.Byte.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateElementByte() - { - var test = new VectorCreate__CreateElementByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateElementByte - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Byte[] values = new Byte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetByte(); - } - - Vector64 result = Vector64.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Type[] operandTypes = new Type[ElementCount]; - Byte[] values = new Byte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - operandTypes[i] = typeof(Byte); - values[i] = TestLibrary.Generator.GetByte(); - } - - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.Create), operandTypes) - .Invoke(null, new object[] { values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7] }); - - ValidateResult((Vector64)(result), values); - } - - private void ValidateResult(Vector64 result, Byte[] expectedValues, [CallerMemberName] string method = "") - { - Byte[] resultElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValues, method); - } - - private void ValidateResult(Byte[] resultElements, Byte[] expectedValues, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != expectedValues[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.Create(Byte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", expectedValues)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateElement.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateElement.Int16.cs deleted file mode 100644 index 6ecb7f0fa78a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateElement.Int16.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateElementInt16() - { - var test = new VectorCreate__CreateElementInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateElementInt16 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int16[] values = new Int16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt16(); - } - - Vector64 result = Vector64.Create(values[0], values[1], values[2], values[3]); - - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Type[] operandTypes = new Type[ElementCount]; - Int16[] values = new Int16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - operandTypes[i] = typeof(Int16); - values[i] = TestLibrary.Generator.GetInt16(); - } - - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.Create), operandTypes) - .Invoke(null, new object[] { values[0], values[1], values[2], values[3] }); - - ValidateResult((Vector64)(result), values); - } - - private void ValidateResult(Vector64 result, Int16[] expectedValues, [CallerMemberName] string method = "") - { - Int16[] resultElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValues, method); - } - - private void ValidateResult(Int16[] resultElements, Int16[] expectedValues, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != expectedValues[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.Create(Int16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", expectedValues)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateElement.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateElement.Int32.cs deleted file mode 100644 index 709d278c77d0..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateElement.Int32.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateElementInt32() - { - var test = new VectorCreate__CreateElementInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateElementInt32 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int32[] values = new Int32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt32(); - } - - Vector64 result = Vector64.Create(values[0], values[1]); - - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Type[] operandTypes = new Type[ElementCount]; - Int32[] values = new Int32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - operandTypes[i] = typeof(Int32); - values[i] = TestLibrary.Generator.GetInt32(); - } - - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.Create), operandTypes) - .Invoke(null, new object[] { values[0], values[1] }); - - ValidateResult((Vector64)(result), values); - } - - private void ValidateResult(Vector64 result, Int32[] expectedValues, [CallerMemberName] string method = "") - { - Int32[] resultElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValues, method); - } - - private void ValidateResult(Int32[] resultElements, Int32[] expectedValues, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != expectedValues[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.Create(Int32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", expectedValues)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateElement.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateElement.SByte.cs deleted file mode 100644 index ab43b16c0cbb..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateElement.SByte.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateElementSByte() - { - var test = new VectorCreate__CreateElementSByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateElementSByte - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - SByte[] values = new SByte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSByte(); - } - - Vector64 result = Vector64.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Type[] operandTypes = new Type[ElementCount]; - SByte[] values = new SByte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - operandTypes[i] = typeof(SByte); - values[i] = TestLibrary.Generator.GetSByte(); - } - - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.Create), operandTypes) - .Invoke(null, new object[] { values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7] }); - - ValidateResult((Vector64)(result), values); - } - - private void ValidateResult(Vector64 result, SByte[] expectedValues, [CallerMemberName] string method = "") - { - SByte[] resultElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValues, method); - } - - private void ValidateResult(SByte[] resultElements, SByte[] expectedValues, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != expectedValues[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.Create(SByte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", expectedValues)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateElement.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateElement.Single.cs deleted file mode 100644 index e499386396ef..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateElement.Single.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateElementSingle() - { - var test = new VectorCreate__CreateElementSingle(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateElementSingle - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Single[] values = new Single[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSingle(); - } - - Vector64 result = Vector64.Create(values[0], values[1]); - - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Type[] operandTypes = new Type[ElementCount]; - Single[] values = new Single[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - operandTypes[i] = typeof(Single); - values[i] = TestLibrary.Generator.GetSingle(); - } - - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.Create), operandTypes) - .Invoke(null, new object[] { values[0], values[1] }); - - ValidateResult((Vector64)(result), values); - } - - private void ValidateResult(Vector64 result, Single[] expectedValues, [CallerMemberName] string method = "") - { - Single[] resultElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValues, method); - } - - private void ValidateResult(Single[] resultElements, Single[] expectedValues, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != expectedValues[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.Create(Single): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", expectedValues)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateElement.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateElement.UInt16.cs deleted file mode 100644 index 824b9ef3af01..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateElement.UInt16.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateElementUInt16() - { - var test = new VectorCreate__CreateElementUInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateElementUInt16 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt16[] values = new UInt16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt16(); - } - - Vector64 result = Vector64.Create(values[0], values[1], values[2], values[3]); - - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Type[] operandTypes = new Type[ElementCount]; - UInt16[] values = new UInt16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - operandTypes[i] = typeof(UInt16); - values[i] = TestLibrary.Generator.GetUInt16(); - } - - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.Create), operandTypes) - .Invoke(null, new object[] { values[0], values[1], values[2], values[3] }); - - ValidateResult((Vector64)(result), values); - } - - private void ValidateResult(Vector64 result, UInt16[] expectedValues, [CallerMemberName] string method = "") - { - UInt16[] resultElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValues, method); - } - - private void ValidateResult(UInt16[] resultElements, UInt16[] expectedValues, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != expectedValues[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.Create(UInt16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", expectedValues)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateElement.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateElement.UInt32.cs deleted file mode 100644 index 0c70328d8a68..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateElement.UInt32.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateElementUInt32() - { - var test = new VectorCreate__CreateElementUInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateElementUInt32 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt32[] values = new UInt32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt32(); - } - - Vector64 result = Vector64.Create(values[0], values[1]); - - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Type[] operandTypes = new Type[ElementCount]; - UInt32[] values = new UInt32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - operandTypes[i] = typeof(UInt32); - values[i] = TestLibrary.Generator.GetUInt32(); - } - - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.Create), operandTypes) - .Invoke(null, new object[] { values[0], values[1] }); - - ValidateResult((Vector64)(result), values); - } - - private void ValidateResult(Vector64 result, UInt32[] expectedValues, [CallerMemberName] string method = "") - { - UInt32[] resultElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValues, method); - } - - private void ValidateResult(UInt32[] resultElements, UInt32[] expectedValues, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != expectedValues[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.Create(UInt32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", expectedValues)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalar.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalar.Byte.cs deleted file mode 100644 index 36a8c8ef046a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalar.Byte.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarByte() - { - var test = new VectorCreate__CreateScalarByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarByte - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Byte value = TestLibrary.Generator.GetByte(); - Vector64 result = Vector64.CreateScalar(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Byte value = TestLibrary.Generator.GetByte(); - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.CreateScalar), new Type[] { typeof(Byte) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector64)(result), value); - } - - private void ValidateResult(Vector64 result, Byte expectedValue, [CallerMemberName] string method = "") - { - Byte[] resultElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Byte[] resultElements, Byte expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.CreateScalar(Byte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalar.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalar.Int16.cs deleted file mode 100644 index 5076cd40415c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalar.Int16.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarInt16() - { - var test = new VectorCreate__CreateScalarInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarInt16 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int16 value = TestLibrary.Generator.GetInt16(); - Vector64 result = Vector64.CreateScalar(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int16 value = TestLibrary.Generator.GetInt16(); - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.CreateScalar), new Type[] { typeof(Int16) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector64)(result), value); - } - - private void ValidateResult(Vector64 result, Int16 expectedValue, [CallerMemberName] string method = "") - { - Int16[] resultElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Int16[] resultElements, Int16 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.CreateScalar(Int16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalar.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalar.Int32.cs deleted file mode 100644 index 6fbe11792128..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalar.Int32.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarInt32() - { - var test = new VectorCreate__CreateScalarInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarInt32 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int32 value = TestLibrary.Generator.GetInt32(); - Vector64 result = Vector64.CreateScalar(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int32 value = TestLibrary.Generator.GetInt32(); - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.CreateScalar), new Type[] { typeof(Int32) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector64)(result), value); - } - - private void ValidateResult(Vector64 result, Int32 expectedValue, [CallerMemberName] string method = "") - { - Int32[] resultElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Int32[] resultElements, Int32 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.CreateScalar(Int32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalar.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalar.SByte.cs deleted file mode 100644 index fbd0fae93824..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalar.SByte.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarSByte() - { - var test = new VectorCreate__CreateScalarSByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarSByte - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - SByte value = TestLibrary.Generator.GetSByte(); - Vector64 result = Vector64.CreateScalar(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - SByte value = TestLibrary.Generator.GetSByte(); - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.CreateScalar), new Type[] { typeof(SByte) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector64)(result), value); - } - - private void ValidateResult(Vector64 result, SByte expectedValue, [CallerMemberName] string method = "") - { - SByte[] resultElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(SByte[] resultElements, SByte expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.CreateScalar(SByte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalar.Single.cs deleted file mode 100644 index 568ede828f38..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalar.Single.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarSingle() - { - var test = new VectorCreate__CreateScalarSingle(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarSingle - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Single value = TestLibrary.Generator.GetSingle(); - Vector64 result = Vector64.CreateScalar(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Single value = TestLibrary.Generator.GetSingle(); - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.CreateScalar), new Type[] { typeof(Single) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector64)(result), value); - } - - private void ValidateResult(Vector64 result, Single expectedValue, [CallerMemberName] string method = "") - { - Single[] resultElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Single[] resultElements, Single expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.CreateScalar(Single): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalar.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalar.UInt16.cs deleted file mode 100644 index 7ad7417acd97..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalar.UInt16.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUInt16() - { - var test = new VectorCreate__CreateScalarUInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUInt16 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt16 value = TestLibrary.Generator.GetUInt16(); - Vector64 result = Vector64.CreateScalar(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt16 value = TestLibrary.Generator.GetUInt16(); - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.CreateScalar), new Type[] { typeof(UInt16) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector64)(result), value); - } - - private void ValidateResult(Vector64 result, UInt16 expectedValue, [CallerMemberName] string method = "") - { - UInt16[] resultElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(UInt16[] resultElements, UInt16 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.CreateScalar(UInt16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalar.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalar.UInt32.cs deleted file mode 100644 index e42c4959c40b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalar.UInt32.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUInt32() - { - var test = new VectorCreate__CreateScalarUInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUInt32 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt32 value = TestLibrary.Generator.GetUInt32(); - Vector64 result = Vector64.CreateScalar(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt32 value = TestLibrary.Generator.GetUInt32(); - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.CreateScalar), new Type[] { typeof(UInt32) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector64)(result), value); - } - - private void ValidateResult(Vector64 result, UInt32 expectedValue, [CallerMemberName] string method = "") - { - UInt32[] resultElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(UInt32[] resultElements, UInt32 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.CreateScalar(UInt32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalarUnsafe.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalarUnsafe.Byte.cs deleted file mode 100644 index 29cf288e8a4d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalarUnsafe.Byte.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUnsafeByte() - { - var test = new VectorCreate__CreateScalarUnsafeByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUnsafeByte - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Byte value = TestLibrary.Generator.GetByte(); - Vector64 result = Vector64.CreateScalarUnsafe(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Byte value = TestLibrary.Generator.GetByte(); - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.CreateScalarUnsafe), new Type[] { typeof(Byte) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector64)(result), value); - } - - private void ValidateResult(Vector64 result, Byte expectedValue, [CallerMemberName] string method = "") - { - Byte[] resultElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Byte[] resultElements, Byte expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (false /* value is uninitialized */) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.CreateScalarUnsafe(Byte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalarUnsafe.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalarUnsafe.Int16.cs deleted file mode 100644 index 6b0f75918a7b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalarUnsafe.Int16.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUnsafeInt16() - { - var test = new VectorCreate__CreateScalarUnsafeInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUnsafeInt16 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int16 value = TestLibrary.Generator.GetInt16(); - Vector64 result = Vector64.CreateScalarUnsafe(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int16 value = TestLibrary.Generator.GetInt16(); - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.CreateScalarUnsafe), new Type[] { typeof(Int16) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector64)(result), value); - } - - private void ValidateResult(Vector64 result, Int16 expectedValue, [CallerMemberName] string method = "") - { - Int16[] resultElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Int16[] resultElements, Int16 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (false /* value is uninitialized */) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.CreateScalarUnsafe(Int16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalarUnsafe.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalarUnsafe.Int32.cs deleted file mode 100644 index 1a519eb10e80..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalarUnsafe.Int32.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUnsafeInt32() - { - var test = new VectorCreate__CreateScalarUnsafeInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUnsafeInt32 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int32 value = TestLibrary.Generator.GetInt32(); - Vector64 result = Vector64.CreateScalarUnsafe(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int32 value = TestLibrary.Generator.GetInt32(); - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.CreateScalarUnsafe), new Type[] { typeof(Int32) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector64)(result), value); - } - - private void ValidateResult(Vector64 result, Int32 expectedValue, [CallerMemberName] string method = "") - { - Int32[] resultElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Int32[] resultElements, Int32 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (false /* value is uninitialized */) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.CreateScalarUnsafe(Int32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalarUnsafe.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalarUnsafe.SByte.cs deleted file mode 100644 index 97331288a453..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalarUnsafe.SByte.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUnsafeSByte() - { - var test = new VectorCreate__CreateScalarUnsafeSByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUnsafeSByte - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - SByte value = TestLibrary.Generator.GetSByte(); - Vector64 result = Vector64.CreateScalarUnsafe(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - SByte value = TestLibrary.Generator.GetSByte(); - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.CreateScalarUnsafe), new Type[] { typeof(SByte) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector64)(result), value); - } - - private void ValidateResult(Vector64 result, SByte expectedValue, [CallerMemberName] string method = "") - { - SByte[] resultElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(SByte[] resultElements, SByte expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (false /* value is uninitialized */) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.CreateScalarUnsafe(SByte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalarUnsafe.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalarUnsafe.Single.cs deleted file mode 100644 index c2ecc66ee6d0..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalarUnsafe.Single.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUnsafeSingle() - { - var test = new VectorCreate__CreateScalarUnsafeSingle(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUnsafeSingle - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Single value = TestLibrary.Generator.GetSingle(); - Vector64 result = Vector64.CreateScalarUnsafe(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Single value = TestLibrary.Generator.GetSingle(); - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.CreateScalarUnsafe), new Type[] { typeof(Single) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector64)(result), value); - } - - private void ValidateResult(Vector64 result, Single expectedValue, [CallerMemberName] string method = "") - { - Single[] resultElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(Single[] resultElements, Single expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (false /* value is uninitialized */) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.CreateScalarUnsafe(Single): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalarUnsafe.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalarUnsafe.UInt16.cs deleted file mode 100644 index 53df941a244f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalarUnsafe.UInt16.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUnsafeUInt16() - { - var test = new VectorCreate__CreateScalarUnsafeUInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUnsafeUInt16 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt16 value = TestLibrary.Generator.GetUInt16(); - Vector64 result = Vector64.CreateScalarUnsafe(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt16 value = TestLibrary.Generator.GetUInt16(); - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.CreateScalarUnsafe), new Type[] { typeof(UInt16) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector64)(result), value); - } - - private void ValidateResult(Vector64 result, UInt16 expectedValue, [CallerMemberName] string method = "") - { - UInt16[] resultElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(UInt16[] resultElements, UInt16 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (false /* value is uninitialized */) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.CreateScalarUnsafe(UInt16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalarUnsafe.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalarUnsafe.UInt32.cs deleted file mode 100644 index 1ae6773460d0..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64/CreateScalarUnsafe.UInt32.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void CreateScalarUnsafeUInt32() - { - var test = new VectorCreate__CreateScalarUnsafeUInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorCreate__CreateScalarUnsafeUInt32 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt32 value = TestLibrary.Generator.GetUInt32(); - Vector64 result = Vector64.CreateScalarUnsafe(value); - - ValidateResult(result, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt32 value = TestLibrary.Generator.GetUInt32(); - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.CreateScalarUnsafe), new Type[] { typeof(UInt32) }) - .Invoke(null, new object[] { value }); - - ValidateResult((Vector64)(result), value); - } - - private void ValidateResult(Vector64 result, UInt32 expectedValue, [CallerMemberName] string method = "") - { - UInt32[] resultElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, expectedValue, method); - } - - private void ValidateResult(UInt32[] resultElements, UInt32 expectedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (resultElements[0] != expectedValue) - { - succeeded = false; - } - else - { - for (var i = 1; i < ElementCount; i++) - { - if (false /* value is uninitialized */) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.CreateScalarUnsafe(UInt32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: {expectedValue}"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/AllBitsSet.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/AllBitsSet.Byte.cs deleted file mode 100644 index f42603a28333..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/AllBitsSet.Byte.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AllBitsSetByte() - { - var test = new VectorAllBitsSet__AllBitsSetByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAllBitsSet__AllBitsSetByte - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector64 result = Vector64.AllBitsSet; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector64) - .GetProperty(nameof(Vector64.AllBitsSet), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector64)(result)); - } - - private void ValidateResult(Vector64 result, [CallerMemberName] string method = "") - { - Byte[] resultElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private unsafe void ValidateResult(Byte[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - for (var i = 0; i < ElementCount; i++) - { - if (!HasAllBitsSet(resultElements[i])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.AllBitsSet(Byte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private unsafe bool HasAllBitsSet(Byte value) - { - for (int i = 0; i < sizeof(Byte); i++) - { - if (((byte*)&value)[i] != 0xFF) - return false; - } - return true; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/AllBitsSet.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/AllBitsSet.Double.cs deleted file mode 100644 index 277ed8ae4e30..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/AllBitsSet.Double.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AllBitsSetDouble() - { - var test = new VectorAllBitsSet__AllBitsSetDouble(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAllBitsSet__AllBitsSetDouble - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector64 result = Vector64.AllBitsSet; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector64) - .GetProperty(nameof(Vector64.AllBitsSet), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector64)(result)); - } - - private void ValidateResult(Vector64 result, [CallerMemberName] string method = "") - { - Double[] resultElements = new Double[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private unsafe void ValidateResult(Double[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - for (var i = 0; i < ElementCount; i++) - { - if (!HasAllBitsSet(resultElements[i])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.AllBitsSet(Double): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private unsafe bool HasAllBitsSet(Double value) - { - for (int i = 0; i < sizeof(Double); i++) - { - if (((byte*)&value)[i] != 0xFF) - return false; - } - return true; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/AllBitsSet.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/AllBitsSet.Int16.cs deleted file mode 100644 index 79ea21863d47..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/AllBitsSet.Int16.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AllBitsSetInt16() - { - var test = new VectorAllBitsSet__AllBitsSetInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAllBitsSet__AllBitsSetInt16 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector64 result = Vector64.AllBitsSet; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector64) - .GetProperty(nameof(Vector64.AllBitsSet), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector64)(result)); - } - - private void ValidateResult(Vector64 result, [CallerMemberName] string method = "") - { - Int16[] resultElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private unsafe void ValidateResult(Int16[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - for (var i = 0; i < ElementCount; i++) - { - if (!HasAllBitsSet(resultElements[i])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.AllBitsSet(Int16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private unsafe bool HasAllBitsSet(Int16 value) - { - for (int i = 0; i < sizeof(Int16); i++) - { - if (((byte*)&value)[i] != 0xFF) - return false; - } - return true; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/AllBitsSet.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/AllBitsSet.Int32.cs deleted file mode 100644 index 5b78caf09957..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/AllBitsSet.Int32.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AllBitsSetInt32() - { - var test = new VectorAllBitsSet__AllBitsSetInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAllBitsSet__AllBitsSetInt32 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector64 result = Vector64.AllBitsSet; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector64) - .GetProperty(nameof(Vector64.AllBitsSet), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector64)(result)); - } - - private void ValidateResult(Vector64 result, [CallerMemberName] string method = "") - { - Int32[] resultElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private unsafe void ValidateResult(Int32[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - for (var i = 0; i < ElementCount; i++) - { - if (!HasAllBitsSet(resultElements[i])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.AllBitsSet(Int32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private unsafe bool HasAllBitsSet(Int32 value) - { - for (int i = 0; i < sizeof(Int32); i++) - { - if (((byte*)&value)[i] != 0xFF) - return false; - } - return true; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/AllBitsSet.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/AllBitsSet.Int64.cs deleted file mode 100644 index 35e95209da89..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/AllBitsSet.Int64.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AllBitsSetInt64() - { - var test = new VectorAllBitsSet__AllBitsSetInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAllBitsSet__AllBitsSetInt64 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector64 result = Vector64.AllBitsSet; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector64) - .GetProperty(nameof(Vector64.AllBitsSet), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector64)(result)); - } - - private void ValidateResult(Vector64 result, [CallerMemberName] string method = "") - { - Int64[] resultElements = new Int64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private unsafe void ValidateResult(Int64[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - for (var i = 0; i < ElementCount; i++) - { - if (!HasAllBitsSet(resultElements[i])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.AllBitsSet(Int64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private unsafe bool HasAllBitsSet(Int64 value) - { - for (int i = 0; i < sizeof(Int64); i++) - { - if (((byte*)&value)[i] != 0xFF) - return false; - } - return true; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/AllBitsSet.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/AllBitsSet.SByte.cs deleted file mode 100644 index 4f72699c809b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/AllBitsSet.SByte.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AllBitsSetSByte() - { - var test = new VectorAllBitsSet__AllBitsSetSByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAllBitsSet__AllBitsSetSByte - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector64 result = Vector64.AllBitsSet; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector64) - .GetProperty(nameof(Vector64.AllBitsSet), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector64)(result)); - } - - private void ValidateResult(Vector64 result, [CallerMemberName] string method = "") - { - SByte[] resultElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private unsafe void ValidateResult(SByte[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - for (var i = 0; i < ElementCount; i++) - { - if (!HasAllBitsSet(resultElements[i])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.AllBitsSet(SByte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private unsafe bool HasAllBitsSet(SByte value) - { - for (int i = 0; i < sizeof(SByte); i++) - { - if (((byte*)&value)[i] != 0xFF) - return false; - } - return true; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/AllBitsSet.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/AllBitsSet.Single.cs deleted file mode 100644 index cdcc116ea7ab..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/AllBitsSet.Single.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AllBitsSetSingle() - { - var test = new VectorAllBitsSet__AllBitsSetSingle(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAllBitsSet__AllBitsSetSingle - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector64 result = Vector64.AllBitsSet; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector64) - .GetProperty(nameof(Vector64.AllBitsSet), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector64)(result)); - } - - private void ValidateResult(Vector64 result, [CallerMemberName] string method = "") - { - Single[] resultElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private unsafe void ValidateResult(Single[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - for (var i = 0; i < ElementCount; i++) - { - if (!HasAllBitsSet(resultElements[i])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.AllBitsSet(Single): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private unsafe bool HasAllBitsSet(Single value) - { - for (int i = 0; i < sizeof(Single); i++) - { - if (((byte*)&value)[i] != 0xFF) - return false; - } - return true; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/AllBitsSet.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/AllBitsSet.UInt16.cs deleted file mode 100644 index f4b75d11852b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/AllBitsSet.UInt16.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AllBitsSetUInt16() - { - var test = new VectorAllBitsSet__AllBitsSetUInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAllBitsSet__AllBitsSetUInt16 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector64 result = Vector64.AllBitsSet; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector64) - .GetProperty(nameof(Vector64.AllBitsSet), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector64)(result)); - } - - private void ValidateResult(Vector64 result, [CallerMemberName] string method = "") - { - UInt16[] resultElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private unsafe void ValidateResult(UInt16[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - for (var i = 0; i < ElementCount; i++) - { - if (!HasAllBitsSet(resultElements[i])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.AllBitsSet(UInt16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private unsafe bool HasAllBitsSet(UInt16 value) - { - for (int i = 0; i < sizeof(UInt16); i++) - { - if (((byte*)&value)[i] != 0xFF) - return false; - } - return true; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/AllBitsSet.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/AllBitsSet.UInt32.cs deleted file mode 100644 index 831b97164f0f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/AllBitsSet.UInt32.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AllBitsSetUInt32() - { - var test = new VectorAllBitsSet__AllBitsSetUInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAllBitsSet__AllBitsSetUInt32 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector64 result = Vector64.AllBitsSet; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector64) - .GetProperty(nameof(Vector64.AllBitsSet), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector64)(result)); - } - - private void ValidateResult(Vector64 result, [CallerMemberName] string method = "") - { - UInt32[] resultElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private unsafe void ValidateResult(UInt32[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - for (var i = 0; i < ElementCount; i++) - { - if (!HasAllBitsSet(resultElements[i])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.AllBitsSet(UInt32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private unsafe bool HasAllBitsSet(UInt32 value) - { - for (int i = 0; i < sizeof(UInt32); i++) - { - if (((byte*)&value)[i] != 0xFF) - return false; - } - return true; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/AllBitsSet.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/AllBitsSet.UInt64.cs deleted file mode 100644 index 8e65308fc624..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/AllBitsSet.UInt64.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AllBitsSetUInt64() - { - var test = new VectorAllBitsSet__AllBitsSetUInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAllBitsSet__AllBitsSetUInt64 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector64 result = Vector64.AllBitsSet; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector64) - .GetProperty(nameof(Vector64.AllBitsSet), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector64)(result)); - } - - private void ValidateResult(Vector64 result, [CallerMemberName] string method = "") - { - UInt64[] resultElements = new UInt64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private unsafe void ValidateResult(UInt64[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - for (var i = 0; i < ElementCount; i++) - { - if (!HasAllBitsSet(resultElements[i])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.AllBitsSet(UInt64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - - private unsafe bool HasAllBitsSet(UInt64 value) - { - for (int i = 0; i < sizeof(UInt64); i++) - { - if (((byte*)&value)[i] != 0xFF) - return false; - } - return true; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Byte.cs deleted file mode 100644 index 91fcb48614c2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Byte.cs +++ /dev/null @@ -1,253 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsByte() - { - var test = new VectorAs__AsByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates basic functionality works using the generic form, rather than the type-specific form of the method - test.RunGenericScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsByte - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector64 value; - - value = Vector64.Create(TestLibrary.Generator.GetByte()); - Vector64 byteResult = value.AsByte(); - ValidateResult(byteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetByte()); - Vector64 doubleResult = value.AsDouble(); - ValidateResult(doubleResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetByte()); - Vector64 shortResult = value.AsInt16(); - ValidateResult(shortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetByte()); - Vector64 intResult = value.AsInt32(); - ValidateResult(intResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetByte()); - Vector64 longResult = value.AsInt64(); - ValidateResult(longResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetByte()); - Vector64 sbyteResult = value.AsSByte(); - ValidateResult(sbyteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetByte()); - Vector64 floatResult = value.AsSingle(); - ValidateResult(floatResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetByte()); - Vector64 ushortResult = value.AsUInt16(); - ValidateResult(ushortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetByte()); - Vector64 uintResult = value.AsUInt32(); - ValidateResult(uintResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetByte()); - Vector64 ulongResult = value.AsUInt64(); - ValidateResult(ulongResult, value); - } - - public void RunGenericScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunGenericScenario)); - Vector64 value; - - value = Vector64.Create(TestLibrary.Generator.GetByte()); - Vector64 byteResult = value.As(); - ValidateResult(byteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetByte()); - Vector64 doubleResult = value.As(); - ValidateResult(doubleResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetByte()); - Vector64 shortResult = value.As(); - ValidateResult(shortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetByte()); - Vector64 intResult = value.As(); - ValidateResult(intResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetByte()); - Vector64 longResult = value.As(); - ValidateResult(longResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetByte()); - Vector64 sbyteResult = value.As(); - ValidateResult(sbyteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetByte()); - Vector64 floatResult = value.As(); - ValidateResult(floatResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetByte()); - Vector64 ushortResult = value.As(); - ValidateResult(ushortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetByte()); - Vector64 uintResult = value.As(); - ValidateResult(uintResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetByte()); - Vector64 ulongResult = value.As(); - ValidateResult(ulongResult, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector64 value; - - value = Vector64.Create(TestLibrary.Generator.GetByte()); - object byteResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsByte)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(byteResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetByte()); - object doubleResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsDouble)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(doubleResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetByte()); - object shortResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsInt16)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(shortResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetByte()); - object intResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsInt32)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(intResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetByte()); - object longResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsInt64)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(longResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetByte()); - object sbyteResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsSByte)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(sbyteResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetByte()); - object floatResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsSingle)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(floatResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetByte()); - object ushortResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsUInt16)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(ushortResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetByte()); - object uintResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsUInt32)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(uintResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetByte()); - object ulongResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsUInt64)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(ulongResult), value); - } - - private void ValidateResult(Vector64 result, Vector64 value, [CallerMemberName] string method = "") - where T : struct - { - Byte[] resultElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Byte[] valueElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, typeof(T), method); - } - - private void ValidateResult(Byte[] resultElements, Byte[] valueElements, Type targetType, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.As{targetType.Name}: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Double.cs deleted file mode 100644 index 8da9c990205c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Double.cs +++ /dev/null @@ -1,253 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsDouble() - { - var test = new VectorAs__AsDouble(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates basic functionality works using the generic form, rather than the type-specific form of the method - test.RunGenericScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsDouble - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector64 value; - - value = Vector64.Create(TestLibrary.Generator.GetDouble()); - Vector64 byteResult = value.AsByte(); - ValidateResult(byteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetDouble()); - Vector64 doubleResult = value.AsDouble(); - ValidateResult(doubleResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetDouble()); - Vector64 shortResult = value.AsInt16(); - ValidateResult(shortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetDouble()); - Vector64 intResult = value.AsInt32(); - ValidateResult(intResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetDouble()); - Vector64 longResult = value.AsInt64(); - ValidateResult(longResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetDouble()); - Vector64 sbyteResult = value.AsSByte(); - ValidateResult(sbyteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetDouble()); - Vector64 floatResult = value.AsSingle(); - ValidateResult(floatResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetDouble()); - Vector64 ushortResult = value.AsUInt16(); - ValidateResult(ushortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetDouble()); - Vector64 uintResult = value.AsUInt32(); - ValidateResult(uintResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetDouble()); - Vector64 ulongResult = value.AsUInt64(); - ValidateResult(ulongResult, value); - } - - public void RunGenericScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunGenericScenario)); - Vector64 value; - - value = Vector64.Create(TestLibrary.Generator.GetDouble()); - Vector64 byteResult = value.As(); - ValidateResult(byteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetDouble()); - Vector64 doubleResult = value.As(); - ValidateResult(doubleResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetDouble()); - Vector64 shortResult = value.As(); - ValidateResult(shortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetDouble()); - Vector64 intResult = value.As(); - ValidateResult(intResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetDouble()); - Vector64 longResult = value.As(); - ValidateResult(longResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetDouble()); - Vector64 sbyteResult = value.As(); - ValidateResult(sbyteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetDouble()); - Vector64 floatResult = value.As(); - ValidateResult(floatResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetDouble()); - Vector64 ushortResult = value.As(); - ValidateResult(ushortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetDouble()); - Vector64 uintResult = value.As(); - ValidateResult(uintResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetDouble()); - Vector64 ulongResult = value.As(); - ValidateResult(ulongResult, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector64 value; - - value = Vector64.Create(TestLibrary.Generator.GetDouble()); - object byteResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsByte)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(byteResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetDouble()); - object doubleResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsDouble)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(doubleResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetDouble()); - object shortResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsInt16)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(shortResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetDouble()); - object intResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsInt32)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(intResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetDouble()); - object longResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsInt64)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(longResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetDouble()); - object sbyteResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsSByte)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(sbyteResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetDouble()); - object floatResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsSingle)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(floatResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetDouble()); - object ushortResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsUInt16)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(ushortResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetDouble()); - object uintResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsUInt32)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(uintResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetDouble()); - object ulongResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsUInt64)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(ulongResult), value); - } - - private void ValidateResult(Vector64 result, Vector64 value, [CallerMemberName] string method = "") - where T : struct - { - Double[] resultElements = new Double[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Double[] valueElements = new Double[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, typeof(T), method); - } - - private void ValidateResult(Double[] resultElements, Double[] valueElements, Type targetType, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.As{targetType.Name}: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Int16.cs deleted file mode 100644 index 9751ccf8090c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Int16.cs +++ /dev/null @@ -1,253 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsInt16() - { - var test = new VectorAs__AsInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates basic functionality works using the generic form, rather than the type-specific form of the method - test.RunGenericScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsInt16 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector64 value; - - value = Vector64.Create(TestLibrary.Generator.GetInt16()); - Vector64 byteResult = value.AsByte(); - ValidateResult(byteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt16()); - Vector64 doubleResult = value.AsDouble(); - ValidateResult(doubleResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt16()); - Vector64 shortResult = value.AsInt16(); - ValidateResult(shortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt16()); - Vector64 intResult = value.AsInt32(); - ValidateResult(intResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt16()); - Vector64 longResult = value.AsInt64(); - ValidateResult(longResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt16()); - Vector64 sbyteResult = value.AsSByte(); - ValidateResult(sbyteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt16()); - Vector64 floatResult = value.AsSingle(); - ValidateResult(floatResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt16()); - Vector64 ushortResult = value.AsUInt16(); - ValidateResult(ushortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt16()); - Vector64 uintResult = value.AsUInt32(); - ValidateResult(uintResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt16()); - Vector64 ulongResult = value.AsUInt64(); - ValidateResult(ulongResult, value); - } - - public void RunGenericScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunGenericScenario)); - Vector64 value; - - value = Vector64.Create(TestLibrary.Generator.GetInt16()); - Vector64 byteResult = value.As(); - ValidateResult(byteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt16()); - Vector64 doubleResult = value.As(); - ValidateResult(doubleResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt16()); - Vector64 shortResult = value.As(); - ValidateResult(shortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt16()); - Vector64 intResult = value.As(); - ValidateResult(intResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt16()); - Vector64 longResult = value.As(); - ValidateResult(longResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt16()); - Vector64 sbyteResult = value.As(); - ValidateResult(sbyteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt16()); - Vector64 floatResult = value.As(); - ValidateResult(floatResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt16()); - Vector64 ushortResult = value.As(); - ValidateResult(ushortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt16()); - Vector64 uintResult = value.As(); - ValidateResult(uintResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt16()); - Vector64 ulongResult = value.As(); - ValidateResult(ulongResult, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector64 value; - - value = Vector64.Create(TestLibrary.Generator.GetInt16()); - object byteResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsByte)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(byteResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetInt16()); - object doubleResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsDouble)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(doubleResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetInt16()); - object shortResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsInt16)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(shortResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetInt16()); - object intResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsInt32)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(intResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetInt16()); - object longResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsInt64)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(longResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetInt16()); - object sbyteResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsSByte)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(sbyteResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetInt16()); - object floatResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsSingle)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(floatResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetInt16()); - object ushortResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsUInt16)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(ushortResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetInt16()); - object uintResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsUInt32)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(uintResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetInt16()); - object ulongResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsUInt64)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(ulongResult), value); - } - - private void ValidateResult(Vector64 result, Vector64 value, [CallerMemberName] string method = "") - where T : struct - { - Int16[] resultElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Int16[] valueElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, typeof(T), method); - } - - private void ValidateResult(Int16[] resultElements, Int16[] valueElements, Type targetType, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.As{targetType.Name}: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Int32.cs deleted file mode 100644 index e85e21fe286e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Int32.cs +++ /dev/null @@ -1,253 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsInt32() - { - var test = new VectorAs__AsInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates basic functionality works using the generic form, rather than the type-specific form of the method - test.RunGenericScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsInt32 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector64 value; - - value = Vector64.Create(TestLibrary.Generator.GetInt32()); - Vector64 byteResult = value.AsByte(); - ValidateResult(byteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt32()); - Vector64 doubleResult = value.AsDouble(); - ValidateResult(doubleResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt32()); - Vector64 shortResult = value.AsInt16(); - ValidateResult(shortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt32()); - Vector64 intResult = value.AsInt32(); - ValidateResult(intResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt32()); - Vector64 longResult = value.AsInt64(); - ValidateResult(longResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt32()); - Vector64 sbyteResult = value.AsSByte(); - ValidateResult(sbyteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt32()); - Vector64 floatResult = value.AsSingle(); - ValidateResult(floatResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt32()); - Vector64 ushortResult = value.AsUInt16(); - ValidateResult(ushortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt32()); - Vector64 uintResult = value.AsUInt32(); - ValidateResult(uintResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt32()); - Vector64 ulongResult = value.AsUInt64(); - ValidateResult(ulongResult, value); - } - - public void RunGenericScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunGenericScenario)); - Vector64 value; - - value = Vector64.Create(TestLibrary.Generator.GetInt32()); - Vector64 byteResult = value.As(); - ValidateResult(byteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt32()); - Vector64 doubleResult = value.As(); - ValidateResult(doubleResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt32()); - Vector64 shortResult = value.As(); - ValidateResult(shortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt32()); - Vector64 intResult = value.As(); - ValidateResult(intResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt32()); - Vector64 longResult = value.As(); - ValidateResult(longResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt32()); - Vector64 sbyteResult = value.As(); - ValidateResult(sbyteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt32()); - Vector64 floatResult = value.As(); - ValidateResult(floatResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt32()); - Vector64 ushortResult = value.As(); - ValidateResult(ushortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt32()); - Vector64 uintResult = value.As(); - ValidateResult(uintResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt32()); - Vector64 ulongResult = value.As(); - ValidateResult(ulongResult, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector64 value; - - value = Vector64.Create(TestLibrary.Generator.GetInt32()); - object byteResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsByte)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(byteResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetInt32()); - object doubleResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsDouble)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(doubleResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetInt32()); - object shortResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsInt16)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(shortResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetInt32()); - object intResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsInt32)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(intResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetInt32()); - object longResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsInt64)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(longResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetInt32()); - object sbyteResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsSByte)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(sbyteResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetInt32()); - object floatResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsSingle)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(floatResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetInt32()); - object ushortResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsUInt16)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(ushortResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetInt32()); - object uintResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsUInt32)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(uintResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetInt32()); - object ulongResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsUInt64)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(ulongResult), value); - } - - private void ValidateResult(Vector64 result, Vector64 value, [CallerMemberName] string method = "") - where T : struct - { - Int32[] resultElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Int32[] valueElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, typeof(T), method); - } - - private void ValidateResult(Int32[] resultElements, Int32[] valueElements, Type targetType, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.As{targetType.Name}: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Int64.cs deleted file mode 100644 index 17d7ca052872..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Int64.cs +++ /dev/null @@ -1,253 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsInt64() - { - var test = new VectorAs__AsInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates basic functionality works using the generic form, rather than the type-specific form of the method - test.RunGenericScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsInt64 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector64 value; - - value = Vector64.Create(TestLibrary.Generator.GetInt64()); - Vector64 byteResult = value.AsByte(); - ValidateResult(byteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt64()); - Vector64 doubleResult = value.AsDouble(); - ValidateResult(doubleResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt64()); - Vector64 shortResult = value.AsInt16(); - ValidateResult(shortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt64()); - Vector64 intResult = value.AsInt32(); - ValidateResult(intResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt64()); - Vector64 longResult = value.AsInt64(); - ValidateResult(longResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt64()); - Vector64 sbyteResult = value.AsSByte(); - ValidateResult(sbyteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt64()); - Vector64 floatResult = value.AsSingle(); - ValidateResult(floatResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt64()); - Vector64 ushortResult = value.AsUInt16(); - ValidateResult(ushortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt64()); - Vector64 uintResult = value.AsUInt32(); - ValidateResult(uintResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt64()); - Vector64 ulongResult = value.AsUInt64(); - ValidateResult(ulongResult, value); - } - - public void RunGenericScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunGenericScenario)); - Vector64 value; - - value = Vector64.Create(TestLibrary.Generator.GetInt64()); - Vector64 byteResult = value.As(); - ValidateResult(byteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt64()); - Vector64 doubleResult = value.As(); - ValidateResult(doubleResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt64()); - Vector64 shortResult = value.As(); - ValidateResult(shortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt64()); - Vector64 intResult = value.As(); - ValidateResult(intResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt64()); - Vector64 longResult = value.As(); - ValidateResult(longResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt64()); - Vector64 sbyteResult = value.As(); - ValidateResult(sbyteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt64()); - Vector64 floatResult = value.As(); - ValidateResult(floatResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt64()); - Vector64 ushortResult = value.As(); - ValidateResult(ushortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt64()); - Vector64 uintResult = value.As(); - ValidateResult(uintResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetInt64()); - Vector64 ulongResult = value.As(); - ValidateResult(ulongResult, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector64 value; - - value = Vector64.Create(TestLibrary.Generator.GetInt64()); - object byteResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsByte)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(byteResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetInt64()); - object doubleResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsDouble)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(doubleResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetInt64()); - object shortResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsInt16)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(shortResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetInt64()); - object intResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsInt32)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(intResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetInt64()); - object longResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsInt64)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(longResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetInt64()); - object sbyteResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsSByte)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(sbyteResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetInt64()); - object floatResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsSingle)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(floatResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetInt64()); - object ushortResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsUInt16)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(ushortResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetInt64()); - object uintResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsUInt32)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(uintResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetInt64()); - object ulongResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsUInt64)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(ulongResult), value); - } - - private void ValidateResult(Vector64 result, Vector64 value, [CallerMemberName] string method = "") - where T : struct - { - Int64[] resultElements = new Int64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Int64[] valueElements = new Int64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, typeof(T), method); - } - - private void ValidateResult(Int64[] resultElements, Int64[] valueElements, Type targetType, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.As{targetType.Name}: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.SByte.cs deleted file mode 100644 index d029bd4911c2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.SByte.cs +++ /dev/null @@ -1,253 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsSByte() - { - var test = new VectorAs__AsSByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates basic functionality works using the generic form, rather than the type-specific form of the method - test.RunGenericScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsSByte - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector64 value; - - value = Vector64.Create(TestLibrary.Generator.GetSByte()); - Vector64 byteResult = value.AsByte(); - ValidateResult(byteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSByte()); - Vector64 doubleResult = value.AsDouble(); - ValidateResult(doubleResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSByte()); - Vector64 shortResult = value.AsInt16(); - ValidateResult(shortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSByte()); - Vector64 intResult = value.AsInt32(); - ValidateResult(intResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSByte()); - Vector64 longResult = value.AsInt64(); - ValidateResult(longResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSByte()); - Vector64 sbyteResult = value.AsSByte(); - ValidateResult(sbyteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSByte()); - Vector64 floatResult = value.AsSingle(); - ValidateResult(floatResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSByte()); - Vector64 ushortResult = value.AsUInt16(); - ValidateResult(ushortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSByte()); - Vector64 uintResult = value.AsUInt32(); - ValidateResult(uintResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSByte()); - Vector64 ulongResult = value.AsUInt64(); - ValidateResult(ulongResult, value); - } - - public void RunGenericScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunGenericScenario)); - Vector64 value; - - value = Vector64.Create(TestLibrary.Generator.GetSByte()); - Vector64 byteResult = value.As(); - ValidateResult(byteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSByte()); - Vector64 doubleResult = value.As(); - ValidateResult(doubleResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSByte()); - Vector64 shortResult = value.As(); - ValidateResult(shortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSByte()); - Vector64 intResult = value.As(); - ValidateResult(intResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSByte()); - Vector64 longResult = value.As(); - ValidateResult(longResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSByte()); - Vector64 sbyteResult = value.As(); - ValidateResult(sbyteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSByte()); - Vector64 floatResult = value.As(); - ValidateResult(floatResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSByte()); - Vector64 ushortResult = value.As(); - ValidateResult(ushortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSByte()); - Vector64 uintResult = value.As(); - ValidateResult(uintResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSByte()); - Vector64 ulongResult = value.As(); - ValidateResult(ulongResult, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector64 value; - - value = Vector64.Create(TestLibrary.Generator.GetSByte()); - object byteResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsByte)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(byteResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetSByte()); - object doubleResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsDouble)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(doubleResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetSByte()); - object shortResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsInt16)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(shortResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetSByte()); - object intResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsInt32)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(intResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetSByte()); - object longResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsInt64)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(longResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetSByte()); - object sbyteResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsSByte)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(sbyteResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetSByte()); - object floatResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsSingle)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(floatResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetSByte()); - object ushortResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsUInt16)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(ushortResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetSByte()); - object uintResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsUInt32)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(uintResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetSByte()); - object ulongResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsUInt64)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(ulongResult), value); - } - - private void ValidateResult(Vector64 result, Vector64 value, [CallerMemberName] string method = "") - where T : struct - { - SByte[] resultElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - SByte[] valueElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, typeof(T), method); - } - - private void ValidateResult(SByte[] resultElements, SByte[] valueElements, Type targetType, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.As{targetType.Name}: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Single.cs deleted file mode 100644 index 87fcaccf736f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.Single.cs +++ /dev/null @@ -1,253 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsSingle() - { - var test = new VectorAs__AsSingle(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates basic functionality works using the generic form, rather than the type-specific form of the method - test.RunGenericScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsSingle - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector64 value; - - value = Vector64.Create(TestLibrary.Generator.GetSingle()); - Vector64 byteResult = value.AsByte(); - ValidateResult(byteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSingle()); - Vector64 doubleResult = value.AsDouble(); - ValidateResult(doubleResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSingle()); - Vector64 shortResult = value.AsInt16(); - ValidateResult(shortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSingle()); - Vector64 intResult = value.AsInt32(); - ValidateResult(intResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSingle()); - Vector64 longResult = value.AsInt64(); - ValidateResult(longResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSingle()); - Vector64 sbyteResult = value.AsSByte(); - ValidateResult(sbyteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSingle()); - Vector64 floatResult = value.AsSingle(); - ValidateResult(floatResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSingle()); - Vector64 ushortResult = value.AsUInt16(); - ValidateResult(ushortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSingle()); - Vector64 uintResult = value.AsUInt32(); - ValidateResult(uintResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSingle()); - Vector64 ulongResult = value.AsUInt64(); - ValidateResult(ulongResult, value); - } - - public void RunGenericScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunGenericScenario)); - Vector64 value; - - value = Vector64.Create(TestLibrary.Generator.GetSingle()); - Vector64 byteResult = value.As(); - ValidateResult(byteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSingle()); - Vector64 doubleResult = value.As(); - ValidateResult(doubleResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSingle()); - Vector64 shortResult = value.As(); - ValidateResult(shortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSingle()); - Vector64 intResult = value.As(); - ValidateResult(intResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSingle()); - Vector64 longResult = value.As(); - ValidateResult(longResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSingle()); - Vector64 sbyteResult = value.As(); - ValidateResult(sbyteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSingle()); - Vector64 floatResult = value.As(); - ValidateResult(floatResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSingle()); - Vector64 ushortResult = value.As(); - ValidateResult(ushortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSingle()); - Vector64 uintResult = value.As(); - ValidateResult(uintResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetSingle()); - Vector64 ulongResult = value.As(); - ValidateResult(ulongResult, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector64 value; - - value = Vector64.Create(TestLibrary.Generator.GetSingle()); - object byteResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsByte)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(byteResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetSingle()); - object doubleResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsDouble)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(doubleResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetSingle()); - object shortResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsInt16)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(shortResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetSingle()); - object intResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsInt32)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(intResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetSingle()); - object longResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsInt64)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(longResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetSingle()); - object sbyteResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsSByte)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(sbyteResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetSingle()); - object floatResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsSingle)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(floatResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetSingle()); - object ushortResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsUInt16)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(ushortResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetSingle()); - object uintResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsUInt32)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(uintResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetSingle()); - object ulongResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsUInt64)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(ulongResult), value); - } - - private void ValidateResult(Vector64 result, Vector64 value, [CallerMemberName] string method = "") - where T : struct - { - Single[] resultElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - Single[] valueElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, typeof(T), method); - } - - private void ValidateResult(Single[] resultElements, Single[] valueElements, Type targetType, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.As{targetType.Name}: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.UInt16.cs deleted file mode 100644 index 2692b0458a19..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.UInt16.cs +++ /dev/null @@ -1,253 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsUInt16() - { - var test = new VectorAs__AsUInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates basic functionality works using the generic form, rather than the type-specific form of the method - test.RunGenericScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsUInt16 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector64 value; - - value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - Vector64 byteResult = value.AsByte(); - ValidateResult(byteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - Vector64 doubleResult = value.AsDouble(); - ValidateResult(doubleResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - Vector64 shortResult = value.AsInt16(); - ValidateResult(shortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - Vector64 intResult = value.AsInt32(); - ValidateResult(intResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - Vector64 longResult = value.AsInt64(); - ValidateResult(longResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - Vector64 sbyteResult = value.AsSByte(); - ValidateResult(sbyteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - Vector64 floatResult = value.AsSingle(); - ValidateResult(floatResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - Vector64 ushortResult = value.AsUInt16(); - ValidateResult(ushortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - Vector64 uintResult = value.AsUInt32(); - ValidateResult(uintResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - Vector64 ulongResult = value.AsUInt64(); - ValidateResult(ulongResult, value); - } - - public void RunGenericScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunGenericScenario)); - Vector64 value; - - value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - Vector64 byteResult = value.As(); - ValidateResult(byteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - Vector64 doubleResult = value.As(); - ValidateResult(doubleResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - Vector64 shortResult = value.As(); - ValidateResult(shortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - Vector64 intResult = value.As(); - ValidateResult(intResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - Vector64 longResult = value.As(); - ValidateResult(longResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - Vector64 sbyteResult = value.As(); - ValidateResult(sbyteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - Vector64 floatResult = value.As(); - ValidateResult(floatResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - Vector64 ushortResult = value.As(); - ValidateResult(ushortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - Vector64 uintResult = value.As(); - ValidateResult(uintResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - Vector64 ulongResult = value.As(); - ValidateResult(ulongResult, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector64 value; - - value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - object byteResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsByte)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(byteResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - object doubleResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsDouble)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(doubleResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - object shortResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsInt16)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(shortResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - object intResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsInt32)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(intResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - object longResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsInt64)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(longResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - object sbyteResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsSByte)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(sbyteResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - object floatResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsSingle)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(floatResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - object ushortResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsUInt16)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(ushortResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - object uintResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsUInt32)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(uintResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt16()); - object ulongResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsUInt64)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(ulongResult), value); - } - - private void ValidateResult(Vector64 result, Vector64 value, [CallerMemberName] string method = "") - where T : struct - { - UInt16[] resultElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - UInt16[] valueElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, typeof(T), method); - } - - private void ValidateResult(UInt16[] resultElements, UInt16[] valueElements, Type targetType, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.As{targetType.Name}: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.UInt32.cs deleted file mode 100644 index 6f6ba1e6a320..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.UInt32.cs +++ /dev/null @@ -1,253 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsUInt32() - { - var test = new VectorAs__AsUInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates basic functionality works using the generic form, rather than the type-specific form of the method - test.RunGenericScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsUInt32 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector64 value; - - value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - Vector64 byteResult = value.AsByte(); - ValidateResult(byteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - Vector64 doubleResult = value.AsDouble(); - ValidateResult(doubleResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - Vector64 shortResult = value.AsInt16(); - ValidateResult(shortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - Vector64 intResult = value.AsInt32(); - ValidateResult(intResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - Vector64 longResult = value.AsInt64(); - ValidateResult(longResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - Vector64 sbyteResult = value.AsSByte(); - ValidateResult(sbyteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - Vector64 floatResult = value.AsSingle(); - ValidateResult(floatResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - Vector64 ushortResult = value.AsUInt16(); - ValidateResult(ushortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - Vector64 uintResult = value.AsUInt32(); - ValidateResult(uintResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - Vector64 ulongResult = value.AsUInt64(); - ValidateResult(ulongResult, value); - } - - public void RunGenericScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunGenericScenario)); - Vector64 value; - - value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - Vector64 byteResult = value.As(); - ValidateResult(byteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - Vector64 doubleResult = value.As(); - ValidateResult(doubleResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - Vector64 shortResult = value.As(); - ValidateResult(shortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - Vector64 intResult = value.As(); - ValidateResult(intResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - Vector64 longResult = value.As(); - ValidateResult(longResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - Vector64 sbyteResult = value.As(); - ValidateResult(sbyteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - Vector64 floatResult = value.As(); - ValidateResult(floatResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - Vector64 ushortResult = value.As(); - ValidateResult(ushortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - Vector64 uintResult = value.As(); - ValidateResult(uintResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - Vector64 ulongResult = value.As(); - ValidateResult(ulongResult, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector64 value; - - value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - object byteResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsByte)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(byteResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - object doubleResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsDouble)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(doubleResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - object shortResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsInt16)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(shortResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - object intResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsInt32)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(intResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - object longResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsInt64)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(longResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - object sbyteResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsSByte)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(sbyteResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - object floatResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsSingle)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(floatResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - object ushortResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsUInt16)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(ushortResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - object uintResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsUInt32)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(uintResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt32()); - object ulongResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsUInt64)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(ulongResult), value); - } - - private void ValidateResult(Vector64 result, Vector64 value, [CallerMemberName] string method = "") - where T : struct - { - UInt32[] resultElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - UInt32[] valueElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, typeof(T), method); - } - - private void ValidateResult(UInt32[] resultElements, UInt32[] valueElements, Type targetType, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.As{targetType.Name}: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.UInt64.cs deleted file mode 100644 index 9989bd97793a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/As.UInt64.cs +++ /dev/null @@ -1,253 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void AsUInt64() - { - var test = new VectorAs__AsUInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates basic functionality works using the generic form, rather than the type-specific form of the method - test.RunGenericScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorAs__AsUInt64 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - Vector64 value; - - value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - Vector64 byteResult = value.AsByte(); - ValidateResult(byteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - Vector64 doubleResult = value.AsDouble(); - ValidateResult(doubleResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - Vector64 shortResult = value.AsInt16(); - ValidateResult(shortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - Vector64 intResult = value.AsInt32(); - ValidateResult(intResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - Vector64 longResult = value.AsInt64(); - ValidateResult(longResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - Vector64 sbyteResult = value.AsSByte(); - ValidateResult(sbyteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - Vector64 floatResult = value.AsSingle(); - ValidateResult(floatResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - Vector64 ushortResult = value.AsUInt16(); - ValidateResult(ushortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - Vector64 uintResult = value.AsUInt32(); - ValidateResult(uintResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - Vector64 ulongResult = value.AsUInt64(); - ValidateResult(ulongResult, value); - } - - public void RunGenericScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunGenericScenario)); - Vector64 value; - - value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - Vector64 byteResult = value.As(); - ValidateResult(byteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - Vector64 doubleResult = value.As(); - ValidateResult(doubleResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - Vector64 shortResult = value.As(); - ValidateResult(shortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - Vector64 intResult = value.As(); - ValidateResult(intResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - Vector64 longResult = value.As(); - ValidateResult(longResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - Vector64 sbyteResult = value.As(); - ValidateResult(sbyteResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - Vector64 floatResult = value.As(); - ValidateResult(floatResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - Vector64 ushortResult = value.As(); - ValidateResult(ushortResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - Vector64 uintResult = value.As(); - ValidateResult(uintResult, value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - Vector64 ulongResult = value.As(); - ValidateResult(ulongResult, value); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - Vector64 value; - - value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - object byteResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsByte)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(byteResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - object doubleResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsDouble)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(doubleResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - object shortResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsInt16)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(shortResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - object intResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsInt32)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(intResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - object longResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsInt64)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(longResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - object sbyteResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsSByte)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(sbyteResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - object floatResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsSingle)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(floatResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - object ushortResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsUInt16)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(ushortResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - object uintResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsUInt32)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(uintResult), value); - - value = Vector64.Create(TestLibrary.Generator.GetUInt64()); - object ulongResult = typeof(Vector64) - .GetMethod(nameof(Vector64.AsUInt64)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - ValidateResult((Vector64)(ulongResult), value); - } - - private void ValidateResult(Vector64 result, Vector64 value, [CallerMemberName] string method = "") - where T : struct - { - UInt64[] resultElements = new UInt64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - - UInt64[] valueElements = new UInt64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref valueElements[0]), value); - - ValidateResult(resultElements, valueElements, typeof(T), method); - } - - private void ValidateResult(UInt64[] resultElements, UInt64[] valueElements, Type targetType, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != valueElements[i]) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.As{targetType.Name}: {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", valueElements)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Byte.0.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Byte.0.cs deleted file mode 100644 index 280a0f213490..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/GetAndWithElement.Byte.0.cs +++ /dev/null @@ -1,229 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void GetAndWithElementByte0() - { - var test = new VectorGetAndWithElement__GetAndWithElementByte0(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - // Validates that invalid indices throws ArgumentOutOfRangeException - test.RunArgumentOutOfRangeScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorGetAndWithElement__GetAndWithElementByte0 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 0, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Byte[] values = new Byte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetByte(); - } - - Vector64 value = Vector64.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Byte result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 value = Vector64.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.GetElement)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Byte)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 result, Byte[] values, Byte insertedValue, [CallerMemberName] string method = "") - { - Byte[] resultElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Byte[] result, Byte[] values, Byte insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 0) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[0] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 7, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Byte[] values = new Byte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetByte(); - } - - Vector64 value = Vector64.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Byte result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 value = Vector64.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.GetElement)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Byte)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 result, Byte[] values, Byte insertedValue, [CallerMemberName] string method = "") - { - Byte[] resultElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Byte[] result, Byte[] values, Byte insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 7) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[7] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64>() / sizeof(Double); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 0, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Double[] values = new Double[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetDouble(); - } - - Vector64 value = Vector64.Create(values[0]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Double result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 value = Vector64.Create(values[0]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.GetElement)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Double)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 result, Double[] values, Double insertedValue, [CallerMemberName] string method = "") - { - Double[] resultElements = new Double[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Double[] result, Double[] values, Double insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 0) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[0] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 0, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int16[] values = new Int16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt16(); - } - - Vector64 value = Vector64.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Int16 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 value = Vector64.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.GetElement)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Int16)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 result, Int16[] values, Int16 insertedValue, [CallerMemberName] string method = "") - { - Int16[] resultElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Int16[] result, Int16[] values, Int16 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 0) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[0] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 3, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int16[] values = new Int16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt16(); - } - - Vector64 value = Vector64.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Int16 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 value = Vector64.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.GetElement)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Int16)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 result, Int16[] values, Int16 insertedValue, [CallerMemberName] string method = "") - { - Int16[] resultElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Int16[] result, Int16[] values, Int16 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 3) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[3] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 0, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int32[] values = new Int32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt32(); - } - - Vector64 value = Vector64.Create(values[0], values[1]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Int32 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 value = Vector64.Create(values[0], values[1]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.GetElement)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Int32)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 result, Int32[] values, Int32 insertedValue, [CallerMemberName] string method = "") - { - Int32[] resultElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Int32[] result, Int32[] values, Int32 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 0) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[0] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 1, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int32[] values = new Int32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt32(); - } - - Vector64 value = Vector64.Create(values[0], values[1]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Int32 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 value = Vector64.Create(values[0], values[1]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.GetElement)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Int32)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 result, Int32[] values, Int32 insertedValue, [CallerMemberName] string method = "") - { - Int32[] resultElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Int32[] result, Int32[] values, Int32 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 1) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[1] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64>() / sizeof(Int64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 0, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int64[] values = new Int64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt64(); - } - - Vector64 value = Vector64.Create(values[0]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Int64 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 value = Vector64.Create(values[0]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.GetElement)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Int64)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 result, Int64[] values, Int64 insertedValue, [CallerMemberName] string method = "") - { - Int64[] resultElements = new Int64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Int64[] result, Int64[] values, Int64 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 0) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[0] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 0, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - SByte[] values = new SByte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSByte(); - } - - Vector64 value = Vector64.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - SByte result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 value = Vector64.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.GetElement)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((SByte)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 result, SByte[] values, SByte insertedValue, [CallerMemberName] string method = "") - { - SByte[] resultElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(SByte[] result, SByte[] values, SByte insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 0) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[0] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 7, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - SByte[] values = new SByte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSByte(); - } - - Vector64 value = Vector64.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - SByte result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 value = Vector64.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.GetElement)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((SByte)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 result, SByte[] values, SByte insertedValue, [CallerMemberName] string method = "") - { - SByte[] resultElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(SByte[] result, SByte[] values, SByte insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 7) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[7] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 0, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Single[] values = new Single[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSingle(); - } - - Vector64 value = Vector64.Create(values[0], values[1]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Single result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 value = Vector64.Create(values[0], values[1]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.GetElement)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Single)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 result, Single[] values, Single insertedValue, [CallerMemberName] string method = "") - { - Single[] resultElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Single[] result, Single[] values, Single insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 0) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[0] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 1, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Single[] values = new Single[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSingle(); - } - - Vector64 value = Vector64.Create(values[0], values[1]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - Single result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 value = Vector64.Create(values[0], values[1]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.GetElement)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((Single)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 result, Single[] values, Single insertedValue, [CallerMemberName] string method = "") - { - Single[] resultElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(Single[] result, Single[] values, Single insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 1) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[1] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 0, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt16[] values = new UInt16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt16(); - } - - Vector64 value = Vector64.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - UInt16 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 value = Vector64.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.GetElement)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((UInt16)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 result, UInt16[] values, UInt16 insertedValue, [CallerMemberName] string method = "") - { - UInt16[] resultElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(UInt16[] result, UInt16[] values, UInt16 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 0) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[0] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 3, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt16[] values = new UInt16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt16(); - } - - Vector64 value = Vector64.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - UInt16 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 value = Vector64.Create(values[0], values[1], values[2], values[3]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.GetElement)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((UInt16)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 result, UInt16[] values, UInt16 insertedValue, [CallerMemberName] string method = "") - { - UInt16[] resultElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(UInt16[] result, UInt16[] values, UInt16 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 3) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[3] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 0, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt32[] values = new UInt32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt32(); - } - - Vector64 value = Vector64.Create(values[0], values[1]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - UInt32 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 value = Vector64.Create(values[0], values[1]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.GetElement)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((UInt32)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 result, UInt32[] values, UInt32 insertedValue, [CallerMemberName] string method = "") - { - UInt32[] resultElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(UInt32[] result, UInt32[] values, UInt32 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 0) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[0] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 1, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt32[] values = new UInt32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt32(); - } - - Vector64 value = Vector64.Create(values[0], values[1]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - UInt32 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 value = Vector64.Create(values[0], values[1]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.GetElement)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((UInt32)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 result, UInt32[] values, UInt32 insertedValue, [CallerMemberName] string method = "") - { - UInt32[] resultElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(UInt32[] result, UInt32[] values, UInt32 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 1) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[1] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64>() / sizeof(UInt64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario(int imm = 0, bool expectedOutOfRangeException = false) - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt64[] values = new UInt64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt64(); - } - - Vector64 value = Vector64.Create(values[0]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - UInt64 result = value.GetElement(imm); - ValidateGetResult(result, values); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 result2 = value.WithElement(imm, insertedValue); - ValidateWithResult(result2, values, insertedValue); - } - catch (ArgumentOutOfRangeException) - { - succeeded = expectedOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 value = Vector64.Create(values[0]); - - bool succeeded = !expectedOutOfRangeException; - - try - { - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.GetElement)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value, imm }); - ValidateGetResult((UInt64)(result), values); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64)(result2), values, insertedValue); - } - catch (TargetInvocationException e) - { - succeeded = expectedOutOfRangeException - && e.InnerException is ArgumentOutOfRangeException; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64 result, UInt64[] values, UInt64 insertedValue, [CallerMemberName] string method = "") - { - UInt64[] resultElements = new UInt64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateWithResult(resultElements, values, insertedValue, method); - } - - private void ValidateWithResult(UInt64[] result, UInt64[] values, UInt64 insertedValue, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < ElementCount; i++) - { - if ((i != 0) && (result[i] != values[i])) - { - succeeded = false; - break; - } - } - - if (result[0] != insertedValue) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Byte[] values = new Byte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetByte(); - } - - Vector64 value = Vector64.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - Byte result = value.ToScalar(); - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Byte[] values = new Byte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetByte(); - } - - Vector64 value = Vector64.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.ToScalar)) - .MakeGenericMethod(typeof(Byte)) - .Invoke(null, new object[] { value }); - - ValidateResult((Byte)(result), values); - } - - private void ValidateResult(Byte result, Byte[] values, [CallerMemberName] string method = "") - { - if (result != values[0]) - { - TestLibrary.TestFramework.LogInformation($"Vector64.ToScalar(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" values: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Double.cs deleted file mode 100644 index 8740694428f6..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Double.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ToScalarDouble() - { - var test = new VectorToScalar__ToScalarDouble(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorToScalar__ToScalarDouble - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Double[] values = new Double[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetDouble(); - } - - Vector64 value = Vector64.Create(values[0]); - - Double result = value.ToScalar(); - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Double[] values = new Double[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetDouble(); - } - - Vector64 value = Vector64.Create(values[0]); - - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.ToScalar)) - .MakeGenericMethod(typeof(Double)) - .Invoke(null, new object[] { value }); - - ValidateResult((Double)(result), values); - } - - private void ValidateResult(Double result, Double[] values, [CallerMemberName] string method = "") - { - if (result != values[0]) - { - TestLibrary.TestFramework.LogInformation($"Vector64.ToScalar(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" values: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Int16.cs deleted file mode 100644 index 2c00451d5048..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Int16.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ToScalarInt16() - { - var test = new VectorToScalar__ToScalarInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorToScalar__ToScalarInt16 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int16[] values = new Int16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt16(); - } - - Vector64 value = Vector64.Create(values[0], values[1], values[2], values[3]); - - Int16 result = value.ToScalar(); - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int16[] values = new Int16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt16(); - } - - Vector64 value = Vector64.Create(values[0], values[1], values[2], values[3]); - - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.ToScalar)) - .MakeGenericMethod(typeof(Int16)) - .Invoke(null, new object[] { value }); - - ValidateResult((Int16)(result), values); - } - - private void ValidateResult(Int16 result, Int16[] values, [CallerMemberName] string method = "") - { - if (result != values[0]) - { - TestLibrary.TestFramework.LogInformation($"Vector64.ToScalar(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" values: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Int32.cs deleted file mode 100644 index d66e9865f2cb..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Int32.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ToScalarInt32() - { - var test = new VectorToScalar__ToScalarInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorToScalar__ToScalarInt32 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int32[] values = new Int32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt32(); - } - - Vector64 value = Vector64.Create(values[0], values[1]); - - Int32 result = value.ToScalar(); - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int32[] values = new Int32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt32(); - } - - Vector64 value = Vector64.Create(values[0], values[1]); - - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.ToScalar)) - .MakeGenericMethod(typeof(Int32)) - .Invoke(null, new object[] { value }); - - ValidateResult((Int32)(result), values); - } - - private void ValidateResult(Int32 result, Int32[] values, [CallerMemberName] string method = "") - { - if (result != values[0]) - { - TestLibrary.TestFramework.LogInformation($"Vector64.ToScalar(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" values: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Int64.cs deleted file mode 100644 index 4b937e223ac1..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Int64.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ToScalarInt64() - { - var test = new VectorToScalar__ToScalarInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorToScalar__ToScalarInt64 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Int64[] values = new Int64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt64(); - } - - Vector64 value = Vector64.Create(values[0]); - - Int64 result = value.ToScalar(); - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Int64[] values = new Int64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetInt64(); - } - - Vector64 value = Vector64.Create(values[0]); - - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.ToScalar)) - .MakeGenericMethod(typeof(Int64)) - .Invoke(null, new object[] { value }); - - ValidateResult((Int64)(result), values); - } - - private void ValidateResult(Int64 result, Int64[] values, [CallerMemberName] string method = "") - { - if (result != values[0]) - { - TestLibrary.TestFramework.LogInformation($"Vector64.ToScalar(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" values: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.SByte.cs deleted file mode 100644 index 6b4682c8c7b0..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.SByte.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ToScalarSByte() - { - var test = new VectorToScalar__ToScalarSByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorToScalar__ToScalarSByte - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - SByte[] values = new SByte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSByte(); - } - - Vector64 value = Vector64.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - SByte result = value.ToScalar(); - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - SByte[] values = new SByte[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSByte(); - } - - Vector64 value = Vector64.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.ToScalar)) - .MakeGenericMethod(typeof(SByte)) - .Invoke(null, new object[] { value }); - - ValidateResult((SByte)(result), values); - } - - private void ValidateResult(SByte result, SByte[] values, [CallerMemberName] string method = "") - { - if (result != values[0]) - { - TestLibrary.TestFramework.LogInformation($"Vector64.ToScalar(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" values: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Single.cs deleted file mode 100644 index fde07e618921..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.Single.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ToScalarSingle() - { - var test = new VectorToScalar__ToScalarSingle(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorToScalar__ToScalarSingle - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Single[] values = new Single[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSingle(); - } - - Vector64 value = Vector64.Create(values[0], values[1]); - - Single result = value.ToScalar(); - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - Single[] values = new Single[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetSingle(); - } - - Vector64 value = Vector64.Create(values[0], values[1]); - - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.ToScalar)) - .MakeGenericMethod(typeof(Single)) - .Invoke(null, new object[] { value }); - - ValidateResult((Single)(result), values); - } - - private void ValidateResult(Single result, Single[] values, [CallerMemberName] string method = "") - { - if (result != values[0]) - { - TestLibrary.TestFramework.LogInformation($"Vector64.ToScalar(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" values: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.UInt16.cs deleted file mode 100644 index aac41b8c32f7..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.UInt16.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ToScalarUInt16() - { - var test = new VectorToScalar__ToScalarUInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorToScalar__ToScalarUInt16 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt16[] values = new UInt16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt16(); - } - - Vector64 value = Vector64.Create(values[0], values[1], values[2], values[3]); - - UInt16 result = value.ToScalar(); - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt16[] values = new UInt16[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt16(); - } - - Vector64 value = Vector64.Create(values[0], values[1], values[2], values[3]); - - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.ToScalar)) - .MakeGenericMethod(typeof(UInt16)) - .Invoke(null, new object[] { value }); - - ValidateResult((UInt16)(result), values); - } - - private void ValidateResult(UInt16 result, UInt16[] values, [CallerMemberName] string method = "") - { - if (result != values[0]) - { - TestLibrary.TestFramework.LogInformation($"Vector64.ToScalar(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" values: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.UInt32.cs deleted file mode 100644 index 7f8662311e96..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.UInt32.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ToScalarUInt32() - { - var test = new VectorToScalar__ToScalarUInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorToScalar__ToScalarUInt32 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt32[] values = new UInt32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt32(); - } - - Vector64 value = Vector64.Create(values[0], values[1]); - - UInt32 result = value.ToScalar(); - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt32[] values = new UInt32[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt32(); - } - - Vector64 value = Vector64.Create(values[0], values[1]); - - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.ToScalar)) - .MakeGenericMethod(typeof(UInt32)) - .Invoke(null, new object[] { value }); - - ValidateResult((UInt32)(result), values); - } - - private void ValidateResult(UInt32 result, UInt32[] values, [CallerMemberName] string method = "") - { - if (result != values[0]) - { - TestLibrary.TestFramework.LogInformation($"Vector64.ToScalar(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" values: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.UInt64.cs deleted file mode 100644 index 0a80b8556ef3..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToScalar.UInt64.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ToScalarUInt64() - { - var test = new VectorToScalar__ToScalarUInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorToScalar__ToScalarUInt64 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - UInt64[] values = new UInt64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt64(); - } - - Vector64 value = Vector64.Create(values[0]); - - UInt64 result = value.ToScalar(); - ValidateResult(result, values); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - UInt64[] values = new UInt64[ElementCount]; - - for (int i = 0; i < ElementCount; i++) - { - values[i] = TestLibrary.Generator.GetUInt64(); - } - - Vector64 value = Vector64.Create(values[0]); - - object result = typeof(Vector64) - .GetMethod(nameof(Vector64.ToScalar)) - .MakeGenericMethod(typeof(UInt64)) - .Invoke(null, new object[] { value }); - - ValidateResult((UInt64)(result), values); - } - - private void ValidateResult(UInt64 result, UInt64[] values, [CallerMemberName] string method = "") - { - if (result != values[0]) - { - TestLibrary.TestFramework.LogInformation($"Vector64.ToScalar(): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" values: ({string.Join(", ", values)})"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToString.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToString.Byte.cs deleted file mode 100644 index c5c049ed54b5..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToString.Byte.cs +++ /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. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private unsafe static void ToStringByte() - { - int size = Unsafe.SizeOf>() / sizeof(Byte); - Byte[] values = new Byte[size]; - - for (int i = 0; i < size; i++) - { - values[i] = TestLibrary.Generator.GetByte(); - } - - Vector64 vector = Vector64.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - string actual = vector.ToString(); - - string expected = '<' + string.Join(", ", values.Select(x => x.ToString("G", System.Globalization.CultureInfo.InvariantCulture))) + '>'; - - bool succeeded = string.Equals(expected, actual, StringComparison.Ordinal); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64ByteToString: Vector64.ToString() returned an unexpected result."); - TestLibrary.TestFramework.LogInformation($"Expected: {expected}"); - TestLibrary.TestFramework.LogInformation($"Actual: {actual}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToString.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToString.Double.cs deleted file mode 100644 index 24cc68b32b52..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToString.Double.cs +++ /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. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private unsafe static void ToStringDouble() - { - int size = Unsafe.SizeOf>() / sizeof(Double); - Double[] values = new Double[size]; - - for (int i = 0; i < size; i++) - { - values[i] = TestLibrary.Generator.GetDouble(); - } - - Vector64 vector = Vector64.Create(values[0]); - string actual = vector.ToString(); - - string expected = '<' + string.Join(", ", values.Select(x => x.ToString("G", System.Globalization.CultureInfo.InvariantCulture))) + '>'; - - bool succeeded = string.Equals(expected, actual, StringComparison.Ordinal); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64DoubleToString: Vector64.ToString() returned an unexpected result."); - TestLibrary.TestFramework.LogInformation($"Expected: {expected}"); - TestLibrary.TestFramework.LogInformation($"Actual: {actual}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToString.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToString.Int16.cs deleted file mode 100644 index 5d61e899ca6f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToString.Int16.cs +++ /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. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private unsafe static void ToStringInt16() - { - int size = Unsafe.SizeOf>() / sizeof(Int16); - Int16[] values = new Int16[size]; - - for (int i = 0; i < size; i++) - { - values[i] = TestLibrary.Generator.GetInt16(); - } - - Vector64 vector = Vector64.Create(values[0], values[1], values[2], values[3]); - string actual = vector.ToString(); - - string expected = '<' + string.Join(", ", values.Select(x => x.ToString("G", System.Globalization.CultureInfo.InvariantCulture))) + '>'; - - bool succeeded = string.Equals(expected, actual, StringComparison.Ordinal); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64Int16ToString: Vector64.ToString() returned an unexpected result."); - TestLibrary.TestFramework.LogInformation($"Expected: {expected}"); - TestLibrary.TestFramework.LogInformation($"Actual: {actual}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToString.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToString.Int32.cs deleted file mode 100644 index 4228ec15b69e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToString.Int32.cs +++ /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. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private unsafe static void ToStringInt32() - { - int size = Unsafe.SizeOf>() / sizeof(Int32); - Int32[] values = new Int32[size]; - - for (int i = 0; i < size; i++) - { - values[i] = TestLibrary.Generator.GetInt32(); - } - - Vector64 vector = Vector64.Create(values[0], values[1]); - string actual = vector.ToString(); - - string expected = '<' + string.Join(", ", values.Select(x => x.ToString("G", System.Globalization.CultureInfo.InvariantCulture))) + '>'; - - bool succeeded = string.Equals(expected, actual, StringComparison.Ordinal); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64Int32ToString: Vector64.ToString() returned an unexpected result."); - TestLibrary.TestFramework.LogInformation($"Expected: {expected}"); - TestLibrary.TestFramework.LogInformation($"Actual: {actual}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToString.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToString.Int64.cs deleted file mode 100644 index 382d9afdb038..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToString.Int64.cs +++ /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. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private unsafe static void ToStringInt64() - { - int size = Unsafe.SizeOf>() / sizeof(Int64); - Int64[] values = new Int64[size]; - - for (int i = 0; i < size; i++) - { - values[i] = TestLibrary.Generator.GetInt64(); - } - - Vector64 vector = Vector64.Create(values[0]); - string actual = vector.ToString(); - - string expected = '<' + string.Join(", ", values.Select(x => x.ToString("G", System.Globalization.CultureInfo.InvariantCulture))) + '>'; - - bool succeeded = string.Equals(expected, actual, StringComparison.Ordinal); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64Int64ToString: Vector64.ToString() returned an unexpected result."); - TestLibrary.TestFramework.LogInformation($"Expected: {expected}"); - TestLibrary.TestFramework.LogInformation($"Actual: {actual}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToString.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToString.SByte.cs deleted file mode 100644 index 066fe079e24d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToString.SByte.cs +++ /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. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private unsafe static void ToStringSByte() - { - int size = Unsafe.SizeOf>() / sizeof(SByte); - SByte[] values = new SByte[size]; - - for (int i = 0; i < size; i++) - { - values[i] = TestLibrary.Generator.GetSByte(); - } - - Vector64 vector = Vector64.Create(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7]); - string actual = vector.ToString(); - - string expected = '<' + string.Join(", ", values.Select(x => x.ToString("G", System.Globalization.CultureInfo.InvariantCulture))) + '>'; - - bool succeeded = string.Equals(expected, actual, StringComparison.Ordinal); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64SByteToString: Vector64.ToString() returned an unexpected result."); - TestLibrary.TestFramework.LogInformation($"Expected: {expected}"); - TestLibrary.TestFramework.LogInformation($"Actual: {actual}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToString.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToString.Single.cs deleted file mode 100644 index e7a907ad3d05..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToString.Single.cs +++ /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. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private unsafe static void ToStringSingle() - { - int size = Unsafe.SizeOf>() / sizeof(Single); - Single[] values = new Single[size]; - - for (int i = 0; i < size; i++) - { - values[i] = TestLibrary.Generator.GetSingle(); - } - - Vector64 vector = Vector64.Create(values[0], values[1]); - string actual = vector.ToString(); - - string expected = '<' + string.Join(", ", values.Select(x => x.ToString("G", System.Globalization.CultureInfo.InvariantCulture))) + '>'; - - bool succeeded = string.Equals(expected, actual, StringComparison.Ordinal); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64SingleToString: Vector64.ToString() returned an unexpected result."); - TestLibrary.TestFramework.LogInformation($"Expected: {expected}"); - TestLibrary.TestFramework.LogInformation($"Actual: {actual}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToString.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToString.UInt16.cs deleted file mode 100644 index 6c4b200c6d1f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToString.UInt16.cs +++ /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. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private unsafe static void ToStringUInt16() - { - int size = Unsafe.SizeOf>() / sizeof(UInt16); - UInt16[] values = new UInt16[size]; - - for (int i = 0; i < size; i++) - { - values[i] = TestLibrary.Generator.GetUInt16(); - } - - Vector64 vector = Vector64.Create(values[0], values[1], values[2], values[3]); - string actual = vector.ToString(); - - string expected = '<' + string.Join(", ", values.Select(x => x.ToString("G", System.Globalization.CultureInfo.InvariantCulture))) + '>'; - - bool succeeded = string.Equals(expected, actual, StringComparison.Ordinal); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64UInt16ToString: Vector64.ToString() returned an unexpected result."); - TestLibrary.TestFramework.LogInformation($"Expected: {expected}"); - TestLibrary.TestFramework.LogInformation($"Actual: {actual}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToString.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToString.UInt32.cs deleted file mode 100644 index 5d88d769b0cc..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToString.UInt32.cs +++ /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. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private unsafe static void ToStringUInt32() - { - int size = Unsafe.SizeOf>() / sizeof(UInt32); - UInt32[] values = new UInt32[size]; - - for (int i = 0; i < size; i++) - { - values[i] = TestLibrary.Generator.GetUInt32(); - } - - Vector64 vector = Vector64.Create(values[0], values[1]); - string actual = vector.ToString(); - - string expected = '<' + string.Join(", ", values.Select(x => x.ToString("G", System.Globalization.CultureInfo.InvariantCulture))) + '>'; - - bool succeeded = string.Equals(expected, actual, StringComparison.Ordinal); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64UInt32ToString: Vector64.ToString() returned an unexpected result."); - TestLibrary.TestFramework.LogInformation($"Expected: {expected}"); - TestLibrary.TestFramework.LogInformation($"Actual: {actual}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToString.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToString.UInt64.cs deleted file mode 100644 index a010010d9af1..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/ToString.UInt64.cs +++ /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. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private unsafe static void ToStringUInt64() - { - int size = Unsafe.SizeOf>() / sizeof(UInt64); - UInt64[] values = new UInt64[size]; - - for (int i = 0; i < size; i++) - { - values[i] = TestLibrary.Generator.GetUInt64(); - } - - Vector64 vector = Vector64.Create(values[0]); - string actual = vector.ToString(); - - string expected = '<' + string.Join(", ", values.Select(x => x.ToString("G", System.Globalization.CultureInfo.InvariantCulture))) + '>'; - - bool succeeded = string.Equals(expected, actual, StringComparison.Ordinal); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64UInt64ToString: Vector64.ToString() returned an unexpected result."); - TestLibrary.TestFramework.LogInformation($"Expected: {expected}"); - TestLibrary.TestFramework.LogInformation($"Actual: {actual}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/Zero.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/Zero.Byte.cs deleted file mode 100644 index eda5abb31c8b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/Zero.Byte.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ZeroByte() - { - var test = new VectorZero__ZeroByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorZero__ZeroByte - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector64 result = Vector64.Zero; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector64) - .GetProperty(nameof(Vector64.Zero), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector64)(result)); - } - - private void ValidateResult(Vector64 result, [CallerMemberName] string method = "") - { - Byte[] resultElements = new Byte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private void ValidateResult(Byte[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.Zero(Byte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/Zero.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/Zero.Double.cs deleted file mode 100644 index 348078393b04..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/Zero.Double.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ZeroDouble() - { - var test = new VectorZero__ZeroDouble(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorZero__ZeroDouble - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector64 result = Vector64.Zero; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector64) - .GetProperty(nameof(Vector64.Zero), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector64)(result)); - } - - private void ValidateResult(Vector64 result, [CallerMemberName] string method = "") - { - Double[] resultElements = new Double[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private void ValidateResult(Double[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.Zero(Double): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/Zero.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/Zero.Int16.cs deleted file mode 100644 index 116cf809b51d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/Zero.Int16.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ZeroInt16() - { - var test = new VectorZero__ZeroInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorZero__ZeroInt16 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector64 result = Vector64.Zero; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector64) - .GetProperty(nameof(Vector64.Zero), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector64)(result)); - } - - private void ValidateResult(Vector64 result, [CallerMemberName] string method = "") - { - Int16[] resultElements = new Int16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private void ValidateResult(Int16[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.Zero(Int16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/Zero.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/Zero.Int32.cs deleted file mode 100644 index 04132d171b75..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/Zero.Int32.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ZeroInt32() - { - var test = new VectorZero__ZeroInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorZero__ZeroInt32 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector64 result = Vector64.Zero; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector64) - .GetProperty(nameof(Vector64.Zero), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector64)(result)); - } - - private void ValidateResult(Vector64 result, [CallerMemberName] string method = "") - { - Int32[] resultElements = new Int32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private void ValidateResult(Int32[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.Zero(Int32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/Zero.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/Zero.Int64.cs deleted file mode 100644 index 22e4b6246659..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/Zero.Int64.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ZeroInt64() - { - var test = new VectorZero__ZeroInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorZero__ZeroInt64 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector64 result = Vector64.Zero; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector64) - .GetProperty(nameof(Vector64.Zero), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector64)(result)); - } - - private void ValidateResult(Vector64 result, [CallerMemberName] string method = "") - { - Int64[] resultElements = new Int64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private void ValidateResult(Int64[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.Zero(Int64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/Zero.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/Zero.SByte.cs deleted file mode 100644 index 5fd98acdd181..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/Zero.SByte.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ZeroSByte() - { - var test = new VectorZero__ZeroSByte(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorZero__ZeroSByte - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector64 result = Vector64.Zero; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector64) - .GetProperty(nameof(Vector64.Zero), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector64)(result)); - } - - private void ValidateResult(Vector64 result, [CallerMemberName] string method = "") - { - SByte[] resultElements = new SByte[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private void ValidateResult(SByte[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.Zero(SByte): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/Zero.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/Zero.Single.cs deleted file mode 100644 index dfdae42d0cb0..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/Zero.Single.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ZeroSingle() - { - var test = new VectorZero__ZeroSingle(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorZero__ZeroSingle - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector64 result = Vector64.Zero; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector64) - .GetProperty(nameof(Vector64.Zero), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector64)(result)); - } - - private void ValidateResult(Vector64 result, [CallerMemberName] string method = "") - { - Single[] resultElements = new Single[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private void ValidateResult(Single[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.Zero(Single): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/Zero.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/Zero.UInt16.cs deleted file mode 100644 index 41532e32c7c7..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/Zero.UInt16.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ZeroUInt16() - { - var test = new VectorZero__ZeroUInt16(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorZero__ZeroUInt16 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector64 result = Vector64.Zero; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector64) - .GetProperty(nameof(Vector64.Zero), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector64)(result)); - } - - private void ValidateResult(Vector64 result, [CallerMemberName] string method = "") - { - UInt16[] resultElements = new UInt16[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private void ValidateResult(UInt16[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.Zero(UInt16): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/Zero.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/Zero.UInt32.cs deleted file mode 100644 index 1982334fae72..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/Zero.UInt32.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ZeroUInt32() - { - var test = new VectorZero__ZeroUInt32(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorZero__ZeroUInt32 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector64 result = Vector64.Zero; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector64) - .GetProperty(nameof(Vector64.Zero), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector64)(result)); - } - - private void ValidateResult(Vector64 result, [CallerMemberName] string method = "") - { - UInt32[] resultElements = new UInt32[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private void ValidateResult(UInt32[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.Zero(UInt32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/Zero.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/Zero.UInt64.cs deleted file mode 100644 index 8adc50b27c7b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/General/Vector64_1/Zero.UInt64.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\General\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; - -namespace JIT.HardwareIntrinsics.General -{ - public static partial class Program - { - private static void ZeroUInt64() - { - var test = new VectorZero__ZeroUInt64(); - - // Validates basic functionality works - test.RunBasicScenario(); - - // Validates calling via reflection works - test.RunReflectionScenario(); - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class VectorZero__ZeroUInt64 - { - private static readonly int LargestVectorSize = 8; - - private static readonly int ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - public bool Succeeded { get; set; } = true; - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - Vector64 result = Vector64.Zero; - - ValidateResult(result); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - object result = typeof(Vector64) - .GetProperty(nameof(Vector64.Zero), new Type[] { }) - .GetGetMethod() - .Invoke(null, new object[] { }); - - ValidateResult((Vector64)(result)); - } - - private void ValidateResult(Vector64 result, [CallerMemberName] string method = "") - { - UInt64[] resultElements = new UInt64[ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref resultElements[0]), result); - ValidateResult(resultElements, method); - } - - private void ValidateResult(UInt64[] resultElements, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < ElementCount; i++) - { - if (resultElements[i] != 0) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"Vector64.Zero(UInt64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", resultElements)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Add.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Add.Double.cs deleted file mode 100644 index 958f4d3e70e6..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Add.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AddDouble() - { - var test = new SimpleBinaryOpTest__AddDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddDouble testClass) - { - var result = Avx.Add(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.Add( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.Add( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.Add( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.Add( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Add), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Add), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Add), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.Add( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.Add( - Avx.LoadVector256((Double*)(pClsVar1)), - Avx.LoadVector256((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddDouble(); - var result = Avx.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.Add( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.Add(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.Add( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.Add( - Avx.LoadVector256((Double*)(&test._fld1)), - Avx.LoadVector256((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(left[0] + right[0]) != BitConverter.DoubleToInt64Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(left[i] + right[i]) != BitConverter.DoubleToInt64Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.Add)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Add.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Add.Single.cs deleted file mode 100644 index 1028c6bae848..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Add.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AddSingle() - { - var test = new SimpleBinaryOpTest__AddSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddSingle testClass) - { - var result = Avx.Add(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.Add( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.Add( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.Add( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.Add( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Add), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Add), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Add), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.Add( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.Add( - Avx.LoadVector256((Single*)(pClsVar1)), - Avx.LoadVector256((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddSingle(); - var result = Avx.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.Add( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.Add(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.Add( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.Add( - Avx.LoadVector256((Single*)(&test._fld1)), - Avx.LoadVector256((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(left[0] + right[0]) != BitConverter.SingleToInt32Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(left[i] + right[i]) != BitConverter.SingleToInt32Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.Add)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/AddSubtract.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/AddSubtract.Double.cs deleted file mode 100644 index 2d178ffc6f5b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/AddSubtract.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AddSubtractDouble() - { - var test = new SimpleBinaryOpTest__AddSubtractDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddSubtractDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddSubtractDouble testClass) - { - var result = Avx.AddSubtract(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddSubtractDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.AddSubtract( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddSubtractDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddSubtractDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.AddSubtract( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.AddSubtract( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.AddSubtract( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.AddSubtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.AddSubtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.AddSubtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.AddSubtract( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.AddSubtract( - Avx.LoadVector256((Double*)(pClsVar1)), - Avx.LoadVector256((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.AddSubtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.AddSubtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.AddSubtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddSubtractDouble(); - var result = Avx.AddSubtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddSubtractDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.AddSubtract( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.AddSubtract(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.AddSubtract( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.AddSubtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.AddSubtract( - Avx.LoadVector256((Double*)(&test._fld1)), - Avx.LoadVector256((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(left[0] - right[0]) != BitConverter.DoubleToInt64Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (((i % 2 != 0) && (BitConverter.DoubleToInt64Bits(left[i] + right[i]) != BitConverter.DoubleToInt64Bits(result[i]))) || ((i % 2 == 0) && (BitConverter.DoubleToInt64Bits(left[i] - right[i]) != BitConverter.DoubleToInt64Bits(result[i])))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.AddSubtract)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/AddSubtract.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/AddSubtract.Single.cs deleted file mode 100644 index bf69a69251bc..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/AddSubtract.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AddSubtractSingle() - { - var test = new SimpleBinaryOpTest__AddSubtractSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddSubtractSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddSubtractSingle testClass) - { - var result = Avx.AddSubtract(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddSubtractSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.AddSubtract( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddSubtractSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddSubtractSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.AddSubtract( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.AddSubtract( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.AddSubtract( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.AddSubtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.AddSubtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.AddSubtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.AddSubtract( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.AddSubtract( - Avx.LoadVector256((Single*)(pClsVar1)), - Avx.LoadVector256((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.AddSubtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.AddSubtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.AddSubtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddSubtractSingle(); - var result = Avx.AddSubtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddSubtractSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.AddSubtract( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.AddSubtract(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.AddSubtract( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.AddSubtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.AddSubtract( - Avx.LoadVector256((Single*)(&test._fld1)), - Avx.LoadVector256((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(left[0] - right[0]) != BitConverter.SingleToInt32Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (((i % 2 != 0) && (BitConverter.SingleToInt32Bits(left[i] + right[i]) != BitConverter.SingleToInt32Bits(result[i]))) || ((i % 2 == 0) && (BitConverter.SingleToInt32Bits(left[i] - right[i]) != BitConverter.SingleToInt32Bits(result[i])))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.AddSubtract)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/And.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/And.Double.cs deleted file mode 100644 index e4343e68c78f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/And.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndDouble() - { - var test = new SimpleBinaryOpTest__AndDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndDouble testClass) - { - var result = Avx.And(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.And( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.And( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.And( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.And( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.And), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.And), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.And), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.And( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.And( - Avx.LoadVector256((Double*)(pClsVar1)), - Avx.LoadVector256((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndDouble(); - var result = Avx.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.And( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.And(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.And( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.And( - Avx.LoadVector256((Double*)(&test._fld1)), - Avx.LoadVector256((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((BitConverter.DoubleToInt64Bits(left[0]) & BitConverter.DoubleToInt64Bits(right[0])) != BitConverter.DoubleToInt64Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((BitConverter.DoubleToInt64Bits(left[i]) & BitConverter.DoubleToInt64Bits(right[i])) != BitConverter.DoubleToInt64Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.And)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/And.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/And.Single.cs deleted file mode 100644 index 9abd315e93be..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/And.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndSingle() - { - var test = new SimpleBinaryOpTest__AndSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndSingle testClass) - { - var result = Avx.And(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.And( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.And( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.And( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.And( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.And), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.And), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.And), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.And( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.And( - Avx.LoadVector256((Single*)(pClsVar1)), - Avx.LoadVector256((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndSingle(); - var result = Avx.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.And( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.And(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.And( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.And( - Avx.LoadVector256((Single*)(&test._fld1)), - Avx.LoadVector256((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((BitConverter.SingleToInt32Bits(left[0]) & BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((BitConverter.SingleToInt32Bits(left[i]) & BitConverter.SingleToInt32Bits(right[i])) != BitConverter.SingleToInt32Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.And)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/AndNot.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/AndNot.Double.cs deleted file mode 100644 index d6509b4a1544..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/AndNot.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndNotDouble() - { - var test = new SimpleBinaryOpTest__AndNotDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndNotDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndNotDouble testClass) - { - var result = Avx.AndNot(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndNotDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.AndNot( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndNotDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndNotDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.AndNot( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.AndNot( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.AndNot( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.AndNot), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.AndNot), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.AndNot), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.AndNot( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.AndNot( - Avx.LoadVector256((Double*)(pClsVar1)), - Avx.LoadVector256((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndNotDouble(); - var result = Avx.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndNotDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.AndNot( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.AndNot(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.AndNot( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.AndNot( - Avx.LoadVector256((Double*)(&test._fld1)), - Avx.LoadVector256((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (((~BitConverter.DoubleToInt64Bits(left[0])) & BitConverter.DoubleToInt64Bits(right[0])) != BitConverter.DoubleToInt64Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (((~BitConverter.DoubleToInt64Bits(left[i])) & BitConverter.DoubleToInt64Bits(right[i])) != BitConverter.DoubleToInt64Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.AndNot)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/AndNot.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/AndNot.Single.cs deleted file mode 100644 index bcde820c8f01..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/AndNot.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndNotSingle() - { - var test = new SimpleBinaryOpTest__AndNotSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndNotSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndNotSingle testClass) - { - var result = Avx.AndNot(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndNotSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.AndNot( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndNotSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndNotSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.AndNot( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.AndNot( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.AndNot( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.AndNot), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.AndNot), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.AndNot), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.AndNot( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.AndNot( - Avx.LoadVector256((Single*)(pClsVar1)), - Avx.LoadVector256((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndNotSingle(); - var result = Avx.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndNotSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.AndNot( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.AndNot(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.AndNot( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.AndNot( - Avx.LoadVector256((Single*)(&test._fld1)), - Avx.LoadVector256((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (((~BitConverter.SingleToInt32Bits(left[0])) & BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (((~BitConverter.SingleToInt32Bits(left[i])) & BitConverter.SingleToInt32Bits(right[i])) != BitConverter.SingleToInt32Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.AndNot)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Blend.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Blend.cs deleted file mode 100644 index 3040a35d493e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Blend.cs +++ /dev/null @@ -1,247 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Avx.IsSupported) - { - using (TestTable floatTable = new TestTable(new float[8] { 1, -5, 100, 0, 1, -5, 100, 0 }, new float[8] { 22, -1, -50, 0, 22, -1, -50, 0 }, new float[8])) - { - var vf1 = Unsafe.Read>(floatTable.inArray1Ptr); - var vf2 = Unsafe.Read>(floatTable.inArray2Ptr); - - // SDDD SDDD - var vf3 = Avx.Blend(vf1, vf2, 1); - Unsafe.Write(floatTable.outArrayPtr, vf3); - - if (!floatTable.CheckResult((x, y, z) => (z[0] == y[0]) && (z[1] == x[1]) && - (z[2] == x[2]) && (z[3] == x[3]) && - (z[4] == x[4]) && (z[5] == x[5]) && - (z[6] == x[6]) && (z[7] == x[7]))) - { - Console.WriteLine("0Avx Blend failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - // DSDD DDDD - vf3 = Avx.Blend(vf1, vf2, 2); - Unsafe.Write(floatTable.outArrayPtr, vf3); - - if (!floatTable.CheckResult((x, y, z) => (z[0] == x[0]) && (z[1] == y[1]) && - (z[2] == x[2]) && (z[3] == x[3]) && - (z[4] == x[4]) && (z[5] == x[5]) && - (z[6] == x[6]) && (z[7] == x[7]))) - { - Console.WriteLine("Avx Blend failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - // DDSD DDDD - vf3 = Avx.Blend(vf1, vf2, 4); - Unsafe.Write(floatTable.outArrayPtr, vf3); - - if (!floatTable.CheckResult((x, y, z) => (z[0] == x[0]) && (z[1] == x[1]) && - (z[2] == y[2]) && (z[3] == x[3]) && - (z[4] == x[4]) && (z[5] == x[5]) && - (z[6] == x[6]) && (z[7] == x[7]))) - { - Console.WriteLine("Avx Blend failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - // SDSD SDSD - vf3 = Avx.Blend(vf1, vf2, 85); - Unsafe.Write(floatTable.outArrayPtr, vf3); - - if (!floatTable.CheckResult((x, y, z) => (z[0] == y[0]) && (z[1] == x[1]) && - (z[2] == y[2]) && (z[3] == x[3]) && - (z[4] == y[4]) && (z[5] == x[5]) && - (z[6] == y[6]) && (z[7] == x[7]))) - { - Console.WriteLine("Avx Blend failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - // SDDD DDDD - vf3 = (Vector256)typeof(Avx).GetMethod(nameof(Avx.Blend), new Type[] { vf1.GetType(), vf2.GetType(), typeof(byte) }).Invoke(null, new object[] { vf1, vf2, (byte)(1) }); - Unsafe.Write(floatTable.outArrayPtr, vf3); - - if (!floatTable.CheckResult((x, y, z) => (z[0] == y[0]) && (z[1] == x[1]) && - (z[2] == x[2]) && (z[3] == x[3]) && - (z[4] == x[4]) && (z[5] == x[5]) && - (z[6] == x[6]) && (z[7] == x[7]))) - { - Console.WriteLine("Avx Blend failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - using (TestTable doubleTable = new TestTable(new double[4] { 1, -5, 100, 0 }, new double[4] { 22, -1, -50, 0 }, new double[4])) - { - var vf1 = Unsafe.Read>(doubleTable.inArray1Ptr); - var vf2 = Unsafe.Read>(doubleTable.inArray2Ptr); - - // DD DD - var vf3 = Avx.Blend(vf1, vf2, 0); - Unsafe.Write(doubleTable.outArrayPtr, vf3); - - if (!doubleTable.CheckResult((x, y, z) => (z[0] == x[0]) && (z[1] == x[1]) && - (z[2] == x[2]) && (z[3] == x[3]))) - { - Console.WriteLine("Avx Blend failed on double:"); - foreach (var item in doubleTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - // SD DD - vf3 = Avx.Blend(vf1, vf2, 1); - Unsafe.Write(doubleTable.outArrayPtr, vf3); - - if (!doubleTable.CheckResult((x, y, z) => (z[0] == y[0]) && (z[1] == x[1]) && - (z[2] == x[2]) && (z[3] == x[3]))) - { - Console.WriteLine("Avx Blend failed on double:"); - foreach (var item in doubleTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - // DS DD - vf3 = Avx.Blend(vf1, vf2, 2); - Unsafe.Write(doubleTable.outArrayPtr, vf3); - - if (!doubleTable.CheckResult((x, y, z) => (z[0] == x[0]) && (z[1] == y[1]) && - (z[2] == x[2]) && (z[3] == x[3]))) - { - Console.WriteLine("Avx Blend failed on double:"); - foreach (var item in doubleTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - // SS DD - vf3 = Avx.Blend(vf1, vf2, 51); - Unsafe.Write(doubleTable.outArrayPtr, vf3); - - if (!doubleTable.CheckResult((x, y, z) => (z[0] == y[0]) && (z[1] == y[1]) && - (z[2] == x[2]) && (z[3] == x[3]))) - { - Console.WriteLine("Avx Blend failed on double:"); - foreach (var item in doubleTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - // DD DD - vf3 = (Vector256)typeof(Avx).GetMethod(nameof(Avx.Blend), new Type[] { vf1.GetType(), vf2.GetType(), typeof(byte) }).Invoke(null, new object[] { vf1, vf2, (byte)(0) }); - Unsafe.Write(doubleTable.outArrayPtr, vf3); - - if (!doubleTable.CheckResult((x, y, z) => (z[0] == x[0]) && (z[1] == x[1]) && - (z[2] == x[2]) && (z[3] == x[3]))) - { - Console.WriteLine("Avx Blend failed on double:"); - foreach (var item in doubleTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - } - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T : struct - { - public T[] inArray1; - public T[] inArray2; - public T[] outArray; - - public void* inArray1Ptr => inHandle1.AddrOfPinnedObject().ToPointer(); - public void* inArray2Ptr => inHandle2.AddrOfPinnedObject().ToPointer(); - public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); - - GCHandle inHandle1; - GCHandle inHandle2; - GCHandle outHandle; - public TestTable(T[] a, T[] b, T[] c) - { - this.inArray1 = a; - this.inArray2 = b; - this.outArray = c; - - inHandle1 = GCHandle.Alloc(inArray1, GCHandleType.Pinned); - inHandle2 = GCHandle.Alloc(inArray2, GCHandleType.Pinned); - outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); - } - public bool CheckResult(Func check) - { - return check(inArray1, inArray2, outArray); - } - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/BlendVariable.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/BlendVariable.Double.cs deleted file mode 100644 index b342c5790527..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/BlendVariable.Double.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendVariableDouble() - { - var test = new SimpleTernaryOpTest__BlendVariableDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__BlendVariableDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] inArray3, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - public Vector256 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (double)(((i % 2) == 0) ? -0.0 : 1.0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__BlendVariableDouble testClass) - { - var result = Avx.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__BlendVariableDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Avx.BlendVariable( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)), - Avx.LoadVector256((Double*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - private static Double[] _data3 = new Double[Op3ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - private static Vector256 _clsVar3; - - private Vector256 _fld1; - private Vector256 _fld2; - private Vector256 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__BlendVariableDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (double)(((i % 2) == 0) ? -0.0 : 1.0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__BlendVariableDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (double)(((i % 2) == 0) ? -0.0 : 1.0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (double)(((i % 2) == 0) ? -0.0 : 1.0); } - _dataTable = new DataTable(_data1, _data2, _data3, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.BlendVariable( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.BlendVariable( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.BlendVariable( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.BlendVariable), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.BlendVariable), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.BlendVariable), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.BlendVariable( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - fixed (Vector256* pClsVar3 = &_clsVar3) - { - var result = Avx.BlendVariable( - Avx.LoadVector256((Double*)(pClsVar1)), - Avx.LoadVector256((Double*)(pClsVar2)), - Avx.LoadVector256((Double*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Avx.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadVector256((Double*)(_dataTable.inArray3Ptr)); - var result = Avx.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray3Ptr)); - var result = Avx.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__BlendVariableDouble(); - var result = Avx.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__BlendVariableDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - fixed (Vector256* pFld3 = &test._fld3) - { - var result = Avx.BlendVariable( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)), - Avx.LoadVector256((Double*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Avx.BlendVariable( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)), - Avx.LoadVector256((Double*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.BlendVariable( - Avx.LoadVector256((Double*)(&test._fld1)), - Avx.LoadVector256((Double*)(&test._fld2)), - Avx.LoadVector256((Double*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, Vector256 op3, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] inArray3 = new Double[Op3ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] inArray3 = new Double[Op3ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] secondOp, Double[] thirdOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (((BitConverter.DoubleToInt64Bits(thirdOp[0]) >> 63) & 1) == 1 ? BitConverter.DoubleToInt64Bits(secondOp[0]) != BitConverter.DoubleToInt64Bits(result[0]) : BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (((BitConverter.DoubleToInt64Bits(thirdOp[i]) >> 63) & 1) == 1 ? BitConverter.DoubleToInt64Bits(secondOp[i]) != BitConverter.DoubleToInt64Bits(result[i]) : BitConverter.DoubleToInt64Bits(firstOp[i]) != BitConverter.DoubleToInt64Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.BlendVariable)}(Vector256, Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/BlendVariable.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/BlendVariable.Single.cs deleted file mode 100644 index 4d0b4789f15a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/BlendVariable.Single.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendVariableSingle() - { - var test = new SimpleTernaryOpTest__BlendVariableSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__BlendVariableSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] inArray3, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - public Vector256 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (float)(((i % 2) == 0) ? -0.0 : 1.0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__BlendVariableSingle testClass) - { - var result = Avx.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__BlendVariableSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Avx.BlendVariable( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)), - Avx.LoadVector256((Single*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - private static Single[] _data3 = new Single[Op3ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - private static Vector256 _clsVar3; - - private Vector256 _fld1; - private Vector256 _fld2; - private Vector256 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__BlendVariableSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (float)(((i % 2) == 0) ? -0.0 : 1.0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__BlendVariableSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (float)(((i % 2) == 0) ? -0.0 : 1.0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (float)(((i % 2) == 0) ? -0.0 : 1.0); } - _dataTable = new DataTable(_data1, _data2, _data3, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.BlendVariable( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.BlendVariable( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.BlendVariable( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.BlendVariable), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.BlendVariable), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.BlendVariable), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.BlendVariable( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - fixed (Vector256* pClsVar3 = &_clsVar3) - { - var result = Avx.BlendVariable( - Avx.LoadVector256((Single*)(pClsVar1)), - Avx.LoadVector256((Single*)(pClsVar2)), - Avx.LoadVector256((Single*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Avx.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadVector256((Single*)(_dataTable.inArray3Ptr)); - var result = Avx.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray3Ptr)); - var result = Avx.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__BlendVariableSingle(); - var result = Avx.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__BlendVariableSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - fixed (Vector256* pFld3 = &test._fld3) - { - var result = Avx.BlendVariable( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)), - Avx.LoadVector256((Single*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Avx.BlendVariable( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)), - Avx.LoadVector256((Single*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.BlendVariable( - Avx.LoadVector256((Single*)(&test._fld1)), - Avx.LoadVector256((Single*)(&test._fld2)), - Avx.LoadVector256((Single*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, Vector256 op3, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] inArray3 = new Single[Op3ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] inArray3 = new Single[Op3ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] secondOp, Single[] thirdOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (((BitConverter.SingleToInt32Bits(thirdOp[0]) >> 31) & 1) == 1 ? BitConverter.SingleToInt32Bits(secondOp[0]) != BitConverter.SingleToInt32Bits(result[0]) : BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (((BitConverter.SingleToInt32Bits(thirdOp[i]) >> 31) & 1) == 1 ? BitConverter.SingleToInt32Bits(secondOp[i]) != BitConverter.SingleToInt32Bits(result[i]) : BitConverter.SingleToInt32Bits(firstOp[i]) != BitConverter.SingleToInt32Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.BlendVariable)}(Vector256, Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/BroadcastScalarToVector128.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/BroadcastScalarToVector128.Single.cs deleted file mode 100644 index 88fe4f8013a2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/BroadcastScalarToVector128.Single.cs +++ /dev/null @@ -1,165 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector128Single() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128Single(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector128Single - { - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data = new Single[Op1ElementCount]; - - private SimpleUnaryOpTest__DataTable _dataTable; - - public SimpleUnaryOpTest__BroadcastScalarToVector128Single() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.BroadcastScalarToVector128( - (Single*)(_dataTable.inArrayPtr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.BroadcastScalarToVector128), new Type[] { typeof(Single*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArrayPtr, typeof(Single*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Single[] inArray = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Single[] inArray = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.BroadcastScalarToVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/BroadcastScalarToVector256.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/BroadcastScalarToVector256.Double.cs deleted file mode 100644 index feae5a6c4927..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/BroadcastScalarToVector256.Double.cs +++ /dev/null @@ -1,165 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector256Double() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256Double(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector256Double - { - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data = new Double[Op1ElementCount]; - - private SimpleUnaryOpTest__DataTable _dataTable; - - public SimpleUnaryOpTest__BroadcastScalarToVector256Double() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.BroadcastScalarToVector256( - (Double*)(_dataTable.inArrayPtr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.BroadcastScalarToVector256), new Type[] { typeof(Double*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArrayPtr, typeof(Double*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Double[] inArray = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Double[] inArray = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.BroadcastScalarToVector256)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/BroadcastScalarToVector256.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/BroadcastScalarToVector256.Single.cs deleted file mode 100644 index 73488dee2601..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/BroadcastScalarToVector256.Single.cs +++ /dev/null @@ -1,165 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector256Single() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256Single(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector256Single - { - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data = new Single[Op1ElementCount]; - - private SimpleUnaryOpTest__DataTable _dataTable; - - public SimpleUnaryOpTest__BroadcastScalarToVector256Single() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.BroadcastScalarToVector256( - (Single*)(_dataTable.inArrayPtr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.BroadcastScalarToVector256), new Type[] { typeof(Single*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArrayPtr, typeof(Single*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Single[] inArray = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Single[] inArray = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.BroadcastScalarToVector256)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Ceiling.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Ceiling.Double.cs deleted file mode 100644 index 492757e7be8a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Ceiling.Double.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CeilingDouble() - { - var test = new SimpleUnaryOpTest__CeilingDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__CeilingDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__CeilingDouble testClass) - { - var result = Avx.Ceiling(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__CeilingDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - { - var result = Avx.Ceiling( - Avx.LoadVector256((Double*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - - private static Vector256 _clsVar1; - - private Vector256 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__CeilingDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__CeilingDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.Ceiling( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.Ceiling( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.Ceiling( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Ceiling), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Ceiling), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Ceiling), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.Ceiling( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - { - var result = Avx.Ceiling( - Avx.LoadVector256((Double*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Avx.Ceiling(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var result = Avx.Ceiling(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var result = Avx.Ceiling(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__CeilingDouble(); - var result = Avx.Ceiling(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__CeilingDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - { - var result = Avx.Ceiling( - Avx.LoadVector256((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.Ceiling(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - { - var result = Avx.Ceiling( - Avx.LoadVector256((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.Ceiling(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.Ceiling( - Avx.LoadVector256((Double*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Ceiling(firstOp[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Ceiling(firstOp[i]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.Ceiling)}(Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Ceiling.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Ceiling.Single.cs deleted file mode 100644 index 67934ce65bc6..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Ceiling.Single.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CeilingSingle() - { - var test = new SimpleUnaryOpTest__CeilingSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__CeilingSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__CeilingSingle testClass) - { - var result = Avx.Ceiling(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__CeilingSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - { - var result = Avx.Ceiling( - Avx.LoadVector256((Single*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - - private static Vector256 _clsVar1; - - private Vector256 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__CeilingSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__CeilingSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.Ceiling( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.Ceiling( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.Ceiling( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Ceiling), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Ceiling), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Ceiling), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.Ceiling( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - { - var result = Avx.Ceiling( - Avx.LoadVector256((Single*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Avx.Ceiling(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var result = Avx.Ceiling(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var result = Avx.Ceiling(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__CeilingSingle(); - var result = Avx.Ceiling(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__CeilingSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - { - var result = Avx.Ceiling( - Avx.LoadVector256((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.Ceiling(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - { - var result = Avx.Ceiling( - Avx.LoadVector256((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.Ceiling(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.Ceiling( - Avx.LoadVector256((Single*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Ceiling(firstOp[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Ceiling(firstOp[i]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.Ceiling)}(Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareEqual.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareEqual.Double.cs deleted file mode 100644 index 426cec1fabff..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareEqual.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareEqualDouble() - { - var test = new SimpleBinaryOpTest__CompareEqualDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareEqualDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareEqualDouble testClass) - { - var result = Avx.CompareEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareEqualDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareEqual( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareEqualDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareEqualDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.CompareEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.CompareEqual( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.CompareEqual( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.CompareEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.CompareEqual( - Avx.LoadVector256((Double*)(pClsVar1)), - Avx.LoadVector256((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareEqualDouble(); - var result = Avx.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareEqualDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.CompareEqual( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.CompareEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareEqual( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.CompareEqual( - Avx.LoadVector256((Double*)(&test._fld1)), - Avx.LoadVector256((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] == right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] == right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.CompareEqual)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareEqual.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareEqual.Single.cs deleted file mode 100644 index a55be0f308ae..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareEqual.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareEqualSingle() - { - var test = new SimpleBinaryOpTest__CompareEqualSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareEqualSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareEqualSingle testClass) - { - var result = Avx.CompareEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareEqualSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareEqual( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareEqualSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareEqualSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.CompareEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.CompareEqual( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.CompareEqual( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.CompareEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.CompareEqual( - Avx.LoadVector256((Single*)(pClsVar1)), - Avx.LoadVector256((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareEqualSingle(); - var result = Avx.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareEqualSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.CompareEqual( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.CompareEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareEqual( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.CompareEqual( - Avx.LoadVector256((Single*)(&test._fld1)), - Avx.LoadVector256((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != ((left[0] == right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != ((left[i] == right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.CompareEqual)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareGreaterThan.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareGreaterThan.Double.cs deleted file mode 100644 index 5b3de25e34c0..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareGreaterThan.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareGreaterThanDouble() - { - var test = new SimpleBinaryOpTest__CompareGreaterThanDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareGreaterThanDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareGreaterThanDouble testClass) - { - var result = Avx.CompareGreaterThan(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareGreaterThanDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareGreaterThan( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareGreaterThanDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareGreaterThanDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.CompareGreaterThan( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.CompareGreaterThan( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.CompareGreaterThan( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareGreaterThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareGreaterThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareGreaterThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.CompareGreaterThan( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.CompareGreaterThan( - Avx.LoadVector256((Double*)(pClsVar1)), - Avx.LoadVector256((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareGreaterThanDouble(); - var result = Avx.CompareGreaterThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareGreaterThanDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.CompareGreaterThan( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.CompareGreaterThan(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareGreaterThan( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.CompareGreaterThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.CompareGreaterThan( - Avx.LoadVector256((Double*)(&test._fld1)), - Avx.LoadVector256((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] > right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] > right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.CompareGreaterThan)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareGreaterThan.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareGreaterThan.Single.cs deleted file mode 100644 index 077d765570dc..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareGreaterThan.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareGreaterThanSingle() - { - var test = new SimpleBinaryOpTest__CompareGreaterThanSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareGreaterThanSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareGreaterThanSingle testClass) - { - var result = Avx.CompareGreaterThan(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareGreaterThanSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareGreaterThan( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareGreaterThanSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareGreaterThanSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.CompareGreaterThan( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.CompareGreaterThan( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.CompareGreaterThan( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareGreaterThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareGreaterThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareGreaterThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.CompareGreaterThan( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.CompareGreaterThan( - Avx.LoadVector256((Single*)(pClsVar1)), - Avx.LoadVector256((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareGreaterThanSingle(); - var result = Avx.CompareGreaterThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareGreaterThanSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.CompareGreaterThan( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.CompareGreaterThan(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareGreaterThan( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.CompareGreaterThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.CompareGreaterThan( - Avx.LoadVector256((Single*)(&test._fld1)), - Avx.LoadVector256((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != ((left[0] > right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != ((left[i] > right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.CompareGreaterThan)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareGreaterThanOrEqual.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareGreaterThanOrEqual.Double.cs deleted file mode 100644 index 65fcffab50b1..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareGreaterThanOrEqual.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareGreaterThanOrEqualDouble() - { - var test = new SimpleBinaryOpTest__CompareGreaterThanOrEqualDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareGreaterThanOrEqualDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareGreaterThanOrEqualDouble testClass) - { - var result = Avx.CompareGreaterThanOrEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareGreaterThanOrEqualDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareGreaterThanOrEqual( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareGreaterThanOrEqualDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareGreaterThanOrEqualDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.CompareGreaterThanOrEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.CompareGreaterThanOrEqual( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.CompareGreaterThanOrEqual( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareGreaterThanOrEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareGreaterThanOrEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareGreaterThanOrEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.CompareGreaterThanOrEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.CompareGreaterThanOrEqual( - Avx.LoadVector256((Double*)(pClsVar1)), - Avx.LoadVector256((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.CompareGreaterThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareGreaterThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareGreaterThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareGreaterThanOrEqualDouble(); - var result = Avx.CompareGreaterThanOrEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareGreaterThanOrEqualDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.CompareGreaterThanOrEqual( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.CompareGreaterThanOrEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareGreaterThanOrEqual( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.CompareGreaterThanOrEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.CompareGreaterThanOrEqual( - Avx.LoadVector256((Double*)(&test._fld1)), - Avx.LoadVector256((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] >= right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] >= right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.CompareGreaterThanOrEqual)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareGreaterThanOrEqual.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareGreaterThanOrEqual.Single.cs deleted file mode 100644 index 435e27af292b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareGreaterThanOrEqual.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareGreaterThanOrEqualSingle() - { - var test = new SimpleBinaryOpTest__CompareGreaterThanOrEqualSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareGreaterThanOrEqualSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareGreaterThanOrEqualSingle testClass) - { - var result = Avx.CompareGreaterThanOrEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareGreaterThanOrEqualSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareGreaterThanOrEqual( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareGreaterThanOrEqualSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareGreaterThanOrEqualSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.CompareGreaterThanOrEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.CompareGreaterThanOrEqual( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.CompareGreaterThanOrEqual( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareGreaterThanOrEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareGreaterThanOrEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareGreaterThanOrEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.CompareGreaterThanOrEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.CompareGreaterThanOrEqual( - Avx.LoadVector256((Single*)(pClsVar1)), - Avx.LoadVector256((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.CompareGreaterThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareGreaterThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareGreaterThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareGreaterThanOrEqualSingle(); - var result = Avx.CompareGreaterThanOrEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareGreaterThanOrEqualSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.CompareGreaterThanOrEqual( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.CompareGreaterThanOrEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareGreaterThanOrEqual( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.CompareGreaterThanOrEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.CompareGreaterThanOrEqual( - Avx.LoadVector256((Single*)(&test._fld1)), - Avx.LoadVector256((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != ((left[0] >= right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != ((left[i] >= right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.CompareGreaterThanOrEqual)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareLessThan.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareLessThan.Double.cs deleted file mode 100644 index b16dd2331586..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareLessThan.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareLessThanDouble() - { - var test = new SimpleBinaryOpTest__CompareLessThanDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareLessThanDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareLessThanDouble testClass) - { - var result = Avx.CompareLessThan(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareLessThanDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareLessThan( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareLessThanDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareLessThanDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.CompareLessThan( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.CompareLessThan( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.CompareLessThan( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareLessThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareLessThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareLessThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.CompareLessThan( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.CompareLessThan( - Avx.LoadVector256((Double*)(pClsVar1)), - Avx.LoadVector256((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.CompareLessThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareLessThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareLessThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareLessThanDouble(); - var result = Avx.CompareLessThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareLessThanDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.CompareLessThan( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.CompareLessThan(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareLessThan( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.CompareLessThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.CompareLessThan( - Avx.LoadVector256((Double*)(&test._fld1)), - Avx.LoadVector256((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] < right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] < right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.CompareLessThan)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareLessThan.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareLessThan.Single.cs deleted file mode 100644 index bae958c32411..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareLessThan.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareLessThanSingle() - { - var test = new SimpleBinaryOpTest__CompareLessThanSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareLessThanSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareLessThanSingle testClass) - { - var result = Avx.CompareLessThan(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareLessThanSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareLessThan( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareLessThanSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareLessThanSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.CompareLessThan( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.CompareLessThan( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.CompareLessThan( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareLessThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareLessThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareLessThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.CompareLessThan( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.CompareLessThan( - Avx.LoadVector256((Single*)(pClsVar1)), - Avx.LoadVector256((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.CompareLessThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareLessThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareLessThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareLessThanSingle(); - var result = Avx.CompareLessThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareLessThanSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.CompareLessThan( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.CompareLessThan(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareLessThan( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.CompareLessThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.CompareLessThan( - Avx.LoadVector256((Single*)(&test._fld1)), - Avx.LoadVector256((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != ((left[0] < right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != ((left[i] < right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.CompareLessThan)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareLessThanOrEqual.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareLessThanOrEqual.Double.cs deleted file mode 100644 index ae68fd18f458..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareLessThanOrEqual.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareLessThanOrEqualDouble() - { - var test = new SimpleBinaryOpTest__CompareLessThanOrEqualDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareLessThanOrEqualDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareLessThanOrEqualDouble testClass) - { - var result = Avx.CompareLessThanOrEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareLessThanOrEqualDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareLessThanOrEqual( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareLessThanOrEqualDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareLessThanOrEqualDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.CompareLessThanOrEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.CompareLessThanOrEqual( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.CompareLessThanOrEqual( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareLessThanOrEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareLessThanOrEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareLessThanOrEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.CompareLessThanOrEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.CompareLessThanOrEqual( - Avx.LoadVector256((Double*)(pClsVar1)), - Avx.LoadVector256((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.CompareLessThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareLessThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareLessThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareLessThanOrEqualDouble(); - var result = Avx.CompareLessThanOrEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareLessThanOrEqualDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.CompareLessThanOrEqual( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.CompareLessThanOrEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareLessThanOrEqual( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.CompareLessThanOrEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.CompareLessThanOrEqual( - Avx.LoadVector256((Double*)(&test._fld1)), - Avx.LoadVector256((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] <= right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] <= right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.CompareLessThanOrEqual)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareLessThanOrEqual.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareLessThanOrEqual.Single.cs deleted file mode 100644 index ed095020ced2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareLessThanOrEqual.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareLessThanOrEqualSingle() - { - var test = new SimpleBinaryOpTest__CompareLessThanOrEqualSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareLessThanOrEqualSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareLessThanOrEqualSingle testClass) - { - var result = Avx.CompareLessThanOrEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareLessThanOrEqualSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareLessThanOrEqual( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareLessThanOrEqualSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareLessThanOrEqualSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.CompareLessThanOrEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.CompareLessThanOrEqual( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.CompareLessThanOrEqual( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareLessThanOrEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareLessThanOrEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareLessThanOrEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.CompareLessThanOrEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.CompareLessThanOrEqual( - Avx.LoadVector256((Single*)(pClsVar1)), - Avx.LoadVector256((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.CompareLessThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareLessThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareLessThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareLessThanOrEqualSingle(); - var result = Avx.CompareLessThanOrEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareLessThanOrEqualSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.CompareLessThanOrEqual( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.CompareLessThanOrEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareLessThanOrEqual( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.CompareLessThanOrEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.CompareLessThanOrEqual( - Avx.LoadVector256((Single*)(&test._fld1)), - Avx.LoadVector256((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != ((left[0] <= right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != ((left[i] <= right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.CompareLessThanOrEqual)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareNotEqual.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareNotEqual.Double.cs deleted file mode 100644 index a97750863aac..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareNotEqual.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareNotEqualDouble() - { - var test = new SimpleBinaryOpTest__CompareNotEqualDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareNotEqualDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareNotEqualDouble testClass) - { - var result = Avx.CompareNotEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareNotEqualDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareNotEqual( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareNotEqualDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareNotEqualDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.CompareNotEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.CompareNotEqual( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.CompareNotEqual( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareNotEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareNotEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareNotEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.CompareNotEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.CompareNotEqual( - Avx.LoadVector256((Double*)(pClsVar1)), - Avx.LoadVector256((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.CompareNotEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareNotEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareNotEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareNotEqualDouble(); - var result = Avx.CompareNotEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareNotEqualDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.CompareNotEqual( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.CompareNotEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareNotEqual( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.CompareNotEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.CompareNotEqual( - Avx.LoadVector256((Double*)(&test._fld1)), - Avx.LoadVector256((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] != right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] != right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.CompareNotEqual)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareNotEqual.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareNotEqual.Single.cs deleted file mode 100644 index 6ddab6b8e026..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareNotEqual.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareNotEqualSingle() - { - var test = new SimpleBinaryOpTest__CompareNotEqualSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareNotEqualSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareNotEqualSingle testClass) - { - var result = Avx.CompareNotEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareNotEqualSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareNotEqual( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareNotEqualSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareNotEqualSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.CompareNotEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.CompareNotEqual( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.CompareNotEqual( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareNotEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareNotEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareNotEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.CompareNotEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.CompareNotEqual( - Avx.LoadVector256((Single*)(pClsVar1)), - Avx.LoadVector256((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.CompareNotEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareNotEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareNotEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareNotEqualSingle(); - var result = Avx.CompareNotEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareNotEqualSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.CompareNotEqual( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.CompareNotEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareNotEqual( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.CompareNotEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.CompareNotEqual( - Avx.LoadVector256((Single*)(&test._fld1)), - Avx.LoadVector256((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != ((left[0] != right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != ((left[i] != right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.CompareNotEqual)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareNotGreaterThan.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareNotGreaterThan.Double.cs deleted file mode 100644 index cb8a5713adf7..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareNotGreaterThan.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareNotGreaterThanDouble() - { - var test = new SimpleBinaryOpTest__CompareNotGreaterThanDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareNotGreaterThanDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareNotGreaterThanDouble testClass) - { - var result = Avx.CompareNotGreaterThan(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareNotGreaterThanDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareNotGreaterThan( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareNotGreaterThanDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareNotGreaterThanDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.CompareNotGreaterThan( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.CompareNotGreaterThan( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.CompareNotGreaterThan( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareNotGreaterThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareNotGreaterThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareNotGreaterThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.CompareNotGreaterThan( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.CompareNotGreaterThan( - Avx.LoadVector256((Double*)(pClsVar1)), - Avx.LoadVector256((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.CompareNotGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareNotGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareNotGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareNotGreaterThanDouble(); - var result = Avx.CompareNotGreaterThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareNotGreaterThanDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.CompareNotGreaterThan( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.CompareNotGreaterThan(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareNotGreaterThan( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.CompareNotGreaterThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.CompareNotGreaterThan( - Avx.LoadVector256((Double*)(&test._fld1)), - Avx.LoadVector256((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != (!(left[0] > right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != (!(left[i] > right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.CompareNotGreaterThan)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareNotGreaterThan.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareNotGreaterThan.Single.cs deleted file mode 100644 index 4b4d9d329649..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareNotGreaterThan.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareNotGreaterThanSingle() - { - var test = new SimpleBinaryOpTest__CompareNotGreaterThanSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareNotGreaterThanSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareNotGreaterThanSingle testClass) - { - var result = Avx.CompareNotGreaterThan(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareNotGreaterThanSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareNotGreaterThan( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareNotGreaterThanSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareNotGreaterThanSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.CompareNotGreaterThan( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.CompareNotGreaterThan( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.CompareNotGreaterThan( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareNotGreaterThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareNotGreaterThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareNotGreaterThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.CompareNotGreaterThan( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.CompareNotGreaterThan( - Avx.LoadVector256((Single*)(pClsVar1)), - Avx.LoadVector256((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.CompareNotGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareNotGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareNotGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareNotGreaterThanSingle(); - var result = Avx.CompareNotGreaterThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareNotGreaterThanSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.CompareNotGreaterThan( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.CompareNotGreaterThan(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareNotGreaterThan( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.CompareNotGreaterThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.CompareNotGreaterThan( - Avx.LoadVector256((Single*)(&test._fld1)), - Avx.LoadVector256((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != (!(left[0] > right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != (!(left[i] > right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.CompareNotGreaterThan)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareNotGreaterThanOrEqual.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareNotGreaterThanOrEqual.Double.cs deleted file mode 100644 index 7133f208f9de..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareNotGreaterThanOrEqual.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareNotGreaterThanOrEqualDouble() - { - var test = new SimpleBinaryOpTest__CompareNotGreaterThanOrEqualDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareNotGreaterThanOrEqualDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareNotGreaterThanOrEqualDouble testClass) - { - var result = Avx.CompareNotGreaterThanOrEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareNotGreaterThanOrEqualDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareNotGreaterThanOrEqual( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareNotGreaterThanOrEqualDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareNotGreaterThanOrEqualDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.CompareNotGreaterThanOrEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.CompareNotGreaterThanOrEqual( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.CompareNotGreaterThanOrEqual( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareNotGreaterThanOrEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareNotGreaterThanOrEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareNotGreaterThanOrEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.CompareNotGreaterThanOrEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.CompareNotGreaterThanOrEqual( - Avx.LoadVector256((Double*)(pClsVar1)), - Avx.LoadVector256((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.CompareNotGreaterThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareNotGreaterThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareNotGreaterThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareNotGreaterThanOrEqualDouble(); - var result = Avx.CompareNotGreaterThanOrEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareNotGreaterThanOrEqualDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.CompareNotGreaterThanOrEqual( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.CompareNotGreaterThanOrEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareNotGreaterThanOrEqual( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.CompareNotGreaterThanOrEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.CompareNotGreaterThanOrEqual( - Avx.LoadVector256((Double*)(&test._fld1)), - Avx.LoadVector256((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != (!(left[0] >= right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != (!(left[i] >= right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.CompareNotGreaterThanOrEqual)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareNotGreaterThanOrEqual.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareNotGreaterThanOrEqual.Single.cs deleted file mode 100644 index 4e68e49e19cb..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareNotGreaterThanOrEqual.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareNotGreaterThanOrEqualSingle() - { - var test = new SimpleBinaryOpTest__CompareNotGreaterThanOrEqualSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareNotGreaterThanOrEqualSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareNotGreaterThanOrEqualSingle testClass) - { - var result = Avx.CompareNotGreaterThanOrEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareNotGreaterThanOrEqualSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareNotGreaterThanOrEqual( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareNotGreaterThanOrEqualSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareNotGreaterThanOrEqualSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.CompareNotGreaterThanOrEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.CompareNotGreaterThanOrEqual( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.CompareNotGreaterThanOrEqual( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareNotGreaterThanOrEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareNotGreaterThanOrEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareNotGreaterThanOrEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.CompareNotGreaterThanOrEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.CompareNotGreaterThanOrEqual( - Avx.LoadVector256((Single*)(pClsVar1)), - Avx.LoadVector256((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.CompareNotGreaterThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareNotGreaterThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareNotGreaterThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareNotGreaterThanOrEqualSingle(); - var result = Avx.CompareNotGreaterThanOrEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareNotGreaterThanOrEqualSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.CompareNotGreaterThanOrEqual( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.CompareNotGreaterThanOrEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareNotGreaterThanOrEqual( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.CompareNotGreaterThanOrEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.CompareNotGreaterThanOrEqual( - Avx.LoadVector256((Single*)(&test._fld1)), - Avx.LoadVector256((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != (!(left[0] >= right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != (!(left[i] >= right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.CompareNotGreaterThanOrEqual)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareNotLessThan.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareNotLessThan.Double.cs deleted file mode 100644 index fcba557e72fb..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareNotLessThan.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareNotLessThanDouble() - { - var test = new SimpleBinaryOpTest__CompareNotLessThanDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareNotLessThanDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareNotLessThanDouble testClass) - { - var result = Avx.CompareNotLessThan(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareNotLessThanDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareNotLessThan( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareNotLessThanDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareNotLessThanDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.CompareNotLessThan( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.CompareNotLessThan( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.CompareNotLessThan( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareNotLessThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareNotLessThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareNotLessThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.CompareNotLessThan( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.CompareNotLessThan( - Avx.LoadVector256((Double*)(pClsVar1)), - Avx.LoadVector256((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.CompareNotLessThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareNotLessThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareNotLessThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareNotLessThanDouble(); - var result = Avx.CompareNotLessThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareNotLessThanDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.CompareNotLessThan( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.CompareNotLessThan(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareNotLessThan( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.CompareNotLessThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.CompareNotLessThan( - Avx.LoadVector256((Double*)(&test._fld1)), - Avx.LoadVector256((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != (!(left[0] < right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != (!(left[i] < right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.CompareNotLessThan)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareNotLessThan.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareNotLessThan.Single.cs deleted file mode 100644 index 90a39dcf4df9..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareNotLessThan.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareNotLessThanSingle() - { - var test = new SimpleBinaryOpTest__CompareNotLessThanSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareNotLessThanSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareNotLessThanSingle testClass) - { - var result = Avx.CompareNotLessThan(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareNotLessThanSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareNotLessThan( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareNotLessThanSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareNotLessThanSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.CompareNotLessThan( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.CompareNotLessThan( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.CompareNotLessThan( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareNotLessThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareNotLessThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareNotLessThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.CompareNotLessThan( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.CompareNotLessThan( - Avx.LoadVector256((Single*)(pClsVar1)), - Avx.LoadVector256((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.CompareNotLessThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareNotLessThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareNotLessThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareNotLessThanSingle(); - var result = Avx.CompareNotLessThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareNotLessThanSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.CompareNotLessThan( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.CompareNotLessThan(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareNotLessThan( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.CompareNotLessThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.CompareNotLessThan( - Avx.LoadVector256((Single*)(&test._fld1)), - Avx.LoadVector256((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != (!(left[0] < right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != (!(left[i] < right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.CompareNotLessThan)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareNotLessThanOrEqual.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareNotLessThanOrEqual.Double.cs deleted file mode 100644 index 943e4e5391f2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareNotLessThanOrEqual.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareNotLessThanOrEqualDouble() - { - var test = new SimpleBinaryOpTest__CompareNotLessThanOrEqualDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareNotLessThanOrEqualDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareNotLessThanOrEqualDouble testClass) - { - var result = Avx.CompareNotLessThanOrEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareNotLessThanOrEqualDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareNotLessThanOrEqual( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareNotLessThanOrEqualDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareNotLessThanOrEqualDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.CompareNotLessThanOrEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.CompareNotLessThanOrEqual( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.CompareNotLessThanOrEqual( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareNotLessThanOrEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareNotLessThanOrEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareNotLessThanOrEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.CompareNotLessThanOrEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.CompareNotLessThanOrEqual( - Avx.LoadVector256((Double*)(pClsVar1)), - Avx.LoadVector256((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.CompareNotLessThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareNotLessThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareNotLessThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareNotLessThanOrEqualDouble(); - var result = Avx.CompareNotLessThanOrEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareNotLessThanOrEqualDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.CompareNotLessThanOrEqual( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.CompareNotLessThanOrEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareNotLessThanOrEqual( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.CompareNotLessThanOrEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.CompareNotLessThanOrEqual( - Avx.LoadVector256((Double*)(&test._fld1)), - Avx.LoadVector256((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != (!(left[0] <= right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != (!(left[i] <= right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.CompareNotLessThanOrEqual)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareNotLessThanOrEqual.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareNotLessThanOrEqual.Single.cs deleted file mode 100644 index 2e4c55f7d0b2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareNotLessThanOrEqual.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareNotLessThanOrEqualSingle() - { - var test = new SimpleBinaryOpTest__CompareNotLessThanOrEqualSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareNotLessThanOrEqualSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareNotLessThanOrEqualSingle testClass) - { - var result = Avx.CompareNotLessThanOrEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareNotLessThanOrEqualSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareNotLessThanOrEqual( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareNotLessThanOrEqualSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareNotLessThanOrEqualSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.CompareNotLessThanOrEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.CompareNotLessThanOrEqual( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.CompareNotLessThanOrEqual( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareNotLessThanOrEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareNotLessThanOrEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareNotLessThanOrEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.CompareNotLessThanOrEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.CompareNotLessThanOrEqual( - Avx.LoadVector256((Single*)(pClsVar1)), - Avx.LoadVector256((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.CompareNotLessThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareNotLessThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareNotLessThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareNotLessThanOrEqualSingle(); - var result = Avx.CompareNotLessThanOrEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareNotLessThanOrEqualSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.CompareNotLessThanOrEqual( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.CompareNotLessThanOrEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareNotLessThanOrEqual( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.CompareNotLessThanOrEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.CompareNotLessThanOrEqual( - Avx.LoadVector256((Single*)(&test._fld1)), - Avx.LoadVector256((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != (!(left[0] <= right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != (!(left[i] <= right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.CompareNotLessThanOrEqual)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareOrdered.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareOrdered.Double.cs deleted file mode 100644 index 0e21897f08e8..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareOrdered.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareOrderedDouble() - { - var test = new SimpleBinaryOpTest__CompareOrderedDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareOrderedDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareOrderedDouble testClass) - { - var result = Avx.CompareOrdered(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareOrderedDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareOrdered( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareOrderedDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareOrderedDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.CompareOrdered( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.CompareOrdered( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.CompareOrdered( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareOrdered), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareOrdered), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareOrdered), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.CompareOrdered( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.CompareOrdered( - Avx.LoadVector256((Double*)(pClsVar1)), - Avx.LoadVector256((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.CompareOrdered(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareOrdered(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareOrdered(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareOrderedDouble(); - var result = Avx.CompareOrdered(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareOrderedDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.CompareOrdered( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.CompareOrdered(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareOrdered( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.CompareOrdered(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.CompareOrdered( - Avx.LoadVector256((Double*)(&test._fld1)), - Avx.LoadVector256((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != ((!double.IsNaN(left[0]) && !double.IsNaN(right[0])) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != ((!double.IsNaN(left[i]) && !double.IsNaN(right[i])) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.CompareOrdered)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareOrdered.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareOrdered.Single.cs deleted file mode 100644 index 8004b2fc8991..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareOrdered.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareOrderedSingle() - { - var test = new SimpleBinaryOpTest__CompareOrderedSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareOrderedSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareOrderedSingle testClass) - { - var result = Avx.CompareOrdered(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareOrderedSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareOrdered( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareOrderedSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareOrderedSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.CompareOrdered( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.CompareOrdered( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.CompareOrdered( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareOrdered), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareOrdered), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareOrdered), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.CompareOrdered( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.CompareOrdered( - Avx.LoadVector256((Single*)(pClsVar1)), - Avx.LoadVector256((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.CompareOrdered(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareOrdered(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareOrdered(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareOrderedSingle(); - var result = Avx.CompareOrdered(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareOrderedSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.CompareOrdered( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.CompareOrdered(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareOrdered( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.CompareOrdered(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.CompareOrdered( - Avx.LoadVector256((Single*)(&test._fld1)), - Avx.LoadVector256((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != ((!float.IsNaN(left[0]) && !float.IsNaN(right[0])) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != ((!float.IsNaN(left[i]) && !float.IsNaN(right[i])) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.CompareOrdered)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareUnordered.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareUnordered.Double.cs deleted file mode 100644 index 229e76ab5330..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareUnordered.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareUnorderedDouble() - { - var test = new SimpleBinaryOpTest__CompareUnorderedDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareUnorderedDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareUnorderedDouble testClass) - { - var result = Avx.CompareUnordered(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareUnorderedDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareUnordered( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareUnorderedDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareUnorderedDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.CompareUnordered( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.CompareUnordered( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.CompareUnordered( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareUnordered), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareUnordered), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareUnordered), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.CompareUnordered( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.CompareUnordered( - Avx.LoadVector256((Double*)(pClsVar1)), - Avx.LoadVector256((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.CompareUnordered(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareUnordered(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareUnordered(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareUnorderedDouble(); - var result = Avx.CompareUnordered(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareUnorderedDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.CompareUnordered( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.CompareUnordered(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareUnordered( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.CompareUnordered(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.CompareUnordered( - Avx.LoadVector256((Double*)(&test._fld1)), - Avx.LoadVector256((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != ((double.IsNaN(left[0]) || double.IsNaN(right[0])) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != ((double.IsNaN(left[i]) || double.IsNaN(right[i])) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.CompareUnordered)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareUnordered.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareUnordered.Single.cs deleted file mode 100644 index d442d4dc7cf3..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/CompareUnordered.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareUnorderedSingle() - { - var test = new SimpleBinaryOpTest__CompareUnorderedSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareUnorderedSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareUnorderedSingle testClass) - { - var result = Avx.CompareUnordered(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareUnorderedSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareUnordered( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareUnorderedSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareUnorderedSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.CompareUnordered( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.CompareUnordered( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.CompareUnordered( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareUnordered), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareUnordered), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.CompareUnordered), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.CompareUnordered( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.CompareUnordered( - Avx.LoadVector256((Single*)(pClsVar1)), - Avx.LoadVector256((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.CompareUnordered(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareUnordered(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.CompareUnordered(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareUnorderedSingle(); - var result = Avx.CompareUnordered(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareUnorderedSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.CompareUnordered( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.CompareUnordered(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.CompareUnordered( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.CompareUnordered(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.CompareUnordered( - Avx.LoadVector256((Single*)(&test._fld1)), - Avx.LoadVector256((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != ((float.IsNaN(left[0]) || float.IsNaN(right[0])) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != ((float.IsNaN(left[i]) || float.IsNaN(right[i])) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.CompareUnordered)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Divide.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Divide.Double.cs deleted file mode 100644 index 56f8ade91cb6..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Divide.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void DivideDouble() - { - var test = new SimpleBinaryOpTest__DivideDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__DivideDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__DivideDouble testClass) - { - var result = Avx.Divide(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__DivideDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.Divide( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__DivideDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__DivideDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.Divide( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.Divide( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.Divide( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Divide), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Divide), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Divide), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.Divide( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.Divide( - Avx.LoadVector256((Double*)(pClsVar1)), - Avx.LoadVector256((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.Divide(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.Divide(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.Divide(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__DivideDouble(); - var result = Avx.Divide(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__DivideDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.Divide( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.Divide(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.Divide( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.Divide(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.Divide( - Avx.LoadVector256((Double*)(&test._fld1)), - Avx.LoadVector256((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(left[0] / right[0]) != BitConverter.DoubleToInt64Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(left[i] / right[i]) != BitConverter.DoubleToInt64Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.Divide)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Divide.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Divide.Single.cs deleted file mode 100644 index 3e097b87e3e7..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Divide.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void DivideSingle() - { - var test = new SimpleBinaryOpTest__DivideSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__DivideSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__DivideSingle testClass) - { - var result = Avx.Divide(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__DivideSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.Divide( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__DivideSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__DivideSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.Divide( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.Divide( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.Divide( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Divide), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Divide), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Divide), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.Divide( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.Divide( - Avx.LoadVector256((Single*)(pClsVar1)), - Avx.LoadVector256((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.Divide(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.Divide(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.Divide(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__DivideSingle(); - var result = Avx.Divide(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__DivideSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.Divide( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.Divide(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.Divide( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.Divide(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.Divide( - Avx.LoadVector256((Single*)(&test._fld1)), - Avx.LoadVector256((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(left[0] / right[0]) != BitConverter.SingleToInt32Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(left[i] / right[i]) != BitConverter.SingleToInt32Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.Divide)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/DotProduct.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/DotProduct.cs deleted file mode 100644 index eadcea32d124..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/DotProduct.cs +++ /dev/null @@ -1,150 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Avx.IsSupported) - { - using (TestTable floatTable = new TestTable(new float[8] { 1, -5, 100, 0, 1, -5, 100, 0 }, new float[8] { 22, -1, -50, 0, 22, -1, -50, 0 }, new float[8])) - { - var vf1 = Unsafe.Read>(floatTable.inArray1Ptr); - var vf2 = Unsafe.Read>(floatTable.inArray2Ptr); - - var vf3 = Avx.DotProduct(vf1, vf2, 255); - Unsafe.Write(floatTable.outArrayPtr, vf3); - - if (!floatTable.CheckResult((x, y, z) => z.All(result => result == (x[0] * y[0]) + (x[1] * y[1]) + - (x[2] * y[2]) + (x[3] * y[3])))) - { - Console.WriteLine("Avx DotProduct failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - vf3 = Avx.DotProduct(vf1, vf2, 127); - Unsafe.Write(floatTable.outArrayPtr, vf3); - - if (!floatTable.CheckResult((x, y, z) => z.All(result => result == (x[0] * y[0]) + (x[1] * y[1]) + - (x[2] * y[2])))) - { - Console.WriteLine("Avx DotProduct failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - vf3 = Avx.DotProduct(vf1, vf2, 63); - Unsafe.Write(floatTable.outArrayPtr, vf3); - - if (!floatTable.CheckResult((x, y, z) => z.All(result => result == ((x[0] * y[0]) + (x[1] * y[1]))))) - { - Console.WriteLine("3 Avx DotProduct failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - vf3 = Avx.DotProduct(vf1, vf2, 85); - Unsafe.Write(floatTable.outArrayPtr, vf3); - - if (!floatTable.CheckResult((x, y, z) => z[0] == ((x[0] * y[0]) + (x[2] * y[2])) && - z[2] == ((x[0] * y[0]) + (x[2] * y[2])) && - z[4] == ((x[4] * y[4]) + (x[6] * y[6])) && - z[6] == ((x[4] * y[4]) + (x[6] * y[6])) && - z[1] == 0 && z[3] == 0 && - z[5] == 0 && z[7] == 0)) - { - Console.WriteLine("Avx DotProduct failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - vf3 = (Vector256)typeof(Avx).GetMethod(nameof(Avx.DotProduct), new Type[] { vf1.GetType(), vf2.GetType(), typeof(byte) }).Invoke(null, new object[] { vf1, vf2, (byte)(255) }); - Unsafe.Write(floatTable.outArrayPtr, vf3); - - if (!floatTable.CheckResult((x, y, z) => z.All(result => result == (x[0] * y[0]) + (x[1] * y[1]) + - (x[2] * y[2]) + (x[3] * y[3])))) - { - Console.WriteLine("Avx DotProduct failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - } - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T : struct - { - public T[] inArray1; - public T[] inArray2; - public T[] outArray; - - public void* inArray1Ptr => inHandle1.AddrOfPinnedObject().ToPointer(); - public void* inArray2Ptr => inHandle2.AddrOfPinnedObject().ToPointer(); - public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); - - GCHandle inHandle1; - GCHandle inHandle2; - GCHandle outHandle; - public TestTable(T[] a, T[] b, T[] c) - { - this.inArray1 = a; - this.inArray2 = b; - this.outArray = c; - - inHandle1 = GCHandle.Alloc(inArray1, GCHandleType.Pinned); - inHandle2 = GCHandle.Alloc(inArray2, GCHandleType.Pinned); - outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); - } - public bool CheckResult(Func check) - { - return check(inArray1, inArray2, outArray); - } - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Byte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Byte.1.cs deleted file mode 100644 index ea0e27f965a3..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Byte.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ExtractVector128Byte1() - { - var test = new ImmUnaryOpTest__ExtractVector128Byte1(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ExtractVector128Byte1 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ExtractVector128Byte1 testClass) - { - var result = Avx.ExtractVector128(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data = new Byte[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ExtractVector128Byte1() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ExtractVector128Byte1() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.ExtractVector128( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.ExtractVector128( - Avx.LoadVector256((Byte*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.ExtractVector128( - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Byte*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.ExtractVector128( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Byte*)(_dataTable.inArrayPtr)); - var result = Avx.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArrayPtr)); - var result = Avx.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ExtractVector128Byte1(); - var result = Avx.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.ExtractVector128(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray = new Byte[Op1ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray = new Byte[Op1ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Byte[] firstOp, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != firstOp[16]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != firstOp[i+16]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.ExtractVector128)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Double.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Double.1.cs deleted file mode 100644 index 4e7a8f5fff18..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Double.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ExtractVector128Double1() - { - var test = new ImmUnaryOpTest__ExtractVector128Double1(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ExtractVector128Double1 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ExtractVector128Double1 testClass) - { - var result = Avx.ExtractVector128(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data = new Double[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ExtractVector128Double1() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ExtractVector128Double1() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.ExtractVector128( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.ExtractVector128( - Avx.LoadVector256((Double*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.ExtractVector128( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.ExtractVector128( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Double*)(_dataTable.inArrayPtr)); - var result = Avx.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Double*)(_dataTable.inArrayPtr)); - var result = Avx.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ExtractVector128Double1(); - var result = Avx.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.ExtractVector128(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Double[] inArray = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Double[] inArray = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(firstOp[2])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(firstOp[i+2])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.ExtractVector128)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Int16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Int16.1.cs deleted file mode 100644 index 9954a9f5bcdd..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Int16.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ExtractVector128Int161() - { - var test = new ImmUnaryOpTest__ExtractVector128Int161(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ExtractVector128Int161 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ExtractVector128Int161 testClass) - { - var result = Avx.ExtractVector128(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data = new Int16[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ExtractVector128Int161() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ExtractVector128Int161() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.ExtractVector128( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.ExtractVector128( - Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.ExtractVector128( - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.ExtractVector128( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)); - var result = Avx.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)); - var result = Avx.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ExtractVector128Int161(); - var result = Avx.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.ExtractVector128(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int16[] firstOp, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != firstOp[8]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != firstOp[i+8]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.ExtractVector128)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Int32.1.cs deleted file mode 100644 index 35ccf0eb6ff2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Int32.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ExtractVector128Int321() - { - var test = new ImmUnaryOpTest__ExtractVector128Int321(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ExtractVector128Int321 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ExtractVector128Int321 testClass) - { - var result = Avx.ExtractVector128(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data = new Int32[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ExtractVector128Int321() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ExtractVector128Int321() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.ExtractVector128( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.ExtractVector128( - Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.ExtractVector128( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.ExtractVector128( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)); - var result = Avx.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)); - var result = Avx.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ExtractVector128Int321(); - var result = Avx.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.ExtractVector128(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int32[] firstOp, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != firstOp[4]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != firstOp[i+4]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.ExtractVector128)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Int64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Int64.1.cs deleted file mode 100644 index bc73e449b7c7..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Int64.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ExtractVector128Int641() - { - var test = new ImmUnaryOpTest__ExtractVector128Int641(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ExtractVector128Int641 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ExtractVector128Int641 testClass) - { - var result = Avx.ExtractVector128(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data = new Int64[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ExtractVector128Int641() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ExtractVector128Int641() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.ExtractVector128( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.ExtractVector128( - Avx.LoadVector256((Int64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.ExtractVector128( - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.ExtractVector128( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Int64*)(_dataTable.inArrayPtr)); - var result = Avx.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArrayPtr)); - var result = Avx.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ExtractVector128Int641(); - var result = Avx.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.ExtractVector128(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int64[] firstOp, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != firstOp[2]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != firstOp[i+2]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.ExtractVector128)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.SByte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.SByte.1.cs deleted file mode 100644 index 3a07a0e558a1..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.SByte.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ExtractVector128SByte1() - { - var test = new ImmUnaryOpTest__ExtractVector128SByte1(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ExtractVector128SByte1 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ExtractVector128SByte1 testClass) - { - var result = Avx.ExtractVector128(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data = new SByte[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ExtractVector128SByte1() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ExtractVector128SByte1() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.ExtractVector128( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.ExtractVector128( - Avx.LoadVector256((SByte*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.ExtractVector128( - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((SByte*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.ExtractVector128( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((SByte*)(_dataTable.inArrayPtr)); - var result = Avx.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArrayPtr)); - var result = Avx.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ExtractVector128SByte1(); - var result = Avx.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.ExtractVector128(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray = new SByte[Op1ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray = new SByte[Op1ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(SByte[] firstOp, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != firstOp[16]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != firstOp[i+16]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.ExtractVector128)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Single.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Single.1.cs deleted file mode 100644 index 0ac4ae770c83..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Single.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ExtractVector128Single1() - { - var test = new ImmUnaryOpTest__ExtractVector128Single1(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ExtractVector128Single1 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ExtractVector128Single1 testClass) - { - var result = Avx.ExtractVector128(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data = new Single[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ExtractVector128Single1() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ExtractVector128Single1() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.ExtractVector128( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.ExtractVector128( - Avx.LoadVector256((Single*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.ExtractVector128( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.ExtractVector128( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Single*)(_dataTable.inArrayPtr)); - var result = Avx.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Single*)(_dataTable.inArrayPtr)); - var result = Avx.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ExtractVector128Single1(); - var result = Avx.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.ExtractVector128(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Single[] inArray = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Single[] inArray = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(firstOp[4])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i+4])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.ExtractVector128)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.UInt16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.UInt16.1.cs deleted file mode 100644 index 531acd327af9..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.UInt16.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ExtractVector128UInt161() - { - var test = new ImmUnaryOpTest__ExtractVector128UInt161(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ExtractVector128UInt161 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ExtractVector128UInt161 testClass) - { - var result = Avx.ExtractVector128(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data = new UInt16[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ExtractVector128UInt161() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ExtractVector128UInt161() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.ExtractVector128( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.ExtractVector128( - Avx.LoadVector256((UInt16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.ExtractVector128( - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.ExtractVector128( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((UInt16*)(_dataTable.inArrayPtr)); - var result = Avx.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArrayPtr)); - var result = Avx.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ExtractVector128UInt161(); - var result = Avx.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.ExtractVector128(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt16[] firstOp, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != firstOp[8]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != firstOp[i+8]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.ExtractVector128)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.UInt32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.UInt32.1.cs deleted file mode 100644 index 5b7db6f611c7..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.UInt32.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ExtractVector128UInt321() - { - var test = new ImmUnaryOpTest__ExtractVector128UInt321(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ExtractVector128UInt321 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ExtractVector128UInt321 testClass) - { - var result = Avx.ExtractVector128(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data = new UInt32[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ExtractVector128UInt321() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ExtractVector128UInt321() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.ExtractVector128( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.ExtractVector128( - Avx.LoadVector256((UInt32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.ExtractVector128( - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.ExtractVector128( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((UInt32*)(_dataTable.inArrayPtr)); - var result = Avx.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArrayPtr)); - var result = Avx.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ExtractVector128UInt321(); - var result = Avx.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.ExtractVector128(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt32[] firstOp, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != firstOp[4]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != firstOp[i+4]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.ExtractVector128)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.UInt64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.UInt64.1.cs deleted file mode 100644 index bdcf876f8fe4..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.UInt64.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ExtractVector128UInt641() - { - var test = new ImmUnaryOpTest__ExtractVector128UInt641(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ExtractVector128UInt641 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ExtractVector128UInt641 testClass) - { - var result = Avx.ExtractVector128(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data = new UInt64[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ExtractVector128UInt641() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ExtractVector128UInt641() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.ExtractVector128( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.ExtractVector128( - Avx.LoadVector256((UInt64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.ExtractVector128( - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.ExtractVector128( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((UInt64*)(_dataTable.inArrayPtr)); - var result = Avx.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArrayPtr)); - var result = Avx.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ExtractVector128UInt641(); - var result = Avx.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.ExtractVector128(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt64[] firstOp, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != firstOp[2]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != firstOp[i+2]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.ExtractVector128)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Floor.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Floor.Double.cs deleted file mode 100644 index 1e4c70031258..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Floor.Double.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void FloorDouble() - { - var test = new SimpleUnaryOpTest__FloorDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__FloorDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__FloorDouble testClass) - { - var result = Avx.Floor(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__FloorDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - { - var result = Avx.Floor( - Avx.LoadVector256((Double*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - - private static Vector256 _clsVar1; - - private Vector256 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__FloorDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__FloorDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.Floor( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.Floor( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.Floor( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Floor), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Floor), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Floor), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.Floor( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - { - var result = Avx.Floor( - Avx.LoadVector256((Double*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Avx.Floor(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var result = Avx.Floor(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var result = Avx.Floor(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__FloorDouble(); - var result = Avx.Floor(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__FloorDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - { - var result = Avx.Floor( - Avx.LoadVector256((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.Floor(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - { - var result = Avx.Floor( - Avx.LoadVector256((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.Floor(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.Floor( - Avx.LoadVector256((Double*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Floor(firstOp[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Floor(firstOp[i]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.Floor)}(Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Floor.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Floor.Single.cs deleted file mode 100644 index 4f797ad84b9d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Floor.Single.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void FloorSingle() - { - var test = new SimpleUnaryOpTest__FloorSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__FloorSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__FloorSingle testClass) - { - var result = Avx.Floor(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__FloorSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - { - var result = Avx.Floor( - Avx.LoadVector256((Single*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - - private static Vector256 _clsVar1; - - private Vector256 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__FloorSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__FloorSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.Floor( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.Floor( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.Floor( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Floor), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Floor), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Floor), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.Floor( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - { - var result = Avx.Floor( - Avx.LoadVector256((Single*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Avx.Floor(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var result = Avx.Floor(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var result = Avx.Floor(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__FloorSingle(); - var result = Avx.Floor(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__FloorSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - { - var result = Avx.Floor( - Avx.LoadVector256((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.Floor(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - { - var result = Avx.Floor( - Avx.LoadVector256((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.Floor(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.Floor( - Avx.LoadVector256((Single*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Floor(firstOp[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Floor(firstOp[i]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.Floor)}(Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/HorizontalAdd.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/HorizontalAdd.cs deleted file mode 100644 index 2e6eb87d6d38..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/HorizontalAdd.cs +++ /dev/null @@ -1,110 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Avx.IsSupported) - { - using (TestTable floatTable = new TestTable(new float[8] {22, -1, -50, 0, 22, -1, -50, 0 }, new float[8] { 22, -1, -50, 0, 22, -1, -50, 0 }, new float[8])) - using (TestTable doubleTable = new TestTable(new double[4] { 1, -5, 100, 0 }, new double[4] { 22, -1, -50, 0 }, new double[4])) - { - - var vf1 = Unsafe.Read>(floatTable.inArray1Ptr); - var vf2 = Unsafe.Read>(floatTable.inArray2Ptr); - var vf3 = Avx.HorizontalAdd(vf1, vf2); - Unsafe.Write(floatTable.outArrayPtr, vf3); - - if (!floatTable.CheckResult((left, right, result) => - (left[0] + left[1] == result[0]) && (right[0] + right[1] == result[2]) && - (left[2] + left[3] == result[1]) && (right[2] + right[3] == result[3]) && - (left[4] + left[5] == result[4]) && (right[4] + right[5] == result[6]) && - (left[6] + left[7] == result[5]) && (right[6] + right[7] == result[7]))) - { - Console.WriteLine("Avx HorizontalAdd failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - var vd1 = Unsafe.Read>(doubleTable.inArray1Ptr); - var vd2 = Unsafe.Read>(doubleTable.inArray2Ptr); - var vd3 = Avx.HorizontalAdd(vd1, vd2); - Unsafe.Write(doubleTable.outArrayPtr, vd3); - - if (!doubleTable.CheckResult((left, right, result) => - (left[0] + left[1] == result[0]) && (right[0] + right[1] == result[1]) && - (left[2] + left[3] == result[2]) && (right[2] + right[3] == result[3]))) - { - Console.WriteLine("Avx HorizontalAdd failed on double:"); - foreach (var item in doubleTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - } - - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T : struct - { - public T[] inArray1; - public T[] inArray2; - public T[] outArray; - - public void* inArray1Ptr => inHandle1.AddrOfPinnedObject().ToPointer(); - public void* inArray2Ptr => inHandle2.AddrOfPinnedObject().ToPointer(); - public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); - - GCHandle inHandle1; - GCHandle inHandle2; - GCHandle outHandle; - public TestTable(T[] a, T[] b, T[] c) - { - this.inArray1 = a; - this.inArray2 = b; - this.outArray = c; - - inHandle1 = GCHandle.Alloc(inArray1, GCHandleType.Pinned); - inHandle2 = GCHandle.Alloc(inArray2, GCHandleType.Pinned); - outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); - } - public bool CheckResult(Func check) - { - return check(inArray1, inArray2, outArray); - } - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - } - - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/HorizontalSubtract.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/HorizontalSubtract.cs deleted file mode 100644 index 6bf84a603163..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/HorizontalSubtract.cs +++ /dev/null @@ -1,110 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Avx.IsSupported) - { - using (TestTable floatTable = new TestTable(new float[8] {22, -1, -50, 0, 22, -1, -50, 0 }, new float[8] { 22, -1, -50, 0, 22, -1, -50, 0 }, new float[8])) - using (TestTable doubleTable = new TestTable(new double[4] { 1, -5, 100, 0 }, new double[4] { 22, -1, -50, 0 }, new double[4])) - { - - var vf1 = Unsafe.Read>(floatTable.inArray1Ptr); - var vf2 = Unsafe.Read>(floatTable.inArray2Ptr); - var vf3 = Avx.HorizontalSubtract(vf1, vf2); - Unsafe.Write(floatTable.outArrayPtr, vf3); - - if (!floatTable.CheckResult((left, right, result) => - (left[0] - left[1] == result[0]) && (right[0] - right[1] == result[2]) && - (left[2] - left[3] == result[1]) && (right[2] - right[3] == result[3]) && - (left[4] - left[5] == result[4]) && (right[4] - right[5] == result[6]) && - (left[6] - left[7] == result[5]) && (right[6] - right[7] == result[7]))) - { - Console.WriteLine("Avx HorizontalAdd failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - var vd1 = Unsafe.Read>(doubleTable.inArray1Ptr); - var vd2 = Unsafe.Read>(doubleTable.inArray2Ptr); - var vd3 = Avx.HorizontalSubtract(vd1, vd2); - Unsafe.Write(doubleTable.outArrayPtr, vd3); - - if (!doubleTable.CheckResult((left, right, result) => - (left[0] - left[1] == result[0]) && (right[0] - right[1] == result[1]) && - (left[2] - left[3] == result[2]) && (right[2] - right[3] == result[3]))) - { - Console.WriteLine("Avx HorizontalAdd failed on double:"); - foreach (var item in doubleTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - } - - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T : struct - { - public T[] inArray1; - public T[] inArray2; - public T[] outArray; - - public void* inArray1Ptr => inHandle1.AddrOfPinnedObject().ToPointer(); - public void* inArray2Ptr => inHandle2.AddrOfPinnedObject().ToPointer(); - public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); - - GCHandle inHandle1; - GCHandle inHandle2; - GCHandle outHandle; - public TestTable(T[] a, T[] b, T[] c) - { - this.inArray1 = a; - this.inArray2 = b; - this.outArray = c; - - inHandle1 = GCHandle.Alloc(inArray1, GCHandleType.Pinned); - inHandle2 = GCHandle.Alloc(inArray2, GCHandleType.Pinned); - outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); - } - public bool CheckResult(Func check) - { - return check(inArray1, inArray2, outArray); - } - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - } - - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Byte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Byte.1.cs deleted file mode 100644 index cde568c6afc5..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Byte.1.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void InsertVector128Byte1() - { - var test = new ImmBinaryOpTest__InsertVector128Byte1(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__InsertVector128Byte1 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__InsertVector128Byte1 testClass) - { - var result = Avx.InsertVector128(_fld1, _fld2, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector128 _clsVar2; - - private Vector256 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__InsertVector128Byte1() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__InsertVector128Byte1() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.InsertVector128( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.InsertVector128( - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector128((Byte*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.InsertVector128( - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector128((Byte*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.InsertVector128( - _clsVar1, - _clsVar2, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = Avx.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = Avx.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__InsertVector128Byte1(); - var result = Avx.InsertVector128(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.InsertVector128(_fld1, _fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.InsertVector128(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != left[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (i < 16 ? left[i] : right[i-16])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.InsertVector128)}(Vector256.1, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Int16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Int16.1.cs deleted file mode 100644 index ed9f363570c5..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Int16.1.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void InsertVector128Int161() - { - var test = new ImmBinaryOpTest__InsertVector128Int161(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__InsertVector128Int161 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__InsertVector128Int161 testClass) - { - var result = Avx.InsertVector128(_fld1, _fld2, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector128 _clsVar2; - - private Vector256 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__InsertVector128Int161() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__InsertVector128Int161() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.InsertVector128( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.InsertVector128( - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector128((Int16*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.InsertVector128( - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector128((Int16*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.InsertVector128( - _clsVar1, - _clsVar2, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__InsertVector128Int161(); - var result = Avx.InsertVector128(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.InsertVector128(_fld1, _fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.InsertVector128(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != left[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (i < 8 ? left[i] : right[i-8])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.InsertVector128)}(Vector256.1, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Int32.1.cs deleted file mode 100644 index acc04225d912..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Int32.1.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void InsertVector128Int321() - { - var test = new ImmBinaryOpTest__InsertVector128Int321(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__InsertVector128Int321 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__InsertVector128Int321 testClass) - { - var result = Avx.InsertVector128(_fld1, _fld2, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector128 _clsVar2; - - private Vector256 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__InsertVector128Int321() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__InsertVector128Int321() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.InsertVector128( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.InsertVector128( - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector128((Int32*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.InsertVector128( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector128((Int32*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.InsertVector128( - _clsVar1, - _clsVar2, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__InsertVector128Int321(); - var result = Avx.InsertVector128(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.InsertVector128(_fld1, _fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.InsertVector128(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != left[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (i < 4 ? left[i] : right[i-4])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.InsertVector128)}(Vector256.1, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Int64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Int64.1.cs deleted file mode 100644 index 40cf18621f36..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Int64.1.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void InsertVector128Int641() - { - var test = new ImmBinaryOpTest__InsertVector128Int641(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__InsertVector128Int641 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__InsertVector128Int641 testClass) - { - var result = Avx.InsertVector128(_fld1, _fld2, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector128 _clsVar2; - - private Vector256 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__InsertVector128Int641() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__InsertVector128Int641() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.InsertVector128( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.InsertVector128( - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector128((Int64*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.InsertVector128( - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector128((Int64*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.InsertVector128( - _clsVar1, - _clsVar2, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__InsertVector128Int641(); - var result = Avx.InsertVector128(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.InsertVector128(_fld1, _fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.InsertVector128(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != left[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (i < 2 ? left[i] : right[i-2])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.InsertVector128)}(Vector256.1, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.SByte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.SByte.1.cs deleted file mode 100644 index 4acc350b443e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.SByte.1.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void InsertVector128SByte1() - { - var test = new ImmBinaryOpTest__InsertVector128SByte1(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__InsertVector128SByte1 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__InsertVector128SByte1 testClass) - { - var result = Avx.InsertVector128(_fld1, _fld2, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector128 _clsVar2; - - private Vector256 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__InsertVector128SByte1() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__InsertVector128SByte1() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.InsertVector128( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.InsertVector128( - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector128((SByte*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.InsertVector128( - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector128((SByte*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.InsertVector128( - _clsVar1, - _clsVar2, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__InsertVector128SByte1(); - var result = Avx.InsertVector128(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.InsertVector128(_fld1, _fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.InsertVector128(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != left[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (i < 16 ? left[i] : right[i-16])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.InsertVector128)}(Vector256.1, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.UInt16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.UInt16.1.cs deleted file mode 100644 index 304a5cd86a99..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.UInt16.1.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void InsertVector128UInt161() - { - var test = new ImmBinaryOpTest__InsertVector128UInt161(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__InsertVector128UInt161 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__InsertVector128UInt161 testClass) - { - var result = Avx.InsertVector128(_fld1, _fld2, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector128 _clsVar2; - - private Vector256 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__InsertVector128UInt161() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__InsertVector128UInt161() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.InsertVector128( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.InsertVector128( - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.InsertVector128( - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.InsertVector128( - _clsVar1, - _clsVar2, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__InsertVector128UInt161(); - var result = Avx.InsertVector128(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.InsertVector128(_fld1, _fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.InsertVector128(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != left[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (i < 8 ? left[i] : right[i-8])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.InsertVector128)}(Vector256.1, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.UInt32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.UInt32.1.cs deleted file mode 100644 index f2c08abd7424..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.UInt32.1.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void InsertVector128UInt321() - { - var test = new ImmBinaryOpTest__InsertVector128UInt321(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__InsertVector128UInt321 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__InsertVector128UInt321 testClass) - { - var result = Avx.InsertVector128(_fld1, _fld2, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector128 _clsVar2; - - private Vector256 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__InsertVector128UInt321() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__InsertVector128UInt321() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.InsertVector128( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.InsertVector128( - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.InsertVector128( - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.InsertVector128( - _clsVar1, - _clsVar2, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__InsertVector128UInt321(); - var result = Avx.InsertVector128(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.InsertVector128(_fld1, _fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.InsertVector128(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != left[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (i < 4 ? left[i] : right[i-4])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.InsertVector128)}(Vector256.1, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.UInt64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.UInt64.1.cs deleted file mode 100644 index ca341612002b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.UInt64.1.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void InsertVector128UInt641() - { - var test = new ImmBinaryOpTest__InsertVector128UInt641(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__InsertVector128UInt641 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__InsertVector128UInt641 testClass) - { - var result = Avx.InsertVector128(_fld1, _fld2, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector128 _clsVar2; - - private Vector256 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__InsertVector128UInt641() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__InsertVector128UInt641() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.InsertVector128( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.InsertVector128( - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.InsertVector128( - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.InsertVector128( - _clsVar1, - _clsVar2, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__InsertVector128UInt641(); - var result = Avx.InsertVector128(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.InsertVector128(_fld1, _fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.InsertVector128(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt64[] left, UInt64[] right, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != left[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (i < 2 ? left[i] : right[i-2])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.InsertVector128)}(Vector256.1, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskLoad.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskLoad.Double.cs deleted file mode 100644 index 24fe0345cc1b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskLoad.Double.cs +++ /dev/null @@ -1,409 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; -using System.Reflection; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaskLoadDouble() - { - var test = new SimpleBinaryOpTest__MaskLoadDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MaskLoadDouble - { - private struct TestStruct - { - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MaskLoadDouble testClass) - { - var result = Avx.MaskLoad((Double*)testClass._dataTable.inArray1Ptr, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(testClass._dataTable.inArray1Ptr, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector256 _clsVar2; - - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static SimpleBinaryOpTest__MaskLoadDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MaskLoadDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.MaskLoad( - (Double*)_dataTable.inArray1Ptr, - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.MaskLoad( - (Double*)_dataTable.inArray1Ptr, - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.MaskLoad( - (Double*)_dataTable.inArray1Ptr, - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.MaskLoad), new Type[] { typeof(Double*), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(Double*)), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.MaskLoad), new Type[] { typeof(Double*), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(Double*)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.MaskLoad), new Type[] { typeof(Double*), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(Double*)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.MaskLoad( - (Double*)_dataTable.inArray1Ptr, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = (Double*)_dataTable.inArray1Ptr; - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = (Double*)_dataTable.inArray1Ptr; - var right = Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = (Double*)_dataTable.inArray1Ptr; - var right = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MaskLoadDouble(); - var result = Avx.MaskLoad((Double*)_dataTable.inArray1Ptr, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.MaskLoad((Double*)_dataTable.inArray1Ptr, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.MaskLoad((Double*)_dataTable.inArray1Ptr, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(void* left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits((BitConverter.DoubleToInt64Bits(right[0]) < 0) ? left[0] : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits((BitConverter.DoubleToInt64Bits(right[i]) < 0) ? left[i] : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.MaskLoad)}(Double*, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskLoad.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskLoad.Single.cs deleted file mode 100644 index 77a4d699fc17..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskLoad.Single.cs +++ /dev/null @@ -1,409 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; -using System.Reflection; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaskLoadSingle() - { - var test = new SimpleBinaryOpTest__MaskLoadSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MaskLoadSingle - { - private struct TestStruct - { - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MaskLoadSingle testClass) - { - var result = Avx.MaskLoad((Single*)testClass._dataTable.inArray1Ptr, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(testClass._dataTable.inArray1Ptr, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector256 _clsVar2; - - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static SimpleBinaryOpTest__MaskLoadSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MaskLoadSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.MaskLoad( - (Single*)_dataTable.inArray1Ptr, - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.MaskLoad( - (Single*)_dataTable.inArray1Ptr, - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.MaskLoad( - (Single*)_dataTable.inArray1Ptr, - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.MaskLoad), new Type[] { typeof(Single*), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(Single*)), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.MaskLoad), new Type[] { typeof(Single*), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(Single*)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.MaskLoad), new Type[] { typeof(Single*), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(Single*)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.MaskLoad( - (Single*)_dataTable.inArray1Ptr, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = (Single*)_dataTable.inArray1Ptr; - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = (Single*)_dataTable.inArray1Ptr; - var right = Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = (Single*)_dataTable.inArray1Ptr; - var right = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MaskLoadSingle(); - var result = Avx.MaskLoad((Single*)_dataTable.inArray1Ptr, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.MaskLoad((Single*)_dataTable.inArray1Ptr, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.MaskLoad((Single*)_dataTable.inArray1Ptr, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(void* left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits((BitConverter.SingleToInt32Bits(right[0]) < 0) ? left[0] : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits((BitConverter.SingleToInt32Bits(right[i]) < 0) ? left[i] : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.MaskLoad)}(Single*, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskStore.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskStore.Double.cs deleted file mode 100644 index 677390e73bab..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskStore.Double.cs +++ /dev/null @@ -1,404 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaskStoreDouble() - { - var test = new StoreBinaryOpTest__MaskStoreDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class StoreBinaryOpTest__MaskStoreDouble - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(StoreBinaryOpTest__MaskStoreDouble testClass) - { - Avx.MaskStore((Double*)testClass._dataTable.outArrayPtr, _fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static StoreBinaryOpTest__MaskStoreDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public StoreBinaryOpTest__MaskStoreDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - Avx.MaskStore( - (Double*)_dataTable.outArrayPtr, - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - Avx.MaskStore( - (Double*)_dataTable.outArrayPtr, - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - Avx.MaskStore( - (Double*)_dataTable.outArrayPtr, - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - typeof(Avx).GetMethod(nameof(Avx.MaskStore), new Type[] { typeof(Double*), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(Double*)), - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - typeof(Avx).GetMethod(nameof(Avx.MaskStore), new Type[] { typeof(Double*), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(Double*)), - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - typeof(Avx).GetMethod(nameof(Avx.MaskStore), new Type[] { typeof(Double*), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(Double*)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - Avx.MaskStore( - (Double*)_dataTable.outArrayPtr, - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - Avx.MaskStore((Double*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)); - Avx.MaskStore((Double*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)); - Avx.MaskStore((Double*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new StoreBinaryOpTest__MaskStoreDouble(); - Avx.MaskStore((Double*)_dataTable.outArrayPtr, test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - Avx.MaskStore((Double*)_dataTable.outArrayPtr, _fld1, _fld2); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - Avx.MaskStore((Double*)_dataTable.outArrayPtr, test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits((BitConverter.DoubleToInt64Bits(left[0]) < 0) ? right[0] : BitConverter.DoubleToInt64Bits(result[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits((BitConverter.DoubleToInt64Bits(left[i]) < 0) ? right[i] : BitConverter.DoubleToInt64Bits(result[i]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.MaskStore)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskStore.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskStore.Single.cs deleted file mode 100644 index f4a0c42ccd03..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskStore.Single.cs +++ /dev/null @@ -1,404 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaskStoreSingle() - { - var test = new StoreBinaryOpTest__MaskStoreSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class StoreBinaryOpTest__MaskStoreSingle - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(StoreBinaryOpTest__MaskStoreSingle testClass) - { - Avx.MaskStore((Single*)testClass._dataTable.outArrayPtr, _fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static StoreBinaryOpTest__MaskStoreSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public StoreBinaryOpTest__MaskStoreSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - Avx.MaskStore( - (Single*)_dataTable.outArrayPtr, - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - Avx.MaskStore( - (Single*)_dataTable.outArrayPtr, - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - Avx.MaskStore( - (Single*)_dataTable.outArrayPtr, - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - typeof(Avx).GetMethod(nameof(Avx.MaskStore), new Type[] { typeof(Single*), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(Single*)), - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - typeof(Avx).GetMethod(nameof(Avx.MaskStore), new Type[] { typeof(Single*), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(Single*)), - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - typeof(Avx).GetMethod(nameof(Avx.MaskStore), new Type[] { typeof(Single*), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(Single*)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - Avx.MaskStore( - (Single*)_dataTable.outArrayPtr, - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - Avx.MaskStore((Single*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)); - Avx.MaskStore((Single*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)); - Avx.MaskStore((Single*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new StoreBinaryOpTest__MaskStoreSingle(); - Avx.MaskStore((Single*)_dataTable.outArrayPtr, test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - Avx.MaskStore((Single*)_dataTable.outArrayPtr, _fld1, _fld2); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - Avx.MaskStore((Single*)_dataTable.outArrayPtr, test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits((BitConverter.SingleToInt32Bits(left[0]) < 0) ? right[0] : BitConverter.SingleToInt32Bits(result[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits((BitConverter.SingleToInt32Bits(left[i]) < 0) ? right[i] : BitConverter.SingleToInt32Bits(result[i]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.MaskStore)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Max.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Max.Double.cs deleted file mode 100644 index e50022a06c02..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Max.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaxDouble() - { - var test = new SimpleBinaryOpTest__MaxDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MaxDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MaxDouble testClass) - { - var result = Avx.Max(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MaxDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.Max( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MaxDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MaxDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.Max( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.Max( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.Max( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Max), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Max), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Max), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.Max( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.Max( - Avx.LoadVector256((Double*)(pClsVar1)), - Avx.LoadVector256((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MaxDouble(); - var result = Avx.Max(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MaxDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.Max( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.Max(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.Max( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.Max(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.Max( - Avx.LoadVector256((Double*)(&test._fld1)), - Avx.LoadVector256((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(Math.Max(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(Math.Max(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.Max)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Max.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Max.Single.cs deleted file mode 100644 index 09c1d15f018e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Max.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaxSingle() - { - var test = new SimpleBinaryOpTest__MaxSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MaxSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MaxSingle testClass) - { - var result = Avx.Max(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MaxSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.Max( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MaxSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MaxSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.Max( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.Max( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.Max( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Max), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Max), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Max), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.Max( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.Max( - Avx.LoadVector256((Single*)(pClsVar1)), - Avx.LoadVector256((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MaxSingle(); - var result = Avx.Max(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MaxSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.Max( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.Max(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.Max( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.Max(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.Max( - Avx.LoadVector256((Single*)(&test._fld1)), - Avx.LoadVector256((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(MathF.Max(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(MathF.Max(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.Max)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Min.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Min.Double.cs deleted file mode 100644 index 535a1dc4473c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Min.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MinDouble() - { - var test = new SimpleBinaryOpTest__MinDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MinDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MinDouble testClass) - { - var result = Avx.Min(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MinDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.Min( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MinDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MinDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.Min( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.Min( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.Min( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Min), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Min), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Min), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.Min( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.Min( - Avx.LoadVector256((Double*)(pClsVar1)), - Avx.LoadVector256((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MinDouble(); - var result = Avx.Min(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MinDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.Min( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.Min(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.Min( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.Min(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.Min( - Avx.LoadVector256((Double*)(&test._fld1)), - Avx.LoadVector256((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(Math.Min(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(Math.Min(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.Min)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Min.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Min.Single.cs deleted file mode 100644 index b0c6db94ff2c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Min.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MinSingle() - { - var test = new SimpleBinaryOpTest__MinSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MinSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MinSingle testClass) - { - var result = Avx.Min(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MinSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.Min( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MinSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MinSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.Min( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.Min( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.Min( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Min), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Min), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Min), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.Min( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.Min( - Avx.LoadVector256((Single*)(pClsVar1)), - Avx.LoadVector256((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MinSingle(); - var result = Avx.Min(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MinSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.Min( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.Min(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.Min( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.Min(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.Min( - Avx.LoadVector256((Single*)(&test._fld1)), - Avx.LoadVector256((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(MathF.Min(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(MathF.Min(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.Min)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/MoveMask.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/MoveMask.cs deleted file mode 100644 index 98ad32760bcb..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/MoveMask.cs +++ /dev/null @@ -1,77 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Avx.IsSupported) - { - using (TestTable floatTable = new TestTable(new float[8] { 1, -5, 100, 0, 1, -5, 100, 0 })) - { - - var vf1 = Unsafe.Read>(floatTable.inArray1Ptr); - var res = Avx.MoveMask(vf1); - - if (res != 0b00100010) - { - Console.WriteLine("Avx MoveMask failed on float:"); - Console.WriteLine(res); - testResult = Fail; - } - } - - using (TestTable doubleTable = new TestTable(new double[4] { 1, -5, 1, -5 })) - { - - var vf1 = Unsafe.Read>(doubleTable.inArray1Ptr); - var res = Avx.MoveMask(vf1); - - if (res != 0b1010) - { - Console.WriteLine("Avx MoveMask failed on double:"); - Console.WriteLine(res); - testResult = Fail; - } - } - } - - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T : struct - { - public T[] inArray1; - public void* inArray1Ptr => inHandle1.AddrOfPinnedObject().ToPointer(); - GCHandle inHandle1; - - public TestTable(T[] a) - { - this.inArray1 = a; - inHandle1 = GCHandle.Alloc(inArray1, GCHandleType.Pinned); - } - - public void Dispose() - { - inHandle1.Free(); - } - } - - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Multiply.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Multiply.Double.cs deleted file mode 100644 index 19f3f5c5c54d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Multiply.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplyDouble() - { - var test = new SimpleBinaryOpTest__MultiplyDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MultiplyDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MultiplyDouble testClass) - { - var result = Avx.Multiply(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MultiplyDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.Multiply( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MultiplyDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MultiplyDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.Multiply( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.Multiply( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.Multiply( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Multiply), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Multiply), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Multiply), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.Multiply( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.Multiply( - Avx.LoadVector256((Double*)(pClsVar1)), - Avx.LoadVector256((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.Multiply(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.Multiply(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.Multiply(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MultiplyDouble(); - var result = Avx.Multiply(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MultiplyDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.Multiply( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.Multiply(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.Multiply( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.Multiply(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.Multiply( - Avx.LoadVector256((Double*)(&test._fld1)), - Avx.LoadVector256((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(left[0] * right[0]) != BitConverter.DoubleToInt64Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(left[i] * right[i]) != BitConverter.DoubleToInt64Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.Multiply)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Multiply.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Multiply.Single.cs deleted file mode 100644 index 0a878fba515b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Multiply.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplySingle() - { - var test = new SimpleBinaryOpTest__MultiplySingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MultiplySingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MultiplySingle testClass) - { - var result = Avx.Multiply(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MultiplySingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.Multiply( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MultiplySingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MultiplySingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.Multiply( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.Multiply( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.Multiply( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Multiply), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Multiply), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Multiply), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.Multiply( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.Multiply( - Avx.LoadVector256((Single*)(pClsVar1)), - Avx.LoadVector256((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.Multiply(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.Multiply(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.Multiply(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MultiplySingle(); - var result = Avx.Multiply(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MultiplySingle(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.Multiply( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.Multiply(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.Multiply( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.Multiply(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.Multiply( - Avx.LoadVector256((Single*)(&test._fld1)), - Avx.LoadVector256((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(left[0] * right[0]) != BitConverter.SingleToInt32Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(left[i] * right[i]) != BitConverter.SingleToInt32Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.Multiply)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Or.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Or.Double.cs deleted file mode 100644 index b9b6ec4e48d9..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Or.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void OrDouble() - { - var test = new SimpleBinaryOpTest__OrDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__OrDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__OrDouble testClass) - { - var result = Avx.Or(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__OrDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.Or( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__OrDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__OrDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.Or( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.Or( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.Or( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Or), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Or), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Or), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.Or( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.Or( - Avx.LoadVector256((Double*)(pClsVar1)), - Avx.LoadVector256((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__OrDouble(); - var result = Avx.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__OrDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.Or( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.Or(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.Or( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.Or( - Avx.LoadVector256((Double*)(&test._fld1)), - Avx.LoadVector256((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((BitConverter.DoubleToInt64Bits(left[0]) | BitConverter.DoubleToInt64Bits(right[0])) != BitConverter.DoubleToInt64Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((BitConverter.DoubleToInt64Bits(left[i]) | BitConverter.DoubleToInt64Bits(right[i])) != BitConverter.DoubleToInt64Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.Or)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Or.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Or.Single.cs deleted file mode 100644 index 850b577b772e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Or.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void OrSingle() - { - var test = new SimpleBinaryOpTest__OrSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__OrSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__OrSingle testClass) - { - var result = Avx.Or(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__OrSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.Or( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__OrSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__OrSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.Or( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.Or( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.Or( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Or), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Or), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Or), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.Or( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.Or( - Avx.LoadVector256((Single*)(pClsVar1)), - Avx.LoadVector256((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__OrSingle(); - var result = Avx.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__OrSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.Or( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.Or(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.Or( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.Or( - Avx.LoadVector256((Single*)(&test._fld1)), - Avx.LoadVector256((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((BitConverter.SingleToInt32Bits(left[0]) | BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((BitConverter.SingleToInt32Bits(left[i]) | BitConverter.SingleToInt32Bits(right[i])) != BitConverter.SingleToInt32Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.Or)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Permute2x128.Int32.2.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Permute2x128.Int32.2.cs deleted file mode 100644 index 4d2e49b8b136..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Permute2x128.Int32.2.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void Permute2x128Int322() - { - var test = new ImmBinaryOpTest__Permute2x128Int322(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__Permute2x128Int322 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__Permute2x128Int322 testClass) - { - var result = Avx.Permute2x128(_fld1, _fld2, 2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__Permute2x128Int322() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__Permute2x128Int322() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.Permute2x128( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.Permute2x128( - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.Permute2x128( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Permute2x128), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Permute2x128), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Permute2x128), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.Permute2x128( - _clsVar1, - _clsVar2, - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.Permute2x128(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx.Permute2x128(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx.Permute2x128(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__Permute2x128Int322(); - var result = Avx.Permute2x128(test._fld1, test._fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.Permute2x128(_fld1, _fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.Permute2x128(test._fld1, test._fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != right[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (i < 4 ? right[i] : left[i-4])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.Permute2x128)}(Vector256.2, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Permute2x128.Int64.2.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Permute2x128.Int64.2.cs deleted file mode 100644 index 006f2eef1c1f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Permute2x128.Int64.2.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void Permute2x128Int642() - { - var test = new ImmBinaryOpTest__Permute2x128Int642(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__Permute2x128Int642 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__Permute2x128Int642 testClass) - { - var result = Avx.Permute2x128(_fld1, _fld2, 2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__Permute2x128Int642() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__Permute2x128Int642() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.Permute2x128( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.Permute2x128( - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.Permute2x128( - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Permute2x128), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Permute2x128), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Permute2x128), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.Permute2x128( - _clsVar1, - _clsVar2, - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.Permute2x128(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx.Permute2x128(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx.Permute2x128(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__Permute2x128Int642(); - var result = Avx.Permute2x128(test._fld1, test._fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.Permute2x128(_fld1, _fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.Permute2x128(test._fld1, test._fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != right[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (i < 2 ? right[i] : left[i-2])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.Permute2x128)}(Vector256.2, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Permute2x128.UInt32.2.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Permute2x128.UInt32.2.cs deleted file mode 100644 index 46160a08a0e9..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Permute2x128.UInt32.2.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void Permute2x128UInt322() - { - var test = new ImmBinaryOpTest__Permute2x128UInt322(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__Permute2x128UInt322 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__Permute2x128UInt322 testClass) - { - var result = Avx.Permute2x128(_fld1, _fld2, 2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__Permute2x128UInt322() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__Permute2x128UInt322() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.Permute2x128( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.Permute2x128( - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.Permute2x128( - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Permute2x128), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Permute2x128), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Permute2x128), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.Permute2x128( - _clsVar1, - _clsVar2, - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.Permute2x128(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx.Permute2x128(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx.Permute2x128(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__Permute2x128UInt322(); - var result = Avx.Permute2x128(test._fld1, test._fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.Permute2x128(_fld1, _fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.Permute2x128(test._fld1, test._fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != right[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (i < 4 ? right[i] : left[i-4])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.Permute2x128)}(Vector256.2, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Permute2x128.UInt64.2.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Permute2x128.UInt64.2.cs deleted file mode 100644 index e7384bba8cd0..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Permute2x128.UInt64.2.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void Permute2x128UInt642() - { - var test = new ImmBinaryOpTest__Permute2x128UInt642(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__Permute2x128UInt642 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__Permute2x128UInt642 testClass) - { - var result = Avx.Permute2x128(_fld1, _fld2, 2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__Permute2x128UInt642() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__Permute2x128UInt642() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.Permute2x128( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.Permute2x128( - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.Permute2x128( - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Permute2x128), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Permute2x128), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Permute2x128), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.Permute2x128( - _clsVar1, - _clsVar2, - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.Permute2x128(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx.Permute2x128(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx.Permute2x128(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__Permute2x128UInt642(); - var result = Avx.Permute2x128(test._fld1, test._fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.Permute2x128(_fld1, _fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.Permute2x128(test._fld1, test._fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt64[] left, UInt64[] right, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != right[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (i < 2 ? right[i] : left[i-2])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.Permute2x128)}(Vector256.2, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/PermuteVar.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/PermuteVar.Double.cs deleted file mode 100644 index 78f29e740404..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/PermuteVar.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void PermuteVarDouble() - { - var test = new SimpleBinaryOpTest__PermuteVarDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__PermuteVarDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Int64[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)1; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__PermuteVarDouble testClass) - { - var result = Avx.PermuteVar(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__PermuteVarDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.PermuteVar( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__PermuteVarDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)1; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__PermuteVarDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)1; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)1; } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.PermuteVar( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.PermuteVar( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.PermuteVar( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.PermuteVar), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.PermuteVar), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.PermuteVar), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.PermuteVar( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.PermuteVar( - Avx.LoadVector256((Double*)(pClsVar1)), - Avx.LoadVector256((Int64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.PermuteVar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx.PermuteVar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx.PermuteVar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__PermuteVarDouble(); - var result = Avx.PermuteVar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__PermuteVarDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.PermuteVar( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.PermuteVar(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.PermuteVar( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.PermuteVar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.PermuteVar( - Avx.LoadVector256((Double*)(&test._fld1)), - Avx.LoadVector256((Int64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Int64[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(left[0]) != BitConverter.DoubleToInt64Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (i > 1 ? (BitConverter.DoubleToInt64Bits(left[2]) != BitConverter.DoubleToInt64Bits(result[i])) : (BitConverter.DoubleToInt64Bits(left[0]) != BitConverter.DoubleToInt64Bits(result[i]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.PermuteVar)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/PermuteVar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/PermuteVar.Single.cs deleted file mode 100644 index 12116a29f6b2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/PermuteVar.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void PermuteVarSingle() - { - var test = new SimpleBinaryOpTest__PermuteVarSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__PermuteVarSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Int32[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = 1; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__PermuteVarSingle testClass) - { - var result = Avx.PermuteVar(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__PermuteVarSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.PermuteVar( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__PermuteVarSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = 1; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__PermuteVarSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = 1; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = 1; } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.PermuteVar( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.PermuteVar( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.PermuteVar( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.PermuteVar), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.PermuteVar), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.PermuteVar), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.PermuteVar( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.PermuteVar( - Avx.LoadVector256((Single*)(pClsVar1)), - Avx.LoadVector256((Int32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.PermuteVar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx.PermuteVar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx.PermuteVar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__PermuteVarSingle(); - var result = Avx.PermuteVar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__PermuteVarSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.PermuteVar( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.PermuteVar(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.PermuteVar( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.PermuteVar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.PermuteVar( - Avx.LoadVector256((Single*)(&test._fld1)), - Avx.LoadVector256((Int32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Int32[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(left[1]) != BitConverter.SingleToInt32Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (i > 3 ? (BitConverter.SingleToInt32Bits(left[5]) != BitConverter.SingleToInt32Bits(result[i])) : (BitConverter.SingleToInt32Bits(left[1]) != BitConverter.SingleToInt32Bits(result[i]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.PermuteVar)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundCurrentDirection.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundCurrentDirection.Double.cs deleted file mode 100644 index 800b6c946448..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundCurrentDirection.Double.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundCurrentDirectionDouble() - { - var test = new SimpleUnaryOpTest__RoundCurrentDirectionDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__RoundCurrentDirectionDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__RoundCurrentDirectionDouble testClass) - { - var result = Avx.RoundCurrentDirection(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__RoundCurrentDirectionDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - { - var result = Avx.RoundCurrentDirection( - Avx.LoadVector256((Double*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - - private static Vector256 _clsVar1; - - private Vector256 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__RoundCurrentDirectionDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__RoundCurrentDirectionDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.RoundCurrentDirection( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.RoundCurrentDirection( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.RoundCurrentDirection( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.RoundCurrentDirection), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.RoundCurrentDirection), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.RoundCurrentDirection), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.RoundCurrentDirection( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - { - var result = Avx.RoundCurrentDirection( - Avx.LoadVector256((Double*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Avx.RoundCurrentDirection(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var result = Avx.RoundCurrentDirection(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var result = Avx.RoundCurrentDirection(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__RoundCurrentDirectionDouble(); - var result = Avx.RoundCurrentDirection(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__RoundCurrentDirectionDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - { - var result = Avx.RoundCurrentDirection( - Avx.LoadVector256((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.RoundCurrentDirection(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - { - var result = Avx.RoundCurrentDirection( - Avx.LoadVector256((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.RoundCurrentDirection(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.RoundCurrentDirection( - Avx.LoadVector256((Double*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Round(firstOp[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Round(firstOp[i]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.RoundCurrentDirection)}(Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundCurrentDirection.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundCurrentDirection.Single.cs deleted file mode 100644 index 94dbdc3c4b71..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundCurrentDirection.Single.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundCurrentDirectionSingle() - { - var test = new SimpleUnaryOpTest__RoundCurrentDirectionSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__RoundCurrentDirectionSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__RoundCurrentDirectionSingle testClass) - { - var result = Avx.RoundCurrentDirection(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__RoundCurrentDirectionSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - { - var result = Avx.RoundCurrentDirection( - Avx.LoadVector256((Single*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - - private static Vector256 _clsVar1; - - private Vector256 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__RoundCurrentDirectionSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__RoundCurrentDirectionSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.RoundCurrentDirection( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.RoundCurrentDirection( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.RoundCurrentDirection( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.RoundCurrentDirection), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.RoundCurrentDirection), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.RoundCurrentDirection), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.RoundCurrentDirection( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - { - var result = Avx.RoundCurrentDirection( - Avx.LoadVector256((Single*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Avx.RoundCurrentDirection(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var result = Avx.RoundCurrentDirection(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var result = Avx.RoundCurrentDirection(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__RoundCurrentDirectionSingle(); - var result = Avx.RoundCurrentDirection(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__RoundCurrentDirectionSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - { - var result = Avx.RoundCurrentDirection( - Avx.LoadVector256((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.RoundCurrentDirection(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - { - var result = Avx.RoundCurrentDirection( - Avx.LoadVector256((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.RoundCurrentDirection(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.RoundCurrentDirection( - Avx.LoadVector256((Single*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Round(firstOp[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Round(firstOp[i]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.RoundCurrentDirection)}(Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToNearestInteger.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToNearestInteger.Double.cs deleted file mode 100644 index 0ef1e120b808..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToNearestInteger.Double.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundToNearestIntegerDouble() - { - var test = new SimpleUnaryOpTest__RoundToNearestIntegerDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__RoundToNearestIntegerDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__RoundToNearestIntegerDouble testClass) - { - var result = Avx.RoundToNearestInteger(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__RoundToNearestIntegerDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - { - var result = Avx.RoundToNearestInteger( - Avx.LoadVector256((Double*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - - private static Vector256 _clsVar1; - - private Vector256 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__RoundToNearestIntegerDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__RoundToNearestIntegerDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.RoundToNearestInteger( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.RoundToNearestInteger( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.RoundToNearestInteger( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.RoundToNearestInteger), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.RoundToNearestInteger), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.RoundToNearestInteger), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.RoundToNearestInteger( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - { - var result = Avx.RoundToNearestInteger( - Avx.LoadVector256((Double*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Avx.RoundToNearestInteger(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var result = Avx.RoundToNearestInteger(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var result = Avx.RoundToNearestInteger(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__RoundToNearestIntegerDouble(); - var result = Avx.RoundToNearestInteger(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__RoundToNearestIntegerDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - { - var result = Avx.RoundToNearestInteger( - Avx.LoadVector256((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.RoundToNearestInteger(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - { - var result = Avx.RoundToNearestInteger( - Avx.LoadVector256((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.RoundToNearestInteger(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.RoundToNearestInteger( - Avx.LoadVector256((Double*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Round(firstOp[0], MidpointRounding.AwayFromZero))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Round(firstOp[i], MidpointRounding.AwayFromZero))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.RoundToNearestInteger)}(Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToNearestInteger.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToNearestInteger.Single.cs deleted file mode 100644 index ac41802e44a4..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToNearestInteger.Single.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundToNearestIntegerSingle() - { - var test = new SimpleUnaryOpTest__RoundToNearestIntegerSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__RoundToNearestIntegerSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__RoundToNearestIntegerSingle testClass) - { - var result = Avx.RoundToNearestInteger(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__RoundToNearestIntegerSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - { - var result = Avx.RoundToNearestInteger( - Avx.LoadVector256((Single*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - - private static Vector256 _clsVar1; - - private Vector256 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__RoundToNearestIntegerSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__RoundToNearestIntegerSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.RoundToNearestInteger( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.RoundToNearestInteger( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.RoundToNearestInteger( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.RoundToNearestInteger), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.RoundToNearestInteger), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.RoundToNearestInteger), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.RoundToNearestInteger( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - { - var result = Avx.RoundToNearestInteger( - Avx.LoadVector256((Single*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Avx.RoundToNearestInteger(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var result = Avx.RoundToNearestInteger(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var result = Avx.RoundToNearestInteger(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__RoundToNearestIntegerSingle(); - var result = Avx.RoundToNearestInteger(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__RoundToNearestIntegerSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - { - var result = Avx.RoundToNearestInteger( - Avx.LoadVector256((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.RoundToNearestInteger(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - { - var result = Avx.RoundToNearestInteger( - Avx.LoadVector256((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.RoundToNearestInteger(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.RoundToNearestInteger( - Avx.LoadVector256((Single*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Round(firstOp[0], MidpointRounding.AwayFromZero))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Round(firstOp[i], MidpointRounding.AwayFromZero))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.RoundToNearestInteger)}(Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToNegativeInfinity.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToNegativeInfinity.Double.cs deleted file mode 100644 index c9c97a59de3a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToNegativeInfinity.Double.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundToNegativeInfinityDouble() - { - var test = new SimpleUnaryOpTest__RoundToNegativeInfinityDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__RoundToNegativeInfinityDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__RoundToNegativeInfinityDouble testClass) - { - var result = Avx.RoundToNegativeInfinity(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__RoundToNegativeInfinityDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - { - var result = Avx.RoundToNegativeInfinity( - Avx.LoadVector256((Double*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - - private static Vector256 _clsVar1; - - private Vector256 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__RoundToNegativeInfinityDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__RoundToNegativeInfinityDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.RoundToNegativeInfinity( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.RoundToNegativeInfinity( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.RoundToNegativeInfinity( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.RoundToNegativeInfinity), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.RoundToNegativeInfinity), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.RoundToNegativeInfinity), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.RoundToNegativeInfinity( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - { - var result = Avx.RoundToNegativeInfinity( - Avx.LoadVector256((Double*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Avx.RoundToNegativeInfinity(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var result = Avx.RoundToNegativeInfinity(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var result = Avx.RoundToNegativeInfinity(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__RoundToNegativeInfinityDouble(); - var result = Avx.RoundToNegativeInfinity(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__RoundToNegativeInfinityDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - { - var result = Avx.RoundToNegativeInfinity( - Avx.LoadVector256((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.RoundToNegativeInfinity(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - { - var result = Avx.RoundToNegativeInfinity( - Avx.LoadVector256((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.RoundToNegativeInfinity(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.RoundToNegativeInfinity( - Avx.LoadVector256((Double*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Floor(firstOp[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Floor(firstOp[i]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.RoundToNegativeInfinity)}(Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToNegativeInfinity.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToNegativeInfinity.Single.cs deleted file mode 100644 index 36e5b48aa1f1..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToNegativeInfinity.Single.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundToNegativeInfinitySingle() - { - var test = new SimpleUnaryOpTest__RoundToNegativeInfinitySingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__RoundToNegativeInfinitySingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__RoundToNegativeInfinitySingle testClass) - { - var result = Avx.RoundToNegativeInfinity(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__RoundToNegativeInfinitySingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - { - var result = Avx.RoundToNegativeInfinity( - Avx.LoadVector256((Single*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - - private static Vector256 _clsVar1; - - private Vector256 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__RoundToNegativeInfinitySingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__RoundToNegativeInfinitySingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.RoundToNegativeInfinity( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.RoundToNegativeInfinity( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.RoundToNegativeInfinity( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.RoundToNegativeInfinity), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.RoundToNegativeInfinity), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.RoundToNegativeInfinity), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.RoundToNegativeInfinity( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - { - var result = Avx.RoundToNegativeInfinity( - Avx.LoadVector256((Single*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Avx.RoundToNegativeInfinity(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var result = Avx.RoundToNegativeInfinity(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var result = Avx.RoundToNegativeInfinity(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__RoundToNegativeInfinitySingle(); - var result = Avx.RoundToNegativeInfinity(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__RoundToNegativeInfinitySingle(); - - fixed (Vector256* pFld1 = &test._fld1) - { - var result = Avx.RoundToNegativeInfinity( - Avx.LoadVector256((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.RoundToNegativeInfinity(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - { - var result = Avx.RoundToNegativeInfinity( - Avx.LoadVector256((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.RoundToNegativeInfinity(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.RoundToNegativeInfinity( - Avx.LoadVector256((Single*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Floor(firstOp[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Floor(firstOp[i]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.RoundToNegativeInfinity)}(Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToPositiveInfinity.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToPositiveInfinity.Double.cs deleted file mode 100644 index c0837e1ea6e0..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToPositiveInfinity.Double.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundToPositiveInfinityDouble() - { - var test = new SimpleUnaryOpTest__RoundToPositiveInfinityDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__RoundToPositiveInfinityDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__RoundToPositiveInfinityDouble testClass) - { - var result = Avx.RoundToPositiveInfinity(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__RoundToPositiveInfinityDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - { - var result = Avx.RoundToPositiveInfinity( - Avx.LoadVector256((Double*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - - private static Vector256 _clsVar1; - - private Vector256 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__RoundToPositiveInfinityDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__RoundToPositiveInfinityDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.RoundToPositiveInfinity( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.RoundToPositiveInfinity( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.RoundToPositiveInfinity( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.RoundToPositiveInfinity), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.RoundToPositiveInfinity), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.RoundToPositiveInfinity), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.RoundToPositiveInfinity( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - { - var result = Avx.RoundToPositiveInfinity( - Avx.LoadVector256((Double*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Avx.RoundToPositiveInfinity(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var result = Avx.RoundToPositiveInfinity(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var result = Avx.RoundToPositiveInfinity(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__RoundToPositiveInfinityDouble(); - var result = Avx.RoundToPositiveInfinity(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__RoundToPositiveInfinityDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - { - var result = Avx.RoundToPositiveInfinity( - Avx.LoadVector256((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.RoundToPositiveInfinity(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - { - var result = Avx.RoundToPositiveInfinity( - Avx.LoadVector256((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.RoundToPositiveInfinity(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.RoundToPositiveInfinity( - Avx.LoadVector256((Double*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Ceiling(firstOp[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Ceiling(firstOp[i]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.RoundToPositiveInfinity)}(Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToPositiveInfinity.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToPositiveInfinity.Single.cs deleted file mode 100644 index e25d0891774a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToPositiveInfinity.Single.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundToPositiveInfinitySingle() - { - var test = new SimpleUnaryOpTest__RoundToPositiveInfinitySingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__RoundToPositiveInfinitySingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__RoundToPositiveInfinitySingle testClass) - { - var result = Avx.RoundToPositiveInfinity(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__RoundToPositiveInfinitySingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - { - var result = Avx.RoundToPositiveInfinity( - Avx.LoadVector256((Single*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - - private static Vector256 _clsVar1; - - private Vector256 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__RoundToPositiveInfinitySingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__RoundToPositiveInfinitySingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.RoundToPositiveInfinity( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.RoundToPositiveInfinity( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.RoundToPositiveInfinity( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.RoundToPositiveInfinity), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.RoundToPositiveInfinity), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.RoundToPositiveInfinity), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.RoundToPositiveInfinity( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - { - var result = Avx.RoundToPositiveInfinity( - Avx.LoadVector256((Single*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Avx.RoundToPositiveInfinity(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var result = Avx.RoundToPositiveInfinity(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var result = Avx.RoundToPositiveInfinity(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__RoundToPositiveInfinitySingle(); - var result = Avx.RoundToPositiveInfinity(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__RoundToPositiveInfinitySingle(); - - fixed (Vector256* pFld1 = &test._fld1) - { - var result = Avx.RoundToPositiveInfinity( - Avx.LoadVector256((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.RoundToPositiveInfinity(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - { - var result = Avx.RoundToPositiveInfinity( - Avx.LoadVector256((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.RoundToPositiveInfinity(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.RoundToPositiveInfinity( - Avx.LoadVector256((Single*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Ceiling(firstOp[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Ceiling(firstOp[i]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.RoundToPositiveInfinity)}(Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToZero.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToZero.Double.cs deleted file mode 100644 index 93bd094b63c7..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToZero.Double.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundToZeroDouble() - { - var test = new SimpleUnaryOpTest__RoundToZeroDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__RoundToZeroDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__RoundToZeroDouble testClass) - { - var result = Avx.RoundToZero(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__RoundToZeroDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - { - var result = Avx.RoundToZero( - Avx.LoadVector256((Double*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - - private static Vector256 _clsVar1; - - private Vector256 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__RoundToZeroDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__RoundToZeroDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.RoundToZero( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.RoundToZero( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.RoundToZero( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.RoundToZero), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.RoundToZero), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.RoundToZero), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.RoundToZero( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - { - var result = Avx.RoundToZero( - Avx.LoadVector256((Double*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Avx.RoundToZero(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var result = Avx.RoundToZero(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var result = Avx.RoundToZero(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__RoundToZeroDouble(); - var result = Avx.RoundToZero(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__RoundToZeroDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - { - var result = Avx.RoundToZero( - Avx.LoadVector256((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.RoundToZero(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - { - var result = Avx.RoundToZero( - Avx.LoadVector256((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.RoundToZero(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.RoundToZero( - Avx.LoadVector256((Double*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits((firstOp[0] > 0) ? Math.Floor(firstOp[0]) : Math.Ceiling(firstOp[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits((firstOp[i] > 0) ? Math.Floor(firstOp[i]) : Math.Ceiling(firstOp[i]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.RoundToZero)}(Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToZero.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToZero.Single.cs deleted file mode 100644 index 4064fca72d7f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToZero.Single.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundToZeroSingle() - { - var test = new SimpleUnaryOpTest__RoundToZeroSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__RoundToZeroSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__RoundToZeroSingle testClass) - { - var result = Avx.RoundToZero(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__RoundToZeroSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - { - var result = Avx.RoundToZero( - Avx.LoadVector256((Single*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - - private static Vector256 _clsVar1; - - private Vector256 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__RoundToZeroSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__RoundToZeroSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.RoundToZero( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.RoundToZero( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.RoundToZero( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.RoundToZero), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.RoundToZero), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.RoundToZero), new Type[] { typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.RoundToZero( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - { - var result = Avx.RoundToZero( - Avx.LoadVector256((Single*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Avx.RoundToZero(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var result = Avx.RoundToZero(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var result = Avx.RoundToZero(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__RoundToZeroSingle(); - var result = Avx.RoundToZero(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__RoundToZeroSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - { - var result = Avx.RoundToZero( - Avx.LoadVector256((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.RoundToZero(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - { - var result = Avx.RoundToZero( - Avx.LoadVector256((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.RoundToZero(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.RoundToZero( - Avx.LoadVector256((Single*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits((firstOp[0] > 0) ? MathF.Floor(firstOp[0]) : MathF.Ceiling(firstOp[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits((firstOp[i] > 0) ? MathF.Floor(firstOp[i]) : MathF.Ceiling(firstOp[i]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.RoundToZero)}(Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Shuffle.Double.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Shuffle.Double.1.cs deleted file mode 100644 index 8c879b064c4f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Shuffle.Double.1.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShuffleDouble1() - { - var test = new ImmBinaryOpTest__ShuffleDouble1(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__ShuffleDouble1 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__ShuffleDouble1 testClass) - { - var result = Avx.Shuffle(_fld1, _fld2, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__ShuffleDouble1() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__ShuffleDouble1() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.Shuffle( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.Shuffle( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.Shuffle( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Shuffle), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Shuffle), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Shuffle), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.Shuffle( - _clsVar1, - _clsVar2, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.Shuffle(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.Shuffle(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.Shuffle(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__ShuffleDouble1(); - var result = Avx.Shuffle(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.Shuffle(_fld1, _fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.Shuffle(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(left[1])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[3]) != BitConverter.DoubleToInt64Bits(right[2])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.Shuffle)}(Vector256.1, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Sqrt.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Sqrt.cs deleted file mode 100644 index 8171e8d7287f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Sqrt.cs +++ /dev/null @@ -1,111 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Avx.IsSupported) - { - using (TestTable floatTable = new TestTable(new float[8] { 1, -5, 100, 0, 1, -5, 100, 0}, new float[8])) - using (TestTable doubleTable = new TestTable(new double[4] { 1, -5, 100, 0 }, new double[4])) - { - - var vf1 = Unsafe.Read>(floatTable.inArrayPtr); - var vf2 = Avx.Sqrt(vf1); - Unsafe.Write(floatTable.outArrayPtr, vf2); - - var vd1 = Unsafe.Read>(doubleTable.inArrayPtr); - var vd2 = Avx.Sqrt(vd1); - Unsafe.Write(doubleTable.outArrayPtr, vd2); - - if (!floatTable.CheckResult((x, y) => { - var expected = MathF.Sqrt(x); - return (expected == y) - || (float.IsNaN(expected) && float.IsNaN(y)); - })) - { - Console.WriteLine("Avx Sqrt failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - if (!doubleTable.CheckResult((x, y) => { - var expected = Math.Sqrt(x); - return (expected == y) - || (double.IsNaN(expected) && double.IsNaN(y)); - })) - { - Console.WriteLine("Avx Sqrt failed on double:"); - foreach (var item in doubleTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - } - - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T : struct - { - public T[] inArray; - public T[] outArray; - - public void* inArrayPtr => inHandle.AddrOfPinnedObject().ToPointer(); - public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); - - GCHandle inHandle; - GCHandle outHandle; - public TestTable(T[] a, T[] b) - { - this.inArray = a; - this.outArray = b; - - inHandle = GCHandle.Alloc(inArray, GCHandleType.Pinned); - outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); - } - public bool CheckResult(Func check) - { - for (int i = 0; i < inArray.Length; i++) - { - if (!check(inArray[i], outArray[i])) - { - return false; - } - } - return true; - } - - public void Dispose() - { - inHandle.Free(); - outHandle.Free(); - } - } - - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Store.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Store.cs deleted file mode 100644 index 3b010584a123..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Store.cs +++ /dev/null @@ -1,238 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Avx.IsSupported) - { - using (TestTable doubleTable = new TestTable(new double[4] { 1, -5, 100, 0 }, new double[4])) - { - var vf = Unsafe.Read>(doubleTable.inArrayPtr); - Avx.Store((double*)(doubleTable.outArrayPtr), vf); - - if (!doubleTable.CheckResult((x, y) => BitConverter.DoubleToInt64Bits(x) == BitConverter.DoubleToInt64Bits(y))) - { - Console.WriteLine("Avx Store failed on double:"); - foreach (var item in doubleTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - using (TestTable floatTable = new TestTable(new float[8] { 1, -5, 100, 0, 1, 2, 3, 4 }, new float[8])) - { - var vf = Unsafe.Read>(floatTable.inArrayPtr); - Avx.Store((float*)(floatTable.outArrayPtr), vf); - - if (!floatTable.CheckResult((x, y) => BitConverter.SingleToInt32Bits(x) == BitConverter.SingleToInt32Bits(y))) - { - Console.WriteLine("Avx Store failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - using (TestTable intTable = new TestTable(new long[4] { 1, -5, 100, 0 }, new long[4])) - { - var vf = Unsafe.Read>(intTable.inArrayPtr); - Avx.Store((long*)(intTable.outArrayPtr), vf); - - if (!intTable.CheckResult((x, y) => x == y)) - { - Console.WriteLine("Avx Store failed on long:"); - foreach (var item in intTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - using (TestTable intTable = new TestTable(new ulong[4] { 1, 5, 100, 0 }, new ulong[4])) - { - var vf = Unsafe.Read>(intTable.inArrayPtr); - Avx.Store((ulong*)(intTable.outArrayPtr), vf); - - if (!intTable.CheckResult((x, y) => x == y)) - { - Console.WriteLine("Avx Store failed on ulong:"); - foreach (var item in intTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - using (TestTable intTable = new TestTable(new int[8] { 1, -5, 100, 0, 1, 2, 3, 4 }, new int[8])) - { - var vf = Unsafe.Read>(intTable.inArrayPtr); - Avx.Store((int*)(intTable.outArrayPtr), vf); - - if (!intTable.CheckResult((x, y) => x == y)) - { - Console.WriteLine("Avx Store failed on int:"); - foreach (var item in intTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - using (TestTable intTable = new TestTable(new uint[8] { 1, 5, 100, 0, 1, 2, 3, 4 }, new uint[8])) - { - var vf = Unsafe.Read>(intTable.inArrayPtr); - Avx.Store((uint*)(intTable.outArrayPtr), vf); - - if (!intTable.CheckResult((x, y) => x == y)) - { - Console.WriteLine("Avx Store failed on uint:"); - foreach (var item in intTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - using (TestTable intTable = new TestTable(new short[16] { 1, -5, 100, 0, 1, 2, 3, 4, 1, -5, 100, 0, 1, 2, 3, 4 }, new short[16])) - { - var vf = Unsafe.Read>(intTable.inArrayPtr); - Avx.Store((short*)(intTable.outArrayPtr), vf); - - if (!intTable.CheckResult((x, y) => x == y)) - { - Console.WriteLine("Avx Store failed on short:"); - foreach (var item in intTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - using (TestTable intTable = new TestTable(new ushort[16] { 1, 5, 100, 0, 1, 2, 3, 4, 1, 5, 100, 0, 1, 2, 3, 4 }, new ushort[16])) - { - var vf = Unsafe.Read>(intTable.inArrayPtr); - Avx.Store((ushort*)(intTable.outArrayPtr), vf); - - if (!intTable.CheckResult((x, y) => x == y)) - { - Console.WriteLine("Avx Store failed on ushort:"); - foreach (var item in intTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - using (TestTable intTable = new TestTable(new sbyte[32] { 1, -5, 100, 0, 1, 2, 3, 4, 1, -5, 100, 0, 1, 2, 3, 4, 1, -5, 100, 0, 1, 2, 3, 4, 1, -5, 100, 0, 1, 2, 3, 4 }, new sbyte[32])) - { - var vf = Unsafe.Read>(intTable.inArrayPtr); - Avx.Store((sbyte*)(intTable.outArrayPtr), vf); - - if (!intTable.CheckResult((x, y) => x == y)) - { - Console.WriteLine("Avx Store failed on sbyte:"); - foreach (var item in intTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - using (TestTable intTable = new TestTable(new byte[32] { 1, 5, 100, 0, 1, 2, 3, 4, 1, 5, 100, 0, 1, 2, 3, 4, 1, 5, 100, 0, 1, 2, 3, 4, 1, 5, 100, 0, 1, 2, 3, 4 }, new byte[32])) - { - var vf = Unsafe.Read>(intTable.inArrayPtr); - Avx.Store((byte*)(intTable.outArrayPtr), vf); - - if (!intTable.CheckResult((x, y) => x == y)) - { - Console.WriteLine("Avx Store failed on byte:"); - foreach (var item in intTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - } - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T : struct - { - public T[] inArray; - public T[] outArray; - - public void* inArrayPtr => inHandle.AddrOfPinnedObject().ToPointer(); - public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); - - GCHandle inHandle; - GCHandle outHandle; - public TestTable(T[] a, T[] b) - { - this.inArray = a; - this.outArray = b; - - inHandle = GCHandle.Alloc(inArray, GCHandleType.Pinned); - outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); - } - public bool CheckResult(Func check) - { - for (int i = 0; i < inArray.Length; i++) - { - if (!check(inArray[i], outArray[i])) - { - return false; - } - } - return true; - } - - public void Dispose() - { - inHandle.Free(); - outHandle.Free(); - } - } - - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/StoreAligned.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/StoreAligned.cs deleted file mode 100644 index 07a694d621da..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/StoreAligned.cs +++ /dev/null @@ -1,289 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Avx.IsSupported) - { - { - double* inArray = stackalloc double[4]; - byte* outBuffer = stackalloc byte[64]; - double* outArray = (double*)Align(outBuffer, 32); - - var vf = Unsafe.Read>(inArray); - Avx.StoreAligned(outArray, vf); - - for (var i = 0; i < 4; i++) - { - if (BitConverter.DoubleToInt64Bits(inArray[i]) != BitConverter.DoubleToInt64Bits(outArray[i])) - { - Console.WriteLine("Avx StoreAligned failed on double:"); - for (var n = 0; n < 4; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - float* inArray = stackalloc float[8]; - byte* outBuffer = stackalloc byte[64]; - float* outArray = (float*)Align(outBuffer, 32); - - var vf = Unsafe.Read>(inArray); - Avx.StoreAligned(outArray, vf); - - for (var i = 0; i < 8; i++) - { - if (BitConverter.SingleToInt32Bits(inArray[i]) != BitConverter.SingleToInt32Bits(outArray[i])) - { - Console.WriteLine("Avx StoreAligned failed on float:"); - for (var n = 0; n < 8; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - long* inArray = stackalloc long[4]; - byte* outBuffer = stackalloc byte[64]; - long* outArray = (long*)Align(outBuffer, 32); - - var vf = Unsafe.Read>(inArray); - Avx.StoreAligned(outArray, vf); - - for (var i = 0; i < 4; i++) - { - if (inArray[i] != outArray[i]) - { - Console.WriteLine("Avx StoreAligned failed on long:"); - for (var n = 0; n < 4; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - ulong* inArray = stackalloc ulong[4]; - byte* outBuffer = stackalloc byte[64]; - ulong* outArray = (ulong*)Align(outBuffer, 32); - - var vf = Unsafe.Read>(inArray); - Avx.StoreAligned(outArray, vf); - - for (var i = 0; i < 4; i++) - { - if (inArray[i] != outArray[i]) - { - Console.WriteLine("Avx StoreAligned failed on ulong:"); - for (var n = 0; n < 4; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - int* inArray = stackalloc int[8]; - byte* outBuffer = stackalloc byte[64]; - int* outArray = (int*)Align(outBuffer, 32); - - var vf = Unsafe.Read>(inArray); - Avx.StoreAligned(outArray, vf); - - for (var i = 0; i < 8; i++) - { - if (inArray[i] != outArray[i]) - { - Console.WriteLine("Avx StoreAligned failed on int:"); - for (var n = 0; n < 8; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - uint* inArray = stackalloc uint[8]; - byte* outBuffer = stackalloc byte[64]; - uint* outArray = (uint*)Align(outBuffer, 32); - - var vf = Unsafe.Read>(inArray); - Avx.StoreAligned(outArray, vf); - - for (var i = 0; i < 8; i++) - { - if (inArray[i] != outArray[i]) - { - Console.WriteLine("Avx StoreAligned failed on uint:"); - for (var n = 0; n < 8; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - short* inArray = stackalloc short[16]; - byte* outBuffer = stackalloc byte[64]; - short* outArray = (short*)Align(outBuffer, 32); - - var vf = Unsafe.Read>(inArray); - Avx.StoreAligned(outArray, vf); - - for (var i = 0; i < 16; i++) - { - if (inArray[i] != outArray[i]) - { - Console.WriteLine("Avx StoreAligned failed on short:"); - for (var n = 0; n < 16; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - ushort* inArray = stackalloc ushort[16]; - byte* outBuffer = stackalloc byte[64]; - ushort* outArray = (ushort*)Align(outBuffer, 32); - - var vf = Unsafe.Read>(inArray); - Avx.StoreAligned(outArray, vf); - - for (var i = 0; i < 16; i++) - { - if (inArray[i] != outArray[i]) - { - Console.WriteLine("Avx StoreAligned failed on ushort:"); - for (var n = 0; n < 16; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - byte* inArray = stackalloc byte[32]; - byte* outBuffer = stackalloc byte[64]; - byte* outArray = (byte*)Align(outBuffer, 32); - - var vf = Unsafe.Read>(inArray); - Avx.StoreAligned(outArray, vf); - - for (var i = 0; i < 32; i++) - { - if (inArray[i] != outArray[i]) - { - Console.WriteLine("Avx StoreAligned failed on byte:"); - for (var n = 0; n < 32; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - sbyte* inArray = stackalloc sbyte[32]; - byte* outBuffer = stackalloc byte[64]; - sbyte* outArray = (sbyte*)Align(outBuffer, 32); - - var vf = Unsafe.Read>(inArray); - Avx.StoreAligned(outArray, vf); - - for (var i = 0; i < 32; i++) - { - if (inArray[i] != outArray[i]) - { - Console.WriteLine("Avx StoreAligned failed on byte:"); - for (var n = 0; n < 32; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - } - - return testResult; - } - - static unsafe void* Align(byte* buffer, byte expectedAlignment) - { - // Compute how bad the misalignment is, which is at most (expectedAlignment - 1). - // Then subtract that from the expectedAlignment and add it to the original address - // to compute the aligned address. - - var misalignment = expectedAlignment - ((ulong)(buffer) % expectedAlignment); - return (void*)(buffer + misalignment); - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/StoreAlignedNonTemporal.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/StoreAlignedNonTemporal.cs deleted file mode 100644 index 81f4ce9cbbc9..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/StoreAlignedNonTemporal.cs +++ /dev/null @@ -1,289 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Avx.IsSupported) - { - { - double* inArray = stackalloc double[4]; - byte* outBuffer = stackalloc byte[64]; - double* outArray = (double*)Align(outBuffer, 32); - - var vf = Unsafe.Read>(inArray); - Avx.StoreAlignedNonTemporal(outArray, vf); - - for (var i = 0; i < 4; i++) - { - if (BitConverter.DoubleToInt64Bits(inArray[i]) != BitConverter.DoubleToInt64Bits(outArray[i])) - { - Console.WriteLine("Avx StoreAlignedNonTemporal failed on double:"); - for (var n = 0; n < 4; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - float* inArray = stackalloc float[8]; - byte* outBuffer = stackalloc byte[64]; - float* outArray = (float*)Align(outBuffer, 32); - - var vf = Unsafe.Read>(inArray); - Avx.StoreAlignedNonTemporal(outArray, vf); - - for (var i = 0; i < 8; i++) - { - if (BitConverter.SingleToInt32Bits(inArray[i]) != BitConverter.SingleToInt32Bits(outArray[i])) - { - Console.WriteLine("Avx StoreAlignedNonTemporal failed on float:"); - for (var n = 0; n < 8; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - long* inArray = stackalloc long[4]; - byte* outBuffer = stackalloc byte[64]; - long* outArray = (long*)Align(outBuffer, 32); - - var vf = Unsafe.Read>(inArray); - Avx.StoreAlignedNonTemporal(outArray, vf); - - for (var i = 0; i < 4; i++) - { - if (inArray[i] != outArray[i]) - { - Console.WriteLine("Avx StoreAlignedNonTemporal failed on long:"); - for (var n = 0; n < 4; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - ulong* inArray = stackalloc ulong[4]; - byte* outBuffer = stackalloc byte[64]; - ulong* outArray = (ulong*)Align(outBuffer, 32); - - var vf = Unsafe.Read>(inArray); - Avx.StoreAlignedNonTemporal(outArray, vf); - - for (var i = 0; i < 4; i++) - { - if (inArray[i] != outArray[i]) - { - Console.WriteLine("Avx StoreAlignedNonTemporal failed on ulong:"); - for (var n = 0; n < 4; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - int* inArray = stackalloc int[8]; - byte* outBuffer = stackalloc byte[64]; - int* outArray = (int*)Align(outBuffer, 32); - - var vf = Unsafe.Read>(inArray); - Avx.StoreAlignedNonTemporal(outArray, vf); - - for (var i = 0; i < 8; i++) - { - if (inArray[i] != outArray[i]) - { - Console.WriteLine("Avx StoreAlignedNonTemporal failed on int:"); - for (var n = 0; n < 8; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - uint* inArray = stackalloc uint[8]; - byte* outBuffer = stackalloc byte[64]; - uint* outArray = (uint*)Align(outBuffer, 32); - - var vf = Unsafe.Read>(inArray); - Avx.StoreAlignedNonTemporal(outArray, vf); - - for (var i = 0; i < 8; i++) - { - if (inArray[i] != outArray[i]) - { - Console.WriteLine("Avx StoreAlignedNonTemporal failed on uint:"); - for (var n = 0; n < 8; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - short* inArray = stackalloc short[16]; - byte* outBuffer = stackalloc byte[64]; - short* outArray = (short*)Align(outBuffer, 32); - - var vf = Unsafe.Read>(inArray); - Avx.StoreAlignedNonTemporal(outArray, vf); - - for (var i = 0; i < 16; i++) - { - if (inArray[i] != outArray[i]) - { - Console.WriteLine("Avx StoreAlignedNonTemporal failed on short:"); - for (var n = 0; n < 16; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - ushort* inArray = stackalloc ushort[16]; - byte* outBuffer = stackalloc byte[64]; - ushort* outArray = (ushort*)Align(outBuffer, 32); - - var vf = Unsafe.Read>(inArray); - Avx.StoreAlignedNonTemporal(outArray, vf); - - for (var i = 0; i < 16; i++) - { - if (inArray[i] != outArray[i]) - { - Console.WriteLine("Avx StoreAlignedNonTemporal failed on ushort:"); - for (var n = 0; n < 16; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - byte* inArray = stackalloc byte[32]; - byte* outBuffer = stackalloc byte[64]; - byte* outArray = (byte*)Align(outBuffer, 32); - - var vf = Unsafe.Read>(inArray); - Avx.StoreAlignedNonTemporal(outArray, vf); - - for (var i = 0; i < 32; i++) - { - if (inArray[i] != outArray[i]) - { - Console.WriteLine("Avx StoreAlignedNonTemporal failed on byte:"); - for (var n = 0; n < 32; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - sbyte* inArray = stackalloc sbyte[32]; - byte* outBuffer = stackalloc byte[64]; - sbyte* outArray = (sbyte*)Align(outBuffer, 32); - - var vf = Unsafe.Read>(inArray); - Avx.StoreAlignedNonTemporal(outArray, vf); - - for (var i = 0; i < 32; i++) - { - if (inArray[i] != outArray[i]) - { - Console.WriteLine("Avx StoreAlignedNonTemporal failed on byte:"); - for (var n = 0; n < 32; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - } - - return testResult; - } - - static unsafe void* Align(byte* buffer, byte expectedAlignment) - { - // Compute how bad the misalignment is, which is at most (expectedAlignment - 1). - // Then subtract that from the expectedAlignment and add it to the original address - // to compute the aligned address. - - var misalignment = expectedAlignment - ((ulong)(buffer) % expectedAlignment); - return (void*)(buffer + misalignment); - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Subtract.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Subtract.Double.cs deleted file mode 100644 index 18be113e6db1..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Subtract.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void SubtractDouble() - { - var test = new SimpleBinaryOpTest__SubtractDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__SubtractDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__SubtractDouble testClass) - { - var result = Avx.Subtract(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__SubtractDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.Subtract( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__SubtractDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__SubtractDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.Subtract( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.Subtract( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.Subtract( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Subtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Subtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Subtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.Subtract( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.Subtract( - Avx.LoadVector256((Double*)(pClsVar1)), - Avx.LoadVector256((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__SubtractDouble(); - var result = Avx.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__SubtractDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.Subtract( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.Subtract(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.Subtract( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.Subtract( - Avx.LoadVector256((Double*)(&test._fld1)), - Avx.LoadVector256((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(left[0] - right[0]) != BitConverter.DoubleToInt64Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(left[i] - right[i]) != BitConverter.DoubleToInt64Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.Subtract)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Subtract.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Subtract.Single.cs deleted file mode 100644 index a3d4252e2ec1..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Subtract.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void SubtractSingle() - { - var test = new SimpleBinaryOpTest__SubtractSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__SubtractSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__SubtractSingle testClass) - { - var result = Avx.Subtract(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__SubtractSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.Subtract( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__SubtractSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__SubtractSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.Subtract( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.Subtract( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.Subtract( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Subtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Subtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Subtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.Subtract( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.Subtract( - Avx.LoadVector256((Single*)(pClsVar1)), - Avx.LoadVector256((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__SubtractSingle(); - var result = Avx.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__SubtractSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.Subtract( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.Subtract(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.Subtract( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.Subtract( - Avx.LoadVector256((Single*)(&test._fld1)), - Avx.LoadVector256((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(left[0] - right[0]) != BitConverter.SingleToInt32Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(left[i] - right[i]) != BitConverter.SingleToInt32Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.Subtract)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.Byte.cs deleted file mode 100644 index 9e386bc3bd6c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.Byte.cs +++ /dev/null @@ -1,545 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestCByte() - { - var test = new BooleanBinaryOpTest__TestCByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestCByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestCByte testClass) - { - var result = Avx.TestC(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestCByte testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestC( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestCByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestCByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.TestC( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.TestC( - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.TestC( - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.TestC( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.TestC( - Avx.LoadVector256((Byte*)(pClsVar1)), - Avx.LoadVector256((Byte*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)); - var result = Avx.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)); - var result = Avx.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestCByte(); - var result = Avx.TestC(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestCByte(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.TestC( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.TestC(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestC( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.TestC(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.TestC( - Avx.LoadVector256((Byte*)(&test._fld1)), - Avx.LoadVector256((Byte*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, bool result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult &= ((~left[i] & right[i]) == 0); - } - - succeeded = (expectedResult == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.TestC)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.Int16.cs deleted file mode 100644 index e9949abdd2d7..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.Int16.cs +++ /dev/null @@ -1,545 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestCInt16() - { - var test = new BooleanBinaryOpTest__TestCInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestCInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestCInt16 testClass) - { - var result = Avx.TestC(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestCInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestC( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestCInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestCInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.TestC( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.TestC( - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.TestC( - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.TestC( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.TestC( - Avx.LoadVector256((Int16*)(pClsVar1)), - Avx.LoadVector256((Int16*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestCInt16(); - var result = Avx.TestC(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestCInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.TestC( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.TestC(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestC( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.TestC(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.TestC( - Avx.LoadVector256((Int16*)(&test._fld1)), - Avx.LoadVector256((Int16*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, bool result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult &= ((~left[i] & right[i]) == 0); - } - - succeeded = (expectedResult == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.TestC)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.Int32.cs deleted file mode 100644 index 44637a581a2e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.Int32.cs +++ /dev/null @@ -1,545 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestCInt32() - { - var test = new BooleanBinaryOpTest__TestCInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestCInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestCInt32 testClass) - { - var result = Avx.TestC(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestCInt32 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestC( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestCInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestCInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.TestC( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.TestC( - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.TestC( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.TestC( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.TestC( - Avx.LoadVector256((Int32*)(pClsVar1)), - Avx.LoadVector256((Int32*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestCInt32(); - var result = Avx.TestC(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestCInt32(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.TestC( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.TestC(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestC( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.TestC(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.TestC( - Avx.LoadVector256((Int32*)(&test._fld1)), - Avx.LoadVector256((Int32*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, bool result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult &= ((~left[i] & right[i]) == 0); - } - - succeeded = (expectedResult == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.TestC)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.Int64.cs deleted file mode 100644 index 8fcde0853e03..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.Int64.cs +++ /dev/null @@ -1,545 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestCInt64() - { - var test = new BooleanBinaryOpTest__TestCInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestCInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Int64[] inArray1, Int64[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestCInt64 testClass) - { - var result = Avx.TestC(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestCInt64 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestC( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestCInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestCInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.TestC( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.TestC( - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.TestC( - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.TestC( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.TestC( - Avx.LoadVector256((Int64*)(pClsVar1)), - Avx.LoadVector256((Int64*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestCInt64(); - var result = Avx.TestC(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestCInt64(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.TestC( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.TestC(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestC( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.TestC(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.TestC( - Avx.LoadVector256((Int64*)(&test._fld1)), - Avx.LoadVector256((Int64*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, bool result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult &= ((~left[i] & right[i]) == 0); - } - - succeeded = (expectedResult == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.TestC)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.SByte.cs deleted file mode 100644 index ccbc89f85051..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.SByte.cs +++ /dev/null @@ -1,545 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestCSByte() - { - var test = new BooleanBinaryOpTest__TestCSByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestCSByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestCSByte testClass) - { - var result = Avx.TestC(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestCSByte testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestC( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestCSByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestCSByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.TestC( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.TestC( - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.TestC( - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.TestC( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.TestC( - Avx.LoadVector256((SByte*)(pClsVar1)), - Avx.LoadVector256((SByte*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestCSByte(); - var result = Avx.TestC(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestCSByte(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.TestC( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.TestC(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestC( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.TestC(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.TestC( - Avx.LoadVector256((SByte*)(&test._fld1)), - Avx.LoadVector256((SByte*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, bool result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult &= ((~left[i] & right[i]) == 0); - } - - succeeded = (expectedResult == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.TestC)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.UInt16.cs deleted file mode 100644 index 102a6ae8f6d8..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.UInt16.cs +++ /dev/null @@ -1,545 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestCUInt16() - { - var test = new BooleanBinaryOpTest__TestCUInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestCUInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestCUInt16 testClass) - { - var result = Avx.TestC(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestCUInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestC( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestCUInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestCUInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.TestC( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.TestC( - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.TestC( - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.TestC( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.TestC( - Avx.LoadVector256((UInt16*)(pClsVar1)), - Avx.LoadVector256((UInt16*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestCUInt16(); - var result = Avx.TestC(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestCUInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.TestC( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.TestC(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestC( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.TestC(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.TestC( - Avx.LoadVector256((UInt16*)(&test._fld1)), - Avx.LoadVector256((UInt16*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, bool result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult &= ((~left[i] & right[i]) == 0); - } - - succeeded = (expectedResult == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.TestC)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.UInt32.cs deleted file mode 100644 index 033ad221fc03..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.UInt32.cs +++ /dev/null @@ -1,545 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestCUInt32() - { - var test = new BooleanBinaryOpTest__TestCUInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestCUInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestCUInt32 testClass) - { - var result = Avx.TestC(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestCUInt32 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestC( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestCUInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestCUInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.TestC( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.TestC( - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.TestC( - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.TestC( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.TestC( - Avx.LoadVector256((UInt32*)(pClsVar1)), - Avx.LoadVector256((UInt32*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestCUInt32(); - var result = Avx.TestC(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestCUInt32(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.TestC( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.TestC(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestC( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.TestC(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.TestC( - Avx.LoadVector256((UInt32*)(&test._fld1)), - Avx.LoadVector256((UInt32*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, bool result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult &= ((~left[i] & right[i]) == 0); - } - - succeeded = (expectedResult == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.TestC)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.UInt64.cs deleted file mode 100644 index 307b13ffb69c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.UInt64.cs +++ /dev/null @@ -1,545 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestCUInt64() - { - var test = new BooleanBinaryOpTest__TestCUInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestCUInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(UInt64[] inArray1, UInt64[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestCUInt64 testClass) - { - var result = Avx.TestC(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestCUInt64 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestC( - Avx.LoadVector256((UInt64*)(pFld1)), - Avx.LoadVector256((UInt64*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestCUInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestCUInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.TestC( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.TestC( - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.TestC( - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.TestC( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.TestC( - Avx.LoadVector256((UInt64*)(pClsVar1)), - Avx.LoadVector256((UInt64*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestCUInt64(); - var result = Avx.TestC(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestCUInt64(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.TestC( - Avx.LoadVector256((UInt64*)(pFld1)), - Avx.LoadVector256((UInt64*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.TestC(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestC( - Avx.LoadVector256((UInt64*)(pFld1)), - Avx.LoadVector256((UInt64*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.TestC(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.TestC( - Avx.LoadVector256((UInt64*)(&test._fld1)), - Avx.LoadVector256((UInt64*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, bool result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(UInt64[] left, UInt64[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult &= ((~left[i] & right[i]) == 0); - } - - succeeded = (expectedResult == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.TestC)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.Byte.cs deleted file mode 100644 index ad709b29d0ba..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.Byte.cs +++ /dev/null @@ -1,552 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestNotZAndNotCByte() - { - var test = new BooleanBinaryOpTest__TestNotZAndNotCByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestNotZAndNotCByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestNotZAndNotCByte testClass) - { - var result = Avx.TestNotZAndNotC(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestNotZAndNotCByte testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestNotZAndNotCByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestNotZAndNotCByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.TestNotZAndNotC( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.TestNotZAndNotC( - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestNotZAndNotC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestNotZAndNotC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestNotZAndNotC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.TestNotZAndNotC( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((Byte*)(pClsVar1)), - Avx.LoadVector256((Byte*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)); - var result = Avx.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)); - var result = Avx.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestNotZAndNotCByte(); - var result = Avx.TestNotZAndNotC(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestNotZAndNotCByte(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.TestNotZAndNotC(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.TestNotZAndNotC(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((Byte*)(&test._fld1)), - Avx.LoadVector256((Byte*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, bool result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult1 = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult1 &= (((left[i] & right[i]) == 0)); - } - - var expectedResult2 = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult2 &= (((~left[i] & right[i]) == 0)); - } - - succeeded = (((expectedResult1 == false) && (expectedResult2 == false)) == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.TestNotZAndNotC)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.Int16.cs deleted file mode 100644 index 52b0342897f1..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.Int16.cs +++ /dev/null @@ -1,552 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestNotZAndNotCInt16() - { - var test = new BooleanBinaryOpTest__TestNotZAndNotCInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestNotZAndNotCInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestNotZAndNotCInt16 testClass) - { - var result = Avx.TestNotZAndNotC(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestNotZAndNotCInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestNotZAndNotCInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestNotZAndNotCInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.TestNotZAndNotC( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.TestNotZAndNotC( - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestNotZAndNotC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestNotZAndNotC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestNotZAndNotC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.TestNotZAndNotC( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((Int16*)(pClsVar1)), - Avx.LoadVector256((Int16*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestNotZAndNotCInt16(); - var result = Avx.TestNotZAndNotC(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestNotZAndNotCInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.TestNotZAndNotC(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.TestNotZAndNotC(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((Int16*)(&test._fld1)), - Avx.LoadVector256((Int16*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, bool result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult1 = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult1 &= (((left[i] & right[i]) == 0)); - } - - var expectedResult2 = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult2 &= (((~left[i] & right[i]) == 0)); - } - - succeeded = (((expectedResult1 == false) && (expectedResult2 == false)) == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.TestNotZAndNotC)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.Int32.cs deleted file mode 100644 index 3bf11eda64d5..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.Int32.cs +++ /dev/null @@ -1,552 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestNotZAndNotCInt32() - { - var test = new BooleanBinaryOpTest__TestNotZAndNotCInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestNotZAndNotCInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestNotZAndNotCInt32 testClass) - { - var result = Avx.TestNotZAndNotC(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestNotZAndNotCInt32 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestNotZAndNotCInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestNotZAndNotCInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.TestNotZAndNotC( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.TestNotZAndNotC( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestNotZAndNotC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestNotZAndNotC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestNotZAndNotC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.TestNotZAndNotC( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((Int32*)(pClsVar1)), - Avx.LoadVector256((Int32*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestNotZAndNotCInt32(); - var result = Avx.TestNotZAndNotC(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestNotZAndNotCInt32(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.TestNotZAndNotC(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.TestNotZAndNotC(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((Int32*)(&test._fld1)), - Avx.LoadVector256((Int32*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, bool result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult1 = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult1 &= (((left[i] & right[i]) == 0)); - } - - var expectedResult2 = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult2 &= (((~left[i] & right[i]) == 0)); - } - - succeeded = (((expectedResult1 == false) && (expectedResult2 == false)) == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.TestNotZAndNotC)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.Int64.cs deleted file mode 100644 index ebb8264dadff..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.Int64.cs +++ /dev/null @@ -1,552 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestNotZAndNotCInt64() - { - var test = new BooleanBinaryOpTest__TestNotZAndNotCInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestNotZAndNotCInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Int64[] inArray1, Int64[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestNotZAndNotCInt64 testClass) - { - var result = Avx.TestNotZAndNotC(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestNotZAndNotCInt64 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestNotZAndNotCInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestNotZAndNotCInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.TestNotZAndNotC( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.TestNotZAndNotC( - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestNotZAndNotC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestNotZAndNotC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestNotZAndNotC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.TestNotZAndNotC( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((Int64*)(pClsVar1)), - Avx.LoadVector256((Int64*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestNotZAndNotCInt64(); - var result = Avx.TestNotZAndNotC(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestNotZAndNotCInt64(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.TestNotZAndNotC(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.TestNotZAndNotC(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((Int64*)(&test._fld1)), - Avx.LoadVector256((Int64*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, bool result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult1 = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult1 &= (((left[i] & right[i]) == 0)); - } - - var expectedResult2 = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult2 &= (((~left[i] & right[i]) == 0)); - } - - succeeded = (((expectedResult1 == false) && (expectedResult2 == false)) == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.TestNotZAndNotC)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.SByte.cs deleted file mode 100644 index e5fe7fa0d26b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.SByte.cs +++ /dev/null @@ -1,552 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestNotZAndNotCSByte() - { - var test = new BooleanBinaryOpTest__TestNotZAndNotCSByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestNotZAndNotCSByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestNotZAndNotCSByte testClass) - { - var result = Avx.TestNotZAndNotC(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestNotZAndNotCSByte testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestNotZAndNotCSByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestNotZAndNotCSByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.TestNotZAndNotC( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.TestNotZAndNotC( - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestNotZAndNotC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestNotZAndNotC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestNotZAndNotC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.TestNotZAndNotC( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((SByte*)(pClsVar1)), - Avx.LoadVector256((SByte*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestNotZAndNotCSByte(); - var result = Avx.TestNotZAndNotC(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestNotZAndNotCSByte(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.TestNotZAndNotC(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.TestNotZAndNotC(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((SByte*)(&test._fld1)), - Avx.LoadVector256((SByte*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, bool result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult1 = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult1 &= (((left[i] & right[i]) == 0)); - } - - var expectedResult2 = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult2 &= (((~left[i] & right[i]) == 0)); - } - - succeeded = (((expectedResult1 == false) && (expectedResult2 == false)) == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.TestNotZAndNotC)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.UInt16.cs deleted file mode 100644 index bd53785740f2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.UInt16.cs +++ /dev/null @@ -1,552 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestNotZAndNotCUInt16() - { - var test = new BooleanBinaryOpTest__TestNotZAndNotCUInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestNotZAndNotCUInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestNotZAndNotCUInt16 testClass) - { - var result = Avx.TestNotZAndNotC(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestNotZAndNotCUInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestNotZAndNotCUInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestNotZAndNotCUInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.TestNotZAndNotC( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.TestNotZAndNotC( - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestNotZAndNotC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestNotZAndNotC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestNotZAndNotC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.TestNotZAndNotC( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((UInt16*)(pClsVar1)), - Avx.LoadVector256((UInt16*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestNotZAndNotCUInt16(); - var result = Avx.TestNotZAndNotC(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestNotZAndNotCUInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.TestNotZAndNotC(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.TestNotZAndNotC(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((UInt16*)(&test._fld1)), - Avx.LoadVector256((UInt16*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, bool result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult1 = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult1 &= (((left[i] & right[i]) == 0)); - } - - var expectedResult2 = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult2 &= (((~left[i] & right[i]) == 0)); - } - - succeeded = (((expectedResult1 == false) && (expectedResult2 == false)) == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.TestNotZAndNotC)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.UInt32.cs deleted file mode 100644 index c8529d6635bd..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.UInt32.cs +++ /dev/null @@ -1,552 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestNotZAndNotCUInt32() - { - var test = new BooleanBinaryOpTest__TestNotZAndNotCUInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestNotZAndNotCUInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestNotZAndNotCUInt32 testClass) - { - var result = Avx.TestNotZAndNotC(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestNotZAndNotCUInt32 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestNotZAndNotCUInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestNotZAndNotCUInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.TestNotZAndNotC( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.TestNotZAndNotC( - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestNotZAndNotC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestNotZAndNotC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestNotZAndNotC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.TestNotZAndNotC( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((UInt32*)(pClsVar1)), - Avx.LoadVector256((UInt32*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestNotZAndNotCUInt32(); - var result = Avx.TestNotZAndNotC(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestNotZAndNotCUInt32(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.TestNotZAndNotC(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.TestNotZAndNotC(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((UInt32*)(&test._fld1)), - Avx.LoadVector256((UInt32*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, bool result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult1 = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult1 &= (((left[i] & right[i]) == 0)); - } - - var expectedResult2 = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult2 &= (((~left[i] & right[i]) == 0)); - } - - succeeded = (((expectedResult1 == false) && (expectedResult2 == false)) == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.TestNotZAndNotC)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.UInt64.cs deleted file mode 100644 index 8d89fa4766a5..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.UInt64.cs +++ /dev/null @@ -1,552 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestNotZAndNotCUInt64() - { - var test = new BooleanBinaryOpTest__TestNotZAndNotCUInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestNotZAndNotCUInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(UInt64[] inArray1, UInt64[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestNotZAndNotCUInt64 testClass) - { - var result = Avx.TestNotZAndNotC(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestNotZAndNotCUInt64 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((UInt64*)(pFld1)), - Avx.LoadVector256((UInt64*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestNotZAndNotCUInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestNotZAndNotCUInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.TestNotZAndNotC( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.TestNotZAndNotC( - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestNotZAndNotC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestNotZAndNotC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestNotZAndNotC), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.TestNotZAndNotC( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((UInt64*)(pClsVar1)), - Avx.LoadVector256((UInt64*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestNotZAndNotCUInt64(); - var result = Avx.TestNotZAndNotC(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestNotZAndNotCUInt64(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((UInt64*)(pFld1)), - Avx.LoadVector256((UInt64*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.TestNotZAndNotC(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((UInt64*)(pFld1)), - Avx.LoadVector256((UInt64*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.TestNotZAndNotC(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.TestNotZAndNotC( - Avx.LoadVector256((UInt64*)(&test._fld1)), - Avx.LoadVector256((UInt64*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, bool result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(UInt64[] left, UInt64[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult1 = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult1 &= (((left[i] & right[i]) == 0)); - } - - var expectedResult2 = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult2 &= (((~left[i] & right[i]) == 0)); - } - - succeeded = (((expectedResult1 == false) && (expectedResult2 == false)) == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.TestNotZAndNotC)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.Byte.cs deleted file mode 100644 index 2e540ec82865..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.Byte.cs +++ /dev/null @@ -1,545 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestZByte() - { - var test = new BooleanBinaryOpTest__TestZByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestZByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestZByte testClass) - { - var result = Avx.TestZ(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestZByte testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestZ( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestZByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestZByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.TestZ( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.TestZ( - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.TestZ( - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestZ), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestZ), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestZ), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.TestZ( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.TestZ( - Avx.LoadVector256((Byte*)(pClsVar1)), - Avx.LoadVector256((Byte*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)); - var result = Avx.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)); - var result = Avx.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestZByte(); - var result = Avx.TestZ(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestZByte(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.TestZ( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.TestZ(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestZ( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.TestZ(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.TestZ( - Avx.LoadVector256((Byte*)(&test._fld1)), - Avx.LoadVector256((Byte*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, bool result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult &= ((left[i] & right[i]) == 0); - } - - succeeded = (expectedResult == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.TestZ)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.Int16.cs deleted file mode 100644 index 07bc80cb889e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.Int16.cs +++ /dev/null @@ -1,545 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestZInt16() - { - var test = new BooleanBinaryOpTest__TestZInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestZInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestZInt16 testClass) - { - var result = Avx.TestZ(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestZInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestZ( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestZInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestZInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.TestZ( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.TestZ( - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.TestZ( - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestZ), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestZ), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestZ), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.TestZ( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.TestZ( - Avx.LoadVector256((Int16*)(pClsVar1)), - Avx.LoadVector256((Int16*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestZInt16(); - var result = Avx.TestZ(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestZInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.TestZ( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.TestZ(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestZ( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.TestZ(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.TestZ( - Avx.LoadVector256((Int16*)(&test._fld1)), - Avx.LoadVector256((Int16*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, bool result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult &= ((left[i] & right[i]) == 0); - } - - succeeded = (expectedResult == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.TestZ)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.Int32.cs deleted file mode 100644 index 75e4a6cb5255..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.Int32.cs +++ /dev/null @@ -1,545 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestZInt32() - { - var test = new BooleanBinaryOpTest__TestZInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestZInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestZInt32 testClass) - { - var result = Avx.TestZ(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestZInt32 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestZ( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestZInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestZInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.TestZ( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.TestZ( - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.TestZ( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestZ), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestZ), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestZ), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.TestZ( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.TestZ( - Avx.LoadVector256((Int32*)(pClsVar1)), - Avx.LoadVector256((Int32*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestZInt32(); - var result = Avx.TestZ(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestZInt32(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.TestZ( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.TestZ(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestZ( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.TestZ(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.TestZ( - Avx.LoadVector256((Int32*)(&test._fld1)), - Avx.LoadVector256((Int32*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, bool result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult &= ((left[i] & right[i]) == 0); - } - - succeeded = (expectedResult == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.TestZ)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.Int64.cs deleted file mode 100644 index e4f5b66c9f7c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.Int64.cs +++ /dev/null @@ -1,545 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestZInt64() - { - var test = new BooleanBinaryOpTest__TestZInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestZInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Int64[] inArray1, Int64[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestZInt64 testClass) - { - var result = Avx.TestZ(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestZInt64 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestZ( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestZInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestZInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.TestZ( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.TestZ( - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.TestZ( - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestZ), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestZ), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestZ), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.TestZ( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.TestZ( - Avx.LoadVector256((Int64*)(pClsVar1)), - Avx.LoadVector256((Int64*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestZInt64(); - var result = Avx.TestZ(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestZInt64(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.TestZ( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.TestZ(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestZ( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.TestZ(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.TestZ( - Avx.LoadVector256((Int64*)(&test._fld1)), - Avx.LoadVector256((Int64*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, bool result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult &= ((left[i] & right[i]) == 0); - } - - succeeded = (expectedResult == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.TestZ)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.SByte.cs deleted file mode 100644 index 31d0c23454c0..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.SByte.cs +++ /dev/null @@ -1,545 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestZSByte() - { - var test = new BooleanBinaryOpTest__TestZSByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestZSByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestZSByte testClass) - { - var result = Avx.TestZ(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestZSByte testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestZ( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestZSByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestZSByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.TestZ( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.TestZ( - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.TestZ( - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestZ), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestZ), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestZ), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.TestZ( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.TestZ( - Avx.LoadVector256((SByte*)(pClsVar1)), - Avx.LoadVector256((SByte*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestZSByte(); - var result = Avx.TestZ(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestZSByte(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.TestZ( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.TestZ(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestZ( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.TestZ(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.TestZ( - Avx.LoadVector256((SByte*)(&test._fld1)), - Avx.LoadVector256((SByte*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, bool result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult &= ((left[i] & right[i]) == 0); - } - - succeeded = (expectedResult == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.TestZ)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.UInt16.cs deleted file mode 100644 index 24cfb6b594e6..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.UInt16.cs +++ /dev/null @@ -1,545 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestZUInt16() - { - var test = new BooleanBinaryOpTest__TestZUInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestZUInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestZUInt16 testClass) - { - var result = Avx.TestZ(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestZUInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestZ( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestZUInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestZUInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.TestZ( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.TestZ( - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.TestZ( - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestZ), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestZ), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestZ), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.TestZ( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.TestZ( - Avx.LoadVector256((UInt16*)(pClsVar1)), - Avx.LoadVector256((UInt16*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestZUInt16(); - var result = Avx.TestZ(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestZUInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.TestZ( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.TestZ(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestZ( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.TestZ(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.TestZ( - Avx.LoadVector256((UInt16*)(&test._fld1)), - Avx.LoadVector256((UInt16*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, bool result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult &= ((left[i] & right[i]) == 0); - } - - succeeded = (expectedResult == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.TestZ)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.UInt32.cs deleted file mode 100644 index 04c8db1ecc26..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.UInt32.cs +++ /dev/null @@ -1,545 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestZUInt32() - { - var test = new BooleanBinaryOpTest__TestZUInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestZUInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestZUInt32 testClass) - { - var result = Avx.TestZ(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestZUInt32 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestZ( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestZUInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestZUInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.TestZ( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.TestZ( - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.TestZ( - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestZ), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestZ), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestZ), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.TestZ( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.TestZ( - Avx.LoadVector256((UInt32*)(pClsVar1)), - Avx.LoadVector256((UInt32*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestZUInt32(); - var result = Avx.TestZ(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestZUInt32(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.TestZ( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.TestZ(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestZ( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.TestZ(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.TestZ( - Avx.LoadVector256((UInt32*)(&test._fld1)), - Avx.LoadVector256((UInt32*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, bool result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult &= ((left[i] & right[i]) == 0); - } - - succeeded = (expectedResult == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.TestZ)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.UInt64.cs deleted file mode 100644 index 78d93077891c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.UInt64.cs +++ /dev/null @@ -1,545 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestZUInt64() - { - var test = new BooleanBinaryOpTest__TestZUInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestZUInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(UInt64[] inArray1, UInt64[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestZUInt64 testClass) - { - var result = Avx.TestZ(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestZUInt64 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestZ( - Avx.LoadVector256((UInt64*)(pFld1)), - Avx.LoadVector256((UInt64*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestZUInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestZUInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.TestZ( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.TestZ( - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.TestZ( - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestZ), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestZ), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.TestZ), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.TestZ( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.TestZ( - Avx.LoadVector256((UInt64*)(pClsVar1)), - Avx.LoadVector256((UInt64*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestZUInt64(); - var result = Avx.TestZ(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestZUInt64(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.TestZ( - Avx.LoadVector256((UInt64*)(pFld1)), - Avx.LoadVector256((UInt64*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.TestZ(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.TestZ( - Avx.LoadVector256((UInt64*)(pFld1)), - Avx.LoadVector256((UInt64*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.TestZ(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.TestZ( - Avx.LoadVector256((UInt64*)(&test._fld1)), - Avx.LoadVector256((UInt64*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, bool result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(UInt64[] left, UInt64[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult &= ((left[i] & right[i]) == 0); - } - - succeeded = (expectedResult == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.TestZ)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/UnpackHigh.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/UnpackHigh.cs deleted file mode 100644 index dd34eb921472..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/UnpackHigh.cs +++ /dev/null @@ -1,110 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Avx.IsSupported) - { - using (TestTable floatTable = new TestTable(new float[8] {22, -1, -50, 0, 22, -1, -50, 0 }, new float[8] { 22, -1, -50, 0, 22, -1, -50, 0 }, new float[8])) - using (TestTable doubleTable = new TestTable(new double[4] { 1, -5, 100, 0 }, new double[4] { 22, -1, -50, 0 }, new double[4])) - { - - var vf1 = Unsafe.Read>(floatTable.inArray1Ptr); - var vf2 = Unsafe.Read>(floatTable.inArray2Ptr); - var vf3 = Avx.UnpackHigh(vf1, vf2); - Unsafe.Write(floatTable.outArrayPtr, vf3); - - if (!floatTable.CheckResult((left, right, result) => - (left[2] == result[0]) && (right[2] == result[1]) && - (left[3] == result[2]) && (right[3] == result[3]) && - (left[6] == result[4]) && (right[6] == result[5]) && - (left[7] == result[6]) && (right[7] == result[7]))) - { - Console.WriteLine("Avx UnpackHigh failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - var vd1 = Unsafe.Read>(doubleTable.inArray1Ptr); - var vd2 = Unsafe.Read>(doubleTable.inArray2Ptr); - var vd3 = Avx.UnpackHigh(vd1, vd2); - Unsafe.Write(doubleTable.outArrayPtr, vd3); - - if (!doubleTable.CheckResult((left, right, result) => - (left[1] == result[0]) && (right[1] == result[1]) && - (left[3] == result[2]) && (right[3] == result[3]))) - { - Console.WriteLine("Avx UnpackHigh failed on double:"); - foreach (var item in doubleTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - } - - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T : struct - { - public T[] inArray1; - public T[] inArray2; - public T[] outArray; - - public void* inArray1Ptr => inHandle1.AddrOfPinnedObject().ToPointer(); - public void* inArray2Ptr => inHandle2.AddrOfPinnedObject().ToPointer(); - public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); - - GCHandle inHandle1; - GCHandle inHandle2; - GCHandle outHandle; - public TestTable(T[] a, T[] b, T[] c) - { - this.inArray1 = a; - this.inArray2 = b; - this.outArray = c; - - inHandle1 = GCHandle.Alloc(inArray1, GCHandleType.Pinned); - inHandle2 = GCHandle.Alloc(inArray2, GCHandleType.Pinned); - outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); - } - public bool CheckResult(Func check) - { - return check(inArray1, inArray2, outArray); - } - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - } - - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/UnpackLow.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/UnpackLow.cs deleted file mode 100644 index 013ce5627a68..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/UnpackLow.cs +++ /dev/null @@ -1,110 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Avx.IsSupported) - { - using (TestTable floatTable = new TestTable(new float[8] {22, -1, -50, 0, 22, -1, -50, 0 }, new float[8] { 22, -1, -50, 0, 22, -1, -50, 0 }, new float[8])) - using (TestTable doubleTable = new TestTable(new double[4] { 1, -5, 100, 0 }, new double[4] { 22, -1, -50, 0 }, new double[4])) - { - - var vf1 = Unsafe.Read>(floatTable.inArray1Ptr); - var vf2 = Unsafe.Read>(floatTable.inArray2Ptr); - var vf3 = Avx.UnpackLow(vf1, vf2); - Unsafe.Write(floatTable.outArrayPtr, vf3); - - if (!floatTable.CheckResult((left, right, result) => - (left[0] == result[0]) && (right[0] == result[1]) && - (left[1] == result[2]) && (right[1] == result[3]) && - (left[4] == result[4]) && (right[4] == result[5]) && - (left[5] == result[6]) && (right[5] == result[7]))) - { - Console.WriteLine("Avx UnpackLow failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - var vd1 = Unsafe.Read>(doubleTable.inArray1Ptr); - var vd2 = Unsafe.Read>(doubleTable.inArray2Ptr); - var vd3 = Avx.UnpackLow(vd1, vd2); - Unsafe.Write(doubleTable.outArrayPtr, vd3); - - if (!doubleTable.CheckResult((left, right, result) => - (left[0] == result[0]) && (right[0] == result[1]) && - (left[2] == result[2]) && (right[2] == result[3]))) - { - Console.WriteLine("Avx UnpackLow failed on double:"); - foreach (var item in doubleTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - } - - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T : struct - { - public T[] inArray1; - public T[] inArray2; - public T[] outArray; - - public void* inArray1Ptr => inHandle1.AddrOfPinnedObject().ToPointer(); - public void* inArray2Ptr => inHandle2.AddrOfPinnedObject().ToPointer(); - public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); - - GCHandle inHandle1; - GCHandle inHandle2; - GCHandle outHandle; - public TestTable(T[] a, T[] b, T[] c) - { - this.inArray1 = a; - this.inArray2 = b; - this.outArray = c; - - inHandle1 = GCHandle.Alloc(inArray1, GCHandleType.Pinned); - inHandle2 = GCHandle.Alloc(inArray2, GCHandleType.Pinned); - outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); - } - public bool CheckResult(Func check) - { - return check(inArray1, inArray2, outArray); - } - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - } - - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Xor.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Xor.Double.cs deleted file mode 100644 index 7c741a253845..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Xor.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void XorDouble() - { - var test = new SimpleBinaryOpTest__XorDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__XorDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__XorDouble testClass) - { - var result = Avx.Xor(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__XorDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.Xor( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__XorDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__XorDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.Xor( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.Xor( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.Xor( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Xor), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Xor), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Xor), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.Xor( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.Xor( - Avx.LoadVector256((Double*)(pClsVar1)), - Avx.LoadVector256((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__XorDouble(); - var result = Avx.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__XorDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.Xor( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.Xor(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.Xor( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.Xor( - Avx.LoadVector256((Double*)(&test._fld1)), - Avx.LoadVector256((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((BitConverter.DoubleToInt64Bits(left[0]) ^ BitConverter.DoubleToInt64Bits(right[0])) != BitConverter.DoubleToInt64Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((BitConverter.DoubleToInt64Bits(left[i]) ^ BitConverter.DoubleToInt64Bits(right[i])) != BitConverter.DoubleToInt64Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.Xor)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Xor.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Xor.Single.cs deleted file mode 100644 index 6415c484768e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Xor.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void XorSingle() - { - var test = new SimpleBinaryOpTest__XorSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__XorSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__XorSingle testClass) - { - var result = Avx.Xor(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__XorSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.Xor( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__XorSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__XorSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.Xor( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.Xor( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.Xor( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Xor), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Xor), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.Xor), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.Xor( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx.Xor( - Avx.LoadVector256((Single*)(pClsVar1)), - Avx.LoadVector256((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__XorSingle(); - var result = Avx.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__XorSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx.Xor( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.Xor(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx.Xor( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.Xor( - Avx.LoadVector256((Single*)(&test._fld1)), - Avx.LoadVector256((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((BitConverter.SingleToInt32Bits(left[0]) ^ BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((BitConverter.SingleToInt32Bits(left[i]) ^ BitConverter.SingleToInt32Bits(right[i])) != BitConverter.SingleToInt32Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.Xor)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.Byte.cs deleted file mode 100644 index d4294d0ccfa2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.Byte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AddByte() - { - var test = new SimpleBinaryOpTest__AddByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddByte testClass) - { - var result = Avx2.Add(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddByte testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Add( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Add( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Add( - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Add( - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Add), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Add), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Add), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Add( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Add( - Avx.LoadVector256((Byte*)(pClsVar1)), - Avx.LoadVector256((Byte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)); - var result = Avx2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)); - var result = Avx2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddByte(); - var result = Avx2.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddByte(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Add( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Add(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Add( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Add( - Avx.LoadVector256((Byte*)(&test._fld1)), - Avx.LoadVector256((Byte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((byte)(left[0] + right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((byte)(left[i] + right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Add)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.Int16.cs deleted file mode 100644 index 4cf9c9e66d13..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.Int16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AddInt16() - { - var test = new SimpleBinaryOpTest__AddInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddInt16 testClass) - { - var result = Avx2.Add(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Add( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Add( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Add( - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Add( - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Add), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Add), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Add), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Add( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Add( - Avx.LoadVector256((Int16*)(pClsVar1)), - Avx.LoadVector256((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddInt16(); - var result = Avx2.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Add( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Add(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Add( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Add( - Avx.LoadVector256((Int16*)(&test._fld1)), - Avx.LoadVector256((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((short)(left[0] + right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((short)(left[i] + right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Add)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.Int32.cs deleted file mode 100644 index 2b9c37f2eddd..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.Int32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AddInt32() - { - var test = new SimpleBinaryOpTest__AddInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddInt32 testClass) - { - var result = Avx2.Add(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddInt32 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Add( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Add( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Add( - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Add( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Add), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Add), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Add), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Add( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Add( - Avx.LoadVector256((Int32*)(pClsVar1)), - Avx.LoadVector256((Int32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddInt32(); - var result = Avx2.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddInt32(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Add( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Add(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Add( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Add( - Avx.LoadVector256((Int32*)(&test._fld1)), - Avx.LoadVector256((Int32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((int)(left[0] + right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((int)(left[i] + right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Add)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.Int64.cs deleted file mode 100644 index dfd7ec030b99..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.Int64.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AddInt64() - { - var test = new SimpleBinaryOpTest__AddInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int64[] inArray1, Int64[] inArray2, Int64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddInt64 testClass) - { - var result = Avx2.Add(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddInt64 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Add( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Add( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Add( - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Add( - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Add), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Add), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Add), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Add( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Add( - Avx.LoadVector256((Int64*)(pClsVar1)), - Avx.LoadVector256((Int64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddInt64(); - var result = Avx2.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddInt64(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Add( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Add(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Add( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Add( - Avx.LoadVector256((Int64*)(&test._fld1)), - Avx.LoadVector256((Int64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((long)(left[0] + right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((long)(left[i] + right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Add)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.SByte.cs deleted file mode 100644 index b078900135f4..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.SByte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AddSByte() - { - var test = new SimpleBinaryOpTest__AddSByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddSByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddSByte testClass) - { - var result = Avx2.Add(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddSByte testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Add( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddSByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddSByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Add( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Add( - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Add( - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Add), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Add), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Add), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Add( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Add( - Avx.LoadVector256((SByte*)(pClsVar1)), - Avx.LoadVector256((SByte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddSByte(); - var result = Avx2.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddSByte(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Add( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Add(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Add( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Add( - Avx.LoadVector256((SByte*)(&test._fld1)), - Avx.LoadVector256((SByte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((sbyte)(left[0] + right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((sbyte)(left[i] + right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Add)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.UInt16.cs deleted file mode 100644 index 1a5770dd0ab9..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.UInt16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AddUInt16() - { - var test = new SimpleBinaryOpTest__AddUInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddUInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddUInt16 testClass) - { - var result = Avx2.Add(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddUInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Add( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddUInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddUInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Add( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Add( - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Add( - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Add), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Add), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Add), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Add( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Add( - Avx.LoadVector256((UInt16*)(pClsVar1)), - Avx.LoadVector256((UInt16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddUInt16(); - var result = Avx2.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddUInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Add( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Add(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Add( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Add( - Avx.LoadVector256((UInt16*)(&test._fld1)), - Avx.LoadVector256((UInt16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((ushort)(left[0] + right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((ushort)(left[i] + right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Add)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.UInt32.cs deleted file mode 100644 index 56d1e1137fb1..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.UInt32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AddUInt32() - { - var test = new SimpleBinaryOpTest__AddUInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddUInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddUInt32 testClass) - { - var result = Avx2.Add(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddUInt32 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Add( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddUInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddUInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Add( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Add( - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Add( - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Add), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Add), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Add), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Add( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Add( - Avx.LoadVector256((UInt32*)(pClsVar1)), - Avx.LoadVector256((UInt32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddUInt32(); - var result = Avx2.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddUInt32(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Add( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Add(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Add( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Add( - Avx.LoadVector256((UInt32*)(&test._fld1)), - Avx.LoadVector256((UInt32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((uint)(left[0] + right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((uint)(left[i] + right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Add)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.UInt64.cs deleted file mode 100644 index f7796b4d0c3c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.UInt64.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AddUInt64() - { - var test = new SimpleBinaryOpTest__AddUInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddUInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt64[] inArray1, UInt64[] inArray2, UInt64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddUInt64 testClass) - { - var result = Avx2.Add(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddUInt64 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Add( - Avx.LoadVector256((UInt64*)(pFld1)), - Avx.LoadVector256((UInt64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddUInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddUInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Add( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Add( - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Add( - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Add), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Add), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Add), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Add( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Add( - Avx.LoadVector256((UInt64*)(pClsVar1)), - Avx.LoadVector256((UInt64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddUInt64(); - var result = Avx2.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddUInt64(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Add( - Avx.LoadVector256((UInt64*)(pFld1)), - Avx.LoadVector256((UInt64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Add(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Add( - Avx.LoadVector256((UInt64*)(pFld1)), - Avx.LoadVector256((UInt64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Add( - Avx.LoadVector256((UInt64*)(&test._fld1)), - Avx.LoadVector256((UInt64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt64[] left, UInt64[] right, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((ulong)(left[0] + right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((ulong)(left[i] + right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Add)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.Int16.0.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.Int16.0.cs deleted file mode 100644 index 945ac5102169..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.Int16.0.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AlignRightInt160() - { - var test = new ImmBinaryOpTest__AlignRightInt160(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__AlignRightInt160 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__AlignRightInt160 testClass) - { - var result = Avx2.AlignRight(_fld1, _fld2, 0); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__AlignRightInt160() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__AlignRightInt160() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.AlignRight( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.AlignRight( - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.AlignRight( - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.AlignRight( - _clsVar1, - _clsVar2, - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__AlignRightInt160(); - var result = Avx2.AlignRight(test._fld1, test._fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.AlignRight(_fld1, _fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.AlignRight(test._fld1, test._fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != right[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != right[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.AlignRight)}(Vector256.0, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.Int16.2.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.Int16.2.cs deleted file mode 100644 index 9114cfde686f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.Int16.2.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AlignRightInt162() - { - var test = new ImmBinaryOpTest__AlignRightInt162(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__AlignRightInt162 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__AlignRightInt162 testClass) - { - var result = Avx2.AlignRight(_fld1, _fld2, 2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__AlignRightInt162() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__AlignRightInt162() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.AlignRight( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.AlignRight( - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.AlignRight( - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.AlignRight( - _clsVar1, - _clsVar2, - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.AlignRight(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.AlignRight(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.AlignRight(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__AlignRightInt162(); - var result = Avx2.AlignRight(test._fld1, test._fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.AlignRight(_fld1, _fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.AlignRight(test._fld1, test._fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != right[1]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (i < 8 ? (i == 7 ? left[0] : right[i+1]) : (i == 15 ? left[8] : right[i+1]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.AlignRight)}(Vector256.2, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.Int32.0.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.Int32.0.cs deleted file mode 100644 index 27efb1d833ab..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.Int32.0.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AlignRightInt320() - { - var test = new ImmBinaryOpTest__AlignRightInt320(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__AlignRightInt320 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__AlignRightInt320 testClass) - { - var result = Avx2.AlignRight(_fld1, _fld2, 0); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__AlignRightInt320() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__AlignRightInt320() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.AlignRight( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.AlignRight( - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.AlignRight( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.AlignRight( - _clsVar1, - _clsVar2, - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__AlignRightInt320(); - var result = Avx2.AlignRight(test._fld1, test._fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.AlignRight(_fld1, _fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.AlignRight(test._fld1, test._fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != right[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != right[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.AlignRight)}(Vector256.0, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.Int32.4.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.Int32.4.cs deleted file mode 100644 index a2a0f804a65d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.Int32.4.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AlignRightInt324() - { - var test = new ImmBinaryOpTest__AlignRightInt324(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__AlignRightInt324 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__AlignRightInt324 testClass) - { - var result = Avx2.AlignRight(_fld1, _fld2, 4); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__AlignRightInt324() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__AlignRightInt324() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.AlignRight( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.AlignRight( - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.AlignRight( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)4 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)), - (byte)4 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)), - (byte)4 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.AlignRight( - _clsVar1, - _clsVar2, - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.AlignRight(left, right, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.AlignRight(left, right, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.AlignRight(left, right, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__AlignRightInt324(); - var result = Avx2.AlignRight(test._fld1, test._fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.AlignRight(_fld1, _fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.AlignRight(test._fld1, test._fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != right[1]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (i < 4 ? (i == 3 ? left[0] : right[i+1]) : (i == 7 ? left[4] : right[i+1]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.AlignRight)}(Vector256.4, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.Int64.0.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.Int64.0.cs deleted file mode 100644 index 5386b0db7a56..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.Int64.0.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AlignRightInt640() - { - var test = new ImmBinaryOpTest__AlignRightInt640(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__AlignRightInt640 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__AlignRightInt640 testClass) - { - var result = Avx2.AlignRight(_fld1, _fld2, 0); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__AlignRightInt640() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__AlignRightInt640() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.AlignRight( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.AlignRight( - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.AlignRight( - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.AlignRight( - _clsVar1, - _clsVar2, - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx2.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx2.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__AlignRightInt640(); - var result = Avx2.AlignRight(test._fld1, test._fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.AlignRight(_fld1, _fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.AlignRight(test._fld1, test._fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != right[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != right[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.AlignRight)}(Vector256.0, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.Int64.8.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.Int64.8.cs deleted file mode 100644 index fbe827d25ba0..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.Int64.8.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AlignRightInt648() - { - var test = new ImmBinaryOpTest__AlignRightInt648(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__AlignRightInt648 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__AlignRightInt648 testClass) - { - var result = Avx2.AlignRight(_fld1, _fld2, 8); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__AlignRightInt648() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__AlignRightInt648() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.AlignRight( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.AlignRight( - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.AlignRight( - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)8 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)), - (byte)8 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)), - (byte)8 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.AlignRight( - _clsVar1, - _clsVar2, - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.AlignRight(left, right, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx2.AlignRight(left, right, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx2.AlignRight(left, right, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__AlignRightInt648(); - var result = Avx2.AlignRight(test._fld1, test._fld2, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.AlignRight(_fld1, _fld2, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.AlignRight(test._fld1, test._fld2, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != right[1]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (i < 2 ? (i == 1 ? left[0] : right[i+1]) : (i == 3 ? left[2] : right[i+1]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.AlignRight)}(Vector256.8, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.UInt16.0.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.UInt16.0.cs deleted file mode 100644 index 649971636b8c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.UInt16.0.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AlignRightUInt160() - { - var test = new ImmBinaryOpTest__AlignRightUInt160(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__AlignRightUInt160 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__AlignRightUInt160 testClass) - { - var result = Avx2.AlignRight(_fld1, _fld2, 0); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__AlignRightUInt160() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__AlignRightUInt160() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.AlignRight( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.AlignRight( - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.AlignRight( - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.AlignRight( - _clsVar1, - _clsVar2, - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx2.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx2.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__AlignRightUInt160(); - var result = Avx2.AlignRight(test._fld1, test._fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.AlignRight(_fld1, _fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.AlignRight(test._fld1, test._fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != right[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != right[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.AlignRight)}(Vector256.0, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.UInt16.2.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.UInt16.2.cs deleted file mode 100644 index 40d52428fe59..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.UInt16.2.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AlignRightUInt162() - { - var test = new ImmBinaryOpTest__AlignRightUInt162(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__AlignRightUInt162 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__AlignRightUInt162 testClass) - { - var result = Avx2.AlignRight(_fld1, _fld2, 2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__AlignRightUInt162() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__AlignRightUInt162() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.AlignRight( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.AlignRight( - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.AlignRight( - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.AlignRight( - _clsVar1, - _clsVar2, - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.AlignRight(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx2.AlignRight(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx2.AlignRight(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__AlignRightUInt162(); - var result = Avx2.AlignRight(test._fld1, test._fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.AlignRight(_fld1, _fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.AlignRight(test._fld1, test._fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != right[1]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (i < 8 ? (i == 7 ? left[0] : right[i+1]) : (i == 15 ? left[8] : right[i+1]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.AlignRight)}(Vector256.2, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.UInt32.0.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.UInt32.0.cs deleted file mode 100644 index c2696818bd85..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.UInt32.0.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AlignRightUInt320() - { - var test = new ImmBinaryOpTest__AlignRightUInt320(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__AlignRightUInt320 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__AlignRightUInt320 testClass) - { - var result = Avx2.AlignRight(_fld1, _fld2, 0); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__AlignRightUInt320() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__AlignRightUInt320() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.AlignRight( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.AlignRight( - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.AlignRight( - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.AlignRight( - _clsVar1, - _clsVar2, - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__AlignRightUInt320(); - var result = Avx2.AlignRight(test._fld1, test._fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.AlignRight(_fld1, _fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.AlignRight(test._fld1, test._fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != right[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != right[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.AlignRight)}(Vector256.0, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.UInt32.4.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.UInt32.4.cs deleted file mode 100644 index ca5ae7f53f02..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.UInt32.4.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AlignRightUInt324() - { - var test = new ImmBinaryOpTest__AlignRightUInt324(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__AlignRightUInt324 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__AlignRightUInt324 testClass) - { - var result = Avx2.AlignRight(_fld1, _fld2, 4); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__AlignRightUInt324() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__AlignRightUInt324() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.AlignRight( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.AlignRight( - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.AlignRight( - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)4 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)), - (byte)4 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)), - (byte)4 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.AlignRight( - _clsVar1, - _clsVar2, - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.AlignRight(left, right, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.AlignRight(left, right, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.AlignRight(left, right, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__AlignRightUInt324(); - var result = Avx2.AlignRight(test._fld1, test._fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.AlignRight(_fld1, _fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.AlignRight(test._fld1, test._fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != right[1]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (i < 4 ? (i == 3 ? left[0] : right[i+1]) : (i == 7 ? left[4] : right[i+1]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.AlignRight)}(Vector256.4, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.UInt64.0.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.UInt64.0.cs deleted file mode 100644 index e21658e1a7bd..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.UInt64.0.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AlignRightUInt640() - { - var test = new ImmBinaryOpTest__AlignRightUInt640(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__AlignRightUInt640 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__AlignRightUInt640 testClass) - { - var result = Avx2.AlignRight(_fld1, _fld2, 0); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__AlignRightUInt640() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__AlignRightUInt640() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.AlignRight( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.AlignRight( - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.AlignRight( - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.AlignRight( - _clsVar1, - _clsVar2, - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx2.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx2.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__AlignRightUInt640(); - var result = Avx2.AlignRight(test._fld1, test._fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.AlignRight(_fld1, _fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.AlignRight(test._fld1, test._fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt64[] left, UInt64[] right, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != right[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != right[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.AlignRight)}(Vector256.0, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.UInt64.8.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.UInt64.8.cs deleted file mode 100644 index 17d5fe821844..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.UInt64.8.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AlignRightUInt648() - { - var test = new ImmBinaryOpTest__AlignRightUInt648(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__AlignRightUInt648 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__AlignRightUInt648 testClass) - { - var result = Avx2.AlignRight(_fld1, _fld2, 8); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__AlignRightUInt648() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__AlignRightUInt648() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.AlignRight( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.AlignRight( - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.AlignRight( - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)8 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)), - (byte)8 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)), - (byte)8 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.AlignRight( - _clsVar1, - _clsVar2, - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.AlignRight(left, right, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx2.AlignRight(left, right, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx2.AlignRight(left, right, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__AlignRightUInt648(); - var result = Avx2.AlignRight(test._fld1, test._fld2, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.AlignRight(_fld1, _fld2, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.AlignRight(test._fld1, test._fld2, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt64[] left, UInt64[] right, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != right[1]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (i < 2 ? (i == 1 ? left[0] : right[i+1]) : (i == 3 ? left[2] : right[i+1]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.AlignRight)}(Vector256.8, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.Byte.cs deleted file mode 100644 index 50ef89c60981..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.Byte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndByte() - { - var test = new SimpleBinaryOpTest__AndByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndByte testClass) - { - var result = Avx2.And(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndByte testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.And( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.And( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.And( - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.And( - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.And), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.And), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.And), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.And( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.And( - Avx.LoadVector256((Byte*)(pClsVar1)), - Avx.LoadVector256((Byte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)); - var result = Avx2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)); - var result = Avx2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndByte(); - var result = Avx2.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndByte(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.And( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.And(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.And( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.And( - Avx.LoadVector256((Byte*)(&test._fld1)), - Avx.LoadVector256((Byte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((byte)(left[0] & right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((byte)(left[i] & right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.And)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.Int16.cs deleted file mode 100644 index 6ceb4a7810a4..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.Int16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndInt16() - { - var test = new SimpleBinaryOpTest__AndInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndInt16 testClass) - { - var result = Avx2.And(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.And( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.And( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.And( - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.And( - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.And), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.And), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.And), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.And( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.And( - Avx.LoadVector256((Int16*)(pClsVar1)), - Avx.LoadVector256((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndInt16(); - var result = Avx2.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.And( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.And(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.And( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.And( - Avx.LoadVector256((Int16*)(&test._fld1)), - Avx.LoadVector256((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((short)(left[0] & right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((short)(left[i] & right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.And)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.Int32.cs deleted file mode 100644 index 8345ad729d86..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.Int32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndInt32() - { - var test = new SimpleBinaryOpTest__AndInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndInt32 testClass) - { - var result = Avx2.And(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndInt32 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.And( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.And( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.And( - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.And( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.And), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.And), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.And), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.And( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.And( - Avx.LoadVector256((Int32*)(pClsVar1)), - Avx.LoadVector256((Int32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndInt32(); - var result = Avx2.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndInt32(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.And( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.And(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.And( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.And( - Avx.LoadVector256((Int32*)(&test._fld1)), - Avx.LoadVector256((Int32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((int)(left[0] & right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((int)(left[i] & right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.And)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.Int64.cs deleted file mode 100644 index 2bc07547de48..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.Int64.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndInt64() - { - var test = new SimpleBinaryOpTest__AndInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int64[] inArray1, Int64[] inArray2, Int64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndInt64 testClass) - { - var result = Avx2.And(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndInt64 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.And( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.And( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.And( - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.And( - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.And), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.And), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.And), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.And( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.And( - Avx.LoadVector256((Int64*)(pClsVar1)), - Avx.LoadVector256((Int64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndInt64(); - var result = Avx2.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndInt64(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.And( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.And(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.And( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.And( - Avx.LoadVector256((Int64*)(&test._fld1)), - Avx.LoadVector256((Int64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((long)(left[0] & right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((long)(left[i] & right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.And)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.SByte.cs deleted file mode 100644 index ef3dd702bca4..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.SByte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndSByte() - { - var test = new SimpleBinaryOpTest__AndSByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndSByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndSByte testClass) - { - var result = Avx2.And(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndSByte testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.And( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndSByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndSByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.And( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.And( - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.And( - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.And), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.And), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.And), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.And( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.And( - Avx.LoadVector256((SByte*)(pClsVar1)), - Avx.LoadVector256((SByte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndSByte(); - var result = Avx2.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndSByte(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.And( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.And(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.And( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.And( - Avx.LoadVector256((SByte*)(&test._fld1)), - Avx.LoadVector256((SByte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((sbyte)(left[0] & right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((sbyte)(left[i] & right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.And)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.UInt16.cs deleted file mode 100644 index e93f96af0757..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.UInt16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndUInt16() - { - var test = new SimpleBinaryOpTest__AndUInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndUInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndUInt16 testClass) - { - var result = Avx2.And(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndUInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.And( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndUInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndUInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.And( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.And( - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.And( - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.And), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.And), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.And), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.And( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.And( - Avx.LoadVector256((UInt16*)(pClsVar1)), - Avx.LoadVector256((UInt16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndUInt16(); - var result = Avx2.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndUInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.And( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.And(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.And( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.And( - Avx.LoadVector256((UInt16*)(&test._fld1)), - Avx.LoadVector256((UInt16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((ushort)(left[0] & right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((ushort)(left[i] & right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.And)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.UInt32.cs deleted file mode 100644 index b647502d6938..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.UInt32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndUInt32() - { - var test = new SimpleBinaryOpTest__AndUInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndUInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndUInt32 testClass) - { - var result = Avx2.And(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndUInt32 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.And( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndUInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndUInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.And( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.And( - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.And( - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.And), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.And), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.And), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.And( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.And( - Avx.LoadVector256((UInt32*)(pClsVar1)), - Avx.LoadVector256((UInt32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndUInt32(); - var result = Avx2.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndUInt32(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.And( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.And(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.And( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.And( - Avx.LoadVector256((UInt32*)(&test._fld1)), - Avx.LoadVector256((UInt32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((uint)(left[0] & right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((uint)(left[i] & right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.And)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.UInt64.cs deleted file mode 100644 index 4f13e0b506ee..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.UInt64.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndUInt64() - { - var test = new SimpleBinaryOpTest__AndUInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndUInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt64[] inArray1, UInt64[] inArray2, UInt64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndUInt64 testClass) - { - var result = Avx2.And(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndUInt64 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.And( - Avx.LoadVector256((UInt64*)(pFld1)), - Avx.LoadVector256((UInt64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndUInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndUInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.And( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.And( - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.And( - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.And), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.And), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.And), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.And( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.And( - Avx.LoadVector256((UInt64*)(pClsVar1)), - Avx.LoadVector256((UInt64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndUInt64(); - var result = Avx2.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndUInt64(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.And( - Avx.LoadVector256((UInt64*)(pFld1)), - Avx.LoadVector256((UInt64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.And(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.And( - Avx.LoadVector256((UInt64*)(pFld1)), - Avx.LoadVector256((UInt64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.And( - Avx.LoadVector256((UInt64*)(&test._fld1)), - Avx.LoadVector256((UInt64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt64[] left, UInt64[] right, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((ulong)(left[0] & right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((ulong)(left[i] & right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.And)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.Byte.cs deleted file mode 100644 index 924203a10410..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.Byte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndNotByte() - { - var test = new SimpleBinaryOpTest__AndNotByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndNotByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndNotByte testClass) - { - var result = Avx2.AndNot(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndNotByte testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.AndNot( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndNotByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndNotByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.AndNot( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.AndNot( - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.AndNot( - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AndNot), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AndNot), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AndNot), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.AndNot( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.AndNot( - Avx.LoadVector256((Byte*)(pClsVar1)), - Avx.LoadVector256((Byte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)); - var result = Avx2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)); - var result = Avx2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndNotByte(); - var result = Avx2.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndNotByte(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.AndNot( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.AndNot(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.AndNot( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.AndNot( - Avx.LoadVector256((Byte*)(&test._fld1)), - Avx.LoadVector256((Byte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((byte)(~left[0] & right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((byte)(~left[i] & right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.AndNot)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.Int16.cs deleted file mode 100644 index 13ee2d45eeb2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.Int16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndNotInt16() - { - var test = new SimpleBinaryOpTest__AndNotInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndNotInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndNotInt16 testClass) - { - var result = Avx2.AndNot(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndNotInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.AndNot( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndNotInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndNotInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.AndNot( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.AndNot( - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.AndNot( - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AndNot), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AndNot), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AndNot), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.AndNot( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.AndNot( - Avx.LoadVector256((Int16*)(pClsVar1)), - Avx.LoadVector256((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndNotInt16(); - var result = Avx2.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndNotInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.AndNot( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.AndNot(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.AndNot( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.AndNot( - Avx.LoadVector256((Int16*)(&test._fld1)), - Avx.LoadVector256((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((short)(~left[0] & right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((short)(~left[i] & right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.AndNot)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.Int32.cs deleted file mode 100644 index 64b899158e98..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.Int32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndNotInt32() - { - var test = new SimpleBinaryOpTest__AndNotInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndNotInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndNotInt32 testClass) - { - var result = Avx2.AndNot(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndNotInt32 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.AndNot( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndNotInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndNotInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.AndNot( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.AndNot( - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.AndNot( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AndNot), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AndNot), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AndNot), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.AndNot( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.AndNot( - Avx.LoadVector256((Int32*)(pClsVar1)), - Avx.LoadVector256((Int32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndNotInt32(); - var result = Avx2.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndNotInt32(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.AndNot( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.AndNot(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.AndNot( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.AndNot( - Avx.LoadVector256((Int32*)(&test._fld1)), - Avx.LoadVector256((Int32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((int)(~left[0] & right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((int)(~left[i] & right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.AndNot)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.Int64.cs deleted file mode 100644 index 91531d1a7296..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.Int64.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndNotInt64() - { - var test = new SimpleBinaryOpTest__AndNotInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndNotInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int64[] inArray1, Int64[] inArray2, Int64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndNotInt64 testClass) - { - var result = Avx2.AndNot(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndNotInt64 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.AndNot( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndNotInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndNotInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.AndNot( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.AndNot( - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.AndNot( - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AndNot), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AndNot), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AndNot), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.AndNot( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.AndNot( - Avx.LoadVector256((Int64*)(pClsVar1)), - Avx.LoadVector256((Int64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndNotInt64(); - var result = Avx2.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndNotInt64(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.AndNot( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.AndNot(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.AndNot( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.AndNot( - Avx.LoadVector256((Int64*)(&test._fld1)), - Avx.LoadVector256((Int64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((long)(~left[0] & right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((long)(~left[i] & right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.AndNot)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.SByte.cs deleted file mode 100644 index 57135af4a82d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.SByte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndNotSByte() - { - var test = new SimpleBinaryOpTest__AndNotSByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndNotSByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndNotSByte testClass) - { - var result = Avx2.AndNot(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndNotSByte testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.AndNot( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndNotSByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndNotSByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.AndNot( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.AndNot( - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.AndNot( - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AndNot), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AndNot), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AndNot), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.AndNot( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.AndNot( - Avx.LoadVector256((SByte*)(pClsVar1)), - Avx.LoadVector256((SByte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndNotSByte(); - var result = Avx2.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndNotSByte(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.AndNot( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.AndNot(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.AndNot( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.AndNot( - Avx.LoadVector256((SByte*)(&test._fld1)), - Avx.LoadVector256((SByte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((sbyte)(~left[0] & right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((sbyte)(~left[i] & right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.AndNot)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.UInt16.cs deleted file mode 100644 index 99f7b11063e4..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.UInt16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndNotUInt16() - { - var test = new SimpleBinaryOpTest__AndNotUInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndNotUInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndNotUInt16 testClass) - { - var result = Avx2.AndNot(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndNotUInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.AndNot( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndNotUInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndNotUInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.AndNot( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.AndNot( - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.AndNot( - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AndNot), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AndNot), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AndNot), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.AndNot( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.AndNot( - Avx.LoadVector256((UInt16*)(pClsVar1)), - Avx.LoadVector256((UInt16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndNotUInt16(); - var result = Avx2.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndNotUInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.AndNot( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.AndNot(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.AndNot( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.AndNot( - Avx.LoadVector256((UInt16*)(&test._fld1)), - Avx.LoadVector256((UInt16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((ushort)(~left[0] & right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((ushort)(~left[i] & right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.AndNot)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.UInt32.cs deleted file mode 100644 index d61966dc7d31..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.UInt32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndNotUInt32() - { - var test = new SimpleBinaryOpTest__AndNotUInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndNotUInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndNotUInt32 testClass) - { - var result = Avx2.AndNot(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndNotUInt32 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.AndNot( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndNotUInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndNotUInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.AndNot( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.AndNot( - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.AndNot( - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AndNot), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AndNot), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AndNot), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.AndNot( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.AndNot( - Avx.LoadVector256((UInt32*)(pClsVar1)), - Avx.LoadVector256((UInt32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndNotUInt32(); - var result = Avx2.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndNotUInt32(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.AndNot( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.AndNot(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.AndNot( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.AndNot( - Avx.LoadVector256((UInt32*)(&test._fld1)), - Avx.LoadVector256((UInt32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((uint)(~left[0] & right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((uint)(~left[i] & right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.AndNot)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.UInt64.cs deleted file mode 100644 index 2a1b0e9cca92..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.UInt64.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndNotUInt64() - { - var test = new SimpleBinaryOpTest__AndNotUInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndNotUInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt64[] inArray1, UInt64[] inArray2, UInt64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndNotUInt64 testClass) - { - var result = Avx2.AndNot(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndNotUInt64 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.AndNot( - Avx.LoadVector256((UInt64*)(pFld1)), - Avx.LoadVector256((UInt64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndNotUInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndNotUInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.AndNot( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.AndNot( - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.AndNot( - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AndNot), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AndNot), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.AndNot), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.AndNot( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.AndNot( - Avx.LoadVector256((UInt64*)(pClsVar1)), - Avx.LoadVector256((UInt64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndNotUInt64(); - var result = Avx2.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndNotUInt64(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.AndNot( - Avx.LoadVector256((UInt64*)(pFld1)), - Avx.LoadVector256((UInt64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.AndNot(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.AndNot( - Avx.LoadVector256((UInt64*)(pFld1)), - Avx.LoadVector256((UInt64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.AndNot( - Avx.LoadVector256((UInt64*)(&test._fld1)), - Avx.LoadVector256((UInt64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt64[] left, UInt64[] right, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((ulong)(~left[0] & right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((ulong)(~left[i] & right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.AndNot)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Average.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Average.Byte.cs deleted file mode 100644 index 28eb94b3c564..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Average.Byte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AverageByte() - { - var test = new SimpleBinaryOpTest__AverageByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AverageByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AverageByte testClass) - { - var result = Avx2.Average(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AverageByte testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Average( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AverageByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AverageByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Average( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Average( - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Average( - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Average), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Average), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Average), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Average( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Average( - Avx.LoadVector256((Byte*)(pClsVar1)), - Avx.LoadVector256((Byte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Average(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)); - var result = Avx2.Average(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)); - var result = Avx2.Average(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AverageByte(); - var result = Avx2.Average(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AverageByte(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Average( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Average(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Average( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Average(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Average( - Avx.LoadVector256((Byte*)(&test._fld1)), - Avx.LoadVector256((Byte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((byte)((left[0] + right[0] + 1) >> 1) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((byte)((left[i] + right[i] + 1) >> 1) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Average)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Average.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Average.UInt16.cs deleted file mode 100644 index 35361488f3a3..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Average.UInt16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AverageUInt16() - { - var test = new SimpleBinaryOpTest__AverageUInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AverageUInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AverageUInt16 testClass) - { - var result = Avx2.Average(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AverageUInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Average( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AverageUInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AverageUInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Average( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Average( - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Average( - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Average), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Average), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Average), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Average( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Average( - Avx.LoadVector256((UInt16*)(pClsVar1)), - Avx.LoadVector256((UInt16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Average(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx2.Average(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx2.Average(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AverageUInt16(); - var result = Avx2.Average(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AverageUInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Average( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Average(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Average( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Average(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Average( - Avx.LoadVector256((UInt16*)(&test._fld1)), - Avx.LoadVector256((UInt16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((ushort)((left[0] + right[0] + 1) >> 1) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((ushort)((left[i] + right[i] + 1) >> 1) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Average)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int32.1.cs deleted file mode 100644 index 05756e122916..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int32.1.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendInt321() - { - var test = new ImmBinaryOpTest__BlendInt321(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__BlendInt321 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__BlendInt321 testClass) - { - var result = Avx2.Blend(_fld1, _fld2, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__BlendInt321() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__BlendInt321() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Blend( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Blend( - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Blend( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Blend( - _clsVar1, - _clsVar2, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Blend(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Blend(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Blend(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__BlendInt321(); - var result = Avx2.Blend(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Blend(_fld1, _fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Blend(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (((1 & (1 << 0)) == 0) ? left[0] : right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (((1 & (1 << i)) == 0) ? left[i] : right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Blend)}(Vector256.1, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int32.2.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int32.2.cs deleted file mode 100644 index c0020850c0e1..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int32.2.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendInt322() - { - var test = new ImmBinaryOpTest__BlendInt322(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__BlendInt322 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__BlendInt322 testClass) - { - var result = Avx2.Blend(_fld1, _fld2, 2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__BlendInt322() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__BlendInt322() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Blend( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Blend( - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Blend( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Blend( - _clsVar1, - _clsVar2, - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Blend(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Blend(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Blend(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__BlendInt322(); - var result = Avx2.Blend(test._fld1, test._fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Blend(_fld1, _fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Blend(test._fld1, test._fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (((2 & (1 << 0)) == 0) ? left[0] : right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (((2 & (1 << i)) == 0) ? left[i] : right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Blend)}(Vector256.2, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int32.4.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int32.4.cs deleted file mode 100644 index 81d8f3ce6132..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int32.4.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendInt324() - { - var test = new ImmBinaryOpTest__BlendInt324(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__BlendInt324 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__BlendInt324 testClass) - { - var result = Avx2.Blend(_fld1, _fld2, 4); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__BlendInt324() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__BlendInt324() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Blend( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Blend( - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Blend( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)4 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)), - (byte)4 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)), - (byte)4 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Blend( - _clsVar1, - _clsVar2, - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Blend(left, right, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Blend(left, right, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Blend(left, right, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__BlendInt324(); - var result = Avx2.Blend(test._fld1, test._fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Blend(_fld1, _fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Blend(test._fld1, test._fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (((4 & (1 << 0)) == 0) ? left[0] : right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (((4 & (1 << i)) == 0) ? left[i] : right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Blend)}(Vector256.4, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int32.85.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int32.85.cs deleted file mode 100644 index 2f497c31ed8f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int32.85.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendInt3285() - { - var test = new ImmBinaryOpTest__BlendInt3285(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__BlendInt3285 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__BlendInt3285 testClass) - { - var result = Avx2.Blend(_fld1, _fld2, 85); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__BlendInt3285() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__BlendInt3285() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Blend( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 85 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Blend( - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)), - 85 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Blend( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)), - 85 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)85 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)), - (byte)85 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)), - (byte)85 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Blend( - _clsVar1, - _clsVar2, - 85 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Blend(left, right, 85); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Blend(left, right, 85); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Blend(left, right, 85); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__BlendInt3285(); - var result = Avx2.Blend(test._fld1, test._fld2, 85); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Blend(_fld1, _fld2, 85); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Blend(test._fld1, test._fld2, 85); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (((85 & (1 << 0)) == 0) ? left[0] : right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (((85 & (1 << i)) == 0) ? left[i] : right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Blend)}(Vector256.85, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt32.1.cs deleted file mode 100644 index 429f2ecbafc3..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt32.1.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendUInt321() - { - var test = new ImmBinaryOpTest__BlendUInt321(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__BlendUInt321 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__BlendUInt321 testClass) - { - var result = Avx2.Blend(_fld1, _fld2, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__BlendUInt321() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__BlendUInt321() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Blend( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Blend( - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Blend( - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Blend( - _clsVar1, - _clsVar2, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Blend(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Blend(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Blend(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__BlendUInt321(); - var result = Avx2.Blend(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Blend(_fld1, _fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Blend(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (((1 & (1 << 0)) == 0) ? left[0] : right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (((1 & (1 << i)) == 0) ? left[i] : right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Blend)}(Vector256.1, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt32.2.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt32.2.cs deleted file mode 100644 index 047a50ec5a6c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt32.2.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendUInt322() - { - var test = new ImmBinaryOpTest__BlendUInt322(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__BlendUInt322 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__BlendUInt322 testClass) - { - var result = Avx2.Blend(_fld1, _fld2, 2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__BlendUInt322() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__BlendUInt322() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Blend( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Blend( - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Blend( - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Blend( - _clsVar1, - _clsVar2, - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Blend(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Blend(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Blend(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__BlendUInt322(); - var result = Avx2.Blend(test._fld1, test._fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Blend(_fld1, _fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Blend(test._fld1, test._fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (((2 & (1 << 0)) == 0) ? left[0] : right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (((2 & (1 << i)) == 0) ? left[i] : right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Blend)}(Vector256.2, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt32.4.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt32.4.cs deleted file mode 100644 index 1a4e1bf2c850..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt32.4.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendUInt324() - { - var test = new ImmBinaryOpTest__BlendUInt324(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__BlendUInt324 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__BlendUInt324 testClass) - { - var result = Avx2.Blend(_fld1, _fld2, 4); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__BlendUInt324() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__BlendUInt324() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Blend( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Blend( - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Blend( - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)4 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)), - (byte)4 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)), - (byte)4 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Blend( - _clsVar1, - _clsVar2, - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Blend(left, right, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Blend(left, right, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Blend(left, right, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__BlendUInt324(); - var result = Avx2.Blend(test._fld1, test._fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Blend(_fld1, _fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Blend(test._fld1, test._fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (((4 & (1 << 0)) == 0) ? left[0] : right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (((4 & (1 << i)) == 0) ? left[i] : right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Blend)}(Vector256.4, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt32.85.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt32.85.cs deleted file mode 100644 index 41478263e8d4..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt32.85.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendUInt3285() - { - var test = new ImmBinaryOpTest__BlendUInt3285(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__BlendUInt3285 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__BlendUInt3285 testClass) - { - var result = Avx2.Blend(_fld1, _fld2, 85); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__BlendUInt3285() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__BlendUInt3285() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Blend( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 85 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Blend( - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)), - 85 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Blend( - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)), - 85 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)85 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)), - (byte)85 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)), - (byte)85 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Blend( - _clsVar1, - _clsVar2, - 85 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Blend(left, right, 85); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Blend(left, right, 85); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Blend(left, right, 85); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__BlendUInt3285(); - var result = Avx2.Blend(test._fld1, test._fld2, 85); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Blend(_fld1, _fld2, 85); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Blend(test._fld1, test._fld2, 85); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (((85 & (1 << 0)) == 0) ? left[0] : right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (((85 & (1 << i)) == 0) ? left[i] : right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Blend)}(Vector256.85, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BlendVariable.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BlendVariable.Byte.cs deleted file mode 100644 index 33d11157e243..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BlendVariable.Byte.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendVariableByte() - { - var test = new SimpleTernaryOpTest__BlendVariableByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__BlendVariableByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, Byte[] inArray3, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - public Vector256 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (byte)(((i % 2) == 0) ? 128 : 1); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__BlendVariableByte testClass) - { - var result = Avx2.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__BlendVariableByte testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Avx2.BlendVariable( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)), - Avx.LoadVector256((Byte*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - private static Byte[] _data3 = new Byte[Op3ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - private static Vector256 _clsVar3; - - private Vector256 _fld1; - private Vector256 _fld2; - private Vector256 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__BlendVariableByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (byte)(((i % 2) == 0) ? 128 : 1); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__BlendVariableByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (byte)(((i % 2) == 0) ? 128 : 1); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (byte)(((i % 2) == 0) ? 128 : 1); } - _dataTable = new DataTable(_data1, _data2, _data3, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.BlendVariable( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BlendVariable( - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Byte*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.BlendVariable( - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BlendVariable), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BlendVariable), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Byte*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BlendVariable), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.BlendVariable( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - fixed (Vector256* pClsVar3 = &_clsVar3) - { - var result = Avx2.BlendVariable( - Avx.LoadVector256((Byte*)(pClsVar1)), - Avx.LoadVector256((Byte*)(pClsVar2)), - Avx.LoadVector256((Byte*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Avx2.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadVector256((Byte*)(_dataTable.inArray3Ptr)); - var result = Avx2.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray3Ptr)); - var result = Avx2.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__BlendVariableByte(); - var result = Avx2.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__BlendVariableByte(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - fixed (Vector256* pFld3 = &test._fld3) - { - var result = Avx2.BlendVariable( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)), - Avx.LoadVector256((Byte*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Avx2.BlendVariable( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)), - Avx.LoadVector256((Byte*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.BlendVariable( - Avx.LoadVector256((Byte*)(&test._fld1)), - Avx.LoadVector256((Byte*)(&test._fld2)), - Avx.LoadVector256((Byte*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, Vector256 op3, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] inArray3 = new Byte[Op3ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] inArray3 = new Byte[Op3ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Byte[] firstOp, Byte[] secondOp, Byte[] thirdOp, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (((thirdOp[0] >> 7) & 1) == 1 ? secondOp[0] != result[0] : firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (((thirdOp[i] >> 7) & 1) == 1 ? secondOp[i] != result[i] : firstOp[i] != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BlendVariable)}(Vector256, Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BlendVariable.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BlendVariable.Int16.cs deleted file mode 100644 index 733f3f5ea8ba..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BlendVariable.Int16.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendVariableInt16() - { - var test = new SimpleTernaryOpTest__BlendVariableInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__BlendVariableInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int16[] inArray3, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - public Vector256 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToInt16("0xFFFF", 16) : (short)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__BlendVariableInt16 testClass) - { - var result = Avx2.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__BlendVariableInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Avx2.BlendVariable( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)), - Avx.LoadVector256((Int16*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - private static Int16[] _data3 = new Int16[Op3ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - private static Vector256 _clsVar3; - - private Vector256 _fld1; - private Vector256 _fld2; - private Vector256 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__BlendVariableInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToInt16("0xFFFF", 16) : (short)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__BlendVariableInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToInt16("0xFFFF", 16) : (short)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToInt16("0xFFFF", 16) : (short)0); } - _dataTable = new DataTable(_data1, _data2, _data3, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.BlendVariable( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BlendVariable( - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.BlendVariable( - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BlendVariable), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BlendVariable), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BlendVariable), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.BlendVariable( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - fixed (Vector256* pClsVar3 = &_clsVar3) - { - var result = Avx2.BlendVariable( - Avx.LoadVector256((Int16*)(pClsVar1)), - Avx.LoadVector256((Int16*)(pClsVar2)), - Avx.LoadVector256((Int16*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Avx2.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadVector256((Int16*)(_dataTable.inArray3Ptr)); - var result = Avx2.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray3Ptr)); - var result = Avx2.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__BlendVariableInt16(); - var result = Avx2.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__BlendVariableInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - fixed (Vector256* pFld3 = &test._fld3) - { - var result = Avx2.BlendVariable( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)), - Avx.LoadVector256((Int16*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Avx2.BlendVariable( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)), - Avx.LoadVector256((Int16*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.BlendVariable( - Avx.LoadVector256((Int16*)(&test._fld1)), - Avx.LoadVector256((Int16*)(&test._fld2)), - Avx.LoadVector256((Int16*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, Vector256 op3, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] inArray3 = new Int16[Op3ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] inArray3 = new Int16[Op3ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Int16[] firstOp, Int16[] secondOp, Int16[] thirdOp, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((thirdOp[0] != 0) ? secondOp[0] != result[0] : firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((thirdOp[i] != 0) ? secondOp[i] != result[i] : firstOp[i] != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BlendVariable)}(Vector256, Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BlendVariable.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BlendVariable.Int32.cs deleted file mode 100644 index f2f51ec69d88..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BlendVariable.Int32.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendVariableInt32() - { - var test = new SimpleTernaryOpTest__BlendVariableInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__BlendVariableInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, Int32[] inArray3, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - public Vector256 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToInt32("0xFFFFFFFF", 16) : (int)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__BlendVariableInt32 testClass) - { - var result = Avx2.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__BlendVariableInt32 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Avx2.BlendVariable( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)), - Avx.LoadVector256((Int32*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - private static Int32[] _data3 = new Int32[Op3ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - private static Vector256 _clsVar3; - - private Vector256 _fld1; - private Vector256 _fld2; - private Vector256 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__BlendVariableInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToInt32("0xFFFFFFFF", 16) : (int)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__BlendVariableInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToInt32("0xFFFFFFFF", 16) : (int)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToInt32("0xFFFFFFFF", 16) : (int)0); } - _dataTable = new DataTable(_data1, _data2, _data3, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.BlendVariable( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BlendVariable( - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.BlendVariable( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BlendVariable), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BlendVariable), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BlendVariable), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.BlendVariable( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - fixed (Vector256* pClsVar3 = &_clsVar3) - { - var result = Avx2.BlendVariable( - Avx.LoadVector256((Int32*)(pClsVar1)), - Avx.LoadVector256((Int32*)(pClsVar2)), - Avx.LoadVector256((Int32*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Avx2.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadVector256((Int32*)(_dataTable.inArray3Ptr)); - var result = Avx2.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray3Ptr)); - var result = Avx2.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__BlendVariableInt32(); - var result = Avx2.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__BlendVariableInt32(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - fixed (Vector256* pFld3 = &test._fld3) - { - var result = Avx2.BlendVariable( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)), - Avx.LoadVector256((Int32*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Avx2.BlendVariable( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)), - Avx.LoadVector256((Int32*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.BlendVariable( - Avx.LoadVector256((Int32*)(&test._fld1)), - Avx.LoadVector256((Int32*)(&test._fld2)), - Avx.LoadVector256((Int32*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, Vector256 op3, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] inArray3 = new Int32[Op3ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] inArray3 = new Int32[Op3ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Int32[] firstOp, Int32[] secondOp, Int32[] thirdOp, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((thirdOp[0] != 0) ? secondOp[0] != result[0] : firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((thirdOp[i] != 0) ? secondOp[i] != result[i] : firstOp[i] != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BlendVariable)}(Vector256, Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BlendVariable.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BlendVariable.Int64.cs deleted file mode 100644 index fab6bc1c9af6..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BlendVariable.Int64.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendVariableInt64() - { - var test = new SimpleTernaryOpTest__BlendVariableInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__BlendVariableInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int64[] inArray1, Int64[] inArray2, Int64[] inArray3, Int64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - public Vector256 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToInt64("0xFFFFFFFFFFFFFFFF", 16) : (long)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__BlendVariableInt64 testClass) - { - var result = Avx2.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__BlendVariableInt64 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Avx2.BlendVariable( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)), - Avx.LoadVector256((Int64*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - private static Int64[] _data3 = new Int64[Op3ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - private static Vector256 _clsVar3; - - private Vector256 _fld1; - private Vector256 _fld2; - private Vector256 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__BlendVariableInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToInt64("0xFFFFFFFFFFFFFFFF", 16) : (long)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__BlendVariableInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToInt64("0xFFFFFFFFFFFFFFFF", 16) : (long)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToInt64("0xFFFFFFFFFFFFFFFF", 16) : (long)0); } - _dataTable = new DataTable(_data1, _data2, _data3, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.BlendVariable( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BlendVariable( - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.BlendVariable( - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BlendVariable), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BlendVariable), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BlendVariable), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.BlendVariable( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - fixed (Vector256* pClsVar3 = &_clsVar3) - { - var result = Avx2.BlendVariable( - Avx.LoadVector256((Int64*)(pClsVar1)), - Avx.LoadVector256((Int64*)(pClsVar2)), - Avx.LoadVector256((Int64*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Avx2.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadVector256((Int64*)(_dataTable.inArray3Ptr)); - var result = Avx2.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray3Ptr)); - var result = Avx2.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__BlendVariableInt64(); - var result = Avx2.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__BlendVariableInt64(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - fixed (Vector256* pFld3 = &test._fld3) - { - var result = Avx2.BlendVariable( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)), - Avx.LoadVector256((Int64*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Avx2.BlendVariable( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)), - Avx.LoadVector256((Int64*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.BlendVariable( - Avx.LoadVector256((Int64*)(&test._fld1)), - Avx.LoadVector256((Int64*)(&test._fld2)), - Avx.LoadVector256((Int64*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, Vector256 op3, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] inArray3 = new Int64[Op3ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] inArray3 = new Int64[Op3ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Int64[] firstOp, Int64[] secondOp, Int64[] thirdOp, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((thirdOp[0] != 0) ? secondOp[0] != result[0] : firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((thirdOp[i] != 0) ? secondOp[i] != result[i] : firstOp[i] != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BlendVariable)}(Vector256, Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BlendVariable.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BlendVariable.SByte.cs deleted file mode 100644 index 779d772c88a0..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BlendVariable.SByte.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendVariableSByte() - { - var test = new SimpleTernaryOpTest__BlendVariableSByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__BlendVariableSByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, SByte[] inArray3, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - public Vector256 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (sbyte)(((i % 2) == 0) ? -128 : 1); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__BlendVariableSByte testClass) - { - var result = Avx2.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__BlendVariableSByte testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Avx2.BlendVariable( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)), - Avx.LoadVector256((SByte*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - private static SByte[] _data3 = new SByte[Op3ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - private static Vector256 _clsVar3; - - private Vector256 _fld1; - private Vector256 _fld2; - private Vector256 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__BlendVariableSByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (sbyte)(((i % 2) == 0) ? -128 : 1); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__BlendVariableSByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (sbyte)(((i % 2) == 0) ? -128 : 1); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (sbyte)(((i % 2) == 0) ? -128 : 1); } - _dataTable = new DataTable(_data1, _data2, _data3, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.BlendVariable( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BlendVariable( - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.BlendVariable( - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BlendVariable), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BlendVariable), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BlendVariable), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.BlendVariable( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - fixed (Vector256* pClsVar3 = &_clsVar3) - { - var result = Avx2.BlendVariable( - Avx.LoadVector256((SByte*)(pClsVar1)), - Avx.LoadVector256((SByte*)(pClsVar2)), - Avx.LoadVector256((SByte*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Avx2.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadVector256((SByte*)(_dataTable.inArray3Ptr)); - var result = Avx2.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray3Ptr)); - var result = Avx2.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__BlendVariableSByte(); - var result = Avx2.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__BlendVariableSByte(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - fixed (Vector256* pFld3 = &test._fld3) - { - var result = Avx2.BlendVariable( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)), - Avx.LoadVector256((SByte*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Avx2.BlendVariable( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)), - Avx.LoadVector256((SByte*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.BlendVariable( - Avx.LoadVector256((SByte*)(&test._fld1)), - Avx.LoadVector256((SByte*)(&test._fld2)), - Avx.LoadVector256((SByte*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, Vector256 op3, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] inArray3 = new SByte[Op3ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] inArray3 = new SByte[Op3ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(SByte[] firstOp, SByte[] secondOp, SByte[] thirdOp, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (((thirdOp[0] >> 7) & 1) == 1 ? secondOp[0] != result[0] : firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (((thirdOp[i] >> 7) & 1) == 1 ? secondOp[i] != result[i] : firstOp[i] != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BlendVariable)}(Vector256, Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BlendVariable.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BlendVariable.UInt16.cs deleted file mode 100644 index cc95c416dcaf..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BlendVariable.UInt16.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendVariableUInt16() - { - var test = new SimpleTernaryOpTest__BlendVariableUInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__BlendVariableUInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, UInt16[] inArray3, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - public Vector256 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToUInt16("0xFFFF", 16) : (ushort)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__BlendVariableUInt16 testClass) - { - var result = Avx2.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__BlendVariableUInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Avx2.BlendVariable( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)), - Avx.LoadVector256((UInt16*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - private static UInt16[] _data3 = new UInt16[Op3ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - private static Vector256 _clsVar3; - - private Vector256 _fld1; - private Vector256 _fld2; - private Vector256 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__BlendVariableUInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToUInt16("0xFFFF", 16) : (ushort)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__BlendVariableUInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToUInt16("0xFFFF", 16) : (ushort)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToUInt16("0xFFFF", 16) : (ushort)0); } - _dataTable = new DataTable(_data1, _data2, _data3, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.BlendVariable( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BlendVariable( - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.BlendVariable( - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BlendVariable), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BlendVariable), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BlendVariable), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.BlendVariable( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - fixed (Vector256* pClsVar3 = &_clsVar3) - { - var result = Avx2.BlendVariable( - Avx.LoadVector256((UInt16*)(pClsVar1)), - Avx.LoadVector256((UInt16*)(pClsVar2)), - Avx.LoadVector256((UInt16*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Avx2.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadVector256((UInt16*)(_dataTable.inArray3Ptr)); - var result = Avx2.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray3Ptr)); - var result = Avx2.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__BlendVariableUInt16(); - var result = Avx2.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__BlendVariableUInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - fixed (Vector256* pFld3 = &test._fld3) - { - var result = Avx2.BlendVariable( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)), - Avx.LoadVector256((UInt16*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Avx2.BlendVariable( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)), - Avx.LoadVector256((UInt16*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.BlendVariable( - Avx.LoadVector256((UInt16*)(&test._fld1)), - Avx.LoadVector256((UInt16*)(&test._fld2)), - Avx.LoadVector256((UInt16*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, Vector256 op3, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] inArray3 = new UInt16[Op3ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] inArray3 = new UInt16[Op3ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(UInt16[] firstOp, UInt16[] secondOp, UInt16[] thirdOp, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((thirdOp[0] != 0) ? secondOp[0] != result[0] : firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((thirdOp[i] != 0) ? secondOp[i] != result[i] : firstOp[i] != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BlendVariable)}(Vector256, Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BlendVariable.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BlendVariable.UInt32.cs deleted file mode 100644 index 4fe7030c2302..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BlendVariable.UInt32.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendVariableUInt32() - { - var test = new SimpleTernaryOpTest__BlendVariableUInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__BlendVariableUInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, UInt32[] inArray3, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - public Vector256 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToUInt32("0xFFFFFFFF", 16) : (uint)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__BlendVariableUInt32 testClass) - { - var result = Avx2.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__BlendVariableUInt32 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Avx2.BlendVariable( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)), - Avx.LoadVector256((UInt32*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - private static UInt32[] _data3 = new UInt32[Op3ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - private static Vector256 _clsVar3; - - private Vector256 _fld1; - private Vector256 _fld2; - private Vector256 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__BlendVariableUInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToUInt32("0xFFFFFFFF", 16) : (uint)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__BlendVariableUInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToUInt32("0xFFFFFFFF", 16) : (uint)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToUInt32("0xFFFFFFFF", 16) : (uint)0); } - _dataTable = new DataTable(_data1, _data2, _data3, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.BlendVariable( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BlendVariable( - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.BlendVariable( - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BlendVariable), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BlendVariable), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BlendVariable), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.BlendVariable( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - fixed (Vector256* pClsVar3 = &_clsVar3) - { - var result = Avx2.BlendVariable( - Avx.LoadVector256((UInt32*)(pClsVar1)), - Avx.LoadVector256((UInt32*)(pClsVar2)), - Avx.LoadVector256((UInt32*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Avx2.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadVector256((UInt32*)(_dataTable.inArray3Ptr)); - var result = Avx2.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray3Ptr)); - var result = Avx2.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__BlendVariableUInt32(); - var result = Avx2.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__BlendVariableUInt32(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - fixed (Vector256* pFld3 = &test._fld3) - { - var result = Avx2.BlendVariable( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)), - Avx.LoadVector256((UInt32*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Avx2.BlendVariable( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)), - Avx.LoadVector256((UInt32*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.BlendVariable( - Avx.LoadVector256((UInt32*)(&test._fld1)), - Avx.LoadVector256((UInt32*)(&test._fld2)), - Avx.LoadVector256((UInt32*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, Vector256 op3, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] inArray3 = new UInt32[Op3ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] inArray3 = new UInt32[Op3ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(UInt32[] firstOp, UInt32[] secondOp, UInt32[] thirdOp, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((thirdOp[0] != 0) ? secondOp[0] != result[0] : firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((thirdOp[i] != 0) ? secondOp[i] != result[i] : firstOp[i] != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BlendVariable)}(Vector256, Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BlendVariable.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BlendVariable.UInt64.cs deleted file mode 100644 index 50563d26199b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BlendVariable.UInt64.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendVariableUInt64() - { - var test = new SimpleTernaryOpTest__BlendVariableUInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__BlendVariableUInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt64[] inArray1, UInt64[] inArray2, UInt64[] inArray3, UInt64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - public Vector256 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToUInt64("0xFFFFFFFFFFFFFFFF", 16): (ulong)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__BlendVariableUInt64 testClass) - { - var result = Avx2.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__BlendVariableUInt64 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Avx2.BlendVariable( - Avx.LoadVector256((UInt64*)(pFld1)), - Avx.LoadVector256((UInt64*)(pFld2)), - Avx.LoadVector256((UInt64*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - private static UInt64[] _data3 = new UInt64[Op3ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - private static Vector256 _clsVar3; - - private Vector256 _fld1; - private Vector256 _fld2; - private Vector256 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__BlendVariableUInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToUInt64("0xFFFFFFFFFFFFFFFF", 16): (ulong)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__BlendVariableUInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToUInt64("0xFFFFFFFFFFFFFFFF", 16): (ulong)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToUInt64("0xFFFFFFFFFFFFFFFF", 16): (ulong)0); } - _dataTable = new DataTable(_data1, _data2, _data3, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.BlendVariable( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BlendVariable( - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.BlendVariable( - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BlendVariable), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BlendVariable), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BlendVariable), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.BlendVariable( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - fixed (Vector256* pClsVar3 = &_clsVar3) - { - var result = Avx2.BlendVariable( - Avx.LoadVector256((UInt64*)(pClsVar1)), - Avx.LoadVector256((UInt64*)(pClsVar2)), - Avx.LoadVector256((UInt64*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Avx2.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadVector256((UInt64*)(_dataTable.inArray3Ptr)); - var result = Avx2.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray3Ptr)); - var result = Avx2.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__BlendVariableUInt64(); - var result = Avx2.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__BlendVariableUInt64(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - fixed (Vector256* pFld3 = &test._fld3) - { - var result = Avx2.BlendVariable( - Avx.LoadVector256((UInt64*)(pFld1)), - Avx.LoadVector256((UInt64*)(pFld2)), - Avx.LoadVector256((UInt64*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Avx2.BlendVariable( - Avx.LoadVector256((UInt64*)(pFld1)), - Avx.LoadVector256((UInt64*)(pFld2)), - Avx.LoadVector256((UInt64*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.BlendVariable( - Avx.LoadVector256((UInt64*)(&test._fld1)), - Avx.LoadVector256((UInt64*)(&test._fld2)), - Avx.LoadVector256((UInt64*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, Vector256 op3, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] inArray3 = new UInt64[Op3ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] inArray3 = new UInt64[Op3ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(UInt64[] firstOp, UInt64[] secondOp, UInt64[] thirdOp, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((thirdOp[0] != 0) ? secondOp[0] != result[0] : firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((thirdOp[i] != 0) ? secondOp[i] != result[i] : firstOp[i] != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BlendVariable)}(Vector256, Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Byte.cs deleted file mode 100644 index fee179fffca3..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Byte.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector128Byte() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128Byte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector128Byte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__BroadcastScalarToVector128Byte testClass) - { - var result = Avx2.BroadcastScalarToVector128(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__BroadcastScalarToVector128Byte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((Byte*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__BroadcastScalarToVector128Byte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__BroadcastScalarToVector128Byte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.BroadcastScalarToVector128( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.BroadcastScalarToVector128( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((Byte*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Avx2.BroadcastScalarToVector128(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector128(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector128(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128Byte(); - var result = Avx2.BroadcastScalarToVector128(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128Byte(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((Byte*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.BroadcastScalarToVector128(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((Byte*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector128(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((Byte*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Byte[] firstOp, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((firstOp[0] != result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Int16.cs deleted file mode 100644 index c558e1c03f2f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Int16.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector128Int16() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128Int16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector128Int16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__BroadcastScalarToVector128Int16 testClass) - { - var result = Avx2.BroadcastScalarToVector128(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__BroadcastScalarToVector128Int16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((Int16*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__BroadcastScalarToVector128Int16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__BroadcastScalarToVector128Int16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.BroadcastScalarToVector128( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.BroadcastScalarToVector128( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((Int16*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Avx2.BroadcastScalarToVector128(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector128(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector128(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128Int16(); - var result = Avx2.BroadcastScalarToVector128(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128Int16(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((Int16*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.BroadcastScalarToVector128(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((Int16*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector128(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((Int16*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Int16[] firstOp, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((firstOp[0] != result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Int32.cs deleted file mode 100644 index 53575ccae601..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Int32.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector128Int32() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128Int32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector128Int32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__BroadcastScalarToVector128Int32 testClass) - { - var result = Avx2.BroadcastScalarToVector128(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__BroadcastScalarToVector128Int32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((Int32*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__BroadcastScalarToVector128Int32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__BroadcastScalarToVector128Int32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.BroadcastScalarToVector128( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.BroadcastScalarToVector128( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((Int32*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Avx2.BroadcastScalarToVector128(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector128(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector128(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128Int32(); - var result = Avx2.BroadcastScalarToVector128(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128Int32(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((Int32*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.BroadcastScalarToVector128(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((Int32*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector128(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((Int32*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Int32[] firstOp, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((firstOp[0] != result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Int64.cs deleted file mode 100644 index cdc360cf743a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Int64.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector128Int64() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128Int64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector128Int64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int64[] inArray1, Int64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__BroadcastScalarToVector128Int64 testClass) - { - var result = Avx2.BroadcastScalarToVector128(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__BroadcastScalarToVector128Int64 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((Int64*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__BroadcastScalarToVector128Int64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__BroadcastScalarToVector128Int64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new DataTable(_data1, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.BroadcastScalarToVector128( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.BroadcastScalarToVector128( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((Int64*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Avx2.BroadcastScalarToVector128(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector128(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector128(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128Int64(); - var result = Avx2.BroadcastScalarToVector128(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128Int64(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((Int64*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.BroadcastScalarToVector128(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((Int64*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector128(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((Int64*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Int64[] firstOp, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((firstOp[0] != result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.SByte.cs deleted file mode 100644 index 92df562c455e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.SByte.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector128SByte() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128SByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector128SByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__BroadcastScalarToVector128SByte testClass) - { - var result = Avx2.BroadcastScalarToVector128(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__BroadcastScalarToVector128SByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((SByte*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__BroadcastScalarToVector128SByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__BroadcastScalarToVector128SByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.BroadcastScalarToVector128( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.BroadcastScalarToVector128( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((SByte*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Avx2.BroadcastScalarToVector128(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector128(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector128(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128SByte(); - var result = Avx2.BroadcastScalarToVector128(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128SByte(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((SByte*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.BroadcastScalarToVector128(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((SByte*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector128(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((SByte*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(SByte[] firstOp, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((firstOp[0] != result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Single.cs deleted file mode 100644 index c3e870112125..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Single.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector128Single() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128Single(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector128Single - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__BroadcastScalarToVector128Single testClass) - { - var result = Avx2.BroadcastScalarToVector128(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__BroadcastScalarToVector128Single testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__BroadcastScalarToVector128Single() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__BroadcastScalarToVector128Single() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.BroadcastScalarToVector128( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector128( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.BroadcastScalarToVector128( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.BroadcastScalarToVector128( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse.LoadVector128((Single*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Avx2.BroadcastScalarToVector128(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector128(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector128(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128Single(); - var result = Avx2.BroadcastScalarToVector128(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128Single(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.BroadcastScalarToVector128(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector128(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector128( - Sse.LoadVector128((Single*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[i]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.UInt16.cs deleted file mode 100644 index 73bc9e75039c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.UInt16.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector128UInt16() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128UInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector128UInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__BroadcastScalarToVector128UInt16 testClass) - { - var result = Avx2.BroadcastScalarToVector128(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__BroadcastScalarToVector128UInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((UInt16*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__BroadcastScalarToVector128UInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__BroadcastScalarToVector128UInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.BroadcastScalarToVector128( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.BroadcastScalarToVector128( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((UInt16*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Avx2.BroadcastScalarToVector128(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector128(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector128(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128UInt16(); - var result = Avx2.BroadcastScalarToVector128(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128UInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((UInt16*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.BroadcastScalarToVector128(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((UInt16*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector128(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((UInt16*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(UInt16[] firstOp, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((firstOp[0] != result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.UInt32.cs deleted file mode 100644 index 9b6760e69ddd..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.UInt32.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector128UInt32() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128UInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector128UInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__BroadcastScalarToVector128UInt32 testClass) - { - var result = Avx2.BroadcastScalarToVector128(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__BroadcastScalarToVector128UInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((UInt32*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__BroadcastScalarToVector128UInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__BroadcastScalarToVector128UInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.BroadcastScalarToVector128( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.BroadcastScalarToVector128( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((UInt32*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Avx2.BroadcastScalarToVector128(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector128(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector128(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128UInt32(); - var result = Avx2.BroadcastScalarToVector128(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128UInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((UInt32*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.BroadcastScalarToVector128(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((UInt32*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector128(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((UInt32*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(UInt32[] firstOp, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((firstOp[0] != result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.UInt64.cs deleted file mode 100644 index 323f63dfff6f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.UInt64.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector128UInt64() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128UInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector128UInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt64[] inArray1, UInt64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__BroadcastScalarToVector128UInt64 testClass) - { - var result = Avx2.BroadcastScalarToVector128(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__BroadcastScalarToVector128UInt64 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((UInt64*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__BroadcastScalarToVector128UInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__BroadcastScalarToVector128UInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new DataTable(_data1, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.BroadcastScalarToVector128( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.BroadcastScalarToVector128( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((UInt64*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Avx2.BroadcastScalarToVector128(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector128(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector128(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128UInt64(); - var result = Avx2.BroadcastScalarToVector128(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128UInt64(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((UInt64*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.BroadcastScalarToVector128(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((UInt64*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector128(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector128( - Sse2.LoadVector128((UInt64*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(UInt64[] firstOp, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((firstOp[0] != result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Byte.cs deleted file mode 100644 index 573dfcb81a8e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Byte.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector256Byte() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256Byte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector256Byte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__BroadcastScalarToVector256Byte testClass) - { - var result = Avx2.BroadcastScalarToVector256(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__BroadcastScalarToVector256Byte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((Byte*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__BroadcastScalarToVector256Byte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__BroadcastScalarToVector256Byte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.BroadcastScalarToVector256( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.BroadcastScalarToVector256( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((Byte*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Avx2.BroadcastScalarToVector256(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector256(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector256(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256Byte(); - var result = Avx2.BroadcastScalarToVector256(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256Byte(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((Byte*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.BroadcastScalarToVector256(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((Byte*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector256(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((Byte*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Byte[] firstOp, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((firstOp[0] != result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector256)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Double.cs deleted file mode 100644 index 3d5a2b613394..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Double.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector256Double() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256Double(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector256Double - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__BroadcastScalarToVector256Double testClass) - { - var result = Avx2.BroadcastScalarToVector256(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__BroadcastScalarToVector256Double testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__BroadcastScalarToVector256Double() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__BroadcastScalarToVector256Double() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.BroadcastScalarToVector256( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.BroadcastScalarToVector256( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((Double*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Avx2.BroadcastScalarToVector256(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector256(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector256(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256Double(); - var result = Avx2.BroadcastScalarToVector256(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256Double(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.BroadcastScalarToVector256(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector256(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((Double*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[i]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector256)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Int16.cs deleted file mode 100644 index f684077ce5dd..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Int16.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector256Int16() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256Int16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector256Int16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__BroadcastScalarToVector256Int16 testClass) - { - var result = Avx2.BroadcastScalarToVector256(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__BroadcastScalarToVector256Int16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((Int16*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__BroadcastScalarToVector256Int16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__BroadcastScalarToVector256Int16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.BroadcastScalarToVector256( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.BroadcastScalarToVector256( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((Int16*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Avx2.BroadcastScalarToVector256(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector256(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector256(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256Int16(); - var result = Avx2.BroadcastScalarToVector256(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256Int16(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((Int16*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.BroadcastScalarToVector256(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((Int16*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector256(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((Int16*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Int16[] firstOp, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((firstOp[0] != result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector256)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Int32.cs deleted file mode 100644 index 9cda6429634b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Int32.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector256Int32() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256Int32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector256Int32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__BroadcastScalarToVector256Int32 testClass) - { - var result = Avx2.BroadcastScalarToVector256(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__BroadcastScalarToVector256Int32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((Int32*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__BroadcastScalarToVector256Int32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__BroadcastScalarToVector256Int32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.BroadcastScalarToVector256( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.BroadcastScalarToVector256( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((Int32*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Avx2.BroadcastScalarToVector256(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector256(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector256(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256Int32(); - var result = Avx2.BroadcastScalarToVector256(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256Int32(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((Int32*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.BroadcastScalarToVector256(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((Int32*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector256(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((Int32*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Int32[] firstOp, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((firstOp[0] != result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector256)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Int64.cs deleted file mode 100644 index 36c75056386e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Int64.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector256Int64() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256Int64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector256Int64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int64[] inArray1, Int64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__BroadcastScalarToVector256Int64 testClass) - { - var result = Avx2.BroadcastScalarToVector256(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__BroadcastScalarToVector256Int64 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((Int64*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__BroadcastScalarToVector256Int64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__BroadcastScalarToVector256Int64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new DataTable(_data1, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.BroadcastScalarToVector256( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.BroadcastScalarToVector256( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((Int64*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Avx2.BroadcastScalarToVector256(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector256(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector256(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256Int64(); - var result = Avx2.BroadcastScalarToVector256(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256Int64(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((Int64*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.BroadcastScalarToVector256(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((Int64*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector256(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((Int64*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Int64[] firstOp, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((firstOp[0] != result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector256)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.SByte.cs deleted file mode 100644 index fd10693db7b8..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.SByte.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector256SByte() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256SByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector256SByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__BroadcastScalarToVector256SByte testClass) - { - var result = Avx2.BroadcastScalarToVector256(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__BroadcastScalarToVector256SByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((SByte*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__BroadcastScalarToVector256SByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__BroadcastScalarToVector256SByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.BroadcastScalarToVector256( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.BroadcastScalarToVector256( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((SByte*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Avx2.BroadcastScalarToVector256(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector256(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector256(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256SByte(); - var result = Avx2.BroadcastScalarToVector256(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256SByte(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((SByte*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.BroadcastScalarToVector256(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((SByte*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector256(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((SByte*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(SByte[] firstOp, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((firstOp[0] != result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector256)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Single.cs deleted file mode 100644 index 47d62d7fd8a0..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Single.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector256Single() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256Single(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector256Single - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__BroadcastScalarToVector256Single testClass) - { - var result = Avx2.BroadcastScalarToVector256(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__BroadcastScalarToVector256Single testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__BroadcastScalarToVector256Single() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__BroadcastScalarToVector256Single() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.BroadcastScalarToVector256( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector256( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.BroadcastScalarToVector256( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.BroadcastScalarToVector256( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse.LoadVector128((Single*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Avx2.BroadcastScalarToVector256(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector256(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector256(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256Single(); - var result = Avx2.BroadcastScalarToVector256(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256Single(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.BroadcastScalarToVector256(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector256(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector256( - Sse.LoadVector128((Single*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[i]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector256)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.UInt16.cs deleted file mode 100644 index 356f94ec7295..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.UInt16.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector256UInt16() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256UInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector256UInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__BroadcastScalarToVector256UInt16 testClass) - { - var result = Avx2.BroadcastScalarToVector256(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__BroadcastScalarToVector256UInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((UInt16*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__BroadcastScalarToVector256UInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__BroadcastScalarToVector256UInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.BroadcastScalarToVector256( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.BroadcastScalarToVector256( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((UInt16*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Avx2.BroadcastScalarToVector256(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector256(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector256(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256UInt16(); - var result = Avx2.BroadcastScalarToVector256(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256UInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((UInt16*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.BroadcastScalarToVector256(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((UInt16*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector256(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((UInt16*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(UInt16[] firstOp, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((firstOp[0] != result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector256)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.UInt32.cs deleted file mode 100644 index 7b326c65386f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.UInt32.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector256UInt32() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256UInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector256UInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__BroadcastScalarToVector256UInt32 testClass) - { - var result = Avx2.BroadcastScalarToVector256(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__BroadcastScalarToVector256UInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((UInt32*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__BroadcastScalarToVector256UInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__BroadcastScalarToVector256UInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.BroadcastScalarToVector256( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.BroadcastScalarToVector256( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((UInt32*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Avx2.BroadcastScalarToVector256(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector256(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector256(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256UInt32(); - var result = Avx2.BroadcastScalarToVector256(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256UInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((UInt32*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.BroadcastScalarToVector256(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((UInt32*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector256(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((UInt32*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(UInt32[] firstOp, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((firstOp[0] != result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector256)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.UInt64.cs deleted file mode 100644 index 0edfaf2c5bf3..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.UInt64.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector256UInt64() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256UInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector256UInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt64[] inArray1, UInt64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__BroadcastScalarToVector256UInt64 testClass) - { - var result = Avx2.BroadcastScalarToVector256(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__BroadcastScalarToVector256UInt64 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((UInt64*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__BroadcastScalarToVector256UInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__BroadcastScalarToVector256UInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new DataTable(_data1, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.BroadcastScalarToVector256( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.BroadcastScalarToVector256( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((UInt64*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Avx2.BroadcastScalarToVector256(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector256(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)); - var result = Avx2.BroadcastScalarToVector256(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256UInt64(); - var result = Avx2.BroadcastScalarToVector256(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256UInt64(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((UInt64*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.BroadcastScalarToVector256(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((UInt64*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector256(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.BroadcastScalarToVector256( - Sse2.LoadVector128((UInt64*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(UInt64[] firstOp, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((firstOp[0] != result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector256)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.Byte.cs deleted file mode 100644 index b599def1bb08..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.Byte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareEqualByte() - { - var test = new SimpleBinaryOpTest__CompareEqualByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareEqualByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareEqualByte testClass) - { - var result = Avx2.CompareEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareEqualByte testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.CompareEqual( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareEqualByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareEqualByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.CompareEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.CompareEqual( - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.CompareEqual( - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.CompareEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.CompareEqual( - Avx.LoadVector256((Byte*)(pClsVar1)), - Avx.LoadVector256((Byte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)); - var result = Avx2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)); - var result = Avx2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareEqualByte(); - var result = Avx2.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareEqualByte(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.CompareEqual( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.CompareEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.CompareEqual( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.CompareEqual( - Avx.LoadVector256((Byte*)(&test._fld1)), - Avx.LoadVector256((Byte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((left[0] == right[0]) ? unchecked((byte)(-1)) : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((left[i] == right[i]) ? unchecked((byte)(-1)) : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.CompareEqual)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.Int16.cs deleted file mode 100644 index 4da2341700f5..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.Int16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareEqualInt16() - { - var test = new SimpleBinaryOpTest__CompareEqualInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareEqualInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareEqualInt16 testClass) - { - var result = Avx2.CompareEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareEqualInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.CompareEqual( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareEqualInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareEqualInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.CompareEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.CompareEqual( - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.CompareEqual( - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.CompareEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.CompareEqual( - Avx.LoadVector256((Int16*)(pClsVar1)), - Avx.LoadVector256((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareEqualInt16(); - var result = Avx2.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareEqualInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.CompareEqual( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.CompareEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.CompareEqual( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.CompareEqual( - Avx.LoadVector256((Int16*)(&test._fld1)), - Avx.LoadVector256((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((left[0] == right[0]) ? unchecked((short)(-1)) : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((left[i] == right[i]) ? unchecked((short)(-1)) : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.CompareEqual)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.Int32.cs deleted file mode 100644 index 1562434de84e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.Int32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareEqualInt32() - { - var test = new SimpleBinaryOpTest__CompareEqualInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareEqualInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareEqualInt32 testClass) - { - var result = Avx2.CompareEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareEqualInt32 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.CompareEqual( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareEqualInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareEqualInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.CompareEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.CompareEqual( - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.CompareEqual( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.CompareEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.CompareEqual( - Avx.LoadVector256((Int32*)(pClsVar1)), - Avx.LoadVector256((Int32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareEqualInt32(); - var result = Avx2.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareEqualInt32(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.CompareEqual( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.CompareEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.CompareEqual( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.CompareEqual( - Avx.LoadVector256((Int32*)(&test._fld1)), - Avx.LoadVector256((Int32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((left[0] == right[0]) ? unchecked((int)(-1)) : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((left[i] == right[i]) ? unchecked((int)(-1)) : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.CompareEqual)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.Int64.cs deleted file mode 100644 index 559c1a0f90da..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.Int64.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareEqualInt64() - { - var test = new SimpleBinaryOpTest__CompareEqualInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareEqualInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int64[] inArray1, Int64[] inArray2, Int64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareEqualInt64 testClass) - { - var result = Avx2.CompareEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareEqualInt64 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.CompareEqual( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareEqualInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareEqualInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.CompareEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.CompareEqual( - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.CompareEqual( - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.CompareEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.CompareEqual( - Avx.LoadVector256((Int64*)(pClsVar1)), - Avx.LoadVector256((Int64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareEqualInt64(); - var result = Avx2.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareEqualInt64(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.CompareEqual( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.CompareEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.CompareEqual( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.CompareEqual( - Avx.LoadVector256((Int64*)(&test._fld1)), - Avx.LoadVector256((Int64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((left[0] == right[0]) ? unchecked((long)(-1)) : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((left[i] == right[i]) ? unchecked((long)(-1)) : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.CompareEqual)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.SByte.cs deleted file mode 100644 index 3849137b4cb6..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.SByte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareEqualSByte() - { - var test = new SimpleBinaryOpTest__CompareEqualSByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareEqualSByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareEqualSByte testClass) - { - var result = Avx2.CompareEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareEqualSByte testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.CompareEqual( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareEqualSByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareEqualSByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.CompareEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.CompareEqual( - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.CompareEqual( - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.CompareEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.CompareEqual( - Avx.LoadVector256((SByte*)(pClsVar1)), - Avx.LoadVector256((SByte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareEqualSByte(); - var result = Avx2.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareEqualSByte(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.CompareEqual( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.CompareEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.CompareEqual( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.CompareEqual( - Avx.LoadVector256((SByte*)(&test._fld1)), - Avx.LoadVector256((SByte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((left[0] == right[0]) ? unchecked((sbyte)(-1)) : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((left[i] == right[i]) ? unchecked((sbyte)(-1)) : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.CompareEqual)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.UInt16.cs deleted file mode 100644 index 6c138b8db264..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.UInt16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareEqualUInt16() - { - var test = new SimpleBinaryOpTest__CompareEqualUInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareEqualUInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareEqualUInt16 testClass) - { - var result = Avx2.CompareEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareEqualUInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.CompareEqual( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareEqualUInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareEqualUInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.CompareEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.CompareEqual( - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.CompareEqual( - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.CompareEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.CompareEqual( - Avx.LoadVector256((UInt16*)(pClsVar1)), - Avx.LoadVector256((UInt16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareEqualUInt16(); - var result = Avx2.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareEqualUInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.CompareEqual( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.CompareEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.CompareEqual( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.CompareEqual( - Avx.LoadVector256((UInt16*)(&test._fld1)), - Avx.LoadVector256((UInt16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((left[0] == right[0]) ? unchecked((ushort)(-1)) : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((left[i] == right[i]) ? unchecked((ushort)(-1)) : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.CompareEqual)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.UInt32.cs deleted file mode 100644 index d4e716e5646d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.UInt32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareEqualUInt32() - { - var test = new SimpleBinaryOpTest__CompareEqualUInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareEqualUInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareEqualUInt32 testClass) - { - var result = Avx2.CompareEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareEqualUInt32 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.CompareEqual( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareEqualUInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareEqualUInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.CompareEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.CompareEqual( - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.CompareEqual( - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.CompareEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.CompareEqual( - Avx.LoadVector256((UInt32*)(pClsVar1)), - Avx.LoadVector256((UInt32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareEqualUInt32(); - var result = Avx2.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareEqualUInt32(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.CompareEqual( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.CompareEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.CompareEqual( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.CompareEqual( - Avx.LoadVector256((UInt32*)(&test._fld1)), - Avx.LoadVector256((UInt32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((left[0] == right[0]) ? unchecked((uint)(-1)) : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((left[i] == right[i]) ? unchecked((uint)(-1)) : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.CompareEqual)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.UInt64.cs deleted file mode 100644 index c3f96c18ffc8..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.UInt64.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareEqualUInt64() - { - var test = new SimpleBinaryOpTest__CompareEqualUInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareEqualUInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt64[] inArray1, UInt64[] inArray2, UInt64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareEqualUInt64 testClass) - { - var result = Avx2.CompareEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareEqualUInt64 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.CompareEqual( - Avx.LoadVector256((UInt64*)(pFld1)), - Avx.LoadVector256((UInt64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareEqualUInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareEqualUInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.CompareEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.CompareEqual( - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.CompareEqual( - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareEqual), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.CompareEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.CompareEqual( - Avx.LoadVector256((UInt64*)(pClsVar1)), - Avx.LoadVector256((UInt64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareEqualUInt64(); - var result = Avx2.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareEqualUInt64(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.CompareEqual( - Avx.LoadVector256((UInt64*)(pFld1)), - Avx.LoadVector256((UInt64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.CompareEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.CompareEqual( - Avx.LoadVector256((UInt64*)(pFld1)), - Avx.LoadVector256((UInt64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.CompareEqual( - Avx.LoadVector256((UInt64*)(&test._fld1)), - Avx.LoadVector256((UInt64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt64[] left, UInt64[] right, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((left[0] == right[0]) ? unchecked((ulong)(-1)) : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((left[i] == right[i]) ? unchecked((ulong)(-1)) : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.CompareEqual)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareGreaterThan.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareGreaterThan.Int16.cs deleted file mode 100644 index 49cf008efc99..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareGreaterThan.Int16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareGreaterThanInt16() - { - var test = new SimpleBinaryOpTest__CompareGreaterThanInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareGreaterThanInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareGreaterThanInt16 testClass) - { - var result = Avx2.CompareGreaterThan(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareGreaterThanInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.CompareGreaterThan( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareGreaterThanInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareGreaterThanInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.CompareGreaterThan( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.CompareGreaterThan( - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.CompareGreaterThan( - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareGreaterThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareGreaterThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareGreaterThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.CompareGreaterThan( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.CompareGreaterThan( - Avx.LoadVector256((Int16*)(pClsVar1)), - Avx.LoadVector256((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareGreaterThanInt16(); - var result = Avx2.CompareGreaterThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareGreaterThanInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.CompareGreaterThan( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.CompareGreaterThan(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.CompareGreaterThan( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.CompareGreaterThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.CompareGreaterThan( - Avx.LoadVector256((Int16*)(&test._fld1)), - Avx.LoadVector256((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((left[0] > right[0]) ? unchecked((short)(-1)) : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((left[i] > right[i]) ? unchecked((short)(-1)) : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.CompareGreaterThan)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareGreaterThan.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareGreaterThan.Int32.cs deleted file mode 100644 index 4ec03418ae6d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareGreaterThan.Int32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareGreaterThanInt32() - { - var test = new SimpleBinaryOpTest__CompareGreaterThanInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareGreaterThanInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareGreaterThanInt32 testClass) - { - var result = Avx2.CompareGreaterThan(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareGreaterThanInt32 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.CompareGreaterThan( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareGreaterThanInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareGreaterThanInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.CompareGreaterThan( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.CompareGreaterThan( - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.CompareGreaterThan( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareGreaterThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareGreaterThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareGreaterThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.CompareGreaterThan( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.CompareGreaterThan( - Avx.LoadVector256((Int32*)(pClsVar1)), - Avx.LoadVector256((Int32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareGreaterThanInt32(); - var result = Avx2.CompareGreaterThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareGreaterThanInt32(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.CompareGreaterThan( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.CompareGreaterThan(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.CompareGreaterThan( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.CompareGreaterThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.CompareGreaterThan( - Avx.LoadVector256((Int32*)(&test._fld1)), - Avx.LoadVector256((Int32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((left[0] > right[0]) ? unchecked((int)(-1)) : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((left[i] > right[i]) ? unchecked((int)(-1)) : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.CompareGreaterThan)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareGreaterThan.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareGreaterThan.Int64.cs deleted file mode 100644 index db455971ff13..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareGreaterThan.Int64.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareGreaterThanInt64() - { - var test = new SimpleBinaryOpTest__CompareGreaterThanInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareGreaterThanInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int64[] inArray1, Int64[] inArray2, Int64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareGreaterThanInt64 testClass) - { - var result = Avx2.CompareGreaterThan(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareGreaterThanInt64 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.CompareGreaterThan( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareGreaterThanInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareGreaterThanInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.CompareGreaterThan( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.CompareGreaterThan( - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.CompareGreaterThan( - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareGreaterThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareGreaterThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareGreaterThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.CompareGreaterThan( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.CompareGreaterThan( - Avx.LoadVector256((Int64*)(pClsVar1)), - Avx.LoadVector256((Int64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx2.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx2.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareGreaterThanInt64(); - var result = Avx2.CompareGreaterThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareGreaterThanInt64(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.CompareGreaterThan( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.CompareGreaterThan(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.CompareGreaterThan( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.CompareGreaterThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.CompareGreaterThan( - Avx.LoadVector256((Int64*)(&test._fld1)), - Avx.LoadVector256((Int64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((left[0] > right[0]) ? unchecked((long)(-1)) : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((left[i] > right[i]) ? unchecked((long)(-1)) : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.CompareGreaterThan)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareGreaterThan.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareGreaterThan.SByte.cs deleted file mode 100644 index 62f187ddfe50..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareGreaterThan.SByte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareGreaterThanSByte() - { - var test = new SimpleBinaryOpTest__CompareGreaterThanSByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareGreaterThanSByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareGreaterThanSByte testClass) - { - var result = Avx2.CompareGreaterThan(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareGreaterThanSByte testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.CompareGreaterThan( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareGreaterThanSByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareGreaterThanSByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.CompareGreaterThan( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.CompareGreaterThan( - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.CompareGreaterThan( - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareGreaterThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareGreaterThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.CompareGreaterThan), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.CompareGreaterThan( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.CompareGreaterThan( - Avx.LoadVector256((SByte*)(pClsVar1)), - Avx.LoadVector256((SByte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx2.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx2.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareGreaterThanSByte(); - var result = Avx2.CompareGreaterThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareGreaterThanSByte(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.CompareGreaterThan( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.CompareGreaterThan(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.CompareGreaterThan( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.CompareGreaterThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.CompareGreaterThan( - Avx.LoadVector256((SByte*)(&test._fld1)), - Avx.LoadVector256((SByte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((left[0] > right[0]) ? unchecked((sbyte)(-1)) : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((left[i] > right[i]) ? unchecked((sbyte)(-1)) : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.CompareGreaterThan)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Byte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Byte.1.cs deleted file mode 100644 index ded175572502..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Byte.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ExtractVector128Byte1() - { - var test = new ExtractVector128Test__ExtractVector128Byte1(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ExtractVector128Test__ExtractVector128Byte1 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ExtractVector128Test__ExtractVector128Byte1 testClass) - { - var result = Avx2.ExtractVector128(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data = new Byte[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ExtractVector128Test__ExtractVector128Byte1() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ExtractVector128Test__ExtractVector128Byte1() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ExtractVector128( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ExtractVector128( - Avx.LoadVector256((Byte*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ExtractVector128( - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Byte*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ExtractVector128( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Byte*)(_dataTable.inArrayPtr)); - var result = Avx2.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArrayPtr)); - var result = Avx2.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ExtractVector128Test__ExtractVector128Byte1(); - var result = Avx2.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ExtractVector128(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray = new Byte[Op1ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray = new Byte[Op1ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Byte[] firstOp, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != firstOp[16]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((result[i] != firstOp[i + 16])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ExtractVector128)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Int16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Int16.1.cs deleted file mode 100644 index 8138d7aa3caa..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Int16.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ExtractVector128Int161() - { - var test = new ExtractVector128Test__ExtractVector128Int161(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ExtractVector128Test__ExtractVector128Int161 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ExtractVector128Test__ExtractVector128Int161 testClass) - { - var result = Avx2.ExtractVector128(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data = new Int16[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ExtractVector128Test__ExtractVector128Int161() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ExtractVector128Test__ExtractVector128Int161() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ExtractVector128( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ExtractVector128( - Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ExtractVector128( - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ExtractVector128( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)); - var result = Avx2.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)); - var result = Avx2.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ExtractVector128Test__ExtractVector128Int161(); - var result = Avx2.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ExtractVector128(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int16[] firstOp, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != firstOp[8]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((result[i] != firstOp[i + 8])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ExtractVector128)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Int32.1.cs deleted file mode 100644 index 794ad807e8a5..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Int32.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ExtractVector128Int321() - { - var test = new ExtractVector128Test__ExtractVector128Int321(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ExtractVector128Test__ExtractVector128Int321 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ExtractVector128Test__ExtractVector128Int321 testClass) - { - var result = Avx2.ExtractVector128(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data = new Int32[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ExtractVector128Test__ExtractVector128Int321() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ExtractVector128Test__ExtractVector128Int321() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ExtractVector128( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ExtractVector128( - Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ExtractVector128( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ExtractVector128( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)); - var result = Avx2.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)); - var result = Avx2.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ExtractVector128Test__ExtractVector128Int321(); - var result = Avx2.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ExtractVector128(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int32[] firstOp, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != firstOp[4]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((result[i] != firstOp[i + 4])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ExtractVector128)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Int64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Int64.1.cs deleted file mode 100644 index 42612f8e5865..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Int64.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ExtractVector128Int641() - { - var test = new ExtractVector128Test__ExtractVector128Int641(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ExtractVector128Test__ExtractVector128Int641 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ExtractVector128Test__ExtractVector128Int641 testClass) - { - var result = Avx2.ExtractVector128(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data = new Int64[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ExtractVector128Test__ExtractVector128Int641() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ExtractVector128Test__ExtractVector128Int641() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ExtractVector128( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ExtractVector128( - Avx.LoadVector256((Int64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ExtractVector128( - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ExtractVector128( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Int64*)(_dataTable.inArrayPtr)); - var result = Avx2.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArrayPtr)); - var result = Avx2.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ExtractVector128Test__ExtractVector128Int641(); - var result = Avx2.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ExtractVector128(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int64[] firstOp, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != firstOp[2]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((result[i] != firstOp[i + 2])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ExtractVector128)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.SByte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.SByte.1.cs deleted file mode 100644 index 6685149df9cd..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.SByte.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ExtractVector128SByte1() - { - var test = new ExtractVector128Test__ExtractVector128SByte1(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ExtractVector128Test__ExtractVector128SByte1 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ExtractVector128Test__ExtractVector128SByte1 testClass) - { - var result = Avx2.ExtractVector128(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data = new SByte[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ExtractVector128Test__ExtractVector128SByte1() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ExtractVector128Test__ExtractVector128SByte1() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ExtractVector128( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ExtractVector128( - Avx.LoadVector256((SByte*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ExtractVector128( - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((SByte*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ExtractVector128( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((SByte*)(_dataTable.inArrayPtr)); - var result = Avx2.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArrayPtr)); - var result = Avx2.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ExtractVector128Test__ExtractVector128SByte1(); - var result = Avx2.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ExtractVector128(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray = new SByte[Op1ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray = new SByte[Op1ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(SByte[] firstOp, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != firstOp[16]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((result[i] != firstOp[i + 16])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ExtractVector128)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.UInt16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.UInt16.1.cs deleted file mode 100644 index 9ca7944a582c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.UInt16.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ExtractVector128UInt161() - { - var test = new ExtractVector128Test__ExtractVector128UInt161(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ExtractVector128Test__ExtractVector128UInt161 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ExtractVector128Test__ExtractVector128UInt161 testClass) - { - var result = Avx2.ExtractVector128(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data = new UInt16[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ExtractVector128Test__ExtractVector128UInt161() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ExtractVector128Test__ExtractVector128UInt161() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ExtractVector128( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ExtractVector128( - Avx.LoadVector256((UInt16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ExtractVector128( - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ExtractVector128( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((UInt16*)(_dataTable.inArrayPtr)); - var result = Avx2.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArrayPtr)); - var result = Avx2.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ExtractVector128Test__ExtractVector128UInt161(); - var result = Avx2.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ExtractVector128(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt16[] firstOp, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != firstOp[8]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((result[i] != firstOp[i + 8])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ExtractVector128)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.UInt32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.UInt32.1.cs deleted file mode 100644 index d387188e2b2a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.UInt32.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ExtractVector128UInt321() - { - var test = new ExtractVector128Test__ExtractVector128UInt321(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ExtractVector128Test__ExtractVector128UInt321 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ExtractVector128Test__ExtractVector128UInt321 testClass) - { - var result = Avx2.ExtractVector128(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data = new UInt32[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ExtractVector128Test__ExtractVector128UInt321() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ExtractVector128Test__ExtractVector128UInt321() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ExtractVector128( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ExtractVector128( - Avx.LoadVector256((UInt32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ExtractVector128( - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ExtractVector128( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((UInt32*)(_dataTable.inArrayPtr)); - var result = Avx2.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArrayPtr)); - var result = Avx2.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ExtractVector128Test__ExtractVector128UInt321(); - var result = Avx2.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ExtractVector128(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt32[] firstOp, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != firstOp[4]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((result[i] != firstOp[i + 4])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ExtractVector128)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.UInt64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.UInt64.1.cs deleted file mode 100644 index d77b4f22f2ed..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.UInt64.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ExtractVector128UInt641() - { - var test = new ExtractVector128Test__ExtractVector128UInt641(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ExtractVector128Test__ExtractVector128UInt641 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ExtractVector128Test__ExtractVector128UInt641 testClass) - { - var result = Avx2.ExtractVector128(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data = new UInt64[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ExtractVector128Test__ExtractVector128UInt641() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ExtractVector128Test__ExtractVector128UInt641() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ExtractVector128( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ExtractVector128( - Avx.LoadVector256((UInt64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ExtractVector128( - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ExtractVector128), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ExtractVector128( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((UInt64*)(_dataTable.inArrayPtr)); - var result = Avx2.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArrayPtr)); - var result = Avx2.ExtractVector128(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ExtractVector128Test__ExtractVector128UInt641(); - var result = Avx2.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ExtractVector128(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ExtractVector128(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt64[] firstOp, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != firstOp[2]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((result[i] != firstOp[i + 2])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ExtractVector128)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/HorizontalAdd.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/HorizontalAdd.cs deleted file mode 100644 index 3abe47f0d523..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/HorizontalAdd.cs +++ /dev/null @@ -1,128 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Avx2.IsSupported) - { - using (TestTable shortTable = new TestTable(new short[16] { 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0 }, new short[16] { 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0}, new short[16])) - using (TestTable intTable = new TestTable(new int[8] { 1, 5, 100, 0, 1, 5, 100, 0 }, new int[8] { 22, 1, 50, 0, 22, 1, 50, 0 }, new int[8])) - { - var vs1 = Unsafe.Read>(shortTable.inArray1Ptr); - var vs2 = Unsafe.Read>(shortTable.inArray2Ptr); - var vs3 = Avx2.HorizontalAdd(vs1, vs2); - Unsafe.Write(shortTable.outArrayPtr, vs3); - - var vi1 = Unsafe.Read>(intTable.inArray1Ptr); - var vi2 = Unsafe.Read>(intTable.inArray2Ptr); - var vi3 = Avx2.HorizontalAdd(vi1, vi2); - Unsafe.Write(intTable.outArrayPtr, vi3); - - if ((shortTable.inArray1[1] + shortTable.inArray1[0] != shortTable.outArray[0]) || - (shortTable.inArray1[3] + shortTable.inArray1[2] != shortTable.outArray[1]) || - (shortTable.inArray1[5] + shortTable.inArray1[4] != shortTable.outArray[2]) || - (shortTable.inArray1[7] + shortTable.inArray1[6] != shortTable.outArray[3]) || - (shortTable.inArray2[1] + shortTable.inArray2[0] != shortTable.outArray[4]) || - (shortTable.inArray2[3] + shortTable.inArray2[2] != shortTable.outArray[5]) || - (shortTable.inArray2[5] + shortTable.inArray2[4] != shortTable.outArray[6]) || - (shortTable.inArray2[7] + shortTable.inArray2[6] != shortTable.outArray[7]) || - (shortTable.inArray1[9] + shortTable.inArray1[8] != shortTable.outArray[8]) || - (shortTable.inArray1[11] + shortTable.inArray1[10] !=shortTable.outArray[9]) || - (shortTable.inArray1[13] + shortTable.inArray1[12] !=shortTable.outArray[10]) || - (shortTable.inArray1[15] + shortTable.inArray1[14] !=shortTable.outArray[11]) || - (shortTable.inArray2[9] + shortTable.inArray2[8] !=shortTable.outArray[12]) || - (shortTable.inArray2[11] + shortTable.inArray2[10] !=shortTable.outArray[13]) || - (shortTable.inArray2[13] + shortTable.inArray2[12] !=shortTable.outArray[14]) || - (shortTable.inArray2[15] + shortTable.inArray2[14] !=shortTable.outArray[15])) - { - Console.WriteLine("AVX2 HorizontalAdd failed on short:"); - - testResult = Fail; - - } - - if ((intTable.inArray1[1] + intTable.inArray1[0] != intTable.outArray[0]) || - (intTable.inArray1[3] + intTable.inArray1[2] != intTable.outArray[1]) || - (intTable.inArray2[1] + intTable.inArray2[0] != intTable.outArray[2]) || - (intTable.inArray2[3] + intTable.inArray2[2] != intTable.outArray[3]) || - (intTable.inArray1[5] + intTable.inArray1[4] != intTable.outArray[4]) || - (intTable.inArray1[7] + intTable.inArray1[6] != intTable.outArray[5]) || - (intTable.inArray2[5] + intTable.inArray2[4] != intTable.outArray[6]) || - (intTable.inArray2[7] + intTable.inArray2[6] != intTable.outArray[7])) - - { - Console.WriteLine("AVX2 HorizontalAdd failed on int:"); - - testResult = Fail; - - } - - - } - } - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T1 : struct where T2 : struct where T3 : struct - { - public T1[] inArray1; - public T2[] inArray2; - public T3[] outArray; - - public void* inArray1Ptr => inHandle1.AddrOfPinnedObject().ToPointer(); - public void* inArray2Ptr => inHandle2.AddrOfPinnedObject().ToPointer(); - public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); - - GCHandle inHandle1; - GCHandle inHandle2; - GCHandle outHandle; - public TestTable(T1[] a, T2[] b, T3[] c) - { - this.inArray1 = a; - this.inArray2 = b; - this.outArray = c; - - inHandle1 = GCHandle.Alloc(inArray1, GCHandleType.Pinned); - inHandle2 = GCHandle.Alloc(inArray2, GCHandleType.Pinned); - outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); - } - public bool CheckResult(Func check) - { - for (int i = 0; i < inArray1.Length; i++) - { - if (!check(inArray1[i], inArray2[i], outArray[i])) - { - return false; - } - } - return true; - } - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - } - - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/HorizontalSubtract.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/HorizontalSubtract.cs deleted file mode 100644 index 2f11be690692..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/HorizontalSubtract.cs +++ /dev/null @@ -1,128 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Avx2.IsSupported) - { - using (TestTable shortTable = new TestTable(new short[16] { 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0 }, new short[16] { 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0}, new short[16])) - using (TestTable intTable = new TestTable(new int[8] { 1, 5, 100, 0, 1, 5, 100, 0 }, new int[8] { 22, 1, 50, 0, 22, 1, 50, 0 }, new int[8])) - { - var vs1 = Unsafe.Read>(shortTable.inArray1Ptr); - var vs2 = Unsafe.Read>(shortTable.inArray2Ptr); - var vs3 = Avx2.HorizontalSubtract(vs1, vs2); - Unsafe.Write(shortTable.outArrayPtr, vs3); - - var vi1 = Unsafe.Read>(intTable.inArray1Ptr); - var vi2 = Unsafe.Read>(intTable.inArray2Ptr); - var vi3 = Avx2.HorizontalSubtract(vi1, vi2); - Unsafe.Write(intTable.outArrayPtr, vi3); - - if ((shortTable.inArray1[0] - shortTable.inArray1[1] != shortTable.outArray[0]) || - (shortTable.inArray1[2] - shortTable.inArray1[3] != shortTable.outArray[1]) || - (shortTable.inArray1[4] - shortTable.inArray1[5] != shortTable.outArray[2]) || - (shortTable.inArray1[6] - shortTable.inArray1[7] != shortTable.outArray[3]) || - (shortTable.inArray2[0] - shortTable.inArray2[1] != shortTable.outArray[4]) || - (shortTable.inArray2[2] - shortTable.inArray2[3] != shortTable.outArray[5]) || - (shortTable.inArray2[4] - shortTable.inArray2[5] != shortTable.outArray[6]) || - (shortTable.inArray2[6] - shortTable.inArray2[7] != shortTable.outArray[7]) || - (shortTable.inArray1[8] - shortTable.inArray1[9] != shortTable.outArray[8]) || - (shortTable.inArray1[10] - shortTable.inArray1[11] !=shortTable.outArray[9]) || - (shortTable.inArray1[12] - shortTable.inArray1[13] !=shortTable.outArray[10]) || - (shortTable.inArray1[14] - shortTable.inArray1[15] !=shortTable.outArray[11]) || - (shortTable.inArray2[8] - shortTable.inArray2[9] !=shortTable.outArray[12]) || - (shortTable.inArray2[10] - shortTable.inArray2[11] !=shortTable.outArray[13]) || - (shortTable.inArray2[12] - shortTable.inArray2[13] !=shortTable.outArray[14]) || - (shortTable.inArray2[14] - shortTable.inArray2[15] !=shortTable.outArray[15])) - { - Console.WriteLine("AVX2 HorizontalSubtract failed on short:"); - - testResult = Fail; - - } - - if ((intTable.inArray1[0] - intTable.inArray1[1] != intTable.outArray[0]) || - (intTable.inArray1[2] - intTable.inArray1[3] != intTable.outArray[1]) || - (intTable.inArray2[0] - intTable.inArray2[1] != intTable.outArray[2]) || - (intTable.inArray2[2] - intTable.inArray2[3] != intTable.outArray[3]) || - (intTable.inArray1[4] - intTable.inArray1[5] != intTable.outArray[4]) || - (intTable.inArray1[6] - intTable.inArray1[7] != intTable.outArray[5]) || - (intTable.inArray2[4] - intTable.inArray2[5] != intTable.outArray[6]) || - (intTable.inArray2[6] - intTable.inArray2[7] != intTable.outArray[7])) - - { - Console.WriteLine("AVX2 HorizontalSubtract failed on int:"); - - testResult = Fail; - - } - - - } - } - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T1 : struct where T2 : struct where T3 : struct - { - public T1[] inArray1; - public T2[] inArray2; - public T3[] outArray; - - public void* inArray1Ptr => inHandle1.AddrOfPinnedObject().ToPointer(); - public void* inArray2Ptr => inHandle2.AddrOfPinnedObject().ToPointer(); - public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); - - GCHandle inHandle1; - GCHandle inHandle2; - GCHandle outHandle; - public TestTable(T1[] a, T2[] b, T3[] c) - { - this.inArray1 = a; - this.inArray2 = b; - this.outArray = c; - - inHandle1 = GCHandle.Alloc(inArray1, GCHandleType.Pinned); - inHandle2 = GCHandle.Alloc(inArray2, GCHandleType.Pinned); - outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); - } - public bool CheckResult(Func check) - { - for (int i = 0; i < inArray1.Length; i++) - { - if (!check(inArray1[i], inArray2[i], outArray[i])) - { - return false; - } - } - return true; - } - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - } - - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Byte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Byte.1.cs deleted file mode 100644 index a68a02681dbd..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Byte.1.cs +++ /dev/null @@ -1,421 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; -using static System.Runtime.Intrinsics.X86.Sse; -using static System.Runtime.Intrinsics.X86.Sse2; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void InsertVector128Byte1() - { - var test = new InsertVector128Test__InsertVector128Byte1(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class InsertVector128Test__InsertVector128Byte1 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(InsertVector128Test__InsertVector128Byte1 testClass) - { - var result = Avx2.InsertVector128(_fld1, _fld2, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector128 _clsVar2; - - private Vector256 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static InsertVector128Test__InsertVector128Byte1() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public InsertVector128Test__InsertVector128Byte1() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.InsertVector128( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.InsertVector128( - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - LoadVector128((Byte*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.InsertVector128( - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - LoadVector128((Byte*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.InsertVector128( - _clsVar1, - _clsVar2, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)); - var right = LoadVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = Avx2.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)); - var right = LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = Avx2.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new InsertVector128Test__InsertVector128Byte1(); - var result = Avx2.InsertVector128(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.InsertVector128(_fld1, _fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.InsertVector128(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != left[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((i > 15 ? result[i] != right[i - 16] : result[i] != left[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.InsertVector128)}(Vector256, Vector128.1): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Int16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Int16.1.cs deleted file mode 100644 index fd550d222b3d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Int16.1.cs +++ /dev/null @@ -1,421 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; -using static System.Runtime.Intrinsics.X86.Sse; -using static System.Runtime.Intrinsics.X86.Sse2; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void InsertVector128Int161() - { - var test = new InsertVector128Test__InsertVector128Int161(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class InsertVector128Test__InsertVector128Int161 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(InsertVector128Test__InsertVector128Int161 testClass) - { - var result = Avx2.InsertVector128(_fld1, _fld2, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector128 _clsVar2; - - private Vector256 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static InsertVector128Test__InsertVector128Int161() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public InsertVector128Test__InsertVector128Int161() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.InsertVector128( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.InsertVector128( - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - LoadVector128((Int16*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.InsertVector128( - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - LoadVector128((Int16*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.InsertVector128( - _clsVar1, - _clsVar2, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)); - var right = LoadVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)); - var right = LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new InsertVector128Test__InsertVector128Int161(); - var result = Avx2.InsertVector128(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.InsertVector128(_fld1, _fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.InsertVector128(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != left[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((i > 7 ? result[i] != right[i - 8] : result[i] != left[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.InsertVector128)}(Vector256, Vector128.1): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Int32.1.cs deleted file mode 100644 index 4d9419e070ff..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Int32.1.cs +++ /dev/null @@ -1,421 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; -using static System.Runtime.Intrinsics.X86.Sse; -using static System.Runtime.Intrinsics.X86.Sse2; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void InsertVector128Int321() - { - var test = new InsertVector128Test__InsertVector128Int321(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class InsertVector128Test__InsertVector128Int321 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(InsertVector128Test__InsertVector128Int321 testClass) - { - var result = Avx2.InsertVector128(_fld1, _fld2, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector128 _clsVar2; - - private Vector256 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static InsertVector128Test__InsertVector128Int321() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public InsertVector128Test__InsertVector128Int321() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.InsertVector128( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.InsertVector128( - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - LoadVector128((Int32*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.InsertVector128( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - LoadVector128((Int32*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.InsertVector128( - _clsVar1, - _clsVar2, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)); - var right = LoadVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)); - var right = LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new InsertVector128Test__InsertVector128Int321(); - var result = Avx2.InsertVector128(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.InsertVector128(_fld1, _fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.InsertVector128(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != left[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((i > 3 ? result[i] != right[i - 4] : result[i] != left[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.InsertVector128)}(Vector256, Vector128.1): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Int64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Int64.1.cs deleted file mode 100644 index 3223a1bbca53..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Int64.1.cs +++ /dev/null @@ -1,421 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; -using static System.Runtime.Intrinsics.X86.Sse; -using static System.Runtime.Intrinsics.X86.Sse2; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void InsertVector128Int641() - { - var test = new InsertVector128Test__InsertVector128Int641(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class InsertVector128Test__InsertVector128Int641 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(InsertVector128Test__InsertVector128Int641 testClass) - { - var result = Avx2.InsertVector128(_fld1, _fld2, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector128 _clsVar2; - - private Vector256 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static InsertVector128Test__InsertVector128Int641() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public InsertVector128Test__InsertVector128Int641() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.InsertVector128( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.InsertVector128( - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - LoadVector128((Int64*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.InsertVector128( - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - LoadVector128((Int64*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.InsertVector128( - _clsVar1, - _clsVar2, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)); - var right = LoadVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx2.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)); - var right = LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx2.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new InsertVector128Test__InsertVector128Int641(); - var result = Avx2.InsertVector128(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.InsertVector128(_fld1, _fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.InsertVector128(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != left[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((i > 1 ? result[i] != right[i - 2] : result[i] != left[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.InsertVector128)}(Vector256, Vector128.1): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.SByte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.SByte.1.cs deleted file mode 100644 index ee1d4b1a05ab..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.SByte.1.cs +++ /dev/null @@ -1,421 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; -using static System.Runtime.Intrinsics.X86.Sse; -using static System.Runtime.Intrinsics.X86.Sse2; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void InsertVector128SByte1() - { - var test = new InsertVector128Test__InsertVector128SByte1(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class InsertVector128Test__InsertVector128SByte1 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(InsertVector128Test__InsertVector128SByte1 testClass) - { - var result = Avx2.InsertVector128(_fld1, _fld2, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector128 _clsVar2; - - private Vector256 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static InsertVector128Test__InsertVector128SByte1() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public InsertVector128Test__InsertVector128SByte1() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.InsertVector128( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.InsertVector128( - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - LoadVector128((SByte*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.InsertVector128( - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - LoadVector128((SByte*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.InsertVector128( - _clsVar1, - _clsVar2, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)); - var right = LoadVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx2.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)); - var right = LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx2.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new InsertVector128Test__InsertVector128SByte1(); - var result = Avx2.InsertVector128(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.InsertVector128(_fld1, _fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.InsertVector128(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != left[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((i > 15 ? result[i] != right[i - 16] : result[i] != left[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.InsertVector128)}(Vector256, Vector128.1): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.UInt16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.UInt16.1.cs deleted file mode 100644 index ca90995b9be4..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.UInt16.1.cs +++ /dev/null @@ -1,421 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; -using static System.Runtime.Intrinsics.X86.Sse; -using static System.Runtime.Intrinsics.X86.Sse2; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void InsertVector128UInt161() - { - var test = new InsertVector128Test__InsertVector128UInt161(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class InsertVector128Test__InsertVector128UInt161 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(InsertVector128Test__InsertVector128UInt161 testClass) - { - var result = Avx2.InsertVector128(_fld1, _fld2, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector128 _clsVar2; - - private Vector256 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static InsertVector128Test__InsertVector128UInt161() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public InsertVector128Test__InsertVector128UInt161() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.InsertVector128( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.InsertVector128( - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - LoadVector128((UInt16*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.InsertVector128( - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - LoadVector128((UInt16*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.InsertVector128( - _clsVar1, - _clsVar2, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)); - var right = LoadVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx2.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)); - var right = LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx2.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new InsertVector128Test__InsertVector128UInt161(); - var result = Avx2.InsertVector128(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.InsertVector128(_fld1, _fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.InsertVector128(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != left[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((i > 7 ? result[i] != right[i - 8] : result[i] != left[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.InsertVector128)}(Vector256, Vector128.1): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.UInt32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.UInt32.1.cs deleted file mode 100644 index 6cb5e71b831c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.UInt32.1.cs +++ /dev/null @@ -1,421 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; -using static System.Runtime.Intrinsics.X86.Sse; -using static System.Runtime.Intrinsics.X86.Sse2; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void InsertVector128UInt321() - { - var test = new InsertVector128Test__InsertVector128UInt321(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class InsertVector128Test__InsertVector128UInt321 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(InsertVector128Test__InsertVector128UInt321 testClass) - { - var result = Avx2.InsertVector128(_fld1, _fld2, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector128 _clsVar2; - - private Vector256 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static InsertVector128Test__InsertVector128UInt321() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public InsertVector128Test__InsertVector128UInt321() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.InsertVector128( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.InsertVector128( - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - LoadVector128((UInt32*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.InsertVector128( - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - LoadVector128((UInt32*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.InsertVector128( - _clsVar1, - _clsVar2, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)); - var right = LoadVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)); - var right = LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new InsertVector128Test__InsertVector128UInt321(); - var result = Avx2.InsertVector128(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.InsertVector128(_fld1, _fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.InsertVector128(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != left[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((i > 3 ? result[i] != right[i - 4] : result[i] != left[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.InsertVector128)}(Vector256, Vector128.1): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.UInt64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.UInt64.1.cs deleted file mode 100644 index 6e2b72d9f0d4..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.UInt64.1.cs +++ /dev/null @@ -1,421 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; -using static System.Runtime.Intrinsics.X86.Sse; -using static System.Runtime.Intrinsics.X86.Sse2; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void InsertVector128UInt641() - { - var test = new InsertVector128Test__InsertVector128UInt641(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class InsertVector128Test__InsertVector128UInt641 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(InsertVector128Test__InsertVector128UInt641 testClass) - { - var result = Avx2.InsertVector128(_fld1, _fld2, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector128 _clsVar2; - - private Vector256 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static InsertVector128Test__InsertVector128UInt641() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public InsertVector128Test__InsertVector128UInt641() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.InsertVector128( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.InsertVector128( - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - LoadVector128((UInt64*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.InsertVector128( - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - LoadVector128((UInt64*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.InsertVector128), new Type[] { typeof(Vector256), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.InsertVector128( - _clsVar1, - _clsVar2, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)); - var right = LoadVector128((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx2.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)); - var right = LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx2.InsertVector128(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new InsertVector128Test__InsertVector128UInt641(); - var result = Avx2.InsertVector128(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.InsertVector128(_fld1, _fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.InsertVector128(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt64[] left, UInt64[] right, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != left[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((i > 1 ? result[i] != right[i - 2] : result[i] != left[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.InsertVector128)}(Vector256, Vector128.1): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MaskLoad.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MaskLoad.Int32.cs deleted file mode 100644 index f282ad056ed7..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MaskLoad.Int32.cs +++ /dev/null @@ -1,409 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; -using System.Reflection; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaskLoadInt32() - { - var test = new SimpleBinaryOpTest__MaskLoadInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MaskLoadInt32 - { - private struct TestStruct - { - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MaskLoadInt32 testClass) - { - var result = Avx2.MaskLoad((Int32*)testClass._dataTable.inArray1Ptr, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(testClass._dataTable.inArray1Ptr, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector256 _clsVar2; - - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static SimpleBinaryOpTest__MaskLoadInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MaskLoadInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.MaskLoad( - (Int32*)_dataTable.inArray1Ptr, - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.MaskLoad( - (Int32*)_dataTable.inArray1Ptr, - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.MaskLoad( - (Int32*)_dataTable.inArray1Ptr, - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MaskLoad), new Type[] { typeof(Int32*), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(Int32*)), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MaskLoad), new Type[] { typeof(Int32*), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(Int32*)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MaskLoad), new Type[] { typeof(Int32*), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(Int32*)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.MaskLoad( - (Int32*)_dataTable.inArray1Ptr, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = (Int32*)_dataTable.inArray1Ptr; - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = (Int32*)_dataTable.inArray1Ptr; - var right = Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = (Int32*)_dataTable.inArray1Ptr; - var right = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MaskLoadInt32(); - var result = Avx2.MaskLoad((Int32*)_dataTable.inArray1Ptr, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.MaskLoad((Int32*)_dataTable.inArray1Ptr, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.MaskLoad((Int32*)_dataTable.inArray1Ptr, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(void* left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((right[0] < 0) ? left[0] : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((right[i] < 0) ? left[i] : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.MaskLoad)}(Int32*, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MaskLoad.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MaskLoad.Int64.cs deleted file mode 100644 index 1fe33160ead1..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MaskLoad.Int64.cs +++ /dev/null @@ -1,409 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; -using System.Reflection; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaskLoadInt64() - { - var test = new SimpleBinaryOpTest__MaskLoadInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MaskLoadInt64 - { - private struct TestStruct - { - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MaskLoadInt64 testClass) - { - var result = Avx2.MaskLoad((Int64*)testClass._dataTable.inArray1Ptr, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(testClass._dataTable.inArray1Ptr, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector256 _clsVar2; - - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static SimpleBinaryOpTest__MaskLoadInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MaskLoadInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.MaskLoad( - (Int64*)_dataTable.inArray1Ptr, - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.MaskLoad( - (Int64*)_dataTable.inArray1Ptr, - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.MaskLoad( - (Int64*)_dataTable.inArray1Ptr, - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MaskLoad), new Type[] { typeof(Int64*), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(Int64*)), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MaskLoad), new Type[] { typeof(Int64*), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(Int64*)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MaskLoad), new Type[] { typeof(Int64*), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(Int64*)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.MaskLoad( - (Int64*)_dataTable.inArray1Ptr, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = (Int64*)_dataTable.inArray1Ptr; - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = (Int64*)_dataTable.inArray1Ptr; - var right = Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx2.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = (Int64*)_dataTable.inArray1Ptr; - var right = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx2.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MaskLoadInt64(); - var result = Avx2.MaskLoad((Int64*)_dataTable.inArray1Ptr, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.MaskLoad((Int64*)_dataTable.inArray1Ptr, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.MaskLoad((Int64*)_dataTable.inArray1Ptr, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(void* left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((right[0] < 0) ? left[0] : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((right[i] < 0) ? left[i] : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.MaskLoad)}(Int64*, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MaskLoad.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MaskLoad.UInt32.cs deleted file mode 100644 index c23f6cc70b52..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MaskLoad.UInt32.cs +++ /dev/null @@ -1,409 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; -using System.Reflection; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaskLoadUInt32() - { - var test = new SimpleBinaryOpTest__MaskLoadUInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MaskLoadUInt32 - { - private struct TestStruct - { - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MaskLoadUInt32 testClass) - { - var result = Avx2.MaskLoad((UInt32*)testClass._dataTable.inArray1Ptr, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(testClass._dataTable.inArray1Ptr, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector256 _clsVar2; - - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static SimpleBinaryOpTest__MaskLoadUInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MaskLoadUInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.MaskLoad( - (UInt32*)_dataTable.inArray1Ptr, - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.MaskLoad( - (UInt32*)_dataTable.inArray1Ptr, - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.MaskLoad( - (UInt32*)_dataTable.inArray1Ptr, - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MaskLoad), new Type[] { typeof(UInt32*), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(UInt32*)), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MaskLoad), new Type[] { typeof(UInt32*), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(UInt32*)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MaskLoad), new Type[] { typeof(UInt32*), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(UInt32*)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.MaskLoad( - (UInt32*)_dataTable.inArray1Ptr, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = (UInt32*)_dataTable.inArray1Ptr; - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = (UInt32*)_dataTable.inArray1Ptr; - var right = Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = (UInt32*)_dataTable.inArray1Ptr; - var right = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MaskLoadUInt32(); - var result = Avx2.MaskLoad((UInt32*)_dataTable.inArray1Ptr, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.MaskLoad((UInt32*)_dataTable.inArray1Ptr, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.MaskLoad((UInt32*)_dataTable.inArray1Ptr, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(void* left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (((right[0] & (1U << 31)) != 0) ? left[0] : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (((right[i] & (1U << 31)) != 0) ? left[i] : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.MaskLoad)}(UInt32*, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MaskLoad.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MaskLoad.UInt64.cs deleted file mode 100644 index eb59b925a27a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MaskLoad.UInt64.cs +++ /dev/null @@ -1,409 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; -using System.Reflection; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaskLoadUInt64() - { - var test = new SimpleBinaryOpTest__MaskLoadUInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MaskLoadUInt64 - { - private struct TestStruct - { - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MaskLoadUInt64 testClass) - { - var result = Avx2.MaskLoad((UInt64*)testClass._dataTable.inArray1Ptr, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(testClass._dataTable.inArray1Ptr, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector256 _clsVar2; - - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static SimpleBinaryOpTest__MaskLoadUInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MaskLoadUInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.MaskLoad( - (UInt64*)_dataTable.inArray1Ptr, - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.MaskLoad( - (UInt64*)_dataTable.inArray1Ptr, - Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.MaskLoad( - (UInt64*)_dataTable.inArray1Ptr, - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MaskLoad), new Type[] { typeof(UInt64*), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(UInt64*)), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MaskLoad), new Type[] { typeof(UInt64*), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(UInt64*)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MaskLoad), new Type[] { typeof(UInt64*), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(UInt64*)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.MaskLoad( - (UInt64*)_dataTable.inArray1Ptr, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = (UInt64*)_dataTable.inArray1Ptr; - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = (UInt64*)_dataTable.inArray1Ptr; - var right = Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx2.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = (UInt64*)_dataTable.inArray1Ptr; - var right = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx2.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MaskLoadUInt64(); - var result = Avx2.MaskLoad((UInt64*)_dataTable.inArray1Ptr, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.MaskLoad((UInt64*)_dataTable.inArray1Ptr, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.MaskLoad((UInt64*)_dataTable.inArray1Ptr, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(void* left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt64[] left, UInt64[] right, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (((right[0] & (1UL << 63)) != 0) ? left[0] : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (((right[i] & (1UL << 63)) != 0) ? left[i] : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.MaskLoad)}(UInt64*, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MaskStore.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MaskStore.Int32.cs deleted file mode 100644 index 888eed3f9704..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MaskStore.Int32.cs +++ /dev/null @@ -1,404 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaskStoreInt32() - { - var test = new StoreBinaryOpTest__MaskStoreInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class StoreBinaryOpTest__MaskStoreInt32 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(StoreBinaryOpTest__MaskStoreInt32 testClass) - { - Avx2.MaskStore((Int32*)testClass._dataTable.outArrayPtr, _fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static StoreBinaryOpTest__MaskStoreInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public StoreBinaryOpTest__MaskStoreInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - Avx2.MaskStore( - (Int32*)_dataTable.outArrayPtr, - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - Avx2.MaskStore( - (Int32*)_dataTable.outArrayPtr, - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - Avx2.MaskStore( - (Int32*)_dataTable.outArrayPtr, - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - typeof(Avx2).GetMethod(nameof(Avx2.MaskStore), new Type[] { typeof(Int32*), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(Int32*)), - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - typeof(Avx2).GetMethod(nameof(Avx2.MaskStore), new Type[] { typeof(Int32*), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(Int32*)), - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - typeof(Avx2).GetMethod(nameof(Avx2.MaskStore), new Type[] { typeof(Int32*), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(Int32*)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - Avx2.MaskStore( - (Int32*)_dataTable.outArrayPtr, - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - Avx2.MaskStore((Int32*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)); - Avx2.MaskStore((Int32*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)); - Avx2.MaskStore((Int32*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new StoreBinaryOpTest__MaskStoreInt32(); - Avx2.MaskStore((Int32*)_dataTable.outArrayPtr, test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - Avx2.MaskStore((Int32*)_dataTable.outArrayPtr, _fld1, _fld2); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - Avx2.MaskStore((Int32*)_dataTable.outArrayPtr, test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((left[0] < 0) ? right[0] : result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((left[i] < 0) ? right[i] : result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.MaskStore)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MaskStore.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MaskStore.Int64.cs deleted file mode 100644 index d156438a382e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MaskStore.Int64.cs +++ /dev/null @@ -1,404 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaskStoreInt64() - { - var test = new StoreBinaryOpTest__MaskStoreInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class StoreBinaryOpTest__MaskStoreInt64 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(StoreBinaryOpTest__MaskStoreInt64 testClass) - { - Avx2.MaskStore((Int64*)testClass._dataTable.outArrayPtr, _fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static StoreBinaryOpTest__MaskStoreInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public StoreBinaryOpTest__MaskStoreInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - Avx2.MaskStore( - (Int64*)_dataTable.outArrayPtr, - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - Avx2.MaskStore( - (Int64*)_dataTable.outArrayPtr, - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - Avx2.MaskStore( - (Int64*)_dataTable.outArrayPtr, - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - typeof(Avx2).GetMethod(nameof(Avx2.MaskStore), new Type[] { typeof(Int64*), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(Int64*)), - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - typeof(Avx2).GetMethod(nameof(Avx2.MaskStore), new Type[] { typeof(Int64*), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(Int64*)), - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - typeof(Avx2).GetMethod(nameof(Avx2.MaskStore), new Type[] { typeof(Int64*), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(Int64*)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - Avx2.MaskStore( - (Int64*)_dataTable.outArrayPtr, - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - Avx2.MaskStore((Int64*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)); - Avx2.MaskStore((Int64*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)); - Avx2.MaskStore((Int64*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new StoreBinaryOpTest__MaskStoreInt64(); - Avx2.MaskStore((Int64*)_dataTable.outArrayPtr, test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - Avx2.MaskStore((Int64*)_dataTable.outArrayPtr, _fld1, _fld2); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - Avx2.MaskStore((Int64*)_dataTable.outArrayPtr, test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((left[0] < 0) ? right[0] : result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((left[i] < 0) ? right[i] : result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.MaskStore)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MaskStore.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MaskStore.UInt32.cs deleted file mode 100644 index b33e9d9e6204..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MaskStore.UInt32.cs +++ /dev/null @@ -1,404 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaskStoreUInt32() - { - var test = new StoreBinaryOpTest__MaskStoreUInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class StoreBinaryOpTest__MaskStoreUInt32 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(StoreBinaryOpTest__MaskStoreUInt32 testClass) - { - Avx2.MaskStore((UInt32*)testClass._dataTable.outArrayPtr, _fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static StoreBinaryOpTest__MaskStoreUInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public StoreBinaryOpTest__MaskStoreUInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - Avx2.MaskStore( - (UInt32*)_dataTable.outArrayPtr, - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - Avx2.MaskStore( - (UInt32*)_dataTable.outArrayPtr, - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - Avx2.MaskStore( - (UInt32*)_dataTable.outArrayPtr, - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - typeof(Avx2).GetMethod(nameof(Avx2.MaskStore), new Type[] { typeof(UInt32*), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(UInt32*)), - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - typeof(Avx2).GetMethod(nameof(Avx2.MaskStore), new Type[] { typeof(UInt32*), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(UInt32*)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - typeof(Avx2).GetMethod(nameof(Avx2.MaskStore), new Type[] { typeof(UInt32*), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(UInt32*)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - Avx2.MaskStore( - (UInt32*)_dataTable.outArrayPtr, - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - Avx2.MaskStore((UInt32*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)); - Avx2.MaskStore((UInt32*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)); - Avx2.MaskStore((UInt32*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new StoreBinaryOpTest__MaskStoreUInt32(); - Avx2.MaskStore((UInt32*)_dataTable.outArrayPtr, test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - Avx2.MaskStore((UInt32*)_dataTable.outArrayPtr, _fld1, _fld2); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - Avx2.MaskStore((UInt32*)_dataTable.outArrayPtr, test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (((left[0] & (1U << 31)) != 0) ? right[0] : result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (((left[i] & (1U << 31)) != 0) ? right[i] : result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.MaskStore)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MaskStore.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MaskStore.UInt64.cs deleted file mode 100644 index 4ffbd2f68a8a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MaskStore.UInt64.cs +++ /dev/null @@ -1,404 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaskStoreUInt64() - { - var test = new StoreBinaryOpTest__MaskStoreUInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class StoreBinaryOpTest__MaskStoreUInt64 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(StoreBinaryOpTest__MaskStoreUInt64 testClass) - { - Avx2.MaskStore((UInt64*)testClass._dataTable.outArrayPtr, _fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static StoreBinaryOpTest__MaskStoreUInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public StoreBinaryOpTest__MaskStoreUInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - Avx2.MaskStore( - (UInt64*)_dataTable.outArrayPtr, - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - Avx2.MaskStore( - (UInt64*)_dataTable.outArrayPtr, - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - Avx2.MaskStore( - (UInt64*)_dataTable.outArrayPtr, - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - typeof(Avx2).GetMethod(nameof(Avx2.MaskStore), new Type[] { typeof(UInt64*), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(UInt64*)), - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - typeof(Avx2).GetMethod(nameof(Avx2.MaskStore), new Type[] { typeof(UInt64*), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(UInt64*)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - typeof(Avx2).GetMethod(nameof(Avx2.MaskStore), new Type[] { typeof(UInt64*), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(UInt64*)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - Avx2.MaskStore( - (UInt64*)_dataTable.outArrayPtr, - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - Avx2.MaskStore((UInt64*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)); - Avx2.MaskStore((UInt64*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)); - Avx2.MaskStore((UInt64*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new StoreBinaryOpTest__MaskStoreUInt64(); - Avx2.MaskStore((UInt64*)_dataTable.outArrayPtr, test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - Avx2.MaskStore((UInt64*)_dataTable.outArrayPtr, _fld1, _fld2); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - Avx2.MaskStore((UInt64*)_dataTable.outArrayPtr, test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt64[] left, UInt64[] right, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (((left[0] & (1UL << 63)) != 0) ? right[0] : result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (((left[i] & (1UL << 63)) != 0) ? right[i] : result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.MaskStore)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.Byte.cs deleted file mode 100644 index 2ba50303b533..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.Byte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaxByte() - { - var test = new SimpleBinaryOpTest__MaxByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MaxByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MaxByte testClass) - { - var result = Avx2.Max(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MaxByte testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Max( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MaxByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MaxByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Max( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Max( - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Max( - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Max), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Max), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Max), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Max( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Max( - Avx.LoadVector256((Byte*)(pClsVar1)), - Avx.LoadVector256((Byte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)); - var result = Avx2.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)); - var result = Avx2.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MaxByte(); - var result = Avx2.Max(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MaxByte(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Max( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Max(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Max( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Max(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Max( - Avx.LoadVector256((Byte*)(&test._fld1)), - Avx.LoadVector256((Byte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != Math.Max(left[0], right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != Math.Max(left[i], right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Max)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.Int16.cs deleted file mode 100644 index 37c9283ccdad..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.Int16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaxInt16() - { - var test = new SimpleBinaryOpTest__MaxInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MaxInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MaxInt16 testClass) - { - var result = Avx2.Max(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MaxInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Max( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MaxInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MaxInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Max( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Max( - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Max( - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Max), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Max), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Max), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Max( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Max( - Avx.LoadVector256((Int16*)(pClsVar1)), - Avx.LoadVector256((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MaxInt16(); - var result = Avx2.Max(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MaxInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Max( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Max(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Max( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Max(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Max( - Avx.LoadVector256((Int16*)(&test._fld1)), - Avx.LoadVector256((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != Math.Max(left[0], right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != Math.Max(left[i], right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Max)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.Int32.cs deleted file mode 100644 index 99b5a60937ac..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.Int32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaxInt32() - { - var test = new SimpleBinaryOpTest__MaxInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MaxInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MaxInt32 testClass) - { - var result = Avx2.Max(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MaxInt32 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Max( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MaxInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MaxInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Max( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Max( - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Max( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Max), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Max), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Max), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Max( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Max( - Avx.LoadVector256((Int32*)(pClsVar1)), - Avx.LoadVector256((Int32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MaxInt32(); - var result = Avx2.Max(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MaxInt32(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Max( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Max(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Max( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Max(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Max( - Avx.LoadVector256((Int32*)(&test._fld1)), - Avx.LoadVector256((Int32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != Math.Max(left[0], right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != Math.Max(left[i], right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Max)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.SByte.cs deleted file mode 100644 index 77d60cb66d85..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.SByte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaxSByte() - { - var test = new SimpleBinaryOpTest__MaxSByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MaxSByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MaxSByte testClass) - { - var result = Avx2.Max(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MaxSByte testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Max( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MaxSByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MaxSByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Max( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Max( - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Max( - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Max), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Max), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Max), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Max( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Max( - Avx.LoadVector256((SByte*)(pClsVar1)), - Avx.LoadVector256((SByte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx2.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx2.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MaxSByte(); - var result = Avx2.Max(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MaxSByte(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Max( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Max(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Max( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Max(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Max( - Avx.LoadVector256((SByte*)(&test._fld1)), - Avx.LoadVector256((SByte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != Math.Max(left[0], right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != Math.Max(left[i], right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Max)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.UInt16.cs deleted file mode 100644 index 0e1691ea19c0..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.UInt16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaxUInt16() - { - var test = new SimpleBinaryOpTest__MaxUInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MaxUInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MaxUInt16 testClass) - { - var result = Avx2.Max(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MaxUInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Max( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MaxUInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MaxUInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Max( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Max( - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Max( - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Max), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Max), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Max), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Max( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Max( - Avx.LoadVector256((UInt16*)(pClsVar1)), - Avx.LoadVector256((UInt16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx2.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx2.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MaxUInt16(); - var result = Avx2.Max(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MaxUInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Max( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Max(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Max( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Max(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Max( - Avx.LoadVector256((UInt16*)(&test._fld1)), - Avx.LoadVector256((UInt16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != Math.Max(left[0], right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != Math.Max(left[i], right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Max)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.UInt32.cs deleted file mode 100644 index 94de5f6fcc0a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.UInt32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaxUInt32() - { - var test = new SimpleBinaryOpTest__MaxUInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MaxUInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MaxUInt32 testClass) - { - var result = Avx2.Max(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MaxUInt32 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Max( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MaxUInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MaxUInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Max( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Max( - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Max( - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Max), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Max), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Max), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Max( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Max( - Avx.LoadVector256((UInt32*)(pClsVar1)), - Avx.LoadVector256((UInt32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MaxUInt32(); - var result = Avx2.Max(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MaxUInt32(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Max( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Max(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Max( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Max(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Max( - Avx.LoadVector256((UInt32*)(&test._fld1)), - Avx.LoadVector256((UInt32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != Math.Max(left[0], right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != Math.Max(left[i], right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Max)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.Byte.cs deleted file mode 100644 index 6adcde951239..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.Byte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MinByte() - { - var test = new SimpleBinaryOpTest__MinByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MinByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MinByte testClass) - { - var result = Avx2.Min(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MinByte testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Min( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MinByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MinByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Min( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Min( - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Min( - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Min), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Min), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Min), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Min( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Min( - Avx.LoadVector256((Byte*)(pClsVar1)), - Avx.LoadVector256((Byte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)); - var result = Avx2.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)); - var result = Avx2.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MinByte(); - var result = Avx2.Min(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MinByte(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Min( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Min(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Min( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Min(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Min( - Avx.LoadVector256((Byte*)(&test._fld1)), - Avx.LoadVector256((Byte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != Math.Min(left[0], right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != Math.Min(left[i], right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Min)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.Int16.cs deleted file mode 100644 index 2ec6886f6bc8..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.Int16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MinInt16() - { - var test = new SimpleBinaryOpTest__MinInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MinInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MinInt16 testClass) - { - var result = Avx2.Min(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MinInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Min( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MinInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MinInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Min( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Min( - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Min( - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Min), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Min), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Min), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Min( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Min( - Avx.LoadVector256((Int16*)(pClsVar1)), - Avx.LoadVector256((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MinInt16(); - var result = Avx2.Min(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MinInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Min( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Min(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Min( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Min(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Min( - Avx.LoadVector256((Int16*)(&test._fld1)), - Avx.LoadVector256((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != Math.Min(left[0], right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != Math.Min(left[i], right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Min)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.Int32.cs deleted file mode 100644 index 337fa61b40e7..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.Int32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MinInt32() - { - var test = new SimpleBinaryOpTest__MinInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MinInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MinInt32 testClass) - { - var result = Avx2.Min(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MinInt32 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Min( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MinInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MinInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Min( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Min( - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Min( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Min), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Min), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Min), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Min( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Min( - Avx.LoadVector256((Int32*)(pClsVar1)), - Avx.LoadVector256((Int32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MinInt32(); - var result = Avx2.Min(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MinInt32(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Min( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Min(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Min( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Min(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Min( - Avx.LoadVector256((Int32*)(&test._fld1)), - Avx.LoadVector256((Int32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != Math.Min(left[0], right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != Math.Min(left[i], right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Min)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.SByte.cs deleted file mode 100644 index bf084a584258..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.SByte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MinSByte() - { - var test = new SimpleBinaryOpTest__MinSByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MinSByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MinSByte testClass) - { - var result = Avx2.Min(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MinSByte testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Min( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MinSByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MinSByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Min( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Min( - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Min( - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Min), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Min), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Min), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Min( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Min( - Avx.LoadVector256((SByte*)(pClsVar1)), - Avx.LoadVector256((SByte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx2.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx2.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MinSByte(); - var result = Avx2.Min(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MinSByte(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Min( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Min(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Min( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Min(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Min( - Avx.LoadVector256((SByte*)(&test._fld1)), - Avx.LoadVector256((SByte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != Math.Min(left[0], right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != Math.Min(left[i], right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Min)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.UInt16.cs deleted file mode 100644 index 0ab8743517ac..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.UInt16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MinUInt16() - { - var test = new SimpleBinaryOpTest__MinUInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MinUInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MinUInt16 testClass) - { - var result = Avx2.Min(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MinUInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Min( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MinUInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MinUInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Min( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Min( - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Min( - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Min), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Min), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Min), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Min( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Min( - Avx.LoadVector256((UInt16*)(pClsVar1)), - Avx.LoadVector256((UInt16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx2.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx2.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MinUInt16(); - var result = Avx2.Min(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MinUInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Min( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Min(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Min( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Min(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Min( - Avx.LoadVector256((UInt16*)(&test._fld1)), - Avx.LoadVector256((UInt16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != Math.Min(left[0], right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != Math.Min(left[i], right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Min)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.UInt32.cs deleted file mode 100644 index f32c40bb9bd9..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.UInt32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MinUInt32() - { - var test = new SimpleBinaryOpTest__MinUInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MinUInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MinUInt32 testClass) - { - var result = Avx2.Min(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MinUInt32 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Min( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MinUInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MinUInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Min( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Min( - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Min( - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Min), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Min), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Min), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Min( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Min( - Avx.LoadVector256((UInt32*)(pClsVar1)), - Avx.LoadVector256((UInt32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MinUInt32(); - var result = Avx2.Min(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MinUInt32(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Min( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Min(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Min( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Min(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Min( - Avx.LoadVector256((UInt32*)(&test._fld1)), - Avx.LoadVector256((UInt32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != Math.Min(left[0], right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != Math.Min(left[i], right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Min)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MoveMask.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MoveMask.cs deleted file mode 100644 index c33b4f2562e3..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MoveMask.cs +++ /dev/null @@ -1,77 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Avx2.IsSupported) - { - using (TestTable byteTable = new TestTable(new byte[32] { 255, 2, 0, 80, 0, 7, 0, 1, 2, 7, 80, 0, 123, 127, 5, 255, 255, 2, 0, 80, 0, 7, 0, 1, 2, 7, 80, 0, 123, 127, 5, 255 })) - { - - var vf1 = Unsafe.Read>(byteTable.inArray1Ptr); - var res = Avx2.MoveMask(vf1); - - if (res != -2147385343) - { - Console.WriteLine("AVX2 MoveMask failed on byte:"); - Console.WriteLine(res); - testResult = Fail; - } - } - - using (TestTable sbyteTable = new TestTable(new sbyte[32] { -1, 2, 0, 6, 0, 7, 111, 1, 2, 55, 80, 0, 11, 127, 5, -9, -1, 2, 0, 6, 0, 7, 111, 1, 2, 55, 80, 0, 11, 127, 5, -9 })) - { - - var vf1 = Unsafe.Read>(sbyteTable.inArray1Ptr); - var res = Avx2.MoveMask(vf1); - - if (res != -2147385343) - { - Console.WriteLine("AVX2 MoveMask failed on sbyte:"); - Console.WriteLine(res); - testResult = Fail; - } - } - } - - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T : struct - { - public T[] inArray1; - public void* inArray1Ptr => inHandle1.AddrOfPinnedObject().ToPointer(); - GCHandle inHandle1; - - public TestTable(T[] a) - { - this.inArray1 = a; - inHandle1 = GCHandle.Alloc(inArray1, GCHandleType.Pinned); - } - - public void Dispose() - { - inHandle1.Free(); - } - } - - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Multiply.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Multiply.cs deleted file mode 100644 index 4f3b6afb4500..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Multiply.cs +++ /dev/null @@ -1,116 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Avx2.IsSupported) - { - using (TestTable intTable = new TestTable(new int[8] { 1, -5, 100, 0, 1, -5, 100, 0 }, new int[8] { 22, -1, -50, 0, 22, -1, -50, 0 }, new long[4])) - using (TestTable uintTable = new TestTable(new uint[8] { 1, 5, 100, 0, 1, 5, 100, 0 }, new uint[8] { 22, 1, 50, 0, 22, 1, 50, 0 }, new ulong[4])) - { - - var vi1 = Unsafe.Read>(intTable.inArray1Ptr); - var vi2 = Unsafe.Read>(intTable.inArray2Ptr); - var vi3 = Avx2.Multiply(vi1, vi2); - Unsafe.Write(intTable.outArrayPtr, vi3); - - var vui1 = Unsafe.Read>(uintTable.inArray1Ptr); - var vui2 = Unsafe.Read>(uintTable.inArray2Ptr); - var vui3 = Avx2.Multiply(vui1, vui2); - Unsafe.Write(uintTable.outArrayPtr, vui3); - - for (int i = 0; i < intTable.outArray.Length; i++) - { - if (intTable.inArray1[i * 2] * intTable.inArray2[i * 2] != intTable.outArray[i]) - { - Console.WriteLine("AVX2 Multiply failed on int:"); - foreach (var item in intTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - return Fail; - } - } - - for (int i = 0; i < uintTable.outArray.Length; i++) - { - if (uintTable.inArray1[i * 2] * uintTable.inArray2[i * 2] != uintTable.outArray[i]) - { - Console.WriteLine("AVX2 Multiply failed on uint:"); - foreach (var item in uintTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - return Fail; - } - } - } - } - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T1 : struct where T2 : struct where T3 : struct - { - public T1[] inArray1; - public T2[] inArray2; - public T3[] outArray; - - public void* inArray1Ptr => inHandle1.AddrOfPinnedObject().ToPointer(); - public void* inArray2Ptr => inHandle2.AddrOfPinnedObject().ToPointer(); - public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); - - GCHandle inHandle1; - GCHandle inHandle2; - GCHandle outHandle; - public TestTable(T1[] a, T2[] b, T3[] c) - { - this.inArray1 = a; - this.inArray2 = b; - this.outArray = c; - - inHandle1 = GCHandle.Alloc(inArray1, GCHandleType.Pinned); - inHandle2 = GCHandle.Alloc(inArray2, GCHandleType.Pinned); - outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); - } - public bool CheckResult(Func check) - { - for (int i = 0; i < inArray1.Length; i++) - { - if (!check(inArray1[i], inArray2[i], outArray[i])) - { - return false; - } - } - return true; - } - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - } - - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MultiplyAddAdjacent.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MultiplyAddAdjacent.Int16.cs deleted file mode 100644 index aa6d0841b204..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MultiplyAddAdjacent.Int16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplyAddAdjacentInt16() - { - var test = new SimpleBinaryOpTest__MultiplyAddAdjacentInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MultiplyAddAdjacentInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, SByte[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MultiplyAddAdjacentInt16 testClass) - { - var result = Avx2.MultiplyAddAdjacent(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MultiplyAddAdjacentInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.MultiplyAddAdjacent( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MultiplyAddAdjacentInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MultiplyAddAdjacentInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.MultiplyAddAdjacent( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.MultiplyAddAdjacent( - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.MultiplyAddAdjacent( - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MultiplyAddAdjacent), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MultiplyAddAdjacent), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MultiplyAddAdjacent), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.MultiplyAddAdjacent( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.MultiplyAddAdjacent( - Avx.LoadVector256((Byte*)(pClsVar1)), - Avx.LoadVector256((SByte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.MultiplyAddAdjacent(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx2.MultiplyAddAdjacent(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx2.MultiplyAddAdjacent(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MultiplyAddAdjacentInt16(); - var result = Avx2.MultiplyAddAdjacent(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MultiplyAddAdjacentInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.MultiplyAddAdjacent( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.MultiplyAddAdjacent(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.MultiplyAddAdjacent( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.MultiplyAddAdjacent(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.MultiplyAddAdjacent( - Avx.LoadVector256((Byte*)(&test._fld1)), - Avx.LoadVector256((SByte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Byte[] left, SByte[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != Math.Clamp(((right[1] * left[1]) + (right[0] * left[0])), short.MinValue, short.MaxValue)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != Math.Clamp(((right[(i * 2) + 1] * left[(i * 2) + 1]) + (right[i * 2] * left[i * 2])), short.MinValue, short.MaxValue)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.MultiplyAddAdjacent)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MultiplyAddAdjacent.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MultiplyAddAdjacent.Int32.cs deleted file mode 100644 index 7f9ad2f1c4ce..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MultiplyAddAdjacent.Int32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplyAddAdjacentInt32() - { - var test = new SimpleBinaryOpTest__MultiplyAddAdjacentInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MultiplyAddAdjacentInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MultiplyAddAdjacentInt32 testClass) - { - var result = Avx2.MultiplyAddAdjacent(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MultiplyAddAdjacentInt32 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.MultiplyAddAdjacent( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MultiplyAddAdjacentInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MultiplyAddAdjacentInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.MultiplyAddAdjacent( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.MultiplyAddAdjacent( - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.MultiplyAddAdjacent( - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MultiplyAddAdjacent), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MultiplyAddAdjacent), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MultiplyAddAdjacent), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.MultiplyAddAdjacent( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.MultiplyAddAdjacent( - Avx.LoadVector256((Int16*)(pClsVar1)), - Avx.LoadVector256((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.MultiplyAddAdjacent(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.MultiplyAddAdjacent(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.MultiplyAddAdjacent(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MultiplyAddAdjacentInt32(); - var result = Avx2.MultiplyAddAdjacent(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MultiplyAddAdjacentInt32(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.MultiplyAddAdjacent( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.MultiplyAddAdjacent(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.MultiplyAddAdjacent( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.MultiplyAddAdjacent(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.MultiplyAddAdjacent( - Avx.LoadVector256((Int16*)(&test._fld1)), - Avx.LoadVector256((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != Math.Clamp(((right[1] * left[1]) + (right[0] * left[0])), int.MinValue, int.MaxValue)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != Math.Clamp(((right[(i * 2) + 1] * left[(i * 2) + 1]) + (right[i * 2] * left[i * 2])), int.MinValue, int.MaxValue)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.MultiplyAddAdjacent)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MultiplyHighRoundScale.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MultiplyHighRoundScale.Int16.cs deleted file mode 100644 index b3cf09def213..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MultiplyHighRoundScale.Int16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplyHighRoundScaleInt16() - { - var test = new SimpleBinaryOpTest__MultiplyHighRoundScaleInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MultiplyHighRoundScaleInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MultiplyHighRoundScaleInt16 testClass) - { - var result = Avx2.MultiplyHighRoundScale(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MultiplyHighRoundScaleInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.MultiplyHighRoundScale( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MultiplyHighRoundScaleInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MultiplyHighRoundScaleInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.MultiplyHighRoundScale( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.MultiplyHighRoundScale( - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.MultiplyHighRoundScale( - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MultiplyHighRoundScale), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MultiplyHighRoundScale), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MultiplyHighRoundScale), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.MultiplyHighRoundScale( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.MultiplyHighRoundScale( - Avx.LoadVector256((Int16*)(pClsVar1)), - Avx.LoadVector256((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.MultiplyHighRoundScale(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.MultiplyHighRoundScale(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.MultiplyHighRoundScale(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MultiplyHighRoundScaleInt16(); - var result = Avx2.MultiplyHighRoundScale(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MultiplyHighRoundScaleInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.MultiplyHighRoundScale( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.MultiplyHighRoundScale(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.MultiplyHighRoundScale( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.MultiplyHighRoundScale(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.MultiplyHighRoundScale( - Avx.LoadVector256((Int16*)(&test._fld1)), - Avx.LoadVector256((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (short)((((left[0] * right[0]) >> 14) + 1) >> 1)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (short)((((left[i] * right[i]) >> 14) + 1) >> 1)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.MultiplyHighRoundScale)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MultiplyLow.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MultiplyLow.Int16.cs deleted file mode 100644 index a4d14d48dca8..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MultiplyLow.Int16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplyLowInt16() - { - var test = new SimpleBinaryOpTest__MultiplyLowInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MultiplyLowInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MultiplyLowInt16 testClass) - { - var result = Avx2.MultiplyLow(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MultiplyLowInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.MultiplyLow( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MultiplyLowInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MultiplyLowInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.MultiplyLow( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.MultiplyLow( - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.MultiplyLow( - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MultiplyLow), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MultiplyLow), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MultiplyLow), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.MultiplyLow( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.MultiplyLow( - Avx.LoadVector256((Int16*)(pClsVar1)), - Avx.LoadVector256((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.MultiplyLow(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.MultiplyLow(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.MultiplyLow(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MultiplyLowInt16(); - var result = Avx2.MultiplyLow(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MultiplyLowInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.MultiplyLow( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.MultiplyLow(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.MultiplyLow( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.MultiplyLow(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.MultiplyLow( - Avx.LoadVector256((Int16*)(&test._fld1)), - Avx.LoadVector256((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != BitConverter.ToInt16(BitConverter.GetBytes(((int)(left[0])) * right[0]), 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != BitConverter.ToInt16(BitConverter.GetBytes(((int)(left[i])) * right[i]), 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.MultiplyLow)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MultiplyLow.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MultiplyLow.Int32.cs deleted file mode 100644 index 28977af7b2a8..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MultiplyLow.Int32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplyLowInt32() - { - var test = new SimpleBinaryOpTest__MultiplyLowInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MultiplyLowInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MultiplyLowInt32 testClass) - { - var result = Avx2.MultiplyLow(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MultiplyLowInt32 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.MultiplyLow( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MultiplyLowInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MultiplyLowInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.MultiplyLow( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.MultiplyLow( - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.MultiplyLow( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MultiplyLow), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MultiplyLow), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MultiplyLow), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.MultiplyLow( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.MultiplyLow( - Avx.LoadVector256((Int32*)(pClsVar1)), - Avx.LoadVector256((Int32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.MultiplyLow(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.MultiplyLow(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.MultiplyLow(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MultiplyLowInt32(); - var result = Avx2.MultiplyLow(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MultiplyLowInt32(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.MultiplyLow( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.MultiplyLow(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.MultiplyLow( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.MultiplyLow(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.MultiplyLow( - Avx.LoadVector256((Int32*)(&test._fld1)), - Avx.LoadVector256((Int32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != BitConverter.ToInt32(BitConverter.GetBytes(((long)(left[0])) * right[0]), 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != BitConverter.ToInt32(BitConverter.GetBytes(((long)(left[i])) * right[i]), 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.MultiplyLow)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MultiplyLow.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MultiplyLow.UInt16.cs deleted file mode 100644 index a639f611884c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MultiplyLow.UInt16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplyLowUInt16() - { - var test = new SimpleBinaryOpTest__MultiplyLowUInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MultiplyLowUInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MultiplyLowUInt16 testClass) - { - var result = Avx2.MultiplyLow(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MultiplyLowUInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.MultiplyLow( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MultiplyLowUInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MultiplyLowUInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.MultiplyLow( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.MultiplyLow( - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.MultiplyLow( - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MultiplyLow), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MultiplyLow), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MultiplyLow), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.MultiplyLow( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.MultiplyLow( - Avx.LoadVector256((UInt16*)(pClsVar1)), - Avx.LoadVector256((UInt16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.MultiplyLow(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx2.MultiplyLow(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx2.MultiplyLow(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MultiplyLowUInt16(); - var result = Avx2.MultiplyLow(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MultiplyLowUInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.MultiplyLow( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.MultiplyLow(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.MultiplyLow( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.MultiplyLow(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.MultiplyLow( - Avx.LoadVector256((UInt16*)(&test._fld1)), - Avx.LoadVector256((UInt16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != BitConverter.ToUInt16(BitConverter.GetBytes(((uint)(left[0])) * right[0]), 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != BitConverter.ToUInt16(BitConverter.GetBytes(((uint)(left[i])) * right[i]), 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.MultiplyLow)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MultiplyLow.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MultiplyLow.UInt32.cs deleted file mode 100644 index cbf9ca25503a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/MultiplyLow.UInt32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplyLowUInt32() - { - var test = new SimpleBinaryOpTest__MultiplyLowUInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MultiplyLowUInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MultiplyLowUInt32 testClass) - { - var result = Avx2.MultiplyLow(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MultiplyLowUInt32 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.MultiplyLow( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MultiplyLowUInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MultiplyLowUInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.MultiplyLow( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.MultiplyLow( - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.MultiplyLow( - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MultiplyLow), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MultiplyLow), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MultiplyLow), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.MultiplyLow( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.MultiplyLow( - Avx.LoadVector256((UInt32*)(pClsVar1)), - Avx.LoadVector256((UInt32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.MultiplyLow(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.MultiplyLow(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.MultiplyLow(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MultiplyLowUInt32(); - var result = Avx2.MultiplyLow(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MultiplyLowUInt32(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.MultiplyLow( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.MultiplyLow(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.MultiplyLow( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.MultiplyLow(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.MultiplyLow( - Avx.LoadVector256((UInt32*)(&test._fld1)), - Avx.LoadVector256((UInt32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != BitConverter.ToUInt32(BitConverter.GetBytes(((ulong)(left[0])) * right[0]), 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != BitConverter.ToUInt32(BitConverter.GetBytes(((ulong)(left[i])) * right[i]), 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.MultiplyLow)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.Byte.cs deleted file mode 100644 index 926b7e2ceac4..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.Byte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void OrByte() - { - var test = new SimpleBinaryOpTest__OrByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__OrByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__OrByte testClass) - { - var result = Avx2.Or(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__OrByte testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Or( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__OrByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__OrByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Or( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Or( - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Or( - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Or), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Or), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Or), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Or( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Or( - Avx.LoadVector256((Byte*)(pClsVar1)), - Avx.LoadVector256((Byte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)); - var result = Avx2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)); - var result = Avx2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__OrByte(); - var result = Avx2.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__OrByte(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Or( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Or(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Or( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Or( - Avx.LoadVector256((Byte*)(&test._fld1)), - Avx.LoadVector256((Byte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((byte)(left[0] | right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((byte)(left[i] | right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Or)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.Int16.cs deleted file mode 100644 index ebee6d935b40..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.Int16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void OrInt16() - { - var test = new SimpleBinaryOpTest__OrInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__OrInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__OrInt16 testClass) - { - var result = Avx2.Or(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__OrInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Or( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__OrInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__OrInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Or( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Or( - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Or( - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Or), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Or), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Or), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Or( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Or( - Avx.LoadVector256((Int16*)(pClsVar1)), - Avx.LoadVector256((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__OrInt16(); - var result = Avx2.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__OrInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Or( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Or(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Or( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Or( - Avx.LoadVector256((Int16*)(&test._fld1)), - Avx.LoadVector256((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((short)(left[0] | right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((short)(left[i] | right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Or)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.Int32.cs deleted file mode 100644 index a360f9b8c92f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.Int32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void OrInt32() - { - var test = new SimpleBinaryOpTest__OrInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__OrInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__OrInt32 testClass) - { - var result = Avx2.Or(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__OrInt32 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Or( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__OrInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__OrInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Or( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Or( - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Or( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Or), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Or), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Or), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Or( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Or( - Avx.LoadVector256((Int32*)(pClsVar1)), - Avx.LoadVector256((Int32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__OrInt32(); - var result = Avx2.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__OrInt32(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Or( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Or(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Or( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Or( - Avx.LoadVector256((Int32*)(&test._fld1)), - Avx.LoadVector256((Int32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((int)(left[0] | right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((int)(left[i] | right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Or)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.Int64.cs deleted file mode 100644 index ecca302cb201..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.Int64.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void OrInt64() - { - var test = new SimpleBinaryOpTest__OrInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__OrInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int64[] inArray1, Int64[] inArray2, Int64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__OrInt64 testClass) - { - var result = Avx2.Or(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__OrInt64 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Or( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__OrInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__OrInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Or( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Or( - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Or( - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Or), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Or), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Or), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Or( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Or( - Avx.LoadVector256((Int64*)(pClsVar1)), - Avx.LoadVector256((Int64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__OrInt64(); - var result = Avx2.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__OrInt64(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Or( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Or(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Or( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Or( - Avx.LoadVector256((Int64*)(&test._fld1)), - Avx.LoadVector256((Int64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((long)(left[0] | right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((long)(left[i] | right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Or)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.SByte.cs deleted file mode 100644 index a355137baa94..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.SByte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void OrSByte() - { - var test = new SimpleBinaryOpTest__OrSByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__OrSByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__OrSByte testClass) - { - var result = Avx2.Or(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__OrSByte testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Or( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__OrSByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__OrSByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Or( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Or( - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Or( - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Or), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Or), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Or), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Or( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Or( - Avx.LoadVector256((SByte*)(pClsVar1)), - Avx.LoadVector256((SByte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__OrSByte(); - var result = Avx2.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__OrSByte(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Or( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Or(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Or( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Or( - Avx.LoadVector256((SByte*)(&test._fld1)), - Avx.LoadVector256((SByte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((sbyte)(left[0] | right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((sbyte)(left[i] | right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Or)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.UInt16.cs deleted file mode 100644 index 47d03db7ea73..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.UInt16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void OrUInt16() - { - var test = new SimpleBinaryOpTest__OrUInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__OrUInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__OrUInt16 testClass) - { - var result = Avx2.Or(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__OrUInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Or( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__OrUInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__OrUInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Or( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Or( - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Or( - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Or), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Or), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Or), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Or( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Or( - Avx.LoadVector256((UInt16*)(pClsVar1)), - Avx.LoadVector256((UInt16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__OrUInt16(); - var result = Avx2.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__OrUInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Or( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Or(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Or( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Or( - Avx.LoadVector256((UInt16*)(&test._fld1)), - Avx.LoadVector256((UInt16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((ushort)(left[0] | right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((ushort)(left[i] | right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Or)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.UInt32.cs deleted file mode 100644 index 76a6b9282cde..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.UInt32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void OrUInt32() - { - var test = new SimpleBinaryOpTest__OrUInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__OrUInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__OrUInt32 testClass) - { - var result = Avx2.Or(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__OrUInt32 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Or( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__OrUInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__OrUInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Or( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Or( - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Or( - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Or), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Or), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Or), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Or( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Or( - Avx.LoadVector256((UInt32*)(pClsVar1)), - Avx.LoadVector256((UInt32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__OrUInt32(); - var result = Avx2.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__OrUInt32(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Or( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Or(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Or( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Or( - Avx.LoadVector256((UInt32*)(&test._fld1)), - Avx.LoadVector256((UInt32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((uint)(left[0] | right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((uint)(left[i] | right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Or)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.UInt64.cs deleted file mode 100644 index 323e99c5c140..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.UInt64.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void OrUInt64() - { - var test = new SimpleBinaryOpTest__OrUInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__OrUInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt64[] inArray1, UInt64[] inArray2, UInt64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__OrUInt64 testClass) - { - var result = Avx2.Or(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__OrUInt64 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Or( - Avx.LoadVector256((UInt64*)(pFld1)), - Avx.LoadVector256((UInt64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__OrUInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__OrUInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Or( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Or( - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Or( - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Or), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Or), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Or), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Or( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Or( - Avx.LoadVector256((UInt64*)(pClsVar1)), - Avx.LoadVector256((UInt64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__OrUInt64(); - var result = Avx2.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__OrUInt64(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Or( - Avx.LoadVector256((UInt64*)(pFld1)), - Avx.LoadVector256((UInt64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Or(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Or( - Avx.LoadVector256((UInt64*)(pFld1)), - Avx.LoadVector256((UInt64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Or( - Avx.LoadVector256((UInt64*)(&test._fld1)), - Avx.LoadVector256((UInt64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt64[] left, UInt64[] right, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((ulong)(left[0] | right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((ulong)(left[i] | right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Or)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/PackSignedSaturate.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/PackSignedSaturate.Int16.cs deleted file mode 100644 index fc2e97a8a9dc..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/PackSignedSaturate.Int16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void PackSignedSaturateInt16() - { - var test = new SimpleBinaryOpTest__PackSignedSaturateInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__PackSignedSaturateInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__PackSignedSaturateInt16 testClass) - { - var result = Avx2.PackSignedSaturate(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__PackSignedSaturateInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.PackSignedSaturate( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__PackSignedSaturateInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__PackSignedSaturateInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.PackSignedSaturate( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.PackSignedSaturate( - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.PackSignedSaturate( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.PackSignedSaturate), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.PackSignedSaturate), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.PackSignedSaturate), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.PackSignedSaturate( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.PackSignedSaturate( - Avx.LoadVector256((Int32*)(pClsVar1)), - Avx.LoadVector256((Int32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.PackSignedSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.PackSignedSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.PackSignedSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__PackSignedSaturateInt16(); - var result = Avx2.PackSignedSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__PackSignedSaturateInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.PackSignedSaturate( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.PackSignedSaturate(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.PackSignedSaturate( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.PackSignedSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.PackSignedSaturate( - Avx.LoadVector256((Int32*)(&test._fld1)), - Avx.LoadVector256((Int32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (short)Math.Clamp(left[0], short.MinValue, short.MaxValue)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (i < 4 ? (short)Math.Clamp(left[i], short.MinValue, short.MaxValue) : (i < 8 && i > 3 ? (short)Math.Clamp(right[i%4], short.MinValue, short.MaxValue) : (i < 12 && i > 7 ? (short)Math.Clamp(left[i-4], short.MinValue, short.MaxValue) : (short)Math.Clamp(right[i-8], short.MinValue, short.MaxValue))))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.PackSignedSaturate)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/PackSignedSaturate.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/PackSignedSaturate.SByte.cs deleted file mode 100644 index 6d2760d95476..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/PackSignedSaturate.SByte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void PackSignedSaturateSByte() - { - var test = new SimpleBinaryOpTest__PackSignedSaturateSByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__PackSignedSaturateSByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__PackSignedSaturateSByte testClass) - { - var result = Avx2.PackSignedSaturate(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__PackSignedSaturateSByte testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.PackSignedSaturate( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__PackSignedSaturateSByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__PackSignedSaturateSByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.PackSignedSaturate( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.PackSignedSaturate( - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.PackSignedSaturate( - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.PackSignedSaturate), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.PackSignedSaturate), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.PackSignedSaturate), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.PackSignedSaturate( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.PackSignedSaturate( - Avx.LoadVector256((Int16*)(pClsVar1)), - Avx.LoadVector256((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.PackSignedSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.PackSignedSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.PackSignedSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__PackSignedSaturateSByte(); - var result = Avx2.PackSignedSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__PackSignedSaturateSByte(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.PackSignedSaturate( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.PackSignedSaturate(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.PackSignedSaturate( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.PackSignedSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.PackSignedSaturate( - Avx.LoadVector256((Int16*)(&test._fld1)), - Avx.LoadVector256((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (sbyte)Math.Clamp(left[0], sbyte.MinValue, sbyte.MaxValue)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (i < 8 ? (sbyte)Math.Clamp(left[i], sbyte.MinValue, sbyte.MaxValue) : (i < 16 && i > 7 ? (sbyte)Math.Clamp(right[i%8], sbyte.MinValue, sbyte.MaxValue) : (i < 24 && i > 15 ? (sbyte)Math.Clamp(left[i-8], sbyte.MinValue, sbyte.MaxValue) : (sbyte)Math.Clamp(right[i-16], sbyte.MinValue, sbyte.MaxValue))))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.PackSignedSaturate)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/PackUnsignedSaturate.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/PackUnsignedSaturate.Byte.cs deleted file mode 100644 index 2ff72da7de19..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/PackUnsignedSaturate.Byte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void PackUnsignedSaturateByte() - { - var test = new SimpleBinaryOpTest__PackUnsignedSaturateByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__PackUnsignedSaturateByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__PackUnsignedSaturateByte testClass) - { - var result = Avx2.PackUnsignedSaturate(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__PackUnsignedSaturateByte testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.PackUnsignedSaturate( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__PackUnsignedSaturateByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__PackUnsignedSaturateByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.PackUnsignedSaturate( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.PackUnsignedSaturate( - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.PackUnsignedSaturate( - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.PackUnsignedSaturate), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.PackUnsignedSaturate), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.PackUnsignedSaturate), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.PackUnsignedSaturate( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.PackUnsignedSaturate( - Avx.LoadVector256((Int16*)(pClsVar1)), - Avx.LoadVector256((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.PackUnsignedSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.PackUnsignedSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.PackUnsignedSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__PackUnsignedSaturateByte(); - var result = Avx2.PackUnsignedSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__PackUnsignedSaturateByte(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.PackUnsignedSaturate( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.PackUnsignedSaturate(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.PackUnsignedSaturate( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.PackUnsignedSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.PackUnsignedSaturate( - Avx.LoadVector256((Int16*)(&test._fld1)), - Avx.LoadVector256((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (byte)Math.Clamp(left[0], byte.MinValue, byte.MaxValue)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (i < 8 ? (byte)Math.Clamp(left[i], byte.MinValue, byte.MaxValue) : (i < 16 && i > 7 ? (byte)Math.Clamp(right[i%8], byte.MinValue, byte.MaxValue) : (i < 24 && i > 15 ? (byte)Math.Clamp(left[i-8], byte.MinValue, byte.MaxValue) : (byte)Math.Clamp(right[i-16], byte.MinValue, byte.MaxValue))))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.PackUnsignedSaturate)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/PackUnsignedSaturate.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/PackUnsignedSaturate.UInt16.cs deleted file mode 100644 index bde0f33ddc00..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/PackUnsignedSaturate.UInt16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void PackUnsignedSaturateUInt16() - { - var test = new SimpleBinaryOpTest__PackUnsignedSaturateUInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__PackUnsignedSaturateUInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__PackUnsignedSaturateUInt16 testClass) - { - var result = Avx2.PackUnsignedSaturate(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__PackUnsignedSaturateUInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.PackUnsignedSaturate( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__PackUnsignedSaturateUInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__PackUnsignedSaturateUInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.PackUnsignedSaturate( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.PackUnsignedSaturate( - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.PackUnsignedSaturate( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.PackUnsignedSaturate), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.PackUnsignedSaturate), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.PackUnsignedSaturate), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.PackUnsignedSaturate( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.PackUnsignedSaturate( - Avx.LoadVector256((Int32*)(pClsVar1)), - Avx.LoadVector256((Int32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.PackUnsignedSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.PackUnsignedSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.PackUnsignedSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__PackUnsignedSaturateUInt16(); - var result = Avx2.PackUnsignedSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__PackUnsignedSaturateUInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.PackUnsignedSaturate( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.PackUnsignedSaturate(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.PackUnsignedSaturate( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.PackUnsignedSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.PackUnsignedSaturate( - Avx.LoadVector256((Int32*)(&test._fld1)), - Avx.LoadVector256((Int32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (ushort)Math.Clamp(left[0], ushort.MinValue, ushort.MaxValue)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (i < 4 ? (ushort)Math.Clamp(left[i], ushort.MinValue, ushort.MaxValue) : (i < 8 && i > 3 ? (ushort)Math.Clamp(right[i%4], ushort.MinValue, ushort.MaxValue) : (i < 12 && i > 7 ? (ushort)Math.Clamp(left[i-4], ushort.MinValue, ushort.MaxValue) : (ushort)Math.Clamp(right[i-8], ushort.MinValue, ushort.MaxValue))))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.PackUnsignedSaturate)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Permute2x128.Int32.2.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Permute2x128.Int32.2.cs deleted file mode 100644 index e71264a2d801..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Permute2x128.Int32.2.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void Permute2x128Int322() - { - var test = new ImmBinaryOpTest__Permute2x128Int322(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__Permute2x128Int322 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__Permute2x128Int322 testClass) - { - var result = Avx2.Permute2x128(_fld1, _fld2, 2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__Permute2x128Int322() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__Permute2x128Int322() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Permute2x128( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Permute2x128( - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Permute2x128( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Permute2x128), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Permute2x128), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Permute2x128), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Permute2x128( - _clsVar1, - _clsVar2, - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Permute2x128(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Permute2x128(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Permute2x128(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__Permute2x128Int322(); - var result = Avx2.Permute2x128(test._fld1, test._fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Permute2x128(_fld1, _fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Permute2x128(test._fld1, test._fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != right[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (i > 3 ? (result[i] != left[i - 4]) : (result[i] != right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Permute2x128)}(Vector256.2, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Permute2x128.Int64.2.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Permute2x128.Int64.2.cs deleted file mode 100644 index 2babbbdbee78..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Permute2x128.Int64.2.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void Permute2x128Int642() - { - var test = new ImmBinaryOpTest__Permute2x128Int642(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__Permute2x128Int642 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__Permute2x128Int642 testClass) - { - var result = Avx2.Permute2x128(_fld1, _fld2, 2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__Permute2x128Int642() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__Permute2x128Int642() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Permute2x128( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Permute2x128( - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Permute2x128( - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Permute2x128), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Permute2x128), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Permute2x128), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Permute2x128( - _clsVar1, - _clsVar2, - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Permute2x128(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx2.Permute2x128(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx2.Permute2x128(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__Permute2x128Int642(); - var result = Avx2.Permute2x128(test._fld1, test._fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Permute2x128(_fld1, _fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Permute2x128(test._fld1, test._fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != right[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (i > 1 ? (result[i] != left[i - 2]) : (result[i] != right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Permute2x128)}(Vector256.2, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Permute2x128.UInt32.2.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Permute2x128.UInt32.2.cs deleted file mode 100644 index 841d3f891f49..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Permute2x128.UInt32.2.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void Permute2x128UInt322() - { - var test = new ImmBinaryOpTest__Permute2x128UInt322(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__Permute2x128UInt322 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__Permute2x128UInt322 testClass) - { - var result = Avx2.Permute2x128(_fld1, _fld2, 2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__Permute2x128UInt322() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__Permute2x128UInt322() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Permute2x128( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Permute2x128( - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Permute2x128( - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Permute2x128), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Permute2x128), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Permute2x128), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Permute2x128( - _clsVar1, - _clsVar2, - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Permute2x128(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Permute2x128(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Permute2x128(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__Permute2x128UInt322(); - var result = Avx2.Permute2x128(test._fld1, test._fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Permute2x128(_fld1, _fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Permute2x128(test._fld1, test._fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != right[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (i > 3 ? (result[i] != left[i - 4]) : (result[i] != right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Permute2x128)}(Vector256.2, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Permute2x128.UInt64.2.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Permute2x128.UInt64.2.cs deleted file mode 100644 index d3e836985d8d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Permute2x128.UInt64.2.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void Permute2x128UInt642() - { - var test = new ImmBinaryOpTest__Permute2x128UInt642(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__Permute2x128UInt642 - { - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__Permute2x128UInt642 testClass) - { - var result = Avx2.Permute2x128(_fld1, _fld2, 2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__Permute2x128UInt642() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__Permute2x128UInt642() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Permute2x128( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Permute2x128( - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Permute2x128( - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Permute2x128), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Permute2x128), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Permute2x128), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Permute2x128( - _clsVar1, - _clsVar2, - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Permute2x128(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx2.Permute2x128(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx2.Permute2x128(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__Permute2x128UInt642(); - var result = Avx2.Permute2x128(test._fld1, test._fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Permute2x128(_fld1, _fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Permute2x128(test._fld1, test._fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt64[] left, UInt64[] right, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != right[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (i > 1 ? (result[i] != left[i - 2]) : (result[i] != right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Permute2x128)}(Vector256.2, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int16.1.cs deleted file mode 100644 index 8445b8a66c55..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int16.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogicalInt161() - { - var test = new ImmUnaryOpTest__ShiftLeftLogicalInt161(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogicalInt161 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogicalInt161 testClass) - { - var result = Avx2.ShiftLeftLogical(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data = new Int16[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogicalInt161() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogicalInt161() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftLeftLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftLeftLogical( - Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftLeftLogical( - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftLeftLogical( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogicalInt161(); - var result = Avx2.ShiftLeftLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftLeftLogical(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftLeftLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int16[] firstOp, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((short)(firstOp[0] << 1) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((short)(firstOp[i] << 1) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftLeftLogical)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int16.16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int16.16.cs deleted file mode 100644 index c3faa44f6445..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int16.16.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogicalInt1616() - { - var test = new ImmUnaryOpTest__ShiftLeftLogicalInt1616(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogicalInt1616 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogicalInt1616 testClass) - { - var result = Avx2.ShiftLeftLogical(_fld, 16); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data = new Int16[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogicalInt1616() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogicalInt1616() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftLeftLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftLeftLogical( - Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftLeftLogical( - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftLeftLogical( - _clsVar, - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftLeftLogical(firstOp, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical(firstOp, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical(firstOp, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogicalInt1616(); - var result = Avx2.ShiftLeftLogical(test._fld, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftLeftLogical(_fld, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftLeftLogical(test._fld, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int16[] firstOp, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (0 != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (0 != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftLeftLogical)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int32.1.cs deleted file mode 100644 index 571aeaec54a8..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int32.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogicalInt321() - { - var test = new ImmUnaryOpTest__ShiftLeftLogicalInt321(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogicalInt321 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogicalInt321 testClass) - { - var result = Avx2.ShiftLeftLogical(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data = new Int32[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogicalInt321() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogicalInt321() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftLeftLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftLeftLogical( - Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftLeftLogical( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftLeftLogical( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogicalInt321(); - var result = Avx2.ShiftLeftLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftLeftLogical(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftLeftLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int32[] firstOp, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((int)(firstOp[0] << 1) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((int)(firstOp[i] << 1) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftLeftLogical)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int32.32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int32.32.cs deleted file mode 100644 index c7c6b5a02b0f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int32.32.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogicalInt3232() - { - var test = new ImmUnaryOpTest__ShiftLeftLogicalInt3232(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogicalInt3232 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogicalInt3232 testClass) - { - var result = Avx2.ShiftLeftLogical(_fld, 32); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data = new Int32[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogicalInt3232() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogicalInt3232() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftLeftLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftLeftLogical( - Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftLeftLogical( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftLeftLogical( - _clsVar, - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftLeftLogical(firstOp, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical(firstOp, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical(firstOp, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogicalInt3232(); - var result = Avx2.ShiftLeftLogical(test._fld, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftLeftLogical(_fld, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftLeftLogical(test._fld, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int32[] firstOp, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (0 != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (0 != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftLeftLogical)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int64.1.cs deleted file mode 100644 index c897a2a62196..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int64.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogicalInt641() - { - var test = new ImmUnaryOpTest__ShiftLeftLogicalInt641(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogicalInt641 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogicalInt641 testClass) - { - var result = Avx2.ShiftLeftLogical(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data = new Int64[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogicalInt641() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogicalInt641() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftLeftLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftLeftLogical( - Avx.LoadVector256((Int64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftLeftLogical( - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftLeftLogical( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Int64*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogicalInt641(); - var result = Avx2.ShiftLeftLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftLeftLogical(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftLeftLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int64[] firstOp, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((long)(firstOp[0] << 1) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((long)(firstOp[i] << 1) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftLeftLogical)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int64.64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int64.64.cs deleted file mode 100644 index a6c057c20035..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int64.64.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogicalInt6464() - { - var test = new ImmUnaryOpTest__ShiftLeftLogicalInt6464(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogicalInt6464 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogicalInt6464 testClass) - { - var result = Avx2.ShiftLeftLogical(_fld, 64); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data = new Int64[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogicalInt6464() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogicalInt6464() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftLeftLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 64 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftLeftLogical( - Avx.LoadVector256((Int64*)(_dataTable.inArrayPtr)), - 64 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftLeftLogical( - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArrayPtr)), - 64 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)64 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int64*)(_dataTable.inArrayPtr)), - (byte)64 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArrayPtr)), - (byte)64 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftLeftLogical( - _clsVar, - 64 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftLeftLogical(firstOp, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Int64*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical(firstOp, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical(firstOp, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogicalInt6464(); - var result = Avx2.ShiftLeftLogical(test._fld, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftLeftLogical(_fld, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftLeftLogical(test._fld, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int64[] firstOp, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (0 != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (0 != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftLeftLogical)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt16.1.cs deleted file mode 100644 index fbec55862bb0..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt16.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogicalUInt161() - { - var test = new ImmUnaryOpTest__ShiftLeftLogicalUInt161(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogicalUInt161 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogicalUInt161 testClass) - { - var result = Avx2.ShiftLeftLogical(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data = new UInt16[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogicalUInt161() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogicalUInt161() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftLeftLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftLeftLogical( - Avx.LoadVector256((UInt16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftLeftLogical( - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftLeftLogical( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((UInt16*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogicalUInt161(); - var result = Avx2.ShiftLeftLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftLeftLogical(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftLeftLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt16[] firstOp, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((ushort)(firstOp[0] << 1) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((ushort)(firstOp[i] << 1) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftLeftLogical)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt16.16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt16.16.cs deleted file mode 100644 index 8afb117dad3a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt16.16.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogicalUInt1616() - { - var test = new ImmUnaryOpTest__ShiftLeftLogicalUInt1616(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogicalUInt1616 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogicalUInt1616 testClass) - { - var result = Avx2.ShiftLeftLogical(_fld, 16); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data = new UInt16[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogicalUInt1616() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogicalUInt1616() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftLeftLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftLeftLogical( - Avx.LoadVector256((UInt16*)(_dataTable.inArrayPtr)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftLeftLogical( - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArrayPtr)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt16*)(_dataTable.inArrayPtr)), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArrayPtr)), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftLeftLogical( - _clsVar, - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftLeftLogical(firstOp, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((UInt16*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical(firstOp, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical(firstOp, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogicalUInt1616(); - var result = Avx2.ShiftLeftLogical(test._fld, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftLeftLogical(_fld, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftLeftLogical(test._fld, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt16[] firstOp, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (0 != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (0 != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftLeftLogical)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt32.1.cs deleted file mode 100644 index 8f4515884f08..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt32.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogicalUInt321() - { - var test = new ImmUnaryOpTest__ShiftLeftLogicalUInt321(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogicalUInt321 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogicalUInt321 testClass) - { - var result = Avx2.ShiftLeftLogical(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data = new UInt32[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogicalUInt321() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogicalUInt321() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftLeftLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftLeftLogical( - Avx.LoadVector256((UInt32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftLeftLogical( - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftLeftLogical( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((UInt32*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogicalUInt321(); - var result = Avx2.ShiftLeftLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftLeftLogical(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftLeftLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt32[] firstOp, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((uint)(firstOp[0] << 1) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((uint)(firstOp[i] << 1) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftLeftLogical)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt32.32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt32.32.cs deleted file mode 100644 index c84d457ff8f5..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt32.32.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogicalUInt3232() - { - var test = new ImmUnaryOpTest__ShiftLeftLogicalUInt3232(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogicalUInt3232 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogicalUInt3232 testClass) - { - var result = Avx2.ShiftLeftLogical(_fld, 32); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data = new UInt32[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogicalUInt3232() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogicalUInt3232() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftLeftLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftLeftLogical( - Avx.LoadVector256((UInt32*)(_dataTable.inArrayPtr)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftLeftLogical( - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArrayPtr)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt32*)(_dataTable.inArrayPtr)), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArrayPtr)), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftLeftLogical( - _clsVar, - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftLeftLogical(firstOp, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((UInt32*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical(firstOp, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical(firstOp, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogicalUInt3232(); - var result = Avx2.ShiftLeftLogical(test._fld, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftLeftLogical(_fld, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftLeftLogical(test._fld, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt32[] firstOp, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (0 != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (0!= result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftLeftLogical)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt64.1.cs deleted file mode 100644 index 316d7e2f7b2f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt64.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogicalUInt641() - { - var test = new ImmUnaryOpTest__ShiftLeftLogicalUInt641(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogicalUInt641 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogicalUInt641 testClass) - { - var result = Avx2.ShiftLeftLogical(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data = new UInt64[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogicalUInt641() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogicalUInt641() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftLeftLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftLeftLogical( - Avx.LoadVector256((UInt64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftLeftLogical( - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftLeftLogical( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((UInt64*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogicalUInt641(); - var result = Avx2.ShiftLeftLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftLeftLogical(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftLeftLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt64[] firstOp, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((ulong)(firstOp[0] << 1) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((ulong)(firstOp[i] << 1) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftLeftLogical)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt64.64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt64.64.cs deleted file mode 100644 index f97b3cb15726..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt64.64.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogicalUInt6464() - { - var test = new ImmUnaryOpTest__ShiftLeftLogicalUInt6464(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogicalUInt6464 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogicalUInt6464 testClass) - { - var result = Avx2.ShiftLeftLogical(_fld, 64); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data = new UInt64[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogicalUInt6464() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogicalUInt6464() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftLeftLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 64 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftLeftLogical( - Avx.LoadVector256((UInt64*)(_dataTable.inArrayPtr)), - 64 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftLeftLogical( - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArrayPtr)), - 64 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)64 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt64*)(_dataTable.inArrayPtr)), - (byte)64 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArrayPtr)), - (byte)64 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftLeftLogical( - _clsVar, - 64 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftLeftLogical(firstOp, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((UInt64*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical(firstOp, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical(firstOp, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogicalUInt6464(); - var result = Avx2.ShiftLeftLogical(test._fld, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftLeftLogical(_fld, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftLeftLogical(test._fld, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt64[] firstOp, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (0 != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (0 != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftLeftLogical)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.Byte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.Byte.1.cs deleted file mode 100644 index ee3edeb2650d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.Byte.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogical128BitLaneByte1() - { - var test = new ImmUnaryOpTest__ShiftLeftLogical128BitLaneByte1(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogical128BitLaneByte1 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogical128BitLaneByte1 testClass) - { - var result = Avx2.ShiftLeftLogical128BitLane(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data = new Byte[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogical128BitLaneByte1() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogical128BitLaneByte1() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)8; } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftLeftLogical128BitLane( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftLeftLogical128BitLane( - Avx.LoadVector256((Byte*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftLeftLogical128BitLane( - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Byte*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftLeftLogical128BitLane( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Byte*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogical128BitLaneByte1(); - var result = Avx2.ShiftLeftLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftLeftLogical128BitLane(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftLeftLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray = new Byte[Op1ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray = new Byte[Op1ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Byte[] firstOp, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != 0) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((i == 16 ? result[i] != 0 : result[i] != 8)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftLeftLogical128BitLane)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.Int16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.Int16.1.cs deleted file mode 100644 index 35cdb4a8e5a8..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.Int16.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogical128BitLaneInt161() - { - var test = new ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt161(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt161 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt161 testClass) - { - var result = Avx2.ShiftLeftLogical128BitLane(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data = new Int16[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt161() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt161() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)8; } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftLeftLogical128BitLane( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftLeftLogical128BitLane( - Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftLeftLogical128BitLane( - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftLeftLogical128BitLane( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt161(); - var result = Avx2.ShiftLeftLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftLeftLogical128BitLane(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftLeftLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int16[] firstOp, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != 2048) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != 2048) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftLeftLogical128BitLane)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.Int32.1.cs deleted file mode 100644 index 574e71616825..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.Int32.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogical128BitLaneInt321() - { - var test = new ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt321(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt321 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt321 testClass) - { - var result = Avx2.ShiftLeftLogical128BitLane(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data = new Int32[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt321() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt321() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)8; } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftLeftLogical128BitLane( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftLeftLogical128BitLane( - Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftLeftLogical128BitLane( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftLeftLogical128BitLane( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt321(); - var result = Avx2.ShiftLeftLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftLeftLogical128BitLane(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftLeftLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int32[] firstOp, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != 2048) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != 2048) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftLeftLogical128BitLane)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.Int64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.Int64.1.cs deleted file mode 100644 index 524012ec7e3c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.Int64.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogical128BitLaneInt641() - { - var test = new ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt641(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt641 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt641 testClass) - { - var result = Avx2.ShiftLeftLogical128BitLane(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data = new Int64[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt641() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt641() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)8; } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftLeftLogical128BitLane( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftLeftLogical128BitLane( - Avx.LoadVector256((Int64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftLeftLogical128BitLane( - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftLeftLogical128BitLane( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Int64*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt641(); - var result = Avx2.ShiftLeftLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftLeftLogical128BitLane(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftLeftLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int64[] firstOp, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != 2048) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != 2048) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftLeftLogical128BitLane)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.SByte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.SByte.1.cs deleted file mode 100644 index 112845ee1570..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.SByte.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogical128BitLaneSByte1() - { - var test = new ImmUnaryOpTest__ShiftLeftLogical128BitLaneSByte1(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogical128BitLaneSByte1 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogical128BitLaneSByte1 testClass) - { - var result = Avx2.ShiftLeftLogical128BitLane(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data = new SByte[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogical128BitLaneSByte1() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogical128BitLaneSByte1() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)8; } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftLeftLogical128BitLane( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftLeftLogical128BitLane( - Avx.LoadVector256((SByte*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftLeftLogical128BitLane( - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((SByte*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftLeftLogical128BitLane( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((SByte*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogical128BitLaneSByte1(); - var result = Avx2.ShiftLeftLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftLeftLogical128BitLane(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftLeftLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray = new SByte[Op1ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray = new SByte[Op1ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(SByte[] firstOp, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != 0) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((i == 16 ? result[i] != 0 : result[i] != 8)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftLeftLogical128BitLane)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.UInt16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.UInt16.1.cs deleted file mode 100644 index 31b9d615991a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.UInt16.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogical128BitLaneUInt161() - { - var test = new ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt161(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt161 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt161 testClass) - { - var result = Avx2.ShiftLeftLogical128BitLane(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data = new UInt16[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt161() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt161() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)8; } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftLeftLogical128BitLane( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftLeftLogical128BitLane( - Avx.LoadVector256((UInt16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftLeftLogical128BitLane( - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftLeftLogical128BitLane( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((UInt16*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt161(); - var result = Avx2.ShiftLeftLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftLeftLogical128BitLane(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftLeftLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt16[] firstOp, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != 2048) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != 2048) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftLeftLogical128BitLane)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.UInt32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.UInt32.1.cs deleted file mode 100644 index 6b1f0eb85f6f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.UInt32.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogical128BitLaneUInt321() - { - var test = new ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt321(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt321 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt321 testClass) - { - var result = Avx2.ShiftLeftLogical128BitLane(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data = new UInt32[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt321() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt321() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)8; } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftLeftLogical128BitLane( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftLeftLogical128BitLane( - Avx.LoadVector256((UInt32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftLeftLogical128BitLane( - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftLeftLogical128BitLane( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((UInt32*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt321(); - var result = Avx2.ShiftLeftLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftLeftLogical128BitLane(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftLeftLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt32[] firstOp, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != 2048) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != 2048) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftLeftLogical128BitLane)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.UInt64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.UInt64.1.cs deleted file mode 100644 index a51333e8ed2c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.UInt64.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogical128BitLaneUInt641() - { - var test = new ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt641(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt641 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt641 testClass) - { - var result = Avx2.ShiftLeftLogical128BitLane(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data = new UInt64[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt641() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt641() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)8; } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftLeftLogical128BitLane( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftLeftLogical128BitLane( - Avx.LoadVector256((UInt64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftLeftLogical128BitLane( - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftLeftLogical128BitLane( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((UInt64*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt641(); - var result = Avx2.ShiftLeftLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftLeftLogical128BitLane(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftLeftLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt64[] firstOp, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != 2048) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != 2048) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftLeftLogical128BitLane)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightArithmetic.Int16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightArithmetic.Int16.1.cs deleted file mode 100644 index 1f2181bcfff2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightArithmetic.Int16.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightArithmeticInt161() - { - var test = new ImmUnaryOpTest__ShiftRightArithmeticInt161(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightArithmeticInt161 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightArithmeticInt161 testClass) - { - var result = Avx2.ShiftRightArithmetic(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data = new Int16[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightArithmeticInt161() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightArithmeticInt161() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftRightArithmetic( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftRightArithmetic( - Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftRightArithmetic( - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightArithmetic), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightArithmetic), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightArithmetic), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftRightArithmetic( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftRightArithmetic(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightArithmetic(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightArithmetic(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightArithmeticInt161(); - var result = Avx2.ShiftRightArithmetic(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftRightArithmetic(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftRightArithmetic(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int16[] firstOp, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((short)(firstOp[0] >> 1) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((short)(firstOp[i] >> 1) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftRightArithmetic)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightArithmetic.Int16.16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightArithmetic.Int16.16.cs deleted file mode 100644 index 305a96937554..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightArithmetic.Int16.16.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightArithmeticInt1616() - { - var test = new ImmUnaryOpTest__ShiftRightArithmeticInt1616(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightArithmeticInt1616 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightArithmeticInt1616 testClass) - { - var result = Avx2.ShiftRightArithmetic(_fld, 16); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data = new Int16[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightArithmeticInt1616() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightArithmeticInt1616() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftRightArithmetic( - Unsafe.Read>(_dataTable.inArrayPtr), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftRightArithmetic( - Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftRightArithmetic( - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightArithmetic), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightArithmetic), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightArithmetic), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftRightArithmetic( - _clsVar, - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftRightArithmetic(firstOp, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightArithmetic(firstOp, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightArithmetic(firstOp, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightArithmeticInt1616(); - var result = Avx2.ShiftRightArithmetic(test._fld, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftRightArithmetic(_fld, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftRightArithmetic(test._fld, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int16[] firstOp, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((short)(firstOp[0] >> 15) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((short)(firstOp[i] >> 15) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftRightArithmetic)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightArithmetic.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightArithmetic.Int32.1.cs deleted file mode 100644 index 2a95b3e02037..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightArithmetic.Int32.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightArithmeticInt321() - { - var test = new ImmUnaryOpTest__ShiftRightArithmeticInt321(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightArithmeticInt321 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightArithmeticInt321 testClass) - { - var result = Avx2.ShiftRightArithmetic(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data = new Int32[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightArithmeticInt321() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightArithmeticInt321() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftRightArithmetic( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftRightArithmetic( - Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftRightArithmetic( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightArithmetic), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightArithmetic), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightArithmetic), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftRightArithmetic( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftRightArithmetic(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightArithmetic(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightArithmetic(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightArithmeticInt321(); - var result = Avx2.ShiftRightArithmetic(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftRightArithmetic(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftRightArithmetic(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int32[] firstOp, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((int)(firstOp[0] >> 1) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((int)(firstOp[i] >> 1) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftRightArithmetic)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightArithmetic.Int32.32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightArithmetic.Int32.32.cs deleted file mode 100644 index a96bc4c09bce..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightArithmetic.Int32.32.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightArithmeticInt3232() - { - var test = new ImmUnaryOpTest__ShiftRightArithmeticInt3232(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightArithmeticInt3232 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightArithmeticInt3232 testClass) - { - var result = Avx2.ShiftRightArithmetic(_fld, 32); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data = new Int32[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightArithmeticInt3232() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightArithmeticInt3232() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftRightArithmetic( - Unsafe.Read>(_dataTable.inArrayPtr), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftRightArithmetic( - Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftRightArithmetic( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightArithmetic), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightArithmetic), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightArithmetic), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftRightArithmetic( - _clsVar, - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftRightArithmetic(firstOp, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightArithmetic(firstOp, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightArithmetic(firstOp, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightArithmeticInt3232(); - var result = Avx2.ShiftRightArithmetic(test._fld, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftRightArithmetic(_fld, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftRightArithmetic(test._fld, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int32[] firstOp, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((int)(firstOp[0] >> 31) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((int)(firstOp[i] >> 31) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftRightArithmetic)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightArithmeticVariable.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightArithmeticVariable.Int32.cs deleted file mode 100644 index ee5c8e009e10..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightArithmeticVariable.Int32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightArithmeticVariableInt32() - { - var test = new SimpleBinaryOpTest__ShiftRightArithmeticVariableInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__ShiftRightArithmeticVariableInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, UInt32[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (TestLibrary.Generator.GetUInt32()%32); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__ShiftRightArithmeticVariableInt32 testClass) - { - var result = Avx2.ShiftRightArithmeticVariable(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__ShiftRightArithmeticVariableInt32 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.ShiftRightArithmeticVariable( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__ShiftRightArithmeticVariableInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (TestLibrary.Generator.GetUInt32()%32); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__ShiftRightArithmeticVariableInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (TestLibrary.Generator.GetUInt32()%32); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (TestLibrary.Generator.GetUInt32()%32); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftRightArithmeticVariable( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftRightArithmeticVariable( - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftRightArithmeticVariable( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightArithmeticVariable), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightArithmeticVariable), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightArithmeticVariable), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftRightArithmeticVariable( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.ShiftRightArithmeticVariable( - Avx.LoadVector256((Int32*)(pClsVar1)), - Avx.LoadVector256((UInt32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.ShiftRightArithmeticVariable(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.ShiftRightArithmeticVariable(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.ShiftRightArithmeticVariable(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__ShiftRightArithmeticVariableInt32(); - var result = Avx2.ShiftRightArithmeticVariable(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__ShiftRightArithmeticVariableInt32(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.ShiftRightArithmeticVariable( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftRightArithmeticVariable(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.ShiftRightArithmeticVariable( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftRightArithmeticVariable(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftRightArithmeticVariable( - Avx.LoadVector256((Int32*)(&test._fld1)), - Avx.LoadVector256((UInt32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, UInt32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((int)(left[0] >> (int)right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((int)(left[i] >> (int)right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftRightArithmeticVariable)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int16.1.cs deleted file mode 100644 index a0d7c79bdaa2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int16.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogicalInt161() - { - var test = new ImmUnaryOpTest__ShiftRightLogicalInt161(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogicalInt161 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogicalInt161 testClass) - { - var result = Avx2.ShiftRightLogical(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data = new Int16[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogicalInt161() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogicalInt161() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftRightLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftRightLogical( - Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftRightLogical( - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftRightLogical( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogicalInt161(); - var result = Avx2.ShiftRightLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftRightLogical(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftRightLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int16[] firstOp, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((short)(firstOp[0] >> 1) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((short)(firstOp[i] >> 1) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftRightLogical)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int16.16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int16.16.cs deleted file mode 100644 index b9bd3d7257ce..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int16.16.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogicalInt1616() - { - var test = new ImmUnaryOpTest__ShiftRightLogicalInt1616(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogicalInt1616 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogicalInt1616 testClass) - { - var result = Avx2.ShiftRightLogical(_fld, 16); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data = new Int16[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogicalInt1616() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogicalInt1616() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftRightLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftRightLogical( - Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftRightLogical( - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftRightLogical( - _clsVar, - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftRightLogical(firstOp, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical(firstOp, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical(firstOp, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogicalInt1616(); - var result = Avx2.ShiftRightLogical(test._fld, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftRightLogical(_fld, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftRightLogical(test._fld, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int16[] firstOp, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (0 != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (0 != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftRightLogical)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int32.1.cs deleted file mode 100644 index e1a48cc4b4b9..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int32.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogicalInt321() - { - var test = new ImmUnaryOpTest__ShiftRightLogicalInt321(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogicalInt321 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogicalInt321 testClass) - { - var result = Avx2.ShiftRightLogical(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data = new Int32[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogicalInt321() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogicalInt321() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftRightLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftRightLogical( - Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftRightLogical( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftRightLogical( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogicalInt321(); - var result = Avx2.ShiftRightLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftRightLogical(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftRightLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int32[] firstOp, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((int)(firstOp[0] >> 1) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((int)(firstOp[i] >> 1) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftRightLogical)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int32.32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int32.32.cs deleted file mode 100644 index bf5f137cf49f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int32.32.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogicalInt3232() - { - var test = new ImmUnaryOpTest__ShiftRightLogicalInt3232(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogicalInt3232 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogicalInt3232 testClass) - { - var result = Avx2.ShiftRightLogical(_fld, 32); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data = new Int32[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogicalInt3232() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogicalInt3232() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftRightLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftRightLogical( - Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftRightLogical( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftRightLogical( - _clsVar, - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftRightLogical(firstOp, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical(firstOp, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical(firstOp, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogicalInt3232(); - var result = Avx2.ShiftRightLogical(test._fld, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftRightLogical(_fld, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftRightLogical(test._fld, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int32[] firstOp, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (0 != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (0 != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftRightLogical)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int64.1.cs deleted file mode 100644 index ce3a00859360..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int64.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogicalInt641() - { - var test = new ImmUnaryOpTest__ShiftRightLogicalInt641(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogicalInt641 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogicalInt641 testClass) - { - var result = Avx2.ShiftRightLogical(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data = new Int64[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogicalInt641() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogicalInt641() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftRightLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftRightLogical( - Avx.LoadVector256((Int64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftRightLogical( - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftRightLogical( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Int64*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogicalInt641(); - var result = Avx2.ShiftRightLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftRightLogical(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftRightLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int64[] firstOp, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((long)(firstOp[0] >> 1) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((long)(firstOp[i] >> 1) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftRightLogical)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int64.64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int64.64.cs deleted file mode 100644 index 5050941fa4fd..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int64.64.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogicalInt6464() - { - var test = new ImmUnaryOpTest__ShiftRightLogicalInt6464(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogicalInt6464 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogicalInt6464 testClass) - { - var result = Avx2.ShiftRightLogical(_fld, 64); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data = new Int64[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogicalInt6464() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogicalInt6464() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftRightLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 64 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftRightLogical( - Avx.LoadVector256((Int64*)(_dataTable.inArrayPtr)), - 64 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftRightLogical( - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArrayPtr)), - 64 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)64 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int64*)(_dataTable.inArrayPtr)), - (byte)64 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArrayPtr)), - (byte)64 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftRightLogical( - _clsVar, - 64 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftRightLogical(firstOp, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Int64*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical(firstOp, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical(firstOp, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogicalInt6464(); - var result = Avx2.ShiftRightLogical(test._fld, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftRightLogical(_fld, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftRightLogical(test._fld, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int64[] firstOp, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (0 != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (0 != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftRightLogical)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt16.1.cs deleted file mode 100644 index 260fe1e7f61d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt16.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogicalUInt161() - { - var test = new ImmUnaryOpTest__ShiftRightLogicalUInt161(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogicalUInt161 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogicalUInt161 testClass) - { - var result = Avx2.ShiftRightLogical(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data = new UInt16[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogicalUInt161() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogicalUInt161() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftRightLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftRightLogical( - Avx.LoadVector256((UInt16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftRightLogical( - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftRightLogical( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((UInt16*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogicalUInt161(); - var result = Avx2.ShiftRightLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftRightLogical(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftRightLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt16[] firstOp, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((ushort)(firstOp[0] >> 1) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((ushort)(firstOp[i] >> 1) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftRightLogical)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt16.16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt16.16.cs deleted file mode 100644 index 52a996cacc6a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt16.16.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogicalUInt1616() - { - var test = new ImmUnaryOpTest__ShiftRightLogicalUInt1616(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogicalUInt1616 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogicalUInt1616 testClass) - { - var result = Avx2.ShiftRightLogical(_fld, 16); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data = new UInt16[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogicalUInt1616() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogicalUInt1616() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftRightLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftRightLogical( - Avx.LoadVector256((UInt16*)(_dataTable.inArrayPtr)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftRightLogical( - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArrayPtr)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt16*)(_dataTable.inArrayPtr)), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArrayPtr)), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftRightLogical( - _clsVar, - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftRightLogical(firstOp, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((UInt16*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical(firstOp, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical(firstOp, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogicalUInt1616(); - var result = Avx2.ShiftRightLogical(test._fld, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftRightLogical(_fld, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftRightLogical(test._fld, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt16[] firstOp, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (0 != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (0 != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftRightLogical)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt32.1.cs deleted file mode 100644 index c0bc62f35f6e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt32.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogicalUInt321() - { - var test = new ImmUnaryOpTest__ShiftRightLogicalUInt321(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogicalUInt321 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogicalUInt321 testClass) - { - var result = Avx2.ShiftRightLogical(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data = new UInt32[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogicalUInt321() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogicalUInt321() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftRightLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftRightLogical( - Avx.LoadVector256((UInt32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftRightLogical( - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftRightLogical( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((UInt32*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogicalUInt321(); - var result = Avx2.ShiftRightLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftRightLogical(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftRightLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt32[] firstOp, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((uint)(firstOp[0] >> 1) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((uint)(firstOp[i] >> 1) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftRightLogical)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt32.32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt32.32.cs deleted file mode 100644 index 99002bf2e4ce..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt32.32.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogicalUInt3232() - { - var test = new ImmUnaryOpTest__ShiftRightLogicalUInt3232(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogicalUInt3232 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogicalUInt3232 testClass) - { - var result = Avx2.ShiftRightLogical(_fld, 32); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data = new UInt32[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogicalUInt3232() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogicalUInt3232() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftRightLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftRightLogical( - Avx.LoadVector256((UInt32*)(_dataTable.inArrayPtr)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftRightLogical( - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArrayPtr)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt32*)(_dataTable.inArrayPtr)), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArrayPtr)), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftRightLogical( - _clsVar, - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftRightLogical(firstOp, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((UInt32*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical(firstOp, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical(firstOp, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogicalUInt3232(); - var result = Avx2.ShiftRightLogical(test._fld, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftRightLogical(_fld, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftRightLogical(test._fld, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt32[] firstOp, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (0 != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (0!= result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftRightLogical)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt64.1.cs deleted file mode 100644 index 40283dad2479..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt64.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogicalUInt641() - { - var test = new ImmUnaryOpTest__ShiftRightLogicalUInt641(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogicalUInt641 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogicalUInt641 testClass) - { - var result = Avx2.ShiftRightLogical(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data = new UInt64[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogicalUInt641() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogicalUInt641() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftRightLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftRightLogical( - Avx.LoadVector256((UInt64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftRightLogical( - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftRightLogical( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((UInt64*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogicalUInt641(); - var result = Avx2.ShiftRightLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftRightLogical(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftRightLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt64[] firstOp, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((ulong)(firstOp[0] >> 1) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((ulong)(firstOp[i] >> 1) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftRightLogical)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt64.64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt64.64.cs deleted file mode 100644 index 989b9364c576..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt64.64.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogicalUInt6464() - { - var test = new ImmUnaryOpTest__ShiftRightLogicalUInt6464(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogicalUInt6464 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogicalUInt6464 testClass) - { - var result = Avx2.ShiftRightLogical(_fld, 64); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data = new UInt64[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogicalUInt6464() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogicalUInt6464() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftRightLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 64 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftRightLogical( - Avx.LoadVector256((UInt64*)(_dataTable.inArrayPtr)), - 64 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftRightLogical( - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArrayPtr)), - 64 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)64 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt64*)(_dataTable.inArrayPtr)), - (byte)64 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArrayPtr)), - (byte)64 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftRightLogical( - _clsVar, - 64 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftRightLogical(firstOp, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((UInt64*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical(firstOp, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical(firstOp, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogicalUInt6464(); - var result = Avx2.ShiftRightLogical(test._fld, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftRightLogical(_fld, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftRightLogical(test._fld, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt64[] firstOp, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (0 != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (0 != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftRightLogical)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.Byte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.Byte.1.cs deleted file mode 100644 index f2deec80be6a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.Byte.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogical128BitLaneByte1() - { - var test = new ImmUnaryOpTest__ShiftRightLogical128BitLaneByte1(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogical128BitLaneByte1 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogical128BitLaneByte1 testClass) - { - var result = Avx2.ShiftRightLogical128BitLane(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data = new Byte[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogical128BitLaneByte1() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogical128BitLaneByte1() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)8; } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftRightLogical128BitLane( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftRightLogical128BitLane( - Avx.LoadVector256((Byte*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftRightLogical128BitLane( - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Byte*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftRightLogical128BitLane( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Byte*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogical128BitLaneByte1(); - var result = Avx2.ShiftRightLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftRightLogical128BitLane(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftRightLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray = new Byte[Op1ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray = new Byte[Op1ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Byte[] firstOp, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != 8) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((i == 31 || i == 15 ? result[i] != 0 : result[i] != 8)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftRightLogical128BitLane)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.Int16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.Int16.1.cs deleted file mode 100644 index 336d62a1f843..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.Int16.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogical128BitLaneInt161() - { - var test = new ImmUnaryOpTest__ShiftRightLogical128BitLaneInt161(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogical128BitLaneInt161 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogical128BitLaneInt161 testClass) - { - var result = Avx2.ShiftRightLogical128BitLane(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data = new Int16[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogical128BitLaneInt161() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogical128BitLaneInt161() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)8; } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftRightLogical128BitLane( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftRightLogical128BitLane( - Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftRightLogical128BitLane( - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftRightLogical128BitLane( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogical128BitLaneInt161(); - var result = Avx2.ShiftRightLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftRightLogical128BitLane(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftRightLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int16[] firstOp, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != 2048) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((i == 7 || i == 15 ? result[i] != 0 : result[i] != 2048)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftRightLogical128BitLane)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.Int32.1.cs deleted file mode 100644 index d2af085de980..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.Int32.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogical128BitLaneInt321() - { - var test = new ImmUnaryOpTest__ShiftRightLogical128BitLaneInt321(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogical128BitLaneInt321 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogical128BitLaneInt321 testClass) - { - var result = Avx2.ShiftRightLogical128BitLane(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data = new Int32[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogical128BitLaneInt321() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogical128BitLaneInt321() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)8; } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftRightLogical128BitLane( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftRightLogical128BitLane( - Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftRightLogical128BitLane( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftRightLogical128BitLane( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogical128BitLaneInt321(); - var result = Avx2.ShiftRightLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftRightLogical128BitLane(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftRightLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int32[] firstOp, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != 134217728) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((i == 3 || i == 7 ? result[i] != 0 : result[i] != 134217728)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftRightLogical128BitLane)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.Int64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.Int64.1.cs deleted file mode 100644 index 9feaf4e33e3c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.Int64.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogical128BitLaneInt641() - { - var test = new ImmUnaryOpTest__ShiftRightLogical128BitLaneInt641(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogical128BitLaneInt641 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogical128BitLaneInt641 testClass) - { - var result = Avx2.ShiftRightLogical128BitLane(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data = new Int64[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogical128BitLaneInt641() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogical128BitLaneInt641() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)8; } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftRightLogical128BitLane( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftRightLogical128BitLane( - Avx.LoadVector256((Int64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftRightLogical128BitLane( - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftRightLogical128BitLane( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Int64*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogical128BitLaneInt641(); - var result = Avx2.ShiftRightLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftRightLogical128BitLane(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftRightLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int64[] firstOp, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != 576460752303423488L) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((i == 2 ? result[i] != 576460752303423488L : result[i] != 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftRightLogical128BitLane)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.SByte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.SByte.1.cs deleted file mode 100644 index a93e6d063316..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.SByte.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogical128BitLaneSByte1() - { - var test = new ImmUnaryOpTest__ShiftRightLogical128BitLaneSByte1(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogical128BitLaneSByte1 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogical128BitLaneSByte1 testClass) - { - var result = Avx2.ShiftRightLogical128BitLane(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data = new SByte[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogical128BitLaneSByte1() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogical128BitLaneSByte1() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)8; } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftRightLogical128BitLane( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftRightLogical128BitLane( - Avx.LoadVector256((SByte*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftRightLogical128BitLane( - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((SByte*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftRightLogical128BitLane( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((SByte*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogical128BitLaneSByte1(); - var result = Avx2.ShiftRightLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftRightLogical128BitLane(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftRightLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray = new SByte[Op1ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray = new SByte[Op1ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(SByte[] firstOp, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != 8) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((i == 31 || i == 15 ? result[i] != 0 : result[i] != 8)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftRightLogical128BitLane)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.UInt16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.UInt16.1.cs deleted file mode 100644 index 696753ddbe83..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.UInt16.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogical128BitLaneUInt161() - { - var test = new ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt161(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt161 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt161 testClass) - { - var result = Avx2.ShiftRightLogical128BitLane(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data = new UInt16[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt161() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt161() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)8; } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftRightLogical128BitLane( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftRightLogical128BitLane( - Avx.LoadVector256((UInt16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftRightLogical128BitLane( - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftRightLogical128BitLane( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((UInt16*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt161(); - var result = Avx2.ShiftRightLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftRightLogical128BitLane(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftRightLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt16[] firstOp, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != 2048) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((i == 7 || i == 15 ? result[i] != 0 : result[i] != 2048)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftRightLogical128BitLane)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.UInt32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.UInt32.1.cs deleted file mode 100644 index 380b56865123..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.UInt32.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogical128BitLaneUInt321() - { - var test = new ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt321(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt321 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt321 testClass) - { - var result = Avx2.ShiftRightLogical128BitLane(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data = new UInt32[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt321() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt321() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)8; } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftRightLogical128BitLane( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftRightLogical128BitLane( - Avx.LoadVector256((UInt32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftRightLogical128BitLane( - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftRightLogical128BitLane( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((UInt32*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt321(); - var result = Avx2.ShiftRightLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftRightLogical128BitLane(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftRightLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt32[] firstOp, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != 134217728) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((i == 3 || i == 7 ? result[i] != 0 : result[i] != 134217728)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftRightLogical128BitLane)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.UInt64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.UInt64.1.cs deleted file mode 100644 index 644b17e3ba85..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.UInt64.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogical128BitLaneUInt641() - { - var test = new ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt641(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt641 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt641 testClass) - { - var result = Avx2.ShiftRightLogical128BitLane(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data = new UInt64[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt641() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt641() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)8; } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftRightLogical128BitLane( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftRightLogical128BitLane( - Avx.LoadVector256((UInt64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftRightLogical128BitLane( - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftRightLogical128BitLane( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((UInt64*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArrayPtr)); - var result = Avx2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt641(); - var result = Avx2.ShiftRightLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftRightLogical128BitLane(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftRightLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt64[] firstOp, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != 576460752303423488UL) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((i == 2 ? result[i] != 576460752303423488UL : result[i] != 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftRightLogical128BitLane)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Shuffle.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Shuffle.Byte.cs deleted file mode 100644 index 1432dfcc065d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Shuffle.Byte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShuffleByte() - { - var test = new SimpleBinaryOpTest__ShuffleByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__ShuffleByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__ShuffleByte testClass) - { - var result = Avx2.Shuffle(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__ShuffleByte testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Shuffle( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__ShuffleByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__ShuffleByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Shuffle( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Shuffle( - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Shuffle( - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Shuffle), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Shuffle), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Shuffle), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Shuffle( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Shuffle( - Avx.LoadVector256((Byte*)(pClsVar1)), - Avx.LoadVector256((Byte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Shuffle(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)); - var result = Avx2.Shuffle(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)); - var result = Avx2.Shuffle(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__ShuffleByte(); - var result = Avx2.Shuffle(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__ShuffleByte(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Shuffle( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Shuffle(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Shuffle( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Shuffle(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Shuffle( - Avx.LoadVector256((Byte*)(&test._fld1)), - Avx.LoadVector256((Byte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((right[0] > 127) ? 0 : left[right[0] & 0x0F])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (i < 16 ? (right[i] > 127 ? 0 : left[right[i] & 0x0F]) : (right[i] > 127 ? 0 : left[(right[i] & 0x0F) + 16]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Shuffle)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Shuffle.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Shuffle.Int32.1.cs deleted file mode 100644 index 923d578b8d74..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Shuffle.Int32.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShuffleInt321() - { - var test = new ImmUnaryOpTest__ShuffleInt321(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShuffleInt321 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShuffleInt321 testClass) - { - var result = Avx2.Shuffle(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data = new Int32[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShuffleInt321() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShuffleInt321() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Shuffle( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Shuffle( - Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Shuffle( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Shuffle), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Shuffle), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Shuffle), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Shuffle( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.Shuffle(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)); - var result = Avx2.Shuffle(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)); - var result = Avx2.Shuffle(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShuffleInt321(); - var result = Avx2.Shuffle(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Shuffle(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Shuffle(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int32[] firstOp, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != firstOp[1]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (i < 4 ? firstOp[0] : (i == 4 ? firstOp[5] : firstOp[4]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Shuffle)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Shuffle.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Shuffle.SByte.cs deleted file mode 100644 index d27de61053fa..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Shuffle.SByte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShuffleSByte() - { - var test = new SimpleBinaryOpTest__ShuffleSByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__ShuffleSByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__ShuffleSByte testClass) - { - var result = Avx2.Shuffle(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__ShuffleSByte testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Shuffle( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__ShuffleSByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__ShuffleSByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Shuffle( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Shuffle( - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Shuffle( - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Shuffle), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Shuffle), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Shuffle), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Shuffle( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Shuffle( - Avx.LoadVector256((SByte*)(pClsVar1)), - Avx.LoadVector256((SByte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Shuffle(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx2.Shuffle(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx2.Shuffle(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__ShuffleSByte(); - var result = Avx2.Shuffle(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__ShuffleSByte(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Shuffle( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Shuffle(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Shuffle( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Shuffle(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Shuffle( - Avx.LoadVector256((SByte*)(&test._fld1)), - Avx.LoadVector256((SByte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((right[0] < 0) ? 0 : left[right[0] & 0x0F])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (i < 16 ? (right[i] < 0 ? 0 : left[right[i] & 0x0F]) : (right[i] < 0 ? 0 : left[(right[i] & 0x0F) + 16]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Shuffle)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Shuffle.UInt32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Shuffle.UInt32.1.cs deleted file mode 100644 index 210ec893c9e2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Shuffle.UInt32.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShuffleUInt321() - { - var test = new ImmUnaryOpTest__ShuffleUInt321(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShuffleUInt321 - { - private struct TestStruct - { - public Vector256 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShuffleUInt321 testClass) - { - var result = Avx2.Shuffle(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data = new UInt32[Op1ElementCount]; - - private static Vector256 _clsVar; - - private Vector256 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShuffleUInt321() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShuffleUInt321() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Shuffle( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Shuffle( - Avx.LoadVector256((UInt32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Shuffle( - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Shuffle), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Shuffle), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Shuffle), new Type[] { typeof(Vector256), typeof(byte) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Shuffle( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx2.Shuffle(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Avx.LoadVector256((UInt32*)(_dataTable.inArrayPtr)); - var result = Avx2.Shuffle(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArrayPtr)); - var result = Avx2.Shuffle(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShuffleUInt321(); - var result = Avx2.Shuffle(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Shuffle(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Shuffle(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt32[] firstOp, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != firstOp[1]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (i < 4 ? firstOp[0] : (i == 4 ? firstOp[5] : firstOp[4]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Shuffle)}(Vector256<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Sign.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Sign.Int16.cs deleted file mode 100644 index 15c48d4e21a4..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Sign.Int16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void SignInt16() - { - var test = new SimpleBinaryOpTest__SignInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__SignInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__SignInt16 testClass) - { - var result = Avx2.Sign(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__SignInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Sign( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__SignInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__SignInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Sign( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Sign( - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Sign( - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Sign), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Sign), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Sign), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Sign( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Sign( - Avx.LoadVector256((Int16*)(pClsVar1)), - Avx.LoadVector256((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Sign(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.Sign(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.Sign(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__SignInt16(); - var result = Avx2.Sign(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__SignInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Sign( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Sign(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Sign( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Sign(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Sign( - Avx.LoadVector256((Int16*)(&test._fld1)), - Avx.LoadVector256((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (right[0] < 0 ? (short)(-left[0]) : (right[0] > 0 ? left[0] : 0))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (right[i] < 0 ? (short)(-left[i]) : (right[i] > 0 ? left[i] : 0))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Sign)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Sign.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Sign.Int32.cs deleted file mode 100644 index 9cfb56bddb60..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Sign.Int32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void SignInt32() - { - var test = new SimpleBinaryOpTest__SignInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__SignInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__SignInt32 testClass) - { - var result = Avx2.Sign(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__SignInt32 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Sign( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__SignInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__SignInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Sign( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Sign( - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Sign( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Sign), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Sign), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Sign), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Sign( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Sign( - Avx.LoadVector256((Int32*)(pClsVar1)), - Avx.LoadVector256((Int32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Sign(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Sign(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Sign(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__SignInt32(); - var result = Avx2.Sign(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__SignInt32(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Sign( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Sign(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Sign( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Sign(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Sign( - Avx.LoadVector256((Int32*)(&test._fld1)), - Avx.LoadVector256((Int32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (right[0] < 0 ? (int)(-left[0]) : (right[0] > 0 ? left[0] : 0))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (right[i] < 0 ? (int)(-left[i]) : (right[i] > 0 ? left[i] : 0))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Sign)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Sign.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Sign.SByte.cs deleted file mode 100644 index 8469a392bb86..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Sign.SByte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void SignSByte() - { - var test = new SimpleBinaryOpTest__SignSByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__SignSByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__SignSByte testClass) - { - var result = Avx2.Sign(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__SignSByte testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Sign( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__SignSByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__SignSByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Sign( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Sign( - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Sign( - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Sign), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Sign), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Sign), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Sign( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Sign( - Avx.LoadVector256((SByte*)(pClsVar1)), - Avx.LoadVector256((SByte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Sign(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx2.Sign(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx2.Sign(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__SignSByte(); - var result = Avx2.Sign(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__SignSByte(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Sign( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Sign(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Sign( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Sign(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Sign( - Avx.LoadVector256((SByte*)(&test._fld1)), - Avx.LoadVector256((SByte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (right[0] < 0 ? (sbyte)(-left[0]) : (right[0] > 0 ? left[0] : 0))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (right[i] < 0 ? (sbyte)(-left[i]) : (right[i] > 0 ? left[i] : 0))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Sign)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.Byte.cs deleted file mode 100644 index 1a0c4c6dfc9d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.Byte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void SubtractByte() - { - var test = new SimpleBinaryOpTest__SubtractByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__SubtractByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__SubtractByte testClass) - { - var result = Avx2.Subtract(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__SubtractByte testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Subtract( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__SubtractByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__SubtractByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Subtract( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Subtract( - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Subtract( - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Subtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Subtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Subtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Subtract( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Subtract( - Avx.LoadVector256((Byte*)(pClsVar1)), - Avx.LoadVector256((Byte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)); - var result = Avx2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)); - var result = Avx2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__SubtractByte(); - var result = Avx2.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__SubtractByte(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Subtract( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Subtract(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Subtract( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Subtract( - Avx.LoadVector256((Byte*)(&test._fld1)), - Avx.LoadVector256((Byte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((byte)(left[0] - right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((byte)(left[i] - right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Subtract)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.Int16.cs deleted file mode 100644 index 992aefd31d70..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.Int16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void SubtractInt16() - { - var test = new SimpleBinaryOpTest__SubtractInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__SubtractInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__SubtractInt16 testClass) - { - var result = Avx2.Subtract(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__SubtractInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Subtract( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__SubtractInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__SubtractInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Subtract( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Subtract( - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Subtract( - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Subtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Subtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Subtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Subtract( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Subtract( - Avx.LoadVector256((Int16*)(pClsVar1)), - Avx.LoadVector256((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__SubtractInt16(); - var result = Avx2.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__SubtractInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Subtract( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Subtract(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Subtract( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Subtract( - Avx.LoadVector256((Int16*)(&test._fld1)), - Avx.LoadVector256((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((short)(left[0] - right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((short)(left[i] - right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Subtract)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.Int32.cs deleted file mode 100644 index 12071faa61c2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.Int32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void SubtractInt32() - { - var test = new SimpleBinaryOpTest__SubtractInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__SubtractInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__SubtractInt32 testClass) - { - var result = Avx2.Subtract(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__SubtractInt32 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Subtract( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__SubtractInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__SubtractInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Subtract( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Subtract( - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Subtract( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Subtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Subtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Subtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Subtract( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Subtract( - Avx.LoadVector256((Int32*)(pClsVar1)), - Avx.LoadVector256((Int32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__SubtractInt32(); - var result = Avx2.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__SubtractInt32(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Subtract( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Subtract(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Subtract( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Subtract( - Avx.LoadVector256((Int32*)(&test._fld1)), - Avx.LoadVector256((Int32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((int)(left[0] - right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((int)(left[i] - right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Subtract)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.Int64.cs deleted file mode 100644 index 331127c26677..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.Int64.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void SubtractInt64() - { - var test = new SimpleBinaryOpTest__SubtractInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__SubtractInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int64[] inArray1, Int64[] inArray2, Int64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__SubtractInt64 testClass) - { - var result = Avx2.Subtract(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__SubtractInt64 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Subtract( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__SubtractInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__SubtractInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Subtract( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Subtract( - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Subtract( - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Subtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Subtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Subtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Subtract( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Subtract( - Avx.LoadVector256((Int64*)(pClsVar1)), - Avx.LoadVector256((Int64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__SubtractInt64(); - var result = Avx2.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__SubtractInt64(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Subtract( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Subtract(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Subtract( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Subtract( - Avx.LoadVector256((Int64*)(&test._fld1)), - Avx.LoadVector256((Int64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((long)(left[0] - right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((long)(left[i] - right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Subtract)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.SByte.cs deleted file mode 100644 index fed6aa9cca72..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.SByte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void SubtractSByte() - { - var test = new SimpleBinaryOpTest__SubtractSByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__SubtractSByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__SubtractSByte testClass) - { - var result = Avx2.Subtract(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__SubtractSByte testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Subtract( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__SubtractSByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__SubtractSByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Subtract( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Subtract( - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Subtract( - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Subtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Subtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Subtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Subtract( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Subtract( - Avx.LoadVector256((SByte*)(pClsVar1)), - Avx.LoadVector256((SByte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__SubtractSByte(); - var result = Avx2.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__SubtractSByte(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Subtract( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Subtract(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Subtract( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Subtract( - Avx.LoadVector256((SByte*)(&test._fld1)), - Avx.LoadVector256((SByte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((sbyte)(left[0] - right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((sbyte)(left[i] - right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Subtract)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.UInt16.cs deleted file mode 100644 index 3b6a841f7f31..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.UInt16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void SubtractUInt16() - { - var test = new SimpleBinaryOpTest__SubtractUInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__SubtractUInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__SubtractUInt16 testClass) - { - var result = Avx2.Subtract(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__SubtractUInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Subtract( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__SubtractUInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__SubtractUInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Subtract( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Subtract( - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Subtract( - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Subtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Subtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Subtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Subtract( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Subtract( - Avx.LoadVector256((UInt16*)(pClsVar1)), - Avx.LoadVector256((UInt16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__SubtractUInt16(); - var result = Avx2.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__SubtractUInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Subtract( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Subtract(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Subtract( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Subtract( - Avx.LoadVector256((UInt16*)(&test._fld1)), - Avx.LoadVector256((UInt16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((ushort)(left[0] - right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((ushort)(left[i] - right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Subtract)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.UInt32.cs deleted file mode 100644 index fca4768457bb..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.UInt32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void SubtractUInt32() - { - var test = new SimpleBinaryOpTest__SubtractUInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__SubtractUInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__SubtractUInt32 testClass) - { - var result = Avx2.Subtract(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__SubtractUInt32 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Subtract( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__SubtractUInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__SubtractUInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Subtract( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Subtract( - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Subtract( - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Subtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Subtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Subtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Subtract( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Subtract( - Avx.LoadVector256((UInt32*)(pClsVar1)), - Avx.LoadVector256((UInt32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__SubtractUInt32(); - var result = Avx2.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__SubtractUInt32(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Subtract( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Subtract(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Subtract( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Subtract( - Avx.LoadVector256((UInt32*)(&test._fld1)), - Avx.LoadVector256((UInt32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((uint)(left[0] - right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((uint)(left[i] - right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Subtract)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.UInt64.cs deleted file mode 100644 index 62bada053b2f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.UInt64.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void SubtractUInt64() - { - var test = new SimpleBinaryOpTest__SubtractUInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__SubtractUInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt64[] inArray1, UInt64[] inArray2, UInt64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__SubtractUInt64 testClass) - { - var result = Avx2.Subtract(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__SubtractUInt64 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Subtract( - Avx.LoadVector256((UInt64*)(pFld1)), - Avx.LoadVector256((UInt64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__SubtractUInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__SubtractUInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Subtract( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Subtract( - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Subtract( - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Subtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Subtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Subtract), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Subtract( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Subtract( - Avx.LoadVector256((UInt64*)(pClsVar1)), - Avx.LoadVector256((UInt64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__SubtractUInt64(); - var result = Avx2.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__SubtractUInt64(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Subtract( - Avx.LoadVector256((UInt64*)(pFld1)), - Avx.LoadVector256((UInt64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Subtract(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Subtract( - Avx.LoadVector256((UInt64*)(pFld1)), - Avx.LoadVector256((UInt64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Subtract( - Avx.LoadVector256((UInt64*)(&test._fld1)), - Avx.LoadVector256((UInt64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt64[] left, UInt64[] right, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((ulong)(left[0] - right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((ulong)(left[i] - right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Subtract)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/SumAbsoluteDifferences.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/SumAbsoluteDifferences.UInt16.cs deleted file mode 100644 index eba96da180cc..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/SumAbsoluteDifferences.UInt16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void SumAbsoluteDifferencesUInt16() - { - var test = new SimpleBinaryOpTest__SumAbsoluteDifferencesUInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__SumAbsoluteDifferencesUInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__SumAbsoluteDifferencesUInt16 testClass) - { - var result = Avx2.SumAbsoluteDifferences(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__SumAbsoluteDifferencesUInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.SumAbsoluteDifferences( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__SumAbsoluteDifferencesUInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__SumAbsoluteDifferencesUInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.SumAbsoluteDifferences( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.SumAbsoluteDifferences( - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.SumAbsoluteDifferences( - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.SumAbsoluteDifferences), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.SumAbsoluteDifferences), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.SumAbsoluteDifferences), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.SumAbsoluteDifferences( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.SumAbsoluteDifferences( - Avx.LoadVector256((Byte*)(pClsVar1)), - Avx.LoadVector256((Byte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.SumAbsoluteDifferences(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)); - var result = Avx2.SumAbsoluteDifferences(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)); - var result = Avx2.SumAbsoluteDifferences(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__SumAbsoluteDifferencesUInt16(); - var result = Avx2.SumAbsoluteDifferences(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__SumAbsoluteDifferencesUInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.SumAbsoluteDifferences( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.SumAbsoluteDifferences(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.SumAbsoluteDifferences( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.SumAbsoluteDifferences(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.SumAbsoluteDifferences( - Avx.LoadVector256((Byte*)(&test._fld1)), - Avx.LoadVector256((Byte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != Math.Abs(left[0] - right[0]) + Math.Abs(left[1] - right[1]) + Math.Abs(left[2] - right[2]) + Math.Abs(left[3] - right[3]) + Math.Abs(left[4] - right[4]) + Math.Abs(left[5] - right[5]) + Math.Abs(left[6] - right[6]) + Math.Abs(left[7] - right[7])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((i % 4 != 0) ? 0 : Math.Abs(left[(i/4)*8] - right[(i/4)*8]) + Math.Abs(left[(i/4)*8+1] - right[(i/4)*8+1]) + Math.Abs(left[(i/4)*8+2] - right[(i/4)*8+2]) + Math.Abs(left[(i/4)*8+3] - right[(i/4)*8+3]) + Math.Abs(left[(i/4)*8+4] - right[(i/4)*8+4]) + Math.Abs(left[(i/4)*8+5] - right[(i/4)*8+5]) + Math.Abs(left[(i/4)*8+6] - right[(i/4)*8+6]) + Math.Abs(left[(i/4)*8+7] - right[(i/4)*8+7]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.SumAbsoluteDifferences)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/UnpackHigh.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/UnpackHigh.cs deleted file mode 100644 index 55e5d3b048b5..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/UnpackHigh.cs +++ /dev/null @@ -1,266 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Avx2.IsSupported) - { - using (TestTable byteTable = new TestTable(new byte[32] { 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0 }, new byte[32] { 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0 }, new byte[32])) - using (TestTable sbyteTable = new TestTable(new sbyte[32] { 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0 }, new sbyte[32] { 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0 }, new sbyte[32])) - using (TestTable shortTable = new TestTable(new short[16] { 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0 }, new short[16] { 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0}, new short[16])) - using (TestTable ushortTable = new TestTable(new ushort[16] { 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0 }, new ushort[16] { 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0 }, new ushort[16])) - using (TestTable intTable = new TestTable(new int[8] { 1, 5, 100, 0, 1, 5, 100, 0}, new int[8] { 22, 1, 50, 0, 22, 1, 50, 0 }, new int[8])) - using (TestTable uintTable = new TestTable(new uint[8] { 1, 5, 100, 0, 1, 5, 100, 0 }, new uint[8] { 22, 1, 50, 0, 22, 1, 50, 0 }, new uint[8])) - using (TestTable longTable = new TestTable(new long[4] { 1, -5, 100, 0 }, new long[4] { 22, -1, -50, 0}, new long[4])) - using (TestTable ulongTable = new TestTable(new ulong[4] { 1, 5, 100, 0 }, new ulong[4] { 22, 1, 50, 0 }, new ulong[4])) - - { - - var vb1 = Unsafe.Read>(byteTable.inArray1Ptr); - var vb2 = Unsafe.Read>(byteTable.inArray2Ptr); - var vb3 = Avx2.UnpackHigh(vb1, vb2); - Unsafe.Write(byteTable.outArrayPtr, vb3); - - var vsb1 = Unsafe.Read>(sbyteTable.inArray1Ptr); - var vsb2 = Unsafe.Read>(sbyteTable.inArray2Ptr); - var vsb3 = Avx2.UnpackHigh(vsb1, vsb2); - Unsafe.Write(sbyteTable.outArrayPtr, vsb3); - - var vs1 = Unsafe.Read>(shortTable.inArray1Ptr); - var vs2 = Unsafe.Read>(shortTable.inArray2Ptr); - var vs3 = Avx2.UnpackHigh(vs1, vs2); - Unsafe.Write(shortTable.outArrayPtr, vs3); - - var vus1 = Unsafe.Read>(ushortTable.inArray1Ptr); - var vus2 = Unsafe.Read>(ushortTable.inArray2Ptr); - var vus3 = Avx2.UnpackHigh(vus1, vus2); - Unsafe.Write(ushortTable.outArrayPtr, vus3); - - var vi1 = Unsafe.Read>(intTable.inArray1Ptr); - var vi2 = Unsafe.Read>(intTable.inArray2Ptr); - var vi3 = Avx2.UnpackHigh(vi1, vi2); - Unsafe.Write(intTable.outArrayPtr, vi3); - - var vui1 = Unsafe.Read>(uintTable.inArray1Ptr); - var vui2 = Unsafe.Read>(uintTable.inArray2Ptr); - var vui3 = Avx2.UnpackHigh(vui1, vui2); - Unsafe.Write(uintTable.outArrayPtr, vui3); - - var vl1 = Unsafe.Read>(longTable.inArray1Ptr); - var vl2 = Unsafe.Read>(longTable.inArray2Ptr); - var vl3 = Avx2.UnpackHigh(vl1, vl2); - Unsafe.Write(longTable.outArrayPtr, vl3); - - var vul1 = Unsafe.Read>(ulongTable.inArray1Ptr); - var vul2 = Unsafe.Read>(ulongTable.inArray2Ptr); - var vul3 = Avx2.UnpackHigh(vul1, vul2); - Unsafe.Write(ulongTable.outArrayPtr, vul3); - - if((byteTable.inArray1[8] != byteTable.outArray[0]) || (byteTable.inArray2[8] != byteTable.outArray[1]) || - (byteTable.inArray1[9] != byteTable.outArray[2]) || (byteTable.inArray2[9] != byteTable.outArray[3]) || - (byteTable.inArray1[10] != byteTable.outArray[4]) || (byteTable.inArray2[10] != byteTable.outArray[5]) || - (byteTable.inArray1[11] != byteTable.outArray[6]) || (byteTable.inArray2[11] != byteTable.outArray[7]) || - (byteTable.inArray1[12] != byteTable.outArray[8]) || (byteTable.inArray2[12] != byteTable.outArray[9]) || - (byteTable.inArray1[13] != byteTable.outArray[10]) || (byteTable.inArray2[13] != byteTable.outArray[11]) || - (byteTable.inArray1[14] != byteTable.outArray[12]) || (byteTable.inArray2[14] != byteTable.outArray[13]) || - (byteTable.inArray1[15] != byteTable.outArray[14]) || (byteTable.inArray2[15] != byteTable.outArray[15]) || - (byteTable.inArray1[24] != byteTable.outArray[16]) || (byteTable.inArray2[24] != byteTable.outArray[17]) || - (byteTable.inArray1[25] != byteTable.outArray[18]) || (byteTable.inArray2[25] != byteTable.outArray[19]) || - (byteTable.inArray1[26] != byteTable.outArray[20]) || (byteTable.inArray2[26] != byteTable.outArray[21]) || - (byteTable.inArray1[27] != byteTable.outArray[22]) || (byteTable.inArray2[27] != byteTable.outArray[23]) || - (byteTable.inArray1[28] != byteTable.outArray[24]) || (byteTable.inArray2[28] != byteTable.outArray[25]) || - (byteTable.inArray1[29] != byteTable.outArray[26]) || (byteTable.inArray2[29] != byteTable.outArray[27]) || - (byteTable.inArray1[30] != byteTable.outArray[28]) || (byteTable.inArray2[30] != byteTable.outArray[29]) || - (byteTable.inArray1[31] != byteTable.outArray[30]) || (byteTable.inArray2[31] != byteTable.outArray[31])) - { - Console.WriteLine("AVX2 UnpackHigh failed on byte:"); - Console.WriteLine($" left: ({string.Join(", ", byteTable.inArray1)})"); - Console.WriteLine($" right: ({string.Join(", ", byteTable.inArray2)})"); - Console.WriteLine($" result: ({string.Join(", ", byteTable.outArray)})"); - Console.WriteLine(); - - testResult = Fail; - } - - if((sbyteTable.inArray1[8] != sbyteTable.outArray[0]) || (sbyteTable.inArray2[8] != sbyteTable.outArray[1]) || - (sbyteTable.inArray1[9] != sbyteTable.outArray[2]) || (sbyteTable.inArray2[9] != sbyteTable.outArray[3]) || - (sbyteTable.inArray1[10] != sbyteTable.outArray[4]) || (sbyteTable.inArray2[10] != sbyteTable.outArray[5]) || - (sbyteTable.inArray1[11] != sbyteTable.outArray[6]) || (sbyteTable.inArray2[11] != sbyteTable.outArray[7]) || - (sbyteTable.inArray1[12] != sbyteTable.outArray[8]) || (sbyteTable.inArray2[12] != sbyteTable.outArray[9]) || - (sbyteTable.inArray1[13] != sbyteTable.outArray[10]) || (sbyteTable.inArray2[13] != sbyteTable.outArray[11]) || - (sbyteTable.inArray1[14] != sbyteTable.outArray[12]) || (sbyteTable.inArray2[14] != sbyteTable.outArray[13]) || - (sbyteTable.inArray1[15] != sbyteTable.outArray[14]) || (sbyteTable.inArray2[15] != sbyteTable.outArray[15]) || - (sbyteTable.inArray1[24] != sbyteTable.outArray[16]) || (sbyteTable.inArray2[24] != sbyteTable.outArray[17]) || - (sbyteTable.inArray1[25] != sbyteTable.outArray[18]) || (sbyteTable.inArray2[25] != sbyteTable.outArray[19]) || - (sbyteTable.inArray1[26] != sbyteTable.outArray[20]) || (sbyteTable.inArray2[26] != sbyteTable.outArray[21]) || - (sbyteTable.inArray1[27] != sbyteTable.outArray[22]) || (sbyteTable.inArray2[27] != sbyteTable.outArray[23]) || - (sbyteTable.inArray1[28] != sbyteTable.outArray[24]) || (sbyteTable.inArray2[28] != sbyteTable.outArray[25]) || - (sbyteTable.inArray1[29] != sbyteTable.outArray[26]) || (sbyteTable.inArray2[29] != sbyteTable.outArray[27]) || - (sbyteTable.inArray1[30] != sbyteTable.outArray[28]) || (sbyteTable.inArray2[30] != sbyteTable.outArray[29]) || - (sbyteTable.inArray1[31] != sbyteTable.outArray[30]) || (sbyteTable.inArray2[31] != sbyteTable.outArray[31])) - { - Console.WriteLine("AVX2 UnpackHigh failed on sbyte:"); - Console.WriteLine($" left: ({string.Join(", ", byteTable.inArray1)})"); - Console.WriteLine($" right: ({string.Join(", ", byteTable.inArray2)})"); - Console.WriteLine($" result: ({string.Join(", ", byteTable.outArray)})"); - Console.WriteLine(); - - testResult = Fail; - } - - if((shortTable.inArray1[4] != shortTable.outArray[0]) || (shortTable.inArray2[4] != shortTable.outArray[1]) || - (shortTable.inArray1[5] != shortTable.outArray[2]) || (shortTable.inArray2[5] != shortTable.outArray[3]) || - (shortTable.inArray1[6] != shortTable.outArray[4]) || (shortTable.inArray2[6] != shortTable.outArray[5]) || - (shortTable.inArray1[7] != shortTable.outArray[6]) || (shortTable.inArray2[7] != shortTable.outArray[7]) || - (shortTable.inArray1[12] != shortTable.outArray[8]) || (shortTable.inArray2[12] != shortTable.outArray[9]) || - (shortTable.inArray1[13] != shortTable.outArray[10]) || (shortTable.inArray2[13] != shortTable.outArray[11]) || - (shortTable.inArray1[14] != shortTable.outArray[12]) || (shortTable.inArray2[14] != shortTable.outArray[13]) || - (shortTable.inArray1[15] != shortTable.outArray[14]) || (shortTable.inArray2[15] != shortTable.outArray[15])) - - { - Console.WriteLine("AVX2 UnpackHigh failed on short:"); - Console.WriteLine($" left: ({string.Join(", ", byteTable.inArray1)})"); - Console.WriteLine($" right: ({string.Join(", ", byteTable.inArray2)})"); - Console.WriteLine($" result: ({string.Join(", ", byteTable.outArray)})"); - Console.WriteLine(); - - testResult = Fail; - } - - if((ushortTable.inArray1[4] != ushortTable.outArray[0]) || (ushortTable.inArray2[4] != ushortTable.outArray[1]) || - (ushortTable.inArray1[5] != ushortTable.outArray[2]) || (ushortTable.inArray2[5] != ushortTable.outArray[3]) || - (ushortTable.inArray1[6] != ushortTable.outArray[4]) || (ushortTable.inArray2[6] != ushortTable.outArray[5]) || - (ushortTable.inArray1[7] != ushortTable.outArray[6]) || (ushortTable.inArray2[7] != ushortTable.outArray[7]) || - (ushortTable.inArray1[12] != ushortTable.outArray[8]) || (ushortTable.inArray2[12] != ushortTable.outArray[9]) || - (ushortTable.inArray1[13] != ushortTable.outArray[10]) || (ushortTable.inArray2[13] != ushortTable.outArray[11]) || - (ushortTable.inArray1[14] != ushortTable.outArray[12]) || (ushortTable.inArray2[14] != ushortTable.outArray[13]) || - (ushortTable.inArray1[15] != ushortTable.outArray[14]) || (ushortTable.inArray2[15] != ushortTable.outArray[15])) - { - Console.WriteLine("AVX2 UnpackHigh failed on ushort:"); - Console.WriteLine($" left: ({string.Join(", ", byteTable.inArray1)})"); - Console.WriteLine($" right: ({string.Join(", ", byteTable.inArray2)})"); - Console.WriteLine($" result: ({string.Join(", ", byteTable.outArray)})"); - Console.WriteLine(); - - testResult = Fail; - } - - if ((intTable.inArray1[2] != intTable.outArray[0]) || (intTable.inArray2[2] != intTable.outArray[1]) || - (intTable.inArray1[3] != intTable.outArray[2]) || (intTable.inArray2[3] != intTable.outArray[3]) || - (intTable.inArray1[6] != intTable.outArray[4]) || (intTable.inArray2[6] != intTable.outArray[5]) || - (intTable.inArray1[7] != intTable.outArray[6]) || (intTable.inArray2[7] != intTable.outArray[7])) - { - Console.WriteLine("AVX2 UnpackHigh failed on int:"); - Console.WriteLine($" left: ({string.Join(", ", byteTable.inArray1)})"); - Console.WriteLine($" right: ({string.Join(", ", byteTable.inArray2)})"); - Console.WriteLine($" result: ({string.Join(", ", byteTable.outArray)})"); - Console.WriteLine(); - - testResult = Fail; - } - - if ((uintTable.inArray1[2] != uintTable.outArray[0]) || (uintTable.inArray2[2] != uintTable.outArray[1]) || - (uintTable.inArray1[3] != uintTable.outArray[2]) || (uintTable.inArray2[3] != uintTable.outArray[3]) || - (uintTable.inArray1[6] != uintTable.outArray[4]) || (uintTable.inArray2[6] != uintTable.outArray[5]) || - (uintTable.inArray1[7] != uintTable.outArray[6]) || (uintTable.inArray2[7] != uintTable.outArray[7])) - { - Console.WriteLine("AVX2 UnpackHigh failed on uint:"); - Console.WriteLine($" left: ({string.Join(", ", byteTable.inArray1)})"); - Console.WriteLine($" right: ({string.Join(", ", byteTable.inArray2)})"); - Console.WriteLine($" result: ({string.Join(", ", byteTable.outArray)})"); - Console.WriteLine(); - - testResult = Fail; - } - - if ((longTable.inArray1[1] != longTable.outArray[0]) || (longTable.inArray2[1] != longTable.outArray[1]) || - (longTable.inArray1[3] != longTable.outArray[2]) || (longTable.inArray2[3] != longTable.outArray[3]) ) - { - Console.WriteLine("AVX2 UnpackHigh failed on long:"); - Console.WriteLine($" left: ({string.Join(", ", byteTable.inArray1)})"); - Console.WriteLine($" right: ({string.Join(", ", byteTable.inArray2)})"); - Console.WriteLine($" result: ({string.Join(", ", byteTable.outArray)})"); - Console.WriteLine(); - - testResult = Fail; - } - - if ((ulongTable.inArray1[1] != ulongTable.outArray[0]) || (ulongTable.inArray2[1] != ulongTable.outArray[1]) || - (ulongTable.inArray1[3] != ulongTable.outArray[2]) || (ulongTable.inArray2[3] != ulongTable.outArray[3]) ) - { - Console.WriteLine("AVX2 UnpackHigh failed on ulong:"); - Console.WriteLine($" left: ({string.Join(", ", byteTable.inArray1)})"); - Console.WriteLine($" right: ({string.Join(", ", byteTable.inArray2)})"); - Console.WriteLine($" result: ({string.Join(", ", byteTable.outArray)})"); - Console.WriteLine(); - - testResult = Fail; - } - } - } - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T1 : struct where T2 : struct where T3 : struct - { - public T1[] inArray1; - public T2[] inArray2; - public T3[] outArray; - - public void* inArray1Ptr => inHandle1.AddrOfPinnedObject().ToPointer(); - public void* inArray2Ptr => inHandle2.AddrOfPinnedObject().ToPointer(); - public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); - - GCHandle inHandle1; - GCHandle inHandle2; - GCHandle outHandle; - public TestTable(T1[] a, T2[] b, T3[] c) - { - this.inArray1 = a; - this.inArray2 = b; - this.outArray = c; - - inHandle1 = GCHandle.Alloc(inArray1, GCHandleType.Pinned); - inHandle2 = GCHandle.Alloc(inArray2, GCHandleType.Pinned); - outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); - } - public bool CheckResult(Func check) - { - for (int i = 0; i < inArray1.Length; i++) - { - if (!check(inArray1[i], inArray2[i], outArray[i])) - { - return false; - } - } - return true; - } - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - } - - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/UnpackLow.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/UnpackLow.cs deleted file mode 100644 index 20e4b41fdb0d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/UnpackLow.cs +++ /dev/null @@ -1,266 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Avx2.IsSupported) - { - using (TestTable byteTable = new TestTable(new byte[32] { 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0 }, new byte[32] { 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0 }, new byte[32])) - using (TestTable sbyteTable = new TestTable(new sbyte[32] { 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0 }, new sbyte[32] { 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0 }, new sbyte[32])) - using (TestTable shortTable = new TestTable(new short[16] { 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0 }, new short[16] { 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0}, new short[16])) - using (TestTable ushortTable = new TestTable(new ushort[16] { 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0 }, new ushort[16] { 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0 }, new ushort[16])) - using (TestTable intTable = new TestTable(new int[8] { 1, 5, 100, 0, 1, 5, 100, 0}, new int[8] { 22, 1, 50, 0, 22, 1, 50, 0 }, new int[8])) - using (TestTable uintTable = new TestTable(new uint[8] { 1, 5, 100, 0, 1, 5, 100, 0 }, new uint[8] { 22, 1, 50, 0, 22, 1, 50, 0 }, new uint[8])) - using (TestTable longTable = new TestTable(new long[4] { 1, -5, 100, 0 }, new long[4] { 22, -1, -50, 0}, new long[4])) - using (TestTable ulongTable = new TestTable(new ulong[4] { 1, 5, 100, 0 }, new ulong[4] { 22, 1, 50, 0 }, new ulong[4])) - - { - - var vb1 = Unsafe.Read>(byteTable.inArray1Ptr); - var vb2 = Unsafe.Read>(byteTable.inArray2Ptr); - var vb3 = Avx2.UnpackLow(vb1, vb2); - Unsafe.Write(byteTable.outArrayPtr, vb3); - - var vsb1 = Unsafe.Read>(sbyteTable.inArray1Ptr); - var vsb2 = Unsafe.Read>(sbyteTable.inArray2Ptr); - var vsb3 = Avx2.UnpackLow(vsb1, vsb2); - Unsafe.Write(sbyteTable.outArrayPtr, vsb3); - - var vs1 = Unsafe.Read>(shortTable.inArray1Ptr); - var vs2 = Unsafe.Read>(shortTable.inArray2Ptr); - var vs3 = Avx2.UnpackLow(vs1, vs2); - Unsafe.Write(shortTable.outArrayPtr, vs3); - - var vus1 = Unsafe.Read>(ushortTable.inArray1Ptr); - var vus2 = Unsafe.Read>(ushortTable.inArray2Ptr); - var vus3 = Avx2.UnpackLow(vus1, vus2); - Unsafe.Write(ushortTable.outArrayPtr, vus3); - - var vi1 = Unsafe.Read>(intTable.inArray1Ptr); - var vi2 = Unsafe.Read>(intTable.inArray2Ptr); - var vi3 = Avx2.UnpackLow(vi1, vi2); - Unsafe.Write(intTable.outArrayPtr, vi3); - - var vui1 = Unsafe.Read>(uintTable.inArray1Ptr); - var vui2 = Unsafe.Read>(uintTable.inArray2Ptr); - var vui3 = Avx2.UnpackLow(vui1, vui2); - Unsafe.Write(uintTable.outArrayPtr, vui3); - - var vl1 = Unsafe.Read>(longTable.inArray1Ptr); - var vl2 = Unsafe.Read>(longTable.inArray2Ptr); - var vl3 = Avx2.UnpackLow(vl1, vl2); - Unsafe.Write(longTable.outArrayPtr, vl3); - - var vul1 = Unsafe.Read>(ulongTable.inArray1Ptr); - var vul2 = Unsafe.Read>(ulongTable.inArray2Ptr); - var vul3 = Avx2.UnpackLow(vul1, vul2); - Unsafe.Write(ulongTable.outArrayPtr, vul3); - - if((byteTable.inArray1[0] != byteTable.outArray[0]) || (byteTable.inArray2[0] != byteTable.outArray[1]) || - (byteTable.inArray1[1] != byteTable.outArray[2]) || (byteTable.inArray2[1] != byteTable.outArray[3]) || - (byteTable.inArray1[2] != byteTable.outArray[4]) || (byteTable.inArray2[2] != byteTable.outArray[5]) || - (byteTable.inArray1[3] != byteTable.outArray[6]) || (byteTable.inArray2[3] != byteTable.outArray[7]) || - (byteTable.inArray1[4] != byteTable.outArray[8]) || (byteTable.inArray2[4] != byteTable.outArray[9]) || - (byteTable.inArray1[5] != byteTable.outArray[10]) || (byteTable.inArray2[5] != byteTable.outArray[11]) || - (byteTable.inArray1[6] != byteTable.outArray[12]) || (byteTable.inArray2[6] != byteTable.outArray[13]) || - (byteTable.inArray1[7] != byteTable.outArray[14]) || (byteTable.inArray2[7] != byteTable.outArray[15]) || - (byteTable.inArray1[16] != byteTable.outArray[16]) || (byteTable.inArray2[16] != byteTable.outArray[17]) || - (byteTable.inArray1[17] != byteTable.outArray[18]) || (byteTable.inArray2[17] != byteTable.outArray[19]) || - (byteTable.inArray1[18] != byteTable.outArray[20]) || (byteTable.inArray2[18] != byteTable.outArray[21]) || - (byteTable.inArray1[19] != byteTable.outArray[22]) || (byteTable.inArray2[19] != byteTable.outArray[23]) || - (byteTable.inArray1[20] != byteTable.outArray[24]) || (byteTable.inArray2[20] != byteTable.outArray[25]) || - (byteTable.inArray1[21] != byteTable.outArray[26]) || (byteTable.inArray2[21] != byteTable.outArray[27]) || - (byteTable.inArray1[22] != byteTable.outArray[28]) || (byteTable.inArray2[22] != byteTable.outArray[29]) || - (byteTable.inArray1[23] != byteTable.outArray[30]) || (byteTable.inArray2[23] != byteTable.outArray[31])) - { - Console.WriteLine("AVX2 UnpackLow failed on byte:"); - Console.WriteLine($" left: ({string.Join(", ", byteTable.inArray1)})"); - Console.WriteLine($" right: ({string.Join(", ", byteTable.inArray2)})"); - Console.WriteLine($" result: ({string.Join(", ", byteTable.outArray)})"); - Console.WriteLine(); - - testResult = Fail; - } - - if((sbyteTable.inArray1[0] != sbyteTable.outArray[0]) || (sbyteTable.inArray2[0] != sbyteTable.outArray[1]) || - (sbyteTable.inArray1[1] != sbyteTable.outArray[2]) || (sbyteTable.inArray2[1] != sbyteTable.outArray[3]) || - (sbyteTable.inArray1[2] != sbyteTable.outArray[4]) || (sbyteTable.inArray2[2] != sbyteTable.outArray[5]) || - (sbyteTable.inArray1[3] != sbyteTable.outArray[6]) || (sbyteTable.inArray2[3] != sbyteTable.outArray[7]) || - (sbyteTable.inArray1[4] != sbyteTable.outArray[8]) || (sbyteTable.inArray2[4] != sbyteTable.outArray[9]) || - (sbyteTable.inArray1[5] != sbyteTable.outArray[10]) || (sbyteTable.inArray2[5] != sbyteTable.outArray[11]) || - (sbyteTable.inArray1[6] != sbyteTable.outArray[12]) || (sbyteTable.inArray2[6] != sbyteTable.outArray[13]) || - (sbyteTable.inArray1[7] != sbyteTable.outArray[14]) || (sbyteTable.inArray2[7] != sbyteTable.outArray[15]) || - (sbyteTable.inArray1[16] != sbyteTable.outArray[16]) || (sbyteTable.inArray2[16] != sbyteTable.outArray[17]) || - (sbyteTable.inArray1[17] != sbyteTable.outArray[18]) || (sbyteTable.inArray2[17] != sbyteTable.outArray[19]) || - (sbyteTable.inArray1[18] != sbyteTable.outArray[20]) || (sbyteTable.inArray2[18] != sbyteTable.outArray[21]) || - (sbyteTable.inArray1[19] != sbyteTable.outArray[22]) || (sbyteTable.inArray2[19] != sbyteTable.outArray[23]) || - (sbyteTable.inArray1[20] != sbyteTable.outArray[24]) || (sbyteTable.inArray2[20] != sbyteTable.outArray[25]) || - (sbyteTable.inArray1[21] != sbyteTable.outArray[26]) || (sbyteTable.inArray2[21] != sbyteTable.outArray[27]) || - (sbyteTable.inArray1[22] != sbyteTable.outArray[28]) || (sbyteTable.inArray2[22] != sbyteTable.outArray[29]) || - (sbyteTable.inArray1[23] != sbyteTable.outArray[30]) || (sbyteTable.inArray2[23] != sbyteTable.outArray[31])) - { - Console.WriteLine("AVX2 UnpackLow failed on sbyte:"); - Console.WriteLine($" left: ({string.Join(", ", byteTable.inArray1)})"); - Console.WriteLine($" right: ({string.Join(", ", byteTable.inArray2)})"); - Console.WriteLine($" result: ({string.Join(", ", byteTable.outArray)})"); - Console.WriteLine(); - - testResult = Fail; - } - - if((shortTable.inArray1[0] != shortTable.outArray[0]) || (shortTable.inArray2[0] != shortTable.outArray[1]) || - (shortTable.inArray1[1] != shortTable.outArray[2]) || (shortTable.inArray2[1] != shortTable.outArray[3]) || - (shortTable.inArray1[2] != shortTable.outArray[4]) || (shortTable.inArray2[2] != shortTable.outArray[5]) || - (shortTable.inArray1[3] != shortTable.outArray[6]) || (shortTable.inArray2[3] != shortTable.outArray[7]) || - (shortTable.inArray1[8] != shortTable.outArray[8]) || (shortTable.inArray2[8] != shortTable.outArray[9]) || - (shortTable.inArray1[9] != shortTable.outArray[10]) || (shortTable.inArray2[9] != shortTable.outArray[11]) || - (shortTable.inArray1[10] != shortTable.outArray[12]) || (shortTable.inArray2[10] != shortTable.outArray[13]) || - (shortTable.inArray1[11] != shortTable.outArray[14]) || (shortTable.inArray2[11] != shortTable.outArray[15])) - - { - Console.WriteLine("AVX2 UnpackLow failed on short:"); - Console.WriteLine($" left: ({string.Join(", ", byteTable.inArray1)})"); - Console.WriteLine($" right: ({string.Join(", ", byteTable.inArray2)})"); - Console.WriteLine($" result: ({string.Join(", ", byteTable.outArray)})"); - Console.WriteLine(); - - testResult = Fail; - } - - if((ushortTable.inArray1[0] != ushortTable.outArray[0]) || (ushortTable.inArray2[0] != ushortTable.outArray[1]) || - (ushortTable.inArray1[1] != ushortTable.outArray[2]) || (ushortTable.inArray2[1] != ushortTable.outArray[3]) || - (ushortTable.inArray1[2] != ushortTable.outArray[4]) || (ushortTable.inArray2[2] != ushortTable.outArray[5]) || - (ushortTable.inArray1[3] != ushortTable.outArray[6]) || (ushortTable.inArray2[3] != ushortTable.outArray[7]) || - (ushortTable.inArray1[8] != ushortTable.outArray[8]) || (ushortTable.inArray2[8] != ushortTable.outArray[9]) || - (ushortTable.inArray1[9] != ushortTable.outArray[10]) || (ushortTable.inArray2[9] != ushortTable.outArray[11]) || - (ushortTable.inArray1[10] != ushortTable.outArray[12]) || (ushortTable.inArray2[10] != ushortTable.outArray[13]) || - (ushortTable.inArray1[11] != ushortTable.outArray[14]) || (ushortTable.inArray2[11] != ushortTable.outArray[15])) - { - Console.WriteLine("AVX2 UnpackLow failed on ushort:"); - Console.WriteLine($" left: ({string.Join(", ", byteTable.inArray1)})"); - Console.WriteLine($" right: ({string.Join(", ", byteTable.inArray2)})"); - Console.WriteLine($" result: ({string.Join(", ", byteTable.outArray)})"); - Console.WriteLine(); - - testResult = Fail; - } - - if ((intTable.inArray1[0] != intTable.outArray[0]) || (intTable.inArray2[0] != intTable.outArray[1]) || - (intTable.inArray1[1] != intTable.outArray[2]) || (intTable.inArray2[1] != intTable.outArray[3]) || - (intTable.inArray1[4] != intTable.outArray[4]) || (intTable.inArray2[4] != intTable.outArray[5]) || - (intTable.inArray1[5] != intTable.outArray[6]) || (intTable.inArray2[5] != intTable.outArray[7])) - { - Console.WriteLine("AVX2 UnpackLow failed on int:"); - Console.WriteLine($" left: ({string.Join(", ", byteTable.inArray1)})"); - Console.WriteLine($" right: ({string.Join(", ", byteTable.inArray2)})"); - Console.WriteLine($" result: ({string.Join(", ", byteTable.outArray)})"); - Console.WriteLine(); - - testResult = Fail; - } - - if ((uintTable.inArray1[0] != uintTable.outArray[0]) || (uintTable.inArray2[0] != uintTable.outArray[1]) || - (uintTable.inArray1[1] != uintTable.outArray[2]) || (uintTable.inArray2[1] != uintTable.outArray[3]) || - (uintTable.inArray1[4] != uintTable.outArray[4]) || (uintTable.inArray2[4] != uintTable.outArray[5]) || - (uintTable.inArray1[5] != uintTable.outArray[6]) || (uintTable.inArray2[5] != uintTable.outArray[7])) - { - Console.WriteLine("AVX2 UnpackLow failed on uint:"); - Console.WriteLine($" left: ({string.Join(", ", byteTable.inArray1)})"); - Console.WriteLine($" right: ({string.Join(", ", byteTable.inArray2)})"); - Console.WriteLine($" result: ({string.Join(", ", byteTable.outArray)})"); - Console.WriteLine(); - - testResult = Fail; - } - - if ((longTable.inArray1[0] != longTable.outArray[0]) || (longTable.inArray2[0] != longTable.outArray[1]) || - (longTable.inArray1[2] != longTable.outArray[2]) || (longTable.inArray2[2] != longTable.outArray[3]) ) - { - Console.WriteLine("AVX2 UnpackLow failed on long:"); - Console.WriteLine($" left: ({string.Join(", ", byteTable.inArray1)})"); - Console.WriteLine($" right: ({string.Join(", ", byteTable.inArray2)})"); - Console.WriteLine($" result: ({string.Join(", ", byteTable.outArray)})"); - Console.WriteLine(); - - testResult = Fail; - } - - if ((ulongTable.inArray1[0] != ulongTable.outArray[0]) || (ulongTable.inArray2[0] != ulongTable.outArray[1]) || - (ulongTable.inArray1[2] != ulongTable.outArray[2]) || (ulongTable.inArray2[2] != ulongTable.outArray[3]) ) - { - Console.WriteLine("AVX2 UnpackLow failed on ulong:"); - Console.WriteLine($" left: ({string.Join(", ", byteTable.inArray1)})"); - Console.WriteLine($" right: ({string.Join(", ", byteTable.inArray2)})"); - Console.WriteLine($" result: ({string.Join(", ", byteTable.outArray)})"); - Console.WriteLine(); - - testResult = Fail; - } - } - } - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T1 : struct where T2 : struct where T3 : struct - { - public T1[] inArray1; - public T2[] inArray2; - public T3[] outArray; - - public void* inArray1Ptr => inHandle1.AddrOfPinnedObject().ToPointer(); - public void* inArray2Ptr => inHandle2.AddrOfPinnedObject().ToPointer(); - public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); - - GCHandle inHandle1; - GCHandle inHandle2; - GCHandle outHandle; - public TestTable(T1[] a, T2[] b, T3[] c) - { - this.inArray1 = a; - this.inArray2 = b; - this.outArray = c; - - inHandle1 = GCHandle.Alloc(inArray1, GCHandleType.Pinned); - inHandle2 = GCHandle.Alloc(inArray2, GCHandleType.Pinned); - outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); - } - public bool CheckResult(Func check) - { - for (int i = 0; i < inArray1.Length; i++) - { - if (!check(inArray1[i], inArray2[i], outArray[i])) - { - return false; - } - } - return true; - } - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - } - - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.Byte.cs deleted file mode 100644 index 8ad2d9af541f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.Byte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void XorByte() - { - var test = new SimpleBinaryOpTest__XorByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__XorByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__XorByte testClass) - { - var result = Avx2.Xor(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__XorByte testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Xor( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__XorByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__XorByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Xor( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Xor( - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Xor( - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Xor), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Xor), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Xor), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Xor( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Xor( - Avx.LoadVector256((Byte*)(pClsVar1)), - Avx.LoadVector256((Byte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Byte*)(_dataTable.inArray2Ptr)); - var result = Avx2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArray2Ptr)); - var result = Avx2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__XorByte(); - var result = Avx2.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__XorByte(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Xor( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Xor(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Xor( - Avx.LoadVector256((Byte*)(pFld1)), - Avx.LoadVector256((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Xor( - Avx.LoadVector256((Byte*)(&test._fld1)), - Avx.LoadVector256((Byte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((byte)(left[0] ^ right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((byte)(left[i] ^ right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Xor)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.Int16.cs deleted file mode 100644 index df1b33fed8cb..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.Int16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void XorInt16() - { - var test = new SimpleBinaryOpTest__XorInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__XorInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__XorInt16 testClass) - { - var result = Avx2.Xor(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__XorInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Xor( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__XorInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__XorInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Xor( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Xor( - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Xor( - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Xor), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Xor), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Xor), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Xor( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Xor( - Avx.LoadVector256((Int16*)(pClsVar1)), - Avx.LoadVector256((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArray2Ptr)); - var result = Avx2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__XorInt16(); - var result = Avx2.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__XorInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Xor( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Xor(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Xor( - Avx.LoadVector256((Int16*)(pFld1)), - Avx.LoadVector256((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Xor( - Avx.LoadVector256((Int16*)(&test._fld1)), - Avx.LoadVector256((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((short)(left[0] ^ right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((short)(left[i] ^ right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Xor)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.Int32.cs deleted file mode 100644 index c9b6c4e1afa3..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.Int32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void XorInt32() - { - var test = new SimpleBinaryOpTest__XorInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__XorInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__XorInt32 testClass) - { - var result = Avx2.Xor(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__XorInt32 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Xor( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__XorInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__XorInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Xor( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Xor( - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Xor( - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Xor), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Xor), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Xor), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Xor( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Xor( - Avx.LoadVector256((Int32*)(pClsVar1)), - Avx.LoadVector256((Int32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__XorInt32(); - var result = Avx2.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__XorInt32(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Xor( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Xor(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Xor( - Avx.LoadVector256((Int32*)(pFld1)), - Avx.LoadVector256((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Xor( - Avx.LoadVector256((Int32*)(&test._fld1)), - Avx.LoadVector256((Int32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((int)(left[0] ^ right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((int)(left[i] ^ right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Xor)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.Int64.cs deleted file mode 100644 index cee130fe149d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.Int64.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void XorInt64() - { - var test = new SimpleBinaryOpTest__XorInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__XorInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int64[] inArray1, Int64[] inArray2, Int64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__XorInt64 testClass) - { - var result = Avx2.Xor(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__XorInt64 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Xor( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__XorInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__XorInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Xor( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Xor( - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Xor( - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Xor), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Xor), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Xor), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Xor( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Xor( - Avx.LoadVector256((Int64*)(pClsVar1)), - Avx.LoadVector256((Int64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__XorInt64(); - var result = Avx2.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__XorInt64(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Xor( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Xor(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Xor( - Avx.LoadVector256((Int64*)(pFld1)), - Avx.LoadVector256((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Xor( - Avx.LoadVector256((Int64*)(&test._fld1)), - Avx.LoadVector256((Int64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((long)(left[0] ^ right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((long)(left[i] ^ right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Xor)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.SByte.cs deleted file mode 100644 index 5b931bc4df1b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.SByte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void XorSByte() - { - var test = new SimpleBinaryOpTest__XorSByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__XorSByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__XorSByte testClass) - { - var result = Avx2.Xor(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__XorSByte testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Xor( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__XorSByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__XorSByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Xor( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Xor( - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Xor( - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Xor), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Xor), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Xor), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Xor( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Xor( - Avx.LoadVector256((SByte*)(pClsVar1)), - Avx.LoadVector256((SByte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArray2Ptr)); - var result = Avx2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__XorSByte(); - var result = Avx2.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__XorSByte(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Xor( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Xor(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Xor( - Avx.LoadVector256((SByte*)(pFld1)), - Avx.LoadVector256((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Xor( - Avx.LoadVector256((SByte*)(&test._fld1)), - Avx.LoadVector256((SByte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((sbyte)(left[0] ^ right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((sbyte)(left[i] ^ right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Xor)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.UInt16.cs deleted file mode 100644 index cd9304fab8a2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.UInt16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void XorUInt16() - { - var test = new SimpleBinaryOpTest__XorUInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__XorUInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__XorUInt16 testClass) - { - var result = Avx2.Xor(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__XorUInt16 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Xor( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__XorUInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__XorUInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Xor( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Xor( - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Xor( - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Xor), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Xor), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Xor), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Xor( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Xor( - Avx.LoadVector256((UInt16*)(pClsVar1)), - Avx.LoadVector256((UInt16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArray2Ptr)); - var result = Avx2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__XorUInt16(); - var result = Avx2.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__XorUInt16(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Xor( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Xor(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Xor( - Avx.LoadVector256((UInt16*)(pFld1)), - Avx.LoadVector256((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Xor( - Avx.LoadVector256((UInt16*)(&test._fld1)), - Avx.LoadVector256((UInt16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((ushort)(left[0] ^ right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((ushort)(left[i] ^ right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Xor)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.UInt32.cs deleted file mode 100644 index 839b37af922a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.UInt32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void XorUInt32() - { - var test = new SimpleBinaryOpTest__XorUInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__XorUInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__XorUInt32 testClass) - { - var result = Avx2.Xor(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__XorUInt32 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Xor( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__XorUInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__XorUInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Xor( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Xor( - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Xor( - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Xor), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Xor), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Xor), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Xor( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Xor( - Avx.LoadVector256((UInt32*)(pClsVar1)), - Avx.LoadVector256((UInt32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__XorUInt32(); - var result = Avx2.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__XorUInt32(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Xor( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Xor(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Xor( - Avx.LoadVector256((UInt32*)(pFld1)), - Avx.LoadVector256((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Xor( - Avx.LoadVector256((UInt32*)(&test._fld1)), - Avx.LoadVector256((UInt32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((uint)(left[0] ^ right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((uint)(left[i] ^ right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Xor)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.UInt64.cs deleted file mode 100644 index af421b9b8772..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.UInt64.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void XorUInt64() - { - var test = new SimpleBinaryOpTest__XorUInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__XorUInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt64[] inArray1, UInt64[] inArray2, UInt64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__XorUInt64 testClass) - { - var result = Avx2.Xor(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__XorUInt64 testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Xor( - Avx.LoadVector256((UInt64*)(pFld1)), - Avx.LoadVector256((UInt64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - - private Vector256 _fld1; - private Vector256 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__XorUInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__XorUInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Xor( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Xor( - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Xor( - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Xor), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Xor), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Xor), new Type[] { typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Xor( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - { - var result = Avx2.Xor( - Avx.LoadVector256((UInt64*)(pClsVar1)), - Avx.LoadVector256((UInt64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__XorUInt64(); - var result = Avx2.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__XorUInt64(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - { - var result = Avx2.Xor( - Avx.LoadVector256((UInt64*)(pFld1)), - Avx.LoadVector256((UInt64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Xor(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - { - var result = Avx2.Xor( - Avx.LoadVector256((UInt64*)(pFld1)), - Avx.LoadVector256((UInt64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.Xor( - Avx.LoadVector256((UInt64*)(&test._fld1)), - Avx.LoadVector256((UInt64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt64[] left, UInt64[] right, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((ulong)(left[0] ^ right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((ulong)(left[i] ^ right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Xor)}(Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.Int32.1.cs deleted file mode 100644 index 5e717770abf4..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.Int32.1.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendInt321() - { - var test = new ImmBinaryOpTest__BlendInt321(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__BlendInt321 - { - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__BlendInt321 testClass) - { - var result = Avx2.Blend(_fld1, _fld2, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__BlendInt321() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__BlendInt321() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Blend( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Blend( - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Blend( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Blend( - _clsVar1, - _clsVar2, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Blend(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Blend(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Blend(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__BlendInt321(); - var result = Avx2.Blend(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Blend(_fld1, _fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Blend(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (((1 & (1 << 0)) == 0) ? left[0] : right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (((1 & (1 << i)) == 0) ? left[i] : right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Blend)}(Vector128.1, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.Int32.2.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.Int32.2.cs deleted file mode 100644 index 6725be4caec1..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.Int32.2.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendInt322() - { - var test = new ImmBinaryOpTest__BlendInt322(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__BlendInt322 - { - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__BlendInt322 testClass) - { - var result = Avx2.Blend(_fld1, _fld2, 2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__BlendInt322() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__BlendInt322() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Blend( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Blend( - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Blend( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Blend( - _clsVar1, - _clsVar2, - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Blend(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Blend(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Blend(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__BlendInt322(); - var result = Avx2.Blend(test._fld1, test._fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Blend(_fld1, _fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Blend(test._fld1, test._fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (((2 & (1 << 0)) == 0) ? left[0] : right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (((2 & (1 << i)) == 0) ? left[i] : right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Blend)}(Vector128.2, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.Int32.4.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.Int32.4.cs deleted file mode 100644 index 4462e98de69b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.Int32.4.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendInt324() - { - var test = new ImmBinaryOpTest__BlendInt324(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__BlendInt324 - { - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__BlendInt324 testClass) - { - var result = Avx2.Blend(_fld1, _fld2, 4); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__BlendInt324() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__BlendInt324() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Blend( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Blend( - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Blend( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)4 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)), - (byte)4 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)), - (byte)4 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Blend( - _clsVar1, - _clsVar2, - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Blend(left, right, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Blend(left, right, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Blend(left, right, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__BlendInt324(); - var result = Avx2.Blend(test._fld1, test._fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Blend(_fld1, _fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Blend(test._fld1, test._fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (((4 & (1 << 0)) == 0) ? left[0] : right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (((4 & (1 << i)) == 0) ? left[i] : right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Blend)}(Vector128.4, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.Int32.85.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.Int32.85.cs deleted file mode 100644 index b6dfdc8ef607..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.Int32.85.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendInt3285() - { - var test = new ImmBinaryOpTest__BlendInt3285(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__BlendInt3285 - { - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__BlendInt3285 testClass) - { - var result = Avx2.Blend(_fld1, _fld2, 85); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__BlendInt3285() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__BlendInt3285() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Blend( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 85 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Blend( - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)), - 85 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Blend( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)), - 85 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)85 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)), - (byte)85 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)), - (byte)85 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Blend( - _clsVar1, - _clsVar2, - 85 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Blend(left, right, 85); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Blend(left, right, 85); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Blend(left, right, 85); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__BlendInt3285(); - var result = Avx2.Blend(test._fld1, test._fld2, 85); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Blend(_fld1, _fld2, 85); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Blend(test._fld1, test._fld2, 85); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (((85 & (1 << 0)) == 0) ? left[0] : right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (((85 & (1 << i)) == 0) ? left[i] : right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Blend)}(Vector128.85, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.UInt32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.UInt32.1.cs deleted file mode 100644 index 836ff7f09842..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.UInt32.1.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendUInt321() - { - var test = new ImmBinaryOpTest__BlendUInt321(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__BlendUInt321 - { - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__BlendUInt321 testClass) - { - var result = Avx2.Blend(_fld1, _fld2, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__BlendUInt321() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__BlendUInt321() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Blend( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Blend( - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Blend( - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Blend( - _clsVar1, - _clsVar2, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Blend(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Blend(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Blend(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__BlendUInt321(); - var result = Avx2.Blend(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Blend(_fld1, _fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Blend(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (((1 & (1 << 0)) == 0) ? left[0] : right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (((1 & (1 << i)) == 0) ? left[i] : right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Blend)}(Vector128.1, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.UInt32.2.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.UInt32.2.cs deleted file mode 100644 index fe38fa2549f2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.UInt32.2.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendUInt322() - { - var test = new ImmBinaryOpTest__BlendUInt322(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__BlendUInt322 - { - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__BlendUInt322 testClass) - { - var result = Avx2.Blend(_fld1, _fld2, 2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__BlendUInt322() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__BlendUInt322() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Blend( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Blend( - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Blend( - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Blend( - _clsVar1, - _clsVar2, - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Blend(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Blend(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Blend(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__BlendUInt322(); - var result = Avx2.Blend(test._fld1, test._fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Blend(_fld1, _fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Blend(test._fld1, test._fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (((2 & (1 << 0)) == 0) ? left[0] : right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (((2 & (1 << i)) == 0) ? left[i] : right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Blend)}(Vector128.2, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.UInt32.4.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.UInt32.4.cs deleted file mode 100644 index 021de97086ca..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.UInt32.4.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendUInt324() - { - var test = new ImmBinaryOpTest__BlendUInt324(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__BlendUInt324 - { - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__BlendUInt324 testClass) - { - var result = Avx2.Blend(_fld1, _fld2, 4); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__BlendUInt324() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__BlendUInt324() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Blend( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Blend( - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Blend( - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)4 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)), - (byte)4 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)), - (byte)4 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Blend( - _clsVar1, - _clsVar2, - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Blend(left, right, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Blend(left, right, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Blend(left, right, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__BlendUInt324(); - var result = Avx2.Blend(test._fld1, test._fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Blend(_fld1, _fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Blend(test._fld1, test._fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (((4 & (1 << 0)) == 0) ? left[0] : right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (((4 & (1 << i)) == 0) ? left[i] : right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Blend)}(Vector128.4, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.UInt32.85.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.UInt32.85.cs deleted file mode 100644 index 06d7db2239e0..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.UInt32.85.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendUInt3285() - { - var test = new ImmBinaryOpTest__BlendUInt3285(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__BlendUInt3285 - { - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__BlendUInt3285 testClass) - { - var result = Avx2.Blend(_fld1, _fld2, 85); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__BlendUInt3285() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__BlendUInt3285() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.Blend( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 85 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.Blend( - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)), - 85 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.Blend( - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)), - 85 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)85 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)), - (byte)85 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.Blend), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)), - (byte)85 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.Blend( - _clsVar1, - _clsVar2, - 85 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.Blend(left, right, 85); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Blend(left, right, 85); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.Blend(left, right, 85); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__BlendUInt3285(); - var result = Avx2.Blend(test._fld1, test._fld2, 85); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.Blend(_fld1, _fld2, 85); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.Blend(test._fld1, test._fld2, 85); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (((85 & (1 << 0)) == 0) ? left[0] : right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (((85 & (1 << i)) == 0) ? left[i] : right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.Blend)}(Vector128.85, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector128.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector128.Byte.cs deleted file mode 100644 index e3d126e34aab..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector128.Byte.cs +++ /dev/null @@ -1,165 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector128Byte() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128Byte(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector128Byte - { - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data = new Byte[Op1ElementCount]; - - private SimpleUnaryOpTest__DataTable _dataTable; - - public SimpleUnaryOpTest__BroadcastScalarToVector128Byte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector128( - (Byte*)(_dataTable.inArrayPtr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(Byte*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArrayPtr, typeof(Byte*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray = new Byte[Op1ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray = new Byte[Op1ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Byte[] firstOp, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((firstOp[0] != result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector128.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector128.Int16.cs deleted file mode 100644 index 684e0f5765a2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector128.Int16.cs +++ /dev/null @@ -1,165 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector128Int16() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128Int16(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector128Int16 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data = new Int16[Op1ElementCount]; - - private SimpleUnaryOpTest__DataTable _dataTable; - - public SimpleUnaryOpTest__BroadcastScalarToVector128Int16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector128( - (Int16*)(_dataTable.inArrayPtr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(Int16*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArrayPtr, typeof(Int16*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int16[] firstOp, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((firstOp[0] != result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector128.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector128.Int32.cs deleted file mode 100644 index 0c699c6763fa..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector128.Int32.cs +++ /dev/null @@ -1,165 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector128Int32() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128Int32(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector128Int32 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data = new Int32[Op1ElementCount]; - - private SimpleUnaryOpTest__DataTable _dataTable; - - public SimpleUnaryOpTest__BroadcastScalarToVector128Int32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector128( - (Int32*)(_dataTable.inArrayPtr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(Int32*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArrayPtr, typeof(Int32*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int32[] firstOp, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((firstOp[0] != result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector128.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector128.Int64.cs deleted file mode 100644 index 78ed3929796c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector128.Int64.cs +++ /dev/null @@ -1,165 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector128Int64() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128Int64(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector128Int64 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data = new Int64[Op1ElementCount]; - - private SimpleUnaryOpTest__DataTable _dataTable; - - public SimpleUnaryOpTest__BroadcastScalarToVector128Int64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector128( - (Int64*)(_dataTable.inArrayPtr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(Int64*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArrayPtr, typeof(Int64*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int64[] firstOp, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((firstOp[0] != result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector128.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector128.SByte.cs deleted file mode 100644 index 1e64204e502c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector128.SByte.cs +++ /dev/null @@ -1,165 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector128SByte() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128SByte(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector128SByte - { - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data = new SByte[Op1ElementCount]; - - private SimpleUnaryOpTest__DataTable _dataTable; - - public SimpleUnaryOpTest__BroadcastScalarToVector128SByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector128( - (SByte*)(_dataTable.inArrayPtr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(SByte*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArrayPtr, typeof(SByte*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray = new SByte[Op1ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray = new SByte[Op1ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(SByte[] firstOp, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((firstOp[0] != result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector128.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector128.UInt16.cs deleted file mode 100644 index 73e296c711c8..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector128.UInt16.cs +++ /dev/null @@ -1,165 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector128UInt16() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128UInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector128UInt16 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data = new UInt16[Op1ElementCount]; - - private SimpleUnaryOpTest__DataTable _dataTable; - - public SimpleUnaryOpTest__BroadcastScalarToVector128UInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector128( - (UInt16*)(_dataTable.inArrayPtr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(UInt16*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArrayPtr, typeof(UInt16*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt16[] firstOp, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((firstOp[0] != result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector128.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector128.UInt32.cs deleted file mode 100644 index d69743b75dd2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector128.UInt32.cs +++ /dev/null @@ -1,165 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector128UInt32() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128UInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector128UInt32 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data = new UInt32[Op1ElementCount]; - - private SimpleUnaryOpTest__DataTable _dataTable; - - public SimpleUnaryOpTest__BroadcastScalarToVector128UInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector128( - (UInt32*)(_dataTable.inArrayPtr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(UInt32*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArrayPtr, typeof(UInt32*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt32[] firstOp, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((firstOp[0] != result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector128.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector128.UInt64.cs deleted file mode 100644 index 89cd9163da9d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector128.UInt64.cs +++ /dev/null @@ -1,165 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector128UInt64() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector128UInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector128UInt64 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data = new UInt64[Op1ElementCount]; - - private SimpleUnaryOpTest__DataTable _dataTable; - - public SimpleUnaryOpTest__BroadcastScalarToVector128UInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector128( - (UInt64*)(_dataTable.inArrayPtr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector128), new Type[] { typeof(UInt64*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArrayPtr, typeof(UInt64*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt64[] firstOp, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((firstOp[0] != result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector256.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector256.Byte.cs deleted file mode 100644 index bfdacccffa69..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector256.Byte.cs +++ /dev/null @@ -1,165 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector256Byte() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256Byte(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector256Byte - { - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data = new Byte[Op1ElementCount]; - - private SimpleUnaryOpTest__DataTable _dataTable; - - public SimpleUnaryOpTest__BroadcastScalarToVector256Byte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector256( - (Byte*)(_dataTable.inArrayPtr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(Byte*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArrayPtr, typeof(Byte*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray = new Byte[Op1ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray = new Byte[Op1ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Byte[] firstOp, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((firstOp[0] != result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector256)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector256.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector256.Int16.cs deleted file mode 100644 index e40b57572d16..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector256.Int16.cs +++ /dev/null @@ -1,165 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector256Int16() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256Int16(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector256Int16 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data = new Int16[Op1ElementCount]; - - private SimpleUnaryOpTest__DataTable _dataTable; - - public SimpleUnaryOpTest__BroadcastScalarToVector256Int16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector256( - (Int16*)(_dataTable.inArrayPtr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(Int16*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArrayPtr, typeof(Int16*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int16[] firstOp, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((firstOp[0] != result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector256)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector256.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector256.Int32.cs deleted file mode 100644 index 056c5a7b52f9..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector256.Int32.cs +++ /dev/null @@ -1,165 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector256Int32() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256Int32(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector256Int32 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data = new Int32[Op1ElementCount]; - - private SimpleUnaryOpTest__DataTable _dataTable; - - public SimpleUnaryOpTest__BroadcastScalarToVector256Int32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector256( - (Int32*)(_dataTable.inArrayPtr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(Int32*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArrayPtr, typeof(Int32*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int32[] firstOp, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((firstOp[0] != result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector256)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector256.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector256.Int64.cs deleted file mode 100644 index b9d0cb176482..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector256.Int64.cs +++ /dev/null @@ -1,165 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector256Int64() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256Int64(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector256Int64 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data = new Int64[Op1ElementCount]; - - private SimpleUnaryOpTest__DataTable _dataTable; - - public SimpleUnaryOpTest__BroadcastScalarToVector256Int64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector256( - (Int64*)(_dataTable.inArrayPtr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(Int64*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArrayPtr, typeof(Int64*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int64[] firstOp, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((firstOp[0] != result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector256)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector256.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector256.SByte.cs deleted file mode 100644 index 0a5e099b0821..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector256.SByte.cs +++ /dev/null @@ -1,165 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector256SByte() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256SByte(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector256SByte - { - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data = new SByte[Op1ElementCount]; - - private SimpleUnaryOpTest__DataTable _dataTable; - - public SimpleUnaryOpTest__BroadcastScalarToVector256SByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector256( - (SByte*)(_dataTable.inArrayPtr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(SByte*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArrayPtr, typeof(SByte*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray = new SByte[Op1ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray = new SByte[Op1ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(SByte[] firstOp, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((firstOp[0] != result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector256)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector256.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector256.UInt16.cs deleted file mode 100644 index 0448cb155dd8..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector256.UInt16.cs +++ /dev/null @@ -1,165 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector256UInt16() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256UInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector256UInt16 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data = new UInt16[Op1ElementCount]; - - private SimpleUnaryOpTest__DataTable _dataTable; - - public SimpleUnaryOpTest__BroadcastScalarToVector256UInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector256( - (UInt16*)(_dataTable.inArrayPtr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(UInt16*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArrayPtr, typeof(UInt16*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt16[] firstOp, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((firstOp[0] != result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector256)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector256.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector256.UInt32.cs deleted file mode 100644 index c81392f366ca..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector256.UInt32.cs +++ /dev/null @@ -1,165 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector256UInt32() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256UInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector256UInt32 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data = new UInt32[Op1ElementCount]; - - private SimpleUnaryOpTest__DataTable _dataTable; - - public SimpleUnaryOpTest__BroadcastScalarToVector256UInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector256( - (UInt32*)(_dataTable.inArrayPtr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(UInt32*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArrayPtr, typeof(UInt32*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt32[] firstOp, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((firstOp[0] != result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector256)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector256.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector256.UInt64.cs deleted file mode 100644 index f36830f58a98..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/BroadcastScalarToVector256.UInt64.cs +++ /dev/null @@ -1,165 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BroadcastScalarToVector256UInt64() - { - var test = new SimpleUnaryOpTest__BroadcastScalarToVector256UInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__BroadcastScalarToVector256UInt64 - { - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data = new UInt64[Op1ElementCount]; - - private SimpleUnaryOpTest__DataTable _dataTable; - - public SimpleUnaryOpTest__BroadcastScalarToVector256UInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.BroadcastScalarToVector256( - (UInt64*)(_dataTable.inArrayPtr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.BroadcastScalarToVector256), new Type[] { typeof(UInt64*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArrayPtr, typeof(UInt64*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt64[] firstOp, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((firstOp[0] != result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.BroadcastScalarToVector256)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/MaskLoad.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/MaskLoad.Int32.cs deleted file mode 100644 index c9263a5dd982..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/MaskLoad.Int32.cs +++ /dev/null @@ -1,409 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; -using System.Reflection; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaskLoadInt32() - { - var test = new SimpleBinaryOpTest__MaskLoadInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MaskLoadInt32 - { - private struct TestStruct - { - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MaskLoadInt32 testClass) - { - var result = Avx2.MaskLoad((Int32*)testClass._dataTable.inArray1Ptr, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(testClass._dataTable.inArray1Ptr, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector128 _clsVar2; - - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static SimpleBinaryOpTest__MaskLoadInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MaskLoadInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.MaskLoad( - (Int32*)_dataTable.inArray1Ptr, - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.MaskLoad( - (Int32*)_dataTable.inArray1Ptr, - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.MaskLoad( - (Int32*)_dataTable.inArray1Ptr, - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MaskLoad), new Type[] { typeof(Int32*), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(Int32*)), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MaskLoad), new Type[] { typeof(Int32*), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(Int32*)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MaskLoad), new Type[] { typeof(Int32*), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(Int32*)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.MaskLoad( - (Int32*)_dataTable.inArray1Ptr, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = (Int32*)_dataTable.inArray1Ptr; - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = (Int32*)_dataTable.inArray1Ptr; - var right = Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = (Int32*)_dataTable.inArray1Ptr; - var right = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx2.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MaskLoadInt32(); - var result = Avx2.MaskLoad((Int32*)_dataTable.inArray1Ptr, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.MaskLoad((Int32*)_dataTable.inArray1Ptr, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.MaskLoad((Int32*)_dataTable.inArray1Ptr, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(void* left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((right[0] < 0) ? left[0] : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((right[i] < 0) ? left[i] : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.MaskLoad)}(Int32*, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/MaskLoad.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/MaskLoad.Int64.cs deleted file mode 100644 index 19ed5ca54f00..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/MaskLoad.Int64.cs +++ /dev/null @@ -1,409 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; -using System.Reflection; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaskLoadInt64() - { - var test = new SimpleBinaryOpTest__MaskLoadInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MaskLoadInt64 - { - private struct TestStruct - { - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MaskLoadInt64 testClass) - { - var result = Avx2.MaskLoad((Int64*)testClass._dataTable.inArray1Ptr, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(testClass._dataTable.inArray1Ptr, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector128 _clsVar2; - - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static SimpleBinaryOpTest__MaskLoadInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MaskLoadInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.MaskLoad( - (Int64*)_dataTable.inArray1Ptr, - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.MaskLoad( - (Int64*)_dataTable.inArray1Ptr, - Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.MaskLoad( - (Int64*)_dataTable.inArray1Ptr, - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MaskLoad), new Type[] { typeof(Int64*), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(Int64*)), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MaskLoad), new Type[] { typeof(Int64*), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(Int64*)), - Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MaskLoad), new Type[] { typeof(Int64*), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(Int64*)), - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.MaskLoad( - (Int64*)_dataTable.inArray1Ptr, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = (Int64*)_dataTable.inArray1Ptr; - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = (Int64*)_dataTable.inArray1Ptr; - var right = Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx2.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = (Int64*)_dataTable.inArray1Ptr; - var right = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx2.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MaskLoadInt64(); - var result = Avx2.MaskLoad((Int64*)_dataTable.inArray1Ptr, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.MaskLoad((Int64*)_dataTable.inArray1Ptr, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.MaskLoad((Int64*)_dataTable.inArray1Ptr, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(void* left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((right[0] < 0) ? left[0] : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((right[i] < 0) ? left[i] : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.MaskLoad)}(Int64*, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/MaskLoad.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/MaskLoad.UInt32.cs deleted file mode 100644 index 42ec3efa5235..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/MaskLoad.UInt32.cs +++ /dev/null @@ -1,409 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; -using System.Reflection; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaskLoadUInt32() - { - var test = new SimpleBinaryOpTest__MaskLoadUInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MaskLoadUInt32 - { - private struct TestStruct - { - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MaskLoadUInt32 testClass) - { - var result = Avx2.MaskLoad((UInt32*)testClass._dataTable.inArray1Ptr, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(testClass._dataTable.inArray1Ptr, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector128 _clsVar2; - - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static SimpleBinaryOpTest__MaskLoadUInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MaskLoadUInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.MaskLoad( - (UInt32*)_dataTable.inArray1Ptr, - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.MaskLoad( - (UInt32*)_dataTable.inArray1Ptr, - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.MaskLoad( - (UInt32*)_dataTable.inArray1Ptr, - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MaskLoad), new Type[] { typeof(UInt32*), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(UInt32*)), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MaskLoad), new Type[] { typeof(UInt32*), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(UInt32*)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MaskLoad), new Type[] { typeof(UInt32*), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(UInt32*)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.MaskLoad( - (UInt32*)_dataTable.inArray1Ptr, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = (UInt32*)_dataTable.inArray1Ptr; - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = (UInt32*)_dataTable.inArray1Ptr; - var right = Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = (UInt32*)_dataTable.inArray1Ptr; - var right = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MaskLoadUInt32(); - var result = Avx2.MaskLoad((UInt32*)_dataTable.inArray1Ptr, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.MaskLoad((UInt32*)_dataTable.inArray1Ptr, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.MaskLoad((UInt32*)_dataTable.inArray1Ptr, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(void* left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (((right[0] & (1U << 31)) != 0) ? left[0] : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (((right[i] & (1U << 31)) != 0) ? left[i] : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.MaskLoad)}(UInt32*, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/MaskLoad.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/MaskLoad.UInt64.cs deleted file mode 100644 index 606c844432d1..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/MaskLoad.UInt64.cs +++ /dev/null @@ -1,409 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; -using System.Reflection; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaskLoadUInt64() - { - var test = new SimpleBinaryOpTest__MaskLoadUInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MaskLoadUInt64 - { - private struct TestStruct - { - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MaskLoadUInt64 testClass) - { - var result = Avx2.MaskLoad((UInt64*)testClass._dataTable.inArray1Ptr, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(testClass._dataTable.inArray1Ptr, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector128 _clsVar2; - - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static SimpleBinaryOpTest__MaskLoadUInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MaskLoadUInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.MaskLoad( - (UInt64*)_dataTable.inArray1Ptr, - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.MaskLoad( - (UInt64*)_dataTable.inArray1Ptr, - Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.MaskLoad( - (UInt64*)_dataTable.inArray1Ptr, - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MaskLoad), new Type[] { typeof(UInt64*), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(UInt64*)), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MaskLoad), new Type[] { typeof(UInt64*), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(UInt64*)), - Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.MaskLoad), new Type[] { typeof(UInt64*), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(UInt64*)), - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.MaskLoad( - (UInt64*)_dataTable.inArray1Ptr, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = (UInt64*)_dataTable.inArray1Ptr; - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = (UInt64*)_dataTable.inArray1Ptr; - var right = Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx2.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = (UInt64*)_dataTable.inArray1Ptr; - var right = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)); - var result = Avx2.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MaskLoadUInt64(); - var result = Avx2.MaskLoad((UInt64*)_dataTable.inArray1Ptr, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.MaskLoad((UInt64*)_dataTable.inArray1Ptr, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.MaskLoad((UInt64*)_dataTable.inArray1Ptr, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(void* left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt64[] left, UInt64[] right, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (((right[0] & (1UL << 63)) != 0) ? left[0] : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (((right[i] & (1UL << 63)) != 0) ? left[i] : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.MaskLoad)}(UInt64*, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/MaskStore.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/MaskStore.Int32.cs deleted file mode 100644 index e4815e22273a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/MaskStore.Int32.cs +++ /dev/null @@ -1,404 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaskStoreInt32() - { - var test = new StoreBinaryOpTest__MaskStoreInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class StoreBinaryOpTest__MaskStoreInt32 - { - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(StoreBinaryOpTest__MaskStoreInt32 testClass) - { - Avx2.MaskStore((Int32*)testClass._dataTable.outArrayPtr, _fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static StoreBinaryOpTest__MaskStoreInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public StoreBinaryOpTest__MaskStoreInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - Avx2.MaskStore( - (Int32*)_dataTable.outArrayPtr, - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - Avx2.MaskStore( - (Int32*)_dataTable.outArrayPtr, - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - Avx2.MaskStore( - (Int32*)_dataTable.outArrayPtr, - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - typeof(Avx2).GetMethod(nameof(Avx2.MaskStore), new Type[] { typeof(Int32*), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(Int32*)), - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - typeof(Avx2).GetMethod(nameof(Avx2.MaskStore), new Type[] { typeof(Int32*), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(Int32*)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - typeof(Avx2).GetMethod(nameof(Avx2.MaskStore), new Type[] { typeof(Int32*), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(Int32*)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - Avx2.MaskStore( - (Int32*)_dataTable.outArrayPtr, - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - Avx2.MaskStore((Int32*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)); - Avx2.MaskStore((Int32*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)); - Avx2.MaskStore((Int32*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new StoreBinaryOpTest__MaskStoreInt32(); - Avx2.MaskStore((Int32*)_dataTable.outArrayPtr, test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - Avx2.MaskStore((Int32*)_dataTable.outArrayPtr, _fld1, _fld2); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - Avx2.MaskStore((Int32*)_dataTable.outArrayPtr, test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((left[0] < 0) ? right[0] : result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((left[i] < 0) ? right[i] : result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.MaskStore)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/MaskStore.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/MaskStore.Int64.cs deleted file mode 100644 index 620767ad2e97..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/MaskStore.Int64.cs +++ /dev/null @@ -1,404 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaskStoreInt64() - { - var test = new StoreBinaryOpTest__MaskStoreInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class StoreBinaryOpTest__MaskStoreInt64 - { - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(StoreBinaryOpTest__MaskStoreInt64 testClass) - { - Avx2.MaskStore((Int64*)testClass._dataTable.outArrayPtr, _fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static StoreBinaryOpTest__MaskStoreInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public StoreBinaryOpTest__MaskStoreInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - Avx2.MaskStore( - (Int64*)_dataTable.outArrayPtr, - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - Avx2.MaskStore( - (Int64*)_dataTable.outArrayPtr, - Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - Avx2.MaskStore( - (Int64*)_dataTable.outArrayPtr, - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - typeof(Avx2).GetMethod(nameof(Avx2.MaskStore), new Type[] { typeof(Int64*), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(Int64*)), - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - typeof(Avx2).GetMethod(nameof(Avx2.MaskStore), new Type[] { typeof(Int64*), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(Int64*)), - Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - typeof(Avx2).GetMethod(nameof(Avx2.MaskStore), new Type[] { typeof(Int64*), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(Int64*)), - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - Avx2.MaskStore( - (Int64*)_dataTable.outArrayPtr, - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - Avx2.MaskStore((Int64*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)); - Avx2.MaskStore((Int64*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)); - Avx2.MaskStore((Int64*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new StoreBinaryOpTest__MaskStoreInt64(); - Avx2.MaskStore((Int64*)_dataTable.outArrayPtr, test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - Avx2.MaskStore((Int64*)_dataTable.outArrayPtr, _fld1, _fld2); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - Avx2.MaskStore((Int64*)_dataTable.outArrayPtr, test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((left[0] < 0) ? right[0] : result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((left[i] < 0) ? right[i] : result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.MaskStore)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/MaskStore.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/MaskStore.UInt32.cs deleted file mode 100644 index 0c263e082259..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/MaskStore.UInt32.cs +++ /dev/null @@ -1,404 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaskStoreUInt32() - { - var test = new StoreBinaryOpTest__MaskStoreUInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class StoreBinaryOpTest__MaskStoreUInt32 - { - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(StoreBinaryOpTest__MaskStoreUInt32 testClass) - { - Avx2.MaskStore((UInt32*)testClass._dataTable.outArrayPtr, _fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static StoreBinaryOpTest__MaskStoreUInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public StoreBinaryOpTest__MaskStoreUInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - Avx2.MaskStore( - (UInt32*)_dataTable.outArrayPtr, - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - Avx2.MaskStore( - (UInt32*)_dataTable.outArrayPtr, - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - Avx2.MaskStore( - (UInt32*)_dataTable.outArrayPtr, - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - typeof(Avx2).GetMethod(nameof(Avx2.MaskStore), new Type[] { typeof(UInt32*), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(UInt32*)), - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - typeof(Avx2).GetMethod(nameof(Avx2.MaskStore), new Type[] { typeof(UInt32*), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(UInt32*)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - typeof(Avx2).GetMethod(nameof(Avx2.MaskStore), new Type[] { typeof(UInt32*), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(UInt32*)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - Avx2.MaskStore( - (UInt32*)_dataTable.outArrayPtr, - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - Avx2.MaskStore((UInt32*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)); - Avx2.MaskStore((UInt32*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)); - Avx2.MaskStore((UInt32*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new StoreBinaryOpTest__MaskStoreUInt32(); - Avx2.MaskStore((UInt32*)_dataTable.outArrayPtr, test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - Avx2.MaskStore((UInt32*)_dataTable.outArrayPtr, _fld1, _fld2); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - Avx2.MaskStore((UInt32*)_dataTable.outArrayPtr, test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (((left[0] & (1U << 31)) != 0) ? right[0] : result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (((left[i] & (1U << 31)) != 0) ? right[i] : result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.MaskStore)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/MaskStore.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/MaskStore.UInt64.cs deleted file mode 100644 index 337247e1d2bc..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/MaskStore.UInt64.cs +++ /dev/null @@ -1,404 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaskStoreUInt64() - { - var test = new StoreBinaryOpTest__MaskStoreUInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class StoreBinaryOpTest__MaskStoreUInt64 - { - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(StoreBinaryOpTest__MaskStoreUInt64 testClass) - { - Avx2.MaskStore((UInt64*)testClass._dataTable.outArrayPtr, _fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static StoreBinaryOpTest__MaskStoreUInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public StoreBinaryOpTest__MaskStoreUInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - Avx2.MaskStore( - (UInt64*)_dataTable.outArrayPtr, - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - Avx2.MaskStore( - (UInt64*)_dataTable.outArrayPtr, - Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - Avx2.MaskStore( - (UInt64*)_dataTable.outArrayPtr, - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - typeof(Avx2).GetMethod(nameof(Avx2.MaskStore), new Type[] { typeof(UInt64*), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(UInt64*)), - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - typeof(Avx2).GetMethod(nameof(Avx2.MaskStore), new Type[] { typeof(UInt64*), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(UInt64*)), - Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - typeof(Avx2).GetMethod(nameof(Avx2.MaskStore), new Type[] { typeof(UInt64*), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(UInt64*)), - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - Avx2.MaskStore( - (UInt64*)_dataTable.outArrayPtr, - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - Avx2.MaskStore((UInt64*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)); - Avx2.MaskStore((UInt64*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)); - Avx2.MaskStore((UInt64*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new StoreBinaryOpTest__MaskStoreUInt64(); - Avx2.MaskStore((UInt64*)_dataTable.outArrayPtr, test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - Avx2.MaskStore((UInt64*)_dataTable.outArrayPtr, _fld1, _fld2); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - Avx2.MaskStore((UInt64*)_dataTable.outArrayPtr, test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt64[] left, UInt64[] right, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (((left[0] & (1UL << 63)) != 0) ? right[0] : result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (((left[i] & (1UL << 63)) != 0) ? right[i] : result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.MaskStore)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/ShiftRightArithmeticVariable.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/ShiftRightArithmeticVariable.Int32.cs deleted file mode 100644 index b2abd55caa22..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/ShiftRightArithmeticVariable.Int32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightArithmeticVariableInt32() - { - var test = new SimpleBinaryOpTest__ShiftRightArithmeticVariableInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__ShiftRightArithmeticVariableInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, UInt32[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (TestLibrary.Generator.GetUInt32() % 32); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__ShiftRightArithmeticVariableInt32 testClass) - { - var result = Avx2.ShiftRightArithmeticVariable(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__ShiftRightArithmeticVariableInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Avx2.ShiftRightArithmeticVariable( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__ShiftRightArithmeticVariableInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (TestLibrary.Generator.GetUInt32() % 32); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__ShiftRightArithmeticVariableInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (TestLibrary.Generator.GetUInt32() % 32); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (TestLibrary.Generator.GetUInt32() % 32); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx2.ShiftRightArithmeticVariable( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx2.ShiftRightArithmeticVariable( - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx2.ShiftRightArithmeticVariable( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightArithmeticVariable), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightArithmeticVariable), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx2).GetMethod(nameof(Avx2.ShiftRightArithmeticVariable), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx2.ShiftRightArithmeticVariable( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Avx2.ShiftRightArithmeticVariable( - Sse2.LoadVector128((Int32*)(pClsVar1)), - Sse2.LoadVector128((UInt32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx2.ShiftRightArithmeticVariable(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.ShiftRightArithmeticVariable(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Avx2.ShiftRightArithmeticVariable(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__ShiftRightArithmeticVariableInt32(); - var result = Avx2.ShiftRightArithmeticVariable(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__ShiftRightArithmeticVariableInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Avx2.ShiftRightArithmeticVariable( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx2.ShiftRightArithmeticVariable(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Avx2.ShiftRightArithmeticVariable( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftRightArithmeticVariable(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx2.ShiftRightArithmeticVariable( - Sse2.LoadVector128((Int32*)(&test._fld1)), - Sse2.LoadVector128((UInt32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, UInt32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((int)(left[0] >> (int)right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((int)(left[i] >> (int)right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx2)}.{nameof(Avx2.ShiftRightArithmeticVariable)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx_Vector128/MaskLoad.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx_Vector128/MaskLoad.Double.cs deleted file mode 100644 index 06946c46e80a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx_Vector128/MaskLoad.Double.cs +++ /dev/null @@ -1,409 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; -using System.Reflection; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaskLoadDouble() - { - var test = new SimpleBinaryOpTest__MaskLoadDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MaskLoadDouble - { - private struct TestStruct - { - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MaskLoadDouble testClass) - { - var result = Avx.MaskLoad((Double*)testClass._dataTable.inArray1Ptr, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(testClass._dataTable.inArray1Ptr, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar2; - - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static SimpleBinaryOpTest__MaskLoadDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MaskLoadDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.MaskLoad( - (Double*)_dataTable.inArray1Ptr, - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.MaskLoad( - (Double*)_dataTable.inArray1Ptr, - Avx.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.MaskLoad( - (Double*)_dataTable.inArray1Ptr, - Avx.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.MaskLoad), new Type[] { typeof(Double*), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(Double*)), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.MaskLoad), new Type[] { typeof(Double*), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(Double*)), - Avx.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.MaskLoad), new Type[] { typeof(Double*), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(Double*)), - Avx.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.MaskLoad( - (Double*)_dataTable.inArray1Ptr, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = (Double*)_dataTable.inArray1Ptr; - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = (Double*)_dataTable.inArray1Ptr; - var right = Avx.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = (Double*)_dataTable.inArray1Ptr; - var right = Avx.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Avx.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MaskLoadDouble(); - var result = Avx.MaskLoad((Double*)_dataTable.inArray1Ptr, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.MaskLoad((Double*)_dataTable.inArray1Ptr, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.MaskLoad((Double*)_dataTable.inArray1Ptr, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(void* left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits((BitConverter.DoubleToInt64Bits(right[0]) < 0) ? left[0] : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits((BitConverter.DoubleToInt64Bits(right[i]) < 0) ? left[i] : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.MaskLoad)}(Double*, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx_Vector128/MaskLoad.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx_Vector128/MaskLoad.Single.cs deleted file mode 100644 index 231b529cef3c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx_Vector128/MaskLoad.Single.cs +++ /dev/null @@ -1,409 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; -using System.Reflection; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaskLoadSingle() - { - var test = new SimpleBinaryOpTest__MaskLoadSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MaskLoadSingle - { - private struct TestStruct - { - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MaskLoadSingle testClass) - { - var result = Avx.MaskLoad((Single*)testClass._dataTable.inArray1Ptr, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(testClass._dataTable.inArray1Ptr, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar2; - - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static SimpleBinaryOpTest__MaskLoadSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MaskLoadSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.MaskLoad( - (Single*)_dataTable.inArray1Ptr, - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.MaskLoad( - (Single*)_dataTable.inArray1Ptr, - Avx.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.MaskLoad( - (Single*)_dataTable.inArray1Ptr, - Avx.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.MaskLoad), new Type[] { typeof(Single*), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(Single*)), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.MaskLoad), new Type[] { typeof(Single*), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(Single*)), - Avx.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.MaskLoad), new Type[] { typeof(Single*), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArray1Ptr, typeof(Single*)), - Avx.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.MaskLoad( - (Single*)_dataTable.inArray1Ptr, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = (Single*)_dataTable.inArray1Ptr; - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = (Single*)_dataTable.inArray1Ptr; - var right = Avx.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = (Single*)_dataTable.inArray1Ptr; - var right = Avx.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Avx.MaskLoad(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MaskLoadSingle(); - var result = Avx.MaskLoad((Single*)_dataTable.inArray1Ptr, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.MaskLoad((Single*)_dataTable.inArray1Ptr, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.MaskLoad((Single*)_dataTable.inArray1Ptr, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(void* left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits((BitConverter.SingleToInt32Bits(right[0]) < 0) ? left[0] : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits((BitConverter.SingleToInt32Bits(right[i]) < 0) ? left[i] : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.MaskLoad)}(Single*, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx_Vector128/MaskStore.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx_Vector128/MaskStore.Double.cs deleted file mode 100644 index 82b629e86231..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx_Vector128/MaskStore.Double.cs +++ /dev/null @@ -1,404 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaskStoreDouble() - { - var test = new StoreBinaryOpTest__MaskStoreDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class StoreBinaryOpTest__MaskStoreDouble - { - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(StoreBinaryOpTest__MaskStoreDouble testClass) - { - Avx.MaskStore((Double*)testClass._dataTable.outArrayPtr, _fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static StoreBinaryOpTest__MaskStoreDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public StoreBinaryOpTest__MaskStoreDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - Avx.MaskStore( - (Double*)_dataTable.outArrayPtr, - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - Avx.MaskStore( - (Double*)_dataTable.outArrayPtr, - Avx.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - Avx.MaskStore( - (Double*)_dataTable.outArrayPtr, - Avx.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - typeof(Avx).GetMethod(nameof(Avx.MaskStore), new Type[] { typeof(Double*), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(Double*)), - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - typeof(Avx).GetMethod(nameof(Avx.MaskStore), new Type[] { typeof(Double*), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(Double*)), - Avx.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - typeof(Avx).GetMethod(nameof(Avx.MaskStore), new Type[] { typeof(Double*), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(Double*)), - Avx.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - Avx.MaskStore( - (Double*)_dataTable.outArrayPtr, - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - Avx.MaskStore((Double*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - Avx.MaskStore((Double*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - Avx.MaskStore((Double*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new StoreBinaryOpTest__MaskStoreDouble(); - Avx.MaskStore((Double*)_dataTable.outArrayPtr, test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - Avx.MaskStore((Double*)_dataTable.outArrayPtr, _fld1, _fld2); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - Avx.MaskStore((Double*)_dataTable.outArrayPtr, test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits((BitConverter.DoubleToInt64Bits(left[0]) < 0) ? right[0] : BitConverter.DoubleToInt64Bits(result[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits((BitConverter.DoubleToInt64Bits(left[i]) < 0) ? right[i] : BitConverter.DoubleToInt64Bits(result[i]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.MaskStore)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx_Vector128/MaskStore.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx_Vector128/MaskStore.Single.cs deleted file mode 100644 index 8501dce2ab2e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx_Vector128/MaskStore.Single.cs +++ /dev/null @@ -1,404 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaskStoreSingle() - { - var test = new StoreBinaryOpTest__MaskStoreSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class StoreBinaryOpTest__MaskStoreSingle - { - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(StoreBinaryOpTest__MaskStoreSingle testClass) - { - Avx.MaskStore((Single*)testClass._dataTable.outArrayPtr, _fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static StoreBinaryOpTest__MaskStoreSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public StoreBinaryOpTest__MaskStoreSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - Avx.MaskStore( - (Single*)_dataTable.outArrayPtr, - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - Avx.MaskStore( - (Single*)_dataTable.outArrayPtr, - Avx.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - Avx.MaskStore( - (Single*)_dataTable.outArrayPtr, - Avx.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - typeof(Avx).GetMethod(nameof(Avx.MaskStore), new Type[] { typeof(Single*), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(Single*)), - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - typeof(Avx).GetMethod(nameof(Avx.MaskStore), new Type[] { typeof(Single*), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(Single*)), - Avx.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - typeof(Avx).GetMethod(nameof(Avx.MaskStore), new Type[] { typeof(Single*), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof(Single*)), - Avx.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - Avx.MaskStore( - (Single*)_dataTable.outArrayPtr, - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - Avx.MaskStore((Single*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Avx.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - Avx.MaskStore((Single*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Avx.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var right = Avx.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - Avx.MaskStore((Single*)_dataTable.outArrayPtr, left, right); - - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new StoreBinaryOpTest__MaskStoreSingle(); - Avx.MaskStore((Single*)_dataTable.outArrayPtr, test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - Avx.MaskStore((Single*)_dataTable.outArrayPtr, _fld1, _fld2); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - Avx.MaskStore((Single*)_dataTable.outArrayPtr, test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits((BitConverter.SingleToInt32Bits(left[0]) < 0) ? right[0] : BitConverter.SingleToInt32Bits(result[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits((BitConverter.SingleToInt32Bits(left[i]) < 0) ? right[i] : BitConverter.SingleToInt32Bits(result[i]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.MaskStore)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx_Vector128/PermuteVar.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx_Vector128/PermuteVar.Double.cs deleted file mode 100644 index 0fb39249ca03..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx_Vector128/PermuteVar.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void PermuteVarDouble() - { - var test = new SimpleBinaryOpTest__PermuteVarDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__PermuteVarDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Int64[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)1; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__PermuteVarDouble testClass) - { - var result = Avx.PermuteVar(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__PermuteVarDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Avx.PermuteVar( - Avx.LoadVector128((Double*)(pFld1)), - Avx.LoadVector128((Int64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__PermuteVarDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)1; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__PermuteVarDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)1; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)1; } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.PermuteVar( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.PermuteVar( - Avx.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector128((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.PermuteVar( - Avx.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.PermuteVar), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.PermuteVar), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Avx.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector128((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.PermuteVar), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.PermuteVar( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Avx.PermuteVar( - Avx.LoadVector128((Double*)(pClsVar1)), - Avx.LoadVector128((Int64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.PermuteVar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx.PermuteVar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = Avx.PermuteVar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__PermuteVarDouble(); - var result = Avx.PermuteVar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__PermuteVarDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Avx.PermuteVar( - Avx.LoadVector128((Double*)(pFld1)), - Avx.LoadVector128((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.PermuteVar(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Avx.PermuteVar( - Avx.LoadVector128((Double*)(pFld1)), - Avx.LoadVector128((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.PermuteVar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.PermuteVar( - Avx.LoadVector128((Double*)(&test._fld1)), - Avx.LoadVector128((Int64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Int64[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(left[0]) != BitConverter.DoubleToInt64Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(left[0]) != BitConverter.DoubleToInt64Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.PermuteVar)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx_Vector128/PermuteVar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx_Vector128/PermuteVar.Single.cs deleted file mode 100644 index b1ad49d99251..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx_Vector128/PermuteVar.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void PermuteVarSingle() - { - var test = new SimpleBinaryOpTest__PermuteVarSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__PermuteVarSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Int32[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = 1; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__PermuteVarSingle testClass) - { - var result = Avx.PermuteVar(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__PermuteVarSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Avx.PermuteVar( - Avx.LoadVector128((Single*)(pFld1)), - Avx.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__PermuteVarSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = 1; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__PermuteVarSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = 1; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = 1; } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Avx.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Avx.PermuteVar( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Avx.PermuteVar( - Avx.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Avx.PermuteVar( - Avx.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Avx).GetMethod(nameof(Avx.PermuteVar), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Avx).GetMethod(nameof(Avx.PermuteVar), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Avx.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Avx).GetMethod(nameof(Avx.PermuteVar), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Avx.PermuteVar( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Avx.PermuteVar( - Avx.LoadVector128((Single*)(pClsVar1)), - Avx.LoadVector128((Int32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Avx.PermuteVar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx.PermuteVar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Avx.PermuteVar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__PermuteVarSingle(); - var result = Avx.PermuteVar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__PermuteVarSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Avx.PermuteVar( - Avx.LoadVector128((Single*)(pFld1)), - Avx.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Avx.PermuteVar(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Avx.PermuteVar( - Avx.LoadVector128((Single*)(pFld1)), - Avx.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Avx.PermuteVar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Avx.PermuteVar( - Avx.LoadVector128((Single*)(&test._fld1)), - Avx.LoadVector128((Int32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Int32[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(left[1]) != BitConverter.SingleToInt32Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(left[1]) != BitConverter.SingleToInt32Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Avx)}.{nameof(Avx.PermuteVar)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1.X64/AndNot.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1.X64/AndNot.UInt64.cs deleted file mode 100644 index 86953a8dac75..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1.X64/AndNot.UInt64.cs +++ /dev/null @@ -1,242 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndNotUInt64() - { - var test = new ScalarBinaryOpTest__AndNotUInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.ReadUnaligned - test.RunBasicScenario_UnsafeRead(); - - // Validates calling via reflection works, using Unsafe.ReadUnaligned - test.RunReflectionScenario_UnsafeRead(); - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.ReadUnaligned - test.RunLclVarScenario_UnsafeRead(); - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ScalarBinaryOpTest__AndNotUInt64 - { - private struct TestStruct - { - public UInt64 _fld1; - public UInt64 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - testStruct._fld1 = TestLibrary.Generator.GetUInt64(); - testStruct._fld2 = TestLibrary.Generator.GetUInt64(); - - return testStruct; - } - - public void RunStructFldScenario(ScalarBinaryOpTest__AndNotUInt64 testClass) - { - var result = Bmi1.X64.AndNot(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - } - - private static UInt64 _data1; - private static UInt64 _data2; - - private static UInt64 _clsVar1; - private static UInt64 _clsVar2; - - private UInt64 _fld1; - private UInt64 _fld2; - - static ScalarBinaryOpTest__AndNotUInt64() - { - _clsVar1 = TestLibrary.Generator.GetUInt64(); - _clsVar2 = TestLibrary.Generator.GetUInt64(); - } - - public ScalarBinaryOpTest__AndNotUInt64() - { - Succeeded = true; - - _fld1 = TestLibrary.Generator.GetUInt64(); - _fld2 = TestLibrary.Generator.GetUInt64(); - - _data1 = TestLibrary.Generator.GetUInt64(); - _data2 = TestLibrary.Generator.GetUInt64(); - } - - public bool IsSupported => Bmi1.X64.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Bmi1.X64.AndNot( - Unsafe.ReadUnaligned(ref Unsafe.As(ref _data1)), - Unsafe.ReadUnaligned(ref Unsafe.As(ref _data2)) - ); - - ValidateResult(_data1, _data2, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Bmi1.X64).GetMethod(nameof(Bmi1.X64.AndNot), new Type[] { typeof(UInt64), typeof(UInt64) }) - .Invoke(null, new object[] { - Unsafe.ReadUnaligned(ref Unsafe.As(ref _data1)), - Unsafe.ReadUnaligned(ref Unsafe.As(ref _data2)) - }); - - ValidateResult(_data1, _data2, (UInt64)result); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Bmi1.X64.AndNot( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var data1 = Unsafe.ReadUnaligned(ref Unsafe.As(ref _data1)); - var data2 = Unsafe.ReadUnaligned(ref Unsafe.As(ref _data2)); - var result = Bmi1.X64.AndNot(data1, data2); - - ValidateResult(data1, data2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ScalarBinaryOpTest__AndNotUInt64(); - var result = Bmi1.X64.AndNot(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Bmi1.X64.AndNot(_fld1, _fld2); - ValidateResult(_fld1, _fld2, result); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Bmi1.X64.AndNot(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(UInt64 left, UInt64 right, UInt64 result, [CallerMemberName] string method = "") - { - var isUnexpectedResult = false; - - isUnexpectedResult = ((~left & right) != result); - - if (isUnexpectedResult) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Bmi1.X64)}.{nameof(Bmi1.X64.AndNot)}(UInt64, UInt64): AndNot failed:"); - TestLibrary.TestFramework.LogInformation($" left: {left}"); - TestLibrary.TestFramework.LogInformation($" right: {right}"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/AndNot.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/AndNot.UInt32.cs deleted file mode 100644 index 822bbbf982c8..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/AndNot.UInt32.cs +++ /dev/null @@ -1,242 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndNotUInt32() - { - var test = new ScalarBinaryOpTest__AndNotUInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.ReadUnaligned - test.RunBasicScenario_UnsafeRead(); - - // Validates calling via reflection works, using Unsafe.ReadUnaligned - test.RunReflectionScenario_UnsafeRead(); - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.ReadUnaligned - test.RunLclVarScenario_UnsafeRead(); - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ScalarBinaryOpTest__AndNotUInt32 - { - private struct TestStruct - { - public UInt32 _fld1; - public UInt32 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - testStruct._fld1 = TestLibrary.Generator.GetUInt32(); - testStruct._fld2 = TestLibrary.Generator.GetUInt32(); - - return testStruct; - } - - public void RunStructFldScenario(ScalarBinaryOpTest__AndNotUInt32 testClass) - { - var result = Bmi1.AndNot(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - } - - private static UInt32 _data1; - private static UInt32 _data2; - - private static UInt32 _clsVar1; - private static UInt32 _clsVar2; - - private UInt32 _fld1; - private UInt32 _fld2; - - static ScalarBinaryOpTest__AndNotUInt32() - { - _clsVar1 = TestLibrary.Generator.GetUInt32(); - _clsVar2 = TestLibrary.Generator.GetUInt32(); - } - - public ScalarBinaryOpTest__AndNotUInt32() - { - Succeeded = true; - - _fld1 = TestLibrary.Generator.GetUInt32(); - _fld2 = TestLibrary.Generator.GetUInt32(); - - _data1 = TestLibrary.Generator.GetUInt32(); - _data2 = TestLibrary.Generator.GetUInt32(); - } - - public bool IsSupported => Bmi1.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Bmi1.AndNot( - Unsafe.ReadUnaligned(ref Unsafe.As(ref _data1)), - Unsafe.ReadUnaligned(ref Unsafe.As(ref _data2)) - ); - - ValidateResult(_data1, _data2, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Bmi1).GetMethod(nameof(Bmi1.AndNot), new Type[] { typeof(UInt32), typeof(UInt32) }) - .Invoke(null, new object[] { - Unsafe.ReadUnaligned(ref Unsafe.As(ref _data1)), - Unsafe.ReadUnaligned(ref Unsafe.As(ref _data2)) - }); - - ValidateResult(_data1, _data2, (UInt32)result); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Bmi1.AndNot( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var data1 = Unsafe.ReadUnaligned(ref Unsafe.As(ref _data1)); - var data2 = Unsafe.ReadUnaligned(ref Unsafe.As(ref _data2)); - var result = Bmi1.AndNot(data1, data2); - - ValidateResult(data1, data2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ScalarBinaryOpTest__AndNotUInt32(); - var result = Bmi1.AndNot(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Bmi1.AndNot(_fld1, _fld2); - ValidateResult(_fld1, _fld2, result); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Bmi1.AndNot(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(UInt32 left, UInt32 right, UInt32 result, [CallerMemberName] string method = "") - { - var isUnexpectedResult = false; - - isUnexpectedResult = ((~left & right) != result); - - if (isUnexpectedResult) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Bmi1)}.{nameof(Bmi1.AndNot)}(UInt32, UInt32): AndNot failed:"); - TestLibrary.TestFramework.LogInformation($" left: {left}"); - TestLibrary.TestFramework.LogInformation($" right: {right}"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAdd.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAdd.Double.cs deleted file mode 100644 index 5a691902682e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAdd.Double.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplyAddDouble() - { - var test = new SimpleTernaryOpTest__MultiplyAddDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__MultiplyAddDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] inArray3, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - public Vector128 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__MultiplyAddDouble testClass) - { - var result = Fma.MultiplyAdd(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__MultiplyAddDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Fma.MultiplyAdd( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)), - Sse2.LoadVector128((Double*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - private static Double[] _data3 = new Double[Op3ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - private static Vector128 _clsVar3; - - private Vector128 _fld1; - private Vector128 _fld2; - private Vector128 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__MultiplyAddDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__MultiplyAddDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, _data3, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Fma.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Fma.MultiplyAdd( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Fma.MultiplyAdd( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Fma.MultiplyAdd( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAdd), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAdd), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAdd), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Fma.MultiplyAdd( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - fixed (Vector128* pClsVar3 = &_clsVar3) - { - var result = Fma.MultiplyAdd( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)), - Sse2.LoadVector128((Double*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Fma.MultiplyAdd(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var op3 = Sse2.LoadVector128((Double*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplyAdd(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var op3 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplyAdd(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__MultiplyAddDouble(); - var result = Fma.MultiplyAdd(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__MultiplyAddDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - fixed (Vector128* pFld3 = &test._fld3) - { - var result = Fma.MultiplyAdd( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)), - Sse2.LoadVector128((Double*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Fma.MultiplyAdd(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Fma.MultiplyAdd( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)), - Sse2.LoadVector128((Double*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Fma.MultiplyAdd(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Fma.MultiplyAdd( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)), - Sse2.LoadVector128((Double*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, Vector128 op3, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] inArray3 = new Double[Op3ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] inArray3 = new Double[Op3ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] secondOp, Double[] thirdOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(Math.Round((firstOp[0] * secondOp[0]) + thirdOp[0], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[0], 9))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(Math.Round((firstOp[i] * secondOp[i]) + thirdOp[i], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[i], 9))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Fma)}.{nameof(Fma.MultiplyAdd)}(Vector128, Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAdd.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAdd.Single.cs deleted file mode 100644 index 7199d6aec3ef..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAdd.Single.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplyAddSingle() - { - var test = new SimpleTernaryOpTest__MultiplyAddSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__MultiplyAddSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] inArray3, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - public Vector128 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__MultiplyAddSingle testClass) - { - var result = Fma.MultiplyAdd(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__MultiplyAddSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Fma.MultiplyAdd( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)), - Sse.LoadVector128((Single*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - private static Single[] _data3 = new Single[Op3ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - private static Vector128 _clsVar3; - - private Vector128 _fld1; - private Vector128 _fld2; - private Vector128 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__MultiplyAddSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__MultiplyAddSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, _data3, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Fma.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Fma.MultiplyAdd( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Fma.MultiplyAdd( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Fma.MultiplyAdd( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAdd), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAdd), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAdd), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Fma.MultiplyAdd( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - fixed (Vector128* pClsVar3 = &_clsVar3) - { - var result = Fma.MultiplyAdd( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)), - Sse.LoadVector128((Single*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Fma.MultiplyAdd(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var op3 = Sse.LoadVector128((Single*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplyAdd(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var op3 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplyAdd(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__MultiplyAddSingle(); - var result = Fma.MultiplyAdd(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__MultiplyAddSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - fixed (Vector128* pFld3 = &test._fld3) - { - var result = Fma.MultiplyAdd( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)), - Sse.LoadVector128((Single*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Fma.MultiplyAdd(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Fma.MultiplyAdd( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)), - Sse.LoadVector128((Single*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Fma.MultiplyAdd(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Fma.MultiplyAdd( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)), - Sse.LoadVector128((Single*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, Vector128 op3, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] inArray3 = new Single[Op3ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] inArray3 = new Single[Op3ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] secondOp, Single[] thirdOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(MathF.Round((firstOp[0] * secondOp[0]) + thirdOp[0], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[0], 3))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(MathF.Round((firstOp[i] * secondOp[i]) + thirdOp[i], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[i], 3))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Fma)}.{nameof(Fma.MultiplyAdd)}(Vector128, Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddNegated.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddNegated.Double.cs deleted file mode 100644 index 28016115ddac..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddNegated.Double.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplyAddNegatedDouble() - { - var test = new SimpleTernaryOpTest__MultiplyAddNegatedDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__MultiplyAddNegatedDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] inArray3, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - public Vector128 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__MultiplyAddNegatedDouble testClass) - { - var result = Fma.MultiplyAddNegated(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__MultiplyAddNegatedDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Fma.MultiplyAddNegated( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)), - Sse2.LoadVector128((Double*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - private static Double[] _data3 = new Double[Op3ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - private static Vector128 _clsVar3; - - private Vector128 _fld1; - private Vector128 _fld2; - private Vector128 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__MultiplyAddNegatedDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__MultiplyAddNegatedDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, _data3, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Fma.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Fma.MultiplyAddNegated( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Fma.MultiplyAddNegated( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Fma.MultiplyAddNegated( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAddNegated), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAddNegated), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAddNegated), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Fma.MultiplyAddNegated( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - fixed (Vector128* pClsVar3 = &_clsVar3) - { - var result = Fma.MultiplyAddNegated( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)), - Sse2.LoadVector128((Double*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Fma.MultiplyAddNegated(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var op3 = Sse2.LoadVector128((Double*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplyAddNegated(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var op3 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplyAddNegated(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__MultiplyAddNegatedDouble(); - var result = Fma.MultiplyAddNegated(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__MultiplyAddNegatedDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - fixed (Vector128* pFld3 = &test._fld3) - { - var result = Fma.MultiplyAddNegated( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)), - Sse2.LoadVector128((Double*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Fma.MultiplyAddNegated(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Fma.MultiplyAddNegated( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)), - Sse2.LoadVector128((Double*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Fma.MultiplyAddNegated(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Fma.MultiplyAddNegated( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)), - Sse2.LoadVector128((Double*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, Vector128 op3, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] inArray3 = new Double[Op3ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] inArray3 = new Double[Op3ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] secondOp, Double[] thirdOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(Math.Round(-(firstOp[0] * secondOp[0]) + thirdOp[0], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[0], 9))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(Math.Round(-(firstOp[i] * secondOp[i]) + thirdOp[i], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[i], 9))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Fma)}.{nameof(Fma.MultiplyAddNegated)}(Vector128, Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddNegated.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddNegated.Single.cs deleted file mode 100644 index 0578c03d879a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddNegated.Single.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplyAddNegatedSingle() - { - var test = new SimpleTernaryOpTest__MultiplyAddNegatedSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__MultiplyAddNegatedSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] inArray3, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - public Vector128 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__MultiplyAddNegatedSingle testClass) - { - var result = Fma.MultiplyAddNegated(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__MultiplyAddNegatedSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Fma.MultiplyAddNegated( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)), - Sse.LoadVector128((Single*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - private static Single[] _data3 = new Single[Op3ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - private static Vector128 _clsVar3; - - private Vector128 _fld1; - private Vector128 _fld2; - private Vector128 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__MultiplyAddNegatedSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__MultiplyAddNegatedSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, _data3, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Fma.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Fma.MultiplyAddNegated( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Fma.MultiplyAddNegated( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Fma.MultiplyAddNegated( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAddNegated), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAddNegated), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAddNegated), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Fma.MultiplyAddNegated( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - fixed (Vector128* pClsVar3 = &_clsVar3) - { - var result = Fma.MultiplyAddNegated( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)), - Sse.LoadVector128((Single*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Fma.MultiplyAddNegated(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var op3 = Sse.LoadVector128((Single*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplyAddNegated(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var op3 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplyAddNegated(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__MultiplyAddNegatedSingle(); - var result = Fma.MultiplyAddNegated(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__MultiplyAddNegatedSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - fixed (Vector128* pFld3 = &test._fld3) - { - var result = Fma.MultiplyAddNegated( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)), - Sse.LoadVector128((Single*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Fma.MultiplyAddNegated(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Fma.MultiplyAddNegated( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)), - Sse.LoadVector128((Single*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Fma.MultiplyAddNegated(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Fma.MultiplyAddNegated( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)), - Sse.LoadVector128((Single*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, Vector128 op3, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] inArray3 = new Single[Op3ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] inArray3 = new Single[Op3ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] secondOp, Single[] thirdOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(MathF.Round(-(firstOp[0] * secondOp[0]) + thirdOp[0], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[0], 3))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(MathF.Round(-(firstOp[i] * secondOp[i]) + thirdOp[i], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[i], 3))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Fma)}.{nameof(Fma.MultiplyAddNegated)}(Vector128, Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddSubtract.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddSubtract.Double.cs deleted file mode 100644 index 07b1e023877d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddSubtract.Double.cs +++ /dev/null @@ -1,628 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplyAddSubtractDouble() - { - var test = new AlternatingTernaryOpTest__MultiplyAddSubtractDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class AlternatingTernaryOpTest__MultiplyAddSubtractDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] inArray3, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - public Vector128 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(AlternatingTernaryOpTest__MultiplyAddSubtractDouble testClass) - { - var result = Fma.MultiplyAddSubtract(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(AlternatingTernaryOpTest__MultiplyAddSubtractDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Fma.MultiplyAddSubtract( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)), - Sse2.LoadVector128((Double*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - private static Double[] _data3 = new Double[Op3ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - private static Vector128 _clsVar3; - - private Vector128 _fld1; - private Vector128 _fld2; - private Vector128 _fld3; - - private DataTable _dataTable; - - static AlternatingTernaryOpTest__MultiplyAddSubtractDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public AlternatingTernaryOpTest__MultiplyAddSubtractDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, _data3, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Fma.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Fma.MultiplyAddSubtract( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Fma.MultiplyAddSubtract( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Fma.MultiplyAddSubtract( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAddSubtract), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAddSubtract), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAddSubtract), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Fma.MultiplyAddSubtract( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - fixed (Vector128* pClsVar3 = &_clsVar3) - { - var result = Fma.MultiplyAddSubtract( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)), - Sse2.LoadVector128((Double*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Fma.MultiplyAddSubtract(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var op3 = Sse2.LoadVector128((Double*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplyAddSubtract(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var op3 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplyAddSubtract(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new AlternatingTernaryOpTest__MultiplyAddSubtractDouble(); - var result = Fma.MultiplyAddSubtract(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new AlternatingTernaryOpTest__MultiplyAddSubtractDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - fixed (Vector128* pFld3 = &test._fld3) - { - var result = Fma.MultiplyAddSubtract( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)), - Sse2.LoadVector128((Double*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Fma.MultiplyAddSubtract(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Fma.MultiplyAddSubtract( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)), - Sse2.LoadVector128((Double*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Fma.MultiplyAddSubtract(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Fma.MultiplyAddSubtract( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)), - Sse2.LoadVector128((Double*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, Vector128 op3, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] inArray3 = new Double[Op3ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] inArray3 = new Double[Op3ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] secondOp, Double[] thirdOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i += 2) - { - if (BitConverter.DoubleToInt64Bits(Math.Round((firstOp[i] * secondOp[i]) - thirdOp[i], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[i], 9))) - { - succeeded = false; - break; - } - - if (BitConverter.DoubleToInt64Bits(Math.Round((firstOp[i + 1] * secondOp[i + 1]) + thirdOp[i + 1], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[i + 1], 9))) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Fma)}.{nameof(Fma.MultiplyAddSubtract)}(Vector128, Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddSubtract.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddSubtract.Single.cs deleted file mode 100644 index dc77464cd2a7..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddSubtract.Single.cs +++ /dev/null @@ -1,628 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplyAddSubtractSingle() - { - var test = new AlternatingTernaryOpTest__MultiplyAddSubtractSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class AlternatingTernaryOpTest__MultiplyAddSubtractSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] inArray3, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - public Vector128 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(AlternatingTernaryOpTest__MultiplyAddSubtractSingle testClass) - { - var result = Fma.MultiplyAddSubtract(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(AlternatingTernaryOpTest__MultiplyAddSubtractSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Fma.MultiplyAddSubtract( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)), - Sse.LoadVector128((Single*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - private static Single[] _data3 = new Single[Op3ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - private static Vector128 _clsVar3; - - private Vector128 _fld1; - private Vector128 _fld2; - private Vector128 _fld3; - - private DataTable _dataTable; - - static AlternatingTernaryOpTest__MultiplyAddSubtractSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public AlternatingTernaryOpTest__MultiplyAddSubtractSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, _data3, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Fma.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Fma.MultiplyAddSubtract( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Fma.MultiplyAddSubtract( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Fma.MultiplyAddSubtract( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAddSubtract), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAddSubtract), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAddSubtract), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Fma.MultiplyAddSubtract( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - fixed (Vector128* pClsVar3 = &_clsVar3) - { - var result = Fma.MultiplyAddSubtract( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)), - Sse.LoadVector128((Single*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Fma.MultiplyAddSubtract(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var op3 = Sse.LoadVector128((Single*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplyAddSubtract(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var op3 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplyAddSubtract(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new AlternatingTernaryOpTest__MultiplyAddSubtractSingle(); - var result = Fma.MultiplyAddSubtract(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new AlternatingTernaryOpTest__MultiplyAddSubtractSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - fixed (Vector128* pFld3 = &test._fld3) - { - var result = Fma.MultiplyAddSubtract( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)), - Sse.LoadVector128((Single*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Fma.MultiplyAddSubtract(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Fma.MultiplyAddSubtract( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)), - Sse.LoadVector128((Single*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Fma.MultiplyAddSubtract(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Fma.MultiplyAddSubtract( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)), - Sse.LoadVector128((Single*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, Vector128 op3, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] inArray3 = new Single[Op3ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] inArray3 = new Single[Op3ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] secondOp, Single[] thirdOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i += 2) - { - if (BitConverter.SingleToInt32Bits(MathF.Round((firstOp[i] * secondOp[i]) - thirdOp[i], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[i], 3))) - { - succeeded = false; - break; - } - - if (BitConverter.SingleToInt32Bits(MathF.Round((firstOp[i + 1] * secondOp[i + 1]) + thirdOp[i + 1], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[i + 1], 3))) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Fma)}.{nameof(Fma.MultiplyAddSubtract)}(Vector128, Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtract.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtract.Double.cs deleted file mode 100644 index 873384dbe7ce..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtract.Double.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplySubtractDouble() - { - var test = new SimpleTernaryOpTest__MultiplySubtractDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__MultiplySubtractDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] inArray3, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - public Vector128 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__MultiplySubtractDouble testClass) - { - var result = Fma.MultiplySubtract(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__MultiplySubtractDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Fma.MultiplySubtract( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)), - Sse2.LoadVector128((Double*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - private static Double[] _data3 = new Double[Op3ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - private static Vector128 _clsVar3; - - private Vector128 _fld1; - private Vector128 _fld2; - private Vector128 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__MultiplySubtractDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__MultiplySubtractDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, _data3, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Fma.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Fma.MultiplySubtract( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Fma.MultiplySubtract( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Fma.MultiplySubtract( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtract), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtract), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtract), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Fma.MultiplySubtract( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - fixed (Vector128* pClsVar3 = &_clsVar3) - { - var result = Fma.MultiplySubtract( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)), - Sse2.LoadVector128((Double*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Fma.MultiplySubtract(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var op3 = Sse2.LoadVector128((Double*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplySubtract(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var op3 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplySubtract(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__MultiplySubtractDouble(); - var result = Fma.MultiplySubtract(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__MultiplySubtractDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - fixed (Vector128* pFld3 = &test._fld3) - { - var result = Fma.MultiplySubtract( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)), - Sse2.LoadVector128((Double*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Fma.MultiplySubtract(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Fma.MultiplySubtract( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)), - Sse2.LoadVector128((Double*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Fma.MultiplySubtract(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Fma.MultiplySubtract( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)), - Sse2.LoadVector128((Double*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, Vector128 op3, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] inArray3 = new Double[Op3ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] inArray3 = new Double[Op3ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] secondOp, Double[] thirdOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(Math.Round((firstOp[0] * secondOp[0]) - thirdOp[0], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[0], 9))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(Math.Round((firstOp[i] * secondOp[i]) - thirdOp[i], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[i], 9))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Fma)}.{nameof(Fma.MultiplySubtract)}(Vector128, Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtract.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtract.Single.cs deleted file mode 100644 index 4a58b4398c69..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtract.Single.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplySubtractSingle() - { - var test = new SimpleTernaryOpTest__MultiplySubtractSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__MultiplySubtractSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] inArray3, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - public Vector128 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__MultiplySubtractSingle testClass) - { - var result = Fma.MultiplySubtract(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__MultiplySubtractSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Fma.MultiplySubtract( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)), - Sse.LoadVector128((Single*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - private static Single[] _data3 = new Single[Op3ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - private static Vector128 _clsVar3; - - private Vector128 _fld1; - private Vector128 _fld2; - private Vector128 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__MultiplySubtractSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__MultiplySubtractSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, _data3, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Fma.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Fma.MultiplySubtract( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Fma.MultiplySubtract( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Fma.MultiplySubtract( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtract), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtract), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtract), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Fma.MultiplySubtract( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - fixed (Vector128* pClsVar3 = &_clsVar3) - { - var result = Fma.MultiplySubtract( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)), - Sse.LoadVector128((Single*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Fma.MultiplySubtract(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var op3 = Sse.LoadVector128((Single*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplySubtract(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var op3 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplySubtract(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__MultiplySubtractSingle(); - var result = Fma.MultiplySubtract(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__MultiplySubtractSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - fixed (Vector128* pFld3 = &test._fld3) - { - var result = Fma.MultiplySubtract( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)), - Sse.LoadVector128((Single*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Fma.MultiplySubtract(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Fma.MultiplySubtract( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)), - Sse.LoadVector128((Single*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Fma.MultiplySubtract(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Fma.MultiplySubtract( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)), - Sse.LoadVector128((Single*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, Vector128 op3, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] inArray3 = new Single[Op3ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] inArray3 = new Single[Op3ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] secondOp, Single[] thirdOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(MathF.Round((firstOp[0] * secondOp[0]) - thirdOp[0], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[0], 3))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(MathF.Round((firstOp[i] * secondOp[i]) - thirdOp[i], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[i], 3))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Fma)}.{nameof(Fma.MultiplySubtract)}(Vector128, Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractAdd.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractAdd.Double.cs deleted file mode 100644 index 080d6e13ba42..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractAdd.Double.cs +++ /dev/null @@ -1,628 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplySubtractAddDouble() - { - var test = new AlternatingTernaryOpTest__MultiplySubtractAddDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class AlternatingTernaryOpTest__MultiplySubtractAddDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] inArray3, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - public Vector128 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(AlternatingTernaryOpTest__MultiplySubtractAddDouble testClass) - { - var result = Fma.MultiplySubtractAdd(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(AlternatingTernaryOpTest__MultiplySubtractAddDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Fma.MultiplySubtractAdd( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)), - Sse2.LoadVector128((Double*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - private static Double[] _data3 = new Double[Op3ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - private static Vector128 _clsVar3; - - private Vector128 _fld1; - private Vector128 _fld2; - private Vector128 _fld3; - - private DataTable _dataTable; - - static AlternatingTernaryOpTest__MultiplySubtractAddDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public AlternatingTernaryOpTest__MultiplySubtractAddDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, _data3, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Fma.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Fma.MultiplySubtractAdd( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Fma.MultiplySubtractAdd( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Fma.MultiplySubtractAdd( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtractAdd), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtractAdd), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtractAdd), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Fma.MultiplySubtractAdd( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - fixed (Vector128* pClsVar3 = &_clsVar3) - { - var result = Fma.MultiplySubtractAdd( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)), - Sse2.LoadVector128((Double*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Fma.MultiplySubtractAdd(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var op3 = Sse2.LoadVector128((Double*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplySubtractAdd(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var op3 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplySubtractAdd(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new AlternatingTernaryOpTest__MultiplySubtractAddDouble(); - var result = Fma.MultiplySubtractAdd(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new AlternatingTernaryOpTest__MultiplySubtractAddDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - fixed (Vector128* pFld3 = &test._fld3) - { - var result = Fma.MultiplySubtractAdd( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)), - Sse2.LoadVector128((Double*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Fma.MultiplySubtractAdd(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Fma.MultiplySubtractAdd( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)), - Sse2.LoadVector128((Double*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Fma.MultiplySubtractAdd(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Fma.MultiplySubtractAdd( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)), - Sse2.LoadVector128((Double*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, Vector128 op3, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] inArray3 = new Double[Op3ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] inArray3 = new Double[Op3ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] secondOp, Double[] thirdOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i += 2) - { - if (BitConverter.DoubleToInt64Bits(Math.Round((firstOp[i] * secondOp[i]) + thirdOp[i], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[i], 9))) - { - succeeded = false; - break; - } - - if (BitConverter.DoubleToInt64Bits(Math.Round((firstOp[i + 1] * secondOp[i + 1]) - thirdOp[i + 1], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[i + 1], 9))) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Fma)}.{nameof(Fma.MultiplySubtractAdd)}(Vector128, Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractAdd.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractAdd.Single.cs deleted file mode 100644 index ac6d6641c1d5..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractAdd.Single.cs +++ /dev/null @@ -1,628 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplySubtractAddSingle() - { - var test = new AlternatingTernaryOpTest__MultiplySubtractAddSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class AlternatingTernaryOpTest__MultiplySubtractAddSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] inArray3, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - public Vector128 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(AlternatingTernaryOpTest__MultiplySubtractAddSingle testClass) - { - var result = Fma.MultiplySubtractAdd(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(AlternatingTernaryOpTest__MultiplySubtractAddSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Fma.MultiplySubtractAdd( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)), - Sse.LoadVector128((Single*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - private static Single[] _data3 = new Single[Op3ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - private static Vector128 _clsVar3; - - private Vector128 _fld1; - private Vector128 _fld2; - private Vector128 _fld3; - - private DataTable _dataTable; - - static AlternatingTernaryOpTest__MultiplySubtractAddSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public AlternatingTernaryOpTest__MultiplySubtractAddSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, _data3, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Fma.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Fma.MultiplySubtractAdd( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Fma.MultiplySubtractAdd( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Fma.MultiplySubtractAdd( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtractAdd), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtractAdd), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtractAdd), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Fma.MultiplySubtractAdd( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - fixed (Vector128* pClsVar3 = &_clsVar3) - { - var result = Fma.MultiplySubtractAdd( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)), - Sse.LoadVector128((Single*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Fma.MultiplySubtractAdd(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var op3 = Sse.LoadVector128((Single*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplySubtractAdd(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var op3 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplySubtractAdd(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new AlternatingTernaryOpTest__MultiplySubtractAddSingle(); - var result = Fma.MultiplySubtractAdd(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new AlternatingTernaryOpTest__MultiplySubtractAddSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - fixed (Vector128* pFld3 = &test._fld3) - { - var result = Fma.MultiplySubtractAdd( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)), - Sse.LoadVector128((Single*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Fma.MultiplySubtractAdd(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Fma.MultiplySubtractAdd( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)), - Sse.LoadVector128((Single*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Fma.MultiplySubtractAdd(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Fma.MultiplySubtractAdd( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)), - Sse.LoadVector128((Single*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, Vector128 op3, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] inArray3 = new Single[Op3ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] inArray3 = new Single[Op3ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] secondOp, Single[] thirdOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i += 2) - { - if (BitConverter.SingleToInt32Bits(MathF.Round((firstOp[i] * secondOp[i]) + thirdOp[i], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[i], 3))) - { - succeeded = false; - break; - } - - if (BitConverter.SingleToInt32Bits(MathF.Round((firstOp[i + 1] * secondOp[i + 1]) - thirdOp[i + 1], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[i + 1], 3))) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Fma)}.{nameof(Fma.MultiplySubtractAdd)}(Vector128, Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractNegated.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractNegated.Double.cs deleted file mode 100644 index 2e6a78e7b49a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractNegated.Double.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplySubtractNegatedDouble() - { - var test = new SimpleTernaryOpTest__MultiplySubtractNegatedDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__MultiplySubtractNegatedDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] inArray3, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - public Vector128 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__MultiplySubtractNegatedDouble testClass) - { - var result = Fma.MultiplySubtractNegated(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__MultiplySubtractNegatedDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Fma.MultiplySubtractNegated( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)), - Sse2.LoadVector128((Double*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - private static Double[] _data3 = new Double[Op3ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - private static Vector128 _clsVar3; - - private Vector128 _fld1; - private Vector128 _fld2; - private Vector128 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__MultiplySubtractNegatedDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__MultiplySubtractNegatedDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, _data3, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Fma.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Fma.MultiplySubtractNegated( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Fma.MultiplySubtractNegated( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Fma.MultiplySubtractNegated( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtractNegated), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtractNegated), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtractNegated), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Fma.MultiplySubtractNegated( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - fixed (Vector128* pClsVar3 = &_clsVar3) - { - var result = Fma.MultiplySubtractNegated( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)), - Sse2.LoadVector128((Double*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Fma.MultiplySubtractNegated(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var op3 = Sse2.LoadVector128((Double*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplySubtractNegated(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var op3 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplySubtractNegated(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__MultiplySubtractNegatedDouble(); - var result = Fma.MultiplySubtractNegated(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__MultiplySubtractNegatedDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - fixed (Vector128* pFld3 = &test._fld3) - { - var result = Fma.MultiplySubtractNegated( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)), - Sse2.LoadVector128((Double*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Fma.MultiplySubtractNegated(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Fma.MultiplySubtractNegated( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)), - Sse2.LoadVector128((Double*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Fma.MultiplySubtractNegated(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Fma.MultiplySubtractNegated( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)), - Sse2.LoadVector128((Double*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, Vector128 op3, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] inArray3 = new Double[Op3ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] inArray3 = new Double[Op3ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] secondOp, Double[] thirdOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(Math.Round(-(firstOp[0] * secondOp[0]) - thirdOp[0], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[0], 9))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(Math.Round(-(firstOp[i] * secondOp[i]) - thirdOp[i], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[i], 9))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Fma)}.{nameof(Fma.MultiplySubtractNegated)}(Vector128, Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractNegated.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractNegated.Single.cs deleted file mode 100644 index bc251020ee9e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractNegated.Single.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplySubtractNegatedSingle() - { - var test = new SimpleTernaryOpTest__MultiplySubtractNegatedSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__MultiplySubtractNegatedSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] inArray3, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - public Vector128 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__MultiplySubtractNegatedSingle testClass) - { - var result = Fma.MultiplySubtractNegated(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__MultiplySubtractNegatedSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Fma.MultiplySubtractNegated( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)), - Sse.LoadVector128((Single*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - private static Single[] _data3 = new Single[Op3ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - private static Vector128 _clsVar3; - - private Vector128 _fld1; - private Vector128 _fld2; - private Vector128 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__MultiplySubtractNegatedSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__MultiplySubtractNegatedSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, _data3, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Fma.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Fma.MultiplySubtractNegated( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Fma.MultiplySubtractNegated( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Fma.MultiplySubtractNegated( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtractNegated), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtractNegated), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtractNegated), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Fma.MultiplySubtractNegated( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - fixed (Vector128* pClsVar3 = &_clsVar3) - { - var result = Fma.MultiplySubtractNegated( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)), - Sse.LoadVector128((Single*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Fma.MultiplySubtractNegated(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var op3 = Sse.LoadVector128((Single*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplySubtractNegated(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var op3 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplySubtractNegated(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__MultiplySubtractNegatedSingle(); - var result = Fma.MultiplySubtractNegated(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__MultiplySubtractNegatedSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - fixed (Vector128* pFld3 = &test._fld3) - { - var result = Fma.MultiplySubtractNegated( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)), - Sse.LoadVector128((Single*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Fma.MultiplySubtractNegated(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Fma.MultiplySubtractNegated( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)), - Sse.LoadVector128((Single*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Fma.MultiplySubtractNegated(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Fma.MultiplySubtractNegated( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)), - Sse.LoadVector128((Single*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, Vector128 op3, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] inArray3 = new Single[Op3ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] inArray3 = new Single[Op3ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] secondOp, Single[] thirdOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(MathF.Round(-(firstOp[0] * secondOp[0]) - thirdOp[0], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[0], 3))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(MathF.Round(-(firstOp[i] * secondOp[i]) - thirdOp[i], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[i], 3))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Fma)}.{nameof(Fma.MultiplySubtractNegated)}(Vector128, Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAdd.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAdd.Double.cs deleted file mode 100644 index 1167527129a9..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAdd.Double.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplyAddDouble() - { - var test = new SimpleTernaryOpTest__MultiplyAddDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__MultiplyAddDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] inArray3, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - public Vector256 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__MultiplyAddDouble testClass) - { - var result = Fma.MultiplyAdd(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__MultiplyAddDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Fma.MultiplyAdd( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)), - Avx.LoadVector256((Double*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - private static Double[] _data3 = new Double[Op3ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - private static Vector256 _clsVar3; - - private Vector256 _fld1; - private Vector256 _fld2; - private Vector256 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__MultiplyAddDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__MultiplyAddDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, _data3, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Fma.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Fma.MultiplyAdd( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Fma.MultiplyAdd( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Fma.MultiplyAdd( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAdd), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAdd), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAdd), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Fma.MultiplyAdd( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - fixed (Vector256* pClsVar3 = &_clsVar3) - { - var result = Fma.MultiplyAdd( - Avx.LoadVector256((Double*)(pClsVar1)), - Avx.LoadVector256((Double*)(pClsVar2)), - Avx.LoadVector256((Double*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Fma.MultiplyAdd(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadVector256((Double*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplyAdd(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplyAdd(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__MultiplyAddDouble(); - var result = Fma.MultiplyAdd(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__MultiplyAddDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - fixed (Vector256* pFld3 = &test._fld3) - { - var result = Fma.MultiplyAdd( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)), - Avx.LoadVector256((Double*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Fma.MultiplyAdd(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Fma.MultiplyAdd( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)), - Avx.LoadVector256((Double*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Fma.MultiplyAdd(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Fma.MultiplyAdd( - Avx.LoadVector256((Double*)(&test._fld1)), - Avx.LoadVector256((Double*)(&test._fld2)), - Avx.LoadVector256((Double*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, Vector256 op3, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] inArray3 = new Double[Op3ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] inArray3 = new Double[Op3ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] secondOp, Double[] thirdOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(Math.Round((firstOp[0] * secondOp[0]) + thirdOp[0], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[0], 9))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(Math.Round((firstOp[i] * secondOp[i]) + thirdOp[i], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[i], 9))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Fma)}.{nameof(Fma.MultiplyAdd)}(Vector256, Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAdd.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAdd.Single.cs deleted file mode 100644 index 6acf33ec9d49..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAdd.Single.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplyAddSingle() - { - var test = new SimpleTernaryOpTest__MultiplyAddSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__MultiplyAddSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] inArray3, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - public Vector256 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__MultiplyAddSingle testClass) - { - var result = Fma.MultiplyAdd(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__MultiplyAddSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Fma.MultiplyAdd( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)), - Avx.LoadVector256((Single*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - private static Single[] _data3 = new Single[Op3ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - private static Vector256 _clsVar3; - - private Vector256 _fld1; - private Vector256 _fld2; - private Vector256 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__MultiplyAddSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__MultiplyAddSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, _data3, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Fma.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Fma.MultiplyAdd( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Fma.MultiplyAdd( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Fma.MultiplyAdd( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAdd), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAdd), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAdd), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Fma.MultiplyAdd( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - fixed (Vector256* pClsVar3 = &_clsVar3) - { - var result = Fma.MultiplyAdd( - Avx.LoadVector256((Single*)(pClsVar1)), - Avx.LoadVector256((Single*)(pClsVar2)), - Avx.LoadVector256((Single*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Fma.MultiplyAdd(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadVector256((Single*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplyAdd(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplyAdd(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__MultiplyAddSingle(); - var result = Fma.MultiplyAdd(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__MultiplyAddSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - fixed (Vector256* pFld3 = &test._fld3) - { - var result = Fma.MultiplyAdd( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)), - Avx.LoadVector256((Single*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Fma.MultiplyAdd(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Fma.MultiplyAdd( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)), - Avx.LoadVector256((Single*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Fma.MultiplyAdd(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Fma.MultiplyAdd( - Avx.LoadVector256((Single*)(&test._fld1)), - Avx.LoadVector256((Single*)(&test._fld2)), - Avx.LoadVector256((Single*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, Vector256 op3, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] inArray3 = new Single[Op3ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] inArray3 = new Single[Op3ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] secondOp, Single[] thirdOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(MathF.Round((firstOp[0] * secondOp[0]) + thirdOp[0], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[0], 3))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(MathF.Round((firstOp[i] * secondOp[i]) + thirdOp[i], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[i], 3))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Fma)}.{nameof(Fma.MultiplyAdd)}(Vector256, Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAddNegated.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAddNegated.Double.cs deleted file mode 100644 index 587269bc05d6..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAddNegated.Double.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplyAddNegatedDouble() - { - var test = new SimpleTernaryOpTest__MultiplyAddNegatedDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__MultiplyAddNegatedDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] inArray3, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - public Vector256 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__MultiplyAddNegatedDouble testClass) - { - var result = Fma.MultiplyAddNegated(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__MultiplyAddNegatedDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Fma.MultiplyAddNegated( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)), - Avx.LoadVector256((Double*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - private static Double[] _data3 = new Double[Op3ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - private static Vector256 _clsVar3; - - private Vector256 _fld1; - private Vector256 _fld2; - private Vector256 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__MultiplyAddNegatedDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__MultiplyAddNegatedDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, _data3, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Fma.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Fma.MultiplyAddNegated( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Fma.MultiplyAddNegated( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Fma.MultiplyAddNegated( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAddNegated), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAddNegated), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAddNegated), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Fma.MultiplyAddNegated( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - fixed (Vector256* pClsVar3 = &_clsVar3) - { - var result = Fma.MultiplyAddNegated( - Avx.LoadVector256((Double*)(pClsVar1)), - Avx.LoadVector256((Double*)(pClsVar2)), - Avx.LoadVector256((Double*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Fma.MultiplyAddNegated(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadVector256((Double*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplyAddNegated(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplyAddNegated(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__MultiplyAddNegatedDouble(); - var result = Fma.MultiplyAddNegated(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__MultiplyAddNegatedDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - fixed (Vector256* pFld3 = &test._fld3) - { - var result = Fma.MultiplyAddNegated( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)), - Avx.LoadVector256((Double*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Fma.MultiplyAddNegated(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Fma.MultiplyAddNegated( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)), - Avx.LoadVector256((Double*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Fma.MultiplyAddNegated(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Fma.MultiplyAddNegated( - Avx.LoadVector256((Double*)(&test._fld1)), - Avx.LoadVector256((Double*)(&test._fld2)), - Avx.LoadVector256((Double*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, Vector256 op3, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] inArray3 = new Double[Op3ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] inArray3 = new Double[Op3ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] secondOp, Double[] thirdOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(Math.Round(-(firstOp[0] * secondOp[0]) + thirdOp[0], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[0], 9))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(Math.Round(-(firstOp[i] * secondOp[i]) + thirdOp[i], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[i], 9))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Fma)}.{nameof(Fma.MultiplyAddNegated)}(Vector256, Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAddNegated.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAddNegated.Single.cs deleted file mode 100644 index f331feac343a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAddNegated.Single.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplyAddNegatedSingle() - { - var test = new SimpleTernaryOpTest__MultiplyAddNegatedSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__MultiplyAddNegatedSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] inArray3, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - public Vector256 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__MultiplyAddNegatedSingle testClass) - { - var result = Fma.MultiplyAddNegated(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__MultiplyAddNegatedSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Fma.MultiplyAddNegated( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)), - Avx.LoadVector256((Single*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - private static Single[] _data3 = new Single[Op3ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - private static Vector256 _clsVar3; - - private Vector256 _fld1; - private Vector256 _fld2; - private Vector256 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__MultiplyAddNegatedSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__MultiplyAddNegatedSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, _data3, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Fma.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Fma.MultiplyAddNegated( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Fma.MultiplyAddNegated( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Fma.MultiplyAddNegated( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAddNegated), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAddNegated), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAddNegated), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Fma.MultiplyAddNegated( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - fixed (Vector256* pClsVar3 = &_clsVar3) - { - var result = Fma.MultiplyAddNegated( - Avx.LoadVector256((Single*)(pClsVar1)), - Avx.LoadVector256((Single*)(pClsVar2)), - Avx.LoadVector256((Single*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Fma.MultiplyAddNegated(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadVector256((Single*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplyAddNegated(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplyAddNegated(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__MultiplyAddNegatedSingle(); - var result = Fma.MultiplyAddNegated(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__MultiplyAddNegatedSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - fixed (Vector256* pFld3 = &test._fld3) - { - var result = Fma.MultiplyAddNegated( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)), - Avx.LoadVector256((Single*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Fma.MultiplyAddNegated(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Fma.MultiplyAddNegated( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)), - Avx.LoadVector256((Single*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Fma.MultiplyAddNegated(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Fma.MultiplyAddNegated( - Avx.LoadVector256((Single*)(&test._fld1)), - Avx.LoadVector256((Single*)(&test._fld2)), - Avx.LoadVector256((Single*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, Vector256 op3, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] inArray3 = new Single[Op3ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] inArray3 = new Single[Op3ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] secondOp, Single[] thirdOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(MathF.Round(-(firstOp[0] * secondOp[0]) + thirdOp[0], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[0], 3))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(MathF.Round(-(firstOp[i] * secondOp[i]) + thirdOp[i], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[i], 3))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Fma)}.{nameof(Fma.MultiplyAddNegated)}(Vector256, Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAddSubtract.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAddSubtract.Double.cs deleted file mode 100644 index c27c28d99052..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAddSubtract.Double.cs +++ /dev/null @@ -1,628 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplyAddSubtractDouble() - { - var test = new AlternatingTernaryOpTest__MultiplyAddSubtractDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class AlternatingTernaryOpTest__MultiplyAddSubtractDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] inArray3, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - public Vector256 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(AlternatingTernaryOpTest__MultiplyAddSubtractDouble testClass) - { - var result = Fma.MultiplyAddSubtract(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(AlternatingTernaryOpTest__MultiplyAddSubtractDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Fma.MultiplyAddSubtract( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)), - Avx.LoadVector256((Double*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - private static Double[] _data3 = new Double[Op3ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - private static Vector256 _clsVar3; - - private Vector256 _fld1; - private Vector256 _fld2; - private Vector256 _fld3; - - private DataTable _dataTable; - - static AlternatingTernaryOpTest__MultiplyAddSubtractDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public AlternatingTernaryOpTest__MultiplyAddSubtractDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, _data3, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Fma.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Fma.MultiplyAddSubtract( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Fma.MultiplyAddSubtract( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Fma.MultiplyAddSubtract( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAddSubtract), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAddSubtract), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAddSubtract), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Fma.MultiplyAddSubtract( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - fixed (Vector256* pClsVar3 = &_clsVar3) - { - var result = Fma.MultiplyAddSubtract( - Avx.LoadVector256((Double*)(pClsVar1)), - Avx.LoadVector256((Double*)(pClsVar2)), - Avx.LoadVector256((Double*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Fma.MultiplyAddSubtract(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadVector256((Double*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplyAddSubtract(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplyAddSubtract(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new AlternatingTernaryOpTest__MultiplyAddSubtractDouble(); - var result = Fma.MultiplyAddSubtract(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new AlternatingTernaryOpTest__MultiplyAddSubtractDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - fixed (Vector256* pFld3 = &test._fld3) - { - var result = Fma.MultiplyAddSubtract( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)), - Avx.LoadVector256((Double*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Fma.MultiplyAddSubtract(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Fma.MultiplyAddSubtract( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)), - Avx.LoadVector256((Double*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Fma.MultiplyAddSubtract(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Fma.MultiplyAddSubtract( - Avx.LoadVector256((Double*)(&test._fld1)), - Avx.LoadVector256((Double*)(&test._fld2)), - Avx.LoadVector256((Double*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, Vector256 op3, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] inArray3 = new Double[Op3ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] inArray3 = new Double[Op3ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] secondOp, Double[] thirdOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i += 2) - { - if (BitConverter.DoubleToInt64Bits(Math.Round((firstOp[i] * secondOp[i]) - thirdOp[i], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[i], 9))) - { - succeeded = false; - break; - } - - if (BitConverter.DoubleToInt64Bits(Math.Round((firstOp[i + 1] * secondOp[i + 1]) + thirdOp[i + 1], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[i + 1], 9))) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Fma)}.{nameof(Fma.MultiplyAddSubtract)}(Vector256, Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAddSubtract.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAddSubtract.Single.cs deleted file mode 100644 index 486232aad1fc..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAddSubtract.Single.cs +++ /dev/null @@ -1,628 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplyAddSubtractSingle() - { - var test = new AlternatingTernaryOpTest__MultiplyAddSubtractSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class AlternatingTernaryOpTest__MultiplyAddSubtractSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] inArray3, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - public Vector256 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(AlternatingTernaryOpTest__MultiplyAddSubtractSingle testClass) - { - var result = Fma.MultiplyAddSubtract(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(AlternatingTernaryOpTest__MultiplyAddSubtractSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Fma.MultiplyAddSubtract( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)), - Avx.LoadVector256((Single*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - private static Single[] _data3 = new Single[Op3ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - private static Vector256 _clsVar3; - - private Vector256 _fld1; - private Vector256 _fld2; - private Vector256 _fld3; - - private DataTable _dataTable; - - static AlternatingTernaryOpTest__MultiplyAddSubtractSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public AlternatingTernaryOpTest__MultiplyAddSubtractSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, _data3, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Fma.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Fma.MultiplyAddSubtract( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Fma.MultiplyAddSubtract( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Fma.MultiplyAddSubtract( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAddSubtract), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAddSubtract), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAddSubtract), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Fma.MultiplyAddSubtract( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - fixed (Vector256* pClsVar3 = &_clsVar3) - { - var result = Fma.MultiplyAddSubtract( - Avx.LoadVector256((Single*)(pClsVar1)), - Avx.LoadVector256((Single*)(pClsVar2)), - Avx.LoadVector256((Single*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Fma.MultiplyAddSubtract(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadVector256((Single*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplyAddSubtract(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplyAddSubtract(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new AlternatingTernaryOpTest__MultiplyAddSubtractSingle(); - var result = Fma.MultiplyAddSubtract(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new AlternatingTernaryOpTest__MultiplyAddSubtractSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - fixed (Vector256* pFld3 = &test._fld3) - { - var result = Fma.MultiplyAddSubtract( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)), - Avx.LoadVector256((Single*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Fma.MultiplyAddSubtract(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Fma.MultiplyAddSubtract( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)), - Avx.LoadVector256((Single*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Fma.MultiplyAddSubtract(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Fma.MultiplyAddSubtract( - Avx.LoadVector256((Single*)(&test._fld1)), - Avx.LoadVector256((Single*)(&test._fld2)), - Avx.LoadVector256((Single*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, Vector256 op3, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] inArray3 = new Single[Op3ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] inArray3 = new Single[Op3ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] secondOp, Single[] thirdOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i += 2) - { - if (BitConverter.SingleToInt32Bits(MathF.Round((firstOp[i] * secondOp[i]) - thirdOp[i], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[i], 3))) - { - succeeded = false; - break; - } - - if (BitConverter.SingleToInt32Bits(MathF.Round((firstOp[i + 1] * secondOp[i + 1]) + thirdOp[i + 1], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[i + 1], 3))) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Fma)}.{nameof(Fma.MultiplyAddSubtract)}(Vector256, Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtract.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtract.Double.cs deleted file mode 100644 index 259cd8dd81c7..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtract.Double.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplySubtractDouble() - { - var test = new SimpleTernaryOpTest__MultiplySubtractDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__MultiplySubtractDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] inArray3, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - public Vector256 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__MultiplySubtractDouble testClass) - { - var result = Fma.MultiplySubtract(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__MultiplySubtractDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Fma.MultiplySubtract( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)), - Avx.LoadVector256((Double*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - private static Double[] _data3 = new Double[Op3ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - private static Vector256 _clsVar3; - - private Vector256 _fld1; - private Vector256 _fld2; - private Vector256 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__MultiplySubtractDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__MultiplySubtractDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, _data3, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Fma.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Fma.MultiplySubtract( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Fma.MultiplySubtract( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Fma.MultiplySubtract( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtract), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtract), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtract), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Fma.MultiplySubtract( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - fixed (Vector256* pClsVar3 = &_clsVar3) - { - var result = Fma.MultiplySubtract( - Avx.LoadVector256((Double*)(pClsVar1)), - Avx.LoadVector256((Double*)(pClsVar2)), - Avx.LoadVector256((Double*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Fma.MultiplySubtract(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadVector256((Double*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplySubtract(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplySubtract(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__MultiplySubtractDouble(); - var result = Fma.MultiplySubtract(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__MultiplySubtractDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - fixed (Vector256* pFld3 = &test._fld3) - { - var result = Fma.MultiplySubtract( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)), - Avx.LoadVector256((Double*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Fma.MultiplySubtract(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Fma.MultiplySubtract( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)), - Avx.LoadVector256((Double*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Fma.MultiplySubtract(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Fma.MultiplySubtract( - Avx.LoadVector256((Double*)(&test._fld1)), - Avx.LoadVector256((Double*)(&test._fld2)), - Avx.LoadVector256((Double*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, Vector256 op3, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] inArray3 = new Double[Op3ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] inArray3 = new Double[Op3ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] secondOp, Double[] thirdOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(Math.Round((firstOp[0] * secondOp[0]) - thirdOp[0], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[0], 9))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(Math.Round((firstOp[i] * secondOp[i]) - thirdOp[i], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[i], 9))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Fma)}.{nameof(Fma.MultiplySubtract)}(Vector256, Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtract.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtract.Single.cs deleted file mode 100644 index 77d9f71f1e81..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtract.Single.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplySubtractSingle() - { - var test = new SimpleTernaryOpTest__MultiplySubtractSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__MultiplySubtractSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] inArray3, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - public Vector256 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__MultiplySubtractSingle testClass) - { - var result = Fma.MultiplySubtract(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__MultiplySubtractSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Fma.MultiplySubtract( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)), - Avx.LoadVector256((Single*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - private static Single[] _data3 = new Single[Op3ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - private static Vector256 _clsVar3; - - private Vector256 _fld1; - private Vector256 _fld2; - private Vector256 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__MultiplySubtractSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__MultiplySubtractSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, _data3, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Fma.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Fma.MultiplySubtract( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Fma.MultiplySubtract( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Fma.MultiplySubtract( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtract), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtract), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtract), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Fma.MultiplySubtract( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - fixed (Vector256* pClsVar3 = &_clsVar3) - { - var result = Fma.MultiplySubtract( - Avx.LoadVector256((Single*)(pClsVar1)), - Avx.LoadVector256((Single*)(pClsVar2)), - Avx.LoadVector256((Single*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Fma.MultiplySubtract(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadVector256((Single*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplySubtract(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplySubtract(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__MultiplySubtractSingle(); - var result = Fma.MultiplySubtract(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__MultiplySubtractSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - fixed (Vector256* pFld3 = &test._fld3) - { - var result = Fma.MultiplySubtract( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)), - Avx.LoadVector256((Single*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Fma.MultiplySubtract(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Fma.MultiplySubtract( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)), - Avx.LoadVector256((Single*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Fma.MultiplySubtract(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Fma.MultiplySubtract( - Avx.LoadVector256((Single*)(&test._fld1)), - Avx.LoadVector256((Single*)(&test._fld2)), - Avx.LoadVector256((Single*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, Vector256 op3, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] inArray3 = new Single[Op3ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] inArray3 = new Single[Op3ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] secondOp, Single[] thirdOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(MathF.Round((firstOp[0] * secondOp[0]) - thirdOp[0], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[0], 3))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(MathF.Round((firstOp[i] * secondOp[i]) - thirdOp[i], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[i], 3))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Fma)}.{nameof(Fma.MultiplySubtract)}(Vector256, Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtractAdd.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtractAdd.Double.cs deleted file mode 100644 index 44f76e176173..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtractAdd.Double.cs +++ /dev/null @@ -1,628 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplySubtractAddDouble() - { - var test = new AlternatingTernaryOpTest__MultiplySubtractAddDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class AlternatingTernaryOpTest__MultiplySubtractAddDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] inArray3, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - public Vector256 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(AlternatingTernaryOpTest__MultiplySubtractAddDouble testClass) - { - var result = Fma.MultiplySubtractAdd(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(AlternatingTernaryOpTest__MultiplySubtractAddDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Fma.MultiplySubtractAdd( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)), - Avx.LoadVector256((Double*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - private static Double[] _data3 = new Double[Op3ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - private static Vector256 _clsVar3; - - private Vector256 _fld1; - private Vector256 _fld2; - private Vector256 _fld3; - - private DataTable _dataTable; - - static AlternatingTernaryOpTest__MultiplySubtractAddDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public AlternatingTernaryOpTest__MultiplySubtractAddDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, _data3, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Fma.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Fma.MultiplySubtractAdd( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Fma.MultiplySubtractAdd( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Fma.MultiplySubtractAdd( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtractAdd), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtractAdd), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtractAdd), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Fma.MultiplySubtractAdd( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - fixed (Vector256* pClsVar3 = &_clsVar3) - { - var result = Fma.MultiplySubtractAdd( - Avx.LoadVector256((Double*)(pClsVar1)), - Avx.LoadVector256((Double*)(pClsVar2)), - Avx.LoadVector256((Double*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Fma.MultiplySubtractAdd(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadVector256((Double*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplySubtractAdd(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplySubtractAdd(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new AlternatingTernaryOpTest__MultiplySubtractAddDouble(); - var result = Fma.MultiplySubtractAdd(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new AlternatingTernaryOpTest__MultiplySubtractAddDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - fixed (Vector256* pFld3 = &test._fld3) - { - var result = Fma.MultiplySubtractAdd( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)), - Avx.LoadVector256((Double*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Fma.MultiplySubtractAdd(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Fma.MultiplySubtractAdd( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)), - Avx.LoadVector256((Double*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Fma.MultiplySubtractAdd(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Fma.MultiplySubtractAdd( - Avx.LoadVector256((Double*)(&test._fld1)), - Avx.LoadVector256((Double*)(&test._fld2)), - Avx.LoadVector256((Double*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, Vector256 op3, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] inArray3 = new Double[Op3ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] inArray3 = new Double[Op3ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] secondOp, Double[] thirdOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i += 2) - { - if (BitConverter.DoubleToInt64Bits(Math.Round((firstOp[i] * secondOp[i]) + thirdOp[i], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[i], 9))) - { - succeeded = false; - break; - } - - if (BitConverter.DoubleToInt64Bits(Math.Round((firstOp[i + 1] * secondOp[i + 1]) - thirdOp[i + 1], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[i + 1], 9))) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Fma)}.{nameof(Fma.MultiplySubtractAdd)}(Vector256, Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtractAdd.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtractAdd.Single.cs deleted file mode 100644 index a696aa8c7820..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtractAdd.Single.cs +++ /dev/null @@ -1,628 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplySubtractAddSingle() - { - var test = new AlternatingTernaryOpTest__MultiplySubtractAddSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class AlternatingTernaryOpTest__MultiplySubtractAddSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] inArray3, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - public Vector256 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(AlternatingTernaryOpTest__MultiplySubtractAddSingle testClass) - { - var result = Fma.MultiplySubtractAdd(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(AlternatingTernaryOpTest__MultiplySubtractAddSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Fma.MultiplySubtractAdd( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)), - Avx.LoadVector256((Single*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - private static Single[] _data3 = new Single[Op3ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - private static Vector256 _clsVar3; - - private Vector256 _fld1; - private Vector256 _fld2; - private Vector256 _fld3; - - private DataTable _dataTable; - - static AlternatingTernaryOpTest__MultiplySubtractAddSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public AlternatingTernaryOpTest__MultiplySubtractAddSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, _data3, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Fma.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Fma.MultiplySubtractAdd( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Fma.MultiplySubtractAdd( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Fma.MultiplySubtractAdd( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtractAdd), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtractAdd), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtractAdd), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Fma.MultiplySubtractAdd( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - fixed (Vector256* pClsVar3 = &_clsVar3) - { - var result = Fma.MultiplySubtractAdd( - Avx.LoadVector256((Single*)(pClsVar1)), - Avx.LoadVector256((Single*)(pClsVar2)), - Avx.LoadVector256((Single*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Fma.MultiplySubtractAdd(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadVector256((Single*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplySubtractAdd(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplySubtractAdd(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new AlternatingTernaryOpTest__MultiplySubtractAddSingle(); - var result = Fma.MultiplySubtractAdd(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new AlternatingTernaryOpTest__MultiplySubtractAddSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - fixed (Vector256* pFld3 = &test._fld3) - { - var result = Fma.MultiplySubtractAdd( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)), - Avx.LoadVector256((Single*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Fma.MultiplySubtractAdd(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Fma.MultiplySubtractAdd( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)), - Avx.LoadVector256((Single*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Fma.MultiplySubtractAdd(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Fma.MultiplySubtractAdd( - Avx.LoadVector256((Single*)(&test._fld1)), - Avx.LoadVector256((Single*)(&test._fld2)), - Avx.LoadVector256((Single*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, Vector256 op3, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] inArray3 = new Single[Op3ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] inArray3 = new Single[Op3ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] secondOp, Single[] thirdOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i += 2) - { - if (BitConverter.SingleToInt32Bits(MathF.Round((firstOp[i] * secondOp[i]) + thirdOp[i], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[i], 3))) - { - succeeded = false; - break; - } - - if (BitConverter.SingleToInt32Bits(MathF.Round((firstOp[i + 1] * secondOp[i + 1]) - thirdOp[i + 1], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[i + 1], 3))) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Fma)}.{nameof(Fma.MultiplySubtractAdd)}(Vector256, Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtractNegated.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtractNegated.Double.cs deleted file mode 100644 index 3adebd7bb801..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtractNegated.Double.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplySubtractNegatedDouble() - { - var test = new SimpleTernaryOpTest__MultiplySubtractNegatedDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__MultiplySubtractNegatedDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] inArray3, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - public Vector256 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__MultiplySubtractNegatedDouble testClass) - { - var result = Fma.MultiplySubtractNegated(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__MultiplySubtractNegatedDouble testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Fma.MultiplySubtractNegated( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)), - Avx.LoadVector256((Double*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - private static Double[] _data3 = new Double[Op3ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - private static Vector256 _clsVar3; - - private Vector256 _fld1; - private Vector256 _fld2; - private Vector256 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__MultiplySubtractNegatedDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__MultiplySubtractNegatedDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, _data3, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Fma.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Fma.MultiplySubtractNegated( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Fma.MultiplySubtractNegated( - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Fma.MultiplySubtractNegated( - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtractNegated), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtractNegated), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Double*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtractNegated), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Double*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Fma.MultiplySubtractNegated( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - fixed (Vector256* pClsVar3 = &_clsVar3) - { - var result = Fma.MultiplySubtractNegated( - Avx.LoadVector256((Double*)(pClsVar1)), - Avx.LoadVector256((Double*)(pClsVar2)), - Avx.LoadVector256((Double*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Fma.MultiplySubtractNegated(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Double*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadVector256((Double*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplySubtractNegated(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadAlignedVector256((Double*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplySubtractNegated(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__MultiplySubtractNegatedDouble(); - var result = Fma.MultiplySubtractNegated(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__MultiplySubtractNegatedDouble(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - fixed (Vector256* pFld3 = &test._fld3) - { - var result = Fma.MultiplySubtractNegated( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)), - Avx.LoadVector256((Double*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Fma.MultiplySubtractNegated(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Fma.MultiplySubtractNegated( - Avx.LoadVector256((Double*)(pFld1)), - Avx.LoadVector256((Double*)(pFld2)), - Avx.LoadVector256((Double*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Fma.MultiplySubtractNegated(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Fma.MultiplySubtractNegated( - Avx.LoadVector256((Double*)(&test._fld1)), - Avx.LoadVector256((Double*)(&test._fld2)), - Avx.LoadVector256((Double*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, Vector256 op3, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] inArray3 = new Double[Op3ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] inArray3 = new Double[Op3ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] secondOp, Double[] thirdOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(Math.Round(-(firstOp[0] * secondOp[0]) - thirdOp[0], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[0], 9))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(Math.Round(-(firstOp[i] * secondOp[i]) - thirdOp[i], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[i], 9))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Fma)}.{nameof(Fma.MultiplySubtractNegated)}(Vector256, Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtractNegated.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtractNegated.Single.cs deleted file mode 100644 index e8fcca3c9d91..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtractNegated.Single.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplySubtractNegatedSingle() - { - var test = new SimpleTernaryOpTest__MultiplySubtractNegatedSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Avx.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Avx.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Avx.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__MultiplySubtractNegatedSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] inArray3, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector256 _fld1; - public Vector256 _fld2; - public Vector256 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__MultiplySubtractNegatedSingle testClass) - { - var result = Fma.MultiplySubtractNegated(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__MultiplySubtractNegatedSingle testClass) - { - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Fma.MultiplySubtractNegated( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)), - Avx.LoadVector256((Single*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 32; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - private static Single[] _data3 = new Single[Op3ElementCount]; - - private static Vector256 _clsVar1; - private static Vector256 _clsVar2; - private static Vector256 _clsVar3; - - private Vector256 _fld1; - private Vector256 _fld2; - private Vector256 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__MultiplySubtractNegatedSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__MultiplySubtractNegatedSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, _data3, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Fma.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Fma.MultiplySubtractNegated( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Fma.MultiplySubtractNegated( - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Fma.MultiplySubtractNegated( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtractNegated), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtractNegated), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)), - Avx.LoadVector256((Single*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Fma).GetMethod(nameof(Fma.MultiplySubtractNegated), new Type[] { typeof(Vector256), typeof(Vector256), typeof(Vector256) }) - .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)), - Avx.LoadAlignedVector256((Single*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Fma.MultiplySubtractNegated( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector256* pClsVar1 = &_clsVar1) - fixed (Vector256* pClsVar2 = &_clsVar2) - fixed (Vector256* pClsVar3 = &_clsVar3) - { - var result = Fma.MultiplySubtractNegated( - Avx.LoadVector256((Single*)(pClsVar1)), - Avx.LoadVector256((Single*)(pClsVar2)), - Avx.LoadVector256((Single*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Fma.MultiplySubtractNegated(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Avx.LoadVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadVector256((Single*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadVector256((Single*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplySubtractNegated(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray1Ptr)); - var op2 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray2Ptr)); - var op3 = Avx.LoadAlignedVector256((Single*)(_dataTable.inArray3Ptr)); - var result = Fma.MultiplySubtractNegated(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__MultiplySubtractNegatedSingle(); - var result = Fma.MultiplySubtractNegated(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__MultiplySubtractNegatedSingle(); - - fixed (Vector256* pFld1 = &test._fld1) - fixed (Vector256* pFld2 = &test._fld2) - fixed (Vector256* pFld3 = &test._fld3) - { - var result = Fma.MultiplySubtractNegated( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)), - Avx.LoadVector256((Single*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Fma.MultiplySubtractNegated(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector256* pFld1 = &_fld1) - fixed (Vector256* pFld2 = &_fld2) - fixed (Vector256* pFld3 = &_fld3) - { - var result = Fma.MultiplySubtractNegated( - Avx.LoadVector256((Single*)(pFld1)), - Avx.LoadVector256((Single*)(pFld2)), - Avx.LoadVector256((Single*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Fma.MultiplySubtractNegated(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Fma.MultiplySubtractNegated( - Avx.LoadVector256((Single*)(&test._fld1)), - Avx.LoadVector256((Single*)(&test._fld2)), - Avx.LoadVector256((Single*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector256 op1, Vector256 op2, Vector256 op3, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] inArray3 = new Single[Op3ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] inArray3 = new Single[Op3ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] secondOp, Single[] thirdOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(MathF.Round(-(firstOp[0] * secondOp[0]) - thirdOp[0], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[0], 3))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(MathF.Round(-(firstOp[i] * secondOp[i]) - thirdOp[i], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[i], 3))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Fma)}.{nameof(Fma.MultiplySubtractNegated)}(Vector256, Vector256, Vector256): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/General/VectorArgs.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/General/VectorArgs.cs deleted file mode 100644 index a720cb8b7678..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/General/VectorArgs.cs +++ /dev/null @@ -1,114 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -// This test case is ported from S.N.Vector counterpart -// https://github.com/dotnet/coreclr/blob/master/tests/src/JIT/SIMD/VectorArgs.cs - -using System; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -internal partial class IntelHardwareIntrinsicTest -{ - private const int Pass = 100; - private const int Fail = -1; - - internal class VectorArg128 - { - private Vector128 _rgb; - - public VectorArg128(float r, float g, float b) - { - float[] temp = new float[4]; - temp[0] = r; temp[1] = g; temp[2] = b; - unsafe - { - fixed (float* ptr = temp) - { - _rgb = Sse.LoadVector128(ptr); - } - } - } - - public VectorArg128(Vector128 _rgb) - { this._rgb = _rgb; } - - public VectorArg128 Change(float f) - { - Vector128 t = Vector128.Create(f); - return new VectorArg128(Sse.Add(t, _rgb)); - } - - public Vector128 RGB { get { return _rgb; } } - } - - internal class VectorArg256 - { - private Vector256 _rgb; - - public VectorArg256(float r, float g, float b) - { - float[] temp = new float[8]; - temp[0] = r; temp[1] = g; temp[2] = b; - unsafe - { - fixed (float* ptr = temp) - { - _rgb = Avx.LoadVector256(ptr); - } - } - } - - public VectorArg256(Vector256 _rgb) - { this._rgb = _rgb; } - - public VectorArg256 Change(float f) - { - Vector256 t = Vector256.Create(f); - return new VectorArg256(Avx.Add(t, _rgb)); - } - - public Vector256 RGB { get { return _rgb; } } - } - - unsafe static int Main() - { - int returnVal = Pass; - - if (Sse41.IsSupported) - { - Vector128 rgb = Vector128.Create(3f, 2f, 1f, 0f); - float x = 2f; - VectorArg128 c1 = new VectorArg128(rgb); - VectorArg128 c2 = c1.Change(x); - for (int i = 0; i < 4; i++) - { - if (((int)Sse41.Extract(c2.RGB, (byte)i)) != (3 - i) + x) - { - returnVal = Fail; - } - } - } - - if (Avx.IsSupported) - { - Vector256 rgb = Vector256.Create(7f, 6f, 5f, 4f, 3f, 2f, 1f, 0f); - float x = 2f; - VectorArg256 c1 = new VectorArg256(rgb); - VectorArg256 c2 = c1.Change(x); - float* buffer = stackalloc float[8]; - Avx.Store(buffer, c2.RGB); - for (int i = 0; i < 8; i++) - { - if (((int)buffer[i]) != (7 - i) + x) - { - returnVal = Fail; - } - } - } - - return returnVal; - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/General/VectorArray.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/General/VectorArray.cs deleted file mode 100644 index c88a5fe1b2b5..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/General/VectorArray.cs +++ /dev/null @@ -1,148 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -// This test case is ported from S.N.Vector counterpart -// https://github.com/dotnet/coreclr/blob/master/tests/src/JIT/SIMD/VectorArray.cs - -using System; -using System.Numerics; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; -using System.Runtime.CompilerServices; - -internal partial class IntelHardwareIntrinsicTest -{ - private const int Pass = 100; - private const int Fail = -1; - - private class Vector128ArrayTest where T : struct, IComparable, IEquatable - { - private static void Move(Vector128[] pos, ref Vector128 delta) - { - for (int i = 0; i < pos.Length; ++i) - { - pos[i] = Vector128Add(pos[i], delta); - } - } - - static public unsafe int Vector128Array() - { - Vector128[] v = new Vector128[3]; - int elementSize = Unsafe.SizeOf(); - const int vectorSize = 16; - int elementCount = vectorSize / elementSize; - - for (int i = 0; i < v.Length; ++i) - v[i] = CreateVector128(GetValueFromInt(i + 1)); - - Vector128 delta = CreateVector128(GetValueFromInt(1)); - Move(v, ref delta); - - byte* buffer = stackalloc byte[vectorSize * v.Length]; - for (int i = 0; i < v.Length; ++i) - Unsafe.Write>(buffer + i * vectorSize, v[i]); - - for (int i = 0; i < v.Length; i++) - { - T checkValue = GetValueFromInt(i + 2); - for (int j = 0; j < elementCount; j++) - { - if (!CheckValue(Unsafe.Read(&buffer[i * vectorSize + j * elementSize]), checkValue)) return Fail; - } - } - - return Pass; - } - } - - private class Vector256ArrayTest where T : struct, IComparable, IEquatable - { - private static void Move(Vector256[] pos, ref Vector256 delta) - { - for (int i = 0; i < pos.Length; ++i) - { - pos[i] = Vector256Add(pos[i], delta); - } - } - - static public unsafe int Vector256Array() - { - Vector256[] v = new Vector256[3]; - int elementSize = Unsafe.SizeOf(); - const int vectorSize = 32; - int elementCount = vectorSize / elementSize; - - for (int i = 0; i < v.Length; ++i) - v[i] = CreateVector256((T)Convert.ChangeType(i + 1, typeof(T))); - - Vector256 delta = CreateVector256((T)Convert.ChangeType(1, typeof(T))); - Move(v, ref delta); - - byte* buffer = stackalloc byte[vectorSize * v.Length]; - for (int i = 0; i < v.Length; ++i) - Unsafe.Write>(buffer + i * vectorSize, v[i]); - - for (int i = 0; i < v.Length; i++) - { - T checkValue = GetValueFromInt(i + 2); - for (int j = 0; j < elementCount; j++) - { - if (!CheckValue(Unsafe.Read(&buffer[i * vectorSize + j * elementSize]), checkValue)) return Fail; - } - } - - return Pass; - } - } - - unsafe static int Main() - { - int returnVal = Pass; - try - { - if (Sse2.IsSupported) - { - if (Vector128ArrayTest.Vector128Array() != Pass) returnVal = Fail; - if (Vector128ArrayTest.Vector128Array() != Pass) returnVal = Fail; - if (Vector128ArrayTest.Vector128Array() != Pass) returnVal = Fail; - if (Vector128ArrayTest.Vector128Array() != Pass) returnVal = Fail; - if (Vector128ArrayTest.Vector128Array() != Pass) returnVal = Fail; - if (Vector128ArrayTest.Vector128Array() != Pass) returnVal = Fail; - if (Vector128ArrayTest.Vector128Array() != Pass) returnVal = Fail; - if (Vector128ArrayTest.Vector128Array() != Pass) returnVal = Fail; - if (Environment.Is64BitProcess) - { - if (Vector128ArrayTest.Vector128Array() != Pass) returnVal = Fail; - if (Vector128ArrayTest.Vector128Array() != Pass) returnVal = Fail; - } - } - - if (Avx2.IsSupported) - { - if (Vector256ArrayTest.Vector256Array() != Pass) returnVal = Fail; - if (Vector256ArrayTest.Vector256Array() != Pass) returnVal = Fail; - if (Vector256ArrayTest.Vector256Array() != Pass) returnVal = Fail; - if (Vector256ArrayTest.Vector256Array() != Pass) returnVal = Fail; - if (Vector256ArrayTest.Vector256Array() != Pass) returnVal = Fail; - if (Vector256ArrayTest.Vector256Array() != Pass) returnVal = Fail; - if (Vector256ArrayTest.Vector256Array() != Pass) returnVal = Fail; - if (Vector256ArrayTest.Vector256Array() != Pass) returnVal = Fail; - if (Environment.Is64BitProcess) - { - if (Vector256ArrayTest.Vector256Array() != Pass) returnVal = Fail; - if (Vector256ArrayTest.Vector256Array() != Pass) returnVal = Fail; - } - } - } - catch (NotSupportedException ex) - { - Console.WriteLine("NotSupportedException was raised"); - Console.WriteLine(ex.StackTrace); - return Fail; - } - - return returnVal; - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/General/VectorHelpers.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/General/VectorHelpers.cs deleted file mode 100644 index 62e6f8565b37..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/General/VectorHelpers.cs +++ /dev/null @@ -1,287 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Numerics; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; -using System.Runtime.CompilerServices; - -internal partial class IntelHardwareIntrinsicTest -{ - public static Vector128 Vector128Add(Vector128 left, Vector128 right) where T : struct - { - if (typeof(T) == typeof(byte)) - { - return Sse2.Add(left.AsByte(), right.AsByte()).As(); - } - else if (typeof(T) == typeof(sbyte)) - { - return Sse2.Add(left.AsSByte(), right.AsSByte()).As(); - } - else if (typeof(T) == typeof(short)) - { - return Sse2.Add(left.AsInt16(), right.AsInt16()).As(); - } - else if (typeof(T) == typeof(ushort)) - { - return Sse2.Add(left.AsUInt16(), right.AsUInt16()).As(); - } - else if (typeof(T) == typeof(int)) - { - return Sse2.Add(left.AsInt32(), right.AsInt32()).As(); - } - else if (typeof(T) == typeof(uint)) - { - return Sse2.Add(left.AsUInt32(), right.AsUInt32()).As(); - } - else if (typeof(T) == typeof(long)) - { - return Sse2.Add(left.AsInt64(), right.AsInt64()).As(); - } - else if (typeof(T) == typeof(ulong)) - { - return Sse2.Add(left.AsUInt64(), right.AsUInt64()).As(); - } - else if (typeof(T) == typeof(float)) - { - return Sse.Add(left.AsSingle(), right.AsSingle()).As(); - } - else if (typeof(T) == typeof(double)) - { - return Sse2.Add(left.AsDouble(), right.AsDouble()).As(); - } - else - { - throw new NotSupportedException(); - } - } - - public static Vector256 Vector256Add(Vector256 left, Vector256 right) where T : struct - { - if (typeof(T) == typeof(byte)) - { - return Avx2.Add(left.AsByte(), right.AsByte()).As(); - } - else if (typeof(T) == typeof(sbyte)) - { - return Avx2.Add(left.AsSByte(), right.AsSByte()).As(); - } - else if (typeof(T) == typeof(short)) - { - return Avx2.Add(left.AsInt16(), right.AsInt16()).As(); - } - else if (typeof(T) == typeof(ushort)) - { - return Avx2.Add(left.AsUInt16(), right.AsUInt16()).As(); - } - else if (typeof(T) == typeof(int)) - { - return Avx2.Add(left.AsInt32(), right.AsInt32()).As(); - } - else if (typeof(T) == typeof(uint)) - { - return Avx2.Add(left.AsUInt32(), right.AsUInt32()).As(); - } - else if (typeof(T) == typeof(long)) - { - return Avx2.Add(left.AsInt64(), right.AsInt64()).As(); - } - else if (typeof(T) == typeof(ulong)) - { - return Avx2.Add(left.AsUInt64(), right.AsUInt64()).As(); - } - else if (typeof(T) == typeof(float)) - { - return Avx.Add(left.AsSingle(), right.AsSingle()).As(); - } - else if (typeof(T) == typeof(double)) - { - return Avx.Add(left.AsDouble(), right.AsDouble()).As(); - } - else - { - throw new NotSupportedException(); - } - } - - public static Vector128 CreateVector128(T value) where T : struct - { - if (typeof(T) == typeof(byte)) - { - return Vector128.Create(Convert.ToByte(value)).As(); - } - else if (typeof(T) == typeof(sbyte)) - { - return Vector128.Create(Convert.ToSByte(value)).As(); - } - else if (typeof(T) == typeof(short)) - { - return Vector128.Create(Convert.ToInt16(value)).As(); - } - else if (typeof(T) == typeof(ushort)) - { - return Vector128.Create(Convert.ToUInt16(value)).As(); - } - else if (typeof(T) == typeof(int)) - { - return Vector128.Create(Convert.ToInt32(value)).As(); - } - else if (typeof(T) == typeof(uint)) - { - return Vector128.Create(Convert.ToUInt32(value)).As(); - } - else if (typeof(T) == typeof(long)) - { - return Vector128.Create(Convert.ToInt64(value)).As(); - } - else if (typeof(T) == typeof(ulong)) - { - return Vector128.Create(Convert.ToUInt64(value)).As(); - } - else if (typeof(T) == typeof(float)) - { - return Vector128.Create(Convert.ToSingle(value)).As(); - } - else if (typeof(T) == typeof(double)) - { - return Vector128.Create(Convert.ToDouble(value)).As(); - } - else - { - throw new NotSupportedException(); - } - } - - public static Vector256 CreateVector256(T value) where T : struct - { - if (typeof(T) == typeof(byte)) - { - return Vector256.Create(Convert.ToByte(value)).As(); - } - else if (typeof(T) == typeof(sbyte)) - { - return Vector256.Create(Convert.ToSByte(value)).As(); - } - else if (typeof(T) == typeof(short)) - { - return Vector256.Create(Convert.ToInt16(value)).As(); - } - else if (typeof(T) == typeof(ushort)) - { - return Vector256.Create(Convert.ToUInt16(value)).As(); - } - else if (typeof(T) == typeof(int)) - { - return Vector256.Create(Convert.ToInt32(value)).As(); - } - else if (typeof(T) == typeof(uint)) - { - return Vector256.Create(Convert.ToUInt32(value)).As(); - } - else if (typeof(T) == typeof(long)) - { - return Vector256.Create(Convert.ToInt64(value)).As(); - } - else if (typeof(T) == typeof(ulong)) - { - return Vector256.Create(Convert.ToUInt64(value)).As(); - } - else if (typeof(T) == typeof(float)) - { - return Vector256.Create(Convert.ToSingle(value)).As(); - } - else if (typeof(T) == typeof(double)) - { - return Vector256.Create(Convert.ToDouble(value)).As(); - } - else - { - throw new NotSupportedException(); - } - } - - public static bool CheckValue(T value, T expectedValue) where T : struct - { - bool returnVal; - if (typeof(T) == typeof(float)) - { - returnVal = Math.Abs(((float)(object)value) - ((float)(object)expectedValue)) <= Single.Epsilon; - } - if (typeof(T) == typeof(double)) - { - returnVal = Math.Abs(((double)(object)value) - ((double)(object)expectedValue)) <= Double.Epsilon; - } - else - { - returnVal = value.Equals(expectedValue); - } - if (returnVal == false) - { - if ((typeof(T) == typeof(double)) || (typeof(T) == typeof(float))) - { - Console.WriteLine("CheckValue failed for type " + typeof(T).ToString() + ". Expected: {0} , Got: {1}", expectedValue, value); - } - else - { - Console.WriteLine("CheckValue failed for type " + typeof(T).ToString() + ". Expected: {0} (0x{0:X}), Got: {1} (0x{1:X})", expectedValue, value); - } - } - return returnVal; - } - - public static T GetValueFromInt(int value) where T : struct - { - if (typeof(T) == typeof(float)) - { - float floatValue = (float)value; - return (T)(object)floatValue; - } - if (typeof(T) == typeof(double)) - { - double doubleValue = (double)value; - return (T)(object)doubleValue; - } - if (typeof(T) == typeof(int)) - { - return (T)(object)value; - } - if (typeof(T) == typeof(uint)) - { - uint uintValue = (uint)value; - return (T)(object)uintValue; - } - if (typeof(T) == typeof(long)) - { - long longValue = (long)value; - return (T)(object)longValue; - } - if (typeof(T) == typeof(ulong)) - { - ulong longValue = (ulong)value; - return (T)(object)longValue; - } - if (typeof(T) == typeof(ushort)) - { - return (T)(object)(ushort)value; - } - if (typeof(T) == typeof(byte)) - { - return (T)(object)(byte)value; - } - if (typeof(T) == typeof(short)) - { - return (T)(object)(short)value; - } - if (typeof(T) == typeof(sbyte)) - { - return (T)(object)(sbyte)value; - } - else - { - throw new ArgumentException(); - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/General/VectorUnused.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/General/VectorUnused.cs deleted file mode 100644 index 223c54230dfb..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/General/VectorUnused.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -// This test case is ported from S.N.Vector counterpart -// https://github.com/dotnet/coreclr/blob/master/tests/src/JIT/SIMD/VectorUnused.cs - -using System; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -internal partial class IntelHardwareIntrinsicTest -{ - private const int Pass = 100; - private const int Fail = -1; - - private class Vector128UnusedTest where T : struct, IComparable, IEquatable - { - public static int VectorUnused(T t1, T t2) - { - if (Sse2.IsSupported) - { - Vector128 v1 = CreateVector128(t1); - v1 = Vector128Add(v1, Vector128.Zero); - } - - return Pass; - } - } - - private class Vector256UnusedTest where T : struct, IComparable, IEquatable - { - public static int VectorUnused(T t1, T t2) - { - if (Avx2.IsSupported) - { - Vector256 v1 = CreateVector256(t1); - v1 = Vector256Add(v1, CreateVector256(t2)); - } - return Pass; - } - } - - private static int Main() - { - int returnVal = Pass; - - if (Vector128UnusedTest.VectorUnused(3f, 2f) != Pass) returnVal = Fail; - if (Vector128UnusedTest.VectorUnused(3, 2) != Pass) returnVal = Fail; - if (Vector128UnusedTest.VectorUnused(3, 2) != Pass) returnVal = Fail; - if (Vector128UnusedTest.VectorUnused(3, 2) != Pass) returnVal = Fail; - if (Vector128UnusedTest.VectorUnused(3, 2) != Pass) returnVal = Fail; - if (Vector128UnusedTest.VectorUnused(3, 2) != Pass) returnVal = Fail; - if (Vector128UnusedTest.VectorUnused(3, 2) != Pass) returnVal = Fail; - if (Vector128UnusedTest.VectorUnused(3, 2) != Pass) returnVal = Fail; - if (Environment.Is64BitProcess) - { - if (Vector128UnusedTest.VectorUnused(3, 2) != Pass) returnVal = Fail; - if (Vector128UnusedTest.VectorUnused(3, 2) != Pass) returnVal = Fail; - } - - if (Vector256UnusedTest.VectorUnused(3f, 2f) != Pass) returnVal = Fail; - if (Vector256UnusedTest.VectorUnused(3, 2) != Pass) returnVal = Fail; - if (Vector256UnusedTest.VectorUnused(3, 2) != Pass) returnVal = Fail; - if (Vector256UnusedTest.VectorUnused(3, 2) != Pass) returnVal = Fail; - if (Vector256UnusedTest.VectorUnused(3, 2) != Pass) returnVal = Fail; - if (Vector256UnusedTest.VectorUnused(3, 2) != Pass) returnVal = Fail; - if (Vector256UnusedTest.VectorUnused(3, 2) != Pass) returnVal = Fail; - if (Vector256UnusedTest.VectorUnused(3, 2) != Pass) returnVal = Fail; - if (Environment.Is64BitProcess) - { - if (Vector256UnusedTest.VectorUnused(3, 2) != Pass) returnVal = Fail; - if (Vector256UnusedTest.VectorUnused(3, 2) != Pass) returnVal = Fail; - } - return returnVal; - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/AesBinOpTest.template b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/AesBinOpTest.template deleted file mode 100644 index c319e1440c5f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/AesBinOpTest.template +++ /dev/null @@ -1,504 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void {Method}{RetBaseType}() - { - var test = new AesBinaryOpTest__{Method}{RetBaseType}(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class AesBinaryOpTest__{Method}{RetBaseType} - { - private struct TestStruct - { - public {Op1VectorType}<{Op1BaseType}> _fld1; - public {Op2VectorType}<{Op2BaseType}> _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref testStruct._fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref testStruct._fld2), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); - - return testStruct; - } - - public void RunStructFldScenario(AesBinaryOpTest__{Method}{RetBaseType} testClass) - { - var result = {Isa}.{Method}(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(AesBinaryOpTest__{Method}{RetBaseType} testClass) - { - fixed ({Op1VectorType}<{Op1BaseType}>* pFld1 = &_fld1) - fixed ({Op2VectorType}<{Op2BaseType}>* pFld2 = &_fld2) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pFld1)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = {LargestVectorSize}; - - private static readonly int RetElementCount = Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>() / sizeof({RetBaseType}); - - - private static {Op1BaseType}[] _data1 = new {Op1BaseType}[{InputSize}] {Input}; - private static {Op2BaseType}[] _data2 = new {Op2BaseType}[{KeySize}] {Key}; - private static {RetBaseType}[] _expectedRet = new {RetBaseType}[{ExpectedRetSize}] {ExpectedRet}; - - private static {Op1VectorType}<{Op1BaseType}> _clsVar1; - private static {Op2VectorType}<{Op2BaseType}> _clsVar2; - - private {Op1VectorType}<{Op1BaseType}> _fld1; - private {Op2VectorType}<{Op2BaseType}> _fld2; - - private SimpleBinaryOpTest__DataTable<{RetBaseType}, {Op1BaseType}, {Op2BaseType}> _dataTable; - - static AesBinaryOpTest__{Method}{RetBaseType}() - { - - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _clsVar1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref _clsVar2), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); - } - - public AesBinaryOpTest__{Method}{RetBaseType}() - { - Succeeded = true; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref _fld2), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); - - _dataTable = new SimpleBinaryOpTest__DataTable<{RetBaseType}, {Op1BaseType}, {Op2BaseType}>(_data1, _data2, new {RetBaseType}[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => {Isa}.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = {Isa}.{Method}( - Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr), - Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = {Isa}.{Method}( - {LoadIsa}.LoadAligned{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)), - {LoadIsa}.LoadAligned{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>), typeof({Op2VectorType}<{Op2BaseType}>) }) - .Invoke(null, new object[] { - Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr), - Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, ({RetVectorType}<{RetBaseType}>)(result)); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>), typeof({Op2VectorType}<{Op2BaseType}>) }) - .Invoke(null, new object[] { - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, ({RetVectorType}<{RetBaseType}>)(result)); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>), typeof({Op2VectorType}<{Op2BaseType}>) }) - .Invoke(null, new object[] { - {LoadIsa}.LoadAligned{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)), - {LoadIsa}.LoadAligned{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, ({RetVectorType}<{RetBaseType}>)(result)); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = {Isa}.{Method}( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed ({Op1VectorType}<{Op1BaseType}>* pClsVar1 = &_clsVar1) - fixed ({Op2VectorType}<{Op2BaseType}>* pClsVar2 = &_clsVar2) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pClsVar1)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr); - var right = Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr); - var result = {Isa}.{Method}(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)); - var right = {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray2Ptr)); - var result = {Isa}.{Method}(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = {LoadIsa}.LoadAligned{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)); - var right = {LoadIsa}.LoadAligned{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray2Ptr)); - var result = {Isa}.{Method}(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new AesBinaryOpTest__{Method}{RetBaseType}(); - var result = {Isa}.{Method}(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new AesBinaryOpTest__{Method}{RetBaseType}(); - - fixed ({Op1VectorType}<{Op1BaseType}>* pFld1 = &test._fld1) - fixed ({Op2VectorType}<{Op2BaseType}>* pFld2 = &test._fld2) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pFld1)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = {Isa}.{Method}(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed ({Op1VectorType}<{Op1BaseType}>* pFld1 = &_fld1) - fixed ({Op2VectorType}<{Op2BaseType}>* pFld2 = &_fld2) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pFld1)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = {Isa}.{Method}(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(&test._fld1)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(void* result, [CallerMemberName] string method = "") - { - - {RetBaseType}[] outArray = new {RetBaseType}[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>()); - - ValidateResult(outArray, method); - } - - - private void ValidateResult({RetBaseType}[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < result.Length; i++) - { - if (result[i] != _expectedRet[i] ) - { - succeeded = false; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>, {Op2VectorType}<{Op2BaseType}>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" expectedRet: ({string.Join(", ", _expectedRet)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/AesUnOpTest.template b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/AesUnOpTest.template deleted file mode 100644 index f4483817b2f9..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/AesUnOpTest.template +++ /dev/null @@ -1,476 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void {Method}{RetBaseType}() - { - var test = new AesUnaryOpTest__{Method}{RetBaseType}(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class AesUnaryOpTest__{Method}{RetBaseType} - { - private struct TestStruct - { - public {Op1VectorType}<{Op1BaseType}> _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref testStruct._fld), ref Unsafe.As<{Op1BaseType}, byte>(ref _data[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - - return testStruct; - } - - public void RunStructFldScenario(AesUnaryOpTest__{Method}{RetBaseType} testClass) - { - var result = {Isa}.{Method}(_fld); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(AesUnaryOpTest__{Method}{RetBaseType} testClass) - { - fixed ({Op1VectorType}<{Op1BaseType}>* pFld = &_fld) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pFld)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = {LargestVectorSize}; - - private static readonly int RetElementCount = Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>() / sizeof({RetBaseType}); - - private static {Op1BaseType}[] _data = new {Op1BaseType}[{InputSize}] {Input}; - private static {RetBaseType}[] _expectedRet = new {RetBaseType}[{ExpectedRetSize}] {ExpectedRet}; - - private static {Op1VectorType}<{Op1BaseType}> _clsVar; - - private {Op1VectorType}<{Op1BaseType}> _fld; - - private SimpleUnaryOpTest__DataTable<{RetBaseType}, {Op1BaseType}> _dataTable; - - static AesUnaryOpTest__{Method}{RetBaseType}() - { - - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _clsVar), ref Unsafe.As<{Op1BaseType}, byte>(ref _data[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - } - - public AesUnaryOpTest__{Method}{RetBaseType}() - { - Succeeded = true; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _fld), ref Unsafe.As<{Op1BaseType}, byte>(ref _data[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - - - _dataTable = new SimpleUnaryOpTest__DataTable<{RetBaseType}, {Op1BaseType}>(_data, new {RetBaseType}[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => {Isa}.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = {Isa}.{Method}( - Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArrayPtr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult( _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArrayPtr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = {Isa}.{Method}( - {LoadIsa}.LoadAligned{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArrayPtr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>) }) - .Invoke(null, new object[] { - Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArrayPtr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, ({RetVectorType}<{RetBaseType}>)(result)); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>) }) - .Invoke(null, new object[] { - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArrayPtr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, ({RetVectorType}<{RetBaseType}>)(result)); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>) }) - .Invoke(null, new object[] { - {LoadIsa}.LoadAligned{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArrayPtr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, ({RetVectorType}<{RetBaseType}>)(result)); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = {Isa}.{Method}( - _clsVar - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed ({Op1VectorType}<{Op1BaseType}>* pClsVar = &_clsVar) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pClsVar)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArrayPtr); - var result = {Isa}.{Method}(firstOp); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArrayPtr)); - var result = {Isa}.{Method}(firstOp); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = {LoadIsa}.LoadAligned{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArrayPtr)); - var result = {Isa}.{Method}(firstOp); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new AesUnaryOpTest__{Method}{RetBaseType}(); - var result = {Isa}.{Method}(test._fld); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new AesUnaryOpTest__{Method}{RetBaseType}(); - - fixed ({Op1VectorType}<{Op1BaseType}>* pFld = &test._fld) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pFld)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = {Isa}.{Method}(_fld); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed ({Op1VectorType}<{Op1BaseType}>* pFld = &_fld) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pFld)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = {Isa}.{Method}(test._fld); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(&test._fld)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - - private void ValidateResult(void* result, [CallerMemberName] string method = "") - { - - {RetBaseType}[] outArray = new {RetBaseType}[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>()); - - ValidateResult(outArray, method); - } - - private void ValidateResult({RetBaseType}[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (int i = 0; i < result.Length; i++) - { - if (result[i] != _expectedRet[i] ) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" expectedRet: ({string.Join(", ", _expectedRet)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/GenerateTests.csx b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/GenerateTests.csx deleted file mode 100644 index 522cf5c7cd0e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/GenerateTests.csx +++ /dev/null @@ -1,1404 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; - -// DIRECTIONS: -// This file isn't very robust and makes several assumptions -// You can execute it by calling "csi .\GenerateTests.csx" -// -// csi can be found under the \tools\net46\roslyn directory -// It must be run such from the directory that contains the csx script -// -// New tests can be generated from the template by adding an entry to the -// appropriate Inputs array below. -// -// You can support a new Isa by creating a new array and adding a new -// "ProcessInputs" call at the bottom of the script. - -private const string AlternatingOpTest_ValidationLogic = @"for (var i = 0; i < RetElementCount; i += 2) - { - if ({ValidateFirstResult}) - { - succeeded = false; - break; - } - - if ({ValidateRemainingResults}) - { - succeeded = false; - break; - } - }"; - -private const string BooleanCmpTest_ValidationLogic = @"if ({ValidateFirstResult}) - { - succeeded = false; - }"; - -private const string BooleanTwoCmpTest_ValidationLogic = @"var expectedResult1 = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult1 &= ({ValidateFirstResult}); - } - - var expectedResult2 = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult2 &= ({ValidateRemainingResults}); - } - - succeeded = (((expectedResult1 == false) && (expectedResult2 == false)) == result);"; - -private const string BooleanOpTest_ValidationLogic = @"var expectedResult = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult &= ({ValidateFirstResult}); - } - - succeeded = (expectedResult == result);"; - -private const string HorizontalOpTest_ValidationLogic = @"for (var outer = 0; outer < (LargestVectorSize / 16); outer++) - { - for (var inner = 0; inner < (8 / sizeof({RetBaseType})); inner++) - { - var i1 = (outer * (16 / sizeof({RetBaseType}))) + inner; - var i2 = i1 + (8 / sizeof({RetBaseType})); - var i3 = (outer * (16 / sizeof({RetBaseType}))) + (inner * 2); - - if ({ValidateFirstResult}) - { - succeeded = false; - break; - } - - if ({ValidateRemainingResults}) - { - succeeded = false; - break; - } - } - }"; - -private const string SimpleOpTest_ValidationLogic = @"if ({ValidateFirstResult}) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ({ValidateRemainingResults}) - { - succeeded = false; - break; - } - } - }"; - -private static readonly (string templateFileName, string outputTemplateName, Dictionary templateData)[] Templates = new[] -{ - ("_BinaryOpTestTemplate.template", "AlternatingBinOpTest.template", new Dictionary { ["TemplateName"] = "Alternating", ["TemplateValidationLogic"] = AlternatingOpTest_ValidationLogic }), - ("_BinaryOpTestTemplate.template", "HorizontalBinOpTest.template", new Dictionary { ["TemplateName"] = "Horizontal", ["TemplateValidationLogic"] = HorizontalOpTest_ValidationLogic }), - ("_BinaryOpTestTemplate.template", "SimpleBinOpTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleOpTest_ValidationLogic }), - ("_BooleanBinaryOpTestTemplate.template", "BooleanBinOpTest.template", new Dictionary { ["TemplateName"] = "Boolean", ["TemplateValidationLogic"] = BooleanOpTest_ValidationLogic }), - ("_BooleanBinaryOpTestTemplate.template", "BooleanCmpOpTest.template", new Dictionary { ["TemplateName"] = "Boolean", ["TemplateValidationLogic"] = BooleanCmpTest_ValidationLogic }), - ("_BooleanBinaryOpTestTemplate.template", "BooleanTwoCmpOpTest.template", new Dictionary { ["TemplateName"] = "Boolean", ["TemplateValidationLogic"] = BooleanTwoCmpTest_ValidationLogic }), - ("_BooleanUnaryOpTestTemplate.template", "BooleanUnOpTest.template", new Dictionary { ["TemplateName"] = "Boolean", ["TemplateValidationLogic"] = BooleanOpTest_ValidationLogic }), - ("_TernaryOpTestTemplate.template", "AlternatingTernOpTest.template", new Dictionary { ["TemplateName"] = "Alternating", ["TemplateValidationLogic"] = AlternatingOpTest_ValidationLogic }), - ("_TernaryOpTestTemplate.template", "SimpleTernOpTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleOpTest_ValidationLogic }), - ("_UnaryOpTestTemplate.template", "SimpleUnOpTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleOpTest_ValidationLogic }), -}; - -private static readonly (string templateFileName, Dictionary templateData)[] SseInputs = new [] -{ - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "Add", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(left[0] + right[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i] + right[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "AddScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(left[0] + right[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "And", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(BitConverter.SingleToInt32Bits(left[0]) & BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.SingleToInt32Bits(left[0]) & BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "AndNot", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(~BitConverter.SingleToInt32Bits(left[0]) & BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "(~BitConverter.SingleToInt32Bits(left[0]) & BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((left[0] == right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != ((left[i] == right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareScalarEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((left[0] == right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("BooleanCmpOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareScalarOrderedEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Boolean", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(left[0] == right[0]) != result"}), - ("BooleanCmpOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareScalarUnorderedEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Boolean", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(left[0] == right[0]) != result"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareGreaterThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((left[0] > right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != ((left[i] > right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareScalarGreaterThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((left[0] > right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("BooleanCmpOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareScalarOrderedGreaterThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Boolean", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(left[0] > right[0]) != result"}), - ("BooleanCmpOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareScalarUnorderedGreaterThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Boolean", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(left[0] > right[0]) != result"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareGreaterThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((left[0] >= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != ((left[i] >= right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareScalarGreaterThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((left[0] >= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("BooleanCmpOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareScalarOrderedGreaterThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Boolean", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(left[0] >= right[0]) != result"}), - ("BooleanCmpOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareScalarUnorderedGreaterThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Boolean", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(left[0] >= right[0]) != result"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareLessThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((left[0] < right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != ((left[i] < right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareScalarLessThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((left[0] < right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("BooleanCmpOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareScalarOrderedLessThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Boolean", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(left[0] < right[0]) != result"}), - ("BooleanCmpOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareScalarUnorderedLessThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Boolean", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(left[0] < right[0]) != result"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareLessThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((left[0] <= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != ((left[i] <= right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareScalarLessThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((left[0] <= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("BooleanCmpOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareScalarOrderedLessThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Boolean", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(left[0] <= right[0]) != result"}), - ("BooleanCmpOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareScalarUnorderedLessThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Boolean", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(left[0] <= right[0]) != result"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareNotEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((left[0] != right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != ((left[i] != right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareScalarNotEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((left[0] != right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("BooleanCmpOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareScalarOrderedNotEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Boolean", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(left[0] != right[0]) != result"}), - ("BooleanCmpOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareScalarUnorderedNotEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Boolean", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(left[0] != right[0]) != result"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareNotGreaterThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != (!(left[0] > right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != (!(left[i] > right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareScalarNotGreaterThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != (!(left[0] > right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareNotGreaterThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != (!(left[0] >= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != (!(left[i] >= right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareScalarNotGreaterThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != (!(left[0] >= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareNotLessThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != (!(left[0] < right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != (!(left[i] < right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareScalarNotLessThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != (!(left[0] < right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareNotLessThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != (!(left[0] <= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != (!(left[i] <= right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareScalarNotLessThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != (!(left[0] <= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareOrdered", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((!float.IsNaN(left[0]) && !float.IsNaN(right[0])) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != ((!float.IsNaN(left[i]) && !float.IsNaN(right[i])) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareScalarOrdered", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((!float.IsNaN(left[0]) && !float.IsNaN(right[0])) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareUnordered", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((float.IsNaN(left[0]) || float.IsNaN(right[0])) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != ((float.IsNaN(left[i]) || float.IsNaN(right[i])) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "CompareScalarUnordered", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((float.IsNaN(left[0]) || float.IsNaN(right[0])) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpConvTest.template",new Dictionary{["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "ConvertScalarToVector128Single", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(float)right != result[0]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "Divide", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(left[0] / right[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i] / right[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "DivideScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(left[0] / right[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Sse", ["Method"] = "LoadVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(firstOp[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Sse", ["Method"] = "LoadScalarVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "0 != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "Max", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Math.Max(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(Math.Max(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "MaxScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Math.Max(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "Min", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Math.Min(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(Math.Min(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "MinScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(Math.Min(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "Multiply", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(left[0] * right[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i] * right[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "MultiplyScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(left[0] * right[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "Or", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(BitConverter.SingleToInt32Bits(left[0]) | BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.SingleToInt32Bits(left[0]) | BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "Subtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(left[0] - right[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i] - right[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "SubtractScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(left[0] - right[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse", ["LoadIsa"] = "Sse", ["Method"] = "Xor", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(BitConverter.SingleToInt32Bits(left[0]) ^ BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.SingleToInt32Bits(left[0]) ^ BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])"}), -}; - -private static readonly (string templateFileName, Dictionary templateData)[] SseX64Inputs = new [] -{ - ("SimdScalarUnOpConvTest.template", new Dictionary { ["Isa"] = "Sse.X64", ["LoadIsa"] = "Sse", ["Method"] = "ConvertToInt64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(long)Math.Round(firstOp[0]) != result"}), - ("SimdScalarUnOpConvTest.template", new Dictionary { ["Isa"] = "Sse.X64", ["LoadIsa"] = "Sse", ["Method"] = "ConvertToInt64WithTruncation", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(long) firstOp[0] != result"}), - ("SimpleBinOpConvTest.template", new Dictionary { ["Isa"] = "Sse.X64", ["LoadIsa"] = "Sse", ["Method"] = "ConvertScalarToVector128Single", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(float)right != result[0]"}), -}; - -private static readonly (string templateFileName, Dictionary templateData)[] Sse2Inputs = new [] -{ - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Add", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(left[0] + right[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i] + right[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Add", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(byte)(left[0] + right[0]) != result[0]", ["ValidateRemainingResults"] = "(byte)(left[i] + right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Add", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(left[0] + right[0]) != result[0]", ["ValidateRemainingResults"] = "(short)(left[i] + right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Add", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(left[0] + right[0]) != result[0]", ["ValidateRemainingResults"] = "(int)(left[i] + right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Add", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(long)(left[0] + right[0]) != result[0]", ["ValidateRemainingResults"] = "(long)(left[i] + right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Add", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "(sbyte)(left[0] + right[0]) != result[0]", ["ValidateRemainingResults"] = "(sbyte)(left[i] + right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Add", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(ushort)(left[0] + right[0]) != result[0]", ["ValidateRemainingResults"] = "(ushort)(left[i] + right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Add", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(uint)(left[0] + right[0]) != result[0]", ["ValidateRemainingResults"] = "(uint)(left[i] + right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Add", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(ulong)(left[0] + right[0]) != result[0]", ["ValidateRemainingResults"] = "(ulong)(left[i] + right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "AddSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "Sse2Verify.AddSaturate(left[0], right[0], result[0])", ["ValidateRemainingResults"] = "Sse2Verify.AddSaturate(left[i], right[i], result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "AddSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "Sse2Verify.AddSaturate(left[0], right[0], result[0])", ["ValidateRemainingResults"] = "Sse2Verify.AddSaturate(left[i], right[i], result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "AddSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "Sse2Verify.AddSaturate(left[0], right[0], result[0])", ["ValidateRemainingResults"] = "Sse2Verify.AddSaturate(left[i], right[i], result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "AddSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "Sse2Verify.AddSaturate(left[0], right[0], result[0])", ["ValidateRemainingResults"] = "Sse2Verify.AddSaturate(left[i], right[i], result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "AddScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(left[0] + right[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "And", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(BitConverter.DoubleToInt64Bits(left[0]) & BitConverter.DoubleToInt64Bits(right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.DoubleToInt64Bits(left[i]) & BitConverter.DoubleToInt64Bits(right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "And", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(byte)(left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(byte)(left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "And", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(short)(left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "And", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(int)(left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "And", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(long)(left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(long)(left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "And", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "(sbyte)(left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(sbyte)(left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "And", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(ushort)(left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(ushort)(left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "And", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(uint)(left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(uint)(left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "And", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(ulong)(left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(ulong)(left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "AndNot", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(~BitConverter.DoubleToInt64Bits(left[0]) & BitConverter.DoubleToInt64Bits(right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "(~BitConverter.DoubleToInt64Bits(left[i]) & BitConverter.DoubleToInt64Bits(right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "AndNot", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(byte)(~left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(byte)(~left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "AndNot", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(~left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(short)(~left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "AndNot", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(~left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(int)(~left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "AndNot", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(long)(~left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(long)(~left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "AndNot", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "(sbyte)(~left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(sbyte)(~left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "AndNot", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(ushort)(~left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(ushort)(~left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "AndNot", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(uint)(~left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(uint)(~left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "AndNot", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(ulong)(~left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(ulong)(~left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Average", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(byte)((left[0] + right[0] + 1) >> 1) != result[0]", ["ValidateRemainingResults"] = "(byte)((left[i] + right[i] + 1) >> 1) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Average", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(ushort)((left[0] + right[0] + 1) >> 1) != result[0]", ["ValidateRemainingResults"] = "(ushort)((left[i] + right[i] + 1) >> 1) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] == right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] == right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != ((left[0] == right[0]) ? unchecked((byte)(-1)) : 0)", ["ValidateRemainingResults"] = "result[i] != ((left[i] == right[i]) ? unchecked((byte)(-1)) : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != ((left[0] == right[0]) ? unchecked((short)(-1)) : 0)", ["ValidateRemainingResults"] = "result[i] != ((left[i] == right[i]) ? unchecked((short)(-1)) : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != ((left[0] == right[0]) ? unchecked((int)(-1)) : 0)", ["ValidateRemainingResults"] = "result[i] != ((left[i] == right[i]) ? unchecked((int)(-1)) : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != ((left[0] == right[0]) ? unchecked((sbyte)(-1)) : 0)", ["ValidateRemainingResults"] = "result[i] != ((left[i] == right[i]) ? unchecked((sbyte)(-1)) : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != ((left[0] == right[0]) ? unchecked((ushort)(-1)) : 0)", ["ValidateRemainingResults"] = "result[i] != ((left[i] == right[i]) ? unchecked((ushort)(-1)) : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != ((left[0] == right[0]) ? unchecked((uint)(-1)) : 0)", ["ValidateRemainingResults"] = "result[i] != ((left[i] == right[i]) ? unchecked((uint)(-1)) : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareScalarEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] == right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("BooleanCmpOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareScalarOrderedEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Boolean",["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(left[0] == right[0]) != result"}), - ("BooleanCmpOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareScalarUnorderedEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Boolean",["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(left[0] == right[0]) != result"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareGreaterThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] > right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] > right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareGreaterThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != ((left[0] > right[0]) ? unchecked((short)(-1)) : 0)", ["ValidateRemainingResults"] = "result[i] != ((left[i] > right[i]) ? unchecked((short)(-1)) : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareGreaterThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != ((left[0] > right[0]) ? unchecked((int)(-1)) : 0)", ["ValidateRemainingResults"] = "result[i] != ((left[i] > right[i]) ? unchecked((int)(-1)) : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareGreaterThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != ((left[0] > right[0]) ? unchecked((sbyte)(-1)) : 0)", ["ValidateRemainingResults"] = "result[i] != ((left[i] > right[i]) ? unchecked((sbyte)(-1)) : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareScalarGreaterThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] > right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("BooleanCmpOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareScalarOrderedGreaterThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Boolean",["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(left[0] > right[0]) != result"}), - ("BooleanCmpOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareScalarUnorderedGreaterThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Boolean",["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(left[0] > right[0]) != result"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareGreaterThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] >= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] >= right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareScalarGreaterThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] >= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("BooleanCmpOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareScalarOrderedGreaterThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Boolean",["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(left[0] >= right[0]) != result"}), - ("BooleanCmpOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareScalarUnorderedGreaterThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Boolean",["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(left[0] >= right[0]) != result"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareLessThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] < right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] < right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareLessThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != ((left[0] < right[0]) ? unchecked((short)(-1)) : 0)", ["ValidateRemainingResults"] = "result[i] != ((left[i] < right[i]) ? unchecked((short)(-1)) : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareLessThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != ((left[0] < right[0]) ? unchecked((int)(-1)) : 0)", ["ValidateRemainingResults"] = "result[i] != ((left[i] < right[i]) ? unchecked((int)(-1)) : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareLessThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != ((left[0] < right[0]) ? unchecked((sbyte)(-1)) : 0)", ["ValidateRemainingResults"] = "result[i] != ((left[i] < right[i]) ? unchecked((sbyte)(-1)) : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareScalarLessThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] < right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("BooleanCmpOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareScalarOrderedLessThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Boolean",["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(left[0] < right[0]) != result"}), - ("BooleanCmpOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareScalarUnorderedLessThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Boolean",["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(left[0] < right[0]) != result"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareLessThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] <= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] <= right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareScalarLessThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] <= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("BooleanCmpOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareScalarOrderedLessThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Boolean",["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(left[0] <= right[0]) != result"}), - ("BooleanCmpOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareScalarUnorderedLessThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Boolean",["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(left[0] <= right[0]) != result"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareNotEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] != right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] != right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareScalarNotEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] != right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("BooleanCmpOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareScalarOrderedNotEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Boolean",["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(left[0] != right[0]) != result"}), - ("BooleanCmpOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareScalarUnorderedNotEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Boolean",["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(left[0] != right[0]) != result"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareNotGreaterThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != (!(left[0] > right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != (!(left[i] > right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareScalarNotGreaterThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != (!(left[0] > right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareNotGreaterThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != (!(left[0] >= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != (!(left[i] >= right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareScalarNotGreaterThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != (!(left[0] >= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareNotLessThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != (!(left[0] < right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != (!(left[i] < right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareScalarNotLessThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != (!(left[0] < right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareNotLessThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != (!(left[0] <= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != (!(left[i] <= right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareScalarNotLessThanOrEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != (!(left[0] <= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareOrdered", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((!double.IsNaN(left[0]) && !double.IsNaN(right[0])) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != ((!double.IsNaN(left[i]) && !double.IsNaN(right[i])) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareScalarOrdered", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((!double.IsNaN(left[0]) && !double.IsNaN(right[0])) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareUnordered", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((double.IsNaN(left[0]) || double.IsNaN(right[0])) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != ((double.IsNaN(left[i]) || double.IsNaN(right[i])) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareScalarUnordered", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((double.IsNaN(left[0]) || double.IsNaN(right[0])) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimdScalarUnOpConvTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ConvertToInt32", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(int)Math.Round(firstOp[0]) != result"}), - ("SimdScalarUnOpConvTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ConvertToInt32", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "firstOp[0] != result"}), - ("SimdScalarUnOpConvTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ConvertToInt32WithTruncation", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(int) firstOp[0] != result"}), - ("SimdScalarUnOpConvTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ConvertToUInt32", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "firstOp[0] != result"}), - ("SimpleUnOpConvTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ConvertToVector128Double", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(firstOp[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(firstOp[i])"}), - ("SimpleUnOpConvTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ConvertToVector128Double", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(firstOp[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i % 2]) != BitConverter.DoubleToInt64Bits(firstOp[i % 2])"}), - ("SimpleUnOpConvTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ConvertToVector128Int32", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "result[0] != (int)Math.Round(firstOp[0])", ["ValidateRemainingResults"] = "result[i] != ((i < 2) ? (int)Math.Round(firstOp[i]) : 0)"}), - ("SimpleUnOpConvTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ConvertToVector128Int32", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "result[0] != (int)MathF.Round(firstOp[0])", ["ValidateRemainingResults"] = "result[i] != (int) MathF.Round(firstOp[i], 0)"}), - ("SimpleUnOpConvTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ConvertToVector128Int32WithTruncation", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "result[0] != (int)firstOp[0]", ["ValidateRemainingResults"] = "result[i] != ((i < 2) ? (int)firstOp[i] : 0)"}), - ("SimpleUnOpConvTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ConvertToVector128Int32WithTruncation", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "result[0] != (int)firstOp[0]", ["ValidateRemainingResults"] = "result[i] != (int)firstOp[i]"}), - ("SimpleUnOpConvTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ConvertToVector128Single", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits((float)firstOp[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != ((i < 2) ? BitConverter.SingleToInt32Bits((float)firstOp[i]) : 0)"}), - ("SimpleUnOpConvTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ConvertToVector128Single", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits((float)firstOp[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits((float)firstOp[i])"}), - ("SimpleBinOpConvTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ConvertScalarToVector128Double", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(double)right != result[0]"}), - ("ScalarSimdUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ConvertScalarToVector128Int32", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "firstOp != result[0]", ["ValidateRemainingResults"] = "false"}), - ("ScalarSimdUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ConvertScalarToVector128UInt32", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "firstOp != result[0]", ["ValidateRemainingResults"] = "false"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Divide", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(left[0] / right[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i] / right[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "DivideScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(left[0] / right[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("ExtractScalarTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Extract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(result[0] != firstOp[1])"}), - ("ExtractScalarTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Extract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Imm"] = "129", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(result[0] != firstOp[1])"}), - ("InsertScalarTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Data"] = "(short)2", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(short)0", ["ValidateFirstResult"] = "(i == 1 ? result[i] != scalarData : result[i] != 0)"}), - ("InsertScalarTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Data"] = "(ushort)2", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(ushort)0", ["ValidateFirstResult"] = "(i == 1 ? result[i] != scalarData : result[i] != 0)"}), - ("InsertScalarTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Data"] = "(short)2", ["Imm"] = "129", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(short)0", ["ValidateFirstResult"] = "(i == 1 ? result[i] != scalarData : result[i] != 0)"}), - ("InsertScalarTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Data"] = "(ushort)2", ["Imm"] = "129", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(ushort)0", ["ValidateFirstResult"] = "(i == 1 ? result[i] != scalarData : result[i] != 0)"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["Method"] = "LoadVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(firstOp[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["Method"] = "LoadVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["Method"] = "LoadVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["Method"] = "LoadVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["Method"] = "LoadVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["Method"] = "LoadVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["Method"] = "LoadVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["Method"] = "LoadVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["Method"] = "LoadVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["Method"] = "LoadScalarVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "0 != BitConverter.DoubleToInt64Bits(result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["Method"] = "LoadScalarVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["Method"] = "LoadScalarVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["Method"] = "LoadScalarVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["Method"] = "LoadScalarVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Max", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Math.Max(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(Math.Max(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Max", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "Math.Max(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "Math.Max(left[i], right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Max", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "Math.Max(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "Math.Max(left[i], right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "MaxScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Math.Max(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Min", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Math.Min(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(Math.Min(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Min", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "Math.Min(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "Math.Min(left[i], right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Min", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "Math.Min(left[0], right[0]) != result[0]", ["ValidateRemainingResults"] = "Math.Min(left[i], right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "MinScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Math.Min(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Multiply", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(left[0] * right[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i] * right[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "MultiplyScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(left[0] * right[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "MultiplyAddAdjacent", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != Math.Clamp(((right[1] * left[1]) + (right[0] * left[0])), int.MinValue, int.MaxValue)", ["ValidateRemainingResults"] = "result[i] != Math.Clamp(((right[(i * 2) + 1] * left[(i * 2) + 1]) + (right[i * 2] * left[i * 2])), int.MinValue, int.MaxValue)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "MultiplyLow", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != BitConverter.ToInt16(BitConverter.GetBytes(((int)(left[0])) * right[0]), 0)", ["ValidateRemainingResults"] = "result[i] != BitConverter.ToInt16(BitConverter.GetBytes(((int)(left[i])) * right[i]), 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "MultiplyLow", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != BitConverter.ToUInt16(BitConverter.GetBytes(((uint)(left[0])) * right[0]), 0)", ["ValidateRemainingResults"] = "result[i] != BitConverter.ToUInt16(BitConverter.GetBytes(((uint)(left[i])) * right[i]), 0)"}), - ("SimdScalarUnOpConvTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "MoveMask", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "((firstOp[0] & 128) == 0) != ((result & 1) == 0)"}), - ("SimdScalarUnOpConvTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "MoveMask", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "(firstOp[0] >= 0) != ((result & 1) == 0)"}), - ("SimdScalarUnOpConvTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "MoveMask", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(BitConverter.DoubleToInt64Bits(firstOp[0]) >= 0) != ((result & 1) == 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Or", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(BitConverter.DoubleToInt64Bits(left[0]) | BitConverter.DoubleToInt64Bits(right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.DoubleToInt64Bits(left[i]) | BitConverter.DoubleToInt64Bits(right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Or", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(byte)(left[0] | right[0]) != result[0]", ["ValidateRemainingResults"] = "(byte)(left[i] | right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Or", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(left[0] | right[0]) != result[0]", ["ValidateRemainingResults"] = "(short)(left[i] | right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Or", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(left[0] | right[0]) != result[0]", ["ValidateRemainingResults"] = "(int)(left[i] | right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Or", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(long)(left[0] | right[0]) != result[0]", ["ValidateRemainingResults"] = "(long)(left[i] | right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Or", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "(sbyte)(left[0] | right[0]) != result[0]", ["ValidateRemainingResults"] = "(sbyte)(left[i] | right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Or", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(ushort)(left[0] | right[0]) != result[0]", ["ValidateRemainingResults"] = "(ushort)(left[i] | right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Or", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(uint)(left[0] | right[0]) != result[0]", ["ValidateRemainingResults"] = "(uint)(left[i] | right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Or", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(ulong)(left[0] | right[0]) != result[0]", ["ValidateRemainingResults"] = "(ulong)(left[i] | right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "PackSignedSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != (short)Math.Min(Math.Max(left[0], short.MinValue), short.MaxValue)", ["ValidateRemainingResults"] = "result[i] != ((i < 4) ? (short)Math.Min(Math.Max(left[i], short.MinValue), short.MaxValue) : (short)Math.Min(Math.Max(right[i%4], short.MinValue), short.MaxValue))"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "PackSignedSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != (sbyte)Math.Min(Math.Max(left[0], sbyte.MinValue), sbyte.MaxValue)", ["ValidateRemainingResults"] = "result[i] != ((i < 8) ? (sbyte)Math.Min(Math.Max(left[i], sbyte.MinValue), sbyte.MaxValue) : (sbyte)Math.Min(Math.Max(right[i%8], sbyte.MinValue), sbyte.MaxValue))"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "PackUnsignedSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != (byte)Math.Min(Math.Max(left[0], byte.MinValue), byte.MaxValue)", ["ValidateRemainingResults"] = "result[i] != ((i < 8) ? (byte)Math.Min(Math.Max(left[i], byte.MinValue), byte.MaxValue) : (byte)Math.Min(Math.Max(right[i%8], byte.MinValue), byte.MaxValue))"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(firstOp[0] << 1) != result[0]", ["ValidateRemainingResults"] = "(short)(firstOp[i] << 1) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(ushort)(firstOp[0] << 1) != result[0]", ["ValidateRemainingResults"] = "(ushort)(firstOp[i] << 1) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(firstOp[0] << 1) != result[0]", ["ValidateRemainingResults"] = "(int)(firstOp[i] << 1) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(uint)(firstOp[0] << 1) != result[0]", ["ValidateRemainingResults"] = "(uint)(firstOp[i] << 1) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(long)(firstOp[0] << 1) != result[0]", ["ValidateRemainingResults"] = "(long)(firstOp[i] << 1) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(ulong)(firstOp[0] << 1) != result[0]", ["ValidateRemainingResults"] = "(ulong)(firstOp[i] << 1) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Imm"] = "16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Imm"] = "16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Imm"] = "32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Imm"] = "32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0!= result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Imm"] = "64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Imm"] = "64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftLeftLogical128BitLane", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(sbyte)8", ["ValidateFirstResult"] = "result[0] != 0", ["ValidateRemainingResults"] = "result[i] != 8"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftLeftLogical128BitLane", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(byte)8", ["ValidateFirstResult"] = "result[0] != 0", ["ValidateRemainingResults"] = "result[i] != 8"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftLeftLogical128BitLane", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(short)8", ["ValidateFirstResult"] = "result[0] != 2048", ["ValidateRemainingResults"] = "result[i] != 2048"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftLeftLogical128BitLane", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(ushort)8", ["ValidateFirstResult"] = "result[0] != 2048", ["ValidateRemainingResults"] = "result[i] != 2048"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftLeftLogical128BitLane", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(int)8", ["ValidateFirstResult"] = "result[0] != 2048", ["ValidateRemainingResults"] = "result[i] != 2048"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftLeftLogical128BitLane", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(uint)8", ["ValidateFirstResult"] = "result[0] != 2048", ["ValidateRemainingResults"] = "result[i] != 2048"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftLeftLogical128BitLane", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(long)8", ["ValidateFirstResult"] = "result[0] != 2048", ["ValidateRemainingResults"] = "result[i] != 2048"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftLeftLogical128BitLane", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(ulong)8", ["ValidateFirstResult"] = "result[0] != 2048", ["ValidateRemainingResults"] = "result[i] != 2048"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(firstOp[0] >> 1) != result[0]", ["ValidateRemainingResults"] = "(short)(firstOp[i] >> 1) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(firstOp[0] >> 1) != result[0]", ["ValidateRemainingResults"] = "(int)(firstOp[i] >> 1) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Imm"] = "16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(firstOp[0] >> 15) != result[0]", ["ValidateRemainingResults"] = "(short)(firstOp[i] >> 15) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Imm"] = "32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(firstOp[0] >> 31) != result[0]", ["ValidateRemainingResults"] = "(int)(firstOp[i] >> 31) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(firstOp[0] >> 1) != result[0]", ["ValidateRemainingResults"] = "(short)(firstOp[i] >> 1) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(ushort)(firstOp[0] >> 1) != result[0]", ["ValidateRemainingResults"] = "(ushort)(firstOp[i] >> 1) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(firstOp[0] >> 1) != result[0]", ["ValidateRemainingResults"] = "(int)(firstOp[i] >> 1) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(uint)(firstOp[0] >> 1) != result[0]", ["ValidateRemainingResults"] = "(uint)(firstOp[i] >> 1) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(long)(firstOp[0] >> 1) != result[0]", ["ValidateRemainingResults"] = "(long)(firstOp[i] >> 1) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(ulong)(firstOp[0] >> 1) != result[0]", ["ValidateRemainingResults"] = "(ulong)(firstOp[i] >> 1) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Imm"] = "16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Imm"] = "16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Imm"] = "32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Imm"] = "32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0!= result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Imm"] = "64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Imm"] = "64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftRightLogical128BitLane", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(sbyte)8", ["ValidateFirstResult"] = "result[0] != 8", ["ValidateRemainingResults"] = "(i == 15 ? result[i] != 0 : result[i] != 8)"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftRightLogical128BitLane", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(byte)8", ["ValidateFirstResult"] = "result[0] != 8", ["ValidateRemainingResults"] = "(i == 15 ? result[i] != 0 : result[i] != 8)"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftRightLogical128BitLane", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(short)8", ["ValidateFirstResult"] = "result[0] != 2048", ["ValidateRemainingResults"] = "(i == 7 ? result[i] != 0 : result[i] != 2048)"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftRightLogical128BitLane", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(ushort)8", ["ValidateFirstResult"] = "result[0] != 2048", ["ValidateRemainingResults"] = "(i == 7 ? result[i] != 0 : result[i] != 2048)"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftRightLogical128BitLane", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(int)8", ["ValidateFirstResult"] = "result[0] != 134217728", ["ValidateRemainingResults"] = "(i == 3 ? result[i] != 0 : result[i] != 134217728)"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftRightLogical128BitLane", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(uint)8", ["ValidateFirstResult"] = "result[0] != 134217728", ["ValidateRemainingResults"] = "(i == 3 ? result[i] != 0 : result[i] != 134217728)"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftRightLogical128BitLane", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(long)8", ["ValidateFirstResult"] = "result[0] != 576460752303423488L", ["ValidateRemainingResults"] = "(result[i] != 0)"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftRightLogical128BitLane", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(ulong)8", ["ValidateFirstResult"] = "result[0] != 576460752303423488UL", ["ValidateRemainingResults"] = "(result[i] != 0)"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Shuffle", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Imm"] = "0", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[0] != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Shuffle", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Imm"] = "0", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[0] != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Shuffle", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "firstOp[1] != result[0]", ["ValidateRemainingResults"] = "firstOp[0] != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Shuffle", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "firstOp[1] != result[0]", ["ValidateRemainingResults"] = "firstOp[0] != result[i]"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Shuffle", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Imm"] = "0", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(left[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(right[0])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Shuffle", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(left[1])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(right[0])"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShuffleHigh", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Imm"] = "0", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(i <= 3 ? (firstOp[i] != result[i]) : (firstOp[4] != result[i]))"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShuffleHigh", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Imm"] = "0", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(i <= 3 ? (firstOp[i] != result[i]) : (firstOp[4] != result[i]))"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShuffleLow", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Imm"] = "0", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(i <= 3 ? (firstOp[0] != result[i]) : (firstOp[i] != result[i]))"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShuffleLow", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Imm"] = "0", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(i <= 3 ? (firstOp[0] != result[i]) : (firstOp[i] != result[i]))"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShuffleHigh", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(i <= 3 ? (firstOp[i] != result[i]) : (firstOp[5] != result[4]))"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShuffleHigh", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(i <= 3 ? (firstOp[i] != result[i]) : (firstOp[5] != result[4]))"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShuffleLow", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "firstOp[1] != result[0]", ["ValidateRemainingResults"] = "(i <= 3 ? (firstOp[0] != result[i]) : (firstOp[i] != result[i]))"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "ShuffleLow", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "firstOp[1] != result[0]", ["ValidateRemainingResults"] = "(i <= 3 ? (firstOp[0] != result[i]) : (firstOp[i] != result[i]))"}), - ("StoreUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "StoreScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "value[0] != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), - ("StoreUnOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "StoreScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "value[0] != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Subtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(left[0] - right[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i] - right[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Subtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(byte)(left[0] - right[0]) != result[0]", ["ValidateRemainingResults"] = "(byte)(left[i] - right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Subtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(left[0] - right[0]) != result[0]", ["ValidateRemainingResults"] = "(short)(left[i] - right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Subtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(left[0] - right[0]) != result[0]", ["ValidateRemainingResults"] = "(int)(left[i] - right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Subtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(long)(left[0] - right[0]) != result[0]", ["ValidateRemainingResults"] = "(long)(left[i] - right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Subtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "(sbyte)(left[0] - right[0]) != result[0]", ["ValidateRemainingResults"] = "(sbyte)(left[i] - right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Subtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(ushort)(left[0] - right[0]) != result[0]", ["ValidateRemainingResults"] = "(ushort)(left[i] - right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Subtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(uint)(left[0] - right[0]) != result[0]", ["ValidateRemainingResults"] = "(uint)(left[i] - right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Subtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(ulong)(left[0] - right[0]) != result[0]", ["ValidateRemainingResults"] = "(ulong)(left[i] - right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "SubtractSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "Sse2Verify.SubtractSaturate(left[0], right[0], result[0])", ["ValidateRemainingResults"] = "Sse2Verify.SubtractSaturate(left[i], right[i], result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "SubtractSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "Sse2Verify.SubtractSaturate(left[0], right[0], result[0])", ["ValidateRemainingResults"] = "Sse2Verify.SubtractSaturate(left[i], right[i], result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "SubtractSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "Sse2Verify.SubtractSaturate(left[0], right[0], result[0])", ["ValidateRemainingResults"] = "Sse2Verify.SubtractSaturate(left[i], right[i], result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "SubtractSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "Sse2Verify.SubtractSaturate(left[0], right[0], result[0])", ["ValidateRemainingResults"] = "Sse2Verify.SubtractSaturate(left[i], right[i], result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "SubtractScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(left[0] - right[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "SumAbsoluteDifferences", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != Math.Abs(left[0] - right[0]) + Math.Abs(left[1] - right[1]) + Math.Abs(left[2] - right[2]) + Math.Abs(left[3] - right[3]) + Math.Abs(left[4] - right[4]) + Math.Abs(left[5] - right[5]) + Math.Abs(left[6] - right[6]) + Math.Abs(left[7] - right[7])", ["ValidateRemainingResults"] = "result[i] != (i != 4 ? 0 : Math.Abs(left[8] - right[8]) + Math.Abs(left[9] - right[9]) + Math.Abs(left[10] - right[10]) + Math.Abs(left[11] - right[11]) + Math.Abs(left[12] - right[12]) + Math.Abs(left[13] - right[13]) + Math.Abs(left[14] - right[14]) + Math.Abs(left[15] - right[15]))"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "UnpackHigh", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(left[1])", ["ValidateRemainingResults"] = "(i % 2 == 0) ? BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(left[i/2+1]) : BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(right[(i - 1)/2 + 1])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "UnpackHigh", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != left[1] || result[1] != right[1]", ["ValidateRemainingResults"] = "(i % 2 == 0) ? result[i] != left[i/2 + 1] : result[i] != right[(i - 1)/2 + 1]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "UnpackHigh", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "result[0] != left[1] || result[1] != right[1]", ["ValidateRemainingResults"] = "(i % 2 == 0) ? result[i] != left[i/2 + 1] : result[i] != right[(i - 1)/2 + 1]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "UnpackHigh", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != left[2]", ["ValidateRemainingResults"] = "(i % 2 == 0) ? result[i] != left[i/2 + 2] : result[i] != right[(i - 1)/2 + 2]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "UnpackHigh", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != left[2]", ["ValidateRemainingResults"] = "(i % 2 == 0) ? result[i] != left[i/2 + 2] : result[i] != right[(i - 1)/2 + 2]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "UnpackHigh", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != left[4]", ["ValidateRemainingResults"] = "(i % 2 == 0) ? result[i] != left[i/2 + 4] : result[i] != right[(i - 1)/2 + 4]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "UnpackHigh", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != left[4]", ["ValidateRemainingResults"] = "(i % 2 == 0) ? result[i] != left[i/2 + 4] : result[i] != right[(i - 1)/2 + 4]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "UnpackHigh", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != left[8]", ["ValidateRemainingResults"] = "(i % 2 == 0) ? result[i] != left[i/2 + 8] : result[i] != right[(i - 1)/2 + 8]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "UnpackHigh", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != left[8]", ["ValidateRemainingResults"] = "(i % 2 == 0) ? result[i] != left[i/2 + 8] : result[i] != right[(i - 1)/2 + 8]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "UnpackLow", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(left[0])", ["ValidateRemainingResults"] = "(i % 2 == 0) ? BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(left[i/2]) : BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(right[(i - 1)/2])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "UnpackLow", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != left[0] || result[1] != right[0]", ["ValidateRemainingResults"] = "(i % 2 == 0) ? result[i] != left[i/2] : result[i] != right[(i - 1)/2]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "UnpackLow", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "result[0] != left[0] || result[1] != right[0]", ["ValidateRemainingResults"] = "(i % 2 == 0) ? result[i] != left[i/2] : result[i] != right[(i - 1)/2]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "UnpackLow", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "(i % 2 == 0) ? result[i] != left[i/2] : result[i] != right[(i - 1)/2]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "UnpackLow", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "(i % 2 == 0) ? result[i] != left[i/2] : result[i] != right[(i - 1)/2]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "UnpackLow", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "(i % 2 == 0) ? result[i] != left[i/2] : result[i] != right[(i - 1)/2]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "UnpackLow", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "(i % 2 == 0) ? result[i] != left[i/2] : result[i] != right[(i - 1)/2]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "UnpackLow", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "(i % 2 == 0) ? result[i] != left[i/2] : result[i] != right[(i - 1)/2]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "UnpackLow", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "(i % 2 == 0) ? result[i] != left[i/2] : result[i] != right[(i - 1)/2]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Xor", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(BitConverter.DoubleToInt64Bits(left[0]) ^ BitConverter.DoubleToInt64Bits(right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.DoubleToInt64Bits(left[i]) ^ BitConverter.DoubleToInt64Bits(right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Xor", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(byte)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(byte)(left[i] ^ right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Xor", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(short)(left[i] ^ right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Xor", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(int)(left[i] ^ right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Xor", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(long)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(long)(left[i] ^ right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Xor", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "(sbyte)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(sbyte)(left[i] ^ right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Xor", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(ushort)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(ushort)(left[i] ^ right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Xor", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(uint)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(uint)(left[i] ^ right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Xor", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(ulong)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(ulong)(left[i] ^ right[i]) != result[i]"}), -}; - -private static readonly (string templateFileName, Dictionary templateData)[] Sse2X64Inputs = new [] -{ - ("SimdScalarUnOpConvTest.template", new Dictionary { ["Isa"] = "Sse2.X64", ["LoadIsa"] = "Sse2", ["Method"] = "ConvertToInt64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(long)Math.Round(firstOp[0]) != result"}), - ("SimdScalarUnOpConvTest.template", new Dictionary { ["Isa"] = "Sse2.X64", ["LoadIsa"] = "Sse2", ["Method"] = "ConvertToInt64", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "firstOp[0] != result"}), - ("SimdScalarUnOpConvTest.template", new Dictionary { ["Isa"] = "Sse2.X64", ["LoadIsa"] = "Sse2", ["Method"] = "ConvertToUInt64", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "firstOp[0] != result"}), - ("SimdScalarUnOpConvTest.template", new Dictionary { ["Isa"] = "Sse2.X64", ["LoadIsa"] = "Sse2", ["Method"] = "ConvertToInt64WithTruncation", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(long)firstOp[0] != result"}), - ("SimpleBinOpConvTest.template", new Dictionary { ["Isa"] = "Sse2.X64", ["LoadIsa"] = "Sse2", ["Method"] = "ConvertScalarToVector128Double", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(double)right != result[0]"}), - ("ScalarSimdUnOpTest.template", new Dictionary { ["Isa"] = "Sse2.X64", ["LoadIsa"] = "Sse2", ["Method"] = "ConvertScalarToVector128Int64", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "firstOp != result[0]", ["ValidateRemainingResults"] = "false"}), - ("ScalarSimdUnOpTest.template", new Dictionary { ["Isa"] = "Sse2.X64", ["LoadIsa"] = "Sse2", ["Method"] = "ConvertScalarToVector128UInt64", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "firstOp != result[0]", ["ValidateRemainingResults"] = "false"}), -}; - -private static readonly (string templateFileName, Dictionary templateData)[] Sse3Inputs = new [] -{ - ("AlternatingBinOpTest.template", new Dictionary { ["Isa"] = "Sse3", ["LoadIsa"] = "Sse2", ["Method"] = "AddSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(left[i] - right[i])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i + 1]) != BitConverter.DoubleToInt64Bits(left[i + 1] + right[i + 1])"}), - ("AlternatingBinOpTest.template", new Dictionary { ["Isa"] = "Sse3", ["LoadIsa"] = "Sse" , ["Method"] = "AddSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(left[i] - right[i])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i + 1]) != BitConverter.SingleToInt32Bits(left[i + 1] + right[i + 1])"}), - ("HorizontalBinOpTest.template", new Dictionary { ["Isa"] = "Sse3", ["LoadIsa"] = "Sse2", ["Method"] = "HorizontalAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[i1]) != BitConverter.DoubleToInt64Bits(left[i3] + left[i3 + 1])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i2]) != BitConverter.DoubleToInt64Bits(right[i3] + right[i3 + 1])"}), - ("HorizontalBinOpTest.template", new Dictionary { ["Isa"] = "Sse3", ["LoadIsa"] = "Sse", ["Method"] = "HorizontalAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[i1]) != BitConverter.SingleToInt32Bits(left[i3] + left[i3 + 1])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i2]) != BitConverter.SingleToInt32Bits(right[i3] + right[i3 + 1])"}), - ("HorizontalBinOpTest.template", new Dictionary { ["Isa"] = "Sse3", ["LoadIsa"] = "Sse2", ["Method"] = "HorizontalSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[i1]) != BitConverter.DoubleToInt64Bits(left[i3] - left[i3 + 1])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i2]) != BitConverter.DoubleToInt64Bits(right[i3] - right[i3 + 1])"}), - ("HorizontalBinOpTest.template", new Dictionary { ["Isa"] = "Sse3", ["LoadIsa"] = "Sse", ["Method"] = "HorizontalSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[i1]) != BitConverter.SingleToInt32Bits(left[i3] - left[i3 + 1])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i2]) != BitConverter.SingleToInt32Bits(right[i3] - right[i3 + 1])"}), -}; - -private static readonly (string templateFileName, Dictionary templateData)[] Ssse3Inputs = new [] -{ - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "Abs", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != Math.Abs(firstOp[0])", ["ValidateRemainingResults"] = "result[i] != Math.Abs(firstOp[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "Abs", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != Math.Abs(firstOp[0])", ["ValidateRemainingResults"] = "result[i] != Math.Abs(firstOp[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "Abs", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != Math.Abs(firstOp[0])", ["ValidateRemainingResults"] = "result[i] != Math.Abs(firstOp[i])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["Imm"] = "0", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != right[i]"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != right[1]", ["ValidateRemainingResults"] = "result[i] != (i == 15 ? left[0] : right[i+1])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["Imm"] = "0", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != right[i]"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != right[1]", ["ValidateRemainingResults"] = "result[i] != (i == 15 ? left[0] : right[i+1])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["Imm"] = "0", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != right[i]"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["Imm"] = "2", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != right[1]", ["ValidateRemainingResults"] = "result[i] != (i == 7 ? left[0] : right[i+1])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16",["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16",["Imm"] = "0", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != right[i]"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16",["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16",["Imm"] = "2", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != right[1]", ["ValidateRemainingResults"] = "result[i] != (i == 7 ? left[0] : right[i+1])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["Imm"] = "0", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != right[i]"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["Imm"] = "4", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != right[1]", ["ValidateRemainingResults"] = "result[i] != (i == 3 ? left[0] : right[i+1])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32",["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32",["Imm"] = "0", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != right[i]"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32",["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32",["Imm"] = "4", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != right[1]", ["ValidateRemainingResults"] = "result[i] != (i == 3 ? left[0] : right[i+1])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["Imm"] = "0", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != right[i]"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["Imm"] = "8", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != right[1]", ["ValidateRemainingResults"] = "result[i] != (i == 1 ? left[0] : right[i+1])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64",["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64",["Imm"] = "0", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != right[i]"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64",["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64",["Imm"] = "8", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "result[0] != right[1]", ["ValidateRemainingResults"] = "result[i] != (i == 1 ? left[0] : right[i+1])"}), - ("HorizontalBinOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "HorizontalAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[i1] != (short)(left[i3] + left[i3 + 1])", ["ValidateRemainingResults"] = "result[i2] != (short)(right[i3] + right[i3 + 1])"}), - ("HorizontalBinOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "HorizontalAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[i1] != (int)(left[i3] + left[i3 + 1])", ["ValidateRemainingResults"] = "result[i2] != (int)(right[i3] + right[i3 + 1])"}), - ("HorizontalBinOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "HorizontalAddSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[i1] != Math.Clamp((left[i3] + left[i3 + 1]), short.MinValue, short.MaxValue)", ["ValidateRemainingResults"] = "result[i2] != Math.Clamp((right[i3] + right[i3 + 1]), short.MinValue, short.MaxValue)"}), - ("HorizontalBinOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "HorizontalSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[i1] != (short)(left[i3] - left[i3 + 1])", ["ValidateRemainingResults"] = "result[i2] != (short)(right[i3] - right[i3 + 1])"}), - ("HorizontalBinOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "HorizontalSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[i1] != (int)(left[i3] - left[i3 + 1])", ["ValidateRemainingResults"] = "result[i2] != (int)(right[i3] - right[i3 + 1])"}), - ("HorizontalBinOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "HorizontalSubtractSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[i1] != Math.Clamp((left[i3] - left[i3 + 1]), short.MinValue, short.MaxValue)", ["ValidateRemainingResults"] = "result[i2] != Math.Clamp((right[i3] - right[i3 + 1]), short.MinValue, short.MaxValue)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "MultiplyAddAdjacent", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != Math.Clamp(((right[1] * left[1]) + (right[0] * left[0])), short.MinValue, short.MaxValue)", ["ValidateRemainingResults"] = "result[i] != Math.Clamp(((right[(i * 2) + 1] * left[(i * 2) + 1]) + (right[i * 2] * left[i * 2])), short.MinValue, short.MaxValue)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "MultiplyHighRoundScale", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != (short)((((left[0] * right[0]) >> 14) + 1) >> 1)", ["ValidateRemainingResults"] = "result[i] != (short)((((left[i] * right[i]) >> 14) + 1) >> 1)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "Shuffle", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != ((right[0] > 127) ? 0 : left[right[0] & 0x0F])", ["ValidateRemainingResults"] = "result[i] != ((right[i] > 127) ? 0 : left[right[i] & 0x0F])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "Shuffle", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != ((right[0] < 0) ? 0 : left[right[0] & 0x0F])", ["ValidateRemainingResults"] = "result[i] != ((right[i] < 0) ? 0 : left[right[i] & 0x0F])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "Sign", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != (right[0] < 0 ? (sbyte)(-left[0]) : (right[0] > 0 ? left[0] : 0))", ["ValidateRemainingResults"] = "result[i] != (right[i] < 0 ? (sbyte)(-left[i]) : (right[i] > 0 ? left[i] : 0))"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "Sign", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != (right[0] < 0 ? (short)(-left[0]) : (right[0] > 0 ? left[0] : 0))", ["ValidateRemainingResults"] = "result[i] != (right[i] < 0 ? (short)(-left[i]) : (right[i] > 0 ? left[i] : 0))"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "Sign", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != (right[0] < 0 ? (int)(-left[0]) : (right[0] > 0 ? left[0] : 0))", ["ValidateRemainingResults"] = "result[i] != (right[i] < 0 ? (int)(-left[i]) : (right[i] > 0 ? left[i] : 0))"}), -}; - -private static readonly (string templateFileName, Dictionary templateData)[] Sse41Inputs = new [] -{ - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "BlendVariable", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["NextValueOp3"] = "(byte)(((i % 2) == 0) ? 128 : 1)", ["ValidateFirstResult"] = "((thirdOp[0] >> 7) & 1) == 1 ? secondOp[0] != result[0] : firstOp[0] != result[0]", ["ValidateRemainingResults"] = "((thirdOp[i] >> 7) & 1) == 1 ? secondOp[i] != result[i] : firstOp[i] != result[i]"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "BlendVariable", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp3"] = "(double)(((i % 2) == 0) ? -0.0 : 1.0)", ["ValidateFirstResult"] = "((BitConverter.DoubleToInt64Bits(thirdOp[0]) >> 63) & 1) == 1 ? BitConverter.DoubleToInt64Bits(secondOp[0]) != BitConverter.DoubleToInt64Bits(result[0]) : BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "((BitConverter.DoubleToInt64Bits(thirdOp[i]) >> 63) & 1) == 1 ? BitConverter.DoubleToInt64Bits(secondOp[i]) != BitConverter.DoubleToInt64Bits(result[i]) : BitConverter.DoubleToInt64Bits(firstOp[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "BlendVariable", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp3"] = "(sbyte)(((i % 2) == 0) ? -128 : 1)", ["ValidateFirstResult"] = "((thirdOp[0] >> 7) & 1) == 1 ? secondOp[0] != result[0] : firstOp[0] != result[0]", ["ValidateRemainingResults"] = "((thirdOp[i] >> 7) & 1) == 1 ? secondOp[i] != result[i] : firstOp[i] != result[i]"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse", ["Method"] = "BlendVariable", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "(float)(((i % 2) == 0) ? -0.0 : 1.0)", ["ValidateFirstResult"] = "((BitConverter.SingleToInt32Bits(thirdOp[0]) >> 31) & 1) == 1 ? BitConverter.SingleToInt32Bits(secondOp[0]) != BitConverter.SingleToInt32Bits(result[0]) : BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "((BitConverter.SingleToInt32Bits(thirdOp[i]) >> 31) & 1) == 1 ? BitConverter.SingleToInt32Bits(secondOp[i]) != BitConverter.SingleToInt32Bits(result[i]) : BitConverter.SingleToInt32Bits(firstOp[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "BlendVariable", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "(((i % 2) == 0) ? Convert.ToInt16(\"0xFFFF\", 16) : (short)0)", ["ValidateFirstResult"] = "(thirdOp[0] != 0) ? secondOp[0] != result[0] : firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(thirdOp[i] != 0) ? secondOp[i] != result[i] : firstOp[i] != result[i]"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "BlendVariable", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "(((i % 2) == 0) ? Convert.ToUInt16(\"0xFFFF\", 16) : (ushort)0)", ["ValidateFirstResult"] = "(thirdOp[0] != 0) ? secondOp[0] != result[0] : firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(thirdOp[i] != 0) ? secondOp[i] != result[i] : firstOp[i] != result[i]"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "BlendVariable", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "(((i % 2) == 0) ? Convert.ToInt32(\"0xFFFFFFFF\", 16) : (int)0)", ["ValidateFirstResult"] = "(thirdOp[0] != 0) ? secondOp[0] != result[0] : firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(thirdOp[i] != 0) ? secondOp[i] != result[i] : firstOp[i] != result[i]"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "BlendVariable", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "(((i % 2) == 0) ? Convert.ToUInt32(\"0xFFFFFFFF\", 16) : (uint)0)", ["ValidateFirstResult"] = "(thirdOp[0] != 0) ? secondOp[0] != result[0] : firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(thirdOp[i] != 0) ? secondOp[i] != result[i] : firstOp[i] != result[i]"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "BlendVariable", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp3"] = "(((i % 2) == 0) ? Convert.ToInt64(\"0xFFFFFFFFFFFFFFFF\", 16) : (long)0)", ["ValidateFirstResult"] = "(thirdOp[0] != 0) ? secondOp[0] != result[0] : firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(thirdOp[i] != 0) ? secondOp[i] != result[i] : firstOp[i] != result[i]"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "BlendVariable", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp3"] = "(((i % 2) == 0) ? Convert.ToUInt64(\"0xFFFFFFFFFFFFFFFF\", 16): (ulong)0)", ["ValidateFirstResult"] = "(thirdOp[0] != 0) ? secondOp[0] != result[0] : firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(thirdOp[i] != 0) ? secondOp[i] != result[i] : firstOp[i] != result[i]"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Ceiling", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Ceiling(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Ceiling(firstOp[i]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse", ["Method"] = "Ceiling", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Ceiling(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Ceiling(firstOp[i]))"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "CeilingScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Ceiling(right[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(left[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse", ["Method"] = "CeilingScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Ceiling(right[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(left[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != ((left[0] == right[0]) ? unchecked((long)(-1)) : 0)", ["ValidateRemainingResults"] = "result[i] != ((left[i] == right[i]) ? unchecked((long)(-1)) : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "result[0] != ((left[0] == right[0]) ? unchecked((ulong)(-1)) : 0)", ["ValidateRemainingResults"] = "result[i] != ((left[i] == right[i]) ? unchecked((ulong)(-1)) : 0)"}), - ("ExtractScalarTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Extract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Byte", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(result[0] != firstOp[1])"}), - ("ExtractScalarTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Extract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int32", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(result[0] != firstOp[1])"}), - ("ExtractScalarTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Extract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt32", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(result[0] != firstOp[1])"}), - ("ExtractScalarTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse", ["Method"] = "Extract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(firstOp[1]))"}), - ("ExtractScalarTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Extract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Byte", ["Imm"] = "129", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(result[0] != firstOp[1])"}), - ("ExtractScalarTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Extract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int32", ["Imm"] = "129", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(result[0] != firstOp[1])"}), - ("ExtractScalarTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Extract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt32", ["Imm"] = "129", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(result[0] != firstOp[1])"}), - ("ExtractScalarTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse", ["Method"] = "Extract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single", ["Imm"] = "129", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(firstOp[1]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Floor", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Floor(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Floor(firstOp[i]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse", ["Method"] = "Floor", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Floor(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Floor(firstOp[i]))"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "FloorScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Floor(right[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(left[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse", ["Method"] = "FloorScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Floor(right[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(left[i])"}), - ("InsertVector128Test.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Imm"] = "0", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(right[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(left[i])"}), - ("InsertScalarTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Byte", ["Data"] = "(byte)2", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(i == 1 ? result[i] != scalarData : result[i] != firstOp[i])"}), - ("InsertScalarTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "SByte", ["Data"] = "(sbyte)2", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "(i == 1 ? result[i] != scalarData : result[i] != firstOp[i])"}), - ("InsertScalarTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int32", ["Data"] = "(int)2", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(i == 1 ? result[i] != scalarData : result[i] != firstOp[i])"}), - ("InsertScalarTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt32", ["Data"] = "(uint)2", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(i == 1 ? result[i] != scalarData : result[i] != firstOp[i])"}), - ("InsertVector128Test.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(0.0f)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(left[i])"}), - ("InsertVector128Test.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Imm"] = "2", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(right[0])", ["ValidateRemainingResults"] = "i == 1 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(0.0f) : BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(left[i])"}), - ("InsertVector128Test.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Imm"] = "4", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(right[0])", ["ValidateRemainingResults"] = "i == 2 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(0.0f) : BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(left[i])"}), - ("InsertVector128Test.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Imm"] = "8", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(right[0])", ["ValidateRemainingResults"] = "i == 3 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(0.0f) : BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(left[i])"}), - ("InsertVector128Test.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Imm"] = "16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(left[0])", ["ValidateRemainingResults"] = "i == 1 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(right[0]) : BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(left[i])"}), - ("InsertVector128Test.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Imm"] = "32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(left[0])", ["ValidateRemainingResults"] = "i == 2 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(right[0]) : BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(left[i])"}), - ("InsertVector128Test.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Imm"] = "48", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(left[0])", ["ValidateRemainingResults"] = "i == 3 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(right[0]) : BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(left[i])"}), - ("InsertVector128Test.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Imm"] = "64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(right[1])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(left[i])"}), - ("InsertVector128Test.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Imm"] = "128", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(right[2])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(left[i])"}), - ("InsertScalarTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Byte", ["Data"] = "(byte)2", ["Imm"] = "129", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(i == 1 ? result[i] != scalarData : result[i] != firstOp[i])"}), - ("InsertScalarTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "SByte", ["Data"] = "(sbyte)2", ["Imm"] = "129", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "(i == 1 ? result[i] != scalarData : result[i] != firstOp[i])"}), - ("InsertScalarTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int32", ["Data"] = "(int)2", ["Imm"] = "129", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(i == 1 ? result[i] != scalarData : result[i] != firstOp[i])"}), - ("InsertScalarTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt32", ["Data"] = "(uint)2", ["Imm"] = "129", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(i == 1 ? result[i] != scalarData : result[i] != firstOp[i])"}), - ("InsertVector128Test.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Imm"] = "129", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(0.0f)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(left[i])"}), - ("InsertVector128Test.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Imm"] = "192", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(right[3])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(left[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Max", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != Math.Max(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Max(left[i], right[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Max", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != Math.Max(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Max(left[i], right[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Max", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != Math.Max(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Max(left[i], right[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Max", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != Math.Max(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Max(left[i], right[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Min", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != Math.Min(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Min(left[i], right[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Min", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != Math.Min(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Min(left[i], right[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Min", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != Math.Min(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Min(left[i], right[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Min", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != Math.Min(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Min(left[i], right[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "MultiplyLow", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != BitConverter.ToInt32(BitConverter.GetBytes(((long)(left[0])) * right[0]), 0)", ["ValidateRemainingResults"] = "result[i] != BitConverter.ToInt32(BitConverter.GetBytes(((long)(left[i])) * right[i]), 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "MultiplyLow", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != BitConverter.ToUInt32(BitConverter.GetBytes(((ulong)(left[0])) * right[0]), 0)", ["ValidateRemainingResults"] = "result[i] != BitConverter.ToUInt32(BitConverter.GetBytes(((ulong)(left[i])) * right[i]), 0)"}), - ("HorizontalBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "PackUnsignedSaturate", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[i1] != ((left[i3 - inner] > 0xFFFF) ? 0xFFFF : ((left[i3 - inner] < 0) ? 0 : BitConverter.ToUInt16(BitConverter.GetBytes(left[i3 - inner]), 0)))", ["ValidateRemainingResults"] = "result[i2] != ((right[i3 - inner] > 0xFFFF) ? 0xFFFF : ((right[i3 - inner] < 0) ? 0 : BitConverter.ToUInt16(BitConverter.GetBytes(right[i3 - inner]), 0)))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "RoundCurrentDirection", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Round(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Round(firstOp[i]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse", ["Method"] = "RoundCurrentDirection", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Round(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Round(firstOp[i]))"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "RoundCurrentDirectionScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Round(right[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(left[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse", ["Method"] = "RoundCurrentDirectionScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Round(right[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(left[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "RoundToNearestInteger", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Round(firstOp[0], MidpointRounding.AwayFromZero))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Round(firstOp[i], MidpointRounding.AwayFromZero))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse", ["Method"] = "RoundToNearestInteger", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Round(firstOp[0], MidpointRounding.AwayFromZero))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Round(firstOp[i], MidpointRounding.AwayFromZero))"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "RoundToNearestIntegerScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Round(right[0], MidpointRounding.AwayFromZero))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(left[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse", ["Method"] = "RoundToNearestIntegerScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Round(right[0], MidpointRounding.AwayFromZero))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(left[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "RoundToNegativeInfinity", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Floor(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Floor(firstOp[i]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse", ["Method"] = "RoundToNegativeInfinity", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Floor(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Floor(firstOp[i]))"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "RoundToNegativeInfinityScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Floor(right[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(left[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse", ["Method"] = "RoundToNegativeInfinityScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Floor(right[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(left[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "RoundToPositiveInfinity", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Ceiling(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Ceiling(firstOp[i]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse", ["Method"] = "RoundToPositiveInfinity", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Ceiling(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Ceiling(firstOp[i]))"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "RoundToPositiveInfinityScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Ceiling(right[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(left[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse", ["Method"] = "RoundToPositiveInfinityScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Ceiling(right[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(left[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "RoundToZero", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits((firstOp[0] > 0) ? Math.Floor(firstOp[0]) : Math.Ceiling(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits((firstOp[i] > 0) ? Math.Floor(firstOp[i]) : Math.Ceiling(firstOp[i]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse", ["Method"] = "RoundToZero", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits((firstOp[0] > 0) ? MathF.Floor(firstOp[0]) : MathF.Ceiling(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits((firstOp[i] > 0) ? MathF.Floor(firstOp[i]) : MathF.Ceiling(firstOp[i]))"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "RoundToZeroScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits((right[0] > 0) ? Math.Floor(right[0]) : Math.Ceiling(right[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(left[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse", ["Method"] = "RoundToZeroScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits((right[0] > 0) ? MathF.Floor(right[0]) : MathF.Ceiling(right[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(left[i])"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "TestC", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(~left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "TestC", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(~left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "TestC", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(~left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "TestC", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(~left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "TestC", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "(~left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "TestC", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(~left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "TestC", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(~left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "TestC", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(~left[i] & right[i]) == 0"}), - ("BooleanTwoCmpOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "TestNotZAndNotC", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "((left[i] & right[i]) == 0)", ["ValidateRemainingResults"] = "((~left[i] & right[i]) == 0)"}), - ("BooleanTwoCmpOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "TestNotZAndNotC", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "((left[i] & right[i]) == 0)", ["ValidateRemainingResults"] = "((~left[i] & right[i]) == 0)"}), - ("BooleanTwoCmpOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "TestNotZAndNotC", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "((left[i] & right[i]) == 0)", ["ValidateRemainingResults"] = "((~left[i] & right[i]) == 0)"}), - ("BooleanTwoCmpOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "TestNotZAndNotC", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "((left[i] & right[i]) == 0)", ["ValidateRemainingResults"] = "((~left[i] & right[i]) == 0)"}), - ("BooleanTwoCmpOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "TestNotZAndNotC", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "((left[i] & right[i]) == 0)", ["ValidateRemainingResults"] = "((~left[i] & right[i]) == 0)"}), - ("BooleanTwoCmpOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "TestNotZAndNotC", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "((left[i] & right[i]) == 0)", ["ValidateRemainingResults"] = "((~left[i] & right[i]) == 0)"}), - ("BooleanTwoCmpOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "TestNotZAndNotC", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "((left[i] & right[i]) == 0)", ["ValidateRemainingResults"] = "((~left[i] & right[i]) == 0)"}), - ("BooleanTwoCmpOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "TestNotZAndNotC", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "((left[i] & right[i]) == 0)", ["ValidateRemainingResults"] = "((~left[i] & right[i]) == 0)"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "TestZ", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "TestZ", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "TestZ", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "TestZ", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "TestZ", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "(left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "TestZ", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "TestZ", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "TestZ", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(left[i] & right[i]) == 0"}), -}; - -private static readonly (string templateFileName, Dictionary templateData)[] Sse41_OverloadedInputs = new [] -{ - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "RoundCurrentDirectionScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Round(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(firstOp[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse", ["Method"] = "RoundCurrentDirectionScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Round(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "RoundToNearestIntegerScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Round(firstOp[0], MidpointRounding.AwayFromZero))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(firstOp[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse", ["Method"] = "RoundToNearestIntegerScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Round(firstOp[0], MidpointRounding.AwayFromZero))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "RoundToNegativeInfinityScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Floor(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(firstOp[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse", ["Method"] = "RoundToNegativeInfinityScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Floor(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "RoundToPositiveInfinityScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Ceiling(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(firstOp[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse", ["Method"] = "RoundToPositiveInfinityScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Ceiling(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i])"}), -}; - -private static readonly (string templateFileName, Dictionary templateData)[] Sse41X64Inputs = new [] -{ - ("ExtractScalarTest.template", new Dictionary { ["Isa"] = "Sse41.X64", ["LoadIsa"] = "Sse2", ["Method"] = "Extract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int64", ["Imm"] = "129", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(result[0] != firstOp[1])"}), - ("ExtractScalarTest.template", new Dictionary { ["Isa"] = "Sse41.X64", ["LoadIsa"] = "Sse2", ["Method"] = "Extract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt64", ["Imm"] = "129", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(result[0] != firstOp[1])"}), - ("ExtractScalarTest.template", new Dictionary { ["Isa"] = "Sse41.X64", ["LoadIsa"] = "Sse2", ["Method"] = "Extract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int64", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(result[0] != firstOp[1])"}), - ("ExtractScalarTest.template", new Dictionary { ["Isa"] = "Sse41.X64", ["LoadIsa"] = "Sse2", ["Method"] = "Extract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt64", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(result[0] != firstOp[1])"}), - ("InsertScalarTest.template", new Dictionary { ["Isa"] = "Sse41.X64", ["LoadIsa"] = "Sse2", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int64", ["Data"] = "(long)2", ["Imm"] = "129", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(i == 1 ? result[i] != scalarData : result[i] != firstOp[i])"}), - ("InsertScalarTest.template", new Dictionary { ["Isa"] = "Sse41.X64", ["LoadIsa"] = "Sse2", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt64", ["Data"] = "(ulong)2", ["Imm"] = "129", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(i == 1 ? result[i] != scalarData : result[i] != firstOp[i])"}), - ("InsertScalarTest.template", new Dictionary { ["Isa"] = "Sse41.X64", ["LoadIsa"] = "Sse2", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int64", ["Data"] = "(long)2", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(i == 1 ? result[i] != scalarData : result[i] != firstOp[i])"}), - ("InsertScalarTest.template", new Dictionary { ["Isa"] = "Sse41.X64", ["LoadIsa"] = "Sse2", ["Method"] = "Insert", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt64", ["Data"] = "(ulong)2", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(i == 1 ? result[i] != scalarData : result[i] != firstOp[i])"}), -}; - -private static readonly (string templateFileName, Dictionary templateData)[] Sse42Inputs = new [] -{ - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Sse42", ["LoadIsa"] = "Sse2", ["Method"] = "CompareGreaterThan", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != ((left[0] > right[0]) ? unchecked((long)(-1)) : 0)", ["ValidateRemainingResults"] = "result[i] != ((left[i] > right[i]) ? unchecked((long)(-1)) : 0)"}), -}; - -private static readonly (string templateFileName, Dictionary templateData)[] AvxInputs = new [] -{ - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Add", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(left[0] + right[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i] + right[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Add", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(left[0] + right[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i] + right[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "AddSubtract", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(left[0] - right[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "((i % 2 != 0) && (BitConverter.DoubleToInt64Bits(left[i] + right[i]) != BitConverter.DoubleToInt64Bits(result[i]))) || ((i % 2 == 0) && (BitConverter.DoubleToInt64Bits(left[i] - right[i]) != BitConverter.DoubleToInt64Bits(result[i])))"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "AddSubtract", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(left[0] - right[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "((i % 2 != 0) && (BitConverter.SingleToInt32Bits(left[i] + right[i]) != BitConverter.SingleToInt32Bits(result[i]))) || ((i % 2 == 0) && (BitConverter.SingleToInt32Bits(left[i] - right[i]) != BitConverter.SingleToInt32Bits(result[i])))"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "And", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(BitConverter.DoubleToInt64Bits(left[0]) & BitConverter.DoubleToInt64Bits(right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.DoubleToInt64Bits(left[i]) & BitConverter.DoubleToInt64Bits(right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "And", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(BitConverter.SingleToInt32Bits(left[0]) & BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.SingleToInt32Bits(left[i]) & BitConverter.SingleToInt32Bits(right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "AndNot", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "((~BitConverter.DoubleToInt64Bits(left[0])) & BitConverter.DoubleToInt64Bits(right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "((~BitConverter.DoubleToInt64Bits(left[i])) & BitConverter.DoubleToInt64Bits(right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "AndNot", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "((~BitConverter.SingleToInt32Bits(left[0])) & BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "((~BitConverter.SingleToInt32Bits(left[i])) & BitConverter.SingleToInt32Bits(right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "BlendVariable", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector256", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp3"] = "(double)(((i % 2) == 0) ? -0.0 : 1.0)", ["ValidateFirstResult"] = "((BitConverter.DoubleToInt64Bits(thirdOp[0]) >> 63) & 1) == 1 ? BitConverter.DoubleToInt64Bits(secondOp[0]) != BitConverter.DoubleToInt64Bits(result[0]) : BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "((BitConverter.DoubleToInt64Bits(thirdOp[i]) >> 63) & 1) == 1 ? BitConverter.DoubleToInt64Bits(secondOp[i]) != BitConverter.DoubleToInt64Bits(result[i]) : BitConverter.DoubleToInt64Bits(firstOp[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "BlendVariable", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector256", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "(float)(((i % 2) == 0) ? -0.0 : 1.0)", ["ValidateFirstResult"] = "((BitConverter.SingleToInt32Bits(thirdOp[0]) >> 31) & 1) == 1 ? BitConverter.SingleToInt32Bits(secondOp[0]) != BitConverter.SingleToInt32Bits(result[0]) : BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "((BitConverter.SingleToInt32Bits(thirdOp[i]) >> 31) & 1) == 1 ? BitConverter.SingleToInt32Bits(secondOp[i]) != BitConverter.SingleToInt32Bits(result[i]) : BitConverter.SingleToInt32Bits(firstOp[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "BroadcastScalarToVector128",["RetVectorType"]="Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "BroadcastScalarToVector256",["RetVectorType"]="Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "BroadcastScalarToVector256",["RetVectorType"]="Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "BroadcastVector128ToVector256",["RetVectorType"]="Vector256",["RetBaseType"]= "Single",["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != (i < 4 ? BitConverter.SingleToInt32Bits(firstOp[i]) : BitConverter.SingleToInt32Bits(firstOp[i-4]))"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "BroadcastVector128ToVector256",["RetVectorType"]="Vector256",["RetBaseType"]= "Double",["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != (i < 2 ? BitConverter.DoubleToInt64Bits(firstOp[i]) : BitConverter.DoubleToInt64Bits(firstOp[i-2]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Ceiling", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Ceiling(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Ceiling(firstOp[i]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Ceiling", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Ceiling(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Ceiling(firstOp[i]))"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((left[0] == right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != ((left[i] == right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] == right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] == right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareGreaterThan", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((left[0] > right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != ((left[i] > right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareGreaterThan", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] > right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] > right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareGreaterThanOrEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((left[0] >= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != ((left[i] >= right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareGreaterThanOrEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] >= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] >= right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareLessThan", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((left[0] < right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != ((left[i] < right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareLessThan", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] < right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] < right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareLessThanOrEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((left[0] <= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != ((left[i] <= right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareLessThanOrEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] <= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] <= right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareNotEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((left[0] != right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != ((left[i] != right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareNotEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] != right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] != right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareNotGreaterThan", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != (!(left[0] > right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != (!(left[i] > right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareNotGreaterThan", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != (!(left[0] > right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != (!(left[i] > right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareNotGreaterThanOrEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != (!(left[0] >= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != (!(left[i] >= right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareNotGreaterThanOrEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != (!(left[0] >= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != (!(left[i] >= right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareNotLessThan", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != (!(left[0] < right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != (!(left[i] < right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareNotLessThan", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != (!(left[0] < right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != (!(left[i] < right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareNotLessThanOrEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != (!(left[0] <= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != (!(left[i] <= right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareNotLessThanOrEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != (!(left[0] <= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != (!(left[i] <= right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareOrdered", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((!float.IsNaN(left[0]) && !float.IsNaN(right[0])) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != ((!float.IsNaN(left[i]) && !float.IsNaN(right[i])) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareOrdered", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((!double.IsNaN(left[0]) && !double.IsNaN(right[0])) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != ((!double.IsNaN(left[i]) && !double.IsNaN(right[i])) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareUnordered", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((float.IsNaN(left[0]) || float.IsNaN(right[0])) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != ((float.IsNaN(left[i]) || float.IsNaN(right[i])) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareUnordered", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((double.IsNaN(left[0]) || double.IsNaN(right[0])) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != ((double.IsNaN(left[i]) || double.IsNaN(right[i])) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Divide", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(left[0] / right[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i] / right[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Divide", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(left[0] / right[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i] / right[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "DuplicateEvenIndexed", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "(i % 2 == 0) ? (BitConverter.DoubleToInt64Bits(firstOp[i]) != BitConverter.DoubleToInt64Bits(result[i])) : (BitConverter.DoubleToInt64Bits(firstOp[i - 1]) != BitConverter.DoubleToInt64Bits(result[i]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "DuplicateEvenIndexed", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "(i % 2 == 0) ? (BitConverter.SingleToInt32Bits(firstOp[i]) != BitConverter.SingleToInt32Bits(result[i])) : (BitConverter.SingleToInt32Bits(firstOp[i - 1]) != BitConverter.SingleToInt32Bits(result[i]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "DuplicateOddIndexed", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(firstOp[1]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "(i % 2 == 0) ? (BitConverter.SingleToInt32Bits(firstOp[i + 1]) != BitConverter.SingleToInt32Bits(result[i])) : (BitConverter.SingleToInt32Bits(firstOp[i]) != BitConverter.SingleToInt32Bits(result[i]))"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(firstOp[4])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i+4])"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(firstOp[2])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(firstOp[i+2])"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != firstOp[16]", ["ValidateRemainingResults"] = "result[i] != firstOp[i+16]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != firstOp[16]", ["ValidateRemainingResults"] = "result[i] != firstOp[i+16]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != firstOp[8]", ["ValidateRemainingResults"] = "result[i] != firstOp[i+8]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != firstOp[8]", ["ValidateRemainingResults"] = "result[i] != firstOp[i+8]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != firstOp[4]", ["ValidateRemainingResults"] = "result[i] != firstOp[i+4]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != firstOp[4]", ["ValidateRemainingResults"] = "result[i] != firstOp[i+4]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != firstOp[2]", ["ValidateRemainingResults"] = "result[i] != firstOp[i+2]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "result[0] != firstOp[2]", ["ValidateRemainingResults"] = "result[i] != firstOp[i+2]"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "result[i] != (i < 16 ? left[i] : right[i-16])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "result[i] != (i < 16 ? left[i] : right[i-16])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "result[i] != (i < 8 ? left[i] : right[i-8])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "result[i] != (i < 8 ? left[i] : right[i-8])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "result[i] != (i < 4 ? left[i] : right[i-4])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "result[i] != (i < 4 ? left[i] : right[i-4])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "result[i] != (i < 2 ? left[i] : right[i-2])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "result[i] != (i < 2 ? left[i] : right[i-2])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(left[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != (i < 4 ? BitConverter.SingleToInt32Bits(left[i]) : BitConverter.SingleToInt32Bits(right[i-4]))"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(left[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != (i < 2 ? BitConverter.DoubleToInt64Bits(left[i]) : BitConverter.DoubleToInt64Bits(right[i-2]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Floor", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Floor(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Floor(firstOp[i]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Floor", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Floor(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Floor(firstOp[i]))"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "LoadVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(firstOp[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "LoadVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(firstOp[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "LoadVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "LoadVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "LoadVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "LoadVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "LoadVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "LoadVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "LoadVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "LoadVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), - ("LoadBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "MaskLoad", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits((BitConverter.DoubleToInt64Bits(right[0]) < 0) ? left[0] : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits((BitConverter.DoubleToInt64Bits(right[i]) < 0) ? left[i] : 0)"}), - ("LoadBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "MaskLoad", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits((BitConverter.SingleToInt32Bits(right[0]) < 0) ? left[0] : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits((BitConverter.SingleToInt32Bits(right[i]) < 0) ? left[i] : 0)"}), - ("StoreBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "MaskStore", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits((BitConverter.DoubleToInt64Bits(left[0]) < 0) ? right[0] : BitConverter.DoubleToInt64Bits(result[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits((BitConverter.DoubleToInt64Bits(left[i]) < 0) ? right[i] : BitConverter.DoubleToInt64Bits(result[i]))"}), - ("StoreBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "MaskStore", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits((BitConverter.SingleToInt32Bits(left[0]) < 0) ? right[0] : BitConverter.SingleToInt32Bits(result[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits((BitConverter.SingleToInt32Bits(left[i]) < 0) ? right[i] : BitConverter.SingleToInt32Bits(result[i]))"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Max", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Math.Max(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(Math.Max(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Max", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(MathF.Max(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(MathF.Max(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Min", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Math.Min(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(Math.Min(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Min", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(MathF.Min(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(MathF.Min(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Multiply", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(left[0] * right[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i] * right[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Multiply", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(left[0] * right[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i] * right[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Or", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(BitConverter.DoubleToInt64Bits(left[0]) | BitConverter.DoubleToInt64Bits(right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.DoubleToInt64Bits(left[i]) | BitConverter.DoubleToInt64Bits(right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Or", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(BitConverter.SingleToInt32Bits(left[0]) | BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.SingleToInt32Bits(left[i]) | BitConverter.SingleToInt32Bits(right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(firstOp[1])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[4]) != BitConverter.SingleToInt32Bits(firstOp[5])"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(firstOp[1])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[2]) != BitConverter.DoubleToInt64Bits(firstOp[2]) || BitConverter.DoubleToInt64Bits(result[2]) != BitConverter.DoubleToInt64Bits(firstOp[2])"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Sse", ["Method"] = "Permute", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Imm"] = "2", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(firstOp[2])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[1]) != BitConverter.SingleToInt32Bits(firstOp[0]) || BitConverter.SingleToInt32Bits(result[2]) != BitConverter.SingleToInt32Bits(firstOp[0])"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Sse2",["Method"] = "Permute", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Imm"] = "2", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(firstOp[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[1]) != BitConverter.DoubleToInt64Bits(firstOp[1])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute2x128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(right[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != (i < 2 ? BitConverter.DoubleToInt64Bits(right[i]) : BitConverter.DoubleToInt64Bits(left[i-2]))"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute2x128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(right[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != (i < 4 ? BitConverter.SingleToInt32Bits(right[i]) : BitConverter.SingleToInt32Bits(left[i-4]))"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute2x128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Byte", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != (i < 16 ? right[i] : left[i-16])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute2x128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != (i < 16 ? right[i] : left[i-16])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute2x128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != (i < 8 ? right[i] : left[i-8])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute2x128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != (i < 8 ? right[i] : left[i-8])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute2x128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != (i < 4 ? right[i] : left[i-4])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute2x128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != (i < 4 ? right[i] : left[i-4])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute2x128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int64", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != (i < 2 ? right[i] : left[i-2])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute2x128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt64", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != (i < 2 ? right[i] : left[i-2])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "PermuteVar", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "1", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(left[1]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "i > 3 ? (BitConverter.SingleToInt32Bits(left[5]) != BitConverter.SingleToInt32Bits(result[i])) : (BitConverter.SingleToInt32Bits(left[1]) != BitConverter.SingleToInt32Bits(result[i]))"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "PermuteVar", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "(long)1", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(left[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "i > 1 ? (BitConverter.DoubleToInt64Bits(left[2]) != BitConverter.DoubleToInt64Bits(result[i])) : (BitConverter.DoubleToInt64Bits(left[0]) != BitConverter.DoubleToInt64Bits(result[i]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "RoundCurrentDirection", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Round(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Round(firstOp[i]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "RoundCurrentDirection", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Round(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Round(firstOp[i]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "RoundToNearestInteger", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Round(firstOp[0], MidpointRounding.AwayFromZero))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Round(firstOp[i], MidpointRounding.AwayFromZero))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "RoundToNearestInteger", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Round(firstOp[0], MidpointRounding.AwayFromZero))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Round(firstOp[i], MidpointRounding.AwayFromZero))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "RoundToNegativeInfinity", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Floor(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Floor(firstOp[i]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "RoundToNegativeInfinity", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Floor(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Floor(firstOp[i]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "RoundToPositiveInfinity", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Ceiling(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Ceiling(firstOp[i]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "RoundToPositiveInfinity", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Ceiling(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Ceiling(firstOp[i]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "RoundToZero", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits((firstOp[0] > 0) ? Math.Floor(firstOp[0]) : Math.Ceiling(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits((firstOp[i] > 0) ? Math.Floor(firstOp[i]) : Math.Ceiling(firstOp[i]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "RoundToZero", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits((firstOp[0] > 0) ? MathF.Floor(firstOp[0]) : MathF.Ceiling(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits((firstOp[i] > 0) ? MathF.Floor(firstOp[i]) : MathF.Ceiling(firstOp[i]))"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Shuffle", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(left[1])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[7]) != BitConverter.SingleToInt32Bits(right[4])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Shuffle", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(left[1])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[3]) != BitConverter.DoubleToInt64Bits(right[2])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Subtract", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(left[0] - right[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i] - right[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Subtract", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(left[0] - right[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i] - right[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(~left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(~left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(~left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(~left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "(~left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(~left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(~left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(~left[i] & right[i]) == 0"}), - ("BooleanTwoCmpOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestNotZAndNotC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "((left[i] & right[i]) == 0)", ["ValidateRemainingResults"] = "((~left[i] & right[i]) == 0)"}), - ("BooleanTwoCmpOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestNotZAndNotC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "((left[i] & right[i]) == 0)", ["ValidateRemainingResults"] = "((~left[i] & right[i]) == 0)"}), - ("BooleanTwoCmpOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestNotZAndNotC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "((left[i] & right[i]) == 0)", ["ValidateRemainingResults"] = "((~left[i] & right[i]) == 0)"}), - ("BooleanTwoCmpOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestNotZAndNotC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "((left[i] & right[i]) == 0)", ["ValidateRemainingResults"] = "((~left[i] & right[i]) == 0)"}), - ("BooleanTwoCmpOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestNotZAndNotC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "((left[i] & right[i]) == 0)", ["ValidateRemainingResults"] = "((~left[i] & right[i]) == 0)"}), - ("BooleanTwoCmpOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestNotZAndNotC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "((left[i] & right[i]) == 0)", ["ValidateRemainingResults"] = "((~left[i] & right[i]) == 0)"}), - ("BooleanTwoCmpOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestNotZAndNotC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "((left[i] & right[i]) == 0)", ["ValidateRemainingResults"] = "((~left[i] & right[i]) == 0)"}), - ("BooleanTwoCmpOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestNotZAndNotC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "((left[i] & right[i]) == 0)", ["ValidateRemainingResults"] = "((~left[i] & right[i]) == 0)"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestZ", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestZ", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestZ", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestZ", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestZ", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "(left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestZ", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestZ", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestZ", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(left[i] & right[i]) == 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Xor", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(BitConverter.SingleToInt32Bits(left[0]) ^ BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.SingleToInt32Bits(left[i]) ^ BitConverter.SingleToInt32Bits(right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Xor", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(BitConverter.DoubleToInt64Bits(left[0]) ^ BitConverter.DoubleToInt64Bits(right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.DoubleToInt64Bits(left[i]) ^ BitConverter.DoubleToInt64Bits(right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), -}; - -private static readonly (string templateFileName, Dictionary templateData)[] Avx_Vector128Inputs = new [] -{ - ("LoadBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "MaskLoad", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits((BitConverter.DoubleToInt64Bits(right[0]) < 0) ? left[0] : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits((BitConverter.DoubleToInt64Bits(right[i]) < 0) ? left[i] : 0)"}), - ("LoadBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "MaskLoad", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits((BitConverter.SingleToInt32Bits(right[0]) < 0) ? left[0] : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits((BitConverter.SingleToInt32Bits(right[i]) < 0) ? left[i] : 0)"}), - ("StoreBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "MaskStore", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits((BitConverter.DoubleToInt64Bits(left[0]) < 0) ? right[0] : BitConverter.DoubleToInt64Bits(result[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits((BitConverter.DoubleToInt64Bits(left[i]) < 0) ? right[i] : BitConverter.DoubleToInt64Bits(result[i]))"}), - ("StoreBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "MaskStore", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits((BitConverter.SingleToInt32Bits(left[0]) < 0) ? right[0] : BitConverter.SingleToInt32Bits(result[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits((BitConverter.SingleToInt32Bits(left[i]) < 0) ? right[i] : BitConverter.SingleToInt32Bits(result[i]))"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "PermuteVar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "1", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(left[1]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[1]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "PermuteVar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "(long)1", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(left[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[0]) != BitConverter.DoubleToInt64Bits(result[i])"}), -}; - -private static readonly (string templateFileName, Dictionary templateData)[] Avx2Inputs = new [] -{ - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Add", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(byte)(left[0] + right[0]) != result[0]", ["ValidateRemainingResults"] = "(byte)(left[i] + right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Add", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(left[0] + right[0]) != result[0]", ["ValidateRemainingResults"] = "(short)(left[i] + right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Add", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(left[0] + right[0]) != result[0]", ["ValidateRemainingResults"] = "(int)(left[i] + right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Add", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(long)(left[0] + right[0]) != result[0]", ["ValidateRemainingResults"] = "(long)(left[i] + right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Add", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "(sbyte)(left[0] + right[0]) != result[0]", ["ValidateRemainingResults"] = "(sbyte)(left[i] + right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Add", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(ushort)(left[0] + right[0]) != result[0]", ["ValidateRemainingResults"] = "(ushort)(left[i] + right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Add", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(uint)(left[0] + right[0]) != result[0]", ["ValidateRemainingResults"] = "(uint)(left[i] + right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Add", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(ulong)(left[0] + right[0]) != result[0]", ["ValidateRemainingResults"] = "(ulong)(left[i] + right[i]) != result[i]"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["Imm"] = "5", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != right[5]", ["ValidateRemainingResults"] = "(result[i] != ((i < 16) ? ((i < 11) ? right[i + 5] : left[i - 11]) : ((i < 27) ? right[i + 5] : left[i - 11])))"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["Imm"] = "27", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != left[11]", ["ValidateRemainingResults"] = "(result[i] != ((i < 16) ? ((i < 5) ? left[i + 11] : 0) : ((i < 21) ? left[i + 11] : 0)))"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["Imm"] = "228", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != 0", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["Imm"] = "250", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != 0", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Byte", ["Imm"] = "5", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != right[5]", ["ValidateRemainingResults"] = "(result[i] != ((i < 16) ? ((i < 11) ? right[i + 5] : left[i - 11]) : ((i < 27) ? right[i + 5] : left[i - 11])))"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Byte", ["Imm"] = "27", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != left[11]", ["ValidateRemainingResults"] = "(result[i] != ((i < 16) ? ((i < 5) ? left[i + 11] : 0) : ((i < 21) ? left[i + 11] : 0)))"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Byte", ["Imm"] = "228", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != 0", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Byte", ["Imm"] = "250", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != 0", ["ValidateRemainingResults"] = "result[i] != 0"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["Imm"] = "0", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != right[i]"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != right[1]", ["ValidateRemainingResults"] = "result[i] != (i < 8 ? (i == 7 ? left[0] : right[i+1]) : (i == 15 ? left[8] : right[i+1]))"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["Imm"] = "0", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != right[i]"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != right[1]", ["ValidateRemainingResults"] = "result[i] != (i < 8 ? (i == 7 ? left[0] : right[i+1]) : (i == 15 ? left[8] : right[i+1]))"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["Imm"] = "0", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != right[i]"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["Imm"] = "4", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != right[1]", ["ValidateRemainingResults"] = "result[i] != (i < 4 ? (i == 3 ? left[0] : right[i+1]) : (i == 7 ? left[4] : right[i+1]))"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["Imm"] = "0", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != right[i]"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["Imm"] = "4", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != right[1]", ["ValidateRemainingResults"] = "result[i] != (i < 4 ? (i == 3 ? left[0] : right[i+1]) : (i == 7 ? left[4] : right[i+1]))"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int64", ["Imm"] = "0", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != right[i]"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int64", ["Imm"] = "8", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != right[1]", ["ValidateRemainingResults"] = "result[i] != (i < 2 ? (i == 1 ? left[0] : right[i+1]) : (i == 3 ? left[2] : right[i+1]))"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt64", ["Imm"] = "0", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != right[i]"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt64", ["Imm"] = "8", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "result[0] != right[1]", ["ValidateRemainingResults"] = "result[i] != (i < 2 ? (i == 1 ? left[0] : right[i+1]) : (i == 3 ? left[2] : right[i+1]))"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "And", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(byte)(left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(byte)(left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "And", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(short)(left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "And", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(int)(left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "And", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(long)(left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(long)(left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "And", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "(sbyte)(left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(sbyte)(left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "And", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(ushort)(left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(ushort)(left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "And", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(uint)(left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(uint)(left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "And", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(ulong)(left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(ulong)(left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AndNot", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(byte)(~left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(byte)(~left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AndNot", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(~left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(short)(~left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AndNot", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(~left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(int)(~left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AndNot", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(long)(~left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(long)(~left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AndNot", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "(sbyte)(~left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(sbyte)(~left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AndNot", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(ushort)(~left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(ushort)(~left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AndNot", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(uint)(~left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(uint)(~left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AndNot", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(ulong)(~left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(ulong)(~left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Average", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(byte)((left[0] + right[0] + 1) >> 1) != result[0]", ["ValidateRemainingResults"] = "(byte)((left[i] + right[i] + 1) >> 1) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Average", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(ushort)((left[0] + right[0] + 1) >> 1) != result[0]", ["ValidateRemainingResults"] = "(ushort)((left[i] + right[i] + 1) >> 1) != result[i]"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Blend", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != (((1 & (1 << 0)) == 0) ? left[0] : right[0])", ["ValidateRemainingResults"] = "result[i] != ((i < 8) ? (((1 & (1 << i)) == 0) ? left[i] : right[i]) : (((1 & (1 << (i - 8))) == 0) ? left[i] : right[i]))"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Blend", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != (((2 & (1 << 0)) == 0) ? left[0] : right[0])", ["ValidateRemainingResults"] = "result[i] != ((i < 8) ? (((2 & (1 << i)) == 0) ? left[i] : right[i]) : (((2 & (1 << (i - 8))) == 0) ? left[i] : right[i]))"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Blend", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["Imm"] = "4", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != (((4 & (1 << 0)) == 0) ? left[0] : right[0])", ["ValidateRemainingResults"] = "result[i] != ((i < 8) ? (((4 & (1 << i)) == 0) ? left[i] : right[i]) : (((4 & (1 << (i - 8))) == 0) ? left[i] : right[i]))"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Blend", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["Imm"] = "85", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != (((85 & (1 << 0)) == 0) ? left[0] : right[0])", ["ValidateRemainingResults"] = "result[i] != ((i < 8) ? (((85 & (1 << i)) == 0) ? left[i] : right[i]) : (((85 & (1 << (i - 8))) == 0) ? left[i] : right[i]))"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Blend", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != (((1 & (1 << 0)) == 0) ? left[0] : right[0])", ["ValidateRemainingResults"] = "result[i] != ((i < 8) ? (((1 & (1 << i)) == 0) ? left[i] : right[i]) : (((1 & (1 << (i - 8))) == 0) ? left[i] : right[i]))"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Blend", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != (((2 & (1 << 0)) == 0) ? left[0] : right[0])", ["ValidateRemainingResults"] = "result[i] != ((i < 8) ? (((2 & (1 << i)) == 0) ? left[i] : right[i]) : (((2 & (1 << (i - 8))) == 0) ? left[i] : right[i]))"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Blend", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["Imm"] = "4", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != (((4 & (1 << 0)) == 0) ? left[0] : right[0])", ["ValidateRemainingResults"] = "result[i] != ((i < 8) ? (((4 & (1 << i)) == 0) ? left[i] : right[i]) : (((4 & (1 << (i - 8))) == 0) ? left[i] : right[i]))"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Blend", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["Imm"] = "85", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != (((85 & (1 << 0)) == 0) ? left[0] : right[0])", ["ValidateRemainingResults"] = "result[i] != ((i < 8) ? (((85 & (1 << i)) == 0) ? left[i] : right[i]) : (((85 & (1 << (i - 8))) == 0) ? left[i] : right[i]))"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Blend", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != (((1 & (1 << 0)) == 0) ? left[0] : right[0])", ["ValidateRemainingResults"] = "result[i] != (((1 & (1 << i)) == 0) ? left[i] : right[i])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Blend", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != (((2 & (1 << 0)) == 0) ? left[0] : right[0])", ["ValidateRemainingResults"] = "result[i] != (((2 & (1 << i)) == 0) ? left[i] : right[i])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Blend", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["Imm"] = "4", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != (((4 & (1 << 0)) == 0) ? left[0] : right[0])", ["ValidateRemainingResults"] = "result[i] != (((4 & (1 << i)) == 0) ? left[i] : right[i])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Blend", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["Imm"] = "85", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != (((85 & (1 << 0)) == 0) ? left[0] : right[0])", ["ValidateRemainingResults"] = "result[i] != (((85 & (1 << i)) == 0) ? left[i] : right[i])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Blend", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != (((1 & (1 << 0)) == 0) ? left[0] : right[0])", ["ValidateRemainingResults"] = "result[i] != (((1 & (1 << i)) == 0) ? left[i] : right[i])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Blend", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != (((2 & (1 << 0)) == 0) ? left[0] : right[0])", ["ValidateRemainingResults"] = "result[i] != (((2 & (1 << i)) == 0) ? left[i] : right[i])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Blend", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["Imm"] = "4", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != (((4 & (1 << 0)) == 0) ? left[0] : right[0])", ["ValidateRemainingResults"] = "result[i] != (((4 & (1 << i)) == 0) ? left[i] : right[i])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Blend", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["Imm"] = "85", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != (((85 & (1 << 0)) == 0) ? left[0] : right[0])", ["ValidateRemainingResults"] = "result[i] != (((85 & (1 << i)) == 0) ? left[i] : right[i])"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "BlendVariable", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Byte", ["Op3VectorType"] = "Vector256", ["Op3BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["NextValueOp3"] = "(byte)(((i % 2) == 0) ? 128 : 1)", ["ValidateFirstResult"] = "((thirdOp[0] >> 7) & 1) == 1 ? secondOp[0] != result[0] : firstOp[0] != result[0]", ["ValidateRemainingResults"] = "((thirdOp[i] >> 7) & 1) == 1 ? secondOp[i] != result[i] : firstOp[i] != result[i]"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "BlendVariable", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["Op3VectorType"] = "Vector256", ["Op3BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp3"] = "(sbyte)(((i % 2) == 0) ? -128 : 1)", ["ValidateFirstResult"] = "((thirdOp[0] >> 7) & 1) == 1 ? secondOp[0] != result[0] : firstOp[0] != result[0]", ["ValidateRemainingResults"] = "((thirdOp[i] >> 7) & 1) == 1 ? secondOp[i] != result[i] : firstOp[i] != result[i]"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "BlendVariable", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector256", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "(((i % 2) == 0) ? Convert.ToInt16(\"0xFFFF\", 16) : (short)0)", ["ValidateFirstResult"] = "(thirdOp[0] != 0) ? secondOp[0] != result[0] : firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(thirdOp[i] != 0) ? secondOp[i] != result[i] : firstOp[i] != result[i]"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "BlendVariable", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["Op3VectorType"] = "Vector256", ["Op3BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp3"] = "(((i % 2) == 0) ? Convert.ToUInt16(\"0xFFFF\", 16) : (ushort)0)", ["ValidateFirstResult"] = "(thirdOp[0] != 0) ? secondOp[0] != result[0] : firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(thirdOp[i] != 0) ? secondOp[i] != result[i] : firstOp[i] != result[i]"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "BlendVariable", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector256", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "(((i % 2) == 0) ? Convert.ToInt32(\"0xFFFFFFFF\", 16) : (int)0)", ["ValidateFirstResult"] = "(thirdOp[0] != 0) ? secondOp[0] != result[0] : firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(thirdOp[i] != 0) ? secondOp[i] != result[i] : firstOp[i] != result[i]"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "BlendVariable", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector256", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "(((i % 2) == 0) ? Convert.ToUInt32(\"0xFFFFFFFF\", 16) : (uint)0)", ["ValidateFirstResult"] = "(thirdOp[0] != 0) ? secondOp[0] != result[0] : firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(thirdOp[i] != 0) ? secondOp[i] != result[i] : firstOp[i] != result[i]"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "BlendVariable", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int64", ["Op3VectorType"] = "Vector256", ["Op3BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp3"] = "(((i % 2) == 0) ? Convert.ToInt64(\"0xFFFFFFFFFFFFFFFF\", 16) : (long)0)", ["ValidateFirstResult"] = "(thirdOp[0] != 0) ? secondOp[0] != result[0] : firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(thirdOp[i] != 0) ? secondOp[i] != result[i] : firstOp[i] != result[i]"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "BlendVariable", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt64", ["Op3VectorType"] = "Vector256", ["Op3BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp3"] = "(((i % 2) == 0) ? Convert.ToUInt64(\"0xFFFFFFFFFFFFFFFF\", 16): (ulong)0)", ["ValidateFirstResult"] = "(thirdOp[0] != 0) ? secondOp[0] != result[0] : firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(thirdOp[i] != 0) ? secondOp[i] != result[i] : firstOp[i] != result[i]"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "BroadcastScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(firstOp[0] != result[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "BroadcastScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(firstOp[0] != result[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "BroadcastScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(firstOp[0] != result[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "BroadcastScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(firstOp[0] != result[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "BroadcastScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(firstOp[0] != result[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "BroadcastScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(firstOp[0] != result[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "BroadcastScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(firstOp[0] != result[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "BroadcastScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(firstOp[0] != result[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse", ["Method"] = "BroadcastScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[i]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "BroadcastScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[i]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "BroadcastScalarToVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(firstOp[0] != result[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "BroadcastScalarToVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(firstOp[0] != result[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "BroadcastScalarToVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(firstOp[0] != result[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "BroadcastScalarToVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(firstOp[0] != result[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "BroadcastScalarToVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(firstOp[0] != result[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "BroadcastScalarToVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(firstOp[0] != result[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "BroadcastScalarToVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(firstOp[0] != result[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "BroadcastScalarToVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(firstOp[0] != result[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse", ["Method"] = "BroadcastScalarToVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[i]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "BroadcastScalarToVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[i]))"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != ((left[0] == right[0]) ? unchecked((byte)(-1)) : 0)", ["ValidateRemainingResults"] = "result[i] != ((left[i] == right[i]) ? unchecked((byte)(-1)) : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != ((left[0] == right[0]) ? unchecked((short)(-1)) : 0)", ["ValidateRemainingResults"] = "result[i] != ((left[i] == right[i]) ? unchecked((short)(-1)) : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != ((left[0] == right[0]) ? unchecked((int)(-1)) : 0)", ["ValidateRemainingResults"] = "result[i] != ((left[i] == right[i]) ? unchecked((int)(-1)) : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != ((left[0] == right[0]) ? unchecked((long)(-1)) : 0)", ["ValidateRemainingResults"] = "result[i] != ((left[i] == right[i]) ? unchecked((long)(-1)) : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != ((left[0] == right[0]) ? unchecked((sbyte)(-1)) : 0)", ["ValidateRemainingResults"] = "result[i] != ((left[i] == right[i]) ? unchecked((sbyte)(-1)) : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != ((left[0] == right[0]) ? unchecked((ushort)(-1)) : 0)", ["ValidateRemainingResults"] = "result[i] != ((left[i] == right[i]) ? unchecked((ushort)(-1)) : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != ((left[0] == right[0]) ? unchecked((uint)(-1)) : 0)", ["ValidateRemainingResults"] = "result[i] != ((left[i] == right[i]) ? unchecked((uint)(-1)) : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "result[0] != ((left[0] == right[0]) ? unchecked((ulong)(-1)) : 0)", ["ValidateRemainingResults"] = "result[i] != ((left[i] == right[i]) ? unchecked((ulong)(-1)) : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "CompareGreaterThan", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != ((left[0] > right[0]) ? unchecked((short)(-1)) : 0)", ["ValidateRemainingResults"] = "result[i] != ((left[i] > right[i]) ? unchecked((short)(-1)) : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "CompareGreaterThan", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != ((left[0] > right[0]) ? unchecked((int)(-1)) : 0)", ["ValidateRemainingResults"] = "result[i] != ((left[i] > right[i]) ? unchecked((int)(-1)) : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "CompareGreaterThan", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != ((left[0] > right[0]) ? unchecked((long)(-1)) : 0)", ["ValidateRemainingResults"] = "result[i] != ((left[i] > right[i]) ? unchecked((long)(-1)) : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "CompareGreaterThan", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != ((left[0] > right[0]) ? unchecked((sbyte)(-1)) : 0)", ["ValidateRemainingResults"] = "result[i] != ((left[i] > right[i]) ? unchecked((sbyte)(-1)) : 0)"}), - ("SimdScalarUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ConvertToInt32", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result != firstOp[0]"}), - ("SimdScalarUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ConvertToUInt32", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result != firstOp[0]"}), - ("ExtractVector128Test.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != firstOp[16]", ["ValidateRemainingResults"] = "(result[i] != firstOp[i + 16])"}), - ("ExtractVector128Test.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != firstOp[16]", ["ValidateRemainingResults"] = "(result[i] != firstOp[i + 16])"}), - ("ExtractVector128Test.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != firstOp[8]", ["ValidateRemainingResults"] = "(result[i] != firstOp[i + 8])"}), - ("ExtractVector128Test.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != firstOp[8]", ["ValidateRemainingResults"] = "(result[i] != firstOp[i + 8])"}), - ("ExtractVector128Test.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != firstOp[4]", ["ValidateRemainingResults"] = "(result[i] != firstOp[i + 4])"}), - ("ExtractVector128Test.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != firstOp[4]", ["ValidateRemainingResults"] = "(result[i] != firstOp[i + 4])"}), - ("ExtractVector128Test.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != firstOp[2]", ["ValidateRemainingResults"] = "(result[i] != firstOp[i + 2])"}), - ("ExtractVector128Test.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "result[0] != firstOp[2]", ["ValidateRemainingResults"] = "(result[i] != firstOp[i + 2])"}), - ("InsertVector128Test.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "(i > 15 ? result[i] != right[i - 16] : result[i] != left[i])"}), - ("InsertVector128Test.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "(i > 15 ? result[i] != right[i - 16] : result[i] != left[i])"}), - ("InsertVector128Test.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "(i > 7 ? result[i] != right[i - 8] : result[i] != left[i])"}), - ("InsertVector128Test.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "(i > 7 ? result[i] != right[i - 8] : result[i] != left[i])"}), - ("InsertVector128Test.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "(i > 3 ? result[i] != right[i - 4] : result[i] != left[i])"}), - ("InsertVector128Test.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "(i > 3 ? result[i] != right[i - 4] : result[i] != left[i])"}), - ("InsertVector128Test.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "(i > 1 ? result[i] != right[i - 2] : result[i] != left[i])"}), - ("InsertVector128Test.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "(i > 1 ? result[i] != right[i - 2] : result[i] != left[i])"}), - ("LoadBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "MaskLoad", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != ((right[0] < 0) ? left[0] : 0)", ["ValidateRemainingResults"] = "result[i] != ((right[i] < 0) ? left[i] : 0)"}), - ("LoadBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "MaskLoad", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != (((right[0] & (1U << 31)) != 0) ? left[0] : 0)", ["ValidateRemainingResults"] = "result[i] != (((right[i] & (1U << 31)) != 0) ? left[i] : 0)"}), - ("LoadBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "MaskLoad", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != ((right[0] < 0) ? left[0] : 0)", ["ValidateRemainingResults"] = "result[i] != ((right[i] < 0) ? left[i] : 0)"}), - ("LoadBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "MaskLoad", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "result[0] != (((right[0] & (1UL << 63)) != 0) ? left[0] : 0)", ["ValidateRemainingResults"] = "result[i] != (((right[i] & (1UL << 63)) != 0) ? left[i] : 0)"}), - ("StoreBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "MaskStore", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != ((left[0] < 0) ? right[0] : result[0])", ["ValidateRemainingResults"] = "result[i] != ((left[i] < 0) ? right[i] : result[i])"}), - ("StoreBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "MaskStore", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != (((left[0] & (1U << 31)) != 0) ? right[0] : result[0])", ["ValidateRemainingResults"] = "result[i] != (((left[i] & (1U << 31)) != 0) ? right[i] : result[i])"}), - ("StoreBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "MaskStore", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != ((left[0] < 0) ? right[0] : result[0])", ["ValidateRemainingResults"] = "result[i] != ((left[i] < 0) ? right[i] : result[i])"}), - ("StoreBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "MaskStore", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "result[0] != (((left[0] & (1UL << 63)) != 0) ? right[0] : result[0])", ["ValidateRemainingResults"] = "result[i] != (((left[i] & (1UL << 63)) != 0) ? right[i] : result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Max", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != Math.Max(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Max(left[i], right[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Max", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != Math.Max(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Max(left[i], right[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Max", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != Math.Max(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Max(left[i], right[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Max", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != Math.Max(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Max(left[i], right[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Max", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != Math.Max(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Max(left[i], right[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Max", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != Math.Max(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Max(left[i], right[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Min", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != Math.Min(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Min(left[i], right[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Min", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != Math.Min(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Min(left[i], right[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Min", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != Math.Min(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Min(left[i], right[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Min", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != Math.Min(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Min(left[i], right[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Min", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != Math.Min(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Min(left[i], right[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Min", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != Math.Min(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Min(left[i], right[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "MultiplyAddAdjacent", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != Math.Clamp(((right[1] * left[1]) + (right[0] * left[0])), short.MinValue, short.MaxValue)", ["ValidateRemainingResults"] = "result[i] != Math.Clamp(((right[(i * 2) + 1] * left[(i * 2) + 1]) + (right[i * 2] * left[i * 2])), short.MinValue, short.MaxValue)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "MultiplyAddAdjacent", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != Math.Clamp(((right[1] * left[1]) + (right[0] * left[0])), int.MinValue, int.MaxValue)", ["ValidateRemainingResults"] = "result[i] != Math.Clamp(((right[(i * 2) + 1] * left[(i * 2) + 1]) + (right[i * 2] * left[i * 2])), int.MinValue, int.MaxValue)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "MultiplyHighRoundScale", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != (short)((((left[0] * right[0]) >> 14) + 1) >> 1)", ["ValidateRemainingResults"] = "result[i] != (short)((((left[i] * right[i]) >> 14) + 1) >> 1)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "MultiplyHigh", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != BitConverter.ToInt16(BitConverter.GetBytes((((int)(left[0])) * right[0]) >> 16), 0)", ["ValidateRemainingResults"] = "result[i] != BitConverter.ToInt16(BitConverter.GetBytes((((int)(left[i])) * right[i]) >> 16), 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "MultiplyHigh", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != BitConverter.ToUInt16(BitConverter.GetBytes((((uint)(left[0])) * right[0]) >> 16), 0)", ["ValidateRemainingResults"] = "result[i] != BitConverter.ToUInt16(BitConverter.GetBytes((((uint)(left[i])) * right[i]) >> 16), 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "MultiplyLow", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] ="Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != BitConverter.ToInt32(BitConverter.GetBytes(((long)(left[0])) * right[0]), 0)", ["ValidateRemainingResults"] = "result[i] != BitConverter.ToInt32(BitConverter.GetBytes(((long)(left[i])) * right[i]), 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "MultiplyLow", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] ="Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != BitConverter.ToInt16(BitConverter.GetBytes(((int)(left[0])) * right[0]), 0)", ["ValidateRemainingResults"] = "result[i] != BitConverter.ToInt16(BitConverter.GetBytes(((int)(left[i])) * right[i]), 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "MultiplyLow", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] ="Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != BitConverter.ToUInt32(BitConverter.GetBytes(((ulong)(left[0])) * right[0]), 0)", ["ValidateRemainingResults"] = "result[i] != BitConverter.ToUInt32(BitConverter.GetBytes(((ulong)(left[i])) * right[i]), 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "MultiplyLow", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] ="Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != BitConverter.ToUInt16(BitConverter.GetBytes(((uint)(left[0])) * right[0]), 0)", ["ValidateRemainingResults"] = "result[i] != BitConverter.ToUInt16(BitConverter.GetBytes(((uint)(left[i])) * right[i]), 0)"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "MultipleSumAbsoluteDifferences",["RetVectorType"]="Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Byte", ["Imm"] = "0", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != (Math.Abs(left[0]-right[0])+Math.Abs(left[1]-right[1])+Math.Abs(left[2]-right[2])+Math.Abs(left[3]-right[3]))", ["ValidateRemainingResults"] = "result[i] != Math.Abs(left[i%8+(i>7?16:0)]-right[0+(i>7?16:0)])+Math.Abs(left[i%8+1+(i>7?16:0)]-right[1+(i>7?16:0)])+Math.Abs(left[i%8+2+(i>7?16:0)]-right[2+(i>7?16:0)])+Math.Abs(left[i%8+3+(i>7?16:0)]-right[3+(i>7?16:0)])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Or", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(byte)(left[0] | right[0]) != result[0]", ["ValidateRemainingResults"] = "(byte)(left[i] | right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Or", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(left[0] | right[0]) != result[0]", ["ValidateRemainingResults"] = "(short)(left[i] | right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Or", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(left[0] | right[0]) != result[0]", ["ValidateRemainingResults"] = "(int)(left[i] | right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Or", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(long)(left[0] | right[0]) != result[0]", ["ValidateRemainingResults"] = "(long)(left[i] | right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Or", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "(sbyte)(left[0] | right[0]) != result[0]", ["ValidateRemainingResults"] = "(sbyte)(left[i] | right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Or", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(ushort)(left[0] | right[0]) != result[0]", ["ValidateRemainingResults"] = "(ushort)(left[i] | right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Or", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(uint)(left[0] | right[0]) != result[0]", ["ValidateRemainingResults"] = "(uint)(left[i] | right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Or", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(ulong)(left[0] | right[0]) != result[0]", ["ValidateRemainingResults"] = "(ulong)(left[i] | right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "PackUnsignedSaturate", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != (ushort)Math.Clamp(left[0], ushort.MinValue, ushort.MaxValue)", ["ValidateRemainingResults"] = "result[i] != (i < 4 ? (ushort)Math.Clamp(left[i], ushort.MinValue, ushort.MaxValue) : (i < 8 && i > 3 ? (ushort)Math.Clamp(right[i%4], ushort.MinValue, ushort.MaxValue) : (i < 12 && i > 7 ? (ushort)Math.Clamp(left[i-4], ushort.MinValue, ushort.MaxValue) : (ushort)Math.Clamp(right[i-8], ushort.MinValue, ushort.MaxValue))))"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "PackUnsignedSaturate", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != (byte)Math.Clamp(left[0], byte.MinValue, byte.MaxValue)", ["ValidateRemainingResults"] = "result[i] != (i < 8 ? (byte)Math.Clamp(left[i], byte.MinValue, byte.MaxValue) : (i < 16 && i > 7 ? (byte)Math.Clamp(right[i%8], byte.MinValue, byte.MaxValue) : (i < 24 && i > 15 ? (byte)Math.Clamp(left[i-8], byte.MinValue, byte.MaxValue) : (byte)Math.Clamp(right[i-16], byte.MinValue, byte.MaxValue))))"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "PackSignedSaturate", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != (short)Math.Clamp(left[0], short.MinValue, short.MaxValue)", ["ValidateRemainingResults"] = "result[i] != (i < 4 ? (short)Math.Clamp(left[i], short.MinValue, short.MaxValue) : (i < 8 && i > 3 ? (short)Math.Clamp(right[i%4], short.MinValue, short.MaxValue) : (i < 12 && i > 7 ? (short)Math.Clamp(left[i-4], short.MinValue, short.MaxValue) : (short)Math.Clamp(right[i-8], short.MinValue, short.MaxValue))))"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "PackSignedSaturate", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != (sbyte)Math.Clamp(left[0], sbyte.MinValue, sbyte.MaxValue)", ["ValidateRemainingResults"] = "result[i] != (i < 8 ? (sbyte)Math.Clamp(left[i], sbyte.MinValue, sbyte.MaxValue) : (i < 16 && i > 7 ? (sbyte)Math.Clamp(right[i%8], sbyte.MinValue, sbyte.MaxValue) : (i < 24 && i > 15 ? (sbyte)Math.Clamp(left[i-8], sbyte.MinValue, sbyte.MaxValue) : (sbyte)Math.Clamp(right[i-16], sbyte.MinValue, sbyte.MaxValue))))"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Permute2x128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "i > 3 ? (result[i] != left[i - 4]) : (result[i] != right[i])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Permute2x128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "i > 3 ? (result[i] != left[i - 4]) : (result[i] != right[i])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Permute2x128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int64", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "i > 1 ? (result[i] != left[i - 2]) : (result[i] != right[i])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Permute2x128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt64", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "i > 1 ? (result[i] != left[i - 2]) : (result[i] != right[i])"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Permute4x64", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Imm"] = "85", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(firstOp[1]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(firstOp[1]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Permute4x64", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Imm"] = "85", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "firstOp[1] != result[0]", ["ValidateRemainingResults"] = "firstOp[1] != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Permute4x64", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Imm"] = "85", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "firstOp[1] != result[0]", ["ValidateRemainingResults"] = "firstOp[1] != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "PermuteVar8x32", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "left[(right[0] & 7)] != result[0]", ["ValidateRemainingResults"] = "left[(right[i] & 7)] != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "PermuteVar8x32", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "left[(right[0] & (uint)7)] != result[0]", ["ValidateRemainingResults"] = "left[(right[i] & (uint)7)] != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "PermuteVar8x32", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(left[(right[0] & 7)]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[(right[i] & 7)]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(firstOp[0] << 1) != result[0]", ["ValidateRemainingResults"] = "(short)(firstOp[i] << 1) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(ushort)(firstOp[0] << 1) != result[0]", ["ValidateRemainingResults"] = "(ushort)(firstOp[i] << 1) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(firstOp[0] << 1) != result[0]", ["ValidateRemainingResults"] = "(int)(firstOp[i] << 1) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(uint)(firstOp[0] << 1) != result[0]", ["ValidateRemainingResults"] = "(uint)(firstOp[i] << 1) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(long)(firstOp[0] << 1) != result[0]", ["ValidateRemainingResults"] = "(long)(firstOp[i] << 1) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(ulong)(firstOp[0] << 1) != result[0]", ["ValidateRemainingResults"] = "(ulong)(firstOp[i] << 1) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Imm"] = "16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Imm"] = "16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Imm"] = "32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Imm"] = "32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0!= result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Imm"] = "64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Imm"] = "64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftLeftLogical128BitLane", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "(sbyte)8", ["ValidateFirstResult"] = "result[0] != 0", ["ValidateRemainingResults"] = "(i == 16 ? result[i] != 0 : result[i] != 8)"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftLeftLogical128BitLane", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "(byte)8", ["ValidateFirstResult"] = "result[0] != 0", ["ValidateRemainingResults"] = "(i == 16 ? result[i] != 0 : result[i] != 8)"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftLeftLogical128BitLane", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "(short)8", ["ValidateFirstResult"] = "result[0] != 2048", ["ValidateRemainingResults"] = "result[i] != 2048"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftLeftLogical128BitLane", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "(ushort)8", ["ValidateFirstResult"] = "result[0] != 2048", ["ValidateRemainingResults"] = "result[i] != 2048"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftLeftLogical128BitLane", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "(int)8", ["ValidateFirstResult"] = "result[0] != 2048", ["ValidateRemainingResults"] = "result[i] != 2048"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftLeftLogical128BitLane", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "(uint)8", ["ValidateFirstResult"] = "result[0] != 2048", ["ValidateRemainingResults"] = "result[i] != 2048"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftLeftLogical128BitLane", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "(long)8", ["ValidateFirstResult"] = "result[0] != 2048", ["ValidateRemainingResults"] = "result[i] != 2048"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftLeftLogical128BitLane", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "(ulong)8", ["ValidateFirstResult"] = "result[0] != 2048", ["ValidateRemainingResults"] = "result[i] != 2048"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(firstOp[0] >> 1) != result[0]", ["ValidateRemainingResults"] = "(short)(firstOp[i] >> 1) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(firstOp[0] >> 1) != result[0]", ["ValidateRemainingResults"] = "(int)(firstOp[i] >> 1) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Imm"] = "16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(firstOp[0] >> 15) != result[0]", ["ValidateRemainingResults"] = "(short)(firstOp[i] >> 15) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Imm"] = "32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(firstOp[0] >> 31) != result[0]", ["ValidateRemainingResults"] = "(int)(firstOp[i] >> 31) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftRightArithmeticVariable",["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "(TestLibrary.Generator.GetUInt32()%32)", ["ValidateFirstResult"] = "(int)(left[0] >> (int)right[0]) != result[0]", ["ValidateRemainingResults"] = "(int)(left[i] >> (int)right[i]) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(firstOp[0] >> 1) != result[0]", ["ValidateRemainingResults"] = "(short)(firstOp[i] >> 1) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(ushort)(firstOp[0] >> 1) != result[0]", ["ValidateRemainingResults"] = "(ushort)(firstOp[i] >> 1) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(firstOp[0] >> 1) != result[0]", ["ValidateRemainingResults"] = "(int)(firstOp[i] >> 1) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(uint)(firstOp[0] >> 1) != result[0]", ["ValidateRemainingResults"] = "(uint)(firstOp[i] >> 1) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(long)(firstOp[0] >> 1) != result[0]", ["ValidateRemainingResults"] = "(long)(firstOp[i] >> 1) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(ulong)(firstOp[0] >> 1) != result[0]", ["ValidateRemainingResults"] = "(ulong)(firstOp[i] >> 1) != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Imm"] = "16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Imm"] = "16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Imm"] = "32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Imm"] = "32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0!= result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Imm"] = "64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Imm"] = "64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftRightLogical128BitLane", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "(sbyte)8", ["ValidateFirstResult"] = "result[0] != 8", ["ValidateRemainingResults"] = "(i == 31 || i == 15 ? result[i] != 0 : result[i] != 8)"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftRightLogical128BitLane", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "(byte)8", ["ValidateFirstResult"] = "result[0] != 8", ["ValidateRemainingResults"] = "(i == 31 || i == 15 ? result[i] != 0 : result[i] != 8)"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftRightLogical128BitLane", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "(short)8", ["ValidateFirstResult"] = "result[0] != 2048", ["ValidateRemainingResults"] = "(i == 7 || i == 15 ? result[i] != 0 : result[i] != 2048)"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftRightLogical128BitLane", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "(ushort)8", ["ValidateFirstResult"] = "result[0] != 2048", ["ValidateRemainingResults"] = "(i == 7 || i == 15 ? result[i] != 0 : result[i] != 2048)"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftRightLogical128BitLane", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "(int)8", ["ValidateFirstResult"] = "result[0] != 134217728", ["ValidateRemainingResults"] = "(i == 3 || i == 7 ? result[i] != 0 : result[i] != 134217728)"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftRightLogical128BitLane", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "(uint)8", ["ValidateFirstResult"] = "result[0] != 134217728", ["ValidateRemainingResults"] = "(i == 3 || i == 7 ? result[i] != 0 : result[i] != 134217728)"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftRightLogical128BitLane", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "(long)8", ["ValidateFirstResult"] = "result[0] != 576460752303423488L", ["ValidateRemainingResults"] = "(i == 2 ? result[i] != 576460752303423488L : result[i] != 0)"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShiftRightLogical128BitLane", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "(ulong)8", ["ValidateFirstResult"] = "result[0] != 576460752303423488UL", ["ValidateRemainingResults"] = "(i == 2 ? result[i] != 576460752303423488UL : result[i] != 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Sign", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != (right[0] < 0 ? (sbyte)(-left[0]) : (right[0] > 0 ? left[0] : 0))", ["ValidateRemainingResults"] = "result[i] != (right[i] < 0 ? (sbyte)(-left[i]) : (right[i] > 0 ? left[i] : 0))"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Sign", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != (right[0] < 0 ? (short)(-left[0]) : (right[0] > 0 ? left[0] : 0))", ["ValidateRemainingResults"] = "result[i] != (right[i] < 0 ? (short)(-left[i]) : (right[i] > 0 ? left[i] : 0))"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Sign", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != (right[0] < 0 ? (int)(-left[0]) : (right[0] > 0 ? left[0] : 0))", ["ValidateRemainingResults"] = "result[i] != (right[i] < 0 ? (int)(-left[i]) : (right[i] > 0 ? left[i] : 0))"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Shuffle", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != ((right[0] > 127) ? 0 : left[right[0] & 0x0F])", ["ValidateRemainingResults"] = "result[i] != (i < 16 ? (right[i] > 127 ? 0 : left[right[i] & 0x0F]) : (right[i] > 127 ? 0 : left[(right[i] & 0x0F) + 16]))"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Shuffle", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != ((right[0] < 0) ? 0 : left[right[0] & 0x0F])", ["ValidateRemainingResults"] = "result[i] != (i < 16 ? (right[i] < 0 ? 0 : left[right[i] & 0x0F]) : (right[i] < 0 ? 0 : left[(right[i] & 0x0F) + 16]))"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Shuffle", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != firstOp[1]", ["ValidateRemainingResults"] = "result[i] != (i < 4 ? firstOp[0] : (i == 4 ? firstOp[5] : firstOp[4]))"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Shuffle", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != firstOp[1]", ["ValidateRemainingResults"] = "result[i] != (i < 4 ? firstOp[0] : (i == 4 ? firstOp[5] : firstOp[4]))"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShuffleHigh", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Imm"] = "228", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != firstOp[0]", ["ValidateRemainingResults"] = "result[i] != firstOp[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShuffleHigh", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Imm"] = "228", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != firstOp[0]", ["ValidateRemainingResults"] = "result[i] != firstOp[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShuffleLow", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Imm"] = "228", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != firstOp[0]", ["ValidateRemainingResults"] = "result[i] != firstOp[i]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "ShuffleLow", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Imm"] = "228", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != firstOp[0]", ["ValidateRemainingResults"] = "result[i] != firstOp[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "SumAbsoluteDifferences", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != Math.Abs(left[0] - right[0]) + Math.Abs(left[1] - right[1]) + Math.Abs(left[2] - right[2]) + Math.Abs(left[3] - right[3]) + Math.Abs(left[4] - right[4]) + Math.Abs(left[5] - right[5]) + Math.Abs(left[6] - right[6]) + Math.Abs(left[7] - right[7])", ["ValidateRemainingResults"] = "result[i] != ((i % 4 != 0) ? 0 : Math.Abs(left[(i/4)*8] - right[(i/4)*8]) + Math.Abs(left[(i/4)*8+1] - right[(i/4)*8+1]) + Math.Abs(left[(i/4)*8+2] - right[(i/4)*8+2]) + Math.Abs(left[(i/4)*8+3] - right[(i/4)*8+3]) + Math.Abs(left[(i/4)*8+4] - right[(i/4)*8+4]) + Math.Abs(left[(i/4)*8+5] - right[(i/4)*8+5]) + Math.Abs(left[(i/4)*8+6] - right[(i/4)*8+6]) + Math.Abs(left[(i/4)*8+7] - right[(i/4)*8+7]))"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Subtract", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(byte)(left[0] - right[0]) != result[0]", ["ValidateRemainingResults"] = "(byte)(left[i] - right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Subtract", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(left[0] - right[0]) != result[0]", ["ValidateRemainingResults"] = "(short)(left[i] - right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Subtract", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(left[0] - right[0]) != result[0]", ["ValidateRemainingResults"] = "(int)(left[i] - right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Subtract", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(long)(left[0] - right[0]) != result[0]", ["ValidateRemainingResults"] = "(long)(left[i] - right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Subtract", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "(sbyte)(left[0] - right[0]) != result[0]", ["ValidateRemainingResults"] = "(sbyte)(left[i] - right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Subtract", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(ushort)(left[0] - right[0]) != result[0]", ["ValidateRemainingResults"] = "(ushort)(left[i] - right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Subtract", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(uint)(left[0] - right[0]) != result[0]", ["ValidateRemainingResults"] = "(uint)(left[i] - right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Subtract", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(ulong)(left[0] - right[0]) != result[0]", ["ValidateRemainingResults"] = "(ulong)(left[i] - right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Xor", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(byte)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(byte)(left[i] ^ right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Xor", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(short)(left[i] ^ right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Xor", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(int)(left[i] ^ right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Xor", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(long)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(long)(left[i] ^ right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Xor", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "(sbyte)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(sbyte)(left[i] ^ right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Xor", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(ushort)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(ushort)(left[i] ^ right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Xor", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(uint)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(uint)(left[i] ^ right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Xor", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(ulong)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(ulong)(left[i] ^ right[i]) != result[i]"}), -}; - -private static readonly (string templateFileName, Dictionary templateData)[] Avx2_Vector128Inputs = new [] -{ - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "Blend", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != (((1 & (1 << 0)) == 0) ? left[0] : right[0])", ["ValidateRemainingResults"] = "result[i] != (((1 & (1 << i)) == 0) ? left[i] : right[i])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "Blend", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != (((2 & (1 << 0)) == 0) ? left[0] : right[0])", ["ValidateRemainingResults"] = "result[i] != (((2 & (1 << i)) == 0) ? left[i] : right[i])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "Blend", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["Imm"] = "4", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != (((4 & (1 << 0)) == 0) ? left[0] : right[0])", ["ValidateRemainingResults"] = "result[i] != (((4 & (1 << i)) == 0) ? left[i] : right[i])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "Blend", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["Imm"] = "85", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != (((85 & (1 << 0)) == 0) ? left[0] : right[0])", ["ValidateRemainingResults"] = "result[i] != (((85 & (1 << i)) == 0) ? left[i] : right[i])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "Blend", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != (((1 & (1 << 0)) == 0) ? left[0] : right[0])", ["ValidateRemainingResults"] = "result[i] != (((1 & (1 << i)) == 0) ? left[i] : right[i])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "Blend", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != (((2 & (1 << 0)) == 0) ? left[0] : right[0])", ["ValidateRemainingResults"] = "result[i] != (((2 & (1 << i)) == 0) ? left[i] : right[i])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "Blend", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["Imm"] = "4", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != (((4 & (1 << 0)) == 0) ? left[0] : right[0])", ["ValidateRemainingResults"] = "result[i] != (((4 & (1 << i)) == 0) ? left[i] : right[i])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "Blend", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["Imm"] = "85", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != (((85 & (1 << 0)) == 0) ? left[0] : right[0])", ["ValidateRemainingResults"] = "result[i] != (((85 & (1 << i)) == 0) ? left[i] : right[i])"}), - ("LoadBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "MaskLoad", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != ((right[0] < 0) ? left[0] : 0)", ["ValidateRemainingResults"] = "result[i] != ((right[i] < 0) ? left[i] : 0)"}), - ("LoadBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "MaskLoad", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != (((right[0] & (1U << 31)) != 0) ? left[0] : 0)", ["ValidateRemainingResults"] = "result[i] != (((right[i] & (1U << 31)) != 0) ? left[i] : 0)"}), - ("LoadBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "MaskLoad", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != ((right[0] < 0) ? left[0] : 0)", ["ValidateRemainingResults"] = "result[i] != ((right[i] < 0) ? left[i] : 0)"}), - ("LoadBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "MaskLoad", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "result[0] != (((right[0] & (1UL << 63)) != 0) ? left[0] : 0)", ["ValidateRemainingResults"] = "result[i] != (((right[i] & (1UL << 63)) != 0) ? left[i] : 0)"}), - ("StoreBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "MaskStore", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != ((left[0] < 0) ? right[0] : result[0])", ["ValidateRemainingResults"] = "result[i] != ((left[i] < 0) ? right[i] : result[i])"}), - ("StoreBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "MaskStore", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != (((left[0] & (1U << 31)) != 0) ? right[0] : result[0])", ["ValidateRemainingResults"] = "result[i] != (((left[i] & (1U << 31)) != 0) ? right[i] : result[i])"}), - ("StoreBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "MaskStore", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != ((left[0] < 0) ? right[0] : result[0])", ["ValidateRemainingResults"] = "result[i] != ((left[i] < 0) ? right[i] : result[i])"}), - ("StoreBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "MaskStore", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "result[0] != (((left[0] & (1UL << 63)) != 0) ? right[0] : result[0])", ["ValidateRemainingResults"] = "result[i] != (((left[i] & (1UL << 63)) != 0) ? right[i] : result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Sse2", ["Method"] = "ShiftRightArithmeticVariable",["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "(TestLibrary.Generator.GetUInt32() % 32)", ["ValidateFirstResult"] = "(int)(left[0] >> (int)right[0]) != result[0]", ["ValidateRemainingResults"] = "(int)(left[i] >> (int)right[i]) != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["Method"] = "BroadcastScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(firstOp[0] != result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["Method"] = "BroadcastScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(firstOp[0] != result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["Method"] = "BroadcastScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(firstOp[0] != result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["Method"] = "BroadcastScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(firstOp[0] != result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["Method"] = "BroadcastScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(firstOp[0] != result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["Method"] = "BroadcastScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(firstOp[0] != result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["Method"] = "BroadcastScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(firstOp[0] != result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["Method"] = "BroadcastScalarToVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(firstOp[0] != result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["Method"] = "BroadcastScalarToVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(firstOp[0] != result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["Method"] = "BroadcastScalarToVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(firstOp[0] != result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["Method"] = "BroadcastScalarToVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(firstOp[0] != result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["Method"] = "BroadcastScalarToVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(firstOp[0] != result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["Method"] = "BroadcastScalarToVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(firstOp[0] != result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["Method"] = "BroadcastScalarToVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(firstOp[0] != result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["Method"] = "BroadcastScalarToVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(firstOp[0] != result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["Method"] = "BroadcastScalarToVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "(firstOp[0] != result[i])"}), -}; - -private static readonly (string templateFileName, Dictionary templateData)[] Fma_Vector128Inputs = new [] -{ - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Fma", ["LoadIsa"] = "Sse2", ["Method"] = "MultiplyAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp3"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Math.Round((firstOp[0] * secondOp[0]) + thirdOp[0], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[0], 9))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(Math.Round((firstOp[i] * secondOp[i]) + thirdOp[i], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[i], 9))"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Fma", ["LoadIsa"] = "Sse", ["Method"] = "MultiplyAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(MathF.Round((firstOp[0] * secondOp[0]) + thirdOp[0], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[0], 3))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(MathF.Round((firstOp[i] * secondOp[i]) + thirdOp[i], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[i], 3))"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Fma", ["LoadIsa"] = "Sse2", ["Method"] = "MultiplyAddNegated", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp3"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Math.Round(-(firstOp[0] * secondOp[0]) + thirdOp[0], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[0], 9))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(Math.Round(-(firstOp[i] * secondOp[i]) + thirdOp[i], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[i], 9))"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Fma", ["LoadIsa"] = "Sse", ["Method"] = "MultiplyAddNegated", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(MathF.Round(-(firstOp[0] * secondOp[0]) + thirdOp[0], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[0], 3))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(MathF.Round(-(firstOp[i] * secondOp[i]) + thirdOp[i], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[i], 3))"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Fma", ["LoadIsa"] = "Sse2", ["Method"] = "MultiplyAddNegatedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp3"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Math.Round(-(firstOp[0] * secondOp[0]) + thirdOp[0], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[0], 9))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(firstOp[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Fma", ["LoadIsa"] = "Sse", ["Method"] = "MultiplyAddNegatedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(MathF.Round(-(firstOp[0] * secondOp[0]) + thirdOp[0], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[0], 3))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(firstOp[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Fma", ["LoadIsa"] = "Sse2", ["Method"] = "MultiplyAddScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp3"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Math.Round((firstOp[0] * secondOp[0]) + thirdOp[0], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[0], 9))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(firstOp[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Fma", ["LoadIsa"] = "Sse", ["Method"] = "MultiplyAddScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(MathF.Round((firstOp[0] * secondOp[0]) + thirdOp[0], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[0], 3))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(firstOp[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("AlternatingTernOpTest.template", new Dictionary { ["Isa"] = "Fma", ["LoadIsa"] = "Sse2", ["Method"] = "MultiplyAddSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp3"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Math.Round((firstOp[i] * secondOp[i]) - thirdOp[i], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[i], 9))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(Math.Round((firstOp[i + 1] * secondOp[i + 1]) + thirdOp[i + 1], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[i + 1], 9))"}), - ("AlternatingTernOpTest.template", new Dictionary { ["Isa"] = "Fma", ["LoadIsa"] = "Sse", ["Method"] = "MultiplyAddSubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(MathF.Round((firstOp[i] * secondOp[i]) - thirdOp[i], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[i], 3))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(MathF.Round((firstOp[i + 1] * secondOp[i + 1]) + thirdOp[i + 1], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[i + 1], 3))"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Fma", ["LoadIsa"] = "Sse2", ["Method"] = "MultiplySubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp3"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Math.Round((firstOp[0] * secondOp[0]) - thirdOp[0], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[0], 9))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(Math.Round((firstOp[i] * secondOp[i]) - thirdOp[i], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[i], 9))"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Fma", ["LoadIsa"] = "Sse", ["Method"] = "MultiplySubtract", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(MathF.Round((firstOp[0] * secondOp[0]) - thirdOp[0], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[0], 3))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(MathF.Round((firstOp[i] * secondOp[i]) - thirdOp[i], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[i], 3))"}), - ("AlternatingTernOpTest.template", new Dictionary { ["Isa"] = "Fma", ["LoadIsa"] = "Sse2", ["Method"] = "MultiplySubtractAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp3"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Math.Round((firstOp[i] * secondOp[i]) + thirdOp[i], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[i], 9))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(Math.Round((firstOp[i + 1] * secondOp[i + 1]) - thirdOp[i + 1], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[i + 1], 9))"}), - ("AlternatingTernOpTest.template", new Dictionary { ["Isa"] = "Fma", ["LoadIsa"] = "Sse", ["Method"] = "MultiplySubtractAdd", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(MathF.Round((firstOp[i] * secondOp[i]) + thirdOp[i], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[i], 3))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(MathF.Round((firstOp[i + 1] * secondOp[i + 1]) - thirdOp[i + 1], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[i + 1], 3))"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Fma", ["LoadIsa"] = "Sse2", ["Method"] = "MultiplySubtractNegated", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp3"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Math.Round(-(firstOp[0] * secondOp[0]) - thirdOp[0], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[0], 9))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(Math.Round(-(firstOp[i] * secondOp[i]) - thirdOp[i], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[i], 9))"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Fma", ["LoadIsa"] = "Sse", ["Method"] = "MultiplySubtractNegated", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(MathF.Round(-(firstOp[0] * secondOp[0]) - thirdOp[0], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[0], 3))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(MathF.Round(-(firstOp[i] * secondOp[i]) - thirdOp[i], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[i], 3))"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Fma", ["LoadIsa"] = "Sse2", ["Method"] = "MultiplySubtractNegatedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp3"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Math.Round(-(firstOp[0] * secondOp[0]) - thirdOp[0], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[0], 9))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(firstOp[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Fma", ["LoadIsa"] = "Sse", ["Method"] = "MultiplySubtractNegatedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(MathF.Round(-(firstOp[0] * secondOp[0]) - thirdOp[0], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[0], 3))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(firstOp[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Fma", ["LoadIsa"] = "Sse2", ["Method"] = "MultiplySubtractScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp3"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Math.Round((firstOp[0] * secondOp[0]) - thirdOp[0], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[0], 9))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(firstOp[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Fma", ["LoadIsa"] = "Sse", ["Method"] = "MultiplySubtractScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(MathF.Round((firstOp[0] * secondOp[0]) - thirdOp[0], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[0], 3))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(firstOp[i]) != BitConverter.SingleToInt32Bits(result[i])"}), -}; - -private static readonly (string templateFileName, Dictionary templateData)[] Fma_Vector256Inputs = new [] -{ - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Fma", ["LoadIsa"] = "Avx", ["Method"] = "MultiplyAdd", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector256", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp3"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Math.Round((firstOp[0] * secondOp[0]) + thirdOp[0], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[0], 9))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(Math.Round((firstOp[i] * secondOp[i]) + thirdOp[i], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[i], 9))"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Fma", ["LoadIsa"] = "Avx", ["Method"] = "MultiplyAdd", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector256", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(MathF.Round((firstOp[0] * secondOp[0]) + thirdOp[0], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[0], 3))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(MathF.Round((firstOp[i] * secondOp[i]) + thirdOp[i], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[i], 3))"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Fma", ["LoadIsa"] = "Avx", ["Method"] = "MultiplyAddNegated", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector256", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp3"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Math.Round(-(firstOp[0] * secondOp[0]) + thirdOp[0], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[0], 9))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(Math.Round(-(firstOp[i] * secondOp[i]) + thirdOp[i], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[i], 9))"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Fma", ["LoadIsa"] = "Avx", ["Method"] = "MultiplyAddNegated", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector256", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(MathF.Round(-(firstOp[0] * secondOp[0]) + thirdOp[0], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[0], 3))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(MathF.Round(-(firstOp[i] * secondOp[i]) + thirdOp[i], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[i], 3))"}), - ("AlternatingTernOpTest.template", new Dictionary { ["Isa"] = "Fma", ["LoadIsa"] = "Avx", ["Method"] = "MultiplyAddSubtract", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector256", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp3"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Math.Round((firstOp[i] * secondOp[i]) - thirdOp[i], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[i], 9))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(Math.Round((firstOp[i + 1] * secondOp[i + 1]) + thirdOp[i + 1], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[i + 1], 9))"}), - ("AlternatingTernOpTest.template", new Dictionary { ["Isa"] = "Fma", ["LoadIsa"] = "Avx", ["Method"] = "MultiplyAddSubtract", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector256", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(MathF.Round((firstOp[i] * secondOp[i]) - thirdOp[i], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[i], 3))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(MathF.Round((firstOp[i + 1] * secondOp[i + 1]) + thirdOp[i + 1], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[i + 1], 3))"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Fma", ["LoadIsa"] = "Avx", ["Method"] = "MultiplySubtract", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector256", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp3"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Math.Round((firstOp[0] * secondOp[0]) - thirdOp[0], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[0], 9))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(Math.Round((firstOp[i] * secondOp[i]) - thirdOp[i], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[i], 9))"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Fma", ["LoadIsa"] = "Avx", ["Method"] = "MultiplySubtract", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector256", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(MathF.Round((firstOp[0] * secondOp[0]) - thirdOp[0], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[0], 3))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(MathF.Round((firstOp[i] * secondOp[i]) - thirdOp[i], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[i], 3))"}), - ("AlternatingTernOpTest.template", new Dictionary { ["Isa"] = "Fma", ["LoadIsa"] = "Avx", ["Method"] = "MultiplySubtractAdd", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector256", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp3"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Math.Round((firstOp[i] * secondOp[i]) + thirdOp[i], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[i], 9))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(Math.Round((firstOp[i + 1] * secondOp[i + 1]) - thirdOp[i + 1], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[i + 1], 9))"}), - ("AlternatingTernOpTest.template", new Dictionary { ["Isa"] = "Fma", ["LoadIsa"] = "Avx", ["Method"] = "MultiplySubtractAdd", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector256", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(MathF.Round((firstOp[i] * secondOp[i]) + thirdOp[i], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[i], 3))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(MathF.Round((firstOp[i + 1] * secondOp[i + 1]) - thirdOp[i + 1], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[i + 1], 3))"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Fma", ["LoadIsa"] = "Avx", ["Method"] = "MultiplySubtractNegated", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector256", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp3"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Math.Round(-(firstOp[0] * secondOp[0]) - thirdOp[0], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[0], 9))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(Math.Round(-(firstOp[i] * secondOp[i]) - thirdOp[i], 9)) != BitConverter.DoubleToInt64Bits(Math.Round(result[i], 9))"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Fma", ["LoadIsa"] = "Avx", ["Method"] = "MultiplySubtractNegated", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector256", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(MathF.Round(-(firstOp[0] * secondOp[0]) - thirdOp[0], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[0], 3))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(MathF.Round(-(firstOp[i] * secondOp[i]) - thirdOp[i], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[i], 3))"}), -}; - -private static readonly (string templateFileName, Dictionary templateData)[] Bmi1Inputs = new [] -{ - ("ScalarBinOpTest.template", new Dictionary { ["Isa"] = "Bmi1", ["Method"] = "AndNot", ["RetBaseType"] = "UInt32", ["Op1BaseType"] = "UInt32", ["Op2BaseType"] = "UInt32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateResult"] = "isUnexpectedResult = ((~left & right) != result);" }), - ("ScalarUnOpTest.template", new Dictionary { ["Isa"] = "Bmi1", ["Method"] = "ExtractLowestSetBit", ["RetBaseType"] = "UInt32", ["Op1BaseType"] = "UInt32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateResult"] = "isUnexpectedResult = ((unchecked((uint)(-(int)data)) & data) != result);" }), - ("ScalarUnOpTest.template", new Dictionary { ["Isa"] = "Bmi1", ["Method"] = "GetMaskUpToLowestSetBit", ["RetBaseType"] = "UInt32", ["Op1BaseType"] = "UInt32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateResult"] = "isUnexpectedResult = (((data - 1) ^ data) != result);" }), - ("ScalarUnOpTest.template", new Dictionary { ["Isa"] = "Bmi1", ["Method"] = "ResetLowestSetBit", ["RetBaseType"] = "UInt32", ["Op1BaseType"] = "UInt32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateResult"] = "isUnexpectedResult = (((data - 1) & data) != result);" }), - ("ScalarUnOpTest.template", new Dictionary { ["Isa"] = "Bmi1", ["Method"] = "TrailingZeroCount", ["RetBaseType"] = "UInt32", ["Op1BaseType"] = "UInt32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateResult"] = "uint expectedResult = 0; for (int index = 0; ((data >> index) & 1) == 0; index++) { expectedResult++; } isUnexpectedResult = (expectedResult != result);" }), - ("ScalarTernOpTest.template",new Dictionary { ["Isa"] = "Bmi1", ["Method"] = "BitFieldExtract", ["RetBaseType"] = "UInt32", ["Op1BaseType"] = "UInt32", ["Op2BaseType"] = "Byte", ["Op3BaseType"] = "Byte", ["NextValueOp1"] = "0x1E000000", ["NextValueOp2"] = "25", ["NextValueOp3"] = "4", ["ValidateResult"] = "uint expectedResult = 15; isUnexpectedResult = (expectedResult != result);" }), - ("ScalarBinOpTest.template", new Dictionary { ["Isa"] = "Bmi1", ["Method"] = "BitFieldExtract", ["RetBaseType"] = "UInt32", ["Op1BaseType"] = "UInt32", ["Op2BaseType"] = "UInt16", ["NextValueOp1"] = "0x1E000000", ["NextValueOp2"] = "0x0419", ["ValidateResult"] = "uint expectedResult = 15; isUnexpectedResult = (expectedResult != result);" }), -}; - -private static readonly (string templateFileName, Dictionary templateData)[] Bmi1X64Inputs = new [] -{ - ("ScalarBinOpTest.template", new Dictionary { ["Isa"] = "Bmi1.X64", ["Method"] = "AndNot", ["RetBaseType"] = "UInt64", ["Op1BaseType"] = "UInt64", ["Op2BaseType"] = "UInt64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateResult"] = "isUnexpectedResult = ((~left & right) != result);" }), - ("ScalarUnOpTest.template", new Dictionary { ["Isa"] = "Bmi1.X64", ["Method"] = "ExtractLowestSetBit", ["RetBaseType"] = "UInt64", ["Op1BaseType"] = "UInt64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateResult"] = "isUnexpectedResult = ((unchecked((ulong)(-(long)data)) & data) != result);" }), - ("ScalarUnOpTest.template", new Dictionary { ["Isa"] = "Bmi1.X64", ["Method"] = "GetMaskUpToLowestSetBit", ["RetBaseType"] = "UInt64", ["Op1BaseType"] = "UInt64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateResult"] = "isUnexpectedResult = (((data - 1) ^ data) != result);" }), - ("ScalarUnOpTest.template", new Dictionary { ["Isa"] = "Bmi1.X64", ["Method"] = "ResetLowestSetBit", ["RetBaseType"] = "UInt64", ["Op1BaseType"] = "UInt64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateResult"] = "isUnexpectedResult = (((data - 1) & data) != result);" }), - ("ScalarUnOpTest.template", new Dictionary { ["Isa"] = "Bmi1.X64", ["Method"] = "TrailingZeroCount", ["RetBaseType"] = "UInt64", ["Op1BaseType"] = "UInt64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateResult"] = "ulong expectedResult = 0; for (int index = 0; ((data >> index) & 1) == 0; index++) { expectedResult++; } isUnexpectedResult = (expectedResult != result);" }), - ("ScalarTernOpTest.template",new Dictionary { ["Isa"] = "Bmi1.X64", ["Method"] = "BitFieldExtract", ["RetBaseType"] = "UInt64", ["Op1BaseType"] = "UInt64", ["Op2BaseType"] = "Byte",["Op3BaseType"] = "Byte", ["NextValueOp1"] = "0x1E00000000000000", ["NextValueOp2"] = "57", ["NextValueOp3"] = "4", ["ValidateResult"] = "ulong expectedResult = 15; isUnexpectedResult = (expectedResult != result);" }), - ("ScalarBinOpTest.template", new Dictionary { ["Isa"] = "Bmi1.X64", ["Method"] = "BitFieldExtract", ["RetBaseType"] = "UInt64", ["Op1BaseType"] = "UInt64", ["Op2BaseType"] = "UInt16", ["NextValueOp1"] = "0x1E00000000000000", ["NextValueOp2"] = "0x0439", ["ValidateResult"] = "ulong expectedResult = 15; isUnexpectedResult = (expectedResult != result);" }), -}; - -private static readonly (string templateFileName, Dictionary templateData)[] AesInputs = new [] -{ - ("AesBinOpTest.template", new Dictionary { ["Isa"] = "Aes", ["LoadIsa"] = "Aes", ["Method"] = "Decrypt", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["InputSize"] = "16", ["Input"] = "{0xef, 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0x01, 0xff, 0xee, 0xdd, 0xcc, 0xbb, 0xaa, 0x99, 0x88}", ["KeySize"] = "16", ["Key"] = "{0xff, 0xdd, 0xbb, 0x99, 0x77, 0x55, 0x33, 0x11, 0xee, 0xcc, 0xaa, 0x88, 0x66, 0x44, 0x22, 0x00}", ["ExpectedRetSize"] = "16", ["ExpectedRet"] = "{0x8f, 0xc4, 0xfe, 0x76, 0x51, 0x4f, 0x4e, 0x04, 0xee, 0x39, 0xda, 0x81, 0xa3, 0xcf, 0x7e, 0xb5}"}), - ("AesBinOpTest.template", new Dictionary { ["Isa"] = "Aes", ["LoadIsa"] = "Aes", ["Method"] = "DecryptLast", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["InputSize"] = "16", ["Input"] = "{0xef, 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0x01, 0xff, 0xee, 0xdd, 0xcc, 0xbb, 0xaa, 0x99, 0x88}", ["KeySize"] = "16", ["Key"] = "{0xff, 0xdd, 0xbb, 0x99, 0x77, 0x55, 0x33, 0x11, 0xee, 0xcc, 0xaa, 0x88, 0x66, 0x44, 0x22, 0x00}", ["ExpectedRetSize"] = "16", ["ExpectedRet"] = "{0x9e, 0xbf, 0x72, 0x90, 0x7d, 0xd5, 0xca, 0x36, 0x93, 0xa4, 0xa4, 0x1f, 0x98, 0xdd, 0x10, 0xf2}"}), - ("AesBinOpTest.template", new Dictionary { ["Isa"] = "Aes", ["LoadIsa"] = "Aes", ["Method"] = "Encrypt", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["InputSize"] = "16", ["Input"] = "{0xef, 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0x01, 0xff, 0xee, 0xdd, 0xcc, 0xbb, 0xaa, 0x99, 0x88}", ["KeySize"] = "16", ["Key"] = "{0xff, 0xdd, 0xbb, 0x99, 0x77, 0x55, 0x33, 0x11, 0xee, 0xcc, 0xaa, 0x88, 0x66, 0x44, 0x22, 0x00}", ["ExpectedRetSize"] = "16", ["ExpectedRet"] = "{0xed, 0x42, 0xc4, 0xdf, 0x57, 0x0e, 0xab, 0x16, 0x33, 0x43, 0x50, 0x84, 0x18, 0xee, 0xe4, 0x28}"}), - ("AesBinOpTest.template", new Dictionary { ["Isa"] = "Aes", ["LoadIsa"] = "Aes", ["Method"] = "EncryptLast", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["InputSize"] = "16", ["Input"] = "{0xef, 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0x01, 0xff, 0xee, 0xdd, 0xcc, 0xbb, 0xaa, 0x99, 0x88}", ["KeySize"] = "16", ["Key"] = "{0xff, 0xdd, 0xbb, 0x99, 0x77, 0x55, 0x33, 0x11, 0xee, 0xcc, 0xaa, 0x88, 0x66, 0x44, 0x22, 0x00}", ["ExpectedRetSize"] = "16", ["ExpectedRet"] = "{0x20, 0xb3, 0x7a, 0x5d, 0xf2, 0x7d, 0xdd, 0xb6, 0xf8, 0x60, 0xc8, 0xf4, 0x8c, 0xf9, 0x04, 0x4b}"}), - ("AesUnOpTest.template", new Dictionary { ["Isa"] = "Aes", ["LoadIsa"] = "Aes", ["Method"] = "InverseMixColumns", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["InputSize"] = "16", ["Input"] = "{0xef, 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0x01, 0xff, 0xee, 0xdd, 0xcc, 0xbb, 0xaa, 0x99, 0x88}", ["ExpectedRetSize"] = "16", ["ExpectedRet"] = "{0xa0, 0x0a, 0xe4, 0x4e, 0x28, 0x82, 0x6c, 0xc6, 0x55, 0x00, 0x77, 0x22, 0x11, 0x44, 0x33, 0x66}"}), - ("AesImmOpTest.template", new Dictionary { ["Isa"] = "Aes", ["LoadIsa"] = "Aes", ["Method"] = "KeygenAssist", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Imm"] = "5", ["LargestVectorSize"] = "16", ["InputSize"] = "16", ["Input"] = "{0xef, 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0x01, 0xff, 0xee, 0xdd, 0xcc, 0xbb, 0xaa, 0x99, 0x88}", ["ExpectedRetSize"] = "16", ["ExpectedRet"] = "{0x85, 0x6e, 0x26, 0x7c, 0x6b, 0x26, 0x7c, 0x85, 0xea, 0xac, 0xee, 0xc4, 0xa9, 0xee, 0xc4, 0xea}"}), -}; - -private static readonly (string templateFileName, Dictionary templateData)[] PclmulqdqInputs = new [] -{ - ("PclmulqdqOpTest.template", new Dictionary { ["Isa"] = "Pclmulqdq", ["LoadIsa"] = "Pclmulqdq", ["Method"] = "CarrylessMultiply", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64",["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["Imm"] = "0", ["LargestVectorSize"] = "16", ["Input1"] = "{2, 20}", ["Input1Size"] = "2" ,["Input2"] = "{25, 95}", ["Input2Size"] = "2" ,["ExpectedRet"] = "{50, 0}", ["ExpectedRetSize"] = "2"}), - ("PclmulqdqOpTest.template", new Dictionary { ["Isa"] = "Pclmulqdq", ["LoadIsa"] = "Pclmulqdq", ["Method"] = "CarrylessMultiply", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64",["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["Input1"] = "{2, 20}", ["Input1Size"] = "2" ,["Input2"] = "{25, 95}", ["Input2Size"] = "2" ,["ExpectedRet"] = "{500, 0}" , ["ExpectedRetSize"] = "2"}), - ("PclmulqdqOpTest.template", new Dictionary { ["Isa"] = "Pclmulqdq", ["LoadIsa"] = "Pclmulqdq", ["Method"] = "CarrylessMultiply", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64",["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["Imm"] = "16", ["LargestVectorSize"] = "16", ["Input1"] = "{2, 20}", ["Input1Size"] = "2" ,["Input2"] = "{25, 95}", ["Input2Size"] = "2" ,["ExpectedRet"] = "{190, 0}" , ["ExpectedRetSize"] = "2"}), - ("PclmulqdqOpTest.template", new Dictionary { ["Isa"] = "Pclmulqdq", ["LoadIsa"] = "Pclmulqdq", ["Method"] = "CarrylessMultiply", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64",["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["Imm"] = "17", ["LargestVectorSize"] = "16", ["Input1"] = "{2, 20}", ["Input1Size"] = "2" ,["Input2"] = "{25, 95}", ["Input2Size"] = "2" ,["ExpectedRet"] = "{1164, 0}" , ["ExpectedRetSize"] = "2"}), - ("PclmulqdqOpTest.template", new Dictionary { ["Isa"] = "Pclmulqdq", ["LoadIsa"] = "Pclmulqdq", ["Method"] = "CarrylessMultiply", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64",["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["Imm"] = "129", ["LargestVectorSize"] = "16",["Input1"] = "{2, 20}", ["Input1Size"] = "2" ,["Input2"] = "{25, 95}", ["Input2Size"] = "2" ,["ExpectedRet"] = "{500, 0}" , ["ExpectedRetSize"] = "2"}), - ("PclmulqdqOpTest.template", new Dictionary { ["Isa"] = "Pclmulqdq", ["LoadIsa"] = "Pclmulqdq", ["Method"] = "CarrylessMultiply", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["Imm"] = "0", ["LargestVectorSize"] = "16", ["Input1"] = "{-2, -20}", ["Input1Size"] = "2" ,["Input2"] = "{25, 65535}", ["Input2Size"] = "2" ,["ExpectedRet"] = "{-18, 8}" , ["ExpectedRetSize"] = "2"}), - ("PclmulqdqOpTest.template", new Dictionary { ["Isa"] = "Pclmulqdq", ["LoadIsa"] = "Pclmulqdq", ["Method"] = "CarrylessMultiply", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["Input1"] = "{-2, -20}", ["Input1Size"] = "2" ,["Input2"] = "{25, 65535}", ["Input2Size"] = "2" ,["ExpectedRet"] = "{-436, 8}" , ["ExpectedRetSize"] = "2"}), - ("PclmulqdqOpTest.template", new Dictionary { ["Isa"] = "Pclmulqdq", ["LoadIsa"] = "Pclmulqdq", ["Method"] = "CarrylessMultiply", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["Imm"] = "16", ["LargestVectorSize"] = "16", ["Input1"] = "{-2, -20}", ["Input1Size"] = "2" ,["Input2"] = "{25, 65535}", ["Input2Size"] = "2" ,["ExpectedRet"] = "{43690, 21845}" , ["ExpectedRetSize"] = "2"}), - ("PclmulqdqOpTest.template", new Dictionary { ["Isa"] = "Pclmulqdq", ["LoadIsa"] = "Pclmulqdq", ["Method"] = "CarrylessMultiply", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["Imm"] = "17", ["LargestVectorSize"] = "16", ["Input1"] = "{-2, -20}", ["Input1Size"] = "2" ,["Input2"] = "{25, 65535}", ["Input2Size"] = "2" ,["ExpectedRet"] = "{961188, 21845}" , ["ExpectedRetSize"] = "2"}), - ("PclmulqdqOpTest.template", new Dictionary { ["Isa"] = "Pclmulqdq", ["LoadIsa"] = "Pclmulqdq", ["Method"] = "CarrylessMultiply", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["Imm"] = "129", ["LargestVectorSize"] = "16", ["Input1"] = "{-2, -20}", ["Input1Size"] = "2" ,["Input2"] ="{25, 65535}", ["Input2Size"] = "2" ,["ExpectedRet"] = "{-436, 8}" , ["ExpectedRetSize"] = "2"}), -}; - -private const string ValidateBmi2ParallelBitComment = @" -// The validation logic defined here for Bmi2.ParallelBitDeposit and Bmi2.ParallelBitExtract is -// based on the 'Operation' pseudo-code defined for the pdep and pext instruction in the 'Intel® -// 64 and IA-32 Architectures Software Developer’s Manual; Volume 2 (2A, 2B, 2C & 2D): Instruction -// Set Reference, A-Z' -"; - -private const string ValidateBmi2ParallelBitDepositUInt32 = ValidateBmi2ParallelBitComment + @" -uint temp = left; -uint mask = right; -uint dest = 0; -byte m = 0, k = 0; - -while (m < 32) -{ - if (((mask >> m) & 1) == 1) // Extract bit at index m of mask - { - dest |= (((temp >> k) & 1) << m); // Extract bit at index k of temp and insert to index m of dest - k++; - } - m++; -} - -isUnexpectedResult = (dest != result); -"; - -private const string ValidateBmi2ParallelBitDepositUInt64 = ValidateBmi2ParallelBitComment + @" -ulong temp = left; -ulong mask = right; -ulong dest = 0; -byte m = 0, k = 0; - -while (m < 64) -{ - if (((mask >> m) & 1) == 1) // Extract bit at index m of mask - { - dest |= (((temp >> k) & 1) << m); // Extract bit at index k of temp and insert to index m of dest - k++; - } - m++; -} - -isUnexpectedResult = (dest != result); -"; - -private const string ValidateBmi2ParallelBitExtractUInt32 = ValidateBmi2ParallelBitComment + @" -uint temp = left; -uint mask = right; -uint dest = 0; -byte m = 0, k = 0; - -while (m < 32) -{ - if (((mask >> m) & 1) == 1) // Extract bit at index m of mask - { - dest |= (((temp >> m) & 1) << k); // Extract bit at index m of temp and insert to index k of dest - k++; - } - m++; -} - -isUnexpectedResult = (dest != result); -"; - -private const string ValidateBmi2ParallelBitExtractUInt64 = ValidateBmi2ParallelBitComment + @" -ulong temp = left; -ulong mask = right; -ulong dest = 0; -byte m = 0, k = 0; - -while (m < 64) -{ - if (((mask >> m) & 1) == 1) // Extract bit at index m of mask - { - dest |= (((temp >> m) & 1) << k); // Extract bit at index m of temp and insert to index k of dest - k++; - } - m++; -} - -isUnexpectedResult = (dest != result); -"; - -private static readonly (string templateFileName, Dictionary templateData)[] Bmi2Inputs = new [] -{ - ("ScalarBinOpTest.template", new Dictionary { ["Isa"] = "Bmi2", ["Method"] = "ParallelBitDeposit", ["RetBaseType"] = "UInt32", ["Op1BaseType"] = "UInt32", ["Op2BaseType"] = "UInt32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateResult"] = ValidateBmi2ParallelBitDepositUInt32 }), - ("ScalarBinOpTest.template", new Dictionary { ["Isa"] = "Bmi2", ["Method"] = "ParallelBitExtract", ["RetBaseType"] = "UInt32", ["Op1BaseType"] = "UInt32", ["Op2BaseType"] = "UInt32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateResult"] = ValidateBmi2ParallelBitExtractUInt32 }), - ("ScalarBinOpTest.template", new Dictionary { ["Isa"] = "Bmi2", ["Method"] = "ZeroHighBits", ["RetBaseType"] = "UInt32", ["Op1BaseType"] = "UInt32", ["Op2BaseType"] = "UInt32", ["NextValueOp1"] = "0xFFFFFFFF", ["NextValueOp2"] = "16", ["ValidateResult"] = "uint expectedResult = 0xFFFF; isUnexpectedResult = (expectedResult != result);" }), - ("ScalarBinOpTest.template", new Dictionary { ["Isa"] = "Bmi2", ["Method"] = "MultiplyNoFlags", ["RetBaseType"] = "UInt32", ["Op1BaseType"] = "UInt32", ["Op2BaseType"] = "UInt32", ["NextValueOp1"] = "UInt32.MaxValue", ["NextValueOp2"] = "UInt32.MaxValue", ["ValidateResult"] = "uint expectedResult = 4294967294; isUnexpectedResult = (expectedResult != result);" }), - ("ScalarTernOpBinResTest.template", new Dictionary { ["Isa"] = "Bmi2", ["Method"] = "MultiplyNoFlags", ["RetBaseType"] = "UInt32", ["Op1BaseType"] = "UInt32", ["Op2BaseType"] = "UInt32", ["Op3BaseType"] = "UInt32", ["NextValueOp1"] = "UInt32.MaxValue", ["NextValueOp2"] = "UInt32.MaxValue", ["NextValueOp3"] = "0", ["ValidateResult"] = "uint expectedHigher = 4294967294, expectedLower = 1; isUnexpectedResult = (expectedHigher != higher) || (expectedLower != lower);" }), -}; - -private static readonly (string templateFileName, Dictionary templateData)[] Bmi2X64Inputs = new [] -{ - ("ScalarBinOpTest.template", new Dictionary { ["Isa"] = "Bmi2.X64", ["Method"] = "ParallelBitDeposit", ["RetBaseType"] = "UInt64", ["Op1BaseType"] = "UInt64", ["Op2BaseType"] = "UInt64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateResult"] = ValidateBmi2ParallelBitDepositUInt64 }), - ("ScalarBinOpTest.template", new Dictionary { ["Isa"] = "Bmi2.X64", ["Method"] = "ParallelBitExtract", ["RetBaseType"] = "UInt64", ["Op1BaseType"] = "UInt64", ["Op2BaseType"] = "UInt64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateResult"] = ValidateBmi2ParallelBitExtractUInt64 }), - ("ScalarBinOpTest.template", new Dictionary { ["Isa"] = "Bmi2.X64", ["Method"] = "ZeroHighBits", ["RetBaseType"] = "UInt64", ["Op1BaseType"] = "UInt64", ["Op2BaseType"] = "UInt64", ["NextValueOp1"] = "0xFFFFFFFFFFFFFFFF", ["NextValueOp2"] = "32", ["ValidateResult"] = "ulong expectedResult = 0xFFFFFFFF; isUnexpectedResult = (expectedResult != result);" }), - ("ScalarBinOpTest.template", new Dictionary { ["Isa"] = "Bmi2.X64", ["Method"] = "MultiplyNoFlags", ["RetBaseType"] = "UInt64", ["Op1BaseType"] = "UInt64", ["Op2BaseType"] = "UInt64", ["NextValueOp1"] = "UInt64.MaxValue", ["NextValueOp2"] = "UInt64.MaxValue", ["ValidateResult"] = "ulong expectedResult = 18446744073709551614; isUnexpectedResult = (expectedResult != result);" }), - ("ScalarTernOpBinResTest.template", new Dictionary { ["Isa"] = "Bmi2.X64", ["Method"] = "MultiplyNoFlags", ["RetBaseType"] = "UInt64", ["Op1BaseType"] = "UInt64", ["Op2BaseType"] = "UInt64", ["Op3BaseType"] = "UInt64", ["NextValueOp1"] = "UInt64.MaxValue", ["NextValueOp2"] = "UInt64.MaxValue", ["NextValueOp3"] = "0", ["ValidateResult"] = "ulong expectedHigher = 18446744073709551614, expectedLower = 1; isUnexpectedResult = (expectedHigher != higher) || (expectedLower != lower);" }), -}; - -private static void ProcessInputs(string groupName, (string templateFileName, Dictionary templateData)[] inputs) -{ - var testListFileName = Path.Combine("..", groupName, $"Program.{groupName}.cs"); - - using (var testListFile = new StreamWriter(testListFileName, append: false)) - { - testListFile.WriteLine(@"// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - static Program() - { - TestList = new Dictionary() {"); - - foreach (var input in inputs) - { - ProcessInput(testListFile, groupName, input); - } - - testListFile.WriteLine(@" }; - } - } -}"); - } -} - -private static bool isImmTemplate(string name) -{ - return name == "ImmUnOpTest.template" || name == "InsertScalarTest.template" || - name == "ExtractScalarTest.template" || name == "InsertVector128Test.template" || - name == "ExtractVector128Test.template" || name == "InsertLoadTest.template" || - name == "ExtractStoreTest.template" || name == "ImmBinOpTest.template" || - name == "AesImmOpTest.template" || name == "PclmulqdqOpTest.template"; -} - -private static void ProcessInput(StreamWriter testListFile, string groupName, (string templateFileName, Dictionary templateData) input) - -{ - var testName = $"{input.templateData["Method"]}.{input.templateData["RetBaseType"]}"; - - var suffix = ""; - - if (input.templateFileName == "SimpleUnOpConvTest.template" || input.templateFileName == "SimdScalarUnOpConvTest.template" ) - { - testName = $"{input.templateData["Method"]}.{input.templateData["Op1VectorType"]}{input.templateData["Op1BaseType"]}"; - suffix = $"{input.templateData["Op1VectorType"]}{input.templateData["Op1BaseType"]}"; - } - - if (isImmTemplate(input.templateFileName)) - { - testName += $".{input.templateData["Imm"]}"; - suffix += $"{input.templateData["Imm"]}"; - } - - if (input.templateFileName == "InsertLoadTest.template") - { - testName += ".Load"; - suffix += "Load"; - } - else if (input.templateFileName == "ExtractStoreTest.template") - { - testName += ".Store"; - suffix += "Store"; - } - else if (input.templateFileName == "ScalarTernOpTest.template") - { - testName += ".3Op"; - suffix += "3Op"; - } - else if (input.templateFileName == "ScalarTernOpBinResTest.template") - { - testName += ".BinRes"; - suffix += "BinRes"; - } - - if (input.templateFileName == "SimpleUnOpConvTest.template" || input.templateFileName == "SimdScalarUnOpConvTest.template" ) - { - testListFile.WriteLine($@" [""{testName}""] = {input.templateData["Method"]}{suffix},"); - } - else - { - // Ex: ["Add.Single"] = AddSingle - testListFile.WriteLine($@" [""{testName}""] = {input.templateData["Method"]}{input.templateData["RetBaseType"]}{suffix},"); - } - - var testFileName = Path.Combine("..", groupName, $"{testName}.cs"); - var matchingTemplate = Templates.Where((t) => t.outputTemplateName.Equals(input.templateFileName)).SingleOrDefault(); - var template = string.Empty; - - if (matchingTemplate.templateFileName is null) - { - template = File.ReadAllText(input.templateFileName); - } - else - { - template = File.ReadAllText(matchingTemplate.templateFileName); - - foreach (var kvp in matchingTemplate.templateData) - { - template = template.Replace($"{{{kvp.Key}}}", kvp.Value); - } - } - - foreach (var kvp in input.templateData) - { - template = template.Replace($"{{{kvp.Key}}}", kvp.Value); - } - - File.WriteAllText(testFileName, template); -} - -ProcessInputs("Sse", SseInputs); -ProcessInputs("Sse.X64", SseX64Inputs); -ProcessInputs("Sse2", Sse2Inputs); -ProcessInputs("Sse2.X64", Sse2X64Inputs); -ProcessInputs("Sse3", Sse3Inputs); -ProcessInputs("Ssse3", Ssse3Inputs); -ProcessInputs("Sse41", Sse41Inputs); -ProcessInputs("Sse41_Overloaded", Sse41_OverloadedInputs); -ProcessInputs("Sse41.X64", Sse41X64Inputs); -ProcessInputs("Sse42", Sse42Inputs); -ProcessInputs("Avx", AvxInputs); -ProcessInputs("Avx_Vector128", Avx_Vector128Inputs); -ProcessInputs("Avx2", Avx2Inputs); -ProcessInputs("Avx2_Vector128", Avx2_Vector128Inputs); -ProcessInputs("Fma_Vector128", Fma_Vector128Inputs); -ProcessInputs("Fma_Vector256", Fma_Vector256Inputs); -ProcessInputs("Bmi1", Bmi1Inputs); -ProcessInputs("Bmi1.X64", Bmi1X64Inputs); -ProcessInputs("Bmi2", Bmi2Inputs); -ProcessInputs("Bmi2.X64", Bmi2X64Inputs); -ProcessInputs("Aes", AesInputs); -ProcessInputs("Pclmulqdq", PclmulqdqInputs); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/InsertScalarTest.template b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/InsertScalarTest.template deleted file mode 100644 index 685b498e5882..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/InsertScalarTest.template +++ /dev/null @@ -1,409 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void {Method}{RetBaseType}{Imm}() - { - var test = new InsertScalarTest__{Method}{RetBaseType}{Imm}(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class InsertScalarTest__{Method}{RetBaseType}{Imm} - { - private struct TestStruct - { - public {Op1VectorType}<{Op1BaseType}> _fld; - public {Op1BaseType} _scalarFldData; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = {NextValueOp1}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref testStruct._fld), ref Unsafe.As<{Op1BaseType}, byte>(ref _data[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - - testStruct._scalarFldData = {Data}; - - return testStruct; - } - - public void RunStructFldScenario(InsertScalarTest__{Method}{RetBaseType}{Imm} testClass) - { - var result = {Isa}.{Method}(_fld, _scalarFldData, {Imm}); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, _scalarFldData, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = {LargestVectorSize}; - - private static readonly int Op1ElementCount = Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>() / sizeof({Op1BaseType}); - private static readonly int RetElementCount = Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>() / sizeof({RetBaseType}); - - private static {Op1BaseType}[] _data = new {Op1BaseType}[Op1ElementCount]; - private static {Op1BaseType} _scalarClsData = {Data}; - - private static {Op1VectorType}<{Op1BaseType}> _clsVar; - - private {Op1VectorType}<{Op1BaseType}> _fld; - private {Op1BaseType} _scalarFldData = {Data}; - - private SimpleUnaryOpTest__DataTable<{RetBaseType}, {Op1BaseType}> _dataTable; - - static InsertScalarTest__{Method}{RetBaseType}{Imm}() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = {NextValueOp1}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _clsVar), ref Unsafe.As<{Op1BaseType}, byte>(ref _data[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - } - - public InsertScalarTest__{Method}{RetBaseType}{Imm}() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = {NextValueOp1}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _fld), ref Unsafe.As<{Op1BaseType}, byte>(ref _data[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = {NextValueOp1}; } - _dataTable = new SimpleUnaryOpTest__DataTable<{RetBaseType}, {Op1BaseType}>(_data, new {RetBaseType}[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => {Isa}.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario)); - - var result = {Isa}.{Method}( - Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArrayPtr), - {Data}, - {Imm} - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, {Data}, _dataTable.outArrayPtr); - } - - public unsafe void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - {Op1BaseType} localData = {Data}; - {Op1BaseType}* ptr = &localData; - - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArrayPtr)), - *ptr, - {Imm} - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, *ptr, _dataTable.outArrayPtr); - } - - public unsafe void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - {Op1BaseType} localData = {Data}; - {Op1BaseType}* ptr = &localData; - - var result = {Isa}.{Method}( - {LoadIsa}.LoadAligned{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArrayPtr)), - *ptr, - {Imm} - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, *ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario)); - - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>), typeof({RetBaseType}), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArrayPtr), - {Data}, - (byte){Imm} - }); - - Unsafe.Write(_dataTable.outArrayPtr, ({RetVectorType}<{RetBaseType}>)(result)); - ValidateResult(_dataTable.inArrayPtr, {Data}, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>), typeof({RetBaseType}), typeof(byte) }) - .Invoke(null, new object[] { - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArrayPtr)), - {Data}, - (byte){Imm} - }); - - Unsafe.Write(_dataTable.outArrayPtr, ({RetVectorType}<{RetBaseType}>)(result)); - ValidateResult(_dataTable.inArrayPtr, {Data}, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>), typeof({RetBaseType}), typeof(byte) }) - .Invoke(null, new object[] { - {LoadIsa}.LoadAligned{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArrayPtr)), - {Data}, - (byte){Imm} - }); - - Unsafe.Write(_dataTable.outArrayPtr, ({RetVectorType}<{RetBaseType}>)(result)); - ValidateResult(_dataTable.inArrayPtr, {Data}, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = {Isa}.{Method}( - _clsVar, - _scalarClsData, - {Imm} - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _scalarClsData,_dataTable.outArrayPtr); - } - - public void RunLclVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario)); - - {Op1BaseType} localData = {Data}; - - var firstOp = Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArrayPtr); - var result = {Isa}.{Method}(firstOp, localData, {Imm}); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, localData, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - {Op1BaseType} localData = {Data}; - - var firstOp = {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArrayPtr)); - var result = {Isa}.{Method}(firstOp, localData, {Imm}); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, localData, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - {Op1BaseType} localData = {Data}; - - var firstOp = {LoadIsa}.LoadAligned{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArrayPtr)); - var result = {Isa}.{Method}(firstOp, localData, {Imm}); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, localData, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new InsertScalarTest__{Method}{RetBaseType}{Imm}(); - var result = {Isa}.{Method}(test._fld, test._scalarFldData, {Imm}); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, test._scalarFldData, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = {Isa}.{Method}(_fld, _scalarFldData, {Imm}); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _scalarFldData, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = {Isa}.{Method}(test._fld, test._scalarFldData, {Imm}); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, test._scalarFldData, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult({Op1VectorType}<{Op1BaseType}> firstOp, {Op1BaseType} scalarData, void* result, [CallerMemberName] string method = "") - { - {Op1BaseType}[] inArray = new {Op1BaseType}[Op1ElementCount]; - {RetBaseType}[] outArray = new {RetBaseType}[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>()); - - ValidateResult(inArray, scalarData, outArray, method); - } - - private void ValidateResult(void* firstOp, {Op1BaseType} scalarData, void* result, [CallerMemberName] string method = "") - { - {Op1BaseType}[] inArray = new {Op1BaseType}[Op1ElementCount]; - {RetBaseType}[] outArray = new {RetBaseType}[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>()); - - ValidateResult(inArray, scalarData, outArray, method); - } - - private void ValidateResult({Op1BaseType}[] firstOp, {Op1BaseType} scalarData, {RetBaseType}[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i++) - { - if ({ValidateFirstResult}) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}><9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/LoadUnOpTest.template b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/LoadUnOpTest.template deleted file mode 100644 index a921f60eab71..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/LoadUnOpTest.template +++ /dev/null @@ -1,165 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void {Method}{RetBaseType}() - { - var test = new SimpleUnaryOpTest__{Method}{RetBaseType}(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__{Method}{RetBaseType} - { - private static readonly int LargestVectorSize = {LargestVectorSize}; - - private static readonly int Op1ElementCount = Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>() / sizeof({Op1BaseType}); - private static readonly int RetElementCount = Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>() / sizeof({RetBaseType}); - - private static {Op1BaseType}[] _data = new {Op1BaseType}[Op1ElementCount]; - - private SimpleUnaryOpTest__DataTable<{RetBaseType}, {Op1BaseType}> _dataTable; - - public SimpleUnaryOpTest__{Method}{RetBaseType}() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = {NextValueOp1}; } - _dataTable = new SimpleUnaryOpTest__DataTable<{RetBaseType}, {Op1BaseType}>(_data, new {RetBaseType}[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => {Isa}.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = {Isa}.{Method}( - ({Op1BaseType}*)(_dataTable.inArrayPtr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1BaseType}*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArrayPtr, typeof({Op1BaseType}*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, ({RetVectorType}<{RetBaseType}>)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult({Op1VectorType}<{Op1BaseType}> firstOp, void* result, [CallerMemberName] string method = "") - { - {Op1BaseType}[] inArray = new {Op1BaseType}[Op1ElementCount]; - {RetBaseType}[] outArray = new {RetBaseType}[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - {Op1BaseType}[] inArray = new {Op1BaseType}[Op1ElementCount]; - {RetBaseType}[] outArray = new {RetBaseType}[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult({Op1BaseType}[] firstOp, {RetBaseType}[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ({ValidateFirstResult}) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ({ValidateRemainingResults}) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/Program.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/Program.cs deleted file mode 100644 index 610035f06fea..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/Program.cs +++ /dev/null @@ -1,109 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private const int PASS = 100; - private const int FAIL = 0; - - private static readonly IDictionary TestList; - - public static int Main(string[] args) - { - var isPassing = true; - - PrintSupportedIsa(); - - foreach (string testToRun in GetTestsToRun(args)) - { - TestLibrary.TestFramework.BeginTestCase(testToRun); - - try - { - TestList[testToRun].Invoke(); - } - catch (Exception e) - { - TestLibrary.TestFramework.LogError(e.GetType().ToString(), e.Message); - TestLibrary.TestFramework.LogVerbose(e.StackTrace); - isPassing = false; - } - - TestLibrary.TestFramework.EndTestCase(); - } - - return isPassing ? PASS : FAIL; - } - - private static ICollection GetTestsToRun(string[] args) - { - var testsToRun = new HashSet(); - - for (var i = 0; i < args.Length; i++) - { - var testName = args[i]; - - if (testName.Equals("all", StringComparison.OrdinalIgnoreCase)) - { - break; - } - - if (!TestList.Keys.Contains(testName, StringComparer.OrdinalIgnoreCase)) - { - PrintUsage(); - } - - testsToRun.Add(testName); - } - - return (testsToRun.Count == 0) ? TestList.Keys : testsToRun; - } - - private static void PrintSupportedIsa() - { - TestLibrary.TestFramework.LogInformation("Supported ISAs:"); - TestLibrary.TestFramework.LogInformation($" AES: {Aes.IsSupported}"); - TestLibrary.TestFramework.LogInformation($" AVX: {Avx.IsSupported}"); - TestLibrary.TestFramework.LogInformation($" AVX2: {Avx2.IsSupported}"); - TestLibrary.TestFramework.LogInformation($" BMI1: {Bmi1.IsSupported}"); - TestLibrary.TestFramework.LogInformation($" BMI2: {Bmi2.IsSupported}"); - TestLibrary.TestFramework.LogInformation($" FMA: {Fma.IsSupported}"); - TestLibrary.TestFramework.LogInformation($" LZCNT: {Lzcnt.IsSupported}"); - TestLibrary.TestFramework.LogInformation($" PCLMULQDQ: {Pclmulqdq.IsSupported}"); - TestLibrary.TestFramework.LogInformation($" POPCNT: {Popcnt.IsSupported}"); - TestLibrary.TestFramework.LogInformation($" SSE: {Sse.IsSupported}"); - TestLibrary.TestFramework.LogInformation($" SSE2: {Sse2.IsSupported}"); - TestLibrary.TestFramework.LogInformation($" SSE3: {Sse3.IsSupported}"); - TestLibrary.TestFramework.LogInformation($" SSE4.1: {Sse41.IsSupported}"); - TestLibrary.TestFramework.LogInformation($" SSE4.2: {Sse42.IsSupported}"); - TestLibrary.TestFramework.LogInformation($" SSSE3: {Ssse3.IsSupported}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - } - - private static void PrintUsage() - { - TestLibrary.TestFramework.LogInformation($@"Usage: -{Environment.GetCommandLineArgs()[0]} [testName] - - [testName]: The name of the function to test. - Defaults to 'all'. - Multiple can be specified. - - Available Test Names:"); - foreach (string testName in TestList.Keys) - { - TestLibrary.TestFramework.LogInformation($" {testName}"); - } - - Environment.Exit(FAIL); - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/ScalarBinOpTest.template b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/ScalarBinOpTest.template deleted file mode 100644 index 04cecabc97a2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/ScalarBinOpTest.template +++ /dev/null @@ -1,242 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void {Method}{RetBaseType}() - { - var test = new ScalarBinaryOpTest__{Method}{RetBaseType}(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.ReadUnaligned - test.RunBasicScenario_UnsafeRead(); - - // Validates calling via reflection works, using Unsafe.ReadUnaligned - test.RunReflectionScenario_UnsafeRead(); - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.ReadUnaligned - test.RunLclVarScenario_UnsafeRead(); - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ScalarBinaryOpTest__{Method}{RetBaseType} - { - private struct TestStruct - { - public {Op1BaseType} _fld1; - public {Op2BaseType} _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - testStruct._fld1 = {NextValueOp1}; - testStruct._fld2 = {NextValueOp2}; - - return testStruct; - } - - public void RunStructFldScenario(ScalarBinaryOpTest__{Method}{RetBaseType} testClass) - { - var result = {Isa}.{Method}(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - } - - private static {Op1BaseType} _data1; - private static {Op2BaseType} _data2; - - private static {Op1BaseType} _clsVar1; - private static {Op2BaseType} _clsVar2; - - private {Op1BaseType} _fld1; - private {Op2BaseType} _fld2; - - static ScalarBinaryOpTest__{Method}{RetBaseType}() - { - _clsVar1 = {NextValueOp1}; - _clsVar2 = {NextValueOp2}; - } - - public ScalarBinaryOpTest__{Method}{RetBaseType}() - { - Succeeded = true; - - _fld1 = {NextValueOp1}; - _fld2 = {NextValueOp2}; - - _data1 = {NextValueOp1}; - _data2 = {NextValueOp2}; - } - - public bool IsSupported => {Isa}.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = {Isa}.{Method}( - Unsafe.ReadUnaligned<{Op1BaseType}>(ref Unsafe.As<{Op1BaseType}, byte>(ref _data1)), - Unsafe.ReadUnaligned<{Op2BaseType}>(ref Unsafe.As<{Op2BaseType}, byte>(ref _data2)) - ); - - ValidateResult(_data1, _data2, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1BaseType}), typeof({Op2BaseType}) }) - .Invoke(null, new object[] { - Unsafe.ReadUnaligned<{Op1BaseType}>(ref Unsafe.As<{Op1BaseType}, byte>(ref _data1)), - Unsafe.ReadUnaligned<{Op2BaseType}>(ref Unsafe.As<{Op2BaseType}, byte>(ref _data2)) - }); - - ValidateResult(_data1, _data2, ({RetBaseType})result); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = {Isa}.{Method}( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var data1 = Unsafe.ReadUnaligned<{Op1BaseType}>(ref Unsafe.As<{Op1BaseType}, byte>(ref _data1)); - var data2 = Unsafe.ReadUnaligned<{Op2BaseType}>(ref Unsafe.As<{Op2BaseType}, byte>(ref _data2)); - var result = {Isa}.{Method}(data1, data2); - - ValidateResult(data1, data2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ScalarBinaryOpTest__{Method}{RetBaseType}(); - var result = {Isa}.{Method}(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = {Isa}.{Method}(_fld1, _fld2); - ValidateResult(_fld1, _fld2, result); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = {Isa}.{Method}(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult({Op1BaseType} left, {Op2BaseType} right, {RetBaseType} result, [CallerMemberName] string method = "") - { - var isUnexpectedResult = false; - - {ValidateResult} - - if (isUnexpectedResult) - { - TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1BaseType}, {Op2BaseType}): {Method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: {left}"); - TestLibrary.TestFramework.LogInformation($" right: {right}"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/ScalarUnOpTest.template b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/ScalarUnOpTest.template deleted file mode 100644 index 108ec066c885..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/ScalarUnOpTest.template +++ /dev/null @@ -1,228 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void {Method}{RetBaseType}() - { - var test = new ScalarUnaryOpTest__{Method}{RetBaseType}(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.ReadUnaligned - test.RunBasicScenario_UnsafeRead(); - - // Validates calling via reflection works, using Unsafe.ReadUnaligned - test.RunReflectionScenario_UnsafeRead(); - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.ReadUnaligned - test.RunLclVarScenario_UnsafeRead(); - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ScalarUnaryOpTest__{Method}{RetBaseType} - { - private struct TestStruct - { - public {Op1BaseType} _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - testStruct._fld = {NextValueOp1}; - return testStruct; - } - - public void RunStructFldScenario(ScalarUnaryOpTest__{Method}{RetBaseType} testClass) - { - var result = {Isa}.{Method}(_fld); - testClass.ValidateResult(_fld, result); - } - } - - private static {Op1BaseType} _data; - - private static {Op1BaseType} _clsVar; - - private {Op1BaseType} _fld; - - static ScalarUnaryOpTest__{Method}{RetBaseType}() - { - _clsVar = {NextValueOp1}; - } - - public ScalarUnaryOpTest__{Method}{RetBaseType}() - { - Succeeded = true; - - - _fld = {NextValueOp1}; - _data = {NextValueOp1}; - } - - public bool IsSupported => {Isa}.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = {Isa}.{Method}( - Unsafe.ReadUnaligned<{Op1BaseType}>(ref Unsafe.As<{Op1BaseType}, byte>(ref _data)) - ); - - ValidateResult(_data, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1BaseType}) }) - .Invoke(null, new object[] { - Unsafe.ReadUnaligned<{Op1BaseType}>(ref Unsafe.As<{Op1BaseType}, byte>(ref _data)) - }); - - ValidateResult(_data, ({RetBaseType})result); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = {Isa}.{Method}( - _clsVar - ); - - ValidateResult(_clsVar, result); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var data = Unsafe.ReadUnaligned<{Op1BaseType}>(ref Unsafe.As<{Op1BaseType}, byte>(ref _data)); - var result = {Isa}.{Method}(data); - - ValidateResult(data, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ScalarUnaryOpTest__{Method}{RetBaseType}(); - var result = {Isa}.{Method}(test._fld); - - ValidateResult(test._fld, result); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = {Isa}.{Method}(_fld); - ValidateResult(_fld, result); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = {Isa}.{Method}(test._fld); - - ValidateResult(test._fld, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult({Op1BaseType} data, {RetBaseType} result, [CallerMemberName] string method = "") - { - var isUnexpectedResult = false; - - {ValidateResult} - - if (isUnexpectedResult) - { - TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1BaseType}): {Method} failed:"); - TestLibrary.TestFramework.LogInformation($" data: {data}"); - TestLibrary.TestFramework.LogInformation($" result: {result}"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/StoreUnOpTest.template b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/StoreUnOpTest.template deleted file mode 100644 index bfba013fe4d7..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/StoreUnOpTest.template +++ /dev/null @@ -1,377 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void {Method}{RetBaseType}() - { - var test = new StoreUnaryOpTest__{Method}{RetBaseType}(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class StoreUnaryOpTest__{Method}{RetBaseType} - { - private struct TestStruct - { - public {Op1VectorType}<{Op1BaseType}> _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref testStruct._fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - - return testStruct; - } - - public void RunStructFldScenario(StoreUnaryOpTest__{Method}{RetBaseType} testClass) - { - {Isa}.{Method}(({RetBaseType}*)testClass._dataTable.outArrayPtr, _fld1); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = {LargestVectorSize}; - - private static readonly int Op1ElementCount = Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>() / sizeof({Op1BaseType}); - private static readonly int RetElementCount = Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>() / sizeof({RetBaseType}); - - private static {Op1BaseType}[] _data1 = new {Op1BaseType}[Op1ElementCount]; - - private static {Op1VectorType}<{Op1BaseType}> _clsVar1; - - private {Op1VectorType}<{Op1BaseType}> _fld1; - - private SimpleUnaryOpTest__DataTable<{RetBaseType}, {Op1BaseType}> _dataTable; - - static StoreUnaryOpTest__{Method}{RetBaseType}() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _clsVar1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - } - - public StoreUnaryOpTest__{Method}{RetBaseType}() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - _dataTable = new SimpleUnaryOpTest__DataTable<{RetBaseType}, {Op1BaseType}>(_data1, new {RetBaseType}[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => {Isa}.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - {Isa}.{Method}( - ({RetBaseType}*)_dataTable.outArrayPtr, - Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArrayPtr) - ); - - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - {Isa}.{Method}( - ({RetBaseType}*)_dataTable.outArrayPtr, - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArrayPtr)) - ); - - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - {Isa}.{Method}( - ({RetBaseType}*)_dataTable.outArrayPtr, - {LoadIsa}.LoadAligned{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArrayPtr)) - ); - - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({RetBaseType}*), typeof({Op1VectorType}<{Op1BaseType}>) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof({RetBaseType}*)), - Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArrayPtr) - }); - - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({RetBaseType}*), typeof({Op1VectorType}<{Op1BaseType}>) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof({RetBaseType}*)), - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArrayPtr)) - }); - - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({RetBaseType}*), typeof({Op1VectorType}<{Op1BaseType}>) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof({RetBaseType}*)), - {LoadIsa}.LoadAligned{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArrayPtr)) - }); - - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - {Isa}.{Method}( - ({RetBaseType}*)_dataTable.outArrayPtr, - _clsVar1 - ); - - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var value = Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArrayPtr); - {Isa}.{Method}(({RetBaseType}*)_dataTable.outArrayPtr, value); - - ValidateResult(value, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var value = {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArrayPtr)); - {Isa}.{Method}(({RetBaseType}*)_dataTable.outArrayPtr, value); - - ValidateResult(value, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var value = {LoadIsa}.LoadAligned{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArrayPtr)); - {Isa}.{Method}(({RetBaseType}*)_dataTable.outArrayPtr, value); - - ValidateResult(value, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new StoreUnaryOpTest__{Method}{RetBaseType}(); - {Isa}.{Method}(({RetBaseType}*)_dataTable.outArrayPtr, test._fld1); - - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - {Isa}.{Method}(({RetBaseType}*)_dataTable.outArrayPtr, _fld1); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - {Isa}.{Method}(({RetBaseType}*)_dataTable.outArrayPtr, test._fld1); - - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult({Op1VectorType}<{Op1BaseType}> value, void* result, [CallerMemberName] string method = "") - { - {Op1BaseType}[] inArray = new {Op1BaseType}[Op1ElementCount]; - {RetBaseType}[] outArray = new {RetBaseType}[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref inArray[0]), value); - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* value, void* result, [CallerMemberName] string method = "") - { - {Op1BaseType}[] inArray = new {Op1BaseType}[Op1ElementCount]; - {RetBaseType}[] outArray = new {RetBaseType}[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref inArray[0]), ref Unsafe.AsRef(value), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult({Op1BaseType}[] value, {RetBaseType}[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ({ValidateFirstResult}) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ({ValidateRemainingResults}) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", value)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/_BinaryOpTestTemplate.template b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/_BinaryOpTestTemplate.template deleted file mode 100644 index 94e6f0998290..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/_BinaryOpTestTemplate.template +++ /dev/null @@ -1,571 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void {Method}{RetBaseType}() - { - var test = new {TemplateName}BinaryOpTest__{Method}{RetBaseType}(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class {TemplateName}BinaryOpTest__{Method}{RetBaseType} - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable({Op1BaseType}[] inArray1, {Op2BaseType}[] inArray2, {RetBaseType}[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf<{Op1BaseType}>(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf<{Op2BaseType}>(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf<{RetBaseType}>(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As<{Op2BaseType}, byte>(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public {Op1VectorType}<{Op1BaseType}> _fld1; - public {Op2VectorType}<{Op2BaseType}> _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref testStruct._fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = {NextValueOp2}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref testStruct._fld2), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); - - return testStruct; - } - - public void RunStructFldScenario({TemplateName}BinaryOpTest__{Method}{RetBaseType} testClass) - { - var result = {Isa}.{Method}(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load({TemplateName}BinaryOpTest__{Method}{RetBaseType} testClass) - { - fixed ({Op1VectorType}<{Op1BaseType}>* pFld1 = &_fld1) - fixed ({Op2VectorType}<{Op2BaseType}>* pFld2 = &_fld2) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pFld1)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = {LargestVectorSize}; - - private static readonly int Op1ElementCount = Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>() / sizeof({Op1BaseType}); - private static readonly int Op2ElementCount = Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>() / sizeof({Op2BaseType}); - private static readonly int RetElementCount = Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>() / sizeof({RetBaseType}); - - private static {Op1BaseType}[] _data1 = new {Op1BaseType}[Op1ElementCount]; - private static {Op2BaseType}[] _data2 = new {Op2BaseType}[Op2ElementCount]; - - private static {Op1VectorType}<{Op1BaseType}> _clsVar1; - private static {Op2VectorType}<{Op2BaseType}> _clsVar2; - - private {Op1VectorType}<{Op1BaseType}> _fld1; - private {Op2VectorType}<{Op2BaseType}> _fld2; - - private DataTable _dataTable; - - static {TemplateName}BinaryOpTest__{Method}{RetBaseType}() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _clsVar1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = {NextValueOp2}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref _clsVar2), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); - } - - public {TemplateName}BinaryOpTest__{Method}{RetBaseType}() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = {NextValueOp2}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref _fld2), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = {NextValueOp2}; } - _dataTable = new DataTable(_data1, _data2, new {RetBaseType}[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => {Isa}.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = {Isa}.{Method}( - Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr), - Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = {Isa}.{Method}( - {LoadIsa}.LoadAligned{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)), - {LoadIsa}.LoadAligned{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>), typeof({Op2VectorType}<{Op2BaseType}>) }) - .Invoke(null, new object[] { - Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr), - Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, ({RetVectorType}<{RetBaseType}>)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>), typeof({Op2VectorType}<{Op2BaseType}>) }) - .Invoke(null, new object[] { - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, ({RetVectorType}<{RetBaseType}>)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>), typeof({Op2VectorType}<{Op2BaseType}>) }) - .Invoke(null, new object[] { - {LoadIsa}.LoadAligned{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)), - {LoadIsa}.LoadAligned{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, ({RetVectorType}<{RetBaseType}>)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = {Isa}.{Method}( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed ({Op1VectorType}<{Op1BaseType}>* pClsVar1 = &_clsVar1) - fixed ({Op2VectorType}<{Op2BaseType}>* pClsVar2 = &_clsVar2) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pClsVar1)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr); - var result = {Isa}.{Method}(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)); - var op2 = {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray2Ptr)); - var result = {Isa}.{Method}(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = {LoadIsa}.LoadAligned{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)); - var op2 = {LoadIsa}.LoadAligned{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray2Ptr)); - var result = {Isa}.{Method}(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new {TemplateName}BinaryOpTest__{Method}{RetBaseType}(); - var result = {Isa}.{Method}(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new {TemplateName}BinaryOpTest__{Method}{RetBaseType}(); - - fixed ({Op1VectorType}<{Op1BaseType}>* pFld1 = &test._fld1) - fixed ({Op2VectorType}<{Op2BaseType}>* pFld2 = &test._fld2) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pFld1)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = {Isa}.{Method}(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed ({Op1VectorType}<{Op1BaseType}>* pFld1 = &_fld1) - fixed ({Op2VectorType}<{Op2BaseType}>* pFld2 = &_fld2) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pFld1)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = {Isa}.{Method}(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(&test._fld1)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult({Op1VectorType}<{Op1BaseType}> op1, {Op2VectorType}<{Op2BaseType}> op2, void* result, [CallerMemberName] string method = "") - { - {Op1BaseType}[] inArray1 = new {Op1BaseType}[Op1ElementCount]; - {Op2BaseType}[] inArray2 = new {Op2BaseType}[Op2ElementCount]; - {RetBaseType}[] outArray = new {RetBaseType}[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - {Op1BaseType}[] inArray1 = new {Op1BaseType}[Op1ElementCount]; - {Op2BaseType}[] inArray2 = new {Op2BaseType}[Op2ElementCount]; - {RetBaseType}[] outArray = new {RetBaseType}[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult({Op1BaseType}[] left, {Op2BaseType}[] right, {RetBaseType}[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - {TemplateValidationLogic} - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>, {Op2VectorType}<{Op2BaseType}>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/_TernaryOpTestTemplate.template b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/_TernaryOpTestTemplate.template deleted file mode 100644 index f11023a3e651..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/_TernaryOpTestTemplate.template +++ /dev/null @@ -1,615 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void {Method}{RetBaseType}() - { - var test = new {TemplateName}TernaryOpTest__{Method}{RetBaseType}(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class {TemplateName}TernaryOpTest__{Method}{RetBaseType} - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable({Op1BaseType}[] inArray1, {Op2BaseType}[] inArray2, {Op3BaseType}[] inArray3, {RetBaseType}[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf<{Op1BaseType}>(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf<{Op2BaseType}>(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf<{Op3BaseType}>(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf<{RetBaseType}>(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As<{Op2BaseType}, byte>(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As<{Op3BaseType}, byte>(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public {Op1VectorType}<{Op1BaseType}> _fld1; - public {Op2VectorType}<{Op2BaseType}> _fld2; - public {Op2VectorType}<{Op3BaseType}> _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref testStruct._fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = {NextValueOp2}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref testStruct._fld2), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = {NextValueOp3}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op3VectorType}<{Op3BaseType}>, byte>(ref testStruct._fld3), ref Unsafe.As<{Op3BaseType}, byte>(ref _data3[0]), (uint)Unsafe.SizeOf<{Op3VectorType}<{Op3BaseType}>>()); - - return testStruct; - } - - public void RunStructFldScenario({TemplateName}TernaryOpTest__{Method}{RetBaseType} testClass) - { - var result = {Isa}.{Method}(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load({TemplateName}TernaryOpTest__{Method}{RetBaseType} testClass) - { - fixed ({Op1VectorType}<{Op1BaseType}>* pFld1 = &_fld1) - fixed ({Op2VectorType}<{Op2BaseType}>* pFld2 = &_fld2) - fixed ({Op3VectorType}<{Op3BaseType}>* pFld3 = &_fld3) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pFld1)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(pFld2)), - {LoadIsa}.Load{Op3VectorType}(({Op3BaseType}*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = {LargestVectorSize}; - - private static readonly int Op1ElementCount = Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>() / sizeof({Op1BaseType}); - private static readonly int Op2ElementCount = Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>() / sizeof({Op2BaseType}); - private static readonly int Op3ElementCount = Unsafe.SizeOf<{Op3VectorType}<{Op3BaseType}>>() / sizeof({Op3BaseType}); - private static readonly int RetElementCount = Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>() / sizeof({RetBaseType}); - - private static {Op1BaseType}[] _data1 = new {Op1BaseType}[Op1ElementCount]; - private static {Op2BaseType}[] _data2 = new {Op2BaseType}[Op2ElementCount]; - private static {Op3BaseType}[] _data3 = new {Op3BaseType}[Op3ElementCount]; - - private static {Op1VectorType}<{Op1BaseType}> _clsVar1; - private static {Op2VectorType}<{Op2BaseType}> _clsVar2; - private static {Op3VectorType}<{Op3BaseType}> _clsVar3; - - private {Op1VectorType}<{Op1BaseType}> _fld1; - private {Op2VectorType}<{Op2BaseType}> _fld2; - private {Op3VectorType}<{Op3BaseType}> _fld3; - - private DataTable _dataTable; - - static {TemplateName}TernaryOpTest__{Method}{RetBaseType}() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _clsVar1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = {NextValueOp2}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref _clsVar2), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = {NextValueOp3}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op3VectorType}<{Op3BaseType}>, byte>(ref _clsVar3), ref Unsafe.As<{Op3BaseType}, byte>(ref _data3[0]), (uint)Unsafe.SizeOf<{Op3VectorType}<{Op3BaseType}>>()); - } - - public {TemplateName}TernaryOpTest__{Method}{RetBaseType}() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = {NextValueOp2}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref _fld2), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = {NextValueOp3}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op3VectorType}<{Op3BaseType}>, byte>(ref _fld3), ref Unsafe.As<{Op3BaseType}, byte>(ref _data3[0]), (uint)Unsafe.SizeOf<{Op3VectorType}<{Op3BaseType}>>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = {NextValueOp2}; } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = {NextValueOp3}; } - _dataTable = new DataTable(_data1, _data2, _data3, new {RetBaseType}[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => {Isa}.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = {Isa}.{Method}( - Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr), - Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr), - Unsafe.Read<{Op3VectorType}<{Op3BaseType}>>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray2Ptr)), - {LoadIsa}.Load{Op3VectorType}(({Op3BaseType}*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = {Isa}.{Method}( - {LoadIsa}.LoadAligned{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)), - {LoadIsa}.LoadAligned{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray2Ptr)), - {LoadIsa}.LoadAligned{Op3VectorType}(({Op3BaseType}*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>), typeof({Op2VectorType}<{Op2BaseType}>), typeof({Op3VectorType}<{Op3BaseType}>) }) - .Invoke(null, new object[] { - Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr), - Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr), - Unsafe.Read<{Op3VectorType}<{Op3BaseType}>>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, ({RetVectorType}<{RetBaseType}>)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>), typeof({Op2VectorType}<{Op2BaseType}>), typeof({Op3VectorType}<{Op3BaseType}>) }) - .Invoke(null, new object[] { - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray2Ptr)), - {LoadIsa}.Load{Op3VectorType}(({Op3BaseType}*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, ({RetVectorType}<{RetBaseType}>)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>), typeof({Op2VectorType}<{Op2BaseType}>), typeof({Op3VectorType}<{Op3BaseType}>) }) - .Invoke(null, new object[] { - {LoadIsa}.LoadAligned{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)), - {LoadIsa}.LoadAligned{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray2Ptr)), - {LoadIsa}.LoadAligned{Op3VectorType}(({Op3BaseType}*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, ({RetVectorType}<{RetBaseType}>)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = {Isa}.{Method}( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed ({Op1VectorType}<{Op1BaseType}>* pClsVar1 = &_clsVar1) - fixed ({Op2VectorType}<{Op2BaseType}>* pClsVar2 = &_clsVar2) - fixed ({Op3VectorType}<{Op3BaseType}>* pClsVar3 = &_clsVar3) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pClsVar1)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(pClsVar2)), - {LoadIsa}.Load{Op3VectorType}(({Op3BaseType}*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read<{Op3VectorType}<{Op3BaseType}>>(_dataTable.inArray3Ptr); - var result = {Isa}.{Method}(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)); - var op2 = {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray2Ptr)); - var op3 = {LoadIsa}.Load{Op3VectorType}(({Op3BaseType}*)(_dataTable.inArray3Ptr)); - var result = {Isa}.{Method}(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = {LoadIsa}.LoadAligned{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)); - var op2 = {LoadIsa}.LoadAligned{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray2Ptr)); - var op3 = {LoadIsa}.LoadAligned{Op3VectorType}(({Op3BaseType}*)(_dataTable.inArray3Ptr)); - var result = {Isa}.{Method}(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new {TemplateName}TernaryOpTest__{Method}{RetBaseType}(); - var result = {Isa}.{Method}(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new {TemplateName}TernaryOpTest__{Method}{RetBaseType}(); - - fixed ({Op1VectorType}<{Op1BaseType}>* pFld1 = &test._fld1) - fixed ({Op2VectorType}<{Op2BaseType}>* pFld2 = &test._fld2) - fixed ({Op3VectorType}<{Op3BaseType}>* pFld3 = &test._fld3) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pFld1)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(pFld2)), - {LoadIsa}.Load{Op3VectorType}(({Op3BaseType}*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = {Isa}.{Method}(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed ({Op1VectorType}<{Op1BaseType}>* pFld1 = &_fld1) - fixed ({Op2VectorType}<{Op2BaseType}>* pFld2 = &_fld2) - fixed ({Op3VectorType}<{Op3BaseType}>* pFld3 = &_fld3) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pFld1)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(pFld2)), - {LoadIsa}.Load{Op3VectorType}(({Op3BaseType}*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = {Isa}.{Method}(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(&test._fld1)), - {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(&test._fld2)), - {LoadIsa}.Load{Op3VectorType}(({Op3BaseType}*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult({Op1VectorType}<{Op1BaseType}> op1, {Op2VectorType}<{Op2BaseType}> op2, {Op3VectorType}<{Op3BaseType}> op3, void* result, [CallerMemberName] string method = "") - { - {Op1BaseType}[] inArray1 = new {Op1BaseType}[Op1ElementCount]; - {Op2BaseType}[] inArray2 = new {Op2BaseType}[Op2ElementCount]; - {Op3BaseType}[] inArray3 = new {Op3BaseType}[Op3ElementCount]; - {RetBaseType}[] outArray = new {RetBaseType}[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As<{Op3BaseType}, byte>(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - {Op1BaseType}[] inArray1 = new {Op1BaseType}[Op1ElementCount]; - {Op2BaseType}[] inArray2 = new {Op2BaseType}[Op2ElementCount]; - {Op3BaseType}[] inArray3 = new {Op3BaseType}[Op3ElementCount]; - {RetBaseType}[] outArray = new {RetBaseType}[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op3BaseType}, byte>(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf<{Op3VectorType}<{Op3BaseType}>>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult({Op1BaseType}[] firstOp, {Op2BaseType}[] secondOp, {Op3BaseType}[] thirdOp, {RetBaseType}[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - {TemplateValidationLogic} - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>, {Op2VectorType}<{Op2BaseType}>, {Op3VectorType}<{Op3BaseType}>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/_UnaryOpTestTemplate.template b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/_UnaryOpTestTemplate.template deleted file mode 100644 index 27836de4eea1..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/_UnaryOpTestTemplate.template +++ /dev/null @@ -1,527 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void {Method}{RetBaseType}() - { - var test = new {TemplateName}UnaryOpTest__{Method}{RetBaseType}(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if ({LoadIsa}.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class {TemplateName}UnaryOpTest__{Method}{RetBaseType} - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable({Op1BaseType}[] inArray1, {RetBaseType}[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf<{Op1BaseType}>(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf<{RetBaseType}>(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public {Op1VectorType}<{Op1BaseType}> _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref testStruct._fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - - return testStruct; - } - - public void RunStructFldScenario({TemplateName}UnaryOpTest__{Method}{RetBaseType} testClass) - { - var result = {Isa}.{Method}(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load({TemplateName}UnaryOpTest__{Method}{RetBaseType} testClass) - { - fixed ({Op1VectorType}<{Op1BaseType}>* pFld1 = &_fld1) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = {LargestVectorSize}; - - private static readonly int Op1ElementCount = Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>() / sizeof({Op1BaseType}); - private static readonly int RetElementCount = Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>() / sizeof({RetBaseType}); - - private static {Op1BaseType}[] _data1 = new {Op1BaseType}[Op1ElementCount]; - - private static {Op1VectorType}<{Op1BaseType}> _clsVar1; - - private {Op1VectorType}<{Op1BaseType}> _fld1; - - private DataTable _dataTable; - - static {TemplateName}UnaryOpTest__{Method}{RetBaseType}() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _clsVar1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - } - - public {TemplateName}UnaryOpTest__{Method}{RetBaseType}() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - _dataTable = new DataTable(_data1, new {RetBaseType}[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => {Isa}.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = {Isa}.{Method}( - Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = {Isa}.{Method}( - {LoadIsa}.LoadAligned{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>) }) - .Invoke(null, new object[] { - Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, ({RetVectorType}<{RetBaseType}>)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>) }) - .Invoke(null, new object[] { - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, ({RetVectorType}<{RetBaseType}>)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>) }) - .Invoke(null, new object[] { - {LoadIsa}.LoadAligned{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, ({RetVectorType}<{RetBaseType}>)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = {Isa}.{Method}( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed ({Op1VectorType}<{Op1BaseType}>* pClsVar1 = &_clsVar1) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr); - var result = {Isa}.{Method}(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)); - var result = {Isa}.{Method}(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = {LoadIsa}.LoadAligned{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)); - var result = {Isa}.{Method}(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new {TemplateName}UnaryOpTest__{Method}{RetBaseType}(); - var result = {Isa}.{Method}(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new {TemplateName}UnaryOpTest__{Method}{RetBaseType}(); - - fixed ({Op1VectorType}<{Op1BaseType}>* pFld1 = &test._fld1) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = {Isa}.{Method}(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed ({Op1VectorType}<{Op1BaseType}>* pFld1 = &_fld1) - { - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = {Isa}.{Method}(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = {Isa}.{Method}( - {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult({Op1VectorType}<{Op1BaseType}> op1, void* result, [CallerMemberName] string method = "") - { - {Op1BaseType}[] inArray1 = new {Op1BaseType}[Op1ElementCount]; - {RetBaseType}[] outArray = new {RetBaseType}[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - {Op1BaseType}[] inArray1 = new {Op1BaseType}[Op1ElementCount]; - {RetBaseType}[] outArray = new {RetBaseType}[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult({Op1BaseType}[] firstOp, {RetBaseType}[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - {TemplateValidationLogic} - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse.X64/ConvertScalarToVector128Single.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse.X64/ConvertScalarToVector128Single.Single.cs deleted file mode 100644 index 14727312826a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse.X64/ConvertScalarToVector128Single.Single.cs +++ /dev/null @@ -1,395 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ConvertScalarToVector128SingleSingle() - { - var test = new SimpleBinaryOpConvTest__ConvertScalarToVector128SingleSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpConvTest__ConvertScalarToVector128SingleSingle - { - private struct TestStruct - { - public Vector128 _fld1; - public Int64 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - _data2 = TestLibrary.Generator.GetInt64(); - testStruct._fld2 = _data2; - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpConvTest__ConvertScalarToVector128SingleSingle testClass) - { - var result = Sse.X64.ConvertScalarToVector128Single(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Int64 _data2; - - private static Vector128 _clsVar1; - private static Int64 _clsVar2; - - private Vector128 _fld1; - private Int64 _fld2; - - private SimpleBinaryOpConvTest__DataTable _dataTable; - - static SimpleBinaryOpConvTest__ConvertScalarToVector128SingleSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - _data2 = TestLibrary.Generator.GetInt64(); - _clsVar2 = _data2; - } - - public SimpleBinaryOpConvTest__ConvertScalarToVector128SingleSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - _data2 = TestLibrary.Generator.GetInt64(); - _fld2 = _data2; - - _dataTable = new SimpleBinaryOpConvTest__DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse.X64.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.X64.ConvertScalarToVector128Single( - Unsafe.Read>(_dataTable.inArray1Ptr), - _dataTable.inData2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inData2, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.X64.ConvertScalarToVector128Single( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - _dataTable.inData2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inData2, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.X64.ConvertScalarToVector128Single( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - _dataTable.inData2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inData2, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse.X64).GetMethod(nameof(Sse.X64.ConvertScalarToVector128Single), new Type[] { typeof(Vector128), typeof(Int64) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - _dataTable.inData2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inData2, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse.X64).GetMethod(nameof(Sse.X64.ConvertScalarToVector128Single), new Type[] { typeof(Vector128), typeof(Int64) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - _dataTable.inData2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inData2, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse.X64).GetMethod(nameof(Sse.X64.ConvertScalarToVector128Single), new Type[] { typeof(Vector128), typeof(Int64) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - _dataTable.inData2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inData2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.X64.ConvertScalarToVector128Single( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = _dataTable.inData2; - var result = Sse.X64.ConvertScalarToVector128Single(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var right = _dataTable.inData2; - var result = Sse.X64.ConvertScalarToVector128Single(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var right = _dataTable.inData2; - var result = Sse.X64.ConvertScalarToVector128Single(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpConvTest__ConvertScalarToVector128SingleSingle(); - var result = Sse.X64.ConvertScalarToVector128Single(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.X64.ConvertScalarToVector128Single(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.X64.ConvertScalarToVector128Single(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 left, Int64 right, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, right, outArray, method); - } - - private void ValidateResult(void* left, Int64 right, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, right, outArray, method); - } - - private void ValidateResult(Single[] left, Int64 right, Single[] result, [CallerMemberName] string method = "") - { - if ((float)right != result[0]) - { - Succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != left[i]) - { - Succeeded = false; - break; - } - } - } - - if (!Succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse.X64)}.{nameof(Sse.X64.ConvertScalarToVector128Single)}(Vector128, Int64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Add.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Add.Single.cs deleted file mode 100644 index b67392cb404c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Add.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AddSingle() - { - var test = new SimpleBinaryOpTest__AddSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddSingle testClass) - { - var result = Sse.Add(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.Add( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.Add( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.Add( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.Add( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.Add), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.Add), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.Add), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.Add( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse.Add( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddSingle(); - var result = Sse.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse.Add( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.Add(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.Add( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse.Add( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(left[0] + right[0]) != BitConverter.SingleToInt32Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(left[i] + right[i]) != BitConverter.SingleToInt32Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.Add)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/And.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/And.Single.cs deleted file mode 100644 index fc7b9d86d704..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/And.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndSingle() - { - var test = new SimpleBinaryOpTest__AndSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndSingle testClass) - { - var result = Sse.And(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.And( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.And( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.And( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.And( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.And), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.And), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.And), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.And( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse.And( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndSingle(); - var result = Sse.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse.And( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.And(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.And( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse.And( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((BitConverter.SingleToInt32Bits(left[0]) & BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((BitConverter.SingleToInt32Bits(left[0]) & BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.And)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/AndNot.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/AndNot.Single.cs deleted file mode 100644 index cf660989977d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/AndNot.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndNotSingle() - { - var test = new SimpleBinaryOpTest__AndNotSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndNotSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndNotSingle testClass) - { - var result = Sse.AndNot(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndNotSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.AndNot( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndNotSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndNotSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.AndNot( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.AndNot( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.AndNot( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.AndNot), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.AndNot), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.AndNot), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.AndNot( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse.AndNot( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndNotSingle(); - var result = Sse.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndNotSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse.AndNot( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.AndNot(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.AndNot( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse.AndNot( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((~BitConverter.SingleToInt32Bits(left[0]) & BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((~BitConverter.SingleToInt32Bits(left[0]) & BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.AndNot)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareEqual.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareEqual.Single.cs deleted file mode 100644 index fc92b7c78bee..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareEqual.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareEqualSingle() - { - var test = new SimpleBinaryOpTest__CompareEqualSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareEqualSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareEqualSingle testClass) - { - var result = Sse.CompareEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareEqualSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareEqualSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareEqualSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.CompareEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.CompareEqual( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.CompareEqual( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.CompareEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse.CompareEqual( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareEqualSingle(); - var result = Sse.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareEqualSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse.CompareEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.CompareEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse.CompareEqual( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != ((left[0] == right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != ((left[i] == right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.CompareEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThan.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThan.Single.cs deleted file mode 100644 index 7a097424cc6d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThan.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareGreaterThanSingle() - { - var test = new SimpleBinaryOpTest__CompareGreaterThanSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareGreaterThanSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareGreaterThanSingle testClass) - { - var result = Sse.CompareGreaterThan(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareGreaterThanSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareGreaterThan( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareGreaterThanSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareGreaterThanSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.CompareGreaterThan( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.CompareGreaterThan( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.CompareGreaterThan( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.CompareGreaterThan( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse.CompareGreaterThan( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareGreaterThanSingle(); - var result = Sse.CompareGreaterThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareGreaterThanSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse.CompareGreaterThan( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.CompareGreaterThan(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareGreaterThan( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.CompareGreaterThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse.CompareGreaterThan( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != ((left[0] > right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != ((left[i] > right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.CompareGreaterThan)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThanOrEqual.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThanOrEqual.Single.cs deleted file mode 100644 index 326c701ec6a7..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThanOrEqual.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareGreaterThanOrEqualSingle() - { - var test = new SimpleBinaryOpTest__CompareGreaterThanOrEqualSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareGreaterThanOrEqualSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareGreaterThanOrEqualSingle testClass) - { - var result = Sse.CompareGreaterThanOrEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareGreaterThanOrEqualSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareGreaterThanOrEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareGreaterThanOrEqualSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareGreaterThanOrEqualSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.CompareGreaterThanOrEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.CompareGreaterThanOrEqual( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.CompareGreaterThanOrEqual( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareGreaterThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareGreaterThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareGreaterThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.CompareGreaterThanOrEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse.CompareGreaterThanOrEqual( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse.CompareGreaterThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareGreaterThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareGreaterThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareGreaterThanOrEqualSingle(); - var result = Sse.CompareGreaterThanOrEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareGreaterThanOrEqualSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse.CompareGreaterThanOrEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.CompareGreaterThanOrEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareGreaterThanOrEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.CompareGreaterThanOrEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse.CompareGreaterThanOrEqual( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != ((left[0] >= right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != ((left[i] >= right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.CompareGreaterThanOrEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThan.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThan.Single.cs deleted file mode 100644 index a8b4e34fd4fb..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThan.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareLessThanSingle() - { - var test = new SimpleBinaryOpTest__CompareLessThanSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareLessThanSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareLessThanSingle testClass) - { - var result = Sse.CompareLessThan(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareLessThanSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareLessThan( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareLessThanSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareLessThanSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.CompareLessThan( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.CompareLessThan( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.CompareLessThan( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareLessThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareLessThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareLessThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.CompareLessThan( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse.CompareLessThan( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse.CompareLessThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareLessThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareLessThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareLessThanSingle(); - var result = Sse.CompareLessThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareLessThanSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse.CompareLessThan( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.CompareLessThan(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareLessThan( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.CompareLessThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse.CompareLessThan( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != ((left[0] < right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != ((left[i] < right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.CompareLessThan)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThanOrEqual.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThanOrEqual.Single.cs deleted file mode 100644 index 91b5e3d01897..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThanOrEqual.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareLessThanOrEqualSingle() - { - var test = new SimpleBinaryOpTest__CompareLessThanOrEqualSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareLessThanOrEqualSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareLessThanOrEqualSingle testClass) - { - var result = Sse.CompareLessThanOrEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareLessThanOrEqualSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareLessThanOrEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareLessThanOrEqualSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareLessThanOrEqualSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.CompareLessThanOrEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.CompareLessThanOrEqual( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.CompareLessThanOrEqual( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareLessThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareLessThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareLessThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.CompareLessThanOrEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse.CompareLessThanOrEqual( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse.CompareLessThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareLessThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareLessThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareLessThanOrEqualSingle(); - var result = Sse.CompareLessThanOrEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareLessThanOrEqualSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse.CompareLessThanOrEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.CompareLessThanOrEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareLessThanOrEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.CompareLessThanOrEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse.CompareLessThanOrEqual( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != ((left[0] <= right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != ((left[i] <= right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.CompareLessThanOrEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotEqual.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotEqual.Single.cs deleted file mode 100644 index 404e3bb0fed6..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotEqual.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareNotEqualSingle() - { - var test = new SimpleBinaryOpTest__CompareNotEqualSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareNotEqualSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareNotEqualSingle testClass) - { - var result = Sse.CompareNotEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareNotEqualSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareNotEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareNotEqualSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareNotEqualSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.CompareNotEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.CompareNotEqual( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.CompareNotEqual( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareNotEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareNotEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareNotEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.CompareNotEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse.CompareNotEqual( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse.CompareNotEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareNotEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareNotEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareNotEqualSingle(); - var result = Sse.CompareNotEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareNotEqualSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse.CompareNotEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.CompareNotEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareNotEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.CompareNotEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse.CompareNotEqual( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != ((left[0] != right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != ((left[i] != right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.CompareNotEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotGreaterThan.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotGreaterThan.Single.cs deleted file mode 100644 index c634815f1df2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotGreaterThan.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareNotGreaterThanSingle() - { - var test = new SimpleBinaryOpTest__CompareNotGreaterThanSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareNotGreaterThanSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareNotGreaterThanSingle testClass) - { - var result = Sse.CompareNotGreaterThan(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareNotGreaterThanSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareNotGreaterThan( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareNotGreaterThanSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareNotGreaterThanSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.CompareNotGreaterThan( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.CompareNotGreaterThan( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.CompareNotGreaterThan( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareNotGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareNotGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareNotGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.CompareNotGreaterThan( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse.CompareNotGreaterThan( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse.CompareNotGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareNotGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareNotGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareNotGreaterThanSingle(); - var result = Sse.CompareNotGreaterThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareNotGreaterThanSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse.CompareNotGreaterThan( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.CompareNotGreaterThan(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareNotGreaterThan( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.CompareNotGreaterThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse.CompareNotGreaterThan( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != (!(left[0] > right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != (!(left[i] > right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.CompareNotGreaterThan)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotGreaterThanOrEqual.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotGreaterThanOrEqual.Single.cs deleted file mode 100644 index 9a8b8e121fd6..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotGreaterThanOrEqual.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareNotGreaterThanOrEqualSingle() - { - var test = new SimpleBinaryOpTest__CompareNotGreaterThanOrEqualSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareNotGreaterThanOrEqualSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareNotGreaterThanOrEqualSingle testClass) - { - var result = Sse.CompareNotGreaterThanOrEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareNotGreaterThanOrEqualSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareNotGreaterThanOrEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareNotGreaterThanOrEqualSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareNotGreaterThanOrEqualSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.CompareNotGreaterThanOrEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.CompareNotGreaterThanOrEqual( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.CompareNotGreaterThanOrEqual( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareNotGreaterThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareNotGreaterThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareNotGreaterThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.CompareNotGreaterThanOrEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse.CompareNotGreaterThanOrEqual( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse.CompareNotGreaterThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareNotGreaterThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareNotGreaterThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareNotGreaterThanOrEqualSingle(); - var result = Sse.CompareNotGreaterThanOrEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareNotGreaterThanOrEqualSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse.CompareNotGreaterThanOrEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.CompareNotGreaterThanOrEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareNotGreaterThanOrEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.CompareNotGreaterThanOrEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse.CompareNotGreaterThanOrEqual( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != (!(left[0] >= right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != (!(left[i] >= right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.CompareNotGreaterThanOrEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotLessThan.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotLessThan.Single.cs deleted file mode 100644 index 5b6bacac1e9b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotLessThan.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareNotLessThanSingle() - { - var test = new SimpleBinaryOpTest__CompareNotLessThanSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareNotLessThanSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareNotLessThanSingle testClass) - { - var result = Sse.CompareNotLessThan(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareNotLessThanSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareNotLessThan( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareNotLessThanSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareNotLessThanSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.CompareNotLessThan( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.CompareNotLessThan( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.CompareNotLessThan( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareNotLessThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareNotLessThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareNotLessThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.CompareNotLessThan( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse.CompareNotLessThan( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse.CompareNotLessThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareNotLessThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareNotLessThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareNotLessThanSingle(); - var result = Sse.CompareNotLessThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareNotLessThanSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse.CompareNotLessThan( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.CompareNotLessThan(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareNotLessThan( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.CompareNotLessThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse.CompareNotLessThan( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != (!(left[0] < right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != (!(left[i] < right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.CompareNotLessThan)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotLessThanOrEqual.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotLessThanOrEqual.Single.cs deleted file mode 100644 index e901fe74943c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotLessThanOrEqual.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareNotLessThanOrEqualSingle() - { - var test = new SimpleBinaryOpTest__CompareNotLessThanOrEqualSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareNotLessThanOrEqualSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareNotLessThanOrEqualSingle testClass) - { - var result = Sse.CompareNotLessThanOrEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareNotLessThanOrEqualSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareNotLessThanOrEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareNotLessThanOrEqualSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareNotLessThanOrEqualSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.CompareNotLessThanOrEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.CompareNotLessThanOrEqual( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.CompareNotLessThanOrEqual( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareNotLessThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareNotLessThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareNotLessThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.CompareNotLessThanOrEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse.CompareNotLessThanOrEqual( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse.CompareNotLessThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareNotLessThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareNotLessThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareNotLessThanOrEqualSingle(); - var result = Sse.CompareNotLessThanOrEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareNotLessThanOrEqualSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse.CompareNotLessThanOrEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.CompareNotLessThanOrEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareNotLessThanOrEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.CompareNotLessThanOrEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse.CompareNotLessThanOrEqual( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != (!(left[0] <= right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != (!(left[i] <= right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.CompareNotLessThanOrEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareOrdered.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareOrdered.Single.cs deleted file mode 100644 index be2ff1a9386e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareOrdered.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareOrderedSingle() - { - var test = new SimpleBinaryOpTest__CompareOrderedSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareOrderedSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareOrderedSingle testClass) - { - var result = Sse.CompareOrdered(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareOrderedSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareOrdered( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareOrderedSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareOrderedSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.CompareOrdered( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.CompareOrdered( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.CompareOrdered( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareOrdered), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareOrdered), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareOrdered), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.CompareOrdered( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse.CompareOrdered( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse.CompareOrdered(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareOrdered(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareOrdered(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareOrderedSingle(); - var result = Sse.CompareOrdered(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareOrderedSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse.CompareOrdered( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.CompareOrdered(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareOrdered( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.CompareOrdered(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse.CompareOrdered( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != ((!float.IsNaN(left[0]) && !float.IsNaN(right[0])) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != ((!float.IsNaN(left[i]) && !float.IsNaN(right[i])) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.CompareOrdered)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarOrderedEqual.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarOrderedEqual.Boolean.cs deleted file mode 100644 index 3d4e3884dff2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarOrderedEqual.Boolean.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareScalarOrderedEqualBoolean() - { - var test = new BooleanBinaryOpTest__CompareScalarOrderedEqualBoolean(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__CompareScalarOrderedEqualBoolean - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__CompareScalarOrderedEqualBoolean testClass) - { - var result = Sse.CompareScalarOrderedEqual(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__CompareScalarOrderedEqualBoolean testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareScalarOrderedEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__CompareScalarOrderedEqualBoolean() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__CompareScalarOrderedEqualBoolean() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.CompareScalarOrderedEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.CompareScalarOrderedEqual( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.CompareScalarOrderedEqual( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarOrderedEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarOrderedEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarOrderedEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.CompareScalarOrderedEqual( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse.CompareScalarOrderedEqual( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse.CompareScalarOrderedEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareScalarOrderedEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareScalarOrderedEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__CompareScalarOrderedEqualBoolean(); - var result = Sse.CompareScalarOrderedEqual(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__CompareScalarOrderedEqualBoolean(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse.CompareScalarOrderedEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.CompareScalarOrderedEqual(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareScalarOrderedEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.CompareScalarOrderedEqual(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse.CompareScalarOrderedEqual( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Single[] left, Single[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((left[0] == right[0]) != result) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.CompareScalarOrderedEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarOrderedGreaterThan.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarOrderedGreaterThan.Boolean.cs deleted file mode 100644 index 34804fad3056..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarOrderedGreaterThan.Boolean.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareScalarOrderedGreaterThanBoolean() - { - var test = new BooleanBinaryOpTest__CompareScalarOrderedGreaterThanBoolean(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__CompareScalarOrderedGreaterThanBoolean - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__CompareScalarOrderedGreaterThanBoolean testClass) - { - var result = Sse.CompareScalarOrderedGreaterThan(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__CompareScalarOrderedGreaterThanBoolean testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareScalarOrderedGreaterThan( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__CompareScalarOrderedGreaterThanBoolean() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__CompareScalarOrderedGreaterThanBoolean() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.CompareScalarOrderedGreaterThan( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.CompareScalarOrderedGreaterThan( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.CompareScalarOrderedGreaterThan( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarOrderedGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarOrderedGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarOrderedGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.CompareScalarOrderedGreaterThan( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse.CompareScalarOrderedGreaterThan( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse.CompareScalarOrderedGreaterThan(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareScalarOrderedGreaterThan(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareScalarOrderedGreaterThan(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__CompareScalarOrderedGreaterThanBoolean(); - var result = Sse.CompareScalarOrderedGreaterThan(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__CompareScalarOrderedGreaterThanBoolean(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse.CompareScalarOrderedGreaterThan( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.CompareScalarOrderedGreaterThan(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareScalarOrderedGreaterThan( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.CompareScalarOrderedGreaterThan(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse.CompareScalarOrderedGreaterThan( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Single[] left, Single[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((left[0] > right[0]) != result) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.CompareScalarOrderedGreaterThan)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarOrderedGreaterThanOrEqual.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarOrderedGreaterThanOrEqual.Boolean.cs deleted file mode 100644 index ef180fb9adb5..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarOrderedGreaterThanOrEqual.Boolean.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareScalarOrderedGreaterThanOrEqualBoolean() - { - var test = new BooleanBinaryOpTest__CompareScalarOrderedGreaterThanOrEqualBoolean(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__CompareScalarOrderedGreaterThanOrEqualBoolean - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__CompareScalarOrderedGreaterThanOrEqualBoolean testClass) - { - var result = Sse.CompareScalarOrderedGreaterThanOrEqual(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__CompareScalarOrderedGreaterThanOrEqualBoolean testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareScalarOrderedGreaterThanOrEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__CompareScalarOrderedGreaterThanOrEqualBoolean() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__CompareScalarOrderedGreaterThanOrEqualBoolean() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.CompareScalarOrderedGreaterThanOrEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.CompareScalarOrderedGreaterThanOrEqual( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.CompareScalarOrderedGreaterThanOrEqual( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarOrderedGreaterThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarOrderedGreaterThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarOrderedGreaterThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.CompareScalarOrderedGreaterThanOrEqual( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse.CompareScalarOrderedGreaterThanOrEqual( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse.CompareScalarOrderedGreaterThanOrEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareScalarOrderedGreaterThanOrEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareScalarOrderedGreaterThanOrEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__CompareScalarOrderedGreaterThanOrEqualBoolean(); - var result = Sse.CompareScalarOrderedGreaterThanOrEqual(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__CompareScalarOrderedGreaterThanOrEqualBoolean(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse.CompareScalarOrderedGreaterThanOrEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.CompareScalarOrderedGreaterThanOrEqual(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareScalarOrderedGreaterThanOrEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.CompareScalarOrderedGreaterThanOrEqual(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse.CompareScalarOrderedGreaterThanOrEqual( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Single[] left, Single[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((left[0] >= right[0]) != result) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.CompareScalarOrderedGreaterThanOrEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarOrderedLessThan.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarOrderedLessThan.Boolean.cs deleted file mode 100644 index 5303302b7b4d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarOrderedLessThan.Boolean.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareScalarOrderedLessThanBoolean() - { - var test = new BooleanBinaryOpTest__CompareScalarOrderedLessThanBoolean(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__CompareScalarOrderedLessThanBoolean - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__CompareScalarOrderedLessThanBoolean testClass) - { - var result = Sse.CompareScalarOrderedLessThan(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__CompareScalarOrderedLessThanBoolean testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareScalarOrderedLessThan( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__CompareScalarOrderedLessThanBoolean() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__CompareScalarOrderedLessThanBoolean() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.CompareScalarOrderedLessThan( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.CompareScalarOrderedLessThan( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.CompareScalarOrderedLessThan( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarOrderedLessThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarOrderedLessThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarOrderedLessThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.CompareScalarOrderedLessThan( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse.CompareScalarOrderedLessThan( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse.CompareScalarOrderedLessThan(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareScalarOrderedLessThan(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareScalarOrderedLessThan(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__CompareScalarOrderedLessThanBoolean(); - var result = Sse.CompareScalarOrderedLessThan(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__CompareScalarOrderedLessThanBoolean(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse.CompareScalarOrderedLessThan( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.CompareScalarOrderedLessThan(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareScalarOrderedLessThan( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.CompareScalarOrderedLessThan(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse.CompareScalarOrderedLessThan( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Single[] left, Single[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((left[0] < right[0]) != result) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.CompareScalarOrderedLessThan)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarOrderedLessThanOrEqual.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarOrderedLessThanOrEqual.Boolean.cs deleted file mode 100644 index 5346039ee498..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarOrderedLessThanOrEqual.Boolean.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareScalarOrderedLessThanOrEqualBoolean() - { - var test = new BooleanBinaryOpTest__CompareScalarOrderedLessThanOrEqualBoolean(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__CompareScalarOrderedLessThanOrEqualBoolean - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__CompareScalarOrderedLessThanOrEqualBoolean testClass) - { - var result = Sse.CompareScalarOrderedLessThanOrEqual(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__CompareScalarOrderedLessThanOrEqualBoolean testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareScalarOrderedLessThanOrEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__CompareScalarOrderedLessThanOrEqualBoolean() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__CompareScalarOrderedLessThanOrEqualBoolean() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.CompareScalarOrderedLessThanOrEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.CompareScalarOrderedLessThanOrEqual( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.CompareScalarOrderedLessThanOrEqual( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarOrderedLessThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarOrderedLessThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarOrderedLessThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.CompareScalarOrderedLessThanOrEqual( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse.CompareScalarOrderedLessThanOrEqual( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse.CompareScalarOrderedLessThanOrEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareScalarOrderedLessThanOrEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareScalarOrderedLessThanOrEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__CompareScalarOrderedLessThanOrEqualBoolean(); - var result = Sse.CompareScalarOrderedLessThanOrEqual(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__CompareScalarOrderedLessThanOrEqualBoolean(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse.CompareScalarOrderedLessThanOrEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.CompareScalarOrderedLessThanOrEqual(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareScalarOrderedLessThanOrEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.CompareScalarOrderedLessThanOrEqual(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse.CompareScalarOrderedLessThanOrEqual( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Single[] left, Single[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((left[0] <= right[0]) != result) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.CompareScalarOrderedLessThanOrEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarOrderedNotEqual.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarOrderedNotEqual.Boolean.cs deleted file mode 100644 index 795e875baa86..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarOrderedNotEqual.Boolean.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareScalarOrderedNotEqualBoolean() - { - var test = new BooleanBinaryOpTest__CompareScalarOrderedNotEqualBoolean(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__CompareScalarOrderedNotEqualBoolean - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__CompareScalarOrderedNotEqualBoolean testClass) - { - var result = Sse.CompareScalarOrderedNotEqual(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__CompareScalarOrderedNotEqualBoolean testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareScalarOrderedNotEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__CompareScalarOrderedNotEqualBoolean() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__CompareScalarOrderedNotEqualBoolean() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.CompareScalarOrderedNotEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.CompareScalarOrderedNotEqual( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.CompareScalarOrderedNotEqual( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarOrderedNotEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarOrderedNotEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarOrderedNotEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.CompareScalarOrderedNotEqual( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse.CompareScalarOrderedNotEqual( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse.CompareScalarOrderedNotEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareScalarOrderedNotEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareScalarOrderedNotEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__CompareScalarOrderedNotEqualBoolean(); - var result = Sse.CompareScalarOrderedNotEqual(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__CompareScalarOrderedNotEqualBoolean(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse.CompareScalarOrderedNotEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.CompareScalarOrderedNotEqual(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareScalarOrderedNotEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.CompareScalarOrderedNotEqual(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse.CompareScalarOrderedNotEqual( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Single[] left, Single[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((left[0] != right[0]) != result) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.CompareScalarOrderedNotEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarUnorderedEqual.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarUnorderedEqual.Boolean.cs deleted file mode 100644 index d69b339bd4b1..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarUnorderedEqual.Boolean.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareScalarUnorderedEqualBoolean() - { - var test = new BooleanBinaryOpTest__CompareScalarUnorderedEqualBoolean(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__CompareScalarUnorderedEqualBoolean - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__CompareScalarUnorderedEqualBoolean testClass) - { - var result = Sse.CompareScalarUnorderedEqual(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__CompareScalarUnorderedEqualBoolean testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareScalarUnorderedEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__CompareScalarUnorderedEqualBoolean() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__CompareScalarUnorderedEqualBoolean() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.CompareScalarUnorderedEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.CompareScalarUnorderedEqual( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.CompareScalarUnorderedEqual( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarUnorderedEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarUnorderedEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarUnorderedEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.CompareScalarUnorderedEqual( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse.CompareScalarUnorderedEqual( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse.CompareScalarUnorderedEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareScalarUnorderedEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareScalarUnorderedEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__CompareScalarUnorderedEqualBoolean(); - var result = Sse.CompareScalarUnorderedEqual(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__CompareScalarUnorderedEqualBoolean(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse.CompareScalarUnorderedEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.CompareScalarUnorderedEqual(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareScalarUnorderedEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.CompareScalarUnorderedEqual(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse.CompareScalarUnorderedEqual( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Single[] left, Single[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((left[0] == right[0]) != result) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.CompareScalarUnorderedEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarUnorderedGreaterThan.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarUnorderedGreaterThan.Boolean.cs deleted file mode 100644 index bb610817b052..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarUnorderedGreaterThan.Boolean.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareScalarUnorderedGreaterThanBoolean() - { - var test = new BooleanBinaryOpTest__CompareScalarUnorderedGreaterThanBoolean(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__CompareScalarUnorderedGreaterThanBoolean - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__CompareScalarUnorderedGreaterThanBoolean testClass) - { - var result = Sse.CompareScalarUnorderedGreaterThan(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__CompareScalarUnorderedGreaterThanBoolean testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareScalarUnorderedGreaterThan( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__CompareScalarUnorderedGreaterThanBoolean() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__CompareScalarUnorderedGreaterThanBoolean() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.CompareScalarUnorderedGreaterThan( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.CompareScalarUnorderedGreaterThan( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.CompareScalarUnorderedGreaterThan( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarUnorderedGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarUnorderedGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarUnorderedGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.CompareScalarUnorderedGreaterThan( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse.CompareScalarUnorderedGreaterThan( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse.CompareScalarUnorderedGreaterThan(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareScalarUnorderedGreaterThan(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareScalarUnorderedGreaterThan(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__CompareScalarUnorderedGreaterThanBoolean(); - var result = Sse.CompareScalarUnorderedGreaterThan(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__CompareScalarUnorderedGreaterThanBoolean(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse.CompareScalarUnorderedGreaterThan( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.CompareScalarUnorderedGreaterThan(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareScalarUnorderedGreaterThan( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.CompareScalarUnorderedGreaterThan(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse.CompareScalarUnorderedGreaterThan( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Single[] left, Single[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((left[0] > right[0]) != result) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.CompareScalarUnorderedGreaterThan)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarUnorderedGreaterThanOrEqual.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarUnorderedGreaterThanOrEqual.Boolean.cs deleted file mode 100644 index aca96b5f195c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarUnorderedGreaterThanOrEqual.Boolean.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareScalarUnorderedGreaterThanOrEqualBoolean() - { - var test = new BooleanBinaryOpTest__CompareScalarUnorderedGreaterThanOrEqualBoolean(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__CompareScalarUnorderedGreaterThanOrEqualBoolean - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__CompareScalarUnorderedGreaterThanOrEqualBoolean testClass) - { - var result = Sse.CompareScalarUnorderedGreaterThanOrEqual(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__CompareScalarUnorderedGreaterThanOrEqualBoolean testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareScalarUnorderedGreaterThanOrEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__CompareScalarUnorderedGreaterThanOrEqualBoolean() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__CompareScalarUnorderedGreaterThanOrEqualBoolean() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.CompareScalarUnorderedGreaterThanOrEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.CompareScalarUnorderedGreaterThanOrEqual( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.CompareScalarUnorderedGreaterThanOrEqual( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarUnorderedGreaterThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarUnorderedGreaterThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarUnorderedGreaterThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.CompareScalarUnorderedGreaterThanOrEqual( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse.CompareScalarUnorderedGreaterThanOrEqual( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse.CompareScalarUnorderedGreaterThanOrEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareScalarUnorderedGreaterThanOrEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareScalarUnorderedGreaterThanOrEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__CompareScalarUnorderedGreaterThanOrEqualBoolean(); - var result = Sse.CompareScalarUnorderedGreaterThanOrEqual(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__CompareScalarUnorderedGreaterThanOrEqualBoolean(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse.CompareScalarUnorderedGreaterThanOrEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.CompareScalarUnorderedGreaterThanOrEqual(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareScalarUnorderedGreaterThanOrEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.CompareScalarUnorderedGreaterThanOrEqual(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse.CompareScalarUnorderedGreaterThanOrEqual( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Single[] left, Single[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((left[0] >= right[0]) != result) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.CompareScalarUnorderedGreaterThanOrEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarUnorderedLessThan.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarUnorderedLessThan.Boolean.cs deleted file mode 100644 index 3c3210bd58b2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarUnorderedLessThan.Boolean.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareScalarUnorderedLessThanBoolean() - { - var test = new BooleanBinaryOpTest__CompareScalarUnorderedLessThanBoolean(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__CompareScalarUnorderedLessThanBoolean - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__CompareScalarUnorderedLessThanBoolean testClass) - { - var result = Sse.CompareScalarUnorderedLessThan(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__CompareScalarUnorderedLessThanBoolean testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareScalarUnorderedLessThan( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__CompareScalarUnorderedLessThanBoolean() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__CompareScalarUnorderedLessThanBoolean() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.CompareScalarUnorderedLessThan( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.CompareScalarUnorderedLessThan( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.CompareScalarUnorderedLessThan( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarUnorderedLessThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarUnorderedLessThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarUnorderedLessThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.CompareScalarUnorderedLessThan( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse.CompareScalarUnorderedLessThan( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse.CompareScalarUnorderedLessThan(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareScalarUnorderedLessThan(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareScalarUnorderedLessThan(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__CompareScalarUnorderedLessThanBoolean(); - var result = Sse.CompareScalarUnorderedLessThan(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__CompareScalarUnorderedLessThanBoolean(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse.CompareScalarUnorderedLessThan( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.CompareScalarUnorderedLessThan(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareScalarUnorderedLessThan( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.CompareScalarUnorderedLessThan(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse.CompareScalarUnorderedLessThan( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Single[] left, Single[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((left[0] < right[0]) != result) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.CompareScalarUnorderedLessThan)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarUnorderedLessThanOrEqual.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarUnorderedLessThanOrEqual.Boolean.cs deleted file mode 100644 index 59a461221514..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarUnorderedLessThanOrEqual.Boolean.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareScalarUnorderedLessThanOrEqualBoolean() - { - var test = new BooleanBinaryOpTest__CompareScalarUnorderedLessThanOrEqualBoolean(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__CompareScalarUnorderedLessThanOrEqualBoolean - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__CompareScalarUnorderedLessThanOrEqualBoolean testClass) - { - var result = Sse.CompareScalarUnorderedLessThanOrEqual(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__CompareScalarUnorderedLessThanOrEqualBoolean testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareScalarUnorderedLessThanOrEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__CompareScalarUnorderedLessThanOrEqualBoolean() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__CompareScalarUnorderedLessThanOrEqualBoolean() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.CompareScalarUnorderedLessThanOrEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.CompareScalarUnorderedLessThanOrEqual( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.CompareScalarUnorderedLessThanOrEqual( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarUnorderedLessThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarUnorderedLessThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarUnorderedLessThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.CompareScalarUnorderedLessThanOrEqual( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse.CompareScalarUnorderedLessThanOrEqual( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse.CompareScalarUnorderedLessThanOrEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareScalarUnorderedLessThanOrEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareScalarUnorderedLessThanOrEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__CompareScalarUnorderedLessThanOrEqualBoolean(); - var result = Sse.CompareScalarUnorderedLessThanOrEqual(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__CompareScalarUnorderedLessThanOrEqualBoolean(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse.CompareScalarUnorderedLessThanOrEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.CompareScalarUnorderedLessThanOrEqual(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareScalarUnorderedLessThanOrEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.CompareScalarUnorderedLessThanOrEqual(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse.CompareScalarUnorderedLessThanOrEqual( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Single[] left, Single[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((left[0] <= right[0]) != result) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.CompareScalarUnorderedLessThanOrEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarUnorderedNotEqual.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarUnorderedNotEqual.Boolean.cs deleted file mode 100644 index 2b0cd76cfa1a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareScalarUnorderedNotEqual.Boolean.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareScalarUnorderedNotEqualBoolean() - { - var test = new BooleanBinaryOpTest__CompareScalarUnorderedNotEqualBoolean(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__CompareScalarUnorderedNotEqualBoolean - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__CompareScalarUnorderedNotEqualBoolean testClass) - { - var result = Sse.CompareScalarUnorderedNotEqual(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__CompareScalarUnorderedNotEqualBoolean testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareScalarUnorderedNotEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__CompareScalarUnorderedNotEqualBoolean() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__CompareScalarUnorderedNotEqualBoolean() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.CompareScalarUnorderedNotEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.CompareScalarUnorderedNotEqual( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.CompareScalarUnorderedNotEqual( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarUnorderedNotEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarUnorderedNotEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareScalarUnorderedNotEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.CompareScalarUnorderedNotEqual( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse.CompareScalarUnorderedNotEqual( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse.CompareScalarUnorderedNotEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareScalarUnorderedNotEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareScalarUnorderedNotEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__CompareScalarUnorderedNotEqualBoolean(); - var result = Sse.CompareScalarUnorderedNotEqual(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__CompareScalarUnorderedNotEqualBoolean(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse.CompareScalarUnorderedNotEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.CompareScalarUnorderedNotEqual(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareScalarUnorderedNotEqual( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.CompareScalarUnorderedNotEqual(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse.CompareScalarUnorderedNotEqual( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Single[] left, Single[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((left[0] != right[0]) != result) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.CompareScalarUnorderedNotEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareUnordered.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareUnordered.Single.cs deleted file mode 100644 index c6430e0fc80a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareUnordered.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareUnorderedSingle() - { - var test = new SimpleBinaryOpTest__CompareUnorderedSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareUnorderedSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareUnorderedSingle testClass) - { - var result = Sse.CompareUnordered(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareUnorderedSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareUnordered( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareUnorderedSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareUnorderedSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.CompareUnordered( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.CompareUnordered( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.CompareUnordered( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareUnordered), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareUnordered), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.CompareUnordered), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.CompareUnordered( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse.CompareUnordered( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse.CompareUnordered(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareUnordered(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.CompareUnordered(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareUnorderedSingle(); - var result = Sse.CompareUnordered(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareUnorderedSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse.CompareUnordered( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.CompareUnordered(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.CompareUnordered( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.CompareUnordered(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse.CompareUnordered( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != ((float.IsNaN(left[0]) || float.IsNaN(right[0])) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != ((float.IsNaN(left[i]) || float.IsNaN(right[i])) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.CompareUnordered)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/ConvertScalarToVector128Single.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/ConvertScalarToVector128Single.Single.cs deleted file mode 100644 index c7bcd98799dd..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/ConvertScalarToVector128Single.Single.cs +++ /dev/null @@ -1,395 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ConvertScalarToVector128SingleSingle() - { - var test = new SimpleBinaryOpConvTest__ConvertScalarToVector128SingleSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpConvTest__ConvertScalarToVector128SingleSingle - { - private struct TestStruct - { - public Vector128 _fld1; - public Int32 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - _data2 = TestLibrary.Generator.GetInt32(); - testStruct._fld2 = _data2; - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpConvTest__ConvertScalarToVector128SingleSingle testClass) - { - var result = Sse.ConvertScalarToVector128Single(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Int32 _data2; - - private static Vector128 _clsVar1; - private static Int32 _clsVar2; - - private Vector128 _fld1; - private Int32 _fld2; - - private SimpleBinaryOpConvTest__DataTable _dataTable; - - static SimpleBinaryOpConvTest__ConvertScalarToVector128SingleSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - _data2 = TestLibrary.Generator.GetInt32(); - _clsVar2 = _data2; - } - - public SimpleBinaryOpConvTest__ConvertScalarToVector128SingleSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - _data2 = TestLibrary.Generator.GetInt32(); - _fld2 = _data2; - - _dataTable = new SimpleBinaryOpConvTest__DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.ConvertScalarToVector128Single( - Unsafe.Read>(_dataTable.inArray1Ptr), - _dataTable.inData2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inData2, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.ConvertScalarToVector128Single( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - _dataTable.inData2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inData2, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.ConvertScalarToVector128Single( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - _dataTable.inData2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inData2, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.ConvertScalarToVector128Single), new Type[] { typeof(Vector128), typeof(Int32) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - _dataTable.inData2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inData2, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.ConvertScalarToVector128Single), new Type[] { typeof(Vector128), typeof(Int32) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - _dataTable.inData2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inData2, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.ConvertScalarToVector128Single), new Type[] { typeof(Vector128), typeof(Int32) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - _dataTable.inData2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inData2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.ConvertScalarToVector128Single( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = _dataTable.inData2; - var result = Sse.ConvertScalarToVector128Single(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var right = _dataTable.inData2; - var result = Sse.ConvertScalarToVector128Single(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var right = _dataTable.inData2; - var result = Sse.ConvertScalarToVector128Single(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpConvTest__ConvertScalarToVector128SingleSingle(); - var result = Sse.ConvertScalarToVector128Single(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.ConvertScalarToVector128Single(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.ConvertScalarToVector128Single(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 left, Int32 right, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, right, outArray, method); - } - - private void ValidateResult(void* left, Int32 right, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, right, outArray, method); - } - - private void ValidateResult(Single[] left, Int32 right, Single[] result, [CallerMemberName] string method = "") - { - if ((float)right != result[0]) - { - Succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != left[i]) - { - Succeeded = false; - break; - } - } - } - - if (!Succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.ConvertScalarToVector128Single)}(Vector128, Int32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Divide.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Divide.Single.cs deleted file mode 100644 index f39ff7fc6f82..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Divide.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void DivideSingle() - { - var test = new SimpleBinaryOpTest__DivideSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__DivideSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__DivideSingle testClass) - { - var result = Sse.Divide(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__DivideSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.Divide( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__DivideSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__DivideSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.Divide( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.Divide( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.Divide( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.Divide), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.Divide), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.Divide), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.Divide( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse.Divide( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse.Divide(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.Divide(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.Divide(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__DivideSingle(); - var result = Sse.Divide(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__DivideSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse.Divide( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.Divide(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.Divide( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.Divide(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse.Divide( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(left[0] / right[0]) != BitConverter.SingleToInt32Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(left[i] / right[i]) != BitConverter.SingleToInt32Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.Divide)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/LoadAlignedVector128.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/LoadAlignedVector128.cs deleted file mode 100644 index eaf69099410c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/LoadAlignedVector128.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Sse.IsSupported) - { - byte* inBuffer = stackalloc byte[32]; - float* inArray = Align(inBuffer, 16); - float* outArray = stackalloc float[4]; - - var vf = Sse.LoadAlignedVector128(inArray); - Unsafe.Write(outArray, vf); - - for (var i = 0; i < 4; i++) - { - if (BitConverter.SingleToInt32Bits(inArray[i]) != BitConverter.SingleToInt32Bits(outArray[i])) - { - Console.WriteLine("SSE LoadAlignedVector128 failed on float:"); - for (var n = 0; n < 4; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - return testResult; - } - - static unsafe float* Align(byte* buffer, byte expectedAlignment) - { - // Compute how bad the misalignment is, which is at most (expectedAlignment - 1). - // Then subtract that from the expectedAlignment and add it to the original address - // to compute the aligned address. - - var misalignment = expectedAlignment - ((ulong)(buffer) % expectedAlignment); - return (float*)(buffer + misalignment); - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/LoadHigh.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/LoadHigh.cs deleted file mode 100644 index 3e350f851681..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/LoadHigh.cs +++ /dev/null @@ -1,85 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Sse.IsSupported) - { - using (TestTable floatTable = new TestTable(new float[4] { 1, -5, 100, 0 }, new float[4] { 22, -1, -50, 0 }, new float[4])) - { - var vf1 = Unsafe.Read>(floatTable.inArray1Ptr); - var vf2 = Sse.LoadHigh(vf1, (float*)(floatTable.inArray2Ptr)); - Unsafe.Write(floatTable.outArrayPtr, vf2); - - if (!floatTable.CheckResult((x, y, z) => z[0] == x[0] && z[1] == x[1] && - z[2] == y[0] && z[3] == y[1])) - { - Console.WriteLine("SSE LoadHigh failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - } - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T : struct - { - public T[] inArray1; - public T[] inArray2; - public T[] outArray; - - public void* inArray1Ptr => inHandle1.AddrOfPinnedObject().ToPointer(); - public void* inArray2Ptr => inHandle2.AddrOfPinnedObject().ToPointer(); - public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); - - GCHandle inHandle1; - GCHandle inHandle2; - GCHandle outHandle; - public TestTable(T[] a, T[] b, T[] c) - { - this.inArray1 = a; - this.inArray2 = b; - this.outArray = c; - - inHandle1 = GCHandle.Alloc(inArray1, GCHandleType.Pinned); - inHandle2 = GCHandle.Alloc(inArray2, GCHandleType.Pinned); - outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); - } - public bool CheckResult(Func check) - { - return check(inArray1, inArray2, outArray); - } - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - } - - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/LoadLow.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/LoadLow.cs deleted file mode 100644 index 5bec2542bacb..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/LoadLow.cs +++ /dev/null @@ -1,85 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Sse.IsSupported) - { - using (TestTable floatTable = new TestTable(new float[4] { 1, -5, 100, 0 }, new float[4] { 22, -1, -50, 0 }, new float[4])) - { - var vf1 = Unsafe.Read>(floatTable.inArray1Ptr); - var vf2 = Sse.LoadLow(vf1, (float*)(floatTable.inArray2Ptr)); - Unsafe.Write(floatTable.outArrayPtr, vf2); - - if (!floatTable.CheckResult((x, y, z) => z[0] == y[0] && z[1] == y[1] && - z[2] == x[2] && z[3] == x[3])) - { - Console.WriteLine("SSE LoadLow failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - } - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T : struct - { - public T[] inArray1; - public T[] inArray2; - public T[] outArray; - - public void* inArray1Ptr => inHandle1.AddrOfPinnedObject().ToPointer(); - public void* inArray2Ptr => inHandle2.AddrOfPinnedObject().ToPointer(); - public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); - - GCHandle inHandle1; - GCHandle inHandle2; - GCHandle outHandle; - public TestTable(T[] a, T[] b, T[] c) - { - this.inArray1 = a; - this.inArray2 = b; - this.outArray = c; - - inHandle1 = GCHandle.Alloc(inArray1, GCHandleType.Pinned); - inHandle2 = GCHandle.Alloc(inArray2, GCHandleType.Pinned); - outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); - } - public bool CheckResult(Func check) - { - return check(inArray1, inArray2, outArray); - } - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - } - - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/LoadVector128.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/LoadVector128.Single.cs deleted file mode 100644 index dee05e6ae533..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/LoadVector128.Single.cs +++ /dev/null @@ -1,165 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void LoadVector128Single() - { - var test = new SimpleUnaryOpTest__LoadVector128Single(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__LoadVector128Single - { - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data = new Single[Op1ElementCount]; - - private SimpleUnaryOpTest__DataTable _dataTable; - - public SimpleUnaryOpTest__LoadVector128Single() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.LoadVector128( - (Single*)(_dataTable.inArrayPtr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.LoadVector128), new Type[] { typeof(Single*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArrayPtr, typeof(Single*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Single[] inArray = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Single[] inArray = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(firstOp[i]) != BitConverter.SingleToInt32Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.LoadVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Max.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Max.Single.cs deleted file mode 100644 index ffa37934946a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Max.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaxSingle() - { - var test = new SimpleBinaryOpTest__MaxSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MaxSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MaxSingle testClass) - { - var result = Sse.Max(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MaxSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.Max( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MaxSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MaxSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.Max( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.Max( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.Max( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.Max), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.Max), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.Max), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.Max( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse.Max( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MaxSingle(); - var result = Sse.Max(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MaxSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse.Max( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.Max(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.Max( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.Max(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse.Max( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(Math.Max(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(Math.Max(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.Max)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Min.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Min.Single.cs deleted file mode 100644 index 5fc0bc0d8f85..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Min.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MinSingle() - { - var test = new SimpleBinaryOpTest__MinSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MinSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MinSingle testClass) - { - var result = Sse.Min(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MinSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.Min( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MinSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MinSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.Min( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.Min( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.Min( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.Min), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.Min), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.Min), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.Min( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse.Min( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MinSingle(); - var result = Sse.Min(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MinSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse.Min( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.Min(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.Min( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.Min(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse.Min( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(Math.Min(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(Math.Min(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.Min)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/MoveMask.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/MoveMask.cs deleted file mode 100644 index d560701447f4..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/MoveMask.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Sse.IsSupported) - { - using (TestTable floatTable = new TestTable(new float[4] { 1, -5, 100, 0 })) - { - - var vf1 = Unsafe.Read>(floatTable.inArray1Ptr); - var res = Sse.MoveMask(vf1); - - if (res != 0b0010) - { - Console.WriteLine("SSE MoveMask failed on float:"); - Console.WriteLine(res); - testResult = Fail; - } - } - } - - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T : struct - { - public T[] inArray1; - public void* inArray1Ptr => inHandle1.AddrOfPinnedObject().ToPointer(); - GCHandle inHandle1; - - public TestTable(T[] a) - { - this.inArray1 = a; - inHandle1 = GCHandle.Alloc(inArray1, GCHandleType.Pinned); - } - - public void Dispose() - { - inHandle1.Free(); - } - } - - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/MoveScalar.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/MoveScalar.cs deleted file mode 100644 index 80ae740ffa64..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/MoveScalar.cs +++ /dev/null @@ -1,88 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Sse.IsSupported) - { - using (TestTable floatTable = new TestTable(new float[4] { 1, -5, 100, 0 }, new float[4] { 22, -1, -50, 0 }, new float[4])) - { - - var vf1 = Unsafe.Read>(floatTable.inArray1Ptr); - var vf2 = Unsafe.Read>(floatTable.inArray2Ptr); - var vf3 = Sse.MoveScalar(vf1, vf2); - Unsafe.Write(floatTable.outArrayPtr, vf3); - - if (!floatTable.CheckResult((x, y, z) => (z[0] == y[0]) && (z[1] == x[1]) && - (z[2] == x[2]) && (z[3] == x[3]))) - { - Console.WriteLine("SSE MoveScalar failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - } - - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T : struct - { - public T[] inArray1; - public T[] inArray2; - public T[] outArray; - - public void* inArray1Ptr => inHandle1.AddrOfPinnedObject().ToPointer(); - public void* inArray2Ptr => inHandle2.AddrOfPinnedObject().ToPointer(); - public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); - - GCHandle inHandle1; - GCHandle inHandle2; - GCHandle outHandle; - public TestTable(T[] a, T[] b, T[] c) - { - this.inArray1 = a; - this.inArray2 = b; - this.outArray = c; - - inHandle1 = GCHandle.Alloc(inArray1, GCHandleType.Pinned); - inHandle2 = GCHandle.Alloc(inArray2, GCHandleType.Pinned); - outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); - } - public bool CheckResult(Func check) - { - return check(inArray1, inArray2, outArray); - } - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - } - - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Multiply.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Multiply.Single.cs deleted file mode 100644 index 43af71dbad41..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Multiply.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplySingle() - { - var test = new SimpleBinaryOpTest__MultiplySingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MultiplySingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MultiplySingle testClass) - { - var result = Sse.Multiply(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MultiplySingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.Multiply( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MultiplySingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MultiplySingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.Multiply( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.Multiply( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.Multiply( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.Multiply), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.Multiply), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.Multiply), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.Multiply( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse.Multiply( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse.Multiply(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.Multiply(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.Multiply(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MultiplySingle(); - var result = Sse.Multiply(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MultiplySingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse.Multiply( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.Multiply(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.Multiply( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.Multiply(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse.Multiply( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(left[0] * right[0]) != BitConverter.SingleToInt32Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(left[i] * right[i]) != BitConverter.SingleToInt32Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.Multiply)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Or.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Or.Single.cs deleted file mode 100644 index bc2975cc1db5..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Or.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void OrSingle() - { - var test = new SimpleBinaryOpTest__OrSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__OrSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__OrSingle testClass) - { - var result = Sse.Or(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__OrSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.Or( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__OrSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__OrSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.Or( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.Or( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.Or( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.Or), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.Or), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.Or), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.Or( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse.Or( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__OrSingle(); - var result = Sse.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__OrSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse.Or( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.Or(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.Or( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse.Or( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((BitConverter.SingleToInt32Bits(left[0]) | BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((BitConverter.SingleToInt32Bits(left[0]) | BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.Or)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Sqrt.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Sqrt.cs deleted file mode 100644 index 07300f8509f4..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Sqrt.cs +++ /dev/null @@ -1,91 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Sse.IsSupported) - { - using (TestTable floatTable = new TestTable(new float[4] { 1, -5, 100, 0 }, new float[4])) - { - - var vf1 = Unsafe.Read>(floatTable.inArrayPtr); - var vf2 = Sse.Sqrt(vf1); - Unsafe.Write(floatTable.outArrayPtr, vf2); - - if (!floatTable.CheckResult((x, y) => { - var expected = MathF.Sqrt(x); - return (expected == y) - || (float.IsNaN(expected) && float.IsNaN(y)); - })) - { - Console.WriteLine("SSE Sqrt failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - } - - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T : struct - { - public T[] inArray; - public T[] outArray; - - public void* inArrayPtr => inHandle.AddrOfPinnedObject().ToPointer(); - public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); - - GCHandle inHandle; - GCHandle outHandle; - public TestTable(T[] a, T[] b) - { - this.inArray = a; - this.outArray = b; - - inHandle = GCHandle.Alloc(inArray, GCHandleType.Pinned); - outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); - } - public bool CheckResult(Func check) - { - for (int i = 0; i < inArray.Length; i++) - { - if (!check(inArray[i], outArray[i])) - { - return false; - } - } - return true; - } - - public void Dispose() - { - inHandle.Free(); - outHandle.Free(); - } - } - - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/SqrtScalar.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/SqrtScalar.cs deleted file mode 100644 index 8852b846b2f4..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/SqrtScalar.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Sse.IsSupported) - { - using (TestTable floatTable = new TestTable(new float[4] { 1, -5, 100, 0 }, new float[4])) - { - var vf1 = Unsafe.Read>(floatTable.inArray1Ptr); - var vf2 = Sse.SqrtScalar(vf1); - Unsafe.Write(floatTable.outArrayPtr, vf2); - - if (!floatTable.CheckResult((x, y, z) => { - var expected = MathF.Sqrt(y[0]); - return ((Math.Abs(expected - z[0]) <= 0.0003662109375f) // |Relative Error| <= 1.5 * 2^-12 - || (float.IsNaN(expected) && float.IsNaN(z[0])) - || (float.IsNegativeInfinity(expected) && float.IsNegativeInfinity(z[0])) - || (float.IsPositiveInfinity(expected) && float.IsPositiveInfinity(z[0]))) - && (z[1] == x[1]) && (z[2] == x[2]) && (z[3] == x[3]); - })) - { - Console.WriteLine("SSE SqrtScalar failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - using (TestTable floatTable = new TestTable(new float[4] { 1, -5, 100, 0 }, new float[4] { 22, -1, -50, 0 }, new float[4])) - { - var vf1 = Unsafe.Read>(floatTable.inArray1Ptr); - var vf2 = Unsafe.Read>(floatTable.inArray2Ptr); - var vf3 = Sse.SqrtScalar(vf1, vf2); - Unsafe.Write(floatTable.outArrayPtr, vf3); - - if (!floatTable.CheckResult((x, y, z) => { - var expected = MathF.Sqrt(y[0]); - return ((Math.Abs(expected - z[0]) <= 0.0003662109375f) // |Relative Error| <= 1.5 * 2^-12 - || (float.IsNaN(expected) && float.IsNaN(z[0])) - || (float.IsNegativeInfinity(expected) && float.IsNegativeInfinity(z[0])) - || (float.IsPositiveInfinity(expected) && float.IsPositiveInfinity(z[0]))) - && (z[1] == x[1]) && (z[2] == x[2]) && (z[3] == x[3]); - })) - { - Console.WriteLine("SSE SqrtScalar failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - } - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T : struct - { - public T[] inArray1; - public T[] inArray2; - public T[] outArray; - - public void* inArray1Ptr => inHandle1.AddrOfPinnedObject().ToPointer(); - public void* inArray2Ptr => inHandle2.AddrOfPinnedObject().ToPointer(); - public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); - - GCHandle inHandle1; - GCHandle inHandle2; - GCHandle outHandle; - public TestTable(T[] a, T[] b) : this(a, a, b) - { - } - public TestTable(T[] a, T[] b, T[] c) - { - this.inArray1 = a; - this.inArray2 = b; - this.outArray = c; - - inHandle1 = GCHandle.Alloc(inArray1, GCHandleType.Pinned); - inHandle2 = GCHandle.Alloc(inArray2, GCHandleType.Pinned); - outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); - } - public bool CheckResult(Func check) - { - return check(inArray1, inArray2, outArray); - } - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Store.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Store.cs deleted file mode 100644 index 4fd4007d7f33..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Store.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Sse.IsSupported) - { - using (TestTable floatTable = new TestTable(new float[4] { 1, -5, 100, 0 }, new float[4])) - { - var vf = Unsafe.Read>(floatTable.inArrayPtr); - Sse.Store((float*)(floatTable.outArrayPtr), vf); - - if (!floatTable.CheckResult((x, y) => BitConverter.SingleToInt32Bits(x) == BitConverter.SingleToInt32Bits(y))) - { - Console.WriteLine("SSE Store failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - } - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T : struct - { - public T[] inArray; - public T[] outArray; - - public void* inArrayPtr => inHandle.AddrOfPinnedObject().ToPointer(); - public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); - - GCHandle inHandle; - GCHandle outHandle; - public TestTable(T[] a, T[] b) - { - this.inArray = a; - this.outArray = b; - - inHandle = GCHandle.Alloc(inArray, GCHandleType.Pinned); - outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); - } - public bool CheckResult(Func check) - { - for (int i = 0; i < inArray.Length; i++) - { - if (!check(inArray[i], outArray[i])) - { - return false; - } - } - return true; - } - - public void Dispose() - { - inHandle.Free(); - outHandle.Free(); - } - } - - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/StoreAligned.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/StoreAligned.cs deleted file mode 100644 index 85a698b143a3..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/StoreAligned.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Sse.IsSupported) - { - float* inArray = stackalloc float[4]; - byte* outBuffer = stackalloc byte[32]; - float* outArray = Align(outBuffer, 16); - - var vf = Unsafe.Read>(inArray); - Sse.StoreAligned(outArray, vf); - - for (var i = 0; i < 4; i++) - { - if (BitConverter.SingleToInt32Bits(inArray[i]) != BitConverter.SingleToInt32Bits(outArray[i])) - { - Console.WriteLine("SSE StoreAligned failed on float:"); - for (var n = 0; n < 4; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - return testResult; - } - - static unsafe float* Align(byte* buffer, byte expectedAlignment) - { - // Compute how bad the misalignment is, which is at most (expectedAlignment - 1). - // Then subtract that from the expectedAlignment and add it to the original address - // to compute the aligned address. - - var misalignment = expectedAlignment - ((ulong)(buffer) % expectedAlignment); - return (float*)(buffer + misalignment); - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/StoreAlignedNonTemporal.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/StoreAlignedNonTemporal.cs deleted file mode 100644 index 4c4cd52865c8..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/StoreAlignedNonTemporal.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Sse.IsSupported) - { - float* inArray = stackalloc float[4]; - byte* outBuffer = stackalloc byte[32]; - float* outArray = Align(outBuffer, 16); - - var vf = Unsafe.Read>(inArray); - Sse.StoreAlignedNonTemporal(outArray, vf); - - for (var i = 0; i < 4; i++) - { - if (BitConverter.SingleToInt32Bits(inArray[i]) != BitConverter.SingleToInt32Bits(outArray[i])) - { - Console.WriteLine("SSE StoreAlignedNonTemporal failed on float:"); - for (var n = 0; n < 4; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - return testResult; - } - - static unsafe float* Align(byte* buffer, byte expectedAlignment) - { - // Compute how bad the misalignment is, which is at most (expectedAlignment - 1). - // Then subtract that from the expectedAlignment and add it to the original address - // to compute the aligned address. - - var misalignment = expectedAlignment - ((ulong)(buffer) % expectedAlignment); - return (float*)(buffer + misalignment); - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/StoreHigh.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/StoreHigh.cs deleted file mode 100644 index d19755b0d31a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/StoreHigh.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Sse.IsSupported) - { - using (TestTable floatTable = new TestTable(new float[4] { 1, -5, 100, 0 }, new float[4])) - { - var vf = Unsafe.Read>(floatTable.inArrayPtr); - Sse.StoreHigh((float*)(floatTable.outArrayPtr), vf); - - if (!floatTable.CheckResult((x, y) => y[0] == x[2] && y[1] == x[3] && - y[2] == 0 && y[3] == 0)) - { - Console.WriteLine("SSE StoreHigh failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - } - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T : struct - { - public T[] inArray; - public T[] outArray; - - public void* inArrayPtr => inHandle.AddrOfPinnedObject().ToPointer(); - public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); - - GCHandle inHandle; - GCHandle outHandle; - public TestTable(T[] a, T[] b) - { - this.inArray = a; - this.outArray = b; - - inHandle = GCHandle.Alloc(inArray, GCHandleType.Pinned); - outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); - } - public bool CheckResult(Func check) - { - return check(inArray, outArray); - } - - public void Dispose() - { - inHandle.Free(); - outHandle.Free(); - } - } - - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/StoreLow.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/StoreLow.cs deleted file mode 100644 index 43007b5ecee1..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/StoreLow.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Sse.IsSupported) - { - using (TestTable floatTable = new TestTable(new float[4] { 1, -5, 100, 0 }, new float[4])) - { - var vf = Unsafe.Read>(floatTable.inArrayPtr); - Sse.StoreLow((float*)(floatTable.outArrayPtr), vf); - - if (!floatTable.CheckResult((x, y) => y[0] == x[0] && y[1] == x[1] && - y[2] == 0 && y[3] == 0)) - { - Console.WriteLine("SSE StoreLow failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - } - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T : struct - { - public T[] inArray; - public T[] outArray; - - public void* inArrayPtr => inHandle.AddrOfPinnedObject().ToPointer(); - public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); - - GCHandle inHandle; - GCHandle outHandle; - public TestTable(T[] a, T[] b) - { - this.inArray = a; - this.outArray = b; - - inHandle = GCHandle.Alloc(inArray, GCHandleType.Pinned); - outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); - } - public bool CheckResult(Func check) - { - return check(inArray, outArray); - } - - public void Dispose() - { - inHandle.Free(); - outHandle.Free(); - } - } - - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/StoreScalar.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/StoreScalar.cs deleted file mode 100644 index 7721c091e53d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/StoreScalar.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Sse.IsSupported) - { - using (TestTable floatTable = new TestTable(new float[4] { 1, -5, 100, 3 }, new float[4])) - { - var vf = Unsafe.Read>(floatTable.inArrayPtr); - Sse.StoreScalar((float*)(floatTable.outArrayPtr), vf); - - if (!floatTable.CheckResult((x, y) => BitConverter.SingleToInt32Bits(x[0]) == BitConverter.SingleToInt32Bits(y[0]) - && BitConverter.SingleToInt32Bits(y[1]) == 0 - && BitConverter.SingleToInt32Bits(y[2]) == 0 - && BitConverter.SingleToInt32Bits(y[3]) == 0)) - { - Console.WriteLine("SSE StoreScalar failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - } - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T : struct - { - public T[] inArray; - public T[] outArray; - - public void* inArrayPtr => inHandle.AddrOfPinnedObject().ToPointer(); - public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); - - GCHandle inHandle; - GCHandle outHandle; - public TestTable(T[] a, T[] b) - { - this.inArray = a; - this.outArray = b; - - inHandle = GCHandle.Alloc(inArray, GCHandleType.Pinned); - outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); - } - public bool CheckResult(Func check) - { - return check(inArray, outArray); - } - - public void Dispose() - { - inHandle.Free(); - outHandle.Free(); - } - } - - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Subtract.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Subtract.Single.cs deleted file mode 100644 index bab99ae418a9..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Subtract.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void SubtractSingle() - { - var test = new SimpleBinaryOpTest__SubtractSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__SubtractSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__SubtractSingle testClass) - { - var result = Sse.Subtract(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__SubtractSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.Subtract( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__SubtractSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__SubtractSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.Subtract( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.Subtract( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.Subtract( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.Subtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.Subtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.Subtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.Subtract( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse.Subtract( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__SubtractSingle(); - var result = Sse.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__SubtractSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse.Subtract( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.Subtract(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.Subtract( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse.Subtract( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(left[0] - right[0]) != BitConverter.SingleToInt32Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(left[i] - right[i]) != BitConverter.SingleToInt32Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.Subtract)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/UnpackHigh.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/UnpackHigh.cs deleted file mode 100644 index c68269b99d64..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/UnpackHigh.cs +++ /dev/null @@ -1,88 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Sse.IsSupported) - { - using (TestTable floatTable = new TestTable(new float[4] { 1, -5, 100, 0 }, new float[4] { 22, -1, -50, 0 }, new float[4])) - { - - var vf1 = Unsafe.Read>(floatTable.inArray1Ptr); - var vf2 = Unsafe.Read>(floatTable.inArray2Ptr); - var vf3 = Sse.UnpackHigh(vf1, vf2); - Unsafe.Write(floatTable.outArrayPtr, vf3); - - if (!floatTable.CheckResult((x, y, z) => (z[0] == x[2]) && (z[1] == y[2]) && - (z[2] == x[3]) && (z[3] == y[3]))) - { - Console.WriteLine("SSE UnpackHigh failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - } - - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T : struct - { - public T[] inArray1; - public T[] inArray2; - public T[] outArray; - - public void* inArray1Ptr => inHandle1.AddrOfPinnedObject().ToPointer(); - public void* inArray2Ptr => inHandle2.AddrOfPinnedObject().ToPointer(); - public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); - - GCHandle inHandle1; - GCHandle inHandle2; - GCHandle outHandle; - public TestTable(T[] a, T[] b, T[] c) - { - this.inArray1 = a; - this.inArray2 = b; - this.outArray = c; - - inHandle1 = GCHandle.Alloc(inArray1, GCHandleType.Pinned); - inHandle2 = GCHandle.Alloc(inArray2, GCHandleType.Pinned); - outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); - } - public bool CheckResult(Func check) - { - return check(inArray1, inArray2, outArray); - } - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - } - - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/UnpackLow.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/UnpackLow.cs deleted file mode 100644 index 0796b31e6659..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/UnpackLow.cs +++ /dev/null @@ -1,88 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Sse.IsSupported) - { - using (TestTable floatTable = new TestTable(new float[4] { 1, -5, 100, 0 }, new float[4] { 22, -1, -50, 0 }, new float[4])) - { - - var vf1 = Unsafe.Read>(floatTable.inArray1Ptr); - var vf2 = Unsafe.Read>(floatTable.inArray2Ptr); - var vf3 = Sse.UnpackLow(vf1, vf2); - Unsafe.Write(floatTable.outArrayPtr, vf3); - - if (!floatTable.CheckResult((x, y, z) => (z[0] == x[0]) && (z[1] == y[0]) && - (z[2] == x[1]) && (z[3] == y[1]))) - { - Console.WriteLine("SSE UnpackLow failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - } - - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T : struct - { - public T[] inArray1; - public T[] inArray2; - public T[] outArray; - - public void* inArray1Ptr => inHandle1.AddrOfPinnedObject().ToPointer(); - public void* inArray2Ptr => inHandle2.AddrOfPinnedObject().ToPointer(); - public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); - - GCHandle inHandle1; - GCHandle inHandle2; - GCHandle outHandle; - public TestTable(T[] a, T[] b, T[] c) - { - this.inArray1 = a; - this.inArray2 = b; - this.outArray = c; - - inHandle1 = GCHandle.Alloc(inArray1, GCHandleType.Pinned); - inHandle2 = GCHandle.Alloc(inArray2, GCHandleType.Pinned); - outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); - } - public bool CheckResult(Func check) - { - return check(inArray1, inArray2, outArray); - } - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - } - - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Xor.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Xor.Single.cs deleted file mode 100644 index 5ff677dff0ba..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Xor.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void XorSingle() - { - var test = new SimpleBinaryOpTest__XorSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__XorSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__XorSingle testClass) - { - var result = Sse.Xor(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__XorSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.Xor( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__XorSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__XorSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse.Xor( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse.Xor( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse.Xor( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse).GetMethod(nameof(Sse.Xor), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse).GetMethod(nameof(Sse.Xor), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse).GetMethod(nameof(Sse.Xor), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse.Xor( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse.Xor( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__XorSingle(); - var result = Sse.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__XorSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse.Xor( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse.Xor(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse.Xor( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse.Xor( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((BitConverter.SingleToInt32Bits(left[0]) ^ BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((BitConverter.SingleToInt32Bits(left[0]) ^ BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse)}.{nameof(Sse.Xor)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2.X64/ConvertScalarToVector128Double.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2.X64/ConvertScalarToVector128Double.Double.cs deleted file mode 100644 index 0a46cd113636..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2.X64/ConvertScalarToVector128Double.Double.cs +++ /dev/null @@ -1,395 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ConvertScalarToVector128DoubleDouble() - { - var test = new SimpleBinaryOpConvTest__ConvertScalarToVector128DoubleDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpConvTest__ConvertScalarToVector128DoubleDouble - { - private struct TestStruct - { - public Vector128 _fld1; - public Int64 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - _data2 = TestLibrary.Generator.GetInt64(); - testStruct._fld2 = _data2; - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpConvTest__ConvertScalarToVector128DoubleDouble testClass) - { - var result = Sse2.X64.ConvertScalarToVector128Double(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Int64 _data2; - - private static Vector128 _clsVar1; - private static Int64 _clsVar2; - - private Vector128 _fld1; - private Int64 _fld2; - - private SimpleBinaryOpConvTest__DataTable _dataTable; - - static SimpleBinaryOpConvTest__ConvertScalarToVector128DoubleDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - _data2 = TestLibrary.Generator.GetInt64(); - _clsVar2 = _data2; - } - - public SimpleBinaryOpConvTest__ConvertScalarToVector128DoubleDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - _data2 = TestLibrary.Generator.GetInt64(); - _fld2 = _data2; - - _dataTable = new SimpleBinaryOpConvTest__DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.X64.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.X64.ConvertScalarToVector128Double( - Unsafe.Read>(_dataTable.inArray1Ptr), - _dataTable.inData2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inData2, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.X64.ConvertScalarToVector128Double( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - _dataTable.inData2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inData2, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.X64.ConvertScalarToVector128Double( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - _dataTable.inData2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inData2, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2.X64).GetMethod(nameof(Sse2.X64.ConvertScalarToVector128Double), new Type[] { typeof(Vector128), typeof(Int64) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - _dataTable.inData2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inData2, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2.X64).GetMethod(nameof(Sse2.X64.ConvertScalarToVector128Double), new Type[] { typeof(Vector128), typeof(Int64) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - _dataTable.inData2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inData2, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2.X64).GetMethod(nameof(Sse2.X64.ConvertScalarToVector128Double), new Type[] { typeof(Vector128), typeof(Int64) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - _dataTable.inData2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inData2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.X64.ConvertScalarToVector128Double( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = _dataTable.inData2; - var result = Sse2.X64.ConvertScalarToVector128Double(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var right = _dataTable.inData2; - var result = Sse2.X64.ConvertScalarToVector128Double(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var right = _dataTable.inData2; - var result = Sse2.X64.ConvertScalarToVector128Double(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpConvTest__ConvertScalarToVector128DoubleDouble(); - var result = Sse2.X64.ConvertScalarToVector128Double(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.X64.ConvertScalarToVector128Double(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.X64.ConvertScalarToVector128Double(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 left, Int64 right, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, right, outArray, method); - } - - private void ValidateResult(void* left, Int64 right, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, right, outArray, method); - } - - private void ValidateResult(Double[] left, Int64 right, Double[] result, [CallerMemberName] string method = "") - { - if ((double)right != result[0]) - { - Succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != left[i]) - { - Succeeded = false; - break; - } - } - } - - if (!Succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2.X64)}.{nameof(Sse2.X64.ConvertScalarToVector128Double)}(Vector128, Int64): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2.X64/ConvertToInt64WithTruncation.Vector128Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2.X64/ConvertToInt64WithTruncation.Vector128Double.cs deleted file mode 100644 index 5d98c754c942..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2.X64/ConvertToInt64WithTruncation.Vector128Double.cs +++ /dev/null @@ -1,350 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ConvertToInt64WithTruncationVector128Double() - { - var test = new SimdScalarUnaryOpConvertTest__ConvertToInt64WithTruncationVector128Double(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimdScalarUnaryOpConvertTest__ConvertToInt64WithTruncationVector128Double - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimdScalarUnaryOpConvertTest__ConvertToInt64WithTruncationVector128Double testClass) - { - var result = Sse2.X64.ConvertToInt64WithTruncation(_fld); - testClass.ValidateResult(_fld, result); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data = new Double[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimdScalarUnaryOpTest__DataTable _dataTable; - - static SimdScalarUnaryOpConvertTest__ConvertToInt64WithTruncationVector128Double() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public SimdScalarUnaryOpConvertTest__ConvertToInt64WithTruncationVector128Double() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new SimdScalarUnaryOpTest__DataTable(_data, LargestVectorSize); - } - - public bool IsSupported => Sse2.X64.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.X64.ConvertToInt64WithTruncation( - Unsafe.Read>(_dataTable.inArrayPtr) - ); - - ValidateResult(_dataTable.inArrayPtr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.X64.ConvertToInt64WithTruncation( - Sse2.LoadVector128((Double*)(_dataTable.inArrayPtr)) - ); - - ValidateResult(_dataTable.inArrayPtr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.X64.ConvertToInt64WithTruncation( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArrayPtr)) - ); - - ValidateResult(_dataTable.inArrayPtr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2.X64).GetMethod(nameof(Sse2.X64.ConvertToInt64WithTruncation), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr) - }); - - ValidateResult(_dataTable.inArrayPtr, (Int64)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2.X64).GetMethod(nameof(Sse2.X64.ConvertToInt64WithTruncation), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArrayPtr)) - }); - - ValidateResult(_dataTable.inArrayPtr, (Int64)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2.X64).GetMethod(nameof(Sse2.X64.ConvertToInt64WithTruncation), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArrayPtr)) - }); - - ValidateResult(_dataTable.inArrayPtr, (Int64)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.X64.ConvertToInt64WithTruncation( - _clsVar - ); - - ValidateResult(_clsVar, result); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.X64.ConvertToInt64WithTruncation(firstOp); - - ValidateResult(firstOp, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((Double*)(_dataTable.inArrayPtr)); - var result = Sse2.X64.ConvertToInt64WithTruncation(firstOp); - - ValidateResult(firstOp, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArrayPtr)); - var result = Sse2.X64.ConvertToInt64WithTruncation(firstOp); - - ValidateResult(firstOp, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimdScalarUnaryOpConvertTest__ConvertToInt64WithTruncationVector128Double(); - var result = Sse2.X64.ConvertToInt64WithTruncation(test._fld); - - ValidateResult(test._fld, result); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.X64.ConvertToInt64WithTruncation(_fld); - - ValidateResult(_fld, result); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.X64.ConvertToInt64WithTruncation(test._fld); - - ValidateResult(test._fld, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, Int64 result, [CallerMemberName] string method = "") - { - Double[] inArray = new Double[Op1ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - ValidateResult(inArray, result, method); - } - - private void ValidateResult(void* firstOp, Int64 result, [CallerMemberName] string method = "") - { - Double[] inArray = new Double[Op1ElementCount]; - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - ValidateResult(inArray, result, method); - } - - private void ValidateResult(Double[] firstOp, Int64 result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((long)firstOp[0] != result) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2.X64)}.{nameof(Sse2.X64.ConvertToInt64WithTruncation)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: result"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2.X64/ConvertToUInt64.Vector128UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2.X64/ConvertToUInt64.Vector128UInt64.cs deleted file mode 100644 index dd8907984f07..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2.X64/ConvertToUInt64.Vector128UInt64.cs +++ /dev/null @@ -1,350 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ConvertToUInt64Vector128UInt64() - { - var test = new SimdScalarUnaryOpConvertTest__ConvertToUInt64Vector128UInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimdScalarUnaryOpConvertTest__ConvertToUInt64Vector128UInt64 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimdScalarUnaryOpConvertTest__ConvertToUInt64Vector128UInt64 testClass) - { - var result = Sse2.X64.ConvertToUInt64(_fld); - testClass.ValidateResult(_fld, result); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data = new UInt64[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimdScalarUnaryOpTest__DataTable _dataTable; - - static SimdScalarUnaryOpConvertTest__ConvertToUInt64Vector128UInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public SimdScalarUnaryOpConvertTest__ConvertToUInt64Vector128UInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new SimdScalarUnaryOpTest__DataTable(_data, LargestVectorSize); - } - - public bool IsSupported => Sse2.X64.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.X64.ConvertToUInt64( - Unsafe.Read>(_dataTable.inArrayPtr) - ); - - ValidateResult(_dataTable.inArrayPtr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.X64.ConvertToUInt64( - Sse2.LoadVector128((UInt64*)(_dataTable.inArrayPtr)) - ); - - ValidateResult(_dataTable.inArrayPtr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.X64.ConvertToUInt64( - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArrayPtr)) - ); - - ValidateResult(_dataTable.inArrayPtr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2.X64).GetMethod(nameof(Sse2.X64.ConvertToUInt64), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr) - }); - - ValidateResult(_dataTable.inArrayPtr, (UInt64)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2.X64).GetMethod(nameof(Sse2.X64.ConvertToUInt64), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt64*)(_dataTable.inArrayPtr)) - }); - - ValidateResult(_dataTable.inArrayPtr, (UInt64)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2.X64).GetMethod(nameof(Sse2.X64.ConvertToUInt64), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArrayPtr)) - }); - - ValidateResult(_dataTable.inArrayPtr, (UInt64)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.X64.ConvertToUInt64( - _clsVar - ); - - ValidateResult(_clsVar, result); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.X64.ConvertToUInt64(firstOp); - - ValidateResult(firstOp, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((UInt64*)(_dataTable.inArrayPtr)); - var result = Sse2.X64.ConvertToUInt64(firstOp); - - ValidateResult(firstOp, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArrayPtr)); - var result = Sse2.X64.ConvertToUInt64(firstOp); - - ValidateResult(firstOp, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimdScalarUnaryOpConvertTest__ConvertToUInt64Vector128UInt64(); - var result = Sse2.X64.ConvertToUInt64(test._fld); - - ValidateResult(test._fld, result); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.X64.ConvertToUInt64(_fld); - - ValidateResult(_fld, result); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.X64.ConvertToUInt64(test._fld); - - ValidateResult(test._fld, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, UInt64 result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - ValidateResult(inArray, result, method); - } - - private void ValidateResult(void* firstOp, UInt64 result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - ValidateResult(inArray, result, method); - } - - private void ValidateResult(UInt64[] firstOp, UInt64 result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2.X64)}.{nameof(Sse2.X64.ConvertToUInt64)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: result"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2.X64/StoreNonTemporal.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2.X64/StoreNonTemporal.cs deleted file mode 100644 index 6e80f93034fe..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2.X64/StoreNonTemporal.cs +++ /dev/null @@ -1,120 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Sse2.X64.IsSupported) - { - { - long* inArray = stackalloc long[2]; - inArray[0] = 0xffffffff01l; - long* outBuffer = stackalloc long[2]; - - Sse2.X64.StoreNonTemporal(outBuffer, inArray[0]); - - for (var i = 0; i < 2; i++) - { - if (inArray[i] != outBuffer[i]) - { - Console.WriteLine("Sse2 StoreNonTemporal failed on long:"); - for (var n = 0; n < 2; n++) - { - Console.Write(outBuffer[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - ulong* inArray = stackalloc ulong[2]; - inArray[0] = 0xffffffffff01ul; - ulong* outBuffer = stackalloc ulong[2]; - - Sse2.X64.StoreNonTemporal(outBuffer, inArray[0]); - - for (var i = 0; i < 2; i++) - { - if (inArray[i] != outBuffer[i]) - { - Console.WriteLine("Sse2 StoreNonTemporal failed on ulong:"); - for (var n = 0; n < 2; n++) - { - Console.Write(outBuffer[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - } - else - { - try - { - long* inArray = stackalloc long[2]; - inArray[0] = 0xffffffff01l; - long* outBuffer = stackalloc long[2]; - - Sse2.X64.StoreNonTemporal(outBuffer, inArray[0]); - testResult = Fail; - Console.WriteLine($"{nameof(Sse2)}.{nameof(Sse2.X64.StoreNonTemporal)} failed on long: expected PlatformNotSupportedException exception."); - } - catch (PlatformNotSupportedException) - { - - } - catch (Exception ex) - { - testResult = Fail; - Console.WriteLine($"{nameof(Sse2)}.{nameof(Sse2.X64.StoreNonTemporal)}-{ex} failed on long: expected PlatformNotSupportedException exception."); - } - - try - { - ulong* inArray = stackalloc ulong[2]; - inArray[0] = 0xffffffffff01ul; - ulong* outBuffer = stackalloc ulong[2]; - - Sse2.X64.StoreNonTemporal(outBuffer, inArray[0]); - testResult = Fail; - Console.WriteLine($"{nameof(Sse2)}.{nameof(Sse2.X64.StoreNonTemporal)} failed on ulong: expected PlatformNotSupportedException exception."); - } - catch (PlatformNotSupportedException) - { - - } - catch (Exception ex) - { - testResult = Fail; - Console.WriteLine($"{nameof(Sse2)}.{nameof(Sse2.X64.StoreNonTemporal)}-{ex} failed on ulong: expected PlatformNotSupportedException exception."); - } - } - - return testResult; - } - } -} - diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Byte.cs deleted file mode 100644 index eed2857b38cf..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Byte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AddByte() - { - var test = new SimpleBinaryOpTest__AddByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddByte testClass) - { - var result = Sse2.Add(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Add( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Add( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Add( - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Add( - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Add), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Add), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Add), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Add( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Add( - Sse2.LoadVector128((Byte*)(pClsVar1)), - Sse2.LoadVector128((Byte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = Sse2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = Sse2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddByte(); - var result = Sse2.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Add( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Add(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Add( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Add( - Sse2.LoadVector128((Byte*)(&test._fld1)), - Sse2.LoadVector128((Byte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((byte)(left[0] + right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((byte)(left[i] + right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Add)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Double.cs deleted file mode 100644 index bd115bd3b43a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AddDouble() - { - var test = new SimpleBinaryOpTest__AddDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddDouble testClass) - { - var result = Sse2.Add(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Add( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Add( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Add( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Add( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Add), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Add), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Add), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Add( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Add( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddDouble(); - var result = Sse2.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Add( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Add(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Add( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Add( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(left[0] + right[0]) != BitConverter.DoubleToInt64Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(left[i] + right[i]) != BitConverter.DoubleToInt64Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Add)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Int16.cs deleted file mode 100644 index 3b404f353459..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Int16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AddInt16() - { - var test = new SimpleBinaryOpTest__AddInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddInt16 testClass) - { - var result = Sse2.Add(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Add( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Add( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Add( - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Add( - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Add), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Add), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Add), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Add( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Add( - Sse2.LoadVector128((Int16*)(pClsVar1)), - Sse2.LoadVector128((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Sse2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Sse2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddInt16(); - var result = Sse2.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Add( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Add(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Add( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Add( - Sse2.LoadVector128((Int16*)(&test._fld1)), - Sse2.LoadVector128((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((short)(left[0] + right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((short)(left[i] + right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Add)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Int32.cs deleted file mode 100644 index 7c3b9fff2938..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Int32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AddInt32() - { - var test = new SimpleBinaryOpTest__AddInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddInt32 testClass) - { - var result = Sse2.Add(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Add( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Add( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Add( - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Add( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Add), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Add), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Add), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Add( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Add( - Sse2.LoadVector128((Int32*)(pClsVar1)), - Sse2.LoadVector128((Int32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Sse2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Sse2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddInt32(); - var result = Sse2.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Add( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Add(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Add( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Add( - Sse2.LoadVector128((Int32*)(&test._fld1)), - Sse2.LoadVector128((Int32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((int)(left[0] + right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((int)(left[i] + right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Add)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Int64.cs deleted file mode 100644 index 8fcea12d7b31..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Int64.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AddInt64() - { - var test = new SimpleBinaryOpTest__AddInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int64[] inArray1, Int64[] inArray2, Int64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddInt64 testClass) - { - var result = Sse2.Add(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddInt64 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Add( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Add( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Add( - Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Add( - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Add), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Add), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Add), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Add( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Add( - Sse2.LoadVector128((Int64*)(pClsVar1)), - Sse2.LoadVector128((Int64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = Sse2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = Sse2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddInt64(); - var result = Sse2.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddInt64(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Add( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Add(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Add( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Add( - Sse2.LoadVector128((Int64*)(&test._fld1)), - Sse2.LoadVector128((Int64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((long)(left[0] + right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((long)(left[i] + right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Add)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.SByte.cs deleted file mode 100644 index dfd961c5e676..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.SByte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AddSByte() - { - var test = new SimpleBinaryOpTest__AddSByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddSByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddSByte testClass) - { - var result = Sse2.Add(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddSByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Add( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddSByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddSByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Add( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Add( - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Add( - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Add), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Add), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Add), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Add( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Add( - Sse2.LoadVector128((SByte*)(pClsVar1)), - Sse2.LoadVector128((SByte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Sse2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Sse2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddSByte(); - var result = Sse2.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddSByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Add( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Add(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Add( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Add( - Sse2.LoadVector128((SByte*)(&test._fld1)), - Sse2.LoadVector128((SByte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((sbyte)(left[0] + right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((sbyte)(left[i] + right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Add)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.UInt16.cs deleted file mode 100644 index 72691eea201c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.UInt16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AddUInt16() - { - var test = new SimpleBinaryOpTest__AddUInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddUInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddUInt16 testClass) - { - var result = Sse2.Add(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddUInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Add( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddUInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddUInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Add( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Add( - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Add( - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Add), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Add), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Add), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Add( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Add( - Sse2.LoadVector128((UInt16*)(pClsVar1)), - Sse2.LoadVector128((UInt16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Sse2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Sse2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddUInt16(); - var result = Sse2.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddUInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Add( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Add(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Add( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Add( - Sse2.LoadVector128((UInt16*)(&test._fld1)), - Sse2.LoadVector128((UInt16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((ushort)(left[0] + right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((ushort)(left[i] + right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Add)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.UInt32.cs deleted file mode 100644 index 2e3887066813..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.UInt32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AddUInt32() - { - var test = new SimpleBinaryOpTest__AddUInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddUInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddUInt32 testClass) - { - var result = Sse2.Add(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddUInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Add( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddUInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddUInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Add( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Add( - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Add( - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Add), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Add), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Add), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Add( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Add( - Sse2.LoadVector128((UInt32*)(pClsVar1)), - Sse2.LoadVector128((UInt32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Sse2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Sse2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddUInt32(); - var result = Sse2.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddUInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Add( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Add(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Add( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Add( - Sse2.LoadVector128((UInt32*)(&test._fld1)), - Sse2.LoadVector128((UInt32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((uint)(left[0] + right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((uint)(left[i] + right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Add)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.UInt64.cs deleted file mode 100644 index a2a3712a0def..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.UInt64.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AddUInt64() - { - var test = new SimpleBinaryOpTest__AddUInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AddUInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt64[] inArray1, UInt64[] inArray2, UInt64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AddUInt64 testClass) - { - var result = Sse2.Add(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddUInt64 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Add( - Sse2.LoadVector128((UInt64*)(pFld1)), - Sse2.LoadVector128((UInt64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AddUInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AddUInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Add( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Add( - Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Add( - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Add), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Add), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Add), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Add( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Add( - Sse2.LoadVector128((UInt64*)(pClsVar1)), - Sse2.LoadVector128((UInt64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)); - var result = Sse2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)); - var result = Sse2.Add(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AddUInt64(); - var result = Sse2.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AddUInt64(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Add( - Sse2.LoadVector128((UInt64*)(pFld1)), - Sse2.LoadVector128((UInt64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Add(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Add( - Sse2.LoadVector128((UInt64*)(pFld1)), - Sse2.LoadVector128((UInt64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Add(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Add( - Sse2.LoadVector128((UInt64*)(&test._fld1)), - Sse2.LoadVector128((UInt64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt64[] left, UInt64[] right, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((ulong)(left[0] + right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((ulong)(left[i] + right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Add)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Byte.cs deleted file mode 100644 index c48db07f91d8..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Byte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndByte() - { - var test = new SimpleBinaryOpTest__AndByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndByte testClass) - { - var result = Sse2.And(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.And( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.And( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.And( - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.And( - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.And), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.And), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.And), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.And( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.And( - Sse2.LoadVector128((Byte*)(pClsVar1)), - Sse2.LoadVector128((Byte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = Sse2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = Sse2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndByte(); - var result = Sse2.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.And( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.And(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.And( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.And( - Sse2.LoadVector128((Byte*)(&test._fld1)), - Sse2.LoadVector128((Byte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((byte)(left[0] & right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((byte)(left[i] & right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.And)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Double.cs deleted file mode 100644 index 4937b85ef2f1..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndDouble() - { - var test = new SimpleBinaryOpTest__AndDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndDouble testClass) - { - var result = Sse2.And(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.And( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.And( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.And( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.And( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.And), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.And), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.And), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.And( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.And( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndDouble(); - var result = Sse2.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.And( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.And(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.And( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.And( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((BitConverter.DoubleToInt64Bits(left[0]) & BitConverter.DoubleToInt64Bits(right[0])) != BitConverter.DoubleToInt64Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((BitConverter.DoubleToInt64Bits(left[i]) & BitConverter.DoubleToInt64Bits(right[i])) != BitConverter.DoubleToInt64Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.And)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Int16.cs deleted file mode 100644 index 51d1f0037b64..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Int16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndInt16() - { - var test = new SimpleBinaryOpTest__AndInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndInt16 testClass) - { - var result = Sse2.And(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.And( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.And( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.And( - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.And( - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.And), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.And), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.And), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.And( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.And( - Sse2.LoadVector128((Int16*)(pClsVar1)), - Sse2.LoadVector128((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Sse2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Sse2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndInt16(); - var result = Sse2.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.And( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.And(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.And( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.And( - Sse2.LoadVector128((Int16*)(&test._fld1)), - Sse2.LoadVector128((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((short)(left[0] & right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((short)(left[i] & right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.And)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Int32.cs deleted file mode 100644 index 7a9034786f81..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Int32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndInt32() - { - var test = new SimpleBinaryOpTest__AndInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndInt32 testClass) - { - var result = Sse2.And(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.And( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.And( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.And( - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.And( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.And), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.And), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.And), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.And( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.And( - Sse2.LoadVector128((Int32*)(pClsVar1)), - Sse2.LoadVector128((Int32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Sse2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Sse2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndInt32(); - var result = Sse2.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.And( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.And(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.And( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.And( - Sse2.LoadVector128((Int32*)(&test._fld1)), - Sse2.LoadVector128((Int32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((int)(left[0] & right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((int)(left[i] & right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.And)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Int64.cs deleted file mode 100644 index 9a718d562cb5..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Int64.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndInt64() - { - var test = new SimpleBinaryOpTest__AndInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int64[] inArray1, Int64[] inArray2, Int64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndInt64 testClass) - { - var result = Sse2.And(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndInt64 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.And( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.And( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.And( - Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.And( - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.And), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.And), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.And), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.And( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.And( - Sse2.LoadVector128((Int64*)(pClsVar1)), - Sse2.LoadVector128((Int64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = Sse2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = Sse2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndInt64(); - var result = Sse2.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndInt64(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.And( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.And(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.And( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.And( - Sse2.LoadVector128((Int64*)(&test._fld1)), - Sse2.LoadVector128((Int64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((long)(left[0] & right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((long)(left[i] & right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.And)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.SByte.cs deleted file mode 100644 index 497a146e327e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.SByte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndSByte() - { - var test = new SimpleBinaryOpTest__AndSByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndSByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndSByte testClass) - { - var result = Sse2.And(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndSByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.And( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndSByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndSByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.And( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.And( - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.And( - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.And), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.And), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.And), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.And( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.And( - Sse2.LoadVector128((SByte*)(pClsVar1)), - Sse2.LoadVector128((SByte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Sse2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Sse2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndSByte(); - var result = Sse2.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndSByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.And( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.And(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.And( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.And( - Sse2.LoadVector128((SByte*)(&test._fld1)), - Sse2.LoadVector128((SByte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((sbyte)(left[0] & right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((sbyte)(left[i] & right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.And)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.UInt16.cs deleted file mode 100644 index 4f9917d4617e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.UInt16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndUInt16() - { - var test = new SimpleBinaryOpTest__AndUInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndUInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndUInt16 testClass) - { - var result = Sse2.And(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndUInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.And( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndUInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndUInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.And( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.And( - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.And( - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.And), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.And), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.And), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.And( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.And( - Sse2.LoadVector128((UInt16*)(pClsVar1)), - Sse2.LoadVector128((UInt16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Sse2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Sse2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndUInt16(); - var result = Sse2.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndUInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.And( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.And(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.And( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.And( - Sse2.LoadVector128((UInt16*)(&test._fld1)), - Sse2.LoadVector128((UInt16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((ushort)(left[0] & right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((ushort)(left[i] & right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.And)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.UInt32.cs deleted file mode 100644 index 54fea871e674..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.UInt32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndUInt32() - { - var test = new SimpleBinaryOpTest__AndUInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndUInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndUInt32 testClass) - { - var result = Sse2.And(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndUInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.And( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndUInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndUInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.And( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.And( - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.And( - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.And), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.And), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.And), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.And( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.And( - Sse2.LoadVector128((UInt32*)(pClsVar1)), - Sse2.LoadVector128((UInt32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Sse2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Sse2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndUInt32(); - var result = Sse2.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndUInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.And( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.And(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.And( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.And( - Sse2.LoadVector128((UInt32*)(&test._fld1)), - Sse2.LoadVector128((UInt32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((uint)(left[0] & right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((uint)(left[i] & right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.And)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.UInt64.cs deleted file mode 100644 index 3c4b2d754ed1..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.UInt64.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndUInt64() - { - var test = new SimpleBinaryOpTest__AndUInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndUInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt64[] inArray1, UInt64[] inArray2, UInt64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndUInt64 testClass) - { - var result = Sse2.And(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndUInt64 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.And( - Sse2.LoadVector128((UInt64*)(pFld1)), - Sse2.LoadVector128((UInt64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndUInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndUInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.And( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.And( - Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.And( - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.And), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.And), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.And), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.And( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.And( - Sse2.LoadVector128((UInt64*)(pClsVar1)), - Sse2.LoadVector128((UInt64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)); - var result = Sse2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)); - var result = Sse2.And(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndUInt64(); - var result = Sse2.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndUInt64(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.And( - Sse2.LoadVector128((UInt64*)(pFld1)), - Sse2.LoadVector128((UInt64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.And(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.And( - Sse2.LoadVector128((UInt64*)(pFld1)), - Sse2.LoadVector128((UInt64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.And(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.And( - Sse2.LoadVector128((UInt64*)(&test._fld1)), - Sse2.LoadVector128((UInt64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt64[] left, UInt64[] right, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((ulong)(left[0] & right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((ulong)(left[i] & right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.And)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Byte.cs deleted file mode 100644 index de0340059b34..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Byte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndNotByte() - { - var test = new SimpleBinaryOpTest__AndNotByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndNotByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndNotByte testClass) - { - var result = Sse2.AndNot(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndNotByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndNotByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndNotByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.AndNot( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.AndNot( - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.AndNot( - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.AndNot), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.AndNot), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.AndNot), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.AndNot( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((Byte*)(pClsVar1)), - Sse2.LoadVector128((Byte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = Sse2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = Sse2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndNotByte(); - var result = Sse2.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndNotByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.AndNot(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.AndNot( - Sse2.LoadVector128((Byte*)(&test._fld1)), - Sse2.LoadVector128((Byte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((byte)(~left[0] & right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((byte)(~left[i] & right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.AndNot)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Double.cs deleted file mode 100644 index f8d6ed7461e6..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndNotDouble() - { - var test = new SimpleBinaryOpTest__AndNotDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndNotDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndNotDouble testClass) - { - var result = Sse2.AndNot(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndNotDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndNotDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndNotDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.AndNot( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.AndNot( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.AndNot( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.AndNot), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.AndNot), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.AndNot), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.AndNot( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndNotDouble(); - var result = Sse2.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndNotDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.AndNot(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.AndNot( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((~BitConverter.DoubleToInt64Bits(left[0]) & BitConverter.DoubleToInt64Bits(right[0])) != BitConverter.DoubleToInt64Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((~BitConverter.DoubleToInt64Bits(left[i]) & BitConverter.DoubleToInt64Bits(right[i])) != BitConverter.DoubleToInt64Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.AndNot)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Int16.cs deleted file mode 100644 index 145cfcd7bd94..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Int16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndNotInt16() - { - var test = new SimpleBinaryOpTest__AndNotInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndNotInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndNotInt16 testClass) - { - var result = Sse2.AndNot(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndNotInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndNotInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndNotInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.AndNot( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.AndNot( - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.AndNot( - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.AndNot), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.AndNot), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.AndNot), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.AndNot( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((Int16*)(pClsVar1)), - Sse2.LoadVector128((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Sse2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Sse2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndNotInt16(); - var result = Sse2.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndNotInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.AndNot(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.AndNot( - Sse2.LoadVector128((Int16*)(&test._fld1)), - Sse2.LoadVector128((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((short)(~left[0] & right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((short)(~left[i] & right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.AndNot)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Int32.cs deleted file mode 100644 index 9360e4fd0a68..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Int32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndNotInt32() - { - var test = new SimpleBinaryOpTest__AndNotInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndNotInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndNotInt32 testClass) - { - var result = Sse2.AndNot(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndNotInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndNotInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndNotInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.AndNot( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.AndNot( - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.AndNot( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.AndNot), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.AndNot), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.AndNot), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.AndNot( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((Int32*)(pClsVar1)), - Sse2.LoadVector128((Int32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Sse2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Sse2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndNotInt32(); - var result = Sse2.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndNotInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.AndNot(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.AndNot( - Sse2.LoadVector128((Int32*)(&test._fld1)), - Sse2.LoadVector128((Int32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((int)(~left[0] & right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((int)(~left[i] & right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.AndNot)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Int64.cs deleted file mode 100644 index 3c59829b5272..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Int64.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndNotInt64() - { - var test = new SimpleBinaryOpTest__AndNotInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndNotInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int64[] inArray1, Int64[] inArray2, Int64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndNotInt64 testClass) - { - var result = Sse2.AndNot(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndNotInt64 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndNotInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndNotInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.AndNot( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.AndNot( - Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.AndNot( - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.AndNot), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.AndNot), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.AndNot), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.AndNot( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((Int64*)(pClsVar1)), - Sse2.LoadVector128((Int64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = Sse2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = Sse2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndNotInt64(); - var result = Sse2.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndNotInt64(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.AndNot(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.AndNot( - Sse2.LoadVector128((Int64*)(&test._fld1)), - Sse2.LoadVector128((Int64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((long)(~left[0] & right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((long)(~left[i] & right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.AndNot)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.SByte.cs deleted file mode 100644 index d382900f8289..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.SByte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndNotSByte() - { - var test = new SimpleBinaryOpTest__AndNotSByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndNotSByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndNotSByte testClass) - { - var result = Sse2.AndNot(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndNotSByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndNotSByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndNotSByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.AndNot( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.AndNot( - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.AndNot( - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.AndNot), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.AndNot), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.AndNot), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.AndNot( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((SByte*)(pClsVar1)), - Sse2.LoadVector128((SByte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Sse2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Sse2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndNotSByte(); - var result = Sse2.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndNotSByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.AndNot(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.AndNot( - Sse2.LoadVector128((SByte*)(&test._fld1)), - Sse2.LoadVector128((SByte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((sbyte)(~left[0] & right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((sbyte)(~left[i] & right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.AndNot)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.UInt16.cs deleted file mode 100644 index df8db11a2036..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.UInt16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndNotUInt16() - { - var test = new SimpleBinaryOpTest__AndNotUInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndNotUInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndNotUInt16 testClass) - { - var result = Sse2.AndNot(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndNotUInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndNotUInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndNotUInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.AndNot( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.AndNot( - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.AndNot( - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.AndNot), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.AndNot), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.AndNot), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.AndNot( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((UInt16*)(pClsVar1)), - Sse2.LoadVector128((UInt16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Sse2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Sse2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndNotUInt16(); - var result = Sse2.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndNotUInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.AndNot(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.AndNot( - Sse2.LoadVector128((UInt16*)(&test._fld1)), - Sse2.LoadVector128((UInt16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((ushort)(~left[0] & right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((ushort)(~left[i] & right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.AndNot)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.UInt32.cs deleted file mode 100644 index c05d840e36d8..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.UInt32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndNotUInt32() - { - var test = new SimpleBinaryOpTest__AndNotUInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndNotUInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndNotUInt32 testClass) - { - var result = Sse2.AndNot(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndNotUInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndNotUInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndNotUInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.AndNot( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.AndNot( - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.AndNot( - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.AndNot), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.AndNot), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.AndNot), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.AndNot( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((UInt32*)(pClsVar1)), - Sse2.LoadVector128((UInt32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Sse2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Sse2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndNotUInt32(); - var result = Sse2.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndNotUInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.AndNot(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.AndNot( - Sse2.LoadVector128((UInt32*)(&test._fld1)), - Sse2.LoadVector128((UInt32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((uint)(~left[0] & right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((uint)(~left[i] & right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.AndNot)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.UInt64.cs deleted file mode 100644 index 12664b4841e5..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.UInt64.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AndNotUInt64() - { - var test = new SimpleBinaryOpTest__AndNotUInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AndNotUInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt64[] inArray1, UInt64[] inArray2, UInt64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AndNotUInt64 testClass) - { - var result = Sse2.AndNot(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AndNotUInt64 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((UInt64*)(pFld1)), - Sse2.LoadVector128((UInt64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AndNotUInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AndNotUInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.AndNot( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.AndNot( - Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.AndNot( - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.AndNot), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.AndNot), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.AndNot), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.AndNot( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((UInt64*)(pClsVar1)), - Sse2.LoadVector128((UInt64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)); - var result = Sse2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)); - var result = Sse2.AndNot(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AndNotUInt64(); - var result = Sse2.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AndNotUInt64(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((UInt64*)(pFld1)), - Sse2.LoadVector128((UInt64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.AndNot(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.AndNot( - Sse2.LoadVector128((UInt64*)(pFld1)), - Sse2.LoadVector128((UInt64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.AndNot(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.AndNot( - Sse2.LoadVector128((UInt64*)(&test._fld1)), - Sse2.LoadVector128((UInt64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt64[] left, UInt64[] right, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((ulong)(~left[0] & right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((ulong)(~left[i] & right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.AndNot)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Average.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Average.Byte.cs deleted file mode 100644 index 204e404a4087..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Average.Byte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AverageByte() - { - var test = new SimpleBinaryOpTest__AverageByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AverageByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AverageByte testClass) - { - var result = Sse2.Average(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AverageByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Average( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AverageByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AverageByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Average( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Average( - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Average( - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Average), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Average), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Average), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Average( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Average( - Sse2.LoadVector128((Byte*)(pClsVar1)), - Sse2.LoadVector128((Byte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Average(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = Sse2.Average(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = Sse2.Average(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AverageByte(); - var result = Sse2.Average(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AverageByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Average( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Average(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Average( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Average(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Average( - Sse2.LoadVector128((Byte*)(&test._fld1)), - Sse2.LoadVector128((Byte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((byte)((left[0] + right[0] + 1) >> 1) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((byte)((left[i] + right[i] + 1) >> 1) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Average)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Average.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Average.UInt16.cs deleted file mode 100644 index 2c0246f2b29b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Average.UInt16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AverageUInt16() - { - var test = new SimpleBinaryOpTest__AverageUInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__AverageUInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__AverageUInt16 testClass) - { - var result = Sse2.Average(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__AverageUInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Average( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__AverageUInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__AverageUInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Average( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Average( - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Average( - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Average), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Average), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Average), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Average( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Average( - Sse2.LoadVector128((UInt16*)(pClsVar1)), - Sse2.LoadVector128((UInt16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Average(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Sse2.Average(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Sse2.Average(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__AverageUInt16(); - var result = Sse2.Average(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__AverageUInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Average( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Average(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Average( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Average(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Average( - Sse2.LoadVector128((UInt16*)(&test._fld1)), - Sse2.LoadVector128((UInt16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((ushort)((left[0] + right[0] + 1) >> 1) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((ushort)((left[i] + right[i] + 1) >> 1) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Average)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.Byte.cs deleted file mode 100644 index 3bda3d4404d0..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.Byte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareEqualByte() - { - var test = new SimpleBinaryOpTest__CompareEqualByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareEqualByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareEqualByte testClass) - { - var result = Sse2.CompareEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareEqualByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareEqual( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareEqualByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareEqualByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.CompareEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.CompareEqual( - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.CompareEqual( - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.CompareEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.CompareEqual( - Sse2.LoadVector128((Byte*)(pClsVar1)), - Sse2.LoadVector128((Byte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareEqualByte(); - var result = Sse2.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareEqualByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.CompareEqual( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.CompareEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareEqual( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.CompareEqual( - Sse2.LoadVector128((Byte*)(&test._fld1)), - Sse2.LoadVector128((Byte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((left[0] == right[0]) ? unchecked((byte)(-1)) : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((left[i] == right[i]) ? unchecked((byte)(-1)) : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.CompareEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.Double.cs deleted file mode 100644 index fb629ffe728e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareEqualDouble() - { - var test = new SimpleBinaryOpTest__CompareEqualDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareEqualDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareEqualDouble testClass) - { - var result = Sse2.CompareEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareEqualDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareEqualDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareEqualDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.CompareEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.CompareEqual( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.CompareEqual( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.CompareEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.CompareEqual( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareEqualDouble(); - var result = Sse2.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareEqualDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.CompareEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.CompareEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.CompareEqual( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] == right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] == right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.CompareEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.Int16.cs deleted file mode 100644 index 895e102a8322..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.Int16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareEqualInt16() - { - var test = new SimpleBinaryOpTest__CompareEqualInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareEqualInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareEqualInt16 testClass) - { - var result = Sse2.CompareEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareEqualInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareEqual( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareEqualInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareEqualInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.CompareEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.CompareEqual( - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.CompareEqual( - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.CompareEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.CompareEqual( - Sse2.LoadVector128((Int16*)(pClsVar1)), - Sse2.LoadVector128((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareEqualInt16(); - var result = Sse2.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareEqualInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.CompareEqual( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.CompareEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareEqual( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.CompareEqual( - Sse2.LoadVector128((Int16*)(&test._fld1)), - Sse2.LoadVector128((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((left[0] == right[0]) ? unchecked((short)(-1)) : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((left[i] == right[i]) ? unchecked((short)(-1)) : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.CompareEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.Int32.cs deleted file mode 100644 index 346b0ece9234..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.Int32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareEqualInt32() - { - var test = new SimpleBinaryOpTest__CompareEqualInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareEqualInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareEqualInt32 testClass) - { - var result = Sse2.CompareEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareEqualInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareEqual( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareEqualInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareEqualInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.CompareEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.CompareEqual( - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.CompareEqual( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.CompareEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.CompareEqual( - Sse2.LoadVector128((Int32*)(pClsVar1)), - Sse2.LoadVector128((Int32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareEqualInt32(); - var result = Sse2.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareEqualInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.CompareEqual( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.CompareEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareEqual( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.CompareEqual( - Sse2.LoadVector128((Int32*)(&test._fld1)), - Sse2.LoadVector128((Int32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((left[0] == right[0]) ? unchecked((int)(-1)) : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((left[i] == right[i]) ? unchecked((int)(-1)) : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.CompareEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.SByte.cs deleted file mode 100644 index 13db374b7086..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.SByte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareEqualSByte() - { - var test = new SimpleBinaryOpTest__CompareEqualSByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareEqualSByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareEqualSByte testClass) - { - var result = Sse2.CompareEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareEqualSByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareEqual( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareEqualSByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareEqualSByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.CompareEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.CompareEqual( - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.CompareEqual( - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.CompareEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.CompareEqual( - Sse2.LoadVector128((SByte*)(pClsVar1)), - Sse2.LoadVector128((SByte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareEqualSByte(); - var result = Sse2.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareEqualSByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.CompareEqual( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.CompareEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareEqual( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.CompareEqual( - Sse2.LoadVector128((SByte*)(&test._fld1)), - Sse2.LoadVector128((SByte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((left[0] == right[0]) ? unchecked((sbyte)(-1)) : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((left[i] == right[i]) ? unchecked((sbyte)(-1)) : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.CompareEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.UInt16.cs deleted file mode 100644 index d76093d1512d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.UInt16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareEqualUInt16() - { - var test = new SimpleBinaryOpTest__CompareEqualUInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareEqualUInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareEqualUInt16 testClass) - { - var result = Sse2.CompareEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareEqualUInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareEqual( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareEqualUInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareEqualUInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.CompareEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.CompareEqual( - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.CompareEqual( - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.CompareEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.CompareEqual( - Sse2.LoadVector128((UInt16*)(pClsVar1)), - Sse2.LoadVector128((UInt16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareEqualUInt16(); - var result = Sse2.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareEqualUInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.CompareEqual( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.CompareEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareEqual( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.CompareEqual( - Sse2.LoadVector128((UInt16*)(&test._fld1)), - Sse2.LoadVector128((UInt16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((left[0] == right[0]) ? unchecked((ushort)(-1)) : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((left[i] == right[i]) ? unchecked((ushort)(-1)) : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.CompareEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.UInt32.cs deleted file mode 100644 index 3dd04a1ca526..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.UInt32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareEqualUInt32() - { - var test = new SimpleBinaryOpTest__CompareEqualUInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareEqualUInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareEqualUInt32 testClass) - { - var result = Sse2.CompareEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareEqualUInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareEqual( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareEqualUInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareEqualUInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.CompareEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.CompareEqual( - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.CompareEqual( - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.CompareEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.CompareEqual( - Sse2.LoadVector128((UInt32*)(pClsVar1)), - Sse2.LoadVector128((UInt32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareEqualUInt32(); - var result = Sse2.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareEqualUInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.CompareEqual( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.CompareEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareEqual( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.CompareEqual( - Sse2.LoadVector128((UInt32*)(&test._fld1)), - Sse2.LoadVector128((UInt32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((left[0] == right[0]) ? unchecked((uint)(-1)) : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((left[i] == right[i]) ? unchecked((uint)(-1)) : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.CompareEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThan.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThan.Double.cs deleted file mode 100644 index fb3098b29189..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThan.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareGreaterThanDouble() - { - var test = new SimpleBinaryOpTest__CompareGreaterThanDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareGreaterThanDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareGreaterThanDouble testClass) - { - var result = Sse2.CompareGreaterThan(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareGreaterThanDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareGreaterThan( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareGreaterThanDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareGreaterThanDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.CompareGreaterThan( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.CompareGreaterThan( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.CompareGreaterThan( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.CompareGreaterThan( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.CompareGreaterThan( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareGreaterThanDouble(); - var result = Sse2.CompareGreaterThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareGreaterThanDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.CompareGreaterThan( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.CompareGreaterThan(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareGreaterThan( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.CompareGreaterThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.CompareGreaterThan( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] > right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] > right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.CompareGreaterThan)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThan.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThan.Int16.cs deleted file mode 100644 index 22fa8f72f01e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThan.Int16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareGreaterThanInt16() - { - var test = new SimpleBinaryOpTest__CompareGreaterThanInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareGreaterThanInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareGreaterThanInt16 testClass) - { - var result = Sse2.CompareGreaterThan(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareGreaterThanInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareGreaterThan( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareGreaterThanInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareGreaterThanInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.CompareGreaterThan( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.CompareGreaterThan( - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.CompareGreaterThan( - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.CompareGreaterThan( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.CompareGreaterThan( - Sse2.LoadVector128((Int16*)(pClsVar1)), - Sse2.LoadVector128((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareGreaterThanInt16(); - var result = Sse2.CompareGreaterThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareGreaterThanInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.CompareGreaterThan( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.CompareGreaterThan(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareGreaterThan( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.CompareGreaterThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.CompareGreaterThan( - Sse2.LoadVector128((Int16*)(&test._fld1)), - Sse2.LoadVector128((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((left[0] > right[0]) ? unchecked((short)(-1)) : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((left[i] > right[i]) ? unchecked((short)(-1)) : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.CompareGreaterThan)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThan.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThan.Int32.cs deleted file mode 100644 index 7767f6bff904..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThan.Int32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareGreaterThanInt32() - { - var test = new SimpleBinaryOpTest__CompareGreaterThanInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareGreaterThanInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareGreaterThanInt32 testClass) - { - var result = Sse2.CompareGreaterThan(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareGreaterThanInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareGreaterThan( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareGreaterThanInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareGreaterThanInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.CompareGreaterThan( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.CompareGreaterThan( - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.CompareGreaterThan( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.CompareGreaterThan( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.CompareGreaterThan( - Sse2.LoadVector128((Int32*)(pClsVar1)), - Sse2.LoadVector128((Int32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareGreaterThanInt32(); - var result = Sse2.CompareGreaterThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareGreaterThanInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.CompareGreaterThan( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.CompareGreaterThan(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareGreaterThan( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.CompareGreaterThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.CompareGreaterThan( - Sse2.LoadVector128((Int32*)(&test._fld1)), - Sse2.LoadVector128((Int32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((left[0] > right[0]) ? unchecked((int)(-1)) : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((left[i] > right[i]) ? unchecked((int)(-1)) : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.CompareGreaterThan)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThan.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThan.SByte.cs deleted file mode 100644 index f3ab0236937e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThan.SByte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareGreaterThanSByte() - { - var test = new SimpleBinaryOpTest__CompareGreaterThanSByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareGreaterThanSByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareGreaterThanSByte testClass) - { - var result = Sse2.CompareGreaterThan(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareGreaterThanSByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareGreaterThan( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareGreaterThanSByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareGreaterThanSByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.CompareGreaterThan( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.CompareGreaterThan( - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.CompareGreaterThan( - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.CompareGreaterThan( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.CompareGreaterThan( - Sse2.LoadVector128((SByte*)(pClsVar1)), - Sse2.LoadVector128((SByte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareGreaterThanSByte(); - var result = Sse2.CompareGreaterThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareGreaterThanSByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.CompareGreaterThan( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.CompareGreaterThan(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareGreaterThan( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.CompareGreaterThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.CompareGreaterThan( - Sse2.LoadVector128((SByte*)(&test._fld1)), - Sse2.LoadVector128((SByte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((left[0] > right[0]) ? unchecked((sbyte)(-1)) : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((left[i] > right[i]) ? unchecked((sbyte)(-1)) : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.CompareGreaterThan)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThanOrEqual.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThanOrEqual.Double.cs deleted file mode 100644 index 718ffdb45ff4..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThanOrEqual.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareGreaterThanOrEqualDouble() - { - var test = new SimpleBinaryOpTest__CompareGreaterThanOrEqualDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareGreaterThanOrEqualDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareGreaterThanOrEqualDouble testClass) - { - var result = Sse2.CompareGreaterThanOrEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareGreaterThanOrEqualDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareGreaterThanOrEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareGreaterThanOrEqualDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareGreaterThanOrEqualDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.CompareGreaterThanOrEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.CompareGreaterThanOrEqual( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.CompareGreaterThanOrEqual( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareGreaterThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareGreaterThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareGreaterThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.CompareGreaterThanOrEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.CompareGreaterThanOrEqual( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.CompareGreaterThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareGreaterThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareGreaterThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareGreaterThanOrEqualDouble(); - var result = Sse2.CompareGreaterThanOrEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareGreaterThanOrEqualDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.CompareGreaterThanOrEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.CompareGreaterThanOrEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareGreaterThanOrEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.CompareGreaterThanOrEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.CompareGreaterThanOrEqual( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] >= right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] >= right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.CompareGreaterThanOrEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareLessThan.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareLessThan.Double.cs deleted file mode 100644 index 1537db2e2e9a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareLessThan.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareLessThanDouble() - { - var test = new SimpleBinaryOpTest__CompareLessThanDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareLessThanDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareLessThanDouble testClass) - { - var result = Sse2.CompareLessThan(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareLessThanDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareLessThan( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareLessThanDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareLessThanDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.CompareLessThan( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.CompareLessThan( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.CompareLessThan( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareLessThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareLessThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareLessThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.CompareLessThan( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.CompareLessThan( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.CompareLessThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareLessThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareLessThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareLessThanDouble(); - var result = Sse2.CompareLessThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareLessThanDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.CompareLessThan( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.CompareLessThan(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareLessThan( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.CompareLessThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.CompareLessThan( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] < right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] < right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.CompareLessThan)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareLessThanOrEqual.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareLessThanOrEqual.Double.cs deleted file mode 100644 index b5a5f90f6a7f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareLessThanOrEqual.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareLessThanOrEqualDouble() - { - var test = new SimpleBinaryOpTest__CompareLessThanOrEqualDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareLessThanOrEqualDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareLessThanOrEqualDouble testClass) - { - var result = Sse2.CompareLessThanOrEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareLessThanOrEqualDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareLessThanOrEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareLessThanOrEqualDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareLessThanOrEqualDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.CompareLessThanOrEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.CompareLessThanOrEqual( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.CompareLessThanOrEqual( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareLessThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareLessThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareLessThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.CompareLessThanOrEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.CompareLessThanOrEqual( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.CompareLessThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareLessThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareLessThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareLessThanOrEqualDouble(); - var result = Sse2.CompareLessThanOrEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareLessThanOrEqualDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.CompareLessThanOrEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.CompareLessThanOrEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareLessThanOrEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.CompareLessThanOrEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.CompareLessThanOrEqual( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] <= right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] <= right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.CompareLessThanOrEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotEqual.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotEqual.Double.cs deleted file mode 100644 index 5f50ae9872fa..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotEqual.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareNotEqualDouble() - { - var test = new SimpleBinaryOpTest__CompareNotEqualDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareNotEqualDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareNotEqualDouble testClass) - { - var result = Sse2.CompareNotEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareNotEqualDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareNotEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareNotEqualDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareNotEqualDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.CompareNotEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.CompareNotEqual( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.CompareNotEqual( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareNotEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareNotEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareNotEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.CompareNotEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.CompareNotEqual( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.CompareNotEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareNotEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareNotEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareNotEqualDouble(); - var result = Sse2.CompareNotEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareNotEqualDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.CompareNotEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.CompareNotEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareNotEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.CompareNotEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.CompareNotEqual( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] != right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] != right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.CompareNotEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotGreaterThan.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotGreaterThan.Double.cs deleted file mode 100644 index 6aec3f89be36..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotGreaterThan.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareNotGreaterThanDouble() - { - var test = new SimpleBinaryOpTest__CompareNotGreaterThanDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareNotGreaterThanDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareNotGreaterThanDouble testClass) - { - var result = Sse2.CompareNotGreaterThan(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareNotGreaterThanDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareNotGreaterThan( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareNotGreaterThanDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareNotGreaterThanDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.CompareNotGreaterThan( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.CompareNotGreaterThan( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.CompareNotGreaterThan( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareNotGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareNotGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareNotGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.CompareNotGreaterThan( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.CompareNotGreaterThan( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.CompareNotGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareNotGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareNotGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareNotGreaterThanDouble(); - var result = Sse2.CompareNotGreaterThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareNotGreaterThanDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.CompareNotGreaterThan( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.CompareNotGreaterThan(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareNotGreaterThan( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.CompareNotGreaterThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.CompareNotGreaterThan( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != (!(left[0] > right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != (!(left[i] > right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.CompareNotGreaterThan)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotGreaterThanOrEqual.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotGreaterThanOrEqual.Double.cs deleted file mode 100644 index 6833f5fb8362..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotGreaterThanOrEqual.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareNotGreaterThanOrEqualDouble() - { - var test = new SimpleBinaryOpTest__CompareNotGreaterThanOrEqualDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareNotGreaterThanOrEqualDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareNotGreaterThanOrEqualDouble testClass) - { - var result = Sse2.CompareNotGreaterThanOrEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareNotGreaterThanOrEqualDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareNotGreaterThanOrEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareNotGreaterThanOrEqualDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareNotGreaterThanOrEqualDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.CompareNotGreaterThanOrEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.CompareNotGreaterThanOrEqual( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.CompareNotGreaterThanOrEqual( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareNotGreaterThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareNotGreaterThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareNotGreaterThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.CompareNotGreaterThanOrEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.CompareNotGreaterThanOrEqual( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.CompareNotGreaterThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareNotGreaterThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareNotGreaterThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareNotGreaterThanOrEqualDouble(); - var result = Sse2.CompareNotGreaterThanOrEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareNotGreaterThanOrEqualDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.CompareNotGreaterThanOrEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.CompareNotGreaterThanOrEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareNotGreaterThanOrEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.CompareNotGreaterThanOrEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.CompareNotGreaterThanOrEqual( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != (!(left[0] >= right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != (!(left[i] >= right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.CompareNotGreaterThanOrEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotLessThan.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotLessThan.Double.cs deleted file mode 100644 index 1362a7c9755c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotLessThan.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareNotLessThanDouble() - { - var test = new SimpleBinaryOpTest__CompareNotLessThanDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareNotLessThanDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareNotLessThanDouble testClass) - { - var result = Sse2.CompareNotLessThan(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareNotLessThanDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareNotLessThan( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareNotLessThanDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareNotLessThanDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.CompareNotLessThan( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.CompareNotLessThan( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.CompareNotLessThan( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareNotLessThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareNotLessThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareNotLessThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.CompareNotLessThan( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.CompareNotLessThan( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.CompareNotLessThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareNotLessThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareNotLessThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareNotLessThanDouble(); - var result = Sse2.CompareNotLessThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareNotLessThanDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.CompareNotLessThan( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.CompareNotLessThan(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareNotLessThan( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.CompareNotLessThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.CompareNotLessThan( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != (!(left[0] < right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != (!(left[i] < right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.CompareNotLessThan)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotLessThanOrEqual.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotLessThanOrEqual.Double.cs deleted file mode 100644 index 183098f12d43..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotLessThanOrEqual.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareNotLessThanOrEqualDouble() - { - var test = new SimpleBinaryOpTest__CompareNotLessThanOrEqualDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareNotLessThanOrEqualDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareNotLessThanOrEqualDouble testClass) - { - var result = Sse2.CompareNotLessThanOrEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareNotLessThanOrEqualDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareNotLessThanOrEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareNotLessThanOrEqualDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareNotLessThanOrEqualDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.CompareNotLessThanOrEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.CompareNotLessThanOrEqual( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.CompareNotLessThanOrEqual( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareNotLessThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareNotLessThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareNotLessThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.CompareNotLessThanOrEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.CompareNotLessThanOrEqual( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.CompareNotLessThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareNotLessThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareNotLessThanOrEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareNotLessThanOrEqualDouble(); - var result = Sse2.CompareNotLessThanOrEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareNotLessThanOrEqualDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.CompareNotLessThanOrEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.CompareNotLessThanOrEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareNotLessThanOrEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.CompareNotLessThanOrEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.CompareNotLessThanOrEqual( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != (!(left[0] <= right[0]) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != (!(left[i] <= right[i]) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.CompareNotLessThanOrEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareOrdered.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareOrdered.Double.cs deleted file mode 100644 index 21d35acce2f3..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareOrdered.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareOrderedDouble() - { - var test = new SimpleBinaryOpTest__CompareOrderedDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareOrderedDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareOrderedDouble testClass) - { - var result = Sse2.CompareOrdered(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareOrderedDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareOrdered( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareOrderedDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareOrderedDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.CompareOrdered( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.CompareOrdered( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.CompareOrdered( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareOrdered), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareOrdered), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareOrdered), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.CompareOrdered( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.CompareOrdered( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.CompareOrdered(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareOrdered(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareOrdered(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareOrderedDouble(); - var result = Sse2.CompareOrdered(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareOrderedDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.CompareOrdered( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.CompareOrdered(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareOrdered( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.CompareOrdered(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.CompareOrdered( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != ((!double.IsNaN(left[0]) && !double.IsNaN(right[0])) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != ((!double.IsNaN(left[i]) && !double.IsNaN(right[i])) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.CompareOrdered)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarOrderedEqual.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarOrderedEqual.Boolean.cs deleted file mode 100644 index daa0e222d74e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarOrderedEqual.Boolean.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareScalarOrderedEqualBoolean() - { - var test = new BooleanBinaryOpTest__CompareScalarOrderedEqualBoolean(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__CompareScalarOrderedEqualBoolean - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__CompareScalarOrderedEqualBoolean testClass) - { - var result = Sse2.CompareScalarOrderedEqual(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__CompareScalarOrderedEqualBoolean testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareScalarOrderedEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__CompareScalarOrderedEqualBoolean() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__CompareScalarOrderedEqualBoolean() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.CompareScalarOrderedEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.CompareScalarOrderedEqual( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.CompareScalarOrderedEqual( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarOrderedEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarOrderedEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarOrderedEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.CompareScalarOrderedEqual( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.CompareScalarOrderedEqual( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.CompareScalarOrderedEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareScalarOrderedEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareScalarOrderedEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__CompareScalarOrderedEqualBoolean(); - var result = Sse2.CompareScalarOrderedEqual(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__CompareScalarOrderedEqualBoolean(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.CompareScalarOrderedEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.CompareScalarOrderedEqual(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareScalarOrderedEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.CompareScalarOrderedEqual(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.CompareScalarOrderedEqual( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Double[] left, Double[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((left[0] == right[0]) != result) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.CompareScalarOrderedEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarOrderedGreaterThan.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarOrderedGreaterThan.Boolean.cs deleted file mode 100644 index f6352a35bb0f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarOrderedGreaterThan.Boolean.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareScalarOrderedGreaterThanBoolean() - { - var test = new BooleanBinaryOpTest__CompareScalarOrderedGreaterThanBoolean(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__CompareScalarOrderedGreaterThanBoolean - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__CompareScalarOrderedGreaterThanBoolean testClass) - { - var result = Sse2.CompareScalarOrderedGreaterThan(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__CompareScalarOrderedGreaterThanBoolean testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareScalarOrderedGreaterThan( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__CompareScalarOrderedGreaterThanBoolean() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__CompareScalarOrderedGreaterThanBoolean() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.CompareScalarOrderedGreaterThan( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.CompareScalarOrderedGreaterThan( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.CompareScalarOrderedGreaterThan( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarOrderedGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarOrderedGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarOrderedGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.CompareScalarOrderedGreaterThan( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.CompareScalarOrderedGreaterThan( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.CompareScalarOrderedGreaterThan(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareScalarOrderedGreaterThan(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareScalarOrderedGreaterThan(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__CompareScalarOrderedGreaterThanBoolean(); - var result = Sse2.CompareScalarOrderedGreaterThan(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__CompareScalarOrderedGreaterThanBoolean(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.CompareScalarOrderedGreaterThan( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.CompareScalarOrderedGreaterThan(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareScalarOrderedGreaterThan( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.CompareScalarOrderedGreaterThan(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.CompareScalarOrderedGreaterThan( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Double[] left, Double[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((left[0] > right[0]) != result) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.CompareScalarOrderedGreaterThan)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarOrderedGreaterThanOrEqual.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarOrderedGreaterThanOrEqual.Boolean.cs deleted file mode 100644 index 65122a451029..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarOrderedGreaterThanOrEqual.Boolean.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareScalarOrderedGreaterThanOrEqualBoolean() - { - var test = new BooleanBinaryOpTest__CompareScalarOrderedGreaterThanOrEqualBoolean(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__CompareScalarOrderedGreaterThanOrEqualBoolean - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__CompareScalarOrderedGreaterThanOrEqualBoolean testClass) - { - var result = Sse2.CompareScalarOrderedGreaterThanOrEqual(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__CompareScalarOrderedGreaterThanOrEqualBoolean testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareScalarOrderedGreaterThanOrEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__CompareScalarOrderedGreaterThanOrEqualBoolean() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__CompareScalarOrderedGreaterThanOrEqualBoolean() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.CompareScalarOrderedGreaterThanOrEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.CompareScalarOrderedGreaterThanOrEqual( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.CompareScalarOrderedGreaterThanOrEqual( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarOrderedGreaterThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarOrderedGreaterThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarOrderedGreaterThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.CompareScalarOrderedGreaterThanOrEqual( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.CompareScalarOrderedGreaterThanOrEqual( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.CompareScalarOrderedGreaterThanOrEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareScalarOrderedGreaterThanOrEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareScalarOrderedGreaterThanOrEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__CompareScalarOrderedGreaterThanOrEqualBoolean(); - var result = Sse2.CompareScalarOrderedGreaterThanOrEqual(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__CompareScalarOrderedGreaterThanOrEqualBoolean(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.CompareScalarOrderedGreaterThanOrEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.CompareScalarOrderedGreaterThanOrEqual(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareScalarOrderedGreaterThanOrEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.CompareScalarOrderedGreaterThanOrEqual(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.CompareScalarOrderedGreaterThanOrEqual( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Double[] left, Double[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((left[0] >= right[0]) != result) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.CompareScalarOrderedGreaterThanOrEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarOrderedLessThan.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarOrderedLessThan.Boolean.cs deleted file mode 100644 index 552716621a82..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarOrderedLessThan.Boolean.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareScalarOrderedLessThanBoolean() - { - var test = new BooleanBinaryOpTest__CompareScalarOrderedLessThanBoolean(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__CompareScalarOrderedLessThanBoolean - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__CompareScalarOrderedLessThanBoolean testClass) - { - var result = Sse2.CompareScalarOrderedLessThan(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__CompareScalarOrderedLessThanBoolean testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareScalarOrderedLessThan( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__CompareScalarOrderedLessThanBoolean() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__CompareScalarOrderedLessThanBoolean() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.CompareScalarOrderedLessThan( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.CompareScalarOrderedLessThan( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.CompareScalarOrderedLessThan( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarOrderedLessThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarOrderedLessThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarOrderedLessThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.CompareScalarOrderedLessThan( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.CompareScalarOrderedLessThan( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.CompareScalarOrderedLessThan(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareScalarOrderedLessThan(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareScalarOrderedLessThan(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__CompareScalarOrderedLessThanBoolean(); - var result = Sse2.CompareScalarOrderedLessThan(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__CompareScalarOrderedLessThanBoolean(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.CompareScalarOrderedLessThan( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.CompareScalarOrderedLessThan(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareScalarOrderedLessThan( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.CompareScalarOrderedLessThan(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.CompareScalarOrderedLessThan( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Double[] left, Double[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((left[0] < right[0]) != result) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.CompareScalarOrderedLessThan)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarOrderedLessThanOrEqual.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarOrderedLessThanOrEqual.Boolean.cs deleted file mode 100644 index e0ee6f5ac962..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarOrderedLessThanOrEqual.Boolean.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareScalarOrderedLessThanOrEqualBoolean() - { - var test = new BooleanBinaryOpTest__CompareScalarOrderedLessThanOrEqualBoolean(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__CompareScalarOrderedLessThanOrEqualBoolean - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__CompareScalarOrderedLessThanOrEqualBoolean testClass) - { - var result = Sse2.CompareScalarOrderedLessThanOrEqual(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__CompareScalarOrderedLessThanOrEqualBoolean testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareScalarOrderedLessThanOrEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__CompareScalarOrderedLessThanOrEqualBoolean() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__CompareScalarOrderedLessThanOrEqualBoolean() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.CompareScalarOrderedLessThanOrEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.CompareScalarOrderedLessThanOrEqual( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.CompareScalarOrderedLessThanOrEqual( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarOrderedLessThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarOrderedLessThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarOrderedLessThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.CompareScalarOrderedLessThanOrEqual( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.CompareScalarOrderedLessThanOrEqual( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.CompareScalarOrderedLessThanOrEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareScalarOrderedLessThanOrEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareScalarOrderedLessThanOrEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__CompareScalarOrderedLessThanOrEqualBoolean(); - var result = Sse2.CompareScalarOrderedLessThanOrEqual(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__CompareScalarOrderedLessThanOrEqualBoolean(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.CompareScalarOrderedLessThanOrEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.CompareScalarOrderedLessThanOrEqual(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareScalarOrderedLessThanOrEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.CompareScalarOrderedLessThanOrEqual(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.CompareScalarOrderedLessThanOrEqual( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Double[] left, Double[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((left[0] <= right[0]) != result) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.CompareScalarOrderedLessThanOrEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarOrderedNotEqual.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarOrderedNotEqual.Boolean.cs deleted file mode 100644 index 789f014efc5f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarOrderedNotEqual.Boolean.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareScalarOrderedNotEqualBoolean() - { - var test = new BooleanBinaryOpTest__CompareScalarOrderedNotEqualBoolean(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__CompareScalarOrderedNotEqualBoolean - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__CompareScalarOrderedNotEqualBoolean testClass) - { - var result = Sse2.CompareScalarOrderedNotEqual(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__CompareScalarOrderedNotEqualBoolean testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareScalarOrderedNotEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__CompareScalarOrderedNotEqualBoolean() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__CompareScalarOrderedNotEqualBoolean() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.CompareScalarOrderedNotEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.CompareScalarOrderedNotEqual( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.CompareScalarOrderedNotEqual( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarOrderedNotEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarOrderedNotEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarOrderedNotEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.CompareScalarOrderedNotEqual( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.CompareScalarOrderedNotEqual( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.CompareScalarOrderedNotEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareScalarOrderedNotEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareScalarOrderedNotEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__CompareScalarOrderedNotEqualBoolean(); - var result = Sse2.CompareScalarOrderedNotEqual(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__CompareScalarOrderedNotEqualBoolean(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.CompareScalarOrderedNotEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.CompareScalarOrderedNotEqual(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareScalarOrderedNotEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.CompareScalarOrderedNotEqual(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.CompareScalarOrderedNotEqual( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Double[] left, Double[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((left[0] != right[0]) != result) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.CompareScalarOrderedNotEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarUnorderedEqual.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarUnorderedEqual.Boolean.cs deleted file mode 100644 index 75d398d5dd66..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarUnorderedEqual.Boolean.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareScalarUnorderedEqualBoolean() - { - var test = new BooleanBinaryOpTest__CompareScalarUnorderedEqualBoolean(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__CompareScalarUnorderedEqualBoolean - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__CompareScalarUnorderedEqualBoolean testClass) - { - var result = Sse2.CompareScalarUnorderedEqual(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__CompareScalarUnorderedEqualBoolean testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareScalarUnorderedEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__CompareScalarUnorderedEqualBoolean() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__CompareScalarUnorderedEqualBoolean() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.CompareScalarUnorderedEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.CompareScalarUnorderedEqual( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.CompareScalarUnorderedEqual( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarUnorderedEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarUnorderedEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarUnorderedEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.CompareScalarUnorderedEqual( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.CompareScalarUnorderedEqual( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.CompareScalarUnorderedEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareScalarUnorderedEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareScalarUnorderedEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__CompareScalarUnorderedEqualBoolean(); - var result = Sse2.CompareScalarUnorderedEqual(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__CompareScalarUnorderedEqualBoolean(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.CompareScalarUnorderedEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.CompareScalarUnorderedEqual(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareScalarUnorderedEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.CompareScalarUnorderedEqual(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.CompareScalarUnorderedEqual( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Double[] left, Double[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((left[0] == right[0]) != result) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.CompareScalarUnorderedEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarUnorderedGreaterThan.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarUnorderedGreaterThan.Boolean.cs deleted file mode 100644 index 38dd15aabd83..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarUnorderedGreaterThan.Boolean.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareScalarUnorderedGreaterThanBoolean() - { - var test = new BooleanBinaryOpTest__CompareScalarUnorderedGreaterThanBoolean(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__CompareScalarUnorderedGreaterThanBoolean - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__CompareScalarUnorderedGreaterThanBoolean testClass) - { - var result = Sse2.CompareScalarUnorderedGreaterThan(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__CompareScalarUnorderedGreaterThanBoolean testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareScalarUnorderedGreaterThan( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__CompareScalarUnorderedGreaterThanBoolean() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__CompareScalarUnorderedGreaterThanBoolean() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.CompareScalarUnorderedGreaterThan( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.CompareScalarUnorderedGreaterThan( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.CompareScalarUnorderedGreaterThan( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarUnorderedGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarUnorderedGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarUnorderedGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.CompareScalarUnorderedGreaterThan( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.CompareScalarUnorderedGreaterThan( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.CompareScalarUnorderedGreaterThan(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareScalarUnorderedGreaterThan(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareScalarUnorderedGreaterThan(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__CompareScalarUnorderedGreaterThanBoolean(); - var result = Sse2.CompareScalarUnorderedGreaterThan(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__CompareScalarUnorderedGreaterThanBoolean(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.CompareScalarUnorderedGreaterThan( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.CompareScalarUnorderedGreaterThan(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareScalarUnorderedGreaterThan( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.CompareScalarUnorderedGreaterThan(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.CompareScalarUnorderedGreaterThan( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Double[] left, Double[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((left[0] > right[0]) != result) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.CompareScalarUnorderedGreaterThan)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarUnorderedGreaterThanOrEqual.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarUnorderedGreaterThanOrEqual.Boolean.cs deleted file mode 100644 index 4e1fde1fe3bc..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarUnorderedGreaterThanOrEqual.Boolean.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareScalarUnorderedGreaterThanOrEqualBoolean() - { - var test = new BooleanBinaryOpTest__CompareScalarUnorderedGreaterThanOrEqualBoolean(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__CompareScalarUnorderedGreaterThanOrEqualBoolean - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__CompareScalarUnorderedGreaterThanOrEqualBoolean testClass) - { - var result = Sse2.CompareScalarUnorderedGreaterThanOrEqual(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__CompareScalarUnorderedGreaterThanOrEqualBoolean testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareScalarUnorderedGreaterThanOrEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__CompareScalarUnorderedGreaterThanOrEqualBoolean() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__CompareScalarUnorderedGreaterThanOrEqualBoolean() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.CompareScalarUnorderedGreaterThanOrEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.CompareScalarUnorderedGreaterThanOrEqual( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.CompareScalarUnorderedGreaterThanOrEqual( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarUnorderedGreaterThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarUnorderedGreaterThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarUnorderedGreaterThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.CompareScalarUnorderedGreaterThanOrEqual( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.CompareScalarUnorderedGreaterThanOrEqual( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.CompareScalarUnorderedGreaterThanOrEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareScalarUnorderedGreaterThanOrEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareScalarUnorderedGreaterThanOrEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__CompareScalarUnorderedGreaterThanOrEqualBoolean(); - var result = Sse2.CompareScalarUnorderedGreaterThanOrEqual(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__CompareScalarUnorderedGreaterThanOrEqualBoolean(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.CompareScalarUnorderedGreaterThanOrEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.CompareScalarUnorderedGreaterThanOrEqual(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareScalarUnorderedGreaterThanOrEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.CompareScalarUnorderedGreaterThanOrEqual(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.CompareScalarUnorderedGreaterThanOrEqual( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Double[] left, Double[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((left[0] >= right[0]) != result) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.CompareScalarUnorderedGreaterThanOrEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarUnorderedLessThan.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarUnorderedLessThan.Boolean.cs deleted file mode 100644 index dc649c836c22..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarUnorderedLessThan.Boolean.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareScalarUnorderedLessThanBoolean() - { - var test = new BooleanBinaryOpTest__CompareScalarUnorderedLessThanBoolean(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__CompareScalarUnorderedLessThanBoolean - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__CompareScalarUnorderedLessThanBoolean testClass) - { - var result = Sse2.CompareScalarUnorderedLessThan(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__CompareScalarUnorderedLessThanBoolean testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareScalarUnorderedLessThan( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__CompareScalarUnorderedLessThanBoolean() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__CompareScalarUnorderedLessThanBoolean() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.CompareScalarUnorderedLessThan( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.CompareScalarUnorderedLessThan( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.CompareScalarUnorderedLessThan( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarUnorderedLessThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarUnorderedLessThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarUnorderedLessThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.CompareScalarUnorderedLessThan( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.CompareScalarUnorderedLessThan( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.CompareScalarUnorderedLessThan(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareScalarUnorderedLessThan(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareScalarUnorderedLessThan(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__CompareScalarUnorderedLessThanBoolean(); - var result = Sse2.CompareScalarUnorderedLessThan(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__CompareScalarUnorderedLessThanBoolean(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.CompareScalarUnorderedLessThan( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.CompareScalarUnorderedLessThan(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareScalarUnorderedLessThan( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.CompareScalarUnorderedLessThan(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.CompareScalarUnorderedLessThan( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Double[] left, Double[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((left[0] < right[0]) != result) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.CompareScalarUnorderedLessThan)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarUnorderedLessThanOrEqual.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarUnorderedLessThanOrEqual.Boolean.cs deleted file mode 100644 index eb107dfba081..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarUnorderedLessThanOrEqual.Boolean.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareScalarUnorderedLessThanOrEqualBoolean() - { - var test = new BooleanBinaryOpTest__CompareScalarUnorderedLessThanOrEqualBoolean(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__CompareScalarUnorderedLessThanOrEqualBoolean - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__CompareScalarUnorderedLessThanOrEqualBoolean testClass) - { - var result = Sse2.CompareScalarUnorderedLessThanOrEqual(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__CompareScalarUnorderedLessThanOrEqualBoolean testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareScalarUnorderedLessThanOrEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__CompareScalarUnorderedLessThanOrEqualBoolean() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__CompareScalarUnorderedLessThanOrEqualBoolean() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.CompareScalarUnorderedLessThanOrEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.CompareScalarUnorderedLessThanOrEqual( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.CompareScalarUnorderedLessThanOrEqual( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarUnorderedLessThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarUnorderedLessThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarUnorderedLessThanOrEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.CompareScalarUnorderedLessThanOrEqual( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.CompareScalarUnorderedLessThanOrEqual( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.CompareScalarUnorderedLessThanOrEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareScalarUnorderedLessThanOrEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareScalarUnorderedLessThanOrEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__CompareScalarUnorderedLessThanOrEqualBoolean(); - var result = Sse2.CompareScalarUnorderedLessThanOrEqual(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__CompareScalarUnorderedLessThanOrEqualBoolean(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.CompareScalarUnorderedLessThanOrEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.CompareScalarUnorderedLessThanOrEqual(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareScalarUnorderedLessThanOrEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.CompareScalarUnorderedLessThanOrEqual(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.CompareScalarUnorderedLessThanOrEqual( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Double[] left, Double[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((left[0] <= right[0]) != result) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.CompareScalarUnorderedLessThanOrEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarUnorderedNotEqual.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarUnorderedNotEqual.Boolean.cs deleted file mode 100644 index 5cee6a3f2324..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareScalarUnorderedNotEqual.Boolean.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareScalarUnorderedNotEqualBoolean() - { - var test = new BooleanBinaryOpTest__CompareScalarUnorderedNotEqualBoolean(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__CompareScalarUnorderedNotEqualBoolean - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__CompareScalarUnorderedNotEqualBoolean testClass) - { - var result = Sse2.CompareScalarUnorderedNotEqual(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__CompareScalarUnorderedNotEqualBoolean testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareScalarUnorderedNotEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__CompareScalarUnorderedNotEqualBoolean() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__CompareScalarUnorderedNotEqualBoolean() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.CompareScalarUnorderedNotEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.CompareScalarUnorderedNotEqual( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.CompareScalarUnorderedNotEqual( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarUnorderedNotEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarUnorderedNotEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareScalarUnorderedNotEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.CompareScalarUnorderedNotEqual( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.CompareScalarUnorderedNotEqual( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.CompareScalarUnorderedNotEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareScalarUnorderedNotEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareScalarUnorderedNotEqual(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__CompareScalarUnorderedNotEqualBoolean(); - var result = Sse2.CompareScalarUnorderedNotEqual(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__CompareScalarUnorderedNotEqualBoolean(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.CompareScalarUnorderedNotEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.CompareScalarUnorderedNotEqual(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareScalarUnorderedNotEqual( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.CompareScalarUnorderedNotEqual(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.CompareScalarUnorderedNotEqual( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Double[] left, Double[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((left[0] != right[0]) != result) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.CompareScalarUnorderedNotEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareUnordered.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareUnordered.Double.cs deleted file mode 100644 index f20016329d12..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareUnordered.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareUnorderedDouble() - { - var test = new SimpleBinaryOpTest__CompareUnorderedDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareUnorderedDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareUnorderedDouble testClass) - { - var result = Sse2.CompareUnordered(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareUnorderedDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareUnordered( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareUnorderedDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareUnorderedDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.CompareUnordered( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.CompareUnordered( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.CompareUnordered( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareUnordered), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareUnordered), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.CompareUnordered), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.CompareUnordered( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.CompareUnordered( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.CompareUnordered(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareUnordered(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.CompareUnordered(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareUnorderedDouble(); - var result = Sse2.CompareUnordered(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareUnorderedDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.CompareUnordered( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.CompareUnordered(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.CompareUnordered( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.CompareUnordered(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.CompareUnordered( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != ((double.IsNaN(left[0]) || double.IsNaN(right[0])) ? -1 : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != ((double.IsNaN(left[i]) || double.IsNaN(right[i])) ? -1 : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.CompareUnordered)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ConvertScalarToVector128Double.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ConvertScalarToVector128Double.Double.cs deleted file mode 100644 index 98fbf0647d70..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ConvertScalarToVector128Double.Double.cs +++ /dev/null @@ -1,395 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ConvertScalarToVector128DoubleDouble() - { - var test = new SimpleBinaryOpConvTest__ConvertScalarToVector128DoubleDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpConvTest__ConvertScalarToVector128DoubleDouble - { - private struct TestStruct - { - public Vector128 _fld1; - public Int32 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - _data2 = TestLibrary.Generator.GetInt32(); - testStruct._fld2 = _data2; - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpConvTest__ConvertScalarToVector128DoubleDouble testClass) - { - var result = Sse2.ConvertScalarToVector128Double(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Int32 _data2; - - private static Vector128 _clsVar1; - private static Int32 _clsVar2; - - private Vector128 _fld1; - private Int32 _fld2; - - private SimpleBinaryOpConvTest__DataTable _dataTable; - - static SimpleBinaryOpConvTest__ConvertScalarToVector128DoubleDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - _data2 = TestLibrary.Generator.GetInt32(); - _clsVar2 = _data2; - } - - public SimpleBinaryOpConvTest__ConvertScalarToVector128DoubleDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - _data2 = TestLibrary.Generator.GetInt32(); - _fld2 = _data2; - - _dataTable = new SimpleBinaryOpConvTest__DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ConvertScalarToVector128Double( - Unsafe.Read>(_dataTable.inArray1Ptr), - _dataTable.inData2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inData2, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ConvertScalarToVector128Double( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - _dataTable.inData2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inData2, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ConvertScalarToVector128Double( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - _dataTable.inData2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inData2, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ConvertScalarToVector128Double), new Type[] { typeof(Vector128), typeof(Int32) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - _dataTable.inData2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inData2, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ConvertScalarToVector128Double), new Type[] { typeof(Vector128), typeof(Int32) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - _dataTable.inData2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inData2, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ConvertScalarToVector128Double), new Type[] { typeof(Vector128), typeof(Int32) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - _dataTable.inData2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inData2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ConvertScalarToVector128Double( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = _dataTable.inData2; - var result = Sse2.ConvertScalarToVector128Double(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var right = _dataTable.inData2; - var result = Sse2.ConvertScalarToVector128Double(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var right = _dataTable.inData2; - var result = Sse2.ConvertScalarToVector128Double(left, right); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpConvTest__ConvertScalarToVector128DoubleDouble(); - var result = Sse2.ConvertScalarToVector128Double(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ConvertScalarToVector128Double(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ConvertScalarToVector128Double(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 left, Int32 right, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, right, outArray, method); - } - - private void ValidateResult(void* left, Int32 right, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, right, outArray, method); - } - - private void ValidateResult(Double[] left, Int32 right, Double[] result, [CallerMemberName] string method = "") - { - if ((double)right != result[0]) - { - Succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != left[i]) - { - Succeeded = false; - break; - } - } - } - - if (!Succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ConvertScalarToVector128Double)}(Vector128, Int32): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ConvertToInt64WithTruncation.Vector128Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ConvertToInt64WithTruncation.Vector128Double.cs deleted file mode 100644 index 54b122810303..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ConvertToInt64WithTruncation.Vector128Double.cs +++ /dev/null @@ -1,350 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ConvertToInt64WithTruncationVector128Double() - { - var test = new SimdScalarUnaryOpConvertTest__ConvertToInt64WithTruncationVector128Double(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimdScalarUnaryOpConvertTest__ConvertToInt64WithTruncationVector128Double - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimdScalarUnaryOpConvertTest__ConvertToInt64WithTruncationVector128Double testClass) - { - var result = Sse2.ConvertToInt64WithTruncation(_fld); - testClass.ValidateResult(_fld, result); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data = new Double[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimdScalarUnaryOpTest__DataTable _dataTable; - - static SimdScalarUnaryOpConvertTest__ConvertToInt64WithTruncationVector128Double() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public SimdScalarUnaryOpConvertTest__ConvertToInt64WithTruncationVector128Double() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new SimdScalarUnaryOpTest__DataTable(_data, LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ConvertToInt64WithTruncation( - Unsafe.Read>(_dataTable.inArrayPtr) - ); - - ValidateResult(_dataTable.inArrayPtr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ConvertToInt64WithTruncation( - Sse2.LoadVector128((Double*)(_dataTable.inArrayPtr)) - ); - - ValidateResult(_dataTable.inArrayPtr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ConvertToInt64WithTruncation( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArrayPtr)) - ); - - ValidateResult(_dataTable.inArrayPtr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ConvertToInt64WithTruncation), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr) - }); - - ValidateResult(_dataTable.inArrayPtr, (Int64)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ConvertToInt64WithTruncation), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArrayPtr)) - }); - - ValidateResult(_dataTable.inArrayPtr, (Int64)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ConvertToInt64WithTruncation), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArrayPtr)) - }); - - ValidateResult(_dataTable.inArrayPtr, (Int64)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ConvertToInt64WithTruncation( - _clsVar - ); - - ValidateResult(_clsVar, result); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ConvertToInt64WithTruncation(firstOp); - - ValidateResult(firstOp, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((Double*)(_dataTable.inArrayPtr)); - var result = Sse2.ConvertToInt64WithTruncation(firstOp); - - ValidateResult(firstOp, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArrayPtr)); - var result = Sse2.ConvertToInt64WithTruncation(firstOp); - - ValidateResult(firstOp, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimdScalarUnaryOpConvertTest__ConvertToInt64WithTruncationVector128Double(); - var result = Sse2.ConvertToInt64WithTruncation(test._fld); - - ValidateResult(test._fld, result); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ConvertToInt64WithTruncation(_fld); - - ValidateResult(_fld, result); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ConvertToInt64WithTruncation(test._fld); - - ValidateResult(test._fld, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, Int64 result, [CallerMemberName] string method = "") - { - Double[] inArray = new Double[Op1ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - ValidateResult(inArray, result, method); - } - - private void ValidateResult(void* firstOp, Int64 result, [CallerMemberName] string method = "") - { - Double[] inArray = new Double[Op1ElementCount]; - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - ValidateResult(inArray, result, method); - } - - private void ValidateResult(Double[] firstOp, Int64 result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((long) firstOp[0] != result) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ConvertToInt64WithTruncation)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: result"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ConvertToUInt64.Vector128UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ConvertToUInt64.Vector128UInt64.cs deleted file mode 100644 index 04e52013e421..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ConvertToUInt64.Vector128UInt64.cs +++ /dev/null @@ -1,350 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ConvertToUInt64Vector128UInt64() - { - var test = new SimdScalarUnaryOpConvertTest__ConvertToUInt64Vector128UInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimdScalarUnaryOpConvertTest__ConvertToUInt64Vector128UInt64 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimdScalarUnaryOpConvertTest__ConvertToUInt64Vector128UInt64 testClass) - { - var result = Sse2.ConvertToUInt64(_fld); - testClass.ValidateResult(_fld, result); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data = new UInt64[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimdScalarUnaryOpTest__DataTable _dataTable; - - static SimdScalarUnaryOpConvertTest__ConvertToUInt64Vector128UInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public SimdScalarUnaryOpConvertTest__ConvertToUInt64Vector128UInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new SimdScalarUnaryOpTest__DataTable(_data, LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ConvertToUInt64( - Unsafe.Read>(_dataTable.inArrayPtr) - ); - - ValidateResult(_dataTable.inArrayPtr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ConvertToUInt64( - Sse2.LoadVector128((UInt64*)(_dataTable.inArrayPtr)) - ); - - ValidateResult(_dataTable.inArrayPtr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ConvertToUInt64( - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArrayPtr)) - ); - - ValidateResult(_dataTable.inArrayPtr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ConvertToUInt64), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr) - }); - - ValidateResult(_dataTable.inArrayPtr, (UInt64)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ConvertToUInt64), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt64*)(_dataTable.inArrayPtr)) - }); - - ValidateResult(_dataTable.inArrayPtr, (UInt64)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ConvertToUInt64), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArrayPtr)) - }); - - ValidateResult(_dataTable.inArrayPtr, (UInt64)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ConvertToUInt64( - _clsVar - ); - - ValidateResult(_clsVar, result); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ConvertToUInt64(firstOp); - - ValidateResult(firstOp, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((UInt64*)(_dataTable.inArrayPtr)); - var result = Sse2.ConvertToUInt64(firstOp); - - ValidateResult(firstOp, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArrayPtr)); - var result = Sse2.ConvertToUInt64(firstOp); - - ValidateResult(firstOp, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimdScalarUnaryOpConvertTest__ConvertToUInt64Vector128UInt64(); - var result = Sse2.ConvertToUInt64(test._fld); - - ValidateResult(test._fld, result); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ConvertToUInt64(_fld); - - ValidateResult(_fld, result); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ConvertToUInt64(test._fld); - - ValidateResult(test._fld, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, UInt64 result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - ValidateResult(inArray, result, method); - } - - private void ValidateResult(void* firstOp, UInt64 result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - ValidateResult(inArray, result, method); - } - - private void ValidateResult(UInt64[] firstOp, UInt64 result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result) - { - succeeded = false; - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ConvertToUInt64)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: result"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Divide.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Divide.Double.cs deleted file mode 100644 index b93c8dc1a1d2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Divide.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void DivideDouble() - { - var test = new SimpleBinaryOpTest__DivideDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__DivideDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__DivideDouble testClass) - { - var result = Sse2.Divide(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__DivideDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Divide( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__DivideDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__DivideDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Divide( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Divide( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Divide( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Divide), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Divide), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Divide), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Divide( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Divide( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Divide(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.Divide(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.Divide(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__DivideDouble(); - var result = Sse2.Divide(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__DivideDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Divide( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Divide(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Divide( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Divide(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Divide( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(left[0] / right[0]) != BitConverter.DoubleToInt64Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(left[i] / right[i]) != BitConverter.DoubleToInt64Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Divide)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadAlignedVector128.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadAlignedVector128.cs deleted file mode 100644 index 252bd06fa169..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadAlignedVector128.cs +++ /dev/null @@ -1,237 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Sse2.IsSupported) - { - using (TestTable doubleTable = new TestTable(new double[2] { 1, -5 }, new double[2])) - { - var vf = Sse2.LoadAlignedVector128((double*)(doubleTable.inArrayPtr)); - Unsafe.Write(doubleTable.outArrayPtr, vf); - - if (!doubleTable.CheckResult((x, y) => BitConverter.DoubleToInt64Bits(x) == BitConverter.DoubleToInt64Bits(y))) - { - Console.WriteLine("Sse2 LoadAlignedVector128 failed on double:"); - foreach (var item in doubleTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - using (TestTable intTable = new TestTable(new int[4] { 1, -5, 100, 0 }, new int[4])) - { - var vf = Sse2.LoadAlignedVector128((int*)(intTable.inArrayPtr)); - Unsafe.Write(intTable.outArrayPtr, vf); - - if (!intTable.CheckResult((x, y) => x == y)) - { - Console.WriteLine("Sse2 LoadAlignedVector128 failed on int:"); - foreach (var item in intTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - using (TestTable longTable = new TestTable(new long[2] { 1, -5 }, new long[2])) - { - var vf = Sse2.LoadAlignedVector128((long*)(longTable.inArrayPtr)); - Unsafe.Write(longTable.outArrayPtr, vf); - - if (!longTable.CheckResult((x, y) => x == y)) - { - Console.WriteLine("Sse2 LoadAlignedVector128 failed on long:"); - foreach (var item in longTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - using (TestTable uintTable = new TestTable(new uint[4] { 1, 5, 100, 0 }, new uint[4])) - { - var vf = Sse2.LoadAlignedVector128((uint*)(uintTable.inArrayPtr)); - Unsafe.Write(uintTable.outArrayPtr, vf); - - if (!uintTable.CheckResult((x, y) => x == y)) - { - Console.WriteLine("Sse2 LoadAlignedVector128 failed on uint:"); - foreach (var item in uintTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - using (TestTable ulongTable = new TestTable(new ulong[2] { 1, 5 }, new ulong[2])) - { - var vf = Sse2.LoadAlignedVector128((ulong*)(ulongTable.inArrayPtr)); - Unsafe.Write(ulongTable.outArrayPtr, vf); - - if (!ulongTable.CheckResult((x, y) => x == y)) - { - Console.WriteLine("Sse2 LoadAlignedVector128 failed on ulong:"); - foreach (var item in ulongTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - using (TestTable shortTable = new TestTable(new short[8] { 1, -5, 100, 0, 1, -5, 100, 0 }, new short[8])) - { - var vf = Sse2.LoadAlignedVector128((short*)(shortTable.inArrayPtr)); - Unsafe.Write(shortTable.outArrayPtr, vf); - - if (!shortTable.CheckResult((x, y) => x == y)) - { - Console.WriteLine("Sse2 LoadAlignedVector128 failed on short:"); - foreach (var item in shortTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - using (TestTable ushortTable = new TestTable(new ushort[8] { 1, 5, 100, 0, 1, 5, 100, 0 }, new ushort[8])) - { - var vf = Sse2.LoadAlignedVector128((ushort*)(ushortTable.inArrayPtr)); - Unsafe.Write(ushortTable.outArrayPtr, vf); - - if (!ushortTable.CheckResult((x, y) => x == y)) - { - Console.WriteLine("Sse2 LoadAlignedVector128 failed on ushort:"); - foreach (var item in ushortTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - using (TestTable sbyteTable = new TestTable(new sbyte[16] { 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0 }, new sbyte[16])) - { - var vf = Sse2.LoadAlignedVector128((sbyte*)(sbyteTable.inArrayPtr)); - Unsafe.Write(sbyteTable.outArrayPtr, vf); - - if (!sbyteTable.CheckResult((x, y) => x == y)) - { - Console.WriteLine("Sse2 LoadAlignedVector128 failed on sbyte:"); - foreach (var item in sbyteTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - using (TestTable byteTable = new TestTable(new byte[16] { 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0 }, new byte[16])) - { - var vf = Sse2.LoadAlignedVector128((byte*)(byteTable.inArrayPtr)); - Unsafe.Write(byteTable.outArrayPtr, vf); - - if (!byteTable.CheckResult((x, y) => x == y)) - { - Console.WriteLine("Sse2 LoadAlignedVector128 failed on byte:"); - foreach (var item in byteTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - } - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T : struct - { - private byte[] inArray; - public T[] outArray; - - private GCHandle inHandle; - private GCHandle outHandle; - - private byte simdSize; - - public TestTable(T[] a, T[] b) - { - this.inArray = new byte[32]; - this.outArray = b; - - this.inHandle = GCHandle.Alloc(this.inArray, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.simdSize = 16; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArrayPtr), ref Unsafe.As(ref a[0]), this.simdSize); - } - - public void* inArrayPtr => Align((byte*)(inHandle.AddrOfPinnedObject().ToPointer()), simdSize); - public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); - - public bool CheckResult(Func check) - { - for (int i = 0; i < outArray.Length; i++) - { - if (!check(Unsafe.Add(ref Unsafe.AsRef(inArrayPtr), i), outArray[i])) - { - return false; - } - } - return true; - } - - public void Dispose() - { - inHandle.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, byte expectedAlignment) - { - // Compute how bad the misalignment is, which is at most (expectedAlignment - 1). - // Then subtract that from the expectedAlignment and add it to the original address - // to compute the aligned address. - - var misalignment = expectedAlignment - ((ulong)(buffer) % expectedAlignment); - return (void*)(buffer + misalignment); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadHigh.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadHigh.cs deleted file mode 100644 index 4d2671affcf9..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadHigh.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Sse2.IsSupported) - { - using (TestTable doubleTable = new TestTable(new double[2] { 1, -5 }, new double[2] { 22, -1 }, new double[2])) - { - var vf1 = Unsafe.Read>(doubleTable.inArray1Ptr); - var vf2 = Sse2.LoadHigh(vf1, (double*)(doubleTable.inArray2Ptr)); - Unsafe.Write(doubleTable.outArrayPtr, vf2); - - if (!doubleTable.CheckResult((x, y, z) => z[0] == x[0] && z[1] == y[0])) - { - Console.WriteLine("SSE2 LoadHigh failed on double:"); - foreach (var item in doubleTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - } - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T : struct - { - public T[] inArray1; - public T[] inArray2; - public T[] outArray; - - public void* inArray1Ptr => inHandle1.AddrOfPinnedObject().ToPointer(); - public void* inArray2Ptr => inHandle2.AddrOfPinnedObject().ToPointer(); - public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); - - GCHandle inHandle1; - GCHandle inHandle2; - GCHandle outHandle; - public TestTable(T[] a, T[] b, T[] c) - { - this.inArray1 = a; - this.inArray2 = b; - this.outArray = c; - - inHandle1 = GCHandle.Alloc(inArray1, GCHandleType.Pinned); - inHandle2 = GCHandle.Alloc(inArray2, GCHandleType.Pinned); - outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); - } - public bool CheckResult(Func check) - { - return check(inArray1, inArray2, outArray); - } - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - } - - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadLow.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadLow.cs deleted file mode 100644 index 29c75c6e7acd..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadLow.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Sse2.IsSupported) - { - using (TestTable doubleTable = new TestTable(new double[2] { 1, -5 }, new double[2] { 22, -1 }, new double[2])) - { - var vf1 = Unsafe.Read>(doubleTable.inArray1Ptr); - var vf2 = Sse2.LoadLow(vf1, (double*)(doubleTable.inArray2Ptr)); - Unsafe.Write(doubleTable.outArrayPtr, vf2); - - if (!doubleTable.CheckResult((x, y, z) => z[0] == y[0] && z[1] == x[1])) - { - Console.WriteLine("SSE2 LoadLow failed on double:"); - foreach (var item in doubleTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - } - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T : struct - { - public T[] inArray1; - public T[] inArray2; - public T[] outArray; - - public void* inArray1Ptr => inHandle1.AddrOfPinnedObject().ToPointer(); - public void* inArray2Ptr => inHandle2.AddrOfPinnedObject().ToPointer(); - public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); - - GCHandle inHandle1; - GCHandle inHandle2; - GCHandle outHandle; - public TestTable(T[] a, T[] b, T[] c) - { - this.inArray1 = a; - this.inArray2 = b; - this.outArray = c; - - inHandle1 = GCHandle.Alloc(inArray1, GCHandleType.Pinned); - inHandle2 = GCHandle.Alloc(inArray2, GCHandleType.Pinned); - outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); - } - public bool CheckResult(Func check) - { - return check(inArray1, inArray2, outArray); - } - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - } - - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadVector128.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadVector128.Byte.cs deleted file mode 100644 index dcd3d67ea684..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadVector128.Byte.cs +++ /dev/null @@ -1,165 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void LoadVector128Byte() - { - var test = new SimpleUnaryOpTest__LoadVector128Byte(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__LoadVector128Byte - { - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data = new Byte[Op1ElementCount]; - - private SimpleUnaryOpTest__DataTable _dataTable; - - public SimpleUnaryOpTest__LoadVector128Byte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.LoadVector128( - (Byte*)(_dataTable.inArrayPtr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.LoadVector128), new Type[] { typeof(Byte*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArrayPtr, typeof(Byte*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray = new Byte[Op1ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray = new Byte[Op1ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Byte[] firstOp, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (firstOp[i] != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.LoadVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadVector128.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadVector128.Double.cs deleted file mode 100644 index 37eea7676919..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadVector128.Double.cs +++ /dev/null @@ -1,165 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void LoadVector128Double() - { - var test = new SimpleUnaryOpTest__LoadVector128Double(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__LoadVector128Double - { - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data = new Double[Op1ElementCount]; - - private SimpleUnaryOpTest__DataTable _dataTable; - - public SimpleUnaryOpTest__LoadVector128Double() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.LoadVector128( - (Double*)(_dataTable.inArrayPtr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.LoadVector128), new Type[] { typeof(Double*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArrayPtr, typeof(Double*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Double[] inArray = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Double[] inArray = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(firstOp[i]) != BitConverter.DoubleToInt64Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.LoadVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadVector128.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadVector128.Int16.cs deleted file mode 100644 index a93f8ebe6b7a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadVector128.Int16.cs +++ /dev/null @@ -1,165 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void LoadVector128Int16() - { - var test = new SimpleUnaryOpTest__LoadVector128Int16(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__LoadVector128Int16 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data = new Int16[Op1ElementCount]; - - private SimpleUnaryOpTest__DataTable _dataTable; - - public SimpleUnaryOpTest__LoadVector128Int16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.LoadVector128( - (Int16*)(_dataTable.inArrayPtr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.LoadVector128), new Type[] { typeof(Int16*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArrayPtr, typeof(Int16*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int16[] firstOp, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (firstOp[i] != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.LoadVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadVector128.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadVector128.Int32.cs deleted file mode 100644 index 5466ab5fcc6a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadVector128.Int32.cs +++ /dev/null @@ -1,165 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void LoadVector128Int32() - { - var test = new SimpleUnaryOpTest__LoadVector128Int32(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__LoadVector128Int32 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data = new Int32[Op1ElementCount]; - - private SimpleUnaryOpTest__DataTable _dataTable; - - public SimpleUnaryOpTest__LoadVector128Int32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.LoadVector128( - (Int32*)(_dataTable.inArrayPtr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.LoadVector128), new Type[] { typeof(Int32*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArrayPtr, typeof(Int32*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int32[] firstOp, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (firstOp[i] != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.LoadVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadVector128.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadVector128.Int64.cs deleted file mode 100644 index 365f9f263313..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadVector128.Int64.cs +++ /dev/null @@ -1,165 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void LoadVector128Int64() - { - var test = new SimpleUnaryOpTest__LoadVector128Int64(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__LoadVector128Int64 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data = new Int64[Op1ElementCount]; - - private SimpleUnaryOpTest__DataTable _dataTable; - - public SimpleUnaryOpTest__LoadVector128Int64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.LoadVector128( - (Int64*)(_dataTable.inArrayPtr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.LoadVector128), new Type[] { typeof(Int64*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArrayPtr, typeof(Int64*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int64[] firstOp, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (firstOp[i] != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.LoadVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadVector128.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadVector128.SByte.cs deleted file mode 100644 index 0b1f138a4225..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadVector128.SByte.cs +++ /dev/null @@ -1,165 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void LoadVector128SByte() - { - var test = new SimpleUnaryOpTest__LoadVector128SByte(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__LoadVector128SByte - { - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data = new SByte[Op1ElementCount]; - - private SimpleUnaryOpTest__DataTable _dataTable; - - public SimpleUnaryOpTest__LoadVector128SByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.LoadVector128( - (SByte*)(_dataTable.inArrayPtr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.LoadVector128), new Type[] { typeof(SByte*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArrayPtr, typeof(SByte*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray = new SByte[Op1ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray = new SByte[Op1ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(SByte[] firstOp, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (firstOp[i] != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.LoadVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadVector128.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadVector128.UInt16.cs deleted file mode 100644 index 4d4502a690b0..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadVector128.UInt16.cs +++ /dev/null @@ -1,165 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void LoadVector128UInt16() - { - var test = new SimpleUnaryOpTest__LoadVector128UInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__LoadVector128UInt16 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data = new UInt16[Op1ElementCount]; - - private SimpleUnaryOpTest__DataTable _dataTable; - - public SimpleUnaryOpTest__LoadVector128UInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.LoadVector128( - (UInt16*)(_dataTable.inArrayPtr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.LoadVector128), new Type[] { typeof(UInt16*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArrayPtr, typeof(UInt16*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt16[] firstOp, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (firstOp[i] != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.LoadVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadVector128.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadVector128.UInt32.cs deleted file mode 100644 index e086f2db59a7..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadVector128.UInt32.cs +++ /dev/null @@ -1,165 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void LoadVector128UInt32() - { - var test = new SimpleUnaryOpTest__LoadVector128UInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__LoadVector128UInt32 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data = new UInt32[Op1ElementCount]; - - private SimpleUnaryOpTest__DataTable _dataTable; - - public SimpleUnaryOpTest__LoadVector128UInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.LoadVector128( - (UInt32*)(_dataTable.inArrayPtr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.LoadVector128), new Type[] { typeof(UInt32*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArrayPtr, typeof(UInt32*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt32[] firstOp, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (firstOp[i] != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.LoadVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadVector128.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadVector128.UInt64.cs deleted file mode 100644 index b64cf3aca9e4..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/LoadVector128.UInt64.cs +++ /dev/null @@ -1,165 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void LoadVector128UInt64() - { - var test = new SimpleUnaryOpTest__LoadVector128UInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works - test.RunBasicScenario_Load(); - - // Validates calling via reflection works - test.RunReflectionScenario_Load(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__LoadVector128UInt64 - { - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data = new UInt64[Op1ElementCount]; - - private SimpleUnaryOpTest__DataTable _dataTable; - - public SimpleUnaryOpTest__LoadVector128UInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.LoadVector128( - (UInt64*)(_dataTable.inArrayPtr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.LoadVector128), new Type[] { typeof(UInt64*) }) - .Invoke(null, new object[] { - Pointer.Box(_dataTable.inArrayPtr, typeof(UInt64*)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - Succeeded = false; - - try - { - RunBasicScenario_Load(); - } - catch (PlatformNotSupportedException) - { - Succeeded = true; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt64[] firstOp, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (firstOp[i] != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.LoadVector128)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Max.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Max.Byte.cs deleted file mode 100644 index 417afc671604..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Max.Byte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaxByte() - { - var test = new SimpleBinaryOpTest__MaxByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MaxByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MaxByte testClass) - { - var result = Sse2.Max(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MaxByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Max( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MaxByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MaxByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Max( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Max( - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Max( - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Max), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Max), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Max), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Max( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Max( - Sse2.LoadVector128((Byte*)(pClsVar1)), - Sse2.LoadVector128((Byte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = Sse2.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = Sse2.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MaxByte(); - var result = Sse2.Max(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MaxByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Max( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Max(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Max( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Max(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Max( - Sse2.LoadVector128((Byte*)(&test._fld1)), - Sse2.LoadVector128((Byte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (Math.Max(left[0], right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (Math.Max(left[i], right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Max)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Max.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Max.Double.cs deleted file mode 100644 index 1584f5ed9a07..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Max.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaxDouble() - { - var test = new SimpleBinaryOpTest__MaxDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MaxDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MaxDouble testClass) - { - var result = Sse2.Max(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MaxDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Max( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MaxDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MaxDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Max( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Max( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Max( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Max), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Max), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Max), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Max( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Max( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MaxDouble(); - var result = Sse2.Max(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MaxDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Max( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Max(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Max( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Max(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Max( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(Math.Max(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(Math.Max(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Max)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Max.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Max.Int16.cs deleted file mode 100644 index 041e00891430..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Max.Int16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaxInt16() - { - var test = new SimpleBinaryOpTest__MaxInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MaxInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MaxInt16 testClass) - { - var result = Sse2.Max(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MaxInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Max( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MaxInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MaxInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Max( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Max( - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Max( - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Max), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Max), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Max), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Max( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Max( - Sse2.LoadVector128((Int16*)(pClsVar1)), - Sse2.LoadVector128((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Sse2.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Sse2.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MaxInt16(); - var result = Sse2.Max(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MaxInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Max( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Max(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Max( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Max(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Max( - Sse2.LoadVector128((Int16*)(&test._fld1)), - Sse2.LoadVector128((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (Math.Max(left[0], right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (Math.Max(left[i], right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Max)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Min.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Min.Byte.cs deleted file mode 100644 index f401d736870b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Min.Byte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MinByte() - { - var test = new SimpleBinaryOpTest__MinByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MinByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MinByte testClass) - { - var result = Sse2.Min(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MinByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Min( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MinByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MinByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Min( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Min( - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Min( - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Min), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Min), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Min), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Min( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Min( - Sse2.LoadVector128((Byte*)(pClsVar1)), - Sse2.LoadVector128((Byte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = Sse2.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = Sse2.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MinByte(); - var result = Sse2.Min(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MinByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Min( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Min(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Min( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Min(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Min( - Sse2.LoadVector128((Byte*)(&test._fld1)), - Sse2.LoadVector128((Byte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (Math.Min(left[0], right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (Math.Min(left[i], right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Min)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Min.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Min.Double.cs deleted file mode 100644 index 2783275b3d48..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Min.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MinDouble() - { - var test = new SimpleBinaryOpTest__MinDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MinDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MinDouble testClass) - { - var result = Sse2.Min(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MinDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Min( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MinDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MinDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Min( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Min( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Min( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Min), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Min), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Min), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Min( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Min( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MinDouble(); - var result = Sse2.Min(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MinDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Min( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Min(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Min( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Min(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Min( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(Math.Min(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(Math.Min(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Min)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Min.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Min.Int16.cs deleted file mode 100644 index d8b9e9e86a7b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Min.Int16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MinInt16() - { - var test = new SimpleBinaryOpTest__MinInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MinInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MinInt16 testClass) - { - var result = Sse2.Min(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MinInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Min( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MinInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MinInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Min( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Min( - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Min( - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Min), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Min), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Min), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Min( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Min( - Sse2.LoadVector128((Int16*)(pClsVar1)), - Sse2.LoadVector128((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Sse2.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Sse2.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MinInt16(); - var result = Sse2.Min(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MinInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Min( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Min(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Min( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Min(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Min( - Sse2.LoadVector128((Int16*)(&test._fld1)), - Sse2.LoadVector128((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (Math.Min(left[0], right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (Math.Min(left[i], right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Min)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/MoveScalar.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/MoveScalar.cs deleted file mode 100644 index 954883fa5e0a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/MoveScalar.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace IntelHardwareIntrinsicTest -{ - internal static partial class Program - { - private const int Pass = 100; - private const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - int testsCount = 21; - string methodUnderTestName = nameof(Sse2.MoveScalar); - - if (Sse2.IsSupported) - { - using (var doubleTable = TestTableScalarSse2.Create(testsCount)) - { - for (int i = 0; i < testsCount; i++) - { - (Vector128, Vector128) value = doubleTable[i]; - Vector128 result = Sse2.MoveScalar(value.Item1, value.Item2); - doubleTable.SetOutArray(result); - } - - CheckMethodEight checkDouble = (Span x, Span y, Span z, Span a) => - { - a[0] = y[0]; - a[1] = x[1]; - return a[0] == z[0] && a[1] == z[1]; - }; - - if (!doubleTable.CheckResult(checkDouble)) - { - PrintError(doubleTable, methodUnderTestName, "(Span x, Span y, Span z, Span a) => MoveScalar", checkDouble); - testResult = Fail; - } - } - } - else - { - Console.WriteLine($"Sse2.IsSupported: {Sse2.IsSupported}, skipped tests of {typeof(Sse2)}.{methodUnderTestName}"); - } - - return testResult; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Multiply.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Multiply.Double.cs deleted file mode 100644 index 2b630f9b0522..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Multiply.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplyDouble() - { - var test = new SimpleBinaryOpTest__MultiplyDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MultiplyDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MultiplyDouble testClass) - { - var result = Sse2.Multiply(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MultiplyDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Multiply( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MultiplyDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MultiplyDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Multiply( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Multiply( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Multiply( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Multiply), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Multiply), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Multiply), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Multiply( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Multiply( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Multiply(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.Multiply(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.Multiply(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MultiplyDouble(); - var result = Sse2.Multiply(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MultiplyDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Multiply( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Multiply(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Multiply( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Multiply(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Multiply( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(left[0] * right[0]) != BitConverter.DoubleToInt64Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(left[i] * right[i]) != BitConverter.DoubleToInt64Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Multiply)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Multiply.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Multiply.cs deleted file mode 100644 index 718cfea0b5d0..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Multiply.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace IntelHardwareIntrinsicTest -{ - internal static partial class Program - { - const int Pass = 100; - const int Fail = 0; - - internal static unsafe int Main(string[] args) - { - int testResult = Pass; - int testsCount = 21; - string methodUnderTestName = nameof(Sse2.Multiply); - - if (Sse2.IsSupported) - { - using (var uintTable = TestTableSse2.Create(testsCount, 2.0)) - { - for (int i = 0; i < testsCount; i++) - { - (Vector128, Vector128) value = uintTable[i]; - Vector128 result = Sse2.Multiply(value.Item1, value.Item2); - uintTable.SetOutArrayU(result); - } - - CheckMethodFive checkUInt32 = (uint x1, uint x2, uint y1, uint y2, ulong z1, ulong z2, ref ulong a1, ref ulong a2) => - { - a1 = (ulong)x1 * y1; - a2 = (ulong)x2 * y2; - return a1 == z1 && a2 == z2; - }; - - if (!uintTable.CheckMultiplyUInt32ToUInt64(checkUInt32)) - { - PrintError(uintTable, methodUnderTestName, "(uint x1, uint x2, uint y1, uint y2, ulong z1, ulong z2, ref ulong a1, ref ulong a2) => (a1 = (ulong)x1 * y1) == z1 && (a2 = (ulong)x2 * y2) == z2", checkUInt32); - testResult = Fail; - } - } - } - else - { - Console.WriteLine($"Sse2.IsSupported: {Sse2.IsSupported}, skipped tests of {typeof(Sse2)}.{methodUnderTestName}"); - } - return testResult; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/MultiplyAddAdjacent.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/MultiplyAddAdjacent.Int32.cs deleted file mode 100644 index 7fcc22b7653f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/MultiplyAddAdjacent.Int32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplyAddAdjacentInt32() - { - var test = new SimpleBinaryOpTest__MultiplyAddAdjacentInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MultiplyAddAdjacentInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MultiplyAddAdjacentInt32 testClass) - { - var result = Sse2.MultiplyAddAdjacent(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MultiplyAddAdjacentInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.MultiplyAddAdjacent( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MultiplyAddAdjacentInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MultiplyAddAdjacentInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.MultiplyAddAdjacent( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.MultiplyAddAdjacent( - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.MultiplyAddAdjacent( - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.MultiplyAddAdjacent), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.MultiplyAddAdjacent), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.MultiplyAddAdjacent), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.MultiplyAddAdjacent( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.MultiplyAddAdjacent( - Sse2.LoadVector128((Int16*)(pClsVar1)), - Sse2.LoadVector128((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.MultiplyAddAdjacent(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Sse2.MultiplyAddAdjacent(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Sse2.MultiplyAddAdjacent(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MultiplyAddAdjacentInt32(); - var result = Sse2.MultiplyAddAdjacent(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MultiplyAddAdjacentInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.MultiplyAddAdjacent( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.MultiplyAddAdjacent(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.MultiplyAddAdjacent( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.MultiplyAddAdjacent(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.MultiplyAddAdjacent( - Sse2.LoadVector128((Int16*)(&test._fld1)), - Sse2.LoadVector128((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != Math.Clamp(((right[1] * left[1]) + (right[0] * left[0])), int.MinValue, int.MaxValue)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != Math.Clamp(((right[(i * 2) + 1] * left[(i * 2) + 1]) + (right[i * 2] * left[i * 2])), int.MinValue, int.MaxValue)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.MultiplyAddAdjacent)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/MultiplyLow.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/MultiplyLow.Int16.cs deleted file mode 100644 index d967e1410e59..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/MultiplyLow.Int16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplyLowInt16() - { - var test = new SimpleBinaryOpTest__MultiplyLowInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MultiplyLowInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MultiplyLowInt16 testClass) - { - var result = Sse2.MultiplyLow(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MultiplyLowInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.MultiplyLow( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MultiplyLowInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MultiplyLowInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.MultiplyLow( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.MultiplyLow( - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.MultiplyLow( - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.MultiplyLow), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.MultiplyLow), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.MultiplyLow), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.MultiplyLow( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.MultiplyLow( - Sse2.LoadVector128((Int16*)(pClsVar1)), - Sse2.LoadVector128((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.MultiplyLow(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Sse2.MultiplyLow(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Sse2.MultiplyLow(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MultiplyLowInt16(); - var result = Sse2.MultiplyLow(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MultiplyLowInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.MultiplyLow( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.MultiplyLow(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.MultiplyLow( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.MultiplyLow(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.MultiplyLow( - Sse2.LoadVector128((Int16*)(&test._fld1)), - Sse2.LoadVector128((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != BitConverter.ToInt16(BitConverter.GetBytes(((int)(left[0])) * right[0]), 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != BitConverter.ToInt16(BitConverter.GetBytes(((int)(left[i])) * right[i]), 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.MultiplyLow)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/MultiplyLow.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/MultiplyLow.UInt16.cs deleted file mode 100644 index ad86d2c4d0cd..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/MultiplyLow.UInt16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplyLowUInt16() - { - var test = new SimpleBinaryOpTest__MultiplyLowUInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MultiplyLowUInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MultiplyLowUInt16 testClass) - { - var result = Sse2.MultiplyLow(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MultiplyLowUInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.MultiplyLow( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MultiplyLowUInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MultiplyLowUInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.MultiplyLow( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.MultiplyLow( - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.MultiplyLow( - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.MultiplyLow), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.MultiplyLow), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.MultiplyLow), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.MultiplyLow( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.MultiplyLow( - Sse2.LoadVector128((UInt16*)(pClsVar1)), - Sse2.LoadVector128((UInt16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.MultiplyLow(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Sse2.MultiplyLow(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Sse2.MultiplyLow(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MultiplyLowUInt16(); - var result = Sse2.MultiplyLow(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MultiplyLowUInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.MultiplyLow( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.MultiplyLow(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.MultiplyLow( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.MultiplyLow(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.MultiplyLow( - Sse2.LoadVector128((UInt16*)(&test._fld1)), - Sse2.LoadVector128((UInt16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != BitConverter.ToUInt16(BitConverter.GetBytes(((uint)(left[0])) * right[0]), 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != BitConverter.ToUInt16(BitConverter.GetBytes(((uint)(left[i])) * right[i]), 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.MultiplyLow)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Byte.cs deleted file mode 100644 index 6a5347a0a110..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Byte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void OrByte() - { - var test = new SimpleBinaryOpTest__OrByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__OrByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__OrByte testClass) - { - var result = Sse2.Or(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__OrByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Or( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__OrByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__OrByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Or( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Or( - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Or( - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Or), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Or), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Or), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Or( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Or( - Sse2.LoadVector128((Byte*)(pClsVar1)), - Sse2.LoadVector128((Byte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = Sse2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = Sse2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__OrByte(); - var result = Sse2.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__OrByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Or( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Or(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Or( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Or( - Sse2.LoadVector128((Byte*)(&test._fld1)), - Sse2.LoadVector128((Byte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((byte)(left[0] | right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((byte)(left[i] | right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Or)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Double.cs deleted file mode 100644 index 08526a93969d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void OrDouble() - { - var test = new SimpleBinaryOpTest__OrDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__OrDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__OrDouble testClass) - { - var result = Sse2.Or(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__OrDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Or( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__OrDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__OrDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Or( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Or( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Or( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Or), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Or), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Or), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Or( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Or( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__OrDouble(); - var result = Sse2.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__OrDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Or( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Or(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Or( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Or( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((BitConverter.DoubleToInt64Bits(left[0]) | BitConverter.DoubleToInt64Bits(right[0])) != BitConverter.DoubleToInt64Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((BitConverter.DoubleToInt64Bits(left[i]) | BitConverter.DoubleToInt64Bits(right[i])) != BitConverter.DoubleToInt64Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Or)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Int16.cs deleted file mode 100644 index a954b20c3eca..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Int16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void OrInt16() - { - var test = new SimpleBinaryOpTest__OrInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__OrInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__OrInt16 testClass) - { - var result = Sse2.Or(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__OrInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Or( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__OrInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__OrInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Or( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Or( - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Or( - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Or), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Or), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Or), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Or( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Or( - Sse2.LoadVector128((Int16*)(pClsVar1)), - Sse2.LoadVector128((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Sse2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Sse2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__OrInt16(); - var result = Sse2.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__OrInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Or( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Or(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Or( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Or( - Sse2.LoadVector128((Int16*)(&test._fld1)), - Sse2.LoadVector128((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((short)(left[0] | right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((short)(left[i] | right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Or)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Int32.cs deleted file mode 100644 index ba44c8778242..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Int32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void OrInt32() - { - var test = new SimpleBinaryOpTest__OrInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__OrInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__OrInt32 testClass) - { - var result = Sse2.Or(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__OrInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Or( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__OrInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__OrInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Or( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Or( - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Or( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Or), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Or), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Or), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Or( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Or( - Sse2.LoadVector128((Int32*)(pClsVar1)), - Sse2.LoadVector128((Int32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Sse2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Sse2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__OrInt32(); - var result = Sse2.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__OrInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Or( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Or(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Or( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Or( - Sse2.LoadVector128((Int32*)(&test._fld1)), - Sse2.LoadVector128((Int32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((int)(left[0] | right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((int)(left[i] | right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Or)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Int64.cs deleted file mode 100644 index 34ef9e7834f2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Int64.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void OrInt64() - { - var test = new SimpleBinaryOpTest__OrInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__OrInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int64[] inArray1, Int64[] inArray2, Int64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__OrInt64 testClass) - { - var result = Sse2.Or(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__OrInt64 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Or( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__OrInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__OrInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Or( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Or( - Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Or( - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Or), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Or), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Or), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Or( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Or( - Sse2.LoadVector128((Int64*)(pClsVar1)), - Sse2.LoadVector128((Int64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = Sse2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = Sse2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__OrInt64(); - var result = Sse2.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__OrInt64(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Or( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Or(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Or( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Or( - Sse2.LoadVector128((Int64*)(&test._fld1)), - Sse2.LoadVector128((Int64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((long)(left[0] | right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((long)(left[i] | right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Or)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.SByte.cs deleted file mode 100644 index 16a123c45e76..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.SByte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void OrSByte() - { - var test = new SimpleBinaryOpTest__OrSByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__OrSByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__OrSByte testClass) - { - var result = Sse2.Or(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__OrSByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Or( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__OrSByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__OrSByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Or( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Or( - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Or( - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Or), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Or), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Or), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Or( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Or( - Sse2.LoadVector128((SByte*)(pClsVar1)), - Sse2.LoadVector128((SByte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Sse2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Sse2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__OrSByte(); - var result = Sse2.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__OrSByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Or( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Or(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Or( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Or( - Sse2.LoadVector128((SByte*)(&test._fld1)), - Sse2.LoadVector128((SByte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((sbyte)(left[0] | right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((sbyte)(left[i] | right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Or)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.UInt16.cs deleted file mode 100644 index 1ccd2f8819c4..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.UInt16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void OrUInt16() - { - var test = new SimpleBinaryOpTest__OrUInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__OrUInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__OrUInt16 testClass) - { - var result = Sse2.Or(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__OrUInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Or( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__OrUInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__OrUInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Or( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Or( - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Or( - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Or), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Or), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Or), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Or( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Or( - Sse2.LoadVector128((UInt16*)(pClsVar1)), - Sse2.LoadVector128((UInt16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Sse2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Sse2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__OrUInt16(); - var result = Sse2.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__OrUInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Or( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Or(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Or( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Or( - Sse2.LoadVector128((UInt16*)(&test._fld1)), - Sse2.LoadVector128((UInt16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((ushort)(left[0] | right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((ushort)(left[i] | right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Or)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.UInt32.cs deleted file mode 100644 index ad82295afe65..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.UInt32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void OrUInt32() - { - var test = new SimpleBinaryOpTest__OrUInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__OrUInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__OrUInt32 testClass) - { - var result = Sse2.Or(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__OrUInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Or( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__OrUInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__OrUInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Or( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Or( - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Or( - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Or), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Or), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Or), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Or( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Or( - Sse2.LoadVector128((UInt32*)(pClsVar1)), - Sse2.LoadVector128((UInt32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Sse2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Sse2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__OrUInt32(); - var result = Sse2.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__OrUInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Or( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Or(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Or( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Or( - Sse2.LoadVector128((UInt32*)(&test._fld1)), - Sse2.LoadVector128((UInt32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((uint)(left[0] | right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((uint)(left[i] | right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Or)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.UInt64.cs deleted file mode 100644 index 807ac2cd9e2b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.UInt64.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void OrUInt64() - { - var test = new SimpleBinaryOpTest__OrUInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__OrUInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt64[] inArray1, UInt64[] inArray2, UInt64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__OrUInt64 testClass) - { - var result = Sse2.Or(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__OrUInt64 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Or( - Sse2.LoadVector128((UInt64*)(pFld1)), - Sse2.LoadVector128((UInt64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__OrUInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__OrUInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Or( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Or( - Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Or( - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Or), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Or), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Or), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Or( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Or( - Sse2.LoadVector128((UInt64*)(pClsVar1)), - Sse2.LoadVector128((UInt64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)); - var result = Sse2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)); - var result = Sse2.Or(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__OrUInt64(); - var result = Sse2.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__OrUInt64(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Or( - Sse2.LoadVector128((UInt64*)(pFld1)), - Sse2.LoadVector128((UInt64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Or(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Or( - Sse2.LoadVector128((UInt64*)(pFld1)), - Sse2.LoadVector128((UInt64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Or(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Or( - Sse2.LoadVector128((UInt64*)(&test._fld1)), - Sse2.LoadVector128((UInt64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt64[] left, UInt64[] right, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((ulong)(left[0] | right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((ulong)(left[i] | right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Or)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/PackSignedSaturate.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/PackSignedSaturate.Int16.cs deleted file mode 100644 index 0db202dc3193..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/PackSignedSaturate.Int16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void PackSignedSaturateInt16() - { - var test = new SimpleBinaryOpTest__PackSignedSaturateInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__PackSignedSaturateInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__PackSignedSaturateInt16 testClass) - { - var result = Sse2.PackSignedSaturate(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__PackSignedSaturateInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.PackSignedSaturate( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__PackSignedSaturateInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__PackSignedSaturateInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.PackSignedSaturate( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.PackSignedSaturate( - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.PackSignedSaturate( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.PackSignedSaturate), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.PackSignedSaturate), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.PackSignedSaturate), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.PackSignedSaturate( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.PackSignedSaturate( - Sse2.LoadVector128((Int32*)(pClsVar1)), - Sse2.LoadVector128((Int32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.PackSignedSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Sse2.PackSignedSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Sse2.PackSignedSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__PackSignedSaturateInt16(); - var result = Sse2.PackSignedSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__PackSignedSaturateInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.PackSignedSaturate( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.PackSignedSaturate(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.PackSignedSaturate( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.PackSignedSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.PackSignedSaturate( - Sse2.LoadVector128((Int32*)(&test._fld1)), - Sse2.LoadVector128((Int32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (short)Math.Min(Math.Max(left[0], short.MinValue), short.MaxValue)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((i < 4) ? (short)Math.Min(Math.Max(left[i], short.MinValue), short.MaxValue) : (short)Math.Min(Math.Max(right[i%4], short.MinValue), short.MaxValue))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.PackSignedSaturate)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/PackSignedSaturate.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/PackSignedSaturate.SByte.cs deleted file mode 100644 index 2a2410248e23..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/PackSignedSaturate.SByte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void PackSignedSaturateSByte() - { - var test = new SimpleBinaryOpTest__PackSignedSaturateSByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__PackSignedSaturateSByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__PackSignedSaturateSByte testClass) - { - var result = Sse2.PackSignedSaturate(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__PackSignedSaturateSByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.PackSignedSaturate( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__PackSignedSaturateSByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__PackSignedSaturateSByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.PackSignedSaturate( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.PackSignedSaturate( - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.PackSignedSaturate( - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.PackSignedSaturate), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.PackSignedSaturate), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.PackSignedSaturate), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.PackSignedSaturate( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.PackSignedSaturate( - Sse2.LoadVector128((Int16*)(pClsVar1)), - Sse2.LoadVector128((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.PackSignedSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Sse2.PackSignedSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Sse2.PackSignedSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__PackSignedSaturateSByte(); - var result = Sse2.PackSignedSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__PackSignedSaturateSByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.PackSignedSaturate( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.PackSignedSaturate(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.PackSignedSaturate( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.PackSignedSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.PackSignedSaturate( - Sse2.LoadVector128((Int16*)(&test._fld1)), - Sse2.LoadVector128((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (sbyte)Math.Min(Math.Max(left[0], sbyte.MinValue), sbyte.MaxValue)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((i < 8) ? (sbyte)Math.Min(Math.Max(left[i], sbyte.MinValue), sbyte.MaxValue) : (sbyte)Math.Min(Math.Max(right[i%8], sbyte.MinValue), sbyte.MaxValue))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.PackSignedSaturate)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/PackUnsignedSaturate.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/PackUnsignedSaturate.Byte.cs deleted file mode 100644 index 8d8027b292ce..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/PackUnsignedSaturate.Byte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void PackUnsignedSaturateByte() - { - var test = new SimpleBinaryOpTest__PackUnsignedSaturateByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__PackUnsignedSaturateByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__PackUnsignedSaturateByte testClass) - { - var result = Sse2.PackUnsignedSaturate(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__PackUnsignedSaturateByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.PackUnsignedSaturate( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__PackUnsignedSaturateByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__PackUnsignedSaturateByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.PackUnsignedSaturate( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.PackUnsignedSaturate( - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.PackUnsignedSaturate( - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.PackUnsignedSaturate), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.PackUnsignedSaturate), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.PackUnsignedSaturate), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.PackUnsignedSaturate( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.PackUnsignedSaturate( - Sse2.LoadVector128((Int16*)(pClsVar1)), - Sse2.LoadVector128((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.PackUnsignedSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Sse2.PackUnsignedSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Sse2.PackUnsignedSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__PackUnsignedSaturateByte(); - var result = Sse2.PackUnsignedSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__PackUnsignedSaturateByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.PackUnsignedSaturate( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.PackUnsignedSaturate(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.PackUnsignedSaturate( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.PackUnsignedSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.PackUnsignedSaturate( - Sse2.LoadVector128((Int16*)(&test._fld1)), - Sse2.LoadVector128((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (byte)Math.Min(Math.Max(left[0], byte.MinValue), byte.MaxValue)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((i < 8) ? (byte)Math.Min(Math.Max(left[i], byte.MinValue), byte.MaxValue) : (byte)Math.Min(Math.Max(right[i%8], byte.MinValue), byte.MaxValue))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.PackUnsignedSaturate)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int16.1.cs deleted file mode 100644 index 423e64894081..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int16.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogicalInt161() - { - var test = new ImmUnaryOpTest__ShiftLeftLogicalInt161(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogicalInt161 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogicalInt161 testClass) - { - var result = Sse2.ShiftLeftLogical(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data = new Int16[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogicalInt161() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogicalInt161() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftLeftLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftLeftLogical( - Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftLeftLogical( - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftLeftLogical( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogicalInt161(); - var result = Sse2.ShiftLeftLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftLeftLogical(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftLeftLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int16[] firstOp, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((short)(firstOp[0] << 1) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((short)(firstOp[i] << 1) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftLeftLogical)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int16.16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int16.16.cs deleted file mode 100644 index e665dc7f3f95..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int16.16.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogicalInt1616() - { - var test = new ImmUnaryOpTest__ShiftLeftLogicalInt1616(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogicalInt1616 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogicalInt1616 testClass) - { - var result = Sse2.ShiftLeftLogical(_fld, 16); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data = new Int16[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogicalInt1616() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogicalInt1616() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftLeftLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftLeftLogical( - Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftLeftLogical( - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr)), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr)), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftLeftLogical( - _clsVar, - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftLeftLogical(firstOp, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical(firstOp, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical(firstOp, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogicalInt1616(); - var result = Sse2.ShiftLeftLogical(test._fld, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftLeftLogical(_fld, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftLeftLogical(test._fld, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int16[] firstOp, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (0 != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (0 != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftLeftLogical)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int32.1.cs deleted file mode 100644 index f52f10d96e92..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int32.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogicalInt321() - { - var test = new ImmUnaryOpTest__ShiftLeftLogicalInt321(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogicalInt321 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogicalInt321 testClass) - { - var result = Sse2.ShiftLeftLogical(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data = new Int32[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogicalInt321() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogicalInt321() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftLeftLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftLeftLogical( - Sse2.LoadVector128((Int32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftLeftLogical( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftLeftLogical( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((Int32*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogicalInt321(); - var result = Sse2.ShiftLeftLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftLeftLogical(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftLeftLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int32[] firstOp, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((int)(firstOp[0] << 1) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((int)(firstOp[i] << 1) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftLeftLogical)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int32.32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int32.32.cs deleted file mode 100644 index 5c6da2d815f8..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int32.32.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogicalInt3232() - { - var test = new ImmUnaryOpTest__ShiftLeftLogicalInt3232(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogicalInt3232 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogicalInt3232 testClass) - { - var result = Sse2.ShiftLeftLogical(_fld, 32); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data = new Int32[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogicalInt3232() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogicalInt3232() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftLeftLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftLeftLogical( - Sse2.LoadVector128((Int32*)(_dataTable.inArrayPtr)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftLeftLogical( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArrayPtr)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArrayPtr)), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArrayPtr)), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftLeftLogical( - _clsVar, - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftLeftLogical(firstOp, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((Int32*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical(firstOp, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical(firstOp, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogicalInt3232(); - var result = Sse2.ShiftLeftLogical(test._fld, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftLeftLogical(_fld, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftLeftLogical(test._fld, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int32[] firstOp, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (0 != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (0 != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftLeftLogical)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int64.1.cs deleted file mode 100644 index 7e768016e406..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int64.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogicalInt641() - { - var test = new ImmUnaryOpTest__ShiftLeftLogicalInt641(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogicalInt641 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogicalInt641 testClass) - { - var result = Sse2.ShiftLeftLogical(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data = new Int64[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogicalInt641() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogicalInt641() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftLeftLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftLeftLogical( - Sse2.LoadVector128((Int64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftLeftLogical( - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftLeftLogical( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((Int64*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogicalInt641(); - var result = Sse2.ShiftLeftLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftLeftLogical(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftLeftLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int64[] firstOp, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((long)(firstOp[0] << 1) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((long)(firstOp[i] << 1) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftLeftLogical)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int64.64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int64.64.cs deleted file mode 100644 index 7a17fcf862bf..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int64.64.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogicalInt6464() - { - var test = new ImmUnaryOpTest__ShiftLeftLogicalInt6464(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogicalInt6464 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogicalInt6464 testClass) - { - var result = Sse2.ShiftLeftLogical(_fld, 64); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data = new Int64[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogicalInt6464() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogicalInt6464() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftLeftLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 64 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftLeftLogical( - Sse2.LoadVector128((Int64*)(_dataTable.inArrayPtr)), - 64 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftLeftLogical( - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArrayPtr)), - 64 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)64 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int64*)(_dataTable.inArrayPtr)), - (byte)64 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArrayPtr)), - (byte)64 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftLeftLogical( - _clsVar, - 64 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftLeftLogical(firstOp, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((Int64*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical(firstOp, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical(firstOp, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogicalInt6464(); - var result = Sse2.ShiftLeftLogical(test._fld, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftLeftLogical(_fld, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftLeftLogical(test._fld, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int64[] firstOp, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (0 != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (0 != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftLeftLogical)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt16.1.cs deleted file mode 100644 index a9ae410e5f19..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt16.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogicalUInt161() - { - var test = new ImmUnaryOpTest__ShiftLeftLogicalUInt161(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogicalUInt161 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogicalUInt161 testClass) - { - var result = Sse2.ShiftLeftLogical(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data = new UInt16[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogicalUInt161() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogicalUInt161() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftLeftLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftLeftLogical( - Sse2.LoadVector128((UInt16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftLeftLogical( - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftLeftLogical( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((UInt16*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogicalUInt161(); - var result = Sse2.ShiftLeftLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftLeftLogical(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftLeftLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt16[] firstOp, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((ushort)(firstOp[0] << 1) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((ushort)(firstOp[i] << 1) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftLeftLogical)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt16.16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt16.16.cs deleted file mode 100644 index 5801fd3d1c43..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt16.16.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogicalUInt1616() - { - var test = new ImmUnaryOpTest__ShiftLeftLogicalUInt1616(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogicalUInt1616 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogicalUInt1616 testClass) - { - var result = Sse2.ShiftLeftLogical(_fld, 16); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data = new UInt16[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogicalUInt1616() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogicalUInt1616() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftLeftLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftLeftLogical( - Sse2.LoadVector128((UInt16*)(_dataTable.inArrayPtr)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftLeftLogical( - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArrayPtr)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt16*)(_dataTable.inArrayPtr)), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArrayPtr)), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftLeftLogical( - _clsVar, - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftLeftLogical(firstOp, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((UInt16*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical(firstOp, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical(firstOp, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogicalUInt1616(); - var result = Sse2.ShiftLeftLogical(test._fld, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftLeftLogical(_fld, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftLeftLogical(test._fld, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt16[] firstOp, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (0 != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (0 != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftLeftLogical)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt32.1.cs deleted file mode 100644 index c083abf6c4aa..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt32.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogicalUInt321() - { - var test = new ImmUnaryOpTest__ShiftLeftLogicalUInt321(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogicalUInt321 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogicalUInt321 testClass) - { - var result = Sse2.ShiftLeftLogical(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data = new UInt32[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogicalUInt321() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogicalUInt321() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftLeftLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftLeftLogical( - Sse2.LoadVector128((UInt32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftLeftLogical( - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftLeftLogical( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((UInt32*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogicalUInt321(); - var result = Sse2.ShiftLeftLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftLeftLogical(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftLeftLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt32[] firstOp, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((uint)(firstOp[0] << 1) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((uint)(firstOp[i] << 1) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftLeftLogical)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt32.32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt32.32.cs deleted file mode 100644 index 8a39b54dd203..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt32.32.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogicalUInt3232() - { - var test = new ImmUnaryOpTest__ShiftLeftLogicalUInt3232(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogicalUInt3232 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogicalUInt3232 testClass) - { - var result = Sse2.ShiftLeftLogical(_fld, 32); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data = new UInt32[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogicalUInt3232() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogicalUInt3232() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftLeftLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftLeftLogical( - Sse2.LoadVector128((UInt32*)(_dataTable.inArrayPtr)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftLeftLogical( - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArrayPtr)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt32*)(_dataTable.inArrayPtr)), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArrayPtr)), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftLeftLogical( - _clsVar, - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftLeftLogical(firstOp, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((UInt32*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical(firstOp, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical(firstOp, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogicalUInt3232(); - var result = Sse2.ShiftLeftLogical(test._fld, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftLeftLogical(_fld, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftLeftLogical(test._fld, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt32[] firstOp, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (0 != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (0!= result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftLeftLogical)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt64.1.cs deleted file mode 100644 index fa37db8e6364..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt64.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogicalUInt641() - { - var test = new ImmUnaryOpTest__ShiftLeftLogicalUInt641(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogicalUInt641 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogicalUInt641 testClass) - { - var result = Sse2.ShiftLeftLogical(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data = new UInt64[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogicalUInt641() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogicalUInt641() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftLeftLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftLeftLogical( - Sse2.LoadVector128((UInt64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftLeftLogical( - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftLeftLogical( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((UInt64*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogicalUInt641(); - var result = Sse2.ShiftLeftLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftLeftLogical(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftLeftLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt64[] firstOp, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((ulong)(firstOp[0] << 1) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((ulong)(firstOp[i] << 1) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftLeftLogical)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt64.64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt64.64.cs deleted file mode 100644 index 5a656247732d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt64.64.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogicalUInt6464() - { - var test = new ImmUnaryOpTest__ShiftLeftLogicalUInt6464(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogicalUInt6464 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogicalUInt6464 testClass) - { - var result = Sse2.ShiftLeftLogical(_fld, 64); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data = new UInt64[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogicalUInt6464() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogicalUInt6464() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftLeftLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 64 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftLeftLogical( - Sse2.LoadVector128((UInt64*)(_dataTable.inArrayPtr)), - 64 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftLeftLogical( - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArrayPtr)), - 64 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)64 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt64*)(_dataTable.inArrayPtr)), - (byte)64 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArrayPtr)), - (byte)64 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftLeftLogical( - _clsVar, - 64 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftLeftLogical(firstOp, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((UInt64*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical(firstOp, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical(firstOp, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogicalUInt6464(); - var result = Sse2.ShiftLeftLogical(test._fld, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftLeftLogical(_fld, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftLeftLogical(test._fld, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt64[] firstOp, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (0 != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (0 != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftLeftLogical)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.Byte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.Byte.1.cs deleted file mode 100644 index 233142816ffd..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.Byte.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogical128BitLaneByte1() - { - var test = new ImmUnaryOpTest__ShiftLeftLogical128BitLaneByte1(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogical128BitLaneByte1 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogical128BitLaneByte1 testClass) - { - var result = Sse2.ShiftLeftLogical128BitLane(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data = new Byte[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogical128BitLaneByte1() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogical128BitLaneByte1() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)8; } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftLeftLogical128BitLane( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftLeftLogical128BitLane( - Sse2.LoadVector128((Byte*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftLeftLogical128BitLane( - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Byte*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftLeftLogical128BitLane( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((Byte*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogical128BitLaneByte1(); - var result = Sse2.ShiftLeftLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftLeftLogical128BitLane(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftLeftLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray = new Byte[Op1ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray = new Byte[Op1ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Byte[] firstOp, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != 0) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != 8) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftLeftLogical128BitLane)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.Int16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.Int16.1.cs deleted file mode 100644 index 74e0c7a5c9b9..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.Int16.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogical128BitLaneInt161() - { - var test = new ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt161(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt161 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt161 testClass) - { - var result = Sse2.ShiftLeftLogical128BitLane(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data = new Int16[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt161() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt161() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)8; } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftLeftLogical128BitLane( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftLeftLogical128BitLane( - Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftLeftLogical128BitLane( - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftLeftLogical128BitLane( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt161(); - var result = Sse2.ShiftLeftLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftLeftLogical128BitLane(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftLeftLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int16[] firstOp, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != 2048) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != 2048) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftLeftLogical128BitLane)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.Int32.1.cs deleted file mode 100644 index 369b32ce2ba0..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.Int32.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogical128BitLaneInt321() - { - var test = new ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt321(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt321 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt321 testClass) - { - var result = Sse2.ShiftLeftLogical128BitLane(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data = new Int32[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt321() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt321() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)8; } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftLeftLogical128BitLane( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftLeftLogical128BitLane( - Sse2.LoadVector128((Int32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftLeftLogical128BitLane( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftLeftLogical128BitLane( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((Int32*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt321(); - var result = Sse2.ShiftLeftLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftLeftLogical128BitLane(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftLeftLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int32[] firstOp, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != 2048) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != 2048) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftLeftLogical128BitLane)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.Int64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.Int64.1.cs deleted file mode 100644 index 8333f3673a23..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.Int64.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogical128BitLaneInt641() - { - var test = new ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt641(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt641 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt641 testClass) - { - var result = Sse2.ShiftLeftLogical128BitLane(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data = new Int64[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt641() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt641() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)8; } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftLeftLogical128BitLane( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftLeftLogical128BitLane( - Sse2.LoadVector128((Int64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftLeftLogical128BitLane( - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftLeftLogical128BitLane( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((Int64*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt641(); - var result = Sse2.ShiftLeftLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftLeftLogical128BitLane(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftLeftLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int64[] firstOp, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != 2048) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != 2048) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftLeftLogical128BitLane)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.SByte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.SByte.1.cs deleted file mode 100644 index 7d3960ecfec0..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.SByte.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogical128BitLaneSByte1() - { - var test = new ImmUnaryOpTest__ShiftLeftLogical128BitLaneSByte1(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogical128BitLaneSByte1 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogical128BitLaneSByte1 testClass) - { - var result = Sse2.ShiftLeftLogical128BitLane(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data = new SByte[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogical128BitLaneSByte1() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogical128BitLaneSByte1() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)8; } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftLeftLogical128BitLane( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftLeftLogical128BitLane( - Sse2.LoadVector128((SByte*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftLeftLogical128BitLane( - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((SByte*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftLeftLogical128BitLane( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((SByte*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogical128BitLaneSByte1(); - var result = Sse2.ShiftLeftLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftLeftLogical128BitLane(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftLeftLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray = new SByte[Op1ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray = new SByte[Op1ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(SByte[] firstOp, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != 0) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != 8) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftLeftLogical128BitLane)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.UInt16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.UInt16.1.cs deleted file mode 100644 index 27069da2c318..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.UInt16.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogical128BitLaneUInt161() - { - var test = new ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt161(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt161 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt161 testClass) - { - var result = Sse2.ShiftLeftLogical128BitLane(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data = new UInt16[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt161() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt161() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)8; } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftLeftLogical128BitLane( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftLeftLogical128BitLane( - Sse2.LoadVector128((UInt16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftLeftLogical128BitLane( - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftLeftLogical128BitLane( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((UInt16*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt161(); - var result = Sse2.ShiftLeftLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftLeftLogical128BitLane(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftLeftLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt16[] firstOp, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != 2048) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != 2048) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftLeftLogical128BitLane)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.UInt32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.UInt32.1.cs deleted file mode 100644 index d360b159d5bd..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.UInt32.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogical128BitLaneUInt321() - { - var test = new ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt321(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt321 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt321 testClass) - { - var result = Sse2.ShiftLeftLogical128BitLane(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data = new UInt32[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt321() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt321() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)8; } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftLeftLogical128BitLane( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftLeftLogical128BitLane( - Sse2.LoadVector128((UInt32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftLeftLogical128BitLane( - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftLeftLogical128BitLane( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((UInt32*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt321(); - var result = Sse2.ShiftLeftLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftLeftLogical128BitLane(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftLeftLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt32[] firstOp, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != 2048) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != 2048) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftLeftLogical128BitLane)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.UInt64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.UInt64.1.cs deleted file mode 100644 index ae3e8a5038bc..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.UInt64.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftLeftLogical128BitLaneUInt641() - { - var test = new ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt641(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt641 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt641 testClass) - { - var result = Sse2.ShiftLeftLogical128BitLane(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data = new UInt64[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt641() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt641() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)8; } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftLeftLogical128BitLane( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftLeftLogical128BitLane( - Sse2.LoadVector128((UInt64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftLeftLogical128BitLane( - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftLeftLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftLeftLogical128BitLane( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((UInt64*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftLeftLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt641(); - var result = Sse2.ShiftLeftLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftLeftLogical128BitLane(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftLeftLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt64[] firstOp, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != 2048) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != 2048) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftLeftLogical128BitLane)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightArithmetic.Int16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightArithmetic.Int16.1.cs deleted file mode 100644 index 92f61982dff1..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightArithmetic.Int16.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightArithmeticInt161() - { - var test = new ImmUnaryOpTest__ShiftRightArithmeticInt161(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightArithmeticInt161 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightArithmeticInt161 testClass) - { - var result = Sse2.ShiftRightArithmetic(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data = new Int16[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightArithmeticInt161() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightArithmeticInt161() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftRightArithmetic( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftRightArithmetic( - Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftRightArithmetic( - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightArithmetic), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightArithmetic), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightArithmetic), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftRightArithmetic( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftRightArithmetic(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightArithmetic(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightArithmetic(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightArithmeticInt161(); - var result = Sse2.ShiftRightArithmetic(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftRightArithmetic(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftRightArithmetic(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int16[] firstOp, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((short)(firstOp[0] >> 1) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((short)(firstOp[i] >> 1) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftRightArithmetic)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightArithmetic.Int16.16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightArithmetic.Int16.16.cs deleted file mode 100644 index 0945fc0c3308..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightArithmetic.Int16.16.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightArithmeticInt1616() - { - var test = new ImmUnaryOpTest__ShiftRightArithmeticInt1616(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightArithmeticInt1616 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightArithmeticInt1616 testClass) - { - var result = Sse2.ShiftRightArithmetic(_fld, 16); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data = new Int16[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightArithmeticInt1616() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightArithmeticInt1616() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftRightArithmetic( - Unsafe.Read>(_dataTable.inArrayPtr), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftRightArithmetic( - Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftRightArithmetic( - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightArithmetic), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightArithmetic), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr)), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightArithmetic), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr)), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftRightArithmetic( - _clsVar, - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftRightArithmetic(firstOp, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightArithmetic(firstOp, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightArithmetic(firstOp, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightArithmeticInt1616(); - var result = Sse2.ShiftRightArithmetic(test._fld, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftRightArithmetic(_fld, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftRightArithmetic(test._fld, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int16[] firstOp, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((short)(firstOp[0] >> 15) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((short)(firstOp[i] >> 15) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftRightArithmetic)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightArithmetic.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightArithmetic.Int32.1.cs deleted file mode 100644 index c26c37c0cbdd..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightArithmetic.Int32.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightArithmeticInt321() - { - var test = new ImmUnaryOpTest__ShiftRightArithmeticInt321(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightArithmeticInt321 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightArithmeticInt321 testClass) - { - var result = Sse2.ShiftRightArithmetic(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data = new Int32[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightArithmeticInt321() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightArithmeticInt321() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftRightArithmetic( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftRightArithmetic( - Sse2.LoadVector128((Int32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftRightArithmetic( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightArithmetic), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightArithmetic), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightArithmetic), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftRightArithmetic( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftRightArithmetic(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((Int32*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightArithmetic(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightArithmetic(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightArithmeticInt321(); - var result = Sse2.ShiftRightArithmetic(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftRightArithmetic(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftRightArithmetic(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int32[] firstOp, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((int)(firstOp[0] >> 1) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((int)(firstOp[i] >> 1) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftRightArithmetic)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightArithmetic.Int32.32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightArithmetic.Int32.32.cs deleted file mode 100644 index 151d4a7c1eac..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightArithmetic.Int32.32.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightArithmeticInt3232() - { - var test = new ImmUnaryOpTest__ShiftRightArithmeticInt3232(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightArithmeticInt3232 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightArithmeticInt3232 testClass) - { - var result = Sse2.ShiftRightArithmetic(_fld, 32); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data = new Int32[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightArithmeticInt3232() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightArithmeticInt3232() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftRightArithmetic( - Unsafe.Read>(_dataTable.inArrayPtr), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftRightArithmetic( - Sse2.LoadVector128((Int32*)(_dataTable.inArrayPtr)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftRightArithmetic( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArrayPtr)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightArithmetic), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightArithmetic), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArrayPtr)), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightArithmetic), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArrayPtr)), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftRightArithmetic( - _clsVar, - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftRightArithmetic(firstOp, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((Int32*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightArithmetic(firstOp, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightArithmetic(firstOp, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightArithmeticInt3232(); - var result = Sse2.ShiftRightArithmetic(test._fld, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftRightArithmetic(_fld, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftRightArithmetic(test._fld, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int32[] firstOp, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((int)(firstOp[0] >> 31) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((int)(firstOp[i] >> 31) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftRightArithmetic)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int16.1.cs deleted file mode 100644 index fbac4c2e46ba..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int16.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogicalInt161() - { - var test = new ImmUnaryOpTest__ShiftRightLogicalInt161(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogicalInt161 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogicalInt161 testClass) - { - var result = Sse2.ShiftRightLogical(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data = new Int16[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogicalInt161() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogicalInt161() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftRightLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftRightLogical( - Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftRightLogical( - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftRightLogical( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogicalInt161(); - var result = Sse2.ShiftRightLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftRightLogical(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftRightLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int16[] firstOp, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((short)(firstOp[0] >> 1) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((short)(firstOp[i] >> 1) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftRightLogical)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int16.16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int16.16.cs deleted file mode 100644 index 2f520feb1015..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int16.16.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogicalInt1616() - { - var test = new ImmUnaryOpTest__ShiftRightLogicalInt1616(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogicalInt1616 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogicalInt1616 testClass) - { - var result = Sse2.ShiftRightLogical(_fld, 16); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data = new Int16[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogicalInt1616() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogicalInt1616() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftRightLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftRightLogical( - Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftRightLogical( - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr)), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr)), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftRightLogical( - _clsVar, - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftRightLogical(firstOp, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical(firstOp, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical(firstOp, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogicalInt1616(); - var result = Sse2.ShiftRightLogical(test._fld, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftRightLogical(_fld, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftRightLogical(test._fld, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int16[] firstOp, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (0 != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (0 != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftRightLogical)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int32.1.cs deleted file mode 100644 index 4940a852b866..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int32.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogicalInt321() - { - var test = new ImmUnaryOpTest__ShiftRightLogicalInt321(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogicalInt321 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogicalInt321 testClass) - { - var result = Sse2.ShiftRightLogical(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data = new Int32[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogicalInt321() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogicalInt321() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftRightLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftRightLogical( - Sse2.LoadVector128((Int32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftRightLogical( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftRightLogical( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((Int32*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogicalInt321(); - var result = Sse2.ShiftRightLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftRightLogical(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftRightLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int32[] firstOp, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((int)(firstOp[0] >> 1) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((int)(firstOp[i] >> 1) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftRightLogical)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int32.32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int32.32.cs deleted file mode 100644 index 6ff880b14eda..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int32.32.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogicalInt3232() - { - var test = new ImmUnaryOpTest__ShiftRightLogicalInt3232(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogicalInt3232 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogicalInt3232 testClass) - { - var result = Sse2.ShiftRightLogical(_fld, 32); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data = new Int32[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogicalInt3232() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogicalInt3232() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftRightLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftRightLogical( - Sse2.LoadVector128((Int32*)(_dataTable.inArrayPtr)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftRightLogical( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArrayPtr)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArrayPtr)), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArrayPtr)), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftRightLogical( - _clsVar, - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftRightLogical(firstOp, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((Int32*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical(firstOp, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical(firstOp, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogicalInt3232(); - var result = Sse2.ShiftRightLogical(test._fld, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftRightLogical(_fld, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftRightLogical(test._fld, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int32[] firstOp, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (0 != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (0 != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftRightLogical)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int64.1.cs deleted file mode 100644 index 4541cb6911d8..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int64.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogicalInt641() - { - var test = new ImmUnaryOpTest__ShiftRightLogicalInt641(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogicalInt641 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogicalInt641 testClass) - { - var result = Sse2.ShiftRightLogical(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data = new Int64[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogicalInt641() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogicalInt641() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftRightLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftRightLogical( - Sse2.LoadVector128((Int64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftRightLogical( - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftRightLogical( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((Int64*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogicalInt641(); - var result = Sse2.ShiftRightLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftRightLogical(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftRightLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int64[] firstOp, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((long)(firstOp[0] >> 1) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((long)(firstOp[i] >> 1) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftRightLogical)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int64.64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int64.64.cs deleted file mode 100644 index c76f04e000e7..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int64.64.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogicalInt6464() - { - var test = new ImmUnaryOpTest__ShiftRightLogicalInt6464(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogicalInt6464 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogicalInt6464 testClass) - { - var result = Sse2.ShiftRightLogical(_fld, 64); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data = new Int64[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogicalInt6464() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogicalInt6464() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftRightLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 64 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftRightLogical( - Sse2.LoadVector128((Int64*)(_dataTable.inArrayPtr)), - 64 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftRightLogical( - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArrayPtr)), - 64 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)64 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int64*)(_dataTable.inArrayPtr)), - (byte)64 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArrayPtr)), - (byte)64 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftRightLogical( - _clsVar, - 64 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftRightLogical(firstOp, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((Int64*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical(firstOp, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical(firstOp, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogicalInt6464(); - var result = Sse2.ShiftRightLogical(test._fld, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftRightLogical(_fld, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftRightLogical(test._fld, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int64[] firstOp, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (0 != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (0 != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftRightLogical)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt16.1.cs deleted file mode 100644 index b4cd2548aed3..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt16.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogicalUInt161() - { - var test = new ImmUnaryOpTest__ShiftRightLogicalUInt161(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogicalUInt161 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogicalUInt161 testClass) - { - var result = Sse2.ShiftRightLogical(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data = new UInt16[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogicalUInt161() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogicalUInt161() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftRightLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftRightLogical( - Sse2.LoadVector128((UInt16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftRightLogical( - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftRightLogical( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((UInt16*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogicalUInt161(); - var result = Sse2.ShiftRightLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftRightLogical(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftRightLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt16[] firstOp, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((ushort)(firstOp[0] >> 1) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((ushort)(firstOp[i] >> 1) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftRightLogical)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt16.16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt16.16.cs deleted file mode 100644 index c8e56a8fb8d2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt16.16.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogicalUInt1616() - { - var test = new ImmUnaryOpTest__ShiftRightLogicalUInt1616(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogicalUInt1616 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogicalUInt1616 testClass) - { - var result = Sse2.ShiftRightLogical(_fld, 16); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data = new UInt16[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogicalUInt1616() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogicalUInt1616() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftRightLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftRightLogical( - Sse2.LoadVector128((UInt16*)(_dataTable.inArrayPtr)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftRightLogical( - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArrayPtr)), - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt16*)(_dataTable.inArrayPtr)), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArrayPtr)), - (byte)16 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftRightLogical( - _clsVar, - 16 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftRightLogical(firstOp, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((UInt16*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical(firstOp, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical(firstOp, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogicalUInt1616(); - var result = Sse2.ShiftRightLogical(test._fld, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftRightLogical(_fld, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftRightLogical(test._fld, 16); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt16[] firstOp, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (0 != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (0 != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftRightLogical)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt32.1.cs deleted file mode 100644 index 43ee165e16d6..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt32.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogicalUInt321() - { - var test = new ImmUnaryOpTest__ShiftRightLogicalUInt321(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogicalUInt321 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogicalUInt321 testClass) - { - var result = Sse2.ShiftRightLogical(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data = new UInt32[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogicalUInt321() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogicalUInt321() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftRightLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftRightLogical( - Sse2.LoadVector128((UInt32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftRightLogical( - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftRightLogical( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((UInt32*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogicalUInt321(); - var result = Sse2.ShiftRightLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftRightLogical(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftRightLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt32[] firstOp, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((uint)(firstOp[0] >> 1) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((uint)(firstOp[i] >> 1) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftRightLogical)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt32.32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt32.32.cs deleted file mode 100644 index 57f79c4fdffb..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt32.32.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogicalUInt3232() - { - var test = new ImmUnaryOpTest__ShiftRightLogicalUInt3232(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogicalUInt3232 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogicalUInt3232 testClass) - { - var result = Sse2.ShiftRightLogical(_fld, 32); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data = new UInt32[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogicalUInt3232() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogicalUInt3232() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftRightLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftRightLogical( - Sse2.LoadVector128((UInt32*)(_dataTable.inArrayPtr)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftRightLogical( - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArrayPtr)), - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt32*)(_dataTable.inArrayPtr)), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArrayPtr)), - (byte)32 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftRightLogical( - _clsVar, - 32 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftRightLogical(firstOp, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((UInt32*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical(firstOp, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical(firstOp, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogicalUInt3232(); - var result = Sse2.ShiftRightLogical(test._fld, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftRightLogical(_fld, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftRightLogical(test._fld, 32); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt32[] firstOp, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (0 != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (0!= result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftRightLogical)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt64.1.cs deleted file mode 100644 index 8434630150d3..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt64.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogicalUInt641() - { - var test = new ImmUnaryOpTest__ShiftRightLogicalUInt641(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogicalUInt641 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogicalUInt641 testClass) - { - var result = Sse2.ShiftRightLogical(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data = new UInt64[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogicalUInt641() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogicalUInt641() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftRightLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftRightLogical( - Sse2.LoadVector128((UInt64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftRightLogical( - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftRightLogical( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((UInt64*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogicalUInt641(); - var result = Sse2.ShiftRightLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftRightLogical(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftRightLogical(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt64[] firstOp, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((ulong)(firstOp[0] >> 1) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((ulong)(firstOp[i] >> 1) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftRightLogical)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt64.64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt64.64.cs deleted file mode 100644 index 95d5c64d9cd3..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt64.64.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogicalUInt6464() - { - var test = new ImmUnaryOpTest__ShiftRightLogicalUInt6464(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogicalUInt6464 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogicalUInt6464 testClass) - { - var result = Sse2.ShiftRightLogical(_fld, 64); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data = new UInt64[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogicalUInt6464() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogicalUInt6464() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftRightLogical( - Unsafe.Read>(_dataTable.inArrayPtr), - 64 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftRightLogical( - Sse2.LoadVector128((UInt64*)(_dataTable.inArrayPtr)), - 64 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftRightLogical( - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArrayPtr)), - 64 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)64 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt64*)(_dataTable.inArrayPtr)), - (byte)64 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArrayPtr)), - (byte)64 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftRightLogical( - _clsVar, - 64 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftRightLogical(firstOp, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((UInt64*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical(firstOp, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical(firstOp, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogicalUInt6464(); - var result = Sse2.ShiftRightLogical(test._fld, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftRightLogical(_fld, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftRightLogical(test._fld, 64); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt64[] firstOp, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (0 != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (0 != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftRightLogical)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.Byte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.Byte.1.cs deleted file mode 100644 index 28f5f91dc6f5..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.Byte.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogical128BitLaneByte1() - { - var test = new ImmUnaryOpTest__ShiftRightLogical128BitLaneByte1(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogical128BitLaneByte1 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogical128BitLaneByte1 testClass) - { - var result = Sse2.ShiftRightLogical128BitLane(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data = new Byte[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogical128BitLaneByte1() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogical128BitLaneByte1() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)8; } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftRightLogical128BitLane( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftRightLogical128BitLane( - Sse2.LoadVector128((Byte*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftRightLogical128BitLane( - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Byte*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftRightLogical128BitLane( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((Byte*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogical128BitLaneByte1(); - var result = Sse2.ShiftRightLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftRightLogical128BitLane(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftRightLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray = new Byte[Op1ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray = new Byte[Op1ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Byte[] firstOp, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != 8) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((i == 15 ? result[i] != 0 : result[i] != 8)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftRightLogical128BitLane)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.Int16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.Int16.1.cs deleted file mode 100644 index 1618c8434676..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.Int16.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogical128BitLaneInt161() - { - var test = new ImmUnaryOpTest__ShiftRightLogical128BitLaneInt161(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogical128BitLaneInt161 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogical128BitLaneInt161 testClass) - { - var result = Sse2.ShiftRightLogical128BitLane(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data = new Int16[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogical128BitLaneInt161() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogical128BitLaneInt161() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)8; } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftRightLogical128BitLane( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftRightLogical128BitLane( - Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftRightLogical128BitLane( - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftRightLogical128BitLane( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogical128BitLaneInt161(); - var result = Sse2.ShiftRightLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftRightLogical128BitLane(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftRightLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray = new Int16[Op1ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int16[] firstOp, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != 2048) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((i == 7 ? result[i] != 0 : result[i] != 2048)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftRightLogical128BitLane)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.Int32.1.cs deleted file mode 100644 index a94fd63a4e5e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.Int32.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogical128BitLaneInt321() - { - var test = new ImmUnaryOpTest__ShiftRightLogical128BitLaneInt321(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogical128BitLaneInt321 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogical128BitLaneInt321 testClass) - { - var result = Sse2.ShiftRightLogical128BitLane(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data = new Int32[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogical128BitLaneInt321() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogical128BitLaneInt321() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)8; } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftRightLogical128BitLane( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftRightLogical128BitLane( - Sse2.LoadVector128((Int32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftRightLogical128BitLane( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftRightLogical128BitLane( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((Int32*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogical128BitLaneInt321(); - var result = Sse2.ShiftRightLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftRightLogical128BitLane(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftRightLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int32[] firstOp, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != 134217728) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((i == 3 ? result[i] != 0 : result[i] != 134217728)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftRightLogical128BitLane)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.Int64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.Int64.1.cs deleted file mode 100644 index ac8dc496ff83..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.Int64.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogical128BitLaneInt641() - { - var test = new ImmUnaryOpTest__ShiftRightLogical128BitLaneInt641(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogical128BitLaneInt641 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogical128BitLaneInt641 testClass) - { - var result = Sse2.ShiftRightLogical128BitLane(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data = new Int64[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogical128BitLaneInt641() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogical128BitLaneInt641() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)8; } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftRightLogical128BitLane( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftRightLogical128BitLane( - Sse2.LoadVector128((Int64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftRightLogical128BitLane( - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftRightLogical128BitLane( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((Int64*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogical128BitLaneInt641(); - var result = Sse2.ShiftRightLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftRightLogical128BitLane(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftRightLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray = new Int64[Op1ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int64[] firstOp, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != 576460752303423488L) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((result[i] != 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftRightLogical128BitLane)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.SByte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.SByte.1.cs deleted file mode 100644 index e116ce417d33..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.SByte.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogical128BitLaneSByte1() - { - var test = new ImmUnaryOpTest__ShiftRightLogical128BitLaneSByte1(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogical128BitLaneSByte1 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogical128BitLaneSByte1 testClass) - { - var result = Sse2.ShiftRightLogical128BitLane(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data = new SByte[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogical128BitLaneSByte1() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogical128BitLaneSByte1() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)8; } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftRightLogical128BitLane( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftRightLogical128BitLane( - Sse2.LoadVector128((SByte*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftRightLogical128BitLane( - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((SByte*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftRightLogical128BitLane( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((SByte*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogical128BitLaneSByte1(); - var result = Sse2.ShiftRightLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftRightLogical128BitLane(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftRightLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray = new SByte[Op1ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray = new SByte[Op1ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(SByte[] firstOp, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != 8) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((i == 15 ? result[i] != 0 : result[i] != 8)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftRightLogical128BitLane)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.UInt16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.UInt16.1.cs deleted file mode 100644 index 80ec3c8a3f7d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.UInt16.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogical128BitLaneUInt161() - { - var test = new ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt161(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt161 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt161 testClass) - { - var result = Sse2.ShiftRightLogical128BitLane(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data = new UInt16[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt161() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt161() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)8; } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftRightLogical128BitLane( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftRightLogical128BitLane( - Sse2.LoadVector128((UInt16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftRightLogical128BitLane( - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftRightLogical128BitLane( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((UInt16*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt161(); - var result = Sse2.ShiftRightLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftRightLogical128BitLane(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftRightLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray = new UInt16[Op1ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt16[] firstOp, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != 2048) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((i == 7 ? result[i] != 0 : result[i] != 2048)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftRightLogical128BitLane)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.UInt32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.UInt32.1.cs deleted file mode 100644 index 25fb9b80b109..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.UInt32.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogical128BitLaneUInt321() - { - var test = new ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt321(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt321 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt321 testClass) - { - var result = Sse2.ShiftRightLogical128BitLane(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data = new UInt32[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt321() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt321() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)8; } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftRightLogical128BitLane( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftRightLogical128BitLane( - Sse2.LoadVector128((UInt32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftRightLogical128BitLane( - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftRightLogical128BitLane( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((UInt32*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt321(); - var result = Sse2.ShiftRightLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftRightLogical128BitLane(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftRightLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt32[] firstOp, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != 134217728) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((i == 3 ? result[i] != 0 : result[i] != 134217728)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftRightLogical128BitLane)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.UInt64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.UInt64.1.cs deleted file mode 100644 index 1710c620330e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.UInt64.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShiftRightLogical128BitLaneUInt641() - { - var test = new ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt641(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt641 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt641 testClass) - { - var result = Sse2.ShiftRightLogical128BitLane(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data = new UInt64[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt641() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt641() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)8; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)8; } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.ShiftRightLogical128BitLane( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.ShiftRightLogical128BitLane( - Sse2.LoadVector128((UInt64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.ShiftRightLogical128BitLane( - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.ShiftRightLogical128BitLane), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.ShiftRightLogical128BitLane( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((UInt64*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArrayPtr)); - var result = Sse2.ShiftRightLogical128BitLane(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt641(); - var result = Sse2.ShiftRightLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.ShiftRightLogical128BitLane(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.ShiftRightLogical128BitLane(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray = new UInt64[Op1ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt64[] firstOp, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != 576460752303423488UL) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((result[i] != 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.ShiftRightLogical128BitLane)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Shuffle.Double.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Shuffle.Double.1.cs deleted file mode 100644 index 46f341c78312..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Shuffle.Double.1.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShuffleDouble1() - { - var test = new ImmBinaryOpTest__ShuffleDouble1(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__ShuffleDouble1 - { - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__ShuffleDouble1 testClass) - { - var result = Sse2.Shuffle(_fld1, _fld2, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__ShuffleDouble1() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__ShuffleDouble1() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Shuffle( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Shuffle( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Shuffle( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Shuffle), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Shuffle), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Shuffle), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Shuffle( - _clsVar1, - _clsVar2, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Shuffle(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.Shuffle(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.Shuffle(left, right, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__ShuffleDouble1(); - var result = Sse2.Shuffle(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Shuffle(_fld1, _fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Shuffle(test._fld1, test._fld2, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(left[1])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(right[0])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Shuffle)}(Vector128.1, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Shuffle.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Shuffle.Int32.1.cs deleted file mode 100644 index 9698f1dc9bd4..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Shuffle.Int32.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShuffleInt321() - { - var test = new ImmUnaryOpTest__ShuffleInt321(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShuffleInt321 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShuffleInt321 testClass) - { - var result = Sse2.Shuffle(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data = new Int32[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShuffleInt321() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShuffleInt321() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Shuffle( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Shuffle( - Sse2.LoadVector128((Int32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Shuffle( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Shuffle), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Shuffle), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Shuffle), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Shuffle( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.Shuffle(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((Int32*)(_dataTable.inArrayPtr)); - var result = Sse2.Shuffle(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArrayPtr)); - var result = Sse2.Shuffle(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShuffleInt321(); - var result = Sse2.Shuffle(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Shuffle(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Shuffle(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray = new Int32[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(Int32[] firstOp, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[1] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (firstOp[0] != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Shuffle)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Shuffle.UInt32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Shuffle.UInt32.1.cs deleted file mode 100644 index db0cf33fbb77..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Shuffle.UInt32.1.cs +++ /dev/null @@ -1,392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShuffleUInt321() - { - var test = new ImmUnaryOpTest__ShuffleUInt321(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmUnaryOpTest__ShuffleUInt321 - { - private struct TestStruct - { - public Vector128 _fld; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmUnaryOpTest__ShuffleUInt321 testClass) - { - var result = Sse2.Shuffle(_fld, 1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data = new UInt32[Op1ElementCount]; - - private static Vector128 _clsVar; - - private Vector128 _fld; - - private SimpleUnaryOpTest__DataTable _dataTable; - - static ImmUnaryOpTest__ShuffleUInt321() - { - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmUnaryOpTest__ShuffleUInt321() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Shuffle( - Unsafe.Read>(_dataTable.inArrayPtr), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Shuffle( - Sse2.LoadVector128((UInt32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Shuffle( - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArrayPtr)), - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Shuffle), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Shuffle), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Shuffle), new Type[] { typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArrayPtr)), - (byte)1 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Shuffle( - _clsVar, - 1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Sse2.Shuffle(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var firstOp = Sse2.LoadVector128((UInt32*)(_dataTable.inArrayPtr)); - var result = Sse2.Shuffle(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var firstOp = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArrayPtr)); - var result = Sse2.Shuffle(firstOp, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(firstOp, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmUnaryOpTest__ShuffleUInt321(); - var result = Sse2.Shuffle(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Shuffle(_fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Shuffle(test._fld, 1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray = new UInt32[Op1ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray, outArray, method); - } - - private void ValidateResult(UInt32[] firstOp, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (firstOp[1] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (firstOp[0] != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Shuffle)}(Vector128<9>): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Sqrt.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Sqrt.cs deleted file mode 100644 index 58c19eeef57e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Sqrt.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace IntelHardwareIntrinsicTest -{ - internal static partial class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - int testsCount = 21; - string methodUnderTestName = nameof(Sse2.Sqrt); - - if (Sse2.IsSupported) - { - using (var doubleTable = TestTableSse2.Create(testsCount)) - { - for (int i = 0; i < testsCount; i++) - { - (Vector128, Vector128, Vector128) value = doubleTable[i]; - var result = Sse2.Sqrt(value.Item1); - doubleTable.SetOutArray(result); - } - - CheckMethod checkDouble = (double x, double y, double z, ref double a) => (a = Math.Sqrt(x)) == z; - - if (!doubleTable.CheckResult(checkDouble)) - { - PrintError(doubleTable, methodUnderTestName, "(double x, double y, double z, ref double a) => (a = x - y) == z", checkDouble); - testResult = Fail; - } - } - } - else - { - Console.WriteLine($"Sse2.IsSupported: {Sse2.IsSupported}, skipped tests of {typeof(Sse2)}.{methodUnderTestName}"); - } - - return testResult; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SqrtScalar.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SqrtScalar.cs deleted file mode 100644 index 28b5ddbe36c8..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SqrtScalar.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace IntelHardwareIntrinsicTest -{ - internal static partial class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - int testsCount = 21; - string methodUnderTestName = nameof(Sse2.SqrtScalar); - - if (Sse2.IsSupported) - { - using (var doubleTable = TestTableScalarSse2.Create(testsCount)) - { - for (int i = 0; i < testsCount; i++) - { - (Vector128, Vector128) value = doubleTable[i]; - Vector128 result = Sse2.SqrtScalar(value.Item1); - doubleTable.SetOutArray(result); - } - - CheckMethodEight checkDouble = (Span x, Span y, Span z, Span a) => - { - a[0] = Math.Sqrt(x[0]); - a[1] = x[1]; - return a[0] == z[0] && a[1] == z[1]; - }; - - if (!doubleTable.CheckResult(checkDouble)) - { - PrintError(doubleTable, methodUnderTestName, "(Span x, Span y, Span z, Span a) => SqrtScalar", checkDouble); - testResult = Fail; - } - } - } - else - { - Console.WriteLine($"Sse2.IsSupported: {Sse2.IsSupported}, skipped tests of {typeof(Sse2)}.{methodUnderTestName}"); - } - - return testResult; - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Store.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Store.cs deleted file mode 100644 index ce11559df4f6..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Store.cs +++ /dev/null @@ -1,221 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Sse2.IsSupported) - { - using (TestTable doubleTable = new TestTable(new double[2] { 1, -5 }, new double[2])) - { - var vf = Unsafe.Read>(doubleTable.inArrayPtr); - Sse2.Store((double*)(doubleTable.outArrayPtr), vf); - - if (!doubleTable.CheckResult((x, y) => BitConverter.DoubleToInt64Bits(x) == BitConverter.DoubleToInt64Bits(y))) - { - Console.WriteLine("Sse2 Store failed on double:"); - foreach (var item in doubleTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - using (TestTable intTable = new TestTable(new long[2] { 1, -5 }, new long[2])) - { - var vf = Unsafe.Read>(intTable.inArrayPtr); - Sse2.Store((long*)(intTable.outArrayPtr), vf); - - if (!intTable.CheckResult((x, y) => x == y)) - { - Console.WriteLine("Sse2 Store failed on long:"); - foreach (var item in intTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - using (TestTable intTable = new TestTable(new ulong[2] { 1, 5 }, new ulong[2])) - { - var vf = Unsafe.Read>(intTable.inArrayPtr); - Sse2.Store((ulong*)(intTable.outArrayPtr), vf); - - if (!intTable.CheckResult((x, y) => x == y)) - { - Console.WriteLine("Sse2 Store failed on ulong:"); - foreach (var item in intTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - using (TestTable intTable = new TestTable(new int[4] { 1, -5, 100, 0 }, new int[4])) - { - var vf = Unsafe.Read>(intTable.inArrayPtr); - Sse2.Store((int*)(intTable.outArrayPtr), vf); - - if (!intTable.CheckResult((x, y) => x == y)) - { - Console.WriteLine("Sse2 Store failed on int:"); - foreach (var item in intTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - using (TestTable intTable = new TestTable(new uint[4] { 1, 5, 100, 0 }, new uint[4])) - { - var vf = Unsafe.Read>(intTable.inArrayPtr); - Sse2.Store((uint*)(intTable.outArrayPtr), vf); - - if (!intTable.CheckResult((x, y) => x == y)) - { - Console.WriteLine("Sse2 Store failed on uint:"); - foreach (var item in intTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - using (TestTable intTable = new TestTable(new short[8] { 1, -5, 100, 0, 1, 2, 3, 4 }, new short[8])) - { - var vf = Unsafe.Read>(intTable.inArrayPtr); - Sse2.Store((short*)(intTable.outArrayPtr), vf); - - if (!intTable.CheckResult((x, y) => x == y)) - { - Console.WriteLine("Sse2 Store failed on short:"); - foreach (var item in intTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - using (TestTable intTable = new TestTable(new ushort[8] { 1, 5, 100, 0, 1, 2, 3, 4 }, new ushort[8])) - { - var vf = Unsafe.Read>(intTable.inArrayPtr); - Sse2.Store((ushort*)(intTable.outArrayPtr), vf); - - if (!intTable.CheckResult((x, y) => x == y)) - { - Console.WriteLine("Sse2 Store failed on ushort:"); - foreach (var item in intTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - using (TestTable intTable = new TestTable(new sbyte[16] { 1, -5, 100, 0, 1, 2, 3, 4, 1, -5, 100, 0, 1, 2, 3, 4 }, new sbyte[16])) - { - var vf = Unsafe.Read>(intTable.inArrayPtr); - Sse2.Store((sbyte*)(intTable.outArrayPtr), vf); - - if (!intTable.CheckResult((x, y) => x == y)) - { - Console.WriteLine("Sse2 Store failed on sbyte:"); - foreach (var item in intTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - using (TestTable intTable = new TestTable(new byte[16] { 1, 5, 100, 0, 1, 2, 3, 4, 1, 5, 100, 0, 1, 2, 3, 4 }, new byte[16])) - { - var vf = Unsafe.Read>(intTable.inArrayPtr); - Sse2.Store((byte*)(intTable.outArrayPtr), vf); - - if (!intTable.CheckResult((x, y) => x == y)) - { - Console.WriteLine("Sse2 Store failed on byte:"); - foreach (var item in intTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - } - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T : struct - { - public T[] inArray; - public T[] outArray; - - public void* inArrayPtr => inHandle.AddrOfPinnedObject().ToPointer(); - public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); - - GCHandle inHandle; - GCHandle outHandle; - public TestTable(T[] a, T[] b) - { - this.inArray = a; - this.outArray = b; - - inHandle = GCHandle.Alloc(inArray, GCHandleType.Pinned); - outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); - } - public bool CheckResult(Func check) - { - for (int i = 0; i < inArray.Length; i++) - { - if (!check(inArray[i], outArray[i])) - { - return false; - } - } - return true; - } - - public void Dispose() - { - inHandle.Free(); - outHandle.Free(); - } - } - - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/StoreAligned.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/StoreAligned.cs deleted file mode 100644 index c35d4fcab5fd..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/StoreAligned.cs +++ /dev/null @@ -1,264 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Sse2.IsSupported) - { - { - double* inArray = stackalloc double[2]; - byte* outBuffer = stackalloc byte[32]; - double* outArray = (double*)Align(outBuffer, 16); - - var vf = Unsafe.Read>(inArray); - Sse2.StoreAligned(outArray, vf); - - for (var i = 0; i < 2; i++) - { - if (BitConverter.DoubleToInt64Bits(inArray[i]) != BitConverter.DoubleToInt64Bits(outArray[i])) - { - Console.WriteLine("Sse2 StoreAligned failed on double:"); - for (var n = 0; n < 2; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - long* inArray = stackalloc long[2]; - byte* outBuffer = stackalloc byte[32]; - long* outArray = (long*)Align(outBuffer, 16); - - var vf = Unsafe.Read>(inArray); - Sse2.StoreAligned(outArray, vf); - - for (var i = 0; i < 2; i++) - { - if (inArray[i] != outArray[i]) - { - Console.WriteLine("Sse2 StoreAligned failed on long:"); - for (var n = 0; n < 2; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - ulong* inArray = stackalloc ulong[2]; - byte* outBuffer = stackalloc byte[32]; - ulong* outArray = (ulong*)Align(outBuffer, 16); - - var vf = Unsafe.Read>(inArray); - Sse2.StoreAligned(outArray, vf); - - for (var i = 0; i < 2; i++) - { - if (inArray[i] != outArray[i]) - { - Console.WriteLine("Sse2 StoreAligned failed on ulong:"); - for (var n = 0; n < 2; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - int* inArray = stackalloc int[4]; - byte* outBuffer = stackalloc byte[32]; - int* outArray = (int*)Align(outBuffer, 16); - - var vf = Unsafe.Read>(inArray); - Sse2.StoreAligned(outArray, vf); - - for (var i = 0; i < 4; i++) - { - if (inArray[i] != outArray[i]) - { - Console.WriteLine("Sse2 StoreAligned failed on int:"); - for (var n = 0; n < 4; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - uint* inArray = stackalloc uint[4]; - byte* outBuffer = stackalloc byte[32]; - uint* outArray = (uint*)Align(outBuffer, 16); - - var vf = Unsafe.Read>(inArray); - Sse2.StoreAligned(outArray, vf); - - for (var i = 0; i < 4; i++) - { - if (inArray[i] != outArray[i]) - { - Console.WriteLine("Sse2 StoreAligned failed on uint:"); - for (var n = 0; n < 4; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - short* inArray = stackalloc short[8]; - byte* outBuffer = stackalloc byte[32]; - short* outArray = (short*)Align(outBuffer, 16); - - var vf = Unsafe.Read>(inArray); - Sse2.StoreAligned(outArray, vf); - - for (var i = 0; i < 8; i++) - { - if (inArray[i] != outArray[i]) - { - Console.WriteLine("Sse2 StoreAligned failed on short:"); - for (var n = 0; n < 8; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - ushort* inArray = stackalloc ushort[8]; - byte* outBuffer = stackalloc byte[32]; - ushort* outArray = (ushort*)Align(outBuffer, 16); - - var vf = Unsafe.Read>(inArray); - Sse2.StoreAligned(outArray, vf); - - for (var i = 0; i < 8; i++) - { - if (inArray[i] != outArray[i]) - { - Console.WriteLine("Sse2 StoreAligned failed on ushort:"); - for (var n = 0; n < 8; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - byte* inArray = stackalloc byte[16]; - byte* outBuffer = stackalloc byte[32]; - byte* outArray = (byte*)Align(outBuffer, 16); - - var vf = Unsafe.Read>(inArray); - Sse2.StoreAligned(outArray, vf); - - for (var i = 0; i < 16; i++) - { - if (inArray[i] != outArray[i]) - { - Console.WriteLine("Sse2 StoreAligned failed on byte:"); - for (var n = 0; n < 16; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - sbyte* inArray = stackalloc sbyte[16]; - byte* outBuffer = stackalloc byte[32]; - sbyte* outArray = (sbyte*)Align(outBuffer, 16); - - var vf = Unsafe.Read>(inArray); - Sse2.StoreAligned(outArray, vf); - - for (var i = 0; i < 16; i++) - { - if (inArray[i] != outArray[i]) - { - Console.WriteLine("Sse2 StoreAligned failed on byte:"); - for (var n = 0; n < 16; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - } - - return testResult; - } - - static unsafe void* Align(byte* buffer, byte expectedAlignment) - { - // Compute how bad the misalignment is, which is at most (expectedAlignment - 1). - // Then subtract that from the expectedAlignment and add it to the original address - // to compute the aligned address. - - var misalignment = expectedAlignment - ((ulong)(buffer) % expectedAlignment); - return (void*)(buffer + misalignment); - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/StoreAlignedNonTemporal.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/StoreAlignedNonTemporal.cs deleted file mode 100644 index 3b1ff4cde44a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/StoreAlignedNonTemporal.cs +++ /dev/null @@ -1,265 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Sse2.IsSupported) - { - { - double* inArray = stackalloc double[2]; - byte* outBuffer = stackalloc byte[32]; - double* outArray = (double*)Align(outBuffer, 16); - - var vf = Unsafe.Read>(inArray); - Sse2.StoreAlignedNonTemporal(outArray, vf); - - for (var i = 0; i < 2; i++) - { - if (BitConverter.DoubleToInt64Bits(inArray[i]) != BitConverter.DoubleToInt64Bits(outArray[i])) - { - Console.WriteLine("Sse2 StoreAlignedNonTemporal failed on double:"); - for (var n = 0; n < 2; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - long* inArray = stackalloc long[2]; - byte* outBuffer = stackalloc byte[32]; - long* outArray = (long*)Align(outBuffer, 16); - - var vf = Unsafe.Read>(inArray); - Sse2.StoreAlignedNonTemporal(outArray, vf); - - for (var i = 0; i < 2; i++) - { - if (inArray[i] != outArray[i]) - { - Console.WriteLine("Sse2 StoreAlignedNonTemporal failed on long:"); - for (var n = 0; n < 2; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - ulong* inArray = stackalloc ulong[2]; - byte* outBuffer = stackalloc byte[32]; - ulong* outArray = (ulong*)Align(outBuffer, 16); - - var vf = Unsafe.Read>(inArray); - Sse2.StoreAlignedNonTemporal(outArray, vf); - - for (var i = 0; i < 2; i++) - { - if (inArray[i] != outArray[i]) - { - Console.WriteLine("Sse2 StoreAlignedNonTemporal failed on ulong:"); - for (var n = 0; n < 2; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - int* inArray = stackalloc int[4]; - byte* outBuffer = stackalloc byte[32]; - int* outArray = (int*)Align(outBuffer, 16); - - var vf = Unsafe.Read>(inArray); - Sse2.StoreAlignedNonTemporal(outArray, vf); - - for (var i = 0; i < 4; i++) - { - if (inArray[i] != outArray[i]) - { - Console.WriteLine("Sse2 StoreAlignedNonTemporal failed on int:"); - for (var n = 0; n < 4; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - uint* inArray = stackalloc uint[4]; - byte* outBuffer = stackalloc byte[32]; - uint* outArray = (uint*)Align(outBuffer, 16); - - var vf = Unsafe.Read>(inArray); - Sse2.StoreAlignedNonTemporal(outArray, vf); - - for (var i = 0; i < 4; i++) - { - if (inArray[i] != outArray[i]) - { - Console.WriteLine("Sse2 StoreAlignedNonTemporal failed on uint:"); - for (var n = 0; n < 4; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - short* inArray = stackalloc short[8]; - byte* outBuffer = stackalloc byte[32]; - short* outArray = (short*)Align(outBuffer, 16); - - var vf = Unsafe.Read>(inArray); - Sse2.StoreAlignedNonTemporal(outArray, vf); - - for (var i = 0; i < 8; i++) - { - if (inArray[i] != outArray[i]) - { - Console.WriteLine("Sse2 StoreAlignedNonTemporal failed on short:"); - for (var n = 0; n < 8; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - ushort* inArray = stackalloc ushort[8]; - byte* outBuffer = stackalloc byte[32]; - ushort* outArray = (ushort*)Align(outBuffer, 16); - - var vf = Unsafe.Read>(inArray); - Sse2.StoreAlignedNonTemporal(outArray, vf); - - for (var i = 0; i < 8; i++) - { - if (inArray[i] != outArray[i]) - { - Console.WriteLine("Sse2 StoreAlignedNonTemporal failed on ushort:"); - for (var n = 0; n < 8; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - byte* inArray = stackalloc byte[16]; - byte* outBuffer = stackalloc byte[32]; - byte* outArray = (byte*)Align(outBuffer, 16); - - var vf = Unsafe.Read>(inArray); - Sse2.StoreAlignedNonTemporal(outArray, vf); - - for (var i = 0; i < 16; i++) - { - if (inArray[i] != outArray[i]) - { - Console.WriteLine("Sse2 StoreAlignedNonTemporal failed on byte:"); - for (var n = 0; n < 16; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - sbyte* inArray = stackalloc sbyte[16]; - byte* outBuffer = stackalloc byte[32]; - sbyte* outArray = (sbyte*)Align(outBuffer, 16); - - var vf = Unsafe.Read>(inArray); - Sse2.StoreAlignedNonTemporal(outArray, vf); - - for (var i = 0; i < 16; i++) - { - if (inArray[i] != outArray[i]) - { - Console.WriteLine("Sse2 StoreAlignedNonTemporal failed on byte:"); - for (var n = 0; n < 16; n++) - { - Console.Write(outArray[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - } - - return testResult; - } - - static unsafe void* Align(byte* buffer, byte expectedAlignment) - { - // Compute how bad the misalignment is, which is at most (expectedAlignment - 1). - // Then subtract that from the expectedAlignment and add it to the original address - // to compute the aligned address. - - var misalignment = expectedAlignment - ((ulong)(buffer) % expectedAlignment); - return (void*)(buffer + misalignment); - } - } -} - diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/StoreHigh.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/StoreHigh.cs deleted file mode 100644 index 72c471d28356..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/StoreHigh.cs +++ /dev/null @@ -1,77 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Sse2.IsSupported) - { - using (TestTable doubleTable = new TestTable(new double[2] { 1, -5 }, new double[2])) - { - var vf = Unsafe.Read>(doubleTable.inArrayPtr); - Sse2.StoreHigh((double*)(doubleTable.outArrayPtr), vf); - - if (!doubleTable.CheckResult((x, y) => y[0] == x[1] && y[1] == 0)) - { - Console.WriteLine("SSE2 StoreHigh failed on double:"); - foreach (var item in doubleTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - } - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T : struct - { - public T[] inArray; - public T[] outArray; - - public void* inArrayPtr => inHandle.AddrOfPinnedObject().ToPointer(); - public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); - - GCHandle inHandle; - GCHandle outHandle; - public TestTable(T[] a, T[] b) - { - this.inArray = a; - this.outArray = b; - - inHandle = GCHandle.Alloc(inArray, GCHandleType.Pinned); - outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); - } - public bool CheckResult(Func check) - { - return check(inArray, outArray); - } - - public void Dispose() - { - inHandle.Free(); - outHandle.Free(); - } - } - - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/StoreLow.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/StoreLow.cs deleted file mode 100644 index 5bca6881d3f8..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/StoreLow.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Sse2.IsSupported) - { - using (TestTable doubleTable = new TestTable(new double[2] { 1, -5 }, new double[2])) - { - var vf = Unsafe.Read>(doubleTable.inArrayPtr); - Sse2.StoreLow((double*)(doubleTable.outArrayPtr), vf); - - if (!doubleTable.CheckResult((x, y) => BitConverter.DoubleToInt64Bits(x[0]) == BitConverter.DoubleToInt64Bits(y[0]) - && BitConverter.DoubleToInt64Bits(y[1]) == 0)) - { - Console.WriteLine("Sse2 StoreLow failed on double:"); - foreach (var item in doubleTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - } - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T : struct - { - public T[] inArray; - public T[] outArray; - - public void* inArrayPtr => inHandle.AddrOfPinnedObject().ToPointer(); - public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); - - GCHandle inHandle; - GCHandle outHandle; - public TestTable(T[] a, T[] b) - { - this.inArray = a; - this.outArray = b; - - inHandle = GCHandle.Alloc(inArray, GCHandleType.Pinned); - outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); - } - public bool CheckResult(Func check) - { - return check(inArray, outArray); - } - - public void Dispose() - { - inHandle.Free(); - outHandle.Free(); - } - } - - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/StoreNonTemporal.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/StoreNonTemporal.cs deleted file mode 100644 index 196c04742eb9..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/StoreNonTemporal.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Sse2.IsSupported) - { - { - int* inArray = stackalloc int[4]; - inArray[0] = -784561; - int* outBuffer = stackalloc int[4]; - - Sse2.StoreNonTemporal(outBuffer, inArray[0]); - - for (var i = 0; i < 4; i++) - { - if (inArray[i] != outBuffer[i]) - { - Console.WriteLine("Sse2 StoreNonTemporal failed on int:"); - for (var n = 0; n < 4; n++) - { - Console.Write(outBuffer[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - - { - uint* inArray = stackalloc uint[4]; - inArray[0] = 0xffffff02u; - uint* outBuffer = stackalloc uint[4]; - - Sse2.StoreNonTemporal(outBuffer, inArray[0]); - - for (var i = 0; i < 4; i++) - { - if (inArray[i] != outBuffer[i]) - { - Console.WriteLine("Sse2 StoreNonTemporal failed on uint:"); - for (var n = 0; n < 4; n++) - { - Console.Write(outBuffer[n] + ", "); - } - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - } - - return testResult; - } - } -} - diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/StoreScalar.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/StoreScalar.cs deleted file mode 100644 index 9b8f2b43b474..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/StoreScalar.cs +++ /dev/null @@ -1,112 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Sse2.IsSupported) - { - using (TestTable doubleTable = new TestTable(new double[2] { 1, -5 }, new double[2])) - { - var vf = Unsafe.Read>(doubleTable.inArrayPtr); - Sse2.StoreScalar((double*)(doubleTable.outArrayPtr), vf); - - if (!doubleTable.CheckResult((x, y) => BitConverter.DoubleToInt64Bits(x[0]) == BitConverter.DoubleToInt64Bits(y[0]) - && BitConverter.DoubleToInt64Bits(y[1]) == 0)) - { - Console.WriteLine("Sse2 StoreScalar failed on double:"); - foreach (var item in doubleTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - using (TestTable intTable = new TestTable(new long[2] { 1, -5 }, new long[2])) - { - var vf = Unsafe.Read>(intTable.inArrayPtr); - Sse2.StoreScalar((long*)(intTable.outArrayPtr), vf); - - if (!intTable.CheckResult((x, y) => y[0] == x[0] && y[1] == 0)) - { - Console.WriteLine("Sse2 StoreScalar failed on long:"); - foreach (var item in intTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - using (TestTable intTable = new TestTable(new ulong[2] { 1, 5 }, new ulong[2])) - { - var vf = Unsafe.Read>(intTable.inArrayPtr); - Sse2.StoreScalar((ulong*)(intTable.outArrayPtr), vf); - - if (!intTable.CheckResult((x, y) => y[0] == x[0] && y[1] == 0)) - { - Console.WriteLine("Sse2 StoreScalar failed on ulong:"); - foreach (var item in intTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - } - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T : struct - { - public T[] inArray; - public T[] outArray; - - public void* inArrayPtr => inHandle.AddrOfPinnedObject().ToPointer(); - public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); - - GCHandle inHandle; - GCHandle outHandle; - public TestTable(T[] a, T[] b) - { - this.inArray = a; - this.outArray = b; - - inHandle = GCHandle.Alloc(inArray, GCHandleType.Pinned); - outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); - } - public bool CheckResult(Func check) - { - return check(inArray, outArray); - } - - public void Dispose() - { - inHandle.Free(); - outHandle.Free(); - } - } - - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Byte.cs deleted file mode 100644 index 4ece04c54823..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Byte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void SubtractByte() - { - var test = new SimpleBinaryOpTest__SubtractByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__SubtractByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__SubtractByte testClass) - { - var result = Sse2.Subtract(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__SubtractByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__SubtractByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__SubtractByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Subtract( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Subtract( - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Subtract( - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Subtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Subtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Subtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Subtract( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((Byte*)(pClsVar1)), - Sse2.LoadVector128((Byte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = Sse2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = Sse2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__SubtractByte(); - var result = Sse2.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__SubtractByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Subtract(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Subtract( - Sse2.LoadVector128((Byte*)(&test._fld1)), - Sse2.LoadVector128((Byte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((byte)(left[0] - right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((byte)(left[i] - right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Subtract)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Double.cs deleted file mode 100644 index 7ebb559aa832..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void SubtractDouble() - { - var test = new SimpleBinaryOpTest__SubtractDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__SubtractDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__SubtractDouble testClass) - { - var result = Sse2.Subtract(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__SubtractDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__SubtractDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__SubtractDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Subtract( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Subtract( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Subtract( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Subtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Subtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Subtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Subtract( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__SubtractDouble(); - var result = Sse2.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__SubtractDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Subtract(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Subtract( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(left[0] - right[0]) != BitConverter.DoubleToInt64Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(left[i] - right[i]) != BitConverter.DoubleToInt64Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Subtract)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Int16.cs deleted file mode 100644 index 1f186b0458a4..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Int16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void SubtractInt16() - { - var test = new SimpleBinaryOpTest__SubtractInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__SubtractInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__SubtractInt16 testClass) - { - var result = Sse2.Subtract(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__SubtractInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__SubtractInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__SubtractInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Subtract( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Subtract( - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Subtract( - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Subtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Subtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Subtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Subtract( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((Int16*)(pClsVar1)), - Sse2.LoadVector128((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Sse2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Sse2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__SubtractInt16(); - var result = Sse2.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__SubtractInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Subtract(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Subtract( - Sse2.LoadVector128((Int16*)(&test._fld1)), - Sse2.LoadVector128((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((short)(left[0] - right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((short)(left[i] - right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Subtract)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Int32.cs deleted file mode 100644 index 8cb28ab5fb4c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Int32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void SubtractInt32() - { - var test = new SimpleBinaryOpTest__SubtractInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__SubtractInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__SubtractInt32 testClass) - { - var result = Sse2.Subtract(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__SubtractInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__SubtractInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__SubtractInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Subtract( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Subtract( - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Subtract( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Subtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Subtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Subtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Subtract( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((Int32*)(pClsVar1)), - Sse2.LoadVector128((Int32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Sse2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Sse2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__SubtractInt32(); - var result = Sse2.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__SubtractInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Subtract(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Subtract( - Sse2.LoadVector128((Int32*)(&test._fld1)), - Sse2.LoadVector128((Int32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((int)(left[0] - right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((int)(left[i] - right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Subtract)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Int64.cs deleted file mode 100644 index 5d81830c6321..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Int64.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void SubtractInt64() - { - var test = new SimpleBinaryOpTest__SubtractInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__SubtractInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int64[] inArray1, Int64[] inArray2, Int64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__SubtractInt64 testClass) - { - var result = Sse2.Subtract(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__SubtractInt64 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__SubtractInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__SubtractInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Subtract( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Subtract( - Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Subtract( - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Subtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Subtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Subtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Subtract( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((Int64*)(pClsVar1)), - Sse2.LoadVector128((Int64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = Sse2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = Sse2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__SubtractInt64(); - var result = Sse2.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__SubtractInt64(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Subtract(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Subtract( - Sse2.LoadVector128((Int64*)(&test._fld1)), - Sse2.LoadVector128((Int64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((long)(left[0] - right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((long)(left[i] - right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Subtract)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.SByte.cs deleted file mode 100644 index 7ed23e3346e4..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.SByte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void SubtractSByte() - { - var test = new SimpleBinaryOpTest__SubtractSByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__SubtractSByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__SubtractSByte testClass) - { - var result = Sse2.Subtract(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__SubtractSByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__SubtractSByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__SubtractSByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Subtract( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Subtract( - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Subtract( - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Subtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Subtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Subtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Subtract( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((SByte*)(pClsVar1)), - Sse2.LoadVector128((SByte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Sse2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Sse2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__SubtractSByte(); - var result = Sse2.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__SubtractSByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Subtract(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Subtract( - Sse2.LoadVector128((SByte*)(&test._fld1)), - Sse2.LoadVector128((SByte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((sbyte)(left[0] - right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((sbyte)(left[i] - right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Subtract)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.UInt16.cs deleted file mode 100644 index e47b039bc1b7..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.UInt16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void SubtractUInt16() - { - var test = new SimpleBinaryOpTest__SubtractUInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__SubtractUInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__SubtractUInt16 testClass) - { - var result = Sse2.Subtract(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__SubtractUInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__SubtractUInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__SubtractUInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Subtract( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Subtract( - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Subtract( - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Subtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Subtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Subtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Subtract( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((UInt16*)(pClsVar1)), - Sse2.LoadVector128((UInt16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Sse2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Sse2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__SubtractUInt16(); - var result = Sse2.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__SubtractUInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Subtract(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Subtract( - Sse2.LoadVector128((UInt16*)(&test._fld1)), - Sse2.LoadVector128((UInt16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((ushort)(left[0] - right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((ushort)(left[i] - right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Subtract)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.UInt32.cs deleted file mode 100644 index 85eed76fcff9..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.UInt32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void SubtractUInt32() - { - var test = new SimpleBinaryOpTest__SubtractUInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__SubtractUInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__SubtractUInt32 testClass) - { - var result = Sse2.Subtract(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__SubtractUInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__SubtractUInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__SubtractUInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Subtract( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Subtract( - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Subtract( - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Subtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Subtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Subtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Subtract( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((UInt32*)(pClsVar1)), - Sse2.LoadVector128((UInt32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Sse2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Sse2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__SubtractUInt32(); - var result = Sse2.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__SubtractUInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Subtract(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Subtract( - Sse2.LoadVector128((UInt32*)(&test._fld1)), - Sse2.LoadVector128((UInt32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((uint)(left[0] - right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((uint)(left[i] - right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Subtract)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.UInt64.cs deleted file mode 100644 index 09214fab60b1..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.UInt64.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void SubtractUInt64() - { - var test = new SimpleBinaryOpTest__SubtractUInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__SubtractUInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt64[] inArray1, UInt64[] inArray2, UInt64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__SubtractUInt64 testClass) - { - var result = Sse2.Subtract(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__SubtractUInt64 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((UInt64*)(pFld1)), - Sse2.LoadVector128((UInt64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__SubtractUInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__SubtractUInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Subtract( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Subtract( - Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Subtract( - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Subtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Subtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Subtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Subtract( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((UInt64*)(pClsVar1)), - Sse2.LoadVector128((UInt64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)); - var result = Sse2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)); - var result = Sse2.Subtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__SubtractUInt64(); - var result = Sse2.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__SubtractUInt64(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((UInt64*)(pFld1)), - Sse2.LoadVector128((UInt64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Subtract(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Subtract( - Sse2.LoadVector128((UInt64*)(pFld1)), - Sse2.LoadVector128((UInt64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Subtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Subtract( - Sse2.LoadVector128((UInt64*)(&test._fld1)), - Sse2.LoadVector128((UInt64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt64[] left, UInt64[] right, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((ulong)(left[0] - right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((ulong)(left[i] - right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Subtract)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SumAbsoluteDifferences.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SumAbsoluteDifferences.UInt16.cs deleted file mode 100644 index 4c54d1075b83..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SumAbsoluteDifferences.UInt16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void SumAbsoluteDifferencesUInt16() - { - var test = new SimpleBinaryOpTest__SumAbsoluteDifferencesUInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__SumAbsoluteDifferencesUInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__SumAbsoluteDifferencesUInt16 testClass) - { - var result = Sse2.SumAbsoluteDifferences(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__SumAbsoluteDifferencesUInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.SumAbsoluteDifferences( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__SumAbsoluteDifferencesUInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__SumAbsoluteDifferencesUInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.SumAbsoluteDifferences( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.SumAbsoluteDifferences( - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.SumAbsoluteDifferences( - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.SumAbsoluteDifferences), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.SumAbsoluteDifferences), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.SumAbsoluteDifferences), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.SumAbsoluteDifferences( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.SumAbsoluteDifferences( - Sse2.LoadVector128((Byte*)(pClsVar1)), - Sse2.LoadVector128((Byte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.SumAbsoluteDifferences(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = Sse2.SumAbsoluteDifferences(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = Sse2.SumAbsoluteDifferences(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__SumAbsoluteDifferencesUInt16(); - var result = Sse2.SumAbsoluteDifferences(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__SumAbsoluteDifferencesUInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.SumAbsoluteDifferences( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.SumAbsoluteDifferences(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.SumAbsoluteDifferences( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.SumAbsoluteDifferences(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.SumAbsoluteDifferences( - Sse2.LoadVector128((Byte*)(&test._fld1)), - Sse2.LoadVector128((Byte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != Math.Abs(left[0] - right[0]) + Math.Abs(left[1] - right[1]) + Math.Abs(left[2] - right[2]) + Math.Abs(left[3] - right[3]) + Math.Abs(left[4] - right[4]) + Math.Abs(left[5] - right[5]) + Math.Abs(left[6] - right[6]) + Math.Abs(left[7] - right[7])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (i != 4 ? 0 : Math.Abs(left[8] - right[8]) + Math.Abs(left[9] - right[9]) + Math.Abs(left[10] - right[10]) + Math.Abs(left[11] - right[11]) + Math.Abs(left[12] - right[12]) + Math.Abs(left[13] - right[13]) + Math.Abs(left[14] - right[14]) + Math.Abs(left[15] - right[15]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.SumAbsoluteDifferences)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Byte.cs deleted file mode 100644 index 286638e1e016..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Byte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void XorByte() - { - var test = new SimpleBinaryOpTest__XorByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__XorByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__XorByte testClass) - { - var result = Sse2.Xor(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__XorByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__XorByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__XorByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Xor( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Xor( - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Xor( - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Xor), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Xor), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Xor), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Xor( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((Byte*)(pClsVar1)), - Sse2.LoadVector128((Byte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = Sse2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = Sse2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__XorByte(); - var result = Sse2.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__XorByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Xor(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Xor( - Sse2.LoadVector128((Byte*)(&test._fld1)), - Sse2.LoadVector128((Byte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((byte)(left[0] ^ right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((byte)(left[i] ^ right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Xor)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Double.cs deleted file mode 100644 index 85e0ba0d0e49..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void XorDouble() - { - var test = new SimpleBinaryOpTest__XorDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__XorDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__XorDouble testClass) - { - var result = Sse2.Xor(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__XorDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__XorDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__XorDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Xor( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Xor( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Xor( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Xor), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Xor), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Xor), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Xor( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__XorDouble(); - var result = Sse2.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__XorDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Xor(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Xor( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((BitConverter.DoubleToInt64Bits(left[0]) ^ BitConverter.DoubleToInt64Bits(right[0])) != BitConverter.DoubleToInt64Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((BitConverter.DoubleToInt64Bits(left[i]) ^ BitConverter.DoubleToInt64Bits(right[i])) != BitConverter.DoubleToInt64Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Xor)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Int16.cs deleted file mode 100644 index a045db8ec07d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Int16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void XorInt16() - { - var test = new SimpleBinaryOpTest__XorInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__XorInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__XorInt16 testClass) - { - var result = Sse2.Xor(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__XorInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__XorInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__XorInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Xor( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Xor( - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Xor( - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Xor), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Xor), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Xor), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Xor( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((Int16*)(pClsVar1)), - Sse2.LoadVector128((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Sse2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Sse2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__XorInt16(); - var result = Sse2.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__XorInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Xor(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Xor( - Sse2.LoadVector128((Int16*)(&test._fld1)), - Sse2.LoadVector128((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((short)(left[0] ^ right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((short)(left[i] ^ right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Xor)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Int32.cs deleted file mode 100644 index ca187d2f2813..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Int32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void XorInt32() - { - var test = new SimpleBinaryOpTest__XorInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__XorInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__XorInt32 testClass) - { - var result = Sse2.Xor(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__XorInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__XorInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__XorInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Xor( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Xor( - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Xor( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Xor), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Xor), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Xor), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Xor( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((Int32*)(pClsVar1)), - Sse2.LoadVector128((Int32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Sse2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Sse2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__XorInt32(); - var result = Sse2.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__XorInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Xor(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Xor( - Sse2.LoadVector128((Int32*)(&test._fld1)), - Sse2.LoadVector128((Int32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((int)(left[0] ^ right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((int)(left[i] ^ right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Xor)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Int64.cs deleted file mode 100644 index 32020f8dbcec..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Int64.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void XorInt64() - { - var test = new SimpleBinaryOpTest__XorInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__XorInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int64[] inArray1, Int64[] inArray2, Int64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__XorInt64 testClass) - { - var result = Sse2.Xor(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__XorInt64 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__XorInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__XorInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Xor( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Xor( - Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Xor( - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Xor), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Xor), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Xor), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Xor( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((Int64*)(pClsVar1)), - Sse2.LoadVector128((Int64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = Sse2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = Sse2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__XorInt64(); - var result = Sse2.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__XorInt64(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Xor(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Xor( - Sse2.LoadVector128((Int64*)(&test._fld1)), - Sse2.LoadVector128((Int64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((long)(left[0] ^ right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((long)(left[i] ^ right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Xor)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.SByte.cs deleted file mode 100644 index 556489f253a3..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.SByte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void XorSByte() - { - var test = new SimpleBinaryOpTest__XorSByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__XorSByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__XorSByte testClass) - { - var result = Sse2.Xor(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__XorSByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__XorSByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__XorSByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Xor( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Xor( - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Xor( - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Xor), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Xor), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Xor), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Xor( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((SByte*)(pClsVar1)), - Sse2.LoadVector128((SByte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Sse2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Sse2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__XorSByte(); - var result = Sse2.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__XorSByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Xor(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Xor( - Sse2.LoadVector128((SByte*)(&test._fld1)), - Sse2.LoadVector128((SByte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((sbyte)(left[0] ^ right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((sbyte)(left[i] ^ right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Xor)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.UInt16.cs deleted file mode 100644 index ea45d44f32ce..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.UInt16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void XorUInt16() - { - var test = new SimpleBinaryOpTest__XorUInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__XorUInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__XorUInt16 testClass) - { - var result = Sse2.Xor(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__XorUInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__XorUInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__XorUInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Xor( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Xor( - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Xor( - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Xor), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Xor), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Xor), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Xor( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((UInt16*)(pClsVar1)), - Sse2.LoadVector128((UInt16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Sse2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Sse2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__XorUInt16(); - var result = Sse2.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__XorUInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Xor(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Xor( - Sse2.LoadVector128((UInt16*)(&test._fld1)), - Sse2.LoadVector128((UInt16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((ushort)(left[0] ^ right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((ushort)(left[i] ^ right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Xor)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.UInt32.cs deleted file mode 100644 index 428b2f7d7cdd..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.UInt32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void XorUInt32() - { - var test = new SimpleBinaryOpTest__XorUInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__XorUInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__XorUInt32 testClass) - { - var result = Sse2.Xor(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__XorUInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__XorUInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__XorUInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Xor( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Xor( - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Xor( - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Xor), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Xor), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Xor), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Xor( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((UInt32*)(pClsVar1)), - Sse2.LoadVector128((UInt32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Sse2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Sse2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__XorUInt32(); - var result = Sse2.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__XorUInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Xor(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Xor( - Sse2.LoadVector128((UInt32*)(&test._fld1)), - Sse2.LoadVector128((UInt32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((uint)(left[0] ^ right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((uint)(left[i] ^ right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Xor)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.UInt64.cs deleted file mode 100644 index f6d1747a26e6..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.UInt64.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void XorUInt64() - { - var test = new SimpleBinaryOpTest__XorUInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__XorUInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt64[] inArray1, UInt64[] inArray2, UInt64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__XorUInt64 testClass) - { - var result = Sse2.Xor(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__XorUInt64 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((UInt64*)(pFld1)), - Sse2.LoadVector128((UInt64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__XorUInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__XorUInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse2.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse2.Xor( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse2.Xor( - Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse2.Xor( - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Xor), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Xor), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse2).GetMethod(nameof(Sse2.Xor), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse2.Xor( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((UInt64*)(pClsVar1)), - Sse2.LoadVector128((UInt64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)); - var result = Sse2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)); - var result = Sse2.Xor(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__XorUInt64(); - var result = Sse2.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__XorUInt64(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((UInt64*)(pFld1)), - Sse2.LoadVector128((UInt64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse2.Xor(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse2.Xor( - Sse2.LoadVector128((UInt64*)(pFld1)), - Sse2.LoadVector128((UInt64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse2.Xor(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse2.Xor( - Sse2.LoadVector128((UInt64*)(&test._fld1)), - Sse2.LoadVector128((UInt64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt64[] left, UInt64[] right, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((ulong)(left[0] ^ right[0]) != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((ulong)(left[i] ^ right[i]) != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse2)}.{nameof(Sse2.Xor)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse3/AddSubtract.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse3/AddSubtract.Double.cs deleted file mode 100644 index 2471fa1ea2ca..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse3/AddSubtract.Double.cs +++ /dev/null @@ -1,584 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AddSubtractDouble() - { - var test = new AlternatingBinaryOpTest__AddSubtractDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class AlternatingBinaryOpTest__AddSubtractDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(AlternatingBinaryOpTest__AddSubtractDouble testClass) - { - var result = Sse3.AddSubtract(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(AlternatingBinaryOpTest__AddSubtractDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse3.AddSubtract( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static AlternatingBinaryOpTest__AddSubtractDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public AlternatingBinaryOpTest__AddSubtractDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse3.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse3.AddSubtract( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse3.AddSubtract( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse3.AddSubtract( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse3).GetMethod(nameof(Sse3.AddSubtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse3).GetMethod(nameof(Sse3.AddSubtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse3).GetMethod(nameof(Sse3.AddSubtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse3.AddSubtract( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse3.AddSubtract( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse3.AddSubtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse3.AddSubtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse3.AddSubtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new AlternatingBinaryOpTest__AddSubtractDouble(); - var result = Sse3.AddSubtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new AlternatingBinaryOpTest__AddSubtractDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse3.AddSubtract( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse3.AddSubtract(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse3.AddSubtract( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse3.AddSubtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse3.AddSubtract( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i += 2) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(left[i] - right[i])) - { - succeeded = false; - break; - } - - if (BitConverter.DoubleToInt64Bits(result[i + 1]) != BitConverter.DoubleToInt64Bits(left[i + 1] + right[i + 1])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse3)}.{nameof(Sse3.AddSubtract)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse3/AddSubtract.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse3/AddSubtract.Single.cs deleted file mode 100644 index 0effb497b667..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse3/AddSubtract.Single.cs +++ /dev/null @@ -1,584 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AddSubtractSingle() - { - var test = new AlternatingBinaryOpTest__AddSubtractSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class AlternatingBinaryOpTest__AddSubtractSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(AlternatingBinaryOpTest__AddSubtractSingle testClass) - { - var result = Sse3.AddSubtract(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(AlternatingBinaryOpTest__AddSubtractSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse3.AddSubtract( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static AlternatingBinaryOpTest__AddSubtractSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public AlternatingBinaryOpTest__AddSubtractSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse3.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse3.AddSubtract( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse3.AddSubtract( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse3.AddSubtract( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse3).GetMethod(nameof(Sse3.AddSubtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse3).GetMethod(nameof(Sse3.AddSubtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse3).GetMethod(nameof(Sse3.AddSubtract), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse3.AddSubtract( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse3.AddSubtract( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse3.AddSubtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse3.AddSubtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse3.AddSubtract(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new AlternatingBinaryOpTest__AddSubtractSingle(); - var result = Sse3.AddSubtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new AlternatingBinaryOpTest__AddSubtractSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse3.AddSubtract( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse3.AddSubtract(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse3.AddSubtract( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse3.AddSubtract(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse3.AddSubtract( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var i = 0; i < RetElementCount; i += 2) - { - if (BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(left[i] - right[i])) - { - succeeded = false; - break; - } - - if (BitConverter.SingleToInt32Bits(result[i + 1]) != BitConverter.SingleToInt32Bits(left[i + 1] + right[i + 1])) - { - succeeded = false; - break; - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse3)}.{nameof(Sse3.AddSubtract)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Blend.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Blend.cs deleted file mode 100644 index 8617f8e28eb7..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Blend.cs +++ /dev/null @@ -1,424 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Sse41.IsSupported) - { - using (TestTable floatTable = new TestTable(new float[4] { 1, -5, 100, 0 }, new float[4] { 22, -1, -50, 0 }, new float[4])) - { - var vf1 = Unsafe.Read>(floatTable.inArray1Ptr); - var vf2 = Unsafe.Read>(floatTable.inArray2Ptr); - - // SDDD - var vf3 = Sse41.Blend(vf1, vf2, 1); - Unsafe.Write(floatTable.outArrayPtr, vf3); - - if (!floatTable.CheckResult((x, y, z) => (z[0] == y[0]) && (z[1] == x[1]) && - (z[2] == x[2]) && (z[3] == x[3]))) - { - Console.WriteLine("SSE41 Blend failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - // DSDD - vf3 = Sse41.Blend(vf1, vf2, 2); - Unsafe.Write(floatTable.outArrayPtr, vf3); - - if (!floatTable.CheckResult((x, y, z) => (z[0] == x[0]) && (z[1] == y[1]) && - (z[2] == x[2]) && (z[3] == x[3]))) - { - Console.WriteLine("SSE41 Blend failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - // DDSD - vf3 = Sse41.Blend(vf1, vf2, 4); - Unsafe.Write(floatTable.outArrayPtr, vf3); - - if (!floatTable.CheckResult((x, y, z) => (z[0] == x[0]) && (z[1] == x[1]) && - (z[2] == y[2]) && (z[3] == x[3]))) - { - Console.WriteLine("SSE41 Blend failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - // SDSD - vf3 = Sse41.Blend(vf1, vf2, 85); - Unsafe.Write(floatTable.outArrayPtr, vf3); - - if (!floatTable.CheckResult((x, y, z) => (z[0] == y[0]) && (z[1] == x[1]) && - (z[2] == y[2]) && (z[3] == x[3]))) - { - Console.WriteLine("SSE41 Blend failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - // SDDD - vf3 = (Vector128)typeof(Sse41).GetMethod(nameof(Sse41.Blend), new Type[] { vf1.GetType(), vf2.GetType(), typeof(byte) }).Invoke(null, new object[] { vf1, vf2, (byte)(1) }); - Unsafe.Write(floatTable.outArrayPtr, vf3); - - if (!floatTable.CheckResult((x, y, z) => (z[0] == y[0]) && (z[1] == x[1]) && - (z[2] == x[2]) && (z[3] == x[3]))) - { - Console.WriteLine("SSE41 Blend failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - using (TestTable doubleTable = new TestTable(new double[2] { 1, -5 }, new double[2] { 22, -1 }, new double[2])) - { - var vf1 = Unsafe.Read>(doubleTable.inArray1Ptr); - var vf2 = Unsafe.Read>(doubleTable.inArray2Ptr); - - // DD - var vf3 = Sse41.Blend(vf1, vf2, 0); - Unsafe.Write(doubleTable.outArrayPtr, vf3); - - if (!doubleTable.CheckResult((x, y, z) => (z[0] == x[0]) && (z[1] == x[1]))) - { - Console.WriteLine("SSE41 Blend failed on double:"); - foreach (var item in doubleTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - // SD - vf3 = Sse41.Blend(vf1, vf2, 1); - Unsafe.Write(doubleTable.outArrayPtr, vf3); - - if (!doubleTable.CheckResult((x, y, z) => (z[0] == y[0]) && (z[1] == x[1]))) - { - Console.WriteLine("SSE41 Blend failed on double:"); - foreach (var item in doubleTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - // DS - vf3 = Sse41.Blend(vf1, vf2, 2); - Unsafe.Write(doubleTable.outArrayPtr, vf3); - - if (!doubleTable.CheckResult((x, y, z) => (z[0] == x[0]) && (z[1] == y[1]))) - { - Console.WriteLine("SSE41 Blend failed on double:"); - foreach (var item in doubleTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - // SS - vf3 = Sse41.Blend(vf1, vf2, 51); - Unsafe.Write(doubleTable.outArrayPtr, vf3); - - if (!doubleTable.CheckResult((x, y, z) => (z[0] == y[0]) && (z[1] == y[1]))) - { - Console.WriteLine("SSE41 Blend failed on double:"); - foreach (var item in doubleTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - // SDDD - vf3 = (Vector128)typeof(Sse41).GetMethod(nameof(Sse41.Blend), new Type[] { vf1.GetType(), vf2.GetType(), typeof(byte) }).Invoke(null, new object[] { vf1, vf2, (byte)(0) }); - Unsafe.Write(doubleTable.outArrayPtr, vf3); - - if (!doubleTable.CheckResult((x, y, z) => (z[0] == x[0]) && (z[1] == x[1]))) - { - Console.WriteLine("SSE41 Blend failed on double:"); - foreach (var item in doubleTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - using (TestTable shortTable = new TestTable(new short[8] { 1, -5, 100, 0, 1, -5, 100, 0 }, new short[8] { 22, -1, -50, 0, 22, -1, -50, 0 }, new short[8])) - { - var vf1 = Unsafe.Read>(shortTable.inArray1Ptr); - var vf2 = Unsafe.Read>(shortTable.inArray2Ptr); - - // SDDD DDDD - var vf3 = Sse41.Blend(vf1, vf2, 1); - Unsafe.Write(shortTable.outArrayPtr, vf3); - - if (!shortTable.CheckResult((x, y, z) => (z[0] == y[0]) && (z[1] == x[1]) && - (z[2] == x[2]) && (z[3] == x[3]) && - (z[4] == x[4]) && (z[5] == x[5]) && - (z[6] == x[6]) && (z[7] == x[7]))) - { - Console.WriteLine("SSE41 Blend failed on short:"); - foreach (var item in shortTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - // DSDD DDDD - vf3 = Sse41.Blend(vf1, vf2, 2); - Unsafe.Write(shortTable.outArrayPtr, vf3); - - if (!shortTable.CheckResult((x, y, z) => (z[0] == x[0]) && (z[1] == y[1]) && - (z[2] == x[2]) && (z[3] == x[3]) && - (z[4] == x[4]) && (z[5] == x[5]) && - (z[6] == x[6]) && (z[7] == x[7]))) - { - Console.WriteLine("SSE41 Blend failed on short:"); - foreach (var item in shortTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - // DDSD DDDD - vf3 = Sse41.Blend(vf1, vf2, 4); - Unsafe.Write(shortTable.outArrayPtr, vf3); - - if (!shortTable.CheckResult((x, y, z) => (z[0] == x[0]) && (z[1] == x[1]) && - (z[2] == y[2]) && (z[3] == x[3]) && - (z[4] == x[4]) && (z[5] == x[5]) && - (z[6] == x[6]) && (z[7] == x[7]))) - { - Console.WriteLine("SSE41 Blend failed on short:"); - foreach (var item in shortTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - // SDSD SDSD - vf3 = Sse41.Blend(vf1, vf2, 85); - Unsafe.Write(shortTable.outArrayPtr, vf3); - - if (!shortTable.CheckResult((x, y, z) => (z[0] == y[0]) && (z[1] == x[1]) && - (z[2] == y[2]) && (z[3] == x[3]) && - (z[4] == y[4]) && (z[5] == x[5]) && - (z[6] == y[6]) && (z[7] == x[7]))) - { - Console.WriteLine("SSE41 Blend failed on short:"); - foreach (var item in shortTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - // SDDD DDDD - vf3 = (Vector128)typeof(Sse41).GetMethod(nameof(Sse41.Blend), new Type[] { vf1.GetType(), vf2.GetType(), typeof(byte) }).Invoke(null, new object[] { vf1, vf2, (byte)(1) }); - Unsafe.Write(shortTable.outArrayPtr, vf3); - - if (!shortTable.CheckResult((x, y, z) => (z[0] == y[0]) && (z[1] == x[1]) && - (z[2] == x[2]) && (z[3] == x[3]) && - (z[4] == x[4]) && (z[5] == x[5]) && - (z[6] == x[6]) && (z[7] == x[7]))) - { - Console.WriteLine("SSE41 Blend failed on short:"); - foreach (var item in shortTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - using (TestTable ushortTable = new TestTable(new ushort[8] { 1, 5, 100, 0, 1, 5, 100, 0 }, new ushort[8] { 22, 1, 50, 0, 22, 1, 50, 0 }, new ushort[8])) - { - var vf1 = Unsafe.Read>(ushortTable.inArray1Ptr); - var vf2 = Unsafe.Read>(ushortTable.inArray2Ptr); - - // SDDD DDDD - var vf3 = Sse41.Blend(vf1, vf2, 1); - Unsafe.Write(ushortTable.outArrayPtr, vf3); - - if (!ushortTable.CheckResult((x, y, z) => (z[0] == y[0]) && (z[1] == x[1]) && - (z[2] == x[2]) && (z[3] == x[3]) && - (z[4] == x[4]) && (z[5] == x[5]) && - (z[6] == x[6]) && (z[7] == x[7]))) - { - Console.WriteLine("SSE41 Blend failed on ushort:"); - foreach (var item in ushortTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - // DSDD DDDD - vf3 = Sse41.Blend(vf1, vf2, 2); - Unsafe.Write(ushortTable.outArrayPtr, vf3); - - if (!ushortTable.CheckResult((x, y, z) => (z[0] == x[0]) && (z[1] == y[1]) && - (z[2] == x[2]) && (z[3] == x[3]) && - (z[4] == x[4]) && (z[5] == x[5]) && - (z[6] == x[6]) && (z[7] == x[7]))) - { - Console.WriteLine("SSE41 Blend failed on ushort:"); - foreach (var item in ushortTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - // DDSD DDDD - vf3 = Sse41.Blend(vf1, vf2, 4); - Unsafe.Write(ushortTable.outArrayPtr, vf3); - - if (!ushortTable.CheckResult((x, y, z) => (z[0] == x[0]) && (z[1] == x[1]) && - (z[2] == y[2]) && (z[3] == x[3]) && - (z[4] == x[4]) && (z[5] == x[5]) && - (z[6] == x[6]) && (z[7] == x[7]))) - { - Console.WriteLine("SSE41 Blend failed on ushort:"); - foreach (var item in ushortTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - // SDSD SDSD - vf3 = Sse41.Blend(vf1, vf2, 85); - Unsafe.Write(ushortTable.outArrayPtr, vf3); - - if (!ushortTable.CheckResult((x, y, z) => (z[0] == y[0]) && (z[1] == x[1]) && - (z[2] == y[2]) && (z[3] == x[3]) && - (z[4] == y[4]) && (z[5] == x[5]) && - (z[6] == y[6]) && (z[7] == x[7]))) - { - Console.WriteLine("SSE41 Blend failed on ushort:"); - foreach (var item in ushortTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - // SDDD DDDD - vf3 = (Vector128)typeof(Sse41).GetMethod(nameof(Sse41.Blend), new Type[] { vf1.GetType(), vf2.GetType(), typeof(byte) }).Invoke(null, new object[] { vf1, vf2, (byte)(1) }); - Unsafe.Write(ushortTable.outArrayPtr, vf3); - - if (!ushortTable.CheckResult((x, y, z) => (z[0] == y[0]) && (z[1] == x[1]) && - (z[2] == x[2]) && (z[3] == x[3]) && - (z[4] == x[4]) && (z[5] == x[5]) && - (z[6] == x[6]) && (z[7] == x[7]))) - { - Console.WriteLine("SSE41 Blend failed on ushort:"); - foreach (var item in ushortTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - } - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T : struct - { - public T[] inArray1; - public T[] inArray2; - public T[] outArray; - - public void* inArray1Ptr => inHandle1.AddrOfPinnedObject().ToPointer(); - public void* inArray2Ptr => inHandle2.AddrOfPinnedObject().ToPointer(); - public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); - - GCHandle inHandle1; - GCHandle inHandle2; - GCHandle outHandle; - public TestTable(T[] a, T[] b, T[] c) - { - this.inArray1 = a; - this.inArray2 = b; - this.outArray = c; - - inHandle1 = GCHandle.Alloc(inArray1, GCHandleType.Pinned); - inHandle2 = GCHandle.Alloc(inArray2, GCHandleType.Pinned); - outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); - } - public bool CheckResult(Func check) - { - return check(inArray1, inArray2, outArray); - } - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.Byte.cs deleted file mode 100644 index 9604d5670730..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.Byte.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendVariableByte() - { - var test = new SimpleTernaryOpTest__BlendVariableByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__BlendVariableByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, Byte[] inArray3, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - public Vector128 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (byte)(((i % 2) == 0) ? 128 : 1); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__BlendVariableByte testClass) - { - var result = Sse41.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__BlendVariableByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)), - Sse2.LoadVector128((Byte*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - private static Byte[] _data3 = new Byte[Op3ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - private static Vector128 _clsVar3; - - private Vector128 _fld1; - private Vector128 _fld2; - private Vector128 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__BlendVariableByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (byte)(((i % 2) == 0) ? 128 : 1); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__BlendVariableByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (byte)(((i % 2) == 0) ? 128 : 1); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (byte)(((i % 2) == 0) ? 128 : 1); } - _dataTable = new DataTable(_data1, _data2, _data3, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.BlendVariable( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.BlendVariable( - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)), - Sse2.LoadVector128((Byte*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.BlendVariable( - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)), - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.BlendVariable), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.BlendVariable), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)), - Sse2.LoadVector128((Byte*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.BlendVariable), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)), - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.BlendVariable( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - fixed (Vector128* pClsVar3 = &_clsVar3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((Byte*)(pClsVar1)), - Sse2.LoadVector128((Byte*)(pClsVar2)), - Sse2.LoadVector128((Byte*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Sse41.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)); - var op3 = Sse2.LoadVector128((Byte*)(_dataTable.inArray3Ptr)); - var result = Sse41.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)); - var op3 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray3Ptr)); - var result = Sse41.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__BlendVariableByte(); - var result = Sse41.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__BlendVariableByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - fixed (Vector128* pFld3 = &test._fld3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)), - Sse2.LoadVector128((Byte*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)), - Sse2.LoadVector128((Byte*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.BlendVariable( - Sse2.LoadVector128((Byte*)(&test._fld1)), - Sse2.LoadVector128((Byte*)(&test._fld2)), - Sse2.LoadVector128((Byte*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, Vector128 op3, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] inArray3 = new Byte[Op3ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] inArray3 = new Byte[Op3ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Byte[] firstOp, Byte[] secondOp, Byte[] thirdOp, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (((thirdOp[0] >> 7) & 1) == 1 ? secondOp[0] != result[0] : firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (((thirdOp[i] >> 7) & 1) == 1 ? secondOp[i] != result[i] : firstOp[i] != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.BlendVariable)}(Vector128, Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.Double.cs deleted file mode 100644 index b546296fddda..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.Double.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendVariableDouble() - { - var test = new SimpleTernaryOpTest__BlendVariableDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__BlendVariableDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] inArray3, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - public Vector128 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (double)(((i % 2) == 0) ? -0.0 : 1.0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__BlendVariableDouble testClass) - { - var result = Sse41.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__BlendVariableDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)), - Sse2.LoadVector128((Double*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - private static Double[] _data3 = new Double[Op3ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - private static Vector128 _clsVar3; - - private Vector128 _fld1; - private Vector128 _fld2; - private Vector128 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__BlendVariableDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (double)(((i % 2) == 0) ? -0.0 : 1.0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__BlendVariableDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (double)(((i % 2) == 0) ? -0.0 : 1.0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (double)(((i % 2) == 0) ? -0.0 : 1.0); } - _dataTable = new DataTable(_data1, _data2, _data3, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.BlendVariable( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.BlendVariable( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.BlendVariable( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.BlendVariable), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.BlendVariable), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.BlendVariable), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.BlendVariable( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - fixed (Vector128* pClsVar3 = &_clsVar3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)), - Sse2.LoadVector128((Double*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Sse41.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var op3 = Sse2.LoadVector128((Double*)(_dataTable.inArray3Ptr)); - var result = Sse41.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var op3 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray3Ptr)); - var result = Sse41.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__BlendVariableDouble(); - var result = Sse41.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__BlendVariableDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - fixed (Vector128* pFld3 = &test._fld3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)), - Sse2.LoadVector128((Double*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)), - Sse2.LoadVector128((Double*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.BlendVariable( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)), - Sse2.LoadVector128((Double*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, Vector128 op3, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] inArray3 = new Double[Op3ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] inArray3 = new Double[Op3ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] secondOp, Double[] thirdOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (((BitConverter.DoubleToInt64Bits(thirdOp[0]) >> 63) & 1) == 1 ? BitConverter.DoubleToInt64Bits(secondOp[0]) != BitConverter.DoubleToInt64Bits(result[0]) : BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (((BitConverter.DoubleToInt64Bits(thirdOp[i]) >> 63) & 1) == 1 ? BitConverter.DoubleToInt64Bits(secondOp[i]) != BitConverter.DoubleToInt64Bits(result[i]) : BitConverter.DoubleToInt64Bits(firstOp[i]) != BitConverter.DoubleToInt64Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.BlendVariable)}(Vector128, Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.Int16.cs deleted file mode 100644 index 75dfa72272ae..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.Int16.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendVariableInt16() - { - var test = new SimpleTernaryOpTest__BlendVariableInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__BlendVariableInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int16[] inArray3, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - public Vector128 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToInt16("0xFFFF", 16) : (short)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__BlendVariableInt16 testClass) - { - var result = Sse41.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__BlendVariableInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)), - Sse2.LoadVector128((Int16*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - private static Int16[] _data3 = new Int16[Op3ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - private static Vector128 _clsVar3; - - private Vector128 _fld1; - private Vector128 _fld2; - private Vector128 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__BlendVariableInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToInt16("0xFFFF", 16) : (short)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__BlendVariableInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToInt16("0xFFFF", 16) : (short)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToInt16("0xFFFF", 16) : (short)0); } - _dataTable = new DataTable(_data1, _data2, _data3, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.BlendVariable( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.BlendVariable( - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.BlendVariable( - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.BlendVariable), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.BlendVariable), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.BlendVariable), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.BlendVariable( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - fixed (Vector128* pClsVar3 = &_clsVar3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((Int16*)(pClsVar1)), - Sse2.LoadVector128((Int16*)(pClsVar2)), - Sse2.LoadVector128((Int16*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Sse41.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)); - var op3 = Sse2.LoadVector128((Int16*)(_dataTable.inArray3Ptr)); - var result = Sse41.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)); - var op3 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray3Ptr)); - var result = Sse41.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__BlendVariableInt16(); - var result = Sse41.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__BlendVariableInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - fixed (Vector128* pFld3 = &test._fld3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)), - Sse2.LoadVector128((Int16*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)), - Sse2.LoadVector128((Int16*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.BlendVariable( - Sse2.LoadVector128((Int16*)(&test._fld1)), - Sse2.LoadVector128((Int16*)(&test._fld2)), - Sse2.LoadVector128((Int16*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, Vector128 op3, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] inArray3 = new Int16[Op3ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] inArray3 = new Int16[Op3ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Int16[] firstOp, Int16[] secondOp, Int16[] thirdOp, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((thirdOp[0] != 0) ? secondOp[0] != result[0] : firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((thirdOp[i] != 0) ? secondOp[i] != result[i] : firstOp[i] != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.BlendVariable)}(Vector128, Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.Int32.cs deleted file mode 100644 index fca0a4487c06..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.Int32.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendVariableInt32() - { - var test = new SimpleTernaryOpTest__BlendVariableInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__BlendVariableInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, Int32[] inArray3, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - public Vector128 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToInt32("0xFFFFFFFF", 16) : (int)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__BlendVariableInt32 testClass) - { - var result = Sse41.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__BlendVariableInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)), - Sse2.LoadVector128((Int32*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - private static Int32[] _data3 = new Int32[Op3ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - private static Vector128 _clsVar3; - - private Vector128 _fld1; - private Vector128 _fld2; - private Vector128 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__BlendVariableInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToInt32("0xFFFFFFFF", 16) : (int)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__BlendVariableInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToInt32("0xFFFFFFFF", 16) : (int)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToInt32("0xFFFFFFFF", 16) : (int)0); } - _dataTable = new DataTable(_data1, _data2, _data3, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.BlendVariable( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.BlendVariable( - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.BlendVariable( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.BlendVariable), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.BlendVariable), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.BlendVariable), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.BlendVariable( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - fixed (Vector128* pClsVar3 = &_clsVar3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((Int32*)(pClsVar1)), - Sse2.LoadVector128((Int32*)(pClsVar2)), - Sse2.LoadVector128((Int32*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Sse41.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)); - var op3 = Sse2.LoadVector128((Int32*)(_dataTable.inArray3Ptr)); - var result = Sse41.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)); - var op3 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray3Ptr)); - var result = Sse41.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__BlendVariableInt32(); - var result = Sse41.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__BlendVariableInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - fixed (Vector128* pFld3 = &test._fld3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)), - Sse2.LoadVector128((Int32*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)), - Sse2.LoadVector128((Int32*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.BlendVariable( - Sse2.LoadVector128((Int32*)(&test._fld1)), - Sse2.LoadVector128((Int32*)(&test._fld2)), - Sse2.LoadVector128((Int32*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, Vector128 op3, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] inArray3 = new Int32[Op3ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] inArray3 = new Int32[Op3ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Int32[] firstOp, Int32[] secondOp, Int32[] thirdOp, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((thirdOp[0] != 0) ? secondOp[0] != result[0] : firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((thirdOp[i] != 0) ? secondOp[i] != result[i] : firstOp[i] != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.BlendVariable)}(Vector128, Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.Int64.cs deleted file mode 100644 index 9c4032995cb9..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.Int64.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendVariableInt64() - { - var test = new SimpleTernaryOpTest__BlendVariableInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__BlendVariableInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int64[] inArray1, Int64[] inArray2, Int64[] inArray3, Int64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - public Vector128 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToInt64("0xFFFFFFFFFFFFFFFF", 16) : (long)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__BlendVariableInt64 testClass) - { - var result = Sse41.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__BlendVariableInt64 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)), - Sse2.LoadVector128((Int64*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - private static Int64[] _data3 = new Int64[Op3ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - private static Vector128 _clsVar3; - - private Vector128 _fld1; - private Vector128 _fld2; - private Vector128 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__BlendVariableInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToInt64("0xFFFFFFFFFFFFFFFF", 16) : (long)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__BlendVariableInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToInt64("0xFFFFFFFFFFFFFFFF", 16) : (long)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToInt64("0xFFFFFFFFFFFFFFFF", 16) : (long)0); } - _dataTable = new DataTable(_data1, _data2, _data3, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.BlendVariable( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.BlendVariable( - Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)), - Sse2.LoadVector128((Int64*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.BlendVariable( - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)), - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.BlendVariable), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.BlendVariable), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)), - Sse2.LoadVector128((Int64*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.BlendVariable), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)), - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.BlendVariable( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - fixed (Vector128* pClsVar3 = &_clsVar3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((Int64*)(pClsVar1)), - Sse2.LoadVector128((Int64*)(pClsVar2)), - Sse2.LoadVector128((Int64*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Sse41.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)); - var op3 = Sse2.LoadVector128((Int64*)(_dataTable.inArray3Ptr)); - var result = Sse41.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)); - var op3 = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray3Ptr)); - var result = Sse41.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__BlendVariableInt64(); - var result = Sse41.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__BlendVariableInt64(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - fixed (Vector128* pFld3 = &test._fld3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)), - Sse2.LoadVector128((Int64*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)), - Sse2.LoadVector128((Int64*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.BlendVariable( - Sse2.LoadVector128((Int64*)(&test._fld1)), - Sse2.LoadVector128((Int64*)(&test._fld2)), - Sse2.LoadVector128((Int64*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, Vector128 op3, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] inArray3 = new Int64[Op3ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] inArray3 = new Int64[Op3ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Int64[] firstOp, Int64[] secondOp, Int64[] thirdOp, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((thirdOp[0] != 0) ? secondOp[0] != result[0] : firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((thirdOp[i] != 0) ? secondOp[i] != result[i] : firstOp[i] != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.BlendVariable)}(Vector128, Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.SByte.cs deleted file mode 100644 index 0cc23da3cfaa..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.SByte.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendVariableSByte() - { - var test = new SimpleTernaryOpTest__BlendVariableSByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__BlendVariableSByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, SByte[] inArray3, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - public Vector128 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (sbyte)(((i % 2) == 0) ? -128 : 1); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__BlendVariableSByte testClass) - { - var result = Sse41.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__BlendVariableSByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)), - Sse2.LoadVector128((SByte*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - private static SByte[] _data3 = new SByte[Op3ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - private static Vector128 _clsVar3; - - private Vector128 _fld1; - private Vector128 _fld2; - private Vector128 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__BlendVariableSByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (sbyte)(((i % 2) == 0) ? -128 : 1); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__BlendVariableSByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (sbyte)(((i % 2) == 0) ? -128 : 1); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (sbyte)(((i % 2) == 0) ? -128 : 1); } - _dataTable = new DataTable(_data1, _data2, _data3, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.BlendVariable( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.BlendVariable( - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.BlendVariable( - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.BlendVariable), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.BlendVariable), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.BlendVariable), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.BlendVariable( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - fixed (Vector128* pClsVar3 = &_clsVar3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((SByte*)(pClsVar1)), - Sse2.LoadVector128((SByte*)(pClsVar2)), - Sse2.LoadVector128((SByte*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Sse41.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)); - var op3 = Sse2.LoadVector128((SByte*)(_dataTable.inArray3Ptr)); - var result = Sse41.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)); - var op3 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray3Ptr)); - var result = Sse41.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__BlendVariableSByte(); - var result = Sse41.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__BlendVariableSByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - fixed (Vector128* pFld3 = &test._fld3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)), - Sse2.LoadVector128((SByte*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)), - Sse2.LoadVector128((SByte*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.BlendVariable( - Sse2.LoadVector128((SByte*)(&test._fld1)), - Sse2.LoadVector128((SByte*)(&test._fld2)), - Sse2.LoadVector128((SByte*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, Vector128 op3, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] inArray3 = new SByte[Op3ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] inArray3 = new SByte[Op3ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(SByte[] firstOp, SByte[] secondOp, SByte[] thirdOp, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (((thirdOp[0] >> 7) & 1) == 1 ? secondOp[0] != result[0] : firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (((thirdOp[i] >> 7) & 1) == 1 ? secondOp[i] != result[i] : firstOp[i] != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.BlendVariable)}(Vector128, Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.Single.cs deleted file mode 100644 index f513033d8b41..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.Single.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendVariableSingle() - { - var test = new SimpleTernaryOpTest__BlendVariableSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__BlendVariableSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] inArray3, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - public Vector128 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (float)(((i % 2) == 0) ? -0.0 : 1.0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__BlendVariableSingle testClass) - { - var result = Sse41.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__BlendVariableSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Sse41.BlendVariable( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)), - Sse.LoadVector128((Single*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - private static Single[] _data3 = new Single[Op3ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - private static Vector128 _clsVar3; - - private Vector128 _fld1; - private Vector128 _fld2; - private Vector128 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__BlendVariableSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (float)(((i % 2) == 0) ? -0.0 : 1.0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__BlendVariableSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (float)(((i % 2) == 0) ? -0.0 : 1.0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (float)(((i % 2) == 0) ? -0.0 : 1.0); } - _dataTable = new DataTable(_data1, _data2, _data3, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.BlendVariable( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.BlendVariable( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.BlendVariable( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.BlendVariable), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.BlendVariable), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.BlendVariable), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.BlendVariable( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - fixed (Vector128* pClsVar3 = &_clsVar3) - { - var result = Sse41.BlendVariable( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)), - Sse.LoadVector128((Single*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Sse41.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var op3 = Sse.LoadVector128((Single*)(_dataTable.inArray3Ptr)); - var result = Sse41.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var op3 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray3Ptr)); - var result = Sse41.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__BlendVariableSingle(); - var result = Sse41.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__BlendVariableSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - fixed (Vector128* pFld3 = &test._fld3) - { - var result = Sse41.BlendVariable( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)), - Sse.LoadVector128((Single*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Sse41.BlendVariable( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)), - Sse.LoadVector128((Single*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.BlendVariable( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)), - Sse.LoadVector128((Single*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, Vector128 op3, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] inArray3 = new Single[Op3ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] inArray3 = new Single[Op3ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] secondOp, Single[] thirdOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (((BitConverter.SingleToInt32Bits(thirdOp[0]) >> 31) & 1) == 1 ? BitConverter.SingleToInt32Bits(secondOp[0]) != BitConverter.SingleToInt32Bits(result[0]) : BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (((BitConverter.SingleToInt32Bits(thirdOp[i]) >> 31) & 1) == 1 ? BitConverter.SingleToInt32Bits(secondOp[i]) != BitConverter.SingleToInt32Bits(result[i]) : BitConverter.SingleToInt32Bits(firstOp[i]) != BitConverter.SingleToInt32Bits(result[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.BlendVariable)}(Vector128, Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.UInt16.cs deleted file mode 100644 index 5fccc7df35b2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.UInt16.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendVariableUInt16() - { - var test = new SimpleTernaryOpTest__BlendVariableUInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__BlendVariableUInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, UInt16[] inArray3, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - public Vector128 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToUInt16("0xFFFF", 16) : (ushort)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__BlendVariableUInt16 testClass) - { - var result = Sse41.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__BlendVariableUInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)), - Sse2.LoadVector128((UInt16*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - private static UInt16[] _data3 = new UInt16[Op3ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - private static Vector128 _clsVar3; - - private Vector128 _fld1; - private Vector128 _fld2; - private Vector128 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__BlendVariableUInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToUInt16("0xFFFF", 16) : (ushort)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__BlendVariableUInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToUInt16("0xFFFF", 16) : (ushort)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToUInt16("0xFFFF", 16) : (ushort)0); } - _dataTable = new DataTable(_data1, _data2, _data3, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.BlendVariable( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.BlendVariable( - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.BlendVariable( - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.BlendVariable), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.BlendVariable), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.BlendVariable), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.BlendVariable( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - fixed (Vector128* pClsVar3 = &_clsVar3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((UInt16*)(pClsVar1)), - Sse2.LoadVector128((UInt16*)(pClsVar2)), - Sse2.LoadVector128((UInt16*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Sse41.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)); - var op3 = Sse2.LoadVector128((UInt16*)(_dataTable.inArray3Ptr)); - var result = Sse41.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)); - var op3 = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray3Ptr)); - var result = Sse41.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__BlendVariableUInt16(); - var result = Sse41.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__BlendVariableUInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - fixed (Vector128* pFld3 = &test._fld3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)), - Sse2.LoadVector128((UInt16*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)), - Sse2.LoadVector128((UInt16*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.BlendVariable( - Sse2.LoadVector128((UInt16*)(&test._fld1)), - Sse2.LoadVector128((UInt16*)(&test._fld2)), - Sse2.LoadVector128((UInt16*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, Vector128 op3, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] inArray3 = new UInt16[Op3ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] inArray3 = new UInt16[Op3ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(UInt16[] firstOp, UInt16[] secondOp, UInt16[] thirdOp, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((thirdOp[0] != 0) ? secondOp[0] != result[0] : firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((thirdOp[i] != 0) ? secondOp[i] != result[i] : firstOp[i] != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.BlendVariable)}(Vector128, Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.UInt32.cs deleted file mode 100644 index 3129e83e4ee2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.UInt32.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendVariableUInt32() - { - var test = new SimpleTernaryOpTest__BlendVariableUInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__BlendVariableUInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, UInt32[] inArray3, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - public Vector128 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToUInt32("0xFFFFFFFF", 16) : (uint)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__BlendVariableUInt32 testClass) - { - var result = Sse41.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__BlendVariableUInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)), - Sse2.LoadVector128((UInt32*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - private static UInt32[] _data3 = new UInt32[Op3ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - private static Vector128 _clsVar3; - - private Vector128 _fld1; - private Vector128 _fld2; - private Vector128 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__BlendVariableUInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToUInt32("0xFFFFFFFF", 16) : (uint)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__BlendVariableUInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToUInt32("0xFFFFFFFF", 16) : (uint)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToUInt32("0xFFFFFFFF", 16) : (uint)0); } - _dataTable = new DataTable(_data1, _data2, _data3, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.BlendVariable( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.BlendVariable( - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.BlendVariable( - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.BlendVariable), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.BlendVariable), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.BlendVariable), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.BlendVariable( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - fixed (Vector128* pClsVar3 = &_clsVar3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((UInt32*)(pClsVar1)), - Sse2.LoadVector128((UInt32*)(pClsVar2)), - Sse2.LoadVector128((UInt32*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Sse41.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)); - var op3 = Sse2.LoadVector128((UInt32*)(_dataTable.inArray3Ptr)); - var result = Sse41.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)); - var op3 = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray3Ptr)); - var result = Sse41.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__BlendVariableUInt32(); - var result = Sse41.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__BlendVariableUInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - fixed (Vector128* pFld3 = &test._fld3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)), - Sse2.LoadVector128((UInt32*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)), - Sse2.LoadVector128((UInt32*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.BlendVariable( - Sse2.LoadVector128((UInt32*)(&test._fld1)), - Sse2.LoadVector128((UInt32*)(&test._fld2)), - Sse2.LoadVector128((UInt32*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, Vector128 op3, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] inArray3 = new UInt32[Op3ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] inArray3 = new UInt32[Op3ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(UInt32[] firstOp, UInt32[] secondOp, UInt32[] thirdOp, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((thirdOp[0] != 0) ? secondOp[0] != result[0] : firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((thirdOp[i] != 0) ? secondOp[i] != result[i] : firstOp[i] != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.BlendVariable)}(Vector128, Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.UInt64.cs deleted file mode 100644 index b90d01da35af..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.UInt64.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void BlendVariableUInt64() - { - var test = new SimpleTernaryOpTest__BlendVariableUInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleTernaryOpTest__BlendVariableUInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] inArray3; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle inHandle3; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt64[] inArray1, UInt64[] inArray2, UInt64[] inArray3, UInt64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.inArray3 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As(ref inArray3[0]), (uint)sizeOfinArray3); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - inHandle3.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - public Vector128 _fld3; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToUInt64("0xFFFFFFFFFFFFFFFF", 16): (ulong)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleTernaryOpTest__BlendVariableUInt64 testClass) - { - var result = Sse41.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleTernaryOpTest__BlendVariableUInt64 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((UInt64*)(pFld1)), - Sse2.LoadVector128((UInt64*)(pFld2)), - Sse2.LoadVector128((UInt64*)(pFld3)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op3ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - private static UInt64[] _data3 = new UInt64[Op3ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - private static Vector128 _clsVar3; - - private Vector128 _fld1; - private Vector128 _fld2; - private Vector128 _fld3; - - private DataTable _dataTable; - - static SimpleTernaryOpTest__BlendVariableUInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToUInt64("0xFFFFFFFFFFFFFFFF", 16): (ulong)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleTernaryOpTest__BlendVariableUInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToUInt64("0xFFFFFFFFFFFFFFFF", 16): (ulong)0); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (((i % 2) == 0) ? Convert.ToUInt64("0xFFFFFFFFFFFFFFFF", 16): (ulong)0); } - _dataTable = new DataTable(_data1, _data2, _data3, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.BlendVariable( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.BlendVariable( - Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)), - Sse2.LoadVector128((UInt64*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.BlendVariable( - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)), - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray3Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.BlendVariable), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - Unsafe.Read>(_dataTable.inArray3Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.BlendVariable), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)), - Sse2.LoadVector128((UInt64*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.BlendVariable), new Type[] { typeof(Vector128), typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)), - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray3Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.BlendVariable( - _clsVar1, - _clsVar2, - _clsVar3 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - fixed (Vector128* pClsVar3 = &_clsVar3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((UInt64*)(pClsVar1)), - Sse2.LoadVector128((UInt64*)(pClsVar2)), - Sse2.LoadVector128((UInt64*)(pClsVar3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var op3 = Unsafe.Read>(_dataTable.inArray3Ptr); - var result = Sse41.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)); - var op3 = Sse2.LoadVector128((UInt64*)(_dataTable.inArray3Ptr)); - var result = Sse41.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)); - var op3 = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray3Ptr)); - var result = Sse41.BlendVariable(op1, op2, op3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleTernaryOpTest__BlendVariableUInt64(); - var result = Sse41.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleTernaryOpTest__BlendVariableUInt64(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - fixed (Vector128* pFld3 = &test._fld3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((UInt64*)(pFld1)), - Sse2.LoadVector128((UInt64*)(pFld2)), - Sse2.LoadVector128((UInt64*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.BlendVariable(_fld1, _fld2, _fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - fixed (Vector128* pFld3 = &_fld3) - { - var result = Sse41.BlendVariable( - Sse2.LoadVector128((UInt64*)(pFld1)), - Sse2.LoadVector128((UInt64*)(pFld2)), - Sse2.LoadVector128((UInt64*)(pFld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.BlendVariable(test._fld1, test._fld2, test._fld3); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.BlendVariable( - Sse2.LoadVector128((UInt64*)(&test._fld1)), - Sse2.LoadVector128((UInt64*)(&test._fld2)), - Sse2.LoadVector128((UInt64*)(&test._fld3)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, Vector128 op3, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] inArray3 = new UInt64[Op3ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray3[0]), op3); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] inArray3 = new UInt64[Op3ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, inArray3, outArray, method); - } - - private void ValidateResult(UInt64[] firstOp, UInt64[] secondOp, UInt64[] thirdOp, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if ((thirdOp[0] != 0) ? secondOp[0] != result[0] : firstOp[0] != result[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if ((thirdOp[i] != 0) ? secondOp[i] != result[i] : firstOp[i] != result[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.BlendVariable)}(Vector128, Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); - TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Ceiling.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Ceiling.Double.cs deleted file mode 100644 index 2beb934b75ee..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Ceiling.Double.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CeilingDouble() - { - var test = new SimpleUnaryOpTest__CeilingDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__CeilingDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__CeilingDouble testClass) - { - var result = Sse41.Ceiling(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__CeilingDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.Ceiling( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__CeilingDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__CeilingDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.Ceiling( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.Ceiling( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.Ceiling( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Ceiling), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Ceiling), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Ceiling), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.Ceiling( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Sse41.Ceiling( - Sse2.LoadVector128((Double*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Sse41.Ceiling(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var result = Sse41.Ceiling(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var result = Sse41.Ceiling(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__CeilingDouble(); - var result = Sse41.Ceiling(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__CeilingDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Sse41.Ceiling( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.Ceiling(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.Ceiling( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.Ceiling(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.Ceiling( - Sse2.LoadVector128((Double*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Ceiling(firstOp[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Ceiling(firstOp[i]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.Ceiling)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Ceiling.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Ceiling.Single.cs deleted file mode 100644 index 9f669bf49247..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Ceiling.Single.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CeilingSingle() - { - var test = new SimpleUnaryOpTest__CeilingSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__CeilingSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__CeilingSingle testClass) - { - var result = Sse41.Ceiling(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__CeilingSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.Ceiling( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__CeilingSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__CeilingSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.Ceiling( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.Ceiling( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.Ceiling( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Ceiling), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Ceiling), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Ceiling), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.Ceiling( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Sse41.Ceiling( - Sse.LoadVector128((Single*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Sse41.Ceiling(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var result = Sse41.Ceiling(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var result = Sse41.Ceiling(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__CeilingSingle(); - var result = Sse41.Ceiling(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__CeilingSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Sse41.Ceiling( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.Ceiling(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.Ceiling( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.Ceiling(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.Ceiling( - Sse.LoadVector128((Single*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Ceiling(firstOp[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Ceiling(firstOp[i]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.Ceiling)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/CompareEqual.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/CompareEqual.Int64.cs deleted file mode 100644 index 29bee54f2e37..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/CompareEqual.Int64.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareEqualInt64() - { - var test = new SimpleBinaryOpTest__CompareEqualInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareEqualInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int64[] inArray1, Int64[] inArray2, Int64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareEqualInt64 testClass) - { - var result = Sse41.CompareEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareEqualInt64 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.CompareEqual( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareEqualInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareEqualInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.CompareEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.CompareEqual( - Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.CompareEqual( - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.CompareEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.CompareEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.CompareEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.CompareEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.CompareEqual( - Sse2.LoadVector128((Int64*)(pClsVar1)), - Sse2.LoadVector128((Int64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = Sse41.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = Sse41.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareEqualInt64(); - var result = Sse41.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareEqualInt64(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.CompareEqual( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.CompareEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.CompareEqual( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.CompareEqual( - Sse2.LoadVector128((Int64*)(&test._fld1)), - Sse2.LoadVector128((Int64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((left[0] == right[0]) ? unchecked((long)(-1)) : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((left[i] == right[i]) ? unchecked((long)(-1)) : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.CompareEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/CompareEqual.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/CompareEqual.UInt64.cs deleted file mode 100644 index 51e12717de2b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/CompareEqual.UInt64.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareEqualUInt64() - { - var test = new SimpleBinaryOpTest__CompareEqualUInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareEqualUInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt64[] inArray1, UInt64[] inArray2, UInt64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareEqualUInt64 testClass) - { - var result = Sse41.CompareEqual(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareEqualUInt64 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.CompareEqual( - Sse2.LoadVector128((UInt64*)(pFld1)), - Sse2.LoadVector128((UInt64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareEqualUInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareEqualUInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.CompareEqual( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.CompareEqual( - Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.CompareEqual( - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.CompareEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.CompareEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.CompareEqual), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.CompareEqual( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.CompareEqual( - Sse2.LoadVector128((UInt64*)(pClsVar1)), - Sse2.LoadVector128((UInt64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)); - var result = Sse41.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)); - var result = Sse41.CompareEqual(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareEqualUInt64(); - var result = Sse41.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareEqualUInt64(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.CompareEqual( - Sse2.LoadVector128((UInt64*)(pFld1)), - Sse2.LoadVector128((UInt64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.CompareEqual(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.CompareEqual( - Sse2.LoadVector128((UInt64*)(pFld1)), - Sse2.LoadVector128((UInt64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.CompareEqual(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.CompareEqual( - Sse2.LoadVector128((UInt64*)(&test._fld1)), - Sse2.LoadVector128((UInt64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt64[] left, UInt64[] right, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((left[0] == right[0]) ? unchecked((ulong)(-1)) : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((left[i] == right[i]) ? unchecked((ulong)(-1)) : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.CompareEqual)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/DotProduct.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/DotProduct.cs deleted file mode 100644 index 096c6cce6491..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/DotProduct.cs +++ /dev/null @@ -1,225 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Sse41.IsSupported) - { - using (TestTable floatTable = new TestTable(new float[4] { 1, -5, 100, 0 }, new float[4] { 22, -1, -50, 0 }, new float[4])) - { - var vf1 = Unsafe.Read>(floatTable.inArray1Ptr); - var vf2 = Unsafe.Read>(floatTable.inArray2Ptr); - - var vf3 = Sse41.DotProduct(vf1, vf2, 255); - Unsafe.Write(floatTable.outArrayPtr, vf3); - - if (!floatTable.CheckResult((x, y, z) => z.All(result => result == (x[0] * y[0]) + (x[1] * y[1]) + - (x[2] * y[2]) + (x[3] * y[3])))) - { - Console.WriteLine("SSE41 DotProduct failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - vf3 = Sse41.DotProduct(vf1, vf2, 127); - Unsafe.Write(floatTable.outArrayPtr, vf3); - - if (!floatTable.CheckResult((x, y, z) => z.All(result => result == (x[0] * y[0]) + (x[1] * y[1]) + - (x[2] * y[2])))) - { - Console.WriteLine("SSE41 DotProduct failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - vf3 = Sse41.DotProduct(vf1, vf2, 63); - Unsafe.Write(floatTable.outArrayPtr, vf3); - - if (!floatTable.CheckResult((x, y, z) => z.All(result => result == ((x[0] * y[0]) + (x[1] * y[1]))))) - { - Console.WriteLine("3 SSE41 DotProduct failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - vf3 = Sse41.DotProduct(vf1, vf2, 85); - Unsafe.Write(floatTable.outArrayPtr, vf3); - - if (!floatTable.CheckResult((x, y, z) => z[0] == ((x[0] * y[0]) + (x[2] * y[2])) && - z[2] == ((x[0] * y[0]) + (x[2] * y[2])) && - z[1] == 0 && z[3] == 0)) - { - Console.WriteLine("SSE41 DotProduct failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - vf3 = (Vector128)typeof(Sse41).GetMethod(nameof(Sse41.DotProduct), new Type[] { vf1.GetType(), vf2.GetType(), typeof(byte) }).Invoke(null, new object[] { vf1, vf2, (byte)(255) }); - Unsafe.Write(floatTable.outArrayPtr, vf3); - - if (!floatTable.CheckResult((x, y, z) => z.All(result => result == (x[0] * y[0]) + (x[1] * y[1]) + - (x[2] * y[2]) + (x[3] * y[3])))) - { - Console.WriteLine("SSE41 DotProduct failed on float:"); - foreach (var item in floatTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - - using (TestTable doubleTable = new TestTable(new double[2] { 1, -5 }, new double[2] { 22, -1 }, new double[2])) - { - var vf1 = Unsafe.Read>(doubleTable.inArray1Ptr); - var vf2 = Unsafe.Read>(doubleTable.inArray2Ptr); - - var vf3 = Sse41.DotProduct(vf1, vf2, 51); - Unsafe.Write(doubleTable.outArrayPtr, vf3); - - if (!doubleTable.CheckResult((x, y, z) => z.All(result => result == (x[0] * y[0]) + (x[1] * y[1])))) - { - Console.WriteLine("SSE41 DotProduct failed on double:"); - foreach (var item in doubleTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - vf3 = Sse41.DotProduct(vf1, vf2, 19); - Unsafe.Write(doubleTable.outArrayPtr, vf3); - - if (!doubleTable.CheckResult((x, y, z) => z.All(result => result == (x[0] * y[0])))) - { - Console.WriteLine("SSE41 DotProduct failed on double:"); - foreach (var item in doubleTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - vf3 = Sse41.DotProduct(vf1, vf2, 17); - Unsafe.Write(doubleTable.outArrayPtr, vf3); - - if (!doubleTable.CheckResult((x, y, z) => z[0] == (x[0] * y[0]) && - z[1] == 0)) - { - Console.WriteLine("SSE41 DotProduct failed on double:"); - foreach (var item in doubleTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - vf3 = Sse41.DotProduct(vf1, vf2, 33); - Unsafe.Write(doubleTable.outArrayPtr, vf3); - - if (!doubleTable.CheckResult((x, y, z) => z[0] == (x[1] * y[1]) && - z[1] == 0)) - { - Console.WriteLine("SSE41 DotProduct failed on double:"); - foreach (var item in doubleTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - - vf3 = (Vector128)typeof(Sse41).GetMethod(nameof(Sse41.DotProduct), new Type[] { vf1.GetType(), vf2.GetType(), typeof(byte) }).Invoke(null, new object[] { vf1, vf2, (byte)(51) }); - Unsafe.Write(doubleTable.outArrayPtr, vf3); - - if (!doubleTable.CheckResult((x, y, z) => z.All(result => result == (x[0] * y[0]) + (x[1] * y[1])))) - { - Console.WriteLine("SSE41 DotProduct failed on double:"); - foreach (var item in doubleTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - testResult = Fail; - } - } - } - - return testResult; - } - - public unsafe struct TestTable : IDisposable where T : struct - { - public T[] inArray1; - public T[] inArray2; - public T[] outArray; - - public void* inArray1Ptr => inHandle1.AddrOfPinnedObject().ToPointer(); - public void* inArray2Ptr => inHandle2.AddrOfPinnedObject().ToPointer(); - public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); - - GCHandle inHandle1; - GCHandle inHandle2; - GCHandle outHandle; - public TestTable(T[] a, T[] b, T[] c) - { - this.inArray1 = a; - this.inArray2 = b; - this.outArray = c; - - inHandle1 = GCHandle.Alloc(inArray1, GCHandleType.Pinned); - inHandle2 = GCHandle.Alloc(inArray2, GCHandleType.Pinned); - outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); - } - public bool CheckResult(Func check) - { - return check(inArray1, inArray2, outArray); - } - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Floor.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Floor.Double.cs deleted file mode 100644 index 3f9742a0722e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Floor.Double.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void FloorDouble() - { - var test = new SimpleUnaryOpTest__FloorDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__FloorDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__FloorDouble testClass) - { - var result = Sse41.Floor(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__FloorDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.Floor( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__FloorDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__FloorDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.Floor( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.Floor( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.Floor( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Floor), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Floor), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Floor), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.Floor( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Sse41.Floor( - Sse2.LoadVector128((Double*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Sse41.Floor(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var result = Sse41.Floor(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var result = Sse41.Floor(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__FloorDouble(); - var result = Sse41.Floor(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__FloorDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Sse41.Floor( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.Floor(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.Floor( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.Floor(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.Floor( - Sse2.LoadVector128((Double*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Floor(firstOp[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Floor(firstOp[i]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.Floor)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Floor.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Floor.Single.cs deleted file mode 100644 index d7719a17b018..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Floor.Single.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void FloorSingle() - { - var test = new SimpleUnaryOpTest__FloorSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__FloorSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__FloorSingle testClass) - { - var result = Sse41.Floor(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__FloorSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.Floor( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__FloorSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__FloorSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.Floor( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.Floor( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.Floor( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Floor), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Floor), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Floor), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.Floor( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Sse41.Floor( - Sse.LoadVector128((Single*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Sse41.Floor(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var result = Sse41.Floor(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var result = Sse41.Floor(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__FloorSingle(); - var result = Sse41.Floor(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__FloorSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Sse41.Floor( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.Floor(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.Floor( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.Floor(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.Floor( - Sse.LoadVector128((Single*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Floor(firstOp[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Floor(firstOp[i]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.Floor)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Max.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Max.Int32.cs deleted file mode 100644 index 16f971a1df72..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Max.Int32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaxInt32() - { - var test = new SimpleBinaryOpTest__MaxInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MaxInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MaxInt32 testClass) - { - var result = Sse41.Max(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MaxInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.Max( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MaxInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MaxInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.Max( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.Max( - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.Max( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Max), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Max), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Max), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.Max( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.Max( - Sse2.LoadVector128((Int32*)(pClsVar1)), - Sse2.LoadVector128((Int32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Sse41.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Sse41.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MaxInt32(); - var result = Sse41.Max(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MaxInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.Max( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.Max(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.Max( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.Max(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.Max( - Sse2.LoadVector128((Int32*)(&test._fld1)), - Sse2.LoadVector128((Int32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != Math.Max(left[0], right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != Math.Max(left[i], right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.Max)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Max.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Max.SByte.cs deleted file mode 100644 index a81c4342f110..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Max.SByte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaxSByte() - { - var test = new SimpleBinaryOpTest__MaxSByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MaxSByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MaxSByte testClass) - { - var result = Sse41.Max(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MaxSByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.Max( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MaxSByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MaxSByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.Max( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.Max( - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.Max( - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Max), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Max), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Max), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.Max( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.Max( - Sse2.LoadVector128((SByte*)(pClsVar1)), - Sse2.LoadVector128((SByte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Sse41.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Sse41.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MaxSByte(); - var result = Sse41.Max(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MaxSByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.Max( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.Max(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.Max( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.Max(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.Max( - Sse2.LoadVector128((SByte*)(&test._fld1)), - Sse2.LoadVector128((SByte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != Math.Max(left[0], right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != Math.Max(left[i], right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.Max)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Max.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Max.UInt16.cs deleted file mode 100644 index c7e209c5037e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Max.UInt16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaxUInt16() - { - var test = new SimpleBinaryOpTest__MaxUInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MaxUInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MaxUInt16 testClass) - { - var result = Sse41.Max(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MaxUInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.Max( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MaxUInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MaxUInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.Max( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.Max( - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.Max( - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Max), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Max), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Max), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.Max( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.Max( - Sse2.LoadVector128((UInt16*)(pClsVar1)), - Sse2.LoadVector128((UInt16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Sse41.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Sse41.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MaxUInt16(); - var result = Sse41.Max(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MaxUInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.Max( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.Max(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.Max( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.Max(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.Max( - Sse2.LoadVector128((UInt16*)(&test._fld1)), - Sse2.LoadVector128((UInt16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != Math.Max(left[0], right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != Math.Max(left[i], right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.Max)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Max.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Max.UInt32.cs deleted file mode 100644 index e698d736b839..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Max.UInt32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MaxUInt32() - { - var test = new SimpleBinaryOpTest__MaxUInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MaxUInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MaxUInt32 testClass) - { - var result = Sse41.Max(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MaxUInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.Max( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MaxUInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MaxUInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.Max( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.Max( - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.Max( - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Max), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Max), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Max), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.Max( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.Max( - Sse2.LoadVector128((UInt32*)(pClsVar1)), - Sse2.LoadVector128((UInt32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Sse41.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Sse41.Max(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MaxUInt32(); - var result = Sse41.Max(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MaxUInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.Max( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.Max(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.Max( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.Max(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.Max( - Sse2.LoadVector128((UInt32*)(&test._fld1)), - Sse2.LoadVector128((UInt32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != Math.Max(left[0], right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != Math.Max(left[i], right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.Max)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Min.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Min.Int32.cs deleted file mode 100644 index 5c67f02a2b46..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Min.Int32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MinInt32() - { - var test = new SimpleBinaryOpTest__MinInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MinInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MinInt32 testClass) - { - var result = Sse41.Min(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MinInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.Min( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MinInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MinInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.Min( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.Min( - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.Min( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Min), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Min), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Min), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.Min( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.Min( - Sse2.LoadVector128((Int32*)(pClsVar1)), - Sse2.LoadVector128((Int32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Sse41.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Sse41.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MinInt32(); - var result = Sse41.Min(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MinInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.Min( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.Min(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.Min( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.Min(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.Min( - Sse2.LoadVector128((Int32*)(&test._fld1)), - Sse2.LoadVector128((Int32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != Math.Min(left[0], right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != Math.Min(left[i], right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.Min)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Min.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Min.SByte.cs deleted file mode 100644 index d0e8d8789d6a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Min.SByte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MinSByte() - { - var test = new SimpleBinaryOpTest__MinSByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MinSByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MinSByte testClass) - { - var result = Sse41.Min(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MinSByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.Min( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MinSByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MinSByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.Min( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.Min( - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.Min( - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Min), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Min), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Min), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.Min( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.Min( - Sse2.LoadVector128((SByte*)(pClsVar1)), - Sse2.LoadVector128((SByte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Sse41.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Sse41.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MinSByte(); - var result = Sse41.Min(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MinSByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.Min( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.Min(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.Min( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.Min(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.Min( - Sse2.LoadVector128((SByte*)(&test._fld1)), - Sse2.LoadVector128((SByte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != Math.Min(left[0], right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != Math.Min(left[i], right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.Min)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Min.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Min.UInt16.cs deleted file mode 100644 index 3e5bc9694df8..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Min.UInt16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MinUInt16() - { - var test = new SimpleBinaryOpTest__MinUInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MinUInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MinUInt16 testClass) - { - var result = Sse41.Min(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MinUInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.Min( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MinUInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MinUInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.Min( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.Min( - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.Min( - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Min), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Min), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Min), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.Min( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.Min( - Sse2.LoadVector128((UInt16*)(pClsVar1)), - Sse2.LoadVector128((UInt16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Sse41.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Sse41.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MinUInt16(); - var result = Sse41.Min(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MinUInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.Min( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.Min(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.Min( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.Min(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.Min( - Sse2.LoadVector128((UInt16*)(&test._fld1)), - Sse2.LoadVector128((UInt16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != Math.Min(left[0], right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != Math.Min(left[i], right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.Min)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Min.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Min.UInt32.cs deleted file mode 100644 index 169ecbbe7621..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Min.UInt32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MinUInt32() - { - var test = new SimpleBinaryOpTest__MinUInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MinUInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MinUInt32 testClass) - { - var result = Sse41.Min(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MinUInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.Min( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MinUInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MinUInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.Min( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.Min( - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.Min( - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Min), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Min), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.Min), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.Min( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.Min( - Sse2.LoadVector128((UInt32*)(pClsVar1)), - Sse2.LoadVector128((UInt32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Sse41.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Sse41.Min(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MinUInt32(); - var result = Sse41.Min(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MinUInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.Min( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.Min(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.Min( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.Min(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.Min( - Sse2.LoadVector128((UInt32*)(&test._fld1)), - Sse2.LoadVector128((UInt32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != Math.Min(left[0], right[0])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != Math.Min(left[i], right[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.Min)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Multiply.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Multiply.cs deleted file mode 100644 index 09feca9a4e8a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Multiply.cs +++ /dev/null @@ -1,95 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static unsafe int Main(string[] args) - { - int testResult = Pass; - - if (Sse41.IsSupported) - { - using (TestTable intTable = new TestTable(new int[4] { 1, -5, 100, 0}, new int[4] { 22, -1, -50, 0}, new long[2])) - { - - var vi1 = Unsafe.Read>(intTable.inArray1Ptr); - var vi2 = Unsafe.Read>(intTable.inArray2Ptr); - var vi3 = Sse41.Multiply(vi1, vi2); - Unsafe.Write(intTable.outArrayPtr, vi3); - - for (int i = 0; i < intTable.outArray.Length; i++) - { - if (intTable.inArray1[i * 2] * intTable.inArray2[i * 2] != intTable.outArray[i]) - { - Console.WriteLine("SSE4.1 Multiply failed on int:"); - foreach (var item in intTable.outArray) - { - Console.Write(item + ", "); - } - Console.WriteLine(); - return Fail; - } - } - } - } - return testResult; - } - - public unsafe struct TestTable : IDisposable where T1 : struct where T2 : struct where T3 : struct - { - public T1[] inArray1; - public T2[] inArray2; - public T3[] outArray; - - public void* inArray1Ptr => inHandle1.AddrOfPinnedObject().ToPointer(); - public void* inArray2Ptr => inHandle2.AddrOfPinnedObject().ToPointer(); - public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); - - GCHandle inHandle1; - GCHandle inHandle2; - GCHandle outHandle; - public TestTable(T1[] a, T2[] b, T3[] c) - { - this.inArray1 = a; - this.inArray2 = b; - this.outArray = c; - - inHandle1 = GCHandle.Alloc(inArray1, GCHandleType.Pinned); - inHandle2 = GCHandle.Alloc(inArray2, GCHandleType.Pinned); - outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); - } - public bool CheckResult(Func check) - { - for (int i = 0; i < inArray1.Length; i++) - { - if (!check(inArray1[i], inArray2[i], outArray[i])) - { - return false; - } - } - return true; - } - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - } - - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/MultiplyLow.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/MultiplyLow.Int32.cs deleted file mode 100644 index 0b5640b964cf..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/MultiplyLow.Int32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplyLowInt32() - { - var test = new SimpleBinaryOpTest__MultiplyLowInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MultiplyLowInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MultiplyLowInt32 testClass) - { - var result = Sse41.MultiplyLow(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MultiplyLowInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.MultiplyLow( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MultiplyLowInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MultiplyLowInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.MultiplyLow( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.MultiplyLow( - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.MultiplyLow( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.MultiplyLow), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.MultiplyLow), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.MultiplyLow), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.MultiplyLow( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.MultiplyLow( - Sse2.LoadVector128((Int32*)(pClsVar1)), - Sse2.LoadVector128((Int32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.MultiplyLow(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Sse41.MultiplyLow(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Sse41.MultiplyLow(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MultiplyLowInt32(); - var result = Sse41.MultiplyLow(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MultiplyLowInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.MultiplyLow( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.MultiplyLow(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.MultiplyLow( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.MultiplyLow(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.MultiplyLow( - Sse2.LoadVector128((Int32*)(&test._fld1)), - Sse2.LoadVector128((Int32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != BitConverter.ToInt32(BitConverter.GetBytes(((long)(left[0])) * right[0]), 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != BitConverter.ToInt32(BitConverter.GetBytes(((long)(left[i])) * right[i]), 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.MultiplyLow)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/MultiplyLow.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/MultiplyLow.UInt32.cs deleted file mode 100644 index 4389d7220427..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/MultiplyLow.UInt32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplyLowUInt32() - { - var test = new SimpleBinaryOpTest__MultiplyLowUInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MultiplyLowUInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, UInt32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MultiplyLowUInt32 testClass) - { - var result = Sse41.MultiplyLow(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MultiplyLowUInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.MultiplyLow( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MultiplyLowUInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MultiplyLowUInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.MultiplyLow( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.MultiplyLow( - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.MultiplyLow( - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.MultiplyLow), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.MultiplyLow), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.MultiplyLow), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.MultiplyLow( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.MultiplyLow( - Sse2.LoadVector128((UInt32*)(pClsVar1)), - Sse2.LoadVector128((UInt32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.MultiplyLow(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Sse41.MultiplyLow(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Sse41.MultiplyLow(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MultiplyLowUInt32(); - var result = Sse41.MultiplyLow(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MultiplyLowUInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.MultiplyLow( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.MultiplyLow(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.MultiplyLow( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.MultiplyLow(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.MultiplyLow( - Sse2.LoadVector128((UInt32*)(&test._fld1)), - Sse2.LoadVector128((UInt32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != BitConverter.ToUInt32(BitConverter.GetBytes(((ulong)(left[0])) * right[0]), 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != BitConverter.ToUInt32(BitConverter.GetBytes(((ulong)(left[i])) * right[i]), 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.MultiplyLow)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/PackUnsignedSaturate.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/PackUnsignedSaturate.UInt16.cs deleted file mode 100644 index 5c344bef96fe..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/PackUnsignedSaturate.UInt16.cs +++ /dev/null @@ -1,591 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void PackUnsignedSaturateUInt16() - { - var test = new HorizontalBinaryOpTest__PackUnsignedSaturateUInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class HorizontalBinaryOpTest__PackUnsignedSaturateUInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, UInt16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(HorizontalBinaryOpTest__PackUnsignedSaturateUInt16 testClass) - { - var result = Sse41.PackUnsignedSaturate(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(HorizontalBinaryOpTest__PackUnsignedSaturateUInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.PackUnsignedSaturate( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static HorizontalBinaryOpTest__PackUnsignedSaturateUInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public HorizontalBinaryOpTest__PackUnsignedSaturateUInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.PackUnsignedSaturate( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.PackUnsignedSaturate( - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.PackUnsignedSaturate( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.PackUnsignedSaturate), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.PackUnsignedSaturate), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.PackUnsignedSaturate), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.PackUnsignedSaturate( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.PackUnsignedSaturate( - Sse2.LoadVector128((Int32*)(pClsVar1)), - Sse2.LoadVector128((Int32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.PackUnsignedSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Sse41.PackUnsignedSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Sse41.PackUnsignedSaturate(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new HorizontalBinaryOpTest__PackUnsignedSaturateUInt16(); - var result = Sse41.PackUnsignedSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new HorizontalBinaryOpTest__PackUnsignedSaturateUInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.PackUnsignedSaturate( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.PackUnsignedSaturate(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.PackUnsignedSaturate( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.PackUnsignedSaturate(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.PackUnsignedSaturate( - Sse2.LoadVector128((Int32*)(&test._fld1)), - Sse2.LoadVector128((Int32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - for (var outer = 0; outer < (LargestVectorSize / 16); outer++) - { - for (var inner = 0; inner < (8 / sizeof(UInt16)); inner++) - { - var i1 = (outer * (16 / sizeof(UInt16))) + inner; - var i2 = i1 + (8 / sizeof(UInt16)); - var i3 = (outer * (16 / sizeof(UInt16))) + (inner * 2); - - if (result[i1] != ((left[i3 - inner] > 0xFFFF) ? 0xFFFF : ((left[i3 - inner] < 0) ? 0 : BitConverter.ToUInt16(BitConverter.GetBytes(left[i3 - inner]), 0)))) - { - succeeded = false; - break; - } - - if (result[i2] != ((right[i3 - inner] > 0xFFFF) ? 0xFFFF : ((right[i3 - inner] < 0) ? 0 : BitConverter.ToUInt16(BitConverter.GetBytes(right[i3 - inner]), 0)))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.PackUnsignedSaturate)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundCurrentDirection.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundCurrentDirection.Double.cs deleted file mode 100644 index 7ad680254c7d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundCurrentDirection.Double.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundCurrentDirectionDouble() - { - var test = new SimpleUnaryOpTest__RoundCurrentDirectionDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__RoundCurrentDirectionDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__RoundCurrentDirectionDouble testClass) - { - var result = Sse41.RoundCurrentDirection(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__RoundCurrentDirectionDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundCurrentDirection( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__RoundCurrentDirectionDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__RoundCurrentDirectionDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.RoundCurrentDirection( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.RoundCurrentDirection( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.RoundCurrentDirection( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundCurrentDirection), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundCurrentDirection), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundCurrentDirection), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.RoundCurrentDirection( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Sse41.RoundCurrentDirection( - Sse2.LoadVector128((Double*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Sse41.RoundCurrentDirection(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundCurrentDirection(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundCurrentDirection(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__RoundCurrentDirectionDouble(); - var result = Sse41.RoundCurrentDirection(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__RoundCurrentDirectionDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Sse41.RoundCurrentDirection( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.RoundCurrentDirection(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundCurrentDirection( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.RoundCurrentDirection(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.RoundCurrentDirection( - Sse2.LoadVector128((Double*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Round(firstOp[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Round(firstOp[i]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.RoundCurrentDirection)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundCurrentDirection.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundCurrentDirection.Single.cs deleted file mode 100644 index b3a07b788e4a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundCurrentDirection.Single.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundCurrentDirectionSingle() - { - var test = new SimpleUnaryOpTest__RoundCurrentDirectionSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__RoundCurrentDirectionSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__RoundCurrentDirectionSingle testClass) - { - var result = Sse41.RoundCurrentDirection(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__RoundCurrentDirectionSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundCurrentDirection( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__RoundCurrentDirectionSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__RoundCurrentDirectionSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.RoundCurrentDirection( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.RoundCurrentDirection( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.RoundCurrentDirection( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundCurrentDirection), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundCurrentDirection), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundCurrentDirection), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.RoundCurrentDirection( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Sse41.RoundCurrentDirection( - Sse.LoadVector128((Single*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Sse41.RoundCurrentDirection(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundCurrentDirection(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundCurrentDirection(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__RoundCurrentDirectionSingle(); - var result = Sse41.RoundCurrentDirection(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__RoundCurrentDirectionSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Sse41.RoundCurrentDirection( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.RoundCurrentDirection(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundCurrentDirection( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.RoundCurrentDirection(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.RoundCurrentDirection( - Sse.LoadVector128((Single*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Round(firstOp[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Round(firstOp[i]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.RoundCurrentDirection)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundCurrentDirectionScalar.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundCurrentDirectionScalar.Double.cs deleted file mode 100644 index a40bc44087f0..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundCurrentDirectionScalar.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundCurrentDirectionScalarDouble() - { - var test = new SimpleBinaryOpTest__RoundCurrentDirectionScalarDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__RoundCurrentDirectionScalarDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__RoundCurrentDirectionScalarDouble testClass) - { - var result = Sse41.RoundCurrentDirectionScalar(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__RoundCurrentDirectionScalarDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.RoundCurrentDirectionScalar( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__RoundCurrentDirectionScalarDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__RoundCurrentDirectionScalarDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.RoundCurrentDirectionScalar( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.RoundCurrentDirectionScalar( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.RoundCurrentDirectionScalar( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundCurrentDirectionScalar), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundCurrentDirectionScalar), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundCurrentDirectionScalar), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.RoundCurrentDirectionScalar( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.RoundCurrentDirectionScalar( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.RoundCurrentDirectionScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse41.RoundCurrentDirectionScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse41.RoundCurrentDirectionScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__RoundCurrentDirectionScalarDouble(); - var result = Sse41.RoundCurrentDirectionScalar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__RoundCurrentDirectionScalarDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.RoundCurrentDirectionScalar( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.RoundCurrentDirectionScalar(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.RoundCurrentDirectionScalar( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.RoundCurrentDirectionScalar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.RoundCurrentDirectionScalar( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Round(right[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(left[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.RoundCurrentDirectionScalar)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundCurrentDirectionScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundCurrentDirectionScalar.Single.cs deleted file mode 100644 index 44e32a96c12d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundCurrentDirectionScalar.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundCurrentDirectionScalarSingle() - { - var test = new SimpleBinaryOpTest__RoundCurrentDirectionScalarSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__RoundCurrentDirectionScalarSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__RoundCurrentDirectionScalarSingle testClass) - { - var result = Sse41.RoundCurrentDirectionScalar(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__RoundCurrentDirectionScalarSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.RoundCurrentDirectionScalar( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__RoundCurrentDirectionScalarSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__RoundCurrentDirectionScalarSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.RoundCurrentDirectionScalar( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.RoundCurrentDirectionScalar( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.RoundCurrentDirectionScalar( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundCurrentDirectionScalar), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundCurrentDirectionScalar), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundCurrentDirectionScalar), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.RoundCurrentDirectionScalar( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.RoundCurrentDirectionScalar( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.RoundCurrentDirectionScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse41.RoundCurrentDirectionScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse41.RoundCurrentDirectionScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__RoundCurrentDirectionScalarSingle(); - var result = Sse41.RoundCurrentDirectionScalar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__RoundCurrentDirectionScalarSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.RoundCurrentDirectionScalar( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.RoundCurrentDirectionScalar(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.RoundCurrentDirectionScalar( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.RoundCurrentDirectionScalar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.RoundCurrentDirectionScalar( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Round(right[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(left[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.RoundCurrentDirectionScalar)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNearestInteger.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNearestInteger.Double.cs deleted file mode 100644 index 6ad5061e1aa9..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNearestInteger.Double.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundToNearestIntegerDouble() - { - var test = new SimpleUnaryOpTest__RoundToNearestIntegerDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__RoundToNearestIntegerDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__RoundToNearestIntegerDouble testClass) - { - var result = Sse41.RoundToNearestInteger(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__RoundToNearestIntegerDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundToNearestInteger( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__RoundToNearestIntegerDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__RoundToNearestIntegerDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.RoundToNearestInteger( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.RoundToNearestInteger( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.RoundToNearestInteger( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNearestInteger), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNearestInteger), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNearestInteger), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.RoundToNearestInteger( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Sse41.RoundToNearestInteger( - Sse2.LoadVector128((Double*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Sse41.RoundToNearestInteger(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundToNearestInteger(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundToNearestInteger(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__RoundToNearestIntegerDouble(); - var result = Sse41.RoundToNearestInteger(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__RoundToNearestIntegerDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Sse41.RoundToNearestInteger( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.RoundToNearestInteger(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundToNearestInteger( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToNearestInteger(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToNearestInteger( - Sse2.LoadVector128((Double*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Round(firstOp[0], MidpointRounding.AwayFromZero))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Round(firstOp[i], MidpointRounding.AwayFromZero))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.RoundToNearestInteger)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNearestInteger.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNearestInteger.Single.cs deleted file mode 100644 index 2082c117bd8f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNearestInteger.Single.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundToNearestIntegerSingle() - { - var test = new SimpleUnaryOpTest__RoundToNearestIntegerSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__RoundToNearestIntegerSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__RoundToNearestIntegerSingle testClass) - { - var result = Sse41.RoundToNearestInteger(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__RoundToNearestIntegerSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundToNearestInteger( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__RoundToNearestIntegerSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__RoundToNearestIntegerSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.RoundToNearestInteger( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.RoundToNearestInteger( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.RoundToNearestInteger( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNearestInteger), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNearestInteger), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNearestInteger), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.RoundToNearestInteger( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Sse41.RoundToNearestInteger( - Sse.LoadVector128((Single*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Sse41.RoundToNearestInteger(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundToNearestInteger(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundToNearestInteger(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__RoundToNearestIntegerSingle(); - var result = Sse41.RoundToNearestInteger(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__RoundToNearestIntegerSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Sse41.RoundToNearestInteger( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.RoundToNearestInteger(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundToNearestInteger( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToNearestInteger(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToNearestInteger( - Sse.LoadVector128((Single*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Round(firstOp[0], MidpointRounding.AwayFromZero))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Round(firstOp[i], MidpointRounding.AwayFromZero))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.RoundToNearestInteger)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNearestIntegerScalar.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNearestIntegerScalar.Double.cs deleted file mode 100644 index c8a8cd9b14b4..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNearestIntegerScalar.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundToNearestIntegerScalarDouble() - { - var test = new SimpleBinaryOpTest__RoundToNearestIntegerScalarDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__RoundToNearestIntegerScalarDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__RoundToNearestIntegerScalarDouble testClass) - { - var result = Sse41.RoundToNearestIntegerScalar(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__RoundToNearestIntegerScalarDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.RoundToNearestIntegerScalar( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__RoundToNearestIntegerScalarDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__RoundToNearestIntegerScalarDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.RoundToNearestIntegerScalar( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.RoundToNearestIntegerScalar( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.RoundToNearestIntegerScalar( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNearestIntegerScalar), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNearestIntegerScalar), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNearestIntegerScalar), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.RoundToNearestIntegerScalar( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.RoundToNearestIntegerScalar( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.RoundToNearestIntegerScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse41.RoundToNearestIntegerScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse41.RoundToNearestIntegerScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__RoundToNearestIntegerScalarDouble(); - var result = Sse41.RoundToNearestIntegerScalar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__RoundToNearestIntegerScalarDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.RoundToNearestIntegerScalar( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.RoundToNearestIntegerScalar(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.RoundToNearestIntegerScalar( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToNearestIntegerScalar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToNearestIntegerScalar( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Round(right[0], MidpointRounding.AwayFromZero))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(left[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.RoundToNearestIntegerScalar)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNearestIntegerScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNearestIntegerScalar.Single.cs deleted file mode 100644 index 8004c14bec7f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNearestIntegerScalar.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundToNearestIntegerScalarSingle() - { - var test = new SimpleBinaryOpTest__RoundToNearestIntegerScalarSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__RoundToNearestIntegerScalarSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__RoundToNearestIntegerScalarSingle testClass) - { - var result = Sse41.RoundToNearestIntegerScalar(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__RoundToNearestIntegerScalarSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.RoundToNearestIntegerScalar( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__RoundToNearestIntegerScalarSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__RoundToNearestIntegerScalarSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.RoundToNearestIntegerScalar( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.RoundToNearestIntegerScalar( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.RoundToNearestIntegerScalar( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNearestIntegerScalar), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNearestIntegerScalar), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNearestIntegerScalar), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.RoundToNearestIntegerScalar( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.RoundToNearestIntegerScalar( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.RoundToNearestIntegerScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse41.RoundToNearestIntegerScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse41.RoundToNearestIntegerScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__RoundToNearestIntegerScalarSingle(); - var result = Sse41.RoundToNearestIntegerScalar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__RoundToNearestIntegerScalarSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.RoundToNearestIntegerScalar( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.RoundToNearestIntegerScalar(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.RoundToNearestIntegerScalar( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToNearestIntegerScalar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToNearestIntegerScalar( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Round(right[0], MidpointRounding.AwayFromZero))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(left[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.RoundToNearestIntegerScalar)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNegativeInfinity.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNegativeInfinity.Double.cs deleted file mode 100644 index b08cc3d4d04f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNegativeInfinity.Double.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundToNegativeInfinityDouble() - { - var test = new SimpleUnaryOpTest__RoundToNegativeInfinityDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__RoundToNegativeInfinityDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__RoundToNegativeInfinityDouble testClass) - { - var result = Sse41.RoundToNegativeInfinity(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__RoundToNegativeInfinityDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundToNegativeInfinity( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__RoundToNegativeInfinityDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__RoundToNegativeInfinityDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.RoundToNegativeInfinity( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.RoundToNegativeInfinity( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.RoundToNegativeInfinity( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNegativeInfinity), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNegativeInfinity), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNegativeInfinity), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.RoundToNegativeInfinity( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Sse41.RoundToNegativeInfinity( - Sse2.LoadVector128((Double*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Sse41.RoundToNegativeInfinity(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundToNegativeInfinity(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundToNegativeInfinity(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__RoundToNegativeInfinityDouble(); - var result = Sse41.RoundToNegativeInfinity(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__RoundToNegativeInfinityDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Sse41.RoundToNegativeInfinity( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.RoundToNegativeInfinity(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundToNegativeInfinity( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToNegativeInfinity(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToNegativeInfinity( - Sse2.LoadVector128((Double*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Floor(firstOp[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Floor(firstOp[i]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.RoundToNegativeInfinity)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNegativeInfinity.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNegativeInfinity.Single.cs deleted file mode 100644 index 4784eaaa66fb..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNegativeInfinity.Single.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundToNegativeInfinitySingle() - { - var test = new SimpleUnaryOpTest__RoundToNegativeInfinitySingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__RoundToNegativeInfinitySingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__RoundToNegativeInfinitySingle testClass) - { - var result = Sse41.RoundToNegativeInfinity(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__RoundToNegativeInfinitySingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundToNegativeInfinity( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__RoundToNegativeInfinitySingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__RoundToNegativeInfinitySingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.RoundToNegativeInfinity( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.RoundToNegativeInfinity( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.RoundToNegativeInfinity( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNegativeInfinity), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNegativeInfinity), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNegativeInfinity), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.RoundToNegativeInfinity( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Sse41.RoundToNegativeInfinity( - Sse.LoadVector128((Single*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Sse41.RoundToNegativeInfinity(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundToNegativeInfinity(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundToNegativeInfinity(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__RoundToNegativeInfinitySingle(); - var result = Sse41.RoundToNegativeInfinity(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__RoundToNegativeInfinitySingle(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Sse41.RoundToNegativeInfinity( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.RoundToNegativeInfinity(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundToNegativeInfinity( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToNegativeInfinity(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToNegativeInfinity( - Sse.LoadVector128((Single*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Floor(firstOp[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Floor(firstOp[i]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.RoundToNegativeInfinity)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNegativeInfinityScalar.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNegativeInfinityScalar.Double.cs deleted file mode 100644 index 28b2340c25c6..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNegativeInfinityScalar.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundToNegativeInfinityScalarDouble() - { - var test = new SimpleBinaryOpTest__RoundToNegativeInfinityScalarDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__RoundToNegativeInfinityScalarDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__RoundToNegativeInfinityScalarDouble testClass) - { - var result = Sse41.RoundToNegativeInfinityScalar(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__RoundToNegativeInfinityScalarDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.RoundToNegativeInfinityScalar( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__RoundToNegativeInfinityScalarDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__RoundToNegativeInfinityScalarDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.RoundToNegativeInfinityScalar( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.RoundToNegativeInfinityScalar( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.RoundToNegativeInfinityScalar( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNegativeInfinityScalar), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNegativeInfinityScalar), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNegativeInfinityScalar), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.RoundToNegativeInfinityScalar( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.RoundToNegativeInfinityScalar( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.RoundToNegativeInfinityScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse41.RoundToNegativeInfinityScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse41.RoundToNegativeInfinityScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__RoundToNegativeInfinityScalarDouble(); - var result = Sse41.RoundToNegativeInfinityScalar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__RoundToNegativeInfinityScalarDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.RoundToNegativeInfinityScalar( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.RoundToNegativeInfinityScalar(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.RoundToNegativeInfinityScalar( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToNegativeInfinityScalar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToNegativeInfinityScalar( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Floor(right[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(left[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.RoundToNegativeInfinityScalar)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNegativeInfinityScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNegativeInfinityScalar.Single.cs deleted file mode 100644 index 0c9b3e6a390c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNegativeInfinityScalar.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundToNegativeInfinityScalarSingle() - { - var test = new SimpleBinaryOpTest__RoundToNegativeInfinityScalarSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__RoundToNegativeInfinityScalarSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__RoundToNegativeInfinityScalarSingle testClass) - { - var result = Sse41.RoundToNegativeInfinityScalar(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__RoundToNegativeInfinityScalarSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.RoundToNegativeInfinityScalar( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__RoundToNegativeInfinityScalarSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__RoundToNegativeInfinityScalarSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.RoundToNegativeInfinityScalar( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.RoundToNegativeInfinityScalar( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.RoundToNegativeInfinityScalar( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNegativeInfinityScalar), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNegativeInfinityScalar), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNegativeInfinityScalar), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.RoundToNegativeInfinityScalar( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.RoundToNegativeInfinityScalar( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.RoundToNegativeInfinityScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse41.RoundToNegativeInfinityScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse41.RoundToNegativeInfinityScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__RoundToNegativeInfinityScalarSingle(); - var result = Sse41.RoundToNegativeInfinityScalar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__RoundToNegativeInfinityScalarSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.RoundToNegativeInfinityScalar( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.RoundToNegativeInfinityScalar(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.RoundToNegativeInfinityScalar( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToNegativeInfinityScalar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToNegativeInfinityScalar( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Floor(right[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(left[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.RoundToNegativeInfinityScalar)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToPositiveInfinity.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToPositiveInfinity.Double.cs deleted file mode 100644 index 922f84bd6ee1..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToPositiveInfinity.Double.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundToPositiveInfinityDouble() - { - var test = new SimpleUnaryOpTest__RoundToPositiveInfinityDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__RoundToPositiveInfinityDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__RoundToPositiveInfinityDouble testClass) - { - var result = Sse41.RoundToPositiveInfinity(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__RoundToPositiveInfinityDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundToPositiveInfinity( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__RoundToPositiveInfinityDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__RoundToPositiveInfinityDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.RoundToPositiveInfinity( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.RoundToPositiveInfinity( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.RoundToPositiveInfinity( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToPositiveInfinity), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToPositiveInfinity), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToPositiveInfinity), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.RoundToPositiveInfinity( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Sse41.RoundToPositiveInfinity( - Sse2.LoadVector128((Double*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Sse41.RoundToPositiveInfinity(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundToPositiveInfinity(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundToPositiveInfinity(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__RoundToPositiveInfinityDouble(); - var result = Sse41.RoundToPositiveInfinity(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__RoundToPositiveInfinityDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Sse41.RoundToPositiveInfinity( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.RoundToPositiveInfinity(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundToPositiveInfinity( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToPositiveInfinity(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToPositiveInfinity( - Sse2.LoadVector128((Double*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Ceiling(firstOp[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Ceiling(firstOp[i]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.RoundToPositiveInfinity)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToPositiveInfinity.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToPositiveInfinity.Single.cs deleted file mode 100644 index 5d977308c888..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToPositiveInfinity.Single.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundToPositiveInfinitySingle() - { - var test = new SimpleUnaryOpTest__RoundToPositiveInfinitySingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__RoundToPositiveInfinitySingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__RoundToPositiveInfinitySingle testClass) - { - var result = Sse41.RoundToPositiveInfinity(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__RoundToPositiveInfinitySingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundToPositiveInfinity( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__RoundToPositiveInfinitySingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__RoundToPositiveInfinitySingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.RoundToPositiveInfinity( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.RoundToPositiveInfinity( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.RoundToPositiveInfinity( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToPositiveInfinity), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToPositiveInfinity), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToPositiveInfinity), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.RoundToPositiveInfinity( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Sse41.RoundToPositiveInfinity( - Sse.LoadVector128((Single*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Sse41.RoundToPositiveInfinity(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundToPositiveInfinity(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundToPositiveInfinity(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__RoundToPositiveInfinitySingle(); - var result = Sse41.RoundToPositiveInfinity(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__RoundToPositiveInfinitySingle(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Sse41.RoundToPositiveInfinity( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.RoundToPositiveInfinity(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundToPositiveInfinity( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToPositiveInfinity(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToPositiveInfinity( - Sse.LoadVector128((Single*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Ceiling(firstOp[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Ceiling(firstOp[i]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.RoundToPositiveInfinity)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToPositiveInfinityScalar.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToPositiveInfinityScalar.Double.cs deleted file mode 100644 index 64e945631a4c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToPositiveInfinityScalar.Double.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundToPositiveInfinityScalarDouble() - { - var test = new SimpleBinaryOpTest__RoundToPositiveInfinityScalarDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__RoundToPositiveInfinityScalarDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] inArray2, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__RoundToPositiveInfinityScalarDouble testClass) - { - var result = Sse41.RoundToPositiveInfinityScalar(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__RoundToPositiveInfinityScalarDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.RoundToPositiveInfinityScalar( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - private static Double[] _data2 = new Double[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__RoundToPositiveInfinityScalarDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__RoundToPositiveInfinityScalarDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, _data2, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.RoundToPositiveInfinityScalar( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.RoundToPositiveInfinityScalar( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.RoundToPositiveInfinityScalar( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToPositiveInfinityScalar), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToPositiveInfinityScalar), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToPositiveInfinityScalar), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.RoundToPositiveInfinityScalar( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.RoundToPositiveInfinityScalar( - Sse2.LoadVector128((Double*)(pClsVar1)), - Sse2.LoadVector128((Double*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.RoundToPositiveInfinityScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse41.RoundToPositiveInfinityScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray2Ptr)); - var result = Sse41.RoundToPositiveInfinityScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__RoundToPositiveInfinityScalarDouble(); - var result = Sse41.RoundToPositiveInfinityScalar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__RoundToPositiveInfinityScalarDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.RoundToPositiveInfinityScalar( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.RoundToPositiveInfinityScalar(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.RoundToPositiveInfinityScalar( - Sse2.LoadVector128((Double*)(pFld1)), - Sse2.LoadVector128((Double*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToPositiveInfinityScalar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToPositiveInfinityScalar( - Sse2.LoadVector128((Double*)(&test._fld1)), - Sse2.LoadVector128((Double*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] inArray2 = new Double[Op2ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Double[] left, Double[] right, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Ceiling(right[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(left[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.RoundToPositiveInfinityScalar)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToPositiveInfinityScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToPositiveInfinityScalar.Single.cs deleted file mode 100644 index c7d74a2ccb7d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToPositiveInfinityScalar.Single.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundToPositiveInfinityScalarSingle() - { - var test = new SimpleBinaryOpTest__RoundToPositiveInfinityScalarSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__RoundToPositiveInfinityScalarSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] inArray2, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__RoundToPositiveInfinityScalarSingle testClass) - { - var result = Sse41.RoundToPositiveInfinityScalar(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__RoundToPositiveInfinityScalarSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.RoundToPositiveInfinityScalar( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - private static Single[] _data2 = new Single[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__RoundToPositiveInfinityScalarSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__RoundToPositiveInfinityScalarSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, _data2, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.RoundToPositiveInfinityScalar( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.RoundToPositiveInfinityScalar( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.RoundToPositiveInfinityScalar( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToPositiveInfinityScalar), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToPositiveInfinityScalar), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToPositiveInfinityScalar), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)), - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.RoundToPositiveInfinityScalar( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.RoundToPositiveInfinityScalar( - Sse.LoadVector128((Single*)(pClsVar1)), - Sse.LoadVector128((Single*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.RoundToPositiveInfinityScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse41.RoundToPositiveInfinityScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)); - var result = Sse41.RoundToPositiveInfinityScalar(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__RoundToPositiveInfinityScalarSingle(); - var result = Sse41.RoundToPositiveInfinityScalar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__RoundToPositiveInfinityScalarSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.RoundToPositiveInfinityScalar( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.RoundToPositiveInfinityScalar(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.RoundToPositiveInfinityScalar( - Sse.LoadVector128((Single*)(pFld1)), - Sse.LoadVector128((Single*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToPositiveInfinityScalar(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToPositiveInfinityScalar( - Sse.LoadVector128((Single*)(&test._fld1)), - Sse.LoadVector128((Single*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] inArray2 = new Single[Op2ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Single[] left, Single[] right, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Ceiling(right[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(left[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.RoundToPositiveInfinityScalar)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToZero.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToZero.Double.cs deleted file mode 100644 index 8e5f7c13c96b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToZero.Double.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundToZeroDouble() - { - var test = new SimpleUnaryOpTest__RoundToZeroDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__RoundToZeroDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__RoundToZeroDouble testClass) - { - var result = Sse41.RoundToZero(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__RoundToZeroDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundToZero( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__RoundToZeroDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__RoundToZeroDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.RoundToZero( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.RoundToZero( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.RoundToZero( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToZero), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToZero), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToZero), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.RoundToZero( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Sse41.RoundToZero( - Sse2.LoadVector128((Double*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Sse41.RoundToZero(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundToZero(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundToZero(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__RoundToZeroDouble(); - var result = Sse41.RoundToZero(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__RoundToZeroDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Sse41.RoundToZero( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.RoundToZero(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundToZero( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToZero(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToZero( - Sse2.LoadVector128((Double*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits((firstOp[0] > 0) ? Math.Floor(firstOp[0]) : Math.Ceiling(firstOp[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits((firstOp[i] > 0) ? Math.Floor(firstOp[i]) : Math.Ceiling(firstOp[i]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.RoundToZero)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToZero.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToZero.Single.cs deleted file mode 100644 index 60fd438bb192..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToZero.Single.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundToZeroSingle() - { - var test = new SimpleUnaryOpTest__RoundToZeroSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__RoundToZeroSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__RoundToZeroSingle testClass) - { - var result = Sse41.RoundToZero(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__RoundToZeroSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundToZero( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__RoundToZeroSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__RoundToZeroSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.RoundToZero( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.RoundToZero( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.RoundToZero( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToZero), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToZero), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToZero), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.RoundToZero( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Sse41.RoundToZero( - Sse.LoadVector128((Single*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Sse41.RoundToZero(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundToZero(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundToZero(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__RoundToZeroSingle(); - var result = Sse41.RoundToZero(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__RoundToZeroSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Sse41.RoundToZero( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.RoundToZero(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundToZero( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToZero(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToZero( - Sse.LoadVector128((Single*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits((firstOp[0] > 0) ? MathF.Floor(firstOp[0]) : MathF.Ceiling(firstOp[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits((firstOp[i] > 0) ? MathF.Floor(firstOp[i]) : MathF.Ceiling(firstOp[i]))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.RoundToZero)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.Byte.cs deleted file mode 100644 index fd7a963aaac3..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.Byte.cs +++ /dev/null @@ -1,545 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestCByte() - { - var test = new BooleanBinaryOpTest__TestCByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestCByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestCByte testClass) - { - var result = Sse41.TestC(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestCByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestC( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestCByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestCByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.TestC( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.TestC( - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.TestC( - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.TestC( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.TestC( - Sse2.LoadVector128((Byte*)(pClsVar1)), - Sse2.LoadVector128((Byte*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestCByte(); - var result = Sse41.TestC(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestCByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.TestC( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.TestC(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestC( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.TestC(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.TestC( - Sse2.LoadVector128((Byte*)(&test._fld1)), - Sse2.LoadVector128((Byte*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult &= ((~left[i] & right[i]) == 0); - } - - succeeded = (expectedResult == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.TestC)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.Int16.cs deleted file mode 100644 index 72fab4c734e8..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.Int16.cs +++ /dev/null @@ -1,545 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestCInt16() - { - var test = new BooleanBinaryOpTest__TestCInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestCInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestCInt16 testClass) - { - var result = Sse41.TestC(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestCInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestC( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestCInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestCInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.TestC( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.TestC( - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.TestC( - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.TestC( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.TestC( - Sse2.LoadVector128((Int16*)(pClsVar1)), - Sse2.LoadVector128((Int16*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestCInt16(); - var result = Sse41.TestC(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestCInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.TestC( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.TestC(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestC( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.TestC(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.TestC( - Sse2.LoadVector128((Int16*)(&test._fld1)), - Sse2.LoadVector128((Int16*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult &= ((~left[i] & right[i]) == 0); - } - - succeeded = (expectedResult == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.TestC)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.Int32.cs deleted file mode 100644 index 25fcda387488..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.Int32.cs +++ /dev/null @@ -1,545 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestCInt32() - { - var test = new BooleanBinaryOpTest__TestCInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestCInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestCInt32 testClass) - { - var result = Sse41.TestC(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestCInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestC( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestCInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestCInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.TestC( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.TestC( - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.TestC( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.TestC( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.TestC( - Sse2.LoadVector128((Int32*)(pClsVar1)), - Sse2.LoadVector128((Int32*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestCInt32(); - var result = Sse41.TestC(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestCInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.TestC( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.TestC(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestC( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.TestC(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.TestC( - Sse2.LoadVector128((Int32*)(&test._fld1)), - Sse2.LoadVector128((Int32*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult &= ((~left[i] & right[i]) == 0); - } - - succeeded = (expectedResult == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.TestC)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.Int64.cs deleted file mode 100644 index f7815f5bff60..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.Int64.cs +++ /dev/null @@ -1,545 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestCInt64() - { - var test = new BooleanBinaryOpTest__TestCInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestCInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Int64[] inArray1, Int64[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestCInt64 testClass) - { - var result = Sse41.TestC(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestCInt64 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestC( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestCInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestCInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.TestC( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.TestC( - Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.TestC( - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.TestC( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.TestC( - Sse2.LoadVector128((Int64*)(pClsVar1)), - Sse2.LoadVector128((Int64*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestCInt64(); - var result = Sse41.TestC(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestCInt64(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.TestC( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.TestC(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestC( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.TestC(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.TestC( - Sse2.LoadVector128((Int64*)(&test._fld1)), - Sse2.LoadVector128((Int64*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult &= ((~left[i] & right[i]) == 0); - } - - succeeded = (expectedResult == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.TestC)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.SByte.cs deleted file mode 100644 index 7a41ed3ed1d9..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.SByte.cs +++ /dev/null @@ -1,545 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestCSByte() - { - var test = new BooleanBinaryOpTest__TestCSByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestCSByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestCSByte testClass) - { - var result = Sse41.TestC(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestCSByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestC( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestCSByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestCSByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.TestC( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.TestC( - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.TestC( - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.TestC( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.TestC( - Sse2.LoadVector128((SByte*)(pClsVar1)), - Sse2.LoadVector128((SByte*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestCSByte(); - var result = Sse41.TestC(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestCSByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.TestC( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.TestC(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestC( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.TestC(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.TestC( - Sse2.LoadVector128((SByte*)(&test._fld1)), - Sse2.LoadVector128((SByte*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult &= ((~left[i] & right[i]) == 0); - } - - succeeded = (expectedResult == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.TestC)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.UInt16.cs deleted file mode 100644 index 038a90437473..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.UInt16.cs +++ /dev/null @@ -1,545 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestCUInt16() - { - var test = new BooleanBinaryOpTest__TestCUInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestCUInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestCUInt16 testClass) - { - var result = Sse41.TestC(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestCUInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestC( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestCUInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestCUInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.TestC( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.TestC( - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.TestC( - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.TestC( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.TestC( - Sse2.LoadVector128((UInt16*)(pClsVar1)), - Sse2.LoadVector128((UInt16*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestCUInt16(); - var result = Sse41.TestC(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestCUInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.TestC( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.TestC(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestC( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.TestC(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.TestC( - Sse2.LoadVector128((UInt16*)(&test._fld1)), - Sse2.LoadVector128((UInt16*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult &= ((~left[i] & right[i]) == 0); - } - - succeeded = (expectedResult == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.TestC)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.UInt32.cs deleted file mode 100644 index caa0243708d0..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.UInt32.cs +++ /dev/null @@ -1,545 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestCUInt32() - { - var test = new BooleanBinaryOpTest__TestCUInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestCUInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestCUInt32 testClass) - { - var result = Sse41.TestC(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestCUInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestC( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestCUInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestCUInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.TestC( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.TestC( - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.TestC( - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.TestC( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.TestC( - Sse2.LoadVector128((UInt32*)(pClsVar1)), - Sse2.LoadVector128((UInt32*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestCUInt32(); - var result = Sse41.TestC(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestCUInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.TestC( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.TestC(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestC( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.TestC(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.TestC( - Sse2.LoadVector128((UInt32*)(&test._fld1)), - Sse2.LoadVector128((UInt32*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult &= ((~left[i] & right[i]) == 0); - } - - succeeded = (expectedResult == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.TestC)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.UInt64.cs deleted file mode 100644 index 4384cac8816b..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.UInt64.cs +++ /dev/null @@ -1,545 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestCUInt64() - { - var test = new BooleanBinaryOpTest__TestCUInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestCUInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(UInt64[] inArray1, UInt64[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestCUInt64 testClass) - { - var result = Sse41.TestC(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestCUInt64 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestC( - Sse2.LoadVector128((UInt64*)(pFld1)), - Sse2.LoadVector128((UInt64*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestCUInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestCUInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.TestC( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.TestC( - Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.TestC( - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.TestC( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.TestC( - Sse2.LoadVector128((UInt64*)(pClsVar1)), - Sse2.LoadVector128((UInt64*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestCUInt64(); - var result = Sse41.TestC(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestCUInt64(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.TestC( - Sse2.LoadVector128((UInt64*)(pFld1)), - Sse2.LoadVector128((UInt64*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.TestC(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestC( - Sse2.LoadVector128((UInt64*)(pFld1)), - Sse2.LoadVector128((UInt64*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.TestC(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.TestC( - Sse2.LoadVector128((UInt64*)(&test._fld1)), - Sse2.LoadVector128((UInt64*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(UInt64[] left, UInt64[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult &= ((~left[i] & right[i]) == 0); - } - - succeeded = (expectedResult == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.TestC)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.Byte.cs deleted file mode 100644 index f842ef98e9a1..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.Byte.cs +++ /dev/null @@ -1,552 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestNotZAndNotCByte() - { - var test = new BooleanBinaryOpTest__TestNotZAndNotCByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestNotZAndNotCByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestNotZAndNotCByte testClass) - { - var result = Sse41.TestNotZAndNotC(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestNotZAndNotCByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestNotZAndNotCByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestNotZAndNotCByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.TestNotZAndNotC( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.TestNotZAndNotC( - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestNotZAndNotC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestNotZAndNotC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestNotZAndNotC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.TestNotZAndNotC( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((Byte*)(pClsVar1)), - Sse2.LoadVector128((Byte*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestNotZAndNotCByte(); - var result = Sse41.TestNotZAndNotC(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestNotZAndNotCByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.TestNotZAndNotC(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.TestNotZAndNotC(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((Byte*)(&test._fld1)), - Sse2.LoadVector128((Byte*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult1 = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult1 &= (((left[i] & right[i]) == 0)); - } - - var expectedResult2 = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult2 &= (((~left[i] & right[i]) == 0)); - } - - succeeded = (((expectedResult1 == false) && (expectedResult2 == false)) == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.TestNotZAndNotC)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.Int16.cs deleted file mode 100644 index 9ff933346b54..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.Int16.cs +++ /dev/null @@ -1,552 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestNotZAndNotCInt16() - { - var test = new BooleanBinaryOpTest__TestNotZAndNotCInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestNotZAndNotCInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestNotZAndNotCInt16 testClass) - { - var result = Sse41.TestNotZAndNotC(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestNotZAndNotCInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestNotZAndNotCInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestNotZAndNotCInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.TestNotZAndNotC( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.TestNotZAndNotC( - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestNotZAndNotC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestNotZAndNotC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestNotZAndNotC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.TestNotZAndNotC( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((Int16*)(pClsVar1)), - Sse2.LoadVector128((Int16*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestNotZAndNotCInt16(); - var result = Sse41.TestNotZAndNotC(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestNotZAndNotCInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.TestNotZAndNotC(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.TestNotZAndNotC(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((Int16*)(&test._fld1)), - Sse2.LoadVector128((Int16*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult1 = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult1 &= (((left[i] & right[i]) == 0)); - } - - var expectedResult2 = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult2 &= (((~left[i] & right[i]) == 0)); - } - - succeeded = (((expectedResult1 == false) && (expectedResult2 == false)) == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.TestNotZAndNotC)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.Int32.cs deleted file mode 100644 index 3398f01bc50a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.Int32.cs +++ /dev/null @@ -1,552 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestNotZAndNotCInt32() - { - var test = new BooleanBinaryOpTest__TestNotZAndNotCInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestNotZAndNotCInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestNotZAndNotCInt32 testClass) - { - var result = Sse41.TestNotZAndNotC(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestNotZAndNotCInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestNotZAndNotCInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestNotZAndNotCInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.TestNotZAndNotC( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.TestNotZAndNotC( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestNotZAndNotC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestNotZAndNotC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestNotZAndNotC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.TestNotZAndNotC( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((Int32*)(pClsVar1)), - Sse2.LoadVector128((Int32*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestNotZAndNotCInt32(); - var result = Sse41.TestNotZAndNotC(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestNotZAndNotCInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.TestNotZAndNotC(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.TestNotZAndNotC(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((Int32*)(&test._fld1)), - Sse2.LoadVector128((Int32*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult1 = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult1 &= (((left[i] & right[i]) == 0)); - } - - var expectedResult2 = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult2 &= (((~left[i] & right[i]) == 0)); - } - - succeeded = (((expectedResult1 == false) && (expectedResult2 == false)) == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.TestNotZAndNotC)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.Int64.cs deleted file mode 100644 index 20d232429309..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.Int64.cs +++ /dev/null @@ -1,552 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestNotZAndNotCInt64() - { - var test = new BooleanBinaryOpTest__TestNotZAndNotCInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestNotZAndNotCInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Int64[] inArray1, Int64[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestNotZAndNotCInt64 testClass) - { - var result = Sse41.TestNotZAndNotC(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestNotZAndNotCInt64 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestNotZAndNotCInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestNotZAndNotCInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.TestNotZAndNotC( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.TestNotZAndNotC( - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestNotZAndNotC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestNotZAndNotC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestNotZAndNotC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.TestNotZAndNotC( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((Int64*)(pClsVar1)), - Sse2.LoadVector128((Int64*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestNotZAndNotCInt64(); - var result = Sse41.TestNotZAndNotC(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestNotZAndNotCInt64(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.TestNotZAndNotC(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.TestNotZAndNotC(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((Int64*)(&test._fld1)), - Sse2.LoadVector128((Int64*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult1 = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult1 &= (((left[i] & right[i]) == 0)); - } - - var expectedResult2 = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult2 &= (((~left[i] & right[i]) == 0)); - } - - succeeded = (((expectedResult1 == false) && (expectedResult2 == false)) == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.TestNotZAndNotC)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.SByte.cs deleted file mode 100644 index b2c60500528e..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.SByte.cs +++ /dev/null @@ -1,552 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestNotZAndNotCSByte() - { - var test = new BooleanBinaryOpTest__TestNotZAndNotCSByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestNotZAndNotCSByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestNotZAndNotCSByte testClass) - { - var result = Sse41.TestNotZAndNotC(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestNotZAndNotCSByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestNotZAndNotCSByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestNotZAndNotCSByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.TestNotZAndNotC( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.TestNotZAndNotC( - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestNotZAndNotC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestNotZAndNotC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestNotZAndNotC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.TestNotZAndNotC( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((SByte*)(pClsVar1)), - Sse2.LoadVector128((SByte*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestNotZAndNotCSByte(); - var result = Sse41.TestNotZAndNotC(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestNotZAndNotCSByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.TestNotZAndNotC(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.TestNotZAndNotC(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((SByte*)(&test._fld1)), - Sse2.LoadVector128((SByte*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult1 = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult1 &= (((left[i] & right[i]) == 0)); - } - - var expectedResult2 = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult2 &= (((~left[i] & right[i]) == 0)); - } - - succeeded = (((expectedResult1 == false) && (expectedResult2 == false)) == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.TestNotZAndNotC)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.UInt16.cs deleted file mode 100644 index a7dcd0a0e866..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.UInt16.cs +++ /dev/null @@ -1,552 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestNotZAndNotCUInt16() - { - var test = new BooleanBinaryOpTest__TestNotZAndNotCUInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestNotZAndNotCUInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestNotZAndNotCUInt16 testClass) - { - var result = Sse41.TestNotZAndNotC(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestNotZAndNotCUInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestNotZAndNotCUInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestNotZAndNotCUInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.TestNotZAndNotC( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.TestNotZAndNotC( - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestNotZAndNotC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestNotZAndNotC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestNotZAndNotC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.TestNotZAndNotC( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((UInt16*)(pClsVar1)), - Sse2.LoadVector128((UInt16*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestNotZAndNotCUInt16(); - var result = Sse41.TestNotZAndNotC(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestNotZAndNotCUInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.TestNotZAndNotC(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.TestNotZAndNotC(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((UInt16*)(&test._fld1)), - Sse2.LoadVector128((UInt16*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult1 = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult1 &= (((left[i] & right[i]) == 0)); - } - - var expectedResult2 = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult2 &= (((~left[i] & right[i]) == 0)); - } - - succeeded = (((expectedResult1 == false) && (expectedResult2 == false)) == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.TestNotZAndNotC)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.UInt32.cs deleted file mode 100644 index 6cef890511fd..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.UInt32.cs +++ /dev/null @@ -1,552 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestNotZAndNotCUInt32() - { - var test = new BooleanBinaryOpTest__TestNotZAndNotCUInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestNotZAndNotCUInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestNotZAndNotCUInt32 testClass) - { - var result = Sse41.TestNotZAndNotC(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestNotZAndNotCUInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestNotZAndNotCUInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestNotZAndNotCUInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.TestNotZAndNotC( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.TestNotZAndNotC( - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestNotZAndNotC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestNotZAndNotC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestNotZAndNotC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.TestNotZAndNotC( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((UInt32*)(pClsVar1)), - Sse2.LoadVector128((UInt32*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestNotZAndNotCUInt32(); - var result = Sse41.TestNotZAndNotC(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestNotZAndNotCUInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.TestNotZAndNotC(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.TestNotZAndNotC(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((UInt32*)(&test._fld1)), - Sse2.LoadVector128((UInt32*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult1 = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult1 &= (((left[i] & right[i]) == 0)); - } - - var expectedResult2 = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult2 &= (((~left[i] & right[i]) == 0)); - } - - succeeded = (((expectedResult1 == false) && (expectedResult2 == false)) == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.TestNotZAndNotC)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.UInt64.cs deleted file mode 100644 index 069a10adac35..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.UInt64.cs +++ /dev/null @@ -1,552 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestNotZAndNotCUInt64() - { - var test = new BooleanBinaryOpTest__TestNotZAndNotCUInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestNotZAndNotCUInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(UInt64[] inArray1, UInt64[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestNotZAndNotCUInt64 testClass) - { - var result = Sse41.TestNotZAndNotC(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestNotZAndNotCUInt64 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((UInt64*)(pFld1)), - Sse2.LoadVector128((UInt64*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestNotZAndNotCUInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestNotZAndNotCUInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.TestNotZAndNotC( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.TestNotZAndNotC( - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestNotZAndNotC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestNotZAndNotC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestNotZAndNotC), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.TestNotZAndNotC( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((UInt64*)(pClsVar1)), - Sse2.LoadVector128((UInt64*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestNotZAndNotC(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestNotZAndNotCUInt64(); - var result = Sse41.TestNotZAndNotC(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestNotZAndNotCUInt64(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((UInt64*)(pFld1)), - Sse2.LoadVector128((UInt64*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.TestNotZAndNotC(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((UInt64*)(pFld1)), - Sse2.LoadVector128((UInt64*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.TestNotZAndNotC(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.TestNotZAndNotC( - Sse2.LoadVector128((UInt64*)(&test._fld1)), - Sse2.LoadVector128((UInt64*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(UInt64[] left, UInt64[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult1 = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult1 &= (((left[i] & right[i]) == 0)); - } - - var expectedResult2 = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult2 &= (((~left[i] & right[i]) == 0)); - } - - succeeded = (((expectedResult1 == false) && (expectedResult2 == false)) == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.TestNotZAndNotC)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.Byte.cs deleted file mode 100644 index 7e5e3de61f19..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.Byte.cs +++ /dev/null @@ -1,545 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestZByte() - { - var test = new BooleanBinaryOpTest__TestZByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestZByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestZByte testClass) - { - var result = Sse41.TestZ(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestZByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestZ( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestZByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestZByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.TestZ( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.TestZ( - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.TestZ( - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestZ), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestZ), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestZ), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.TestZ( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.TestZ( - Sse2.LoadVector128((Byte*)(pClsVar1)), - Sse2.LoadVector128((Byte*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestZByte(); - var result = Sse41.TestZ(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestZByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.TestZ( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.TestZ(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestZ( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.TestZ(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.TestZ( - Sse2.LoadVector128((Byte*)(&test._fld1)), - Sse2.LoadVector128((Byte*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult &= ((left[i] & right[i]) == 0); - } - - succeeded = (expectedResult == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.TestZ)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.Int16.cs deleted file mode 100644 index ffc8b7d380f1..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.Int16.cs +++ /dev/null @@ -1,545 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestZInt16() - { - var test = new BooleanBinaryOpTest__TestZInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestZInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestZInt16 testClass) - { - var result = Sse41.TestZ(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestZInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestZ( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestZInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestZInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.TestZ( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.TestZ( - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.TestZ( - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestZ), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestZ), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestZ), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.TestZ( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.TestZ( - Sse2.LoadVector128((Int16*)(pClsVar1)), - Sse2.LoadVector128((Int16*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestZInt16(); - var result = Sse41.TestZ(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestZInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.TestZ( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.TestZ(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestZ( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.TestZ(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.TestZ( - Sse2.LoadVector128((Int16*)(&test._fld1)), - Sse2.LoadVector128((Int16*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult &= ((left[i] & right[i]) == 0); - } - - succeeded = (expectedResult == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.TestZ)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.Int32.cs deleted file mode 100644 index f27ede814484..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.Int32.cs +++ /dev/null @@ -1,545 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestZInt32() - { - var test = new BooleanBinaryOpTest__TestZInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestZInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestZInt32 testClass) - { - var result = Sse41.TestZ(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestZInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestZ( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestZInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestZInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.TestZ( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.TestZ( - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.TestZ( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestZ), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestZ), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestZ), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.TestZ( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.TestZ( - Sse2.LoadVector128((Int32*)(pClsVar1)), - Sse2.LoadVector128((Int32*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestZInt32(); - var result = Sse41.TestZ(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestZInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.TestZ( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.TestZ(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestZ( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.TestZ(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.TestZ( - Sse2.LoadVector128((Int32*)(&test._fld1)), - Sse2.LoadVector128((Int32*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult &= ((left[i] & right[i]) == 0); - } - - succeeded = (expectedResult == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.TestZ)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.Int64.cs deleted file mode 100644 index 17eaf021bece..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.Int64.cs +++ /dev/null @@ -1,545 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestZInt64() - { - var test = new BooleanBinaryOpTest__TestZInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestZInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(Int64[] inArray1, Int64[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestZInt64 testClass) - { - var result = Sse41.TestZ(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestZInt64 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestZ( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestZInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestZInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.TestZ( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.TestZ( - Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.TestZ( - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestZ), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestZ), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestZ), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.TestZ( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.TestZ( - Sse2.LoadVector128((Int64*)(pClsVar1)), - Sse2.LoadVector128((Int64*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestZInt64(); - var result = Sse41.TestZ(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestZInt64(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.TestZ( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.TestZ(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestZ( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.TestZ(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.TestZ( - Sse2.LoadVector128((Int64*)(&test._fld1)), - Sse2.LoadVector128((Int64*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult &= ((left[i] & right[i]) == 0); - } - - succeeded = (expectedResult == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.TestZ)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.SByte.cs deleted file mode 100644 index 69a0793ad0cd..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.SByte.cs +++ /dev/null @@ -1,545 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestZSByte() - { - var test = new BooleanBinaryOpTest__TestZSByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestZSByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestZSByte testClass) - { - var result = Sse41.TestZ(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestZSByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestZ( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestZSByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestZSByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.TestZ( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.TestZ( - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.TestZ( - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestZ), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestZ), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestZ), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.TestZ( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.TestZ( - Sse2.LoadVector128((SByte*)(pClsVar1)), - Sse2.LoadVector128((SByte*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestZSByte(); - var result = Sse41.TestZ(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestZSByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.TestZ( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.TestZ(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestZ( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.TestZ(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.TestZ( - Sse2.LoadVector128((SByte*)(&test._fld1)), - Sse2.LoadVector128((SByte*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult &= ((left[i] & right[i]) == 0); - } - - succeeded = (expectedResult == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.TestZ)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.UInt16.cs deleted file mode 100644 index 2ab4d704f775..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.UInt16.cs +++ /dev/null @@ -1,545 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestZUInt16() - { - var test = new BooleanBinaryOpTest__TestZUInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestZUInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(UInt16[] inArray1, UInt16[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestZUInt16 testClass) - { - var result = Sse41.TestZ(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestZUInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestZ( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestZUInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestZUInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.TestZ( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.TestZ( - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.TestZ( - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestZ), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestZ), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestZ), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.TestZ( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.TestZ( - Sse2.LoadVector128((UInt16*)(pClsVar1)), - Sse2.LoadVector128((UInt16*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestZUInt16(); - var result = Sse41.TestZ(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestZUInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.TestZ( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.TestZ(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestZ( - Sse2.LoadVector128((UInt16*)(pFld1)), - Sse2.LoadVector128((UInt16*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.TestZ(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.TestZ( - Sse2.LoadVector128((UInt16*)(&test._fld1)), - Sse2.LoadVector128((UInt16*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult &= ((left[i] & right[i]) == 0); - } - - succeeded = (expectedResult == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.TestZ)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.UInt32.cs deleted file mode 100644 index 8d0be221b4a3..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.UInt32.cs +++ /dev/null @@ -1,545 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestZUInt32() - { - var test = new BooleanBinaryOpTest__TestZUInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestZUInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(UInt32[] inArray1, UInt32[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestZUInt32 testClass) - { - var result = Sse41.TestZ(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestZUInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestZ( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestZUInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestZUInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.TestZ( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.TestZ( - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.TestZ( - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestZ), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestZ), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestZ), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.TestZ( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.TestZ( - Sse2.LoadVector128((UInt32*)(pClsVar1)), - Sse2.LoadVector128((UInt32*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestZUInt32(); - var result = Sse41.TestZ(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestZUInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.TestZ( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.TestZ(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestZ( - Sse2.LoadVector128((UInt32*)(pFld1)), - Sse2.LoadVector128((UInt32*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.TestZ(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.TestZ( - Sse2.LoadVector128((UInt32*)(&test._fld1)), - Sse2.LoadVector128((UInt32*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult &= ((left[i] & right[i]) == 0); - } - - succeeded = (expectedResult == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.TestZ)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.UInt64.cs deleted file mode 100644 index 30a4a7a2bd15..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.UInt64.cs +++ /dev/null @@ -1,545 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void TestZUInt64() - { - var test = new BooleanBinaryOpTest__TestZUInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class BooleanBinaryOpTest__TestZUInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - - private GCHandle inHandle1; - private GCHandle inHandle2; - - private ulong alignment; - - public DataTable(UInt64[] inArray1, UInt64[] inArray2, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(BooleanBinaryOpTest__TestZUInt64 testClass) - { - var result = Sse41.TestZ(_fld1, _fld2); - testClass.ValidateResult(_fld1, _fld2, result); - } - - public void RunStructFldScenario_Load(BooleanBinaryOpTest__TestZUInt64 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestZ( - Sse2.LoadVector128((UInt64*)(pFld1)), - Sse2.LoadVector128((UInt64*)(pFld2)) - ); - - testClass.ValidateResult(_fld1, _fld2, result); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static BooleanBinaryOpTest__TestZUInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public BooleanBinaryOpTest__TestZUInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new DataTable(_data1, _data2, LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.TestZ( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.TestZ( - Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.TestZ( - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)) - ); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestZ), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestZ), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.TestZ), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)) - }); - - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result)); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.TestZ( - _clsVar1, - _clsVar2 - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse41.TestZ( - Sse2.LoadVector128((UInt64*)(pClsVar1)), - Sse2.LoadVector128((UInt64*)(pClsVar2)) - ); - - ValidateResult(_clsVar1, _clsVar2, result); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse41.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)); - var result = Sse41.TestZ(op1, op2); - - ValidateResult(op1, op2, result); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new BooleanBinaryOpTest__TestZUInt64(); - var result = Sse41.TestZ(test._fld1, test._fld2); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new BooleanBinaryOpTest__TestZUInt64(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse41.TestZ( - Sse2.LoadVector128((UInt64*)(pFld1)), - Sse2.LoadVector128((UInt64*)(pFld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.TestZ(_fld1, _fld2); - - ValidateResult(_fld1, _fld2, result); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse41.TestZ( - Sse2.LoadVector128((UInt64*)(pFld1)), - Sse2.LoadVector128((UInt64*)(pFld2)) - ); - - ValidateResult(_fld1, _fld2, result); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.TestZ(test._fld1, test._fld2); - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.TestZ( - Sse2.LoadVector128((UInt64*)(&test._fld1)), - Sse2.LoadVector128((UInt64*)(&test._fld2)) - ); - - ValidateResult(test._fld1, test._fld2, result); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, bool result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, result, method); - } - - private void ValidateResult(UInt64[] left, UInt64[] right, bool result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - var expectedResult = true; - - for (var i = 0; i < Op1ElementCount; i++) - { - expectedResult &= ((left[i] & right[i]) == 0); - } - - succeeded = (expectedResult == result); - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.TestZ)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({result})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41_Overloaded/RoundCurrentDirectionScalar.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41_Overloaded/RoundCurrentDirectionScalar.Double.cs deleted file mode 100644 index bde4a737df27..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41_Overloaded/RoundCurrentDirectionScalar.Double.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundCurrentDirectionScalarDouble() - { - var test = new SimpleUnaryOpTest__RoundCurrentDirectionScalarDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__RoundCurrentDirectionScalarDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__RoundCurrentDirectionScalarDouble testClass) - { - var result = Sse41.RoundCurrentDirectionScalar(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__RoundCurrentDirectionScalarDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundCurrentDirectionScalar( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__RoundCurrentDirectionScalarDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__RoundCurrentDirectionScalarDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.RoundCurrentDirectionScalar( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.RoundCurrentDirectionScalar( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.RoundCurrentDirectionScalar( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundCurrentDirectionScalar), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundCurrentDirectionScalar), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundCurrentDirectionScalar), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.RoundCurrentDirectionScalar( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Sse41.RoundCurrentDirectionScalar( - Sse2.LoadVector128((Double*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Sse41.RoundCurrentDirectionScalar(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundCurrentDirectionScalar(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundCurrentDirectionScalar(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__RoundCurrentDirectionScalarDouble(); - var result = Sse41.RoundCurrentDirectionScalar(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__RoundCurrentDirectionScalarDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Sse41.RoundCurrentDirectionScalar( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.RoundCurrentDirectionScalar(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundCurrentDirectionScalar( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.RoundCurrentDirectionScalar(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.RoundCurrentDirectionScalar( - Sse2.LoadVector128((Double*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Round(firstOp[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(firstOp[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.RoundCurrentDirectionScalar)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41_Overloaded/RoundCurrentDirectionScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41_Overloaded/RoundCurrentDirectionScalar.Single.cs deleted file mode 100644 index 132067fa2444..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41_Overloaded/RoundCurrentDirectionScalar.Single.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundCurrentDirectionScalarSingle() - { - var test = new SimpleUnaryOpTest__RoundCurrentDirectionScalarSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__RoundCurrentDirectionScalarSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__RoundCurrentDirectionScalarSingle testClass) - { - var result = Sse41.RoundCurrentDirectionScalar(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__RoundCurrentDirectionScalarSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundCurrentDirectionScalar( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__RoundCurrentDirectionScalarSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__RoundCurrentDirectionScalarSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.RoundCurrentDirectionScalar( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.RoundCurrentDirectionScalar( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.RoundCurrentDirectionScalar( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundCurrentDirectionScalar), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundCurrentDirectionScalar), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundCurrentDirectionScalar), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.RoundCurrentDirectionScalar( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Sse41.RoundCurrentDirectionScalar( - Sse.LoadVector128((Single*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Sse41.RoundCurrentDirectionScalar(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundCurrentDirectionScalar(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundCurrentDirectionScalar(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__RoundCurrentDirectionScalarSingle(); - var result = Sse41.RoundCurrentDirectionScalar(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__RoundCurrentDirectionScalarSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Sse41.RoundCurrentDirectionScalar( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.RoundCurrentDirectionScalar(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundCurrentDirectionScalar( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.RoundCurrentDirectionScalar(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.RoundCurrentDirectionScalar( - Sse.LoadVector128((Single*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Round(firstOp[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.RoundCurrentDirectionScalar)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41_Overloaded/RoundToNearestIntegerScalar.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41_Overloaded/RoundToNearestIntegerScalar.Double.cs deleted file mode 100644 index 3192fcd1f482..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41_Overloaded/RoundToNearestIntegerScalar.Double.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundToNearestIntegerScalarDouble() - { - var test = new SimpleUnaryOpTest__RoundToNearestIntegerScalarDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__RoundToNearestIntegerScalarDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__RoundToNearestIntegerScalarDouble testClass) - { - var result = Sse41.RoundToNearestIntegerScalar(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__RoundToNearestIntegerScalarDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundToNearestIntegerScalar( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__RoundToNearestIntegerScalarDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__RoundToNearestIntegerScalarDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.RoundToNearestIntegerScalar( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.RoundToNearestIntegerScalar( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.RoundToNearestIntegerScalar( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNearestIntegerScalar), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNearestIntegerScalar), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNearestIntegerScalar), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.RoundToNearestIntegerScalar( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Sse41.RoundToNearestIntegerScalar( - Sse2.LoadVector128((Double*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Sse41.RoundToNearestIntegerScalar(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundToNearestIntegerScalar(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundToNearestIntegerScalar(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__RoundToNearestIntegerScalarDouble(); - var result = Sse41.RoundToNearestIntegerScalar(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__RoundToNearestIntegerScalarDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Sse41.RoundToNearestIntegerScalar( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.RoundToNearestIntegerScalar(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundToNearestIntegerScalar( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToNearestIntegerScalar(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToNearestIntegerScalar( - Sse2.LoadVector128((Double*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Round(firstOp[0], MidpointRounding.AwayFromZero))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(firstOp[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.RoundToNearestIntegerScalar)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41_Overloaded/RoundToNearestIntegerScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41_Overloaded/RoundToNearestIntegerScalar.Single.cs deleted file mode 100644 index c79699c69b2d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41_Overloaded/RoundToNearestIntegerScalar.Single.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundToNearestIntegerScalarSingle() - { - var test = new SimpleUnaryOpTest__RoundToNearestIntegerScalarSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__RoundToNearestIntegerScalarSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__RoundToNearestIntegerScalarSingle testClass) - { - var result = Sse41.RoundToNearestIntegerScalar(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__RoundToNearestIntegerScalarSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundToNearestIntegerScalar( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__RoundToNearestIntegerScalarSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__RoundToNearestIntegerScalarSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.RoundToNearestIntegerScalar( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.RoundToNearestIntegerScalar( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.RoundToNearestIntegerScalar( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNearestIntegerScalar), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNearestIntegerScalar), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNearestIntegerScalar), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.RoundToNearestIntegerScalar( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Sse41.RoundToNearestIntegerScalar( - Sse.LoadVector128((Single*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Sse41.RoundToNearestIntegerScalar(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundToNearestIntegerScalar(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundToNearestIntegerScalar(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__RoundToNearestIntegerScalarSingle(); - var result = Sse41.RoundToNearestIntegerScalar(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__RoundToNearestIntegerScalarSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Sse41.RoundToNearestIntegerScalar( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.RoundToNearestIntegerScalar(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundToNearestIntegerScalar( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToNearestIntegerScalar(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToNearestIntegerScalar( - Sse.LoadVector128((Single*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Round(firstOp[0], MidpointRounding.AwayFromZero))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.RoundToNearestIntegerScalar)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41_Overloaded/RoundToNegativeInfinityScalar.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41_Overloaded/RoundToNegativeInfinityScalar.Double.cs deleted file mode 100644 index 42d0c1a706cd..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41_Overloaded/RoundToNegativeInfinityScalar.Double.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundToNegativeInfinityScalarDouble() - { - var test = new SimpleUnaryOpTest__RoundToNegativeInfinityScalarDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__RoundToNegativeInfinityScalarDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__RoundToNegativeInfinityScalarDouble testClass) - { - var result = Sse41.RoundToNegativeInfinityScalar(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__RoundToNegativeInfinityScalarDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundToNegativeInfinityScalar( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__RoundToNegativeInfinityScalarDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__RoundToNegativeInfinityScalarDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.RoundToNegativeInfinityScalar( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.RoundToNegativeInfinityScalar( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.RoundToNegativeInfinityScalar( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNegativeInfinityScalar), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNegativeInfinityScalar), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNegativeInfinityScalar), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.RoundToNegativeInfinityScalar( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Sse41.RoundToNegativeInfinityScalar( - Sse2.LoadVector128((Double*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Sse41.RoundToNegativeInfinityScalar(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundToNegativeInfinityScalar(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundToNegativeInfinityScalar(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__RoundToNegativeInfinityScalarDouble(); - var result = Sse41.RoundToNegativeInfinityScalar(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__RoundToNegativeInfinityScalarDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Sse41.RoundToNegativeInfinityScalar( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.RoundToNegativeInfinityScalar(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundToNegativeInfinityScalar( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToNegativeInfinityScalar(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToNegativeInfinityScalar( - Sse2.LoadVector128((Double*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Floor(firstOp[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(firstOp[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.RoundToNegativeInfinityScalar)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41_Overloaded/RoundToNegativeInfinityScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41_Overloaded/RoundToNegativeInfinityScalar.Single.cs deleted file mode 100644 index b8268d82fe87..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41_Overloaded/RoundToNegativeInfinityScalar.Single.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundToNegativeInfinityScalarSingle() - { - var test = new SimpleUnaryOpTest__RoundToNegativeInfinityScalarSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__RoundToNegativeInfinityScalarSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__RoundToNegativeInfinityScalarSingle testClass) - { - var result = Sse41.RoundToNegativeInfinityScalar(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__RoundToNegativeInfinityScalarSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundToNegativeInfinityScalar( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__RoundToNegativeInfinityScalarSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__RoundToNegativeInfinityScalarSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.RoundToNegativeInfinityScalar( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.RoundToNegativeInfinityScalar( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.RoundToNegativeInfinityScalar( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNegativeInfinityScalar), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNegativeInfinityScalar), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToNegativeInfinityScalar), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.RoundToNegativeInfinityScalar( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Sse41.RoundToNegativeInfinityScalar( - Sse.LoadVector128((Single*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Sse41.RoundToNegativeInfinityScalar(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundToNegativeInfinityScalar(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundToNegativeInfinityScalar(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__RoundToNegativeInfinityScalarSingle(); - var result = Sse41.RoundToNegativeInfinityScalar(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__RoundToNegativeInfinityScalarSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Sse41.RoundToNegativeInfinityScalar( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.RoundToNegativeInfinityScalar(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundToNegativeInfinityScalar( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToNegativeInfinityScalar(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToNegativeInfinityScalar( - Sse.LoadVector128((Single*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Floor(firstOp[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.RoundToNegativeInfinityScalar)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41_Overloaded/RoundToPositiveInfinityScalar.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41_Overloaded/RoundToPositiveInfinityScalar.Double.cs deleted file mode 100644 index 22e23d4d6a4c..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41_Overloaded/RoundToPositiveInfinityScalar.Double.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundToPositiveInfinityScalarDouble() - { - var test = new SimpleUnaryOpTest__RoundToPositiveInfinityScalarDouble(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__RoundToPositiveInfinityScalarDouble - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Double[] inArray1, Double[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__RoundToPositiveInfinityScalarDouble testClass) - { - var result = Sse41.RoundToPositiveInfinityScalar(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__RoundToPositiveInfinityScalarDouble testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundToPositiveInfinityScalar( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); - - private static Double[] _data1 = new Double[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__RoundToPositiveInfinityScalarDouble() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__RoundToPositiveInfinityScalarDouble() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } - _dataTable = new DataTable(_data1, new Double[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.RoundToPositiveInfinityScalar( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.RoundToPositiveInfinityScalar( - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.RoundToPositiveInfinityScalar( - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToPositiveInfinityScalar), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToPositiveInfinityScalar), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToPositiveInfinityScalar), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.RoundToPositiveInfinityScalar( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Sse41.RoundToPositiveInfinityScalar( - Sse2.LoadVector128((Double*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Sse41.RoundToPositiveInfinityScalar(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Double*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundToPositiveInfinityScalar(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Double*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundToPositiveInfinityScalar(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__RoundToPositiveInfinityScalarDouble(); - var result = Sse41.RoundToPositiveInfinityScalar(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__RoundToPositiveInfinityScalarDouble(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Sse41.RoundToPositiveInfinityScalar( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.RoundToPositiveInfinityScalar(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundToPositiveInfinityScalar( - Sse2.LoadVector128((Double*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToPositiveInfinityScalar(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToPositiveInfinityScalar( - Sse2.LoadVector128((Double*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Double[] inArray1 = new Double[Op1ElementCount]; - Double[] outArray = new Double[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Double[] firstOp, Double[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Ceiling(firstOp[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(firstOp[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.RoundToPositiveInfinityScalar)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41_Overloaded/RoundToPositiveInfinityScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41_Overloaded/RoundToPositiveInfinityScalar.Single.cs deleted file mode 100644 index eeae99793d43..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41_Overloaded/RoundToPositiveInfinityScalar.Single.cs +++ /dev/null @@ -1,541 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void RoundToPositiveInfinityScalarSingle() - { - var test = new SimpleUnaryOpTest__RoundToPositiveInfinityScalarSingle(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleUnaryOpTest__RoundToPositiveInfinityScalarSingle - { - private struct DataTable - { - private byte[] inArray1; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Single[] inArray1, Single[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleUnaryOpTest__RoundToPositiveInfinityScalarSingle testClass) - { - var result = Sse41.RoundToPositiveInfinityScalar(_fld1); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleUnaryOpTest__RoundToPositiveInfinityScalarSingle testClass) - { - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundToPositiveInfinityScalar( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); - - private static Single[] _data1 = new Single[Op1ElementCount]; - - private static Vector128 _clsVar1; - - private Vector128 _fld1; - - private DataTable _dataTable; - - static SimpleUnaryOpTest__RoundToPositiveInfinityScalarSingle() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleUnaryOpTest__RoundToPositiveInfinityScalarSingle() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } - _dataTable = new DataTable(_data1, new Single[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse41.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse41.RoundToPositiveInfinityScalar( - Unsafe.Read>(_dataTable.inArray1Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse41.RoundToPositiveInfinityScalar( - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse41.RoundToPositiveInfinityScalar( - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToPositiveInfinityScalar), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToPositiveInfinityScalar), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse41).GetMethod(nameof(Sse41.RoundToPositiveInfinityScalar), new Type[] { typeof(Vector128) }) - .Invoke(null, new object[] { - Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse41.RoundToPositiveInfinityScalar( - _clsVar1 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - { - var result = Sse41.RoundToPositiveInfinityScalar( - Sse.LoadVector128((Single*)(pClsVar1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var result = Sse41.RoundToPositiveInfinityScalar(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundToPositiveInfinityScalar(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)); - var result = Sse41.RoundToPositiveInfinityScalar(op1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleUnaryOpTest__RoundToPositiveInfinityScalarSingle(); - var result = Sse41.RoundToPositiveInfinityScalar(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleUnaryOpTest__RoundToPositiveInfinityScalarSingle(); - - fixed (Vector128* pFld1 = &test._fld1) - { - var result = Sse41.RoundToPositiveInfinityScalar( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse41.RoundToPositiveInfinityScalar(_fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - { - var result = Sse41.RoundToPositiveInfinityScalar( - Sse.LoadVector128((Single*)(pFld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToPositiveInfinityScalar(test._fld1); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse41.RoundToPositiveInfinityScalar( - Sse.LoadVector128((Single*)(&test._fld1)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") - { - Single[] inArray1 = new Single[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, outArray, method); - } - - private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Ceiling(firstOp[0]))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse41)}.{nameof(Sse41.RoundToPositiveInfinityScalar)}(Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse42.X64/Crc32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse42.X64/Crc32.cs deleted file mode 100644 index f55ad61a7674..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse42.X64/Crc32.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Reflection; -using System.Runtime.Intrinsics.X86; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static int Main(string[] args) - { - ulong s1l = 0, s2l = 0, resl; - int testResult = Pass; - - if (Sse42.X64.IsSupported) - { - for (int i = 0; i < longCrcTable.Length; i++) - { - s1l = longCrcTable[i].s1; - s2l = longCrcTable[i].s2; - - resl = Sse42.X64.Crc32(s1l, s2l); - if (resl != longCrcTable[i].res) - { - Console.WriteLine("{0}: Inputs: 0x{1,16:x}, 0x{2,16:x} Expected: 0x{3,16:x} actual: 0x{4,16:x}", - i, s1l, s2l, longCrcTable[i].res, resl); - testResult = Fail; - } - - resl = Convert.ToUInt64(typeof(Sse42.X64).GetMethod(nameof(Sse42.X64.Crc32), new Type[] { s1l.GetType(), s2l.GetType() }).Invoke(null, new object[] { s1l, s2l })); - if (resl != longCrcTable[i].res) - { - Console.WriteLine("{0}: Inputs: 0x{1,16:x}, 0x{2,16:x} Expected: 0x{3,16:x} actual: 0x{4,16:x} - Reflection", - i, s1l, s2l, longCrcTable[i].res, resl); - testResult = Fail; - } - } - } - else - { - try - { - resl = Sse42.X64.Crc32(s1l, s2l); - Console.WriteLine("Intrinsic Sse42.X64.Crc32 is called on non-supported hardware."); - Console.WriteLine("Sse42.IsSupported " + Sse42.IsSupported); - Console.WriteLine("Environment.Is64BitProcess " + Environment.Is64BitProcess); - testResult = Fail; - } - catch (PlatformNotSupportedException) - { - } - - try - { - resl = Convert.ToUInt64(typeof(Sse42.X64).GetMethod(nameof(Sse42.X64.Crc32), new Type[] { s1l.GetType(), s2l.GetType() }).Invoke(null, new object[] { s1l, s2l })); - Console.WriteLine("Intrinsic Sse42.X64.Crc32 is called via reflection on non-supported hardware."); - Console.WriteLine("Sse42.IsSupported " + Sse42.IsSupported); - Console.WriteLine("Environment.Is64BitProcess " + Environment.Is64BitProcess); - testResult = Fail; - } - catch (TargetInvocationException e) when (e.InnerException is PlatformNotSupportedException) - { - } - } - - return testResult; - } - - public struct Crc where T : struct where U : struct - { - public T s1; - public U s2; - public T res; - public Crc(T a, U b, T c) - { - this.s1 = a; - this.s2 = b; - this.res = c; - } - } - - public static Crc[] longCrcTable = { - new Crc(0x0000000000000000UL, 0x0000000000000000UL, 0x0000000000000000UL), - new Crc(0x0000000000000000UL, 0x0000000000000001UL, 0x00000000493c7d27UL), - new Crc(0x0000000000000001UL, 0x0000000000000000UL, 0x00000000493c7d27UL), - new Crc(0x0000000000000001UL, 0x0000000000000001UL, 0x0000000000000000UL), - new Crc(0x0000000000000000UL, 0xffffffffffffffffUL, 0x00000000c44ff94dUL), - new Crc(0xffffffffffffffffUL, 0x0000000000000000UL, 0x0000000073d74d75UL), - new Crc(0xffffffffffffffffUL, 0xffffffffffffffffUL, 0x00000000b798b438UL), - new Crc(0x0000000000000001UL, 0xffffffffffffffffUL, 0x000000008d73846aUL), - new Crc(0xffffffffffffffffUL, 0x0000000000000001UL, 0x000000003aeb3052UL), - new Crc(0xfffffffffffe1f0dUL, 0x00000000f5c1ddb3UL, 0x000000000504c066UL), - new Crc(0x0000000000000005UL, 0x000000bce1263cffUL, 0x000000004ab954daUL), - new Crc(0x0000000000000463UL, 0xffffffffff840d0dUL, 0x00000000797d59f3UL), - new Crc(0x00000000000f423fUL, 0x000000000001e0f3UL, 0x000000005c6b8093UL) - }; - - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse42/CompareGreaterThan.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse42/CompareGreaterThan.Int64.cs deleted file mode 100644 index a6d1cf3b3cd3..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse42/CompareGreaterThan.Int64.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void CompareGreaterThanInt64() - { - var test = new SimpleBinaryOpTest__CompareGreaterThanInt64(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__CompareGreaterThanInt64 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int64[] inArray1, Int64[] inArray2, Int64[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__CompareGreaterThanInt64 testClass) - { - var result = Sse42.CompareGreaterThan(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__CompareGreaterThanInt64 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse42.CompareGreaterThan( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__CompareGreaterThanInt64() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__CompareGreaterThanInt64() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Sse42.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Sse42.CompareGreaterThan( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Sse42.CompareGreaterThan( - Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Sse42.CompareGreaterThan( - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Sse42).GetMethod(nameof(Sse42.CompareGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Sse42).GetMethod(nameof(Sse42.CompareGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Sse42).GetMethod(nameof(Sse42.CompareGreaterThan), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Sse42.CompareGreaterThan( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Sse42.CompareGreaterThan( - Sse2.LoadVector128((Int64*)(pClsVar1)), - Sse2.LoadVector128((Int64*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Sse42.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = Sse42.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = Sse42.CompareGreaterThan(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__CompareGreaterThanInt64(); - var result = Sse42.CompareGreaterThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__CompareGreaterThanInt64(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Sse42.CompareGreaterThan( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Sse42.CompareGreaterThan(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Sse42.CompareGreaterThan( - Sse2.LoadVector128((Int64*)(pFld1)), - Sse2.LoadVector128((Int64*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Sse42.CompareGreaterThan(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Sse42.CompareGreaterThan( - Sse2.LoadVector128((Int64*)(&test._fld1)), - Sse2.LoadVector128((Int64*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((left[0] > right[0]) ? unchecked((long)(-1)) : 0)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((left[i] > right[i]) ? unchecked((long)(-1)) : 0)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Sse42)}.{nameof(Sse42.CompareGreaterThan)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse42/Crc32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse42/Crc32.cs deleted file mode 100644 index 3d420efa4a30..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse42/Crc32.cs +++ /dev/null @@ -1,160 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Reflection; -using System.Runtime.Intrinsics.X86; - -namespace IntelHardwareIntrinsicTest -{ - class Program - { - const int Pass = 100; - const int Fail = 0; - - static int Main(string[] args) - { - ulong s1l = 0, s2l = 0, resl; - int testResult = Pass; - - if (Sse42.IsSupported) - { - - uint s1i, s2i, resi; - for (int i = 0; i < intCrcTable.Length; i++) - { - s1i = intCrcTable[i].s1; - s2i = intCrcTable[i].s2; - - resi = Sse42.Crc32(s1i, s2i); - if (resi != intCrcTable[i].res) - { - Console.WriteLine("{0}: Inputs: 0x{1,8:x}, 0x{2,8:x} Expected: 0x{3,8:x} actual: 0x{4,8:x}", - i, s1i, s2i, intCrcTable[i].res, resi); - testResult = Fail; - } - - resi = Convert.ToUInt32(typeof(Sse42).GetMethod(nameof(Sse42.Crc32), new Type[] { s1i.GetType(), s2i.GetType() }).Invoke(null, new object[] { s1i, s2i })); - if (resi != intCrcTable[i].res) - { - Console.WriteLine("{0}: Inputs: 0x{1,8:x}, 0x{2,8:x} Expected: 0x{3,8:x} actual: 0x{4,8:x} - Reflection", - i, s1i, s2i, intCrcTable[i].res, resi); - testResult = Fail; - } - } - - ushort s2s; - for (int i = 0; i < shortCrcTable.Length; i++) - { - s1i = shortCrcTable[i].s1; - s2s = shortCrcTable[i].s2; - - resi = Sse42.Crc32(s1i, s2s); - if (resi != shortCrcTable[i].res) - { - Console.WriteLine("{0}: Inputs: 0x{1,8:x}, 0x{2,8:x} Expected: 0x{3,8:x} actual: 0x{4,8:x}", - i, s1i, s2s, shortCrcTable[i].res, resi); - testResult = Fail; - } - - resi = Convert.ToUInt32(typeof(Sse42).GetMethod(nameof(Sse42.Crc32), new Type[] { s1i.GetType(), s2s.GetType() }).Invoke(null, new object[] { s1i, s2s })); - if (resi != shortCrcTable[i].res) - { - Console.WriteLine("{0}: Inputs: 0x{1,8:x}, 0x{2,8:x} Expected: 0x{3,8:x} actual: 0x{4,8:x} - Reflection", - i, s1i, s2s, shortCrcTable[i].res, resi); - testResult = Fail; - } - } - - byte s2b; - for (int i = 0; i < byteCrcTable.Length; i++) - { - s1i = byteCrcTable[i].s1; - s2b = byteCrcTable[i].s2; - - resi = Sse42.Crc32(s1i, s2b); - if (resi != byteCrcTable[i].res) - { - Console.WriteLine("{0}: Inputs: 0x{1,8:x}, 0x{2,8:x} Expected: 0x{3,8:x} actual: 0x{4,8:x}", - i, s1i, s2b, byteCrcTable[i].res, resi); - testResult = Fail; - } - - resi = Convert.ToUInt32(typeof(Sse42).GetMethod(nameof(Sse42.Crc32), new Type[] { s1i.GetType(), s2b.GetType() }).Invoke(null, new object[] { s1i, s2b })); - if (resi != byteCrcTable[i].res) - { - Console.WriteLine("{0}: Inputs: 0x{1,8:x}, 0x{2,8:x} Expected: 0x{3,8:x} actual: 0x{4,8:x}", - i, s1i, s2b, byteCrcTable[i].res, resi); - testResult = Fail; - } - } - } - - return testResult; - } - - public struct Crc where T : struct where U : struct - { - public T s1; - public U s2; - public T res; - public Crc(T a, U b, T c) - { - this.s1 = a; - this.s2 = b; - this.res = c; - } - } - - public static Crc[] intCrcTable = { - new Crc(0x00000000U, 0x00000000U, 0x00000000U), - new Crc(0x00000000U, 0x00000001U, 0xdd45aab8U), - new Crc(0x00000001U, 0x00000000U, 0xdd45aab8U), - new Crc(0x00000001U, 0x00000001U, 0x00000000U), - new Crc(0x00000000U, 0xffffffffU, 0xb798b438U), - new Crc(0xffffffffU, 0x00000000U, 0xb798b438U), - new Crc(0xffffffffU, 0xffffffffU, 0x00000000U), - new Crc(0x00000001U, 0xffffffffU, 0x6add1e80U), - new Crc(0xffffffffU, 0x00000001U, 0x6add1e80U), - new Crc(0xfffe1f0dU, 0xf5c1ddb3U, 0x911888ccU), - new Crc(0x00000005U, 0xe1263cffU, 0xbe12f661U), - new Crc(0x00000463U, 0xff840d0dU, 0xcba65e37U), - new Crc(0x000f423fU, 0x0001e0f3U, 0xa5b7881dU) - }; - - public static Crc[] shortCrcTable = { - new Crc(0x00000000U, 0x0000, 0x00000000U), - new Crc(0x00000000U, 0x0001, 0x13a29877U), - new Crc(0x00000001U, 0x0000, 0x13a29877U), - new Crc(0x00000001U, 0x0001, 0x00000000U), - new Crc(0x00000000U, 0xffff, 0xe9e77d2U), - new Crc(0xffffffffU, 0x0000, 0xe9e882dU), - new Crc(0xffffffffU, 0xffff, 0x0000ffffU), - new Crc(0x00000001U, 0xffff, 0x1d3cefa5U), - new Crc(0xffffffffU, 0x0001, 0x1d3c105aU), - new Crc(0xfffe1f0dU, 0xddb3, 0x6de0d33dU), - new Crc(0x00000005U, 0x3cff, 0x836b5b49U), - new Crc(0x00000463U, 0x0d0d, 0x0cf56c40U), - new Crc(0x000f423fU, 0xe0f3, 0x943a5bc7U) - }; - - public static Crc[] byteCrcTable = { - new Crc(0x00000000U, 0x00, 0x00000000U), - new Crc(0x00000000U, 0x01, 0xf26b8303U), - new Crc(0x00000001U, 0x00, 0xf26b8303U), - new Crc(0x00000001U, 0x01, 0x00000000U), - new Crc(0x00000000U, 0xff, 0xad7d5351U), - new Crc(0xffffffffU, 0x00, 0xad82acaeU), - new Crc(0xffffffffU, 0xff, 0x00ffffffU), - new Crc(0x00000001U, 0xff, 0x5f16d052U), - new Crc(0xffffffffU, 0x01, 0x5fe92fadU), - new Crc(0xfffe1f0dU, 0xb3, 0x1e9233f1U), - new Crc(0x00000005U, 0xff, 0x988c474dU), - new Crc(0x00000463U, 0x0d, 0xcdbe2c41U), - new Crc(0x000f423fU, 0xf3, 0x8ecee656U) - }; - - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.Int16.0.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.Int16.0.cs deleted file mode 100644 index a9a78000b92d..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.Int16.0.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AlignRightInt160() - { - var test = new ImmBinaryOpTest__AlignRightInt160(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__AlignRightInt160 - { - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__AlignRightInt160 testClass) - { - var result = Ssse3.AlignRight(_fld1, _fld2, 0); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__AlignRightInt160() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__AlignRightInt160() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Ssse3.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Ssse3.AlignRight( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Ssse3.AlignRight( - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Ssse3.AlignRight( - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Ssse3.AlignRight( - _clsVar1, - _clsVar2, - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Ssse3.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Ssse3.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Ssse3.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__AlignRightInt160(); - var result = Ssse3.AlignRight(test._fld1, test._fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Ssse3.AlignRight(_fld1, _fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Ssse3.AlignRight(test._fld1, test._fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != right[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != right[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Ssse3)}.{nameof(Ssse3.AlignRight)}(Vector128.0, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.Int16.2.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.Int16.2.cs deleted file mode 100644 index 0aafff7729a5..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.Int16.2.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AlignRightInt162() - { - var test = new ImmBinaryOpTest__AlignRightInt162(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__AlignRightInt162 - { - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__AlignRightInt162 testClass) - { - var result = Ssse3.AlignRight(_fld1, _fld2, 2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__AlignRightInt162() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__AlignRightInt162() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Ssse3.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Ssse3.AlignRight( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Ssse3.AlignRight( - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Ssse3.AlignRight( - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Ssse3.AlignRight( - _clsVar1, - _clsVar2, - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Ssse3.AlignRight(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Ssse3.AlignRight(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Ssse3.AlignRight(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__AlignRightInt162(); - var result = Ssse3.AlignRight(test._fld1, test._fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Ssse3.AlignRight(_fld1, _fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Ssse3.AlignRight(test._fld1, test._fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != right[1]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (i == 7 ? left[0] : right[i+1])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Ssse3)}.{nameof(Ssse3.AlignRight)}(Vector128.2, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.Int32.0.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.Int32.0.cs deleted file mode 100644 index fba8b82f29e4..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.Int32.0.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AlignRightInt320() - { - var test = new ImmBinaryOpTest__AlignRightInt320(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__AlignRightInt320 - { - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__AlignRightInt320 testClass) - { - var result = Ssse3.AlignRight(_fld1, _fld2, 0); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__AlignRightInt320() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__AlignRightInt320() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Ssse3.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Ssse3.AlignRight( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Ssse3.AlignRight( - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Ssse3.AlignRight( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Ssse3.AlignRight( - _clsVar1, - _clsVar2, - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Ssse3.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Ssse3.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Ssse3.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__AlignRightInt320(); - var result = Ssse3.AlignRight(test._fld1, test._fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Ssse3.AlignRight(_fld1, _fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Ssse3.AlignRight(test._fld1, test._fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != right[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != right[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Ssse3)}.{nameof(Ssse3.AlignRight)}(Vector128.0, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.Int32.4.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.Int32.4.cs deleted file mode 100644 index 61f06b34ffad..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.Int32.4.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AlignRightInt324() - { - var test = new ImmBinaryOpTest__AlignRightInt324(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__AlignRightInt324 - { - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__AlignRightInt324 testClass) - { - var result = Ssse3.AlignRight(_fld1, _fld2, 4); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__AlignRightInt324() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__AlignRightInt324() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Ssse3.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Ssse3.AlignRight( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Ssse3.AlignRight( - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Ssse3.AlignRight( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)4 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)), - (byte)4 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)), - (byte)4 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Ssse3.AlignRight( - _clsVar1, - _clsVar2, - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Ssse3.AlignRight(left, right, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Ssse3.AlignRight(left, right, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Ssse3.AlignRight(left, right, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__AlignRightInt324(); - var result = Ssse3.AlignRight(test._fld1, test._fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Ssse3.AlignRight(_fld1, _fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Ssse3.AlignRight(test._fld1, test._fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != right[1]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (i == 3 ? left[0] : right[i+1])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Ssse3)}.{nameof(Ssse3.AlignRight)}(Vector128.4, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.Int64.0.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.Int64.0.cs deleted file mode 100644 index bde02fa6203a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.Int64.0.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AlignRightInt640() - { - var test = new ImmBinaryOpTest__AlignRightInt640(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__AlignRightInt640 - { - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__AlignRightInt640 testClass) - { - var result = Ssse3.AlignRight(_fld1, _fld2, 0); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__AlignRightInt640() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__AlignRightInt640() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Ssse3.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Ssse3.AlignRight( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Ssse3.AlignRight( - Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Ssse3.AlignRight( - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Ssse3.AlignRight( - _clsVar1, - _clsVar2, - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Ssse3.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = Ssse3.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = Ssse3.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__AlignRightInt640(); - var result = Ssse3.AlignRight(test._fld1, test._fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Ssse3.AlignRight(_fld1, _fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Ssse3.AlignRight(test._fld1, test._fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != right[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != right[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Ssse3)}.{nameof(Ssse3.AlignRight)}(Vector128.0, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.Int64.8.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.Int64.8.cs deleted file mode 100644 index 055765a88cf2..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.Int64.8.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AlignRightInt648() - { - var test = new ImmBinaryOpTest__AlignRightInt648(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__AlignRightInt648 - { - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__AlignRightInt648 testClass) - { - var result = Ssse3.AlignRight(_fld1, _fld2, 8); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int64); - - private static Int64[] _data1 = new Int64[Op1ElementCount]; - private static Int64[] _data2 = new Int64[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__AlignRightInt648() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__AlignRightInt648() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Ssse3.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Ssse3.AlignRight( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Ssse3.AlignRight( - Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Ssse3.AlignRight( - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)8 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)), - (byte)8 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)), - (byte)8 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Ssse3.AlignRight( - _clsVar1, - _clsVar2, - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Ssse3.AlignRight(left, right, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Sse2.LoadVector128((Int64*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = Ssse3.AlignRight(left, right, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadAlignedVector128((Int64*)(_dataTable.inArray2Ptr)); - var result = Ssse3.AlignRight(left, right, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__AlignRightInt648(); - var result = Ssse3.AlignRight(test._fld1, test._fld2, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Ssse3.AlignRight(_fld1, _fld2, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Ssse3.AlignRight(test._fld1, test._fld2, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - Int64[] inArray1 = new Int64[Op1ElementCount]; - Int64[] inArray2 = new Int64[Op2ElementCount]; - Int64[] outArray = new Int64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int64[] left, Int64[] right, Int64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != right[1]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (i == 1 ? left[0] : right[i+1])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Ssse3)}.{nameof(Ssse3.AlignRight)}(Vector128.8, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.UInt16.0.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.UInt16.0.cs deleted file mode 100644 index 31c8307cb366..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.UInt16.0.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AlignRightUInt160() - { - var test = new ImmBinaryOpTest__AlignRightUInt160(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__AlignRightUInt160 - { - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__AlignRightUInt160 testClass) - { - var result = Ssse3.AlignRight(_fld1, _fld2, 0); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__AlignRightUInt160() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__AlignRightUInt160() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Ssse3.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Ssse3.AlignRight( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Ssse3.AlignRight( - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Ssse3.AlignRight( - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Ssse3.AlignRight( - _clsVar1, - _clsVar2, - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Ssse3.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Ssse3.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Ssse3.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__AlignRightUInt160(); - var result = Ssse3.AlignRight(test._fld1, test._fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Ssse3.AlignRight(_fld1, _fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Ssse3.AlignRight(test._fld1, test._fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != right[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != right[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Ssse3)}.{nameof(Ssse3.AlignRight)}(Vector128.0, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.UInt16.2.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.UInt16.2.cs deleted file mode 100644 index 79097f15f46f..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.UInt16.2.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AlignRightUInt162() - { - var test = new ImmBinaryOpTest__AlignRightUInt162(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__AlignRightUInt162 - { - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__AlignRightUInt162 testClass) - { - var result = Ssse3.AlignRight(_fld1, _fld2, 2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt16); - - private static UInt16[] _data1 = new UInt16[Op1ElementCount]; - private static UInt16[] _data2 = new UInt16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__AlignRightUInt162() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__AlignRightUInt162() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Ssse3.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Ssse3.AlignRight( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Ssse3.AlignRight( - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Ssse3.AlignRight( - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)), - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)), - (byte)2 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Ssse3.AlignRight( - _clsVar1, - _clsVar2, - 2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Ssse3.AlignRight(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Sse2.LoadVector128((UInt16*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Ssse3.AlignRight(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArray2Ptr)); - var result = Ssse3.AlignRight(left, right, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__AlignRightUInt162(); - var result = Ssse3.AlignRight(test._fld1, test._fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Ssse3.AlignRight(_fld1, _fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Ssse3.AlignRight(test._fld1, test._fld2, 2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt16[] inArray1 = new UInt16[Op1ElementCount]; - UInt16[] inArray2 = new UInt16[Op2ElementCount]; - UInt16[] outArray = new UInt16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt16[] left, UInt16[] right, UInt16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != right[1]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (i == 7 ? left[0] : right[i+1])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Ssse3)}.{nameof(Ssse3.AlignRight)}(Vector128.2, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.UInt32.0.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.UInt32.0.cs deleted file mode 100644 index 15e12c0c34d9..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.UInt32.0.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AlignRightUInt320() - { - var test = new ImmBinaryOpTest__AlignRightUInt320(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__AlignRightUInt320 - { - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__AlignRightUInt320 testClass) - { - var result = Ssse3.AlignRight(_fld1, _fld2, 0); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__AlignRightUInt320() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__AlignRightUInt320() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Ssse3.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Ssse3.AlignRight( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Ssse3.AlignRight( - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Ssse3.AlignRight( - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Ssse3.AlignRight( - _clsVar1, - _clsVar2, - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Ssse3.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Ssse3.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Ssse3.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__AlignRightUInt320(); - var result = Ssse3.AlignRight(test._fld1, test._fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Ssse3.AlignRight(_fld1, _fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Ssse3.AlignRight(test._fld1, test._fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != right[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != right[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Ssse3)}.{nameof(Ssse3.AlignRight)}(Vector128.0, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.UInt32.4.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.UInt32.4.cs deleted file mode 100644 index d4c351f0eca7..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.UInt32.4.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AlignRightUInt324() - { - var test = new ImmBinaryOpTest__AlignRightUInt324(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__AlignRightUInt324 - { - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__AlignRightUInt324 testClass) - { - var result = Ssse3.AlignRight(_fld1, _fld2, 4); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt32); - - private static UInt32[] _data1 = new UInt32[Op1ElementCount]; - private static UInt32[] _data2 = new UInt32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__AlignRightUInt324() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__AlignRightUInt324() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Ssse3.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Ssse3.AlignRight( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Ssse3.AlignRight( - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Ssse3.AlignRight( - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)), - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)4 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)), - (byte)4 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)), - (byte)4 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Ssse3.AlignRight( - _clsVar1, - _clsVar2, - 4 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Ssse3.AlignRight(left, right, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Sse2.LoadVector128((UInt32*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Ssse3.AlignRight(left, right, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadAlignedVector128((UInt32*)(_dataTable.inArray2Ptr)); - var result = Ssse3.AlignRight(left, right, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__AlignRightUInt324(); - var result = Ssse3.AlignRight(test._fld1, test._fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Ssse3.AlignRight(_fld1, _fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Ssse3.AlignRight(test._fld1, test._fld2, 4); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt32[] inArray1 = new UInt32[Op1ElementCount]; - UInt32[] inArray2 = new UInt32[Op2ElementCount]; - UInt32[] outArray = new UInt32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt32[] left, UInt32[] right, UInt32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != right[1]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (i == 3 ? left[0] : right[i+1])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Ssse3)}.{nameof(Ssse3.AlignRight)}(Vector128.4, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.UInt64.0.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.UInt64.0.cs deleted file mode 100644 index 07dd3cd0790a..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.UInt64.0.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AlignRightUInt640() - { - var test = new ImmBinaryOpTest__AlignRightUInt640(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__AlignRightUInt640 - { - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__AlignRightUInt640 testClass) - { - var result = Ssse3.AlignRight(_fld1, _fld2, 0); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__AlignRightUInt640() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__AlignRightUInt640() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Ssse3.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Ssse3.AlignRight( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Ssse3.AlignRight( - Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Ssse3.AlignRight( - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)), - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)), - (byte)0 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Ssse3.AlignRight( - _clsVar1, - _clsVar2, - 0 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Ssse3.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)); - var result = Ssse3.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)); - var result = Ssse3.AlignRight(left, right, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__AlignRightUInt640(); - var result = Ssse3.AlignRight(test._fld1, test._fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Ssse3.AlignRight(_fld1, _fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Ssse3.AlignRight(test._fld1, test._fld2, 0); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt64[] left, UInt64[] right, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != right[0]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != right[i]) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Ssse3)}.{nameof(Ssse3.AlignRight)}(Vector128.0, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.UInt64.8.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.UInt64.8.cs deleted file mode 100644 index 078b48f01b23..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/AlignRight.UInt64.8.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void AlignRightUInt648() - { - var test = new ImmBinaryOpTest__AlignRightUInt648(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class ImmBinaryOpTest__AlignRightUInt648 - { - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(ImmBinaryOpTest__AlignRightUInt648 testClass) - { - var result = Ssse3.AlignRight(_fld1, _fld2, 8); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(UInt64); - - private static UInt64[] _data1 = new UInt64[Op1ElementCount]; - private static UInt64[] _data2 = new UInt64[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private SimpleBinaryOpTest__DataTable _dataTable; - - static ImmBinaryOpTest__AlignRightUInt648() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public ImmBinaryOpTest__AlignRightUInt648() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } - _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Ssse3.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Ssse3.AlignRight( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Ssse3.AlignRight( - Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Ssse3.AlignRight( - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)), - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr), - (byte)8 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)), - (byte)8 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.AlignRight), new Type[] { typeof(Vector128), typeof(Vector128), typeof(byte) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)), - (byte)8 - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Ssse3.AlignRight( - _clsVar1, - _clsVar2, - 8 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var left = Unsafe.Read>(_dataTable.inArray1Ptr); - var right = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Ssse3.AlignRight(left, right, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var left = Sse2.LoadVector128((UInt64*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadVector128((UInt64*)(_dataTable.inArray2Ptr)); - var result = Ssse3.AlignRight(left, right, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var left = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray1Ptr)); - var right = Sse2.LoadAlignedVector128((UInt64*)(_dataTable.inArray2Ptr)); - var result = Ssse3.AlignRight(left, right, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(left, right, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new ImmBinaryOpTest__AlignRightUInt648(); - var result = Ssse3.AlignRight(test._fld1, test._fld2, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Ssse3.AlignRight(_fld1, _fld2, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Ssse3.AlignRight(test._fld1, test._fld2, 8); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 left, Vector128 right, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = "") - { - UInt64[] inArray1 = new UInt64[Op1ElementCount]; - UInt64[] inArray2 = new UInt64[Op2ElementCount]; - UInt64[] outArray = new UInt64[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(UInt64[] left, UInt64[] right, UInt64[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != right[1]) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (i == 1 ? left[0] : right[i+1])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Ssse3)}.{nameof(Ssse3.AlignRight)}(Vector128.8, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/MultiplyAddAdjacent.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/MultiplyAddAdjacent.Int16.cs deleted file mode 100644 index 697062877f52..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/MultiplyAddAdjacent.Int16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplyAddAdjacentInt16() - { - var test = new SimpleBinaryOpTest__MultiplyAddAdjacentInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MultiplyAddAdjacentInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, SByte[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MultiplyAddAdjacentInt16 testClass) - { - var result = Ssse3.MultiplyAddAdjacent(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MultiplyAddAdjacentInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Ssse3.MultiplyAddAdjacent( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MultiplyAddAdjacentInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MultiplyAddAdjacentInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Ssse3.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Ssse3.MultiplyAddAdjacent( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Ssse3.MultiplyAddAdjacent( - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Ssse3.MultiplyAddAdjacent( - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.MultiplyAddAdjacent), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.MultiplyAddAdjacent), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.MultiplyAddAdjacent), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Ssse3.MultiplyAddAdjacent( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Ssse3.MultiplyAddAdjacent( - Sse2.LoadVector128((Byte*)(pClsVar1)), - Sse2.LoadVector128((SByte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Ssse3.MultiplyAddAdjacent(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Ssse3.MultiplyAddAdjacent(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Ssse3.MultiplyAddAdjacent(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MultiplyAddAdjacentInt16(); - var result = Ssse3.MultiplyAddAdjacent(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MultiplyAddAdjacentInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Ssse3.MultiplyAddAdjacent( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Ssse3.MultiplyAddAdjacent(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Ssse3.MultiplyAddAdjacent( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Ssse3.MultiplyAddAdjacent(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Ssse3.MultiplyAddAdjacent( - Sse2.LoadVector128((Byte*)(&test._fld1)), - Sse2.LoadVector128((SByte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Byte[] left, SByte[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != Math.Clamp(((right[1] * left[1]) + (right[0] * left[0])), short.MinValue, short.MaxValue)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != Math.Clamp(((right[(i * 2) + 1] * left[(i * 2) + 1]) + (right[i * 2] * left[i * 2])), short.MinValue, short.MaxValue)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Ssse3)}.{nameof(Ssse3.MultiplyAddAdjacent)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/MultiplyHighRoundScale.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/MultiplyHighRoundScale.Int16.cs deleted file mode 100644 index 828606485134..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/MultiplyHighRoundScale.Int16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void MultiplyHighRoundScaleInt16() - { - var test = new SimpleBinaryOpTest__MultiplyHighRoundScaleInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__MultiplyHighRoundScaleInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__MultiplyHighRoundScaleInt16 testClass) - { - var result = Ssse3.MultiplyHighRoundScale(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__MultiplyHighRoundScaleInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Ssse3.MultiplyHighRoundScale( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__MultiplyHighRoundScaleInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__MultiplyHighRoundScaleInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Ssse3.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Ssse3.MultiplyHighRoundScale( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Ssse3.MultiplyHighRoundScale( - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Ssse3.MultiplyHighRoundScale( - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.MultiplyHighRoundScale), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.MultiplyHighRoundScale), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.MultiplyHighRoundScale), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Ssse3.MultiplyHighRoundScale( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Ssse3.MultiplyHighRoundScale( - Sse2.LoadVector128((Int16*)(pClsVar1)), - Sse2.LoadVector128((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Ssse3.MultiplyHighRoundScale(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Ssse3.MultiplyHighRoundScale(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Ssse3.MultiplyHighRoundScale(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__MultiplyHighRoundScaleInt16(); - var result = Ssse3.MultiplyHighRoundScale(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__MultiplyHighRoundScaleInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Ssse3.MultiplyHighRoundScale( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Ssse3.MultiplyHighRoundScale(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Ssse3.MultiplyHighRoundScale( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Ssse3.MultiplyHighRoundScale(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Ssse3.MultiplyHighRoundScale( - Sse2.LoadVector128((Int16*)(&test._fld1)), - Sse2.LoadVector128((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (short)((((left[0] * right[0]) >> 14) + 1) >> 1)) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (short)((((left[i] * right[i]) >> 14) + 1) >> 1)) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Ssse3)}.{nameof(Ssse3.MultiplyHighRoundScale)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Shuffle.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Shuffle.Byte.cs deleted file mode 100644 index f0d653bedfff..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Shuffle.Byte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShuffleByte() - { - var test = new SimpleBinaryOpTest__ShuffleByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__ShuffleByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Byte[] inArray1, Byte[] inArray2, Byte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__ShuffleByte testClass) - { - var result = Ssse3.Shuffle(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__ShuffleByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Ssse3.Shuffle( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Byte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Byte); - - private static Byte[] _data1 = new Byte[Op1ElementCount]; - private static Byte[] _data2 = new Byte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__ShuffleByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__ShuffleByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } - _dataTable = new DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Ssse3.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Ssse3.Shuffle( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Ssse3.Shuffle( - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Ssse3.Shuffle( - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.Shuffle), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.Shuffle), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.Shuffle), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Ssse3.Shuffle( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Ssse3.Shuffle( - Sse2.LoadVector128((Byte*)(pClsVar1)), - Sse2.LoadVector128((Byte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Ssse3.Shuffle(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = Ssse3.Shuffle(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArray2Ptr)); - var result = Ssse3.Shuffle(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__ShuffleByte(); - var result = Ssse3.Shuffle(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__ShuffleByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Ssse3.Shuffle( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Ssse3.Shuffle(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Ssse3.Shuffle( - Sse2.LoadVector128((Byte*)(pFld1)), - Sse2.LoadVector128((Byte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Ssse3.Shuffle(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Ssse3.Shuffle( - Sse2.LoadVector128((Byte*)(&test._fld1)), - Sse2.LoadVector128((Byte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Byte[] inArray1 = new Byte[Op1ElementCount]; - Byte[] inArray2 = new Byte[Op2ElementCount]; - Byte[] outArray = new Byte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Byte[] left, Byte[] right, Byte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((right[0] > 127) ? 0 : left[right[0] & 0x0F])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((right[i] > 127) ? 0 : left[right[i] & 0x0F])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Ssse3)}.{nameof(Ssse3.Shuffle)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Shuffle.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Shuffle.SByte.cs deleted file mode 100644 index 0645602e8107..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Shuffle.SByte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void ShuffleSByte() - { - var test = new SimpleBinaryOpTest__ShuffleSByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__ShuffleSByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__ShuffleSByte testClass) - { - var result = Ssse3.Shuffle(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__ShuffleSByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Ssse3.Shuffle( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__ShuffleSByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__ShuffleSByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Ssse3.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Ssse3.Shuffle( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Ssse3.Shuffle( - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Ssse3.Shuffle( - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.Shuffle), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.Shuffle), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.Shuffle), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Ssse3.Shuffle( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Ssse3.Shuffle( - Sse2.LoadVector128((SByte*)(pClsVar1)), - Sse2.LoadVector128((SByte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Ssse3.Shuffle(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Ssse3.Shuffle(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Ssse3.Shuffle(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__ShuffleSByte(); - var result = Ssse3.Shuffle(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__ShuffleSByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Ssse3.Shuffle( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Ssse3.Shuffle(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Ssse3.Shuffle( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Ssse3.Shuffle(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Ssse3.Shuffle( - Sse2.LoadVector128((SByte*)(&test._fld1)), - Sse2.LoadVector128((SByte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != ((right[0] < 0) ? 0 : left[right[0] & 0x0F])) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != ((right[i] < 0) ? 0 : left[right[i] & 0x0F])) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Ssse3)}.{nameof(Ssse3.Shuffle)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Sign.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Sign.Int16.cs deleted file mode 100644 index 43d7759ef8b9..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Sign.Int16.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void SignInt16() - { - var test = new SimpleBinaryOpTest__SignInt16(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__SignInt16 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int16[] inArray1, Int16[] inArray2, Int16[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__SignInt16 testClass) - { - var result = Ssse3.Sign(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__SignInt16 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Ssse3.Sign( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int16); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int16); - - private static Int16[] _data1 = new Int16[Op1ElementCount]; - private static Int16[] _data2 = new Int16[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__SignInt16() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__SignInt16() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } - _dataTable = new DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Ssse3.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Ssse3.Sign( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Ssse3.Sign( - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Ssse3.Sign( - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.Sign), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.Sign), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.Sign), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Ssse3.Sign( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Ssse3.Sign( - Sse2.LoadVector128((Int16*)(pClsVar1)), - Sse2.LoadVector128((Int16*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Ssse3.Sign(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Ssse3.Sign(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArray2Ptr)); - var result = Ssse3.Sign(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__SignInt16(); - var result = Ssse3.Sign(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__SignInt16(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Ssse3.Sign( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Ssse3.Sign(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Ssse3.Sign( - Sse2.LoadVector128((Int16*)(pFld1)), - Sse2.LoadVector128((Int16*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Ssse3.Sign(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Ssse3.Sign( - Sse2.LoadVector128((Int16*)(&test._fld1)), - Sse2.LoadVector128((Int16*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int16[] inArray1 = new Int16[Op1ElementCount]; - Int16[] inArray2 = new Int16[Op2ElementCount]; - Int16[] outArray = new Int16[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int16[] left, Int16[] right, Int16[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (right[0] < 0 ? (short)(-left[0]) : (right[0] > 0 ? left[0] : 0))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (right[i] < 0 ? (short)(-left[i]) : (right[i] > 0 ? left[i] : 0))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Ssse3)}.{nameof(Ssse3.Sign)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Sign.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Sign.Int32.cs deleted file mode 100644 index 4b19bbfa30ab..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Sign.Int32.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void SignInt32() - { - var test = new SimpleBinaryOpTest__SignInt32(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__SignInt32 - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(Int32[] inArray1, Int32[] inArray2, Int32[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__SignInt32 testClass) - { - var result = Ssse3.Sign(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__SignInt32 testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Ssse3.Sign( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - - private static Int32[] _data1 = new Int32[Op1ElementCount]; - private static Int32[] _data2 = new Int32[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__SignInt32() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__SignInt32() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } - _dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Ssse3.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Ssse3.Sign( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Ssse3.Sign( - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Ssse3.Sign( - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.Sign), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.Sign), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.Sign), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Ssse3.Sign( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Ssse3.Sign( - Sse2.LoadVector128((Int32*)(pClsVar1)), - Sse2.LoadVector128((Int32*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Ssse3.Sign(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Ssse3.Sign(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((Int32*)(_dataTable.inArray2Ptr)); - var result = Ssse3.Sign(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__SignInt32(); - var result = Ssse3.Sign(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__SignInt32(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Ssse3.Sign( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Ssse3.Sign(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Ssse3.Sign( - Sse2.LoadVector128((Int32*)(pFld1)), - Sse2.LoadVector128((Int32*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Ssse3.Sign(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Ssse3.Sign( - Sse2.LoadVector128((Int32*)(&test._fld1)), - Sse2.LoadVector128((Int32*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - Int32[] inArray1 = new Int32[Op1ElementCount]; - Int32[] inArray2 = new Int32[Op2ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (right[0] < 0 ? (int)(-left[0]) : (right[0] > 0 ? left[0] : 0))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (right[i] < 0 ? (int)(-left[i]) : (right[i] > 0 ? left[i] : 0))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Ssse3)}.{nameof(Ssse3.Sign)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Sign.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Sign.SByte.cs deleted file mode 100644 index 371de9cb7d43..000000000000 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Sign.SByte.cs +++ /dev/null @@ -1,585 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/****************************************************************************** - * This file is auto-generated from a template file by the GenerateTests.csx * - * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make * - * changes, please update the corresponding template and run according to the * - * directions listed in the file. * - ******************************************************************************/ - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; - -namespace JIT.HardwareIntrinsics.X86 -{ - public static partial class Program - { - private static void SignSByte() - { - var test = new SimpleBinaryOpTest__SignSByte(); - - if (test.IsSupported) - { - // Validates basic functionality works, using Unsafe.Read - test.RunBasicScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates basic functionality works, using Load - test.RunBasicScenario_Load(); - - // Validates basic functionality works, using LoadAligned - test.RunBasicScenario_LoadAligned(); - } - - // Validates calling via reflection works, using Unsafe.Read - test.RunReflectionScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates calling via reflection works, using Load - test.RunReflectionScenario_Load(); - - // Validates calling via reflection works, using LoadAligned - test.RunReflectionScenario_LoadAligned(); - } - - // Validates passing a static member works - test.RunClsVarScenario(); - - if (Sse2.IsSupported) - { - // Validates passing a static member works, using pinning and Load - test.RunClsVarScenario_Load(); - } - - // Validates passing a local works, using Unsafe.Read - test.RunLclVarScenario_UnsafeRead(); - - if (Sse2.IsSupported) - { - // Validates passing a local works, using Load - test.RunLclVarScenario_Load(); - - // Validates passing a local works, using LoadAligned - test.RunLclVarScenario_LoadAligned(); - } - - // Validates passing the field of a local class works - test.RunClassLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local class works, using pinning and Load - test.RunClassLclFldScenario_Load(); - } - - // Validates passing an instance member of a class works - test.RunClassFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a class works, using pinning and Load - test.RunClassFldScenario_Load(); - } - - // Validates passing the field of a local struct works - test.RunStructLclFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing the field of a local struct works, using pinning and Load - test.RunStructLclFldScenario_Load(); - } - - // Validates passing an instance member of a struct works - test.RunStructFldScenario(); - - if (Sse2.IsSupported) - { - // Validates passing an instance member of a struct works, using pinning and Load - test.RunStructFldScenario_Load(); - } - } - else - { - // Validates we throw on unsupported hardware - test.RunUnsupportedScenario(); - } - - if (!test.Succeeded) - { - throw new Exception("One or more scenarios did not complete as expected."); - } - } - } - - public sealed unsafe class SimpleBinaryOpTest__SignSByte - { - private struct DataTable - { - private byte[] inArray1; - private byte[] inArray2; - private byte[] outArray; - - private GCHandle inHandle1; - private GCHandle inHandle2; - private GCHandle outHandle; - - private ulong alignment; - - public DataTable(SByte[] inArray1, SByte[] inArray2, SByte[] outArray, int alignment) - { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf(); - int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf(); - if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) - { - throw new ArgumentException("Invalid value of alignment"); - } - - this.inArray1 = new byte[alignment * 2]; - this.inArray2 = new byte[alignment * 2]; - this.outArray = new byte[alignment * 2]; - - this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); - this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); - this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); - - this.alignment = (ulong)alignment; - - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As(ref inArray1[0]), (uint)sizeOfinArray1); - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); - } - - public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); - public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); - public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); - - public void Dispose() - { - inHandle1.Free(); - inHandle2.Free(); - outHandle.Free(); - } - - private static unsafe void* Align(byte* buffer, ulong expectedAlignment) - { - return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); - } - } - - private struct TestStruct - { - public Vector128 _fld1; - public Vector128 _fld2; - - public static TestStruct Create() - { - var testStruct = new TestStruct(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - return testStruct; - } - - public void RunStructFldScenario(SimpleBinaryOpTest__SignSByte testClass) - { - var result = Ssse3.Sign(_fld1, _fld2); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - - public void RunStructFldScenario_Load(SimpleBinaryOpTest__SignSByte testClass) - { - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Ssse3.Sign( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(testClass._dataTable.outArrayPtr, result); - testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); - } - } - } - - private static readonly int LargestVectorSize = 16; - - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(SByte); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(SByte); - - private static SByte[] _data1 = new SByte[Op1ElementCount]; - private static SByte[] _data2 = new SByte[Op2ElementCount]; - - private static Vector128 _clsVar1; - private static Vector128 _clsVar2; - - private Vector128 _fld1; - private Vector128 _fld2; - - private DataTable _dataTable; - - static SimpleBinaryOpTest__SignSByte() - { - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - } - - public SimpleBinaryOpTest__SignSByte() - { - Succeeded = true; - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } - _dataTable = new DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); - } - - public bool IsSupported => Ssse3.IsSupported; - - public bool Succeeded { get; set; } - - public void RunBasicScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - - var result = Ssse3.Sign( - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - - var result = Ssse3.Sign( - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunBasicScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); - - var result = Ssse3.Sign( - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.Sign), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArray1Ptr), - Unsafe.Read>(_dataTable.inArray2Ptr) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.Sign), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunReflectionScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned)); - - var result = typeof(Ssse3).GetMethod(nameof(Ssse3.Sign), new Type[] { typeof(Vector128), typeof(Vector128) }) - .Invoke(null, new object[] { - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)), - Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)) - }); - - Unsafe.Write(_dataTable.outArrayPtr, (Vector128)(result)); - ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario)); - - var result = Ssse3.Sign( - _clsVar1, - _clsVar2 - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - - public void RunClsVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load)); - - fixed (Vector128* pClsVar1 = &_clsVar1) - fixed (Vector128* pClsVar2 = &_clsVar2) - { - var result = Ssse3.Sign( - Sse2.LoadVector128((SByte*)(pClsVar1)), - Sse2.LoadVector128((SByte*)(pClsVar2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr); - } - } - - public void RunLclVarScenario_UnsafeRead() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - - var op1 = Unsafe.Read>(_dataTable.inArray1Ptr); - var op2 = Unsafe.Read>(_dataTable.inArray2Ptr); - var result = Ssse3.Sign(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load)); - - var op1 = Sse2.LoadVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Ssse3.Sign(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunLclVarScenario_LoadAligned() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned)); - - var op1 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray1Ptr)); - var op2 = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArray2Ptr)); - var result = Ssse3.Sign(op1, op2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(op1, op2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario)); - - var test = new SimpleBinaryOpTest__SignSByte(); - var result = Ssse3.Sign(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunClassLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load)); - - var test = new SimpleBinaryOpTest__SignSByte(); - - fixed (Vector128* pFld1 = &test._fld1) - fixed (Vector128* pFld2 = &test._fld2) - { - var result = Ssse3.Sign( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - } - - public void RunClassFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - - var result = Ssse3.Sign(_fld1, _fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - - public void RunClassFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load)); - - fixed (Vector128* pFld1 = &_fld1) - fixed (Vector128* pFld2 = &_fld2) - { - var result = Ssse3.Sign( - Sse2.LoadVector128((SByte*)(pFld1)), - Sse2.LoadVector128((SByte*)(pFld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); - } - } - - public void RunStructLclFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); - - var test = TestStruct.Create(); - var result = Ssse3.Sign(test._fld1, test._fld2); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructLclFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load)); - - var test = TestStruct.Create(); - var result = Ssse3.Sign( - Sse2.LoadVector128((SByte*)(&test._fld1)), - Sse2.LoadVector128((SByte*)(&test._fld2)) - ); - - Unsafe.Write(_dataTable.outArrayPtr, result); - ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); - } - - public void RunStructFldScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); - - var test = TestStruct.Create(); - test.RunStructFldScenario(this); - } - - public void RunStructFldScenario_Load() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load)); - - var test = TestStruct.Create(); - test.RunStructFldScenario_Load(this); - } - - public void RunUnsupportedScenario() - { - TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); - - bool succeeded = false; - - try - { - RunBasicScenario_UnsafeRead(); - } - catch (PlatformNotSupportedException) - { - succeeded = true; - } - - if (!succeeded) - { - Succeeded = false; - } - } - - private void ValidateResult(Vector128 op1, Vector128 op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), op1); - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), op2); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") - { - SByte[] inArray1 = new SByte[Op1ElementCount]; - SByte[] inArray2 = new SByte[Op2ElementCount]; - SByte[] outArray = new SByte[RetElementCount]; - - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); - - ValidateResult(inArray1, inArray2, outArray, method); - } - - private void ValidateResult(SByte[] left, SByte[] right, SByte[] result, [CallerMemberName] string method = "") - { - bool succeeded = true; - - if (result[0] != (right[0] < 0 ? (sbyte)(-left[0]) : (right[0] > 0 ? left[0] : 0))) - { - succeeded = false; - } - else - { - for (var i = 1; i < RetElementCount; i++) - { - if (result[i] != (right[i] < 0 ? (sbyte)(-left[i]) : (right[i] > 0 ? left[i] : 0))) - { - succeeded = false; - break; - } - } - } - - if (!succeeded) - { - TestLibrary.TestFramework.LogInformation($"{nameof(Ssse3)}.{nameof(Ssse3.Sign)}(Vector128, Vector128): {method} failed:"); - TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); - TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); - TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); - TestLibrary.TestFramework.LogInformation(string.Empty); - - Succeeded = false; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/add.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/add.il deleted file mode 100644 index 07fa8668c546..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/add.il +++ /dev/null @@ -1,123 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -//----------------------------------------------------- -// ADD -//----------------------------------------------------- -// Smoke level tests of the ADD instruction -//----------------------------------------------------- -// Notes: -// Will we ever be able to _add R4's _and R8's, I4's _and I8's? -//----------------------------------------------------- - - -.assembly add.exe{ - //This byte field requests that this assembly not be verified at run time and corresponds to this C# declaration: - //[assembly:System.Security.Permissions.SecurityPermissionAttribute( [mscorlib]System.Security.Permissions.SecurityAction.RequestMinimum, Flags=System.Security.Permissions.SecurityPermissionFlag.SkipVerification )] -} - -.class public explicit _add { - -.field [0] int32 global0 -.field [4] int32 global1 - -.method public void .ctor() { ret } - -//------------------------- -// Entry point - Main - -//------------------------- -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 6 -.locals init (class _add target) -//---------------- -// begin testing - -//---------------- - - // creating new instance of _add and storing it - newobj instance void _add::.ctor() - stloc.0 - - - // -- I4 + I2 -- Make sure we can _add smaller types to larger types - ldc.i4 0xAABB - conv.i2 - ldc.i4 0x1111 - add - ldc.i4 0xFFFFBBCC - ceq - brfalse FAIL - // -- I4 + I4 -- - ldc.i4 0x11223344 - ldc.i4 0x11111111 - add - ldc.i4 0x22334455 - ceq - brfalse FAIL - - // -- I4 + & -- Managed ptr - - // -- I4 + * -- Unmanaged ptr - ldloc target - ldflda int32 _add::global0 - ldc.i4 0xAAAAAAAA - stind.i4 - - ldloc target - ldflda int32 _add::global1 - ldc.i4 0x44444444 - stind.i4 - - ldloc target - ldflda int32 _add::global0 - ldc.i4 0x4 - add - ldind.i4 - ldc.i4 0x44444444 - ceq - brfalse FAIL - - // -- I8 + I8 -- - ldc.i8 0x0011223344556677 - ldc.i8 0x7766554433221100 - add - ldc.i8 0x7777777777777777 - ceq - brfalse FAIL - // -- R4 + R4 -- - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x00000000) - add - ldc.r4 float32(0x3F800000) - ceq - brfalse FAIL - - // -- R8 + R8 -- - ldc.r8 float64(0xBFF0000000000000) - ldc.r8 float64(0x0000000000000000) - add - ldc.r8 float64(0xBFF0000000000000) - ceq - brfalse FAIL - -//---------------- -PASS: - ldstr "Test SUCCESS" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4 0x64 - ret -//---------------- -FAIL: - ldstr "Test FAILED" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4 0x0 - ret -} -} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/bne.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/bne.il deleted file mode 100644 index 53671c30a386..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/bne.il +++ /dev/null @@ -1,82 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} - -.assembly bne.exe{} - -.method public static int32 main(class [mscorlib]System.String[]) { -.locals (class [mscorlib]System.String) -.entrypoint - - ldc.i4 0x44444444 - ldc.i4 0x55555555 - bne.un next0 - br fail -next0: - ldc.i4 0x66666666 - ldc.i4 0x66666666 - bne.un fail - br next1 -next1: - ldc.i4 0x55555555 - ldc.i4 0x44444444 - bne.un next2 - br fail -next2: - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x3F800000) - bne.un next3 - br fail -next3: - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x3F800000) - bne.un fail - br next4 -next4: - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0xBF800000) - bne.un next5 - br fail -next5: - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x3F800000) - bne.un next6 - br fail -next6: - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x3F800000) - bne.un fail - br next7 -next7: - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0xBF800000) - bne.un next8 - br fail -next8: - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0x7FC00000) - bne.un next9 - br fail -next9: - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0x3F800000) - bne.un next10 - br fail -next10: - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x7FC00000) - bne.un pass - br fail - -pass: - ldc.i4 100 - br end -fail: - ldc.i4 0x0 - br end -end: - ret -} - diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/br.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/br.il deleted file mode 100644 index e6d2bef00136..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/br.il +++ /dev/null @@ -1,29 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} - -.assembly br.exe{} - -.class public _br { - - - -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 10 - - - br PASS - - -FAIL: - ldc.i4 0x0 - ret - -PASS: - ldc.i4 100 - ret -} -} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/brfalse.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/brfalse.il deleted file mode 100644 index f2c5299a2d00..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/brfalse.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. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} - -.assembly brfalse.exe{} - -.class public _brfalse { - -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 10 - - ldc.i4 0x0 - brfalse PASS - -FAIL: - ldc.i4 0x0 - ret -PASS: - ldc.i4 100 - ret -} -} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/brtrue.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/brtrue.il deleted file mode 100644 index 1f316114fbc7..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/brtrue.il +++ /dev/null @@ -1,24 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} - -.assembly brtrue.exe{} - -.class public _brtrue { - -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 10 - ldc.i4 0x1 - brtrue PASS - -FAIL: - ldc.i4 0x0 - ret -PASS: - ldc.i4 100 - ret -} -} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/call.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/call.il deleted file mode 100644 index c9f7c7da9cac..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/call.il +++ /dev/null @@ -1,37 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} - - - -.assembly call.exe{} - -.method public public static int32 test() { - ldc.i4 0xFF - ret -} - -.class public _call { - - -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 10 - call int32 test() - ldc.i4 0xFF - ceq - brfalse FAIL - -PASS: - ldc.i4 100 - ret -FAIL: - ldc.i4 0x0 - ret -} -} - - - diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/conv.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/conv.il deleted file mode 100644 index 977af42f8d3c..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/conv.il +++ /dev/null @@ -1,126 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} - -.assembly conv.exe{} - -.class public conv { - - - .data TAG = int32(0xFFFFFFFF) - -.method public static int32 i4(int32) { -.maxstack 2 - ldarg 0 - ret -} -.method public static int64 i8(int64) { -.maxstack 2 - ldarg 0 - ret -} -.method public static float32 r4(float32) { -.maxstack 2 - ldarg 0 - ret -} - -.method public static float64 r8(float64) { -.maxstack 2 - ldarg 0 - ret -} - -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 10 - ldc.i4 0x8F0F0F0F - call int32 conv::i4(int32) - conv.i1 - ldc.i4 0x0000000F - ceq - brfalse FAIL - ldc.i4 0x8F0F0F0F - call int32 conv::i4(int32) - conv.i2 - ldc.i4 0x00000F0F - ceq - brfalse FAIL - - ldc.i4 0x8F0F0F0F - call int32 conv::i4(int32) - conv.i8 - ldc.i8 0xFFFFFFFF8F0F0F0F - ceq - brfalse FAIL - ldc.i8 0x8111111111111111 - call int64 conv::i8(int64) - conv.i4 - ldc.i4 0x11111111 - ceq - brfalse FAIL - ldc.i4 0xFFFFFFFF - call int32 conv::i4(int32) - conv.r4 - ldc.r4 float32(0xBF800000) - ceq - brfalse FAIL - ldc.r4 float32(0xBF800000) - call float32 conv::r4(float32) - conv.i4 - ldc.i4 0xFFFFFFFF - ceq - brfalse FAIL - ldc.i4 0xFFFFFFFF - call int32 conv::i4(int32) - conv.r8 - ldc.r8 float64(0xBFF0000000000000) - ceq - brfalse FAIL - ldc.r8 float64(0xBFF0000000000000) - call float64 conv::r8(float64) - conv.i4 - ldc.i4 0xFFFFFFFF - ceq - brfalse FAIL - ldc.i8 0xFFFFFFFFFFFFFFFF - call int64 conv::i8(int64) - conv.r8 - ldc.r8 float64(0xBFF0000000000000) - ceq - brfalse FAIL - ldc.r8 float64(0xBFF0000000000000) - call float64 conv::r8(float64) - conv.i8 - ldc.i8 0xFFFFFFFFFFFFFFFF - ceq - brfalse FAIL - ldc.r4 float32(0xBF800000) - call float32 conv::r4(float32) - conv.i8 - ldc.i8 0xFFFFFFFFFFFFFFFF - ceq - brfalse FAIL - ldc.r4 float32(0xBF800000) - call float32 conv::r4(float32) - conv.r8 - ldc.r8 float64(0xBFF0000000000000) - ceq - brfalse FAIL - ldc.r8 float64(0xBFF0000000000000) - call float64 conv::r8(float64) - conv.r4 - ldc.r4 float32(0xBF800000) - ceq - brfalse FAIL - -PASS: - ldc.i4 100 - ret -FAIL: - ldc.i4 0x0 - ret -} -} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/cpblk.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/cpblk.il deleted file mode 100644 index f960249ef357..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/cpblk.il +++ /dev/null @@ -1,74 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} - -.assembly cpblk.exe{ -} - -.class public _cpblk { - - - - .field public static int32 DATA - .field public static int32 DATA2 - -.method public static int32 initialize() { - ldsflda int32 _cpblk::DATA - ldc.i4 0xAA - ldc.i4 4 - initblk - ldsflda int32 _cpblk::DATA - ldc.i4 4 - add - ldc.i4 0xFF - ldc.i4 4 - initblk - ldsflda int32 _cpblk::DATA - ldind.i4 - ldc.i4 0xAAAAAAAA - ceq - brfalse FAIL - ldsflda int32 _cpblk::DATA - ldc.i4 4 - add - ldind.i4 - ldc.i4 0xFFFFFFFF - ceq - brfalse FAIL - ldc.i4 0x00000001 - ret -FAIL: - ldc.i4 0x00000000 - ret -} - -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 10 - call int32 _cpblk::initialize() - brfalse FAIL - - ldsflda int32 _cpblk::DATA - ldc.i4 4 - add - ldsflda int32 _cpblk::DATA - ldc.i4 4 - cpblk - ldsflda int32 _cpblk::DATA - ldc.i4 4 - add - ldind.i4 - ldc.i4 0xAAAAAAAA - ceq - brfalse FAIL - -PASS: - ldc.i4 100 - ret -FAIL: - ldc.i4 0x0 - ret -} -} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/div.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/div.il deleted file mode 100644 index c70611ff1b3f..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/div.il +++ /dev/null @@ -1,101 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} - -.assembly div.exe{} - -.class public _div { - -.method public static int32 i4(int32,int32) { -.maxstack 2 - ldarg 0 - ldarg 1 - div - ret -} -.method public static int32 u4(int32,int32) { -.maxstack 2 - ldarg 0 - ldarg 1 - div.un - ret -} -.method public static int64 i8(int64,int64) { -.maxstack 2 - ldarg 0 - ldarg 1 - div - ret -} -.method public static int64 u8(int64,int64) { -.maxstack 2 - ldarg 0 - ldarg 1 - div.un - ret -} -.method public static float32 r4(float32,float32) { -.maxstack 2 - ldarg 0 - ldarg 1 - div - ret -} -.method public static float64 r8(float64,float64) { -.maxstack 2 - ldarg 0 - ldarg 1 - div - ret -} -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 10 - - ldc.i4 0xF0F0F0F0 - ldc.i4 0x01010101 - call int32 _div::i4(int32,int32) - ldc.i4 0xFFFFFFF1 - ceq - brfalse FAIL - ldc.i4 0xFFFFFFFF - ldc.i4 0x00000002 - call int32 _div::u4(int32,int32) - ldc.i4 0x7FFFFFFF - ceq - brfalse FAIL - ldc.i8 0xF0F0F0F0F0F0F0F0 - ldc.i8 0x0101010101010101 - call int64 _div::i8(int64,int64) - ldc.i8 0xFFFFFFFFFFFFFFF1 - ceq - brfalse FAIL - ldc.i8 0xFFFFFFFFFFFFFFFF - ldc.i8 0x0000000000000002 - call int64 _div::u8(int64,int64) - ldc.i8 0x7FFFFFFFFFFFFFFF - ceq - brfalse FAIL - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0xBF800000) - call float32 _div::r4(float32,float32) - ldc.r4 float32(0xBF800000) - ceq - brfalse FAIL - ldc.r8 float64(0x3FF0000000000000) - ldc.r8 float64(0xBFF0000000000000) - call float64 _div::r8(float64,float64) - ldc.r8 float64(0xBFF0000000000000) - ceq - brfalse FAIL - -PASS: - ldc.i4 100 - ret -FAIL: - ldc.i4 0x0 - ret -} -} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/initblk.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/initblk.il deleted file mode 100644 index 1def892d3e51..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/initblk.il +++ /dev/null @@ -1,35 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} - -.assembly initblk.exe{ -} - -.class public _initblk { - - - .field public static int32 DATA - -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 10 - ldsflda int32 _initblk::DATA - ldc.i4 0xAA - ldc.i4 4 - initblk - ldsflda int32 _initblk::DATA - ldind.i4 - ldc.i4 0xAAAAAAAA - ceq - brfalse FAIL - -PASS: - ldc.i4 100 - ret -FAIL: - ldc.i4 0x0 - ret -} -} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/jmp.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/jmp.il deleted file mode 100644 index ffa5d2d98fc3..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/jmp.il +++ /dev/null @@ -1,33 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} - -.assembly jmp.exe{ -} - -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.locals () -.maxstack 2 - jmp int32 _jmp::jmpTest(class [mscorlib]System.String[]) - ldc.i4 0x0 - ret -} - - - -.class public _jmp { -.method public void _jmp() { -.maxstack 4 - ret -} - -.method public static int32 jmpTest(class [mscorlib]System.String[]) { -.maxstack 4 - ldc.i4 100 - ret -} - -} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/ldind_stind.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/ldind_stind.il deleted file mode 100644 index ff90e1fa99da..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/ldind_stind.il +++ /dev/null @@ -1,98 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} - -.assembly ldind_stind.exe{} - -.class public ldind_stind { - - - .field public static int8 I1 - .field public static int16 I2 - .field public static int32 I4 - .field public static int64 I8 - .field public static float32 R4 - .field public static float64 R8 - .field public static native int I - - -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 10 - ldsflda int8 ldind_stind::I1 - ldc.i4 0x00000011 - stind.i1 - - ldsflda int16 ldind_stind::I2 - ldc.i4 0x00002222 - stind.i2 - - ldsflda int32 ldind_stind::I4 - ldc.i4 0x44444444 - stind.i4 - ldsflda int64 ldind_stind::I8 - ldc.i8 0x8888888888888888 - stind.i8 - ldsflda float32 ldind_stind::R4 - ldc.r4 float32(0x3F800000) - stind.r4 - - ldsflda float64 ldind_stind::R8 - ldc.r8 float64(0x3FF0000000000000) - stind.r8 - ldsflda native int ldind_stind::I - ldsflda native int ldind_stind::I - stind.i - - - ldsflda int8 ldind_stind::I1 - ldind.i1 - ldc.i4 0x00000011 - ceq - brfalse FAIL - - ldsflda int16 ldind_stind::I2 - ldind.i2 - ldc.i4 0x00002222 - ceq - brfalse FAIL - - ldsflda int32 ldind_stind::I4 - ldind.i4 - ldc.i4 0x44444444 - ceq - brfalse FAIL - ldsflda int64 ldind_stind::I8 - ldind.i8 - ldc.i8 0x8888888888888888 - ceq - brfalse FAIL - ldsflda float32 ldind_stind::R4 - ldind.r4 - ldc.r4 float32(0x3F800000) - ceq - brfalse FAIL - - ldsflda float64 ldind_stind::R8 - ldind.r8 - ldc.r8 float64(0x3FF0000000000000) - ceq - brfalse FAIL - ldsflda native int ldind_stind::I - ldind.i - conv.i4 - ldsfld native int ldind_stind::I - conv.i4 - ceq - brfalse FAIL - -PASS: - ldc.i4 100 - ret -FAIL: - ldc.i4 0x0 - ret -} -} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/ldloca.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/ldloca.il deleted file mode 100644 index 16e2150dd580..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/ldloca.il +++ /dev/null @@ -1,41 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} - -.assembly ldloca.exe{ -} - -.class public _ldloca { -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 10 -.locals (int32,int32&) - ldloca 0 - stloc 1 - - ldc.i4 0xFF - stloc 0 - ldloc 1 - ldind.i4 - ldc.i4 0xFF - ceq - brfalse FAIL - - ldc.i4 0xAA - stloc 0 - ldloc 1 - ldind.i4 - ldc.i4 0xAA - ceq - brfalse FAIL - -PASS: - ldc.i4 100 - ret -FAIL: - ldc.i4 0x0 - ret -} -} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/ldnull.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/ldnull.il deleted file mode 100644 index d2b0e46397c0..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/ldnull.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. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} - -.assembly ldnull.exe{} - -.class public _ldnull { - -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 10 - ldnull - ldnull - ceq - brfalse FAIL -PASS: - ldc.i4 100 - ret -FAIL: - ldc.i4 0x0 - ret -} -} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/nop.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/nop.il deleted file mode 100644 index c450f6ac83a6..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/nop.il +++ /dev/null @@ -1,61 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} - -.assembly nop.exe{} - -.class public _nop { - -.method public static int32 return(int32) { -.maxstack 2 - ldarg 0 - ret -} - -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 10 - ldc.i4 0xFF - call int32 _nop::return(int32) - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - ldc.i4 0xFF - call int32 _nop::return(int32) - ceq - brfalse FAIL - -PASS: - ldc.i4 100 - ret -FAIL: - ldc.i4 0x0 - ret -} -} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/rem.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/rem.il deleted file mode 100644 index 24d235506895..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/rem.il +++ /dev/null @@ -1,107 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} - -.assembly rem.exe{} - -.class public _rem { - -.method public static int32 I4(int32,int32,int32) { -.maxstack 3 - ldarg 0 - ldarg 1 - rem - ldarg 2 - ceq - ret -} -.method public static int32 I8(int64,int64,int64) { -.maxstack 3 - ldarg 0 - ldarg 1 - rem - ldarg 2 - ceq - ret -} -.method public static int32 U4(int32,int32,int32) { -.maxstack 3 - ldarg 0 - ldarg 1 - rem.un - ldarg 2 - ceq - ret -} -.method public static int32 U8(int64,int64,int64) { -.maxstack 3 - ldarg 0 - ldarg 1 - rem.un - ldarg 2 - ceq - ret -} -.method public static int32 R4(float32,float32,float32) { -.maxstack 3 - ldarg 0 - ldarg 1 - rem - ldarg 2 - ceq - ret -} -.method public static int32 R8(float64,float64,float64) { -.maxstack 3 - ldarg 0 - ldarg 1 - rem - ldarg 2 - ceq - ret -} - -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 10 - ldc.i4 10 - ldc.i4 4 - ldc.i4 2 - call int32 _rem::I4(int32,int32,int32) - brfalse FAIL - ldc.i4 10 - ldc.i4 4 - ldc.i4 2 - call int32 _rem::U4(int32,int32,int32) - brfalse FAIL - ldc.i8 10 - ldc.i8 4 - ldc.i8 2 - call int32 _rem::I8(int64,int64,int64) - brfalse FAIL - ldc.i8 10 - ldc.i8 4 - ldc.i8 2 - call int32 _rem::U8(int64,int64,int64) - brfalse FAIL - ldc.r4 3.5 - ldc.r4 1 - ldc.r4 0.5 - call int32 _rem::R4(float32,float32,float32) - brfalse FAIL - ldc.r8 9.25 - ldc.r8 1.5 - ldc.r8 .25 - call int32 _rem::R8(float64,float64,float64) - brfalse FAIL - -PASS: - ldc.i4 100 - ret -FAIL: - ldc.i4 0x0 - ret -} -} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/ret.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/ret.il deleted file mode 100644 index fb24a0515270..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/ret.il +++ /dev/null @@ -1,109 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} - -.assembly ret.exe{} - -.class public _ret { - - -.field public static native int PTR - -.method public void .ctor() { - -.maxstack 10 - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret -} - -.method public static int32 _rem(int32) { -.maxstack 5 - ldarg 0 - ret -} - -.method public static int64 reti8(int64) { -.maxstack 5 - ldarg 0 - ret -} - -.method public static float32 retr4(float32) { -.maxstack 5 - ldarg 0 - ret -} - -.method public static float64 retr8(float64) { -.maxstack 5 - ldarg 0 - ret -} - -.method public static class _ret retref(class _ret) { -.maxstack 5 - ldarg 0 - ret -} - -.method public static int32 retI(int32*) { -.maxstack 5 - ldarg 0 - conv.i4 - ret -} - -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 10 -.locals (class _ret) - newobj instance void _ret::.ctor() - stloc 0 - - ldc.i4 0x1 - call int32 _ret::_rem(int32) - ldc.i4 0x1 - ceq - brfalse FAIL - - ldc.i8 0x2 - call int64 _ret::reti8(int64) - ldc.i8 0x2 - ceq - brfalse FAIL - ldc.r4 1.1 - call float32 _ret::retr4(float32) - ldc.r4 1.1 - ceq - brfalse FAIL - - ldc.r8 2.2 - call float64 _ret::retr8(float64) - ldc.r8 2.2 - ceq - brfalse FAIL - - ldloc 0 - call class _ret _ret::retref(class _ret) - ldloc 0 - ceq - brfalse FAIL - - ldsflda native int _ret::PTR - call int32 _ret::retI(int32*) - ldsflda native int _ret::PTR - conv.i4 - ceq - brfalse FAIL - -PASS: - ldc.i4 100 - ret -FAIL: - ldc.i4 0x0 - ret -} -} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/switch.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/switch.il deleted file mode 100644 index 65ae3c740695..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/switch.il +++ /dev/null @@ -1,63 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} - -.assembly switch.exe{} - -.class public _switch { - -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 10 -.locals (int32) - ldc.i4 0x0 - stloc 0 - ldc.i4 0x0 - - TAG: - switch (TC1,TC2,TC3) - ldloc 0 - ldc.i4 0x3 - ceq - brfalse FAIL - br PASS - - TC1: - ldloc 0 - ldc.i4 0x1 - add - stloc 0 - - ldc.i4 0x1 - br TAG - - TC2: - ldloc 0 - ldc.i4 0x1 - add - stloc 0 - - ldc.i4 0x2 - br TAG - - TC3: - ldloc 0 - ldc.i4 0x1 - add - stloc 0 - - ldc.i4 0x3 - br TAG - - br FAIL - -PASS: - ldc.i4 100 - ret -FAIL: - ldc.i4 0x0 - ret -} -} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/tailcall.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/tailcall.il deleted file mode 100644 index 4aa8b943d0a2..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/tailcall.il +++ /dev/null @@ -1,91 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - -.assembly extern System.Console { auto } -.assembly extern legacy library mscorlib { auto } - - -.assembly tailcall.exe{} - -.method public static int32 main(string[]) { -.locals (class [mscorlib]System.IO.TextWriter,class _tailcall) -.entrypoint - call class [mscorlib]System.IO.TextWriter [System.Console]System.Console::get_Out() - stloc 0 - newobj instance void _tailcall::.ctor() - stloc 1 - - ldloc 1 - callvirt instance int32 _tailcall::method1() - - ldc.i4 0x1234 - bne.un fail - -pass: - ldloc 0 - ldstr "TAILCALL Tests PASS." - - - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldc.i4 100 - br end -fail: - ldloc 0 - ldstr "!!! FAILURE !!! - TAILCALL TESTS FAIL - !!! FAILURE !!!" - - - - - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldc.i4 0x0 - br end -end: - ret -} - - -.class public _tailcall { -.method public void .ctor() { - -.maxstack 10 - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - call class [mscorlib]System.IO.TextWriter [System.Console]System.Console::get_Out() - ldstr "TAILCALL test initialized." - - - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ret -} - -.method public int32 method1() { -.locals (int32,string) - - call class [mscorlib]System.IO.TextWriter [System.Console]System.Console::get_Out() - ldstr "Beginning Test." - - - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - - ldarg 0 //this ptr - tail. - callvirt instance int32 _tailcall::method2() - ret - -} - -.method public int32 method2() { -.locals () - - call class [mscorlib]System.IO.TextWriter [System.Console]System.Console::get_Out() - ldstr "Method2 has been called." - - - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldc.i4 0x1234 - ret //we should return from here to main. - -} -} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/volatile.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/volatile.il deleted file mode 100644 index 1fbcca6b1d3f..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Base/volatile.il +++ /dev/null @@ -1,31 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.assembly volatile.exe{} -.class public _volatile -{ - .field public static native int PTR - .method public static int32 main(class [mscorlib]System.String[]) - { - .entrypoint - .locals () - .maxstack 2 - ldc.i4 0xFFAAFFAA - conv.i - stsfld native int _volatile::PTR - ldsflda native int _volatile::PTR - volatile. - ldind.i - ldc.i4 0xFFAAFFAA - conv.i - bne.un FAIL - PASS: - ldc.i4 100 - ret - FAIL: - ldc.i4 0x0 - ret - } -} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/br.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/br.il deleted file mode 100644 index dbf089cc120e..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/br.il +++ /dev/null @@ -1,95 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.class public _br { -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 20 -.locals (int32,int32) - ldc.i4 0x0 - dup - stloc 0 - stloc 1 - -BEGIN: - ldloc 0 - dup - ldc.i4 0x0 - ceq - ldloc 1 - add - stloc 1 - ldc.i4 0x1 - add - stloc 0 - br TAG4 - -TAG1: - ldloc 0 - dup - ldc.i4 0x9 - ceq - ldloc 1 - add - stloc 1 - ldc.i4 0x2 - add - stloc 0 - br TAG3 - -TAG2: - ldloc 0 - dup - ldc.i4 0x11 - ceq - ldloc 1 - add - stloc 1 - ldc.i4 0x4 - add - stloc 0 - br END - -TAG3: - ldloc 0 - dup - ldc.i4 0xB - ceq - ldloc 1 - add - stloc 1 - ldc.i4 0x6 - add - stloc 0 - br TAG2 - -TAG4: - ldloc 0 - dup - ldc.i4 0x1 - ceq - ldloc 1 - add - stloc 1 - ldc.i4 0x8 - add - stloc 0 - br TAG1 - -END: - br 0 - ldloc 1 - ldc.i4 0x00000005 - ceq - brfalse FAIL - - ldc.i4 100 - ret -FAIL: - ldc.i4 0x0 - ret -} -} -.assembly br.exe{} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/brfalse.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/brfalse.il deleted file mode 100644 index 9636e3cf7e69..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/brfalse.il +++ /dev/null @@ -1,141 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.class public _brfalse { -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 20 -.locals (int32,int32) - ldc.i4 0x0 - dup - stloc 0 - stloc 1 - -BEGIN: - ldc.i4 0x1 - ldloc 0 - add - dup - stloc 0 - ldc.i4 0x1 - ceq - ldloc 1 - add - stloc 1 - - ldc.i4 0x0 - brfalse TAG3 - - -TAG1: - ldc.i4 0x2 - ldloc 0 - add - dup - stloc 0 - ldc.i4 0xB - ceq - ldloc 1 - add - stloc 1 - - ldc.i4 0x1 - brfalse END - ldc.i4 0x0 - brfalse 0 - - -TAG2: - ldc.i4 0x4 - ldloc 0 - add - dup - stloc 0 - ldc.i4 0xF - ceq - ldloc 1 - add - stloc 1 - - ldc.i4 0x0 - brfalse BOUNDS_TEST - - -TAG3: - ldc.i4 0x8 - ldloc 0 - add - dup - stloc 0 - ldc.i4 0x9 - ceq - ldloc 1 - add - stloc 1 - - ldc.i4 0x1 - brfalse END - ldc.i4 0x0 - brfalse TAG1 - -BOUNDS_TEST: - ldc.i4 0xFFFFFFFF - brfalse END - ldc.i4 0x1 - ldloc 1 - add - stloc 1 - - ldc.i4 0x7FFFFFFF - brfalse END - ldc.i4 0x1 - ldloc 1 - add - stloc 1 - - ldc.i4 0x80000000 - brfalse END - ldc.i4 0x1 - ldloc 1 - add - stloc 1 - - ldc.i4 0x55555555 - brfalse END - ldc.i4 0x1 - ldloc 1 - add - stloc 1 - - ldc.i4 0xAAAAAAAA - brfalse END - ldc.i4 0x1 - ldloc 1 - add - stloc 1 - - ldc.i4 0x00000000 - brfalse END - ldc.i4 0x1 - ldloc 1 - add - stloc 1 - - -END: - ldloc 1 - ldc.i4 0x00000009 - ceq - brfalse FAIL -PASS: - ldc.i4 100 - ret -FAIL: - ldc.i4 0x0 - ret - -} -} -.assembly brfalse.exe{} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/brtrue.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/brtrue.il deleted file mode 100644 index 22cf8d3773d8..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/brtrue.il +++ /dev/null @@ -1,149 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.class public _brtrue { -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 20 -.locals (int32,int32) - ldc.i4 0x0 - dup - stloc 0 - stloc 1 - -BEGIN: - ldc.i4 0x1 - ldloc 0 - add - dup - stloc 0 - ldc.i4 0x1 - ceq - ldloc 1 - add - stloc 1 - - ldc.i4 0x1 - brtrue TAG3 - - -TAG1: - ldc.i4 0x2 - ldloc 0 - add - dup - stloc 0 - ldc.i4 0xB - ceq - ldloc 1 - add - stloc 1 - - ldc.i4 0x0 - brtrue END - ldc.i4 0x1 - brtrue 0 - - -TAG2: - ldc.i4 0x4 - ldloc 0 - add - dup - stloc 0 - ldc.i4 0xF - ceq - ldloc 1 - add - stloc 1 - - ldc.i4 0x1 - brtrue BOUNDS_TEST - - -TAG3: - ldc.i4 0x8 - ldloc 0 - add - dup - stloc 0 - ldc.i4 0x9 - ceq - ldloc 1 - add - stloc 1 - - ldc.i4 0x0 - brtrue END - ldc.i4 0x1 - brtrue TAG1 - - - - -BOUNDS_TEST: - ldc.i4 0xFFFFFFFF - brtrue BT1 - ldc.i4 0x1 - ldloc 1 - add - stloc 1 - -BT1: - ldc.i4 0x7FFFFFFF - brtrue BT2 - ldc.i4 0x1 - ldloc 1 - add - stloc 1 - -BT2: - ldc.i4 0x80000000 - brtrue BT3 - ldc.i4 0x1 - ldloc 1 - add - stloc 1 - -BT3: - ldc.i4 0x55555555 - brtrue BT4 - ldc.i4 0x1 - ldloc 1 - add - stloc 1 - -BT4: - ldc.i4 0xAAAAAAAA - brtrue BT5 - ldc.i4 0x1 - ldloc 1 - add - stloc 1 - -BT5: - ldc.i4 0x00000000 - brtrue END - ldc.i4 0x1 - ldloc 1 - add - stloc 1 - - -END: - ldloc 1 - ldc.i4 0x00000005 - ceq - brfalse FAIL -PASS: - ldc.i4 100 - ret -FAIL: - ldc.i4 0x1 - ret - -} -} -.assembly brtrue.exe{} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/call.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/call.il deleted file mode 100644 index b9f274a43907..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/call.il +++ /dev/null @@ -1,33 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.method public static int32 test() { - ldc.i4 0xFF - ret -} - -.class public _call { -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 10 - call int32 test() - ldc.i4 0xFF - ceq - brfalse FAIL - -PASS: - ldc.i4 100 - ret -FAIL: - ldc.i4 0x0 - ret -} -} - - - - - -.assembly call.exe{} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/cpblk.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/cpblk.il deleted file mode 100644 index a6eabfcf4caf..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/cpblk.il +++ /dev/null @@ -1,82 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.class public _cpblk { - - - -.field public static int32 DATA -.field public static int32 DATA2 - -.method public static int32 initialize() { - ldsflda int32 _cpblk::DATA - ldc.i4 0xAA - ldc.i4 4 - initblk - ldsflda int32 _cpblk::DATA - ldc.i4 4 - add - ldc.i4 0xFF - ldc.i4 4 - initblk - ldsflda int32 _cpblk::DATA - ldind.i4 - ldc.i4 0xAAAAAAAA - ceq - brfalse FAIL - ldsflda int32 _cpblk::DATA - ldc.i4 4 - add - ldind.i4 - ldc.i4 0xFFFFFFFF - ceq - brfalse FAIL - ldc.i4 0x00000001 - ret -FAIL: - ldc.i4 0x00000000 - ret -} - -.method public void _cpblk() { -.maxstack 0 - ret -} - -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 5 - call int32 _cpblk::initialize() - brfalse FAIL - - ldsflda int32 _cpblk::DATA - ldc.i4 4 - add - ldsflda int32 _cpblk::DATA - ldc.i4 4 - cpblk - ldsflda int32 _cpblk::DATA - ldc.i4 4 - add - ldind.i4 - ldc.i4 0xAAAAAAAA - ceq - brfalse FAIL - -PASS: - ldc.i4 100 - br END - -FAIL: - ldc.i4 0x00000000 - -END: - ret -} -} - - - -.assembly cpblk.exe{} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/initblk.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/initblk.il deleted file mode 100644 index 0b5e2df92f5e..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/initblk.il +++ /dev/null @@ -1,47 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.class public _initblk { - - -.field public static int32 DATA - - - -.method public void _initblk() { -.maxstack 0 - ret -} - -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 5 - - ldsflda int32 _initblk::DATA - ldc.i4 0xAA - ldc.i4 4 - initblk - ldsflda int32 _initblk::DATA - ldind.i4 - ldc.i4 0xAAAAAAAA - ceq - brfalse FAIL - - -PASS: - ldc.i4 100 - br END - -FAIL: - ldc.i4 0x00000000 - -END: - ret -} -} - - - -.assembly initblk.exe{} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/ldftn.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/ldftn.il deleted file mode 100644 index bbd220c6c797..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/ldftn.il +++ /dev/null @@ -1,49 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} - - -.method public static int32 foo(int32) { - ldarg 0 - ldc.i4 0x2 - mul - ret -} - -.method public static int32 foo(int32,int32) { - ldarg 0 - ldarg 1 - mul - ret -} - -.class public Ldftn { -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 20 - ldftn int32 foo(int32) - ldftn int32 foo(int32) - ceq - brfalse FAIL - - ldftn int32 foo(int32,int32) - ldftn int32 foo(int32,int32) - ceq - brfalse FAIL - - ldftn int32 foo(int32) - ldftn int32 foo(int32,int32) - ceq - brtrue FAIL - - - ldc.i4 100 - ret -FAIL: - ldc.i4 0x0 - ret -} -} -.assembly ldftn.exe{} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/ldvirtftn.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/ldvirtftn.il deleted file mode 100644 index cf628fa9e906..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/ldvirtftn.il +++ /dev/null @@ -1,26 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - -.assembly extern mscorlib {} -.class public Ldvirtftn { -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 20 -.locals () - newobj instance void [mscorlib]System.Object::.ctor() - ldvirtftn instance class [mscorlib]System.String [mscorlib]System.Object::ToString() - newobj instance void [mscorlib]System.Object::.ctor() - ldvirtftn instance class [mscorlib]System.String [mscorlib]System.Object::ToString() - ceq - brfalse FAIL - - ldc.i4 100 - ret -FAIL: - ldc.i4 0x0 - ret -} -} -.assembly ldvirtftn.exe{} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/localloc.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/localloc.il deleted file mode 100644 index 3aa9c1cc7826..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/localloc.il +++ /dev/null @@ -1,112 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.class public _localloc { - -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.locals (native int) -.maxstack 10 - - ldc.i4 0x1 - localloc - stloc 0 - ldloc 0 - ldc.i4 0x8 - conv.i - stind.i - ldloc 0 - ldind.i - ldc.i4 0x8 - conv.i - bne.un FAIL - - - ldc.i4 0x1 - localloc - stloc 0 - ldloc 0 - ldc.i4 0x99 - conv.i1 - stind.i - ldloc 0 - ldind.i1 - ldc.i4 0x99 - conv.i1 - bne.un FAIL - - - ldc.i4 0x2 - localloc - stloc 0 - ldloc 0 - ldc.i4 100 - conv.i2 - stind.i2 - ldloc 0 - ldind.i2 - ldc.i4 100 - conv.i2 - bne.un FAIL - - - ldc.i4 0x4 - localloc - stloc 0 - ldloc 0 - ldc.i4 0xBBBBBBBB - stind.i4 - ldloc 0 - ldind.i4 - ldc.i4 0xBBBBBBBB - bne.un FAIL - - - ldc.i4 0x8 - localloc - stloc 0 - ldloc 0 - ldc.i8 0xCCCCCCCCCCCCCCCC - stind.i8 - ldloc 0 - ldind.i8 - ldc.i8 0xCCCCCCCCCCCCCCCC - bne.un FAIL - - - ldc.i4 0x4 - localloc - stloc 0 - ldloc 0 - ldc.r4 0xDDDDDDDD - stind.r4 - ldloc 0 - ldind.r4 - ldc.r4 0xDDDDDDDD - bne.un FAIL - - - ldc.i4 0x8 - localloc - stloc 0 - ldloc 0 - ldc.r8 0xEEEEEEEEEEEEEEEE - stind.r8 - ldloc 0 - ldind.r8 - ldc.r8 0xEEEEEEEEEEEEEEEE - bne.un FAIL - - -PASS: - ldc.i4 100 - ret -FAIL: - ldc.i4 0x0 - ret - -} -} -.assembly localloc.exe{} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/nop.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/nop.il deleted file mode 100644 index 481c227261cb..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/nop.il +++ /dev/null @@ -1,71 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.assembly nop.exe{} - -.class public _nop { - - - -.method public static int32 return(int32) { -.maxstack 2 - ldarg 0 - ret -} - -.method public void _nop() { -.maxstack 0 - ret -} - -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 5 - - ldc.i4 0xFF - call int32 _nop::return(int32) - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - ldc.i4 0xFF - call int32 _nop::return(int32) - ceq - brfalse FAIL - -PASS: - ldc.i4 100 - br END - -FAIL: - ldc.i4 0x00000000 - -END: - ret -} -} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/rem_r4.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/rem_r4.il deleted file mode 100644 index 21d236995a56..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/rem_r4.il +++ /dev/null @@ -1,875 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly extern legacy library mscorlib {} - -.class public _rem { -//-- -.method public static int32 _rem(float32,float32,float32) { -.maxstack 3 -.locals (int32) - // -- load args _and divide - ldarg 0 - ldarg 1 - rem - // -- dup so the result remains after _call to checkfinite - dup - // -- see if our number is finite (_ret val of 0 is finite) - call int32 _rem::checkfinite(float32) - ldc.i4 0x0 - ceq - // -- If the result is finite, branch - brtrue COMPARE - - // -- our result was _not finite, now check abnormal case - // -- call checkfinite again on the initial result - // -- should return 1 for NaN, 2 fo -inf, 3 for +inf, _and 255 for error - call int32 _rem::checkfinite(float32) - - stloc 0 - ldloc 0 - ldc.i4 0xFF - ceq - brtrue FAIL // error while determining type - - // -- call checkfinite on our expected value. - ldarg 2 - call int32 _rem::checkfinite(float32) - - // -- if the results are == we PASS. If _not, FAIL. - ldloc 0 - ceq - // -- cannot be finite - // -- if the results are == we PASS. If _not, FAIL. - brfalse FAIL - - ldc.i4 0x1 - br FINISH - -COMPARE: - // -- our result was a finite number. - // -- compare it to our expected result. - ldarg 2 - ceq - brfalse FAIL - - ldc.i4 0x1 - br FINISH - -FAIL: - ldc.i4 0x0 - br FINISH - -FINISH: - ret -} - -//----------------------------- -.method public static int32 checkfinite(float32) { -.locals (class [mscorlib]System.ArithmeticException) -.maxstack 3 -// -- 0 if finite -// -- 1 for NaN -// -- 2 for -inf -// -- 3 for +inf -// -- 255 (0xFF) none of the above - -try_start: - ldarg 0 - ckfinite - pop - leave.s try_end -try_end: -// -- our result is a finite number. - ldc.i4 0x0 - br FINISH - -ae: -// -- our result is NaN, +inf, _or -inf. Find out which one. - isinst [mscorlib]System.ArithmeticException - stloc 0 - leave HEnd -HEnd: - - ldloc 0 - brfalse FAIL - - // -- check for -inf - ldarg 0 - ldc.r4 float32(0xFF800000) - ceq - brtrue NINF - - // -- check for +inf - ldarg 0 - ldc.r4 float32(0x7F800000) - ceq - brtrue PINF - - // -- must be NaN - ldc.i4 0x00000001 - br FINISH - -NINF: - ldc.i4 0x00000002 - br FINISH - -PINF: - ldc.i4 0x00000003 - br FINISH - -NaN: - ldc.i4 0x00000001 - br FINISH - -FAIL: -// pop - ldc.i4 0xFF - br FINISH - -FINISH: - ret -.try try_start to try_end catch [mscorlib]System.ArithmeticException handler ae to HEnd -} - -// -- Begin Main -------------------- -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 20 -// -- -inf/-inf -- - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -inf/-min -- - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -inf/-1 -- - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -inf/-0 -- - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0x80000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -inf/+0 -- - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0x00000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -inf/+1 -- - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -inf/+max -- - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -inf/+inf -- - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -inf.NaN -- - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -inf.float32 -- - ldc.r4 float32(0xFF800000) - ldc.r4 1.5 - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -//----------------------------- -// -- -min/-inf -- - ldc.r4 float32(0xFF7FFFFF) - dup - call void [System.Console]System.Console::WriteLine(float32) - ldc.r4 float32(0xFF800000) - dup - call void [System.Console]System.Console::WriteLine(float32) - ldc.r4 float32(0xFF7FFFFF) - dup - call void [System.Console]System.Console::WriteLine(float32) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -min/-min -- - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0x80000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -min/-1 -- - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x80000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -min/-0 -- - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0x80000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -min/+0 -- - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0x00000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -min/+1 -- - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x80000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -min/+max -- - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0x80000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -min/+inf -- - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0xFF7FFFFF) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -min.NaN -- - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -min.float32 -- - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 1.5 - ldc.r4 float32(0x80000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -//----------------------------- -// -- -1/-inf -- - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0xBF800000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -1/-min -- - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0xBF800000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -1/-1 -- - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x00000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -1/-0 -- - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x80000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -1/+0 -- - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x00000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -1/+1 -- - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x00000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -1/+max -- - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0xBF800000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL -// -- -1/+inf -- - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0xBF800000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -1.NaN -- - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -1.float32 -- - ldc.r4 float32(0xBF800000) - ldc.r4 1.5 - ldc.r4 float32(0xBF800000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -//----------------------------- -// -- -0/-inf -- - ldc.r4 float32(0x80000000) - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0x80000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -0/-min -- - ldc.r4 float32(0x80000000) - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0x80000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -0/-1 -- - ldc.r4 float32(0x80000000) - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x80000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -0/-0 -- - ldc.r4 float32(0x80000000) - ldc.r4 float32(0x80000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -0/+0 -- - ldc.r4 float32(0x80000000) - ldc.r4 float32(0x00000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -0/+1 -- - ldc.r4 float32(0x80000000) - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x80000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -0/+max -- - ldc.r4 float32(0x80000000) - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0x80000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -0/+inf -- - ldc.r4 float32(0x80000000) - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0x80000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -0.NaN -- - ldc.r4 float32(0x80000000) - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -0.float32 -- - ldc.r4 float32(0x80000000) - ldc.r4 1.5 - ldc.r4 float32(0x80000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -//----------------------------- -// -- +0/-inf -- - ldc.r4 float32(0x00000000) - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0x00000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +0/-min -- - ldc.r4 float32(0x00000000) - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0x00000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +0/-1 -- - ldc.r4 float32(0x00000000) - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x00000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +0/-0 -- - ldc.r4 float32(0x00000000) - ldc.r4 float32(0x80000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +0/+0 -- - ldc.r4 float32(0x00000000) - ldc.r4 float32(0x00000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +0/+1 -- - ldc.r4 float32(0x00000000) - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x00000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +0/+max -- - ldc.r4 float32(0x00000000) - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0x00000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +0/+inf -- - ldc.r4 float32(0x00000000) - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0x00000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +0.NaN -- - ldc.r4 float32(0x00000000) - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +0.float32 -- - ldc.r4 float32(0x00000000) - ldc.r4 1.5 - ldc.r4 float32(0x00000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -//----------------------------- -// -- +1/-inf -- - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0x3F800000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +1/-min -- - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0x3F800000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +1/-1 -- - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x00000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +1/-0 -- - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x80000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +1/+0 -- - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x00000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +1/+1 -- - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x00000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +1/+max -- - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0x3F800000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +1/+inf -- - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0x3F800000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +1.NaN -- - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +1.float32 -- - ldc.r4 float32(0x3F800000) - ldc.r4 1.5 - ldc.r4 float32(0x3F800000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -//----------------------------- -// -- +max/-inf -- - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0x7F7FFFFF) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +max/-min -- - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0x00000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +max/-1 -- - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x00000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +max/-0 -- - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0x80000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +max/+0 -- - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0x00000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +max/+1 -- - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x00000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +max/+max -- - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0x00000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +max/+inf -- - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0x7F7FFFFF) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +max.NaN -- - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +max.float32 -- - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 1.5 - ldc.r4 float32(0x00000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -//----------------------------- -// -- +inf/-inf -- - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +inf/-min -- - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +inf/-1 -- - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +inf/-0 -- - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0x80000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +inf/+0 -- - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0x00000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +inf/+1 -- - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +inf/+max -- - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +inf/+inf -- - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +inf.NaN -- - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +inf.float32 -- - ldc.r4 float32(0x7F800000) - ldc.r4 1.5 - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -//----------------------------- -// -- NaN/-inf -- - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- NaN/-min -- - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- NaN/-1 -- - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- NaN/-0 -- - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0x80000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- NaN/+0 -- - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0x00000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- NaN/+1 -- - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- NaN/+max -- - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- NaN/+inf -- - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- NaN.NaN -- - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- NaN.float32 -- - ldc.r4 float32(0x7FC00000) - ldc.r4 1.5 - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -//----------------------------- -// -- float32/-inf -- - ldc.r4 float32(0x3FC00000) - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0x3FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- float32/-min -- - ldc.r4 float32(0x3FC00000) - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0x3FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- float32/-1 -- - ldc.r4 float32(0x3FC00000) - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x3F000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- float32/-0 -- - ldc.r4 float32(0x3FC00000) - ldc.r4 float32(0x80000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- float32/+0 -- - ldc.r4 float32(0x3FC00000) - ldc.r4 float32(0x00000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- float32/+1 -- - ldc.r4 float32(0x3FC00000) - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x3F000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- float32/+max -- - ldc.r4 float32(0x3FC00000) - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0x3FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- float32/+inf -- - ldc.r4 float32(0x3FC00000) - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0x3FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- float32.NaN -- - ldc.r4 float32(0x3FC00000) - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- float32.float32 -- - ldc.r4 float32(0x3FC00000) - ldc.r4 float32(0x3FC00000) - ldc.r4 float32(0x00000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- PASS -- - ldc.i4 100 - ret - -// -- FAIL -- -FAIL: - ldc.i4 0x0 - ret - -// -- End Main ---------------------- -} -// -// -- EOF --------------------------- -} -// ---------------------------------- - -.assembly rem_r4.exe{} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/ret.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/ret.il deleted file mode 100644 index ba191dcfb7aa..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/ret.il +++ /dev/null @@ -1,48 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.assembly ret.exe{} - -.class public _ret { - - - -.method public static void ret_test() { -.maxstack 0 - ret -} - -.method public void _ret() { -.maxstack 0 - ret -} - -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 5 - ldc.i4 0xFEFE - call void _ret::ret_test() - call void _ret::ret_test() - call void _ret::ret_test() - call void _ret::ret_test() - call void _ret::ret_test() - call void _ret::ret_test() - call void _ret::ret_test() - ldc.i4 0xFEFE - ceq - brfalse FAIL - -PASS: - ldc.i4 100 - br END - -FAIL: - ldc.i4 0x00000000 - -END: - ret -} -} - diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/sizeof.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/sizeof.il deleted file mode 100644 index d27fe6c7fa33..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/sizeof.il +++ /dev/null @@ -1,57 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} - -.class public _sizeof { -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 20 - sizeof int8 - ldc.i4 0x1 - bne.un FAIL - - sizeof int16 - ldc.i4 0x2 - bne.un FAIL - - sizeof int32 - ldc.i4 0x4 - bne.un FAIL - - sizeof int64 - ldc.i4 0x8 - bne.un FAIL - - sizeof unsigned int8 - ldc.i4 0x1 - bne.un FAIL - - sizeof unsigned int16 - ldc.i4 0x2 - bne.un FAIL - - sizeof unsigned int32 - ldc.i4 0x4 - bne.un FAIL - - sizeof unsigned int64 - ldc.i4 0x8 - bne.un FAIL - - sizeof float32 - ldc.i4 0x4 - bne.un FAIL - - sizeof float64 - ldc.i4 0x8 - bne.un FAIL - ldc.i4 100 - ret -FAIL: - ldc.i4 0x0 - ret -} -} -.assembly sizeof.exe{} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/switch.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/switch.il deleted file mode 100644 index 464e41b00db6..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/Conformance_Base/switch.il +++ /dev/null @@ -1,76 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.assembly switch.exe{} - -.class public _switch { - - - - - -.method public void _switch() { -.maxstack 0 - ret -} - -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 5 -.locals (int32) - ldc.i4 0x0 - stloc 0 - ldc.i4 0x0 - - TAG: - switch (TC1,TC2,TC3) - ldloc 0 - ldc.i4 0x3 - ceq - brfalse FAIL - br PASS - - TC1: - ldloc 0 - ldc.i4 0x1 - add - stloc 0 - - ldc.i4 0x1 - br TAG - - TC2: - ldloc 0 - ldc.i4 0x1 - add - stloc 0 - - ldc.i4 0x2 - br TAG - - TC3: - ldloc 0 - ldc.i4 0x1 - add - stloc 0 - - ldc.i4 0x3 - br TAG - - br FAIL - - -PASS: - ldc.i4 100 - br END - -FAIL: - ldc.i4 0x00000000 - -END: - ret -} -} - diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/objectmodel/Box_Unbox.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/objectmodel/Box_Unbox.il deleted file mode 100644 index 75f42e32d047..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/objectmodel/Box_Unbox.il +++ /dev/null @@ -1,72 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - -.assembly extern legacy library mscorlib {} -.assembly box_unbox.exe{} - -.class public value sealed valClass { -.field public int32 Field1 -.field public float32 Field2 -.method public void _init() { -.maxstack 4 - ldarg 0 - ldc.i4 0xFF - stfld int32 valClass::Field1 - - ldarg 0 - ldc.r4 float32(0x00ABCDEF) - stfld float32 valClass::Field2 - - ret -} - -.method public virtual class [mscorlib]System.String ToString() { -.maxstack 4 - ldstr "Some Test String" - - - ret -} - - - - -} -.class public Box_Unbox { -.field public static value class valClass vc -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 10 - ldsflda value class valClass Box_Unbox::vc - call instance void valClass::_init() - ldsflda value class valClass Box_Unbox::vc - ldfld int32 valClass::Field1 - ldc.i4 0xFF - ceq - brfalse FAIL - ldsflda value class valClass Box_Unbox::vc - ldfld float32 valClass::Field2 - ldc.r4 float32(0x00ABCDEF) - ceq - brfalse FAIL - ldsfld value class valClass Box_Unbox::vc - box valClass - callvirt instance class [mscorlib]System.String [mscorlib]System.Object::ToString() - ldstr "Some Test String" - - - callvirt instance bool [mscorlib]System.String::Equals(class [mscorlib]System.String) - brfalse FAIL - -PASS: - ldc.i4 100 - ret - -FAIL: - ldc.i4 0x0 - ret - -} -} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/objectmodel/array_tests.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/objectmodel/array_tests.il deleted file mode 100644 index afd6bfdb1c8b..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/objectmodel/array_tests.il +++ /dev/null @@ -1,287 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - -.assembly extern legacy library mscorlib {} -.assembly array_tests.exe{} - -.class public value sealed valClass { - .field public int32 Field -} - -.class public array_tests { - -.field public static int8[] i1 -.field public static unsigned int8[] u1 -.field public static int16[] i2 -.field public static unsigned int16[] u2 -.field public static int32[] i4 -.field public static int64[] i8 -.field public static float32[] r4 -.field public static float64[] r8 -.field public static class array_tests[] obj -.field public static value class valClass[] val - -.field public static native int[] i - -.method public void .ctor() { - -.maxstack 10 - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret -} - - -.method public static void initialize() { -.maxstack 10 -.locals (int32, value class valClass) - - ldc.i4 0x00000004 - newarr [mscorlib]System.SByte - stsfld int8[] array_tests::i1 - - ldc.i4 0x00000004 - newarr [mscorlib]System.Byte - stsfld unsigned int8[] array_tests::u1 - - ldc.i4 0x00000004 - newarr [mscorlib]System.Int16 - stsfld int16[] array_tests::i2 - - ldc.i4 0x00000004 - newarr [mscorlib]System.UInt16 - stsfld unsigned int16[] array_tests::u2 - - ldc.i4 0x00000004 - newarr [mscorlib]System.Int32 - stsfld int32[] array_tests::i4 - - ldc.i4 0x00000004 - newarr [mscorlib]System.Int64 - stsfld int64[] array_tests::i8 - - ldc.i4 0x00000004 - newarr [mscorlib]System.Single - stsfld float32[] array_tests::r4 - - ldc.i4 0x00000004 - newarr [mscorlib]System.Double - stsfld float64[] array_tests::r8 - - ldc.i4 0x00000004 - newarr array_tests - stsfld class array_tests[] array_tests::obj - - ldc.i4 0x00000004 - newarr valClass - stsfld value class valClass[] array_tests::val - - ldc.i4 0x00000004 - newarr [mscorlib]System.IntPtr - stsfld native int[] array_tests::i - - -BEGIN: - ldc.i4 0x00000000 - stloc 0 - -LOOP: - ldsfld int8[] array_tests::i1 - ldloc 0 - dup - ldc.i4 0x10 - add - stelem.i1 - ldsfld unsigned int8[] array_tests::u1 - ldloc 0 - dup - ldc.i4 0x10 - add - stelem.i1 - ldsfld int16[] array_tests::i2 - ldloc 0 - dup - ldc.i4 0x1000 - add - stelem.i2 - ldsfld unsigned int16[] array_tests::u2 - ldloc 0 - dup - ldc.i4 0x1000 - add - stelem.i2 - ldsfld int32[] array_tests::i4 - ldloc 0 - dup - ldc.i4 0x10000000 - add - stelem.i4 - ldsfld int64[] array_tests::i8 - ldloc 0 - dup - conv.i8 - ldc.i8 0x1000000000000000 - add - stelem.i8 - ldsfld float32[] array_tests::r4 - ldloc 0 - dup - conv.r4 - ldc.r4 float32(0x00000000) - add - stelem.r4 - ldsfld float64[] array_tests::r8 - ldloc 0 - dup - conv.r8 - ldc.r8 float64(0x0000000000000000) - add - stelem.r8 - ldsfld class array_tests[] array_tests::obj - ldloc 0 - newobj instance void array_tests::.ctor() - stelem.ref - ldsfld value class valClass[] array_tests::val - ldloc 0x0 - ldelema valClass - ldloca 0x1 - initobj valClass - ldloc 1 - stobj valClass - - ldsfld native int[] array_tests::i - ldloc 0 - dup - ldc.i4 0x10000000 - add - stelem.i - - ldloc 0 - ldc.i4 0x00000003 - ceq - brtrue END - ldloc 0 - ldc.i4 0x00000001 - add - stloc 0 - br LOOP -END: - ret -} - -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 10 -.locals (int32) - call void array_tests::initialize() -BEGIN: - ldc.i4 0x00 - stloc 0 -LOOP: - ldsfld int8[] array_tests::i1 - ldloc 0 - ldelem.i1 - ldloc 0 - ldc.i4 0x00000010 - add - ceq - brfalse FAIL - ldsfld unsigned int8[] array_tests::u1 - ldloc 0 - ldelem.u1 - ldloc 0 - ldc.i4 0x00000010 - add - ceq - brfalse FAIL - ldsfld int16[] array_tests::i2 - ldloc 0 - ldelem.i2 - ldloc 0 - ldc.i4 0x00001000 - add - ceq - brfalse FAIL - ldsfld unsigned int16[] array_tests::u2 - ldloc 0 - ldelem.u2 - ldloc 0 - ldc.i4 0x00001000 - add - ceq - brfalse FAIL - ldsfld int32[] array_tests::i4 - ldloc 0 - ldelem.i4 - ldloc 0 - ldc.i4 0x10000000 - add - ceq - brfalse FAIL - ldsfld int64[] array_tests::i8 - ldloc 0 - ldelem.i8 - ldloc 0 - conv.i8 - ldc.i8 0x1000000000000000 - add - ceq - brfalse FAIL - ldsfld float32[] array_tests::r4 - ldloc 0 - ldelem.r4 - ldloc 0 - conv.r4 - ldc.r4 float32(0x00000000) - add - ceq - brfalse FAIL - ldsfld float64[] array_tests::r8 - ldloc 0 - ldelem.r8 - ldloc 0 - conv.r8 - ldc.r8 float64(0x0000000000000000) - add - ceq - brfalse FAIL - ldsfld class array_tests[] array_tests::obj - ldloc 0 - ldelem.ref - isinst array_tests - brfalse FAIL - ldsflda value class valClass[] array_tests::val - ldobj valClass - box valClass - isinst valClass - brfalse FAIL - - ldsfld native int[] array_tests::i - ldloc 0 - ldelem.i - ldloc 0 - ldc.i4 0x10000000 - add - ceq - brfalse FAIL - ldloc 0 - ldc.i4 0x00000003 - ceq - brtrue PASS - ldloc 0 - ldc.i4 0x00000001 - add - stloc 0 - br LOOP - - -PASS: - ldc.i4 100 - ret -FAIL: - ldc.i4 0x0 - ret -} -} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/objectmodel/cpobj.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/objectmodel/cpobj.il deleted file mode 100644 index 9b2f12632a3d..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/objectmodel/cpobj.il +++ /dev/null @@ -1,136 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - -.assembly extern legacy library mscorlib {} -.assembly cpobj.exe{} - -.class public _cpobj { - -.field public static value class valClass Instance1 -.field public static value class valClass Instance2 - -.method public static int32 main() { -.entrypoint -.locals (class [mscorlib]System.IO.TextWriter) -.maxstack 2 - call class [mscorlib]System.IO.TextWriter [System.Console]System.Console::get_Out() - stloc 0 - - ldsflda value class valClass _cpobj::Instance1 - ldc.i4 0x89ABCDEF - stfld int32 valClass::Field - ldc.i4 0x01234567 - stsfld int32 valClass::SField - ldsflda value class valClass _cpobj::Instance1 - ldfld int32 valClass::Field - ldc.i4 0x89ABCDEF - ceq - brfalse Init1Failure - ldsfld int32 valClass::SField - ldc.i4 0x01234567 - ceq - brtrue InitInstance2 -Init1Failure: - ldloc 0 - ldstr "Initialization failure in instance 1" - - - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - br fail - -InitInstance2: - ldsflda value class valClass _cpobj::Instance2 - ldc.i4 0xABABABAB - stfld int32 valClass::Field - ldsflda value class valClass _cpobj::Instance2 - ldfld int32 valClass::Field - ldc.i4 0xABABABAB - ceq - brfalse Init2Failure - ldsfld int32 valClass::SField - ldc.i4 0x01234567 - ceq - brtrue CheckInst1Field -Init2Failure: - ldloc 0 - ldstr "Initialization failure in instance 2" - - - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - br fail - -CheckInst1Field: - ldsflda value class valClass _cpobj::Instance1 - ldfld int32 valClass::Field - ldc.i4 0x89ABCDEF - ceq - brtrue cpobjTests - ldloc 0 - ldstr "Initialization failure in instance 1" - - - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - br fail - -cpobjTests: - ldsflda value class valClass _cpobj::Instance2 - ldsflda value class valClass _cpobj::Instance1 - cpobj valClass - ldsflda value class valClass _cpobj::Instance1 - ldfld int32 valClass::Field - ldc.i4 0x89ABCDEF - ceq - brfalse cpobjFailure - ldsflda value class valClass _cpobj::Instance2 - ldfld int32 valClass::Field - ldc.i4 0x89ABCDEF - ceq - brfalse cpobjFailure - ldsfld int32 valClass::SField - ldc.i4 0x01234567 - ceq - brtrue pass - -cpobjFailure: - ldloc 0 - ldstr "_cpobj failed. inst1 fields != inst2 fields" - - - - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - br fail - -pass: - ldloc 0 - ldstr "_cpobj tests PASS" - - - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldc.i4 100 - br end -fail: - ldloc 0 - ldstr "!!! FAILURE !!! CPOBJ TEST(S) HAVE FAILED !!! FAILURE !!!" - - - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldc.i4 0x0 - br end -end: - ret -} - - -} -.class public value sealed valClass { -.field public int32 Field -.field public static int32 SField -} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/objectmodel/field_tests.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/objectmodel/field_tests.il deleted file mode 100644 index e795b764cce8..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/objectmodel/field_tests.il +++ /dev/null @@ -1,155 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - -.assembly extern legacy library mscorlib {} -.assembly field_tests.exe{} - -.class public field_tests { - -.field public int8 i1Field -.field public int16 i2Field -.field public int32 i4Field -.field public int64 i8Field -.field public float32 r4Field -.field public float64 r8Field -.field public class field_tests ptrField - -.field public static int8 i1SField -.field public static int16 i2SField -.field public static int32 i4SField -.field public static int64 i8SField -.field public static float32 r4SField -.field public static float64 r8SField -.field public static class field_tests ptrSField - - -.method public void .ctor() { - -.maxstack 10 - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret -} - -.method public void initialize() { -.maxstack 10 - - ldarg 0 - ldc.i4 0x1 - stfld int8 field_tests::i1Field - ldarg 0 - ldc.i4 0x2 - stfld int16 field_tests::i2Field - ldarg 0 - ldc.i4 0x4 - stfld int32 field_tests::i4Field - ldarg 0 - ldc.i8 0x8 - stfld int64 field_tests::i8Field - ldarg 0 - ldc.r4 4.4 - stfld float32 field_tests::r4Field - ldarg 0 - ldc.r8 8.8 - stfld float64 field_tests::r8Field - ldarg 0 - ldarg 0 - stfld class field_tests field_tests::ptrField - ldc.i4 0x1 - stsfld int8 field_tests::i1SField - ldc.i4 0x2 - stsfld int16 field_tests::i2SField - ldc.i4 0x4 - stsfld int32 field_tests::i4SField - ldc.i8 0x8 - stsfld int64 field_tests::i8SField - ldc.r4 4.4 - stsfld float32 field_tests::r4SField - ldc.r8 8.8 - stsfld float64 field_tests::r8SField - ldarg 0 - stsfld class field_tests field_tests::ptrSField - - ret -} - -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 10 -.locals (class field_tests) - newobj instance void field_tests::.ctor() - dup - stloc 0 - call instance void field_tests::initialize() - ldloc 0 - ldfld int8 field_tests::i1Field - ldc.i4 0x1 - ceq - brfalse FAIL - ldloc 0 - ldfld int16 field_tests::i2Field - ldc.i4 0x2 - ceq - brfalse FAIL - ldloc 0 - ldfld int32 field_tests::i4Field - ldc.i4 0x4 - ceq - brfalse FAIL - ldloc 0 - ldfld int64 field_tests::i8Field - ldc.i8 0x8 - ceq - brfalse FAIL - ldloc 0 - ldfld float32 field_tests::r4Field - ldc.r4 4.4 - ceq - brfalse FAIL - ldloc 0 - ldfld float64 field_tests::r8Field - ldc.r8 8.8 - ceq - brfalse FAIL - ldloc 0 - ldfld class field_tests field_tests::ptrField - isinst field_tests - brfalse FAIL - ldsfld int8 field_tests::i1SField - ldc.i4 0x1 - ceq - brfalse FAIL - ldsfld int16 field_tests::i2SField - ldc.i4 0x2 - ceq - brfalse FAIL - ldsfld int32 field_tests::i4SField - ldc.i4 0x4 - ceq - brfalse FAIL - ldsfld int64 field_tests::i8SField - ldc.i8 0x8 - ceq - brfalse FAIL - ldsfld float32 field_tests::r4SField - ldc.r4 4.4 - ceq - brfalse FAIL - ldsfld float64 field_tests::r8SField - ldc.r8 8.8 - ceq - brfalse FAIL - ldsfld class field_tests field_tests::ptrSField - isinst field_tests - brfalse FAIL - -PASS: - ldc.i4 100 - ret -FAIL: - ldc.i4 0x0 - ret -} -} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/objectmodel/fielda_tests.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/objectmodel/fielda_tests.il deleted file mode 100644 index 5906d5a9d868..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/objectmodel/fielda_tests.il +++ /dev/null @@ -1,170 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - - -.assembly extern legacy library mscorlib {} -.assembly fielda_tests.exe{} - -.class public field_tests { - -.field public int8 i1Field -.field public int16 i2Field -.field public int32 i4Field -.field public int64 i8Field -.field public float32 r4Field -.field public float64 r8Field -.field public class field_tests ptrField - -.field public static int8 i1SField -.field public static int16 i2SField -.field public static int32 i4SField -.field public static int64 i8SField -.field public static float32 r4SField -.field public static float64 r8SField -.field public static class field_tests ptrSField - - -.method public void .ctor() { - -.maxstack 10 - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret -} - -.method public void initialize() { -.maxstack 10 - - ldarg 0 - ldc.i4 0x1 - stfld int8 field_tests::i1Field - ldarg 0 - ldc.i4 0x2 - stfld int16 field_tests::i2Field - ldarg 0 - ldc.i4 0x4 - stfld int32 field_tests::i4Field - ldarg 0 - ldc.i8 0x8 - stfld int64 field_tests::i8Field - ldarg 0 - ldc.r4 4.4 - stfld float32 field_tests::r4Field - ldarg 0 - ldc.r8 8.8 - stfld float64 field_tests::r8Field - ldarg 0 - ldarg 0 - stfld class field_tests field_tests::ptrField - ldc.i4 0x1 - stsfld int8 field_tests::i1SField - ldc.i4 0x2 - stsfld int16 field_tests::i2SField - ldc.i4 0x4 - stsfld int32 field_tests::i4SField - ldc.i8 0x8 - stsfld int64 field_tests::i8SField - ldc.r4 4.4 - stsfld float32 field_tests::r4SField - ldc.r8 8.8 - stsfld float64 field_tests::r8SField - ldarg 0 - stsfld class field_tests field_tests::ptrSField - - ret -} - -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 10 -.locals (class field_tests) - newobj instance void field_tests::.ctor() - dup - stloc 0 - call instance void field_tests::initialize() - ldloc 0 - ldflda int8 field_tests::i1Field - ldind.i1 - ldc.i4 0x1 - ceq - brfalse FAIL - ldloc 0 - ldflda int16 field_tests::i2Field - ldind.i2 - ldc.i4 0x2 - ceq - brfalse FAIL - ldloc 0 - ldflda int32 field_tests::i4Field - ldind.i4 - ldc.i4 0x4 - ceq - brfalse FAIL - ldloc 0 - ldflda int64 field_tests::i8Field - ldind.i8 - ldc.i8 0x8 - ceq - brfalse FAIL - ldloc 0 - ldflda float32 field_tests::r4Field - ldind.r4 - ldc.r4 4.4 - ceq - brfalse FAIL - ldloc 0 - ldflda float64 field_tests::r8Field - ldind.r8 - ldc.r8 8.8 - ceq - brfalse FAIL - ldloc 0 - ldflda class field_tests field_tests::ptrField - ldind.ref - isinst field_tests - brfalse FAIL - ldsflda int8 field_tests::i1SField - ldind.i1 - ldc.i4 0x1 - ceq - brfalse FAIL - ldsflda int16 field_tests::i2SField - ldind.i2 - ldc.i4 0x2 - ceq - brfalse FAIL - ldsflda int32 field_tests::i4SField - ldind.i4 - ldc.i4 0x4 - ceq - brfalse FAIL - ldsflda int64 field_tests::i8SField - ldind.i8 - ldc.i8 0x8 - ceq - brfalse FAIL - ldsflda float32 field_tests::r4SField - ldind.r4 - ldc.r4 4.4 - ceq - brfalse FAIL - ldsflda float64 field_tests::r8SField - ldind.r8 - ldc.r8 8.8 - ceq - brfalse FAIL - ldsflda class field_tests field_tests::ptrSField - ldind.ref - isinst field_tests - brfalse FAIL - -PASS: - ldc.i4 100 - ret -FAIL: - ldc.i4 0x0 - ret -} -} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/objectmodel/initobj.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/objectmodel/initobj.il deleted file mode 100644 index ec249a40c034..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/objectmodel/initobj.il +++ /dev/null @@ -1,120 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - - -.assembly extern legacy library mscorlib {} -.assembly initobj.exe{ -} - -.class public value sealed valClass{ - .field public int32 int32_Field - .field public static int32 int32_SField - .field public float32 float32_Field - .field public static float32 float32_SField - .field public int32* int32_ptr_Field - .field public static int32* int32_ptr_SField - - .method public void .ctor(){ - ret - } -} - -.class public _initoj { - - .method public static int32 main(class System.String[]) { - .entrypoint - .locals (value class valClass, int32) - .maxstack 10 - - ldloca 0 - initobj valClass - - ldloca 0 - ldc.i4 0xAB - stfld int32 valClass::int32_Field - - ldc.i4 0xCD - stsfld int32 valClass::int32_SField - - ldloca 0 - ldc.r4 8.8 - stfld float32 valClass::float32_Field - - ldc.r4 9.9 - stsfld float32 valClass::float32_SField - - ldloca 0 - ldloca 1 - stfld int32* valClass::int32_ptr_Field - - ldloca 1 - stsfld int32* valClass::int32_ptr_SField - - ldloca 0 - ldfld int32 valClass::int32_Field - ldc.i4 0xAB - bne.un FAIL - - ldsfld int32 valClass::int32_SField - ldc.i4 0xCD - bne.un FAIL - - ldloca 0 - ldfld float32 valClass::float32_Field - ldc.r4 8.8 - bne.un FAIL - - ldsfld float32 valClass::float32_SField - ldc.r4 9.9 - bne.un FAIL - - ldloca 0 - ldfld int32* valClass::int32_ptr_Field - ldloca 1 - bne.un FAIL - - ldsfld int32* valClass::int32_ptr_SField - ldloca 1 - bne.un FAIL - - ldloca 0 - initobj valClass - - ldloca 0 - ldfld int32 valClass::int32_Field - ldc.i4 0x0 - bne.un FAIL - - ldsfld int32 valClass::int32_SField - ldc.i4 0xCD - bne.un FAIL - - ldloca 0 - ldfld float32 valClass::float32_Field - ldc.r4 0.0 - bne.un FAIL - - ldsfld float32 valClass::float32_SField - ldc.r4 9.9 - bne.un FAIL - - ldloca 0 - ldfld int32* valClass::int32_ptr_Field - ldnull - bne.un FAIL - - ldsfld int32* valClass::int32_ptr_SField - ldloca 1 - bne.un FAIL - - - PASS: - ldc.i4 100 - ret - FAIL: - ldc.i4 0x0 - ret - } -} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/objectmodel/ldobj.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/objectmodel/ldobj.il deleted file mode 100644 index cd29c2e78394..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/objectmodel/ldobj.il +++ /dev/null @@ -1,133 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - -.assembly extern legacy library mscorlib {} -.assembly ldobj.exe{ -} - -.class public _ldobj { - -.method public static int32 main() { -.entrypoint -.locals (class [mscorlib]System.IO.TextWriter,value class valClass,value class valClass) -.maxstack 2 - call class [mscorlib]System.IO.TextWriter [System.Console]System.Console::get_Out() - stloc 0 - - newobj instance void valClass::.ctor() - stloc 1 - newobj instance void valClass::.ctor() - stloc 2 - ldloca 1 - ldc.i4 0xFAFAFAFA - stfld int32 valClass::Field - ldc.i4 0xDBDBDBDB - stsfld int32 valClass::SField - - ldloca 2 - ldc.i4 0x00000000 - stfld int32 valClass::Field - - ldloca 1 - ldfld int32 valClass::Field - ldc.i4 0xFAFAFAFA - ceq - brfalse failInit - ldsfld int32 valClass::SField - ldc.i4 0xDBDBDBDB - ceq - brfalse failInit - ldloca 2 - ldfld int32 valClass::Field - ldc.i4 0x00000000 - ceq - brtrue ldlocaTest -failInit: - ldloc 0 - ldstr "one _or both val classes failed initialization." - - - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - br fail - -ldlocaTest: - ldloca 1 - ldobj valClass - - ldloca 2 - call void _ldobj::changeData(value class valClass,value class valClass*) - - ldloca 1 - ldfld int32 valClass::Field - ldc.i4 0xFAFAFAFA - ceq - brfalse failTest - ldloca 2 - ldfld int32 valClass::Field - ldc.i4 0xBBBBBBBB - ceq - brfalse failTest - ldsfld int32 valClass::SField - ldc.i4 0xDDDDDDDD - ceq - brtrue pass -failTest: - ldloc 0 - ldstr "failure after initialization." - - - - - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - br fail - -pass: - ldloc 0 - ldstr "_ldobj tests PASS" - - - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldc.i4 100 - br end -fail: - ldloc 0 - ldstr "!!! FAILURE !!! LDOBJ TEST(S) FAILED !!! FAILURE !!!" - - - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldc.i4 0x0 - br end -end: - ret -} - -.method public static void changeData(value class valClass,value class valClass*) { -.maxstack 2 - ldarga 0 - ldc.i4 0xBBBBBBBB - stfld int32 valClass::Field - ldc.i4 0xDDDDDDDD - stsfld int32 valClass::SField - ldarg 1 - ldarga 0 - cpobj valClass - ret -} - -} -.class public value sealed valClass { -.field public int32 Field -.field public static int32 SField - - .method public public void .ctor(){ - ret - } -} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/objectmodel/ldtoken.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/objectmodel/ldtoken.il deleted file mode 100644 index d24c80e32c5f..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/objectmodel/ldtoken.il +++ /dev/null @@ -1,44 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - -.assembly extern legacy library mscorlib {} -.assembly ldtoken.exe{} - - - -.method public static int32 main(class System.String[]) { -.entrypoint -.locals () -.maxstack 2 - ldtoken method instance int32 _ldtoken::test(int32) - pop - - -PASS: - ldc.i4 100 - ret -FAIL: - ldc.i4 0x0 - ret -} - - -.class public _ldtoken { - -.field public static int32 PTR - -.method public void _ldtoken() { -.maxstack 4 - ret -} - -.method public int32 test(int32) { -.maxstack 2 - ldarg 1 - ldc.i4 0x2 - mul - ret -} -} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/objectmodel/ldvirtftn.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/objectmodel/ldvirtftn.il deleted file mode 100644 index fcc5b08daeda..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/objectmodel/ldvirtftn.il +++ /dev/null @@ -1,104 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - -.assembly extern legacy library mscorlib {} -.assembly ldvirtftn.exe{ -} - -.method public static int32 main(class System.String[]) { -.locals (int32, class _ldvirtftn) -.entrypoint -.maxstack 4 - ldc.i4 0x77 - stloc 0x0 - newobj instance void _ldvirtftn::_ldvirtftn() - stloc 0x1 - ldloc 0x1 - ldloc 0x0 - ldloc 0x1 - ldvirtftn instance int32 _ldvirtftn::test(int32) - calli default int32 (class _ldvirtftn,int32) - ldc.i4 0xEE - bne.un FAIL - - newobj instance void TestImplementation::TestImplementation() - stloc 0x1 - ldloc 0x1 - ldloc 0x0 - ldloc 0x1 - ldvirtftn instance int32 TestImplementation::TestMethod(int32) - calli default int32 (class TestInterface,int32) - ldc.i4 0xEE - bne.un FAIL - - newobj instance void TestImplementation::TestImplementation() - stloc 0x1 - ldloc 0x1 - ldloc 0x0 - ldloc 0x1 - ldvirtftn instance int32 TestInterface::TestMethod(int32) - calli default int32 (class TestInterface,int32) - ldc.i4 0xEE - bne.un FAIL - - newobj instance void TestImplementation::TestImplementation() - stloc 0x1 - ldloc 0x1 - ldloc 0x0 - ldloc 0x1 - ldvirtftn instance int32 TestInterface::TestMethod(int32) - calli default int32 (class TestImplementation,int32) - ldc.i4 0xEE - bne.un FAIL - -PASS: - ldc.i4 100 - br END -FAIL: - ldc.i4 0x0 -END: - ret -} - -.class public _ldvirtftn { -.method public void _ldvirtftn() { -.maxstack 4 - ret -} - -.method public int32 test(int32) { -.maxstack 2 - ldarg 1 - ldc.i4 0x2 - mul - ret -} - -} -.class public TestInterface { -.method public virtual int32 TestMethod(int32) { -ldc.i4 55 -ret -} - -} -.class public TestImplementation extends TestInterface { - -.method public void TestImplementation() { -.maxstack 10 - ret -} - -.method public virtual int32 TestMethod(int32) { -.maxstack 10 - - ldarg 1 - ldc.i4 0x2 - mul - ret - -} - -} diff --git a/src/coreclr/tests/src/JIT/IL_Conformance/Old/objectmodel/localloc.il b/src/coreclr/tests/src/JIT/IL_Conformance/Old/objectmodel/localloc.il deleted file mode 100644 index 36aab4de3eb0..000000000000 --- a/src/coreclr/tests/src/JIT/IL_Conformance/Old/objectmodel/localloc.il +++ /dev/null @@ -1,137 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - -.assembly extern legacy library mscorlib {} -.assembly localloc.exe{ -} - -.class public _localloc { - -.method public void .ctor() { - -.maxstack 10 - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret -} - -.method public static int32 main(string[]) { -.locals (class [mscorlib]System.IO.TextWriter,int32*,int32,class [mscorlib]System.Text.StringBuilder,int32,string) -.entrypoint - call class [mscorlib]System.IO.TextWriter [System.Console]System.Console::get_Out() - stloc 0 - ldc.i4 0x0 - stloc 2 - newobj instance void [mscorlib]System.Text.StringBuilder::.ctor() - stloc 3 - -TryStart: - ldc.i4 0xFF - localloc - stloc 1 - -LOOP0: - ldloc 2 - ldc.i4 0xFF - bgt END0 - - ldloc 1 - ldloc 2 - add - - ldloc 2 - conv.i1 - stind.i1 - - ldc.i4 0x1 - ldloc 2 - add - stloc 2 - - br LOOP0 - -END0: - - ldc.i4 0x0 - stloc 2 - -LOOP1: - ldloc 2 - ldc.i4 0xFF - bgt PassInLoop - - ldloc 1 - ldloc 2 - add - - ldind.i1 - - ldloc 2 - conv.i1 - - bne.un FailInLoop - - ldc.i4 0x1 - ldloc 2 - add - stloc 2 - - br LOOP1 - -END1: - - br BeforeTryEnd - -FailInLoop: - leave Fail -PassInLoop: - leave Pass - -BeforeTryEnd: -leave Pass -TryEnd: - br Pass - -Filter: - pop - ldc.i4 0x1 - endfilter - -Handler: - pop - leave EndHandler -EndHandler: - br Fail - -Pass: - ldloc 0 - ldstr "LOCALLOC Tests PASS" - - - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldc.i4 100 - br End - -Fail: - ldloc 0 - ldstr "!!!! FAILURE !!!! -- LOCALLOC Tests FAIL -- !!!! FAILURE !!!!" - - - - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldc.i4 0x0 - br End - -End: - ret -.try TryStart to TryEnd filter Filter handler Handler to EndHandler -} -} diff --git a/src/coreclr/tests/src/JIT/Methodical/Arrays/huge/huge_struct.il b/src/coreclr/tests/src/JIT/Methodical/Arrays/huge/huge_struct.il deleted file mode 100644 index f2c611e6e8ed..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/Arrays/huge/huge_struct.il +++ /dev/null @@ -1,530 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - - - - - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - -.assembly extern mscorlib -{ - - - - -} -.assembly 'test' -{ - - - - -} -.module 'test.exe' -.namespace JitTest -{ - .class value private auto ansi sealed TestStruct extends [mscorlib]System.ValueType - { - .field public float64[] dbl_ptr - .field public bool[] b_ptr - .field public int32 magic - .field public unsigned int64[] ul_ptr - } // end of class 'TestStruct' - - .class private auto ansi Test - extends [mscorlib]System.Object - { - .method private hidebysig static int32 - Main() il managed - { - .entrypoint - .maxstack 70 - .locals (value class JitTest.TestStruct[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,] matrix, - int32 count, - int32[] dim, - value class JitTest.TestStruct t, - value class JitTest.TestStruct r) - - ldstr "Creating 32-dimension array" - call void [System.Console]System.Console::WriteLine(string) - - ldc.i4 32 - dup - stloc count - - dup - add - newarr int32 - again: - dup - dup - ldloc count - ldc.i4.1 - sub - dup - stloc count - dup - add - dup - ldc.i4 20 - mul - stelem.i4 - ldloc count - dup - add - ldc.i4.1 - add - ldloc count - ldc.i4.3 - rem - dup - brtrue cool - pop - ldc.i4.1 - cool: - stelem.i4 - ldloc count - brtrue again - - ldc.i4.0 - stloc count - again2: - dup - ldloc count - ldelem.i4 - call void [System.Console]System.Console::Write(int32) - ldstr " " - call void [System.Console]System.Console::Write(string) - ldloc count - ldc.i4.1 - add - dup - stloc count - ldc.i4 64 - ceq - brfalse again2 - - stloc dim - ldloc dim ldc.i4.0 ldelem.i4 - ldloc dim ldc.i4.1 ldelem.i4 - ldloc dim ldc.i4.2 ldelem.i4 - ldloc dim ldc.i4.3 ldelem.i4 - ldloc dim ldc.i4.4 ldelem.i4 - ldloc dim ldc.i4.5 ldelem.i4 - ldloc dim ldc.i4.6 ldelem.i4 - ldloc dim ldc.i4.7 ldelem.i4 - ldloc dim ldc.i4.8 ldelem.i4 - ldloc dim ldc.i4 9 ldelem.i4 - ldloc dim ldc.i4 10 ldelem.i4 - ldloc dim ldc.i4 11 ldelem.i4 - ldloc dim ldc.i4 12 ldelem.i4 - ldloc dim ldc.i4 13 ldelem.i4 - ldloc dim ldc.i4 14 ldelem.i4 - ldloc dim ldc.i4 15 ldelem.i4 - ldloc dim ldc.i4 16 ldelem.i4 - ldloc dim ldc.i4 17 ldelem.i4 - ldloc dim ldc.i4 18 ldelem.i4 - ldloc dim ldc.i4 19 ldelem.i4 - ldloc dim ldc.i4 20 ldelem.i4 - ldloc dim ldc.i4 21 ldelem.i4 - ldloc dim ldc.i4 22 ldelem.i4 - ldloc dim ldc.i4 23 ldelem.i4 - ldloc dim ldc.i4 24 ldelem.i4 - ldloc dim ldc.i4 25 ldelem.i4 - ldloc dim ldc.i4 26 ldelem.i4 - ldloc dim ldc.i4 27 ldelem.i4 - ldloc dim ldc.i4 28 ldelem.i4 - ldloc dim ldc.i4 29 ldelem.i4 - ldloc dim ldc.i4 30 ldelem.i4 - ldloc dim ldc.i4 31 ldelem.i4 - ldloc dim ldc.i4 32 ldelem.i4 - ldloc dim ldc.i4 33 ldelem.i4 - ldloc dim ldc.i4 34 ldelem.i4 - ldloc dim ldc.i4 35 ldelem.i4 - ldloc dim ldc.i4 36 ldelem.i4 - ldloc dim ldc.i4 37 ldelem.i4 - ldloc dim ldc.i4 38 ldelem.i4 - ldloc dim ldc.i4 39 ldelem.i4 - ldloc dim ldc.i4 40 ldelem.i4 - ldloc dim ldc.i4 41 ldelem.i4 - ldloc dim ldc.i4 42 ldelem.i4 - ldloc dim ldc.i4 43 ldelem.i4 - ldloc dim ldc.i4 44 ldelem.i4 - ldloc dim ldc.i4 45 ldelem.i4 - ldloc dim ldc.i4 46 ldelem.i4 - ldloc dim ldc.i4 47 ldelem.i4 - ldloc dim ldc.i4 48 ldelem.i4 - ldloc dim ldc.i4 49 ldelem.i4 - ldloc dim ldc.i4 50 ldelem.i4 - ldloc dim ldc.i4 51 ldelem.i4 - ldloc dim ldc.i4 52 ldelem.i4 - ldloc dim ldc.i4 53 ldelem.i4 - ldloc dim ldc.i4 54 ldelem.i4 - ldloc dim ldc.i4 55 ldelem.i4 - ldloc dim ldc.i4 56 ldelem.i4 - ldloc dim ldc.i4 57 ldelem.i4 - ldloc dim ldc.i4 58 ldelem.i4 - ldloc dim ldc.i4 59 ldelem.i4 - ldloc dim ldc.i4 60 ldelem.i4 - ldloc dim ldc.i4 61 ldelem.i4 - ldloc dim ldc.i4 62 ldelem.i4 - ldloc dim ldc.i4 63 ldelem.i4 - newobj instance void value class JitTest.TestStruct[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,]::.ctor( - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32) - stloc matrix - - ldloc matrix - ldloc dim ldc.i4.0 ldelem.i4 - ldloc dim ldc.i4.2 ldelem.i4 - ldloc dim ldc.i4.4 ldelem.i4 - ldloc dim ldc.i4.6 ldelem.i4 - ldloc dim ldc.i4.8 ldelem.i4 - ldloc dim ldc.i4 10 ldelem.i4 - ldloc dim ldc.i4 12 ldelem.i4 - ldloc dim ldc.i4 14 ldelem.i4 - ldloc dim ldc.i4 16 ldelem.i4 - ldloc dim ldc.i4 18 ldelem.i4 - ldloc dim ldc.i4 20 ldelem.i4 - ldloc dim ldc.i4 22 ldelem.i4 - ldloc dim ldc.i4 24 ldelem.i4 - ldloc dim ldc.i4 26 ldelem.i4 - ldloc dim ldc.i4 28 ldelem.i4 - ldloc dim ldc.i4 30 ldelem.i4 - ldloc dim ldc.i4 32 ldelem.i4 - ldloc dim ldc.i4 34 ldelem.i4 - ldloc dim ldc.i4 36 ldelem.i4 - ldloc dim ldc.i4 38 ldelem.i4 - ldloc dim ldc.i4 40 ldelem.i4 - ldloc dim ldc.i4 42 ldelem.i4 - ldloc dim ldc.i4 44 ldelem.i4 - ldloc dim ldc.i4 46 ldelem.i4 - ldloc dim ldc.i4 48 ldelem.i4 - ldloc dim ldc.i4 50 ldelem.i4 - ldloc dim ldc.i4 52 ldelem.i4 - ldloc dim ldc.i4 54 ldelem.i4 - ldloc dim ldc.i4 56 ldelem.i4 - ldloc dim ldc.i4 58 ldelem.i4 - ldloc dim ldc.i4 60 ldelem.i4 - ldloc dim ldc.i4 62 ldelem.i4 - - ldloca t - initobj JitTest.TestStruct - ldloca t - dup - ldc.i4 99 - newarr float64 - dup - ldc.i4 98 - ldc.r8 8.0 - stelem.r8 - stfld float64[] JitTest.TestStruct::dbl_ptr - ldc.i4 0x05071975 - stfld int32 JitTest.TestStruct::magic - - call void [mscorlib]System.GC::Collect() - - ldloc t - callvirt instance void value class JitTest.TestStruct[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,]::Set( - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - value class JitTest.TestStruct) - - ldloc matrix - ldloc dim ldc.i4.0 ldelem.i4 - ldloc dim ldc.i4.2 ldelem.i4 - ldloc dim ldc.i4.4 ldelem.i4 - ldloc dim ldc.i4.6 ldelem.i4 - ldloc dim ldc.i4.8 ldelem.i4 - ldloc dim ldc.i4 10 ldelem.i4 - ldloc dim ldc.i4 12 ldelem.i4 - ldloc dim ldc.i4 14 ldelem.i4 - ldloc dim ldc.i4 16 ldelem.i4 - ldloc dim ldc.i4 18 ldelem.i4 - ldloc dim ldc.i4 20 ldelem.i4 - ldloc dim ldc.i4 22 ldelem.i4 - ldloc dim ldc.i4 24 ldelem.i4 - ldloc dim ldc.i4 26 ldelem.i4 - ldloc dim ldc.i4 28 ldelem.i4 - ldloc dim ldc.i4 30 ldelem.i4 - ldloc dim ldc.i4 32 ldelem.i4 - ldloc dim ldc.i4 34 ldelem.i4 - ldloc dim ldc.i4 36 ldelem.i4 - ldloc dim ldc.i4 38 ldelem.i4 - ldloc dim ldc.i4 40 ldelem.i4 - ldloc dim ldc.i4 42 ldelem.i4 - ldloc dim ldc.i4 44 ldelem.i4 - ldloc dim ldc.i4 46 ldelem.i4 - ldloc dim ldc.i4 48 ldelem.i4 - ldloc dim ldc.i4 50 ldelem.i4 - ldloc dim ldc.i4 52 ldelem.i4 - ldloc dim ldc.i4 54 ldelem.i4 - ldloc dim ldc.i4 56 ldelem.i4 - ldloc dim ldc.i4 58 ldelem.i4 - ldloc dim ldc.i4 60 ldelem.i4 - ldloc dim ldc.i4 62 ldelem.i4 - callvirt instance value class JitTest.TestStruct value class JitTest.TestStruct[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,]::Get( - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32) - - stloc r - ldloca r - dup - ldfld float64[] JitTest.TestStruct::dbl_ptr - ldc.i4 98 - ldelem.r8 - ldc.r8 8.0 - ceq - brtrue next0_0 - pop - br throw0 - next0_0: - ldfld int32 JitTest.TestStruct::magic - ldc.i4 0x05071975 - ceq - brfalse throw0 - br pass1 - - cont1: - ldloc matrix - ldloc dim ldc.i4.0 ldelem.i4 - ldloc dim ldc.i4.2 ldelem.i4 - ldloc dim ldc.i4.4 ldelem.i4 - ldloc dim ldc.i4.6 ldelem.i4 - ldloc dim ldc.i4.8 ldelem.i4 - ldloc dim ldc.i4 10 ldelem.i4 - ldloc dim ldc.i4 12 ldelem.i4 - ldloc dim ldc.i4 14 ldelem.i4 - ldloc dim ldc.i4 16 ldelem.i4 - ldloc dim ldc.i4 18 ldelem.i4 - ldloc dim ldc.i4 20 ldelem.i4 - ldloc dim ldc.i4 22 ldelem.i4 - ldloc dim ldc.i4 24 ldelem.i4 - ldloc dim ldc.i4 26 ldelem.i4 - ldloc dim ldc.i4 28 ldelem.i4 - ldloc dim ldc.i4 30 ldelem.i4 - ldloc dim ldc.i4 32 ldelem.i4 - ldloc dim ldc.i4 34 ldelem.i4 - ldloc dim ldc.i4 36 ldelem.i4 - ldloc dim ldc.i4 38 ldelem.i4 - ldloc dim ldc.i4 40 ldelem.i4 - ldloc dim ldc.i4 42 ldelem.i4 - ldloc dim ldc.i4 44 ldelem.i4 - ldloc dim ldc.i4 46 ldelem.i4 - ldloc dim ldc.i4 48 ldelem.i4 - ldloc dim ldc.i4 50 ldelem.i4 - ldloc dim ldc.i4 52 ldelem.i4 - ldloc dim ldc.i4 54 ldelem.i4 - ldloc dim ldc.i4 56 ldelem.i4 - ldloc dim ldc.i4 58 ldelem.i4 - ldloc dim ldc.i4 60 ldelem.i4 - ldloc dim ldc.i4 62 ldelem.i4 - br go1 - - cont2: - br cont3 - - go1: - callvirt instance value class JitTest.TestStruct value class JitTest.TestStruct[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,]::Get( - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32) - stloc r - ldloca r - dup - ldfld float64[] JitTest.TestStruct::dbl_ptr - ldc.i4 98 - ldelem.r8 - ldc.r8 8.0 - ceq - brtrue next0_1 - pop - br throw0 - next0_1: - ldfld int32 JitTest.TestStruct::magic - ldc.i4 0x05071975 - ceq - brfalse throw0 - br pass1_5 - - throw0: - newobj instance void [mscorlib]System.Exception::.ctor() - throw1: - throw - - pass1: - br cont0 - - pass2: - ldloc matrix - ldloc dim ldc.i4.0 ldelem.i4 - ldloc dim ldc.i4.2 ldelem.i4 - ldloc dim ldc.i4.4 ldelem.i4 - ldloc dim ldc.i4.6 ldelem.i4 - ldloc dim ldc.i4.8 ldelem.i4 - ldloc dim ldc.i4 10 ldelem.i4 - ldloc dim ldc.i4 12 ldelem.i4 - ldloc dim ldc.i4 14 ldelem.i4 - ldloc dim ldc.i4 16 ldelem.i4 - ldloc dim ldc.i4 18 ldelem.i4 - ldloc dim ldc.i4 20 ldelem.i4 - ldloc dim ldc.i4 22 ldelem.i4 - ldloc dim ldc.i4 24 ldelem.i4 - ldloc dim ldc.i4 26 ldelem.i4 - ldloc dim ldc.i4 28 ldelem.i4 - ldloc dim ldc.i4 30 ldelem.i4 - ldloc dim ldc.i4 32 ldelem.i4 - ldloc dim ldc.i4 34 ldelem.i4 - ldloc dim ldc.i4 36 ldelem.i4 - ldloc dim ldc.i4 38 ldelem.i4 - ldloc dim ldc.i4 40 ldelem.i4 - ldloc dim ldc.i4 42 ldelem.i4 - ldloc dim ldc.i4 44 ldelem.i4 - ldloc dim ldc.i4 46 ldelem.i4 - ldloc dim ldc.i4 48 ldelem.i4 - ldloc dim ldc.i4 50 ldelem.i4 - ldloc dim ldc.i4 52 ldelem.i4 - ldloc dim ldc.i4 54 ldelem.i4 - ldloc dim ldc.i4 56 ldelem.i4 - ldloc dim ldc.i4 58 ldelem.i4 - ldloc dim ldc.i4 60 ldelem.i4 - ldloc dim ldc.i4 62 ldelem.i4 - ldloc t - callvirt instance void value class JitTest.TestStruct[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,]::Set( - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - value class JitTest.TestStruct) - ldnull - stloc matrix - call void [mscorlib]System.GC::Collect() - - ldc.i4 100 - ldstr "TEST PASSED" - call void [System.Console]System.Console::Write(string) - ret - - cont0: - br cont2 - - cont3: - br cont1 - - pass1_5: - ldloc matrix - ldloc dim ldc.i4.0 ldelem.i4 - ldloc dim ldc.i4.2 ldelem.i4 - ldloc dim ldc.i4.4 ldelem.i4 - ldloc dim ldc.i4.6 ldelem.i4 - ldloc dim ldc.i4.8 ldelem.i4 - ldloc dim ldc.i4 10 ldelem.i4 - ldloc dim ldc.i4 12 ldelem.i4 - ldloc dim ldc.i4 14 ldelem.i4 - ldloc dim ldc.i4 16 ldelem.i4 - ldloc dim ldc.i4 18 ldelem.i4 - ldloc dim ldc.i4 20 ldelem.i4 - ldloc dim ldc.i4 22 ldelem.i4 - ldloc dim ldc.i4 24 ldelem.i4 - ldloc dim ldc.i4 26 ldelem.i4 - ldloc dim ldc.i4 28 ldelem.i4 - ldloc dim ldc.i4 30 ldelem.i4 - ldloc dim ldc.i4 32 ldelem.i4 - ldloc dim ldc.i4 34 ldelem.i4 - ldloc dim ldc.i4 36 ldelem.i4 - ldloc dim ldc.i4 38 ldelem.i4 - ldloc dim ldc.i4 40 ldelem.i4 - ldloc dim ldc.i4 42 ldelem.i4 - ldloc dim ldc.i4 44 ldelem.i4 - ldloc dim ldc.i4 46 ldelem.i4 - ldloc dim ldc.i4 48 ldelem.i4 - ldloc dim ldc.i4 50 ldelem.i4 - ldloc dim ldc.i4 52 ldelem.i4 - ldloc dim ldc.i4 54 ldelem.i4 - ldloc dim ldc.i4 56 ldelem.i4 - ldloc dim ldc.i4 58 ldelem.i4 - ldloc dim ldc.i4 60 ldelem.i4 - ldloc dim ldc.i4 62 ldelem.i4 - callvirt instance value class JitTest.TestStruct& value class JitTest.TestStruct[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,]::Address( - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32) - dup - ldfld float64[] JitTest.TestStruct::dbl_ptr - ldc.i4 98 - ldelem.r8 - ldc.r8 8.0 - ceq - brtrue next0_2 - pop - br throw0 - next0_2: - ldfld int32 JitTest.TestStruct::magic - ldc.i4 0x05071975 - ceq - brfalse throw0 - br pass2 - - newobj instance void [mscorlib]System.Exception::.ctor() - br throw1 - } // end of method 'Test::Main' - - .method public hidebysig specialname rtspecialname - instance void .ctor() il managed - { - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method 'Test::.ctor' - - } // end of class 'Test' - -} // end of namespace 'JitTest' diff --git a/src/coreclr/tests/src/JIT/Methodical/Arrays/huge_struct.il b/src/coreclr/tests/src/JIT/Methodical/Arrays/huge_struct.il deleted file mode 100644 index c871f79c5691..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/Arrays/huge_struct.il +++ /dev/null @@ -1,543 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - - - - - -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly 'huge_struct' -{ - - - // bool) = ( 01 00 00 01 00 00 ) - - -} -.module 'huge_strcut.exe' -// MVID: {23E3D49B-6CFD-4DA0-8C9D-A611CE0BA103} -.namespace JitTest -{ - .class value private auto ansi sealed TestStruct extends [mscorlib]System.ValueType - { - .field public float64[] dbl_ptr - .field public bool[] b_ptr - .field public int32 magic - .field public unsigned int64[] ul_ptr - } // end of class 'TestStruct' - - .class private auto ansi Test - extends [mscorlib]System.Object - { - .method private hidebysig static int32 - Main() il managed - { - .entrypoint - // Code size 38 (0x26) - .maxstack 70 - .locals init (value class JitTest.TestStruct[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,] matrix, - int32 count, - int32[] dim, - value class JitTest.TestStruct t, - value class JitTest.TestStruct r) - - - ldc.i4 32 - dup - stloc count - - dup - add - newarr int32 - again: - //we'll need two refs of array - dup - dup - //decrement counter - ldloc count - ldc.i4.1 - sub - dup - stloc count - //multiple counter by 2 - dup - add - //calculate lower bound for this dimension - dup - ldc.i4 20 - mul - stelem.i4 - //calculate index again - ldloc count - dup - add - ldc.i4.1 - add - //calculate number of elements for this dimension - // 1 1 2 1 1 2 1 1 2 etc. - ldloc count - ldc.i4.3 - rem - dup - brtrue cool - pop - ldc.i4.1 - cool: - stelem.i4 - ldloc count - brtrue again - - //print out an array bounds - ldc.i4.0 - stloc count - again2: - ldloc count - ldc.i4.1 - add - dup - stloc count - ldc.i4 64 - ceq - brfalse again2 - - //it would be so cool if I could push - //the values on the stack in a loop ;-) - stloc dim - ldloc dim ldc.i4.0 ldelem.i4 - ldloc dim ldc.i4.1 ldelem.i4 - ldloc dim ldc.i4.2 ldelem.i4 - ldloc dim ldc.i4.3 ldelem.i4 - ldloc dim ldc.i4.4 ldelem.i4 - ldloc dim ldc.i4.5 ldelem.i4 - ldloc dim ldc.i4.6 ldelem.i4 - ldloc dim ldc.i4.7 ldelem.i4 - ldloc dim ldc.i4.8 ldelem.i4 - ldloc dim ldc.i4 9 ldelem.i4 - ldloc dim ldc.i4 10 ldelem.i4 - ldloc dim ldc.i4 11 ldelem.i4 - ldloc dim ldc.i4 12 ldelem.i4 - ldloc dim ldc.i4 13 ldelem.i4 - ldloc dim ldc.i4 14 ldelem.i4 - ldloc dim ldc.i4 15 ldelem.i4 - ldloc dim ldc.i4 16 ldelem.i4 - ldloc dim ldc.i4 17 ldelem.i4 - ldloc dim ldc.i4 18 ldelem.i4 - ldloc dim ldc.i4 19 ldelem.i4 - ldloc dim ldc.i4 20 ldelem.i4 - ldloc dim ldc.i4 21 ldelem.i4 - ldloc dim ldc.i4 22 ldelem.i4 - ldloc dim ldc.i4 23 ldelem.i4 - ldloc dim ldc.i4 24 ldelem.i4 - ldloc dim ldc.i4 25 ldelem.i4 - ldloc dim ldc.i4 26 ldelem.i4 - ldloc dim ldc.i4 27 ldelem.i4 - ldloc dim ldc.i4 28 ldelem.i4 - ldloc dim ldc.i4 29 ldelem.i4 - ldloc dim ldc.i4 30 ldelem.i4 - ldloc dim ldc.i4 31 ldelem.i4 - ldloc dim ldc.i4 32 ldelem.i4 - ldloc dim ldc.i4 33 ldelem.i4 - ldloc dim ldc.i4 34 ldelem.i4 - ldloc dim ldc.i4 35 ldelem.i4 - ldloc dim ldc.i4 36 ldelem.i4 - ldloc dim ldc.i4 37 ldelem.i4 - ldloc dim ldc.i4 38 ldelem.i4 - ldloc dim ldc.i4 39 ldelem.i4 - ldloc dim ldc.i4 40 ldelem.i4 - ldloc dim ldc.i4 41 ldelem.i4 - ldloc dim ldc.i4 42 ldelem.i4 - ldloc dim ldc.i4 43 ldelem.i4 - ldloc dim ldc.i4 44 ldelem.i4 - ldloc dim ldc.i4 45 ldelem.i4 - ldloc dim ldc.i4 46 ldelem.i4 - ldloc dim ldc.i4 47 ldelem.i4 - ldloc dim ldc.i4 48 ldelem.i4 - ldloc dim ldc.i4 49 ldelem.i4 - ldloc dim ldc.i4 50 ldelem.i4 - ldloc dim ldc.i4 51 ldelem.i4 - ldloc dim ldc.i4 52 ldelem.i4 - ldloc dim ldc.i4 53 ldelem.i4 - ldloc dim ldc.i4 54 ldelem.i4 - ldloc dim ldc.i4 55 ldelem.i4 - ldloc dim ldc.i4 56 ldelem.i4 - ldloc dim ldc.i4 57 ldelem.i4 - ldloc dim ldc.i4 58 ldelem.i4 - ldloc dim ldc.i4 59 ldelem.i4 - ldloc dim ldc.i4 60 ldelem.i4 - ldloc dim ldc.i4 61 ldelem.i4 - ldloc dim ldc.i4 62 ldelem.i4 - ldloc dim ldc.i4 63 ldelem.i4 - newobj instance void value class JitTest.TestStruct[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,]::.ctor( - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32) - stloc matrix - - //--------------------------------------------------------------- - // Test typed array's Set method - //--------------------------------------------------------------- - ldloc matrix - ldloc dim ldc.i4.0 ldelem.i4 - ldloc dim ldc.i4.2 ldelem.i4 - ldloc dim ldc.i4.4 ldelem.i4 - ldloc dim ldc.i4.6 ldelem.i4 - ldloc dim ldc.i4.8 ldelem.i4 - ldloc dim ldc.i4 10 ldelem.i4 - ldloc dim ldc.i4 12 ldelem.i4 - ldloc dim ldc.i4 14 ldelem.i4 - ldloc dim ldc.i4 16 ldelem.i4 - ldloc dim ldc.i4 18 ldelem.i4 - ldloc dim ldc.i4 20 ldelem.i4 - ldloc dim ldc.i4 22 ldelem.i4 - ldloc dim ldc.i4 24 ldelem.i4 - ldloc dim ldc.i4 26 ldelem.i4 - ldloc dim ldc.i4 28 ldelem.i4 - ldloc dim ldc.i4 30 ldelem.i4 - ldloc dim ldc.i4 32 ldelem.i4 - ldloc dim ldc.i4 34 ldelem.i4 - ldloc dim ldc.i4 36 ldelem.i4 - ldloc dim ldc.i4 38 ldelem.i4 - ldloc dim ldc.i4 40 ldelem.i4 - ldloc dim ldc.i4 42 ldelem.i4 - ldloc dim ldc.i4 44 ldelem.i4 - ldloc dim ldc.i4 46 ldelem.i4 - ldloc dim ldc.i4 48 ldelem.i4 - ldloc dim ldc.i4 50 ldelem.i4 - ldloc dim ldc.i4 52 ldelem.i4 - ldloc dim ldc.i4 54 ldelem.i4 - ldloc dim ldc.i4 56 ldelem.i4 - ldloc dim ldc.i4 58 ldelem.i4 - ldloc dim ldc.i4 60 ldelem.i4 - ldloc dim ldc.i4 62 ldelem.i4 - - ldloca t - initobj JitTest.TestStruct - ldloca t - dup - ldc.i4 99 - newarr float64 - dup - ldc.i4 98 - ldc.r8 8.0 - stelem.r8 - stfld float64[] JitTest.TestStruct::dbl_ptr - ldc.i4 0x05071975 - stfld int32 JitTest.TestStruct::magic - - call void [mscorlib]System.GC::Collect() - - ldloc t - callvirt instance void value class JitTest.TestStruct[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,]::Set( - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - value class JitTest.TestStruct) - - //--------------------------------------------------------------- - // Test typed array's Get method - //--------------------------------------------------------------- - ldloc matrix - ldloc dim ldc.i4.0 ldelem.i4 - ldloc dim ldc.i4.2 ldelem.i4 - ldloc dim ldc.i4.4 ldelem.i4 - ldloc dim ldc.i4.6 ldelem.i4 - ldloc dim ldc.i4.8 ldelem.i4 - ldloc dim ldc.i4 10 ldelem.i4 - ldloc dim ldc.i4 12 ldelem.i4 - ldloc dim ldc.i4 14 ldelem.i4 - ldloc dim ldc.i4 16 ldelem.i4 - ldloc dim ldc.i4 18 ldelem.i4 - ldloc dim ldc.i4 20 ldelem.i4 - ldloc dim ldc.i4 22 ldelem.i4 - ldloc dim ldc.i4 24 ldelem.i4 - ldloc dim ldc.i4 26 ldelem.i4 - ldloc dim ldc.i4 28 ldelem.i4 - ldloc dim ldc.i4 30 ldelem.i4 - ldloc dim ldc.i4 32 ldelem.i4 - ldloc dim ldc.i4 34 ldelem.i4 - ldloc dim ldc.i4 36 ldelem.i4 - ldloc dim ldc.i4 38 ldelem.i4 - ldloc dim ldc.i4 40 ldelem.i4 - ldloc dim ldc.i4 42 ldelem.i4 - ldloc dim ldc.i4 44 ldelem.i4 - ldloc dim ldc.i4 46 ldelem.i4 - ldloc dim ldc.i4 48 ldelem.i4 - ldloc dim ldc.i4 50 ldelem.i4 - ldloc dim ldc.i4 52 ldelem.i4 - ldloc dim ldc.i4 54 ldelem.i4 - ldloc dim ldc.i4 56 ldelem.i4 - ldloc dim ldc.i4 58 ldelem.i4 - ldloc dim ldc.i4 60 ldelem.i4 - ldloc dim ldc.i4 62 ldelem.i4 - callvirt instance value class JitTest.TestStruct value class JitTest.TestStruct[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,]::Get( - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32) - - stloc r - ldloca r - dup - ldfld float64[] JitTest.TestStruct::dbl_ptr - ldc.i4 98 - ldelem.r8 - ldc.r8 8.0 - ceq - brtrue next0_0 - pop - br throw0 - next0_0: - ldfld int32 JitTest.TestStruct::magic - ldc.i4 0x05071975 - ceq - brfalse throw0 - br pass1 - - cont1: - //--------------------------------------------------------------- - // Test Get method - //--------------------------------------------------------------- - ldloc matrix - ldloc dim ldc.i4.0 ldelem.i4 - ldloc dim ldc.i4.2 ldelem.i4 - ldloc dim ldc.i4.4 ldelem.i4 - ldloc dim ldc.i4.6 ldelem.i4 - ldloc dim ldc.i4.8 ldelem.i4 - ldloc dim ldc.i4 10 ldelem.i4 - ldloc dim ldc.i4 12 ldelem.i4 - ldloc dim ldc.i4 14 ldelem.i4 - ldloc dim ldc.i4 16 ldelem.i4 - ldloc dim ldc.i4 18 ldelem.i4 - ldloc dim ldc.i4 20 ldelem.i4 - ldloc dim ldc.i4 22 ldelem.i4 - ldloc dim ldc.i4 24 ldelem.i4 - ldloc dim ldc.i4 26 ldelem.i4 - ldloc dim ldc.i4 28 ldelem.i4 - ldloc dim ldc.i4 30 ldelem.i4 - ldloc dim ldc.i4 32 ldelem.i4 - ldloc dim ldc.i4 34 ldelem.i4 - ldloc dim ldc.i4 36 ldelem.i4 - ldloc dim ldc.i4 38 ldelem.i4 - ldloc dim ldc.i4 40 ldelem.i4 - ldloc dim ldc.i4 42 ldelem.i4 - ldloc dim ldc.i4 44 ldelem.i4 - ldloc dim ldc.i4 46 ldelem.i4 - ldloc dim ldc.i4 48 ldelem.i4 - ldloc dim ldc.i4 50 ldelem.i4 - ldloc dim ldc.i4 52 ldelem.i4 - ldloc dim ldc.i4 54 ldelem.i4 - ldloc dim ldc.i4 56 ldelem.i4 - ldloc dim ldc.i4 58 ldelem.i4 - ldloc dim ldc.i4 60 ldelem.i4 - ldloc dim ldc.i4 62 ldelem.i4 - br go1 - - cont2: - br cont3 - - go1: - callvirt instance value class JitTest.TestStruct value class JitTest.TestStruct[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,]::Get( - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32) - stloc r - ldloca r - dup - ldfld float64[] JitTest.TestStruct::dbl_ptr - ldc.i4 98 - ldelem.r8 - ldc.r8 8.0 - ceq - brtrue next0_1 - pop - br throw0 - next0_1: - ldfld int32 JitTest.TestStruct::magic - ldc.i4 0x05071975 - ceq - brfalse throw0 - br pass1_5 - - throw0: - newobj instance void [mscorlib]System.Exception::.ctor() - throw1: - throw - - pass1: - br cont0 - - pass2: - //--------------------------------------------------------------- - // Test Set method - //--------------------------------------------------------------- - ldloc matrix - ldloc dim ldc.i4.0 ldelem.i4 - ldloc dim ldc.i4.2 ldelem.i4 - ldloc dim ldc.i4.4 ldelem.i4 - ldloc dim ldc.i4.6 ldelem.i4 - ldloc dim ldc.i4.8 ldelem.i4 - ldloc dim ldc.i4 10 ldelem.i4 - ldloc dim ldc.i4 12 ldelem.i4 - ldloc dim ldc.i4 14 ldelem.i4 - ldloc dim ldc.i4 16 ldelem.i4 - ldloc dim ldc.i4 18 ldelem.i4 - ldloc dim ldc.i4 20 ldelem.i4 - ldloc dim ldc.i4 22 ldelem.i4 - ldloc dim ldc.i4 24 ldelem.i4 - ldloc dim ldc.i4 26 ldelem.i4 - ldloc dim ldc.i4 28 ldelem.i4 - ldloc dim ldc.i4 30 ldelem.i4 - ldloc dim ldc.i4 32 ldelem.i4 - ldloc dim ldc.i4 34 ldelem.i4 - ldloc dim ldc.i4 36 ldelem.i4 - ldloc dim ldc.i4 38 ldelem.i4 - ldloc dim ldc.i4 40 ldelem.i4 - ldloc dim ldc.i4 42 ldelem.i4 - ldloc dim ldc.i4 44 ldelem.i4 - ldloc dim ldc.i4 46 ldelem.i4 - ldloc dim ldc.i4 48 ldelem.i4 - ldloc dim ldc.i4 50 ldelem.i4 - ldloc dim ldc.i4 52 ldelem.i4 - ldloc dim ldc.i4 54 ldelem.i4 - ldloc dim ldc.i4 56 ldelem.i4 - ldloc dim ldc.i4 58 ldelem.i4 - ldloc dim ldc.i4 60 ldelem.i4 - ldloc dim ldc.i4 62 ldelem.i4 - ldloc t - callvirt instance void value class JitTest.TestStruct[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,]::Set( - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - value class JitTest.TestStruct) - ldnull - stloc matrix - call void [mscorlib]System.GC::Collect() - - ldc.i4 100 - ret - - cont0: - br cont2 - - cont3: - br cont1 - - pass1_5: - //--------------------------------------------------------------- - // Test typed Address method - //--------------------------------------------------------------- - ldloc matrix - ldloc dim ldc.i4.0 ldelem.i4 - ldloc dim ldc.i4.2 ldelem.i4 - ldloc dim ldc.i4.4 ldelem.i4 - ldloc dim ldc.i4.6 ldelem.i4 - ldloc dim ldc.i4.8 ldelem.i4 - ldloc dim ldc.i4 10 ldelem.i4 - ldloc dim ldc.i4 12 ldelem.i4 - ldloc dim ldc.i4 14 ldelem.i4 - ldloc dim ldc.i4 16 ldelem.i4 - ldloc dim ldc.i4 18 ldelem.i4 - ldloc dim ldc.i4 20 ldelem.i4 - ldloc dim ldc.i4 22 ldelem.i4 - ldloc dim ldc.i4 24 ldelem.i4 - ldloc dim ldc.i4 26 ldelem.i4 - ldloc dim ldc.i4 28 ldelem.i4 - ldloc dim ldc.i4 30 ldelem.i4 - ldloc dim ldc.i4 32 ldelem.i4 - ldloc dim ldc.i4 34 ldelem.i4 - ldloc dim ldc.i4 36 ldelem.i4 - ldloc dim ldc.i4 38 ldelem.i4 - ldloc dim ldc.i4 40 ldelem.i4 - ldloc dim ldc.i4 42 ldelem.i4 - ldloc dim ldc.i4 44 ldelem.i4 - ldloc dim ldc.i4 46 ldelem.i4 - ldloc dim ldc.i4 48 ldelem.i4 - ldloc dim ldc.i4 50 ldelem.i4 - ldloc dim ldc.i4 52 ldelem.i4 - ldloc dim ldc.i4 54 ldelem.i4 - ldloc dim ldc.i4 56 ldelem.i4 - ldloc dim ldc.i4 58 ldelem.i4 - ldloc dim ldc.i4 60 ldelem.i4 - ldloc dim ldc.i4 62 ldelem.i4 - callvirt instance value class JitTest.TestStruct& value class JitTest.TestStruct[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,]::Address( - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32, - int32, int32, int32, int32) - dup - ldfld float64[] JitTest.TestStruct::dbl_ptr - ldc.i4 98 - ldelem.r8 - ldc.r8 8.0 - ceq - brtrue next0_2 - pop - br throw0 - next0_2: - ldfld int32 JitTest.TestStruct::magic - ldc.i4 0x05071975 - ceq - brfalse throw0 - br pass2 - - newobj instance void [mscorlib]System.Exception::.ctor() - br throw1 - } // end of method 'Test::Main' - - .method public hidebysig specialname rtspecialname - instance void .ctor() il managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method 'Test::.ctor' - - } // end of class 'Test' - -} // end of namespace 'JitTest' -//*********** DISASSEMBLY COMPLETE *********************** diff --git a/src/coreclr/tests/src/JIT/Methodical/Arrays/lcs/lcs.cs b/src/coreclr/tests/src/JIT/Methodical/Arrays/lcs/lcs.cs deleted file mode 100644 index 907b2659aeb1..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/Arrays/lcs/lcs.cs +++ /dev/null @@ -1,124 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -namespace JitTest -{ - internal class LCS - { - private const int RANK = 4; - - private static String buildLCS(int[,,,] b, char[] X, int[] ind) - { - for (int i = 0; i < RANK; i++) - if (ind[i] == 0) return ""; - - int L = b[ind[0], ind[1], ind[2], ind[3]]; - if (L == RANK) - { - for (int i = 0; i < RANK; i++) - ind[i]--; - int idx = ind[0]; - return buildLCS(b, X, ind) + X[idx]; - } - if (L >= 0 && L < RANK) - { - ind[L]--; - return buildLCS(b, X, ind); - } - throw new Exception(); - } - - private static void findLCS(int[,,,] c, int[,,,] b, char[][] seq, int[] len) - { - int[] ind = new int[RANK]; - for (ind[0] = 1; ind[0] < len[0]; ind[0]++) - { - for (ind[1] = 1; ind[1] < len[1]; ind[1]++) - { - for (ind[2] = 1; ind[2] < len[2]; ind[2]++) - { - for (ind[3] = 1; ind[3] < len[3]; ind[3]++) - { - bool eqFlag = true; - for (int i = 1; i < RANK; i++) - { - if (seq[i][ind[i] - 1] != seq[i - 1][ind[i - 1] - 1]) - { - eqFlag = false; - break; - } - } - - if (eqFlag) - { - c[ind[0], ind[1], ind[2], ind[3]] = - c[ind[0] - 1, ind[1] - 1, ind[2] - 1, ind[3] - 1] + 1; - b[ind[0], ind[1], ind[2], ind[3]] = RANK; - continue; - } - - int R = -1; - int M = -1; - for (int i = 0; i < RANK; i++) - { - ind[i]--; - if (c[ind[0], ind[1], ind[2], ind[3]] > M) - { - R = i; - M = c[ind[0], ind[1], ind[2], ind[3]]; - } - ind[i]++; - } - if (R < 0 || M < 0) - throw new Exception(); - - c[ind[0], ind[1], ind[2], ind[3]] = M; - b[ind[0], ind[1], ind[2], ind[3]] = R; - } - } - } - } - } - - private static int Main() - { - Console.WriteLine("Test searches for longest common subsequence of 4 strings\n\n"); - String[] str = new String[RANK] { - "The Sun has left his blackness", - "and has found a fresher morning", - "and the fair Moon rejoices", - "in the clear and cloudless night" - }; - - int[] len = new int[RANK]; - char[][] seq = new char[RANK][]; - for (int i = 0; i < RANK; i++) - { - len[i] = str[i].Length + 1; - seq[i] = str[i].ToCharArray(); - } - - int[,,,] c = new int[len[0], len[1], len[2], len[3]]; - int[,,,] b = new int[len[0], len[1], len[2], len[3]]; - - findLCS(c, b, seq, len); - - for (int i = 0; i < RANK; i++) - len[i]--; - - if ("n ha es" == buildLCS(b, seq[0], len)) - { - Console.WriteLine("Test passed"); - return 100; - } - else - { - Console.WriteLine("Test failed."); - return 0; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/Methodical/Arrays/misc/length0.il b/src/coreclr/tests/src/JIT/Methodical/Arrays/misc/length0.il deleted file mode 100644 index e97cf6a6731e..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/Arrays/misc/length0.il +++ /dev/null @@ -1,236 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - - - - - - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - -.assembly extern mscorlib -{ - - - - -} -.assembly 'test' -{ - - - - -} -.module 'test.exe' -.namespace JitTest -{ - .class private auto ansi Test - extends [mscorlib]System.Object - { - .method private hidebysig static int32 - try_index(int32[0...] arr, - int32 idx, - int32 expected) il managed - { - .maxstack 5 - .locals (int32) - ldstr "Trying index " - call void [System.Console]System.Console::Write(string) - ldarga.s idx - call instance string [mscorlib]System.Int32::ToString() - call void [System.Console]System.Console::Write(string) - .try - { - ldarg.0 - ldarg.1 - ldarg.1 - stelem.i4 - - ldarg.0 - ldarg.1 - ldelem.i4 - - ldarg.1 - ceq - brtrue aaa - - ldstr "READ-WRITE FAILED" - call void [System.Console]System.Console::WriteLine(string) - newobj instance void [mscorlib]System.Exception::.ctor() - throw - - aaa: - - ldstr ": OK" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.1 - stloc.0 - leave.s IL_0029 - - } // end .try - catch [mscorlib]System.Object - { - IL_001c: pop - IL_001d: ldstr ": exception!" - IL_0022: call void [System.Console]System.Console::WriteLine(string) - - ldc.i4.0 - stloc.0 - IL_0027: leave.s IL_0029 - - } // end handler - IL_0029: - ldloc.0 - ldarg.2 - ceq - ret - } // end of method 'Test::try_index' - - .method private hidebysig static int32 - Main() il managed - { - .entrypoint - .maxstack 4 - .locals (int32[0...] V_0, int32 V_1, int32 V_2) - ldstr "Creating zero-length array (canonical form ctor)" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.0 - newobj instance void int32[0...]::.ctor(int32) - stloc.0 - - ldstr "Reported array size is " - call void [System.Console]System.Console::Write(string) - ldloc.0 - ldlen - call void [System.Console]System.Console::WriteLine(int32) - ldstr "[mscorlib]System.Array::get_Rank returned " - call void [System.Console]System.Console::Write(string) - ldloc.0 - callvirt instance int32 [mscorlib]System.Array::get_Rank() - call void [System.Console]System.Console::WriteLine(int32) - ldstr "[mscorlib]System.Array::GetLowerBound returned " - call void [System.Console]System.Console::Write(string) - ldloc.0 - ldc.i4.0 - callvirt instance int32 [mscorlib]System.Array::GetLowerBound(int32) - call void [System.Console]System.Console::WriteLine(int32) - ldstr "[mscorlib]System.Array::GetUpperBound returned " - call void [System.Console]System.Console::Write(string) - ldloc.0 - ldc.i4.0 - callvirt instance int32 [mscorlib]System.Array::GetUpperBound(int32) - call void [System.Console]System.Console::WriteLine(int32) - - ldloc.0 - ldc.i4 -10000 - ldc.i4.0 - call int32 JitTest.Test::try_index(int32[0...], int32, int32) - brfalse Failure - ldloc.0 - ldc.i4.m1 - ldc.i4.0 - call int32 JitTest.Test::try_index(int32[0...], int32, int32) - brfalse Failure - ldloc.0 - ldc.i4.0 - ldc.i4.0 - call int32 JitTest.Test::try_index(int32[0...], int32, int32) - brfalse Failure - ldloc.0 - ldc.i4.1 - ldc.i4.0 - call int32 JitTest.Test::try_index(int32[0...], int32, int32) - brfalse Failure - ldloc.0 - ldc.i4 1000 - ldc.i4.0 - call int32 JitTest.Test::try_index(int32[0...], int32, int32) - brfalse Failure - - ldstr "\nCreating zero-length array (newarr instruction)" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.0 - newarr int32 - stloc.0 - - ldstr "Reported array size is " - call void [System.Console]System.Console::Write(string) - ldloc.0 - ldlen - call void [System.Console]System.Console::WriteLine(int32) - ldstr "[mscorlib]System.Array::get_Rank returned " - call void [System.Console]System.Console::Write(string) - ldloc.0 - callvirt instance int32 [mscorlib]System.Array::get_Rank() - call void [System.Console]System.Console::WriteLine(int32) - ldstr "[mscorlib]System.Array::GetLowerBound returned " - call void [System.Console]System.Console::Write(string) - ldloc.0 - ldc.i4.0 - callvirt instance int32 [mscorlib]System.Array::GetLowerBound(int32) - call void [System.Console]System.Console::WriteLine(int32) - ldstr "[mscorlib]System.Array::GetUpperBound returned " - call void [System.Console]System.Console::Write(string) - ldloc.0 - ldc.i4.0 - callvirt instance int32 [mscorlib]System.Array::GetUpperBound(int32) - call void [System.Console]System.Console::WriteLine(int32) - - ldloc.0 - ldc.i4 -10000 - ldc.i4.0 - call int32 JitTest.Test::try_index(int32[0...], int32, int32) - brfalse Failure - ldloc.0 - ldc.i4.m1 - ldc.i4.0 - call int32 JitTest.Test::try_index(int32[0...], int32, int32) - brfalse Failure - ldloc.0 - ldc.i4.0 - ldc.i4.0 - call int32 JitTest.Test::try_index(int32[0...], int32, int32) - brfalse Failure - ldloc.0 - ldc.i4.1 - ldc.i4.0 - call int32 JitTest.Test::try_index(int32[0...], int32, int32) - brfalse Failure - ldloc.0 - ldc.i4 1000 - ldc.i4.0 - call int32 JitTest.Test::try_index(int32[0...], int32, int32) - brfalse Failure - - ldc.i4 0x64 - ldstr "**** PASSED ****" - call void [System.Console]System.Console::WriteLine(string) - br Escape - Failure: - ldc.i4.1 - ldstr "**** FAILED ****" - call void [System.Console]System.Console::WriteLine(string) - Escape: - ret - } // end of method 'Test::Main' - - .method public hidebysig specialname rtspecialname - instance void .ctor() il managed - { - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method 'Test::.ctor' - - } // end of class 'Test' - -} // end of namespace 'JitTest' - diff --git a/src/coreclr/tests/src/JIT/Methodical/Boxing/boxunbox/array.il b/src/coreclr/tests/src/JIT/Methodical/Boxing/boxunbox/array.il deleted file mode 100644 index ee5304593330..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/Boxing/boxunbox/array.il +++ /dev/null @@ -1,434 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly 'array' { } -.namespace JitTest { -.class private auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ -.method private hidebysig static int32 Main() cil managed -{ - .entrypoint - .maxstack 32 - .locals (unsigned int8[] ARR_u1, - float64[] ARR_r8, - unsigned int16[] ARR_u2, - unsigned int32[] ARR_u4, - unsigned int64[] ARR_u8, - int8[] ARR_i1, - int16[] ARR_i2, - int32[] ARR_i4, - float32[] ARR_r4, - int64[] ARR_i8, - object BOX_u1, - object BOX_r8, - object BOX_u2, - object BOX_u4, - object BOX_u8, - object BOX_i1, - object BOX_i2, - object BOX_i4, - object BOX_r4, - object BOX_i8) - .zeroinit - ldc.i4 10 - newarr unsigned int8 - stloc.s ARR_u1 ldc.i4 10 - newarr float64 - stloc.s ARR_r8 ldc.i4 10 - newarr unsigned int16 - stloc.s ARR_u2 ldc.i4 10 - newarr unsigned int32 - stloc.s ARR_u4 ldc.i4 10 - newarr unsigned int64 - stloc.s ARR_u8 ldc.i4 10 - newarr int8 - stloc.s ARR_i1 ldc.i4 10 - newarr int16 - stloc.s ARR_i2 ldc.i4 10 - newarr int32 - stloc.s ARR_i4 ldc.i4 10 - newarr float32 - stloc.s ARR_r4 ldc.i4 10 - newarr int64 - stloc.s ARR_i8 ldloc.s ARR_i4 - ldc.i4.0 - ldelem.i4 - ldloc.s ARR_i2 - ldc.i4.0 - ldelem.i2 - dup - ldloc.s ARR_r8 - ldc.i4.0 - ldelem.r8 - box float64 - dup - unbox float64 - ldind.r8 - box float32 - unbox float32 - ldloc.s ARR_i2 - ldc.i4.0 - ldelem.i2 - conv.r8 - dup - conv.r8 - ldloc.s ARR_r8 - ldc.i4.0 - ldelem.r8 - ldloc.s ARR_r8 - ldc.i4.0 - ldelem.r8 - dup - conv.u8 - box int64 - ldloc.s ARR_r8 - ldc.i4.0 - ldelem.r8 - box float64 - dup - unbox float64 - ldloc.s ARR_i1 - ldc.i4.0 - ldelem.i1 - dup - box unsigned int32 - unbox unsigned int32 - ldloc.s ARR_u1 - ldc.i4.0 - ldelem.u1 - conv.r8 - ldloc.s ARR_u8 - ldc.i4.0 - ldelem.u8 - dup - dup - conv.i1 - ldloc.s ARR_r8 - ldc.i4.0 - ldelem.r8 - conv.r8 - ldloc.s ARR_i4 - ldc.i4.0 - ldelem.i4 - conv.u8 - ldloc.s ARR_i1 - ldc.i4.0 - ldelem.i1 - ldloc.s ARR_u8 - ldc.i4.0 - ldelem.u8 - box int64 - ldloc.s ARR_u8 - ldc.i4.0 - ldelem.u8 - box int64 - stloc.s BOX_i8 - unbox int64 - ldloc.s ARR_r4 - ldc.i4.0 - ldelem.r4 - conv.u8 - box unsigned int64 - ldloc.s ARR_i4 - ldc.i4.0 - ldelem.i4 - ldloc.s ARR_u2 - ldc.i4.0 - ldelem.u2 - box int8 - dup - dup - dup - ldloc.s ARR_i8 - ldc.i4.0 - ldelem.i8 - conv.u1 - ldloc.s ARR_u2 - ldc.i4.0 - ldelem.u2 - conv.u2 - ldloc.s ARR_r4 - ldc.i4.0 - ldelem.r4 - conv.u1 - box int16 - stloc.s BOX_i2 - conv.i8 - ldloc.s ARR_u4 - ldc.i4.0 - ldelem.u4 - dup - conv.i1 - box unsigned int16 - unbox unsigned int16 - ldind.u2 - conv.r4 - box float32 - stloc.s BOX_r4 - box unsigned int32 - unbox unsigned int32 - ldind.u4 - box int8 - unbox int8 - ldind.i1 - box int8 - stloc.s BOX_i1 - box unsigned int64 - stloc.s BOX_u8 - box unsigned int16 - stloc.s BOX_u2 - stloc.s BOX_i1 - unbox int8 - ldind.i1 - box int32 - stloc.s BOX_i4 - unbox int8 - ldind.i1 - box int16 - unbox int16 - ldind.i2 - box int16 - stloc.s BOX_i2 - stloc.s BOX_i1 - conv.i2 - box unsigned int8 - unbox unsigned int8 - ldind.u1 - box int8 - unbox int8 - ldind.i1 - conv.r8 - box float32 - stloc.s BOX_r4 - stloc.s BOX_u8 - ldind.i8 - conv.i4 - box int32 - stloc.s BOX_i4 - conv.i8 - box int64 - stloc.s BOX_i8 - box unsigned int64 - unbox unsigned int64 - ldind.u8 - conv.i2 - box unsigned int32 - unbox unsigned int32 - ldind.u4 - box int8 - unbox int8 - ldind.i1 - conv.i4 - box int8 - unbox int8 - ldind.i1 - box unsigned int8 - unbox unsigned int8 - ldind.u1 - box int16 - stloc.s BOX_i2 - conv.u2 - box int16 - unbox int16 - ldind.i2 - box unsigned int32 - stloc.s BOX_u4 - conv.i1 - box int32 - unbox int32 - ldind.i4 - box unsigned int16 - unbox unsigned int16 - ldind.u2 - box int8 - unbox int8 - ldind.i1 - conv.u4 - box unsigned int32 - stloc.s BOX_u4 - box unsigned int64 - unbox unsigned int64 - ldind.u8 - box int64 - unbox int64 - pop - conv.u2 - box unsigned int8 - unbox unsigned int8 - ldind.u1 - box unsigned int8 - unbox unsigned int8 - ldind.u1 - box int32 - stloc.s BOX_i4 - conv.i2 - box unsigned int8 - unbox unsigned int8 - ldind.u1 - box int16 - unbox int16 - ldind.i2 - box unsigned int32 - unbox unsigned int32 - ldind.u4 - conv.i4 - box int32 - stloc.s BOX_i4 - ldind.u4 - box int16 - unbox int16 - ldind.i2 - conv.i8 - box int64 - stloc.s BOX_i8 - box unsigned int16 - stloc.s BOX_u2 - ldind.r8 - conv.r8 - box float64 - unbox float64 - ldind.r8 - conv.i4 - box int8 - stloc.s BOX_i1 - unbox float64 - ldind.r8 - conv.r4 - box float64 - unbox float64 - ldind.r8 - box float64 - unbox float64 - ldind.r8 - conv.i8 - box unsigned int64 - stloc.s BOX_u8 - unbox int64 - ldind.i8 - conv.i1 - box unsigned int32 - stloc.s BOX_u4 - conv.i4 - box int16 - stloc.s BOX_i2 - box float32 - unbox float32 - ldind.r4 - conv.i2 - box unsigned int16 - unbox unsigned int16 - ldind.u2 - conv.u1 - box int32 - unbox int32 - ldind.i4 - conv.u4 - box unsigned int8 - unbox unsigned int8 - ldind.u1 - conv.r4 - box float64 - unbox float64 - ldind.r8 - conv.i1 - box unsigned int32 - unbox unsigned int32 - ldind.u4 - conv.u4 - box unsigned int8 - unbox unsigned int8 - ldind.u1 - box int32 - stloc.s BOX_i4 - box float32 - stloc.s BOX_r4 - conv.i4 - box unsigned int16 - stloc.s BOX_u2 - ldind.r4 - conv.u8 - box unsigned int64 - unbox unsigned int64 - ldind.u8 - box unsigned int64 - unbox unsigned int64 - ldind.u8 - box int64 - unbox int64 - ldind.i8 - box unsigned int64 - unbox unsigned int64 - ldind.u8 - conv.u1 - box int8 - unbox int8 - ldind.i1 - conv.u1 - box int32 - unbox int32 - ldind.i4 - box unsigned int16 - unbox unsigned int16 - ldind.u2 - box unsigned int16 - unbox unsigned int16 - pop - unbox float64 - ldind.r8 - conv.i1 - box int8 - unbox int8 - ldind.i1 - box int8 - unbox int8 - ldind.i1 - box unsigned int16 - stloc.s BOX_u2 - conv.r4 - box float64 - unbox float64 - ldind.r8 - box float32 - stloc.s BOX_r4 - conv.i1 - box int32 - stloc.s BOX_i4 - box unsigned int16 - unbox unsigned int16 - ldind.u2 - conv.u4 - box int8 - stloc.s BOX_i1 - ldloc.s BOX_i1 - unbox int8 - ldind.i1 - ldc.i4 100 - or - dup - ldc.i4 100 - beq.s IL_OK - ldstr "=== FAILED ===" - br.s IL_NEXT -IL_OK: - ldstr "=== PASSED ===" -IL_NEXT: - call void [System.Console]System.Console::WriteLine(string) - ret -} -.method public hidebysig specialname rtspecialname -instance void .ctor() cil managed -{ - .maxstack 8 - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret -} -} -} diff --git a/src/coreclr/tests/src/JIT/Methodical/Boxing/boxunbox/finally.il b/src/coreclr/tests/src/JIT/Methodical/Boxing/boxunbox/finally.il deleted file mode 100644 index 846cf5166185..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/Boxing/boxunbox/finally.il +++ /dev/null @@ -1,217 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - -.assembly extern mscorlib { } -.assembly 'finally' { } -.namespace JitTest -{ - .class private auto ansi beforefieldinit App - extends [mscorlib]System.Object - { - .method private hidebysig static void - Test(bool path) cil managed - { - .maxstack 4 - .locals (int32 V_0) - .try { - ldstr "in try." - call void [System.Console]System.Console::WriteLine(string) - leave IL_END - } finally { - - IL_0000: ldc.i4.s 100 - IL_0002: stloc.0 - IL_0003: ldloc.0 - ldarg.0 - brfalse IL_000f - IL_0004: box [mscorlib]System.Int32 - IL_0009: unbox [mscorlib]System.Int32 - IL_000e: ldind.i4 - IL_000f: conv.r4 - ldarg.0 - brfalse IL_01c8 - IL_0010: box [mscorlib]System.Single - IL_0015: unbox [mscorlib]System.Single - IL_001a: ldind.r4 - IL_001b: conv.i1 - IL_001c: box [mscorlib]System.SByte - ldarg.0 - brfalse IL_002c - IL_0021: unbox [mscorlib]System.SByte - IL_0026: ldind.i1 - IL_0027: box [mscorlib]System.SByte - IL_002c: unbox [mscorlib]System.SByte - IL_0031: ldind.i1 - IL_0032: conv.i4 - IL_0038: box [mscorlib]System.IntPtr - IL_003d: unbox [mscorlib]System.IntPtr - ldarg.0 - brfalse IL_00e0 - IL_0042: ldobj [mscorlib]System.IntPtr - IL_004c: conv.u1 - IL_004d: box [mscorlib]System.Byte - IL_0052: unbox [mscorlib]System.Byte - IL_0057: ldind.u1 - IL_0058: conv.i1 - IL_0059: box [mscorlib]System.SByte - IL_005e: unbox [mscorlib]System.SByte - IL_0063: ldind.i1 - IL_0064: conv.i8 - IL_0065: box [mscorlib]System.UInt64 - IL_006a: unbox [mscorlib]System.UInt64 - IL_006f: ldind.i8 - conv.i - IL_0075: box [mscorlib]System.IntPtr - IL_007a: unbox [mscorlib]System.IntPtr - IL_007f: ldobj [mscorlib]System.IntPtr - IL_0089: conv.u8 - ldarg.0 - brfalse IL_00c6 - IL_008a: box [mscorlib]System.UInt64 - IL_008f: unbox [mscorlib]System.UInt64 - IL_0094: ldind.i8 - IL_0095: conv.u1 - IL_0096: box [mscorlib]System.Byte - IL_009b: unbox [mscorlib]System.Byte - IL_00a0: ldind.u1 - IL_00a1: conv.u8 - IL_00a2: box [mscorlib]System.Int64 - IL_00a7: unbox [mscorlib]System.Int64 - IL_00ac: ldind.i8 - IL_00ad: conv.i1 - IL_00ae: box [mscorlib]System.SByte - IL_00b3: unbox [mscorlib]System.SByte - IL_00b8: ldind.i1 - IL_00b9: conv.u4 - IL_00ba: box [mscorlib]System.UInt32 - IL_00bf: unbox [mscorlib]System.UInt32 - IL_00c4: ldind.u4 - IL_00c5: conv.u8 - IL_00c6: box [mscorlib]System.Int64 - IL_00cb: unbox [mscorlib]System.Int64 - IL_00d0: ldind.i8 - conv.u - IL_00d6: box [mscorlib]System.UIntPtr - IL_00db: unbox [mscorlib]System.UIntPtr - IL_00e0: ldobj [mscorlib]System.UIntPtr - IL_00ea: conv.r.un - IL_00eb: conv.r4 - IL_00ec: box [mscorlib]System.Single - IL_00f1: unbox [mscorlib]System.Single - IL_00f6: ldind.r4 - IL_00f7: conv.i1 - IL_00f8: box [mscorlib]System.SByte - IL_00fd: unbox [mscorlib]System.SByte - IL_0102: ldind.i1 - IL_0103: box [mscorlib]System.SByte - IL_0108: unbox [mscorlib]System.SByte - IL_010d: ldind.i1 - IL_010e: conv.i4 - IL_0114: box [mscorlib]System.IntPtr - IL_0119: unbox [mscorlib]System.IntPtr - IL_011e: ldobj [mscorlib]System.IntPtr - IL_0128: conv.u1 - IL_0129: box [mscorlib]System.Byte - IL_012e: unbox [mscorlib]System.Byte - IL_0133: ldind.u1 - IL_0134: conv.i1 - IL_0135: box [mscorlib]System.SByte - IL_013a: unbox [mscorlib]System.SByte - IL_013f: ldind.i1 - IL_0140: conv.i8 - IL_0141: box [mscorlib]System.UInt64 - IL_0146: unbox [mscorlib]System.UInt64 - IL_014b: ldind.i8 - conv.i - IL_0151: box [mscorlib]System.IntPtr - IL_0156: unbox [mscorlib]System.IntPtr - IL_015b: ldobj [mscorlib]System.IntPtr - IL_0165: conv.u8 - IL_0166: box [mscorlib]System.UInt64 - IL_016b: unbox [mscorlib]System.UInt64 - IL_0170: ldind.i8 - IL_0171: conv.u1 - ldarg.0 - brfalse IL_018a - IL_0172: box [mscorlib]System.Byte - IL_0177: unbox [mscorlib]System.Byte - IL_017c: ldind.u1 - IL_017d: conv.u8 - IL_017e: box [mscorlib]System.Int64 - IL_0183: unbox [mscorlib]System.Int64 - IL_0188: ldind.i8 - IL_0189: conv.i1 - IL_018a: box [mscorlib]System.SByte - IL_018f: unbox [mscorlib]System.SByte - IL_0194: ldind.i1 - IL_0195: conv.u4 - IL_0196: box [mscorlib]System.UInt32 - IL_019b: unbox [mscorlib]System.UInt32 - IL_01a0: ldind.u4 - IL_01a1: conv.u8 - IL_01a2: box [mscorlib]System.Int64 - IL_01a7: unbox [mscorlib]System.Int64 - IL_01ac: ldind.i8 - conv.u - IL_01b2: box [mscorlib]System.UIntPtr - IL_01b7: unbox [mscorlib]System.UIntPtr - IL_01bc: ldobj [mscorlib]System.UIntPtr - IL_01c6: conv.r.un - IL_01c7: conv.r8 - IL_01c8: box [mscorlib]System.Double - IL_01cd: unbox [mscorlib]System.Double - IL_01d2: ldind.r8 - IL_01d3: ldc.r8 100. - IL_01dc: beq.s IL_DROP - - IL_01de: ldstr "Loss of precision or unbox error" - IL_01e3: newobj instance void [mscorlib]System.Exception::.ctor(string) - IL_01e8: throw - - IL_DROP: - endfinally - } - IL_END: - ret - } // end of method App::Test - - .method private hidebysig static int32 - Main() cil managed - { - .entrypoint - .maxstack 1 - .locals (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: call void JitTest.App::Test(bool) - IL_0006: ldc.i4.1 - IL_0007: call void JitTest.App::Test(bool) - IL_000c: ldstr "=== TEST PASSED ===" - IL_0011: call void [System.Console]System.Console::WriteLine(string) - IL_0016: ldc.i4.s 100 - IL_0018: stloc.0 - IL_0019: br.s IL_001b - - IL_001b: ldloc.0 - IL_001c: ret - } // end of method App::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method App::.ctor - - } // end of class App - -} // end of namespace JitTest - diff --git a/src/coreclr/tests/src/JIT/Methodical/Boxing/boxunbox/jump.il b/src/coreclr/tests/src/JIT/Methodical/Boxing/boxunbox/jump.il deleted file mode 100644 index 36858bb35309..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/Boxing/boxunbox/jump.il +++ /dev/null @@ -1,219 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - -.assembly extern mscorlib { } -.assembly 'jump' { } -.namespace JitTest -{ - .class private auto ansi beforefieldinit App - extends [mscorlib]System.Object - { - .method private hidebysig static int64 - Test(bool path) cil managed - { - .maxstack 4 - .locals (int32 V_0) - ldstr "in Test()" - call void [System.Console]System.Console::WriteLine(string) - IL_0000: ldc.i4.s 100 - IL_0002: stloc.0 - IL_0003: ldloc.0 - ldarg.0 - brfalse IL_000f - IL_0004: box [mscorlib]System.Int32 - IL_0009: unbox [mscorlib]System.Int32 - IL_000e: ldind.i4 - IL_000f: conv.r4 - ldarg.0 - brfalse IL_01c8 - IL_0010: box [mscorlib]System.Single - IL_0015: unbox [mscorlib]System.Single - IL_001a: ldind.r4 - IL_001b: conv.i1 - IL_001c: box [mscorlib]System.SByte - ldarg.0 - brfalse IL_002c - IL_0021: unbox [mscorlib]System.SByte - IL_0026: ldind.i1 - IL_0027: box [mscorlib]System.SByte - IL_002c: unbox [mscorlib]System.SByte - IL_0031: ldind.i1 - IL_0032: conv.i4 - IL_0038: box [mscorlib]System.IntPtr - IL_003d: unbox [mscorlib]System.IntPtr - ldarg.0 - brfalse IL_00e0 - IL_0042: ldobj [mscorlib]System.IntPtr - IL_004c: conv.u1 - IL_004d: box [mscorlib]System.Byte - IL_0052: unbox [mscorlib]System.Byte - IL_0057: ldind.u1 - IL_0058: conv.i1 - IL_0059: box [mscorlib]System.SByte - IL_005e: unbox [mscorlib]System.SByte - IL_0063: ldind.i1 - IL_0064: conv.i8 - IL_0065: box [mscorlib]System.UInt64 - IL_006a: unbox [mscorlib]System.UInt64 - IL_006f: ldind.i8 - conv.i - IL_0075: box [mscorlib]System.IntPtr - IL_007a: unbox [mscorlib]System.IntPtr - IL_007f: ldobj [mscorlib]System.IntPtr - IL_0089: conv.u8 - ldarg.0 - brfalse IL_00c6 - IL_008a: box [mscorlib]System.UInt64 - IL_008f: unbox [mscorlib]System.UInt64 - IL_0094: ldind.i8 - IL_0095: conv.u1 - IL_0096: box [mscorlib]System.Byte - IL_009b: unbox [mscorlib]System.Byte - IL_00a0: ldind.u1 - IL_00a1: conv.u8 - IL_00a2: box [mscorlib]System.Int64 - IL_00a7: unbox [mscorlib]System.Int64 - IL_00ac: ldind.i8 - IL_00ad: conv.i1 - IL_00ae: box [mscorlib]System.SByte - IL_00b3: unbox [mscorlib]System.SByte - IL_00b8: ldind.i1 - IL_00b9: conv.u4 - IL_00ba: box [mscorlib]System.UInt32 - IL_00bf: unbox [mscorlib]System.UInt32 - IL_00c4: ldind.u4 - IL_00c5: conv.u8 - IL_00c6: box [mscorlib]System.Int64 - IL_00cb: unbox [mscorlib]System.Int64 - IL_00d0: ldind.i8 - conv.u - IL_00d6: box [mscorlib]System.UIntPtr - IL_00db: unbox [mscorlib]System.UIntPtr - IL_00e0: ldobj [mscorlib]System.UIntPtr - IL_00ea: conv.r.un - IL_00eb: conv.r4 - IL_00ec: box [mscorlib]System.Single - IL_00f1: unbox [mscorlib]System.Single - IL_00f6: ldind.r4 - IL_00f7: conv.i1 - IL_00f8: box [mscorlib]System.SByte - IL_00fd: unbox [mscorlib]System.SByte - IL_0102: ldind.i1 - IL_0103: box [mscorlib]System.SByte - IL_0108: unbox [mscorlib]System.SByte - IL_010d: ldind.i1 - IL_010e: conv.i4 - IL_0114: box [mscorlib]System.IntPtr - IL_0119: unbox [mscorlib]System.IntPtr - IL_011e: ldobj [mscorlib]System.IntPtr - IL_0128: conv.u1 - IL_0129: box [mscorlib]System.Byte - IL_012e: unbox [mscorlib]System.Byte - IL_0133: ldind.u1 - IL_0134: conv.i1 - IL_0135: box [mscorlib]System.SByte - IL_013a: unbox [mscorlib]System.SByte - IL_013f: ldind.i1 - IL_0140: conv.i8 - IL_0141: box [mscorlib]System.UInt64 - IL_0146: unbox [mscorlib]System.UInt64 - IL_014b: ldind.i8 - conv.i - IL_0151: box [mscorlib]System.IntPtr - IL_0156: unbox [mscorlib]System.IntPtr - IL_015b: ldobj [mscorlib]System.IntPtr - IL_0165: conv.u8 - IL_0166: box [mscorlib]System.UInt64 - IL_016b: unbox [mscorlib]System.UInt64 - IL_0170: ldind.i8 - IL_0171: conv.u1 - ldarg.0 - brfalse IL_018a - IL_0172: box [mscorlib]System.Byte - IL_0177: unbox [mscorlib]System.Byte - IL_017c: ldind.u1 - IL_017d: conv.u8 - IL_017e: box [mscorlib]System.Int64 - IL_0183: unbox [mscorlib]System.Int64 - IL_0188: ldind.i8 - IL_0189: conv.i1 - IL_018a: box [mscorlib]System.SByte - IL_018f: unbox [mscorlib]System.SByte - IL_0194: ldind.i1 - IL_0195: conv.u4 - IL_0196: box [mscorlib]System.UInt32 - IL_019b: unbox [mscorlib]System.UInt32 - IL_01a0: ldind.u4 - IL_01a1: conv.u8 - IL_01a2: box [mscorlib]System.Int64 - IL_01a7: unbox [mscorlib]System.Int64 - IL_01ac: ldind.i8 - conv.u - IL_01b2: box [mscorlib]System.UIntPtr - IL_01b7: unbox [mscorlib]System.UIntPtr - IL_01bc: ldobj [mscorlib]System.UIntPtr - IL_01c6: conv.r.un - IL_01c7: conv.r8 - IL_01c8: box [mscorlib]System.Double - IL_01cd: unbox [mscorlib]System.Double - IL_01d2: ldind.r8 - IL_01d3: ldc.r8 100. - IL_01dc: beq.s IL_END - - IL_01de: ldstr "Loss of precision or unbox error" - IL_01e3: newobj instance void [mscorlib]System.Exception::.ctor(string) - IL_01e8: throw - - IL_END: - ldc.i8 100 - ldarg.0 - brfalse.s IL_RET - pop - ldc.i4.0 - starg 0 - jmp int64 JitTest.App::Test(bool) - IL_RET: ret - } // end of method App::Test - - .method private hidebysig static int32 - Main() cil managed - { - .entrypoint - .maxstack 4 - .locals (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: call int64 JitTest.App::Test(bool) - IL_0006: ldc.i4.1 - IL_0007: call int64 JitTest.App::Test(bool) - pop - pop - IL_000c: ldstr "=== TEST PASSED ===" - IL_0011: call void [System.Console]System.Console::WriteLine(string) - IL_0016: ldc.i4.s 100 - IL_0018: stloc.0 - IL_0019: br.s IL_001b - - IL_001b: ldloc.0 - IL_001c: ret - } // end of method App::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method App::.ctor - - } // end of class App - -} // end of namespace JitTest - diff --git a/src/coreclr/tests/src/JIT/Methodical/Boxing/boxunbox/localloc.il b/src/coreclr/tests/src/JIT/Methodical/Boxing/boxunbox/localloc.il deleted file mode 100644 index 6eef467e4922..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/Boxing/boxunbox/localloc.il +++ /dev/null @@ -1,212 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - -.assembly extern mscorlib { } -.assembly 'localloc' { } -.namespace JitTest -{ - .class private auto ansi beforefieldinit App - extends [mscorlib]System.Object - { - .method private hidebysig static void - Test(bool path) cil managed - { - .maxstack 4 - .locals (int32 V_0) - sizeof int32 - localloc - dup - ldc.i4 100 - stind.i4 - ldind.i4 - IL_0002: stloc.0 - IL_0003: ldloc.0 - ldarg.0 - brfalse IL_000f - IL_0004: box [mscorlib]System.Int32 - IL_0009: unbox [mscorlib]System.Int32 - IL_000e: ldind.i4 - IL_000f: conv.r4 - ldarg.0 - brfalse IL_01c8 - IL_0010: box [mscorlib]System.Single - IL_0015: unbox [mscorlib]System.Single - IL_001a: ldind.r4 - IL_001b: conv.i1 - IL_001c: box [mscorlib]System.SByte - ldarg.0 - brfalse IL_002c - IL_0021: unbox [mscorlib]System.SByte - IL_0026: ldind.i1 - IL_0027: box [mscorlib]System.SByte - IL_002c: unbox [mscorlib]System.SByte - IL_0031: ldind.i1 - IL_0032: conv.i4 - IL_0038: box [mscorlib]System.IntPtr - IL_003d: unbox [mscorlib]System.IntPtr - ldarg.0 - brfalse IL_00e0 - IL_0042: ldobj [mscorlib]System.IntPtr - IL_004c: conv.u1 - IL_004d: box [mscorlib]System.Byte - IL_0052: unbox [mscorlib]System.Byte - IL_0057: ldind.u1 - IL_0058: conv.i1 - IL_0059: box [mscorlib]System.SByte - IL_005e: unbox [mscorlib]System.SByte - IL_0063: ldind.i1 - IL_0064: conv.i8 - IL_0065: box [mscorlib]System.UInt64 - IL_006a: unbox [mscorlib]System.UInt64 - IL_006f: ldind.i8 - conv.i - IL_0075: box [mscorlib]System.IntPtr - IL_007a: unbox [mscorlib]System.IntPtr - IL_007f: ldobj [mscorlib]System.IntPtr - IL_0089: conv.u8 - ldarg.0 - brfalse IL_00c6 - IL_008a: box [mscorlib]System.UInt64 - IL_008f: unbox [mscorlib]System.UInt64 - IL_0094: ldind.i8 - IL_0095: conv.u1 - IL_0096: box [mscorlib]System.Byte - IL_009b: unbox [mscorlib]System.Byte - IL_00a0: ldind.u1 - IL_00a1: conv.u8 - IL_00a2: box [mscorlib]System.Int64 - IL_00a7: unbox [mscorlib]System.Int64 - IL_00ac: ldind.i8 - IL_00ad: conv.i1 - IL_00ae: box [mscorlib]System.SByte - IL_00b3: unbox [mscorlib]System.SByte - IL_00b8: ldind.i1 - IL_00b9: conv.u4 - IL_00ba: box [mscorlib]System.UInt32 - IL_00bf: unbox [mscorlib]System.UInt32 - IL_00c4: ldind.u4 - IL_00c5: conv.u8 - IL_00c6: box [mscorlib]System.Int64 - IL_00cb: unbox [mscorlib]System.Int64 - IL_00d0: ldind.i8 - conv.u - IL_00d6: box [mscorlib]System.UIntPtr - IL_00db: unbox [mscorlib]System.UIntPtr - IL_00e0: ldobj [mscorlib]System.UIntPtr - IL_00ea: conv.r.un - IL_00eb: conv.r4 - IL_00ec: box [mscorlib]System.Single - IL_00f1: unbox [mscorlib]System.Single - IL_00f6: ldind.r4 - IL_00f7: conv.i1 - IL_00f8: box [mscorlib]System.SByte - IL_00fd: unbox [mscorlib]System.SByte - IL_0102: ldind.i1 - IL_0103: box [mscorlib]System.SByte - IL_0108: unbox [mscorlib]System.SByte - IL_010d: ldind.i1 - IL_010e: conv.i4 - IL_0114: box [mscorlib]System.IntPtr - IL_0119: unbox [mscorlib]System.IntPtr - IL_011e: ldobj [mscorlib]System.IntPtr - IL_0128: conv.u1 - IL_0129: box [mscorlib]System.Byte - IL_012e: unbox [mscorlib]System.Byte - IL_0133: ldind.u1 - IL_0134: conv.i1 - IL_0135: box [mscorlib]System.SByte - IL_013a: unbox [mscorlib]System.SByte - IL_013f: ldind.i1 - IL_0140: conv.i8 - IL_0141: box [mscorlib]System.UInt64 - IL_0146: unbox [mscorlib]System.UInt64 - IL_014b: ldind.i8 - conv.i - IL_0151: box [mscorlib]System.IntPtr - IL_0156: unbox [mscorlib]System.IntPtr - IL_015b: ldobj [mscorlib]System.IntPtr - IL_0165: conv.u8 - IL_0166: box [mscorlib]System.UInt64 - IL_016b: unbox [mscorlib]System.UInt64 - IL_0170: ldind.i8 - IL_0171: conv.u1 - ldarg.0 - brfalse IL_018a - IL_0172: box [mscorlib]System.Byte - IL_0177: unbox [mscorlib]System.Byte - IL_017c: ldind.u1 - IL_017d: conv.u8 - IL_017e: box [mscorlib]System.Int64 - IL_0183: unbox [mscorlib]System.Int64 - IL_0188: ldind.i8 - IL_0189: conv.i1 - IL_018a: box [mscorlib]System.SByte - IL_018f: unbox [mscorlib]System.SByte - IL_0194: ldind.i1 - IL_0195: conv.u4 - IL_0196: box [mscorlib]System.UInt32 - IL_019b: unbox [mscorlib]System.UInt32 - IL_01a0: ldind.u4 - IL_01a1: conv.u8 - IL_01a2: box [mscorlib]System.Int64 - IL_01a7: unbox [mscorlib]System.Int64 - IL_01ac: ldind.i8 - conv.u - IL_01b2: box [mscorlib]System.UIntPtr - IL_01b7: unbox [mscorlib]System.UIntPtr - IL_01bc: ldobj [mscorlib]System.UIntPtr - IL_01c6: conv.r.un - IL_01c7: conv.r8 - IL_01c8: box [mscorlib]System.Double - IL_01cd: unbox [mscorlib]System.Double - IL_01d2: ldind.r8 - IL_01d3: ldc.r8 100. - IL_01dc: beq.s IL_01e9 - - IL_01de: ldstr "Loss of precision or unbox error" - IL_01e3: newobj instance void [mscorlib]System.Exception::.ctor(string) - IL_01e8: throw - - IL_01e9: ret - } // end of method App::Test - - .method private hidebysig static int32 - Main() cil managed - { - .entrypoint - .maxstack 1 - .locals (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: call void JitTest.App::Test(bool) - IL_0006: ldc.i4.1 - IL_0007: call void JitTest.App::Test(bool) - IL_000c: ldstr "=== TEST PASSED ===" - IL_0011: call void [System.Console]System.Console::WriteLine(string) - IL_0016: ldc.i4.s 100 - IL_0018: stloc.0 - IL_0019: br.s IL_001b - - IL_001b: ldloc.0 - IL_001c: ret - } // end of method App::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method App::.ctor - - } // end of class App - -} // end of namespace JitTest - diff --git a/src/coreclr/tests/src/JIT/Methodical/Boxing/boxunbox/simple.il b/src/coreclr/tests/src/JIT/Methodical/Boxing/boxunbox/simple.il deleted file mode 100644 index 219e24fa9a28..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/Boxing/boxunbox/simple.il +++ /dev/null @@ -1,207 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - -.assembly extern mscorlib { } -.assembly 'simple' { } -.namespace JitTest -{ - .class private auto ansi beforefieldinit App - extends [mscorlib]System.Object - { - .method private hidebysig static void - Test(bool path) cil managed - { - .maxstack 4 - .locals (int32 V_0) - IL_0000: ldc.i4.s 100 - IL_0002: stloc.0 - IL_0003: ldloc.0 - ldarg.0 - brfalse IL_000f - IL_0004: box [mscorlib]System.Int32 - IL_0009: unbox [mscorlib]System.Int32 - IL_000e: ldind.i4 - IL_000f: conv.r4 - ldarg.0 - brfalse IL_01c8 - IL_0010: box [mscorlib]System.Single - IL_0015: unbox [mscorlib]System.Single - IL_001a: ldind.r4 - IL_001b: conv.i1 - IL_001c: box [mscorlib]System.SByte - ldarg.0 - brfalse IL_002c - IL_0021: unbox [mscorlib]System.SByte - IL_0026: ldind.i1 - IL_0027: box [mscorlib]System.SByte - IL_002c: unbox [mscorlib]System.SByte - IL_0031: ldind.i1 - IL_0032: conv.i4 - IL_0038: box [mscorlib]System.IntPtr - IL_003d: unbox [mscorlib]System.IntPtr - ldarg.0 - brfalse IL_00e0 - IL_0042: ldobj [mscorlib]System.IntPtr - IL_004c: conv.u1 - IL_004d: box [mscorlib]System.Byte - IL_0052: unbox [mscorlib]System.Byte - IL_0057: ldind.u1 - IL_0058: conv.i1 - IL_0059: box [mscorlib]System.SByte - IL_005e: unbox [mscorlib]System.SByte - IL_0063: ldind.i1 - IL_0064: conv.i8 - IL_0065: box [mscorlib]System.UInt64 - IL_006a: unbox [mscorlib]System.UInt64 - IL_006f: ldind.i8 - conv.i - IL_0075: box [mscorlib]System.IntPtr - IL_007a: unbox [mscorlib]System.IntPtr - IL_007f: ldobj [mscorlib]System.IntPtr - IL_0089: conv.u8 - ldarg.0 - brfalse IL_00c6 - IL_008a: box [mscorlib]System.UInt64 - IL_008f: unbox [mscorlib]System.UInt64 - IL_0094: ldind.i8 - IL_0095: conv.u1 - IL_0096: box [mscorlib]System.Byte - IL_009b: unbox [mscorlib]System.Byte - IL_00a0: ldind.u1 - IL_00a1: conv.u8 - IL_00a2: box [mscorlib]System.Int64 - IL_00a7: unbox [mscorlib]System.Int64 - IL_00ac: ldind.i8 - IL_00ad: conv.i1 - IL_00ae: box [mscorlib]System.SByte - IL_00b3: unbox [mscorlib]System.SByte - IL_00b8: ldind.i1 - IL_00b9: conv.u4 - IL_00ba: box [mscorlib]System.UInt32 - IL_00bf: unbox [mscorlib]System.UInt32 - IL_00c4: ldind.u4 - IL_00c5: conv.u8 - IL_00c6: box [mscorlib]System.Int64 - IL_00cb: unbox [mscorlib]System.Int64 - IL_00d0: ldind.i8 - conv.u - IL_00d6: box [mscorlib]System.UIntPtr - IL_00db: unbox [mscorlib]System.UIntPtr - IL_00e0: ldobj [mscorlib]System.UIntPtr - IL_00ea: conv.r.un - IL_00eb: conv.r4 - IL_00ec: box [mscorlib]System.Single - IL_00f1: unbox [mscorlib]System.Single - IL_00f6: ldind.r4 - IL_00f7: conv.i1 - IL_00f8: box [mscorlib]System.SByte - IL_00fd: unbox [mscorlib]System.SByte - IL_0102: ldind.i1 - IL_0103: box [mscorlib]System.SByte - IL_0108: unbox [mscorlib]System.SByte - IL_010d: ldind.i1 - IL_010e: conv.i4 - IL_0114: box [mscorlib]System.IntPtr - IL_0119: unbox [mscorlib]System.IntPtr - IL_011e: ldobj [mscorlib]System.IntPtr - IL_0128: conv.u1 - IL_0129: box [mscorlib]System.Byte - IL_012e: unbox [mscorlib]System.Byte - IL_0133: ldind.u1 - IL_0134: conv.i1 - IL_0135: box [mscorlib]System.SByte - IL_013a: unbox [mscorlib]System.SByte - IL_013f: ldind.i1 - IL_0140: conv.i8 - IL_0141: box [mscorlib]System.UInt64 - IL_0146: unbox [mscorlib]System.UInt64 - IL_014b: ldind.i8 - conv.i - IL_0151: box [mscorlib]System.IntPtr - IL_0156: unbox [mscorlib]System.IntPtr - IL_015b: ldobj [mscorlib]System.IntPtr - IL_0165: conv.u8 - IL_0166: box [mscorlib]System.UInt64 - IL_016b: unbox [mscorlib]System.UInt64 - IL_0170: ldind.i8 - IL_0171: conv.u1 - ldarg.0 - brfalse IL_018a - IL_0172: box [mscorlib]System.Byte - IL_0177: unbox [mscorlib]System.Byte - IL_017c: ldind.u1 - IL_017d: conv.u8 - IL_017e: box [mscorlib]System.Int64 - IL_0183: unbox [mscorlib]System.Int64 - IL_0188: ldind.i8 - IL_0189: conv.i1 - IL_018a: box [mscorlib]System.SByte - IL_018f: unbox [mscorlib]System.SByte - IL_0194: ldind.i1 - IL_0195: conv.u4 - IL_0196: box [mscorlib]System.UInt32 - IL_019b: unbox [mscorlib]System.UInt32 - IL_01a0: ldind.u4 - IL_01a1: conv.u8 - IL_01a2: box [mscorlib]System.Int64 - IL_01a7: unbox [mscorlib]System.Int64 - IL_01ac: ldind.i8 - conv.u - IL_01b2: box [mscorlib]System.UIntPtr - IL_01b7: unbox [mscorlib]System.UIntPtr - IL_01bc: ldobj [mscorlib]System.UIntPtr - IL_01c6: conv.r.un - IL_01c7: conv.r8 - IL_01c8: box [mscorlib]System.Double - IL_01cd: unbox [mscorlib]System.Double - IL_01d2: ldind.r8 - IL_01d3: ldc.r8 100. - IL_01dc: beq.s IL_01e9 - - IL_01de: ldstr "Loss of precision or unbox error" - IL_01e3: newobj instance void [mscorlib]System.Exception::.ctor(string) - IL_01e8: throw - - IL_01e9: ret - } // end of method App::Test - - .method private hidebysig static int32 - Main() cil managed - { - .entrypoint - .maxstack 1 - .locals (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: call void JitTest.App::Test(bool) - IL_0006: ldc.i4.1 - IL_0007: call void JitTest.App::Test(bool) - IL_000c: ldstr "=== TEST PASSED ===" - IL_0011: call void [System.Console]System.Console::WriteLine(string) - IL_0016: ldc.i4.s 100 - IL_0018: stloc.0 - IL_0019: br.s IL_001b - - IL_001b: ldloc.0 - IL_001c: ret - } // end of method App::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method App::.ctor - - } // end of class App - -} // end of namespace JitTest - diff --git a/src/coreclr/tests/src/JIT/Methodical/Boxing/boxunbox/tailcall.il b/src/coreclr/tests/src/JIT/Methodical/Boxing/boxunbox/tailcall.il deleted file mode 100644 index b9979be66e35..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/Boxing/boxunbox/tailcall.il +++ /dev/null @@ -1,213 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - -.assembly extern System.Console { auto } -.assembly extern mscorlib { auto } - -.assembly 'tailcall' { } -.namespace JitTest -{ - .class private auto ansi beforefieldinit App - extends [mscorlib]System.Object - { - .method private hidebysig static int64 - Test(bool path) cil managed - { - .maxstack 4 - .locals (int32 V_0) - IL_0000: ldc.i4.s 100 - IL_0002: stloc.0 - IL_0003: ldloc.0 - ldarg.0 - brfalse IL_000f - IL_0004: box [mscorlib]System.Int32 - IL_0009: unbox [mscorlib]System.Int32 - IL_000e: ldind.i4 - IL_000f: conv.r4 - ldarg.0 - brfalse IL_01c8 - IL_0010: box [mscorlib]System.Single - IL_0015: unbox [mscorlib]System.Single - IL_001a: ldind.r4 - IL_001b: conv.i1 - IL_001c: box [mscorlib]System.SByte - ldarg.0 - brfalse IL_002c - IL_0021: unbox [mscorlib]System.SByte - IL_0026: ldind.i1 - IL_0027: box [mscorlib]System.SByte - IL_002c: unbox [mscorlib]System.SByte - IL_0031: ldind.i1 - IL_0032: conv.i4 - IL_0038: box [mscorlib]System.IntPtr - IL_003d: unbox [mscorlib]System.IntPtr - ldarg.0 - brfalse IL_00e0 - IL_0042: ldobj [mscorlib]System.IntPtr - IL_004c: conv.u1 - IL_004d: box [mscorlib]System.Byte - IL_0052: unbox [mscorlib]System.Byte - IL_0057: ldind.u1 - IL_0058: conv.i1 - IL_0059: box [mscorlib]System.SByte - IL_005e: unbox [mscorlib]System.SByte - IL_0063: ldind.i1 - IL_0064: conv.i8 - IL_0065: box [mscorlib]System.UInt64 - IL_006a: unbox [mscorlib]System.UInt64 - IL_006f: ldind.i8 - conv.i - IL_0075: box [mscorlib]System.IntPtr - IL_007a: unbox [mscorlib]System.IntPtr - IL_007f: ldobj [mscorlib]System.IntPtr - IL_0089: conv.u8 - ldarg.0 - brfalse IL_00c6 - IL_008a: box [mscorlib]System.UInt64 - IL_008f: unbox [mscorlib]System.UInt64 - IL_0094: ldind.i8 - IL_0095: conv.u1 - IL_0096: box [mscorlib]System.Byte - IL_009b: unbox [mscorlib]System.Byte - IL_00a0: ldind.u1 - IL_00a1: conv.u8 - IL_00a2: box [mscorlib]System.Int64 - IL_00a7: unbox [mscorlib]System.Int64 - IL_00ac: ldind.i8 - IL_00ad: conv.i1 - IL_00ae: box [mscorlib]System.SByte - IL_00b3: unbox [mscorlib]System.SByte - IL_00b8: ldind.i1 - IL_00b9: conv.u4 - IL_00ba: box [mscorlib]System.UInt32 - IL_00bf: unbox [mscorlib]System.UInt32 - IL_00c4: ldind.u4 - IL_00c5: conv.u8 - IL_00c6: box [mscorlib]System.Int64 - IL_00cb: unbox [mscorlib]System.Int64 - IL_00d0: ldind.i8 - conv.u - IL_00d6: box [mscorlib]System.UIntPtr - IL_00db: unbox [mscorlib]System.UIntPtr - IL_00e0: ldobj [mscorlib]System.UIntPtr - IL_00ea: conv.r.un - IL_00eb: conv.r4 - IL_00ec: box [mscorlib]System.Single - IL_00f1: unbox [mscorlib]System.Single - IL_00f6: ldind.r4 - IL_00f7: conv.i1 - IL_00f8: box [mscorlib]System.SByte - IL_00fd: unbox [mscorlib]System.SByte - IL_0102: ldind.i1 - IL_0103: box [mscorlib]System.SByte - IL_0108: unbox [mscorlib]System.SByte - IL_010d: ldind.i1 - IL_010e: conv.i4 - IL_0114: box [mscorlib]System.IntPtr - IL_0119: unbox [mscorlib]System.IntPtr - IL_011e: ldobj [mscorlib]System.IntPtr - IL_0128: conv.u1 - IL_0129: box [mscorlib]System.Byte - IL_012e: unbox [mscorlib]System.Byte - IL_0133: ldind.u1 - IL_0134: conv.i1 - IL_0135: box [mscorlib]System.SByte - IL_013a: unbox [mscorlib]System.SByte - IL_013f: ldind.i1 - IL_0140: conv.i8 - IL_0141: box [mscorlib]System.UInt64 - IL_0146: unbox [mscorlib]System.UInt64 - IL_014b: ldind.i8 - conv.i - IL_0151: box [mscorlib]System.IntPtr - IL_0156: unbox [mscorlib]System.IntPtr - IL_015b: ldobj [mscorlib]System.IntPtr - IL_0165: conv.u8 - IL_0166: box [mscorlib]System.UInt64 - IL_016b: unbox [mscorlib]System.UInt64 - IL_0170: ldind.i8 - IL_0171: conv.u1 - ldarg.0 - brfalse IL_018a - IL_0172: box [mscorlib]System.Byte - IL_0177: unbox [mscorlib]System.Byte - IL_017c: ldind.u1 - IL_017d: conv.u8 - IL_017e: box [mscorlib]System.Int64 - IL_0183: unbox [mscorlib]System.Int64 - IL_0188: ldind.i8 - IL_0189: conv.i1 - IL_018a: box [mscorlib]System.SByte - IL_018f: unbox [mscorlib]System.SByte - IL_0194: ldind.i1 - IL_0195: conv.u4 - IL_0196: box [mscorlib]System.UInt32 - IL_019b: unbox [mscorlib]System.UInt32 - IL_01a0: ldind.u4 - IL_01a1: conv.u8 - IL_01a2: box [mscorlib]System.Int64 - IL_01a7: unbox [mscorlib]System.Int64 - IL_01ac: ldind.i8 - conv.u - IL_01b2: box [mscorlib]System.UIntPtr - IL_01b7: unbox [mscorlib]System.UIntPtr - IL_01bc: ldobj [mscorlib]System.UIntPtr - IL_01c6: conv.r.un - IL_01c7: conv.r8 - IL_01c8: box [mscorlib]System.Double - IL_01cd: unbox [mscorlib]System.Double - IL_01d2: ldind.r8 - IL_01d3: ldc.r8 100. - IL_01dc: beq.s IL_END - - IL_01de: ldstr "Loss of precision or unbox error" - IL_01e3: newobj instance void [mscorlib]System.Exception::.ctor(string) - IL_01e8: throw - - IL_END: - ldc.i8 100 - ldarg.0 - brfalse.s IL_RET - pop - ldc.i4.0 - tail. call int64 JitTest.App::Test(bool) - IL_RET: ret - } // end of method App::Test - - .method private hidebysig static int32 - Main() cil managed - { - .entrypoint - .maxstack 4 - .locals (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: call int64 JitTest.App::Test(bool) - IL_0006: ldc.i4.1 - IL_0007: call int64 JitTest.App::Test(bool) - pop - pop - IL_000c: ldstr "=== TEST PASSED ===" - IL_0011: call void [System.Console]System.Console::WriteLine(string) - IL_0016: ldc.i4.s 100 - IL_0018: stloc.0 - IL_0019: br.s IL_001b - - IL_001b: ldloc.0 - IL_001c: ret - } // end of method App::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method App::.ctor - - } // end of class App - -} // end of namespace JitTest - diff --git a/src/coreclr/tests/src/JIT/Methodical/Boxing/boxunbox/try.il b/src/coreclr/tests/src/JIT/Methodical/Boxing/boxunbox/try.il deleted file mode 100644 index 6a85a00b1345..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/Boxing/boxunbox/try.il +++ /dev/null @@ -1,214 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - -.assembly extern mscorlib { } -.assembly 'try' { } -.namespace JitTest -{ - .class private auto ansi beforefieldinit App - extends [mscorlib]System.Object - { - .method private hidebysig static void - Test(bool path) cil managed - { - .maxstack 4 - .locals (int32 V_0) - .try { - IL_0000: ldc.i4.s 100 - IL_0002: stloc.0 - IL_0003: ldloc.0 - ldarg.0 - brfalse IL_000f - IL_0004: box [mscorlib]System.Int32 - IL_0009: unbox [mscorlib]System.Int32 - IL_000e: ldind.i4 - IL_000f: conv.r4 - ldarg.0 - brfalse IL_01c8 - IL_0010: box [mscorlib]System.Single - IL_0015: unbox [mscorlib]System.Single - IL_001a: ldind.r4 - IL_001b: conv.i1 - IL_001c: box [mscorlib]System.SByte - ldarg.0 - brfalse IL_002c - IL_0021: unbox [mscorlib]System.SByte - IL_0026: ldind.i1 - IL_0027: box [mscorlib]System.SByte - IL_002c: unbox [mscorlib]System.SByte - IL_0031: ldind.i1 - IL_0032: conv.i4 - IL_0038: box [mscorlib]System.IntPtr - IL_003d: unbox [mscorlib]System.IntPtr - ldarg.0 - brfalse IL_00e0 - IL_0042: ldobj [mscorlib]System.IntPtr - IL_004c: conv.u1 - IL_004d: box [mscorlib]System.Byte - IL_0052: unbox [mscorlib]System.Byte - IL_0057: ldind.u1 - IL_0058: conv.i1 - IL_0059: box [mscorlib]System.SByte - IL_005e: unbox [mscorlib]System.SByte - IL_0063: ldind.i1 - IL_0064: conv.i8 - IL_0065: box [mscorlib]System.UInt64 - IL_006a: unbox [mscorlib]System.UInt64 - IL_006f: ldind.i8 - conv.i - IL_0075: box [mscorlib]System.IntPtr - IL_007a: unbox [mscorlib]System.IntPtr - IL_007f: ldobj [mscorlib]System.IntPtr - IL_0089: conv.u8 - ldarg.0 - brfalse IL_00c6 - IL_008a: box [mscorlib]System.UInt64 - IL_008f: unbox [mscorlib]System.UInt64 - IL_0094: ldind.i8 - IL_0095: conv.u1 - IL_0096: box [mscorlib]System.Byte - IL_009b: unbox [mscorlib]System.Byte - IL_00a0: ldind.u1 - IL_00a1: conv.u8 - IL_00a2: box [mscorlib]System.Int64 - IL_00a7: unbox [mscorlib]System.Int64 - IL_00ac: ldind.i8 - IL_00ad: conv.i1 - IL_00ae: box [mscorlib]System.SByte - IL_00b3: unbox [mscorlib]System.SByte - IL_00b8: ldind.i1 - IL_00b9: conv.u4 - IL_00ba: box [mscorlib]System.UInt32 - IL_00bf: unbox [mscorlib]System.UInt32 - IL_00c4: ldind.u4 - IL_00c5: conv.u8 - IL_00c6: box [mscorlib]System.Int64 - IL_00cb: unbox [mscorlib]System.Int64 - IL_00d0: ldind.i8 - conv.u - IL_00d6: box [mscorlib]System.UIntPtr - IL_00db: unbox [mscorlib]System.UIntPtr - IL_00e0: ldobj [mscorlib]System.UIntPtr - IL_00ea: conv.r.un - IL_00eb: conv.r4 - IL_00ec: box [mscorlib]System.Single - IL_00f1: unbox [mscorlib]System.Single - IL_00f6: ldind.r4 - IL_00f7: conv.i1 - IL_00f8: box [mscorlib]System.SByte - IL_00fd: unbox [mscorlib]System.SByte - IL_0102: ldind.i1 - IL_0103: box [mscorlib]System.SByte - IL_0108: unbox [mscorlib]System.SByte - IL_010d: ldind.i1 - IL_010e: conv.i4 - IL_0114: box [mscorlib]System.IntPtr - IL_0119: unbox [mscorlib]System.IntPtr - IL_011e: ldobj [mscorlib]System.IntPtr - IL_0128: conv.u1 - IL_0129: box [mscorlib]System.Byte - IL_012e: unbox [mscorlib]System.Byte - IL_0133: ldind.u1 - IL_0134: conv.i1 - IL_0135: box [mscorlib]System.SByte - IL_013a: unbox [mscorlib]System.SByte - IL_013f: ldind.i1 - IL_0140: conv.i8 - IL_0141: box [mscorlib]System.UInt64 - IL_0146: unbox [mscorlib]System.UInt64 - IL_014b: ldind.i8 - conv.i - IL_0151: box [mscorlib]System.IntPtr - IL_0156: unbox [mscorlib]System.IntPtr - IL_015b: ldobj [mscorlib]System.IntPtr - IL_0165: conv.u8 - IL_0166: box [mscorlib]System.UInt64 - IL_016b: unbox [mscorlib]System.UInt64 - IL_0170: ldind.i8 - IL_0171: conv.u1 - ldarg.0 - brfalse IL_018a - IL_0172: box [mscorlib]System.Byte - IL_0177: unbox [mscorlib]System.Byte - IL_017c: ldind.u1 - IL_017d: conv.u8 - IL_017e: box [mscorlib]System.Int64 - IL_0183: unbox [mscorlib]System.Int64 - IL_0188: ldind.i8 - IL_0189: conv.i1 - IL_018a: box [mscorlib]System.SByte - IL_018f: unbox [mscorlib]System.SByte - IL_0194: ldind.i1 - IL_0195: conv.u4 - IL_0196: box [mscorlib]System.UInt32 - IL_019b: unbox [mscorlib]System.UInt32 - IL_01a0: ldind.u4 - IL_01a1: conv.u8 - IL_01a2: box [mscorlib]System.Int64 - IL_01a7: unbox [mscorlib]System.Int64 - IL_01ac: ldind.i8 - conv.u - IL_01b2: box [mscorlib]System.UIntPtr - IL_01b7: unbox [mscorlib]System.UIntPtr - IL_01bc: ldobj [mscorlib]System.UIntPtr - IL_01c6: conv.r.un - IL_01c7: conv.r8 - IL_01c8: box [mscorlib]System.Double - IL_01cd: unbox [mscorlib]System.Double - IL_01d2: ldind.r8 - IL_01d3: ldc.r8 100. - IL_01dc: beq.s IL_DROP - - IL_01de: ldstr "Loss of precision or unbox error" - IL_01e3: newobj instance void [mscorlib]System.Exception::.ctor(string) - IL_01e8: throw - - IL_DROP: - leave.s IL_END - } catch [mscorlib]System.DivideByZeroException { - rethrow - } - IL_END: - ret - } // end of method App::Test - - .method private hidebysig static int32 - Main() cil managed - { - .entrypoint - .maxstack 1 - .locals (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: call void JitTest.App::Test(bool) - IL_0006: ldc.i4.1 - IL_0007: call void JitTest.App::Test(bool) - IL_000c: ldstr "=== TEST PASSED ===" - IL_0011: call void [System.Console]System.Console::WriteLine(string) - IL_0016: ldc.i4.s 100 - IL_0018: stloc.0 - IL_0019: br.s IL_001b - - IL_001b: ldloc.0 - IL_001c: ret - } // end of method App::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method App::.ctor - - } // end of class App - -} // end of namespace JitTest - diff --git a/src/coreclr/tests/src/JIT/Methodical/Boxing/functional/sin.cs b/src/coreclr/tests/src/JIT/Methodical/Boxing/functional/sin.cs deleted file mode 100644 index 0c8beacbbd8a..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/Boxing/functional/sin.cs +++ /dev/null @@ -1,108 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - -using System; - - -namespace SinCalc -{ - internal class SinCalc - { - protected struct CalcCtx - { - private double _powX,_sumOfTerms; - private object _term; - - public double fact; - public double get_powX() { return _powX; } - public void set_powX(double val) { _powX = val; } - - public double sumOfTerms - { - get { return _sumOfTerms; } - set { _sumOfTerms = value; } - } - - public double term - { - get { return (double)_term; } - set { _term = value; } - } - } - - protected static object PI = 3.1415926535897932384626433832795d; - - protected static object mySin(object Angle) - { - CalcCtx ctx = new CalcCtx(); - object ct = ctx; - - ctx.fact = 1.0; - ctx.set_powX(ctx.term = (double)Angle); - ctx.sumOfTerms = 0.0; - - for (object i = 1; (int)i <= 200; i = (int)i + 2) - { - ctx.sumOfTerms = ctx.sumOfTerms + ctx.term; - ctx.set_powX(ctx.get_powX() * (-(double)Angle * (double)Angle)); - ctx.fact = ctx.fact * ((int)i + 1) * ((int)i + 2); - ctx.term = ctx.get_powX() / ctx.fact; - } - return ctx.sumOfTerms; - } - - private static int Main() - { - object i; - object Angle; - object Result1, Result2; - object[] testresults = new object[10]; - testresults[0] = 0.000000000d; - testresults[1] = 0.309016994d; - testresults[2] = 0.587785252d; - testresults[3] = 0.809016994d; - testresults[4] = 0.951056516d; - testresults[5] = 1.000000000d; - testresults[6] = 0.951056516d; - testresults[7] = 0.809016994d; - testresults[8] = 0.587785252d; - testresults[9] = 0.309016994d; - - object mistake = 1e-9d; - for (i = 0; (int)i < 10; i = (int)i + 1) - { - Angle = ((double)PI) * ((int)i / 10.0); - Console.Write("Classlib Sin("); - Console.Write(Angle); - Console.Write(")="); - Console.WriteLine(Result1 = Math.Sin((double)Angle)); - Console.Write("This Version("); - Console.Write(Angle); - Console.Write(")="); - Console.WriteLine(Result2 = (double)mySin(Angle)); - Console.Write("Error is:"); - Console.WriteLine((double)Result1 - (double)Result2); - Console.WriteLine(); - if (Math.Abs((double)Result1 - (double)Result2) > (double)mistake) - { - Console.WriteLine("ERROR, Versions too far apart!"); - return 1; - } - if (Math.Abs((double)testresults[(int)i] - (double)Result1) > (double)mistake) - { - Console.WriteLine("ERROR, Classlib version isnt right!"); - return 1; - } - if (Math.Abs((double)testresults[(int)i] - (double)Result2) > (double)mistake) - { - Console.WriteLine("ERROR, our version isnt right!"); - return 1; - } - } - Console.WriteLine("Yippie, all correct"); - return 100; - } - } -} diff --git a/src/coreclr/tests/src/JIT/Methodical/Boxing/misc/enum.cs b/src/coreclr/tests/src/JIT/Methodical/Boxing/misc/enum.cs deleted file mode 100644 index ee739bc5532f..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/Boxing/misc/enum.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -namespace BoxTest -{ - internal enum ToPrintOrNotToPrint - { - Print, - DoNotPrint - } - - internal class Test - { - protected object Fibonacci(object num, object flag) - { - if ((ToPrintOrNotToPrint)flag == ToPrintOrNotToPrint.DoNotPrint) - return Fibonacci2(num, flag); - if (((int)num % 2) == 0) - return Fibonacci2(num, flag); - return Fibonacci2(num, flag); - } - - protected object Fibonacci2(object num, object flag) - { - int N; - if ((int)num <= 1) - N = (int)num; - else - N = (int)Fibonacci((int)num - 2, - ToPrintOrNotToPrint.DoNotPrint) + (int)Fibonacci((int)num - 1, flag); - if ((ToPrintOrNotToPrint)flag == ToPrintOrNotToPrint.Print) - Console.Write(N.ToString() + " "); - return N; - } - - private static int Main() - { - new Test().Fibonacci(20, ToPrintOrNotToPrint.Print); - Console.WriteLine(); - Console.WriteLine("*** PASSED ***"); - return 100; - } - } -} diff --git a/src/coreclr/tests/src/JIT/Methodical/Boxing/morph/sin.cs b/src/coreclr/tests/src/JIT/Methodical/Boxing/morph/sin.cs deleted file mode 100644 index f1cb996f593f..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/Boxing/morph/sin.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - -using System; - - -namespace SinCalc -{ - internal class SinCalc - { - protected static object PI = 3.1415926535897932384626433832795d; - - protected static object mySin(object Angle) - { - object powX, sumOfTerms, term, fact = 1.0; - - powX = term = Angle; - sumOfTerms = 0.0; - - for (object i = 1; (int)i <= 200; i = (int)i + 2) - { - sumOfTerms = (double)sumOfTerms + (double)term; - powX = (double)powX * (-(double)Angle * (double)Angle); - fact = (double)fact * ((int)i + 1) * ((int)i + 2); - term = (double)powX / (double)fact; - } - return sumOfTerms; - } - - private static int Main() - { - object i; - object Angle; - object Result1, Result2; - object[] testresults = new object[10]; - testresults[0] = 0.000000000d; - testresults[1] = 0.309016994d; - testresults[2] = 0.587785252d; - testresults[3] = 0.809016994d; - testresults[4] = 0.951056516d; - testresults[5] = 1.000000000d; - testresults[6] = 0.951056516d; - testresults[7] = 0.809016994d; - testresults[8] = 0.587785252d; - testresults[9] = 0.309016994d; - - object mistake = 1e-9d; - for (i = 0; (int)i < 10; i = (int)i + 1) - { - Angle = ((double)PI) * ((int)i / 10.0); - Console.Write("Classlib Sin("); - Console.Write(Angle); - Console.Write(")="); - Console.WriteLine(Result1 = Math.Sin((double)Angle)); - Console.Write("This Version("); - Console.Write(Angle); - Console.Write(")="); - Console.WriteLine(Result2 = (double)mySin(Angle)); - Console.Write("Error is:"); - Console.WriteLine((double)Result1 - (double)Result2); - Console.WriteLine(); - if (Math.Abs((double)Result1 - (double)Result2) > (double)mistake) - { - Console.WriteLine("ERROR, Versions too far apart!"); - return 1; - } - if (Math.Abs((double)testresults[(int)i] - (double)Result1) > (double)mistake) - { - Console.WriteLine("ERROR, Classlib version isnt right!"); - return 1; - } - if (Math.Abs((double)testresults[(int)i] - (double)Result2) > (double)mistake) - { - Console.WriteLine("ERROR, our version isnt right!"); - return 1; - } - } - Console.WriteLine("Yippie, all correct"); - return 100; - } - } -} diff --git a/src/coreclr/tests/src/JIT/Methodical/Boxing/seh/fault.il b/src/coreclr/tests/src/JIT/Methodical/Boxing/seh/fault.il deleted file mode 100644 index 625d5e8a1fb8..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/Boxing/seh/fault.il +++ /dev/null @@ -1,559 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - -.assembly extern mscorlib -{ -} -.assembly 'try'// as "try" -{ -} -.namespace SinCalc -{ - .class auto ansi MistakeException extends [mscorlib]System.Exception - { - .field public class System.Object mistake - .method public hidebysig specialname rtspecialname - instance void .ctor(float64 m) il managed - { - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldstr "Mistake!" - IL_0006: call instance void [mscorlib]System.Exception::.ctor(class System.String) - IL_000b: ldarg.0 - IL_000c: ldarg.s m - IL_000e: box [mscorlib]System.Double - IL_0013: stfld class System.Object SinCalc.MistakeException::mistake - IL_0018: ret - } // end of method 'MistakeException::.ctor' - - .method public hidebysig virtual instance class System.String - ToString() il managed - { - .maxstack 8 - IL_0000: ldstr "Mistake is " - IL_0005: ldarg.0 - IL_0006: ldfld class System.Object SinCalc.MistakeException::mistake - IL_000b: callvirt instance class System.String [mscorlib]System.Object::ToString() - IL_0010: call class System.String [mscorlib]System.String::Concat(class System.String, - class System.String) - IL_0015: ret - } // end of method 'MistakeException::ToString' - - } // end of class 'MistakeException' - - .class auto ansi SinCalc extends [mscorlib]System.Object - { - .field static family class System.Object PI - .method family hidebysig static class System.Object - mySin(class System.Object Angle) il managed - { - .maxstack 3 - .locals ([0] class System.Object powX, - [1] class System.Object sumOfTerms, - [2] class System.Object term, - [3] class System.Object fact, - [4] class System.Object i, - [5] float64 V_5, - [6] int32 V_6) - IL_0000: ldc.r8 1. - IL_0009: stloc.s V_5 - IL_000b: ldloc.s V_5 - IL_000d: box [mscorlib]System.Double - IL_0012: stloc.3 - IL_0013: ldarg.0 - IL_0014: dup - IL_0015: stloc.2 - IL_0016: stloc.0 - IL_0017: ldc.r8 0. - IL_0020: stloc.s V_5 - IL_0022: ldloc.s V_5 - IL_0024: box [mscorlib]System.Double - IL_0029: stloc.1 - IL_002a: ldc.i4.1 - IL_002b: stloc.s V_6 - IL_002d: ldloc.s V_6 - IL_002f: box [mscorlib]System.Int32 - IL_0034: stloc.s i - IL_0036: br IL_00cd - - IL_003b: ldloc.1 - IL_003c: unbox [mscorlib]System.Double - IL_0041: ldind.r8 - IL_0042: ldloc.2 - IL_0043: unbox [mscorlib]System.Double - IL_0048: ldind.r8 - IL_0049: add - IL_004a: stloc.s V_5 - IL_004c: ldloc.s V_5 - IL_004e: box [mscorlib]System.Double - IL_0053: stloc.1 - IL_0054: ldloc.0 - IL_0055: unbox [mscorlib]System.Double - IL_005a: ldind.r8 - IL_005b: ldarg.0 - IL_005c: unbox [mscorlib]System.Double - IL_0061: ldind.r8 - IL_0062: neg - IL_0063: ldarg.0 - IL_0064: unbox [mscorlib]System.Double - IL_0069: ldind.r8 - IL_006a: mul - IL_006b: mul - IL_006c: stloc.s V_5 - IL_006e: ldloc.s V_5 - IL_0070: box [mscorlib]System.Double - IL_0075: stloc.0 - IL_0076: ldloc.3 - IL_0077: unbox [mscorlib]System.Double - IL_007c: ldind.r8 - IL_007d: ldloc.s i - IL_007f: unbox [mscorlib]System.Int32 - IL_0084: ldind.i4 - IL_0085: ldc.i4.1 - IL_0086: add - IL_0087: conv.r8 - IL_0088: mul - IL_0089: ldloc.s i - IL_008b: unbox [mscorlib]System.Int32 - IL_0090: ldind.i4 - IL_0091: ldc.i4.2 - IL_0092: add - IL_0093: conv.r8 - IL_0094: mul - IL_0095: stloc.s V_5 - IL_0097: ldloc.s V_5 - IL_0099: box [mscorlib]System.Double - IL_009e: stloc.3 - IL_009f: ldloc.0 - IL_00a0: unbox [mscorlib]System.Double - IL_00a5: ldind.r8 - IL_00a6: ldloc.3 - IL_00a7: unbox [mscorlib]System.Double - IL_00ac: ldind.r8 - IL_00ad: div - IL_00ae: stloc.s V_5 - IL_00b0: ldloc.s V_5 - IL_00b2: box [mscorlib]System.Double - IL_00b7: stloc.2 - IL_00b8: ldloc.s i - IL_00ba: unbox [mscorlib]System.Int32 - IL_00bf: ldind.i4 - IL_00c0: ldc.i4.2 - IL_00c1: add - IL_00c2: stloc.s V_6 - IL_00c4: ldloc.s V_6 - IL_00c6: box [mscorlib]System.Int32 - IL_00cb: stloc.s i - IL_00cd: ldloc.s i - IL_00cf: unbox [mscorlib]System.Int32 - IL_00d4: ldind.i4 - IL_00d5: ldc.i4 0xc8 - IL_00da: ble IL_003b - - IL_00df: ldloc.1 - IL_00e0: ret - } // end of method 'SinCalc::mySin' - - .method family hidebysig static class System.Object - CalcAndCheck(class System.Object Angle, - class System.Object Expected) il managed - { - .maxstack 2 - .locals ([0] class System.Object mistake, - [1] class System.Object Result1, - [2] class System.Object Result2, - [3] float64 V_3) - IL_0000: ldc.r8 1.0000000000000001e-009 - IL_0009: stloc.3 - IL_000a: ldloc.s V_3 - IL_000c: box [mscorlib]System.Double - IL_0011: stloc.0 - IL_0012: ldarg.0 - IL_0013: unbox [mscorlib]System.Double - IL_0018: ldind.r8 - IL_0019: call float64 [mscorlib]System.Math::Sin(float64) - IL_001e: stloc.3 - IL_001f: ldloc.s V_3 - IL_0021: box [mscorlib]System.Double - IL_0026: stloc.1 - IL_0027: ldarg.0 - IL_0028: call class System.Object SinCalc.SinCalc::mySin(class System.Object) - IL_002d: unbox [mscorlib]System.Double - IL_0032: ldind.r8 - IL_0033: stloc.3 - IL_0034: ldloc.s V_3 - IL_0036: box [mscorlib]System.Double - IL_003b: stloc.2 - IL_003c: ldloc.1 - IL_003d: unbox [mscorlib]System.Double - IL_0042: ldind.r8 - IL_0043: ldloc.2 - IL_0044: unbox [mscorlib]System.Double - IL_0049: ldind.r8 - IL_004a: sub - IL_004b: call float64 [mscorlib]System.Math::Abs(float64) - IL_0050: ldloc.0 - IL_0051: unbox [mscorlib]System.Double - IL_0056: ldind.r8 - IL_0057: ble.un.s IL_0073 - - IL_0059: ldloc.1 - IL_005a: unbox [mscorlib]System.Double - IL_005f: ldind.r8 - IL_0060: ldloc.2 - IL_0061: unbox [mscorlib]System.Double - IL_0066: ldind.r8 - IL_0067: sub - IL_0068: call float64 [mscorlib]System.Math::Abs(float64) - IL_006d: newobj instance void SinCalc.MistakeException::.ctor(float64) - IL_0072: throw - - IL_0073: ldloc.1 - IL_0074: unbox [mscorlib]System.Double - IL_0079: ldind.r8 - IL_007a: ldarg.1 - IL_007b: unbox [mscorlib]System.Double - IL_0080: ldind.r8 - IL_0081: sub - IL_0082: call float64 [mscorlib]System.Math::Abs(float64) - IL_0087: ldloc.0 - IL_0088: unbox [mscorlib]System.Double - IL_008d: ldind.r8 - IL_008e: ble.un.s IL_00aa - - IL_0090: ldloc.1 - IL_0091: unbox [mscorlib]System.Double - IL_0096: ldind.r8 - IL_0097: ldarg.1 - IL_0098: unbox [mscorlib]System.Double - IL_009d: ldind.r8 - IL_009e: sub - IL_009f: call float64 [mscorlib]System.Math::Abs(float64) - IL_00a4: newobj instance void SinCalc.MistakeException::.ctor(float64) - IL_00a9: throw - - IL_00aa: ldloc.2 - IL_00ab: unbox [mscorlib]System.Double - IL_00b0: ldind.r8 - IL_00b1: ldarg.1 - IL_00b2: unbox [mscorlib]System.Double - IL_00b7: ldind.r8 - IL_00b8: sub - IL_00b9: call float64 [mscorlib]System.Math::Abs(float64) - IL_00be: ldloc.0 - IL_00bf: unbox [mscorlib]System.Double - IL_00c4: ldind.r8 - IL_00c5: ble.un.s IL_00e1 - - IL_00c7: ldloc.2 - IL_00c8: unbox [mscorlib]System.Double - IL_00cd: ldind.r8 - IL_00ce: ldarg.1 - IL_00cf: unbox [mscorlib]System.Double - IL_00d4: ldind.r8 - IL_00d5: sub - IL_00d6: call float64 [mscorlib]System.Math::Abs(float64) - IL_00db: newobj instance void SinCalc.MistakeException::.ctor(float64) - IL_00e0: throw - - IL_00e1: ldloc.1 - IL_00e2: ret - } // end of method 'SinCalc::CalcAndCheck' - - .method private hidebysig static int32 - Main() il managed - { - .entrypoint - .maxstack 5 - .locals ([0] class System.Object i, - [1] class System.Object Angle, - [2] class System.Object[] testresults, - [3] class System.Object total1, - [4] class System.Object total2, - [5] class System.Object total3, - [6] class SinCalc.MistakeException ex, - [7] float64 V_7, - [8] int32 V_8, - [9] class System.String[] V_9) - IL_0000: ldc.i4.s 10 - IL_0002: newarr [mscorlib]System.Object - IL_0007: stloc.2 - IL_0008: ldloc.2 - IL_0009: ldc.i4.0 - IL_000a: ldc.r8 0. - IL_0013: stloc.s V_7 - IL_0015: ldloc.s V_7 - IL_0017: box [mscorlib]System.Double - IL_001c: stelem.ref - IL_001d: ldloc.2 - IL_001e: ldc.i4.1 - IL_001f: ldc.r8 0.30901699399999999 - IL_0028: stloc.s V_7 - IL_002a: ldloc.s V_7 - IL_002c: box [mscorlib]System.Double - IL_0031: stelem.ref - IL_0032: ldloc.2 - IL_0033: ldc.i4.2 - IL_0034: ldc.r8 0.58778525199999998 - IL_003d: stloc.s V_7 - IL_003f: ldloc.s V_7 - IL_0041: box [mscorlib]System.Double - IL_0046: stelem.ref - IL_0047: ldloc.2 - IL_0048: ldc.i4.3 - IL_0049: ldc.r8 0.80901699400000004 - IL_0052: stloc.s V_7 - IL_0054: ldloc.s V_7 - IL_0056: box [mscorlib]System.Double - IL_005b: stelem.ref - IL_005c: ldloc.2 - IL_005d: ldc.i4.4 - IL_005e: ldc.r8 0.95105651599999996 - IL_0067: stloc.s V_7 - IL_0069: ldloc.s V_7 - IL_006b: box [mscorlib]System.Double - IL_0070: stelem.ref - IL_0071: ldloc.2 - IL_0072: ldc.i4.5 - IL_0073: ldc.r8 1. - IL_007c: stloc.s V_7 - IL_007e: ldloc.s V_7 - IL_0080: box [mscorlib]System.Double - IL_0085: stelem.ref - IL_0086: ldloc.2 - IL_0087: ldc.i4.6 - IL_0088: ldc.r8 0.95105651599999996 - IL_0091: stloc.s V_7 - IL_0093: ldloc.s V_7 - IL_0095: box [mscorlib]System.Double - IL_009a: stelem.ref - IL_009b: ldloc.2 - IL_009c: ldc.i4.7 - IL_009d: ldc.r8 0.80901699400000004 - IL_00a6: stloc.s V_7 - IL_00a8: ldloc.s V_7 - IL_00aa: box [mscorlib]System.Double - IL_00af: stelem.ref - IL_00b0: ldloc.2 - IL_00b1: ldc.i4.8 - IL_00b2: ldc.r8 0.58778525199999998 - IL_00bb: stloc.s V_7 - IL_00bd: ldloc.s V_7 - IL_00bf: box [mscorlib]System.Double - IL_00c4: stelem.ref - IL_00c5: ldloc.2 - IL_00c6: ldc.i4.s 9 - IL_00c8: ldc.r8 0.30901699399999999 - IL_00d1: stloc.s V_7 - IL_00d3: ldloc.s V_7 - IL_00d5: box [mscorlib]System.Double - IL_00da: stelem.ref - IL_00db: ldc.r8 0. - IL_00e4: stloc.s V_7 - IL_00e6: ldloc.s V_7 - IL_00e8: box [mscorlib]System.Double - IL_00ed: stloc.3 - IL_00ee: ldc.r8 0. - IL_00f7: stloc.s V_7 - IL_00f9: ldloc.s V_7 - IL_00fb: box [mscorlib]System.Double - IL_0100: stloc.s total2 - IL_0102: ldc.r8 0. - IL_010b: stloc.s V_7 - IL_010d: ldloc.s V_7 - IL_010f: box [mscorlib]System.Double - IL_0114: stloc.s total3 - IL_0116: ldc.i4.0 - IL_0117: stloc.s V_8 - IL_0119: ldloc.s V_8 - IL_011b: box [mscorlib]System.Int32 - IL_0120: stloc.0 - IL_0121: br IL_026d - - .try - { - .try - { - IL_0126: ldsfld class System.Object SinCalc.SinCalc::PI - IL_012b: unbox [mscorlib]System.Double - IL_0130: ldind.r8 - IL_0131: ldloc.0 - IL_0132: unbox [mscorlib]System.Int32 - IL_0137: ldind.i4 - IL_0138: conv.r8 - IL_0139: ldc.r8 10. - IL_0142: div - IL_0143: mul - IL_0144: stloc.s V_7 - IL_0146: ldloc.s V_7 - IL_0148: box [mscorlib]System.Double - IL_014d: stloc.1 - IL_014e: ldloc.s total2 - IL_0150: unbox [mscorlib]System.Double - IL_0155: ldind.r8 - IL_0156: ldloc.1 - IL_0157: unbox [mscorlib]System.Double - IL_015c: ldind.r8 - IL_015d: add - IL_015e: stloc.s V_7 - IL_0160: ldloc.s V_7 - IL_0162: box [mscorlib]System.Double - IL_0167: stloc.s total2 - IL_0169: ldloc.s total3 - IL_016b: unbox [mscorlib]System.Double - IL_0170: ldind.r8 - IL_0171: ldloc.1 - IL_0172: ldloc.2 - IL_0173: ldloc.0 - IL_0174: unbox [mscorlib]System.Int32 - IL_0179: ldind.i4 - IL_017a: ldelem.ref - IL_017b: unbox [mscorlib]System.Double - IL_0180: ldind.r8 - IL_0181: ldc.r8 4.0000000000000001e-010 - IL_018a: ldloc.0 - IL_018b: unbox [mscorlib]System.Int32 - IL_0190: ldind.i4 - IL_0191: conv.r8 - IL_0192: mul - IL_0193: add - IL_0194: stloc.s V_7 - IL_0196: ldloc.s V_7 - IL_0198: box [mscorlib]System.Double - IL_019d: call class System.Object SinCalc.SinCalc::CalcAndCheck(class System.Object, - class System.Object) - IL_01a2: unbox [mscorlib]System.Double - IL_01a7: ldind.r8 - IL_01a8: add - IL_01a9: stloc.s V_7 - IL_01ab: ldloc.s V_7 - IL_01ad: box [mscorlib]System.Double - IL_01b2: stloc.s total3 - IL_01b4: ldstr "OK" - IL_01b9: call void [System.Console]System.Console::WriteLine(class System.String) - IL_01be: leave.s IL_021a - - } // end .try - fault - { - IL_01c0: ldc.i4.6 - IL_01c1: newarr [mscorlib]System.String - IL_01c6: stloc.s V_9 - IL_01c8: ldloc.s V_9 - IL_01ca: ldc.i4.0 - IL_01cb: ldstr "Current totals " - IL_01d0: stelem.ref - IL_01d1: ldloc.s V_9 - IL_01d3: ldc.i4.1 - IL_01d4: ldloc.3 - IL_01d5: callvirt instance class System.String [mscorlib]System.Object::ToString() - IL_01da: stelem.ref - IL_01db: ldloc.s V_9 - IL_01dd: ldc.i4.2 - IL_01de: ldstr " and " - IL_01e3: stelem.ref - IL_01e4: ldloc.s V_9 - IL_01e6: ldc.i4.3 - IL_01e7: ldloc.s total2 - IL_01e9: unbox [mscorlib]System.Double - IL_01ee: ldind.r8 - IL_01ef: stloc.s V_7 - IL_01f1: ldloca.s V_7 - IL_01f3: call instance class System.String [mscorlib]System.Double::ToString() - IL_01f8: stelem.ref - IL_01f9: ldloc.s V_9 - IL_01fb: ldc.i4.4 - IL_01fc: ldstr " and " - IL_0201: stelem.ref - IL_0202: ldloc.s V_9 - IL_0204: ldc.i4.5 - IL_0205: ldloc.s total3 - IL_0207: callvirt instance class System.String [mscorlib]System.Object::ToString() - IL_020c: stelem.ref - IL_020d: ldloc.s V_9 - IL_020f: call class System.String [mscorlib]System.String::Concat(class System.String[]) - IL_0214: call void [System.Console]System.Console::WriteLine(class System.String) - IL_0219: endfinally - } // end handler - IL_021a: leave.s IL_025a - - } // end .try - catch SinCalc.MistakeException - { - IL_021c: stloc.s ex - IL_021e: ldstr "Mistake is " - IL_0223: ldloc.s ex - IL_0225: ldfld class System.Object SinCalc.MistakeException::mistake - IL_022a: callvirt instance class System.String [mscorlib]System.Object::ToString() - IL_022f: call class System.String [mscorlib]System.String::Concat(class System.String, - class System.String) - IL_0234: call void [System.Console]System.Console::WriteLine(class System.String) - IL_0239: ldloc.3 - IL_023a: unbox [mscorlib]System.Double - IL_023f: ldind.r8 - IL_0240: ldloc.s ex - IL_0242: ldfld class System.Object SinCalc.MistakeException::mistake - IL_0247: unbox [mscorlib]System.Double - IL_024c: ldind.r8 - IL_024d: add - IL_024e: stloc.s V_7 - IL_0250: ldloc.s V_7 - IL_0252: box [mscorlib]System.Double - IL_0257: stloc.3 - IL_0258: leave.s IL_025a - - } // end handler - IL_025a: ldloc.0 - IL_025b: unbox [mscorlib]System.Int32 - IL_0260: ldind.i4 - IL_0261: ldc.i4.1 - IL_0262: add - IL_0263: stloc.s V_8 - IL_0265: ldloc.s V_8 - IL_0267: box [mscorlib]System.Int32 - IL_026c: stloc.0 - IL_026d: ldloc.0 - IL_026e: unbox [mscorlib]System.Int32 - IL_0273: ldind.i4 - IL_0274: ldc.i4.s 10 - IL_0276: blt IL_0126 - - IL_027b: ldstr "**** PASSED ****" - IL_0280: call void [System.Console]System.Console::WriteLine(class System.String) - IL_0285: ldc.i4 0x64 - IL_0286: ret - } // end of method 'SinCalc::Main' - - .method public hidebysig specialname rtspecialname static - void .cctor() il managed - { - .maxstack 1 - .locals (float64 V_0) - IL_0000: ldc.r8 3.1415926535897931 - IL_0009: stloc.0 - IL_000a: ldloc.s V_0 - IL_000c: box [mscorlib]System.Double - IL_0011: stsfld class System.Object SinCalc.SinCalc::PI - IL_0016: ret - } // end of method 'SinCalc::.cctor' - - .method public hidebysig specialname rtspecialname - instance void .ctor() il managed - { - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method 'SinCalc::.ctor' - - } // end of class 'SinCalc' - -} // end of namespace 'SinCalc' - diff --git a/src/coreclr/tests/src/JIT/Methodical/Boxing/seh/filter.il b/src/coreclr/tests/src/JIT/Methodical/Boxing/seh/filter.il deleted file mode 100644 index 8cce217a6dc6..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/Boxing/seh/filter.il +++ /dev/null @@ -1,605 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - -.assembly extern mscorlib { } -.assembly 'filter' { } -.namespace SinCalc -{ - .class auto ansi MistakeException extends [mscorlib]System.Exception - { - .field public class System.Object mistake - .method public hidebysig specialname rtspecialname - instance void .ctor(float64 m) il managed - { - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldstr "Mistake!" - IL_0006: call instance void [mscorlib]System.Exception::.ctor(class System.String) - IL_000b: ldarg.0 - IL_000c: ldarg.s m - IL_000e: box [mscorlib]System.Double - IL_0013: stfld class System.Object SinCalc.MistakeException::mistake - IL_0018: ret - } // end of method 'MistakeException::.ctor' - - .method public hidebysig virtual instance class System.String - ToString() il managed - { - .maxstack 8 - IL_0000: ldstr "Mistake is " - IL_0005: ldarg.0 - IL_0006: ldfld class System.Object SinCalc.MistakeException::mistake - IL_000b: callvirt instance class System.String [mscorlib]System.Object::ToString() - IL_0010: call class System.String [mscorlib]System.String::Concat(class System.String, - class System.String) - IL_0015: ret - } // end of method 'MistakeException::ToString' - - } // end of class 'MistakeException' - - .class auto ansi SinCalc extends [mscorlib]System.Object - { - .field static family class System.Object PI - .method family hidebysig static class System.Object - mySin(class System.Object Angle) il managed - { - .maxstack 3 - .locals ([0] class System.Object powX, - [1] class System.Object sumOfTerms, - [2] class System.Object term, - [3] class System.Object fact, - [4] class System.Object i, - [5] float64 V_5, - [6] int32 V_6) - IL_0000: ldc.r8 1. - IL_0009: stloc.s V_5 - IL_000b: ldloc.s V_5 - IL_000d: box [mscorlib]System.Double - IL_0012: stloc.3 - IL_0013: ldarg.0 - IL_0014: dup - IL_0015: stloc.2 - IL_0016: stloc.0 - IL_0017: ldc.r8 0. - IL_0020: stloc.s V_5 - IL_0022: ldloc.s V_5 - IL_0024: box [mscorlib]System.Double - IL_0029: stloc.1 - IL_002a: ldc.i4.1 - IL_002b: stloc.s V_6 - IL_002d: ldloc.s V_6 - IL_002f: box [mscorlib]System.Int32 - IL_0034: stloc.s i - IL_0036: br IL_00cd - - IL_003b: ldloc.1 - IL_003c: unbox [mscorlib]System.Double - IL_0041: ldind.r8 - IL_0042: ldloc.2 - IL_0043: unbox [mscorlib]System.Double - IL_0048: ldind.r8 - IL_0049: add - IL_004a: stloc.s V_5 - IL_004c: ldloc.s V_5 - IL_004e: box [mscorlib]System.Double - IL_0053: stloc.1 - IL_0054: ldloc.0 - IL_0055: unbox [mscorlib]System.Double - IL_005a: ldind.r8 - IL_005b: ldarg.0 - IL_005c: unbox [mscorlib]System.Double - IL_0061: ldind.r8 - IL_0062: neg - IL_0063: ldarg.0 - IL_0064: unbox [mscorlib]System.Double - IL_0069: ldind.r8 - IL_006a: mul - IL_006b: mul - IL_006c: stloc.s V_5 - IL_006e: ldloc.s V_5 - IL_0070: box [mscorlib]System.Double - IL_0075: stloc.0 - IL_0076: ldloc.3 - IL_0077: unbox [mscorlib]System.Double - IL_007c: ldind.r8 - IL_007d: ldloc.s i - IL_007f: unbox [mscorlib]System.Int32 - IL_0084: ldind.i4 - IL_0085: ldc.i4.1 - IL_0086: add - IL_0087: conv.r8 - IL_0088: mul - IL_0089: ldloc.s i - IL_008b: unbox [mscorlib]System.Int32 - IL_0090: ldind.i4 - IL_0091: ldc.i4.2 - IL_0092: add - IL_0093: conv.r8 - IL_0094: mul - IL_0095: stloc.s V_5 - IL_0097: ldloc.s V_5 - IL_0099: box [mscorlib]System.Double - IL_009e: stloc.3 - IL_009f: ldloc.0 - IL_00a0: unbox [mscorlib]System.Double - IL_00a5: ldind.r8 - IL_00a6: ldloc.3 - IL_00a7: unbox [mscorlib]System.Double - IL_00ac: ldind.r8 - IL_00ad: div - IL_00ae: stloc.s V_5 - IL_00b0: ldloc.s V_5 - IL_00b2: box [mscorlib]System.Double - IL_00b7: stloc.2 - IL_00b8: ldloc.s i - IL_00ba: unbox [mscorlib]System.Int32 - IL_00bf: ldind.i4 - IL_00c0: ldc.i4.2 - IL_00c1: add - IL_00c2: stloc.s V_6 - IL_00c4: ldloc.s V_6 - IL_00c6: box [mscorlib]System.Int32 - IL_00cb: stloc.s i - IL_00cd: ldloc.s i - IL_00cf: unbox [mscorlib]System.Int32 - IL_00d4: ldind.i4 - IL_00d5: ldc.i4 0xc8 - IL_00da: ble IL_003b - - IL_00df: ldloc.1 - IL_00e0: ret - } // end of method 'SinCalc::mySin' - - .method family hidebysig static class System.Object - CalcAndCheck(class System.Object Angle, - class System.Object Expected) il managed - { - .maxstack 2 - .locals ([0] class System.Object mistake, - [1] class System.Object Result1, - [2] class System.Object Result2, - [3] float64 V_3) - IL_0000: ldc.r8 1.0000000000000001e-009 - IL_0009: stloc.3 - IL_000a: ldloc.s V_3 - IL_000c: box [mscorlib]System.Double - IL_0011: stloc.0 - IL_0012: ldarg.0 - IL_0013: unbox [mscorlib]System.Double - IL_0018: ldind.r8 - IL_0019: call float64 [mscorlib]System.Math::Sin(float64) - IL_001e: stloc.3 - IL_001f: ldloc.s V_3 - IL_0021: box [mscorlib]System.Double - IL_0026: stloc.1 - IL_0027: ldarg.0 - IL_0028: call class System.Object SinCalc.SinCalc::mySin(class System.Object) - IL_002d: unbox [mscorlib]System.Double - IL_0032: ldind.r8 - IL_0033: stloc.3 - IL_0034: ldloc.s V_3 - IL_0036: box [mscorlib]System.Double - IL_003b: stloc.2 - IL_003c: ldloc.1 - IL_003d: unbox [mscorlib]System.Double - IL_0042: ldind.r8 - IL_0043: ldloc.2 - IL_0044: unbox [mscorlib]System.Double - IL_0049: ldind.r8 - IL_004a: sub - IL_004b: call float64 [mscorlib]System.Math::Abs(float64) - IL_0050: ldloc.0 - IL_0051: unbox [mscorlib]System.Double - IL_0056: ldind.r8 - IL_0057: ble.un.s IL_0073 - - IL_0059: ldloc.1 - IL_005a: unbox [mscorlib]System.Double - IL_005f: ldind.r8 - IL_0060: ldloc.2 - IL_0061: unbox [mscorlib]System.Double - IL_0066: ldind.r8 - IL_0067: sub - IL_0068: call float64 [mscorlib]System.Math::Abs(float64) - IL_006d: newobj instance void SinCalc.MistakeException::.ctor(float64) - IL_0072: throw - - IL_0073: ldloc.1 - IL_0074: unbox [mscorlib]System.Double - IL_0079: ldind.r8 - IL_007a: ldarg.1 - IL_007b: unbox [mscorlib]System.Double - IL_0080: ldind.r8 - IL_0081: sub - IL_0082: call float64 [mscorlib]System.Math::Abs(float64) - IL_0087: ldloc.0 - IL_0088: unbox [mscorlib]System.Double - IL_008d: ldind.r8 - IL_008e: ble.un.s IL_00aa - - IL_0090: ldloc.1 - IL_0091: unbox [mscorlib]System.Double - IL_0096: ldind.r8 - IL_0097: ldarg.1 - IL_0098: unbox [mscorlib]System.Double - IL_009d: ldind.r8 - IL_009e: sub - IL_009f: call float64 [mscorlib]System.Math::Abs(float64) - IL_00a4: newobj instance void SinCalc.MistakeException::.ctor(float64) - IL_00a9: throw - - IL_00aa: ldloc.2 - IL_00ab: unbox [mscorlib]System.Double - IL_00b0: ldind.r8 - IL_00b1: ldarg.1 - IL_00b2: unbox [mscorlib]System.Double - IL_00b7: ldind.r8 - IL_00b8: sub - IL_00b9: call float64 [mscorlib]System.Math::Abs(float64) - IL_00be: ldloc.0 - IL_00bf: unbox [mscorlib]System.Double - IL_00c4: ldind.r8 - IL_00c5: ble.un.s IL_00e1 - - IL_00c7: ldloc.2 - IL_00c8: unbox [mscorlib]System.Double - IL_00cd: ldind.r8 - IL_00ce: ldarg.1 - IL_00cf: unbox [mscorlib]System.Double - IL_00d4: ldind.r8 - IL_00d5: sub - IL_00d6: call float64 [mscorlib]System.Math::Abs(float64) - IL_00db: newobj instance void SinCalc.MistakeException::.ctor(float64) - IL_00e0: throw - - IL_00e1: ldloc.1 - IL_00e2: ret - } // end of method 'SinCalc::CalcAndCheck' - - .method private hidebysig static int32 - Main() il managed - { - .entrypoint - .maxstack 5 - .locals ([0] class System.Object i, - [1] class System.Object Angle, - [2] class System.Object[] testresults, - [3] class System.Object total1, - [4] class System.Object total2, - [5] class System.Object total3, - [6] class SinCalc.MistakeException ex, - [7] float64 V_7, - [8] int32 V_8, - [9] class System.String[] V_9) - IL_0000: ldc.i4.s 10 - IL_0002: newarr [mscorlib]System.Object - IL_0007: stloc.2 - IL_0008: ldloc.2 - IL_0009: ldc.i4.0 - IL_000a: ldc.r8 0. - IL_0013: stloc.s V_7 - IL_0015: ldloc.s V_7 - IL_0017: box [mscorlib]System.Double - IL_001c: stelem.ref - IL_001d: ldloc.2 - IL_001e: ldc.i4.1 - IL_001f: ldc.r8 0.30901699399999999 - IL_0028: stloc.s V_7 - IL_002a: ldloc.s V_7 - IL_002c: box [mscorlib]System.Double - IL_0031: stelem.ref - IL_0032: ldloc.2 - IL_0033: ldc.i4.2 - IL_0034: ldc.r8 0.58778525199999998 - IL_003d: stloc.s V_7 - IL_003f: ldloc.s V_7 - IL_0041: box [mscorlib]System.Double - IL_0046: stelem.ref - IL_0047: ldloc.2 - IL_0048: ldc.i4.3 - IL_0049: ldc.r8 0.80901699400000004 - IL_0052: stloc.s V_7 - IL_0054: ldloc.s V_7 - IL_0056: box [mscorlib]System.Double - IL_005b: stelem.ref - IL_005c: ldloc.2 - IL_005d: ldc.i4.4 - IL_005e: ldc.r8 0.95105651599999996 - IL_0067: stloc.s V_7 - IL_0069: ldloc.s V_7 - IL_006b: box [mscorlib]System.Double - IL_0070: stelem.ref - IL_0071: ldloc.2 - IL_0072: ldc.i4.5 - IL_0073: ldc.r8 1. - IL_007c: stloc.s V_7 - IL_007e: ldloc.s V_7 - IL_0080: box [mscorlib]System.Double - IL_0085: stelem.ref - IL_0086: ldloc.2 - IL_0087: ldc.i4.6 - IL_0088: ldc.r8 0.95105651599999996 - IL_0091: stloc.s V_7 - IL_0093: ldloc.s V_7 - IL_0095: box [mscorlib]System.Double - IL_009a: stelem.ref - IL_009b: ldloc.2 - IL_009c: ldc.i4.7 - IL_009d: ldc.r8 0.80901699400000004 - IL_00a6: stloc.s V_7 - IL_00a8: ldloc.s V_7 - IL_00aa: box [mscorlib]System.Double - IL_00af: stelem.ref - IL_00b0: ldloc.2 - IL_00b1: ldc.i4.8 - IL_00b2: ldc.r8 0.58778525199999998 - IL_00bb: stloc.s V_7 - IL_00bd: ldloc.s V_7 - IL_00bf: box [mscorlib]System.Double - IL_00c4: stelem.ref - IL_00c5: ldloc.2 - IL_00c6: ldc.i4.s 9 - IL_00c8: ldc.r8 0.30901699399999999 - IL_00d1: stloc.s V_7 - IL_00d3: ldloc.s V_7 - IL_00d5: box [mscorlib]System.Double - IL_00da: stelem.ref - IL_00db: ldc.r8 0. - IL_00e4: stloc.s V_7 - IL_00e6: ldloc.s V_7 - IL_00e8: box [mscorlib]System.Double - IL_00ed: stloc.3 - IL_00ee: ldc.r8 0. - IL_00f7: stloc.s V_7 - IL_00f9: ldloc.s V_7 - IL_00fb: box [mscorlib]System.Double - IL_0100: stloc.s total2 - IL_0102: ldc.r8 0. - IL_010b: stloc.s V_7 - IL_010d: ldloc.s V_7 - IL_010f: box [mscorlib]System.Double - IL_0114: stloc.s total3 - IL_0116: ldc.i4.0 - IL_0117: stloc.s V_8 - IL_0119: ldloc.s V_8 - IL_011b: box [mscorlib]System.Int32 - IL_0120: stloc.0 - IL_0121: br IL_026d - - .try - { - .try - { - FILTER_TRY: - IL_0126: ldsfld class System.Object SinCalc.SinCalc::PI - IL_012b: unbox [mscorlib]System.Double - IL_0130: ldind.r8 - IL_0131: ldloc.0 - IL_0132: unbox [mscorlib]System.Int32 - IL_0137: ldind.i4 - IL_0138: conv.r8 - IL_0139: ldc.r8 10. - IL_0142: div - IL_0143: mul - IL_0144: stloc.s V_7 - IL_0146: ldloc.s V_7 - IL_0148: box [mscorlib]System.Double - IL_014d: stloc.1 - IL_014e: ldloc.s total2 - IL_0150: unbox [mscorlib]System.Double - IL_0155: ldind.r8 - IL_0156: ldloc.1 - IL_0157: unbox [mscorlib]System.Double - IL_015c: ldind.r8 - IL_015d: add - IL_015e: stloc.s V_7 - IL_0160: ldloc.s V_7 - IL_0162: box [mscorlib]System.Double - IL_0167: stloc.s total2 - IL_0169: ldloc.s total3 - IL_016b: unbox [mscorlib]System.Double - IL_0170: ldind.r8 - IL_0171: ldloc.1 - IL_0172: ldloc.2 - IL_0173: ldloc.0 - IL_0174: unbox [mscorlib]System.Int32 - IL_0179: ldind.i4 - IL_017a: ldelem.ref - IL_017b: unbox [mscorlib]System.Double - IL_0180: ldind.r8 - IL_0181: ldc.r8 4.0000000000000001e-010 - IL_018a: ldloc.0 - IL_018b: unbox [mscorlib]System.Int32 - IL_0190: ldind.i4 - IL_0191: conv.r8 - IL_0192: mul - IL_0193: add - IL_0194: stloc.s V_7 - IL_0196: ldloc.s V_7 - IL_0198: box [mscorlib]System.Double - IL_019d: call class System.Object SinCalc.SinCalc::CalcAndCheck(class System.Object, - class System.Object) - IL_01a2: unbox [mscorlib]System.Double - IL_01a7: ldind.r8 - IL_01a8: add - IL_01a9: stloc.s V_7 - IL_01ab: ldloc.s V_7 - IL_01ad: box [mscorlib]System.Double - IL_01b2: stloc.s total3 - IL_01b4: ldstr "OK" - IL_01b9: call void [System.Console]System.Console::WriteLine(class System.String) - - leave FILTER_END - - FILTER_FILTER: - pop - - ldloc 3 - unbox [mscorlib]System.Double - ldind.r8 - ldc.r8 0.0001 - add - stloc.s V_7 - ldloc.s V_7 - box [mscorlib]System.Double - stloc.3 - - ldloc total2 - unbox [mscorlib]System.Double - ldind.r8 - ldc.r8 5.0 - bgt LARGE_MISTAKE - - ldc.i4.1 - br OUT_OF_FILTER - - LARGE_MISTAKE: - ldstr "Filtering out the exception..." - call void [System.Console]System.Console::WriteLine(class System.String) - ldc.i4.0 - - OUT_OF_FILTER: - endfilter - - FILTER_HANDLER: - pop - - ldloc.3 - unbox [mscorlib]System.Double - ldind.r8 - ldc.r8 0.02 - add - stloc.s V_7 - ldloc.s V_7 - box [mscorlib]System.Double - stloc.3 - - leave FILTER_END - FILTER_END: - - IL_01be: leave.s IL_01fe - .try FILTER_TRY to FILTER_FILTER filter FILTER_FILTER handler FILTER_HANDLER to FILTER_END - } // end .try - catch SinCalc.MistakeException - { - IL_01c0: stloc.s ex - IL_01c2: ldstr "Mistake is " - IL_01c7: ldloc.s ex - IL_01c9: ldfld class System.Object SinCalc.MistakeException::mistake - IL_01ce: callvirt instance class System.String [mscorlib]System.Object::ToString() - IL_01d3: call class System.String [mscorlib]System.String::Concat(class System.String, - class System.String) - IL_01d8: call void [System.Console]System.Console::WriteLine(class System.String) - IL_01dd: ldloc.3 - IL_01de: unbox [mscorlib]System.Double - IL_01e3: ldind.r8 - IL_01e4: ldloc.s ex - IL_01e6: ldfld class System.Object SinCalc.MistakeException::mistake - IL_01eb: unbox [mscorlib]System.Double - IL_01f0: ldind.r8 - IL_01f1: add - IL_01f2: stloc.s V_7 - IL_01f4: ldloc.s V_7 - IL_01f6: box [mscorlib]System.Double - IL_01fb: stloc.3 - IL_01fc: leave.s IL_01fe - - } // end handler - IL_01fe: leave.s IL_025a - - } // end .try - finally - { - IL_0200: ldc.i4.6 - IL_0201: newarr [mscorlib]System.String - IL_0206: stloc.s V_9 - IL_0208: ldloc.s V_9 - IL_020a: ldc.i4.0 - IL_020b: ldstr "Current totals " - IL_0210: stelem.ref - IL_0211: ldloc.s V_9 - IL_0213: ldc.i4.1 - IL_0214: ldloc.3 - IL_0215: callvirt instance class System.String [mscorlib]System.Object::ToString() - IL_021a: stelem.ref - IL_021b: ldloc.s V_9 - IL_021d: ldc.i4.2 - IL_021e: ldstr " and " - IL_0223: stelem.ref - IL_0224: ldloc.s V_9 - IL_0226: ldc.i4.3 - IL_0227: ldloc.s total2 - IL_0229: unbox [mscorlib]System.Double - IL_022e: ldind.r8 - IL_022f: stloc.s V_7 - IL_0231: ldloca.s V_7 - IL_0233: call instance class System.String [mscorlib]System.Double::ToString() - IL_0238: stelem.ref - IL_0239: ldloc.s V_9 - IL_023b: ldc.i4.4 - IL_023c: ldstr " and " - IL_0241: stelem.ref - IL_0242: ldloc.s V_9 - IL_0244: ldc.i4.5 - IL_0245: ldloc.s total3 - IL_0247: callvirt instance class System.String [mscorlib]System.Object::ToString() - IL_024c: stelem.ref - IL_024d: ldloc.s V_9 - IL_024f: call class System.String [mscorlib]System.String::Concat(class System.String[]) - IL_0254: call void [System.Console]System.Console::WriteLine(class System.String) - IL_0259: endfinally - } // end handler - IL_025a: ldloc.0 - IL_025b: unbox [mscorlib]System.Int32 - IL_0260: ldind.i4 - IL_0261: ldc.i4.1 - IL_0262: add - IL_0263: stloc.s V_8 - IL_0265: ldloc.s V_8 - IL_0267: box [mscorlib]System.Int32 - IL_026c: stloc.0 - IL_026d: ldloc.0 - IL_026e: unbox [mscorlib]System.Int32 - IL_0273: ldind.i4 - IL_0274: ldc.i4.s 10 - IL_0276: blt IL_0126 - - IL_027b: ldstr "**** PASSED ****" - IL_0280: call void [System.Console]System.Console::WriteLine(class System.String) - IL_0285: ldc.i4 0x64 - IL_0286: ret - } // end of method 'SinCalc::Main' - - .method public hidebysig specialname rtspecialname static - void .cctor() il managed - { - .maxstack 1 - .locals (float64 V_0) - IL_0000: ldc.r8 3.1415926535897931 - IL_0009: stloc.0 - IL_000a: ldloc.s V_0 - IL_000c: box [mscorlib]System.Double - IL_0011: stsfld class System.Object SinCalc.SinCalc::PI - IL_0016: ret - } // end of method 'SinCalc::.cctor' - - .method public hidebysig specialname rtspecialname - instance void .ctor() il managed - { - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method 'SinCalc::.ctor' - - } // end of class 'SinCalc' - -} // end of namespace 'SinCalc' - diff --git a/src/coreclr/tests/src/JIT/Methodical/Boxing/seh/try.il b/src/coreclr/tests/src/JIT/Methodical/Boxing/seh/try.il deleted file mode 100644 index 6f1b364fcc9a..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/Boxing/seh/try.il +++ /dev/null @@ -1,555 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - -.assembly extern mscorlib { } -.assembly 'try' { } -.namespace SinCalc -{ - .class auto ansi MistakeException extends [mscorlib]System.Exception - { - .field public class System.Object mistake - .method public hidebysig specialname rtspecialname - instance void .ctor(float64 m) il managed - { - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldstr "Mistake!" - IL_0006: call instance void [mscorlib]System.Exception::.ctor(class System.String) - IL_000b: ldarg.0 - IL_000c: ldarg.s m - IL_000e: box [mscorlib]System.Double - IL_0013: stfld class System.Object SinCalc.MistakeException::mistake - IL_0018: ret - } // end of method 'MistakeException::.ctor' - - .method public hidebysig virtual instance class System.String - ToString() il managed - { - .maxstack 8 - IL_0000: ldstr "Mistake is " - IL_0005: ldarg.0 - IL_0006: ldfld class System.Object SinCalc.MistakeException::mistake - IL_000b: callvirt instance class System.String [mscorlib]System.Object::ToString() - IL_0010: call class System.String [mscorlib]System.String::Concat(class System.String, - class System.String) - IL_0015: ret - } // end of method 'MistakeException::ToString' - - } // end of class 'MistakeException' - - .class auto ansi SinCalc extends [mscorlib]System.Object - { - .field static family class System.Object PI - .method family hidebysig static class System.Object - mySin(class System.Object Angle) il managed - { - .maxstack 3 - .locals ([0] class System.Object powX, - [1] class System.Object sumOfTerms, - [2] class System.Object term, - [3] class System.Object fact, - [4] class System.Object i, - [5] float64 V_5, - [6] int32 V_6) - IL_0000: ldc.r8 1. - IL_0009: stloc.s V_5 - IL_000b: ldloc.s V_5 - IL_000d: box [mscorlib]System.Double - IL_0012: stloc.3 - IL_0013: ldarg.0 - IL_0014: dup - IL_0015: stloc.2 - IL_0016: stloc.0 - IL_0017: ldc.r8 0. - IL_0020: stloc.s V_5 - IL_0022: ldloc.s V_5 - IL_0024: box [mscorlib]System.Double - IL_0029: stloc.1 - IL_002a: ldc.i4.1 - IL_002b: stloc.s V_6 - IL_002d: ldloc.s V_6 - IL_002f: box [mscorlib]System.Int32 - IL_0034: stloc.s i - IL_0036: br IL_00cd - - IL_003b: ldloc.1 - IL_003c: unbox [mscorlib]System.Double - IL_0041: ldind.r8 - IL_0042: ldloc.2 - IL_0043: unbox [mscorlib]System.Double - IL_0048: ldind.r8 - IL_0049: add - IL_004a: stloc.s V_5 - IL_004c: ldloc.s V_5 - IL_004e: box [mscorlib]System.Double - IL_0053: stloc.1 - IL_0054: ldloc.0 - IL_0055: unbox [mscorlib]System.Double - IL_005a: ldind.r8 - IL_005b: ldarg.0 - IL_005c: unbox [mscorlib]System.Double - IL_0061: ldind.r8 - IL_0062: neg - IL_0063: ldarg.0 - IL_0064: unbox [mscorlib]System.Double - IL_0069: ldind.r8 - IL_006a: mul - IL_006b: mul - IL_006c: stloc.s V_5 - IL_006e: ldloc.s V_5 - IL_0070: box [mscorlib]System.Double - IL_0075: stloc.0 - IL_0076: ldloc.3 - IL_0077: unbox [mscorlib]System.Double - IL_007c: ldind.r8 - IL_007d: ldloc.s i - IL_007f: unbox [mscorlib]System.Int32 - IL_0084: ldind.i4 - IL_0085: ldc.i4.1 - IL_0086: add - IL_0087: conv.r8 - IL_0088: mul - IL_0089: ldloc.s i - IL_008b: unbox [mscorlib]System.Int32 - IL_0090: ldind.i4 - IL_0091: ldc.i4.2 - IL_0092: add - IL_0093: conv.r8 - IL_0094: mul - IL_0095: stloc.s V_5 - IL_0097: ldloc.s V_5 - IL_0099: box [mscorlib]System.Double - IL_009e: stloc.3 - IL_009f: ldloc.0 - IL_00a0: unbox [mscorlib]System.Double - IL_00a5: ldind.r8 - IL_00a6: ldloc.3 - IL_00a7: unbox [mscorlib]System.Double - IL_00ac: ldind.r8 - IL_00ad: div - IL_00ae: stloc.s V_5 - IL_00b0: ldloc.s V_5 - IL_00b2: box [mscorlib]System.Double - IL_00b7: stloc.2 - IL_00b8: ldloc.s i - IL_00ba: unbox [mscorlib]System.Int32 - IL_00bf: ldind.i4 - IL_00c0: ldc.i4.2 - IL_00c1: add - IL_00c2: stloc.s V_6 - IL_00c4: ldloc.s V_6 - IL_00c6: box [mscorlib]System.Int32 - IL_00cb: stloc.s i - IL_00cd: ldloc.s i - IL_00cf: unbox [mscorlib]System.Int32 - IL_00d4: ldind.i4 - IL_00d5: ldc.i4 0xc8 - IL_00da: ble IL_003b - - IL_00df: ldloc.1 - IL_00e0: ret - } // end of method 'SinCalc::mySin' - - .method family hidebysig static class System.Object - CalcAndCheck(class System.Object Angle, - class System.Object Expected) il managed - { - .maxstack 2 - .locals ([0] class System.Object mistake, - [1] class System.Object Result1, - [2] class System.Object Result2, - [3] float64 V_3) - IL_0000: ldc.r8 1.0000000000000001e-009 - IL_0009: stloc.3 - IL_000a: ldloc.s V_3 - IL_000c: box [mscorlib]System.Double - IL_0011: stloc.0 - IL_0012: ldarg.0 - IL_0013: unbox [mscorlib]System.Double - IL_0018: ldind.r8 - IL_0019: call float64 [mscorlib]System.Math::Sin(float64) - IL_001e: stloc.3 - IL_001f: ldloc.s V_3 - IL_0021: box [mscorlib]System.Double - IL_0026: stloc.1 - IL_0027: ldarg.0 - IL_0028: call class System.Object SinCalc.SinCalc::mySin(class System.Object) - IL_002d: unbox [mscorlib]System.Double - IL_0032: ldind.r8 - IL_0033: stloc.3 - IL_0034: ldloc.s V_3 - IL_0036: box [mscorlib]System.Double - IL_003b: stloc.2 - IL_003c: ldloc.1 - IL_003d: unbox [mscorlib]System.Double - IL_0042: ldind.r8 - IL_0043: ldloc.2 - IL_0044: unbox [mscorlib]System.Double - IL_0049: ldind.r8 - IL_004a: sub - IL_004b: call float64 [mscorlib]System.Math::Abs(float64) - IL_0050: ldloc.0 - IL_0051: unbox [mscorlib]System.Double - IL_0056: ldind.r8 - IL_0057: ble.un.s IL_0073 - - IL_0059: ldloc.1 - IL_005a: unbox [mscorlib]System.Double - IL_005f: ldind.r8 - IL_0060: ldloc.2 - IL_0061: unbox [mscorlib]System.Double - IL_0066: ldind.r8 - IL_0067: sub - IL_0068: call float64 [mscorlib]System.Math::Abs(float64) - IL_006d: newobj instance void SinCalc.MistakeException::.ctor(float64) - IL_0072: throw - - IL_0073: ldloc.1 - IL_0074: unbox [mscorlib]System.Double - IL_0079: ldind.r8 - IL_007a: ldarg.1 - IL_007b: unbox [mscorlib]System.Double - IL_0080: ldind.r8 - IL_0081: sub - IL_0082: call float64 [mscorlib]System.Math::Abs(float64) - IL_0087: ldloc.0 - IL_0088: unbox [mscorlib]System.Double - IL_008d: ldind.r8 - IL_008e: ble.un.s IL_00aa - - IL_0090: ldloc.1 - IL_0091: unbox [mscorlib]System.Double - IL_0096: ldind.r8 - IL_0097: ldarg.1 - IL_0098: unbox [mscorlib]System.Double - IL_009d: ldind.r8 - IL_009e: sub - IL_009f: call float64 [mscorlib]System.Math::Abs(float64) - IL_00a4: newobj instance void SinCalc.MistakeException::.ctor(float64) - IL_00a9: throw - - IL_00aa: ldloc.2 - IL_00ab: unbox [mscorlib]System.Double - IL_00b0: ldind.r8 - IL_00b1: ldarg.1 - IL_00b2: unbox [mscorlib]System.Double - IL_00b7: ldind.r8 - IL_00b8: sub - IL_00b9: call float64 [mscorlib]System.Math::Abs(float64) - IL_00be: ldloc.0 - IL_00bf: unbox [mscorlib]System.Double - IL_00c4: ldind.r8 - IL_00c5: ble.un.s IL_00e1 - - IL_00c7: ldloc.2 - IL_00c8: unbox [mscorlib]System.Double - IL_00cd: ldind.r8 - IL_00ce: ldarg.1 - IL_00cf: unbox [mscorlib]System.Double - IL_00d4: ldind.r8 - IL_00d5: sub - IL_00d6: call float64 [mscorlib]System.Math::Abs(float64) - IL_00db: newobj instance void SinCalc.MistakeException::.ctor(float64) - IL_00e0: throw - - IL_00e1: ldloc.1 - IL_00e2: ret - } // end of method 'SinCalc::CalcAndCheck' - - .method private hidebysig static int32 - Main() il managed - { - .entrypoint - .maxstack 5 - .locals ([0] class System.Object i, - [1] class System.Object Angle, - [2] class System.Object[] testresults, - [3] class System.Object total1, - [4] class System.Object total2, - [5] class System.Object total3, - [6] class SinCalc.MistakeException ex, - [7] float64 V_7, - [8] int32 V_8, - [9] class System.String[] V_9) - IL_0000: ldc.i4.s 10 - IL_0002: newarr [mscorlib]System.Object - IL_0007: stloc.2 - IL_0008: ldloc.2 - IL_0009: ldc.i4.0 - IL_000a: ldc.r8 0. - IL_0013: stloc.s V_7 - IL_0015: ldloc.s V_7 - IL_0017: box [mscorlib]System.Double - IL_001c: stelem.ref - IL_001d: ldloc.2 - IL_001e: ldc.i4.1 - IL_001f: ldc.r8 0.30901699399999999 - IL_0028: stloc.s V_7 - IL_002a: ldloc.s V_7 - IL_002c: box [mscorlib]System.Double - IL_0031: stelem.ref - IL_0032: ldloc.2 - IL_0033: ldc.i4.2 - IL_0034: ldc.r8 0.58778525199999998 - IL_003d: stloc.s V_7 - IL_003f: ldloc.s V_7 - IL_0041: box [mscorlib]System.Double - IL_0046: stelem.ref - IL_0047: ldloc.2 - IL_0048: ldc.i4.3 - IL_0049: ldc.r8 0.80901699400000004 - IL_0052: stloc.s V_7 - IL_0054: ldloc.s V_7 - IL_0056: box [mscorlib]System.Double - IL_005b: stelem.ref - IL_005c: ldloc.2 - IL_005d: ldc.i4.4 - IL_005e: ldc.r8 0.95105651599999996 - IL_0067: stloc.s V_7 - IL_0069: ldloc.s V_7 - IL_006b: box [mscorlib]System.Double - IL_0070: stelem.ref - IL_0071: ldloc.2 - IL_0072: ldc.i4.5 - IL_0073: ldc.r8 1. - IL_007c: stloc.s V_7 - IL_007e: ldloc.s V_7 - IL_0080: box [mscorlib]System.Double - IL_0085: stelem.ref - IL_0086: ldloc.2 - IL_0087: ldc.i4.6 - IL_0088: ldc.r8 0.95105651599999996 - IL_0091: stloc.s V_7 - IL_0093: ldloc.s V_7 - IL_0095: box [mscorlib]System.Double - IL_009a: stelem.ref - IL_009b: ldloc.2 - IL_009c: ldc.i4.7 - IL_009d: ldc.r8 0.80901699400000004 - IL_00a6: stloc.s V_7 - IL_00a8: ldloc.s V_7 - IL_00aa: box [mscorlib]System.Double - IL_00af: stelem.ref - IL_00b0: ldloc.2 - IL_00b1: ldc.i4.8 - IL_00b2: ldc.r8 0.58778525199999998 - IL_00bb: stloc.s V_7 - IL_00bd: ldloc.s V_7 - IL_00bf: box [mscorlib]System.Double - IL_00c4: stelem.ref - IL_00c5: ldloc.2 - IL_00c6: ldc.i4.s 9 - IL_00c8: ldc.r8 0.30901699399999999 - IL_00d1: stloc.s V_7 - IL_00d3: ldloc.s V_7 - IL_00d5: box [mscorlib]System.Double - IL_00da: stelem.ref - IL_00db: ldc.r8 0. - IL_00e4: stloc.s V_7 - IL_00e6: ldloc.s V_7 - IL_00e8: box [mscorlib]System.Double - IL_00ed: stloc.3 - IL_00ee: ldc.r8 0. - IL_00f7: stloc.s V_7 - IL_00f9: ldloc.s V_7 - IL_00fb: box [mscorlib]System.Double - IL_0100: stloc.s total2 - IL_0102: ldc.r8 0. - IL_010b: stloc.s V_7 - IL_010d: ldloc.s V_7 - IL_010f: box [mscorlib]System.Double - IL_0114: stloc.s total3 - IL_0116: ldc.i4.0 - IL_0117: stloc.s V_8 - IL_0119: ldloc.s V_8 - IL_011b: box [mscorlib]System.Int32 - IL_0120: stloc.0 - IL_0121: br IL_026d - - .try - { - .try - { - IL_0126: ldsfld class System.Object SinCalc.SinCalc::PI - IL_012b: unbox [mscorlib]System.Double - IL_0130: ldind.r8 - IL_0131: ldloc.0 - IL_0132: unbox [mscorlib]System.Int32 - IL_0137: ldind.i4 - IL_0138: conv.r8 - IL_0139: ldc.r8 10. - IL_0142: div - IL_0143: mul - IL_0144: stloc.s V_7 - IL_0146: ldloc.s V_7 - IL_0148: box [mscorlib]System.Double - IL_014d: stloc.1 - IL_014e: ldloc.s total2 - IL_0150: unbox [mscorlib]System.Double - IL_0155: ldind.r8 - IL_0156: ldloc.1 - IL_0157: unbox [mscorlib]System.Double - IL_015c: ldind.r8 - IL_015d: add - IL_015e: stloc.s V_7 - IL_0160: ldloc.s V_7 - IL_0162: box [mscorlib]System.Double - IL_0167: stloc.s total2 - IL_0169: ldloc.s total3 - IL_016b: unbox [mscorlib]System.Double - IL_0170: ldind.r8 - IL_0171: ldloc.1 - IL_0172: ldloc.2 - IL_0173: ldloc.0 - IL_0174: unbox [mscorlib]System.Int32 - IL_0179: ldind.i4 - IL_017a: ldelem.ref - IL_017b: unbox [mscorlib]System.Double - IL_0180: ldind.r8 - IL_0181: ldc.r8 4.0000000000000001e-010 - IL_018a: ldloc.0 - IL_018b: unbox [mscorlib]System.Int32 - IL_0190: ldind.i4 - IL_0191: conv.r8 - IL_0192: mul - IL_0193: add - IL_0194: stloc.s V_7 - IL_0196: ldloc.s V_7 - IL_0198: box [mscorlib]System.Double - IL_019d: call class System.Object SinCalc.SinCalc::CalcAndCheck(class System.Object, - class System.Object) - IL_01a2: unbox [mscorlib]System.Double - IL_01a7: ldind.r8 - IL_01a8: add - IL_01a9: stloc.s V_7 - IL_01ab: ldloc.s V_7 - IL_01ad: box [mscorlib]System.Double - IL_01b2: stloc.s total3 - IL_01b4: ldstr "OK" - IL_01b9: call void [System.Console]System.Console::WriteLine(class System.String) - IL_01be: leave.s IL_01fe - - } // end .try - catch SinCalc.MistakeException - { - IL_01c0: stloc.s ex - IL_01c2: ldstr "Mistake is " - IL_01c7: ldloc.s ex - IL_01c9: ldfld class System.Object SinCalc.MistakeException::mistake - IL_01ce: callvirt instance class System.String [mscorlib]System.Object::ToString() - IL_01d3: call class System.String [mscorlib]System.String::Concat(class System.String, - class System.String) - IL_01d8: call void [System.Console]System.Console::WriteLine(class System.String) - IL_01dd: ldloc.3 - IL_01de: unbox [mscorlib]System.Double - IL_01e3: ldind.r8 - IL_01e4: ldloc.s ex - IL_01e6: ldfld class System.Object SinCalc.MistakeException::mistake - IL_01eb: unbox [mscorlib]System.Double - IL_01f0: ldind.r8 - IL_01f1: add - IL_01f2: stloc.s V_7 - IL_01f4: ldloc.s V_7 - IL_01f6: box [mscorlib]System.Double - IL_01fb: stloc.3 - IL_01fc: leave.s IL_01fe - - } // end handler - IL_01fe: leave.s IL_025a - - } // end .try - finally - { - IL_0200: ldc.i4.6 - IL_0201: newarr [mscorlib]System.String - IL_0206: stloc.s V_9 - IL_0208: ldloc.s V_9 - IL_020a: ldc.i4.0 - IL_020b: ldstr "Current totals " - IL_0210: stelem.ref - IL_0211: ldloc.s V_9 - IL_0213: ldc.i4.1 - IL_0214: ldloc.3 - IL_0215: callvirt instance class System.String [mscorlib]System.Object::ToString() - IL_021a: stelem.ref - IL_021b: ldloc.s V_9 - IL_021d: ldc.i4.2 - IL_021e: ldstr " and " - IL_0223: stelem.ref - IL_0224: ldloc.s V_9 - IL_0226: ldc.i4.3 - IL_0227: ldloc.s total2 - IL_0229: unbox [mscorlib]System.Double - IL_022e: ldind.r8 - IL_022f: stloc.s V_7 - IL_0231: ldloca.s V_7 - IL_0233: call instance class System.String [mscorlib]System.Double::ToString() - IL_0238: stelem.ref - IL_0239: ldloc.s V_9 - IL_023b: ldc.i4.4 - IL_023c: ldstr " and " - IL_0241: stelem.ref - IL_0242: ldloc.s V_9 - IL_0244: ldc.i4.5 - IL_0245: ldloc.s total3 - IL_0247: callvirt instance class System.String [mscorlib]System.Object::ToString() - IL_024c: stelem.ref - IL_024d: ldloc.s V_9 - IL_024f: call class System.String [mscorlib]System.String::Concat(class System.String[]) - IL_0254: call void [System.Console]System.Console::WriteLine(class System.String) - IL_0259: endfinally - } // end handler - IL_025a: ldloc.0 - IL_025b: unbox [mscorlib]System.Int32 - IL_0260: ldind.i4 - IL_0261: ldc.i4.1 - IL_0262: add - IL_0263: stloc.s V_8 - IL_0265: ldloc.s V_8 - IL_0267: box [mscorlib]System.Int32 - IL_026c: stloc.0 - IL_026d: ldloc.0 - IL_026e: unbox [mscorlib]System.Int32 - IL_0273: ldind.i4 - IL_0274: ldc.i4.s 10 - IL_0276: blt IL_0126 - - IL_027b: ldstr "**** PASSED ****" - IL_0280: call void [System.Console]System.Console::WriteLine(class System.String) - IL_0285: ldc.i4 0x64 - IL_0286: ret - } // end of method 'SinCalc::Main' - - .method public hidebysig specialname rtspecialname static - void .cctor() il managed - { - .maxstack 1 - .locals (float64 V_0) - IL_0000: ldc.r8 3.1415926535897931 - IL_0009: stloc.0 - IL_000a: ldloc.s V_0 - IL_000c: box [mscorlib]System.Double - IL_0011: stsfld class System.Object SinCalc.SinCalc::PI - IL_0016: ret - } // end of method 'SinCalc::.cctor' - - .method public hidebysig specialname rtspecialname - instance void .ctor() il managed - { - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method 'SinCalc::.ctor' - - } // end of class 'SinCalc' - -} // end of namespace 'SinCalc' - diff --git a/src/coreclr/tests/src/JIT/Methodical/Boxing/xlang/sin.cs b/src/coreclr/tests/src/JIT/Methodical/Boxing/xlang/sin.cs deleted file mode 100644 index aa5a62788f70..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/Boxing/xlang/sin.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace SinCalc -{ - using System; - using SinCalcLib; - - class SinCalc - { - static int Main() - { - object i; - object Angle; - object Result1, Result2; - object[] testresults = new object[10]; - testresults[0] = 0.000000000d; - testresults[1] = 0.309016994d; - testresults[2] = 0.587785252d; - testresults[3] = 0.809016994d; - testresults[4] = 0.951056516d; - testresults[5] = 1.000000000d; - testresults[6] = 0.951056516d; - testresults[7] = 0.809016994d; - testresults[8] = 0.587785252d; - testresults[9] = 0.309016994d; - - object mistake = 1e-9d; - for (i = 0; (int)i < 10; i = (int)i + 1) - { - Angle = ((PiVal)SinCalcLib.PI).Value * ((int)i / 10.0); - Console.Write("Classlib Sin("); - Console.Write(Angle); - Console.Write(")="); - Console.WriteLine(Result1 = Math.Sin((double)Angle)); - Console.Write("This Version("); - Console.Write(Angle); - Console.Write(")="); - Console.WriteLine(Result2 = (double)SinCalcLib.mySin(Angle)); - Console.Write("Error is:"); - Console.WriteLine((double)Result1 - (double)Result2); - Console.WriteLine(); - if (Math.Abs((double)Result1 - (double)Result2) > (double)mistake) // reasonable considering double - { - Console.WriteLine("ERROR, Versions too far apart!"); - return 1; - } - if (Math.Abs((double)testresults[(int)i] - (double)Result1) > (double)mistake) // reasonable considering double - { - Console.WriteLine("ERROR, Classlib version isnt right!"); - return 1; - } - if (Math.Abs((double)testresults[(int)i] - (double)Result2) > (double)mistake) // reasonable considering double - { - Console.WriteLine("ERROR, our version isnt right!"); - return 1; - } - - } - Console.WriteLine("Yippie, all correct"); - return 100; - } - } -} diff --git a/src/coreclr/tests/src/JIT/Methodical/Coverage/b39946.il b/src/coreclr/tests/src/JIT/Methodical/Coverage/b39946.il deleted file mode 100644 index 255dcab3690c..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/Coverage/b39946.il +++ /dev/null @@ -1,327 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly b39946 {} -.class ILGEN_0x5c383c7 { - - -.field static unsigned int8[] field_0x0 -.field static int32[] field_0x1 -.field static int8 field_0x2 -.field static int64 field_0x3 -.field static unsigned int16[] field_0x4 -.field static float32[] field_0x5 -.field static unsigned int64[] field_0x7 - -.method static float32 Method_0xdab1c815(float32 Arg_0x0, unsigned int8 Arg_0x1, float32 Arg_0x2, int8 Arg_0x3, unsigned int64 Arg_0x4, unsigned int8 Arg_0x5, unsigned int32 Arg_0x6, int64 Arg_0x7) { -.maxstack 19 - - .locals init (float32[] local_0x0,float64[] local_0x1,int64 local_0x2) -ldc.i4 255 - newarr [mscorlib]System.Single - stloc local_0x0 -ldc.i4 255 - newarr [mscorlib]System.Double - stloc local_0x1 - -Start_Orphan_0: -Start_Orphan_1: - ldarga Arg_0x7 - pop -End_Orphan_1: -Start_Orphan_2: - ldsfld float32[] ILGEN_0x5c383c7::field_0x5 - stsfld float32[] ILGEN_0x5c383c7::field_0x5 -End_Orphan_2: - ldloc local_0x2 - conv.i2 - pop -End_Orphan_0: - ldloc local_0x1 -Start_Orphan_3: -Start_Orphan_4: -Start_Orphan_5: -Start_Orphan_6: - nop -End_Orphan_6: - ldarga Arg_0x0 -Start_Orphan_7: - nop -End_Orphan_7: - ldc.i4.3 - conv.r8 - stind.r4 -End_Orphan_5: -Start_Orphan_8: - ldarg Arg_0x3 - starg Arg_0x6 -End_Orphan_8: - ldsfld int32[] ILGEN_0x5c383c7::field_0x1 -Start_Orphan_9: - nop -End_Orphan_9: - ldc.i4.3 - ldarg Arg_0x3 - xor - ldc.r4 float32(0x9f41529a) - conv.ovf.u2 - clt - ldelema [mscorlib]System.Int32 -Start_Orphan_a: - ldloc local_0x1 - ldc.i4.s 69 - ldelema [mscorlib]System.Double -Start_Orphan_b: - nop -End_Orphan_b: - ldc.r4 float32(0x8da3479e) - ldarg Arg_0x0 - add conv.r4 - stind.r8 -End_Orphan_a: -Start_Orphan_c: - nop -End_Orphan_c: - ldc.i4.5 - ldc.i4.1 - add - conv.ovf.i - stind.i4 -End_Orphan_4: -Start_Orphan_d: -Start_Orphan_e: - nop -End_Orphan_e: - ldloc local_0x0 - ldc.r4 float32(0x4dc5acd3) - conv.u4 - ldelema [mscorlib]System.Single - pop -End_Orphan_d: - ldsfld int32[] ILGEN_0x5c383c7::field_0x1 - ldlen - conv.u1 - newarr [mscorlib]System.Byte - stsfld unsigned int8[] ILGEN_0x5c383c7::field_0x0 -End_Orphan_3: - ldc.i4 0xe918ddce - ldelem.r8 -Start_Orphan_f: -Start_Orphan_10: -Start_Orphan_11: - ldsfld int32[] ILGEN_0x5c383c7::field_0x1 - ldc.i4.6 - ldc.i4.4 - stelem.i4 -End_Orphan_11: - ldsfld unsigned int64[] ILGEN_0x5c383c7::field_0x7 - ldc.i4.s -15 - ldelema [mscorlib]System.UInt64 - ldind.u8 - conv.i2 - starg Arg_0x6 -End_Orphan_10: -Start_Orphan_12: - nop -End_Orphan_12: - ldc.i4.7 - ldc.i4.6 - add - neg - ldarg Arg_0x3 - ceq - conv.u2 - conv.u1 - newarr [mscorlib]System.Byte -Start_Orphan_13: - ldsflda int64 ILGEN_0x5c383c7::field_0x3 - pop -End_Orphan_13: -Start_Orphan_14: -Start_Orphan_15: - ldloc local_0x1 - ldarg Arg_0x1 - ldelema [mscorlib]System.Double - pop -End_Orphan_15: -Start_Orphan_16: - nop -End_Orphan_16: - ldsfld int64 ILGEN_0x5c383c7::field_0x3 - ldc.i8 0xb58120274c655f85 - ldsfld int64 ILGEN_0x5c383c7::field_0x3 - div.un - sub.ovf - stloc local_0x2 -End_Orphan_14: -Start_Orphan_17: - ldsfld unsigned int8[] ILGEN_0x5c383c7::field_0x0 - ldsfld int8 ILGEN_0x5c383c7::field_0x2 - ldc.i4.0 - stelem.i1 -End_Orphan_17: - ldarg Arg_0x2 - conv.r8 - ckfinite - conv.i8 - conv.ovf.i - conv.i1 - ldelema [mscorlib]System.Byte - pop -End_Orphan_f: -Start_Orphan_18: -Start_Orphan_19: - ldc.i4.5 - ldc.i4.m1 - mul - conv.ovf.i8 - conv.ovf.i8 - starg Arg_0x4 -End_Orphan_19: -Start_Orphan_1c: - ldsfld unsigned int16[] ILGEN_0x5c383c7::field_0x4 -Start_Orphan_1e: - ldarga Arg_0x1 - pop -End_Orphan_1e: - ldc.i4.0 - conv.u - conv.ovf.u2 - ldc.i4.s 24 - conv.ovf.i2 - ldarg Arg_0x6 - and - stelem.i2 -End_Orphan_1c: - ldc.i4.6 - ldarg Arg_0x6 - add.ovf - ldc.i4.4 - conv.ovf.i1 - cgt -Start_Orphan_21: - ldc.i4.0 - stsfld int8 ILGEN_0x5c383c7::field_0x2 -End_Orphan_21: - ldc.i4.7 - ldsfld int8 ILGEN_0x5c383c7::field_0x2 - div - ldc.r4 float32(0x6b2f7336) - conv.ovf.u2 - or - clt.un - conv.ovf.u4 - conv.u1 - newarr [mscorlib]System.UInt64 - ldc.r8 float64(0xa6c5004c71818e) - conv.ovf.i - conv.ovf.i1.un - conv.ovf.i1.un -Start_Orphan_27: - ldc.i4.2 - conv.u1 - newarr [mscorlib]System.Int32 - ldc.i4.s 72 - ldc.i4.s -16 - add - ldc.i4.m1 - conv.ovf.i2 - stelem.i4 -End_Orphan_27: - ldc.r8 float64(0x9d7b1157b29312a1) - conv.r8 - ldc.i8 0x44819212b5bc07ec - conv.r4 - sub conv.r4 - ldarg Arg_0x0 - ldarg Arg_0x0 - sub conv.r4 - ldc.i4.8 - conv.r4 - rem conv.r4 - div conv.r4 - ldarga Arg_0x0 - ldind.r4 - ldc.i8 0x4ef8780366a2d301 - conv.r.un - add conv.r4 - ldarg Arg_0x7 - conv.r.un - ckfinite - div conv.r4 - cgt.un - ceq - ldc.i4.2 - conv.i - conv.i8 - not - stelem.i8 -End_Orphan_18: - ldloc local_0x1 -Start_Orphan_39: - ldarga Arg_0x4 - ldc.i8 0x1e9183552a8439b4 - stind.i8 -End_Orphan_39: - ldc.i4.s -80 - conv.ovf.i8 -Start_Orphan_3b: - ldarg Arg_0x4 - conv.ovf.u - conv.u1 - newarr [mscorlib]System.Byte - stsfld unsigned int8[] ILGEN_0x5c383c7::field_0x0 -End_Orphan_3b: - ldc.i4.3 - conv.ovf.i4.un -Start_Orphan_44: - ldsfld int8 ILGEN_0x5c383c7::field_0x2 - starg Arg_0x5 -End_Orphan_44: - ldc.i4 0xfe559194 - ldc.i4 0x678622e7 - conv.ovf.i2 - clt.un - add - conv.i8 - ceq - ldelema [mscorlib]System.Double - ldind.r8 - mul conv.r4 -ret -} -.method static int32 Main() { -.entrypoint -.maxstack 20 -.try { -ldc.r4 float32(0xd750d2d2) -ldc.i4 0x581312c8 -ldc.r4 float32(0x30c249c1) -ldc.i4 0x82adc1e7 -ldc.i8 0xff262efbfd511c87 -ldc.i4 0x50ed1f3a -ldc.i4 0xbbbaab3f -ldc.i8 0xdf6ade5f8fc91e19 - -call float32 ILGEN_0x5c383c7::Method_0xdab1c815(float32 Arg_0x0, unsigned int8 Arg_0x1, float32 Arg_0x2, int8 Arg_0x3, unsigned int64 Arg_0x4, unsigned int8 Arg_0x5, unsigned int32 Arg_0x6, int64 Arg_0x7) -conv.i4 -pop - - leave a1 -} catch [mscorlib]System.NullReferenceException { - pop - leave a1 -} -a1: -ldc.i4 100 - ret -} - -} diff --git a/src/coreclr/tests/src/JIT/Methodical/Coverage/b518440.il b/src/coreclr/tests/src/JIT/Methodical/Coverage/b518440.il deleted file mode 100644 index 1a76e7043d0c..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/Coverage/b518440.il +++ /dev/null @@ -1,93 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - - -.assembly extern mscorlib{} -.assembly b518440{} -.module b518440.exe - -.class public A -{ - .method public hidebysig static int32 main(string[] args) - { - .entrypoint - .maxstack 2 - - call void A::Test() - - ldstr "Test SUCCESS" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4 100 - ret - } - - .method public static void Test() - { - // Code size 45 (0x2d) - .maxstack 2 - .locals init (bool V_0, - class [mscorlib]System.Exception V_1, - class [mscorlib]System.Exception V_2, - class [mscorlib]System.Exception V_3, - class [mscorlib]System.Exception V_4) - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - .try - { - .try - { - IL_000c: newobj instance void [mscorlib]System.Exception::.ctor() - IL_0011: throw - - } // end .try - catch [mscorlib]System.Exception - { - IL_0012: dup - IL_0013: stloc.3 - IL_0014: stloc.1 - IL_0015: leave.s IL_0018 - - } // end handler - } // end .try - finally - { - IL_0017: endfinally - } // end handler - IL_0018: ldloc.0 - IL_0019: brfalse.s IL_001b - - .try - { - IL_001b: newobj instance void [mscorlib]System.Exception::.ctor() - IL_0020: throw - - } // end .try - catch [mscorlib]System.Exception - { - IL_0021: dup - IL_0022: stloc.s V_4 - IL_0024: stloc.2 - IL_0025: leave.s IL_002c - - } // end handler - - IL_002c: ret - } // end of method A::main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - .maxstack 1 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method A::.ctor -} - diff --git a/src/coreclr/tests/src/JIT/Methodical/Coverage/hole.il b/src/coreclr/tests/src/JIT/Methodical/Coverage/hole.il deleted file mode 100644 index 337363061064..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/Coverage/hole.il +++ /dev/null @@ -1,145 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - - - - -// Metadata version: v1.2.30210 -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly hole {} -.module hole.exe -// MVID: {972ABF67-C385-44E6-B525-571BCCECC13C} -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x000006FBFEC20000 - -// =============== CLASS MEMBERS DECLARATION =================== - -.class public auto ansi beforefieldinit BASIC - extends [mscorlib]System.Object -{ - .field public static int32 x - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - // Code size 115 (0x73) - .maxstack 10 - .locals init (valuetype VT[] V_0) - IL_0000: ldc.i4.4 - IL_0001: newarr VT - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: ldc.i4.0 - IL_0009: ldelema VT - IL_000e: ldstr "Boo ya!" - IL_0013: ldc.i4.3 - IL_0014: newobj instance void VT::.ctor(string, - int32) - IL_0019: stobj VT - IL_001e: ldloc.0 - IL_001f: ldc.i4.1 - IL_0020: ldelema VT - IL_0025: ldstr "Boo ya!" - IL_002a: ldc.i4.3 - IL_002b: newobj instance void VT::.ctor(string, - int32) - IL_0030: stobj VT - IL_0035: ldloc.0 - IL_0036: ldc.i4.2 - IL_0037: ldelema VT - IL_003c: ldstr "Boo ya!" - IL_0041: ldc.i4.3 - IL_0042: newobj instance void VT::.ctor(string, - int32) - IL_0047: stobj VT - IL_004c: ldloc.0 - IL_004d: ldc.i4.3 - IL_004e: ldelema VT - IL_0053: ldstr "Boo ya!" - IL_0058: ldc.i4.3 - IL_0059: newobj instance void VT::.ctor(string, - int32) - IL_005e: stobj VT - IL_0063: ldsfld int32 BASIC::x - IL_0068: ldc.i4.0 - IL_0069: ble.s IL_0072 - - tail. - call int32 BASIC::Foo() - ret - - IL_0072: ldc.i4 1 - ret - } // end of method BASIC::Main - - .method public hidebysig static int32 Foo() cil managed - { - // Code size 21 (0x15) - .maxstack 10 - IL_0000: ldstr "In Foo: " - IL_0005: call void [System.Console]System.Console::Write(string) - IL_000a: ldsfld int32 BASIC::x - IL_000f: call void [System.Console]System.Console::WriteLine(int32) - ldc.i4 100 - IL_0014: ret - } // end of method BASIC::Foo - - .method private hidebysig specialname rtspecialname static - void .cctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldc.i4.4 - IL_0001: stsfld int32 BASIC::x - IL_0006: ret - } // end of method BASIC::.cctor - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method BASIC::.ctor - -} // end of class BASIC - -.class public sequential ansi sealed beforefieldinit VT - extends [mscorlib]System.ValueType -{ - .field private string s - .field private int32 x - .method public hidebysig specialname rtspecialname - instance void .ctor(string s, - int32 x) cil managed - { - // Code size 15 (0xf) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: stfld string VT::s - IL_0007: ldarg.0 - IL_0008: ldarg.2 - IL_0009: stfld int32 VT::x - IL_000e: ret - } // end of method VT::.ctor - -} // end of class VT - - -// ============================================================= - -//*********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file hole.res diff --git a/src/coreclr/tests/src/JIT/Methodical/Invoke/callvirt/test1.cs b/src/coreclr/tests/src/JIT/Methodical/Invoke/callvirt/test1.cs deleted file mode 100644 index bd1cb5826360..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/Invoke/callvirt/test1.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -namespace Test -{ - internal class Base - { - public double m; - public Base() { m = 1.0; } - - public virtual Base[] Clone(int numOfCopies) - { - Base[] arr = new Base[numOfCopies]; - for (int L = 0; L < numOfCopies; L++) - arr[L] = new Base(); - return arr; - } - } - - internal class Derived : Base - { - public Derived() { m = 2.0; } - - public override Base[] Clone(int numOfCopies) - { - Derived[] arr = new Derived[numOfCopies]; - for (int L = 0; L < numOfCopies; L++) - arr[L] = new Derived(); - return arr; - } - - private static int Main() - { - Base bas = new Derived(); - bas = bas.Clone(11)[10]; - if (bas.m != 2.0) - { - Console.WriteLine("FAILED"); - return 1; - } - Derived derived = (Derived)bas; - bas = derived.Clone(11)[10]; - if (bas.m != 2.0) - { - Console.WriteLine("FAILED"); - return 1; - } - Console.WriteLine("PASSED"); - return 100; - } - } -} diff --git a/src/coreclr/tests/src/JIT/Methodical/Invoke/callvirt/test1.il b/src/coreclr/tests/src/JIT/Methodical/Invoke/callvirt/test1.il deleted file mode 100644 index c0f11e173a7c..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/Invoke/callvirt/test1.il +++ /dev/null @@ -1,197 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - - - - -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly 'test1'// as "test1" -{ - - // .custom instance void ['mscorlib']System.Diagnostics.DebuggableAttribute::.ctor(bool, - // bool) = ( 01 00 00 01 00 00 ) - - -} -.module 'test1.exe' -// MVID: {0D28B100-FF93-4AA9-8EDA-33F3D5D2A136} -.namespace Test -{ - .class private auto ansi Base extends ['mscorlib']System.Object - { - .field public int32 m - .method public hidebysig specialname rtspecialname - instance void .ctor() il managed - { - // Code size 14 (0xe) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void ['mscorlib']System.Object::.ctor() - IL_0006: ldarg.0 - IL_0007: ldc.i4.1 - IL_0008: stfld int32 Test.Base::m - IL_000d: ret - IL_000e: - } // end of method 'Base::.ctor' - - .method public hidebysig newslot virtual - instance class Test.Base[] Clone(int32 numOfCopies) il managed - { - // Code size 33 (0x21) - .maxstack 3 - .locals (class Test.Base[] V_0, - int32 V_1, - class Test.Base[] V_2) - IL_0000: ldarg.1 - IL_0001: newarr Test.Base - IL_0006: stloc.0 - IL_0007: ldc.i4.0 - IL_0008: stloc.1 - IL_0009: br.s IL_0017 - - IL_000b: ldloc.0 - IL_000c: ldloc.1 - IL_000d: newobj instance void Test.Base::.ctor() - IL_0012: stelem.ref - IL_0013: ldloc.1 - IL_0014: ldc.i4.1 - IL_0015: add - IL_0016: stloc.1 - IL_0017: ldloc.1 - IL_0018: ldarg.1 - IL_0019: blt.s IL_000b - - IL_001b: ldloc.0 - IL_001c: stloc.2 - IL_001d: br.s IL_001f - - IL_001f: ldloc.2 - IL_0020: ret - IL_0021: - } // end of method 'Base::Clone' - - } // end of class 'Base' - - .class private auto ansi Derived extends Test.Base - { - .method public hidebysig specialname rtspecialname - instance void .ctor() il managed - { - // Code size 14 (0xe) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void Test.Base::.ctor() - IL_0006: ldarg.0 - IL_0007: ldc.i4.2 - IL_0008: stfld int32 Test.Base::m - IL_000d: ret - IL_000e: - } // end of method 'Derived::.ctor' - - .method public hidebysig virtual instance class Test.Base[] - Clone(int32 numOfCopies) il managed - { - // Code size 33 (0x21) - .maxstack 3 - .locals (class Test.Derived[] V_0, - int32 V_1, - class Test.Base[] V_2) - IL_0000: ldarg.1 - IL_0001: newarr Test.Derived - IL_0006: stloc.0 - IL_0007: ldc.i4.0 - IL_0008: stloc.1 - IL_0009: br.s IL_0017 - - IL_000b: ldloc.0 - IL_000c: ldloc.1 - IL_000d: newobj instance void Test.Derived::.ctor() - IL_0012: stelem.ref - IL_0013: ldloc.1 - IL_0014: ldc.i4.1 - IL_0015: add - IL_0016: stloc.1 - IL_0017: ldloc.1 - IL_0018: ldarg.1 - IL_0019: blt.s IL_000b - - IL_001b: ldloc.0 - IL_001c: stloc.2 - IL_001d: br.s IL_001f - - IL_001f: ldloc.2 - IL_0020: ret - IL_0021: - } // end of method 'Derived::Clone' - - .method private hidebysig static int32 - Main() il managed - { - .entrypoint - // Code size 99 (0x63) - .maxstack 2 - .locals (class Test.Base V_0, - class Test.Derived V_1, - int32 V_2) - IL_0000: newobj instance void Test.Derived::.ctor() - IL_0005: stloc.0 - IL_0006: ldloc.0 - IL_0007: ldc.i4.s 11 - IL_0009: callvirt instance class Test.Base[] Test.Base::Clone(int32) - IL_000e: ldc.i4.s 10 - IL_0010: ldelem.ref - IL_0011: stloc.0 - IL_0012: ldloc.0 - IL_0013: ldfld int32 Test.Base::m - IL_0018: ldc.i4.2 - IL_0019: beq.s IL_0029 - - IL_001b: ldstr "FAILED" - IL_0020: call void [System.Console]System.Console::WriteLine(class System.String) - IL_0025: ldc.i4.1 - IL_0026: stloc.2 - IL_0027: br.s IL_0061 - - IL_0029: ldloc.0 - IL_002a: castclass Test.Derived - IL_002f: stloc.1 - IL_0030: ldloc.1 - IL_0031: ldc.i4.s 11 - IL_0033: callvirt instance class Test.Base[] Test.Base::Clone(int32) - IL_0038: ldc.i4.s 10 - IL_003a: ldelem.ref - IL_003b: stloc.0 - IL_003c: ldloc.0 - IL_003d: ldfld int32 Test.Base::m - IL_0042: ldc.i4.2 - IL_0043: beq.s IL_0053 - - IL_0045: ldstr "FAILED" - IL_004a: call void [System.Console]System.Console::WriteLine(class System.String) - IL_004f: ldc.i4.1 - IL_0050: stloc.2 - IL_0051: br.s IL_0061 - - IL_0053: ldstr "PASSED" - IL_0058: call void [System.Console]System.Console::WriteLine(class System.String) - IL_005d: ldc.i4 0x64 - IL_005e: stloc.2 - IL_005f: br.s IL_0061 - - IL_0061: ldloc.2 - IL_0062: ret - IL_0063: - } // end of method 'Derived::Main' - - } // end of class 'Derived' - -} // end of namespace 'Test' - -//*********** DISASSEMBLY COMPLETE *********************** diff --git a/src/coreclr/tests/src/JIT/Methodical/Invoke/callvirt/test2.il b/src/coreclr/tests/src/JIT/Methodical/Invoke/callvirt/test2.il deleted file mode 100644 index f8cda9a06d46..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/Invoke/callvirt/test2.il +++ /dev/null @@ -1,197 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - - - - -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly 'test1'// as "test1" -{ - - // .custom instance void ['mscorlib']System.Diagnostics.DebuggableAttribute::.ctor(bool, - // bool) = ( 01 00 00 01 00 00 ) - - -} -.module 'test1.exe' -// MVID: {A1B2C1C6-25C2-4DB7-AE55-41CA3A00F290} -.namespace Test -{ - .class private auto ansi Base extends ['mscorlib']System.Object - { - .field public int32 m - .method public hidebysig specialname rtspecialname - instance void .ctor() il managed - { - // Code size 14 (0xe) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void ['mscorlib']System.Object::.ctor() - IL_0006: ldarg.0 - IL_0007: ldc.i4.1 - IL_0008: stfld int32 Test.Base::m - IL_000d: ret - IL_000e: - } // end of method 'Base::.ctor' - - .method public hidebysig newslot virtual - instance class Test.Base[] Clone(int32 numOfCopies) il managed - { - // Code size 33 (0x21) - .maxstack 3 - .locals (class Test.Base[] V_0, - int32 V_1, - class Test.Base[] V_2) - IL_0000: ldarg.1 - IL_0001: newarr Test.Base - IL_0006: stloc.0 - IL_0007: ldc.i4.0 - IL_0008: stloc.1 - IL_0009: br.s IL_0017 - - IL_000b: ldloc.0 - IL_000c: ldloc.1 - IL_000d: newobj instance void Test.Base::.ctor() - IL_0012: stelem.ref - IL_0013: ldloc.1 - IL_0014: ldc.i4.1 - IL_0015: add - IL_0016: stloc.1 - IL_0017: ldloc.1 - IL_0018: ldarg.1 - IL_0019: blt.s IL_000b - - IL_001b: ldloc.0 - IL_001c: stloc.2 - IL_001d: br.s IL_001f - - IL_001f: ldloc.2 - IL_0020: ret - IL_0021: - } // end of method 'Base::Clone' - - } // end of class 'Base' - - .class private auto ansi Derived extends Test.Base - { - .method public hidebysig specialname rtspecialname - instance void .ctor() il managed - { - // Code size 14 (0xe) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void Test.Base::.ctor() - IL_0006: ldarg.0 - IL_0007: ldc.i4.2 - IL_0008: stfld int32 Test.Base::m - IL_000d: ret - IL_000e: - } // end of method 'Derived::.ctor' - - .method public hidebysig virtual instance class Test.Base[] - Clone(int32 numOfCopies) il managed - { - // Code size 33 (0x21) - .maxstack 3 - .locals (class Test.Derived[] V_0, - int32 V_1, - class Test.Base[] V_2) - IL_0000: ldarg.1 - IL_0001: newarr Test.Derived - IL_0006: stloc.0 - IL_0007: ldc.i4.0 - IL_0008: stloc.1 - IL_0009: br.s IL_0017 - - IL_000b: ldloc.0 - IL_000c: ldloc.1 - IL_000d: newobj instance void Test.Derived::.ctor() - IL_0012: stelem.ref - IL_0013: ldloc.1 - IL_0014: ldc.i4.1 - IL_0015: add - IL_0016: stloc.1 - IL_0017: ldloc.1 - IL_0018: ldarg.1 - IL_0019: blt.s IL_000b - - IL_001b: ldloc.0 - IL_001c: stloc.2 - IL_001d: br.s IL_001f - - IL_001f: ldloc.2 - IL_0020: ret - IL_0021: - } // end of method 'Derived::Clone' - - .method private hidebysig static int32 - Main() il managed - { - .entrypoint - // Code size 99 (0x63) - .maxstack 2 - .locals (class Test.Derived V_0, - class Test.Base V_1, - int32 V_2) - IL_0000: newobj instance void Test.Derived::.ctor() - IL_0005: stloc.0 - IL_0006: ldloc.0 - IL_0007: ldc.i4.s 11 - IL_0009: call instance class Test.Base[] Test.Base::Clone(int32) - IL_000e: ldc.i4.s 10 - IL_0010: ldelem.ref - IL_0011: stloc.0 - IL_0012: ldloc.0 - IL_0013: ldfld int32 Test.Base::m - IL_0018: ldc.i4.1 - IL_0019: beq.s IL_0029 - - IL_001b: ldstr "FAILED" - IL_0020: call void [System.Console]System.Console::WriteLine(class System.String) - IL_0025: ldc.i4.1 - IL_0026: stloc.2 - IL_0027: br.s IL_0061 - - IL_0029: ldloc.0 - IL_002a: castclass Test.Base - IL_002f: stloc.1 - IL_0030: ldloc.1 - IL_0031: ldc.i4.s 11 - IL_0033: call instance class Test.Base[] Test.Base::Clone(int32) - IL_0038: ldc.i4.s 10 - IL_003a: ldelem.ref - IL_003b: stloc.0 - IL_003c: ldloc.0 - IL_003d: ldfld int32 Test.Base::m - IL_0042: ldc.i4.1 - IL_0043: beq.s IL_0053 - - IL_0045: ldstr "FAILED" - IL_004a: call void [System.Console]System.Console::WriteLine(class System.String) - IL_004f: ldc.i4.1 - IL_0050: stloc.2 - IL_0051: br.s IL_0061 - - IL_0053: ldstr "PASSED" - IL_0058: call void [System.Console]System.Console::WriteLine(class System.String) - IL_005d: ldc.i4 0x64 - IL_005e: stloc.2 - IL_005f: br.s IL_0061 - - IL_0061: ldloc.2 - IL_0062: ret - IL_0063: - } // end of method 'Derived::Main' - - } // end of class 'Derived' - -} // end of namespace 'Test' - -//*********** DISASSEMBLY COMPLETE *********************** diff --git a/src/coreclr/tests/src/JIT/Methodical/Invoke/callvirt/test3.il b/src/coreclr/tests/src/JIT/Methodical/Invoke/callvirt/test3.il deleted file mode 100644 index 0e8abda109b8..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/Invoke/callvirt/test3.il +++ /dev/null @@ -1,122 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - - - - -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly 'test3'// as "test3" -{ - - // .custom instance void ['mscorlib']System.Diagnostics.DebuggableAttribute::.ctor(bool, - // bool) = ( 01 00 00 01 00 00 ) - - -} -.module 'test3.exe' -// MVID: {D9CB467A-BD94-4D87-BB6B-ABB1D4B12E50} -.namespace Test -{ - .class private auto ansi Base extends ['mscorlib']System.Object - { - .field public float64 m - .method public hidebysig specialname rtspecialname - instance void .ctor() il managed - { - // Code size 22 (0x16) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void ['mscorlib']System.Object::.ctor() - IL_0006: ldarg.0 - IL_0007: ldc.r8 1. - IL_0010: stfld float64 Test.Base::m - IL_0015: ret - IL_0016: - } // end of method 'Base::.ctor' - - .method public hidebysig instance class Test.Base[] - Clone(int32 numOfCopies) il managed - { - // Code size 33 (0x21) - .maxstack 3 - .locals (class Test.Base[] V_0, - int32 V_1, - class Test.Base[] V_2) - IL_0000: ldarg.1 - IL_0001: newarr Test.Base - IL_0006: stloc.0 - IL_0007: ldc.i4.0 - IL_0008: stloc.1 - IL_0009: br.s IL_0017 - - IL_000b: ldloc.0 - IL_000c: ldloc.1 - IL_000d: newobj instance void Test.Base::.ctor() - IL_0012: stelem.ref - IL_0013: ldloc.1 - IL_0014: ldc.i4.1 - IL_0015: add - IL_0016: stloc.1 - IL_0017: ldloc.1 - IL_0018: ldarg.1 - IL_0019: blt.s IL_000b - - IL_001b: ldloc.0 - IL_001c: stloc.2 - IL_001d: br.s IL_001f - - IL_001f: ldloc.2 - IL_0020: ret - IL_0021: - } // end of method 'Base::Clone' - - .method private hidebysig static int32 - Main() il managed - { - .entrypoint - // Code size 65 (0x41) - .maxstack 2 - .locals (class Test.Base V_0, - int32 V_1) - IL_0000: newobj instance void Test.Base::.ctor() - IL_0005: stloc.0 - IL_0006: ldloc.0 - IL_0007: ldc.i4.s 11 - IL_0009: callvirt instance class Test.Base[] Test.Base::Clone(int32) - IL_000e: ldc.i4.s 10 - IL_0010: ldelem.ref - IL_0011: stloc.0 - IL_0012: ldloc.0 - IL_0013: ldfld float64 Test.Base::m - IL_0018: ldc.r8 1. - IL_0021: beq.s IL_0031 - - IL_0023: ldstr "FAILED" - IL_0028: call void [System.Console]System.Console::WriteLine(class System.String) - IL_002d: ldc.i4.1 - IL_002e: stloc.1 - IL_002f: br.s IL_003f - - IL_0031: ldstr "PASSED" - IL_0036: call void [System.Console]System.Console::WriteLine(class System.String) - IL_003b: ldc.i4 0x64 - IL_003c: stloc.1 - IL_003d: br.s IL_003f - - IL_003f: ldloc.1 - IL_0040: ret - IL_0041: - } // end of method 'Base::Main' - - } // end of class 'Base' - -} // end of namespace 'Test' - -//*********** DISASSEMBLY COMPLETE *********************** diff --git a/src/coreclr/tests/src/JIT/Methodical/MDArray/GaussJordan/classarr.cs b/src/coreclr/tests/src/JIT/Methodical/MDArray/GaussJordan/classarr.cs deleted file mode 100644 index b266e898fc87..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/MDArray/GaussJordan/classarr.cs +++ /dev/null @@ -1,185 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -//Solving AX=B and the inverse of A with Gauss-Jordan algorithm - -using System; - -internal class MatrixCls -{ - public double[,] arr; - public MatrixCls(int n, int m) - { - arr = new double[n, m]; - } -} - -internal class classarr -{ - private static double s_tolerance = 0.0000000000001; - public static bool AreEqual(double left, double right) - { - return Math.Abs(left - right) < s_tolerance; - } - - - public static void swap(double a, double b) - { - double temp; - temp = a; - a = b; - b = temp; - } - - public static void gaussj(MatrixCls a, int n, MatrixCls b, int m) - { - int i, icol = 0, irow = 0, j, k, l, ll; - double big = 0.0, dum = 0.0, pivinv = 0.0; - - int[] indxc = new int[3]; - int[] indxr = new int[3]; - int[] ipiv = new int[3]; - - for (j = 0; j < n; j++) - ipiv[j] = 0; - - for (i = 0; i < n; i++) - { - big = 0.0; - for (j = 0; j < n; j++) - if (ipiv[j] != 1) - for (k = 0; k < n; k++) - { - if (ipiv[k] == 0) - { - if (Math.Abs(a.arr[j, k]) >= big) - { - big = Math.Abs(a.arr[j, k]); - irow = j; - icol = k; - } - } - else if (ipiv[k] > 1) - Console.WriteLine("GAUSSJ: Singular matrix-1\n"); - } - ++(ipiv[icol]); - if (irow != icol) - { - for (l = 0; l < n; l++) swap(a.arr[irow, l], a.arr[icol, l]); - for (l = 0; l < m; l++) swap(b.arr[irow, l], b.arr[icol, l]); - } - - indxr[i] = irow; - indxc[i] = icol; - if (a.arr[icol, icol] == 0.0) - Console.WriteLine("GAUSSJ: Singular Matrix-2. icol is {0}\n", icol); - pivinv = 1.0 / a.arr[icol, icol]; - a.arr[icol, icol] = 1.0; - for (l = 0; l < n; l++) a.arr[icol, l] *= pivinv; - for (l = 0; l < m; l++) b.arr[icol, l] *= pivinv; - for (ll = 0; ll < n; ll++) - if (ll != icol) - { - dum = a.arr[ll, icol]; - a.arr[ll, icol] = 0.0; - for (l = 0; l < n; l++) a.arr[ll, l] -= a.arr[icol, l] * dum; - for (l = 0; l < m; l++) b.arr[ll, l] -= b.arr[icol, l] * dum; - } - } - for (l = n - 1; l >= 0; l--) - { - if (indxr[l] != indxc[l]) - for (k = 0; k < n; k++) - swap(a.arr[k, indxr[l]], a.arr[k, indxc[l]]); - } - } - - public static int Main() - { - bool pass = false; - - Console.WriteLine("Solving AX=B and the inverse of A with Gauss-Jordan algorithm"); - int n = 3; - int m = 1; - - MatrixCls a = new MatrixCls(3, 3); - MatrixCls b = new MatrixCls(3, 1); - - a.arr[0, 0] = 1; - a.arr[0, 1] = 1; - a.arr[0, 2] = 1; - a.arr[1, 0] = 1; - a.arr[1, 1] = 2; - a.arr[1, 2] = 4; - a.arr[2, 0] = 1; - a.arr[2, 1] = 3; - a.arr[2, 2] = 9; - - b.arr[0, 0] = -1; - b.arr[1, 0] = 3; - b.arr[2, 0] = 3; - - /* - int i, j; - - Console.WriteLine("Matrix A is \n"); - for (i=0; i= big) - { - big = Math.Abs(jaggeda[2][j, k]); - irow = j; - icol = k; - } - } - else if (ipiv[k] > 1) - Console.WriteLine("GAUSSJ: Singular matrix-1\n"); - } - ++(ipiv[icol]); - if (irow != icol) - { - for (l = 0; l < n; l++) swap(jaggeda[2][irow, l], jaggeda[2][icol, l]); - for (l = 0; l < m; l++) swap(jaggedb[1][irow, l], jaggedb[1][icol, l]); - } - - indxr[i] = irow; - indxc[i] = icol; - if (jaggeda[2][icol, icol] == 0.0) - Console.WriteLine("GAUSSJ: Singular Matrix-2. icol is {0}\n", icol); - pivinv = 1.0 / jaggeda[2][icol, icol]; - jaggeda[2][icol, icol] = 1.0; - for (l = 0; l < n; l++) jaggeda[2][icol, l] *= pivinv; - for (l = 0; l < m; l++) jaggedb[1][icol, l] *= pivinv; - for (ll = 0; ll < n; ll++) - if (ll != icol) - { - dum = jaggeda[2][ll, icol]; - jaggeda[2][ll, icol] = 0.0; - for (l = 0; l < n; l++) jaggeda[2][ll, l] -= jaggeda[2][icol, l] * dum; - for (l = 0; l < m; l++) jaggedb[1][ll, l] -= jaggedb[1][icol, l] * dum; - } - } - for (l = n - 1; l >= 0; l--) - { - if (indxr[l] != indxc[l]) - for (k = 0; k < n; k++) - swap(jaggeda[2][k, indxr[l]], jaggeda[2][k, indxc[l]]); - } - } - - public static int Main() - { - bool pass = false; - - Console.WriteLine("Solving AX=B and the inverse of A with Gauss-Jordan algorithm"); - int n = 3; - int m = 1; - - jaggeda = new double[3][,]; - jaggeda[2] = new double[3, 3]; - - jaggedb = new double[5][,]; - jaggedb[1] = new double[3, 1]; - - jaggeda[2][0, 0] = 1; - jaggeda[2][0, 1] = 1; - jaggeda[2][0, 2] = 1; - jaggeda[2][1, 0] = 1; - jaggeda[2][1, 1] = 2; - jaggeda[2][1, 2] = 4; - jaggeda[2][2, 0] = 1; - jaggeda[2][2, 1] = 3; - jaggeda[2][2, 2] = 9; - - jaggedb[1][0, 0] = -1; - jaggedb[1][1, 0] = 3; - jaggedb[1][2, 0] = 3; - - /* - int i, j; - - Console.WriteLine("Matrix A is \n"); - for (i=0; i= big) - { - big = Math.Abs(a.arr[j, k]); - irow = j; - icol = k; - } - } - else if (ipiv[k] > 1) - Console.WriteLine("GAUSSJ: Singular matrix-1\n"); - } - ++(ipiv[icol]); - if (irow != icol) - { - for (l = 0; l < n; l++) swap(a.arr[irow, l], a.arr[icol, l]); - for (l = 0; l < m; l++) swap(b.arr[irow, l], b.arr[icol, l]); - } - - indxr[i] = irow; - indxc[i] = icol; - if (a.arr[icol, icol] == 0.0) - Console.WriteLine("GAUSSJ: Singular Matrix-2. icol is {0}\n", icol); - pivinv = 1.0 / a.arr[icol, icol]; - a.arr[icol, icol] = 1.0; - for (l = 0; l < n; l++) a.arr[icol, l] *= pivinv; - for (l = 0; l < m; l++) b.arr[icol, l] *= pivinv; - for (ll = 0; ll < n; ll++) - if (ll != icol) - { - dum = a.arr[ll, icol]; - a.arr[ll, icol] = 0.0; - for (l = 0; l < n; l++) a.arr[ll, l] -= a.arr[icol, l] * dum; - for (l = 0; l < m; l++) b.arr[ll, l] -= b.arr[icol, l] * dum; - } - } - for (l = n - 1; l >= 0; l--) - { - if (indxr[l] != indxc[l]) - for (k = 0; k < n; k++) - swap(a.arr[k, indxr[l]], a.arr[k, indxc[l]]); - } - } - - public static int Main() - { - bool pass = false; - - Console.WriteLine("Solving AX=B and the inverse of A with Gauss-Jordan algorithm"); - int n = 3; - int m = 1; - - MatrixStruct a = new MatrixStruct(3, 3); - MatrixStruct b = new MatrixStruct(3, 1); - - a.arr[0, 0] = 1; - a.arr[0, 1] = 1; - a.arr[0, 2] = 1; - a.arr[1, 0] = 1; - a.arr[1, 1] = 2; - a.arr[1, 2] = 4; - a.arr[2, 0] = 1; - a.arr[2, 1] = 3; - a.arr[2, 2] = 9; - - b.arr[0, 0] = -1; - b.arr[1, 0] = 3; - b.arr[2, 0] = 3; - - /* - int i, j; - - Console.WriteLine("Matrix A is \n"); - for (i=0; i= 0 && L._v < RANK) - { - ind[L._v]._v--; - return buildLCS(b, X, ind); - } - throw new Exception(); - } - - private static void findLCS(LCSV[,,,] c, LCSV[,,,] b, char[][] seq, LCSV[] len) - { - LCSV[] ind = new LCSV[RANK]; - for (ind[0]._v = 1; ind[0]._v < len[0]._v; ind[0]._v++) - { - for (ind[1]._v = 1; ind[1]._v < len[1]._v; ind[1]._v++) - { - for (ind[2]._v = 1; ind[2]._v < len[2]._v; ind[2]._v++) - { - for (ind[3]._v = 1; ind[3]._v < len[3]._v; ind[3]._v++) - { - bool eqFlag = true; - for (int i = 1; i < RANK; i++) - { - if (seq[i][ind[i]._v - 1] != seq[i - 1][ind[i - 1]._v - 1]) - { - eqFlag = false; - break; - } - } - - if (eqFlag) - { - c[ind[0]._v, ind[1]._v, ind[2]._v, ind[3]._v]._v = - c[ind[0]._v - 1, ind[1]._v - 1, ind[2]._v - 1, ind[3]._v - 1]._v + 1; - b[ind[0]._v, ind[1]._v, ind[2]._v, ind[3]._v]._v = RANK; - continue; - } - - LCSV Z; - Z._v = 0; - - LCSV R, M; - R._v = M._v = -1; - for (LCSV i = Z; i._v < RANK; i._v++) - { - ind[i._v]._v--; - if (c[ind[0]._v, ind[1]._v, ind[2]._v, ind[3]._v]._v > M._v) - { - R = i; - M = c[ind[0]._v, ind[1]._v, ind[2]._v, ind[3]._v]; - } - ind[i._v]._v++; - } - if (R._v < 0 || M._v < 0) - throw new Exception(); - - c[ind[0]._v, ind[1]._v, ind[2]._v, ind[3]._v] = M; - b[ind[0]._v, ind[1]._v, ind[2]._v, ind[3]._v] = R; - } - } - } - } - } - - private static int Main() - { - Console.WriteLine("Test searches for longest common subsequence of 4 strings\n\n"); - String[] str = new String[RANK] { - "The Sun has left his blackness", - "and has found a fresher morning", - "and the fair Moon rejoices", - "in the clear and cloudless night" - }; - - LCSV[] len = new LCSV[RANK]; - char[][] seq = new char[RANK][]; - for (int i = 0; i < RANK; i++) - { - len[i]._v = str[i].Length + 1; - seq[i] = str[i].ToCharArray(); - } - - LCSV[,,,] c = new LCSV[len[0]._v, len[1]._v, len[2]._v, len[3]._v]; - LCSV[,,,] b = new LCSV[len[0]._v, len[1]._v, len[2]._v, len[3]._v]; - - findLCS(c, b, seq, len); - - for (int i = 0; i < RANK; i++) - len[i]._v--; - - if ("n ha es" == buildLCS(b, seq[0], len)) - { - Console.WriteLine("Test passed"); - return 100; - } - else - { - Console.WriteLine("Test failed."); - return 1; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/Methodical/casts/SEH/filter.il b/src/coreclr/tests/src/JIT/Methodical/casts/SEH/filter.il deleted file mode 100644 index 291f7126b4d2..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/casts/SEH/filter.il +++ /dev/null @@ -1,49 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly 'filter' { } -.method public static int32 main() cil managed -{ - .maxstack 8 - .entrypoint - -Begin_1: - newobj instance void [mscorlib]System.DivideByZeroException::.ctor() - throw - leave.s End_1 -Filter_1: - castclass [mscorlib]System.DivideByZeroException - call void [System.Console]System.Console::WriteLine(object) - ldc.i4.1 - endfilter -Handler_1: - pop - leave.s End_1 -End_1: -.try Begin_1 to Filter_1 filter Filter_1 handler Handler_1 to End_1 - -Begin_2: - newobj instance void [mscorlib]System.DivideByZeroException::.ctor() - throw - leave.s End_2 -Filter_2: - isinst [mscorlib]System.DivideByZeroException - call void [System.Console]System.Console::WriteLine(object) - ldc.i4.1 - endfilter -Handler_2: - pop - leave.s End_2 -End_2: -.try Begin_2 to Filter_2 filter Filter_2 handler Handler_2 to End_2 - - ldc.i4.s 100 - ret -} diff --git a/src/coreclr/tests/src/JIT/Methodical/casts/SEH/throw.cs b/src/coreclr/tests/src/JIT/Methodical/casts/SEH/throw.cs deleted file mode 100644 index d5732bcd8668..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/casts/SEH/throw.cs +++ /dev/null @@ -1,91 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -namespace JitTest -{ - internal class Exception1 : Exception - { - override public String ToString() { return "Exception1"; } - } - - internal class Exception2 : Exception - { - override public String ToString() { return "Exception2"; } - } - - internal class Test - { - private static int Main() - { - object excep = new Exception1(); - - try - { - throw (Exception)excep; - } - catch (Exception x) - { - Console.WriteLine(x.ToString()); - if (x is Exception1) - goto continue_1; - } - Console.WriteLine("castclass test failed."); - return 101; - - continue_1: - try - { - throw excep as Exception1; - } - catch (Exception x) - { - Console.WriteLine(x.ToString()); - if (x is Exception1) - goto continue_2; - } - Console.WriteLine("isinst test failed."); - return 102; - - continue_2: - try - { - throw (Exception2)excep; - } - catch (InvalidCastException x) - { - Console.WriteLine(x.ToString()); - goto continue_3; - } - catch (Exception x) - { - Console.WriteLine(x.ToString()); - } - Console.WriteLine("negative castclass test failed."); - return 103; - - continue_3: - try - { - throw excep as Exception2; - } - catch (NullReferenceException x) - { - Console.WriteLine(x.ToString()); - goto continue_4; - } - catch (Exception x) - { - Console.WriteLine(x.ToString()); - } - Console.WriteLine("negative isinst test failed."); - return 104; - - continue_4: - Console.WriteLine("all tests passed."); - return 100; - } - } -} diff --git a/src/coreclr/tests/src/JIT/Methodical/casts/coverage/ldnull.il b/src/coreclr/tests/src/JIT/Methodical/casts/coverage/ldnull.il deleted file mode 100644 index 6f3ded25277a..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/casts/coverage/ldnull.il +++ /dev/null @@ -1,67 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly 'ldnull' -{ -} -.namespace JitTest -{ - .class private auto ansi beforefieldinit TestClass - extends [mscorlib]System.Object - { - .method private hidebysig static int32 - Main() cil managed - { - .entrypoint - // Code size 36 (0x24) - .maxstack 2 - .locals (class JitTest.TestClass V_0, - class JitTest.TestClass V_1) - ldnull - isinst JitTest.TestClass - stloc.0 - - ldnull - castclass JitTest.TestClass - stloc.1 - - IL_0004: ldloc.0 - IL_0005: brtrue.s IL_000a - - IL_0007: ldloc.1 - IL_0008: brfalse.s IL_0017 - - IL_000a: ldstr "Failed => 101" - IL_000f: call void [System.Console]System.Console::WriteLine(string) - IL_0014: ldc.i4.s 101 - IL_0016: ret - - IL_0017: ldstr "Passed => 100" - IL_001c: call void [System.Console]System.Console::WriteLine(string) - IL_0021: ldc.i4.s 100 - IL_0023: ret - } // end of method TestClass::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method TestClass::.ctor - - } // end of class TestClass - -} // end of namespace JitTest - -//*********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file ldnull.res diff --git a/src/coreclr/tests/src/JIT/Methodical/cctor/misc/Desktop/throw.cs b/src/coreclr/tests/src/JIT/Methodical/cctor/misc/Desktop/throw.cs deleted file mode 100644 index 5fc97c930b79..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/cctor/misc/Desktop/throw.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - -using System; -internal class measure -{ - public static int a = 0xCC; -} -internal class test -{ - static test() - { - if (measure.a != 0xCC) - { - Console.WriteLine("in .cctor(), measure.a is {0}", measure.a); - Console.WriteLine("FAILED"); - throw new Exception(); - } - Console.WriteLine("in .cctor(), measure.a is {0}", measure.a); - measure.a = 8; - if (measure.a != 8) - { - Console.WriteLine("in .cctor() after measure.a=8, measure.a is {0}", measure.a); - Console.WriteLine("FAILED"); - throw new Exception(); - } - Console.WriteLine("in .cctor() after measure.a=8, measure.a is {0}", measure.a); - - throw new Exception(); - } -} - -internal class Driver -{ - public static int Main() - { - try - { - Console.WriteLine("Testing .cctor() invocation by calling instance method"); - Console.WriteLine(); - Console.WriteLine("Before calling instance method"); - if (measure.a != 0xCC) - { - Console.WriteLine("in Main(), measure.a is {0}", measure.a); - Console.WriteLine("FAILED"); - return 1; - } - test t = new test(); - Console.WriteLine("After calling instance method"); - if (measure.a != 8) - { - Console.WriteLine("in Main() after new test(), measure.a is {0}", measure.a); - Console.WriteLine("FAILED"); - return -1; - } - } - catch (Exception e) - { - Console.WriteLine(e.StackTrace); - Console.WriteLine(); - Console.WriteLine("PASSED"); - return 100; - } - return -1; - } -} diff --git a/src/coreclr/tests/src/JIT/Methodical/cctor/misc/testlib.cs b/src/coreclr/tests/src/JIT/Methodical/cctor/misc/testlib.cs deleted file mode 100644 index 5035f185adbb..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/cctor/misc/testlib.cs +++ /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. -// See the LICENSE file in the project root for more information. - -using System; -using System.Threading; -using System.Reflection; - -namespace Precise -{ - public class measure - { - public static int a = 0xCC; - } - public class test - { - public static byte b = 0xC; - public static void f() - { - } - public static void f(ref byte b) - { - return; - } - - static test() - { - if (measure.a != 0xCC) - { - Console.WriteLine("in .cctor(), measure.a is {0}", measure.a); - Console.WriteLine("FAILED"); - throw new Exception(); - } - Console.WriteLine("in .cctor(), measure.a is {0}", measure.a); - Console.WriteLine("Current thread is {0}", Thread.CurrentThread.Name); - // Following two lines commented because not available in .NET Core - // Console.WriteLine("Calling assembly is {0}", Assembly.GetCallingAssembly().FullName); - // Console.WriteLine("This assembly is {0}", Assembly.GetExecutingAssembly().FullName); - measure.a += 8; - if (measure.a != 212) - { - Console.WriteLine("in .cctor() after measure.a+=8, measure.a is {0}", measure.a); - Console.WriteLine("FAILED"); - throw new Exception(); - } - Console.WriteLine("in .cctor() after measure.a+=8, measure.a is {0}", measure.a); - } - } -} - diff --git a/src/coreclr/tests/src/JIT/Methodical/cctor/misc/throw.cs b/src/coreclr/tests/src/JIT/Methodical/cctor/misc/throw.cs deleted file mode 100644 index 02dfea604181..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/cctor/misc/throw.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -internal class measure -{ - public static int a = 0xCC; -} -internal class test -{ - static test() - { - if (measure.a != 0xCC) - { - Console.WriteLine("in .cctor(), measure.a is {0}", measure.a); - Console.WriteLine("FAILED"); - return; - } - Console.WriteLine("in .cctor(), measure.a is {0}", measure.a); - measure.a = 8; - if (measure.a != 8) - { - Console.WriteLine("in .cctor() after measure.a=8, measure.a is {0}", measure.a); - Console.WriteLine("FAILED"); - return; - } - Console.WriteLine("in .cctor() after measure.a=8, measure.a is {0}", measure.a); - - throw new Exception(); - } -} - -internal class Driver -{ - public static int Main() - { - try - { - Console.WriteLine("Testing .cctor() invocation by calling instance method"); - Console.WriteLine(); - Console.WriteLine("Before calling instance method"); - if (measure.a != 0xCC) - { - Console.WriteLine("in Main(), measure.a is {0}", measure.a); - Console.WriteLine("FAILED"); - return 1; - } - test t = new test(); - Console.WriteLine("After calling instance method"); - if (measure.a != 8) - { - Console.WriteLine("in Main() after new test(), measure.a is {0}", measure.a); - Console.WriteLine("FAILED"); - return -1; - } - } - catch (Exception e) - { - Console.WriteLine(e.StackTrace); - Console.WriteLine(); - Console.WriteLine("PASSED"); - return 100; - } - return -1; - } -} diff --git a/src/coreclr/tests/src/JIT/Methodical/cctor/xassem/testlib.cs b/src/coreclr/tests/src/JIT/Methodical/cctor/xassem/testlib.cs deleted file mode 100644 index 4e9ae581ab19..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/cctor/xassem/testlib.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -namespace Precise -{ - public class measure - { - public static int a = 0xCC; - } - public class test - { - public static byte b1 = 0xC; - public byte b2 = 0xC; - public static void f() - { - } - public static void f(ref byte b) - { - return; - } - - static test() - { - if (measure.a != 0xCC) - { - Console.WriteLine("in .cctor(), measure.a is {0}", measure.a); - Console.WriteLine("FAILED"); - throw new Exception(); - } - Console.WriteLine("in .cctor(), measure.a is {0}", measure.a); - measure.a = 8; - if (measure.a != 8) - { - Console.WriteLine("in .cctor() after measure.a=8, measure.a is {0}", measure.a); - Console.WriteLine("FAILED"); - throw new Exception(); - } - Console.WriteLine("in .cctor() after measure.a=8, measure.a is {0}", measure.a); - } - } - -} - diff --git a/src/coreclr/tests/src/JIT/Methodical/eh/basics/throwincatch.cs b/src/coreclr/tests/src/JIT/Methodical/eh/basics/throwincatch.cs deleted file mode 100644 index f7b650dd53ef..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/eh/basics/throwincatch.cs +++ /dev/null @@ -1,69 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// Throw in catch handler - -using System; - -namespace hello -{ - class Class1 - { - private static TestUtil.TestLog testLog; - - static Class1() - { - // Create test writer object to hold expected output - System.IO.StringWriter expectedOut = new System.IO.StringWriter(); - - // Write expected output to string writer object - expectedOut.WriteLine("In try"); - expectedOut.WriteLine("In try 2, 1st throw"); - expectedOut.WriteLine("In 1st catch, 2nd throw"); - expectedOut.WriteLine("In 2nd catch"); - expectedOut.WriteLine("Done"); - - // Create and initialize test log object - testLog = new TestUtil.TestLog(expectedOut); - } - - static public int Main(string[] args) - { - //Start recording - testLog.StartRecording(); - - try - { - try - { - Console.WriteLine("In try"); - try - { - Console.WriteLine("In try 2, 1st throw"); - throw new Exception(); - } - catch - { - Console.WriteLine("In 1st catch, 2nd throw"); - throw new Exception(); - } - } - catch - { - Console.WriteLine("In 2nd catch"); - } - } - catch - { - Console.WriteLine("Unreached"); - } - Console.WriteLine("Done"); - - // stop recoding - testLog.StopRecording(); - - return testLog.VerifyOutput(); - } - } -} diff --git a/src/coreclr/tests/src/JIT/Methodical/eh/basics/throwinfinally.cs b/src/coreclr/tests/src/JIT/Methodical/eh/basics/throwinfinally.cs deleted file mode 100644 index 5c1dbb8dca25..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/eh/basics/throwinfinally.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// Throw from a finally block - -using System; - -public class a -{ - private static TestUtil.TestLog testLog; - - static a() - { - // Create test writer object to hold expected output - System.IO.StringWriter expectedOut = new System.IO.StringWriter(); - - // Write expected output to string writer object - expectedOut.WriteLine("Main: In Try"); - expectedOut.WriteLine("In try"); - expectedOut.WriteLine("In finally"); - expectedOut.WriteLine("Main: Caught the exception"); - - // Create and initialize test log object - testLog = new TestUtil.TestLog(expectedOut); - } - - public static void MiddleMethod() - { - try - { - Console.WriteLine("In try"); - } - finally - { - Console.WriteLine("In finally"); - throw new System.ArgumentException(); - // Console.WriteLine("Unreached..."); - } - } - - public static int Main(string[] args) - { - //Start recording - testLog.StartRecording(); - - try - { - Console.WriteLine("Main: In Try"); - MiddleMethod(); - } - catch - { - Console.WriteLine("Main: Caught the exception"); - } - - // stop recoding - testLog.StopRecording(); - - return testLog.VerifyOutput(); - } -} diff --git a/src/coreclr/tests/src/JIT/Methodical/eh/basics/throwinfinallyintryfilter1.il b/src/coreclr/tests/src/JIT/Methodical/eh/basics/throwinfinallyintryfilter1.il deleted file mode 100644 index e527880db352..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/eh/basics/throwinfinallyintryfilter1.il +++ /dev/null @@ -1,133 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly extern mscorlib {} -.assembly extern common {} -.assembly test {} -.module test.exe - - -.method public static int32 Main() -{ - .entrypoint - .maxstack 2 - .locals init ( - class [mscorlib]System.IO.StringWriter expectedOut, - class [common]TestUtil.TestLog testLog - ) - - - newobj instance void [mscorlib]System.IO.StringWriter::.ctor() - stloc.s expectedOut - ldloc.s expectedOut - ldstr "in try" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr " in try" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr " in try" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr " in finally" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr " in filter" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr "in finally" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr "caught an exception!" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - newobj instance void [common]TestUtil.TestLog::.ctor(object) - stloc.s testLog - - ldloc.s testLog - callvirt instance void [common]TestUtil.TestLog::StartRecording() - - .try - { - ldc.i4.0 - call void func(int32) - leave.s DONE - } - catch [mscorlib]System.Exception - { - pop - ldstr "caught an exception!" - call void [System.Console]System.Console::WriteLine(string) - leave.s DONE - } - - DONE: - - ldloc.s testLog - callvirt instance void [common]TestUtil.TestLog::StopRecording() - - ldloc.s testLog - callvirt instance int32 [common]TestUtil.TestLog::VerifyOutput() - - ret -} - - -.method public static void func(int32 i) -{ - .maxstack 1 - .try - { - ldstr "in try" - call void [System.Console]System.Console::WriteLine(string) - .try - { - ldstr " in try" - call void [System.Console]System.Console::WriteLine(string) - .try - { - ldstr " in try" - call void [System.Console]System.Console::WriteLine(string) - leave.s TRY_1 - } - finally - { - ldstr " in finally" - call void [System.Console]System.Console::WriteLine(string) - newobj instance void [mscorlib]System.Exception::.ctor() - throw - endfinally - } - TRY_1: leave.s TRY_0 - } - filter - { - pop - ldstr " in filter" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.0 - endfilter - } { - pop - ldstr " in handler" - call void [System.Console]System.Console::WriteLine(string) - leave.s TRY_0 - } - TRY_0: leave.s DONE - } - finally - { - ldstr "in finally" - call void [System.Console]System.Console::WriteLine(string) - endfinally - } - DONE: ret -} diff --git a/src/coreclr/tests/src/JIT/Methodical/eh/basics/throwinfinallyintryfilter2.il b/src/coreclr/tests/src/JIT/Methodical/eh/basics/throwinfinallyintryfilter2.il deleted file mode 100644 index e4f547aae9b4..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/eh/basics/throwinfinallyintryfilter2.il +++ /dev/null @@ -1,140 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly extern mscorlib {} -.assembly extern common {} -.assembly test {} -.module test.exe - - -.method public static int32 Main() -{ - .entrypoint - .maxstack 2 - .locals init ( - class [mscorlib]System.IO.StringWriter expectedOut, - class [common]TestUtil.TestLog testLog - ) - - - newobj instance void [mscorlib]System.IO.StringWriter::.ctor() - stloc.s expectedOut - ldloc.s expectedOut - ldstr "in try" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr " in try" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr " in try" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr " in finally" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr " in filter" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr "in filter" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr "caught an exception!" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - newobj instance void [common]TestUtil.TestLog::.ctor(object) - stloc.s testLog - - ldloc.s testLog - callvirt instance void [common]TestUtil.TestLog::StartRecording() - - .try - { - ldc.i4.0 - call void func(int32) - leave.s DONE - } - catch [mscorlib]System.Exception - { - pop - ldstr "caught an exception!" - call void [System.Console]System.Console::WriteLine(string) - leave.s DONE - } - - DONE: - - ldloc.s testLog - callvirt instance void [common]TestUtil.TestLog::StopRecording() - - ldloc.s testLog - callvirt instance int32 [common]TestUtil.TestLog::VerifyOutput() - - ret -} - - -.method public static void func(int32 i) -{ - .maxstack 1 - .try - { - ldstr "in try" - call void [System.Console]System.Console::WriteLine(string) - .try - { - ldstr " in try" - call void [System.Console]System.Console::WriteLine(string) - .try - { - ldstr " in try" - call void [System.Console]System.Console::WriteLine(string) - leave.s TRY_1 - } - finally - { - ldstr " in finally" - call void [System.Console]System.Console::WriteLine(string) - newobj instance void [mscorlib]System.Exception::.ctor() - throw - endfinally - } - TRY_1: leave.s TRY_0 - } - filter - { - pop - ldstr " in filter" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.0 - endfilter - } { - pop - ldstr " in handler" - call void [System.Console]System.Console::WriteLine(string) - leave.s TRY_0 - } - TRY_0: leave.s DONE - } - filter - { - pop - ldstr "in filter" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.0 - endfilter - } { - pop - ldstr "in handler" - call void [System.Console]System.Console::WriteLine(string) - leave.s DONE - } - DONE: ret -} diff --git a/src/coreclr/tests/src/JIT/Methodical/eh/basics/throwinfinallyintryfilter3.il b/src/coreclr/tests/src/JIT/Methodical/eh/basics/throwinfinallyintryfilter3.il deleted file mode 100644 index 03c9fd62767c..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/eh/basics/throwinfinallyintryfilter3.il +++ /dev/null @@ -1,162 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly extern mscorlib {} -.assembly extern common {} -.assembly test {} -.module test.exe - - -.method public static int32 Main() -{ - .entrypoint - .maxstack 2 - .locals init ( - class [mscorlib]System.IO.StringWriter expectedOut, - class [common]TestUtil.TestLog testLog - ) - - - newobj instance void [mscorlib]System.IO.StringWriter::.ctor() - stloc.s expectedOut - ldloc.s expectedOut - ldstr "in try" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr " in try" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr " in try" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr " in try" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr " in finally" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr " in filter" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr "in filter" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr " in finally" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr "in filter" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr "caught an exception!" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - newobj instance void [common]TestUtil.TestLog::.ctor(object) - stloc.s testLog - - ldloc.s testLog - callvirt instance void [common]TestUtil.TestLog::StartRecording() - - .try - { - ldc.i4.0 - call void func(int32) - leave.s DONE - } - catch [mscorlib]System.Exception - { - pop - ldstr "caught an exception!" - call void [System.Console]System.Console::WriteLine(string) - leave.s DONE - } - - DONE: - - ldloc.s testLog - callvirt instance void [common]TestUtil.TestLog::StopRecording() - - ldloc.s testLog - callvirt instance int32 [common]TestUtil.TestLog::VerifyOutput() - - ret -} - - -.method public static void func(int32 i) -{ - .maxstack 1 - .try - { - ldstr "in try" - call void [System.Console]System.Console::WriteLine(string) - .try - { - ldstr " in try" - call void [System.Console]System.Console::WriteLine(string) - .try - { - ldstr " in try" - call void [System.Console]System.Console::WriteLine(string) - .try { - ldstr " in try" - call void [System.Console]System.Console::WriteLine(string) - leave.s TRY_2 - } - finally - { - ldstr " in finally" - call void [System.Console]System.Console::WriteLine(string) - newobj instance void [mscorlib]System.Exception::.ctor() - throw - endfinally - } - TRY_2: leave.s TRY_1 - } - filter - { - pop - ldstr " in filter" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.0 - endfilter - } { - pop - ldstr " in handler" - call void [System.Console]System.Console::WriteLine(string) - leave.s TRY_0 - } - TRY_1: leave.s TRY_0 - } - finally - { - ldstr " in finally" - call void [System.Console]System.Console::WriteLine(string) - newobj instance void [mscorlib]System.Exception::.ctor() - throw - endfinally - } - TRY_0: leave.s DONE - } - filter - { - pop - ldstr "in filter" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.0 - endfilter - } { - pop - ldstr "in handler" - call void [System.Console]System.Console::WriteLine(string) - leave.s DONE - } - DONE: ret -} diff --git a/src/coreclr/tests/src/JIT/Methodical/eh/basics/throwisfirstinstruction.il b/src/coreclr/tests/src/JIT/Methodical/eh/basics/throwisfirstinstruction.il deleted file mode 100644 index 42c0c381f08d..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/eh/basics/throwisfirstinstruction.il +++ /dev/null @@ -1,74 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// throw first instruction in catch block - NDPWhidbey 10777 - - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly extern mscorlib {} -.assembly extern common {} -.assembly test {} -.module throw.exe - -.class private auto ansi beforefieldinit test - extends [mscorlib]System.Object -{ - .field private static class [common]TestUtil.TestLog testLog - .method private hidebysig specialname rtspecialname static void .cctor() cil managed - { - .maxstack 2 - .locals init ( - class [mscorlib]System.IO.StringWriter expectedOut - ) - newobj instance void [mscorlib]System.IO.StringWriter::.ctor() - stloc.s expectedOut - ldloc.s expectedOut - ldstr "in try" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr "after try" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - newobj instance void [common]TestUtil.TestLog::.ctor(object) - stsfld class [common]TestUtil.TestLog test::testLog - ret - } - - .method public static int32 Main() cil managed - { - .entrypoint - - ldsfld class [common]TestUtil.TestLog test::testLog - callvirt instance void [common]TestUtil.TestLog::StartRecording() - - .try - { - ldstr "in try" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Exception - { - throw - } - - - IL_end: - ldstr "after try" - call void [System.Console]System.Console::WriteLine(string) - - ldsfld class [common]TestUtil.TestLog test::testLog - callvirt instance void [common]TestUtil.TestLog::StopRecording() - - ldsfld class [common]TestUtil.TestLog test::testLog - callvirt instance int32 [common]TestUtil.TestLog::VerifyOutput() - - ret - } - -} diff --git a/src/coreclr/tests/src/JIT/Methodical/eh/basics/trycatch.cs b/src/coreclr/tests/src/JIT/Methodical/eh/basics/trycatch.cs deleted file mode 100644 index 66173bad6de5..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/eh/basics/trycatch.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// Try catch, non error case, the code in catch should not be executed -using System; - -namespace hello -{ - class Class1 - { - private static TestUtil.TestLog testLog; - - static Class1() - { - // Create test writer object to hold expected output - System.IO.StringWriter expectedOut = new System.IO.StringWriter(); - - // Write expected output to string writer object - expectedOut.WriteLine("In try"); - - // Create and initialize test log object - testLog = new TestUtil.TestLog(expectedOut); - } - - static public void inTry() - { - Console.WriteLine("In try"); - } - - static public void inCatch() - { - Console.WriteLine("In catch"); - } - - static public void inFinally() { } - - static public int Main(string[] args) - { - //Start recording - testLog.StartRecording(); - - try - { - inTry(); - } - catch (Exception e) - { - inCatch(); - Console.WriteLine(e); - } - - // stop recoding - testLog.StopRecording(); - - return testLog.VerifyOutput(); - } - } -} diff --git a/src/coreclr/tests/src/JIT/Methodical/eh/common/common.cs b/src/coreclr/tests/src/JIT/Methodical/eh/common/common.cs deleted file mode 100644 index a6c1a9316614..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/eh/common/common.cs +++ /dev/null @@ -1,279 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// throw in catch handler - -using System; -using System.IO; - -namespace TestUtil -{ - // This class implements a string writer that writes to a string buffer and a - // given text writer, which allows echoing the written string if stdout is - // specified as the text writer. - - public class StringRecorder : StringWriter - { - private TextWriter _outStream; - private int _outLimit; // maximum output size limit in characters - private bool _bufferIsFull; // if set, stop writting/recording output - - // Constructs a new StringRecorder that writes to the given TextWriter. - public StringRecorder(TextWriter ostream, int olimit) - { - if (ostream == null) - { - throw new ArgumentNullException("ostream", "Output stream cannot be null."); - } - this._outStream = ostream; - this._outLimit = olimit; - this._bufferIsFull = false; - } - - public StringRecorder(TextWriter ostream) : this(ostream, 0) - { - } - - // Only these three methods need to be overridden in order to override - // all different overloads of Write/WriteLine methods. - - public override void Write(char c) - { - if (!this._bufferIsFull) - { - _outStream.Write(c); - base.Write(c); - this.CheckOverflow(); - } - } - - public override void Write(string val) - { - if (!this._bufferIsFull) - { - _outStream.Write(val); - base.Write(val); - this.CheckOverflow(); - } - } - - public override void Write(char[] buffer, int index, int count) - { - if (!this._bufferIsFull) - { - _outStream.Write(buffer, index, count); - base.Write(buffer, index, count); - this.CheckOverflow(); - } - } - - protected void CheckOverflow() - { - if (this._outLimit > 0 && this.ToString().Length > this._outLimit) - { - this._bufferIsFull = true; - this._outStream.WriteLine("ERROR: Output exceeded maximum limit, extra output will be discarded!"); - } - } - } - - - - // This class represents a test log. It allows for redirecting both stdout - // and stderr of the test to StringRecorder objects. The redirected output - // can then be compared to expected output supplied to the class - // constructor. - - public class TestLog - { - - const int SUCC_RET_CODE = 100; - const int FAIL_RET_CODE = 1; - const int OUTPUT_LIMIT_FACTOR = 100; - - const string IGNORE_STR = "#IGNORE#"; - - protected string expectedOut; - protected string expectedError; - protected TextWriter stdOut; - protected TextWriter stdError; - protected StringWriter testOut; - protected StringWriter testError; - - public TestLog() : this(null, null) - { - } - - public TestLog(object expOut) : this(expOut, null) - { - } - - // Creates a new TestLog and set both expected output, and - // expected error to supplied values. - public TestLog(object expOut, object expError) - { - this.expectedOut = expOut == null ? String.Empty : expOut.ToString(); - this.expectedError = expError == null ? String.Empty : expError.ToString(); - this.stdOut = System.Console.Out; - this.stdError = System.Console.Error; - this.testOut = new StringRecorder(this.stdOut, this.expectedOut != null ? this.expectedOut.ToString().Length * OUTPUT_LIMIT_FACTOR : 0); - this.testError = new StringRecorder(this.stdError, this.expectedError != null ? this.expectedError.ToString().Length * OUTPUT_LIMIT_FACTOR : 0); - } - - // Start recoding by redirecting both stdout and stderr to - // string recorders. - public void StartRecording() - { - System.Console.SetOut(this.testOut); - System.Console.SetError(this.testError); - } - - // Stop recording by resetting both stdout and stderr to their - // initial values. - public void StopRecording() - { - // For now we disable the ability of stop recoding, so that we still recoed until the program exits. - // This issue came up with finally being called twice. The first time we stop recoding and from this - // point on we loose all output. - // System.Console.SetOut(this.stdOut); - // System.Console.SetError(this.stdError); - } - - // Returns true if both expected output and expected error are - // identical to actual output and actual error; false otherwise. - protected bool Identical() - { - return this.testOut.ToString().Equals(this.expectedOut) && this.testError.ToString().Equals(this.expectedError); - } - - // Display differences between expected output and actual output. - protected string Diff() - { - string result = String.Empty; - if (!this.testOut.ToString().Equals(this.expectedOut)) - { - string newLine = this.testOut.NewLine; - string delimStr = newLine[0].ToString(); - string[] actualLines = ((this.ActualOutput.Trim()).Replace(newLine, delimStr)).Split(delimStr.ToCharArray()); - string[] expectedLines = ((this.ExpectedOutput.Trim()).Replace(newLine, delimStr)).Split(delimStr.ToCharArray()); - int commonLineCount = actualLines.Length < expectedLines.Length ? actualLines.Length : expectedLines.Length; - bool identical = true; - for (int i = 0; i < commonLineCount && identical; ++i) - { - string actualLine = actualLines[i]; - string expectedLine = expectedLines[i]; - bool similar = true; - while (!actualLine.Equals(expectedLine) && similar) - { - bool ignoreMode = false; - while (expectedLine.StartsWith(IGNORE_STR)) - { - expectedLine = expectedLine.Substring(IGNORE_STR.Length); - ignoreMode = true; - } - int nextIgnore = expectedLine.IndexOf(IGNORE_STR); - if (nextIgnore > 0) - { - string expectedToken = expectedLine.Substring(0, nextIgnore); - int at = actualLine.IndexOf(expectedToken); - similar = (at == 0) || (ignoreMode && at > 0); - expectedLine = expectedLine.Substring(nextIgnore); - actualLine = similar ? actualLine.Substring(at + expectedToken.Length) : actualLine; - } - else - { - similar = (ignoreMode && actualLine.EndsWith(expectedLine)) || actualLine.Equals(expectedLine); - expectedLine = String.Empty; - actualLine = String.Empty; - } - } - if (!similar) - { - result += ("< " + expectedLines[i] + newLine); - result += "---" + newLine; - result += ("> " + actualLines[i] + newLine); - identical = false; - } - } - if (identical) - { - for (int i = commonLineCount; i < expectedLines.Length; ++i) - { - result += ("< " + expectedLines[i] + newLine); - } - for (int i = commonLineCount; i < actualLines.Length; ++i) - { - result += ("< " + actualLines[i] + newLine); - } - } - } - return result; - } - - // Verifies test output and error strings. If identical it returns - // successful return code; otherwise it prints expected output and - // diff results, and it returns failed result code. - public int VerifyOutput() - { - int retCode = -1; - string diff = this.Diff(); - if (String.Empty.Equals(diff)) - { - // this.stdOut.WriteLine(); - // this.stdOut.WriteLine("PASSED"); - retCode = SUCC_RET_CODE; - } - else - { - this.stdOut.WriteLine(); - this.stdOut.WriteLine("FAILED!"); - this.stdOut.WriteLine(); - this.stdOut.WriteLine("[EXPECTED OUTPUT]"); - this.stdOut.WriteLine(this.ExpectedOutput); - this.stdOut.WriteLine("[DIFF RESULT]"); - this.stdOut.WriteLine(diff); - retCode = FAIL_RET_CODE; - } - return retCode; - } - - // Returns actual test output. - public string ActualOutput - { - get - { - return this.testOut.ToString(); - } - } - - // Returns actual test error. - public string ActualError - { - get - { - return this.testError.ToString(); - } - } - - // Returns expected test output. - public string ExpectedOutput - { - get - { - return this.expectedOut.ToString(); - } - } - - // Returns expected test error. - public string ExpectedError - { - get - { - return this.expectedError.ToString(); - } - } - } - -} - diff --git a/src/coreclr/tests/src/JIT/Methodical/eh/finallyexec/nonlocalgotoinatryblockinahandler.cs b/src/coreclr/tests/src/JIT/Methodical/eh/finallyexec/nonlocalgotoinatryblockinahandler.cs deleted file mode 100644 index b249f1effde4..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/eh/finallyexec/nonlocalgotoinatryblockinahandler.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -//112256 -// [karimf] If we happen to have a try that is in nested CATCHs, and the try has a nonLocalGoto -// [only legal if it gos all the way back to the root!], then we replace the nonlocal -// LEAVE with an OPGOTO to the beginning of the cascading CATCHRET chain to unwind the stack... - -using System; - -class simple -{ - private static TestUtil.TestLog testLog; - - static simple() - { - // Create test writer object to hold expected output - System.IO.StringWriter expectedOut = new System.IO.StringWriter(); - - // Write expected output to string writer object - expectedOut.WriteLine("Begin test..."); - expectedOut.WriteLine("In main try"); - expectedOut.WriteLine("In main catch"); - expectedOut.WriteLine("In inner try"); - expectedOut.WriteLine("End test..."); - // Create and initialize test log object - testLog = new TestUtil.TestLog(expectedOut); - } - public static int Main() - { - //Start recording - testLog.StartRecording(); - Console.WriteLine("Begin test..."); - try - { - Console.WriteLine("In main try"); - - throw new Exception(); - } - catch - { - Console.WriteLine("In main catch"); - - try - { - Console.WriteLine("In inner try"); - goto L; - } - catch - { - Console.WriteLine("In inner catch"); - } - } - - Console.WriteLine("DEAD CODE!"); - - L: - - Console.WriteLine("End test..."); - // stop recoding - testLog.StopRecording(); - - return testLog.VerifyOutput(); - } -} diff --git a/src/coreclr/tests/src/JIT/Methodical/eh/generics/throwincatch.cs b/src/coreclr/tests/src/JIT/Methodical/eh/generics/throwincatch.cs deleted file mode 100644 index a5a448367342..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/eh/generics/throwincatch.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.IO; - - -public class GenException : Exception -{ -} - -public interface IGen -{ - bool ExceptionTest(); -} - -public class Gen : IGen -{ - public bool ExceptionTest() - { - try - { - Console.WriteLine("in try"); - try - { - Console.WriteLine(" in try"); - throw new GenException(); - } - catch (Exception exp) - { - Console.WriteLine(" in catch: " + exp.Message); - throw exp; - } - } - catch (GenException exp) - { - Console.WriteLine("in catch: " + exp.Message); - return true; - } - catch (Exception) - { - Console.WriteLine("in wrong catch!!"); - return false; - } - } -} - -public class Test -{ - private static TestUtil.TestLog testLog; - - static Test() - { - // Create test writer object to hold expected output - StringWriter expectedOut = new StringWriter(); - - // Write expected output to string writer object - Exception[] expList = new Exception[] { - new GenException(), - new GenException(), - new GenException(), - new GenException(), - new GenException() - }; - for (int i = 0; i < expList.Length; i++) - { - expectedOut.WriteLine("in try"); - expectedOut.WriteLine(" in try"); - expectedOut.WriteLine(" in catch: " + expList[i].Message); - expectedOut.WriteLine("in catch: " + expList[i].Message); - expectedOut.WriteLine("{0}", true); - } - - // Create and initialize test log object - testLog = new TestUtil.TestLog(expectedOut); - - } - - public static int Main() - { - //Start recording - testLog.StartRecording(); - - // create test list - IGen[] genList = new IGen[] { - new Gen(), - new Gen(), - new Gen(), - new Gen(), - new Gen() - }; - - // run test - for (int i = 0; i < genList.Length; i++) - { - Console.WriteLine(genList[i].ExceptionTest()); - } - - // stop recoding - testLog.StopRecording(); - - return testLog.VerifyOutput(); - } - -} diff --git a/src/coreclr/tests/src/JIT/Methodical/eh/leaves/nonlocalexitfromnestedcatch.cs b/src/coreclr/tests/src/JIT/Methodical/eh/leaves/nonlocalexitfromnestedcatch.cs deleted file mode 100644 index 8d096c4bb3fc..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/eh/leaves/nonlocalexitfromnestedcatch.cs +++ /dev/null @@ -1,76 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// Non local exit from a catch handler nested inside another catch handler - -using System; - -class test -{ - private static TestUtil.TestLog testLog; - - static test() - { - // Create test writer object to hold expected output - System.IO.StringWriter expectedOut = new System.IO.StringWriter(); - - // Write expected output to string writer object - expectedOut.WriteLine("In try1"); - expectedOut.WriteLine("In catch1"); - expectedOut.WriteLine("In try2"); - expectedOut.WriteLine("In try3"); - expectedOut.WriteLine("In catch3"); - expectedOut.WriteLine("In finally2"); - expectedOut.WriteLine("In finally1"); - expectedOut.WriteLine("Done"); - // Create and initialize test log object - testLog = new TestUtil.TestLog(expectedOut); - } - public static int Main() - { - //Start recording - testLog.StartRecording(); - try - { - Console.WriteLine("In try1"); - throw new Exception(); - } - catch (Exception) - { - Console.WriteLine("In catch1"); - try - { - Console.WriteLine("In try2"); - try - { - Console.WriteLine("In try3"); - throw new Exception(); - } - catch - { - Console.WriteLine("In catch3"); - goto L; - } - } - finally - { - Console.WriteLine("In finally2"); - } - } - finally - { - Console.WriteLine("In finally1"); - } - - Console.WriteLine("Never executed"); - L: - Console.WriteLine("Done"); - // stop recoding - testLog.StopRecording(); - - return testLog.VerifyOutput(); - - - } -} diff --git a/src/coreclr/tests/src/JIT/Methodical/eh/nested/general/throwinfinally.cs b/src/coreclr/tests/src/JIT/Methodical/eh/nested/general/throwinfinally.cs deleted file mode 100644 index 04804b61b2f5..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/eh/nested/general/throwinfinally.cs +++ /dev/null @@ -1,71 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// Throw from a try block nested in finally, non error case - -using System; - -public class a -{ - private static TestUtil.TestLog testLog; - - static a() - { - // Create test writer object to hold expected output - System.IO.StringWriter expectedOut = new System.IO.StringWriter(); - - // Write expected output to string writer object - expectedOut.WriteLine("In outer try"); - expectedOut.WriteLine("In outer finally"); - expectedOut.WriteLine("In inner try"); - expectedOut.WriteLine("In inner finally"); - expectedOut.WriteLine("Pass"); - - // Create and initialize test log object - testLog = new TestUtil.TestLog(expectedOut); - } - - public static void MiddleMethod() - { - try - { - Console.WriteLine("In outer try"); - } - finally - { - Console.WriteLine("In outer finally"); - try - { - Console.WriteLine("In inner try"); - throw new System.ArgumentException(); - Console.WriteLine("Unreached"); - } - finally - { - Console.WriteLine("In inner finally"); - } - } - Console.WriteLine("Unreached..."); - } - - public static int Main(string[] args) - { - //Start recording - testLog.StartRecording(); - - try - { - MiddleMethod(); - } - catch - { - Console.WriteLine("Pass"); - } - - // stop recoding - testLog.StopRecording(); - - return testLog.VerifyOutput(); - } -} diff --git a/src/coreclr/tests/src/JIT/Methodical/explicit/coverage/body_double.cs b/src/coreclr/tests/src/JIT/Methodical/explicit/coverage/body_double.cs deleted file mode 100644 index 723413c0bdf1..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/explicit/coverage/body_double.cs +++ /dev/null @@ -1,890 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -internal class TestApp -{ - private static double test_0_0(double num, AA init, AA zero) - { - return init.q; - } - private static double test_0_1(double num, AA init, AA zero) - { - zero.q = num; - return zero.q; - } - private static double test_0_2(double num, AA init, AA zero) - { - return init.q + zero.q; - } - private static double test_0_3(double num, AA init, AA zero) - { - return checked(init.q - zero.q); - } - private static double test_0_4(double num, AA init, AA zero) - { - zero.q += num; return zero.q; - } - private static double test_0_5(double num, AA init, AA zero) - { - zero.q += init.q; return zero.q; - } - private static double test_0_6(double num, AA init, AA zero) - { - if (init.q == num) - return 100; - else - return zero.q; - } - private static double test_0_7(double num, AA init, AA zero) - { - return init.q < num + 1 ? 100 : -1; - } - private static double test_0_8(double num, AA init, AA zero) - { - return (init.q > zero.q ? 1 : 0) + 99; - } - private static double test_0_9(double num, AA init, AA zero) - { - object bb = init.q; - return (double)bb; - } - private static double test_0_10(double num, AA init, AA zero) - { - double dbl = init.q; - return (double)dbl; - } - private static double test_0_11(double num, AA init, AA zero) - { - return AA.call_target(init.q); - } - private static double test_0_12(double num, AA init, AA zero) - { - return AA.call_target_ref(ref init.q); - } - private static double test_1_0(double num, ref AA r_init, ref AA r_zero) - { - return r_init.q; - } - private static double test_1_1(double num, ref AA r_init, ref AA r_zero) - { - r_zero.q = num; - return r_zero.q; - } - private static double test_1_2(double num, ref AA r_init, ref AA r_zero) - { - return r_init.q + r_zero.q; - } - private static double test_1_3(double num, ref AA r_init, ref AA r_zero) - { - return checked(r_init.q - r_zero.q); - } - private static double test_1_4(double num, ref AA r_init, ref AA r_zero) - { - r_zero.q += num; return r_zero.q; - } - private static double test_1_5(double num, ref AA r_init, ref AA r_zero) - { - r_zero.q += r_init.q; return r_zero.q; - } - private static double test_1_6(double num, ref AA r_init, ref AA r_zero) - { - if (r_init.q == num) - return 100; - else - return r_zero.q; - } - private static double test_1_7(double num, ref AA r_init, ref AA r_zero) - { - return r_init.q < num + 1 ? 100 : -1; - } - private static double test_1_8(double num, ref AA r_init, ref AA r_zero) - { - return (r_init.q > r_zero.q ? 1 : 0) + 99; - } - private static double test_1_9(double num, ref AA r_init, ref AA r_zero) - { - object bb = r_init.q; - return (double)bb; - } - private static double test_1_10(double num, ref AA r_init, ref AA r_zero) - { - double dbl = r_init.q; - return (double)dbl; - } - private static double test_1_11(double num, ref AA r_init, ref AA r_zero) - { - return AA.call_target(r_init.q); - } - private static double test_1_12(double num, ref AA r_init, ref AA r_zero) - { - return AA.call_target_ref(ref r_init.q); - } - private static double test_2_0(double num) - { - return AA.a_init[(int)num].q; - } - private static double test_2_1(double num) - { - AA.a_zero[(int)num].q = num; - return AA.a_zero[(int)num].q; - } - private static double test_2_2(double num) - { - return AA.a_init[(int)num].q + AA.a_zero[(int)num].q; - } - private static double test_2_3(double num) - { - return checked(AA.a_init[(int)num].q - AA.a_zero[(int)num].q); - } - private static double test_2_4(double num) - { - AA.a_zero[(int)num].q += num; return AA.a_zero[(int)num].q; - } - private static double test_2_5(double num) - { - AA.a_zero[(int)num].q += AA.a_init[(int)num].q; return AA.a_zero[(int)num].q; - } - private static double test_2_6(double num) - { - if (AA.a_init[(int)num].q == num) - return 100; - else - return AA.a_zero[(int)num].q; - } - private static double test_2_7(double num) - { - return AA.a_init[(int)num].q < num + 1 ? 100 : -1; - } - private static double test_2_8(double num) - { - return (AA.a_init[(int)num].q > AA.a_zero[(int)num].q ? 1 : 0) + 99; - } - private static double test_2_9(double num) - { - object bb = AA.a_init[(int)num].q; - return (double)bb; - } - private static double test_2_10(double num) - { - double dbl = AA.a_init[(int)num].q; - return (double)dbl; - } - private static double test_2_11(double num) - { - return AA.call_target(AA.a_init[(int)num].q); - } - private static double test_2_12(double num) - { - return AA.call_target_ref(ref AA.a_init[(int)num].q); - } - private static double test_3_0(double num) - { - return AA.aa_init[0, (int)num - 1, (int)num / 100].q; - } - private static double test_3_1(double num) - { - AA.aa_zero[0, (int)num - 1, (int)num / 100].q = num; - return AA.aa_zero[0, (int)num - 1, (int)num / 100].q; - } - private static double test_3_2(double num) - { - return AA.aa_init[0, (int)num - 1, (int)num / 100].q + AA.aa_zero[0, (int)num - 1, (int)num / 100].q; - } - private static double test_3_3(double num) - { - return checked(AA.aa_init[0, (int)num - 1, (int)num / 100].q - AA.aa_zero[0, (int)num - 1, (int)num / 100].q); - } - private static double test_3_4(double num) - { - AA.aa_zero[0, (int)num - 1, (int)num / 100].q += num; return AA.aa_zero[0, (int)num - 1, (int)num / 100].q; - } - private static double test_3_5(double num) - { - AA.aa_zero[0, (int)num - 1, (int)num / 100].q += AA.aa_init[0, (int)num - 1, (int)num / 100].q; return AA.aa_zero[0, (int)num - 1, (int)num / 100].q; - } - private static double test_3_6(double num) - { - if (AA.aa_init[0, (int)num - 1, (int)num / 100].q == num) - return 100; - else - return AA.aa_zero[0, (int)num - 1, (int)num / 100].q; - } - private static double test_3_7(double num) - { - return AA.aa_init[0, (int)num - 1, (int)num / 100].q < num + 1 ? 100 : -1; - } - private static double test_3_8(double num) - { - return (AA.aa_init[0, (int)num - 1, (int)num / 100].q > AA.aa_zero[0, (int)num - 1, (int)num / 100].q ? 1 : 0) + 99; - } - private static double test_3_9(double num) - { - object bb = AA.aa_init[0, (int)num - 1, (int)num / 100].q; - return (double)bb; - } - private static double test_3_10(double num) - { - double dbl = AA.aa_init[0, (int)num - 1, (int)num / 100].q; - return (double)dbl; - } - private static double test_3_11(double num) - { - return AA.call_target(AA.aa_init[0, (int)num - 1, (int)num / 100].q); - } - private static double test_3_12(double num) - { - return AA.call_target_ref(ref AA.aa_init[0, (int)num - 1, (int)num / 100].q); - } - private static double test_4_0(double num) - { - return BB.f_init.q; - } - private static double test_4_1(double num) - { - BB.f_zero.q = num; - return BB.f_zero.q; - } - private static double test_4_2(double num) - { - return BB.f_init.q + BB.f_zero.q; - } - private static double test_4_3(double num) - { - return checked(BB.f_init.q - BB.f_zero.q); - } - private static double test_4_4(double num) - { - BB.f_zero.q += num; return BB.f_zero.q; - } - private static double test_4_5(double num) - { - BB.f_zero.q += BB.f_init.q; return BB.f_zero.q; - } - private static double test_4_6(double num) - { - if (BB.f_init.q == num) - return 100; - else - return BB.f_zero.q; - } - private static double test_4_7(double num) - { - return BB.f_init.q < num + 1 ? 100 : -1; - } - private static double test_4_8(double num) - { - return (BB.f_init.q > BB.f_zero.q ? 1 : 0) + 99; - } - private static double test_4_9(double num) - { - object bb = BB.f_init.q; - return (double)bb; - } - private static double test_4_10(double num) - { - double dbl = BB.f_init.q; - return (double)dbl; - } - private static double test_4_11(double num) - { - return AA.call_target(BB.f_init.q); - } - private static double test_4_12(double num) - { - return AA.call_target_ref(ref BB.f_init.q); - } - private static double test_5_0(double num) - { - return ((AA)AA.b_init).q; - } - private static double test_6_0(double num, TypedReference tr_init) - { - return __refvalue(tr_init, AA).q; - } - private static unsafe double test_7_0(double num, void* ptr_init, void* ptr_zero) - { - return (*((AA*)ptr_init)).q; - } - private static unsafe double test_7_1(double num, void* ptr_init, void* ptr_zero) - { - (*((AA*)ptr_zero)).q = num; - return (*((AA*)ptr_zero)).q; - } - private static unsafe double test_7_2(double num, void* ptr_init, void* ptr_zero) - { - return (*((AA*)ptr_init)).q + (*((AA*)ptr_zero)).q; - } - private static unsafe double test_7_3(double num, void* ptr_init, void* ptr_zero) - { - return checked((*((AA*)ptr_init)).q - (*((AA*)ptr_zero)).q); - } - private static unsafe double test_7_4(double num, void* ptr_init, void* ptr_zero) - { - (*((AA*)ptr_zero)).q += num; return (*((AA*)ptr_zero)).q; - } - private static unsafe double test_7_5(double num, void* ptr_init, void* ptr_zero) - { - (*((AA*)ptr_zero)).q += (*((AA*)ptr_init)).q; return (*((AA*)ptr_zero)).q; - } - private static unsafe double test_7_6(double num, void* ptr_init, void* ptr_zero) - { - if ((*((AA*)ptr_init)).q == num) - return 100; - else - return (*((AA*)ptr_zero)).q; - } - private static unsafe double test_7_7(double num, void* ptr_init, void* ptr_zero) - { - return (*((AA*)ptr_init)).q < num + 1 ? 100 : -1; - } - private static unsafe double test_7_8(double num, void* ptr_init, void* ptr_zero) - { - return ((*((AA*)ptr_init)).q > (*((AA*)ptr_zero)).q ? 1 : 0) + 99; - } - private static unsafe double test_7_9(double num, void* ptr_init, void* ptr_zero) - { - object bb = (*((AA*)ptr_init)).q; - return (double)bb; - } - private static unsafe double test_7_10(double num, void* ptr_init, void* ptr_zero) - { - double dbl = (*((AA*)ptr_init)).q; - return (double)dbl; - } - private static unsafe double test_7_11(double num, void* ptr_init, void* ptr_zero) - { - return AA.call_target((*((AA*)ptr_init)).q); - } - private static unsafe double test_7_12(double num, void* ptr_init, void* ptr_zero) - { - return AA.call_target_ref(ref (*((AA*)ptr_init)).q); - } - - private static unsafe int Main() - { - AA.reset(); - if (test_0_0(100, new AA(100), new AA(0)) != 100) - { - Console.WriteLine("test_0_0() failed."); - return 101; - } - AA.verify_all(); AA.reset(); - if (test_0_1(100, new AA(100), new AA(0)) != 100) - { - Console.WriteLine("test_0_1() failed."); - return 102; - } - AA.verify_all(); AA.reset(); - if (test_0_2(100, new AA(100), new AA(0)) != 100) - { - Console.WriteLine("test_0_2() failed."); - return 103; - } - AA.verify_all(); AA.reset(); - if (test_0_3(100, new AA(100), new AA(0)) != 100) - { - Console.WriteLine("test_0_3() failed."); - return 104; - } - AA.verify_all(); AA.reset(); - if (test_0_4(100, new AA(100), new AA(0)) != 100) - { - Console.WriteLine("test_0_4() failed."); - return 105; - } - AA.verify_all(); AA.reset(); - if (test_0_5(100, new AA(100), new AA(0)) != 100) - { - Console.WriteLine("test_0_5() failed."); - return 106; - } - AA.verify_all(); AA.reset(); - if (test_0_6(100, new AA(100), new AA(0)) != 100) - { - Console.WriteLine("test_0_6() failed."); - return 107; - } - AA.verify_all(); AA.reset(); - if (test_0_7(100, new AA(100), new AA(0)) != 100) - { - Console.WriteLine("test_0_7() failed."); - return 108; - } - AA.verify_all(); AA.reset(); - if (test_0_8(100, new AA(100), new AA(0)) != 100) - { - Console.WriteLine("test_0_8() failed."); - return 109; - } - AA.verify_all(); AA.reset(); - if (test_0_9(100, new AA(100), new AA(0)) != 100) - { - Console.WriteLine("test_0_9() failed."); - return 110; - } - AA.verify_all(); AA.reset(); - if (test_0_10(100, new AA(100), new AA(0)) != 100) - { - Console.WriteLine("test_0_10() failed."); - return 111; - } - AA.verify_all(); AA.reset(); - if (test_0_11(100, new AA(100), new AA(0)) != 100) - { - Console.WriteLine("test_0_11() failed."); - return 112; - } - AA.verify_all(); AA.reset(); - if (test_0_12(100, new AA(100), new AA(0)) != 100) - { - Console.WriteLine("test_0_12() failed."); - return 113; - } - AA.verify_all(); AA.reset(); - if (test_1_0(100, ref AA._init, ref AA._zero) != 100) - { - Console.WriteLine("test_1_0() failed."); - return 114; - } - AA.verify_all(); AA.reset(); - if (test_1_1(100, ref AA._init, ref AA._zero) != 100) - { - Console.WriteLine("test_1_1() failed."); - return 115; - } - AA.verify_all(); AA.reset(); - if (test_1_2(100, ref AA._init, ref AA._zero) != 100) - { - Console.WriteLine("test_1_2() failed."); - return 116; - } - AA.verify_all(); AA.reset(); - if (test_1_3(100, ref AA._init, ref AA._zero) != 100) - { - Console.WriteLine("test_1_3() failed."); - return 117; - } - AA.verify_all(); AA.reset(); - if (test_1_4(100, ref AA._init, ref AA._zero) != 100) - { - Console.WriteLine("test_1_4() failed."); - return 118; - } - AA.verify_all(); AA.reset(); - if (test_1_5(100, ref AA._init, ref AA._zero) != 100) - { - Console.WriteLine("test_1_5() failed."); - return 119; - } - AA.verify_all(); AA.reset(); - if (test_1_6(100, ref AA._init, ref AA._zero) != 100) - { - Console.WriteLine("test_1_6() failed."); - return 120; - } - AA.verify_all(); AA.reset(); - if (test_1_7(100, ref AA._init, ref AA._zero) != 100) - { - Console.WriteLine("test_1_7() failed."); - return 121; - } - AA.verify_all(); AA.reset(); - if (test_1_8(100, ref AA._init, ref AA._zero) != 100) - { - Console.WriteLine("test_1_8() failed."); - return 122; - } - AA.verify_all(); AA.reset(); - if (test_1_9(100, ref AA._init, ref AA._zero) != 100) - { - Console.WriteLine("test_1_9() failed."); - return 123; - } - AA.verify_all(); AA.reset(); - if (test_1_10(100, ref AA._init, ref AA._zero) != 100) - { - Console.WriteLine("test_1_10() failed."); - return 124; - } - AA.verify_all(); AA.reset(); - if (test_1_11(100, ref AA._init, ref AA._zero) != 100) - { - Console.WriteLine("test_1_11() failed."); - return 125; - } - AA.verify_all(); AA.reset(); - if (test_1_12(100, ref AA._init, ref AA._zero) != 100) - { - Console.WriteLine("test_1_12() failed."); - return 126; - } - AA.verify_all(); AA.reset(); - if (test_2_0(100) != 100) - { - Console.WriteLine("test_2_0() failed."); - return 127; - } - AA.verify_all(); AA.reset(); - if (test_2_1(100) != 100) - { - Console.WriteLine("test_2_1() failed."); - return 128; - } - AA.verify_all(); AA.reset(); - if (test_2_2(100) != 100) - { - Console.WriteLine("test_2_2() failed."); - return 129; - } - AA.verify_all(); AA.reset(); - if (test_2_3(100) != 100) - { - Console.WriteLine("test_2_3() failed."); - return 130; - } - AA.verify_all(); AA.reset(); - if (test_2_4(100) != 100) - { - Console.WriteLine("test_2_4() failed."); - return 131; - } - AA.verify_all(); AA.reset(); - if (test_2_5(100) != 100) - { - Console.WriteLine("test_2_5() failed."); - return 132; - } - AA.verify_all(); AA.reset(); - if (test_2_6(100) != 100) - { - Console.WriteLine("test_2_6() failed."); - return 133; - } - AA.verify_all(); AA.reset(); - if (test_2_7(100) != 100) - { - Console.WriteLine("test_2_7() failed."); - return 134; - } - AA.verify_all(); AA.reset(); - if (test_2_8(100) != 100) - { - Console.WriteLine("test_2_8() failed."); - return 135; - } - AA.verify_all(); AA.reset(); - if (test_2_9(100) != 100) - { - Console.WriteLine("test_2_9() failed."); - return 136; - } - AA.verify_all(); AA.reset(); - if (test_2_10(100) != 100) - { - Console.WriteLine("test_2_10() failed."); - return 137; - } - AA.verify_all(); AA.reset(); - if (test_2_11(100) != 100) - { - Console.WriteLine("test_2_11() failed."); - return 138; - } - AA.verify_all(); AA.reset(); - if (test_2_12(100) != 100) - { - Console.WriteLine("test_2_12() failed."); - return 139; - } - AA.verify_all(); AA.reset(); - if (test_3_0(100) != 100) - { - Console.WriteLine("test_3_0() failed."); - return 140; - } - AA.verify_all(); AA.reset(); - if (test_3_1(100) != 100) - { - Console.WriteLine("test_3_1() failed."); - return 141; - } - AA.verify_all(); AA.reset(); - if (test_3_2(100) != 100) - { - Console.WriteLine("test_3_2() failed."); - return 142; - } - AA.verify_all(); AA.reset(); - if (test_3_3(100) != 100) - { - Console.WriteLine("test_3_3() failed."); - return 143; - } - AA.verify_all(); AA.reset(); - if (test_3_4(100) != 100) - { - Console.WriteLine("test_3_4() failed."); - return 144; - } - AA.verify_all(); AA.reset(); - if (test_3_5(100) != 100) - { - Console.WriteLine("test_3_5() failed."); - return 145; - } - AA.verify_all(); AA.reset(); - if (test_3_6(100) != 100) - { - Console.WriteLine("test_3_6() failed."); - return 146; - } - AA.verify_all(); AA.reset(); - if (test_3_7(100) != 100) - { - Console.WriteLine("test_3_7() failed."); - return 147; - } - AA.verify_all(); AA.reset(); - if (test_3_8(100) != 100) - { - Console.WriteLine("test_3_8() failed."); - return 148; - } - AA.verify_all(); AA.reset(); - if (test_3_9(100) != 100) - { - Console.WriteLine("test_3_9() failed."); - return 149; - } - AA.verify_all(); AA.reset(); - if (test_3_10(100) != 100) - { - Console.WriteLine("test_3_10() failed."); - return 150; - } - AA.verify_all(); AA.reset(); - if (test_3_11(100) != 100) - { - Console.WriteLine("test_3_11() failed."); - return 151; - } - AA.verify_all(); AA.reset(); - if (test_3_12(100) != 100) - { - Console.WriteLine("test_3_12() failed."); - return 152; - } - AA.verify_all(); AA.reset(); - if (test_4_0(100) != 100) - { - Console.WriteLine("test_4_0() failed."); - return 153; - } - AA.verify_all(); AA.reset(); - if (test_4_1(100) != 100) - { - Console.WriteLine("test_4_1() failed."); - return 154; - } - AA.verify_all(); AA.reset(); - if (test_4_2(100) != 100) - { - Console.WriteLine("test_4_2() failed."); - return 155; - } - AA.verify_all(); AA.reset(); - if (test_4_3(100) != 100) - { - Console.WriteLine("test_4_3() failed."); - return 156; - } - AA.verify_all(); AA.reset(); - if (test_4_4(100) != 100) - { - Console.WriteLine("test_4_4() failed."); - return 157; - } - AA.verify_all(); AA.reset(); - if (test_4_5(100) != 100) - { - Console.WriteLine("test_4_5() failed."); - return 158; - } - AA.verify_all(); AA.reset(); - if (test_4_6(100) != 100) - { - Console.WriteLine("test_4_6() failed."); - return 159; - } - AA.verify_all(); AA.reset(); - if (test_4_7(100) != 100) - { - Console.WriteLine("test_4_7() failed."); - return 160; - } - AA.verify_all(); AA.reset(); - if (test_4_8(100) != 100) - { - Console.WriteLine("test_4_8() failed."); - return 161; - } - AA.verify_all(); AA.reset(); - if (test_4_9(100) != 100) - { - Console.WriteLine("test_4_9() failed."); - return 162; - } - AA.verify_all(); AA.reset(); - if (test_4_10(100) != 100) - { - Console.WriteLine("test_4_10() failed."); - return 163; - } - AA.verify_all(); AA.reset(); - if (test_4_11(100) != 100) - { - Console.WriteLine("test_4_11() failed."); - return 164; - } - AA.verify_all(); AA.reset(); - if (test_4_12(100) != 100) - { - Console.WriteLine("test_4_12() failed."); - return 165; - } - AA.verify_all(); AA.reset(); - if (test_5_0(100) != 100) - { - Console.WriteLine("test_5_0() failed."); - return 166; - } - AA.verify_all(); AA.reset(); - if (test_6_0(100, __makeref(AA._init)) != 100) - { - Console.WriteLine("test_6_0() failed."); - return 167; - } - AA.verify_all(); AA.reset(); - fixed (void* p_init = &AA._init, p_zero = &AA._zero) - { - if (test_7_0(100, p_init, p_zero) != 100) - { - Console.WriteLine("test_7_0() failed."); - return 168; - } - } - AA.verify_all(); AA.reset(); - fixed (void* p_init = &AA._init, p_zero = &AA._zero) - { - if (test_7_1(100, p_init, p_zero) != 100) - { - Console.WriteLine("test_7_1() failed."); - return 169; - } - } - AA.verify_all(); AA.reset(); - fixed (void* p_init = &AA._init, p_zero = &AA._zero) - { - if (test_7_2(100, p_init, p_zero) != 100) - { - Console.WriteLine("test_7_2() failed."); - return 170; - } - } - AA.verify_all(); AA.reset(); - fixed (void* p_init = &AA._init, p_zero = &AA._zero) - { - if (test_7_3(100, p_init, p_zero) != 100) - { - Console.WriteLine("test_7_3() failed."); - return 171; - } - } - AA.verify_all(); AA.reset(); - fixed (void* p_init = &AA._init, p_zero = &AA._zero) - { - if (test_7_4(100, p_init, p_zero) != 100) - { - Console.WriteLine("test_7_4() failed."); - return 172; - } - } - AA.verify_all(); AA.reset(); - fixed (void* p_init = &AA._init, p_zero = &AA._zero) - { - if (test_7_5(100, p_init, p_zero) != 100) - { - Console.WriteLine("test_7_5() failed."); - return 173; - } - } - AA.verify_all(); AA.reset(); - fixed (void* p_init = &AA._init, p_zero = &AA._zero) - { - if (test_7_6(100, p_init, p_zero) != 100) - { - Console.WriteLine("test_7_6() failed."); - return 174; - } - } - AA.verify_all(); AA.reset(); - fixed (void* p_init = &AA._init, p_zero = &AA._zero) - { - if (test_7_7(100, p_init, p_zero) != 100) - { - Console.WriteLine("test_7_7() failed."); - return 175; - } - } - AA.verify_all(); AA.reset(); - fixed (void* p_init = &AA._init, p_zero = &AA._zero) - { - if (test_7_8(100, p_init, p_zero) != 100) - { - Console.WriteLine("test_7_8() failed."); - return 176; - } - } - AA.verify_all(); AA.reset(); - fixed (void* p_init = &AA._init, p_zero = &AA._zero) - { - if (test_7_9(100, p_init, p_zero) != 100) - { - Console.WriteLine("test_7_9() failed."); - return 177; - } - } - AA.verify_all(); AA.reset(); - fixed (void* p_init = &AA._init, p_zero = &AA._zero) - { - if (test_7_10(100, p_init, p_zero) != 100) - { - Console.WriteLine("test_7_10() failed."); - return 178; - } - } - AA.verify_all(); AA.reset(); - fixed (void* p_init = &AA._init, p_zero = &AA._zero) - { - if (test_7_11(100, p_init, p_zero) != 100) - { - Console.WriteLine("test_7_11() failed."); - return 179; - } - } - AA.verify_all(); AA.reset(); - fixed (void* p_init = &AA._init, p_zero = &AA._zero) - { - if (test_7_12(100, p_init, p_zero) != 100) - { - Console.WriteLine("test_7_12() failed."); - return 180; - } - } - AA.verify_all(); Console.WriteLine("All tests passed."); - return 100; - } -} diff --git a/src/coreclr/tests/src/JIT/Methodical/explicit/coverage/expl_double_1.cs b/src/coreclr/tests/src/JIT/Methodical/explicit/coverage/expl_double_1.cs deleted file mode 100644 index e423d089736c..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/explicit/coverage/expl_double_1.cs +++ /dev/null @@ -1,69 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Runtime.InteropServices; - -[StructLayout(LayoutKind.Explicit)] -internal struct AA -{ - [FieldOffset(4)] - public byte tmp1; - - [FieldOffset(8)] - public double q; - - [FieldOffset(49)] - public short tmp2; - - public AA(double qq) - { - tmp1 = 0; - tmp2 = 0; - q = qq; - } - - public static AA[] a_init = new AA[101]; - public static AA[] a_zero = new AA[101]; - public static AA[,,] aa_init = new AA[1, 101, 2]; - public static AA[,,] aa_zero = new AA[1, 101, 2]; - public static object b_init = new AA(100); - public static AA _init, _zero; - - public static double call_target(double arg) { return arg; } - public static double call_target_ref(ref double arg) { return arg; } - - public void verify() - { - } - - public static void verify_all() - { - a_init[100].verify(); - a_zero[100].verify(); - aa_init[0, 99, 1].verify(); - aa_zero[0, 99, 1].verify(); - _init.verify(); - _zero.verify(); - BB.f_init.verify(); - BB.f_zero.verify(); - } - - public static void reset() - { - a_init[100] = new AA(100); - a_zero[100] = new AA(0); - aa_init[0, 99, 1] = new AA(100); - aa_zero[0, 99, 1] = new AA(0); - _init = new AA(100); - _zero = new AA(0); - BB.f_init = new AA(100); - BB.f_zero = new AA(0); - } -} - -internal struct BB -{ - public static AA f_init, f_zero; -} diff --git a/src/coreclr/tests/src/JIT/Methodical/flowgraph/dev10_bug679008/helper.il b/src/coreclr/tests/src/JIT/Methodical/flowgraph/dev10_bug679008/helper.il deleted file mode 100644 index 3b08fdd20053..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/flowgraph/dev10_bug679008/helper.il +++ /dev/null @@ -1,123 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) - .ver 4:0:0:0 -} -.assembly helper -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) -} - -.class public abstract auto ansi sealed beforefieldinit Helper - extends [mscorlib]System.Object -{ - .class auto ansi nested private beforefieldinit ExceptionHelper`1 - extends [mscorlib]System.Exception - { - .field public !T payload - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Exception::.ctor() - IL_0006: ret - } - - .method public hidebysig specialname rtspecialname - instance void .ctor(!T t) cil managed - { - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Exception::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld !0 class Helper/ExceptionHelper`1::payload - IL_000d: ret - } - - } - - .method private hidebysig static void OverwriteRDX(!!SrcType src) cil managed noinlining - { - ret - } - - .method public hidebysig static !!DestType - RetypeObject(!!SrcType src) cil managed noinlining - { - .maxstack 2 - .locals init (!!DestType retVal) - .try - { - newobj instance void class Helper/ExceptionHelper`1::.ctor() - throw - } - catch class Helper/ExceptionHelper`1 - { - ldarg.0 - newobj instance void class Helper/ExceptionHelper`1::.ctor(!0) - call void Helper::OverwriteRDX>(!!0) - ldfld !0 class Helper/ExceptionHelper`1::payload - stloc.0 - leave END_CATCH - - } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } .try { leave END_CATCH } catch class [mscorlib]System.Exception { leave END_CATCH } - END_CATCH: - ldloc.0 - ret - } - -} diff --git a/src/coreclr/tests/src/JIT/Methodical/inlining/bug505642/test.cs b/src/coreclr/tests/src/JIT/Methodical/inlining/bug505642/test.cs deleted file mode 100644 index 94153f8c7b4c..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/inlining/bug505642/test.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/* - * Some comments about the test: - * Expected: The code runs and completes successfully. - * Actual: The application hangs when it is run. - * The csharp compiler seems to be generating the same IL in both the cases. - * - * Some comments about the bug: - * The problem is that the way we use ComputePreferredZapModule grows exponentially in this test case. The thing with the inliner is a red herring. If you increase the constant from 5 to 15 it also hangs. The only reason that it's worse with the inliner is because of the way we handle the unbounded recursion. Once you get about 5 deep you go all the way infinitely (because the call site size is always smaller than the estimated function body). - * - */ - -using System; - -public struct Tuple -{ - public readonly T0 Field0; - public readonly T1 Field1; - public Tuple(T0 Field0, T1 Field1) - { - this.Field0 = Field0; - this.Field1 = Field1; - } -} - -internal static class M -{ - private static int Main() - { - return meth(8, 100); - //Console.Write(meth(8, 100)); - //Console.Write(meth(5, 1)); Increasing levels to 8 - } - - private static T meth(int v, T x) - { - //Recursive generic - return ((v >= 0) ? meth>(v - 1, new Tuple(x, x)).Field0 : x); - } -} diff --git a/src/coreclr/tests/src/JIT/Methodical/ldtoken/ldtoken.il b/src/coreclr/tests/src/JIT/Methodical/ldtoken/ldtoken.il deleted file mode 100644 index 8c27a58bbc04..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/ldtoken/ldtoken.il +++ /dev/null @@ -1,117 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// ldtoken.il -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly 'ldtoken' -{ - - -} -.namespace JitTest -{ - .class private auto ansi beforefieldinit TestClass - extends [mscorlib]System.Object - { - .field family class JitTest.TestClass m_fld - .field public static class JitTest.TestClass s_fld - .method public hidebysig static class JitTest.TestClass - StaticMethod(class JitTest.TestClass inst) cil managed - { - .maxstack 1 - .locals (class JitTest.TestClass V_0) - IL_0000: newobj instance void JitTest.TestClass::.ctor() - IL_0005: stloc.0 - IL_0006: br.s IL_0008 - IL_0008: ldloc.0 - IL_0009: ret - } - .method private hidebysig instance class JitTest.TestClass - InstanceMethod(class JitTest.TestClass inst) cil managed - { - .maxstack 1 - .locals (class JitTest.TestClass V_0) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: br.s IL_0004 - IL_0004: ldloc.0 - IL_0005: ret - } - .method assembly hidebysig newslot virtual - instance class JitTest.TestClass - VirtualMethod(class JitTest.TestClass inst) cil managed - { - .maxstack 1 - .locals (class JitTest.TestClass V_0) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: br.s IL_0004 - IL_0004: ldloc.0 - IL_0005: ret - } - .method private hidebysig static int32 Main() cil managed - { - .entrypoint - .maxstack 8 - .locals (int32 V_0, - valuetype [mscorlib]System.RuntimeFieldHandle, - valuetype [mscorlib]System.RuntimeMethodHandle, - valuetype [mscorlib]System.RuntimeTypeHandle) - ldc.i4.0 - stloc.0 - - ldloca 0 - ldind.i4 - brfalse br1 - ldtoken field class JitTest.TestClass JitTest.TestClass::m_fld - br mg1 -br1: - ldtoken field class JitTest.TestClass JitTest.TestClass::s_fld -mg1: - stloc.1 - - ldloca 0 - ldind.i4 - switch (br2a, br2b) - ldtoken method instance class JitTest.TestClass JitTest.TestClass::InstanceMethod(class JitTest.TestClass inst) - br.s mg2 -br2a: - ldtoken method class JitTest.TestClass JitTest.TestClass::StaticMethod(class JitTest.TestClass inst) - br.s mg2 -br2b: - ldtoken method instance class JitTest.TestClass JitTest.TestClass::VirtualMethod(class JitTest.TestClass inst) -mg2: - stloc.2 - - ldloca 0 - ldind.i4 - brfalse br3 - ldtoken int32 - br mg3 -br3: - ldtoken class JitTest.TestClass -mg3: - stloc.3 - - ldtoken method instance class JitTest.TestClass JitTest.TestClass::InstanceMethod(class JitTest.TestClass inst) - pop - - ldc.i4.s 100 - ret - } - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } - } -} diff --git a/src/coreclr/tests/src/JIT/Methodical/localloc/verify/verify01_dynamic.il b/src/coreclr/tests/src/JIT/Methodical/localloc/verify/verify01_dynamic.il deleted file mode 100644 index d4dea618e67b..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/localloc/verify/verify01_dynamic.il +++ /dev/null @@ -1,98 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// Test Invalid program (evaluation stack is not empty before localloc call - -.assembly extern legacy library mscorlib {} -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly eh01{} - -.class private auto ansi beforefieldinit LocallocTest - extends [mscorlib]System.Object -{ - .field public static int32 stackAllocSize - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - // Code size 39 (0x27) - .maxstack 1 - .locals init(int32 V_0) - ldc.i4 0x1000 - stsfld int32 LocallocTest::stackAllocSize - .try - { - IL_0000: call void LocallocTest::func() - IL_0005: leave.s IL_0027 - - } // end .try - catch [mscorlib]System.Security.VerificationException - { - IL_0007: pop - IL_0008: ldstr "Passed" - IL_000d: call void [System.Console]System.Console::WriteLine(string) - IL_0012: ldc.i4.s 100 - IL_0014: stloc.0 - IL_0015: leave.s IL_0035 - - } // end handler - catch [mscorlib]System.InvalidProgramException - { - IL_0017: pop - IL_0018: ldstr "Passed" - IL_009d: call void [System.Console]System.Console::WriteLine(string) - IL_0022: ldc.i4.s 100 - IL_0024: stloc.0 - IL_0025: leave.s IL_0035 - - } // end handler - IL_0027: ldstr "Failed" - IL_002c: call void [System.Console]System.Console::WriteLine(string) - IL_0031: ldc.i4.1 - IL_0032: stloc.0 - IL_0033: br.s IL_0035 - - IL_0035: ldloc.0 - IL_0036: ret - } // end of method LocallocTest::Main - - .method private hidebysig static void func() cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init(int32* V_0, - int32* V_1) - IL_0000: ldc.i4.4 - IL_0001: ldsfld int32 LocallocTest::stackAllocSize - IL_0002: mul - IL_0006: ldc.i4.4 - IL_0007: ldsfld int32 LocallocTest::stackAllocSize - IL_0008: mul - IL_0009: localloc - IL_000b: stloc.1 - IL_0003: localloc - IL_0005: stloc.0 - IL_000c: ret - } // end of method LocallocTest::func - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method LocallocTest::.ctor - -} // end of class LocallocTest - - -// ============================================================= - -//*********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file verify01_dynamic.res diff --git a/src/coreclr/tests/src/JIT/Methodical/localloc/verify/verify01_large.il b/src/coreclr/tests/src/JIT/Methodical/localloc/verify/verify01_large.il deleted file mode 100644 index 90e2a0ab472b..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/localloc/verify/verify01_large.il +++ /dev/null @@ -1,95 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// Test Invalid program (evaluation stack is not empty before localloc call - -.assembly extern legacy library mscorlib {} -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly eh01{} - -.class private auto ansi beforefieldinit LocallocTest - extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - // Code size 39 (0x27) - .maxstack 1 - .locals init(int32 V_0) - .try - { - IL_0000: call void LocallocTest::func() - IL_0005: leave.s IL_0027 - - } // end .try - catch [mscorlib]System.Security.VerificationException - { - IL_0007: pop - IL_0008: ldstr "Passed" - IL_000d: call void [System.Console]System.Console::WriteLine(string) - IL_0012: ldc.i4.s 100 - IL_0014: stloc.0 - IL_0015: leave.s IL_0035 - - } // end handler - catch [mscorlib]System.InvalidProgramException - { - IL_0017: pop - IL_0018: ldstr "Passed" - IL_009d: call void [System.Console]System.Console::WriteLine(string) - IL_0022: ldc.i4.s 100 - IL_0024: stloc.0 - IL_0025: leave.s IL_0035 - - } // end handler - IL_0027: ldstr "Failed" - IL_002c: call void [System.Console]System.Console::WriteLine(string) - IL_0031: ldc.i4.1 - IL_0032: stloc.0 - IL_0033: br.s IL_0035 - - IL_0035: ldloc.0 - IL_0036: ret - } // end of method LocallocTest::Main - - .method private hidebysig static void func() cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init(int32* V_0, - int32* V_1) - IL_0000: ldc.i4.4 - IL_0001: ldc.i4 0x1000 - IL_0002: mul - IL_0006: ldc.i4.4 - IL_0007: ldc.i4 0x1000 - IL_0008: mul - IL_0009: localloc - IL_000b: stloc.1 - IL_0003: localloc - IL_0005: stloc.0 - IL_000c: ret - } // end of method LocallocTest::func - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method LocallocTest::.ctor - -} // end of class LocallocTest - - -// ============================================================= - -//*********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file verify01_dynamic.res diff --git a/src/coreclr/tests/src/JIT/Methodical/localloc/verify/verify01_small.il b/src/coreclr/tests/src/JIT/Methodical/localloc/verify/verify01_small.il deleted file mode 100644 index 9c57093d55a6..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/localloc/verify/verify01_small.il +++ /dev/null @@ -1,95 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// Test Invalid program (evaluation stack is not empty before localloc call - -.assembly extern legacy library mscorlib {} -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly eh01{} - -.class private auto ansi beforefieldinit LocallocTest - extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - // Code size 39 (0x27) - .maxstack 1 - .locals init(int32 V_0) - .try - { - IL_0000: call void LocallocTest::func() - IL_0005: leave.s IL_0027 - - } // end .try - catch [mscorlib]System.Security.VerificationException - { - IL_0007: pop - IL_0008: ldstr "Passed" - IL_000d: call void [System.Console]System.Console::WriteLine(string) - IL_0012: ldc.i4.s 100 - IL_0014: stloc.0 - IL_0015: leave.s IL_0035 - - } // end handler - catch [mscorlib]System.InvalidProgramException - { - IL_0017: pop - IL_0018: ldstr "Passed" - IL_009d: call void [System.Console]System.Console::WriteLine(string) - IL_0022: ldc.i4.s 100 - IL_0024: stloc.0 - IL_0025: leave.s IL_0035 - - } // end handler - IL_0027: ldstr "Failed" - IL_002c: call void [System.Console]System.Console::WriteLine(string) - IL_0031: ldc.i4.1 - IL_0032: stloc.0 - IL_0033: br.s IL_0035 - - IL_0035: ldloc.0 - IL_0036: ret - } // end of method LocallocTest::Main - - .method private hidebysig static void func() cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init(int32* V_0, - int32* V_1) - IL_0000: ldc.i4.4 - IL_0001: ldc.i4.1 - IL_0002: mul - IL_0006: ldc.i4.4 - IL_0007: ldc.i4.1 - IL_0008: mul - IL_0009: localloc - IL_000b: stloc.1 - IL_0003: localloc - IL_0005: stloc.0 - IL_000c: ret - } // end of method LocallocTest::func - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method LocallocTest::.ctor - -} // end of class LocallocTest - - -// ============================================================= - -//*********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file verify01_dynamic.res diff --git a/src/coreclr/tests/src/JIT/Methodical/localloc/zeroinit/zeroinit01_large.il b/src/coreclr/tests/src/JIT/Methodical/localloc/zeroinit/zeroinit01_large.il deleted file mode 100644 index 278b95bb05f3..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/localloc/zeroinit/zeroinit01_large.il +++ /dev/null @@ -1,121 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// Test zero initialization of localloc -.assembly extern legacy library mscorlib {} -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly zeroinit01{} - -.class private auto ansi beforefieldinit T - extends [mscorlib]System.Object -{ - .field public static int32 size_to_test - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - // Code size 79 (0x4f) - .maxstack 3 - .locals init(bool passed, - int32* buffer, - int32 n) - // Initialize 'passed' to true. - IL_0000: ldc.i4.1 - IL_0001: stloc.0 - - IL_0002: call void T::dirtyStack() - // localloc - IL_0007: ldc.i4.4 - IL_0008: ldc.i4 0x1000 - IL_000d: mul - IL_000e: localloc - IL_0010: stloc.1 - // Set size of localloc - IL_0011: ldc.i4 0x1000 - IL_0016: stsfld int32 T::size_to_test - - IL_001b: ldc.i4.0 - IL_001c: stloc.2 - IL_001d: br.s L_LOOP2 - - L_LOOP1: ldloc.1 - IL_0020: ldc.i4.4 - IL_0021: ldloc.2 - IL_0022: mul - IL_0023: add - IL_0024: ldind.i4 - IL_0025: brfalse.s IL_0029 - // Test failed. (!= zero) - IL_0027: ldc.i4.0 - IL_0028: stloc.0 - // n = n+1 - IL_0029: ldloc.2 - IL_002a: ldc.i4.1 - IL_002b: add - IL_002c: stloc.2 - L_LOOP2: ldloc.2 - IL_002e: ldsfld int32 T::size_to_test - IL_0033: blt.s L_LOOP1 - - IL_0035: ldloc.0 - IL_0036: brfalse.s L_FAIL - - IL_0038: ldstr "pass" - IL_003d: call void [System.Console]System.Console::WriteLine(string) - ldc.i4 100 - IL_0042: br.s IL_004e - - L_FAIL: ldstr "fail" - IL_0049: call void [System.Console]System.Console::WriteLine(string) - ldc.i4.1 - IL_004e: ret - } // end of method T::Main - - .method public hidebysig static void dirtyStack() cil managed - { - // Code size 34 (0x22) - .maxstack 3 - .locals (int32* buffer, - int32 n) - IL_0000: ldc.i4.4 - IL_0001: ldsfld int32 T::size_to_test - IL_0006: mul - IL_0007: localloc - IL_0009: stloc.0 - IL_000a: ldc.i4.0 - IL_000b: stloc.1 - IL_000c: br.s IL_0019 - - IL_000e: ldloc.0 - IL_000f: ldc.i4.4 - IL_0010: ldloc.1 - IL_0011: mul - IL_0012: add - IL_0013: ldloc.1 - IL_0014: stind.i4 - IL_0015: ldloc.1 - IL_0016: ldc.i4.1 - IL_0017: add - IL_0018: stloc.1 - IL_0019: ldloc.1 - IL_001a: ldsfld int32 T::size_to_test - IL_001f: blt.s IL_000e - - IL_0021: ret - } // end of method T::dirtyStack - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method T::.ctor - -} // end of class T diff --git a/src/coreclr/tests/src/JIT/Methodical/localloc/zeroinit/zeroinit01_small.il b/src/coreclr/tests/src/JIT/Methodical/localloc/zeroinit/zeroinit01_small.il deleted file mode 100644 index 9cbe605cc075..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/localloc/zeroinit/zeroinit01_small.il +++ /dev/null @@ -1,121 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// Test zero initialization of localloc -.assembly extern legacy library mscorlib {} -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly zeroinit01{} - -.class private auto ansi beforefieldinit T - extends [mscorlib]System.Object -{ - .field public static int32 size_to_test - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - // Code size 79 (0x4f) - .maxstack 3 - .locals init(bool passed, - int32* buffer, - int32 n) - // Initialize 'passed' to true. - IL_0000: ldc.i4.1 - IL_0001: stloc.0 - - IL_0002: call void T::dirtyStack() - // localloc - IL_0007: ldc.i4.4 - IL_0008: ldc.i4.1 - IL_000d: mul - IL_000e: localloc - IL_0010: stloc.1 - // Set size of localloc - IL_0011: ldc.i4.1 - IL_0016: stsfld int32 T::size_to_test - - IL_001b: ldc.i4.0 - IL_001c: stloc.2 - IL_001d: br.s L_LOOP2 - - L_LOOP1: ldloc.1 - IL_0020: ldc.i4.4 - IL_0021: ldloc.2 - IL_0022: mul - IL_0023: add - IL_0024: ldind.i4 - IL_0025: brfalse.s IL_0029 - // Test failed. (!= zero) - IL_0027: ldc.i4.0 - IL_0028: stloc.0 - // n = n+1 - IL_0029: ldloc.2 - IL_002a: ldc.i4.1 - IL_002b: add - IL_002c: stloc.2 - L_LOOP2: ldloc.2 - IL_002e: ldsfld int32 T::size_to_test - IL_0033: blt.s L_LOOP1 - - IL_0035: ldloc.0 - IL_0036: brfalse.s L_FAIL - - IL_0038: ldstr "pass" - IL_003d: call void [System.Console]System.Console::WriteLine(string) - ldc.i4 100 - IL_0042: br.s IL_004e - - L_FAIL: ldstr "fail" - IL_0049: call void [System.Console]System.Console::WriteLine(string) - ldc.i4.1 - IL_004e: ret - } // end of method T::Main - - .method public hidebysig static void dirtyStack() cil managed - { - // Code size 34 (0x22) - .maxstack 3 - .locals (int32* buffer, - int32 n) - IL_0000: ldc.i4.4 - IL_0001: ldsfld int32 T::size_to_test - IL_0006: mul - IL_0007: localloc - IL_0009: stloc.0 - IL_000a: ldc.i4.0 - IL_000b: stloc.1 - IL_000c: br.s IL_0019 - - IL_000e: ldloc.0 - IL_000f: ldc.i4.4 - IL_0010: ldloc.1 - IL_0011: mul - IL_0012: add - IL_0013: ldloc.1 - IL_0014: stind.i4 - IL_0015: ldloc.1 - IL_0016: ldc.i4.1 - IL_0017: add - IL_0018: stloc.1 - IL_0019: ldloc.1 - IL_001a: ldsfld int32 T::size_to_test - IL_001f: blt.s IL_000e - - IL_0021: ret - } // end of method T::dirtyStack - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method T::.ctor - -} // end of class T diff --git a/src/coreclr/tests/src/JIT/Methodical/nonvirtualcall/generics.cs b/src/coreclr/tests/src/JIT/Methodical/nonvirtualcall/generics.cs deleted file mode 100644 index 91d6b9d2de4c..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/nonvirtualcall/generics.cs +++ /dev/null @@ -1,225 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.IO; -using System.Runtime.CompilerServices; - -class ApplicationException : Exception -{ - public ApplicationException(string message) : base(message) { } -} - -namespace Test -{ - public abstract class Base - { - public abstract string AbstractFinal(); - public abstract string AbstractOverrideFinal(); - public abstract string AbstractOverrideOverride(); - public abstract string AbstractOverrideNil(); - - public virtual string VirtualFinal() - { - return "Base.VirtualFinal"; - } - public virtual string VirtualNilFinal() - { - return "Base.VirtualNilFinal"; - } - public virtual string VirtualOverrideFinal() - { - return "Base.VirtualOverrideFinal"; - } - public virtual string VirtualNilOverride() - { - return "Base.VirtualNilOverride"; - } - public virtual string VirtualNilNil() - { - return "Base.VirtualNilNil"; - } - public virtual string VirtualOverrideOverride() - { - return "Base.VirtualOverrideOverride"; - } - public virtual string VirtualOverrideNil() - { - return "Base.VirtualOverrideNil"; - } - } - - public class Child : Base - { - public sealed override string AbstractFinal() - { - return "Child.AbstractFinal"; - } - public override string AbstractOverrideFinal() - { - return "Child.AbstractOverrideFinal"; - } - public override string AbstractOverrideOverride() - { - return "Child.AbstractOverrideOverride"; - } - public override string AbstractOverrideNil() - { - return "Child.AbstractOverrideNil"; - } - public sealed override string VirtualFinal() - { - return "Child.VirtualFinal"; - } - public override string VirtualOverrideFinal() - { - return "Child.VirtualOverrideFinal"; - } - public override string VirtualOverrideOverride() - { - return "Child.VirtualOverrideOverride"; - } - public override string VirtualOverrideNil() - { - return "Child.VirtualOverrideNil"; - } - - public void TestChild() - { - Console.WriteLine("Call from inside Child"); - Assert.AreEqual("Child.AbstractFinal", AbstractFinal()); - Assert.AreEqual("Child.AbstractOverrideFinal", AbstractOverrideFinal()); - Assert.AreEqual("Child.AbstractOverrideOverride", AbstractOverrideOverride()); - Assert.AreEqual("Child.AbstractOverrideNil", AbstractOverrideNil()); - Assert.AreEqual("Base.VirtualFinal", base.VirtualFinal()); - Assert.AreEqual("Child.VirtualFinal", VirtualFinal()); - Assert.AreEqual("Base.VirtualOverrideFinal", base.VirtualOverrideFinal()); - Assert.AreEqual("Child.VirtualOverrideFinal", VirtualOverrideFinal()); - Assert.AreEqual("Base.VirtualOverrideOverride", base.VirtualOverrideOverride()); - Assert.AreEqual("Child.VirtualOverrideOverride", VirtualOverrideOverride()); - Assert.AreEqual("Base.VirtualOverrideNil", base.VirtualOverrideNil()); - Assert.AreEqual("Child.VirtualOverrideNil", VirtualOverrideNil()); - } - } - - public class GrandChild : Child - { - public sealed override string AbstractOverrideFinal() - { - return "GrandChild.AbstractOverrideFinal"; - } - - public override string AbstractOverrideOverride() - { - return "GrandChild.AbstractOverrideOverride"; - } - public sealed override string VirtualNilFinal() - { - return "GrandChild.VirtualNilFinal"; - } - public sealed override string VirtualOverrideFinal() - { - return "GrandChild.VirtualOverrideFinal"; - } - public override string VirtualOverrideOverride() - { - return "GrandChild.VirtualOverrideOverride"; - } - public override string VirtualNilOverride() - { - return "GrandChild.VirtualNilOverride"; - } - - public void TestGrandChild() - { - Console.WriteLine("Call from inside GrandChild"); - Assert.AreEqual("Child.AbstractFinal", AbstractFinal()); - Assert.AreEqual("Child.AbstractOverrideFinal", base.AbstractOverrideFinal()); - Assert.AreEqual("GrandChild.AbstractOverrideFinal", AbstractOverrideFinal()); - Assert.AreEqual("Child.AbstractOverrideOverride", base.AbstractOverrideOverride()); - Assert.AreEqual("GrandChild.AbstractOverrideOverride", AbstractOverrideOverride()); - Assert.AreEqual("Child.AbstractOverrideNil", base.AbstractOverrideNil()); - Assert.AreEqual("Child.AbstractOverrideNil", AbstractOverrideNil()); - Assert.AreEqual("Child.VirtualFinal", base.VirtualFinal()); - Assert.AreEqual("Child.VirtualFinal", VirtualFinal()); - Assert.AreEqual("Child.VirtualOverrideFinal", base.VirtualOverrideFinal()); - Assert.AreEqual("GrandChild.VirtualOverrideFinal", VirtualOverrideFinal()); - Assert.AreEqual("Child.VirtualOverrideOverride", base.VirtualOverrideOverride()); - Assert.AreEqual("GrandChild.VirtualOverrideOverride", VirtualOverrideOverride()); - Assert.AreEqual("Child.VirtualOverrideNil", base.VirtualOverrideNil()); - Assert.AreEqual("Child.VirtualOverrideNil", VirtualOverrideNil()); - } - } - - public sealed class SealedGrandChild : GrandChild - { } - - public static class Program - { - public static void CallSealedGrandChild() - { - Console.WriteLine("Call SealedGrandChild from outside"); - // Calling methods of a sealed class from outside - SealedGrandChild o = new SealedGrandChild(); - Assert.AreEqual("Child.AbstractFinal", o.AbstractFinal()); - Assert.AreEqual("GrandChild.AbstractOverrideFinal", o.AbstractOverrideFinal()); - Assert.AreEqual("GrandChild.AbstractOverrideOverride", o.AbstractOverrideOverride()); - Assert.AreEqual("Child.AbstractOverrideNil", o.AbstractOverrideNil()); - Assert.AreEqual("Child.VirtualFinal", o.VirtualFinal()); - Assert.AreEqual("GrandChild.VirtualNilFinal", o.VirtualNilFinal()); - Assert.AreEqual("GrandChild.VirtualOverrideFinal", o.VirtualOverrideFinal()); - Assert.AreEqual("GrandChild.VirtualNilOverride", o.VirtualNilOverride()); - Assert.AreEqual("Base.VirtualNilNil", o.VirtualNilNil()); - Assert.AreEqual("GrandChild.VirtualOverrideOverride", o.VirtualOverrideOverride()); - Assert.AreEqual("Child.VirtualOverrideNil", o.VirtualOverrideNil()); - } - - public static void CallFromInsideChild() - { - Child child = new Child(); - child.TestChild(); - } - - public static void CallFromInsideGrandChild() - { - GrandChild child = new GrandChild(); - child.TestGrandChild(); - } - - public static int Main(string[] args) - { - try - { - CallSealedGrandChild(); - CallFromInsideChild(); - CallFromInsideGrandChild(); - - Console.WriteLine("Test SUCCESS"); - return 100; - } - catch (Exception ex) - { - Console.WriteLine(ex); - Console.WriteLine("Test FAILED"); - return 101; - } - } - } - - public static class Assert - { - public static void AreEqual(string left, string right) - { - if (String.IsNullOrEmpty(left)) - throw new ArgumentNullException("left"); - if (string.IsNullOrEmpty(right)) - throw new ArgumentNullException("right"); - if (left != right) - { - string message = String.Format("[[{0}]] != [[{1}]]", left, right); - throw new ApplicationException(message); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/Methodical/nonvirtualcall/tailcall.il b/src/coreclr/tests/src/JIT/Methodical/nonvirtualcall/tailcall.il deleted file mode 100644 index 005c7a6ed63b..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/nonvirtualcall/tailcall.il +++ /dev/null @@ -1,713 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - -.assembly extern System.Console { auto } -// Metadata version: v2.0.50509 -.assembly extern mscorlib { auto } - -.assembly tailcall -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module nonvirtualcalls_tailcall.exe -// MVID: {EC3860F1-6469-489C-86D2-A81D88AE196E} -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x000000001AB30000 - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class public abstract auto ansi beforefieldinit Test.Base - extends [mscorlib]System.Object -{ - .method public hidebysig newslot abstract virtual - instance string AbstractFinal() cil managed - { - } // end of method Base::AbstractFinal - - .method public hidebysig newslot abstract virtual - instance string AbstractOverrideFinal() cil managed - { - } // end of method Base::AbstractOverrideFinal - - .method public hidebysig newslot abstract virtual - instance string AbstractOverrideOverride() cil managed - { - } // end of method Base::AbstractOverrideOverride - - .method public hidebysig newslot abstract virtual - instance string AbstractOverrideNil() cil managed - { - } // end of method Base::AbstractOverrideNil - - .method public hidebysig newslot virtual - instance string VirtualFinal() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "Base.VirtualFinal" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method Base::VirtualFinal - - .method public hidebysig newslot virtual - instance string VirtualNilFinal() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "Base.VirtualNilFinal" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method Base::VirtualNilFinal - - .method public hidebysig newslot virtual - instance string VirtualOverrideFinal() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "Base.VirtualOverrideFinal" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method Base::VirtualOverrideFinal - - .method public hidebysig newslot virtual - instance string VirtualNilOverride() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "Base.VirtualNilOverride" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method Base::VirtualNilOverride - - .method public hidebysig newslot virtual - instance string VirtualNilNil() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "Base.VirtualNilNil" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method Base::VirtualNilNil - - .method public hidebysig newslot virtual - instance string VirtualOverrideOverride() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "Base.VirtualOverrideOverride" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method Base::VirtualOverrideOverride - - .method public hidebysig newslot virtual - instance string VirtualOverrideNil() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "Base.VirtualOverrideNil" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method Base::VirtualOverrideNil - - .method family hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method Base::.ctor - -} // end of class Test.Base - -.class public auto ansi beforefieldinit Test.Child - extends Test.Base -{ - .method public hidebysig virtual final - instance string AbstractFinal() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "Child.AbstractFinal" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method Child::AbstractFinal - - .method public hidebysig instance string - CallAbstractFinal() cil managed - { - // Code size 12 (0xc) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: tail. call instance string Test.Child::AbstractFinal() - IL_000b: ret - } // end of method Child::CallAbstractFinal - - .method public hidebysig virtual instance string - AbstractOverrideFinal() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "Child.AbstractOverrideFinal" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method Child::AbstractOverrideFinal - - .method public hidebysig virtual instance string - AbstractOverrideOverride() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "Child.AbstractOverrideOverride" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method Child::AbstractOverrideOverride - - .method public hidebysig virtual instance string - AbstractOverrideNil() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "Child.AbstractOverrideNil" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method Child::AbstractOverrideNil - - .method public hidebysig instance string - CallAbstractOverrideNil() cil managed - { - // Code size 12 (0xc) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: tail. call instance string Test.Child::AbstractOverrideNil() - IL_000b: ret - } // end of method Child::CallAbstractOverrideNil - - .method public hidebysig virtual final - instance string VirtualFinal() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "Child.VirtualFinal" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method Child::VirtualFinal - - .method public hidebysig instance string - CallVirtualFinal() cil managed - { - // Code size 12 (0xc) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: tail. call instance string Test.Child::VirtualFinal() - IL_000b: ret - } // end of method Child::tail. callualFinal - - .method public hidebysig virtual instance string - VirtualOverrideFinal() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "Child.VirtualOverrideFinal" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method Child::VirtualOverrideFinal - - .method public hidebysig virtual instance string - VirtualOverrideOverride() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "Child.VirtualOverrideOverride" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method Child::VirtualOverrideOverride - - .method public hidebysig virtual instance string - VirtualOverrideNil() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "Child.VirtualOverrideNil" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method Child::VirtualOverrideNil - - .method public hidebysig instance string - CallVirtualOverrideNil() cil managed - { - // Code size 12 (0xc) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: tail. call instance string Test.Child::VirtualOverrideNil() - IL_000b: ret - } // end of method Child::tail. callualOverrideNil - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void Test.Base::.ctor() - IL_0006: ret - } // end of method Child::.ctor - -} // end of class Test.Child - -.class public auto ansi beforefieldinit Test.GrandChild - extends Test.Child -{ - .method public hidebysig virtual final - instance string AbstractOverrideFinal() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "GrandChild.AbstractOverrideFinal" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method GrandChild::AbstractOverrideFinal - - .method public hidebysig instance string - CallAbstractOverrideFinal() cil managed - { - // Code size 12 (0xc) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: tail. call instance string Test.GrandChild::AbstractOverrideFinal() - IL_000b: ret - } // end of method GrandChild::CallAbstractOverrideFinal - - .method public hidebysig virtual instance string - AbstractOverrideOverride() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "GrandChild.AbstractOverrideOverride" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method GrandChild::AbstractOverrideOverride - - .method public hidebysig instance string - CallAbstractOverrideOverride() cil managed - { - // Code size 12 (0xc) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: tail. call instance string Test.GrandChild::AbstractOverrideOverride() - IL_000b: ret - } // end of method GrandChild::CallAbstractOverrideOverride - - .method public hidebysig virtual final - instance string VirtualNilFinal() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "GrandChild.VirtualNilFinal" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method GrandChild::VirtualNilFinal - - .method public hidebysig instance string - CallVirtualNilFinal() cil managed - { - // Code size 12 (0xc) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: tail. call instance string Test.GrandChild::VirtualNilFinal() - IL_000b: ret - } // end of method GrandChild::tail. callualNilFinal - - .method public hidebysig virtual final - instance string VirtualOverrideFinal() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "GrandChild.VirtualOverrideFinal" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method GrandChild::VirtualOverrideFinal - - .method public hidebysig instance string - CallVirtualOverrideFinal() cil managed - { - // Code size 12 (0xc) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: tail. call instance string Test.GrandChild::VirtualOverrideFinal() - IL_000b: ret - } // end of method GrandChild::tail. callualOverrideFinal - - .method public hidebysig virtual instance string - VirtualOverrideOverride() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "GrandChild.VirtualOverrideOverride" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method GrandChild::VirtualOverrideOverride - - .method public hidebysig instance string - CallVirtualOverrideOverride() cil managed - { - // Code size 12 (0xc) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: tail. call instance string Test.GrandChild::VirtualOverrideOverride() - IL_000b: ret - } // end of method GrandChild::tail. callualOverrideOverride - - .method public hidebysig virtual instance string - VirtualNilOverride() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "GrandChild.VirtualNilOverride" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method GrandChild::VirtualNilOverride - - .method public hidebysig instance string - CallVirtualNilOverride() cil managed - { - // Code size 12 (0xc) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: tail. call instance string Test.GrandChild::VirtualNilOverride() - IL_000b: ret - } // end of method GrandChild::tail. callualNilOverride - - .method public hidebysig instance void - TestGrandChild() cil managed - { - // Code size 149 (0x95) - .maxstack 2 - IL_0000: nop - IL_0001: ldstr "Call from inside GrandChild" - IL_0006: call void [System.Console]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldstr "Child.AbstractFinal" - IL_0011: ldarg.0 - IL_0012: call instance string Test.Child::CallAbstractFinal() - IL_0017: call void Test.Assert::AreEqual(string, - string) - IL_001c: nop - IL_001d: ldstr "GrandChild.AbstractOverrideFinal" - IL_0022: ldarg.0 - IL_0023: call instance string Test.GrandChild::CallAbstractOverrideFinal() - IL_0028: call void Test.Assert::AreEqual(string, - string) - IL_002d: nop - IL_002e: ldstr "GrandChild.AbstractOverrideOverride" - IL_0033: ldarg.0 - IL_0034: call instance string Test.GrandChild::CallAbstractOverrideOverride() - IL_0039: call void Test.Assert::AreEqual(string, - string) - IL_003e: nop - IL_003f: ldstr "Child.AbstractOverrideNil" - IL_0044: ldarg.0 - IL_0045: call instance string Test.Child::CallAbstractOverrideNil() - IL_004a: call void Test.Assert::AreEqual(string, - string) - IL_004f: nop - IL_0050: ldstr "Child.VirtualFinal" - IL_0055: ldarg.0 - IL_0056: call instance string Test.Child::CallVirtualFinal() - IL_005b: call void Test.Assert::AreEqual(string, - string) - IL_0060: nop - IL_0061: ldstr "GrandChild.VirtualOverrideFinal" - IL_0066: ldarg.0 - IL_0067: call instance string Test.GrandChild::CallVirtualOverrideFinal() - IL_006c: call void Test.Assert::AreEqual(string, - string) - IL_0071: nop - IL_0072: ldstr "GrandChild.VirtualOverrideOverride" - IL_0077: ldarg.0 - IL_0078: call instance string Test.GrandChild::CallVirtualOverrideOverride() - IL_007d: call void Test.Assert::AreEqual(string, - string) - IL_0082: nop - IL_0083: ldstr "Child.VirtualOverrideNil" - IL_0088: ldarg.0 - IL_0089: call instance string Test.Child::CallVirtualOverrideNil() - IL_008e: call void Test.Assert::AreEqual(string, - string) - IL_0093: nop - IL_0094: ret - } // end of method GrandChild::TestGrandChild - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void Test.Child::.ctor() - IL_0006: ret - } // end of method GrandChild::.ctor - -} // end of class Test.GrandChild - -.class public abstract auto ansi sealed beforefieldinit Test.Program - extends [mscorlib]System.Object -{ - .method public hidebysig static void CallFromInsideGrandChild() cil managed - { - // Code size 15 (0xf) - .maxstack 1 - .locals init (class Test.GrandChild V_0) - IL_0000: nop - IL_0001: newobj instance void Test.GrandChild::.ctor() - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: tail. call instance void Test.GrandChild::TestGrandChild() - IL_000e: ret - } // end of method Program::CallFromInsideGrandChild - - .method public hidebysig static int32 Main(string[] args) cil managed - { - .entrypoint - // Code size 52 (0x34) - .maxstack 1 - .locals init (class [mscorlib]System.Exception V_0, - int32 V_1) - IL_0000: nop - .try - { - IL_0001: nop - IL_0002: call void Test.Program::CallFromInsideGrandChild() - IL_0007: nop - IL_0008: ldstr "Test SUCCESS" - IL_000d: call void [System.Console]System.Console::WriteLine(string) - IL_0012: nop - IL_0013: ldc.i4.s 100 - IL_0015: stloc.1 - IL_0016: leave.s IL_0031 - - } // end .try - catch [mscorlib]System.Exception - { - IL_0018: stloc.0 - IL_0019: nop - IL_001a: ldloc.0 - IL_001b: call void [System.Console]System.Console::WriteLine(object) - IL_0020: nop - IL_0021: ldstr "Test FAILED" - IL_0026: call void [System.Console]System.Console::WriteLine(string) - IL_002b: nop - IL_002c: ldc.i4.s 101 - IL_002e: stloc.1 - IL_002f: leave.s IL_0031 - - } // end handler - IL_0031: nop - IL_0032: ldloc.1 - IL_0033: ret - } // end of method Program::Main - -} // end of class Test.Program - -.class public abstract auto ansi sealed beforefieldinit Test.Assert - extends [mscorlib]System.Object -{ - .method public hidebysig static void AreEqual(string left, - string right) cil managed - { - // Code size 85 (0x55) - .maxstack 3 - .locals init (string V_0, - bool V_1) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: call bool [mscorlib]System.String::IsNullOrEmpty(string) - IL_0007: ldc.i4.0 - IL_0008: ceq - IL_000a: stloc.1 - IL_000b: ldloc.1 - IL_000c: brtrue.s IL_0019 - - IL_000e: ldstr "left" - IL_0013: newobj instance void [mscorlib]System.ArgumentNullException::.ctor(string) - IL_0018: throw - - IL_0019: ldarg.1 - IL_001a: call bool [mscorlib]System.String::IsNullOrEmpty(string) - IL_001f: ldc.i4.0 - IL_0020: ceq - IL_0022: stloc.1 - IL_0023: ldloc.1 - IL_0024: brtrue.s IL_0031 - - IL_0026: ldstr "right" - IL_002b: newobj instance void [mscorlib]System.ArgumentNullException::.ctor(string) - IL_0030: throw - - IL_0031: ldarg.0 - IL_0032: ldarg.1 - IL_0033: call bool [mscorlib]System.String::op_Inequality(string, - string) - IL_0038: ldc.i4.0 - IL_0039: ceq - IL_003b: stloc.1 - IL_003c: ldloc.1 - IL_003d: brtrue.s IL_0054 - - IL_003f: nop - IL_0040: ldstr "[[{0}]] != [[{1}]]" - IL_0045: ldarg.0 - IL_0046: ldarg.1 - IL_0047: call string [mscorlib]System.String::Format(string, - object, - object) - IL_004c: stloc.0 - IL_004d: ldloc.0 - IL_004e: newobj instance void [mscorlib]System.Exception::.ctor(string) - IL_0053: throw - - IL_0054: ret - } // end of method Assert::AreEqual - -} // end of class Test.Assert - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file nonvirtualcalls_tailcall.res diff --git a/src/coreclr/tests/src/JIT/Methodical/refany/lcs.cs b/src/coreclr/tests/src/JIT/Methodical/refany/lcs.cs deleted file mode 100644 index 2c5e0e248df5..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/refany/lcs.cs +++ /dev/null @@ -1,137 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -namespace JitTest -{ - internal class LCS - { - private const int RANK = 4; - - private static String buildLCS( /*int[,,,]*/TypedReference _b, - /*char[]*/ TypedReference _X, - /*int[]*/ TypedReference _ind) - { - int _i = 0; - for (TypedReference i = __makeref(_i); - __refvalue(i, int) < RANK; _i++) - if (__refvalue(_ind, int[])[__refvalue(i, int)] == 0) return ""; - - int L = __refvalue(_b, int[,,,])[ - __refvalue(_ind, int[])[0], - __refvalue(_ind, int[])[1], - __refvalue(_ind, int[])[2], - __refvalue(_ind, int[])[3]]; - - if (L == RANK) - { - _i = 0; - for (TypedReference i = __makeref(_i); - __refvalue(i, int) < RANK; _i++) - __refvalue(_ind, int[])[__refvalue(i, int)]--; - int idx = __refvalue(_ind, int[])[0]; - return buildLCS(_b, _X, _ind) + __refvalue(_X, char[])[idx]; - } - if (L >= 0 && L < RANK) - { - __refvalue(_ind, int[])[L]--; - return buildLCS(_b, _X, _ind); - } - throw new Exception(); - } - - private static void findLCS( /*int[,,,]*/ TypedReference _c, - /*int[,,,]*/ TypedReference _b, - /*char[][]*/ TypedReference _seq, - /*int[]*/ TypedReference _len) - { - int[] ind = new int[RANK]; - for (ind[0] = 1; ind[0] < __refvalue(_len, int[])[0]; ind[0]++) - { - for (ind[1] = 1; ind[1] < __refvalue(_len, int[])[1]; ind[1]++) - { - for (ind[2] = 1; ind[2] < __refvalue(_len, int[])[2]; ind[2]++) - { - for (ind[3] = 1; ind[3] < __refvalue(_len, int[])[3]; ind[3]++) - { - bool eqFlag = true; - for (int i = 1; i < RANK; i++) - { - if (__refvalue(_seq, char[][])[i][ind[i] - 1] != - __refvalue(_seq, char[][])[i - 1][ind[i - 1] - 1]) - { - eqFlag = false; - break; - } - } - - if (eqFlag) - { - __refvalue(_c, int[,,,])[ind[0], ind[1], ind[2], ind[3]] = - __refvalue(_c, int[,,,])[ind[0] - 1, ind[1] - 1, ind[2] - 1, ind[3] - 1] + 1; - __refvalue(_b, int[,,,])[ind[0], ind[1], ind[2], ind[3]] = RANK; - continue; - } - - int R = -1; - int M = -1; - for (int i = 0; i < RANK; i++) - { - ind[i]--; - if (__refvalue(_c, int[,,,])[ind[0], ind[1], ind[2], ind[3]] > M) - { - R = i; - M = __refvalue(_c, int[,,,])[ind[0], ind[1], ind[2], ind[3]]; - } - ind[i]++; - } - if (R < 0 || M < 0) - throw new Exception(); - - __refvalue(_c, int[,,,])[ind[0], ind[1], ind[2], ind[3]] = M; - __refvalue(_b, int[,,,])[ind[0], ind[1], ind[2], ind[3]] = R; - } - } - } - } - } - - private static int Main() - { - String[] str = new String[RANK] { - "The Sun has left", - "his blackness and", - "has found a fresher", - "morning and the fair Moon" - }; - - int[] len = new int[RANK]; - char[][] seq = new char[RANK][]; - for (int i = 0; i < RANK; i++) - { - len[i] = str[i].Length + 1; - seq[i] = str[i].ToCharArray(); - } - - int[,,,] c = new int[len[0], len[1], len[2], len[3]]; - int[,,,] b = new int[len[0], len[1], len[2], len[3]]; - - findLCS(__makeref(c), __makeref(b), __makeref(seq), __makeref(len)); - - for (int i = 0; i < RANK; i++) - len[i]--; - - String s = buildLCS(__makeref(b), __makeref(seq[0]), __makeref(len)); - if (" n a" == s) - { - return 100; - } - else - { - return 1; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/Methodical/stringintern/test1.cs b/src/coreclr/tests/src/JIT/Methodical/stringintern/test1.cs deleted file mode 100644 index e7160442e00c..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/stringintern/test1.cs +++ /dev/null @@ -1,216 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// ==, != - -using System; -using System.Runtime.CompilerServices; - -class Test1 -{ - public static string teststr1 = "static \uC09C\u7B8B field"; - public static string[] teststr2 = new string[] { "\u3F2Aarray element 0", "array element 1\uCB53", "array \u47BBelement 2" }; - [MethodImplAttribute(MethodImplOptions.NoInlining)] - public static string teststr3() - { - return @"method return\\"; - } - public const string teststr4 = "const string\""; // special case - public static string teststr5 = String.Empty; // special case - - public static bool TestSameObjRef() - { - Console.WriteLine(); - Console.WriteLine("When NGEN'ed, two strings in different modules have different object reference"); - Console.WriteLine("When NGEN'ed, two strings in the same module have same object reference"); - Console.WriteLine("When JIT'ed, two strings always have same object reference"); - Console.WriteLine(); - Console.WriteLine("Testing SameObjRef"); - - bool passed = true; - - if ((object)teststr1 != (object)C.teststr1) - { - Console.WriteLine("(object)teststr1 == (object)C.teststr1 is expected. FAILED"); - passed = false; - } - - if ((object)teststr2[0] != (object)C.teststr2[0]) - { - Console.WriteLine("(object)teststr2[0] == (object)C.teststr2[0] is expected. FAILED"); - passed = false; - } - - if (!Object.ReferenceEquals((object)teststr3(), (object)C.teststr3())) - { - Console.WriteLine("Object.ReferenceEquals((object)teststr3(), (object)C.teststr3()) is expected. FAILED"); - passed = false; - } - - if ((object)teststr4 != (object)C.teststr4) - { - Console.WriteLine("(object)teststr4 == (object)C.teststr4 is expected. FAILED"); - passed = false; - } - - if ((object)teststr5 != (object)C.teststr5) - { - Console.WriteLine("(object)teststr5 == (object)C.teststr5 is expected. FAILED"); - passed = false; - } - - if ((object)teststr1 == (object)GenC.teststr1) - { - Console.WriteLine("(object)teststr1 == (object)GenC.teststr1 is not expected. FAILED"); - passed = false; - } - - if ((object)teststr2[0] == (object)GenC.teststr2[0]) - { - Console.WriteLine("(object)teststr2[0] == (object)GenC.teststr2[0] is not expected. FAILED"); - passed = false; - } - - if ((object)teststr3() == (object)GenC.teststr3()) - { - Console.WriteLine("(object)teststr3() == (object)GenC.teststr3() is not expected. FAILED"); - passed = false; - } - - if (Object.ReferenceEquals((object)teststr4, (object)GenC.teststr4)) - { - Console.WriteLine("Object.ReferenceEquals((object)teststr4, (object)GenC.teststr4) is not expected. FAILED"); - passed = false; - } - - if ((object)teststr5 != (object)GenC.teststr5) - { - Console.WriteLine("(object)teststr5 != (object)GenC.teststr5 is not expected. FAILED"); - passed = false; - } - - return passed; - } - - public static bool TestDiffObjRef() - { - Console.WriteLine(); - Console.WriteLine("When NGEN'ed, two strings in different modules have different object reference"); - Console.WriteLine("When NGEN'ed, two strings in the same module have same object reference"); - Console.WriteLine("When JIT'ed, two strings always have same object reference"); - Console.WriteLine(); - Console.WriteLine("Testing DiffObjRef"); - - bool passed = true; - - if ((object)teststr1 == (object)C.teststr1) - { - Console.WriteLine("(object)teststr1 == (object)C.teststr1 is not expected. FAILED"); - passed = false; - } - - if ((object)teststr2[0] == (object)C.teststr2[0]) - { - Console.WriteLine("(object)teststr2[0] == (object)C.teststr2[0] is not expected. FAILED"); - passed = false; - } - - if (Object.ReferenceEquals((object)teststr3(), (object)C.teststr3())) - { - Console.WriteLine("(object)teststr3() == (object)C.teststr3() is not expected. FAILED"); - passed = false; - } - - // Special case for const literal teststr4 - // two consecutive LDSTR is emitted by C# compiler for the following statement - // as a result, both are interned in the same module and object comparison returns true - if ((object)teststr4 != (object)C.teststr4) - { - Console.WriteLine("(object)teststr4 != (object)C.teststr4 is not expected. FAILED"); - passed = false; - } - - // Special case for String.Empty - // String.Empty is loaded using LDSFLD, rather than LDSTR in any module - // as a result, it is always the same reference to [mscorlib]System.String::Empty, - // and object comparison return true - if ((object)teststr5 != (object)C.teststr5) - { - Console.WriteLine("(object)teststr5 != (object)C.teststr5 is not expected. FAILED"); - passed = false; - } - - if ((object)"GenC static \uC09C\u7B8B field" == (object)GenC.teststr1) - { - Console.WriteLine("(object)\"GenC static \uC09C\u7B8B field\" == (object)GenC.teststr1 is not expected. FAILED"); - passed = false; - } - - if ((object)"GenC \u3F2Aarray element 0" == (object)GenC.teststr2[0]) - { - Console.WriteLine("(object)\"GenC \u3F2Aarray element 0\" == (object)GenC.teststr2[0] is not expected. FAILED"); - passed = false; - } - - if ((object)@"GenC method return\\" == (object)GenC.teststr3()) - { - Console.WriteLine("(object)\"GenC method return\\\" == (object)GenC.teststr3() is not expected. FAILED"); - passed = false; - } - - // Special case for const literal teststr4 - // two consecutive LDSTR is emitted by C# compiler for the following statement - // as a result, both are interned in the same module and object comparison returns true - if (!Object.ReferenceEquals((object)"GenC const string\"", (object)GenC.teststr4)) - { - Console.WriteLine("(object)\"GenC const string\"\" != (object)GenC.teststr4 is not expected. FAILED"); - passed = false; - } - - // Special case for String.Empty - // String.Empty is loaded using LDSFLD, rather than LDSTR in any module - // as a result, it is always the same reference to [mscorlib]System.String::Empty, - // and object comparison return true - if ((object)teststr5 != (object)GenC.teststr5) - { - Console.WriteLine("(object)teststr5 != (object)GenC.teststr5 is not expected. FAILED"); - passed = false; - } - - return passed; - } - - public static int Main(string[] args) - { - bool passed = false; - - if ((args.Length < 1) || (args[0].ToUpper() == "SAMEOBJREF")) - passed = TestSameObjRef(); - else if (args[0].ToUpper() == "DIFFOBJREF") - passed = TestDiffObjRef(); - else - { - Console.WriteLine("Usage: Test1.exe [SameObjRef|DiffObjRef]"); - Console.WriteLine(); - Console.WriteLine("When NGEN'ed, two strings in different modules have different object reference"); - Console.WriteLine("When NGEN'ed, two strings in the same module have same object reference"); - Console.WriteLine("When JIT'ed, two strings always have same object reference"); - Console.WriteLine(); - return 9; - } - - Console.WriteLine(); - if (passed) - { - Console.WriteLine("PASSED"); - return 100; - } - else - { - Console.WriteLine("FAILED"); - return 1; - } - - } -} diff --git a/src/coreclr/tests/src/JIT/Methodical/stringintern/test2.cs b/src/coreclr/tests/src/JIT/Methodical/stringintern/test2.cs deleted file mode 100644 index d89f5a575c09..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/stringintern/test2.cs +++ /dev/null @@ -1,257 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// switch, for - -using System; -using System.Runtime.CompilerServices; - -class Test2 -{ - public static string[] teststr2 = new string[] { "\u3F2Aarray element 0", "array element 1\uCB53", "array \u47BBelement 2" }; - - public static bool TestSameObjRef() - { - Console.WriteLine(); - Console.WriteLine("When NGEN'ed, two strings in different modules have different object reference"); - Console.WriteLine("When NGEN'ed, two strings in the same module have same object reference"); - Console.WriteLine("When JIT'ed, two strings always have same object reference"); - Console.WriteLine(); - Console.WriteLine("Testing SameObjRef"); - - bool passed = true; - - switch (C.teststr1) - { - case "static \uC09C\u7B8B field": - switch (GenC.teststr2[0]) - { - case "\u3F2Aarray element 0": - passed = false; - break; - default: - break; - } - break; - - default: - passed = false; - break; - } - - switch (C.teststr3()) - { - case @"method return\\": - switch (GenC.teststr5) - { - case "": - switch (C.teststr3()) - { - case @"method return\\": - break; - default: - passed = false; - break; - } - break; - default: - passed = false; - break; - } - break; - default: - passed = false; - break; - } - - int i; - for (i = 1; (i < teststr2.Length) && (object)C.teststr2[i] == (object)teststr2[i]; i++) - ; - if (i != teststr2.Length) - { - Console.WriteLine("for, (object)C.teststr2[i]==(object)teststr2[i] is not expected, FAILED"); - passed = false; - } - - switch (GenC.teststr1) - { - case "static \uC09C\u7B8B field": - passed = false; - break; - default: - switch (GenC.teststr2[0]) - { - case "GenC \u3F2Aarray element 0": - break; - default: - passed = false; - break; - } - break; - } - - switch (GenC.teststr3()) - { - case @"GenC method return\\": - switch (GenC.teststr4) - { - case "GenC const string\"": - break; - default: - passed = false; - break; - } - break; - default: - passed = false; - break; - } - - for (i = 1; (i < teststr2.Length) && (object)GenC.teststr2[i] != (object)C.teststr2[i]; i++) - ; - if (i != teststr2.Length) - { - Console.WriteLine("for, (object)GenC.teststr2[i]!=(object)C.teststr2[i] is not expected, FAILED"); - passed = false; - } - - return passed; - } - - public static bool TestDiffObjRef() - { - Console.WriteLine(); - Console.WriteLine("When NGEN'ed, two strings in different modules have different object reference"); - Console.WriteLine("When NGEN'ed, two strings in the same module have same object reference"); - Console.WriteLine("When JIT'ed, two strings always have same object reference"); - Console.WriteLine(); - Console.WriteLine("Testing DiffObjRef"); - - bool passed = true; - - switch (C.teststr1) - { - case "static \uC09C\u7B8B field": - switch (C.teststr2[0]) - { - case "\u3F2Aarray element 0": - break; - default: - passed = false; - break; - } - break; - - default: - passed = false; - break; - } - - switch (C.teststr3()) - { - case @"method return\\": - switch (GenC.teststr5) - { - case "": - switch (C.teststr3()) - { - case @"method return\\": - break; - default: - passed = false; - break; - } - break; - default: - passed = false; - break; - } - break; - default: - passed = false; - break; - } - - for (int i = 1; (i < teststr2.Length) && (object)C.teststr2[i] == (object)teststr2[i]; i++) - { - Console.WriteLine("for, (object)C.teststr2[i]==(object)teststr2[i] is not expected, FAILED"); - passed = false; - } - - switch (GenC.teststr1) - { - case "static \uC09C\u7B8B field": - passed = false; - break; - default: - switch (GenC.teststr2[0]) - { - case "GenC \u3F2Aarray element 0": - break; - default: - passed = false; - break; - } - break; - } - - switch (GenC.teststr3()) - { - case @"GenC method return\\": - switch (GenC.teststr4) - { - case "GenC const string\"": - break; - default: - passed = false; - break; - } - break; - default: - passed = false; - break; - } - - for (int i = 1; (i < teststr2.Length) && (object)GenC.teststr2[i] == (object)"GenC array element 1\uCB53"; i++) - { - Console.WriteLine("for, (object)GenC.teststr2[i]==(object)C.teststr2[i] is not expected, FAILED"); - passed = false; - } - - return passed; - } - - public static int Main(string[] args) - { - bool passed = false; - - if ((args.Length < 1) || (args[0].ToUpper() == "SAMEOBJREF")) - passed = TestSameObjRef(); - else if (args[0].ToUpper() == "DIFFOBJREF") - passed = TestDiffObjRef(); - else - { - Console.WriteLine("Usage: Test2.exe [SameObjRef|DiffObjRef]"); - Console.WriteLine(); - Console.WriteLine("When NGEN'ed, two strings in different modules have different object reference"); - Console.WriteLine("When NGEN'ed, two strings in the same module have same object reference"); - Console.WriteLine("When JIT'ed, two strings always have same object reference"); - Console.WriteLine(); - return 9; - } - - Console.WriteLine(); - if (passed) - { - Console.WriteLine("PASSED"); - return 100; - } - else - { - Console.WriteLine("FAILED"); - return 1; - } - - } -} diff --git a/src/coreclr/tests/src/JIT/Methodical/unsafecsharp/main.cs b/src/coreclr/tests/src/JIT/Methodical/unsafecsharp/main.cs deleted file mode 100644 index 180277b161e3..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/unsafecsharp/main.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -public struct A -{ - public long m_aval; -}; - -public struct B -{ - public long m_bval; -}; - -public struct AA -{ - public A m_a; - public B m_b; - - public AA(long a, long b) - { - m_a.m_aval = a; - m_b.m_bval = b; - } - - public static unsafe void init_all(long mode) - { - s_x = new AA(0, 100); - } - - public static AA s_x; - - public unsafe static B* get_pb(AA* px) { return &px->m_b; } - public unsafe static B* get_pb_1(AA* px) { return &px->m_b - 1; } - public unsafe static long get_pb_i(AA* px) { return (long)&px->m_b; } - public unsafe static long get_bv1(B* pb) { return pb->m_bval; } - public unsafe static long get_bv2(B b) { return b.m_bval; } - public unsafe static long get_bv3(ref B rb) { return rb.m_bval; } - public unsafe static long get_i1(long* pi) { return *pi; } - public unsafe static long get_i2(long i) { return i; } - public unsafe static long get_i3(ref long ri) { return ri; } -} diff --git a/src/coreclr/tests/src/JIT/Methodical/xxobj/operand/localloc.il b/src/coreclr/tests/src/JIT/Methodical/xxobj/operand/localloc.il deleted file mode 100644 index cfe6b7cbdb9b..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/xxobj/operand/localloc.il +++ /dev/null @@ -1,218 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly extern mscorlib { } -.assembly 'localloc' { -} -.namespace JitTest -{ - .class private sequential ansi sealed beforefieldinit Test - extends [mscorlib]System.ValueType - { - .field private int32 m_v - .method private hidebysig static int32 - localloc_ldobj() cil managed - { - .maxstack 8 - .locals (native int ptr, value class JitTest.Test elem, int32 dummy) - sizeof int32 - localloc - ldobj int32 - stloc.s dummy - - ldloca.s elem - initobj JitTest.Test - - sizeof JitTest.Test - ldc.i4.2 - mul - localloc - sizeof JitTest.Test - ldc.i4.2 - div - add - stloc.s ptr - - ldloc.s ptr - ldc.i4 1234 - unaligned. 1 - stfld int32 JitTest.Test::m_v - - ldloc.s ptr - unaligned. 1 - ldobj JitTest.Test - - stloc.s elem - ldloca.s elem - ldfld int32 JitTest.Test::m_v - ldc.i4 1234 - sub - ret - } - .method private hidebysig static int32 - localloc_initobj() cil managed - { - .maxstack 8 - .locals (native int ptr, value class JitTest.Test elem, int32 dummy) - sizeof JitTest.Test - localloc - initobj JitTest.Test - - sizeof JitTest.Test - localloc - dup - initobj JitTest.Test - ldfld int32 JitTest.Test::m_v - dup - brtrue RET - pop - - sizeof JitTest.Test - ldc.i4.2 - mul - localloc - sizeof JitTest.Test - ldc.i4.2 - div - add - - dup - unaligned. 1 - initobj JitTest.Test - unaligned. 1 - ldfld int32 JitTest.Test::m_v - - RET: - ret - } - - .method private hidebysig static int32 - localloc_cpobj() cil managed - { - .maxstack 8 - .locals (native int ptr, value class JitTest.Test elem, int32 dummy) - sizeof int32 - localloc - ldobj int32 - stloc.s dummy - - ldloca.s elem - initobj JitTest.Test - - sizeof JitTest.Test - ldc.i4.2 - mul - localloc - sizeof JitTest.Test - ldc.i4.2 - div - add - stloc.s ptr - - ldloc.s ptr - ldc.i4 1234 - unaligned. 1 - stfld int32 JitTest.Test::m_v - - ldloca.s elem - ldloc.s ptr - unaligned. 1 - cpobj JitTest.Test - - ldloca.s elem - ldfld int32 JitTest.Test::m_v - ldc.i4 1234 - sub - ret - } - - .method private hidebysig static int32 - localloc_stobj() cil managed - { - .maxstack 8 - .locals (value class JitTest.Test[0...10] arr, value class JitTest.Test elem) - .maxstack 8 - .locals (native int ptr, value class JitTest.Test elem, int32 dummy) - sizeof int32 - localloc - ldobj int32 - stloc.s dummy - - ldloca.s elem - initobj JitTest.Test - - sizeof JitTest.Test - ldc.i4.2 - mul - localloc - sizeof JitTest.Test - ldc.i4.2 - div - add - stloc.s ptr - - ldloc.s ptr - ldc.i4 1234 - unaligned. 1 - stfld int32 JitTest.Test::m_v - - ldloc.s ptr - ldloc.s elem - unaligned. 1 - stobj JitTest.Test - - ldloca.s elem - ldfld int32 JitTest.Test::m_v - ret - } - - .method private hidebysig static int32 - Main() cil managed - { - .entrypoint - .maxstack 1 - .locals (int32 V_0) - IL_0000: call int32 JitTest.Test::localloc_ldobj() - IL_0005: brfalse.s IL_0016 - IL_0007: ldstr "localloc_ldobj() failed." - IL_000c: call void [System.Console]System.Console::WriteLine(string) - IL_0011: ldc.i4.s 101 - IL_0013: stloc.0 - IL_0014: br.s IL_0067 - IL_0016: call int32 JitTest.Test::localloc_initobj() - IL_001b: brfalse.s IL_002c - IL_001d: ldstr "localloc_initobj() failed." - IL_0022: call void [System.Console]System.Console::WriteLine(string) - IL_0027: ldc.i4.s 102 - IL_0029: stloc.0 - IL_002a: br.s IL_0067 - IL_002c: call int32 JitTest.Test::localloc_stobj() - IL_0031: brfalse.s IL_0042 - IL_0033: ldstr "localloc_stobj() failed." - IL_0038: call void [System.Console]System.Console::WriteLine(string) - IL_003d: ldc.i4.s 103 - IL_003f: stloc.0 - IL_0040: br.s IL_0067 - IL_0042: call int32 JitTest.Test::localloc_cpobj() - IL_0047: brfalse.s IL_0058 - IL_0049: ldstr "localloc_cpobj() failed." - IL_004e: call void [System.Console]System.Console::WriteLine(string) - IL_0053: ldc.i4.s 104 - IL_0055: stloc.0 - IL_0056: br.s IL_0067 - IL_0058: ldstr "All tests passed!" - IL_005d: call void [System.Console]System.Console::WriteLine(string) - IL_0062: ldc.i4.s 100 - IL_0064: stloc.0 - IL_0065: br.s IL_0067 - IL_0067: ldloc.0 - IL_0068: ret - } - } -} diff --git a/src/coreclr/tests/src/JIT/Methodical/xxobj/sizeof/_il_dbgsizeof32_Target_32Bit.ilproj b/src/coreclr/tests/src/JIT/Methodical/xxobj/sizeof/_il_dbgsizeof32_Target_32Bit.ilproj deleted file mode 100644 index 849f46eb4408..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/xxobj/sizeof/_il_dbgsizeof32_Target_32Bit.ilproj +++ /dev/null @@ -1,13 +0,0 @@ - - - Exe - true - 1 - - true - Full - - - - - diff --git a/src/coreclr/tests/src/JIT/Methodical/xxobj/sizeof/_il_dbgsizeof64.ilproj b/src/coreclr/tests/src/JIT/Methodical/xxobj/sizeof/_il_dbgsizeof64.ilproj deleted file mode 100644 index 972c489bb437..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/xxobj/sizeof/_il_dbgsizeof64.ilproj +++ /dev/null @@ -1,14 +0,0 @@ - - - Exe - true - 1 - - - Full - - - - - - diff --git a/src/coreclr/tests/src/JIT/Methodical/xxobj/sizeof/_il_dbgsizeof_Target_32Bit.ilproj b/src/coreclr/tests/src/JIT/Methodical/xxobj/sizeof/_il_dbgsizeof_Target_32Bit.ilproj deleted file mode 100644 index a86b6c326ba7..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/xxobj/sizeof/_il_dbgsizeof_Target_32Bit.ilproj +++ /dev/null @@ -1,13 +0,0 @@ - - - Exe - true - 1 - - true - Full - - - - - diff --git a/src/coreclr/tests/src/JIT/Methodical/xxobj/sizeof/_il_relsizeof32_Target_32Bit.ilproj b/src/coreclr/tests/src/JIT/Methodical/xxobj/sizeof/_il_relsizeof32_Target_32Bit.ilproj deleted file mode 100644 index 472701bf4d76..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/xxobj/sizeof/_il_relsizeof32_Target_32Bit.ilproj +++ /dev/null @@ -1,13 +0,0 @@ - - - Exe - true - 1 - - true - PdbOnly - - - - - diff --git a/src/coreclr/tests/src/JIT/Methodical/xxobj/sizeof/_il_relsizeof64_Target_32Bit.ilproj b/src/coreclr/tests/src/JIT/Methodical/xxobj/sizeof/_il_relsizeof64_Target_32Bit.ilproj deleted file mode 100644 index 0cf68852ad24..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/xxobj/sizeof/_il_relsizeof64_Target_32Bit.ilproj +++ /dev/null @@ -1,13 +0,0 @@ - - - Exe - true - 1 - - true - PdbOnly - - - - - diff --git a/src/coreclr/tests/src/JIT/Methodical/xxobj/sizeof/_il_relsizeof_Target_32Bit.ilproj b/src/coreclr/tests/src/JIT/Methodical/xxobj/sizeof/_il_relsizeof_Target_32Bit.ilproj deleted file mode 100644 index 7cd349423f11..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/xxobj/sizeof/_il_relsizeof_Target_32Bit.ilproj +++ /dev/null @@ -1,13 +0,0 @@ - - - Exe - true - 1 - - true - PdbOnly - - - - - diff --git a/src/coreclr/tests/src/JIT/Methodical/xxobj/sizeof/sizeof.il b/src/coreclr/tests/src/JIT/Methodical/xxobj/sizeof/sizeof.il deleted file mode 100644 index 09703667a9fc..000000000000 --- a/src/coreclr/tests/src/JIT/Methodical/xxobj/sizeof/sizeof.il +++ /dev/null @@ -1,146 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - -.assembly extern mscorlib { } -.assembly 'sizeof' -{ -} -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.namespace JitTest -{ - .class private sequential ansi sealed beforefieldinit SimpleStruct - extends [mscorlib]System.ValueType - { - .field private int32 m_int - .field private unsigned int32 m_uint - .field private unsigned int8 m_byte - .field private int8 m_sbyte - .field private char m_char - .field private int16 m_short - .field private unsigned int16 m_ushort - .field private int64 m_long - .field private unsigned int64 m_ulong - } - .class private sequential ansi sealed beforefieldinit ComplexStruct - extends [mscorlib]System.ValueType - { - .field private valuetype JitTest.SimpleStruct ss1 - .field private valuetype JitTest.SimpleStruct ss2 - } - .class private sequential ansi sealed beforefieldinit RefComplexStruct - extends [mscorlib]System.ValueType - { - .field private valuetype JitTest.SimpleStruct ss1 - .field private valuetype JitTest.SimpleStruct[] ssarr - .field private valuetype JitTest.SimpleStruct ss2 - } - .class private sequential ansi sealed beforefieldinit ComplexStruct2 - extends [mscorlib]System.ValueType - { - .field private valuetype JitTest.ComplexStruct x1 - .field private valuetype JitTest.ComplexStruct x2 - .field private valuetype JitTest.ComplexStruct x3 - .field private valuetype JitTest.ComplexStruct x4 - .field private valuetype JitTest.ComplexStruct x5 - .field private valuetype JitTest.ComplexStruct x6 - .field private valuetype JitTest.ComplexStruct x7 - .field private valuetype JitTest.ComplexStruct x8 - .field private valuetype JitTest.ComplexStruct x9 - .field private valuetype JitTest.ComplexStruct x10 - .field private valuetype JitTest.ComplexStruct x11 - .field private valuetype JitTest.ComplexStruct x12 - .field private valuetype JitTest.ComplexStruct x13 - .field private valuetype JitTest.ComplexStruct x14 - .field private valuetype JitTest.ComplexStruct x15 - .field private valuetype JitTest.ComplexStruct x16 - .field private valuetype JitTest.ComplexStruct x17 - .field private valuetype JitTest.ComplexStruct x18 - } - .class private sequential ansi sealed beforefieldinit RefComplexStruct2 - extends [mscorlib]System.ValueType - { - .field private valuetype JitTest.ComplexStruct2 ss1 - .field private class [mscorlib]System.AppDomain ad - .field private valuetype JitTest.ComplexStruct2 ss2 - } - .class private sequential ansi sealed beforefieldinit Test - extends [mscorlib]System.ValueType - { - .pack 1 - .size 1 - .method private hidebysig static int32 - Main() cil managed - { - .entrypoint - .maxstack 3 - .locals (int32 V_0) - IL_0000: sizeof JitTest.SimpleStruct - IL_0006: ldc.i4.s 32 - IL_0008: beq.s IL_0019 - IL_000a: ldstr "sizeof(SimpleStruct) failed." - IL_000f: call void [System.Console]System.Console::WriteLine(string) - IL_0014: ldc.i4.s 101 - IL_0016: stloc.0 - IL_0017: br EXIT - IL_0019: sizeof JitTest.ComplexStruct - IL_001f: ldc.i4.s 64 - IL_0021: beq.s IL_0032 - IL_0023: ldstr "sizeof(ComplexStruct) failed." - IL_0028: call void [System.Console]System.Console::WriteLine(string) - IL_002d: ldc.i4.s 102 - IL_002f: stloc.0 - IL_0030: br.s EXIT - IL_0032: sizeof JitTest.ComplexStruct2 - IL_0038: sizeof JitTest.ComplexStruct - IL_003e: ldc.i4.s 18 - IL_0040: mul - IL_0041: beq.s NEXT1 - IL_0043: ldstr "sizeof(ComplexStruct2) failed." - IL_0048: call void [System.Console]System.Console::WriteLine(string) - IL_004d: ldc.i4.s 103 - IL_004f: stloc.0 - IL_0050: br.s EXIT - - NEXT1: - sizeof JitTest.RefComplexStruct - ldc.i4.s 68 - beq.s NEXT2 - - ldstr "sizeof(RefComplexStruct) failed." - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.s 104 - stloc.0 - br.s EXIT - - NEXT2: - sizeof JitTest.RefComplexStruct2 - sizeof JitTest.ComplexStruct2 - ldc.i4.1 - shl - ldc.i4.4 - add - beq.s OK - - ldstr "sizeof(RefComplexStruct2) failed." - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.s 105 - stloc.0 - br.s EXIT - - OK: ldstr "sizeof passed" - IL_0057: call void [System.Console]System.Console::WriteLine(string) - IL_005c: ldc.i4 100 - IL_005d: stloc.0 - - EXIT: ldloc.0 - ret - } - } -} diff --git a/src/coreclr/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/k-nucleotide/harness-helpers.cs b/src/coreclr/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/k-nucleotide/harness-helpers.cs deleted file mode 100644 index 757aaba05094..000000000000 --- a/src/coreclr/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/k-nucleotide/harness-helpers.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// Helper functionality to locate inputs and find outputs for -// k-nucleotide benchmark in CoreCLR test harness - -using System; -using System.IO; -using System.Reflection; - -namespace BenchmarksGame -{ - class TestHarnessHelpers - { - public int[] expectedCountLetter; - public int[] expectedCountPairs; - public int[] expectedCountFragments; - public int[][] expectedFrequencies; - private readonly string resourceName; - - public TestHarnessHelpers(bool bigInput, [System.Runtime.CompilerServices.CallerFilePath] string csFileName = "") - { - if (bigInput) - { - expectedCountLetter = new int[] { 302923, 301375, 198136, 197566 }; - expectedCountPairs = new int[] { 91779, 91253, 91225, 90837, 60096, 60030, 59889, 59795, 59756, 59713, 59572, 59557, 39203, 39190, 39081, 39023 }; - expectedCountFragments = new int[] { 11765, 3572, 380, 7, 7 }; - resourceName = $"{Path.GetFileNameWithoutExtension(csFileName)}.knucleotide-input-big.txt"; - } - else - { - expectedCountLetter = new int[] { 1576, 1480, 974, 970 }; - expectedCountPairs = new int[] { 496, 480, 470, 420, 316, 315, 310, 302, 298, 292, 273, 272, 202, 201, 185, 167 }; - expectedCountFragments = new int[] { 54, 24, 4, 0, 0 }; - resourceName = $"{Path.GetFileNameWithoutExtension(csFileName)}.knucleotide-input.txt"; - } - expectedFrequencies = new int[][] { expectedCountLetter, expectedCountPairs }; - } - - public Stream GetInputStream() - { - var assembly = typeof(TestHarnessHelpers).GetTypeInfo().Assembly; - return assembly.GetManifestResourceStream(resourceName); - } - } -} diff --git a/src/coreclr/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/regex-redux/harness-helpers.cs b/src/coreclr/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/regex-redux/harness-helpers.cs deleted file mode 100644 index af5ead11085b..000000000000 --- a/src/coreclr/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/regex-redux/harness-helpers.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// Helper functionality to locate inputs and find outputs for -// regex-redux benchmark in CoreCLR test harness - -using System; -using System.IO; -using System.Reflection; - -namespace BenchmarksGame -{ - class TestHarnessHelpers - { - public readonly int ExpectedLength; - private readonly string resourceName; - - public TestHarnessHelpers(bool bigInput, [System.Runtime.CompilerServices.CallerFilePath] string csFileName = "") - { - if (bigInput) - { - ExpectedLength = 136381; - resourceName = $"{Path.GetFileNameWithoutExtension(csFileName)}.regexdna-input25000.txt"; - } - else - { - ExpectedLength = 152; - resourceName = $"{Path.GetFileNameWithoutExtension(csFileName)}.regexdna-input25.txt"; - } - } - - public Stream GetInputStream() - { - var assembly = typeof(TestHarnessHelpers).GetTypeInfo().Assembly; - return assembly.GetManifestResourceStream(resourceName); - } - } -} diff --git a/src/coreclr/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/reverse-complement/harness-helpers.cs b/src/coreclr/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/reverse-complement/harness-helpers.cs deleted file mode 100644 index d275982919f4..000000000000 --- a/src/coreclr/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/reverse-complement/harness-helpers.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// Helper functionality to locate inputs and find outputs for -// reverse-complement benchmark in CoreCLR test harness - -using System; -using System.IO; -using System.Reflection; - -namespace BenchmarksGame -{ - class TestHarnessHelpers - { - public int FileLength; - public string CheckSum; - private readonly string resourceName; - - public TestHarnessHelpers(bool bigInput, [System.Runtime.CompilerServices.CallerFilePath] string csFileName = "") - { - if (bigInput) - { - FileLength = 254245; - CheckSum = "61-A4-CC-6D-15-8D-26-77-88-93-4F-E2-29-A2-8D-FB"; - resourceName = $"{Path.GetFileNameWithoutExtension(csFileName)}.revcomp-input25000.txt"; - } - else - { - FileLength = 333; - CheckSum = "62-45-8E-09-2E-89-A0-69-8C-17-F5-D8-C7-63-5B-50"; - resourceName = $"{Path.GetFileNameWithoutExtension(csFileName)}.revcomp-input25.txt"; - } - } - - public Stream GetInputStream() - { - var assembly = typeof(TestHarnessHelpers).GetTypeInfo().Assembly; - return assembly.GetManifestResourceStream(resourceName); - } - } -} diff --git a/src/coreclr/tests/src/JIT/Performance/CodeQuality/Benchstones/BenchF/FFT/FFT.cs b/src/coreclr/tests/src/JIT/Performance/CodeQuality/Benchstones/BenchF/FFT/FFT.cs deleted file mode 100644 index 3ddd75491d86..000000000000 --- a/src/coreclr/tests/src/JIT/Performance/CodeQuality/Benchstones/BenchF/FFT/FFT.cs +++ /dev/null @@ -1,155 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// -// FFT benchmark adapted from a Fortran routine from the book -// Digital Signal Analysis, Samuel Stearns, Hayden Book Co. - -using Microsoft.Xunit.Performance; -using System; -using System.Runtime.CompilerServices; -using Xunit; - -[assembly: OptimizeForBenchmarks] - -namespace Benchstone.BenchF -{ -public static class FFT -{ -#if DEBUG - public const int Iterations = 1; -#else - public const int Iterations = 300000; -#endif - - private static readonly int s_points = 16; - public static volatile object VolatileObject; - - [MethodImpl(MethodImplOptions.NoInlining)] - private static void Escape(object obj) - { - VolatileObject = obj; - } - - [MethodImpl(MethodImplOptions.NoInlining)] - private static bool Bench() - { - double[] fr = new double[17]; - double[] fi = new double[17]; - - int i; - double t; - - for (int iter = 1; iter <= Iterations; iter++) - { - for (i = 1; i <= s_points; ++i) - { - t = ((double)0.375) * ((double)(i - 1)); - fr[i] = System.Math.Exp(-t) * System.Math.Sin(t); - fi[i] = 0.0; - } - FastFourierT(fr, fi, s_points); - } - - // Escape the results to live-out. - Escape(fr); - Escape(fi); - - return true; - } - - private static void FastFourierT(double[] fr, double[] fi, int n) - { - int i, j, l, m; - int istep, mr, nn; - double a, el, tr, ti, wr, wi; - - mr = 0; - nn = n - 1; - m = 1; - - do - { - l = n; - for (l = l / 2; ((mr + l) > nn); l = l / 2) - { - } - // l <= n/2 - // mr <= (mr % l) + l ==> mr <= (l - 1) + l = 2l - 1 - // ==> mr <= n - 1 - mr = (mr % l) + l; - - if (mr > m) - { - // Accessing upto m + 1 ==> nn + 1 ==> n - 1 + 1 ==> n - tr = fr[m + 1]; - // Accessing upto mr + 1 ==> n - 1 + 1 ==> n - fr[m + 1] = fr[mr + 1]; - fr[mr + 1] = tr; - ti = fi[m + 1]; - fi[m + 1] = fi[mr + 1]; - fi[mr + 1] = ti; - } - ++m; - } while (m <= nn); - - for (l = 1; l < n; l = istep) - { - istep = 2 * l; - - el = ((double)l); - m = 1; - do - { - a = ((double)3.1415926535) * (((double)(1 - m)) / el); - wr = System.Math.Cos(a); - wi = System.Math.Sin(a); - i = m; - do - { - // l can have a maximum value of 2^x where 2^x < n and 2^(x+1) = n, since n is even - // ==> istep <= 2^(x+1) ==> i can only take the value of m and m <= l - // Therefore, j <= l + l - // or j <= 2^x + 2^x = 2^(x+1) = n - // i.e. j <= n - j = i + l; - - // Accessing upto j <= n, i <= n - tr = wr * fr[j] - wi * fi[j]; - ti = wr * fi[j] + wi * fr[j]; - fr[j] = fr[i] - tr; - fi[j] = fi[i] - ti; - fr[i] = fr[i] + tr; - fi[i] = fi[i] + ti; - i += istep; - } while (i <= n); - ++m; - } while (m <= l); - } - } - - [Benchmark] - public static void Test() - { - foreach (var iteration in Benchmark.Iterations) - { - using (iteration.StartMeasurement()) - { - Bench(); - } - } - } - - private static bool TestBase() - { - bool result = Bench(); - return result; - } - - public static int Main() - { - bool result = TestBase(); - return (result ? 100 : -1); - } -} -} diff --git a/src/coreclr/tests/src/JIT/Performance/CodeQuality/Benchstones/BenchI/Array1/Array1.cs b/src/coreclr/tests/src/JIT/Performance/CodeQuality/Benchstones/BenchI/Array1/Array1.cs deleted file mode 100644 index 5e383ace66bb..000000000000 --- a/src/coreclr/tests/src/JIT/Performance/CodeQuality/Benchstones/BenchI/Array1/Array1.cs +++ /dev/null @@ -1,156 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// -// The sorting benchmark calls a random number generator the number -// of times specified by Maxnum to create an array of int integers, -// then does a quicksort on the array of ints. Random numbers -// are produced using a multiplicative modulus method with known -// seed, so that the generated array is constant across compilers. -// -// This is adapted from a benchmark in BYTE Magazine, August 1984. - -using Microsoft.Xunit.Performance; -using System; -using System.Runtime.CompilerServices; -using Xunit; - -[assembly: OptimizeForBenchmarks] - -namespace Benchstone.BenchI -{ -public static class Array1 -{ -#if DEBUG - private const int Iterations = 1; - private const int Maxnum = 100; -#else - private const int Iterations = 125; - private const int Maxnum = 1000; -#endif - - private const int Modulus = ((int)0x20000); - private const int C = 13849; - private const int A = 25173; - static int s_seed = 7; - - private static void Quick(int lo, int hi, int[] input) - { - int i, j; - int pivot, temp; - - if (lo < hi) - { - // 0 <= lo < hi - for (i = lo, j = (hi + 1), pivot = input[lo]; ;) - { - do - { - ++i; - } while (input[i] < pivot); - - do - { - --j; - // Accessing upto hi - } while (input[j] > pivot); - - if (i < j) - { - temp = input[i]; - input[i] = input[j]; - input[j] = temp; - } - else - { - break; - } - } - temp = input[j]; - input[j] = input[lo]; - input[lo] = temp; - Quick(lo, j - 1, input); - Quick(j + 1, hi, input); - } - } - - private static int Random(int size) - { - unchecked - { - s_seed = s_seed * A + C; - } - - return (s_seed % size); - } - - private static bool VerifySort(int[] buffer) - { - for (int y = 0; y < Maxnum - 2; y++) - { - if (buffer[y] > buffer[y + 1]) - { - return false; - } - } - return true; - } - - [MethodImpl(MethodImplOptions.NoInlining)] - private static bool Bench() - { - int[] buffer = new int[Maxnum + 1]; - - for (int i = 0; i < Iterations; ++i) - { - for (int j = 0; j < Maxnum; ++j) - { - int temp = Random(Modulus); - if (temp < 0L) - { - temp = (-temp); - } - buffer[j] = temp; - } - buffer[Maxnum] = Modulus; - - Quick(0, Maxnum - 1, buffer); - } - - bool result = VerifySort(buffer); - - return result; - } - - [Benchmark] - public static void Test() - { - foreach (var iteration in Benchmark.Iterations) - { - using (iteration.StartMeasurement()) - { - for (int i = 0; i < Iterations; i++) - { - Bench(); - } - } - } - } - - private static bool TestBase() - { - bool result = true; - for (int i = 0; i < Iterations; i++) - { - result &= Bench(); - } - return result; - } - - public static int Main() - { - bool result = TestBase(); - return (result ? 100 : -1); - } -} -} diff --git a/src/coreclr/tests/src/JIT/Performance/CodeQuality/Benchstones/BenchI/Array2/Array2.cs b/src/coreclr/tests/src/JIT/Performance/CodeQuality/Benchstones/BenchI/Array2/Array2.cs deleted file mode 100644 index 45a4a9765b3b..000000000000 --- a/src/coreclr/tests/src/JIT/Performance/CodeQuality/Benchstones/BenchI/Array2/Array2.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using Microsoft.Xunit.Performance; -using System; -using System.Runtime.CompilerServices; -using Xunit; - -[assembly: OptimizeForBenchmarks] - -namespace Benchstone.BenchI -{ -public static class Array2 -{ - -#if DEBUG - public const int Iterations = 1; -#else - public const int Iterations = 500000; -#endif - - static T[][][] AllocArray(int n1, int n2, int n3) { - T[][][] a = new T[n1][][]; - for (int i = 0; i < n1; ++i) { - a[i] = new T[n2][]; - for (int j = 0; j < n2; j++) { - a[i][j] = new T[n3]; - } - } - - return a; - } - - static void Initialize(int[][][] s) { - for (int i = 0; i < 10; i++) { - for (int j = 0; j < 10; j++) { - for (int k = 0; k < 10; k++) { - s[i][j][k] = (2 * i) - (3 * j) + (5 * k); - } - } - } - } - - static bool VerifyCopy(int[][][] s, int[][][] d) { - for (int i = 0; i < 10; i++) { - for (int j = 0; j < 10; j++) { - for (int k = 0; k < 10; k++) { - if (s[i][j][k] != d[i][j][k]) { - return false; - } - } - } - } - - return true; - } - - [MethodImpl(MethodImplOptions.NoInlining)] - static bool Bench(int loop) { - - int[][][] s = AllocArray(10, 10, 10); - int[][][] d = AllocArray(10, 10, 10); - - Initialize(s); - - for (; loop != 0; loop--) { - for (int i = 0; i < 10; i++) { - for (int j = 0; j < 10; j++) { - for (int k = 0; k < 10; k++) { - d[i][j][k] = s[i][j][k]; - } - } - } - } - - bool result = VerifyCopy(s, d); - - return result; - } - - [Benchmark] - public static void Test() { - foreach (var iteration in Benchmark.Iterations) { - using (iteration.StartMeasurement()) { - Bench(Iterations); - } - } - } - - static bool TestBase() { - bool result = Bench(Iterations); - return result; - } - - public static int Main() { - bool result = TestBase(); - return (result ? 100 : -1); - } -} -} diff --git a/src/coreclr/tests/src/JIT/Performance/CodeQuality/Bytemark/utility.cs b/src/coreclr/tests/src/JIT/Performance/CodeQuality/Bytemark/utility.cs deleted file mode 100644 index c0bdbb656f3c..000000000000 --- a/src/coreclr/tests/src/JIT/Performance/CodeQuality/Bytemark/utility.cs +++ /dev/null @@ -1,103 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text; -using System.IO; - -public class Utility -{ - static public int sscanf(String stream, String format, Object[] results) - { - int fieldsRead = 0; - int resultsIndex = 0; - int formatIndex = 0; - char fieldType = '\0'; - char charRead = '\0'; - bool readingField = false; - bool eatWhiteSpace = false; - StringReader srStream = new StringReader(stream); - - while (formatIndex < format.Length) - { - if (Char.IsWhiteSpace((char)format[formatIndex])) - { - eatWhiteSpace = true; - formatIndex++; - continue; - } - while (eatWhiteSpace) - { - if (!Char.IsWhiteSpace((char)srStream.Peek())) - { - eatWhiteSpace = false; - break; - } - srStream.Read(); - } - if ('%' == format[formatIndex]) //If we found a scan field type - { - StringBuilder sb = new StringBuilder(); - ++formatIndex; - fieldType = format[formatIndex++]; - readingField = true; - charRead = (char)srStream.Read(); - - while (readingField) - { - if (-1 == (short)charRead) - { - readingField = false; - } - - sb.Append(charRead); - - int intCharRead = srStream.Peek(); - unchecked - { - charRead = (char)intCharRead; - } - if (Char.IsWhiteSpace(charRead) || ('c' == fieldType) || (-1 == intCharRead)) - { - readingField = false; - fieldsRead++; - - switch (fieldType) - { - case 'c': - results[resultsIndex++] = sb.ToString()[0]; - break; - case 'd': - case 'i': - int parsedInt; - parsedInt = int.Parse(sb.ToString()); - results[resultsIndex++] = parsedInt; - break; - case 'f': - double parsedDouble; - parsedDouble = double.Parse(sb.ToString()); - results[resultsIndex++] = parsedDouble; - break; - case 's': - results[resultsIndex++] = sb.ToString(); - break; - } - continue; - } - charRead = (char)srStream.Read(); - } - } - } - - return fieldsRead; - } - - static public int fscanf(TextReader stream, String format, Object[] results) - { - String s = stream.ReadLine(); - if (null == s) - return 0; - return sscanf(s, format, results); - } -} diff --git a/src/coreclr/tests/src/JIT/Performance/CodeQuality/HWIntrinsic/X86/PacketTracer/Camera.cs b/src/coreclr/tests/src/JIT/Performance/CodeQuality/HWIntrinsic/X86/PacketTracer/Camera.cs deleted file mode 100644 index 6e274e474770..000000000000 --- a/src/coreclr/tests/src/JIT/Performance/CodeQuality/HWIntrinsic/X86/PacketTracer/Camera.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System.Runtime.Intrinsics.X86; -using static System.Runtime.Intrinsics.X86.Avx; -using System.Runtime.Intrinsics; -internal class Camera -{ - - public Camera(VectorPacket256 pos, VectorPacket256 forward, VectorPacket256 up, VectorPacket256 right) { Pos = pos; Forward = forward; Up = up; Right = right; } - - public VectorPacket256 Pos; - public VectorPacket256 Forward; - public VectorPacket256 Up; - public VectorPacket256 Right; - - public static Camera Create(VectorPacket256 pos, VectorPacket256 lookAt) - { - VectorPacket256 forward = (lookAt - pos).Normalize(); - VectorPacket256 down = new VectorPacket256(Vector256.Zero, Vector256.Create(-1.0f), Vector256.Zero); - Vector256 OnePointFive = Vector256.Create(1.5f); - VectorPacket256 right = OnePointFive * VectorPacket256.CrossProduct(forward, down).Normalize(); - VectorPacket256 up = OnePointFive * VectorPacket256.CrossProduct(forward, right).Normalize(); - - return new Camera(pos, forward, up, right); - } - -} diff --git a/src/coreclr/tests/src/JIT/Performance/CodeQuality/HWIntrinsic/X86/PacketTracer/Color.cs b/src/coreclr/tests/src/JIT/Performance/CodeQuality/HWIntrinsic/X86/PacketTracer/Color.cs deleted file mode 100644 index 85d19d6891e0..000000000000 --- a/src/coreclr/tests/src/JIT/Performance/CodeQuality/HWIntrinsic/X86/PacketTracer/Color.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -internal struct Color -{ - public float R { get; } - public float G { get; } - public float B { get; } - - public static readonly Color Background = new Color(0, 0, 0); - - public Color(float _r, float _g, float _b) - { - R = _r; - G = _g; - B = _b; - } -} diff --git a/src/coreclr/tests/src/JIT/Performance/CodeQuality/HWIntrinsic/X86/PacketTracer/ObjectPool.cs b/src/coreclr/tests/src/JIT/Performance/CodeQuality/HWIntrinsic/X86/PacketTracer/ObjectPool.cs deleted file mode 100644 index 29be23238b2b..000000000000 --- a/src/coreclr/tests/src/JIT/Performance/CodeQuality/HWIntrinsic/X86/PacketTracer/ObjectPool.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System.Collections.Generic; -using System.Diagnostics; - -namespace System.Collections.Concurrent -{ - /// Provides a thread-safe object pool. - /// Specifies the type of the elements stored in the pool. - [DebuggerDisplay("Count={Count}")] - [DebuggerTypeProxy(typeof(IProducerConsumerCollection_DebugView<>))] - public sealed class ObjectPool : ProducerConsumerCollectionBase - { - private readonly Func _generator; - - /// Initializes an instance of the ObjectPool class. - /// The function used to create items when no items exist in the pool. - public ObjectPool(Func generator) : this(generator, new ConcurrentQueue()) { } - - /// Initializes an instance of the ObjectPool class. - /// The function used to create items when no items exist in the pool. - /// The collection used to store the elements of the pool. - public ObjectPool(Func generator, IProducerConsumerCollection collection) - : base(collection) - { - if (generator == null) throw new ArgumentNullException("generator"); - _generator = generator; - } - - /// Adds the provided item into the pool. - /// The item to be added. - public void PutObject(T item) { base.TryAdd(item); } - - /// Gets an item from the pool. - /// The removed or created item. - /// If the pool is empty, a new item will be created and returned. - public T GetObject() - { - T value; - return base.TryTake(out value) ? value : _generator(); - } - - /// Clears the object pool, returning all of the data that was in the pool. - /// An array containing all of the elements in the pool. - public T[] ToArrayAndClear() - { - var items = new List(); - T value; - while (base.TryTake(out value)) items.Add(value); - return items.ToArray(); - } - - protected override bool TryAdd(T item) - { - PutObject(item); - return true; - } - - protected override bool TryTake(out T item) - { - item = GetObject(); - return true; - } - } -} diff --git a/src/coreclr/tests/src/JIT/Performance/CodeQuality/HWIntrinsic/X86/PacketTracer/ProducerConsumerCollectionBase.cs b/src/coreclr/tests/src/JIT/Performance/CodeQuality/HWIntrinsic/X86/PacketTracer/ProducerConsumerCollectionBase.cs deleted file mode 100644 index fee736397d61..000000000000 --- a/src/coreclr/tests/src/JIT/Performance/CodeQuality/HWIntrinsic/X86/PacketTracer/ProducerConsumerCollectionBase.cs +++ /dev/null @@ -1,107 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System.Collections.Generic; -using System.Diagnostics; - -namespace System.Collections.Concurrent -{ - /// Debug view for the IProducerConsumerCollection. - /// Specifies the type of the data being aggregated. - internal sealed class IProducerConsumerCollection_DebugView - { - private IProducerConsumerCollection _collection; - - public IProducerConsumerCollection_DebugView(IProducerConsumerCollection collection) - { - _collection = collection; - } - - [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)] - public T[] Values { get { return _collection.ToArray(); } } - } - - /// - /// Provides a base implementation for producer-consumer collections that wrap other - /// producer-consumer collections. - /// - /// Specifies the type of elements in the collection. - public abstract class ProducerConsumerCollectionBase : IProducerConsumerCollection - { - private readonly IProducerConsumerCollection _contained; - - /// Initializes the ProducerConsumerCollectionBase instance. - /// The collection to be wrapped by this instance. - protected ProducerConsumerCollectionBase(IProducerConsumerCollection contained) - { - if (contained == null) throw new ArgumentNullException("contained"); - _contained = contained; - } - - /// Gets the contained collection. - protected IProducerConsumerCollection ContainedCollection { get { return _contained; } } - - /// Attempts to add the specified value to the end of the deque. - /// The item to add. - /// true if the item could be added; otherwise, false. - protected virtual bool TryAdd(T item) { return _contained.TryAdd(item); } - - /// Attempts to remove and return an item from the collection. - /// - /// When this method returns, if the operation was successful, item contains the item removed. If - /// no item was available to be removed, the value is unspecified. - /// - /// - /// true if an element was removed and returned from the collection; otherwise, false. - /// - protected virtual bool TryTake(out T item) { return _contained.TryTake(out item); } - - /// Attempts to add the specified value to the end of the deque. - /// The item to add. - /// true if the item could be added; otherwise, false. - bool IProducerConsumerCollection.TryAdd(T item) { return TryAdd(item); } - - /// Attempts to remove and return an item from the collection. - /// - /// When this method returns, if the operation was successful, item contains the item removed. If - /// no item was available to be removed, the value is unspecified. - /// - /// - /// true if an element was removed and returned from the collection; otherwise, false. - /// - bool IProducerConsumerCollection.TryTake(out T item) { return TryTake(out item); } - - /// Gets the number of elements contained in the collection. - public int Count { get { return _contained.Count; } } - - /// Creates an array containing the contents of the collection. - /// The array. - public T[] ToArray() { return _contained.ToArray(); } - - /// Copies the contents of the collection to an array. - /// The array to which the data should be copied. - /// The starting index at which data should be copied. - public void CopyTo(T[] array, int index) { _contained.CopyTo(array, index); } - - /// Copies the contents of the collection to an array. - /// The array to which the data should be copied. - /// The starting index at which data should be copied. - void ICollection.CopyTo(Array array, int index) { _contained.CopyTo(array, index); } - - /// Gets an enumerator for the collection. - /// An enumerator. - public IEnumerator GetEnumerator() { return _contained.GetEnumerator(); } - - /// Gets an enumerator for the collection. - /// An enumerator. - IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); } - - /// Gets whether the collection is synchronized. - bool ICollection.IsSynchronized { get { return _contained.IsSynchronized; } } - - /// Gets the synchronization root object for the collection. - object ICollection.SyncRoot { get { return _contained.SyncRoot; } } - } -} diff --git a/src/coreclr/tests/src/JIT/Performance/CodeQuality/HWIntrinsic/X86/PacketTracer/Program.cs b/src/coreclr/tests/src/JIT/Performance/CodeQuality/HWIntrinsic/X86/PacketTracer/Program.cs deleted file mode 100644 index a502320e7aab..000000000000 --- a/src/coreclr/tests/src/JIT/Performance/CodeQuality/HWIntrinsic/X86/PacketTracer/Program.cs +++ /dev/null @@ -1,178 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; -using System.Collections.Concurrent; -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; -//using Microsoft.Xunit.Performance; - -//[assembly: OptimizeForBenchmarks] - -class Program -{ -#if DEBUG - - private const int RunningTime = 200; - private const int Width = 248; - private const int Height = 248; - private const int Iterations = 1; - private const int MaxIterations = 1000; - -#else - - private const int RunningTime = 1000; - private const int Width = 248; - private const int Height = 248; - private const int Iterations = 7; - private const int MaxIterations = 1000; - -#endif - - private double _framesPerSecond; - private bool _parallel; - private bool _showThreads; - private static int _width, _height; - private int _degreeOfParallelism = Environment.ProcessorCount; - private int _frames; - private CancellationTokenSource _cancellation; - private ObjectPool _freeBuffers; - - public Program() - { - _width = Width; - _height = Height; - _parallel = false; - _showThreads = false; - _freeBuffers = new ObjectPool(() => new int[_width * 3 * _height]); // Each pixel has 3 fields (RGB) - } - - static unsafe int Main(string[] args) - { - if (Avx2.IsSupported) - { - var r = new Program(); - // We can use `RenderTo` to generate a picture in a PPM file for debugging - // r.RenderTo("./pic.ppm", true); - bool result = r.Run(); - return (result ? 100 : -1); - } - return 100; - } - - private void RenderTest() - { - _cancellation = new CancellationTokenSource(RunningTime); - RenderLoop(MaxIterations); - } - - private void RenderBench() - { - _cancellation = new CancellationTokenSource(); - RenderLoop(Iterations); - } - - private unsafe void RenderLoop(int iterations) - { - // Create a ray tracer, and create a reference to "sphere2" that we are going to bounce - var packetTracer = new Packet256Tracer(_width, _height); - var scene = packetTracer.DefaultScene; - var sphere2 = (SpherePacket256)scene.Things[0]; // The first item is assumed to be our sphere - var baseY = sphere2.Radiuses; - sphere2.Centers.Ys = sphere2.Radiuses; - - // Timing determines how fast the ball bounces as well as diagnostics frames/second info - var renderingTime = new Stopwatch(); - var totalTime = Stopwatch.StartNew(); - - // Keep rendering until the iteration count is hit - for (_frames = 0; _frames < iterations; _frames++) - { - // Or the rendering task has been canceled - if (_cancellation.IsCancellationRequested) - { - break; - } - - // Get the next buffer - var rgbBuffer = _freeBuffers.GetObject(); - - // Determine the new position of the sphere based on the current time elapsed - float dy2 = 0.8f * MathF.Abs(MathF.Sin((float)(totalTime.ElapsedMilliseconds * Math.PI / 3000))); - sphere2.Centers.Ys = Avx.Add(baseY, Vector256.Create(dy2)); - - // Render the scene - renderingTime.Reset(); - renderingTime.Start(); - ParallelOptions options = new ParallelOptions - { - MaxDegreeOfParallelism = _degreeOfParallelism, - CancellationToken = _cancellation.Token - }; - fixed (int* ptr = rgbBuffer) - { - packetTracer.RenderVectorized(scene, ptr); - } - - renderingTime.Stop(); - - _framesPerSecond = (1000.0 / renderingTime.ElapsedMilliseconds); - _freeBuffers.PutObject(rgbBuffer); - } - } - - public bool Run() - { - RenderTest(); - Console.WriteLine("{0} frames, {1} frames/sec", - _frames, - _framesPerSecond.ToString("F2")); - return true; - } - - private unsafe void RenderTo(string fileName, bool wirteToFile) - { - var packetTracer = new Packet256Tracer(_width, _height); - var scene = packetTracer.DefaultScene; - var rgb = new int[_width * 3 * _height]; - Stopwatch stopWatch = new Stopwatch(); - stopWatch.Start(); - fixed (int* ptr = rgb) - { - packetTracer.RenderVectorized(scene, ptr); - } - stopWatch.Stop(); - TimeSpan ts = stopWatch.Elapsed; - string elapsedTime = String.Format("{0:00}:{1:00}:{2:00}.{3:00}", - ts.Hours, ts.Minutes, ts.Seconds, - ts.Milliseconds / 10); - Console.WriteLine("RunTime " + elapsedTime); - - if (wirteToFile) - { - using (var file = new System.IO.StreamWriter(fileName)) - { - file.WriteLine("P3"); - file.WriteLine(_width + " " + _height); - file.WriteLine("255"); - - for (int i = 0; i < _height; i++) - { - for (int j = 0; j < _width; j++) - { - // Each pixel has 3 fields (RGB) - int pos = (i * _width + j) * 3; - file.Write(rgb[pos] + " " + rgb[pos + 1] + " " + rgb[pos + 2] + " "); - } - file.WriteLine(); - } - } - - } - } -} diff --git a/src/coreclr/tests/src/JIT/Performance/CodeQuality/HWIntrinsic/X86/PacketTracer/Scene.cs b/src/coreclr/tests/src/JIT/Performance/CodeQuality/HWIntrinsic/X86/PacketTracer/Scene.cs deleted file mode 100644 index 0cc0ab6bc505..000000000000 --- a/src/coreclr/tests/src/JIT/Performance/CodeQuality/HWIntrinsic/X86/PacketTracer/Scene.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System.Collections.Generic; -using System.Runtime.Intrinsics.X86; -using static System.Runtime.Intrinsics.X86.Avx; -using static System.Runtime.Intrinsics.X86.Avx2; -using System.Runtime.Intrinsics; -using System.Runtime.CompilerServices; -using System; - -internal class Scene -{ - public ObjectPacket256[] Things; - public LightPacket256[] Lights; - public Camera Camera; - - public Scene(ObjectPacket256[] things, LightPacket256[] lights, Camera camera) { Things = things; Lights = lights; Camera = camera; } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public VectorPacket256 Normals(Vector256 things, VectorPacket256 pos) - { - VectorPacket256 norms = new VectorPacket256(1, 1, 1); - - for (int i = 0; i < Things.Length; i++) - { - Vector256 mask = CompareEqual(things, Vector256.Create(i)).AsSingle(); - var n = Things[i].Normals(pos); - norms.Xs = BlendVariable(norms.Xs, n.Xs, mask); - norms.Ys = BlendVariable(norms.Ys, n.Ys, mask); - norms.Zs = BlendVariable(norms.Zs, n.Zs, mask); - } - - return norms; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public Vector256 Reflect(Vector256 things, VectorPacket256 pos) - { - Vector256 rfl = Vector256.Create(1.0f); - for (int i = 0; i < Things.Length; i++) - { - Vector256 mask = CompareEqual(things, Vector256.Create(i)).AsSingle(); - rfl = BlendVariable(rfl, Things[i].Surface.Reflect(pos), mask); - } - return rfl; - } - -} diff --git a/src/coreclr/tests/src/JIT/Performance/CodeQuality/HWIntrinsic/X86/PacketTracer/Surface.cs b/src/coreclr/tests/src/JIT/Performance/CodeQuality/HWIntrinsic/X86/PacketTracer/Surface.cs deleted file mode 100644 index 35e04bd84298..000000000000 --- a/src/coreclr/tests/src/JIT/Performance/CodeQuality/HWIntrinsic/X86/PacketTracer/Surface.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System.Runtime.Intrinsics; -using System; -using ColorPacket256 = VectorPacket256; - -internal class Surface -{ - public Func Diffuse; - public VectorPacket256 Specular; - public Func> Reflect; - public float Roughness; - - public Surface(Func Diffuse, - VectorPacket256 Specular, - Func> Reflect, - float Roughness) - { - this.Diffuse = Diffuse; - this.Specular = Specular; - this.Reflect = Reflect; - this.Roughness = Roughness; - } -} diff --git a/src/coreclr/tests/src/JIT/Performance/CodeQuality/HWIntrinsic/X86/PacketTracer/Surfaces.cs b/src/coreclr/tests/src/JIT/Performance/CodeQuality/HWIntrinsic/X86/PacketTracer/Surfaces.cs deleted file mode 100644 index a376872a16bd..000000000000 --- a/src/coreclr/tests/src/JIT/Performance/CodeQuality/HWIntrinsic/X86/PacketTracer/Surfaces.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; -using static System.Runtime.Intrinsics.X86.Avx; -using ColorPacket256 = VectorPacket256; - -using System; - -internal static class Surfaces -{ - - private static readonly ColorPacket256 White = new ColorPacket256(Vector256.Create(1.0f)); - private static readonly ColorPacket256 Black = new ColorPacket256(0.02f, 0.0f, 0.14f); - // Only works with X-Z plane. - public static readonly Surface CheckerBoard = - new Surface( - delegate (VectorPacket256 pos) - { - var floored = ConvertToVector256Int32(Add(Floor(pos.Zs), Floor(pos.Xs))); - var modMask = Vector256.Create(1); - var evenMaskint = Avx2.And(floored, modMask); - var evenMask = Avx2.CompareEqual(evenMaskint, modMask); - - var resultX = BlendVariable(Black.Xs, White.Xs, evenMask.AsSingle()); - var resultY = BlendVariable(Black.Ys, White.Ys, evenMask.AsSingle()); - var resultZ = BlendVariable(Black.Zs, White.Zs, evenMask.AsSingle()); - - return new ColorPacket256(resultX, resultY, resultZ); - }, - new VectorPacket256(1f, 1f, 1f), - delegate (VectorPacket256 pos) - { - var floored = ConvertToVector256Int32(Add(Floor(pos.Zs), Floor(pos.Xs))); - var modMask = Vector256.Create(1); - var evenMaskUint = Avx2.And(floored, modMask); - var evenMask = Avx2.CompareEqual(evenMaskUint, modMask); - - return BlendVariable(Vector256.Create(0.5f), Vector256.Create(0.1f), evenMask.AsSingle()); - }, - 150f); - - - - public static readonly Surface Shiny = - new Surface( - delegate (VectorPacket256 pos) { return new VectorPacket256(1f, 1f, 1f); }, - new VectorPacket256(.5f, .5f, .5f), - delegate (VectorPacket256 pos) { return Vector256.Create(0.7f); }, - 250f); - - public static readonly Surface MatteShiny = - new Surface( - delegate (VectorPacket256 pos) { return new VectorPacket256(1f, 1f, 1f); }, - new VectorPacket256(.25f, .25f, .25f), - delegate (VectorPacket256 pos) { return Vector256.Create(0.7f); }, - 250f); -} diff --git a/src/coreclr/tests/src/JIT/Performance/CodeQuality/HWIntrinsic/X86/PacketTracer/Vector.cs b/src/coreclr/tests/src/JIT/Performance/CodeQuality/HWIntrinsic/X86/PacketTracer/Vector.cs deleted file mode 100644 index ec27d823f8cd..000000000000 --- a/src/coreclr/tests/src/JIT/Performance/CodeQuality/HWIntrinsic/X86/PacketTracer/Vector.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -internal struct Vector -{ - public float X { get; set; } - public float Y { get; set; } - public float Z { get; set; } - - public Vector(float x, float y, float z) - { - X = x; - Y = y; - Z = z; - } -} diff --git a/src/coreclr/tests/src/JIT/Performance/CodeQuality/SIMD/ConsoleMandel/VectorHelpers.cs b/src/coreclr/tests/src/JIT/Performance/CodeQuality/SIMD/ConsoleMandel/VectorHelpers.cs deleted file mode 100644 index cba8ce819499..000000000000 --- a/src/coreclr/tests/src/JIT/Performance/CodeQuality/SIMD/ConsoleMandel/VectorHelpers.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Numerics; -using System.Runtime.CompilerServices; - -namespace Algorithms -{ - public static class VectorHelper - { - // Helper to construct a vector from a lambda that takes an - // index. It's not efficient, but it's more succint than the - // corresponding for loop. Don't use it on a hot code path - // (i.e. inside a loop) - [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] - public static Vector Create(Func creator) where T : struct - { - T[] data = new T[Vector.Count]; - for (int i = 0; i < data.Length; i++) - data[i] = creator(i); - return new Vector(data); - } - - // Helper to invoke a function for each element of the - // vector. This is NOT fast. I just like the way it looks - // better than a for loop. Don't use it somewhere that - // performance truly matters - [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] - public static void ForEach(this Vector vec, Action op) where T : struct - { - for (int i = 0; i < Vector.Count; i++) - op(vec[i], i); - } - } -} diff --git a/src/coreclr/tests/src/JIT/Performance/CodeQuality/SIMD/RayTracer/Camera.cs b/src/coreclr/tests/src/JIT/Performance/CodeQuality/SIMD/RayTracer/Camera.cs deleted file mode 100644 index 7d96ca769eb6..000000000000 --- a/src/coreclr/tests/src/JIT/Performance/CodeQuality/SIMD/RayTracer/Camera.cs +++ /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. -// See the LICENSE file in the project root for more information. -// - -internal class Camera -{ - public Vector Pos; - public Vector Forward; - public Vector Up; - public Vector Right; - - public Camera(Vector pos, Vector forward, Vector up, Vector right) { Pos = pos; Forward = forward; Up = up; Right = right; } - - public static Camera Create(Vector pos, Vector lookAt) - { - Vector forward = Vector.Norm(Vector.Minus(lookAt, pos)); - Vector down = new Vector(0, -1, 0); - Vector right = Vector.Times(1.5F, Vector.Norm(Vector.Cross(forward, down))); - Vector up = Vector.Times(1.5F, Vector.Norm(Vector.Cross(forward, right))); - - return new Camera(pos, forward, up, right); - } -} - diff --git a/src/coreclr/tests/src/JIT/Performance/CodeQuality/SIMD/RayTracer/Color.cs b/src/coreclr/tests/src/JIT/Performance/CodeQuality/SIMD/RayTracer/Color.cs deleted file mode 100644 index c88b188ec4de..000000000000 --- a/src/coreclr/tests/src/JIT/Performance/CodeQuality/SIMD/RayTracer/Color.cs +++ /dev/null @@ -1,143 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Numerics; - -public struct Color -{ - private Vector3 _simdVector; - public float R { get { return _simdVector.X; } } - public float G { get { return _simdVector.Y; } } - public float B { get { return _simdVector.Z; } } - - public Color(double r, double g, double b) - { - _simdVector = new Vector3((float)r, (float)g, (float)b); - } - public Color(string str) - { - string[] nums = str.Split(','); - if (nums.Length != 3) throw new ArgumentException(); - _simdVector = new Vector3(float.Parse(nums[0]), float.Parse(nums[1]), float.Parse(nums[2])); - } - - - public static Color Times(double n, Color v) - { - Color result; - result._simdVector = (float)n * v._simdVector; - return result; - } - public static Color Times(Color v1, Color v2) - { - Color result; - result._simdVector = v1._simdVector * v2._simdVector; - return result; - } - - public static Color Plus(Color v1, Color v2) - { - Color result; - result._simdVector = v1._simdVector + v2._simdVector; - return result; - } - public static Color Minus(Color v1, Color v2) - { - Color result; - result._simdVector = v1._simdVector - v2._simdVector; - return result; - } - - public static Color Background { get { Color result; result._simdVector = Vector3.Zero; return result; } } - public static Color DefaultColor { get { Color result; result._simdVector = Vector3.Zero; return result; } } - - public static float Legalize(float d) - { - return d > 1 ? 1 : d; - } - - public static byte ToByte(float c) - { - return (byte)(255 * Legalize(c)); - } - - public static Int32 ToInt32(float c) - { - Int32 r = (Int32)(255 * c); - return (r > 255 ? 255 : r); - } - - public Int32 ToInt32() - { - return (ToInt32(B) | ToInt32(G) << 8 | ToInt32(R) << 16 | 255 << 24); - } - - public float Brightness() - { - float r = (float)R / 255.0f; - float g = (float)G / 255.0f; - float b = (float)B / 255.0f; - - float max, min; - - max = r; min = r; - - if (g > max) max = g; - if (b > max) max = b; - - if (g < min) min = g; - if (b < min) min = b; - - return (max + min) / 2; - } - - public void ChangeHue(float hue) - { - float H, S, L, Br; - - Br = Brightness(); - H = hue; - S = 0.9F; - L = ((Br - 0.5F) * 0.5F) + 0.5F; - - if (L == 0) - { - _simdVector = Vector3.Zero; - } - else - { - if (S == 0) - { - _simdVector = new Vector3(L); - } - else - { - float temp2 = ((L <= 0.5F) ? L * (1.0F + S) : L + S - (L * S)); - float temp1 = 2.0F * L - temp2; - - float[] t3 = new float[] { H + 1.0F / 3.0F, H, H - 1.0F / 3.0F }; - float[] clr = new float[] { 0, 0, 0 }; - - for (int i = 0; i < 3; i++) - { - if (t3[i] < 0) t3[i] += 1.0F; - if (t3[i] > 1) t3[i] -= 1.0F; - if (6.0 * t3[i] < 1.0) - clr[i] = temp1 + (temp2 - temp1) * t3[i] * 6.0F; - else if (2.0 * t3[i] < 1.0) - clr[i] = temp2; - else if (3.0 * t3[i] < 2.0) - clr[i] = (temp1 + (temp2 - temp1) * ((2.0F / 3.0F) - t3[i]) * 6.0F); - else - clr[i] = temp1; - } - - _simdVector = new Vector3(clr[0], clr[1], clr[2]); - } - } - } -} - diff --git a/src/coreclr/tests/src/JIT/Performance/CodeQuality/SIMD/RayTracer/ObjectPool.cs b/src/coreclr/tests/src/JIT/Performance/CodeQuality/SIMD/RayTracer/ObjectPool.cs deleted file mode 100644 index 29be23238b2b..000000000000 --- a/src/coreclr/tests/src/JIT/Performance/CodeQuality/SIMD/RayTracer/ObjectPool.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System.Collections.Generic; -using System.Diagnostics; - -namespace System.Collections.Concurrent -{ - /// Provides a thread-safe object pool. - /// Specifies the type of the elements stored in the pool. - [DebuggerDisplay("Count={Count}")] - [DebuggerTypeProxy(typeof(IProducerConsumerCollection_DebugView<>))] - public sealed class ObjectPool : ProducerConsumerCollectionBase - { - private readonly Func _generator; - - /// Initializes an instance of the ObjectPool class. - /// The function used to create items when no items exist in the pool. - public ObjectPool(Func generator) : this(generator, new ConcurrentQueue()) { } - - /// Initializes an instance of the ObjectPool class. - /// The function used to create items when no items exist in the pool. - /// The collection used to store the elements of the pool. - public ObjectPool(Func generator, IProducerConsumerCollection collection) - : base(collection) - { - if (generator == null) throw new ArgumentNullException("generator"); - _generator = generator; - } - - /// Adds the provided item into the pool. - /// The item to be added. - public void PutObject(T item) { base.TryAdd(item); } - - /// Gets an item from the pool. - /// The removed or created item. - /// If the pool is empty, a new item will be created and returned. - public T GetObject() - { - T value; - return base.TryTake(out value) ? value : _generator(); - } - - /// Clears the object pool, returning all of the data that was in the pool. - /// An array containing all of the elements in the pool. - public T[] ToArrayAndClear() - { - var items = new List(); - T value; - while (base.TryTake(out value)) items.Add(value); - return items.ToArray(); - } - - protected override bool TryAdd(T item) - { - PutObject(item); - return true; - } - - protected override bool TryTake(out T item) - { - item = GetObject(); - return true; - } - } -} diff --git a/src/coreclr/tests/src/JIT/Performance/CodeQuality/SIMD/RayTracer/Plane.cs b/src/coreclr/tests/src/JIT/Performance/CodeQuality/SIMD/RayTracer/Plane.cs deleted file mode 100644 index 9504a0b11691..000000000000 --- a/src/coreclr/tests/src/JIT/Performance/CodeQuality/SIMD/RayTracer/Plane.cs +++ /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. -// See the LICENSE file in the project root for more information. -// - -internal class Plane : SceneObject -{ - public Vector Norm; - public double Offset; - - public Plane(Vector norm, double offset, Surface surface) : base(surface) { Norm = norm; Offset = offset; } - - public override ISect Intersect(Ray ray) - { - double denom = Vector.Dot(Norm, ray.Dir); - if (denom > 0) return ISect.Null; - return new ISect(this, ray, (Vector.Dot(Norm, ray.Start) + Offset) / (-denom)); - } - - public override Vector Normal(Vector pos) - { - return Norm; - } -} - diff --git a/src/coreclr/tests/src/JIT/Performance/CodeQuality/SIMD/RayTracer/ProducerConsumerCollectionBase.cs b/src/coreclr/tests/src/JIT/Performance/CodeQuality/SIMD/RayTracer/ProducerConsumerCollectionBase.cs deleted file mode 100644 index fee736397d61..000000000000 --- a/src/coreclr/tests/src/JIT/Performance/CodeQuality/SIMD/RayTracer/ProducerConsumerCollectionBase.cs +++ /dev/null @@ -1,107 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System.Collections.Generic; -using System.Diagnostics; - -namespace System.Collections.Concurrent -{ - /// Debug view for the IProducerConsumerCollection. - /// Specifies the type of the data being aggregated. - internal sealed class IProducerConsumerCollection_DebugView - { - private IProducerConsumerCollection _collection; - - public IProducerConsumerCollection_DebugView(IProducerConsumerCollection collection) - { - _collection = collection; - } - - [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)] - public T[] Values { get { return _collection.ToArray(); } } - } - - /// - /// Provides a base implementation for producer-consumer collections that wrap other - /// producer-consumer collections. - /// - /// Specifies the type of elements in the collection. - public abstract class ProducerConsumerCollectionBase : IProducerConsumerCollection - { - private readonly IProducerConsumerCollection _contained; - - /// Initializes the ProducerConsumerCollectionBase instance. - /// The collection to be wrapped by this instance. - protected ProducerConsumerCollectionBase(IProducerConsumerCollection contained) - { - if (contained == null) throw new ArgumentNullException("contained"); - _contained = contained; - } - - /// Gets the contained collection. - protected IProducerConsumerCollection ContainedCollection { get { return _contained; } } - - /// Attempts to add the specified value to the end of the deque. - /// The item to add. - /// true if the item could be added; otherwise, false. - protected virtual bool TryAdd(T item) { return _contained.TryAdd(item); } - - /// Attempts to remove and return an item from the collection. - /// - /// When this method returns, if the operation was successful, item contains the item removed. If - /// no item was available to be removed, the value is unspecified. - /// - /// - /// true if an element was removed and returned from the collection; otherwise, false. - /// - protected virtual bool TryTake(out T item) { return _contained.TryTake(out item); } - - /// Attempts to add the specified value to the end of the deque. - /// The item to add. - /// true if the item could be added; otherwise, false. - bool IProducerConsumerCollection.TryAdd(T item) { return TryAdd(item); } - - /// Attempts to remove and return an item from the collection. - /// - /// When this method returns, if the operation was successful, item contains the item removed. If - /// no item was available to be removed, the value is unspecified. - /// - /// - /// true if an element was removed and returned from the collection; otherwise, false. - /// - bool IProducerConsumerCollection.TryTake(out T item) { return TryTake(out item); } - - /// Gets the number of elements contained in the collection. - public int Count { get { return _contained.Count; } } - - /// Creates an array containing the contents of the collection. - /// The array. - public T[] ToArray() { return _contained.ToArray(); } - - /// Copies the contents of the collection to an array. - /// The array to which the data should be copied. - /// The starting index at which data should be copied. - public void CopyTo(T[] array, int index) { _contained.CopyTo(array, index); } - - /// Copies the contents of the collection to an array. - /// The array to which the data should be copied. - /// The starting index at which data should be copied. - void ICollection.CopyTo(Array array, int index) { _contained.CopyTo(array, index); } - - /// Gets an enumerator for the collection. - /// An enumerator. - public IEnumerator GetEnumerator() { return _contained.GetEnumerator(); } - - /// Gets an enumerator for the collection. - /// An enumerator. - IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); } - - /// Gets whether the collection is synchronized. - bool ICollection.IsSynchronized { get { return _contained.IsSynchronized; } } - - /// Gets the synchronization root object for the collection. - object ICollection.SyncRoot { get { return _contained.SyncRoot; } } - } -} diff --git a/src/coreclr/tests/src/JIT/Performance/CodeQuality/SIMD/RayTracer/Scene.cs b/src/coreclr/tests/src/JIT/Performance/CodeQuality/SIMD/RayTracer/Scene.cs deleted file mode 100644 index 28bf788188ee..000000000000 --- a/src/coreclr/tests/src/JIT/Performance/CodeQuality/SIMD/RayTracer/Scene.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System.Collections.Generic; - -internal class Scene -{ - public SceneObject[] Things; - public Light[] Lights; - public Camera Camera; - - public Scene(SceneObject[] things, Light[] lights, Camera camera) { Things = things; Lights = lights; Camera = camera; } - - public IEnumerable Intersect(Ray r) - { - foreach (SceneObject obj in Things) - { - yield return obj.Intersect(r); - } - } -} - diff --git a/src/coreclr/tests/src/JIT/Performance/CodeQuality/SIMD/RayTracer/Surface.cs b/src/coreclr/tests/src/JIT/Performance/CodeQuality/SIMD/RayTracer/Surface.cs deleted file mode 100644 index c33899edd761..000000000000 --- a/src/coreclr/tests/src/JIT/Performance/CodeQuality/SIMD/RayTracer/Surface.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -internal class Surface -{ - public Func Diffuse; - public Func Specular; - public Func Reflect; - public double Roughness; - - public Surface(Func Diffuse, - Func Specular, - Func Reflect, - double Roughness) - { - this.Diffuse = Diffuse; - this.Specular = Specular; - this.Reflect = Reflect; - this.Roughness = Roughness; - } -} - diff --git a/src/coreclr/tests/src/JIT/Performance/CodeQuality/SIMD/RayTracer/Surfaces.cs b/src/coreclr/tests/src/JIT/Performance/CodeQuality/SIMD/RayTracer/Surfaces.cs deleted file mode 100644 index 3342e1b7a644..000000000000 --- a/src/coreclr/tests/src/JIT/Performance/CodeQuality/SIMD/RayTracer/Surfaces.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -internal static class Surfaces -{ - // Only works with X-Z plane. - public static readonly Surface CheckerBoard = - new Surface( - delegate (Vector pos) - { - return ((Math.Floor(pos.Z) + Math.Floor(pos.X)) % 2 != 0) - ? new Color(1, 1, 1) - : new Color(0.02, 0.0, 0.14); - }, - delegate (Vector pos) { return new Color(1, 1, 1); }, - delegate (Vector pos) - { - return ((Math.Floor(pos.Z) + Math.Floor(pos.X)) % 2 != 0) - ? .1 - : .5; - }, - 150); - - - - public static readonly Surface Shiny = - new Surface( - delegate (Vector pos) { return new Color(1, 1, 1); }, - delegate (Vector pos) { return new Color(.5, .5, .5); }, - delegate (Vector pos) { return .7; }, - 250); - - public static readonly Surface MatteShiny = - new Surface( - delegate (Vector pos) { return new Color(1, 1, 1); }, - delegate (Vector pos) { return new Color(.25, .25, .25); }, - delegate (Vector pos) { return .7; }, - 250); -} - diff --git a/src/coreclr/tests/src/JIT/Performance/CodeQuality/SIMD/RayTracer/Vector.cs b/src/coreclr/tests/src/JIT/Performance/CodeQuality/SIMD/RayTracer/Vector.cs deleted file mode 100644 index c6ba48312b4f..000000000000 --- a/src/coreclr/tests/src/JIT/Performance/CodeQuality/SIMD/RayTracer/Vector.cs +++ /dev/null @@ -1,77 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Numerics; -using System.Runtime.CompilerServices; - -internal struct Vector -{ - private Vector3 _simdVector; - public float X { get { return _simdVector.X; } } - public float Y { get { return _simdVector.Y; } set { _simdVector = new Vector3(_simdVector.X, value, _simdVector.Z); } } - public float Z { get { return _simdVector.Z; } } - - public Vector(double x, double y, double z) - { - _simdVector = new Vector3((float)x, (float)y, (float)z); - } - public Vector(string str) - { - string[] nums = str.Split(','); - if (nums.Length != 3) throw new ArgumentException(); - _simdVector = new Vector3(float.Parse(nums[0]), float.Parse(nums[1]), float.Parse(nums[2])); - } - [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] - public static Vector Times(double n, Vector v) - { - Vector result; - result._simdVector = (float)n * v._simdVector; - return result; - } - [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] - public static Vector Minus(Vector v1, Vector v2) - { - Vector result; - result._simdVector = v1._simdVector - v2._simdVector; - return result; - } - [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] - public static Vector Plus(Vector v1, Vector v2) - { - Vector result; - result._simdVector = v1._simdVector + v2._simdVector; - return result; - } - [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] - public static float Dot(Vector v1, Vector v2) - { - return Vector3.Dot(v1._simdVector, v2._simdVector); - } - [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] - public static float Mag(Vector v) { return (float)Math.Sqrt(Dot(v, v)); } - [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] - public static Vector Norm(Vector v) - { - float mag = Mag(v); - float div = mag == 0 ? float.PositiveInfinity : 1 / mag; - return Times(div, v); - } - [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] - public static Vector Cross(Vector v1, Vector v2) - { - return new Vector(((v1.Y * v2.Z) - (v1.Z * v2.Y)), - ((v1.Z * v2.X) - (v1.X * v2.Z)), - ((v1.X * v2.Y) - (v1.Y * v2.X))); - } - [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] - public static bool Equals(Vector v1, Vector v2) - { - return v1._simdVector.Equals(v2._simdVector); - } - - public static Vector Null { get { Vector result; result._simdVector = Vector3.Zero; return result; } } -} - diff --git a/src/coreclr/tests/src/JIT/Performance/CodeQuality/SciMark/FFT.cs b/src/coreclr/tests/src/JIT/Performance/CodeQuality/SciMark/FFT.cs deleted file mode 100644 index 824c50f01a22..000000000000 --- a/src/coreclr/tests/src/JIT/Performance/CodeQuality/SciMark/FFT.cs +++ /dev/null @@ -1,222 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -/// -/// This is a port of the SciMark2a Java Benchmark to C# by -/// Chris Re (cmr28@cornell.edu) and Werner Vogels (vogels@cs.cornell.edu) -/// -/// For details on the original authors see http://math.nist.gov/scimark2 -/// -/// This software is likely to burn your processor, bitflip your memory chips -/// anihilate your screen and corrupt all your disks, so you it at your -/// own risk. -/// - - -using System; - -namespace SciMark2 -{ - /// Computes FFT's of complex, double precision data where n is an integer power of 2. - /// This appears to be slower than the Radix2 method, - /// but the code is smaller and simpler, and it requires no extra storage. - ///

- ///
- /// - /// - /// Bruce R. Miller bruce.miller@nist.gov, - /// Derived from GSL (Gnu Scientific Library), - /// GSL's FFT Code by Brian Gough bjg@vvv.lanl.gov - /// - - public class FFT - { - public static double num_flops(int N) - { - double Nd = (double)N; - double logN = (double)log2(N); - - return (5.0 * Nd - 2) * logN + 2 * (Nd + 1); - } - - - /// - /// Compute Fast Fourier Transform of (complex) data, in place. - /// - public static void transform(double[] data) - { - transform_internal(data, -1); - } - - /// - /// Compute Inverse Fast Fourier Transform of (complex) data, in place. - /// - public static void inverse(double[] data) - { - transform_internal(data, +1); - // Normalize - int nd = data.Length; - int n = nd / 2; - double norm = 1 / ((double)n); - for (int i = 0; i < nd; i++) - data[i] *= norm; - } - - /// - /// Accuracy check on FFT of data. Make a copy of data, Compute the FFT, then - /// the inverse and compare to the original. Returns the rms difference. - /// - public static double test(double[] data) - { - int nd = data.Length; - // Make duplicate for comparison - double[] copy = new double[nd]; - Array.Copy(data, 0, copy, 0, nd); - // Transform & invert - transform(data); - inverse(data); - // Compute RMS difference. - double diff = 0.0; - for (int i = 0; i < nd; i++) - { - double d = data[i] - copy[i]; - diff += d * d; - } - return Math.Sqrt(diff / nd); - } - - /// - /// Make a random array of n (complex) elements. - /// - public static double[] makeRandom(int n) - { - int nd = 2 * n; - double[] data = new double[nd]; - System.Random r = new System.Random(); - for (int i = 0; i < nd; i++) - data[i] = r.NextDouble(); - return data; - } - - protected internal static int log2(int n) - { - int log = 0; - for (int k = 1; k < n; k *= 2, log++) - ; - if (n != (1 << log)) - throw new Exception("FFT: Data length is not a power of 2!: " + n); - return log; - } - - protected internal static void transform_internal(double[] data, int direction) - { - if (data.Length == 0) - return; - int n = data.Length / 2; - if (n == 1) - return; - // Identity operation! - int logn = log2(n); - - /* bit reverse the input data for decimation in time algorithm */ - bitreverse(data); - - /* apply fft recursion */ - /* this loop executed log2(N) times */ - for (int bit = 0, dual = 1; bit < logn; bit++, dual *= 2) - { - double w_real = 1.0; - double w_imag = 0.0; - - double theta = 2.0 * direction * Math.PI / (2.0 * (double)dual); - double s = Math.Sin(theta); - double t = Math.Sin(theta / 2.0); - double s2 = 2.0 * t * t; - - /* a = 0 */ - for (int b = 0; b < n; b += 2 * dual) - { - int i = 2 * b; - int j = 2 * (b + dual); - - double wd_real = data[j]; - double wd_imag = data[j + 1]; - - data[j] = data[i] - wd_real; - data[j + 1] = data[i + 1] - wd_imag; - data[i] += wd_real; - data[i + 1] += wd_imag; - } - - /* a = 1 .. (dual-1) */ - for (int a = 1; a < dual; a++) - { - /* trignometric recurrence for w-> exp(i theta) w */ - { - double tmp_real = w_real - s * w_imag - s2 * w_real; - double tmp_imag = w_imag + s * w_real - s2 * w_imag; - w_real = tmp_real; - w_imag = tmp_imag; - } - for (int b = 0; b < n; b += 2 * dual) - { - int i = 2 * (b + a); - int j = 2 * (b + a + dual); - - double z1_real = data[j]; - double z1_imag = data[j + 1]; - - double wd_real = w_real * z1_real - w_imag * z1_imag; - double wd_imag = w_real * z1_imag + w_imag * z1_real; - - data[j] = data[i] - wd_real; - data[j + 1] = data[i + 1] - wd_imag; - data[i] += wd_real; - data[i + 1] += wd_imag; - } - } - } - } - - - protected internal static void bitreverse(double[] data) - { - /* This is the Goldrader bit-reversal algorithm */ - int n = data.Length / 2; - int nm1 = n - 1; - int i = 0; - int j = 0; - for (; i < nm1; i++) - { - //int ii = 2*i; - int ii = i << 1; - - //int jj = 2*j; - int jj = j << 1; - - //int k = n / 2 ; - int k = n >> 1; - - if (i < j) - { - double tmp_real = data[ii]; - double tmp_imag = data[ii + 1]; - data[ii] = data[jj]; - data[ii + 1] = data[jj + 1]; - data[jj] = tmp_real; - data[jj + 1] = tmp_imag; - } - - while (k <= j) - { - //j = j - k ; - j -= k; - - //k = k / 2 ; - k >>= 1; - } - j += k; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1-M11-Beta1/b39946/b39946.il b/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1-M11-Beta1/b39946/b39946.il deleted file mode 100644 index e6325d531fc8..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1-M11-Beta1/b39946/b39946.il +++ /dev/null @@ -1,328 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly ILGEN_0x5c383c7 {} -.class ILGEN_0x5c383c7 { - - -.field static unsigned int8[] field_0x0 -.field static int32[] field_0x1 -.field static int8 field_0x2 -.field static int64 field_0x3 -.field static unsigned int16[] field_0x4 -.field static float32[] field_0x5 -.field static unsigned int64[] field_0x7 - -.method static float32 Method_0xdab1c815(float32 Arg_0x0, unsigned int8 Arg_0x1, float32 Arg_0x2, int8 Arg_0x3, unsigned int64 Arg_0x4, unsigned int8 Arg_0x5, unsigned int32 Arg_0x6, int64 Arg_0x7) { -.maxstack 19 - - .locals (float32[] local_0x0,float64[] local_0x1,int64 local_0x2) -ldc.i4 255 - newarr [mscorlib]System.Single - stloc local_0x0 -ldc.i4 255 - newarr [mscorlib]System.Double - stloc local_0x1 - -Start_Orphan_0: -Start_Orphan_1: - ldarga Arg_0x7 - pop -End_Orphan_1: -Start_Orphan_2: - ldsfld float32[] ILGEN_0x5c383c7::field_0x5 - stsfld float32[] ILGEN_0x5c383c7::field_0x5 -End_Orphan_2: - ldloc local_0x2 - conv.i2 - pop -End_Orphan_0: - ldloc local_0x1 -Start_Orphan_3: -Start_Orphan_4: -Start_Orphan_5: -Start_Orphan_6: - nop -End_Orphan_6: - ldarga Arg_0x0 -Start_Orphan_7: - nop -End_Orphan_7: - ldc.i4.3 - conv.r8 - stind.r4 -End_Orphan_5: -Start_Orphan_8: - ldarg Arg_0x3 - starg Arg_0x6 -End_Orphan_8: - ldsfld int32[] ILGEN_0x5c383c7::field_0x1 -Start_Orphan_9: - nop -End_Orphan_9: - ldc.i4.3 - ldarg Arg_0x3 - xor - ldc.r4 float32(0x9f41529a) - conv.ovf.u2 - clt - ldelema [mscorlib]System.Int32 -Start_Orphan_a: - ldloc local_0x1 - ldc.i4.s 69 - ldelema [mscorlib]System.Double -Start_Orphan_b: - nop -End_Orphan_b: - ldc.r4 float32(0x8da3479e) - ldarg Arg_0x0 - add conv.r4 - stind.r8 -End_Orphan_a: -Start_Orphan_c: - nop -End_Orphan_c: - ldc.i4.5 - ldc.i4.1 - add - conv.ovf.u1 - not - stind.i -End_Orphan_4: -Start_Orphan_d: -Start_Orphan_e: - nop -End_Orphan_e: - ldloc local_0x0 - ldc.r4 float32(0x4dc5acd3) - conv.u4 - ldelema [mscorlib]System.Single - pop -End_Orphan_d: - ldsfld int32[] ILGEN_0x5c383c7::field_0x1 - ldlen - conv.u1 - newarr [mscorlib]System.Byte - stsfld unsigned int8[] ILGEN_0x5c383c7::field_0x0 -End_Orphan_3: - ldc.i4 0xe918ddce - ldelem.r8 -Start_Orphan_f: -Start_Orphan_10: -Start_Orphan_11: - ldsfld int32[] ILGEN_0x5c383c7::field_0x1 - ldc.i4.6 - ldc.i4.4 - stelem.i4 -End_Orphan_11: - ldsfld unsigned int64[] ILGEN_0x5c383c7::field_0x7 - ldc.i4.s -15 - ldelema [mscorlib]System.UInt64 - ldind.u8 - conv.i2 - starg Arg_0x6 -End_Orphan_10: -Start_Orphan_12: - nop -End_Orphan_12: - ldc.i4.7 - ldc.i4.6 - add - neg - ldarg Arg_0x3 - ceq - conv.u2 - conv.u1 - newarr [mscorlib]System.Byte -Start_Orphan_13: - ldsflda int64 ILGEN_0x5c383c7::field_0x3 - pop -End_Orphan_13: -Start_Orphan_14: -Start_Orphan_15: - ldloc local_0x1 - ldarg Arg_0x1 - ldelema [mscorlib]System.Double - pop -End_Orphan_15: -Start_Orphan_16: - nop -End_Orphan_16: - ldsfld int64 ILGEN_0x5c383c7::field_0x3 - ldc.i8 0xb58120274c655f85 - ldsfld int64 ILGEN_0x5c383c7::field_0x3 - div.un - sub.ovf - stloc local_0x2 -End_Orphan_14: -Start_Orphan_17: - ldsfld unsigned int8[] ILGEN_0x5c383c7::field_0x0 - ldsfld int8 ILGEN_0x5c383c7::field_0x2 - ldc.i4.0 - stelem.i1 -End_Orphan_17: - ldarg Arg_0x2 - conv.r8 - ckfinite - conv.i8 - conv.ovf.i - conv.i1 - ldelema [mscorlib]System.Byte - pop -End_Orphan_f: -Start_Orphan_18: -Start_Orphan_19: - ldc.i4.5 - ldc.i4.m1 - mul - conv.ovf.i8 - conv.ovf.i8 - starg Arg_0x4 -End_Orphan_19: -Start_Orphan_1c: - ldsfld unsigned int16[] ILGEN_0x5c383c7::field_0x4 -Start_Orphan_1e: - ldarga Arg_0x1 - pop -End_Orphan_1e: - ldc.i4.0 - conv.u - conv.ovf.u2 - ldc.i4.s 24 - conv.ovf.i2 - ldarg Arg_0x6 - and - stelem.i2 -End_Orphan_1c: - ldc.i4.6 - ldarg Arg_0x6 - add.ovf - ldc.i4.4 - conv.ovf.i1 - cgt -Start_Orphan_21: - ldc.i4.0 - stsfld int8 ILGEN_0x5c383c7::field_0x2 -End_Orphan_21: - ldc.i4.7 - ldsfld int8 ILGEN_0x5c383c7::field_0x2 - div - ldc.r4 float32(0x6b2f7336) - conv.ovf.u2 - or - clt.un - conv.ovf.u4 - conv.u1 - newarr [mscorlib]System.UInt64 - ldc.r8 float64(0xa6c5004c71818e) - conv.ovf.i - conv.ovf.i1.un - conv.ovf.i1.un -Start_Orphan_27: - ldc.i4.2 - conv.u1 - newarr [mscorlib]System.Int32 - ldc.i4.s 72 - ldc.i4.s -16 - add - ldc.i4.m1 - conv.ovf.i2 - stelem.i4 -End_Orphan_27: - ldc.r8 float64(0x9d7b1157b29312a1) - conv.r8 - ldc.i8 0x44819212b5bc07ec - conv.r4 - sub conv.r4 - ldarg Arg_0x0 - ldarg Arg_0x0 - sub conv.r4 - ldc.i4.8 - conv.r4 - rem conv.r4 - div conv.r4 - ldarga Arg_0x0 - ldind.r4 - ldc.i8 0x4ef8780366a2d301 - conv.r.un - add conv.r4 - ldarg Arg_0x7 - conv.r.un - ckfinite - div conv.r4 - cgt.un - ceq - ldc.i4.2 - conv.i - conv.i8 - not - stelem.i8 -End_Orphan_18: - ldloc local_0x1 -Start_Orphan_39: - ldarga Arg_0x4 - ldc.i8 0x1e9183552a8439b4 - stind.i8 -End_Orphan_39: - ldc.i4.s -80 - conv.ovf.i8 -Start_Orphan_3b: - ldarg Arg_0x4 - conv.ovf.u - conv.u1 - newarr [mscorlib]System.Byte - stsfld unsigned int8[] ILGEN_0x5c383c7::field_0x0 -End_Orphan_3b: - ldc.i4.3 - conv.ovf.i4.un -Start_Orphan_44: - ldsfld int8 ILGEN_0x5c383c7::field_0x2 - starg Arg_0x5 -End_Orphan_44: - ldc.i4 0xfe559194 - ldc.i4 0x678622e7 - conv.ovf.i2 - clt.un - add - conv.i8 - ceq - ldelema [mscorlib]System.Double - ldind.r8 - mul conv.r4 -ret -} -.method static int32 Main() { -.entrypoint -.maxstack 20 -.try { -ldc.r4 float32(0xd750d2d2) -ldc.i4 0x581312c8 -ldc.r4 float32(0x30c249c1) -ldc.i4 0x82adc1e7 -ldc.i8 0xff262efbfd511c87 -ldc.i4 0x50ed1f3a -ldc.i4 0xbbbaab3f -ldc.i8 0xdf6ade5f8fc91e19 - -call float32 ILGEN_0x5c383c7::Method_0xdab1c815(float32 Arg_0x0, unsigned int8 Arg_0x1, float32 Arg_0x2, int8 Arg_0x3, unsigned int64 Arg_0x4, unsigned int8 Arg_0x5, unsigned int32 Arg_0x6, int64 Arg_0x7) -conv.i4 -pop - - leave a1 -} catch [mscorlib]System.NullReferenceException { - pop - leave a1 -} -a1: -ldc.i4 100 - ret -} - -} diff --git a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1-M11-Beta1/b40347/b40347.il b/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1-M11-Beta1/b40347/b40347.il deleted file mode 100644 index 464a26d8f7d8..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1-M11-Beta1/b40347/b40347.il +++ /dev/null @@ -1,54 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly 'SignExpand'// as "SignExpand.exe" -{ - -} -.class public C -{ - .method public static int32 main() - { - .entrypoint - .maxstack 10 - - .locals(int8[] x) - - ldc.i4 20 - newarr int8 - stloc x - - ldloc x - ldc.i4 0 - ldc.i4 -20 - stelem.i1 - - ldloc x - ldc.i4 0 - ldelem.i1 - call void [System.Console]System.Console::WriteLine(int32) - - ldloc x - ldc.i4 0 - ldelema int8 - ldind.i1 - call void [System.Console]System.Console::WriteLine(int32) - - ldloc x - ldc.i4 0 - ldelema int8 - ldobj int8 - call void [System.Console]System.Console::WriteLine(int32) - ldc.i4 100 - ret - } - -} - diff --git a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1-M11-Beta1/b43313/Desktop/b43313.cs b/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1-M11-Beta1/b43313/Desktop/b43313.cs deleted file mode 100644 index 59df7fda931d..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1-M11-Beta1/b43313/Desktop/b43313.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace Test -{ - using System; - - class OtherException : Exception - { - } - - internal struct AA - { - private static float[] s_afStatic1; - - private static void Main1() - { - ulong[] param2 = new ulong[10]; - uint[] local5 = new uint[7]; - try - { - try - { - int[] local8 = new int[7]; - try - { - //....... - } - catch (IndexOutOfRangeException) - { - do - { - //....... - } while (s_afStatic1[233] > 0.0); - } - while (0 != local5[205]) - return; - } - catch (Exception) - { - float[] local10 = new float[7]; - while ((int)param2[168] != 1) - { - float[] local11 = new float[7]; - } - } - } - catch (OtherException) { } - } - private static int Main() - { - try - { - Main1(); - return -1; - } - catch (IndexOutOfRangeException) - { - return 100; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1-M11-Beta1/b43313/b43313.cs b/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1-M11-Beta1/b43313/b43313.cs deleted file mode 100644 index 0528c1793020..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1-M11-Beta1/b43313/b43313.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -namespace Test -{ - using System; - - struct AA - { - static float[] m_afStatic1; - - static void Main1() - { - ulong[] param2 = new ulong[10]; - uint[] local5 = new uint[7]; - try - { - try - { - int[] local8 = new int[7]; - try - { - //....... - } - catch (Exception) - { - do - { - //....... - } while (m_afStatic1[233] > 0.0); - } - while (0 != local5[205]) - return; - } - catch (IndexOutOfRangeException) - { - float[] local10 = new float[7]; - while ((int)param2[168] != 1) - { - float[] local11 = new float[7]; - } - } - } - catch (NullReferenceException) { } - } - static int Main() - { - try - { - Main1(); - return -1; - } - catch (IndexOutOfRangeException) - { - return 100; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b40347/b40347.il b/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b40347/b40347.il deleted file mode 100644 index fc1294ead3eb..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b40347/b40347.il +++ /dev/null @@ -1,51 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly b40347 { } -.class public C -{ - .method public static int32 main() - { - .entrypoint - .maxstack 10 - - .locals(int8[] x) - - ldc.i4 20 - newarr int8 - stloc x - - ldloc x - ldc.i4 0 - ldc.i4 -20 - stelem.i1 - - ldloc x - ldc.i4 0 - ldelem.i1 - call void [System.Console]System.Console::WriteLine(int32) - - ldloc x - ldc.i4 0 - ldelema int8 - ldind.i1 - call void [System.Console]System.Console::WriteLine(int32) - - ldloc x - ldc.i4 0 - ldelema int8 - ldobj int8 - call void [System.Console]System.Console::WriteLine(int32) - ldc.i4 100 - ret - } - -} - diff --git a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b51875/Desktop/b51875.cs b/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b51875/Desktop/b51875.cs deleted file mode 100644 index edab1997801b..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b51875/Desktop/b51875.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace Test -{ - using System; - using System.Collections; - - internal struct AA - { - public static int Main1() - { - AA[] local1 = new AA[10]; - try - { - goto EOM; - } - finally - { - throw new Exception(); - } - EOM: - if (new Queue(10).Clone() == null) - return 1; - return 0; - } - public static int Main() - { - try - { - Main1(); - return 101; - } - catch (Exception) - { - return 100; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b51875/b51875.cs b/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b51875/b51875.cs deleted file mode 100644 index 12531cc7cdd8..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b51875/b51875.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - -using System; -using System.Collections; - - -namespace Test -{ - internal struct AA - { - public static int Main1() - { - AA[] local1 = new AA[10]; - try - { - goto EOM; - } - finally - { - throw new Exception(); - } - EOM: - if (((Array)new Object()).Clone() == null) - return 1; - return 0; - } - public static int Main() - { - try - { - Main1(); - return 101; - } - catch (Exception) - { - return 100; - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b55197/Desktop/b55197.cs b/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b55197/Desktop/b55197.cs deleted file mode 100644 index 3085f89c1428..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b55197/Desktop/b55197.cs +++ /dev/null @@ -1,151 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace Test -{ - using System; - - public enum TestEnum - { - red = 1, - green = 2, - blue = 4, - } - - // In the original program ApplicationException was used, but for the - // the purposes of this test any exception other than the one thrown works. - class OtherException : Exception - { - } - - public class BB - { - } - - public struct AA - { - public uint Method1(int[] param1) - { - uint[] local3 = new uint[1]; - long local4 = App.m_lFwd1; - { - float[] local5 = new float[] { 108.0f }; - { - byte[] local7 = new byte[] { }; - sbyte local8 = App.m_sbFwd3; - long local9 = App.m_lFwd1; - sbyte[] local10 = (new sbyte[4]); - App.m_asbFwd6 = (new sbyte[111]); - try - { - sbyte[] local11 = new sbyte[] { }; - throw new Exception(); - } - catch (OtherException) { } - } - { - sbyte local7 = App.m_sbFwd3; - String[] local8 = new String[] { }; - char[] local9 = (new char[81]); - BB local10 = new BB(); - object[] local11 = new object[] { null, null, null, null, null }; - double[] local12 = new double[] { 109.0 }; - { - BB[] local13 = (new BB[22]); - sbyte local14 = App.m_sbFwd3; - ulong[] local15 = App.m_aulFwd7; - for (long[] b244656 = new long[] { local4 }; App.m_bFwd2;) - { - int[] local16 = (new int[30]); - TestEnum local17 = new TestEnum(); - BB local18 = new BB(); - float local19 = 55.0f; - BB local20 = new BB(); - local15 = (new ulong[77]); - } - } - } - if (App.m_bFwd2) - { - try - { - TestEnum local7 = new TestEnum(); - String local8 = "109"; - bool local9 = false; - float local10 = 110.0f; - long[] local11 = App.m_alFwd8; - TestEnum[] local12 = new TestEnum[] { new TestEnum(), new TestEnum() }; - byte[] local13 = App.m_abFwd9; - throw new IndexOutOfRangeException(); - } - finally - { - Array[] local7 = App.m_axFwd10; - String local8 = "122"; - float local9 = 22.0f; - int[] local10 = (new int[69]); - String[] local11 = (new String[75]); - ulong[] local12 = (new ulong[81]); - uint local13 = 67u; - while (App.m_bFwd2) - { - int[] local14 = new int[] { 1, 50, 79 }; - byte[] local15 = App.m_asiFwd11; - ulong[] local16 = (new ulong[20]); - } - } - } - } - { - int local5 = 18; - object local6 = null; - ulong[] local7 = App.m_aulFwd7; - TestEnum local8 = new TestEnum(); - long[] local9 = App.m_alFwd8; - sbyte[] local10 = App.m_asuFwd12; - try - { - char[] local11 = new char[] { '\x25' }; - byte[] local12 = App.m_asiFwd11; - double local13 = (0.0); - throw new NullReferenceException(); - } - catch (Exception) - { - } - } - return 72u; - } - } - - internal class App - { - private static int Main() - { - try - { - new AA().Method1(new int[1]); - return 1; - } - catch (Exception) - { - return 100; - } - } - - public static long m_lFwd1; - public static bool m_bFwd2; - public static sbyte m_sbFwd3; - public static int m_iFwd4; - public static char m_cFwd5; - public static sbyte[] m_asbFwd6; - public static ulong[] m_aulFwd7; - public static long[] m_alFwd8; - public static byte[] m_abFwd9; - public static Array[] m_axFwd10; - public static byte[] m_asiFwd11; - public static sbyte[] m_asuFwd12; - public static sbyte m_suFwd13; - } -} diff --git a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b55197/b55197.cs b/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b55197/b55197.cs deleted file mode 100644 index c975ab9ef46c..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b55197/b55197.cs +++ /dev/null @@ -1,147 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -namespace Test -{ - using System; - - public enum TestEnum - { - red = 1, - green = 2, - blue = 4, - } - - public class BB - { - } - - public struct AA - { - public uint Method1(int[] param1) - { - uint[] local3 = new uint[1]; - long local4 = App.m_lFwd1; - { - float[] local5 = new float[] { 108.0f }; - { - byte[] local7 = new byte[] { }; - sbyte local8 = App.m_sbFwd3; - long local9 = App.m_lFwd1; - sbyte[] local10 = (new sbyte[4]); - App.m_asbFwd6 = (new sbyte[111]); - try - { - sbyte[] local11 = new sbyte[] { }; - throw new Exception(); - } - catch (ArgumentException) { } - } - { - sbyte local7 = App.m_sbFwd3; - String[] local8 = new String[] { }; - char[] local9 = (new char[81]); - BB local10 = new BB(); - object[] local11 = new object[] { null, null, null, null, null }; - double[] local12 = new double[] { 109.0 }; - { - BB[] local13 = (new BB[22]); - sbyte local14 = App.m_sbFwd3; - ulong[] local15 = App.m_aulFwd7; - //for (new long[]{ local4 }; App.m_bFwd2; ) - not a valid statement, see VS7 #244656. - for (long[] b244656 = new long[] { local4 }; App.m_bFwd2; ) - { - int[] local16 = (new int[30]); - TestEnum local17 = new TestEnum(); - BB local18 = new BB(); - float local19 = 55.0f; - BB local20 = new BB(); - local15 = (new ulong[77]); - } - } - } - if (App.m_bFwd2) - { - try - { - TestEnum local7 = new TestEnum(); - String local8 = "109"; - bool local9 = false; - float local10 = 110.0f; - long[] local11 = App.m_alFwd8; - TestEnum[] local12 = new TestEnum[] { new TestEnum(), new TestEnum() }; - byte[] local13 = App.m_abFwd9; - throw new IndexOutOfRangeException(); - } - finally - { - Array[] local7 = App.m_axFwd10; - String local8 = "122"; - float local9 = 22.0f; - int[] local10 = (new int[69]); - String[] local11 = (new String[75]); - ulong[] local12 = (new ulong[81]); - uint local13 = 67u; - while (App.m_bFwd2) - { - int[] local14 = new int[] { 1, 50, 79 }; - byte[] local15 = App.m_asiFwd11; - ulong[] local16 = (new ulong[20]); - } - } - } - } - { - int local5 = 18; - object local6 = null; - ulong[] local7 = App.m_aulFwd7; - TestEnum local8 = new TestEnum(); - long[] local9 = App.m_alFwd8; - sbyte[] local10 = App.m_asuFwd12; - try - { - char[] local11 = new char[] { '\x25' }; - byte[] local12 = App.m_asiFwd11; - double local13 = (0.0); - throw new NullReferenceException(); - } - catch (Exception) - { - } - } - return 72u; - } - } - - class App - { - static int Main() - { - try - { - new AA().Method1(new int[1]); - return 1; - } - catch (Exception) - { - return 100; - } - } - - public static long m_lFwd1; - public static bool m_bFwd2; - public static sbyte m_sbFwd3; - public static int m_iFwd4; - public static char m_cFwd5; - public static sbyte[] m_asbFwd6; - public static ulong[] m_aulFwd7; - public static long[] m_alFwd8; - public static byte[] m_abFwd9; - public static Array[] m_axFwd10; - public static byte[] m_asiFwd11; - public static sbyte[] m_asuFwd12; - public static sbyte m_suFwd13; - } -} diff --git a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1.1-M1-Beta1/b130333/byteshift.cs b/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1.1-M1-Beta1/b130333/byteshift.cs deleted file mode 100644 index 7b3bef15859f..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1.1-M1-Beta1/b130333/byteshift.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -namespace Test -{ - public class ShiftTest - { - public byte data = 0xF0; - } - - public class Test - { - public static int Main() - { - Console.WriteLine("Both results should be 15"); - // This works - byte dataByte = 0xF0; - dataByte >>= 4; // becomes 0x0F - Console.WriteLine(dataByte); - - // This gives wrong result - ShiftTest shiftTest = new ShiftTest(); - shiftTest.data >>= 4; // becomes 0xFF - Console.WriteLine(shiftTest.data); - - if (shiftTest.data != 0x0F) - { - Console.WriteLine("FAILED"); - return 1; - } - else - { - Console.WriteLine("PASSED"); - return 100; - } - } - } - -} - - diff --git a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-Beta1/b147924/bigdat.il b/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-Beta1/b147924/bigdat.il deleted file mode 100644 index 47b4a1cabba8..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-Beta1/b147924/bigdat.il +++ /dev/null @@ -1,43 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - -.assembly BIGDAT {} -.assembly extern mscorlib -{ -} -.module BIGDAT -.class public 'BIGDAT' -{ - .class nested private ansi explicit WS_TYPE - { - .field [100000008] public object EXCEPTION_OBJECT_00000242 - .size 100000016 - .method public specialname rtspecialname instance void .ctor () - { - ldarg.0 - call instance void object ::.ctor () - ret - } - } - .field static private class BIGDAT/WS_TYPE WS_DATA - - .method static public int32 BIGDAT() - { - .entrypoint - newobj instance void BIGDAT/WS_TYPE::.ctor () - stsfld class BIGDAT/WS_TYPE BIGDAT::WS_DATA - - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - - ldc.i4 100 - ret - } -} diff --git a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-Beta1/b180381/constrained2.il b/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-Beta1/b180381/constrained2.il deleted file mode 100644 index cf9cfa30ce1c..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-Beta1/b180381/constrained2.il +++ /dev/null @@ -1,54 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly constrained -{ -} -.class public auto ansi beforefieldinit Test - extends [mscorlib]System.Object -{ - .method public hidebysig static void M<([mscorlib]System.Object) T>(!!0 t) cil managed - { - // Code size 21 (0x15) - .maxstack 1 - .locals init (class [mscorlib]System.Type V_0) - IL_0000: ldarga.s t - IL_0002: constrained. !!0 - IL_0008: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_000d: stloc.0 - IL_000e: ldloc.0 - IL_000f: call void [System.Console]System.Console::WriteLine(object) - IL_0014: ret - } // end of method Test::M - - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - // Code size 17 (0x11) - .maxstack 8 - IL_0000: ldstr "Hello" - IL_0005: call void Test::M(!!0) - IL_000a: ldc.i4.3 - IL_000b: call void Test::M(!!0) - IL_0010: ldc.i4 100 - ret - } // end of method Test::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method Test::.ctor - -} diff --git a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-Beta1/b220968/1.il b/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-Beta1/b220968/1.il deleted file mode 100644 index 90c4fa059a09..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-Beta1/b220968/1.il +++ /dev/null @@ -1,60 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly ILGEN_0x5c19e96e {} -.assembly extern mscorlib{auto} -.class ILGEN_0x5c19e96e { -.method static int32 Main() { -.entrypoint -.try -{ -call int32 ILGEN_0x5c19e96e::f() -leave FAIL -} -catch [mscorlib]System.OverflowException -{ -leave PASS -} -FAIL: -ldc.i4 1 -ret -PASS: -ldc.i4 100 -ret -} -.method static int32 f() { -.maxstack 7 - - ldc.r4 3.2 - conv.r8 - ldc.r4 3.1 - conv.r8 - bge Branch_0x2 - ldc.r4 2.1 - br Branch_0x3 - Branch_0x2: - ldc.r4 2.2 - Branch_0x3: - - - ldc.i4.0 - ldc.i4 1 - ldc.i4 2 - sub.ovf.un - beq Branch_0x6 - ldc.r4 1.2 - br Branch_0x7 - Branch_0x6: - ldc.r4 1.1 - Branch_0x7: - - beq Branch_0x0 - ldc.i4 55 - br Branch_0x1 - Branch_0x0: - ldc.i4.0 - Branch_0x1: - ret -} -} diff --git a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-Beta1/b223924/bug2.il b/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-Beta1/b223924/bug2.il deleted file mode 100644 index 6eefb7bd79eb..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-Beta1/b223924/bug2.il +++ /dev/null @@ -1,71 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - -.assembly ILGEN_0xef3a9aea {} -.assembly extern mscorlib{auto} -.class ILGEN_0xef3a9aea { - -.method static int64 Method_0x40026544(native int Arg_0x1, float64 Arg_0x2) { -.maxstack 17 - ldarg Arg_0x2 - ldc.r4 22.2 - conv.r4 - bgt Branch_0x6 - ldc.i8 0x9abaadc234298901 - ldarg Arg_0x1 - brfalse Branch_0xe - ldc.i8 0x9652fa5b635e909 - br Branch_0xf - Branch_0xe: - ldc.i8 0xb85e2c6058bfb361 - Branch_0xf: - bge.un Branch_0xa - ldc.i8 0x6f20f8413c7d23d9 - br Branch_0xb - Branch_0xa: - ldc.i8 0xcdde792763aac4bd - conv.ovf.i8.un - Branch_0xb: - pop - Branch_0x6: - ldc.i8 0x9ac29bfd47019ed5 - ret -} -.method static int32 Main() { -.entrypoint -.maxstack 27 -.try -{ - ldc.i4 0x80178e7f conv.i - ldc.r8 float64(0xad917f3e7f4e476) - call int64 ILGEN_0xef3a9aea::Method_0x40026544(native int Arg_0x1, float64 Arg_0x2) - leave FAIL -} -catch [mscorlib]System.OverflowException -{ - ldstr "System.OverflowException caught as expected" - call void [System.Console]System.Console::WriteLine(string) - leave PASS -} - -FAIL: -ldc.i4 1 - ldstr "FAIL" - call void [System.Console]System.Console::WriteLine(string) -ret - -PASS: -ldc.i4 100 - ldstr "PASS" - call void [System.Console]System.Console::WriteLine(string) -ret - -} -} diff --git a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-Beta1/b223936/bug4.il b/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-Beta1/b223936/bug4.il deleted file mode 100644 index 9d6abc432056..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-Beta1/b223936/bug4.il +++ /dev/null @@ -1,64 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - -.assembly ILGEN_0xca498c54 {} -.assembly extern mscorlib{auto} -.class ILGEN_0xca498c54 { -.method static unsigned int64 Method_0x570110b9(float64 Arg_0x0, float32 Arg_0x1, unsigned int32 Arg_0x2, int8 Arg_0x3, int8 Arg_0x4, int64 Arg_0x5, unsigned int16 Arg_0x6, int64 Arg_0x7, unsigned int64 Arg_0x8, int8 Arg_0x9, int8 Arg_0xa, int8 Arg_0xb, float32 Arg_0xc, int8 Arg_0xd) { -.maxstack 11 - ldc.i4.s -126 - conv.ovf.u4 - pop - ldc.i8 55 - ret -} -.method static int32 Main() { -.entrypoint -.maxstack 29 -.try -{ - ldc.r8 float64(0x63a3c50863c4bb60) - ldc.r4 float32(0xf4e2d3f8) - ldc.i4 0x4db0e12f - ldc.i4 0x873f41c7 - ldc.i4 0x38599105 - ldc.i8 0xbe807358cb81937e - ldc.i4 0xf41d1542 - ldc.i8 0x6defe9d363de3cca - ldc.i8 0x8d158419c9455a68 - ldc.i4 0x53d7df8a - ldc.i4 0x9e5c4c2d - ldc.i4 0xeadce12d - ldc.r4 float32(0xc6c8a672) - ldc.i4 0xc0557631 - call unsigned int64 ILGEN_0xca498c54::Method_0x570110b9(float64 Arg_0x0, float32 Arg_0x1, unsigned int32 Arg_0x2, int8 Arg_0x3, int8 Arg_0x4, int64 Arg_0x5, unsigned int16 Arg_0x6, int64 Arg_0x7, unsigned int64 Arg_0x8, int8 Arg_0x9, int8 Arg_0xa, int8 Arg_0xb, float32 Arg_0xc, int8 Arg_0xd) - leave FAIL -} -catch [mscorlib]System.OverflowException -{ - ldstr "System.OverflowException caught as expected" - call void [System.Console]System.Console::WriteLine(string) - leave PASS -} - -FAIL: -ldc.i4 1 - ldstr "FAIL" - call void [System.Console]System.Console::WriteLine(string) -ret - -PASS: -ldc.i4 100 - ldstr "PASS" - call void [System.Console]System.Console::WriteLine(string) -ret - -} -} diff --git a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M01/b07211/byteshift.cs b/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M01/b07211/byteshift.cs deleted file mode 100644 index 890ba5091a76..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M01/b07211/byteshift.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -namespace Test -{ - public class ShiftTest - { - public byte data = 0xF0; - } - - public class Test - { - public static int Main() - { - Console.WriteLine("Both results should be 15"); - // This works - byte dataByte = 0xF0; - dataByte >>= 4; // becomes 0x0F - Console.WriteLine(dataByte); - - // This gives wrong result - ShiftTest shiftTest = new ShiftTest(); - shiftTest.data >>= 4; // becomes 0xFF - Console.WriteLine(shiftTest.data); - - if (shiftTest.data != 0xF) - return 1; - else - return 100; - } - } - -} - - diff --git a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b102962/t.il b/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b102962/t.il deleted file mode 100644 index 9c389683cbd7..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b102962/t.il +++ /dev/null @@ -1,37 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly b102962a {} -.method public static int32 - main() cil managed -{ - .entrypoint - .maxstack 2 - .locals init (unsigned int8& V_0, - string V_1, - char& V_2) - IL_0000: ldnull - IL_0001: stloc.1 - IL_0002: ldstr "hello" - IL_0007: stloc.1 - IL_0008: ldloc.1 - IL_0009: stloc.0 - IL_000a: ldloc.0 - IL_000b: ldc.i4.s 12 - IL_000d: add - IL_000e: stloc.0 - IL_000f: ldloc.0 - IL_0010: stloc.2 - IL_0011: ldloc.2 - IL_0012: ldind.u2 - IL_0013: call void [System.Console]System.Console::WriteLine(char) - IL_0018: ldc.i4 100 - IL_0019: ret -} \ No newline at end of file diff --git a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b102962/t2.il b/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b102962/t2.il deleted file mode 100644 index ff9b192fab71..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b102962/t2.il +++ /dev/null @@ -1,53 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly b102962b {} -.method public static char & - PtrToStringChars(string s) cil managed -{ - // Code size 19 (0x13) - .maxstack 2 - .locals init (unsigned int8 & V_0, - unsigned int32 V_1) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: brfalse.s IL_000f - - IL_0005: call int32 [mscorlib]System.Runtime.CompilerServices.RuntimeHelpers::get_OffsetToStringData() - IL_000a: stloc.1 - IL_000b: ldloc.0 - IL_000c: ldloc.1 - IL_000d: add - IL_000e: stloc.0 - IL_000f: ldloc.0 - IL_0010: br.s IL_0012 - - IL_0012: ret -} // end of global method PtrToStringChars - -.method public static int32 - main() cil managed -{ - .entrypoint - // Code size 21 (0x15) - .maxstack 1 - .locals init (string V_0, - char & V_1) - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldstr "hello" - IL_0007: stloc.0 - IL_0008: ldstr "Hello" - IL_000d: call char & PtrToStringChars(string ) - IL_0012: stloc.1 - IL_0013: ldc.i4 100 - IL_0014: ret -} diff --git a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b115932/t.il b/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b115932/t.il deleted file mode 100644 index c8753c9b594e..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b115932/t.il +++ /dev/null @@ -1,28 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly t {} -.method public static int32 Main() cil managed -{ - .entrypoint - .maxstack 2 - .locals init (string V_0, - uint8& V_1) - ldstr "aaa" - stloc.0 - ldloc.0 - stloc.1 - ldloc.1 - conv.i4 - call string [mscorlib]System.Convert::ToString(int32) - call void [System.Console]System.Console::WriteLine(string) - ldc.i4 100 - ret -} diff --git a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b115932/t1.il b/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b115932/t1.il deleted file mode 100644 index 32a1ba8366db..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b115932/t1.il +++ /dev/null @@ -1,28 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly t1 {} -.module t1.exe -.method public static int32 foo() cil managed -{ - .entrypoint - .maxstack 2 - .locals init (string V_0, - int32& V_1) - IL_0002: ldstr "aaa" - IL_0007: stloc.0 - IL_0008: ldloc.0 - IL_0009: stloc.1 - IL_000a: ldloc.1 - ldind.i4 - IL_0012: call void [System.Console]System.Console::WriteLine(int32) - ldc.i4 100 - IL_0017: ret -} diff --git a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b091942/nullref.il b/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b091942/nullref.il deleted file mode 100644 index 7c13dc9e8c72..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b091942/nullref.il +++ /dev/null @@ -1,270 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// ASURT 149071 -// VSWHIDBEY 91942 - - -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly d -{ -} -.module d.exe - -.class public explicit ansi beforefieldinit BigClass -{ - .field [0] public int32 firstField - .field [0x7FFFFF9] public int32 lastField - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } -} - -.class public explicit ansi sealed value beforefieldinit BigStruct -{ - .field [0] public int32 firstField - .field [0x100] public int32 someField -// .field [0x31C1FFF] public int32 lastField - .field [0x31C2000] public int32 lastField -} - -.class public auto ansi beforefieldinit TestClass - extends [mscorlib]System.Object -{ -// Global field to store the the big class -.field static class BigClass s_bigClass - -// Global field to store the the big struct -.field static valuetype BigStruct s_bigStruct - - .method public hidebysig static int32 Main(string [] args) cil managed - { - .entrypoint - .locals init (int32 retValue) - - ldarg.0 - call bool TestClass::Test1(string [] args) - brfalse.s FAILED - - ldarg.0 - call bool TestClass::Test2(string [] args) - brfalse.s FAILED - - ldarg.0 - call bool TestClass::Test3(string [] args) - brfalse.s FAILED - -PASSED: - - ldstr "Test PASSED. Exit Code=100" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.s 100 - stloc.0 - br.s RET - -FAILED: - ldc.i4.s 101 - stloc.0 - -RET: - ldloc.0 - ret - } // end of method TestClass::Main - - .method public hidebysig static void RunTest1(string [] args) cil managed - { - .locals init (int32 val) -// adding some conditional code so the JIT can't optimize it - - ldarg.0 - ldlen - conv.i4 - ldc.i4.s 100 - beq.s FALSE - -STNULL: ldnull - stsfld class BigClass TestClass::s_bigClass - br.s NEXT - -FALSE: newobj instance void BigClass::.ctor() - stsfld class BigClass TestClass::s_bigClass - -NEXT: ldsfld class BigClass TestClass::s_bigClass - ldfld int32 BigClass::lastField - stloc.0 - - IL_0000: ret - } - - .method public hidebysig static bool Test1(string [] args) cil managed - { - .locals init (bool retValue) - ldstr "Running Test1: Using a class with a big offset field" - call void [System.Console]System.Console::WriteLine(string) - .try - { - ldarg.0 - call void TestClass::RunTest1(string [] args) - leave.s FAILED - } catch [mscorlib] System.NullReferenceException - { - pop - ldstr "Test1 PASSED: expected NullReferenceException" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.s 1 - stloc.0 - leave.s RET - } - -FAILED: - ldstr "Test1 FAILED: NullReferenceException has not been thrown" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.s 0 - stloc.0 - -RET: - ldloc.0 - ret - } - - .method public hidebysig static void RunTest2(string [] args) cil managed - { - .locals init (valuetype BigStruct &pBigStruct, int32 val) -// adding some conditional code so the JIT can't optimize it - - ldarg.0 - ldlen - conv.i4 - ldc.i4.s 100 - beq.s FALSE - - br.s NEXT - -FALSE: ldsflda valuetype BigStruct TestClass::s_bigStruct - stloc.0 - -NEXT: ldloc.0 - ldfld int32 BigStruct::someField - - stloc.1 - - ldstr "Value: {0}" - ldloc.1 - box [mscorlib]System.Int32 - call void [System.Console]System.Console::WriteLine(string, object) - - IL_0000: ret - } - - .method public hidebysig static bool Test2(string [] args) cil managed - { - .locals init (bool retValue) - ldstr "Running Test2: Using a valuetype with a not so big offset field" - call void [System.Console]System.Console::WriteLine(string) - .try - { - ldarg.0 - call void TestClass::RunTest2(string [] args) - leave.s FAILED - } catch [mscorlib] System.NullReferenceException - { - pop - ldstr "Test2 PASSED: expected NullReferenceException" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.s 1 - stloc.0 - leave.s RET - } - -FAILED: - ldstr "Test2 FAILED: NullReferenceException has not been thrown" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.s 0 - stloc.0 - -RET: - ldloc.0 - ret - } - - .method public hidebysig static void RunTest3(string [] args) cil managed - { - .locals init (valuetype BigStruct &pBigStruct, int32 prevVal, int32 newVal) -// adding some conditional code so the JIT can't optimize it - - ldarg.0 - ldlen - conv.i4 - ldc.i4.s 100 - beq.s FALSE - - br.s NEXT - -FALSE: ldsflda valuetype BigStruct TestClass::s_bigStruct - stloc.0 - -NEXT: ldloc.0 - ldfld int32 BigStruct::lastField - stloc.1 - -// store the new value to the memory location - ldloc.0 - ldc.i4.s 11 - stfld int32 BigStruct::lastField - - ldloc.0 - ldfld int32 BigStruct::lastField - stloc.1 - - ldstr "Previous value: {0} - new value: {1}" - ldloc.2 - box [mscorlib]System.Int32 - ldloc.1 - box [mscorlib]System.Int32 - call void [System.Console]System.Console::WriteLine(string, object, object) - - IL_0000: ret - } - - .method public hidebysig static bool Test3(string [] args) cil managed - { - .locals init (bool retValue) - ldstr "Running Test3: Using a valuetype with a big offset field" - call void [System.Console]System.Console::WriteLine(string) - .try - { - ldarg.0 - call void TestClass::RunTest3(string [] args) - leave.s FAILED - } catch [mscorlib] System.NullReferenceException - { - pop - ldstr "Test3 PASSED: expected NullReferenceException" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.s 1 - stloc.0 - leave.s RET - } - -FAILED: - ldstr "Test3 FAILED: NullReferenceException has not been thrown" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.s 0 - stloc.0 - -RET: - ldloc.0 - ret - } -} diff --git a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b321799/repro.cs b/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b321799/repro.cs deleted file mode 100644 index 8fb058483053..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b321799/repro.cs +++ /dev/null @@ -1,123 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.CompilerServices; - -class Exception1 : Exception { } - -class Exception2 : Exception { } - -delegate void NoArg(); - -class SmallRepro -{ - - [MethodImpl(MethodImplOptions.NoInlining)] - static void Throws1() - { - throw new Exception1(); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - static void Throws2() - { - throw new Exception2(); - } - - - static void Rethrows1() - { - try - { - Console.WriteLine("In Rethrows1"); - Throws1(); - } - catch (Exception e) - { - Console.WriteLine("Caught {0}, rethrowing", e); - throw; - } - } - - static void CatchAll() - { - try - { - Console.WriteLine("In CatchAll"); - Throws2(); - } - catch - { - Console.WriteLine("Caught something"); - } - } - - static void Finally() - { - try - { - Console.WriteLine("In Finally"); - Rethrows1(); - Console.WriteLine("Unreached"); - } - finally - { - Console.WriteLine("In Finally funclet (1), Exception1 should be in-flight"); - CatchAll(); - Console.WriteLine("In Finally funclet (2), Exception1 should be in-flight"); - } - } - - static int Main() - { - bool bPassed = true; - // Works - Console.WriteLine("!!!!!!!!!!!!!!!!! Start Direct Call case !!!!!!!!!!!!!!!!!!!!!!!"); - try - { - Finally(); - } - catch (Exception e) - { - if (e is Exception1) - { - Console.WriteLine("Caught Exception1"); - Console.WriteLine("Pass direct call"); - } - else - { - Console.WriteLine("!!!! Fail direct call !!!!"); - Console.WriteLine("Caught {0}", e); - bPassed = false; - } - } - Console.WriteLine(); - Console.WriteLine(); - - // Doesn't work - Console.WriteLine("!!!!!!!!!!!!!!! Start Dynamic Invoke case !!!!!!!!!!!!!!!!!!!!!!"); - try - { - new NoArg(Finally).DynamicInvoke(null); - } - catch (Exception e) - { - if (e.InnerException is Exception1) - { - Console.WriteLine("Caught Exception1"); - Console.WriteLine("Pass Dynamic Invoke"); - } - else - { - Console.WriteLine("!!!! Fail Dynamic Invoke !!!!"); - Console.WriteLine("Caught {0}", e.InnerException); - bPassed = false; - } - } - if (bPassed) return 100; - return 1; - } -} diff --git a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b374944/helper.il b/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b374944/helper.il deleted file mode 100644 index 22cdcfbed1fc..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b374944/helper.il +++ /dev/null @@ -1,54 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly helper {} -.module helper.exe - - -.class private auto ansi beforefieldinit Helper - extends [mscorlib]System.Object -{ - - .method public hidebysig newslot virtual instance void - MyFunc<([mscorlib]System.Object) T>() cil managed - { - ret - } - -} - - -.method private hidebysig static int32 Main() cil managed -{ - .entrypoint - .locals init (native int v_0, int32 v_1) - - ldc.i4.m1 - stloc.1 - - .try { - ldnull - ldvirtftn instance void Helper::MyFunc() - leave.s EXIT - } - catch [mscorlib]System.NullReferenceException - { - ldc.i4 100 - stloc.1 - ldstr "pass" - call void [System.Console]System.Console::WriteLine(string) - leave.s EXIT - } - -EXIT: - - ldloc.1 - ret -} diff --git a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b423721/c1.cs b/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b423721/c1.cs deleted file mode 100644 index fda307f809e4..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b423721/c1.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Runtime.CompilerServices; - -namespace Test -{ - - public class C1 - { - - public static string GetString() - { - return "foo"; - } - } - - public class C1Helper - { - public static bool IsFoo(string val) - { - return ((object)"foo" == (object)val); - } - } - -} diff --git a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b423755/Desktop/b423755.il b/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b423755/Desktop/b423755.il deleted file mode 100644 index 0d4481eb6ecd..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b423755/Desktop/b423755.il +++ /dev/null @@ -1,28 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - -.assembly 'test' { -} - -.method public static int32 Main() -{ - .entrypoint - ldc.i4 0 - box int8 - unbox.any int8 - pop - - ldstr "Test SUCCESS" - call void [System.Console]System.Console::WriteLine(string) - - ldc.i4 100 - ret -} diff --git a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b423755/b423755.il b/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b423755/b423755.il deleted file mode 100644 index 9291c19f3e06..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b423755/b423755.il +++ /dev/null @@ -1,29 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly extern mscorlib {} - -.assembly 'test' { -.custom instance void [mscorlib]System.Security.SecurityTransparentAttribute::.ctor() = ( 01 00 00 00 ) -} - -.method public static int32 Main() -{ - .entrypoint - ldc.i4 0 - box int8 - unbox.any int8 - pop - - ldstr "Test SUCCESS" - call void [System.Console]System.Console::WriteLine(string) - - ldc.i4 100 - ret -} diff --git a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b448208/Desktop/b448208.cs b/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b448208/Desktop/b448208.cs deleted file mode 100644 index 9eef9a600cb8..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b448208/Desktop/b448208.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Security; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Threading; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Collections; - -public class GenType1 -{ - private static readonly int s_i = 0; - - public static bool foo() - { - return s_i == 0; - } -} - -public class cs1 -{ -#pragma warning disable 0414 - internal static int s_i = 0; -#pragma warning restore 0414 - - [MethodImplAttribute(MethodImplOptions.NoInlining)] - public static int Main(String[] args) - { - try - { - GenType1.foo(); - Console.WriteLine("Test SUCCESS"); - return 100; - } - catch (Exception ex) - { - Console.WriteLine(ex); - Console.WriteLine("Test FAILURE"); - return 101; - } - } -} diff --git a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-RTM/b518440/b518440.il b/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-RTM/b518440/b518440.il deleted file mode 100644 index 20dca34284ba..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-RTM/b518440/b518440.il +++ /dev/null @@ -1,92 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - - -.assembly extern mscorlib{} -.assembly repro{} -.module repro.exe - -.class public A -{ - .method public hidebysig static int32 main(string[] args) - { - .entrypoint - .maxstack 2 - - call void A::Test() - - ldstr "Test SUCCESS" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4 100 - ret - } - - .method public static void Test() - { - // Code size 45 (0x2d) - .maxstack 2 - .locals init (bool V_0, - class [mscorlib]System.Exception V_1, - class [mscorlib]System.Exception V_2, - class [mscorlib]System.Exception V_3, - class [mscorlib]System.Exception V_4) - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - .try - { - .try - { - IL_000c: newobj instance void [mscorlib]System.Exception::.ctor() - IL_0011: throw - - } // end .try - catch [mscorlib]System.Exception - { - IL_0012: dup - IL_0013: stloc.3 - IL_0014: stloc.1 - IL_0015: leave.s IL_0018 - - } // end handler - } // end .try - finally - { - IL_0017: endfinally - } // end handler - IL_0018: ldloc.0 - IL_0019: brfalse.s IL_001b - - .try - { - IL_001b: newobj instance void [mscorlib]System.Exception::.ctor() - IL_0020: throw - - } // end .try - catch [mscorlib]System.Exception - { - IL_0021: dup - IL_0022: stloc.s V_4 - IL_0024: stloc.2 - IL_0025: leave.s IL_002c - - } // end handler - - IL_002c: ret - } // end of method A::main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - .maxstack 1 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method A::.ctor -} \ No newline at end of file diff --git a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-RTM/b598031/test.il b/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-RTM/b598031/test.il deleted file mode 100644 index dfc326d761d8..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-RTM/b598031/test.il +++ /dev/null @@ -1,105 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly test {} -.module test.exe - -.class private auto ansi beforefieldinit Program - extends [mscorlib]System.Object -{ - .method private hidebysig static void ThrowException(int32 errorCode) cil managed - { - // Code size 75 (0x4b) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: stloc.0 - IL_0003: ldloc.0 - IL_0004: ldc.i4.s -10 - IL_0006: beq.s IL_0035 - - IL_0008: ldloc.0 - IL_0009: ldc.i4.s -3 - IL_000b: sub - IL_000c: switch ( - IL_002a, - IL_0040, - IL_001f) - IL_001d: br.s IL_0040 - - IL_001f: ldstr "-1" - IL_0024: newobj instance void [mscorlib]System.Exception::.ctor(string) - IL_0029: throw - - IL_002a: ldstr "-3" - IL_002f: newobj instance void [mscorlib]System.Exception::.ctor(string) - IL_0034: throw - - IL_0035: ldstr "-10" - IL_003a: newobj instance void [mscorlib]System.Exception::.ctor(string) - IL_003f: throw - - IL_0040: ldstr "others" - IL_0045: newobj instance void [mscorlib]System.Exception::.ctor(string) - IL_004a: throw - } // end of method Program::ThrowException - - .method private hidebysig static int32 - Main(string[] args) cil managed - { - .entrypoint - // Code size 46 (0x2e) - .maxstack 1 - .locals init (int32 V_0) - IL_0000: nop - .try - { - IL_0001: nop - IL_0002: ldc.i4.s 11 - IL_0004: call void Program::ThrowException(int32) - IL_0009: nop - IL_000a: ldstr "Unexcepted result." - IL_000f: call void [System.Console]System.Console::WriteLine(string) - IL_0014: nop - IL_0015: ldc.i4.1 - IL_0016: stloc.0 - IL_0017: leave.s IL_002b - - } // end .try - catch [mscorlib]System.Object - { - IL_0019: pop - IL_001a: nop - IL_001b: ldstr "Excepted result." - IL_0020: call void [System.Console]System.Console::WriteLine(string) - IL_0025: nop - IL_0026: ldc.i4.s 100 - IL_0028: stloc.0 - IL_0029: leave.s IL_002b - - } // end handler - IL_002b: nop - IL_002c: ldloc.0 - IL_002d: ret - } // end of method Program::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method Program::.ctor - -} // end of class Program diff --git a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-RTM/b598031/test2.il b/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-RTM/b598031/test2.il deleted file mode 100644 index b4f2b56f37c0..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-RTM/b598031/test2.il +++ /dev/null @@ -1,58 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly switchdefaultonly1 {} -.module switchdefaultonly3_il_d.exe - -.class private auto ansi beforefieldinit switchdefaultonly1 - extends [mscorlib]System.Object -{ - .method private hidebysig static int32 - Main(string[] args) cil managed - { - .entrypoint - // Code size 44 (0x2c) - .maxstack 2 - .locals init ([0] int32 V_0) - IL_0000: ldarg.0 - IL_0001: ldlen - IL_0002: conv.i4 - IL_0003: stloc.0 - IL_0004: ldloc.0 - IL_0005: ldc.i4.1 - IL_0006: sub - IL_0007: switch ( - IL_0010) - IL_0010: br.s IL_0012 - - .try - { - IL_0012: ldarg.0 - IL_0013: ldlen - IL_0014: conv.i4 - IL_0015: call void [System.Console]System.Console::WriteLine(int32) - IL_001a: leave.s IL_0024 - - } // end .try - catch [mscorlib]System.Exception - { - IL_001c: pop - IL_001d: call void [mscorlib]System.GC::Collect() - IL_0022: leave.s IL_0024 - - } // end handler - IL_0024: br.s IL_0026 - - IL_0026: ldc.i4 0x64 - IL_002b: ret - } // end of method switchdefaultonly1::Main - -} // end of class switchdefaultonly1 diff --git a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/v2.1/b609988/Desktop/b609988.il b/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/v2.1/b609988/Desktop/b609988.il deleted file mode 100644 index 783a689e929e..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/v2.1/b609988/Desktop/b609988.il +++ /dev/null @@ -1,1293 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - - - - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 2:0:0:0 -} -.assembly ddb609988 -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module ddb609988.exe -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - - -.class public sequential ansi sealed beforefieldinit OneString - extends [mscorlib]System.ValueType -{ - .field public string isString - .method public hidebysig specialname rtspecialname - instance void .ctor(string i) cil managed noinlining - { - .maxstack 8 - IL_0007: ldarg.0 - IL_0008: ldfld string OneString::isString - IL_000d: ldnull - IL_000e: ceq - IL_0010: stsfld bool Program::IsInit - IL_0015: ldstr "OneString: isString: {0}" - IL_001a: ldarg.0 - IL_001b: ldfld string OneString::isString - IL_0020: brfalse.s IL_002a - - IL_0022: ldarg.0 - IL_0023: ldfld string OneString::isString - IL_0028: br.s IL_002f - - IL_002a: ldstr "" - IL_002f: call void [System.Console]System.Console::WriteLine(string, - object) - IL_0034: ret - } // end of method OneString::.ctor - -} // end of class OneString - -.class public sequential ansi sealed beforefieldinit OneInt - extends [mscorlib]System.ValueType -{ - .field public int32 isInt - .method public hidebysig specialname rtspecialname - instance void .ctor(int32 i) cil managed noinlining - { - .maxstack 8 - IL_0007: ldarg.0 - IL_0008: ldfld int32 OneInt::isInt - IL_000d: ldc.i4.0 - IL_000e: ceq - IL_0010: stsfld bool Program::IsInit - IL_0015: ldstr "OneInt: isInt: {0}" - IL_001a: ldarg.0 - IL_001b: ldfld int32 OneInt::isInt - IL_0020: box [mscorlib]System.Int32 - IL_0025: call void [System.Console]System.Console::WriteLine(string, - object) - IL_002a: ret - } // end of method OneInt::.ctor - -} // end of class OneInt - -.class public sequential ansi sealed beforefieldinit OneBool - extends [mscorlib]System.ValueType -{ - .field public bool isBool - .method public hidebysig specialname rtspecialname - instance void .ctor(bool i) cil managed noinlining - { - .maxstack 8 - IL_0007: ldarg.0 - IL_0008: ldfld bool OneBool::isBool - IL_000d: ldc.i4.0 - IL_000e: ceq - IL_0010: stsfld bool Program::IsInit - IL_0015: ldstr "OneBool: isBool: {0}" - IL_001a: ldarg.0 - IL_001b: ldfld bool OneBool::isBool - IL_0020: box [mscorlib]System.Boolean - IL_0025: call void [System.Console]System.Console::WriteLine(string, - object) - IL_002a: ret - } // end of method OneBool::.ctor - -} // end of class OneBool - -.class public sequential ansi sealed beforefieldinit OneRtTH - extends [mscorlib]System.ValueType -{ - .field public valuetype [mscorlib]System.RuntimeTypeHandle isRtTH - .method public hidebysig specialname rtspecialname - instance void .ctor(valuetype [mscorlib]System.RuntimeTypeHandle i) cil managed noinlining - { - .maxstack 3 - IL_0007: ldarg.0 - IL_0008: ldflda valuetype [mscorlib]System.RuntimeTypeHandle OneRtTH::isRtTH - IL_000d: call instance native int [mscorlib]System.RuntimeTypeHandle::get_Value() - IL_0012: ldsfld native int [mscorlib]System.IntPtr::Zero - IL_0017: call bool [mscorlib]System.IntPtr::op_Equality(native int, - native int) - IL_001c: stsfld bool Program::IsInit - IL_0021: ldstr "OneRtTH: isRuntimeTypeHandle: {0}.Value: {1}" - IL_0026: ldarg.0 - IL_0027: ldfld valuetype [mscorlib]System.RuntimeTypeHandle OneRtTH::isRtTH - IL_002c: ldnull - IL_002d: call bool [mscorlib]System.RuntimeTypeHandle::op_Inequality(valuetype [mscorlib]System.RuntimeTypeHandle, - object) - IL_0032: brtrue.s IL_003b - - IL_0034: ldstr "" - IL_0039: br.s IL_0040 - - IL_003b: ldstr "" - IL_0040: ldarg.0 - IL_0041: ldflda valuetype [mscorlib]System.RuntimeTypeHandle OneRtTH::isRtTH - IL_0046: call instance native int [mscorlib]System.RuntimeTypeHandle::get_Value() - IL_004b: box [mscorlib]System.IntPtr - IL_0050: call void [System.Console]System.Console::WriteLine(string, - object, - object) - IL_0055: ret - } // end of method OneRtTH::.ctor - -} // end of class OneRtTH - -.class public sequential ansi sealed beforefieldinit OneStructOneString - extends [mscorlib]System.ValueType -{ - .field public valuetype OneString isOneString - .method public hidebysig specialname rtspecialname - instance void .ctor(valuetype OneString i) cil managed noinlining - { - .maxstack 8 - IL_0007: ldarg.0 - IL_0008: ldflda valuetype OneString OneStructOneString::isOneString - IL_000d: ldfld string OneString::isString - IL_0012: ldnull - IL_0013: ceq - IL_0015: stsfld bool Program::IsInit - IL_001a: ldstr "OneStructOneString: isOneString.isString: {0}" - IL_001f: ldarg.0 - IL_0020: ldflda valuetype OneString OneStructOneString::isOneString - IL_0025: ldfld string OneString::isString - IL_002a: call void [System.Console]System.Console::WriteLine(string, - object) - IL_002f: ret - } // end of method OneStructOneString::.ctor - -} // end of class OneStructOneString - -.class public sequential ansi sealed beforefieldinit OneStructOneInt - extends [mscorlib]System.ValueType -{ - .field public valuetype OneInt isOneInt - .method public hidebysig specialname rtspecialname - instance void .ctor(valuetype OneInt i) cil managed noinlining - { - .maxstack 8 - IL_0007: ldarg.0 - IL_0008: ldflda valuetype OneInt OneStructOneInt::isOneInt - IL_000d: ldfld int32 OneInt::isInt - IL_0012: ldc.i4.0 - IL_0013: ceq - IL_0015: stsfld bool Program::IsInit - IL_001a: ldstr "OneStructOneInt: isOneInt.isInt: {0}" - IL_001f: ldarg.0 - IL_0020: ldflda valuetype OneInt OneStructOneInt::isOneInt - IL_0025: ldfld int32 OneInt::isInt - IL_002a: box [mscorlib]System.Int32 - IL_002f: call void [System.Console]System.Console::WriteLine(string, - object) - IL_0034: ret - } // end of method OneStructOneInt::.ctor - -} // end of class OneStructOneInt - -.class public sequential ansi sealed beforefieldinit OneStructOneRtTH - extends [mscorlib]System.ValueType -{ - .field public valuetype OneRtTH isOneRtTH - .method public hidebysig specialname rtspecialname - instance void .ctor(valuetype OneRtTH i) cil managed noinlining - { - .maxstack 2 - IL_0007: ldarg.0 - IL_0008: ldflda valuetype OneRtTH OneStructOneRtTH::isOneRtTH - IL_000d: ldflda valuetype [mscorlib]System.RuntimeTypeHandle OneRtTH::isRtTH - IL_0012: call instance native int [mscorlib]System.RuntimeTypeHandle::get_Value() - IL_0017: ldsfld native int [mscorlib]System.IntPtr::Zero - IL_001c: call bool [mscorlib]System.IntPtr::op_Equality(native int, - native int) - IL_0021: stsfld bool Program::IsInit - IL_0026: ldstr "OneStructOneRtTH: isOneRtTH.isRtTH.Value: {0}" - IL_002b: ldarg.0 - IL_002c: ldflda valuetype OneRtTH OneStructOneRtTH::isOneRtTH - IL_0031: ldflda valuetype [mscorlib]System.RuntimeTypeHandle OneRtTH::isRtTH - IL_0036: call instance native int [mscorlib]System.RuntimeTypeHandle::get_Value() - IL_003b: box [mscorlib]System.IntPtr - IL_0040: call void [System.Console]System.Console::WriteLine(string, - object) - IL_0045: ret - } // end of method OneStructOneRtTH::.ctor - -} // end of class OneStructOneRtTH - -.class public sequential ansi sealed beforefieldinit TwoStringInt - extends [mscorlib]System.ValueType -{ - .field public string isString - .field public int32 isInt - .method public hidebysig specialname rtspecialname - instance void .ctor(string i) cil managed noinlining - { - .maxstack 3 - IL_000e: ldarg.0 - IL_000f: ldfld string TwoStringInt::isString - IL_0014: brtrue.s IL_0021 - - IL_0016: ldarg.0 - IL_0017: ldfld int32 TwoStringInt::isInt - IL_001c: ldc.i4.0 - IL_001d: ceq - IL_001f: br.s IL_0022 - - IL_0021: ldc.i4.0 - IL_0022: stsfld bool Program::IsInit - IL_0027: ldstr "TwoStringInt: isString: {0} isInt: {1}" - IL_002c: ldarg.0 - IL_002d: ldfld string TwoStringInt::isString - IL_0032: brfalse.s IL_003c - - IL_0034: ldarg.0 - IL_0035: ldfld string TwoStringInt::isString - IL_003a: br.s IL_0041 - - IL_003c: ldstr "" - IL_0041: ldarg.0 - IL_0042: ldfld int32 TwoStringInt::isInt - IL_0047: box [mscorlib]System.Int32 - IL_004c: call void [System.Console]System.Console::WriteLine(string, - object, - object) - IL_0051: ret - } // end of method TwoStringInt::.ctor - -} // end of class TwoStringInt - -.class public sequential ansi sealed beforefieldinit TwoIntBool - extends [mscorlib]System.ValueType -{ - .field public int32 isInt - .field public bool isBool - .method public hidebysig specialname rtspecialname - instance void .ctor(int32 i) cil managed noinlining - { - .maxstack 3 - IL_000e: ldarg.0 - IL_000f: ldfld int32 TwoIntBool::isInt - IL_0014: brtrue.s IL_0021 - - IL_0016: ldarg.0 - IL_0017: ldfld bool TwoIntBool::isBool - IL_001c: ldc.i4.0 - IL_001d: ceq - IL_001f: br.s IL_0022 - - IL_0021: ldc.i4.0 - IL_0022: stsfld bool Program::IsInit - IL_0027: ldstr "TwoIntBool: isInt: {0} isBool: {1}" - IL_002c: ldarg.0 - IL_002d: ldfld int32 TwoIntBool::isInt - IL_0032: box [mscorlib]System.Int32 - IL_0037: ldarg.0 - IL_0038: ldfld bool TwoIntBool::isBool - IL_003d: box [mscorlib]System.Boolean - IL_0042: call void [System.Console]System.Console::WriteLine(string, - object, - object) - IL_0047: ret - } // end of method TwoIntBool::.ctor - -} // end of class TwoIntBool - -.class public sequential ansi sealed beforefieldinit TwoRTTHDouble - extends [mscorlib]System.ValueType -{ - .field public float64 isDouble - .field public valuetype [mscorlib]System.RuntimeTypeHandle isRtTH - .method public hidebysig specialname rtspecialname - instance void .ctor(bool i) cil managed noinlining - { - .maxstack 3 - IL_001b: ldarg.0 - IL_001c: ldfld float64 TwoRTTHDouble::isDouble - IL_0021: ldc.r8 0.0 - IL_002a: bne.un.s IL_0043 - - IL_002c: ldarg.0 - IL_002d: ldflda valuetype [mscorlib]System.RuntimeTypeHandle TwoRTTHDouble::isRtTH - IL_0032: call instance native int [mscorlib]System.RuntimeTypeHandle::get_Value() - IL_0037: ldsfld native int [mscorlib]System.IntPtr::Zero - IL_003c: call bool [mscorlib]System.IntPtr::op_Equality(native int, - native int) - IL_0041: br.s IL_0044 - - IL_0043: ldc.i4.0 - IL_0044: stsfld bool Program::IsInit - IL_0049: ldstr "TwoRTTHDouble: isDouble: {0}, isRtTH.Value: {1}" - IL_004e: ldarg.0 - IL_004f: ldfld float64 TwoRTTHDouble::isDouble - IL_0054: box [mscorlib]System.Double - IL_0059: ldarg.0 - IL_005a: ldflda valuetype [mscorlib]System.RuntimeTypeHandle TwoRTTHDouble::isRtTH - IL_005f: call instance native int [mscorlib]System.RuntimeTypeHandle::get_Value() - IL_0064: box [mscorlib]System.IntPtr - IL_0069: call void [System.Console]System.Console::WriteLine(string, - object, - object) - IL_006e: ret - } // end of method TwoRTTHDouble::.ctor - -} // end of class TwoRTTHDouble - -.class public sequential ansi sealed beforefieldinit AllTypes - extends [mscorlib]System.ValueType -{ - .field public bool isBool - .field public int32 isInt - .field public int16 isShort - .field public float64 isDouble - .field public valuetype [mscorlib]System.RuntimeTypeHandle isRtTH - .method public hidebysig specialname rtspecialname - instance void .ctor(bool i) cil managed noinlining - { - .maxstack 4 - .locals init (object[] V_0) - IL_0024: ldarg.0 - IL_0025: ldflda valuetype [mscorlib]System.RuntimeTypeHandle AllTypes::isRtTH - IL_002a: initobj [mscorlib]System.RuntimeTypeHandle - IL_0030: ldarg.0 - IL_0031: ldfld bool AllTypes::isBool - IL_0036: brtrue.s IL_0070 - - IL_0038: ldarg.0 - IL_0039: ldfld int32 AllTypes::isInt - IL_003e: brtrue.s IL_0070 - - IL_0040: ldarg.0 - IL_0041: ldfld int16 AllTypes::isShort - IL_0046: brtrue.s IL_0070 - - IL_0048: ldarg.0 - IL_0049: ldfld float64 AllTypes::isDouble - IL_004e: ldc.r8 0.0 - IL_0057: bne.un.s IL_0070 - - IL_0059: ldarg.0 - IL_005a: ldflda valuetype [mscorlib]System.RuntimeTypeHandle AllTypes::isRtTH - IL_005f: call instance native int [mscorlib]System.RuntimeTypeHandle::get_Value() - IL_0064: ldsfld native int [mscorlib]System.IntPtr::Zero - IL_0069: call bool [mscorlib]System.IntPtr::op_Equality(native int, - native int) - IL_006e: br.s IL_0071 - - IL_0070: ldc.i4.0 - IL_0071: stsfld bool Program::IsInit - IL_0076: ldstr "AllTypes: isBool: {0} isInt: {1}, isShort: {2}, is" - + "Double: {3}, isRtTH.Value: {4}" - IL_007b: ldc.i4.5 - IL_007c: newarr [mscorlib]System.Object - IL_0081: stloc.0 - IL_0082: ldloc.0 - IL_0083: ldc.i4.0 - IL_0084: ldarg.0 - IL_0085: ldfld bool AllTypes::isBool - IL_008a: box [mscorlib]System.Boolean - IL_008f: stelem.ref - IL_0090: ldloc.0 - IL_0091: ldc.i4.1 - IL_0092: ldarg.0 - IL_0093: ldfld int32 AllTypes::isInt - IL_0098: box [mscorlib]System.Int32 - IL_009d: stelem.ref - IL_009e: ldloc.0 - IL_009f: ldc.i4.2 - IL_00a0: ldarg.0 - IL_00a1: ldfld int16 AllTypes::isShort - IL_00a6: box [mscorlib]System.Int16 - IL_00ab: stelem.ref - IL_00ac: ldloc.0 - IL_00ad: ldc.i4.3 - IL_00ae: ldarg.0 - IL_00af: ldfld float64 AllTypes::isDouble - IL_00b4: box [mscorlib]System.Double - IL_00b9: stelem.ref - IL_00ba: ldloc.0 - IL_00bb: ldc.i4.4 - IL_00bc: ldarg.0 - IL_00bd: ldflda valuetype [mscorlib]System.RuntimeTypeHandle AllTypes::isRtTH - IL_00c2: call instance native int [mscorlib]System.RuntimeTypeHandle::get_Value() - IL_00c7: box [mscorlib]System.IntPtr - IL_00cc: stelem.ref - IL_00cd: ldloc.0 - IL_00ce: call void [System.Console]System.Console::WriteLine(string, - object[]) - IL_00d3: ret - } // end of method AllTypes::.ctor - -} // end of class AllTypes - -.class public sequential ansi sealed beforefieldinit AllTypesNullable - extends [mscorlib]System.ValueType -{ - .field public valuetype [mscorlib]System.Nullable`1 isBool - .field public valuetype [mscorlib]System.Nullable`1 isInt - .field public valuetype [mscorlib]System.Nullable`1 isShort - .field public valuetype [mscorlib]System.Nullable`1 isDouble - .method public hidebysig specialname rtspecialname - instance void .ctor(bool i) cil managed noinlining - { - .maxstack 4 - .locals init (valuetype [mscorlib]System.Nullable`1 V_0, - valuetype [mscorlib]System.Nullable`1 V_1, - valuetype [mscorlib]System.Nullable`1 V_2, - valuetype [mscorlib]System.Nullable`1 V_3, - object[] V_4) - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: newobj instance void valuetype [mscorlib]System.Nullable`1::.ctor(!0) - IL_0007: stfld valuetype [mscorlib]System.Nullable`1 AllTypesNullable::isBool - IL_000c: ldarg.0 - IL_000d: ldc.i4.0 - IL_000e: newobj instance void valuetype [mscorlib]System.Nullable`1::.ctor(!0) - IL_0013: stfld valuetype [mscorlib]System.Nullable`1 AllTypesNullable::isInt - IL_0018: ldarg.0 - IL_0019: ldc.i4.0 - IL_001a: newobj instance void valuetype [mscorlib]System.Nullable`1::.ctor(!0) - IL_001f: stfld valuetype [mscorlib]System.Nullable`1 AllTypesNullable::isShort - IL_0024: ldarg.0 - IL_0025: ldc.r8 0.0 - IL_002e: newobj instance void valuetype [mscorlib]System.Nullable`1::.ctor(!0) - IL_0033: stfld valuetype [mscorlib]System.Nullable`1 AllTypesNullable::isDouble - IL_0038: ldarg.0 - IL_0039: ldfld valuetype [mscorlib]System.Nullable`1 AllTypesNullable::isBool - IL_003e: stloc.0 - IL_003f: ldloca.s V_0 - IL_0041: call instance !0 valuetype [mscorlib]System.Nullable`1::GetValueOrDefault() - IL_0046: brtrue.s IL_0051 - - IL_0048: ldloca.s V_0 - IL_004a: call instance bool valuetype [mscorlib]System.Nullable`1::get_HasValue() - IL_004f: br.s IL_0052 - - IL_0051: ldc.i4.0 - IL_0052: brfalse.s IL_00b1 - - IL_0054: ldarg.0 - IL_0055: ldfld valuetype [mscorlib]System.Nullable`1 AllTypesNullable::isInt - IL_005a: stloc.1 - IL_005b: ldloca.s V_1 - IL_005d: call instance !0 valuetype [mscorlib]System.Nullable`1::GetValueOrDefault() - IL_0062: brtrue.s IL_006d - - IL_0064: ldloca.s V_1 - IL_0066: call instance bool valuetype [mscorlib]System.Nullable`1::get_HasValue() - IL_006b: br.s IL_006e - - IL_006d: ldc.i4.0 - IL_006e: brfalse.s IL_00b1 - - IL_0070: ldarg.0 - IL_0071: ldfld valuetype [mscorlib]System.Nullable`1 AllTypesNullable::isShort - IL_0076: stloc.2 - IL_0077: ldloca.s V_2 - IL_0079: call instance !0 valuetype [mscorlib]System.Nullable`1::GetValueOrDefault() - IL_007e: brtrue.s IL_0089 - - IL_0080: ldloca.s V_2 - IL_0082: call instance bool valuetype [mscorlib]System.Nullable`1::get_HasValue() - IL_0087: br.s IL_008a - - IL_0089: ldc.i4.0 - IL_008a: brfalse.s IL_00b1 - - IL_008c: ldarg.0 - IL_008d: ldfld valuetype [mscorlib]System.Nullable`1 AllTypesNullable::isDouble - IL_0092: stloc.3 - IL_0093: ldloca.s V_3 - IL_0095: call instance !0 valuetype [mscorlib]System.Nullable`1::GetValueOrDefault() - IL_009a: ldc.r8 0.0 - IL_00a3: bne.un.s IL_00ae - - IL_00a5: ldloca.s V_3 - IL_00a7: call instance bool valuetype [mscorlib]System.Nullable`1::get_HasValue() - IL_00ac: br.s IL_00b2 - - IL_00ae: ldc.i4.0 - IL_00af: br.s IL_00b2 - - IL_00b1: ldc.i4.0 - IL_00b2: stsfld bool Program::IsInit - IL_00b7: ldstr "AllTypesNullable: isBool: {0} isInt: {1}, isShort:" - + " {2}, isDouble: {3}" - IL_00bc: ldc.i4.4 - IL_00bd: newarr [mscorlib]System.Object - IL_00c2: stloc.s V_4 - IL_00c4: ldloc.s V_4 - IL_00c6: ldc.i4.0 - IL_00c7: ldarg.0 - IL_00c8: ldfld valuetype [mscorlib]System.Nullable`1 AllTypesNullable::isBool - IL_00cd: box valuetype [mscorlib]System.Nullable`1 - IL_00d2: stelem.ref - IL_00d3: ldloc.s V_4 - IL_00d5: ldc.i4.1 - IL_00d6: ldarg.0 - IL_00d7: ldfld valuetype [mscorlib]System.Nullable`1 AllTypesNullable::isInt - IL_00dc: box valuetype [mscorlib]System.Nullable`1 - IL_00e1: stelem.ref - IL_00e2: ldloc.s V_4 - IL_00e4: ldc.i4.2 - IL_00e5: ldarg.0 - IL_00e6: ldfld valuetype [mscorlib]System.Nullable`1 AllTypesNullable::isShort - IL_00eb: box valuetype [mscorlib]System.Nullable`1 - IL_00f0: stelem.ref - IL_00f1: ldloc.s V_4 - IL_00f3: ldc.i4.3 - IL_00f4: ldarg.0 - IL_00f5: ldfld valuetype [mscorlib]System.Nullable`1 AllTypesNullable::isDouble - IL_00fa: box valuetype [mscorlib]System.Nullable`1 - IL_00ff: stelem.ref - IL_0100: ldloc.s V_4 - IL_0102: call void [System.Console]System.Console::WriteLine(string, - object[]) - IL_0107: ret - } // end of method AllTypesNullable::.ctor - -} // end of class AllTypesNullable - -.class public sequential ansi sealed beforefieldinit AllTypesNoExplicitConstructor - extends [mscorlib]System.ValueType -{ - .field public bool isBool - .field public int32 isInt - .field public int16 isShort - .field public float64 isDouble - .field public valuetype [mscorlib]System.RuntimeTypeHandle isRtTH -} // end of class AllTypesNoExplicitConstructor - -.class public auto ansi beforefieldinit Program - extends [mscorlib]System.Object -{ - .field public static bool IsInit - .field public static bool AllPassed - .method public hidebysig static void F(object o) cil managed noinlining - { - .maxstack 8 - IL_0000: ret - } // end of method Program::F - - .method private hidebysig static void Test1() cil managed noinlining - { - .maxstack 8 - IL_0000: ldstr "4" - IL_0005: newobj instance void OneString::.ctor(string) - IL_000a: box OneString - IL_000f: call void Program::F(object) - IL_0014: ldsfld bool Program::IsInit - IL_0019: brtrue.s IL_0021 - - IL_001b: ldc.i4.0 - IL_001c: stsfld bool Program::AllPassed - IL_0021: ret - } // end of method Program::Test1 - - .method private hidebysig static void Test2() cil managed noinlining - { - .maxstack 8 - IL_0000: ldc.i4.4 - IL_0001: newobj instance void OneInt::.ctor(int32) - IL_0006: box OneInt - IL_000b: call void Program::F(object) - IL_0010: ldsfld bool Program::IsInit - IL_0015: brtrue.s IL_001d - - IL_0017: ldc.i4.0 - IL_0018: stsfld bool Program::AllPassed - IL_001d: ret - } // end of method Program::Test2 - - .method private hidebysig static void Test3() cil managed noinlining - { - .maxstack 8 - IL_0000: ldc.i4.1 - IL_0001: newobj instance void OneBool::.ctor(bool) - IL_0006: box OneBool - IL_000b: call void Program::F(object) - IL_0010: ldsfld bool Program::IsInit - IL_0015: brtrue.s IL_001d - - IL_0017: ldc.i4.0 - IL_0018: stsfld bool Program::AllPassed - IL_001d: ret - } // end of method Program::Test3 - - .method private hidebysig static void Test4() cil managed noinlining - { - .maxstack 2 - .locals init (valuetype [mscorlib]System.RuntimeTypeHandle V_0) - IL_0000: ldloca.s V_0 - IL_0002: initobj [mscorlib]System.RuntimeTypeHandle - IL_0008: ldloc.0 - IL_0009: newobj instance void OneRtTH::.ctor(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_000e: box OneRtTH - IL_0013: call void Program::F(object) - IL_0018: ldsfld bool Program::IsInit - IL_001d: brtrue.s IL_0025 - - IL_001f: ldc.i4.0 - IL_0020: stsfld bool Program::AllPassed - IL_0025: ret - } // end of method Program::Test4 - - .method private hidebysig static void Test5() cil managed noinlining - { - .maxstack 8 - IL_0000: ldstr "4" - IL_0005: newobj instance void OneString::.ctor(string) - IL_000a: newobj instance void OneStructOneString::.ctor(valuetype OneString) - IL_000f: box OneStructOneString - IL_0014: call void Program::F(object) - IL_0019: ldsfld bool Program::IsInit - IL_001e: brtrue.s IL_0026 - - IL_0020: ldc.i4.0 - IL_0021: stsfld bool Program::AllPassed - IL_0026: ret - } // end of method Program::Test5 - - .method private hidebysig static void Test6() cil managed noinlining - { - .maxstack 8 - IL_0000: ldc.i4.4 - IL_0001: newobj instance void OneInt::.ctor(int32) - IL_0006: newobj instance void OneStructOneInt::.ctor(valuetype OneInt) - IL_000b: box OneStructOneInt - IL_0010: call void Program::F(object) - IL_0015: ldsfld bool Program::IsInit - IL_001a: brtrue.s IL_0022 - - IL_001c: ldc.i4.0 - IL_001d: stsfld bool Program::AllPassed - IL_0022: ret - } // end of method Program::Test6 - - .method private hidebysig static void Test7() cil managed noinlining - { - .maxstack 2 - .locals init (valuetype [mscorlib]System.RuntimeTypeHandle V_0) - IL_0000: ldloca.s V_0 - IL_0002: initobj [mscorlib]System.RuntimeTypeHandle - IL_0008: ldloc.0 - IL_0009: newobj instance void OneRtTH::.ctor(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_000e: newobj instance void OneStructOneRtTH::.ctor(valuetype OneRtTH) - IL_0013: box OneStructOneRtTH - IL_0018: call void Program::F(object) - IL_001d: ldsfld bool Program::IsInit - IL_0022: brtrue.s IL_002a - - IL_0024: ldc.i4.0 - IL_0025: stsfld bool Program::AllPassed - IL_002a: ret - } // end of method Program::Test7 - - .method private hidebysig static void Test8() cil managed noinlining - { - .maxstack 8 - IL_0000: ldstr "1" - IL_0005: newobj instance void TwoStringInt::.ctor(string) - IL_000a: box TwoStringInt - IL_000f: call void Program::F(object) - IL_0014: ldsfld bool Program::IsInit - IL_0019: brtrue.s IL_0021 - - IL_001b: ldc.i4.0 - IL_001c: stsfld bool Program::AllPassed - IL_0021: ret - } // end of method Program::Test8 - - .method private hidebysig static void Test9() cil managed noinlining - { - .maxstack 8 - IL_0000: ldc.i4.1 - IL_0001: newobj instance void TwoIntBool::.ctor(int32) - IL_0006: box TwoIntBool - IL_000b: call void Program::F(object) - IL_0010: ldsfld bool Program::IsInit - IL_0015: brtrue.s IL_001d - - IL_0017: ldc.i4.0 - IL_0018: stsfld bool Program::AllPassed - IL_001d: ret - } // end of method Program::Test9 - - .method private hidebysig static void Test10() cil managed noinlining - { - .maxstack 8 - IL_0000: ldc.i4.1 - IL_0001: newobj instance void TwoRTTHDouble::.ctor(bool) - IL_0006: box TwoRTTHDouble - IL_000b: call void Program::F(object) - IL_0010: ldsfld bool Program::IsInit - IL_0015: brtrue.s IL_001d - - IL_0017: ldc.i4.0 - IL_0018: stsfld bool Program::AllPassed - IL_001d: ret - } // end of method Program::Test10 - - .method private hidebysig static void Test11() cil managed noinlining - { - .maxstack 8 - IL_0000: ldc.i4.1 - IL_0001: newobj instance void AllTypes::.ctor(bool) - IL_0006: box AllTypes - IL_000b: call void Program::F(object) - IL_0010: ldsfld bool Program::IsInit - IL_0015: brtrue.s IL_001d - - IL_0017: ldc.i4.0 - IL_0018: stsfld bool Program::AllPassed - IL_001d: ret - } // end of method Program::Test11 - - .method private hidebysig static void Test12() cil managed noinlining - { - .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: newobj instance void AllTypesNullable::.ctor(bool) - IL_0006: box AllTypesNullable - IL_000b: call void Program::F(object) - IL_0010: ldsfld bool Program::IsInit - IL_0015: brtrue.s IL_001d - - IL_0017: ldc.i4.0 - IL_0018: stsfld bool Program::AllPassed - IL_001d: ret - } // end of method Program::Test12 - - .method private hidebysig static void Test13() cil managed noinlining - { - .maxstack 2 - .locals init (int32 V_0) - IL_0000: ldstr "Calling OneString in a loop..." - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: br.s IL_0033 - - IL_000e: ldstr "4" - IL_0013: newobj instance void OneString::.ctor(string) - IL_0018: box OneString - IL_001d: call void Program::F(object) - IL_0022: ldsfld bool Program::IsInit - IL_0027: brtrue.s IL_002f - - IL_0029: ldc.i4.0 - IL_002a: stsfld bool Program::AllPassed - IL_002f: ldloc.0 - IL_0030: ldc.i4.1 - IL_0031: add - IL_0032: stloc.0 - IL_0033: ldloc.0 - IL_0034: ldc.i4.s 10 - IL_0036: blt.s IL_000e - - IL_0038: ret - } // end of method Program::Test13 - - .method private hidebysig static void Test14() cil managed noinlining - { - .maxstack 2 - .locals init (int32 V_0) - IL_0000: ldstr "Calling OneInt in a loop..." - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: br.s IL_002f - - IL_000e: ldc.i4.4 - IL_000f: newobj instance void OneInt::.ctor(int32) - IL_0014: box OneInt - IL_0019: call void Program::F(object) - IL_001e: ldsfld bool Program::IsInit - IL_0023: brtrue.s IL_002b - - IL_0025: ldc.i4.0 - IL_0026: stsfld bool Program::AllPassed - IL_002b: ldloc.0 - IL_002c: ldc.i4.1 - IL_002d: add - IL_002e: stloc.0 - IL_002f: ldloc.0 - IL_0030: ldc.i4.s 10 - IL_0032: blt.s IL_000e - - IL_0034: ret - } // end of method Program::Test14 - - .method private hidebysig static void Test15() cil managed noinlining - { - .maxstack 2 - .locals init (int32 V_0) - IL_0000: ldstr "Calling OneBool in a loop..." - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: br.s IL_002f - - IL_000e: ldc.i4.1 - IL_000f: newobj instance void OneBool::.ctor(bool) - IL_0014: box OneBool - IL_0019: call void Program::F(object) - IL_001e: ldsfld bool Program::IsInit - IL_0023: brtrue.s IL_002b - - IL_0025: ldc.i4.0 - IL_0026: stsfld bool Program::AllPassed - IL_002b: ldloc.0 - IL_002c: ldc.i4.1 - IL_002d: add - IL_002e: stloc.0 - IL_002f: ldloc.0 - IL_0030: ldc.i4.s 10 - IL_0032: blt.s IL_000e - - IL_0034: ret - } // end of method Program::Test15 - - .method private hidebysig static void Test16() cil managed noinlining - { - .maxstack 2 - .locals init (int32 V_0, - valuetype [mscorlib]System.RuntimeTypeHandle V_1) - IL_0000: ldstr "Calling OneRtTH in a loop..." - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: br.s IL_0037 - - IL_000e: ldloca.s V_1 - IL_0010: initobj [mscorlib]System.RuntimeTypeHandle - IL_0016: ldloc.1 - IL_0017: newobj instance void OneRtTH::.ctor(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_001c: box OneRtTH - IL_0021: call void Program::F(object) - IL_0026: ldsfld bool Program::IsInit - IL_002b: brtrue.s IL_0033 - - IL_002d: ldc.i4.0 - IL_002e: stsfld bool Program::AllPassed - IL_0033: ldloc.0 - IL_0034: ldc.i4.1 - IL_0035: add - IL_0036: stloc.0 - IL_0037: ldloc.0 - IL_0038: ldc.i4.s 10 - IL_003a: blt.s IL_000e - - IL_003c: ret - } // end of method Program::Test16 - - .method private hidebysig static void Test17() cil managed noinlining - { - .maxstack 2 - .locals init (int32 V_0) - IL_0000: ldstr "Calling OneStructOneString in a loop..." - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: br.s IL_0038 - - IL_000e: ldstr "4" - IL_0013: newobj instance void OneString::.ctor(string) - IL_0018: newobj instance void OneStructOneString::.ctor(valuetype OneString) - IL_001d: box OneStructOneString - IL_0022: call void Program::F(object) - IL_0027: ldsfld bool Program::IsInit - IL_002c: brtrue.s IL_0034 - - IL_002e: ldc.i4.0 - IL_002f: stsfld bool Program::AllPassed - IL_0034: ldloc.0 - IL_0035: ldc.i4.1 - IL_0036: add - IL_0037: stloc.0 - IL_0038: ldloc.0 - IL_0039: ldc.i4.s 10 - IL_003b: blt.s IL_000e - - IL_003d: ret - } // end of method Program::Test17 - - .method private hidebysig static void Test18() cil managed noinlining - { - .maxstack 2 - .locals init (int32 V_0) - IL_0000: ldstr "Calling OneStructOneInt in a loop..." - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: br.s IL_0034 - - IL_000e: ldc.i4.4 - IL_000f: newobj instance void OneInt::.ctor(int32) - IL_0014: newobj instance void OneStructOneInt::.ctor(valuetype OneInt) - IL_0019: box OneStructOneInt - IL_001e: call void Program::F(object) - IL_0023: ldsfld bool Program::IsInit - IL_0028: brtrue.s IL_0030 - - IL_002a: ldc.i4.0 - IL_002b: stsfld bool Program::AllPassed - IL_0030: ldloc.0 - IL_0031: ldc.i4.1 - IL_0032: add - IL_0033: stloc.0 - IL_0034: ldloc.0 - IL_0035: ldc.i4.s 10 - IL_0037: blt.s IL_000e - - IL_0039: ret - } // end of method Program::Test18 - - .method private hidebysig static void Test19() cil managed noinlining - { - .maxstack 2 - .locals init (int32 V_0, - valuetype [mscorlib]System.RuntimeTypeHandle V_1) - IL_0000: ldstr "Calling OneStructOneRtTH in a loop..." - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: br.s IL_003c - - IL_000e: ldloca.s V_1 - IL_0010: initobj [mscorlib]System.RuntimeTypeHandle - IL_0016: ldloc.1 - IL_0017: newobj instance void OneRtTH::.ctor(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_001c: newobj instance void OneStructOneRtTH::.ctor(valuetype OneRtTH) - IL_0021: box OneStructOneRtTH - IL_0026: call void Program::F(object) - IL_002b: ldsfld bool Program::IsInit - IL_0030: brtrue.s IL_0038 - - IL_0032: ldc.i4.0 - IL_0033: stsfld bool Program::AllPassed - IL_0038: ldloc.0 - IL_0039: ldc.i4.1 - IL_003a: add - IL_003b: stloc.0 - IL_003c: ldloc.0 - IL_003d: ldc.i4.s 10 - IL_003f: blt.s IL_000e - - IL_0041: ret - } // end of method Program::Test19 - - .method private hidebysig static void Test20() cil managed noinlining - { - .maxstack 2 - .locals init (int32 V_0) - IL_0000: ldstr "Calling TwoStringInt in a loop..." - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: br.s IL_0033 - - IL_000e: ldstr "1" - IL_0013: newobj instance void TwoStringInt::.ctor(string) - IL_0018: box TwoStringInt - IL_001d: call void Program::F(object) - IL_0022: ldsfld bool Program::IsInit - IL_0027: brtrue.s IL_002f - - IL_0029: ldc.i4.0 - IL_002a: stsfld bool Program::AllPassed - IL_002f: ldloc.0 - IL_0030: ldc.i4.1 - IL_0031: add - IL_0032: stloc.0 - IL_0033: ldloc.0 - IL_0034: ldc.i4.s 10 - IL_0036: blt.s IL_000e - - IL_0038: ret - } // end of method Program::Test20 - - .method private hidebysig static void Test21() cil managed noinlining - { - .maxstack 2 - .locals init (int32 V_0) - IL_0000: ldstr "Calling TwoIntBool in a loop..." - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: br.s IL_002f - - IL_000e: ldc.i4.1 - IL_000f: newobj instance void TwoIntBool::.ctor(int32) - IL_0014: box TwoIntBool - IL_0019: call void Program::F(object) - IL_001e: ldsfld bool Program::IsInit - IL_0023: brtrue.s IL_002b - - IL_0025: ldc.i4.0 - IL_0026: stsfld bool Program::AllPassed - IL_002b: ldloc.0 - IL_002c: ldc.i4.1 - IL_002d: add - IL_002e: stloc.0 - IL_002f: ldloc.0 - IL_0030: ldc.i4.s 10 - IL_0032: blt.s IL_000e - - IL_0034: ret - } // end of method Program::Test21 - - .method private hidebysig static void Test22() cil managed noinlining - { - .maxstack 2 - .locals init (int32 V_0) - IL_0000: ldstr "Calling TwoRTTHDouble in a loop..." - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: br.s IL_002f - - IL_000e: ldc.i4.1 - IL_000f: newobj instance void TwoRTTHDouble::.ctor(bool) - IL_0014: box TwoRTTHDouble - IL_0019: call void Program::F(object) - IL_001e: ldsfld bool Program::IsInit - IL_0023: brtrue.s IL_002b - - IL_0025: ldc.i4.0 - IL_0026: stsfld bool Program::AllPassed - IL_002b: ldloc.0 - IL_002c: ldc.i4.1 - IL_002d: add - IL_002e: stloc.0 - IL_002f: ldloc.0 - IL_0030: ldc.i4.s 10 - IL_0032: blt.s IL_000e - - IL_0034: ret - } // end of method Program::Test22 - - .method private hidebysig static void Test23() cil managed noinlining - { - .maxstack 2 - .locals init (int32 V_0) - IL_0000: ldstr "Calling AllTypes in a loop..." - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: br.s IL_002f - - IL_000e: ldc.i4.1 - IL_000f: newobj instance void AllTypes::.ctor(bool) - IL_0014: box AllTypes - IL_0019: call void Program::F(object) - IL_001e: ldsfld bool Program::IsInit - IL_0023: brtrue.s IL_002b - - IL_0025: ldc.i4.0 - IL_0026: stsfld bool Program::AllPassed - IL_002b: ldloc.0 - IL_002c: ldc.i4.1 - IL_002d: add - IL_002e: stloc.0 - IL_002f: ldloc.0 - IL_0030: ldc.i4.s 10 - IL_0032: blt.s IL_000e - - IL_0034: ret - } // end of method Program::Test23 - - .method private hidebysig static void Test24() cil managed noinlining - { - .maxstack 2 - .locals init (int32 V_0) - IL_0000: ldstr "Calling AllTypesNullable in a loop..." - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: br.s IL_002f - - IL_000e: ldc.i4.0 - IL_000f: newobj instance void AllTypesNullable::.ctor(bool) - IL_0014: box AllTypesNullable - IL_0019: call void Program::F(object) - IL_001e: ldsfld bool Program::IsInit - IL_0023: brtrue.s IL_002b - - IL_0025: ldc.i4.0 - IL_0026: stsfld bool Program::AllPassed - IL_002b: ldloc.0 - IL_002c: ldc.i4.1 - IL_002d: add - IL_002e: stloc.0 - IL_002f: ldloc.0 - IL_0030: ldc.i4.s 10 - IL_0032: blt.s IL_000e - - IL_0034: ret - } // end of method Program::Test24 - - .method private hidebysig static void Test25() cil managed noinlining - { - .maxstack 4 - .locals init (valuetype AllTypesNoExplicitConstructor V_0, - object[] V_1) - IL_0000: ldloca.s V_0 - IL_0002: initobj AllTypesNoExplicitConstructor - IL_0008: ldloca.s V_0 - IL_000a: ldfld bool AllTypesNoExplicitConstructor::isBool - IL_000f: brtrue.s IL_004d - - IL_0011: ldloca.s V_0 - IL_0013: ldfld int32 AllTypesNoExplicitConstructor::isInt - IL_0018: brtrue.s IL_004d - - IL_001a: ldloca.s V_0 - IL_001c: ldfld int16 AllTypesNoExplicitConstructor::isShort - IL_0021: brtrue.s IL_004d - - IL_0023: ldloca.s V_0 - IL_0025: ldfld float64 AllTypesNoExplicitConstructor::isDouble - IL_002a: ldc.r8 0.0 - IL_0033: bne.un.s IL_004d - - IL_0035: ldloca.s V_0 - IL_0037: ldflda valuetype [mscorlib]System.RuntimeTypeHandle AllTypesNoExplicitConstructor::isRtTH - IL_003c: call instance native int [mscorlib]System.RuntimeTypeHandle::get_Value() - IL_0041: ldsfld native int [mscorlib]System.IntPtr::Zero - IL_0046: call bool [mscorlib]System.IntPtr::op_Equality(native int, - native int) - IL_004b: br.s IL_004e - - IL_004d: ldc.i4.0 - IL_004e: stsfld bool Program::IsInit - IL_0053: ldstr "AllTypesNoExplicitConstructor: isBool: {0} isInt: " - + "{1}, isShort: {2}, isDouble: {3}, isRtTH.Value: {4}" - IL_0058: ldc.i4.5 - IL_0059: newarr [mscorlib]System.Object - IL_005e: stloc.1 - IL_005f: ldloc.1 - IL_0060: ldc.i4.0 - IL_0061: ldloca.s V_0 - IL_0063: ldfld bool AllTypesNoExplicitConstructor::isBool - IL_0068: box [mscorlib]System.Boolean - IL_006d: stelem.ref - IL_006e: ldloc.1 - IL_006f: ldc.i4.1 - IL_0070: ldloca.s V_0 - IL_0072: ldfld int32 AllTypesNoExplicitConstructor::isInt - IL_0077: box [mscorlib]System.Int32 - IL_007c: stelem.ref - IL_007d: ldloc.1 - IL_007e: ldc.i4.2 - IL_007f: ldloca.s V_0 - IL_0081: ldfld int16 AllTypesNoExplicitConstructor::isShort - IL_0086: box [mscorlib]System.Int16 - IL_008b: stelem.ref - IL_008c: ldloc.1 - IL_008d: ldc.i4.3 - IL_008e: ldloca.s V_0 - IL_0090: ldfld float64 AllTypesNoExplicitConstructor::isDouble - IL_0095: box [mscorlib]System.Double - IL_009a: stelem.ref - IL_009b: ldloc.1 - IL_009c: ldc.i4.4 - IL_009d: ldloca.s V_0 - IL_009f: ldflda valuetype [mscorlib]System.RuntimeTypeHandle AllTypesNoExplicitConstructor::isRtTH - IL_00a4: call instance native int [mscorlib]System.RuntimeTypeHandle::get_Value() - IL_00a9: box [mscorlib]System.IntPtr - IL_00ae: stelem.ref - IL_00af: ldloc.1 - IL_00b0: call void [System.Console]System.Console::WriteLine(string, - object[]) - IL_00b5: ldsfld bool Program::IsInit - IL_00ba: brtrue.s IL_00c2 - - IL_00bc: ldc.i4.0 - IL_00bd: stsfld bool Program::AllPassed - IL_00c2: ret - } // end of method Program::Test25 - - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - .maxstack 1 - IL_0000: call void Program::Test1() - IL_0005: call void Program::Test2() - IL_000a: call void Program::Test3() - IL_000f: call void Program::Test4() - IL_0014: call void Program::Test5() - IL_0019: call void Program::Test6() - IL_001e: call void Program::Test7() - IL_0023: call void Program::Test8() - IL_0028: call void Program::Test9() - IL_002d: call void Program::Test10() - IL_0032: call void Program::Test11() - IL_0037: call void Program::Test12() - IL_003c: call void Program::Test13() - IL_0041: call void Program::Test14() - IL_0046: call void Program::Test15() - IL_004b: call void Program::Test16() - IL_0050: call void Program::Test17() - IL_0055: call void Program::Test18() - IL_005a: call void Program::Test19() - IL_005f: call void Program::Test20() - IL_0064: call void Program::Test21() - IL_0069: call void Program::Test22() - IL_006e: call void Program::Test23() - IL_0073: call void Program::Test24() - IL_0078: call void Program::Test25() - IL_007d: ldsfld bool Program::AllPassed - IL_0082: brfalse.s IL_0091 - - IL_0084: ldstr "!!!!!!!!!! TEST PASSED !!!!!!!!!!!!!" - IL_0089: call void [System.Console]System.Console::WriteLine(string) - IL_008e: ldc.i4.s 100 - IL_0090: ret - - IL_0091: ldstr "!!!!!!!!!! TEST FAILED !!!!!!!!!!!!!" - IL_0096: call void [System.Console]System.Console::WriteLine(string) - IL_009b: ldc.i4.s 101 - IL_009d: ret - } // end of method Program::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method Program::.ctor - - .method private hidebysig specialname rtspecialname static - void .cctor() cil managed - { - .maxstack 8 - IL_0000: ldc.i4.1 - IL_0001: stsfld bool Program::IsInit - IL_0006: ldc.i4.1 - IL_0007: stsfld bool Program::AllPassed - IL_000c: ret - } // end of method Program::.cctor - -} // end of class Program - - - diff --git a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/v2.1/b609988/b609988.il b/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/v2.1/b609988/b609988.il deleted file mode 100644 index 5b951c793dff..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/v2.1/b609988/b609988.il +++ /dev/null @@ -1,1280 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - - - - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) - .ver 2:0:0:0 -} -.assembly ddb609988 -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module ddb609988.exe -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 -.corflags 0x00000001 - - - -.class public sequential ansi sealed beforefieldinit OneString - extends [mscorlib]System.ValueType -{ - .field public string isString - .method public hidebysig specialname rtspecialname - instance void .ctor(string i) cil managed noinlining - { - .maxstack 8 - IL_0007: ldarg.0 - IL_0008: ldfld string OneString::isString - IL_000d: ldnull - IL_000e: ceq - IL_0010: stsfld bool Program::IsInit - IL_0015: ldstr "OneString: isString: {0}" - IL_001a: ldarg.0 - IL_001b: ldfld string OneString::isString - IL_0020: brfalse.s IL_002a - - IL_0022: ldarg.0 - IL_0023: ldfld string OneString::isString - IL_0028: br.s IL_002f - - IL_002a: ldstr "" - IL_002f: call void [System.Console]System.Console::WriteLine(string, - object) - IL_0034: ret - } - -} - -.class public sequential ansi sealed beforefieldinit OneInt - extends [mscorlib]System.ValueType -{ - .field public int32 isInt - .method public hidebysig specialname rtspecialname - instance void .ctor(int32 i) cil managed noinlining - { - .maxstack 8 - IL_0007: ldarg.0 - IL_0008: ldfld int32 OneInt::isInt - IL_000d: ldc.i4.0 - IL_000e: ceq - IL_0010: stsfld bool Program::IsInit - IL_0015: ldstr "OneInt: isInt: {0}" - IL_001a: ldarg.0 - IL_001b: ldfld int32 OneInt::isInt - IL_0020: box [mscorlib]System.Int32 - IL_0025: call void [System.Console]System.Console::WriteLine(string, - object) - IL_002a: ret - } - -} - -.class public sequential ansi sealed beforefieldinit OneBool - extends [mscorlib]System.ValueType -{ - .field public bool isBool - .method public hidebysig specialname rtspecialname - instance void .ctor(bool i) cil managed noinlining - { - .maxstack 8 - IL_0007: ldarg.0 - IL_0008: ldfld bool OneBool::isBool - IL_000d: ldc.i4.0 - IL_000e: ceq - IL_0010: stsfld bool Program::IsInit - IL_0015: ldstr "OneBool: isBool: {0}" - IL_001a: ldarg.0 - IL_001b: ldfld bool OneBool::isBool - IL_0020: box [mscorlib]System.Boolean - IL_0025: call void [System.Console]System.Console::WriteLine(string, - object) - IL_002a: ret - } - -} - -.class public sequential ansi sealed beforefieldinit OneRtTH - extends [mscorlib]System.ValueType -{ - .field public valuetype [mscorlib]System.RuntimeTypeHandle isRtTH - .method public hidebysig specialname rtspecialname - instance void .ctor(valuetype [mscorlib]System.RuntimeTypeHandle i) cil managed noinlining - { - .maxstack 3 - IL_0007: ldarg.0 - IL_0008: ldflda valuetype [mscorlib]System.RuntimeTypeHandle OneRtTH::isRtTH - IL_000d: call instance native int [mscorlib]System.RuntimeTypeHandle::get_Value() - IL_0012: ldsfld native int [mscorlib]System.IntPtr::Zero - IL_0017: call bool [mscorlib]System.IntPtr::op_Equality(native int, - native int) - IL_001c: stsfld bool Program::IsInit - IL_0021: ldstr "OneRtTH: isRuntimeTypeHandle: {0}.Value: {1}" - IL_0026: ldarg.0 - IL_0027: ldfld valuetype [mscorlib]System.RuntimeTypeHandle OneRtTH::isRtTH - IL_002c: ldnull - IL_002d: call bool [mscorlib]System.RuntimeTypeHandle::op_Inequality(valuetype [mscorlib]System.RuntimeTypeHandle, - object) - IL_0032: brtrue.s IL_003b - - IL_0034: ldstr "" - IL_0039: br.s IL_0040 - - IL_003b: ldstr "" - IL_0040: ldarg.0 - IL_0041: ldflda valuetype [mscorlib]System.RuntimeTypeHandle OneRtTH::isRtTH - IL_0046: call instance native int [mscorlib]System.RuntimeTypeHandle::get_Value() - IL_004b: box [mscorlib]System.IntPtr - IL_0050: call void [System.Console]System.Console::WriteLine(string, - object, - object) - IL_0055: ret - } - -} - -.class public sequential ansi sealed beforefieldinit OneStructOneString - extends [mscorlib]System.ValueType -{ - .field public valuetype OneString isOneString - .method public hidebysig specialname rtspecialname - instance void .ctor(valuetype OneString i) cil managed noinlining - { - .maxstack 8 - IL_0007: ldarg.0 - IL_0008: ldflda valuetype OneString OneStructOneString::isOneString - IL_000d: ldfld string OneString::isString - IL_0012: ldnull - IL_0013: ceq - IL_0015: stsfld bool Program::IsInit - IL_001a: ldstr "OneStructOneString: isOneString.isString: {0}" - IL_001f: ldarg.0 - IL_0020: ldflda valuetype OneString OneStructOneString::isOneString - IL_0025: ldfld string OneString::isString - IL_002a: call void [System.Console]System.Console::WriteLine(string, - object) - IL_002f: ret - } - -} - -.class public sequential ansi sealed beforefieldinit OneStructOneInt - extends [mscorlib]System.ValueType -{ - .field public valuetype OneInt isOneInt - .method public hidebysig specialname rtspecialname - instance void .ctor(valuetype OneInt i) cil managed noinlining - { - .maxstack 8 - IL_0007: ldarg.0 - IL_0008: ldflda valuetype OneInt OneStructOneInt::isOneInt - IL_000d: ldfld int32 OneInt::isInt - IL_0012: ldc.i4.0 - IL_0013: ceq - IL_0015: stsfld bool Program::IsInit - IL_001a: ldstr "OneStructOneInt: isOneInt.isInt: {0}" - IL_001f: ldarg.0 - IL_0020: ldflda valuetype OneInt OneStructOneInt::isOneInt - IL_0025: ldfld int32 OneInt::isInt - IL_002a: box [mscorlib]System.Int32 - IL_002f: call void [System.Console]System.Console::WriteLine(string, - object) - IL_0034: ret - } - -} - -.class public sequential ansi sealed beforefieldinit OneStructOneRtTH - extends [mscorlib]System.ValueType -{ - .field public valuetype OneRtTH isOneRtTH - .method public hidebysig specialname rtspecialname - instance void .ctor(valuetype OneRtTH i) cil managed noinlining - { - .maxstack 2 - IL_0007: ldarg.0 - IL_0008: ldflda valuetype OneRtTH OneStructOneRtTH::isOneRtTH - IL_000d: ldflda valuetype [mscorlib]System.RuntimeTypeHandle OneRtTH::isRtTH - IL_0012: call instance native int [mscorlib]System.RuntimeTypeHandle::get_Value() - IL_0017: ldsfld native int [mscorlib]System.IntPtr::Zero - IL_001c: call bool [mscorlib]System.IntPtr::op_Equality(native int, - native int) - IL_0021: stsfld bool Program::IsInit - IL_0026: ldstr "OneStructOneRtTH: isOneRtTH.isRtTH.Value: {0}" - IL_002b: ldarg.0 - IL_002c: ldflda valuetype OneRtTH OneStructOneRtTH::isOneRtTH - IL_0031: ldflda valuetype [mscorlib]System.RuntimeTypeHandle OneRtTH::isRtTH - IL_0036: call instance native int [mscorlib]System.RuntimeTypeHandle::get_Value() - IL_003b: box [mscorlib]System.IntPtr - IL_0040: call void [System.Console]System.Console::WriteLine(string, - object) - IL_0045: ret - } - -} - -.class public sequential ansi sealed beforefieldinit TwoStringInt - extends [mscorlib]System.ValueType -{ - .field public string isString - .field public int32 isInt - .method public hidebysig specialname rtspecialname - instance void .ctor(string i) cil managed noinlining - { - .maxstack 3 - IL_000e: ldarg.0 - IL_000f: ldfld string TwoStringInt::isString - IL_0014: brtrue.s IL_0021 - - IL_0016: ldarg.0 - IL_0017: ldfld int32 TwoStringInt::isInt - IL_001c: ldc.i4.0 - IL_001d: ceq - IL_001f: br.s IL_0022 - - IL_0021: ldc.i4.0 - IL_0022: stsfld bool Program::IsInit - IL_0027: ldstr "TwoStringInt: isString: {0} isInt: {1}" - IL_002c: ldarg.0 - IL_002d: ldfld string TwoStringInt::isString - IL_0032: brfalse.s IL_003c - - IL_0034: ldarg.0 - IL_0035: ldfld string TwoStringInt::isString - IL_003a: br.s IL_0041 - - IL_003c: ldstr "" - IL_0041: ldarg.0 - IL_0042: ldfld int32 TwoStringInt::isInt - IL_0047: box [mscorlib]System.Int32 - IL_004c: call void [System.Console]System.Console::WriteLine(string, - object, - object) - IL_0051: ret - } - -} - -.class public sequential ansi sealed beforefieldinit TwoIntBool - extends [mscorlib]System.ValueType -{ - .field public int32 isInt - .field public bool isBool - .method public hidebysig specialname rtspecialname - instance void .ctor(int32 i) cil managed noinlining - { - .maxstack 3 - IL_000e: ldarg.0 - IL_000f: ldfld int32 TwoIntBool::isInt - IL_0014: brtrue.s IL_0021 - - IL_0016: ldarg.0 - IL_0017: ldfld bool TwoIntBool::isBool - IL_001c: ldc.i4.0 - IL_001d: ceq - IL_001f: br.s IL_0022 - - IL_0021: ldc.i4.0 - IL_0022: stsfld bool Program::IsInit - IL_0027: ldstr "TwoIntBool: isInt: {0} isBool: {1}" - IL_002c: ldarg.0 - IL_002d: ldfld int32 TwoIntBool::isInt - IL_0032: box [mscorlib]System.Int32 - IL_0037: ldarg.0 - IL_0038: ldfld bool TwoIntBool::isBool - IL_003d: box [mscorlib]System.Boolean - IL_0042: call void [System.Console]System.Console::WriteLine(string, - object, - object) - IL_0047: ret - } - -} - -.class public sequential ansi sealed beforefieldinit TwoRTTHDouble - extends [mscorlib]System.ValueType -{ - .field public float64 isDouble - .field public valuetype [mscorlib]System.RuntimeTypeHandle isRtTH - .method public hidebysig specialname rtspecialname - instance void .ctor(bool i) cil managed noinlining - { - .maxstack 3 - IL_001b: ldarg.0 - IL_001c: ldfld float64 TwoRTTHDouble::isDouble - IL_0021: ldc.r8 0.0 - IL_002a: bne.un.s IL_0043 - - IL_002c: ldarg.0 - IL_002d: ldflda valuetype [mscorlib]System.RuntimeTypeHandle TwoRTTHDouble::isRtTH - IL_0032: call instance native int [mscorlib]System.RuntimeTypeHandle::get_Value() - IL_0037: ldsfld native int [mscorlib]System.IntPtr::Zero - IL_003c: call bool [mscorlib]System.IntPtr::op_Equality(native int, - native int) - IL_0041: br.s IL_0044 - - IL_0043: ldc.i4.0 - IL_0044: stsfld bool Program::IsInit - IL_0049: ldstr "TwoRTTHDouble: isDouble: {0}, isRtTH.Value: {1}" - IL_004e: ldarg.0 - IL_004f: ldfld float64 TwoRTTHDouble::isDouble - IL_0054: box [mscorlib]System.Double - IL_0059: ldarg.0 - IL_005a: ldflda valuetype [mscorlib]System.RuntimeTypeHandle TwoRTTHDouble::isRtTH - IL_005f: call instance native int [mscorlib]System.RuntimeTypeHandle::get_Value() - IL_0064: box [mscorlib]System.IntPtr - IL_0069: call void [System.Console]System.Console::WriteLine(string, - object, - object) - IL_006e: ret - } - -} - -.class public sequential ansi sealed beforefieldinit AllTypes - extends [mscorlib]System.ValueType -{ - .field public bool isBool - .field public int32 isInt - .field public int16 isShort - .field public float64 isDouble - .field public valuetype [mscorlib]System.RuntimeTypeHandle isRtTH - .method public hidebysig specialname rtspecialname - instance void .ctor(bool i) cil managed noinlining - { - .maxstack 4 - .locals init (object[] V_0) - IL_0024: ldarg.0 - IL_0025: ldflda valuetype [mscorlib]System.RuntimeTypeHandle AllTypes::isRtTH - IL_002a: initobj [mscorlib]System.RuntimeTypeHandle - IL_0030: ldarg.0 - IL_0031: ldfld bool AllTypes::isBool - IL_0036: brtrue.s IL_0070 - - IL_0038: ldarg.0 - IL_0039: ldfld int32 AllTypes::isInt - IL_003e: brtrue.s IL_0070 - - IL_0040: ldarg.0 - IL_0041: ldfld int16 AllTypes::isShort - IL_0046: brtrue.s IL_0070 - - IL_0048: ldarg.0 - IL_0049: ldfld float64 AllTypes::isDouble - IL_004e: ldc.r8 0.0 - IL_0057: bne.un.s IL_0070 - - IL_0059: ldarg.0 - IL_005a: ldflda valuetype [mscorlib]System.RuntimeTypeHandle AllTypes::isRtTH - IL_005f: call instance native int [mscorlib]System.RuntimeTypeHandle::get_Value() - IL_0064: ldsfld native int [mscorlib]System.IntPtr::Zero - IL_0069: call bool [mscorlib]System.IntPtr::op_Equality(native int, - native int) - IL_006e: br.s IL_0071 - - IL_0070: ldc.i4.0 - IL_0071: stsfld bool Program::IsInit - IL_0076: ldstr "AllTypes: isBool: {0} isInt: {1}, isShort: {2}, is" - + "Double: {3}, isRtTH.Value: {4}" - IL_007b: ldc.i4.5 - IL_007c: newarr [mscorlib]System.Object - IL_0081: stloc.0 - IL_0082: ldloc.0 - IL_0083: ldc.i4.0 - IL_0084: ldarg.0 - IL_0085: ldfld bool AllTypes::isBool - IL_008a: box [mscorlib]System.Boolean - IL_008f: stelem.ref - IL_0090: ldloc.0 - IL_0091: ldc.i4.1 - IL_0092: ldarg.0 - IL_0093: ldfld int32 AllTypes::isInt - IL_0098: box [mscorlib]System.Int32 - IL_009d: stelem.ref - IL_009e: ldloc.0 - IL_009f: ldc.i4.2 - IL_00a0: ldarg.0 - IL_00a1: ldfld int16 AllTypes::isShort - IL_00a6: box [mscorlib]System.Int16 - IL_00ab: stelem.ref - IL_00ac: ldloc.0 - IL_00ad: ldc.i4.3 - IL_00ae: ldarg.0 - IL_00af: ldfld float64 AllTypes::isDouble - IL_00b4: box [mscorlib]System.Double - IL_00b9: stelem.ref - IL_00ba: ldloc.0 - IL_00bb: ldc.i4.4 - IL_00bc: ldarg.0 - IL_00bd: ldflda valuetype [mscorlib]System.RuntimeTypeHandle AllTypes::isRtTH - IL_00c2: call instance native int [mscorlib]System.RuntimeTypeHandle::get_Value() - IL_00c7: box [mscorlib]System.IntPtr - IL_00cc: stelem.ref - IL_00cd: ldloc.0 - IL_00ce: call void [System.Console]System.Console::WriteLine(string, - object[]) - IL_00d3: ret - } - -} - -.class public sequential ansi sealed beforefieldinit AllTypesNullable - extends [mscorlib]System.ValueType -{ - .field public valuetype [mscorlib]System.Nullable`1 isBool - .field public valuetype [mscorlib]System.Nullable`1 isInt - .field public valuetype [mscorlib]System.Nullable`1 isShort - .field public valuetype [mscorlib]System.Nullable`1 isDouble - .method public hidebysig specialname rtspecialname - instance void .ctor(bool i) cil managed noinlining - { - .maxstack 4 - .locals init (valuetype [mscorlib]System.Nullable`1 V_0, - valuetype [mscorlib]System.Nullable`1 V_1, - valuetype [mscorlib]System.Nullable`1 V_2, - valuetype [mscorlib]System.Nullable`1 V_3, - object[] V_4) - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: newobj instance void valuetype [mscorlib]System.Nullable`1::.ctor(!0) - IL_0007: stfld valuetype [mscorlib]System.Nullable`1 AllTypesNullable::isBool - IL_000c: ldarg.0 - IL_000d: ldc.i4.0 - IL_000e: newobj instance void valuetype [mscorlib]System.Nullable`1::.ctor(!0) - IL_0013: stfld valuetype [mscorlib]System.Nullable`1 AllTypesNullable::isInt - IL_0018: ldarg.0 - IL_0019: ldc.i4.0 - IL_001a: newobj instance void valuetype [mscorlib]System.Nullable`1::.ctor(!0) - IL_001f: stfld valuetype [mscorlib]System.Nullable`1 AllTypesNullable::isShort - IL_0024: ldarg.0 - IL_0025: ldc.r8 0.0 - IL_002e: newobj instance void valuetype [mscorlib]System.Nullable`1::.ctor(!0) - IL_0033: stfld valuetype [mscorlib]System.Nullable`1 AllTypesNullable::isDouble - IL_0038: ldarg.0 - IL_0039: ldfld valuetype [mscorlib]System.Nullable`1 AllTypesNullable::isBool - IL_003e: stloc.0 - IL_003f: ldloca.s V_0 - IL_0041: call instance !0 valuetype [mscorlib]System.Nullable`1::GetValueOrDefault() - IL_0046: brtrue.s IL_0051 - - IL_0048: ldloca.s V_0 - IL_004a: call instance bool valuetype [mscorlib]System.Nullable`1::get_HasValue() - IL_004f: br.s IL_0052 - - IL_0051: ldc.i4.0 - IL_0052: brfalse.s IL_00b1 - - IL_0054: ldarg.0 - IL_0055: ldfld valuetype [mscorlib]System.Nullable`1 AllTypesNullable::isInt - IL_005a: stloc.1 - IL_005b: ldloca.s V_1 - IL_005d: call instance !0 valuetype [mscorlib]System.Nullable`1::GetValueOrDefault() - IL_0062: brtrue.s IL_006d - - IL_0064: ldloca.s V_1 - IL_0066: call instance bool valuetype [mscorlib]System.Nullable`1::get_HasValue() - IL_006b: br.s IL_006e - - IL_006d: ldc.i4.0 - IL_006e: brfalse.s IL_00b1 - - IL_0070: ldarg.0 - IL_0071: ldfld valuetype [mscorlib]System.Nullable`1 AllTypesNullable::isShort - IL_0076: stloc.2 - IL_0077: ldloca.s V_2 - IL_0079: call instance !0 valuetype [mscorlib]System.Nullable`1::GetValueOrDefault() - IL_007e: brtrue.s IL_0089 - - IL_0080: ldloca.s V_2 - IL_0082: call instance bool valuetype [mscorlib]System.Nullable`1::get_HasValue() - IL_0087: br.s IL_008a - - IL_0089: ldc.i4.0 - IL_008a: brfalse.s IL_00b1 - - IL_008c: ldarg.0 - IL_008d: ldfld valuetype [mscorlib]System.Nullable`1 AllTypesNullable::isDouble - IL_0092: stloc.3 - IL_0093: ldloca.s V_3 - IL_0095: call instance !0 valuetype [mscorlib]System.Nullable`1::GetValueOrDefault() - IL_009a: ldc.r8 0.0 - IL_00a3: bne.un.s IL_00ae - - IL_00a5: ldloca.s V_3 - IL_00a7: call instance bool valuetype [mscorlib]System.Nullable`1::get_HasValue() - IL_00ac: br.s IL_00b2 - - IL_00ae: ldc.i4.0 - IL_00af: br.s IL_00b2 - - IL_00b1: ldc.i4.0 - IL_00b2: stsfld bool Program::IsInit - IL_00b7: ldstr "AllTypesNullable: isBool: {0} isInt: {1}, isShort:" - + " {2}, isDouble: {3}" - IL_00bc: ldc.i4.4 - IL_00bd: newarr [mscorlib]System.Object - IL_00c2: stloc.s V_4 - IL_00c4: ldloc.s V_4 - IL_00c6: ldc.i4.0 - IL_00c7: ldarg.0 - IL_00c8: ldfld valuetype [mscorlib]System.Nullable`1 AllTypesNullable::isBool - IL_00cd: box valuetype [mscorlib]System.Nullable`1 - IL_00d2: stelem.ref - IL_00d3: ldloc.s V_4 - IL_00d5: ldc.i4.1 - IL_00d6: ldarg.0 - IL_00d7: ldfld valuetype [mscorlib]System.Nullable`1 AllTypesNullable::isInt - IL_00dc: box valuetype [mscorlib]System.Nullable`1 - IL_00e1: stelem.ref - IL_00e2: ldloc.s V_4 - IL_00e4: ldc.i4.2 - IL_00e5: ldarg.0 - IL_00e6: ldfld valuetype [mscorlib]System.Nullable`1 AllTypesNullable::isShort - IL_00eb: box valuetype [mscorlib]System.Nullable`1 - IL_00f0: stelem.ref - IL_00f1: ldloc.s V_4 - IL_00f3: ldc.i4.3 - IL_00f4: ldarg.0 - IL_00f5: ldfld valuetype [mscorlib]System.Nullable`1 AllTypesNullable::isDouble - IL_00fa: box valuetype [mscorlib]System.Nullable`1 - IL_00ff: stelem.ref - IL_0100: ldloc.s V_4 - IL_0102: call void [System.Console]System.Console::WriteLine(string, - object[]) - IL_0107: ret - } - -} - -.class public sequential ansi sealed beforefieldinit AllTypesNoExplicitConstructor - extends [mscorlib]System.ValueType -{ - .field public bool isBool - .field public int32 isInt - .field public int16 isShort - .field public float64 isDouble - .field public valuetype [mscorlib]System.RuntimeTypeHandle isRtTH -} - -.class public auto ansi beforefieldinit Program - extends [mscorlib]System.Object -{ - .field public static bool IsInit - .field public static bool AllPassed - .method public hidebysig static void F(object o) cil managed noinlining - { - .maxstack 8 - IL_0000: ret - } - - .method private hidebysig static void Test1() cil managed noinlining - { - .maxstack 8 - IL_0000: ldstr "4" - IL_0005: newobj instance void OneString::.ctor(string) - IL_000a: box OneString - IL_000f: call void Program::F(object) - IL_0014: ldsfld bool Program::IsInit - IL_0019: brtrue.s IL_0021 - - IL_001b: ldc.i4.0 - IL_001c: stsfld bool Program::AllPassed - IL_0021: ret - } - - .method private hidebysig static void Test2() cil managed noinlining - { - .maxstack 8 - IL_0000: ldc.i4.4 - IL_0001: newobj instance void OneInt::.ctor(int32) - IL_0006: box OneInt - IL_000b: call void Program::F(object) - IL_0010: ldsfld bool Program::IsInit - IL_0015: brtrue.s IL_001d - - IL_0017: ldc.i4.0 - IL_0018: stsfld bool Program::AllPassed - IL_001d: ret - } - - .method private hidebysig static void Test3() cil managed noinlining - { - .maxstack 8 - IL_0000: ldc.i4.1 - IL_0001: newobj instance void OneBool::.ctor(bool) - IL_0006: box OneBool - IL_000b: call void Program::F(object) - IL_0010: ldsfld bool Program::IsInit - IL_0015: brtrue.s IL_001d - - IL_0017: ldc.i4.0 - IL_0018: stsfld bool Program::AllPassed - IL_001d: ret - } - - .method private hidebysig static void Test4() cil managed noinlining - { - .maxstack 2 - .locals init (valuetype [mscorlib]System.RuntimeTypeHandle V_0) - IL_0000: ldloca.s V_0 - IL_0002: initobj [mscorlib]System.RuntimeTypeHandle - IL_0008: ldloc.0 - IL_0009: newobj instance void OneRtTH::.ctor(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_000e: box OneRtTH - IL_0013: call void Program::F(object) - IL_0018: ldsfld bool Program::IsInit - IL_001d: brtrue.s IL_0025 - - IL_001f: ldc.i4.0 - IL_0020: stsfld bool Program::AllPassed - IL_0025: ret - } - - .method private hidebysig static void Test5() cil managed noinlining - { - .maxstack 8 - IL_0000: ldstr "4" - IL_0005: newobj instance void OneString::.ctor(string) - IL_000a: newobj instance void OneStructOneString::.ctor(valuetype OneString) - IL_000f: box OneStructOneString - IL_0014: call void Program::F(object) - IL_0019: ldsfld bool Program::IsInit - IL_001e: brtrue.s IL_0026 - - IL_0020: ldc.i4.0 - IL_0021: stsfld bool Program::AllPassed - IL_0026: ret - } - - .method private hidebysig static void Test6() cil managed noinlining - { - .maxstack 8 - IL_0000: ldc.i4.4 - IL_0001: newobj instance void OneInt::.ctor(int32) - IL_0006: newobj instance void OneStructOneInt::.ctor(valuetype OneInt) - IL_000b: box OneStructOneInt - IL_0010: call void Program::F(object) - IL_0015: ldsfld bool Program::IsInit - IL_001a: brtrue.s IL_0022 - - IL_001c: ldc.i4.0 - IL_001d: stsfld bool Program::AllPassed - IL_0022: ret - } - - .method private hidebysig static void Test7() cil managed noinlining - { - .maxstack 2 - .locals init (valuetype [mscorlib]System.RuntimeTypeHandle V_0) - IL_0000: ldloca.s V_0 - IL_0002: initobj [mscorlib]System.RuntimeTypeHandle - IL_0008: ldloc.0 - IL_0009: newobj instance void OneRtTH::.ctor(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_000e: newobj instance void OneStructOneRtTH::.ctor(valuetype OneRtTH) - IL_0013: box OneStructOneRtTH - IL_0018: call void Program::F(object) - IL_001d: ldsfld bool Program::IsInit - IL_0022: brtrue.s IL_002a - - IL_0024: ldc.i4.0 - IL_0025: stsfld bool Program::AllPassed - IL_002a: ret - } - - .method private hidebysig static void Test8() cil managed noinlining - { - .maxstack 8 - IL_0000: ldstr "1" - IL_0005: newobj instance void TwoStringInt::.ctor(string) - IL_000a: box TwoStringInt - IL_000f: call void Program::F(object) - IL_0014: ldsfld bool Program::IsInit - IL_0019: brtrue.s IL_0021 - - IL_001b: ldc.i4.0 - IL_001c: stsfld bool Program::AllPassed - IL_0021: ret - } - - .method private hidebysig static void Test9() cil managed noinlining - { - .maxstack 8 - IL_0000: ldc.i4.1 - IL_0001: newobj instance void TwoIntBool::.ctor(int32) - IL_0006: box TwoIntBool - IL_000b: call void Program::F(object) - IL_0010: ldsfld bool Program::IsInit - IL_0015: brtrue.s IL_001d - - IL_0017: ldc.i4.0 - IL_0018: stsfld bool Program::AllPassed - IL_001d: ret - } - - .method private hidebysig static void Test10() cil managed noinlining - { - .maxstack 8 - IL_0000: ldc.i4.1 - IL_0001: newobj instance void TwoRTTHDouble::.ctor(bool) - IL_0006: box TwoRTTHDouble - IL_000b: call void Program::F(object) - IL_0010: ldsfld bool Program::IsInit - IL_0015: brtrue.s IL_001d - - IL_0017: ldc.i4.0 - IL_0018: stsfld bool Program::AllPassed - IL_001d: ret - } - - .method private hidebysig static void Test11() cil managed noinlining - { - .maxstack 8 - IL_0000: ldc.i4.1 - IL_0001: newobj instance void AllTypes::.ctor(bool) - IL_0006: box AllTypes - IL_000b: call void Program::F(object) - IL_0010: ldsfld bool Program::IsInit - IL_0015: brtrue.s IL_001d - - IL_0017: ldc.i4.0 - IL_0018: stsfld bool Program::AllPassed - IL_001d: ret - } - - .method private hidebysig static void Test12() cil managed noinlining - { - .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: newobj instance void AllTypesNullable::.ctor(bool) - IL_0006: box AllTypesNullable - IL_000b: call void Program::F(object) - IL_0010: ldsfld bool Program::IsInit - IL_0015: brtrue.s IL_001d - - IL_0017: ldc.i4.0 - IL_0018: stsfld bool Program::AllPassed - IL_001d: ret - } - - .method private hidebysig static void Test13() cil managed noinlining - { - .maxstack 2 - .locals init (int32 V_0) - IL_0000: ldstr "Calling OneString in a loop..." - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: br.s IL_0033 - - IL_000e: ldstr "4" - IL_0013: newobj instance void OneString::.ctor(string) - IL_0018: box OneString - IL_001d: call void Program::F(object) - IL_0022: ldsfld bool Program::IsInit - IL_0027: brtrue.s IL_002f - - IL_0029: ldc.i4.0 - IL_002a: stsfld bool Program::AllPassed - IL_002f: ldloc.0 - IL_0030: ldc.i4.1 - IL_0031: add - IL_0032: stloc.0 - IL_0033: ldloc.0 - IL_0034: ldc.i4.s 10 - IL_0036: blt.s IL_000e - - IL_0038: ret - } - - .method private hidebysig static void Test14() cil managed noinlining - { - .maxstack 2 - .locals init (int32 V_0) - IL_0000: ldstr "Calling OneInt in a loop..." - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: br.s IL_002f - - IL_000e: ldc.i4.4 - IL_000f: newobj instance void OneInt::.ctor(int32) - IL_0014: box OneInt - IL_0019: call void Program::F(object) - IL_001e: ldsfld bool Program::IsInit - IL_0023: brtrue.s IL_002b - - IL_0025: ldc.i4.0 - IL_0026: stsfld bool Program::AllPassed - IL_002b: ldloc.0 - IL_002c: ldc.i4.1 - IL_002d: add - IL_002e: stloc.0 - IL_002f: ldloc.0 - IL_0030: ldc.i4.s 10 - IL_0032: blt.s IL_000e - - IL_0034: ret - } - - .method private hidebysig static void Test15() cil managed noinlining - { - .maxstack 2 - .locals init (int32 V_0) - IL_0000: ldstr "Calling OneBool in a loop..." - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: br.s IL_002f - - IL_000e: ldc.i4.1 - IL_000f: newobj instance void OneBool::.ctor(bool) - IL_0014: box OneBool - IL_0019: call void Program::F(object) - IL_001e: ldsfld bool Program::IsInit - IL_0023: brtrue.s IL_002b - - IL_0025: ldc.i4.0 - IL_0026: stsfld bool Program::AllPassed - IL_002b: ldloc.0 - IL_002c: ldc.i4.1 - IL_002d: add - IL_002e: stloc.0 - IL_002f: ldloc.0 - IL_0030: ldc.i4.s 10 - IL_0032: blt.s IL_000e - - IL_0034: ret - } - - .method private hidebysig static void Test16() cil managed noinlining - { - .maxstack 2 - .locals init (int32 V_0, - valuetype [mscorlib]System.RuntimeTypeHandle V_1) - IL_0000: ldstr "Calling OneRtTH in a loop..." - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: br.s IL_0037 - - IL_000e: ldloca.s V_1 - IL_0010: initobj [mscorlib]System.RuntimeTypeHandle - IL_0016: ldloc.1 - IL_0017: newobj instance void OneRtTH::.ctor(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_001c: box OneRtTH - IL_0021: call void Program::F(object) - IL_0026: ldsfld bool Program::IsInit - IL_002b: brtrue.s IL_0033 - - IL_002d: ldc.i4.0 - IL_002e: stsfld bool Program::AllPassed - IL_0033: ldloc.0 - IL_0034: ldc.i4.1 - IL_0035: add - IL_0036: stloc.0 - IL_0037: ldloc.0 - IL_0038: ldc.i4.s 10 - IL_003a: blt.s IL_000e - - IL_003c: ret - } - - .method private hidebysig static void Test17() cil managed noinlining - { - .maxstack 2 - .locals init (int32 V_0) - IL_0000: ldstr "Calling OneStructOneString in a loop..." - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: br.s IL_0038 - - IL_000e: ldstr "4" - IL_0013: newobj instance void OneString::.ctor(string) - IL_0018: newobj instance void OneStructOneString::.ctor(valuetype OneString) - IL_001d: box OneStructOneString - IL_0022: call void Program::F(object) - IL_0027: ldsfld bool Program::IsInit - IL_002c: brtrue.s IL_0034 - - IL_002e: ldc.i4.0 - IL_002f: stsfld bool Program::AllPassed - IL_0034: ldloc.0 - IL_0035: ldc.i4.1 - IL_0036: add - IL_0037: stloc.0 - IL_0038: ldloc.0 - IL_0039: ldc.i4.s 10 - IL_003b: blt.s IL_000e - - IL_003d: ret - } - - .method private hidebysig static void Test18() cil managed noinlining - { - .maxstack 2 - .locals init (int32 V_0) - IL_0000: ldstr "Calling OneStructOneInt in a loop..." - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: br.s IL_0034 - - IL_000e: ldc.i4.4 - IL_000f: newobj instance void OneInt::.ctor(int32) - IL_0014: newobj instance void OneStructOneInt::.ctor(valuetype OneInt) - IL_0019: box OneStructOneInt - IL_001e: call void Program::F(object) - IL_0023: ldsfld bool Program::IsInit - IL_0028: brtrue.s IL_0030 - - IL_002a: ldc.i4.0 - IL_002b: stsfld bool Program::AllPassed - IL_0030: ldloc.0 - IL_0031: ldc.i4.1 - IL_0032: add - IL_0033: stloc.0 - IL_0034: ldloc.0 - IL_0035: ldc.i4.s 10 - IL_0037: blt.s IL_000e - - IL_0039: ret - } - - .method private hidebysig static void Test19() cil managed noinlining - { - .maxstack 2 - .locals init (int32 V_0, - valuetype [mscorlib]System.RuntimeTypeHandle V_1) - IL_0000: ldstr "Calling OneStructOneRtTH in a loop..." - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: br.s IL_003c - - IL_000e: ldloca.s V_1 - IL_0010: initobj [mscorlib]System.RuntimeTypeHandle - IL_0016: ldloc.1 - IL_0017: newobj instance void OneRtTH::.ctor(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_001c: newobj instance void OneStructOneRtTH::.ctor(valuetype OneRtTH) - IL_0021: box OneStructOneRtTH - IL_0026: call void Program::F(object) - IL_002b: ldsfld bool Program::IsInit - IL_0030: brtrue.s IL_0038 - - IL_0032: ldc.i4.0 - IL_0033: stsfld bool Program::AllPassed - IL_0038: ldloc.0 - IL_0039: ldc.i4.1 - IL_003a: add - IL_003b: stloc.0 - IL_003c: ldloc.0 - IL_003d: ldc.i4.s 10 - IL_003f: blt.s IL_000e - - IL_0041: ret - } - - .method private hidebysig static void Test20() cil managed noinlining - { - .maxstack 2 - .locals init (int32 V_0) - IL_0000: ldstr "Calling TwoStringInt in a loop..." - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: br.s IL_0033 - - IL_000e: ldstr "1" - IL_0013: newobj instance void TwoStringInt::.ctor(string) - IL_0018: box TwoStringInt - IL_001d: call void Program::F(object) - IL_0022: ldsfld bool Program::IsInit - IL_0027: brtrue.s IL_002f - - IL_0029: ldc.i4.0 - IL_002a: stsfld bool Program::AllPassed - IL_002f: ldloc.0 - IL_0030: ldc.i4.1 - IL_0031: add - IL_0032: stloc.0 - IL_0033: ldloc.0 - IL_0034: ldc.i4.s 10 - IL_0036: blt.s IL_000e - - IL_0038: ret - } - - .method private hidebysig static void Test21() cil managed noinlining - { - .maxstack 2 - .locals init (int32 V_0) - IL_0000: ldstr "Calling TwoIntBool in a loop..." - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: br.s IL_002f - - IL_000e: ldc.i4.1 - IL_000f: newobj instance void TwoIntBool::.ctor(int32) - IL_0014: box TwoIntBool - IL_0019: call void Program::F(object) - IL_001e: ldsfld bool Program::IsInit - IL_0023: brtrue.s IL_002b - - IL_0025: ldc.i4.0 - IL_0026: stsfld bool Program::AllPassed - IL_002b: ldloc.0 - IL_002c: ldc.i4.1 - IL_002d: add - IL_002e: stloc.0 - IL_002f: ldloc.0 - IL_0030: ldc.i4.s 10 - IL_0032: blt.s IL_000e - - IL_0034: ret - } - - .method private hidebysig static void Test22() cil managed noinlining - { - .maxstack 2 - .locals init (int32 V_0) - IL_0000: ldstr "Calling TwoRTTHDouble in a loop..." - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: br.s IL_002f - - IL_000e: ldc.i4.1 - IL_000f: newobj instance void TwoRTTHDouble::.ctor(bool) - IL_0014: box TwoRTTHDouble - IL_0019: call void Program::F(object) - IL_001e: ldsfld bool Program::IsInit - IL_0023: brtrue.s IL_002b - - IL_0025: ldc.i4.0 - IL_0026: stsfld bool Program::AllPassed - IL_002b: ldloc.0 - IL_002c: ldc.i4.1 - IL_002d: add - IL_002e: stloc.0 - IL_002f: ldloc.0 - IL_0030: ldc.i4.s 10 - IL_0032: blt.s IL_000e - - IL_0034: ret - } - - .method private hidebysig static void Test23() cil managed noinlining - { - .maxstack 2 - .locals init (int32 V_0) - IL_0000: ldstr "Calling AllTypes in a loop..." - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: br.s IL_002f - - IL_000e: ldc.i4.1 - IL_000f: newobj instance void AllTypes::.ctor(bool) - IL_0014: box AllTypes - IL_0019: call void Program::F(object) - IL_001e: ldsfld bool Program::IsInit - IL_0023: brtrue.s IL_002b - - IL_0025: ldc.i4.0 - IL_0026: stsfld bool Program::AllPassed - IL_002b: ldloc.0 - IL_002c: ldc.i4.1 - IL_002d: add - IL_002e: stloc.0 - IL_002f: ldloc.0 - IL_0030: ldc.i4.s 10 - IL_0032: blt.s IL_000e - - IL_0034: ret - } - - .method private hidebysig static void Test24() cil managed noinlining - { - .maxstack 2 - .locals init (int32 V_0) - IL_0000: ldstr "Calling AllTypesNullable in a loop..." - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: ldc.i4.0 - IL_000b: stloc.0 - IL_000c: br.s IL_002f - - IL_000e: ldc.i4.0 - IL_000f: newobj instance void AllTypesNullable::.ctor(bool) - IL_0014: box AllTypesNullable - IL_0019: call void Program::F(object) - IL_001e: ldsfld bool Program::IsInit - IL_0023: brtrue.s IL_002b - - IL_0025: ldc.i4.0 - IL_0026: stsfld bool Program::AllPassed - IL_002b: ldloc.0 - IL_002c: ldc.i4.1 - IL_002d: add - IL_002e: stloc.0 - IL_002f: ldloc.0 - IL_0030: ldc.i4.s 10 - IL_0032: blt.s IL_000e - - IL_0034: ret - } - - .method private hidebysig static void Test25() cil managed noinlining - { - .maxstack 4 - .locals init (valuetype AllTypesNoExplicitConstructor V_0, - object[] V_1) - IL_0000: ldloca.s V_0 - IL_0002: initobj AllTypesNoExplicitConstructor - IL_0008: ldloca.s V_0 - IL_000a: ldfld bool AllTypesNoExplicitConstructor::isBool - IL_000f: brtrue.s IL_004d - - IL_0011: ldloca.s V_0 - IL_0013: ldfld int32 AllTypesNoExplicitConstructor::isInt - IL_0018: brtrue.s IL_004d - - IL_001a: ldloca.s V_0 - IL_001c: ldfld int16 AllTypesNoExplicitConstructor::isShort - IL_0021: brtrue.s IL_004d - - IL_0023: ldloca.s V_0 - IL_0025: ldfld float64 AllTypesNoExplicitConstructor::isDouble - IL_002a: ldc.r8 0.0 - IL_0033: bne.un.s IL_004d - - IL_0035: ldloca.s V_0 - IL_0037: ldflda valuetype [mscorlib]System.RuntimeTypeHandle AllTypesNoExplicitConstructor::isRtTH - IL_003c: call instance native int [mscorlib]System.RuntimeTypeHandle::get_Value() - IL_0041: ldsfld native int [mscorlib]System.IntPtr::Zero - IL_0046: call bool [mscorlib]System.IntPtr::op_Equality(native int, - native int) - IL_004b: br.s IL_004e - - IL_004d: ldc.i4.0 - IL_004e: stsfld bool Program::IsInit - IL_0053: ldstr "AllTypesNoExplicitConstructor: isBool: {0} isInt: " - + "{1}, isShort: {2}, isDouble: {3}, isRtTH.Value: {4}" - IL_0058: ldc.i4.5 - IL_0059: newarr [mscorlib]System.Object - IL_005e: stloc.1 - IL_005f: ldloc.1 - IL_0060: ldc.i4.0 - IL_0061: ldloca.s V_0 - IL_0063: ldfld bool AllTypesNoExplicitConstructor::isBool - IL_0068: box [mscorlib]System.Boolean - IL_006d: stelem.ref - IL_006e: ldloc.1 - IL_006f: ldc.i4.1 - IL_0070: ldloca.s V_0 - IL_0072: ldfld int32 AllTypesNoExplicitConstructor::isInt - IL_0077: box [mscorlib]System.Int32 - IL_007c: stelem.ref - IL_007d: ldloc.1 - IL_007e: ldc.i4.2 - IL_007f: ldloca.s V_0 - IL_0081: ldfld int16 AllTypesNoExplicitConstructor::isShort - IL_0086: box [mscorlib]System.Int16 - IL_008b: stelem.ref - IL_008c: ldloc.1 - IL_008d: ldc.i4.3 - IL_008e: ldloca.s V_0 - IL_0090: ldfld float64 AllTypesNoExplicitConstructor::isDouble - IL_0095: box [mscorlib]System.Double - IL_009a: stelem.ref - IL_009b: ldloc.1 - IL_009c: ldc.i4.4 - IL_009d: ldloca.s V_0 - IL_009f: ldflda valuetype [mscorlib]System.RuntimeTypeHandle AllTypesNoExplicitConstructor::isRtTH - IL_00a4: call instance native int [mscorlib]System.RuntimeTypeHandle::get_Value() - IL_00a9: box [mscorlib]System.IntPtr - IL_00ae: stelem.ref - IL_00af: ldloc.1 - IL_00b0: call void [System.Console]System.Console::WriteLine(string, - object[]) - IL_00b5: ldsfld bool Program::IsInit - IL_00ba: brtrue.s IL_00c2 - - IL_00bc: ldc.i4.0 - IL_00bd: stsfld bool Program::AllPassed - IL_00c2: ret - } - - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - .maxstack 1 - IL_0000: call void Program::Test1() - IL_0005: call void Program::Test2() - IL_000a: call void Program::Test3() - IL_0014: call void Program::Test5() - IL_0019: call void Program::Test6() - IL_0023: call void Program::Test8() - IL_0028: call void Program::Test9() - IL_0037: call void Program::Test12() - IL_003c: call void Program::Test13() - IL_0041: call void Program::Test14() - IL_0046: call void Program::Test15() - IL_0050: call void Program::Test17() - IL_0055: call void Program::Test18() - IL_005f: call void Program::Test20() - IL_0064: call void Program::Test21() - IL_0073: call void Program::Test24() - IL_007d: ldsfld bool Program::AllPassed - IL_0082: brfalse.s IL_0091 - - IL_0084: ldstr "!!!!!!!!!! TEST PASSED !!!!!!!!!!!!!" - IL_0089: call void [System.Console]System.Console::WriteLine(string) - IL_008e: ldc.i4.s 100 - IL_0090: ret - - IL_0091: ldstr "!!!!!!!!!! TEST FAILED !!!!!!!!!!!!!" - IL_0096: call void [System.Console]System.Console::WriteLine(string) - IL_009b: ldc.i4.s 101 - IL_009d: ret - } - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } - - .method private hidebysig specialname rtspecialname static - void .cctor() cil managed - { - .maxstack 8 - IL_0000: ldc.i4.1 - IL_0001: stsfld bool Program::IsInit - IL_0006: ldc.i4.1 - IL_0007: stsfld bool Program::AllPassed - IL_000c: ret - } - -} diff --git a/src/coreclr/tests/src/JIT/Regression/Dev11/External/Dev11_243742/dll.cs b/src/coreclr/tests/src/JIT/Regression/Dev11/External/Dev11_243742/dll.cs deleted file mode 100644 index d8d0810f4c1d..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/Dev11/External/Dev11_243742/dll.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -namespace BadOverride1.Dll -{ - public static class Apis - { - public static void RunDllCode() - { - Console.Write("In the DLL.\r\n"); - return; - } - } - - public class ParameterizedBase - { - public virtual void RunGenericMethod(T1 value) - { - Console.Write( - "ParameterizedBase<{0}>.RunGenericMethod<{1}>({2})\r\n", - typeof(TDerivedType), - typeof(T1), - value - ); - - return; - } - - public virtual void RunGenericMethod(T1 value) - { - Console.Write( - "ParameterizedBase<{0}>.RunGenericMethod<{1},{2}>({3})\r\n", - typeof(TDerivedType), - typeof(T1), - typeof(T2), - value - ); - - return; - } - } -} diff --git a/src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_18056/Bool_And_Op.cs b/src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_18056/Bool_And_Op.cs deleted file mode 100644 index ee5e22201ac2..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_18056/Bool_And_Op.cs +++ /dev/null @@ -1,99 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -// The test originally exposed the issue with predecessors lists: -// 1. fgReplacePred did not keep the sorted order (GitHub_13295); -// 2. fgAddRefPred did not find the existing occurrence if the order was not sorted; -// 3. fgReplacePred had several occurrences of the same block and when it became dead it updated only the first link; -// 4. The link to the dead block exposed noway_assert in flowgraph. -// The repro required JitStress=2 or complus_jitstressmodenames=STRESS_BB_PROFILE; -// STRESS_BB_PROFILE uses file name hash to set weights, so this file can't be renamed. - -#pragma warning disable - -using System; -class testout1 -{ - static bool static_field_bool; - static bool sfb_false; - static bool sfb_true; - bool mfb; - bool mfb_false; - bool mfb_true; - static bool simple_func_bool() - { - return true; - } - static bool func_sb_true() - { - return true; - } - static bool func_sb_false() - { - return false; - } - - static int Sub_Funclet_411() - { - int True_Sum = 0; - int False_Sum = 0; - int index = 1; - bool local_bool = true; - testout1 t1_i = new testout1(); - bool[] ab_false = new bool[3]; - bool[] ab_true = new bool[3]; - ab_true[0] = true; - ab_true[1] = true; - ab_true[2] = true; - - static_field_bool = true; - sfb_false = false; - sfb_true = true; - - t1_i.mfb = true; - t1_i.mfb_false = false; - t1_i.mfb_true = true; - if (ab_true[index] && func_sb_true() ? static_field_bool : t1_i.mfb) True_Sum++; else False_Sum++; - if (ab_true[index] && func_sb_true() ? static_field_bool : simple_func_bool()) True_Sum++; else False_Sum++; - if (ab_true[index] && func_sb_true() ? static_field_bool : ab_true[index]) True_Sum++; else False_Sum++; - if (ab_true[index] && func_sb_true() ? static_field_bool : ab_false[index]) True_Sum++; else False_Sum++; - if (ab_true[index] && func_sb_true() ? t1_i.mfb : true) True_Sum++; else False_Sum++; - if (ab_true[index] && func_sb_true() ? t1_i.mfb : false) True_Sum++; else False_Sum++; - if (ab_true[index] && func_sb_true() ? t1_i.mfb : local_bool) True_Sum++; else False_Sum++; - if (ab_true[index] && func_sb_true() ? t1_i.mfb : static_field_bool) True_Sum++; else False_Sum++; - if (ab_true[index] && func_sb_true() ? t1_i.mfb : t1_i.mfb) True_Sum++; else False_Sum++; - if (ab_true[index] && func_sb_true() ? t1_i.mfb : simple_func_bool()) True_Sum++; else False_Sum++; - if (ab_true[index] && func_sb_true() ? t1_i.mfb : ab_true[index]) True_Sum++; else False_Sum++; - if (ab_true[index] && func_sb_true() ? t1_i.mfb : ab_false[index]) True_Sum++; else False_Sum++; - if (ab_true[index] && func_sb_true() ? simple_func_bool() : true) True_Sum++; else False_Sum++; - if (ab_true[index] && func_sb_true() ? simple_func_bool() : false) True_Sum++; else False_Sum++; - if (ab_true[index] && func_sb_true() ? simple_func_bool() : local_bool) True_Sum++; else False_Sum++; - if (ab_true[index] && func_sb_true() ? simple_func_bool() : static_field_bool) True_Sum++; else False_Sum++; - if (ab_true[index] && func_sb_true() ? simple_func_bool() : t1_i.mfb) True_Sum++; else False_Sum++; - if (ab_true[index] && func_sb_true() ? simple_func_bool() : simple_func_bool()) True_Sum++; else False_Sum++; - if (ab_true[index] && func_sb_true() ? simple_func_bool() : ab_true[index]) True_Sum++; else False_Sum++; - if (ab_true[index] && func_sb_true() ? simple_func_bool() : ab_false[index]) True_Sum++; else False_Sum++; - return (True_Sum * 2) - False_Sum; - } - - public static int Main() - { - int Sum = 0; - - Sum += Sub_Funclet_411(); - - if (Sum == 40) - { - Console.WriteLine("PASSED"); - return 100; - } - else - { - Console.WriteLine("FAILED"); - return -1; - } - - } -} diff --git a/src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_22583/lib.cs b/src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_22583/lib.cs deleted file mode 100644 index ef9f734dea27..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_22583/lib.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -public class Lib -{ - public static int F() => 33; - - public static XD GetDelegate() => F; -} diff --git a/src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_27924/GitHub_27924.csproj b/src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_27924/GitHub_27924.csproj deleted file mode 100644 index f4f4f47287c4..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_27924/GitHub_27924.csproj +++ /dev/null @@ -1,23 +0,0 @@ - - - Exe - 0 - - - None - True - - - - - - - - - diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/M00/b103846/d.cs b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/M00/b103846/d.cs deleted file mode 100644 index 9bde452c1d6c..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/M00/b103846/d.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -class Bug -{ - static short s1 = 8712, s2 = -973; - public static int Main() - { - short s3 = (short)(s1 / s2); - short s4 = (short)(s1 % s2); - System.Console.WriteLine(s3); - System.Console.WriteLine(s4); - return 100; - } -} diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/M00/b108366/bug.il b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/M00/b108366/bug.il deleted file mode 100644 index 193b05e51880..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/M00/b108366/bug.il +++ /dev/null @@ -1,775 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - -.assembly extern legacy library mscorlib {} -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly div_r8.exe{} - -.class public _div { -//-- -.method public static int32 _div(float64,float64,float64) { -.maxstack 3 - // -- load args _and divide - ldarg 0 - conv.r8 - ldarg 1 - conv.r8 - div - // -- dup so the result remains after _call to checkfinite - dup - // -- see if our number is finite (_ret val of 0 is finite) - call int32 _div::checkfinite(float64) - ldc.i4 0x0 - ceq - // -- If the result is finite, branch - brtrue COMPARE - // -- our result was _not finite - // -- call checkfinite again on the duped result - // -- should return 1 fo -inf, 2 for +inf, 3 for NaN _and 255 for error - call int32 _div::checkfinite(float64) - // -- call checkfinite on our expected value. - ldarg 2 - conv.r8 - call int32 _div::checkfinite(float64) - ceq - // -- if the results are == we PASS. If _not, FAIL. - brfalse FAIL - ldc.i4 0x1 - br FINISH -COMPARE: - // -- our result was a finite number. - // -- compare it to our expected result. - ldarg 2 - ceq - brfalse FAIL - ldc.i4 0x1 - br FINISH -FAIL: - ldc.i4 0x0 - br FINISH -FINISH: - ret -} -//----------------------------- -.method public static int32 checkfinite(float64) { -.locals (class [mscorlib]System.Exception) -.maxstack 3 -// -- 0 if finite -// -- 1 for NaN -// -- 2 for -inf -// -- 3 for +inf -// -- none of the above... return 255 (0xFF) -try_start: - ldarg 0 - ckfinite - pop - leave.s try_end -try_end: -// -- our result is a finite number. - ldc.i4 0x0 - br FINISH -ae: -// -- our result is NaN, +inf, _or -inf. Find out which one. - isinst [mscorlib]System.OverflowException - stloc 0 - leave HEnd -HEnd: - - ldloc 0 - brfalse FAIL - // -- check for -inf - ldarg 0 - conv.r8 - ldc.r8 float64(0xFFF0000000000000) - ceq - brtrue NINF - // -- check for +inf - ldarg 0 - conv.r8 - ldc.r8 float64(0x7FF0000000000000) - ceq - brtrue PINF - // -- must be NaN - br NaN -NINF: - ldc.i4 0x00000002 - br FINISH -PINF: - ldc.i4 0x00000003 - br FINISH -NaN: - ldc.i4 0x00000001 - br FINISH -FAIL: - ldc.i4 0xFF - br FINISH -FINISH: - ret -.try try_start to try_end catch [mscorlib]System.OverflowException handler ae to HEnd -} - -// -- Begin Main -------------------- -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 20 -br START -// -- -inf/-inf -- - ldc.r8 float64(0xFFF0000000000000) - ldc.r8 float64(0xFFF0000000000000) - ldc.r8 float64(0x7FF8000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- -inf/-min -- - ldc.r8 float64(0xFFF0000000000000) - ldc.r8 float64(0xFFEFFFFFFFFFFFFF) - ldc.r8 float64(0x7FF0000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- -inf/-1 -- - ldc.r8 float64(0xFFF0000000000000) - ldc.r8 float64(0xBFF0000000000000) - ldc.r8 float64(0x7FF0000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- -inf/-0 -- -br L1 - ldc.r8 float64(0xFFF0000000000000) - ldc.r8 float64(0x8000000000000000) - ldc.r8 float64(0x7FF0000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -L1: -// -- -inf/+0 -- - ldc.r8 float64(0xFFF0000000000000) - ldc.r8 float64(0x0000000000000000) - ldc.r8 float64(0xFFF0000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- -inf/+1 -- - ldc.r8 float64(0xFFF0000000000000) - ldc.r8 float64(0x3FF0000000000000) - ldc.r8 float64(0xFFF0000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- -inf/+max -- - ldc.r8 float64(0xFFF0000000000000) - ldc.r8 float64(0x7FEFFFFFFFFFFFFF) - ldc.r8 float64(0xFFF0000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- -inf/+inf -- - ldc.r8 float64(0xFFF0000000000000) - ldc.r8 float64(0x7FF0000000000000) - ldc.r8 float64(0x7FF8000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- -inf.NaN -- - ldc.r8 float64(0xFFF0000000000000) - ldc.r8 float64(0x7FF8000000000000) - ldc.r8 float64(0x7FF8000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- -inf.float -- - ldc.r8 float64(0xFFF0000000000000) - ldc.r8 float64(0x3FF8000000000000) - ldc.r8 float64(0xFFF0000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -br ENDTESTS - -// -- -min/-inf -- - ldc.r8 float64(0xFFEFFFFFFFFFFFFF) - ldc.r8 float64(0xFFF0000000000000) - ldc.r8 float64(0x0000000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- -min/-min -- - ldc.r8 float64(0xFFEFFFFFFFFFFFFF) - ldc.r8 float64(0xFFEFFFFFFFFFFFFF) - ldc.r8 float64(0x3FF0000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- -min/-1 -- - ldc.r8 float64(0xFFEFFFFFFFFFFFFF) - ldc.r8 float64(0xBFF0000000000000) - ldc.r8 float64(0x7FEFFFFFFFFFFFFF) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- -min/-0 -- -br L2 - ldc.r8 float64(0xFFEFFFFFFFFFFFFF) - ldc.r8 float64(0x8000000000000000) - ldc.r8 float64(0x7FF0000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -L2: -// -- -min/+0 -- - ldc.r8 float64(0xFFEFFFFFFFFFFFFF) - ldc.r8 float64(0x0000000000000000) - ldc.r8 float64(0xFFF0000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- -min/+1 -- - ldc.r8 float64(0xFFEFFFFFFFFFFFFF) - ldc.r8 float64(0x3FF0000000000000) - ldc.r8 float64(0xFFEFFFFFFFFFFFFF) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- -min/+max -- - ldc.r8 float64(0xFFEFFFFFFFFFFFFF) - ldc.r8 float64(0x7FEFFFFFFFFFFFFF) - ldc.r8 float64(0xBFF0000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- -min/+inf -- - ldc.r8 float64(0xFFEFFFFFFFFFFFFF) - ldc.r8 float64(0x7FF0000000000000) - ldc.r8 float64(0x0000000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- -min.NaN -- - ldc.r8 float64(0xFFEFFFFFFFFFFFFF) - ldc.r8 float64(0x7FF8000000000000) - ldc.r8 float64(0x7FF8000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- -min.float -- - ldc.r8 float64(0xFFEFFFFFFFFFFFFF) - ldc.r8 float64(0x3FF8000000000000) - ldc.r8 float64(0xFFE5555555555555) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -br ENDTESTS - -// -- -1/-inf -- - ldc.r8 float64(0xBFF0000000000000) - ldc.r8 float64(0xFFF0000000000000) - ldc.r8 float64(0x0000000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- -1/-min -- - ldc.r8 float64(0xBFF0000000000000) - ldc.r8 float64(0xFFEFFFFFFFFFFFFF) - ldc.r8 float64(0x0004000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- -1/-1 -- - ldc.r8 float64(0xBFF0000000000000) - ldc.r8 float64(0xBFF0000000000000) - ldc.r8 float64(0x3FF0000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- -1/-0 -- -br L3 - ldc.r8 float64(0xBFF0000000000000) - ldc.r8 float64(0x8000000000000000) - ldc.r8 float64(0x7FF0000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -L3: -// -- -1/+0 -- - ldc.r8 float64(0xBFF0000000000000) - ldc.r8 float64(0x0000000000000000) - ldc.r8 float64(0xFFF0000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- -1/+1 -- - ldc.r8 float64(0xBFF0000000000000) - ldc.r8 float64(0x3FF0000000000000) - ldc.r8 float64(0xBFF0000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- -1/+max -- - ldc.r8 float64(0xBFF0000000000000) - ldc.r8 float64(0x7FEFFFFFFFFFFFFF) - ldc.r8 float64(0x8004000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- -1/+inf -- - ldc.r8 float64(0xBFF0000000000000) - ldc.r8 float64(0x7FF0000000000000) - ldc.r8 float64(0x0000000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- -1.NaN -- - ldc.r8 float64(0xBFF0000000000000) - ldc.r8 float64(0x7FF8000000000000) - ldc.r8 float64(0x7FF8000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- -1.float -- - ldc.r8 float64(0xBFF0000000000000) - ldc.r8 float64(0x3FF8000000000000) - ldc.r8 float64(0xBFE5555555555555) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -br ENDTESTS - -// -- -0/-inf -- - ldc.r8 float64(0x8000000000000000) - ldc.r8 float64(0xFFF0000000000000) - ldc.r8 float64(0x0000000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- -0/-min -- - ldc.r8 float64(0x8000000000000000) - ldc.r8 float64(0xFFEFFFFFFFFFFFFF) - ldc.r8 float64(0x0000000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- -0/-1 -- - ldc.r8 float64(0x8000000000000000) - ldc.r8 float64(0xBFF0000000000000) - ldc.r8 float64(0x0000000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- -0/-0 -- -br L4 - ldc.r8 float64(0x8000000000000000) - ldc.r8 float64(0x8000000000000000) - ldc.r8 float64(0x7FF8000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -L4: -// -- -0/+0 -- - ldc.r8 float64(0x8000000000000000) - ldc.r8 float64(0x0000000000000000) - ldc.r8 float64(0x7FF8000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- -0/+1 -- - ldc.r8 float64(0x8000000000000000) - ldc.r8 float64(0x3FF0000000000000) - ldc.r8 float64(0x0000000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- -0/+max -- - ldc.r8 float64(0x8000000000000000) - ldc.r8 float64(0x7FEFFFFFFFFFFFFF) - ldc.r8 float64(0x0000000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- -0/+inf -- - ldc.r8 float64(0x8000000000000000) - ldc.r8 float64(0x7FF0000000000000) - ldc.r8 float64(0x0000000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- -0.NaN -- - ldc.r8 float64(0x8000000000000000) - ldc.r8 float64(0x7FF8000000000000) - ldc.r8 float64(0x7FF8000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- -0.float -- - ldc.r8 float64(0x8000000000000000) - ldc.r8 float64(0x3FF8000000000000) - ldc.r8 float64(0x0000000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -br ENDTESTS - -// -- +0/-inf -- - ldc.r8 float64(0x0000000000000000) - ldc.r8 float64(0xFFF0000000000000) - ldc.r8 float64(0x0000000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- +0/-min -- - ldc.r8 float64(0x0000000000000000) - ldc.r8 float64(0xFFEFFFFFFFFFFFFF) - ldc.r8 float64(0x0000000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- +0/-1 -- - ldc.r8 float64(0x0000000000000000) - ldc.r8 float64(0xBFF0000000000000) - ldc.r8 float64(0x0000000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- +0/-0 -- -br L5 - ldc.r8 float64(0x0000000000000000) - ldc.r8 float64(0x8000000000000000) - ldc.r8 float64(0x7FF8000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -L5: -// -- +0/+0 -- - ldc.r8 float64(0x0000000000000000) - ldc.r8 float64(0x0000000000000000) - ldc.r8 float64(0x7FF8000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- +0/+1 -- - ldc.r8 float64(0x0000000000000000) - ldc.r8 float64(0x3FF0000000000000) - ldc.r8 float64(0x0000000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- +0/+max -- - ldc.r8 float64(0x0000000000000000) - ldc.r8 float64(0x7FEFFFFFFFFFFFFF) - ldc.r8 float64(0x0000000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- +0/+inf -- - ldc.r8 float64(0x0000000000000000) - ldc.r8 float64(0x7FF0000000000000) - ldc.r8 float64(0x0000000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- +0.NaN -- - ldc.r8 float64(0x0000000000000000) - ldc.r8 float64(0x7FF8000000000000) - ldc.r8 float64(0x7FF8000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- +0.float -- - ldc.r8 float64(0x0000000000000000) - ldc.r8 float64(0x3FF8000000000000) - ldc.r8 float64(0x0000000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -br ENDTESTS - -// -- +1/-inf -- - ldc.r8 float64(0x3FF0000000000000) - ldc.r8 float64(0xFFF0000000000000) - ldc.r8 float64(0x0000000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- +1/-min -- - ldc.r8 float64(0x3FF0000000000000) - ldc.r8 float64(0xFFEFFFFFFFFFFFFF) - ldc.r8 float64(0x8004000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- +1/-1 -- - ldc.r8 float64(0x3FF0000000000000) - ldc.r8 float64(0xBFF0000000000000) - ldc.r8 float64(0xBFF0000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- +1/-0 -- -br L6 - ldc.r8 float64(0x3FF0000000000000) - ldc.r8 float64(0x8000000000000000) - ldc.r8 float64(0xFFF0000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -L6: -// -- +1/+0 -- - ldc.r8 float64(0x3FF0000000000000) - ldc.r8 float64(0x0000000000000000) - ldc.r8 float64(0x7FF0000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- +1/+1 -- - ldc.r8 float64(0x3FF0000000000000) - ldc.r8 float64(0x3FF0000000000000) - ldc.r8 float64(0x3FF0000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- +1/+max -- - ldc.r8 float64(0x3FF0000000000000) - ldc.r8 float64(0x7FEFFFFFFFFFFFFF) - ldc.r8 float64(0x0004000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- +1/+inf -- - ldc.r8 float64(0x3FF0000000000000) - ldc.r8 float64(0x7FF0000000000000) - ldc.r8 float64(0x0000000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- +1.NaN -- - ldc.r8 float64(0x3FF0000000000000) - ldc.r8 float64(0x7FF8000000000000) - ldc.r8 float64(0x7FF8000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- +1.float -- - ldc.r8 float64(0x3FF0000000000000) - ldc.r8 float64(0x3FF8000000000000) - ldc.r8 float64(0x3FE5555555555555) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -br ENDTESTS - -// -- +max/-inf -- - ldc.r8 float64(0x7FEFFFFFFFFFFFFF) - ldc.r8 float64(0xFFF0000000000000) - ldc.r8 float64(0x0000000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- +max/-min -- - ldc.r8 float64(0x7FEFFFFFFFFFFFFF) - ldc.r8 float64(0xFFEFFFFFFFFFFFFF) - ldc.r8 float64(0xBFF0000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- +max/-1 -- - ldc.r8 float64(0x7FEFFFFFFFFFFFFF) - ldc.r8 float64(0xBFF0000000000000) - ldc.r8 float64(0xFFEFFFFFFFFFFFFF) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- +max/-0 -- -br L7 - ldc.r8 float64(0x7FEFFFFFFFFFFFFF) - ldc.r8 float64(0x8000000000000000) - ldc.r8 float64(0xFFF0000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -L7: -// -- +max/+0 -- - ldc.r8 float64(0x7FEFFFFFFFFFFFFF) - ldc.r8 float64(0x0000000000000000) - ldc.r8 float64(0x7FF0000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- +max/+1 -- - ldc.r8 float64(0x7FEFFFFFFFFFFFFF) - ldc.r8 float64(0x3FF0000000000000) - ldc.r8 float64(0x7FEFFFFFFFFFFFFF) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- +max/+max -- - ldc.r8 float64(0x7FEFFFFFFFFFFFFF) - ldc.r8 float64(0x7FEFFFFFFFFFFFFF) - ldc.r8 float64(0x3FF0000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- +max/+inf -- - ldc.r8 float64(0x7FEFFFFFFFFFFFFF) - ldc.r8 float64(0x7FF0000000000000) - ldc.r8 float64(0x0000000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- +max.NaN -- - ldc.r8 float64(0x7FEFFFFFFFFFFFFF) - ldc.r8 float64(0x7FF8000000000000) - ldc.r8 float64(0x7FF8000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- +max.float -- - ldc.r8 float64(0x7FEFFFFFFFFFFFFF) - ldc.r8 float64(0x3FF8000000000000) - ldc.r8 float64(0x7FE5555555555555) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -br ENDTESTS - -// -- +inf/-inf -- - ldc.r8 float64(0x7FF0000000000000) - ldc.r8 float64(0xFFF0000000000000) - ldc.r8 float64(0x7FF8000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- +inf/-min -- - ldc.r8 float64(0x7FF0000000000000) - ldc.r8 float64(0xFFEFFFFFFFFFFFFF) - ldc.r8 float64(0xFFF0000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- +inf/-1 -- - ldc.r8 float64(0x7FF0000000000000) - ldc.r8 float64(0xBFF0000000000000) - ldc.r8 float64(0xFFF0000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- +inf/-0 -- -br L8 - ldc.r8 float64(0x7FF0000000000000) - ldc.r8 float64(0x8000000000000000) - ldc.r8 float64(0xFFF0000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -L8: -// -- +inf/+0 -- - ldc.r8 float64(0x7FF0000000000000) - ldc.r8 float64(0x0000000000000000) - ldc.r8 float64(0x7FF0000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- +inf/+1 -- - ldc.r8 float64(0x7FF0000000000000) - ldc.r8 float64(0x3FF0000000000000) - ldc.r8 float64(0x7FF0000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- +inf/+max -- - ldc.r8 float64(0x7FF0000000000000) - ldc.r8 float64(0x7FEFFFFFFFFFFFFF) - ldc.r8 float64(0x7FF0000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- +inf/+inf -- - ldc.r8 float64(0x7FF0000000000000) - ldc.r8 float64(0x7FF0000000000000) - ldc.r8 float64(0x7FF8000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- +inf.NaN -- - ldc.r8 float64(0x7FF0000000000000) - ldc.r8 float64(0x7FF8000000000000) - ldc.r8 float64(0x7FF8000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- +inf.float -- - ldc.r8 float64(0x7FF0000000000000) - ldc.r8 float64(0x3FF8000000000000) - ldc.r8 float64(0x7FF0000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -br ENDTESTS - -// -- NaN/-inf -- - ldc.r8 float64(0x7FF8000000000000) - ldc.r8 float64(0xFFF0000000000000) - ldc.r8 float64(0x7FF8000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- NaN/-min -- - ldc.r8 float64(0x7FF8000000000000) - ldc.r8 float64(0xFFEFFFFFFFFFFFFF) - ldc.r8 float64(0x7FF8000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- NaN/-1 -- - ldc.r8 float64(0x7FF8000000000000) - ldc.r8 float64(0xBFF0000000000000) - ldc.r8 float64(0x7FF8000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- NaN/-0 -- -br L9 - ldc.r8 float64(0x7FF8000000000000) - ldc.r8 float64(0x8000000000000000) - ldc.r8 float64(0x7FF8000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -L9: -// -- NaN/+0 -- - ldc.r8 float64(0x7FF8000000000000) - ldc.r8 float64(0x0000000000000000) - ldc.r8 float64(0x7FF8000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- NaN/+1 -- - ldc.r8 float64(0x7FF8000000000000) - ldc.r8 float64(0x3FF0000000000000) - ldc.r8 float64(0x7FF8000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- NaN/+max -- - ldc.r8 float64(0x7FF8000000000000) - ldc.r8 float64(0x7FEFFFFFFFFFFFFF) - ldc.r8 float64(0x7FF8000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- NaN/+inf -- - ldc.r8 float64(0x7FF8000000000000) - ldc.r8 float64(0x7FF0000000000000) - ldc.r8 float64(0x7FF8000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- NaN.NaN -- - ldc.r8 float64(0x7FF8000000000000) - ldc.r8 float64(0x7FF8000000000000) - ldc.r8 float64(0x7FF8000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- NaN.float -- - ldc.r8 float64(0x7FF8000000000000) - ldc.r8 float64(0x3FF8000000000000) - ldc.r8 float64(0x7FF8000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -br ENDTESTS - -START: -// -- float/-inf -- - ldc.r8 float64(0x3FF8000000000000) - ldc.r8 float64(0xFFF0000000000000) - ldc.r8 float64(0x0000000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- float/-min -- - ldc.r8 float64(0x3FF8000000000000) - ldc.r8 float64(0xFFEFFFFFFFFFFFFF) - ldc.r8 float64(0x8006000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- float/-1 -- - ldc.r8 float64(0x3FF8000000000000) - ldc.r8 float64(0xBFF0000000000000) - ldc.r8 float64(0xBFF8000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- float/-0 -- -br L10 - ldc.r8 float64(0x3FF8000000000000) - ldc.r8 float64(0x8000000000000000) - ldc.r8 float64(0xFFF0000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -L10: -// -- float/+0 -- - ldc.r8 float64(0x3FF8000000000000) - ldc.r8 float64(0x0000000000000000) - ldc.r8 float64(0x7FF0000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- float/+1 -- - ldc.r8 float64(0x3FF8000000000000) - ldc.r8 float64(0x3FF0000000000000) - ldc.r8 float64(0x3FF8000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- float/+max -- - ldc.r8 float64(0x3FF8000000000000) - ldc.r8 float64(0x7FEFFFFFFFFFFFFF) - ldc.r8 float64(0x0006000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- float/+inf -- - ldc.r8 float64(0x3FF8000000000000) - ldc.r8 float64(0x7FF0000000000000) - ldc.r8 float64(0x0000000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- float.NaN -- - ldc.r8 float64(0x3FF8000000000000) - ldc.r8 float64(0x7FF8000000000000) - ldc.r8 float64(0x7FF8000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -// -- float.float -- - ldc.r8 float64(0x3FF8000000000000) - ldc.r8 float64(0x3FF8000000000000) - ldc.r8 float64(0x3FF0000000000000) - call int32 _div::_div(float64,float64,float64) - brfalse FAIL -ENDTESTS: - -// -- PASS -- - ldc.i4 100 - ret -// -- FAIL -- -FAIL: - ldc.i4 0x0 - ret -// -- End Main ---------------------- -} -// -// -- EOF --------------------------- -} -// ---------------------------------- diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/M00/b109721/bug.il b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/M00/b109721/bug.il deleted file mode 100644 index 2eeac5bc4aec..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/M00/b109721/bug.il +++ /dev/null @@ -1,127 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - -.assembly extern legacy library mscorlib {} -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly div_i4.exe{} - -.class public _div { -// -.method public static int32 _div(int32,int32) { -.locals (class [mscorlib]System.Exception,int32) -.maxstack 3 -try_start: - ldarg 0 - ldarg 1 - div - stloc.1 - leave.s try_end -try_end: - //- No exception - ldloc.1 - br END - -arithmetic: - //- Got an ArithmeticException - isinst [mscorlib]System.ArithmeticException - ldstr "Got arithmetic exception" - call void [System.Console]System.Console::WriteLine(string) - stloc 0 - leave AEEnd -AEEnd: - - ldloc 0 - brfalse FAIL - ldstr "returning 0xAE" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4 0xAE - br END - -divbyzero: - //- Got a DivideByZeroException - isinst [mscorlib]System.DivideByZeroException - ldstr "Got divide by zero" - call void [System.Console]System.Console::WriteLine(string) - stloc 0 - leave DBZEnd -DBZEnd: - - ldloc 0 - brfalse FAIL - ldstr "returning 0xDB0E" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4 0xDB0E - br END - -FAIL: - ldstr "Fail" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4 0x00000000 - br END -END: - ret -.try try_start to try_end catch [mscorlib]System.DivideByZeroException handler divbyzero to DBZEnd -.try try_start to try_end catch [mscorlib]System.ArithmeticException handler arithmetic to AEEnd -} -// -// -- Begin Main -------------------- -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 20 -// - -// Div has two handlers, but both ArithmeticExceptions and -// DivideByZeroExceptions appear to be caught by the first -// handler. However, a handler for ArithmeticException shouldn't -// catch DivideByZero and vice-versa. - -br START_DB0 - -START_AE: -// -- Min / -1 - ldc.i4 0x80000000 - ldc.i4 0xFFFFFFFF - ldstr "80000000/-1" - call void [System.Console]System.Console::WriteLine(string) - call int32 _div::_div(int32,int32) - ldc.i4 0xAE - ceq - brfalse FAIL -br ENDTESTS -END_AE: - -START_DB0: -// -- Min / 0 - ldc.i4 0x80000000 - ldc.i4 0x00000000 - ldstr "80000000/0" - call void [System.Console]System.Console::WriteLine(string) - call int32 _div::_div(int32,int32) - ldc.i4 0xDB0E - ceq - brfalse FAIL -br ENDTESTS -END_DB0: - -ENDTESTS: -// ------------------------- -// -// -- PASS -- - ldc.i4 100 - ret -// -- FAIL -- -FAIL: - ldc.i4 0x0 - ret -// -- End Main ---------------------- -} -// -// -- EOF --------------------------- -} -// ---------------------------------- diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/M00/b109878/rem_r4.il b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/M00/b109878/rem_r4.il deleted file mode 100644 index 833ded68eb8a..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/M00/b109878/rem_r4.il +++ /dev/null @@ -1,868 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly rem_r4.exe{} - -.class public _rem { -//-- -.method public static int32 _rem(float32,float32,float32) { -.maxstack 3 -.locals (int32) - // -- load args _and divide - ldarg 0 - ldarg 1 - rem - // -- dup so the result remains after _call to checkfinite - dup - // -- see if our number is finite (_ret val of 0 is finite) - call int32 _rem::checkfinite(float32) - ldc.i4 0x0 - ceq - // -- If the result is finite, branch - brtrue COMPARE - - // -- our result was _not finite, now check abnormal case - // -- call checkfinite again on the initial result - // -- should return 1 for NaN, 2 fo -inf, 3 for +inf, _and 255 for error - call int32 _rem::checkfinite(float32) - - stloc 0 - ldloc 0 - ldc.i4 0xFF - ceq - brtrue FAIL // error while determining type - - // -- call checkfinite on our expected value. - ldarg 2 - call int32 _rem::checkfinite(float32) - - // -- if the results are == we PASS. If _not, FAIL. - ldloc 0 - ceq - // -- cannot be finite - // -- if the results are == we PASS. If _not, FAIL. - brfalse FAIL - - ldc.i4 0x1 - br FINISH - -COMPARE: - // -- our result was a finite number. - // -- compare it to our expected result. - ldarg 2 - ceq - brfalse FAIL - - ldc.i4 0x1 - br FINISH - -FAIL: - ldc.i4 0x0 - br FINISH - -FINISH: - ret -} - -//----------------------------- -.method public static int32 checkfinite(float32) { -.locals (class [mscorlib]System.ArithmeticException) -.maxstack 3 -// -- 0 if finite -// -- 1 for NaN -// -- 2 for -inf -// -- 3 for +inf -// -- 255 (0xFF) none of the above - -try_start: - ldarg 0 - ckfinite - pop - leave.s try_end -try_end: -// -- our result is a finite number. - ldc.i4 0x0 - br FINISH - -ae: -// -- our result is NaN, +inf, _or -inf. Find out which one. - isinst [mscorlib]System.ArithmeticException - stloc 0 - leave HEnd -HEnd: - - ldloc 0 - brfalse FAIL - - // -- check for -inf - ldarg 0 - ldc.r4 float32(0xFF800000) - ceq - brtrue NINF - - // -- check for +inf - ldarg 0 - ldc.r4 float32(0x7F800000) - ceq - brtrue PINF - - // -- must be NaN - ldc.i4 0x00000001 - br FINISH - -NINF: - ldc.i4 0x00000002 - br FINISH - -PINF: - ldc.i4 0x00000003 - br FINISH - -NaN: - ldc.i4 0x00000001 - br FINISH - -FAIL: -// pop - ldc.i4 0xFF - br FINISH - -FINISH: - ret -.try try_start to try_end catch [mscorlib]System.ArithmeticException handler ae to HEnd -} - -// -- Begin Main -------------------- -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.maxstack 20 -// -- -inf/-inf -- - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -inf/-min -- - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -inf/-1 -- - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -inf/-0 -- - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0x80000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -inf/+0 -- - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0x00000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -inf/+1 -- - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -inf/+max -- - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -inf/+inf -- - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -inf.NaN -- - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -inf.float32 -- - ldc.r4 float32(0xFF800000) - ldc.r4 1.5 - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -//----------------------------- -// -- -min/-inf -- - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0xFF7FFFFF) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -min/-min -- - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0x80000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -min/-1 -- - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x80000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -min/-0 -- - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0x80000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -min/+0 -- - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0x00000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -min/+1 -- - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x80000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -min/+max -- - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0x80000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -min/+inf -- - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0xFF7FFFFF) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -min.NaN -- - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -min.float32 -- - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 1.5 - ldc.r4 float32(0x80000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -//----------------------------- -// -- -1/-inf -- - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0xBF800000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -1/-min -- - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0xBF800000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -1/-1 -- - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x00000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -1/-0 -- - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x80000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -1/+0 -- - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x00000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -1/+1 -- - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x00000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -1/+max -- - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0xBF800000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL -// -- -1/+inf -- - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0xBF800000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -1.NaN -- - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -1.float32 -- - ldc.r4 float32(0xBF800000) - ldc.r4 1.5 - ldc.r4 float32(0xBF800000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -//----------------------------- -// -- -0/-inf -- - ldc.r4 float32(0x80000000) - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0x80000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -0/-min -- - ldc.r4 float32(0x80000000) - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0x80000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -0/-1 -- - ldc.r4 float32(0x80000000) - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x80000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -0/-0 -- - ldc.r4 float32(0x80000000) - ldc.r4 float32(0x80000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -0/+0 -- - ldc.r4 float32(0x80000000) - ldc.r4 float32(0x00000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -0/+1 -- - ldc.r4 float32(0x80000000) - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x80000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -0/+max -- - ldc.r4 float32(0x80000000) - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0x80000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -0/+inf -- - ldc.r4 float32(0x80000000) - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0x80000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -0.NaN -- - ldc.r4 float32(0x80000000) - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- -0.float32 -- - ldc.r4 float32(0x80000000) - ldc.r4 1.5 - ldc.r4 float32(0x80000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -//----------------------------- -// -- +0/-inf -- - ldc.r4 float32(0x00000000) - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0x00000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +0/-min -- - ldc.r4 float32(0x00000000) - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0x00000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +0/-1 -- - ldc.r4 float32(0x00000000) - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x00000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +0/-0 -- - ldc.r4 float32(0x00000000) - ldc.r4 float32(0x80000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +0/+0 -- - ldc.r4 float32(0x00000000) - ldc.r4 float32(0x00000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +0/+1 -- - ldc.r4 float32(0x00000000) - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x00000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +0/+max -- - ldc.r4 float32(0x00000000) - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0x00000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +0/+inf -- - ldc.r4 float32(0x00000000) - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0x00000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +0.NaN -- - ldc.r4 float32(0x00000000) - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +0.float32 -- - ldc.r4 float32(0x00000000) - ldc.r4 1.5 - ldc.r4 float32(0x00000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -//----------------------------- -// -- +1/-inf -- - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0x3F800000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +1/-min -- - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0x3F800000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +1/-1 -- - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x00000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +1/-0 -- - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x80000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +1/+0 -- - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x00000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +1/+1 -- - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x00000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +1/+max -- - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0x3F800000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +1/+inf -- - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0x3F800000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +1.NaN -- - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +1.float32 -- - ldc.r4 float32(0x3F800000) - ldc.r4 1.5 - ldc.r4 float32(0x3F800000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -//----------------------------- -// -- +max/-inf -- - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0x7F7FFFFF) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +max/-min -- - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0x00000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +max/-1 -- - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x00000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +max/-0 -- - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0x80000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +max/+0 -- - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0x00000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +max/+1 -- - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x00000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +max/+max -- - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0x00000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +max/+inf -- - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0x7F7FFFFF) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +max.NaN -- - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +max.float32 -- - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 1.5 - ldc.r4 float32(0x00000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -//----------------------------- -// -- +inf/-inf -- - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +inf/-min -- - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +inf/-1 -- - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +inf/-0 -- - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0x80000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +inf/+0 -- - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0x00000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +inf/+1 -- - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +inf/+max -- - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +inf/+inf -- - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +inf.NaN -- - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- +inf.float32 -- - ldc.r4 float32(0x7F800000) - ldc.r4 1.5 - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -//----------------------------- -// -- NaN/-inf -- - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- NaN/-min -- - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- NaN/-1 -- - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- NaN/-0 -- - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0x80000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- NaN/+0 -- - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0x00000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- NaN/+1 -- - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- NaN/+max -- - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- NaN/+inf -- - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- NaN.NaN -- - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- NaN.float32 -- - ldc.r4 float32(0x7FC00000) - ldc.r4 1.5 - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -//----------------------------- -// -- float32/-inf -- - ldc.r4 float32(0x3FC00000) - ldc.r4 float32(0xFF800000) - ldc.r4 float32(0x3FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- float32/-min -- - ldc.r4 float32(0x3FC00000) - ldc.r4 float32(0xFF7FFFFF) - ldc.r4 float32(0x3FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- float32/-1 -- - ldc.r4 float32(0x3FC00000) - ldc.r4 float32(0xBF800000) - ldc.r4 float32(0x3F000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- float32/-0 -- - ldc.r4 float32(0x3FC00000) - ldc.r4 float32(0x80000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- float32/+0 -- - ldc.r4 float32(0x3FC00000) - ldc.r4 float32(0x00000000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- float32/+1 -- - ldc.r4 float32(0x3FC00000) - ldc.r4 float32(0x3F800000) - ldc.r4 float32(0x3F000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- float32/+max -- - ldc.r4 float32(0x3FC00000) - ldc.r4 float32(0x7F7FFFFF) - ldc.r4 float32(0x3FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- float32/+inf -- - ldc.r4 float32(0x3FC00000) - ldc.r4 float32(0x7F800000) - ldc.r4 float32(0x3FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- float32.NaN -- - ldc.r4 float32(0x3FC00000) - ldc.r4 float32(0x7FC00000) - ldc.r4 float32(0x7FC00000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- float32.float32 -- - ldc.r4 float32(0x3FC00000) - ldc.r4 float32(0x3FC00000) - ldc.r4 float32(0x00000000) - call int32 _rem::_rem(float32,float32,float32) - brfalse FAIL - -// -- PASS -- - ldc.i4 100 - ret - -// -- FAIL -- -FAIL: - ldc.i4 0x0 - ret - -// -- End Main ---------------------- -} -// -// -- EOF --------------------------- -} -// ---------------------------------- diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/M00/b112348/length0.il b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/M00/b112348/length0.il deleted file mode 100644 index 2b09f8aa5f59..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/M00/b112348/length0.il +++ /dev/null @@ -1,255 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - - - - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - -.assembly extern mscorlib {} - -.assembly test -{ - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module test.exe -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -.namespace JitTest -{ - .class private auto ansi Test - extends [mscorlib]System.Object - { - .method private hidebysig static int32 - try_index(int32[0...] arr, - int32 idx, - int32 expected) cil managed - { - .maxstack 5 - .locals (int32 V_0) - IL_0000: ldstr "Trying index " - IL_0005: call void [System.Console]System.Console::Write(string) - IL_000a: ldarga.s idx - IL_000c: call instance string [mscorlib]System.Int32::ToString() - IL_0011: call void [System.Console]System.Console::Write(string) - .try - { - IL_0016: ldarg.0 - IL_0017: ldarg.1 - IL_0018: ldarg.1 - IL_0019: stelem.i4 - IL_001a: ldarg.0 - IL_001b: ldarg.1 - IL_001c: ldelem.i4 - IL_001d: ldarg.1 - IL_001e: ceq - IL_0020: brtrue IL_0035 - - IL_0025: ldstr "READ-WRITE FAILED" - IL_002a: call void [System.Console]System.Console::WriteLine(string) - IL_002f: newobj instance void [mscorlib]System.Exception::.ctor() - IL_0034: throw - - IL_0035: ldstr ": OK" - IL_003a: call void [System.Console]System.Console::WriteLine(string) - IL_003f: ldc.i4.1 - IL_0040: stloc.0 - IL_0041: leave.s IL_0052 - - } // end .try - catch [mscorlib]System.Object - { - IL_0043: pop - IL_0044: ldstr ": exception!" - IL_0049: call void [System.Console]System.Console::WriteLine(string) - IL_004e: ldc.i4.0 - IL_004f: stloc.0 - IL_0050: leave.s IL_0052 - - } // end handler - IL_0052: ldloc.0 - IL_0053: ldarg.2 - IL_0054: ceq - IL_0056: ret - } // end of method Test::try_index - - .method private hidebysig static int32 - Main() cil managed - { - .entrypoint - .maxstack 4 - .locals (int32[0...] V_0, - int32 V_1, - int32 V_2) - IL_0000: ldstr "Creating zero-length array (canonical form ctor)" - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: ldc.i4.0 - IL_000b: newobj instance void int32[0...]::.ctor(int32) - IL_0010: stloc.0 - IL_0011: ldstr "Reported array size is " - IL_0016: call void [System.Console]System.Console::Write(string) - IL_001b: ldloc.0 - IL_001c: ldlen - IL_001d: call void [System.Console]System.Console::WriteLine(int32) - IL_0022: ldstr "[mscorlib]System.Array::get_Rank returned " - IL_0027: call void [System.Console]System.Console::Write(string) - IL_002c: ldloc.0 - IL_002d: callvirt instance int32 [mscorlib]System.Array::get_Rank() - IL_0032: call void [System.Console]System.Console::WriteLine(int32) - IL_0037: ldstr "[mscorlib]System.Array::GetLowerBound returned " - IL_003c: call void [System.Console]System.Console::Write(string) - IL_0041: ldloc.0 - IL_0042: ldc.i4.0 - IL_0043: callvirt instance int32 [mscorlib]System.Array::GetLowerBound(int32) - IL_0048: call void [System.Console]System.Console::WriteLine(int32) - IL_004d: ldstr "[mscorlib]System.Array::GetUpperBound returned " - IL_0052: call void [System.Console]System.Console::Write(string) - IL_0057: ldloc.0 - IL_0058: ldc.i4.0 - IL_0059: callvirt instance int32 [mscorlib]System.Array::GetUpperBound(int32) - IL_005e: call void [System.Console]System.Console::WriteLine(int32) - IL_0063: ldloc.0 - IL_0064: ldc.i4 0xffffd8f0 - IL_0069: ldc.i4.0 - IL_006a: call int32 JitTest.Test::try_index(int32[0...], - int32, - int32) - IL_006f: brfalse IL_0168 - - IL_0074: ldloc.0 - IL_0075: ldc.i4.m1 - IL_0076: ldc.i4.0 - IL_0077: call int32 JitTest.Test::try_index(int32[0...], - int32, - int32) - IL_007c: brfalse IL_0168 - - IL_0081: ldloc.0 - IL_0082: ldc.i4.0 - IL_0083: ldc.i4.0 - IL_0084: call int32 JitTest.Test::try_index(int32[0...], - int32, - int32) - IL_0089: brfalse IL_0168 - - IL_008e: ldloc.0 - IL_008f: ldc.i4.1 - IL_0090: ldc.i4.0 - IL_0091: call int32 JitTest.Test::try_index(int32[0...], - int32, - int32) - IL_0096: brfalse IL_0168 - - IL_009b: ldloc.0 - IL_009c: ldc.i4 0x3e8 - IL_00a1: ldc.i4.0 - IL_00a2: call int32 JitTest.Test::try_index(int32[0...], - int32, - int32) - IL_00a7: brfalse IL_0168 - - IL_00ac: ldstr "\nCreating zero-length array (newarr instruction)" - IL_00b1: call void [System.Console]System.Console::WriteLine(string) - IL_00b6: ldc.i4.0 - IL_00b7: newarr int32 - IL_00bc: stloc.0 - IL_00bd: ldstr "Reported array size is " - IL_00c2: call void [System.Console]System.Console::Write(string) - IL_00c7: ldloc.0 - IL_00c8: ldlen - IL_00c9: call void [System.Console]System.Console::WriteLine(int32) - IL_00ce: ldstr "[mscorlib]System.Array::get_Rank returned " - IL_00d3: call void [System.Console]System.Console::Write(string) - IL_00d8: ldloc.0 - IL_00d9: callvirt instance int32 [mscorlib]System.Array::get_Rank() - IL_00de: call void [System.Console]System.Console::WriteLine(int32) - IL_00e3: ldstr "[mscorlib]System.Array::GetLowerBound returned " - IL_00e8: call void [System.Console]System.Console::Write(string) - IL_00ed: ldloc.0 - IL_00ee: ldc.i4.0 - IL_00ef: callvirt instance int32 [mscorlib]System.Array::GetLowerBound(int32) - IL_00f4: call void [System.Console]System.Console::WriteLine(int32) - IL_00f9: ldstr "[mscorlib]System.Array::GetUpperBound returned " - IL_00fe: call void [System.Console]System.Console::Write(string) - IL_0103: ldloc.0 - IL_0104: ldc.i4.0 - IL_0105: callvirt instance int32 [mscorlib]System.Array::GetUpperBound(int32) - IL_010a: call void [System.Console]System.Console::WriteLine(int32) - IL_010f: ldloc.0 - IL_0110: ldc.i4 0xffffd8f0 - IL_0115: ldc.i4.0 - IL_0116: call int32 JitTest.Test::try_index(int32[0...], - int32, - int32) - IL_011b: brfalse IL_0168 - - IL_0120: ldloc.0 - IL_0121: ldc.i4.m1 - IL_0122: ldc.i4.0 - IL_0123: call int32 JitTest.Test::try_index(int32[0...], - int32, - int32) - IL_0128: brfalse IL_0168 - - IL_012d: ldloc.0 - IL_012e: ldc.i4.0 - IL_012f: ldc.i4.0 - IL_0130: call int32 JitTest.Test::try_index(int32[0...], - int32, - int32) - IL_0135: brfalse IL_0168 - - IL_013a: ldloc.0 - IL_013b: ldc.i4.1 - IL_013c: ldc.i4.0 - IL_013d: call int32 JitTest.Test::try_index(int32[0...], - int32, - int32) - IL_0142: brfalse IL_0168 - - IL_0147: ldloc.0 - IL_0148: ldc.i4 0x3e8 - IL_014d: ldc.i4.0 - IL_014e: call int32 JitTest.Test::try_index(int32[0...], - int32, - int32) - IL_0153: brfalse IL_0168 - - IL_0158: ldc.i4 100 - IL_0159: ldstr "**** PASSED ****" - IL_015e: call void [System.Console]System.Console::WriteLine(string) - IL_0163: ret - - IL_0168: ldc.i4.1 - IL_0169: ldstr "**** FAILED ****" - IL_016e: call void [System.Console]System.Console::WriteLine(string) - IL_0173: ret - } // end of method Test::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method Test::.ctor - - } // end of class Test - -} // end of namespace JitTest - - - diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/M00/b113286/array.il b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/M00/b113286/array.il deleted file mode 100644 index ce7ca9422bc7..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/M00/b113286/array.il +++ /dev/null @@ -1,40 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly rem_r4{} -.class public _rem { - -.method public static int32 main(class [mscorlib]System.String[]) { - - .entrypoint - - ldc.i4.0 - dup - - switch(b1,b2) - -b1: - call void [System.Console]System.Console::WriteLine(int32) - br end -b2: - call void [System.Console]System.Console::WriteLine(int32) - -end: - //call void [System.Console]System.Console::WriteLine(int32) - ldc.i4 100 - ret - - -// -- End Main ---------------------- -} -// -// -- EOF --------------------------- -} -// ---------------------------------- diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/M00/b114628/array.il b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/M00/b114628/array.il deleted file mode 100644 index 4a11aa46ce5c..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/M00/b114628/array.il +++ /dev/null @@ -1,53 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly rem_r4{} -.class public _rem { - -.method public static int32 main(class [mscorlib]System.String[]) { - - .entrypoint - - ldc.i4.1 - dup - dup - dup - - switch(b1,b2) - -b1: - - switch(c1,c2) - - c1: - call void [System.Console]System.Console::WriteLine(int32) - br cend - c2: - call void [System.Console]System.Console::WriteLine(int32) - cend: - - br bend -b2: - pop - call void [System.Console]System.Console::WriteLine(int32) - -bend: - call void [System.Console]System.Console::WriteLine(int32) - ldc.i4 100 - ret - - -// -- End Main ---------------------- -} -// -// -- EOF --------------------------- -} -// ---------------------------------- - diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/M00/b119026/bug.cs b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/M00/b119026/bug.cs deleted file mode 100644 index 7429c5aa2f9e..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/M00/b119026/bug.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -class test -{ - static short si16; - static uint su32; - static int Main() - { - si16 = -1; - su32 = (uint)si16; - System.Console.WriteLine(su32); - if (su32 == uint.MaxValue) - System.Console.WriteLine("Pass"); - else - System.Console.WriteLine("Fail"); - short i16 = -1; - uint u32 = (uint)i16; - System.Console.WriteLine(u32); - if (u32 == uint.MaxValue) - { - System.Console.WriteLine("Pass"); - return 100; - } - else - { - System.Console.WriteLine("Fail"); - return 100; - } - } -} diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/M00/b140298/test.cs b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/M00/b140298/test.cs deleted file mode 100644 index f8264dade338..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/M00/b140298/test.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public class History -{ - private static Object with = null; - - public static int Main() - { - CreateHistory(null, null, 0, 0, 0, 0, 0, DateTime.Now, 0, "ciao"); - return 100; - } - - public static History CreateHistory(Object nearobj, Object amode, - short inCustomerId, - sbyte inCustomerDistrictId, - short inCustomerWarehouseId, - sbyte inDistrictId, - short inWarehouseId, - DateTime inDate, - float inAmount, - string inData) // 10-th argument goes in callerSP+0x18 - { - History newHistory = null; - newHistory = CreateEntity(null, amode, nearobj, with); // this is the call site - newHistory.initHistory(inCustomerId, - inCustomerDistrictId, - inCustomerWarehouseId, - inDistrictId, - inWarehouseId, - inDate, - inAmount, - inData); - return newHistory; - } - - - public static History CreateEntity(Object a, Object b, Object c, Object d) - { - return new History(); - } - - public void initHistory - (short inCustomerId, - sbyte inCustomerDistrictId, - short inCustomerWarehouseId, - sbyte inDistrictId, - short inWarehouseId, - DateTime inDate, - float inAmount, - string inData) - { - } -} diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/M00/b141358/test.cs b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/M00/b141358/test.cs deleted file mode 100644 index 4217cded5570..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/M00/b141358/test.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -namespace test -{ - - class Class1 - { - - static int Main() - { - try - { - Console.WriteLine(" try 1"); - try - { - Console.WriteLine("\t try 1.1"); - Console.WriteLine("\t throwing an exception here!"); - throw new System.ArithmeticException("My ArithmeticException"); - } - catch (Exception) - { - Console.WriteLine("\t catch 1.1"); - goto inner_try; - throw_exception: - Console.WriteLine("\t throwing another exception here!"); - throw new System.ArithmeticException("My ArithmeticException"); - inner_try: - try - { - Console.WriteLine("\t\t try 1.1.1"); - } - finally - { - Console.WriteLine("\t\t finally 1.1.1"); - } - goto throw_exception; - } - } - catch (Exception) - { - Console.WriteLine(" catch 1"); - } - finally - { - Console.WriteLine(" finally 1"); - } - return 100; - } - } -} diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-Beta1/b102615/test1.cs b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-Beta1/b102615/test1.cs deleted file mode 100644 index cdee96f39656..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-Beta1/b102615/test1.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -struct S -{ - public Object O1; - public Object O2; -} - -class C -{ - public int i; - public static S s1; - - public C() - { - s1.O1 = "Hello"; - s1.O2 = "World"; - } -} - -class Test -{ - public static int Main() - { - test1(); - test2(); - return 100; - } - - public static void test1() - { - C c = new C(); - - foo(C.s1); - } - - public static void test2() - { - C c = new C(); - S s = C.s1; - - foo(s); - } - - public static void foo(S s) - { - Console.WriteLine(s.O1); - Console.WriteLine(s.O2); - } -} diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-Beta1/b102860/structret1_1.cs b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-Beta1/b102860/structret1_1.cs deleted file mode 100644 index 6fd8391d9f10..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-Beta1/b102860/structret1_1.cs +++ /dev/null @@ -1,105 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - - -struct Pad -{ -#pragma warning disable 0414 - public double d1; - public double d2; - public double d3; - public double d4; - public double d5; - public double d6; - public double d7; - public double d8; - public double d9; - public double d10; - public double d11; - public double d12; - public double d13; - public double d14; - public double d15; - public double d16; - public double d17; - public double d18; - public double d19; - public double d20; - public double d21; - public double d22; - public double d23; - public double d24; - public double d25; - public double d26; - public double d27; - public double d28; - public double d29; - public double d30; -#pragma warning restore 0414 -} - -struct S -{ - public String str2; - public String str; - - public Pad pad; - - public S(String s) - { - str = s; - str2 = s + str; - pad.d1 = - pad.d2 = - pad.d3 = - pad.d4 = - pad.d5 = - pad.d6 = - pad.d7 = - pad.d8 = - pad.d9 = - pad.d10 = - pad.d11 = - pad.d12 = - pad.d13 = - pad.d14 = - pad.d15 = - pad.d16 = - pad.d17 = - pad.d18 = - pad.d19 = - pad.d20 = - pad.d21 = - pad.d22 = - pad.d23 = - pad.d24 = - pad.d25 = - pad.d26 = - pad.d27 = - pad.d28 = - pad.d29 = - pad.d30 = 3.3; - - } -} - - -class Test -{ - public static S c(S s1) - { - return (s1); - } - - public static int Main() - { - S sM = new S("test"); - - Console.WriteLine(c(sM)); - return 100; - } -} diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-Beta1/b102887/struct5_2.cs b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-Beta1/b102887/struct5_2.cs deleted file mode 100644 index ace49cf85524..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-Beta1/b102887/struct5_2.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -struct S -{ -#pragma warning disable 0414 - public String str2; -#pragma warning restore 0414 - public String str; -} - - -class Test -{ - public static void c(S s1, S s2, S s3, S s4) - { - Console.WriteLine(s1.str + s2.str + s3.str + s4.str); - } - - public static int Main() - { - S sM, sM2, sM3, sM4; - - sM.str = "test"; - sM2.str = "test2"; - sM3.str = "test3"; - sM4.str = "test4"; - sM.str2 = ""; - sM2.str2 = ""; - sM3.str2 = ""; - sM4.str2 = ""; - c(sM, sM2, sM3, sM4); - return 100; - } -} diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-Beta1/b91953/2.il b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-Beta1/b91953/2.il deleted file mode 100644 index b78c7b564d53..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-Beta1/b91953/2.il +++ /dev/null @@ -1,96 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly ILGEN_0xb8267005 {} -.class ILGEN_0xb8267005 { - -.field static float64 field_0x2 -.method static int32 Main() { -.entrypoint -.maxstack 19 - - .locals (unsigned int64 LOCAL_0x0,int64 LOCAL_0x1,native int LOCAL_0x2,int64 LOCAL_0x3,unsigned int16 LOCAL_0x4,unsigned int16[] LOCAL_0x5,int32 LOCAL_0x6,object LOCAL_0x7,int16[] LOCAL_0x8,float64[] LOCAL_0x9,float64[] LOCAL_0xa) -//BEGIN INIT LOCALS -ldc.i8 0x3f2016c6e04397c0 -stloc LOCAL_0x0 -ldc.i8 0xc48d364daf72bb88 -stloc LOCAL_0x1 -ldc.i4 0x81398436 -stloc LOCAL_0x2 -newobj instance void [mscorlib]System.Object::.ctor() -stloc LOCAL_0x7 - -//END INIT LOCALS -ldc.r8 float64(0x3658f4d211e645cf) -stsfld float64 ILGEN_0xb8267005::field_0x2 - - -Start_Orphan_a_0: - ldloca LOCAL_0x7 -Start_Orphan_a_1: - ldc.i4 6 - Loop_0x0: //WHAT - ldloca LOCAL_0x0 - ldind.u8 - conv.i8 -Start_Orphan_b_b: - ldc.r4 float32(0xd5f6ccd2) - ldc.r4 float32(0x792eb395) - beq Branch_0x8 -ldc.i4 0x81398436 - br Branch_0x9 - Branch_0x8: -ldc.i4 0x81398436 - Branch_0x9: -ldc.i4 0x81398436 - bne.un Branch_0x6 - ldloc LOCAL_0x3 - br Branch_0x7 - Branch_0x6: - ldloc LOCAL_0x0 - Branch_0x7: -ldc.i4 0x81398436 -ldc.i4 0x81398436 - bgt Branch_0xe - ldsfld float64 ILGEN_0xb8267005::field_0x2 - br Branch_0xf - Branch_0xe: -ldc.r8 float64(0xd44708197df14375) - - Branch_0xf: - ldc.r4 float32(0xe2a11a95) - ldc.r4 float32(0xc9f53748) - bgt Branch_0x10 - ldsfld float64 ILGEN_0xb8267005::field_0x2 - br Branch_0x11 - Branch_0x10: - ldc.r4 float32(0x56b8f6cb) - Branch_0x11: -pop -pop -pop -End_Orphan_b_b: - conv.i2 - pop - ldc.i4 1 - sub - dup - brtrue Loop_0x0 - pop - Loop_0x1: // End of WHAT -End_Orphan_a_1: - newobj instance void [mscorlib]System.Object::.ctor() -stind.ref -End_Orphan_a_0: -ldc.i4 100 - ret -} - -} diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M01/b10852/test3.il b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M01/b10852/test3.il deleted file mode 100644 index f8f3202c3504..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M01/b10852/test3.il +++ /dev/null @@ -1,137 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - - - - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly extern mscorlib -{ -} -.assembly test3 -{ - - - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module test3.exe -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x00400000 -.subsystem 0x00000003 -.file alignment 512 -.corflags 0x00000001 - - -.class private auto ansi beforefieldinit T - extends [mscorlib]System.Object -{ - .field public static int32 size_to_test - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - .maxstack 4 - .locals init (bool V_0, - int32* V_1, - int32 V_2) - IL_0000: ldc.i4.1 - IL_0001: stloc.0 - IL_0002: call void T::dirtyStack() - IL_0007: ldc.i4.4 - IL_0008: ldsfld int32 T::size_to_test - IL_000d: mul - IL_000e: localloc - IL_0010: stloc.1 - IL_0011: ldc.i4.0 - IL_0012: stloc.2 - IL_0013: br.s IL_0023 - - IL_0015: ldloc.1 - IL_0016: ldc.i4.4 - IL_0017: ldloc.2 - IL_0018: mul - IL_0019: add - IL_001a: ldind.i4 - IL_001b: brfalse.s IL_001f - - IL_001d: ldc.i4.0 - IL_001e: stloc.0 - IL_001f: ldloc.2 - IL_0020: ldc.i4.1 - IL_0021: add - IL_0022: stloc.2 - IL_0023: ldloc.2 - IL_0024: ldsfld int32 T::size_to_test - IL_0029: blt.s IL_0015 - - IL_002b: ldloc.0 - IL_002c: brfalse.s IL_003a - - IL_002e: ldstr "pass" - IL_0033: call void [System.Console]System.Console::WriteLine(string) - IL_0038: ldc.i4 100 - ret - - IL_003a: ldstr "fail" - IL_003f: call void [System.Console]System.Console::WriteLine(string) - IL_0044: ldc.i4 1 - ret - } - - .method public hidebysig static void dirtyStack() cil managed - { - .maxstack 3 - .locals (int32* V_0, - int32 V_1) - IL_0000: ldc.i4.4 - IL_0001: ldsfld int32 T::size_to_test - IL_0006: mul - IL_0007: localloc - IL_0009: stloc.0 - IL_000a: ldc.i4.0 - IL_000b: stloc.1 - IL_000c: br.s IL_0019 - - IL_000e: ldloc.0 - IL_000f: ldc.i4.4 - IL_0010: ldloc.1 - IL_0011: mul - IL_0012: add - IL_0013: ldloc.1 - IL_0014: stind.i4 - IL_0015: ldloc.1 - IL_0016: ldc.i4.1 - IL_0017: add - IL_0018: stloc.1 - IL_0019: ldloc.1 - IL_001a: ldsfld int32 T::size_to_test - IL_001f: blt.s IL_000e - - IL_0021: ret - } - - .method private hidebysig specialname rtspecialname static - void .cctor() cil managed - { - .maxstack 8 - IL_0000: ldc.i4 0x7d0 - IL_0005: stsfld int32 T::size_to_test - IL_000a: ret - } - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } - -} diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M01/b11131/bug2.il b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M01/b11131/bug2.il deleted file mode 100644 index 6c1a368dd6d4..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M01/b11131/bug2.il +++ /dev/null @@ -1,102 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - - - - -// Metadata version: v1.1.1919 -.assembly extern mscorlib -{ -} -.assembly 'switch' -{ - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(bool, - // bool) = ( 01 00 00 01 00 00 ) - - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module switch.exe -// MVID: {663074E2-0B73-434A-85B1-7077AA61100B} -.imagebase 0x00400000 -.subsystem 0x00000003 -.file alignment 512 -.corflags 0x00000001 -// Image base: 0x000007FFFE250000 - -// =============== CLASS MEMBERS DECLARATION =================== - -.class private auto ansi beforefieldinit foo - extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - // Code size 67 (0x43) - .maxstack 1 - .locals init (int32 V_0, - int32 V_1, - int32 V_2) - IL_0000: ldc.i4.3 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: stloc.2 - IL_0004: ldloc.2 - IL_0005: switch ( - IL_0020, - IL_0025, - IL_002a, -// IL_002f, - IL_0034) - IL_001e: br.s IL_0039 - - IL_0020: ldc.i4.s 101 - IL_0022: stloc.1 - IL_0023: br.s IL_0041 - - IL_0025: ldc.i4.s 102 - IL_0027: stloc.1 - IL_0028: br.s IL_0041 - - IL_002a: ldc.i4.s 103 - IL_002c: stloc.1 - IL_002d: br.s IL_0041 - -// IL_002f: ldc.i4.s 100 -// IL_0031: stloc.1 -// IL_0032: br.s IL_0041 - - IL_0034: ldc.i4.s 100 - IL_0036: stloc.1 - IL_0037: br.s IL_0041 - - IL_0039: ldc.i4 0x4d2 - IL_003e: stloc.1 - IL_003f: br.s IL_0041 - - IL_0041: ldloc.1 - IL_0042: ret - } // end of method foo::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 1 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method foo::.ctor - -} // end of class foo - - -// ============================================================= - - -//*********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file switch.res diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M01/b12263/nullref.il b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M01/b12263/nullref.il deleted file mode 100644 index 53670b74c426..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M01/b12263/nullref.il +++ /dev/null @@ -1,83 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib{} -.assembly field017{} -.module field017.exe - -.class private auto ansi beforefieldinit MyTest - extends [mscorlib]System.Object -{ - .field public int32 intI - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 14 (0xe) - .maxstack 2 - IL_0000: ldarg.0 - IL_0001: ldc.i4.1 - IL_0002: stfld int32 MyTest::intI - IL_0007: ldarg.0 - IL_0008: call instance void [mscorlib]System.Object::.ctor() - IL_000d: ret - } // end of method MyTest::.ctor - -} // end of class MyTest - -.class private auto ansi beforefieldinit MyClass - extends [mscorlib]System.Object -{ - .field private class MyTest tc - .method public static int32 RealMain() - { - .entrypoint - .try - { - call void MyClass::Main() - leave FAIL - } - catch [mscorlib]System.NullReferenceException - { - leave PASS - } - FAIL: - ldc.i4.1 - ret - PASS: - ldc.i4 100 - ret - } - - .method public hidebysig static void Main() cil managed - { - .locals init (int32 V_0, - class MyClass V_1, - int32 V_2, - class [mscorlib]System.NullReferenceException V_3, - int32 V_4) - - IL_0000: ldc.i4.1 - IL_0001: stloc.0 - IL_0002: newobj instance void MyClass::.ctor() - IL_0007: stloc.1 - - IL_0008: ldloc.1 - IL_0009: ldfld class MyTest MyClass::tc - IL_000e: ldfld int32 MyTest::intI // <-- NullRef Exception should be thrown here - pop - - IL_0022: ret - } - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 1 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method MyClass::.ctor - -} diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M01/b12343/test_04a.il b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M01/b12343/test_04a.il deleted file mode 100644 index edc05f920002..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M01/b12343/test_04a.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. -// See the LICENSE file in the project root for more information. - -// endfinally after finally -// expect throw System.InvalidProgramException - -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly test {} -.module test_04a.exe - -.class private auto ansi beforefieldinit test extends [mscorlib]System.Object -{ - .method public static int32 Main() cil managed - { - .entrypoint - .try - { - call void test::f() - leave FAIL - } - catch [mscorlib]System.NullReferenceException - { - leave PASS - } - PASS: - ldc.i4 100 - ret - FAIL: - ldc.i4 1 - ret - } - - .method public static void f() - { - - .locals (int32* V_0, int32 V_1) - - ldc.i4 0 - conv.u - ldind.i4 - pop - ret - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M01/b12390/test_04a.il b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M01/b12390/test_04a.il deleted file mode 100644 index c0522fbe6e4a..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M01/b12390/test_04a.il +++ /dev/null @@ -1,46 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib{} -.assembly test_08{} -.module test_08.exe - -.class public auto ansi beforefieldinit repro - extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main(string[] argv) cil managed - { - .entrypoint - .try - { - call void repro::f() - leave FAIL - } - catch [mscorlib]System.ArrayTypeMismatchException - { - leave PASS - } - PASS: - ldc.i4 100 - ret - FAIL: - ldc.i4 1 - ret - } - - .method public hidebysig static void f() cil managed - { - ldc.i4.1 - newarr [mscorlib]System.String - - ldc.i4.0 - - ldc.i4.1 - box [mscorlib]System.Int32 - - stelem.ref - ret - } - -} \ No newline at end of file diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M01/b13691/init_byte.il b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M01/b13691/init_byte.il deleted file mode 100644 index 5341d0e4c530..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M01/b13691/init_byte.il +++ /dev/null @@ -1,807 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - - - - - -// Metadata version: v1.2.2123 -.assembly extern mscorlib -{ - .ver 0:0:0:0 -} -.assembly init_byte -{ - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(bool, - // bool) = ( 01 00 01 01 00 00 ) - - .ver 0:0:0:0 -} -.module init_byte.exe -// MVID: {FDCD7B4C-5230-4304-82F7-A3D10057533E} -.imagebase 0x00400000 -.file alignment 0x00001000 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x03EE0000 - -// =============== CLASS MEMBERS DECLARATION =================== - -.class private auto ansi beforefieldinit Test - extends [mscorlib]System.Object -{ - .field private int8 m_ret - .field private static class Test global - .method private hidebysig static int8 noinline1(int8 'ret') cil managed - { - // Code size 4 (0x4) - .maxstack 1 - IL_0000: ldarga.s 'ret' - IL_0002: ldind.i1 - IL_0003: ret - } // end of method Test::noinline1 - - .method private hidebysig static int8 noinline2(int8& 'ret') cil managed - { - // Code size 5 (0x5) - .maxstack 1 - IL_0000: ldarga.s 'ret' - IL_0002: ldind.i - IL_0003: ldind.i1 - IL_0004: ret - } // end of method Test::noinline2 - - .method private hidebysig static int8 test1() cil managed - { - // Code size 2 (0x2) - .maxstack 1 - .locals init (int8 V_0, - int8 V_1) - IL_0000: ldloc.1 - IL_0001: ret - } // end of method Test::test1 - - .method private hidebysig static int8 test2() cil managed - { - // Code size 24 (0x18) - .maxstack 3 - .locals init (int8 V_0, - int8 V_1, - int8 V_2) - IL_0000: ldloc.0 - IL_0001: ldc.i4.1 - IL_0002: shr - IL_0003: ldc.i4 0x1 - IL_0008: and - IL_0009: ldloc.1 - IL_000a: ldc.i4.2 - IL_000b: shl - IL_000c: sub - IL_000d: ldc.i4 0xb - IL_0012: add - IL_0013: stloc.2 - IL_0014: br.s IL_0016 - - IL_0016: ldloc.2 - IL_0017: ret - } // end of method Test::test2 - - .method private hidebysig static int8 test3() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (int8 V_0, - int8 V_1) - IL_0000: ldloc.0 - IL_0001: call int8 Test::noinline1(int8) - IL_0006: stloc.1 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.1 - IL_000a: ret - } // end of method Test::test3 - - .method private hidebysig static int8 test4() cil managed - { - // Code size 12 (0xc) - .maxstack 1 - .locals init (int8 V_0, - int8 V_1) - IL_0000: ldloca.s V_0 - IL_0002: call int8 Test::noinline2(int8&) - IL_0007: stloc.1 - IL_0008: br.s IL_000a - - IL_000a: ldloc.1 - IL_000b: ret - } // end of method Test::test4 - - .method private hidebysig static void test5(int8& 'ret') cil managed - { - // Code size 9 (0x9) - .maxstack 2 - .locals init (int8 V_0) - IL_0000: ldarg.0 - IL_0001: ldloc.0 - IL_0002: call int8 Test::noinline1(int8) - IL_0007: stind.i1 - IL_0008: ret - } // end of method Test::test5 - - .method private hidebysig static void test6(int8& 'ret') cil managed - { - // Code size 10 (0xa) - .maxstack 2 - .locals init (int8 V_0) - IL_0000: ldarg.0 - IL_0001: ldloca.s V_0 - IL_0003: call int8 Test::noinline2(int8&) - IL_0008: stind.i1 - IL_0009: ret - } // end of method Test::test6 - - .method private hidebysig static void test7() cil managed - { - // Code size 12 (0xc) - .maxstack 2 - .locals init (int8 V_0) - IL_0000: ldsfld class Test Test::global - IL_0005: ldloc.0 - IL_0006: stfld int8 Test::m_ret - IL_000b: ret - } // end of method Test::test7 - - .method private hidebysig static void test8() cil managed - { - // Code size 30 (0x1e) - .maxstack 4 - .locals init (int8 V_0, - int8 V_1) - IL_0000: ldsfld class Test Test::global - IL_0005: ldloc.0 - IL_0006: ldc.i4.1 - IL_0007: shr - IL_0008: ldc.i4 0x1 - IL_000d: and - IL_000e: ldloc.1 - IL_000f: ldc.i4.2 - IL_0010: shl - IL_0011: sub - IL_0012: ldc.i4 0xb - IL_0017: add - IL_0018: stfld int8 Test::m_ret - IL_001d: ret - } // end of method Test::test8 - - .method private hidebysig static void test9() cil managed - { - // Code size 17 (0x11) - .maxstack 2 - .locals init (int8 V_0) - IL_0000: ldsfld class Test Test::global - IL_0005: ldloc.0 - IL_0006: call int8 Test::noinline1(int8) - IL_000b: stfld int8 Test::m_ret - IL_0010: ret - } // end of method Test::test9 - - .method private hidebysig static void test10() cil managed - { - // Code size 18 (0x12) - .maxstack 2 - .locals init (int8 V_0) - IL_0000: ldsfld class Test Test::global - IL_0005: ldloca.s V_0 - IL_0007: call int8 Test::noinline2(int8&) - IL_000c: stfld int8 Test::m_ret - IL_0011: ret - } // end of method Test::test10 - - .method private hidebysig static void test11(int8[] arr, - int8 index) cil managed - { - // Code size 6 (0x6) - .maxstack 3 - .locals init (int8 V_0) - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: conv.i4 - IL_0003: ldloc.0 - IL_0004: stelem.i1 - IL_0005: ret - } // end of method Test::test11 - - .method private hidebysig static void test12(int8[] arr, - int8 index) cil managed - { - // Code size 24 (0x18) - .maxstack 5 - .locals init (int8 V_0, - int8 V_1) - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: conv.i4 - IL_0003: ldloc.0 - IL_0004: ldc.i4.1 - IL_0005: shr - IL_0006: ldc.i4 0x1 - IL_000b: and - IL_000c: ldloc.1 - IL_000d: ldc.i4.2 - IL_000e: shl - IL_000f: sub - IL_0010: ldc.i4 0xb - IL_0015: add - IL_0016: stelem.i1 - IL_0017: ret - } // end of method Test::test12 - - .method private hidebysig static void test13(int8[] arr, - int8 index) cil managed - { - // Code size 11 (0xb) - .maxstack 3 - .locals init (int8 V_0) - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: conv.i4 - IL_0003: ldloc.0 - IL_0004: call int8 Test::noinline1(int8) - IL_0009: stelem.i1 - IL_000a: ret - } // end of method Test::test13 - - .method private hidebysig static void test14(int8[] arr, - int8 index) cil managed - { - // Code size 12 (0xc) - .maxstack 3 - .locals init (int8 V_0) - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: conv.i4 - IL_0003: ldloca.s V_0 - IL_0005: call int8 Test::noinline2(int8&) - IL_000a: stelem.i1 - IL_000b: ret - } // end of method Test::test14 - - .method private hidebysig static void test15(int8[0...,0...,0...] arr, - int8 index1, - int8 index3) cil managed - { - // Code size 18 (0x12) - .maxstack 5 - .locals init (int8 V_0) - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: conv.i4 - IL_0003: ldc.i4 0x2 - IL_0008: conv.i4 - IL_0009: ldarg.2 - IL_000a: conv.i4 - IL_000b: ldloc.0 - IL_000c: call instance void int8[0...,0...,0...]::Set(int32, - int32, - int32, - int8) - IL_0011: ret - } // end of method Test::test15 - - .method private hidebysig static void test16(int8[0...,0...,0...] arr, - int8 index1, - int8 index3) cil managed - { - // Code size 31 (0x1f) - .maxstack 7 - .locals init (int8 V_0, - int8 V_1) - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: conv.i4 - IL_0003: ldc.i4.2 - IL_0004: ldarg.2 - IL_0005: conv.i4 - IL_0006: ldloc.0 - IL_0007: ldc.i4.1 - IL_0008: shr - IL_0009: ldc.i4 0x1 - IL_000e: and - IL_000f: ldloc.1 - IL_0010: ldc.i4.2 - IL_0011: shl - IL_0012: sub - IL_0013: ldc.i4 0xb - IL_0018: add - IL_0019: call instance void int8[0...,0...,0...]::Set(int32, - int32, - int32, - int8) - IL_001e: ret - } // end of method Test::test16 - - .method private hidebysig static void test17(int8[0...,0...,0...] arr, - int8 index1, - int8 index3) cil managed - { - // Code size 18 (0x12) - .maxstack 5 - .locals init (int8 V_0) - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: conv.i4 - IL_0003: ldc.i4.2 - IL_0004: ldarg.2 - IL_0005: conv.i4 - IL_0006: ldloc.0 - IL_0007: call int8 Test::noinline1(int8) - IL_000c: call instance void int8[0...,0...,0...]::Set(int32, - int32, - int32, - int8) - IL_0011: ret - } // end of method Test::test17 - - .method private hidebysig static void test18(int8[0...,0...,0...] arr, - int8 index1, - int8 index3) cil managed - { - // Code size 24 (0x18) - .maxstack 5 - .locals init (int8 V_0) - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: conv.i4 - IL_0003: ldc.i4 0x2 - IL_0008: conv.i - IL_0009: ldarg.2 - IL_000a: conv.u4 - IL_000b: ldloca.s V_0 - IL_000d: call int8 Test::noinline2(int8&) - IL_0012: call instance void int8[0...,0...,0...]::Set(int32, - int32, - int32, - int8) - IL_0017: ret - } // end of method Test::test18 - - .method private hidebysig static int8 test19() cil managed - { - // Code size 7 (0x7) - .maxstack 1 - .locals init (int8 V_0, - int8 V_1) - IL_0000: ldloc.0 - IL_0001: conv.i4 - IL_0002: stloc.1 - IL_0003: br.s IL_0005 - - IL_0005: ldloc.1 - IL_0006: ret - } // end of method Test::test19 - - .method private hidebysig static uint8 - test20() cil managed - { - // Code size 27 (0x1b) - .maxstack 3 - .locals init (int8 V_0, - int8 V_1, - uint8 V_2) - IL_0000: ldloc.0 - IL_0001: ldc.i4.1 - IL_0002: shr - IL_0003: ldc.i4 0x1 - IL_0008: and - IL_0009: ldloc.1 - IL_000a: ldc.i4.s 2 - IL_000c: shl - IL_000d: sub - IL_000e: conv.i4 - IL_000f: ldc.i4 0xb - IL_0014: conv.i4 - IL_0015: add - IL_0016: stloc.2 - IL_0017: br.s IL_0019 - - IL_0019: ldloc.2 - IL_001a: ret - } // end of method Test::test20 - - .method private hidebysig static uint8 - test21() cil managed - { - // Code size 12 (0xc) - .maxstack 1 - .locals init (int8 V_0, - uint8 V_1) - IL_0000: ldloc.0 - IL_0001: call int8 Test::noinline1(int8) - IL_0006: conv.u1 - IL_0007: stloc.1 - IL_0008: br.s IL_000a - - IL_000a: ldloc.1 - IL_000b: ret - } // end of method Test::test21 - - .method private hidebysig static uint16 - test22() cil managed - { - // Code size 13 (0xd) - .maxstack 1 - .locals init (int8 V_0, - uint16 V_1) - IL_0000: ldloca.s V_0 - IL_0002: call int8 Test::noinline2(int8&) - IL_0007: conv.ovf.u2 - IL_0008: stloc.1 - IL_0009: br.s IL_000b - - IL_000b: ldloc.1 - IL_000c: ret - } // end of method Test::test22 - - .method private hidebysig static int32 - Main() cil managed - { - .entrypoint - // Code size 842 (0x34a) - .maxstack 4 - .locals init (int8 V_0, - int8[] V_1, - int8[0...,0...,0...] V_2, - int8 V_3) - IL_0000: call int8 Test::test1() - IL_0005: brfalse.s IL_001c - - IL_0007: ldstr "Error 101" - IL_000c: call void [System.Console]System.Console::WriteLine(string) - IL_0011: ldc.i4 0x65 - IL_0016: stloc.3 - IL_0017: br IL_0347 - - IL_001c: call int8 Test::test2() - IL_0021: ldc.i4 0xb - IL_0026: beq.s IL_003d - - IL_0028: ldstr "Error 102" - IL_002d: call void [System.Console]System.Console::WriteLine(string) - IL_0032: ldc.i4 0x66 - IL_0037: stloc.3 - IL_0038: br IL_0347 - - IL_003d: call int8 Test::test3() - IL_0042: brfalse.s IL_0059 - - IL_0044: ldstr "Error 103" - IL_0049: call void [System.Console]System.Console::WriteLine(string) - IL_004e: ldc.i4 0x67 - IL_0053: stloc.3 - IL_0054: br IL_0347 - - IL_0059: call int8 Test::test4() - IL_005e: brfalse.s IL_0075 - - IL_0060: ldstr "Error 104" - IL_0065: call void [System.Console]System.Console::WriteLine(string) - IL_006a: ldc.i4 0x68 - IL_006f: stloc.3 - IL_0070: br IL_0347 - - IL_0075: ldc.i4 0x0 - IL_007a: stloc.0 - IL_007b: ldloca.s V_0 - IL_007d: call void Test::test5(int8&) - IL_0082: ldloc.0 - IL_0083: brfalse.s IL_009a - - IL_0085: ldstr "Error 105" - IL_008a: call void [System.Console]System.Console::WriteLine(string) - IL_008f: ldc.i4 0x69 - IL_0094: stloc.3 - IL_0095: br IL_0347 - - IL_009a: ldloca.s V_0 - IL_009c: call void Test::test6(int8&) - IL_00a1: ldloc.0 - IL_00a2: brfalse.s IL_00b9 - - IL_00a4: ldstr "Error 106" - IL_00a9: call void [System.Console]System.Console::WriteLine(string) - IL_00ae: ldc.i4 0x6a - IL_00b3: stloc.3 - IL_00b4: br IL_0347 - - IL_00b9: call void Test::test7() - IL_00be: ldsfld class Test Test::global - IL_00c3: ldfld int8 Test::m_ret - IL_00c8: brfalse.s IL_00df - - IL_00ca: ldstr "Error 107" - IL_00cf: call void [System.Console]System.Console::WriteLine(string) - IL_00d4: ldc.i4 0x6b - IL_00d9: stloc.3 - IL_00da: br IL_0347 - - IL_00df: call void Test::test8() - IL_00e4: ldsfld class Test Test::global - IL_00e9: ldfld int8 Test::m_ret - IL_00ee: ldc.i4 0xb - IL_00f3: beq.s IL_010a - - IL_00f5: ldstr "Error 108" - IL_00fa: call void [System.Console]System.Console::WriteLine(string) - IL_00ff: ldc.i4 0x6c - IL_0104: stloc.3 - IL_0105: br IL_0347 - - IL_010a: call void Test::test9() - IL_010f: ldsfld class Test Test::global - IL_0114: ldfld int8 Test::m_ret - IL_0119: brfalse.s IL_0130 - - IL_011b: ldstr "Error 109" - IL_0120: call void [System.Console]System.Console::WriteLine(string) - IL_0125: ldc.i4 0x6d - IL_012a: stloc.3 - IL_012b: br IL_0347 - - IL_0130: call void Test::test10() - IL_0135: ldsfld class Test Test::global - IL_013a: ldfld int8 Test::m_ret - IL_013f: brfalse.s IL_0156 - - IL_0141: ldstr "Error 110" - IL_0146: call void [System.Console]System.Console::WriteLine(string) - IL_014b: ldc.i4 0x6e - IL_0150: stloc.3 - IL_0151: br IL_0347 - - IL_0156: ldc.i4.5 - IL_0157: newarr [mscorlib]System.SByte - IL_015c: stloc.1 - IL_015d: ldloc.1 - IL_015e: ldc.i4 0x1 - IL_0163: call void Test::test11(int8[], - int8) - IL_0168: ldloc.1 - IL_0169: ldc.i4.1 - IL_016a: ldelem.i1 - IL_016b: brfalse.s IL_0182 - - IL_016d: ldstr "Error 111" - IL_0172: call void [System.Console]System.Console::WriteLine(string) - IL_0177: ldc.i4 0x6f - IL_017c: stloc.3 - IL_017d: br IL_0347 - - IL_0182: ldloc.1 - IL_0183: ldc.i4 0x2 - IL_0188: call void Test::test12(int8[], - int8) - IL_018d: ldloc.1 - IL_018e: ldc.i4.2 - IL_018f: ldelem.i1 - IL_0190: ldc.i4 0xb - IL_0195: beq.s IL_01ac - - IL_0197: ldstr "Error 112" - IL_019c: call void [System.Console]System.Console::WriteLine(string) - IL_01a1: ldc.i4 0x70 - IL_01a6: stloc.3 - IL_01a7: br IL_0347 - - IL_01ac: ldloc.1 - IL_01ad: ldc.i4 0x3 - IL_01b2: call void Test::test13(int8[], - int8) - IL_01b7: ldloc.1 - IL_01b8: ldc.i4.3 - IL_01b9: ldelem.i1 - IL_01ba: brfalse.s IL_01d1 - - IL_01bc: ldstr "Error 113" - IL_01c1: call void [System.Console]System.Console::WriteLine(string) - IL_01c6: ldc.i4 0x71 - IL_01cb: stloc.3 - IL_01cc: br IL_0347 - - IL_01d1: ldloc.1 - IL_01d2: ldc.i4 0x4 - IL_01d7: call void Test::test14(int8[], - int8) - IL_01dc: ldloc.1 - IL_01dd: ldc.i4.4 - IL_01de: ldelem.i1 - IL_01df: brfalse.s IL_01f6 - - IL_01e1: ldstr "Error 114" - IL_01e6: call void [System.Console]System.Console::WriteLine(string) - IL_01eb: ldc.i4 0x72 - IL_01f0: stloc.3 - IL_01f1: br IL_0347 - - IL_01f6: ldc.i4.5 - IL_01f7: ldc.i4.3 - IL_01f8: ldc.i4.5 - IL_01f9: newobj instance void int8[0...,0...,0...]::.ctor(int32, - int32, - int32) - IL_01fe: stloc.2 - IL_01ff: ldloc.2 - IL_0200: ldc.i4 0x1 - IL_0205: ldc.i4 0x1 - IL_020a: call void Test::test15(int8[0...,0...,0...], - int8, - int8) - IL_020f: ldloc.2 - IL_0210: ldc.i4.1 - IL_0211: ldc.i4.2 - IL_0212: ldc.i4.1 - IL_0213: call instance int8 int8[0...,0...,0...]::Get(int32, - int32, - int32) - IL_0218: brfalse.s IL_022f - - IL_021a: ldstr "Error 115" - IL_021f: call void [System.Console]System.Console::WriteLine(string) - IL_0224: ldc.i4 0x73 - IL_0229: stloc.3 - IL_022a: br IL_0347 - - IL_022f: ldloc.2 - IL_0230: ldc.i4 0x2 - IL_0235: ldc.i4 0x2 - IL_023a: call void Test::test16(int8[0...,0...,0...], - int8, - int8) - IL_023f: ldloc.2 - IL_0240: ldc.i4.2 - IL_0241: dup - IL_0242: dup - IL_0243: call instance int8 int8[0...,0...,0...]::Get(int32, - int32, - int32) - IL_0248: ldc.i4 0xb - IL_024d: beq.s IL_0264 - - IL_024f: ldstr "Error 116" - IL_0254: call void [System.Console]System.Console::WriteLine(string) - IL_0259: ldc.i4 0x74 - IL_025e: stloc.3 - IL_025f: br IL_0347 - - IL_0264: ldloc.2 - IL_0265: ldc.i4 0x3 - IL_026a: ldc.i4 0x3 - IL_026f: call void Test::test17(int8[0...,0...,0...], - int8, - int8) - IL_0274: ldloc.2 - IL_0275: ldc.i4.3 - IL_0276: ldc.i4.2 - IL_0277: ldc.i4.3 - IL_0278: call instance int8 int8[0...,0...,0...]::Get(int32, - int32, - int32) - IL_027d: brfalse.s IL_0294 - - IL_027f: ldstr "Error 117" - IL_0284: call void [System.Console]System.Console::WriteLine(string) - IL_0289: ldc.i4 0x75 - IL_028e: stloc.3 - IL_028f: br IL_0347 - - IL_0294: ldloc.2 - IL_0295: ldc.i4 0x4 - IL_029a: ldc.i4 0x4 - IL_029f: call void Test::test18(int8[0...,0...,0...], - int8, - int8) - IL_02a4: ldloc.2 - IL_02a5: ldc.i4.4 - IL_02a6: ldc.i4.2 - IL_02a7: ldc.i4.4 - IL_02a8: call instance int8 int8[0...,0...,0...]::Get(int32, - int32, - int32) - IL_02ad: brfalse.s IL_02c4 - - IL_02af: ldstr "Error 118" - IL_02b4: call void [System.Console]System.Console::WriteLine(string) - IL_02b9: ldc.i4 0x76 - IL_02be: stloc.3 - IL_02bf: br IL_0347 - - IL_02c4: call int8 Test::test19() - IL_02c9: ldc.i4 0x0 - IL_02ce: conv.i4 - IL_02cf: beq.s IL_02e3 - - IL_02d1: ldstr "Error 119" - IL_02d6: call void [System.Console]System.Console::WriteLine(string) - IL_02db: ldc.i4 0x77 - IL_02e0: stloc.3 - IL_02e1: br.s IL_0347 - - IL_02e3: call uint8 Test::test20() - IL_02e8: ldc.i4 0xb - IL_02ed: conv.i4 - IL_02ee: beq.s IL_0302 - - IL_02f0: ldstr "Error 120" - IL_02f5: call void [System.Console]System.Console::WriteLine(string) - IL_02fa: ldc.i4 0x78 - IL_02ff: stloc.3 - IL_0300: br.s IL_0347 - - IL_0302: call uint8 Test::test21() - IL_0307: brfalse.s IL_031b - - IL_0309: ldstr "Error 121" - IL_030e: call void [System.Console]System.Console::WriteLine(string) - IL_0313: ldc.i4 0x79 - IL_0318: stloc.3 - IL_0319: br.s IL_0347 - - IL_031b: call uint16 Test::test22() - IL_0320: conv.i4 - IL_0321: brfalse.s IL_0335 - - IL_0323: ldstr "Error 122" - IL_0328: call void [System.Console]System.Console::WriteLine(string) - IL_032d: ldc.i4 0x7a - IL_0332: stloc.3 - IL_0333: br.s IL_0347 - - IL_0335: ldstr "Passed" - IL_033a: call void [System.Console]System.Console::WriteLine(string) - IL_033f: ldc.i4 0x64 - IL_0344: stloc.3 - IL_0345: br.s IL_0347 - - IL_0347: ldloc.3 - IL_0348: conv.ovf.i4 - IL_0349: ret - } // end of method Test::Main - - .method private hidebysig specialname rtspecialname static - void .cctor() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - IL_0000: newobj instance void Test::.ctor() - IL_0005: stsfld class Test Test::global - IL_000a: ret - } // end of method Test::.cctor - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 18 (0x12) - .maxstack 2 - IL_0000: ldarg.0 - IL_0001: ldc.i4 0x0 - IL_0006: stfld int8 Test::m_ret - IL_000b: ldarg.0 - IL_000c: call instance void [mscorlib]System.Object::.ctor() - IL_0011: ret - } // end of method Test::.ctor - -} // end of class Test - - -// ============================================================= - -//*********** DISASSEMBLY COMPLETE *********************** diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b102518/hole.il b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b102518/hole.il deleted file mode 100644 index 337363061064..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b102518/hole.il +++ /dev/null @@ -1,145 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - - - - -// Metadata version: v1.2.30210 -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly hole {} -.module hole.exe -// MVID: {972ABF67-C385-44E6-B525-571BCCECC13C} -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x000006FBFEC20000 - -// =============== CLASS MEMBERS DECLARATION =================== - -.class public auto ansi beforefieldinit BASIC - extends [mscorlib]System.Object -{ - .field public static int32 x - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - // Code size 115 (0x73) - .maxstack 10 - .locals init (valuetype VT[] V_0) - IL_0000: ldc.i4.4 - IL_0001: newarr VT - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: ldc.i4.0 - IL_0009: ldelema VT - IL_000e: ldstr "Boo ya!" - IL_0013: ldc.i4.3 - IL_0014: newobj instance void VT::.ctor(string, - int32) - IL_0019: stobj VT - IL_001e: ldloc.0 - IL_001f: ldc.i4.1 - IL_0020: ldelema VT - IL_0025: ldstr "Boo ya!" - IL_002a: ldc.i4.3 - IL_002b: newobj instance void VT::.ctor(string, - int32) - IL_0030: stobj VT - IL_0035: ldloc.0 - IL_0036: ldc.i4.2 - IL_0037: ldelema VT - IL_003c: ldstr "Boo ya!" - IL_0041: ldc.i4.3 - IL_0042: newobj instance void VT::.ctor(string, - int32) - IL_0047: stobj VT - IL_004c: ldloc.0 - IL_004d: ldc.i4.3 - IL_004e: ldelema VT - IL_0053: ldstr "Boo ya!" - IL_0058: ldc.i4.3 - IL_0059: newobj instance void VT::.ctor(string, - int32) - IL_005e: stobj VT - IL_0063: ldsfld int32 BASIC::x - IL_0068: ldc.i4.0 - IL_0069: ble.s IL_0072 - - tail. - call int32 BASIC::Foo() - ret - - IL_0072: ldc.i4 1 - ret - } // end of method BASIC::Main - - .method public hidebysig static int32 Foo() cil managed - { - // Code size 21 (0x15) - .maxstack 10 - IL_0000: ldstr "In Foo: " - IL_0005: call void [System.Console]System.Console::Write(string) - IL_000a: ldsfld int32 BASIC::x - IL_000f: call void [System.Console]System.Console::WriteLine(int32) - ldc.i4 100 - IL_0014: ret - } // end of method BASIC::Foo - - .method private hidebysig specialname rtspecialname static - void .cctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldc.i4.4 - IL_0001: stsfld int32 BASIC::x - IL_0006: ret - } // end of method BASIC::.cctor - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method BASIC::.ctor - -} // end of class BASIC - -.class public sequential ansi sealed beforefieldinit VT - extends [mscorlib]System.ValueType -{ - .field private string s - .field private int32 x - .method public hidebysig specialname rtspecialname - instance void .ctor(string s, - int32 x) cil managed - { - // Code size 15 (0xf) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: stfld string VT::s - IL_0007: ldarg.0 - IL_0008: ldarg.2 - IL_0009: stfld int32 VT::x - IL_000e: ret - } // end of method VT::.ctor - -} // end of class VT - - -// ============================================================= - -//*********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file hole.res diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b108129/test2.cs b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b108129/test2.cs deleted file mode 100644 index 071f973c0d9c..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b108129/test2.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Runtime.InteropServices; - -namespace JitTest.HFA -{ - public class TestCase - { - [DllImport("test2", EntryPoint = "GetInt32Const")] - public static extern int GetInt32Const(); - - [DllImport("test2", EntryPoint = "GetInt64Const")] - public static extern long GetInt64Const(); - - [DllImport("test2", EntryPoint = "GetFloatConst")] - public static extern float GetFloatConst(); - - [DllImport("test2", EntryPoint = "GetDoubleConst")] - public static extern double GetDoubleConst(); - - private static int Main() - { - System.Console.WriteLine("Int32 Const = " + GetInt32Const()); - System.Console.WriteLine("Int64 Const = " + GetInt64Const()); - System.Console.WriteLine("Float Const = " + GetFloatConst()); - System.Console.WriteLine("Double Const = " + GetDoubleConst()); - - if (GetInt32Const() != 7) - { - System.Console.WriteLine("FAILED: GetInt32Const()!=7"); - System.Console.WriteLine("GetInt32Const() is {0}", GetInt32Const()); - return 1; - } - if (GetInt64Const() != 7) - { - System.Console.WriteLine("FAILED: GetInt64Const()!=7"); - System.Console.WriteLine("GetInt64Const() is {0}", GetInt64Const()); - return 1; - } - if ((GetFloatConst() - 7.777777) > 0.5) - { - System.Console.WriteLine("FAILED: (GetFloatConst()-7.777777)>0.5"); - System.Console.WriteLine("GetFloatConst() is {0}", GetFloatConst()); - return 1; - } - if ((GetDoubleConst() - 7.777777) > 0.5) - { - System.Console.WriteLine("FAILED: (GetDoubleConst()-7.777777)>0.5"); - System.Console.WriteLine("GetDoubleConst() is {0}", GetDoubleConst()); - return 1; - } - return 100; - } - } -} diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b14366/bug2.il b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b14366/bug2.il deleted file mode 100644 index 45954cc011e0..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b14366/bug2.il +++ /dev/null @@ -1,31 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly ILGEN_0xf14ee849 {} -.class ILGEN_0xf14ee849 -{ - .method static int32 Main() - { - .entrypoint - .maxstack 9 - ldc.i8 15 - ldc.i8 5 - div.un - ldc.i8 33 - mul - ldc.i8 5 - clt - pop - - ldc.i4 100 - ret - } - -} diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b14368/bug4.il b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b14368/bug4.il deleted file mode 100644 index bffa738c7028..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b14368/bug4.il +++ /dev/null @@ -1,27 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly ILGEN_0xd3a45436 {} -.class ILGEN_0xd3a45436 -{ - .method static int32 Main() - { - .entrypoint - .maxstack 17 - ldc.i4.4 - ldc.i4.1 - ldc.i4.m1 - mul.ovf.un - shr.un - ldc.i4 100 - add - ret - } -} diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b15539/simple.cs b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b15539/simple.cs deleted file mode 100644 index 647bc31556cb..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b15539/simple.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -internal struct VC -{ - public int x; - public int x2; - - public int x3; -} - - -internal class A -{ - public static int Main() - { - VC vc = new VC(); - vc.x = 5; - - return test(vc); - } - - public static int test(VC vc) - { - if (vc.x == 5) - { - Console.WriteLine("PASS"); - return 100; - } - - Console.WriteLine("FAIL"); - return 0; - } -} diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b17751/bug4.il b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b17751/bug4.il deleted file mode 100644 index bffa738c7028..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b17751/bug4.il +++ /dev/null @@ -1,27 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly ILGEN_0xd3a45436 {} -.class ILGEN_0xd3a45436 -{ - .method static int32 Main() - { - .entrypoint - .maxstack 17 - ldc.i4.4 - ldc.i4.1 - ldc.i4.m1 - mul.ovf.un - shr.un - ldc.i4 100 - add - ret - } -} diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b17904/test.il b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b17904/test.il deleted file mode 100644 index 6d6b4148acf7..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b17904/test.il +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - - - - - -// Metadata version: v1.0.1427 -.assembly extern mscorlib -{ -} -.assembly test -{ - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(bool, - // bool) = ( 01 00 00 01 00 00 ) - - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module test.exe -// MVID: {268B9244-26E3-4F41-AE49-5311347AFB4B} -.imagebase 0x00400000 -.subsystem 0x00000003 -.file alignment 512 -.corflags 0x00000001 -// Image base: 0x02E00000 - -// =============== CLASS MEMBERS DECLARATION =================== - -.class private sequential ansi sealed beforefieldinit Struct1 - extends [mscorlib]System.ValueType -{ - .field public int64 fld1 - .field public int64 fld2 - .field public int64 fld3 - .field public int64 fld4 - .field public int64 fld5 - .field public int64 fld6 - .field public int64 fld7 - .field public int64 fld8 - .field public int64 fld9 -} // end of class Struct1 - - -.class private auto ansi beforefieldinit MyTest - extends [mscorlib]System.Object -{ - .method public static valuetype Struct1 f(int32) cil managed - { - // Code size 14 (0xe) - .maxstack 4 - .locals init( valuetype Struct1 MYSTRUCT) - - ldarg.0 - IL_0001: ldc.i4.0 - IL_0002: bge.s IL_cont - ldloc MYSTRUCT - ret - IL_cont: ldarg.0 - ldc.i4.1 - sub - tail. - IL_0008: call valuetype Struct1 MyTest::f(int32) - IL_000d: ret - } // end of method MyTest::f - - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - // Code size 18 (0x12) - .maxstack 2 - ldc.i4 100 - IL_0002: call valuetype Struct1 MyTest::f(int32) - pop - IL_0007: ldstr "Pass!" - IL_000c: call void [System.Console]System.Console::WriteLine(string) - IL_0011: ldc.i4 100 ret - } // end of method MyTest::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 1 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method MyTest::.ctor - -} // end of class MyTest - - -// ============================================================= - - -//*********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file test.res diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b21015/test.cs b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b21015/test.cs deleted file mode 100644 index ecd8193b2be7..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b21015/test.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -struct T -{ - public string S; -#pragma warning disable 0414 - public string SomeOtherString; -#pragma warning restore 0414 - - public T(string _S) - { - S = _S; - SomeOtherString = null; - } - - public string TheString - { - get - { - return (S != null ? S : ""); - } - } -} - -class Tester -{ - public static int Main() - { - T t1, t2; - - t1 = new T(); - t2 = new T("passed."); - - bar(t1); - bar(t2); - - return 100; - } - - public static void bar(T t) - { - Console.WriteLine(t.TheString); - } -} diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b22680/1.il b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b22680/1.il deleted file mode 100644 index 977ce83ef2ad..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b22680/1.il +++ /dev/null @@ -1,35 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly ILGEN_0x5f95bcd2 {} -.class ILGEN_0x5f95bcd2 { -.method static int32 Main() { -.entrypoint -.maxstack 21 -.zeroinit - .locals (unsigned int64 LOCAL_0x3,native int temp) - ldc.i8 0xb6c20baab1d28c3 - stloc LOCAL_0x3 -Start_Orphan_a_1d: - ldloc LOCAL_0x3 - conv.i1 - conv.u4 - ldc.r4 55.6 - ldc.i4 55 - conv.r4 - ceq - cgt - conv.i - stloc temp -End_Orphan_a_1d: -ldc.i4 100 - ret -} -} diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b27978/gcparaminreg.cs b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b27978/gcparaminreg.cs deleted file mode 100644 index 84c1fe4fc420..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b27978/gcparaminreg.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -// This test is intended to test using SSIs to report cases where -// the address of an SSI escapes the current function. -// Note that this probably needs to be modifies in msil to -// actually process the address of the local, rather than the local. - -using System; - -class test -{ - public static int Main() - { - int i = 0; - i += ParamInReg(); - return i + 97; - } - - public static int ParamInReg() - { - String strLoc = "Param"; - return ParamHelper(strLoc); - } - - public static int ParamHelper(String strParam) - { - return Func1(strParam); - } - - public static int Func1(String strParam) - { - return 3; - } -} - - - diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b27980/struct1.cs b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b27980/struct1.cs deleted file mode 100644 index e73ca5f3168a..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b27980/struct1.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -struct S -{ - public String str; -} - - -class Test -{ - public static void c(S s1) - { - GC.Collect(); - Console.WriteLine(s1.str); - GC.Collect(); - } - - public static int Main() - { - S sM; - - sM.str = "test"; - c(sM); - return 100; - } -} diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b28077/struct5_2.cs b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b28077/struct5_2.cs deleted file mode 100644 index ace49cf85524..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b28077/struct5_2.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -struct S -{ -#pragma warning disable 0414 - public String str2; -#pragma warning restore 0414 - public String str; -} - - -class Test -{ - public static void c(S s1, S s2, S s3, S s4) - { - Console.WriteLine(s1.str + s2.str + s3.str + s4.str); - } - - public static int Main() - { - S sM, sM2, sM3, sM4; - - sM.str = "test"; - sM2.str = "test2"; - sM3.str = "test3"; - sM4.str = "test4"; - sM.str2 = ""; - sM2.str2 = ""; - sM3.str2 = ""; - sM4.str2 = ""; - c(sM, sM2, sM3, sM4); - return 100; - } -} diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b28141/structret1_1.cs b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b28141/structret1_1.cs deleted file mode 100644 index 425c9130a943..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b28141/structret1_1.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -struct Pad -{ -#pragma warning disable 0414 - public double d1; - public double d2; - public double d3; - public double d4; - public double d5; - public double d6; - public double d7; - public double d8; - public double d9; - public double d10; - public double d11; - public double d12; - public double d13; - public double d14; - public double d15; - public double d16; - public double d17; - public double d18; - public double d19; - public double d20; - public double d21; - public double d22; - public double d23; - public double d24; - public double d25; - public double d26; - public double d27; - public double d28; - public double d29; - public double d30; -#pragma warning disable 0414 -} - -struct S -{ - public String str2; - public String str; - public Pad pad; - - public S(String s) - { - str = s; - str2 = s + str; - pad.d1 = - pad.d2 = - pad.d3 = - pad.d4 = - pad.d5 = - pad.d6 = - pad.d7 = - pad.d8 = - pad.d9 = - pad.d10 = - pad.d11 = - pad.d12 = - pad.d13 = - pad.d14 = - pad.d15 = - pad.d16 = - pad.d17 = - pad.d18 = - pad.d19 = - pad.d20 = - pad.d21 = - pad.d22 = - pad.d23 = - pad.d24 = - pad.d25 = - pad.d26 = - pad.d27 = - pad.d28 = - pad.d29 = - pad.d30 = 3.3; - } -} - - -class Test -{ - public static S c(S s1) - { - return (s1); - } - - public static int Main() - { - S sM = new S("test"); - - Console.WriteLine(c(sM)); - return 100; - } -} diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b28158/test.il b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b28158/test.il deleted file mode 100644 index e0034e7d2a8f..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b28158/test.il +++ /dev/null @@ -1,133888 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly test {} - - -.class private auto ansi beforefieldinit test - extends [mscorlib]System.Object -{ - .method public static int32 Main() cil managed - { - - .entrypoint - .try - { - - ldstr "Success" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Security.VerificationException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - IL_end: ldc.i4 100 - ret - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b29727/2.il b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b29727/2.il deleted file mode 100644 index 9fd68454c52a..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b29727/2.il +++ /dev/null @@ -1,96 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly ILGEN_0xb8267005 {} -.class ILGEN_0xb8267005 { - -.field static float64 field_0x2 -.method static int32 Main() { -.entrypoint -.maxstack 19 - - .locals (unsigned int64 LOCAL_0x0,int64 LOCAL_0x1,native int LOCAL_0x2,int64 LOCAL_0x3,unsigned int16 LOCAL_0x4,unsigned int16[] LOCAL_0x5,int32 LOCAL_0x6,object LOCAL_0x7,int16[] LOCAL_0x8,float64[] LOCAL_0x9,float64[] LOCAL_0xa) -//BEGIN INIT LOCALS -ldc.i8 0x3f2016c6e04397c0 -stloc LOCAL_0x0 -ldc.i8 0xc48d364daf72bb88 -stloc LOCAL_0x1 -ldc.i4 0x81398436 -stloc LOCAL_0x2 -newobj instance void [mscorlib]System.Object::.ctor() -stloc LOCAL_0x7 - -//END INIT LOCALS -ldc.r8 float64(0x3658f4d211e645cf) -stsfld float64 ILGEN_0xb8267005::field_0x2 - - -Start_Orphan_a_0: - ldloca LOCAL_0x7 -Start_Orphan_a_1: - ldc.i4 6 - Loop_0x0: //WHAT - ldloca LOCAL_0x0 - ldind.u8 - conv.i8 -Start_Orphan_b_b: - ldc.r4 float32(0xd5f6ccd2) - ldc.r4 float32(0x792eb395) - beq Branch_0x8 -ldc.i4 0x81398436 - br Branch_0x9 - Branch_0x8: -ldc.i4 0x81398436 - Branch_0x9: -ldc.i4 0x81398436 - bne.un Branch_0x6 - ldloc LOCAL_0x3 - br Branch_0x7 - Branch_0x6: - ldloc LOCAL_0x0 - Branch_0x7: -ldc.i4 0x81398436 -ldc.i4 0x81398436 - bgt Branch_0xe - ldsfld float64 ILGEN_0xb8267005::field_0x2 - br Branch_0xf - Branch_0xe: -ldc.r8 float64(0xd44708197df14375) - - Branch_0xf: - ldc.r4 float32(0xe2a11a95) - ldc.r4 float32(0xc9f53748) - bgt Branch_0x10 - ldsfld float64 ILGEN_0xb8267005::field_0x2 - br Branch_0x11 - Branch_0x10: - ldc.r4 float32(0x56b8f6cb) - Branch_0x11: -pop -pop -pop -End_Orphan_b_b: - conv.i2 - pop - ldc.i4 1 - sub - dup - brtrue Loop_0x0 - pop - Loop_0x1: // End of WHAT -End_Orphan_a_1: - newobj instance void [mscorlib]System.Object::.ctor() -stind.ref -End_Orphan_a_0: -ldc.i4 100 - ret -} - -} diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V2.0-Beta2/b309576/bug2.il b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V2.0-Beta2/b309576/bug2.il deleted file mode 100644 index 70b4c2fafeb9..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V2.0-Beta2/b309576/bug2.il +++ /dev/null @@ -1,542 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - -.assembly Test1 {} -.assembly extern mscorlib{auto} -.class FullProof { -.method static int32 Test() { -.maxstack 500 -IL_1: ldc.i4 -2147483648 //i -IL_2: ldc.i4 -2147483648 //ii -IL_3: nop //ii -IL_4: rem.un //i -IL_5: ldc.r4 55.5 //ri -IL_6: ldc.r8 -0.0 //rri -IL_7: pop //ri -IL_8: conv.ovf.i8 //Ii -IL_9: ldnull //oIi -IL_10: nop //oIi -IL_11: pop //Ii -IL_12: conv.i2 //ii -IL_13: ldc.r8 -0.0 //rii -IL_14: nop //rii -IL_15: conv.ovf.i1.un //iii -IL_16: nop //iii -IL_17: sub.ovf //ii -IL_18: ldc.r8 -0.0 //rii -IL_19: ldc.r4 55.5 //rrii -IL_20: pop //rii -IL_21: conv.ovf.u8.un //Iii -IL_22: ldc.i8 100 //IIii -IL_23: beq IL_336 //ii -IL_24: clt //i -IL_25: ldc.i4.s 1 //ii -IL_26: nop //ii -IL_27: conv.ovf.i8.un //Ii -IL_28: ldc.i4 0 //iIi -IL_29: conv.ovf.i8.un //IIi -IL_30: ldc.i4 -2147483648 //iIIi -IL_31: ldc.i4 0 //iiIIi -IL_32: ldc.i8 1 //IiiIIi -IL_33: pop //iiIIi -IL_34: and //iIIi -IL_35: ldc.i8 -9223372036854775808 //IiIIi -IL_36: ldc.i8 -9223372036854775808 //IIiIIi -IL_37: nop //IIiIIi -IL_38: beq IL_416 //iIIi -IL_39: shl //IIi -IL_40: nop //IIi -IL_41: clt //ii -IL_42: nop //ii -IL_43: ldc.i8 100 //Iii -IL_44: ldc.i8 -1 //IIii -IL_45: nop //IIii -IL_46: beq IL_336 //ii -IL_47: conv.u4 //ii -IL_48: ldc.i4.s 1 //iii -IL_49: nop //iii -IL_50: conv.u2 //iii -IL_51: ldc.i4 0 //iiii -IL_52: ldc.r8 3.402823E+38 //riiii -IL_53: nop //riiii -IL_54: conv.ovf.u8.un //Iiiii -IL_55: ldc.r8 -55.5 //rIiiii -IL_56: nop //rIiiii -IL_57: conv.ovf.u2 //iIiiii -IL_58: nop //iIiiii -IL_59: shl //Iiiii -IL_60: pop //iiii -IL_61: shr //iii -IL_62: ldc.i4.s 0 //iiii -IL_63: ldc.i4 -2147483648 //iiiii -IL_64: nop //iiiii -IL_65: add.ovf //iiii -IL_66: ldc.i4 2147483647 //iiiii -IL_67: div //iiii -IL_68: nop //iiii -IL_69: conv.u2 //iiii -IL_70: shr.un //iii -IL_71: ldc.i8 9223372036854775807 //Iiii -IL_72: ldc.i4 2147483647 //iIiii -IL_73: ldc.r8 -0.0 //riIiii -IL_74: ldc.r8 55.5 //rriIiii -IL_75: ldc.i4.s 1 //irriIiii -IL_76: ldc.i4 100 //iirriIiii -IL_77: nop //iirriIiii -IL_78: beq IL_93 //rriIiii -IL_79: ceq //iiIiii -IL_80: shr.un //iIiii -IL_81: ldc.i8 1 //IiIiii -IL_82: nop //IiIiii -IL_83: conv.r4 //riIiii -IL_84: ldc.r8 -55.5 //rriIiii -IL_85: ldc.r8 55.5 //rrriIiii -IL_86: nop //rrriIiii -IL_87: div //rriIiii -IL_88: ldc.r4 55.5 //rrriIiii -IL_89: ldc.r4 -55.5 //rrrriIiii -IL_90: ldc.r8 3.402823E+38 //rrrrriIiii -IL_91: beq IL_94 //rrriIiii -IL_92: mul //rriIiii -IL_93: ldc.r4 3.402823E+38 //rrriIiii -IL_94: beq IL_95 //riIiii -IL_95: conv.u8 //IiIiii -IL_96: ldc.i8 -1 //IIiIiii -IL_97: nop //IIiIiii -IL_98: ldc.r8 -3.402823E+38 //rIIiIiii -IL_99: conv.i8 //IIIiIiii -IL_100: conv.ovf.u8.un //IIIiIiii -IL_101: sub //IIiIiii -IL_102: ldc.i8 100 //IIIiIiii -IL_103: pop //IIiIiii -IL_104: beq IL_139 //iIiii -IL_105: shr.un //Iiii -IL_106: ldc.i4 -2147483648 //iIiii -IL_107: ldc.i4 -1 //iiIiii -IL_108: clt //iIiii -IL_109: conv.r.un //rIiii -IL_110: ldc.r8 -0.0 //rrIiii -IL_111: ldc.i4.s 1 //irrIiii -IL_112: nop //irrIiii -IL_113: conv.r4 //rrrIiii -IL_114: rem //rrIiii -IL_115: beq IL_289 //Iiii -IL_116: conv.ovf.i4.un //iiii -IL_117: shl //iii -IL_118: shl //ii -IL_119: ldc.i4 -100 //iii -IL_120: pop //ii -IL_121: xor //i -IL_122: ldc.r4 0.0 //ri -IL_123: conv.r.un //ri -IL_124: newobj instance void [mscorlib]System.Object::.ctor() //ori -IL_125: pop //ri -IL_126: conv.r.un //ri -IL_127: nop //ri -IL_128: conv.u1 //ii -IL_129: ldc.i4 -1 //iii -IL_130: ldc.i4 -1 //iiii -IL_131: ldc.i4.s 1 //iiiii -IL_132: nop //iiiii -IL_133: cgt //iiii -IL_134: add //iii -IL_135: conv.ovf.i2 //iii -IL_136: ldc.i8 -1 //Iiii -IL_137: ldc.i4.s 0 //iIiii -IL_138: nop //iIiii -IL_139: pop //Iiii -IL_140: conv.i8 //Iiii -IL_141: conv.ovf.u8 //Iiii -IL_142: conv.i2 //iiii -IL_143: shl //iii -IL_144: ldc.i4 -2147483648 //iiii -IL_145: ldc.i8 -9223372036854775808 //Iiiii -IL_146: ldc.i8 1 //IIiiii -IL_147: cgt //iiiii -IL_148: conv.u2 //iiiii -IL_149: nop //iiiii -IL_150: cgt.un //iiii -IL_151: nop //iiii -IL_152: ldc.i4 -100 //iiiii -IL_153: ldc.i4 -100 //iiiiii -IL_154: div.un //iiiii -IL_155: ldc.i4.s 0 //iiiiii -IL_156: ldc.i4 -1 //iiiiiii -IL_157: shr.un //iiiiii -IL_158: rem //iiiii -IL_159: ldnull //oiiiii -IL_160: ldc.i8 100 //Ioiiiii -IL_161: conv.ovf.u8.un //Ioiiiii -IL_162: ldc.r4 55.5 //rIoiiiii -IL_163: ldc.i8 -9223372036854775808 //IrIoiiiii -IL_164: pop //rIoiiiii -IL_165: conv.ovf.u8 //IIoiiiii -IL_166: beq IL_167 //oiiiii -IL_167: pop //iiiii -IL_168: pop //iiii -IL_169: xor //iii -IL_170: sub.ovf.un //ii -IL_171: ldc.r4 -3.402823E+38 //rii -IL_172: conv.r.un //rii -IL_173: ldc.i4 -100 //irii -IL_174: ldc.i4 0 //iirii -IL_175: shr //irii -IL_176: conv.r.un //rrii -IL_177: mul //rii -IL_178: conv.ovf.u4 //iii -IL_179: nop //iii -IL_180: ldc.i8 100 //Iiii -IL_181: conv.ovf.i1 //iiii -IL_182: sub.ovf //iii -IL_183: ldc.i8 -1 //Iiii -IL_184: ldc.i8 0 //IIiii -IL_185: mul //Iiii -IL_186: ldc.i8 0 //IIiii -IL_187: ldc.r4 55.5 //rIIiii -IL_188: pop //IIiii -IL_189: beq IL_315 //iii -IL_190: mul.ovf //ii -IL_191: ldc.i8 0 //Iii -IL_192: nop //Iii -IL_193: conv.ovf.i1 //iii -IL_194: div //ii -IL_195: add.ovf.un //i -IL_196: ldc.r4 -0.0 //ri -IL_197: conv.r4 //ri -IL_198: conv.r.un //ri -IL_199: ldc.r8 55.5 //rri -IL_200: nop //rri -IL_201: clt.un //ii -IL_202: ldc.i4 100 //iii -IL_203: pop //ii -IL_204: ldc.i4 0 //iii -IL_205: shr //ii -IL_206: ldc.i8 0 //Iii -IL_207: nop //Iii -IL_208: conv.ovf.i8.un //Iii -IL_209: ldc.i4 -1 //iIii -IL_210: shr //Iii -IL_211: nop //Iii -IL_212: pop //ii -IL_213: ldc.i4.s 0 //iii -IL_214: conv.ovf.i8 //Iii -IL_215: conv.ovf.u1.un //iii -IL_216: ldc.i4 -1 //iiii -IL_217: ldc.r4 -0.0 //riiii -IL_218: conv.r.un //riiii -IL_219: conv.ovf.u2.un //iiiii -IL_220: nop //iiiii -IL_221: clt //iiii -IL_222: conv.ovf.u8 //Iiii -IL_223: ldc.i8 0 //IIiii -IL_224: clt.un //iiii -IL_225: nop //iiii -IL_226: sub.ovf.un //iii -IL_227: nop //iii -IL_228: ldc.r4 0.0 //riii -IL_229: ldc.r8 -3.402823E+38 //rriii -IL_230: nop //rriii -IL_231: conv.r8 //rriii -IL_232: div //riii -IL_233: ldc.i8 100 //Iriii -IL_234: nop //Iriii -IL_235: conv.r4 //rriii -IL_236: add //riii -IL_237: ldc.i8 9223372036854775807 //Iriii -IL_238: ldc.i4 -100 //iIriii -IL_239: ldc.i8 9223372036854775807 //IiIriii -IL_240: ldc.i8 1 //IIiIriii -IL_241: nop //IIiIriii -IL_242: clt //iiIriii -IL_243: mul.ovf.un //iIriii -IL_244: shr //Iriii -IL_245: pop //riii -IL_246: pop //iii -IL_247: shr //ii -IL_248: ldc.i4 0 //iii -IL_249: mul.ovf //ii -IL_250: ldc.i4 0 //iii -IL_251: nop //iii -IL_252: conv.ovf.i8 //Iii -IL_253: conv.ovf.u8.un //Iii -IL_254: ldc.i8 -1 //IIii -IL_255: nop //IIii -IL_256: conv.i8 //IIii -IL_257: ldc.i8 -9223372036854775808 //IIIii -IL_258: ldc.i8 9223372036854775807 //IIIIii -IL_259: nop //IIIIii -IL_260: mul //IIIii -IL_261: nop //IIIii -IL_262: pop //IIii -IL_263: mul //Iii -IL_264: ldc.i4.s 0 //iIii -IL_265: ldc.i4.s 0 //iiIii -IL_266: and //iIii -IL_267: ldnull //oiIii -IL_268: ldnull //ooiIii -IL_269: newobj instance void [mscorlib]System.Object::.ctor() //oooiIii -IL_270: nop //oooiIii -IL_271: pop //ooiIii -IL_272: pop //oiIii -IL_273: pop //iIii -IL_274: conv.ovf.u2.un //iIii -IL_275: conv.r8 //rIii -IL_276: conv.ovf.i8.un //IIii -IL_277: ldc.i4 100 //iIIii -IL_278: ldc.r8 -3.402823E+38 //riIIii -IL_279: ldc.i4 -2147483648 //iriIIii -IL_280: ldc.i4 100 //iiriIIii -IL_281: nop //iiriIIii -IL_282: beq IL_285 //riIIii -IL_283: conv.r4 //riIIii -IL_284: nop //riIIii -IL_285: pop //iIIii -IL_286: pop //IIii -IL_287: cgt //iii -IL_288: ldc.i8 -9223372036854775808 //Iiii -IL_289: conv.i2 //iiii -IL_290: ldc.i4 -2147483648 //iiiii -IL_291: ldc.i4.s 1 //iiiiii -IL_292: cgt.un //iiiii -IL_293: ldc.r4 -55.5 //riiiii -IL_294: nop //riiiii -IL_295: ldc.i4 -1 //iriiiii -IL_296: conv.r8 //rriiiii -IL_297: nop //rriiiii -IL_298: nop //rriiiii -IL_299: beq IL_334 //iiiii -IL_300: conv.u1 //iiiii -IL_301: nop //iiiii -IL_302: conv.ovf.u1.un //iiiii -IL_303: nop //iiiii -IL_304: cgt.un //iiii -IL_305: ldc.i4 -100 //iiiii -IL_306: ldc.i4 -1 //iiiiii -IL_307: ldc.i8 0 //Iiiiiii -IL_308: nop //Iiiiiii -IL_309: pop //iiiiii -IL_310: pop //iiiii -IL_311: pop //iiii -IL_312: div.un //iii -IL_313: div //ii -IL_314: ldc.i4 -2147483648 //iii -IL_315: ldc.i4 100 //iiii -IL_316: ldc.i4 100 //iiiii -IL_317: nop //iiiii -IL_318: sub //iiii -IL_319: ldnull //oiiii -IL_320: ldc.i8 -100 //Ioiiii -IL_321: nop //Ioiiii -IL_322: pop //oiiii -IL_323: pop //iiii -IL_324: conv.i1 //iiii -IL_325: ldc.r8 -3.402823E+38 //riiii -IL_326: conv.r.un //riiii -IL_327: nop //riiii -IL_328: pop //iiii -IL_329: ldc.i4 0 //iiiii -IL_330: ldc.r4 -0.0 //riiiii -IL_331: nop //riiiii -IL_332: pop //iiiii -IL_333: nop //iiiii -IL_334: pop //iiii -IL_335: beq IL_336 //ii -IL_336: beq IL_337 // -IL_337: ldc.i4 2147483647 //i -IL_338: ldc.i8 -100 //Ii -IL_339: ldc.i4 -1 //iIi -IL_340: ldc.i4.s 1 //iiIi -IL_341: nop //iiIi -IL_342: mul.ovf.un //iIi -IL_343: shr.un //Ii -IL_344: ldc.i8 1 //IIi -IL_345: nop //IIi -IL_346: pop //Ii -IL_347: conv.ovf.i8 //Ii -IL_348: ldc.i8 0 //IIi -IL_349: ldc.i4 -100 //iIIi -IL_350: shr //IIi -IL_351: conv.ovf.u8.un //IIi -IL_352: ldc.i8 1 //IIIi -IL_353: conv.ovf.u8.un //IIIi -IL_354: ldc.i8 100 //IIIIi -IL_355: ldc.i8 1 //IIIIIi -IL_356: nop //IIIIIi -IL_357: beq IL_417 //IIIi -IL_358: pop //IIi -IL_359: sub //Ii -IL_360: conv.ovf.i8.un //Ii -IL_361: ldc.i8 100 //IIi -IL_362: nop //IIi -IL_363: conv.ovf.u8.un //IIi -IL_364: pop //Ii -IL_365: ldc.i8 -100 //IIi -IL_366: ldc.r8 0.0 //rIIi -IL_367: ldc.r8 0.0 //rrIIi -IL_368: beq IL_499 //IIi -IL_369: conv.ovf.u8.un //IIi -IL_370: ldc.i4 0 //iIIi -IL_371: ldc.i4 0 //iiIIi -IL_372: shl //iIIi -IL_373: ldc.i8 -1 //IiIIi -IL_374: conv.ovf.i8 //IiIIi -IL_375: ldc.i4 0 //iIiIIi -IL_376: shr //IiIIi -IL_377: ldc.i4.s 1 //iIiIIi -IL_378: ldc.i4.s 1 //iiIiIIi -IL_379: ldc.i8 1 //IiiIiIIi -IL_380: ldc.i8 -9223372036854775808 //IIiiIiIIi -IL_381: nop //IIiiIiIIi -IL_382: beq IL_383 //iiIiIIi -IL_383: cgt.un //iIiIIi -IL_384: nop //iIiIIi -IL_385: conv.i8 //IIiIIi -IL_386: ldc.i4 -1 //iIIiIIi -IL_387: ldc.i4 -1 //iiIIiIIi -IL_388: conv.r.un //riIIiIIi -IL_389: nop //riIIiIIi -IL_390: conv.ovf.i4 //iiIIiIIi -IL_391: ldc.r4 -3.402823E+38 //riiIIiIIi -IL_392: nop //riiIIiIIi -IL_393: pop //iiIIiIIi -IL_394: nop //iiIIiIIi -IL_395: sub.ovf //iIIiIIi -IL_396: ldc.r4 0.0 //riIIiIIi -IL_397: nop //riIIiIIi -IL_398: ldc.r4 0.0 //rriIIiIIi -IL_399: nop //rriIIiIIi -IL_400: beq IL_410 //iIIiIIi -IL_401: conv.u1 //iIIiIIi -IL_402: shl //IIiIIi -IL_403: ldc.i4 -100 //iIIiIIi -IL_404: ldc.i8 9223372036854775807 //IiIIiIIi -IL_405: conv.ovf.i8 //IiIIiIIi -IL_406: ldc.i4 2147483647 //iIiIIiIIi -IL_407: pop //IiIIiIIi -IL_408: conv.u2 //iiIIiIIi -IL_409: shr //iIIiIIi -IL_410: ldc.i4 -1 //iiIIiIIi -IL_411: ldc.i8 9223372036854775807 //IiiIIiIIi -IL_412: conv.ovf.i2 //iiiIIiIIi -IL_413: shr //iiIIiIIi -IL_414: beq IL_415 //IIiIIi -IL_415: beq IL_416 //iIIi -IL_416: conv.ovf.i8 //IIIi -IL_417: ldc.i8 1 //IIIIi -IL_418: ldc.i8 0 //IIIIIi -IL_419: nop //IIIIIi -IL_420: conv.u4 //iIIIIi -IL_421: shr.un //IIIIi -IL_422: ldc.i8 9223372036854775807 //IIIIIi -IL_423: sub //IIIIi -IL_424: ldc.i8 -100 //IIIIIi -IL_425: ldc.i8 0 //IIIIIIi -IL_426: nop //IIIIIIi -IL_427: beq IL_492 //IIIIi -IL_428: conv.ovf.u8.un //IIIIi -IL_429: ldc.r8 -55.5 //rIIIIi -IL_430: ldc.r8 -0.0 //rrIIIIi -IL_431: nop //rrIIIIi -IL_432: nop //rrIIIIi -IL_433: sub //rIIIIi -IL_434: conv.r4 //rIIIIi -IL_435: nop //rIIIIi -IL_436: ldc.r4 55.5 //rrIIIIi -IL_437: ldc.r4 55.5 //rrrIIIIi -IL_438: ldc.r8 0.0 //rrrrIIIIi -IL_439: nop //rrrrIIIIi -IL_440: beq IL_457 //rrIIIIi -IL_441: conv.r8 //rrIIIIi -IL_442: ldc.r4 0.0 //rrrIIIIi -IL_443: newobj instance void [mscorlib]System.Object::.ctor() //orrrIIIIi -IL_444: nop //orrrIIIIi -IL_445: pop //rrrIIIIi -IL_446: conv.r8 //rrrIIIIi -IL_447: ldc.i4 2147483647 //irrrIIIIi -IL_448: pop //rrrIIIIi -IL_449: div //rrIIIIi -IL_450: nop //rrIIIIi -IL_451: pop //rIIIIi -IL_452: pop //IIIIi -IL_453: conv.ovf.u8 //IIIIi -IL_454: ldc.r8 -55.5 //rIIIIi -IL_455: ldc.r4 -0.0 //rrIIIIi -IL_456: nop //rrIIIIi -IL_457: add //rIIIIi -IL_458: ldc.i8 100 //IrIIIIi -IL_459: ldc.i8 100 //IIrIIIIi -IL_460: ldc.i8 -100 //IIIrIIIIi -IL_461: add //IIrIIIIi -IL_462: nop //IIrIIIIi -IL_463: mul //IrIIIIi -IL_464: ldc.i4.s 1 //iIrIIIIi -IL_465: ldc.i4 2147483647 //iiIrIIIIi -IL_466: sub.ovf.un //iIrIIIIi -IL_467: conv.ovf.u8.un //IIrIIIIi -IL_468: ldc.i4 -100 //iIIrIIIIi -IL_469: conv.ovf.u8 //IIIrIIIIi -IL_470: ldc.i8 100 //IIIIrIIIIi -IL_471: ldc.i4 2147483647 //iIIIIrIIIIi -IL_472: ldc.i4 -1 //iiIIIIrIIIIi -IL_473: ldc.i8 -1 //IiiIIIIrIIIIi -IL_474: pop //iiIIIIrIIIIi -IL_475: sub.ovf.un //iIIIIrIIIIi -IL_476: ldc.i4 0 //iiIIIIrIIIIi -IL_477: conv.ovf.u2 //iiIIIIrIIIIi -IL_478: newobj instance void [mscorlib]System.Object::.ctor() //oiiIIIIrIIIIi -IL_479: nop //oiiIIIIrIIIIi -IL_480: pop //iiIIIIrIIIIi -IL_481: nop //iiIIIIrIIIIi -IL_482: beq IL_483 //IIIIrIIIIi -IL_483: pop //IIIrIIIIi -IL_484: beq IL_486 //IrIIIIi -IL_485: conv.u8 //IrIIIIi -IL_486: ldc.i8 9223372036854775807 //IIrIIIIi -IL_487: beq IL_490 //rIIIIi -IL_488: conv.r.un //rIIIIi -IL_489: nop //rIIIIi -IL_490: pop //IIIIi -IL_491: conv.ovf.i8.un //IIIIi -IL_492: beq IL_499 //IIi -IL_493: ldc.r8 3.402823E+38 //rIIi -IL_494: ldnull //orIIi -IL_495: pop //rIIi -IL_496: ldc.r8 55.5 //rrIIi -IL_497: nop //rrIIi -IL_498: beq IL_499 //IIi -IL_499: beq IL_500 //i -IL_500: ret // -} - -.method public static int32 Main() -{ -.entrypoint -.maxstack 3 - .try - { - call int32 FullProof::Test() - pop - leave.s AfterEH - } - catch [mscorlib]System.Exception - { - call void [System.Console]System.Console::WriteLine(object) - leave.s AfterEH - } - -AfterEH: - - ldstr "PASS" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.s 100 - - ret -} -} diff --git a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V2.0-Beta2/b360587/repro.cs b/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V2.0-Beta2/b360587/repro.cs deleted file mode 100644 index 75ef7d0d597b..000000000000 --- a/src/coreclr/tests/src/JIT/Regression/VS-ia64-JIT/V2.0-Beta2/b360587/repro.cs +++ /dev/null @@ -1,315 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -public class MyDispose : IDisposable -{ - public int DisposeCounter = 0; - private bool disposed = false; - - public void Dispose() - { - disposed = true; - DisposeCounter++; - } - - public bool IsDisposed - { - get - { - return disposed; - } - set - { - disposed = value; - } - } -} - -public class Test -{ - - // OUT: - // TRUE if the object was DISPOSED - // FALSE if the object was NOT DISPOSED - public bool BrokenSwitch(int msg, MyDispose m) - { - bool result = true; - - switch (msg) - { - case 0: - using (m) - { - if (m.IsDisposed) - { - break; - } - - result = false; - } - break; - default: - break; - } - - return result; - } - - // OUT: - // TRUE if the object was DISPOSED - // FALSE if the object was NOT DISPOSED - public bool WorkingSwitch(int msg, MyDispose m) - { - bool result = true; - - switch (msg) - { - case 0: - using (m) - { - if (!m.IsDisposed) - { - result = false; - } - } - break; - default: - break; - } - - return result; - } - - - // OUT: - // TRUE if the object was DISPOSED - // FALSE if the object was NOT DISPOSED - public bool ReturnFromUsing(MyDispose m) - { - using (m) - { - if (!m.IsDisposed) - { - return false; - } - } - - return true; - } - - - // OUT: - // TRUE if the object was DISPOSED - // FALSE if the object was NOT DISPOSED - public bool GotoFromUsing(MyDispose m) - { - using (m) - { - if (!m.IsDisposed) - { - goto EXIT; - } - } - - return true; - - EXIT: - - return false; - } - - public int SwitchTests() - { - MyDispose m = new MyDispose(); - bool wasDisposed; - - // Called with object not disposed - m.DisposeCounter = 0; - - m.IsDisposed = false; - wasDisposed = BrokenSwitch(0, m); - - if (1 != m.DisposeCounter) - { - Console.WriteLine("SwitchTests1: MyDispose.Dispose() called too many times 1 != {0}", m.DisposeCounter); - return -1; - } - - m.DisposeCounter = 0; - m.IsDisposed = false; - wasDisposed = WorkingSwitch(0, m) || wasDisposed; - - if (1 != m.DisposeCounter) - { - Console.WriteLine("SwitchTests2: MyDispose.Dispose() called too many times 12 != {0}", m.DisposeCounter); - return -1; - } - if (wasDisposed) - { - // the object should not have been disposed entering - // these method calls - // if the object was disposed then there was an issue - Console.WriteLine("SwitchTests1: Object was Disposed upon entering the method call (in error)"); - return -2; - } - - - // called with object disposed - m.DisposeCounter = 0; - - m.IsDisposed = true; - wasDisposed = BrokenSwitch(0, m); - - if (1 != m.DisposeCounter) - { - Console.WriteLine("SwitchTests3: MyDispose.Dispose() called too many times 1 != {0}", m.DisposeCounter); - return -1; - } - - m.DisposeCounter = 0; - m.IsDisposed = true; - wasDisposed = WorkingSwitch(0, m) && wasDisposed; - - if (1 != m.DisposeCounter) - { - Console.WriteLine("SwitchTests4: MyDispose.Dispose() called too many times 1 != {0}", m.DisposeCounter); - return -1; - } - if (!wasDisposed) - { - // the object should have been disposed entering - // these method calls - // if the object was not disposed then there was an issue - Console.WriteLine("SwitchTests2: Object was not Disposed upon entering the method call (in error)"); - return -2; - } - - return 0; - } - - public int ReturnTests() - { - MyDispose m = new MyDispose(); - bool wasDisposed; - - // Called with object not disposed - m.DisposeCounter = 0; - m.IsDisposed = false; - wasDisposed = ReturnFromUsing(m); - - if (1 != m.DisposeCounter) - { - Console.WriteLine("ReturnTests1: MyDispose.Dispose() called too many times 1 != {0}", m.DisposeCounter); - return -1; - } - if (wasDisposed) - { - // the object should not have been disposed entering - // this method call - // if the object was disposed then there was an issue - Console.WriteLine("ReturnTests1: Object was Disposed upon entering the method call (in error)"); - return -2; - } - - // called with object disposed - m.DisposeCounter = 0; - m.IsDisposed = true; - wasDisposed = ReturnFromUsing(m); - - if (1 != m.DisposeCounter) - { - Console.WriteLine("ReturnTests2: MyDispose.Dispose() called too many times 1 != {0}", m.DisposeCounter); - return -1; - } - if (!wasDisposed) - { - // the object should have been disposed entering - // this method call - // if the object was not disposed then there was an issue - Console.WriteLine("ReturnTests2: Object was not Disposed upon entering the method call (in error)"); - return -2; - } - - return 0; - } - - public int GotoTests() - { - MyDispose m = new MyDispose(); - bool wasDisposed; - - // Called with object not disposed - m.DisposeCounter = 0; - m.IsDisposed = false; - wasDisposed = GotoFromUsing(m); - - if (1 != m.DisposeCounter) - { - Console.WriteLine("GotoTests1: MyDispose.Dispose() called too many times 1 != {0}", m.DisposeCounter); - return -1; - } - if (wasDisposed) - { - // the object should not have been disposed entering - // this method call - // if the object was disposed then there was an issue - Console.WriteLine("GotoTests1: Object was Disposed upon entering the method call (in error)"); - return -2; - } - - // called with object disposed - m.DisposeCounter = 0; - m.IsDisposed = true; - wasDisposed = GotoFromUsing(m); - - if (1 != m.DisposeCounter) - { - Console.WriteLine("GotoTests2: MyDispose.Dispose() called too many times 1 != {0}", m.DisposeCounter); - return -1; - } - if (!wasDisposed) - { - // the object should have been disposed entering - // this method call - // if the object was not disposed then there was an issue - Console.WriteLine("GotoTests2: Object was not Disposed upon entering the method call (in error)"); - return -2; - } - - - return 0; - } - - public static int Main() - { - Test t = new Test(); - int retVal = 0; - - // using in switch statements - retVal += t.SwitchTests(); - - // return from using - retVal += t.ReturnTests(); - - // goto out of a using - retVal += t.GotoTests(); - - if (0 == retVal) - { - Console.WriteLine("PASS"); - return 100; - } - else - { - Console.WriteLine("FAIL"); - return 0; - } - } -} - - - diff --git a/src/coreclr/tests/src/JIT/SIMD/Plane.cs b/src/coreclr/tests/src/JIT/SIMD/Plane.cs deleted file mode 100644 index 6cc9c4a07d24..000000000000 --- a/src/coreclr/tests/src/JIT/SIMD/Plane.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Numerics; - -class PlaneTest -{ - private const int Pass = 100; - private const int Fail = -1; - - public static int PlaneCreateFromVerticesTest() - { - int returnVal = Pass; - - Vector3 point1 = new Vector3(0.0f, 1.0f, 1.0f); - Vector3 point2 = new Vector3(0.0f, 0.0f, 1.0f); - Vector3 point3 = new Vector3(1.0f, 0.0f, 1.0f); - - Plane target = Plane.CreateFromVertices(point1, point2, point3); - Plane expected = new Plane(new Vector3(0, 0, 1), -1.0f); - if (!target.Equals(expected)) - { - returnVal = Fail; - } - return returnVal; - } - - static int Main() - { - return PlaneCreateFromVerticesTest(); - } -} diff --git a/src/coreclr/tests/src/JIT/SIMD/VectorArgs.cs b/src/coreclr/tests/src/JIT/SIMD/VectorArgs.cs deleted file mode 100644 index 4c4a07ab3eef..000000000000 --- a/src/coreclr/tests/src/JIT/SIMD/VectorArgs.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Numerics; - -internal class Color -{ - private Vector _rgb; - - public Color(float r, float g, float b) - { - float[] temp = new float[Vector.Count]; - temp[0] = r; temp[1] = g; temp[2] = b; - _rgb = new Vector(temp); - } - - public Color(Vector _rgb) - { this._rgb = _rgb; } - - public Color Change(float f) - { - Vector t = new Vector(f); - // t[3] = 0; - return new Color(t * _rgb); - } - - public Vector RGB { get { return _rgb; } } -} - -internal partial class VectorTest -{ - private static int VectorArgs() - { - const int Pass = 100; - const int Fail = -1; - - float[] temp = new float[Vector.Count]; - for (int i = 0; i < Vector.Count; i++) - { - temp[i] = 3 - i; - } - Vector rgb = new Vector(temp); - - float x = 2f; - Color c1 = new Color(rgb); - Color c2 = c1.Change(x); - - for (int i = 0; i < Vector.Count; i++) - { - // Round to integer for comparison. - if (((int)c2.RGB[i]) != (3 - i) * x) - { - return Fail; - } - } - - return Pass; - } - - private static int Main() - { - return VectorArgs(); - } -} diff --git a/src/coreclr/tests/src/JIT/SIMD/VectorArray.cs b/src/coreclr/tests/src/JIT/SIMD/VectorArray.cs deleted file mode 100644 index 9d1417af8d1b..000000000000 --- a/src/coreclr/tests/src/JIT/SIMD/VectorArray.cs +++ /dev/null @@ -1,206 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Numerics; - - -internal partial class VectorTest -{ - private const int Pass = 100; - private const int Fail = -1; - - private class VectorArrayTest where T : struct, IComparable, IEquatable - { - private static void Move(Vector[] pos, ref Vector delta) - { - for (int i = 0; i < pos.Length; ++i) - pos[i] += delta; - } - - static public int VectorArray(T deltaValue) - { - const int Pass = 100; - const int Fail = -1; - - Vector[] v = new Vector[3]; - for (int i = 0; i < v.Length; ++i) - v[i] = new Vector(GetValueFromInt(i + 1)); - - Vector delta = new Vector(GetValueFromInt(1)); - Move(v, ref delta); - - for (int i = 0; i < v.Length; i++) - { - T checkValue = GetValueFromInt(i + 2); - for (int j = 0; j < Vector.Count; j++) - { - if (!(CheckValue(v[i][j], checkValue))) return Fail; - } - } - - return Pass; - } - } - - private class Vector4Test - { - private static void Move(Vector4[] pos, ref Vector4 delta) - { - for (int i = 0; i < pos.Length; ++i) - pos[i] += delta; - } - - static public int VectorArray(float deltaValue) - { - const int Pass = 100; - const int Fail = -1; - - Vector4[] v = new Vector4[3]; - for (int i = 0; i < 3; ++i) - v[i] = new Vector4(i + 1); - - Vector4 delta = new Vector4(1); - Move(v, ref delta); - - for (int i = 0; i < v.Length; i++) - { - float checkValue = (float)(i + 2); - if (!(CheckValue(v[i].X, checkValue))) return Fail; - if (!(CheckValue(v[i].Y, checkValue))) return Fail; - if (!(CheckValue(v[i].Z, checkValue))) return Fail; - if (!(CheckValue(v[i].W, checkValue))) return Fail; - } - - return Pass; - } - } - - private class Vector3Test - { - private static void Move(Vector3[] pos, ref Vector3 delta) - { - for (int i = 0; i < pos.Length; ++i) - pos[i] += delta; - } - - static public int VectorArray(float deltaValue) - { - const int Pass = 100; - const int Fail = -1; - - Vector3[] v = new Vector3[3]; - for (int i = 0; i < 3; ++i) - v[i] = new Vector3(i + 1); - - Vector3 delta = new Vector3(1); - Move(v, ref delta); - - for (int i = 0; i < v.Length; i++) - { - float checkValue = (float)(i + 2); - if (!(CheckValue(v[i].X, checkValue))) return Fail; - if (!(CheckValue(v[i].Y, checkValue))) return Fail; - if (!(CheckValue(v[i].Z, checkValue))) return Fail; - } - - return Pass; - } - } - - private class Vector2Test - { - private static void Move(Vector2[] pos, ref Vector2 delta) - { - for (int i = 0; i < pos.Length; ++i) - pos[i] += delta; - } - - static public int VectorArray(float deltaValue) - { - const int Pass = 100; - const int Fail = -1; - - Vector2[] v = new Vector2[3]; - for (int i = 0; i < 3; ++i) - v[i] = new Vector2(i + 1); - - Vector2 delta = new Vector2(1); - Move(v, ref delta); - - for (int i = 0; i < v.Length; i++) - { - float checkValue = (float)(i + 2); - if (!(CheckValue(v[i].X, checkValue))) return Fail; - if (!(CheckValue(v[i].Y, checkValue))) return Fail; - } - - return Pass; - } - } - - private static int Main() - { - int returnVal = Pass; - try - { - if (VectorArrayTest.VectorArray(1f) != Pass) returnVal = Fail; - if (VectorArrayTest.VectorArray(1d) != Pass) returnVal = Fail; - if (VectorArrayTest.VectorArray(1) != Pass) returnVal = Fail; - if (VectorArrayTest.VectorArray(1L) != Pass) returnVal = Fail; - if (Vector4Test.VectorArray(1f) != Pass) returnVal = Fail; - if (Vector3Test.VectorArray(1f) != Pass) returnVal = Fail; - if (Vector2Test.VectorArray(1f) != Pass) returnVal = Fail; - if (VectorArrayTest.VectorArray(1) != Pass) returnVal = Fail; - if (VectorArrayTest.VectorArray(1) != Pass) returnVal = Fail; - if (VectorArrayTest.VectorArray(1) != Pass) returnVal = Fail; - if (VectorArrayTest.VectorArray(1) != Pass) returnVal = Fail; - if (VectorArrayTest.VectorArray(1) != Pass) returnVal = Fail; - if (VectorArrayTest.VectorArray(1ul) != Pass) returnVal = Fail; - - JitLog jitLog = new JitLog(); - if (!jitLog.Check("get_Item", "Single")) returnVal = Fail; - if (!jitLog.Check("System.Numerics.Vector`1[Single][System.Single]:.ctor(float)")) returnVal = Fail; - if (!jitLog.Check("get_Item", "Double")) returnVal = Fail; - if (!jitLog.Check("System.Numerics.Vector`1[Double][System.Double]:.ctor(double)")) returnVal = Fail; - if (!jitLog.Check("get_Item", "Int32")) returnVal = Fail; - if (!jitLog.Check("System.Numerics.Vector`1[Int32][System.Int32]:.ctor(int)")) returnVal = Fail; - if (!jitLog.Check("get_Item", "Int64")) returnVal = Fail; - if (!jitLog.Check("System.Numerics.Vector`1[Int64][System.Int64]:.ctor(long)")) returnVal = Fail; - if (!jitLog.Check("System.Numerics.Vector4:.ctor(float)")) returnVal = Fail; - if (!jitLog.Check("System.Numerics.Vector3:.ctor(float)")) returnVal = Fail; - if (!jitLog.Check("System.Numerics.Vector2:.ctor(float)")) returnVal = Fail; - if (!jitLog.Check("get_Item", "UInt16")) returnVal = Fail; - // We are not currently recognizing the Vector constructor. - if (!Vector.IsHardwareAccelerated) - if (!jitLog.Check("System.Numerics.Vector`1[UInt16][System.UInt16]:.ctor(char)")) returnVal = Fail; - if (!jitLog.Check("get_Item", "Byte")) returnVal = Fail; - // We are not currently recognizing the Vector constructor. - if (!Vector.IsHardwareAccelerated) - if (!jitLog.Check("System.Numerics.Vector`1[Byte][System.Byte]:.ctor(ubyte)")) returnVal = Fail; - if (!jitLog.Check("get_Item", "Int16")) returnVal = Fail; - // We are not currently recognizing the Vector constructor. - if (!Vector.IsHardwareAccelerated) - if (!jitLog.Check("System.Numerics.Vector`1[Int16][System.Int16]:.ctor(short)")) returnVal = Fail; - if (!jitLog.Check("get_Item", "SByte")) returnVal = Fail; - // We are not currently recognizing the Vector constructor. - if (!Vector.IsHardwareAccelerated) - if (!jitLog.Check("System.Numerics.Vector`1[SByte][System.SByte]:.ctor(byte)")) returnVal = Fail; - if (!jitLog.Check("get_Item", "UInt32")) returnVal = Fail; - if (!jitLog.Check("System.Numerics.Vector`1[UInt32][System.UInt32]:.ctor(int)")) returnVal = Fail; - if (!jitLog.Check("get_Item", "UInt64")) returnVal = Fail; - if (!jitLog.Check("System.Numerics.Vector`1[UInt64][System.UInt64]:.ctor(long)")) returnVal = Fail; - jitLog.Dispose(); - - } - catch (ArgumentException ex) - { - Console.WriteLine("Argument Exception was raised"); - Console.WriteLine(ex.StackTrace); - return Fail; - } - return returnVal; - } -} diff --git a/src/coreclr/tests/src/JIT/SIMD/VectorUnused.cs b/src/coreclr/tests/src/JIT/SIMD/VectorUnused.cs deleted file mode 100644 index 02bb73ddf1a1..000000000000 --- a/src/coreclr/tests/src/JIT/SIMD/VectorUnused.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -// The Rationalizer was not correctly handling a case of an unused SIMD expression -// involving a localVar or temporary value, where the SIMD expression is returning a non-SIMD -// value, and the expression is sufficiently complex (e.g. a call to vector * scalar which is -// inlined but not an intrinsic). - -using System; -using System.Numerics; - -internal partial class VectorTest -{ - private const int Pass = 100; - private const int Fail = -1; - - private class VectorUnusedTest where T : struct, IComparable, IEquatable - { - public static int VectorUnused(T t1, T t2) - { - Vector v1 = new Vector(t1); - v1.Equals(Vector.One * t2); - return Pass; - } - } - - private class Vector4Test - { - public static int VectorUnused() - { - Vector4 v1 = new Vector4(3f); - Vector4.Dot(default(Vector4) * 2f, Vector4.One); - Vector4.Dot(v1, Vector4.One * 2f); - v1.Equals(Vector4.One * 3f); - return Pass; - } - } - - private class Vector3Test - { - public static int VectorUnused() - { - Vector3 v1 = new Vector3(3f); - Vector3.Dot(default(Vector3) * 2f, Vector3.One); - Vector3.Dot(v1, Vector3.One * 2f); - v1.Equals(Vector3.One * 3f); - return Pass; - } - } - - private class Vector2Test - { - public static int VectorUnused() - { - Vector2 v1 = new Vector2(3f); - Vector2.Dot(default(Vector2) * 2f, Vector2.One); - Vector2.Dot(v1, Vector2.One * 2f); - v1.Equals(Vector2.One * 3f); - return Pass; - } - } - - private static int Main() - { - int returnVal = Pass; - - if (VectorUnusedTest.VectorUnused(3f, 2f) != Pass) returnVal = Fail; - if (VectorUnusedTest.VectorUnused(3, 2) != Pass) returnVal = Fail; - if (VectorUnusedTest.VectorUnused(3, 2) != Pass) returnVal = Fail; - if (VectorUnusedTest.VectorUnused(3, 2) != Pass) returnVal = Fail; - if (VectorUnusedTest.VectorUnused(3, 2) != Pass) returnVal = Fail; - if (VectorUnusedTest.VectorUnused(3, 2) != Pass) returnVal = Fail; - if (VectorUnusedTest.VectorUnused(3, 2) != Pass) returnVal = Fail; - if (VectorUnusedTest.VectorUnused(3, 2) != Pass) returnVal = Fail; - if (VectorUnusedTest.VectorUnused(3, 2) != Pass) returnVal = Fail; - if (VectorUnusedTest.VectorUnused(3, 2) != Pass) returnVal = Fail; - if (Vector4Test.VectorUnused() != Pass) returnVal = Fail; - if (Vector3Test.VectorUnused() != Pass) returnVal = Fail; - if (Vector2Test.VectorUnused() != Pass) returnVal = Fail; - return returnVal; - } -} diff --git a/src/coreclr/tests/src/JIT/Stress/ABI/Program.cs b/src/coreclr/tests/src/JIT/Stress/ABI/Program.cs deleted file mode 100644 index a9fbe0af64b2..000000000000 --- a/src/coreclr/tests/src/JIT/Stress/ABI/Program.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Numerics; -using System.Reflection; -using System.Reflection.Emit; -using System.Runtime.InteropServices; -using System.Runtime.InteropServices.ComTypes; -using System.Runtime.Intrinsics; -using System.Text; - -namespace ABIStress -{ - internal partial class Program - { - private static int Main(string[] args) - { - static void Usage() - { - Console.WriteLine("Usage: [--verbose] [--caller-index ] [--num-calls ] [--tailcalls] [--pinvokes] [--instantiatingstubs] [--unboxingstubs] [--sharedgenericunboxingstubs] [--max-params ] [--no-ctrlc-summary]"); - Console.WriteLine("Either --caller-index or --num-calls must be specified."); - Console.WriteLine("Example: --num-calls 100"); - Console.WriteLine(" Stress first 100 tailcalls and pinvokes"); - Console.WriteLine("Example: --tailcalls --caller-index 37 --verbose"); - Console.WriteLine(" Stress tailcaller 37, verbose output"); - Console.WriteLine("Example: --pinvokes --num-calls 1000"); - Console.WriteLine(" Stress first 1000 pinvokes"); - Console.WriteLine("Example: --tailcalls --num-calls 100 --max-params 2"); - Console.WriteLine(" Stress 100 tailcalls with either 1 or 2 parameters"); - } - - if (args.Contains("-help") || args.Contains("--help") || args.Contains("-h")) - { - Usage(); - return 1; - } - - Config.Verbose = args.Contains("--verbose"); - - if (args.Contains("--tailcalls")) - Config.StressModes |= StressModes.TailCalls; - if (args.Contains("--pinvokes")) - Config.StressModes |= StressModes.PInvokes; - if (args.Contains("--instantiatingstubs")) - Config.StressModes |= StressModes.InstantiatingStubs; - if (args.Contains("--unboxingstubs")) - Config.StressModes |= StressModes.UnboxingStubs; - if (args.Contains("--sharedgenericunboxingstubs")) - Config.StressModes |= StressModes.SharedGenericUnboxingStubs; - - if (Config.StressModes == StressModes.None) - Config.StressModes = StressModes.All; - - int callerIndex = -1; - int numCalls = -1; - int argIndex; - if ((argIndex = Array.IndexOf(args, "--caller-index")) != -1) - callerIndex = int.Parse(args[argIndex + 1]); - if ((argIndex = Array.IndexOf(args, "--num-calls")) != -1) - numCalls = int.Parse(args[argIndex + 1]); - if ((argIndex = Array.IndexOf(args, "--max-params")) != -1) - Config.MaxParams = int.Parse(args[argIndex + 1]); - - if ((callerIndex == -1) == (numCalls == -1)) - { - Usage(); - return 1; - } - - bool ctrlCSummary = !args.Contains("--no-ctrlc-summary"); - - if (Config.StressModes.HasFlag(StressModes.TailCalls)) - Console.WriteLine("Stressing tailcalls"); - if (Config.StressModes.HasFlag(StressModes.PInvokes)) - Console.WriteLine("Stressing pinvokes"); - if (Config.StressModes.HasFlag(StressModes.InstantiatingStubs)) - Console.WriteLine("Stressing instantiatingstubs"); - if (Config.StressModes.HasFlag(StressModes.UnboxingStubs)) - Console.WriteLine("Stressing unboxingstubs"); - if (Config.StressModes.HasFlag(StressModes.SharedGenericUnboxingStubs)) - Console.WriteLine("Stressing sharedgenericunboxingstubs"); - - using var tcel = new TailCallEventListener(); - - int mismatches = 0; - if (callerIndex != -1) - { - if (!DoCall(callerIndex)) - mismatches++; - } - else - { - bool abortLoop = false; - if (ctrlCSummary) - { - Console.CancelKeyPress += (sender, args) => - { - args.Cancel = true; - abortLoop = true; - }; - } - - for (int i = 0; i < numCalls && !abortLoop; i++) - { - if (!DoCall(i)) - mismatches++; - - if ((i + 1) % 50 == 0) - { - Console.Write("{0} callers done", i + 1); - if (Config.StressModes.HasFlag(StressModes.TailCalls)) - Console.Write($" ({tcel.NumSuccessfulTailCalls} successful tailcalls tested)"); - Console.WriteLine(); - } - } - } - - if (Config.StressModes.HasFlag(StressModes.TailCalls)) - { - Console.WriteLine("{0} tailcalls tested", tcel.NumSuccessfulTailCalls); - lock (tcel.FailureReasons) - { - if (tcel.FailureReasons.Count != 0) - { - int numRejected = tcel.FailureReasons.Values.Sum(); - Console.WriteLine("{0} rejected tailcalls. Breakdown:", numRejected); - foreach (var (reason, count) in tcel.FailureReasons.OrderByDescending(kvp => kvp.Value)) - Console.WriteLine("[{0:00.00}%]: {1}", count / (double)numRejected * 100, reason); - } - } - } - - Console.WriteLine($" Done with {mismatches} mismatches"); - return 100 + mismatches; - } - - private static bool DoCall(int index) - { - bool result = true; - if (Config.StressModes.HasFlag(StressModes.TailCalls)) - result &= DoTailCall(index); - if (Config.StressModes.HasFlag(StressModes.PInvokes)) - result &= DoPInvokes(index); - if (Config.StressModes.HasFlag(StressModes.UnboxingStubs)) - { - result &= DoStubCall(index, staticMethod: false, onValueType: true, typeGenericShape: GenericShape.NotGeneric, methodGenericShape: GenericShape.NotGeneric); - result &= DoStubCall(index, staticMethod: false, onValueType: true, typeGenericShape: GenericShape.NotGeneric, methodGenericShape: GenericShape.GenericOverReferenceType); - } - if (Config.StressModes.HasFlag(StressModes.SharedGenericUnboxingStubs)) - { - result &= DoStubCall(index, staticMethod: false, onValueType: true, typeGenericShape: GenericShape.GenericOverReferenceType, methodGenericShape: GenericShape.NotGeneric); - } - if (Config.StressModes.HasFlag(StressModes.InstantiatingStubs)) - { - result &= DoStubCall(index, staticMethod: false, onValueType: false, typeGenericShape: GenericShape.NotGeneric, methodGenericShape: GenericShape.GenericOverReferenceType); - result &= DoStubCall(index, staticMethod: true, onValueType: false, typeGenericShape: GenericShape.GenericOverReferenceType, methodGenericShape: GenericShape.NotGeneric); - result &= DoStubCall(index, staticMethod: true, onValueType: true, typeGenericShape: GenericShape.GenericOverReferenceType, methodGenericShape: GenericShape.NotGeneric); - result &= DoStubCall(index, staticMethod: true, onValueType: false, typeGenericShape: GenericShape.GenericOverValueType, methodGenericShape: GenericShape.GenericOverReferenceType); - result &= DoStubCall(index, staticMethod: true, onValueType: false, typeGenericShape: GenericShape.GenericOverReferenceType, methodGenericShape: GenericShape.GenericOverValueType); - } - return result; - } - - private static Callee CreateCallee(string name, TypeEx[] candidateParamTypes) - { - Random rand = new Random(GetSeed(name)); - List pms = RandomParameters(candidateParamTypes, rand); - var tc = new Callee(name, pms); - return tc; - } - - private static int GetSeed(string name) - => Fnv1a(BitConverter.GetBytes(Config.Seed).Concat(Encoding.UTF8.GetBytes(name)).ToArray()); - - private static int Fnv1a(byte[] data) - { - uint hash = 2166136261; - foreach (byte b in data) - { - hash ^= b; - hash *= 16777619; - } - - return (int)hash; - } - - private static List RandomParameters(TypeEx[] candidateParamTypes, Random rand) - { - List pms = new List(rand.Next(Config.MinParams, Config.MaxParams + 1)); - for (int j = 0; j < pms.Capacity; j++) - pms.Add(candidateParamTypes[rand.Next(candidateParamTypes.Length)]); - - return pms; - } - - private static List GenCallerToCalleeArgs(List callerParameters, List calleeParameters, Random rand) - { - List args = new List(calleeParameters.Count); - List candidates = new List(); - for (int j = 0; j < args.Capacity; j++) - { - TypeEx targetTy = calleeParameters[j]; - // Collect candidate args. For each parameter to the caller we might be able to just - // forward it or one of its fields. - candidates.Clear(); - CollectCandidateArgs(targetTy.Type, callerParameters, candidates); - - if (candidates.Count > 0) - { - args.Add(candidates[rand.Next(candidates.Count)]); - } - else - { - // No candidates to forward, so just create a new value here dynamically. - args.Add(new ConstantValue(targetTy, Gen.GenConstant(targetTy.Type, targetTy.Fields, rand))); - } - } - - return args; - } - - private static void CollectCandidateArgs(Type targetTy, List pms, List candidates) - { - for (int i = 0; i < pms.Count; i++) - { - TypeEx pm = pms[i]; - Value arg = null; - if (pm.Type == targetTy) - candidates.Add(arg = new ArgValue(pm, i)); - - if (pm.Fields == null) - continue; - - for (int j = 0; j < pm.Fields.Length; j++) - { - FieldInfo fi = pm.Fields[j]; - if (fi.FieldType != targetTy) - continue; - - arg ??= new ArgValue(pm, i); - candidates.Add(new FieldValue(arg, j)); - } - } - } - - private static (object callerResult, object calleeResult) InvokeCallerCallee( - DynamicMethod caller, List callerParameters, - DynamicMethod callee, List passedArgs, - Random rand) - { - object[] outerArgs = callerParameters.Select(p => Gen.GenConstant(p.Type, p.Fields, rand)).ToArray(); - object[] innerArgs = passedArgs.Select(v => v.Get(outerArgs)).ToArray(); - - if (Config.Verbose) - { - WriteSignature(caller); - WriteSignature(callee); - - Console.WriteLine("Invoking caller through reflection with args"); - for (int j = 0; j < outerArgs.Length; j++) - { - Console.Write($"arg{j}="); - DumpObject(outerArgs[j]); - } - } - - object callerResult = caller.Invoke(null, outerArgs); - - if (Config.Verbose) - { - Console.WriteLine("Invoking callee through reflection with args"); - for (int j = 0; j < innerArgs.Length; j++) - { - Console.Write($"arg{j}="); - DumpObject(innerArgs[j]); - } - } - object calleeResult = callee.Invoke(null, innerArgs); - - return (callerResult, calleeResult); - } - - private static void WriteSignature(MethodInfo mi) - { - string ns = typeof(S1P).Namespace; - // The normal output will include a bunch of namespaces before types which just clutter things. - Console.WriteLine(mi.ToString().Replace(ns + ".", "")); - } - - private static readonly MethodInfo s_writeString = typeof(Console).GetMethod("Write", new[] { typeof(string) }); - private static readonly MethodInfo s_writeLineString = typeof(Console).GetMethod("WriteLine", new[] { typeof(string) }); - private static readonly MethodInfo s_dumpValue = typeof(Program).GetMethod("DumpValue", BindingFlags.NonPublic | BindingFlags.Static); - - private static void DumpObject(object o) - { - TypeEx ty = new TypeEx(o.GetType()); - if (ty.Fields != null) - { - Console.WriteLine(); - foreach (FieldInfo field in ty.Fields) - Console.WriteLine(" {0}={1}", field.Name, field.GetValue(o)); - - return; - } - - Console.WriteLine(o); - } - - private static void DumpValue(T value) - { - DumpObject(value); - } - - // Dumps the value on the top of the stack, consuming the value. - private static void EmitDumpValue(ILGenerator g, Type ty) - { - MethodInfo instantiated = s_dumpValue.MakeGenericMethod(ty); - g.Emit(OpCodes.Call, instantiated); - } - - public static void EmitDumpValues(string listName, ILGenerator g, IEnumerable values) - { - g.Emit(OpCodes.Ldstr, $"{listName}:"); - g.Emit(OpCodes.Call, s_writeLineString); - int index = 0; - foreach (Value v in values) - { - g.Emit(OpCodes.Ldstr, $"arg{index}="); - g.Emit(OpCodes.Call, s_writeString); - - v.Emit(g); - EmitDumpValue(g, v.Type.Type); - index++; - } - } - - private static readonly TypeEx[] s_allTypes = - new[] - { - typeof(byte), typeof(short), typeof(int), typeof(long), - typeof(float), typeof(double), - typeof(Vector), typeof(Vector128), typeof(Vector256), - typeof(S1P), typeof(S2P), typeof(S2U), typeof(S3U), - typeof(S4P), typeof(S4U), typeof(S5U), typeof(S6U), - typeof(S7U), typeof(S8P), typeof(S8U), typeof(S9U), - typeof(S10U), typeof(S11U), typeof(S12U), typeof(S13U), - typeof(S14U), typeof(S15U), typeof(S16U), typeof(S17U), - typeof(S31U), typeof(S32U), - typeof(Hfa1), typeof(Hfa2), - }.Select(t => new TypeEx(t)).ToArray(); - - private static readonly IAbi s_abi = SelectAbi(); - - public static IAbi Abi => s_abi; - - private static readonly TypeEx[] s_tailCalleeCandidateArgTypes = - s_abi.TailCalleeCandidateArgTypes.Select(t => new TypeEx(t)).ToArray(); - - // We cannot marshal generic types so we cannot just use all types for pinvokees. - // This can be relaxed once https://github.com/dotnet/coreclr/pull/23899 is merged. - private static readonly TypeEx[] s_pinvokeeCandidateArgTypes = - new[] - { - typeof(byte), typeof(short), typeof(int), typeof(long), - typeof(float), typeof(double), - typeof(S1P), typeof(S2P), typeof(S2U), typeof(S3U), - typeof(S4P), typeof(S4U), typeof(S5U), typeof(S6U), - typeof(S7U), typeof(S8P), typeof(S8U), typeof(S9U), - typeof(S10U), typeof(S11U), typeof(S12U), typeof(S13U), - typeof(S14U), typeof(S15U), typeof(S16U), typeof(S17U), - typeof(S31U), typeof(S32U), - typeof(Hfa1), typeof(Hfa2), - }.Select(t => new TypeEx(t)).ToArray(); - - private static IAbi SelectAbi() - { - Console.WriteLine("OSVersion: {0}", Environment.OSVersion); - Console.WriteLine("OSArchitecture: {0}", RuntimeInformation.OSArchitecture); - Console.WriteLine("ProcessArchitecture: {0}", RuntimeInformation.ProcessArchitecture); - - if (Environment.OSVersion.Platform == PlatformID.Win32NT) - { - if (IntPtr.Size == 8) - { - Console.WriteLine("Selecting win64 ABI"); - return new Win64Abi(); - } - - Console.WriteLine("Selecting win86 ABI"); - return new Win86Abi(); - } - - if (Environment.OSVersion.Platform == PlatformID.Unix) - { - if (RuntimeInformation.ProcessArchitecture == Architecture.Arm64) - { - Console.WriteLine("Selecting arm64 ABI."); - return new Arm64Abi(); - } - if (RuntimeInformation.ProcessArchitecture == Architecture.Arm) - { - Console.WriteLine("Selecting armhf ABI."); - return new Arm32Abi(); - } - - Trace.Assert(RuntimeInformation.ProcessArchitecture == Architecture.X64); - Console.WriteLine("Selecting SysV ABI"); - return new SysVAbi(); - } - - throw new NotSupportedException($"Platform {Environment.OSVersion.Platform} is not supported"); - } - } -} diff --git a/src/coreclr/tests/src/JIT/Stress/ABI/Types.cs b/src/coreclr/tests/src/JIT/Stress/ABI/Types.cs deleted file mode 100644 index ae4c118b9e01..000000000000 --- a/src/coreclr/tests/src/JIT/Stress/ABI/Types.cs +++ /dev/null @@ -1,85 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Linq; -using System.Reflection; -using System.Runtime.InteropServices; - -namespace ABIStress -{ - // This class wraps around a Type supplying easier access to the correct - // order of fields when constructing them. Reflection APIs do not give any - // guarantees around the order of fields when using Type.GetFields(), so - // this one makes sure we get everything correctly ordered and also caches - // the ctor we need to use. - internal class TypeEx - { - public Type Type { get; } - public int Size { get; } - public FieldInfo[] Fields { get; } - public ConstructorInfo Ctor { get; } - - public TypeEx(Type t) - { - Type = t; - // Marshal.SizeOf(Type) overload does not work for generic types so - // we use the workaround below. - Size = Marshal.SizeOf(Activator.CreateInstance(t)); - if (!t.IsOurStructType()) - return; - - Fields = Enumerable.Range(0, 10000).Select(i => t.GetField($"F{i}")).TakeWhile(fi => fi != null).ToArray(); - Ctor = t.GetConstructor(Fields.Select(f => f.FieldType).ToArray()); - } - } - - // These structs will be used in generated callers and callees. U suffix = - // unpromotable, P suffix = promotable by the JIT. Note that fields must be - // named Fi with i sequential. - public struct S1P { public byte F0; public S1P(byte f0) => F0 = f0; } - public struct S2P { public short F0; public S2P(short f0) => F0 = f0; } - public struct S2U { public byte F0, F1; public S2U(byte f0, byte f1) => (F0, F1) = (f0, f1); } - public struct S3U { public byte F0, F1, F2; public S3U(byte f0, byte f1, byte f2) => (F0, F1, F2) = (f0, f1, f2); } - public struct S4P { public int F0; public S4P(int f0) => F0 = f0; } - public struct S4U { public byte F0, F1, F2, F3; public S4U(byte f0, byte f1, byte f2, byte f3) => (F0, F1, F2, F3) = (f0, f1, f2, f3); } - public struct S5U { public byte F0, F1, F2, F3, F4; public S5U(byte f0, byte f1, byte f2, byte f3, byte f4) => (F0, F1, F2, F3, F4) = (f0, f1, f2, f3, f4); } - public struct S6U { public byte F0, F1, F2, F3, F4, F5; public S6U(byte f0, byte f1, byte f2, byte f3, byte f4, byte f5) => (F0, F1, F2, F3, F4, F5) = (f0, f1, f2, f3, f4, f5); } - public struct S7U { public byte F0, F1, F2, F3, F4, F5, F6; public S7U(byte f0, byte f1, byte f2, byte f3, byte f4, byte f5, byte f6) => (F0, F1, F2, F3, F4, F5, F6) = (f0, f1, f2, f3, f4, f5, f6); } - public struct S8P { public long F0; public S8P(long f0) => F0 = f0; } - public struct S8U { public byte F0, F1, F2, F3, F4, F5, F6, F7; public S8U(byte f0, byte f1, byte f2, byte f3, byte f4, byte f5, byte f6, byte f7) => (F0, F1, F2, F3, F4, F5, F6, F7) = (f0, f1, f2, f3, f4, f5, f6, f7); } - public struct S9U { public byte F0, F1, F2, F3, F4, F5, F6, F7, F8; public S9U(byte f0, byte f1, byte f2, byte f3, byte f4, byte f5, byte f6, byte f7, byte f8) => (F0, F1, F2, F3, F4, F5, F6, F7, F8) = (f0, f1, f2, f3, f4, f5, f6, f7, f8); } - public struct S10U { public byte F0, F1, F2, F3, F4, F5, F6, F7, F8, F9; public S10U(byte f0, byte f1, byte f2, byte f3, byte f4, byte f5, byte f6, byte f7, byte f8, byte f9) => (F0, F1, F2, F3, F4, F5, F6, F7, F8, F9) = (f0, f1, f2, f3, f4, f5, f6, f7, f8, f9); } - public struct S11U { public byte F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10; public S11U(byte f0, byte f1, byte f2, byte f3, byte f4, byte f5, byte f6, byte f7, byte f8, byte f9, byte f10) => (F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10) = (f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10); } - public struct S12U { public byte F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11; public S12U(byte f0, byte f1, byte f2, byte f3, byte f4, byte f5, byte f6, byte f7, byte f8, byte f9, byte f10, byte f11) => (F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11) = (f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11); } - public struct S13U { public byte F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12; public S13U(byte f0, byte f1, byte f2, byte f3, byte f4, byte f5, byte f6, byte f7, byte f8, byte f9, byte f10, byte f11, byte f12) => (F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12) = (f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12); } - public struct S14U { public byte F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13; public S14U(byte f0, byte f1, byte f2, byte f3, byte f4, byte f5, byte f6, byte f7, byte f8, byte f9, byte f10, byte f11, byte f12, byte f13) => (F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13) = (f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13); } - public struct S15U { public byte F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14; public S15U(byte f0, byte f1, byte f2, byte f3, byte f4, byte f5, byte f6, byte f7, byte f8, byte f9, byte f10, byte f11, byte f12, byte f13, byte f14) => (F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14) = (f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14); } - public struct S16U { public byte F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15; public S16U(byte f0, byte f1, byte f2, byte f3, byte f4, byte f5, byte f6, byte f7, byte f8, byte f9, byte f10, byte f11, byte f12, byte f13, byte f14, byte f15) => (F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15) = (f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15); } - public struct S17U { public byte F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16; public S17U(byte f0, byte f1, byte f2, byte f3, byte f4, byte f5, byte f6, byte f7, byte f8, byte f9, byte f10, byte f11, byte f12, byte f13, byte f14, byte f15, byte f16) => (F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16) = (f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16); } - public struct S31U { public byte F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, F25, F26, F27, F28, F29, F30; public S31U(byte f0, byte f1, byte f2, byte f3, byte f4, byte f5, byte f6, byte f7, byte f8, byte f9, byte f10, byte f11, byte f12, byte f13, byte f14, byte f15, byte f16, byte f17, byte f18, byte f19, byte f20, byte f21, byte f22, byte f23, byte f24, byte f25, byte f26, byte f27, byte f28, byte f29, byte f30) => (F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, F25, F26, F27, F28, F29, F30) = (f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, f25, f26, f27, f28, f29, f30); } - public struct S32U { public byte F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, F25, F26, F27, F28, F29, F30, F31; public S32U(byte f0, byte f1, byte f2, byte f3, byte f4, byte f5, byte f6, byte f7, byte f8, byte f9, byte f10, byte f11, byte f12, byte f13, byte f14, byte f15, byte f16, byte f17, byte f18, byte f19, byte f20, byte f21, byte f22, byte f23, byte f24, byte f25, byte f26, byte f27, byte f28, byte f29, byte f30, byte f31) => (F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, F25, F26, F27, F28, F29, F30, F31) = (f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, f25, f26, f27, f28, f29, f30, f31); } - public struct Hfa1 { public float F0, F1; public Hfa1(float f0, float f1) => (F0, F1) = (f0, f1); } - public struct Hfa2 { public double F0, F1, F2, F3; public Hfa2(double f0, double f1, double f2, double f3) => (F0, F1, F2, F3) = (f0, f1, f2, f3); } - - internal static class TypeExtensions - { - public static bool IsOurStructType(this Type t) - { - return - t == typeof(S1P) || t == typeof(S2P) || - t == typeof(S2U) || t == typeof(S3U) || - t == typeof(S4P) || t == typeof(S4U) || - t == typeof(S5U) || t == typeof(S6U) || - t == typeof(S7U) || t == typeof(S8P) || - t == typeof(S8U) || t == typeof(S9U) || - t == typeof(S10U) || t == typeof(S11U) || - t == typeof(S12U) || t == typeof(S13U) || - t == typeof(S14U) || t == typeof(S15U) || - t == typeof(S16U) || t == typeof(S17U) || - t == typeof(S31U) || t == typeof(S32U) || - t == typeof(Hfa1) || t == typeof(Hfa2); - } - } -} diff --git a/src/coreclr/tests/src/JIT/jit64/eh/Common/common.cs b/src/coreclr/tests/src/JIT/jit64/eh/Common/common.cs deleted file mode 100644 index c3ceec0c466e..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/eh/Common/common.cs +++ /dev/null @@ -1,280 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// Throw in catch handler - -using System; -using System.IO; - -namespace TestUtil -{ - - // This class implements a string writer that writes to a string buffer and a - // given text writer, which allows echoing the written string if stdout is - // specified as the text writer. - - public class StringRecorder : StringWriter - { - private TextWriter outStream; - private int outLimit; // maximum output size limit in characters - private bool bufferIsFull; // if set, stop writting/recording output - - // Constructs a new StringRecorder that writes to the given TextWriter. - public StringRecorder(TextWriter ostream, int olimit) - { - if (ostream == null) - { - throw new ArgumentNullException("ostream", "Output stream cannot be null."); - } - this.outStream = ostream; - this.outLimit = olimit; - this.bufferIsFull = false; - } - - public StringRecorder(TextWriter ostream) : this(ostream, 0) - { - } - - // Only these three methods need to be overridden in order to override - // all different overloads of Write/WriteLine methods. - - public override void Write(char c) - { - if (!this.bufferIsFull) - { - outStream.Write(c); - base.Write(c); - this.CheckOverflow(); - } - } - - public override void Write(string val) - { - if (!this.bufferIsFull) - { - outStream.Write(val); - base.Write(val); - this.CheckOverflow(); - } - } - - public override void Write(char[] buffer, int index, int count) - { - if (!this.bufferIsFull) - { - outStream.Write(buffer, index, count); - base.Write(buffer, index, count); - this.CheckOverflow(); - } - } - - protected void CheckOverflow() - { - if (this.outLimit > 0 && this.ToString().Length > this.outLimit) - { - this.bufferIsFull = true; - this.outStream.WriteLine("ERROR: Output exceeded maximum limit, extra output will be discarded!"); - } - } - } - - - - // This class represents a test log. It allows for redirecting both stdout - // and stderr of the test to StringRecorder objects. The redirected output - // can then be compared to expected output supplied to the class - // constructor. - - public class TestLog - { - - const int SUCC_RET_CODE = 100; - const int FAIL_RET_CODE = 1; - const int OUTPUT_LIMIT_FACTOR = 100; - - const string IGNORE_STR = "#IGNORE#"; - - protected string expectedOut; - protected string expectedError; - protected TextWriter stdOut; - protected TextWriter stdError; - protected StringWriter testOut; - protected StringWriter testError; - - public TestLog() : this(null, null) - { - } - - public TestLog(object expOut) : this(expOut, null) - { - } - - // Creates a new TestLog and set both expected output, and - // expected error to supplied values. - public TestLog(object expOut, object expError) - { - this.expectedOut = expOut == null ? String.Empty : expOut.ToString(); - this.expectedError = expError == null ? String.Empty : expError.ToString(); - this.stdOut = System.Console.Out; - this.stdError = System.Console.Error; - this.testOut = new StringRecorder(this.stdOut, this.expectedOut != null ? this.expectedOut.ToString().Length * OUTPUT_LIMIT_FACTOR : 0); - this.testError = new StringRecorder(this.stdError, this.expectedError != null ? this.expectedError.ToString().Length * OUTPUT_LIMIT_FACTOR : 0); - } - - // Start recoding by redirecting both stdout and stderr to - // string recorders. - public void StartRecording() - { - System.Console.SetOut(this.testOut); - System.Console.SetError(this.testError); - } - - // Stop recording by resetting both stdout and stderr to their - // initial values. - public void StopRecording() - { - // For now we disable the ability of stop recoding, so that we still recoed until the program exits. - // This issue came up with finally being called twice. The first time we stop recoding and from this - // point on we loose all output. - // System.Console.SetOut(this.stdOut); - // System.Console.SetError(this.stdError); - } - - // Returns true if both expected output and expected error are - // identical to actual output and actual error; false otherwise. - protected bool Identical() - { - return this.testOut.ToString().Equals(this.expectedOut) && this.testError.ToString().Equals(this.expectedError); - } - - // Display differences between expected output and actual output. - protected string Diff() - { - string result = String.Empty; - if (!this.testOut.ToString().Equals(this.expectedOut)) - { - string newLine = this.testOut.NewLine; - string delimStr = newLine[0].ToString(); - string[] actualLines = ((this.ActualOutput.Trim()).Replace(newLine, delimStr)).Split(delimStr.ToCharArray()); - string[] expectedLines = ((this.ExpectedOutput.Trim()).Replace(newLine, delimStr)).Split(delimStr.ToCharArray()); - int commonLineCount = actualLines.Length < expectedLines.Length ? actualLines.Length : expectedLines.Length; - bool identical = true; - for (int i = 0; i < commonLineCount && identical; ++i) - { - string actualLine = actualLines[i]; - string expectedLine = expectedLines[i]; - bool similar = true; - while (!actualLine.Equals(expectedLine) && similar) - { - bool ignoreMode = false; - while (expectedLine.StartsWith(IGNORE_STR)) - { - expectedLine = expectedLine.Substring(IGNORE_STR.Length); - ignoreMode = true; - } - int nextIgnore = expectedLine.IndexOf(IGNORE_STR); - if (nextIgnore > 0) - { - string expectedToken = expectedLine.Substring(0, nextIgnore); - int at = actualLine.IndexOf(expectedToken); - similar = (at == 0) || (ignoreMode && at > 0); - expectedLine = expectedLine.Substring(nextIgnore); - actualLine = similar ? actualLine.Substring(at + expectedToken.Length) : actualLine; - } - else - { - similar = (ignoreMode && actualLine.EndsWith(expectedLine)) || actualLine.Equals(expectedLine); - expectedLine = String.Empty; - actualLine = String.Empty; - } - } - if (!similar) - { - result += ("< " + expectedLines[i] + newLine); - result += "---" + newLine; - result += ("> " + actualLines[i] + newLine); - identical = false; - } - } - if (identical) - { - for (int i = commonLineCount; i < expectedLines.Length; ++i) - { - result += ("< " + expectedLines[i] + newLine); - } - for (int i = commonLineCount; i < actualLines.Length; ++i) - { - result += ("< " + actualLines[i] + newLine); - } - } - } - return result; - } - - // Verifies test output and error strings. If identical it returns - // successful return code; otherwise it prints expected output and - // diff results, and it returns failed result code. - public int VerifyOutput() - { - int retCode = -1; - string diff = this.Diff(); - if (String.Empty.Equals(diff)) - { - // this.stdOut.WriteLine(); - // this.stdOut.WriteLine("PASSED"); - retCode = SUCC_RET_CODE; - } - else - { - this.stdOut.WriteLine(); - this.stdOut.WriteLine("FAILED!"); - this.stdOut.WriteLine(); - this.stdOut.WriteLine("[EXPECTED OUTPUT]"); - this.stdOut.WriteLine(this.ExpectedOutput); - this.stdOut.WriteLine("[DIFF RESULT]"); - this.stdOut.WriteLine(diff); - retCode = FAIL_RET_CODE; - } - return retCode; - } - - // Returns actual test output. - public string ActualOutput - { - get - { - return this.testOut.ToString(); - } - } - - // Returns actual test error. - public string ActualError - { - get - { - return this.testError.ToString(); - } - } - - // Returns expected test output. - public string ExpectedOutput - { - get - { - return this.expectedOut.ToString(); - } - } - - // Returns expected test error. - public string ExpectedError - { - get - { - return this.expectedError.ToString(); - } - } - } - -} - diff --git a/src/coreclr/tests/src/JIT/jit64/eh/FinallyExec/nonlocalgotoinatryblockinahandler.cs b/src/coreclr/tests/src/JIT/jit64/eh/FinallyExec/nonlocalgotoinatryblockinahandler.cs deleted file mode 100644 index b249f1effde4..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/eh/FinallyExec/nonlocalgotoinatryblockinahandler.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -//112256 -// [karimf] If we happen to have a try that is in nested CATCHs, and the try has a nonLocalGoto -// [only legal if it gos all the way back to the root!], then we replace the nonlocal -// LEAVE with an OPGOTO to the beginning of the cascading CATCHRET chain to unwind the stack... - -using System; - -class simple -{ - private static TestUtil.TestLog testLog; - - static simple() - { - // Create test writer object to hold expected output - System.IO.StringWriter expectedOut = new System.IO.StringWriter(); - - // Write expected output to string writer object - expectedOut.WriteLine("Begin test..."); - expectedOut.WriteLine("In main try"); - expectedOut.WriteLine("In main catch"); - expectedOut.WriteLine("In inner try"); - expectedOut.WriteLine("End test..."); - // Create and initialize test log object - testLog = new TestUtil.TestLog(expectedOut); - } - public static int Main() - { - //Start recording - testLog.StartRecording(); - Console.WriteLine("Begin test..."); - try - { - Console.WriteLine("In main try"); - - throw new Exception(); - } - catch - { - Console.WriteLine("In main catch"); - - try - { - Console.WriteLine("In inner try"); - goto L; - } - catch - { - Console.WriteLine("In inner catch"); - } - } - - Console.WriteLine("DEAD CODE!"); - - L: - - Console.WriteLine("End test..."); - // stop recoding - testLog.StopRecording(); - - return testLog.VerifyOutput(); - } -} diff --git a/src/coreclr/tests/src/JIT/jit64/eh/Leaves/nonlocalexitfromnestedcatch.cs b/src/coreclr/tests/src/JIT/jit64/eh/Leaves/nonlocalexitfromnestedcatch.cs deleted file mode 100644 index f1a547286916..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/eh/Leaves/nonlocalexitfromnestedcatch.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// Non local exit from a catch handler nested inside another catch handler - -using System; - -class test -{ - private static TestUtil.TestLog testLog; - - static test() - { - // Create test writer object to hold expected output - System.IO.StringWriter expectedOut = new System.IO.StringWriter(); - - // Write expected output to string writer object - expectedOut.WriteLine("In try1"); - expectedOut.WriteLine("In catch1"); - expectedOut.WriteLine("In try2"); - expectedOut.WriteLine("In try3"); - expectedOut.WriteLine("In catch3"); - expectedOut.WriteLine("In finally2"); - expectedOut.WriteLine("In finally1"); - expectedOut.WriteLine("Done"); - // Create and initialize test log object - testLog = new TestUtil.TestLog(expectedOut); - } - public static int Main() - { - //Start recording - testLog.StartRecording(); - try - { - Console.WriteLine("In try1"); - throw new Exception(); - } - catch (Exception) - { - Console.WriteLine("In catch1"); - try - { - Console.WriteLine("In try2"); - try - { - Console.WriteLine("In try3"); - throw new Exception(); - } - catch - { - Console.WriteLine("In catch3"); - goto L; - } - } - finally - { - Console.WriteLine("In finally2"); - } - } - finally - { - Console.WriteLine("In finally1"); - } - - Console.WriteLine("Never executed"); - L: - Console.WriteLine("Done"); - // stop recoding - testLog.StopRecording(); - - return testLog.VerifyOutput(); - } -} diff --git a/src/coreclr/tests/src/JIT/jit64/eh/basics/throwinfinallyintryfilter1.il b/src/coreclr/tests/src/JIT/jit64/eh/basics/throwinfinallyintryfilter1.il deleted file mode 100644 index bc9e4fd5ef5f..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/eh/basics/throwinfinallyintryfilter1.il +++ /dev/null @@ -1,133 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly extern mscorlib {} -.assembly test {} -.module test.exe -.assembly extern common {} - - -.method public static int32 Main() -{ - .entrypoint - .maxstack 2 - .locals init ( - class [mscorlib]System.IO.StringWriter expectedOut, - class [common]TestUtil.TestLog testLog - ) - - - newobj instance void [mscorlib]System.IO.StringWriter::.ctor() - stloc.s expectedOut - ldloc.s expectedOut - ldstr "in try" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr " in try" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr " in try" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr " in finally" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr " in filter" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr "in finally" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr "caught an exception!" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - newobj instance void [common]TestUtil.TestLog::.ctor(object) - stloc.s testLog - - ldloc.s testLog - callvirt instance void [common]TestUtil.TestLog::StartRecording() - - .try - { - ldc.i4.0 - call void func(int32) - leave.s DONE - } - catch [mscorlib]System.Exception - { - pop - ldstr "caught an exception!" - call void [System.Console]System.Console::WriteLine(string) - leave.s DONE - } - - DONE: - - ldloc.s testLog - callvirt instance void [common]TestUtil.TestLog::StopRecording() - - ldloc.s testLog - callvirt instance int32 [common]TestUtil.TestLog::VerifyOutput() - - ret -} - - -.method public static void func(int32 i) -{ - .maxstack 1 - .try - { - ldstr "in try" - call void [System.Console]System.Console::WriteLine(string) - .try - { - ldstr " in try" - call void [System.Console]System.Console::WriteLine(string) - .try - { - ldstr " in try" - call void [System.Console]System.Console::WriteLine(string) - leave.s TRY_1 - } - finally - { - ldstr " in finally" - call void [System.Console]System.Console::WriteLine(string) - newobj instance void [mscorlib]System.Exception::.ctor() - throw - endfinally - } - TRY_1: leave.s TRY_0 - } - filter - { - pop - ldstr " in filter" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.0 - endfilter - } { - pop - ldstr " in handler" - call void [System.Console]System.Console::WriteLine(string) - leave.s TRY_0 - } - TRY_0: leave.s DONE - } - finally - { - ldstr "in finally" - call void [System.Console]System.Console::WriteLine(string) - endfinally - } - DONE: ret -} diff --git a/src/coreclr/tests/src/JIT/jit64/eh/basics/throwinfinallyintryfilter2.il b/src/coreclr/tests/src/JIT/jit64/eh/basics/throwinfinallyintryfilter2.il deleted file mode 100644 index c0d473a5f6b4..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/eh/basics/throwinfinallyintryfilter2.il +++ /dev/null @@ -1,140 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly extern mscorlib {} -.assembly test {} -.assembly extern common {} -.module test.exe - - -.method public static int32 Main() -{ - .entrypoint - .maxstack 2 - .locals init ( - class [mscorlib]System.IO.StringWriter expectedOut, - class [common]TestUtil.TestLog testLog - ) - - - newobj instance void [mscorlib]System.IO.StringWriter::.ctor() - stloc.s expectedOut - ldloc.s expectedOut - ldstr "in try" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr " in try" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr " in try" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr " in finally" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr " in filter" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr "in filter" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr "caught an exception!" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - newobj instance void [common]TestUtil.TestLog::.ctor(object) - stloc.s testLog - - ldloc.s testLog - callvirt instance void [common]TestUtil.TestLog::StartRecording() - - .try - { - ldc.i4.0 - call void func(int32) - leave.s DONE - } - catch [mscorlib]System.Exception - { - pop - ldstr "caught an exception!" - call void [System.Console]System.Console::WriteLine(string) - leave.s DONE - } - - DONE: - - ldloc.s testLog - callvirt instance void [common]TestUtil.TestLog::StopRecording() - - ldloc.s testLog - callvirt instance int32 [common]TestUtil.TestLog::VerifyOutput() - - ret -} - - -.method public static void func(int32 i) -{ - .maxstack 1 - .try - { - ldstr "in try" - call void [System.Console]System.Console::WriteLine(string) - .try - { - ldstr " in try" - call void [System.Console]System.Console::WriteLine(string) - .try - { - ldstr " in try" - call void [System.Console]System.Console::WriteLine(string) - leave.s TRY_1 - } - finally - { - ldstr " in finally" - call void [System.Console]System.Console::WriteLine(string) - newobj instance void [mscorlib]System.Exception::.ctor() - throw - endfinally - } - TRY_1: leave.s TRY_0 - } - filter - { - pop - ldstr " in filter" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.0 - endfilter - } { - pop - ldstr " in handler" - call void [System.Console]System.Console::WriteLine(string) - leave.s TRY_0 - } - TRY_0: leave.s DONE - } - filter - { - pop - ldstr "in filter" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.0 - endfilter - } { - pop - ldstr "in handler" - call void [System.Console]System.Console::WriteLine(string) - leave.s DONE - } - DONE: ret -} diff --git a/src/coreclr/tests/src/JIT/jit64/eh/basics/throwinfinallyintryfilter3.il b/src/coreclr/tests/src/JIT/jit64/eh/basics/throwinfinallyintryfilter3.il deleted file mode 100644 index 132203445992..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/eh/basics/throwinfinallyintryfilter3.il +++ /dev/null @@ -1,162 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly extern mscorlib {} -.assembly test {} -.assembly extern common {} -.module test.exe - - -.method public static int32 Main() -{ - .entrypoint - .maxstack 2 - .locals init ( - class [mscorlib]System.IO.StringWriter expectedOut, - class [common]TestUtil.TestLog testLog - ) - - - newobj instance void [mscorlib]System.IO.StringWriter::.ctor() - stloc.s expectedOut - ldloc.s expectedOut - ldstr "in try" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr " in try" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr " in try" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr " in try" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr " in finally" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr " in filter" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr "in filter" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr " in finally" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr "in filter" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr "caught an exception!" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - newobj instance void [common]TestUtil.TestLog::.ctor(object) - stloc.s testLog - - ldloc.s testLog - callvirt instance void [common]TestUtil.TestLog::StartRecording() - - .try - { - ldc.i4.0 - call void func(int32) - leave.s DONE - } - catch [mscorlib]System.Exception - { - pop - ldstr "caught an exception!" - call void [System.Console]System.Console::WriteLine(string) - leave.s DONE - } - - DONE: - - ldloc.s testLog - callvirt instance void [common]TestUtil.TestLog::StopRecording() - - ldloc.s testLog - callvirt instance int32 [common]TestUtil.TestLog::VerifyOutput() - - ret -} - - -.method public static void func(int32 i) -{ - .maxstack 1 - .try - { - ldstr "in try" - call void [System.Console]System.Console::WriteLine(string) - .try - { - ldstr " in try" - call void [System.Console]System.Console::WriteLine(string) - .try - { - ldstr " in try" - call void [System.Console]System.Console::WriteLine(string) - .try { - ldstr " in try" - call void [System.Console]System.Console::WriteLine(string) - leave.s TRY_2 - } - finally - { - ldstr " in finally" - call void [System.Console]System.Console::WriteLine(string) - newobj instance void [mscorlib]System.Exception::.ctor() - throw - endfinally - } - TRY_2: leave.s TRY_1 - } - filter - { - pop - ldstr " in filter" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.0 - endfilter - } { - pop - ldstr " in handler" - call void [System.Console]System.Console::WriteLine(string) - leave.s TRY_0 - } - TRY_1: leave.s TRY_0 - } - finally - { - ldstr " in finally" - call void [System.Console]System.Console::WriteLine(string) - newobj instance void [mscorlib]System.Exception::.ctor() - throw - endfinally - } - TRY_0: leave.s DONE - } - filter - { - pop - ldstr "in filter" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.0 - endfilter - } { - pop - ldstr "in handler" - call void [System.Console]System.Console::WriteLine(string) - leave.s DONE - } - DONE: ret -} diff --git a/src/coreclr/tests/src/JIT/jit64/eh/basics/throwisfirstinstruction.il b/src/coreclr/tests/src/JIT/jit64/eh/basics/throwisfirstinstruction.il deleted file mode 100644 index 658681644d82..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/eh/basics/throwisfirstinstruction.il +++ /dev/null @@ -1,73 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly extern mscorlib {} -.assembly extern common {} -.assembly test {} -.module throw.exe - -.class private auto ansi beforefieldinit test - extends [mscorlib]System.Object -{ - .field private static class [common]TestUtil.TestLog testLog - .method private hidebysig specialname rtspecialname static void .cctor() cil managed - { - .maxstack 2 - .locals init ( - class [mscorlib]System.IO.StringWriter expectedOut - ) - newobj instance void [mscorlib]System.IO.StringWriter::.ctor() - stloc.s expectedOut - ldloc.s expectedOut - ldstr "in try" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - ldstr "after try" - callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - ldloc.s expectedOut - newobj instance void [common]TestUtil.TestLog::.ctor(object) - stsfld class [common]TestUtil.TestLog test::testLog - ret - } - - .method public static int32 Main() cil managed - { - .entrypoint - - ldsfld class [common]TestUtil.TestLog test::testLog - callvirt instance void [common]TestUtil.TestLog::StartRecording() - - .try - { - ldstr "in try" - call void [System.Console]System.Console::WriteLine(string) - leave IL_end - } - - catch [mscorlib]System.Exception - { - throw - } - - - IL_end: - ldstr "after try" - call void [System.Console]System.Console::WriteLine(string) - - ldsfld class [common]TestUtil.TestLog test::testLog - callvirt instance void [common]TestUtil.TestLog::StopRecording() - - ldsfld class [common]TestUtil.TestLog test::testLog - callvirt instance int32 [common]TestUtil.TestLog::VerifyOutput() - - ret - } - -} diff --git a/src/coreclr/tests/src/JIT/jit64/gc/misc/gcparaminreg.cs b/src/coreclr/tests/src/JIT/jit64/gc/misc/gcparaminreg.cs deleted file mode 100644 index b8f98ea4c84a..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/gc/misc/gcparaminreg.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -// This test is intended to test using SSIs to report cases where -// the address of an SSI escapes the current function. -// Note that this probably needs to be modifies in msil to -// actually process the address of the local, rather than the local. - -using System; - -class test -{ - public static int Main() - { - int i = 0; - i += ParamInReg(); - return i; - } - - public static int ParamInReg() - { - String strLoc = "Param"; - return ParamHelper(strLoc); - } - - public static int ParamHelper(String strParam) - { - return Func1(strParam); - } - - public static int Func1(String strParam) - { - if (strParam == "Param") - return 100; - else return -1; - } -} - - - diff --git a/src/coreclr/tests/src/JIT/jit64/gc/misc/simple1.cs b/src/coreclr/tests/src/JIT/jit64/gc/misc/simple1.cs deleted file mode 100644 index b828b60b18ca..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/gc/misc/simple1.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -struct S -{ - public Object O; -} - -class test -{ - public static int Main() - { - S s = new S(); - - s.O = "Hello World"; - - S s2 = foo(s); - - Console.WriteLine(s2.O); - -#pragma warning disable 0252 - if (s2.O != "Goodbye World") return -1; - return 100; -#pragma warning restore 0252 - - } - - public static S foo(S s) - { - Console.WriteLine(s.O); - - s.O = "Goodbye World"; - - return s; - } -} diff --git a/src/coreclr/tests/src/JIT/jit64/gc/misc/struct1.cs b/src/coreclr/tests/src/JIT/jit64/gc/misc/struct1.cs deleted file mode 100644 index 4dfa27173848..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/gc/misc/struct1.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -struct S -{ - public String str; -} - -class Test -{ - public static void c(S s1) - { - GC.Collect(); - Console.WriteLine(s1.str); - GC.Collect(); - } - - public static int Main() - { - S sM; - - sM.str = "test"; - c(sM); - return 100; - } -} diff --git a/src/coreclr/tests/src/JIT/jit64/gc/misc/struct5_2.cs b/src/coreclr/tests/src/JIT/jit64/gc/misc/struct5_2.cs deleted file mode 100644 index e812388513a8..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/gc/misc/struct5_2.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -struct S -{ -#pragma warning disable 0414 - public String str2; -#pragma warning restore 0414 - public String str; -} - -class Test -{ - public static void c(S s1, S s2, S s3, S s4) - { - Console.WriteLine(s1.str + s2.str + s3.str + s4.str); - } - - public static int Main() - { - S sM, sM2, sM3, sM4; - - sM.str = "test"; - sM2.str = "test2"; - sM3.str = "test3"; - sM4.str = "test4"; - sM.str2 = ""; - sM2.str2 = ""; - sM3.str2 = ""; - sM4.str2 = ""; - c(sM, sM2, sM3, sM4); - return 100; - } -} diff --git a/src/coreclr/tests/src/JIT/jit64/gc/misc/structret1_1.cs b/src/coreclr/tests/src/JIT/jit64/gc/misc/structret1_1.cs deleted file mode 100644 index 65be7080a08a..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/gc/misc/structret1_1.cs +++ /dev/null @@ -1,103 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -struct Pad -{ -#pragma warning disable 0414 - public double d1; - public double d2; - public double d3; - public double d4; - public double d5; - public double d6; - public double d7; - public double d8; - public double d9; - public double d10; - public double d11; - public double d12; - public double d13; - public double d14; - public double d15; - public double d16; - public double d17; - public double d18; - public double d19; - public double d20; - public double d21; - public double d22; - public double d23; - public double d24; - public double d25; - public double d26; - public double d27; - public double d28; - public double d29; - public double d30; -#pragma warning restore 0414 -} - -struct S -{ -#pragma warning disable 0414 - public String str2; -#pragma warning restore 0414 - public String str; - public Pad pad; - - public S(String s) - { - str = s; - str2 = s + str; - pad.d1 = - pad.d2 = - pad.d3 = - pad.d4 = - pad.d5 = - pad.d6 = - pad.d7 = - pad.d8 = - pad.d9 = - pad.d10 = - pad.d11 = - pad.d12 = - pad.d13 = - pad.d14 = - pad.d15 = - pad.d16 = - pad.d17 = - pad.d18 = - pad.d19 = - pad.d20 = - pad.d21 = - pad.d22 = - pad.d23 = - pad.d24 = - pad.d25 = - pad.d26 = - pad.d27 = - pad.d28 = - pad.d29 = - pad.d30 = 3.3; - } -} - -class Test -{ - public static S c(S s1) - { - return (s1); - } - - public static int Main() - { - S sM = new S("test"); - - Console.WriteLine(c(sM)); - return 100; - } -} diff --git a/src/coreclr/tests/src/JIT/jit64/gc/misc/test1.cs b/src/coreclr/tests/src/JIT/jit64/gc/misc/test1.cs deleted file mode 100644 index b81db3d2075c..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/gc/misc/test1.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -struct S -{ - public Object O1; - public Object O2; -} - -class C -{ -#pragma warning disable 0649 - public int i; -#pragma warning restore 0649 - public S s1; - - public C() - { - s1.O1 = "Hello"; - s1.O2 = "World"; - } -} - -class Test -{ - public static int Main() - { - test1(); - test2(); - return (100); - } - - public static void test1() - { - C c = new C(); - - foo(c.s1); - } - - public static void test2() - { - C c = new C(); - S s = c.s1; - - foo(s); - } - - public static void foo(S s) - { - Console.WriteLine(s.O1); - Console.WriteLine(s.O2); - } -} diff --git a/src/coreclr/tests/src/JIT/jit64/gc/misc/test2.cs b/src/coreclr/tests/src/JIT/jit64/gc/misc/test2.cs deleted file mode 100644 index 41c45aebc60c..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/gc/misc/test2.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; - -struct S -{ - public Object O1; - public Object O2; - public Object O3; - public Object O4; -} - -class C -{ -#pragma warning disable 0649 - public int i; -#pragma warning restore 0649 - public S s1; - - public C() - { - s1.O1 = "Hello"; - s1.O2 = "World"; - s1.O3 = "Have"; - s1.O4 = "Fun"; - } -} - -class Test -{ - public static int Main() - { - test1(); - test2(); - return (100); - } - - public static void test1() - { - C c = new C(); - - foo(c.s1); - } - - public static void test2() - { - C c = new C(); - S s = c.s1; - - foo(s); - } - - public static void foo(S s) - { - Console.WriteLine(s.O1); - Console.WriteLine(s.O2); - Console.WriteLine(s.O3); - Console.WriteLine(s.O4); - } -} diff --git a/src/coreclr/tests/src/JIT/jit64/hfa/main/dll/common.cs b/src/coreclr/tests/src/JIT/jit64/hfa/main/dll/common.cs deleted file mode 100644 index a59e25168d4e..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/hfa/main/dll/common.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -namespace HFATest -{ - public class Common - { - public const int SUCC_RET_CODE = 100; - public const int FAIL_RET_CODE = 1; - - public const float tolerance = (float)1.0E-15; - - public static bool CheckResult(string testName, float actual, float expected) - { - bool check = Math.Abs(expected - actual) <= tolerance; - DisplayResult(testName, actual, expected, check); - return check; - } - - public static bool CheckResult(string testName, double actual, double expected) - { - bool check = Math.Abs(expected - actual) <= tolerance; - DisplayResult(testName, actual, expected, check); - return check; - } - - private static void DisplayResult(string testName, double actual, double expected, bool result) - { - System.Console.Write("[" + testName + "]\t"); - if (result) - { - System.Console.WriteLine("PASSED"); - } - else - { - System.Console.WriteLine("FAILED => expected = {0}, actual = {1}", expected, actual); - } - } - } -} diff --git a/src/coreclr/tests/src/JIT/jit64/localloc/common/common.il b/src/coreclr/tests/src/JIT/jit64/localloc/common/common.il deleted file mode 100644 index 2f1ec8c463e4..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/localloc/common/common.il +++ /dev/null @@ -1,343 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - -.assembly extern System.Console { auto } -.assembly extern mscorlib { auto } - -.assembly common -{ - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module common.dll -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x00400000 -.subsystem 0x00000003 -.file alignment 512 -.corflags 0x00000001 -.namespace LocallocTesting -{ - .class public auto ansi beforefieldinit Global - extends [mscorlib]System.Object - { - } // end of class Global - - .class public auto ansi beforefieldinit TestClass - extends [mscorlib]System.Object - { - } // end of class TestClass - -} // end of namespace LocallocTesting - - - - - - - - - -.namespace LocallocTesting -{ - .class public auto ansi beforefieldinit Global - extends [mscorlib]System.Object - { - .field public static literal unsigned int64 INITIAL_VALUE = int64(0xFEDCBA9876543210) - .field public static int32 stackAllocSize - .method public hidebysig static bool - verifyLocal(string name, - unsigned int64 i1, - unsigned int64 i2) cil managed - { - .maxstack 3 - .locals (bool V_0, - string[] V_1) - IL_0000: ldarg.1 - IL_0001: ldarg.2 - IL_0002: bne.un.s IL_0008 - - IL_0004: ldc.i4.1 - IL_0005: stloc.0 - IL_0006: br.s IL_004e - - IL_0008: ldc.i4.6 - IL_0009: newarr [mscorlib]System.String - IL_000e: stloc.1 - IL_000f: ldloc.1 - IL_0010: ldc.i4.0 - IL_0011: ldstr "Local variable('" - IL_0016: stelem.ref - IL_0017: ldloc.1 - IL_0018: ldc.i4.1 - IL_0019: ldarg.0 - IL_001a: stelem.ref - IL_001b: ldloc.1 - IL_001c: ldc.i4.2 - IL_001d: ldstr "') contains " - IL_0022: stelem.ref - IL_0023: ldloc.1 - IL_0024: ldc.i4.3 - IL_0025: ldarga.s i1 - IL_0027: call instance string [mscorlib]System.UInt64::ToString() - IL_002c: stelem.ref - IL_002d: ldloc.1 - IL_002e: ldc.i4.4 - IL_002f: ldstr ". Expect=" - IL_0034: stelem.ref - IL_0035: ldloc.1 - IL_0036: ldc.i4.5 - IL_0037: ldarga.s i2 - IL_0039: call instance string [mscorlib]System.UInt64::ToString() - IL_003e: stelem.ref - IL_003f: ldloc.1 - IL_0040: call string [mscorlib]System.String::Concat(string[]) - IL_0045: call void [System.Console]System.Console::WriteLine(string) - IL_004a: ldc.i4.0 - IL_004b: stloc.0 - IL_004c: br.s IL_004e - - IL_004e: ldloc.0 - IL_004f: ret - } // end of method Global::verifyLocal - - .method public hidebysig static void - initializeStack(int32* pArray, - int32 size, - int32 initialValue) cil managed - { - .maxstack 3 - .locals (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: br.s IL_0012 - - IL_0004: ldarg.0 - IL_0005: ldloc.0 - IL_0006: conv.i - IL_0007: ldc.i4.4 - IL_0008: mul - IL_0009: add - IL_000a: ldarg.2 - IL_000b: ldloc.0 - IL_000c: add - IL_000d: stind.i4 - IL_000e: ldloc.0 - IL_000f: ldc.i4.1 - IL_0010: add - IL_0011: stloc.0 - IL_0012: ldloc.0 - IL_0013: ldarg.1 - IL_0014: blt.s IL_0004 - - IL_0016: ret - } // end of method Global::initializeStack - - .method public hidebysig static bool - verifyStack(string name, - int32* pArray, - int32 size, - int32 initialValue) cil managed - { - .maxstack 5 - .locals (int32 V_0, - bool V_1, - object[] V_2) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: br.s IL_0079 - - IL_0004: ldarg.1 - IL_0005: ldloc.0 - IL_0006: conv.i - IL_0007: ldc.i4.4 - IL_0008: mul - IL_0009: add - IL_000a: ldind.i4 - IL_000b: ldarg.3 - IL_000c: ldloc.0 - IL_000d: add - IL_000e: beq.s IL_0075 - - IL_0010: ldc.i4.s 9 - IL_0012: newarr [mscorlib]System.Object - IL_0017: stloc.2 - IL_0018: ldloc.2 - IL_0019: ldc.i4.0 - IL_001a: ldstr "Stack('" - IL_001f: stelem.ref - IL_0020: ldloc.2 - IL_0021: ldc.i4.1 - IL_0022: ldarg.0 - IL_0023: stelem.ref - IL_0024: ldloc.2 - IL_0025: ldc.i4.2 - IL_0026: ldstr "') corrupted at index=" - IL_002b: stelem.ref - IL_002c: ldloc.2 - IL_002d: ldc.i4.3 - IL_002e: ldloca.s V_0 - IL_0030: call instance string [mscorlib]System.Int32::ToString() - IL_0035: stelem.ref - IL_0036: ldloc.2 - IL_0037: ldc.i4.4 - IL_0038: ldstr ". Value=" - IL_003d: stelem.ref - IL_003e: ldloc.2 - IL_003f: ldc.i4.5 - IL_0040: ldarg.1 - IL_0041: ldloc.0 - IL_0042: conv.i - IL_0043: ldc.i4.4 - IL_0044: mul - IL_0045: add - IL_0046: call instance string [mscorlib]System.Int32::ToString() - IL_004b: stelem.ref - IL_004c: ldloc.2 - IL_004d: ldc.i4.6 - IL_004e: ldstr ". Expect=" - IL_0053: stelem.ref - IL_0054: ldloc.2 - IL_0055: ldc.i4.7 - IL_0056: ldarg.3 - IL_0057: box [mscorlib]System.Int32 - IL_005c: stelem.ref - IL_005d: ldloc.2 - IL_005e: ldc.i4.8 - IL_005f: ldloc.0 - IL_0060: box [mscorlib]System.Int32 - IL_0065: stelem.ref - IL_0066: ldloc.2 - IL_0067: call string [mscorlib]System.String::Concat(object[]) - IL_006c: call void [System.Console]System.Console::WriteLine(string) - IL_0071: ldc.i4.0 - IL_0072: stloc.1 - IL_0073: br.s IL_0081 - - IL_0075: ldloc.0 - IL_0076: ldc.i4.1 - IL_0077: add - IL_0078: stloc.0 - IL_0079: ldloc.0 - IL_007a: ldarg.2 - IL_007b: blt.s IL_0004 - - IL_007d: ldc.i4.1 - IL_007e: stloc.1 - IL_007f: br.s IL_0081 - - IL_0081: ldloc.1 - IL_0082: ret - } // end of method Global::verifyStack - - .method private hidebysig specialname rtspecialname static - void .cctor() cil managed - { - .maxstack 8 - IL_0000: ldc.i4.s 10 - IL_0002: stsfld int32 LocallocTesting.Global::stackAllocSize - IL_0007: ret - } // end of method Global::.cctor - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method Global::.ctor - - } // end of class Global - - .class public auto ansi beforefieldinit TestClass - extends [mscorlib]System.Object - { - .field public int64 id - .field public static bool flag - .method public hidebysig specialname rtspecialname - instance void .ctor(int64 i) cil managed - { - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld int64 LocallocTesting.TestClass::id - IL_000d: ret - } // end of method TestClass::.ctor - - .method family hidebysig virtual instance void - Finalize() cil managed - { - .maxstack 1 - .try - { - IL_0000: ldc.i4.1 - IL_0001: stsfld bool LocallocTesting.TestClass::flag - IL_0006: leave.s IL_000f - - } // end .try - finally - { - IL_0008: ldarg.0 - IL_0009: call instance void [mscorlib]System.Object::Finalize() - IL_000e: endfinally - } // end handler - IL_000f: ret - } // end of method TestClass::Finalize - - .method public hidebysig instance bool - ForceGC() cil managed - { - .maxstack 3 - .locals (int32 V_0, - class LocallocTesting.TestClass V_1, - bool V_2) - IL_0000: ldc.i4.0 - IL_0001: stsfld bool LocallocTesting.TestClass::flag - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: br.s IL_0016 - - IL_000a: ldloc.0 - IL_000b: dup - IL_000c: ldc.i4.1 - IL_000d: add - IL_000e: stloc.0 - IL_000f: conv.i8 - IL_0010: newobj instance void LocallocTesting.TestClass::.ctor(int64) - IL_0015: stloc.1 - IL_0016: ldsfld bool LocallocTesting.TestClass::flag - IL_001b: brtrue.s IL_0025 - - IL_001d: ldloc.0 - IL_001e: ldc.i4 0x186a0 - IL_0023: blt.s IL_000a - - IL_0025: call void [mscorlib]System.GC::Collect() - IL_002a: call void [mscorlib]System.GC::WaitForPendingFinalizers() - IL_002f: ldsfld bool LocallocTesting.TestClass::flag - IL_0034: stloc.2 - IL_0035: br.s IL_0037 - - IL_0037: ldloc.2 - IL_0038: ret - } // end of method TestClass::ForceGC - - .method private hidebysig specialname rtspecialname static - void .cctor() cil managed - { - .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld bool LocallocTesting.TestClass::flag - IL_0006: ret - } // end of method TestClass::.cctor - - } // end of class TestClass - - - -} // end of namespace LocallocTesting - diff --git a/src/coreclr/tests/src/JIT/jit64/localloc/verify/verify01_dynamic.il b/src/coreclr/tests/src/JIT/jit64/localloc/verify/verify01_dynamic.il deleted file mode 100644 index 797cd659e0d7..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/localloc/verify/verify01_dynamic.il +++ /dev/null @@ -1,90 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// Test Invalid program (evaluation stack is not empty before localloc call - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly extern mscorlib{} -.assembly eh01 -{ -} - -.class private auto ansi beforefieldinit LocallocTest - extends [mscorlib]System.Object -{ - .field public static int32 stackAllocSize - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - .maxstack 1 - .locals init(int32 V_0) - ldc.i4 0x1000 - stsfld int32 LocallocTest::stackAllocSize - .try - { - IL_0000: call void LocallocTest::func() - IL_0005: leave.s IL_0027 - - } - catch [mscorlib]System.Security.VerificationException - { - IL_0007: pop - IL_0008: ldstr "Passed" - IL_000d: call void [System.Console]System.Console::WriteLine(string) - IL_0012: ldc.i4.s 100 - IL_0014: stloc.0 - IL_0015: leave.s IL_0035 - - } - catch [mscorlib]System.InvalidProgramException - { - IL_0017: pop - IL_0018: ldstr "Passed" - IL_009d: call void [System.Console]System.Console::WriteLine(string) - IL_0022: ldc.i4.s 100 - IL_0024: stloc.0 - IL_0025: leave.s IL_0035 - - } - IL_0027: ldstr "Failed" - IL_002c: call void [System.Console]System.Console::WriteLine(string) - IL_0031: ldc.i4.1 - IL_0032: stloc.0 - IL_0033: br.s IL_0035 - - IL_0035: ldloc.0 - IL_0036: ret - } - - .method private hidebysig static void func() cil managed - { - .maxstack 2 - .locals init(int32* V_0, - int32* V_1) - IL_0000: ldc.i4.4 - IL_0001: ldsfld int32 LocallocTest::stackAllocSize - IL_0006: mul - IL_0007: localloc - IL_0009: stloc.1 - IL_000a: ldc.i4.4 - IL_000b: ldsfld int32 LocallocTest::stackAllocSize - IL_0010: mul - IL_0011: localloc - IL_0013: stloc.0 - IL_0014: ret - } - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } - -} diff --git a/src/coreclr/tests/src/JIT/jit64/localloc/verify/verify01_large.il b/src/coreclr/tests/src/JIT/jit64/localloc/verify/verify01_large.il deleted file mode 100644 index 31c5e743548f..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/localloc/verify/verify01_large.il +++ /dev/null @@ -1,87 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// Test Invalid program (evaluation stack is not empty before localloc call - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly extern mscorlib{} -.assembly eh01 -{ -} - -.class private auto ansi beforefieldinit LocallocTest - extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - .maxstack 1 - .locals init(int32 V_0) - .try - { - IL_0000: call void LocallocTest::func() - IL_0005: leave.s IL_0027 - - } - catch [mscorlib]System.Security.VerificationException - { - IL_0007: pop - IL_0008: ldstr "Passed" - IL_000d: call void [System.Console]System.Console::WriteLine(string) - IL_0012: ldc.i4.s 100 - IL_0014: stloc.0 - IL_0015: leave.s IL_0035 - - } - catch [mscorlib]System.InvalidProgramException - { - IL_0017: pop - IL_0018: ldstr "Passed" - IL_009d: call void [System.Console]System.Console::WriteLine(string) - IL_0022: ldc.i4.s 100 - IL_0024: stloc.0 - IL_0025: leave.s IL_0035 - - } - IL_0027: ldstr "Failed" - IL_002c: call void [System.Console]System.Console::WriteLine(string) - IL_0031: ldc.i4.1 - IL_0032: stloc.0 - IL_0033: br.s IL_0035 - - IL_0035: ldloc.0 - IL_0036: ret - } - - .method private hidebysig static void func() cil managed - { - .maxstack 2 - .locals init(int32* V_0, - int32* V_1) - IL_0000: ldc.i4.4 - IL_0001: ldc.i4 0x1000 - IL_0006: mul - IL_0007: localloc - IL_0009: stloc.1 - IL_000a: ldc.i4.4 - IL_000b: ldc.i4 0x1000 - IL_0010: mul - IL_0011: localloc - IL_0013: stloc.0 - IL_0014: ret - } - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } - -} diff --git a/src/coreclr/tests/src/JIT/jit64/localloc/verify/verify01_small.il b/src/coreclr/tests/src/JIT/jit64/localloc/verify/verify01_small.il deleted file mode 100644 index a3166e3341d2..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/localloc/verify/verify01_small.il +++ /dev/null @@ -1,87 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// Test Invalid program (evaluation stack is not empty before localloc call - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly extern mscorlib{} -.assembly eh01 -{ -} - -.class private auto ansi beforefieldinit LocallocTest - extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - .maxstack 1 - .locals init(int32 V_0) - .try - { - IL_0000: call void LocallocTest::func() - IL_0005: leave.s IL_0027 - - } - catch [mscorlib]System.Security.VerificationException - { - IL_0007: pop - IL_0008: ldstr "Passed" - IL_000d: call void [System.Console]System.Console::WriteLine(string) - IL_0012: ldc.i4.s 100 - IL_0014: stloc.0 - IL_0015: leave.s IL_0035 - - } - catch [mscorlib]System.InvalidProgramException - { - IL_0017: pop - IL_0018: ldstr "Passed" - IL_009d: call void [System.Console]System.Console::WriteLine(string) - IL_0022: ldc.i4.s 100 - IL_0024: stloc.0 - IL_0025: leave.s IL_0035 - - } - IL_0027: ldstr "Failed" - IL_002c: call void [System.Console]System.Console::WriteLine(string) - IL_0031: ldc.i4.1 - IL_0032: stloc.0 - IL_0033: br.s IL_0035 - - IL_0035: ldloc.0 - IL_0036: ret - } - - .method private hidebysig static void func() cil managed - { - .maxstack 2 - .locals init(int32* V_0, - int32* V_1) - IL_0000: ldc.i4.4 - IL_0001: ldc.i4.1 - IL_0002: mul - IL_0003: localloc - IL_0005: stloc.1 - IL_0006: ldc.i4.4 - IL_0007: ldc.i4.1 - IL_0008: mul - IL_0009: localloc - IL_000b: stloc.0 - IL_000c: ret - } - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } - -} diff --git a/src/coreclr/tests/src/JIT/jit64/localloc/zeroinit/zeroinit01_large.il b/src/coreclr/tests/src/JIT/jit64/localloc/zeroinit/zeroinit01_large.il deleted file mode 100644 index 802bd6592cba..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/localloc/zeroinit/zeroinit01_large.il +++ /dev/null @@ -1,122 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - -// Test zero initialization of localloc -.assembly extern mscorlib{} -.assembly zeroinit01{} - -.class private auto ansi beforefieldinit T - extends [mscorlib]System.Object -{ - .field public static int32 size_to_test - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - // Code size 79 (0x4f) - .maxstack 3 - .locals init(bool passed, - int32* buffer, - int32 n) - // Initialize 'passed' to true. - IL_0000: ldc.i4.1 - IL_0001: stloc.0 - - IL_0002: call void T::dirtyStack() - // localloc - IL_0007: ldc.i4.4 - IL_0008: ldc.i4 0x1000 - IL_000d: mul - IL_000e: localloc - IL_0010: stloc.1 - // Set size of localloc - IL_0011: ldc.i4 0x1000 - IL_0016: stsfld int32 T::size_to_test - - IL_001b: ldc.i4.0 - IL_001c: stloc.2 - IL_001d: br.s L_LOOP2 - - L_LOOP1: ldloc.1 - IL_0020: ldc.i4.4 - IL_0021: ldloc.2 - IL_0022: mul - IL_0023: add - IL_0024: ldind.i4 - IL_0025: brfalse.s IL_0029 - // Test failed. (!= zero) - IL_0027: ldc.i4.0 - IL_0028: stloc.0 - // n = n+1 - IL_0029: ldloc.2 - IL_002a: ldc.i4.1 - IL_002b: add - IL_002c: stloc.2 - L_LOOP2: ldloc.2 - IL_002e: ldsfld int32 T::size_to_test - IL_0033: blt.s L_LOOP1 - - IL_0035: ldloc.0 - IL_0036: brfalse.s L_FAIL - - IL_0038: ldstr "pass" - IL_003d: call void [System.Console]System.Console::WriteLine(string) - ldc.i4 100 - IL_0042: br.s IL_004e - - L_FAIL: ldstr "fail" - IL_0049: call void [System.Console]System.Console::WriteLine(string) - ldc.i4.1 - IL_004e: ret - } // end of method T::Main - - .method public hidebysig static void dirtyStack() cil managed - { - // Code size 34 (0x22) - .maxstack 3 - .locals (int32* buffer, - int32 n) - IL_0000: ldc.i4.4 - IL_0001: ldsfld int32 T::size_to_test - IL_0006: mul - IL_0007: localloc - IL_0009: stloc.0 - IL_000a: ldc.i4.0 - IL_000b: stloc.1 - IL_000c: br.s IL_0019 - - IL_000e: ldloc.0 - IL_000f: ldc.i4.4 - IL_0010: ldloc.1 - IL_0011: mul - IL_0012: add - IL_0013: ldloc.1 - IL_0014: stind.i4 - IL_0015: ldloc.1 - IL_0016: ldc.i4.1 - IL_0017: add - IL_0018: stloc.1 - IL_0019: ldloc.1 - IL_001a: ldsfld int32 T::size_to_test - IL_001f: blt.s IL_000e - - IL_0021: ret - } // end of method T::dirtyStack - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method T::.ctor - -} // end of class T diff --git a/src/coreclr/tests/src/JIT/jit64/localloc/zeroinit/zeroinit01_small.il b/src/coreclr/tests/src/JIT/jit64/localloc/zeroinit/zeroinit01_small.il deleted file mode 100644 index a87c66fa6b2d..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/localloc/zeroinit/zeroinit01_small.il +++ /dev/null @@ -1,122 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - -// Test zero initialization of localloc -.assembly extern mscorlib{} -.assembly zeroinit01{} - -.class private auto ansi beforefieldinit T - extends [mscorlib]System.Object -{ - .field public static int32 size_to_test - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - // Code size 79 (0x4f) - .maxstack 3 - .locals init(bool passed, - int32* buffer, - int32 n) - // Initialize 'passed' to true. - IL_0000: ldc.i4.1 - IL_0001: stloc.0 - - IL_0002: call void T::dirtyStack() - // localloc - IL_0007: ldc.i4.4 - IL_0008: ldc.i4.1 - IL_000d: mul - IL_000e: localloc - IL_0010: stloc.1 - // Set size of localloc - IL_0011: ldc.i4.1 - IL_0016: stsfld int32 T::size_to_test - - IL_001b: ldc.i4.0 - IL_001c: stloc.2 - IL_001d: br.s L_LOOP2 - - L_LOOP1: ldloc.1 - IL_0020: ldc.i4.4 - IL_0021: ldloc.2 - IL_0022: mul - IL_0023: add - IL_0024: ldind.i4 - IL_0025: brfalse.s IL_0029 - // Test failed. (!= zero) - IL_0027: ldc.i4.0 - IL_0028: stloc.0 - // n = n+1 - IL_0029: ldloc.2 - IL_002a: ldc.i4.1 - IL_002b: add - IL_002c: stloc.2 - L_LOOP2: ldloc.2 - IL_002e: ldsfld int32 T::size_to_test - IL_0033: blt.s L_LOOP1 - - IL_0035: ldloc.0 - IL_0036: brfalse.s L_FAIL - - IL_0038: ldstr "pass" - IL_003d: call void [System.Console]System.Console::WriteLine(string) - ldc.i4 100 - IL_0042: br.s IL_004e - - L_FAIL: ldstr "fail" - IL_0049: call void [System.Console]System.Console::WriteLine(string) - ldc.i4.1 - IL_004e: ret - } // end of method T::Main - - .method public hidebysig static void dirtyStack() cil managed - { - // Code size 34 (0x22) - .maxstack 3 - .locals (int32* buffer, - int32 n) - IL_0000: ldc.i4.4 - IL_0001: ldsfld int32 T::size_to_test - IL_0006: mul - IL_0007: localloc - IL_0009: stloc.0 - IL_000a: ldc.i4.0 - IL_000b: stloc.1 - IL_000c: br.s IL_0019 - - IL_000e: ldloc.0 - IL_000f: ldc.i4.4 - IL_0010: ldloc.1 - IL_0011: mul - IL_0012: add - IL_0013: ldloc.1 - IL_0014: stind.i4 - IL_0015: ldloc.1 - IL_0016: ldc.i4.1 - IL_0017: add - IL_0018: stloc.1 - IL_0019: ldloc.1 - IL_001a: ldsfld int32 T::size_to_test - IL_001f: blt.s IL_000e - - IL_0021: ret - } // end of method T::dirtyStack - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method T::.ctor - -} // end of class T diff --git a/src/coreclr/tests/src/JIT/jit64/mcc/common/common.il b/src/coreclr/tests/src/JIT/jit64/mcc/common/common.il deleted file mode 100644 index dad1e3769263..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/mcc/common/common.il +++ /dev/null @@ -1,23521 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - -// Metadata version: v2.0.50727 -.assembly extern mscorlib { auto } -.assembly extern System.Runtime.Extensions { auto } - - -.module common.netmodule -// MVID: {8A774AEE-5C13-4F6C-8345-881D79617488} -.imagebase 0x00400000 -.file alignment 0x00001000 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x02DF0000 - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class public auto ansi beforefieldinit MCCTest.FormatUtils - extends [mscorlib]System.Object -{ - .method public hidebysig static string - GetPadding(int32 level) cil managed - { - // Code size 32 (0x20) - .maxstack 4 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.0 - IL_0003: bgt.s IL_000c - - IL_0005: ldsfld string [mscorlib]System.String::Empty - IL_000a: br.s IL_001b - - IL_000c: ldsfld string [mscorlib]System.String::Empty - IL_0011: ldc.i4.2 - IL_0012: ldarg.0 - IL_0013: mul - IL_0014: ldc.i4.s 32 - IL_0016: callvirt instance string [mscorlib]System.String::PadLeft(int32, - char) - IL_001b: stloc.0 - IL_001c: br.s IL_001e - - IL_001e: ldloc.0 - IL_001f: ret - } // end of method FormatUtils::GetPadding - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method FormatUtils::.ctor - -} // end of class MCCTest.FormatUtils - -.class public auto ansi beforefieldinit MCCTest.ResultVerificationException - extends [mscorlib]System.Exception -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(string fieldName, - int64 actual, - int64 expected) cil managed - { - // Code size 15 (0xf) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: conv.r8 - IL_0004: ldarg.3 - IL_0005: conv.r8 - IL_0006: call instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_000b: nop - IL_000c: nop - IL_000d: nop - IL_000e: ret - } // end of method ResultVerificationException::.ctor - - .method public hidebysig specialname rtspecialname - instance void .ctor(string fieldName, - float64 actual, - float64 expected) cil managed - { - // Code size 34 (0x22) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldstr "FAILED: [field {0}] => expected = {1}, actual = {2}" - IL_0006: ldarg.1 - IL_0007: ldarg.3 - IL_0008: box [mscorlib]System.Double - IL_000d: ldarg.2 - IL_000e: box [mscorlib]System.Double - IL_0013: call string [mscorlib]System.String::Format(string, - object, - object, - object) - IL_0018: ldnull - IL_0019: call instance void MCCTest.ResultVerificationException::.ctor(string, - class MCCTest.ResultVerificationException) - IL_001e: nop - IL_001f: nop - IL_0020: nop - IL_0021: ret - } // end of method ResultVerificationException::.ctor - - .method public hidebysig specialname rtspecialname - instance void .ctor(string fieldName, - class [mscorlib]System.Type 'type', - class MCCTest.ResultVerificationException innerException) cil managed - { - // Code size 28 (0x1c) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldstr "FAILED: [field {0}] [type '{1}']" - IL_0006: ldarg.1 - IL_0007: ldarg.2 - IL_0008: callvirt instance string [mscorlib]System.Object::ToString() - IL_000d: call string [mscorlib]System.String::Format(string, - object, - object) - IL_0012: ldarg.3 - IL_0013: call instance void MCCTest.ResultVerificationException::.ctor(string, - class MCCTest.ResultVerificationException) - IL_0018: nop - IL_0019: nop - IL_001a: nop - IL_001b: ret - } // end of method ResultVerificationException::.ctor - - .method public hidebysig specialname rtspecialname - instance void .ctor(string message) cil managed - { - // Code size 12 (0xc) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldnull - IL_0003: call instance void MCCTest.ResultVerificationException::.ctor(string, - class MCCTest.ResultVerificationException) - IL_0008: nop - IL_0009: nop - IL_000a: nop - IL_000b: ret - } // end of method ResultVerificationException::.ctor - - .method public hidebysig specialname rtspecialname - instance void .ctor(string message, - class MCCTest.ResultVerificationException innerException) cil managed - { - // Code size 12 (0xc) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: call instance void [mscorlib]System.Exception::.ctor(string, - class [mscorlib]System.Exception) - IL_0008: nop - IL_0009: nop - IL_000a: nop - IL_000b: ret - } // end of method ResultVerificationException::.ctor - - .method public hidebysig instance string - GetMessage() cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.0 - IL_0003: call instance string MCCTest.ResultVerificationException::GetMessage(int32) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method ResultVerificationException::GetMessage - - .method public hidebysig instance string - GetMessage(int32 level) cil managed - { - // Code size 67 (0x43) - .maxstack 7 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: call string MCCTest.FormatUtils::GetPadding(int32) - IL_0007: ldarg.0 - IL_0008: callvirt instance string [mscorlib]System.Exception::get_Message() - IL_000d: ldarg.0 - IL_000e: call instance class [mscorlib]System.Exception [mscorlib]System.Exception::get_InnerException() - IL_0013: brtrue.s IL_001c - - IL_0015: ldsfld string [mscorlib]System.String::Empty - IL_001a: br.s IL_0039 - - IL_001c: call string [System.Runtime.Extensions]System.Environment::get_NewLine() - IL_0021: ldarg.0 - IL_0022: call instance class [mscorlib]System.Exception [mscorlib]System.Exception::get_InnerException() - IL_0027: castclass MCCTest.ResultVerificationException - IL_002c: ldarg.1 - IL_002d: ldc.i4.1 - IL_002e: add - IL_002f: callvirt instance string MCCTest.ResultVerificationException::GetMessage(int32) - IL_0034: call string [mscorlib]System.String::Concat(string, - string) - IL_0039: call string [mscorlib]System.String::Concat(string, - string, - string) - IL_003e: stloc.0 - IL_003f: br.s IL_0041 - - IL_0041: ldloc.0 - IL_0042: ret - } // end of method ResultVerificationException::GetMessage - -} // end of class MCCTest.ResultVerificationException - -.class interface public abstract auto ansi MCCTest.CType`1 -{ - .method public hidebysig newslot abstract virtual - instance void Init(int32 count) cil managed - { - } // end of method CType`1::Init - - .method public hidebysig newslot abstract virtual - instance void Init() cil managed - { - } // end of method CType`1::Init - - .method public hidebysig newslot abstract virtual - instance void Zero() cil managed - { - } // end of method CType`1::Zero - - .method public hidebysig newslot abstract virtual - instance void Check(!T expected) cil managed - { - } // end of method CType`1::Check - -} // end of class MCCTest.CType`1 - -.class public sequential ansi sealed beforefieldinit MCCTest.VType0 - extends [mscorlib]System.ValueType - implements class MCCTest.CType`1 -{ - .field public int32 count - .field public int64 sum - .field public float64 average - .field public int64 dummy1 - .field public float64 dummy2 - .method public hidebysig newslot virtual final - instance void Init(int32 count) cil managed - { - // Code size 54 (0x36) - .maxstack 3 - .locals init (int32 V_0, - int64 V_1, - float64 V_2) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: stloc.0 - IL_0003: ldarg.1 - IL_0004: ldarg.1 - IL_0005: ldc.i4.1 - IL_0006: add - IL_0007: mul - IL_0008: ldc.i4.2 - IL_0009: div - IL_000a: conv.i8 - IL_000b: stloc.1 - IL_000c: ldloc.1 - IL_000d: conv.r8 - IL_000e: ldloc.0 - IL_000f: conv.r8 - IL_0010: div - IL_0011: stloc.2 - IL_0012: ldarg.0 - IL_0013: ldloc.0 - IL_0014: stfld int32 MCCTest.VType0::count - IL_0019: ldarg.0 - IL_001a: ldloc.1 - IL_001b: stfld int64 MCCTest.VType0::sum - IL_0020: ldarg.0 - IL_0021: ldloc.2 - IL_0022: stfld float64 MCCTest.VType0::average - IL_0027: ldarg.0 - IL_0028: ldloc.1 - IL_0029: stfld int64 MCCTest.VType0::dummy1 - IL_002e: ldarg.0 - IL_002f: ldloc.2 - IL_0030: stfld float64 MCCTest.VType0::dummy2 - IL_0035: ret - } // end of method VType0::Init - - .method public hidebysig newslot virtual final - instance void Init() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.1 - IL_0003: call instance void MCCTest.VType0::Init(int32) - IL_0008: nop - IL_0009: ret - } // end of method VType0::Init - - .method public hidebysig newslot virtual final - instance void Zero() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.0 - IL_0003: call instance void MCCTest.VType0::Init(int32) - IL_0008: nop - IL_0009: ret - } // end of method VType0::Zero - - .method public hidebysig newslot virtual final - instance void Check(valuetype MCCTest.VType0 expected) cil managed - { - // Code size 224 (0xe0) - .maxstack 4 - .locals init (bool V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldfld int32 MCCTest.VType0::count - IL_0007: ldarga.s expected - IL_0009: ldfld int32 MCCTest.VType0::count - IL_000e: ceq - IL_0010: stloc.0 - IL_0011: ldloc.0 - IL_0012: brtrue.s IL_002f - - IL_0014: nop - IL_0015: ldstr "count" - IL_001a: ldarg.0 - IL_001b: ldfld int32 MCCTest.VType0::count - IL_0020: conv.i8 - IL_0021: ldarga.s expected - IL_0023: ldfld int32 MCCTest.VType0::count - IL_0028: conv.i8 - IL_0029: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_002e: throw - - IL_002f: ldarg.0 - IL_0030: ldfld int64 MCCTest.VType0::sum - IL_0035: ldarga.s expected - IL_0037: ldfld int64 MCCTest.VType0::sum - IL_003c: ceq - IL_003e: stloc.0 - IL_003f: ldloc.0 - IL_0040: brtrue.s IL_005b - - IL_0042: nop - IL_0043: ldstr "sum" - IL_0048: ldarg.0 - IL_0049: ldfld int64 MCCTest.VType0::sum - IL_004e: ldarga.s expected - IL_0050: ldfld int64 MCCTest.VType0::sum - IL_0055: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_005a: throw - - IL_005b: ldarg.0 - IL_005c: ldfld float64 MCCTest.VType0::average - IL_0061: ldarga.s expected - IL_0063: ldfld float64 MCCTest.VType0::average - IL_0068: ceq - IL_006a: stloc.0 - IL_006b: ldloc.0 - IL_006c: brtrue.s IL_0087 - - IL_006e: nop - IL_006f: ldstr "average" - IL_0074: ldarg.0 - IL_0075: ldfld float64 MCCTest.VType0::average - IL_007a: ldarga.s expected - IL_007c: ldfld float64 MCCTest.VType0::average - IL_0081: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0086: throw - - IL_0087: ldarg.0 - IL_0088: ldfld int64 MCCTest.VType0::dummy1 - IL_008d: ldarga.s expected - IL_008f: ldfld int64 MCCTest.VType0::dummy1 - IL_0094: ceq - IL_0096: stloc.0 - IL_0097: ldloc.0 - IL_0098: brtrue.s IL_00b3 - - IL_009a: nop - IL_009b: ldstr "dummy1" - IL_00a0: ldarg.0 - IL_00a1: ldfld int64 MCCTest.VType0::dummy1 - IL_00a6: ldarga.s expected - IL_00a8: ldfld int64 MCCTest.VType0::dummy1 - IL_00ad: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_00b2: throw - - IL_00b3: ldarg.0 - IL_00b4: ldfld float64 MCCTest.VType0::dummy2 - IL_00b9: ldarga.s expected - IL_00bb: ldfld float64 MCCTest.VType0::dummy2 - IL_00c0: ceq - IL_00c2: stloc.0 - IL_00c3: ldloc.0 - IL_00c4: brtrue.s IL_00df - - IL_00c6: nop - IL_00c7: ldstr "dummy2" - IL_00cc: ldarg.0 - IL_00cd: ldfld float64 MCCTest.VType0::dummy2 - IL_00d2: ldarga.s expected - IL_00d4: ldfld float64 MCCTest.VType0::dummy2 - IL_00d9: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_00de: throw - - IL_00df: ret - } // end of method VType0::Check - - .method public hidebysig instance string - Dump(int32 level) cil managed - { - // Code size 170 (0xaa) - .maxstack 4 - .locals init (string V_0, - class [mscorlib]System.IO.StringWriter V_1, - string V_2) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: call string MCCTest.FormatUtils::GetPadding(int32) - IL_0007: stloc.0 - IL_0008: newobj instance void [mscorlib]System.IO.StringWriter::.ctor() - IL_000d: stloc.1 - IL_000e: ldloc.1 - IL_000f: ldloc.0 - IL_0010: ldstr "count = " - IL_0015: ldarg.0 - IL_0016: ldfld int32 MCCTest.VType0::count - IL_001b: box [mscorlib]System.Int32 - IL_0020: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0025: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_002a: nop - IL_002b: ldloc.1 - IL_002c: ldloc.0 - IL_002d: ldstr "sum = " - IL_0032: ldarg.0 - IL_0033: ldfld int64 MCCTest.VType0::sum - IL_0038: box [mscorlib]System.Int64 - IL_003d: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0042: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0047: nop - IL_0048: ldloc.1 - IL_0049: ldloc.0 - IL_004a: ldstr "average = " - IL_004f: ldarg.0 - IL_0050: ldfld float64 MCCTest.VType0::average - IL_0055: box [mscorlib]System.Double - IL_005a: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_005f: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0064: nop - IL_0065: ldloc.1 - IL_0066: ldloc.0 - IL_0067: ldstr "dummy1 = " - IL_006c: ldarg.0 - IL_006d: ldfld int64 MCCTest.VType0::dummy1 - IL_0072: box [mscorlib]System.Int64 - IL_0077: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_007c: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0081: nop - IL_0082: ldloc.1 - IL_0083: ldloc.0 - IL_0084: ldstr "dummy2 = " - IL_0089: ldarg.0 - IL_008a: ldfld float64 MCCTest.VType0::dummy2 - IL_008f: box [mscorlib]System.Double - IL_0094: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0099: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_009e: nop - IL_009f: ldloc.1 - IL_00a0: callvirt instance string [mscorlib]System.Object::ToString() - IL_00a5: stloc.2 - IL_00a6: br.s IL_00a8 - - IL_00a8: ldloc.2 - IL_00a9: ret - } // end of method VType0::Dump - - .method public hidebysig instance string - Dump() cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.0 - IL_0003: call instance string MCCTest.VType0::Dump(int32) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method VType0::Dump - -} // end of class MCCTest.VType0 - -.class public sequential ansi sealed beforefieldinit MCCTest.VType1 - extends [mscorlib]System.ValueType - implements class MCCTest.CType`1 -{ - .field public float32 count - .field public float32 sum - .field public float32 average - .field public float32 count1 - .field public float32 sum1 - .field public float32 average1 - .field public float32 count2 - .field public float32 sum2 - .field public float32 average2 - .field public float32 count3 - .field public float32 sum3 - .field public float32 average3 - .field public float32 count4 - .field public float32 sum4 - .field public float32 average4 - .field public float32 count5 - .field public float32 sum5 - .field public float32 average5 - .method public hidebysig newslot virtual final - instance void Init(int32 count) cil managed - { - // Code size 159 (0x9f) - .maxstack 3 - .locals init (float32 V_0, - float32 V_1, - float32 V_2) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: conv.r4 - IL_0003: stloc.0 - IL_0004: ldarg.1 - IL_0005: ldarg.1 - IL_0006: ldc.i4.1 - IL_0007: add - IL_0008: mul - IL_0009: ldc.i4.2 - IL_000a: div - IL_000b: conv.r4 - IL_000c: stloc.1 - IL_000d: ldloc.0 - IL_000e: ldc.r4 0.0 - IL_0013: bgt.s IL_001c - - IL_0015: ldc.r4 0.0 - IL_001a: br.s IL_001f - - IL_001c: ldloc.1 - IL_001d: ldloc.0 - IL_001e: div - IL_001f: stloc.2 - IL_0020: ldarg.0 - IL_0021: ldloc.0 - IL_0022: stfld float32 MCCTest.VType1::count - IL_0027: ldarg.0 - IL_0028: ldloc.1 - IL_0029: stfld float32 MCCTest.VType1::sum - IL_002e: ldarg.0 - IL_002f: ldloc.2 - IL_0030: stfld float32 MCCTest.VType1::average - IL_0035: ldarg.0 - IL_0036: ldloc.0 - IL_0037: stfld float32 MCCTest.VType1::count1 - IL_003c: ldarg.0 - IL_003d: ldloc.1 - IL_003e: stfld float32 MCCTest.VType1::sum1 - IL_0043: ldarg.0 - IL_0044: ldloc.2 - IL_0045: stfld float32 MCCTest.VType1::average1 - IL_004a: ldarg.0 - IL_004b: ldloc.0 - IL_004c: stfld float32 MCCTest.VType1::count2 - IL_0051: ldarg.0 - IL_0052: ldloc.1 - IL_0053: stfld float32 MCCTest.VType1::sum2 - IL_0058: ldarg.0 - IL_0059: ldloc.2 - IL_005a: stfld float32 MCCTest.VType1::average2 - IL_005f: ldarg.0 - IL_0060: ldloc.0 - IL_0061: stfld float32 MCCTest.VType1::count3 - IL_0066: ldarg.0 - IL_0067: ldloc.1 - IL_0068: stfld float32 MCCTest.VType1::sum3 - IL_006d: ldarg.0 - IL_006e: ldloc.2 - IL_006f: stfld float32 MCCTest.VType1::average3 - IL_0074: ldarg.0 - IL_0075: ldloc.0 - IL_0076: stfld float32 MCCTest.VType1::count4 - IL_007b: ldarg.0 - IL_007c: ldloc.1 - IL_007d: stfld float32 MCCTest.VType1::sum4 - IL_0082: ldarg.0 - IL_0083: ldloc.2 - IL_0084: stfld float32 MCCTest.VType1::average4 - IL_0089: ldarg.0 - IL_008a: ldloc.0 - IL_008b: stfld float32 MCCTest.VType1::count5 - IL_0090: ldarg.0 - IL_0091: ldloc.1 - IL_0092: stfld float32 MCCTest.VType1::sum5 - IL_0097: ldarg.0 - IL_0098: ldloc.2 - IL_0099: stfld float32 MCCTest.VType1::average5 - IL_009e: ret - } // end of method VType1::Init - - .method public hidebysig newslot virtual final - instance void Init() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.1 - IL_0003: call instance void MCCTest.VType1::Init(int32) - IL_0008: nop - IL_0009: ret - } // end of method VType1::Init - - .method public hidebysig newslot virtual final - instance void Zero() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.0 - IL_0003: call instance void MCCTest.VType1::Init(int32) - IL_0008: nop - IL_0009: ret - } // end of method VType1::Zero - - .method public hidebysig newslot virtual final - instance void Check(valuetype MCCTest.VType1 expected) cil managed - { - // Code size 830 (0x33e) - .maxstack 4 - .locals init (bool V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldfld float32 MCCTest.VType1::count - IL_0007: ldarga.s expected - IL_0009: ldfld float32 MCCTest.VType1::count - IL_000e: ceq - IL_0010: stloc.0 - IL_0011: ldloc.0 - IL_0012: brtrue.s IL_002f - - IL_0014: nop - IL_0015: ldstr "count" - IL_001a: ldarg.0 - IL_001b: ldfld float32 MCCTest.VType1::count - IL_0020: conv.r8 - IL_0021: ldarga.s expected - IL_0023: ldfld float32 MCCTest.VType1::count - IL_0028: conv.r8 - IL_0029: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_002e: throw - - IL_002f: ldarg.0 - IL_0030: ldfld float32 MCCTest.VType1::sum - IL_0035: ldarga.s expected - IL_0037: ldfld float32 MCCTest.VType1::sum - IL_003c: ceq - IL_003e: stloc.0 - IL_003f: ldloc.0 - IL_0040: brtrue.s IL_005d - - IL_0042: nop - IL_0043: ldstr "sum" - IL_0048: ldarg.0 - IL_0049: ldfld float32 MCCTest.VType1::sum - IL_004e: conv.r8 - IL_004f: ldarga.s expected - IL_0051: ldfld float32 MCCTest.VType1::sum - IL_0056: conv.r8 - IL_0057: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_005c: throw - - IL_005d: ldarg.0 - IL_005e: ldfld float32 MCCTest.VType1::average - IL_0063: ldarga.s expected - IL_0065: ldfld float32 MCCTest.VType1::average - IL_006a: ceq - IL_006c: stloc.0 - IL_006d: ldloc.0 - IL_006e: brtrue.s IL_008b - - IL_0070: nop - IL_0071: ldstr "average" - IL_0076: ldarg.0 - IL_0077: ldfld float32 MCCTest.VType1::average - IL_007c: conv.r8 - IL_007d: ldarga.s expected - IL_007f: ldfld float32 MCCTest.VType1::average - IL_0084: conv.r8 - IL_0085: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_008a: throw - - IL_008b: ldarg.0 - IL_008c: ldfld float32 MCCTest.VType1::count1 - IL_0091: ldarga.s expected - IL_0093: ldfld float32 MCCTest.VType1::count1 - IL_0098: ceq - IL_009a: stloc.0 - IL_009b: ldloc.0 - IL_009c: brtrue.s IL_00b9 - - IL_009e: nop - IL_009f: ldstr "count1" - IL_00a4: ldarg.0 - IL_00a5: ldfld float32 MCCTest.VType1::count1 - IL_00aa: conv.r8 - IL_00ab: ldarga.s expected - IL_00ad: ldfld float32 MCCTest.VType1::count1 - IL_00b2: conv.r8 - IL_00b3: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_00b8: throw - - IL_00b9: ldarg.0 - IL_00ba: ldfld float32 MCCTest.VType1::sum1 - IL_00bf: ldarga.s expected - IL_00c1: ldfld float32 MCCTest.VType1::sum1 - IL_00c6: ceq - IL_00c8: stloc.0 - IL_00c9: ldloc.0 - IL_00ca: brtrue.s IL_00e7 - - IL_00cc: nop - IL_00cd: ldstr "sum1" - IL_00d2: ldarg.0 - IL_00d3: ldfld float32 MCCTest.VType1::sum1 - IL_00d8: conv.r8 - IL_00d9: ldarga.s expected - IL_00db: ldfld float32 MCCTest.VType1::sum1 - IL_00e0: conv.r8 - IL_00e1: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_00e6: throw - - IL_00e7: ldarg.0 - IL_00e8: ldfld float32 MCCTest.VType1::average1 - IL_00ed: ldarga.s expected - IL_00ef: ldfld float32 MCCTest.VType1::average1 - IL_00f4: ceq - IL_00f6: stloc.0 - IL_00f7: ldloc.0 - IL_00f8: brtrue.s IL_0115 - - IL_00fa: nop - IL_00fb: ldstr "average1" - IL_0100: ldarg.0 - IL_0101: ldfld float32 MCCTest.VType1::average1 - IL_0106: conv.r8 - IL_0107: ldarga.s expected - IL_0109: ldfld float32 MCCTest.VType1::average1 - IL_010e: conv.r8 - IL_010f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0114: throw - - IL_0115: ldarg.0 - IL_0116: ldfld float32 MCCTest.VType1::count2 - IL_011b: ldarga.s expected - IL_011d: ldfld float32 MCCTest.VType1::count2 - IL_0122: ceq - IL_0124: stloc.0 - IL_0125: ldloc.0 - IL_0126: brtrue.s IL_0143 - - IL_0128: nop - IL_0129: ldstr "count2" - IL_012e: ldarg.0 - IL_012f: ldfld float32 MCCTest.VType1::count2 - IL_0134: conv.r8 - IL_0135: ldarga.s expected - IL_0137: ldfld float32 MCCTest.VType1::count2 - IL_013c: conv.r8 - IL_013d: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0142: throw - - IL_0143: ldarg.0 - IL_0144: ldfld float32 MCCTest.VType1::sum2 - IL_0149: ldarga.s expected - IL_014b: ldfld float32 MCCTest.VType1::sum2 - IL_0150: ceq - IL_0152: stloc.0 - IL_0153: ldloc.0 - IL_0154: brtrue.s IL_0171 - - IL_0156: nop - IL_0157: ldstr "sum2" - IL_015c: ldarg.0 - IL_015d: ldfld float32 MCCTest.VType1::sum2 - IL_0162: conv.r8 - IL_0163: ldarga.s expected - IL_0165: ldfld float32 MCCTest.VType1::sum2 - IL_016a: conv.r8 - IL_016b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0170: throw - - IL_0171: ldarg.0 - IL_0172: ldfld float32 MCCTest.VType1::average2 - IL_0177: ldarga.s expected - IL_0179: ldfld float32 MCCTest.VType1::average2 - IL_017e: ceq - IL_0180: stloc.0 - IL_0181: ldloc.0 - IL_0182: brtrue.s IL_019f - - IL_0184: nop - IL_0185: ldstr "average2" - IL_018a: ldarg.0 - IL_018b: ldfld float32 MCCTest.VType1::average2 - IL_0190: conv.r8 - IL_0191: ldarga.s expected - IL_0193: ldfld float32 MCCTest.VType1::average2 - IL_0198: conv.r8 - IL_0199: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_019e: throw - - IL_019f: ldarg.0 - IL_01a0: ldfld float32 MCCTest.VType1::count3 - IL_01a5: ldarga.s expected - IL_01a7: ldfld float32 MCCTest.VType1::count3 - IL_01ac: ceq - IL_01ae: stloc.0 - IL_01af: ldloc.0 - IL_01b0: brtrue.s IL_01cd - - IL_01b2: nop - IL_01b3: ldstr "count3" - IL_01b8: ldarg.0 - IL_01b9: ldfld float32 MCCTest.VType1::count3 - IL_01be: conv.r8 - IL_01bf: ldarga.s expected - IL_01c1: ldfld float32 MCCTest.VType1::count3 - IL_01c6: conv.r8 - IL_01c7: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_01cc: throw - - IL_01cd: ldarg.0 - IL_01ce: ldfld float32 MCCTest.VType1::sum3 - IL_01d3: ldarga.s expected - IL_01d5: ldfld float32 MCCTest.VType1::sum3 - IL_01da: ceq - IL_01dc: stloc.0 - IL_01dd: ldloc.0 - IL_01de: brtrue.s IL_01fb - - IL_01e0: nop - IL_01e1: ldstr "sum3" - IL_01e6: ldarg.0 - IL_01e7: ldfld float32 MCCTest.VType1::sum3 - IL_01ec: conv.r8 - IL_01ed: ldarga.s expected - IL_01ef: ldfld float32 MCCTest.VType1::sum3 - IL_01f4: conv.r8 - IL_01f5: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_01fa: throw - - IL_01fb: ldarg.0 - IL_01fc: ldfld float32 MCCTest.VType1::average3 - IL_0201: ldarga.s expected - IL_0203: ldfld float32 MCCTest.VType1::average3 - IL_0208: ceq - IL_020a: stloc.0 - IL_020b: ldloc.0 - IL_020c: brtrue.s IL_0229 - - IL_020e: nop - IL_020f: ldstr "average3" - IL_0214: ldarg.0 - IL_0215: ldfld float32 MCCTest.VType1::average3 - IL_021a: conv.r8 - IL_021b: ldarga.s expected - IL_021d: ldfld float32 MCCTest.VType1::average3 - IL_0222: conv.r8 - IL_0223: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0228: throw - - IL_0229: ldarg.0 - IL_022a: ldfld float32 MCCTest.VType1::count4 - IL_022f: ldarga.s expected - IL_0231: ldfld float32 MCCTest.VType1::count4 - IL_0236: ceq - IL_0238: stloc.0 - IL_0239: ldloc.0 - IL_023a: brtrue.s IL_0257 - - IL_023c: nop - IL_023d: ldstr "count4" - IL_0242: ldarg.0 - IL_0243: ldfld float32 MCCTest.VType1::count4 - IL_0248: conv.r8 - IL_0249: ldarga.s expected - IL_024b: ldfld float32 MCCTest.VType1::count4 - IL_0250: conv.r8 - IL_0251: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0256: throw - - IL_0257: ldarg.0 - IL_0258: ldfld float32 MCCTest.VType1::sum4 - IL_025d: ldarga.s expected - IL_025f: ldfld float32 MCCTest.VType1::sum4 - IL_0264: ceq - IL_0266: stloc.0 - IL_0267: ldloc.0 - IL_0268: brtrue.s IL_0285 - - IL_026a: nop - IL_026b: ldstr "sum4" - IL_0270: ldarg.0 - IL_0271: ldfld float32 MCCTest.VType1::sum4 - IL_0276: conv.r8 - IL_0277: ldarga.s expected - IL_0279: ldfld float32 MCCTest.VType1::sum4 - IL_027e: conv.r8 - IL_027f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0284: throw - - IL_0285: ldarg.0 - IL_0286: ldfld float32 MCCTest.VType1::average4 - IL_028b: ldarga.s expected - IL_028d: ldfld float32 MCCTest.VType1::average4 - IL_0292: ceq - IL_0294: stloc.0 - IL_0295: ldloc.0 - IL_0296: brtrue.s IL_02b3 - - IL_0298: nop - IL_0299: ldstr "average4" - IL_029e: ldarg.0 - IL_029f: ldfld float32 MCCTest.VType1::average4 - IL_02a4: conv.r8 - IL_02a5: ldarga.s expected - IL_02a7: ldfld float32 MCCTest.VType1::average4 - IL_02ac: conv.r8 - IL_02ad: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_02b2: throw - - IL_02b3: ldarg.0 - IL_02b4: ldfld float32 MCCTest.VType1::count5 - IL_02b9: ldarga.s expected - IL_02bb: ldfld float32 MCCTest.VType1::count5 - IL_02c0: ceq - IL_02c2: stloc.0 - IL_02c3: ldloc.0 - IL_02c4: brtrue.s IL_02e1 - - IL_02c6: nop - IL_02c7: ldstr "count5" - IL_02cc: ldarg.0 - IL_02cd: ldfld float32 MCCTest.VType1::count5 - IL_02d2: conv.r8 - IL_02d3: ldarga.s expected - IL_02d5: ldfld float32 MCCTest.VType1::count5 - IL_02da: conv.r8 - IL_02db: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_02e0: throw - - IL_02e1: ldarg.0 - IL_02e2: ldfld float32 MCCTest.VType1::sum5 - IL_02e7: ldarga.s expected - IL_02e9: ldfld float32 MCCTest.VType1::sum5 - IL_02ee: ceq - IL_02f0: stloc.0 - IL_02f1: ldloc.0 - IL_02f2: brtrue.s IL_030f - - IL_02f4: nop - IL_02f5: ldstr "sum5" - IL_02fa: ldarg.0 - IL_02fb: ldfld float32 MCCTest.VType1::sum5 - IL_0300: conv.r8 - IL_0301: ldarga.s expected - IL_0303: ldfld float32 MCCTest.VType1::sum5 - IL_0308: conv.r8 - IL_0309: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_030e: throw - - IL_030f: ldarg.0 - IL_0310: ldfld float32 MCCTest.VType1::average5 - IL_0315: ldarga.s expected - IL_0317: ldfld float32 MCCTest.VType1::average5 - IL_031c: ceq - IL_031e: stloc.0 - IL_031f: ldloc.0 - IL_0320: brtrue.s IL_033d - - IL_0322: nop - IL_0323: ldstr "average5" - IL_0328: ldarg.0 - IL_0329: ldfld float32 MCCTest.VType1::average5 - IL_032e: conv.r8 - IL_032f: ldarga.s expected - IL_0331: ldfld float32 MCCTest.VType1::average5 - IL_0336: conv.r8 - IL_0337: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_033c: throw - - IL_033d: ret - } // end of method VType1::Check - - .method public hidebysig instance string - Dump(int32 level) cil managed - { - // Code size 547 (0x223) - .maxstack 4 - .locals init (string V_0, - class [mscorlib]System.IO.StringWriter V_1, - string V_2) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: call string MCCTest.FormatUtils::GetPadding(int32) - IL_0007: stloc.0 - IL_0008: newobj instance void [mscorlib]System.IO.StringWriter::.ctor() - IL_000d: stloc.1 - IL_000e: ldloc.1 - IL_000f: ldloc.0 - IL_0010: ldstr "count = " - IL_0015: ldarg.0 - IL_0016: ldfld float32 MCCTest.VType1::count - IL_001b: box [mscorlib]System.Single - IL_0020: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0025: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_002a: nop - IL_002b: ldloc.1 - IL_002c: ldloc.0 - IL_002d: ldstr "sum = " - IL_0032: ldarg.0 - IL_0033: ldfld float32 MCCTest.VType1::sum - IL_0038: box [mscorlib]System.Single - IL_003d: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0042: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0047: nop - IL_0048: ldloc.1 - IL_0049: ldloc.0 - IL_004a: ldstr "average = " - IL_004f: ldarg.0 - IL_0050: ldfld float32 MCCTest.VType1::average - IL_0055: box [mscorlib]System.Single - IL_005a: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_005f: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0064: nop - IL_0065: ldloc.1 - IL_0066: ldloc.0 - IL_0067: ldstr "count1 = " - IL_006c: ldarg.0 - IL_006d: ldfld float32 MCCTest.VType1::count1 - IL_0072: box [mscorlib]System.Single - IL_0077: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_007c: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0081: nop - IL_0082: ldloc.1 - IL_0083: ldloc.0 - IL_0084: ldstr "sum1 = " - IL_0089: ldarg.0 - IL_008a: ldfld float32 MCCTest.VType1::sum1 - IL_008f: box [mscorlib]System.Single - IL_0094: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0099: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_009e: nop - IL_009f: ldloc.1 - IL_00a0: ldloc.0 - IL_00a1: ldstr "average1 = " - IL_00a6: ldarg.0 - IL_00a7: ldfld float32 MCCTest.VType1::average1 - IL_00ac: box [mscorlib]System.Single - IL_00b1: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_00b6: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_00bb: nop - IL_00bc: ldloc.1 - IL_00bd: ldloc.0 - IL_00be: ldstr "count2 = " - IL_00c3: ldarg.0 - IL_00c4: ldfld float32 MCCTest.VType1::count2 - IL_00c9: box [mscorlib]System.Single - IL_00ce: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_00d3: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_00d8: nop - IL_00d9: ldloc.1 - IL_00da: ldloc.0 - IL_00db: ldstr "sum2 = " - IL_00e0: ldarg.0 - IL_00e1: ldfld float32 MCCTest.VType1::sum2 - IL_00e6: box [mscorlib]System.Single - IL_00eb: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_00f0: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_00f5: nop - IL_00f6: ldloc.1 - IL_00f7: ldloc.0 - IL_00f8: ldstr "average2 = " - IL_00fd: ldarg.0 - IL_00fe: ldfld float32 MCCTest.VType1::average2 - IL_0103: box [mscorlib]System.Single - IL_0108: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_010d: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0112: nop - IL_0113: ldloc.1 - IL_0114: ldloc.0 - IL_0115: ldstr "count3 = " - IL_011a: ldarg.0 - IL_011b: ldfld float32 MCCTest.VType1::count3 - IL_0120: box [mscorlib]System.Single - IL_0125: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_012a: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_012f: nop - IL_0130: ldloc.1 - IL_0131: ldloc.0 - IL_0132: ldstr "sum3 = " - IL_0137: ldarg.0 - IL_0138: ldfld float32 MCCTest.VType1::sum3 - IL_013d: box [mscorlib]System.Single - IL_0142: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0147: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_014c: nop - IL_014d: ldloc.1 - IL_014e: ldloc.0 - IL_014f: ldstr "average3 = " - IL_0154: ldarg.0 - IL_0155: ldfld float32 MCCTest.VType1::average3 - IL_015a: box [mscorlib]System.Single - IL_015f: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0164: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0169: nop - IL_016a: ldloc.1 - IL_016b: ldloc.0 - IL_016c: ldstr "count4 = " - IL_0171: ldarg.0 - IL_0172: ldfld float32 MCCTest.VType1::count4 - IL_0177: box [mscorlib]System.Single - IL_017c: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0181: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0186: nop - IL_0187: ldloc.1 - IL_0188: ldloc.0 - IL_0189: ldstr "sum4 = " - IL_018e: ldarg.0 - IL_018f: ldfld float32 MCCTest.VType1::sum4 - IL_0194: box [mscorlib]System.Single - IL_0199: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_019e: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_01a3: nop - IL_01a4: ldloc.1 - IL_01a5: ldloc.0 - IL_01a6: ldstr "average4 = " - IL_01ab: ldarg.0 - IL_01ac: ldfld float32 MCCTest.VType1::average4 - IL_01b1: box [mscorlib]System.Single - IL_01b6: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_01bb: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_01c0: nop - IL_01c1: ldloc.1 - IL_01c2: ldloc.0 - IL_01c3: ldstr "count5 = " - IL_01c8: ldarg.0 - IL_01c9: ldfld float32 MCCTest.VType1::count5 - IL_01ce: box [mscorlib]System.Single - IL_01d3: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_01d8: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_01dd: nop - IL_01de: ldloc.1 - IL_01df: ldloc.0 - IL_01e0: ldstr "sum5 = " - IL_01e5: ldarg.0 - IL_01e6: ldfld float32 MCCTest.VType1::sum5 - IL_01eb: box [mscorlib]System.Single - IL_01f0: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_01f5: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_01fa: nop - IL_01fb: ldloc.1 - IL_01fc: ldloc.0 - IL_01fd: ldstr "average5 = " - IL_0202: ldarg.0 - IL_0203: ldfld float32 MCCTest.VType1::average5 - IL_0208: box [mscorlib]System.Single - IL_020d: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0212: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0217: nop - IL_0218: ldloc.1 - IL_0219: callvirt instance string [mscorlib]System.Object::ToString() - IL_021e: stloc.2 - IL_021f: br.s IL_0221 - - IL_0221: ldloc.2 - IL_0222: ret - } // end of method VType1::Dump - - .method public hidebysig instance string - Dump() cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.0 - IL_0003: call instance string MCCTest.VType1::Dump(int32) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method VType1::Dump - -} // end of class MCCTest.VType1 - -.class public sequential ansi sealed beforefieldinit MCCTest.VType2 - extends [mscorlib]System.ValueType - implements class MCCTest.CType`1 -{ - .field public int32 f1 - .field public float32 f2 - .field public int16 f3 - .field public float64 f4 - .field public int64 f5 - .field public float32 f6 - .field public float64 f7 - .field public char f8 - .method public hidebysig newslot virtual final - instance void Init(int32 count) cil managed - { - // Code size 65 (0x41) - .maxstack 2 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldarg.1 - IL_0003: stfld int32 MCCTest.VType2::f1 - IL_0008: ldarg.0 - IL_0009: ldarg.1 - IL_000a: conv.r4 - IL_000b: stfld float32 MCCTest.VType2::f2 - IL_0010: ldarg.0 - IL_0011: ldarg.1 - IL_0012: conv.i2 - IL_0013: stfld int16 MCCTest.VType2::f3 - IL_0018: ldarg.0 - IL_0019: ldarg.1 - IL_001a: conv.r8 - IL_001b: stfld float64 MCCTest.VType2::f4 - IL_0020: ldarg.0 - IL_0021: ldarg.1 - IL_0022: conv.i8 - IL_0023: stfld int64 MCCTest.VType2::f5 - IL_0028: ldarg.0 - IL_0029: ldarg.1 - IL_002a: conv.r4 - IL_002b: stfld float32 MCCTest.VType2::f6 - IL_0030: ldarg.0 - IL_0031: ldarg.1 - IL_0032: conv.r8 - IL_0033: stfld float64 MCCTest.VType2::f7 - IL_0038: ldarg.0 - IL_0039: ldarg.1 - IL_003a: conv.u2 - IL_003b: stfld char MCCTest.VType2::f8 - IL_0040: ret - } // end of method VType2::Init - - .method public hidebysig newslot virtual final - instance void Init() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.1 - IL_0003: call instance void MCCTest.VType2::Init(int32) - IL_0008: nop - IL_0009: ret - } // end of method VType2::Init - - .method public hidebysig newslot virtual final - instance void Zero() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.0 - IL_0003: call instance void MCCTest.VType2::Init(int32) - IL_0008: nop - IL_0009: ret - } // end of method VType2::Zero - - .method public hidebysig instance void - Add(valuetype MCCTest.VType2 val) cil managed - { - // Code size 164 (0xa4) - .maxstack 3 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: dup - IL_0003: ldfld int32 MCCTest.VType2::f1 - IL_0008: ldarga.s val - IL_000a: ldfld int32 MCCTest.VType2::f1 - IL_000f: add - IL_0010: stfld int32 MCCTest.VType2::f1 - IL_0015: ldarg.0 - IL_0016: dup - IL_0017: ldfld float32 MCCTest.VType2::f2 - IL_001c: ldarga.s val - IL_001e: ldfld float32 MCCTest.VType2::f2 - IL_0023: add - IL_0024: stfld float32 MCCTest.VType2::f2 - IL_0029: ldarg.0 - IL_002a: dup - IL_002b: ldfld int16 MCCTest.VType2::f3 - IL_0030: ldarga.s val - IL_0032: ldfld int16 MCCTest.VType2::f3 - IL_0037: add - IL_0038: conv.i2 - IL_0039: stfld int16 MCCTest.VType2::f3 - IL_003e: ldarg.0 - IL_003f: dup - IL_0040: ldfld float64 MCCTest.VType2::f4 - IL_0045: ldarga.s val - IL_0047: ldfld float64 MCCTest.VType2::f4 - IL_004c: add - IL_004d: stfld float64 MCCTest.VType2::f4 - IL_0052: ldarg.0 - IL_0053: dup - IL_0054: ldfld int64 MCCTest.VType2::f5 - IL_0059: ldarga.s val - IL_005b: ldfld int64 MCCTest.VType2::f5 - IL_0060: add - IL_0061: stfld int64 MCCTest.VType2::f5 - IL_0066: ldarg.0 - IL_0067: dup - IL_0068: ldfld float32 MCCTest.VType2::f6 - IL_006d: ldarga.s val - IL_006f: ldfld float32 MCCTest.VType2::f6 - IL_0074: add - IL_0075: stfld float32 MCCTest.VType2::f6 - IL_007a: ldarg.0 - IL_007b: dup - IL_007c: ldfld float64 MCCTest.VType2::f7 - IL_0081: ldarga.s val - IL_0083: ldfld float64 MCCTest.VType2::f7 - IL_0088: add - IL_0089: stfld float64 MCCTest.VType2::f7 - IL_008e: ldarg.0 - IL_008f: dup - IL_0090: ldfld char MCCTest.VType2::f8 - IL_0095: ldarga.s val - IL_0097: ldfld char MCCTest.VType2::f8 - IL_009c: add - IL_009d: conv.u2 - IL_009e: stfld char MCCTest.VType2::f8 - IL_00a3: ret - } // end of method VType2::Add - - .method public hidebysig newslot virtual final - instance void Check(valuetype MCCTest.VType2 expected) cil managed - { - // Code size 364 (0x16c) - .maxstack 4 - .locals init (bool V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldfld int32 MCCTest.VType2::f1 - IL_0007: ldarga.s expected - IL_0009: ldfld int32 MCCTest.VType2::f1 - IL_000e: ceq - IL_0010: stloc.0 - IL_0011: ldloc.0 - IL_0012: brtrue.s IL_002f - - IL_0014: nop - IL_0015: ldstr "f1" - IL_001a: ldarg.0 - IL_001b: ldfld int32 MCCTest.VType2::f1 - IL_0020: conv.i8 - IL_0021: ldarga.s expected - IL_0023: ldfld int32 MCCTest.VType2::f1 - IL_0028: conv.i8 - IL_0029: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_002e: throw - - IL_002f: ldarg.0 - IL_0030: ldfld float32 MCCTest.VType2::f2 - IL_0035: ldarga.s expected - IL_0037: ldfld float32 MCCTest.VType2::f2 - IL_003c: ceq - IL_003e: stloc.0 - IL_003f: ldloc.0 - IL_0040: brtrue.s IL_005d - - IL_0042: nop - IL_0043: ldstr "f2" - IL_0048: ldarg.0 - IL_0049: ldfld float32 MCCTest.VType2::f2 - IL_004e: conv.r8 - IL_004f: ldarga.s expected - IL_0051: ldfld float32 MCCTest.VType2::f2 - IL_0056: conv.r8 - IL_0057: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_005c: throw - - IL_005d: ldarg.0 - IL_005e: ldfld int16 MCCTest.VType2::f3 - IL_0063: ldarga.s expected - IL_0065: ldfld int16 MCCTest.VType2::f3 - IL_006a: ceq - IL_006c: stloc.0 - IL_006d: ldloc.0 - IL_006e: brtrue.s IL_008b - - IL_0070: nop - IL_0071: ldstr "f3" - IL_0076: ldarg.0 - IL_0077: ldfld int16 MCCTest.VType2::f3 - IL_007c: conv.i8 - IL_007d: ldarga.s expected - IL_007f: ldfld int16 MCCTest.VType2::f3 - IL_0084: conv.i8 - IL_0085: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_008a: throw - - IL_008b: ldarg.0 - IL_008c: ldfld float64 MCCTest.VType2::f4 - IL_0091: ldarga.s expected - IL_0093: ldfld float64 MCCTest.VType2::f4 - IL_0098: ceq - IL_009a: stloc.0 - IL_009b: ldloc.0 - IL_009c: brtrue.s IL_00b7 - - IL_009e: nop - IL_009f: ldstr "f4" - IL_00a4: ldarg.0 - IL_00a5: ldfld float64 MCCTest.VType2::f4 - IL_00aa: ldarga.s expected - IL_00ac: ldfld float64 MCCTest.VType2::f4 - IL_00b1: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_00b6: throw - - IL_00b7: ldarg.0 - IL_00b8: ldfld int64 MCCTest.VType2::f5 - IL_00bd: ldarga.s expected - IL_00bf: ldfld int64 MCCTest.VType2::f5 - IL_00c4: ceq - IL_00c6: stloc.0 - IL_00c7: ldloc.0 - IL_00c8: brtrue.s IL_00e3 - - IL_00ca: nop - IL_00cb: ldstr "f5" - IL_00d0: ldarg.0 - IL_00d1: ldfld int64 MCCTest.VType2::f5 - IL_00d6: ldarga.s expected - IL_00d8: ldfld int64 MCCTest.VType2::f5 - IL_00dd: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_00e2: throw - - IL_00e3: ldarg.0 - IL_00e4: ldfld float32 MCCTest.VType2::f6 - IL_00e9: ldarga.s expected - IL_00eb: ldfld float32 MCCTest.VType2::f6 - IL_00f0: ceq - IL_00f2: stloc.0 - IL_00f3: ldloc.0 - IL_00f4: brtrue.s IL_0111 - - IL_00f6: nop - IL_00f7: ldstr "f6" - IL_00fc: ldarg.0 - IL_00fd: ldfld float32 MCCTest.VType2::f6 - IL_0102: conv.r8 - IL_0103: ldarga.s expected - IL_0105: ldfld float32 MCCTest.VType2::f6 - IL_010a: conv.r8 - IL_010b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0110: throw - - IL_0111: ldarg.0 - IL_0112: ldfld float64 MCCTest.VType2::f7 - IL_0117: ldarga.s expected - IL_0119: ldfld float64 MCCTest.VType2::f7 - IL_011e: ceq - IL_0120: stloc.0 - IL_0121: ldloc.0 - IL_0122: brtrue.s IL_013d - - IL_0124: nop - IL_0125: ldstr "f7" - IL_012a: ldarg.0 - IL_012b: ldfld float64 MCCTest.VType2::f7 - IL_0130: ldarga.s expected - IL_0132: ldfld float64 MCCTest.VType2::f7 - IL_0137: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_013c: throw - - IL_013d: ldarg.0 - IL_013e: ldfld char MCCTest.VType2::f8 - IL_0143: ldarga.s expected - IL_0145: ldfld char MCCTest.VType2::f8 - IL_014a: ceq - IL_014c: stloc.0 - IL_014d: ldloc.0 - IL_014e: brtrue.s IL_016b - - IL_0150: nop - IL_0151: ldstr "f8" - IL_0156: ldarg.0 - IL_0157: ldfld char MCCTest.VType2::f8 - IL_015c: conv.u8 - IL_015d: ldarga.s expected - IL_015f: ldfld char MCCTest.VType2::f8 - IL_0164: conv.u8 - IL_0165: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_016a: throw - - IL_016b: ret - } // end of method VType2::Check - - .method public hidebysig instance string - Dump(int32 level) cil managed - { - // Code size 257 (0x101) - .maxstack 4 - .locals init (string V_0, - class [mscorlib]System.IO.StringWriter V_1, - string V_2) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: call string MCCTest.FormatUtils::GetPadding(int32) - IL_0007: stloc.0 - IL_0008: newobj instance void [mscorlib]System.IO.StringWriter::.ctor() - IL_000d: stloc.1 - IL_000e: ldloc.1 - IL_000f: ldloc.0 - IL_0010: ldstr "f1 = " - IL_0015: ldarg.0 - IL_0016: ldfld int32 MCCTest.VType2::f1 - IL_001b: box [mscorlib]System.Int32 - IL_0020: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0025: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_002a: nop - IL_002b: ldloc.1 - IL_002c: ldloc.0 - IL_002d: ldstr "f2 = " - IL_0032: ldarg.0 - IL_0033: ldfld float32 MCCTest.VType2::f2 - IL_0038: box [mscorlib]System.Single - IL_003d: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0042: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0047: nop - IL_0048: ldloc.1 - IL_0049: ldloc.0 - IL_004a: ldstr "f3 = " - IL_004f: ldarg.0 - IL_0050: ldfld int16 MCCTest.VType2::f3 - IL_0055: box [mscorlib]System.Int16 - IL_005a: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_005f: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0064: nop - IL_0065: ldloc.1 - IL_0066: ldloc.0 - IL_0067: ldstr "f4 = " - IL_006c: ldarg.0 - IL_006d: ldfld float64 MCCTest.VType2::f4 - IL_0072: box [mscorlib]System.Double - IL_0077: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_007c: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0081: nop - IL_0082: ldloc.1 - IL_0083: ldloc.0 - IL_0084: ldstr "f5 = " - IL_0089: ldarg.0 - IL_008a: ldfld int64 MCCTest.VType2::f5 - IL_008f: box [mscorlib]System.Int64 - IL_0094: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0099: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_009e: nop - IL_009f: ldloc.1 - IL_00a0: ldloc.0 - IL_00a1: ldstr "f6 = " - IL_00a6: ldarg.0 - IL_00a7: ldfld float32 MCCTest.VType2::f6 - IL_00ac: box [mscorlib]System.Single - IL_00b1: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_00b6: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_00bb: nop - IL_00bc: ldloc.1 - IL_00bd: ldloc.0 - IL_00be: ldstr "f7 = " - IL_00c3: ldarg.0 - IL_00c4: ldfld float64 MCCTest.VType2::f7 - IL_00c9: box [mscorlib]System.Double - IL_00ce: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_00d3: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_00d8: nop - IL_00d9: ldloc.1 - IL_00da: ldloc.0 - IL_00db: ldstr "f8 = " - IL_00e0: ldarg.0 - IL_00e1: ldfld char MCCTest.VType2::f8 - IL_00e6: box [mscorlib]System.Char - IL_00eb: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_00f0: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_00f5: nop - IL_00f6: ldloc.1 - IL_00f7: callvirt instance string [mscorlib]System.Object::ToString() - IL_00fc: stloc.2 - IL_00fd: br.s IL_00ff - - IL_00ff: ldloc.2 - IL_0100: ret - } // end of method VType2::Dump - - .method public hidebysig instance string - Dump() cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.0 - IL_0003: call instance string MCCTest.VType2::Dump(int32) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method VType2::Dump - -} // end of class MCCTest.VType2 - -.class public sequential ansi sealed beforefieldinit MCCTest.VType3 - extends [mscorlib]System.ValueType - implements class MCCTest.CType`1 -{ - .field public float32 f1 - .field public float32 f2 - .field public float32 f3 - .field public float32 f4 - .field public float32 f5 - .field public float32 f6 - .field public float32 f7 - .field public float32 f8 - .method public hidebysig newslot virtual final - instance void Init(int32 count) cil managed - { - // Code size 66 (0x42) - .maxstack 2 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldarg.1 - IL_0003: conv.r4 - IL_0004: stfld float32 MCCTest.VType3::f1 - IL_0009: ldarg.0 - IL_000a: ldarg.1 - IL_000b: conv.r4 - IL_000c: stfld float32 MCCTest.VType3::f2 - IL_0011: ldarg.0 - IL_0012: ldarg.1 - IL_0013: conv.r4 - IL_0014: stfld float32 MCCTest.VType3::f3 - IL_0019: ldarg.0 - IL_001a: ldarg.1 - IL_001b: conv.r4 - IL_001c: stfld float32 MCCTest.VType3::f4 - IL_0021: ldarg.0 - IL_0022: ldarg.1 - IL_0023: conv.r4 - IL_0024: stfld float32 MCCTest.VType3::f5 - IL_0029: ldarg.0 - IL_002a: ldarg.1 - IL_002b: conv.r4 - IL_002c: stfld float32 MCCTest.VType3::f6 - IL_0031: ldarg.0 - IL_0032: ldarg.1 - IL_0033: conv.r4 - IL_0034: stfld float32 MCCTest.VType3::f7 - IL_0039: ldarg.0 - IL_003a: ldarg.1 - IL_003b: conv.r4 - IL_003c: stfld float32 MCCTest.VType3::f8 - IL_0041: ret - } // end of method VType3::Init - - .method public hidebysig newslot virtual final - instance void Init() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.1 - IL_0003: call instance void MCCTest.VType3::Init(int32) - IL_0008: nop - IL_0009: ret - } // end of method VType3::Init - - .method public hidebysig newslot virtual final - instance void Zero() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.0 - IL_0003: call instance void MCCTest.VType3::Init(int32) - IL_0008: nop - IL_0009: ret - } // end of method VType3::Zero - - .method public hidebysig instance void - Add(valuetype MCCTest.VType3 val) cil managed - { - // Code size 162 (0xa2) - .maxstack 3 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: dup - IL_0003: ldfld float32 MCCTest.VType3::f1 - IL_0008: ldarga.s val - IL_000a: ldfld float32 MCCTest.VType3::f1 - IL_000f: add - IL_0010: stfld float32 MCCTest.VType3::f1 - IL_0015: ldarg.0 - IL_0016: dup - IL_0017: ldfld float32 MCCTest.VType3::f2 - IL_001c: ldarga.s val - IL_001e: ldfld float32 MCCTest.VType3::f2 - IL_0023: add - IL_0024: stfld float32 MCCTest.VType3::f2 - IL_0029: ldarg.0 - IL_002a: dup - IL_002b: ldfld float32 MCCTest.VType3::f3 - IL_0030: ldarga.s val - IL_0032: ldfld float32 MCCTest.VType3::f3 - IL_0037: add - IL_0038: stfld float32 MCCTest.VType3::f3 - IL_003d: ldarg.0 - IL_003e: dup - IL_003f: ldfld float32 MCCTest.VType3::f4 - IL_0044: ldarga.s val - IL_0046: ldfld float32 MCCTest.VType3::f4 - IL_004b: add - IL_004c: stfld float32 MCCTest.VType3::f4 - IL_0051: ldarg.0 - IL_0052: dup - IL_0053: ldfld float32 MCCTest.VType3::f5 - IL_0058: ldarga.s val - IL_005a: ldfld float32 MCCTest.VType3::f5 - IL_005f: add - IL_0060: stfld float32 MCCTest.VType3::f5 - IL_0065: ldarg.0 - IL_0066: dup - IL_0067: ldfld float32 MCCTest.VType3::f6 - IL_006c: ldarga.s val - IL_006e: ldfld float32 MCCTest.VType3::f6 - IL_0073: add - IL_0074: stfld float32 MCCTest.VType3::f6 - IL_0079: ldarg.0 - IL_007a: dup - IL_007b: ldfld float32 MCCTest.VType3::f7 - IL_0080: ldarga.s val - IL_0082: ldfld float32 MCCTest.VType3::f7 - IL_0087: add - IL_0088: stfld float32 MCCTest.VType3::f7 - IL_008d: ldarg.0 - IL_008e: dup - IL_008f: ldfld float32 MCCTest.VType3::f8 - IL_0094: ldarga.s val - IL_0096: ldfld float32 MCCTest.VType3::f8 - IL_009b: add - IL_009c: stfld float32 MCCTest.VType3::f8 - IL_00a1: ret - } // end of method VType3::Add - - .method public hidebysig newslot virtual final - instance void Check(valuetype MCCTest.VType3 expected) cil managed - { - // Code size 370 (0x172) - .maxstack 4 - .locals init (bool V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldfld float32 MCCTest.VType3::f1 - IL_0007: ldarga.s expected - IL_0009: ldfld float32 MCCTest.VType3::f1 - IL_000e: ceq - IL_0010: stloc.0 - IL_0011: ldloc.0 - IL_0012: brtrue.s IL_002f - - IL_0014: nop - IL_0015: ldstr "f1" - IL_001a: ldarg.0 - IL_001b: ldfld float32 MCCTest.VType3::f1 - IL_0020: conv.r8 - IL_0021: ldarga.s expected - IL_0023: ldfld float32 MCCTest.VType3::f1 - IL_0028: conv.r8 - IL_0029: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_002e: throw - - IL_002f: ldarg.0 - IL_0030: ldfld float32 MCCTest.VType3::f2 - IL_0035: ldarga.s expected - IL_0037: ldfld float32 MCCTest.VType3::f2 - IL_003c: ceq - IL_003e: stloc.0 - IL_003f: ldloc.0 - IL_0040: brtrue.s IL_005d - - IL_0042: nop - IL_0043: ldstr "f2" - IL_0048: ldarg.0 - IL_0049: ldfld float32 MCCTest.VType3::f2 - IL_004e: conv.r8 - IL_004f: ldarga.s expected - IL_0051: ldfld float32 MCCTest.VType3::f2 - IL_0056: conv.r8 - IL_0057: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_005c: throw - - IL_005d: ldarg.0 - IL_005e: ldfld float32 MCCTest.VType3::f3 - IL_0063: ldarga.s expected - IL_0065: ldfld float32 MCCTest.VType3::f3 - IL_006a: ceq - IL_006c: stloc.0 - IL_006d: ldloc.0 - IL_006e: brtrue.s IL_008b - - IL_0070: nop - IL_0071: ldstr "f3" - IL_0076: ldarg.0 - IL_0077: ldfld float32 MCCTest.VType3::f3 - IL_007c: conv.r8 - IL_007d: ldarga.s expected - IL_007f: ldfld float32 MCCTest.VType3::f3 - IL_0084: conv.r8 - IL_0085: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_008a: throw - - IL_008b: ldarg.0 - IL_008c: ldfld float32 MCCTest.VType3::f4 - IL_0091: ldarga.s expected - IL_0093: ldfld float32 MCCTest.VType3::f4 - IL_0098: ceq - IL_009a: stloc.0 - IL_009b: ldloc.0 - IL_009c: brtrue.s IL_00b9 - - IL_009e: nop - IL_009f: ldstr "f4" - IL_00a4: ldarg.0 - IL_00a5: ldfld float32 MCCTest.VType3::f4 - IL_00aa: conv.r8 - IL_00ab: ldarga.s expected - IL_00ad: ldfld float32 MCCTest.VType3::f4 - IL_00b2: conv.r8 - IL_00b3: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_00b8: throw - - IL_00b9: ldarg.0 - IL_00ba: ldfld float32 MCCTest.VType3::f5 - IL_00bf: ldarga.s expected - IL_00c1: ldfld float32 MCCTest.VType3::f5 - IL_00c6: ceq - IL_00c8: stloc.0 - IL_00c9: ldloc.0 - IL_00ca: brtrue.s IL_00e7 - - IL_00cc: nop - IL_00cd: ldstr "f5" - IL_00d2: ldarg.0 - IL_00d3: ldfld float32 MCCTest.VType3::f5 - IL_00d8: conv.r8 - IL_00d9: ldarga.s expected - IL_00db: ldfld float32 MCCTest.VType3::f5 - IL_00e0: conv.r8 - IL_00e1: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_00e6: throw - - IL_00e7: ldarg.0 - IL_00e8: ldfld float32 MCCTest.VType3::f6 - IL_00ed: ldarga.s expected - IL_00ef: ldfld float32 MCCTest.VType3::f6 - IL_00f4: ceq - IL_00f6: stloc.0 - IL_00f7: ldloc.0 - IL_00f8: brtrue.s IL_0115 - - IL_00fa: nop - IL_00fb: ldstr "f6" - IL_0100: ldarg.0 - IL_0101: ldfld float32 MCCTest.VType3::f6 - IL_0106: conv.r8 - IL_0107: ldarga.s expected - IL_0109: ldfld float32 MCCTest.VType3::f6 - IL_010e: conv.r8 - IL_010f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0114: throw - - IL_0115: ldarg.0 - IL_0116: ldfld float32 MCCTest.VType3::f7 - IL_011b: ldarga.s expected - IL_011d: ldfld float32 MCCTest.VType3::f7 - IL_0122: ceq - IL_0124: stloc.0 - IL_0125: ldloc.0 - IL_0126: brtrue.s IL_0143 - - IL_0128: nop - IL_0129: ldstr "f7" - IL_012e: ldarg.0 - IL_012f: ldfld float32 MCCTest.VType3::f7 - IL_0134: conv.r8 - IL_0135: ldarga.s expected - IL_0137: ldfld float32 MCCTest.VType3::f7 - IL_013c: conv.r8 - IL_013d: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0142: throw - - IL_0143: ldarg.0 - IL_0144: ldfld float32 MCCTest.VType3::f8 - IL_0149: ldarga.s expected - IL_014b: ldfld float32 MCCTest.VType3::f8 - IL_0150: ceq - IL_0152: stloc.0 - IL_0153: ldloc.0 - IL_0154: brtrue.s IL_0171 - - IL_0156: nop - IL_0157: ldstr "f8" - IL_015c: ldarg.0 - IL_015d: ldfld float32 MCCTest.VType3::f8 - IL_0162: conv.r8 - IL_0163: ldarga.s expected - IL_0165: ldfld float32 MCCTest.VType3::f8 - IL_016a: conv.r8 - IL_016b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0170: throw - - IL_0171: ret - } // end of method VType3::Check - - .method public hidebysig instance string - Dump(int32 level) cil managed - { - // Code size 257 (0x101) - .maxstack 4 - .locals init (string V_0, - class [mscorlib]System.IO.StringWriter V_1, - string V_2) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: call string MCCTest.FormatUtils::GetPadding(int32) - IL_0007: stloc.0 - IL_0008: newobj instance void [mscorlib]System.IO.StringWriter::.ctor() - IL_000d: stloc.1 - IL_000e: ldloc.1 - IL_000f: ldloc.0 - IL_0010: ldstr "f1 = " - IL_0015: ldarg.0 - IL_0016: ldfld float32 MCCTest.VType3::f1 - IL_001b: box [mscorlib]System.Single - IL_0020: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0025: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_002a: nop - IL_002b: ldloc.1 - IL_002c: ldloc.0 - IL_002d: ldstr "f2 = " - IL_0032: ldarg.0 - IL_0033: ldfld float32 MCCTest.VType3::f2 - IL_0038: box [mscorlib]System.Single - IL_003d: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0042: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0047: nop - IL_0048: ldloc.1 - IL_0049: ldloc.0 - IL_004a: ldstr "f3 = " - IL_004f: ldarg.0 - IL_0050: ldfld float32 MCCTest.VType3::f3 - IL_0055: box [mscorlib]System.Single - IL_005a: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_005f: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0064: nop - IL_0065: ldloc.1 - IL_0066: ldloc.0 - IL_0067: ldstr "f4 = " - IL_006c: ldarg.0 - IL_006d: ldfld float32 MCCTest.VType3::f4 - IL_0072: box [mscorlib]System.Single - IL_0077: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_007c: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0081: nop - IL_0082: ldloc.1 - IL_0083: ldloc.0 - IL_0084: ldstr "f5 = " - IL_0089: ldarg.0 - IL_008a: ldfld float32 MCCTest.VType3::f5 - IL_008f: box [mscorlib]System.Single - IL_0094: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0099: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_009e: nop - IL_009f: ldloc.1 - IL_00a0: ldloc.0 - IL_00a1: ldstr "f6 = " - IL_00a6: ldarg.0 - IL_00a7: ldfld float32 MCCTest.VType3::f6 - IL_00ac: box [mscorlib]System.Single - IL_00b1: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_00b6: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_00bb: nop - IL_00bc: ldloc.1 - IL_00bd: ldloc.0 - IL_00be: ldstr "f7 = " - IL_00c3: ldarg.0 - IL_00c4: ldfld float32 MCCTest.VType3::f7 - IL_00c9: box [mscorlib]System.Single - IL_00ce: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_00d3: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_00d8: nop - IL_00d9: ldloc.1 - IL_00da: ldloc.0 - IL_00db: ldstr "f8 = " - IL_00e0: ldarg.0 - IL_00e1: ldfld float32 MCCTest.VType3::f8 - IL_00e6: box [mscorlib]System.Single - IL_00eb: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_00f0: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_00f5: nop - IL_00f6: ldloc.1 - IL_00f7: callvirt instance string [mscorlib]System.Object::ToString() - IL_00fc: stloc.2 - IL_00fd: br.s IL_00ff - - IL_00ff: ldloc.2 - IL_0100: ret - } // end of method VType3::Dump - - .method public hidebysig instance string - Dump() cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.0 - IL_0003: call instance string MCCTest.VType3::Dump(int32) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method VType3::Dump - -} // end of class MCCTest.VType3 - -.class public sequential ansi beforefieldinit MCCTest.RType4 - extends [mscorlib]System.Object - implements class MCCTest.CType`1 -{ - .field public float32 f1 - .field public float32 f2 - .field public float32 f3 - .field public float32 f4 - .field public float32 f5 - .field public float32 f6 - .field public float32 f7 - .field public float32 f8 - .method public hidebysig newslot virtual final - instance void Init(int32 count) cil managed - { - // Code size 66 (0x42) - .maxstack 2 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldarg.1 - IL_0003: conv.r4 - IL_0004: stfld float32 MCCTest.RType4::f1 - IL_0009: ldarg.0 - IL_000a: ldarg.1 - IL_000b: conv.r4 - IL_000c: stfld float32 MCCTest.RType4::f2 - IL_0011: ldarg.0 - IL_0012: ldarg.1 - IL_0013: conv.r4 - IL_0014: stfld float32 MCCTest.RType4::f3 - IL_0019: ldarg.0 - IL_001a: ldarg.1 - IL_001b: conv.r4 - IL_001c: stfld float32 MCCTest.RType4::f4 - IL_0021: ldarg.0 - IL_0022: ldarg.1 - IL_0023: conv.r4 - IL_0024: stfld float32 MCCTest.RType4::f5 - IL_0029: ldarg.0 - IL_002a: ldarg.1 - IL_002b: conv.r4 - IL_002c: stfld float32 MCCTest.RType4::f6 - IL_0031: ldarg.0 - IL_0032: ldarg.1 - IL_0033: conv.r4 - IL_0034: stfld float32 MCCTest.RType4::f7 - IL_0039: ldarg.0 - IL_003a: ldarg.1 - IL_003b: conv.r4 - IL_003c: stfld float32 MCCTest.RType4::f8 - IL_0041: ret - } // end of method RType4::Init - - .method public hidebysig newslot virtual final - instance void Init() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.1 - IL_0003: call instance void MCCTest.RType4::Init(int32) - IL_0008: nop - IL_0009: ret - } // end of method RType4::Init - - .method public hidebysig newslot virtual final - instance void Zero() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.0 - IL_0003: call instance void MCCTest.RType4::Init(int32) - IL_0008: nop - IL_0009: ret - } // end of method RType4::Zero - - .method public hidebysig instance void - Add(class MCCTest.RType4 val) cil managed - { - // Code size 154 (0x9a) - .maxstack 3 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: dup - IL_0003: ldfld float32 MCCTest.RType4::f1 - IL_0008: ldarg.1 - IL_0009: ldfld float32 MCCTest.RType4::f1 - IL_000e: add - IL_000f: stfld float32 MCCTest.RType4::f1 - IL_0014: ldarg.0 - IL_0015: dup - IL_0016: ldfld float32 MCCTest.RType4::f2 - IL_001b: ldarg.1 - IL_001c: ldfld float32 MCCTest.RType4::f2 - IL_0021: add - IL_0022: stfld float32 MCCTest.RType4::f2 - IL_0027: ldarg.0 - IL_0028: dup - IL_0029: ldfld float32 MCCTest.RType4::f3 - IL_002e: ldarg.1 - IL_002f: ldfld float32 MCCTest.RType4::f3 - IL_0034: add - IL_0035: stfld float32 MCCTest.RType4::f3 - IL_003a: ldarg.0 - IL_003b: dup - IL_003c: ldfld float32 MCCTest.RType4::f4 - IL_0041: ldarg.1 - IL_0042: ldfld float32 MCCTest.RType4::f4 - IL_0047: add - IL_0048: stfld float32 MCCTest.RType4::f4 - IL_004d: ldarg.0 - IL_004e: dup - IL_004f: ldfld float32 MCCTest.RType4::f5 - IL_0054: ldarg.1 - IL_0055: ldfld float32 MCCTest.RType4::f5 - IL_005a: add - IL_005b: stfld float32 MCCTest.RType4::f5 - IL_0060: ldarg.0 - IL_0061: dup - IL_0062: ldfld float32 MCCTest.RType4::f6 - IL_0067: ldarg.1 - IL_0068: ldfld float32 MCCTest.RType4::f6 - IL_006d: add - IL_006e: stfld float32 MCCTest.RType4::f6 - IL_0073: ldarg.0 - IL_0074: dup - IL_0075: ldfld float32 MCCTest.RType4::f7 - IL_007a: ldarg.1 - IL_007b: ldfld float32 MCCTest.RType4::f7 - IL_0080: add - IL_0081: stfld float32 MCCTest.RType4::f7 - IL_0086: ldarg.0 - IL_0087: dup - IL_0088: ldfld float32 MCCTest.RType4::f8 - IL_008d: ldarg.1 - IL_008e: ldfld float32 MCCTest.RType4::f8 - IL_0093: add - IL_0094: stfld float32 MCCTest.RType4::f8 - IL_0099: ret - } // end of method RType4::Add - - .method public hidebysig newslot virtual final - instance void Check(class MCCTest.RType4 expected) cil managed - { - // Code size 354 (0x162) - .maxstack 4 - .locals init (bool V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldfld float32 MCCTest.RType4::f1 - IL_0007: ldarg.1 - IL_0008: ldfld float32 MCCTest.RType4::f1 - IL_000d: ceq - IL_000f: stloc.0 - IL_0010: ldloc.0 - IL_0011: brtrue.s IL_002d - - IL_0013: nop - IL_0014: ldstr "f1" - IL_0019: ldarg.0 - IL_001a: ldfld float32 MCCTest.RType4::f1 - IL_001f: conv.r8 - IL_0020: ldarg.1 - IL_0021: ldfld float32 MCCTest.RType4::f1 - IL_0026: conv.r8 - IL_0027: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_002c: throw - - IL_002d: ldarg.0 - IL_002e: ldfld float32 MCCTest.RType4::f2 - IL_0033: ldarg.1 - IL_0034: ldfld float32 MCCTest.RType4::f2 - IL_0039: ceq - IL_003b: stloc.0 - IL_003c: ldloc.0 - IL_003d: brtrue.s IL_0059 - - IL_003f: nop - IL_0040: ldstr "f2" - IL_0045: ldarg.0 - IL_0046: ldfld float32 MCCTest.RType4::f2 - IL_004b: conv.r8 - IL_004c: ldarg.1 - IL_004d: ldfld float32 MCCTest.RType4::f2 - IL_0052: conv.r8 - IL_0053: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0058: throw - - IL_0059: ldarg.0 - IL_005a: ldfld float32 MCCTest.RType4::f3 - IL_005f: ldarg.1 - IL_0060: ldfld float32 MCCTest.RType4::f3 - IL_0065: ceq - IL_0067: stloc.0 - IL_0068: ldloc.0 - IL_0069: brtrue.s IL_0085 - - IL_006b: nop - IL_006c: ldstr "f3" - IL_0071: ldarg.0 - IL_0072: ldfld float32 MCCTest.RType4::f3 - IL_0077: conv.r8 - IL_0078: ldarg.1 - IL_0079: ldfld float32 MCCTest.RType4::f3 - IL_007e: conv.r8 - IL_007f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0084: throw - - IL_0085: ldarg.0 - IL_0086: ldfld float32 MCCTest.RType4::f4 - IL_008b: ldarg.1 - IL_008c: ldfld float32 MCCTest.RType4::f4 - IL_0091: ceq - IL_0093: stloc.0 - IL_0094: ldloc.0 - IL_0095: brtrue.s IL_00b1 - - IL_0097: nop - IL_0098: ldstr "f4" - IL_009d: ldarg.0 - IL_009e: ldfld float32 MCCTest.RType4::f4 - IL_00a3: conv.r8 - IL_00a4: ldarg.1 - IL_00a5: ldfld float32 MCCTest.RType4::f4 - IL_00aa: conv.r8 - IL_00ab: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_00b0: throw - - IL_00b1: ldarg.0 - IL_00b2: ldfld float32 MCCTest.RType4::f5 - IL_00b7: ldarg.1 - IL_00b8: ldfld float32 MCCTest.RType4::f5 - IL_00bd: ceq - IL_00bf: stloc.0 - IL_00c0: ldloc.0 - IL_00c1: brtrue.s IL_00dd - - IL_00c3: nop - IL_00c4: ldstr "f5" - IL_00c9: ldarg.0 - IL_00ca: ldfld float32 MCCTest.RType4::f5 - IL_00cf: conv.r8 - IL_00d0: ldarg.1 - IL_00d1: ldfld float32 MCCTest.RType4::f5 - IL_00d6: conv.r8 - IL_00d7: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_00dc: throw - - IL_00dd: ldarg.0 - IL_00de: ldfld float32 MCCTest.RType4::f6 - IL_00e3: ldarg.1 - IL_00e4: ldfld float32 MCCTest.RType4::f6 - IL_00e9: ceq - IL_00eb: stloc.0 - IL_00ec: ldloc.0 - IL_00ed: brtrue.s IL_0109 - - IL_00ef: nop - IL_00f0: ldstr "f6" - IL_00f5: ldarg.0 - IL_00f6: ldfld float32 MCCTest.RType4::f6 - IL_00fb: conv.r8 - IL_00fc: ldarg.1 - IL_00fd: ldfld float32 MCCTest.RType4::f6 - IL_0102: conv.r8 - IL_0103: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0108: throw - - IL_0109: ldarg.0 - IL_010a: ldfld float32 MCCTest.RType4::f7 - IL_010f: ldarg.1 - IL_0110: ldfld float32 MCCTest.RType4::f7 - IL_0115: ceq - IL_0117: stloc.0 - IL_0118: ldloc.0 - IL_0119: brtrue.s IL_0135 - - IL_011b: nop - IL_011c: ldstr "f7" - IL_0121: ldarg.0 - IL_0122: ldfld float32 MCCTest.RType4::f7 - IL_0127: conv.r8 - IL_0128: ldarg.1 - IL_0129: ldfld float32 MCCTest.RType4::f7 - IL_012e: conv.r8 - IL_012f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0134: throw - - IL_0135: ldarg.0 - IL_0136: ldfld float32 MCCTest.RType4::f8 - IL_013b: ldarg.1 - IL_013c: ldfld float32 MCCTest.RType4::f8 - IL_0141: ceq - IL_0143: stloc.0 - IL_0144: ldloc.0 - IL_0145: brtrue.s IL_0161 - - IL_0147: nop - IL_0148: ldstr "f8" - IL_014d: ldarg.0 - IL_014e: ldfld float32 MCCTest.RType4::f8 - IL_0153: conv.r8 - IL_0154: ldarg.1 - IL_0155: ldfld float32 MCCTest.RType4::f8 - IL_015a: conv.r8 - IL_015b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0160: throw - - IL_0161: ret - } // end of method RType4::Check - - .method public hidebysig instance string - Dump(int32 level) cil managed - { - // Code size 257 (0x101) - .maxstack 4 - .locals init (string V_0, - class [mscorlib]System.IO.StringWriter V_1, - string V_2) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: call string MCCTest.FormatUtils::GetPadding(int32) - IL_0007: stloc.0 - IL_0008: newobj instance void [mscorlib]System.IO.StringWriter::.ctor() - IL_000d: stloc.1 - IL_000e: ldloc.1 - IL_000f: ldloc.0 - IL_0010: ldstr "f1 = " - IL_0015: ldarg.0 - IL_0016: ldfld float32 MCCTest.RType4::f1 - IL_001b: box [mscorlib]System.Single - IL_0020: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0025: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_002a: nop - IL_002b: ldloc.1 - IL_002c: ldloc.0 - IL_002d: ldstr "f2 = " - IL_0032: ldarg.0 - IL_0033: ldfld float32 MCCTest.RType4::f2 - IL_0038: box [mscorlib]System.Single - IL_003d: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0042: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0047: nop - IL_0048: ldloc.1 - IL_0049: ldloc.0 - IL_004a: ldstr "f3 = " - IL_004f: ldarg.0 - IL_0050: ldfld float32 MCCTest.RType4::f3 - IL_0055: box [mscorlib]System.Single - IL_005a: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_005f: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0064: nop - IL_0065: ldloc.1 - IL_0066: ldloc.0 - IL_0067: ldstr "f4 = " - IL_006c: ldarg.0 - IL_006d: ldfld float32 MCCTest.RType4::f4 - IL_0072: box [mscorlib]System.Single - IL_0077: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_007c: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0081: nop - IL_0082: ldloc.1 - IL_0083: ldloc.0 - IL_0084: ldstr "f5 = " - IL_0089: ldarg.0 - IL_008a: ldfld float32 MCCTest.RType4::f5 - IL_008f: box [mscorlib]System.Single - IL_0094: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0099: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_009e: nop - IL_009f: ldloc.1 - IL_00a0: ldloc.0 - IL_00a1: ldstr "f6 = " - IL_00a6: ldarg.0 - IL_00a7: ldfld float32 MCCTest.RType4::f6 - IL_00ac: box [mscorlib]System.Single - IL_00b1: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_00b6: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_00bb: nop - IL_00bc: ldloc.1 - IL_00bd: ldloc.0 - IL_00be: ldstr "f7 = " - IL_00c3: ldarg.0 - IL_00c4: ldfld float32 MCCTest.RType4::f7 - IL_00c9: box [mscorlib]System.Single - IL_00ce: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_00d3: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_00d8: nop - IL_00d9: ldloc.1 - IL_00da: ldloc.0 - IL_00db: ldstr "f8 = " - IL_00e0: ldarg.0 - IL_00e1: ldfld float32 MCCTest.RType4::f8 - IL_00e6: box [mscorlib]System.Single - IL_00eb: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_00f0: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_00f5: nop - IL_00f6: ldloc.1 - IL_00f7: callvirt instance string [mscorlib]System.Object::ToString() - IL_00fc: stloc.2 - IL_00fd: br.s IL_00ff - - IL_00ff: ldloc.2 - IL_0100: ret - } // end of method RType4::Dump - - .method public hidebysig instance string - Dump() cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.0 - IL_0003: call instance string MCCTest.RType4::Dump(int32) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method RType4::Dump - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method RType4::.ctor - -} // end of class MCCTest.RType4 - -.class public sequential ansi sealed beforefieldinit MCCTest.VType5 - extends [mscorlib]System.ValueType - implements class MCCTest.CType`1 -{ - .field public int64 f1 - .field public int64 f2 - .field public int64 f3 - .field public int64 f4 - .field public int64 f5 - .field public int64 f6 - .field public int64 f7 - .field public int64 f8 - .field public int64 f9 - .field public int64 f10 - .field public int64 f11 - .field public int64 f12 - .field public int64 f13 - .field public int64 f14 - .field public int64 f15 - .field public int64 f16 - .field public int64 f17 - .field public int64 f18 - .method public hidebysig newslot virtual final - instance void Init(int32 count) cil managed - { - // Code size 146 (0x92) - .maxstack 2 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldarg.1 - IL_0003: conv.i8 - IL_0004: stfld int64 MCCTest.VType5::f1 - IL_0009: ldarg.0 - IL_000a: ldarg.1 - IL_000b: conv.i8 - IL_000c: stfld int64 MCCTest.VType5::f2 - IL_0011: ldarg.0 - IL_0012: ldarg.1 - IL_0013: conv.i8 - IL_0014: stfld int64 MCCTest.VType5::f3 - IL_0019: ldarg.0 - IL_001a: ldarg.1 - IL_001b: conv.i8 - IL_001c: stfld int64 MCCTest.VType5::f4 - IL_0021: ldarg.0 - IL_0022: ldarg.1 - IL_0023: conv.i8 - IL_0024: stfld int64 MCCTest.VType5::f5 - IL_0029: ldarg.0 - IL_002a: ldarg.1 - IL_002b: conv.i8 - IL_002c: stfld int64 MCCTest.VType5::f6 - IL_0031: ldarg.0 - IL_0032: ldarg.1 - IL_0033: conv.i8 - IL_0034: stfld int64 MCCTest.VType5::f7 - IL_0039: ldarg.0 - IL_003a: ldarg.1 - IL_003b: conv.i8 - IL_003c: stfld int64 MCCTest.VType5::f8 - IL_0041: ldarg.0 - IL_0042: ldarg.1 - IL_0043: conv.i8 - IL_0044: stfld int64 MCCTest.VType5::f9 - IL_0049: ldarg.0 - IL_004a: ldarg.1 - IL_004b: conv.i8 - IL_004c: stfld int64 MCCTest.VType5::f10 - IL_0051: ldarg.0 - IL_0052: ldarg.1 - IL_0053: conv.i8 - IL_0054: stfld int64 MCCTest.VType5::f11 - IL_0059: ldarg.0 - IL_005a: ldarg.1 - IL_005b: conv.i8 - IL_005c: stfld int64 MCCTest.VType5::f12 - IL_0061: ldarg.0 - IL_0062: ldarg.1 - IL_0063: conv.i8 - IL_0064: stfld int64 MCCTest.VType5::f13 - IL_0069: ldarg.0 - IL_006a: ldarg.1 - IL_006b: conv.i8 - IL_006c: stfld int64 MCCTest.VType5::f14 - IL_0071: ldarg.0 - IL_0072: ldarg.1 - IL_0073: conv.i8 - IL_0074: stfld int64 MCCTest.VType5::f15 - IL_0079: ldarg.0 - IL_007a: ldarg.1 - IL_007b: conv.i8 - IL_007c: stfld int64 MCCTest.VType5::f16 - IL_0081: ldarg.0 - IL_0082: ldarg.1 - IL_0083: conv.i8 - IL_0084: stfld int64 MCCTest.VType5::f17 - IL_0089: ldarg.0 - IL_008a: ldarg.1 - IL_008b: conv.i8 - IL_008c: stfld int64 MCCTest.VType5::f18 - IL_0091: ret - } // end of method VType5::Init - - .method public hidebysig newslot virtual final - instance void Init() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.1 - IL_0003: call instance void MCCTest.VType5::Init(int32) - IL_0008: nop - IL_0009: ret - } // end of method VType5::Init - - .method public hidebysig newslot virtual final - instance void Zero() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.0 - IL_0003: call instance void MCCTest.VType5::Init(int32) - IL_0008: nop - IL_0009: ret - } // end of method VType5::Zero - - .method public hidebysig instance void - Add(valuetype MCCTest.VType5 val) cil managed - { - // Code size 362 (0x16a) - .maxstack 3 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: dup - IL_0003: ldfld int64 MCCTest.VType5::f1 - IL_0008: ldarga.s val - IL_000a: ldfld int64 MCCTest.VType5::f1 - IL_000f: add - IL_0010: stfld int64 MCCTest.VType5::f1 - IL_0015: ldarg.0 - IL_0016: dup - IL_0017: ldfld int64 MCCTest.VType5::f2 - IL_001c: ldarga.s val - IL_001e: ldfld int64 MCCTest.VType5::f2 - IL_0023: add - IL_0024: stfld int64 MCCTest.VType5::f2 - IL_0029: ldarg.0 - IL_002a: dup - IL_002b: ldfld int64 MCCTest.VType5::f3 - IL_0030: ldarga.s val - IL_0032: ldfld int64 MCCTest.VType5::f3 - IL_0037: add - IL_0038: stfld int64 MCCTest.VType5::f3 - IL_003d: ldarg.0 - IL_003e: dup - IL_003f: ldfld int64 MCCTest.VType5::f4 - IL_0044: ldarga.s val - IL_0046: ldfld int64 MCCTest.VType5::f4 - IL_004b: add - IL_004c: stfld int64 MCCTest.VType5::f4 - IL_0051: ldarg.0 - IL_0052: dup - IL_0053: ldfld int64 MCCTest.VType5::f5 - IL_0058: ldarga.s val - IL_005a: ldfld int64 MCCTest.VType5::f5 - IL_005f: add - IL_0060: stfld int64 MCCTest.VType5::f5 - IL_0065: ldarg.0 - IL_0066: dup - IL_0067: ldfld int64 MCCTest.VType5::f6 - IL_006c: ldarga.s val - IL_006e: ldfld int64 MCCTest.VType5::f6 - IL_0073: add - IL_0074: stfld int64 MCCTest.VType5::f6 - IL_0079: ldarg.0 - IL_007a: dup - IL_007b: ldfld int64 MCCTest.VType5::f7 - IL_0080: ldarga.s val - IL_0082: ldfld int64 MCCTest.VType5::f7 - IL_0087: add - IL_0088: stfld int64 MCCTest.VType5::f7 - IL_008d: ldarg.0 - IL_008e: dup - IL_008f: ldfld int64 MCCTest.VType5::f8 - IL_0094: ldarga.s val - IL_0096: ldfld int64 MCCTest.VType5::f8 - IL_009b: add - IL_009c: stfld int64 MCCTest.VType5::f8 - IL_00a1: ldarg.0 - IL_00a2: dup - IL_00a3: ldfld int64 MCCTest.VType5::f9 - IL_00a8: ldarga.s val - IL_00aa: ldfld int64 MCCTest.VType5::f9 - IL_00af: add - IL_00b0: stfld int64 MCCTest.VType5::f9 - IL_00b5: ldarg.0 - IL_00b6: dup - IL_00b7: ldfld int64 MCCTest.VType5::f10 - IL_00bc: ldarga.s val - IL_00be: ldfld int64 MCCTest.VType5::f10 - IL_00c3: add - IL_00c4: stfld int64 MCCTest.VType5::f10 - IL_00c9: ldarg.0 - IL_00ca: dup - IL_00cb: ldfld int64 MCCTest.VType5::f11 - IL_00d0: ldarga.s val - IL_00d2: ldfld int64 MCCTest.VType5::f11 - IL_00d7: add - IL_00d8: stfld int64 MCCTest.VType5::f11 - IL_00dd: ldarg.0 - IL_00de: dup - IL_00df: ldfld int64 MCCTest.VType5::f12 - IL_00e4: ldarga.s val - IL_00e6: ldfld int64 MCCTest.VType5::f12 - IL_00eb: add - IL_00ec: stfld int64 MCCTest.VType5::f12 - IL_00f1: ldarg.0 - IL_00f2: dup - IL_00f3: ldfld int64 MCCTest.VType5::f13 - IL_00f8: ldarga.s val - IL_00fa: ldfld int64 MCCTest.VType5::f13 - IL_00ff: add - IL_0100: stfld int64 MCCTest.VType5::f13 - IL_0105: ldarg.0 - IL_0106: dup - IL_0107: ldfld int64 MCCTest.VType5::f14 - IL_010c: ldarga.s val - IL_010e: ldfld int64 MCCTest.VType5::f14 - IL_0113: add - IL_0114: stfld int64 MCCTest.VType5::f14 - IL_0119: ldarg.0 - IL_011a: dup - IL_011b: ldfld int64 MCCTest.VType5::f15 - IL_0120: ldarga.s val - IL_0122: ldfld int64 MCCTest.VType5::f15 - IL_0127: add - IL_0128: stfld int64 MCCTest.VType5::f15 - IL_012d: ldarg.0 - IL_012e: dup - IL_012f: ldfld int64 MCCTest.VType5::f16 - IL_0134: ldarga.s val - IL_0136: ldfld int64 MCCTest.VType5::f16 - IL_013b: add - IL_013c: stfld int64 MCCTest.VType5::f16 - IL_0141: ldarg.0 - IL_0142: dup - IL_0143: ldfld int64 MCCTest.VType5::f17 - IL_0148: ldarga.s val - IL_014a: ldfld int64 MCCTest.VType5::f17 - IL_014f: add - IL_0150: stfld int64 MCCTest.VType5::f17 - IL_0155: ldarg.0 - IL_0156: dup - IL_0157: ldfld int64 MCCTest.VType5::f18 - IL_015c: ldarga.s val - IL_015e: ldfld int64 MCCTest.VType5::f18 - IL_0163: add - IL_0164: stfld int64 MCCTest.VType5::f18 - IL_0169: ret - } // end of method VType5::Add - - .method public hidebysig newslot virtual final - instance void Check(valuetype MCCTest.VType5 expected) cil managed - { - // Code size 794 (0x31a) - .maxstack 4 - .locals init (bool V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldfld int64 MCCTest.VType5::f1 - IL_0007: ldarga.s expected - IL_0009: ldfld int64 MCCTest.VType5::f1 - IL_000e: ceq - IL_0010: stloc.0 - IL_0011: ldloc.0 - IL_0012: brtrue.s IL_002d - - IL_0014: nop - IL_0015: ldstr "f1" - IL_001a: ldarg.0 - IL_001b: ldfld int64 MCCTest.VType5::f1 - IL_0020: ldarga.s expected - IL_0022: ldfld int64 MCCTest.VType5::f1 - IL_0027: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_002c: throw - - IL_002d: ldarg.0 - IL_002e: ldfld int64 MCCTest.VType5::f2 - IL_0033: ldarga.s expected - IL_0035: ldfld int64 MCCTest.VType5::f2 - IL_003a: ceq - IL_003c: stloc.0 - IL_003d: ldloc.0 - IL_003e: brtrue.s IL_0059 - - IL_0040: nop - IL_0041: ldstr "f2" - IL_0046: ldarg.0 - IL_0047: ldfld int64 MCCTest.VType5::f2 - IL_004c: ldarga.s expected - IL_004e: ldfld int64 MCCTest.VType5::f2 - IL_0053: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_0058: throw - - IL_0059: ldarg.0 - IL_005a: ldfld int64 MCCTest.VType5::f3 - IL_005f: ldarga.s expected - IL_0061: ldfld int64 MCCTest.VType5::f3 - IL_0066: ceq - IL_0068: stloc.0 - IL_0069: ldloc.0 - IL_006a: brtrue.s IL_0085 - - IL_006c: nop - IL_006d: ldstr "f3" - IL_0072: ldarg.0 - IL_0073: ldfld int64 MCCTest.VType5::f3 - IL_0078: ldarga.s expected - IL_007a: ldfld int64 MCCTest.VType5::f3 - IL_007f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_0084: throw - - IL_0085: ldarg.0 - IL_0086: ldfld int64 MCCTest.VType5::f4 - IL_008b: ldarga.s expected - IL_008d: ldfld int64 MCCTest.VType5::f4 - IL_0092: ceq - IL_0094: stloc.0 - IL_0095: ldloc.0 - IL_0096: brtrue.s IL_00b1 - - IL_0098: nop - IL_0099: ldstr "f4" - IL_009e: ldarg.0 - IL_009f: ldfld int64 MCCTest.VType5::f4 - IL_00a4: ldarga.s expected - IL_00a6: ldfld int64 MCCTest.VType5::f4 - IL_00ab: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_00b0: throw - - IL_00b1: ldarg.0 - IL_00b2: ldfld int64 MCCTest.VType5::f5 - IL_00b7: ldarga.s expected - IL_00b9: ldfld int64 MCCTest.VType5::f5 - IL_00be: ceq - IL_00c0: stloc.0 - IL_00c1: ldloc.0 - IL_00c2: brtrue.s IL_00dd - - IL_00c4: nop - IL_00c5: ldstr "f5" - IL_00ca: ldarg.0 - IL_00cb: ldfld int64 MCCTest.VType5::f5 - IL_00d0: ldarga.s expected - IL_00d2: ldfld int64 MCCTest.VType5::f5 - IL_00d7: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_00dc: throw - - IL_00dd: ldarg.0 - IL_00de: ldfld int64 MCCTest.VType5::f6 - IL_00e3: ldarga.s expected - IL_00e5: ldfld int64 MCCTest.VType5::f6 - IL_00ea: ceq - IL_00ec: stloc.0 - IL_00ed: ldloc.0 - IL_00ee: brtrue.s IL_0109 - - IL_00f0: nop - IL_00f1: ldstr "f6" - IL_00f6: ldarg.0 - IL_00f7: ldfld int64 MCCTest.VType5::f6 - IL_00fc: ldarga.s expected - IL_00fe: ldfld int64 MCCTest.VType5::f6 - IL_0103: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_0108: throw - - IL_0109: ldarg.0 - IL_010a: ldfld int64 MCCTest.VType5::f7 - IL_010f: ldarga.s expected - IL_0111: ldfld int64 MCCTest.VType5::f7 - IL_0116: ceq - IL_0118: stloc.0 - IL_0119: ldloc.0 - IL_011a: brtrue.s IL_0135 - - IL_011c: nop - IL_011d: ldstr "f7" - IL_0122: ldarg.0 - IL_0123: ldfld int64 MCCTest.VType5::f7 - IL_0128: ldarga.s expected - IL_012a: ldfld int64 MCCTest.VType5::f7 - IL_012f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_0134: throw - - IL_0135: ldarg.0 - IL_0136: ldfld int64 MCCTest.VType5::f8 - IL_013b: ldarga.s expected - IL_013d: ldfld int64 MCCTest.VType5::f8 - IL_0142: ceq - IL_0144: stloc.0 - IL_0145: ldloc.0 - IL_0146: brtrue.s IL_0161 - - IL_0148: nop - IL_0149: ldstr "f8" - IL_014e: ldarg.0 - IL_014f: ldfld int64 MCCTest.VType5::f8 - IL_0154: ldarga.s expected - IL_0156: ldfld int64 MCCTest.VType5::f8 - IL_015b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_0160: throw - - IL_0161: ldarg.0 - IL_0162: ldfld int64 MCCTest.VType5::f9 - IL_0167: ldarga.s expected - IL_0169: ldfld int64 MCCTest.VType5::f9 - IL_016e: ceq - IL_0170: stloc.0 - IL_0171: ldloc.0 - IL_0172: brtrue.s IL_018d - - IL_0174: nop - IL_0175: ldstr "f9" - IL_017a: ldarg.0 - IL_017b: ldfld int64 MCCTest.VType5::f9 - IL_0180: ldarga.s expected - IL_0182: ldfld int64 MCCTest.VType5::f9 - IL_0187: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_018c: throw - - IL_018d: ldarg.0 - IL_018e: ldfld int64 MCCTest.VType5::f10 - IL_0193: ldarga.s expected - IL_0195: ldfld int64 MCCTest.VType5::f10 - IL_019a: ceq - IL_019c: stloc.0 - IL_019d: ldloc.0 - IL_019e: brtrue.s IL_01b9 - - IL_01a0: nop - IL_01a1: ldstr "f10" - IL_01a6: ldarg.0 - IL_01a7: ldfld int64 MCCTest.VType5::f10 - IL_01ac: ldarga.s expected - IL_01ae: ldfld int64 MCCTest.VType5::f10 - IL_01b3: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_01b8: throw - - IL_01b9: ldarg.0 - IL_01ba: ldfld int64 MCCTest.VType5::f11 - IL_01bf: ldarga.s expected - IL_01c1: ldfld int64 MCCTest.VType5::f11 - IL_01c6: ceq - IL_01c8: stloc.0 - IL_01c9: ldloc.0 - IL_01ca: brtrue.s IL_01e5 - - IL_01cc: nop - IL_01cd: ldstr "f11" - IL_01d2: ldarg.0 - IL_01d3: ldfld int64 MCCTest.VType5::f11 - IL_01d8: ldarga.s expected - IL_01da: ldfld int64 MCCTest.VType5::f11 - IL_01df: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_01e4: throw - - IL_01e5: ldarg.0 - IL_01e6: ldfld int64 MCCTest.VType5::f12 - IL_01eb: ldarga.s expected - IL_01ed: ldfld int64 MCCTest.VType5::f12 - IL_01f2: ceq - IL_01f4: stloc.0 - IL_01f5: ldloc.0 - IL_01f6: brtrue.s IL_0211 - - IL_01f8: nop - IL_01f9: ldstr "f12" - IL_01fe: ldarg.0 - IL_01ff: ldfld int64 MCCTest.VType5::f12 - IL_0204: ldarga.s expected - IL_0206: ldfld int64 MCCTest.VType5::f12 - IL_020b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_0210: throw - - IL_0211: ldarg.0 - IL_0212: ldfld int64 MCCTest.VType5::f13 - IL_0217: ldarga.s expected - IL_0219: ldfld int64 MCCTest.VType5::f13 - IL_021e: ceq - IL_0220: stloc.0 - IL_0221: ldloc.0 - IL_0222: brtrue.s IL_023d - - IL_0224: nop - IL_0225: ldstr "f13" - IL_022a: ldarg.0 - IL_022b: ldfld int64 MCCTest.VType5::f13 - IL_0230: ldarga.s expected - IL_0232: ldfld int64 MCCTest.VType5::f13 - IL_0237: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_023c: throw - - IL_023d: ldarg.0 - IL_023e: ldfld int64 MCCTest.VType5::f14 - IL_0243: ldarga.s expected - IL_0245: ldfld int64 MCCTest.VType5::f14 - IL_024a: ceq - IL_024c: stloc.0 - IL_024d: ldloc.0 - IL_024e: brtrue.s IL_0269 - - IL_0250: nop - IL_0251: ldstr "f14" - IL_0256: ldarg.0 - IL_0257: ldfld int64 MCCTest.VType5::f14 - IL_025c: ldarga.s expected - IL_025e: ldfld int64 MCCTest.VType5::f14 - IL_0263: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_0268: throw - - IL_0269: ldarg.0 - IL_026a: ldfld int64 MCCTest.VType5::f15 - IL_026f: ldarga.s expected - IL_0271: ldfld int64 MCCTest.VType5::f15 - IL_0276: ceq - IL_0278: stloc.0 - IL_0279: ldloc.0 - IL_027a: brtrue.s IL_0295 - - IL_027c: nop - IL_027d: ldstr "f15" - IL_0282: ldarg.0 - IL_0283: ldfld int64 MCCTest.VType5::f15 - IL_0288: ldarga.s expected - IL_028a: ldfld int64 MCCTest.VType5::f15 - IL_028f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_0294: throw - - IL_0295: ldarg.0 - IL_0296: ldfld int64 MCCTest.VType5::f16 - IL_029b: ldarga.s expected - IL_029d: ldfld int64 MCCTest.VType5::f16 - IL_02a2: ceq - IL_02a4: stloc.0 - IL_02a5: ldloc.0 - IL_02a6: brtrue.s IL_02c1 - - IL_02a8: nop - IL_02a9: ldstr "f16" - IL_02ae: ldarg.0 - IL_02af: ldfld int64 MCCTest.VType5::f16 - IL_02b4: ldarga.s expected - IL_02b6: ldfld int64 MCCTest.VType5::f16 - IL_02bb: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_02c0: throw - - IL_02c1: ldarg.0 - IL_02c2: ldfld int64 MCCTest.VType5::f17 - IL_02c7: ldarga.s expected - IL_02c9: ldfld int64 MCCTest.VType5::f17 - IL_02ce: ceq - IL_02d0: stloc.0 - IL_02d1: ldloc.0 - IL_02d2: brtrue.s IL_02ed - - IL_02d4: nop - IL_02d5: ldstr "f17" - IL_02da: ldarg.0 - IL_02db: ldfld int64 MCCTest.VType5::f17 - IL_02e0: ldarga.s expected - IL_02e2: ldfld int64 MCCTest.VType5::f17 - IL_02e7: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_02ec: throw - - IL_02ed: ldarg.0 - IL_02ee: ldfld int64 MCCTest.VType5::f18 - IL_02f3: ldarga.s expected - IL_02f5: ldfld int64 MCCTest.VType5::f18 - IL_02fa: ceq - IL_02fc: stloc.0 - IL_02fd: ldloc.0 - IL_02fe: brtrue.s IL_0319 - - IL_0300: nop - IL_0301: ldstr "f18" - IL_0306: ldarg.0 - IL_0307: ldfld int64 MCCTest.VType5::f18 - IL_030c: ldarga.s expected - IL_030e: ldfld int64 MCCTest.VType5::f18 - IL_0313: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_0318: throw - - IL_0319: ret - } // end of method VType5::Check - - .method public hidebysig instance string - Dump(int32 level) cil managed - { - // Code size 547 (0x223) - .maxstack 4 - .locals init (string V_0, - class [mscorlib]System.IO.StringWriter V_1, - string V_2) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: call string MCCTest.FormatUtils::GetPadding(int32) - IL_0007: stloc.0 - IL_0008: newobj instance void [mscorlib]System.IO.StringWriter::.ctor() - IL_000d: stloc.1 - IL_000e: ldloc.1 - IL_000f: ldloc.0 - IL_0010: ldstr "f1 = " - IL_0015: ldarg.0 - IL_0016: ldfld int64 MCCTest.VType5::f1 - IL_001b: box [mscorlib]System.Int64 - IL_0020: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0025: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_002a: nop - IL_002b: ldloc.1 - IL_002c: ldloc.0 - IL_002d: ldstr "f2 = " - IL_0032: ldarg.0 - IL_0033: ldfld int64 MCCTest.VType5::f2 - IL_0038: box [mscorlib]System.Int64 - IL_003d: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0042: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0047: nop - IL_0048: ldloc.1 - IL_0049: ldloc.0 - IL_004a: ldstr "f3 = " - IL_004f: ldarg.0 - IL_0050: ldfld int64 MCCTest.VType5::f3 - IL_0055: box [mscorlib]System.Int64 - IL_005a: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_005f: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0064: nop - IL_0065: ldloc.1 - IL_0066: ldloc.0 - IL_0067: ldstr "f4 = " - IL_006c: ldarg.0 - IL_006d: ldfld int64 MCCTest.VType5::f4 - IL_0072: box [mscorlib]System.Int64 - IL_0077: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_007c: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0081: nop - IL_0082: ldloc.1 - IL_0083: ldloc.0 - IL_0084: ldstr "f5 = " - IL_0089: ldarg.0 - IL_008a: ldfld int64 MCCTest.VType5::f5 - IL_008f: box [mscorlib]System.Int64 - IL_0094: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0099: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_009e: nop - IL_009f: ldloc.1 - IL_00a0: ldloc.0 - IL_00a1: ldstr "f6 = " - IL_00a6: ldarg.0 - IL_00a7: ldfld int64 MCCTest.VType5::f6 - IL_00ac: box [mscorlib]System.Int64 - IL_00b1: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_00b6: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_00bb: nop - IL_00bc: ldloc.1 - IL_00bd: ldloc.0 - IL_00be: ldstr "f7 = " - IL_00c3: ldarg.0 - IL_00c4: ldfld int64 MCCTest.VType5::f7 - IL_00c9: box [mscorlib]System.Int64 - IL_00ce: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_00d3: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_00d8: nop - IL_00d9: ldloc.1 - IL_00da: ldloc.0 - IL_00db: ldstr "f8 = " - IL_00e0: ldarg.0 - IL_00e1: ldfld int64 MCCTest.VType5::f8 - IL_00e6: box [mscorlib]System.Int64 - IL_00eb: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_00f0: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_00f5: nop - IL_00f6: ldloc.1 - IL_00f7: ldloc.0 - IL_00f8: ldstr "f9 = " - IL_00fd: ldarg.0 - IL_00fe: ldfld int64 MCCTest.VType5::f9 - IL_0103: box [mscorlib]System.Int64 - IL_0108: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_010d: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0112: nop - IL_0113: ldloc.1 - IL_0114: ldloc.0 - IL_0115: ldstr "f10 = " - IL_011a: ldarg.0 - IL_011b: ldfld int64 MCCTest.VType5::f10 - IL_0120: box [mscorlib]System.Int64 - IL_0125: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_012a: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_012f: nop - IL_0130: ldloc.1 - IL_0131: ldloc.0 - IL_0132: ldstr "f11 = " - IL_0137: ldarg.0 - IL_0138: ldfld int64 MCCTest.VType5::f11 - IL_013d: box [mscorlib]System.Int64 - IL_0142: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0147: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_014c: nop - IL_014d: ldloc.1 - IL_014e: ldloc.0 - IL_014f: ldstr "f12 = " - IL_0154: ldarg.0 - IL_0155: ldfld int64 MCCTest.VType5::f12 - IL_015a: box [mscorlib]System.Int64 - IL_015f: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0164: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0169: nop - IL_016a: ldloc.1 - IL_016b: ldloc.0 - IL_016c: ldstr "f13 = " - IL_0171: ldarg.0 - IL_0172: ldfld int64 MCCTest.VType5::f13 - IL_0177: box [mscorlib]System.Int64 - IL_017c: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0181: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0186: nop - IL_0187: ldloc.1 - IL_0188: ldloc.0 - IL_0189: ldstr "f14 = " - IL_018e: ldarg.0 - IL_018f: ldfld int64 MCCTest.VType5::f14 - IL_0194: box [mscorlib]System.Int64 - IL_0199: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_019e: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_01a3: nop - IL_01a4: ldloc.1 - IL_01a5: ldloc.0 - IL_01a6: ldstr "f15 = " - IL_01ab: ldarg.0 - IL_01ac: ldfld int64 MCCTest.VType5::f15 - IL_01b1: box [mscorlib]System.Int64 - IL_01b6: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_01bb: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_01c0: nop - IL_01c1: ldloc.1 - IL_01c2: ldloc.0 - IL_01c3: ldstr "f16 = " - IL_01c8: ldarg.0 - IL_01c9: ldfld int64 MCCTest.VType5::f16 - IL_01ce: box [mscorlib]System.Int64 - IL_01d3: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_01d8: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_01dd: nop - IL_01de: ldloc.1 - IL_01df: ldloc.0 - IL_01e0: ldstr "f17 = " - IL_01e5: ldarg.0 - IL_01e6: ldfld int64 MCCTest.VType5::f17 - IL_01eb: box [mscorlib]System.Int64 - IL_01f0: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_01f5: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_01fa: nop - IL_01fb: ldloc.1 - IL_01fc: ldloc.0 - IL_01fd: ldstr "f18 = " - IL_0202: ldarg.0 - IL_0203: ldfld int64 MCCTest.VType5::f18 - IL_0208: box [mscorlib]System.Int64 - IL_020d: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0212: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0217: nop - IL_0218: ldloc.1 - IL_0219: callvirt instance string [mscorlib]System.Object::ToString() - IL_021e: stloc.2 - IL_021f: br.s IL_0221 - - IL_0221: ldloc.2 - IL_0222: ret - } // end of method VType5::Dump - - .method public hidebysig instance string - Dump() cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.0 - IL_0003: call instance string MCCTest.VType5::Dump(int32) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method VType5::Dump - -} // end of class MCCTest.VType5 - -.class public sequential ansi sealed beforefieldinit MCCTest.VType6 - extends [mscorlib]System.ValueType - implements class MCCTest.CType`1 -{ - .field public float64 f1 - .field public float64 f2 - .field public float64 f3 - .field public float64 f4 - .field public float64 f5 - .field public float64 f6 - .field public float64 f7 - .field public float64 f8 - .field public float64 f9 - .field public float64 f10 - .field public float64 f11 - .field public float64 f12 - .field public float64 f13 - .field public float64 f14 - .field public float64 f15 - .field public float64 f16 - .field public float64 f17 - .field public float64 f18 - .field public float64 f19 - .field public float64 f20 - .field public float64 f21 - .field public float64 f22 - .field public float64 f23 - .field public float64 f24 - .field public float64 f25 - .field public float64 f26 - .field public float64 f27 - .field public float64 f28 - .field public float64 f29 - .method public hidebysig newslot virtual final - instance void Init(int32 count) cil managed - { - // Code size 234 (0xea) - .maxstack 2 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldarg.1 - IL_0003: conv.r8 - IL_0004: stfld float64 MCCTest.VType6::f1 - IL_0009: ldarg.0 - IL_000a: ldarg.1 - IL_000b: conv.r8 - IL_000c: stfld float64 MCCTest.VType6::f2 - IL_0011: ldarg.0 - IL_0012: ldarg.1 - IL_0013: conv.r8 - IL_0014: stfld float64 MCCTest.VType6::f3 - IL_0019: ldarg.0 - IL_001a: ldarg.1 - IL_001b: conv.r8 - IL_001c: stfld float64 MCCTest.VType6::f4 - IL_0021: ldarg.0 - IL_0022: ldarg.1 - IL_0023: conv.r8 - IL_0024: stfld float64 MCCTest.VType6::f5 - IL_0029: ldarg.0 - IL_002a: ldarg.1 - IL_002b: conv.r8 - IL_002c: stfld float64 MCCTest.VType6::f6 - IL_0031: ldarg.0 - IL_0032: ldarg.1 - IL_0033: conv.r8 - IL_0034: stfld float64 MCCTest.VType6::f7 - IL_0039: ldarg.0 - IL_003a: ldarg.1 - IL_003b: conv.r8 - IL_003c: stfld float64 MCCTest.VType6::f8 - IL_0041: ldarg.0 - IL_0042: ldarg.1 - IL_0043: conv.r8 - IL_0044: stfld float64 MCCTest.VType6::f9 - IL_0049: ldarg.0 - IL_004a: ldarg.1 - IL_004b: conv.r8 - IL_004c: stfld float64 MCCTest.VType6::f10 - IL_0051: ldarg.0 - IL_0052: ldarg.1 - IL_0053: conv.r8 - IL_0054: stfld float64 MCCTest.VType6::f11 - IL_0059: ldarg.0 - IL_005a: ldarg.1 - IL_005b: conv.r8 - IL_005c: stfld float64 MCCTest.VType6::f12 - IL_0061: ldarg.0 - IL_0062: ldarg.1 - IL_0063: conv.r8 - IL_0064: stfld float64 MCCTest.VType6::f13 - IL_0069: ldarg.0 - IL_006a: ldarg.1 - IL_006b: conv.r8 - IL_006c: stfld float64 MCCTest.VType6::f14 - IL_0071: ldarg.0 - IL_0072: ldarg.1 - IL_0073: conv.r8 - IL_0074: stfld float64 MCCTest.VType6::f15 - IL_0079: ldarg.0 - IL_007a: ldarg.1 - IL_007b: conv.r8 - IL_007c: stfld float64 MCCTest.VType6::f16 - IL_0081: ldarg.0 - IL_0082: ldarg.1 - IL_0083: conv.r8 - IL_0084: stfld float64 MCCTest.VType6::f17 - IL_0089: ldarg.0 - IL_008a: ldarg.1 - IL_008b: conv.r8 - IL_008c: stfld float64 MCCTest.VType6::f18 - IL_0091: ldarg.0 - IL_0092: ldarg.1 - IL_0093: conv.r8 - IL_0094: stfld float64 MCCTest.VType6::f19 - IL_0099: ldarg.0 - IL_009a: ldarg.1 - IL_009b: conv.r8 - IL_009c: stfld float64 MCCTest.VType6::f20 - IL_00a1: ldarg.0 - IL_00a2: ldarg.1 - IL_00a3: conv.r8 - IL_00a4: stfld float64 MCCTest.VType6::f21 - IL_00a9: ldarg.0 - IL_00aa: ldarg.1 - IL_00ab: conv.r8 - IL_00ac: stfld float64 MCCTest.VType6::f22 - IL_00b1: ldarg.0 - IL_00b2: ldarg.1 - IL_00b3: conv.r8 - IL_00b4: stfld float64 MCCTest.VType6::f23 - IL_00b9: ldarg.0 - IL_00ba: ldarg.1 - IL_00bb: conv.r8 - IL_00bc: stfld float64 MCCTest.VType6::f24 - IL_00c1: ldarg.0 - IL_00c2: ldarg.1 - IL_00c3: conv.r8 - IL_00c4: stfld float64 MCCTest.VType6::f25 - IL_00c9: ldarg.0 - IL_00ca: ldarg.1 - IL_00cb: conv.r8 - IL_00cc: stfld float64 MCCTest.VType6::f26 - IL_00d1: ldarg.0 - IL_00d2: ldarg.1 - IL_00d3: conv.r8 - IL_00d4: stfld float64 MCCTest.VType6::f27 - IL_00d9: ldarg.0 - IL_00da: ldarg.1 - IL_00db: conv.r8 - IL_00dc: stfld float64 MCCTest.VType6::f28 - IL_00e1: ldarg.0 - IL_00e2: ldarg.1 - IL_00e3: conv.r8 - IL_00e4: stfld float64 MCCTest.VType6::f29 - IL_00e9: ret - } // end of method VType6::Init - - .method public hidebysig newslot virtual final - instance void Init() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.1 - IL_0003: call instance void MCCTest.VType6::Init(int32) - IL_0008: nop - IL_0009: ret - } // end of method VType6::Init - - .method public hidebysig newslot virtual final - instance void Zero() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.0 - IL_0003: call instance void MCCTest.VType6::Init(int32) - IL_0008: nop - IL_0009: ret - } // end of method VType6::Zero - - .method public hidebysig instance void - Add(valuetype MCCTest.VType6 val) cil managed - { - // Code size 582 (0x246) - .maxstack 3 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: dup - IL_0003: ldfld float64 MCCTest.VType6::f1 - IL_0008: ldarga.s val - IL_000a: ldfld float64 MCCTest.VType6::f1 - IL_000f: add - IL_0010: stfld float64 MCCTest.VType6::f1 - IL_0015: ldarg.0 - IL_0016: dup - IL_0017: ldfld float64 MCCTest.VType6::f2 - IL_001c: ldarga.s val - IL_001e: ldfld float64 MCCTest.VType6::f2 - IL_0023: add - IL_0024: stfld float64 MCCTest.VType6::f2 - IL_0029: ldarg.0 - IL_002a: dup - IL_002b: ldfld float64 MCCTest.VType6::f3 - IL_0030: ldarga.s val - IL_0032: ldfld float64 MCCTest.VType6::f3 - IL_0037: add - IL_0038: stfld float64 MCCTest.VType6::f3 - IL_003d: ldarg.0 - IL_003e: dup - IL_003f: ldfld float64 MCCTest.VType6::f4 - IL_0044: ldarga.s val - IL_0046: ldfld float64 MCCTest.VType6::f4 - IL_004b: add - IL_004c: stfld float64 MCCTest.VType6::f4 - IL_0051: ldarg.0 - IL_0052: dup - IL_0053: ldfld float64 MCCTest.VType6::f5 - IL_0058: ldarga.s val - IL_005a: ldfld float64 MCCTest.VType6::f5 - IL_005f: add - IL_0060: stfld float64 MCCTest.VType6::f5 - IL_0065: ldarg.0 - IL_0066: dup - IL_0067: ldfld float64 MCCTest.VType6::f6 - IL_006c: ldarga.s val - IL_006e: ldfld float64 MCCTest.VType6::f6 - IL_0073: add - IL_0074: stfld float64 MCCTest.VType6::f6 - IL_0079: ldarg.0 - IL_007a: dup - IL_007b: ldfld float64 MCCTest.VType6::f7 - IL_0080: ldarga.s val - IL_0082: ldfld float64 MCCTest.VType6::f7 - IL_0087: add - IL_0088: stfld float64 MCCTest.VType6::f7 - IL_008d: ldarg.0 - IL_008e: dup - IL_008f: ldfld float64 MCCTest.VType6::f8 - IL_0094: ldarga.s val - IL_0096: ldfld float64 MCCTest.VType6::f8 - IL_009b: add - IL_009c: stfld float64 MCCTest.VType6::f8 - IL_00a1: ldarg.0 - IL_00a2: dup - IL_00a3: ldfld float64 MCCTest.VType6::f9 - IL_00a8: ldarga.s val - IL_00aa: ldfld float64 MCCTest.VType6::f9 - IL_00af: add - IL_00b0: stfld float64 MCCTest.VType6::f9 - IL_00b5: ldarg.0 - IL_00b6: dup - IL_00b7: ldfld float64 MCCTest.VType6::f10 - IL_00bc: ldarga.s val - IL_00be: ldfld float64 MCCTest.VType6::f10 - IL_00c3: add - IL_00c4: stfld float64 MCCTest.VType6::f10 - IL_00c9: ldarg.0 - IL_00ca: dup - IL_00cb: ldfld float64 MCCTest.VType6::f11 - IL_00d0: ldarga.s val - IL_00d2: ldfld float64 MCCTest.VType6::f11 - IL_00d7: add - IL_00d8: stfld float64 MCCTest.VType6::f11 - IL_00dd: ldarg.0 - IL_00de: dup - IL_00df: ldfld float64 MCCTest.VType6::f12 - IL_00e4: ldarga.s val - IL_00e6: ldfld float64 MCCTest.VType6::f12 - IL_00eb: add - IL_00ec: stfld float64 MCCTest.VType6::f12 - IL_00f1: ldarg.0 - IL_00f2: dup - IL_00f3: ldfld float64 MCCTest.VType6::f13 - IL_00f8: ldarga.s val - IL_00fa: ldfld float64 MCCTest.VType6::f13 - IL_00ff: add - IL_0100: stfld float64 MCCTest.VType6::f13 - IL_0105: ldarg.0 - IL_0106: dup - IL_0107: ldfld float64 MCCTest.VType6::f14 - IL_010c: ldarga.s val - IL_010e: ldfld float64 MCCTest.VType6::f14 - IL_0113: add - IL_0114: stfld float64 MCCTest.VType6::f14 - IL_0119: ldarg.0 - IL_011a: dup - IL_011b: ldfld float64 MCCTest.VType6::f15 - IL_0120: ldarga.s val - IL_0122: ldfld float64 MCCTest.VType6::f15 - IL_0127: add - IL_0128: stfld float64 MCCTest.VType6::f15 - IL_012d: ldarg.0 - IL_012e: dup - IL_012f: ldfld float64 MCCTest.VType6::f16 - IL_0134: ldarga.s val - IL_0136: ldfld float64 MCCTest.VType6::f16 - IL_013b: add - IL_013c: stfld float64 MCCTest.VType6::f16 - IL_0141: ldarg.0 - IL_0142: dup - IL_0143: ldfld float64 MCCTest.VType6::f17 - IL_0148: ldarga.s val - IL_014a: ldfld float64 MCCTest.VType6::f17 - IL_014f: add - IL_0150: stfld float64 MCCTest.VType6::f17 - IL_0155: ldarg.0 - IL_0156: dup - IL_0157: ldfld float64 MCCTest.VType6::f18 - IL_015c: ldarga.s val - IL_015e: ldfld float64 MCCTest.VType6::f18 - IL_0163: add - IL_0164: stfld float64 MCCTest.VType6::f18 - IL_0169: ldarg.0 - IL_016a: dup - IL_016b: ldfld float64 MCCTest.VType6::f19 - IL_0170: ldarga.s val - IL_0172: ldfld float64 MCCTest.VType6::f19 - IL_0177: add - IL_0178: stfld float64 MCCTest.VType6::f19 - IL_017d: ldarg.0 - IL_017e: dup - IL_017f: ldfld float64 MCCTest.VType6::f20 - IL_0184: ldarga.s val - IL_0186: ldfld float64 MCCTest.VType6::f20 - IL_018b: add - IL_018c: stfld float64 MCCTest.VType6::f20 - IL_0191: ldarg.0 - IL_0192: dup - IL_0193: ldfld float64 MCCTest.VType6::f21 - IL_0198: ldarga.s val - IL_019a: ldfld float64 MCCTest.VType6::f21 - IL_019f: add - IL_01a0: stfld float64 MCCTest.VType6::f21 - IL_01a5: ldarg.0 - IL_01a6: dup - IL_01a7: ldfld float64 MCCTest.VType6::f22 - IL_01ac: ldarga.s val - IL_01ae: ldfld float64 MCCTest.VType6::f22 - IL_01b3: add - IL_01b4: stfld float64 MCCTest.VType6::f22 - IL_01b9: ldarg.0 - IL_01ba: dup - IL_01bb: ldfld float64 MCCTest.VType6::f23 - IL_01c0: ldarga.s val - IL_01c2: ldfld float64 MCCTest.VType6::f23 - IL_01c7: add - IL_01c8: stfld float64 MCCTest.VType6::f23 - IL_01cd: ldarg.0 - IL_01ce: dup - IL_01cf: ldfld float64 MCCTest.VType6::f24 - IL_01d4: ldarga.s val - IL_01d6: ldfld float64 MCCTest.VType6::f24 - IL_01db: add - IL_01dc: stfld float64 MCCTest.VType6::f24 - IL_01e1: ldarg.0 - IL_01e2: dup - IL_01e3: ldfld float64 MCCTest.VType6::f25 - IL_01e8: ldarga.s val - IL_01ea: ldfld float64 MCCTest.VType6::f25 - IL_01ef: add - IL_01f0: stfld float64 MCCTest.VType6::f25 - IL_01f5: ldarg.0 - IL_01f6: dup - IL_01f7: ldfld float64 MCCTest.VType6::f26 - IL_01fc: ldarga.s val - IL_01fe: ldfld float64 MCCTest.VType6::f26 - IL_0203: add - IL_0204: stfld float64 MCCTest.VType6::f26 - IL_0209: ldarg.0 - IL_020a: dup - IL_020b: ldfld float64 MCCTest.VType6::f27 - IL_0210: ldarga.s val - IL_0212: ldfld float64 MCCTest.VType6::f27 - IL_0217: add - IL_0218: stfld float64 MCCTest.VType6::f27 - IL_021d: ldarg.0 - IL_021e: dup - IL_021f: ldfld float64 MCCTest.VType6::f28 - IL_0224: ldarga.s val - IL_0226: ldfld float64 MCCTest.VType6::f28 - IL_022b: add - IL_022c: stfld float64 MCCTest.VType6::f28 - IL_0231: ldarg.0 - IL_0232: dup - IL_0233: ldfld float64 MCCTest.VType6::f29 - IL_0238: ldarga.s val - IL_023a: ldfld float64 MCCTest.VType6::f29 - IL_023f: add - IL_0240: stfld float64 MCCTest.VType6::f29 - IL_0245: ret - } // end of method VType6::Add - - .method public hidebysig newslot virtual final - instance void Check(valuetype MCCTest.VType6 expected) cil managed - { - // Code size 1278 (0x4fe) - .maxstack 4 - .locals init (bool V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldfld float64 MCCTest.VType6::f1 - IL_0007: ldarga.s expected - IL_0009: ldfld float64 MCCTest.VType6::f1 - IL_000e: ceq - IL_0010: stloc.0 - IL_0011: ldloc.0 - IL_0012: brtrue.s IL_002d - - IL_0014: nop - IL_0015: ldstr "f1" - IL_001a: ldarg.0 - IL_001b: ldfld float64 MCCTest.VType6::f1 - IL_0020: ldarga.s expected - IL_0022: ldfld float64 MCCTest.VType6::f1 - IL_0027: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_002c: throw - - IL_002d: ldarg.0 - IL_002e: ldfld float64 MCCTest.VType6::f2 - IL_0033: ldarga.s expected - IL_0035: ldfld float64 MCCTest.VType6::f2 - IL_003a: ceq - IL_003c: stloc.0 - IL_003d: ldloc.0 - IL_003e: brtrue.s IL_0059 - - IL_0040: nop - IL_0041: ldstr "f2" - IL_0046: ldarg.0 - IL_0047: ldfld float64 MCCTest.VType6::f2 - IL_004c: ldarga.s expected - IL_004e: ldfld float64 MCCTest.VType6::f2 - IL_0053: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0058: throw - - IL_0059: ldarg.0 - IL_005a: ldfld float64 MCCTest.VType6::f3 - IL_005f: ldarga.s expected - IL_0061: ldfld float64 MCCTest.VType6::f3 - IL_0066: ceq - IL_0068: stloc.0 - IL_0069: ldloc.0 - IL_006a: brtrue.s IL_0085 - - IL_006c: nop - IL_006d: ldstr "f3" - IL_0072: ldarg.0 - IL_0073: ldfld float64 MCCTest.VType6::f3 - IL_0078: ldarga.s expected - IL_007a: ldfld float64 MCCTest.VType6::f3 - IL_007f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0084: throw - - IL_0085: ldarg.0 - IL_0086: ldfld float64 MCCTest.VType6::f4 - IL_008b: ldarga.s expected - IL_008d: ldfld float64 MCCTest.VType6::f4 - IL_0092: ceq - IL_0094: stloc.0 - IL_0095: ldloc.0 - IL_0096: brtrue.s IL_00b1 - - IL_0098: nop - IL_0099: ldstr "f4" - IL_009e: ldarg.0 - IL_009f: ldfld float64 MCCTest.VType6::f4 - IL_00a4: ldarga.s expected - IL_00a6: ldfld float64 MCCTest.VType6::f4 - IL_00ab: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_00b0: throw - - IL_00b1: ldarg.0 - IL_00b2: ldfld float64 MCCTest.VType6::f5 - IL_00b7: ldarga.s expected - IL_00b9: ldfld float64 MCCTest.VType6::f5 - IL_00be: ceq - IL_00c0: stloc.0 - IL_00c1: ldloc.0 - IL_00c2: brtrue.s IL_00dd - - IL_00c4: nop - IL_00c5: ldstr "f5" - IL_00ca: ldarg.0 - IL_00cb: ldfld float64 MCCTest.VType6::f5 - IL_00d0: ldarga.s expected - IL_00d2: ldfld float64 MCCTest.VType6::f5 - IL_00d7: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_00dc: throw - - IL_00dd: ldarg.0 - IL_00de: ldfld float64 MCCTest.VType6::f6 - IL_00e3: ldarga.s expected - IL_00e5: ldfld float64 MCCTest.VType6::f6 - IL_00ea: ceq - IL_00ec: stloc.0 - IL_00ed: ldloc.0 - IL_00ee: brtrue.s IL_0109 - - IL_00f0: nop - IL_00f1: ldstr "f6" - IL_00f6: ldarg.0 - IL_00f7: ldfld float64 MCCTest.VType6::f6 - IL_00fc: ldarga.s expected - IL_00fe: ldfld float64 MCCTest.VType6::f6 - IL_0103: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0108: throw - - IL_0109: ldarg.0 - IL_010a: ldfld float64 MCCTest.VType6::f7 - IL_010f: ldarga.s expected - IL_0111: ldfld float64 MCCTest.VType6::f7 - IL_0116: ceq - IL_0118: stloc.0 - IL_0119: ldloc.0 - IL_011a: brtrue.s IL_0135 - - IL_011c: nop - IL_011d: ldstr "f7" - IL_0122: ldarg.0 - IL_0123: ldfld float64 MCCTest.VType6::f7 - IL_0128: ldarga.s expected - IL_012a: ldfld float64 MCCTest.VType6::f7 - IL_012f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0134: throw - - IL_0135: ldarg.0 - IL_0136: ldfld float64 MCCTest.VType6::f8 - IL_013b: ldarga.s expected - IL_013d: ldfld float64 MCCTest.VType6::f8 - IL_0142: ceq - IL_0144: stloc.0 - IL_0145: ldloc.0 - IL_0146: brtrue.s IL_0161 - - IL_0148: nop - IL_0149: ldstr "f8" - IL_014e: ldarg.0 - IL_014f: ldfld float64 MCCTest.VType6::f8 - IL_0154: ldarga.s expected - IL_0156: ldfld float64 MCCTest.VType6::f8 - IL_015b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0160: throw - - IL_0161: ldarg.0 - IL_0162: ldfld float64 MCCTest.VType6::f9 - IL_0167: ldarga.s expected - IL_0169: ldfld float64 MCCTest.VType6::f9 - IL_016e: ceq - IL_0170: stloc.0 - IL_0171: ldloc.0 - IL_0172: brtrue.s IL_018d - - IL_0174: nop - IL_0175: ldstr "f9" - IL_017a: ldarg.0 - IL_017b: ldfld float64 MCCTest.VType6::f9 - IL_0180: ldarga.s expected - IL_0182: ldfld float64 MCCTest.VType6::f9 - IL_0187: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_018c: throw - - IL_018d: ldarg.0 - IL_018e: ldfld float64 MCCTest.VType6::f10 - IL_0193: ldarga.s expected - IL_0195: ldfld float64 MCCTest.VType6::f10 - IL_019a: ceq - IL_019c: stloc.0 - IL_019d: ldloc.0 - IL_019e: brtrue.s IL_01b9 - - IL_01a0: nop - IL_01a1: ldstr "f10" - IL_01a6: ldarg.0 - IL_01a7: ldfld float64 MCCTest.VType6::f10 - IL_01ac: ldarga.s expected - IL_01ae: ldfld float64 MCCTest.VType6::f10 - IL_01b3: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_01b8: throw - - IL_01b9: ldarg.0 - IL_01ba: ldfld float64 MCCTest.VType6::f11 - IL_01bf: ldarga.s expected - IL_01c1: ldfld float64 MCCTest.VType6::f11 - IL_01c6: ceq - IL_01c8: stloc.0 - IL_01c9: ldloc.0 - IL_01ca: brtrue.s IL_01e5 - - IL_01cc: nop - IL_01cd: ldstr "f11" - IL_01d2: ldarg.0 - IL_01d3: ldfld float64 MCCTest.VType6::f11 - IL_01d8: ldarga.s expected - IL_01da: ldfld float64 MCCTest.VType6::f11 - IL_01df: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_01e4: throw - - IL_01e5: ldarg.0 - IL_01e6: ldfld float64 MCCTest.VType6::f12 - IL_01eb: ldarga.s expected - IL_01ed: ldfld float64 MCCTest.VType6::f12 - IL_01f2: ceq - IL_01f4: stloc.0 - IL_01f5: ldloc.0 - IL_01f6: brtrue.s IL_0211 - - IL_01f8: nop - IL_01f9: ldstr "f12" - IL_01fe: ldarg.0 - IL_01ff: ldfld float64 MCCTest.VType6::f12 - IL_0204: ldarga.s expected - IL_0206: ldfld float64 MCCTest.VType6::f12 - IL_020b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0210: throw - - IL_0211: ldarg.0 - IL_0212: ldfld float64 MCCTest.VType6::f13 - IL_0217: ldarga.s expected - IL_0219: ldfld float64 MCCTest.VType6::f13 - IL_021e: ceq - IL_0220: stloc.0 - IL_0221: ldloc.0 - IL_0222: brtrue.s IL_023d - - IL_0224: nop - IL_0225: ldstr "f13" - IL_022a: ldarg.0 - IL_022b: ldfld float64 MCCTest.VType6::f13 - IL_0230: ldarga.s expected - IL_0232: ldfld float64 MCCTest.VType6::f13 - IL_0237: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_023c: throw - - IL_023d: ldarg.0 - IL_023e: ldfld float64 MCCTest.VType6::f14 - IL_0243: ldarga.s expected - IL_0245: ldfld float64 MCCTest.VType6::f14 - IL_024a: ceq - IL_024c: stloc.0 - IL_024d: ldloc.0 - IL_024e: brtrue.s IL_0269 - - IL_0250: nop - IL_0251: ldstr "f14" - IL_0256: ldarg.0 - IL_0257: ldfld float64 MCCTest.VType6::f14 - IL_025c: ldarga.s expected - IL_025e: ldfld float64 MCCTest.VType6::f14 - IL_0263: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0268: throw - - IL_0269: ldarg.0 - IL_026a: ldfld float64 MCCTest.VType6::f15 - IL_026f: ldarga.s expected - IL_0271: ldfld float64 MCCTest.VType6::f15 - IL_0276: ceq - IL_0278: stloc.0 - IL_0279: ldloc.0 - IL_027a: brtrue.s IL_0295 - - IL_027c: nop - IL_027d: ldstr "f15" - IL_0282: ldarg.0 - IL_0283: ldfld float64 MCCTest.VType6::f15 - IL_0288: ldarga.s expected - IL_028a: ldfld float64 MCCTest.VType6::f15 - IL_028f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0294: throw - - IL_0295: ldarg.0 - IL_0296: ldfld float64 MCCTest.VType6::f16 - IL_029b: ldarga.s expected - IL_029d: ldfld float64 MCCTest.VType6::f16 - IL_02a2: ceq - IL_02a4: stloc.0 - IL_02a5: ldloc.0 - IL_02a6: brtrue.s IL_02c1 - - IL_02a8: nop - IL_02a9: ldstr "f16" - IL_02ae: ldarg.0 - IL_02af: ldfld float64 MCCTest.VType6::f16 - IL_02b4: ldarga.s expected - IL_02b6: ldfld float64 MCCTest.VType6::f16 - IL_02bb: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_02c0: throw - - IL_02c1: ldarg.0 - IL_02c2: ldfld float64 MCCTest.VType6::f17 - IL_02c7: ldarga.s expected - IL_02c9: ldfld float64 MCCTest.VType6::f17 - IL_02ce: ceq - IL_02d0: stloc.0 - IL_02d1: ldloc.0 - IL_02d2: brtrue.s IL_02ed - - IL_02d4: nop - IL_02d5: ldstr "f17" - IL_02da: ldarg.0 - IL_02db: ldfld float64 MCCTest.VType6::f17 - IL_02e0: ldarga.s expected - IL_02e2: ldfld float64 MCCTest.VType6::f17 - IL_02e7: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_02ec: throw - - IL_02ed: ldarg.0 - IL_02ee: ldfld float64 MCCTest.VType6::f18 - IL_02f3: ldarga.s expected - IL_02f5: ldfld float64 MCCTest.VType6::f18 - IL_02fa: ceq - IL_02fc: stloc.0 - IL_02fd: ldloc.0 - IL_02fe: brtrue.s IL_0319 - - IL_0300: nop - IL_0301: ldstr "f18" - IL_0306: ldarg.0 - IL_0307: ldfld float64 MCCTest.VType6::f18 - IL_030c: ldarga.s expected - IL_030e: ldfld float64 MCCTest.VType6::f18 - IL_0313: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0318: throw - - IL_0319: ldarg.0 - IL_031a: ldfld float64 MCCTest.VType6::f19 - IL_031f: ldarga.s expected - IL_0321: ldfld float64 MCCTest.VType6::f19 - IL_0326: ceq - IL_0328: stloc.0 - IL_0329: ldloc.0 - IL_032a: brtrue.s IL_0345 - - IL_032c: nop - IL_032d: ldstr "f19" - IL_0332: ldarg.0 - IL_0333: ldfld float64 MCCTest.VType6::f19 - IL_0338: ldarga.s expected - IL_033a: ldfld float64 MCCTest.VType6::f19 - IL_033f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0344: throw - - IL_0345: ldarg.0 - IL_0346: ldfld float64 MCCTest.VType6::f20 - IL_034b: ldarga.s expected - IL_034d: ldfld float64 MCCTest.VType6::f20 - IL_0352: ceq - IL_0354: stloc.0 - IL_0355: ldloc.0 - IL_0356: brtrue.s IL_0371 - - IL_0358: nop - IL_0359: ldstr "f20" - IL_035e: ldarg.0 - IL_035f: ldfld float64 MCCTest.VType6::f20 - IL_0364: ldarga.s expected - IL_0366: ldfld float64 MCCTest.VType6::f20 - IL_036b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0370: throw - - IL_0371: ldarg.0 - IL_0372: ldfld float64 MCCTest.VType6::f21 - IL_0377: ldarga.s expected - IL_0379: ldfld float64 MCCTest.VType6::f21 - IL_037e: ceq - IL_0380: stloc.0 - IL_0381: ldloc.0 - IL_0382: brtrue.s IL_039d - - IL_0384: nop - IL_0385: ldstr "f21" - IL_038a: ldarg.0 - IL_038b: ldfld float64 MCCTest.VType6::f21 - IL_0390: ldarga.s expected - IL_0392: ldfld float64 MCCTest.VType6::f21 - IL_0397: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_039c: throw - - IL_039d: ldarg.0 - IL_039e: ldfld float64 MCCTest.VType6::f22 - IL_03a3: ldarga.s expected - IL_03a5: ldfld float64 MCCTest.VType6::f22 - IL_03aa: ceq - IL_03ac: stloc.0 - IL_03ad: ldloc.0 - IL_03ae: brtrue.s IL_03c9 - - IL_03b0: nop - IL_03b1: ldstr "f22" - IL_03b6: ldarg.0 - IL_03b7: ldfld float64 MCCTest.VType6::f22 - IL_03bc: ldarga.s expected - IL_03be: ldfld float64 MCCTest.VType6::f22 - IL_03c3: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_03c8: throw - - IL_03c9: ldarg.0 - IL_03ca: ldfld float64 MCCTest.VType6::f23 - IL_03cf: ldarga.s expected - IL_03d1: ldfld float64 MCCTest.VType6::f23 - IL_03d6: ceq - IL_03d8: stloc.0 - IL_03d9: ldloc.0 - IL_03da: brtrue.s IL_03f5 - - IL_03dc: nop - IL_03dd: ldstr "f23" - IL_03e2: ldarg.0 - IL_03e3: ldfld float64 MCCTest.VType6::f23 - IL_03e8: ldarga.s expected - IL_03ea: ldfld float64 MCCTest.VType6::f23 - IL_03ef: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_03f4: throw - - IL_03f5: ldarg.0 - IL_03f6: ldfld float64 MCCTest.VType6::f24 - IL_03fb: ldarga.s expected - IL_03fd: ldfld float64 MCCTest.VType6::f24 - IL_0402: ceq - IL_0404: stloc.0 - IL_0405: ldloc.0 - IL_0406: brtrue.s IL_0421 - - IL_0408: nop - IL_0409: ldstr "f24" - IL_040e: ldarg.0 - IL_040f: ldfld float64 MCCTest.VType6::f24 - IL_0414: ldarga.s expected - IL_0416: ldfld float64 MCCTest.VType6::f24 - IL_041b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0420: throw - - IL_0421: ldarg.0 - IL_0422: ldfld float64 MCCTest.VType6::f25 - IL_0427: ldarga.s expected - IL_0429: ldfld float64 MCCTest.VType6::f25 - IL_042e: ceq - IL_0430: stloc.0 - IL_0431: ldloc.0 - IL_0432: brtrue.s IL_044d - - IL_0434: nop - IL_0435: ldstr "f25" - IL_043a: ldarg.0 - IL_043b: ldfld float64 MCCTest.VType6::f25 - IL_0440: ldarga.s expected - IL_0442: ldfld float64 MCCTest.VType6::f25 - IL_0447: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_044c: throw - - IL_044d: ldarg.0 - IL_044e: ldfld float64 MCCTest.VType6::f26 - IL_0453: ldarga.s expected - IL_0455: ldfld float64 MCCTest.VType6::f26 - IL_045a: ceq - IL_045c: stloc.0 - IL_045d: ldloc.0 - IL_045e: brtrue.s IL_0479 - - IL_0460: nop - IL_0461: ldstr "f26" - IL_0466: ldarg.0 - IL_0467: ldfld float64 MCCTest.VType6::f26 - IL_046c: ldarga.s expected - IL_046e: ldfld float64 MCCTest.VType6::f26 - IL_0473: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0478: throw - - IL_0479: ldarg.0 - IL_047a: ldfld float64 MCCTest.VType6::f27 - IL_047f: ldarga.s expected - IL_0481: ldfld float64 MCCTest.VType6::f27 - IL_0486: ceq - IL_0488: stloc.0 - IL_0489: ldloc.0 - IL_048a: brtrue.s IL_04a5 - - IL_048c: nop - IL_048d: ldstr "f27" - IL_0492: ldarg.0 - IL_0493: ldfld float64 MCCTest.VType6::f27 - IL_0498: ldarga.s expected - IL_049a: ldfld float64 MCCTest.VType6::f27 - IL_049f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_04a4: throw - - IL_04a5: ldarg.0 - IL_04a6: ldfld float64 MCCTest.VType6::f28 - IL_04ab: ldarga.s expected - IL_04ad: ldfld float64 MCCTest.VType6::f28 - IL_04b2: ceq - IL_04b4: stloc.0 - IL_04b5: ldloc.0 - IL_04b6: brtrue.s IL_04d1 - - IL_04b8: nop - IL_04b9: ldstr "f28" - IL_04be: ldarg.0 - IL_04bf: ldfld float64 MCCTest.VType6::f28 - IL_04c4: ldarga.s expected - IL_04c6: ldfld float64 MCCTest.VType6::f28 - IL_04cb: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_04d0: throw - - IL_04d1: ldarg.0 - IL_04d2: ldfld float64 MCCTest.VType6::f29 - IL_04d7: ldarga.s expected - IL_04d9: ldfld float64 MCCTest.VType6::f29 - IL_04de: ceq - IL_04e0: stloc.0 - IL_04e1: ldloc.0 - IL_04e2: brtrue.s IL_04fd - - IL_04e4: nop - IL_04e5: ldstr "f29" - IL_04ea: ldarg.0 - IL_04eb: ldfld float64 MCCTest.VType6::f29 - IL_04f0: ldarga.s expected - IL_04f2: ldfld float64 MCCTest.VType6::f29 - IL_04f7: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_04fc: throw - - IL_04fd: ret - } // end of method VType6::Check - - .method public hidebysig instance string - Dump(int32 level) cil managed - { - // Code size 866 (0x362) - .maxstack 4 - .locals init (string V_0, - class [mscorlib]System.IO.StringWriter V_1, - string V_2) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: call string MCCTest.FormatUtils::GetPadding(int32) - IL_0007: stloc.0 - IL_0008: newobj instance void [mscorlib]System.IO.StringWriter::.ctor() - IL_000d: stloc.1 - IL_000e: ldloc.1 - IL_000f: ldloc.0 - IL_0010: ldstr "f1 = " - IL_0015: ldarg.0 - IL_0016: ldfld float64 MCCTest.VType6::f1 - IL_001b: box [mscorlib]System.Double - IL_0020: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0025: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_002a: nop - IL_002b: ldloc.1 - IL_002c: ldloc.0 - IL_002d: ldstr "f2 = " - IL_0032: ldarg.0 - IL_0033: ldfld float64 MCCTest.VType6::f2 - IL_0038: box [mscorlib]System.Double - IL_003d: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0042: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0047: nop - IL_0048: ldloc.1 - IL_0049: ldloc.0 - IL_004a: ldstr "f3 = " - IL_004f: ldarg.0 - IL_0050: ldfld float64 MCCTest.VType6::f3 - IL_0055: box [mscorlib]System.Double - IL_005a: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_005f: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0064: nop - IL_0065: ldloc.1 - IL_0066: ldloc.0 - IL_0067: ldstr "f4 = " - IL_006c: ldarg.0 - IL_006d: ldfld float64 MCCTest.VType6::f4 - IL_0072: box [mscorlib]System.Double - IL_0077: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_007c: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0081: nop - IL_0082: ldloc.1 - IL_0083: ldloc.0 - IL_0084: ldstr "f5 = " - IL_0089: ldarg.0 - IL_008a: ldfld float64 MCCTest.VType6::f5 - IL_008f: box [mscorlib]System.Double - IL_0094: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0099: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_009e: nop - IL_009f: ldloc.1 - IL_00a0: ldloc.0 - IL_00a1: ldstr "f6 = " - IL_00a6: ldarg.0 - IL_00a7: ldfld float64 MCCTest.VType6::f6 - IL_00ac: box [mscorlib]System.Double - IL_00b1: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_00b6: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_00bb: nop - IL_00bc: ldloc.1 - IL_00bd: ldloc.0 - IL_00be: ldstr "f7 = " - IL_00c3: ldarg.0 - IL_00c4: ldfld float64 MCCTest.VType6::f7 - IL_00c9: box [mscorlib]System.Double - IL_00ce: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_00d3: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_00d8: nop - IL_00d9: ldloc.1 - IL_00da: ldloc.0 - IL_00db: ldstr "f8 = " - IL_00e0: ldarg.0 - IL_00e1: ldfld float64 MCCTest.VType6::f8 - IL_00e6: box [mscorlib]System.Double - IL_00eb: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_00f0: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_00f5: nop - IL_00f6: ldloc.1 - IL_00f7: ldloc.0 - IL_00f8: ldstr "f9 = " - IL_00fd: ldarg.0 - IL_00fe: ldfld float64 MCCTest.VType6::f9 - IL_0103: box [mscorlib]System.Double - IL_0108: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_010d: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0112: nop - IL_0113: ldloc.1 - IL_0114: ldloc.0 - IL_0115: ldstr "f10 = " - IL_011a: ldarg.0 - IL_011b: ldfld float64 MCCTest.VType6::f10 - IL_0120: box [mscorlib]System.Double - IL_0125: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_012a: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_012f: nop - IL_0130: ldloc.1 - IL_0131: ldloc.0 - IL_0132: ldstr "f11 = " - IL_0137: ldarg.0 - IL_0138: ldfld float64 MCCTest.VType6::f11 - IL_013d: box [mscorlib]System.Double - IL_0142: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0147: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_014c: nop - IL_014d: ldloc.1 - IL_014e: ldloc.0 - IL_014f: ldstr "f12 = " - IL_0154: ldarg.0 - IL_0155: ldfld float64 MCCTest.VType6::f12 - IL_015a: box [mscorlib]System.Double - IL_015f: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0164: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0169: nop - IL_016a: ldloc.1 - IL_016b: ldloc.0 - IL_016c: ldstr "f13 = " - IL_0171: ldarg.0 - IL_0172: ldfld float64 MCCTest.VType6::f13 - IL_0177: box [mscorlib]System.Double - IL_017c: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0181: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0186: nop - IL_0187: ldloc.1 - IL_0188: ldloc.0 - IL_0189: ldstr "f14 = " - IL_018e: ldarg.0 - IL_018f: ldfld float64 MCCTest.VType6::f14 - IL_0194: box [mscorlib]System.Double - IL_0199: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_019e: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_01a3: nop - IL_01a4: ldloc.1 - IL_01a5: ldloc.0 - IL_01a6: ldstr "f15 = " - IL_01ab: ldarg.0 - IL_01ac: ldfld float64 MCCTest.VType6::f15 - IL_01b1: box [mscorlib]System.Double - IL_01b6: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_01bb: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_01c0: nop - IL_01c1: ldloc.1 - IL_01c2: ldloc.0 - IL_01c3: ldstr "f16 = " - IL_01c8: ldarg.0 - IL_01c9: ldfld float64 MCCTest.VType6::f16 - IL_01ce: box [mscorlib]System.Double - IL_01d3: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_01d8: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_01dd: nop - IL_01de: ldloc.1 - IL_01df: ldloc.0 - IL_01e0: ldstr "f17 = " - IL_01e5: ldarg.0 - IL_01e6: ldfld float64 MCCTest.VType6::f17 - IL_01eb: box [mscorlib]System.Double - IL_01f0: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_01f5: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_01fa: nop - IL_01fb: ldloc.1 - IL_01fc: ldloc.0 - IL_01fd: ldstr "f18 = " - IL_0202: ldarg.0 - IL_0203: ldfld float64 MCCTest.VType6::f18 - IL_0208: box [mscorlib]System.Double - IL_020d: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0212: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0217: nop - IL_0218: ldloc.1 - IL_0219: ldloc.0 - IL_021a: ldstr "f19 = " - IL_021f: ldarg.0 - IL_0220: ldfld float64 MCCTest.VType6::f19 - IL_0225: box [mscorlib]System.Double - IL_022a: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_022f: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0234: nop - IL_0235: ldloc.1 - IL_0236: ldloc.0 - IL_0237: ldstr "f20 = " - IL_023c: ldarg.0 - IL_023d: ldfld float64 MCCTest.VType6::f20 - IL_0242: box [mscorlib]System.Double - IL_0247: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_024c: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0251: nop - IL_0252: ldloc.1 - IL_0253: ldloc.0 - IL_0254: ldstr "f21 = " - IL_0259: ldarg.0 - IL_025a: ldfld float64 MCCTest.VType6::f21 - IL_025f: box [mscorlib]System.Double - IL_0264: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0269: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_026e: nop - IL_026f: ldloc.1 - IL_0270: ldloc.0 - IL_0271: ldstr "f22 = " - IL_0276: ldarg.0 - IL_0277: ldfld float64 MCCTest.VType6::f22 - IL_027c: box [mscorlib]System.Double - IL_0281: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0286: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_028b: nop - IL_028c: ldloc.1 - IL_028d: ldloc.0 - IL_028e: ldstr "f23 = " - IL_0293: ldarg.0 - IL_0294: ldfld float64 MCCTest.VType6::f23 - IL_0299: box [mscorlib]System.Double - IL_029e: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_02a3: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_02a8: nop - IL_02a9: ldloc.1 - IL_02aa: ldloc.0 - IL_02ab: ldstr "f24 = " - IL_02b0: ldarg.0 - IL_02b1: ldfld float64 MCCTest.VType6::f24 - IL_02b6: box [mscorlib]System.Double - IL_02bb: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_02c0: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_02c5: nop - IL_02c6: ldloc.1 - IL_02c7: ldloc.0 - IL_02c8: ldstr "f25 = " - IL_02cd: ldarg.0 - IL_02ce: ldfld float64 MCCTest.VType6::f25 - IL_02d3: box [mscorlib]System.Double - IL_02d8: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_02dd: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_02e2: nop - IL_02e3: ldloc.1 - IL_02e4: ldloc.0 - IL_02e5: ldstr "f26 = " - IL_02ea: ldarg.0 - IL_02eb: ldfld float64 MCCTest.VType6::f26 - IL_02f0: box [mscorlib]System.Double - IL_02f5: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_02fa: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_02ff: nop - IL_0300: ldloc.1 - IL_0301: ldloc.0 - IL_0302: ldstr "f27 = " - IL_0307: ldarg.0 - IL_0308: ldfld float64 MCCTest.VType6::f27 - IL_030d: box [mscorlib]System.Double - IL_0312: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0317: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_031c: nop - IL_031d: ldloc.1 - IL_031e: ldloc.0 - IL_031f: ldstr "f28 = " - IL_0324: ldarg.0 - IL_0325: ldfld float64 MCCTest.VType6::f28 - IL_032a: box [mscorlib]System.Double - IL_032f: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0334: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0339: nop - IL_033a: ldloc.1 - IL_033b: ldloc.0 - IL_033c: ldstr "f29 = " - IL_0341: ldarg.0 - IL_0342: ldfld float64 MCCTest.VType6::f29 - IL_0347: box [mscorlib]System.Double - IL_034c: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0351: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0356: nop - IL_0357: ldloc.1 - IL_0358: callvirt instance string [mscorlib]System.Object::ToString() - IL_035d: stloc.2 - IL_035e: br.s IL_0360 - - IL_0360: ldloc.2 - IL_0361: ret - } // end of method VType6::Dump - - .method public hidebysig instance string - Dump() cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.0 - IL_0003: call instance string MCCTest.VType6::Dump(int32) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method VType6::Dump - -} // end of class MCCTest.VType6 - -.class public sequential ansi sealed beforefieldinit MCCTest.VType7 - extends [mscorlib]System.ValueType - implements class MCCTest.CType`1 -{ - .field public float64 f1 - .field public float64 f2 - .field public float64 f3 - .field public float64 f4 - .field public float64 f5 - .field public float64 f6 - .field public float64 f7 - .field public float64 f8 - .field public float64 f9 - .field public float64 f10 - .field public float64 f11 - .field public float64 f12 - .field public float64 f13 - .field public float64 f14 - .field public float64 f15 - .field public float64 f16 - .field public float64 f17 - .field public float64 f18 - .field public float64 f19 - .field public float64 f20 - .field public float64 f21 - .field public float64 f22 - .field public float64 f23 - .field public float64 f24 - .field public float64 f25 - .field public float64 f26 - .field public float64 f27 - .field public float64 f28 - .field public float64 f29 - .field public float64 f30 - .field public float64 f31 - .field public float64 f32 - .field public float64 f33 - .field public float64 f34 - .field public float64 f35 - .field public float64 f36 - .field public float64 f37 - .field public float64 f38 - .field public float64 f39 - .field public float64 f40 - .field public float64 f41 - .field public float64 f42 - .field public float64 f43 - .field public float64 f44 - .field public float64 f45 - .field public float64 f46 - .field public float64 f47 - .field public float64 f48 - .field public float64 f49 - .field public float64 f50 - .field public float64 f51 - .field public float64 f52 - .field public float64 f53 - .field public float64 f54 - .field public float64 f55 - .field public float64 f56 - .field public float64 f57 - .field public float64 f58 - .field public float64 f59 - .field public float64 f60 - .field public float64 f61 - .field public float64 f62 - .field public float64 f63 - .field public float64 f64 - .field public float64 f65 - .field public float64 f66 - .field public float64 f67 - .field public float64 f68 - .field public float64 f69 - .field public float64 f70 - .field public float64 f71 - .field public float64 f72 - .field public float64 f73 - .field public float64 f74 - .field public float64 f75 - .field public float64 f76 - .field public float64 f77 - .field public float64 f78 - .field public float64 f79 - .field public float64 f80 - .field public float64 f81 - .field public float64 f82 - .field public float64 f83 - .field public float64 f84 - .field public float64 f85 - .field public float64 f86 - .field public float64 f87 - .field public float64 f88 - .field public float64 f89 - .field public float64 f90 - .field public float64 f91 - .field public float64 f92 - .field public float64 f93 - .field public float64 f94 - .field public float64 f95 - .field public float64 f96 - .field public float64 f97 - .field public float64 f98 - .field public float64 f99 - .field public float64 f100 - .field public float64 f101 - .field public float64 f102 - .field public float64 f103 - .field public float64 f104 - .field public float64 f105 - .field public float64 f106 - .field public float64 f107 - .field public float64 f108 - .field public float64 f109 - .field public float64 f110 - .field public float64 f111 - .field public float64 f112 - .field public float64 f113 - .field public float64 f114 - .field public float64 f115 - .field public float64 f116 - .field public float64 f117 - .field public float64 f118 - .field public float64 f119 - .field public float64 f120 - .field public float64 f121 - .field public float64 f122 - .field public float64 f123 - .field public float64 f124 - .field public float64 f125 - .field public float64 f126 - .field public float64 f127 - .field public float64 f128 - .field public float64 f129 - .field public float64 f130 - .field public float64 f131 - .field public float64 f132 - .field public float64 f133 - .field public float64 f134 - .field public float64 f135 - .field public float64 f136 - .field public float64 f137 - .field public float64 f138 - .field public float64 f139 - .field public float64 f140 - .field public float64 f141 - .field public float64 f142 - .field public float64 f143 - .field public float64 f144 - .field public float64 f145 - .field public float64 f146 - .field public float64 f147 - .field public float64 f148 - .field public float64 f149 - .field public float64 f150 - .field public float64 f151 - .field public float64 f152 - .field public float64 f153 - .field public float64 f154 - .field public float64 f155 - .field public float64 f156 - .field public float64 f157 - .field public float64 f158 - .field public float64 f159 - .field public float64 f160 - .field public float64 f161 - .field public float64 f162 - .field public float64 f163 - .field public float64 f164 - .field public float64 f165 - .field public float64 f166 - .field public float64 f167 - .field public float64 f168 - .field public float64 f169 - .field public float64 f170 - .field public float64 f171 - .field public float64 f172 - .field public float64 f173 - .field public float64 f174 - .field public float64 f175 - .field public float64 f176 - .field public float64 f177 - .field public float64 f178 - .field public float64 f179 - .field public float64 f180 - .field public float64 f181 - .field public float64 f182 - .field public float64 f183 - .field public float64 f184 - .field public float64 f185 - .field public float64 f186 - .field public float64 f187 - .field public float64 f188 - .field public float64 f189 - .field public float64 f190 - .field public float64 f191 - .field public float64 f192 - .field public float64 f193 - .field public float64 f194 - .field public float64 f195 - .field public float64 f196 - .field public float64 f197 - .field public float64 f198 - .field public float64 f199 - .field public float64 f200 - .field public float64 f201 - .field public float64 f202 - .field public float64 f203 - .field public float64 f204 - .field public float64 f205 - .field public float64 f206 - .field public float64 f207 - .field public float64 f208 - .field public float64 f209 - .field public float64 f210 - .field public float64 f211 - .field public float64 f212 - .field public float64 f213 - .field public float64 f214 - .field public float64 f215 - .field public float64 f216 - .field public float64 f217 - .field public float64 f218 - .field public float64 f219 - .field public float64 f220 - .field public float64 f221 - .field public float64 f222 - .field public float64 f223 - .field public float64 f224 - .field public float64 f225 - .field public float64 f226 - .field public float64 f227 - .field public float64 f228 - .field public float64 f229 - .field public float64 f230 - .field public float64 f231 - .field public float64 f232 - .field public float64 f233 - .field public float64 f234 - .field public float64 f235 - .field public float64 f236 - .field public float64 f237 - .field public float64 f238 - .field public float64 f239 - .field public float64 f240 - .field public float64 f241 - .field public float64 f242 - .field public float64 f243 - .field public float64 f244 - .field public float64 f245 - .field public float64 f246 - .field public float64 f247 - .field public float64 f248 - .field public float64 f249 - .field public float64 f250 - .field public float64 f251 - .field public float64 f252 - .field public float64 f253 - .field public float64 f254 - .field public float64 f255 - .field public float64 f256 - .field public float64 f257 - .method public hidebysig newslot virtual final - instance void Init(int32 count) cil managed - { - // Code size 2058 (0x80a) - .maxstack 2 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldarg.1 - IL_0003: conv.r8 - IL_0004: stfld float64 MCCTest.VType7::f1 - IL_0009: ldarg.0 - IL_000a: ldarg.1 - IL_000b: conv.r8 - IL_000c: stfld float64 MCCTest.VType7::f2 - IL_0011: ldarg.0 - IL_0012: ldarg.1 - IL_0013: conv.r8 - IL_0014: stfld float64 MCCTest.VType7::f3 - IL_0019: ldarg.0 - IL_001a: ldarg.1 - IL_001b: conv.r8 - IL_001c: stfld float64 MCCTest.VType7::f4 - IL_0021: ldarg.0 - IL_0022: ldarg.1 - IL_0023: conv.r8 - IL_0024: stfld float64 MCCTest.VType7::f5 - IL_0029: ldarg.0 - IL_002a: ldarg.1 - IL_002b: conv.r8 - IL_002c: stfld float64 MCCTest.VType7::f6 - IL_0031: ldarg.0 - IL_0032: ldarg.1 - IL_0033: conv.r8 - IL_0034: stfld float64 MCCTest.VType7::f7 - IL_0039: ldarg.0 - IL_003a: ldarg.1 - IL_003b: conv.r8 - IL_003c: stfld float64 MCCTest.VType7::f8 - IL_0041: ldarg.0 - IL_0042: ldarg.1 - IL_0043: conv.r8 - IL_0044: stfld float64 MCCTest.VType7::f9 - IL_0049: ldarg.0 - IL_004a: ldarg.1 - IL_004b: conv.r8 - IL_004c: stfld float64 MCCTest.VType7::f10 - IL_0051: ldarg.0 - IL_0052: ldarg.1 - IL_0053: conv.r8 - IL_0054: stfld float64 MCCTest.VType7::f11 - IL_0059: ldarg.0 - IL_005a: ldarg.1 - IL_005b: conv.r8 - IL_005c: stfld float64 MCCTest.VType7::f12 - IL_0061: ldarg.0 - IL_0062: ldarg.1 - IL_0063: conv.r8 - IL_0064: stfld float64 MCCTest.VType7::f13 - IL_0069: ldarg.0 - IL_006a: ldarg.1 - IL_006b: conv.r8 - IL_006c: stfld float64 MCCTest.VType7::f14 - IL_0071: ldarg.0 - IL_0072: ldarg.1 - IL_0073: conv.r8 - IL_0074: stfld float64 MCCTest.VType7::f15 - IL_0079: ldarg.0 - IL_007a: ldarg.1 - IL_007b: conv.r8 - IL_007c: stfld float64 MCCTest.VType7::f16 - IL_0081: ldarg.0 - IL_0082: ldarg.1 - IL_0083: conv.r8 - IL_0084: stfld float64 MCCTest.VType7::f17 - IL_0089: ldarg.0 - IL_008a: ldarg.1 - IL_008b: conv.r8 - IL_008c: stfld float64 MCCTest.VType7::f18 - IL_0091: ldarg.0 - IL_0092: ldarg.1 - IL_0093: conv.r8 - IL_0094: stfld float64 MCCTest.VType7::f19 - IL_0099: ldarg.0 - IL_009a: ldarg.1 - IL_009b: conv.r8 - IL_009c: stfld float64 MCCTest.VType7::f20 - IL_00a1: ldarg.0 - IL_00a2: ldarg.1 - IL_00a3: conv.r8 - IL_00a4: stfld float64 MCCTest.VType7::f21 - IL_00a9: ldarg.0 - IL_00aa: ldarg.1 - IL_00ab: conv.r8 - IL_00ac: stfld float64 MCCTest.VType7::f22 - IL_00b1: ldarg.0 - IL_00b2: ldarg.1 - IL_00b3: conv.r8 - IL_00b4: stfld float64 MCCTest.VType7::f23 - IL_00b9: ldarg.0 - IL_00ba: ldarg.1 - IL_00bb: conv.r8 - IL_00bc: stfld float64 MCCTest.VType7::f24 - IL_00c1: ldarg.0 - IL_00c2: ldarg.1 - IL_00c3: conv.r8 - IL_00c4: stfld float64 MCCTest.VType7::f25 - IL_00c9: ldarg.0 - IL_00ca: ldarg.1 - IL_00cb: conv.r8 - IL_00cc: stfld float64 MCCTest.VType7::f26 - IL_00d1: ldarg.0 - IL_00d2: ldarg.1 - IL_00d3: conv.r8 - IL_00d4: stfld float64 MCCTest.VType7::f27 - IL_00d9: ldarg.0 - IL_00da: ldarg.1 - IL_00db: conv.r8 - IL_00dc: stfld float64 MCCTest.VType7::f28 - IL_00e1: ldarg.0 - IL_00e2: ldarg.1 - IL_00e3: conv.r8 - IL_00e4: stfld float64 MCCTest.VType7::f29 - IL_00e9: ldarg.0 - IL_00ea: ldarg.1 - IL_00eb: conv.r8 - IL_00ec: stfld float64 MCCTest.VType7::f30 - IL_00f1: ldarg.0 - IL_00f2: ldarg.1 - IL_00f3: conv.r8 - IL_00f4: stfld float64 MCCTest.VType7::f31 - IL_00f9: ldarg.0 - IL_00fa: ldarg.1 - IL_00fb: conv.r8 - IL_00fc: stfld float64 MCCTest.VType7::f32 - IL_0101: ldarg.0 - IL_0102: ldarg.1 - IL_0103: conv.r8 - IL_0104: stfld float64 MCCTest.VType7::f33 - IL_0109: ldarg.0 - IL_010a: ldarg.1 - IL_010b: conv.r8 - IL_010c: stfld float64 MCCTest.VType7::f34 - IL_0111: ldarg.0 - IL_0112: ldarg.1 - IL_0113: conv.r8 - IL_0114: stfld float64 MCCTest.VType7::f35 - IL_0119: ldarg.0 - IL_011a: ldarg.1 - IL_011b: conv.r8 - IL_011c: stfld float64 MCCTest.VType7::f36 - IL_0121: ldarg.0 - IL_0122: ldarg.1 - IL_0123: conv.r8 - IL_0124: stfld float64 MCCTest.VType7::f37 - IL_0129: ldarg.0 - IL_012a: ldarg.1 - IL_012b: conv.r8 - IL_012c: stfld float64 MCCTest.VType7::f38 - IL_0131: ldarg.0 - IL_0132: ldarg.1 - IL_0133: conv.r8 - IL_0134: stfld float64 MCCTest.VType7::f39 - IL_0139: ldarg.0 - IL_013a: ldarg.1 - IL_013b: conv.r8 - IL_013c: stfld float64 MCCTest.VType7::f40 - IL_0141: ldarg.0 - IL_0142: ldarg.1 - IL_0143: conv.r8 - IL_0144: stfld float64 MCCTest.VType7::f41 - IL_0149: ldarg.0 - IL_014a: ldarg.1 - IL_014b: conv.r8 - IL_014c: stfld float64 MCCTest.VType7::f42 - IL_0151: ldarg.0 - IL_0152: ldarg.1 - IL_0153: conv.r8 - IL_0154: stfld float64 MCCTest.VType7::f43 - IL_0159: ldarg.0 - IL_015a: ldarg.1 - IL_015b: conv.r8 - IL_015c: stfld float64 MCCTest.VType7::f44 - IL_0161: ldarg.0 - IL_0162: ldarg.1 - IL_0163: conv.r8 - IL_0164: stfld float64 MCCTest.VType7::f45 - IL_0169: ldarg.0 - IL_016a: ldarg.1 - IL_016b: conv.r8 - IL_016c: stfld float64 MCCTest.VType7::f46 - IL_0171: ldarg.0 - IL_0172: ldarg.1 - IL_0173: conv.r8 - IL_0174: stfld float64 MCCTest.VType7::f47 - IL_0179: ldarg.0 - IL_017a: ldarg.1 - IL_017b: conv.r8 - IL_017c: stfld float64 MCCTest.VType7::f48 - IL_0181: ldarg.0 - IL_0182: ldarg.1 - IL_0183: conv.r8 - IL_0184: stfld float64 MCCTest.VType7::f49 - IL_0189: ldarg.0 - IL_018a: ldarg.1 - IL_018b: conv.r8 - IL_018c: stfld float64 MCCTest.VType7::f50 - IL_0191: ldarg.0 - IL_0192: ldarg.1 - IL_0193: conv.r8 - IL_0194: stfld float64 MCCTest.VType7::f51 - IL_0199: ldarg.0 - IL_019a: ldarg.1 - IL_019b: conv.r8 - IL_019c: stfld float64 MCCTest.VType7::f52 - IL_01a1: ldarg.0 - IL_01a2: ldarg.1 - IL_01a3: conv.r8 - IL_01a4: stfld float64 MCCTest.VType7::f53 - IL_01a9: ldarg.0 - IL_01aa: ldarg.1 - IL_01ab: conv.r8 - IL_01ac: stfld float64 MCCTest.VType7::f54 - IL_01b1: ldarg.0 - IL_01b2: ldarg.1 - IL_01b3: conv.r8 - IL_01b4: stfld float64 MCCTest.VType7::f55 - IL_01b9: ldarg.0 - IL_01ba: ldarg.1 - IL_01bb: conv.r8 - IL_01bc: stfld float64 MCCTest.VType7::f56 - IL_01c1: ldarg.0 - IL_01c2: ldarg.1 - IL_01c3: conv.r8 - IL_01c4: stfld float64 MCCTest.VType7::f57 - IL_01c9: ldarg.0 - IL_01ca: ldarg.1 - IL_01cb: conv.r8 - IL_01cc: stfld float64 MCCTest.VType7::f58 - IL_01d1: ldarg.0 - IL_01d2: ldarg.1 - IL_01d3: conv.r8 - IL_01d4: stfld float64 MCCTest.VType7::f59 - IL_01d9: ldarg.0 - IL_01da: ldarg.1 - IL_01db: conv.r8 - IL_01dc: stfld float64 MCCTest.VType7::f60 - IL_01e1: ldarg.0 - IL_01e2: ldarg.1 - IL_01e3: conv.r8 - IL_01e4: stfld float64 MCCTest.VType7::f61 - IL_01e9: ldarg.0 - IL_01ea: ldarg.1 - IL_01eb: conv.r8 - IL_01ec: stfld float64 MCCTest.VType7::f62 - IL_01f1: ldarg.0 - IL_01f2: ldarg.1 - IL_01f3: conv.r8 - IL_01f4: stfld float64 MCCTest.VType7::f63 - IL_01f9: ldarg.0 - IL_01fa: ldarg.1 - IL_01fb: conv.r8 - IL_01fc: stfld float64 MCCTest.VType7::f64 - IL_0201: ldarg.0 - IL_0202: ldarg.1 - IL_0203: conv.r8 - IL_0204: stfld float64 MCCTest.VType7::f65 - IL_0209: ldarg.0 - IL_020a: ldarg.1 - IL_020b: conv.r8 - IL_020c: stfld float64 MCCTest.VType7::f66 - IL_0211: ldarg.0 - IL_0212: ldarg.1 - IL_0213: conv.r8 - IL_0214: stfld float64 MCCTest.VType7::f67 - IL_0219: ldarg.0 - IL_021a: ldarg.1 - IL_021b: conv.r8 - IL_021c: stfld float64 MCCTest.VType7::f68 - IL_0221: ldarg.0 - IL_0222: ldarg.1 - IL_0223: conv.r8 - IL_0224: stfld float64 MCCTest.VType7::f69 - IL_0229: ldarg.0 - IL_022a: ldarg.1 - IL_022b: conv.r8 - IL_022c: stfld float64 MCCTest.VType7::f70 - IL_0231: ldarg.0 - IL_0232: ldarg.1 - IL_0233: conv.r8 - IL_0234: stfld float64 MCCTest.VType7::f71 - IL_0239: ldarg.0 - IL_023a: ldarg.1 - IL_023b: conv.r8 - IL_023c: stfld float64 MCCTest.VType7::f72 - IL_0241: ldarg.0 - IL_0242: ldarg.1 - IL_0243: conv.r8 - IL_0244: stfld float64 MCCTest.VType7::f73 - IL_0249: ldarg.0 - IL_024a: ldarg.1 - IL_024b: conv.r8 - IL_024c: stfld float64 MCCTest.VType7::f74 - IL_0251: ldarg.0 - IL_0252: ldarg.1 - IL_0253: conv.r8 - IL_0254: stfld float64 MCCTest.VType7::f75 - IL_0259: ldarg.0 - IL_025a: ldarg.1 - IL_025b: conv.r8 - IL_025c: stfld float64 MCCTest.VType7::f76 - IL_0261: ldarg.0 - IL_0262: ldarg.1 - IL_0263: conv.r8 - IL_0264: stfld float64 MCCTest.VType7::f77 - IL_0269: ldarg.0 - IL_026a: ldarg.1 - IL_026b: conv.r8 - IL_026c: stfld float64 MCCTest.VType7::f78 - IL_0271: ldarg.0 - IL_0272: ldarg.1 - IL_0273: conv.r8 - IL_0274: stfld float64 MCCTest.VType7::f79 - IL_0279: ldarg.0 - IL_027a: ldarg.1 - IL_027b: conv.r8 - IL_027c: stfld float64 MCCTest.VType7::f80 - IL_0281: ldarg.0 - IL_0282: ldarg.1 - IL_0283: conv.r8 - IL_0284: stfld float64 MCCTest.VType7::f81 - IL_0289: ldarg.0 - IL_028a: ldarg.1 - IL_028b: conv.r8 - IL_028c: stfld float64 MCCTest.VType7::f82 - IL_0291: ldarg.0 - IL_0292: ldarg.1 - IL_0293: conv.r8 - IL_0294: stfld float64 MCCTest.VType7::f83 - IL_0299: ldarg.0 - IL_029a: ldarg.1 - IL_029b: conv.r8 - IL_029c: stfld float64 MCCTest.VType7::f84 - IL_02a1: ldarg.0 - IL_02a2: ldarg.1 - IL_02a3: conv.r8 - IL_02a4: stfld float64 MCCTest.VType7::f85 - IL_02a9: ldarg.0 - IL_02aa: ldarg.1 - IL_02ab: conv.r8 - IL_02ac: stfld float64 MCCTest.VType7::f86 - IL_02b1: ldarg.0 - IL_02b2: ldarg.1 - IL_02b3: conv.r8 - IL_02b4: stfld float64 MCCTest.VType7::f87 - IL_02b9: ldarg.0 - IL_02ba: ldarg.1 - IL_02bb: conv.r8 - IL_02bc: stfld float64 MCCTest.VType7::f88 - IL_02c1: ldarg.0 - IL_02c2: ldarg.1 - IL_02c3: conv.r8 - IL_02c4: stfld float64 MCCTest.VType7::f89 - IL_02c9: ldarg.0 - IL_02ca: ldarg.1 - IL_02cb: conv.r8 - IL_02cc: stfld float64 MCCTest.VType7::f90 - IL_02d1: ldarg.0 - IL_02d2: ldarg.1 - IL_02d3: conv.r8 - IL_02d4: stfld float64 MCCTest.VType7::f91 - IL_02d9: ldarg.0 - IL_02da: ldarg.1 - IL_02db: conv.r8 - IL_02dc: stfld float64 MCCTest.VType7::f92 - IL_02e1: ldarg.0 - IL_02e2: ldarg.1 - IL_02e3: conv.r8 - IL_02e4: stfld float64 MCCTest.VType7::f93 - IL_02e9: ldarg.0 - IL_02ea: ldarg.1 - IL_02eb: conv.r8 - IL_02ec: stfld float64 MCCTest.VType7::f94 - IL_02f1: ldarg.0 - IL_02f2: ldarg.1 - IL_02f3: conv.r8 - IL_02f4: stfld float64 MCCTest.VType7::f95 - IL_02f9: ldarg.0 - IL_02fa: ldarg.1 - IL_02fb: conv.r8 - IL_02fc: stfld float64 MCCTest.VType7::f96 - IL_0301: ldarg.0 - IL_0302: ldarg.1 - IL_0303: conv.r8 - IL_0304: stfld float64 MCCTest.VType7::f97 - IL_0309: ldarg.0 - IL_030a: ldarg.1 - IL_030b: conv.r8 - IL_030c: stfld float64 MCCTest.VType7::f98 - IL_0311: ldarg.0 - IL_0312: ldarg.1 - IL_0313: conv.r8 - IL_0314: stfld float64 MCCTest.VType7::f99 - IL_0319: ldarg.0 - IL_031a: ldarg.1 - IL_031b: conv.r8 - IL_031c: stfld float64 MCCTest.VType7::f100 - IL_0321: ldarg.0 - IL_0322: ldarg.1 - IL_0323: conv.r8 - IL_0324: stfld float64 MCCTest.VType7::f101 - IL_0329: ldarg.0 - IL_032a: ldarg.1 - IL_032b: conv.r8 - IL_032c: stfld float64 MCCTest.VType7::f102 - IL_0331: ldarg.0 - IL_0332: ldarg.1 - IL_0333: conv.r8 - IL_0334: stfld float64 MCCTest.VType7::f103 - IL_0339: ldarg.0 - IL_033a: ldarg.1 - IL_033b: conv.r8 - IL_033c: stfld float64 MCCTest.VType7::f104 - IL_0341: ldarg.0 - IL_0342: ldarg.1 - IL_0343: conv.r8 - IL_0344: stfld float64 MCCTest.VType7::f105 - IL_0349: ldarg.0 - IL_034a: ldarg.1 - IL_034b: conv.r8 - IL_034c: stfld float64 MCCTest.VType7::f106 - IL_0351: ldarg.0 - IL_0352: ldarg.1 - IL_0353: conv.r8 - IL_0354: stfld float64 MCCTest.VType7::f107 - IL_0359: ldarg.0 - IL_035a: ldarg.1 - IL_035b: conv.r8 - IL_035c: stfld float64 MCCTest.VType7::f108 - IL_0361: ldarg.0 - IL_0362: ldarg.1 - IL_0363: conv.r8 - IL_0364: stfld float64 MCCTest.VType7::f109 - IL_0369: ldarg.0 - IL_036a: ldarg.1 - IL_036b: conv.r8 - IL_036c: stfld float64 MCCTest.VType7::f110 - IL_0371: ldarg.0 - IL_0372: ldarg.1 - IL_0373: conv.r8 - IL_0374: stfld float64 MCCTest.VType7::f111 - IL_0379: ldarg.0 - IL_037a: ldarg.1 - IL_037b: conv.r8 - IL_037c: stfld float64 MCCTest.VType7::f112 - IL_0381: ldarg.0 - IL_0382: ldarg.1 - IL_0383: conv.r8 - IL_0384: stfld float64 MCCTest.VType7::f113 - IL_0389: ldarg.0 - IL_038a: ldarg.1 - IL_038b: conv.r8 - IL_038c: stfld float64 MCCTest.VType7::f114 - IL_0391: ldarg.0 - IL_0392: ldarg.1 - IL_0393: conv.r8 - IL_0394: stfld float64 MCCTest.VType7::f115 - IL_0399: ldarg.0 - IL_039a: ldarg.1 - IL_039b: conv.r8 - IL_039c: stfld float64 MCCTest.VType7::f116 - IL_03a1: ldarg.0 - IL_03a2: ldarg.1 - IL_03a3: conv.r8 - IL_03a4: stfld float64 MCCTest.VType7::f117 - IL_03a9: ldarg.0 - IL_03aa: ldarg.1 - IL_03ab: conv.r8 - IL_03ac: stfld float64 MCCTest.VType7::f118 - IL_03b1: ldarg.0 - IL_03b2: ldarg.1 - IL_03b3: conv.r8 - IL_03b4: stfld float64 MCCTest.VType7::f119 - IL_03b9: ldarg.0 - IL_03ba: ldarg.1 - IL_03bb: conv.r8 - IL_03bc: stfld float64 MCCTest.VType7::f120 - IL_03c1: ldarg.0 - IL_03c2: ldarg.1 - IL_03c3: conv.r8 - IL_03c4: stfld float64 MCCTest.VType7::f121 - IL_03c9: ldarg.0 - IL_03ca: ldarg.1 - IL_03cb: conv.r8 - IL_03cc: stfld float64 MCCTest.VType7::f122 - IL_03d1: ldarg.0 - IL_03d2: ldarg.1 - IL_03d3: conv.r8 - IL_03d4: stfld float64 MCCTest.VType7::f123 - IL_03d9: ldarg.0 - IL_03da: ldarg.1 - IL_03db: conv.r8 - IL_03dc: stfld float64 MCCTest.VType7::f124 - IL_03e1: ldarg.0 - IL_03e2: ldarg.1 - IL_03e3: conv.r8 - IL_03e4: stfld float64 MCCTest.VType7::f125 - IL_03e9: ldarg.0 - IL_03ea: ldarg.1 - IL_03eb: conv.r8 - IL_03ec: stfld float64 MCCTest.VType7::f126 - IL_03f1: ldarg.0 - IL_03f2: ldarg.1 - IL_03f3: conv.r8 - IL_03f4: stfld float64 MCCTest.VType7::f127 - IL_03f9: ldarg.0 - IL_03fa: ldarg.1 - IL_03fb: conv.r8 - IL_03fc: stfld float64 MCCTest.VType7::f128 - IL_0401: ldarg.0 - IL_0402: ldarg.1 - IL_0403: conv.r8 - IL_0404: stfld float64 MCCTest.VType7::f129 - IL_0409: ldarg.0 - IL_040a: ldarg.1 - IL_040b: conv.r8 - IL_040c: stfld float64 MCCTest.VType7::f130 - IL_0411: ldarg.0 - IL_0412: ldarg.1 - IL_0413: conv.r8 - IL_0414: stfld float64 MCCTest.VType7::f131 - IL_0419: ldarg.0 - IL_041a: ldarg.1 - IL_041b: conv.r8 - IL_041c: stfld float64 MCCTest.VType7::f132 - IL_0421: ldarg.0 - IL_0422: ldarg.1 - IL_0423: conv.r8 - IL_0424: stfld float64 MCCTest.VType7::f133 - IL_0429: ldarg.0 - IL_042a: ldarg.1 - IL_042b: conv.r8 - IL_042c: stfld float64 MCCTest.VType7::f134 - IL_0431: ldarg.0 - IL_0432: ldarg.1 - IL_0433: conv.r8 - IL_0434: stfld float64 MCCTest.VType7::f135 - IL_0439: ldarg.0 - IL_043a: ldarg.1 - IL_043b: conv.r8 - IL_043c: stfld float64 MCCTest.VType7::f136 - IL_0441: ldarg.0 - IL_0442: ldarg.1 - IL_0443: conv.r8 - IL_0444: stfld float64 MCCTest.VType7::f137 - IL_0449: ldarg.0 - IL_044a: ldarg.1 - IL_044b: conv.r8 - IL_044c: stfld float64 MCCTest.VType7::f138 - IL_0451: ldarg.0 - IL_0452: ldarg.1 - IL_0453: conv.r8 - IL_0454: stfld float64 MCCTest.VType7::f139 - IL_0459: ldarg.0 - IL_045a: ldarg.1 - IL_045b: conv.r8 - IL_045c: stfld float64 MCCTest.VType7::f140 - IL_0461: ldarg.0 - IL_0462: ldarg.1 - IL_0463: conv.r8 - IL_0464: stfld float64 MCCTest.VType7::f141 - IL_0469: ldarg.0 - IL_046a: ldarg.1 - IL_046b: conv.r8 - IL_046c: stfld float64 MCCTest.VType7::f142 - IL_0471: ldarg.0 - IL_0472: ldarg.1 - IL_0473: conv.r8 - IL_0474: stfld float64 MCCTest.VType7::f143 - IL_0479: ldarg.0 - IL_047a: ldarg.1 - IL_047b: conv.r8 - IL_047c: stfld float64 MCCTest.VType7::f144 - IL_0481: ldarg.0 - IL_0482: ldarg.1 - IL_0483: conv.r8 - IL_0484: stfld float64 MCCTest.VType7::f145 - IL_0489: ldarg.0 - IL_048a: ldarg.1 - IL_048b: conv.r8 - IL_048c: stfld float64 MCCTest.VType7::f146 - IL_0491: ldarg.0 - IL_0492: ldarg.1 - IL_0493: conv.r8 - IL_0494: stfld float64 MCCTest.VType7::f147 - IL_0499: ldarg.0 - IL_049a: ldarg.1 - IL_049b: conv.r8 - IL_049c: stfld float64 MCCTest.VType7::f148 - IL_04a1: ldarg.0 - IL_04a2: ldarg.1 - IL_04a3: conv.r8 - IL_04a4: stfld float64 MCCTest.VType7::f149 - IL_04a9: ldarg.0 - IL_04aa: ldarg.1 - IL_04ab: conv.r8 - IL_04ac: stfld float64 MCCTest.VType7::f150 - IL_04b1: ldarg.0 - IL_04b2: ldarg.1 - IL_04b3: conv.r8 - IL_04b4: stfld float64 MCCTest.VType7::f151 - IL_04b9: ldarg.0 - IL_04ba: ldarg.1 - IL_04bb: conv.r8 - IL_04bc: stfld float64 MCCTest.VType7::f152 - IL_04c1: ldarg.0 - IL_04c2: ldarg.1 - IL_04c3: conv.r8 - IL_04c4: stfld float64 MCCTest.VType7::f153 - IL_04c9: ldarg.0 - IL_04ca: ldarg.1 - IL_04cb: conv.r8 - IL_04cc: stfld float64 MCCTest.VType7::f154 - IL_04d1: ldarg.0 - IL_04d2: ldarg.1 - IL_04d3: conv.r8 - IL_04d4: stfld float64 MCCTest.VType7::f155 - IL_04d9: ldarg.0 - IL_04da: ldarg.1 - IL_04db: conv.r8 - IL_04dc: stfld float64 MCCTest.VType7::f156 - IL_04e1: ldarg.0 - IL_04e2: ldarg.1 - IL_04e3: conv.r8 - IL_04e4: stfld float64 MCCTest.VType7::f157 - IL_04e9: ldarg.0 - IL_04ea: ldarg.1 - IL_04eb: conv.r8 - IL_04ec: stfld float64 MCCTest.VType7::f158 - IL_04f1: ldarg.0 - IL_04f2: ldarg.1 - IL_04f3: conv.r8 - IL_04f4: stfld float64 MCCTest.VType7::f159 - IL_04f9: ldarg.0 - IL_04fa: ldarg.1 - IL_04fb: conv.r8 - IL_04fc: stfld float64 MCCTest.VType7::f160 - IL_0501: ldarg.0 - IL_0502: ldarg.1 - IL_0503: conv.r8 - IL_0504: stfld float64 MCCTest.VType7::f161 - IL_0509: ldarg.0 - IL_050a: ldarg.1 - IL_050b: conv.r8 - IL_050c: stfld float64 MCCTest.VType7::f162 - IL_0511: ldarg.0 - IL_0512: ldarg.1 - IL_0513: conv.r8 - IL_0514: stfld float64 MCCTest.VType7::f163 - IL_0519: ldarg.0 - IL_051a: ldarg.1 - IL_051b: conv.r8 - IL_051c: stfld float64 MCCTest.VType7::f164 - IL_0521: ldarg.0 - IL_0522: ldarg.1 - IL_0523: conv.r8 - IL_0524: stfld float64 MCCTest.VType7::f165 - IL_0529: ldarg.0 - IL_052a: ldarg.1 - IL_052b: conv.r8 - IL_052c: stfld float64 MCCTest.VType7::f166 - IL_0531: ldarg.0 - IL_0532: ldarg.1 - IL_0533: conv.r8 - IL_0534: stfld float64 MCCTest.VType7::f167 - IL_0539: ldarg.0 - IL_053a: ldarg.1 - IL_053b: conv.r8 - IL_053c: stfld float64 MCCTest.VType7::f168 - IL_0541: ldarg.0 - IL_0542: ldarg.1 - IL_0543: conv.r8 - IL_0544: stfld float64 MCCTest.VType7::f169 - IL_0549: ldarg.0 - IL_054a: ldarg.1 - IL_054b: conv.r8 - IL_054c: stfld float64 MCCTest.VType7::f170 - IL_0551: ldarg.0 - IL_0552: ldarg.1 - IL_0553: conv.r8 - IL_0554: stfld float64 MCCTest.VType7::f171 - IL_0559: ldarg.0 - IL_055a: ldarg.1 - IL_055b: conv.r8 - IL_055c: stfld float64 MCCTest.VType7::f172 - IL_0561: ldarg.0 - IL_0562: ldarg.1 - IL_0563: conv.r8 - IL_0564: stfld float64 MCCTest.VType7::f173 - IL_0569: ldarg.0 - IL_056a: ldarg.1 - IL_056b: conv.r8 - IL_056c: stfld float64 MCCTest.VType7::f174 - IL_0571: ldarg.0 - IL_0572: ldarg.1 - IL_0573: conv.r8 - IL_0574: stfld float64 MCCTest.VType7::f175 - IL_0579: ldarg.0 - IL_057a: ldarg.1 - IL_057b: conv.r8 - IL_057c: stfld float64 MCCTest.VType7::f176 - IL_0581: ldarg.0 - IL_0582: ldarg.1 - IL_0583: conv.r8 - IL_0584: stfld float64 MCCTest.VType7::f177 - IL_0589: ldarg.0 - IL_058a: ldarg.1 - IL_058b: conv.r8 - IL_058c: stfld float64 MCCTest.VType7::f178 - IL_0591: ldarg.0 - IL_0592: ldarg.1 - IL_0593: conv.r8 - IL_0594: stfld float64 MCCTest.VType7::f179 - IL_0599: ldarg.0 - IL_059a: ldarg.1 - IL_059b: conv.r8 - IL_059c: stfld float64 MCCTest.VType7::f180 - IL_05a1: ldarg.0 - IL_05a2: ldarg.1 - IL_05a3: conv.r8 - IL_05a4: stfld float64 MCCTest.VType7::f181 - IL_05a9: ldarg.0 - IL_05aa: ldarg.1 - IL_05ab: conv.r8 - IL_05ac: stfld float64 MCCTest.VType7::f182 - IL_05b1: ldarg.0 - IL_05b2: ldarg.1 - IL_05b3: conv.r8 - IL_05b4: stfld float64 MCCTest.VType7::f183 - IL_05b9: ldarg.0 - IL_05ba: ldarg.1 - IL_05bb: conv.r8 - IL_05bc: stfld float64 MCCTest.VType7::f184 - IL_05c1: ldarg.0 - IL_05c2: ldarg.1 - IL_05c3: conv.r8 - IL_05c4: stfld float64 MCCTest.VType7::f185 - IL_05c9: ldarg.0 - IL_05ca: ldarg.1 - IL_05cb: conv.r8 - IL_05cc: stfld float64 MCCTest.VType7::f186 - IL_05d1: ldarg.0 - IL_05d2: ldarg.1 - IL_05d3: conv.r8 - IL_05d4: stfld float64 MCCTest.VType7::f187 - IL_05d9: ldarg.0 - IL_05da: ldarg.1 - IL_05db: conv.r8 - IL_05dc: stfld float64 MCCTest.VType7::f188 - IL_05e1: ldarg.0 - IL_05e2: ldarg.1 - IL_05e3: conv.r8 - IL_05e4: stfld float64 MCCTest.VType7::f189 - IL_05e9: ldarg.0 - IL_05ea: ldarg.1 - IL_05eb: conv.r8 - IL_05ec: stfld float64 MCCTest.VType7::f190 - IL_05f1: ldarg.0 - IL_05f2: ldarg.1 - IL_05f3: conv.r8 - IL_05f4: stfld float64 MCCTest.VType7::f191 - IL_05f9: ldarg.0 - IL_05fa: ldarg.1 - IL_05fb: conv.r8 - IL_05fc: stfld float64 MCCTest.VType7::f192 - IL_0601: ldarg.0 - IL_0602: ldarg.1 - IL_0603: conv.r8 - IL_0604: stfld float64 MCCTest.VType7::f193 - IL_0609: ldarg.0 - IL_060a: ldarg.1 - IL_060b: conv.r8 - IL_060c: stfld float64 MCCTest.VType7::f194 - IL_0611: ldarg.0 - IL_0612: ldarg.1 - IL_0613: conv.r8 - IL_0614: stfld float64 MCCTest.VType7::f195 - IL_0619: ldarg.0 - IL_061a: ldarg.1 - IL_061b: conv.r8 - IL_061c: stfld float64 MCCTest.VType7::f196 - IL_0621: ldarg.0 - IL_0622: ldarg.1 - IL_0623: conv.r8 - IL_0624: stfld float64 MCCTest.VType7::f197 - IL_0629: ldarg.0 - IL_062a: ldarg.1 - IL_062b: conv.r8 - IL_062c: stfld float64 MCCTest.VType7::f198 - IL_0631: ldarg.0 - IL_0632: ldarg.1 - IL_0633: conv.r8 - IL_0634: stfld float64 MCCTest.VType7::f199 - IL_0639: ldarg.0 - IL_063a: ldarg.1 - IL_063b: conv.r8 - IL_063c: stfld float64 MCCTest.VType7::f200 - IL_0641: ldarg.0 - IL_0642: ldarg.1 - IL_0643: conv.r8 - IL_0644: stfld float64 MCCTest.VType7::f201 - IL_0649: ldarg.0 - IL_064a: ldarg.1 - IL_064b: conv.r8 - IL_064c: stfld float64 MCCTest.VType7::f202 - IL_0651: ldarg.0 - IL_0652: ldarg.1 - IL_0653: conv.r8 - IL_0654: stfld float64 MCCTest.VType7::f203 - IL_0659: ldarg.0 - IL_065a: ldarg.1 - IL_065b: conv.r8 - IL_065c: stfld float64 MCCTest.VType7::f204 - IL_0661: ldarg.0 - IL_0662: ldarg.1 - IL_0663: conv.r8 - IL_0664: stfld float64 MCCTest.VType7::f205 - IL_0669: ldarg.0 - IL_066a: ldarg.1 - IL_066b: conv.r8 - IL_066c: stfld float64 MCCTest.VType7::f206 - IL_0671: ldarg.0 - IL_0672: ldarg.1 - IL_0673: conv.r8 - IL_0674: stfld float64 MCCTest.VType7::f207 - IL_0679: ldarg.0 - IL_067a: ldarg.1 - IL_067b: conv.r8 - IL_067c: stfld float64 MCCTest.VType7::f208 - IL_0681: ldarg.0 - IL_0682: ldarg.1 - IL_0683: conv.r8 - IL_0684: stfld float64 MCCTest.VType7::f209 - IL_0689: ldarg.0 - IL_068a: ldarg.1 - IL_068b: conv.r8 - IL_068c: stfld float64 MCCTest.VType7::f210 - IL_0691: ldarg.0 - IL_0692: ldarg.1 - IL_0693: conv.r8 - IL_0694: stfld float64 MCCTest.VType7::f211 - IL_0699: ldarg.0 - IL_069a: ldarg.1 - IL_069b: conv.r8 - IL_069c: stfld float64 MCCTest.VType7::f212 - IL_06a1: ldarg.0 - IL_06a2: ldarg.1 - IL_06a3: conv.r8 - IL_06a4: stfld float64 MCCTest.VType7::f213 - IL_06a9: ldarg.0 - IL_06aa: ldarg.1 - IL_06ab: conv.r8 - IL_06ac: stfld float64 MCCTest.VType7::f214 - IL_06b1: ldarg.0 - IL_06b2: ldarg.1 - IL_06b3: conv.r8 - IL_06b4: stfld float64 MCCTest.VType7::f215 - IL_06b9: ldarg.0 - IL_06ba: ldarg.1 - IL_06bb: conv.r8 - IL_06bc: stfld float64 MCCTest.VType7::f216 - IL_06c1: ldarg.0 - IL_06c2: ldarg.1 - IL_06c3: conv.r8 - IL_06c4: stfld float64 MCCTest.VType7::f217 - IL_06c9: ldarg.0 - IL_06ca: ldarg.1 - IL_06cb: conv.r8 - IL_06cc: stfld float64 MCCTest.VType7::f218 - IL_06d1: ldarg.0 - IL_06d2: ldarg.1 - IL_06d3: conv.r8 - IL_06d4: stfld float64 MCCTest.VType7::f219 - IL_06d9: ldarg.0 - IL_06da: ldarg.1 - IL_06db: conv.r8 - IL_06dc: stfld float64 MCCTest.VType7::f220 - IL_06e1: ldarg.0 - IL_06e2: ldarg.1 - IL_06e3: conv.r8 - IL_06e4: stfld float64 MCCTest.VType7::f221 - IL_06e9: ldarg.0 - IL_06ea: ldarg.1 - IL_06eb: conv.r8 - IL_06ec: stfld float64 MCCTest.VType7::f222 - IL_06f1: ldarg.0 - IL_06f2: ldarg.1 - IL_06f3: conv.r8 - IL_06f4: stfld float64 MCCTest.VType7::f223 - IL_06f9: ldarg.0 - IL_06fa: ldarg.1 - IL_06fb: conv.r8 - IL_06fc: stfld float64 MCCTest.VType7::f224 - IL_0701: ldarg.0 - IL_0702: ldarg.1 - IL_0703: conv.r8 - IL_0704: stfld float64 MCCTest.VType7::f225 - IL_0709: ldarg.0 - IL_070a: ldarg.1 - IL_070b: conv.r8 - IL_070c: stfld float64 MCCTest.VType7::f226 - IL_0711: ldarg.0 - IL_0712: ldarg.1 - IL_0713: conv.r8 - IL_0714: stfld float64 MCCTest.VType7::f227 - IL_0719: ldarg.0 - IL_071a: ldarg.1 - IL_071b: conv.r8 - IL_071c: stfld float64 MCCTest.VType7::f228 - IL_0721: ldarg.0 - IL_0722: ldarg.1 - IL_0723: conv.r8 - IL_0724: stfld float64 MCCTest.VType7::f229 - IL_0729: ldarg.0 - IL_072a: ldarg.1 - IL_072b: conv.r8 - IL_072c: stfld float64 MCCTest.VType7::f230 - IL_0731: ldarg.0 - IL_0732: ldarg.1 - IL_0733: conv.r8 - IL_0734: stfld float64 MCCTest.VType7::f231 - IL_0739: ldarg.0 - IL_073a: ldarg.1 - IL_073b: conv.r8 - IL_073c: stfld float64 MCCTest.VType7::f232 - IL_0741: ldarg.0 - IL_0742: ldarg.1 - IL_0743: conv.r8 - IL_0744: stfld float64 MCCTest.VType7::f233 - IL_0749: ldarg.0 - IL_074a: ldarg.1 - IL_074b: conv.r8 - IL_074c: stfld float64 MCCTest.VType7::f234 - IL_0751: ldarg.0 - IL_0752: ldarg.1 - IL_0753: conv.r8 - IL_0754: stfld float64 MCCTest.VType7::f235 - IL_0759: ldarg.0 - IL_075a: ldarg.1 - IL_075b: conv.r8 - IL_075c: stfld float64 MCCTest.VType7::f236 - IL_0761: ldarg.0 - IL_0762: ldarg.1 - IL_0763: conv.r8 - IL_0764: stfld float64 MCCTest.VType7::f237 - IL_0769: ldarg.0 - IL_076a: ldarg.1 - IL_076b: conv.r8 - IL_076c: stfld float64 MCCTest.VType7::f238 - IL_0771: ldarg.0 - IL_0772: ldarg.1 - IL_0773: conv.r8 - IL_0774: stfld float64 MCCTest.VType7::f239 - IL_0779: ldarg.0 - IL_077a: ldarg.1 - IL_077b: conv.r8 - IL_077c: stfld float64 MCCTest.VType7::f240 - IL_0781: ldarg.0 - IL_0782: ldarg.1 - IL_0783: conv.r8 - IL_0784: stfld float64 MCCTest.VType7::f241 - IL_0789: ldarg.0 - IL_078a: ldarg.1 - IL_078b: conv.r8 - IL_078c: stfld float64 MCCTest.VType7::f242 - IL_0791: ldarg.0 - IL_0792: ldarg.1 - IL_0793: conv.r8 - IL_0794: stfld float64 MCCTest.VType7::f243 - IL_0799: ldarg.0 - IL_079a: ldarg.1 - IL_079b: conv.r8 - IL_079c: stfld float64 MCCTest.VType7::f244 - IL_07a1: ldarg.0 - IL_07a2: ldarg.1 - IL_07a3: conv.r8 - IL_07a4: stfld float64 MCCTest.VType7::f245 - IL_07a9: ldarg.0 - IL_07aa: ldarg.1 - IL_07ab: conv.r8 - IL_07ac: stfld float64 MCCTest.VType7::f246 - IL_07b1: ldarg.0 - IL_07b2: ldarg.1 - IL_07b3: conv.r8 - IL_07b4: stfld float64 MCCTest.VType7::f247 - IL_07b9: ldarg.0 - IL_07ba: ldarg.1 - IL_07bb: conv.r8 - IL_07bc: stfld float64 MCCTest.VType7::f248 - IL_07c1: ldarg.0 - IL_07c2: ldarg.1 - IL_07c3: conv.r8 - IL_07c4: stfld float64 MCCTest.VType7::f249 - IL_07c9: ldarg.0 - IL_07ca: ldarg.1 - IL_07cb: conv.r8 - IL_07cc: stfld float64 MCCTest.VType7::f250 - IL_07d1: ldarg.0 - IL_07d2: ldarg.1 - IL_07d3: conv.r8 - IL_07d4: stfld float64 MCCTest.VType7::f251 - IL_07d9: ldarg.0 - IL_07da: ldarg.1 - IL_07db: conv.r8 - IL_07dc: stfld float64 MCCTest.VType7::f252 - IL_07e1: ldarg.0 - IL_07e2: ldarg.1 - IL_07e3: conv.r8 - IL_07e4: stfld float64 MCCTest.VType7::f253 - IL_07e9: ldarg.0 - IL_07ea: ldarg.1 - IL_07eb: conv.r8 - IL_07ec: stfld float64 MCCTest.VType7::f254 - IL_07f1: ldarg.0 - IL_07f2: ldarg.1 - IL_07f3: conv.r8 - IL_07f4: stfld float64 MCCTest.VType7::f255 - IL_07f9: ldarg.0 - IL_07fa: ldarg.1 - IL_07fb: conv.r8 - IL_07fc: stfld float64 MCCTest.VType7::f256 - IL_0801: ldarg.0 - IL_0802: ldarg.1 - IL_0803: conv.r8 - IL_0804: stfld float64 MCCTest.VType7::f257 - IL_0809: ret - } // end of method VType7::Init - - .method public hidebysig newslot virtual final - instance void Init() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.1 - IL_0003: call instance void MCCTest.VType7::Init(int32) - IL_0008: nop - IL_0009: ret - } // end of method VType7::Init - - .method public hidebysig newslot virtual final - instance void Zero() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.0 - IL_0003: call instance void MCCTest.VType7::Init(int32) - IL_0008: nop - IL_0009: ret - } // end of method VType7::Zero - - .method public hidebysig instance void - Add(valuetype MCCTest.VType7 val) cil managed - { - // Code size 5142 (0x1416) - .maxstack 3 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: dup - IL_0003: ldfld float64 MCCTest.VType7::f1 - IL_0008: ldarga.s val - IL_000a: ldfld float64 MCCTest.VType7::f1 - IL_000f: add - IL_0010: stfld float64 MCCTest.VType7::f1 - IL_0015: ldarg.0 - IL_0016: dup - IL_0017: ldfld float64 MCCTest.VType7::f2 - IL_001c: ldarga.s val - IL_001e: ldfld float64 MCCTest.VType7::f2 - IL_0023: add - IL_0024: stfld float64 MCCTest.VType7::f2 - IL_0029: ldarg.0 - IL_002a: dup - IL_002b: ldfld float64 MCCTest.VType7::f3 - IL_0030: ldarga.s val - IL_0032: ldfld float64 MCCTest.VType7::f3 - IL_0037: add - IL_0038: stfld float64 MCCTest.VType7::f3 - IL_003d: ldarg.0 - IL_003e: dup - IL_003f: ldfld float64 MCCTest.VType7::f4 - IL_0044: ldarga.s val - IL_0046: ldfld float64 MCCTest.VType7::f4 - IL_004b: add - IL_004c: stfld float64 MCCTest.VType7::f4 - IL_0051: ldarg.0 - IL_0052: dup - IL_0053: ldfld float64 MCCTest.VType7::f5 - IL_0058: ldarga.s val - IL_005a: ldfld float64 MCCTest.VType7::f5 - IL_005f: add - IL_0060: stfld float64 MCCTest.VType7::f5 - IL_0065: ldarg.0 - IL_0066: dup - IL_0067: ldfld float64 MCCTest.VType7::f6 - IL_006c: ldarga.s val - IL_006e: ldfld float64 MCCTest.VType7::f6 - IL_0073: add - IL_0074: stfld float64 MCCTest.VType7::f6 - IL_0079: ldarg.0 - IL_007a: dup - IL_007b: ldfld float64 MCCTest.VType7::f7 - IL_0080: ldarga.s val - IL_0082: ldfld float64 MCCTest.VType7::f7 - IL_0087: add - IL_0088: stfld float64 MCCTest.VType7::f7 - IL_008d: ldarg.0 - IL_008e: dup - IL_008f: ldfld float64 MCCTest.VType7::f8 - IL_0094: ldarga.s val - IL_0096: ldfld float64 MCCTest.VType7::f8 - IL_009b: add - IL_009c: stfld float64 MCCTest.VType7::f8 - IL_00a1: ldarg.0 - IL_00a2: dup - IL_00a3: ldfld float64 MCCTest.VType7::f9 - IL_00a8: ldarga.s val - IL_00aa: ldfld float64 MCCTest.VType7::f9 - IL_00af: add - IL_00b0: stfld float64 MCCTest.VType7::f9 - IL_00b5: ldarg.0 - IL_00b6: dup - IL_00b7: ldfld float64 MCCTest.VType7::f10 - IL_00bc: ldarga.s val - IL_00be: ldfld float64 MCCTest.VType7::f10 - IL_00c3: add - IL_00c4: stfld float64 MCCTest.VType7::f10 - IL_00c9: ldarg.0 - IL_00ca: dup - IL_00cb: ldfld float64 MCCTest.VType7::f11 - IL_00d0: ldarga.s val - IL_00d2: ldfld float64 MCCTest.VType7::f11 - IL_00d7: add - IL_00d8: stfld float64 MCCTest.VType7::f11 - IL_00dd: ldarg.0 - IL_00de: dup - IL_00df: ldfld float64 MCCTest.VType7::f12 - IL_00e4: ldarga.s val - IL_00e6: ldfld float64 MCCTest.VType7::f12 - IL_00eb: add - IL_00ec: stfld float64 MCCTest.VType7::f12 - IL_00f1: ldarg.0 - IL_00f2: dup - IL_00f3: ldfld float64 MCCTest.VType7::f13 - IL_00f8: ldarga.s val - IL_00fa: ldfld float64 MCCTest.VType7::f13 - IL_00ff: add - IL_0100: stfld float64 MCCTest.VType7::f13 - IL_0105: ldarg.0 - IL_0106: dup - IL_0107: ldfld float64 MCCTest.VType7::f14 - IL_010c: ldarga.s val - IL_010e: ldfld float64 MCCTest.VType7::f14 - IL_0113: add - IL_0114: stfld float64 MCCTest.VType7::f14 - IL_0119: ldarg.0 - IL_011a: dup - IL_011b: ldfld float64 MCCTest.VType7::f15 - IL_0120: ldarga.s val - IL_0122: ldfld float64 MCCTest.VType7::f15 - IL_0127: add - IL_0128: stfld float64 MCCTest.VType7::f15 - IL_012d: ldarg.0 - IL_012e: dup - IL_012f: ldfld float64 MCCTest.VType7::f16 - IL_0134: ldarga.s val - IL_0136: ldfld float64 MCCTest.VType7::f16 - IL_013b: add - IL_013c: stfld float64 MCCTest.VType7::f16 - IL_0141: ldarg.0 - IL_0142: dup - IL_0143: ldfld float64 MCCTest.VType7::f17 - IL_0148: ldarga.s val - IL_014a: ldfld float64 MCCTest.VType7::f17 - IL_014f: add - IL_0150: stfld float64 MCCTest.VType7::f17 - IL_0155: ldarg.0 - IL_0156: dup - IL_0157: ldfld float64 MCCTest.VType7::f18 - IL_015c: ldarga.s val - IL_015e: ldfld float64 MCCTest.VType7::f18 - IL_0163: add - IL_0164: stfld float64 MCCTest.VType7::f18 - IL_0169: ldarg.0 - IL_016a: dup - IL_016b: ldfld float64 MCCTest.VType7::f19 - IL_0170: ldarga.s val - IL_0172: ldfld float64 MCCTest.VType7::f19 - IL_0177: add - IL_0178: stfld float64 MCCTest.VType7::f19 - IL_017d: ldarg.0 - IL_017e: dup - IL_017f: ldfld float64 MCCTest.VType7::f20 - IL_0184: ldarga.s val - IL_0186: ldfld float64 MCCTest.VType7::f20 - IL_018b: add - IL_018c: stfld float64 MCCTest.VType7::f20 - IL_0191: ldarg.0 - IL_0192: dup - IL_0193: ldfld float64 MCCTest.VType7::f21 - IL_0198: ldarga.s val - IL_019a: ldfld float64 MCCTest.VType7::f21 - IL_019f: add - IL_01a0: stfld float64 MCCTest.VType7::f21 - IL_01a5: ldarg.0 - IL_01a6: dup - IL_01a7: ldfld float64 MCCTest.VType7::f22 - IL_01ac: ldarga.s val - IL_01ae: ldfld float64 MCCTest.VType7::f22 - IL_01b3: add - IL_01b4: stfld float64 MCCTest.VType7::f22 - IL_01b9: ldarg.0 - IL_01ba: dup - IL_01bb: ldfld float64 MCCTest.VType7::f23 - IL_01c0: ldarga.s val - IL_01c2: ldfld float64 MCCTest.VType7::f23 - IL_01c7: add - IL_01c8: stfld float64 MCCTest.VType7::f23 - IL_01cd: ldarg.0 - IL_01ce: dup - IL_01cf: ldfld float64 MCCTest.VType7::f24 - IL_01d4: ldarga.s val - IL_01d6: ldfld float64 MCCTest.VType7::f24 - IL_01db: add - IL_01dc: stfld float64 MCCTest.VType7::f24 - IL_01e1: ldarg.0 - IL_01e2: dup - IL_01e3: ldfld float64 MCCTest.VType7::f25 - IL_01e8: ldarga.s val - IL_01ea: ldfld float64 MCCTest.VType7::f25 - IL_01ef: add - IL_01f0: stfld float64 MCCTest.VType7::f25 - IL_01f5: ldarg.0 - IL_01f6: dup - IL_01f7: ldfld float64 MCCTest.VType7::f26 - IL_01fc: ldarga.s val - IL_01fe: ldfld float64 MCCTest.VType7::f26 - IL_0203: add - IL_0204: stfld float64 MCCTest.VType7::f26 - IL_0209: ldarg.0 - IL_020a: dup - IL_020b: ldfld float64 MCCTest.VType7::f27 - IL_0210: ldarga.s val - IL_0212: ldfld float64 MCCTest.VType7::f27 - IL_0217: add - IL_0218: stfld float64 MCCTest.VType7::f27 - IL_021d: ldarg.0 - IL_021e: dup - IL_021f: ldfld float64 MCCTest.VType7::f28 - IL_0224: ldarga.s val - IL_0226: ldfld float64 MCCTest.VType7::f28 - IL_022b: add - IL_022c: stfld float64 MCCTest.VType7::f28 - IL_0231: ldarg.0 - IL_0232: dup - IL_0233: ldfld float64 MCCTest.VType7::f29 - IL_0238: ldarga.s val - IL_023a: ldfld float64 MCCTest.VType7::f29 - IL_023f: add - IL_0240: stfld float64 MCCTest.VType7::f29 - IL_0245: ldarg.0 - IL_0246: dup - IL_0247: ldfld float64 MCCTest.VType7::f30 - IL_024c: ldarga.s val - IL_024e: ldfld float64 MCCTest.VType7::f30 - IL_0253: add - IL_0254: stfld float64 MCCTest.VType7::f30 - IL_0259: ldarg.0 - IL_025a: dup - IL_025b: ldfld float64 MCCTest.VType7::f31 - IL_0260: ldarga.s val - IL_0262: ldfld float64 MCCTest.VType7::f31 - IL_0267: add - IL_0268: stfld float64 MCCTest.VType7::f31 - IL_026d: ldarg.0 - IL_026e: dup - IL_026f: ldfld float64 MCCTest.VType7::f32 - IL_0274: ldarga.s val - IL_0276: ldfld float64 MCCTest.VType7::f32 - IL_027b: add - IL_027c: stfld float64 MCCTest.VType7::f32 - IL_0281: ldarg.0 - IL_0282: dup - IL_0283: ldfld float64 MCCTest.VType7::f33 - IL_0288: ldarga.s val - IL_028a: ldfld float64 MCCTest.VType7::f33 - IL_028f: add - IL_0290: stfld float64 MCCTest.VType7::f33 - IL_0295: ldarg.0 - IL_0296: dup - IL_0297: ldfld float64 MCCTest.VType7::f34 - IL_029c: ldarga.s val - IL_029e: ldfld float64 MCCTest.VType7::f34 - IL_02a3: add - IL_02a4: stfld float64 MCCTest.VType7::f34 - IL_02a9: ldarg.0 - IL_02aa: dup - IL_02ab: ldfld float64 MCCTest.VType7::f35 - IL_02b0: ldarga.s val - IL_02b2: ldfld float64 MCCTest.VType7::f35 - IL_02b7: add - IL_02b8: stfld float64 MCCTest.VType7::f35 - IL_02bd: ldarg.0 - IL_02be: dup - IL_02bf: ldfld float64 MCCTest.VType7::f36 - IL_02c4: ldarga.s val - IL_02c6: ldfld float64 MCCTest.VType7::f36 - IL_02cb: add - IL_02cc: stfld float64 MCCTest.VType7::f36 - IL_02d1: ldarg.0 - IL_02d2: dup - IL_02d3: ldfld float64 MCCTest.VType7::f37 - IL_02d8: ldarga.s val - IL_02da: ldfld float64 MCCTest.VType7::f37 - IL_02df: add - IL_02e0: stfld float64 MCCTest.VType7::f37 - IL_02e5: ldarg.0 - IL_02e6: dup - IL_02e7: ldfld float64 MCCTest.VType7::f38 - IL_02ec: ldarga.s val - IL_02ee: ldfld float64 MCCTest.VType7::f38 - IL_02f3: add - IL_02f4: stfld float64 MCCTest.VType7::f38 - IL_02f9: ldarg.0 - IL_02fa: dup - IL_02fb: ldfld float64 MCCTest.VType7::f39 - IL_0300: ldarga.s val - IL_0302: ldfld float64 MCCTest.VType7::f39 - IL_0307: add - IL_0308: stfld float64 MCCTest.VType7::f39 - IL_030d: ldarg.0 - IL_030e: dup - IL_030f: ldfld float64 MCCTest.VType7::f40 - IL_0314: ldarga.s val - IL_0316: ldfld float64 MCCTest.VType7::f40 - IL_031b: add - IL_031c: stfld float64 MCCTest.VType7::f40 - IL_0321: ldarg.0 - IL_0322: dup - IL_0323: ldfld float64 MCCTest.VType7::f41 - IL_0328: ldarga.s val - IL_032a: ldfld float64 MCCTest.VType7::f41 - IL_032f: add - IL_0330: stfld float64 MCCTest.VType7::f41 - IL_0335: ldarg.0 - IL_0336: dup - IL_0337: ldfld float64 MCCTest.VType7::f42 - IL_033c: ldarga.s val - IL_033e: ldfld float64 MCCTest.VType7::f42 - IL_0343: add - IL_0344: stfld float64 MCCTest.VType7::f42 - IL_0349: ldarg.0 - IL_034a: dup - IL_034b: ldfld float64 MCCTest.VType7::f43 - IL_0350: ldarga.s val - IL_0352: ldfld float64 MCCTest.VType7::f43 - IL_0357: add - IL_0358: stfld float64 MCCTest.VType7::f43 - IL_035d: ldarg.0 - IL_035e: dup - IL_035f: ldfld float64 MCCTest.VType7::f44 - IL_0364: ldarga.s val - IL_0366: ldfld float64 MCCTest.VType7::f44 - IL_036b: add - IL_036c: stfld float64 MCCTest.VType7::f44 - IL_0371: ldarg.0 - IL_0372: dup - IL_0373: ldfld float64 MCCTest.VType7::f45 - IL_0378: ldarga.s val - IL_037a: ldfld float64 MCCTest.VType7::f45 - IL_037f: add - IL_0380: stfld float64 MCCTest.VType7::f45 - IL_0385: ldarg.0 - IL_0386: dup - IL_0387: ldfld float64 MCCTest.VType7::f46 - IL_038c: ldarga.s val - IL_038e: ldfld float64 MCCTest.VType7::f46 - IL_0393: add - IL_0394: stfld float64 MCCTest.VType7::f46 - IL_0399: ldarg.0 - IL_039a: dup - IL_039b: ldfld float64 MCCTest.VType7::f47 - IL_03a0: ldarga.s val - IL_03a2: ldfld float64 MCCTest.VType7::f47 - IL_03a7: add - IL_03a8: stfld float64 MCCTest.VType7::f47 - IL_03ad: ldarg.0 - IL_03ae: dup - IL_03af: ldfld float64 MCCTest.VType7::f48 - IL_03b4: ldarga.s val - IL_03b6: ldfld float64 MCCTest.VType7::f48 - IL_03bb: add - IL_03bc: stfld float64 MCCTest.VType7::f48 - IL_03c1: ldarg.0 - IL_03c2: dup - IL_03c3: ldfld float64 MCCTest.VType7::f49 - IL_03c8: ldarga.s val - IL_03ca: ldfld float64 MCCTest.VType7::f49 - IL_03cf: add - IL_03d0: stfld float64 MCCTest.VType7::f49 - IL_03d5: ldarg.0 - IL_03d6: dup - IL_03d7: ldfld float64 MCCTest.VType7::f50 - IL_03dc: ldarga.s val - IL_03de: ldfld float64 MCCTest.VType7::f50 - IL_03e3: add - IL_03e4: stfld float64 MCCTest.VType7::f50 - IL_03e9: ldarg.0 - IL_03ea: dup - IL_03eb: ldfld float64 MCCTest.VType7::f51 - IL_03f0: ldarga.s val - IL_03f2: ldfld float64 MCCTest.VType7::f51 - IL_03f7: add - IL_03f8: stfld float64 MCCTest.VType7::f51 - IL_03fd: ldarg.0 - IL_03fe: dup - IL_03ff: ldfld float64 MCCTest.VType7::f52 - IL_0404: ldarga.s val - IL_0406: ldfld float64 MCCTest.VType7::f52 - IL_040b: add - IL_040c: stfld float64 MCCTest.VType7::f52 - IL_0411: ldarg.0 - IL_0412: dup - IL_0413: ldfld float64 MCCTest.VType7::f53 - IL_0418: ldarga.s val - IL_041a: ldfld float64 MCCTest.VType7::f53 - IL_041f: add - IL_0420: stfld float64 MCCTest.VType7::f53 - IL_0425: ldarg.0 - IL_0426: dup - IL_0427: ldfld float64 MCCTest.VType7::f54 - IL_042c: ldarga.s val - IL_042e: ldfld float64 MCCTest.VType7::f54 - IL_0433: add - IL_0434: stfld float64 MCCTest.VType7::f54 - IL_0439: ldarg.0 - IL_043a: dup - IL_043b: ldfld float64 MCCTest.VType7::f55 - IL_0440: ldarga.s val - IL_0442: ldfld float64 MCCTest.VType7::f55 - IL_0447: add - IL_0448: stfld float64 MCCTest.VType7::f55 - IL_044d: ldarg.0 - IL_044e: dup - IL_044f: ldfld float64 MCCTest.VType7::f56 - IL_0454: ldarga.s val - IL_0456: ldfld float64 MCCTest.VType7::f56 - IL_045b: add - IL_045c: stfld float64 MCCTest.VType7::f56 - IL_0461: ldarg.0 - IL_0462: dup - IL_0463: ldfld float64 MCCTest.VType7::f57 - IL_0468: ldarga.s val - IL_046a: ldfld float64 MCCTest.VType7::f57 - IL_046f: add - IL_0470: stfld float64 MCCTest.VType7::f57 - IL_0475: ldarg.0 - IL_0476: dup - IL_0477: ldfld float64 MCCTest.VType7::f58 - IL_047c: ldarga.s val - IL_047e: ldfld float64 MCCTest.VType7::f58 - IL_0483: add - IL_0484: stfld float64 MCCTest.VType7::f58 - IL_0489: ldarg.0 - IL_048a: dup - IL_048b: ldfld float64 MCCTest.VType7::f59 - IL_0490: ldarga.s val - IL_0492: ldfld float64 MCCTest.VType7::f59 - IL_0497: add - IL_0498: stfld float64 MCCTest.VType7::f59 - IL_049d: ldarg.0 - IL_049e: dup - IL_049f: ldfld float64 MCCTest.VType7::f60 - IL_04a4: ldarga.s val - IL_04a6: ldfld float64 MCCTest.VType7::f60 - IL_04ab: add - IL_04ac: stfld float64 MCCTest.VType7::f60 - IL_04b1: ldarg.0 - IL_04b2: dup - IL_04b3: ldfld float64 MCCTest.VType7::f61 - IL_04b8: ldarga.s val - IL_04ba: ldfld float64 MCCTest.VType7::f61 - IL_04bf: add - IL_04c0: stfld float64 MCCTest.VType7::f61 - IL_04c5: ldarg.0 - IL_04c6: dup - IL_04c7: ldfld float64 MCCTest.VType7::f62 - IL_04cc: ldarga.s val - IL_04ce: ldfld float64 MCCTest.VType7::f62 - IL_04d3: add - IL_04d4: stfld float64 MCCTest.VType7::f62 - IL_04d9: ldarg.0 - IL_04da: dup - IL_04db: ldfld float64 MCCTest.VType7::f63 - IL_04e0: ldarga.s val - IL_04e2: ldfld float64 MCCTest.VType7::f63 - IL_04e7: add - IL_04e8: stfld float64 MCCTest.VType7::f63 - IL_04ed: ldarg.0 - IL_04ee: dup - IL_04ef: ldfld float64 MCCTest.VType7::f64 - IL_04f4: ldarga.s val - IL_04f6: ldfld float64 MCCTest.VType7::f64 - IL_04fb: add - IL_04fc: stfld float64 MCCTest.VType7::f64 - IL_0501: ldarg.0 - IL_0502: dup - IL_0503: ldfld float64 MCCTest.VType7::f65 - IL_0508: ldarga.s val - IL_050a: ldfld float64 MCCTest.VType7::f65 - IL_050f: add - IL_0510: stfld float64 MCCTest.VType7::f65 - IL_0515: ldarg.0 - IL_0516: dup - IL_0517: ldfld float64 MCCTest.VType7::f66 - IL_051c: ldarga.s val - IL_051e: ldfld float64 MCCTest.VType7::f66 - IL_0523: add - IL_0524: stfld float64 MCCTest.VType7::f66 - IL_0529: ldarg.0 - IL_052a: dup - IL_052b: ldfld float64 MCCTest.VType7::f67 - IL_0530: ldarga.s val - IL_0532: ldfld float64 MCCTest.VType7::f67 - IL_0537: add - IL_0538: stfld float64 MCCTest.VType7::f67 - IL_053d: ldarg.0 - IL_053e: dup - IL_053f: ldfld float64 MCCTest.VType7::f68 - IL_0544: ldarga.s val - IL_0546: ldfld float64 MCCTest.VType7::f68 - IL_054b: add - IL_054c: stfld float64 MCCTest.VType7::f68 - IL_0551: ldarg.0 - IL_0552: dup - IL_0553: ldfld float64 MCCTest.VType7::f69 - IL_0558: ldarga.s val - IL_055a: ldfld float64 MCCTest.VType7::f69 - IL_055f: add - IL_0560: stfld float64 MCCTest.VType7::f69 - IL_0565: ldarg.0 - IL_0566: dup - IL_0567: ldfld float64 MCCTest.VType7::f70 - IL_056c: ldarga.s val - IL_056e: ldfld float64 MCCTest.VType7::f70 - IL_0573: add - IL_0574: stfld float64 MCCTest.VType7::f70 - IL_0579: ldarg.0 - IL_057a: dup - IL_057b: ldfld float64 MCCTest.VType7::f71 - IL_0580: ldarga.s val - IL_0582: ldfld float64 MCCTest.VType7::f71 - IL_0587: add - IL_0588: stfld float64 MCCTest.VType7::f71 - IL_058d: ldarg.0 - IL_058e: dup - IL_058f: ldfld float64 MCCTest.VType7::f72 - IL_0594: ldarga.s val - IL_0596: ldfld float64 MCCTest.VType7::f72 - IL_059b: add - IL_059c: stfld float64 MCCTest.VType7::f72 - IL_05a1: ldarg.0 - IL_05a2: dup - IL_05a3: ldfld float64 MCCTest.VType7::f73 - IL_05a8: ldarga.s val - IL_05aa: ldfld float64 MCCTest.VType7::f73 - IL_05af: add - IL_05b0: stfld float64 MCCTest.VType7::f73 - IL_05b5: ldarg.0 - IL_05b6: dup - IL_05b7: ldfld float64 MCCTest.VType7::f74 - IL_05bc: ldarga.s val - IL_05be: ldfld float64 MCCTest.VType7::f74 - IL_05c3: add - IL_05c4: stfld float64 MCCTest.VType7::f74 - IL_05c9: ldarg.0 - IL_05ca: dup - IL_05cb: ldfld float64 MCCTest.VType7::f75 - IL_05d0: ldarga.s val - IL_05d2: ldfld float64 MCCTest.VType7::f75 - IL_05d7: add - IL_05d8: stfld float64 MCCTest.VType7::f75 - IL_05dd: ldarg.0 - IL_05de: dup - IL_05df: ldfld float64 MCCTest.VType7::f76 - IL_05e4: ldarga.s val - IL_05e6: ldfld float64 MCCTest.VType7::f76 - IL_05eb: add - IL_05ec: stfld float64 MCCTest.VType7::f76 - IL_05f1: ldarg.0 - IL_05f2: dup - IL_05f3: ldfld float64 MCCTest.VType7::f77 - IL_05f8: ldarga.s val - IL_05fa: ldfld float64 MCCTest.VType7::f77 - IL_05ff: add - IL_0600: stfld float64 MCCTest.VType7::f77 - IL_0605: ldarg.0 - IL_0606: dup - IL_0607: ldfld float64 MCCTest.VType7::f78 - IL_060c: ldarga.s val - IL_060e: ldfld float64 MCCTest.VType7::f78 - IL_0613: add - IL_0614: stfld float64 MCCTest.VType7::f78 - IL_0619: ldarg.0 - IL_061a: dup - IL_061b: ldfld float64 MCCTest.VType7::f79 - IL_0620: ldarga.s val - IL_0622: ldfld float64 MCCTest.VType7::f79 - IL_0627: add - IL_0628: stfld float64 MCCTest.VType7::f79 - IL_062d: ldarg.0 - IL_062e: dup - IL_062f: ldfld float64 MCCTest.VType7::f80 - IL_0634: ldarga.s val - IL_0636: ldfld float64 MCCTest.VType7::f80 - IL_063b: add - IL_063c: stfld float64 MCCTest.VType7::f80 - IL_0641: ldarg.0 - IL_0642: dup - IL_0643: ldfld float64 MCCTest.VType7::f81 - IL_0648: ldarga.s val - IL_064a: ldfld float64 MCCTest.VType7::f81 - IL_064f: add - IL_0650: stfld float64 MCCTest.VType7::f81 - IL_0655: ldarg.0 - IL_0656: dup - IL_0657: ldfld float64 MCCTest.VType7::f82 - IL_065c: ldarga.s val - IL_065e: ldfld float64 MCCTest.VType7::f82 - IL_0663: add - IL_0664: stfld float64 MCCTest.VType7::f82 - IL_0669: ldarg.0 - IL_066a: dup - IL_066b: ldfld float64 MCCTest.VType7::f83 - IL_0670: ldarga.s val - IL_0672: ldfld float64 MCCTest.VType7::f83 - IL_0677: add - IL_0678: stfld float64 MCCTest.VType7::f83 - IL_067d: ldarg.0 - IL_067e: dup - IL_067f: ldfld float64 MCCTest.VType7::f84 - IL_0684: ldarga.s val - IL_0686: ldfld float64 MCCTest.VType7::f84 - IL_068b: add - IL_068c: stfld float64 MCCTest.VType7::f84 - IL_0691: ldarg.0 - IL_0692: dup - IL_0693: ldfld float64 MCCTest.VType7::f85 - IL_0698: ldarga.s val - IL_069a: ldfld float64 MCCTest.VType7::f85 - IL_069f: add - IL_06a0: stfld float64 MCCTest.VType7::f85 - IL_06a5: ldarg.0 - IL_06a6: dup - IL_06a7: ldfld float64 MCCTest.VType7::f86 - IL_06ac: ldarga.s val - IL_06ae: ldfld float64 MCCTest.VType7::f86 - IL_06b3: add - IL_06b4: stfld float64 MCCTest.VType7::f86 - IL_06b9: ldarg.0 - IL_06ba: dup - IL_06bb: ldfld float64 MCCTest.VType7::f87 - IL_06c0: ldarga.s val - IL_06c2: ldfld float64 MCCTest.VType7::f87 - IL_06c7: add - IL_06c8: stfld float64 MCCTest.VType7::f87 - IL_06cd: ldarg.0 - IL_06ce: dup - IL_06cf: ldfld float64 MCCTest.VType7::f88 - IL_06d4: ldarga.s val - IL_06d6: ldfld float64 MCCTest.VType7::f88 - IL_06db: add - IL_06dc: stfld float64 MCCTest.VType7::f88 - IL_06e1: ldarg.0 - IL_06e2: dup - IL_06e3: ldfld float64 MCCTest.VType7::f89 - IL_06e8: ldarga.s val - IL_06ea: ldfld float64 MCCTest.VType7::f89 - IL_06ef: add - IL_06f0: stfld float64 MCCTest.VType7::f89 - IL_06f5: ldarg.0 - IL_06f6: dup - IL_06f7: ldfld float64 MCCTest.VType7::f90 - IL_06fc: ldarga.s val - IL_06fe: ldfld float64 MCCTest.VType7::f90 - IL_0703: add - IL_0704: stfld float64 MCCTest.VType7::f90 - IL_0709: ldarg.0 - IL_070a: dup - IL_070b: ldfld float64 MCCTest.VType7::f91 - IL_0710: ldarga.s val - IL_0712: ldfld float64 MCCTest.VType7::f91 - IL_0717: add - IL_0718: stfld float64 MCCTest.VType7::f91 - IL_071d: ldarg.0 - IL_071e: dup - IL_071f: ldfld float64 MCCTest.VType7::f92 - IL_0724: ldarga.s val - IL_0726: ldfld float64 MCCTest.VType7::f92 - IL_072b: add - IL_072c: stfld float64 MCCTest.VType7::f92 - IL_0731: ldarg.0 - IL_0732: dup - IL_0733: ldfld float64 MCCTest.VType7::f93 - IL_0738: ldarga.s val - IL_073a: ldfld float64 MCCTest.VType7::f93 - IL_073f: add - IL_0740: stfld float64 MCCTest.VType7::f93 - IL_0745: ldarg.0 - IL_0746: dup - IL_0747: ldfld float64 MCCTest.VType7::f94 - IL_074c: ldarga.s val - IL_074e: ldfld float64 MCCTest.VType7::f94 - IL_0753: add - IL_0754: stfld float64 MCCTest.VType7::f94 - IL_0759: ldarg.0 - IL_075a: dup - IL_075b: ldfld float64 MCCTest.VType7::f95 - IL_0760: ldarga.s val - IL_0762: ldfld float64 MCCTest.VType7::f95 - IL_0767: add - IL_0768: stfld float64 MCCTest.VType7::f95 - IL_076d: ldarg.0 - IL_076e: dup - IL_076f: ldfld float64 MCCTest.VType7::f96 - IL_0774: ldarga.s val - IL_0776: ldfld float64 MCCTest.VType7::f96 - IL_077b: add - IL_077c: stfld float64 MCCTest.VType7::f96 - IL_0781: ldarg.0 - IL_0782: dup - IL_0783: ldfld float64 MCCTest.VType7::f97 - IL_0788: ldarga.s val - IL_078a: ldfld float64 MCCTest.VType7::f97 - IL_078f: add - IL_0790: stfld float64 MCCTest.VType7::f97 - IL_0795: ldarg.0 - IL_0796: dup - IL_0797: ldfld float64 MCCTest.VType7::f98 - IL_079c: ldarga.s val - IL_079e: ldfld float64 MCCTest.VType7::f98 - IL_07a3: add - IL_07a4: stfld float64 MCCTest.VType7::f98 - IL_07a9: ldarg.0 - IL_07aa: dup - IL_07ab: ldfld float64 MCCTest.VType7::f99 - IL_07b0: ldarga.s val - IL_07b2: ldfld float64 MCCTest.VType7::f99 - IL_07b7: add - IL_07b8: stfld float64 MCCTest.VType7::f99 - IL_07bd: ldarg.0 - IL_07be: dup - IL_07bf: ldfld float64 MCCTest.VType7::f100 - IL_07c4: ldarga.s val - IL_07c6: ldfld float64 MCCTest.VType7::f100 - IL_07cb: add - IL_07cc: stfld float64 MCCTest.VType7::f100 - IL_07d1: ldarg.0 - IL_07d2: dup - IL_07d3: ldfld float64 MCCTest.VType7::f101 - IL_07d8: ldarga.s val - IL_07da: ldfld float64 MCCTest.VType7::f101 - IL_07df: add - IL_07e0: stfld float64 MCCTest.VType7::f101 - IL_07e5: ldarg.0 - IL_07e6: dup - IL_07e7: ldfld float64 MCCTest.VType7::f102 - IL_07ec: ldarga.s val - IL_07ee: ldfld float64 MCCTest.VType7::f102 - IL_07f3: add - IL_07f4: stfld float64 MCCTest.VType7::f102 - IL_07f9: ldarg.0 - IL_07fa: dup - IL_07fb: ldfld float64 MCCTest.VType7::f103 - IL_0800: ldarga.s val - IL_0802: ldfld float64 MCCTest.VType7::f103 - IL_0807: add - IL_0808: stfld float64 MCCTest.VType7::f103 - IL_080d: ldarg.0 - IL_080e: dup - IL_080f: ldfld float64 MCCTest.VType7::f104 - IL_0814: ldarga.s val - IL_0816: ldfld float64 MCCTest.VType7::f104 - IL_081b: add - IL_081c: stfld float64 MCCTest.VType7::f104 - IL_0821: ldarg.0 - IL_0822: dup - IL_0823: ldfld float64 MCCTest.VType7::f105 - IL_0828: ldarga.s val - IL_082a: ldfld float64 MCCTest.VType7::f105 - IL_082f: add - IL_0830: stfld float64 MCCTest.VType7::f105 - IL_0835: ldarg.0 - IL_0836: dup - IL_0837: ldfld float64 MCCTest.VType7::f106 - IL_083c: ldarga.s val - IL_083e: ldfld float64 MCCTest.VType7::f106 - IL_0843: add - IL_0844: stfld float64 MCCTest.VType7::f106 - IL_0849: ldarg.0 - IL_084a: dup - IL_084b: ldfld float64 MCCTest.VType7::f107 - IL_0850: ldarga.s val - IL_0852: ldfld float64 MCCTest.VType7::f107 - IL_0857: add - IL_0858: stfld float64 MCCTest.VType7::f107 - IL_085d: ldarg.0 - IL_085e: dup - IL_085f: ldfld float64 MCCTest.VType7::f108 - IL_0864: ldarga.s val - IL_0866: ldfld float64 MCCTest.VType7::f108 - IL_086b: add - IL_086c: stfld float64 MCCTest.VType7::f108 - IL_0871: ldarg.0 - IL_0872: dup - IL_0873: ldfld float64 MCCTest.VType7::f109 - IL_0878: ldarga.s val - IL_087a: ldfld float64 MCCTest.VType7::f109 - IL_087f: add - IL_0880: stfld float64 MCCTest.VType7::f109 - IL_0885: ldarg.0 - IL_0886: dup - IL_0887: ldfld float64 MCCTest.VType7::f110 - IL_088c: ldarga.s val - IL_088e: ldfld float64 MCCTest.VType7::f110 - IL_0893: add - IL_0894: stfld float64 MCCTest.VType7::f110 - IL_0899: ldarg.0 - IL_089a: dup - IL_089b: ldfld float64 MCCTest.VType7::f111 - IL_08a0: ldarga.s val - IL_08a2: ldfld float64 MCCTest.VType7::f111 - IL_08a7: add - IL_08a8: stfld float64 MCCTest.VType7::f111 - IL_08ad: ldarg.0 - IL_08ae: dup - IL_08af: ldfld float64 MCCTest.VType7::f112 - IL_08b4: ldarga.s val - IL_08b6: ldfld float64 MCCTest.VType7::f112 - IL_08bb: add - IL_08bc: stfld float64 MCCTest.VType7::f112 - IL_08c1: ldarg.0 - IL_08c2: dup - IL_08c3: ldfld float64 MCCTest.VType7::f113 - IL_08c8: ldarga.s val - IL_08ca: ldfld float64 MCCTest.VType7::f113 - IL_08cf: add - IL_08d0: stfld float64 MCCTest.VType7::f113 - IL_08d5: ldarg.0 - IL_08d6: dup - IL_08d7: ldfld float64 MCCTest.VType7::f114 - IL_08dc: ldarga.s val - IL_08de: ldfld float64 MCCTest.VType7::f114 - IL_08e3: add - IL_08e4: stfld float64 MCCTest.VType7::f114 - IL_08e9: ldarg.0 - IL_08ea: dup - IL_08eb: ldfld float64 MCCTest.VType7::f115 - IL_08f0: ldarga.s val - IL_08f2: ldfld float64 MCCTest.VType7::f115 - IL_08f7: add - IL_08f8: stfld float64 MCCTest.VType7::f115 - IL_08fd: ldarg.0 - IL_08fe: dup - IL_08ff: ldfld float64 MCCTest.VType7::f116 - IL_0904: ldarga.s val - IL_0906: ldfld float64 MCCTest.VType7::f116 - IL_090b: add - IL_090c: stfld float64 MCCTest.VType7::f116 - IL_0911: ldarg.0 - IL_0912: dup - IL_0913: ldfld float64 MCCTest.VType7::f117 - IL_0918: ldarga.s val - IL_091a: ldfld float64 MCCTest.VType7::f117 - IL_091f: add - IL_0920: stfld float64 MCCTest.VType7::f117 - IL_0925: ldarg.0 - IL_0926: dup - IL_0927: ldfld float64 MCCTest.VType7::f118 - IL_092c: ldarga.s val - IL_092e: ldfld float64 MCCTest.VType7::f118 - IL_0933: add - IL_0934: stfld float64 MCCTest.VType7::f118 - IL_0939: ldarg.0 - IL_093a: dup - IL_093b: ldfld float64 MCCTest.VType7::f119 - IL_0940: ldarga.s val - IL_0942: ldfld float64 MCCTest.VType7::f119 - IL_0947: add - IL_0948: stfld float64 MCCTest.VType7::f119 - IL_094d: ldarg.0 - IL_094e: dup - IL_094f: ldfld float64 MCCTest.VType7::f120 - IL_0954: ldarga.s val - IL_0956: ldfld float64 MCCTest.VType7::f120 - IL_095b: add - IL_095c: stfld float64 MCCTest.VType7::f120 - IL_0961: ldarg.0 - IL_0962: dup - IL_0963: ldfld float64 MCCTest.VType7::f121 - IL_0968: ldarga.s val - IL_096a: ldfld float64 MCCTest.VType7::f121 - IL_096f: add - IL_0970: stfld float64 MCCTest.VType7::f121 - IL_0975: ldarg.0 - IL_0976: dup - IL_0977: ldfld float64 MCCTest.VType7::f122 - IL_097c: ldarga.s val - IL_097e: ldfld float64 MCCTest.VType7::f122 - IL_0983: add - IL_0984: stfld float64 MCCTest.VType7::f122 - IL_0989: ldarg.0 - IL_098a: dup - IL_098b: ldfld float64 MCCTest.VType7::f123 - IL_0990: ldarga.s val - IL_0992: ldfld float64 MCCTest.VType7::f123 - IL_0997: add - IL_0998: stfld float64 MCCTest.VType7::f123 - IL_099d: ldarg.0 - IL_099e: dup - IL_099f: ldfld float64 MCCTest.VType7::f124 - IL_09a4: ldarga.s val - IL_09a6: ldfld float64 MCCTest.VType7::f124 - IL_09ab: add - IL_09ac: stfld float64 MCCTest.VType7::f124 - IL_09b1: ldarg.0 - IL_09b2: dup - IL_09b3: ldfld float64 MCCTest.VType7::f125 - IL_09b8: ldarga.s val - IL_09ba: ldfld float64 MCCTest.VType7::f125 - IL_09bf: add - IL_09c0: stfld float64 MCCTest.VType7::f125 - IL_09c5: ldarg.0 - IL_09c6: dup - IL_09c7: ldfld float64 MCCTest.VType7::f126 - IL_09cc: ldarga.s val - IL_09ce: ldfld float64 MCCTest.VType7::f126 - IL_09d3: add - IL_09d4: stfld float64 MCCTest.VType7::f126 - IL_09d9: ldarg.0 - IL_09da: dup - IL_09db: ldfld float64 MCCTest.VType7::f127 - IL_09e0: ldarga.s val - IL_09e2: ldfld float64 MCCTest.VType7::f127 - IL_09e7: add - IL_09e8: stfld float64 MCCTest.VType7::f127 - IL_09ed: ldarg.0 - IL_09ee: dup - IL_09ef: ldfld float64 MCCTest.VType7::f128 - IL_09f4: ldarga.s val - IL_09f6: ldfld float64 MCCTest.VType7::f128 - IL_09fb: add - IL_09fc: stfld float64 MCCTest.VType7::f128 - IL_0a01: ldarg.0 - IL_0a02: dup - IL_0a03: ldfld float64 MCCTest.VType7::f129 - IL_0a08: ldarga.s val - IL_0a0a: ldfld float64 MCCTest.VType7::f129 - IL_0a0f: add - IL_0a10: stfld float64 MCCTest.VType7::f129 - IL_0a15: ldarg.0 - IL_0a16: dup - IL_0a17: ldfld float64 MCCTest.VType7::f130 - IL_0a1c: ldarga.s val - IL_0a1e: ldfld float64 MCCTest.VType7::f130 - IL_0a23: add - IL_0a24: stfld float64 MCCTest.VType7::f130 - IL_0a29: ldarg.0 - IL_0a2a: dup - IL_0a2b: ldfld float64 MCCTest.VType7::f131 - IL_0a30: ldarga.s val - IL_0a32: ldfld float64 MCCTest.VType7::f131 - IL_0a37: add - IL_0a38: stfld float64 MCCTest.VType7::f131 - IL_0a3d: ldarg.0 - IL_0a3e: dup - IL_0a3f: ldfld float64 MCCTest.VType7::f132 - IL_0a44: ldarga.s val - IL_0a46: ldfld float64 MCCTest.VType7::f132 - IL_0a4b: add - IL_0a4c: stfld float64 MCCTest.VType7::f132 - IL_0a51: ldarg.0 - IL_0a52: dup - IL_0a53: ldfld float64 MCCTest.VType7::f133 - IL_0a58: ldarga.s val - IL_0a5a: ldfld float64 MCCTest.VType7::f133 - IL_0a5f: add - IL_0a60: stfld float64 MCCTest.VType7::f133 - IL_0a65: ldarg.0 - IL_0a66: dup - IL_0a67: ldfld float64 MCCTest.VType7::f134 - IL_0a6c: ldarga.s val - IL_0a6e: ldfld float64 MCCTest.VType7::f134 - IL_0a73: add - IL_0a74: stfld float64 MCCTest.VType7::f134 - IL_0a79: ldarg.0 - IL_0a7a: dup - IL_0a7b: ldfld float64 MCCTest.VType7::f135 - IL_0a80: ldarga.s val - IL_0a82: ldfld float64 MCCTest.VType7::f135 - IL_0a87: add - IL_0a88: stfld float64 MCCTest.VType7::f135 - IL_0a8d: ldarg.0 - IL_0a8e: dup - IL_0a8f: ldfld float64 MCCTest.VType7::f136 - IL_0a94: ldarga.s val - IL_0a96: ldfld float64 MCCTest.VType7::f136 - IL_0a9b: add - IL_0a9c: stfld float64 MCCTest.VType7::f136 - IL_0aa1: ldarg.0 - IL_0aa2: dup - IL_0aa3: ldfld float64 MCCTest.VType7::f137 - IL_0aa8: ldarga.s val - IL_0aaa: ldfld float64 MCCTest.VType7::f137 - IL_0aaf: add - IL_0ab0: stfld float64 MCCTest.VType7::f137 - IL_0ab5: ldarg.0 - IL_0ab6: dup - IL_0ab7: ldfld float64 MCCTest.VType7::f138 - IL_0abc: ldarga.s val - IL_0abe: ldfld float64 MCCTest.VType7::f138 - IL_0ac3: add - IL_0ac4: stfld float64 MCCTest.VType7::f138 - IL_0ac9: ldarg.0 - IL_0aca: dup - IL_0acb: ldfld float64 MCCTest.VType7::f139 - IL_0ad0: ldarga.s val - IL_0ad2: ldfld float64 MCCTest.VType7::f139 - IL_0ad7: add - IL_0ad8: stfld float64 MCCTest.VType7::f139 - IL_0add: ldarg.0 - IL_0ade: dup - IL_0adf: ldfld float64 MCCTest.VType7::f140 - IL_0ae4: ldarga.s val - IL_0ae6: ldfld float64 MCCTest.VType7::f140 - IL_0aeb: add - IL_0aec: stfld float64 MCCTest.VType7::f140 - IL_0af1: ldarg.0 - IL_0af2: dup - IL_0af3: ldfld float64 MCCTest.VType7::f141 - IL_0af8: ldarga.s val - IL_0afa: ldfld float64 MCCTest.VType7::f141 - IL_0aff: add - IL_0b00: stfld float64 MCCTest.VType7::f141 - IL_0b05: ldarg.0 - IL_0b06: dup - IL_0b07: ldfld float64 MCCTest.VType7::f142 - IL_0b0c: ldarga.s val - IL_0b0e: ldfld float64 MCCTest.VType7::f142 - IL_0b13: add - IL_0b14: stfld float64 MCCTest.VType7::f142 - IL_0b19: ldarg.0 - IL_0b1a: dup - IL_0b1b: ldfld float64 MCCTest.VType7::f143 - IL_0b20: ldarga.s val - IL_0b22: ldfld float64 MCCTest.VType7::f143 - IL_0b27: add - IL_0b28: stfld float64 MCCTest.VType7::f143 - IL_0b2d: ldarg.0 - IL_0b2e: dup - IL_0b2f: ldfld float64 MCCTest.VType7::f144 - IL_0b34: ldarga.s val - IL_0b36: ldfld float64 MCCTest.VType7::f144 - IL_0b3b: add - IL_0b3c: stfld float64 MCCTest.VType7::f144 - IL_0b41: ldarg.0 - IL_0b42: dup - IL_0b43: ldfld float64 MCCTest.VType7::f145 - IL_0b48: ldarga.s val - IL_0b4a: ldfld float64 MCCTest.VType7::f145 - IL_0b4f: add - IL_0b50: stfld float64 MCCTest.VType7::f145 - IL_0b55: ldarg.0 - IL_0b56: dup - IL_0b57: ldfld float64 MCCTest.VType7::f146 - IL_0b5c: ldarga.s val - IL_0b5e: ldfld float64 MCCTest.VType7::f146 - IL_0b63: add - IL_0b64: stfld float64 MCCTest.VType7::f146 - IL_0b69: ldarg.0 - IL_0b6a: dup - IL_0b6b: ldfld float64 MCCTest.VType7::f147 - IL_0b70: ldarga.s val - IL_0b72: ldfld float64 MCCTest.VType7::f147 - IL_0b77: add - IL_0b78: stfld float64 MCCTest.VType7::f147 - IL_0b7d: ldarg.0 - IL_0b7e: dup - IL_0b7f: ldfld float64 MCCTest.VType7::f148 - IL_0b84: ldarga.s val - IL_0b86: ldfld float64 MCCTest.VType7::f148 - IL_0b8b: add - IL_0b8c: stfld float64 MCCTest.VType7::f148 - IL_0b91: ldarg.0 - IL_0b92: dup - IL_0b93: ldfld float64 MCCTest.VType7::f149 - IL_0b98: ldarga.s val - IL_0b9a: ldfld float64 MCCTest.VType7::f149 - IL_0b9f: add - IL_0ba0: stfld float64 MCCTest.VType7::f149 - IL_0ba5: ldarg.0 - IL_0ba6: dup - IL_0ba7: ldfld float64 MCCTest.VType7::f150 - IL_0bac: ldarga.s val - IL_0bae: ldfld float64 MCCTest.VType7::f150 - IL_0bb3: add - IL_0bb4: stfld float64 MCCTest.VType7::f150 - IL_0bb9: ldarg.0 - IL_0bba: dup - IL_0bbb: ldfld float64 MCCTest.VType7::f151 - IL_0bc0: ldarga.s val - IL_0bc2: ldfld float64 MCCTest.VType7::f151 - IL_0bc7: add - IL_0bc8: stfld float64 MCCTest.VType7::f151 - IL_0bcd: ldarg.0 - IL_0bce: dup - IL_0bcf: ldfld float64 MCCTest.VType7::f152 - IL_0bd4: ldarga.s val - IL_0bd6: ldfld float64 MCCTest.VType7::f152 - IL_0bdb: add - IL_0bdc: stfld float64 MCCTest.VType7::f152 - IL_0be1: ldarg.0 - IL_0be2: dup - IL_0be3: ldfld float64 MCCTest.VType7::f153 - IL_0be8: ldarga.s val - IL_0bea: ldfld float64 MCCTest.VType7::f153 - IL_0bef: add - IL_0bf0: stfld float64 MCCTest.VType7::f153 - IL_0bf5: ldarg.0 - IL_0bf6: dup - IL_0bf7: ldfld float64 MCCTest.VType7::f154 - IL_0bfc: ldarga.s val - IL_0bfe: ldfld float64 MCCTest.VType7::f154 - IL_0c03: add - IL_0c04: stfld float64 MCCTest.VType7::f154 - IL_0c09: ldarg.0 - IL_0c0a: dup - IL_0c0b: ldfld float64 MCCTest.VType7::f155 - IL_0c10: ldarga.s val - IL_0c12: ldfld float64 MCCTest.VType7::f155 - IL_0c17: add - IL_0c18: stfld float64 MCCTest.VType7::f155 - IL_0c1d: ldarg.0 - IL_0c1e: dup - IL_0c1f: ldfld float64 MCCTest.VType7::f156 - IL_0c24: ldarga.s val - IL_0c26: ldfld float64 MCCTest.VType7::f156 - IL_0c2b: add - IL_0c2c: stfld float64 MCCTest.VType7::f156 - IL_0c31: ldarg.0 - IL_0c32: dup - IL_0c33: ldfld float64 MCCTest.VType7::f157 - IL_0c38: ldarga.s val - IL_0c3a: ldfld float64 MCCTest.VType7::f157 - IL_0c3f: add - IL_0c40: stfld float64 MCCTest.VType7::f157 - IL_0c45: ldarg.0 - IL_0c46: dup - IL_0c47: ldfld float64 MCCTest.VType7::f158 - IL_0c4c: ldarga.s val - IL_0c4e: ldfld float64 MCCTest.VType7::f158 - IL_0c53: add - IL_0c54: stfld float64 MCCTest.VType7::f158 - IL_0c59: ldarg.0 - IL_0c5a: dup - IL_0c5b: ldfld float64 MCCTest.VType7::f159 - IL_0c60: ldarga.s val - IL_0c62: ldfld float64 MCCTest.VType7::f159 - IL_0c67: add - IL_0c68: stfld float64 MCCTest.VType7::f159 - IL_0c6d: ldarg.0 - IL_0c6e: dup - IL_0c6f: ldfld float64 MCCTest.VType7::f160 - IL_0c74: ldarga.s val - IL_0c76: ldfld float64 MCCTest.VType7::f160 - IL_0c7b: add - IL_0c7c: stfld float64 MCCTest.VType7::f160 - IL_0c81: ldarg.0 - IL_0c82: dup - IL_0c83: ldfld float64 MCCTest.VType7::f161 - IL_0c88: ldarga.s val - IL_0c8a: ldfld float64 MCCTest.VType7::f161 - IL_0c8f: add - IL_0c90: stfld float64 MCCTest.VType7::f161 - IL_0c95: ldarg.0 - IL_0c96: dup - IL_0c97: ldfld float64 MCCTest.VType7::f162 - IL_0c9c: ldarga.s val - IL_0c9e: ldfld float64 MCCTest.VType7::f162 - IL_0ca3: add - IL_0ca4: stfld float64 MCCTest.VType7::f162 - IL_0ca9: ldarg.0 - IL_0caa: dup - IL_0cab: ldfld float64 MCCTest.VType7::f163 - IL_0cb0: ldarga.s val - IL_0cb2: ldfld float64 MCCTest.VType7::f163 - IL_0cb7: add - IL_0cb8: stfld float64 MCCTest.VType7::f163 - IL_0cbd: ldarg.0 - IL_0cbe: dup - IL_0cbf: ldfld float64 MCCTest.VType7::f164 - IL_0cc4: ldarga.s val - IL_0cc6: ldfld float64 MCCTest.VType7::f164 - IL_0ccb: add - IL_0ccc: stfld float64 MCCTest.VType7::f164 - IL_0cd1: ldarg.0 - IL_0cd2: dup - IL_0cd3: ldfld float64 MCCTest.VType7::f165 - IL_0cd8: ldarga.s val - IL_0cda: ldfld float64 MCCTest.VType7::f165 - IL_0cdf: add - IL_0ce0: stfld float64 MCCTest.VType7::f165 - IL_0ce5: ldarg.0 - IL_0ce6: dup - IL_0ce7: ldfld float64 MCCTest.VType7::f166 - IL_0cec: ldarga.s val - IL_0cee: ldfld float64 MCCTest.VType7::f166 - IL_0cf3: add - IL_0cf4: stfld float64 MCCTest.VType7::f166 - IL_0cf9: ldarg.0 - IL_0cfa: dup - IL_0cfb: ldfld float64 MCCTest.VType7::f167 - IL_0d00: ldarga.s val - IL_0d02: ldfld float64 MCCTest.VType7::f167 - IL_0d07: add - IL_0d08: stfld float64 MCCTest.VType7::f167 - IL_0d0d: ldarg.0 - IL_0d0e: dup - IL_0d0f: ldfld float64 MCCTest.VType7::f168 - IL_0d14: ldarga.s val - IL_0d16: ldfld float64 MCCTest.VType7::f168 - IL_0d1b: add - IL_0d1c: stfld float64 MCCTest.VType7::f168 - IL_0d21: ldarg.0 - IL_0d22: dup - IL_0d23: ldfld float64 MCCTest.VType7::f169 - IL_0d28: ldarga.s val - IL_0d2a: ldfld float64 MCCTest.VType7::f169 - IL_0d2f: add - IL_0d30: stfld float64 MCCTest.VType7::f169 - IL_0d35: ldarg.0 - IL_0d36: dup - IL_0d37: ldfld float64 MCCTest.VType7::f170 - IL_0d3c: ldarga.s val - IL_0d3e: ldfld float64 MCCTest.VType7::f170 - IL_0d43: add - IL_0d44: stfld float64 MCCTest.VType7::f170 - IL_0d49: ldarg.0 - IL_0d4a: dup - IL_0d4b: ldfld float64 MCCTest.VType7::f171 - IL_0d50: ldarga.s val - IL_0d52: ldfld float64 MCCTest.VType7::f171 - IL_0d57: add - IL_0d58: stfld float64 MCCTest.VType7::f171 - IL_0d5d: ldarg.0 - IL_0d5e: dup - IL_0d5f: ldfld float64 MCCTest.VType7::f172 - IL_0d64: ldarga.s val - IL_0d66: ldfld float64 MCCTest.VType7::f172 - IL_0d6b: add - IL_0d6c: stfld float64 MCCTest.VType7::f172 - IL_0d71: ldarg.0 - IL_0d72: dup - IL_0d73: ldfld float64 MCCTest.VType7::f173 - IL_0d78: ldarga.s val - IL_0d7a: ldfld float64 MCCTest.VType7::f173 - IL_0d7f: add - IL_0d80: stfld float64 MCCTest.VType7::f173 - IL_0d85: ldarg.0 - IL_0d86: dup - IL_0d87: ldfld float64 MCCTest.VType7::f174 - IL_0d8c: ldarga.s val - IL_0d8e: ldfld float64 MCCTest.VType7::f174 - IL_0d93: add - IL_0d94: stfld float64 MCCTest.VType7::f174 - IL_0d99: ldarg.0 - IL_0d9a: dup - IL_0d9b: ldfld float64 MCCTest.VType7::f175 - IL_0da0: ldarga.s val - IL_0da2: ldfld float64 MCCTest.VType7::f175 - IL_0da7: add - IL_0da8: stfld float64 MCCTest.VType7::f175 - IL_0dad: ldarg.0 - IL_0dae: dup - IL_0daf: ldfld float64 MCCTest.VType7::f176 - IL_0db4: ldarga.s val - IL_0db6: ldfld float64 MCCTest.VType7::f176 - IL_0dbb: add - IL_0dbc: stfld float64 MCCTest.VType7::f176 - IL_0dc1: ldarg.0 - IL_0dc2: dup - IL_0dc3: ldfld float64 MCCTest.VType7::f177 - IL_0dc8: ldarga.s val - IL_0dca: ldfld float64 MCCTest.VType7::f177 - IL_0dcf: add - IL_0dd0: stfld float64 MCCTest.VType7::f177 - IL_0dd5: ldarg.0 - IL_0dd6: dup - IL_0dd7: ldfld float64 MCCTest.VType7::f178 - IL_0ddc: ldarga.s val - IL_0dde: ldfld float64 MCCTest.VType7::f178 - IL_0de3: add - IL_0de4: stfld float64 MCCTest.VType7::f178 - IL_0de9: ldarg.0 - IL_0dea: dup - IL_0deb: ldfld float64 MCCTest.VType7::f179 - IL_0df0: ldarga.s val - IL_0df2: ldfld float64 MCCTest.VType7::f179 - IL_0df7: add - IL_0df8: stfld float64 MCCTest.VType7::f179 - IL_0dfd: ldarg.0 - IL_0dfe: dup - IL_0dff: ldfld float64 MCCTest.VType7::f180 - IL_0e04: ldarga.s val - IL_0e06: ldfld float64 MCCTest.VType7::f180 - IL_0e0b: add - IL_0e0c: stfld float64 MCCTest.VType7::f180 - IL_0e11: ldarg.0 - IL_0e12: dup - IL_0e13: ldfld float64 MCCTest.VType7::f181 - IL_0e18: ldarga.s val - IL_0e1a: ldfld float64 MCCTest.VType7::f181 - IL_0e1f: add - IL_0e20: stfld float64 MCCTest.VType7::f181 - IL_0e25: ldarg.0 - IL_0e26: dup - IL_0e27: ldfld float64 MCCTest.VType7::f182 - IL_0e2c: ldarga.s val - IL_0e2e: ldfld float64 MCCTest.VType7::f182 - IL_0e33: add - IL_0e34: stfld float64 MCCTest.VType7::f182 - IL_0e39: ldarg.0 - IL_0e3a: dup - IL_0e3b: ldfld float64 MCCTest.VType7::f183 - IL_0e40: ldarga.s val - IL_0e42: ldfld float64 MCCTest.VType7::f183 - IL_0e47: add - IL_0e48: stfld float64 MCCTest.VType7::f183 - IL_0e4d: ldarg.0 - IL_0e4e: dup - IL_0e4f: ldfld float64 MCCTest.VType7::f184 - IL_0e54: ldarga.s val - IL_0e56: ldfld float64 MCCTest.VType7::f184 - IL_0e5b: add - IL_0e5c: stfld float64 MCCTest.VType7::f184 - IL_0e61: ldarg.0 - IL_0e62: dup - IL_0e63: ldfld float64 MCCTest.VType7::f185 - IL_0e68: ldarga.s val - IL_0e6a: ldfld float64 MCCTest.VType7::f185 - IL_0e6f: add - IL_0e70: stfld float64 MCCTest.VType7::f185 - IL_0e75: ldarg.0 - IL_0e76: dup - IL_0e77: ldfld float64 MCCTest.VType7::f186 - IL_0e7c: ldarga.s val - IL_0e7e: ldfld float64 MCCTest.VType7::f186 - IL_0e83: add - IL_0e84: stfld float64 MCCTest.VType7::f186 - IL_0e89: ldarg.0 - IL_0e8a: dup - IL_0e8b: ldfld float64 MCCTest.VType7::f187 - IL_0e90: ldarga.s val - IL_0e92: ldfld float64 MCCTest.VType7::f187 - IL_0e97: add - IL_0e98: stfld float64 MCCTest.VType7::f187 - IL_0e9d: ldarg.0 - IL_0e9e: dup - IL_0e9f: ldfld float64 MCCTest.VType7::f188 - IL_0ea4: ldarga.s val - IL_0ea6: ldfld float64 MCCTest.VType7::f188 - IL_0eab: add - IL_0eac: stfld float64 MCCTest.VType7::f188 - IL_0eb1: ldarg.0 - IL_0eb2: dup - IL_0eb3: ldfld float64 MCCTest.VType7::f189 - IL_0eb8: ldarga.s val - IL_0eba: ldfld float64 MCCTest.VType7::f189 - IL_0ebf: add - IL_0ec0: stfld float64 MCCTest.VType7::f189 - IL_0ec5: ldarg.0 - IL_0ec6: dup - IL_0ec7: ldfld float64 MCCTest.VType7::f190 - IL_0ecc: ldarga.s val - IL_0ece: ldfld float64 MCCTest.VType7::f190 - IL_0ed3: add - IL_0ed4: stfld float64 MCCTest.VType7::f190 - IL_0ed9: ldarg.0 - IL_0eda: dup - IL_0edb: ldfld float64 MCCTest.VType7::f191 - IL_0ee0: ldarga.s val - IL_0ee2: ldfld float64 MCCTest.VType7::f191 - IL_0ee7: add - IL_0ee8: stfld float64 MCCTest.VType7::f191 - IL_0eed: ldarg.0 - IL_0eee: dup - IL_0eef: ldfld float64 MCCTest.VType7::f192 - IL_0ef4: ldarga.s val - IL_0ef6: ldfld float64 MCCTest.VType7::f192 - IL_0efb: add - IL_0efc: stfld float64 MCCTest.VType7::f192 - IL_0f01: ldarg.0 - IL_0f02: dup - IL_0f03: ldfld float64 MCCTest.VType7::f193 - IL_0f08: ldarga.s val - IL_0f0a: ldfld float64 MCCTest.VType7::f193 - IL_0f0f: add - IL_0f10: stfld float64 MCCTest.VType7::f193 - IL_0f15: ldarg.0 - IL_0f16: dup - IL_0f17: ldfld float64 MCCTest.VType7::f194 - IL_0f1c: ldarga.s val - IL_0f1e: ldfld float64 MCCTest.VType7::f194 - IL_0f23: add - IL_0f24: stfld float64 MCCTest.VType7::f194 - IL_0f29: ldarg.0 - IL_0f2a: dup - IL_0f2b: ldfld float64 MCCTest.VType7::f195 - IL_0f30: ldarga.s val - IL_0f32: ldfld float64 MCCTest.VType7::f195 - IL_0f37: add - IL_0f38: stfld float64 MCCTest.VType7::f195 - IL_0f3d: ldarg.0 - IL_0f3e: dup - IL_0f3f: ldfld float64 MCCTest.VType7::f196 - IL_0f44: ldarga.s val - IL_0f46: ldfld float64 MCCTest.VType7::f196 - IL_0f4b: add - IL_0f4c: stfld float64 MCCTest.VType7::f196 - IL_0f51: ldarg.0 - IL_0f52: dup - IL_0f53: ldfld float64 MCCTest.VType7::f197 - IL_0f58: ldarga.s val - IL_0f5a: ldfld float64 MCCTest.VType7::f197 - IL_0f5f: add - IL_0f60: stfld float64 MCCTest.VType7::f197 - IL_0f65: ldarg.0 - IL_0f66: dup - IL_0f67: ldfld float64 MCCTest.VType7::f198 - IL_0f6c: ldarga.s val - IL_0f6e: ldfld float64 MCCTest.VType7::f198 - IL_0f73: add - IL_0f74: stfld float64 MCCTest.VType7::f198 - IL_0f79: ldarg.0 - IL_0f7a: dup - IL_0f7b: ldfld float64 MCCTest.VType7::f199 - IL_0f80: ldarga.s val - IL_0f82: ldfld float64 MCCTest.VType7::f199 - IL_0f87: add - IL_0f88: stfld float64 MCCTest.VType7::f199 - IL_0f8d: ldarg.0 - IL_0f8e: dup - IL_0f8f: ldfld float64 MCCTest.VType7::f200 - IL_0f94: ldarga.s val - IL_0f96: ldfld float64 MCCTest.VType7::f200 - IL_0f9b: add - IL_0f9c: stfld float64 MCCTest.VType7::f200 - IL_0fa1: ldarg.0 - IL_0fa2: dup - IL_0fa3: ldfld float64 MCCTest.VType7::f201 - IL_0fa8: ldarga.s val - IL_0faa: ldfld float64 MCCTest.VType7::f201 - IL_0faf: add - IL_0fb0: stfld float64 MCCTest.VType7::f201 - IL_0fb5: ldarg.0 - IL_0fb6: dup - IL_0fb7: ldfld float64 MCCTest.VType7::f202 - IL_0fbc: ldarga.s val - IL_0fbe: ldfld float64 MCCTest.VType7::f202 - IL_0fc3: add - IL_0fc4: stfld float64 MCCTest.VType7::f202 - IL_0fc9: ldarg.0 - IL_0fca: dup - IL_0fcb: ldfld float64 MCCTest.VType7::f203 - IL_0fd0: ldarga.s val - IL_0fd2: ldfld float64 MCCTest.VType7::f203 - IL_0fd7: add - IL_0fd8: stfld float64 MCCTest.VType7::f203 - IL_0fdd: ldarg.0 - IL_0fde: dup - IL_0fdf: ldfld float64 MCCTest.VType7::f204 - IL_0fe4: ldarga.s val - IL_0fe6: ldfld float64 MCCTest.VType7::f204 - IL_0feb: add - IL_0fec: stfld float64 MCCTest.VType7::f204 - IL_0ff1: ldarg.0 - IL_0ff2: dup - IL_0ff3: ldfld float64 MCCTest.VType7::f205 - IL_0ff8: ldarga.s val - IL_0ffa: ldfld float64 MCCTest.VType7::f205 - IL_0fff: add - IL_1000: stfld float64 MCCTest.VType7::f205 - IL_1005: ldarg.0 - IL_1006: dup - IL_1007: ldfld float64 MCCTest.VType7::f206 - IL_100c: ldarga.s val - IL_100e: ldfld float64 MCCTest.VType7::f206 - IL_1013: add - IL_1014: stfld float64 MCCTest.VType7::f206 - IL_1019: ldarg.0 - IL_101a: dup - IL_101b: ldfld float64 MCCTest.VType7::f207 - IL_1020: ldarga.s val - IL_1022: ldfld float64 MCCTest.VType7::f207 - IL_1027: add - IL_1028: stfld float64 MCCTest.VType7::f207 - IL_102d: ldarg.0 - IL_102e: dup - IL_102f: ldfld float64 MCCTest.VType7::f208 - IL_1034: ldarga.s val - IL_1036: ldfld float64 MCCTest.VType7::f208 - IL_103b: add - IL_103c: stfld float64 MCCTest.VType7::f208 - IL_1041: ldarg.0 - IL_1042: dup - IL_1043: ldfld float64 MCCTest.VType7::f209 - IL_1048: ldarga.s val - IL_104a: ldfld float64 MCCTest.VType7::f209 - IL_104f: add - IL_1050: stfld float64 MCCTest.VType7::f209 - IL_1055: ldarg.0 - IL_1056: dup - IL_1057: ldfld float64 MCCTest.VType7::f210 - IL_105c: ldarga.s val - IL_105e: ldfld float64 MCCTest.VType7::f210 - IL_1063: add - IL_1064: stfld float64 MCCTest.VType7::f210 - IL_1069: ldarg.0 - IL_106a: dup - IL_106b: ldfld float64 MCCTest.VType7::f211 - IL_1070: ldarga.s val - IL_1072: ldfld float64 MCCTest.VType7::f211 - IL_1077: add - IL_1078: stfld float64 MCCTest.VType7::f211 - IL_107d: ldarg.0 - IL_107e: dup - IL_107f: ldfld float64 MCCTest.VType7::f212 - IL_1084: ldarga.s val - IL_1086: ldfld float64 MCCTest.VType7::f212 - IL_108b: add - IL_108c: stfld float64 MCCTest.VType7::f212 - IL_1091: ldarg.0 - IL_1092: dup - IL_1093: ldfld float64 MCCTest.VType7::f213 - IL_1098: ldarga.s val - IL_109a: ldfld float64 MCCTest.VType7::f213 - IL_109f: add - IL_10a0: stfld float64 MCCTest.VType7::f213 - IL_10a5: ldarg.0 - IL_10a6: dup - IL_10a7: ldfld float64 MCCTest.VType7::f214 - IL_10ac: ldarga.s val - IL_10ae: ldfld float64 MCCTest.VType7::f214 - IL_10b3: add - IL_10b4: stfld float64 MCCTest.VType7::f214 - IL_10b9: ldarg.0 - IL_10ba: dup - IL_10bb: ldfld float64 MCCTest.VType7::f215 - IL_10c0: ldarga.s val - IL_10c2: ldfld float64 MCCTest.VType7::f215 - IL_10c7: add - IL_10c8: stfld float64 MCCTest.VType7::f215 - IL_10cd: ldarg.0 - IL_10ce: dup - IL_10cf: ldfld float64 MCCTest.VType7::f216 - IL_10d4: ldarga.s val - IL_10d6: ldfld float64 MCCTest.VType7::f216 - IL_10db: add - IL_10dc: stfld float64 MCCTest.VType7::f216 - IL_10e1: ldarg.0 - IL_10e2: dup - IL_10e3: ldfld float64 MCCTest.VType7::f217 - IL_10e8: ldarga.s val - IL_10ea: ldfld float64 MCCTest.VType7::f217 - IL_10ef: add - IL_10f0: stfld float64 MCCTest.VType7::f217 - IL_10f5: ldarg.0 - IL_10f6: dup - IL_10f7: ldfld float64 MCCTest.VType7::f218 - IL_10fc: ldarga.s val - IL_10fe: ldfld float64 MCCTest.VType7::f218 - IL_1103: add - IL_1104: stfld float64 MCCTest.VType7::f218 - IL_1109: ldarg.0 - IL_110a: dup - IL_110b: ldfld float64 MCCTest.VType7::f219 - IL_1110: ldarga.s val - IL_1112: ldfld float64 MCCTest.VType7::f219 - IL_1117: add - IL_1118: stfld float64 MCCTest.VType7::f219 - IL_111d: ldarg.0 - IL_111e: dup - IL_111f: ldfld float64 MCCTest.VType7::f220 - IL_1124: ldarga.s val - IL_1126: ldfld float64 MCCTest.VType7::f220 - IL_112b: add - IL_112c: stfld float64 MCCTest.VType7::f220 - IL_1131: ldarg.0 - IL_1132: dup - IL_1133: ldfld float64 MCCTest.VType7::f221 - IL_1138: ldarga.s val - IL_113a: ldfld float64 MCCTest.VType7::f221 - IL_113f: add - IL_1140: stfld float64 MCCTest.VType7::f221 - IL_1145: ldarg.0 - IL_1146: dup - IL_1147: ldfld float64 MCCTest.VType7::f222 - IL_114c: ldarga.s val - IL_114e: ldfld float64 MCCTest.VType7::f222 - IL_1153: add - IL_1154: stfld float64 MCCTest.VType7::f222 - IL_1159: ldarg.0 - IL_115a: dup - IL_115b: ldfld float64 MCCTest.VType7::f223 - IL_1160: ldarga.s val - IL_1162: ldfld float64 MCCTest.VType7::f223 - IL_1167: add - IL_1168: stfld float64 MCCTest.VType7::f223 - IL_116d: ldarg.0 - IL_116e: dup - IL_116f: ldfld float64 MCCTest.VType7::f224 - IL_1174: ldarga.s val - IL_1176: ldfld float64 MCCTest.VType7::f224 - IL_117b: add - IL_117c: stfld float64 MCCTest.VType7::f224 - IL_1181: ldarg.0 - IL_1182: dup - IL_1183: ldfld float64 MCCTest.VType7::f225 - IL_1188: ldarga.s val - IL_118a: ldfld float64 MCCTest.VType7::f225 - IL_118f: add - IL_1190: stfld float64 MCCTest.VType7::f225 - IL_1195: ldarg.0 - IL_1196: dup - IL_1197: ldfld float64 MCCTest.VType7::f226 - IL_119c: ldarga.s val - IL_119e: ldfld float64 MCCTest.VType7::f226 - IL_11a3: add - IL_11a4: stfld float64 MCCTest.VType7::f226 - IL_11a9: ldarg.0 - IL_11aa: dup - IL_11ab: ldfld float64 MCCTest.VType7::f227 - IL_11b0: ldarga.s val - IL_11b2: ldfld float64 MCCTest.VType7::f227 - IL_11b7: add - IL_11b8: stfld float64 MCCTest.VType7::f227 - IL_11bd: ldarg.0 - IL_11be: dup - IL_11bf: ldfld float64 MCCTest.VType7::f228 - IL_11c4: ldarga.s val - IL_11c6: ldfld float64 MCCTest.VType7::f228 - IL_11cb: add - IL_11cc: stfld float64 MCCTest.VType7::f228 - IL_11d1: ldarg.0 - IL_11d2: dup - IL_11d3: ldfld float64 MCCTest.VType7::f229 - IL_11d8: ldarga.s val - IL_11da: ldfld float64 MCCTest.VType7::f229 - IL_11df: add - IL_11e0: stfld float64 MCCTest.VType7::f229 - IL_11e5: ldarg.0 - IL_11e6: dup - IL_11e7: ldfld float64 MCCTest.VType7::f230 - IL_11ec: ldarga.s val - IL_11ee: ldfld float64 MCCTest.VType7::f230 - IL_11f3: add - IL_11f4: stfld float64 MCCTest.VType7::f230 - IL_11f9: ldarg.0 - IL_11fa: dup - IL_11fb: ldfld float64 MCCTest.VType7::f231 - IL_1200: ldarga.s val - IL_1202: ldfld float64 MCCTest.VType7::f231 - IL_1207: add - IL_1208: stfld float64 MCCTest.VType7::f231 - IL_120d: ldarg.0 - IL_120e: dup - IL_120f: ldfld float64 MCCTest.VType7::f232 - IL_1214: ldarga.s val - IL_1216: ldfld float64 MCCTest.VType7::f232 - IL_121b: add - IL_121c: stfld float64 MCCTest.VType7::f232 - IL_1221: ldarg.0 - IL_1222: dup - IL_1223: ldfld float64 MCCTest.VType7::f233 - IL_1228: ldarga.s val - IL_122a: ldfld float64 MCCTest.VType7::f233 - IL_122f: add - IL_1230: stfld float64 MCCTest.VType7::f233 - IL_1235: ldarg.0 - IL_1236: dup - IL_1237: ldfld float64 MCCTest.VType7::f234 - IL_123c: ldarga.s val - IL_123e: ldfld float64 MCCTest.VType7::f234 - IL_1243: add - IL_1244: stfld float64 MCCTest.VType7::f234 - IL_1249: ldarg.0 - IL_124a: dup - IL_124b: ldfld float64 MCCTest.VType7::f235 - IL_1250: ldarga.s val - IL_1252: ldfld float64 MCCTest.VType7::f235 - IL_1257: add - IL_1258: stfld float64 MCCTest.VType7::f235 - IL_125d: ldarg.0 - IL_125e: dup - IL_125f: ldfld float64 MCCTest.VType7::f236 - IL_1264: ldarga.s val - IL_1266: ldfld float64 MCCTest.VType7::f236 - IL_126b: add - IL_126c: stfld float64 MCCTest.VType7::f236 - IL_1271: ldarg.0 - IL_1272: dup - IL_1273: ldfld float64 MCCTest.VType7::f237 - IL_1278: ldarga.s val - IL_127a: ldfld float64 MCCTest.VType7::f237 - IL_127f: add - IL_1280: stfld float64 MCCTest.VType7::f237 - IL_1285: ldarg.0 - IL_1286: dup - IL_1287: ldfld float64 MCCTest.VType7::f238 - IL_128c: ldarga.s val - IL_128e: ldfld float64 MCCTest.VType7::f238 - IL_1293: add - IL_1294: stfld float64 MCCTest.VType7::f238 - IL_1299: ldarg.0 - IL_129a: dup - IL_129b: ldfld float64 MCCTest.VType7::f239 - IL_12a0: ldarga.s val - IL_12a2: ldfld float64 MCCTest.VType7::f239 - IL_12a7: add - IL_12a8: stfld float64 MCCTest.VType7::f239 - IL_12ad: ldarg.0 - IL_12ae: dup - IL_12af: ldfld float64 MCCTest.VType7::f240 - IL_12b4: ldarga.s val - IL_12b6: ldfld float64 MCCTest.VType7::f240 - IL_12bb: add - IL_12bc: stfld float64 MCCTest.VType7::f240 - IL_12c1: ldarg.0 - IL_12c2: dup - IL_12c3: ldfld float64 MCCTest.VType7::f241 - IL_12c8: ldarga.s val - IL_12ca: ldfld float64 MCCTest.VType7::f241 - IL_12cf: add - IL_12d0: stfld float64 MCCTest.VType7::f241 - IL_12d5: ldarg.0 - IL_12d6: dup - IL_12d7: ldfld float64 MCCTest.VType7::f242 - IL_12dc: ldarga.s val - IL_12de: ldfld float64 MCCTest.VType7::f242 - IL_12e3: add - IL_12e4: stfld float64 MCCTest.VType7::f242 - IL_12e9: ldarg.0 - IL_12ea: dup - IL_12eb: ldfld float64 MCCTest.VType7::f243 - IL_12f0: ldarga.s val - IL_12f2: ldfld float64 MCCTest.VType7::f243 - IL_12f7: add - IL_12f8: stfld float64 MCCTest.VType7::f243 - IL_12fd: ldarg.0 - IL_12fe: dup - IL_12ff: ldfld float64 MCCTest.VType7::f244 - IL_1304: ldarga.s val - IL_1306: ldfld float64 MCCTest.VType7::f244 - IL_130b: add - IL_130c: stfld float64 MCCTest.VType7::f244 - IL_1311: ldarg.0 - IL_1312: dup - IL_1313: ldfld float64 MCCTest.VType7::f245 - IL_1318: ldarga.s val - IL_131a: ldfld float64 MCCTest.VType7::f245 - IL_131f: add - IL_1320: stfld float64 MCCTest.VType7::f245 - IL_1325: ldarg.0 - IL_1326: dup - IL_1327: ldfld float64 MCCTest.VType7::f246 - IL_132c: ldarga.s val - IL_132e: ldfld float64 MCCTest.VType7::f246 - IL_1333: add - IL_1334: stfld float64 MCCTest.VType7::f246 - IL_1339: ldarg.0 - IL_133a: dup - IL_133b: ldfld float64 MCCTest.VType7::f247 - IL_1340: ldarga.s val - IL_1342: ldfld float64 MCCTest.VType7::f247 - IL_1347: add - IL_1348: stfld float64 MCCTest.VType7::f247 - IL_134d: ldarg.0 - IL_134e: dup - IL_134f: ldfld float64 MCCTest.VType7::f248 - IL_1354: ldarga.s val - IL_1356: ldfld float64 MCCTest.VType7::f248 - IL_135b: add - IL_135c: stfld float64 MCCTest.VType7::f248 - IL_1361: ldarg.0 - IL_1362: dup - IL_1363: ldfld float64 MCCTest.VType7::f249 - IL_1368: ldarga.s val - IL_136a: ldfld float64 MCCTest.VType7::f249 - IL_136f: add - IL_1370: stfld float64 MCCTest.VType7::f249 - IL_1375: ldarg.0 - IL_1376: dup - IL_1377: ldfld float64 MCCTest.VType7::f250 - IL_137c: ldarga.s val - IL_137e: ldfld float64 MCCTest.VType7::f250 - IL_1383: add - IL_1384: stfld float64 MCCTest.VType7::f250 - IL_1389: ldarg.0 - IL_138a: dup - IL_138b: ldfld float64 MCCTest.VType7::f251 - IL_1390: ldarga.s val - IL_1392: ldfld float64 MCCTest.VType7::f251 - IL_1397: add - IL_1398: stfld float64 MCCTest.VType7::f251 - IL_139d: ldarg.0 - IL_139e: dup - IL_139f: ldfld float64 MCCTest.VType7::f252 - IL_13a4: ldarga.s val - IL_13a6: ldfld float64 MCCTest.VType7::f252 - IL_13ab: add - IL_13ac: stfld float64 MCCTest.VType7::f252 - IL_13b1: ldarg.0 - IL_13b2: dup - IL_13b3: ldfld float64 MCCTest.VType7::f253 - IL_13b8: ldarga.s val - IL_13ba: ldfld float64 MCCTest.VType7::f253 - IL_13bf: add - IL_13c0: stfld float64 MCCTest.VType7::f253 - IL_13c5: ldarg.0 - IL_13c6: dup - IL_13c7: ldfld float64 MCCTest.VType7::f254 - IL_13cc: ldarga.s val - IL_13ce: ldfld float64 MCCTest.VType7::f254 - IL_13d3: add - IL_13d4: stfld float64 MCCTest.VType7::f254 - IL_13d9: ldarg.0 - IL_13da: dup - IL_13db: ldfld float64 MCCTest.VType7::f255 - IL_13e0: ldarga.s val - IL_13e2: ldfld float64 MCCTest.VType7::f255 - IL_13e7: add - IL_13e8: stfld float64 MCCTest.VType7::f255 - IL_13ed: ldarg.0 - IL_13ee: dup - IL_13ef: ldfld float64 MCCTest.VType7::f256 - IL_13f4: ldarga.s val - IL_13f6: ldfld float64 MCCTest.VType7::f256 - IL_13fb: add - IL_13fc: stfld float64 MCCTest.VType7::f256 - IL_1401: ldarg.0 - IL_1402: dup - IL_1403: ldfld float64 MCCTest.VType7::f257 - IL_1408: ldarga.s val - IL_140a: ldfld float64 MCCTest.VType7::f257 - IL_140f: add - IL_1410: stfld float64 MCCTest.VType7::f257 - IL_1415: ret - } // end of method VType7::Add - - .method public hidebysig newslot virtual final - instance void Check(valuetype MCCTest.VType7 expected) cil managed - { - // Code size 11310 (0x2c2e) - .maxstack 4 - .locals init (bool V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldfld float64 MCCTest.VType7::f1 - IL_0007: ldarga.s expected - IL_0009: ldfld float64 MCCTest.VType7::f1 - IL_000e: ceq - IL_0010: stloc.0 - IL_0011: ldloc.0 - IL_0012: brtrue.s IL_002d - - IL_0014: nop - IL_0015: ldstr "f1" - IL_001a: ldarg.0 - IL_001b: ldfld float64 MCCTest.VType7::f1 - IL_0020: ldarga.s expected - IL_0022: ldfld float64 MCCTest.VType7::f1 - IL_0027: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_002c: throw - - IL_002d: ldarg.0 - IL_002e: ldfld float64 MCCTest.VType7::f2 - IL_0033: ldarga.s expected - IL_0035: ldfld float64 MCCTest.VType7::f2 - IL_003a: ceq - IL_003c: stloc.0 - IL_003d: ldloc.0 - IL_003e: brtrue.s IL_0059 - - IL_0040: nop - IL_0041: ldstr "f2" - IL_0046: ldarg.0 - IL_0047: ldfld float64 MCCTest.VType7::f2 - IL_004c: ldarga.s expected - IL_004e: ldfld float64 MCCTest.VType7::f2 - IL_0053: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0058: throw - - IL_0059: ldarg.0 - IL_005a: ldfld float64 MCCTest.VType7::f3 - IL_005f: ldarga.s expected - IL_0061: ldfld float64 MCCTest.VType7::f3 - IL_0066: ceq - IL_0068: stloc.0 - IL_0069: ldloc.0 - IL_006a: brtrue.s IL_0085 - - IL_006c: nop - IL_006d: ldstr "f3" - IL_0072: ldarg.0 - IL_0073: ldfld float64 MCCTest.VType7::f3 - IL_0078: ldarga.s expected - IL_007a: ldfld float64 MCCTest.VType7::f3 - IL_007f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0084: throw - - IL_0085: ldarg.0 - IL_0086: ldfld float64 MCCTest.VType7::f4 - IL_008b: ldarga.s expected - IL_008d: ldfld float64 MCCTest.VType7::f4 - IL_0092: ceq - IL_0094: stloc.0 - IL_0095: ldloc.0 - IL_0096: brtrue.s IL_00b1 - - IL_0098: nop - IL_0099: ldstr "f4" - IL_009e: ldarg.0 - IL_009f: ldfld float64 MCCTest.VType7::f4 - IL_00a4: ldarga.s expected - IL_00a6: ldfld float64 MCCTest.VType7::f4 - IL_00ab: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_00b0: throw - - IL_00b1: ldarg.0 - IL_00b2: ldfld float64 MCCTest.VType7::f5 - IL_00b7: ldarga.s expected - IL_00b9: ldfld float64 MCCTest.VType7::f5 - IL_00be: ceq - IL_00c0: stloc.0 - IL_00c1: ldloc.0 - IL_00c2: brtrue.s IL_00dd - - IL_00c4: nop - IL_00c5: ldstr "f5" - IL_00ca: ldarg.0 - IL_00cb: ldfld float64 MCCTest.VType7::f5 - IL_00d0: ldarga.s expected - IL_00d2: ldfld float64 MCCTest.VType7::f5 - IL_00d7: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_00dc: throw - - IL_00dd: ldarg.0 - IL_00de: ldfld float64 MCCTest.VType7::f6 - IL_00e3: ldarga.s expected - IL_00e5: ldfld float64 MCCTest.VType7::f6 - IL_00ea: ceq - IL_00ec: stloc.0 - IL_00ed: ldloc.0 - IL_00ee: brtrue.s IL_0109 - - IL_00f0: nop - IL_00f1: ldstr "f6" - IL_00f6: ldarg.0 - IL_00f7: ldfld float64 MCCTest.VType7::f6 - IL_00fc: ldarga.s expected - IL_00fe: ldfld float64 MCCTest.VType7::f6 - IL_0103: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0108: throw - - IL_0109: ldarg.0 - IL_010a: ldfld float64 MCCTest.VType7::f7 - IL_010f: ldarga.s expected - IL_0111: ldfld float64 MCCTest.VType7::f7 - IL_0116: ceq - IL_0118: stloc.0 - IL_0119: ldloc.0 - IL_011a: brtrue.s IL_0135 - - IL_011c: nop - IL_011d: ldstr "f7" - IL_0122: ldarg.0 - IL_0123: ldfld float64 MCCTest.VType7::f7 - IL_0128: ldarga.s expected - IL_012a: ldfld float64 MCCTest.VType7::f7 - IL_012f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0134: throw - - IL_0135: ldarg.0 - IL_0136: ldfld float64 MCCTest.VType7::f8 - IL_013b: ldarga.s expected - IL_013d: ldfld float64 MCCTest.VType7::f8 - IL_0142: ceq - IL_0144: stloc.0 - IL_0145: ldloc.0 - IL_0146: brtrue.s IL_0161 - - IL_0148: nop - IL_0149: ldstr "f8" - IL_014e: ldarg.0 - IL_014f: ldfld float64 MCCTest.VType7::f8 - IL_0154: ldarga.s expected - IL_0156: ldfld float64 MCCTest.VType7::f8 - IL_015b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0160: throw - - IL_0161: ldarg.0 - IL_0162: ldfld float64 MCCTest.VType7::f9 - IL_0167: ldarga.s expected - IL_0169: ldfld float64 MCCTest.VType7::f9 - IL_016e: ceq - IL_0170: stloc.0 - IL_0171: ldloc.0 - IL_0172: brtrue.s IL_018d - - IL_0174: nop - IL_0175: ldstr "f9" - IL_017a: ldarg.0 - IL_017b: ldfld float64 MCCTest.VType7::f9 - IL_0180: ldarga.s expected - IL_0182: ldfld float64 MCCTest.VType7::f9 - IL_0187: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_018c: throw - - IL_018d: ldarg.0 - IL_018e: ldfld float64 MCCTest.VType7::f10 - IL_0193: ldarga.s expected - IL_0195: ldfld float64 MCCTest.VType7::f10 - IL_019a: ceq - IL_019c: stloc.0 - IL_019d: ldloc.0 - IL_019e: brtrue.s IL_01b9 - - IL_01a0: nop - IL_01a1: ldstr "f10" - IL_01a6: ldarg.0 - IL_01a7: ldfld float64 MCCTest.VType7::f10 - IL_01ac: ldarga.s expected - IL_01ae: ldfld float64 MCCTest.VType7::f10 - IL_01b3: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_01b8: throw - - IL_01b9: ldarg.0 - IL_01ba: ldfld float64 MCCTest.VType7::f11 - IL_01bf: ldarga.s expected - IL_01c1: ldfld float64 MCCTest.VType7::f11 - IL_01c6: ceq - IL_01c8: stloc.0 - IL_01c9: ldloc.0 - IL_01ca: brtrue.s IL_01e5 - - IL_01cc: nop - IL_01cd: ldstr "f11" - IL_01d2: ldarg.0 - IL_01d3: ldfld float64 MCCTest.VType7::f11 - IL_01d8: ldarga.s expected - IL_01da: ldfld float64 MCCTest.VType7::f11 - IL_01df: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_01e4: throw - - IL_01e5: ldarg.0 - IL_01e6: ldfld float64 MCCTest.VType7::f12 - IL_01eb: ldarga.s expected - IL_01ed: ldfld float64 MCCTest.VType7::f12 - IL_01f2: ceq - IL_01f4: stloc.0 - IL_01f5: ldloc.0 - IL_01f6: brtrue.s IL_0211 - - IL_01f8: nop - IL_01f9: ldstr "f12" - IL_01fe: ldarg.0 - IL_01ff: ldfld float64 MCCTest.VType7::f12 - IL_0204: ldarga.s expected - IL_0206: ldfld float64 MCCTest.VType7::f12 - IL_020b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0210: throw - - IL_0211: ldarg.0 - IL_0212: ldfld float64 MCCTest.VType7::f13 - IL_0217: ldarga.s expected - IL_0219: ldfld float64 MCCTest.VType7::f13 - IL_021e: ceq - IL_0220: stloc.0 - IL_0221: ldloc.0 - IL_0222: brtrue.s IL_023d - - IL_0224: nop - IL_0225: ldstr "f13" - IL_022a: ldarg.0 - IL_022b: ldfld float64 MCCTest.VType7::f13 - IL_0230: ldarga.s expected - IL_0232: ldfld float64 MCCTest.VType7::f13 - IL_0237: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_023c: throw - - IL_023d: ldarg.0 - IL_023e: ldfld float64 MCCTest.VType7::f14 - IL_0243: ldarga.s expected - IL_0245: ldfld float64 MCCTest.VType7::f14 - IL_024a: ceq - IL_024c: stloc.0 - IL_024d: ldloc.0 - IL_024e: brtrue.s IL_0269 - - IL_0250: nop - IL_0251: ldstr "f14" - IL_0256: ldarg.0 - IL_0257: ldfld float64 MCCTest.VType7::f14 - IL_025c: ldarga.s expected - IL_025e: ldfld float64 MCCTest.VType7::f14 - IL_0263: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0268: throw - - IL_0269: ldarg.0 - IL_026a: ldfld float64 MCCTest.VType7::f15 - IL_026f: ldarga.s expected - IL_0271: ldfld float64 MCCTest.VType7::f15 - IL_0276: ceq - IL_0278: stloc.0 - IL_0279: ldloc.0 - IL_027a: brtrue.s IL_0295 - - IL_027c: nop - IL_027d: ldstr "f15" - IL_0282: ldarg.0 - IL_0283: ldfld float64 MCCTest.VType7::f15 - IL_0288: ldarga.s expected - IL_028a: ldfld float64 MCCTest.VType7::f15 - IL_028f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0294: throw - - IL_0295: ldarg.0 - IL_0296: ldfld float64 MCCTest.VType7::f16 - IL_029b: ldarga.s expected - IL_029d: ldfld float64 MCCTest.VType7::f16 - IL_02a2: ceq - IL_02a4: stloc.0 - IL_02a5: ldloc.0 - IL_02a6: brtrue.s IL_02c1 - - IL_02a8: nop - IL_02a9: ldstr "f16" - IL_02ae: ldarg.0 - IL_02af: ldfld float64 MCCTest.VType7::f16 - IL_02b4: ldarga.s expected - IL_02b6: ldfld float64 MCCTest.VType7::f16 - IL_02bb: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_02c0: throw - - IL_02c1: ldarg.0 - IL_02c2: ldfld float64 MCCTest.VType7::f17 - IL_02c7: ldarga.s expected - IL_02c9: ldfld float64 MCCTest.VType7::f17 - IL_02ce: ceq - IL_02d0: stloc.0 - IL_02d1: ldloc.0 - IL_02d2: brtrue.s IL_02ed - - IL_02d4: nop - IL_02d5: ldstr "f17" - IL_02da: ldarg.0 - IL_02db: ldfld float64 MCCTest.VType7::f17 - IL_02e0: ldarga.s expected - IL_02e2: ldfld float64 MCCTest.VType7::f17 - IL_02e7: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_02ec: throw - - IL_02ed: ldarg.0 - IL_02ee: ldfld float64 MCCTest.VType7::f18 - IL_02f3: ldarga.s expected - IL_02f5: ldfld float64 MCCTest.VType7::f18 - IL_02fa: ceq - IL_02fc: stloc.0 - IL_02fd: ldloc.0 - IL_02fe: brtrue.s IL_0319 - - IL_0300: nop - IL_0301: ldstr "f18" - IL_0306: ldarg.0 - IL_0307: ldfld float64 MCCTest.VType7::f18 - IL_030c: ldarga.s expected - IL_030e: ldfld float64 MCCTest.VType7::f18 - IL_0313: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0318: throw - - IL_0319: ldarg.0 - IL_031a: ldfld float64 MCCTest.VType7::f19 - IL_031f: ldarga.s expected - IL_0321: ldfld float64 MCCTest.VType7::f19 - IL_0326: ceq - IL_0328: stloc.0 - IL_0329: ldloc.0 - IL_032a: brtrue.s IL_0345 - - IL_032c: nop - IL_032d: ldstr "f19" - IL_0332: ldarg.0 - IL_0333: ldfld float64 MCCTest.VType7::f19 - IL_0338: ldarga.s expected - IL_033a: ldfld float64 MCCTest.VType7::f19 - IL_033f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0344: throw - - IL_0345: ldarg.0 - IL_0346: ldfld float64 MCCTest.VType7::f20 - IL_034b: ldarga.s expected - IL_034d: ldfld float64 MCCTest.VType7::f20 - IL_0352: ceq - IL_0354: stloc.0 - IL_0355: ldloc.0 - IL_0356: brtrue.s IL_0371 - - IL_0358: nop - IL_0359: ldstr "f20" - IL_035e: ldarg.0 - IL_035f: ldfld float64 MCCTest.VType7::f20 - IL_0364: ldarga.s expected - IL_0366: ldfld float64 MCCTest.VType7::f20 - IL_036b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0370: throw - - IL_0371: ldarg.0 - IL_0372: ldfld float64 MCCTest.VType7::f21 - IL_0377: ldarga.s expected - IL_0379: ldfld float64 MCCTest.VType7::f21 - IL_037e: ceq - IL_0380: stloc.0 - IL_0381: ldloc.0 - IL_0382: brtrue.s IL_039d - - IL_0384: nop - IL_0385: ldstr "f21" - IL_038a: ldarg.0 - IL_038b: ldfld float64 MCCTest.VType7::f21 - IL_0390: ldarga.s expected - IL_0392: ldfld float64 MCCTest.VType7::f21 - IL_0397: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_039c: throw - - IL_039d: ldarg.0 - IL_039e: ldfld float64 MCCTest.VType7::f22 - IL_03a3: ldarga.s expected - IL_03a5: ldfld float64 MCCTest.VType7::f22 - IL_03aa: ceq - IL_03ac: stloc.0 - IL_03ad: ldloc.0 - IL_03ae: brtrue.s IL_03c9 - - IL_03b0: nop - IL_03b1: ldstr "f22" - IL_03b6: ldarg.0 - IL_03b7: ldfld float64 MCCTest.VType7::f22 - IL_03bc: ldarga.s expected - IL_03be: ldfld float64 MCCTest.VType7::f22 - IL_03c3: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_03c8: throw - - IL_03c9: ldarg.0 - IL_03ca: ldfld float64 MCCTest.VType7::f23 - IL_03cf: ldarga.s expected - IL_03d1: ldfld float64 MCCTest.VType7::f23 - IL_03d6: ceq - IL_03d8: stloc.0 - IL_03d9: ldloc.0 - IL_03da: brtrue.s IL_03f5 - - IL_03dc: nop - IL_03dd: ldstr "f23" - IL_03e2: ldarg.0 - IL_03e3: ldfld float64 MCCTest.VType7::f23 - IL_03e8: ldarga.s expected - IL_03ea: ldfld float64 MCCTest.VType7::f23 - IL_03ef: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_03f4: throw - - IL_03f5: ldarg.0 - IL_03f6: ldfld float64 MCCTest.VType7::f24 - IL_03fb: ldarga.s expected - IL_03fd: ldfld float64 MCCTest.VType7::f24 - IL_0402: ceq - IL_0404: stloc.0 - IL_0405: ldloc.0 - IL_0406: brtrue.s IL_0421 - - IL_0408: nop - IL_0409: ldstr "f24" - IL_040e: ldarg.0 - IL_040f: ldfld float64 MCCTest.VType7::f24 - IL_0414: ldarga.s expected - IL_0416: ldfld float64 MCCTest.VType7::f24 - IL_041b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0420: throw - - IL_0421: ldarg.0 - IL_0422: ldfld float64 MCCTest.VType7::f25 - IL_0427: ldarga.s expected - IL_0429: ldfld float64 MCCTest.VType7::f25 - IL_042e: ceq - IL_0430: stloc.0 - IL_0431: ldloc.0 - IL_0432: brtrue.s IL_044d - - IL_0434: nop - IL_0435: ldstr "f25" - IL_043a: ldarg.0 - IL_043b: ldfld float64 MCCTest.VType7::f25 - IL_0440: ldarga.s expected - IL_0442: ldfld float64 MCCTest.VType7::f25 - IL_0447: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_044c: throw - - IL_044d: ldarg.0 - IL_044e: ldfld float64 MCCTest.VType7::f26 - IL_0453: ldarga.s expected - IL_0455: ldfld float64 MCCTest.VType7::f26 - IL_045a: ceq - IL_045c: stloc.0 - IL_045d: ldloc.0 - IL_045e: brtrue.s IL_0479 - - IL_0460: nop - IL_0461: ldstr "f26" - IL_0466: ldarg.0 - IL_0467: ldfld float64 MCCTest.VType7::f26 - IL_046c: ldarga.s expected - IL_046e: ldfld float64 MCCTest.VType7::f26 - IL_0473: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0478: throw - - IL_0479: ldarg.0 - IL_047a: ldfld float64 MCCTest.VType7::f27 - IL_047f: ldarga.s expected - IL_0481: ldfld float64 MCCTest.VType7::f27 - IL_0486: ceq - IL_0488: stloc.0 - IL_0489: ldloc.0 - IL_048a: brtrue.s IL_04a5 - - IL_048c: nop - IL_048d: ldstr "f27" - IL_0492: ldarg.0 - IL_0493: ldfld float64 MCCTest.VType7::f27 - IL_0498: ldarga.s expected - IL_049a: ldfld float64 MCCTest.VType7::f27 - IL_049f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_04a4: throw - - IL_04a5: ldarg.0 - IL_04a6: ldfld float64 MCCTest.VType7::f28 - IL_04ab: ldarga.s expected - IL_04ad: ldfld float64 MCCTest.VType7::f28 - IL_04b2: ceq - IL_04b4: stloc.0 - IL_04b5: ldloc.0 - IL_04b6: brtrue.s IL_04d1 - - IL_04b8: nop - IL_04b9: ldstr "f28" - IL_04be: ldarg.0 - IL_04bf: ldfld float64 MCCTest.VType7::f28 - IL_04c4: ldarga.s expected - IL_04c6: ldfld float64 MCCTest.VType7::f28 - IL_04cb: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_04d0: throw - - IL_04d1: ldarg.0 - IL_04d2: ldfld float64 MCCTest.VType7::f29 - IL_04d7: ldarga.s expected - IL_04d9: ldfld float64 MCCTest.VType7::f29 - IL_04de: ceq - IL_04e0: stloc.0 - IL_04e1: ldloc.0 - IL_04e2: brtrue.s IL_04fd - - IL_04e4: nop - IL_04e5: ldstr "f29" - IL_04ea: ldarg.0 - IL_04eb: ldfld float64 MCCTest.VType7::f29 - IL_04f0: ldarga.s expected - IL_04f2: ldfld float64 MCCTest.VType7::f29 - IL_04f7: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_04fc: throw - - IL_04fd: ldarg.0 - IL_04fe: ldfld float64 MCCTest.VType7::f30 - IL_0503: ldarga.s expected - IL_0505: ldfld float64 MCCTest.VType7::f30 - IL_050a: ceq - IL_050c: stloc.0 - IL_050d: ldloc.0 - IL_050e: brtrue.s IL_0529 - - IL_0510: nop - IL_0511: ldstr "f30" - IL_0516: ldarg.0 - IL_0517: ldfld float64 MCCTest.VType7::f30 - IL_051c: ldarga.s expected - IL_051e: ldfld float64 MCCTest.VType7::f30 - IL_0523: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0528: throw - - IL_0529: ldarg.0 - IL_052a: ldfld float64 MCCTest.VType7::f31 - IL_052f: ldarga.s expected - IL_0531: ldfld float64 MCCTest.VType7::f31 - IL_0536: ceq - IL_0538: stloc.0 - IL_0539: ldloc.0 - IL_053a: brtrue.s IL_0555 - - IL_053c: nop - IL_053d: ldstr "f31" - IL_0542: ldarg.0 - IL_0543: ldfld float64 MCCTest.VType7::f31 - IL_0548: ldarga.s expected - IL_054a: ldfld float64 MCCTest.VType7::f31 - IL_054f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0554: throw - - IL_0555: ldarg.0 - IL_0556: ldfld float64 MCCTest.VType7::f32 - IL_055b: ldarga.s expected - IL_055d: ldfld float64 MCCTest.VType7::f32 - IL_0562: ceq - IL_0564: stloc.0 - IL_0565: ldloc.0 - IL_0566: brtrue.s IL_0581 - - IL_0568: nop - IL_0569: ldstr "f32" - IL_056e: ldarg.0 - IL_056f: ldfld float64 MCCTest.VType7::f32 - IL_0574: ldarga.s expected - IL_0576: ldfld float64 MCCTest.VType7::f32 - IL_057b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0580: throw - - IL_0581: ldarg.0 - IL_0582: ldfld float64 MCCTest.VType7::f33 - IL_0587: ldarga.s expected - IL_0589: ldfld float64 MCCTest.VType7::f33 - IL_058e: ceq - IL_0590: stloc.0 - IL_0591: ldloc.0 - IL_0592: brtrue.s IL_05ad - - IL_0594: nop - IL_0595: ldstr "f33" - IL_059a: ldarg.0 - IL_059b: ldfld float64 MCCTest.VType7::f33 - IL_05a0: ldarga.s expected - IL_05a2: ldfld float64 MCCTest.VType7::f33 - IL_05a7: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_05ac: throw - - IL_05ad: ldarg.0 - IL_05ae: ldfld float64 MCCTest.VType7::f34 - IL_05b3: ldarga.s expected - IL_05b5: ldfld float64 MCCTest.VType7::f34 - IL_05ba: ceq - IL_05bc: stloc.0 - IL_05bd: ldloc.0 - IL_05be: brtrue.s IL_05d9 - - IL_05c0: nop - IL_05c1: ldstr "f34" - IL_05c6: ldarg.0 - IL_05c7: ldfld float64 MCCTest.VType7::f34 - IL_05cc: ldarga.s expected - IL_05ce: ldfld float64 MCCTest.VType7::f34 - IL_05d3: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_05d8: throw - - IL_05d9: ldarg.0 - IL_05da: ldfld float64 MCCTest.VType7::f35 - IL_05df: ldarga.s expected - IL_05e1: ldfld float64 MCCTest.VType7::f35 - IL_05e6: ceq - IL_05e8: stloc.0 - IL_05e9: ldloc.0 - IL_05ea: brtrue.s IL_0605 - - IL_05ec: nop - IL_05ed: ldstr "f35" - IL_05f2: ldarg.0 - IL_05f3: ldfld float64 MCCTest.VType7::f35 - IL_05f8: ldarga.s expected - IL_05fa: ldfld float64 MCCTest.VType7::f35 - IL_05ff: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0604: throw - - IL_0605: ldarg.0 - IL_0606: ldfld float64 MCCTest.VType7::f36 - IL_060b: ldarga.s expected - IL_060d: ldfld float64 MCCTest.VType7::f36 - IL_0612: ceq - IL_0614: stloc.0 - IL_0615: ldloc.0 - IL_0616: brtrue.s IL_0631 - - IL_0618: nop - IL_0619: ldstr "f36" - IL_061e: ldarg.0 - IL_061f: ldfld float64 MCCTest.VType7::f36 - IL_0624: ldarga.s expected - IL_0626: ldfld float64 MCCTest.VType7::f36 - IL_062b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0630: throw - - IL_0631: ldarg.0 - IL_0632: ldfld float64 MCCTest.VType7::f37 - IL_0637: ldarga.s expected - IL_0639: ldfld float64 MCCTest.VType7::f37 - IL_063e: ceq - IL_0640: stloc.0 - IL_0641: ldloc.0 - IL_0642: brtrue.s IL_065d - - IL_0644: nop - IL_0645: ldstr "f37" - IL_064a: ldarg.0 - IL_064b: ldfld float64 MCCTest.VType7::f37 - IL_0650: ldarga.s expected - IL_0652: ldfld float64 MCCTest.VType7::f37 - IL_0657: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_065c: throw - - IL_065d: ldarg.0 - IL_065e: ldfld float64 MCCTest.VType7::f38 - IL_0663: ldarga.s expected - IL_0665: ldfld float64 MCCTest.VType7::f38 - IL_066a: ceq - IL_066c: stloc.0 - IL_066d: ldloc.0 - IL_066e: brtrue.s IL_0689 - - IL_0670: nop - IL_0671: ldstr "f38" - IL_0676: ldarg.0 - IL_0677: ldfld float64 MCCTest.VType7::f38 - IL_067c: ldarga.s expected - IL_067e: ldfld float64 MCCTest.VType7::f38 - IL_0683: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0688: throw - - IL_0689: ldarg.0 - IL_068a: ldfld float64 MCCTest.VType7::f39 - IL_068f: ldarga.s expected - IL_0691: ldfld float64 MCCTest.VType7::f39 - IL_0696: ceq - IL_0698: stloc.0 - IL_0699: ldloc.0 - IL_069a: brtrue.s IL_06b5 - - IL_069c: nop - IL_069d: ldstr "f39" - IL_06a2: ldarg.0 - IL_06a3: ldfld float64 MCCTest.VType7::f39 - IL_06a8: ldarga.s expected - IL_06aa: ldfld float64 MCCTest.VType7::f39 - IL_06af: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_06b4: throw - - IL_06b5: ldarg.0 - IL_06b6: ldfld float64 MCCTest.VType7::f40 - IL_06bb: ldarga.s expected - IL_06bd: ldfld float64 MCCTest.VType7::f40 - IL_06c2: ceq - IL_06c4: stloc.0 - IL_06c5: ldloc.0 - IL_06c6: brtrue.s IL_06e1 - - IL_06c8: nop - IL_06c9: ldstr "f40" - IL_06ce: ldarg.0 - IL_06cf: ldfld float64 MCCTest.VType7::f40 - IL_06d4: ldarga.s expected - IL_06d6: ldfld float64 MCCTest.VType7::f40 - IL_06db: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_06e0: throw - - IL_06e1: ldarg.0 - IL_06e2: ldfld float64 MCCTest.VType7::f41 - IL_06e7: ldarga.s expected - IL_06e9: ldfld float64 MCCTest.VType7::f41 - IL_06ee: ceq - IL_06f0: stloc.0 - IL_06f1: ldloc.0 - IL_06f2: brtrue.s IL_070d - - IL_06f4: nop - IL_06f5: ldstr "f41" - IL_06fa: ldarg.0 - IL_06fb: ldfld float64 MCCTest.VType7::f41 - IL_0700: ldarga.s expected - IL_0702: ldfld float64 MCCTest.VType7::f41 - IL_0707: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_070c: throw - - IL_070d: ldarg.0 - IL_070e: ldfld float64 MCCTest.VType7::f42 - IL_0713: ldarga.s expected - IL_0715: ldfld float64 MCCTest.VType7::f42 - IL_071a: ceq - IL_071c: stloc.0 - IL_071d: ldloc.0 - IL_071e: brtrue.s IL_0739 - - IL_0720: nop - IL_0721: ldstr "f42" - IL_0726: ldarg.0 - IL_0727: ldfld float64 MCCTest.VType7::f42 - IL_072c: ldarga.s expected - IL_072e: ldfld float64 MCCTest.VType7::f42 - IL_0733: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0738: throw - - IL_0739: ldarg.0 - IL_073a: ldfld float64 MCCTest.VType7::f43 - IL_073f: ldarga.s expected - IL_0741: ldfld float64 MCCTest.VType7::f43 - IL_0746: ceq - IL_0748: stloc.0 - IL_0749: ldloc.0 - IL_074a: brtrue.s IL_0765 - - IL_074c: nop - IL_074d: ldstr "f43" - IL_0752: ldarg.0 - IL_0753: ldfld float64 MCCTest.VType7::f43 - IL_0758: ldarga.s expected - IL_075a: ldfld float64 MCCTest.VType7::f43 - IL_075f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0764: throw - - IL_0765: ldarg.0 - IL_0766: ldfld float64 MCCTest.VType7::f44 - IL_076b: ldarga.s expected - IL_076d: ldfld float64 MCCTest.VType7::f44 - IL_0772: ceq - IL_0774: stloc.0 - IL_0775: ldloc.0 - IL_0776: brtrue.s IL_0791 - - IL_0778: nop - IL_0779: ldstr "f44" - IL_077e: ldarg.0 - IL_077f: ldfld float64 MCCTest.VType7::f44 - IL_0784: ldarga.s expected - IL_0786: ldfld float64 MCCTest.VType7::f44 - IL_078b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0790: throw - - IL_0791: ldarg.0 - IL_0792: ldfld float64 MCCTest.VType7::f45 - IL_0797: ldarga.s expected - IL_0799: ldfld float64 MCCTest.VType7::f45 - IL_079e: ceq - IL_07a0: stloc.0 - IL_07a1: ldloc.0 - IL_07a2: brtrue.s IL_07bd - - IL_07a4: nop - IL_07a5: ldstr "f45" - IL_07aa: ldarg.0 - IL_07ab: ldfld float64 MCCTest.VType7::f45 - IL_07b0: ldarga.s expected - IL_07b2: ldfld float64 MCCTest.VType7::f45 - IL_07b7: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_07bc: throw - - IL_07bd: ldarg.0 - IL_07be: ldfld float64 MCCTest.VType7::f46 - IL_07c3: ldarga.s expected - IL_07c5: ldfld float64 MCCTest.VType7::f46 - IL_07ca: ceq - IL_07cc: stloc.0 - IL_07cd: ldloc.0 - IL_07ce: brtrue.s IL_07e9 - - IL_07d0: nop - IL_07d1: ldstr "f46" - IL_07d6: ldarg.0 - IL_07d7: ldfld float64 MCCTest.VType7::f46 - IL_07dc: ldarga.s expected - IL_07de: ldfld float64 MCCTest.VType7::f46 - IL_07e3: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_07e8: throw - - IL_07e9: ldarg.0 - IL_07ea: ldfld float64 MCCTest.VType7::f47 - IL_07ef: ldarga.s expected - IL_07f1: ldfld float64 MCCTest.VType7::f47 - IL_07f6: ceq - IL_07f8: stloc.0 - IL_07f9: ldloc.0 - IL_07fa: brtrue.s IL_0815 - - IL_07fc: nop - IL_07fd: ldstr "f47" - IL_0802: ldarg.0 - IL_0803: ldfld float64 MCCTest.VType7::f47 - IL_0808: ldarga.s expected - IL_080a: ldfld float64 MCCTest.VType7::f47 - IL_080f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0814: throw - - IL_0815: ldarg.0 - IL_0816: ldfld float64 MCCTest.VType7::f48 - IL_081b: ldarga.s expected - IL_081d: ldfld float64 MCCTest.VType7::f48 - IL_0822: ceq - IL_0824: stloc.0 - IL_0825: ldloc.0 - IL_0826: brtrue.s IL_0841 - - IL_0828: nop - IL_0829: ldstr "f48" - IL_082e: ldarg.0 - IL_082f: ldfld float64 MCCTest.VType7::f48 - IL_0834: ldarga.s expected - IL_0836: ldfld float64 MCCTest.VType7::f48 - IL_083b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0840: throw - - IL_0841: ldarg.0 - IL_0842: ldfld float64 MCCTest.VType7::f49 - IL_0847: ldarga.s expected - IL_0849: ldfld float64 MCCTest.VType7::f49 - IL_084e: ceq - IL_0850: stloc.0 - IL_0851: ldloc.0 - IL_0852: brtrue.s IL_086d - - IL_0854: nop - IL_0855: ldstr "f49" - IL_085a: ldarg.0 - IL_085b: ldfld float64 MCCTest.VType7::f49 - IL_0860: ldarga.s expected - IL_0862: ldfld float64 MCCTest.VType7::f49 - IL_0867: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_086c: throw - - IL_086d: ldarg.0 - IL_086e: ldfld float64 MCCTest.VType7::f50 - IL_0873: ldarga.s expected - IL_0875: ldfld float64 MCCTest.VType7::f50 - IL_087a: ceq - IL_087c: stloc.0 - IL_087d: ldloc.0 - IL_087e: brtrue.s IL_0899 - - IL_0880: nop - IL_0881: ldstr "f50" - IL_0886: ldarg.0 - IL_0887: ldfld float64 MCCTest.VType7::f50 - IL_088c: ldarga.s expected - IL_088e: ldfld float64 MCCTest.VType7::f50 - IL_0893: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0898: throw - - IL_0899: ldarg.0 - IL_089a: ldfld float64 MCCTest.VType7::f51 - IL_089f: ldarga.s expected - IL_08a1: ldfld float64 MCCTest.VType7::f51 - IL_08a6: ceq - IL_08a8: stloc.0 - IL_08a9: ldloc.0 - IL_08aa: brtrue.s IL_08c5 - - IL_08ac: nop - IL_08ad: ldstr "f51" - IL_08b2: ldarg.0 - IL_08b3: ldfld float64 MCCTest.VType7::f51 - IL_08b8: ldarga.s expected - IL_08ba: ldfld float64 MCCTest.VType7::f51 - IL_08bf: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_08c4: throw - - IL_08c5: ldarg.0 - IL_08c6: ldfld float64 MCCTest.VType7::f52 - IL_08cb: ldarga.s expected - IL_08cd: ldfld float64 MCCTest.VType7::f52 - IL_08d2: ceq - IL_08d4: stloc.0 - IL_08d5: ldloc.0 - IL_08d6: brtrue.s IL_08f1 - - IL_08d8: nop - IL_08d9: ldstr "f52" - IL_08de: ldarg.0 - IL_08df: ldfld float64 MCCTest.VType7::f52 - IL_08e4: ldarga.s expected - IL_08e6: ldfld float64 MCCTest.VType7::f52 - IL_08eb: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_08f0: throw - - IL_08f1: ldarg.0 - IL_08f2: ldfld float64 MCCTest.VType7::f53 - IL_08f7: ldarga.s expected - IL_08f9: ldfld float64 MCCTest.VType7::f53 - IL_08fe: ceq - IL_0900: stloc.0 - IL_0901: ldloc.0 - IL_0902: brtrue.s IL_091d - - IL_0904: nop - IL_0905: ldstr "f53" - IL_090a: ldarg.0 - IL_090b: ldfld float64 MCCTest.VType7::f53 - IL_0910: ldarga.s expected - IL_0912: ldfld float64 MCCTest.VType7::f53 - IL_0917: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_091c: throw - - IL_091d: ldarg.0 - IL_091e: ldfld float64 MCCTest.VType7::f54 - IL_0923: ldarga.s expected - IL_0925: ldfld float64 MCCTest.VType7::f54 - IL_092a: ceq - IL_092c: stloc.0 - IL_092d: ldloc.0 - IL_092e: brtrue.s IL_0949 - - IL_0930: nop - IL_0931: ldstr "f54" - IL_0936: ldarg.0 - IL_0937: ldfld float64 MCCTest.VType7::f54 - IL_093c: ldarga.s expected - IL_093e: ldfld float64 MCCTest.VType7::f54 - IL_0943: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0948: throw - - IL_0949: ldarg.0 - IL_094a: ldfld float64 MCCTest.VType7::f55 - IL_094f: ldarga.s expected - IL_0951: ldfld float64 MCCTest.VType7::f55 - IL_0956: ceq - IL_0958: stloc.0 - IL_0959: ldloc.0 - IL_095a: brtrue.s IL_0975 - - IL_095c: nop - IL_095d: ldstr "f55" - IL_0962: ldarg.0 - IL_0963: ldfld float64 MCCTest.VType7::f55 - IL_0968: ldarga.s expected - IL_096a: ldfld float64 MCCTest.VType7::f55 - IL_096f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0974: throw - - IL_0975: ldarg.0 - IL_0976: ldfld float64 MCCTest.VType7::f56 - IL_097b: ldarga.s expected - IL_097d: ldfld float64 MCCTest.VType7::f56 - IL_0982: ceq - IL_0984: stloc.0 - IL_0985: ldloc.0 - IL_0986: brtrue.s IL_09a1 - - IL_0988: nop - IL_0989: ldstr "f56" - IL_098e: ldarg.0 - IL_098f: ldfld float64 MCCTest.VType7::f56 - IL_0994: ldarga.s expected - IL_0996: ldfld float64 MCCTest.VType7::f56 - IL_099b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_09a0: throw - - IL_09a1: ldarg.0 - IL_09a2: ldfld float64 MCCTest.VType7::f57 - IL_09a7: ldarga.s expected - IL_09a9: ldfld float64 MCCTest.VType7::f57 - IL_09ae: ceq - IL_09b0: stloc.0 - IL_09b1: ldloc.0 - IL_09b2: brtrue.s IL_09cd - - IL_09b4: nop - IL_09b5: ldstr "f57" - IL_09ba: ldarg.0 - IL_09bb: ldfld float64 MCCTest.VType7::f57 - IL_09c0: ldarga.s expected - IL_09c2: ldfld float64 MCCTest.VType7::f57 - IL_09c7: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_09cc: throw - - IL_09cd: ldarg.0 - IL_09ce: ldfld float64 MCCTest.VType7::f58 - IL_09d3: ldarga.s expected - IL_09d5: ldfld float64 MCCTest.VType7::f58 - IL_09da: ceq - IL_09dc: stloc.0 - IL_09dd: ldloc.0 - IL_09de: brtrue.s IL_09f9 - - IL_09e0: nop - IL_09e1: ldstr "f58" - IL_09e6: ldarg.0 - IL_09e7: ldfld float64 MCCTest.VType7::f58 - IL_09ec: ldarga.s expected - IL_09ee: ldfld float64 MCCTest.VType7::f58 - IL_09f3: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_09f8: throw - - IL_09f9: ldarg.0 - IL_09fa: ldfld float64 MCCTest.VType7::f59 - IL_09ff: ldarga.s expected - IL_0a01: ldfld float64 MCCTest.VType7::f59 - IL_0a06: ceq - IL_0a08: stloc.0 - IL_0a09: ldloc.0 - IL_0a0a: brtrue.s IL_0a25 - - IL_0a0c: nop - IL_0a0d: ldstr "f59" - IL_0a12: ldarg.0 - IL_0a13: ldfld float64 MCCTest.VType7::f59 - IL_0a18: ldarga.s expected - IL_0a1a: ldfld float64 MCCTest.VType7::f59 - IL_0a1f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0a24: throw - - IL_0a25: ldarg.0 - IL_0a26: ldfld float64 MCCTest.VType7::f60 - IL_0a2b: ldarga.s expected - IL_0a2d: ldfld float64 MCCTest.VType7::f60 - IL_0a32: ceq - IL_0a34: stloc.0 - IL_0a35: ldloc.0 - IL_0a36: brtrue.s IL_0a51 - - IL_0a38: nop - IL_0a39: ldstr "f60" - IL_0a3e: ldarg.0 - IL_0a3f: ldfld float64 MCCTest.VType7::f60 - IL_0a44: ldarga.s expected - IL_0a46: ldfld float64 MCCTest.VType7::f60 - IL_0a4b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0a50: throw - - IL_0a51: ldarg.0 - IL_0a52: ldfld float64 MCCTest.VType7::f61 - IL_0a57: ldarga.s expected - IL_0a59: ldfld float64 MCCTest.VType7::f61 - IL_0a5e: ceq - IL_0a60: stloc.0 - IL_0a61: ldloc.0 - IL_0a62: brtrue.s IL_0a7d - - IL_0a64: nop - IL_0a65: ldstr "f61" - IL_0a6a: ldarg.0 - IL_0a6b: ldfld float64 MCCTest.VType7::f61 - IL_0a70: ldarga.s expected - IL_0a72: ldfld float64 MCCTest.VType7::f61 - IL_0a77: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0a7c: throw - - IL_0a7d: ldarg.0 - IL_0a7e: ldfld float64 MCCTest.VType7::f62 - IL_0a83: ldarga.s expected - IL_0a85: ldfld float64 MCCTest.VType7::f62 - IL_0a8a: ceq - IL_0a8c: stloc.0 - IL_0a8d: ldloc.0 - IL_0a8e: brtrue.s IL_0aa9 - - IL_0a90: nop - IL_0a91: ldstr "f62" - IL_0a96: ldarg.0 - IL_0a97: ldfld float64 MCCTest.VType7::f62 - IL_0a9c: ldarga.s expected - IL_0a9e: ldfld float64 MCCTest.VType7::f62 - IL_0aa3: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0aa8: throw - - IL_0aa9: ldarg.0 - IL_0aaa: ldfld float64 MCCTest.VType7::f63 - IL_0aaf: ldarga.s expected - IL_0ab1: ldfld float64 MCCTest.VType7::f63 - IL_0ab6: ceq - IL_0ab8: stloc.0 - IL_0ab9: ldloc.0 - IL_0aba: brtrue.s IL_0ad5 - - IL_0abc: nop - IL_0abd: ldstr "f63" - IL_0ac2: ldarg.0 - IL_0ac3: ldfld float64 MCCTest.VType7::f63 - IL_0ac8: ldarga.s expected - IL_0aca: ldfld float64 MCCTest.VType7::f63 - IL_0acf: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0ad4: throw - - IL_0ad5: ldarg.0 - IL_0ad6: ldfld float64 MCCTest.VType7::f64 - IL_0adb: ldarga.s expected - IL_0add: ldfld float64 MCCTest.VType7::f64 - IL_0ae2: ceq - IL_0ae4: stloc.0 - IL_0ae5: ldloc.0 - IL_0ae6: brtrue.s IL_0b01 - - IL_0ae8: nop - IL_0ae9: ldstr "f64" - IL_0aee: ldarg.0 - IL_0aef: ldfld float64 MCCTest.VType7::f64 - IL_0af4: ldarga.s expected - IL_0af6: ldfld float64 MCCTest.VType7::f64 - IL_0afb: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0b00: throw - - IL_0b01: ldarg.0 - IL_0b02: ldfld float64 MCCTest.VType7::f65 - IL_0b07: ldarga.s expected - IL_0b09: ldfld float64 MCCTest.VType7::f65 - IL_0b0e: ceq - IL_0b10: stloc.0 - IL_0b11: ldloc.0 - IL_0b12: brtrue.s IL_0b2d - - IL_0b14: nop - IL_0b15: ldstr "f65" - IL_0b1a: ldarg.0 - IL_0b1b: ldfld float64 MCCTest.VType7::f65 - IL_0b20: ldarga.s expected - IL_0b22: ldfld float64 MCCTest.VType7::f65 - IL_0b27: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0b2c: throw - - IL_0b2d: ldarg.0 - IL_0b2e: ldfld float64 MCCTest.VType7::f66 - IL_0b33: ldarga.s expected - IL_0b35: ldfld float64 MCCTest.VType7::f66 - IL_0b3a: ceq - IL_0b3c: stloc.0 - IL_0b3d: ldloc.0 - IL_0b3e: brtrue.s IL_0b59 - - IL_0b40: nop - IL_0b41: ldstr "f66" - IL_0b46: ldarg.0 - IL_0b47: ldfld float64 MCCTest.VType7::f66 - IL_0b4c: ldarga.s expected - IL_0b4e: ldfld float64 MCCTest.VType7::f66 - IL_0b53: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0b58: throw - - IL_0b59: ldarg.0 - IL_0b5a: ldfld float64 MCCTest.VType7::f67 - IL_0b5f: ldarga.s expected - IL_0b61: ldfld float64 MCCTest.VType7::f67 - IL_0b66: ceq - IL_0b68: stloc.0 - IL_0b69: ldloc.0 - IL_0b6a: brtrue.s IL_0b85 - - IL_0b6c: nop - IL_0b6d: ldstr "f67" - IL_0b72: ldarg.0 - IL_0b73: ldfld float64 MCCTest.VType7::f67 - IL_0b78: ldarga.s expected - IL_0b7a: ldfld float64 MCCTest.VType7::f67 - IL_0b7f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0b84: throw - - IL_0b85: ldarg.0 - IL_0b86: ldfld float64 MCCTest.VType7::f68 - IL_0b8b: ldarga.s expected - IL_0b8d: ldfld float64 MCCTest.VType7::f68 - IL_0b92: ceq - IL_0b94: stloc.0 - IL_0b95: ldloc.0 - IL_0b96: brtrue.s IL_0bb1 - - IL_0b98: nop - IL_0b99: ldstr "f68" - IL_0b9e: ldarg.0 - IL_0b9f: ldfld float64 MCCTest.VType7::f68 - IL_0ba4: ldarga.s expected - IL_0ba6: ldfld float64 MCCTest.VType7::f68 - IL_0bab: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0bb0: throw - - IL_0bb1: ldarg.0 - IL_0bb2: ldfld float64 MCCTest.VType7::f69 - IL_0bb7: ldarga.s expected - IL_0bb9: ldfld float64 MCCTest.VType7::f69 - IL_0bbe: ceq - IL_0bc0: stloc.0 - IL_0bc1: ldloc.0 - IL_0bc2: brtrue.s IL_0bdd - - IL_0bc4: nop - IL_0bc5: ldstr "f69" - IL_0bca: ldarg.0 - IL_0bcb: ldfld float64 MCCTest.VType7::f69 - IL_0bd0: ldarga.s expected - IL_0bd2: ldfld float64 MCCTest.VType7::f69 - IL_0bd7: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0bdc: throw - - IL_0bdd: ldarg.0 - IL_0bde: ldfld float64 MCCTest.VType7::f70 - IL_0be3: ldarga.s expected - IL_0be5: ldfld float64 MCCTest.VType7::f70 - IL_0bea: ceq - IL_0bec: stloc.0 - IL_0bed: ldloc.0 - IL_0bee: brtrue.s IL_0c09 - - IL_0bf0: nop - IL_0bf1: ldstr "f70" - IL_0bf6: ldarg.0 - IL_0bf7: ldfld float64 MCCTest.VType7::f70 - IL_0bfc: ldarga.s expected - IL_0bfe: ldfld float64 MCCTest.VType7::f70 - IL_0c03: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0c08: throw - - IL_0c09: ldarg.0 - IL_0c0a: ldfld float64 MCCTest.VType7::f71 - IL_0c0f: ldarga.s expected - IL_0c11: ldfld float64 MCCTest.VType7::f71 - IL_0c16: ceq - IL_0c18: stloc.0 - IL_0c19: ldloc.0 - IL_0c1a: brtrue.s IL_0c35 - - IL_0c1c: nop - IL_0c1d: ldstr "f71" - IL_0c22: ldarg.0 - IL_0c23: ldfld float64 MCCTest.VType7::f71 - IL_0c28: ldarga.s expected - IL_0c2a: ldfld float64 MCCTest.VType7::f71 - IL_0c2f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0c34: throw - - IL_0c35: ldarg.0 - IL_0c36: ldfld float64 MCCTest.VType7::f72 - IL_0c3b: ldarga.s expected - IL_0c3d: ldfld float64 MCCTest.VType7::f72 - IL_0c42: ceq - IL_0c44: stloc.0 - IL_0c45: ldloc.0 - IL_0c46: brtrue.s IL_0c61 - - IL_0c48: nop - IL_0c49: ldstr "f72" - IL_0c4e: ldarg.0 - IL_0c4f: ldfld float64 MCCTest.VType7::f72 - IL_0c54: ldarga.s expected - IL_0c56: ldfld float64 MCCTest.VType7::f72 - IL_0c5b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0c60: throw - - IL_0c61: ldarg.0 - IL_0c62: ldfld float64 MCCTest.VType7::f73 - IL_0c67: ldarga.s expected - IL_0c69: ldfld float64 MCCTest.VType7::f73 - IL_0c6e: ceq - IL_0c70: stloc.0 - IL_0c71: ldloc.0 - IL_0c72: brtrue.s IL_0c8d - - IL_0c74: nop - IL_0c75: ldstr "f73" - IL_0c7a: ldarg.0 - IL_0c7b: ldfld float64 MCCTest.VType7::f73 - IL_0c80: ldarga.s expected - IL_0c82: ldfld float64 MCCTest.VType7::f73 - IL_0c87: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0c8c: throw - - IL_0c8d: ldarg.0 - IL_0c8e: ldfld float64 MCCTest.VType7::f74 - IL_0c93: ldarga.s expected - IL_0c95: ldfld float64 MCCTest.VType7::f74 - IL_0c9a: ceq - IL_0c9c: stloc.0 - IL_0c9d: ldloc.0 - IL_0c9e: brtrue.s IL_0cb9 - - IL_0ca0: nop - IL_0ca1: ldstr "f74" - IL_0ca6: ldarg.0 - IL_0ca7: ldfld float64 MCCTest.VType7::f74 - IL_0cac: ldarga.s expected - IL_0cae: ldfld float64 MCCTest.VType7::f74 - IL_0cb3: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0cb8: throw - - IL_0cb9: ldarg.0 - IL_0cba: ldfld float64 MCCTest.VType7::f75 - IL_0cbf: ldarga.s expected - IL_0cc1: ldfld float64 MCCTest.VType7::f75 - IL_0cc6: ceq - IL_0cc8: stloc.0 - IL_0cc9: ldloc.0 - IL_0cca: brtrue.s IL_0ce5 - - IL_0ccc: nop - IL_0ccd: ldstr "f75" - IL_0cd2: ldarg.0 - IL_0cd3: ldfld float64 MCCTest.VType7::f75 - IL_0cd8: ldarga.s expected - IL_0cda: ldfld float64 MCCTest.VType7::f75 - IL_0cdf: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0ce4: throw - - IL_0ce5: ldarg.0 - IL_0ce6: ldfld float64 MCCTest.VType7::f76 - IL_0ceb: ldarga.s expected - IL_0ced: ldfld float64 MCCTest.VType7::f76 - IL_0cf2: ceq - IL_0cf4: stloc.0 - IL_0cf5: ldloc.0 - IL_0cf6: brtrue.s IL_0d11 - - IL_0cf8: nop - IL_0cf9: ldstr "f76" - IL_0cfe: ldarg.0 - IL_0cff: ldfld float64 MCCTest.VType7::f76 - IL_0d04: ldarga.s expected - IL_0d06: ldfld float64 MCCTest.VType7::f76 - IL_0d0b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0d10: throw - - IL_0d11: ldarg.0 - IL_0d12: ldfld float64 MCCTest.VType7::f77 - IL_0d17: ldarga.s expected - IL_0d19: ldfld float64 MCCTest.VType7::f77 - IL_0d1e: ceq - IL_0d20: stloc.0 - IL_0d21: ldloc.0 - IL_0d22: brtrue.s IL_0d3d - - IL_0d24: nop - IL_0d25: ldstr "f77" - IL_0d2a: ldarg.0 - IL_0d2b: ldfld float64 MCCTest.VType7::f77 - IL_0d30: ldarga.s expected - IL_0d32: ldfld float64 MCCTest.VType7::f77 - IL_0d37: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0d3c: throw - - IL_0d3d: ldarg.0 - IL_0d3e: ldfld float64 MCCTest.VType7::f78 - IL_0d43: ldarga.s expected - IL_0d45: ldfld float64 MCCTest.VType7::f78 - IL_0d4a: ceq - IL_0d4c: stloc.0 - IL_0d4d: ldloc.0 - IL_0d4e: brtrue.s IL_0d69 - - IL_0d50: nop - IL_0d51: ldstr "f78" - IL_0d56: ldarg.0 - IL_0d57: ldfld float64 MCCTest.VType7::f78 - IL_0d5c: ldarga.s expected - IL_0d5e: ldfld float64 MCCTest.VType7::f78 - IL_0d63: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0d68: throw - - IL_0d69: ldarg.0 - IL_0d6a: ldfld float64 MCCTest.VType7::f79 - IL_0d6f: ldarga.s expected - IL_0d71: ldfld float64 MCCTest.VType7::f79 - IL_0d76: ceq - IL_0d78: stloc.0 - IL_0d79: ldloc.0 - IL_0d7a: brtrue.s IL_0d95 - - IL_0d7c: nop - IL_0d7d: ldstr "f79" - IL_0d82: ldarg.0 - IL_0d83: ldfld float64 MCCTest.VType7::f79 - IL_0d88: ldarga.s expected - IL_0d8a: ldfld float64 MCCTest.VType7::f79 - IL_0d8f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0d94: throw - - IL_0d95: ldarg.0 - IL_0d96: ldfld float64 MCCTest.VType7::f80 - IL_0d9b: ldarga.s expected - IL_0d9d: ldfld float64 MCCTest.VType7::f80 - IL_0da2: ceq - IL_0da4: stloc.0 - IL_0da5: ldloc.0 - IL_0da6: brtrue.s IL_0dc1 - - IL_0da8: nop - IL_0da9: ldstr "f80" - IL_0dae: ldarg.0 - IL_0daf: ldfld float64 MCCTest.VType7::f80 - IL_0db4: ldarga.s expected - IL_0db6: ldfld float64 MCCTest.VType7::f80 - IL_0dbb: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0dc0: throw - - IL_0dc1: ldarg.0 - IL_0dc2: ldfld float64 MCCTest.VType7::f81 - IL_0dc7: ldarga.s expected - IL_0dc9: ldfld float64 MCCTest.VType7::f81 - IL_0dce: ceq - IL_0dd0: stloc.0 - IL_0dd1: ldloc.0 - IL_0dd2: brtrue.s IL_0ded - - IL_0dd4: nop - IL_0dd5: ldstr "f81" - IL_0dda: ldarg.0 - IL_0ddb: ldfld float64 MCCTest.VType7::f81 - IL_0de0: ldarga.s expected - IL_0de2: ldfld float64 MCCTest.VType7::f81 - IL_0de7: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0dec: throw - - IL_0ded: ldarg.0 - IL_0dee: ldfld float64 MCCTest.VType7::f82 - IL_0df3: ldarga.s expected - IL_0df5: ldfld float64 MCCTest.VType7::f82 - IL_0dfa: ceq - IL_0dfc: stloc.0 - IL_0dfd: ldloc.0 - IL_0dfe: brtrue.s IL_0e19 - - IL_0e00: nop - IL_0e01: ldstr "f82" - IL_0e06: ldarg.0 - IL_0e07: ldfld float64 MCCTest.VType7::f82 - IL_0e0c: ldarga.s expected - IL_0e0e: ldfld float64 MCCTest.VType7::f82 - IL_0e13: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0e18: throw - - IL_0e19: ldarg.0 - IL_0e1a: ldfld float64 MCCTest.VType7::f83 - IL_0e1f: ldarga.s expected - IL_0e21: ldfld float64 MCCTest.VType7::f83 - IL_0e26: ceq - IL_0e28: stloc.0 - IL_0e29: ldloc.0 - IL_0e2a: brtrue.s IL_0e45 - - IL_0e2c: nop - IL_0e2d: ldstr "f83" - IL_0e32: ldarg.0 - IL_0e33: ldfld float64 MCCTest.VType7::f83 - IL_0e38: ldarga.s expected - IL_0e3a: ldfld float64 MCCTest.VType7::f83 - IL_0e3f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0e44: throw - - IL_0e45: ldarg.0 - IL_0e46: ldfld float64 MCCTest.VType7::f84 - IL_0e4b: ldarga.s expected - IL_0e4d: ldfld float64 MCCTest.VType7::f84 - IL_0e52: ceq - IL_0e54: stloc.0 - IL_0e55: ldloc.0 - IL_0e56: brtrue.s IL_0e71 - - IL_0e58: nop - IL_0e59: ldstr "f84" - IL_0e5e: ldarg.0 - IL_0e5f: ldfld float64 MCCTest.VType7::f84 - IL_0e64: ldarga.s expected - IL_0e66: ldfld float64 MCCTest.VType7::f84 - IL_0e6b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0e70: throw - - IL_0e71: ldarg.0 - IL_0e72: ldfld float64 MCCTest.VType7::f85 - IL_0e77: ldarga.s expected - IL_0e79: ldfld float64 MCCTest.VType7::f85 - IL_0e7e: ceq - IL_0e80: stloc.0 - IL_0e81: ldloc.0 - IL_0e82: brtrue.s IL_0e9d - - IL_0e84: nop - IL_0e85: ldstr "f85" - IL_0e8a: ldarg.0 - IL_0e8b: ldfld float64 MCCTest.VType7::f85 - IL_0e90: ldarga.s expected - IL_0e92: ldfld float64 MCCTest.VType7::f85 - IL_0e97: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0e9c: throw - - IL_0e9d: ldarg.0 - IL_0e9e: ldfld float64 MCCTest.VType7::f86 - IL_0ea3: ldarga.s expected - IL_0ea5: ldfld float64 MCCTest.VType7::f86 - IL_0eaa: ceq - IL_0eac: stloc.0 - IL_0ead: ldloc.0 - IL_0eae: brtrue.s IL_0ec9 - - IL_0eb0: nop - IL_0eb1: ldstr "f86" - IL_0eb6: ldarg.0 - IL_0eb7: ldfld float64 MCCTest.VType7::f86 - IL_0ebc: ldarga.s expected - IL_0ebe: ldfld float64 MCCTest.VType7::f86 - IL_0ec3: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0ec8: throw - - IL_0ec9: ldarg.0 - IL_0eca: ldfld float64 MCCTest.VType7::f87 - IL_0ecf: ldarga.s expected - IL_0ed1: ldfld float64 MCCTest.VType7::f87 - IL_0ed6: ceq - IL_0ed8: stloc.0 - IL_0ed9: ldloc.0 - IL_0eda: brtrue.s IL_0ef5 - - IL_0edc: nop - IL_0edd: ldstr "f87" - IL_0ee2: ldarg.0 - IL_0ee3: ldfld float64 MCCTest.VType7::f87 - IL_0ee8: ldarga.s expected - IL_0eea: ldfld float64 MCCTest.VType7::f87 - IL_0eef: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0ef4: throw - - IL_0ef5: ldarg.0 - IL_0ef6: ldfld float64 MCCTest.VType7::f88 - IL_0efb: ldarga.s expected - IL_0efd: ldfld float64 MCCTest.VType7::f88 - IL_0f02: ceq - IL_0f04: stloc.0 - IL_0f05: ldloc.0 - IL_0f06: brtrue.s IL_0f21 - - IL_0f08: nop - IL_0f09: ldstr "f88" - IL_0f0e: ldarg.0 - IL_0f0f: ldfld float64 MCCTest.VType7::f88 - IL_0f14: ldarga.s expected - IL_0f16: ldfld float64 MCCTest.VType7::f88 - IL_0f1b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0f20: throw - - IL_0f21: ldarg.0 - IL_0f22: ldfld float64 MCCTest.VType7::f89 - IL_0f27: ldarga.s expected - IL_0f29: ldfld float64 MCCTest.VType7::f89 - IL_0f2e: ceq - IL_0f30: stloc.0 - IL_0f31: ldloc.0 - IL_0f32: brtrue.s IL_0f4d - - IL_0f34: nop - IL_0f35: ldstr "f89" - IL_0f3a: ldarg.0 - IL_0f3b: ldfld float64 MCCTest.VType7::f89 - IL_0f40: ldarga.s expected - IL_0f42: ldfld float64 MCCTest.VType7::f89 - IL_0f47: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0f4c: throw - - IL_0f4d: ldarg.0 - IL_0f4e: ldfld float64 MCCTest.VType7::f90 - IL_0f53: ldarga.s expected - IL_0f55: ldfld float64 MCCTest.VType7::f90 - IL_0f5a: ceq - IL_0f5c: stloc.0 - IL_0f5d: ldloc.0 - IL_0f5e: brtrue.s IL_0f79 - - IL_0f60: nop - IL_0f61: ldstr "f90" - IL_0f66: ldarg.0 - IL_0f67: ldfld float64 MCCTest.VType7::f90 - IL_0f6c: ldarga.s expected - IL_0f6e: ldfld float64 MCCTest.VType7::f90 - IL_0f73: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0f78: throw - - IL_0f79: ldarg.0 - IL_0f7a: ldfld float64 MCCTest.VType7::f91 - IL_0f7f: ldarga.s expected - IL_0f81: ldfld float64 MCCTest.VType7::f91 - IL_0f86: ceq - IL_0f88: stloc.0 - IL_0f89: ldloc.0 - IL_0f8a: brtrue.s IL_0fa5 - - IL_0f8c: nop - IL_0f8d: ldstr "f91" - IL_0f92: ldarg.0 - IL_0f93: ldfld float64 MCCTest.VType7::f91 - IL_0f98: ldarga.s expected - IL_0f9a: ldfld float64 MCCTest.VType7::f91 - IL_0f9f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0fa4: throw - - IL_0fa5: ldarg.0 - IL_0fa6: ldfld float64 MCCTest.VType7::f92 - IL_0fab: ldarga.s expected - IL_0fad: ldfld float64 MCCTest.VType7::f92 - IL_0fb2: ceq - IL_0fb4: stloc.0 - IL_0fb5: ldloc.0 - IL_0fb6: brtrue.s IL_0fd1 - - IL_0fb8: nop - IL_0fb9: ldstr "f92" - IL_0fbe: ldarg.0 - IL_0fbf: ldfld float64 MCCTest.VType7::f92 - IL_0fc4: ldarga.s expected - IL_0fc6: ldfld float64 MCCTest.VType7::f92 - IL_0fcb: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0fd0: throw - - IL_0fd1: ldarg.0 - IL_0fd2: ldfld float64 MCCTest.VType7::f93 - IL_0fd7: ldarga.s expected - IL_0fd9: ldfld float64 MCCTest.VType7::f93 - IL_0fde: ceq - IL_0fe0: stloc.0 - IL_0fe1: ldloc.0 - IL_0fe2: brtrue.s IL_0ffd - - IL_0fe4: nop - IL_0fe5: ldstr "f93" - IL_0fea: ldarg.0 - IL_0feb: ldfld float64 MCCTest.VType7::f93 - IL_0ff0: ldarga.s expected - IL_0ff2: ldfld float64 MCCTest.VType7::f93 - IL_0ff7: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0ffc: throw - - IL_0ffd: ldarg.0 - IL_0ffe: ldfld float64 MCCTest.VType7::f94 - IL_1003: ldarga.s expected - IL_1005: ldfld float64 MCCTest.VType7::f94 - IL_100a: ceq - IL_100c: stloc.0 - IL_100d: ldloc.0 - IL_100e: brtrue.s IL_1029 - - IL_1010: nop - IL_1011: ldstr "f94" - IL_1016: ldarg.0 - IL_1017: ldfld float64 MCCTest.VType7::f94 - IL_101c: ldarga.s expected - IL_101e: ldfld float64 MCCTest.VType7::f94 - IL_1023: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1028: throw - - IL_1029: ldarg.0 - IL_102a: ldfld float64 MCCTest.VType7::f95 - IL_102f: ldarga.s expected - IL_1031: ldfld float64 MCCTest.VType7::f95 - IL_1036: ceq - IL_1038: stloc.0 - IL_1039: ldloc.0 - IL_103a: brtrue.s IL_1055 - - IL_103c: nop - IL_103d: ldstr "f95" - IL_1042: ldarg.0 - IL_1043: ldfld float64 MCCTest.VType7::f95 - IL_1048: ldarga.s expected - IL_104a: ldfld float64 MCCTest.VType7::f95 - IL_104f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1054: throw - - IL_1055: ldarg.0 - IL_1056: ldfld float64 MCCTest.VType7::f96 - IL_105b: ldarga.s expected - IL_105d: ldfld float64 MCCTest.VType7::f96 - IL_1062: ceq - IL_1064: stloc.0 - IL_1065: ldloc.0 - IL_1066: brtrue.s IL_1081 - - IL_1068: nop - IL_1069: ldstr "f96" - IL_106e: ldarg.0 - IL_106f: ldfld float64 MCCTest.VType7::f96 - IL_1074: ldarga.s expected - IL_1076: ldfld float64 MCCTest.VType7::f96 - IL_107b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1080: throw - - IL_1081: ldarg.0 - IL_1082: ldfld float64 MCCTest.VType7::f97 - IL_1087: ldarga.s expected - IL_1089: ldfld float64 MCCTest.VType7::f97 - IL_108e: ceq - IL_1090: stloc.0 - IL_1091: ldloc.0 - IL_1092: brtrue.s IL_10ad - - IL_1094: nop - IL_1095: ldstr "f97" - IL_109a: ldarg.0 - IL_109b: ldfld float64 MCCTest.VType7::f97 - IL_10a0: ldarga.s expected - IL_10a2: ldfld float64 MCCTest.VType7::f97 - IL_10a7: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_10ac: throw - - IL_10ad: ldarg.0 - IL_10ae: ldfld float64 MCCTest.VType7::f98 - IL_10b3: ldarga.s expected - IL_10b5: ldfld float64 MCCTest.VType7::f98 - IL_10ba: ceq - IL_10bc: stloc.0 - IL_10bd: ldloc.0 - IL_10be: brtrue.s IL_10d9 - - IL_10c0: nop - IL_10c1: ldstr "f98" - IL_10c6: ldarg.0 - IL_10c7: ldfld float64 MCCTest.VType7::f98 - IL_10cc: ldarga.s expected - IL_10ce: ldfld float64 MCCTest.VType7::f98 - IL_10d3: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_10d8: throw - - IL_10d9: ldarg.0 - IL_10da: ldfld float64 MCCTest.VType7::f99 - IL_10df: ldarga.s expected - IL_10e1: ldfld float64 MCCTest.VType7::f99 - IL_10e6: ceq - IL_10e8: stloc.0 - IL_10e9: ldloc.0 - IL_10ea: brtrue.s IL_1105 - - IL_10ec: nop - IL_10ed: ldstr "f99" - IL_10f2: ldarg.0 - IL_10f3: ldfld float64 MCCTest.VType7::f99 - IL_10f8: ldarga.s expected - IL_10fa: ldfld float64 MCCTest.VType7::f99 - IL_10ff: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1104: throw - - IL_1105: ldarg.0 - IL_1106: ldfld float64 MCCTest.VType7::f100 - IL_110b: ldarga.s expected - IL_110d: ldfld float64 MCCTest.VType7::f100 - IL_1112: ceq - IL_1114: stloc.0 - IL_1115: ldloc.0 - IL_1116: brtrue.s IL_1131 - - IL_1118: nop - IL_1119: ldstr "f100" - IL_111e: ldarg.0 - IL_111f: ldfld float64 MCCTest.VType7::f100 - IL_1124: ldarga.s expected - IL_1126: ldfld float64 MCCTest.VType7::f100 - IL_112b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1130: throw - - IL_1131: ldarg.0 - IL_1132: ldfld float64 MCCTest.VType7::f101 - IL_1137: ldarga.s expected - IL_1139: ldfld float64 MCCTest.VType7::f101 - IL_113e: ceq - IL_1140: stloc.0 - IL_1141: ldloc.0 - IL_1142: brtrue.s IL_115d - - IL_1144: nop - IL_1145: ldstr "f101" - IL_114a: ldarg.0 - IL_114b: ldfld float64 MCCTest.VType7::f101 - IL_1150: ldarga.s expected - IL_1152: ldfld float64 MCCTest.VType7::f101 - IL_1157: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_115c: throw - - IL_115d: ldarg.0 - IL_115e: ldfld float64 MCCTest.VType7::f102 - IL_1163: ldarga.s expected - IL_1165: ldfld float64 MCCTest.VType7::f102 - IL_116a: ceq - IL_116c: stloc.0 - IL_116d: ldloc.0 - IL_116e: brtrue.s IL_1189 - - IL_1170: nop - IL_1171: ldstr "f102" - IL_1176: ldarg.0 - IL_1177: ldfld float64 MCCTest.VType7::f102 - IL_117c: ldarga.s expected - IL_117e: ldfld float64 MCCTest.VType7::f102 - IL_1183: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1188: throw - - IL_1189: ldarg.0 - IL_118a: ldfld float64 MCCTest.VType7::f103 - IL_118f: ldarga.s expected - IL_1191: ldfld float64 MCCTest.VType7::f103 - IL_1196: ceq - IL_1198: stloc.0 - IL_1199: ldloc.0 - IL_119a: brtrue.s IL_11b5 - - IL_119c: nop - IL_119d: ldstr "f103" - IL_11a2: ldarg.0 - IL_11a3: ldfld float64 MCCTest.VType7::f103 - IL_11a8: ldarga.s expected - IL_11aa: ldfld float64 MCCTest.VType7::f103 - IL_11af: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_11b4: throw - - IL_11b5: ldarg.0 - IL_11b6: ldfld float64 MCCTest.VType7::f104 - IL_11bb: ldarga.s expected - IL_11bd: ldfld float64 MCCTest.VType7::f104 - IL_11c2: ceq - IL_11c4: stloc.0 - IL_11c5: ldloc.0 - IL_11c6: brtrue.s IL_11e1 - - IL_11c8: nop - IL_11c9: ldstr "f104" - IL_11ce: ldarg.0 - IL_11cf: ldfld float64 MCCTest.VType7::f104 - IL_11d4: ldarga.s expected - IL_11d6: ldfld float64 MCCTest.VType7::f104 - IL_11db: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_11e0: throw - - IL_11e1: ldarg.0 - IL_11e2: ldfld float64 MCCTest.VType7::f105 - IL_11e7: ldarga.s expected - IL_11e9: ldfld float64 MCCTest.VType7::f105 - IL_11ee: ceq - IL_11f0: stloc.0 - IL_11f1: ldloc.0 - IL_11f2: brtrue.s IL_120d - - IL_11f4: nop - IL_11f5: ldstr "f105" - IL_11fa: ldarg.0 - IL_11fb: ldfld float64 MCCTest.VType7::f105 - IL_1200: ldarga.s expected - IL_1202: ldfld float64 MCCTest.VType7::f105 - IL_1207: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_120c: throw - - IL_120d: ldarg.0 - IL_120e: ldfld float64 MCCTest.VType7::f106 - IL_1213: ldarga.s expected - IL_1215: ldfld float64 MCCTest.VType7::f106 - IL_121a: ceq - IL_121c: stloc.0 - IL_121d: ldloc.0 - IL_121e: brtrue.s IL_1239 - - IL_1220: nop - IL_1221: ldstr "f106" - IL_1226: ldarg.0 - IL_1227: ldfld float64 MCCTest.VType7::f106 - IL_122c: ldarga.s expected - IL_122e: ldfld float64 MCCTest.VType7::f106 - IL_1233: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1238: throw - - IL_1239: ldarg.0 - IL_123a: ldfld float64 MCCTest.VType7::f107 - IL_123f: ldarga.s expected - IL_1241: ldfld float64 MCCTest.VType7::f107 - IL_1246: ceq - IL_1248: stloc.0 - IL_1249: ldloc.0 - IL_124a: brtrue.s IL_1265 - - IL_124c: nop - IL_124d: ldstr "f107" - IL_1252: ldarg.0 - IL_1253: ldfld float64 MCCTest.VType7::f107 - IL_1258: ldarga.s expected - IL_125a: ldfld float64 MCCTest.VType7::f107 - IL_125f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1264: throw - - IL_1265: ldarg.0 - IL_1266: ldfld float64 MCCTest.VType7::f108 - IL_126b: ldarga.s expected - IL_126d: ldfld float64 MCCTest.VType7::f108 - IL_1272: ceq - IL_1274: stloc.0 - IL_1275: ldloc.0 - IL_1276: brtrue.s IL_1291 - - IL_1278: nop - IL_1279: ldstr "f108" - IL_127e: ldarg.0 - IL_127f: ldfld float64 MCCTest.VType7::f108 - IL_1284: ldarga.s expected - IL_1286: ldfld float64 MCCTest.VType7::f108 - IL_128b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1290: throw - - IL_1291: ldarg.0 - IL_1292: ldfld float64 MCCTest.VType7::f109 - IL_1297: ldarga.s expected - IL_1299: ldfld float64 MCCTest.VType7::f109 - IL_129e: ceq - IL_12a0: stloc.0 - IL_12a1: ldloc.0 - IL_12a2: brtrue.s IL_12bd - - IL_12a4: nop - IL_12a5: ldstr "f109" - IL_12aa: ldarg.0 - IL_12ab: ldfld float64 MCCTest.VType7::f109 - IL_12b0: ldarga.s expected - IL_12b2: ldfld float64 MCCTest.VType7::f109 - IL_12b7: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_12bc: throw - - IL_12bd: ldarg.0 - IL_12be: ldfld float64 MCCTest.VType7::f110 - IL_12c3: ldarga.s expected - IL_12c5: ldfld float64 MCCTest.VType7::f110 - IL_12ca: ceq - IL_12cc: stloc.0 - IL_12cd: ldloc.0 - IL_12ce: brtrue.s IL_12e9 - - IL_12d0: nop - IL_12d1: ldstr "f110" - IL_12d6: ldarg.0 - IL_12d7: ldfld float64 MCCTest.VType7::f110 - IL_12dc: ldarga.s expected - IL_12de: ldfld float64 MCCTest.VType7::f110 - IL_12e3: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_12e8: throw - - IL_12e9: ldarg.0 - IL_12ea: ldfld float64 MCCTest.VType7::f111 - IL_12ef: ldarga.s expected - IL_12f1: ldfld float64 MCCTest.VType7::f111 - IL_12f6: ceq - IL_12f8: stloc.0 - IL_12f9: ldloc.0 - IL_12fa: brtrue.s IL_1315 - - IL_12fc: nop - IL_12fd: ldstr "f111" - IL_1302: ldarg.0 - IL_1303: ldfld float64 MCCTest.VType7::f111 - IL_1308: ldarga.s expected - IL_130a: ldfld float64 MCCTest.VType7::f111 - IL_130f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1314: throw - - IL_1315: ldarg.0 - IL_1316: ldfld float64 MCCTest.VType7::f112 - IL_131b: ldarga.s expected - IL_131d: ldfld float64 MCCTest.VType7::f112 - IL_1322: ceq - IL_1324: stloc.0 - IL_1325: ldloc.0 - IL_1326: brtrue.s IL_1341 - - IL_1328: nop - IL_1329: ldstr "f112" - IL_132e: ldarg.0 - IL_132f: ldfld float64 MCCTest.VType7::f112 - IL_1334: ldarga.s expected - IL_1336: ldfld float64 MCCTest.VType7::f112 - IL_133b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1340: throw - - IL_1341: ldarg.0 - IL_1342: ldfld float64 MCCTest.VType7::f113 - IL_1347: ldarga.s expected - IL_1349: ldfld float64 MCCTest.VType7::f113 - IL_134e: ceq - IL_1350: stloc.0 - IL_1351: ldloc.0 - IL_1352: brtrue.s IL_136d - - IL_1354: nop - IL_1355: ldstr "f113" - IL_135a: ldarg.0 - IL_135b: ldfld float64 MCCTest.VType7::f113 - IL_1360: ldarga.s expected - IL_1362: ldfld float64 MCCTest.VType7::f113 - IL_1367: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_136c: throw - - IL_136d: ldarg.0 - IL_136e: ldfld float64 MCCTest.VType7::f114 - IL_1373: ldarga.s expected - IL_1375: ldfld float64 MCCTest.VType7::f114 - IL_137a: ceq - IL_137c: stloc.0 - IL_137d: ldloc.0 - IL_137e: brtrue.s IL_1399 - - IL_1380: nop - IL_1381: ldstr "f114" - IL_1386: ldarg.0 - IL_1387: ldfld float64 MCCTest.VType7::f114 - IL_138c: ldarga.s expected - IL_138e: ldfld float64 MCCTest.VType7::f114 - IL_1393: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1398: throw - - IL_1399: ldarg.0 - IL_139a: ldfld float64 MCCTest.VType7::f115 - IL_139f: ldarga.s expected - IL_13a1: ldfld float64 MCCTest.VType7::f115 - IL_13a6: ceq - IL_13a8: stloc.0 - IL_13a9: ldloc.0 - IL_13aa: brtrue.s IL_13c5 - - IL_13ac: nop - IL_13ad: ldstr "f115" - IL_13b2: ldarg.0 - IL_13b3: ldfld float64 MCCTest.VType7::f115 - IL_13b8: ldarga.s expected - IL_13ba: ldfld float64 MCCTest.VType7::f115 - IL_13bf: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_13c4: throw - - IL_13c5: ldarg.0 - IL_13c6: ldfld float64 MCCTest.VType7::f116 - IL_13cb: ldarga.s expected - IL_13cd: ldfld float64 MCCTest.VType7::f116 - IL_13d2: ceq - IL_13d4: stloc.0 - IL_13d5: ldloc.0 - IL_13d6: brtrue.s IL_13f1 - - IL_13d8: nop - IL_13d9: ldstr "f116" - IL_13de: ldarg.0 - IL_13df: ldfld float64 MCCTest.VType7::f116 - IL_13e4: ldarga.s expected - IL_13e6: ldfld float64 MCCTest.VType7::f116 - IL_13eb: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_13f0: throw - - IL_13f1: ldarg.0 - IL_13f2: ldfld float64 MCCTest.VType7::f117 - IL_13f7: ldarga.s expected - IL_13f9: ldfld float64 MCCTest.VType7::f117 - IL_13fe: ceq - IL_1400: stloc.0 - IL_1401: ldloc.0 - IL_1402: brtrue.s IL_141d - - IL_1404: nop - IL_1405: ldstr "f117" - IL_140a: ldarg.0 - IL_140b: ldfld float64 MCCTest.VType7::f117 - IL_1410: ldarga.s expected - IL_1412: ldfld float64 MCCTest.VType7::f117 - IL_1417: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_141c: throw - - IL_141d: ldarg.0 - IL_141e: ldfld float64 MCCTest.VType7::f118 - IL_1423: ldarga.s expected - IL_1425: ldfld float64 MCCTest.VType7::f118 - IL_142a: ceq - IL_142c: stloc.0 - IL_142d: ldloc.0 - IL_142e: brtrue.s IL_1449 - - IL_1430: nop - IL_1431: ldstr "f118" - IL_1436: ldarg.0 - IL_1437: ldfld float64 MCCTest.VType7::f118 - IL_143c: ldarga.s expected - IL_143e: ldfld float64 MCCTest.VType7::f118 - IL_1443: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1448: throw - - IL_1449: ldarg.0 - IL_144a: ldfld float64 MCCTest.VType7::f119 - IL_144f: ldarga.s expected - IL_1451: ldfld float64 MCCTest.VType7::f119 - IL_1456: ceq - IL_1458: stloc.0 - IL_1459: ldloc.0 - IL_145a: brtrue.s IL_1475 - - IL_145c: nop - IL_145d: ldstr "f119" - IL_1462: ldarg.0 - IL_1463: ldfld float64 MCCTest.VType7::f119 - IL_1468: ldarga.s expected - IL_146a: ldfld float64 MCCTest.VType7::f119 - IL_146f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1474: throw - - IL_1475: ldarg.0 - IL_1476: ldfld float64 MCCTest.VType7::f120 - IL_147b: ldarga.s expected - IL_147d: ldfld float64 MCCTest.VType7::f120 - IL_1482: ceq - IL_1484: stloc.0 - IL_1485: ldloc.0 - IL_1486: brtrue.s IL_14a1 - - IL_1488: nop - IL_1489: ldstr "f120" - IL_148e: ldarg.0 - IL_148f: ldfld float64 MCCTest.VType7::f120 - IL_1494: ldarga.s expected - IL_1496: ldfld float64 MCCTest.VType7::f120 - IL_149b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_14a0: throw - - IL_14a1: ldarg.0 - IL_14a2: ldfld float64 MCCTest.VType7::f121 - IL_14a7: ldarga.s expected - IL_14a9: ldfld float64 MCCTest.VType7::f121 - IL_14ae: ceq - IL_14b0: stloc.0 - IL_14b1: ldloc.0 - IL_14b2: brtrue.s IL_14cd - - IL_14b4: nop - IL_14b5: ldstr "f121" - IL_14ba: ldarg.0 - IL_14bb: ldfld float64 MCCTest.VType7::f121 - IL_14c0: ldarga.s expected - IL_14c2: ldfld float64 MCCTest.VType7::f121 - IL_14c7: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_14cc: throw - - IL_14cd: ldarg.0 - IL_14ce: ldfld float64 MCCTest.VType7::f122 - IL_14d3: ldarga.s expected - IL_14d5: ldfld float64 MCCTest.VType7::f122 - IL_14da: ceq - IL_14dc: stloc.0 - IL_14dd: ldloc.0 - IL_14de: brtrue.s IL_14f9 - - IL_14e0: nop - IL_14e1: ldstr "f122" - IL_14e6: ldarg.0 - IL_14e7: ldfld float64 MCCTest.VType7::f122 - IL_14ec: ldarga.s expected - IL_14ee: ldfld float64 MCCTest.VType7::f122 - IL_14f3: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_14f8: throw - - IL_14f9: ldarg.0 - IL_14fa: ldfld float64 MCCTest.VType7::f123 - IL_14ff: ldarga.s expected - IL_1501: ldfld float64 MCCTest.VType7::f123 - IL_1506: ceq - IL_1508: stloc.0 - IL_1509: ldloc.0 - IL_150a: brtrue.s IL_1525 - - IL_150c: nop - IL_150d: ldstr "f123" - IL_1512: ldarg.0 - IL_1513: ldfld float64 MCCTest.VType7::f123 - IL_1518: ldarga.s expected - IL_151a: ldfld float64 MCCTest.VType7::f123 - IL_151f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1524: throw - - IL_1525: ldarg.0 - IL_1526: ldfld float64 MCCTest.VType7::f124 - IL_152b: ldarga.s expected - IL_152d: ldfld float64 MCCTest.VType7::f124 - IL_1532: ceq - IL_1534: stloc.0 - IL_1535: ldloc.0 - IL_1536: brtrue.s IL_1551 - - IL_1538: nop - IL_1539: ldstr "f124" - IL_153e: ldarg.0 - IL_153f: ldfld float64 MCCTest.VType7::f124 - IL_1544: ldarga.s expected - IL_1546: ldfld float64 MCCTest.VType7::f124 - IL_154b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1550: throw - - IL_1551: ldarg.0 - IL_1552: ldfld float64 MCCTest.VType7::f125 - IL_1557: ldarga.s expected - IL_1559: ldfld float64 MCCTest.VType7::f125 - IL_155e: ceq - IL_1560: stloc.0 - IL_1561: ldloc.0 - IL_1562: brtrue.s IL_157d - - IL_1564: nop - IL_1565: ldstr "f125" - IL_156a: ldarg.0 - IL_156b: ldfld float64 MCCTest.VType7::f125 - IL_1570: ldarga.s expected - IL_1572: ldfld float64 MCCTest.VType7::f125 - IL_1577: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_157c: throw - - IL_157d: ldarg.0 - IL_157e: ldfld float64 MCCTest.VType7::f126 - IL_1583: ldarga.s expected - IL_1585: ldfld float64 MCCTest.VType7::f126 - IL_158a: ceq - IL_158c: stloc.0 - IL_158d: ldloc.0 - IL_158e: brtrue.s IL_15a9 - - IL_1590: nop - IL_1591: ldstr "f126" - IL_1596: ldarg.0 - IL_1597: ldfld float64 MCCTest.VType7::f126 - IL_159c: ldarga.s expected - IL_159e: ldfld float64 MCCTest.VType7::f126 - IL_15a3: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_15a8: throw - - IL_15a9: ldarg.0 - IL_15aa: ldfld float64 MCCTest.VType7::f127 - IL_15af: ldarga.s expected - IL_15b1: ldfld float64 MCCTest.VType7::f127 - IL_15b6: ceq - IL_15b8: stloc.0 - IL_15b9: ldloc.0 - IL_15ba: brtrue.s IL_15d5 - - IL_15bc: nop - IL_15bd: ldstr "f127" - IL_15c2: ldarg.0 - IL_15c3: ldfld float64 MCCTest.VType7::f127 - IL_15c8: ldarga.s expected - IL_15ca: ldfld float64 MCCTest.VType7::f127 - IL_15cf: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_15d4: throw - - IL_15d5: ldarg.0 - IL_15d6: ldfld float64 MCCTest.VType7::f128 - IL_15db: ldarga.s expected - IL_15dd: ldfld float64 MCCTest.VType7::f128 - IL_15e2: ceq - IL_15e4: stloc.0 - IL_15e5: ldloc.0 - IL_15e6: brtrue.s IL_1601 - - IL_15e8: nop - IL_15e9: ldstr "f128" - IL_15ee: ldarg.0 - IL_15ef: ldfld float64 MCCTest.VType7::f128 - IL_15f4: ldarga.s expected - IL_15f6: ldfld float64 MCCTest.VType7::f128 - IL_15fb: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1600: throw - - IL_1601: ldarg.0 - IL_1602: ldfld float64 MCCTest.VType7::f129 - IL_1607: ldarga.s expected - IL_1609: ldfld float64 MCCTest.VType7::f129 - IL_160e: ceq - IL_1610: stloc.0 - IL_1611: ldloc.0 - IL_1612: brtrue.s IL_162d - - IL_1614: nop - IL_1615: ldstr "f129" - IL_161a: ldarg.0 - IL_161b: ldfld float64 MCCTest.VType7::f129 - IL_1620: ldarga.s expected - IL_1622: ldfld float64 MCCTest.VType7::f129 - IL_1627: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_162c: throw - - IL_162d: ldarg.0 - IL_162e: ldfld float64 MCCTest.VType7::f130 - IL_1633: ldarga.s expected - IL_1635: ldfld float64 MCCTest.VType7::f130 - IL_163a: ceq - IL_163c: stloc.0 - IL_163d: ldloc.0 - IL_163e: brtrue.s IL_1659 - - IL_1640: nop - IL_1641: ldstr "f130" - IL_1646: ldarg.0 - IL_1647: ldfld float64 MCCTest.VType7::f130 - IL_164c: ldarga.s expected - IL_164e: ldfld float64 MCCTest.VType7::f130 - IL_1653: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1658: throw - - IL_1659: ldarg.0 - IL_165a: ldfld float64 MCCTest.VType7::f131 - IL_165f: ldarga.s expected - IL_1661: ldfld float64 MCCTest.VType7::f131 - IL_1666: ceq - IL_1668: stloc.0 - IL_1669: ldloc.0 - IL_166a: brtrue.s IL_1685 - - IL_166c: nop - IL_166d: ldstr "f131" - IL_1672: ldarg.0 - IL_1673: ldfld float64 MCCTest.VType7::f131 - IL_1678: ldarga.s expected - IL_167a: ldfld float64 MCCTest.VType7::f131 - IL_167f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1684: throw - - IL_1685: ldarg.0 - IL_1686: ldfld float64 MCCTest.VType7::f132 - IL_168b: ldarga.s expected - IL_168d: ldfld float64 MCCTest.VType7::f132 - IL_1692: ceq - IL_1694: stloc.0 - IL_1695: ldloc.0 - IL_1696: brtrue.s IL_16b1 - - IL_1698: nop - IL_1699: ldstr "f132" - IL_169e: ldarg.0 - IL_169f: ldfld float64 MCCTest.VType7::f132 - IL_16a4: ldarga.s expected - IL_16a6: ldfld float64 MCCTest.VType7::f132 - IL_16ab: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_16b0: throw - - IL_16b1: ldarg.0 - IL_16b2: ldfld float64 MCCTest.VType7::f133 - IL_16b7: ldarga.s expected - IL_16b9: ldfld float64 MCCTest.VType7::f133 - IL_16be: ceq - IL_16c0: stloc.0 - IL_16c1: ldloc.0 - IL_16c2: brtrue.s IL_16dd - - IL_16c4: nop - IL_16c5: ldstr "f133" - IL_16ca: ldarg.0 - IL_16cb: ldfld float64 MCCTest.VType7::f133 - IL_16d0: ldarga.s expected - IL_16d2: ldfld float64 MCCTest.VType7::f133 - IL_16d7: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_16dc: throw - - IL_16dd: ldarg.0 - IL_16de: ldfld float64 MCCTest.VType7::f134 - IL_16e3: ldarga.s expected - IL_16e5: ldfld float64 MCCTest.VType7::f134 - IL_16ea: ceq - IL_16ec: stloc.0 - IL_16ed: ldloc.0 - IL_16ee: brtrue.s IL_1709 - - IL_16f0: nop - IL_16f1: ldstr "f134" - IL_16f6: ldarg.0 - IL_16f7: ldfld float64 MCCTest.VType7::f134 - IL_16fc: ldarga.s expected - IL_16fe: ldfld float64 MCCTest.VType7::f134 - IL_1703: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1708: throw - - IL_1709: ldarg.0 - IL_170a: ldfld float64 MCCTest.VType7::f135 - IL_170f: ldarga.s expected - IL_1711: ldfld float64 MCCTest.VType7::f135 - IL_1716: ceq - IL_1718: stloc.0 - IL_1719: ldloc.0 - IL_171a: brtrue.s IL_1735 - - IL_171c: nop - IL_171d: ldstr "f135" - IL_1722: ldarg.0 - IL_1723: ldfld float64 MCCTest.VType7::f135 - IL_1728: ldarga.s expected - IL_172a: ldfld float64 MCCTest.VType7::f135 - IL_172f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1734: throw - - IL_1735: ldarg.0 - IL_1736: ldfld float64 MCCTest.VType7::f136 - IL_173b: ldarga.s expected - IL_173d: ldfld float64 MCCTest.VType7::f136 - IL_1742: ceq - IL_1744: stloc.0 - IL_1745: ldloc.0 - IL_1746: brtrue.s IL_1761 - - IL_1748: nop - IL_1749: ldstr "f136" - IL_174e: ldarg.0 - IL_174f: ldfld float64 MCCTest.VType7::f136 - IL_1754: ldarga.s expected - IL_1756: ldfld float64 MCCTest.VType7::f136 - IL_175b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1760: throw - - IL_1761: ldarg.0 - IL_1762: ldfld float64 MCCTest.VType7::f137 - IL_1767: ldarga.s expected - IL_1769: ldfld float64 MCCTest.VType7::f137 - IL_176e: ceq - IL_1770: stloc.0 - IL_1771: ldloc.0 - IL_1772: brtrue.s IL_178d - - IL_1774: nop - IL_1775: ldstr "f137" - IL_177a: ldarg.0 - IL_177b: ldfld float64 MCCTest.VType7::f137 - IL_1780: ldarga.s expected - IL_1782: ldfld float64 MCCTest.VType7::f137 - IL_1787: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_178c: throw - - IL_178d: ldarg.0 - IL_178e: ldfld float64 MCCTest.VType7::f138 - IL_1793: ldarga.s expected - IL_1795: ldfld float64 MCCTest.VType7::f138 - IL_179a: ceq - IL_179c: stloc.0 - IL_179d: ldloc.0 - IL_179e: brtrue.s IL_17b9 - - IL_17a0: nop - IL_17a1: ldstr "f138" - IL_17a6: ldarg.0 - IL_17a7: ldfld float64 MCCTest.VType7::f138 - IL_17ac: ldarga.s expected - IL_17ae: ldfld float64 MCCTest.VType7::f138 - IL_17b3: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_17b8: throw - - IL_17b9: ldarg.0 - IL_17ba: ldfld float64 MCCTest.VType7::f139 - IL_17bf: ldarga.s expected - IL_17c1: ldfld float64 MCCTest.VType7::f139 - IL_17c6: ceq - IL_17c8: stloc.0 - IL_17c9: ldloc.0 - IL_17ca: brtrue.s IL_17e5 - - IL_17cc: nop - IL_17cd: ldstr "f139" - IL_17d2: ldarg.0 - IL_17d3: ldfld float64 MCCTest.VType7::f139 - IL_17d8: ldarga.s expected - IL_17da: ldfld float64 MCCTest.VType7::f139 - IL_17df: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_17e4: throw - - IL_17e5: ldarg.0 - IL_17e6: ldfld float64 MCCTest.VType7::f140 - IL_17eb: ldarga.s expected - IL_17ed: ldfld float64 MCCTest.VType7::f140 - IL_17f2: ceq - IL_17f4: stloc.0 - IL_17f5: ldloc.0 - IL_17f6: brtrue.s IL_1811 - - IL_17f8: nop - IL_17f9: ldstr "f140" - IL_17fe: ldarg.0 - IL_17ff: ldfld float64 MCCTest.VType7::f140 - IL_1804: ldarga.s expected - IL_1806: ldfld float64 MCCTest.VType7::f140 - IL_180b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1810: throw - - IL_1811: ldarg.0 - IL_1812: ldfld float64 MCCTest.VType7::f141 - IL_1817: ldarga.s expected - IL_1819: ldfld float64 MCCTest.VType7::f141 - IL_181e: ceq - IL_1820: stloc.0 - IL_1821: ldloc.0 - IL_1822: brtrue.s IL_183d - - IL_1824: nop - IL_1825: ldstr "f141" - IL_182a: ldarg.0 - IL_182b: ldfld float64 MCCTest.VType7::f141 - IL_1830: ldarga.s expected - IL_1832: ldfld float64 MCCTest.VType7::f141 - IL_1837: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_183c: throw - - IL_183d: ldarg.0 - IL_183e: ldfld float64 MCCTest.VType7::f142 - IL_1843: ldarga.s expected - IL_1845: ldfld float64 MCCTest.VType7::f142 - IL_184a: ceq - IL_184c: stloc.0 - IL_184d: ldloc.0 - IL_184e: brtrue.s IL_1869 - - IL_1850: nop - IL_1851: ldstr "f142" - IL_1856: ldarg.0 - IL_1857: ldfld float64 MCCTest.VType7::f142 - IL_185c: ldarga.s expected - IL_185e: ldfld float64 MCCTest.VType7::f142 - IL_1863: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1868: throw - - IL_1869: ldarg.0 - IL_186a: ldfld float64 MCCTest.VType7::f143 - IL_186f: ldarga.s expected - IL_1871: ldfld float64 MCCTest.VType7::f143 - IL_1876: ceq - IL_1878: stloc.0 - IL_1879: ldloc.0 - IL_187a: brtrue.s IL_1895 - - IL_187c: nop - IL_187d: ldstr "f143" - IL_1882: ldarg.0 - IL_1883: ldfld float64 MCCTest.VType7::f143 - IL_1888: ldarga.s expected - IL_188a: ldfld float64 MCCTest.VType7::f143 - IL_188f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1894: throw - - IL_1895: ldarg.0 - IL_1896: ldfld float64 MCCTest.VType7::f144 - IL_189b: ldarga.s expected - IL_189d: ldfld float64 MCCTest.VType7::f144 - IL_18a2: ceq - IL_18a4: stloc.0 - IL_18a5: ldloc.0 - IL_18a6: brtrue.s IL_18c1 - - IL_18a8: nop - IL_18a9: ldstr "f144" - IL_18ae: ldarg.0 - IL_18af: ldfld float64 MCCTest.VType7::f144 - IL_18b4: ldarga.s expected - IL_18b6: ldfld float64 MCCTest.VType7::f144 - IL_18bb: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_18c0: throw - - IL_18c1: ldarg.0 - IL_18c2: ldfld float64 MCCTest.VType7::f145 - IL_18c7: ldarga.s expected - IL_18c9: ldfld float64 MCCTest.VType7::f145 - IL_18ce: ceq - IL_18d0: stloc.0 - IL_18d1: ldloc.0 - IL_18d2: brtrue.s IL_18ed - - IL_18d4: nop - IL_18d5: ldstr "f145" - IL_18da: ldarg.0 - IL_18db: ldfld float64 MCCTest.VType7::f145 - IL_18e0: ldarga.s expected - IL_18e2: ldfld float64 MCCTest.VType7::f145 - IL_18e7: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_18ec: throw - - IL_18ed: ldarg.0 - IL_18ee: ldfld float64 MCCTest.VType7::f146 - IL_18f3: ldarga.s expected - IL_18f5: ldfld float64 MCCTest.VType7::f146 - IL_18fa: ceq - IL_18fc: stloc.0 - IL_18fd: ldloc.0 - IL_18fe: brtrue.s IL_1919 - - IL_1900: nop - IL_1901: ldstr "f146" - IL_1906: ldarg.0 - IL_1907: ldfld float64 MCCTest.VType7::f146 - IL_190c: ldarga.s expected - IL_190e: ldfld float64 MCCTest.VType7::f146 - IL_1913: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1918: throw - - IL_1919: ldarg.0 - IL_191a: ldfld float64 MCCTest.VType7::f147 - IL_191f: ldarga.s expected - IL_1921: ldfld float64 MCCTest.VType7::f147 - IL_1926: ceq - IL_1928: stloc.0 - IL_1929: ldloc.0 - IL_192a: brtrue.s IL_1945 - - IL_192c: nop - IL_192d: ldstr "f147" - IL_1932: ldarg.0 - IL_1933: ldfld float64 MCCTest.VType7::f147 - IL_1938: ldarga.s expected - IL_193a: ldfld float64 MCCTest.VType7::f147 - IL_193f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1944: throw - - IL_1945: ldarg.0 - IL_1946: ldfld float64 MCCTest.VType7::f148 - IL_194b: ldarga.s expected - IL_194d: ldfld float64 MCCTest.VType7::f148 - IL_1952: ceq - IL_1954: stloc.0 - IL_1955: ldloc.0 - IL_1956: brtrue.s IL_1971 - - IL_1958: nop - IL_1959: ldstr "f148" - IL_195e: ldarg.0 - IL_195f: ldfld float64 MCCTest.VType7::f148 - IL_1964: ldarga.s expected - IL_1966: ldfld float64 MCCTest.VType7::f148 - IL_196b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1970: throw - - IL_1971: ldarg.0 - IL_1972: ldfld float64 MCCTest.VType7::f149 - IL_1977: ldarga.s expected - IL_1979: ldfld float64 MCCTest.VType7::f149 - IL_197e: ceq - IL_1980: stloc.0 - IL_1981: ldloc.0 - IL_1982: brtrue.s IL_199d - - IL_1984: nop - IL_1985: ldstr "f149" - IL_198a: ldarg.0 - IL_198b: ldfld float64 MCCTest.VType7::f149 - IL_1990: ldarga.s expected - IL_1992: ldfld float64 MCCTest.VType7::f149 - IL_1997: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_199c: throw - - IL_199d: ldarg.0 - IL_199e: ldfld float64 MCCTest.VType7::f150 - IL_19a3: ldarga.s expected - IL_19a5: ldfld float64 MCCTest.VType7::f150 - IL_19aa: ceq - IL_19ac: stloc.0 - IL_19ad: ldloc.0 - IL_19ae: brtrue.s IL_19c9 - - IL_19b0: nop - IL_19b1: ldstr "f150" - IL_19b6: ldarg.0 - IL_19b7: ldfld float64 MCCTest.VType7::f150 - IL_19bc: ldarga.s expected - IL_19be: ldfld float64 MCCTest.VType7::f150 - IL_19c3: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_19c8: throw - - IL_19c9: ldarg.0 - IL_19ca: ldfld float64 MCCTest.VType7::f151 - IL_19cf: ldarga.s expected - IL_19d1: ldfld float64 MCCTest.VType7::f151 - IL_19d6: ceq - IL_19d8: stloc.0 - IL_19d9: ldloc.0 - IL_19da: brtrue.s IL_19f5 - - IL_19dc: nop - IL_19dd: ldstr "f151" - IL_19e2: ldarg.0 - IL_19e3: ldfld float64 MCCTest.VType7::f151 - IL_19e8: ldarga.s expected - IL_19ea: ldfld float64 MCCTest.VType7::f151 - IL_19ef: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_19f4: throw - - IL_19f5: ldarg.0 - IL_19f6: ldfld float64 MCCTest.VType7::f152 - IL_19fb: ldarga.s expected - IL_19fd: ldfld float64 MCCTest.VType7::f152 - IL_1a02: ceq - IL_1a04: stloc.0 - IL_1a05: ldloc.0 - IL_1a06: brtrue.s IL_1a21 - - IL_1a08: nop - IL_1a09: ldstr "f152" - IL_1a0e: ldarg.0 - IL_1a0f: ldfld float64 MCCTest.VType7::f152 - IL_1a14: ldarga.s expected - IL_1a16: ldfld float64 MCCTest.VType7::f152 - IL_1a1b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1a20: throw - - IL_1a21: ldarg.0 - IL_1a22: ldfld float64 MCCTest.VType7::f153 - IL_1a27: ldarga.s expected - IL_1a29: ldfld float64 MCCTest.VType7::f153 - IL_1a2e: ceq - IL_1a30: stloc.0 - IL_1a31: ldloc.0 - IL_1a32: brtrue.s IL_1a4d - - IL_1a34: nop - IL_1a35: ldstr "f153" - IL_1a3a: ldarg.0 - IL_1a3b: ldfld float64 MCCTest.VType7::f153 - IL_1a40: ldarga.s expected - IL_1a42: ldfld float64 MCCTest.VType7::f153 - IL_1a47: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1a4c: throw - - IL_1a4d: ldarg.0 - IL_1a4e: ldfld float64 MCCTest.VType7::f154 - IL_1a53: ldarga.s expected - IL_1a55: ldfld float64 MCCTest.VType7::f154 - IL_1a5a: ceq - IL_1a5c: stloc.0 - IL_1a5d: ldloc.0 - IL_1a5e: brtrue.s IL_1a79 - - IL_1a60: nop - IL_1a61: ldstr "f154" - IL_1a66: ldarg.0 - IL_1a67: ldfld float64 MCCTest.VType7::f154 - IL_1a6c: ldarga.s expected - IL_1a6e: ldfld float64 MCCTest.VType7::f154 - IL_1a73: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1a78: throw - - IL_1a79: ldarg.0 - IL_1a7a: ldfld float64 MCCTest.VType7::f155 - IL_1a7f: ldarga.s expected - IL_1a81: ldfld float64 MCCTest.VType7::f155 - IL_1a86: ceq - IL_1a88: stloc.0 - IL_1a89: ldloc.0 - IL_1a8a: brtrue.s IL_1aa5 - - IL_1a8c: nop - IL_1a8d: ldstr "f155" - IL_1a92: ldarg.0 - IL_1a93: ldfld float64 MCCTest.VType7::f155 - IL_1a98: ldarga.s expected - IL_1a9a: ldfld float64 MCCTest.VType7::f155 - IL_1a9f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1aa4: throw - - IL_1aa5: ldarg.0 - IL_1aa6: ldfld float64 MCCTest.VType7::f156 - IL_1aab: ldarga.s expected - IL_1aad: ldfld float64 MCCTest.VType7::f156 - IL_1ab2: ceq - IL_1ab4: stloc.0 - IL_1ab5: ldloc.0 - IL_1ab6: brtrue.s IL_1ad1 - - IL_1ab8: nop - IL_1ab9: ldstr "f156" - IL_1abe: ldarg.0 - IL_1abf: ldfld float64 MCCTest.VType7::f156 - IL_1ac4: ldarga.s expected - IL_1ac6: ldfld float64 MCCTest.VType7::f156 - IL_1acb: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1ad0: throw - - IL_1ad1: ldarg.0 - IL_1ad2: ldfld float64 MCCTest.VType7::f157 - IL_1ad7: ldarga.s expected - IL_1ad9: ldfld float64 MCCTest.VType7::f157 - IL_1ade: ceq - IL_1ae0: stloc.0 - IL_1ae1: ldloc.0 - IL_1ae2: brtrue.s IL_1afd - - IL_1ae4: nop - IL_1ae5: ldstr "f157" - IL_1aea: ldarg.0 - IL_1aeb: ldfld float64 MCCTest.VType7::f157 - IL_1af0: ldarga.s expected - IL_1af2: ldfld float64 MCCTest.VType7::f157 - IL_1af7: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1afc: throw - - IL_1afd: ldarg.0 - IL_1afe: ldfld float64 MCCTest.VType7::f158 - IL_1b03: ldarga.s expected - IL_1b05: ldfld float64 MCCTest.VType7::f158 - IL_1b0a: ceq - IL_1b0c: stloc.0 - IL_1b0d: ldloc.0 - IL_1b0e: brtrue.s IL_1b29 - - IL_1b10: nop - IL_1b11: ldstr "f158" - IL_1b16: ldarg.0 - IL_1b17: ldfld float64 MCCTest.VType7::f158 - IL_1b1c: ldarga.s expected - IL_1b1e: ldfld float64 MCCTest.VType7::f158 - IL_1b23: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1b28: throw - - IL_1b29: ldarg.0 - IL_1b2a: ldfld float64 MCCTest.VType7::f159 - IL_1b2f: ldarga.s expected - IL_1b31: ldfld float64 MCCTest.VType7::f159 - IL_1b36: ceq - IL_1b38: stloc.0 - IL_1b39: ldloc.0 - IL_1b3a: brtrue.s IL_1b55 - - IL_1b3c: nop - IL_1b3d: ldstr "f159" - IL_1b42: ldarg.0 - IL_1b43: ldfld float64 MCCTest.VType7::f159 - IL_1b48: ldarga.s expected - IL_1b4a: ldfld float64 MCCTest.VType7::f159 - IL_1b4f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1b54: throw - - IL_1b55: ldarg.0 - IL_1b56: ldfld float64 MCCTest.VType7::f160 - IL_1b5b: ldarga.s expected - IL_1b5d: ldfld float64 MCCTest.VType7::f160 - IL_1b62: ceq - IL_1b64: stloc.0 - IL_1b65: ldloc.0 - IL_1b66: brtrue.s IL_1b81 - - IL_1b68: nop - IL_1b69: ldstr "f160" - IL_1b6e: ldarg.0 - IL_1b6f: ldfld float64 MCCTest.VType7::f160 - IL_1b74: ldarga.s expected - IL_1b76: ldfld float64 MCCTest.VType7::f160 - IL_1b7b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1b80: throw - - IL_1b81: ldarg.0 - IL_1b82: ldfld float64 MCCTest.VType7::f161 - IL_1b87: ldarga.s expected - IL_1b89: ldfld float64 MCCTest.VType7::f161 - IL_1b8e: ceq - IL_1b90: stloc.0 - IL_1b91: ldloc.0 - IL_1b92: brtrue.s IL_1bad - - IL_1b94: nop - IL_1b95: ldstr "f161" - IL_1b9a: ldarg.0 - IL_1b9b: ldfld float64 MCCTest.VType7::f161 - IL_1ba0: ldarga.s expected - IL_1ba2: ldfld float64 MCCTest.VType7::f161 - IL_1ba7: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1bac: throw - - IL_1bad: ldarg.0 - IL_1bae: ldfld float64 MCCTest.VType7::f162 - IL_1bb3: ldarga.s expected - IL_1bb5: ldfld float64 MCCTest.VType7::f162 - IL_1bba: ceq - IL_1bbc: stloc.0 - IL_1bbd: ldloc.0 - IL_1bbe: brtrue.s IL_1bd9 - - IL_1bc0: nop - IL_1bc1: ldstr "f162" - IL_1bc6: ldarg.0 - IL_1bc7: ldfld float64 MCCTest.VType7::f162 - IL_1bcc: ldarga.s expected - IL_1bce: ldfld float64 MCCTest.VType7::f162 - IL_1bd3: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1bd8: throw - - IL_1bd9: ldarg.0 - IL_1bda: ldfld float64 MCCTest.VType7::f163 - IL_1bdf: ldarga.s expected - IL_1be1: ldfld float64 MCCTest.VType7::f163 - IL_1be6: ceq - IL_1be8: stloc.0 - IL_1be9: ldloc.0 - IL_1bea: brtrue.s IL_1c05 - - IL_1bec: nop - IL_1bed: ldstr "f163" - IL_1bf2: ldarg.0 - IL_1bf3: ldfld float64 MCCTest.VType7::f163 - IL_1bf8: ldarga.s expected - IL_1bfa: ldfld float64 MCCTest.VType7::f163 - IL_1bff: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1c04: throw - - IL_1c05: ldarg.0 - IL_1c06: ldfld float64 MCCTest.VType7::f164 - IL_1c0b: ldarga.s expected - IL_1c0d: ldfld float64 MCCTest.VType7::f164 - IL_1c12: ceq - IL_1c14: stloc.0 - IL_1c15: ldloc.0 - IL_1c16: brtrue.s IL_1c31 - - IL_1c18: nop - IL_1c19: ldstr "f164" - IL_1c1e: ldarg.0 - IL_1c1f: ldfld float64 MCCTest.VType7::f164 - IL_1c24: ldarga.s expected - IL_1c26: ldfld float64 MCCTest.VType7::f164 - IL_1c2b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1c30: throw - - IL_1c31: ldarg.0 - IL_1c32: ldfld float64 MCCTest.VType7::f165 - IL_1c37: ldarga.s expected - IL_1c39: ldfld float64 MCCTest.VType7::f165 - IL_1c3e: ceq - IL_1c40: stloc.0 - IL_1c41: ldloc.0 - IL_1c42: brtrue.s IL_1c5d - - IL_1c44: nop - IL_1c45: ldstr "f165" - IL_1c4a: ldarg.0 - IL_1c4b: ldfld float64 MCCTest.VType7::f165 - IL_1c50: ldarga.s expected - IL_1c52: ldfld float64 MCCTest.VType7::f165 - IL_1c57: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1c5c: throw - - IL_1c5d: ldarg.0 - IL_1c5e: ldfld float64 MCCTest.VType7::f166 - IL_1c63: ldarga.s expected - IL_1c65: ldfld float64 MCCTest.VType7::f166 - IL_1c6a: ceq - IL_1c6c: stloc.0 - IL_1c6d: ldloc.0 - IL_1c6e: brtrue.s IL_1c89 - - IL_1c70: nop - IL_1c71: ldstr "f166" - IL_1c76: ldarg.0 - IL_1c77: ldfld float64 MCCTest.VType7::f166 - IL_1c7c: ldarga.s expected - IL_1c7e: ldfld float64 MCCTest.VType7::f166 - IL_1c83: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1c88: throw - - IL_1c89: ldarg.0 - IL_1c8a: ldfld float64 MCCTest.VType7::f167 - IL_1c8f: ldarga.s expected - IL_1c91: ldfld float64 MCCTest.VType7::f167 - IL_1c96: ceq - IL_1c98: stloc.0 - IL_1c99: ldloc.0 - IL_1c9a: brtrue.s IL_1cb5 - - IL_1c9c: nop - IL_1c9d: ldstr "f167" - IL_1ca2: ldarg.0 - IL_1ca3: ldfld float64 MCCTest.VType7::f167 - IL_1ca8: ldarga.s expected - IL_1caa: ldfld float64 MCCTest.VType7::f167 - IL_1caf: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1cb4: throw - - IL_1cb5: ldarg.0 - IL_1cb6: ldfld float64 MCCTest.VType7::f168 - IL_1cbb: ldarga.s expected - IL_1cbd: ldfld float64 MCCTest.VType7::f168 - IL_1cc2: ceq - IL_1cc4: stloc.0 - IL_1cc5: ldloc.0 - IL_1cc6: brtrue.s IL_1ce1 - - IL_1cc8: nop - IL_1cc9: ldstr "f168" - IL_1cce: ldarg.0 - IL_1ccf: ldfld float64 MCCTest.VType7::f168 - IL_1cd4: ldarga.s expected - IL_1cd6: ldfld float64 MCCTest.VType7::f168 - IL_1cdb: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1ce0: throw - - IL_1ce1: ldarg.0 - IL_1ce2: ldfld float64 MCCTest.VType7::f169 - IL_1ce7: ldarga.s expected - IL_1ce9: ldfld float64 MCCTest.VType7::f169 - IL_1cee: ceq - IL_1cf0: stloc.0 - IL_1cf1: ldloc.0 - IL_1cf2: brtrue.s IL_1d0d - - IL_1cf4: nop - IL_1cf5: ldstr "f169" - IL_1cfa: ldarg.0 - IL_1cfb: ldfld float64 MCCTest.VType7::f169 - IL_1d00: ldarga.s expected - IL_1d02: ldfld float64 MCCTest.VType7::f169 - IL_1d07: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1d0c: throw - - IL_1d0d: ldarg.0 - IL_1d0e: ldfld float64 MCCTest.VType7::f170 - IL_1d13: ldarga.s expected - IL_1d15: ldfld float64 MCCTest.VType7::f170 - IL_1d1a: ceq - IL_1d1c: stloc.0 - IL_1d1d: ldloc.0 - IL_1d1e: brtrue.s IL_1d39 - - IL_1d20: nop - IL_1d21: ldstr "f170" - IL_1d26: ldarg.0 - IL_1d27: ldfld float64 MCCTest.VType7::f170 - IL_1d2c: ldarga.s expected - IL_1d2e: ldfld float64 MCCTest.VType7::f170 - IL_1d33: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1d38: throw - - IL_1d39: ldarg.0 - IL_1d3a: ldfld float64 MCCTest.VType7::f171 - IL_1d3f: ldarga.s expected - IL_1d41: ldfld float64 MCCTest.VType7::f171 - IL_1d46: ceq - IL_1d48: stloc.0 - IL_1d49: ldloc.0 - IL_1d4a: brtrue.s IL_1d65 - - IL_1d4c: nop - IL_1d4d: ldstr "f171" - IL_1d52: ldarg.0 - IL_1d53: ldfld float64 MCCTest.VType7::f171 - IL_1d58: ldarga.s expected - IL_1d5a: ldfld float64 MCCTest.VType7::f171 - IL_1d5f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1d64: throw - - IL_1d65: ldarg.0 - IL_1d66: ldfld float64 MCCTest.VType7::f172 - IL_1d6b: ldarga.s expected - IL_1d6d: ldfld float64 MCCTest.VType7::f172 - IL_1d72: ceq - IL_1d74: stloc.0 - IL_1d75: ldloc.0 - IL_1d76: brtrue.s IL_1d91 - - IL_1d78: nop - IL_1d79: ldstr "f172" - IL_1d7e: ldarg.0 - IL_1d7f: ldfld float64 MCCTest.VType7::f172 - IL_1d84: ldarga.s expected - IL_1d86: ldfld float64 MCCTest.VType7::f172 - IL_1d8b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1d90: throw - - IL_1d91: ldarg.0 - IL_1d92: ldfld float64 MCCTest.VType7::f173 - IL_1d97: ldarga.s expected - IL_1d99: ldfld float64 MCCTest.VType7::f173 - IL_1d9e: ceq - IL_1da0: stloc.0 - IL_1da1: ldloc.0 - IL_1da2: brtrue.s IL_1dbd - - IL_1da4: nop - IL_1da5: ldstr "f173" - IL_1daa: ldarg.0 - IL_1dab: ldfld float64 MCCTest.VType7::f173 - IL_1db0: ldarga.s expected - IL_1db2: ldfld float64 MCCTest.VType7::f173 - IL_1db7: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1dbc: throw - - IL_1dbd: ldarg.0 - IL_1dbe: ldfld float64 MCCTest.VType7::f174 - IL_1dc3: ldarga.s expected - IL_1dc5: ldfld float64 MCCTest.VType7::f174 - IL_1dca: ceq - IL_1dcc: stloc.0 - IL_1dcd: ldloc.0 - IL_1dce: brtrue.s IL_1de9 - - IL_1dd0: nop - IL_1dd1: ldstr "f174" - IL_1dd6: ldarg.0 - IL_1dd7: ldfld float64 MCCTest.VType7::f174 - IL_1ddc: ldarga.s expected - IL_1dde: ldfld float64 MCCTest.VType7::f174 - IL_1de3: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1de8: throw - - IL_1de9: ldarg.0 - IL_1dea: ldfld float64 MCCTest.VType7::f175 - IL_1def: ldarga.s expected - IL_1df1: ldfld float64 MCCTest.VType7::f175 - IL_1df6: ceq - IL_1df8: stloc.0 - IL_1df9: ldloc.0 - IL_1dfa: brtrue.s IL_1e15 - - IL_1dfc: nop - IL_1dfd: ldstr "f175" - IL_1e02: ldarg.0 - IL_1e03: ldfld float64 MCCTest.VType7::f175 - IL_1e08: ldarga.s expected - IL_1e0a: ldfld float64 MCCTest.VType7::f175 - IL_1e0f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1e14: throw - - IL_1e15: ldarg.0 - IL_1e16: ldfld float64 MCCTest.VType7::f176 - IL_1e1b: ldarga.s expected - IL_1e1d: ldfld float64 MCCTest.VType7::f176 - IL_1e22: ceq - IL_1e24: stloc.0 - IL_1e25: ldloc.0 - IL_1e26: brtrue.s IL_1e41 - - IL_1e28: nop - IL_1e29: ldstr "f176" - IL_1e2e: ldarg.0 - IL_1e2f: ldfld float64 MCCTest.VType7::f176 - IL_1e34: ldarga.s expected - IL_1e36: ldfld float64 MCCTest.VType7::f176 - IL_1e3b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1e40: throw - - IL_1e41: ldarg.0 - IL_1e42: ldfld float64 MCCTest.VType7::f177 - IL_1e47: ldarga.s expected - IL_1e49: ldfld float64 MCCTest.VType7::f177 - IL_1e4e: ceq - IL_1e50: stloc.0 - IL_1e51: ldloc.0 - IL_1e52: brtrue.s IL_1e6d - - IL_1e54: nop - IL_1e55: ldstr "f177" - IL_1e5a: ldarg.0 - IL_1e5b: ldfld float64 MCCTest.VType7::f177 - IL_1e60: ldarga.s expected - IL_1e62: ldfld float64 MCCTest.VType7::f177 - IL_1e67: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1e6c: throw - - IL_1e6d: ldarg.0 - IL_1e6e: ldfld float64 MCCTest.VType7::f178 - IL_1e73: ldarga.s expected - IL_1e75: ldfld float64 MCCTest.VType7::f178 - IL_1e7a: ceq - IL_1e7c: stloc.0 - IL_1e7d: ldloc.0 - IL_1e7e: brtrue.s IL_1e99 - - IL_1e80: nop - IL_1e81: ldstr "f178" - IL_1e86: ldarg.0 - IL_1e87: ldfld float64 MCCTest.VType7::f178 - IL_1e8c: ldarga.s expected - IL_1e8e: ldfld float64 MCCTest.VType7::f178 - IL_1e93: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1e98: throw - - IL_1e99: ldarg.0 - IL_1e9a: ldfld float64 MCCTest.VType7::f179 - IL_1e9f: ldarga.s expected - IL_1ea1: ldfld float64 MCCTest.VType7::f179 - IL_1ea6: ceq - IL_1ea8: stloc.0 - IL_1ea9: ldloc.0 - IL_1eaa: brtrue.s IL_1ec5 - - IL_1eac: nop - IL_1ead: ldstr "f179" - IL_1eb2: ldarg.0 - IL_1eb3: ldfld float64 MCCTest.VType7::f179 - IL_1eb8: ldarga.s expected - IL_1eba: ldfld float64 MCCTest.VType7::f179 - IL_1ebf: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1ec4: throw - - IL_1ec5: ldarg.0 - IL_1ec6: ldfld float64 MCCTest.VType7::f180 - IL_1ecb: ldarga.s expected - IL_1ecd: ldfld float64 MCCTest.VType7::f180 - IL_1ed2: ceq - IL_1ed4: stloc.0 - IL_1ed5: ldloc.0 - IL_1ed6: brtrue.s IL_1ef1 - - IL_1ed8: nop - IL_1ed9: ldstr "f180" - IL_1ede: ldarg.0 - IL_1edf: ldfld float64 MCCTest.VType7::f180 - IL_1ee4: ldarga.s expected - IL_1ee6: ldfld float64 MCCTest.VType7::f180 - IL_1eeb: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1ef0: throw - - IL_1ef1: ldarg.0 - IL_1ef2: ldfld float64 MCCTest.VType7::f181 - IL_1ef7: ldarga.s expected - IL_1ef9: ldfld float64 MCCTest.VType7::f181 - IL_1efe: ceq - IL_1f00: stloc.0 - IL_1f01: ldloc.0 - IL_1f02: brtrue.s IL_1f1d - - IL_1f04: nop - IL_1f05: ldstr "f181" - IL_1f0a: ldarg.0 - IL_1f0b: ldfld float64 MCCTest.VType7::f181 - IL_1f10: ldarga.s expected - IL_1f12: ldfld float64 MCCTest.VType7::f181 - IL_1f17: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1f1c: throw - - IL_1f1d: ldarg.0 - IL_1f1e: ldfld float64 MCCTest.VType7::f182 - IL_1f23: ldarga.s expected - IL_1f25: ldfld float64 MCCTest.VType7::f182 - IL_1f2a: ceq - IL_1f2c: stloc.0 - IL_1f2d: ldloc.0 - IL_1f2e: brtrue.s IL_1f49 - - IL_1f30: nop - IL_1f31: ldstr "f182" - IL_1f36: ldarg.0 - IL_1f37: ldfld float64 MCCTest.VType7::f182 - IL_1f3c: ldarga.s expected - IL_1f3e: ldfld float64 MCCTest.VType7::f182 - IL_1f43: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1f48: throw - - IL_1f49: ldarg.0 - IL_1f4a: ldfld float64 MCCTest.VType7::f183 - IL_1f4f: ldarga.s expected - IL_1f51: ldfld float64 MCCTest.VType7::f183 - IL_1f56: ceq - IL_1f58: stloc.0 - IL_1f59: ldloc.0 - IL_1f5a: brtrue.s IL_1f75 - - IL_1f5c: nop - IL_1f5d: ldstr "f183" - IL_1f62: ldarg.0 - IL_1f63: ldfld float64 MCCTest.VType7::f183 - IL_1f68: ldarga.s expected - IL_1f6a: ldfld float64 MCCTest.VType7::f183 - IL_1f6f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1f74: throw - - IL_1f75: ldarg.0 - IL_1f76: ldfld float64 MCCTest.VType7::f184 - IL_1f7b: ldarga.s expected - IL_1f7d: ldfld float64 MCCTest.VType7::f184 - IL_1f82: ceq - IL_1f84: stloc.0 - IL_1f85: ldloc.0 - IL_1f86: brtrue.s IL_1fa1 - - IL_1f88: nop - IL_1f89: ldstr "f184" - IL_1f8e: ldarg.0 - IL_1f8f: ldfld float64 MCCTest.VType7::f184 - IL_1f94: ldarga.s expected - IL_1f96: ldfld float64 MCCTest.VType7::f184 - IL_1f9b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1fa0: throw - - IL_1fa1: ldarg.0 - IL_1fa2: ldfld float64 MCCTest.VType7::f185 - IL_1fa7: ldarga.s expected - IL_1fa9: ldfld float64 MCCTest.VType7::f185 - IL_1fae: ceq - IL_1fb0: stloc.0 - IL_1fb1: ldloc.0 - IL_1fb2: brtrue.s IL_1fcd - - IL_1fb4: nop - IL_1fb5: ldstr "f185" - IL_1fba: ldarg.0 - IL_1fbb: ldfld float64 MCCTest.VType7::f185 - IL_1fc0: ldarga.s expected - IL_1fc2: ldfld float64 MCCTest.VType7::f185 - IL_1fc7: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1fcc: throw - - IL_1fcd: ldarg.0 - IL_1fce: ldfld float64 MCCTest.VType7::f186 - IL_1fd3: ldarga.s expected - IL_1fd5: ldfld float64 MCCTest.VType7::f186 - IL_1fda: ceq - IL_1fdc: stloc.0 - IL_1fdd: ldloc.0 - IL_1fde: brtrue.s IL_1ff9 - - IL_1fe0: nop - IL_1fe1: ldstr "f186" - IL_1fe6: ldarg.0 - IL_1fe7: ldfld float64 MCCTest.VType7::f186 - IL_1fec: ldarga.s expected - IL_1fee: ldfld float64 MCCTest.VType7::f186 - IL_1ff3: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_1ff8: throw - - IL_1ff9: ldarg.0 - IL_1ffa: ldfld float64 MCCTest.VType7::f187 - IL_1fff: ldarga.s expected - IL_2001: ldfld float64 MCCTest.VType7::f187 - IL_2006: ceq - IL_2008: stloc.0 - IL_2009: ldloc.0 - IL_200a: brtrue.s IL_2025 - - IL_200c: nop - IL_200d: ldstr "f187" - IL_2012: ldarg.0 - IL_2013: ldfld float64 MCCTest.VType7::f187 - IL_2018: ldarga.s expected - IL_201a: ldfld float64 MCCTest.VType7::f187 - IL_201f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2024: throw - - IL_2025: ldarg.0 - IL_2026: ldfld float64 MCCTest.VType7::f188 - IL_202b: ldarga.s expected - IL_202d: ldfld float64 MCCTest.VType7::f188 - IL_2032: ceq - IL_2034: stloc.0 - IL_2035: ldloc.0 - IL_2036: brtrue.s IL_2051 - - IL_2038: nop - IL_2039: ldstr "f188" - IL_203e: ldarg.0 - IL_203f: ldfld float64 MCCTest.VType7::f188 - IL_2044: ldarga.s expected - IL_2046: ldfld float64 MCCTest.VType7::f188 - IL_204b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2050: throw - - IL_2051: ldarg.0 - IL_2052: ldfld float64 MCCTest.VType7::f189 - IL_2057: ldarga.s expected - IL_2059: ldfld float64 MCCTest.VType7::f189 - IL_205e: ceq - IL_2060: stloc.0 - IL_2061: ldloc.0 - IL_2062: brtrue.s IL_207d - - IL_2064: nop - IL_2065: ldstr "f189" - IL_206a: ldarg.0 - IL_206b: ldfld float64 MCCTest.VType7::f189 - IL_2070: ldarga.s expected - IL_2072: ldfld float64 MCCTest.VType7::f189 - IL_2077: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_207c: throw - - IL_207d: ldarg.0 - IL_207e: ldfld float64 MCCTest.VType7::f190 - IL_2083: ldarga.s expected - IL_2085: ldfld float64 MCCTest.VType7::f190 - IL_208a: ceq - IL_208c: stloc.0 - IL_208d: ldloc.0 - IL_208e: brtrue.s IL_20a9 - - IL_2090: nop - IL_2091: ldstr "f190" - IL_2096: ldarg.0 - IL_2097: ldfld float64 MCCTest.VType7::f190 - IL_209c: ldarga.s expected - IL_209e: ldfld float64 MCCTest.VType7::f190 - IL_20a3: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_20a8: throw - - IL_20a9: ldarg.0 - IL_20aa: ldfld float64 MCCTest.VType7::f191 - IL_20af: ldarga.s expected - IL_20b1: ldfld float64 MCCTest.VType7::f191 - IL_20b6: ceq - IL_20b8: stloc.0 - IL_20b9: ldloc.0 - IL_20ba: brtrue.s IL_20d5 - - IL_20bc: nop - IL_20bd: ldstr "f191" - IL_20c2: ldarg.0 - IL_20c3: ldfld float64 MCCTest.VType7::f191 - IL_20c8: ldarga.s expected - IL_20ca: ldfld float64 MCCTest.VType7::f191 - IL_20cf: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_20d4: throw - - IL_20d5: ldarg.0 - IL_20d6: ldfld float64 MCCTest.VType7::f192 - IL_20db: ldarga.s expected - IL_20dd: ldfld float64 MCCTest.VType7::f192 - IL_20e2: ceq - IL_20e4: stloc.0 - IL_20e5: ldloc.0 - IL_20e6: brtrue.s IL_2101 - - IL_20e8: nop - IL_20e9: ldstr "f192" - IL_20ee: ldarg.0 - IL_20ef: ldfld float64 MCCTest.VType7::f192 - IL_20f4: ldarga.s expected - IL_20f6: ldfld float64 MCCTest.VType7::f192 - IL_20fb: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2100: throw - - IL_2101: ldarg.0 - IL_2102: ldfld float64 MCCTest.VType7::f193 - IL_2107: ldarga.s expected - IL_2109: ldfld float64 MCCTest.VType7::f193 - IL_210e: ceq - IL_2110: stloc.0 - IL_2111: ldloc.0 - IL_2112: brtrue.s IL_212d - - IL_2114: nop - IL_2115: ldstr "f193" - IL_211a: ldarg.0 - IL_211b: ldfld float64 MCCTest.VType7::f193 - IL_2120: ldarga.s expected - IL_2122: ldfld float64 MCCTest.VType7::f193 - IL_2127: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_212c: throw - - IL_212d: ldarg.0 - IL_212e: ldfld float64 MCCTest.VType7::f194 - IL_2133: ldarga.s expected - IL_2135: ldfld float64 MCCTest.VType7::f194 - IL_213a: ceq - IL_213c: stloc.0 - IL_213d: ldloc.0 - IL_213e: brtrue.s IL_2159 - - IL_2140: nop - IL_2141: ldstr "f194" - IL_2146: ldarg.0 - IL_2147: ldfld float64 MCCTest.VType7::f194 - IL_214c: ldarga.s expected - IL_214e: ldfld float64 MCCTest.VType7::f194 - IL_2153: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2158: throw - - IL_2159: ldarg.0 - IL_215a: ldfld float64 MCCTest.VType7::f195 - IL_215f: ldarga.s expected - IL_2161: ldfld float64 MCCTest.VType7::f195 - IL_2166: ceq - IL_2168: stloc.0 - IL_2169: ldloc.0 - IL_216a: brtrue.s IL_2185 - - IL_216c: nop - IL_216d: ldstr "f195" - IL_2172: ldarg.0 - IL_2173: ldfld float64 MCCTest.VType7::f195 - IL_2178: ldarga.s expected - IL_217a: ldfld float64 MCCTest.VType7::f195 - IL_217f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2184: throw - - IL_2185: ldarg.0 - IL_2186: ldfld float64 MCCTest.VType7::f196 - IL_218b: ldarga.s expected - IL_218d: ldfld float64 MCCTest.VType7::f196 - IL_2192: ceq - IL_2194: stloc.0 - IL_2195: ldloc.0 - IL_2196: brtrue.s IL_21b1 - - IL_2198: nop - IL_2199: ldstr "f196" - IL_219e: ldarg.0 - IL_219f: ldfld float64 MCCTest.VType7::f196 - IL_21a4: ldarga.s expected - IL_21a6: ldfld float64 MCCTest.VType7::f196 - IL_21ab: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_21b0: throw - - IL_21b1: ldarg.0 - IL_21b2: ldfld float64 MCCTest.VType7::f197 - IL_21b7: ldarga.s expected - IL_21b9: ldfld float64 MCCTest.VType7::f197 - IL_21be: ceq - IL_21c0: stloc.0 - IL_21c1: ldloc.0 - IL_21c2: brtrue.s IL_21dd - - IL_21c4: nop - IL_21c5: ldstr "f197" - IL_21ca: ldarg.0 - IL_21cb: ldfld float64 MCCTest.VType7::f197 - IL_21d0: ldarga.s expected - IL_21d2: ldfld float64 MCCTest.VType7::f197 - IL_21d7: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_21dc: throw - - IL_21dd: ldarg.0 - IL_21de: ldfld float64 MCCTest.VType7::f198 - IL_21e3: ldarga.s expected - IL_21e5: ldfld float64 MCCTest.VType7::f198 - IL_21ea: ceq - IL_21ec: stloc.0 - IL_21ed: ldloc.0 - IL_21ee: brtrue.s IL_2209 - - IL_21f0: nop - IL_21f1: ldstr "f198" - IL_21f6: ldarg.0 - IL_21f7: ldfld float64 MCCTest.VType7::f198 - IL_21fc: ldarga.s expected - IL_21fe: ldfld float64 MCCTest.VType7::f198 - IL_2203: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2208: throw - - IL_2209: ldarg.0 - IL_220a: ldfld float64 MCCTest.VType7::f199 - IL_220f: ldarga.s expected - IL_2211: ldfld float64 MCCTest.VType7::f199 - IL_2216: ceq - IL_2218: stloc.0 - IL_2219: ldloc.0 - IL_221a: brtrue.s IL_2235 - - IL_221c: nop - IL_221d: ldstr "f199" - IL_2222: ldarg.0 - IL_2223: ldfld float64 MCCTest.VType7::f199 - IL_2228: ldarga.s expected - IL_222a: ldfld float64 MCCTest.VType7::f199 - IL_222f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2234: throw - - IL_2235: ldarg.0 - IL_2236: ldfld float64 MCCTest.VType7::f200 - IL_223b: ldarga.s expected - IL_223d: ldfld float64 MCCTest.VType7::f200 - IL_2242: ceq - IL_2244: stloc.0 - IL_2245: ldloc.0 - IL_2246: brtrue.s IL_2261 - - IL_2248: nop - IL_2249: ldstr "f200" - IL_224e: ldarg.0 - IL_224f: ldfld float64 MCCTest.VType7::f200 - IL_2254: ldarga.s expected - IL_2256: ldfld float64 MCCTest.VType7::f200 - IL_225b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2260: throw - - IL_2261: ldarg.0 - IL_2262: ldfld float64 MCCTest.VType7::f201 - IL_2267: ldarga.s expected - IL_2269: ldfld float64 MCCTest.VType7::f201 - IL_226e: ceq - IL_2270: stloc.0 - IL_2271: ldloc.0 - IL_2272: brtrue.s IL_228d - - IL_2274: nop - IL_2275: ldstr "f201" - IL_227a: ldarg.0 - IL_227b: ldfld float64 MCCTest.VType7::f201 - IL_2280: ldarga.s expected - IL_2282: ldfld float64 MCCTest.VType7::f201 - IL_2287: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_228c: throw - - IL_228d: ldarg.0 - IL_228e: ldfld float64 MCCTest.VType7::f202 - IL_2293: ldarga.s expected - IL_2295: ldfld float64 MCCTest.VType7::f202 - IL_229a: ceq - IL_229c: stloc.0 - IL_229d: ldloc.0 - IL_229e: brtrue.s IL_22b9 - - IL_22a0: nop - IL_22a1: ldstr "f202" - IL_22a6: ldarg.0 - IL_22a7: ldfld float64 MCCTest.VType7::f202 - IL_22ac: ldarga.s expected - IL_22ae: ldfld float64 MCCTest.VType7::f202 - IL_22b3: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_22b8: throw - - IL_22b9: ldarg.0 - IL_22ba: ldfld float64 MCCTest.VType7::f203 - IL_22bf: ldarga.s expected - IL_22c1: ldfld float64 MCCTest.VType7::f203 - IL_22c6: ceq - IL_22c8: stloc.0 - IL_22c9: ldloc.0 - IL_22ca: brtrue.s IL_22e5 - - IL_22cc: nop - IL_22cd: ldstr "f203" - IL_22d2: ldarg.0 - IL_22d3: ldfld float64 MCCTest.VType7::f203 - IL_22d8: ldarga.s expected - IL_22da: ldfld float64 MCCTest.VType7::f203 - IL_22df: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_22e4: throw - - IL_22e5: ldarg.0 - IL_22e6: ldfld float64 MCCTest.VType7::f204 - IL_22eb: ldarga.s expected - IL_22ed: ldfld float64 MCCTest.VType7::f204 - IL_22f2: ceq - IL_22f4: stloc.0 - IL_22f5: ldloc.0 - IL_22f6: brtrue.s IL_2311 - - IL_22f8: nop - IL_22f9: ldstr "f204" - IL_22fe: ldarg.0 - IL_22ff: ldfld float64 MCCTest.VType7::f204 - IL_2304: ldarga.s expected - IL_2306: ldfld float64 MCCTest.VType7::f204 - IL_230b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2310: throw - - IL_2311: ldarg.0 - IL_2312: ldfld float64 MCCTest.VType7::f205 - IL_2317: ldarga.s expected - IL_2319: ldfld float64 MCCTest.VType7::f205 - IL_231e: ceq - IL_2320: stloc.0 - IL_2321: ldloc.0 - IL_2322: brtrue.s IL_233d - - IL_2324: nop - IL_2325: ldstr "f205" - IL_232a: ldarg.0 - IL_232b: ldfld float64 MCCTest.VType7::f205 - IL_2330: ldarga.s expected - IL_2332: ldfld float64 MCCTest.VType7::f205 - IL_2337: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_233c: throw - - IL_233d: ldarg.0 - IL_233e: ldfld float64 MCCTest.VType7::f206 - IL_2343: ldarga.s expected - IL_2345: ldfld float64 MCCTest.VType7::f206 - IL_234a: ceq - IL_234c: stloc.0 - IL_234d: ldloc.0 - IL_234e: brtrue.s IL_2369 - - IL_2350: nop - IL_2351: ldstr "f206" - IL_2356: ldarg.0 - IL_2357: ldfld float64 MCCTest.VType7::f206 - IL_235c: ldarga.s expected - IL_235e: ldfld float64 MCCTest.VType7::f206 - IL_2363: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2368: throw - - IL_2369: ldarg.0 - IL_236a: ldfld float64 MCCTest.VType7::f207 - IL_236f: ldarga.s expected - IL_2371: ldfld float64 MCCTest.VType7::f207 - IL_2376: ceq - IL_2378: stloc.0 - IL_2379: ldloc.0 - IL_237a: brtrue.s IL_2395 - - IL_237c: nop - IL_237d: ldstr "f207" - IL_2382: ldarg.0 - IL_2383: ldfld float64 MCCTest.VType7::f207 - IL_2388: ldarga.s expected - IL_238a: ldfld float64 MCCTest.VType7::f207 - IL_238f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2394: throw - - IL_2395: ldarg.0 - IL_2396: ldfld float64 MCCTest.VType7::f208 - IL_239b: ldarga.s expected - IL_239d: ldfld float64 MCCTest.VType7::f208 - IL_23a2: ceq - IL_23a4: stloc.0 - IL_23a5: ldloc.0 - IL_23a6: brtrue.s IL_23c1 - - IL_23a8: nop - IL_23a9: ldstr "f208" - IL_23ae: ldarg.0 - IL_23af: ldfld float64 MCCTest.VType7::f208 - IL_23b4: ldarga.s expected - IL_23b6: ldfld float64 MCCTest.VType7::f208 - IL_23bb: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_23c0: throw - - IL_23c1: ldarg.0 - IL_23c2: ldfld float64 MCCTest.VType7::f209 - IL_23c7: ldarga.s expected - IL_23c9: ldfld float64 MCCTest.VType7::f209 - IL_23ce: ceq - IL_23d0: stloc.0 - IL_23d1: ldloc.0 - IL_23d2: brtrue.s IL_23ed - - IL_23d4: nop - IL_23d5: ldstr "f209" - IL_23da: ldarg.0 - IL_23db: ldfld float64 MCCTest.VType7::f209 - IL_23e0: ldarga.s expected - IL_23e2: ldfld float64 MCCTest.VType7::f209 - IL_23e7: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_23ec: throw - - IL_23ed: ldarg.0 - IL_23ee: ldfld float64 MCCTest.VType7::f210 - IL_23f3: ldarga.s expected - IL_23f5: ldfld float64 MCCTest.VType7::f210 - IL_23fa: ceq - IL_23fc: stloc.0 - IL_23fd: ldloc.0 - IL_23fe: brtrue.s IL_2419 - - IL_2400: nop - IL_2401: ldstr "f210" - IL_2406: ldarg.0 - IL_2407: ldfld float64 MCCTest.VType7::f210 - IL_240c: ldarga.s expected - IL_240e: ldfld float64 MCCTest.VType7::f210 - IL_2413: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2418: throw - - IL_2419: ldarg.0 - IL_241a: ldfld float64 MCCTest.VType7::f211 - IL_241f: ldarga.s expected - IL_2421: ldfld float64 MCCTest.VType7::f211 - IL_2426: ceq - IL_2428: stloc.0 - IL_2429: ldloc.0 - IL_242a: brtrue.s IL_2445 - - IL_242c: nop - IL_242d: ldstr "f211" - IL_2432: ldarg.0 - IL_2433: ldfld float64 MCCTest.VType7::f211 - IL_2438: ldarga.s expected - IL_243a: ldfld float64 MCCTest.VType7::f211 - IL_243f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2444: throw - - IL_2445: ldarg.0 - IL_2446: ldfld float64 MCCTest.VType7::f212 - IL_244b: ldarga.s expected - IL_244d: ldfld float64 MCCTest.VType7::f212 - IL_2452: ceq - IL_2454: stloc.0 - IL_2455: ldloc.0 - IL_2456: brtrue.s IL_2471 - - IL_2458: nop - IL_2459: ldstr "f212" - IL_245e: ldarg.0 - IL_245f: ldfld float64 MCCTest.VType7::f212 - IL_2464: ldarga.s expected - IL_2466: ldfld float64 MCCTest.VType7::f212 - IL_246b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2470: throw - - IL_2471: ldarg.0 - IL_2472: ldfld float64 MCCTest.VType7::f213 - IL_2477: ldarga.s expected - IL_2479: ldfld float64 MCCTest.VType7::f213 - IL_247e: ceq - IL_2480: stloc.0 - IL_2481: ldloc.0 - IL_2482: brtrue.s IL_249d - - IL_2484: nop - IL_2485: ldstr "f213" - IL_248a: ldarg.0 - IL_248b: ldfld float64 MCCTest.VType7::f213 - IL_2490: ldarga.s expected - IL_2492: ldfld float64 MCCTest.VType7::f213 - IL_2497: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_249c: throw - - IL_249d: ldarg.0 - IL_249e: ldfld float64 MCCTest.VType7::f214 - IL_24a3: ldarga.s expected - IL_24a5: ldfld float64 MCCTest.VType7::f214 - IL_24aa: ceq - IL_24ac: stloc.0 - IL_24ad: ldloc.0 - IL_24ae: brtrue.s IL_24c9 - - IL_24b0: nop - IL_24b1: ldstr "f214" - IL_24b6: ldarg.0 - IL_24b7: ldfld float64 MCCTest.VType7::f214 - IL_24bc: ldarga.s expected - IL_24be: ldfld float64 MCCTest.VType7::f214 - IL_24c3: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_24c8: throw - - IL_24c9: ldarg.0 - IL_24ca: ldfld float64 MCCTest.VType7::f215 - IL_24cf: ldarga.s expected - IL_24d1: ldfld float64 MCCTest.VType7::f215 - IL_24d6: ceq - IL_24d8: stloc.0 - IL_24d9: ldloc.0 - IL_24da: brtrue.s IL_24f5 - - IL_24dc: nop - IL_24dd: ldstr "f215" - IL_24e2: ldarg.0 - IL_24e3: ldfld float64 MCCTest.VType7::f215 - IL_24e8: ldarga.s expected - IL_24ea: ldfld float64 MCCTest.VType7::f215 - IL_24ef: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_24f4: throw - - IL_24f5: ldarg.0 - IL_24f6: ldfld float64 MCCTest.VType7::f216 - IL_24fb: ldarga.s expected - IL_24fd: ldfld float64 MCCTest.VType7::f216 - IL_2502: ceq - IL_2504: stloc.0 - IL_2505: ldloc.0 - IL_2506: brtrue.s IL_2521 - - IL_2508: nop - IL_2509: ldstr "f216" - IL_250e: ldarg.0 - IL_250f: ldfld float64 MCCTest.VType7::f216 - IL_2514: ldarga.s expected - IL_2516: ldfld float64 MCCTest.VType7::f216 - IL_251b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2520: throw - - IL_2521: ldarg.0 - IL_2522: ldfld float64 MCCTest.VType7::f217 - IL_2527: ldarga.s expected - IL_2529: ldfld float64 MCCTest.VType7::f217 - IL_252e: ceq - IL_2530: stloc.0 - IL_2531: ldloc.0 - IL_2532: brtrue.s IL_254d - - IL_2534: nop - IL_2535: ldstr "f217" - IL_253a: ldarg.0 - IL_253b: ldfld float64 MCCTest.VType7::f217 - IL_2540: ldarga.s expected - IL_2542: ldfld float64 MCCTest.VType7::f217 - IL_2547: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_254c: throw - - IL_254d: ldarg.0 - IL_254e: ldfld float64 MCCTest.VType7::f218 - IL_2553: ldarga.s expected - IL_2555: ldfld float64 MCCTest.VType7::f218 - IL_255a: ceq - IL_255c: stloc.0 - IL_255d: ldloc.0 - IL_255e: brtrue.s IL_2579 - - IL_2560: nop - IL_2561: ldstr "f218" - IL_2566: ldarg.0 - IL_2567: ldfld float64 MCCTest.VType7::f218 - IL_256c: ldarga.s expected - IL_256e: ldfld float64 MCCTest.VType7::f218 - IL_2573: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2578: throw - - IL_2579: ldarg.0 - IL_257a: ldfld float64 MCCTest.VType7::f219 - IL_257f: ldarga.s expected - IL_2581: ldfld float64 MCCTest.VType7::f219 - IL_2586: ceq - IL_2588: stloc.0 - IL_2589: ldloc.0 - IL_258a: brtrue.s IL_25a5 - - IL_258c: nop - IL_258d: ldstr "f219" - IL_2592: ldarg.0 - IL_2593: ldfld float64 MCCTest.VType7::f219 - IL_2598: ldarga.s expected - IL_259a: ldfld float64 MCCTest.VType7::f219 - IL_259f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_25a4: throw - - IL_25a5: ldarg.0 - IL_25a6: ldfld float64 MCCTest.VType7::f220 - IL_25ab: ldarga.s expected - IL_25ad: ldfld float64 MCCTest.VType7::f220 - IL_25b2: ceq - IL_25b4: stloc.0 - IL_25b5: ldloc.0 - IL_25b6: brtrue.s IL_25d1 - - IL_25b8: nop - IL_25b9: ldstr "f220" - IL_25be: ldarg.0 - IL_25bf: ldfld float64 MCCTest.VType7::f220 - IL_25c4: ldarga.s expected - IL_25c6: ldfld float64 MCCTest.VType7::f220 - IL_25cb: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_25d0: throw - - IL_25d1: ldarg.0 - IL_25d2: ldfld float64 MCCTest.VType7::f221 - IL_25d7: ldarga.s expected - IL_25d9: ldfld float64 MCCTest.VType7::f221 - IL_25de: ceq - IL_25e0: stloc.0 - IL_25e1: ldloc.0 - IL_25e2: brtrue.s IL_25fd - - IL_25e4: nop - IL_25e5: ldstr "f221" - IL_25ea: ldarg.0 - IL_25eb: ldfld float64 MCCTest.VType7::f221 - IL_25f0: ldarga.s expected - IL_25f2: ldfld float64 MCCTest.VType7::f221 - IL_25f7: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_25fc: throw - - IL_25fd: ldarg.0 - IL_25fe: ldfld float64 MCCTest.VType7::f222 - IL_2603: ldarga.s expected - IL_2605: ldfld float64 MCCTest.VType7::f222 - IL_260a: ceq - IL_260c: stloc.0 - IL_260d: ldloc.0 - IL_260e: brtrue.s IL_2629 - - IL_2610: nop - IL_2611: ldstr "f222" - IL_2616: ldarg.0 - IL_2617: ldfld float64 MCCTest.VType7::f222 - IL_261c: ldarga.s expected - IL_261e: ldfld float64 MCCTest.VType7::f222 - IL_2623: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2628: throw - - IL_2629: ldarg.0 - IL_262a: ldfld float64 MCCTest.VType7::f223 - IL_262f: ldarga.s expected - IL_2631: ldfld float64 MCCTest.VType7::f223 - IL_2636: ceq - IL_2638: stloc.0 - IL_2639: ldloc.0 - IL_263a: brtrue.s IL_2655 - - IL_263c: nop - IL_263d: ldstr "f223" - IL_2642: ldarg.0 - IL_2643: ldfld float64 MCCTest.VType7::f223 - IL_2648: ldarga.s expected - IL_264a: ldfld float64 MCCTest.VType7::f223 - IL_264f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2654: throw - - IL_2655: ldarg.0 - IL_2656: ldfld float64 MCCTest.VType7::f224 - IL_265b: ldarga.s expected - IL_265d: ldfld float64 MCCTest.VType7::f224 - IL_2662: ceq - IL_2664: stloc.0 - IL_2665: ldloc.0 - IL_2666: brtrue.s IL_2681 - - IL_2668: nop - IL_2669: ldstr "f224" - IL_266e: ldarg.0 - IL_266f: ldfld float64 MCCTest.VType7::f224 - IL_2674: ldarga.s expected - IL_2676: ldfld float64 MCCTest.VType7::f224 - IL_267b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2680: throw - - IL_2681: ldarg.0 - IL_2682: ldfld float64 MCCTest.VType7::f225 - IL_2687: ldarga.s expected - IL_2689: ldfld float64 MCCTest.VType7::f225 - IL_268e: ceq - IL_2690: stloc.0 - IL_2691: ldloc.0 - IL_2692: brtrue.s IL_26ad - - IL_2694: nop - IL_2695: ldstr "f225" - IL_269a: ldarg.0 - IL_269b: ldfld float64 MCCTest.VType7::f225 - IL_26a0: ldarga.s expected - IL_26a2: ldfld float64 MCCTest.VType7::f225 - IL_26a7: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_26ac: throw - - IL_26ad: ldarg.0 - IL_26ae: ldfld float64 MCCTest.VType7::f226 - IL_26b3: ldarga.s expected - IL_26b5: ldfld float64 MCCTest.VType7::f226 - IL_26ba: ceq - IL_26bc: stloc.0 - IL_26bd: ldloc.0 - IL_26be: brtrue.s IL_26d9 - - IL_26c0: nop - IL_26c1: ldstr "f226" - IL_26c6: ldarg.0 - IL_26c7: ldfld float64 MCCTest.VType7::f226 - IL_26cc: ldarga.s expected - IL_26ce: ldfld float64 MCCTest.VType7::f226 - IL_26d3: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_26d8: throw - - IL_26d9: ldarg.0 - IL_26da: ldfld float64 MCCTest.VType7::f227 - IL_26df: ldarga.s expected - IL_26e1: ldfld float64 MCCTest.VType7::f227 - IL_26e6: ceq - IL_26e8: stloc.0 - IL_26e9: ldloc.0 - IL_26ea: brtrue.s IL_2705 - - IL_26ec: nop - IL_26ed: ldstr "f227" - IL_26f2: ldarg.0 - IL_26f3: ldfld float64 MCCTest.VType7::f227 - IL_26f8: ldarga.s expected - IL_26fa: ldfld float64 MCCTest.VType7::f227 - IL_26ff: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2704: throw - - IL_2705: ldarg.0 - IL_2706: ldfld float64 MCCTest.VType7::f228 - IL_270b: ldarga.s expected - IL_270d: ldfld float64 MCCTest.VType7::f228 - IL_2712: ceq - IL_2714: stloc.0 - IL_2715: ldloc.0 - IL_2716: brtrue.s IL_2731 - - IL_2718: nop - IL_2719: ldstr "f228" - IL_271e: ldarg.0 - IL_271f: ldfld float64 MCCTest.VType7::f228 - IL_2724: ldarga.s expected - IL_2726: ldfld float64 MCCTest.VType7::f228 - IL_272b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2730: throw - - IL_2731: ldarg.0 - IL_2732: ldfld float64 MCCTest.VType7::f229 - IL_2737: ldarga.s expected - IL_2739: ldfld float64 MCCTest.VType7::f229 - IL_273e: ceq - IL_2740: stloc.0 - IL_2741: ldloc.0 - IL_2742: brtrue.s IL_275d - - IL_2744: nop - IL_2745: ldstr "f229" - IL_274a: ldarg.0 - IL_274b: ldfld float64 MCCTest.VType7::f229 - IL_2750: ldarga.s expected - IL_2752: ldfld float64 MCCTest.VType7::f229 - IL_2757: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_275c: throw - - IL_275d: ldarg.0 - IL_275e: ldfld float64 MCCTest.VType7::f230 - IL_2763: ldarga.s expected - IL_2765: ldfld float64 MCCTest.VType7::f230 - IL_276a: ceq - IL_276c: stloc.0 - IL_276d: ldloc.0 - IL_276e: brtrue.s IL_2789 - - IL_2770: nop - IL_2771: ldstr "f230" - IL_2776: ldarg.0 - IL_2777: ldfld float64 MCCTest.VType7::f230 - IL_277c: ldarga.s expected - IL_277e: ldfld float64 MCCTest.VType7::f230 - IL_2783: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2788: throw - - IL_2789: ldarg.0 - IL_278a: ldfld float64 MCCTest.VType7::f231 - IL_278f: ldarga.s expected - IL_2791: ldfld float64 MCCTest.VType7::f231 - IL_2796: ceq - IL_2798: stloc.0 - IL_2799: ldloc.0 - IL_279a: brtrue.s IL_27b5 - - IL_279c: nop - IL_279d: ldstr "f231" - IL_27a2: ldarg.0 - IL_27a3: ldfld float64 MCCTest.VType7::f231 - IL_27a8: ldarga.s expected - IL_27aa: ldfld float64 MCCTest.VType7::f231 - IL_27af: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_27b4: throw - - IL_27b5: ldarg.0 - IL_27b6: ldfld float64 MCCTest.VType7::f232 - IL_27bb: ldarga.s expected - IL_27bd: ldfld float64 MCCTest.VType7::f232 - IL_27c2: ceq - IL_27c4: stloc.0 - IL_27c5: ldloc.0 - IL_27c6: brtrue.s IL_27e1 - - IL_27c8: nop - IL_27c9: ldstr "f232" - IL_27ce: ldarg.0 - IL_27cf: ldfld float64 MCCTest.VType7::f232 - IL_27d4: ldarga.s expected - IL_27d6: ldfld float64 MCCTest.VType7::f232 - IL_27db: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_27e0: throw - - IL_27e1: ldarg.0 - IL_27e2: ldfld float64 MCCTest.VType7::f233 - IL_27e7: ldarga.s expected - IL_27e9: ldfld float64 MCCTest.VType7::f233 - IL_27ee: ceq - IL_27f0: stloc.0 - IL_27f1: ldloc.0 - IL_27f2: brtrue.s IL_280d - - IL_27f4: nop - IL_27f5: ldstr "f233" - IL_27fa: ldarg.0 - IL_27fb: ldfld float64 MCCTest.VType7::f233 - IL_2800: ldarga.s expected - IL_2802: ldfld float64 MCCTest.VType7::f233 - IL_2807: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_280c: throw - - IL_280d: ldarg.0 - IL_280e: ldfld float64 MCCTest.VType7::f234 - IL_2813: ldarga.s expected - IL_2815: ldfld float64 MCCTest.VType7::f234 - IL_281a: ceq - IL_281c: stloc.0 - IL_281d: ldloc.0 - IL_281e: brtrue.s IL_2839 - - IL_2820: nop - IL_2821: ldstr "f234" - IL_2826: ldarg.0 - IL_2827: ldfld float64 MCCTest.VType7::f234 - IL_282c: ldarga.s expected - IL_282e: ldfld float64 MCCTest.VType7::f234 - IL_2833: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2838: throw - - IL_2839: ldarg.0 - IL_283a: ldfld float64 MCCTest.VType7::f235 - IL_283f: ldarga.s expected - IL_2841: ldfld float64 MCCTest.VType7::f235 - IL_2846: ceq - IL_2848: stloc.0 - IL_2849: ldloc.0 - IL_284a: brtrue.s IL_2865 - - IL_284c: nop - IL_284d: ldstr "f235" - IL_2852: ldarg.0 - IL_2853: ldfld float64 MCCTest.VType7::f235 - IL_2858: ldarga.s expected - IL_285a: ldfld float64 MCCTest.VType7::f235 - IL_285f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2864: throw - - IL_2865: ldarg.0 - IL_2866: ldfld float64 MCCTest.VType7::f236 - IL_286b: ldarga.s expected - IL_286d: ldfld float64 MCCTest.VType7::f236 - IL_2872: ceq - IL_2874: stloc.0 - IL_2875: ldloc.0 - IL_2876: brtrue.s IL_2891 - - IL_2878: nop - IL_2879: ldstr "f236" - IL_287e: ldarg.0 - IL_287f: ldfld float64 MCCTest.VType7::f236 - IL_2884: ldarga.s expected - IL_2886: ldfld float64 MCCTest.VType7::f236 - IL_288b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2890: throw - - IL_2891: ldarg.0 - IL_2892: ldfld float64 MCCTest.VType7::f237 - IL_2897: ldarga.s expected - IL_2899: ldfld float64 MCCTest.VType7::f237 - IL_289e: ceq - IL_28a0: stloc.0 - IL_28a1: ldloc.0 - IL_28a2: brtrue.s IL_28bd - - IL_28a4: nop - IL_28a5: ldstr "f237" - IL_28aa: ldarg.0 - IL_28ab: ldfld float64 MCCTest.VType7::f237 - IL_28b0: ldarga.s expected - IL_28b2: ldfld float64 MCCTest.VType7::f237 - IL_28b7: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_28bc: throw - - IL_28bd: ldarg.0 - IL_28be: ldfld float64 MCCTest.VType7::f238 - IL_28c3: ldarga.s expected - IL_28c5: ldfld float64 MCCTest.VType7::f238 - IL_28ca: ceq - IL_28cc: stloc.0 - IL_28cd: ldloc.0 - IL_28ce: brtrue.s IL_28e9 - - IL_28d0: nop - IL_28d1: ldstr "f238" - IL_28d6: ldarg.0 - IL_28d7: ldfld float64 MCCTest.VType7::f238 - IL_28dc: ldarga.s expected - IL_28de: ldfld float64 MCCTest.VType7::f238 - IL_28e3: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_28e8: throw - - IL_28e9: ldarg.0 - IL_28ea: ldfld float64 MCCTest.VType7::f239 - IL_28ef: ldarga.s expected - IL_28f1: ldfld float64 MCCTest.VType7::f239 - IL_28f6: ceq - IL_28f8: stloc.0 - IL_28f9: ldloc.0 - IL_28fa: brtrue.s IL_2915 - - IL_28fc: nop - IL_28fd: ldstr "f239" - IL_2902: ldarg.0 - IL_2903: ldfld float64 MCCTest.VType7::f239 - IL_2908: ldarga.s expected - IL_290a: ldfld float64 MCCTest.VType7::f239 - IL_290f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2914: throw - - IL_2915: ldarg.0 - IL_2916: ldfld float64 MCCTest.VType7::f240 - IL_291b: ldarga.s expected - IL_291d: ldfld float64 MCCTest.VType7::f240 - IL_2922: ceq - IL_2924: stloc.0 - IL_2925: ldloc.0 - IL_2926: brtrue.s IL_2941 - - IL_2928: nop - IL_2929: ldstr "f240" - IL_292e: ldarg.0 - IL_292f: ldfld float64 MCCTest.VType7::f240 - IL_2934: ldarga.s expected - IL_2936: ldfld float64 MCCTest.VType7::f240 - IL_293b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2940: throw - - IL_2941: ldarg.0 - IL_2942: ldfld float64 MCCTest.VType7::f241 - IL_2947: ldarga.s expected - IL_2949: ldfld float64 MCCTest.VType7::f241 - IL_294e: ceq - IL_2950: stloc.0 - IL_2951: ldloc.0 - IL_2952: brtrue.s IL_296d - - IL_2954: nop - IL_2955: ldstr "f241" - IL_295a: ldarg.0 - IL_295b: ldfld float64 MCCTest.VType7::f241 - IL_2960: ldarga.s expected - IL_2962: ldfld float64 MCCTest.VType7::f241 - IL_2967: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_296c: throw - - IL_296d: ldarg.0 - IL_296e: ldfld float64 MCCTest.VType7::f242 - IL_2973: ldarga.s expected - IL_2975: ldfld float64 MCCTest.VType7::f242 - IL_297a: ceq - IL_297c: stloc.0 - IL_297d: ldloc.0 - IL_297e: brtrue.s IL_2999 - - IL_2980: nop - IL_2981: ldstr "f242" - IL_2986: ldarg.0 - IL_2987: ldfld float64 MCCTest.VType7::f242 - IL_298c: ldarga.s expected - IL_298e: ldfld float64 MCCTest.VType7::f242 - IL_2993: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2998: throw - - IL_2999: ldarg.0 - IL_299a: ldfld float64 MCCTest.VType7::f243 - IL_299f: ldarga.s expected - IL_29a1: ldfld float64 MCCTest.VType7::f243 - IL_29a6: ceq - IL_29a8: stloc.0 - IL_29a9: ldloc.0 - IL_29aa: brtrue.s IL_29c5 - - IL_29ac: nop - IL_29ad: ldstr "f243" - IL_29b2: ldarg.0 - IL_29b3: ldfld float64 MCCTest.VType7::f243 - IL_29b8: ldarga.s expected - IL_29ba: ldfld float64 MCCTest.VType7::f243 - IL_29bf: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_29c4: throw - - IL_29c5: ldarg.0 - IL_29c6: ldfld float64 MCCTest.VType7::f244 - IL_29cb: ldarga.s expected - IL_29cd: ldfld float64 MCCTest.VType7::f244 - IL_29d2: ceq - IL_29d4: stloc.0 - IL_29d5: ldloc.0 - IL_29d6: brtrue.s IL_29f1 - - IL_29d8: nop - IL_29d9: ldstr "f244" - IL_29de: ldarg.0 - IL_29df: ldfld float64 MCCTest.VType7::f244 - IL_29e4: ldarga.s expected - IL_29e6: ldfld float64 MCCTest.VType7::f244 - IL_29eb: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_29f0: throw - - IL_29f1: ldarg.0 - IL_29f2: ldfld float64 MCCTest.VType7::f245 - IL_29f7: ldarga.s expected - IL_29f9: ldfld float64 MCCTest.VType7::f245 - IL_29fe: ceq - IL_2a00: stloc.0 - IL_2a01: ldloc.0 - IL_2a02: brtrue.s IL_2a1d - - IL_2a04: nop - IL_2a05: ldstr "f245" - IL_2a0a: ldarg.0 - IL_2a0b: ldfld float64 MCCTest.VType7::f245 - IL_2a10: ldarga.s expected - IL_2a12: ldfld float64 MCCTest.VType7::f245 - IL_2a17: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2a1c: throw - - IL_2a1d: ldarg.0 - IL_2a1e: ldfld float64 MCCTest.VType7::f246 - IL_2a23: ldarga.s expected - IL_2a25: ldfld float64 MCCTest.VType7::f246 - IL_2a2a: ceq - IL_2a2c: stloc.0 - IL_2a2d: ldloc.0 - IL_2a2e: brtrue.s IL_2a49 - - IL_2a30: nop - IL_2a31: ldstr "f246" - IL_2a36: ldarg.0 - IL_2a37: ldfld float64 MCCTest.VType7::f246 - IL_2a3c: ldarga.s expected - IL_2a3e: ldfld float64 MCCTest.VType7::f246 - IL_2a43: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2a48: throw - - IL_2a49: ldarg.0 - IL_2a4a: ldfld float64 MCCTest.VType7::f247 - IL_2a4f: ldarga.s expected - IL_2a51: ldfld float64 MCCTest.VType7::f247 - IL_2a56: ceq - IL_2a58: stloc.0 - IL_2a59: ldloc.0 - IL_2a5a: brtrue.s IL_2a75 - - IL_2a5c: nop - IL_2a5d: ldstr "f247" - IL_2a62: ldarg.0 - IL_2a63: ldfld float64 MCCTest.VType7::f247 - IL_2a68: ldarga.s expected - IL_2a6a: ldfld float64 MCCTest.VType7::f247 - IL_2a6f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2a74: throw - - IL_2a75: ldarg.0 - IL_2a76: ldfld float64 MCCTest.VType7::f248 - IL_2a7b: ldarga.s expected - IL_2a7d: ldfld float64 MCCTest.VType7::f248 - IL_2a82: ceq - IL_2a84: stloc.0 - IL_2a85: ldloc.0 - IL_2a86: brtrue.s IL_2aa1 - - IL_2a88: nop - IL_2a89: ldstr "f248" - IL_2a8e: ldarg.0 - IL_2a8f: ldfld float64 MCCTest.VType7::f248 - IL_2a94: ldarga.s expected - IL_2a96: ldfld float64 MCCTest.VType7::f248 - IL_2a9b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2aa0: throw - - IL_2aa1: ldarg.0 - IL_2aa2: ldfld float64 MCCTest.VType7::f249 - IL_2aa7: ldarga.s expected - IL_2aa9: ldfld float64 MCCTest.VType7::f249 - IL_2aae: ceq - IL_2ab0: stloc.0 - IL_2ab1: ldloc.0 - IL_2ab2: brtrue.s IL_2acd - - IL_2ab4: nop - IL_2ab5: ldstr "f249" - IL_2aba: ldarg.0 - IL_2abb: ldfld float64 MCCTest.VType7::f249 - IL_2ac0: ldarga.s expected - IL_2ac2: ldfld float64 MCCTest.VType7::f249 - IL_2ac7: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2acc: throw - - IL_2acd: ldarg.0 - IL_2ace: ldfld float64 MCCTest.VType7::f250 - IL_2ad3: ldarga.s expected - IL_2ad5: ldfld float64 MCCTest.VType7::f250 - IL_2ada: ceq - IL_2adc: stloc.0 - IL_2add: ldloc.0 - IL_2ade: brtrue.s IL_2af9 - - IL_2ae0: nop - IL_2ae1: ldstr "f250" - IL_2ae6: ldarg.0 - IL_2ae7: ldfld float64 MCCTest.VType7::f250 - IL_2aec: ldarga.s expected - IL_2aee: ldfld float64 MCCTest.VType7::f250 - IL_2af3: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2af8: throw - - IL_2af9: ldarg.0 - IL_2afa: ldfld float64 MCCTest.VType7::f251 - IL_2aff: ldarga.s expected - IL_2b01: ldfld float64 MCCTest.VType7::f251 - IL_2b06: ceq - IL_2b08: stloc.0 - IL_2b09: ldloc.0 - IL_2b0a: brtrue.s IL_2b25 - - IL_2b0c: nop - IL_2b0d: ldstr "f251" - IL_2b12: ldarg.0 - IL_2b13: ldfld float64 MCCTest.VType7::f251 - IL_2b18: ldarga.s expected - IL_2b1a: ldfld float64 MCCTest.VType7::f251 - IL_2b1f: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2b24: throw - - IL_2b25: ldarg.0 - IL_2b26: ldfld float64 MCCTest.VType7::f252 - IL_2b2b: ldarga.s expected - IL_2b2d: ldfld float64 MCCTest.VType7::f252 - IL_2b32: ceq - IL_2b34: stloc.0 - IL_2b35: ldloc.0 - IL_2b36: brtrue.s IL_2b51 - - IL_2b38: nop - IL_2b39: ldstr "f252" - IL_2b3e: ldarg.0 - IL_2b3f: ldfld float64 MCCTest.VType7::f252 - IL_2b44: ldarga.s expected - IL_2b46: ldfld float64 MCCTest.VType7::f252 - IL_2b4b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2b50: throw - - IL_2b51: ldarg.0 - IL_2b52: ldfld float64 MCCTest.VType7::f253 - IL_2b57: ldarga.s expected - IL_2b59: ldfld float64 MCCTest.VType7::f253 - IL_2b5e: ceq - IL_2b60: stloc.0 - IL_2b61: ldloc.0 - IL_2b62: brtrue.s IL_2b7d - - IL_2b64: nop - IL_2b65: ldstr "f253" - IL_2b6a: ldarg.0 - IL_2b6b: ldfld float64 MCCTest.VType7::f253 - IL_2b70: ldarga.s expected - IL_2b72: ldfld float64 MCCTest.VType7::f253 - IL_2b77: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2b7c: throw - - IL_2b7d: ldarg.0 - IL_2b7e: ldfld float64 MCCTest.VType7::f254 - IL_2b83: ldarga.s expected - IL_2b85: ldfld float64 MCCTest.VType7::f254 - IL_2b8a: ceq - IL_2b8c: stloc.0 - IL_2b8d: ldloc.0 - IL_2b8e: brtrue.s IL_2ba9 - - IL_2b90: nop - IL_2b91: ldstr "f254" - IL_2b96: ldarg.0 - IL_2b97: ldfld float64 MCCTest.VType7::f254 - IL_2b9c: ldarga.s expected - IL_2b9e: ldfld float64 MCCTest.VType7::f254 - IL_2ba3: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2ba8: throw - - IL_2ba9: ldarg.0 - IL_2baa: ldfld float64 MCCTest.VType7::f255 - IL_2baf: ldarga.s expected - IL_2bb1: ldfld float64 MCCTest.VType7::f255 - IL_2bb6: ceq - IL_2bb8: stloc.0 - IL_2bb9: ldloc.0 - IL_2bba: brtrue.s IL_2bd5 - - IL_2bbc: nop - IL_2bbd: ldstr "f255" - IL_2bc2: ldarg.0 - IL_2bc3: ldfld float64 MCCTest.VType7::f255 - IL_2bc8: ldarga.s expected - IL_2bca: ldfld float64 MCCTest.VType7::f255 - IL_2bcf: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2bd4: throw - - IL_2bd5: ldarg.0 - IL_2bd6: ldfld float64 MCCTest.VType7::f256 - IL_2bdb: ldarga.s expected - IL_2bdd: ldfld float64 MCCTest.VType7::f256 - IL_2be2: ceq - IL_2be4: stloc.0 - IL_2be5: ldloc.0 - IL_2be6: brtrue.s IL_2c01 - - IL_2be8: nop - IL_2be9: ldstr "f256" - IL_2bee: ldarg.0 - IL_2bef: ldfld float64 MCCTest.VType7::f256 - IL_2bf4: ldarga.s expected - IL_2bf6: ldfld float64 MCCTest.VType7::f256 - IL_2bfb: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2c00: throw - - IL_2c01: ldarg.0 - IL_2c02: ldfld float64 MCCTest.VType7::f257 - IL_2c07: ldarga.s expected - IL_2c09: ldfld float64 MCCTest.VType7::f257 - IL_2c0e: ceq - IL_2c10: stloc.0 - IL_2c11: ldloc.0 - IL_2c12: brtrue.s IL_2c2d - - IL_2c14: nop - IL_2c15: ldstr "f257" - IL_2c1a: ldarg.0 - IL_2c1b: ldfld float64 MCCTest.VType7::f257 - IL_2c20: ldarga.s expected - IL_2c22: ldfld float64 MCCTest.VType7::f257 - IL_2c27: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_2c2c: throw - - IL_2c2d: ret - } // end of method VType7::Check - - .method public hidebysig instance string - Dump(int32 level) cil managed - { - // Code size 7478 (0x1d36) - .maxstack 4 - .locals init (string V_0, - class [mscorlib]System.IO.StringWriter V_1, - string V_2) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: call string MCCTest.FormatUtils::GetPadding(int32) - IL_0007: stloc.0 - IL_0008: newobj instance void [mscorlib]System.IO.StringWriter::.ctor() - IL_000d: stloc.1 - IL_000e: ldloc.1 - IL_000f: ldloc.0 - IL_0010: ldstr "f1 = " - IL_0015: ldarg.0 - IL_0016: ldfld float64 MCCTest.VType7::f1 - IL_001b: box [mscorlib]System.Double - IL_0020: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0025: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_002a: nop - IL_002b: ldloc.1 - IL_002c: ldloc.0 - IL_002d: ldstr "f2 = " - IL_0032: ldarg.0 - IL_0033: ldfld float64 MCCTest.VType7::f2 - IL_0038: box [mscorlib]System.Double - IL_003d: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0042: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0047: nop - IL_0048: ldloc.1 - IL_0049: ldloc.0 - IL_004a: ldstr "f3 = " - IL_004f: ldarg.0 - IL_0050: ldfld float64 MCCTest.VType7::f3 - IL_0055: box [mscorlib]System.Double - IL_005a: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_005f: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0064: nop - IL_0065: ldloc.1 - IL_0066: ldloc.0 - IL_0067: ldstr "f4 = " - IL_006c: ldarg.0 - IL_006d: ldfld float64 MCCTest.VType7::f4 - IL_0072: box [mscorlib]System.Double - IL_0077: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_007c: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0081: nop - IL_0082: ldloc.1 - IL_0083: ldloc.0 - IL_0084: ldstr "f5 = " - IL_0089: ldarg.0 - IL_008a: ldfld float64 MCCTest.VType7::f5 - IL_008f: box [mscorlib]System.Double - IL_0094: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0099: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_009e: nop - IL_009f: ldloc.1 - IL_00a0: ldloc.0 - IL_00a1: ldstr "f6 = " - IL_00a6: ldarg.0 - IL_00a7: ldfld float64 MCCTest.VType7::f6 - IL_00ac: box [mscorlib]System.Double - IL_00b1: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_00b6: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_00bb: nop - IL_00bc: ldloc.1 - IL_00bd: ldloc.0 - IL_00be: ldstr "f7 = " - IL_00c3: ldarg.0 - IL_00c4: ldfld float64 MCCTest.VType7::f7 - IL_00c9: box [mscorlib]System.Double - IL_00ce: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_00d3: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_00d8: nop - IL_00d9: ldloc.1 - IL_00da: ldloc.0 - IL_00db: ldstr "f8 = " - IL_00e0: ldarg.0 - IL_00e1: ldfld float64 MCCTest.VType7::f8 - IL_00e6: box [mscorlib]System.Double - IL_00eb: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_00f0: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_00f5: nop - IL_00f6: ldloc.1 - IL_00f7: ldloc.0 - IL_00f8: ldstr "f9 = " - IL_00fd: ldarg.0 - IL_00fe: ldfld float64 MCCTest.VType7::f9 - IL_0103: box [mscorlib]System.Double - IL_0108: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_010d: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0112: nop - IL_0113: ldloc.1 - IL_0114: ldloc.0 - IL_0115: ldstr "f10 = " - IL_011a: ldarg.0 - IL_011b: ldfld float64 MCCTest.VType7::f10 - IL_0120: box [mscorlib]System.Double - IL_0125: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_012a: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_012f: nop - IL_0130: ldloc.1 - IL_0131: ldloc.0 - IL_0132: ldstr "f11 = " - IL_0137: ldarg.0 - IL_0138: ldfld float64 MCCTest.VType7::f11 - IL_013d: box [mscorlib]System.Double - IL_0142: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0147: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_014c: nop - IL_014d: ldloc.1 - IL_014e: ldloc.0 - IL_014f: ldstr "f12 = " - IL_0154: ldarg.0 - IL_0155: ldfld float64 MCCTest.VType7::f12 - IL_015a: box [mscorlib]System.Double - IL_015f: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0164: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0169: nop - IL_016a: ldloc.1 - IL_016b: ldloc.0 - IL_016c: ldstr "f13 = " - IL_0171: ldarg.0 - IL_0172: ldfld float64 MCCTest.VType7::f13 - IL_0177: box [mscorlib]System.Double - IL_017c: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0181: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0186: nop - IL_0187: ldloc.1 - IL_0188: ldloc.0 - IL_0189: ldstr "f14 = " - IL_018e: ldarg.0 - IL_018f: ldfld float64 MCCTest.VType7::f14 - IL_0194: box [mscorlib]System.Double - IL_0199: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_019e: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_01a3: nop - IL_01a4: ldloc.1 - IL_01a5: ldloc.0 - IL_01a6: ldstr "f15 = " - IL_01ab: ldarg.0 - IL_01ac: ldfld float64 MCCTest.VType7::f15 - IL_01b1: box [mscorlib]System.Double - IL_01b6: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_01bb: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_01c0: nop - IL_01c1: ldloc.1 - IL_01c2: ldloc.0 - IL_01c3: ldstr "f16 = " - IL_01c8: ldarg.0 - IL_01c9: ldfld float64 MCCTest.VType7::f16 - IL_01ce: box [mscorlib]System.Double - IL_01d3: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_01d8: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_01dd: nop - IL_01de: ldloc.1 - IL_01df: ldloc.0 - IL_01e0: ldstr "f17 = " - IL_01e5: ldarg.0 - IL_01e6: ldfld float64 MCCTest.VType7::f17 - IL_01eb: box [mscorlib]System.Double - IL_01f0: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_01f5: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_01fa: nop - IL_01fb: ldloc.1 - IL_01fc: ldloc.0 - IL_01fd: ldstr "f18 = " - IL_0202: ldarg.0 - IL_0203: ldfld float64 MCCTest.VType7::f18 - IL_0208: box [mscorlib]System.Double - IL_020d: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0212: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0217: nop - IL_0218: ldloc.1 - IL_0219: ldloc.0 - IL_021a: ldstr "f19 = " - IL_021f: ldarg.0 - IL_0220: ldfld float64 MCCTest.VType7::f19 - IL_0225: box [mscorlib]System.Double - IL_022a: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_022f: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0234: nop - IL_0235: ldloc.1 - IL_0236: ldloc.0 - IL_0237: ldstr "f20 = " - IL_023c: ldarg.0 - IL_023d: ldfld float64 MCCTest.VType7::f20 - IL_0242: box [mscorlib]System.Double - IL_0247: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_024c: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0251: nop - IL_0252: ldloc.1 - IL_0253: ldloc.0 - IL_0254: ldstr "f21 = " - IL_0259: ldarg.0 - IL_025a: ldfld float64 MCCTest.VType7::f21 - IL_025f: box [mscorlib]System.Double - IL_0264: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0269: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_026e: nop - IL_026f: ldloc.1 - IL_0270: ldloc.0 - IL_0271: ldstr "f22 = " - IL_0276: ldarg.0 - IL_0277: ldfld float64 MCCTest.VType7::f22 - IL_027c: box [mscorlib]System.Double - IL_0281: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0286: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_028b: nop - IL_028c: ldloc.1 - IL_028d: ldloc.0 - IL_028e: ldstr "f23 = " - IL_0293: ldarg.0 - IL_0294: ldfld float64 MCCTest.VType7::f23 - IL_0299: box [mscorlib]System.Double - IL_029e: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_02a3: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_02a8: nop - IL_02a9: ldloc.1 - IL_02aa: ldloc.0 - IL_02ab: ldstr "f24 = " - IL_02b0: ldarg.0 - IL_02b1: ldfld float64 MCCTest.VType7::f24 - IL_02b6: box [mscorlib]System.Double - IL_02bb: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_02c0: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_02c5: nop - IL_02c6: ldloc.1 - IL_02c7: ldloc.0 - IL_02c8: ldstr "f25 = " - IL_02cd: ldarg.0 - IL_02ce: ldfld float64 MCCTest.VType7::f25 - IL_02d3: box [mscorlib]System.Double - IL_02d8: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_02dd: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_02e2: nop - IL_02e3: ldloc.1 - IL_02e4: ldloc.0 - IL_02e5: ldstr "f26 = " - IL_02ea: ldarg.0 - IL_02eb: ldfld float64 MCCTest.VType7::f26 - IL_02f0: box [mscorlib]System.Double - IL_02f5: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_02fa: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_02ff: nop - IL_0300: ldloc.1 - IL_0301: ldloc.0 - IL_0302: ldstr "f27 = " - IL_0307: ldarg.0 - IL_0308: ldfld float64 MCCTest.VType7::f27 - IL_030d: box [mscorlib]System.Double - IL_0312: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0317: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_031c: nop - IL_031d: ldloc.1 - IL_031e: ldloc.0 - IL_031f: ldstr "f28 = " - IL_0324: ldarg.0 - IL_0325: ldfld float64 MCCTest.VType7::f28 - IL_032a: box [mscorlib]System.Double - IL_032f: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0334: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0339: nop - IL_033a: ldloc.1 - IL_033b: ldloc.0 - IL_033c: ldstr "f29 = " - IL_0341: ldarg.0 - IL_0342: ldfld float64 MCCTest.VType7::f29 - IL_0347: box [mscorlib]System.Double - IL_034c: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0351: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0356: nop - IL_0357: ldloc.1 - IL_0358: ldloc.0 - IL_0359: ldstr "f30 = " - IL_035e: ldarg.0 - IL_035f: ldfld float64 MCCTest.VType7::f30 - IL_0364: box [mscorlib]System.Double - IL_0369: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_036e: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0373: nop - IL_0374: ldloc.1 - IL_0375: ldloc.0 - IL_0376: ldstr "f31 = " - IL_037b: ldarg.0 - IL_037c: ldfld float64 MCCTest.VType7::f31 - IL_0381: box [mscorlib]System.Double - IL_0386: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_038b: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0390: nop - IL_0391: ldloc.1 - IL_0392: ldloc.0 - IL_0393: ldstr "f32 = " - IL_0398: ldarg.0 - IL_0399: ldfld float64 MCCTest.VType7::f32 - IL_039e: box [mscorlib]System.Double - IL_03a3: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_03a8: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_03ad: nop - IL_03ae: ldloc.1 - IL_03af: ldloc.0 - IL_03b0: ldstr "f33 = " - IL_03b5: ldarg.0 - IL_03b6: ldfld float64 MCCTest.VType7::f33 - IL_03bb: box [mscorlib]System.Double - IL_03c0: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_03c5: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_03ca: nop - IL_03cb: ldloc.1 - IL_03cc: ldloc.0 - IL_03cd: ldstr "f34 = " - IL_03d2: ldarg.0 - IL_03d3: ldfld float64 MCCTest.VType7::f34 - IL_03d8: box [mscorlib]System.Double - IL_03dd: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_03e2: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_03e7: nop - IL_03e8: ldloc.1 - IL_03e9: ldloc.0 - IL_03ea: ldstr "f35 = " - IL_03ef: ldarg.0 - IL_03f0: ldfld float64 MCCTest.VType7::f35 - IL_03f5: box [mscorlib]System.Double - IL_03fa: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_03ff: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0404: nop - IL_0405: ldloc.1 - IL_0406: ldloc.0 - IL_0407: ldstr "f36 = " - IL_040c: ldarg.0 - IL_040d: ldfld float64 MCCTest.VType7::f36 - IL_0412: box [mscorlib]System.Double - IL_0417: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_041c: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0421: nop - IL_0422: ldloc.1 - IL_0423: ldloc.0 - IL_0424: ldstr "f37 = " - IL_0429: ldarg.0 - IL_042a: ldfld float64 MCCTest.VType7::f37 - IL_042f: box [mscorlib]System.Double - IL_0434: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0439: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_043e: nop - IL_043f: ldloc.1 - IL_0440: ldloc.0 - IL_0441: ldstr "f38 = " - IL_0446: ldarg.0 - IL_0447: ldfld float64 MCCTest.VType7::f38 - IL_044c: box [mscorlib]System.Double - IL_0451: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0456: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_045b: nop - IL_045c: ldloc.1 - IL_045d: ldloc.0 - IL_045e: ldstr "f39 = " - IL_0463: ldarg.0 - IL_0464: ldfld float64 MCCTest.VType7::f39 - IL_0469: box [mscorlib]System.Double - IL_046e: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0473: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0478: nop - IL_0479: ldloc.1 - IL_047a: ldloc.0 - IL_047b: ldstr "f40 = " - IL_0480: ldarg.0 - IL_0481: ldfld float64 MCCTest.VType7::f40 - IL_0486: box [mscorlib]System.Double - IL_048b: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0490: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0495: nop - IL_0496: ldloc.1 - IL_0497: ldloc.0 - IL_0498: ldstr "f41 = " - IL_049d: ldarg.0 - IL_049e: ldfld float64 MCCTest.VType7::f41 - IL_04a3: box [mscorlib]System.Double - IL_04a8: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_04ad: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_04b2: nop - IL_04b3: ldloc.1 - IL_04b4: ldloc.0 - IL_04b5: ldstr "f42 = " - IL_04ba: ldarg.0 - IL_04bb: ldfld float64 MCCTest.VType7::f42 - IL_04c0: box [mscorlib]System.Double - IL_04c5: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_04ca: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_04cf: nop - IL_04d0: ldloc.1 - IL_04d1: ldloc.0 - IL_04d2: ldstr "f43 = " - IL_04d7: ldarg.0 - IL_04d8: ldfld float64 MCCTest.VType7::f43 - IL_04dd: box [mscorlib]System.Double - IL_04e2: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_04e7: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_04ec: nop - IL_04ed: ldloc.1 - IL_04ee: ldloc.0 - IL_04ef: ldstr "f44 = " - IL_04f4: ldarg.0 - IL_04f5: ldfld float64 MCCTest.VType7::f44 - IL_04fa: box [mscorlib]System.Double - IL_04ff: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0504: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0509: nop - IL_050a: ldloc.1 - IL_050b: ldloc.0 - IL_050c: ldstr "f45 = " - IL_0511: ldarg.0 - IL_0512: ldfld float64 MCCTest.VType7::f45 - IL_0517: box [mscorlib]System.Double - IL_051c: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0521: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0526: nop - IL_0527: ldloc.1 - IL_0528: ldloc.0 - IL_0529: ldstr "f46 = " - IL_052e: ldarg.0 - IL_052f: ldfld float64 MCCTest.VType7::f46 - IL_0534: box [mscorlib]System.Double - IL_0539: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_053e: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0543: nop - IL_0544: ldloc.1 - IL_0545: ldloc.0 - IL_0546: ldstr "f47 = " - IL_054b: ldarg.0 - IL_054c: ldfld float64 MCCTest.VType7::f47 - IL_0551: box [mscorlib]System.Double - IL_0556: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_055b: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0560: nop - IL_0561: ldloc.1 - IL_0562: ldloc.0 - IL_0563: ldstr "f48 = " - IL_0568: ldarg.0 - IL_0569: ldfld float64 MCCTest.VType7::f48 - IL_056e: box [mscorlib]System.Double - IL_0573: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0578: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_057d: nop - IL_057e: ldloc.1 - IL_057f: ldloc.0 - IL_0580: ldstr "f49 = " - IL_0585: ldarg.0 - IL_0586: ldfld float64 MCCTest.VType7::f49 - IL_058b: box [mscorlib]System.Double - IL_0590: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0595: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_059a: nop - IL_059b: ldloc.1 - IL_059c: ldloc.0 - IL_059d: ldstr "f50 = " - IL_05a2: ldarg.0 - IL_05a3: ldfld float64 MCCTest.VType7::f50 - IL_05a8: box [mscorlib]System.Double - IL_05ad: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_05b2: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_05b7: nop - IL_05b8: ldloc.1 - IL_05b9: ldloc.0 - IL_05ba: ldstr "f51 = " - IL_05bf: ldarg.0 - IL_05c0: ldfld float64 MCCTest.VType7::f51 - IL_05c5: box [mscorlib]System.Double - IL_05ca: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_05cf: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_05d4: nop - IL_05d5: ldloc.1 - IL_05d6: ldloc.0 - IL_05d7: ldstr "f52 = " - IL_05dc: ldarg.0 - IL_05dd: ldfld float64 MCCTest.VType7::f52 - IL_05e2: box [mscorlib]System.Double - IL_05e7: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_05ec: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_05f1: nop - IL_05f2: ldloc.1 - IL_05f3: ldloc.0 - IL_05f4: ldstr "f53 = " - IL_05f9: ldarg.0 - IL_05fa: ldfld float64 MCCTest.VType7::f53 - IL_05ff: box [mscorlib]System.Double - IL_0604: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0609: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_060e: nop - IL_060f: ldloc.1 - IL_0610: ldloc.0 - IL_0611: ldstr "f54 = " - IL_0616: ldarg.0 - IL_0617: ldfld float64 MCCTest.VType7::f54 - IL_061c: box [mscorlib]System.Double - IL_0621: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0626: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_062b: nop - IL_062c: ldloc.1 - IL_062d: ldloc.0 - IL_062e: ldstr "f55 = " - IL_0633: ldarg.0 - IL_0634: ldfld float64 MCCTest.VType7::f55 - IL_0639: box [mscorlib]System.Double - IL_063e: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0643: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0648: nop - IL_0649: ldloc.1 - IL_064a: ldloc.0 - IL_064b: ldstr "f56 = " - IL_0650: ldarg.0 - IL_0651: ldfld float64 MCCTest.VType7::f56 - IL_0656: box [mscorlib]System.Double - IL_065b: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0660: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0665: nop - IL_0666: ldloc.1 - IL_0667: ldloc.0 - IL_0668: ldstr "f57 = " - IL_066d: ldarg.0 - IL_066e: ldfld float64 MCCTest.VType7::f57 - IL_0673: box [mscorlib]System.Double - IL_0678: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_067d: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0682: nop - IL_0683: ldloc.1 - IL_0684: ldloc.0 - IL_0685: ldstr "f58 = " - IL_068a: ldarg.0 - IL_068b: ldfld float64 MCCTest.VType7::f58 - IL_0690: box [mscorlib]System.Double - IL_0695: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_069a: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_069f: nop - IL_06a0: ldloc.1 - IL_06a1: ldloc.0 - IL_06a2: ldstr "f59 = " - IL_06a7: ldarg.0 - IL_06a8: ldfld float64 MCCTest.VType7::f59 - IL_06ad: box [mscorlib]System.Double - IL_06b2: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_06b7: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_06bc: nop - IL_06bd: ldloc.1 - IL_06be: ldloc.0 - IL_06bf: ldstr "f60 = " - IL_06c4: ldarg.0 - IL_06c5: ldfld float64 MCCTest.VType7::f60 - IL_06ca: box [mscorlib]System.Double - IL_06cf: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_06d4: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_06d9: nop - IL_06da: ldloc.1 - IL_06db: ldloc.0 - IL_06dc: ldstr "f61 = " - IL_06e1: ldarg.0 - IL_06e2: ldfld float64 MCCTest.VType7::f61 - IL_06e7: box [mscorlib]System.Double - IL_06ec: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_06f1: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_06f6: nop - IL_06f7: ldloc.1 - IL_06f8: ldloc.0 - IL_06f9: ldstr "f62 = " - IL_06fe: ldarg.0 - IL_06ff: ldfld float64 MCCTest.VType7::f62 - IL_0704: box [mscorlib]System.Double - IL_0709: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_070e: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0713: nop - IL_0714: ldloc.1 - IL_0715: ldloc.0 - IL_0716: ldstr "f63 = " - IL_071b: ldarg.0 - IL_071c: ldfld float64 MCCTest.VType7::f63 - IL_0721: box [mscorlib]System.Double - IL_0726: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_072b: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0730: nop - IL_0731: ldloc.1 - IL_0732: ldloc.0 - IL_0733: ldstr "f64 = " - IL_0738: ldarg.0 - IL_0739: ldfld float64 MCCTest.VType7::f64 - IL_073e: box [mscorlib]System.Double - IL_0743: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0748: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_074d: nop - IL_074e: ldloc.1 - IL_074f: ldloc.0 - IL_0750: ldstr "f65 = " - IL_0755: ldarg.0 - IL_0756: ldfld float64 MCCTest.VType7::f65 - IL_075b: box [mscorlib]System.Double - IL_0760: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0765: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_076a: nop - IL_076b: ldloc.1 - IL_076c: ldloc.0 - IL_076d: ldstr "f66 = " - IL_0772: ldarg.0 - IL_0773: ldfld float64 MCCTest.VType7::f66 - IL_0778: box [mscorlib]System.Double - IL_077d: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0782: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0787: nop - IL_0788: ldloc.1 - IL_0789: ldloc.0 - IL_078a: ldstr "f67 = " - IL_078f: ldarg.0 - IL_0790: ldfld float64 MCCTest.VType7::f67 - IL_0795: box [mscorlib]System.Double - IL_079a: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_079f: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_07a4: nop - IL_07a5: ldloc.1 - IL_07a6: ldloc.0 - IL_07a7: ldstr "f68 = " - IL_07ac: ldarg.0 - IL_07ad: ldfld float64 MCCTest.VType7::f68 - IL_07b2: box [mscorlib]System.Double - IL_07b7: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_07bc: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_07c1: nop - IL_07c2: ldloc.1 - IL_07c3: ldloc.0 - IL_07c4: ldstr "f69 = " - IL_07c9: ldarg.0 - IL_07ca: ldfld float64 MCCTest.VType7::f69 - IL_07cf: box [mscorlib]System.Double - IL_07d4: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_07d9: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_07de: nop - IL_07df: ldloc.1 - IL_07e0: ldloc.0 - IL_07e1: ldstr "f70 = " - IL_07e6: ldarg.0 - IL_07e7: ldfld float64 MCCTest.VType7::f70 - IL_07ec: box [mscorlib]System.Double - IL_07f1: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_07f6: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_07fb: nop - IL_07fc: ldloc.1 - IL_07fd: ldloc.0 - IL_07fe: ldstr "f71 = " - IL_0803: ldarg.0 - IL_0804: ldfld float64 MCCTest.VType7::f71 - IL_0809: box [mscorlib]System.Double - IL_080e: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0813: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0818: nop - IL_0819: ldloc.1 - IL_081a: ldloc.0 - IL_081b: ldstr "f72 = " - IL_0820: ldarg.0 - IL_0821: ldfld float64 MCCTest.VType7::f72 - IL_0826: box [mscorlib]System.Double - IL_082b: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0830: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0835: nop - IL_0836: ldloc.1 - IL_0837: ldloc.0 - IL_0838: ldstr "f73 = " - IL_083d: ldarg.0 - IL_083e: ldfld float64 MCCTest.VType7::f73 - IL_0843: box [mscorlib]System.Double - IL_0848: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_084d: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0852: nop - IL_0853: ldloc.1 - IL_0854: ldloc.0 - IL_0855: ldstr "f74 = " - IL_085a: ldarg.0 - IL_085b: ldfld float64 MCCTest.VType7::f74 - IL_0860: box [mscorlib]System.Double - IL_0865: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_086a: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_086f: nop - IL_0870: ldloc.1 - IL_0871: ldloc.0 - IL_0872: ldstr "f75 = " - IL_0877: ldarg.0 - IL_0878: ldfld float64 MCCTest.VType7::f75 - IL_087d: box [mscorlib]System.Double - IL_0882: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0887: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_088c: nop - IL_088d: ldloc.1 - IL_088e: ldloc.0 - IL_088f: ldstr "f76 = " - IL_0894: ldarg.0 - IL_0895: ldfld float64 MCCTest.VType7::f76 - IL_089a: box [mscorlib]System.Double - IL_089f: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_08a4: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_08a9: nop - IL_08aa: ldloc.1 - IL_08ab: ldloc.0 - IL_08ac: ldstr "f77 = " - IL_08b1: ldarg.0 - IL_08b2: ldfld float64 MCCTest.VType7::f77 - IL_08b7: box [mscorlib]System.Double - IL_08bc: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_08c1: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_08c6: nop - IL_08c7: ldloc.1 - IL_08c8: ldloc.0 - IL_08c9: ldstr "f78 = " - IL_08ce: ldarg.0 - IL_08cf: ldfld float64 MCCTest.VType7::f78 - IL_08d4: box [mscorlib]System.Double - IL_08d9: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_08de: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_08e3: nop - IL_08e4: ldloc.1 - IL_08e5: ldloc.0 - IL_08e6: ldstr "f79 = " - IL_08eb: ldarg.0 - IL_08ec: ldfld float64 MCCTest.VType7::f79 - IL_08f1: box [mscorlib]System.Double - IL_08f6: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_08fb: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0900: nop - IL_0901: ldloc.1 - IL_0902: ldloc.0 - IL_0903: ldstr "f80 = " - IL_0908: ldarg.0 - IL_0909: ldfld float64 MCCTest.VType7::f80 - IL_090e: box [mscorlib]System.Double - IL_0913: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0918: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_091d: nop - IL_091e: ldloc.1 - IL_091f: ldloc.0 - IL_0920: ldstr "f81 = " - IL_0925: ldarg.0 - IL_0926: ldfld float64 MCCTest.VType7::f81 - IL_092b: box [mscorlib]System.Double - IL_0930: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0935: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_093a: nop - IL_093b: ldloc.1 - IL_093c: ldloc.0 - IL_093d: ldstr "f82 = " - IL_0942: ldarg.0 - IL_0943: ldfld float64 MCCTest.VType7::f82 - IL_0948: box [mscorlib]System.Double - IL_094d: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0952: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0957: nop - IL_0958: ldloc.1 - IL_0959: ldloc.0 - IL_095a: ldstr "f83 = " - IL_095f: ldarg.0 - IL_0960: ldfld float64 MCCTest.VType7::f83 - IL_0965: box [mscorlib]System.Double - IL_096a: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_096f: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0974: nop - IL_0975: ldloc.1 - IL_0976: ldloc.0 - IL_0977: ldstr "f84 = " - IL_097c: ldarg.0 - IL_097d: ldfld float64 MCCTest.VType7::f84 - IL_0982: box [mscorlib]System.Double - IL_0987: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_098c: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0991: nop - IL_0992: ldloc.1 - IL_0993: ldloc.0 - IL_0994: ldstr "f85 = " - IL_0999: ldarg.0 - IL_099a: ldfld float64 MCCTest.VType7::f85 - IL_099f: box [mscorlib]System.Double - IL_09a4: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_09a9: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_09ae: nop - IL_09af: ldloc.1 - IL_09b0: ldloc.0 - IL_09b1: ldstr "f86 = " - IL_09b6: ldarg.0 - IL_09b7: ldfld float64 MCCTest.VType7::f86 - IL_09bc: box [mscorlib]System.Double - IL_09c1: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_09c6: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_09cb: nop - IL_09cc: ldloc.1 - IL_09cd: ldloc.0 - IL_09ce: ldstr "f87 = " - IL_09d3: ldarg.0 - IL_09d4: ldfld float64 MCCTest.VType7::f87 - IL_09d9: box [mscorlib]System.Double - IL_09de: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_09e3: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_09e8: nop - IL_09e9: ldloc.1 - IL_09ea: ldloc.0 - IL_09eb: ldstr "f88 = " - IL_09f0: ldarg.0 - IL_09f1: ldfld float64 MCCTest.VType7::f88 - IL_09f6: box [mscorlib]System.Double - IL_09fb: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0a00: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0a05: nop - IL_0a06: ldloc.1 - IL_0a07: ldloc.0 - IL_0a08: ldstr "f89 = " - IL_0a0d: ldarg.0 - IL_0a0e: ldfld float64 MCCTest.VType7::f89 - IL_0a13: box [mscorlib]System.Double - IL_0a18: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0a1d: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0a22: nop - IL_0a23: ldloc.1 - IL_0a24: ldloc.0 - IL_0a25: ldstr "f90 = " - IL_0a2a: ldarg.0 - IL_0a2b: ldfld float64 MCCTest.VType7::f90 - IL_0a30: box [mscorlib]System.Double - IL_0a35: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0a3a: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0a3f: nop - IL_0a40: ldloc.1 - IL_0a41: ldloc.0 - IL_0a42: ldstr "f91 = " - IL_0a47: ldarg.0 - IL_0a48: ldfld float64 MCCTest.VType7::f91 - IL_0a4d: box [mscorlib]System.Double - IL_0a52: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0a57: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0a5c: nop - IL_0a5d: ldloc.1 - IL_0a5e: ldloc.0 - IL_0a5f: ldstr "f92 = " - IL_0a64: ldarg.0 - IL_0a65: ldfld float64 MCCTest.VType7::f92 - IL_0a6a: box [mscorlib]System.Double - IL_0a6f: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0a74: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0a79: nop - IL_0a7a: ldloc.1 - IL_0a7b: ldloc.0 - IL_0a7c: ldstr "f93 = " - IL_0a81: ldarg.0 - IL_0a82: ldfld float64 MCCTest.VType7::f93 - IL_0a87: box [mscorlib]System.Double - IL_0a8c: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0a91: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0a96: nop - IL_0a97: ldloc.1 - IL_0a98: ldloc.0 - IL_0a99: ldstr "f94 = " - IL_0a9e: ldarg.0 - IL_0a9f: ldfld float64 MCCTest.VType7::f94 - IL_0aa4: box [mscorlib]System.Double - IL_0aa9: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0aae: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0ab3: nop - IL_0ab4: ldloc.1 - IL_0ab5: ldloc.0 - IL_0ab6: ldstr "f95 = " - IL_0abb: ldarg.0 - IL_0abc: ldfld float64 MCCTest.VType7::f95 - IL_0ac1: box [mscorlib]System.Double - IL_0ac6: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0acb: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0ad0: nop - IL_0ad1: ldloc.1 - IL_0ad2: ldloc.0 - IL_0ad3: ldstr "f96 = " - IL_0ad8: ldarg.0 - IL_0ad9: ldfld float64 MCCTest.VType7::f96 - IL_0ade: box [mscorlib]System.Double - IL_0ae3: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0ae8: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0aed: nop - IL_0aee: ldloc.1 - IL_0aef: ldloc.0 - IL_0af0: ldstr "f97 = " - IL_0af5: ldarg.0 - IL_0af6: ldfld float64 MCCTest.VType7::f97 - IL_0afb: box [mscorlib]System.Double - IL_0b00: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0b05: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0b0a: nop - IL_0b0b: ldloc.1 - IL_0b0c: ldloc.0 - IL_0b0d: ldstr "f98 = " - IL_0b12: ldarg.0 - IL_0b13: ldfld float64 MCCTest.VType7::f98 - IL_0b18: box [mscorlib]System.Double - IL_0b1d: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0b22: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0b27: nop - IL_0b28: ldloc.1 - IL_0b29: ldloc.0 - IL_0b2a: ldstr "f99 = " - IL_0b2f: ldarg.0 - IL_0b30: ldfld float64 MCCTest.VType7::f99 - IL_0b35: box [mscorlib]System.Double - IL_0b3a: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0b3f: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0b44: nop - IL_0b45: ldloc.1 - IL_0b46: ldloc.0 - IL_0b47: ldstr "f100 = " - IL_0b4c: ldarg.0 - IL_0b4d: ldfld float64 MCCTest.VType7::f100 - IL_0b52: box [mscorlib]System.Double - IL_0b57: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0b5c: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0b61: nop - IL_0b62: ldloc.1 - IL_0b63: ldloc.0 - IL_0b64: ldstr "f101 = " - IL_0b69: ldarg.0 - IL_0b6a: ldfld float64 MCCTest.VType7::f101 - IL_0b6f: box [mscorlib]System.Double - IL_0b74: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0b79: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0b7e: nop - IL_0b7f: ldloc.1 - IL_0b80: ldloc.0 - IL_0b81: ldstr "f102 = " - IL_0b86: ldarg.0 - IL_0b87: ldfld float64 MCCTest.VType7::f102 - IL_0b8c: box [mscorlib]System.Double - IL_0b91: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0b96: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0b9b: nop - IL_0b9c: ldloc.1 - IL_0b9d: ldloc.0 - IL_0b9e: ldstr "f103 = " - IL_0ba3: ldarg.0 - IL_0ba4: ldfld float64 MCCTest.VType7::f103 - IL_0ba9: box [mscorlib]System.Double - IL_0bae: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0bb3: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0bb8: nop - IL_0bb9: ldloc.1 - IL_0bba: ldloc.0 - IL_0bbb: ldstr "f104 = " - IL_0bc0: ldarg.0 - IL_0bc1: ldfld float64 MCCTest.VType7::f104 - IL_0bc6: box [mscorlib]System.Double - IL_0bcb: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0bd0: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0bd5: nop - IL_0bd6: ldloc.1 - IL_0bd7: ldloc.0 - IL_0bd8: ldstr "f105 = " - IL_0bdd: ldarg.0 - IL_0bde: ldfld float64 MCCTest.VType7::f105 - IL_0be3: box [mscorlib]System.Double - IL_0be8: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0bed: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0bf2: nop - IL_0bf3: ldloc.1 - IL_0bf4: ldloc.0 - IL_0bf5: ldstr "f106 = " - IL_0bfa: ldarg.0 - IL_0bfb: ldfld float64 MCCTest.VType7::f106 - IL_0c00: box [mscorlib]System.Double - IL_0c05: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0c0a: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0c0f: nop - IL_0c10: ldloc.1 - IL_0c11: ldloc.0 - IL_0c12: ldstr "f107 = " - IL_0c17: ldarg.0 - IL_0c18: ldfld float64 MCCTest.VType7::f107 - IL_0c1d: box [mscorlib]System.Double - IL_0c22: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0c27: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0c2c: nop - IL_0c2d: ldloc.1 - IL_0c2e: ldloc.0 - IL_0c2f: ldstr "f108 = " - IL_0c34: ldarg.0 - IL_0c35: ldfld float64 MCCTest.VType7::f108 - IL_0c3a: box [mscorlib]System.Double - IL_0c3f: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0c44: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0c49: nop - IL_0c4a: ldloc.1 - IL_0c4b: ldloc.0 - IL_0c4c: ldstr "f109 = " - IL_0c51: ldarg.0 - IL_0c52: ldfld float64 MCCTest.VType7::f109 - IL_0c57: box [mscorlib]System.Double - IL_0c5c: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0c61: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0c66: nop - IL_0c67: ldloc.1 - IL_0c68: ldloc.0 - IL_0c69: ldstr "f110 = " - IL_0c6e: ldarg.0 - IL_0c6f: ldfld float64 MCCTest.VType7::f110 - IL_0c74: box [mscorlib]System.Double - IL_0c79: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0c7e: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0c83: nop - IL_0c84: ldloc.1 - IL_0c85: ldloc.0 - IL_0c86: ldstr "f111 = " - IL_0c8b: ldarg.0 - IL_0c8c: ldfld float64 MCCTest.VType7::f111 - IL_0c91: box [mscorlib]System.Double - IL_0c96: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0c9b: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0ca0: nop - IL_0ca1: ldloc.1 - IL_0ca2: ldloc.0 - IL_0ca3: ldstr "f112 = " - IL_0ca8: ldarg.0 - IL_0ca9: ldfld float64 MCCTest.VType7::f112 - IL_0cae: box [mscorlib]System.Double - IL_0cb3: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0cb8: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0cbd: nop - IL_0cbe: ldloc.1 - IL_0cbf: ldloc.0 - IL_0cc0: ldstr "f113 = " - IL_0cc5: ldarg.0 - IL_0cc6: ldfld float64 MCCTest.VType7::f113 - IL_0ccb: box [mscorlib]System.Double - IL_0cd0: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0cd5: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0cda: nop - IL_0cdb: ldloc.1 - IL_0cdc: ldloc.0 - IL_0cdd: ldstr "f114 = " - IL_0ce2: ldarg.0 - IL_0ce3: ldfld float64 MCCTest.VType7::f114 - IL_0ce8: box [mscorlib]System.Double - IL_0ced: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0cf2: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0cf7: nop - IL_0cf8: ldloc.1 - IL_0cf9: ldloc.0 - IL_0cfa: ldstr "f115 = " - IL_0cff: ldarg.0 - IL_0d00: ldfld float64 MCCTest.VType7::f115 - IL_0d05: box [mscorlib]System.Double - IL_0d0a: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0d0f: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0d14: nop - IL_0d15: ldloc.1 - IL_0d16: ldloc.0 - IL_0d17: ldstr "f116 = " - IL_0d1c: ldarg.0 - IL_0d1d: ldfld float64 MCCTest.VType7::f116 - IL_0d22: box [mscorlib]System.Double - IL_0d27: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0d2c: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0d31: nop - IL_0d32: ldloc.1 - IL_0d33: ldloc.0 - IL_0d34: ldstr "f117 = " - IL_0d39: ldarg.0 - IL_0d3a: ldfld float64 MCCTest.VType7::f117 - IL_0d3f: box [mscorlib]System.Double - IL_0d44: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0d49: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0d4e: nop - IL_0d4f: ldloc.1 - IL_0d50: ldloc.0 - IL_0d51: ldstr "f118 = " - IL_0d56: ldarg.0 - IL_0d57: ldfld float64 MCCTest.VType7::f118 - IL_0d5c: box [mscorlib]System.Double - IL_0d61: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0d66: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0d6b: nop - IL_0d6c: ldloc.1 - IL_0d6d: ldloc.0 - IL_0d6e: ldstr "f119 = " - IL_0d73: ldarg.0 - IL_0d74: ldfld float64 MCCTest.VType7::f119 - IL_0d79: box [mscorlib]System.Double - IL_0d7e: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0d83: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0d88: nop - IL_0d89: ldloc.1 - IL_0d8a: ldloc.0 - IL_0d8b: ldstr "f120 = " - IL_0d90: ldarg.0 - IL_0d91: ldfld float64 MCCTest.VType7::f120 - IL_0d96: box [mscorlib]System.Double - IL_0d9b: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0da0: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0da5: nop - IL_0da6: ldloc.1 - IL_0da7: ldloc.0 - IL_0da8: ldstr "f121 = " - IL_0dad: ldarg.0 - IL_0dae: ldfld float64 MCCTest.VType7::f121 - IL_0db3: box [mscorlib]System.Double - IL_0db8: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0dbd: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0dc2: nop - IL_0dc3: ldloc.1 - IL_0dc4: ldloc.0 - IL_0dc5: ldstr "f122 = " - IL_0dca: ldarg.0 - IL_0dcb: ldfld float64 MCCTest.VType7::f122 - IL_0dd0: box [mscorlib]System.Double - IL_0dd5: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0dda: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0ddf: nop - IL_0de0: ldloc.1 - IL_0de1: ldloc.0 - IL_0de2: ldstr "f123 = " - IL_0de7: ldarg.0 - IL_0de8: ldfld float64 MCCTest.VType7::f123 - IL_0ded: box [mscorlib]System.Double - IL_0df2: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0df7: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0dfc: nop - IL_0dfd: ldloc.1 - IL_0dfe: ldloc.0 - IL_0dff: ldstr "f124 = " - IL_0e04: ldarg.0 - IL_0e05: ldfld float64 MCCTest.VType7::f124 - IL_0e0a: box [mscorlib]System.Double - IL_0e0f: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0e14: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0e19: nop - IL_0e1a: ldloc.1 - IL_0e1b: ldloc.0 - IL_0e1c: ldstr "f125 = " - IL_0e21: ldarg.0 - IL_0e22: ldfld float64 MCCTest.VType7::f125 - IL_0e27: box [mscorlib]System.Double - IL_0e2c: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0e31: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0e36: nop - IL_0e37: ldloc.1 - IL_0e38: ldloc.0 - IL_0e39: ldstr "f126 = " - IL_0e3e: ldarg.0 - IL_0e3f: ldfld float64 MCCTest.VType7::f126 - IL_0e44: box [mscorlib]System.Double - IL_0e49: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0e4e: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0e53: nop - IL_0e54: ldloc.1 - IL_0e55: ldloc.0 - IL_0e56: ldstr "f127 = " - IL_0e5b: ldarg.0 - IL_0e5c: ldfld float64 MCCTest.VType7::f127 - IL_0e61: box [mscorlib]System.Double - IL_0e66: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0e6b: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0e70: nop - IL_0e71: ldloc.1 - IL_0e72: ldloc.0 - IL_0e73: ldstr "f128 = " - IL_0e78: ldarg.0 - IL_0e79: ldfld float64 MCCTest.VType7::f128 - IL_0e7e: box [mscorlib]System.Double - IL_0e83: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0e88: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0e8d: nop - IL_0e8e: ldloc.1 - IL_0e8f: ldloc.0 - IL_0e90: ldstr "f129 = " - IL_0e95: ldarg.0 - IL_0e96: ldfld float64 MCCTest.VType7::f129 - IL_0e9b: box [mscorlib]System.Double - IL_0ea0: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0ea5: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0eaa: nop - IL_0eab: ldloc.1 - IL_0eac: ldloc.0 - IL_0ead: ldstr "f130 = " - IL_0eb2: ldarg.0 - IL_0eb3: ldfld float64 MCCTest.VType7::f130 - IL_0eb8: box [mscorlib]System.Double - IL_0ebd: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0ec2: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0ec7: nop - IL_0ec8: ldloc.1 - IL_0ec9: ldloc.0 - IL_0eca: ldstr "f131 = " - IL_0ecf: ldarg.0 - IL_0ed0: ldfld float64 MCCTest.VType7::f131 - IL_0ed5: box [mscorlib]System.Double - IL_0eda: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0edf: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0ee4: nop - IL_0ee5: ldloc.1 - IL_0ee6: ldloc.0 - IL_0ee7: ldstr "f132 = " - IL_0eec: ldarg.0 - IL_0eed: ldfld float64 MCCTest.VType7::f132 - IL_0ef2: box [mscorlib]System.Double - IL_0ef7: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0efc: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0f01: nop - IL_0f02: ldloc.1 - IL_0f03: ldloc.0 - IL_0f04: ldstr "f133 = " - IL_0f09: ldarg.0 - IL_0f0a: ldfld float64 MCCTest.VType7::f133 - IL_0f0f: box [mscorlib]System.Double - IL_0f14: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0f19: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0f1e: nop - IL_0f1f: ldloc.1 - IL_0f20: ldloc.0 - IL_0f21: ldstr "f134 = " - IL_0f26: ldarg.0 - IL_0f27: ldfld float64 MCCTest.VType7::f134 - IL_0f2c: box [mscorlib]System.Double - IL_0f31: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0f36: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0f3b: nop - IL_0f3c: ldloc.1 - IL_0f3d: ldloc.0 - IL_0f3e: ldstr "f135 = " - IL_0f43: ldarg.0 - IL_0f44: ldfld float64 MCCTest.VType7::f135 - IL_0f49: box [mscorlib]System.Double - IL_0f4e: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0f53: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0f58: nop - IL_0f59: ldloc.1 - IL_0f5a: ldloc.0 - IL_0f5b: ldstr "f136 = " - IL_0f60: ldarg.0 - IL_0f61: ldfld float64 MCCTest.VType7::f136 - IL_0f66: box [mscorlib]System.Double - IL_0f6b: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0f70: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0f75: nop - IL_0f76: ldloc.1 - IL_0f77: ldloc.0 - IL_0f78: ldstr "f137 = " - IL_0f7d: ldarg.0 - IL_0f7e: ldfld float64 MCCTest.VType7::f137 - IL_0f83: box [mscorlib]System.Double - IL_0f88: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0f8d: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0f92: nop - IL_0f93: ldloc.1 - IL_0f94: ldloc.0 - IL_0f95: ldstr "f138 = " - IL_0f9a: ldarg.0 - IL_0f9b: ldfld float64 MCCTest.VType7::f138 - IL_0fa0: box [mscorlib]System.Double - IL_0fa5: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0faa: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0faf: nop - IL_0fb0: ldloc.1 - IL_0fb1: ldloc.0 - IL_0fb2: ldstr "f139 = " - IL_0fb7: ldarg.0 - IL_0fb8: ldfld float64 MCCTest.VType7::f139 - IL_0fbd: box [mscorlib]System.Double - IL_0fc2: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0fc7: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0fcc: nop - IL_0fcd: ldloc.1 - IL_0fce: ldloc.0 - IL_0fcf: ldstr "f140 = " - IL_0fd4: ldarg.0 - IL_0fd5: ldfld float64 MCCTest.VType7::f140 - IL_0fda: box [mscorlib]System.Double - IL_0fdf: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0fe4: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0fe9: nop - IL_0fea: ldloc.1 - IL_0feb: ldloc.0 - IL_0fec: ldstr "f141 = " - IL_0ff1: ldarg.0 - IL_0ff2: ldfld float64 MCCTest.VType7::f141 - IL_0ff7: box [mscorlib]System.Double - IL_0ffc: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1001: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1006: nop - IL_1007: ldloc.1 - IL_1008: ldloc.0 - IL_1009: ldstr "f142 = " - IL_100e: ldarg.0 - IL_100f: ldfld float64 MCCTest.VType7::f142 - IL_1014: box [mscorlib]System.Double - IL_1019: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_101e: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1023: nop - IL_1024: ldloc.1 - IL_1025: ldloc.0 - IL_1026: ldstr "f143 = " - IL_102b: ldarg.0 - IL_102c: ldfld float64 MCCTest.VType7::f143 - IL_1031: box [mscorlib]System.Double - IL_1036: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_103b: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1040: nop - IL_1041: ldloc.1 - IL_1042: ldloc.0 - IL_1043: ldstr "f144 = " - IL_1048: ldarg.0 - IL_1049: ldfld float64 MCCTest.VType7::f144 - IL_104e: box [mscorlib]System.Double - IL_1053: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1058: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_105d: nop - IL_105e: ldloc.1 - IL_105f: ldloc.0 - IL_1060: ldstr "f145 = " - IL_1065: ldarg.0 - IL_1066: ldfld float64 MCCTest.VType7::f145 - IL_106b: box [mscorlib]System.Double - IL_1070: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1075: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_107a: nop - IL_107b: ldloc.1 - IL_107c: ldloc.0 - IL_107d: ldstr "f146 = " - IL_1082: ldarg.0 - IL_1083: ldfld float64 MCCTest.VType7::f146 - IL_1088: box [mscorlib]System.Double - IL_108d: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1092: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1097: nop - IL_1098: ldloc.1 - IL_1099: ldloc.0 - IL_109a: ldstr "f147 = " - IL_109f: ldarg.0 - IL_10a0: ldfld float64 MCCTest.VType7::f147 - IL_10a5: box [mscorlib]System.Double - IL_10aa: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_10af: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_10b4: nop - IL_10b5: ldloc.1 - IL_10b6: ldloc.0 - IL_10b7: ldstr "f148 = " - IL_10bc: ldarg.0 - IL_10bd: ldfld float64 MCCTest.VType7::f148 - IL_10c2: box [mscorlib]System.Double - IL_10c7: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_10cc: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_10d1: nop - IL_10d2: ldloc.1 - IL_10d3: ldloc.0 - IL_10d4: ldstr "f149 = " - IL_10d9: ldarg.0 - IL_10da: ldfld float64 MCCTest.VType7::f149 - IL_10df: box [mscorlib]System.Double - IL_10e4: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_10e9: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_10ee: nop - IL_10ef: ldloc.1 - IL_10f0: ldloc.0 - IL_10f1: ldstr "f150 = " - IL_10f6: ldarg.0 - IL_10f7: ldfld float64 MCCTest.VType7::f150 - IL_10fc: box [mscorlib]System.Double - IL_1101: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1106: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_110b: nop - IL_110c: ldloc.1 - IL_110d: ldloc.0 - IL_110e: ldstr "f151 = " - IL_1113: ldarg.0 - IL_1114: ldfld float64 MCCTest.VType7::f151 - IL_1119: box [mscorlib]System.Double - IL_111e: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1123: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1128: nop - IL_1129: ldloc.1 - IL_112a: ldloc.0 - IL_112b: ldstr "f152 = " - IL_1130: ldarg.0 - IL_1131: ldfld float64 MCCTest.VType7::f152 - IL_1136: box [mscorlib]System.Double - IL_113b: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1140: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1145: nop - IL_1146: ldloc.1 - IL_1147: ldloc.0 - IL_1148: ldstr "f153 = " - IL_114d: ldarg.0 - IL_114e: ldfld float64 MCCTest.VType7::f153 - IL_1153: box [mscorlib]System.Double - IL_1158: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_115d: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1162: nop - IL_1163: ldloc.1 - IL_1164: ldloc.0 - IL_1165: ldstr "f154 = " - IL_116a: ldarg.0 - IL_116b: ldfld float64 MCCTest.VType7::f154 - IL_1170: box [mscorlib]System.Double - IL_1175: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_117a: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_117f: nop - IL_1180: ldloc.1 - IL_1181: ldloc.0 - IL_1182: ldstr "f155 = " - IL_1187: ldarg.0 - IL_1188: ldfld float64 MCCTest.VType7::f155 - IL_118d: box [mscorlib]System.Double - IL_1192: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1197: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_119c: nop - IL_119d: ldloc.1 - IL_119e: ldloc.0 - IL_119f: ldstr "f156 = " - IL_11a4: ldarg.0 - IL_11a5: ldfld float64 MCCTest.VType7::f156 - IL_11aa: box [mscorlib]System.Double - IL_11af: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_11b4: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_11b9: nop - IL_11ba: ldloc.1 - IL_11bb: ldloc.0 - IL_11bc: ldstr "f157 = " - IL_11c1: ldarg.0 - IL_11c2: ldfld float64 MCCTest.VType7::f157 - IL_11c7: box [mscorlib]System.Double - IL_11cc: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_11d1: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_11d6: nop - IL_11d7: ldloc.1 - IL_11d8: ldloc.0 - IL_11d9: ldstr "f158 = " - IL_11de: ldarg.0 - IL_11df: ldfld float64 MCCTest.VType7::f158 - IL_11e4: box [mscorlib]System.Double - IL_11e9: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_11ee: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_11f3: nop - IL_11f4: ldloc.1 - IL_11f5: ldloc.0 - IL_11f6: ldstr "f159 = " - IL_11fb: ldarg.0 - IL_11fc: ldfld float64 MCCTest.VType7::f159 - IL_1201: box [mscorlib]System.Double - IL_1206: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_120b: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1210: nop - IL_1211: ldloc.1 - IL_1212: ldloc.0 - IL_1213: ldstr "f160 = " - IL_1218: ldarg.0 - IL_1219: ldfld float64 MCCTest.VType7::f160 - IL_121e: box [mscorlib]System.Double - IL_1223: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1228: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_122d: nop - IL_122e: ldloc.1 - IL_122f: ldloc.0 - IL_1230: ldstr "f161 = " - IL_1235: ldarg.0 - IL_1236: ldfld float64 MCCTest.VType7::f161 - IL_123b: box [mscorlib]System.Double - IL_1240: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1245: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_124a: nop - IL_124b: ldloc.1 - IL_124c: ldloc.0 - IL_124d: ldstr "f162 = " - IL_1252: ldarg.0 - IL_1253: ldfld float64 MCCTest.VType7::f162 - IL_1258: box [mscorlib]System.Double - IL_125d: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1262: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1267: nop - IL_1268: ldloc.1 - IL_1269: ldloc.0 - IL_126a: ldstr "f163 = " - IL_126f: ldarg.0 - IL_1270: ldfld float64 MCCTest.VType7::f163 - IL_1275: box [mscorlib]System.Double - IL_127a: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_127f: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1284: nop - IL_1285: ldloc.1 - IL_1286: ldloc.0 - IL_1287: ldstr "f164 = " - IL_128c: ldarg.0 - IL_128d: ldfld float64 MCCTest.VType7::f164 - IL_1292: box [mscorlib]System.Double - IL_1297: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_129c: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_12a1: nop - IL_12a2: ldloc.1 - IL_12a3: ldloc.0 - IL_12a4: ldstr "f165 = " - IL_12a9: ldarg.0 - IL_12aa: ldfld float64 MCCTest.VType7::f165 - IL_12af: box [mscorlib]System.Double - IL_12b4: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_12b9: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_12be: nop - IL_12bf: ldloc.1 - IL_12c0: ldloc.0 - IL_12c1: ldstr "f166 = " - IL_12c6: ldarg.0 - IL_12c7: ldfld float64 MCCTest.VType7::f166 - IL_12cc: box [mscorlib]System.Double - IL_12d1: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_12d6: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_12db: nop - IL_12dc: ldloc.1 - IL_12dd: ldloc.0 - IL_12de: ldstr "f167 = " - IL_12e3: ldarg.0 - IL_12e4: ldfld float64 MCCTest.VType7::f167 - IL_12e9: box [mscorlib]System.Double - IL_12ee: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_12f3: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_12f8: nop - IL_12f9: ldloc.1 - IL_12fa: ldloc.0 - IL_12fb: ldstr "f168 = " - IL_1300: ldarg.0 - IL_1301: ldfld float64 MCCTest.VType7::f168 - IL_1306: box [mscorlib]System.Double - IL_130b: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1310: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1315: nop - IL_1316: ldloc.1 - IL_1317: ldloc.0 - IL_1318: ldstr "f169 = " - IL_131d: ldarg.0 - IL_131e: ldfld float64 MCCTest.VType7::f169 - IL_1323: box [mscorlib]System.Double - IL_1328: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_132d: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1332: nop - IL_1333: ldloc.1 - IL_1334: ldloc.0 - IL_1335: ldstr "f170 = " - IL_133a: ldarg.0 - IL_133b: ldfld float64 MCCTest.VType7::f170 - IL_1340: box [mscorlib]System.Double - IL_1345: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_134a: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_134f: nop - IL_1350: ldloc.1 - IL_1351: ldloc.0 - IL_1352: ldstr "f171 = " - IL_1357: ldarg.0 - IL_1358: ldfld float64 MCCTest.VType7::f171 - IL_135d: box [mscorlib]System.Double - IL_1362: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1367: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_136c: nop - IL_136d: ldloc.1 - IL_136e: ldloc.0 - IL_136f: ldstr "f172 = " - IL_1374: ldarg.0 - IL_1375: ldfld float64 MCCTest.VType7::f172 - IL_137a: box [mscorlib]System.Double - IL_137f: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1384: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1389: nop - IL_138a: ldloc.1 - IL_138b: ldloc.0 - IL_138c: ldstr "f173 = " - IL_1391: ldarg.0 - IL_1392: ldfld float64 MCCTest.VType7::f173 - IL_1397: box [mscorlib]System.Double - IL_139c: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_13a1: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_13a6: nop - IL_13a7: ldloc.1 - IL_13a8: ldloc.0 - IL_13a9: ldstr "f174 = " - IL_13ae: ldarg.0 - IL_13af: ldfld float64 MCCTest.VType7::f174 - IL_13b4: box [mscorlib]System.Double - IL_13b9: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_13be: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_13c3: nop - IL_13c4: ldloc.1 - IL_13c5: ldloc.0 - IL_13c6: ldstr "f175 = " - IL_13cb: ldarg.0 - IL_13cc: ldfld float64 MCCTest.VType7::f175 - IL_13d1: box [mscorlib]System.Double - IL_13d6: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_13db: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_13e0: nop - IL_13e1: ldloc.1 - IL_13e2: ldloc.0 - IL_13e3: ldstr "f176 = " - IL_13e8: ldarg.0 - IL_13e9: ldfld float64 MCCTest.VType7::f176 - IL_13ee: box [mscorlib]System.Double - IL_13f3: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_13f8: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_13fd: nop - IL_13fe: ldloc.1 - IL_13ff: ldloc.0 - IL_1400: ldstr "f177 = " - IL_1405: ldarg.0 - IL_1406: ldfld float64 MCCTest.VType7::f177 - IL_140b: box [mscorlib]System.Double - IL_1410: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1415: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_141a: nop - IL_141b: ldloc.1 - IL_141c: ldloc.0 - IL_141d: ldstr "f178 = " - IL_1422: ldarg.0 - IL_1423: ldfld float64 MCCTest.VType7::f178 - IL_1428: box [mscorlib]System.Double - IL_142d: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1432: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1437: nop - IL_1438: ldloc.1 - IL_1439: ldloc.0 - IL_143a: ldstr "f179 = " - IL_143f: ldarg.0 - IL_1440: ldfld float64 MCCTest.VType7::f179 - IL_1445: box [mscorlib]System.Double - IL_144a: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_144f: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1454: nop - IL_1455: ldloc.1 - IL_1456: ldloc.0 - IL_1457: ldstr "f180 = " - IL_145c: ldarg.0 - IL_145d: ldfld float64 MCCTest.VType7::f180 - IL_1462: box [mscorlib]System.Double - IL_1467: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_146c: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1471: nop - IL_1472: ldloc.1 - IL_1473: ldloc.0 - IL_1474: ldstr "f181 = " - IL_1479: ldarg.0 - IL_147a: ldfld float64 MCCTest.VType7::f181 - IL_147f: box [mscorlib]System.Double - IL_1484: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1489: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_148e: nop - IL_148f: ldloc.1 - IL_1490: ldloc.0 - IL_1491: ldstr "f182 = " - IL_1496: ldarg.0 - IL_1497: ldfld float64 MCCTest.VType7::f182 - IL_149c: box [mscorlib]System.Double - IL_14a1: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_14a6: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_14ab: nop - IL_14ac: ldloc.1 - IL_14ad: ldloc.0 - IL_14ae: ldstr "f183 = " - IL_14b3: ldarg.0 - IL_14b4: ldfld float64 MCCTest.VType7::f183 - IL_14b9: box [mscorlib]System.Double - IL_14be: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_14c3: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_14c8: nop - IL_14c9: ldloc.1 - IL_14ca: ldloc.0 - IL_14cb: ldstr "f184 = " - IL_14d0: ldarg.0 - IL_14d1: ldfld float64 MCCTest.VType7::f184 - IL_14d6: box [mscorlib]System.Double - IL_14db: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_14e0: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_14e5: nop - IL_14e6: ldloc.1 - IL_14e7: ldloc.0 - IL_14e8: ldstr "f185 = " - IL_14ed: ldarg.0 - IL_14ee: ldfld float64 MCCTest.VType7::f185 - IL_14f3: box [mscorlib]System.Double - IL_14f8: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_14fd: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1502: nop - IL_1503: ldloc.1 - IL_1504: ldloc.0 - IL_1505: ldstr "f186 = " - IL_150a: ldarg.0 - IL_150b: ldfld float64 MCCTest.VType7::f186 - IL_1510: box [mscorlib]System.Double - IL_1515: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_151a: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_151f: nop - IL_1520: ldloc.1 - IL_1521: ldloc.0 - IL_1522: ldstr "f187 = " - IL_1527: ldarg.0 - IL_1528: ldfld float64 MCCTest.VType7::f187 - IL_152d: box [mscorlib]System.Double - IL_1532: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1537: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_153c: nop - IL_153d: ldloc.1 - IL_153e: ldloc.0 - IL_153f: ldstr "f188 = " - IL_1544: ldarg.0 - IL_1545: ldfld float64 MCCTest.VType7::f188 - IL_154a: box [mscorlib]System.Double - IL_154f: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1554: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1559: nop - IL_155a: ldloc.1 - IL_155b: ldloc.0 - IL_155c: ldstr "f189 = " - IL_1561: ldarg.0 - IL_1562: ldfld float64 MCCTest.VType7::f189 - IL_1567: box [mscorlib]System.Double - IL_156c: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1571: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1576: nop - IL_1577: ldloc.1 - IL_1578: ldloc.0 - IL_1579: ldstr "f190 = " - IL_157e: ldarg.0 - IL_157f: ldfld float64 MCCTest.VType7::f190 - IL_1584: box [mscorlib]System.Double - IL_1589: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_158e: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1593: nop - IL_1594: ldloc.1 - IL_1595: ldloc.0 - IL_1596: ldstr "f191 = " - IL_159b: ldarg.0 - IL_159c: ldfld float64 MCCTest.VType7::f191 - IL_15a1: box [mscorlib]System.Double - IL_15a6: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_15ab: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_15b0: nop - IL_15b1: ldloc.1 - IL_15b2: ldloc.0 - IL_15b3: ldstr "f192 = " - IL_15b8: ldarg.0 - IL_15b9: ldfld float64 MCCTest.VType7::f192 - IL_15be: box [mscorlib]System.Double - IL_15c3: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_15c8: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_15cd: nop - IL_15ce: ldloc.1 - IL_15cf: ldloc.0 - IL_15d0: ldstr "f193 = " - IL_15d5: ldarg.0 - IL_15d6: ldfld float64 MCCTest.VType7::f193 - IL_15db: box [mscorlib]System.Double - IL_15e0: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_15e5: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_15ea: nop - IL_15eb: ldloc.1 - IL_15ec: ldloc.0 - IL_15ed: ldstr "f194 = " - IL_15f2: ldarg.0 - IL_15f3: ldfld float64 MCCTest.VType7::f194 - IL_15f8: box [mscorlib]System.Double - IL_15fd: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1602: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1607: nop - IL_1608: ldloc.1 - IL_1609: ldloc.0 - IL_160a: ldstr "f195 = " - IL_160f: ldarg.0 - IL_1610: ldfld float64 MCCTest.VType7::f195 - IL_1615: box [mscorlib]System.Double - IL_161a: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_161f: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1624: nop - IL_1625: ldloc.1 - IL_1626: ldloc.0 - IL_1627: ldstr "f196 = " - IL_162c: ldarg.0 - IL_162d: ldfld float64 MCCTest.VType7::f196 - IL_1632: box [mscorlib]System.Double - IL_1637: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_163c: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1641: nop - IL_1642: ldloc.1 - IL_1643: ldloc.0 - IL_1644: ldstr "f197 = " - IL_1649: ldarg.0 - IL_164a: ldfld float64 MCCTest.VType7::f197 - IL_164f: box [mscorlib]System.Double - IL_1654: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1659: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_165e: nop - IL_165f: ldloc.1 - IL_1660: ldloc.0 - IL_1661: ldstr "f198 = " - IL_1666: ldarg.0 - IL_1667: ldfld float64 MCCTest.VType7::f198 - IL_166c: box [mscorlib]System.Double - IL_1671: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1676: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_167b: nop - IL_167c: ldloc.1 - IL_167d: ldloc.0 - IL_167e: ldstr "f199 = " - IL_1683: ldarg.0 - IL_1684: ldfld float64 MCCTest.VType7::f199 - IL_1689: box [mscorlib]System.Double - IL_168e: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1693: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1698: nop - IL_1699: ldloc.1 - IL_169a: ldloc.0 - IL_169b: ldstr "f200 = " - IL_16a0: ldarg.0 - IL_16a1: ldfld float64 MCCTest.VType7::f200 - IL_16a6: box [mscorlib]System.Double - IL_16ab: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_16b0: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_16b5: nop - IL_16b6: ldloc.1 - IL_16b7: ldloc.0 - IL_16b8: ldstr "f201 = " - IL_16bd: ldarg.0 - IL_16be: ldfld float64 MCCTest.VType7::f201 - IL_16c3: box [mscorlib]System.Double - IL_16c8: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_16cd: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_16d2: nop - IL_16d3: ldloc.1 - IL_16d4: ldloc.0 - IL_16d5: ldstr "f202 = " - IL_16da: ldarg.0 - IL_16db: ldfld float64 MCCTest.VType7::f202 - IL_16e0: box [mscorlib]System.Double - IL_16e5: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_16ea: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_16ef: nop - IL_16f0: ldloc.1 - IL_16f1: ldloc.0 - IL_16f2: ldstr "f203 = " - IL_16f7: ldarg.0 - IL_16f8: ldfld float64 MCCTest.VType7::f203 - IL_16fd: box [mscorlib]System.Double - IL_1702: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1707: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_170c: nop - IL_170d: ldloc.1 - IL_170e: ldloc.0 - IL_170f: ldstr "f204 = " - IL_1714: ldarg.0 - IL_1715: ldfld float64 MCCTest.VType7::f204 - IL_171a: box [mscorlib]System.Double - IL_171f: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1724: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1729: nop - IL_172a: ldloc.1 - IL_172b: ldloc.0 - IL_172c: ldstr "f205 = " - IL_1731: ldarg.0 - IL_1732: ldfld float64 MCCTest.VType7::f205 - IL_1737: box [mscorlib]System.Double - IL_173c: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1741: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1746: nop - IL_1747: ldloc.1 - IL_1748: ldloc.0 - IL_1749: ldstr "f206 = " - IL_174e: ldarg.0 - IL_174f: ldfld float64 MCCTest.VType7::f206 - IL_1754: box [mscorlib]System.Double - IL_1759: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_175e: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1763: nop - IL_1764: ldloc.1 - IL_1765: ldloc.0 - IL_1766: ldstr "f207 = " - IL_176b: ldarg.0 - IL_176c: ldfld float64 MCCTest.VType7::f207 - IL_1771: box [mscorlib]System.Double - IL_1776: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_177b: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1780: nop - IL_1781: ldloc.1 - IL_1782: ldloc.0 - IL_1783: ldstr "f208 = " - IL_1788: ldarg.0 - IL_1789: ldfld float64 MCCTest.VType7::f208 - IL_178e: box [mscorlib]System.Double - IL_1793: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1798: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_179d: nop - IL_179e: ldloc.1 - IL_179f: ldloc.0 - IL_17a0: ldstr "f209 = " - IL_17a5: ldarg.0 - IL_17a6: ldfld float64 MCCTest.VType7::f209 - IL_17ab: box [mscorlib]System.Double - IL_17b0: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_17b5: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_17ba: nop - IL_17bb: ldloc.1 - IL_17bc: ldloc.0 - IL_17bd: ldstr "f210 = " - IL_17c2: ldarg.0 - IL_17c3: ldfld float64 MCCTest.VType7::f210 - IL_17c8: box [mscorlib]System.Double - IL_17cd: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_17d2: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_17d7: nop - IL_17d8: ldloc.1 - IL_17d9: ldloc.0 - IL_17da: ldstr "f211 = " - IL_17df: ldarg.0 - IL_17e0: ldfld float64 MCCTest.VType7::f211 - IL_17e5: box [mscorlib]System.Double - IL_17ea: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_17ef: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_17f4: nop - IL_17f5: ldloc.1 - IL_17f6: ldloc.0 - IL_17f7: ldstr "f212 = " - IL_17fc: ldarg.0 - IL_17fd: ldfld float64 MCCTest.VType7::f212 - IL_1802: box [mscorlib]System.Double - IL_1807: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_180c: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1811: nop - IL_1812: ldloc.1 - IL_1813: ldloc.0 - IL_1814: ldstr "f213 = " - IL_1819: ldarg.0 - IL_181a: ldfld float64 MCCTest.VType7::f213 - IL_181f: box [mscorlib]System.Double - IL_1824: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1829: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_182e: nop - IL_182f: ldloc.1 - IL_1830: ldloc.0 - IL_1831: ldstr "f214 = " - IL_1836: ldarg.0 - IL_1837: ldfld float64 MCCTest.VType7::f214 - IL_183c: box [mscorlib]System.Double - IL_1841: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1846: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_184b: nop - IL_184c: ldloc.1 - IL_184d: ldloc.0 - IL_184e: ldstr "f215 = " - IL_1853: ldarg.0 - IL_1854: ldfld float64 MCCTest.VType7::f215 - IL_1859: box [mscorlib]System.Double - IL_185e: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1863: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1868: nop - IL_1869: ldloc.1 - IL_186a: ldloc.0 - IL_186b: ldstr "f216 = " - IL_1870: ldarg.0 - IL_1871: ldfld float64 MCCTest.VType7::f216 - IL_1876: box [mscorlib]System.Double - IL_187b: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1880: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1885: nop - IL_1886: ldloc.1 - IL_1887: ldloc.0 - IL_1888: ldstr "f217 = " - IL_188d: ldarg.0 - IL_188e: ldfld float64 MCCTest.VType7::f217 - IL_1893: box [mscorlib]System.Double - IL_1898: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_189d: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_18a2: nop - IL_18a3: ldloc.1 - IL_18a4: ldloc.0 - IL_18a5: ldstr "f218 = " - IL_18aa: ldarg.0 - IL_18ab: ldfld float64 MCCTest.VType7::f218 - IL_18b0: box [mscorlib]System.Double - IL_18b5: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_18ba: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_18bf: nop - IL_18c0: ldloc.1 - IL_18c1: ldloc.0 - IL_18c2: ldstr "f219 = " - IL_18c7: ldarg.0 - IL_18c8: ldfld float64 MCCTest.VType7::f219 - IL_18cd: box [mscorlib]System.Double - IL_18d2: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_18d7: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_18dc: nop - IL_18dd: ldloc.1 - IL_18de: ldloc.0 - IL_18df: ldstr "f220 = " - IL_18e4: ldarg.0 - IL_18e5: ldfld float64 MCCTest.VType7::f220 - IL_18ea: box [mscorlib]System.Double - IL_18ef: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_18f4: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_18f9: nop - IL_18fa: ldloc.1 - IL_18fb: ldloc.0 - IL_18fc: ldstr "f221 = " - IL_1901: ldarg.0 - IL_1902: ldfld float64 MCCTest.VType7::f221 - IL_1907: box [mscorlib]System.Double - IL_190c: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1911: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1916: nop - IL_1917: ldloc.1 - IL_1918: ldloc.0 - IL_1919: ldstr "f222 = " - IL_191e: ldarg.0 - IL_191f: ldfld float64 MCCTest.VType7::f222 - IL_1924: box [mscorlib]System.Double - IL_1929: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_192e: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1933: nop - IL_1934: ldloc.1 - IL_1935: ldloc.0 - IL_1936: ldstr "f223 = " - IL_193b: ldarg.0 - IL_193c: ldfld float64 MCCTest.VType7::f223 - IL_1941: box [mscorlib]System.Double - IL_1946: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_194b: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1950: nop - IL_1951: ldloc.1 - IL_1952: ldloc.0 - IL_1953: ldstr "f224 = " - IL_1958: ldarg.0 - IL_1959: ldfld float64 MCCTest.VType7::f224 - IL_195e: box [mscorlib]System.Double - IL_1963: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1968: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_196d: nop - IL_196e: ldloc.1 - IL_196f: ldloc.0 - IL_1970: ldstr "f225 = " - IL_1975: ldarg.0 - IL_1976: ldfld float64 MCCTest.VType7::f225 - IL_197b: box [mscorlib]System.Double - IL_1980: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1985: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_198a: nop - IL_198b: ldloc.1 - IL_198c: ldloc.0 - IL_198d: ldstr "f226 = " - IL_1992: ldarg.0 - IL_1993: ldfld float64 MCCTest.VType7::f226 - IL_1998: box [mscorlib]System.Double - IL_199d: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_19a2: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_19a7: nop - IL_19a8: ldloc.1 - IL_19a9: ldloc.0 - IL_19aa: ldstr "f227 = " - IL_19af: ldarg.0 - IL_19b0: ldfld float64 MCCTest.VType7::f227 - IL_19b5: box [mscorlib]System.Double - IL_19ba: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_19bf: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_19c4: nop - IL_19c5: ldloc.1 - IL_19c6: ldloc.0 - IL_19c7: ldstr "f228 = " - IL_19cc: ldarg.0 - IL_19cd: ldfld float64 MCCTest.VType7::f228 - IL_19d2: box [mscorlib]System.Double - IL_19d7: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_19dc: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_19e1: nop - IL_19e2: ldloc.1 - IL_19e3: ldloc.0 - IL_19e4: ldstr "f229 = " - IL_19e9: ldarg.0 - IL_19ea: ldfld float64 MCCTest.VType7::f229 - IL_19ef: box [mscorlib]System.Double - IL_19f4: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_19f9: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_19fe: nop - IL_19ff: ldloc.1 - IL_1a00: ldloc.0 - IL_1a01: ldstr "f230 = " - IL_1a06: ldarg.0 - IL_1a07: ldfld float64 MCCTest.VType7::f230 - IL_1a0c: box [mscorlib]System.Double - IL_1a11: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1a16: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1a1b: nop - IL_1a1c: ldloc.1 - IL_1a1d: ldloc.0 - IL_1a1e: ldstr "f231 = " - IL_1a23: ldarg.0 - IL_1a24: ldfld float64 MCCTest.VType7::f231 - IL_1a29: box [mscorlib]System.Double - IL_1a2e: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1a33: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1a38: nop - IL_1a39: ldloc.1 - IL_1a3a: ldloc.0 - IL_1a3b: ldstr "f232 = " - IL_1a40: ldarg.0 - IL_1a41: ldfld float64 MCCTest.VType7::f232 - IL_1a46: box [mscorlib]System.Double - IL_1a4b: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1a50: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1a55: nop - IL_1a56: ldloc.1 - IL_1a57: ldloc.0 - IL_1a58: ldstr "f233 = " - IL_1a5d: ldarg.0 - IL_1a5e: ldfld float64 MCCTest.VType7::f233 - IL_1a63: box [mscorlib]System.Double - IL_1a68: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1a6d: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1a72: nop - IL_1a73: ldloc.1 - IL_1a74: ldloc.0 - IL_1a75: ldstr "f234 = " - IL_1a7a: ldarg.0 - IL_1a7b: ldfld float64 MCCTest.VType7::f234 - IL_1a80: box [mscorlib]System.Double - IL_1a85: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1a8a: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1a8f: nop - IL_1a90: ldloc.1 - IL_1a91: ldloc.0 - IL_1a92: ldstr "f235 = " - IL_1a97: ldarg.0 - IL_1a98: ldfld float64 MCCTest.VType7::f235 - IL_1a9d: box [mscorlib]System.Double - IL_1aa2: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1aa7: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1aac: nop - IL_1aad: ldloc.1 - IL_1aae: ldloc.0 - IL_1aaf: ldstr "f236 = " - IL_1ab4: ldarg.0 - IL_1ab5: ldfld float64 MCCTest.VType7::f236 - IL_1aba: box [mscorlib]System.Double - IL_1abf: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1ac4: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1ac9: nop - IL_1aca: ldloc.1 - IL_1acb: ldloc.0 - IL_1acc: ldstr "f237 = " - IL_1ad1: ldarg.0 - IL_1ad2: ldfld float64 MCCTest.VType7::f237 - IL_1ad7: box [mscorlib]System.Double - IL_1adc: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1ae1: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1ae6: nop - IL_1ae7: ldloc.1 - IL_1ae8: ldloc.0 - IL_1ae9: ldstr "f238 = " - IL_1aee: ldarg.0 - IL_1aef: ldfld float64 MCCTest.VType7::f238 - IL_1af4: box [mscorlib]System.Double - IL_1af9: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1afe: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1b03: nop - IL_1b04: ldloc.1 - IL_1b05: ldloc.0 - IL_1b06: ldstr "f239 = " - IL_1b0b: ldarg.0 - IL_1b0c: ldfld float64 MCCTest.VType7::f239 - IL_1b11: box [mscorlib]System.Double - IL_1b16: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1b1b: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1b20: nop - IL_1b21: ldloc.1 - IL_1b22: ldloc.0 - IL_1b23: ldstr "f240 = " - IL_1b28: ldarg.0 - IL_1b29: ldfld float64 MCCTest.VType7::f240 - IL_1b2e: box [mscorlib]System.Double - IL_1b33: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1b38: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1b3d: nop - IL_1b3e: ldloc.1 - IL_1b3f: ldloc.0 - IL_1b40: ldstr "f241 = " - IL_1b45: ldarg.0 - IL_1b46: ldfld float64 MCCTest.VType7::f241 - IL_1b4b: box [mscorlib]System.Double - IL_1b50: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1b55: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1b5a: nop - IL_1b5b: ldloc.1 - IL_1b5c: ldloc.0 - IL_1b5d: ldstr "f242 = " - IL_1b62: ldarg.0 - IL_1b63: ldfld float64 MCCTest.VType7::f242 - IL_1b68: box [mscorlib]System.Double - IL_1b6d: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1b72: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1b77: nop - IL_1b78: ldloc.1 - IL_1b79: ldloc.0 - IL_1b7a: ldstr "f243 = " - IL_1b7f: ldarg.0 - IL_1b80: ldfld float64 MCCTest.VType7::f243 - IL_1b85: box [mscorlib]System.Double - IL_1b8a: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1b8f: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1b94: nop - IL_1b95: ldloc.1 - IL_1b96: ldloc.0 - IL_1b97: ldstr "f244 = " - IL_1b9c: ldarg.0 - IL_1b9d: ldfld float64 MCCTest.VType7::f244 - IL_1ba2: box [mscorlib]System.Double - IL_1ba7: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1bac: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1bb1: nop - IL_1bb2: ldloc.1 - IL_1bb3: ldloc.0 - IL_1bb4: ldstr "f245 = " - IL_1bb9: ldarg.0 - IL_1bba: ldfld float64 MCCTest.VType7::f245 - IL_1bbf: box [mscorlib]System.Double - IL_1bc4: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1bc9: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1bce: nop - IL_1bcf: ldloc.1 - IL_1bd0: ldloc.0 - IL_1bd1: ldstr "f246 = " - IL_1bd6: ldarg.0 - IL_1bd7: ldfld float64 MCCTest.VType7::f246 - IL_1bdc: box [mscorlib]System.Double - IL_1be1: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1be6: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1beb: nop - IL_1bec: ldloc.1 - IL_1bed: ldloc.0 - IL_1bee: ldstr "f247 = " - IL_1bf3: ldarg.0 - IL_1bf4: ldfld float64 MCCTest.VType7::f247 - IL_1bf9: box [mscorlib]System.Double - IL_1bfe: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1c03: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1c08: nop - IL_1c09: ldloc.1 - IL_1c0a: ldloc.0 - IL_1c0b: ldstr "f248 = " - IL_1c10: ldarg.0 - IL_1c11: ldfld float64 MCCTest.VType7::f248 - IL_1c16: box [mscorlib]System.Double - IL_1c1b: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1c20: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1c25: nop - IL_1c26: ldloc.1 - IL_1c27: ldloc.0 - IL_1c28: ldstr "f249 = " - IL_1c2d: ldarg.0 - IL_1c2e: ldfld float64 MCCTest.VType7::f249 - IL_1c33: box [mscorlib]System.Double - IL_1c38: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1c3d: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1c42: nop - IL_1c43: ldloc.1 - IL_1c44: ldloc.0 - IL_1c45: ldstr "f250 = " - IL_1c4a: ldarg.0 - IL_1c4b: ldfld float64 MCCTest.VType7::f250 - IL_1c50: box [mscorlib]System.Double - IL_1c55: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1c5a: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1c5f: nop - IL_1c60: ldloc.1 - IL_1c61: ldloc.0 - IL_1c62: ldstr "f251 = " - IL_1c67: ldarg.0 - IL_1c68: ldfld float64 MCCTest.VType7::f251 - IL_1c6d: box [mscorlib]System.Double - IL_1c72: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1c77: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1c7c: nop - IL_1c7d: ldloc.1 - IL_1c7e: ldloc.0 - IL_1c7f: ldstr "f252 = " - IL_1c84: ldarg.0 - IL_1c85: ldfld float64 MCCTest.VType7::f252 - IL_1c8a: box [mscorlib]System.Double - IL_1c8f: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1c94: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1c99: nop - IL_1c9a: ldloc.1 - IL_1c9b: ldloc.0 - IL_1c9c: ldstr "f253 = " - IL_1ca1: ldarg.0 - IL_1ca2: ldfld float64 MCCTest.VType7::f253 - IL_1ca7: box [mscorlib]System.Double - IL_1cac: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1cb1: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1cb6: nop - IL_1cb7: ldloc.1 - IL_1cb8: ldloc.0 - IL_1cb9: ldstr "f254 = " - IL_1cbe: ldarg.0 - IL_1cbf: ldfld float64 MCCTest.VType7::f254 - IL_1cc4: box [mscorlib]System.Double - IL_1cc9: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1cce: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1cd3: nop - IL_1cd4: ldloc.1 - IL_1cd5: ldloc.0 - IL_1cd6: ldstr "f255 = " - IL_1cdb: ldarg.0 - IL_1cdc: ldfld float64 MCCTest.VType7::f255 - IL_1ce1: box [mscorlib]System.Double - IL_1ce6: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1ceb: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1cf0: nop - IL_1cf1: ldloc.1 - IL_1cf2: ldloc.0 - IL_1cf3: ldstr "f256 = " - IL_1cf8: ldarg.0 - IL_1cf9: ldfld float64 MCCTest.VType7::f256 - IL_1cfe: box [mscorlib]System.Double - IL_1d03: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1d08: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1d0d: nop - IL_1d0e: ldloc.1 - IL_1d0f: ldloc.0 - IL_1d10: ldstr "f257 = " - IL_1d15: ldarg.0 - IL_1d16: ldfld float64 MCCTest.VType7::f257 - IL_1d1b: box [mscorlib]System.Double - IL_1d20: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_1d25: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_1d2a: nop - IL_1d2b: ldloc.1 - IL_1d2c: callvirt instance string [mscorlib]System.Object::ToString() - IL_1d31: stloc.2 - IL_1d32: br.s IL_1d34 - - IL_1d34: ldloc.2 - IL_1d35: ret - } // end of method VType7::Dump - - .method public hidebysig instance string - Dump() cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.0 - IL_0003: call instance string MCCTest.VType7::Dump(int32) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method VType7::Dump - -} // end of class MCCTest.VType7 - -.class public sequential ansi sealed beforefieldinit MCCTest.VType8 - extends [mscorlib]System.ValueType - implements class MCCTest.CType`1 -{ - .method public hidebysig newslot virtual final - instance void Init(int32 count) cil managed - { - // Code size 2 (0x2) - .maxstack 8 - IL_0000: nop - IL_0001: ret - } // end of method VType8::Init - - .method public hidebysig newslot virtual final - instance void Init() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.1 - IL_0003: call instance void MCCTest.VType8::Init(int32) - IL_0008: nop - IL_0009: ret - } // end of method VType8::Init - - .method public hidebysig newslot virtual final - instance void Zero() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.0 - IL_0003: call instance void MCCTest.VType8::Init(int32) - IL_0008: nop - IL_0009: ret - } // end of method VType8::Zero - - .method public hidebysig instance void - Add(valuetype MCCTest.VType8 val) cil managed - { - // Code size 2 (0x2) - .maxstack 8 - IL_0000: nop - IL_0001: ret - } // end of method VType8::Add - - .method public hidebysig newslot virtual final - instance void Check(valuetype MCCTest.VType8 expected) cil managed - { - // Code size 22 (0x16) - .maxstack 4 - .locals init (string V_0, - class [mscorlib]System.Type V_1, - class MCCTest.ResultVerificationException V_2) - IL_0000: nop - IL_0001: ldnull - IL_0002: stloc.0 - IL_0003: ldnull - IL_0004: stloc.1 - .try - { - IL_0005: nop - IL_0006: nop - IL_0007: leave.s IL_0014 - - } // end .try - catch MCCTest.ResultVerificationException - { - IL_0009: stloc.2 - IL_000a: nop - IL_000b: ldloc.0 - IL_000c: ldloc.1 - IL_000d: ldloc.2 - IL_000e: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - class [mscorlib]System.Type, - class MCCTest.ResultVerificationException) - IL_0013: throw - - } // end handler - IL_0014: nop - IL_0015: ret - } // end of method VType8::Check - - .method public hidebysig instance string - Dump(int32 level) cil managed - { - // Code size 25 (0x19) - .maxstack 1 - .locals init (string V_0, - class [mscorlib]System.IO.StringWriter V_1, - string V_2) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: call string MCCTest.FormatUtils::GetPadding(int32) - IL_0007: stloc.0 - IL_0008: newobj instance void [mscorlib]System.IO.StringWriter::.ctor() - IL_000d: stloc.1 - IL_000e: ldloc.1 - IL_000f: callvirt instance string [mscorlib]System.Object::ToString() - IL_0014: stloc.2 - IL_0015: br.s IL_0017 - - IL_0017: ldloc.2 - IL_0018: ret - } // end of method VType8::Dump - - .method public hidebysig instance string - Dump() cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.0 - IL_0003: call instance string MCCTest.VType8::Dump(int32) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method VType8::Dump - -} // end of class MCCTest.VType8 - -.class public sequential ansi sealed beforefieldinit MCCTest.VType9 - extends [mscorlib]System.ValueType - implements class MCCTest.CType`1 -{ - .field public float32 f1 - .method public hidebysig newslot virtual final - instance void Init(int32 count) cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldarg.1 - IL_0003: conv.r4 - IL_0004: stfld float32 MCCTest.VType9::f1 - IL_0009: ret - } // end of method VType9::Init - - .method public hidebysig newslot virtual final - instance void Init() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.1 - IL_0003: call instance void MCCTest.VType9::Init(int32) - IL_0008: nop - IL_0009: ret - } // end of method VType9::Init - - .method public hidebysig newslot virtual final - instance void Zero() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.0 - IL_0003: call instance void MCCTest.VType9::Init(int32) - IL_0008: nop - IL_0009: ret - } // end of method VType9::Zero - - .method public hidebysig instance void - Add(valuetype MCCTest.VType9 val) cil managed - { - // Code size 22 (0x16) - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: dup - IL_0003: ldfld float32 MCCTest.VType9::f1 - IL_0008: ldarga.s val - IL_000a: ldfld float32 MCCTest.VType9::f1 - IL_000f: add - IL_0010: stfld float32 MCCTest.VType9::f1 - IL_0015: ret - } // end of method VType9::Add - - .method public hidebysig newslot virtual final - instance void Check(valuetype MCCTest.VType9 expected) cil managed - { - // Code size 68 (0x44) - .maxstack 4 - .locals init (string V_0, - class [mscorlib]System.Type V_1, - class MCCTest.ResultVerificationException V_2, - bool V_3) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldfld float32 MCCTest.VType9::f1 - IL_0007: ldarga.s expected - IL_0009: ldfld float32 MCCTest.VType9::f1 - IL_000e: ceq - IL_0010: stloc.3 - IL_0011: ldloc.3 - IL_0012: brtrue.s IL_002f - - IL_0014: nop - IL_0015: ldstr "f1" - IL_001a: ldarg.0 - IL_001b: ldfld float32 MCCTest.VType9::f1 - IL_0020: conv.r8 - IL_0021: ldarga.s expected - IL_0023: ldfld float32 MCCTest.VType9::f1 - IL_0028: conv.r8 - IL_0029: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_002e: throw - - IL_002f: ldnull - IL_0030: stloc.0 - IL_0031: ldnull - IL_0032: stloc.1 - .try - { - IL_0033: nop - IL_0034: nop - IL_0035: leave.s IL_0042 - - } // end .try - catch MCCTest.ResultVerificationException - { - IL_0037: stloc.2 - IL_0038: nop - IL_0039: ldloc.0 - IL_003a: ldloc.1 - IL_003b: ldloc.2 - IL_003c: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - class [mscorlib]System.Type, - class MCCTest.ResultVerificationException) - IL_0041: throw - - } // end handler - IL_0042: nop - IL_0043: ret - } // end of method VType9::Check - - .method public hidebysig instance string - Dump(int32 level) cil managed - { - // Code size 54 (0x36) - .maxstack 4 - .locals init (string V_0, - class [mscorlib]System.IO.StringWriter V_1, - string V_2) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: call string MCCTest.FormatUtils::GetPadding(int32) - IL_0007: stloc.0 - IL_0008: newobj instance void [mscorlib]System.IO.StringWriter::.ctor() - IL_000d: stloc.1 - IL_000e: ldloc.1 - IL_000f: ldloc.0 - IL_0010: ldstr "f1 = " - IL_0015: ldarg.0 - IL_0016: ldfld float32 MCCTest.VType9::f1 - IL_001b: box [mscorlib]System.Single - IL_0020: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0025: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_002a: nop - IL_002b: ldloc.1 - IL_002c: callvirt instance string [mscorlib]System.Object::ToString() - IL_0031: stloc.2 - IL_0032: br.s IL_0034 - - IL_0034: ldloc.2 - IL_0035: ret - } // end of method VType9::Dump - - .method public hidebysig instance string - Dump() cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.0 - IL_0003: call instance string MCCTest.VType9::Dump(int32) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method VType9::Dump - -} // end of class MCCTest.VType9 - -.class public sequential ansi sealed beforefieldinit MCCTest.VTypeA - extends [mscorlib]System.ValueType - implements class MCCTest.CType`1 -{ - .field public class MCCTest.RType4 f1 - .field public class MCCTest.RType4 f2 - .field public class MCCTest.RType4 f3 - .field public class MCCTest.RType4 f4 - .field public class MCCTest.RType4 f5 - .field public class MCCTest.RType4 f6 - .field public class MCCTest.RType4 f7 - .field public class MCCTest.RType4 f8 - .field public class MCCTest.RType4 f9 - .field public class MCCTest.RType4 f10 - .field public class MCCTest.RType4 f11 - .field public class MCCTest.RType4 f12 - .field public class MCCTest.RType4 f13 - .method public hidebysig newslot virtual final - instance void Init(int32 count) cil managed - { - // Code size 314 (0x13a) - .maxstack 2 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: newobj instance void MCCTest.RType4::.ctor() - IL_0007: stfld class MCCTest.RType4 MCCTest.VTypeA::f1 - IL_000c: ldarg.0 - IL_000d: newobj instance void MCCTest.RType4::.ctor() - IL_0012: stfld class MCCTest.RType4 MCCTest.VTypeA::f2 - IL_0017: ldarg.0 - IL_0018: newobj instance void MCCTest.RType4::.ctor() - IL_001d: stfld class MCCTest.RType4 MCCTest.VTypeA::f3 - IL_0022: ldarg.0 - IL_0023: newobj instance void MCCTest.RType4::.ctor() - IL_0028: stfld class MCCTest.RType4 MCCTest.VTypeA::f4 - IL_002d: ldarg.0 - IL_002e: newobj instance void MCCTest.RType4::.ctor() - IL_0033: stfld class MCCTest.RType4 MCCTest.VTypeA::f5 - IL_0038: ldarg.0 - IL_0039: newobj instance void MCCTest.RType4::.ctor() - IL_003e: stfld class MCCTest.RType4 MCCTest.VTypeA::f6 - IL_0043: ldarg.0 - IL_0044: newobj instance void MCCTest.RType4::.ctor() - IL_0049: stfld class MCCTest.RType4 MCCTest.VTypeA::f7 - IL_004e: ldarg.0 - IL_004f: newobj instance void MCCTest.RType4::.ctor() - IL_0054: stfld class MCCTest.RType4 MCCTest.VTypeA::f8 - IL_0059: ldarg.0 - IL_005a: newobj instance void MCCTest.RType4::.ctor() - IL_005f: stfld class MCCTest.RType4 MCCTest.VTypeA::f9 - IL_0064: ldarg.0 - IL_0065: newobj instance void MCCTest.RType4::.ctor() - IL_006a: stfld class MCCTest.RType4 MCCTest.VTypeA::f10 - IL_006f: ldarg.0 - IL_0070: newobj instance void MCCTest.RType4::.ctor() - IL_0075: stfld class MCCTest.RType4 MCCTest.VTypeA::f11 - IL_007a: ldarg.0 - IL_007b: newobj instance void MCCTest.RType4::.ctor() - IL_0080: stfld class MCCTest.RType4 MCCTest.VTypeA::f12 - IL_0085: ldarg.0 - IL_0086: newobj instance void MCCTest.RType4::.ctor() - IL_008b: stfld class MCCTest.RType4 MCCTest.VTypeA::f13 - IL_0090: ldarg.0 - IL_0091: ldfld class MCCTest.RType4 MCCTest.VTypeA::f1 - IL_0096: ldarg.1 - IL_0097: callvirt instance void MCCTest.RType4::Init(int32) - IL_009c: nop - IL_009d: ldarg.0 - IL_009e: ldfld class MCCTest.RType4 MCCTest.VTypeA::f2 - IL_00a3: ldarg.1 - IL_00a4: callvirt instance void MCCTest.RType4::Init(int32) - IL_00a9: nop - IL_00aa: ldarg.0 - IL_00ab: ldfld class MCCTest.RType4 MCCTest.VTypeA::f3 - IL_00b0: ldarg.1 - IL_00b1: callvirt instance void MCCTest.RType4::Init(int32) - IL_00b6: nop - IL_00b7: ldarg.0 - IL_00b8: ldfld class MCCTest.RType4 MCCTest.VTypeA::f4 - IL_00bd: ldarg.1 - IL_00be: callvirt instance void MCCTest.RType4::Init(int32) - IL_00c3: nop - IL_00c4: ldarg.0 - IL_00c5: ldfld class MCCTest.RType4 MCCTest.VTypeA::f5 - IL_00ca: ldarg.1 - IL_00cb: callvirt instance void MCCTest.RType4::Init(int32) - IL_00d0: nop - IL_00d1: ldarg.0 - IL_00d2: ldfld class MCCTest.RType4 MCCTest.VTypeA::f6 - IL_00d7: ldarg.1 - IL_00d8: callvirt instance void MCCTest.RType4::Init(int32) - IL_00dd: nop - IL_00de: ldarg.0 - IL_00df: ldfld class MCCTest.RType4 MCCTest.VTypeA::f7 - IL_00e4: ldarg.1 - IL_00e5: callvirt instance void MCCTest.RType4::Init(int32) - IL_00ea: nop - IL_00eb: ldarg.0 - IL_00ec: ldfld class MCCTest.RType4 MCCTest.VTypeA::f8 - IL_00f1: ldarg.1 - IL_00f2: callvirt instance void MCCTest.RType4::Init(int32) - IL_00f7: nop - IL_00f8: ldarg.0 - IL_00f9: ldfld class MCCTest.RType4 MCCTest.VTypeA::f9 - IL_00fe: ldarg.1 - IL_00ff: callvirt instance void MCCTest.RType4::Init(int32) - IL_0104: nop - IL_0105: ldarg.0 - IL_0106: ldfld class MCCTest.RType4 MCCTest.VTypeA::f10 - IL_010b: ldarg.1 - IL_010c: callvirt instance void MCCTest.RType4::Init(int32) - IL_0111: nop - IL_0112: ldarg.0 - IL_0113: ldfld class MCCTest.RType4 MCCTest.VTypeA::f11 - IL_0118: ldarg.1 - IL_0119: callvirt instance void MCCTest.RType4::Init(int32) - IL_011e: nop - IL_011f: ldarg.0 - IL_0120: ldfld class MCCTest.RType4 MCCTest.VTypeA::f12 - IL_0125: ldarg.1 - IL_0126: callvirt instance void MCCTest.RType4::Init(int32) - IL_012b: nop - IL_012c: ldarg.0 - IL_012d: ldfld class MCCTest.RType4 MCCTest.VTypeA::f13 - IL_0132: ldarg.1 - IL_0133: callvirt instance void MCCTest.RType4::Init(int32) - IL_0138: nop - IL_0139: ret - } // end of method VTypeA::Init - - .method public hidebysig newslot virtual final - instance void Init() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.1 - IL_0003: call instance void MCCTest.VTypeA::Init(int32) - IL_0008: nop - IL_0009: ret - } // end of method VTypeA::Init - - .method public hidebysig newslot virtual final - instance void Zero() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.0 - IL_0003: call instance void MCCTest.VTypeA::Init(int32) - IL_0008: nop - IL_0009: ret - } // end of method VTypeA::Zero - - .method public hidebysig instance void - Add(valuetype MCCTest.VTypeA val) cil managed - { - // Code size 249 (0xf9) - .maxstack 2 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldfld class MCCTest.RType4 MCCTest.VTypeA::f1 - IL_0007: ldarga.s val - IL_0009: ldfld class MCCTest.RType4 MCCTest.VTypeA::f1 - IL_000e: callvirt instance void MCCTest.RType4::Add(class MCCTest.RType4) - IL_0013: nop - IL_0014: ldarg.0 - IL_0015: ldfld class MCCTest.RType4 MCCTest.VTypeA::f2 - IL_001a: ldarga.s val - IL_001c: ldfld class MCCTest.RType4 MCCTest.VTypeA::f2 - IL_0021: callvirt instance void MCCTest.RType4::Add(class MCCTest.RType4) - IL_0026: nop - IL_0027: ldarg.0 - IL_0028: ldfld class MCCTest.RType4 MCCTest.VTypeA::f3 - IL_002d: ldarga.s val - IL_002f: ldfld class MCCTest.RType4 MCCTest.VTypeA::f3 - IL_0034: callvirt instance void MCCTest.RType4::Add(class MCCTest.RType4) - IL_0039: nop - IL_003a: ldarg.0 - IL_003b: ldfld class MCCTest.RType4 MCCTest.VTypeA::f4 - IL_0040: ldarga.s val - IL_0042: ldfld class MCCTest.RType4 MCCTest.VTypeA::f4 - IL_0047: callvirt instance void MCCTest.RType4::Add(class MCCTest.RType4) - IL_004c: nop - IL_004d: ldarg.0 - IL_004e: ldfld class MCCTest.RType4 MCCTest.VTypeA::f5 - IL_0053: ldarga.s val - IL_0055: ldfld class MCCTest.RType4 MCCTest.VTypeA::f5 - IL_005a: callvirt instance void MCCTest.RType4::Add(class MCCTest.RType4) - IL_005f: nop - IL_0060: ldarg.0 - IL_0061: ldfld class MCCTest.RType4 MCCTest.VTypeA::f6 - IL_0066: ldarga.s val - IL_0068: ldfld class MCCTest.RType4 MCCTest.VTypeA::f6 - IL_006d: callvirt instance void MCCTest.RType4::Add(class MCCTest.RType4) - IL_0072: nop - IL_0073: ldarg.0 - IL_0074: ldfld class MCCTest.RType4 MCCTest.VTypeA::f7 - IL_0079: ldarga.s val - IL_007b: ldfld class MCCTest.RType4 MCCTest.VTypeA::f7 - IL_0080: callvirt instance void MCCTest.RType4::Add(class MCCTest.RType4) - IL_0085: nop - IL_0086: ldarg.0 - IL_0087: ldfld class MCCTest.RType4 MCCTest.VTypeA::f8 - IL_008c: ldarga.s val - IL_008e: ldfld class MCCTest.RType4 MCCTest.VTypeA::f8 - IL_0093: callvirt instance void MCCTest.RType4::Add(class MCCTest.RType4) - IL_0098: nop - IL_0099: ldarg.0 - IL_009a: ldfld class MCCTest.RType4 MCCTest.VTypeA::f9 - IL_009f: ldarga.s val - IL_00a1: ldfld class MCCTest.RType4 MCCTest.VTypeA::f9 - IL_00a6: callvirt instance void MCCTest.RType4::Add(class MCCTest.RType4) - IL_00ab: nop - IL_00ac: ldarg.0 - IL_00ad: ldfld class MCCTest.RType4 MCCTest.VTypeA::f10 - IL_00b2: ldarga.s val - IL_00b4: ldfld class MCCTest.RType4 MCCTest.VTypeA::f10 - IL_00b9: callvirt instance void MCCTest.RType4::Add(class MCCTest.RType4) - IL_00be: nop - IL_00bf: ldarg.0 - IL_00c0: ldfld class MCCTest.RType4 MCCTest.VTypeA::f11 - IL_00c5: ldarga.s val - IL_00c7: ldfld class MCCTest.RType4 MCCTest.VTypeA::f11 - IL_00cc: callvirt instance void MCCTest.RType4::Add(class MCCTest.RType4) - IL_00d1: nop - IL_00d2: ldarg.0 - IL_00d3: ldfld class MCCTest.RType4 MCCTest.VTypeA::f12 - IL_00d8: ldarga.s val - IL_00da: ldfld class MCCTest.RType4 MCCTest.VTypeA::f12 - IL_00df: callvirt instance void MCCTest.RType4::Add(class MCCTest.RType4) - IL_00e4: nop - IL_00e5: ldarg.0 - IL_00e6: ldfld class MCCTest.RType4 MCCTest.VTypeA::f13 - IL_00eb: ldarga.s val - IL_00ed: ldfld class MCCTest.RType4 MCCTest.VTypeA::f13 - IL_00f2: callvirt instance void MCCTest.RType4::Add(class MCCTest.RType4) - IL_00f7: nop - IL_00f8: ret - } // end of method VTypeA::Add - - .method public hidebysig newslot virtual final - instance void Check(valuetype MCCTest.VTypeA expected) cil managed - { - // Code size 503 (0x1f7) - .maxstack 4 - .locals init (string V_0, - class [mscorlib]System.Type V_1, - class MCCTest.ResultVerificationException V_2) - IL_0000: nop - IL_0001: ldnull - IL_0002: stloc.0 - IL_0003: ldnull - IL_0004: stloc.1 - .try - { - IL_0005: nop - IL_0006: ldstr "f1" - IL_000b: stloc.0 - IL_000c: ldarg.0 - IL_000d: ldfld class MCCTest.RType4 MCCTest.VTypeA::f1 - IL_0012: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0017: stloc.1 - IL_0018: ldarg.0 - IL_0019: ldfld class MCCTest.RType4 MCCTest.VTypeA::f1 - IL_001e: ldarga.s expected - IL_0020: ldfld class MCCTest.RType4 MCCTest.VTypeA::f1 - IL_0025: callvirt instance void MCCTest.RType4::Check(class MCCTest.RType4) - IL_002a: nop - IL_002b: ldstr "f2" - IL_0030: stloc.0 - IL_0031: ldarg.0 - IL_0032: ldfld class MCCTest.RType4 MCCTest.VTypeA::f2 - IL_0037: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_003c: stloc.1 - IL_003d: ldarg.0 - IL_003e: ldfld class MCCTest.RType4 MCCTest.VTypeA::f2 - IL_0043: ldarga.s expected - IL_0045: ldfld class MCCTest.RType4 MCCTest.VTypeA::f2 - IL_004a: callvirt instance void MCCTest.RType4::Check(class MCCTest.RType4) - IL_004f: nop - IL_0050: ldstr "f3" - IL_0055: stloc.0 - IL_0056: ldarg.0 - IL_0057: ldfld class MCCTest.RType4 MCCTest.VTypeA::f3 - IL_005c: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0061: stloc.1 - IL_0062: ldarg.0 - IL_0063: ldfld class MCCTest.RType4 MCCTest.VTypeA::f3 - IL_0068: ldarga.s expected - IL_006a: ldfld class MCCTest.RType4 MCCTest.VTypeA::f3 - IL_006f: callvirt instance void MCCTest.RType4::Check(class MCCTest.RType4) - IL_0074: nop - IL_0075: ldstr "f4" - IL_007a: stloc.0 - IL_007b: ldarg.0 - IL_007c: ldfld class MCCTest.RType4 MCCTest.VTypeA::f4 - IL_0081: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0086: stloc.1 - IL_0087: ldarg.0 - IL_0088: ldfld class MCCTest.RType4 MCCTest.VTypeA::f4 - IL_008d: ldarga.s expected - IL_008f: ldfld class MCCTest.RType4 MCCTest.VTypeA::f4 - IL_0094: callvirt instance void MCCTest.RType4::Check(class MCCTest.RType4) - IL_0099: nop - IL_009a: ldstr "f5" - IL_009f: stloc.0 - IL_00a0: ldarg.0 - IL_00a1: ldfld class MCCTest.RType4 MCCTest.VTypeA::f5 - IL_00a6: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_00ab: stloc.1 - IL_00ac: ldarg.0 - IL_00ad: ldfld class MCCTest.RType4 MCCTest.VTypeA::f5 - IL_00b2: ldarga.s expected - IL_00b4: ldfld class MCCTest.RType4 MCCTest.VTypeA::f5 - IL_00b9: callvirt instance void MCCTest.RType4::Check(class MCCTest.RType4) - IL_00be: nop - IL_00bf: ldstr "f6" - IL_00c4: stloc.0 - IL_00c5: ldarg.0 - IL_00c6: ldfld class MCCTest.RType4 MCCTest.VTypeA::f6 - IL_00cb: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_00d0: stloc.1 - IL_00d1: ldarg.0 - IL_00d2: ldfld class MCCTest.RType4 MCCTest.VTypeA::f6 - IL_00d7: ldarga.s expected - IL_00d9: ldfld class MCCTest.RType4 MCCTest.VTypeA::f6 - IL_00de: callvirt instance void MCCTest.RType4::Check(class MCCTest.RType4) - IL_00e3: nop - IL_00e4: ldstr "f7" - IL_00e9: stloc.0 - IL_00ea: ldarg.0 - IL_00eb: ldfld class MCCTest.RType4 MCCTest.VTypeA::f7 - IL_00f0: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_00f5: stloc.1 - IL_00f6: ldarg.0 - IL_00f7: ldfld class MCCTest.RType4 MCCTest.VTypeA::f7 - IL_00fc: ldarga.s expected - IL_00fe: ldfld class MCCTest.RType4 MCCTest.VTypeA::f7 - IL_0103: callvirt instance void MCCTest.RType4::Check(class MCCTest.RType4) - IL_0108: nop - IL_0109: ldstr "f8" - IL_010e: stloc.0 - IL_010f: ldarg.0 - IL_0110: ldfld class MCCTest.RType4 MCCTest.VTypeA::f8 - IL_0115: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_011a: stloc.1 - IL_011b: ldarg.0 - IL_011c: ldfld class MCCTest.RType4 MCCTest.VTypeA::f8 - IL_0121: ldarga.s expected - IL_0123: ldfld class MCCTest.RType4 MCCTest.VTypeA::f8 - IL_0128: callvirt instance void MCCTest.RType4::Check(class MCCTest.RType4) - IL_012d: nop - IL_012e: ldstr "f9" - IL_0133: stloc.0 - IL_0134: ldarg.0 - IL_0135: ldfld class MCCTest.RType4 MCCTest.VTypeA::f9 - IL_013a: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_013f: stloc.1 - IL_0140: ldarg.0 - IL_0141: ldfld class MCCTest.RType4 MCCTest.VTypeA::f9 - IL_0146: ldarga.s expected - IL_0148: ldfld class MCCTest.RType4 MCCTest.VTypeA::f9 - IL_014d: callvirt instance void MCCTest.RType4::Check(class MCCTest.RType4) - IL_0152: nop - IL_0153: ldstr "f10" - IL_0158: stloc.0 - IL_0159: ldarg.0 - IL_015a: ldfld class MCCTest.RType4 MCCTest.VTypeA::f10 - IL_015f: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0164: stloc.1 - IL_0165: ldarg.0 - IL_0166: ldfld class MCCTest.RType4 MCCTest.VTypeA::f10 - IL_016b: ldarga.s expected - IL_016d: ldfld class MCCTest.RType4 MCCTest.VTypeA::f10 - IL_0172: callvirt instance void MCCTest.RType4::Check(class MCCTest.RType4) - IL_0177: nop - IL_0178: ldstr "f11" - IL_017d: stloc.0 - IL_017e: ldarg.0 - IL_017f: ldfld class MCCTest.RType4 MCCTest.VTypeA::f11 - IL_0184: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0189: stloc.1 - IL_018a: ldarg.0 - IL_018b: ldfld class MCCTest.RType4 MCCTest.VTypeA::f11 - IL_0190: ldarga.s expected - IL_0192: ldfld class MCCTest.RType4 MCCTest.VTypeA::f11 - IL_0197: callvirt instance void MCCTest.RType4::Check(class MCCTest.RType4) - IL_019c: nop - IL_019d: ldstr "f12" - IL_01a2: stloc.0 - IL_01a3: ldarg.0 - IL_01a4: ldfld class MCCTest.RType4 MCCTest.VTypeA::f12 - IL_01a9: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_01ae: stloc.1 - IL_01af: ldarg.0 - IL_01b0: ldfld class MCCTest.RType4 MCCTest.VTypeA::f12 - IL_01b5: ldarga.s expected - IL_01b7: ldfld class MCCTest.RType4 MCCTest.VTypeA::f12 - IL_01bc: callvirt instance void MCCTest.RType4::Check(class MCCTest.RType4) - IL_01c1: nop - IL_01c2: ldstr "f13" - IL_01c7: stloc.0 - IL_01c8: ldarg.0 - IL_01c9: ldfld class MCCTest.RType4 MCCTest.VTypeA::f13 - IL_01ce: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_01d3: stloc.1 - IL_01d4: ldarg.0 - IL_01d5: ldfld class MCCTest.RType4 MCCTest.VTypeA::f13 - IL_01da: ldarga.s expected - IL_01dc: ldfld class MCCTest.RType4 MCCTest.VTypeA::f13 - IL_01e1: callvirt instance void MCCTest.RType4::Check(class MCCTest.RType4) - IL_01e6: nop - IL_01e7: nop - IL_01e8: leave.s IL_01f5 - - } // end .try - catch MCCTest.ResultVerificationException - { - IL_01ea: stloc.2 - IL_01eb: nop - IL_01ec: ldloc.0 - IL_01ed: ldloc.1 - IL_01ee: ldloc.2 - IL_01ef: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - class [mscorlib]System.Type, - class MCCTest.ResultVerificationException) - IL_01f4: throw - - } // end handler - IL_01f5: nop - IL_01f6: ret - } // end of method VTypeA::Check - - .method public hidebysig instance string - Dump(int32 level) cil managed - { - // Code size 740 (0x2e4) - .maxstack 4 - .locals init (string V_0, - class [mscorlib]System.IO.StringWriter V_1, - string V_2) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: call string MCCTest.FormatUtils::GetPadding(int32) - IL_0007: stloc.0 - IL_0008: newobj instance void [mscorlib]System.IO.StringWriter::.ctor() - IL_000d: stloc.1 - IL_000e: ldloc.1 - IL_000f: ldloc.0 - IL_0010: ldstr "[Field f1] [Type '{0}']" - IL_0015: call string [mscorlib]System.String::Concat(string, - string) - IL_001a: ldarg.0 - IL_001b: ldfld class MCCTest.RType4 MCCTest.VTypeA::f1 - IL_0020: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0025: callvirt instance string [mscorlib]System.Object::ToString() - IL_002a: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_002f: nop - IL_0030: ldloc.1 - IL_0031: ldarg.0 - IL_0032: ldfld class MCCTest.RType4 MCCTest.VTypeA::f1 - IL_0037: ldarg.1 - IL_0038: ldc.i4.1 - IL_0039: add - IL_003a: callvirt instance string MCCTest.RType4::Dump(int32) - IL_003f: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0044: nop - IL_0045: ldloc.1 - IL_0046: ldloc.0 - IL_0047: ldstr "[Field f2] [Type '{0}']" - IL_004c: call string [mscorlib]System.String::Concat(string, - string) - IL_0051: ldarg.0 - IL_0052: ldfld class MCCTest.RType4 MCCTest.VTypeA::f2 - IL_0057: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_005c: callvirt instance string [mscorlib]System.Object::ToString() - IL_0061: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0066: nop - IL_0067: ldloc.1 - IL_0068: ldarg.0 - IL_0069: ldfld class MCCTest.RType4 MCCTest.VTypeA::f2 - IL_006e: ldarg.1 - IL_006f: ldc.i4.1 - IL_0070: add - IL_0071: callvirt instance string MCCTest.RType4::Dump(int32) - IL_0076: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_007b: nop - IL_007c: ldloc.1 - IL_007d: ldloc.0 - IL_007e: ldstr "[Field f3] [Type '{0}']" - IL_0083: call string [mscorlib]System.String::Concat(string, - string) - IL_0088: ldarg.0 - IL_0089: ldfld class MCCTest.RType4 MCCTest.VTypeA::f3 - IL_008e: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0093: callvirt instance string [mscorlib]System.Object::ToString() - IL_0098: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_009d: nop - IL_009e: ldloc.1 - IL_009f: ldarg.0 - IL_00a0: ldfld class MCCTest.RType4 MCCTest.VTypeA::f3 - IL_00a5: ldarg.1 - IL_00a6: ldc.i4.1 - IL_00a7: add - IL_00a8: callvirt instance string MCCTest.RType4::Dump(int32) - IL_00ad: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_00b2: nop - IL_00b3: ldloc.1 - IL_00b4: ldloc.0 - IL_00b5: ldstr "[Field f4] [Type '{0}']" - IL_00ba: call string [mscorlib]System.String::Concat(string, - string) - IL_00bf: ldarg.0 - IL_00c0: ldfld class MCCTest.RType4 MCCTest.VTypeA::f4 - IL_00c5: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_00ca: callvirt instance string [mscorlib]System.Object::ToString() - IL_00cf: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_00d4: nop - IL_00d5: ldloc.1 - IL_00d6: ldarg.0 - IL_00d7: ldfld class MCCTest.RType4 MCCTest.VTypeA::f4 - IL_00dc: ldarg.1 - IL_00dd: ldc.i4.1 - IL_00de: add - IL_00df: callvirt instance string MCCTest.RType4::Dump(int32) - IL_00e4: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_00e9: nop - IL_00ea: ldloc.1 - IL_00eb: ldloc.0 - IL_00ec: ldstr "[Field f5] [Type '{0}']" - IL_00f1: call string [mscorlib]System.String::Concat(string, - string) - IL_00f6: ldarg.0 - IL_00f7: ldfld class MCCTest.RType4 MCCTest.VTypeA::f5 - IL_00fc: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0101: callvirt instance string [mscorlib]System.Object::ToString() - IL_0106: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_010b: nop - IL_010c: ldloc.1 - IL_010d: ldarg.0 - IL_010e: ldfld class MCCTest.RType4 MCCTest.VTypeA::f5 - IL_0113: ldarg.1 - IL_0114: ldc.i4.1 - IL_0115: add - IL_0116: callvirt instance string MCCTest.RType4::Dump(int32) - IL_011b: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0120: nop - IL_0121: ldloc.1 - IL_0122: ldloc.0 - IL_0123: ldstr "[Field f6] [Type '{0}']" - IL_0128: call string [mscorlib]System.String::Concat(string, - string) - IL_012d: ldarg.0 - IL_012e: ldfld class MCCTest.RType4 MCCTest.VTypeA::f6 - IL_0133: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0138: callvirt instance string [mscorlib]System.Object::ToString() - IL_013d: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0142: nop - IL_0143: ldloc.1 - IL_0144: ldarg.0 - IL_0145: ldfld class MCCTest.RType4 MCCTest.VTypeA::f6 - IL_014a: ldarg.1 - IL_014b: ldc.i4.1 - IL_014c: add - IL_014d: callvirt instance string MCCTest.RType4::Dump(int32) - IL_0152: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0157: nop - IL_0158: ldloc.1 - IL_0159: ldloc.0 - IL_015a: ldstr "[Field f7] [Type '{0}']" - IL_015f: call string [mscorlib]System.String::Concat(string, - string) - IL_0164: ldarg.0 - IL_0165: ldfld class MCCTest.RType4 MCCTest.VTypeA::f7 - IL_016a: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_016f: callvirt instance string [mscorlib]System.Object::ToString() - IL_0174: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0179: nop - IL_017a: ldloc.1 - IL_017b: ldarg.0 - IL_017c: ldfld class MCCTest.RType4 MCCTest.VTypeA::f7 - IL_0181: ldarg.1 - IL_0182: ldc.i4.1 - IL_0183: add - IL_0184: callvirt instance string MCCTest.RType4::Dump(int32) - IL_0189: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_018e: nop - IL_018f: ldloc.1 - IL_0190: ldloc.0 - IL_0191: ldstr "[Field f8] [Type '{0}']" - IL_0196: call string [mscorlib]System.String::Concat(string, - string) - IL_019b: ldarg.0 - IL_019c: ldfld class MCCTest.RType4 MCCTest.VTypeA::f8 - IL_01a1: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_01a6: callvirt instance string [mscorlib]System.Object::ToString() - IL_01ab: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_01b0: nop - IL_01b1: ldloc.1 - IL_01b2: ldarg.0 - IL_01b3: ldfld class MCCTest.RType4 MCCTest.VTypeA::f8 - IL_01b8: ldarg.1 - IL_01b9: ldc.i4.1 - IL_01ba: add - IL_01bb: callvirt instance string MCCTest.RType4::Dump(int32) - IL_01c0: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_01c5: nop - IL_01c6: ldloc.1 - IL_01c7: ldloc.0 - IL_01c8: ldstr "[Field f9] [Type '{0}']" - IL_01cd: call string [mscorlib]System.String::Concat(string, - string) - IL_01d2: ldarg.0 - IL_01d3: ldfld class MCCTest.RType4 MCCTest.VTypeA::f9 - IL_01d8: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_01dd: callvirt instance string [mscorlib]System.Object::ToString() - IL_01e2: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_01e7: nop - IL_01e8: ldloc.1 - IL_01e9: ldarg.0 - IL_01ea: ldfld class MCCTest.RType4 MCCTest.VTypeA::f9 - IL_01ef: ldarg.1 - IL_01f0: ldc.i4.1 - IL_01f1: add - IL_01f2: callvirt instance string MCCTest.RType4::Dump(int32) - IL_01f7: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_01fc: nop - IL_01fd: ldloc.1 - IL_01fe: ldloc.0 - IL_01ff: ldstr "[Field f10] [Type '{0}']" - IL_0204: call string [mscorlib]System.String::Concat(string, - string) - IL_0209: ldarg.0 - IL_020a: ldfld class MCCTest.RType4 MCCTest.VTypeA::f10 - IL_020f: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0214: callvirt instance string [mscorlib]System.Object::ToString() - IL_0219: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_021e: nop - IL_021f: ldloc.1 - IL_0220: ldarg.0 - IL_0221: ldfld class MCCTest.RType4 MCCTest.VTypeA::f10 - IL_0226: ldarg.1 - IL_0227: ldc.i4.1 - IL_0228: add - IL_0229: callvirt instance string MCCTest.RType4::Dump(int32) - IL_022e: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0233: nop - IL_0234: ldloc.1 - IL_0235: ldloc.0 - IL_0236: ldstr "[Field f11] [Type '{0}']" - IL_023b: call string [mscorlib]System.String::Concat(string, - string) - IL_0240: ldarg.0 - IL_0241: ldfld class MCCTest.RType4 MCCTest.VTypeA::f11 - IL_0246: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_024b: callvirt instance string [mscorlib]System.Object::ToString() - IL_0250: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0255: nop - IL_0256: ldloc.1 - IL_0257: ldarg.0 - IL_0258: ldfld class MCCTest.RType4 MCCTest.VTypeA::f11 - IL_025d: ldarg.1 - IL_025e: ldc.i4.1 - IL_025f: add - IL_0260: callvirt instance string MCCTest.RType4::Dump(int32) - IL_0265: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_026a: nop - IL_026b: ldloc.1 - IL_026c: ldloc.0 - IL_026d: ldstr "[Field f12] [Type '{0}']" - IL_0272: call string [mscorlib]System.String::Concat(string, - string) - IL_0277: ldarg.0 - IL_0278: ldfld class MCCTest.RType4 MCCTest.VTypeA::f12 - IL_027d: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0282: callvirt instance string [mscorlib]System.Object::ToString() - IL_0287: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_028c: nop - IL_028d: ldloc.1 - IL_028e: ldarg.0 - IL_028f: ldfld class MCCTest.RType4 MCCTest.VTypeA::f12 - IL_0294: ldarg.1 - IL_0295: ldc.i4.1 - IL_0296: add - IL_0297: callvirt instance string MCCTest.RType4::Dump(int32) - IL_029c: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_02a1: nop - IL_02a2: ldloc.1 - IL_02a3: ldloc.0 - IL_02a4: ldstr "[Field f13] [Type '{0}']" - IL_02a9: call string [mscorlib]System.String::Concat(string, - string) - IL_02ae: ldarg.0 - IL_02af: ldfld class MCCTest.RType4 MCCTest.VTypeA::f13 - IL_02b4: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_02b9: callvirt instance string [mscorlib]System.Object::ToString() - IL_02be: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_02c3: nop - IL_02c4: ldloc.1 - IL_02c5: ldarg.0 - IL_02c6: ldfld class MCCTest.RType4 MCCTest.VTypeA::f13 - IL_02cb: ldarg.1 - IL_02cc: ldc.i4.1 - IL_02cd: add - IL_02ce: callvirt instance string MCCTest.RType4::Dump(int32) - IL_02d3: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_02d8: nop - IL_02d9: ldloc.1 - IL_02da: callvirt instance string [mscorlib]System.Object::ToString() - IL_02df: stloc.2 - IL_02e0: br.s IL_02e2 - - IL_02e2: ldloc.2 - IL_02e3: ret - } // end of method VTypeA::Dump - - .method public hidebysig instance string - Dump() cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.0 - IL_0003: call instance string MCCTest.VTypeA::Dump(int32) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method VTypeA::Dump - -} // end of class MCCTest.VTypeA - -.class public sequential ansi sealed beforefieldinit MCCTest.VTypeB - extends [mscorlib]System.ValueType - implements class MCCTest.CType`1 -{ - .field public valuetype MCCTest.VType5 f1 - .field public valuetype MCCTest.VType5 f2 - .field public valuetype MCCTest.VType5 f3 - .field public valuetype MCCTest.VType5 f4 - .field public valuetype MCCTest.VType5 f5 - .field public valuetype MCCTest.VType5 f6 - .field public valuetype MCCTest.VType5 f7 - .field public valuetype MCCTest.VType5 f8 - .field public valuetype MCCTest.VType5 f9 - .field public valuetype MCCTest.VType5 f10 - .field public valuetype MCCTest.VType5 f11 - .field public valuetype MCCTest.VType5 f12 - .field public valuetype MCCTest.VType5 f13 - .field public valuetype MCCTest.VType5 f14 - .field public valuetype MCCTest.VType5 f15 - .field public valuetype MCCTest.VType5 f16 - .field public valuetype MCCTest.VType5 f17 - .field public valuetype MCCTest.VType5 f18 - .field public valuetype MCCTest.VType5 f19 - .method public hidebysig newslot virtual final - instance void Init(int32 count) cil managed - { - // Code size 249 (0xf9) - .maxstack 2 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f1 - IL_0007: ldarg.1 - IL_0008: call instance void MCCTest.VType5::Init(int32) - IL_000d: nop - IL_000e: ldarg.0 - IL_000f: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f2 - IL_0014: ldarg.1 - IL_0015: call instance void MCCTest.VType5::Init(int32) - IL_001a: nop - IL_001b: ldarg.0 - IL_001c: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f3 - IL_0021: ldarg.1 - IL_0022: call instance void MCCTest.VType5::Init(int32) - IL_0027: nop - IL_0028: ldarg.0 - IL_0029: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f4 - IL_002e: ldarg.1 - IL_002f: call instance void MCCTest.VType5::Init(int32) - IL_0034: nop - IL_0035: ldarg.0 - IL_0036: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f5 - IL_003b: ldarg.1 - IL_003c: call instance void MCCTest.VType5::Init(int32) - IL_0041: nop - IL_0042: ldarg.0 - IL_0043: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f6 - IL_0048: ldarg.1 - IL_0049: call instance void MCCTest.VType5::Init(int32) - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f7 - IL_0055: ldarg.1 - IL_0056: call instance void MCCTest.VType5::Init(int32) - IL_005b: nop - IL_005c: ldarg.0 - IL_005d: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f8 - IL_0062: ldarg.1 - IL_0063: call instance void MCCTest.VType5::Init(int32) - IL_0068: nop - IL_0069: ldarg.0 - IL_006a: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f9 - IL_006f: ldarg.1 - IL_0070: call instance void MCCTest.VType5::Init(int32) - IL_0075: nop - IL_0076: ldarg.0 - IL_0077: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f10 - IL_007c: ldarg.1 - IL_007d: call instance void MCCTest.VType5::Init(int32) - IL_0082: nop - IL_0083: ldarg.0 - IL_0084: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f11 - IL_0089: ldarg.1 - IL_008a: call instance void MCCTest.VType5::Init(int32) - IL_008f: nop - IL_0090: ldarg.0 - IL_0091: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f12 - IL_0096: ldarg.1 - IL_0097: call instance void MCCTest.VType5::Init(int32) - IL_009c: nop - IL_009d: ldarg.0 - IL_009e: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f13 - IL_00a3: ldarg.1 - IL_00a4: call instance void MCCTest.VType5::Init(int32) - IL_00a9: nop - IL_00aa: ldarg.0 - IL_00ab: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f14 - IL_00b0: ldarg.1 - IL_00b1: call instance void MCCTest.VType5::Init(int32) - IL_00b6: nop - IL_00b7: ldarg.0 - IL_00b8: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f15 - IL_00bd: ldarg.1 - IL_00be: call instance void MCCTest.VType5::Init(int32) - IL_00c3: nop - IL_00c4: ldarg.0 - IL_00c5: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f16 - IL_00ca: ldarg.1 - IL_00cb: call instance void MCCTest.VType5::Init(int32) - IL_00d0: nop - IL_00d1: ldarg.0 - IL_00d2: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f17 - IL_00d7: ldarg.1 - IL_00d8: call instance void MCCTest.VType5::Init(int32) - IL_00dd: nop - IL_00de: ldarg.0 - IL_00df: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f18 - IL_00e4: ldarg.1 - IL_00e5: call instance void MCCTest.VType5::Init(int32) - IL_00ea: nop - IL_00eb: ldarg.0 - IL_00ec: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f19 - IL_00f1: ldarg.1 - IL_00f2: call instance void MCCTest.VType5::Init(int32) - IL_00f7: nop - IL_00f8: ret - } // end of method VTypeB::Init - - .method public hidebysig newslot virtual final - instance void Init() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.1 - IL_0003: call instance void MCCTest.VTypeB::Init(int32) - IL_0008: nop - IL_0009: ret - } // end of method VTypeB::Init - - .method public hidebysig newslot virtual final - instance void Zero() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.0 - IL_0003: call instance void MCCTest.VTypeB::Init(int32) - IL_0008: nop - IL_0009: ret - } // end of method VTypeB::Zero - - .method public hidebysig instance void - Add(valuetype MCCTest.VTypeB val) cil managed - { - // Code size 363 (0x16b) - .maxstack 2 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f1 - IL_0007: ldarga.s val - IL_0009: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f1 - IL_000e: call instance void MCCTest.VType5::Add(valuetype MCCTest.VType5) - IL_0013: nop - IL_0014: ldarg.0 - IL_0015: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f2 - IL_001a: ldarga.s val - IL_001c: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f2 - IL_0021: call instance void MCCTest.VType5::Add(valuetype MCCTest.VType5) - IL_0026: nop - IL_0027: ldarg.0 - IL_0028: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f3 - IL_002d: ldarga.s val - IL_002f: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f3 - IL_0034: call instance void MCCTest.VType5::Add(valuetype MCCTest.VType5) - IL_0039: nop - IL_003a: ldarg.0 - IL_003b: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f4 - IL_0040: ldarga.s val - IL_0042: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f4 - IL_0047: call instance void MCCTest.VType5::Add(valuetype MCCTest.VType5) - IL_004c: nop - IL_004d: ldarg.0 - IL_004e: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f5 - IL_0053: ldarga.s val - IL_0055: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f5 - IL_005a: call instance void MCCTest.VType5::Add(valuetype MCCTest.VType5) - IL_005f: nop - IL_0060: ldarg.0 - IL_0061: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f6 - IL_0066: ldarga.s val - IL_0068: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f6 - IL_006d: call instance void MCCTest.VType5::Add(valuetype MCCTest.VType5) - IL_0072: nop - IL_0073: ldarg.0 - IL_0074: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f7 - IL_0079: ldarga.s val - IL_007b: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f7 - IL_0080: call instance void MCCTest.VType5::Add(valuetype MCCTest.VType5) - IL_0085: nop - IL_0086: ldarg.0 - IL_0087: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f8 - IL_008c: ldarga.s val - IL_008e: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f8 - IL_0093: call instance void MCCTest.VType5::Add(valuetype MCCTest.VType5) - IL_0098: nop - IL_0099: ldarg.0 - IL_009a: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f9 - IL_009f: ldarga.s val - IL_00a1: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f9 - IL_00a6: call instance void MCCTest.VType5::Add(valuetype MCCTest.VType5) - IL_00ab: nop - IL_00ac: ldarg.0 - IL_00ad: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f10 - IL_00b2: ldarga.s val - IL_00b4: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f10 - IL_00b9: call instance void MCCTest.VType5::Add(valuetype MCCTest.VType5) - IL_00be: nop - IL_00bf: ldarg.0 - IL_00c0: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f11 - IL_00c5: ldarga.s val - IL_00c7: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f11 - IL_00cc: call instance void MCCTest.VType5::Add(valuetype MCCTest.VType5) - IL_00d1: nop - IL_00d2: ldarg.0 - IL_00d3: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f12 - IL_00d8: ldarga.s val - IL_00da: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f12 - IL_00df: call instance void MCCTest.VType5::Add(valuetype MCCTest.VType5) - IL_00e4: nop - IL_00e5: ldarg.0 - IL_00e6: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f13 - IL_00eb: ldarga.s val - IL_00ed: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f13 - IL_00f2: call instance void MCCTest.VType5::Add(valuetype MCCTest.VType5) - IL_00f7: nop - IL_00f8: ldarg.0 - IL_00f9: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f14 - IL_00fe: ldarga.s val - IL_0100: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f14 - IL_0105: call instance void MCCTest.VType5::Add(valuetype MCCTest.VType5) - IL_010a: nop - IL_010b: ldarg.0 - IL_010c: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f15 - IL_0111: ldarga.s val - IL_0113: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f15 - IL_0118: call instance void MCCTest.VType5::Add(valuetype MCCTest.VType5) - IL_011d: nop - IL_011e: ldarg.0 - IL_011f: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f16 - IL_0124: ldarga.s val - IL_0126: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f16 - IL_012b: call instance void MCCTest.VType5::Add(valuetype MCCTest.VType5) - IL_0130: nop - IL_0131: ldarg.0 - IL_0132: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f17 - IL_0137: ldarga.s val - IL_0139: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f17 - IL_013e: call instance void MCCTest.VType5::Add(valuetype MCCTest.VType5) - IL_0143: nop - IL_0144: ldarg.0 - IL_0145: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f18 - IL_014a: ldarga.s val - IL_014c: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f18 - IL_0151: call instance void MCCTest.VType5::Add(valuetype MCCTest.VType5) - IL_0156: nop - IL_0157: ldarg.0 - IL_0158: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f19 - IL_015d: ldarga.s val - IL_015f: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f19 - IL_0164: call instance void MCCTest.VType5::Add(valuetype MCCTest.VType5) - IL_0169: nop - IL_016a: ret - } // end of method VTypeB::Add - - .method public hidebysig newslot virtual final - instance void Check(valuetype MCCTest.VTypeB expected) cil managed - { - // Code size 820 (0x334) - .maxstack 4 - .locals init (string V_0, - class [mscorlib]System.Type V_1, - class MCCTest.ResultVerificationException V_2) - IL_0000: nop - IL_0001: ldnull - IL_0002: stloc.0 - IL_0003: ldnull - IL_0004: stloc.1 - .try - { - IL_0005: nop - IL_0006: ldstr "f1" - IL_000b: stloc.0 - IL_000c: ldarg.0 - IL_000d: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f1 - IL_0012: box MCCTest.VType5 - IL_0017: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_001c: stloc.1 - IL_001d: ldarg.0 - IL_001e: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f1 - IL_0023: ldarga.s expected - IL_0025: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f1 - IL_002a: call instance void MCCTest.VType5::Check(valuetype MCCTest.VType5) - IL_002f: nop - IL_0030: ldstr "f2" - IL_0035: stloc.0 - IL_0036: ldarg.0 - IL_0037: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f2 - IL_003c: box MCCTest.VType5 - IL_0041: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0046: stloc.1 - IL_0047: ldarg.0 - IL_0048: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f2 - IL_004d: ldarga.s expected - IL_004f: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f2 - IL_0054: call instance void MCCTest.VType5::Check(valuetype MCCTest.VType5) - IL_0059: nop - IL_005a: ldstr "f3" - IL_005f: stloc.0 - IL_0060: ldarg.0 - IL_0061: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f3 - IL_0066: box MCCTest.VType5 - IL_006b: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0070: stloc.1 - IL_0071: ldarg.0 - IL_0072: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f3 - IL_0077: ldarga.s expected - IL_0079: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f3 - IL_007e: call instance void MCCTest.VType5::Check(valuetype MCCTest.VType5) - IL_0083: nop - IL_0084: ldstr "f4" - IL_0089: stloc.0 - IL_008a: ldarg.0 - IL_008b: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f4 - IL_0090: box MCCTest.VType5 - IL_0095: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_009a: stloc.1 - IL_009b: ldarg.0 - IL_009c: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f4 - IL_00a1: ldarga.s expected - IL_00a3: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f4 - IL_00a8: call instance void MCCTest.VType5::Check(valuetype MCCTest.VType5) - IL_00ad: nop - IL_00ae: ldstr "f5" - IL_00b3: stloc.0 - IL_00b4: ldarg.0 - IL_00b5: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f5 - IL_00ba: box MCCTest.VType5 - IL_00bf: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_00c4: stloc.1 - IL_00c5: ldarg.0 - IL_00c6: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f5 - IL_00cb: ldarga.s expected - IL_00cd: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f5 - IL_00d2: call instance void MCCTest.VType5::Check(valuetype MCCTest.VType5) - IL_00d7: nop - IL_00d8: ldstr "f6" - IL_00dd: stloc.0 - IL_00de: ldarg.0 - IL_00df: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f6 - IL_00e4: box MCCTest.VType5 - IL_00e9: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_00ee: stloc.1 - IL_00ef: ldarg.0 - IL_00f0: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f6 - IL_00f5: ldarga.s expected - IL_00f7: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f6 - IL_00fc: call instance void MCCTest.VType5::Check(valuetype MCCTest.VType5) - IL_0101: nop - IL_0102: ldstr "f7" - IL_0107: stloc.0 - IL_0108: ldarg.0 - IL_0109: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f7 - IL_010e: box MCCTest.VType5 - IL_0113: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0118: stloc.1 - IL_0119: ldarg.0 - IL_011a: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f7 - IL_011f: ldarga.s expected - IL_0121: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f7 - IL_0126: call instance void MCCTest.VType5::Check(valuetype MCCTest.VType5) - IL_012b: nop - IL_012c: ldstr "f8" - IL_0131: stloc.0 - IL_0132: ldarg.0 - IL_0133: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f8 - IL_0138: box MCCTest.VType5 - IL_013d: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0142: stloc.1 - IL_0143: ldarg.0 - IL_0144: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f8 - IL_0149: ldarga.s expected - IL_014b: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f8 - IL_0150: call instance void MCCTest.VType5::Check(valuetype MCCTest.VType5) - IL_0155: nop - IL_0156: ldstr "f9" - IL_015b: stloc.0 - IL_015c: ldarg.0 - IL_015d: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f9 - IL_0162: box MCCTest.VType5 - IL_0167: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_016c: stloc.1 - IL_016d: ldarg.0 - IL_016e: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f9 - IL_0173: ldarga.s expected - IL_0175: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f9 - IL_017a: call instance void MCCTest.VType5::Check(valuetype MCCTest.VType5) - IL_017f: nop - IL_0180: ldstr "f10" - IL_0185: stloc.0 - IL_0186: ldarg.0 - IL_0187: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f10 - IL_018c: box MCCTest.VType5 - IL_0191: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0196: stloc.1 - IL_0197: ldarg.0 - IL_0198: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f10 - IL_019d: ldarga.s expected - IL_019f: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f10 - IL_01a4: call instance void MCCTest.VType5::Check(valuetype MCCTest.VType5) - IL_01a9: nop - IL_01aa: ldstr "f11" - IL_01af: stloc.0 - IL_01b0: ldarg.0 - IL_01b1: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f11 - IL_01b6: box MCCTest.VType5 - IL_01bb: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_01c0: stloc.1 - IL_01c1: ldarg.0 - IL_01c2: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f11 - IL_01c7: ldarga.s expected - IL_01c9: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f11 - IL_01ce: call instance void MCCTest.VType5::Check(valuetype MCCTest.VType5) - IL_01d3: nop - IL_01d4: ldstr "f12" - IL_01d9: stloc.0 - IL_01da: ldarg.0 - IL_01db: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f12 - IL_01e0: box MCCTest.VType5 - IL_01e5: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_01ea: stloc.1 - IL_01eb: ldarg.0 - IL_01ec: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f12 - IL_01f1: ldarga.s expected - IL_01f3: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f12 - IL_01f8: call instance void MCCTest.VType5::Check(valuetype MCCTest.VType5) - IL_01fd: nop - IL_01fe: ldstr "f13" - IL_0203: stloc.0 - IL_0204: ldarg.0 - IL_0205: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f13 - IL_020a: box MCCTest.VType5 - IL_020f: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0214: stloc.1 - IL_0215: ldarg.0 - IL_0216: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f13 - IL_021b: ldarga.s expected - IL_021d: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f13 - IL_0222: call instance void MCCTest.VType5::Check(valuetype MCCTest.VType5) - IL_0227: nop - IL_0228: ldstr "f14" - IL_022d: stloc.0 - IL_022e: ldarg.0 - IL_022f: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f14 - IL_0234: box MCCTest.VType5 - IL_0239: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_023e: stloc.1 - IL_023f: ldarg.0 - IL_0240: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f14 - IL_0245: ldarga.s expected - IL_0247: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f14 - IL_024c: call instance void MCCTest.VType5::Check(valuetype MCCTest.VType5) - IL_0251: nop - IL_0252: ldstr "f15" - IL_0257: stloc.0 - IL_0258: ldarg.0 - IL_0259: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f15 - IL_025e: box MCCTest.VType5 - IL_0263: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0268: stloc.1 - IL_0269: ldarg.0 - IL_026a: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f15 - IL_026f: ldarga.s expected - IL_0271: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f15 - IL_0276: call instance void MCCTest.VType5::Check(valuetype MCCTest.VType5) - IL_027b: nop - IL_027c: ldstr "f16" - IL_0281: stloc.0 - IL_0282: ldarg.0 - IL_0283: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f16 - IL_0288: box MCCTest.VType5 - IL_028d: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0292: stloc.1 - IL_0293: ldarg.0 - IL_0294: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f16 - IL_0299: ldarga.s expected - IL_029b: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f16 - IL_02a0: call instance void MCCTest.VType5::Check(valuetype MCCTest.VType5) - IL_02a5: nop - IL_02a6: ldstr "f17" - IL_02ab: stloc.0 - IL_02ac: ldarg.0 - IL_02ad: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f17 - IL_02b2: box MCCTest.VType5 - IL_02b7: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_02bc: stloc.1 - IL_02bd: ldarg.0 - IL_02be: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f17 - IL_02c3: ldarga.s expected - IL_02c5: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f17 - IL_02ca: call instance void MCCTest.VType5::Check(valuetype MCCTest.VType5) - IL_02cf: nop - IL_02d0: ldstr "f18" - IL_02d5: stloc.0 - IL_02d6: ldarg.0 - IL_02d7: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f18 - IL_02dc: box MCCTest.VType5 - IL_02e1: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_02e6: stloc.1 - IL_02e7: ldarg.0 - IL_02e8: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f18 - IL_02ed: ldarga.s expected - IL_02ef: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f18 - IL_02f4: call instance void MCCTest.VType5::Check(valuetype MCCTest.VType5) - IL_02f9: nop - IL_02fa: ldstr "f19" - IL_02ff: stloc.0 - IL_0300: ldarg.0 - IL_0301: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f19 - IL_0306: box MCCTest.VType5 - IL_030b: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0310: stloc.1 - IL_0311: ldarg.0 - IL_0312: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f19 - IL_0317: ldarga.s expected - IL_0319: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f19 - IL_031e: call instance void MCCTest.VType5::Check(valuetype MCCTest.VType5) - IL_0323: nop - IL_0324: nop - IL_0325: leave.s IL_0332 - - } // end .try - catch MCCTest.ResultVerificationException - { - IL_0327: stloc.2 - IL_0328: nop - IL_0329: ldloc.0 - IL_032a: ldloc.1 - IL_032b: ldloc.2 - IL_032c: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - class [mscorlib]System.Type, - class MCCTest.ResultVerificationException) - IL_0331: throw - - } // end handler - IL_0332: nop - IL_0333: ret - } // end of method VTypeB::Check - - .method public hidebysig instance string - Dump(int32 level) cil managed - { - // Code size 1165 (0x48d) - .maxstack 4 - .locals init (string V_0, - class [mscorlib]System.IO.StringWriter V_1, - string V_2) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: call string MCCTest.FormatUtils::GetPadding(int32) - IL_0007: stloc.0 - IL_0008: newobj instance void [mscorlib]System.IO.StringWriter::.ctor() - IL_000d: stloc.1 - IL_000e: ldloc.1 - IL_000f: ldloc.0 - IL_0010: ldstr "[Field f1] [Type '{0}']" - IL_0015: call string [mscorlib]System.String::Concat(string, - string) - IL_001a: ldarg.0 - IL_001b: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f1 - IL_0020: box MCCTest.VType5 - IL_0025: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_002a: callvirt instance string [mscorlib]System.Object::ToString() - IL_002f: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0034: nop - IL_0035: ldloc.1 - IL_0036: ldarg.0 - IL_0037: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f1 - IL_003c: ldarg.1 - IL_003d: ldc.i4.1 - IL_003e: add - IL_003f: call instance string MCCTest.VType5::Dump(int32) - IL_0044: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0049: nop - IL_004a: ldloc.1 - IL_004b: ldloc.0 - IL_004c: ldstr "[Field f2] [Type '{0}']" - IL_0051: call string [mscorlib]System.String::Concat(string, - string) - IL_0056: ldarg.0 - IL_0057: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f2 - IL_005c: box MCCTest.VType5 - IL_0061: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0066: callvirt instance string [mscorlib]System.Object::ToString() - IL_006b: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0070: nop - IL_0071: ldloc.1 - IL_0072: ldarg.0 - IL_0073: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f2 - IL_0078: ldarg.1 - IL_0079: ldc.i4.1 - IL_007a: add - IL_007b: call instance string MCCTest.VType5::Dump(int32) - IL_0080: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0085: nop - IL_0086: ldloc.1 - IL_0087: ldloc.0 - IL_0088: ldstr "[Field f3] [Type '{0}']" - IL_008d: call string [mscorlib]System.String::Concat(string, - string) - IL_0092: ldarg.0 - IL_0093: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f3 - IL_0098: box MCCTest.VType5 - IL_009d: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_00a2: callvirt instance string [mscorlib]System.Object::ToString() - IL_00a7: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_00ac: nop - IL_00ad: ldloc.1 - IL_00ae: ldarg.0 - IL_00af: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f3 - IL_00b4: ldarg.1 - IL_00b5: ldc.i4.1 - IL_00b6: add - IL_00b7: call instance string MCCTest.VType5::Dump(int32) - IL_00bc: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_00c1: nop - IL_00c2: ldloc.1 - IL_00c3: ldloc.0 - IL_00c4: ldstr "[Field f4] [Type '{0}']" - IL_00c9: call string [mscorlib]System.String::Concat(string, - string) - IL_00ce: ldarg.0 - IL_00cf: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f4 - IL_00d4: box MCCTest.VType5 - IL_00d9: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_00de: callvirt instance string [mscorlib]System.Object::ToString() - IL_00e3: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_00e8: nop - IL_00e9: ldloc.1 - IL_00ea: ldarg.0 - IL_00eb: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f4 - IL_00f0: ldarg.1 - IL_00f1: ldc.i4.1 - IL_00f2: add - IL_00f3: call instance string MCCTest.VType5::Dump(int32) - IL_00f8: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_00fd: nop - IL_00fe: ldloc.1 - IL_00ff: ldloc.0 - IL_0100: ldstr "[Field f5] [Type '{0}']" - IL_0105: call string [mscorlib]System.String::Concat(string, - string) - IL_010a: ldarg.0 - IL_010b: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f5 - IL_0110: box MCCTest.VType5 - IL_0115: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_011a: callvirt instance string [mscorlib]System.Object::ToString() - IL_011f: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0124: nop - IL_0125: ldloc.1 - IL_0126: ldarg.0 - IL_0127: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f5 - IL_012c: ldarg.1 - IL_012d: ldc.i4.1 - IL_012e: add - IL_012f: call instance string MCCTest.VType5::Dump(int32) - IL_0134: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0139: nop - IL_013a: ldloc.1 - IL_013b: ldloc.0 - IL_013c: ldstr "[Field f6] [Type '{0}']" - IL_0141: call string [mscorlib]System.String::Concat(string, - string) - IL_0146: ldarg.0 - IL_0147: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f6 - IL_014c: box MCCTest.VType5 - IL_0151: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0156: callvirt instance string [mscorlib]System.Object::ToString() - IL_015b: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0160: nop - IL_0161: ldloc.1 - IL_0162: ldarg.0 - IL_0163: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f6 - IL_0168: ldarg.1 - IL_0169: ldc.i4.1 - IL_016a: add - IL_016b: call instance string MCCTest.VType5::Dump(int32) - IL_0170: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0175: nop - IL_0176: ldloc.1 - IL_0177: ldloc.0 - IL_0178: ldstr "[Field f7] [Type '{0}']" - IL_017d: call string [mscorlib]System.String::Concat(string, - string) - IL_0182: ldarg.0 - IL_0183: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f7 - IL_0188: box MCCTest.VType5 - IL_018d: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0192: callvirt instance string [mscorlib]System.Object::ToString() - IL_0197: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_019c: nop - IL_019d: ldloc.1 - IL_019e: ldarg.0 - IL_019f: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f7 - IL_01a4: ldarg.1 - IL_01a5: ldc.i4.1 - IL_01a6: add - IL_01a7: call instance string MCCTest.VType5::Dump(int32) - IL_01ac: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_01b1: nop - IL_01b2: ldloc.1 - IL_01b3: ldloc.0 - IL_01b4: ldstr "[Field f8] [Type '{0}']" - IL_01b9: call string [mscorlib]System.String::Concat(string, - string) - IL_01be: ldarg.0 - IL_01bf: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f8 - IL_01c4: box MCCTest.VType5 - IL_01c9: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_01ce: callvirt instance string [mscorlib]System.Object::ToString() - IL_01d3: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_01d8: nop - IL_01d9: ldloc.1 - IL_01da: ldarg.0 - IL_01db: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f8 - IL_01e0: ldarg.1 - IL_01e1: ldc.i4.1 - IL_01e2: add - IL_01e3: call instance string MCCTest.VType5::Dump(int32) - IL_01e8: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_01ed: nop - IL_01ee: ldloc.1 - IL_01ef: ldloc.0 - IL_01f0: ldstr "[Field f9] [Type '{0}']" - IL_01f5: call string [mscorlib]System.String::Concat(string, - string) - IL_01fa: ldarg.0 - IL_01fb: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f9 - IL_0200: box MCCTest.VType5 - IL_0205: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_020a: callvirt instance string [mscorlib]System.Object::ToString() - IL_020f: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0214: nop - IL_0215: ldloc.1 - IL_0216: ldarg.0 - IL_0217: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f9 - IL_021c: ldarg.1 - IL_021d: ldc.i4.1 - IL_021e: add - IL_021f: call instance string MCCTest.VType5::Dump(int32) - IL_0224: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0229: nop - IL_022a: ldloc.1 - IL_022b: ldloc.0 - IL_022c: ldstr "[Field f10] [Type '{0}']" - IL_0231: call string [mscorlib]System.String::Concat(string, - string) - IL_0236: ldarg.0 - IL_0237: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f10 - IL_023c: box MCCTest.VType5 - IL_0241: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0246: callvirt instance string [mscorlib]System.Object::ToString() - IL_024b: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0250: nop - IL_0251: ldloc.1 - IL_0252: ldarg.0 - IL_0253: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f10 - IL_0258: ldarg.1 - IL_0259: ldc.i4.1 - IL_025a: add - IL_025b: call instance string MCCTest.VType5::Dump(int32) - IL_0260: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0265: nop - IL_0266: ldloc.1 - IL_0267: ldloc.0 - IL_0268: ldstr "[Field f11] [Type '{0}']" - IL_026d: call string [mscorlib]System.String::Concat(string, - string) - IL_0272: ldarg.0 - IL_0273: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f11 - IL_0278: box MCCTest.VType5 - IL_027d: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0282: callvirt instance string [mscorlib]System.Object::ToString() - IL_0287: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_028c: nop - IL_028d: ldloc.1 - IL_028e: ldarg.0 - IL_028f: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f11 - IL_0294: ldarg.1 - IL_0295: ldc.i4.1 - IL_0296: add - IL_0297: call instance string MCCTest.VType5::Dump(int32) - IL_029c: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_02a1: nop - IL_02a2: ldloc.1 - IL_02a3: ldloc.0 - IL_02a4: ldstr "[Field f12] [Type '{0}']" - IL_02a9: call string [mscorlib]System.String::Concat(string, - string) - IL_02ae: ldarg.0 - IL_02af: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f12 - IL_02b4: box MCCTest.VType5 - IL_02b9: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_02be: callvirt instance string [mscorlib]System.Object::ToString() - IL_02c3: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_02c8: nop - IL_02c9: ldloc.1 - IL_02ca: ldarg.0 - IL_02cb: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f12 - IL_02d0: ldarg.1 - IL_02d1: ldc.i4.1 - IL_02d2: add - IL_02d3: call instance string MCCTest.VType5::Dump(int32) - IL_02d8: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_02dd: nop - IL_02de: ldloc.1 - IL_02df: ldloc.0 - IL_02e0: ldstr "[Field f13] [Type '{0}']" - IL_02e5: call string [mscorlib]System.String::Concat(string, - string) - IL_02ea: ldarg.0 - IL_02eb: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f13 - IL_02f0: box MCCTest.VType5 - IL_02f5: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_02fa: callvirt instance string [mscorlib]System.Object::ToString() - IL_02ff: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0304: nop - IL_0305: ldloc.1 - IL_0306: ldarg.0 - IL_0307: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f13 - IL_030c: ldarg.1 - IL_030d: ldc.i4.1 - IL_030e: add - IL_030f: call instance string MCCTest.VType5::Dump(int32) - IL_0314: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0319: nop - IL_031a: ldloc.1 - IL_031b: ldloc.0 - IL_031c: ldstr "[Field f14] [Type '{0}']" - IL_0321: call string [mscorlib]System.String::Concat(string, - string) - IL_0326: ldarg.0 - IL_0327: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f14 - IL_032c: box MCCTest.VType5 - IL_0331: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0336: callvirt instance string [mscorlib]System.Object::ToString() - IL_033b: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0340: nop - IL_0341: ldloc.1 - IL_0342: ldarg.0 - IL_0343: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f14 - IL_0348: ldarg.1 - IL_0349: ldc.i4.1 - IL_034a: add - IL_034b: call instance string MCCTest.VType5::Dump(int32) - IL_0350: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0355: nop - IL_0356: ldloc.1 - IL_0357: ldloc.0 - IL_0358: ldstr "[Field f15] [Type '{0}']" - IL_035d: call string [mscorlib]System.String::Concat(string, - string) - IL_0362: ldarg.0 - IL_0363: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f15 - IL_0368: box MCCTest.VType5 - IL_036d: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0372: callvirt instance string [mscorlib]System.Object::ToString() - IL_0377: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_037c: nop - IL_037d: ldloc.1 - IL_037e: ldarg.0 - IL_037f: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f15 - IL_0384: ldarg.1 - IL_0385: ldc.i4.1 - IL_0386: add - IL_0387: call instance string MCCTest.VType5::Dump(int32) - IL_038c: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0391: nop - IL_0392: ldloc.1 - IL_0393: ldloc.0 - IL_0394: ldstr "[Field f16] [Type '{0}']" - IL_0399: call string [mscorlib]System.String::Concat(string, - string) - IL_039e: ldarg.0 - IL_039f: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f16 - IL_03a4: box MCCTest.VType5 - IL_03a9: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_03ae: callvirt instance string [mscorlib]System.Object::ToString() - IL_03b3: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_03b8: nop - IL_03b9: ldloc.1 - IL_03ba: ldarg.0 - IL_03bb: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f16 - IL_03c0: ldarg.1 - IL_03c1: ldc.i4.1 - IL_03c2: add - IL_03c3: call instance string MCCTest.VType5::Dump(int32) - IL_03c8: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_03cd: nop - IL_03ce: ldloc.1 - IL_03cf: ldloc.0 - IL_03d0: ldstr "[Field f17] [Type '{0}']" - IL_03d5: call string [mscorlib]System.String::Concat(string, - string) - IL_03da: ldarg.0 - IL_03db: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f17 - IL_03e0: box MCCTest.VType5 - IL_03e5: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_03ea: callvirt instance string [mscorlib]System.Object::ToString() - IL_03ef: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_03f4: nop - IL_03f5: ldloc.1 - IL_03f6: ldarg.0 - IL_03f7: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f17 - IL_03fc: ldarg.1 - IL_03fd: ldc.i4.1 - IL_03fe: add - IL_03ff: call instance string MCCTest.VType5::Dump(int32) - IL_0404: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0409: nop - IL_040a: ldloc.1 - IL_040b: ldloc.0 - IL_040c: ldstr "[Field f18] [Type '{0}']" - IL_0411: call string [mscorlib]System.String::Concat(string, - string) - IL_0416: ldarg.0 - IL_0417: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f18 - IL_041c: box MCCTest.VType5 - IL_0421: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0426: callvirt instance string [mscorlib]System.Object::ToString() - IL_042b: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0430: nop - IL_0431: ldloc.1 - IL_0432: ldarg.0 - IL_0433: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f18 - IL_0438: ldarg.1 - IL_0439: ldc.i4.1 - IL_043a: add - IL_043b: call instance string MCCTest.VType5::Dump(int32) - IL_0440: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0445: nop - IL_0446: ldloc.1 - IL_0447: ldloc.0 - IL_0448: ldstr "[Field f19] [Type '{0}']" - IL_044d: call string [mscorlib]System.String::Concat(string, - string) - IL_0452: ldarg.0 - IL_0453: ldfld valuetype MCCTest.VType5 MCCTest.VTypeB::f19 - IL_0458: box MCCTest.VType5 - IL_045d: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0462: callvirt instance string [mscorlib]System.Object::ToString() - IL_0467: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_046c: nop - IL_046d: ldloc.1 - IL_046e: ldarg.0 - IL_046f: ldflda valuetype MCCTest.VType5 MCCTest.VTypeB::f19 - IL_0474: ldarg.1 - IL_0475: ldc.i4.1 - IL_0476: add - IL_0477: call instance string MCCTest.VType5::Dump(int32) - IL_047c: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0481: nop - IL_0482: ldloc.1 - IL_0483: callvirt instance string [mscorlib]System.Object::ToString() - IL_0488: stloc.2 - IL_0489: br.s IL_048b - - IL_048b: ldloc.2 - IL_048c: ret - } // end of method VTypeB::Dump - - .method public hidebysig instance string - Dump() cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.0 - IL_0003: call instance string MCCTest.VTypeB::Dump(int32) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method VTypeB::Dump - -} // end of class MCCTest.VTypeB - -.class public sequential ansi sealed beforefieldinit MCCTest.VTypeC - extends [mscorlib]System.ValueType - implements class MCCTest.CType`1 -{ - .field public class MCCTest.RType4 f1 - .field public valuetype MCCTest.VType5 f2 - .field public valuetype MCCTest.VType6 f3 - .field public class MCCTest.RType4 f4 - .field public valuetype MCCTest.VType5 f5 - .field public valuetype MCCTest.VType6 f6 - .field public class MCCTest.RType4 f7 - .field public valuetype MCCTest.VType5 f8 - .field public valuetype MCCTest.VType6 f9 - .field public class MCCTest.RType4 f10 - .field public valuetype MCCTest.VType5 f11 - .field public valuetype MCCTest.VType6 f12 - .method public hidebysig newslot virtual final - instance void Init(int32 count) cil managed - { - // Code size 202 (0xca) - .maxstack 2 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: newobj instance void MCCTest.RType4::.ctor() - IL_0007: stfld class MCCTest.RType4 MCCTest.VTypeC::f1 - IL_000c: ldarg.0 - IL_000d: newobj instance void MCCTest.RType4::.ctor() - IL_0012: stfld class MCCTest.RType4 MCCTest.VTypeC::f4 - IL_0017: ldarg.0 - IL_0018: newobj instance void MCCTest.RType4::.ctor() - IL_001d: stfld class MCCTest.RType4 MCCTest.VTypeC::f7 - IL_0022: ldarg.0 - IL_0023: newobj instance void MCCTest.RType4::.ctor() - IL_0028: stfld class MCCTest.RType4 MCCTest.VTypeC::f10 - IL_002d: ldarg.0 - IL_002e: ldfld class MCCTest.RType4 MCCTest.VTypeC::f1 - IL_0033: ldarg.1 - IL_0034: callvirt instance void MCCTest.RType4::Init(int32) - IL_0039: nop - IL_003a: ldarg.0 - IL_003b: ldflda valuetype MCCTest.VType5 MCCTest.VTypeC::f2 - IL_0040: ldarg.1 - IL_0041: call instance void MCCTest.VType5::Init(int32) - IL_0046: nop - IL_0047: ldarg.0 - IL_0048: ldflda valuetype MCCTest.VType6 MCCTest.VTypeC::f3 - IL_004d: ldarg.1 - IL_004e: call instance void MCCTest.VType6::Init(int32) - IL_0053: nop - IL_0054: ldarg.0 - IL_0055: ldfld class MCCTest.RType4 MCCTest.VTypeC::f4 - IL_005a: ldarg.1 - IL_005b: callvirt instance void MCCTest.RType4::Init(int32) - IL_0060: nop - IL_0061: ldarg.0 - IL_0062: ldflda valuetype MCCTest.VType5 MCCTest.VTypeC::f5 - IL_0067: ldarg.1 - IL_0068: call instance void MCCTest.VType5::Init(int32) - IL_006d: nop - IL_006e: ldarg.0 - IL_006f: ldflda valuetype MCCTest.VType6 MCCTest.VTypeC::f6 - IL_0074: ldarg.1 - IL_0075: call instance void MCCTest.VType6::Init(int32) - IL_007a: nop - IL_007b: ldarg.0 - IL_007c: ldfld class MCCTest.RType4 MCCTest.VTypeC::f7 - IL_0081: ldarg.1 - IL_0082: callvirt instance void MCCTest.RType4::Init(int32) - IL_0087: nop - IL_0088: ldarg.0 - IL_0089: ldflda valuetype MCCTest.VType5 MCCTest.VTypeC::f8 - IL_008e: ldarg.1 - IL_008f: call instance void MCCTest.VType5::Init(int32) - IL_0094: nop - IL_0095: ldarg.0 - IL_0096: ldflda valuetype MCCTest.VType6 MCCTest.VTypeC::f9 - IL_009b: ldarg.1 - IL_009c: call instance void MCCTest.VType6::Init(int32) - IL_00a1: nop - IL_00a2: ldarg.0 - IL_00a3: ldfld class MCCTest.RType4 MCCTest.VTypeC::f10 - IL_00a8: ldarg.1 - IL_00a9: callvirt instance void MCCTest.RType4::Init(int32) - IL_00ae: nop - IL_00af: ldarg.0 - IL_00b0: ldflda valuetype MCCTest.VType5 MCCTest.VTypeC::f11 - IL_00b5: ldarg.1 - IL_00b6: call instance void MCCTest.VType5::Init(int32) - IL_00bb: nop - IL_00bc: ldarg.0 - IL_00bd: ldflda valuetype MCCTest.VType6 MCCTest.VTypeC::f12 - IL_00c2: ldarg.1 - IL_00c3: call instance void MCCTest.VType6::Init(int32) - IL_00c8: nop - IL_00c9: ret - } // end of method VTypeC::Init - - .method public hidebysig newslot virtual final - instance void Init() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.1 - IL_0003: call instance void MCCTest.VTypeC::Init(int32) - IL_0008: nop - IL_0009: ret - } // end of method VTypeC::Init - - .method public hidebysig newslot virtual final - instance void Zero() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.0 - IL_0003: call instance void MCCTest.VTypeC::Init(int32) - IL_0008: nop - IL_0009: ret - } // end of method VTypeC::Zero - - .method public hidebysig instance void - Add(valuetype MCCTest.VTypeC val) cil managed - { - // Code size 230 (0xe6) - .maxstack 2 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldfld class MCCTest.RType4 MCCTest.VTypeC::f1 - IL_0007: ldarga.s val - IL_0009: ldfld class MCCTest.RType4 MCCTest.VTypeC::f1 - IL_000e: callvirt instance void MCCTest.RType4::Add(class MCCTest.RType4) - IL_0013: nop - IL_0014: ldarg.0 - IL_0015: ldflda valuetype MCCTest.VType5 MCCTest.VTypeC::f2 - IL_001a: ldarga.s val - IL_001c: ldfld valuetype MCCTest.VType5 MCCTest.VTypeC::f2 - IL_0021: call instance void MCCTest.VType5::Add(valuetype MCCTest.VType5) - IL_0026: nop - IL_0027: ldarg.0 - IL_0028: ldflda valuetype MCCTest.VType6 MCCTest.VTypeC::f3 - IL_002d: ldarga.s val - IL_002f: ldfld valuetype MCCTest.VType6 MCCTest.VTypeC::f3 - IL_0034: call instance void MCCTest.VType6::Add(valuetype MCCTest.VType6) - IL_0039: nop - IL_003a: ldarg.0 - IL_003b: ldfld class MCCTest.RType4 MCCTest.VTypeC::f4 - IL_0040: ldarga.s val - IL_0042: ldfld class MCCTest.RType4 MCCTest.VTypeC::f4 - IL_0047: callvirt instance void MCCTest.RType4::Add(class MCCTest.RType4) - IL_004c: nop - IL_004d: ldarg.0 - IL_004e: ldflda valuetype MCCTest.VType5 MCCTest.VTypeC::f5 - IL_0053: ldarga.s val - IL_0055: ldfld valuetype MCCTest.VType5 MCCTest.VTypeC::f5 - IL_005a: call instance void MCCTest.VType5::Add(valuetype MCCTest.VType5) - IL_005f: nop - IL_0060: ldarg.0 - IL_0061: ldflda valuetype MCCTest.VType6 MCCTest.VTypeC::f6 - IL_0066: ldarga.s val - IL_0068: ldfld valuetype MCCTest.VType6 MCCTest.VTypeC::f6 - IL_006d: call instance void MCCTest.VType6::Add(valuetype MCCTest.VType6) - IL_0072: nop - IL_0073: ldarg.0 - IL_0074: ldfld class MCCTest.RType4 MCCTest.VTypeC::f7 - IL_0079: ldarga.s val - IL_007b: ldfld class MCCTest.RType4 MCCTest.VTypeC::f7 - IL_0080: callvirt instance void MCCTest.RType4::Add(class MCCTest.RType4) - IL_0085: nop - IL_0086: ldarg.0 - IL_0087: ldflda valuetype MCCTest.VType5 MCCTest.VTypeC::f8 - IL_008c: ldarga.s val - IL_008e: ldfld valuetype MCCTest.VType5 MCCTest.VTypeC::f8 - IL_0093: call instance void MCCTest.VType5::Add(valuetype MCCTest.VType5) - IL_0098: nop - IL_0099: ldarg.0 - IL_009a: ldflda valuetype MCCTest.VType6 MCCTest.VTypeC::f9 - IL_009f: ldarga.s val - IL_00a1: ldfld valuetype MCCTest.VType6 MCCTest.VTypeC::f9 - IL_00a6: call instance void MCCTest.VType6::Add(valuetype MCCTest.VType6) - IL_00ab: nop - IL_00ac: ldarg.0 - IL_00ad: ldfld class MCCTest.RType4 MCCTest.VTypeC::f10 - IL_00b2: ldarga.s val - IL_00b4: ldfld class MCCTest.RType4 MCCTest.VTypeC::f10 - IL_00b9: callvirt instance void MCCTest.RType4::Add(class MCCTest.RType4) - IL_00be: nop - IL_00bf: ldarg.0 - IL_00c0: ldflda valuetype MCCTest.VType5 MCCTest.VTypeC::f11 - IL_00c5: ldarga.s val - IL_00c7: ldfld valuetype MCCTest.VType5 MCCTest.VTypeC::f11 - IL_00cc: call instance void MCCTest.VType5::Add(valuetype MCCTest.VType5) - IL_00d1: nop - IL_00d2: ldarg.0 - IL_00d3: ldflda valuetype MCCTest.VType6 MCCTest.VTypeC::f12 - IL_00d8: ldarga.s val - IL_00da: ldfld valuetype MCCTest.VType6 MCCTest.VTypeC::f12 - IL_00df: call instance void MCCTest.VType6::Add(valuetype MCCTest.VType6) - IL_00e4: nop - IL_00e5: ret - } // end of method VTypeC::Add - - .method public hidebysig newslot virtual final - instance void Check(valuetype MCCTest.VTypeC expected) cil managed - { - // Code size 506 (0x1fa) - .maxstack 4 - .locals init (string V_0, - class [mscorlib]System.Type V_1, - class MCCTest.ResultVerificationException V_2) - IL_0000: nop - IL_0001: ldnull - IL_0002: stloc.0 - IL_0003: ldnull - IL_0004: stloc.1 - .try - { - IL_0005: nop - IL_0006: ldstr "f1" - IL_000b: stloc.0 - IL_000c: ldarg.0 - IL_000d: ldfld class MCCTest.RType4 MCCTest.VTypeC::f1 - IL_0012: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0017: stloc.1 - IL_0018: ldarg.0 - IL_0019: ldfld class MCCTest.RType4 MCCTest.VTypeC::f1 - IL_001e: ldarga.s expected - IL_0020: ldfld class MCCTest.RType4 MCCTest.VTypeC::f1 - IL_0025: callvirt instance void MCCTest.RType4::Check(class MCCTest.RType4) - IL_002a: nop - IL_002b: ldstr "f2" - IL_0030: stloc.0 - IL_0031: ldarg.0 - IL_0032: ldfld valuetype MCCTest.VType5 MCCTest.VTypeC::f2 - IL_0037: box MCCTest.VType5 - IL_003c: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0041: stloc.1 - IL_0042: ldarg.0 - IL_0043: ldflda valuetype MCCTest.VType5 MCCTest.VTypeC::f2 - IL_0048: ldarga.s expected - IL_004a: ldfld valuetype MCCTest.VType5 MCCTest.VTypeC::f2 - IL_004f: call instance void MCCTest.VType5::Check(valuetype MCCTest.VType5) - IL_0054: nop - IL_0055: ldstr "f3" - IL_005a: stloc.0 - IL_005b: ldarg.0 - IL_005c: ldfld valuetype MCCTest.VType6 MCCTest.VTypeC::f3 - IL_0061: box MCCTest.VType6 - IL_0066: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_006b: stloc.1 - IL_006c: ldarg.0 - IL_006d: ldflda valuetype MCCTest.VType6 MCCTest.VTypeC::f3 - IL_0072: ldarga.s expected - IL_0074: ldfld valuetype MCCTest.VType6 MCCTest.VTypeC::f3 - IL_0079: call instance void MCCTest.VType6::Check(valuetype MCCTest.VType6) - IL_007e: nop - IL_007f: ldstr "f4" - IL_0084: stloc.0 - IL_0085: ldarg.0 - IL_0086: ldfld class MCCTest.RType4 MCCTest.VTypeC::f4 - IL_008b: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0090: stloc.1 - IL_0091: ldarg.0 - IL_0092: ldfld class MCCTest.RType4 MCCTest.VTypeC::f4 - IL_0097: ldarga.s expected - IL_0099: ldfld class MCCTest.RType4 MCCTest.VTypeC::f4 - IL_009e: callvirt instance void MCCTest.RType4::Check(class MCCTest.RType4) - IL_00a3: nop - IL_00a4: ldstr "f5" - IL_00a9: stloc.0 - IL_00aa: ldarg.0 - IL_00ab: ldfld valuetype MCCTest.VType5 MCCTest.VTypeC::f5 - IL_00b0: box MCCTest.VType5 - IL_00b5: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_00ba: stloc.1 - IL_00bb: ldarg.0 - IL_00bc: ldflda valuetype MCCTest.VType5 MCCTest.VTypeC::f5 - IL_00c1: ldarga.s expected - IL_00c3: ldfld valuetype MCCTest.VType5 MCCTest.VTypeC::f5 - IL_00c8: call instance void MCCTest.VType5::Check(valuetype MCCTest.VType5) - IL_00cd: nop - IL_00ce: ldstr "f6" - IL_00d3: stloc.0 - IL_00d4: ldarg.0 - IL_00d5: ldfld valuetype MCCTest.VType6 MCCTest.VTypeC::f6 - IL_00da: box MCCTest.VType6 - IL_00df: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_00e4: stloc.1 - IL_00e5: ldarg.0 - IL_00e6: ldflda valuetype MCCTest.VType6 MCCTest.VTypeC::f6 - IL_00eb: ldarga.s expected - IL_00ed: ldfld valuetype MCCTest.VType6 MCCTest.VTypeC::f6 - IL_00f2: call instance void MCCTest.VType6::Check(valuetype MCCTest.VType6) - IL_00f7: nop - IL_00f8: ldstr "f7" - IL_00fd: stloc.0 - IL_00fe: ldarg.0 - IL_00ff: ldfld class MCCTest.RType4 MCCTest.VTypeC::f7 - IL_0104: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0109: stloc.1 - IL_010a: ldarg.0 - IL_010b: ldfld class MCCTest.RType4 MCCTest.VTypeC::f7 - IL_0110: ldarga.s expected - IL_0112: ldfld class MCCTest.RType4 MCCTest.VTypeC::f7 - IL_0117: callvirt instance void MCCTest.RType4::Check(class MCCTest.RType4) - IL_011c: nop - IL_011d: ldstr "f8" - IL_0122: stloc.0 - IL_0123: ldarg.0 - IL_0124: ldfld valuetype MCCTest.VType5 MCCTest.VTypeC::f8 - IL_0129: box MCCTest.VType5 - IL_012e: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0133: stloc.1 - IL_0134: ldarg.0 - IL_0135: ldflda valuetype MCCTest.VType5 MCCTest.VTypeC::f8 - IL_013a: ldarga.s expected - IL_013c: ldfld valuetype MCCTest.VType5 MCCTest.VTypeC::f8 - IL_0141: call instance void MCCTest.VType5::Check(valuetype MCCTest.VType5) - IL_0146: nop - IL_0147: ldstr "f9" - IL_014c: stloc.0 - IL_014d: ldarg.0 - IL_014e: ldfld valuetype MCCTest.VType6 MCCTest.VTypeC::f9 - IL_0153: box MCCTest.VType6 - IL_0158: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_015d: stloc.1 - IL_015e: ldarg.0 - IL_015f: ldflda valuetype MCCTest.VType6 MCCTest.VTypeC::f9 - IL_0164: ldarga.s expected - IL_0166: ldfld valuetype MCCTest.VType6 MCCTest.VTypeC::f9 - IL_016b: call instance void MCCTest.VType6::Check(valuetype MCCTest.VType6) - IL_0170: nop - IL_0171: ldstr "f10" - IL_0176: stloc.0 - IL_0177: ldarg.0 - IL_0178: ldfld class MCCTest.RType4 MCCTest.VTypeC::f10 - IL_017d: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0182: stloc.1 - IL_0183: ldarg.0 - IL_0184: ldfld class MCCTest.RType4 MCCTest.VTypeC::f10 - IL_0189: ldarga.s expected - IL_018b: ldfld class MCCTest.RType4 MCCTest.VTypeC::f10 - IL_0190: callvirt instance void MCCTest.RType4::Check(class MCCTest.RType4) - IL_0195: nop - IL_0196: ldstr "f11" - IL_019b: stloc.0 - IL_019c: ldarg.0 - IL_019d: ldfld valuetype MCCTest.VType5 MCCTest.VTypeC::f11 - IL_01a2: box MCCTest.VType5 - IL_01a7: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_01ac: stloc.1 - IL_01ad: ldarg.0 - IL_01ae: ldflda valuetype MCCTest.VType5 MCCTest.VTypeC::f11 - IL_01b3: ldarga.s expected - IL_01b5: ldfld valuetype MCCTest.VType5 MCCTest.VTypeC::f11 - IL_01ba: call instance void MCCTest.VType5::Check(valuetype MCCTest.VType5) - IL_01bf: nop - IL_01c0: ldstr "f12" - IL_01c5: stloc.0 - IL_01c6: ldarg.0 - IL_01c7: ldfld valuetype MCCTest.VType6 MCCTest.VTypeC::f12 - IL_01cc: box MCCTest.VType6 - IL_01d1: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_01d6: stloc.1 - IL_01d7: ldarg.0 - IL_01d8: ldflda valuetype MCCTest.VType6 MCCTest.VTypeC::f12 - IL_01dd: ldarga.s expected - IL_01df: ldfld valuetype MCCTest.VType6 MCCTest.VTypeC::f12 - IL_01e4: call instance void MCCTest.VType6::Check(valuetype MCCTest.VType6) - IL_01e9: nop - IL_01ea: nop - IL_01eb: leave.s IL_01f8 - - } // end .try - catch MCCTest.ResultVerificationException - { - IL_01ed: stloc.2 - IL_01ee: nop - IL_01ef: ldloc.0 - IL_01f0: ldloc.1 - IL_01f1: ldloc.2 - IL_01f2: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - class [mscorlib]System.Type, - class MCCTest.ResultVerificationException) - IL_01f7: throw - - } // end handler - IL_01f8: nop - IL_01f9: ret - } // end of method VTypeC::Check - - .method public hidebysig instance string - Dump(int32 level) cil managed - { - // Code size 725 (0x2d5) - .maxstack 4 - .locals init (string V_0, - class [mscorlib]System.IO.StringWriter V_1, - string V_2) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: call string MCCTest.FormatUtils::GetPadding(int32) - IL_0007: stloc.0 - IL_0008: newobj instance void [mscorlib]System.IO.StringWriter::.ctor() - IL_000d: stloc.1 - IL_000e: ldloc.1 - IL_000f: ldloc.0 - IL_0010: ldstr "[Field f1] [Type '{0}']" - IL_0015: call string [mscorlib]System.String::Concat(string, - string) - IL_001a: ldarg.0 - IL_001b: ldfld class MCCTest.RType4 MCCTest.VTypeC::f1 - IL_0020: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0025: callvirt instance string [mscorlib]System.Object::ToString() - IL_002a: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_002f: nop - IL_0030: ldloc.1 - IL_0031: ldarg.0 - IL_0032: ldfld class MCCTest.RType4 MCCTest.VTypeC::f1 - IL_0037: ldarg.1 - IL_0038: ldc.i4.1 - IL_0039: add - IL_003a: callvirt instance string MCCTest.RType4::Dump(int32) - IL_003f: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0044: nop - IL_0045: ldloc.1 - IL_0046: ldloc.0 - IL_0047: ldstr "[Field f2] [Type '{0}']" - IL_004c: call string [mscorlib]System.String::Concat(string, - string) - IL_0051: ldarg.0 - IL_0052: ldfld valuetype MCCTest.VType5 MCCTest.VTypeC::f2 - IL_0057: box MCCTest.VType5 - IL_005c: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0061: callvirt instance string [mscorlib]System.Object::ToString() - IL_0066: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_006b: nop - IL_006c: ldloc.1 - IL_006d: ldarg.0 - IL_006e: ldflda valuetype MCCTest.VType5 MCCTest.VTypeC::f2 - IL_0073: ldarg.1 - IL_0074: ldc.i4.1 - IL_0075: add - IL_0076: call instance string MCCTest.VType5::Dump(int32) - IL_007b: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0080: nop - IL_0081: ldloc.1 - IL_0082: ldloc.0 - IL_0083: ldstr "[Field f3] [Type '{0}']" - IL_0088: call string [mscorlib]System.String::Concat(string, - string) - IL_008d: ldarg.0 - IL_008e: ldfld valuetype MCCTest.VType6 MCCTest.VTypeC::f3 - IL_0093: box MCCTest.VType6 - IL_0098: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_009d: callvirt instance string [mscorlib]System.Object::ToString() - IL_00a2: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_00a7: nop - IL_00a8: ldloc.1 - IL_00a9: ldarg.0 - IL_00aa: ldflda valuetype MCCTest.VType6 MCCTest.VTypeC::f3 - IL_00af: ldarg.1 - IL_00b0: ldc.i4.1 - IL_00b1: add - IL_00b2: call instance string MCCTest.VType6::Dump(int32) - IL_00b7: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_00bc: nop - IL_00bd: ldloc.1 - IL_00be: ldloc.0 - IL_00bf: ldstr "[Field f4] [Type '{0}']" - IL_00c4: call string [mscorlib]System.String::Concat(string, - string) - IL_00c9: ldarg.0 - IL_00ca: ldfld class MCCTest.RType4 MCCTest.VTypeC::f4 - IL_00cf: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_00d4: callvirt instance string [mscorlib]System.Object::ToString() - IL_00d9: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_00de: nop - IL_00df: ldloc.1 - IL_00e0: ldarg.0 - IL_00e1: ldfld class MCCTest.RType4 MCCTest.VTypeC::f4 - IL_00e6: ldarg.1 - IL_00e7: ldc.i4.1 - IL_00e8: add - IL_00e9: callvirt instance string MCCTest.RType4::Dump(int32) - IL_00ee: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_00f3: nop - IL_00f4: ldloc.1 - IL_00f5: ldloc.0 - IL_00f6: ldstr "[Field f5] [Type '{0}']" - IL_00fb: call string [mscorlib]System.String::Concat(string, - string) - IL_0100: ldarg.0 - IL_0101: ldfld valuetype MCCTest.VType5 MCCTest.VTypeC::f5 - IL_0106: box MCCTest.VType5 - IL_010b: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0110: callvirt instance string [mscorlib]System.Object::ToString() - IL_0115: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_011a: nop - IL_011b: ldloc.1 - IL_011c: ldarg.0 - IL_011d: ldflda valuetype MCCTest.VType5 MCCTest.VTypeC::f5 - IL_0122: ldarg.1 - IL_0123: ldc.i4.1 - IL_0124: add - IL_0125: call instance string MCCTest.VType5::Dump(int32) - IL_012a: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_012f: nop - IL_0130: ldloc.1 - IL_0131: ldloc.0 - IL_0132: ldstr "[Field f6] [Type '{0}']" - IL_0137: call string [mscorlib]System.String::Concat(string, - string) - IL_013c: ldarg.0 - IL_013d: ldfld valuetype MCCTest.VType6 MCCTest.VTypeC::f6 - IL_0142: box MCCTest.VType6 - IL_0147: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_014c: callvirt instance string [mscorlib]System.Object::ToString() - IL_0151: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0156: nop - IL_0157: ldloc.1 - IL_0158: ldarg.0 - IL_0159: ldflda valuetype MCCTest.VType6 MCCTest.VTypeC::f6 - IL_015e: ldarg.1 - IL_015f: ldc.i4.1 - IL_0160: add - IL_0161: call instance string MCCTest.VType6::Dump(int32) - IL_0166: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_016b: nop - IL_016c: ldloc.1 - IL_016d: ldloc.0 - IL_016e: ldstr "[Field f7] [Type '{0}']" - IL_0173: call string [mscorlib]System.String::Concat(string, - string) - IL_0178: ldarg.0 - IL_0179: ldfld class MCCTest.RType4 MCCTest.VTypeC::f7 - IL_017e: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0183: callvirt instance string [mscorlib]System.Object::ToString() - IL_0188: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_018d: nop - IL_018e: ldloc.1 - IL_018f: ldarg.0 - IL_0190: ldfld class MCCTest.RType4 MCCTest.VTypeC::f7 - IL_0195: ldarg.1 - IL_0196: ldc.i4.1 - IL_0197: add - IL_0198: callvirt instance string MCCTest.RType4::Dump(int32) - IL_019d: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_01a2: nop - IL_01a3: ldloc.1 - IL_01a4: ldloc.0 - IL_01a5: ldstr "[Field f8] [Type '{0}']" - IL_01aa: call string [mscorlib]System.String::Concat(string, - string) - IL_01af: ldarg.0 - IL_01b0: ldfld valuetype MCCTest.VType5 MCCTest.VTypeC::f8 - IL_01b5: box MCCTest.VType5 - IL_01ba: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_01bf: callvirt instance string [mscorlib]System.Object::ToString() - IL_01c4: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_01c9: nop - IL_01ca: ldloc.1 - IL_01cb: ldarg.0 - IL_01cc: ldflda valuetype MCCTest.VType5 MCCTest.VTypeC::f8 - IL_01d1: ldarg.1 - IL_01d2: ldc.i4.1 - IL_01d3: add - IL_01d4: call instance string MCCTest.VType5::Dump(int32) - IL_01d9: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_01de: nop - IL_01df: ldloc.1 - IL_01e0: ldloc.0 - IL_01e1: ldstr "[Field f9] [Type '{0}']" - IL_01e6: call string [mscorlib]System.String::Concat(string, - string) - IL_01eb: ldarg.0 - IL_01ec: ldfld valuetype MCCTest.VType6 MCCTest.VTypeC::f9 - IL_01f1: box MCCTest.VType6 - IL_01f6: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_01fb: callvirt instance string [mscorlib]System.Object::ToString() - IL_0200: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0205: nop - IL_0206: ldloc.1 - IL_0207: ldarg.0 - IL_0208: ldflda valuetype MCCTest.VType6 MCCTest.VTypeC::f9 - IL_020d: ldarg.1 - IL_020e: ldc.i4.1 - IL_020f: add - IL_0210: call instance string MCCTest.VType6::Dump(int32) - IL_0215: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_021a: nop - IL_021b: ldloc.1 - IL_021c: ldloc.0 - IL_021d: ldstr "[Field f10] [Type '{0}']" - IL_0222: call string [mscorlib]System.String::Concat(string, - string) - IL_0227: ldarg.0 - IL_0228: ldfld class MCCTest.RType4 MCCTest.VTypeC::f10 - IL_022d: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0232: callvirt instance string [mscorlib]System.Object::ToString() - IL_0237: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_023c: nop - IL_023d: ldloc.1 - IL_023e: ldarg.0 - IL_023f: ldfld class MCCTest.RType4 MCCTest.VTypeC::f10 - IL_0244: ldarg.1 - IL_0245: ldc.i4.1 - IL_0246: add - IL_0247: callvirt instance string MCCTest.RType4::Dump(int32) - IL_024c: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0251: nop - IL_0252: ldloc.1 - IL_0253: ldloc.0 - IL_0254: ldstr "[Field f11] [Type '{0}']" - IL_0259: call string [mscorlib]System.String::Concat(string, - string) - IL_025e: ldarg.0 - IL_025f: ldfld valuetype MCCTest.VType5 MCCTest.VTypeC::f11 - IL_0264: box MCCTest.VType5 - IL_0269: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_026e: callvirt instance string [mscorlib]System.Object::ToString() - IL_0273: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0278: nop - IL_0279: ldloc.1 - IL_027a: ldarg.0 - IL_027b: ldflda valuetype MCCTest.VType5 MCCTest.VTypeC::f11 - IL_0280: ldarg.1 - IL_0281: ldc.i4.1 - IL_0282: add - IL_0283: call instance string MCCTest.VType5::Dump(int32) - IL_0288: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_028d: nop - IL_028e: ldloc.1 - IL_028f: ldloc.0 - IL_0290: ldstr "[Field f12] [Type '{0}']" - IL_0295: call string [mscorlib]System.String::Concat(string, - string) - IL_029a: ldarg.0 - IL_029b: ldfld valuetype MCCTest.VType6 MCCTest.VTypeC::f12 - IL_02a0: box MCCTest.VType6 - IL_02a5: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_02aa: callvirt instance string [mscorlib]System.Object::ToString() - IL_02af: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_02b4: nop - IL_02b5: ldloc.1 - IL_02b6: ldarg.0 - IL_02b7: ldflda valuetype MCCTest.VType6 MCCTest.VTypeC::f12 - IL_02bc: ldarg.1 - IL_02bd: ldc.i4.1 - IL_02be: add - IL_02bf: call instance string MCCTest.VType6::Dump(int32) - IL_02c4: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_02c9: nop - IL_02ca: ldloc.1 - IL_02cb: callvirt instance string [mscorlib]System.Object::ToString() - IL_02d0: stloc.2 - IL_02d1: br.s IL_02d3 - - IL_02d3: ldloc.2 - IL_02d4: ret - } // end of method VTypeC::Dump - - .method public hidebysig instance string - Dump() cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.0 - IL_0003: call instance string MCCTest.VTypeC::Dump(int32) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method VTypeC::Dump - -} // end of class MCCTest.VTypeC - -.class public sequential ansi sealed beforefieldinit MCCTest.VTypeD - extends [mscorlib]System.ValueType - implements class MCCTest.CType`1 -{ - .field public int32 f1 - .field public valuetype MCCTest.VType3 f2 - .field public float64 f3 - .field public class MCCTest.RType4 f4 - .field public valuetype MCCTest.VType7 f5 - .field public uint64 f6 - .field public float32 f7 - .field public class MCCTest.RType4 f8 - .field public valuetype MCCTest.VType6 f9 - .field public float64 f10 - .field public int16 f11 - .field public class MCCTest.RType4 f12 - .field public valuetype MCCTest.VType5 f13 - .field public valuetype MCCTest.VType3 f14 - .field public class MCCTest.RType4 f15 - .field public valuetype MCCTest.VType7 f16 - .field public uint32 f17 - .method public hidebysig newslot virtual final - instance void Init(int32 count) cil managed - { - // Code size 230 (0xe6) - .maxstack 2 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: newobj instance void MCCTest.RType4::.ctor() - IL_0007: stfld class MCCTest.RType4 MCCTest.VTypeD::f4 - IL_000c: ldarg.0 - IL_000d: newobj instance void MCCTest.RType4::.ctor() - IL_0012: stfld class MCCTest.RType4 MCCTest.VTypeD::f8 - IL_0017: ldarg.0 - IL_0018: newobj instance void MCCTest.RType4::.ctor() - IL_001d: stfld class MCCTest.RType4 MCCTest.VTypeD::f12 - IL_0022: ldarg.0 - IL_0023: newobj instance void MCCTest.RType4::.ctor() - IL_0028: stfld class MCCTest.RType4 MCCTest.VTypeD::f15 - IL_002d: ldarg.0 - IL_002e: ldarg.1 - IL_002f: stfld int32 MCCTest.VTypeD::f1 - IL_0034: ldarg.0 - IL_0035: ldflda valuetype MCCTest.VType3 MCCTest.VTypeD::f2 - IL_003a: ldarg.1 - IL_003b: call instance void MCCTest.VType3::Init(int32) - IL_0040: nop - IL_0041: ldarg.0 - IL_0042: ldarg.1 - IL_0043: conv.r8 - IL_0044: stfld float64 MCCTest.VTypeD::f3 - IL_0049: ldarg.0 - IL_004a: ldfld class MCCTest.RType4 MCCTest.VTypeD::f4 - IL_004f: ldarg.1 - IL_0050: callvirt instance void MCCTest.RType4::Init(int32) - IL_0055: nop - IL_0056: ldarg.0 - IL_0057: ldflda valuetype MCCTest.VType7 MCCTest.VTypeD::f5 - IL_005c: ldarg.1 - IL_005d: call instance void MCCTest.VType7::Init(int32) - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldarg.1 - IL_0065: conv.i8 - IL_0066: stfld uint64 MCCTest.VTypeD::f6 - IL_006b: ldarg.0 - IL_006c: ldarg.1 - IL_006d: conv.r4 - IL_006e: stfld float32 MCCTest.VTypeD::f7 - IL_0073: ldarg.0 - IL_0074: ldfld class MCCTest.RType4 MCCTest.VTypeD::f8 - IL_0079: ldarg.1 - IL_007a: callvirt instance void MCCTest.RType4::Init(int32) - IL_007f: nop - IL_0080: ldarg.0 - IL_0081: ldflda valuetype MCCTest.VType6 MCCTest.VTypeD::f9 - IL_0086: ldarg.1 - IL_0087: call instance void MCCTest.VType6::Init(int32) - IL_008c: nop - IL_008d: ldarg.0 - IL_008e: ldarg.1 - IL_008f: conv.r8 - IL_0090: stfld float64 MCCTest.VTypeD::f10 - IL_0095: ldarg.0 - IL_0096: ldarg.1 - IL_0097: conv.i2 - IL_0098: stfld int16 MCCTest.VTypeD::f11 - IL_009d: ldarg.0 - IL_009e: ldfld class MCCTest.RType4 MCCTest.VTypeD::f12 - IL_00a3: ldarg.1 - IL_00a4: callvirt instance void MCCTest.RType4::Init(int32) - IL_00a9: nop - IL_00aa: ldarg.0 - IL_00ab: ldflda valuetype MCCTest.VType5 MCCTest.VTypeD::f13 - IL_00b0: ldarg.1 - IL_00b1: call instance void MCCTest.VType5::Init(int32) - IL_00b6: nop - IL_00b7: ldarg.0 - IL_00b8: ldflda valuetype MCCTest.VType3 MCCTest.VTypeD::f14 - IL_00bd: ldarg.1 - IL_00be: call instance void MCCTest.VType3::Init(int32) - IL_00c3: nop - IL_00c4: ldarg.0 - IL_00c5: ldfld class MCCTest.RType4 MCCTest.VTypeD::f15 - IL_00ca: ldarg.1 - IL_00cb: callvirt instance void MCCTest.RType4::Init(int32) - IL_00d0: nop - IL_00d1: ldarg.0 - IL_00d2: ldflda valuetype MCCTest.VType7 MCCTest.VTypeD::f16 - IL_00d7: ldarg.1 - IL_00d8: call instance void MCCTest.VType7::Init(int32) - IL_00dd: nop - IL_00de: ldarg.0 - IL_00df: ldarg.1 - IL_00e0: stfld uint32 MCCTest.VTypeD::f17 - IL_00e5: ret - } // end of method VTypeD::Init - - .method public hidebysig newslot virtual final - instance void Init() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.1 - IL_0003: call instance void MCCTest.VTypeD::Init(int32) - IL_0008: nop - IL_0009: ret - } // end of method VTypeD::Init - - .method public hidebysig newslot virtual final - instance void Zero() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.0 - IL_0003: call instance void MCCTest.VTypeD::Init(int32) - IL_0008: nop - IL_0009: ret - } // end of method VTypeD::Zero - - .method public hidebysig instance void - Add(valuetype MCCTest.VTypeD val) cil managed - { - // Code size 333 (0x14d) - .maxstack 3 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: dup - IL_0003: ldfld int32 MCCTest.VTypeD::f1 - IL_0008: ldarga.s val - IL_000a: ldfld int32 MCCTest.VTypeD::f1 - IL_000f: add - IL_0010: stfld int32 MCCTest.VTypeD::f1 - IL_0015: ldarg.0 - IL_0016: ldflda valuetype MCCTest.VType3 MCCTest.VTypeD::f2 - IL_001b: ldarga.s val - IL_001d: ldfld valuetype MCCTest.VType3 MCCTest.VTypeD::f2 - IL_0022: call instance void MCCTest.VType3::Add(valuetype MCCTest.VType3) - IL_0027: nop - IL_0028: ldarg.0 - IL_0029: dup - IL_002a: ldfld float64 MCCTest.VTypeD::f3 - IL_002f: ldarga.s val - IL_0031: ldfld float64 MCCTest.VTypeD::f3 - IL_0036: add - IL_0037: stfld float64 MCCTest.VTypeD::f3 - IL_003c: ldarg.0 - IL_003d: ldfld class MCCTest.RType4 MCCTest.VTypeD::f4 - IL_0042: ldarga.s val - IL_0044: ldfld class MCCTest.RType4 MCCTest.VTypeD::f4 - IL_0049: callvirt instance void MCCTest.RType4::Add(class MCCTest.RType4) - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldflda valuetype MCCTest.VType7 MCCTest.VTypeD::f5 - IL_0055: ldarga.s val - IL_0057: ldfld valuetype MCCTest.VType7 MCCTest.VTypeD::f5 - IL_005c: call instance void MCCTest.VType7::Add(valuetype MCCTest.VType7) - IL_0061: nop - IL_0062: ldarg.0 - IL_0063: dup - IL_0064: ldfld uint64 MCCTest.VTypeD::f6 - IL_0069: ldarga.s val - IL_006b: ldfld uint64 MCCTest.VTypeD::f6 - IL_0070: add - IL_0071: stfld uint64 MCCTest.VTypeD::f6 - IL_0076: ldarg.0 - IL_0077: dup - IL_0078: ldfld float32 MCCTest.VTypeD::f7 - IL_007d: ldarga.s val - IL_007f: ldfld float32 MCCTest.VTypeD::f7 - IL_0084: add - IL_0085: stfld float32 MCCTest.VTypeD::f7 - IL_008a: ldarg.0 - IL_008b: ldfld class MCCTest.RType4 MCCTest.VTypeD::f8 - IL_0090: ldarga.s val - IL_0092: ldfld class MCCTest.RType4 MCCTest.VTypeD::f8 - IL_0097: callvirt instance void MCCTest.RType4::Add(class MCCTest.RType4) - IL_009c: nop - IL_009d: ldarg.0 - IL_009e: ldflda valuetype MCCTest.VType6 MCCTest.VTypeD::f9 - IL_00a3: ldarga.s val - IL_00a5: ldfld valuetype MCCTest.VType6 MCCTest.VTypeD::f9 - IL_00aa: call instance void MCCTest.VType6::Add(valuetype MCCTest.VType6) - IL_00af: nop - IL_00b0: ldarg.0 - IL_00b1: dup - IL_00b2: ldfld float64 MCCTest.VTypeD::f10 - IL_00b7: ldarga.s val - IL_00b9: ldfld float64 MCCTest.VTypeD::f10 - IL_00be: add - IL_00bf: stfld float64 MCCTest.VTypeD::f10 - IL_00c4: ldarg.0 - IL_00c5: dup - IL_00c6: ldfld int16 MCCTest.VTypeD::f11 - IL_00cb: ldarga.s val - IL_00cd: ldfld int16 MCCTest.VTypeD::f11 - IL_00d2: add - IL_00d3: conv.i2 - IL_00d4: stfld int16 MCCTest.VTypeD::f11 - IL_00d9: ldarg.0 - IL_00da: ldfld class MCCTest.RType4 MCCTest.VTypeD::f12 - IL_00df: ldarga.s val - IL_00e1: ldfld class MCCTest.RType4 MCCTest.VTypeD::f12 - IL_00e6: callvirt instance void MCCTest.RType4::Add(class MCCTest.RType4) - IL_00eb: nop - IL_00ec: ldarg.0 - IL_00ed: ldflda valuetype MCCTest.VType5 MCCTest.VTypeD::f13 - IL_00f2: ldarga.s val - IL_00f4: ldfld valuetype MCCTest.VType5 MCCTest.VTypeD::f13 - IL_00f9: call instance void MCCTest.VType5::Add(valuetype MCCTest.VType5) - IL_00fe: nop - IL_00ff: ldarg.0 - IL_0100: ldflda valuetype MCCTest.VType3 MCCTest.VTypeD::f14 - IL_0105: ldarga.s val - IL_0107: ldfld valuetype MCCTest.VType3 MCCTest.VTypeD::f14 - IL_010c: call instance void MCCTest.VType3::Add(valuetype MCCTest.VType3) - IL_0111: nop - IL_0112: ldarg.0 - IL_0113: ldfld class MCCTest.RType4 MCCTest.VTypeD::f15 - IL_0118: ldarga.s val - IL_011a: ldfld class MCCTest.RType4 MCCTest.VTypeD::f15 - IL_011f: callvirt instance void MCCTest.RType4::Add(class MCCTest.RType4) - IL_0124: nop - IL_0125: ldarg.0 - IL_0126: ldflda valuetype MCCTest.VType7 MCCTest.VTypeD::f16 - IL_012b: ldarga.s val - IL_012d: ldfld valuetype MCCTest.VType7 MCCTest.VTypeD::f16 - IL_0132: call instance void MCCTest.VType7::Add(valuetype MCCTest.VType7) - IL_0137: nop - IL_0138: ldarg.0 - IL_0139: dup - IL_013a: ldfld uint32 MCCTest.VTypeD::f17 - IL_013f: ldarga.s val - IL_0141: ldfld uint32 MCCTest.VTypeD::f17 - IL_0146: add - IL_0147: stfld uint32 MCCTest.VTypeD::f17 - IL_014c: ret - } // end of method VTypeD::Add - - .method public hidebysig newslot virtual final - instance void Check(valuetype MCCTest.VTypeD expected) cil managed - { - // Code size 742 (0x2e6) - .maxstack 4 - .locals init (string V_0, - class [mscorlib]System.Type V_1, - class MCCTest.ResultVerificationException V_2, - bool V_3) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldfld int32 MCCTest.VTypeD::f1 - IL_0007: ldarga.s expected - IL_0009: ldfld int32 MCCTest.VTypeD::f1 - IL_000e: ceq - IL_0010: stloc.3 - IL_0011: ldloc.3 - IL_0012: brtrue.s IL_002f - - IL_0014: nop - IL_0015: ldstr "f1" - IL_001a: ldarg.0 - IL_001b: ldfld int32 MCCTest.VTypeD::f1 - IL_0020: conv.i8 - IL_0021: ldarga.s expected - IL_0023: ldfld int32 MCCTest.VTypeD::f1 - IL_0028: conv.i8 - IL_0029: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_002e: throw - - IL_002f: ldarg.0 - IL_0030: ldfld float64 MCCTest.VTypeD::f3 - IL_0035: ldarga.s expected - IL_0037: ldfld float64 MCCTest.VTypeD::f3 - IL_003c: ceq - IL_003e: stloc.3 - IL_003f: ldloc.3 - IL_0040: brtrue.s IL_005b - - IL_0042: nop - IL_0043: ldstr "f3" - IL_0048: ldarg.0 - IL_0049: ldfld float64 MCCTest.VTypeD::f3 - IL_004e: ldarga.s expected - IL_0050: ldfld float64 MCCTest.VTypeD::f3 - IL_0055: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_005a: throw - - IL_005b: ldarg.0 - IL_005c: ldfld uint64 MCCTest.VTypeD::f6 - IL_0061: ldarga.s expected - IL_0063: ldfld uint64 MCCTest.VTypeD::f6 - IL_0068: ceq - IL_006a: stloc.3 - IL_006b: ldloc.3 - IL_006c: brtrue.s IL_008b - - IL_006e: nop - IL_006f: ldstr "f6" - IL_0074: ldarg.0 - IL_0075: ldfld uint64 MCCTest.VTypeD::f6 - IL_007a: conv.r.un - IL_007b: conv.r8 - IL_007c: ldarga.s expected - IL_007e: ldfld uint64 MCCTest.VTypeD::f6 - IL_0083: conv.r.un - IL_0084: conv.r8 - IL_0085: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_008a: throw - - IL_008b: ldarg.0 - IL_008c: ldfld float32 MCCTest.VTypeD::f7 - IL_0091: ldarga.s expected - IL_0093: ldfld float32 MCCTest.VTypeD::f7 - IL_0098: ceq - IL_009a: stloc.3 - IL_009b: ldloc.3 - IL_009c: brtrue.s IL_00b9 - - IL_009e: nop - IL_009f: ldstr "f7" - IL_00a4: ldarg.0 - IL_00a5: ldfld float32 MCCTest.VTypeD::f7 - IL_00aa: conv.r8 - IL_00ab: ldarga.s expected - IL_00ad: ldfld float32 MCCTest.VTypeD::f7 - IL_00b2: conv.r8 - IL_00b3: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_00b8: throw - - IL_00b9: ldarg.0 - IL_00ba: ldfld float64 MCCTest.VTypeD::f10 - IL_00bf: ldarga.s expected - IL_00c1: ldfld float64 MCCTest.VTypeD::f10 - IL_00c6: ceq - IL_00c8: stloc.3 - IL_00c9: ldloc.3 - IL_00ca: brtrue.s IL_00e5 - - IL_00cc: nop - IL_00cd: ldstr "f10" - IL_00d2: ldarg.0 - IL_00d3: ldfld float64 MCCTest.VTypeD::f10 - IL_00d8: ldarga.s expected - IL_00da: ldfld float64 MCCTest.VTypeD::f10 - IL_00df: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_00e4: throw - - IL_00e5: ldarg.0 - IL_00e6: ldfld int16 MCCTest.VTypeD::f11 - IL_00eb: ldarga.s expected - IL_00ed: ldfld int16 MCCTest.VTypeD::f11 - IL_00f2: ceq - IL_00f4: stloc.3 - IL_00f5: ldloc.3 - IL_00f6: brtrue.s IL_0113 - - IL_00f8: nop - IL_00f9: ldstr "f11" - IL_00fe: ldarg.0 - IL_00ff: ldfld int16 MCCTest.VTypeD::f11 - IL_0104: conv.i8 - IL_0105: ldarga.s expected - IL_0107: ldfld int16 MCCTest.VTypeD::f11 - IL_010c: conv.i8 - IL_010d: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_0112: throw - - IL_0113: ldarg.0 - IL_0114: ldfld uint32 MCCTest.VTypeD::f17 - IL_0119: ldarga.s expected - IL_011b: ldfld uint32 MCCTest.VTypeD::f17 - IL_0120: ceq - IL_0122: stloc.3 - IL_0123: ldloc.3 - IL_0124: brtrue.s IL_0141 - - IL_0126: nop - IL_0127: ldstr "f17" - IL_012c: ldarg.0 - IL_012d: ldfld uint32 MCCTest.VTypeD::f17 - IL_0132: conv.u8 - IL_0133: ldarga.s expected - IL_0135: ldfld uint32 MCCTest.VTypeD::f17 - IL_013a: conv.u8 - IL_013b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_0140: throw - - IL_0141: ldnull - IL_0142: stloc.0 - IL_0143: ldnull - IL_0144: stloc.1 - .try - { - IL_0145: nop - IL_0146: ldstr "f2" - IL_014b: stloc.0 - IL_014c: ldarg.0 - IL_014d: ldfld valuetype MCCTest.VType3 MCCTest.VTypeD::f2 - IL_0152: box MCCTest.VType3 - IL_0157: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_015c: stloc.1 - IL_015d: ldarg.0 - IL_015e: ldflda valuetype MCCTest.VType3 MCCTest.VTypeD::f2 - IL_0163: ldarga.s expected - IL_0165: ldfld valuetype MCCTest.VType3 MCCTest.VTypeD::f2 - IL_016a: call instance void MCCTest.VType3::Check(valuetype MCCTest.VType3) - IL_016f: nop - IL_0170: ldstr "f4" - IL_0175: stloc.0 - IL_0176: ldarg.0 - IL_0177: ldfld class MCCTest.RType4 MCCTest.VTypeD::f4 - IL_017c: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0181: stloc.1 - IL_0182: ldarg.0 - IL_0183: ldfld class MCCTest.RType4 MCCTest.VTypeD::f4 - IL_0188: ldarga.s expected - IL_018a: ldfld class MCCTest.RType4 MCCTest.VTypeD::f4 - IL_018f: callvirt instance void MCCTest.RType4::Check(class MCCTest.RType4) - IL_0194: nop - IL_0195: ldstr "f5" - IL_019a: stloc.0 - IL_019b: ldarg.0 - IL_019c: ldfld valuetype MCCTest.VType7 MCCTest.VTypeD::f5 - IL_01a1: box MCCTest.VType7 - IL_01a6: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_01ab: stloc.1 - IL_01ac: ldarg.0 - IL_01ad: ldflda valuetype MCCTest.VType7 MCCTest.VTypeD::f5 - IL_01b2: ldarga.s expected - IL_01b4: ldfld valuetype MCCTest.VType7 MCCTest.VTypeD::f5 - IL_01b9: call instance void MCCTest.VType7::Check(valuetype MCCTest.VType7) - IL_01be: nop - IL_01bf: ldstr "f8" - IL_01c4: stloc.0 - IL_01c5: ldarg.0 - IL_01c6: ldfld class MCCTest.RType4 MCCTest.VTypeD::f8 - IL_01cb: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_01d0: stloc.1 - IL_01d1: ldarg.0 - IL_01d2: ldfld class MCCTest.RType4 MCCTest.VTypeD::f8 - IL_01d7: ldarga.s expected - IL_01d9: ldfld class MCCTest.RType4 MCCTest.VTypeD::f8 - IL_01de: callvirt instance void MCCTest.RType4::Check(class MCCTest.RType4) - IL_01e3: nop - IL_01e4: ldstr "f9" - IL_01e9: stloc.0 - IL_01ea: ldarg.0 - IL_01eb: ldfld valuetype MCCTest.VType6 MCCTest.VTypeD::f9 - IL_01f0: box MCCTest.VType6 - IL_01f5: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_01fa: stloc.1 - IL_01fb: ldarg.0 - IL_01fc: ldflda valuetype MCCTest.VType6 MCCTest.VTypeD::f9 - IL_0201: ldarga.s expected - IL_0203: ldfld valuetype MCCTest.VType6 MCCTest.VTypeD::f9 - IL_0208: call instance void MCCTest.VType6::Check(valuetype MCCTest.VType6) - IL_020d: nop - IL_020e: ldstr "f12" - IL_0213: stloc.0 - IL_0214: ldarg.0 - IL_0215: ldfld class MCCTest.RType4 MCCTest.VTypeD::f12 - IL_021a: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_021f: stloc.1 - IL_0220: ldarg.0 - IL_0221: ldfld class MCCTest.RType4 MCCTest.VTypeD::f12 - IL_0226: ldarga.s expected - IL_0228: ldfld class MCCTest.RType4 MCCTest.VTypeD::f12 - IL_022d: callvirt instance void MCCTest.RType4::Check(class MCCTest.RType4) - IL_0232: nop - IL_0233: ldstr "f13" - IL_0238: stloc.0 - IL_0239: ldarg.0 - IL_023a: ldfld valuetype MCCTest.VType5 MCCTest.VTypeD::f13 - IL_023f: box MCCTest.VType5 - IL_0244: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0249: stloc.1 - IL_024a: ldarg.0 - IL_024b: ldflda valuetype MCCTest.VType5 MCCTest.VTypeD::f13 - IL_0250: ldarga.s expected - IL_0252: ldfld valuetype MCCTest.VType5 MCCTest.VTypeD::f13 - IL_0257: call instance void MCCTest.VType5::Check(valuetype MCCTest.VType5) - IL_025c: nop - IL_025d: ldstr "f14" - IL_0262: stloc.0 - IL_0263: ldarg.0 - IL_0264: ldfld valuetype MCCTest.VType3 MCCTest.VTypeD::f14 - IL_0269: box MCCTest.VType3 - IL_026e: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0273: stloc.1 - IL_0274: ldarg.0 - IL_0275: ldflda valuetype MCCTest.VType3 MCCTest.VTypeD::f14 - IL_027a: ldarga.s expected - IL_027c: ldfld valuetype MCCTest.VType3 MCCTest.VTypeD::f14 - IL_0281: call instance void MCCTest.VType3::Check(valuetype MCCTest.VType3) - IL_0286: nop - IL_0287: ldstr "f15" - IL_028c: stloc.0 - IL_028d: ldarg.0 - IL_028e: ldfld class MCCTest.RType4 MCCTest.VTypeD::f15 - IL_0293: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0298: stloc.1 - IL_0299: ldarg.0 - IL_029a: ldfld class MCCTest.RType4 MCCTest.VTypeD::f15 - IL_029f: ldarga.s expected - IL_02a1: ldfld class MCCTest.RType4 MCCTest.VTypeD::f15 - IL_02a6: callvirt instance void MCCTest.RType4::Check(class MCCTest.RType4) - IL_02ab: nop - IL_02ac: ldstr "f16" - IL_02b1: stloc.0 - IL_02b2: ldarg.0 - IL_02b3: ldfld valuetype MCCTest.VType7 MCCTest.VTypeD::f16 - IL_02b8: box MCCTest.VType7 - IL_02bd: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_02c2: stloc.1 - IL_02c3: ldarg.0 - IL_02c4: ldflda valuetype MCCTest.VType7 MCCTest.VTypeD::f16 - IL_02c9: ldarga.s expected - IL_02cb: ldfld valuetype MCCTest.VType7 MCCTest.VTypeD::f16 - IL_02d0: call instance void MCCTest.VType7::Check(valuetype MCCTest.VType7) - IL_02d5: nop - IL_02d6: nop - IL_02d7: leave.s IL_02e4 - - } // end .try - catch MCCTest.ResultVerificationException - { - IL_02d9: stloc.2 - IL_02da: nop - IL_02db: ldloc.0 - IL_02dc: ldloc.1 - IL_02dd: ldloc.2 - IL_02de: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - class [mscorlib]System.Type, - class MCCTest.ResultVerificationException) - IL_02e3: throw - - } // end handler - IL_02e4: nop - IL_02e5: ret - } // end of method VTypeD::Check - - .method public hidebysig instance string - Dump(int32 level) cil managed - { - // Code size 808 (0x328) - .maxstack 4 - .locals init (string V_0, - class [mscorlib]System.IO.StringWriter V_1, - string V_2) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: call string MCCTest.FormatUtils::GetPadding(int32) - IL_0007: stloc.0 - IL_0008: newobj instance void [mscorlib]System.IO.StringWriter::.ctor() - IL_000d: stloc.1 - IL_000e: ldloc.1 - IL_000f: ldloc.0 - IL_0010: ldstr "f1 = " - IL_0015: ldarg.0 - IL_0016: ldfld int32 MCCTest.VTypeD::f1 - IL_001b: box [mscorlib]System.Int32 - IL_0020: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0025: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_002a: nop - IL_002b: ldloc.1 - IL_002c: ldloc.0 - IL_002d: ldstr "[Field f2] [Type '{0}']" - IL_0032: call string [mscorlib]System.String::Concat(string, - string) - IL_0037: ldarg.0 - IL_0038: ldfld valuetype MCCTest.VType3 MCCTest.VTypeD::f2 - IL_003d: box MCCTest.VType3 - IL_0042: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0047: callvirt instance string [mscorlib]System.Object::ToString() - IL_004c: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0051: nop - IL_0052: ldloc.1 - IL_0053: ldarg.0 - IL_0054: ldflda valuetype MCCTest.VType3 MCCTest.VTypeD::f2 - IL_0059: ldarg.1 - IL_005a: ldc.i4.1 - IL_005b: add - IL_005c: call instance string MCCTest.VType3::Dump(int32) - IL_0061: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0066: nop - IL_0067: ldloc.1 - IL_0068: ldloc.0 - IL_0069: ldstr "f3 = " - IL_006e: ldarg.0 - IL_006f: ldfld float64 MCCTest.VTypeD::f3 - IL_0074: box [mscorlib]System.Double - IL_0079: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_007e: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0083: nop - IL_0084: ldloc.1 - IL_0085: ldloc.0 - IL_0086: ldstr "[Field f4] [Type '{0}']" - IL_008b: call string [mscorlib]System.String::Concat(string, - string) - IL_0090: ldarg.0 - IL_0091: ldfld class MCCTest.RType4 MCCTest.VTypeD::f4 - IL_0096: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_009b: callvirt instance string [mscorlib]System.Object::ToString() - IL_00a0: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_00a5: nop - IL_00a6: ldloc.1 - IL_00a7: ldarg.0 - IL_00a8: ldfld class MCCTest.RType4 MCCTest.VTypeD::f4 - IL_00ad: ldarg.1 - IL_00ae: ldc.i4.1 - IL_00af: add - IL_00b0: callvirt instance string MCCTest.RType4::Dump(int32) - IL_00b5: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_00ba: nop - IL_00bb: ldloc.1 - IL_00bc: ldloc.0 - IL_00bd: ldstr "[Field f5] [Type '{0}']" - IL_00c2: call string [mscorlib]System.String::Concat(string, - string) - IL_00c7: ldarg.0 - IL_00c8: ldfld valuetype MCCTest.VType7 MCCTest.VTypeD::f5 - IL_00cd: box MCCTest.VType7 - IL_00d2: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_00d7: callvirt instance string [mscorlib]System.Object::ToString() - IL_00dc: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_00e1: nop - IL_00e2: ldloc.1 - IL_00e3: ldarg.0 - IL_00e4: ldflda valuetype MCCTest.VType7 MCCTest.VTypeD::f5 - IL_00e9: ldarg.1 - IL_00ea: ldc.i4.1 - IL_00eb: add - IL_00ec: call instance string MCCTest.VType7::Dump(int32) - IL_00f1: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_00f6: nop - IL_00f7: ldloc.1 - IL_00f8: ldloc.0 - IL_00f9: ldstr "f6 = " - IL_00fe: ldarg.0 - IL_00ff: ldfld uint64 MCCTest.VTypeD::f6 - IL_0104: box [mscorlib]System.UInt64 - IL_0109: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_010e: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0113: nop - IL_0114: ldloc.1 - IL_0115: ldloc.0 - IL_0116: ldstr "f7 = " - IL_011b: ldarg.0 - IL_011c: ldfld float32 MCCTest.VTypeD::f7 - IL_0121: box [mscorlib]System.Single - IL_0126: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_012b: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0130: nop - IL_0131: ldloc.1 - IL_0132: ldloc.0 - IL_0133: ldstr "[Field f8] [Type '{0}']" - IL_0138: call string [mscorlib]System.String::Concat(string, - string) - IL_013d: ldarg.0 - IL_013e: ldfld class MCCTest.RType4 MCCTest.VTypeD::f8 - IL_0143: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0148: callvirt instance string [mscorlib]System.Object::ToString() - IL_014d: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0152: nop - IL_0153: ldloc.1 - IL_0154: ldarg.0 - IL_0155: ldfld class MCCTest.RType4 MCCTest.VTypeD::f8 - IL_015a: ldarg.1 - IL_015b: ldc.i4.1 - IL_015c: add - IL_015d: callvirt instance string MCCTest.RType4::Dump(int32) - IL_0162: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0167: nop - IL_0168: ldloc.1 - IL_0169: ldloc.0 - IL_016a: ldstr "[Field f9] [Type '{0}']" - IL_016f: call string [mscorlib]System.String::Concat(string, - string) - IL_0174: ldarg.0 - IL_0175: ldfld valuetype MCCTest.VType6 MCCTest.VTypeD::f9 - IL_017a: box MCCTest.VType6 - IL_017f: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0184: callvirt instance string [mscorlib]System.Object::ToString() - IL_0189: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_018e: nop - IL_018f: ldloc.1 - IL_0190: ldarg.0 - IL_0191: ldflda valuetype MCCTest.VType6 MCCTest.VTypeD::f9 - IL_0196: ldarg.1 - IL_0197: ldc.i4.1 - IL_0198: add - IL_0199: call instance string MCCTest.VType6::Dump(int32) - IL_019e: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_01a3: nop - IL_01a4: ldloc.1 - IL_01a5: ldloc.0 - IL_01a6: ldstr "f10 = " - IL_01ab: ldarg.0 - IL_01ac: ldfld float64 MCCTest.VTypeD::f10 - IL_01b1: box [mscorlib]System.Double - IL_01b6: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_01bb: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_01c0: nop - IL_01c1: ldloc.1 - IL_01c2: ldloc.0 - IL_01c3: ldstr "f11 = " - IL_01c8: ldarg.0 - IL_01c9: ldfld int16 MCCTest.VTypeD::f11 - IL_01ce: box [mscorlib]System.Int16 - IL_01d3: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_01d8: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_01dd: nop - IL_01de: ldloc.1 - IL_01df: ldloc.0 - IL_01e0: ldstr "[Field f12] [Type '{0}']" - IL_01e5: call string [mscorlib]System.String::Concat(string, - string) - IL_01ea: ldarg.0 - IL_01eb: ldfld class MCCTest.RType4 MCCTest.VTypeD::f12 - IL_01f0: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_01f5: callvirt instance string [mscorlib]System.Object::ToString() - IL_01fa: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_01ff: nop - IL_0200: ldloc.1 - IL_0201: ldarg.0 - IL_0202: ldfld class MCCTest.RType4 MCCTest.VTypeD::f12 - IL_0207: ldarg.1 - IL_0208: ldc.i4.1 - IL_0209: add - IL_020a: callvirt instance string MCCTest.RType4::Dump(int32) - IL_020f: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0214: nop - IL_0215: ldloc.1 - IL_0216: ldloc.0 - IL_0217: ldstr "[Field f13] [Type '{0}']" - IL_021c: call string [mscorlib]System.String::Concat(string, - string) - IL_0221: ldarg.0 - IL_0222: ldfld valuetype MCCTest.VType5 MCCTest.VTypeD::f13 - IL_0227: box MCCTest.VType5 - IL_022c: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0231: callvirt instance string [mscorlib]System.Object::ToString() - IL_0236: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_023b: nop - IL_023c: ldloc.1 - IL_023d: ldarg.0 - IL_023e: ldflda valuetype MCCTest.VType5 MCCTest.VTypeD::f13 - IL_0243: ldarg.1 - IL_0244: ldc.i4.1 - IL_0245: add - IL_0246: call instance string MCCTest.VType5::Dump(int32) - IL_024b: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0250: nop - IL_0251: ldloc.1 - IL_0252: ldloc.0 - IL_0253: ldstr "[Field f14] [Type '{0}']" - IL_0258: call string [mscorlib]System.String::Concat(string, - string) - IL_025d: ldarg.0 - IL_025e: ldfld valuetype MCCTest.VType3 MCCTest.VTypeD::f14 - IL_0263: box MCCTest.VType3 - IL_0268: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_026d: callvirt instance string [mscorlib]System.Object::ToString() - IL_0272: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0277: nop - IL_0278: ldloc.1 - IL_0279: ldarg.0 - IL_027a: ldflda valuetype MCCTest.VType3 MCCTest.VTypeD::f14 - IL_027f: ldarg.1 - IL_0280: ldc.i4.1 - IL_0281: add - IL_0282: call instance string MCCTest.VType3::Dump(int32) - IL_0287: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_028c: nop - IL_028d: ldloc.1 - IL_028e: ldloc.0 - IL_028f: ldstr "[Field f15] [Type '{0}']" - IL_0294: call string [mscorlib]System.String::Concat(string, - string) - IL_0299: ldarg.0 - IL_029a: ldfld class MCCTest.RType4 MCCTest.VTypeD::f15 - IL_029f: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_02a4: callvirt instance string [mscorlib]System.Object::ToString() - IL_02a9: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_02ae: nop - IL_02af: ldloc.1 - IL_02b0: ldarg.0 - IL_02b1: ldfld class MCCTest.RType4 MCCTest.VTypeD::f15 - IL_02b6: ldarg.1 - IL_02b7: ldc.i4.1 - IL_02b8: add - IL_02b9: callvirt instance string MCCTest.RType4::Dump(int32) - IL_02be: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_02c3: nop - IL_02c4: ldloc.1 - IL_02c5: ldloc.0 - IL_02c6: ldstr "[Field f16] [Type '{0}']" - IL_02cb: call string [mscorlib]System.String::Concat(string, - string) - IL_02d0: ldarg.0 - IL_02d1: ldfld valuetype MCCTest.VType7 MCCTest.VTypeD::f16 - IL_02d6: box MCCTest.VType7 - IL_02db: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_02e0: callvirt instance string [mscorlib]System.Object::ToString() - IL_02e5: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_02ea: nop - IL_02eb: ldloc.1 - IL_02ec: ldarg.0 - IL_02ed: ldflda valuetype MCCTest.VType7 MCCTest.VTypeD::f16 - IL_02f2: ldarg.1 - IL_02f3: ldc.i4.1 - IL_02f4: add - IL_02f5: call instance string MCCTest.VType7::Dump(int32) - IL_02fa: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_02ff: nop - IL_0300: ldloc.1 - IL_0301: ldloc.0 - IL_0302: ldstr "f17 = " - IL_0307: ldarg.0 - IL_0308: ldfld uint32 MCCTest.VTypeD::f17 - IL_030d: box [mscorlib]System.UInt32 - IL_0312: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0317: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_031c: nop - IL_031d: ldloc.1 - IL_031e: callvirt instance string [mscorlib]System.Object::ToString() - IL_0323: stloc.2 - IL_0324: br.s IL_0326 - - IL_0326: ldloc.2 - IL_0327: ret - } // end of method VTypeD::Dump - - .method public hidebysig instance string - Dump() cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.0 - IL_0003: call instance string MCCTest.VTypeD::Dump(int32) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method VTypeD::Dump - -} // end of class MCCTest.VTypeD - -.class public sequential ansi sealed beforefieldinit MCCTest.VTypeE - extends [mscorlib]System.ValueType - implements class MCCTest.CType`1 -{ - .field public valuetype MCCTest.VType9 f1 - .field public class MCCTest.RType4 f2 - .field public valuetype MCCTest.VType8 f3 - .field public int16 f4 - .field public valuetype MCCTest.VType8 f5 - .field public valuetype MCCTest.VType8 f6 - .field public float64 f7 - .field public valuetype MCCTest.VTypeA f8 - .field public int16 f9 - .field public valuetype MCCTest.VTypeD f10 - .field public valuetype MCCTest.VType8 f11 - .field public valuetype MCCTest.VTypeC f12 - .field public valuetype MCCTest.VTypeA f13 - .field public float32 f14 - .field public int32 f15 - .field public valuetype MCCTest.VTypeC f16 - .field public valuetype MCCTest.VType7 f17 - .field public float64 f18 - .field public uint64 f19 - .field public valuetype MCCTest.VType8 f20 - .field public valuetype MCCTest.VType9 f21 - .field public valuetype MCCTest.VTypeC f22 - .field public valuetype MCCTest.VType8 f23 - .method public hidebysig newslot virtual final - instance void Init(int32 count) cil managed - { - // Code size 276 (0x114) - .maxstack 2 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: newobj instance void MCCTest.RType4::.ctor() - IL_0007: stfld class MCCTest.RType4 MCCTest.VTypeE::f2 - IL_000c: ldarg.0 - IL_000d: ldflda valuetype MCCTest.VType9 MCCTest.VTypeE::f1 - IL_0012: ldarg.1 - IL_0013: call instance void MCCTest.VType9::Init(int32) - IL_0018: nop - IL_0019: ldarg.0 - IL_001a: ldfld class MCCTest.RType4 MCCTest.VTypeE::f2 - IL_001f: ldarg.1 - IL_0020: callvirt instance void MCCTest.RType4::Init(int32) - IL_0025: nop - IL_0026: ldarg.0 - IL_0027: ldflda valuetype MCCTest.VType8 MCCTest.VTypeE::f3 - IL_002c: ldarg.1 - IL_002d: call instance void MCCTest.VType8::Init(int32) - IL_0032: nop - IL_0033: ldarg.0 - IL_0034: ldarg.1 - IL_0035: conv.i2 - IL_0036: stfld int16 MCCTest.VTypeE::f4 - IL_003b: ldarg.0 - IL_003c: ldflda valuetype MCCTest.VType8 MCCTest.VTypeE::f5 - IL_0041: ldarg.1 - IL_0042: call instance void MCCTest.VType8::Init(int32) - IL_0047: nop - IL_0048: ldarg.0 - IL_0049: ldflda valuetype MCCTest.VType8 MCCTest.VTypeE::f6 - IL_004e: ldarg.1 - IL_004f: call instance void MCCTest.VType8::Init(int32) - IL_0054: nop - IL_0055: ldarg.0 - IL_0056: ldarg.1 - IL_0057: conv.r8 - IL_0058: stfld float64 MCCTest.VTypeE::f7 - IL_005d: ldarg.0 - IL_005e: ldflda valuetype MCCTest.VTypeA MCCTest.VTypeE::f8 - IL_0063: ldarg.1 - IL_0064: call instance void MCCTest.VTypeA::Init(int32) - IL_0069: nop - IL_006a: ldarg.0 - IL_006b: ldarg.1 - IL_006c: conv.i2 - IL_006d: stfld int16 MCCTest.VTypeE::f9 - IL_0072: ldarg.0 - IL_0073: ldflda valuetype MCCTest.VTypeD MCCTest.VTypeE::f10 - IL_0078: ldarg.1 - IL_0079: call instance void MCCTest.VTypeD::Init(int32) - IL_007e: nop - IL_007f: ldarg.0 - IL_0080: ldflda valuetype MCCTest.VType8 MCCTest.VTypeE::f11 - IL_0085: ldarg.1 - IL_0086: call instance void MCCTest.VType8::Init(int32) - IL_008b: nop - IL_008c: ldarg.0 - IL_008d: ldflda valuetype MCCTest.VTypeC MCCTest.VTypeE::f12 - IL_0092: ldarg.1 - IL_0093: call instance void MCCTest.VTypeC::Init(int32) - IL_0098: nop - IL_0099: ldarg.0 - IL_009a: ldflda valuetype MCCTest.VTypeA MCCTest.VTypeE::f13 - IL_009f: ldarg.1 - IL_00a0: call instance void MCCTest.VTypeA::Init(int32) - IL_00a5: nop - IL_00a6: ldarg.0 - IL_00a7: ldarg.1 - IL_00a8: conv.r4 - IL_00a9: stfld float32 MCCTest.VTypeE::f14 - IL_00ae: ldarg.0 - IL_00af: ldarg.1 - IL_00b0: stfld int32 MCCTest.VTypeE::f15 - IL_00b5: ldarg.0 - IL_00b6: ldflda valuetype MCCTest.VTypeC MCCTest.VTypeE::f16 - IL_00bb: ldarg.1 - IL_00bc: call instance void MCCTest.VTypeC::Init(int32) - IL_00c1: nop - IL_00c2: ldarg.0 - IL_00c3: ldflda valuetype MCCTest.VType7 MCCTest.VTypeE::f17 - IL_00c8: ldarg.1 - IL_00c9: call instance void MCCTest.VType7::Init(int32) - IL_00ce: nop - IL_00cf: ldarg.0 - IL_00d0: ldarg.1 - IL_00d1: conv.r8 - IL_00d2: stfld float64 MCCTest.VTypeE::f18 - IL_00d7: ldarg.0 - IL_00d8: ldarg.1 - IL_00d9: conv.i8 - IL_00da: stfld uint64 MCCTest.VTypeE::f19 - IL_00df: ldarg.0 - IL_00e0: ldflda valuetype MCCTest.VType8 MCCTest.VTypeE::f20 - IL_00e5: ldarg.1 - IL_00e6: call instance void MCCTest.VType8::Init(int32) - IL_00eb: nop - IL_00ec: ldarg.0 - IL_00ed: ldflda valuetype MCCTest.VType9 MCCTest.VTypeE::f21 - IL_00f2: ldarg.1 - IL_00f3: call instance void MCCTest.VType9::Init(int32) - IL_00f8: nop - IL_00f9: ldarg.0 - IL_00fa: ldflda valuetype MCCTest.VTypeC MCCTest.VTypeE::f22 - IL_00ff: ldarg.1 - IL_0100: call instance void MCCTest.VTypeC::Init(int32) - IL_0105: nop - IL_0106: ldarg.0 - IL_0107: ldflda valuetype MCCTest.VType8 MCCTest.VTypeE::f23 - IL_010c: ldarg.1 - IL_010d: call instance void MCCTest.VType8::Init(int32) - IL_0112: nop - IL_0113: ret - } // end of method VTypeE::Init - - .method public hidebysig newslot virtual final - instance void Init() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.1 - IL_0003: call instance void MCCTest.VTypeE::Init(int32) - IL_0008: nop - IL_0009: ret - } // end of method VTypeE::Init - - .method public hidebysig newslot virtual final - instance void Zero() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.0 - IL_0003: call instance void MCCTest.VTypeE::Init(int32) - IL_0008: nop - IL_0009: ret - } // end of method VTypeE::Zero - - .method public hidebysig instance void - Add(valuetype MCCTest.VTypeE val) cil managed - { - // Code size 448 (0x1c0) - .maxstack 3 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldflda valuetype MCCTest.VType9 MCCTest.VTypeE::f1 - IL_0007: ldarga.s val - IL_0009: ldfld valuetype MCCTest.VType9 MCCTest.VTypeE::f1 - IL_000e: call instance void MCCTest.VType9::Add(valuetype MCCTest.VType9) - IL_0013: nop - IL_0014: ldarg.0 - IL_0015: ldfld class MCCTest.RType4 MCCTest.VTypeE::f2 - IL_001a: ldarga.s val - IL_001c: ldfld class MCCTest.RType4 MCCTest.VTypeE::f2 - IL_0021: callvirt instance void MCCTest.RType4::Add(class MCCTest.RType4) - IL_0026: nop - IL_0027: ldarg.0 - IL_0028: ldflda valuetype MCCTest.VType8 MCCTest.VTypeE::f3 - IL_002d: ldarga.s val - IL_002f: ldfld valuetype MCCTest.VType8 MCCTest.VTypeE::f3 - IL_0034: call instance void MCCTest.VType8::Add(valuetype MCCTest.VType8) - IL_0039: nop - IL_003a: ldarg.0 - IL_003b: dup - IL_003c: ldfld int16 MCCTest.VTypeE::f4 - IL_0041: ldarga.s val - IL_0043: ldfld int16 MCCTest.VTypeE::f4 - IL_0048: add - IL_0049: conv.i2 - IL_004a: stfld int16 MCCTest.VTypeE::f4 - IL_004f: ldarg.0 - IL_0050: ldflda valuetype MCCTest.VType8 MCCTest.VTypeE::f5 - IL_0055: ldarga.s val - IL_0057: ldfld valuetype MCCTest.VType8 MCCTest.VTypeE::f5 - IL_005c: call instance void MCCTest.VType8::Add(valuetype MCCTest.VType8) - IL_0061: nop - IL_0062: ldarg.0 - IL_0063: ldflda valuetype MCCTest.VType8 MCCTest.VTypeE::f6 - IL_0068: ldarga.s val - IL_006a: ldfld valuetype MCCTest.VType8 MCCTest.VTypeE::f6 - IL_006f: call instance void MCCTest.VType8::Add(valuetype MCCTest.VType8) - IL_0074: nop - IL_0075: ldarg.0 - IL_0076: dup - IL_0077: ldfld float64 MCCTest.VTypeE::f7 - IL_007c: ldarga.s val - IL_007e: ldfld float64 MCCTest.VTypeE::f7 - IL_0083: add - IL_0084: stfld float64 MCCTest.VTypeE::f7 - IL_0089: ldarg.0 - IL_008a: ldflda valuetype MCCTest.VTypeA MCCTest.VTypeE::f8 - IL_008f: ldarga.s val - IL_0091: ldfld valuetype MCCTest.VTypeA MCCTest.VTypeE::f8 - IL_0096: call instance void MCCTest.VTypeA::Add(valuetype MCCTest.VTypeA) - IL_009b: nop - IL_009c: ldarg.0 - IL_009d: dup - IL_009e: ldfld int16 MCCTest.VTypeE::f9 - IL_00a3: ldarga.s val - IL_00a5: ldfld int16 MCCTest.VTypeE::f9 - IL_00aa: add - IL_00ab: conv.i2 - IL_00ac: stfld int16 MCCTest.VTypeE::f9 - IL_00b1: ldarg.0 - IL_00b2: ldflda valuetype MCCTest.VTypeD MCCTest.VTypeE::f10 - IL_00b7: ldarga.s val - IL_00b9: ldfld valuetype MCCTest.VTypeD MCCTest.VTypeE::f10 - IL_00be: call instance void MCCTest.VTypeD::Add(valuetype MCCTest.VTypeD) - IL_00c3: nop - IL_00c4: ldarg.0 - IL_00c5: ldflda valuetype MCCTest.VType8 MCCTest.VTypeE::f11 - IL_00ca: ldarga.s val - IL_00cc: ldfld valuetype MCCTest.VType8 MCCTest.VTypeE::f11 - IL_00d1: call instance void MCCTest.VType8::Add(valuetype MCCTest.VType8) - IL_00d6: nop - IL_00d7: ldarg.0 - IL_00d8: ldflda valuetype MCCTest.VTypeC MCCTest.VTypeE::f12 - IL_00dd: ldarga.s val - IL_00df: ldfld valuetype MCCTest.VTypeC MCCTest.VTypeE::f12 - IL_00e4: call instance void MCCTest.VTypeC::Add(valuetype MCCTest.VTypeC) - IL_00e9: nop - IL_00ea: ldarg.0 - IL_00eb: ldflda valuetype MCCTest.VTypeA MCCTest.VTypeE::f13 - IL_00f0: ldarga.s val - IL_00f2: ldfld valuetype MCCTest.VTypeA MCCTest.VTypeE::f13 - IL_00f7: call instance void MCCTest.VTypeA::Add(valuetype MCCTest.VTypeA) - IL_00fc: nop - IL_00fd: ldarg.0 - IL_00fe: dup - IL_00ff: ldfld float32 MCCTest.VTypeE::f14 - IL_0104: ldarga.s val - IL_0106: ldfld float32 MCCTest.VTypeE::f14 - IL_010b: add - IL_010c: stfld float32 MCCTest.VTypeE::f14 - IL_0111: ldarg.0 - IL_0112: dup - IL_0113: ldfld int32 MCCTest.VTypeE::f15 - IL_0118: ldarga.s val - IL_011a: ldfld int32 MCCTest.VTypeE::f15 - IL_011f: add - IL_0120: stfld int32 MCCTest.VTypeE::f15 - IL_0125: ldarg.0 - IL_0126: ldflda valuetype MCCTest.VTypeC MCCTest.VTypeE::f16 - IL_012b: ldarga.s val - IL_012d: ldfld valuetype MCCTest.VTypeC MCCTest.VTypeE::f16 - IL_0132: call instance void MCCTest.VTypeC::Add(valuetype MCCTest.VTypeC) - IL_0137: nop - IL_0138: ldarg.0 - IL_0139: ldflda valuetype MCCTest.VType7 MCCTest.VTypeE::f17 - IL_013e: ldarga.s val - IL_0140: ldfld valuetype MCCTest.VType7 MCCTest.VTypeE::f17 - IL_0145: call instance void MCCTest.VType7::Add(valuetype MCCTest.VType7) - IL_014a: nop - IL_014b: ldarg.0 - IL_014c: dup - IL_014d: ldfld float64 MCCTest.VTypeE::f18 - IL_0152: ldarga.s val - IL_0154: ldfld float64 MCCTest.VTypeE::f18 - IL_0159: add - IL_015a: stfld float64 MCCTest.VTypeE::f18 - IL_015f: ldarg.0 - IL_0160: dup - IL_0161: ldfld uint64 MCCTest.VTypeE::f19 - IL_0166: ldarga.s val - IL_0168: ldfld uint64 MCCTest.VTypeE::f19 - IL_016d: add - IL_016e: stfld uint64 MCCTest.VTypeE::f19 - IL_0173: ldarg.0 - IL_0174: ldflda valuetype MCCTest.VType8 MCCTest.VTypeE::f20 - IL_0179: ldarga.s val - IL_017b: ldfld valuetype MCCTest.VType8 MCCTest.VTypeE::f20 - IL_0180: call instance void MCCTest.VType8::Add(valuetype MCCTest.VType8) - IL_0185: nop - IL_0186: ldarg.0 - IL_0187: ldflda valuetype MCCTest.VType9 MCCTest.VTypeE::f21 - IL_018c: ldarga.s val - IL_018e: ldfld valuetype MCCTest.VType9 MCCTest.VTypeE::f21 - IL_0193: call instance void MCCTest.VType9::Add(valuetype MCCTest.VType9) - IL_0198: nop - IL_0199: ldarg.0 - IL_019a: ldflda valuetype MCCTest.VTypeC MCCTest.VTypeE::f22 - IL_019f: ldarga.s val - IL_01a1: ldfld valuetype MCCTest.VTypeC MCCTest.VTypeE::f22 - IL_01a6: call instance void MCCTest.VTypeC::Add(valuetype MCCTest.VTypeC) - IL_01ab: nop - IL_01ac: ldarg.0 - IL_01ad: ldflda valuetype MCCTest.VType8 MCCTest.VTypeE::f23 - IL_01b2: ldarga.s val - IL_01b4: ldfld valuetype MCCTest.VType8 MCCTest.VTypeE::f23 - IL_01b9: call instance void MCCTest.VType8::Add(valuetype MCCTest.VType8) - IL_01be: nop - IL_01bf: ret - } // end of method VTypeE::Add - - .method public hidebysig newslot virtual final - instance void Check(valuetype MCCTest.VTypeE expected) cil managed - { - // Code size 1009 (0x3f1) - .maxstack 4 - .locals init (string V_0, - class [mscorlib]System.Type V_1, - class MCCTest.ResultVerificationException V_2, - bool V_3) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldfld int16 MCCTest.VTypeE::f4 - IL_0007: ldarga.s expected - IL_0009: ldfld int16 MCCTest.VTypeE::f4 - IL_000e: ceq - IL_0010: stloc.3 - IL_0011: ldloc.3 - IL_0012: brtrue.s IL_002f - - IL_0014: nop - IL_0015: ldstr "f4" - IL_001a: ldarg.0 - IL_001b: ldfld int16 MCCTest.VTypeE::f4 - IL_0020: conv.i8 - IL_0021: ldarga.s expected - IL_0023: ldfld int16 MCCTest.VTypeE::f4 - IL_0028: conv.i8 - IL_0029: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_002e: throw - - IL_002f: ldarg.0 - IL_0030: ldfld float64 MCCTest.VTypeE::f7 - IL_0035: ldarga.s expected - IL_0037: ldfld float64 MCCTest.VTypeE::f7 - IL_003c: ceq - IL_003e: stloc.3 - IL_003f: ldloc.3 - IL_0040: brtrue.s IL_005b - - IL_0042: nop - IL_0043: ldstr "f7" - IL_0048: ldarg.0 - IL_0049: ldfld float64 MCCTest.VTypeE::f7 - IL_004e: ldarga.s expected - IL_0050: ldfld float64 MCCTest.VTypeE::f7 - IL_0055: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_005a: throw - - IL_005b: ldarg.0 - IL_005c: ldfld int16 MCCTest.VTypeE::f9 - IL_0061: ldarga.s expected - IL_0063: ldfld int16 MCCTest.VTypeE::f9 - IL_0068: ceq - IL_006a: stloc.3 - IL_006b: ldloc.3 - IL_006c: brtrue.s IL_0089 - - IL_006e: nop - IL_006f: ldstr "f9" - IL_0074: ldarg.0 - IL_0075: ldfld int16 MCCTest.VTypeE::f9 - IL_007a: conv.i8 - IL_007b: ldarga.s expected - IL_007d: ldfld int16 MCCTest.VTypeE::f9 - IL_0082: conv.i8 - IL_0083: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_0088: throw - - IL_0089: ldarg.0 - IL_008a: ldfld float32 MCCTest.VTypeE::f14 - IL_008f: ldarga.s expected - IL_0091: ldfld float32 MCCTest.VTypeE::f14 - IL_0096: ceq - IL_0098: stloc.3 - IL_0099: ldloc.3 - IL_009a: brtrue.s IL_00b7 - - IL_009c: nop - IL_009d: ldstr "f14" - IL_00a2: ldarg.0 - IL_00a3: ldfld float32 MCCTest.VTypeE::f14 - IL_00a8: conv.r8 - IL_00a9: ldarga.s expected - IL_00ab: ldfld float32 MCCTest.VTypeE::f14 - IL_00b0: conv.r8 - IL_00b1: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_00b6: throw - - IL_00b7: ldarg.0 - IL_00b8: ldfld int32 MCCTest.VTypeE::f15 - IL_00bd: ldarga.s expected - IL_00bf: ldfld int32 MCCTest.VTypeE::f15 - IL_00c4: ceq - IL_00c6: stloc.3 - IL_00c7: ldloc.3 - IL_00c8: brtrue.s IL_00e5 - - IL_00ca: nop - IL_00cb: ldstr "f15" - IL_00d0: ldarg.0 - IL_00d1: ldfld int32 MCCTest.VTypeE::f15 - IL_00d6: conv.i8 - IL_00d7: ldarga.s expected - IL_00d9: ldfld int32 MCCTest.VTypeE::f15 - IL_00de: conv.i8 - IL_00df: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_00e4: throw - - IL_00e5: ldarg.0 - IL_00e6: ldfld float64 MCCTest.VTypeE::f18 - IL_00eb: ldarga.s expected - IL_00ed: ldfld float64 MCCTest.VTypeE::f18 - IL_00f2: ceq - IL_00f4: stloc.3 - IL_00f5: ldloc.3 - IL_00f6: brtrue.s IL_0111 - - IL_00f8: nop - IL_00f9: ldstr "f18" - IL_00fe: ldarg.0 - IL_00ff: ldfld float64 MCCTest.VTypeE::f18 - IL_0104: ldarga.s expected - IL_0106: ldfld float64 MCCTest.VTypeE::f18 - IL_010b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0110: throw - - IL_0111: ldarg.0 - IL_0112: ldfld uint64 MCCTest.VTypeE::f19 - IL_0117: ldarga.s expected - IL_0119: ldfld uint64 MCCTest.VTypeE::f19 - IL_011e: ceq - IL_0120: stloc.3 - IL_0121: ldloc.3 - IL_0122: brtrue.s IL_0141 - - IL_0124: nop - IL_0125: ldstr "f19" - IL_012a: ldarg.0 - IL_012b: ldfld uint64 MCCTest.VTypeE::f19 - IL_0130: conv.r.un - IL_0131: conv.r8 - IL_0132: ldarga.s expected - IL_0134: ldfld uint64 MCCTest.VTypeE::f19 - IL_0139: conv.r.un - IL_013a: conv.r8 - IL_013b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0140: throw - - IL_0141: ldnull - IL_0142: stloc.0 - IL_0143: ldnull - IL_0144: stloc.1 - .try - { - IL_0145: nop - IL_0146: ldstr "f1" - IL_014b: stloc.0 - IL_014c: ldarg.0 - IL_014d: ldfld valuetype MCCTest.VType9 MCCTest.VTypeE::f1 - IL_0152: box MCCTest.VType9 - IL_0157: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_015c: stloc.1 - IL_015d: ldarg.0 - IL_015e: ldflda valuetype MCCTest.VType9 MCCTest.VTypeE::f1 - IL_0163: ldarga.s expected - IL_0165: ldfld valuetype MCCTest.VType9 MCCTest.VTypeE::f1 - IL_016a: call instance void MCCTest.VType9::Check(valuetype MCCTest.VType9) - IL_016f: nop - IL_0170: ldstr "f2" - IL_0175: stloc.0 - IL_0176: ldarg.0 - IL_0177: ldfld class MCCTest.RType4 MCCTest.VTypeE::f2 - IL_017c: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0181: stloc.1 - IL_0182: ldarg.0 - IL_0183: ldfld class MCCTest.RType4 MCCTest.VTypeE::f2 - IL_0188: ldarga.s expected - IL_018a: ldfld class MCCTest.RType4 MCCTest.VTypeE::f2 - IL_018f: callvirt instance void MCCTest.RType4::Check(class MCCTest.RType4) - IL_0194: nop - IL_0195: ldstr "f3" - IL_019a: stloc.0 - IL_019b: ldarg.0 - IL_019c: ldfld valuetype MCCTest.VType8 MCCTest.VTypeE::f3 - IL_01a1: box MCCTest.VType8 - IL_01a6: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_01ab: stloc.1 - IL_01ac: ldarg.0 - IL_01ad: ldflda valuetype MCCTest.VType8 MCCTest.VTypeE::f3 - IL_01b2: ldarga.s expected - IL_01b4: ldfld valuetype MCCTest.VType8 MCCTest.VTypeE::f3 - IL_01b9: call instance void MCCTest.VType8::Check(valuetype MCCTest.VType8) - IL_01be: nop - IL_01bf: ldstr "f5" - IL_01c4: stloc.0 - IL_01c5: ldarg.0 - IL_01c6: ldfld valuetype MCCTest.VType8 MCCTest.VTypeE::f5 - IL_01cb: box MCCTest.VType8 - IL_01d0: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_01d5: stloc.1 - IL_01d6: ldarg.0 - IL_01d7: ldflda valuetype MCCTest.VType8 MCCTest.VTypeE::f5 - IL_01dc: ldarga.s expected - IL_01de: ldfld valuetype MCCTest.VType8 MCCTest.VTypeE::f5 - IL_01e3: call instance void MCCTest.VType8::Check(valuetype MCCTest.VType8) - IL_01e8: nop - IL_01e9: ldstr "f6" - IL_01ee: stloc.0 - IL_01ef: ldarg.0 - IL_01f0: ldfld valuetype MCCTest.VType8 MCCTest.VTypeE::f6 - IL_01f5: box MCCTest.VType8 - IL_01fa: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_01ff: stloc.1 - IL_0200: ldarg.0 - IL_0201: ldflda valuetype MCCTest.VType8 MCCTest.VTypeE::f6 - IL_0206: ldarga.s expected - IL_0208: ldfld valuetype MCCTest.VType8 MCCTest.VTypeE::f6 - IL_020d: call instance void MCCTest.VType8::Check(valuetype MCCTest.VType8) - IL_0212: nop - IL_0213: ldstr "f8" - IL_0218: stloc.0 - IL_0219: ldarg.0 - IL_021a: ldfld valuetype MCCTest.VTypeA MCCTest.VTypeE::f8 - IL_021f: box MCCTest.VTypeA - IL_0224: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0229: stloc.1 - IL_022a: ldarg.0 - IL_022b: ldflda valuetype MCCTest.VTypeA MCCTest.VTypeE::f8 - IL_0230: ldarga.s expected - IL_0232: ldfld valuetype MCCTest.VTypeA MCCTest.VTypeE::f8 - IL_0237: call instance void MCCTest.VTypeA::Check(valuetype MCCTest.VTypeA) - IL_023c: nop - IL_023d: ldstr "f10" - IL_0242: stloc.0 - IL_0243: ldarg.0 - IL_0244: ldfld valuetype MCCTest.VTypeD MCCTest.VTypeE::f10 - IL_0249: box MCCTest.VTypeD - IL_024e: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0253: stloc.1 - IL_0254: ldarg.0 - IL_0255: ldflda valuetype MCCTest.VTypeD MCCTest.VTypeE::f10 - IL_025a: ldarga.s expected - IL_025c: ldfld valuetype MCCTest.VTypeD MCCTest.VTypeE::f10 - IL_0261: call instance void MCCTest.VTypeD::Check(valuetype MCCTest.VTypeD) - IL_0266: nop - IL_0267: ldstr "f11" - IL_026c: stloc.0 - IL_026d: ldarg.0 - IL_026e: ldfld valuetype MCCTest.VType8 MCCTest.VTypeE::f11 - IL_0273: box MCCTest.VType8 - IL_0278: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_027d: stloc.1 - IL_027e: ldarg.0 - IL_027f: ldflda valuetype MCCTest.VType8 MCCTest.VTypeE::f11 - IL_0284: ldarga.s expected - IL_0286: ldfld valuetype MCCTest.VType8 MCCTest.VTypeE::f11 - IL_028b: call instance void MCCTest.VType8::Check(valuetype MCCTest.VType8) - IL_0290: nop - IL_0291: ldstr "f12" - IL_0296: stloc.0 - IL_0297: ldarg.0 - IL_0298: ldfld valuetype MCCTest.VTypeC MCCTest.VTypeE::f12 - IL_029d: box MCCTest.VTypeC - IL_02a2: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_02a7: stloc.1 - IL_02a8: ldarg.0 - IL_02a9: ldflda valuetype MCCTest.VTypeC MCCTest.VTypeE::f12 - IL_02ae: ldarga.s expected - IL_02b0: ldfld valuetype MCCTest.VTypeC MCCTest.VTypeE::f12 - IL_02b5: call instance void MCCTest.VTypeC::Check(valuetype MCCTest.VTypeC) - IL_02ba: nop - IL_02bb: ldstr "f13" - IL_02c0: stloc.0 - IL_02c1: ldarg.0 - IL_02c2: ldfld valuetype MCCTest.VTypeA MCCTest.VTypeE::f13 - IL_02c7: box MCCTest.VTypeA - IL_02cc: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_02d1: stloc.1 - IL_02d2: ldarg.0 - IL_02d3: ldflda valuetype MCCTest.VTypeA MCCTest.VTypeE::f13 - IL_02d8: ldarga.s expected - IL_02da: ldfld valuetype MCCTest.VTypeA MCCTest.VTypeE::f13 - IL_02df: call instance void MCCTest.VTypeA::Check(valuetype MCCTest.VTypeA) - IL_02e4: nop - IL_02e5: ldstr "f16" - IL_02ea: stloc.0 - IL_02eb: ldarg.0 - IL_02ec: ldfld valuetype MCCTest.VTypeC MCCTest.VTypeE::f16 - IL_02f1: box MCCTest.VTypeC - IL_02f6: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_02fb: stloc.1 - IL_02fc: ldarg.0 - IL_02fd: ldflda valuetype MCCTest.VTypeC MCCTest.VTypeE::f16 - IL_0302: ldarga.s expected - IL_0304: ldfld valuetype MCCTest.VTypeC MCCTest.VTypeE::f16 - IL_0309: call instance void MCCTest.VTypeC::Check(valuetype MCCTest.VTypeC) - IL_030e: nop - IL_030f: ldstr "f17" - IL_0314: stloc.0 - IL_0315: ldarg.0 - IL_0316: ldfld valuetype MCCTest.VType7 MCCTest.VTypeE::f17 - IL_031b: box MCCTest.VType7 - IL_0320: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0325: stloc.1 - IL_0326: ldarg.0 - IL_0327: ldflda valuetype MCCTest.VType7 MCCTest.VTypeE::f17 - IL_032c: ldarga.s expected - IL_032e: ldfld valuetype MCCTest.VType7 MCCTest.VTypeE::f17 - IL_0333: call instance void MCCTest.VType7::Check(valuetype MCCTest.VType7) - IL_0338: nop - IL_0339: ldstr "f20" - IL_033e: stloc.0 - IL_033f: ldarg.0 - IL_0340: ldfld valuetype MCCTest.VType8 MCCTest.VTypeE::f20 - IL_0345: box MCCTest.VType8 - IL_034a: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_034f: stloc.1 - IL_0350: ldarg.0 - IL_0351: ldflda valuetype MCCTest.VType8 MCCTest.VTypeE::f20 - IL_0356: ldarga.s expected - IL_0358: ldfld valuetype MCCTest.VType8 MCCTest.VTypeE::f20 - IL_035d: call instance void MCCTest.VType8::Check(valuetype MCCTest.VType8) - IL_0362: nop - IL_0363: ldstr "f21" - IL_0368: stloc.0 - IL_0369: ldarg.0 - IL_036a: ldfld valuetype MCCTest.VType9 MCCTest.VTypeE::f21 - IL_036f: box MCCTest.VType9 - IL_0374: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0379: stloc.1 - IL_037a: ldarg.0 - IL_037b: ldflda valuetype MCCTest.VType9 MCCTest.VTypeE::f21 - IL_0380: ldarga.s expected - IL_0382: ldfld valuetype MCCTest.VType9 MCCTest.VTypeE::f21 - IL_0387: call instance void MCCTest.VType9::Check(valuetype MCCTest.VType9) - IL_038c: nop - IL_038d: ldstr "f22" - IL_0392: stloc.0 - IL_0393: ldarg.0 - IL_0394: ldfld valuetype MCCTest.VTypeC MCCTest.VTypeE::f22 - IL_0399: box MCCTest.VTypeC - IL_039e: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_03a3: stloc.1 - IL_03a4: ldarg.0 - IL_03a5: ldflda valuetype MCCTest.VTypeC MCCTest.VTypeE::f22 - IL_03aa: ldarga.s expected - IL_03ac: ldfld valuetype MCCTest.VTypeC MCCTest.VTypeE::f22 - IL_03b1: call instance void MCCTest.VTypeC::Check(valuetype MCCTest.VTypeC) - IL_03b6: nop - IL_03b7: ldstr "f23" - IL_03bc: stloc.0 - IL_03bd: ldarg.0 - IL_03be: ldfld valuetype MCCTest.VType8 MCCTest.VTypeE::f23 - IL_03c3: box MCCTest.VType8 - IL_03c8: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_03cd: stloc.1 - IL_03ce: ldarg.0 - IL_03cf: ldflda valuetype MCCTest.VType8 MCCTest.VTypeE::f23 - IL_03d4: ldarga.s expected - IL_03d6: ldfld valuetype MCCTest.VType8 MCCTest.VTypeE::f23 - IL_03db: call instance void MCCTest.VType8::Check(valuetype MCCTest.VType8) - IL_03e0: nop - IL_03e1: nop - IL_03e2: leave.s IL_03ef - - } // end .try - catch MCCTest.ResultVerificationException - { - IL_03e4: stloc.2 - IL_03e5: nop - IL_03e6: ldloc.0 - IL_03e7: ldloc.1 - IL_03e8: ldloc.2 - IL_03e9: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - class [mscorlib]System.Type, - class MCCTest.ResultVerificationException) - IL_03ee: throw - - } // end handler - IL_03ef: nop - IL_03f0: ret - } // end of method VTypeE::Check - - .method public hidebysig instance string - Dump(int32 level) cil managed - { - // Code size 1183 (0x49f) - .maxstack 4 - .locals init (string V_0, - class [mscorlib]System.IO.StringWriter V_1, - string V_2) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: call string MCCTest.FormatUtils::GetPadding(int32) - IL_0007: stloc.0 - IL_0008: newobj instance void [mscorlib]System.IO.StringWriter::.ctor() - IL_000d: stloc.1 - IL_000e: ldloc.1 - IL_000f: ldloc.0 - IL_0010: ldstr "[Field f1] [Type '{0}']" - IL_0015: call string [mscorlib]System.String::Concat(string, - string) - IL_001a: ldarg.0 - IL_001b: ldfld valuetype MCCTest.VType9 MCCTest.VTypeE::f1 - IL_0020: box MCCTest.VType9 - IL_0025: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_002a: callvirt instance string [mscorlib]System.Object::ToString() - IL_002f: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0034: nop - IL_0035: ldloc.1 - IL_0036: ldarg.0 - IL_0037: ldflda valuetype MCCTest.VType9 MCCTest.VTypeE::f1 - IL_003c: ldarg.1 - IL_003d: ldc.i4.1 - IL_003e: add - IL_003f: call instance string MCCTest.VType9::Dump(int32) - IL_0044: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0049: nop - IL_004a: ldloc.1 - IL_004b: ldloc.0 - IL_004c: ldstr "[Field f2] [Type '{0}']" - IL_0051: call string [mscorlib]System.String::Concat(string, - string) - IL_0056: ldarg.0 - IL_0057: ldfld class MCCTest.RType4 MCCTest.VTypeE::f2 - IL_005c: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0061: callvirt instance string [mscorlib]System.Object::ToString() - IL_0066: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_006b: nop - IL_006c: ldloc.1 - IL_006d: ldarg.0 - IL_006e: ldfld class MCCTest.RType4 MCCTest.VTypeE::f2 - IL_0073: ldarg.1 - IL_0074: ldc.i4.1 - IL_0075: add - IL_0076: callvirt instance string MCCTest.RType4::Dump(int32) - IL_007b: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0080: nop - IL_0081: ldloc.1 - IL_0082: ldloc.0 - IL_0083: ldstr "[Field f3] [Type '{0}']" - IL_0088: call string [mscorlib]System.String::Concat(string, - string) - IL_008d: ldarg.0 - IL_008e: ldfld valuetype MCCTest.VType8 MCCTest.VTypeE::f3 - IL_0093: box MCCTest.VType8 - IL_0098: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_009d: callvirt instance string [mscorlib]System.Object::ToString() - IL_00a2: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_00a7: nop - IL_00a8: ldloc.1 - IL_00a9: ldarg.0 - IL_00aa: ldflda valuetype MCCTest.VType8 MCCTest.VTypeE::f3 - IL_00af: ldarg.1 - IL_00b0: ldc.i4.1 - IL_00b1: add - IL_00b2: call instance string MCCTest.VType8::Dump(int32) - IL_00b7: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_00bc: nop - IL_00bd: ldloc.1 - IL_00be: ldloc.0 - IL_00bf: ldstr "f4 = " - IL_00c4: ldarg.0 - IL_00c5: ldfld int16 MCCTest.VTypeE::f4 - IL_00ca: box [mscorlib]System.Int16 - IL_00cf: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_00d4: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_00d9: nop - IL_00da: ldloc.1 - IL_00db: ldloc.0 - IL_00dc: ldstr "[Field f5] [Type '{0}']" - IL_00e1: call string [mscorlib]System.String::Concat(string, - string) - IL_00e6: ldarg.0 - IL_00e7: ldfld valuetype MCCTest.VType8 MCCTest.VTypeE::f5 - IL_00ec: box MCCTest.VType8 - IL_00f1: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_00f6: callvirt instance string [mscorlib]System.Object::ToString() - IL_00fb: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0100: nop - IL_0101: ldloc.1 - IL_0102: ldarg.0 - IL_0103: ldflda valuetype MCCTest.VType8 MCCTest.VTypeE::f5 - IL_0108: ldarg.1 - IL_0109: ldc.i4.1 - IL_010a: add - IL_010b: call instance string MCCTest.VType8::Dump(int32) - IL_0110: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0115: nop - IL_0116: ldloc.1 - IL_0117: ldloc.0 - IL_0118: ldstr "[Field f6] [Type '{0}']" - IL_011d: call string [mscorlib]System.String::Concat(string, - string) - IL_0122: ldarg.0 - IL_0123: ldfld valuetype MCCTest.VType8 MCCTest.VTypeE::f6 - IL_0128: box MCCTest.VType8 - IL_012d: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0132: callvirt instance string [mscorlib]System.Object::ToString() - IL_0137: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_013c: nop - IL_013d: ldloc.1 - IL_013e: ldarg.0 - IL_013f: ldflda valuetype MCCTest.VType8 MCCTest.VTypeE::f6 - IL_0144: ldarg.1 - IL_0145: ldc.i4.1 - IL_0146: add - IL_0147: call instance string MCCTest.VType8::Dump(int32) - IL_014c: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0151: nop - IL_0152: ldloc.1 - IL_0153: ldloc.0 - IL_0154: ldstr "f7 = " - IL_0159: ldarg.0 - IL_015a: ldfld float64 MCCTest.VTypeE::f7 - IL_015f: box [mscorlib]System.Double - IL_0164: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0169: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_016e: nop - IL_016f: ldloc.1 - IL_0170: ldloc.0 - IL_0171: ldstr "[Field f8] [Type '{0}']" - IL_0176: call string [mscorlib]System.String::Concat(string, - string) - IL_017b: ldarg.0 - IL_017c: ldfld valuetype MCCTest.VTypeA MCCTest.VTypeE::f8 - IL_0181: box MCCTest.VTypeA - IL_0186: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_018b: callvirt instance string [mscorlib]System.Object::ToString() - IL_0190: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0195: nop - IL_0196: ldloc.1 - IL_0197: ldarg.0 - IL_0198: ldflda valuetype MCCTest.VTypeA MCCTest.VTypeE::f8 - IL_019d: ldarg.1 - IL_019e: ldc.i4.1 - IL_019f: add - IL_01a0: call instance string MCCTest.VTypeA::Dump(int32) - IL_01a5: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_01aa: nop - IL_01ab: ldloc.1 - IL_01ac: ldloc.0 - IL_01ad: ldstr "f9 = " - IL_01b2: ldarg.0 - IL_01b3: ldfld int16 MCCTest.VTypeE::f9 - IL_01b8: box [mscorlib]System.Int16 - IL_01bd: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_01c2: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_01c7: nop - IL_01c8: ldloc.1 - IL_01c9: ldloc.0 - IL_01ca: ldstr "[Field f10] [Type '{0}']" - IL_01cf: call string [mscorlib]System.String::Concat(string, - string) - IL_01d4: ldarg.0 - IL_01d5: ldfld valuetype MCCTest.VTypeD MCCTest.VTypeE::f10 - IL_01da: box MCCTest.VTypeD - IL_01df: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_01e4: callvirt instance string [mscorlib]System.Object::ToString() - IL_01e9: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_01ee: nop - IL_01ef: ldloc.1 - IL_01f0: ldarg.0 - IL_01f1: ldflda valuetype MCCTest.VTypeD MCCTest.VTypeE::f10 - IL_01f6: ldarg.1 - IL_01f7: ldc.i4.1 - IL_01f8: add - IL_01f9: call instance string MCCTest.VTypeD::Dump(int32) - IL_01fe: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0203: nop - IL_0204: ldloc.1 - IL_0205: ldloc.0 - IL_0206: ldstr "[Field f11] [Type '{0}']" - IL_020b: call string [mscorlib]System.String::Concat(string, - string) - IL_0210: ldarg.0 - IL_0211: ldfld valuetype MCCTest.VType8 MCCTest.VTypeE::f11 - IL_0216: box MCCTest.VType8 - IL_021b: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0220: callvirt instance string [mscorlib]System.Object::ToString() - IL_0225: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_022a: nop - IL_022b: ldloc.1 - IL_022c: ldarg.0 - IL_022d: ldflda valuetype MCCTest.VType8 MCCTest.VTypeE::f11 - IL_0232: ldarg.1 - IL_0233: ldc.i4.1 - IL_0234: add - IL_0235: call instance string MCCTest.VType8::Dump(int32) - IL_023a: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_023f: nop - IL_0240: ldloc.1 - IL_0241: ldloc.0 - IL_0242: ldstr "[Field f12] [Type '{0}']" - IL_0247: call string [mscorlib]System.String::Concat(string, - string) - IL_024c: ldarg.0 - IL_024d: ldfld valuetype MCCTest.VTypeC MCCTest.VTypeE::f12 - IL_0252: box MCCTest.VTypeC - IL_0257: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_025c: callvirt instance string [mscorlib]System.Object::ToString() - IL_0261: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0266: nop - IL_0267: ldloc.1 - IL_0268: ldarg.0 - IL_0269: ldflda valuetype MCCTest.VTypeC MCCTest.VTypeE::f12 - IL_026e: ldarg.1 - IL_026f: ldc.i4.1 - IL_0270: add - IL_0271: call instance string MCCTest.VTypeC::Dump(int32) - IL_0276: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_027b: nop - IL_027c: ldloc.1 - IL_027d: ldloc.0 - IL_027e: ldstr "[Field f13] [Type '{0}']" - IL_0283: call string [mscorlib]System.String::Concat(string, - string) - IL_0288: ldarg.0 - IL_0289: ldfld valuetype MCCTest.VTypeA MCCTest.VTypeE::f13 - IL_028e: box MCCTest.VTypeA - IL_0293: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0298: callvirt instance string [mscorlib]System.Object::ToString() - IL_029d: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_02a2: nop - IL_02a3: ldloc.1 - IL_02a4: ldarg.0 - IL_02a5: ldflda valuetype MCCTest.VTypeA MCCTest.VTypeE::f13 - IL_02aa: ldarg.1 - IL_02ab: ldc.i4.1 - IL_02ac: add - IL_02ad: call instance string MCCTest.VTypeA::Dump(int32) - IL_02b2: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_02b7: nop - IL_02b8: ldloc.1 - IL_02b9: ldloc.0 - IL_02ba: ldstr "f14 = " - IL_02bf: ldarg.0 - IL_02c0: ldfld float32 MCCTest.VTypeE::f14 - IL_02c5: box [mscorlib]System.Single - IL_02ca: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_02cf: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_02d4: nop - IL_02d5: ldloc.1 - IL_02d6: ldloc.0 - IL_02d7: ldstr "f15 = " - IL_02dc: ldarg.0 - IL_02dd: ldfld int32 MCCTest.VTypeE::f15 - IL_02e2: box [mscorlib]System.Int32 - IL_02e7: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_02ec: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_02f1: nop - IL_02f2: ldloc.1 - IL_02f3: ldloc.0 - IL_02f4: ldstr "[Field f16] [Type '{0}']" - IL_02f9: call string [mscorlib]System.String::Concat(string, - string) - IL_02fe: ldarg.0 - IL_02ff: ldfld valuetype MCCTest.VTypeC MCCTest.VTypeE::f16 - IL_0304: box MCCTest.VTypeC - IL_0309: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_030e: callvirt instance string [mscorlib]System.Object::ToString() - IL_0313: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0318: nop - IL_0319: ldloc.1 - IL_031a: ldarg.0 - IL_031b: ldflda valuetype MCCTest.VTypeC MCCTest.VTypeE::f16 - IL_0320: ldarg.1 - IL_0321: ldc.i4.1 - IL_0322: add - IL_0323: call instance string MCCTest.VTypeC::Dump(int32) - IL_0328: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_032d: nop - IL_032e: ldloc.1 - IL_032f: ldloc.0 - IL_0330: ldstr "[Field f17] [Type '{0}']" - IL_0335: call string [mscorlib]System.String::Concat(string, - string) - IL_033a: ldarg.0 - IL_033b: ldfld valuetype MCCTest.VType7 MCCTest.VTypeE::f17 - IL_0340: box MCCTest.VType7 - IL_0345: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_034a: callvirt instance string [mscorlib]System.Object::ToString() - IL_034f: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0354: nop - IL_0355: ldloc.1 - IL_0356: ldarg.0 - IL_0357: ldflda valuetype MCCTest.VType7 MCCTest.VTypeE::f17 - IL_035c: ldarg.1 - IL_035d: ldc.i4.1 - IL_035e: add - IL_035f: call instance string MCCTest.VType7::Dump(int32) - IL_0364: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0369: nop - IL_036a: ldloc.1 - IL_036b: ldloc.0 - IL_036c: ldstr "f18 = " - IL_0371: ldarg.0 - IL_0372: ldfld float64 MCCTest.VTypeE::f18 - IL_0377: box [mscorlib]System.Double - IL_037c: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0381: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0386: nop - IL_0387: ldloc.1 - IL_0388: ldloc.0 - IL_0389: ldstr "f19 = " - IL_038e: ldarg.0 - IL_038f: ldfld uint64 MCCTest.VTypeE::f19 - IL_0394: box [mscorlib]System.UInt64 - IL_0399: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_039e: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_03a3: nop - IL_03a4: ldloc.1 - IL_03a5: ldloc.0 - IL_03a6: ldstr "[Field f20] [Type '{0}']" - IL_03ab: call string [mscorlib]System.String::Concat(string, - string) - IL_03b0: ldarg.0 - IL_03b1: ldfld valuetype MCCTest.VType8 MCCTest.VTypeE::f20 - IL_03b6: box MCCTest.VType8 - IL_03bb: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_03c0: callvirt instance string [mscorlib]System.Object::ToString() - IL_03c5: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_03ca: nop - IL_03cb: ldloc.1 - IL_03cc: ldarg.0 - IL_03cd: ldflda valuetype MCCTest.VType8 MCCTest.VTypeE::f20 - IL_03d2: ldarg.1 - IL_03d3: ldc.i4.1 - IL_03d4: add - IL_03d5: call instance string MCCTest.VType8::Dump(int32) - IL_03da: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_03df: nop - IL_03e0: ldloc.1 - IL_03e1: ldloc.0 - IL_03e2: ldstr "[Field f21] [Type '{0}']" - IL_03e7: call string [mscorlib]System.String::Concat(string, - string) - IL_03ec: ldarg.0 - IL_03ed: ldfld valuetype MCCTest.VType9 MCCTest.VTypeE::f21 - IL_03f2: box MCCTest.VType9 - IL_03f7: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_03fc: callvirt instance string [mscorlib]System.Object::ToString() - IL_0401: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0406: nop - IL_0407: ldloc.1 - IL_0408: ldarg.0 - IL_0409: ldflda valuetype MCCTest.VType9 MCCTest.VTypeE::f21 - IL_040e: ldarg.1 - IL_040f: ldc.i4.1 - IL_0410: add - IL_0411: call instance string MCCTest.VType9::Dump(int32) - IL_0416: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_041b: nop - IL_041c: ldloc.1 - IL_041d: ldloc.0 - IL_041e: ldstr "[Field f22] [Type '{0}']" - IL_0423: call string [mscorlib]System.String::Concat(string, - string) - IL_0428: ldarg.0 - IL_0429: ldfld valuetype MCCTest.VTypeC MCCTest.VTypeE::f22 - IL_042e: box MCCTest.VTypeC - IL_0433: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0438: callvirt instance string [mscorlib]System.Object::ToString() - IL_043d: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0442: nop - IL_0443: ldloc.1 - IL_0444: ldarg.0 - IL_0445: ldflda valuetype MCCTest.VTypeC MCCTest.VTypeE::f22 - IL_044a: ldarg.1 - IL_044b: ldc.i4.1 - IL_044c: add - IL_044d: call instance string MCCTest.VTypeC::Dump(int32) - IL_0452: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0457: nop - IL_0458: ldloc.1 - IL_0459: ldloc.0 - IL_045a: ldstr "[Field f23] [Type '{0}']" - IL_045f: call string [mscorlib]System.String::Concat(string, - string) - IL_0464: ldarg.0 - IL_0465: ldfld valuetype MCCTest.VType8 MCCTest.VTypeE::f23 - IL_046a: box MCCTest.VType8 - IL_046f: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0474: callvirt instance string [mscorlib]System.Object::ToString() - IL_0479: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_047e: nop - IL_047f: ldloc.1 - IL_0480: ldarg.0 - IL_0481: ldflda valuetype MCCTest.VType8 MCCTest.VTypeE::f23 - IL_0486: ldarg.1 - IL_0487: ldc.i4.1 - IL_0488: add - IL_0489: call instance string MCCTest.VType8::Dump(int32) - IL_048e: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0493: nop - IL_0494: ldloc.1 - IL_0495: callvirt instance string [mscorlib]System.Object::ToString() - IL_049a: stloc.2 - IL_049b: br.s IL_049d - - IL_049d: ldloc.2 - IL_049e: ret - } // end of method VTypeE::Dump - - .method public hidebysig instance string - Dump() cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.0 - IL_0003: call instance string MCCTest.VTypeE::Dump(int32) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method VTypeE::Dump - -} // end of class MCCTest.VTypeE - -.class public sequential ansi sealed beforefieldinit MCCTest.VTypeF - extends [mscorlib]System.ValueType - implements class MCCTest.CType`1 -{ - .field public char f1 - .field public float64 f2 - .field public float32 f3 - .field public valuetype MCCTest.VType9 f4 - .field public class MCCTest.RType4 f5 - .field public char f6 - .field public float32 f7 - .field public valuetype MCCTest.VTypeE f8 - .field public valuetype MCCTest.VType8 f9 - .field public valuetype MCCTest.VTypeE f10 - .field public valuetype MCCTest.VType3 f11 - .field public int64 f12 - .field public uint16 f13 - .field public valuetype MCCTest.VType5 f14 - .field public valuetype MCCTest.VType9 f15 - .field public class MCCTest.RType4 f16 - .field public class MCCTest.RType4 f17 - .field public int32 f18 - .field public valuetype MCCTest.VType8 f19 - .field public class MCCTest.RType4 f20 - .field public valuetype MCCTest.VTypeA f21 - .field public valuetype MCCTest.VTypeD f22 - .field public valuetype MCCTest.VType9 f23 - .field public valuetype MCCTest.VTypeE f24 - .field public class MCCTest.RType4 f25 - .field public float32 f26 - .field public uint8 f27 - .field public float64 f28 - .field public valuetype MCCTest.VTypeC f29 - .field public valuetype MCCTest.VType6 f30 - .field public float64 f31 - .field public valuetype MCCTest.VType8 f32 - .field public int8 f33 - .field public valuetype MCCTest.VTypeD f34 - .field public valuetype MCCTest.VTypeE f35 - .field public valuetype MCCTest.VTypeE f36 - .field public valuetype MCCTest.VType7 f37 - .field public valuetype MCCTest.VType9 f38 - .field public valuetype MCCTest.VType8 f39 - .field public float32 f40 - .field public int32 f41 - .field public char f42 - .field public valuetype MCCTest.VTypeB f43 - .field public valuetype MCCTest.VType8 f44 - .method public hidebysig newslot virtual final - instance void Init(int32 count) cil managed - { - // Code size 547 (0x223) - .maxstack 2 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: newobj instance void MCCTest.RType4::.ctor() - IL_0007: stfld class MCCTest.RType4 MCCTest.VTypeF::f5 - IL_000c: ldarg.0 - IL_000d: newobj instance void MCCTest.RType4::.ctor() - IL_0012: stfld class MCCTest.RType4 MCCTest.VTypeF::f16 - IL_0017: ldarg.0 - IL_0018: newobj instance void MCCTest.RType4::.ctor() - IL_001d: stfld class MCCTest.RType4 MCCTest.VTypeF::f17 - IL_0022: ldarg.0 - IL_0023: newobj instance void MCCTest.RType4::.ctor() - IL_0028: stfld class MCCTest.RType4 MCCTest.VTypeF::f20 - IL_002d: ldarg.0 - IL_002e: newobj instance void MCCTest.RType4::.ctor() - IL_0033: stfld class MCCTest.RType4 MCCTest.VTypeF::f25 - IL_0038: ldarg.0 - IL_0039: ldarg.1 - IL_003a: conv.u2 - IL_003b: stfld char MCCTest.VTypeF::f1 - IL_0040: ldarg.0 - IL_0041: ldarg.1 - IL_0042: conv.r8 - IL_0043: stfld float64 MCCTest.VTypeF::f2 - IL_0048: ldarg.0 - IL_0049: ldarg.1 - IL_004a: conv.r4 - IL_004b: stfld float32 MCCTest.VTypeF::f3 - IL_0050: ldarg.0 - IL_0051: ldflda valuetype MCCTest.VType9 MCCTest.VTypeF::f4 - IL_0056: ldarg.1 - IL_0057: call instance void MCCTest.VType9::Init(int32) - IL_005c: nop - IL_005d: ldarg.0 - IL_005e: ldfld class MCCTest.RType4 MCCTest.VTypeF::f5 - IL_0063: ldarg.1 - IL_0064: callvirt instance void MCCTest.RType4::Init(int32) - IL_0069: nop - IL_006a: ldarg.0 - IL_006b: ldarg.1 - IL_006c: conv.u2 - IL_006d: stfld char MCCTest.VTypeF::f6 - IL_0072: ldarg.0 - IL_0073: ldarg.1 - IL_0074: conv.r4 - IL_0075: stfld float32 MCCTest.VTypeF::f7 - IL_007a: ldarg.0 - IL_007b: ldflda valuetype MCCTest.VTypeE MCCTest.VTypeF::f8 - IL_0080: ldarg.1 - IL_0081: call instance void MCCTest.VTypeE::Init(int32) - IL_0086: nop - IL_0087: ldarg.0 - IL_0088: ldflda valuetype MCCTest.VType8 MCCTest.VTypeF::f9 - IL_008d: ldarg.1 - IL_008e: call instance void MCCTest.VType8::Init(int32) - IL_0093: nop - IL_0094: ldarg.0 - IL_0095: ldflda valuetype MCCTest.VTypeE MCCTest.VTypeF::f10 - IL_009a: ldarg.1 - IL_009b: call instance void MCCTest.VTypeE::Init(int32) - IL_00a0: nop - IL_00a1: ldarg.0 - IL_00a2: ldflda valuetype MCCTest.VType3 MCCTest.VTypeF::f11 - IL_00a7: ldarg.1 - IL_00a8: call instance void MCCTest.VType3::Init(int32) - IL_00ad: nop - IL_00ae: ldarg.0 - IL_00af: ldarg.1 - IL_00b0: conv.i8 - IL_00b1: stfld int64 MCCTest.VTypeF::f12 - IL_00b6: ldarg.0 - IL_00b7: ldarg.1 - IL_00b8: conv.u2 - IL_00b9: stfld uint16 MCCTest.VTypeF::f13 - IL_00be: ldarg.0 - IL_00bf: ldflda valuetype MCCTest.VType5 MCCTest.VTypeF::f14 - IL_00c4: ldarg.1 - IL_00c5: call instance void MCCTest.VType5::Init(int32) - IL_00ca: nop - IL_00cb: ldarg.0 - IL_00cc: ldflda valuetype MCCTest.VType9 MCCTest.VTypeF::f15 - IL_00d1: ldarg.1 - IL_00d2: call instance void MCCTest.VType9::Init(int32) - IL_00d7: nop - IL_00d8: ldarg.0 - IL_00d9: ldfld class MCCTest.RType4 MCCTest.VTypeF::f16 - IL_00de: ldarg.1 - IL_00df: callvirt instance void MCCTest.RType4::Init(int32) - IL_00e4: nop - IL_00e5: ldarg.0 - IL_00e6: ldfld class MCCTest.RType4 MCCTest.VTypeF::f17 - IL_00eb: ldarg.1 - IL_00ec: callvirt instance void MCCTest.RType4::Init(int32) - IL_00f1: nop - IL_00f2: ldarg.0 - IL_00f3: ldarg.1 - IL_00f4: stfld int32 MCCTest.VTypeF::f18 - IL_00f9: ldarg.0 - IL_00fa: ldflda valuetype MCCTest.VType8 MCCTest.VTypeF::f19 - IL_00ff: ldarg.1 - IL_0100: call instance void MCCTest.VType8::Init(int32) - IL_0105: nop - IL_0106: ldarg.0 - IL_0107: ldfld class MCCTest.RType4 MCCTest.VTypeF::f20 - IL_010c: ldarg.1 - IL_010d: callvirt instance void MCCTest.RType4::Init(int32) - IL_0112: nop - IL_0113: ldarg.0 - IL_0114: ldflda valuetype MCCTest.VTypeA MCCTest.VTypeF::f21 - IL_0119: ldarg.1 - IL_011a: call instance void MCCTest.VTypeA::Init(int32) - IL_011f: nop - IL_0120: ldarg.0 - IL_0121: ldflda valuetype MCCTest.VTypeD MCCTest.VTypeF::f22 - IL_0126: ldarg.1 - IL_0127: call instance void MCCTest.VTypeD::Init(int32) - IL_012c: nop - IL_012d: ldarg.0 - IL_012e: ldflda valuetype MCCTest.VType9 MCCTest.VTypeF::f23 - IL_0133: ldarg.1 - IL_0134: call instance void MCCTest.VType9::Init(int32) - IL_0139: nop - IL_013a: ldarg.0 - IL_013b: ldflda valuetype MCCTest.VTypeE MCCTest.VTypeF::f24 - IL_0140: ldarg.1 - IL_0141: call instance void MCCTest.VTypeE::Init(int32) - IL_0146: nop - IL_0147: ldarg.0 - IL_0148: ldfld class MCCTest.RType4 MCCTest.VTypeF::f25 - IL_014d: ldarg.1 - IL_014e: callvirt instance void MCCTest.RType4::Init(int32) - IL_0153: nop - IL_0154: ldarg.0 - IL_0155: ldarg.1 - IL_0156: conv.r4 - IL_0157: stfld float32 MCCTest.VTypeF::f26 - IL_015c: ldarg.0 - IL_015d: ldarg.1 - IL_015e: conv.u1 - IL_015f: stfld uint8 MCCTest.VTypeF::f27 - IL_0164: ldarg.0 - IL_0165: ldarg.1 - IL_0166: conv.r8 - IL_0167: stfld float64 MCCTest.VTypeF::f28 - IL_016c: ldarg.0 - IL_016d: ldflda valuetype MCCTest.VTypeC MCCTest.VTypeF::f29 - IL_0172: ldarg.1 - IL_0173: call instance void MCCTest.VTypeC::Init(int32) - IL_0178: nop - IL_0179: ldarg.0 - IL_017a: ldflda valuetype MCCTest.VType6 MCCTest.VTypeF::f30 - IL_017f: ldarg.1 - IL_0180: call instance void MCCTest.VType6::Init(int32) - IL_0185: nop - IL_0186: ldarg.0 - IL_0187: ldarg.1 - IL_0188: conv.r8 - IL_0189: stfld float64 MCCTest.VTypeF::f31 - IL_018e: ldarg.0 - IL_018f: ldflda valuetype MCCTest.VType8 MCCTest.VTypeF::f32 - IL_0194: ldarg.1 - IL_0195: call instance void MCCTest.VType8::Init(int32) - IL_019a: nop - IL_019b: ldarg.0 - IL_019c: ldarg.1 - IL_019d: conv.i1 - IL_019e: stfld int8 MCCTest.VTypeF::f33 - IL_01a3: ldarg.0 - IL_01a4: ldflda valuetype MCCTest.VTypeD MCCTest.VTypeF::f34 - IL_01a9: ldarg.1 - IL_01aa: call instance void MCCTest.VTypeD::Init(int32) - IL_01af: nop - IL_01b0: ldarg.0 - IL_01b1: ldflda valuetype MCCTest.VTypeE MCCTest.VTypeF::f35 - IL_01b6: ldarg.1 - IL_01b7: call instance void MCCTest.VTypeE::Init(int32) - IL_01bc: nop - IL_01bd: ldarg.0 - IL_01be: ldflda valuetype MCCTest.VTypeE MCCTest.VTypeF::f36 - IL_01c3: ldarg.1 - IL_01c4: call instance void MCCTest.VTypeE::Init(int32) - IL_01c9: nop - IL_01ca: ldarg.0 - IL_01cb: ldflda valuetype MCCTest.VType7 MCCTest.VTypeF::f37 - IL_01d0: ldarg.1 - IL_01d1: call instance void MCCTest.VType7::Init(int32) - IL_01d6: nop - IL_01d7: ldarg.0 - IL_01d8: ldflda valuetype MCCTest.VType9 MCCTest.VTypeF::f38 - IL_01dd: ldarg.1 - IL_01de: call instance void MCCTest.VType9::Init(int32) - IL_01e3: nop - IL_01e4: ldarg.0 - IL_01e5: ldflda valuetype MCCTest.VType8 MCCTest.VTypeF::f39 - IL_01ea: ldarg.1 - IL_01eb: call instance void MCCTest.VType8::Init(int32) - IL_01f0: nop - IL_01f1: ldarg.0 - IL_01f2: ldarg.1 - IL_01f3: conv.r4 - IL_01f4: stfld float32 MCCTest.VTypeF::f40 - IL_01f9: ldarg.0 - IL_01fa: ldarg.1 - IL_01fb: stfld int32 MCCTest.VTypeF::f41 - IL_0200: ldarg.0 - IL_0201: ldarg.1 - IL_0202: conv.u2 - IL_0203: stfld char MCCTest.VTypeF::f42 - IL_0208: ldarg.0 - IL_0209: ldflda valuetype MCCTest.VTypeB MCCTest.VTypeF::f43 - IL_020e: ldarg.1 - IL_020f: call instance void MCCTest.VTypeB::Init(int32) - IL_0214: nop - IL_0215: ldarg.0 - IL_0216: ldflda valuetype MCCTest.VType8 MCCTest.VTypeF::f44 - IL_021b: ldarg.1 - IL_021c: call instance void MCCTest.VType8::Init(int32) - IL_0221: nop - IL_0222: ret - } // end of method VTypeF::Init - - .method public hidebysig newslot virtual final - instance void Init() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.1 - IL_0003: call instance void MCCTest.VTypeF::Init(int32) - IL_0008: nop - IL_0009: ret - } // end of method VTypeF::Init - - .method public hidebysig newslot virtual final - instance void Zero() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.0 - IL_0003: call instance void MCCTest.VTypeF::Init(int32) - IL_0008: nop - IL_0009: ret - } // end of method VTypeF::Zero - - .method public hidebysig instance void - Add(valuetype MCCTest.VTypeF val) cil managed - { - // Code size 860 (0x35c) - .maxstack 3 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: dup - IL_0003: ldfld char MCCTest.VTypeF::f1 - IL_0008: ldarga.s val - IL_000a: ldfld char MCCTest.VTypeF::f1 - IL_000f: add - IL_0010: conv.u2 - IL_0011: stfld char MCCTest.VTypeF::f1 - IL_0016: ldarg.0 - IL_0017: dup - IL_0018: ldfld float64 MCCTest.VTypeF::f2 - IL_001d: ldarga.s val - IL_001f: ldfld float64 MCCTest.VTypeF::f2 - IL_0024: add - IL_0025: stfld float64 MCCTest.VTypeF::f2 - IL_002a: ldarg.0 - IL_002b: dup - IL_002c: ldfld float32 MCCTest.VTypeF::f3 - IL_0031: ldarga.s val - IL_0033: ldfld float32 MCCTest.VTypeF::f3 - IL_0038: add - IL_0039: stfld float32 MCCTest.VTypeF::f3 - IL_003e: ldarg.0 - IL_003f: ldflda valuetype MCCTest.VType9 MCCTest.VTypeF::f4 - IL_0044: ldarga.s val - IL_0046: ldfld valuetype MCCTest.VType9 MCCTest.VTypeF::f4 - IL_004b: call instance void MCCTest.VType9::Add(valuetype MCCTest.VType9) - IL_0050: nop - IL_0051: ldarg.0 - IL_0052: ldfld class MCCTest.RType4 MCCTest.VTypeF::f5 - IL_0057: ldarga.s val - IL_0059: ldfld class MCCTest.RType4 MCCTest.VTypeF::f5 - IL_005e: callvirt instance void MCCTest.RType4::Add(class MCCTest.RType4) - IL_0063: nop - IL_0064: ldarg.0 - IL_0065: dup - IL_0066: ldfld char MCCTest.VTypeF::f6 - IL_006b: ldarga.s val - IL_006d: ldfld char MCCTest.VTypeF::f6 - IL_0072: add - IL_0073: conv.u2 - IL_0074: stfld char MCCTest.VTypeF::f6 - IL_0079: ldarg.0 - IL_007a: dup - IL_007b: ldfld float32 MCCTest.VTypeF::f7 - IL_0080: ldarga.s val - IL_0082: ldfld float32 MCCTest.VTypeF::f7 - IL_0087: add - IL_0088: stfld float32 MCCTest.VTypeF::f7 - IL_008d: ldarg.0 - IL_008e: ldflda valuetype MCCTest.VTypeE MCCTest.VTypeF::f8 - IL_0093: ldarga.s val - IL_0095: ldfld valuetype MCCTest.VTypeE MCCTest.VTypeF::f8 - IL_009a: call instance void MCCTest.VTypeE::Add(valuetype MCCTest.VTypeE) - IL_009f: nop - IL_00a0: ldarg.0 - IL_00a1: ldflda valuetype MCCTest.VType8 MCCTest.VTypeF::f9 - IL_00a6: ldarga.s val - IL_00a8: ldfld valuetype MCCTest.VType8 MCCTest.VTypeF::f9 - IL_00ad: call instance void MCCTest.VType8::Add(valuetype MCCTest.VType8) - IL_00b2: nop - IL_00b3: ldarg.0 - IL_00b4: ldflda valuetype MCCTest.VTypeE MCCTest.VTypeF::f10 - IL_00b9: ldarga.s val - IL_00bb: ldfld valuetype MCCTest.VTypeE MCCTest.VTypeF::f10 - IL_00c0: call instance void MCCTest.VTypeE::Add(valuetype MCCTest.VTypeE) - IL_00c5: nop - IL_00c6: ldarg.0 - IL_00c7: ldflda valuetype MCCTest.VType3 MCCTest.VTypeF::f11 - IL_00cc: ldarga.s val - IL_00ce: ldfld valuetype MCCTest.VType3 MCCTest.VTypeF::f11 - IL_00d3: call instance void MCCTest.VType3::Add(valuetype MCCTest.VType3) - IL_00d8: nop - IL_00d9: ldarg.0 - IL_00da: dup - IL_00db: ldfld int64 MCCTest.VTypeF::f12 - IL_00e0: ldarga.s val - IL_00e2: ldfld int64 MCCTest.VTypeF::f12 - IL_00e7: add - IL_00e8: stfld int64 MCCTest.VTypeF::f12 - IL_00ed: ldarg.0 - IL_00ee: dup - IL_00ef: ldfld uint16 MCCTest.VTypeF::f13 - IL_00f4: ldarga.s val - IL_00f6: ldfld uint16 MCCTest.VTypeF::f13 - IL_00fb: add - IL_00fc: conv.u2 - IL_00fd: stfld uint16 MCCTest.VTypeF::f13 - IL_0102: ldarg.0 - IL_0103: ldflda valuetype MCCTest.VType5 MCCTest.VTypeF::f14 - IL_0108: ldarga.s val - IL_010a: ldfld valuetype MCCTest.VType5 MCCTest.VTypeF::f14 - IL_010f: call instance void MCCTest.VType5::Add(valuetype MCCTest.VType5) - IL_0114: nop - IL_0115: ldarg.0 - IL_0116: ldflda valuetype MCCTest.VType9 MCCTest.VTypeF::f15 - IL_011b: ldarga.s val - IL_011d: ldfld valuetype MCCTest.VType9 MCCTest.VTypeF::f15 - IL_0122: call instance void MCCTest.VType9::Add(valuetype MCCTest.VType9) - IL_0127: nop - IL_0128: ldarg.0 - IL_0129: ldfld class MCCTest.RType4 MCCTest.VTypeF::f16 - IL_012e: ldarga.s val - IL_0130: ldfld class MCCTest.RType4 MCCTest.VTypeF::f16 - IL_0135: callvirt instance void MCCTest.RType4::Add(class MCCTest.RType4) - IL_013a: nop - IL_013b: ldarg.0 - IL_013c: ldfld class MCCTest.RType4 MCCTest.VTypeF::f17 - IL_0141: ldarga.s val - IL_0143: ldfld class MCCTest.RType4 MCCTest.VTypeF::f17 - IL_0148: callvirt instance void MCCTest.RType4::Add(class MCCTest.RType4) - IL_014d: nop - IL_014e: ldarg.0 - IL_014f: dup - IL_0150: ldfld int32 MCCTest.VTypeF::f18 - IL_0155: ldarga.s val - IL_0157: ldfld int32 MCCTest.VTypeF::f18 - IL_015c: add - IL_015d: stfld int32 MCCTest.VTypeF::f18 - IL_0162: ldarg.0 - IL_0163: ldflda valuetype MCCTest.VType8 MCCTest.VTypeF::f19 - IL_0168: ldarga.s val - IL_016a: ldfld valuetype MCCTest.VType8 MCCTest.VTypeF::f19 - IL_016f: call instance void MCCTest.VType8::Add(valuetype MCCTest.VType8) - IL_0174: nop - IL_0175: ldarg.0 - IL_0176: ldfld class MCCTest.RType4 MCCTest.VTypeF::f20 - IL_017b: ldarga.s val - IL_017d: ldfld class MCCTest.RType4 MCCTest.VTypeF::f20 - IL_0182: callvirt instance void MCCTest.RType4::Add(class MCCTest.RType4) - IL_0187: nop - IL_0188: ldarg.0 - IL_0189: ldflda valuetype MCCTest.VTypeA MCCTest.VTypeF::f21 - IL_018e: ldarga.s val - IL_0190: ldfld valuetype MCCTest.VTypeA MCCTest.VTypeF::f21 - IL_0195: call instance void MCCTest.VTypeA::Add(valuetype MCCTest.VTypeA) - IL_019a: nop - IL_019b: ldarg.0 - IL_019c: ldflda valuetype MCCTest.VTypeD MCCTest.VTypeF::f22 - IL_01a1: ldarga.s val - IL_01a3: ldfld valuetype MCCTest.VTypeD MCCTest.VTypeF::f22 - IL_01a8: call instance void MCCTest.VTypeD::Add(valuetype MCCTest.VTypeD) - IL_01ad: nop - IL_01ae: ldarg.0 - IL_01af: ldflda valuetype MCCTest.VType9 MCCTest.VTypeF::f23 - IL_01b4: ldarga.s val - IL_01b6: ldfld valuetype MCCTest.VType9 MCCTest.VTypeF::f23 - IL_01bb: call instance void MCCTest.VType9::Add(valuetype MCCTest.VType9) - IL_01c0: nop - IL_01c1: ldarg.0 - IL_01c2: ldflda valuetype MCCTest.VTypeE MCCTest.VTypeF::f24 - IL_01c7: ldarga.s val - IL_01c9: ldfld valuetype MCCTest.VTypeE MCCTest.VTypeF::f24 - IL_01ce: call instance void MCCTest.VTypeE::Add(valuetype MCCTest.VTypeE) - IL_01d3: nop - IL_01d4: ldarg.0 - IL_01d5: ldfld class MCCTest.RType4 MCCTest.VTypeF::f25 - IL_01da: ldarga.s val - IL_01dc: ldfld class MCCTest.RType4 MCCTest.VTypeF::f25 - IL_01e1: callvirt instance void MCCTest.RType4::Add(class MCCTest.RType4) - IL_01e6: nop - IL_01e7: ldarg.0 - IL_01e8: dup - IL_01e9: ldfld float32 MCCTest.VTypeF::f26 - IL_01ee: ldarga.s val - IL_01f0: ldfld float32 MCCTest.VTypeF::f26 - IL_01f5: add - IL_01f6: stfld float32 MCCTest.VTypeF::f26 - IL_01fb: ldarg.0 - IL_01fc: dup - IL_01fd: ldfld uint8 MCCTest.VTypeF::f27 - IL_0202: ldarga.s val - IL_0204: ldfld uint8 MCCTest.VTypeF::f27 - IL_0209: add - IL_020a: conv.u1 - IL_020b: stfld uint8 MCCTest.VTypeF::f27 - IL_0210: ldarg.0 - IL_0211: dup - IL_0212: ldfld float64 MCCTest.VTypeF::f28 - IL_0217: ldarga.s val - IL_0219: ldfld float64 MCCTest.VTypeF::f28 - IL_021e: add - IL_021f: stfld float64 MCCTest.VTypeF::f28 - IL_0224: ldarg.0 - IL_0225: ldflda valuetype MCCTest.VTypeC MCCTest.VTypeF::f29 - IL_022a: ldarga.s val - IL_022c: ldfld valuetype MCCTest.VTypeC MCCTest.VTypeF::f29 - IL_0231: call instance void MCCTest.VTypeC::Add(valuetype MCCTest.VTypeC) - IL_0236: nop - IL_0237: ldarg.0 - IL_0238: ldflda valuetype MCCTest.VType6 MCCTest.VTypeF::f30 - IL_023d: ldarga.s val - IL_023f: ldfld valuetype MCCTest.VType6 MCCTest.VTypeF::f30 - IL_0244: call instance void MCCTest.VType6::Add(valuetype MCCTest.VType6) - IL_0249: nop - IL_024a: ldarg.0 - IL_024b: dup - IL_024c: ldfld float64 MCCTest.VTypeF::f31 - IL_0251: ldarga.s val - IL_0253: ldfld float64 MCCTest.VTypeF::f31 - IL_0258: add - IL_0259: stfld float64 MCCTest.VTypeF::f31 - IL_025e: ldarg.0 - IL_025f: ldflda valuetype MCCTest.VType8 MCCTest.VTypeF::f32 - IL_0264: ldarga.s val - IL_0266: ldfld valuetype MCCTest.VType8 MCCTest.VTypeF::f32 - IL_026b: call instance void MCCTest.VType8::Add(valuetype MCCTest.VType8) - IL_0270: nop - IL_0271: ldarg.0 - IL_0272: dup - IL_0273: ldfld int8 MCCTest.VTypeF::f33 - IL_0278: ldarga.s val - IL_027a: ldfld int8 MCCTest.VTypeF::f33 - IL_027f: add - IL_0280: conv.i1 - IL_0281: stfld int8 MCCTest.VTypeF::f33 - IL_0286: ldarg.0 - IL_0287: ldflda valuetype MCCTest.VTypeD MCCTest.VTypeF::f34 - IL_028c: ldarga.s val - IL_028e: ldfld valuetype MCCTest.VTypeD MCCTest.VTypeF::f34 - IL_0293: call instance void MCCTest.VTypeD::Add(valuetype MCCTest.VTypeD) - IL_0298: nop - IL_0299: ldarg.0 - IL_029a: ldflda valuetype MCCTest.VTypeE MCCTest.VTypeF::f35 - IL_029f: ldarga.s val - IL_02a1: ldfld valuetype MCCTest.VTypeE MCCTest.VTypeF::f35 - IL_02a6: call instance void MCCTest.VTypeE::Add(valuetype MCCTest.VTypeE) - IL_02ab: nop - IL_02ac: ldarg.0 - IL_02ad: ldflda valuetype MCCTest.VTypeE MCCTest.VTypeF::f36 - IL_02b2: ldarga.s val - IL_02b4: ldfld valuetype MCCTest.VTypeE MCCTest.VTypeF::f36 - IL_02b9: call instance void MCCTest.VTypeE::Add(valuetype MCCTest.VTypeE) - IL_02be: nop - IL_02bf: ldarg.0 - IL_02c0: ldflda valuetype MCCTest.VType7 MCCTest.VTypeF::f37 - IL_02c5: ldarga.s val - IL_02c7: ldfld valuetype MCCTest.VType7 MCCTest.VTypeF::f37 - IL_02cc: call instance void MCCTest.VType7::Add(valuetype MCCTest.VType7) - IL_02d1: nop - IL_02d2: ldarg.0 - IL_02d3: ldflda valuetype MCCTest.VType9 MCCTest.VTypeF::f38 - IL_02d8: ldarga.s val - IL_02da: ldfld valuetype MCCTest.VType9 MCCTest.VTypeF::f38 - IL_02df: call instance void MCCTest.VType9::Add(valuetype MCCTest.VType9) - IL_02e4: nop - IL_02e5: ldarg.0 - IL_02e6: ldflda valuetype MCCTest.VType8 MCCTest.VTypeF::f39 - IL_02eb: ldarga.s val - IL_02ed: ldfld valuetype MCCTest.VType8 MCCTest.VTypeF::f39 - IL_02f2: call instance void MCCTest.VType8::Add(valuetype MCCTest.VType8) - IL_02f7: nop - IL_02f8: ldarg.0 - IL_02f9: dup - IL_02fa: ldfld float32 MCCTest.VTypeF::f40 - IL_02ff: ldarga.s val - IL_0301: ldfld float32 MCCTest.VTypeF::f40 - IL_0306: add - IL_0307: stfld float32 MCCTest.VTypeF::f40 - IL_030c: ldarg.0 - IL_030d: dup - IL_030e: ldfld int32 MCCTest.VTypeF::f41 - IL_0313: ldarga.s val - IL_0315: ldfld int32 MCCTest.VTypeF::f41 - IL_031a: add - IL_031b: stfld int32 MCCTest.VTypeF::f41 - IL_0320: ldarg.0 - IL_0321: dup - IL_0322: ldfld char MCCTest.VTypeF::f42 - IL_0327: ldarga.s val - IL_0329: ldfld char MCCTest.VTypeF::f42 - IL_032e: add - IL_032f: conv.u2 - IL_0330: stfld char MCCTest.VTypeF::f42 - IL_0335: ldarg.0 - IL_0336: ldflda valuetype MCCTest.VTypeB MCCTest.VTypeF::f43 - IL_033b: ldarga.s val - IL_033d: ldfld valuetype MCCTest.VTypeB MCCTest.VTypeF::f43 - IL_0342: call instance void MCCTest.VTypeB::Add(valuetype MCCTest.VTypeB) - IL_0347: nop - IL_0348: ldarg.0 - IL_0349: ldflda valuetype MCCTest.VType8 MCCTest.VTypeF::f44 - IL_034e: ldarga.s val - IL_0350: ldfld valuetype MCCTest.VType8 MCCTest.VTypeF::f44 - IL_0355: call instance void MCCTest.VType8::Add(valuetype MCCTest.VType8) - IL_035a: nop - IL_035b: ret - } // end of method VTypeF::Add - - .method public hidebysig newslot virtual final - instance void Check(valuetype MCCTest.VTypeF expected) cil managed - { - // Code size 1901 (0x76d) - .maxstack 4 - .locals init (string V_0, - class [mscorlib]System.Type V_1, - class MCCTest.ResultVerificationException V_2, - bool V_3) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldfld char MCCTest.VTypeF::f1 - IL_0007: ldarga.s expected - IL_0009: ldfld char MCCTest.VTypeF::f1 - IL_000e: ceq - IL_0010: stloc.3 - IL_0011: ldloc.3 - IL_0012: brtrue.s IL_002f - - IL_0014: nop - IL_0015: ldstr "f1" - IL_001a: ldarg.0 - IL_001b: ldfld char MCCTest.VTypeF::f1 - IL_0020: conv.u8 - IL_0021: ldarga.s expected - IL_0023: ldfld char MCCTest.VTypeF::f1 - IL_0028: conv.u8 - IL_0029: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_002e: throw - - IL_002f: ldarg.0 - IL_0030: ldfld float64 MCCTest.VTypeF::f2 - IL_0035: ldarga.s expected - IL_0037: ldfld float64 MCCTest.VTypeF::f2 - IL_003c: ceq - IL_003e: stloc.3 - IL_003f: ldloc.3 - IL_0040: brtrue.s IL_005b - - IL_0042: nop - IL_0043: ldstr "f2" - IL_0048: ldarg.0 - IL_0049: ldfld float64 MCCTest.VTypeF::f2 - IL_004e: ldarga.s expected - IL_0050: ldfld float64 MCCTest.VTypeF::f2 - IL_0055: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_005a: throw - - IL_005b: ldarg.0 - IL_005c: ldfld float32 MCCTest.VTypeF::f3 - IL_0061: ldarga.s expected - IL_0063: ldfld float32 MCCTest.VTypeF::f3 - IL_0068: ceq - IL_006a: stloc.3 - IL_006b: ldloc.3 - IL_006c: brtrue.s IL_0089 - - IL_006e: nop - IL_006f: ldstr "f3" - IL_0074: ldarg.0 - IL_0075: ldfld float32 MCCTest.VTypeF::f3 - IL_007a: conv.r8 - IL_007b: ldarga.s expected - IL_007d: ldfld float32 MCCTest.VTypeF::f3 - IL_0082: conv.r8 - IL_0083: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0088: throw - - IL_0089: ldarg.0 - IL_008a: ldfld char MCCTest.VTypeF::f6 - IL_008f: ldarga.s expected - IL_0091: ldfld char MCCTest.VTypeF::f6 - IL_0096: ceq - IL_0098: stloc.3 - IL_0099: ldloc.3 - IL_009a: brtrue.s IL_00b7 - - IL_009c: nop - IL_009d: ldstr "f6" - IL_00a2: ldarg.0 - IL_00a3: ldfld char MCCTest.VTypeF::f6 - IL_00a8: conv.u8 - IL_00a9: ldarga.s expected - IL_00ab: ldfld char MCCTest.VTypeF::f6 - IL_00b0: conv.u8 - IL_00b1: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_00b6: throw - - IL_00b7: ldarg.0 - IL_00b8: ldfld float32 MCCTest.VTypeF::f7 - IL_00bd: ldarga.s expected - IL_00bf: ldfld float32 MCCTest.VTypeF::f7 - IL_00c4: ceq - IL_00c6: stloc.3 - IL_00c7: ldloc.3 - IL_00c8: brtrue.s IL_00e5 - - IL_00ca: nop - IL_00cb: ldstr "f7" - IL_00d0: ldarg.0 - IL_00d1: ldfld float32 MCCTest.VTypeF::f7 - IL_00d6: conv.r8 - IL_00d7: ldarga.s expected - IL_00d9: ldfld float32 MCCTest.VTypeF::f7 - IL_00de: conv.r8 - IL_00df: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_00e4: throw - - IL_00e5: ldarg.0 - IL_00e6: ldfld int64 MCCTest.VTypeF::f12 - IL_00eb: ldarga.s expected - IL_00ed: ldfld int64 MCCTest.VTypeF::f12 - IL_00f2: ceq - IL_00f4: stloc.3 - IL_00f5: ldloc.3 - IL_00f6: brtrue.s IL_0111 - - IL_00f8: nop - IL_00f9: ldstr "f12" - IL_00fe: ldarg.0 - IL_00ff: ldfld int64 MCCTest.VTypeF::f12 - IL_0104: ldarga.s expected - IL_0106: ldfld int64 MCCTest.VTypeF::f12 - IL_010b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_0110: throw - - IL_0111: ldarg.0 - IL_0112: ldfld uint16 MCCTest.VTypeF::f13 - IL_0117: ldarga.s expected - IL_0119: ldfld uint16 MCCTest.VTypeF::f13 - IL_011e: ceq - IL_0120: stloc.3 - IL_0121: ldloc.3 - IL_0122: brtrue.s IL_013f - - IL_0124: nop - IL_0125: ldstr "f13" - IL_012a: ldarg.0 - IL_012b: ldfld uint16 MCCTest.VTypeF::f13 - IL_0130: conv.u8 - IL_0131: ldarga.s expected - IL_0133: ldfld uint16 MCCTest.VTypeF::f13 - IL_0138: conv.u8 - IL_0139: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_013e: throw - - IL_013f: ldarg.0 - IL_0140: ldfld int32 MCCTest.VTypeF::f18 - IL_0145: ldarga.s expected - IL_0147: ldfld int32 MCCTest.VTypeF::f18 - IL_014c: ceq - IL_014e: stloc.3 - IL_014f: ldloc.3 - IL_0150: brtrue.s IL_016d - - IL_0152: nop - IL_0153: ldstr "f18" - IL_0158: ldarg.0 - IL_0159: ldfld int32 MCCTest.VTypeF::f18 - IL_015e: conv.i8 - IL_015f: ldarga.s expected - IL_0161: ldfld int32 MCCTest.VTypeF::f18 - IL_0166: conv.i8 - IL_0167: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_016c: throw - - IL_016d: ldarg.0 - IL_016e: ldfld float32 MCCTest.VTypeF::f26 - IL_0173: ldarga.s expected - IL_0175: ldfld float32 MCCTest.VTypeF::f26 - IL_017a: ceq - IL_017c: stloc.3 - IL_017d: ldloc.3 - IL_017e: brtrue.s IL_019b - - IL_0180: nop - IL_0181: ldstr "f26" - IL_0186: ldarg.0 - IL_0187: ldfld float32 MCCTest.VTypeF::f26 - IL_018c: conv.r8 - IL_018d: ldarga.s expected - IL_018f: ldfld float32 MCCTest.VTypeF::f26 - IL_0194: conv.r8 - IL_0195: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_019a: throw - - IL_019b: ldarg.0 - IL_019c: ldfld uint8 MCCTest.VTypeF::f27 - IL_01a1: ldarga.s expected - IL_01a3: ldfld uint8 MCCTest.VTypeF::f27 - IL_01a8: ceq - IL_01aa: stloc.3 - IL_01ab: ldloc.3 - IL_01ac: brtrue.s IL_01c9 - - IL_01ae: nop - IL_01af: ldstr "f27" - IL_01b4: ldarg.0 - IL_01b5: ldfld uint8 MCCTest.VTypeF::f27 - IL_01ba: conv.u8 - IL_01bb: ldarga.s expected - IL_01bd: ldfld uint8 MCCTest.VTypeF::f27 - IL_01c2: conv.u8 - IL_01c3: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_01c8: throw - - IL_01c9: ldarg.0 - IL_01ca: ldfld float64 MCCTest.VTypeF::f28 - IL_01cf: ldarga.s expected - IL_01d1: ldfld float64 MCCTest.VTypeF::f28 - IL_01d6: ceq - IL_01d8: stloc.3 - IL_01d9: ldloc.3 - IL_01da: brtrue.s IL_01f5 - - IL_01dc: nop - IL_01dd: ldstr "f28" - IL_01e2: ldarg.0 - IL_01e3: ldfld float64 MCCTest.VTypeF::f28 - IL_01e8: ldarga.s expected - IL_01ea: ldfld float64 MCCTest.VTypeF::f28 - IL_01ef: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_01f4: throw - - IL_01f5: ldarg.0 - IL_01f6: ldfld float64 MCCTest.VTypeF::f31 - IL_01fb: ldarga.s expected - IL_01fd: ldfld float64 MCCTest.VTypeF::f31 - IL_0202: ceq - IL_0204: stloc.3 - IL_0205: ldloc.3 - IL_0206: brtrue.s IL_0221 - - IL_0208: nop - IL_0209: ldstr "f31" - IL_020e: ldarg.0 - IL_020f: ldfld float64 MCCTest.VTypeF::f31 - IL_0214: ldarga.s expected - IL_0216: ldfld float64 MCCTest.VTypeF::f31 - IL_021b: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_0220: throw - - IL_0221: ldarg.0 - IL_0222: ldfld int8 MCCTest.VTypeF::f33 - IL_0227: ldarga.s expected - IL_0229: ldfld int8 MCCTest.VTypeF::f33 - IL_022e: ceq - IL_0230: stloc.3 - IL_0231: ldloc.3 - IL_0232: brtrue.s IL_024f - - IL_0234: nop - IL_0235: ldstr "f33" - IL_023a: ldarg.0 - IL_023b: ldfld int8 MCCTest.VTypeF::f33 - IL_0240: conv.i8 - IL_0241: ldarga.s expected - IL_0243: ldfld int8 MCCTest.VTypeF::f33 - IL_0248: conv.i8 - IL_0249: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_024e: throw - - IL_024f: ldarg.0 - IL_0250: ldfld float32 MCCTest.VTypeF::f40 - IL_0255: ldarga.s expected - IL_0257: ldfld float32 MCCTest.VTypeF::f40 - IL_025c: ceq - IL_025e: stloc.3 - IL_025f: ldloc.3 - IL_0260: brtrue.s IL_027d - - IL_0262: nop - IL_0263: ldstr "f40" - IL_0268: ldarg.0 - IL_0269: ldfld float32 MCCTest.VTypeF::f40 - IL_026e: conv.r8 - IL_026f: ldarga.s expected - IL_0271: ldfld float32 MCCTest.VTypeF::f40 - IL_0276: conv.r8 - IL_0277: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - float64, - float64) - IL_027c: throw - - IL_027d: ldarg.0 - IL_027e: ldfld int32 MCCTest.VTypeF::f41 - IL_0283: ldarga.s expected - IL_0285: ldfld int32 MCCTest.VTypeF::f41 - IL_028a: ceq - IL_028c: stloc.3 - IL_028d: ldloc.3 - IL_028e: brtrue.s IL_02ab - - IL_0290: nop - IL_0291: ldstr "f41" - IL_0296: ldarg.0 - IL_0297: ldfld int32 MCCTest.VTypeF::f41 - IL_029c: conv.i8 - IL_029d: ldarga.s expected - IL_029f: ldfld int32 MCCTest.VTypeF::f41 - IL_02a4: conv.i8 - IL_02a5: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_02aa: throw - - IL_02ab: ldarg.0 - IL_02ac: ldfld char MCCTest.VTypeF::f42 - IL_02b1: ldarga.s expected - IL_02b3: ldfld char MCCTest.VTypeF::f42 - IL_02b8: ceq - IL_02ba: stloc.3 - IL_02bb: ldloc.3 - IL_02bc: brtrue.s IL_02d9 - - IL_02be: nop - IL_02bf: ldstr "f42" - IL_02c4: ldarg.0 - IL_02c5: ldfld char MCCTest.VTypeF::f42 - IL_02ca: conv.u8 - IL_02cb: ldarga.s expected - IL_02cd: ldfld char MCCTest.VTypeF::f42 - IL_02d2: conv.u8 - IL_02d3: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - int64, - int64) - IL_02d8: throw - - IL_02d9: ldnull - IL_02da: stloc.0 - IL_02db: ldnull - IL_02dc: stloc.1 - .try - { - IL_02dd: nop - IL_02de: ldstr "f4" - IL_02e3: stloc.0 - IL_02e4: ldarg.0 - IL_02e5: ldfld valuetype MCCTest.VType9 MCCTest.VTypeF::f4 - IL_02ea: box MCCTest.VType9 - IL_02ef: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_02f4: stloc.1 - IL_02f5: ldarg.0 - IL_02f6: ldflda valuetype MCCTest.VType9 MCCTest.VTypeF::f4 - IL_02fb: ldarga.s expected - IL_02fd: ldfld valuetype MCCTest.VType9 MCCTest.VTypeF::f4 - IL_0302: call instance void MCCTest.VType9::Check(valuetype MCCTest.VType9) - IL_0307: nop - IL_0308: ldstr "f5" - IL_030d: stloc.0 - IL_030e: ldarg.0 - IL_030f: ldfld class MCCTest.RType4 MCCTest.VTypeF::f5 - IL_0314: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0319: stloc.1 - IL_031a: ldarg.0 - IL_031b: ldfld class MCCTest.RType4 MCCTest.VTypeF::f5 - IL_0320: ldarga.s expected - IL_0322: ldfld class MCCTest.RType4 MCCTest.VTypeF::f5 - IL_0327: callvirt instance void MCCTest.RType4::Check(class MCCTest.RType4) - IL_032c: nop - IL_032d: ldstr "f8" - IL_0332: stloc.0 - IL_0333: ldarg.0 - IL_0334: ldfld valuetype MCCTest.VTypeE MCCTest.VTypeF::f8 - IL_0339: box MCCTest.VTypeE - IL_033e: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0343: stloc.1 - IL_0344: ldarg.0 - IL_0345: ldflda valuetype MCCTest.VTypeE MCCTest.VTypeF::f8 - IL_034a: ldarga.s expected - IL_034c: ldfld valuetype MCCTest.VTypeE MCCTest.VTypeF::f8 - IL_0351: call instance void MCCTest.VTypeE::Check(valuetype MCCTest.VTypeE) - IL_0356: nop - IL_0357: ldstr "f9" - IL_035c: stloc.0 - IL_035d: ldarg.0 - IL_035e: ldfld valuetype MCCTest.VType8 MCCTest.VTypeF::f9 - IL_0363: box MCCTest.VType8 - IL_0368: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_036d: stloc.1 - IL_036e: ldarg.0 - IL_036f: ldflda valuetype MCCTest.VType8 MCCTest.VTypeF::f9 - IL_0374: ldarga.s expected - IL_0376: ldfld valuetype MCCTest.VType8 MCCTest.VTypeF::f9 - IL_037b: call instance void MCCTest.VType8::Check(valuetype MCCTest.VType8) - IL_0380: nop - IL_0381: ldstr "f10" - IL_0386: stloc.0 - IL_0387: ldarg.0 - IL_0388: ldfld valuetype MCCTest.VTypeE MCCTest.VTypeF::f10 - IL_038d: box MCCTest.VTypeE - IL_0392: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0397: stloc.1 - IL_0398: ldarg.0 - IL_0399: ldflda valuetype MCCTest.VTypeE MCCTest.VTypeF::f10 - IL_039e: ldarga.s expected - IL_03a0: ldfld valuetype MCCTest.VTypeE MCCTest.VTypeF::f10 - IL_03a5: call instance void MCCTest.VTypeE::Check(valuetype MCCTest.VTypeE) - IL_03aa: nop - IL_03ab: ldstr "f11" - IL_03b0: stloc.0 - IL_03b1: ldarg.0 - IL_03b2: ldfld valuetype MCCTest.VType3 MCCTest.VTypeF::f11 - IL_03b7: box MCCTest.VType3 - IL_03bc: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_03c1: stloc.1 - IL_03c2: ldarg.0 - IL_03c3: ldflda valuetype MCCTest.VType3 MCCTest.VTypeF::f11 - IL_03c8: ldarga.s expected - IL_03ca: ldfld valuetype MCCTest.VType3 MCCTest.VTypeF::f11 - IL_03cf: call instance void MCCTest.VType3::Check(valuetype MCCTest.VType3) - IL_03d4: nop - IL_03d5: ldstr "f14" - IL_03da: stloc.0 - IL_03db: ldarg.0 - IL_03dc: ldfld valuetype MCCTest.VType5 MCCTest.VTypeF::f14 - IL_03e1: box MCCTest.VType5 - IL_03e6: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_03eb: stloc.1 - IL_03ec: ldarg.0 - IL_03ed: ldflda valuetype MCCTest.VType5 MCCTest.VTypeF::f14 - IL_03f2: ldarga.s expected - IL_03f4: ldfld valuetype MCCTest.VType5 MCCTest.VTypeF::f14 - IL_03f9: call instance void MCCTest.VType5::Check(valuetype MCCTest.VType5) - IL_03fe: nop - IL_03ff: ldstr "f15" - IL_0404: stloc.0 - IL_0405: ldarg.0 - IL_0406: ldfld valuetype MCCTest.VType9 MCCTest.VTypeF::f15 - IL_040b: box MCCTest.VType9 - IL_0410: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0415: stloc.1 - IL_0416: ldarg.0 - IL_0417: ldflda valuetype MCCTest.VType9 MCCTest.VTypeF::f15 - IL_041c: ldarga.s expected - IL_041e: ldfld valuetype MCCTest.VType9 MCCTest.VTypeF::f15 - IL_0423: call instance void MCCTest.VType9::Check(valuetype MCCTest.VType9) - IL_0428: nop - IL_0429: ldstr "f16" - IL_042e: stloc.0 - IL_042f: ldarg.0 - IL_0430: ldfld class MCCTest.RType4 MCCTest.VTypeF::f16 - IL_0435: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_043a: stloc.1 - IL_043b: ldarg.0 - IL_043c: ldfld class MCCTest.RType4 MCCTest.VTypeF::f16 - IL_0441: ldarga.s expected - IL_0443: ldfld class MCCTest.RType4 MCCTest.VTypeF::f16 - IL_0448: callvirt instance void MCCTest.RType4::Check(class MCCTest.RType4) - IL_044d: nop - IL_044e: ldstr "f17" - IL_0453: stloc.0 - IL_0454: ldarg.0 - IL_0455: ldfld class MCCTest.RType4 MCCTest.VTypeF::f17 - IL_045a: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_045f: stloc.1 - IL_0460: ldarg.0 - IL_0461: ldfld class MCCTest.RType4 MCCTest.VTypeF::f17 - IL_0466: ldarga.s expected - IL_0468: ldfld class MCCTest.RType4 MCCTest.VTypeF::f17 - IL_046d: callvirt instance void MCCTest.RType4::Check(class MCCTest.RType4) - IL_0472: nop - IL_0473: ldstr "f19" - IL_0478: stloc.0 - IL_0479: ldarg.0 - IL_047a: ldfld valuetype MCCTest.VType8 MCCTest.VTypeF::f19 - IL_047f: box MCCTest.VType8 - IL_0484: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0489: stloc.1 - IL_048a: ldarg.0 - IL_048b: ldflda valuetype MCCTest.VType8 MCCTest.VTypeF::f19 - IL_0490: ldarga.s expected - IL_0492: ldfld valuetype MCCTest.VType8 MCCTest.VTypeF::f19 - IL_0497: call instance void MCCTest.VType8::Check(valuetype MCCTest.VType8) - IL_049c: nop - IL_049d: ldstr "f20" - IL_04a2: stloc.0 - IL_04a3: ldarg.0 - IL_04a4: ldfld class MCCTest.RType4 MCCTest.VTypeF::f20 - IL_04a9: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_04ae: stloc.1 - IL_04af: ldarg.0 - IL_04b0: ldfld class MCCTest.RType4 MCCTest.VTypeF::f20 - IL_04b5: ldarga.s expected - IL_04b7: ldfld class MCCTest.RType4 MCCTest.VTypeF::f20 - IL_04bc: callvirt instance void MCCTest.RType4::Check(class MCCTest.RType4) - IL_04c1: nop - IL_04c2: ldstr "f21" - IL_04c7: stloc.0 - IL_04c8: ldarg.0 - IL_04c9: ldfld valuetype MCCTest.VTypeA MCCTest.VTypeF::f21 - IL_04ce: box MCCTest.VTypeA - IL_04d3: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_04d8: stloc.1 - IL_04d9: ldarg.0 - IL_04da: ldflda valuetype MCCTest.VTypeA MCCTest.VTypeF::f21 - IL_04df: ldarga.s expected - IL_04e1: ldfld valuetype MCCTest.VTypeA MCCTest.VTypeF::f21 - IL_04e6: call instance void MCCTest.VTypeA::Check(valuetype MCCTest.VTypeA) - IL_04eb: nop - IL_04ec: ldstr "f22" - IL_04f1: stloc.0 - IL_04f2: ldarg.0 - IL_04f3: ldfld valuetype MCCTest.VTypeD MCCTest.VTypeF::f22 - IL_04f8: box MCCTest.VTypeD - IL_04fd: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0502: stloc.1 - IL_0503: ldarg.0 - IL_0504: ldflda valuetype MCCTest.VTypeD MCCTest.VTypeF::f22 - IL_0509: ldarga.s expected - IL_050b: ldfld valuetype MCCTest.VTypeD MCCTest.VTypeF::f22 - IL_0510: call instance void MCCTest.VTypeD::Check(valuetype MCCTest.VTypeD) - IL_0515: nop - IL_0516: ldstr "f23" - IL_051b: stloc.0 - IL_051c: ldarg.0 - IL_051d: ldfld valuetype MCCTest.VType9 MCCTest.VTypeF::f23 - IL_0522: box MCCTest.VType9 - IL_0527: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_052c: stloc.1 - IL_052d: ldarg.0 - IL_052e: ldflda valuetype MCCTest.VType9 MCCTest.VTypeF::f23 - IL_0533: ldarga.s expected - IL_0535: ldfld valuetype MCCTest.VType9 MCCTest.VTypeF::f23 - IL_053a: call instance void MCCTest.VType9::Check(valuetype MCCTest.VType9) - IL_053f: nop - IL_0540: ldstr "f24" - IL_0545: stloc.0 - IL_0546: ldarg.0 - IL_0547: ldfld valuetype MCCTest.VTypeE MCCTest.VTypeF::f24 - IL_054c: box MCCTest.VTypeE - IL_0551: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0556: stloc.1 - IL_0557: ldarg.0 - IL_0558: ldflda valuetype MCCTest.VTypeE MCCTest.VTypeF::f24 - IL_055d: ldarga.s expected - IL_055f: ldfld valuetype MCCTest.VTypeE MCCTest.VTypeF::f24 - IL_0564: call instance void MCCTest.VTypeE::Check(valuetype MCCTest.VTypeE) - IL_0569: nop - IL_056a: ldstr "f25" - IL_056f: stloc.0 - IL_0570: ldarg.0 - IL_0571: ldfld class MCCTest.RType4 MCCTest.VTypeF::f25 - IL_0576: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_057b: stloc.1 - IL_057c: ldarg.0 - IL_057d: ldfld class MCCTest.RType4 MCCTest.VTypeF::f25 - IL_0582: ldarga.s expected - IL_0584: ldfld class MCCTest.RType4 MCCTest.VTypeF::f25 - IL_0589: callvirt instance void MCCTest.RType4::Check(class MCCTest.RType4) - IL_058e: nop - IL_058f: ldstr "f29" - IL_0594: stloc.0 - IL_0595: ldarg.0 - IL_0596: ldfld valuetype MCCTest.VTypeC MCCTest.VTypeF::f29 - IL_059b: box MCCTest.VTypeC - IL_05a0: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_05a5: stloc.1 - IL_05a6: ldarg.0 - IL_05a7: ldflda valuetype MCCTest.VTypeC MCCTest.VTypeF::f29 - IL_05ac: ldarga.s expected - IL_05ae: ldfld valuetype MCCTest.VTypeC MCCTest.VTypeF::f29 - IL_05b3: call instance void MCCTest.VTypeC::Check(valuetype MCCTest.VTypeC) - IL_05b8: nop - IL_05b9: ldstr "f30" - IL_05be: stloc.0 - IL_05bf: ldarg.0 - IL_05c0: ldfld valuetype MCCTest.VType6 MCCTest.VTypeF::f30 - IL_05c5: box MCCTest.VType6 - IL_05ca: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_05cf: stloc.1 - IL_05d0: ldarg.0 - IL_05d1: ldflda valuetype MCCTest.VType6 MCCTest.VTypeF::f30 - IL_05d6: ldarga.s expected - IL_05d8: ldfld valuetype MCCTest.VType6 MCCTest.VTypeF::f30 - IL_05dd: call instance void MCCTest.VType6::Check(valuetype MCCTest.VType6) - IL_05e2: nop - IL_05e3: ldstr "f32" - IL_05e8: stloc.0 - IL_05e9: ldarg.0 - IL_05ea: ldfld valuetype MCCTest.VType8 MCCTest.VTypeF::f32 - IL_05ef: box MCCTest.VType8 - IL_05f4: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_05f9: stloc.1 - IL_05fa: ldarg.0 - IL_05fb: ldflda valuetype MCCTest.VType8 MCCTest.VTypeF::f32 - IL_0600: ldarga.s expected - IL_0602: ldfld valuetype MCCTest.VType8 MCCTest.VTypeF::f32 - IL_0607: call instance void MCCTest.VType8::Check(valuetype MCCTest.VType8) - IL_060c: nop - IL_060d: ldstr "f34" - IL_0612: stloc.0 - IL_0613: ldarg.0 - IL_0614: ldfld valuetype MCCTest.VTypeD MCCTest.VTypeF::f34 - IL_0619: box MCCTest.VTypeD - IL_061e: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0623: stloc.1 - IL_0624: ldarg.0 - IL_0625: ldflda valuetype MCCTest.VTypeD MCCTest.VTypeF::f34 - IL_062a: ldarga.s expected - IL_062c: ldfld valuetype MCCTest.VTypeD MCCTest.VTypeF::f34 - IL_0631: call instance void MCCTest.VTypeD::Check(valuetype MCCTest.VTypeD) - IL_0636: nop - IL_0637: ldstr "f35" - IL_063c: stloc.0 - IL_063d: ldarg.0 - IL_063e: ldfld valuetype MCCTest.VTypeE MCCTest.VTypeF::f35 - IL_0643: box MCCTest.VTypeE - IL_0648: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_064d: stloc.1 - IL_064e: ldarg.0 - IL_064f: ldflda valuetype MCCTest.VTypeE MCCTest.VTypeF::f35 - IL_0654: ldarga.s expected - IL_0656: ldfld valuetype MCCTest.VTypeE MCCTest.VTypeF::f35 - IL_065b: call instance void MCCTest.VTypeE::Check(valuetype MCCTest.VTypeE) - IL_0660: nop - IL_0661: ldstr "f36" - IL_0666: stloc.0 - IL_0667: ldarg.0 - IL_0668: ldfld valuetype MCCTest.VTypeE MCCTest.VTypeF::f36 - IL_066d: box MCCTest.VTypeE - IL_0672: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0677: stloc.1 - IL_0678: ldarg.0 - IL_0679: ldflda valuetype MCCTest.VTypeE MCCTest.VTypeF::f36 - IL_067e: ldarga.s expected - IL_0680: ldfld valuetype MCCTest.VTypeE MCCTest.VTypeF::f36 - IL_0685: call instance void MCCTest.VTypeE::Check(valuetype MCCTest.VTypeE) - IL_068a: nop - IL_068b: ldstr "f37" - IL_0690: stloc.0 - IL_0691: ldarg.0 - IL_0692: ldfld valuetype MCCTest.VType7 MCCTest.VTypeF::f37 - IL_0697: box MCCTest.VType7 - IL_069c: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_06a1: stloc.1 - IL_06a2: ldarg.0 - IL_06a3: ldflda valuetype MCCTest.VType7 MCCTest.VTypeF::f37 - IL_06a8: ldarga.s expected - IL_06aa: ldfld valuetype MCCTest.VType7 MCCTest.VTypeF::f37 - IL_06af: call instance void MCCTest.VType7::Check(valuetype MCCTest.VType7) - IL_06b4: nop - IL_06b5: ldstr "f38" - IL_06ba: stloc.0 - IL_06bb: ldarg.0 - IL_06bc: ldfld valuetype MCCTest.VType9 MCCTest.VTypeF::f38 - IL_06c1: box MCCTest.VType9 - IL_06c6: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_06cb: stloc.1 - IL_06cc: ldarg.0 - IL_06cd: ldflda valuetype MCCTest.VType9 MCCTest.VTypeF::f38 - IL_06d2: ldarga.s expected - IL_06d4: ldfld valuetype MCCTest.VType9 MCCTest.VTypeF::f38 - IL_06d9: call instance void MCCTest.VType9::Check(valuetype MCCTest.VType9) - IL_06de: nop - IL_06df: ldstr "f39" - IL_06e4: stloc.0 - IL_06e5: ldarg.0 - IL_06e6: ldfld valuetype MCCTest.VType8 MCCTest.VTypeF::f39 - IL_06eb: box MCCTest.VType8 - IL_06f0: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_06f5: stloc.1 - IL_06f6: ldarg.0 - IL_06f7: ldflda valuetype MCCTest.VType8 MCCTest.VTypeF::f39 - IL_06fc: ldarga.s expected - IL_06fe: ldfld valuetype MCCTest.VType8 MCCTest.VTypeF::f39 - IL_0703: call instance void MCCTest.VType8::Check(valuetype MCCTest.VType8) - IL_0708: nop - IL_0709: ldstr "f43" - IL_070e: stloc.0 - IL_070f: ldarg.0 - IL_0710: ldfld valuetype MCCTest.VTypeB MCCTest.VTypeF::f43 - IL_0715: box MCCTest.VTypeB - IL_071a: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_071f: stloc.1 - IL_0720: ldarg.0 - IL_0721: ldflda valuetype MCCTest.VTypeB MCCTest.VTypeF::f43 - IL_0726: ldarga.s expected - IL_0728: ldfld valuetype MCCTest.VTypeB MCCTest.VTypeF::f43 - IL_072d: call instance void MCCTest.VTypeB::Check(valuetype MCCTest.VTypeB) - IL_0732: nop - IL_0733: ldstr "f44" - IL_0738: stloc.0 - IL_0739: ldarg.0 - IL_073a: ldfld valuetype MCCTest.VType8 MCCTest.VTypeF::f44 - IL_073f: box MCCTest.VType8 - IL_0744: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0749: stloc.1 - IL_074a: ldarg.0 - IL_074b: ldflda valuetype MCCTest.VType8 MCCTest.VTypeF::f44 - IL_0750: ldarga.s expected - IL_0752: ldfld valuetype MCCTest.VType8 MCCTest.VTypeF::f44 - IL_0757: call instance void MCCTest.VType8::Check(valuetype MCCTest.VType8) - IL_075c: nop - IL_075d: nop - IL_075e: leave.s IL_076b - - } // end .try - catch MCCTest.ResultVerificationException - { - IL_0760: stloc.2 - IL_0761: nop - IL_0762: ldloc.0 - IL_0763: ldloc.1 - IL_0764: ldloc.2 - IL_0765: newobj instance void MCCTest.ResultVerificationException::.ctor(string, - class [mscorlib]System.Type, - class MCCTest.ResultVerificationException) - IL_076a: throw - - } // end handler - IL_076b: nop - IL_076c: ret - } // end of method VTypeF::Check - - .method public hidebysig instance string - Dump(int32 level) cil managed - { - // Code size 2144 (0x860) - .maxstack 4 - .locals init (string V_0, - class [mscorlib]System.IO.StringWriter V_1, - string V_2) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: call string MCCTest.FormatUtils::GetPadding(int32) - IL_0007: stloc.0 - IL_0008: newobj instance void [mscorlib]System.IO.StringWriter::.ctor() - IL_000d: stloc.1 - IL_000e: ldloc.1 - IL_000f: ldloc.0 - IL_0010: ldstr "f1 = " - IL_0015: ldarg.0 - IL_0016: ldfld char MCCTest.VTypeF::f1 - IL_001b: box [mscorlib]System.Char - IL_0020: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0025: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_002a: nop - IL_002b: ldloc.1 - IL_002c: ldloc.0 - IL_002d: ldstr "f2 = " - IL_0032: ldarg.0 - IL_0033: ldfld float64 MCCTest.VTypeF::f2 - IL_0038: box [mscorlib]System.Double - IL_003d: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0042: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0047: nop - IL_0048: ldloc.1 - IL_0049: ldloc.0 - IL_004a: ldstr "f3 = " - IL_004f: ldarg.0 - IL_0050: ldfld float32 MCCTest.VTypeF::f3 - IL_0055: box [mscorlib]System.Single - IL_005a: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_005f: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0064: nop - IL_0065: ldloc.1 - IL_0066: ldloc.0 - IL_0067: ldstr "[Field f4] [Type '{0}']" - IL_006c: call string [mscorlib]System.String::Concat(string, - string) - IL_0071: ldarg.0 - IL_0072: ldfld valuetype MCCTest.VType9 MCCTest.VTypeF::f4 - IL_0077: box MCCTest.VType9 - IL_007c: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0081: callvirt instance string [mscorlib]System.Object::ToString() - IL_0086: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_008b: nop - IL_008c: ldloc.1 - IL_008d: ldarg.0 - IL_008e: ldflda valuetype MCCTest.VType9 MCCTest.VTypeF::f4 - IL_0093: ldarg.1 - IL_0094: ldc.i4.1 - IL_0095: add - IL_0096: call instance string MCCTest.VType9::Dump(int32) - IL_009b: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_00a0: nop - IL_00a1: ldloc.1 - IL_00a2: ldloc.0 - IL_00a3: ldstr "[Field f5] [Type '{0}']" - IL_00a8: call string [mscorlib]System.String::Concat(string, - string) - IL_00ad: ldarg.0 - IL_00ae: ldfld class MCCTest.RType4 MCCTest.VTypeF::f5 - IL_00b3: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_00b8: callvirt instance string [mscorlib]System.Object::ToString() - IL_00bd: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_00c2: nop - IL_00c3: ldloc.1 - IL_00c4: ldarg.0 - IL_00c5: ldfld class MCCTest.RType4 MCCTest.VTypeF::f5 - IL_00ca: ldarg.1 - IL_00cb: ldc.i4.1 - IL_00cc: add - IL_00cd: callvirt instance string MCCTest.RType4::Dump(int32) - IL_00d2: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_00d7: nop - IL_00d8: ldloc.1 - IL_00d9: ldloc.0 - IL_00da: ldstr "f6 = " - IL_00df: ldarg.0 - IL_00e0: ldfld char MCCTest.VTypeF::f6 - IL_00e5: box [mscorlib]System.Char - IL_00ea: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_00ef: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_00f4: nop - IL_00f5: ldloc.1 - IL_00f6: ldloc.0 - IL_00f7: ldstr "f7 = " - IL_00fc: ldarg.0 - IL_00fd: ldfld float32 MCCTest.VTypeF::f7 - IL_0102: box [mscorlib]System.Single - IL_0107: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_010c: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0111: nop - IL_0112: ldloc.1 - IL_0113: ldloc.0 - IL_0114: ldstr "[Field f8] [Type '{0}']" - IL_0119: call string [mscorlib]System.String::Concat(string, - string) - IL_011e: ldarg.0 - IL_011f: ldfld valuetype MCCTest.VTypeE MCCTest.VTypeF::f8 - IL_0124: box MCCTest.VTypeE - IL_0129: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_012e: callvirt instance string [mscorlib]System.Object::ToString() - IL_0133: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0138: nop - IL_0139: ldloc.1 - IL_013a: ldarg.0 - IL_013b: ldflda valuetype MCCTest.VTypeE MCCTest.VTypeF::f8 - IL_0140: ldarg.1 - IL_0141: ldc.i4.1 - IL_0142: add - IL_0143: call instance string MCCTest.VTypeE::Dump(int32) - IL_0148: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_014d: nop - IL_014e: ldloc.1 - IL_014f: ldloc.0 - IL_0150: ldstr "[Field f9] [Type '{0}']" - IL_0155: call string [mscorlib]System.String::Concat(string, - string) - IL_015a: ldarg.0 - IL_015b: ldfld valuetype MCCTest.VType8 MCCTest.VTypeF::f9 - IL_0160: box MCCTest.VType8 - IL_0165: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_016a: callvirt instance string [mscorlib]System.Object::ToString() - IL_016f: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0174: nop - IL_0175: ldloc.1 - IL_0176: ldarg.0 - IL_0177: ldflda valuetype MCCTest.VType8 MCCTest.VTypeF::f9 - IL_017c: ldarg.1 - IL_017d: ldc.i4.1 - IL_017e: add - IL_017f: call instance string MCCTest.VType8::Dump(int32) - IL_0184: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0189: nop - IL_018a: ldloc.1 - IL_018b: ldloc.0 - IL_018c: ldstr "[Field f10] [Type '{0}']" - IL_0191: call string [mscorlib]System.String::Concat(string, - string) - IL_0196: ldarg.0 - IL_0197: ldfld valuetype MCCTest.VTypeE MCCTest.VTypeF::f10 - IL_019c: box MCCTest.VTypeE - IL_01a1: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_01a6: callvirt instance string [mscorlib]System.Object::ToString() - IL_01ab: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_01b0: nop - IL_01b1: ldloc.1 - IL_01b2: ldarg.0 - IL_01b3: ldflda valuetype MCCTest.VTypeE MCCTest.VTypeF::f10 - IL_01b8: ldarg.1 - IL_01b9: ldc.i4.1 - IL_01ba: add - IL_01bb: call instance string MCCTest.VTypeE::Dump(int32) - IL_01c0: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_01c5: nop - IL_01c6: ldloc.1 - IL_01c7: ldloc.0 - IL_01c8: ldstr "[Field f11] [Type '{0}']" - IL_01cd: call string [mscorlib]System.String::Concat(string, - string) - IL_01d2: ldarg.0 - IL_01d3: ldfld valuetype MCCTest.VType3 MCCTest.VTypeF::f11 - IL_01d8: box MCCTest.VType3 - IL_01dd: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_01e2: callvirt instance string [mscorlib]System.Object::ToString() - IL_01e7: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_01ec: nop - IL_01ed: ldloc.1 - IL_01ee: ldarg.0 - IL_01ef: ldflda valuetype MCCTest.VType3 MCCTest.VTypeF::f11 - IL_01f4: ldarg.1 - IL_01f5: ldc.i4.1 - IL_01f6: add - IL_01f7: call instance string MCCTest.VType3::Dump(int32) - IL_01fc: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0201: nop - IL_0202: ldloc.1 - IL_0203: ldloc.0 - IL_0204: ldstr "f12 = " - IL_0209: ldarg.0 - IL_020a: ldfld int64 MCCTest.VTypeF::f12 - IL_020f: box [mscorlib]System.Int64 - IL_0214: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0219: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_021e: nop - IL_021f: ldloc.1 - IL_0220: ldloc.0 - IL_0221: ldstr "f13 = " - IL_0226: ldarg.0 - IL_0227: ldfld uint16 MCCTest.VTypeF::f13 - IL_022c: box [mscorlib]System.UInt16 - IL_0231: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0236: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_023b: nop - IL_023c: ldloc.1 - IL_023d: ldloc.0 - IL_023e: ldstr "[Field f14] [Type '{0}']" - IL_0243: call string [mscorlib]System.String::Concat(string, - string) - IL_0248: ldarg.0 - IL_0249: ldfld valuetype MCCTest.VType5 MCCTest.VTypeF::f14 - IL_024e: box MCCTest.VType5 - IL_0253: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0258: callvirt instance string [mscorlib]System.Object::ToString() - IL_025d: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0262: nop - IL_0263: ldloc.1 - IL_0264: ldarg.0 - IL_0265: ldflda valuetype MCCTest.VType5 MCCTest.VTypeF::f14 - IL_026a: ldarg.1 - IL_026b: ldc.i4.1 - IL_026c: add - IL_026d: call instance string MCCTest.VType5::Dump(int32) - IL_0272: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0277: nop - IL_0278: ldloc.1 - IL_0279: ldloc.0 - IL_027a: ldstr "[Field f15] [Type '{0}']" - IL_027f: call string [mscorlib]System.String::Concat(string, - string) - IL_0284: ldarg.0 - IL_0285: ldfld valuetype MCCTest.VType9 MCCTest.VTypeF::f15 - IL_028a: box MCCTest.VType9 - IL_028f: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0294: callvirt instance string [mscorlib]System.Object::ToString() - IL_0299: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_029e: nop - IL_029f: ldloc.1 - IL_02a0: ldarg.0 - IL_02a1: ldflda valuetype MCCTest.VType9 MCCTest.VTypeF::f15 - IL_02a6: ldarg.1 - IL_02a7: ldc.i4.1 - IL_02a8: add - IL_02a9: call instance string MCCTest.VType9::Dump(int32) - IL_02ae: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_02b3: nop - IL_02b4: ldloc.1 - IL_02b5: ldloc.0 - IL_02b6: ldstr "[Field f16] [Type '{0}']" - IL_02bb: call string [mscorlib]System.String::Concat(string, - string) - IL_02c0: ldarg.0 - IL_02c1: ldfld class MCCTest.RType4 MCCTest.VTypeF::f16 - IL_02c6: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_02cb: callvirt instance string [mscorlib]System.Object::ToString() - IL_02d0: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_02d5: nop - IL_02d6: ldloc.1 - IL_02d7: ldarg.0 - IL_02d8: ldfld class MCCTest.RType4 MCCTest.VTypeF::f16 - IL_02dd: ldarg.1 - IL_02de: ldc.i4.1 - IL_02df: add - IL_02e0: callvirt instance string MCCTest.RType4::Dump(int32) - IL_02e5: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_02ea: nop - IL_02eb: ldloc.1 - IL_02ec: ldloc.0 - IL_02ed: ldstr "[Field f17] [Type '{0}']" - IL_02f2: call string [mscorlib]System.String::Concat(string, - string) - IL_02f7: ldarg.0 - IL_02f8: ldfld class MCCTest.RType4 MCCTest.VTypeF::f17 - IL_02fd: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0302: callvirt instance string [mscorlib]System.Object::ToString() - IL_0307: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_030c: nop - IL_030d: ldloc.1 - IL_030e: ldarg.0 - IL_030f: ldfld class MCCTest.RType4 MCCTest.VTypeF::f17 - IL_0314: ldarg.1 - IL_0315: ldc.i4.1 - IL_0316: add - IL_0317: callvirt instance string MCCTest.RType4::Dump(int32) - IL_031c: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0321: nop - IL_0322: ldloc.1 - IL_0323: ldloc.0 - IL_0324: ldstr "f18 = " - IL_0329: ldarg.0 - IL_032a: ldfld int32 MCCTest.VTypeF::f18 - IL_032f: box [mscorlib]System.Int32 - IL_0334: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0339: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_033e: nop - IL_033f: ldloc.1 - IL_0340: ldloc.0 - IL_0341: ldstr "[Field f19] [Type '{0}']" - IL_0346: call string [mscorlib]System.String::Concat(string, - string) - IL_034b: ldarg.0 - IL_034c: ldfld valuetype MCCTest.VType8 MCCTest.VTypeF::f19 - IL_0351: box MCCTest.VType8 - IL_0356: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_035b: callvirt instance string [mscorlib]System.Object::ToString() - IL_0360: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0365: nop - IL_0366: ldloc.1 - IL_0367: ldarg.0 - IL_0368: ldflda valuetype MCCTest.VType8 MCCTest.VTypeF::f19 - IL_036d: ldarg.1 - IL_036e: ldc.i4.1 - IL_036f: add - IL_0370: call instance string MCCTest.VType8::Dump(int32) - IL_0375: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_037a: nop - IL_037b: ldloc.1 - IL_037c: ldloc.0 - IL_037d: ldstr "[Field f20] [Type '{0}']" - IL_0382: call string [mscorlib]System.String::Concat(string, - string) - IL_0387: ldarg.0 - IL_0388: ldfld class MCCTest.RType4 MCCTest.VTypeF::f20 - IL_038d: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0392: callvirt instance string [mscorlib]System.Object::ToString() - IL_0397: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_039c: nop - IL_039d: ldloc.1 - IL_039e: ldarg.0 - IL_039f: ldfld class MCCTest.RType4 MCCTest.VTypeF::f20 - IL_03a4: ldarg.1 - IL_03a5: ldc.i4.1 - IL_03a6: add - IL_03a7: callvirt instance string MCCTest.RType4::Dump(int32) - IL_03ac: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_03b1: nop - IL_03b2: ldloc.1 - IL_03b3: ldloc.0 - IL_03b4: ldstr "[Field f21] [Type '{0}']" - IL_03b9: call string [mscorlib]System.String::Concat(string, - string) - IL_03be: ldarg.0 - IL_03bf: ldfld valuetype MCCTest.VTypeA MCCTest.VTypeF::f21 - IL_03c4: box MCCTest.VTypeA - IL_03c9: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_03ce: callvirt instance string [mscorlib]System.Object::ToString() - IL_03d3: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_03d8: nop - IL_03d9: ldloc.1 - IL_03da: ldarg.0 - IL_03db: ldflda valuetype MCCTest.VTypeA MCCTest.VTypeF::f21 - IL_03e0: ldarg.1 - IL_03e1: ldc.i4.1 - IL_03e2: add - IL_03e3: call instance string MCCTest.VTypeA::Dump(int32) - IL_03e8: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_03ed: nop - IL_03ee: ldloc.1 - IL_03ef: ldloc.0 - IL_03f0: ldstr "[Field f22] [Type '{0}']" - IL_03f5: call string [mscorlib]System.String::Concat(string, - string) - IL_03fa: ldarg.0 - IL_03fb: ldfld valuetype MCCTest.VTypeD MCCTest.VTypeF::f22 - IL_0400: box MCCTest.VTypeD - IL_0405: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_040a: callvirt instance string [mscorlib]System.Object::ToString() - IL_040f: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0414: nop - IL_0415: ldloc.1 - IL_0416: ldarg.0 - IL_0417: ldflda valuetype MCCTest.VTypeD MCCTest.VTypeF::f22 - IL_041c: ldarg.1 - IL_041d: ldc.i4.1 - IL_041e: add - IL_041f: call instance string MCCTest.VTypeD::Dump(int32) - IL_0424: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0429: nop - IL_042a: ldloc.1 - IL_042b: ldloc.0 - IL_042c: ldstr "[Field f23] [Type '{0}']" - IL_0431: call string [mscorlib]System.String::Concat(string, - string) - IL_0436: ldarg.0 - IL_0437: ldfld valuetype MCCTest.VType9 MCCTest.VTypeF::f23 - IL_043c: box MCCTest.VType9 - IL_0441: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0446: callvirt instance string [mscorlib]System.Object::ToString() - IL_044b: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0450: nop - IL_0451: ldloc.1 - IL_0452: ldarg.0 - IL_0453: ldflda valuetype MCCTest.VType9 MCCTest.VTypeF::f23 - IL_0458: ldarg.1 - IL_0459: ldc.i4.1 - IL_045a: add - IL_045b: call instance string MCCTest.VType9::Dump(int32) - IL_0460: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0465: nop - IL_0466: ldloc.1 - IL_0467: ldloc.0 - IL_0468: ldstr "[Field f24] [Type '{0}']" - IL_046d: call string [mscorlib]System.String::Concat(string, - string) - IL_0472: ldarg.0 - IL_0473: ldfld valuetype MCCTest.VTypeE MCCTest.VTypeF::f24 - IL_0478: box MCCTest.VTypeE - IL_047d: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0482: callvirt instance string [mscorlib]System.Object::ToString() - IL_0487: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_048c: nop - IL_048d: ldloc.1 - IL_048e: ldarg.0 - IL_048f: ldflda valuetype MCCTest.VTypeE MCCTest.VTypeF::f24 - IL_0494: ldarg.1 - IL_0495: ldc.i4.1 - IL_0496: add - IL_0497: call instance string MCCTest.VTypeE::Dump(int32) - IL_049c: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_04a1: nop - IL_04a2: ldloc.1 - IL_04a3: ldloc.0 - IL_04a4: ldstr "[Field f25] [Type '{0}']" - IL_04a9: call string [mscorlib]System.String::Concat(string, - string) - IL_04ae: ldarg.0 - IL_04af: ldfld class MCCTest.RType4 MCCTest.VTypeF::f25 - IL_04b4: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_04b9: callvirt instance string [mscorlib]System.Object::ToString() - IL_04be: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_04c3: nop - IL_04c4: ldloc.1 - IL_04c5: ldarg.0 - IL_04c6: ldfld class MCCTest.RType4 MCCTest.VTypeF::f25 - IL_04cb: ldarg.1 - IL_04cc: ldc.i4.1 - IL_04cd: add - IL_04ce: callvirt instance string MCCTest.RType4::Dump(int32) - IL_04d3: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_04d8: nop - IL_04d9: ldloc.1 - IL_04da: ldloc.0 - IL_04db: ldstr "f26 = " - IL_04e0: ldarg.0 - IL_04e1: ldfld float32 MCCTest.VTypeF::f26 - IL_04e6: box [mscorlib]System.Single - IL_04eb: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_04f0: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_04f5: nop - IL_04f6: ldloc.1 - IL_04f7: ldloc.0 - IL_04f8: ldstr "f27 = " - IL_04fd: ldarg.0 - IL_04fe: ldfld uint8 MCCTest.VTypeF::f27 - IL_0503: box [mscorlib]System.Byte - IL_0508: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_050d: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0512: nop - IL_0513: ldloc.1 - IL_0514: ldloc.0 - IL_0515: ldstr "f28 = " - IL_051a: ldarg.0 - IL_051b: ldfld float64 MCCTest.VTypeF::f28 - IL_0520: box [mscorlib]System.Double - IL_0525: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_052a: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_052f: nop - IL_0530: ldloc.1 - IL_0531: ldloc.0 - IL_0532: ldstr "[Field f29] [Type '{0}']" - IL_0537: call string [mscorlib]System.String::Concat(string, - string) - IL_053c: ldarg.0 - IL_053d: ldfld valuetype MCCTest.VTypeC MCCTest.VTypeF::f29 - IL_0542: box MCCTest.VTypeC - IL_0547: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_054c: callvirt instance string [mscorlib]System.Object::ToString() - IL_0551: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0556: nop - IL_0557: ldloc.1 - IL_0558: ldarg.0 - IL_0559: ldflda valuetype MCCTest.VTypeC MCCTest.VTypeF::f29 - IL_055e: ldarg.1 - IL_055f: ldc.i4.1 - IL_0560: add - IL_0561: call instance string MCCTest.VTypeC::Dump(int32) - IL_0566: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_056b: nop - IL_056c: ldloc.1 - IL_056d: ldloc.0 - IL_056e: ldstr "[Field f30] [Type '{0}']" - IL_0573: call string [mscorlib]System.String::Concat(string, - string) - IL_0578: ldarg.0 - IL_0579: ldfld valuetype MCCTest.VType6 MCCTest.VTypeF::f30 - IL_057e: box MCCTest.VType6 - IL_0583: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0588: callvirt instance string [mscorlib]System.Object::ToString() - IL_058d: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0592: nop - IL_0593: ldloc.1 - IL_0594: ldarg.0 - IL_0595: ldflda valuetype MCCTest.VType6 MCCTest.VTypeF::f30 - IL_059a: ldarg.1 - IL_059b: ldc.i4.1 - IL_059c: add - IL_059d: call instance string MCCTest.VType6::Dump(int32) - IL_05a2: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_05a7: nop - IL_05a8: ldloc.1 - IL_05a9: ldloc.0 - IL_05aa: ldstr "f31 = " - IL_05af: ldarg.0 - IL_05b0: ldfld float64 MCCTest.VTypeF::f31 - IL_05b5: box [mscorlib]System.Double - IL_05ba: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_05bf: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_05c4: nop - IL_05c5: ldloc.1 - IL_05c6: ldloc.0 - IL_05c7: ldstr "[Field f32] [Type '{0}']" - IL_05cc: call string [mscorlib]System.String::Concat(string, - string) - IL_05d1: ldarg.0 - IL_05d2: ldfld valuetype MCCTest.VType8 MCCTest.VTypeF::f32 - IL_05d7: box MCCTest.VType8 - IL_05dc: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_05e1: callvirt instance string [mscorlib]System.Object::ToString() - IL_05e6: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_05eb: nop - IL_05ec: ldloc.1 - IL_05ed: ldarg.0 - IL_05ee: ldflda valuetype MCCTest.VType8 MCCTest.VTypeF::f32 - IL_05f3: ldarg.1 - IL_05f4: ldc.i4.1 - IL_05f5: add - IL_05f6: call instance string MCCTest.VType8::Dump(int32) - IL_05fb: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0600: nop - IL_0601: ldloc.1 - IL_0602: ldloc.0 - IL_0603: ldstr "f33 = " - IL_0608: ldarg.0 - IL_0609: ldfld int8 MCCTest.VTypeF::f33 - IL_060e: box [mscorlib]System.SByte - IL_0613: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_0618: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_061d: nop - IL_061e: ldloc.1 - IL_061f: ldloc.0 - IL_0620: ldstr "[Field f34] [Type '{0}']" - IL_0625: call string [mscorlib]System.String::Concat(string, - string) - IL_062a: ldarg.0 - IL_062b: ldfld valuetype MCCTest.VTypeD MCCTest.VTypeF::f34 - IL_0630: box MCCTest.VTypeD - IL_0635: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_063a: callvirt instance string [mscorlib]System.Object::ToString() - IL_063f: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0644: nop - IL_0645: ldloc.1 - IL_0646: ldarg.0 - IL_0647: ldflda valuetype MCCTest.VTypeD MCCTest.VTypeF::f34 - IL_064c: ldarg.1 - IL_064d: ldc.i4.1 - IL_064e: add - IL_064f: call instance string MCCTest.VTypeD::Dump(int32) - IL_0654: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0659: nop - IL_065a: ldloc.1 - IL_065b: ldloc.0 - IL_065c: ldstr "[Field f35] [Type '{0}']" - IL_0661: call string [mscorlib]System.String::Concat(string, - string) - IL_0666: ldarg.0 - IL_0667: ldfld valuetype MCCTest.VTypeE MCCTest.VTypeF::f35 - IL_066c: box MCCTest.VTypeE - IL_0671: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0676: callvirt instance string [mscorlib]System.Object::ToString() - IL_067b: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0680: nop - IL_0681: ldloc.1 - IL_0682: ldarg.0 - IL_0683: ldflda valuetype MCCTest.VTypeE MCCTest.VTypeF::f35 - IL_0688: ldarg.1 - IL_0689: ldc.i4.1 - IL_068a: add - IL_068b: call instance string MCCTest.VTypeE::Dump(int32) - IL_0690: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0695: nop - IL_0696: ldloc.1 - IL_0697: ldloc.0 - IL_0698: ldstr "[Field f36] [Type '{0}']" - IL_069d: call string [mscorlib]System.String::Concat(string, - string) - IL_06a2: ldarg.0 - IL_06a3: ldfld valuetype MCCTest.VTypeE MCCTest.VTypeF::f36 - IL_06a8: box MCCTest.VTypeE - IL_06ad: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_06b2: callvirt instance string [mscorlib]System.Object::ToString() - IL_06b7: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_06bc: nop - IL_06bd: ldloc.1 - IL_06be: ldarg.0 - IL_06bf: ldflda valuetype MCCTest.VTypeE MCCTest.VTypeF::f36 - IL_06c4: ldarg.1 - IL_06c5: ldc.i4.1 - IL_06c6: add - IL_06c7: call instance string MCCTest.VTypeE::Dump(int32) - IL_06cc: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_06d1: nop - IL_06d2: ldloc.1 - IL_06d3: ldloc.0 - IL_06d4: ldstr "[Field f37] [Type '{0}']" - IL_06d9: call string [mscorlib]System.String::Concat(string, - string) - IL_06de: ldarg.0 - IL_06df: ldfld valuetype MCCTest.VType7 MCCTest.VTypeF::f37 - IL_06e4: box MCCTest.VType7 - IL_06e9: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_06ee: callvirt instance string [mscorlib]System.Object::ToString() - IL_06f3: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_06f8: nop - IL_06f9: ldloc.1 - IL_06fa: ldarg.0 - IL_06fb: ldflda valuetype MCCTest.VType7 MCCTest.VTypeF::f37 - IL_0700: ldarg.1 - IL_0701: ldc.i4.1 - IL_0702: add - IL_0703: call instance string MCCTest.VType7::Dump(int32) - IL_0708: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_070d: nop - IL_070e: ldloc.1 - IL_070f: ldloc.0 - IL_0710: ldstr "[Field f38] [Type '{0}']" - IL_0715: call string [mscorlib]System.String::Concat(string, - string) - IL_071a: ldarg.0 - IL_071b: ldfld valuetype MCCTest.VType9 MCCTest.VTypeF::f38 - IL_0720: box MCCTest.VType9 - IL_0725: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_072a: callvirt instance string [mscorlib]System.Object::ToString() - IL_072f: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0734: nop - IL_0735: ldloc.1 - IL_0736: ldarg.0 - IL_0737: ldflda valuetype MCCTest.VType9 MCCTest.VTypeF::f38 - IL_073c: ldarg.1 - IL_073d: ldc.i4.1 - IL_073e: add - IL_073f: call instance string MCCTest.VType9::Dump(int32) - IL_0744: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0749: nop - IL_074a: ldloc.1 - IL_074b: ldloc.0 - IL_074c: ldstr "[Field f39] [Type '{0}']" - IL_0751: call string [mscorlib]System.String::Concat(string, - string) - IL_0756: ldarg.0 - IL_0757: ldfld valuetype MCCTest.VType8 MCCTest.VTypeF::f39 - IL_075c: box MCCTest.VType8 - IL_0761: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0766: callvirt instance string [mscorlib]System.Object::ToString() - IL_076b: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0770: nop - IL_0771: ldloc.1 - IL_0772: ldarg.0 - IL_0773: ldflda valuetype MCCTest.VType8 MCCTest.VTypeF::f39 - IL_0778: ldarg.1 - IL_0779: ldc.i4.1 - IL_077a: add - IL_077b: call instance string MCCTest.VType8::Dump(int32) - IL_0780: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0785: nop - IL_0786: ldloc.1 - IL_0787: ldloc.0 - IL_0788: ldstr "f40 = " - IL_078d: ldarg.0 - IL_078e: ldfld float32 MCCTest.VTypeF::f40 - IL_0793: box [mscorlib]System.Single - IL_0798: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_079d: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_07a2: nop - IL_07a3: ldloc.1 - IL_07a4: ldloc.0 - IL_07a5: ldstr "f41 = " - IL_07aa: ldarg.0 - IL_07ab: ldfld int32 MCCTest.VTypeF::f41 - IL_07b0: box [mscorlib]System.Int32 - IL_07b5: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_07ba: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_07bf: nop - IL_07c0: ldloc.1 - IL_07c1: ldloc.0 - IL_07c2: ldstr "f42 = " - IL_07c7: ldarg.0 - IL_07c8: ldfld char MCCTest.VTypeF::f42 - IL_07cd: box [mscorlib]System.Char - IL_07d2: call string [mscorlib]System.String::Concat(object, - object, - object) - IL_07d7: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_07dc: nop - IL_07dd: ldloc.1 - IL_07de: ldloc.0 - IL_07df: ldstr "[Field f43] [Type '{0}']" - IL_07e4: call string [mscorlib]System.String::Concat(string, - string) - IL_07e9: ldarg.0 - IL_07ea: ldfld valuetype MCCTest.VTypeB MCCTest.VTypeF::f43 - IL_07ef: box MCCTest.VTypeB - IL_07f4: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_07f9: callvirt instance string [mscorlib]System.Object::ToString() - IL_07fe: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_0803: nop - IL_0804: ldloc.1 - IL_0805: ldarg.0 - IL_0806: ldflda valuetype MCCTest.VTypeB MCCTest.VTypeF::f43 - IL_080b: ldarg.1 - IL_080c: ldc.i4.1 - IL_080d: add - IL_080e: call instance string MCCTest.VTypeB::Dump(int32) - IL_0813: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0818: nop - IL_0819: ldloc.1 - IL_081a: ldloc.0 - IL_081b: ldstr "[Field f44] [Type '{0}']" - IL_0820: call string [mscorlib]System.String::Concat(string, - string) - IL_0825: ldarg.0 - IL_0826: ldfld valuetype MCCTest.VType8 MCCTest.VTypeF::f44 - IL_082b: box MCCTest.VType8 - IL_0830: call instance class [mscorlib]System.Type [mscorlib]System.Object::GetType() - IL_0835: callvirt instance string [mscorlib]System.Object::ToString() - IL_083a: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string, - object) - IL_083f: nop - IL_0840: ldloc.1 - IL_0841: ldarg.0 - IL_0842: ldflda valuetype MCCTest.VType8 MCCTest.VTypeF::f44 - IL_0847: ldarg.1 - IL_0848: ldc.i4.1 - IL_0849: add - IL_084a: call instance string MCCTest.VType8::Dump(int32) - IL_084f: callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string) - IL_0854: nop - IL_0855: ldloc.1 - IL_0856: callvirt instance string [mscorlib]System.Object::ToString() - IL_085b: stloc.2 - IL_085c: br.s IL_085e - - IL_085e: ldloc.2 - IL_085f: ret - } // end of method VTypeF::Dump - - .method public hidebysig instance string - Dump() cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldc.i4.0 - IL_0003: call instance string MCCTest.VTypeF::Dump(int32) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method VTypeF::Dump - -} // end of class MCCTest.VTypeF - -.class public auto ansi beforefieldinit MCCTest.Common - extends [mscorlib]System.Object -{ - .method public hidebysig static int32 CheckResult(valuetype MCCTest.VType0 actual, - int32 count) cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldarg.1 - IL_0003: call int32 class MCCTest.Common2`1::CheckResult(!0, - int32) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method Common::CheckResult - - .method public hidebysig static int32 CheckResult(valuetype MCCTest.VType1 actual, - int32 count) cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldarg.1 - IL_0003: call int32 class MCCTest.Common2`1::CheckResult(!0, - int32) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method Common::CheckResult - - .method public hidebysig static int32 CheckResult(valuetype MCCTest.VType2 actual, - int32 count) cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldarg.1 - IL_0003: call int32 class MCCTest.Common2`1::CheckResult(!0, - int32) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method Common::CheckResult - - .method public hidebysig static int32 CheckResult(valuetype MCCTest.VType3 actual, - int32 count) cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldarg.1 - IL_0003: call int32 class MCCTest.Common2`1::CheckResult(!0, - int32) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method Common::CheckResult - - .method public hidebysig static int32 CheckResult(class MCCTest.RType4 actual, - int32 count) cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldarg.1 - IL_0003: call int32 class MCCTest.Common2`1::CheckResult(!0, - int32) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method Common::CheckResult - - .method public hidebysig static int32 CheckResult(valuetype MCCTest.VType5 actual, - int32 count) cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldarg.1 - IL_0003: call int32 class MCCTest.Common2`1::CheckResult(!0, - int32) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method Common::CheckResult - - .method public hidebysig static int32 CheckResult(valuetype MCCTest.VType6 actual, - int32 count) cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldarg.1 - IL_0003: call int32 class MCCTest.Common2`1::CheckResult(!0, - int32) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method Common::CheckResult - - .method public hidebysig static int32 CheckResult(valuetype MCCTest.VType7 actual, - int32 count) cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldarg.1 - IL_0003: call int32 class MCCTest.Common2`1::CheckResult(!0, - int32) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method Common::CheckResult - - .method public hidebysig static int32 CheckResult(valuetype MCCTest.VType8 actual, - int32 count) cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldarg.1 - IL_0003: call int32 class MCCTest.Common2`1::CheckResult(!0, - int32) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method Common::CheckResult - - .method public hidebysig static int32 CheckResult(valuetype MCCTest.VType9 actual, - int32 count) cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldarg.1 - IL_0003: call int32 class MCCTest.Common2`1::CheckResult(!0, - int32) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method Common::CheckResult - - .method public hidebysig static int32 CheckResult(valuetype MCCTest.VTypeA actual, - int32 count) cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldarg.1 - IL_0003: call int32 class MCCTest.Common2`1::CheckResult(!0, - int32) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method Common::CheckResult - - .method public hidebysig static int32 CheckResult(valuetype MCCTest.VTypeB actual, - int32 count) cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldarg.1 - IL_0003: call int32 class MCCTest.Common2`1::CheckResult(!0, - int32) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method Common::CheckResult - - .method public hidebysig static int32 CheckResult(valuetype MCCTest.VTypeC actual, - int32 count) cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldarg.1 - IL_0003: call int32 class MCCTest.Common2`1::CheckResult(!0, - int32) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method Common::CheckResult - - .method public hidebysig static int32 CheckResult(valuetype MCCTest.VTypeD actual, - int32 count) cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldarg.1 - IL_0003: call int32 class MCCTest.Common2`1::CheckResult(!0, - int32) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method Common::CheckResult - - .method public hidebysig static int32 CheckResult(valuetype MCCTest.VTypeE actual, - int32 count) cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldarg.1 - IL_0003: call int32 class MCCTest.Common2`1::CheckResult(!0, - int32) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method Common::CheckResult - - .method public hidebysig static int32 CheckResult(valuetype MCCTest.VTypeF actual, - int32 count) cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldarg.1 - IL_0003: call int32 class MCCTest.Common2`1::CheckResult(!0, - int32) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method Common::CheckResult - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method Common::.ctor - -} // end of class MCCTest.Common - -.class public auto ansi beforefieldinit MCCTest.Common2`1<.ctor (class MCCTest.CType`1) T> - extends [mscorlib]System.Object -{ - .field private static literal int32 SUCC_RET_CODE = int32(0x00000064) - .field private static literal int32 FAIL_RET_CODE = int32(0x00000001) - .method public hidebysig static int32 CheckResult(!T actual, - int32 count) cil managed - { - // Code size 121 (0x79) - .maxstack 2 - .locals init (int32 V_0, - !T V_1, - class MCCTest.ResultVerificationException V_2, - int32 V_3, - !T V_4) - IL_0000: nop - IL_0001: ldc.i4.1 - IL_0002: stloc.0 - .try - { - IL_0003: nop - IL_0004: ldloca.s V_4 - IL_0006: initobj !T - IL_000c: ldloc.s V_4 - IL_000e: box !T - IL_0013: brfalse.s IL_0021 - - IL_0015: ldloca.s V_4 - IL_0017: initobj !T - IL_001d: ldloc.s V_4 - IL_001f: br.s IL_0026 - - IL_0021: call !!0 [mscorlib]System.Activator::CreateInstance() - IL_0026: stloc.1 - IL_0027: ldloca.s V_1 - IL_0029: ldarg.1 - IL_002a: constrained. !T - IL_0030: callvirt instance void class MCCTest.CType`1::Init(int32) - IL_0035: nop - IL_0036: ldarga.s actual - IL_0038: ldloc.1 - IL_0039: constrained. !T - IL_003f: callvirt instance void class MCCTest.CType`1::Check(!0) - IL_0044: nop - IL_0045: ldstr "PASSED" - IL_004a: call void [mscorlib]System.Console::WriteLine(string) - IL_004f: nop - IL_0050: ldc.i4.s 100 - IL_0052: stloc.0 - IL_0053: nop - IL_0054: leave.s IL_0072 - - } // end .try - catch MCCTest.ResultVerificationException - { - IL_0056: stloc.2 - IL_0057: nop - IL_0058: ldloc.2 - IL_0059: callvirt instance string MCCTest.ResultVerificationException::GetMessage() - IL_005e: call void [mscorlib]System.Console::WriteLine(string) - IL_0063: nop - IL_0064: ldstr "FAILED" - IL_0069: call void [mscorlib]System.Console::WriteLine(string) - IL_006e: nop - IL_006f: nop - IL_0070: leave.s IL_0072 - - } // end handler - IL_0072: nop - IL_0073: ldloc.0 - IL_0074: stloc.3 - IL_0075: br.s IL_0077 - - IL_0077: ldloc.3 - IL_0078: ret - } // end of method Common2`1::CheckResult - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method Common2`1::.ctor - -} // end of class MCCTest.Common2`1 - - -// ============================================================= - -.custom ([mscorlib]System.Runtime.CompilerServices.AssemblyAttributesGoHere) instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/src/coreclr/tests/src/JIT/jit64/opt/cg/il/jmp.il b/src/coreclr/tests/src/JIT/jit64/opt/cg/il/jmp.il deleted file mode 100644 index ab2e9a727891..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/opt/cg/il/jmp.il +++ /dev/null @@ -1,38 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - -.assembly 'jmp' { - //This byte field requests that this assembly not be verified at run time and corresponds to this C# declaration: - //[assembly:System.Security.Permissions.SecurityPermissionAttribute( [mscorlib]System.Security.Permissions.SecurityAction.RequestMinimum, Flags=System.Security.Permissions.SecurityPermissionFlag.SkipVerification )] -} - -.method public static int32 main(class [mscorlib]System.String[]) { -.entrypoint -.locals () -.maxstack 2 - jmp int32 _jmp::jmpTest(class [mscorlib]System.String[]) - ldc.i4 0x0 - ret -} - -.class public _jmp { -.method public void _jmp() { -.maxstack 4 - ret -} - -.method public static int32 jmpTest(class [mscorlib]System.String[]) { -.maxstack 4 - ldc.i4 100 - ret -} - -} diff --git a/src/coreclr/tests/src/JIT/jit64/opt/cg/il/ldftn.il b/src/coreclr/tests/src/JIT/jit64/opt/cg/il/ldftn.il deleted file mode 100644 index 60e8fca321fd..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/opt/cg/il/ldftn.il +++ /dev/null @@ -1,33 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly Test{} - -.method public static int32 Foo() -{ - ldc.i4 100 - ret -} - -.class Test -{ -.method public static int32 main() -{ - .entrypoint - .locals init (int32 V_0) - ldc.i4 101 - stloc.0 - ldftn int32 Foo() - calli int32() - stloc.0 - ldloc.0 - ret -} -} diff --git a/src/coreclr/tests/src/JIT/jit64/opt/cse/HugeField2.csproj b/src/coreclr/tests/src/JIT/jit64/opt/cse/HugeField2.csproj deleted file mode 100644 index 7b65b5d95c17..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/opt/cse/HugeField2.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - Exe - true - 1 - - - Full - False - - - - - diff --git a/src/coreclr/tests/src/JIT/jit64/opt/cse/hugeexpr1.csproj b/src/coreclr/tests/src/JIT/jit64/opt/cse/hugeexpr1.csproj deleted file mode 100644 index 93c4af161f9d..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/opt/cse/hugeexpr1.csproj +++ /dev/null @@ -1,17 +0,0 @@ - - - Exe - true - 1 - - - Full - True - - true - - - - - diff --git a/src/coreclr/tests/src/JIT/jit64/opt/regress/vswhidbey/193825/repro.cs b/src/coreclr/tests/src/JIT/jit64/opt/regress/vswhidbey/193825/repro.cs deleted file mode 100644 index 8784e7d4bc52..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/opt/regress/vswhidbey/193825/repro.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - - -public unsafe class T -{ - public static int Main() - { - if (Bug() == "0") return 100; - - return 1; - } - public static string Bug() - { - int maxSize, sizeInt, sizeFract; - - sizeInt = return_int(false, 0); - sizeFract = return_int(false, 1) - return_int(false, -2); - - maxSize = sizeInt + sizeFract + 4; - - char* pBuf = stackalloc char[maxSize]; - char* pch = pBuf; - - *pch++ = '0'; - return new string(pBuf, 0, (int)(pch - pBuf)); - } - private static int return_int(bool verbose, int input) - { - int ans; - - try - { - ans = input; - } - finally - { - if (verbose) - { - Console.WriteLine("returning : ans"); - } - } - return ans; - } -} diff --git a/src/coreclr/tests/src/JIT/jit64/opt/regress/vswhidbey/223862/bne.il b/src/coreclr/tests/src/JIT/jit64/opt/regress/vswhidbey/223862/bne.il deleted file mode 100644 index 8309f015fa18..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/opt/regress/vswhidbey/223862/bne.il +++ /dev/null @@ -1,38 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - -.assembly cprop_test {} -.assembly extern mscorlib{auto} -.class cprop_test { -.method static int32 Main() { -.entrypoint -.maxstack 5 - - ldc.i4.2 - ldc.i4.0 - ldc.i4.2 - sub - dup - call void [System.Console]System.Console::WriteLine(int32) - - -bne.un IL_01 -// this is to make the errorlevel 100 if the answer is right ( ie 0) -IL_02: - ldc.i4 1 - ret -IL_01: - ldstr "pass" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4 100 - - ret -} -} diff --git a/src/coreclr/tests/src/JIT/jit64/opt/regress/vswhidbey/223862/conv.il b/src/coreclr/tests/src/JIT/jit64/opt/regress/vswhidbey/223862/conv.il deleted file mode 100644 index 8e238dbb3e44..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/opt/regress/vswhidbey/223862/conv.il +++ /dev/null @@ -1,52 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - -.assembly Class_test {} -.assembly extern mscorlib{auto} -.class Class_test { -.method static int32 Main() { -.entrypoint -.maxstack 5 - - .try - { - -// ldc.i4.2 - ldc.i4.0 - ldc.i4.2 - sub - dup - call void [System.Console]System.Console::WriteLine(int32) - - - - -conv.ovf.i1.un - call void [System.Console]System.Console::WriteLine(int32) -IL_000c: leave.s IL_02 - } - catch [mscorlib]System.OverflowException - { - pop - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - leave IL_01 - } - -// this is to make the errorlevel 100 if the answer is right ( ie 0) -IL_02: - ldc.i4 1 - ret -IL_01: - ldc.i4 100 - - ret -} -} diff --git a/src/coreclr/tests/src/JIT/jit64/opt/regress/vswhidbey/223862/div.il b/src/coreclr/tests/src/JIT/jit64/opt/regress/vswhidbey/223862/div.il deleted file mode 100644 index b8a6d9b5c92f..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/opt/regress/vswhidbey/223862/div.il +++ /dev/null @@ -1,35 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - -.assembly cprop_test {} -.assembly extern mscorlib{auto} -.class cprop_test { -.method static int32 Main() { -.entrypoint -.maxstack 5 - ldc.i4.7 - ldc.i4.0 - ldc.i4.2 - sub - dup - call void [System.Console]System.Console::WriteLine(int32) - -// the problem is when the divisor is negative and is a power of two - - div.un - dup - call void [System.Console]System.Console::WriteLine(int32) - -// this is to make the errorlevel 100 if the answer is right ( ie 0) - ldc.i4 100 - add - ret -} -} diff --git a/src/coreclr/tests/src/JIT/jit64/opt/regress/vswhidbey/223862/rem.il b/src/coreclr/tests/src/JIT/jit64/opt/regress/vswhidbey/223862/rem.il deleted file mode 100644 index 2f9b12a13d9b..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/opt/regress/vswhidbey/223862/rem.il +++ /dev/null @@ -1,35 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - -.assembly cprop_test {} -.assembly extern mscorlib{auto} -.class cprop_test { -.method static int32 Main() { -.entrypoint -.maxstack 5 - ldc.i4.7 - ldc.i4.0 - ldc.i4.2 - sub - dup - call void [System.Console]System.Console::WriteLine(int32) - -// the problem is when the divisor is negative and is a power of two - - rem.un - dup - call void [System.Console]System.Console::WriteLine(int32) - -// this is to make the errorlevel 100 if the answer is right ( ie 7) - ldc.i4 93 - add - ret -} -} diff --git a/src/coreclr/tests/src/JIT/jit64/opt/regress/vswhidbey/228572/conv.il b/src/coreclr/tests/src/JIT/jit64/opt/regress/vswhidbey/228572/conv.il deleted file mode 100644 index 6f041bbf11e7..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/opt/regress/vswhidbey/228572/conv.il +++ /dev/null @@ -1,66 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - -.assembly Conv_test {} -.assembly extern mscorlib{auto} -.class Conv_test { -.method static int32 Main_test() { -.maxstack 5 - -// ldc.i4.2 - ldc.i4.0 - ldc.i4.2 - sub - dup - call void [System.Console]System.Console::WriteLine(int32) - - - - -conv.ovf.i1.un - call void [System.Console]System.Console::WriteLine(int32) - -// this is to make the errorlevel 100 if the answer is right ( ie 0) -IL_02: - ldc.i4 1 - ret -IL_01: - ldstr "pass" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4 100 - - ret -} -.method static int32 Main() { -.entrypoint -.maxstack 5 - .try - { - call int32 Conv_test::Main_test() - pop - leave.s failed - } - catch [mscorlib]System.OverflowException - { - IL_0023: leave.s passed - } -failed: - ldstr "failed" - call void [System.Console]System.Console::WriteLine(string) - - ldc.i4.1 - ret -passed: - ldstr "Passed" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4 100 - ret -} -} diff --git a/src/coreclr/tests/src/JIT/jit64/regress/ndpw/160545/simple.cs b/src/coreclr/tests/src/JIT/jit64/regress/ndpw/160545/simple.cs deleted file mode 100644 index 6a205af45a63..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/regress/ndpw/160545/simple.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -public struct T : IComparable -{ - public int x; - public int y; - public int z; - public T(int ix, int iy, int iz) - { - x = ix; - y = iy; - z = iz; - } - public int CompareTo(object b) - { - if (b is T) - { - T temp = (T)b; - if (temp.x != x) return 1; - if (temp.y != y) return 1; - if (temp.z != z) return 1; - } - return 0; - } -} - -internal class foo -{ - public static int Main() - { - bar b = new bar(); - return b.test(new T(1, 2, 3)); - } -} - -internal class bar where B : System.IComparable -{ - private B[] _array; - - public bar() - { - _array = new B[100]; - } - - public int test(B t) - { - _array[1] = t; - if (t.CompareTo(_array[1]) != 0) - return -1; - return 100; - } -} - diff --git a/src/coreclr/tests/src/JIT/jit64/regress/phoenix/62322/test.il b/src/coreclr/tests/src/JIT/jit64/regress/phoenix/62322/test.il deleted file mode 100644 index db9e495d6152..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/regress/phoenix/62322/test.il +++ /dev/null @@ -1,177 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - - - - - -// Metadata version: v2.0.50523 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 2:0:0:0 -} -.assembly b441487 -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module b441487.exe -// MVID: {9AF9288D-3BE9-4952-AFD0-E77098E2DD26} -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x0000000003500000 - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class public auto ansi beforefieldinit Test.Widget`1 - extends [mscorlib]System.Object -{ - .method public hidebysig instance void - Foo() cil managed noinlining - { - // Code size 24 (0x18) - .maxstack 8 - IL_0000: nop - IL_0001: ldstr "Foo" - IL_0006: call void [System.Console]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldnull - IL_000d: starg 0 - IL_0011: call void class Test.Widget`1::Hello() // Here was the exception: System.NullReferenceException: Object reference not set to an instance of an object - IL_0016: nop - IL_0017: ret - } // end of method Widget`1::Foo - - .method public hidebysig static void Hello() cil managed noinlining - { - // Code size 1 (0x1) - .maxstack 8 - IL_0000: ret - } // end of method Widget`1::Hello - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method Widget`1::.ctor - -} // end of class Test.Widget`1 - -.class public abstract auto ansi sealed beforefieldinit Test.Program - extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main(string[] args) cil managed - { - .entrypoint - // Code size 51 (0x33) - .maxstack 2 - .locals init (int32 V_0, - int32 V_1, - bool V_2) - IL_0000: nop - IL_0001: ldc.i4.0 - IL_0002: stloc.0 - IL_0003: call int32 Test.Program::RunTests() - IL_0008: ldc.i4.0 - IL_0009: ceq - IL_000b: stloc.2 - IL_000c: ldloc.2 - IL_000d: brtrue.s IL_0020 - - IL_000f: nop - IL_0010: ldstr "Test FAILED" - IL_0015: call void [System.Console]System.Console::WriteLine(string) - IL_001a: nop - IL_001b: ldc.i4.s 101 - IL_001d: stloc.1 - IL_001e: br.s IL_0031 - - IL_0020: nop - IL_0021: ldstr "Test SUCCESS" - IL_0026: call void [System.Console]System.Console::WriteLine(string) - IL_002b: nop - IL_002c: ldc.i4.s 100 - IL_002e: stloc.1 - IL_002f: br.s IL_0031 - - IL_0031: ldloc.1 - IL_0032: ret - } // end of method Program::Main - - .method private hidebysig static int32 - RunTests() cil managed noinlining - { - // Code size 83 (0x53) - .maxstack 2 - .locals init (int32 V_0, - class [mscorlib]System.NullReferenceException V_1, - int32 V_2) - IL_0000: nop - IL_0001: ldstr "Running tests for {0}" - IL_0006: ldtoken !!T - IL_000b: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_0010: call void [System.Console]System.Console::WriteLine(string, - object) - IL_0015: nop - IL_0016: ldc.i4.0 - IL_0017: stloc.0 - IL_0018: nop - IL_0019: newobj instance void class Test.Widget`1::.ctor() - IL_001e: call instance void class Test.Widget`1::Foo() - IL_0023: nop - IL_0024: nop - IL_0025: leave.s IL_004c - - IL_0027: stloc.1 - IL_0028: nop - IL_0029: ldstr "Widget<{0}>.Foo() failed" - IL_002e: ldtoken !!T - IL_0033: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_0038: call void [System.Console]System.Console::WriteLine(string, - object) - IL_003d: nop - IL_003e: ldloc.1 - IL_003f: call void [System.Console]System.Console::WriteLine(object) - IL_0044: nop - IL_0045: ldloc.0 - IL_0046: ldc.i4.1 - IL_0047: add - IL_0048: stloc.0 - IL_0049: nop - IL_004a: leave.s IL_004c - - IL_004c: nop - IL_004d: ldloc.0 - IL_004e: stloc.2 - IL_004f: br.s IL_0051 - - IL_0051: ldloc.2 - IL_0052: ret - IL_0053: - // Exception count 1 - .try IL_0018 to IL_0027 catch [mscorlib]System.NullReferenceException handler IL_0027 to IL_004c - } // end of method Program::RunTests - -} // end of class Test.Program - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/src/coreclr/tests/src/JIT/jit64/regress/vsw/102754/test1.il b/src/coreclr/tests/src/JIT/jit64/regress/vsw/102754/test1.il deleted file mode 100644 index 6797daa37932..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/regress/vsw/102754/test1.il +++ /dev/null @@ -1,90 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - - - - - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly extern legacy library mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) - .hash = (34 49 DD 73 C6 4A 4D D1 3C F6 93 9D DA 59 9C EF - 01 2A 9C E3 ) - -} -.assembly legacy library hello -{ - - - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module hello.exe -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 -.corflags 0x00000001 - - - -.namespace hello -{ - .class private auto ansi beforefieldinit Class1 - extends [mscorlib]System.Object - { - .method public hidebysig static int32 - Main() cil managed - { - .entrypoint - .maxstack 2 - .locals (int64* V_0, - int64 V_1, - int32 V_2) - IL_0000: ldc.i4.0 - IL_0001: conv.i8 - IL_0002: stloc.1 - IL_0003: ldloca.s V_1 - IL_0005: stloc.0 - IL_0006: ldloc.0 - IL_0007: ldc.i4 0x1 - IL_000c: conv.i - - IL_000d: add - IL_000e: ldc.i4 0x1111 - IL_0010: conv.i4 - - unaligned. 1 - IL_0011: stind.i4 - IL_0012: ldloc.1 - IL_0013: call void [System.Console]System.Console::WriteLine(int64) - IL_0018: ldloc.1 - IL_0019: conv.i4 - IL_001a: ldc.i4 0x111100 - IL_001f: sub - IL_0020: stloc.2 - IL_0021: br.s IL_0023 - IL_0023: ldloc.2 - IL_0024: ret - } - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } - - } - -} diff --git a/src/coreclr/tests/src/JIT/jit64/regress/vsw/102964/test.cs b/src/coreclr/tests/src/JIT/jit64/regress/vsw/102964/test.cs deleted file mode 100644 index 43171be49604..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/regress/vsw/102964/test.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections; -using System.Runtime.InteropServices; - -public enum TestEnum -{ - red = 1, - green = 2, - blue = 4, -} - -public struct AA -{ - public Array[] m_axField1; - public char[,,] m_achField2; - public bool[,][][,] m_abField3; - public static ushort m_ushStatic1; - public TestEnum Method4() - { - return TestEnum.blue; - } -} - - -public class App -{ - public static AA m_xStatic1 = new AA(); - public static AA m_xStatic2 = new AA(); - private static int Main() - { - try - { - Console.WriteLine("Testing AA::Method4"); - (m_xStatic1 = m_xStatic1).Method4(); - } - catch (Exception x) - { - Console.WriteLine("Exception handled: " + x.ToString()); - return 1; - } - Console.WriteLine("Passed."); - return 100; - } -} diff --git a/src/coreclr/tests/src/JIT/jit64/regress/vsw/102974/test.il b/src/coreclr/tests/src/JIT/jit64/regress/vsw/102974/test.il deleted file mode 100644 index f7fd37b76b89..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/regress/vsw/102974/test.il +++ /dev/null @@ -1,89 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - -// This test was failing due to a bug that existed when we were first bringing up GC on amd64. Probably won't fail -// anytime soon, but a good case to have. - -.assembly extern mscorlib{} -.assembly test{} - -.class public auto ansi beforefieldinit Test - extends [mscorlib]System.Object -{ - .class auto ansi nested public beforefieldinit Dummy - extends [mscorlib]System.Object - { - .field public static bool visited - .method family hidebysig virtual instance void Finalize() cil managed - { - .try - { - ldstr "In Finalize() of Dummy" - call void [System.Console]System.Console::WriteLine(string) - leave.s IL_0019 - - } - finally - { - ldarg.0 - call instance void [mscorlib]System.Object::Finalize() - endfinally - } - IL_0019: ret - } - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret - } - - } - - .field public static int32 count - .method public hidebysig static void foo(object o) cil managed - { - ldsfld int32 Test::count - ldc.i4.s 2 - bne.un.s IL_0010 - br.s IL_0041 - - - IL_0010: ldsfld int32 Test::count - - call void [System.Console]System.Console::WriteLine(int32) - ldsfld int32 Test::count - ldc.i4.1 - add - stsfld int32 Test::count - call void [mscorlib]System.GC::Collect() - call void [mscorlib]System.GC::WaitForPendingFinalizers() - ldarg.0 - call void Test::foo(object) - IL_0041: ret - } - - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - .locals init (class Test/Dummy V_0) - newobj instance void Test/Dummy::.ctor() - stloc.0 - ldloc.0 - call void Test::foo(object) - ldstr "After call to foo()" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4 100 - ret - } -} diff --git a/src/coreclr/tests/src/JIT/jit64/regress/vsw/153682/test.il b/src/coreclr/tests/src/JIT/jit64/regress/vsw/153682/test.il deleted file mode 100644 index ca2bd369e0ac..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/regress/vsw/153682/test.il +++ /dev/null @@ -1,58 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// The first use of a field in a catch was causing an exception in the CLR because -// one of the argument registers for JitHelper::WriteBarrier was not being -// mov'ed to. - -.assembly extern legacy library mscorlib {} -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly legacy library test {} - -.class auto ansi sealed public save extends [mscorlib]System.Object -{ - .field public static class [mscorlib]System.Exception bb - .method private specialname rtspecialname static - void .cctor() cil managed - { - ret - } -} - -.class public auto ansi sealed a extends [mscorlib]System.Object -{ - - .method public static int32 a() cil managed - { - .entrypoint - .try - { - ldstr "VeryBadException" - newobj instance void [mscorlib]System.Exception::.ctor(string) - throw - leave IL_0027 - } - - catch [mscorlib]System.Exception - { - - IL_000e: stsfld class [mscorlib]System.Exception save::bb - IL_0013: ldsfld class [mscorlib]System.Exception save::bb - - - IL_0018: callvirt instance string [mscorlib]System.Exception::get_Message() - IL_001d: call void [System.Console]System.Console::WriteLine(string) - - IL_0022: leave IL_0027 - - } - - IL_0027: ldc.i4 100 - ret - } -} diff --git a/src/coreclr/tests/src/JIT/jit64/regress/vsw/266693/test.il b/src/coreclr/tests/src/JIT/jit64/regress/vsw/266693/test.il deleted file mode 100644 index b40c2652d012..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/regress/vsw/266693/test.il +++ /dev/null @@ -1,89 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// These are just sanity checks for the CorInfoInlineRestrictions to make sure that nothing in the jit breaks -// when we are prevented from inlining something. - -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly test {} -.module test.il - -.class private auto ansi beforefieldinit Test - extends [mscorlib]System.Object -{ - .field static int32 i - - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret - } - - .method public hidebysig static string myString() cil managed - { - ldstr "foo" - ret - } - - .method public hidebysig static void myHelperCall() cil managed - { - call void Test::myCall() - ret - } - - .method public hidebysig static void myCall() cil managed - { - ldc.i4.0 - ldc.i4.1 - add - pop - ldsfld int32 Test::i - ldc.i4.0 - beq End - ldsfld int32 Test::i - ldc.i4.1 - sub - stsfld int32 Test::i - call void Test::myHelperCall() - End: ret - } - - .method public hidebysig instance int32 func() cil managed - { - ldc.i4.3 - ret - } - - .method public hidebysig instance void this() cil managed - { - newobj instance void Test::.ctor() - call instance int32 Test::func() - pop - ret - } - - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - .locals init (class Test V_0) - ldc.i4 10 - stsfld int32 Test::i - call void Test::myCall() - newobj instance void Test::.ctor() - stloc V_0 - ldloc V_0 - call instance int32 Test::func() - pop - call string Test::myString() - call void [System.Console]System.Console::WriteLine(string) - ldc.i4 100 - ret - } -} diff --git a/src/coreclr/tests/src/JIT/jit64/regress/vsw/286991/test.il b/src/coreclr/tests/src/JIT/jit64/regress/vsw/286991/test.il deleted file mode 100644 index 0820de047df4..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/regress/vsw/286991/test.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. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.assembly test {} - -.method public static int32 Main() -{ - -.entrypoint - - ldc.i4 0x40 - call int32 isupper(int32) - ldc.i4 100 - add - ret -} - -.method public static pinvokeimpl("msvcrt.dll" cdecl) - int32 isupper(int32) cil managed preservesig -{ - .custom instance void [mscorlib]System.Security.SuppressUnmanagedCodeSecurityAttribute::.ctor() = ( 01 00 00 00 ) - -} diff --git a/src/coreclr/tests/src/JIT/jit64/regress/vsw/329169/test.cs b/src/coreclr/tests/src/JIT/jit64/regress/vsw/329169/test.cs deleted file mode 100644 index 354bae1efe64..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/regress/vsw/329169/test.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// Regression test for consecutive compare optimization. - -using System; -internal class Foo -{ - public static int Main() - { - string s1 = "NonNull"; - string s2 = null; - - if ((s1 == null) == (s2 == null)) - { - Console.WriteLine("Fail"); - return 1; - } - else - { - Console.WriteLine("Pass"); - return 100; - } - } -} diff --git a/src/coreclr/tests/src/JIT/jit64/regress/vsw/333007/test1.il b/src/coreclr/tests/src/JIT/jit64/regress/vsw/333007/test1.il deleted file mode 100644 index ad0632769564..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/regress/vsw/333007/test1.il +++ /dev/null @@ -1,122 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - - - - - - - - - - - -// Metadata version: v2.0.40621 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 2:0:3600:0 -} -.assembly foo -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module foo.exe -// MVID: {13BD850E-1B6A-467D-8081-5F9C3901672A} -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x0000000003300000 - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class public auto ansi beforefieldinit Test - extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - // Code size 22 (0x16) - .maxstack 8 - - IL_0000: ldc.i4.0 - IL_0001: call int32 Test::sw(int32) - IL_0006: pop - - IL_0007: ldc.i4.0 - IL_0008: call int32 Test::sw(int32) - - IL_00ff: ldc.i4 100 - IL_0100: bne.un FAIL - - ldstr "PASS" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4 100 - IL_0015: ret - - FAIL: - ldstr "FAIL" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.1 - IL_000d: ret - - } // end of method Test::Main - - .method public hidebysig static int32 sw(int32 x) cil managed - { - // Code size 65 (0x41) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: ldarg.0 - IL_0001: stloc.0 - IL_0002: ldloc.0 - IL_0003: ldc.i4.3 - IL_0004: sub - IL_0009: switch ( - IL_0037, - IL_0037) - - IL_001a: ldloc.0 - IL_001b: ldc.i4.s 13 - IL_001d: sub - IL_0022: switch ( - IL_0037, - IL_0037) - IL_002f: br.s IL_003b - - IL_0037: ldc.i4.1 - ret - - IL_003b: ldc.i4 100 - ret - } // end of method Test::sw - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method Test::.ctor - -} // end of class Test - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file foo.res diff --git a/src/coreclr/tests/src/JIT/jit64/regress/vsw/336666/test1.il b/src/coreclr/tests/src/JIT/jit64/regress/vsw/336666/test1.il deleted file mode 100644 index 9d908a490969..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/regress/vsw/336666/test1.il +++ /dev/null @@ -1,71 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - - - - - - - - -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 2:0:3600:0 -} - -.assembly foo {} -.module foo.exe - - -// We inline the call chain foo()->Throw(). This causes the DFS reader -// to screw up when trying to maintain the operand stack between inlined -// methods. - - - - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - ldc.i4 100 - ldstr "PASS" - - // Value is live across this call - entire call chain should be inlined - call void foo() - - - call void [System.Console]System.Console::WriteLine(string) - ret - } - - - - // This call should be inlined. - .field public static int32 x - .method public hidebysig static void foo() cil managed - { - ldsfld int32 x - brfalse.s NO_THROW - - call void Throw() - - NO_THROW: - ret - } - - - - // This call should be inlined. - .method public hidebysig static void Throw() cil managed - { - newobj instance void [mscorlib]System.Exception::.ctor() - throw - } diff --git a/src/coreclr/tests/src/JIT/jit64/regress/vsw/373472/test.cs b/src/coreclr/tests/src/JIT/jit64/regress/vsw/373472/test.cs deleted file mode 100644 index 47d9b5388257..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/regress/vsw/373472/test.cs +++ /dev/null @@ -1,148 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -// This test is used to try out very large decrementing loop strides. The strides cannot be negated if the integer -// is too large. For example, a stride of 0xA0000000 cannot be turned into a signed number. For the most -// part, other things prevent us from getting to OSR with a condition like this but it's good to have -// coverage for large strides. - -public class StrideTest -{ - public static int Main() - { - bool pass = true; - pass &= Test1(); - pass &= Test2(); - pass &= Test3(); - - return (pass ? 100 : 1); - } - - public static bool Test1() - { - try - { - uint[] array = new uint[0x8ffffff]; - for (uint i = 0x8fffffe; true; i -= 0xa0000001) - { - array[i] = 40; - } - } - catch (IndexOutOfRangeException) - { - return true; - } - catch (Exception e) - { - Console.WriteLine("test1 exception: {0}", e.ToString()); - } - - Console.WriteLine("Test1 failed"); - return false; - } - - public static bool Test2() - { - try - { - uint[] array = new uint[0x8ffffff]; - for (uint i = 0; true; i -= 0xa0a0a0a0) - { - array[i] = i; - } - } - catch (IndexOutOfRangeException) - { - return true; - } - catch (Exception e) - { - Console.WriteLine("test2 exception: {0}", e.ToString()); - } - - Console.WriteLine("Test2 failed"); - return false; - } - - public static bool Test3() - { - try - { - int[] array = new int[0x8ffffff]; - for (long i = 0x8ffffffL - 1; i > 0x8ffffffL - 0xa0a0a0a0L - 1000; i -= 0xa0a0a0a0L) - { - array[i] = (int)i; - } - } - catch (IndexOutOfRangeException) - { - return true; - } - catch (OverflowException) - { - // This could potentially produce an overflow exception on x86 when calculating - // address offset. - return true; - } - catch (Exception e) - { - Console.WriteLine("test3 exception: {0}", e.ToString()); - } - - Console.WriteLine("Test3 failed"); - return false; - } - - public static bool Test4() - { - try - { - ulong[] array = new ulong[0xfffffff]; - ulong i = 0xa000000000000002; - while (true) - { - i -= 0xa000000000000001; - array[i] = i; - } - } - catch (IndexOutOfRangeException) - { - return true; - } - catch (Exception) { } - - Console.WriteLine("Test4 failed"); - return false; - } - - public static bool Test5() - { - try - { - ulong[] array = new ulong[0xfffffff]; - ulong i = 0xa000000000000010; - while (true) - { - i -= 0xa000000000000001; - while (i >= 0) - { - array[i] = i; - i -= 1; - } - - array[i] = i; - } - } - catch (IndexOutOfRangeException) - { - return true; - } - catch (Exception) { } - - Console.WriteLine("Test5 failed"); - return false; - } -} diff --git a/src/coreclr/tests/src/JIT/jit64/regress/vsw/373472/test.il b/src/coreclr/tests/src/JIT/jit64/regress/vsw/373472/test.il deleted file mode 100644 index 49cab4d9af88..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/regress/vsw/373472/test.il +++ /dev/null @@ -1,483 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - - - - -// Metadata version: v4.0.amd64ret -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly test -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module test.exe -// MVID: {D7D039EB-2FFD-4888-8BC9-782CC0C93C1E} -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x0000000000310000 - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class public auto ansi beforefieldinit StrideTest - extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - // Code size 40 (0x28) - .maxstack 2 - .locals init (bool V_0, - int32 V_1) - IL_0000: nop - IL_0001: ldc.i4.1 - IL_0002: stloc.0 - IL_0003: ldloc.0 - IL_0004: call bool StrideTest::Test1() - IL_0009: and - IL_000a: stloc.0 - IL_000b: ldloc.0 - IL_000c: call bool StrideTest::Test2() - IL_0011: and - IL_0012: stloc.0 - IL_0013: ldloc.0 - IL_0014: call bool StrideTest::Test3() - IL_0019: and - IL_001a: stloc.0 - IL_001b: ldloc.0 - IL_001c: brtrue.s IL_0021 - - IL_001e: ldc.i4.1 - IL_001f: br.s IL_0023 - - IL_0021: ldc.i4.s 100 - IL_0023: stloc.1 - IL_0024: br.s IL_0026 - - IL_0026: ldloc.1 - IL_0027: ret - } // end of method StrideTest::Main - - .method public hidebysig static bool Test1() cil managed - { - // Code size 89 (0x59) - .maxstack 3 - .locals init (uint32[] V_0, - uint32 V_1, - class [mscorlib]System.Exception V_2, - bool V_3, - bool V_4) - IL_0000: nop - .try - { - IL_0001: nop - IL_0002: ldc.i4 0x8ffffff - IL_0007: newarr [mscorlib]System.UInt32 - IL_000c: stloc.0 - IL_000d: ldc.i4 0x8fffffe - IL_0012: stloc.1 - IL_0013: br.s IL_0025 - - IL_0015: nop - IL_0016: ldloc.0 - IL_0017: ldloc.1 - IL_0018: conv.u - IL_0019: ldc.i4.s 40 - IL_001b: stelem.i4 - IL_001c: nop - IL_001d: ldloc.1 - IL_001e: ldc.i4 0xa0000001 - IL_0023: sub - IL_0024: stloc.1 - IL_0025: ldc.i4.1 - IL_0026: stloc.s V_4 - IL_0028: br.s IL_0015 - - } // end .try - catch [mscorlib]System.IndexOutOfRangeException - { - IL_002a: pop - IL_002b: nop - IL_002c: ldc.i4.1 - IL_002d: stloc.3 - IL_002e: leave.s IL_0056 - - } // end handler - catch [mscorlib]System.Exception - { - IL_0030: stloc.2 - IL_0031: nop - IL_0032: ldstr "test1 exception: {0}" - IL_0037: ldloc.2 - IL_0038: callvirt instance string [mscorlib]System.Object::ToString() - IL_003d: call void [System.Console]System.Console::WriteLine(string, - object) - IL_0042: nop - IL_0043: nop - IL_0044: leave.s IL_0046 - - } // end handler - IL_0046: nop - IL_0047: ldstr "Test1 failed" - IL_004c: call void [System.Console]System.Console::WriteLine(string) - IL_0051: nop - IL_0052: ldc.i4.0 - IL_0053: stloc.3 - IL_0054: br.s IL_0056 - - IL_0056: nop - IL_0057: ldloc.3 - IL_0058: ret - } // end of method StrideTest::Test1 - - .method public hidebysig static bool Test2() cil managed - { - // Code size 84 (0x54) - .maxstack 3 - .locals init (uint32[] V_0, - uint32 V_1, - class [mscorlib]System.Exception V_2, - bool V_3, - bool V_4) - IL_0000: nop - .try - { - IL_0001: nop - IL_0002: ldc.i4 0x8ffffff - IL_0007: newarr [mscorlib]System.UInt32 - IL_000c: stloc.0 - IL_000d: ldc.i4.0 - IL_000e: stloc.1 - IL_000f: br.s IL_0020 - - IL_0011: nop - IL_0012: ldloc.0 - IL_0013: ldloc.1 - IL_0014: conv.u - IL_0015: ldloc.1 - IL_0016: stelem.i4 - IL_0017: nop - IL_0018: ldloc.1 - IL_0019: ldc.i4 0xa0a0a0a0 - IL_001e: sub - IL_001f: stloc.1 - IL_0020: ldc.i4.1 - IL_0021: stloc.s V_4 - IL_0023: br.s IL_0011 - - } // end .try - catch [mscorlib]System.IndexOutOfRangeException - { - IL_0025: pop - IL_0026: nop - IL_0027: ldc.i4.1 - IL_0028: stloc.3 - IL_0029: leave.s IL_0051 - - } // end handler - catch [mscorlib]System.Exception - { - IL_002b: stloc.2 - IL_002c: nop - IL_002d: ldstr "test2 exception: {0}" - IL_0032: ldloc.2 - IL_0033: callvirt instance string [mscorlib]System.Object::ToString() - IL_0038: call void [System.Console]System.Console::WriteLine(string, - object) - IL_003d: nop - IL_003e: nop - IL_003f: leave.s IL_0041 - - } // end handler - IL_0041: nop - IL_0042: ldstr "Test2 failed" - IL_0047: call void [System.Console]System.Console::WriteLine(string) - IL_004c: nop - IL_004d: ldc.i4.0 - IL_004e: stloc.3 - IL_004f: br.s IL_0051 - - IL_0051: nop - IL_0052: ldloc.3 - IL_0053: ret - } // end of method StrideTest::Test2 - - .method public hidebysig static bool Test3() cil managed - { - // Code size 113 (0x71) - .maxstack 3 - .locals init (int32[] V_0, - int64 V_1, - class [mscorlib]System.Exception V_2, - bool V_3, - bool V_4) - IL_0000: nop - .try - { - IL_0001: nop - IL_0002: ldc.i4 0x8ffffff - IL_0007: newarr [mscorlib]System.Int32 - IL_000c: stloc.0 - IL_000d: ldc.i4 0x8fffffe - IL_0012: conv.i8 - IL_0013: stloc.1 - IL_0014: br.s IL_0027 - - IL_0016: nop - IL_0017: ldloc.0 - IL_0018: ldloc.1 - IL_0019: conv.ovf.i - IL_001a: ldloc.1 - IL_001b: conv.i4 - IL_001c: stelem.i4 - IL_001d: nop - IL_001e: ldloc.1 - IL_001f: ldc.i4 0xa0a0a0a0 - IL_0024: conv.u8 - IL_0025: sub - IL_0026: stloc.1 - IL_0027: ldloc.1 - IL_0028: ldc.i8 0xffffffff685f5b77 - IL_0031: cgt - IL_0033: stloc.s V_4 - IL_0035: ldloc.s V_4 - IL_0037: brtrue.s IL_0016 - - IL_0039: nop - IL_003a: leave.s IL_005e - - } // end .try - catch [mscorlib]System.IndexOutOfRangeException - { - IL_003c: pop - IL_003d: nop - IL_003e: ldc.i4.1 - IL_003f: stloc.3 - IL_0040: leave.s IL_006e - - } // end handler - catch [mscorlib]System.OverflowException - { - IL_0042: pop - IL_0043: nop - IL_0044: ldc.i4.1 - IL_0045: stloc.3 - IL_0046: leave.s IL_006e - - } // end handler - catch [mscorlib]System.Exception - { - IL_0048: stloc.2 - IL_0049: nop - IL_004a: ldstr "test3 exception: {0}" - IL_004f: ldloc.2 - IL_0050: callvirt instance string [mscorlib]System.Object::ToString() - IL_0055: call void [System.Console]System.Console::WriteLine(string, - object) - IL_005a: nop - IL_005b: nop - IL_005c: leave.s IL_005e - - } // end handler - IL_005e: nop - IL_005f: ldstr "Test3 failed" - IL_0064: call void [System.Console]System.Console::WriteLine(string) - IL_0069: nop - IL_006a: ldc.i4.0 - IL_006b: stloc.3 - IL_006c: br.s IL_006e - - IL_006e: nop - IL_006f: ldloc.3 - IL_0070: ret - } // end of method StrideTest::Test3 - - .method public hidebysig static bool Test4() cil managed - { - // Code size 78 (0x4e) - .maxstack 3 - .locals init (uint64[] V_0, - uint64 V_1, - bool V_2, - bool V_3) - IL_0000: nop - .try - { - IL_0001: nop - IL_0002: ldc.i4 0xfffffff - IL_0007: newarr [mscorlib]System.UInt64 - IL_000c: stloc.0 - IL_000d: ldc.i8 0xa000000000000002 - IL_0016: stloc.1 - IL_0017: br.s IL_002c - - IL_0019: nop - IL_001a: ldloc.1 - IL_001b: ldc.i8 0xa000000000000001 - IL_0024: sub - IL_0025: stloc.1 - IL_0026: ldloc.0 - IL_0027: ldloc.1 - IL_0028: conv.ovf.i.un - IL_0029: ldloc.1 - IL_002a: stelem.i8 - IL_002b: nop - IL_002c: ldc.i4.1 - IL_002d: stloc.3 - IL_002e: br.s IL_0019 - - } // end .try - catch [mscorlib]System.IndexOutOfRangeException - { - IL_0030: pop - IL_0031: nop - IL_0032: ldc.i4.1 - IL_0033: stloc.2 - IL_0034: leave.s IL_004b - - } // end handler - catch [mscorlib]System.Exception - { - IL_0036: pop - IL_0037: nop - IL_0038: nop - IL_0039: leave.s IL_003b - - } // end handler - IL_003b: nop - IL_003c: ldstr "Test4 failed" - IL_0041: call void [System.Console]System.Console::WriteLine(string) - IL_0046: nop - IL_0047: ldc.i4.0 - IL_0048: stloc.2 - IL_0049: br.s IL_004b - - IL_004b: nop - IL_004c: ldloc.2 - IL_004d: ret - } // end of method StrideTest::Test4 - - .method public hidebysig static bool Test5() cil managed - { - // Code size 104 (0x68) - .maxstack 3 - .locals init (uint64[] V_0, - uint64 V_1, - bool V_2, - bool V_3) - IL_0000: nop - .try - { - IL_0001: nop - IL_0002: ldc.i4 0xfffffff - IL_0007: newarr [mscorlib]System.UInt64 - IL_000c: stloc.0 - IL_000d: ldc.i8 0xa000000000000010 - IL_0016: stloc.1 - IL_0017: br.s IL_0046 - - IL_0019: nop - IL_001a: ldloc.1 - IL_001b: ldc.i8 0xa000000000000001 - IL_0024: sub - IL_0025: stloc.1 - IL_0026: br.s IL_0034 - - IL_0028: nop - IL_0029: ldloc.0 - IL_002a: ldloc.1 - IL_002b: conv.ovf.i.un - IL_002c: ldloc.1 - IL_002d: stelem.i8 - IL_002e: ldloc.1 - IL_002f: ldc.i4.1 - IL_0030: conv.i8 - IL_0031: sub - IL_0032: stloc.1 - IL_0033: nop - IL_0034: ldloc.1 - IL_0035: ldc.i4.0 - IL_0036: conv.i8 - IL_0037: clt.un - IL_0039: ldc.i4.0 - IL_003a: ceq - IL_003c: stloc.3 - IL_003d: ldloc.3 - IL_003e: brtrue.s IL_0028 - - IL_0040: ldloc.0 - IL_0041: ldloc.1 - IL_0042: conv.ovf.i.un - IL_0043: ldloc.1 - IL_0044: stelem.i8 - IL_0045: nop - IL_0046: ldc.i4.1 - IL_0047: stloc.3 - IL_0048: br.s IL_0019 - - } // end .try - catch [mscorlib]System.IndexOutOfRangeException - { - IL_004a: pop - IL_004b: nop - IL_004c: ldc.i4.1 - IL_004d: stloc.2 - IL_004e: leave.s IL_0065 - - } // end handler - catch [mscorlib]System.Exception - { - IL_0050: pop - IL_0051: nop - IL_0052: nop - IL_0053: leave.s IL_0055 - - } // end handler - IL_0055: nop - IL_0056: ldstr "Test5 failed" - IL_005b: call void [System.Console]System.Console::WriteLine(string) - IL_0060: nop - IL_0061: ldc.i4.0 - IL_0062: stloc.2 - IL_0063: br.s IL_0065 - - IL_0065: nop - IL_0066: ldloc.2 - IL_0067: ret - } // end of method StrideTest::Test5 - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method StrideTest::.ctor - -} // end of class StrideTest - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file t.res diff --git a/src/coreclr/tests/src/JIT/jit64/regress/vsw/404708/test.il b/src/coreclr/tests/src/JIT/jit64/regress/vsw/404708/test.il deleted file mode 100644 index e3b5a2232ce9..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/regress/vsw/404708/test.il +++ /dev/null @@ -1,69 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - -.assembly test1 {} -.module test1.exe - -.namespace Test -{ - .class private auto ansi beforefieldinit Class1 extends [mscorlib]System.Object - { - - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - .maxstack 8 - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret - } - - - .method public hidebysig instance void Clear() cil managed - { - .maxstack 2 - - .try - { - leave.s DONE - } - finally - { - ldarg.0 - ldnull - pop - pop - endfinally - } - - DONE: - ret - } - - - .method public hidebysig static int32 Main(string[] args) cil managed - { - .entrypoint - .maxstack 1 - - newobj instance void Test.Class1::.ctor() - callvirt instance void Test.Class1::Clear() - - ldstr "Passed" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4 100 - ret - } - - - } - -} - diff --git a/src/coreclr/tests/src/JIT/jit64/regress/vsw/460412/test.il b/src/coreclr/tests/src/JIT/jit64/regress/vsw/460412/test.il deleted file mode 100644 index 3c62308d95a5..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/regress/vsw/460412/test.il +++ /dev/null @@ -1,179 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - - - - - -// Metadata version: v2.0.50131 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 2:0:0:0 -} -.assembly b441487 -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module b441487.exe -// MVID: {1BC10DDA-FF11-4E02-AEEF-C2F0AAC78A25} -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x02F10000 - -// =============== CLASS MEMBERS DECLARATION =================== - -.class public auto ansi beforefieldinit Test.Widget`1 - extends [mscorlib]System.Object -{ - .method public hidebysig instance void - SyncIt() cil managed synchronized noinlining - { - // Code size 19 (0x13) - .maxstack 8 - IL_0000: nop - IL_0001: ldstr "SyncIt" - IL_0006: call void [System.Console]System.Console::WriteLine(string) - IL_000b: nop -/////////////////////////////////////////////////////////// -ldnull -starg 0 -/////////////////////////////////////////////////////////// - IL_0011: nop - IL_0012: ret - } // end of method Widget`1::SyncIt - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method Widget`1::.ctor - -} // end of class Test.Widget`1 - -.class public abstract auto ansi sealed beforefieldinit Test.Program - extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main(string[] args) cil managed - { - .entrypoint - // Code size 87 (0x57) - .maxstack 2 - .locals init (int32 V_0, - int32 V_1, - bool V_2) - IL_0000: nop - IL_0001: ldc.i4.0 - IL_0002: stloc.0 - IL_0003: ldloc.0 - IL_0014: call int32 Test.Program::RunTests() - IL_0019: add - IL_001a: stloc.0 - IL_001b: ldloc.0 - IL_002c: ldc.i4.0 - IL_002d: ceq - IL_002f: stloc.2 - IL_0030: ldloc.2 - IL_0031: brtrue.s IL_0044 - - IL_0033: nop - IL_0034: ldstr "Test FAILED" - IL_0039: call void [System.Console]System.Console::WriteLine(string) - IL_003e: nop - IL_003f: ldc.i4.s 101 - IL_0041: stloc.1 - IL_0042: br.s IL_0055 - - IL_0044: nop - IL_0045: ldstr "Test SUCCESS" - IL_004a: call void [System.Console]System.Console::WriteLine(string) - IL_004f: nop - IL_0050: ldc.i4.s 100 - IL_0052: stloc.1 - IL_0053: br.s IL_0055 - - IL_0055: ldloc.1 - IL_0056: ret - } // end of method Program::Main - - .method private hidebysig static int32 - RunTests() cil managed noinlining - { - // Code size 189 (0xbd) - .maxstack 2 - .locals init (int32 V_0, - class [mscorlib]System.NullReferenceException V_1, - int32 V_2) - IL_0000: nop - IL_0001: ldstr "Running tests for {0}" - IL_0006: ldtoken !!T - IL_000b: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_0010: call void [System.Console]System.Console::WriteLine(string, - object) - IL_0015: nop - IL_0016: ldc.i4.0 - IL_0017: stloc.0 - - .try - { - IL_0082: nop - IL_0083: newobj instance void class Test.Widget`1::.ctor() - IL_0088: call instance void class Test.Widget`1::SyncIt() - IL_008d: nop - IL_008e: nop - IL_008f: leave.s IL_00b6 - - } // end .try - catch [mscorlib]System.NullReferenceException - { - IL_0091: stloc.1 - IL_0092: nop - IL_0093: ldstr "Widget<{0}>.SyncIt() failed" - IL_0098: ldtoken !!T - IL_009d: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_00a2: call void [System.Console]System.Console::WriteLine(string, - object) - IL_00a7: nop - IL_00a8: ldloc.1 - IL_00a9: call void [System.Console]System.Console::WriteLine(object) - IL_00ae: nop - IL_00af: ldloc.0 - IL_00b0: ldc.i4.1 - IL_00b1: add - IL_00b2: stloc.0 - IL_00b3: nop - IL_00b4: leave.s IL_00b6 - - } // end handler - IL_00b6: nop - IL_00b7: ldloc.0 - IL_00b8: stloc.2 - IL_00b9: br.s IL_00bb - - IL_00bb: ldloc.2 - IL_00bc: ret - } // end of method Program::RunTests - -} // end of class Test.Program - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file b441487.res diff --git a/src/coreclr/tests/src/JIT/jit64/regress/vsw/471729/test.cs b/src/coreclr/tests/src/JIT/jit64/regress/vsw/471729/test.cs deleted file mode 100644 index 745a9b76f647..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/regress/vsw/471729/test.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -internal static class Repro -{ - private struct S - { - public bool b; - public string s; - } - - private static S ReturnsS() - { - S s = new S(); - s.b = true; - s.s = "S"; - Console.WriteLine(s.s); - return s; - } - - private static void Test(bool f) - { - if (f) - { - throw new Exception(ReturnsS().s, new Exception(ReturnsS().s)); - } - else - { - Console.WriteLine("blah"); - } - } - - private static int Main() - { - int rc = 1; - try - { - Test(true); - Test(false); - } - catch - { - rc = 100; - } - - return rc; - } -} diff --git a/src/coreclr/tests/src/JIT/jit64/regress/vsw/517867/test.cs b/src/coreclr/tests/src/JIT/jit64/regress/vsw/517867/test.cs deleted file mode 100644 index 4ba6106accfd..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/regress/vsw/517867/test.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -public class Test -{ - private int _counter = 0; - - public int func(int type) - { - int rc; - - try - { - } - finally - { - switch (type) - { - case 1: - rc = foo(); - break; - case 2: - case 4: - break; - case 56: - case 54: - rc = foo(); - break; - case 5: - case 53: - break; - default: - break; - } - rc = foo(); - } - return rc; - } - - public int foo() - { - return _counter++; - } - - - public static int Main() - { - Test obj = new Test(); - int val = obj.func(1); - if (val == 1) - { - System.Console.WriteLine("PASSED"); - return 100; - } - System.Console.WriteLine("FAILED"); - return 1; - } -} diff --git a/src/coreclr/tests/src/JIT/jit64/regress/vsw/524070/test1.cs b/src/coreclr/tests/src/JIT/jit64/regress/vsw/524070/test1.cs deleted file mode 100644 index 720f2907f1d6..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/regress/vsw/524070/test1.cs +++ /dev/null @@ -1,241 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -public class Test -{ - public int func(int type) - { - try - { - } - finally - { - switch (type) - { - case -433: - type = func(type); - break; - case -660: - case -5: - case 524: - case 537: - case 818: - case -115: - case 576: - try - { - } - finally - { - switch (type) - { - case 174: - case -556: - type = func(type); - break; - case -363: - type = func(type); - break; - case -599: - case 57: - case 511: - case 465: - case 769: - case 146: - case 707: - type = func(type); - break; - case -107: - case -375: - type = func(type); - break; - case -40: - type = func(type); - break; - case -580: - case -883: - case 341: - type = func(type); - break; - case -608: - case -395: - case -886: - case 983: - case 687: - case 230: - case -838: - case 479: - case -687: - type = func(type); - break; - case 504: - case 578: - case 478: - case -494: - type = func(type); - break; - case -649: - case 547: - type = func(type); - break; - case 730: - case 659: - type = func(type); - break; - case -698: - case -868: - case -835: - type = func(type); - break; - case 217: - case 653: - case 613: - case -565: - case -731: - case 221: - case -793: - case -497: - type = func(type); - break; - case -948: - case 432: - case -478: - type = func(type); - break; - case -287: - case 826: - case 348: - case 986: - case 456: - case -589: - case -797: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -881: - case 901: - case -392: - case 576: - case -451: - type = func(type); - break; - case -957: - case 513: - case 296: - case 74: - case -112: - type = func(type); - break; - case -198: - case 828: - case -842: - type = func(type); - break; - case 903: - case -689: - case -444: - case -155: - case 721: - case 962: - case -261: - case 802: - type = func(type); - break; - case -179: - case -40: - case -758: - case -750: - case -201: - case -58: - case 413: - case -103: - type = func(type); - break; - case 741: - case -474: - case 664: - case 98: - case -221: - type = func(type); - break; - default: - break; - } - } - type = func(type); - break; - case -571: - case -518: - case 370: - case -174: - case 245: - type = func(type); - break; - case 986: - case 688: - case -333: - case -958: - type = func(type); - break; - case 216: - case -132: - case -640: - case 474: - type = func(type); - break; - case 682: - case -508: - type = func(type); - break; - case 450: - case -620: - case -284: - type = func(type); - break; - case -413: - type = func(type); - break; - case 575: - case -793: - case 962: - case 725: - case -455: - case -463: - type = func(type); - break; - case 488: - case -156: - case 171: - case 255: - case 738: - case 33: - case -171: - type = func(type); - break; - default: - break; - } - } - return type; - } - - public static int Main() - { - Test test = new Test(); - if (test.func(-1) == -1) - { - System.Console.WriteLine("PASS"); - return 100; - } - else - { - System.Console.WriteLine("FAIL"); - return 1; - } - } -} diff --git a/src/coreclr/tests/src/JIT/jit64/regress/vsw/524070/test2.cs b/src/coreclr/tests/src/JIT/jit64/regress/vsw/524070/test2.cs deleted file mode 100644 index c966207cc57f..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/regress/vsw/524070/test2.cs +++ /dev/null @@ -1,10527 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -public class Test -{ - public int func(int type) - { - try - { - switch (type) - { - case 543: - case 315: - case -135: - case -292: - case 887: - try - { - switch (type) - { - case -504: - type = func(type); - break; - case 979: - case 364: - case 309: - type = func(type); - break; - case 230: - case 408: - case 403: - type = func(type); - break; - case -814: - case -679: - case -237: - case 595: - case -662: - case 587: - case -386: - case 646: - case 772: - type = func(type); - break; - case 433: - case 398: - case -973: - case 983: - case 612: - case 717: - type = func(type); - break; - case 28: - type = func(type); - break; - case -455: - case 987: - case 382: - case -227: - case -132: - type = func(type); - break; - case 354: - case -55: - case -511: - case -294: - case 52: - case -307: - case 383: - type = func(type); - break; - case -690: - case 899: - case -830: - case 947: - type = func(type); - break; - case 277: - case -907: - case -759: - case -571: - case -828: - type = func(type); - break; - case 97: - case -388: - case 995: - type = func(type); - break; - case 592: - case -560: - case -799: - case -643: - case -143: - case 911: - case -196: - case 548: - type = func(type); - break; - case -755: - case -16: - case -359: - case -875: - case -61: - case -280: - case -260: - case -985: - case 236: - type = func(type); - break; - default: - break; - } - } - finally - { - switch (type) - { - case 547: - case -823: - case -948: - case 772: - case -549: - case 745: - case -48: - case -400: - type = func(type); - break; - case -747: - case -259: - type = func(type); - break; - case -263: - case 114: - case -388: - case -864: - case -665: - type = func(type); - break; - case -122: - case 505: - case -649: - type = func(type); - break; - case 702: - case 991: - type = func(type); - break; - case 968: - case 302: - case 709: - type = func(type); - break; - case 883: - case 82: - case 376: - case -678: - case -962: - case -956: - case -738: - type = func(type); - break; - case -415: - type = func(type); - break; - case -834: - case 851: - type = func(type); - break; - case 650: - case -758: - case 691: - case 388: - case 824: - type = func(type); - break; - case -364: - type = func(type); - break; - case 489: - case -642: - type = func(type); - break; - case 361: - type = func(type); - break; - case -525: - case -940: - case 136: - case -517: - case -557: - case 243: - type = func(type); - break; - case -639: - case 171: - case 365: - case -373: - case -302: - case 69: - type = func(type); - break; - case 987: - case 749: - type = func(type); - break; - default: - break; - } - } - type = func(type); - break; - case -288: - type = func(type); - break; - case 403: - case -376: - case 710: - case 749: - case -56: - case -420: - case 478: - case 600: - try - { - switch (type) - { - case 17: - case -845: - case -324: - case -228: - case 787: - case -912: - case 449: - case 922: - type = func(type); - break; - case -392: - case 745: - case 289: - case -180: - case -124: - case 64: - case -311: - case -246: - type = func(type); - break; - case -351: - case -345: - case 370: - case 646: - case -487: - case 958: - case -352: - case -236: - type = func(type); - break; - case -808: - case 903: - type = func(type); - break; - case 642: - case -560: - case -118: - case 578: - case -652: - type = func(type); - break; - case -979: - case -703: - case -438: - type = func(type); - break; - case -700: - case -803: - case -11: - case 45: - case 658: - case 335: - case -111: - case -128: - case 879: - type = func(type); - break; - case -277: - case 841: - case -888: - case -177: - case -778: - case 371: - case -282: - case -876: - case 22: - type = func(type); - break; - case 257: - case -982: - case -243: - case -35: - case 304: - case -594: - case 242: - case -472: - type = func(type); - break; - case -333: - case -543: - case 197: - type = func(type); - break; - case -646: - case 173: - case -344: - case 467: - type = func(type); - break; - case 312: - case 875: - type = func(type); - break; - case -688: - case -988: - case -759: - case 800: - case -673: - case -941: - case 356: - type = func(type); - break; - case -171: - case 303: - case -827: - case 539: - case -878: - type = func(type); - break; - case -822: - case -768: - case -921: - case -647: - case -71: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 287: - case 223: - type = func(type); - break; - case -356: - case 362: - type = func(type); - break; - case 48: - case -286: - case -826: - type = func(type); - break; - case -189: - case 147: - type = func(type); - break; - case -56: - case -994: - type = func(type); - break; - case 164: - case -24: - case -654: - type = func(type); - break; - case 551: - case 762: - case 364: - case -717: - case 657: - case -373: - case 311: - case -5: - case -576: - type = func(type); - break; - case 946: - case -617: - case -773: - case 93: - case 24: - case -211: - case 975: - type = func(type); - break; - case -35: - case 591: - case -693: - case -738: - case -345: - case -115: - type = func(type); - break; - case -608: - case 783: - case -902: - case -829: - case 716: - case -86: - case 376: - type = func(type); - break; - case -207: - case 524: - case 859: - type = func(type); - break; - case -13: - case -265: - case 156: - case -947: - case -711: - case -214: - case -529: - case -573: - case -81: - type = func(type); - break; - case 920: - case 217: - case -460: - case -992: - case -989: - case -246: - type = func(type); - break; - case 288: - case 107: - case -521: - case -79: - case 264: - case -156: - case 212: - case -177: - type = func(type); - break; - case -527: - case -430: - case 800: - case -535: - type = func(type); - break; - case 500: - case -71: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -770: - type = func(type); - break; - case -747: - case 973: - type = func(type); - break; - case -587: - case -66: - case 472: - case -462: - case -822: - case -46: - case 175: - case -94: - case 365: - type = func(type); - break; - case -817: - case 504: - case -583: - case 380: - case 61: - case 722: - case 890: - case 944: - case 230: - type = func(type); - break; - case -687: - case 901: - case -374: - case -546: - case -56: - case -580: - case -713: - case -452: - type = func(type); - break; - case 781: - case -681: - case 324: - case 315: - case 239: - case -935: - case 986: - case 792: - case -694: - type = func(type); - break; - case 869: - case 533: - case 566: - case 205: - case 972: - type = func(type); - break; - case -205: - case 83: - type = func(type); - break; - case -70: - case -554: - case -661: - case -510: - case 23: - case -608: - case 554: - type = func(type); - break; - case -693: - case 18: - case 593: - type = func(type); - break; - case -334: - case 67: - case 583: - case 508: - case -142: - case -811: - case 177: - case 314: - type = func(type); - break; - case 930: - case -91: - case 360: - case -952: - case -253: - type = func(type); - break; - case -346: - case -828: - case -852: - case 336: - type = func(type); - break; - case 617: - case 392: - case 442: - case 829: - type = func(type); - break; - case -77: - case 684: - type = func(type); - break; - case 678: - case -227: - case -288: - case 276: - case 202: - case -501: - case 621: - type = func(type); - break; - case 422: - case -395: - case 905: - type = func(type); - break; - case 855: - case -484: - type = func(type); - break; - case 581: - case 662: - case -657: - case -193: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -155: - case 444: - case -579: - case 928: - case 9: - case 674: - case -859: - case 679: - type = func(type); - break; - case 266: - case 493: - case 761: - type = func(type); - break; - case 156: - case -130: - case 633: - case -842: - case 141: - case -753: - case 74: - type = func(type); - break; - case -251: - type = func(type); - break; - case 431: - case -498: - case -125: - case -314: - case -752: - case -361: - case -421: - type = func(type); - break; - case 736: - case -975: - case 927: - case 268: - type = func(type); - break; - case 274: - case 896: - case -176: - case 480: - type = func(type); - break; - case -135: - case 338: - case -589: - case -528: - type = func(type); - break; - case 360: - case 884: - case 947: - type = func(type); - break; - case 202: - case -440: - case -259: - case 462: - case -905: - case 901: - case -11: - type = func(type); - break; - case 247: - case -202: - case 455: - case 918: - case -313: - case -384: - case 370: - type = func(type); - break; - case 602: - case -222: - case -117: - case 245: - case 422: - case 594: - type = func(type); - break; - case -796: - case 20: - case -970: - case 301: - case 515: - case -199: - case -700: - type = func(type); - break; - case 377: - case -684: - case -6: - case -437: - case 832: - case 366: - type = func(type); - break; - case 848: - case -351: - case -974: - case 352: - case -53: - case -349: - case 794: - case -553: - case 89: - type = func(type); - break; - case -718: - type = func(type); - break; - case -380: - case 956: - case 137: - case 147: - case -945: - case -789: - type = func(type); - break; - case 969: - case 395: - case 945: - case 282: - case -347: - case 131: - case -218: - case 310: - type = func(type); - break; - default: - break; - } - } - finally - { - switch (type) - { - case -193: - case 396: - case -764: - case -87: - case 35: - type = func(type); - break; - case 568: - case -946: - case -63: - type = func(type); - break; - case 225: - case 582: - case -788: - case 384: - case -481: - case 131: - case -486: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 847: - case -493: - case 620: - case 668: - case 896: - case -548: - type = func(type); - break; - case -257: - case 371: - case -779: - case -836: - type = func(type); - break; - case 494: - case 417: - case -719: - case -265: - case -955: - case -744: - case 584: - type = func(type); - break; - case 741: - case 578: - case -1000: - case 274: - case -856: - case 813: - case 733: - type = func(type); - break; - case -866: - case 999: - case -733: - case 890: - case 121: - case 183: - case -701: - case 775: - case -432: - type = func(type); - break; - case -418: - case 892: - case -348: - case -803: - case 833: - type = func(type); - break; - case -788: - case 731: - case -835: - case 931: - type = func(type); - break; - case -527: - case -125: - case -70: - type = func(type); - break; - case 437: - type = func(type); - break; - case -654: - case 523: - type = func(type); - break; - case -361: - case -30: - case -155: - case 236: - case 450: - case -628: - type = func(type); - break; - case 981: - case -41: - type = func(type); - break; - case 238: - case 1: - case 467: - case 89: - case 381: - case -833: - case -499: - type = func(type); - break; - case 12: - case 647: - case 801: - case 249: - case 661: - case 124: - case 337: - case 830: - case 684: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 429: - case 44: - case 865: - case 943: - case -78: - case 807: - case -40: - case 611: - case -124: - type = func(type); - break; - case 358: - case 931: - case 949: - case 689: - type = func(type); - break; - case 636: - case 928: - case -409: - case -652: - case -114: - type = func(type); - break; - case 844: - case 591: - type = func(type); - break; - case -9: - type = func(type); - break; - case 595: - case 575: - case 96: - case -442: - case 619: - case -312: - type = func(type); - break; - case -811: - case 530: - case -567: - case 373: - case 58: - case -455: - type = func(type); - break; - case -579: - case -445: - case 625: - case 170: - case 654: - case 716: - type = func(type); - break; - case 559: - case -336: - case 488: - case 408: - case 239: - case 336: - case -972: - case 452: - case 584: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -49: - case 754: - case -789: - case 384: - case -485: - case -683: - case 142: - case -331: - type = func(type); - break; - case 760: - case -841: - case -438: - type = func(type); - break; - case -130: - case -954: - type = func(type); - break; - case -535: - case 784: - case -782: - case -580: - case -516: - type = func(type); - break; - case 317: - case -964: - case -90: - case 608: - case 150: - case -620: - type = func(type); - break; - case 290: - case -264: - case 945: - case -20: - case 647: - case -894: - case -209: - type = func(type); - break; - case 36: - case -960: - case 308: - case -972: - case -16: - type = func(type); - break; - case -910: - case 399: - case -898: - case 226: - case -462: - type = func(type); - break; - case -731: - case 562: - case 668: - case 366: - case 33: - case 241: - type = func(type); - break; - case -564: - case -826: - case -527: - case -93: - case 166: - case -238: - case 321: - case 24: - type = func(type); - break; - case 582: - type = func(type); - break; - case -236: - case 254: - case 996: - type = func(type); - break; - case 743: - case -91: - case -609: - case 499: - case -829: - case -364: - case -192: - type = func(type); - break; - case -388: - case 186: - type = func(type); - break; - default: - break; - } - } - type = func(type); - break; - default: - break; - } - switch (type) - { - case 68: - case -421: - case 947: - case -594: - case -571: - case -646: - case -105: - case -438: - type = func(type); - break; - case -859: - case 266: - case 667: - case 782: - case 66: - case 185: - type = func(type); - break; - case -388: - case 773: - case 938: - try - { - switch (type) - { - case -544: - case -359: - case 742: - case 505: - case 210: - case 538: - case 665: - case -475: - case -446: - type = func(type); - break; - case -766: - case 593: - case 955: - case 635: - case -792: - case -666: - case -100: - case 100: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -232: - case 125: - case 831: - type = func(type); - break; - case -841: - case 451: - type = func(type); - break; - case 769: - case -162: - type = func(type); - break; - case -191: - case 594: - case 144: - case -878: - case 305: - case -337: - type = func(type); - break; - case 143: - case 357: - case -103: - case -393: - case 587: - type = func(type); - break; - case 432: - case -811: - case 111: - case 550: - case -117: - case -596: - case 438: - case 37: - type = func(type); - break; - case 267: - case 314: - case 688: - case 516: - case 910: - case 116: - type = func(type); - break; - case -914: - case 375: - case -244: - case 716: - case -674: - type = func(type); - break; - case 999: - case -189: - case 512: - case -670: - case 544: - case 410: - case 756: - type = func(type); - break; - default: - break; - } - } - finally - { - switch (type) - { - case -998: - case 180: - case 434: - case -602: - case -801: - case 48: - case 901: - case 406: - case 365: - type = func(type); - break; - case -789: - case 636: - case -674: - case 830: - case -566: - case 788: - case -247: - type = func(type); - break; - case -908: - case 270: - case 521: - case 851: - case 870: - case 363: - case -993: - case -811: - case -701: - type = func(type); - break; - case -447: - type = func(type); - break; - case -972: - case 280: - case 430: - case 298: - type = func(type); - break; - case -493: - case -918: - case 511: - case -84: - case -815: - case 969: - type = func(type); - break; - case -683: - case -885: - case 789: - case 673: - case -19: - case 77: - case -459: - type = func(type); - break; - case 602: - case 664: - case -528: - case -553: - type = func(type); - break; - case 310: - type = func(type); - break; - case -609: - type = func(type); - break; - case -252: - type = func(type); - break; - case -148: - case -495: - case 370: - case -70: - case -794: - case 27: - case -482: - case 927: - case 706: - type = func(type); - break; - case -109: - case -910: - case 84: - case 551: - case -539: - case 553: - type = func(type); - break; - case -782: - case -484: - case 318: - case -40: - case -989: - case -931: - type = func(type); - break; - case 616: - case -43: - type = func(type); - break; - case 161: - case 196: - case -988: - case 120: - type = func(type); - break; - case 253: - case -678: - case 116: - case -115: - case -54: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -355: - case -537: - case 150: - case -165: - case 548: - case -289: - case 574: - case 387: - type = func(type); - break; - case 689: - case 757: - case -178: - case -827: - case 492: - type = func(type); - break; - case -98: - case -159: - case -565: - case -56: - case 314: - case 248: - case -824: - type = func(type); - break; - case -270: - case 693: - case -879: - case 984: - case -164: - case -238: - case -566: - type = func(type); - break; - case -393: - case -938: - case -366: - case 871: - case -145: - case 810: - case 175: - case -480: - type = func(type); - break; - case -958: - case 570: - case 955: - case 472: - case 439: - case 190: - case -54: - case 414: - type = func(type); - break; - case 420: - case -725: - case -551: - case -999: - case -665: - case -531: - case 106: - case -581: - case 141: - type = func(type); - break; - case -274: - case -263: - case -376: - case -539: - case -888: - case 149: - case -241: - type = func(type); - break; - case 621: - case -425: - case 92: - case 665: - case 914: - case 229: - case 272: - type = func(type); - break; - case -779: - case 884: - case 290: - case -497: - case -431: - case 13: - case 341: - case -841: - type = func(type); - break; - case -394: - case -809: - case -701: - case 402: - case 748: - case 390: - type = func(type); - break; - case 94: - type = func(type); - break; - default: - break; - } - } - type = func(type); - break; - case 304: - case -55: - case 493: - case 359: - case -710: - type = func(type); - break; - case 407: - case 792: - try - { - switch (type) - { - case -466: - case -229: - case -402: - type = func(type); - break; - case -752: - case 222: - case 128: - type = func(type); - break; - case -749: - case -843: - case 724: - type = func(type); - break; - case -699: - case -14: - case -457: - case -433: - case 239: - case -781: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 631: - case -180: - case -759: - case 967: - case -269: - case -273: - case -476: - case 0: - type = func(type); - break; - case 767: - type = func(type); - break; - case 765: - case 14: - case 549: - case -408: - type = func(type); - break; - case 592: - case 642: - case 154: - case -474: - case -738: - case 395: - case -158: - case -169: - case 579: - type = func(type); - break; - case 191: - case -627: - case 746: - case 863: - case -832: - case 573: - case -579: - case -374: - type = func(type); - break; - case 713: - case -470: - case -369: - case 925: - case 520: - type = func(type); - break; - case -873: - case -434: - case -517: - case 380: - type = func(type); - break; - case -732: - case -249: - case -607: - case -291: - case -25: - case 597: - case 65: - case -700: - case 439: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 410: - case -612: - case 68: - case 535: - case -849: - case 253: - case -792: - case 599: - case 203: - type = func(type); - break; - case -613: - case -428: - case -122: - case 304: - case -39: - case 716: - case 633: - type = func(type); - break; - case -866: - case -171: - case -641: - case 450: - case 619: - case 393: - case -561: - case 979: - case 37: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -492: - case -880: - case 187: - type = func(type); - break; - case 735: - case 120: - case -758: - case -144: - type = func(type); - break; - case -455: - case -127: - case -643: - case -116: - case -824: - case -385: - case 881: - case -821: - case 515: - type = func(type); - break; - case -987: - case 880: - case 431: - case -529: - case 304: - case 405: - case 618: - type = func(type); - break; - case -232: - case 675: - case 95: - case -828: - case -784: - case 320: - case 27: - case -305: - case 223: - type = func(type); - break; - case 830: - case 143: - case -817: - case -282: - case -141: - case 648: - type = func(type); - break; - case 260: - case -528: - case 474: - case 274: - case 4: - case 512: - type = func(type); - break; - case -536: - case 632: - type = func(type); - break; - case -310: - case 76: - case 649: - case 882: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 160: - type = func(type); - break; - case 181: - case -111: - case -627: - case -343: - case 36: - case 856: - case 481: - type = func(type); - break; - case -319: - case -651: - case -629: - case 221: - case 294: - case 21: - case 783: - type = func(type); - break; - case -957: - case -67: - case -856: - case -315: - case 764: - case -838: - type = func(type); - break; - case 707: - case -417: - case -554: - case -664: - type = func(type); - break; - case 573: - case 317: - case -507: - case 26: - case 23: - case 244: - case 677: - case -241: - type = func(type); - break; - case -397: - case 436: - case 617: - case 793: - case 611: - type = func(type); - break; - case 910: - case -908: - case -589: - case 580: - type = func(type); - break; - case 293: - case -539: - case 839: - case -598: - case 972: - case -525: - case 709: - case 18: - type = func(type); - break; - case -335: - type = func(type); - break; - case -410: - type = func(type); - break; - case 862: - case 819: - case 364: - case 855: - case 344: - case -803: - case -951: - type = func(type); - break; - case -722: - case 440: - case 496: - case -474: - case -108: - case -847: - case 331: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -829: - case -134: - case -333: - case -675: - case 112: - case 477: - case -910: - case 54: - type = func(type); - break; - case 535: - case -342: - case -294: - type = func(type); - break; - case -471: - case -154: - type = func(type); - break; - case 930: - type = func(type); - break; - case 466: - case -946: - case -253: - case -787: - case 530: - case -676: - case -731: - case -817: - case -601: - type = func(type); - break; - case 445: - case 583: - case 556: - case 687: - case 127: - type = func(type); - break; - case 902: - case 724: - case -148: - case 536: - case 886: - type = func(type); - break; - case -711: - case 650: - case -486: - case -315: - case -683: - case -966: - case -90: - case -350: - type = func(type); - break; - case -39: - case -640: - type = func(type); - break; - default: - break; - } - } - finally - { - switch (type) - { - case -133: - case 958: - case 335: - case -658: - type = func(type); - break; - case -72: - type = func(type); - break; - case 184: - case 608: - case -36: - case 978: - case -29: - type = func(type); - break; - case 193: - case -373: - case 121: - case 245: - case -606: - case 85: - case 580: - case -711: - type = func(type); - break; - case -437: - case 15: - case 639: - type = func(type); - break; - case -851: - case 488: - case -745: - case 17: - case -378: - case 195: - case 822: - case -744: - case -817: - type = func(type); - break; - case -612: - case -491: - case 480: - case 778: - case -193: - case -420: - case -319: - case -314: - case -465: - type = func(type); - break; - case -262: - case -160: - case -717: - case 528: - case 182: - case -434: - case 275: - case -716: - type = func(type); - break; - case -591: - case 394: - case -680: - type = func(type); - break; - case -897: - case -221: - case 590: - case -410: - type = func(type); - break; - case -217: - case 148: - type = func(type); - break; - case 10: - case -317: - case -267: - case -264: - case -86: - case 307: - type = func(type); - break; - case 709: - case 776: - case 877: - case -521: - type = func(type); - break; - case 213: - case 308: - case 204: - case -273: - case 835: - case -945: - case 919: - case 537: - case 675: - type = func(type); - break; - case -451: - case -933: - case 805: - case 376: - case -2: - case 217: - case 651: - case -910: - type = func(type); - break; - case 752: - case -435: - type = func(type); - break; - case 830: - case 600: - case -206: - case -555: - case 652: - case 968: - case 512: - type = func(type); - break; - case -368: - case 516: - case 841: - case -222: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -614: - case -799: - case -245: - case -715: - case -137: - case 611: - case 646: - type = func(type); - break; - case -867: - case -335: - case -69: - case 538: - case -692: - case 555: - type = func(type); - break; - case 686: - type = func(type); - break; - case -273: - case 359: - case 796: - case 478: - case 604: - case 932: - case 390: - type = func(type); - break; - case 951: - case -975: - type = func(type); - break; - case 141: - case 33: - case -774: - case 27: - type = func(type); - break; - case 528: - case -170: - case 450: - type = func(type); - break; - case -942: - case -112: - case -46: - case 770: - case -407: - case 466: - case -871: - type = func(type); - break; - case -887: - case 660: - case 956: - case -186: - case -55: - case 983: - case 113: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 991: - case -218: - case -731: - case 365: - case 881: - type = func(type); - break; - case 585: - case -156: - case -906: - case 100: - case -561: - type = func(type); - break; - case 52: - case -221: - case -276: - case -393: - case -649: - case 474: - case 838: - case -596: - case -975: - type = func(type); - break; - case -863: - case 803: - case 875: - case -711: - type = func(type); - break; - case -931: - case 988: - type = func(type); - break; - case 49: - type = func(type); - break; - case 607: - case 390: - case 536: - case -952: - case 180: - case 969: - type = func(type); - break; - case 975: - type = func(type); - break; - case -74: - case -501: - case -634: - case 689: - case 610: - case 61: - case -120: - type = func(type); - break; - case -794: - case -406: - case -491: - case 275: - case 14: - case 69: - type = func(type); - break; - case -356: - case -535: - case 489: - case 592: - case -379: - type = func(type); - break; - case -144: - case 898: - case -949: - case 326: - case -704: - case 661: - case 242: - type = func(type); - break; - case 426: - case -619: - case 297: - case 862: - type = func(type); - break; - case 99: - case -615: - case 771: - case -887: - case -735: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -163: - case 781: - case 601: - case -460: - case 837: - case -408: - case -679: - type = func(type); - break; - case 403: - case -286: - type = func(type); - break; - case -416: - case 353: - case 853: - type = func(type); - break; - case -400: - type = func(type); - break; - case -637: - case 313: - type = func(type); - break; - case 637: - case -445: - case -220: - case -788: - case 211: - case 412: - case 979: - type = func(type); - break; - case -280: - case -127: - case -648: - case 223: - case -322: - case 75: - case -703: - case 510: - case 488: - type = func(type); - break; - case 340: - case -188: - case 272: - case -289: - case 901: - case -288: - case -491: - case 181: - type = func(type); - break; - case 785: - case 455: - case 750: - case -49: - case 829: - type = func(type); - break; - case -719: - case 1: - case 389: - case 328: - case -575: - case -388: - case 709: - case -470: - type = func(type); - break; - case 256: - case -779: - type = func(type); - break; - case 174: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -196: - case -126: - type = func(type); - break; - case -941: - case -175: - case 283: - case -932: - case -689: - case -502: - case -97: - case -202: - type = func(type); - break; - case -65: - case 417: - case -398: - case -728: - case -467: - type = func(type); - break; - case -603: - case -926: - case -92: - case -819: - case 63: - case 91: - case -13: - type = func(type); - break; - case -258: - case -651: - case -356: - case -509: - case -634: - type = func(type); - break; - case -967: - type = func(type); - break; - case -349: - case -125: - case 341: - case 770: - case -54: - case -3: - case -68: - type = func(type); - break; - case -171: - case 522: - case 814: - case 411: - case -226: - type = func(type); - break; - case 760: - case -16: - case 687: - case -298: - case -224: - case -79: - type = func(type); - break; - case -378: - case 810: - case -482: - case 71: - case 722: - case -459: - case 718: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -464: - type = func(type); - break; - case -94: - case 452: - case -234: - case 726: - type = func(type); - break; - case -237: - case -508: - case 399: - case 141: - case 830: - type = func(type); - break; - case 541: - case 276: - case 576: - case -673: - case 629: - case -412: - case 659: - type = func(type); - break; - case 664: - case 230: - case 112: - case -914: - type = func(type); - break; - case 64: - type = func(type); - break; - case -301: - case 224: - case -545: - case 213: - type = func(type); - break; - case -178: - case -14: - case 23: - case -496: - case 321: - case -654: - case -967: - type = func(type); - break; - case -76: - type = func(type); - break; - case 376: - type = func(type); - break; - case 564: - case 270: - case -731: - case 241: - case 494: - case 394: - case -88: - case 130: - case -993: - type = func(type); - break; - case -129: - case 560: - case 794: - case 365: - case -263: - case -339: - type = func(type); - break; - case -936: - type = func(type); - break; - case -56: - case 927: - case -580: - case -471: - case -445: - case -748: - type = func(type); - break; - case 6: - case 283: - case -446: - case 606: - case 879: - type = func(type); - break; - case 853: - case 332: - case -478: - case -242: - case -205: - case 580: - case 204: - type = func(type); - break; - default: - break; - } - } - type = func(type); - break; - case 543: - case -917: - case 402: - case 618: - case -886: - case 463: - case -290: - case 955: - case 608: - try - { - switch (type) - { - case -60: - case -568: - case 852: - case 143: - type = func(type); - break; - case 714: - case -11: - case -578: - case -612: - type = func(type); - break; - case -425: - case -600: - case 324: - case 417: - case 707: - case -539: - case -157: - case 979: - type = func(type); - break; - case -473: - case -140: - case 439: - case 400: - case 843: - case 17: - case -90: - case -559: - case -211: - type = func(type); - break; - case 50: - case 674: - type = func(type); - break; - case 661: - case 19: - case -487: - case 420: - case 480: - case 378: - type = func(type); - break; - case 80: - type = func(type); - break; - case -219: - case 440: - case 914: - type = func(type); - break; - case 2: - case -706: - case -304: - case 756: - case -752: - case 112: - case 629: - type = func(type); - break; - case 999: - case 501: - case 32: - case -992: - case -875: - case 830: - case 273: - type = func(type); - break; - case -940: - type = func(type); - break; - case 954: - case 392: - case -261: - case -696: - case -97: - case -714: - case -19: - type = func(type); - break; - case 962: - case -214: - case 935: - case -922: - case 485: - case -665: - case -985: - type = func(type); - break; - case 744: - case 33: - case -887: - type = func(type); - break; - case -955: - case 676: - case -757: - case 20: - case 12: - case 471: - case 252: - case -814: - case 806: - type = func(type); - break; - case -279: - case -899: - type = func(type); - break; - case -885: - case -738: - case 989: - case 793: - case 469: - case 266: - case 647: - case 667: - case -281: - type = func(type); - break; - case 921: - case 502: - case 546: - case 673: - case -890: - case 213: - case 529: - type = func(type); - break; - case 946: - case 909: - case 715: - case -505: - case 284: - case 891: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -788: - case 775: - case -21: - case 543: - case 357: - case 897: - case 524: - type = func(type); - break; - case 753: - type = func(type); - break; - case 951: - case 563: - case -153: - type = func(type); - break; - case -623: - case -43: - type = func(type); - break; - case 98: - case 510: - case -158: - case 797: - type = func(type); - break; - case -27: - case -723: - case 226: - case -226: - case -299: - case -949: - type = func(type); - break; - case 767: - case -296: - type = func(type); - break; - case 571: - case 755: - case 435: - case 892: - case 740: - case 938: - case -436: - case 605: - case -979: - type = func(type); - break; - case -643: - case -415: - case 577: - case 602: - case 110: - case 531: - case -242: - type = func(type); - break; - case -815: - case -619: - case 55: - case 712: - case 69: - case -198: - case -684: - case -418: - type = func(type); - break; - case 473: - case 819: - case 985: - case 923: - case -951: - case 991: - type = func(type); - break; - case -145: - case -515: - case 216: - case -178: - case -466: - type = func(type); - break; - case -180: - case -657: - case -215: - case -613: - case -301: - case 624: - case 676: - case 590: - case -480: - type = func(type); - break; - case -967: - case -482: - case 520: - case -485: - case -957: - case -635: - case 89: - case 38: - type = func(type); - break; - case 981: - case -591: - case -452: - case 634: - case -629: - case -338: - case 528: - case 610: - type = func(type); - break; - case -745: - type = func(type); - break; - case 542: - case -90: - case 651: - case -524: - case -765: - type = func(type); - break; - case -716: - case -586: - case -999: - case -308: - case -94: - case -48: - case -823: - type = func(type); - break; - case 405: - case -471: - case 476: - case 48: - case -511: - case 395: - case 200: - case -447: - case 495: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -587: - case 725: - case 171: - case -986: - type = func(type); - break; - case 335: - case 474: - case -901: - case 122: - case -133: - case 43: - case -720: - case -326: - type = func(type); - break; - case 37: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -196: - case 595: - case 457: - case -581: - case 257: - type = func(type); - break; - case -866: - case -42: - case 765: - case 650: - case 364: - type = func(type); - break; - case 98: - case -20: - case 963: - case -341: - case 870: - case -311: - case -170: - case -322: - type = func(type); - break; - case -731: - case 478: - case -922: - case -172: - case -463: - case 485: - type = func(type); - break; - case -627: - case -591: - case -280: - case 140: - case -730: - case 477: - type = func(type); - break; - case -324: - case 252: - case 994: - case -533: - type = func(type); - break; - case 880: - type = func(type); - break; - case 570: - case 823: - case -265: - case 412: - type = func(type); - break; - case -938: - case -684: - case -985: - case -790: - case 985: - case -794: - case -749: - case 838: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 378: - type = func(type); - break; - case -281: - case 513: - case -62: - case -415: - case 356: - case -71: - case -777: - case 439: - type = func(type); - break; - case -711: - case 287: - case 407: - case 876: - case -778: - case -343: - case -202: - case -474: - type = func(type); - break; - case 654: - case 343: - case 416: - case -232: - type = func(type); - break; - case -121: - case -643: - case -802: - case -265: - case -67: - case -981: - case 638: - type = func(type); - break; - case -441: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 748: - case -341: - type = func(type); - break; - case -875: - case -786: - case -107: - case -489: - case 973: - type = func(type); - break; - case 773: - type = func(type); - break; - case -392: - case -666: - case 763: - case 548: - case 453: - type = func(type); - break; - case 836: - case -538: - case -965: - case -826: - case 951: - case -910: - type = func(type); - break; - case -773: - type = func(type); - break; - case -806: - case 290: - case 419: - case 982: - case -868: - case -272: - type = func(type); - break; - case 472: - case -527: - case 998: - case 856: - case -599: - case -516: - case -240: - type = func(type); - break; - case 442: - case -381: - case 649: - case 850: - type = func(type); - break; - case 864: - case -28: - case 384: - case -434: - case -674: - case -680: - case -903: - case 838: - type = func(type); - break; - case 797: - case -432: - type = func(type); - break; - case 897: - case 56: - case -301: - case 221: - type = func(type); - break; - case -834: - case 640: - case -700: - type = func(type); - break; - case -138: - case 289: - case 549: - case 597: - case -90: - type = func(type); - break; - case 701: - case 203: - case -269: - case 331: - case -559: - case -792: - case -522: - type = func(type); - break; - case 905: - case -147: - case 656: - case 812: - case -369: - case 695: - type = func(type); - break; - case -324: - case 430: - case -497: - case 427: - case -939: - case 610: - type = func(type); - break; - case -547: - case -992: - case -327: - case 1: - case 683: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 415: - case -32: - case -605: - case -366: - case 498: - type = func(type); - break; - case -874: - case -325: - case 419: - type = func(type); - break; - case 478: - case 316: - case 700: - case -490: - case 827: - case 669: - case 379: - case 619: - type = func(type); - break; - case -881: - case -376: - case -593: - type = func(type); - break; - case 640: - case 592: - case 842: - case -123: - case -568: - case -342: - case 804: - case -709: - case 538: - type = func(type); - break; - case 884: - type = func(type); - break; - case -156: - case -765: - type = func(type); - break; - case 744: - case -790: - case 303: - case -703: - case 84: - type = func(type); - break; - case -417: - case -706: - case 188: - case 943: - case -820: - case 879: - case 294: - case 382: - type = func(type); - break; - case 715: - case -656: - case 8: - case 43: - case -245: - type = func(type); - break; - case 655: - case 588: - case 693: - case -984: - case 614: - type = func(type); - break; - case 939: - case 246: - case 816: - case -731: - case -17: - case 434: - case -682: - type = func(type); - break; - case -599: - case -185: - case -674: - case 322: - case -740: - case 56: - case 297: - case -347: - case -67: - type = func(type); - break; - case -222: - case -91: - type = func(type); - break; - case -646: - case 539: - case 232: - type = func(type); - break; - case 479: - case -982: - case -912: - case -379: - case 609: - case -720: - case 470: - case -808: - case -357: - type = func(type); - break; - case 372: - case 673: - case 197: - case -555: - case -25: - type = func(type); - break; - case -331: - case -100: - case -983: - case 686: - case -217: - case 698: - case 2: - type = func(type); - break; - default: - break; - } - } - finally - { - switch (type) - { - case 238: - case 104: - case -438: - case 472: - case -109: - case -723: - case 37: - type = func(type); - break; - case 954: - case -701: - case 785: - case 779: - case 205: - case -954: - type = func(type); - break; - case -932: - case -587: - case -751: - case 280: - case 260: - case 54: - case -668: - case 534: - case 401: - type = func(type); - break; - case 454: - case 521: - case 545: - case 17: - case 780: - case -726: - case 86: - case 967: - case -833: - type = func(type); - break; - case -635: - case 629: - case 170: - case -844: - case 95: - type = func(type); - break; - case -986: - case -509: - case -324: - type = func(type); - break; - case -111: - case 694: - case 971: - case 834: - case -286: - case 285: - case 494: - case 721: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -95: - case 570: - type = func(type); - break; - case 674: - case 437: - case -244: - case 491: - case -835: - case -827: - type = func(type); - break; - case -301: - type = func(type); - break; - case 37: - case 3: - case 486: - case -561: - case 242: - case -908: - case -815: - case -377: - case 40: - type = func(type); - break; - case -142: - case 678: - case -92: - case 759: - case 549: - case 711: - case -698: - case -505: - case -220: - type = func(type); - break; - case -428: - case 780: - case -863: - case -205: - case -533: - case 496: - case -282: - type = func(type); - break; - case 144: - case 848: - type = func(type); - break; - case -349: - case 23: - type = func(type); - break; - case -344: - case -32: - case -653: - case -725: - case -958: - type = func(type); - break; - case 535: - case -229: - case 346: - case 63: - case -288: - case 482: - case -235: - type = func(type); - break; - case 206: - case 779: - case 863: - case 677: - case 244: - case 334: - case 240: - case 257: - type = func(type); - break; - case -310: - case 971: - case 746: - case 374: - type = func(type); - break; - case 478: - case 192: - case 524: - case -794: - case -345: - case 831: - case 102: - case -419: - case 363: - type = func(type); - break; - case -547: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 801: - case -567: - case 73: - case -917: - case -15: - case -270: - case 40: - case 132: - case 365: - type = func(type); - break; - case -361: - case 407: - case 688: - case 836: - case 399: - case -899: - case 657: - case -696: - case -704: - type = func(type); - break; - case 292: - type = func(type); - break; - case 539: - type = func(type); - break; - case -173: - case -67: - case -425: - type = func(type); - break; - case -585: - case 224: - case 865: - type = func(type); - break; - case 438: - case -177: - case 792: - case -394: - case 15: - case -667: - case -285: - type = func(type); - break; - case 207: - type = func(type); - break; - case -201: - case -33: - case 995: - case 703: - type = func(type); - break; - case 706: - case 722: - case -843: - type = func(type); - break; - case -860: - case -491: - case -721: - case 534: - case 578: - case 797: - case -536: - type = func(type); - break; - case -51: - case -852: - case 415: - type = func(type); - break; - case -818: - case -602: - case -691: - case 51: - case 318: - case 280: - case 693: - type = func(type); - break; - case 178: - case -54: - case -346: - case 859: - case -62: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -291: - type = func(type); - break; - case 67: - type = func(type); - break; - case 365: - case -71: - case -456: - type = func(type); - break; - case 28: - case -172: - type = func(type); - break; - case 869: - case -792: - case 164: - case 58: - case 469: - case 257: - type = func(type); - break; - case 597: - case 127: - case -831: - case -345: - type = func(type); - break; - case -124: - case 658: - type = func(type); - break; - case 330: - case 332: - case -120: - case 872: - case -702: - case -142: - type = func(type); - break; - case -640: - case -761: - case -965: - case -653: - case -184: - case 468: - case -969: - case -948: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -938: - case 824: - case -236: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 184: - case -552: - case 74: - case 341: - case 745: - case 976: - case -946: - case 708: - case -810: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 599: - type = func(type); - break; - case 377: - case 156: - case -471: - case -640: - case -723: - case 848: - type = func(type); - break; - case 23: - case 122: - case -771: - case 968: - case -872: - type = func(type); - break; - case -883: - case -368: - case 914: - case -186: - case 834: - type = func(type); - break; - case 315: - case 444: - type = func(type); - break; - case 423: - case 223: - case 516: - case 846: - case -617: - case -815: - case -674: - case -844: - type = func(type); - break; - case -382: - type = func(type); - break; - case -181: - case -325: - case -134: - case 960: - case 702: - case 546: - case -84: - case 90: - case -136: - type = func(type); - break; - case -781: - type = func(type); - break; - default: - break; - } - } - type = func(type); - break; - case 213: - case -352: - case 859: - case 421: - case 794: - try - { - switch (type) - { - case -717: - case 767: - case 681: - case 732: - case 305: - case -157: - case -570: - case 464: - case -262: - type = func(type); - break; - case -35: - case -944: - case 350: - case -741: - type = func(type); - break; - case 442: - case 765: - type = func(type); - break; - case 112: - case -713: - case 485: - case -775: - case -420: - case 632: - case 204: - case -883: - case -697: - type = func(type); - break; - case -476: - case -237: - case -469: - case -220: - case 151: - case -179: - type = func(type); - break; - case 51: - case -7: - case 133: - case -346: - case -142: - case 116: - case 452: - case -649: - type = func(type); - break; - case 97: - type = func(type); - break; - case 756: - type = func(type); - break; - case -629: - case -583: - case 656: - case 841: - case -736: - type = func(type); - break; - case -689: - case -943: - case 186: - case -951: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -460: - case 232: - case -60: - case 974: - case -835: - case -816: - type = func(type); - break; - case -472: - case -328: - case 225: - case -552: - case -369: - type = func(type); - break; - case -747: - case 170: - case -967: - case 873: - case -587: - case -466: - type = func(type); - break; - case -639: - case 349: - case -174: - case -893: - case 107: - type = func(type); - break; - case -485: - case -583: - case -490: - case 528: - type = func(type); - break; - case -57: - case -395: - case 466: - case -682: - case 883: - case -489: - case -624: - case -998: - case -88: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -719: - case 146: - case 968: - case 24: - case -458: - case -989: - type = func(type); - break; - case -723: - case -817: - case -227: - case 514: - case 487: - case -174: - case 190: - case -594: - type = func(type); - break; - case -133: - case 474: - case 669: - case -513: - type = func(type); - break; - case 144: - type = func(type); - break; - case 504: - case -974: - case 831: - case 935: - case 287: - case 521: - case 496: - type = func(type); - break; - case 622: - case 782: - type = func(type); - break; - case 68: - case 680: - case -862: - case -918: - case -853: - case -496: - type = func(type); - break; - case -768: - case 345: - case 92: - case 429: - type = func(type); - break; - case -360: - case 127: - case 477: - case 678: - case 509: - case -473: - type = func(type); - break; - case -230: - case 209: - case 137: - case 785: - case -537: - case -2: - type = func(type); - break; - case -924: - case -724: - case -244: - case -314: - type = func(type); - break; - case 892: - case 705: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -274: - type = func(type); - break; - case -216: - case 326: - case 164: - case 633: - type = func(type); - break; - case 799: - case -732: - case -925: - case -92: - case 191: - case -193: - case 810: - case 842: - case 987: - type = func(type); - break; - case -622: - case 11: - case 924: - case 931: - case 894: - case 674: - case 84: - case 436: - case -572: - type = func(type); - break; - case 476: - case -342: - case -270: - type = func(type); - break; - case 412: - case -53: - case 4: - case -250: - case -16: - case -276: - case 200: - type = func(type); - break; - case 137: - type = func(type); - break; - case 337: - case 517: - case -613: - case -911: - case 518: - case 268: - case -534: - type = func(type); - break; - case -301: - case -522: - case 514: - case -307: - case 768: - type = func(type); - break; - case -168: - type = func(type); - break; - case 699: - case 890: - case -264: - case 55: - case -692: - type = func(type); - break; - case 537: - case -461: - case 496: - case -756: - case 802: - case 59: - type = func(type); - break; - case 262: - case -317: - case -700: - case 874: - type = func(type); - break; - case -407: - case -624: - case 286: - type = func(type); - break; - case 917: - case 159: - case -889: - case -437: - case 959: - type = func(type); - break; - case -978: - case -282: - type = func(type); - break; - case -187: - case 918: - case 964: - case 25: - case 310: - case 342: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -803: - case 979: - case 848: - case -408: - case 274: - case 466: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 436: - type = func(type); - break; - case 213: - case -182: - case 269: - case 598: - case -545: - case 733: - case -297: - case 972: - case 576: - type = func(type); - break; - case 744: - case 181: - case 285: - case -484: - case -223: - type = func(type); - break; - case -11: - case 141: - case -106: - case -763: - case 372: - type = func(type); - break; - case 793: - case 381: - case -605: - case -604: - case 438: - type = func(type); - break; - case -357: - case 693: - type = func(type); - break; - case -493: - case -478: - case -543: - case -192: - type = func(type); - break; - case 909: - case 214: - case 462: - case -769: - case -679: - case 338: - case 765: - case 136: - case 15: - type = func(type); - break; - case 331: - case 815: - case -791: - case -523: - type = func(type); - break; - case 161: - case 199: - type = func(type); - break; - case -744: - case 25: - type = func(type); - break; - case 202: - case -941: - case -705: - case -699: - case 328: - case 882: - case -761: - case 237: - case -341: - type = func(type); - break; - case 708: - case -123: - case 155: - case 774: - type = func(type); - break; - case -337: - case 915: - case -966: - case 191: - case -344: - case -991: - case 380: - case 702: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -566: - case 216: - case -561: - type = func(type); - break; - case 322: - case -966: - case -448: - case -126: - case -978: - case -988: - case 403: - type = func(type); - break; - default: - break; - } - } - finally - { - switch (type) - { - case -991: - type = func(type); - break; - case -103: - case -866: - case -644: - case 866: - case 623: - case -63: - case 53: - case -298: - case -414: - type = func(type); - break; - case 283: - case -612: - case 64: - type = func(type); - break; - case 877: - case 822: - type = func(type); - break; - case -812: - case 713: - type = func(type); - break; - case -334: - case 800: - case 890: - case 336: - case -207: - type = func(type); - break; - case -997: - case 133: - case 762: - case -725: - case -273: - case 895: - type = func(type); - break; - case 308: - type = func(type); - break; - case 874: - case 23: - case 836: - case -517: - case 650: - case 380: - case -487: - case 853: - type = func(type); - break; - case -961: - case 646: - case 488: - case -496: - type = func(type); - break; - case -811: - type = func(type); - break; - case 747: - case -693: - case 115: - case 217: - case 96: - type = func(type); - break; - case 20: - case 72: - type = func(type); - break; - case -66: - case 920: - case -60: - type = func(type); - break; - case 770: - case 388: - type = func(type); - break; - case 755: - case -390: - type = func(type); - break; - case -202: - type = func(type); - break; - case 705: - case -937: - case 513: - type = func(type); - break; - case 947: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 147: - case 667: - case 499: - case -12: - case 572: - case 229: - type = func(type); - break; - case 588: - case -92: - case -909: - case -338: - case 630: - type = func(type); - break; - case -237: - type = func(type); - break; - case -285: - type = func(type); - break; - case 573: - case 542: - case 77: - case -350: - case 282: - case 732: - case 893: - type = func(type); - break; - case 390: - type = func(type); - break; - case -959: - case -757: - case 602: - type = func(type); - break; - case 149: - case 202: - case 723: - case 924: - case -201: - type = func(type); - break; - case -68: - case 367: - case 81: - case -209: - case 800: - case 455: - case 664: - type = func(type); - break; - case -628: - case -205: - case 757: - case 689: - case 347: - case -947: - case -422: - case -595: - case 963: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 935: - case 605: - case -155: - case -819: - case -295: - case -62: - case 344: - case 306: - case 26: - type = func(type); - break; - case -573: - case -721: - case -162: - case 216: - case 280: - case -473: - case -795: - type = func(type); - break; - case -714: - case -151: - case 826: - type = func(type); - break; - case 946: - type = func(type); - break; - case -405: - case -233: - case -649: - case -104: - case 548: - case -515: - case -256: - case 238: - type = func(type); - break; - case -941: - case -137: - case 829: - case -914: - case 186: - type = func(type); - break; - case 852: - case -544: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -566: - case 944: - case -485: - type = func(type); - break; - case -527: - case -934: - case 525: - case -627: - case 943: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -962: - case 867: - case 659: - case 75: - case 586: - case 937: - case -414: - case -553: - case 757: - type = func(type); - break; - case -232: - case 189: - case 202: - type = func(type); - break; - case -648: - case 450: - case -560: - case 19: - type = func(type); - break; - case -566: - type = func(type); - break; - case 677: - case 430: - type = func(type); - break; - case 825: - case -921: - case 848: - case 878: - case -170: - case -978: - case -888: - type = func(type); - break; - case 561: - case 280: - case -980: - case -4: - type = func(type); - break; - case 10: - type = func(type); - break; - case -563: - case 266: - case -991: - case -609: - case -903: - case 666: - case -245: - case 312: - type = func(type); - break; - case -880: - type = func(type); - break; - case 84: - case 354: - case 858: - type = func(type); - break; - case 403: - case -639: - case -564: - case -853: - case 249: - case 506: - type = func(type); - break; - case -293: - type = func(type); - break; - case 734: - case -573: - case 968: - case 627: - case 922: - case -241: - case 355: - case 419: - type = func(type); - break; - case 167: - case -616: - case 286: - case 333: - case 845: - case 70: - case -234: - case 709: - type = func(type); - break; - case -786: - case -62: - case -242: - case -58: - case -682: - case 877: - case 658: - case -441: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -907: - case -652: - case -442: - case -609: - case -344: - case 669: - case 698: - case 127: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -236: - case 335: - case 654: - case 934: - case -789: - case -925: - case 19: - type = func(type); - break; - case 103: - case -698: - case -821: - case -261: - case -620: - type = func(type); - break; - case 402: - case -204: - case 669: - case 25: - case 308: - type = func(type); - break; - case 100: - type = func(type); - break; - case 257: - case 668: - case 326: - case 298: - type = func(type); - break; - case 992: - case -371: - case 663: - type = func(type); - break; - case 942: - type = func(type); - break; - case -671: - case -8: - case -121: - case 283: - case -177: - case -270: - case -757: - type = func(type); - break; - case -417: - case 456: - case 720: - case 582: - type = func(type); - break; - case 968: - case 608: - case -11: - case 859: - case 999: - case -328: - case 819: - type = func(type); - break; - case -720: - case -922: - case 985: - case -392: - case -88: - case 466: - case 26: - type = func(type); - break; - case 439: - case -845: - case -764: - type = func(type); - break; - case -949: - case 957: - case -477: - case 513: - case -154: - case -705: - case 65: - type = func(type); - break; - case -484: - case 340: - case 536: - case -914: - case 972: - case 330: - type = func(type); - break; - default: - break; - } - } - type = func(type); - break; - case 3: - case -231: - case 664: - case 475: - case -877: - type = func(type); - break; - case -951: - type = func(type); - break; - case -199: - case 297: - case -785: - case 818: - case -224: - type = func(type); - break; - case -863: - case -984: - case 565: - case 345: - case 990: - case 916: - case 651: - case -535: - case -654: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -246: - case -842: - type = func(type); - break; - case -372: - case -459: - case 898: - case -365: - case 581: - case -534: - case -977: - case 676: - try - { - switch (type) - { - case 332: - type = func(type); - break; - case -68: - type = func(type); - break; - case -785: - case -370: - case -524: - case -712: - case 355: - case -622: - case 323: - case 971: - type = func(type); - break; - case 982: - case 413: - case 348: - case -463: - type = func(type); - break; - case -490: - case 98: - type = func(type); - break; - case 871: - case -715: - case -605: - case -741: - case 398: - case 579: - case -764: - type = func(type); - break; - case 808: - case -539: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 232: - case -343: - case 914: - case -282: - type = func(type); - break; - case -869: - case -478: - case 900: - case -535: - type = func(type); - break; - case 384: - case 304: - case -430: - case 157: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 118: - type = func(type); - break; - case 253: - case 265: - case 581: - case -256: - case 460: - case 716: - case -463: - type = func(type); - break; - case -183: - case 50: - case -761: - case 978: - case 546: - case 917: - case 83: - type = func(type); - break; - case 508: - case 325: - case 498: - case -370: - case 794: - type = func(type); - break; - case 987: - case 198: - type = func(type); - break; - case 68: - case -99: - case 91: - case 688: - case -760: - type = func(type); - break; - case -932: - case 191: - case -678: - case 208: - case -25: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 196: - case -802: - case -819: - type = func(type); - break; - case 314: - case 471: - case 660: - case -514: - case 256: - case 467: - type = func(type); - break; - case 484: - type = func(type); - break; - case 327: - case -332: - case -512: - case 691: - case -39: - case 277: - case -617: - case 841: - type = func(type); - break; - case -185: - case 445: - type = func(type); - break; - case -424: - case -877: - case -830: - case -213: - case 224: - case -291: - case -892: - case 782: - type = func(type); - break; - case -872: - case 300: - case -552: - case -487: - case -23: - type = func(type); - break; - case 537: - case -585: - case 811: - type = func(type); - break; - case -131: - case -796: - case -409: - case 599: - case 399: - case -297: - case -369: - type = func(type); - break; - case 697: - case -81: - type = func(type); - break; - case -196: - case 383: - case -265: - type = func(type); - break; - case -263: - case 348: - case 489: - case 699: - case -968: - case -242: - case -888: - type = func(type); - break; - case -371: - case 198: - case 368: - case -961: - case 178: - case 983: - case -239: - case -155: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 381: - case -424: - case 569: - type = func(type); - break; - case -477: - case -229: - case -916: - case -408: - case -539: - case -590: - case -138: - case -628: - case 324: - type = func(type); - break; - case 713: - case 6: - case -761: - case 167: - case -952: - case -284: - case 778: - case -325: - case -243: - type = func(type); - break; - case 962: - case -599: - case -969: - type = func(type); - break; - case 452: - case -737: - case -64: - type = func(type); - break; - case 222: - type = func(type); - break; - case -998: - case -841: - type = func(type); - break; - case -247: - case -176: - case -282: - case 614: - case 439: - case -704: - case 702: - case -160: - case -743: - type = func(type); - break; - case 451: - case -674: - case -828: - case 743: - case 593: - case -203: - case -292: - case -198: - case -295: - type = func(type); - break; - case 68: - case -978: - case -878: - case -261: - case 421: - case 140: - case -802: - case 473: - case -212: - type = func(type); - break; - case 101: - case 914: - case 553: - case 486: - case -658: - case 330: - type = func(type); - break; - case -661: - case -621: - case 54: - case 660: - case 704: - type = func(type); - break; - case -421: - case -664: - case 280: - type = func(type); - break; - case 342: - case 276: - case -487: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -660: - case -131: - case -269: - case -298: - case 978: - case -807: - type = func(type); - break; - case -902: - case -772: - type = func(type); - break; - case 107: - type = func(type); - break; - case 536: - case -228: - case 103: - case -744: - type = func(type); - break; - case 466: - case 606: - case -537: - case -675: - case -237: - case 407: - type = func(type); - break; - case 595: - case -840: - type = func(type); - break; - case 859: - case 677: - case -869: - case 511: - case -364: - type = func(type); - break; - case -383: - case 213: - case -801: - case -246: - case 640: - case 351: - case -91: - case -961: - type = func(type); - break; - case -174: - case 608: - type = func(type); - break; - case 754: - case 42: - case 564: - type = func(type); - break; - case -737: - type = func(type); - break; - case 809: - type = func(type); - break; - case -43: - case -29: - case 576: - case 462: - case -586: - type = func(type); - break; - case 818: - case 108: - case -561: - case -580: - case -903: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 92: - case -82: - case 559: - type = func(type); - break; - case 502: - case 610: - case -885: - case -303: - case -577: - type = func(type); - break; - case 937: - type = func(type); - break; - case 719: - case 840: - case 117: - case 519: - case 682: - case 413: - case -961: - case 701: - case 729: - type = func(type); - break; - case 646: - case 636: - case -263: - case -660: - type = func(type); - break; - case 533: - case 800: - case 599: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 67: - case -873: - case -339: - case -876: - type = func(type); - break; - case 272: - type = func(type); - break; - case -519: - case 694: - case -791: - case -466: - type = func(type); - break; - case 639: - case 663: - case -306: - case 266: - case -299: - type = func(type); - break; - case -244: - case 6: - case -943: - case -160: - case -260: - case -631: - case 923: - case -833: - type = func(type); - break; - case 77: - case -419: - case -104: - case -177: - case -817: - case 207: - type = func(type); - break; - case 591: - case 179: - case -7: - case 515: - type = func(type); - break; - case -348: - case 557: - type = func(type); - break; - case 519: - type = func(type); - break; - case -281: - type = func(type); - break; - case 73: - case 646: - case -168: - case -789: - case -158: - case -147: - case -329: - case -774: - case 387: - type = func(type); - break; - case -149: - case -919: - type = func(type); - break; - case 600: - case 403: - case 113: - case 312: - case 710: - type = func(type); - break; - case -569: - case -69: - case 102: - case -913: - type = func(type); - break; - case -927: - case -654: - case -646: - case -500: - case -167: - case 220: - case -819: - case -448: - type = func(type); - break; - case 93: - case 514: - case 810: - case 749: - case -315: - case 980: - case 329: - case -464: - case -496: - type = func(type); - break; - case -113: - type = func(type); - break; - case 433: - type = func(type); - break; - default: - break; - } - } - finally - { - switch (type) - { - case -847: - case -107: - case -794: - case -523: - case 976: - type = func(type); - break; - case -858: - case -457: - case 179: - case 124: - case -863: - case -504: - case -501: - case -829: - type = func(type); - break; - case -834: - case -890: - case -701: - case -845: - case -989: - case -915: - case 593: - type = func(type); - break; - case -373: - case 729: - case 413: - case 895: - case -574: - case -103: - case 199: - type = func(type); - break; - case -360: - case 40: - case 302: - case -654: - case 940: - case 13: - case 704: - case -425: - type = func(type); - break; - case -49: - case -30: - type = func(type); - break; - case -375: - case -453: - case 484: - type = func(type); - break; - case -636: - case 111: - case -962: - case -223: - type = func(type); - break; - case 277: - case 294: - case -34: - case -440: - case 529: - case 579: - case -253: - case -438: - case 669: - type = func(type); - break; - case 646: - case 980: - case 557: - case 497: - case 455: - case 196: - case 825: - case 452: - type = func(type); - break; - case -595: - case 723: - case 793: - case 59: - case 114: - case -38: - type = func(type); - break; - case -921: - case -755: - case -417: - case 530: - type = func(type); - break; - case -142: - case -578: - case 725: - case 362: - case 746: - case -664: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 434: - case -44: - type = func(type); - break; - case -308: - type = func(type); - break; - case 324: - case -350: - case 68: - case 50: - case -972: - case 634: - type = func(type); - break; - case 659: - case -114: - case -629: - type = func(type); - break; - case 484: - type = func(type); - break; - case 851: - case 598: - type = func(type); - break; - case 499: - case -499: - case 979: - case -862: - type = func(type); - break; - case -213: - case 557: - type = func(type); - break; - case -865: - case 709: - case -141: - case -961: - case 41: - case 717: - case 449: - case 710: - case 101: - type = func(type); - break; - case 790: - case -689: - case 669: - case 29: - case -783: - case -52: - case -9: - case 655: - case 972: - type = func(type); - break; - case 607: - type = func(type); - break; - case 511: - case -516: - case -814: - case 619: - case 935: - case -546: - case -967: - case -447: - case -166: - type = func(type); - break; - case 93: - case 236: - case -86: - type = func(type); - break; - case -226: - case -501: - type = func(type); - break; - case 168: - case -79: - case -593: - type = func(type); - break; - case -590: - case -939: - type = func(type); - break; - case 122: - case -531: - case -717: - case 30: - case 147: - case -255: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -776: - case -744: - case -803: - case -626: - case 853: - case 422: - case 782: - type = func(type); - break; - case 676: - case -453: - case -11: - case 253: - case 217: - type = func(type); - break; - case -885: - case 899: - type = func(type); - break; - case -509: - type = func(type); - break; - case -197: - case 129: - case 200: - case 495: - case 101: - type = func(type); - break; - case -102: - case -503: - type = func(type); - break; - case -829: - case 2: - case 406: - case -911: - case 721: - case 586: - case 12: - type = func(type); - break; - case -880: - case -601: - case -354: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 927: - case -270: - case 834: - case 420: - case -193: - case -930: - case -311: - type = func(type); - break; - case -616: - case -144: - type = func(type); - break; - case 707: - case -989: - case -623: - type = func(type); - break; - case -239: - case 95: - case 951: - case -46: - case -75: - type = func(type); - break; - case -177: - case -327: - type = func(type); - break; - case -101: - case 532: - case 631: - case 457: - case 778: - case 775: - type = func(type); - break; - case 841: - case 417: - case 201: - case -531: - case 661: - case 681: - case 616: - case -172: - case 807: - type = func(type); - break; - case 786: - case -854: - case -250: - case -618: - case 709: - case 209: - type = func(type); - break; - case 896: - case 24: - case -552: - case 691: - case -730: - case 69: - case 104: - case -944: - case -307: - type = func(type); - break; - case 274: - case -562: - case 268: - type = func(type); - break; - case -394: - case 81: - case -189: - case 865: - case -406: - type = func(type); - break; - case -446: - case 99: - case 414: - case -666: - case -874: - case 117: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -473: - case -609: - case -483: - case 823: - case -579: - type = func(type); - break; - case 560: - case -247: - case 326: - case -848: - case 570: - case -653: - case -903: - type = func(type); - break; - case -32: - case 160: - type = func(type); - break; - case -611: - case -461: - type = func(type); - break; - case 180: - type = func(type); - break; - case 938: - case -484: - case 114: - case -967: - case 434: - type = func(type); - break; - case 610: - case -886: - case 565: - case 153: - type = func(type); - break; - case -933: - case 529: - case -699: - case -997: - case 450: - case -983: - case 835: - case 336: - case 852: - type = func(type); - break; - case -341: - case -705: - case -754: - case 78: - case -860: - case -869: - case -746: - case 991: - type = func(type); - break; - case -423: - case -9: - case 856: - case 462: - case -548: - case -999: - case -291: - case -612: - type = func(type); - break; - case -237: - case 143: - case 212: - case -414: - case -584: - case -516: - case -971: - case -117: - case -334: - type = func(type); - break; - case -109: - case -628: - case -297: - case -123: - case 327: - case 310: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -133: - type = func(type); - break; - case 293: - case -336: - case 356: - case -878: - case 829: - type = func(type); - break; - case -129: - case -789: - case -933: - type = func(type); - break; - case -999: - case -259: - case 628: - case 836: - case -427: - case -292: - case -459: - case -928: - case 878: - type = func(type); - break; - case 49: - case 256: - case 465: - case 96: - case 100: - case 363: - case 873: - case -886: - type = func(type); - break; - case -849: - case 173: - case 780: - type = func(type); - break; - case 433: - case -295: - case -902: - case 787: - case 90: - case -243: - case 840: - case 612: - case 817: - type = func(type); - break; - case -183: - case 155: - case -851: - case -257: - type = func(type); - break; - case -697: - case -381: - case -232: - case 207: - type = func(type); - break; - case 104: - case 904: - type = func(type); - break; - case 199: - type = func(type); - break; - case 21: - case -535: - type = func(type); - break; - case -244: - case 683: - case 915: - case -325: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -805: - case 131: - case -526: - case -79: - case 451: - type = func(type); - break; - case -963: - case -851: - case 231: - case -560: - case -352: - case 941: - type = func(type); - break; - case -380: - case 6: - case 811: - case 909: - case 382: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -264: - case 528: - case -331: - case -101: - case 527: - case -931: - case -709: - type = func(type); - break; - case -144: - case -866: - case -100: - case -859: - case -66: - case 250: - type = func(type); - break; - case 735: - case 829: - case 697: - type = func(type); - break; - case 892: - case -695: - case -45: - case -327: - case 595: - case -450: - type = func(type); - break; - case -929: - case 845: - type = func(type); - break; - case -55: - case 773: - case -467: - case -291: - case -217: - case -838: - case -334: - case -538: - type = func(type); - break; - case 393: - case 382: - case 22: - case -102: - case 293: - case 96: - case 539: - case -493: - type = func(type); - break; - case 700: - case 271: - case 981: - case -789: - case -935: - type = func(type); - break; - case 132: - type = func(type); - break; - case -145: - case 73: - case -651: - case 209: - case 998: - case -554: - case 443: - case 910: - case -639: - type = func(type); - break; - case 432: - case -850: - type = func(type); - break; - case 882: - case 272: - case -746: - case -697: - case 935: - type = func(type); - break; - case 406: - case 661: - case 576: - case -945: - type = func(type); - break; - case 311: - type = func(type); - break; - case -577: - case -36: - type = func(type); - break; - case -533: - case -366: - case 651: - case -619: - case 810: - case 389: - case 225: - case -816: - type = func(type); - break; - case -424: - case 455: - case 383: - case -265: - case 172: - case 74: - case -387: - type = func(type); - break; - case 726: - type = func(type); - break; - case -871: - case 204: - case -880: - case 278: - case 17: - case 897: - case 627: - case 19: - case -54: - type = func(type); - break; - default: - break; - } - } - type = func(type); - break; - case 899: - case -203: - case -501: - case -294: - type = func(type); - break; - case 883: - try - { - switch (type) - { - case -707: - case 951: - case -723: - type = func(type); - break; - case -117: - case -32: - case -546: - case 757: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 237: - case 654: - type = func(type); - break; - case 430: - case 924: - type = func(type); - break; - case -469: - case -629: - type = func(type); - break; - case -713: - case 756: - case 902: - case -565: - case -564: - type = func(type); - break; - case 272: - case -724: - case -643: - case 906: - case -883: - case -886: - case -303: - case 788: - case 578: - type = func(type); - break; - case 775: - case 842: - case -563: - case -867: - case 336: - type = func(type); - break; - case 869: - case 89: - case -406: - case 709: - case 144: - case 561: - case 367: - type = func(type); - break; - case -555: - case 540: - case 511: - type = func(type); - break; - case 831: - type = func(type); - break; - case -610: - case 515: - case 841: - case -96: - type = func(type); - break; - case -309: - case -903: - case 850: - case 466: - case -690: - case -461: - case 865: - case -241: - type = func(type); - break; - case -851: - case -582: - case -906: - type = func(type); - break; - case 583: - case -156: - type = func(type); - break; - case -187: - case -273: - case -209: - case 711: - case -91: - case 783: - case 461: - case -423: - case -397: - type = func(type); - break; - case 957: - case -217: - case -480: - type = func(type); - break; - case -999: - case 533: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 345: - case -982: - case 623: - type = func(type); - break; - case 169: - case 279: - type = func(type); - break; - case -152: - case -576: - case -973: - case 446: - type = func(type); - break; - case -475: - case -13: - case -93: - case 577: - case 673: - case 113: - type = func(type); - break; - case 899: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -611: - case -112: - type = func(type); - break; - case 949: - case 908: - case 975: - case 998: - case 890: - case -584: - case -440: - case 715: - type = func(type); - break; - case 499: - case 868: - case 189: - case 558: - case 512: - type = func(type); - break; - case -939: - case 358: - case 434: - case 131: - case 330: - type = func(type); - break; - case -31: - type = func(type); - break; - case -57: - case -414: - case 420: - case -377: - case -138: - case 30: - case 629: - case -266: - case -424: - type = func(type); - break; - case 371: - case -174: - case -151: - case -466: - case 610: - case -115: - type = func(type); - break; - case 586: - case 487: - case 38: - case -613: - case -885: - case 554: - case -400: - case -10: - type = func(type); - break; - case -45: - case -46: - case 757: - case -623: - case 885: - case -62: - case -902: - case 55: - type = func(type); - break; - case 528: - case 140: - case 92: - case -925: - case -532: - case -762: - type = func(type); - break; - case -19: - case -662: - case -860: - type = func(type); - break; - case 212: - type = func(type); - break; - case 823: - case -754: - case 772: - case -523: - type = func(type); - break; - case -163: - case -445: - case -530: - case 333: - case -180: - case 632: - case 142: - type = func(type); - break; - case -326: - type = func(type); - break; - case -801: - case 334: - case -567: - case -273: - case 793: - type = func(type); - break; - case -918: - case 744: - case -535: - case 511: - case 19: - case -200: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 216: - case -541: - case -93: - case -492: - case -868: - case 131: - type = func(type); - break; - case -396: - case 408: - case 456: - case 261: - case -501: - case -167: - case -806: - type = func(type); - break; - case 459: - case -67: - type = func(type); - break; - case 563: - case 478: - type = func(type); - break; - case 4: - case 707: - case 355: - case 418: - type = func(type); - break; - case 741: - case -499: - case 306: - case -35: - case -538: - case -963: - case -377: - case 336: - type = func(type); - break; - case -640: - type = func(type); - break; - case -366: - case 942: - case 543: - case 465: - type = func(type); - break; - case 925: - case -24: - case 466: - case 293: - case -603: - case 887: - case 424: - case 6: - type = func(type); - break; - case -375: - case 236: - case -547: - type = func(type); - break; - case -788: - case -249: - type = func(type); - break; - case 89: - case -462: - case 390: - case 9: - case 298: - case -558: - case -7: - type = func(type); - break; - case 876: - case 496: - case -922: - case 959: - case -266: - case -702: - type = func(type); - break; - case -980: - case -987: - case 187: - type = func(type); - break; - case -269: - case 888: - case -876: - case 196: - case 853: - type = func(type); - break; - case -700: - case -613: - case 837: - case -200: - case -830: - type = func(type); - break; - case 904: - case 609: - case 171: - case 544: - case 404: - type = func(type); - break; - case -545: - type = func(type); - break; - case 482: - case 983: - type = func(type); - break; - default: - break; - } - } - finally - { - switch (type) - { - case -100: - case 809: - case 464: - case -729: - case -721: - case -826: - case 216: - type = func(type); - break; - case 163: - case 133: - type = func(type); - break; - case 664: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 536: - case 932: - case -3: - case -945: - case 156: - case -577: - case 705: - type = func(type); - break; - case -827: - case -650: - case 562: - type = func(type); - break; - case 46: - case 867: - case 558: - case -109: - type = func(type); - break; - case -252: - case 646: - case -293: - case -705: - case -956: - case 612: - case -972: - case -892: - type = func(type); - break; - case 583: - case 731: - case 822: - case -230: - case 589: - case 507: - case -421: - case -939: - type = func(type); - break; - case -478: - case 298: - case 427: - type = func(type); - break; - case 818: - case 711: - case -611: - case 635: - type = func(type); - break; - case -292: - case 524: - case 128: - case 349: - case -119: - case -729: - type = func(type); - break; - case 271: - case -982: - case -742: - case 47: - case 492: - case -680: - case -31: - type = func(type); - break; - case 493: - case -161: - case 974: - case -312: - case 403: - case -239: - case -946: - case -825: - case -15: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 593: - case -833: - case 921: - case 827: - case -5: - type = func(type); - break; - case -592: - case -503: - case 320: - case -417: - case -466: - case -766: - case -151: - case 550: - case 232: - type = func(type); - break; - case 489: - case -680: - type = func(type); - break; - case 123: - case -798: - case -671: - case 480: - case 333: - type = func(type); - break; - case 736: - case 700: - case -768: - case -647: - case -347: - type = func(type); - break; - case -858: - case -902: - case 846: - case -322: - case 370: - case 350: - case -810: - type = func(type); - break; - case 141: - case 84: - case 822: - case 649: - case 363: - case -41: - type = func(type); - break; - case 125: - case 138: - case -829: - type = func(type); - break; - case -435: - case 854: - type = func(type); - break; - case -873: - case -168: - case 264: - case -314: - case -412: - case -153: - case 258: - case -795: - case -824: - type = func(type); - break; - case -334: - type = func(type); - break; - case -609: - case -865: - case 3: - case -128: - case 861: - case -34: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 872: - case -961: - case -620: - case -320: - case -883: - type = func(type); - break; - case -626: - case -389: - type = func(type); - break; - case -940: - case 909: - case -912: - type = func(type); - break; - case -829: - case 971: - case 14: - case 414: - case -317: - case -238: - case 343: - type = func(type); - break; - case -65: - type = func(type); - break; - case 677: - case -18: - case -870: - case -433: - case -531: - type = func(type); - break; - case -734: - type = func(type); - break; - case 477: - case 266: - type = func(type); - break; - case -902: - case -913: - case -549: - case -416: - type = func(type); - break; - case -787: - case -527: - case -353: - type = func(type); - break; - case -885: - case -766: - case -423: - case 738: - case -780: - case -837: - case 989: - case 458: - type = func(type); - break; - case -796: - case 955: - case 54: - case -64: - case 131: - case -298: - type = func(type); - break; - case 987: - case 806: - case 905: - case -511: - case -704: - case 751: - case -568: - case -178: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 883: - type = func(type); - break; - case -171: - case -886: - case -452: - type = func(type); - break; - case 356: - case 292: - case -208: - case 443: - type = func(type); - break; - case -609: - case -654: - type = func(type); - break; - case -868: - case -192: - type = func(type); - break; - case 272: - case 310: - case 741: - case 162: - case -44: - case 748: - type = func(type); - break; - case -418: - case -594: - case -432: - case -843: - type = func(type); - break; - default: - break; - } - } - type = func(type); - break; - case -637: - case 802: - case 755: - case 39: - case -852: - case -720: - case 426: - type = func(type); - break; - case 63: - case 656: - case 85: - type = func(type); - break; - case 643: - case -662: - case 259: - case 291: - case 595: - case 460: - case 599: - case -643: - type = func(type); - break; - case -381: - case 159: - case 511: - case -43: - case -90: - case -74: - case -187: - type = func(type); - break; - case 531: - case -859: - case -699: - case 198: - case 945: - case -572: - case 640: - case -350: - case 352: - type = func(type); - break; - case -975: - type = func(type); - break; - case -820: - case -933: - case 616: - case -776: - type = func(type); - break; - default: - break; - } - } - finally - { - switch (type) - { - case -382: - case -511: - case 595: - case -13: - case -54: - case -32: - case 800: - try - { - switch (type) - { - case -757: - case -918: - case 238: - type = func(type); - break; - case -387: - case -315: - case 531: - case 514: - case -216: - case -501: - case 698: - type = func(type); - break; - case 618: - case -359: - case -758: - case 261: - case 574: - case 651: - case 307: - case -448: - case 543: - type = func(type); - break; - case -88: - case 391: - case -692: - case -676: - case -653: - case -456: - type = func(type); - break; - case 332: - case 398: - case -914: - case -316: - case -2: - case -593: - type = func(type); - break; - case -40: - case -329: - case -908: - case 494: - case -465: - case -899: - type = func(type); - break; - case 545: - case 820: - case -292: - case -130: - case -46: - case -256: - case 684: - type = func(type); - break; - case -851: - case -449: - case 191: - case 98: - case -44: - case 169: - case 846: - type = func(type); - break; - case -711: - case -663: - case -13: - case -680: - case 451: - type = func(type); - break; - case 611: - case 224: - case -380: - case -767: - case -28: - type = func(type); - break; - case -98: - case 559: - type = func(type); - break; - case -984: - case 442: - case 367: - case 571: - case 599: - case 454: - case 392: - case 799: - case 509: - type = func(type); - break; - case 248: - case 534: - case 493: - case 899: - case 113: - case 626: - case 802: - case 156: - case 548: - type = func(type); - break; - case 988: - case -557: - case -792: - case 484: - case -751: - case -280: - case 772: - case 383: - case -508: - type = func(type); - break; - case -261: - case 175: - case 656: - type = func(type); - break; - case 801: - case -725: - case 445: - case -165: - case -55: - type = func(type); - break; - case -190: - case 513: - case 852: - case -923: - case 731: - case -279: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 188: - case 275: - case 756: - case -345: - type = func(type); - break; - case 661: - case 858: - case -77: - type = func(type); - break; - case -886: - case 204: - case -328: - case -974: - case -874: - case 446: - case -341: - type = func(type); - break; - case -683: - case -758: - case -658: - case -701: - type = func(type); - break; - case -819: - case -33: - case -789: - case -640: - type = func(type); - break; - case -525: - case -409: - case -869: - case 753: - case 528: - type = func(type); - break; - case -99: - case -805: - case 216: - case -167: - case -917: - case -293: - case 995: - case 250: - case -123: - type = func(type); - break; - case 330: - case 630: - case -728: - case 161: - case -317: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 281: - case 413: - case -522: - case -560: - case -429: - case -651: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -557: - case -893: - case -310: - case 383: - type = func(type); - break; - case 231: - case -639: - type = func(type); - break; - case -266: - case 125: - case 931: - case -771: - case 825: - case -288: - case 610: - case -753: - type = func(type); - break; - case 422: - case 925: - case -150: - case 337: - case 939: - type = func(type); - break; - case -714: - case -593: - case 398: - case -151: - case -661: - case 50: - type = func(type); - break; - case -670: - case 845: - case -878: - case -956: - case 639: - case -401: - case 305: - type = func(type); - break; - case -455: - case 681: - case -32: - case 954: - case 538: - case -964: - case -249: - case 837: - case 367: - type = func(type); - break; - case 803: - case -770: - case 349: - type = func(type); - break; - case -576: - case -757: - case 451: - case -496: - case -92: - case -597: - type = func(type); - break; - case -67: - case -619: - case -978: - case -375: - case 236: - type = func(type); - break; - case -914: - case 781: - case 72: - case 10: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -124: - case -757: - case 882: - case 382: - case -600: - case 162: - type = func(type); - break; - case -430: - case -969: - case -720: - case -464: - case -181: - case -852: - case 180: - type = func(type); - break; - case 878: - case -407: - case 134: - case 691: - case -99: - case -109: - case 612: - type = func(type); - break; - case -54: - case 328: - case -699: - case 241: - case -335: - case 729: - type = func(type); - break; - case 496: - case -208: - case 288: - case -876: - case -728: - case -820: - case -639: - case -932: - type = func(type); - break; - case 745: - type = func(type); - break; - case -595: - case -900: - case 486: - case 806: - type = func(type); - break; - case 613: - case -772: - case 188: - case 938: - case 319: - type = func(type); - break; - case -668: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -65: - case -946: - case -902: - case 921: - case -131: - type = func(type); - break; - case -554: - case -216: - case 743: - case 531: - type = func(type); - break; - case -92: - type = func(type); - break; - case 517: - case -476: - case 30: - case 945: - case -967: - case -514: - type = func(type); - break; - case 199: - case 459: - case 522: - case 213: - type = func(type); - break; - case 999: - case 501: - case -603: - case 558: - case 472: - case 247: - case 791: - case 8: - type = func(type); - break; - case 425: - case -986: - case -995: - case 824: - case 998: - case 564: - type = func(type); - break; - case 316: - case 742: - case -725: - type = func(type); - break; - case -295: - case -289: - case -337: - case -93: - case 374: - type = func(type); - break; - case 846: - type = func(type); - break; - case 744: - case 476: - case -469: - type = func(type); - break; - case -707: - case 339: - case -952: - case 225: - type = func(type); - break; - case -717: - case -768: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -909: - type = func(type); - break; - case 25: - case -880: - case -966: - type = func(type); - break; - case -745: - case 882: - case 716: - case 247: - case -852: - type = func(type); - break; - case -426: - case -211: - case 734: - case -350: - case -902: - type = func(type); - break; - case 945: - case -546: - case 492: - case 949: - case 482: - case 119: - type = func(type); - break; - case 128: - case -775: - case -594: - case -910: - case 472: - case 991: - case -168: - type = func(type); - break; - case 421: - case -381: - case -848: - case 254: - type = func(type); - break; - case -75: - case -702: - case 861: - case 759: - case 284: - case -264: - case 370: - case -705: - case -451: - type = func(type); - break; - case -425: - case -828: - type = func(type); - break; - case -713: - case 445: - case -490: - case -858: - case 27: - type = func(type); - break; - case -412: - case -95: - case -305: - case 848: - case 791: - case -756: - case 255: - case 316: - case -884: - type = func(type); - break; - case -830: - case 581: - case -232: - case -157: - case 267: - case 19: - type = func(type); - break; - case 631: - type = func(type); - break; - case -802: - type = func(type); - break; - case -840: - case -167: - type = func(type); - break; - case -908: - case 515: - case 299: - case -52: - case -455: - case 360: - case -90: - case -524: - type = func(type); - break; - case 976: - case -335: - case 67: - case -771: - case -551: - case -931: - type = func(type); - break; - case -971: - case 420: - case 142: - case -622: - case -268: - case 806: - case 328: - type = func(type); - break; - case 288: - case -121: - case 952: - case -171: - case 522: - case -573: - case -929: - case 756: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -694: - case -230: - case -244: - case -759: - case 693: - type = func(type); - break; - case -208: - case -823: - case -801: - type = func(type); - break; - case 707: - case 561: - case -325: - case -832: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 690: - case 297: - case 360: - case 709: - case 970: - type = func(type); - break; - case 278: - case -929: - case -969: - case -476: - case -705: - case -547: - type = func(type); - break; - case -5: - case 210: - type = func(type); - break; - case 793: - case -432: - case 722: - case -351: - type = func(type); - break; - case -100: - case -315: - case -725: - type = func(type); - break; - case 150: - case 576: - case -523: - case 581: - case 318: - type = func(type); - break; - case -340: - case -440: - case 521: - case -619: - case 721: - case -605: - type = func(type); - break; - case -26: - case 134: - case 492: - type = func(type); - break; - case -790: - case 169: - case -839: - case -662: - type = func(type); - break; - case 203: - case 579: - case 14: - case 768: - case -894: - case -554: - case -688: - case -592: - case -211: - type = func(type); - break; - default: - break; - } - } - finally - { - switch (type) - { - case -306: - case -181: - case 595: - case -200: - case -510: - type = func(type); - break; - case 247: - case 634: - case 892: - case -284: - type = func(type); - break; - case 488: - case -703: - case 225: - type = func(type); - break; - case -413: - case 157: - case 813: - case -310: - case 515: - case -887: - case -325: - case 210: - type = func(type); - break; - case -103: - case -434: - type = func(type); - break; - case 170: - case -787: - case -752: - case 112: - case 591: - case 108: - case 310: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 539: - type = func(type); - break; - case -806: - case 497: - case 921: - case -474: - type = func(type); - break; - case 223: - case -411: - case -909: - type = func(type); - break; - case -458: - case -488: - case 859: - case 154: - type = func(type); - break; - case -901: - case 96: - case -29: - type = func(type); - break; - case 609: - type = func(type); - break; - case 903: - case 923: - case 163: - case -923: - case 420: - case 643: - type = func(type); - break; - case 23: - case -621: - case -14: - case 352: - case 439: - case 48: - case -534: - case 619: - type = func(type); - break; - case 594: - case 586: - case -771: - case 987: - case 783: - case -194: - type = func(type); - break; - case 6: - case -343: - case -646: - case 93: - case -483: - case 491: - case -988: - case -661: - case 853: - type = func(type); - break; - case -684: - case -213: - case -730: - type = func(type); - break; - case 844: - case 106: - type = func(type); - break; - case 620: - case 566: - case 711: - case 730: - type = func(type); - break; - case 73: - case -189: - case -312: - case -24: - case -94: - case 502: - type = func(type); - break; - case 789: - case 621: - case 97: - case -927: - case -843: - case 66: - case -450: - type = func(type); - break; - case 531: - case -633: - case -353: - case 499: - case -107: - type = func(type); - break; - case 678: - case 348: - case -142: - case 749: - type = func(type); - break; - case 427: - case -783: - case 95: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 583: - case 543: - case -595: - case 540: - case -416: - case -491: - case -46: - case -936: - case -77: - type = func(type); - break; - case 690: - case -804: - case -824: - case -576: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -467: - case -966: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 690: - case -821: - case -920: - case 10: - case 627: - type = func(type); - break; - case 753: - type = func(type); - break; - case -638: - case 254: - case 221: - case -999: - case 953: - type = func(type); - break; - case 836: - case 523: - type = func(type); - break; - case 545: - type = func(type); - break; - case 858: - case 692: - case 434: - case 969: - case 853: - type = func(type); - break; - case 152: - case -319: - case 325: - case -560: - case 175: - case 833: - case -818: - case 751: - case 37: - type = func(type); - break; - case 404: - type = func(type); - break; - case 394: - case 912: - case -464: - case -244: - case -949: - case 702: - case 668: - type = func(type); - break; - case 688: - case -758: - case -413: - case -484: - case -893: - case -13: - case 88: - case 484: - type = func(type); - break; - case -744: - case -790: - case -774: - case 23: - case -525: - case 366: - case -573: - type = func(type); - break; - case 186: - case 421: - case 39: - type = func(type); - break; - case -84: - case -786: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -250: - type = func(type); - break; - case -590: - case 102: - case 641: - case 732: - case -700: - case -803: - case -702: - case -91: - type = func(type); - break; - case -263: - case 924: - case 67: - case -155: - type = func(type); - break; - case -733: - case 647: - case 869: - case 193: - case 236: - type = func(type); - break; - case 437: - case 169: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -485: - case -753: - case -384: - case 439: - case 325: - case 621: - case -845: - case -544: - type = func(type); - break; - case 354: - case -323: - case -618: - case 748: - case -476: - case 909: - case -972: - type = func(type); - break; - case 565: - case -479: - case 689: - case -462: - type = func(type); - break; - case -425: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 268: - case -656: - case 238: - case -177: - case -622: - case -805: - case 240: - case -227: - case -948: - type = func(type); - break; - case -947: - case 581: - case -141: - case 584: - case 223: - case -419: - type = func(type); - break; - case 710: - case 490: - case -584: - case 885: - case 898: - case 345: - case 284: - type = func(type); - break; - case 646: - case 872: - case -352: - case -362: - case 50: - case -604: - type = func(type); - break; - case -330: - case 456: - case -943: - case 277: - case -83: - case 633: - case -22: - case 159: - type = func(type); - break; - case 608: - case 695: - case 307: - case 856: - case -554: - case 865: - case 981: - type = func(type); - break; - case 107: - case 70: - case -592: - case 85: - case 528: - case -903: - type = func(type); - break; - case -1: - case 953: - case 615: - case -269: - case -678: - case -409: - case -866: - type = func(type); - break; - case -181: - case -619: - case -90: - case 403: - case 526: - type = func(type); - break; - case 664: - case 834: - case -268: - case -670: - case -724: - case -797: - case -963: - case 428: - case -240: - type = func(type); - break; - case 891: - case 351: - case 531: - case 979: - case 988: - case -414: - case 141: - case 358: - case -313: - type = func(type); - break; - case -37: - case -983: - type = func(type); - break; - case -163: - case -155: - type = func(type); - break; - case -307: - case -513: - case 474: - case 536: - case -538: - case -546: - case 443: - type = func(type); - break; - case 676: - case -246: - case -450: - case 821: - case 167: - case -39: - type = func(type); - break; - case -146: - case -50: - case -569: - type = func(type); - break; - case -397: - case 22: - case -169: - case 794: - case 769: - case -956: - type = func(type); - break; - case 668: - case -300: - case 817: - case -516: - type = func(type); - break; - case -867: - case -197: - case 509: - case 549: - case 224: - case 318: - case 437: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -257: - type = func(type); - break; - default: - break; - } - } - type = func(type); - break; - default: - break; - } - switch (type) - { - case -409: - case 537: - case 519: - case 316: - case -562: - case 162: - case 296: - case -594: - case 605: - try - { - switch (type) - { - case 680: - case 766: - case -582: - case 614: - case 682: - case -258: - case 418: - case 191: - type = func(type); - break; - case -583: - case 18: - case 657: - case 411: - case -428: - case 629: - type = func(type); - break; - case -6: - case 240: - case -485: - case -722: - case -482: - case 962: - case 177: - case -493: - type = func(type); - break; - case -648: - case -738: - case -346: - case 188: - case 87: - case -473: - type = func(type); - break; - case 838: - case 893: - case -727: - case 458: - case -100: - case 822: - case -683: - case 345: - case 324: - type = func(type); - break; - case -429: - case -826: - case -481: - case 862: - case 904: - case 866: - type = func(type); - break; - case 664: - case -635: - case -646: - case 392: - case 137: - case 717: - case -411: - type = func(type); - break; - case -706: - case 330: - case -521: - case -236: - case -998: - case -827: - case 889: - case 84: - case 819: - type = func(type); - break; - case -702: - case -829: - case -269: - case 171: - case -78: - case 170: - case -46: - type = func(type); - break; - case 390: - case 2: - case 987: - case 457: - case -553: - case -604: - case 121: - type = func(type); - break; - case 675: - case -839: - case 578: - case -554: - case -245: - case -445: - case -132: - type = func(type); - break; - case 528: - case -13: - case -134: - case -440: - case 118: - type = func(type); - break; - case -715: - case 434: - type = func(type); - break; - case -614: - type = func(type); - break; - case 361: - case -68: - case -760: - case 442: - case 184: - case -563: - case 739: - case -673: - type = func(type); - break; - case 922: - case -164: - case -117: - case -918: - case 642: - case -522: - case -502: - case 727: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -238: - case 743: - case 303: - case 741: - case 642: - case 935: - case -697: - type = func(type); - break; - case -722: - case -7: - type = func(type); - break; - case -447: - case 414: - case -940: - case -171: - type = func(type); - break; - case -409: - case 434: - case -281: - case -606: - case -992: - case 15: - case -772: - case 281: - type = func(type); - break; - case -308: - case -897: - case -217: - case -82: - case -360: - type = func(type); - break; - case -443: - case 928: - case -331: - case 624: - case 823: - case -943: - case 191: - case -403: - case 507: - type = func(type); - break; - case -956: - case 461: - case 333: - case -131: - type = func(type); - break; - case 421: - case -178: - case 253: - case 881: - case 887: - case 63: - case 8: - type = func(type); - break; - case 364: - case 746: - case 515: - case -979: - case -325: - case -50: - type = func(type); - break; - case 520: - case 475: - case 638: - case 93: - case -840: - case -375: - case -256: - case -565: - case 5: - type = func(type); - break; - case 400: - case -164: - case 212: - case 514: - case 963: - case 554: - case -106: - case -588: - type = func(type); - break; - case 270: - case 280: - case 529: - case 36: - case -248: - case -165: - case 548: - case -183: - type = func(type); - break; - case 878: - case -692: - case -965: - case -485: - case 647: - case 675: - type = func(type); - break; - case -432: - case 822: - case -760: - case -291: - case -323: - case -613: - case -752: - type = func(type); - break; - case -513: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 596: - case 400: - case -809: - case -379: - case 609: - case -22: - case 680: - case -450: - case 990: - type = func(type); - break; - case -114: - case -742: - type = func(type); - break; - case 807: - case 439: - case -443: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -116: - case 189: - case 536: - case -845: - case 394: - case 732: - case -346: - case 702: - type = func(type); - break; - case -407: - case -107: - case 281: - case -144: - case -735: - type = func(type); - break; - case 752: - case 220: - case 904: - type = func(type); - break; - case 687: - case -574: - case 537: - case 966: - case 124: - case 368: - case -871: - case -65: - type = func(type); - break; - case -902: - case -64: - case 237: - case 829: - case 551: - case -488: - case 603: - case 37: - case -741: - type = func(type); - break; - case -994: - case -542: - case 967: - case 907: - case -975: - case 87: - case 657: - type = func(type); - break; - case 582: - case -379: - case 649: - case -142: - type = func(type); - break; - default: - break; - } - } - finally - { - switch (type) - { - case -130: - case 8: - case 240: - case 346: - case 222: - case -588: - case -214: - type = func(type); - break; - case -204: - case -328: - case 604: - case -985: - case 355: - case 64: - type = func(type); - break; - case -656: - case -338: - case 570: - case 492: - case 778: - case 898: - case 227: - case 720: - type = func(type); - break; - case 512: - case -121: - case 467: - type = func(type); - break; - case -454: - case -686: - case -668: - type = func(type); - break; - case -651: - case 701: - case -42: - case -458: - case 271: - case -744: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -345: - case -260: - case 662: - case 294: - case -698: - case -991: - case 731: - case -407: - case -22: - type = func(type); - break; - case 959: - case -922: - case 366: - case -192: - case 637: - case 642: - type = func(type); - break; - case -279: - case 834: - case -658: - case -55: - case -874: - case -282: - type = func(type); - break; - case -661: - case -635: - case 666: - type = func(type); - break; - case -895: - case 187: - case 73: - case -595: - case 755: - case 645: - case 123: - case 157: - type = func(type); - break; - case -575: - case -784: - case 502: - case 148: - case -127: - case 680: - case 309: - case -645: - type = func(type); - break; - case 872: - case 541: - type = func(type); - break; - case 316: - type = func(type); - break; - case -451: - case -578: - case 472: - case -99: - case -472: - case -979: - type = func(type); - break; - case -45: - case 937: - case -657: - case -923: - case -512: - case 790: - type = func(type); - break; - case 553: - type = func(type); - break; - case 720: - case 684: - type = func(type); - break; - case -924: - case -138: - case -495: - type = func(type); - break; - case 194: - case -929: - type = func(type); - break; - case 409: - case -915: - case -508: - type = func(type); - break; - case 590: - type = func(type); - break; - case 933: - case -476: - case 983: - case -717: - type = func(type); - break; - case -405: - case 135: - case -615: - case 470: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 70: - case -615: - case 889: - case 144: - case -198: - case 930: - type = func(type); - break; - case 857: - type = func(type); - break; - case 239: - case -609: - case -957: - case -910: - case -723: - case -170: - case -919: - case -388: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 444: - case -782: - case -514: - case 699: - type = func(type); - break; - case 640: - case 570: - case -961: - case -23: - case 88: - case 344: - case 691: - case 392: - case -774: - type = func(type); - break; - case -877: - case 685: - case -444: - case -736: - case 323: - case -845: - type = func(type); - break; - case -733: - case -993: - type = func(type); - break; - case 542: - case -520: - case 892: - case -995: - case 913: - case -487: - case -477: - type = func(type); - break; - case -399: - case -166: - case -59: - case -416: - case -314: - case -968: - type = func(type); - break; - case 232: - case 890: - case 175: - case -232: - case -762: - case 547: - case -1: - type = func(type); - break; - case -82: - case -847: - case 144: - case 525: - case -653: - case 730: - case -286: - case 104: - case 950: - type = func(type); - break; - case -851: - case -685: - case 159: - type = func(type); - break; - case -966: - case 63: - case -425: - case -180: - case -641: - case -209: - case 391: - case -769: - type = func(type); - break; - case -476: - case -240: - case -909: - case 165: - case 499: - case 768: - case -999: - type = func(type); - break; - default: - break; - } - } - type = func(type); - break; - case -338: - case -26: - case 851: - try - { - switch (type) - { - case 601: - type = func(type); - break; - case 730: - case -10: - case -895: - case -464: - case 717: - case -656: - case 554: - case 856: - case -889: - type = func(type); - break; - case 418: - type = func(type); - break; - case -792: - case -575: - case -313: - case -386: - case -856: - case 0: - type = func(type); - break; - case 638: - case -551: - case 939: - case -550: - case -290: - case -853: - case 772: - case -503: - type = func(type); - break; - case -818: - case -707: - case 586: - case -357: - type = func(type); - break; - case -96: - case 661: - case 240: - case 433: - type = func(type); - break; - case -193: - case -585: - case -593: - type = func(type); - break; - case 307: - case -650: - case -187: - case -666: - case -763: - type = func(type); - break; - case 237: - case -376: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 962: - case 436: - case 791: - type = func(type); - break; - case 395: - case -612: - case 944: - type = func(type); - break; - case -149: - case 674: - case 817: - case -395: - case -226: - case -570: - case 303: - case -236: - case 446: - type = func(type); - break; - case 681: - case -807: - case 171: - case 101: - case -958: - case -115: - type = func(type); - break; - case -640: - case 334: - case 437: - case -741: - case -585: - case -56: - type = func(type); - break; - case 599: - case -946: - case -205: - case 467: - case 870: - case -300: - case -963: - case -927: - type = func(type); - break; - case -433: - case 685: - case -268: - case 235: - type = func(type); - break; - case 575: - case -617: - case 31: - case 472: - type = func(type); - break; - case -944: - case -58: - case 793: - case 418: - type = func(type); - break; - case 394: - case -95: - case 396: - case 35: - type = func(type); - break; - case -493: - case 587: - case -564: - case -271: - case -852: - type = func(type); - break; - case -280: - case 634: - case 836: - case -107: - case -255: - type = func(type); - break; - case 607: - case 331: - case -397: - case 416: - case 309: - case 649: - type = func(type); - break; - case -216: - case -49: - type = func(type); - break; - case -213: - case 574: - type = func(type); - break; - case -274: - case 805: - case -365: - case 935: - type = func(type); - break; - case -36: - type = func(type); - break; - case 2: - case 19: - case -646: - case -20: - case 248: - case -998: - type = func(type); - break; - case 695: - case -146: - case -251: - case 195: - case -422: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 335: - case -538: - case -186: - case 443: - case -916: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -750: - case -898: - case -899: - case -200: - case -138: - type = func(type); - break; - case 422: - case 200: - case -916: - case 698: - case 762: - case 929: - case 440: - case -859: - case -412: - type = func(type); - break; - case 623: - case -832: - case 307: - case -438: - case -253: - type = func(type); - break; - case -798: - case 211: - case -792: - case 478: - case 976: - case 391: - case 343: - case 820: - case -509: - type = func(type); - break; - case 709: - case -649: - case -249: - case -84: - case -747: - case -821: - case -614: - case -839: - case 664: - type = func(type); - break; - case -231: - case 50: - case 432: - type = func(type); - break; - case -346: - case -230: - case -254: - type = func(type); - break; - case 191: - case 275: - case -223: - case -307: - case -794: - case -680: - case 900: - type = func(type); - break; - case -408: - case 383: - case 864: - case -969: - case 857: - type = func(type); - break; - case 207: - case 773: - type = func(type); - break; - case 89: - type = func(type); - break; - case 671: - case -277: - case 444: - case 781: - case 145: - case -103: - case -748: - type = func(type); - break; - default: - break; - } - } - finally - { - switch (type) - { - case 778: - case 558: - case -176: - case 205: - case -356: - case 857: - type = func(type); - break; - case 216: - case 211: - case 15: - type = func(type); - break; - case -570: - type = func(type); - break; - case 362: - case 586: - case 3: - case -703: - case 633: - type = func(type); - break; - case -495: - case 842: - case 658: - type = func(type); - break; - case 565: - case 380: - type = func(type); - break; - case -239: - case 747: - case 493: - case 632: - case 795: - type = func(type); - break; - case 160: - case -252: - case 111: - case 33: - case -442: - case -341: - case 386: - case 999: - case 634: - type = func(type); - break; - case -439: - case 204: - case -55: - case -41: - case -346: - case 361: - case -222: - case -152: - case 263: - type = func(type); - break; - case 309: - case -881: - case 129: - case 259: - case 824: - case 568: - case 96: - case -118: - type = func(type); - break; - case 579: - case 219: - case -810: - case 270: - case -732: - case -750: - case -448: - case -556: - type = func(type); - break; - case -754: - case -363: - case -130: - case 851: - case 97: - case 225: - case -381: - case -579: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 889: - case -285: - case -217: - case -468: - case -662: - case -494: - case 438: - type = func(type); - break; - case 904: - case 299: - case -166: - case 818: - case -97: - type = func(type); - break; - case -732: - case -19: - case 984: - case -245: - type = func(type); - break; - case -614: - case 110: - case 304: - case -667: - case 210: - case 16: - case -22: - case 783: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 903: - case -361: - case 403: - case 147: - case 695: - type = func(type); - break; - case 6: - case -205: - case -313: - case 851: - case -237: - type = func(type); - break; - case 258: - case -352: - case 144: - case -197: - type = func(type); - break; - case 733: - case -882: - type = func(type); - break; - case -885: - case 240: - case 864: - case -268: - case -966: - case -710: - case -415: - case -619: - type = func(type); - break; - case 515: - case 359: - case -277: - case 980: - case 969: - case -1000: - case -340: - case 431: - type = func(type); - break; - case 207: - case 760: - case 261: - case -814: - type = func(type); - break; - case -97: - case -75: - case 555: - case -344: - case 188: - case -594: - type = func(type); - break; - case 245: - case 665: - case 875: - type = func(type); - break; - case -337: - case -225: - case -329: - case 112: - case 405: - type = func(type); - break; - case -375: - case 221: - type = func(type); - break; - case -508: - case -960: - case -151: - case 288: - case -353: - case -516: - type = func(type); - break; - case 758: - case -475: - case -643: - case -679: - case 929: - case 943: - case -40: - type = func(type); - break; - case -521: - case -562: - case 928: - case 192: - case 167: - case -74: - case -886: - case 58: - case -895: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 884: - case -241: - case 557: - case 801: - case 353: - case -364: - case -36: - type = func(type); - break; - case -589: - type = func(type); - break; - case -294: - case -438: - case -991: - case -297: - type = func(type); - break; - case -170: - case -281: - case 307: - case 554: - case -22: - type = func(type); - break; - case 814: - case -135: - case -367: - case -33: - type = func(type); - break; - case 432: - case -946: - case -755: - type = func(type); - break; - case -18: - case -256: - type = func(type); - break; - case 309: - case -400: - type = func(type); - break; - case -800: - case -276: - case 4: - type = func(type); - break; - case 819: - case -451: - case -80: - case 772: - case 875: - case 919: - case -512: - case -867: - type = func(type); - break; - case 395: - type = func(type); - break; - default: - break; - } - } - type = func(type); - break; - case -449: - case -917: - case -383: - case -931: - case 894: - case -76: - case -166: - case -125: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 877: - case -966: - case 903: - case 962: - case -665: - type = func(type); - break; - case -897: - case -579: - case -371: - case 995: - try - { - switch (type) - { - case -101: - type = func(type); - break; - case 944: - case -140: - case 91: - case -442: - case -57: - case 921: - type = func(type); - break; - case -19: - type = func(type); - break; - case -807: - case -858: - case -308: - case -470: - case -282: - case 276: - type = func(type); - break; - case -872: - case -520: - case -945: - case 941: - case -486: - case 17: - case 810: - case 539: - case 219: - type = func(type); - break; - case 711: - case 466: - type = func(type); - break; - case 447: - case -319: - case -930: - case 717: - case -197: - case 949: - case -937: - type = func(type); - break; - case -684: - case -740: - case -13: - case 728: - case 52: - case -329: - case 768: - case -808: - type = func(type); - break; - case 572: - type = func(type); - break; - case 353: - case -895: - case -826: - case 389: - case 958: - case -42: - case -249: - case -73: - type = func(type); - break; - case 551: - case 338: - case -791: - case -318: - case 580: - type = func(type); - break; - case 511: - case -928: - case -26: - case 726: - case -232: - case 212: - case -855: - case 812: - case -781: - type = func(type); - break; - case -787: - case 462: - case -655: - case -959: - case 347: - type = func(type); - break; - case -188: - case -992: - case -888: - case 294: - case 272: - case 292: - type = func(type); - break; - case -241: - type = func(type); - break; - case 22: - type = func(type); - break; - case -23: - case 702: - case -222: - case 45: - case 471: - type = func(type); - break; - case -743: - case -880: - case 33: - case 846: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 959: - type = func(type); - break; - case 169: - case -110: - type = func(type); - break; - case 289: - case -419: - case 8: - case -796: - type = func(type); - break; - case 745: - type = func(type); - break; - case -431: - type = func(type); - break; - case -489: - case -781: - type = func(type); - break; - case -786: - case 674: - case -801: - case 953: - case -166: - case -483: - case -711: - case 167: - case 990: - type = func(type); - break; - case 784: - case 226: - case -822: - case -34: - case 73: - case 971: - case 335: - type = func(type); - break; - case -878: - case 221: - case -986: - case -237: - case -560: - type = func(type); - break; - default: - break; - } - } - finally - { - switch (type) - { - case -150: - case 957: - case -423: - case -524: - case 185: - case -624: - case -962: - case -841: - case -182: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 941: - case -995: - case 527: - case -348: - case -399: - case 577: - type = func(type); - break; - case 123: - case 224: - case -23: - case 947: - case -221: - case 127: - type = func(type); - break; - default: - break; - } - } - type = func(type); - break; - case -50: - case 600: - case -904: - type = func(type); - break; - case -800: - case -90: - case 304: - case -805: - type = func(type); - break; - case 983: - case -440: - case 712: - case -309: - case -196: - case 81: - case 746: - case 66: - case 360: - type = func(type); - break; - case 884: - case -970: - case 329: - case 382: - type = func(type); - break; - case -381: - case -563: - case 464: - case 317: - case -220: - case 10: - case -98: - type = func(type); - break; - case 449: - case 878: - case -766: - case -225: - case 942: - case 420: - type = func(type); - break; - case 261: - case 745: - case -961: - type = func(type); - break; - case -908: - case -111: - case -114: - case -507: - case -959: - case 477: - case 910: - try - { - switch (type) - { - case -434: - case 621: - case -782: - case -375: - case -881: - case 762: - type = func(type); - break; - case 987: - case 415: - case -45: - case 80: - case 382: - case -738: - case -188: - type = func(type); - break; - case -694: - case 804: - case 646: - type = func(type); - break; - case 533: - case -1000: - case -715: - case 289: - type = func(type); - break; - case 378: - case 730: - case 551: - case -29: - case 275: - case 302: - case 99: - case -685: - case 192: - type = func(type); - break; - case 311: - type = func(type); - break; - case -444: - case 316: - case 301: - type = func(type); - break; - case 815: - case 896: - case -670: - case 83: - type = func(type); - break; - case -290: - case -374: - case -927: - type = func(type); - break; - case 734: - case 673: - case -736: - case 845: - case -549: - case 242: - case -719: - case -669: - case -620: - type = func(type); - break; - case -612: - case -789: - case -526: - case -288: - case -888: - case 855: - type = func(type); - break; - case -811: - case -945: - case 501: - case 956: - type = func(type); - break; - case -513: - case -656: - case 886: - case 717: - case -897: - case 954: - case -794: - case 374: - type = func(type); - break; - case 103: - case 477: - case 46: - case 540: - type = func(type); - break; - case -165: - case -530: - case -259: - case -35: - case 29: - case -718: - case -824: - case -932: - type = func(type); - break; - case -356: - case 340: - case 183: - case -783: - case 227: - type = func(type); - break; - case -480: - case -429: - case -428: - case 968: - case 984: - case 186: - case 919: - case 958: - type = func(type); - break; - case 138: - case -674: - case -876: - case 5: - type = func(type); - break; - case 284: - case -267: - case 427: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 20: - case -706: - case 447: - type = func(type); - break; - case -529: - case 673: - case 574: - case -582: - case 431: - type = func(type); - break; - case -624: - case -81: - case 737: - case -22: - case 676: - case -853: - type = func(type); - break; - case -95: - case 78: - case 555: - type = func(type); - break; - case -85: - case -488: - type = func(type); - break; - case 826: - type = func(type); - break; - case -843: - case 170: - case 489: - case 628: - type = func(type); - break; - case 913: - case -989: - case 733: - case -793: - case 403: - case 72: - case 481: - case -900: - case -590: - type = func(type); - break; - case -512: - case -285: - case -643: - case -782: - type = func(type); - break; - case 146: - case 329: - case -568: - type = func(type); - break; - case 828: - case -652: - case 616: - case -958: - type = func(type); - break; - case 782: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 768: - case 515: - case -597: - case -71: - case 802: - case 332: - type = func(type); - break; - case -92: - case -997: - case -229: - type = func(type); - break; - case 74: - case 50: - type = func(type); - break; - case -216: - case 145: - case 674: - case -573: - type = func(type); - break; - case 650: - case 608: - case -887: - case 11: - case 840: - case 57: - case -125: - case -918: - case 564: - type = func(type); - break; - case 691: - case -898: - type = func(type); - break; - case 632: - case -783: - case -668: - case -222: - case -994: - case 838: - case -315: - case 383: - type = func(type); - break; - case 310: - case -415: - case -625: - case 357: - case 701: - case 23: - case -529: - case -633: - case 677: - type = func(type); - break; - case 789: - case 654: - case -496: - case -438: - case 871: - case -73: - case 250: - case -101: - case -488: - type = func(type); - break; - case -332: - case -348: - type = func(type); - break; - case -167: - case -528: - case -995: - case 138: - case 835: - case 741: - case -587: - type = func(type); - break; - case -702: - case 527: - case -364: - case -217: - case 699: - case 173: - case 59: - case 999: - type = func(type); - break; - case 323: - case -575: - case 634: - case 843: - case -437: - case -323: - case -726: - case 443: - case 966: - type = func(type); - break; - case -868: - case -6: - case -203: - case -727: - case 706: - case -596: - case 916: - case -132: - type = func(type); - break; - default: - break; - } - } - finally - { - switch (type) - { - case 332: - case -468: - case 936: - case 572: - case -968: - case 356: - case -873: - case 868: - type = func(type); - break; - case -828: - case 753: - case -809: - case -101: - case -412: - case -11: - case -757: - case 18: - case 597: - type = func(type); - break; - case 794: - case 731: - type = func(type); - break; - case 983: - case -720: - case -238: - case 501: - case 254: - case -71: - case -622: - case 782: - type = func(type); - break; - case -492: - case -561: - type = func(type); - break; - case -209: - case -511: - case -939: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -450: - case -594: - case 664: - case 794: - case -996: - case 941: - type = func(type); - break; - case -792: - type = func(type); - break; - case 463: - case 386: - case -682: - case -401: - case -244: - case 828: - type = func(type); - break; - case -337: - case 953: - case 292: - case 269: - case 854: - case -128: - case -62: - case 400: - type = func(type); - break; - case 449: - case 682: - type = func(type); - break; - case 997: - case -802: - case 753: - type = func(type); - break; - case 786: - case 62: - case 243: - case 325: - case -970: - type = func(type); - break; - case 978: - type = func(type); - break; - case -332: - case 970: - type = func(type); - break; - case -9: - case 464: - case 705: - case 751: - case -389: - case -47: - case -873: - type = func(type); - break; - case -232: - case -458: - case 352: - type = func(type); - break; - case 467: - case -737: - case 405: - case -446: - case -742: - case 634: - case -789: - case 85: - type = func(type); - break; - case -571: - case -468: - case 536: - case 513: - case -497: - case 607: - case -411: - case 974: - type = func(type); - break; - case -399: - case -439: - case -98: - case 472: - case -592: - type = func(type); - break; - case 743: - case 931: - case 848: - case 43: - case -930: - type = func(type); - break; - case -812: - case 244: - case 710: - case 565: - case 857: - case 766: - type = func(type); - break; - case 424: - case -921: - case 33: - case 81: - type = func(type); - break; - case 756: - case -438: - case -69: - case -831: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 345: - type = func(type); - break; - case -438: - case 815: - case 940: - case -210: - case -225: - case 995: - case 854: - type = func(type); - break; - case -190: - case -673: - case 786: - type = func(type); - break; - default: - break; - } - } - type = func(type); - break; - case 14: - case -509: - case -759: - case 288: - case 825: - case 947: - try - { - switch (type) - { - case -450: - case -127: - case 567: - case 480: - case -983: - case 715: - case 846: - case 992: - case 574: - type = func(type); - break; - case 740: - case 697: - case -468: - case -345: - case -627: - case 303: - case -81: - case -211: - type = func(type); - break; - case 911: - case -813: - case -387: - case 752: - case 246: - case 913: - case 870: - case 264: - case -679: - type = func(type); - break; - case -657: - case -710: - case 462: - case 504: - case 616: - case -989: - case -59: - case -628: - type = func(type); - break; - case -242: - case -721: - case -992: - case -513: - case 236: - case -366: - type = func(type); - break; - case 469: - type = func(type); - break; - case 836: - case 867: - case 984: - type = func(type); - break; - case 157: - case -217: - case 929: - case 733: - case 937: - type = func(type); - break; - case 566: - case -853: - case -550: - case 525: - case -651: - case 230: - type = func(type); - break; - case -722: - case -807: - case -85: - case -357: - case 431: - case -70: - case 609: - type = func(type); - break; - case 582: - type = func(type); - break; - case 700: - case 376: - case 118: - case 200: - case -557: - case 387: - case 428: - case -547: - case 659: - type = func(type); - break; - case 133: - case -322: - case 575: - case 883: - case -926: - case 820: - case -949: - type = func(type); - break; - case -389: - case 829: - case -517: - case -862: - case -995: - case 231: - case 768: - case 276: - type = func(type); - break; - case 192: - case -565: - case 54: - case 296: - case 125: - case 201: - case -975: - case -967: - type = func(type); - break; - case -998: - case 120: - case 122: - type = func(type); - break; - case 21: - case 71: - case -311: - case 793: - type = func(type); - break; - case 599: - case -382: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 611: - case -122: - case 865: - type = func(type); - break; - case 753: - case 420: - case 561: - case 371: - case 886: - case 432: - case 167: - type = func(type); - break; - case -764: - case -983: - case -395: - case -860: - case -993: - case 477: - case 549: - case 850: - case 514: - type = func(type); - break; - case -69: - case -379: - case 851: - case -193: - case 411: - case 448: - case -788: - case -38: - case -832: - type = func(type); - break; - case -466: - case -377: - case -177: - type = func(type); - break; - case 431: - type = func(type); - break; - case 447: - case -529: - case 189: - case -885: - case 687: - case 955: - case -63: - case -215: - type = func(type); - break; - case -916: - case 652: - case -739: - case -879: - case 68: - type = func(type); - break; - case 54: - case 794: - case 947: - case 244: - case 568: - case -55: - type = func(type); - break; - case -888: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 263: - case -491: - case 286: - case 612: - case 193: - type = func(type); - break; - case -291: - case -698: - type = func(type); - break; - case -57: - type = func(type); - break; - case -676: - case 701: - case 244: - case -335: - case -86: - case -978: - case -642: - type = func(type); - break; - case -441: - case -300: - case -953: - case 589: - case 352: - case 569: - case 29: - type = func(type); - break; - case -813: - case -864: - type = func(type); - break; - case -403: - case -970: - case 191: - type = func(type); - break; - case 446: - case 651: - type = func(type); - break; - case 860: - case 655: - case 959: - case -909: - case -876: - case 803: - type = func(type); - break; - case -908: - case -298: - case -422: - case -346: - type = func(type); - break; - case 650: - case -251: - case -401: - case -777: - case 216: - type = func(type); - break; - case 933: - case -957: - case -836: - case -799: - case -478: - type = func(type); - break; - default: - break; - } - } - finally - { - switch (type) - { - case -654: - case 19: - case -706: - case -491: - case -180: - case 219: - case 262: - type = func(type); - break; - case -502: - case 708: - case 615: - case -259: - type = func(type); - break; - default: - break; - } - switch (type) - { - case 549: - case -161: - case -64: - case 525: - case 608: - case 481: - case 578: - type = func(type); - break; - case 609: - case 430: - case -32: - case 206: - case -474: - type = func(type); - break; - case 128: - case 695: - case 453: - case -579: - case 793: - case -437: - case 778: - case -217: - type = func(type); - break; - case 583: - case 881: - type = func(type); - break; - case 391: - case -926: - case 152: - case 40: - case -17: - case 482: - case 260: - type = func(type); - break; - case -616: - case 204: - case 227: - case -325: - case -87: - case -316: - case 949: - type = func(type); - break; - case 410: - case -137: - case 541: - case 613: - case -307: - case 545: - case 720: - type = func(type); - break; - case -745: - case 194: - case -52: - case 392: - type = func(type); - break; - case -234: - case -596: - case 353: - case 643: - case -751: - case -911: - case 504: - case 794: - type = func(type); - break; - case -553: - case 486: - case 946: - type = func(type); - break; - case 332: - case 924: - case -532: - case -223: - case 507: - type = func(type); - break; - case -386: - case -622: - case 373: - case 571: - case -959: - type = func(type); - break; - case -335: - case 846: - type = func(type); - break; - case -651: - case -215: - type = func(type); - break; - case -466: - case 867: - case 768: - case 618: - case -201: - case 874: - case 31: - case -336: - case -406: - type = func(type); - break; - case 604: - case -160: - case -584: - type = func(type); - break; - case 667: - type = func(type); - break; - case -788: - case 795: - case -666: - case 477: - case 687: - case 839: - case -222: - case 307: - type = func(type); - break; - case -168: - case 311: - case 376: - case 584: - case -757: - case 150: - case 445: - type = func(type); - break; - default: - break; - } - switch (type) - { - case -48: - case -921: - case 303: - type = func(type); - break; - case 124: - case -407: - case 746: - case -157: - case -486: - case -832: - case -226: - case -468: - type = func(type); - break; - case 986: - case -400: - case 43: - case 633: - case -442: - case -985: - type = func(type); - break; - case -899: - case -305: - case 88: - case -540: - case -775: - case 967: - type = func(type); - break; - case 655: - case 80: - case -649: - type = func(type); - break; - case -841: - case 56: - case 758: - case 103: - case 587: - case -682: - type = func(type); - break; - case -330: - case 740: - case 731: - type = func(type); - break; - case 324: - case -391: - case -467: - case -140: - type = func(type); - break; - case -225: - case -460: - case -390: - case -409: - case 429: - case -525: - case -444: - case -743: - type = func(type); - break; - case 489: - case 157: - case -970: - case -910: - case 763: - type = func(type); - break; - case -127: - type = func(type); - break; - case 475: - case 397: - case -117: - type = func(type); - break; - case -275: - case 135: - case 887: - case -725: - case 577: - type = func(type); - break; - case 370: - case -522: - case 926: - case 365: - case -711: - case 238: - type = func(type); - break; - case -461: - case 741: - case -297: - case -270: - type = func(type); - break; - case 201: - case -154: - case -404: - type = func(type); - break; - case 8: - case 512: - case 709: - case 640: - case 81: - case 162: - case 736: - type = func(type); - break; - default: - break; - } - } - type = func(type); - break; - case 384: - case -720: - case -559: - case 762: - case 814: - case 474: - case -297: - case 153: - case -102: - type = func(type); - break; - default: - break; - } - } - return type; - } - - public static int Main() - { - Test test = new Test(); - if (test.func(-1) == -1) - { - System.Console.WriteLine("PASS"); - return 100; - } - else - { - System.Console.WriteLine("FAIL"); - return 1; - } - } -} diff --git a/src/coreclr/tests/src/JIT/jit64/regress/vsw/538615/test1.cs b/src/coreclr/tests/src/JIT/jit64/regress/vsw/538615/test1.cs deleted file mode 100644 index 7a6a5ad5a88a..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/regress/vsw/538615/test1.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -//////////////////////////////////////////////////////////////// -// -// Description -// ____________ -// Code that walks arrays using for loops (or similar coding -// constructs) could incorrectly get IndexOutOfRangeException. -// -// Right Behavior -// ________________ -// No Exception should be thrown -// -// Wrong Behavior -// ________________ -// Throwing some kind of exception, mostly IndexOutOfRange -// -// Commands to issue -// __________________ -// > test1.exe -//////////////////////////////////////////////////////////////// - -using System; - -public class Test -{ - public static int Main(string[] args) - { - int retCode = 100; - - try - { - Test.Check(args.Length); - } - catch (IndexOutOfRangeException e) - { - System.Console.WriteLine("Exception thrown: " + e); - retCode = 1; - } - - return retCode; - } - - public static void Check(int i) - { - int nav = i; - int[] av = new int[8]; - - for (i = 0; i < nav; i++) - { - av[i]--; - } - } -} diff --git a/src/coreclr/tests/src/JIT/jit64/regress/vsw/539509/test1.cs b/src/coreclr/tests/src/JIT/jit64/regress/vsw/539509/test1.cs deleted file mode 100644 index 1a4b95237c04..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/regress/vsw/539509/test1.cs +++ /dev/null @@ -1,730 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -//////////////////////////////////////////////////////////////// -// -// Description -// ____________ -// On IA64 if the only use of a parameter is assigning to it -// inside and EH clause and the parameter is a GC pointer, then -// the JIT reports a stack slot as live for the duration of the method, -// but never initializes it. Sort of the inverse of a GC hole. -// Thus the runtime sees random stack garbage as a GC pointer and -// bad things happen. Workarounds include using the parameter, -// assinging to a different local, removing the assignment (since -// it has no subsequent uses). -// -// -// Right Behavior -// ________________ -// No Assertion -// -// Wrong Behavior -// ________________ -// Assertion -// -// Commands to issue -// __________________ -// > test1.exe -// -// External files -// _______________ -// None -//////////////////////////////////////////////////////////////// - -using System; -using System.Collections; -using System.Runtime.InteropServices; - -class ApplicationException : Exception { } - -#pragma warning disable 1917,1918 -public enum TestEnum -{ - red = 1, - green = 2, - blue = 4, -} - -public class AA - where TA : IComparable where TB : IComparable where TC : IComparable where TD : IComparable where TE : IComparable - -{ - public TC m_aguiGeneric1; - public short[][][] Method1(uint[,,,] param1, ref TestEnum param2) - { - uint local1 = ((uint)(((ulong)(17.0f)))); - double local2 = ((double)(((ulong)(113.0f)))); - String[] local3 = new String[] { "113", "92", "26", "24" }; - while (Convert.ToBoolean(((short)(local1)))) - { - local3[23] = "69"; - do - { - char[][] local4 = new char[][]{(new char[48u]), new char[]{'\x3f', '\x00', - '\x47' }, new char[]{'\x58', '\x39', '\x70', '\x31' }, (new char[48u]), - new char[]{'\x62', '\x6b', '\x19', '\x30', '\x17' } }; - local3 = ((String[])(((Array)(null)))); - while ((((short)(local2)) == ((short)(local2)))) - { - for (App.m_byFwd1 = App.m_byFwd1; ((bool)(((object)(new BB())))); local1--) - { - do - { - while (Convert.ToBoolean((local1 >> 100))) - { - local2 = local2; - } - while ((new AA() == new - AA())) - { - if (((bool)(((object)(new AA()))))) - param1 = (new uint[local1, 107u, 22u, local1]); - if (((bool)(((object)(param2))))) - continue; - if (App.m_bFwd2) - continue; - if ((/*2 REFS*/((byte)(local1)) != /*2 REFS*/((byte)(local1)))) - { - throw new ApplicationException(); - } - } - local1 -= 88u; - while (((bool)(((object)(local2))))) - { - } - if (Convert.ToBoolean(((int)(local2)))) - do - { - } - while (App.m_bFwd2); - else - { - } - } - while ((null != new AA())); - local4 = (local4 = (local4 = new char[][]{(new char[local1]), (new char[ - local1]), (new char[113u]) })); - do - { - } - while (Convert.ToBoolean(local2)); - for (App.m_byFwd1 = ((byte)(local1)); ((bool)(((object)(local1)))); local2 - -= (local2 + local2)) - { - } - while (Convert.ToBoolean(((short)(local1)))) - { - } - } - if (((bool)(((object)(new BB()))))) - { - } - else - for (App.m_iFwd3 -= 33; ((bool)(((object)(local2)))); App.m_bFwd2 = App. - m_bFwd2) - { - } - } - for (App.m_iFwd3 /= (Convert.ToByte(33.0) ^ ((byte)(local1))); App.m_bFwd2; - App.m_shFwd4 = ((short)(((sbyte)(local2))))) - { - } - while (App.m_bFwd2) - { - } - break; - } - while ((/*2 REFS*/((object)(new BB())) != ((AA)( - /*2 REFS*/((object)(new BB())))))); - for (App.m_iFwd3 = 60; ((bool)(((object)(new BB())))); local2 = local2) - { - } - local3 = ((String[])(((object)(local2)))); - } - local3[((int)(((byte)(65))))] = "47"; - try - { - } - catch (IndexOutOfRangeException) - { - } - return new short[][][]{/*2 REFS*/(new short[36u][]), new short[][]{ }, - /*2 REFS*/ - (new short[36u][]) }; - } - public static ulong Static1(TF param1) - { - byte local5 = ((byte)(((long)(69.0)))); - float[,][,] local6 = (new float[9u, 6u][,]); - TestEnum local7 = TestEnum.blue; - do - { - bool[,,,,][,] local8 = (new bool[81u, 98u, ((uint)(58.0f)), ((uint)(36.0f)), - 74u*4u][,]); - while ((((uint)(local5)) != 4u)) - { - if (Convert.ToBoolean((local5 + local5))) - local6 = (new float[((uint)(116.0)), 94u][,]); - else - for (App.m_iFwd3 -= 97; Convert.ToBoolean(((ushort)(local5))); App.m_ushFwd5 - = Math.Max(((ushort)(26)), ((ushort)(43)))) - { - local7 = local7; - } - } - local8[69, 1, 61, 62, 122][24, 40] = true; - local8[97, (((short)(115)) >> ((ushort)(local5))), 29, 29, ((int)(((ulong)( - local5))))][((int)(((long)(119u)))), 52] = false; - try - { - param1 = param1; - param1 = param1; - while ((/*2 REFS*/((sbyte)(local5)) == /*2 REFS*/((sbyte)(local5)))) - { - try - { - throw new IndexOutOfRangeException(); - } - catch (InvalidOperationException) - { - try - { - while (((bool)(((object)(local7))))) - { - return ((ulong)(((int)(7u)))); - } - while ((new AA() == new - AA())) - { - local7 = local7; - local5 = (local5 += local5); - } - while (((bool)(((object)(local5))))) - { - } - goto label1; - } - catch (InvalidOperationException) - { - } - do - { - } - while ((new AA() == new AA( - ))); - label1: - try - { - } - catch (Exception) - { - } - } - for (App.m_fFwd6 = App.m_fFwd6; ((bool)(((object)(new BB())))); App.m_dblFwd7 - /= 94.0) - { - } - for (App.m_shFwd4--; App.m_bFwd2; App.m_ulFwd8 = ((ulong)(((ushort)(local5)) - ))) - { - } - local7 = local7; - local8[((int)(Convert.ToUInt64(26.0))), 60, ((int)(((long)(local5)))), (( - int)(local5)), 96] = (new bool[((uint)(48.0)), 97u]); - } - param1 = (param1 = param1); - } - finally - { - } - local8 = local8; - } - while (((bool)(((object)(local7))))); - if ((local5 == (local5 -= local5))) - while ((((Array)(null)) != ((object)(local7)))) - { - } - else - { - } - for (App.m_dblFwd7++; App.m_bFwd2; App.m_chFwd9 += '\x69') - { - } - return ((ulong)(105)); - } - public static char[] Static2(ulong param1, short param2, ref uint param3, ref - TA param4) - { - long[,,,,][,,][][,,,] local9 = (new long[((uint)(5.0)), 24u, 65u, 9u, 29u] - [,,][][,,,]); - char local10 = ((char)(97)); - double local11 = 102.0; - sbyte[,][,,,][] local12 = (new sbyte[41u, 15u][,,,][]); - try - { - local12[26, 65] = ((sbyte[,,,][])(((object)(new AA() - )))); - try - { - do - { - do - { - do - { - try - { - do - { - try - { - local11 *= 27.0; - try - { - if (Convert.ToBoolean(((ushort)(param1)))) - for (App.m_ushFwd5 /= ((ushort)(17.0f)); (new - AA() != new AA()); - App.m_ushFwd5 *= ((ushort)(((sbyte)(param1))))) - { - } - } - catch (IndexOutOfRangeException) - { - } - do - { - } - while (((bool)(((object)(param1))))); - } - catch (InvalidOperationException) - { - } - } - while (("95" == Convert.ToString(local10))); - local11 -= ((double)(30)); - while (((bool)(((object)(local10))))) - { - } - } - catch (NullReferenceException) - { - } - try - { - } - catch (InvalidOperationException) - { - } - param3 /= ((param3 /= param3) / param3); - } - while ((((long)(param2)) != (55 | param3))); - local10 = ((char)(((object)(local10)))); - param1 *= ((ulong)(((ushort)(54u)))); - try - { - } - catch (ApplicationException) - { - } - param4 = (param4 = param4); - } - while ((param2 == param2)); - do - { - } - while (((bool)(((object)(new AA()))))); - throw new DivideByZeroException(); - } - while ((param3 == (65u / param3))); - do - { - } - while ((((sbyte)(local11)) == ((sbyte)(local11)))); - local12[116, ((int)((param2 *= param2)))] = (new sbyte[((uint)(param2)), ( - param3 += param3), 67u, 116u][]); - try - { - } - finally - { - } - } - finally - { - } - for (App.m_lFwd10 = (60 * param3); ((bool)(((object)(local10)))); local11--) - { - } - local12 = (local12 = (local12 = local12)); - } - catch (IndexOutOfRangeException) - { - } - local9 = local9; - param1 *= (param1 >> ((ushort)(30))); - return new char[] { (local10 = local10), local10, (local10 = local10), '\x7e' }; - } - public static sbyte[][][,,,,][][,,] Static3(TestEnum param1, short param2) - { - param1 = param1; - do - { - sbyte local13 = ((sbyte)(89.0)); - double local14 = 103.0; - uint[,][][,,][,] local15 = (new uint[92u, 102u][][,,][,]); - short[][,,,][,][] local16 = (new short[32u][,,,][,][]); - local15[((int)(((float)(69.0)))), 9][((int)(((ushort)(75.0f))))][((int)(66u)) - , (((byte)(local13)) ^ ((byte)(param2))), ((local13 << local13) << ((ushort - )(local13)))][((int)(63u)), ((int)(((char)(8))))] *= 82u; - param1 = (param1 = param1); - } - while (((bool)(((object)(param1))))); - param1 = param1; - param2 = (param2 /= (param2 = param2)); - return (new sbyte[36u][][,,,,][][,,]); - } - public static long[][,,] Static4(char param1) - { - sbyte[][] local17 = ((sbyte[][])(((Array)(null)))); - ulong[,,] local18 = ((ulong[,,])(((Array)(null)))); - sbyte[][] local19 = new sbyte[][] { (new sbyte[16u]), (new sbyte[126u]) }; - byte local20 = ((byte)(((sbyte)(90u)))); - return (new long[15u][,,]); - } - public static int Static5(ref TE param1, ref char[][,,,] param2, Array param3, - ref ulong[,,,,] param4, ref long[,,,][][][][,] param5) - { - BB[] local21 = ((BB[])(((Array)(null)))); - sbyte local22 = ((sbyte)(121)); - bool local23 = (new AA() == new - AA()); - object[][,,][][,,][,] local24 = (new object[115u][,,][][,,][,]); - while (local23) - { - param1 = param1; - while (local23) - { - try - { - local23 = false; - } - catch (ApplicationException) - { - param2[1] = (new char[57u, ((uint)(68)), 104u, ((uint)(local22))]); - try - { - local22 = local22; - do - { - do - { - local21[((int)(((long)(102u))))].m_achField1[((int)(local22))] = (( - char[,])(((object)(new BB())))); - param3 = ((Array)(null)); - throw new IndexOutOfRangeException(); - } - while (local23); - param3 = ((Array)(null)); - local22 = local22; - local22 = (local22 *= local22); - while ((local23 && (null != new AA()))) - { - for (local22 = local22; local23; App.m_abyFwd11 = App.m_abyFwd11) - { - while (local23) - { - } - } - local22 = local22; - } - } - while ((/*3 REFS*/((uint)(local22)) != (local23 ?/*3 REFS*/((uint)(local22)) - :/*3 REFS*/((uint)(local22))))); - local21[38].m_achField1 = new char[][,]{((char[,])(param3)), (new char[ - 102u, 36u]) }; - } - catch (DivideByZeroException) - { - } - local21 = local21; - } - try - { - } - catch (Exception) - { - } - throw new InvalidOperationException(); - } - try - { - } - catch (ApplicationException) - { - } - for (App.m_uFwd12--; local23; App.m_lFwd10 /= ((long)(((short)(28u))))) - { - } - } - param5 = (new long[108u, 115u, 20u, 126u][][][][,]); - local21[(((ushort)(local22)) << ((int)(local22)))].m_achField1[101] = (new - char[21u, 43u]); - for (App.m_shFwd4 = ((short)(76.0f)); ((bool)(((object)(local23)))); App. - m_chFwd9 *= '\x67') - { - } - if (local23) - try - { - } - catch (InvalidOperationException) - { - } - else - while (local23) - { - } - return 83; - } -} - -[StructLayout(LayoutKind.Sequential)] -public struct BB -{ - public char[][,] m_achField1; - public void Method1(ref uint[][][,] param1, ref String[][] param2, ref char[,] - param3, AA param4, ref - AA param5, int param6) - { - do - { - ushort[] local25 = (new ushort[62u]); - do - { - BB local26 = ((BB)(((object)(new AA())) - )); - param4.m_aguiGeneric1 = new AA(). - m_aguiGeneric1; - try - { - ulong[,,][] local27 = ((ulong[,,][])(((Array)(null)))); - ushort[,] local28 = (new ushort[8u, 8u]); - if ((/*2 REFS*/((short)(param6)) == /*2 REFS*/((short)(param6)))) - while (App.m_bFwd2) - { - for (App.m_ushFwd5--; App.m_bFwd2; App.m_ulFwd8--) - { - param1 = param1; - } - AA.Static3( - TestEnum.blue, - App.m_shFwd4); - param1[(5 ^ param6)][param6] = (new uint[2u, ((uint)(param6))]); - } - else - local28[param6, (((ushort)(param6)) << ((sbyte)(47)))] += ((ushort)((( - ulong)(25u)))); - while (((bool)(((object)(param4))))) - { - AA.Static2( - ((ulong)(114.0)), - ((short)(((long)(49.0f)))), - ref App.m_uFwd12, - ref App.m_gsbFwd13); - try - { - if ((null == new AA())) - if ((((char)(25)) != ((char)(param6)))) - if (App.m_bFwd2) - try - { - param6 /= param6; - while ((((long)(44u)) != ((long)(param6)))) - { - try - { - } - catch (InvalidOperationException) - { - } - do - { - } - while (App.m_bFwd2); - local25 = local25; - for (App.m_shFwd4 -= App.m_shFwd4; Convert.ToBoolean(param6); App. - m_byFwd1 *= Math.Max(((byte)(9u)), ((byte)(40u)))) - { - } - } - local25[12] = App.m_ushFwd5; - local28 = (new ushort[111u, 80u]); - for (App.m_dblFwd7 = App.m_dblFwd7; (param6 == ((int)(101.0))); param6 - *= param6) - { - } - } - catch (IndexOutOfRangeException) - { - } - param1 = param1; - param2[param6] = ((String[])(((Array)(null)))); - try - { - } - catch (ApplicationException) - { - } - } - finally - { - } - } - } - catch (Exception) - { - } - } - while (App.m_bFwd2); - for (App.m_xFwd14 = App.m_xFwd14; ((param6 - (0.0f)) == 86.0f); App.m_fFwd6 += ( - 108u - ((float)(param6)))) - { - } - if ((((object)(new AA())) == "32")) - param5.m_aguiGeneric1 = new AA(). - m_aguiGeneric1; - else - do - { - } - while (((bool)(((object)(new AA()))))); - if (App.m_bFwd2) - { - } - } - while (Convert.ToBoolean(param6)); - param5.m_aguiGeneric1 = (param4 = param4).m_aguiGeneric1; - do - { - } - while (Convert.ToBoolean(param6)); - ; - } -} - -public class App -{ - private static int Main() - { - try - { - Console.WriteLine("Testing AA::Method1"); - ((AA)(((object)(new BB())))).Method1( - (new uint[12u, 115u, 95u, 13u]), - ref App.m_xFwd15); - } - catch (Exception x) - { - Console.WriteLine("Exception handled: " + x.ToString()); - } - try - { - Console.WriteLine("Testing AA::Static1"); - AA.Static1(App.m_agboFwd16); - } - catch (Exception x) - { - Console.WriteLine("Exception handled: " + x.ToString()); - } - try - { - Console.WriteLine("Testing AA::Static2"); - AA.Static2( - ((ulong)(((ushort)(10.0)))), - ((short)(70.0)), - ref App.m_uFwd12, - ref App.m_gsbFwd13); - } - catch (Exception x) - { - Console.WriteLine("Exception handled: " + x.ToString()); - } - try - { - Console.WriteLine("Testing AA::Static3"); - AA.Static3( - TestEnum.green, - ((short)(((sbyte)(69.0))))); - } - catch (Exception x) - { - Console.WriteLine("Exception handled: " + x.ToString()); - } - try - { - Console.WriteLine("Testing AA::Static4"); - AA.Static4('\x02'); - } - catch (Exception x) - { - Console.WriteLine("Exception handled: " + x.ToString()); - } - try - { - Console.WriteLine("Testing AA::Static5"); - AA.Static5( - ref App.m_aglFwd17, - ref App.m_achFwd18, - ((Array)(null)), - ref App.m_aulFwd19, - ref App.m_alFwd20); - } - catch (Exception x) - { - Console.WriteLine("Exception handled: " + x.ToString()); - } - try - { - Console.WriteLine("Testing BB::Method1"); - new BB().Method1( - ref App.m_auFwd21, - ref App.m_axFwd22, - ref App.m_achFwd23, - new AA(), - ref App.m_axFwd24, - 87); - } - catch (Exception x) - { - Console.WriteLine("Exception handled: " + x.ToString()); - } - Console.WriteLine("Passed."); - return 100; - } - public static byte m_byFwd1; - public static bool m_bFwd2; - public static int m_iFwd3; - public static short m_shFwd4; - public static ushort m_ushFwd5; - public static float m_fFwd6; - public static double m_dblFwd7; - public static ulong m_ulFwd8; - public static char m_chFwd9; - public static long m_lFwd10; - public static byte[] m_abyFwd11; - public static uint m_uFwd12; - public static sbyte m_gsbFwd13; - public static Array m_xFwd14; - public static TestEnum m_xFwd15; - public static bool m_agboFwd16; - public static long m_aglFwd17; - public static char[][,,,] m_achFwd18; - public static ulong[,,,,] m_aulFwd19; - public static long[,,,][][][][,] m_alFwd20; - public static uint[][][,] m_auFwd21; - public static String[][] m_axFwd22; - public static char[,] m_achFwd23; - public static AA m_axFwd24; -} diff --git a/src/coreclr/tests/src/JIT/jit64/regress/vsw/541067/test1.cs b/src/coreclr/tests/src/JIT/jit64/regress/vsw/541067/test1.cs deleted file mode 100644 index 76c6db70c9d6..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/regress/vsw/541067/test1.cs +++ /dev/null @@ -1,72 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -//////////////////////////////////////////////////////////////// -// -// Description -// ____________ -// Access violation in JIT when range check is statically -// determined to fail at compile time -// -// Right Behavior -// ________________ -// No Exception -// -// Wrong Behavior -// ________________ -// Unhandled Exception -// -// Commands to issue -// __________________ -// > test1.exe -// -// External files -// _______________ -// None -//////////////////////////////////////////////////////////////// - -using System; - -namespace AutoGen -{ - public class Program - { - static public void Test() - { - int[] a = new int[1]; - a[0] = 0; - - int i; - for (i = 0; i <= a[i]; i++) - { - for (i = 0; i <= a[i]; i++) - { - for (i = 0; i <= a[i]; i++) - { - goto L1; - } - } - } - - L1: - return; - } - - - public static int Main() - { - try - { - Test(); - } - catch (System.Exception exp) - { - System.Console.WriteLine("Unexpected Exception!"); - System.Console.WriteLine(exp); - return 1; - } - return 100; - } - } -} diff --git a/src/coreclr/tests/src/JIT/jit64/regress/vsw/543229/test.cs b/src/coreclr/tests/src/JIT/jit64/regress/vsw/543229/test.cs deleted file mode 100644 index a33e99f87dbd..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/regress/vsw/543229/test.cs +++ /dev/null @@ -1,300 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using AutoGen; - -// We were receiving an assert on IA64 because the code we were using to determine if a range -// check statically fails was invalid. - -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50606.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace AutoGen -{ - public struct VType1 - { - public sbyte f0; - public sbyte f1; - public VType1(int v) - { - f0 = ((sbyte)(v)); - f1 = ((sbyte)(v)); - } - } - public struct VType2 - { - public long f0; - public long f1; - public VType2(int v) - { - f0 = ((long)(v)); - f1 = ((long)(v)); - } - } - public class Program - { - private int[] _callDepthTable; - private int[] _paramValueTable; - public Program() - { - _callDepthTable = new int[6]; - _paramValueTable = new int[12]; - int i; - for (i = 0; (i < _callDepthTable.Length); i = (i + 1)) - { - _callDepthTable[i] = i; - } - for (i = 0; (i < _paramValueTable.Length); i = (i + 1)) - { - _paramValueTable[i] = i; - } - } - - public virtual VType1 Func1(VType1 p0, long p1, uint p2, VType2 p3) - { - if ((_callDepthTable[0] < 5)) - { - _callDepthTable[0] = (_callDepthTable[0] + 1); - } - else - { - return p0; - } - - int acc2 = 0; - int i2 = 0; - int[] arr02 = new int[5]; - int[] arr12 = new int[5]; - int[] arr22 = new int[5]; - int[] arr32 = new int[5]; - int[] arr42 = new int[5]; - int[] arr52 = new int[5]; - for (i2 = 0; (i2 < 5); i2 = (i2 + 1)) - { - arr02[i2] = i2; - arr12[i2] = arr02[i2]; - arr22[i2] = arr12[i2]; - arr32[i2] = arr22[i2]; - arr42[i2] = arr32[i2]; - arr52[i2] = arr42[i2]; - } - i2 = 0; - acc2 = 0; - for (; i2 < 5; i2++) - { - acc2 = (acc2 + arr02[i2]); - } - - if ((acc2 == 0)) - { - acc2 = arr02[10]; - } - if ((acc2 == 1)) - { - acc2 = arr12[10]; - } - if ((acc2 == 2)) - { - acc2 = arr22[10]; - } - if ((acc2 == 3)) - { - acc2 = arr32[10]; - } - if ((acc2 == 4)) - { - acc2 = arr42[10]; - } - if ((acc2 == 5)) - { - acc2 = arr52[10]; - } - if ((acc2 == 6)) - { - acc2 = arr02[10]; - } - if ((acc2 == 7)) - { - acc2 = arr12[10]; - } - if ((acc2 == 8)) - { - acc2 = arr22[10]; - } - if ((acc2 == 9)) - { - acc2 = arr32[10]; - } - - - int i4 = 0; - int[] arr04 = new int[7]; - int[] arr14 = new int[7]; - int[] arr24 = new int[7]; - int[] arr34 = new int[7]; - int[] arr44 = new int[7]; - for (i4 = 0; (i4 < 7); i4 = (i4 + 1)) - { - arr04[i4] = i4; - arr14[i4] = arr04[i4]; - arr24[i4] = arr14[i4]; - arr34[i4] = arr24[i4]; - arr44[i4] = arr34[i4]; - } - - int acc5 = 0; - int i5 = 0; - int[] arr05 = new int[3]; - int[] arr15 = new int[3]; - int[] arr25 = new int[3]; - int[] arr35 = new int[3]; - int[] arr45 = new int[3]; - int[] arr55 = new int[3]; - for (i5 = 0; (i5 < 3); i5 = (i5 + 1)) - { - arr05[i5] = i5; - arr15[i5] = arr05[i5]; - arr25[i5] = arr15[i5]; - arr35[i5] = arr25[i5]; - arr45[i5] = arr35[i5]; - arr55[i5] = arr45[i5]; - } - i5 = 0; - acc5 = 0; - for (; (i5 < 3); i5 = (i5 + 1)) - { - acc5 = (acc5 + arr05[i5]); - for (; (i5 < 3); i5 = (i5 + 1)) - { - acc5 = (acc5 + arr15[i5]); - for (; (i5 < 3); i5 = (i5 + 1)) - { - acc5 = (acc5 + arr25[i5]); - for (; (i5 < 3); i5 = (i5 + 1)) - { - acc5 = (acc5 + arr35[i5]); - for (; (i5 < 3); i5 = (i5 + 1)) - { - acc5 = (acc5 + arr45[i5]); - for (; (i5 < 3); i5 = (i5 + 1)) - { - acc5 = (acc5 + arr55[i5]); - } - } - } - } - } - } - if ((acc5 == 0)) - { - acc5 = arr05[3]; - } - if ((acc5 == 1)) - { - acc5 = arr15[3]; - } - if ((acc5 == 2)) - { - acc5 = arr25[3]; - } - if ((arr05.Length < 0)) - { - goto L2; - } - acc5 = 0; - bool stop2 = (arr05.Length > 0); - for (i5 = 0; (stop2 - && (i5 <= arr05[i5])); i5 = (i5 + 1)) - { - arr05[i5] = i5; - acc5 = (acc5 + arr05[i5]); - for (i5 = 0; (stop2 - && (i5 <= arr15[i5])); i5 = (i5 + 1)) - { - acc5 = (acc5 + arr15[i5]); - i5 = arr15[i5]; - for (i5 = 0; (stop2 - && (i5 <= arr25[i5])); i5 = (i5 + 1)) - { - acc5 = (acc5 + arr25[i5]); - for (i5 = 0; (stop2 - && (i5 <= arr35[i5])); i5 = (i5 + 1)) - { - acc5 = (acc5 + arr35[i5]); - for (i5 = 0; (stop2 - && (i5 <= arr45[i5])); i5 = (i5 + 1)) - { - acc5 = (acc5 + arr45[i5]); - for (i5 = 0; (stop2 - && (i5 <= arr55[i5])); i5 = (i5 + 1)) - { - acc5 = (acc5 + arr55[i5]); - i5 = arr55[i5]; - stop2 = (i5 < 2); - } - stop2 = (i5 < 2); - } - stop2 = (i5 < 2); - } - stop2 = (i5 < 2); - } - stop2 = (i5 < 2); - } - stop2 = (i5 < 2); - } - L2: - i5 = 0; - - int acc6 = 0; - int i6 = 0; - int[] arr6 = new int[4]; - for (i6 = 0; i6 < 4; i6++) - { - arr6[i6] = i6; - } - i6 = 0; - acc6 = 0; - for (; i6 < 4; i6++) - { - acc6 = (acc6 + arr6[i6]); - } - if ((acc6 == 0)) - { - acc6 = arr6[6]; - } - - return p0; - } - - public virtual int Run() - { - try - { - this.Func1(new VType1(_paramValueTable[10]), ((long)(_paramValueTable[6])), ((uint)(_paramValueTable[5])), new VType2(_paramValueTable[11])); - } - catch (System.Exception exp) - { - System.Console.WriteLine("Application Check Failed!"); - System.Console.WriteLine(exp); - return 1; - } - return 100; - } - public static int Main() - { - Program prog = new Program(); - int rc = prog.Run(); - System.Console.WriteLine("rc = {0}", rc); - return rc; - } - } -} diff --git a/src/coreclr/tests/src/JIT/jit64/regress/vsw/543645/test.il b/src/coreclr/tests/src/JIT/jit64/regress/vsw/543645/test.il deleted file mode 100644 index b91a8408d62b..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/regress/vsw/543645/test.il +++ /dev/null @@ -1,126 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - - - - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly extern mscorlib -{ - .ver 0:0:0:0 -} -.assembly ovfldiv1 -{ - .ver 0:0:0:0 -} -.module ovfldiv1_il_r.exe -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 -.corflags 0x00000001 - - - -.class private auto ansi beforefieldinit Overflow - extends [mscorlib]System.Object -{ - .method private hidebysig static int32 - Main(string[] args) cil managed - { - .entrypoint - .locals init (int32 r) - - ldc.i4 100 - stloc r - - .try - { - call int64 Overflow::test1() - call void [System.Console]System.Console::WriteLine(int64) - ldc.i4.1 - stloc r - leave.s end1 - } - catch [mscorlib]System.OverflowException - { - pop - ldstr "OverflowException correctly thrown" - call void [System.Console]System.Console::WriteLine(string) - leave.s end1 - } - - end1: - - call int64 Overflow::test2() - dup - call void [System.Console]System.Console::WriteLine(int64) - ldc.i8 0x8000000000000000 - conv.u8 - beq end2 - ldc.i4.1 - stloc r - - end2: - - .try - { - call int64 Overflow::test3() - call void [System.Console]System.Console::WriteLine(int64) - ldc.i4.1 - stloc r - leave.s end3 - } - catch [mscorlib]System.OverflowException - { - pop - ldstr "OverflowException correctly thrown" - call void [System.Console]System.Console::WriteLine(string) - leave.s end3 - } - - end3: - - ldloc r - ret - } - - .method private hidebysig static int64 - test1() cil managed noinlining - { - ldc.i8 0x8000000000000000 - conv.u8 - ldc.i4.m1 - conv.i8 - mul.ovf - ret - } - - .method private hidebysig static int64 - test2() cil managed noinlining - { - ldc.i8 0x8000000000000000 - conv.u8 - ldc.i4.m1 - conv.i8 - mul - ret - } - - .method private hidebysig static int64 - test3() cil managed noinlining - { - ldc.i8 0x8000000000000000 - conv.u8 - ldc.i4.m1 - conv.i8 - div - ret - } -} diff --git a/src/coreclr/tests/src/JIT/jit64/regress/vsw/549880/test.cs b/src/coreclr/tests/src/JIT/jit64/regress/vsw/549880/test.cs deleted file mode 100644 index 98c0ba7c20de..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/regress/vsw/549880/test.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -namespace RNG -{ - internal class Test - { - private static int Main(string[] args) - { - return foo(10, 20, 30, 40, 50); - } - - private static int foo(int a, int b, int c, int d, int e) - { - int[] x = new int[100]; - int[] y = new int[100]; - int length = 1; - int i, j, k, l = 0; - k = 0; - - do - { - l = 0; - do - { - y[l] = 5; - l++; - } - while (l < b); - e++; - k++; - } while (k < a); - - for (i = 0; i < c; i++) - { - for (j = 0; j < d; j++) - { - // these two should be the same - x[j] = k + i; - y[j] = i + k; - } - } - for (k = 0; k < 100; k++) - { - Console.WriteLine(x[k]); - Console.WriteLine(y[k]); - if (x[k] != y[k]) - { - Console.WriteLine("Array elements do not match!"); - return 0; - } - } - - Console.WriteLine("Passed"); - return 100; - } - } -} diff --git a/src/coreclr/tests/src/JIT/jit64/regress/vsw/552940/test.il b/src/coreclr/tests/src/JIT/jit64/regress/vsw/552940/test.il deleted file mode 100644 index 624481d144b0..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/regress/vsw/552940/test.il +++ /dev/null @@ -1,109 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly extern mscorlib {} -.assembly extern common {} -.assembly test {} - -.module test.exe - - -.class private auto ansi beforefieldinit Program - extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Test(int32 count) cil managed - { - .maxstack 3 - .locals init (int32 V_0) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - .try - { - .try - { - IL_0002: nop - .try - { - IL_0003: ldarg.0 - IL_0004: dup - IL_0005: ldc.i4.1 - IL_0006: sub - IL_0007: starg.s count - IL_0009: brtrue.s IL_000d - - IL_000b: leave.s IL_0016 - - IL_000d: leave.s IL_0002 - - } - finally - { - IL_000f: ldloc.0 - IL_0010: ldc.i4.0 - IL_0011: bge.s IL_0015 - - IL_0013: ldc.i4.0 - IL_0014: stloc.0 - IL_0015: endfinally - } - IL_0016: leave.s IL_001d - - } - finally - { - IL_0018: ldloc.0 - IL_0019: ldc.i4.1 - IL_001a: add - IL_001b: stloc.0 - IL_001c: endfinally - } - IL_001d: leave.s IL_0022 - - } - catch [mscorlib]System.Exception - { - IL_001f: pop - IL_0020: rethrow - } - IL_0022: ldloc.0 - IL_0023: ret - } - - .method private hidebysig static int32 - Main(string[] args) cil managed - { - .entrypoint - .maxstack 2 - .locals init (int32 V_0) - IL_0000: ldc.i4.1 - IL_0001: call int32 Program::Test(int32) - IL_0006: stloc.0 - IL_0007: ldstr "Finally Exec Count: {0}" - IL_000c: ldloc.0 - IL_000d: box [mscorlib]System.Int32 - IL_0012: call void [System.Console]System.Console::WriteLine(string, - object) - IL_0017: ldc.i4.1 - IL_0018: call int32 Program::Test(int32) - IL_001d: ldc.i4.1 - IL_001e: bne.un.s IL_002d - - IL_0020: ldstr "PASS" - IL_0025: call void [System.Console]System.Console::WriteLine(string) - IL_002a: ldc.i4.s 100 - IL_002c: ret - - IL_002d: ldstr "FAIL" - IL_0032: call void [System.Console]System.Console::WriteLine(string) - IL_0037: ldc.i4.1 - IL_0038: ret - } - - -} diff --git a/src/coreclr/tests/src/JIT/jit64/regress/vsw/568666/dll.cs b/src/coreclr/tests/src/JIT/jit64/regress/vsw/568666/dll.cs deleted file mode 100644 index 1c3244688995..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/regress/vsw/568666/dll.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -public static class Library -{ - private static string s_name -#if NoCCtor - = "Library"; -#else - ; - static Library() - { - s_name = "Library"; - } -#endif - - public static string Name { get { return s_name; } } -} diff --git a/src/coreclr/tests/src/JIT/jit64/regress/vsw/575343/test.il b/src/coreclr/tests/src/JIT/jit64/regress/vsw/575343/test.il deleted file mode 100644 index dfc326d761d8..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/regress/vsw/575343/test.il +++ /dev/null @@ -1,105 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly test {} -.module test.exe - -.class private auto ansi beforefieldinit Program - extends [mscorlib]System.Object -{ - .method private hidebysig static void ThrowException(int32 errorCode) cil managed - { - // Code size 75 (0x4b) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: stloc.0 - IL_0003: ldloc.0 - IL_0004: ldc.i4.s -10 - IL_0006: beq.s IL_0035 - - IL_0008: ldloc.0 - IL_0009: ldc.i4.s -3 - IL_000b: sub - IL_000c: switch ( - IL_002a, - IL_0040, - IL_001f) - IL_001d: br.s IL_0040 - - IL_001f: ldstr "-1" - IL_0024: newobj instance void [mscorlib]System.Exception::.ctor(string) - IL_0029: throw - - IL_002a: ldstr "-3" - IL_002f: newobj instance void [mscorlib]System.Exception::.ctor(string) - IL_0034: throw - - IL_0035: ldstr "-10" - IL_003a: newobj instance void [mscorlib]System.Exception::.ctor(string) - IL_003f: throw - - IL_0040: ldstr "others" - IL_0045: newobj instance void [mscorlib]System.Exception::.ctor(string) - IL_004a: throw - } // end of method Program::ThrowException - - .method private hidebysig static int32 - Main(string[] args) cil managed - { - .entrypoint - // Code size 46 (0x2e) - .maxstack 1 - .locals init (int32 V_0) - IL_0000: nop - .try - { - IL_0001: nop - IL_0002: ldc.i4.s 11 - IL_0004: call void Program::ThrowException(int32) - IL_0009: nop - IL_000a: ldstr "Unexcepted result." - IL_000f: call void [System.Console]System.Console::WriteLine(string) - IL_0014: nop - IL_0015: ldc.i4.1 - IL_0016: stloc.0 - IL_0017: leave.s IL_002b - - } // end .try - catch [mscorlib]System.Object - { - IL_0019: pop - IL_001a: nop - IL_001b: ldstr "Excepted result." - IL_0020: call void [System.Console]System.Console::WriteLine(string) - IL_0025: nop - IL_0026: ldc.i4.s 100 - IL_0028: stloc.0 - IL_0029: leave.s IL_002b - - } // end handler - IL_002b: nop - IL_002c: ldloc.0 - IL_002d: ret - } // end of method Program::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method Program::.ctor - -} // end of class Program diff --git a/src/coreclr/tests/src/JIT/jit64/regress/vsw/575343/test2.il b/src/coreclr/tests/src/JIT/jit64/regress/vsw/575343/test2.il deleted file mode 100644 index b4f2b56f37c0..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/regress/vsw/575343/test2.il +++ /dev/null @@ -1,58 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly switchdefaultonly1 {} -.module switchdefaultonly3_il_d.exe - -.class private auto ansi beforefieldinit switchdefaultonly1 - extends [mscorlib]System.Object -{ - .method private hidebysig static int32 - Main(string[] args) cil managed - { - .entrypoint - // Code size 44 (0x2c) - .maxstack 2 - .locals init ([0] int32 V_0) - IL_0000: ldarg.0 - IL_0001: ldlen - IL_0002: conv.i4 - IL_0003: stloc.0 - IL_0004: ldloc.0 - IL_0005: ldc.i4.1 - IL_0006: sub - IL_0007: switch ( - IL_0010) - IL_0010: br.s IL_0012 - - .try - { - IL_0012: ldarg.0 - IL_0013: ldlen - IL_0014: conv.i4 - IL_0015: call void [System.Console]System.Console::WriteLine(int32) - IL_001a: leave.s IL_0024 - - } // end .try - catch [mscorlib]System.Exception - { - IL_001c: pop - IL_001d: call void [mscorlib]System.GC::Collect() - IL_0022: leave.s IL_0024 - - } // end handler - IL_0024: br.s IL_0026 - - IL_0026: ldc.i4 0x64 - IL_002b: ret - } // end of method switchdefaultonly1::Main - -} // end of class switchdefaultonly1 diff --git a/src/coreclr/tests/src/JIT/jit64/valuetypes/nullable/box-unbox/structdef.cs b/src/coreclr/tests/src/JIT/jit64/valuetypes/nullable/box-unbox/structdef.cs deleted file mode 100644 index b22d01f278a8..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/valuetypes/nullable/box-unbox/structdef.cs +++ /dev/null @@ -1,415 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -#pragma warning disable 0183 // The given expression is always of the provided ('X') type - -using System; -using System.ComponentModel; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Runtime.Loader; -// primitives / CLR Types - -// interfaces -public interface IEmpty { } -public interface INotEmpty -{ - void DoNothing(); -} - -// generic interfaces -public interface IEmptyGen { } -public interface INotEmptyGen -{ - void DoNothing(); -} - -// struct -public struct EmptyStruct { } -public struct NotEmptyStruct -{ - public int Field; -} - -public struct NotEmptyStructQ -{ - public int? Field; -} - -public struct NotEmptyStructA -{ - public int[] Field; -} - -public struct NotEmptyStructQA -{ - public int?[] Field; -} - -// generic structs -public struct EmptyStructGen { } -public struct NotEmptyStructGen -{ - public T Field; -} - -public struct NotEmptyStructConstrainedGen where T : struct -{ - public T Field; -} - -public struct NotEmptyStructConstrainedGenA where T : struct -{ - public T[] Field; -} - -public struct NotEmptyStructConstrainedGenQ where T : struct -{ - public T? Field; -} - -public struct NotEmptyStructConstrainedGenQA where T : struct -{ - public T?[] Field; -} - -// nested struct -public struct NestedStruct -{ - public struct Nested { } -} - -public struct NestedStructGen -{ - public struct Nested { } -} - - -// struct with Field Offset -[StructLayout(LayoutKind.Explicit)] -public struct ExplicitFieldOffsetStruct -{ - [FieldOffset(0)] - public int Field00; - [FieldOffset(0x0f)] - public int Field15; -} - -// struct with Attributes -internal struct MarshalAsStruct -{ - [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPWStr)] - public string StringField; -} - -// struct implement interfaces -internal struct ImplementOneInterface : IEmpty { } - -internal struct ImplementTwoInterface : IEmpty, INotEmpty -{ - public void DoNothing() { } -} - -internal struct ImplementOneInterfaceGen : IEmptyGen { } - -internal struct ImplementTwoInterfaceGen : IEmptyGen, INotEmptyGen -{ - public void DoNothing() { } -} - -internal struct ImplementAllInterface : IEmpty, INotEmpty, IEmptyGen, INotEmptyGen -{ - public void DoNothing() { } - void INotEmptyGen.DoNothing() { } -} - -// enums -public enum IntE { start = 1, } -public enum ByteE : byte { start = 1, } -public enum LongE : long { start = 1, } - - -// other intersting structs -public struct WithMultipleGCHandleStruct -{ - public GCHandle H1; - public GCHandle H2; - public GCHandle H3; - public GCHandle H4; - public GCHandle H5; -} - -public struct WithOnlyFXTypeStruct -{ - public Guid GUID; - public decimal DECIMAL; -} - - -public struct MixedAllStruct -{ - public int INT; - public int? IntQ; - public int?[] IntQA; - public string STRING; - public IntE INTE; - public EmptyClass EMPTYCLASS; - public IEmpty IEMPTY; - public EmptyStruct EMPTYSTRUCT; - public IEmptyGen IEMPTYGEN; - public EmptyStructGen EMPTYSTRUCTGEN; - public WithOnlyFXTypeStruct WITHONLYFXTYPESTRUCT; - public GCHandle GCHANDLE; -} - - -// other types -public struct EmptyClass { } -public struct NotEmptyClass -{ - public int Field; -} - -public struct EmptyClassGen { } -public struct NotEmptyClassGen -{ - public T Field; -} - -public struct NotEmptyClassConstrainedGen where T : class -{ - public T Field; -} -public struct NestedClass -{ - public struct Nested { } -} - -public struct NestedClassGen -{ - public struct Nested { } -} - -internal class ImplementOneInterfaceC : IEmpty { } - -internal class ImplementTwoInterfaceC : IEmpty, INotEmpty -{ - public void DoNothing() { } -} - -internal class ImplementOneInterfaceGenC : IEmptyGen { } - -internal class ImplementTwoInterfaceGenC : IEmptyGen, INotEmptyGen -{ - public void DoNothing() { } -} - -internal class ImplementAllInterfaceC : IEmpty, INotEmpty, IEmptyGen, INotEmptyGen -{ - public void DoNothing() { } - void INotEmptyGen.DoNothing() { } -} - -public sealed class SealedClass { } - -public delegate void SimpleDelegate(); -public delegate void GenericDelegate(); - - -// ExitCode -public static class ExitCode -{ - public static int Failed = 101; - public static int Passed = 100; -} - -// Create Value Instance -internal static class Helper -{ - public static GCHandle GCHANDLE; - - static Helper() - { - GCHANDLE = GCHandle.Alloc(Console.Out); - - AssemblyLoadContext currentContext = AssemblyLoadContext.GetLoadContext(Assembly.GetExecutingAssembly()); - if (currentContext != null) - { - currentContext.Unloading += Context_Unloading; - } - } - - private static void Context_Unloading(AssemblyLoadContext obj) - { - GCHANDLE.Free(); - } - - public static char Create(char val) { return 'c'; } - public static bool Create(bool val) { return true; } - public static byte Create(byte val) { return 0x08; } - public static sbyte Create(sbyte val) { return -0x0e; } - public static short Create(short val) { return -0x0f; } - public static ushort Create(ushort val) { return 0xff; } - public static int Create(int val) { return 100; } - public static uint Create(uint val) { return 200; } - public static long Create(long val) { return int.MaxValue; } - public static ulong Create(ulong val) { return 300; } - public static float Create(float val) { return 1.15f; } - public static double Create(double val) { return 0.05; } - public static decimal Create(decimal val) { return 1.0M; } - - public static IntPtr Create(IntPtr val) { return (IntPtr)1000; } - public static UIntPtr Create(UIntPtr val) { return (UIntPtr)2000; } - public static Guid Create(Guid val) { return new Guid("00020810-0001-0000-C000-000000000046"); } - public static GCHandle Create(GCHandle val) { return GCHANDLE; } - public static ByteE Create(ByteE val) { return (ByteE)9; } - public static IntE Create(IntE val) { return (IntE)55; } - public static LongE Create(LongE val) { return (LongE)34; } - public static EmptyStruct Create(EmptyStruct val) { return new EmptyStruct(); } - public static NotEmptyStruct Create(NotEmptyStruct val) { NotEmptyStruct ne = new NotEmptyStruct(); ne.Field = 100; return ne; } - public static NotEmptyStructQ Create(NotEmptyStructQ val) { NotEmptyStructQ neq = new NotEmptyStructQ(); neq.Field = 101; return neq; } - public static NotEmptyStructA Create(NotEmptyStructA val) { NotEmptyStructA nea = new NotEmptyStructA(); nea.Field = new int[] { 10 }; return nea; } - public static NotEmptyStructQA Create(NotEmptyStructQA val) { NotEmptyStructQA neq = new NotEmptyStructQA(); neq.Field = new int?[] { 10 }; return neq; } - public static EmptyStructGen Create(EmptyStructGen val) { return new EmptyStructGen(); } - public static NotEmptyStructGen Create(NotEmptyStructGen val) { NotEmptyStructGen ne = new NotEmptyStructGen(); ne.Field = 88; return ne; } - public static NotEmptyStructConstrainedGen Create(NotEmptyStructConstrainedGen val) { NotEmptyStructConstrainedGen ne = new NotEmptyStructConstrainedGen(); ne.Field = 1010; return ne; } - public static NotEmptyStructConstrainedGenA Create(NotEmptyStructConstrainedGenA val) { NotEmptyStructConstrainedGenA neq = new NotEmptyStructConstrainedGenA(); neq.Field = new int[] { 11 }; return neq; } - public static NotEmptyStructConstrainedGenQ Create(NotEmptyStructConstrainedGenQ val) { NotEmptyStructConstrainedGenQ neq = new NotEmptyStructConstrainedGenQ(); neq.Field = 12; return neq; } - public static NotEmptyStructConstrainedGenQA Create(NotEmptyStructConstrainedGenQA val) { NotEmptyStructConstrainedGenQA neq = new NotEmptyStructConstrainedGenQA(); neq.Field = new int?[] { 17 }; return neq; } - public static NestedStruct Create(NestedStruct val) { NestedStruct ns = new NestedStruct(); return ns; } - public static NestedStructGen Create(NestedStructGen val) { NestedStructGen nsg = new NestedStructGen(); return nsg; } - public static ExplicitFieldOffsetStruct Create(ExplicitFieldOffsetStruct val) { ExplicitFieldOffsetStruct epl = new ExplicitFieldOffsetStruct(); epl.Field00 = 40; epl.Field15 = 15; return epl; } - public static MarshalAsStruct Create(MarshalAsStruct val) { MarshalAsStruct ma = new MarshalAsStruct(); ma.StringField = "Nullable"; return ma; } - public static ImplementOneInterface Create(ImplementOneInterface val) { ImplementOneInterface imp = new ImplementOneInterface(); return imp; } - public static ImplementTwoInterface Create(ImplementTwoInterface val) { ImplementTwoInterface imp = new ImplementTwoInterface(); return imp; } - public static ImplementOneInterfaceGen Create(ImplementOneInterfaceGen val) { ImplementOneInterfaceGen imp = new ImplementOneInterfaceGen(); return imp; } - public static ImplementTwoInterfaceGen Create(ImplementTwoInterfaceGen val) { ImplementTwoInterfaceGen imp = new ImplementTwoInterfaceGen(); return imp; } - public static ImplementAllInterface Create(ImplementAllInterface val) { ImplementAllInterface imp = new ImplementAllInterface(); return imp; } - public static WithMultipleGCHandleStruct Create(WithMultipleGCHandleStruct val) - { WithMultipleGCHandleStruct mgch = new WithMultipleGCHandleStruct(); mgch.H1 = GCHANDLE; mgch.H2 = GCHANDLE; mgch.H3 = GCHANDLE; mgch.H4 = GCHANDLE; mgch.H5 = GCHANDLE; return mgch; } - public static WithOnlyFXTypeStruct Create(WithOnlyFXTypeStruct val) { WithOnlyFXTypeStruct wofx = new WithOnlyFXTypeStruct(); wofx.DECIMAL = 50.0m; wofx.GUID = Create(default(Guid)); return wofx; } - public static MixedAllStruct Create(MixedAllStruct val) - { - MixedAllStruct mas; - mas.INT = 10; - mas.IntQ = null; - mas.IntQA = new int?[] { 10 }; - mas.STRING = "Nullable"; - mas.INTE = Create(default(IntE)); - mas.EMPTYCLASS = new EmptyClass(); - mas.IEMPTY = Create(default(ImplementOneInterface)); - mas.EMPTYSTRUCT = Create(default(EmptyStruct)); - mas.IEMPTYGEN = Create(default(ImplementOneInterfaceGen)); - mas.EMPTYSTRUCTGEN = Create(default(EmptyStructGen)); - mas.WITHONLYFXTYPESTRUCT = Create(default(WithOnlyFXTypeStruct)); - mas.GCHANDLE = Create(default(GCHandle)); - - return mas; - } - - public static bool Compare(char val, char val1) { return val == val1; } - public static bool Compare(bool val, bool val1) { return val == val1; } - public static bool Compare(byte val, byte val1) { return val == val1; } - public static bool Compare(sbyte val, sbyte val1) { return val == val1; } - public static bool Compare(short val, short val1) { return val == val1; } - public static bool Compare(ushort val, ushort val1) { return val == val1; } - public static bool Compare(int val, int val1) { return val == val1; } - public static bool Compare(uint val, uint val1) { return val == val1; } - public static bool Compare(long val, long val1) { return val == val1; } - public static bool Compare(ulong val, ulong val1) { return val == val1; } - public static bool Compare(float val, float val1) { return val == val1; } - public static bool Compare(double val, double val1) { return val == val1; } - public static bool Compare(decimal val, decimal val1) { return val == val1; } - - public static bool Compare(IntPtr val, IntPtr val1) { return val == val1; } - public static bool Compare(UIntPtr val, UIntPtr val1) { return val == val1; } - public static bool Compare(Guid val, Guid val1) { return val == val1; } - public static bool Compare(GCHandle val, GCHandle val1) { return val == val1; } - public static bool Compare(ByteE val, ByteE val1) { return val == val1; } - public static bool Compare(IntE val, IntE val1) { return val == val1; } - public static bool Compare(LongE val, LongE val1) { return val == val1; } - public static bool Compare(EmptyStruct val, EmptyStruct val1) { return val.Equals(val1); } - public static bool Compare(NotEmptyStruct val, NotEmptyStruct val1) { return val.Field == val1.Field; } - public static bool Compare(NotEmptyStructQ val, NotEmptyStructQ val1) { return val.Field == val1.Field; } - public static bool Compare(NotEmptyStructA val, NotEmptyStructA val1) { return val.Field[0] == val1.Field[0]; } - public static bool Compare(NotEmptyStructQA val, NotEmptyStructQA val1) { return val.Field[0] == val1.Field[0]; } - public static bool Compare(EmptyStructGen val, EmptyStructGen val1) { return val.Equals(val1); } - public static bool Compare(NotEmptyStructGen val, NotEmptyStructGen val1) { return val.Field == val1.Field; } - public static bool Compare(NotEmptyStructConstrainedGen val, NotEmptyStructConstrainedGen val1) { return val.Field == val1.Field; } - public static bool Compare(NotEmptyStructConstrainedGenA val, NotEmptyStructConstrainedGenA val1) { return val.Field[0] == val1.Field[0]; } - public static bool Compare(NotEmptyStructConstrainedGenQ val, NotEmptyStructConstrainedGenQ val1) { return val.Field == val1.Field; } - public static bool Compare(NotEmptyStructConstrainedGenQA val, NotEmptyStructConstrainedGenQA val1) { return val.Field[0] == val1.Field[0]; } - public static bool Compare(NestedStruct val, NestedStruct val1) { return val.Equals(val1); } - public static bool Compare(NestedStructGen val, NestedStructGen val1) { return val.Equals(val1); } - public static bool Compare(ExplicitFieldOffsetStruct val, ExplicitFieldOffsetStruct val1) { return (val.Field00 == val1.Field00) && (val.Field15 == val1.Field15); } - public static bool Compare(MarshalAsStruct val, MarshalAsStruct val1) { return val.Equals(val1); } - public static bool Compare(ImplementOneInterface val, ImplementOneInterface val1) { return (val is IEmpty) && val.Equals(val1); } - public static bool Compare(ImplementTwoInterface val, ImplementTwoInterface val1) { return (val is IEmpty) && val is INotEmpty && val.Equals(val1); } - public static bool Compare(ImplementOneInterfaceGen val, ImplementOneInterfaceGen val1) { return val is IEmptyGen && val.Equals(val1); } - public static bool Compare(ImplementTwoInterfaceGen val, ImplementTwoInterfaceGen val1) { return val is IEmptyGen && val is INotEmptyGen && val.Equals(val1); } - public static bool Compare(ImplementAllInterface val, ImplementAllInterface val1) { return val is IEmpty && val is INotEmpty && val is IEmptyGen && val is INotEmptyGen && val.Equals(val1); } - public static bool Compare(WithMultipleGCHandleStruct val, WithMultipleGCHandleStruct val1) - { return val.H1 == val1.H1 && val.H2 == val1.H2 && val.H3 == val1.H3 && val.H4 == val1.H4 && val.H5 == val1.H5; } - public static bool Compare(WithOnlyFXTypeStruct val, WithOnlyFXTypeStruct val1) { return val.GUID == val1.GUID && val.DECIMAL == val1.DECIMAL; } - public static bool Compare(MixedAllStruct val, MixedAllStruct val1) - { - return val.INT == val1.INT && - val.IntQ == val1.IntQ && - val.IntQA[0] == val1.IntQA[0] && - val.STRING == val1.STRING && - val.INTE == val1.INTE && - val.EMPTYCLASS.Equals(val1.EMPTYCLASS) && - val.IEMPTY.Equals(val1.IEMPTY) && - Compare(val.EMPTYSTRUCT, val1.EMPTYSTRUCT) && - val.IEMPTYGEN.Equals(val1.IEMPTYGEN) && - Compare(val.EMPTYSTRUCTGEN, val1.EMPTYSTRUCTGEN) && - Compare(val.WITHONLYFXTYPESTRUCT, val1.WITHONLYFXTYPESTRUCT) && - Compare(val.GCHANDLE, val1.GCHANDLE); - } - - public static bool Compare(char? val, char val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(bool? val, bool val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(byte? val, byte val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(sbyte? val, sbyte val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(short? val, short val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(ushort? val, ushort val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(int? val, int val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(uint? val, uint val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(long? val, long val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(ulong? val, ulong val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(float? val, float val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(double? val, double val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(decimal? val, decimal val1) { return val == null ? false : Compare(val.Value, val1); } - - public static bool Compare(IntPtr? val, IntPtr val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(UIntPtr? val, UIntPtr val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(Guid? val, Guid val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(GCHandle? val, GCHandle val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(ByteE? val, ByteE val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(IntE? val, IntE val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(LongE? val, LongE val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(EmptyStruct? val, EmptyStruct val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(NotEmptyStruct? val, NotEmptyStruct val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(NotEmptyStructQ? val, NotEmptyStructQ val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(NotEmptyStructA? val, NotEmptyStructA val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(NotEmptyStructQA? val, NotEmptyStructQA val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(EmptyStructGen? val, EmptyStructGen val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(NotEmptyStructGen? val, NotEmptyStructGen val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(NotEmptyStructConstrainedGen? val, NotEmptyStructConstrainedGen val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(NotEmptyStructConstrainedGenA? val, NotEmptyStructConstrainedGenA val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(NotEmptyStructConstrainedGenQ? val, NotEmptyStructConstrainedGenQ val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(NotEmptyStructConstrainedGenQA? val, NotEmptyStructConstrainedGenQA val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(NestedStruct? val, NestedStruct val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(NestedStructGen? val, NestedStructGen val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(ExplicitFieldOffsetStruct? val, ExplicitFieldOffsetStruct val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(MarshalAsStruct? val, MarshalAsStruct val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(ImplementOneInterface? val, ImplementOneInterface val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(ImplementTwoInterface? val, ImplementTwoInterface val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(ImplementOneInterfaceGen? val, ImplementOneInterfaceGen val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(ImplementTwoInterfaceGen? val, ImplementTwoInterfaceGen val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(ImplementAllInterface? val, ImplementAllInterface val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(WithMultipleGCHandleStruct? val, WithMultipleGCHandleStruct val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(WithOnlyFXTypeStruct? val, WithOnlyFXTypeStruct val1) { return val == null ? false : Compare(val.Value, val1); } - public static bool Compare(MixedAllStruct? val, MixedAllStruct val1) { return val == null ? false : Compare(val.Value, val1); } -} diff --git a/src/coreclr/tests/src/JIT/jit64/valuetypes/nullable/castclass/structdef.cs b/src/coreclr/tests/src/JIT/jit64/valuetypes/nullable/castclass/structdef.cs deleted file mode 100644 index 64363ad01a5a..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/valuetypes/nullable/castclass/structdef.cs +++ /dev/null @@ -1,415 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -#pragma warning disable 0183 - -using System; -using System.ComponentModel; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Runtime.Loader; -// primitives / CLR Types - -// interfaces -public interface IEmpty { } -public interface INotEmpty -{ - void DoNothing(); -} - -// generic interfaces -public interface IEmptyGen { } -public interface INotEmptyGen -{ - void DoNothing(); -} - -// struct -public struct EmptyStruct { } -public struct NotEmptyStruct -{ - public int Field; -} - -public struct NotEmptyStructQ -{ - public int? Field; -} - -public struct NotEmptyStructA -{ - public int[] Field; -} - -public struct NotEmptyStructQA -{ - public int?[] Field; -} - -// generic structs -public struct EmptyStructGen { } -public struct NotEmptyStructGen -{ - public T Field; -} - -public struct NotEmptyStructConstrainedGen where T : struct -{ - public T Field; -} - -public struct NotEmptyStructConstrainedGenA where T : struct -{ - public T[] Field; -} - -public struct NotEmptyStructConstrainedGenQ where T : struct -{ - public T? Field; -} - -public struct NotEmptyStructConstrainedGenQA where T : struct -{ - public T?[] Field; -} - -// nested struct -public struct NestedStruct -{ - public struct Nested { } -} - -public struct NestedStructGen -{ - public struct Nested { } -} - - -// struct with Field Offset -[StructLayout(LayoutKind.Explicit)] -public struct ExplicitFieldOffsetStruct -{ - [FieldOffset(0)] - public int Field00; - [FieldOffset(0x0f)] - public int Field15; -} - -// struct with Attributes -internal struct MarshalAsStruct -{ - [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPWStr)] - public string StringField; -} - -// struct implement interfaces -internal struct ImplementOneInterface : IEmpty { } - -internal struct ImplementTwoInterface : IEmpty, INotEmpty -{ - public void DoNothing() { } -} - -internal struct ImplementOneInterfaceGen : IEmptyGen { } - -internal struct ImplementTwoInterfaceGen : IEmptyGen, INotEmptyGen -{ - public void DoNothing() { } -} - -internal struct ImplementAllInterface : IEmpty, INotEmpty, IEmptyGen, INotEmptyGen -{ - public void DoNothing() { } - void INotEmptyGen.DoNothing() { } -} - -// enums -public enum IntE { start = 1, } -public enum ByteE : byte { start = 1, } -public enum LongE : long { start = 1, } - - -// other intersting structs -public struct WithMultipleGCHandleStruct -{ - public GCHandle H1; - public GCHandle H2; - public GCHandle H3; - public GCHandle H4; - public GCHandle H5; -} - -public struct WithOnlyFXTypeStruct -{ - public Guid GUID; - public decimal DECIMAL; -} - - -public struct MixedAllStruct -{ - public int INT; - public int? IntQ; - public int?[] IntQA; - public string STRING; - public IntE INTE; - public EmptyClass EMPTYCLASS; - public IEmpty IEMPTY; - public EmptyStruct EMPTYSTRUCT; - public IEmptyGen IEMPTYGEN; - public EmptyStructGen EMPTYSTRUCTGEN; - public WithOnlyFXTypeStruct WITHONLYFXTYPESTRUCT; - public GCHandle GCHANDLE; -} - - -// other types -public struct EmptyClass { } -public struct NotEmptyClass -{ - public int Field; -} - -public struct EmptyClassGen { } -public struct NotEmptyClassGen -{ - public T Field; -} - -public struct NotEmptyClassConstrainedGen where T : class -{ - public T Field; -} -public struct NestedClass -{ - public struct Nested { } -} - -public struct NestedClassGen -{ - public struct Nested { } -} - -internal class ImplementOneInterfaceC : IEmpty { } - -internal class ImplementTwoInterfaceC : IEmpty, INotEmpty -{ - public void DoNothing() { } -} - -internal class ImplementOneInterfaceGenC : IEmptyGen { } - -internal class ImplementTwoInterfaceGenC : IEmptyGen, INotEmptyGen -{ - public void DoNothing() { } -} - -internal class ImplementAllInterfaceC : IEmpty, INotEmpty, IEmptyGen, INotEmptyGen -{ - public void DoNothing() { } - void INotEmptyGen.DoNothing() { } -} - -public sealed class SealedClass { } - -public delegate void SimpleDelegate(); -public delegate void GenericDelegate(); - - -// ExitCode -public static class ExitCode -{ - public static int Failed = 101; - public static int Passed = 100; -} - -// Create Value Instance -internal static class Helper -{ - public static GCHandle GCHANDLE; - - static Helper() - { - GCHANDLE = GCHandle.Alloc(Console.Out); - - AssemblyLoadContext currentContext = AssemblyLoadContext.GetLoadContext(Assembly.GetExecutingAssembly()); - if (currentContext != null) - { - currentContext.Unloading += Context_Unloading; - } - } - - private static void Context_Unloading(AssemblyLoadContext obj) - { - GCHANDLE.Free(); - } - - public static char Create(char val) { return 'c'; } - public static bool Create(bool val) { return true; } - public static byte Create(byte val) { return 0x08; } - public static sbyte Create(sbyte val) { return -0x0e; } - public static short Create(short val) { return -0x0f; } - public static ushort Create(ushort val) { return 0xff; } - public static int Create(int val) { return 100; } - public static uint Create(uint val) { return 200; } - public static long Create(long val) { return int.MaxValue; } - public static ulong Create(ulong val) { return 300; } - public static float Create(float val) { return 1.15f; } - public static double Create(double val) { return 0.05; } - public static decimal Create(decimal val) { return 1.0M; } - - public static IntPtr Create(IntPtr val) { return (IntPtr)1000; } - public static UIntPtr Create(UIntPtr val) { return (UIntPtr)2000; } - public static Guid Create(Guid val) { return new Guid("00020810-0001-0000-C000-000000000046"); } - public static GCHandle Create(GCHandle val) { return GCHANDLE; } - public static ByteE Create(ByteE val) { return (ByteE)9; } - public static IntE Create(IntE val) { return (IntE)55; } - public static LongE Create(LongE val) { return (LongE)34; } - public static EmptyStruct Create(EmptyStruct val) { return new EmptyStruct(); } - public static NotEmptyStruct Create(NotEmptyStruct val) { NotEmptyStruct ne = new NotEmptyStruct(); ne.Field = 100; return ne; } - public static NotEmptyStructQ Create(NotEmptyStructQ val) { NotEmptyStructQ neq = new NotEmptyStructQ(); neq.Field = 101; return neq; } - public static NotEmptyStructA Create(NotEmptyStructA val) { NotEmptyStructA nea = new NotEmptyStructA(); nea.Field = new int[] { 10 }; return nea; } - public static NotEmptyStructQA Create(NotEmptyStructQA val) { NotEmptyStructQA neq = new NotEmptyStructQA(); neq.Field = new int?[] { 10 }; return neq; } - public static EmptyStructGen Create(EmptyStructGen val) { return new EmptyStructGen(); } - public static NotEmptyStructGen Create(NotEmptyStructGen val) { NotEmptyStructGen ne = new NotEmptyStructGen(); ne.Field = 88; return ne; } - public static NotEmptyStructConstrainedGen Create(NotEmptyStructConstrainedGen val) { NotEmptyStructConstrainedGen ne = new NotEmptyStructConstrainedGen(); ne.Field = 1010; return ne; } - public static NotEmptyStructConstrainedGenA Create(NotEmptyStructConstrainedGenA val) { NotEmptyStructConstrainedGenA neq = new NotEmptyStructConstrainedGenA(); neq.Field = new int[] { 11 }; return neq; } - public static NotEmptyStructConstrainedGenQ Create(NotEmptyStructConstrainedGenQ val) { NotEmptyStructConstrainedGenQ neq = new NotEmptyStructConstrainedGenQ(); neq.Field = 12; return neq; } - public static NotEmptyStructConstrainedGenQA Create(NotEmptyStructConstrainedGenQA val) { NotEmptyStructConstrainedGenQA neq = new NotEmptyStructConstrainedGenQA(); neq.Field = new int?[] { 17 }; return neq; } - public static NestedStruct Create(NestedStruct val) { NestedStruct ns = new NestedStruct(); return ns; } - public static NestedStructGen Create(NestedStructGen val) { NestedStructGen nsg = new NestedStructGen(); return nsg; } - public static ExplicitFieldOffsetStruct Create(ExplicitFieldOffsetStruct val) { ExplicitFieldOffsetStruct epl = new ExplicitFieldOffsetStruct(); epl.Field00 = 40; epl.Field15 = 15; return epl; } - public static MarshalAsStruct Create(MarshalAsStruct val) { MarshalAsStruct ma = new MarshalAsStruct(); ma.StringField = "Nullable"; return ma; } - public static ImplementOneInterface Create(ImplementOneInterface val) { ImplementOneInterface imp = new ImplementOneInterface(); return imp; } - public static ImplementTwoInterface Create(ImplementTwoInterface val) { ImplementTwoInterface imp = new ImplementTwoInterface(); return imp; } - public static ImplementOneInterfaceGen Create(ImplementOneInterfaceGen val) { ImplementOneInterfaceGen imp = new ImplementOneInterfaceGen(); return imp; } - public static ImplementTwoInterfaceGen Create(ImplementTwoInterfaceGen val) { ImplementTwoInterfaceGen imp = new ImplementTwoInterfaceGen(); return imp; } - public static ImplementAllInterface Create(ImplementAllInterface val) { ImplementAllInterface imp = new ImplementAllInterface(); return imp; } - public static WithMultipleGCHandleStruct Create(WithMultipleGCHandleStruct val) - { WithMultipleGCHandleStruct mgch = new WithMultipleGCHandleStruct(); mgch.H1 = GCHANDLE; mgch.H2 = GCHANDLE; mgch.H3 = GCHANDLE; mgch.H4 = GCHANDLE; mgch.H5 = GCHANDLE; return mgch; } - public static WithOnlyFXTypeStruct Create(WithOnlyFXTypeStruct val) { WithOnlyFXTypeStruct wofx = new WithOnlyFXTypeStruct(); wofx.DECIMAL = 50.0m; wofx.GUID = Create(default(Guid)); return wofx; } - public static MixedAllStruct Create(MixedAllStruct val) - { - MixedAllStruct mas; - mas.INT = 10; - mas.IntQ = null; - mas.IntQA = new int?[] { 10 }; - mas.STRING = "Nullable"; - mas.INTE = Create(default(IntE)); - mas.EMPTYCLASS = new EmptyClass(); - mas.IEMPTY = Create(default(ImplementOneInterface)); - mas.EMPTYSTRUCT = Create(default(EmptyStruct)); - mas.IEMPTYGEN = Create(default(ImplementOneInterfaceGen)); - mas.EMPTYSTRUCTGEN = Create(default(EmptyStructGen)); - mas.WITHONLYFXTYPESTRUCT = Create(default(WithOnlyFXTypeStruct)); - mas.GCHANDLE = Create(default(GCHandle)); - - return mas; - } - - public static bool Compare(char val, char val1) { return val == val1; } - public static bool Compare(bool val, bool val1) { return val == val1; } - public static bool Compare(byte val, byte val1) { return val == val1; } - public static bool Compare(sbyte val, sbyte val1) { return val == val1; } - public static bool Compare(short val, short val1) { return val == val1; } - public static bool Compare(ushort val, ushort val1) { return val == val1; } - public static bool Compare(int val, int val1) { return val == val1; } - public static bool Compare(uint val, uint val1) { return val == val1; } - public static bool Compare(long val, long val1) { return val == val1; } - public static bool Compare(ulong val, ulong val1) { return val == val1; } - public static bool Compare(float val, float val1) { return val == val1; } - public static bool Compare(double val, double val1) { return val == val1; } - public static bool Compare(decimal val, decimal val1) { return val == val1; } - - public static bool Compare(IntPtr val, IntPtr val1) { return val == val1; } - public static bool Compare(UIntPtr val, UIntPtr val1) { return val == val1; } - public static bool Compare(Guid val, Guid val1) { return val == val1; } - public static bool Compare(GCHandle val, GCHandle val1) { return val == val1; } - public static bool Compare(ByteE val, ByteE val1) { return val == val1; } - public static bool Compare(IntE val, IntE val1) { return val == val1; } - public static bool Compare(LongE val, LongE val1) { return val == val1; } - public static bool Compare(EmptyStruct val, EmptyStruct val1) { return val.Equals(val1); } - public static bool Compare(NotEmptyStruct val, NotEmptyStruct val1) { return val.Field == val1.Field; } - public static bool Compare(NotEmptyStructQ val, NotEmptyStructQ val1) { return val.Field == val1.Field; } - public static bool Compare(NotEmptyStructA val, NotEmptyStructA val1) { return val.Field[0] == val1.Field[0]; } - public static bool Compare(NotEmptyStructQA val, NotEmptyStructQA val1) { return val.Field[0] == val1.Field[0]; } - public static bool Compare(EmptyStructGen val, EmptyStructGen val1) { return val.Equals(val1); } - public static bool Compare(NotEmptyStructGen val, NotEmptyStructGen val1) { return val.Field == val1.Field; } - public static bool Compare(NotEmptyStructConstrainedGen val, NotEmptyStructConstrainedGen val1) { return val.Field == val1.Field; } - public static bool Compare(NotEmptyStructConstrainedGenA val, NotEmptyStructConstrainedGenA val1) { return val.Field[0] == val1.Field[0]; } - public static bool Compare(NotEmptyStructConstrainedGenQ val, NotEmptyStructConstrainedGenQ val1) { return val.Field == val1.Field; } - public static bool Compare(NotEmptyStructConstrainedGenQA val, NotEmptyStructConstrainedGenQA val1) { return val.Field[0] == val1.Field[0]; } - public static bool Compare(NestedStruct val, NestedStruct val1) { return val.Equals(val1); } - public static bool Compare(NestedStructGen val, NestedStructGen val1) { return val.Equals(val1); } - public static bool Compare(ExplicitFieldOffsetStruct val, ExplicitFieldOffsetStruct val1) { return (val.Field00 == val1.Field00) && (val.Field15 == val1.Field15); } - public static bool Compare(MarshalAsStruct val, MarshalAsStruct val1) { return val.Equals(val1); } - public static bool Compare(ImplementOneInterface val, ImplementOneInterface val1) { return (val is IEmpty) && val.Equals(val1); } - public static bool Compare(ImplementTwoInterface val, ImplementTwoInterface val1) { return (val is IEmpty) && val is INotEmpty && val.Equals(val1); } - public static bool Compare(ImplementOneInterfaceGen val, ImplementOneInterfaceGen val1) { return val is IEmptyGen && val.Equals(val1); } - public static bool Compare(ImplementTwoInterfaceGen val, ImplementTwoInterfaceGen val1) { return val is IEmptyGen && val is INotEmptyGen && val.Equals(val1); } - public static bool Compare(ImplementAllInterface val, ImplementAllInterface val1) { return val is IEmpty && val is INotEmpty && val is IEmptyGen && val is INotEmptyGen && val.Equals(val1); } - public static bool Compare(WithMultipleGCHandleStruct val, WithMultipleGCHandleStruct val1) - { return val.H1 == val1.H1 && val.H2 == val1.H2 && val.H3 == val1.H3 && val.H4 == val1.H4 && val.H5 == val1.H5; } - public static bool Compare(WithOnlyFXTypeStruct val, WithOnlyFXTypeStruct val1) { return val.GUID == val1.GUID && val.DECIMAL == val1.DECIMAL; } - public static bool Compare(MixedAllStruct val, MixedAllStruct val1) - { - return val.INT == val1.INT && - val.IntQ == val1.IntQ && - val.IntQA[0] == val1.IntQA[0] && - val.STRING == val1.STRING && - val.INTE == val1.INTE && - val.EMPTYCLASS.Equals(val1.EMPTYCLASS) && - val.IEMPTY.Equals(val1.IEMPTY) && - Compare(val.EMPTYSTRUCT, val1.EMPTYSTRUCT) && - val.IEMPTYGEN.Equals(val1.IEMPTYGEN) && - Compare(val.EMPTYSTRUCTGEN, val1.EMPTYSTRUCTGEN) && - Compare(val.WITHONLYFXTYPESTRUCT, val1.WITHONLYFXTYPESTRUCT) && - Compare(val.GCHANDLE, val1.GCHANDLE); - } - - public static bool Compare(char? val, char val1) { return Compare(val.Value, val1); } - public static bool Compare(bool? val, bool val1) { return Compare(val.Value, val1); } - public static bool Compare(byte? val, byte val1) { return Compare(val.Value, val1); } - public static bool Compare(sbyte? val, sbyte val1) { return Compare(val.Value, val1); } - public static bool Compare(short? val, short val1) { return Compare(val.Value, val1); } - public static bool Compare(ushort? val, ushort val1) { return Compare(val.Value, val1); } - public static bool Compare(int? val, int val1) { return Compare(val.Value, val1); } - public static bool Compare(uint? val, uint val1) { return Compare(val.Value, val1); } - public static bool Compare(long? val, long val1) { return Compare(val.Value, val1); } - public static bool Compare(ulong? val, ulong val1) { return Compare(val.Value, val1); } - public static bool Compare(float? val, float val1) { return Compare(val.Value, val1); } - public static bool Compare(double? val, double val1) { return Compare(val.Value, val1); } - public static bool Compare(decimal? val, decimal val1) { return Compare(val.Value, val1); } - - public static bool Compare(IntPtr? val, IntPtr val1) { return Compare(val.Value, val1); } - public static bool Compare(UIntPtr? val, UIntPtr val1) { return Compare(val.Value, val1); } - public static bool Compare(Guid? val, Guid val1) { return Compare(val.Value, val1); } - public static bool Compare(GCHandle? val, GCHandle val1) { return Compare(val.Value, val1); } - public static bool Compare(ByteE? val, ByteE val1) { return Compare(val.Value, val1); } - public static bool Compare(IntE? val, IntE val1) { return Compare(val.Value, val1); } - public static bool Compare(LongE? val, LongE val1) { return Compare(val.Value, val1); } - public static bool Compare(EmptyStruct? val, EmptyStruct val1) { return Compare(val.Value, val1); } - public static bool Compare(NotEmptyStruct? val, NotEmptyStruct val1) { return Compare(val.Value, val1); } - public static bool Compare(NotEmptyStructQ? val, NotEmptyStructQ val1) { return Compare(val.Value, val1); } - public static bool Compare(NotEmptyStructA? val, NotEmptyStructA val1) { return Compare(val.Value, val1); } - public static bool Compare(NotEmptyStructQA? val, NotEmptyStructQA val1) { return Compare(val.Value, val1); } - public static bool Compare(EmptyStructGen? val, EmptyStructGen val1) { return Compare(val.Value, val1); } - public static bool Compare(NotEmptyStructGen? val, NotEmptyStructGen val1) { return Compare(val.Value, val1); } - public static bool Compare(NotEmptyStructConstrainedGen? val, NotEmptyStructConstrainedGen val1) { return Compare(val.Value, val1); } - public static bool Compare(NotEmptyStructConstrainedGenA? val, NotEmptyStructConstrainedGenA val1) { return Compare(val.Value, val1); } - public static bool Compare(NotEmptyStructConstrainedGenQ? val, NotEmptyStructConstrainedGenQ val1) { return Compare(val.Value, val1); } - public static bool Compare(NotEmptyStructConstrainedGenQA? val, NotEmptyStructConstrainedGenQA val1) { return Compare(val.Value, val1); } - public static bool Compare(NestedStruct? val, NestedStruct val1) { return Compare(val.Value, val1); } - public static bool Compare(NestedStructGen? val, NestedStructGen val1) { return Compare(val.Value, val1); } - public static bool Compare(ExplicitFieldOffsetStruct? val, ExplicitFieldOffsetStruct val1) { return Compare(val.Value, val1); } - public static bool Compare(MarshalAsStruct? val, MarshalAsStruct val1) { return Compare(val.Value, val1); } - public static bool Compare(ImplementOneInterface? val, ImplementOneInterface val1) { return Compare(val.Value, val1); } - public static bool Compare(ImplementTwoInterface? val, ImplementTwoInterface val1) { return Compare(val.Value, val1); } - public static bool Compare(ImplementOneInterfaceGen? val, ImplementOneInterfaceGen val1) { return Compare(val.Value, val1); } - public static bool Compare(ImplementTwoInterfaceGen? val, ImplementTwoInterfaceGen val1) { return Compare(val.Value, val1); } - public static bool Compare(ImplementAllInterface? val, ImplementAllInterface val1) { return Compare(val.Value, val1); } - public static bool Compare(WithMultipleGCHandleStruct? val, WithMultipleGCHandleStruct val1) { return Compare(val.Value, val1); } - public static bool Compare(WithOnlyFXTypeStruct? val, WithOnlyFXTypeStruct val1) { return Compare(val.Value, val1); } - public static bool Compare(MixedAllStruct? val, MixedAllStruct val1) { return Compare(val.Value, val1); } -} diff --git a/src/coreclr/tests/src/JIT/jit64/verif/sniff/fg/ver_fg_13.ilproj b/src/coreclr/tests/src/JIT/jit64/verif/sniff/fg/ver_fg_13.ilproj deleted file mode 100644 index 4f64464b0989..000000000000 --- a/src/coreclr/tests/src/JIT/jit64/verif/sniff/fg/ver_fg_13.ilproj +++ /dev/null @@ -1,12 +0,0 @@ - - - Exe - - - PdbOnly - True - - - - - diff --git a/src/coreclr/tests/src/JIT/opt/Casts/shared.cs b/src/coreclr/tests/src/JIT/opt/Casts/shared.cs deleted file mode 100644 index 94ecd6de4427..000000000000 --- a/src/coreclr/tests/src/JIT/opt/Casts/shared.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Runtime.CompilerServices; - -interface I -{ - int E(T t); -} - -sealed class J : I -{ - public int E(T t) { return 3; } -} - -class Z -{ - [MethodImpl(MethodImplOptions.NoInlining)] - static bool F0(I i) - { - return i is I; - } - - [MethodImpl(MethodImplOptions.NoInlining)] - static bool F1(J j) - { - return j is I; - } - - public static int Main() - { - var j0 = new J(); - var j1 = new J(); - bool b00 = F0(j0); - bool b01 = F0(j1); - bool b10 = F1(j0); - bool b11 = F1(j1); - - int a = 0; - if (b00) a += 1; - if (b01) a += 2; - if (b10) a += 4; - if (b11) a += 8; - - Console.WriteLine($"a = {a}"); - - return a == 9 ? 100 : 0; - } -} diff --git a/src/coreclr/tests/src/JIT/opt/Devirtualization/constructor.cs b/src/coreclr/tests/src/JIT/opt/Devirtualization/constructor.cs deleted file mode 100644 index 14deb2678e1c..000000000000 --- a/src/coreclr/tests/src/JIT/opt/Devirtualization/constructor.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Runtime.CompilerServices; - -class Test -{ - static string s; - - public override string ToString() - { - return "Test"; - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public Test() - { - s = ToString(); // cannot be devirtualized - } - - static int Main() - { - new Child(); - return (s == "Child" ? 100 : 0); - } -} - -class Child : Test -{ - - [MethodImpl(MethodImplOptions.NoInlining)] - public Child() { } - - public override string ToString() - { - return "Child"; - } -} diff --git a/src/coreclr/tests/src/JIT/opt/Devirtualization/enum.cs b/src/coreclr/tests/src/JIT/opt/Devirtualization/enum.cs deleted file mode 100644 index 994c66123088..000000000000 --- a/src/coreclr/tests/src/JIT/opt/Devirtualization/enum.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -enum MyEnum { One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten }; - -public class Test -{ - public static int Main() - { - // Call to ToString should be devirtualize since boxed enums - // are sealed classes. This doesn't happen yet. - string s = (MyEnum.Seven).ToString(); - - // Call to Equals will devirtualize since string is sealed - return (s.Equals((object)"Seven") ? 100 : -1); - } -} diff --git a/src/coreclr/tests/src/JIT/opt/Devirtualization/simple.cs b/src/coreclr/tests/src/JIT/opt/Devirtualization/simple.cs deleted file mode 100644 index 46b039ce15a4..000000000000 --- a/src/coreclr/tests/src/JIT/opt/Devirtualization/simple.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -// Some simple interface call devirtualization cases - -interface Ix -{ - int F(); -} - -interface Iy -{ - int G(); -} - -interface Iz -{ - int H(); - int I(); -} - -public class B : Iy, Ix, Iz -{ - public int F() { return 3; } - virtual public int G() { return 5; } - int Iz.H() { return 7; } - int Iz.I() { return 11; } -} - -public class Z : B, Iz -{ - new public int F() { return 13; } - override public int G() { return 17; } - int Iz.H() { return 19; } - - static int Fx(Ix x) { return x.F(); } - static int Gy(Iy y) { return y.G(); } - static int Hz(Iz z) { return z.H(); } - static int Hi(Iz z) { return z.I(); } - - public static int Main() - { - int callsBF = Fx(new Z()) + Fx(new B()) + ((Ix) new Z()).F() + ((Ix) new B()).F(); - int callsBG = Gy(new B()) + ((Iy) new B()).G() + (new B()).G(); - int callsBH = Hz(new B()) + ((Iz) new B()).H(); - int callsBI = Hi(new Z()) + Hi(new B()) + ((Iz) new Z()).I() + ((Iz) new B()).I(); - int callsZG = Gy(new Z()) + ((Iy) new Z()).G() + (new Z()).G(); - int callsZH = Hz(new Z()) + ((Iz) new Z()).H(); - - int expected = 4 * 3 + 3 * 5 + 2 * 7 + 4 * 11 + 3 * 17 + 2 * 19; - - return callsBF + callsBG + callsBI + callsBH + callsZG + callsZH - expected + 100; - } -} - diff --git a/src/coreclr/tests/src/JIT/opt/DumpDisasm/JitMinOpts/BBCnt1.il b/src/coreclr/tests/src/JIT/opt/DumpDisasm/JitMinOpts/BBCnt1.il deleted file mode 100644 index 043be218828c..000000000000 --- a/src/coreclr/tests/src/JIT/opt/DumpDisasm/JitMinOpts/BBCnt1.il +++ /dev/null @@ -1,12063 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// DEFAULT_MIN_OPTS_BB_COUNT 2000 -// New Basic Block BB2001 created. -// OPTIONS: opts.MinOpts() == true -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly BBCnt1 {} -.class private auto ansi beforefieldinit BBCnt1 - extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - // Code size 11955 (0x2eb3) - .maxstack 3 - .locals init (class [mscorlib]System.Random V_0, - int32 V_1, - int32 V_2, - int32 V_3) - IL_0000: newobj instance void [mscorlib]System.Random::.ctor() - IL_0005: stloc.0 - IL_0006: ldloc.0 - IL_0007: ldc.i4.1 - IL_0008: ldc.i4.s 100 - IL_000a: callvirt instance int32 [mscorlib]System.Random::Next(int32, - int32) - IL_000f: stloc.1 - IL_0010: ldloc.0 - IL_0011: ldc.i4.1 - IL_0012: ldc.i4.s 100 - IL_0014: callvirt instance int32 [mscorlib]System.Random::Next(int32, - int32) - IL_0019: stloc.2 - IL_001a: ldloc.1 - IL_001b: ldloc.2 - IL_001c: blt.s BL_0026 - - BL_001e: ldloc.1 - BL_001f: ldloc.1 - BL_0020: ldloc.2 - BL_0021: sub - BL_0022: add - BL_0023: stloc.1 - BL_0024: br.s BL_002c - - BL_0026: ldloc.2 - BL_0027: ldloc.1 - BL_0028: ldloc.2 - BL_0029: sub - BL_002a: mul - BL_002b: stloc.2 - BL_002c: ldloc.1 - BL_002d: ldloc.2 - BL_002e: blt.s BL_0126 - - BL_011e: ldloc.1 - BL_011f: ldloc.1 - BL_0120: ldloc.2 - BL_0121: sub - BL_0122: add - BL_0123: stloc.1 - BL_0124: br.s BL_012c - - BL_0126: ldloc.2 - BL_0127: ldloc.1 - BL_0128: ldloc.2 - BL_0129: sub - BL_012a: mul - BL_012b: stloc.2 - BL_012c: ldloc.1 - BL_012d: ldloc.2 - BL_012e: blt.s BL_0226 - - BL_021e: ldloc.1 - BL_021f: ldloc.1 - BL_0220: ldloc.2 - BL_0221: sub - BL_0222: add - BL_0223: stloc.1 - BL_0224: br.s BL_022c - - BL_0226: ldloc.2 - BL_0227: ldloc.1 - BL_0228: ldloc.2 - BL_0229: sub - BL_022a: mul - BL_022b: stloc.2 - BL_022c: ldloc.1 - BL_022d: ldloc.2 - BL_022e: blt.s BL_0326 - - BL_031e: ldloc.1 - BL_031f: ldloc.1 - BL_0320: ldloc.2 - BL_0321: sub - BL_0322: add - BL_0323: stloc.1 - BL_0324: br.s BL_032c - - BL_0326: ldloc.2 - BL_0327: ldloc.1 - BL_0328: ldloc.2 - BL_0329: sub - BL_032a: mul - BL_032b: stloc.2 - BL_032c: ldloc.1 - BL_032d: ldloc.2 - BL_032e: blt.s BL_0426 - - BL_041e: ldloc.1 - BL_041f: ldloc.1 - BL_0420: ldloc.2 - BL_0421: sub - BL_0422: add - BL_0423: stloc.1 - BL_0424: br.s BL_042c - - BL_0426: ldloc.2 - BL_0427: ldloc.1 - BL_0428: ldloc.2 - BL_0429: sub - BL_042a: mul - BL_042b: stloc.2 - BL_042c: ldloc.1 - BL_042d: ldloc.2 - BL_042e: blt.s BL_0526 - - BL_051e: ldloc.1 - BL_051f: ldloc.1 - BL_0520: ldloc.2 - BL_0521: sub - BL_0522: add - BL_0523: stloc.1 - BL_0524: br.s BL_052c - - BL_0526: ldloc.2 - BL_0527: ldloc.1 - BL_0528: ldloc.2 - BL_0529: sub - BL_052a: mul - BL_052b: stloc.2 - BL_052c: ldloc.1 - BL_052d: ldloc.2 - BL_052e: blt.s IL_0026 - - IL_001e: ldloc.1 - IL_001f: ldloc.1 - IL_0020: ldloc.2 - IL_0021: sub - IL_0022: add - IL_0023: stloc.1 - IL_0024: br.s IL_002c - - IL_0026: ldloc.2 - IL_0027: ldloc.1 - IL_0028: ldloc.2 - IL_0029: sub - IL_002a: mul - IL_002b: stloc.2 - IL_002c: ldloc.1 - IL_002d: ldloc.2 - IL_002e: blt.s IL_0038 - - IL_0030: ldloc.1 - IL_0031: ldloc.1 - IL_0032: ldloc.2 - IL_0033: sub - IL_0034: mul - IL_0035: stloc.1 - IL_0036: br.s IL_003e - - IL_0038: ldloc.2 - IL_0039: ldloc.1 - IL_003a: ldloc.2 - IL_003b: sub - IL_003c: add - IL_003d: stloc.2 - IL_003e: ldloc.1 - IL_003f: ldloc.2 - IL_0040: bgt.s IL_004a - - IL_0042: ldloc.1 - IL_0043: ldloc.1 - IL_0044: ldloc.2 - IL_0045: add - IL_0046: add - IL_0047: stloc.1 - IL_0048: br.s IL_0050 - - IL_004a: ldloc.2 - IL_004b: ldloc.1 - IL_004c: ldloc.2 - IL_004d: add - IL_004e: mul - IL_004f: stloc.2 - IL_0050: ldloc.1 - IL_0051: ldloc.2 - IL_0052: bge.s IL_005c - - IL_0054: ldloc.1 - IL_0055: ldloc.1 - IL_0056: ldloc.2 - IL_0057: add - IL_0058: add - IL_0059: stloc.1 - IL_005a: br.s IL_0062 - - IL_005c: ldloc.2 - IL_005d: ldloc.1 - IL_005e: ldloc.2 - IL_005f: add - IL_0060: mul - IL_0061: stloc.2 - IL_0062: ldloc.1 - IL_0063: ldloc.2 - IL_0064: ble.s IL_006e - - IL_0066: ldloc.1 - IL_0067: ldloc.1 - IL_0068: ldloc.2 - IL_0069: sub - IL_006a: mul - IL_006b: stloc.1 - IL_006c: br.s IL_0074 - - IL_006e: ldloc.2 - IL_006f: ldloc.1 - IL_0070: ldloc.2 - IL_0071: sub - IL_0072: add - IL_0073: stloc.2 - IL_0074: ldloc.1 - IL_0075: ldloc.2 - IL_0076: beq.s IL_0080 - - IL_0078: ldloc.1 - IL_0079: ldloc.1 - IL_007a: ldloc.2 - IL_007b: add - IL_007c: mul - IL_007d: stloc.1 - IL_007e: br.s IL_0086 - - IL_0080: ldloc.2 - IL_0081: ldloc.1 - IL_0082: ldloc.2 - IL_0083: add - IL_0084: sub - IL_0085: stloc.2 - IL_0086: ldloc.1 - IL_0087: ldloc.2 - IL_0088: bgt.s IL_0092 - - IL_008a: ldloc.1 - IL_008b: ldloc.1 - IL_008c: ldloc.2 - IL_008d: mul - IL_008e: add - IL_008f: stloc.1 - IL_0090: br.s IL_0098 - - IL_0092: ldloc.2 - IL_0093: ldloc.1 - IL_0094: ldloc.2 - IL_0095: mul - IL_0096: add - IL_0097: stloc.2 - IL_0098: ldloc.1 - IL_0099: ldloc.2 - IL_009a: bgt.s IL_00a4 - - IL_009c: ldloc.1 - IL_009d: ldloc.1 - IL_009e: ldloc.2 - IL_009f: sub - IL_00a0: add - IL_00a1: stloc.1 - IL_00a2: br.s IL_00aa - - IL_00a4: ldloc.2 - IL_00a5: ldloc.1 - IL_00a6: ldloc.2 - IL_00a7: sub - IL_00a8: add - IL_00a9: stloc.2 - IL_00aa: ldloc.1 - IL_00ab: ldloc.2 - IL_00ac: bne.un.s IL_00b6 - - IL_00ae: ldloc.1 - IL_00af: ldloc.1 - IL_00b0: ldloc.2 - IL_00b1: add - IL_00b2: mul - IL_00b3: stloc.1 - IL_00b4: br.s IL_00bc - - IL_00b6: ldloc.2 - IL_00b7: ldloc.1 - IL_00b8: ldloc.2 - IL_00b9: add - IL_00ba: mul - IL_00bb: stloc.2 - IL_00bc: ldloc.1 - IL_00bd: ldloc.2 - IL_00be: bge.s IL_00c8 - - IL_00c0: ldloc.1 - IL_00c1: ldloc.1 - IL_00c2: ldloc.2 - IL_00c3: mul - IL_00c4: mul - IL_00c5: stloc.1 - IL_00c6: br.s IL_00ce - - IL_00c8: ldloc.2 - IL_00c9: ldloc.1 - IL_00ca: ldloc.2 - IL_00cb: mul - IL_00cc: mul - IL_00cd: stloc.2 - IL_00ce: ldloc.1 - IL_00cf: ldloc.2 - IL_00d0: beq.s IL_00da - - IL_00d2: ldloc.1 - IL_00d3: ldloc.1 - IL_00d4: ldloc.2 - IL_00d5: mul - IL_00d6: add - IL_00d7: stloc.1 - IL_00d8: br.s IL_00e0 - - IL_00da: ldloc.2 - IL_00db: ldloc.1 - IL_00dc: ldloc.2 - IL_00dd: mul - IL_00de: mul - IL_00df: stloc.2 - IL_00e0: ldloc.1 - IL_00e1: ldloc.2 - IL_00e2: bgt.s IL_00ec - - IL_00e4: ldloc.1 - IL_00e5: ldloc.1 - IL_00e6: ldloc.2 - IL_00e7: mul - IL_00e8: mul - IL_00e9: stloc.1 - IL_00ea: br.s IL_00f2 - - IL_00ec: ldloc.2 - IL_00ed: ldloc.1 - IL_00ee: ldloc.2 - IL_00ef: mul - IL_00f0: add - IL_00f1: stloc.2 - IL_00f2: ldloc.1 - IL_00f3: ldloc.2 - IL_00f4: bne.un.s IL_00fe - - IL_00f6: ldloc.1 - IL_00f7: ldloc.1 - IL_00f8: ldloc.2 - IL_00f9: add - IL_00fa: add - IL_00fb: stloc.1 - IL_00fc: br.s IL_0104 - - IL_00fe: ldloc.2 - IL_00ff: ldloc.1 - IL_0100: ldloc.2 - IL_0101: add - IL_0102: add - IL_0103: stloc.2 - IL_0104: ldloc.1 - IL_0105: ldloc.2 - IL_0106: blt.s IL_0110 - - IL_0108: ldloc.1 - IL_0109: ldloc.1 - IL_010a: ldloc.2 - IL_010b: sub - IL_010c: sub - IL_010d: stloc.1 - IL_010e: br.s IL_0116 - - IL_0110: ldloc.2 - IL_0111: ldloc.1 - IL_0112: ldloc.2 - IL_0113: sub - IL_0114: mul - IL_0115: stloc.2 - IL_0116: ldloc.1 - IL_0117: ldloc.2 - IL_0118: blt.s IL_0122 - - IL_011a: ldloc.1 - IL_011b: ldloc.1 - IL_011c: ldloc.2 - IL_011d: add - IL_011e: sub - IL_011f: stloc.1 - IL_0120: br.s IL_0128 - - IL_0122: ldloc.2 - IL_0123: ldloc.1 - IL_0124: ldloc.2 - IL_0125: add - IL_0126: mul - IL_0127: stloc.2 - IL_0128: ldloc.1 - IL_0129: ldloc.2 - IL_012a: bgt.s IL_0134 - - IL_012c: ldloc.1 - IL_012d: ldloc.1 - IL_012e: ldloc.2 - IL_012f: sub - IL_0130: add - IL_0131: stloc.1 - IL_0132: br.s IL_013a - - IL_0134: ldloc.2 - IL_0135: ldloc.1 - IL_0136: ldloc.2 - IL_0137: sub - IL_0138: mul - IL_0139: stloc.2 - IL_013a: ldloc.1 - IL_013b: ldloc.2 - IL_013c: beq.s IL_0146 - - IL_013e: ldloc.1 - IL_013f: ldloc.1 - IL_0140: ldloc.2 - IL_0141: sub - IL_0142: add - IL_0143: stloc.1 - IL_0144: br.s IL_014c - - IL_0146: ldloc.2 - IL_0147: ldloc.1 - IL_0148: ldloc.2 - IL_0149: sub - IL_014a: sub - IL_014b: stloc.2 - IL_014c: ldloc.1 - IL_014d: ldloc.2 - IL_014e: bgt.s IL_0158 - - IL_0150: ldloc.1 - IL_0151: ldloc.1 - IL_0152: ldloc.2 - IL_0153: add - IL_0154: sub - IL_0155: stloc.1 - IL_0156: br.s IL_015e - - IL_0158: ldloc.2 - IL_0159: ldloc.1 - IL_015a: ldloc.2 - IL_015b: add - IL_015c: add - IL_015d: stloc.2 - IL_015e: ldloc.1 - IL_015f: ldloc.2 - IL_0160: ble.s IL_016a - - IL_0162: ldloc.1 - IL_0163: ldloc.1 - IL_0164: ldloc.2 - IL_0165: sub - IL_0166: add - IL_0167: stloc.1 - IL_0168: br.s IL_0170 - - IL_016a: ldloc.2 - IL_016b: ldloc.1 - IL_016c: ldloc.2 - IL_016d: sub - IL_016e: sub - IL_016f: stloc.2 - IL_0170: ldloc.1 - IL_0171: ldloc.2 - IL_0172: bne.un.s IL_017c - - IL_0174: ldloc.1 - IL_0175: ldloc.1 - IL_0176: ldloc.2 - IL_0177: sub - IL_0178: mul - IL_0179: stloc.1 - IL_017a: br.s IL_0182 - - IL_017c: ldloc.2 - IL_017d: ldloc.1 - IL_017e: ldloc.2 - IL_017f: sub - IL_0180: mul - IL_0181: stloc.2 - IL_0182: ldloc.1 - IL_0183: ldloc.2 - IL_0184: beq.s IL_018e - - IL_0186: ldloc.1 - IL_0187: ldloc.1 - IL_0188: ldloc.2 - IL_0189: sub - IL_018a: add - IL_018b: stloc.1 - IL_018c: br.s IL_0194 - - IL_018e: ldloc.2 - IL_018f: ldloc.1 - IL_0190: ldloc.2 - IL_0191: sub - IL_0192: add - IL_0193: stloc.2 - IL_0194: ldloc.1 - IL_0195: ldloc.2 - IL_0196: bne.un.s IL_01a0 - - IL_0198: ldloc.1 - IL_0199: ldloc.1 - IL_019a: ldloc.2 - IL_019b: add - IL_019c: add - IL_019d: stloc.1 - IL_019e: br.s IL_01a6 - - IL_01a0: ldloc.2 - IL_01a1: ldloc.1 - IL_01a2: ldloc.2 - IL_01a3: add - IL_01a4: add - IL_01a5: stloc.2 - IL_01a6: ldloc.1 - IL_01a7: ldloc.2 - IL_01a8: beq.s IL_01b2 - - IL_01aa: ldloc.1 - IL_01ab: ldloc.1 - IL_01ac: ldloc.2 - IL_01ad: mul - IL_01ae: add - IL_01af: stloc.1 - IL_01b0: br.s IL_01b8 - - IL_01b2: ldloc.2 - IL_01b3: ldloc.1 - IL_01b4: ldloc.2 - IL_01b5: mul - IL_01b6: mul - IL_01b7: stloc.2 - IL_01b8: ldloc.1 - IL_01b9: ldloc.2 - IL_01ba: ble.s IL_01c4 - - IL_01bc: ldloc.1 - IL_01bd: ldloc.1 - IL_01be: ldloc.2 - IL_01bf: mul - IL_01c0: mul - IL_01c1: stloc.1 - IL_01c2: br.s IL_01ca - - IL_01c4: ldloc.2 - IL_01c5: ldloc.1 - IL_01c6: ldloc.2 - IL_01c7: mul - IL_01c8: add - IL_01c9: stloc.2 - IL_01ca: ldloc.1 - IL_01cb: ldloc.2 - IL_01cc: bge.s IL_01d6 - - IL_01ce: ldloc.1 - IL_01cf: ldloc.1 - IL_01d0: ldloc.2 - IL_01d1: sub - IL_01d2: sub - IL_01d3: stloc.1 - IL_01d4: br.s IL_01dc - - IL_01d6: ldloc.2 - IL_01d7: ldloc.1 - IL_01d8: ldloc.2 - IL_01d9: sub - IL_01da: add - IL_01db: stloc.2 - IL_01dc: ldloc.1 - IL_01dd: ldloc.2 - IL_01de: blt.s IL_01e8 - - IL_01e0: ldloc.1 - IL_01e1: ldloc.1 - IL_01e2: ldloc.2 - IL_01e3: add - IL_01e4: mul - IL_01e5: stloc.1 - IL_01e6: br.s IL_01ee - - IL_01e8: ldloc.2 - IL_01e9: ldloc.1 - IL_01ea: ldloc.2 - IL_01eb: add - IL_01ec: sub - IL_01ed: stloc.2 - IL_01ee: ldloc.1 - IL_01ef: ldloc.2 - IL_01f0: ble.s IL_01fa - - IL_01f2: ldloc.1 - IL_01f3: ldloc.1 - IL_01f4: ldloc.2 - IL_01f5: add - IL_01f6: add - IL_01f7: stloc.1 - IL_01f8: br.s IL_0200 - - IL_01fa: ldloc.2 - IL_01fb: ldloc.1 - IL_01fc: ldloc.2 - IL_01fd: add - IL_01fe: add - IL_01ff: stloc.2 - IL_0200: ldloc.1 - IL_0201: ldloc.2 - IL_0202: ble.s IL_020c - - IL_0204: ldloc.1 - IL_0205: ldloc.1 - IL_0206: ldloc.2 - IL_0207: sub - IL_0208: sub - IL_0209: stloc.1 - IL_020a: br.s IL_0212 - - IL_020c: ldloc.2 - IL_020d: ldloc.1 - IL_020e: ldloc.2 - IL_020f: sub - IL_0210: mul - IL_0211: stloc.2 - IL_0212: ldloc.1 - IL_0213: ldloc.2 - IL_0214: beq.s IL_021e - - IL_0216: ldloc.1 - IL_0217: ldloc.1 - IL_0218: ldloc.2 - IL_0219: sub - IL_021a: add - IL_021b: stloc.1 - IL_021c: br.s IL_0224 - - IL_021e: ldloc.2 - IL_021f: ldloc.1 - IL_0220: ldloc.2 - IL_0221: sub - IL_0222: add - IL_0223: stloc.2 - IL_0224: ldloc.1 - IL_0225: ldloc.2 - IL_0226: beq.s IL_0230 - - IL_0228: ldloc.1 - IL_0229: ldloc.1 - IL_022a: ldloc.2 - IL_022b: mul - IL_022c: sub - IL_022d: stloc.1 - IL_022e: br.s IL_0236 - - IL_0230: ldloc.2 - IL_0231: ldloc.1 - IL_0232: ldloc.2 - IL_0233: mul - IL_0234: mul - IL_0235: stloc.2 - IL_0236: ldloc.1 - IL_0237: ldloc.2 - IL_0238: ble.s IL_0242 - - IL_023a: ldloc.1 - IL_023b: ldloc.1 - IL_023c: ldloc.2 - IL_023d: sub - IL_023e: sub - IL_023f: stloc.1 - IL_0240: br.s IL_0248 - - IL_0242: ldloc.2 - IL_0243: ldloc.1 - IL_0244: ldloc.2 - IL_0245: sub - IL_0246: sub - IL_0247: stloc.2 - IL_0248: ldloc.1 - IL_0249: ldloc.2 - IL_024a: bne.un.s IL_0254 - - IL_024c: ldloc.1 - IL_024d: ldloc.1 - IL_024e: ldloc.2 - IL_024f: add - IL_0250: add - IL_0251: stloc.1 - IL_0252: br.s IL_025a - - IL_0254: ldloc.2 - IL_0255: ldloc.1 - IL_0256: ldloc.2 - IL_0257: add - IL_0258: add - IL_0259: stloc.2 - IL_025a: ldloc.1 - IL_025b: ldloc.2 - IL_025c: bne.un.s IL_0266 - - IL_025e: ldloc.1 - IL_025f: ldloc.1 - IL_0260: ldloc.2 - IL_0261: sub - IL_0262: mul - IL_0263: stloc.1 - IL_0264: br.s IL_026c - - IL_0266: ldloc.2 - IL_0267: ldloc.1 - IL_0268: ldloc.2 - IL_0269: sub - IL_026a: add - IL_026b: stloc.2 - IL_026c: ldloc.1 - IL_026d: ldloc.2 - IL_026e: bne.un.s IL_0278 - - IL_0270: ldloc.1 - IL_0271: ldloc.1 - IL_0272: ldloc.2 - IL_0273: add - IL_0274: sub - IL_0275: stloc.1 - IL_0276: br.s IL_027e - - IL_0278: ldloc.2 - IL_0279: ldloc.1 - IL_027a: ldloc.2 - IL_027b: add - IL_027c: add - IL_027d: stloc.2 - IL_027e: ldloc.1 - IL_027f: ldloc.2 - IL_0280: bgt.s IL_028a - - IL_0282: ldloc.1 - IL_0283: ldloc.1 - IL_0284: ldloc.2 - IL_0285: sub - IL_0286: mul - IL_0287: stloc.1 - IL_0288: br.s IL_0290 - - IL_028a: ldloc.2 - IL_028b: ldloc.1 - IL_028c: ldloc.2 - IL_028d: sub - IL_028e: sub - IL_028f: stloc.2 - IL_0290: ldloc.1 - IL_0291: ldloc.2 - IL_0292: bne.un.s IL_029c - - IL_0294: ldloc.1 - IL_0295: ldloc.1 - IL_0296: ldloc.2 - IL_0297: sub - IL_0298: mul - IL_0299: stloc.1 - IL_029a: br.s IL_02a2 - - IL_029c: ldloc.2 - IL_029d: ldloc.1 - IL_029e: ldloc.2 - IL_029f: sub - IL_02a0: mul - IL_02a1: stloc.2 - IL_02a2: ldloc.1 - IL_02a3: ldloc.2 - IL_02a4: bge.s IL_02ae - - IL_02a6: ldloc.1 - IL_02a7: ldloc.1 - IL_02a8: ldloc.2 - IL_02a9: mul - IL_02aa: add - IL_02ab: stloc.1 - IL_02ac: br.s IL_02b4 - - IL_02ae: ldloc.2 - IL_02af: ldloc.1 - IL_02b0: ldloc.2 - IL_02b1: mul - IL_02b2: mul - IL_02b3: stloc.2 - IL_02b4: ldloc.1 - IL_02b5: ldloc.2 - IL_02b6: bgt.s IL_02c0 - - IL_02b8: ldloc.1 - IL_02b9: ldloc.1 - IL_02ba: ldloc.2 - IL_02bb: mul - IL_02bc: mul - IL_02bd: stloc.1 - IL_02be: br.s IL_02c6 - - IL_02c0: ldloc.2 - IL_02c1: ldloc.1 - IL_02c2: ldloc.2 - IL_02c3: mul - IL_02c4: mul - IL_02c5: stloc.2 - IL_02c6: ldloc.1 - IL_02c7: ldloc.2 - IL_02c8: bne.un.s IL_02d2 - - IL_02ca: ldloc.1 - IL_02cb: ldloc.1 - IL_02cc: ldloc.2 - IL_02cd: add - IL_02ce: add - IL_02cf: stloc.1 - IL_02d0: br.s IL_02d8 - - IL_02d2: ldloc.2 - IL_02d3: ldloc.1 - IL_02d4: ldloc.2 - IL_02d5: add - IL_02d6: add - IL_02d7: stloc.2 - IL_02d8: ldloc.1 - IL_02d9: ldloc.2 - IL_02da: ble.s IL_02e4 - - IL_02dc: ldloc.1 - IL_02dd: ldloc.1 - IL_02de: ldloc.2 - IL_02df: mul - IL_02e0: mul - IL_02e1: stloc.1 - IL_02e2: br.s IL_02ea - - IL_02e4: ldloc.2 - IL_02e5: ldloc.1 - IL_02e6: ldloc.2 - IL_02e7: mul - IL_02e8: sub - IL_02e9: stloc.2 - IL_02ea: ldloc.1 - IL_02eb: ldloc.2 - IL_02ec: ble.s IL_02f6 - - IL_02ee: ldloc.1 - IL_02ef: ldloc.1 - IL_02f0: ldloc.2 - IL_02f1: add - IL_02f2: add - IL_02f3: stloc.1 - IL_02f4: br.s IL_02fc - - IL_02f6: ldloc.2 - IL_02f7: ldloc.1 - IL_02f8: ldloc.2 - IL_02f9: add - IL_02fa: sub - IL_02fb: stloc.2 - IL_02fc: ldloc.1 - IL_02fd: ldloc.2 - IL_02fe: ble.s IL_0308 - - IL_0300: ldloc.1 - IL_0301: ldloc.1 - IL_0302: ldloc.2 - IL_0303: sub - IL_0304: sub - IL_0305: stloc.1 - IL_0306: br.s IL_030e - - IL_0308: ldloc.2 - IL_0309: ldloc.1 - IL_030a: ldloc.2 - IL_030b: sub - IL_030c: mul - IL_030d: stloc.2 - IL_030e: ldloc.1 - IL_030f: ldloc.2 - IL_0310: ble.s IL_031a - - IL_0312: ldloc.1 - IL_0313: ldloc.1 - IL_0314: ldloc.2 - IL_0315: mul - IL_0316: mul - IL_0317: stloc.1 - IL_0318: br.s IL_0320 - - IL_031a: ldloc.2 - IL_031b: ldloc.1 - IL_031c: ldloc.2 - IL_031d: mul - IL_031e: mul - IL_031f: stloc.2 - IL_0320: ldloc.1 - IL_0321: ldloc.2 - IL_0322: ble.s IL_032c - - IL_0324: ldloc.1 - IL_0325: ldloc.1 - IL_0326: ldloc.2 - IL_0327: add - IL_0328: add - IL_0329: stloc.1 - IL_032a: br.s IL_0332 - - IL_032c: ldloc.2 - IL_032d: ldloc.1 - IL_032e: ldloc.2 - IL_032f: add - IL_0330: add - IL_0331: stloc.2 - IL_0332: ldloc.1 - IL_0333: ldloc.2 - IL_0334: blt.s IL_033e - - IL_0336: ldloc.1 - IL_0337: ldloc.1 - IL_0338: ldloc.2 - IL_0339: sub - IL_033a: add - IL_033b: stloc.1 - IL_033c: br.s IL_0344 - - IL_033e: ldloc.2 - IL_033f: ldloc.1 - IL_0340: ldloc.2 - IL_0341: sub - IL_0342: add - IL_0343: stloc.2 - IL_0344: ldloc.1 - IL_0345: ldloc.2 - IL_0346: bge.s IL_0350 - - IL_0348: ldloc.1 - IL_0349: ldloc.1 - IL_034a: ldloc.2 - IL_034b: mul - IL_034c: sub - IL_034d: stloc.1 - IL_034e: br.s IL_0356 - - IL_0350: ldloc.2 - IL_0351: ldloc.1 - IL_0352: ldloc.2 - IL_0353: mul - IL_0354: sub - IL_0355: stloc.2 - IL_0356: ldloc.1 - IL_0357: ldloc.2 - IL_0358: beq.s IL_0362 - - IL_035a: ldloc.1 - IL_035b: ldloc.1 - IL_035c: ldloc.2 - IL_035d: sub - IL_035e: sub - IL_035f: stloc.1 - IL_0360: br.s IL_0368 - - IL_0362: ldloc.2 - IL_0363: ldloc.1 - IL_0364: ldloc.2 - IL_0365: sub - IL_0366: sub - IL_0367: stloc.2 - IL_0368: ldloc.1 - IL_0369: ldloc.2 - IL_036a: ble.s IL_0374 - - IL_036c: ldloc.1 - IL_036d: ldloc.1 - IL_036e: ldloc.2 - IL_036f: mul - IL_0370: add - IL_0371: stloc.1 - IL_0372: br.s IL_037a - - IL_0374: ldloc.2 - IL_0375: ldloc.1 - IL_0376: ldloc.2 - IL_0377: mul - IL_0378: add - IL_0379: stloc.2 - IL_037a: ldloc.1 - IL_037b: ldloc.2 - IL_037c: bgt.s IL_0386 - - IL_037e: ldloc.1 - IL_037f: ldloc.1 - IL_0380: ldloc.2 - IL_0381: mul - IL_0382: sub - IL_0383: stloc.1 - IL_0384: br.s IL_038c - - IL_0386: ldloc.2 - IL_0387: ldloc.1 - IL_0388: ldloc.2 - IL_0389: mul - IL_038a: sub - IL_038b: stloc.2 - IL_038c: ldloc.1 - IL_038d: ldloc.2 - IL_038e: blt.s IL_0398 - - IL_0390: ldloc.1 - IL_0391: ldloc.1 - IL_0392: ldloc.2 - IL_0393: mul - IL_0394: mul - IL_0395: stloc.1 - IL_0396: br.s IL_039e - - IL_0398: ldloc.2 - IL_0399: ldloc.1 - IL_039a: ldloc.2 - IL_039b: mul - IL_039c: add - IL_039d: stloc.2 - IL_039e: ldloc.1 - IL_039f: ldloc.2 - IL_03a0: bge.s IL_03aa - - IL_03a2: ldloc.1 - IL_03a3: ldloc.1 - IL_03a4: ldloc.2 - IL_03a5: sub - IL_03a6: sub - IL_03a7: stloc.1 - IL_03a8: br.s IL_03b0 - - IL_03aa: ldloc.2 - IL_03ab: ldloc.1 - IL_03ac: ldloc.2 - IL_03ad: sub - IL_03ae: sub - IL_03af: stloc.2 - IL_03b0: ldloc.1 - IL_03b1: ldloc.2 - IL_03b2: ble.s IL_03bc - - IL_03b4: ldloc.1 - IL_03b5: ldloc.1 - IL_03b6: ldloc.2 - IL_03b7: sub - IL_03b8: add - IL_03b9: stloc.1 - IL_03ba: br.s IL_03c2 - - IL_03bc: ldloc.2 - IL_03bd: ldloc.1 - IL_03be: ldloc.2 - IL_03bf: sub - IL_03c0: mul - IL_03c1: stloc.2 - IL_03c2: ldloc.1 - IL_03c3: ldloc.2 - IL_03c4: bge.s IL_03ce - - IL_03c6: ldloc.1 - IL_03c7: ldloc.1 - IL_03c8: ldloc.2 - IL_03c9: mul - IL_03ca: add - IL_03cb: stloc.1 - IL_03cc: br.s IL_03d4 - - IL_03ce: ldloc.2 - IL_03cf: ldloc.1 - IL_03d0: ldloc.2 - IL_03d1: mul - IL_03d2: sub - IL_03d3: stloc.2 - IL_03d4: ldloc.1 - IL_03d5: ldloc.2 - IL_03d6: bne.un.s IL_03e0 - - IL_03d8: ldloc.1 - IL_03d9: ldloc.1 - IL_03da: ldloc.2 - IL_03db: sub - IL_03dc: mul - IL_03dd: stloc.1 - IL_03de: br.s IL_03e6 - - IL_03e0: ldloc.2 - IL_03e1: ldloc.1 - IL_03e2: ldloc.2 - IL_03e3: sub - IL_03e4: sub - IL_03e5: stloc.2 - IL_03e6: ldloc.1 - IL_03e7: ldloc.2 - IL_03e8: blt.s IL_03f2 - - IL_03ea: ldloc.1 - IL_03eb: ldloc.1 - IL_03ec: ldloc.2 - IL_03ed: mul - IL_03ee: sub - IL_03ef: stloc.1 - IL_03f0: br.s IL_03f8 - - IL_03f2: ldloc.2 - IL_03f3: ldloc.1 - IL_03f4: ldloc.2 - IL_03f5: mul - IL_03f6: sub - IL_03f7: stloc.2 - IL_03f8: ldloc.1 - IL_03f9: ldloc.2 - IL_03fa: bne.un.s IL_0404 - - IL_03fc: ldloc.1 - IL_03fd: ldloc.1 - IL_03fe: ldloc.2 - IL_03ff: add - IL_0400: sub - IL_0401: stloc.1 - IL_0402: br.s IL_040a - - IL_0404: ldloc.2 - IL_0405: ldloc.1 - IL_0406: ldloc.2 - IL_0407: add - IL_0408: sub - IL_0409: stloc.2 - IL_040a: ldloc.1 - IL_040b: ldloc.2 - IL_040c: bne.un.s IL_0416 - - IL_040e: ldloc.1 - IL_040f: ldloc.1 - IL_0410: ldloc.2 - IL_0411: sub - IL_0412: add - IL_0413: stloc.1 - IL_0414: br.s IL_041c - - IL_0416: ldloc.2 - IL_0417: ldloc.1 - IL_0418: ldloc.2 - IL_0419: sub - IL_041a: sub - IL_041b: stloc.2 - IL_041c: ldloc.1 - IL_041d: ldloc.2 - IL_041e: blt.s IL_0428 - - IL_0420: ldloc.1 - IL_0421: ldloc.1 - IL_0422: ldloc.2 - IL_0423: mul - IL_0424: add - IL_0425: stloc.1 - IL_0426: br.s IL_042e - - IL_0428: ldloc.2 - IL_0429: ldloc.1 - IL_042a: ldloc.2 - IL_042b: mul - IL_042c: mul - IL_042d: stloc.2 - IL_042e: ldloc.1 - IL_042f: ldloc.2 - IL_0430: bne.un.s IL_043a - - IL_0432: ldloc.1 - IL_0433: ldloc.1 - IL_0434: ldloc.2 - IL_0435: mul - IL_0436: sub - IL_0437: stloc.1 - IL_0438: br.s IL_0440 - - IL_043a: ldloc.2 - IL_043b: ldloc.1 - IL_043c: ldloc.2 - IL_043d: mul - IL_043e: add - IL_043f: stloc.2 - IL_0440: ldloc.1 - IL_0441: ldloc.2 - IL_0442: bne.un.s IL_044c - - IL_0444: ldloc.1 - IL_0445: ldloc.1 - IL_0446: ldloc.2 - IL_0447: mul - IL_0448: add - IL_0449: stloc.1 - IL_044a: br.s IL_0452 - - IL_044c: ldloc.2 - IL_044d: ldloc.1 - IL_044e: ldloc.2 - IL_044f: mul - IL_0450: mul - IL_0451: stloc.2 - IL_0452: ldloc.1 - IL_0453: ldloc.2 - IL_0454: blt.s IL_045e - - IL_0456: ldloc.1 - IL_0457: ldloc.1 - IL_0458: ldloc.2 - IL_0459: add - IL_045a: mul - IL_045b: stloc.1 - IL_045c: br.s IL_0464 - - IL_045e: ldloc.2 - IL_045f: ldloc.1 - IL_0460: ldloc.2 - IL_0461: add - IL_0462: add - IL_0463: stloc.2 - IL_0464: ldloc.1 - IL_0465: ldloc.2 - IL_0466: bgt.s IL_0470 - - IL_0468: ldloc.1 - IL_0469: ldloc.1 - IL_046a: ldloc.2 - IL_046b: sub - IL_046c: add - IL_046d: stloc.1 - IL_046e: br.s IL_0476 - - IL_0470: ldloc.2 - IL_0471: ldloc.1 - IL_0472: ldloc.2 - IL_0473: sub - IL_0474: mul - IL_0475: stloc.2 - IL_0476: ldloc.1 - IL_0477: ldloc.2 - IL_0478: beq.s IL_0482 - - IL_047a: ldloc.1 - IL_047b: ldloc.1 - IL_047c: ldloc.2 - IL_047d: mul - IL_047e: mul - IL_047f: stloc.1 - IL_0480: br.s IL_0488 - - IL_0482: ldloc.2 - IL_0483: ldloc.1 - IL_0484: ldloc.2 - IL_0485: mul - IL_0486: sub - IL_0487: stloc.2 - IL_0488: ldloc.1 - IL_0489: ldloc.2 - IL_048a: bge.s IL_0494 - - IL_048c: ldloc.1 - IL_048d: ldloc.1 - IL_048e: ldloc.2 - IL_048f: mul - IL_0490: sub - IL_0491: stloc.1 - IL_0492: br.s IL_049a - - IL_0494: ldloc.2 - IL_0495: ldloc.1 - IL_0496: ldloc.2 - IL_0497: mul - IL_0498: mul - IL_0499: stloc.2 - IL_049a: ldloc.1 - IL_049b: ldloc.2 - IL_049c: ble.s IL_04a6 - - IL_049e: ldloc.1 - IL_049f: ldloc.1 - IL_04a0: ldloc.2 - IL_04a1: add - IL_04a2: sub - IL_04a3: stloc.1 - IL_04a4: br.s IL_04ac - - IL_04a6: ldloc.2 - IL_04a7: ldloc.1 - IL_04a8: ldloc.2 - IL_04a9: add - IL_04aa: mul - IL_04ab: stloc.2 - IL_04ac: ldloc.1 - IL_04ad: ldloc.2 - IL_04ae: bgt.s IL_04b8 - - IL_04b0: ldloc.1 - IL_04b1: ldloc.1 - IL_04b2: ldloc.2 - IL_04b3: mul - IL_04b4: sub - IL_04b5: stloc.1 - IL_04b6: br.s IL_04be - - IL_04b8: ldloc.2 - IL_04b9: ldloc.1 - IL_04ba: ldloc.2 - IL_04bb: mul - IL_04bc: add - IL_04bd: stloc.2 - IL_04be: ldloc.1 - IL_04bf: ldloc.2 - IL_04c0: bge.s IL_04ca - - IL_04c2: ldloc.1 - IL_04c3: ldloc.1 - IL_04c4: ldloc.2 - IL_04c5: add - IL_04c6: mul - IL_04c7: stloc.1 - IL_04c8: br.s IL_04d0 - - IL_04ca: ldloc.2 - IL_04cb: ldloc.1 - IL_04cc: ldloc.2 - IL_04cd: add - IL_04ce: add - IL_04cf: stloc.2 - IL_04d0: ldloc.1 - IL_04d1: ldloc.2 - IL_04d2: bne.un.s IL_04dc - - IL_04d4: ldloc.1 - IL_04d5: ldloc.1 - IL_04d6: ldloc.2 - IL_04d7: add - IL_04d8: mul - IL_04d9: stloc.1 - IL_04da: br.s IL_04e2 - - IL_04dc: ldloc.2 - IL_04dd: ldloc.1 - IL_04de: ldloc.2 - IL_04df: add - IL_04e0: mul - IL_04e1: stloc.2 - IL_04e2: ldloc.1 - IL_04e3: ldloc.2 - IL_04e4: bne.un.s IL_04ee - - IL_04e6: ldloc.1 - IL_04e7: ldloc.1 - IL_04e8: ldloc.2 - IL_04e9: mul - IL_04ea: sub - IL_04eb: stloc.1 - IL_04ec: br.s IL_04f4 - - IL_04ee: ldloc.2 - IL_04ef: ldloc.1 - IL_04f0: ldloc.2 - IL_04f1: mul - IL_04f2: add - IL_04f3: stloc.2 - IL_04f4: ldloc.1 - IL_04f5: ldloc.2 - IL_04f6: ble.s IL_0500 - - IL_04f8: ldloc.1 - IL_04f9: ldloc.1 - IL_04fa: ldloc.2 - IL_04fb: sub - IL_04fc: sub - IL_04fd: stloc.1 - IL_04fe: br.s IL_0506 - - IL_0500: ldloc.2 - IL_0501: ldloc.1 - IL_0502: ldloc.2 - IL_0503: sub - IL_0504: sub - IL_0505: stloc.2 - IL_0506: ldloc.1 - IL_0507: ldloc.2 - IL_0508: ble.s IL_0512 - - IL_050a: ldloc.1 - IL_050b: ldloc.1 - IL_050c: ldloc.2 - IL_050d: sub - IL_050e: mul - IL_050f: stloc.1 - IL_0510: br.s IL_0518 - - IL_0512: ldloc.2 - IL_0513: ldloc.1 - IL_0514: ldloc.2 - IL_0515: sub - IL_0516: sub - IL_0517: stloc.2 - IL_0518: ldloc.1 - IL_0519: ldloc.2 - IL_051a: bne.un.s IL_0524 - - IL_051c: ldloc.1 - IL_051d: ldloc.1 - IL_051e: ldloc.2 - IL_051f: add - IL_0520: mul - IL_0521: stloc.1 - IL_0522: br.s IL_052a - - IL_0524: ldloc.2 - IL_0525: ldloc.1 - IL_0526: ldloc.2 - IL_0527: add - IL_0528: sub - IL_0529: stloc.2 - IL_052a: ldloc.1 - IL_052b: ldloc.2 - IL_052c: blt.s IL_0536 - - IL_052e: ldloc.1 - IL_052f: ldloc.1 - IL_0530: ldloc.2 - IL_0531: add - IL_0532: add - IL_0533: stloc.1 - IL_0534: br.s IL_053c - - IL_0536: ldloc.2 - IL_0537: ldloc.1 - IL_0538: ldloc.2 - IL_0539: add - IL_053a: mul - IL_053b: stloc.2 - IL_053c: ldloc.1 - IL_053d: ldloc.2 - IL_053e: bge.s IL_0548 - - IL_0540: ldloc.1 - IL_0541: ldloc.1 - IL_0542: ldloc.2 - IL_0543: add - IL_0544: mul - IL_0545: stloc.1 - IL_0546: br.s IL_054e - - IL_0548: ldloc.2 - IL_0549: ldloc.1 - IL_054a: ldloc.2 - IL_054b: add - IL_054c: add - IL_054d: stloc.2 - IL_054e: ldloc.1 - IL_054f: ldloc.2 - IL_0550: bne.un.s IL_055a - - IL_0552: ldloc.1 - IL_0553: ldloc.1 - IL_0554: ldloc.2 - IL_0555: mul - IL_0556: sub - IL_0557: stloc.1 - IL_0558: br.s IL_0560 - - IL_055a: ldloc.2 - IL_055b: ldloc.1 - IL_055c: ldloc.2 - IL_055d: mul - IL_055e: mul - IL_055f: stloc.2 - IL_0560: ldloc.1 - IL_0561: ldloc.2 - IL_0562: ble.s IL_056c - - IL_0564: ldloc.1 - IL_0565: ldloc.1 - IL_0566: ldloc.2 - IL_0567: add - IL_0568: mul - IL_0569: stloc.1 - IL_056a: br.s IL_0572 - - IL_056c: ldloc.2 - IL_056d: ldloc.1 - IL_056e: ldloc.2 - IL_056f: add - IL_0570: mul - IL_0571: stloc.2 - IL_0572: ldloc.1 - IL_0573: ldloc.2 - IL_0574: ble.s IL_057e - - IL_0576: ldloc.1 - IL_0577: ldloc.1 - IL_0578: ldloc.2 - IL_0579: mul - IL_057a: add - IL_057b: stloc.1 - IL_057c: br.s IL_0584 - - IL_057e: ldloc.2 - IL_057f: ldloc.1 - IL_0580: ldloc.2 - IL_0581: mul - IL_0582: add - IL_0583: stloc.2 - IL_0584: ldloc.1 - IL_0585: ldloc.2 - IL_0586: bge.s IL_0590 - - IL_0588: ldloc.1 - IL_0589: ldloc.1 - IL_058a: ldloc.2 - IL_058b: sub - IL_058c: add - IL_058d: stloc.1 - IL_058e: br.s IL_0596 - - IL_0590: ldloc.2 - IL_0591: ldloc.1 - IL_0592: ldloc.2 - IL_0593: sub - IL_0594: mul - IL_0595: stloc.2 - IL_0596: ldloc.1 - IL_0597: ldloc.2 - IL_0598: ble.s IL_05a2 - - IL_059a: ldloc.1 - IL_059b: ldloc.1 - IL_059c: ldloc.2 - IL_059d: mul - IL_059e: sub - IL_059f: stloc.1 - IL_05a0: br.s IL_05a8 - - IL_05a2: ldloc.2 - IL_05a3: ldloc.1 - IL_05a4: ldloc.2 - IL_05a5: mul - IL_05a6: mul - IL_05a7: stloc.2 - IL_05a8: ldloc.1 - IL_05a9: ldloc.2 - IL_05aa: beq.s IL_05b4 - - IL_05ac: ldloc.1 - IL_05ad: ldloc.1 - IL_05ae: ldloc.2 - IL_05af: add - IL_05b0: mul - IL_05b1: stloc.1 - IL_05b2: br.s IL_05ba - - IL_05b4: ldloc.2 - IL_05b5: ldloc.1 - IL_05b6: ldloc.2 - IL_05b7: add - IL_05b8: add - IL_05b9: stloc.2 - IL_05ba: ldloc.1 - IL_05bb: ldloc.2 - IL_05bc: bge.s IL_05c6 - - IL_05be: ldloc.1 - IL_05bf: ldloc.1 - IL_05c0: ldloc.2 - IL_05c1: sub - IL_05c2: mul - IL_05c3: stloc.1 - IL_05c4: br.s IL_05cc - - IL_05c6: ldloc.2 - IL_05c7: ldloc.1 - IL_05c8: ldloc.2 - IL_05c9: sub - IL_05ca: mul - IL_05cb: stloc.2 - IL_05cc: ldloc.1 - IL_05cd: ldloc.2 - IL_05ce: ble.s IL_05d8 - - IL_05d0: ldloc.1 - IL_05d1: ldloc.1 - IL_05d2: ldloc.2 - IL_05d3: add - IL_05d4: mul - IL_05d5: stloc.1 - IL_05d6: br.s IL_05de - - IL_05d8: ldloc.2 - IL_05d9: ldloc.1 - IL_05da: ldloc.2 - IL_05db: add - IL_05dc: add - IL_05dd: stloc.2 - IL_05de: ldloc.1 - IL_05df: ldloc.2 - IL_05e0: blt.s IL_05ea - - IL_05e2: ldloc.1 - IL_05e3: ldloc.1 - IL_05e4: ldloc.2 - IL_05e5: mul - IL_05e6: add - IL_05e7: stloc.1 - IL_05e8: br.s IL_05f0 - - IL_05ea: ldloc.2 - IL_05eb: ldloc.1 - IL_05ec: ldloc.2 - IL_05ed: mul - IL_05ee: add - IL_05ef: stloc.2 - IL_05f0: ldloc.1 - IL_05f1: ldloc.2 - IL_05f2: bgt.s IL_05fc - - IL_05f4: ldloc.1 - IL_05f5: ldloc.1 - IL_05f6: ldloc.2 - IL_05f7: sub - IL_05f8: mul - IL_05f9: stloc.1 - IL_05fa: br.s IL_0602 - - IL_05fc: ldloc.2 - IL_05fd: ldloc.1 - IL_05fe: ldloc.2 - IL_05ff: sub - IL_0600: add - IL_0601: stloc.2 - IL_0602: ldloc.1 - IL_0603: ldloc.2 - IL_0604: bne.un.s IL_060e - - IL_0606: ldloc.1 - IL_0607: ldloc.1 - IL_0608: ldloc.2 - IL_0609: sub - IL_060a: sub - IL_060b: stloc.1 - IL_060c: br.s IL_0614 - - IL_060e: ldloc.2 - IL_060f: ldloc.1 - IL_0610: ldloc.2 - IL_0611: sub - IL_0612: sub - IL_0613: stloc.2 - IL_0614: ldloc.1 - IL_0615: ldloc.2 - IL_0616: beq.s IL_0620 - - IL_0618: ldloc.1 - IL_0619: ldloc.1 - IL_061a: ldloc.2 - IL_061b: add - IL_061c: mul - IL_061d: stloc.1 - IL_061e: br.s IL_0626 - - IL_0620: ldloc.2 - IL_0621: ldloc.1 - IL_0622: ldloc.2 - IL_0623: add - IL_0624: add - IL_0625: stloc.2 - IL_0626: ldloc.1 - IL_0627: ldloc.2 - IL_0628: blt.s IL_0632 - - IL_062a: ldloc.1 - IL_062b: ldloc.1 - IL_062c: ldloc.2 - IL_062d: mul - IL_062e: add - IL_062f: stloc.1 - IL_0630: br.s IL_0638 - - IL_0632: ldloc.2 - IL_0633: ldloc.1 - IL_0634: ldloc.2 - IL_0635: mul - IL_0636: add - IL_0637: stloc.2 - IL_0638: ldloc.1 - IL_0639: ldloc.2 - IL_063a: bne.un.s IL_0644 - - IL_063c: ldloc.1 - IL_063d: ldloc.1 - IL_063e: ldloc.2 - IL_063f: add - IL_0640: add - IL_0641: stloc.1 - IL_0642: br.s IL_064a - - IL_0644: ldloc.2 - IL_0645: ldloc.1 - IL_0646: ldloc.2 - IL_0647: add - IL_0648: add - IL_0649: stloc.2 - IL_064a: ldloc.1 - IL_064b: ldloc.2 - IL_064c: ble.s IL_0656 - - IL_064e: ldloc.1 - IL_064f: ldloc.1 - IL_0650: ldloc.2 - IL_0651: sub - IL_0652: sub - IL_0653: stloc.1 - IL_0654: br.s IL_065c - - IL_0656: ldloc.2 - IL_0657: ldloc.1 - IL_0658: ldloc.2 - IL_0659: sub - IL_065a: sub - IL_065b: stloc.2 - IL_065c: ldloc.1 - IL_065d: ldloc.2 - IL_065e: beq.s IL_0668 - - IL_0660: ldloc.1 - IL_0661: ldloc.1 - IL_0662: ldloc.2 - IL_0663: sub - IL_0664: sub - IL_0665: stloc.1 - IL_0666: br.s IL_066e - - IL_0668: ldloc.2 - IL_0669: ldloc.1 - IL_066a: ldloc.2 - IL_066b: sub - IL_066c: mul - IL_066d: stloc.2 - IL_066e: ldloc.1 - IL_066f: ldloc.2 - IL_0670: ble.s IL_067a - - IL_0672: ldloc.1 - IL_0673: ldloc.1 - IL_0674: ldloc.2 - IL_0675: mul - IL_0676: mul - IL_0677: stloc.1 - IL_0678: br.s IL_0680 - - IL_067a: ldloc.2 - IL_067b: ldloc.1 - IL_067c: ldloc.2 - IL_067d: mul - IL_067e: add - IL_067f: stloc.2 - IL_0680: ldloc.1 - IL_0681: ldloc.2 - IL_0682: ble.s IL_068c - - IL_0684: ldloc.1 - IL_0685: ldloc.1 - IL_0686: ldloc.2 - IL_0687: sub - IL_0688: add - IL_0689: stloc.1 - IL_068a: br.s IL_0692 - - IL_068c: ldloc.2 - IL_068d: ldloc.1 - IL_068e: ldloc.2 - IL_068f: sub - IL_0690: add - IL_0691: stloc.2 - IL_0692: ldloc.1 - IL_0693: ldloc.2 - IL_0694: ble.s IL_069e - - IL_0696: ldloc.1 - IL_0697: ldloc.1 - IL_0698: ldloc.2 - IL_0699: sub - IL_069a: sub - IL_069b: stloc.1 - IL_069c: br.s IL_06a4 - - IL_069e: ldloc.2 - IL_069f: ldloc.1 - IL_06a0: ldloc.2 - IL_06a1: sub - IL_06a2: add - IL_06a3: stloc.2 - IL_06a4: ldloc.1 - IL_06a5: ldloc.2 - IL_06a6: blt.s IL_06b0 - - IL_06a8: ldloc.1 - IL_06a9: ldloc.1 - IL_06aa: ldloc.2 - IL_06ab: sub - IL_06ac: sub - IL_06ad: stloc.1 - IL_06ae: br.s IL_06b6 - - IL_06b0: ldloc.2 - IL_06b1: ldloc.1 - IL_06b2: ldloc.2 - IL_06b3: sub - IL_06b4: add - IL_06b5: stloc.2 - IL_06b6: ldloc.1 - IL_06b7: ldloc.2 - IL_06b8: bne.un.s IL_06c2 - - IL_06ba: ldloc.1 - IL_06bb: ldloc.1 - IL_06bc: ldloc.2 - IL_06bd: mul - IL_06be: sub - IL_06bf: stloc.1 - IL_06c0: br.s IL_06c8 - - IL_06c2: ldloc.2 - IL_06c3: ldloc.1 - IL_06c4: ldloc.2 - IL_06c5: mul - IL_06c6: add - IL_06c7: stloc.2 - IL_06c8: ldloc.1 - IL_06c9: ldloc.2 - IL_06ca: bgt.s IL_06d4 - - IL_06cc: ldloc.1 - IL_06cd: ldloc.1 - IL_06ce: ldloc.2 - IL_06cf: add - IL_06d0: add - IL_06d1: stloc.1 - IL_06d2: br.s IL_06da - - IL_06d4: ldloc.2 - IL_06d5: ldloc.1 - IL_06d6: ldloc.2 - IL_06d7: add - IL_06d8: add - IL_06d9: stloc.2 - IL_06da: ldloc.1 - IL_06db: ldloc.2 - IL_06dc: ble.s IL_06e6 - - IL_06de: ldloc.1 - IL_06df: ldloc.1 - IL_06e0: ldloc.2 - IL_06e1: add - IL_06e2: mul - IL_06e3: stloc.1 - IL_06e4: br.s IL_06ec - - IL_06e6: ldloc.2 - IL_06e7: ldloc.1 - IL_06e8: ldloc.2 - IL_06e9: add - IL_06ea: sub - IL_06eb: stloc.2 - IL_06ec: ldloc.1 - IL_06ed: ldloc.2 - IL_06ee: bge.s IL_06f8 - - IL_06f0: ldloc.1 - IL_06f1: ldloc.1 - IL_06f2: ldloc.2 - IL_06f3: add - IL_06f4: mul - IL_06f5: stloc.1 - IL_06f6: br.s IL_06fe - - IL_06f8: ldloc.2 - IL_06f9: ldloc.1 - IL_06fa: ldloc.2 - IL_06fb: add - IL_06fc: sub - IL_06fd: stloc.2 - IL_06fe: ldloc.1 - IL_06ff: ldloc.2 - IL_0700: bgt.s IL_070a - - IL_0702: ldloc.1 - IL_0703: ldloc.1 - IL_0704: ldloc.2 - IL_0705: mul - IL_0706: mul - IL_0707: stloc.1 - IL_0708: br.s IL_0710 - - IL_070a: ldloc.2 - IL_070b: ldloc.1 - IL_070c: ldloc.2 - IL_070d: mul - IL_070e: sub - IL_070f: stloc.2 - IL_0710: ldloc.1 - IL_0711: ldloc.2 - IL_0712: bgt.s IL_071c - - IL_0714: ldloc.1 - IL_0715: ldloc.1 - IL_0716: ldloc.2 - IL_0717: add - IL_0718: add - IL_0719: stloc.1 - IL_071a: br.s IL_0722 - - IL_071c: ldloc.2 - IL_071d: ldloc.1 - IL_071e: ldloc.2 - IL_071f: add - IL_0720: add - IL_0721: stloc.2 - IL_0722: ldloc.1 - IL_0723: ldloc.2 - IL_0724: ble.s IL_072e - - IL_0726: ldloc.1 - IL_0727: ldloc.1 - IL_0728: ldloc.2 - IL_0729: add - IL_072a: mul - IL_072b: stloc.1 - IL_072c: br.s IL_0734 - - IL_072e: ldloc.2 - IL_072f: ldloc.1 - IL_0730: ldloc.2 - IL_0731: add - IL_0732: mul - IL_0733: stloc.2 - IL_0734: ldloc.1 - IL_0735: ldloc.2 - IL_0736: ble.s IL_0740 - - IL_0738: ldloc.1 - IL_0739: ldloc.1 - IL_073a: ldloc.2 - IL_073b: sub - IL_073c: mul - IL_073d: stloc.1 - IL_073e: br.s IL_0746 - - IL_0740: ldloc.2 - IL_0741: ldloc.1 - IL_0742: ldloc.2 - IL_0743: sub - IL_0744: sub - IL_0745: stloc.2 - IL_0746: ldloc.1 - IL_0747: ldloc.2 - IL_0748: bge.s IL_0752 - - IL_074a: ldloc.1 - IL_074b: ldloc.1 - IL_074c: ldloc.2 - IL_074d: sub - IL_074e: add - IL_074f: stloc.1 - IL_0750: br.s IL_0758 - - IL_0752: ldloc.2 - IL_0753: ldloc.1 - IL_0754: ldloc.2 - IL_0755: sub - IL_0756: mul - IL_0757: stloc.2 - IL_0758: ldloc.1 - IL_0759: ldloc.2 - IL_075a: blt.s IL_0764 - - IL_075c: ldloc.1 - IL_075d: ldloc.1 - IL_075e: ldloc.2 - IL_075f: mul - IL_0760: mul - IL_0761: stloc.1 - IL_0762: br.s IL_076a - - IL_0764: ldloc.2 - IL_0765: ldloc.1 - IL_0766: ldloc.2 - IL_0767: mul - IL_0768: mul - IL_0769: stloc.2 - IL_076a: ldloc.1 - IL_076b: ldloc.2 - IL_076c: bne.un.s IL_0776 - - IL_076e: ldloc.1 - IL_076f: ldloc.1 - IL_0770: ldloc.2 - IL_0771: add - IL_0772: add - IL_0773: stloc.1 - IL_0774: br.s IL_077c - - IL_0776: ldloc.2 - IL_0777: ldloc.1 - IL_0778: ldloc.2 - IL_0779: add - IL_077a: mul - IL_077b: stloc.2 - IL_077c: ldloc.1 - IL_077d: ldloc.2 - IL_077e: bgt.s IL_0788 - - IL_0780: ldloc.1 - IL_0781: ldloc.1 - IL_0782: ldloc.2 - IL_0783: add - IL_0784: mul - IL_0785: stloc.1 - IL_0786: br.s IL_078e - - IL_0788: ldloc.2 - IL_0789: ldloc.1 - IL_078a: ldloc.2 - IL_078b: add - IL_078c: add - IL_078d: stloc.2 - IL_078e: ldloc.1 - IL_078f: ldloc.2 - IL_0790: bge.s IL_079a - - IL_0792: ldloc.1 - IL_0793: ldloc.1 - IL_0794: ldloc.2 - IL_0795: sub - IL_0796: mul - IL_0797: stloc.1 - IL_0798: br.s IL_07a0 - - IL_079a: ldloc.2 - IL_079b: ldloc.1 - IL_079c: ldloc.2 - IL_079d: sub - IL_079e: mul - IL_079f: stloc.2 - IL_07a0: ldloc.1 - IL_07a1: ldloc.2 - IL_07a2: ble.s IL_07ac - - IL_07a4: ldloc.1 - IL_07a5: ldloc.1 - IL_07a6: ldloc.2 - IL_07a7: sub - IL_07a8: add - IL_07a9: stloc.1 - IL_07aa: br.s IL_07b2 - - IL_07ac: ldloc.2 - IL_07ad: ldloc.1 - IL_07ae: ldloc.2 - IL_07af: sub - IL_07b0: mul - IL_07b1: stloc.2 - IL_07b2: ldloc.1 - IL_07b3: ldloc.2 - IL_07b4: bge.s IL_07be - - IL_07b6: ldloc.1 - IL_07b7: ldloc.1 - IL_07b8: ldloc.2 - IL_07b9: mul - IL_07ba: mul - IL_07bb: stloc.1 - IL_07bc: br.s IL_07c4 - - IL_07be: ldloc.2 - IL_07bf: ldloc.1 - IL_07c0: ldloc.2 - IL_07c1: mul - IL_07c2: mul - IL_07c3: stloc.2 - IL_07c4: ldloc.1 - IL_07c5: ldloc.2 - IL_07c6: bgt.s IL_07d0 - - IL_07c8: ldloc.1 - IL_07c9: ldloc.1 - IL_07ca: ldloc.2 - IL_07cb: sub - IL_07cc: add - IL_07cd: stloc.1 - IL_07ce: br.s IL_07d6 - - IL_07d0: ldloc.2 - IL_07d1: ldloc.1 - IL_07d2: ldloc.2 - IL_07d3: sub - IL_07d4: add - IL_07d5: stloc.2 - IL_07d6: ldloc.1 - IL_07d7: ldloc.2 - IL_07d8: blt.s IL_07e2 - - IL_07da: ldloc.1 - IL_07db: ldloc.1 - IL_07dc: ldloc.2 - IL_07dd: add - IL_07de: add - IL_07df: stloc.1 - IL_07e0: br.s IL_07e8 - - IL_07e2: ldloc.2 - IL_07e3: ldloc.1 - IL_07e4: ldloc.2 - IL_07e5: add - IL_07e6: mul - IL_07e7: stloc.2 - IL_07e8: ldloc.1 - IL_07e9: ldloc.2 - IL_07ea: bge.s IL_07f4 - - IL_07ec: ldloc.1 - IL_07ed: ldloc.1 - IL_07ee: ldloc.2 - IL_07ef: sub - IL_07f0: mul - IL_07f1: stloc.1 - IL_07f2: br.s IL_07fa - - IL_07f4: ldloc.2 - IL_07f5: ldloc.1 - IL_07f6: ldloc.2 - IL_07f7: sub - IL_07f8: mul - IL_07f9: stloc.2 - IL_07fa: ldloc.1 - IL_07fb: ldloc.2 - IL_07fc: bge.s IL_0806 - - IL_07fe: ldloc.1 - IL_07ff: ldloc.1 - IL_0800: ldloc.2 - IL_0801: sub - IL_0802: mul - IL_0803: stloc.1 - IL_0804: br.s IL_080c - - IL_0806: ldloc.2 - IL_0807: ldloc.1 - IL_0808: ldloc.2 - IL_0809: sub - IL_080a: add - IL_080b: stloc.2 - IL_080c: ldloc.1 - IL_080d: ldloc.2 - IL_080e: blt.s IL_0818 - - IL_0810: ldloc.1 - IL_0811: ldloc.1 - IL_0812: ldloc.2 - IL_0813: add - IL_0814: mul - IL_0815: stloc.1 - IL_0816: br.s IL_081e - - IL_0818: ldloc.2 - IL_0819: ldloc.1 - IL_081a: ldloc.2 - IL_081b: add - IL_081c: sub - IL_081d: stloc.2 - IL_081e: ldloc.1 - IL_081f: ldloc.2 - IL_0820: blt.s IL_082a - - IL_0822: ldloc.1 - IL_0823: ldloc.1 - IL_0824: ldloc.2 - IL_0825: add - IL_0826: sub - IL_0827: stloc.1 - IL_0828: br.s IL_0830 - - IL_082a: ldloc.2 - IL_082b: ldloc.1 - IL_082c: ldloc.2 - IL_082d: add - IL_082e: add - IL_082f: stloc.2 - IL_0830: ldloc.1 - IL_0831: ldloc.2 - IL_0832: bne.un.s IL_083c - - IL_0834: ldloc.1 - IL_0835: ldloc.1 - IL_0836: ldloc.2 - IL_0837: mul - IL_0838: add - IL_0839: stloc.1 - IL_083a: br.s IL_0842 - - IL_083c: ldloc.2 - IL_083d: ldloc.1 - IL_083e: ldloc.2 - IL_083f: mul - IL_0840: add - IL_0841: stloc.2 - IL_0842: ldloc.1 - IL_0843: ldloc.2 - IL_0844: bge.s IL_084e - - IL_0846: ldloc.1 - IL_0847: ldloc.1 - IL_0848: ldloc.2 - IL_0849: sub - IL_084a: add - IL_084b: stloc.1 - IL_084c: br.s IL_0854 - - IL_084e: ldloc.2 - IL_084f: ldloc.1 - IL_0850: ldloc.2 - IL_0851: sub - IL_0852: add - IL_0853: stloc.2 - IL_0854: ldloc.1 - IL_0855: ldloc.2 - IL_0856: ble.s IL_0860 - - IL_0858: ldloc.1 - IL_0859: ldloc.1 - IL_085a: ldloc.2 - IL_085b: sub - IL_085c: mul - IL_085d: stloc.1 - IL_085e: br.s IL_0866 - - IL_0860: ldloc.2 - IL_0861: ldloc.1 - IL_0862: ldloc.2 - IL_0863: sub - IL_0864: add - IL_0865: stloc.2 - IL_0866: ldloc.1 - IL_0867: ldloc.2 - IL_0868: beq.s IL_0872 - - IL_086a: ldloc.1 - IL_086b: ldloc.1 - IL_086c: ldloc.2 - IL_086d: sub - IL_086e: sub - IL_086f: stloc.1 - IL_0870: br.s IL_0878 - - IL_0872: ldloc.2 - IL_0873: ldloc.1 - IL_0874: ldloc.2 - IL_0875: sub - IL_0876: mul - IL_0877: stloc.2 - IL_0878: ldloc.1 - IL_0879: ldloc.2 - IL_087a: bge.s IL_0884 - - IL_087c: ldloc.1 - IL_087d: ldloc.1 - IL_087e: ldloc.2 - IL_087f: sub - IL_0880: add - IL_0881: stloc.1 - IL_0882: br.s IL_088a - - IL_0884: ldloc.2 - IL_0885: ldloc.1 - IL_0886: ldloc.2 - IL_0887: sub - IL_0888: mul - IL_0889: stloc.2 - IL_088a: ldloc.1 - IL_088b: ldloc.2 - IL_088c: bge.s IL_0896 - - IL_088e: ldloc.1 - IL_088f: ldloc.1 - IL_0890: ldloc.2 - IL_0891: sub - IL_0892: sub - IL_0893: stloc.1 - IL_0894: br.s IL_089c - - IL_0896: ldloc.2 - IL_0897: ldloc.1 - IL_0898: ldloc.2 - IL_0899: sub - IL_089a: add - IL_089b: stloc.2 - IL_089c: ldloc.1 - IL_089d: ldloc.2 - IL_089e: beq.s IL_08a8 - - IL_08a0: ldloc.1 - IL_08a1: ldloc.1 - IL_08a2: ldloc.2 - IL_08a3: add - IL_08a4: add - IL_08a5: stloc.1 - IL_08a6: br.s IL_08ae - - IL_08a8: ldloc.2 - IL_08a9: ldloc.1 - IL_08aa: ldloc.2 - IL_08ab: add - IL_08ac: add - IL_08ad: stloc.2 - IL_08ae: ldloc.1 - IL_08af: ldloc.2 - IL_08b0: bge.s IL_08ba - - IL_08b2: ldloc.1 - IL_08b3: ldloc.1 - IL_08b4: ldloc.2 - IL_08b5: add - IL_08b6: mul - IL_08b7: stloc.1 - IL_08b8: br.s IL_08c0 - - IL_08ba: ldloc.2 - IL_08bb: ldloc.1 - IL_08bc: ldloc.2 - IL_08bd: add - IL_08be: sub - IL_08bf: stloc.2 - IL_08c0: ldloc.1 - IL_08c1: ldloc.2 - IL_08c2: ble.s IL_08cc - - IL_08c4: ldloc.1 - IL_08c5: ldloc.1 - IL_08c6: ldloc.2 - IL_08c7: add - IL_08c8: add - IL_08c9: stloc.1 - IL_08ca: br.s IL_08d2 - - IL_08cc: ldloc.2 - IL_08cd: ldloc.1 - IL_08ce: ldloc.2 - IL_08cf: add - IL_08d0: sub - IL_08d1: stloc.2 - IL_08d2: ldloc.1 - IL_08d3: ldloc.2 - IL_08d4: beq.s IL_08de - - IL_08d6: ldloc.1 - IL_08d7: ldloc.1 - IL_08d8: ldloc.2 - IL_08d9: add - IL_08da: mul - IL_08db: stloc.1 - IL_08dc: br.s IL_08e4 - - IL_08de: ldloc.2 - IL_08df: ldloc.1 - IL_08e0: ldloc.2 - IL_08e1: add - IL_08e2: mul - IL_08e3: stloc.2 - IL_08e4: ldloc.1 - IL_08e5: ldloc.2 - IL_08e6: bgt.s IL_08f0 - - IL_08e8: ldloc.1 - IL_08e9: ldloc.1 - IL_08ea: ldloc.2 - IL_08eb: sub - IL_08ec: add - IL_08ed: stloc.1 - IL_08ee: br.s IL_08f6 - - IL_08f0: ldloc.2 - IL_08f1: ldloc.1 - IL_08f2: ldloc.2 - IL_08f3: sub - IL_08f4: sub - IL_08f5: stloc.2 - IL_08f6: ldloc.1 - IL_08f7: ldloc.2 - IL_08f8: bgt.s IL_0902 - - IL_08fa: ldloc.1 - IL_08fb: ldloc.1 - IL_08fc: ldloc.2 - IL_08fd: add - IL_08fe: mul - IL_08ff: stloc.1 - IL_0900: br.s IL_0908 - - IL_0902: ldloc.2 - IL_0903: ldloc.1 - IL_0904: ldloc.2 - IL_0905: add - IL_0906: mul - IL_0907: stloc.2 - IL_0908: ldloc.1 - IL_0909: ldloc.2 - IL_090a: bge.s IL_0914 - - IL_090c: ldloc.1 - IL_090d: ldloc.1 - IL_090e: ldloc.2 - IL_090f: sub - IL_0910: add - IL_0911: stloc.1 - IL_0912: br.s IL_091a - - IL_0914: ldloc.2 - IL_0915: ldloc.1 - IL_0916: ldloc.2 - IL_0917: sub - IL_0918: mul - IL_0919: stloc.2 - IL_091a: ldloc.1 - IL_091b: ldloc.2 - IL_091c: bgt.s IL_0926 - - IL_091e: ldloc.1 - IL_091f: ldloc.1 - IL_0920: ldloc.2 - IL_0921: sub - IL_0922: sub - IL_0923: stloc.1 - IL_0924: br.s IL_092c - - IL_0926: ldloc.2 - IL_0927: ldloc.1 - IL_0928: ldloc.2 - IL_0929: sub - IL_092a: mul - IL_092b: stloc.2 - IL_092c: ldloc.1 - IL_092d: ldloc.2 - IL_092e: beq.s IL_0938 - - IL_0930: ldloc.1 - IL_0931: ldloc.1 - IL_0932: ldloc.2 - IL_0933: add - IL_0934: mul - IL_0935: stloc.1 - IL_0936: br.s IL_093e - - IL_0938: ldloc.2 - IL_0939: ldloc.1 - IL_093a: ldloc.2 - IL_093b: add - IL_093c: mul - IL_093d: stloc.2 - IL_093e: ldloc.1 - IL_093f: ldloc.2 - IL_0940: ble.s IL_094a - - IL_0942: ldloc.1 - IL_0943: ldloc.1 - IL_0944: ldloc.2 - IL_0945: sub - IL_0946: mul - IL_0947: stloc.1 - IL_0948: br.s IL_0950 - - IL_094a: ldloc.2 - IL_094b: ldloc.1 - IL_094c: ldloc.2 - IL_094d: sub - IL_094e: sub - IL_094f: stloc.2 - IL_0950: ldloc.1 - IL_0951: ldloc.2 - IL_0952: bge.s IL_095c - - IL_0954: ldloc.1 - IL_0955: ldloc.1 - IL_0956: ldloc.2 - IL_0957: mul - IL_0958: add - IL_0959: stloc.1 - IL_095a: br.s IL_0962 - - IL_095c: ldloc.2 - IL_095d: ldloc.1 - IL_095e: ldloc.2 - IL_095f: mul - IL_0960: sub - IL_0961: stloc.2 - IL_0962: ldloc.1 - IL_0963: ldloc.2 - IL_0964: bne.un.s IL_096e - - IL_0966: ldloc.1 - IL_0967: ldloc.1 - IL_0968: ldloc.2 - IL_0969: sub - IL_096a: sub - IL_096b: stloc.1 - IL_096c: br.s IL_0974 - - IL_096e: ldloc.2 - IL_096f: ldloc.1 - IL_0970: ldloc.2 - IL_0971: sub - IL_0972: sub - IL_0973: stloc.2 - IL_0974: ldloc.1 - IL_0975: ldloc.2 - IL_0976: blt.s IL_0980 - - IL_0978: ldloc.1 - IL_0979: ldloc.1 - IL_097a: ldloc.2 - IL_097b: add - IL_097c: mul - IL_097d: stloc.1 - IL_097e: br.s IL_0986 - - IL_0980: ldloc.2 - IL_0981: ldloc.1 - IL_0982: ldloc.2 - IL_0983: add - IL_0984: mul - IL_0985: stloc.2 - IL_0986: ldloc.1 - IL_0987: ldloc.2 - IL_0988: beq.s IL_0992 - - IL_098a: ldloc.1 - IL_098b: ldloc.1 - IL_098c: ldloc.2 - IL_098d: add - IL_098e: mul - IL_098f: stloc.1 - IL_0990: br.s IL_0998 - - IL_0992: ldloc.2 - IL_0993: ldloc.1 - IL_0994: ldloc.2 - IL_0995: add - IL_0996: mul - IL_0997: stloc.2 - IL_0998: ldloc.1 - IL_0999: ldloc.2 - IL_099a: blt.s IL_09a4 - - IL_099c: ldloc.1 - IL_099d: ldloc.1 - IL_099e: ldloc.2 - IL_099f: mul - IL_09a0: mul - IL_09a1: stloc.1 - IL_09a2: br.s IL_09aa - - IL_09a4: ldloc.2 - IL_09a5: ldloc.1 - IL_09a6: ldloc.2 - IL_09a7: mul - IL_09a8: add - IL_09a9: stloc.2 - IL_09aa: ldloc.1 - IL_09ab: ldloc.2 - IL_09ac: bne.un.s IL_09b6 - - IL_09ae: ldloc.1 - IL_09af: ldloc.1 - IL_09b0: ldloc.2 - IL_09b1: sub - IL_09b2: add - IL_09b3: stloc.1 - IL_09b4: br.s IL_09bc - - IL_09b6: ldloc.2 - IL_09b7: ldloc.1 - IL_09b8: ldloc.2 - IL_09b9: sub - IL_09ba: sub - IL_09bb: stloc.2 - IL_09bc: ldloc.1 - IL_09bd: ldloc.2 - IL_09be: bge.s IL_09c8 - - IL_09c0: ldloc.1 - IL_09c1: ldloc.1 - IL_09c2: ldloc.2 - IL_09c3: add - IL_09c4: add - IL_09c5: stloc.1 - IL_09c6: br.s IL_09ce - - IL_09c8: ldloc.2 - IL_09c9: ldloc.1 - IL_09ca: ldloc.2 - IL_09cb: add - IL_09cc: sub - IL_09cd: stloc.2 - IL_09ce: ldloc.1 - IL_09cf: ldloc.2 - IL_09d0: bne.un.s IL_09da - - IL_09d2: ldloc.1 - IL_09d3: ldloc.1 - IL_09d4: ldloc.2 - IL_09d5: mul - IL_09d6: sub - IL_09d7: stloc.1 - IL_09d8: br.s IL_09e0 - - IL_09da: ldloc.2 - IL_09db: ldloc.1 - IL_09dc: ldloc.2 - IL_09dd: mul - IL_09de: mul - IL_09df: stloc.2 - IL_09e0: ldloc.1 - IL_09e1: ldloc.2 - IL_09e2: bgt.s IL_09ec - - IL_09e4: ldloc.1 - IL_09e5: ldloc.1 - IL_09e6: ldloc.2 - IL_09e7: sub - IL_09e8: add - IL_09e9: stloc.1 - IL_09ea: br.s IL_09f2 - - IL_09ec: ldloc.2 - IL_09ed: ldloc.1 - IL_09ee: ldloc.2 - IL_09ef: sub - IL_09f0: add - IL_09f1: stloc.2 - IL_09f2: ldloc.1 - IL_09f3: ldloc.2 - IL_09f4: ble.s IL_09fe - - IL_09f6: ldloc.1 - IL_09f7: ldloc.1 - IL_09f8: ldloc.2 - IL_09f9: mul - IL_09fa: add - IL_09fb: stloc.1 - IL_09fc: br.s IL_0a04 - - IL_09fe: ldloc.2 - IL_09ff: ldloc.1 - IL_0a00: ldloc.2 - IL_0a01: mul - IL_0a02: add - IL_0a03: stloc.2 - IL_0a04: ldloc.1 - IL_0a05: ldloc.2 - IL_0a06: beq.s IL_0a10 - - IL_0a08: ldloc.1 - IL_0a09: ldloc.1 - IL_0a0a: ldloc.2 - IL_0a0b: mul - IL_0a0c: sub - IL_0a0d: stloc.1 - IL_0a0e: br.s IL_0a16 - - IL_0a10: ldloc.2 - IL_0a11: ldloc.1 - IL_0a12: ldloc.2 - IL_0a13: mul - IL_0a14: add - IL_0a15: stloc.2 - IL_0a16: ldloc.1 - IL_0a17: ldloc.2 - IL_0a18: beq.s IL_0a22 - - IL_0a1a: ldloc.1 - IL_0a1b: ldloc.1 - IL_0a1c: ldloc.2 - IL_0a1d: add - IL_0a1e: mul - IL_0a1f: stloc.1 - IL_0a20: br.s IL_0a28 - - IL_0a22: ldloc.2 - IL_0a23: ldloc.1 - IL_0a24: ldloc.2 - IL_0a25: add - IL_0a26: sub - IL_0a27: stloc.2 - IL_0a28: ldloc.1 - IL_0a29: ldloc.2 - IL_0a2a: ble.s IL_0a34 - - IL_0a2c: ldloc.1 - IL_0a2d: ldloc.1 - IL_0a2e: ldloc.2 - IL_0a2f: add - IL_0a30: mul - IL_0a31: stloc.1 - IL_0a32: br.s IL_0a3a - - IL_0a34: ldloc.2 - IL_0a35: ldloc.1 - IL_0a36: ldloc.2 - IL_0a37: add - IL_0a38: sub - IL_0a39: stloc.2 - IL_0a3a: ldloc.1 - IL_0a3b: ldloc.2 - IL_0a3c: bne.un.s IL_0a46 - - IL_0a3e: ldloc.1 - IL_0a3f: ldloc.1 - IL_0a40: ldloc.2 - IL_0a41: add - IL_0a42: sub - IL_0a43: stloc.1 - IL_0a44: br.s IL_0a4c - - IL_0a46: ldloc.2 - IL_0a47: ldloc.1 - IL_0a48: ldloc.2 - IL_0a49: add - IL_0a4a: mul - IL_0a4b: stloc.2 - IL_0a4c: ldloc.1 - IL_0a4d: ldloc.2 - IL_0a4e: bne.un.s IL_0a58 - - IL_0a50: ldloc.1 - IL_0a51: ldloc.1 - IL_0a52: ldloc.2 - IL_0a53: sub - IL_0a54: add - IL_0a55: stloc.1 - IL_0a56: br.s IL_0a5e - - IL_0a58: ldloc.2 - IL_0a59: ldloc.1 - IL_0a5a: ldloc.2 - IL_0a5b: sub - IL_0a5c: sub - IL_0a5d: stloc.2 - IL_0a5e: ldloc.1 - IL_0a5f: ldloc.2 - IL_0a60: ble.s IL_0a6a - - IL_0a62: ldloc.1 - IL_0a63: ldloc.1 - IL_0a64: ldloc.2 - IL_0a65: mul - IL_0a66: sub - IL_0a67: stloc.1 - IL_0a68: br.s IL_0a70 - - IL_0a6a: ldloc.2 - IL_0a6b: ldloc.1 - IL_0a6c: ldloc.2 - IL_0a6d: mul - IL_0a6e: sub - IL_0a6f: stloc.2 - IL_0a70: ldloc.1 - IL_0a71: ldloc.2 - IL_0a72: beq.s IL_0a7c - - IL_0a74: ldloc.1 - IL_0a75: ldloc.1 - IL_0a76: ldloc.2 - IL_0a77: mul - IL_0a78: add - IL_0a79: stloc.1 - IL_0a7a: br.s IL_0a82 - - IL_0a7c: ldloc.2 - IL_0a7d: ldloc.1 - IL_0a7e: ldloc.2 - IL_0a7f: mul - IL_0a80: sub - IL_0a81: stloc.2 - IL_0a82: ldloc.1 - IL_0a83: ldloc.2 - IL_0a84: bgt.s IL_0a8e - - IL_0a86: ldloc.1 - IL_0a87: ldloc.1 - IL_0a88: ldloc.2 - IL_0a89: sub - IL_0a8a: add - IL_0a8b: stloc.1 - IL_0a8c: br.s IL_0a94 - - IL_0a8e: ldloc.2 - IL_0a8f: ldloc.1 - IL_0a90: ldloc.2 - IL_0a91: sub - IL_0a92: add - IL_0a93: stloc.2 - IL_0a94: ldloc.1 - IL_0a95: ldloc.2 - IL_0a96: bne.un.s IL_0aa0 - - IL_0a98: ldloc.1 - IL_0a99: ldloc.1 - IL_0a9a: ldloc.2 - IL_0a9b: add - IL_0a9c: sub - IL_0a9d: stloc.1 - IL_0a9e: br.s IL_0aa6 - - IL_0aa0: ldloc.2 - IL_0aa1: ldloc.1 - IL_0aa2: ldloc.2 - IL_0aa3: add - IL_0aa4: mul - IL_0aa5: stloc.2 - IL_0aa6: ldloc.1 - IL_0aa7: ldloc.2 - IL_0aa8: ble.s IL_0ab2 - - IL_0aaa: ldloc.1 - IL_0aab: ldloc.1 - IL_0aac: ldloc.2 - IL_0aad: sub - IL_0aae: sub - IL_0aaf: stloc.1 - IL_0ab0: br.s IL_0ab8 - - IL_0ab2: ldloc.2 - IL_0ab3: ldloc.1 - IL_0ab4: ldloc.2 - IL_0ab5: sub - IL_0ab6: sub - IL_0ab7: stloc.2 - IL_0ab8: ldloc.1 - IL_0ab9: ldloc.2 - IL_0aba: bgt.s IL_0ac4 - - IL_0abc: ldloc.1 - IL_0abd: ldloc.1 - IL_0abe: ldloc.2 - IL_0abf: add - IL_0ac0: add - IL_0ac1: stloc.1 - IL_0ac2: br.s IL_0aca - - IL_0ac4: ldloc.2 - IL_0ac5: ldloc.1 - IL_0ac6: ldloc.2 - IL_0ac7: add - IL_0ac8: mul - IL_0ac9: stloc.2 - IL_0aca: ldloc.1 - IL_0acb: ldloc.2 - IL_0acc: beq.s IL_0ad6 - - IL_0ace: ldloc.1 - IL_0acf: ldloc.1 - IL_0ad0: ldloc.2 - IL_0ad1: add - IL_0ad2: mul - IL_0ad3: stloc.1 - IL_0ad4: br.s IL_0adc - - IL_0ad6: ldloc.2 - IL_0ad7: ldloc.1 - IL_0ad8: ldloc.2 - IL_0ad9: add - IL_0ada: mul - IL_0adb: stloc.2 - IL_0adc: ldloc.1 - IL_0add: ldloc.2 - IL_0ade: blt.s IL_0ae8 - - IL_0ae0: ldloc.1 - IL_0ae1: ldloc.1 - IL_0ae2: ldloc.2 - IL_0ae3: add - IL_0ae4: mul - IL_0ae5: stloc.1 - IL_0ae6: br.s IL_0aee - - IL_0ae8: ldloc.2 - IL_0ae9: ldloc.1 - IL_0aea: ldloc.2 - IL_0aeb: add - IL_0aec: mul - IL_0aed: stloc.2 - IL_0aee: ldloc.1 - IL_0aef: ldloc.2 - IL_0af0: blt.s IL_0afa - - IL_0af2: ldloc.1 - IL_0af3: ldloc.1 - IL_0af4: ldloc.2 - IL_0af5: sub - IL_0af6: sub - IL_0af7: stloc.1 - IL_0af8: br.s IL_0b00 - - IL_0afa: ldloc.2 - IL_0afb: ldloc.1 - IL_0afc: ldloc.2 - IL_0afd: sub - IL_0afe: sub - IL_0aff: stloc.2 - IL_0b00: ldloc.1 - IL_0b01: ldloc.2 - IL_0b02: ble.s IL_0b0c - - IL_0b04: ldloc.1 - IL_0b05: ldloc.1 - IL_0b06: ldloc.2 - IL_0b07: mul - IL_0b08: sub - IL_0b09: stloc.1 - IL_0b0a: br.s IL_0b12 - - IL_0b0c: ldloc.2 - IL_0b0d: ldloc.1 - IL_0b0e: ldloc.2 - IL_0b0f: mul - IL_0b10: mul - IL_0b11: stloc.2 - IL_0b12: ldloc.1 - IL_0b13: ldloc.2 - IL_0b14: blt.s IL_0b1e - - IL_0b16: ldloc.1 - IL_0b17: ldloc.1 - IL_0b18: ldloc.2 - IL_0b19: mul - IL_0b1a: sub - IL_0b1b: stloc.1 - IL_0b1c: br.s IL_0b24 - - IL_0b1e: ldloc.2 - IL_0b1f: ldloc.1 - IL_0b20: ldloc.2 - IL_0b21: mul - IL_0b22: sub - IL_0b23: stloc.2 - IL_0b24: ldloc.1 - IL_0b25: ldloc.2 - IL_0b26: blt.s IL_0b30 - - IL_0b28: ldloc.1 - IL_0b29: ldloc.1 - IL_0b2a: ldloc.2 - IL_0b2b: add - IL_0b2c: add - IL_0b2d: stloc.1 - IL_0b2e: br.s IL_0b36 - - IL_0b30: ldloc.2 - IL_0b31: ldloc.1 - IL_0b32: ldloc.2 - IL_0b33: add - IL_0b34: sub - IL_0b35: stloc.2 - IL_0b36: ldloc.1 - IL_0b37: ldloc.2 - IL_0b38: bgt.s IL_0b42 - - IL_0b3a: ldloc.1 - IL_0b3b: ldloc.1 - IL_0b3c: ldloc.2 - IL_0b3d: add - IL_0b3e: sub - IL_0b3f: stloc.1 - IL_0b40: br.s IL_0b48 - - IL_0b42: ldloc.2 - IL_0b43: ldloc.1 - IL_0b44: ldloc.2 - IL_0b45: add - IL_0b46: add - IL_0b47: stloc.2 - IL_0b48: ldloc.1 - IL_0b49: ldloc.2 - IL_0b4a: bgt.s IL_0b54 - - IL_0b4c: ldloc.1 - IL_0b4d: ldloc.1 - IL_0b4e: ldloc.2 - IL_0b4f: mul - IL_0b50: add - IL_0b51: stloc.1 - IL_0b52: br.s IL_0b5a - - IL_0b54: ldloc.2 - IL_0b55: ldloc.1 - IL_0b56: ldloc.2 - IL_0b57: mul - IL_0b58: add - IL_0b59: stloc.2 - IL_0b5a: ldloc.1 - IL_0b5b: ldloc.2 - IL_0b5c: bgt.s IL_0b66 - - IL_0b5e: ldloc.1 - IL_0b5f: ldloc.1 - IL_0b60: ldloc.2 - IL_0b61: add - IL_0b62: sub - IL_0b63: stloc.1 - IL_0b64: br.s IL_0b6c - - IL_0b66: ldloc.2 - IL_0b67: ldloc.1 - IL_0b68: ldloc.2 - IL_0b69: add - IL_0b6a: mul - IL_0b6b: stloc.2 - IL_0b6c: ldloc.1 - IL_0b6d: ldloc.2 - IL_0b6e: ble.s IL_0b78 - - IL_0b70: ldloc.1 - IL_0b71: ldloc.1 - IL_0b72: ldloc.2 - IL_0b73: mul - IL_0b74: sub - IL_0b75: stloc.1 - IL_0b76: br.s IL_0b7e - - IL_0b78: ldloc.2 - IL_0b79: ldloc.1 - IL_0b7a: ldloc.2 - IL_0b7b: mul - IL_0b7c: sub - IL_0b7d: stloc.2 - IL_0b7e: ldloc.1 - IL_0b7f: ldloc.2 - IL_0b80: blt.s IL_0b8a - - IL_0b82: ldloc.1 - IL_0b83: ldloc.1 - IL_0b84: ldloc.2 - IL_0b85: add - IL_0b86: add - IL_0b87: stloc.1 - IL_0b88: br.s IL_0b90 - - IL_0b8a: ldloc.2 - IL_0b8b: ldloc.1 - IL_0b8c: ldloc.2 - IL_0b8d: add - IL_0b8e: mul - IL_0b8f: stloc.2 - IL_0b90: ldloc.1 - IL_0b91: ldloc.2 - IL_0b92: beq.s IL_0b9c - - IL_0b94: ldloc.1 - IL_0b95: ldloc.1 - IL_0b96: ldloc.2 - IL_0b97: mul - IL_0b98: sub - IL_0b99: stloc.1 - IL_0b9a: br.s IL_0ba2 - - IL_0b9c: ldloc.2 - IL_0b9d: ldloc.1 - IL_0b9e: ldloc.2 - IL_0b9f: mul - IL_0ba0: add - IL_0ba1: stloc.2 - IL_0ba2: ldloc.1 - IL_0ba3: ldloc.2 - IL_0ba4: bne.un.s IL_0bae - - IL_0ba6: ldloc.1 - IL_0ba7: ldloc.1 - IL_0ba8: ldloc.2 - IL_0ba9: add - IL_0baa: sub - IL_0bab: stloc.1 - IL_0bac: br.s IL_0bb4 - - IL_0bae: ldloc.2 - IL_0baf: ldloc.1 - IL_0bb0: ldloc.2 - IL_0bb1: add - IL_0bb2: mul - IL_0bb3: stloc.2 - IL_0bb4: ldloc.1 - IL_0bb5: ldloc.2 - IL_0bb6: beq.s IL_0bc0 - - IL_0bb8: ldloc.1 - IL_0bb9: ldloc.1 - IL_0bba: ldloc.2 - IL_0bbb: mul - IL_0bbc: mul - IL_0bbd: stloc.1 - IL_0bbe: br.s IL_0bc6 - - IL_0bc0: ldloc.2 - IL_0bc1: ldloc.1 - IL_0bc2: ldloc.2 - IL_0bc3: mul - IL_0bc4: sub - IL_0bc5: stloc.2 - IL_0bc6: ldloc.1 - IL_0bc7: ldloc.2 - IL_0bc8: bge.s IL_0bd2 - - IL_0bca: ldloc.1 - IL_0bcb: ldloc.1 - IL_0bcc: ldloc.2 - IL_0bcd: mul - IL_0bce: sub - IL_0bcf: stloc.1 - IL_0bd0: br.s IL_0bd8 - - IL_0bd2: ldloc.2 - IL_0bd3: ldloc.1 - IL_0bd4: ldloc.2 - IL_0bd5: mul - IL_0bd6: sub - IL_0bd7: stloc.2 - IL_0bd8: ldloc.1 - IL_0bd9: ldloc.2 - IL_0bda: bne.un.s IL_0be4 - - IL_0bdc: ldloc.1 - IL_0bdd: ldloc.1 - IL_0bde: ldloc.2 - IL_0bdf: add - IL_0be0: mul - IL_0be1: stloc.1 - IL_0be2: br.s IL_0bea - - IL_0be4: ldloc.2 - IL_0be5: ldloc.1 - IL_0be6: ldloc.2 - IL_0be7: add - IL_0be8: sub - IL_0be9: stloc.2 - IL_0bea: ldloc.1 - IL_0beb: ldloc.2 - IL_0bec: bgt.s IL_0bf6 - - IL_0bee: ldloc.1 - IL_0bef: ldloc.1 - IL_0bf0: ldloc.2 - IL_0bf1: sub - IL_0bf2: mul - IL_0bf3: stloc.1 - IL_0bf4: br.s IL_0bfc - - IL_0bf6: ldloc.2 - IL_0bf7: ldloc.1 - IL_0bf8: ldloc.2 - IL_0bf9: sub - IL_0bfa: mul - IL_0bfb: stloc.2 - IL_0bfc: ldloc.1 - IL_0bfd: ldloc.2 - IL_0bfe: bne.un.s IL_0c08 - - IL_0c00: ldloc.1 - IL_0c01: ldloc.1 - IL_0c02: ldloc.2 - IL_0c03: add - IL_0c04: sub - IL_0c05: stloc.1 - IL_0c06: br.s IL_0c0e - - IL_0c08: ldloc.2 - IL_0c09: ldloc.1 - IL_0c0a: ldloc.2 - IL_0c0b: add - IL_0c0c: mul - IL_0c0d: stloc.2 - IL_0c0e: ldloc.1 - IL_0c0f: ldloc.2 - IL_0c10: ble.s IL_0c1a - - IL_0c12: ldloc.1 - IL_0c13: ldloc.1 - IL_0c14: ldloc.2 - IL_0c15: sub - IL_0c16: mul - IL_0c17: stloc.1 - IL_0c18: br.s IL_0c20 - - IL_0c1a: ldloc.2 - IL_0c1b: ldloc.1 - IL_0c1c: ldloc.2 - IL_0c1d: sub - IL_0c1e: sub - IL_0c1f: stloc.2 - IL_0c20: ldloc.1 - IL_0c21: ldloc.2 - IL_0c22: bge.s IL_0c2c - - IL_0c24: ldloc.1 - IL_0c25: ldloc.1 - IL_0c26: ldloc.2 - IL_0c27: add - IL_0c28: sub - IL_0c29: stloc.1 - IL_0c2a: br.s IL_0c32 - - IL_0c2c: ldloc.2 - IL_0c2d: ldloc.1 - IL_0c2e: ldloc.2 - IL_0c2f: add - IL_0c30: sub - IL_0c31: stloc.2 - IL_0c32: ldloc.1 - IL_0c33: ldloc.2 - IL_0c34: blt.s IL_0c3e - - IL_0c36: ldloc.1 - IL_0c37: ldloc.1 - IL_0c38: ldloc.2 - IL_0c39: mul - IL_0c3a: sub - IL_0c3b: stloc.1 - IL_0c3c: br.s IL_0c44 - - IL_0c3e: ldloc.2 - IL_0c3f: ldloc.1 - IL_0c40: ldloc.2 - IL_0c41: mul - IL_0c42: add - IL_0c43: stloc.2 - IL_0c44: ldloc.1 - IL_0c45: ldloc.2 - IL_0c46: bge.s IL_0c50 - - IL_0c48: ldloc.1 - IL_0c49: ldloc.1 - IL_0c4a: ldloc.2 - IL_0c4b: sub - IL_0c4c: mul - IL_0c4d: stloc.1 - IL_0c4e: br.s IL_0c56 - - IL_0c50: ldloc.2 - IL_0c51: ldloc.1 - IL_0c52: ldloc.2 - IL_0c53: sub - IL_0c54: mul - IL_0c55: stloc.2 - IL_0c56: ldloc.1 - IL_0c57: ldloc.2 - IL_0c58: beq.s IL_0c62 - - IL_0c5a: ldloc.1 - IL_0c5b: ldloc.1 - IL_0c5c: ldloc.2 - IL_0c5d: sub - IL_0c5e: mul - IL_0c5f: stloc.1 - IL_0c60: br.s IL_0c68 - - IL_0c62: ldloc.2 - IL_0c63: ldloc.1 - IL_0c64: ldloc.2 - IL_0c65: sub - IL_0c66: add - IL_0c67: stloc.2 - IL_0c68: ldloc.1 - IL_0c69: ldloc.2 - IL_0c6a: beq.s IL_0c74 - - IL_0c6c: ldloc.1 - IL_0c6d: ldloc.1 - IL_0c6e: ldloc.2 - IL_0c6f: mul - IL_0c70: mul - IL_0c71: stloc.1 - IL_0c72: br.s IL_0c7a - - IL_0c74: ldloc.2 - IL_0c75: ldloc.1 - IL_0c76: ldloc.2 - IL_0c77: mul - IL_0c78: mul - IL_0c79: stloc.2 - IL_0c7a: ldloc.1 - IL_0c7b: ldloc.2 - IL_0c7c: bne.un.s IL_0c86 - - IL_0c7e: ldloc.1 - IL_0c7f: ldloc.1 - IL_0c80: ldloc.2 - IL_0c81: add - IL_0c82: mul - IL_0c83: stloc.1 - IL_0c84: br.s IL_0c8c - - IL_0c86: ldloc.2 - IL_0c87: ldloc.1 - IL_0c88: ldloc.2 - IL_0c89: add - IL_0c8a: sub - IL_0c8b: stloc.2 - IL_0c8c: ldloc.1 - IL_0c8d: ldloc.2 - IL_0c8e: bgt.s IL_0c98 - - IL_0c90: ldloc.1 - IL_0c91: ldloc.1 - IL_0c92: ldloc.2 - IL_0c93: add - IL_0c94: sub - IL_0c95: stloc.1 - IL_0c96: br.s IL_0c9e - - IL_0c98: ldloc.2 - IL_0c99: ldloc.1 - IL_0c9a: ldloc.2 - IL_0c9b: add - IL_0c9c: add - IL_0c9d: stloc.2 - IL_0c9e: ldloc.1 - IL_0c9f: ldloc.2 - IL_0ca0: beq.s IL_0caa - - IL_0ca2: ldloc.1 - IL_0ca3: ldloc.1 - IL_0ca4: ldloc.2 - IL_0ca5: add - IL_0ca6: mul - IL_0ca7: stloc.1 - IL_0ca8: br.s IL_0cb0 - - IL_0caa: ldloc.2 - IL_0cab: ldloc.1 - IL_0cac: ldloc.2 - IL_0cad: add - IL_0cae: mul - IL_0caf: stloc.2 - IL_0cb0: ldloc.1 - IL_0cb1: ldloc.2 - IL_0cb2: blt.s IL_0cbc - - IL_0cb4: ldloc.1 - IL_0cb5: ldloc.1 - IL_0cb6: ldloc.2 - IL_0cb7: mul - IL_0cb8: add - IL_0cb9: stloc.1 - IL_0cba: br.s IL_0cc2 - - IL_0cbc: ldloc.2 - IL_0cbd: ldloc.1 - IL_0cbe: ldloc.2 - IL_0cbf: mul - IL_0cc0: sub - IL_0cc1: stloc.2 - IL_0cc2: ldloc.1 - IL_0cc3: ldloc.2 - IL_0cc4: bge.s IL_0cce - - IL_0cc6: ldloc.1 - IL_0cc7: ldloc.1 - IL_0cc8: ldloc.2 - IL_0cc9: sub - IL_0cca: add - IL_0ccb: stloc.1 - IL_0ccc: br.s IL_0cd4 - - IL_0cce: ldloc.2 - IL_0ccf: ldloc.1 - IL_0cd0: ldloc.2 - IL_0cd1: sub - IL_0cd2: sub - IL_0cd3: stloc.2 - IL_0cd4: ldloc.1 - IL_0cd5: ldloc.2 - IL_0cd6: blt.s IL_0ce0 - - IL_0cd8: ldloc.1 - IL_0cd9: ldloc.1 - IL_0cda: ldloc.2 - IL_0cdb: sub - IL_0cdc: sub - IL_0cdd: stloc.1 - IL_0cde: br.s IL_0ce6 - - IL_0ce0: ldloc.2 - IL_0ce1: ldloc.1 - IL_0ce2: ldloc.2 - IL_0ce3: sub - IL_0ce4: mul - IL_0ce5: stloc.2 - IL_0ce6: ldloc.1 - IL_0ce7: ldloc.2 - IL_0ce8: bne.un.s IL_0cf2 - - IL_0cea: ldloc.1 - IL_0ceb: ldloc.1 - IL_0cec: ldloc.2 - IL_0ced: mul - IL_0cee: sub - IL_0cef: stloc.1 - IL_0cf0: br.s IL_0cf8 - - IL_0cf2: ldloc.2 - IL_0cf3: ldloc.1 - IL_0cf4: ldloc.2 - IL_0cf5: mul - IL_0cf6: mul - IL_0cf7: stloc.2 - IL_0cf8: ldloc.1 - IL_0cf9: ldloc.2 - IL_0cfa: blt.s IL_0d04 - - IL_0cfc: ldloc.1 - IL_0cfd: ldloc.1 - IL_0cfe: ldloc.2 - IL_0cff: add - IL_0d00: sub - IL_0d01: stloc.1 - IL_0d02: br.s IL_0d0a - - IL_0d04: ldloc.2 - IL_0d05: ldloc.1 - IL_0d06: ldloc.2 - IL_0d07: add - IL_0d08: add - IL_0d09: stloc.2 - IL_0d0a: ldloc.1 - IL_0d0b: ldloc.2 - IL_0d0c: beq.s IL_0d16 - - IL_0d0e: ldloc.1 - IL_0d0f: ldloc.1 - IL_0d10: ldloc.2 - IL_0d11: sub - IL_0d12: mul - IL_0d13: stloc.1 - IL_0d14: br.s IL_0d1c - - IL_0d16: ldloc.2 - IL_0d17: ldloc.1 - IL_0d18: ldloc.2 - IL_0d19: sub - IL_0d1a: mul - IL_0d1b: stloc.2 - IL_0d1c: ldloc.1 - IL_0d1d: ldloc.2 - IL_0d1e: beq.s IL_0d28 - - IL_0d20: ldloc.1 - IL_0d21: ldloc.1 - IL_0d22: ldloc.2 - IL_0d23: mul - IL_0d24: add - IL_0d25: stloc.1 - IL_0d26: br.s IL_0d2e - - IL_0d28: ldloc.2 - IL_0d29: ldloc.1 - IL_0d2a: ldloc.2 - IL_0d2b: mul - IL_0d2c: sub - IL_0d2d: stloc.2 - IL_0d2e: ldloc.1 - IL_0d2f: ldloc.2 - IL_0d30: blt.s IL_0d3a - - IL_0d32: ldloc.1 - IL_0d33: ldloc.1 - IL_0d34: ldloc.2 - IL_0d35: sub - IL_0d36: add - IL_0d37: stloc.1 - IL_0d38: br.s IL_0d40 - - IL_0d3a: ldloc.2 - IL_0d3b: ldloc.1 - IL_0d3c: ldloc.2 - IL_0d3d: sub - IL_0d3e: add - IL_0d3f: stloc.2 - IL_0d40: ldloc.1 - IL_0d41: ldloc.2 - IL_0d42: beq.s IL_0d4c - - IL_0d44: ldloc.1 - IL_0d45: ldloc.1 - IL_0d46: ldloc.2 - IL_0d47: sub - IL_0d48: mul - IL_0d49: stloc.1 - IL_0d4a: br.s IL_0d52 - - IL_0d4c: ldloc.2 - IL_0d4d: ldloc.1 - IL_0d4e: ldloc.2 - IL_0d4f: sub - IL_0d50: add - IL_0d51: stloc.2 - IL_0d52: ldloc.1 - IL_0d53: ldloc.2 - IL_0d54: blt.s IL_0d5e - - IL_0d56: ldloc.1 - IL_0d57: ldloc.1 - IL_0d58: ldloc.2 - IL_0d59: sub - IL_0d5a: add - IL_0d5b: stloc.1 - IL_0d5c: br.s IL_0d64 - - IL_0d5e: ldloc.2 - IL_0d5f: ldloc.1 - IL_0d60: ldloc.2 - IL_0d61: sub - IL_0d62: add - IL_0d63: stloc.2 - IL_0d64: ldloc.1 - IL_0d65: ldloc.2 - IL_0d66: blt.s IL_0d70 - - IL_0d68: ldloc.1 - IL_0d69: ldloc.1 - IL_0d6a: ldloc.2 - IL_0d6b: add - IL_0d6c: sub - IL_0d6d: stloc.1 - IL_0d6e: br.s IL_0d76 - - IL_0d70: ldloc.2 - IL_0d71: ldloc.1 - IL_0d72: ldloc.2 - IL_0d73: add - IL_0d74: add - IL_0d75: stloc.2 - IL_0d76: ldloc.1 - IL_0d77: ldloc.2 - IL_0d78: bne.un.s IL_0d82 - - IL_0d7a: ldloc.1 - IL_0d7b: ldloc.1 - IL_0d7c: ldloc.2 - IL_0d7d: add - IL_0d7e: mul - IL_0d7f: stloc.1 - IL_0d80: br.s IL_0d88 - - IL_0d82: ldloc.2 - IL_0d83: ldloc.1 - IL_0d84: ldloc.2 - IL_0d85: add - IL_0d86: sub - IL_0d87: stloc.2 - IL_0d88: ldloc.1 - IL_0d89: ldloc.2 - IL_0d8a: beq.s IL_0d94 - - IL_0d8c: ldloc.1 - IL_0d8d: ldloc.1 - IL_0d8e: ldloc.2 - IL_0d8f: sub - IL_0d90: add - IL_0d91: stloc.1 - IL_0d92: br.s IL_0d9a - - IL_0d94: ldloc.2 - IL_0d95: ldloc.1 - IL_0d96: ldloc.2 - IL_0d97: sub - IL_0d98: mul - IL_0d99: stloc.2 - IL_0d9a: ldloc.1 - IL_0d9b: ldloc.2 - IL_0d9c: bne.un.s IL_0da6 - - IL_0d9e: ldloc.1 - IL_0d9f: ldloc.1 - IL_0da0: ldloc.2 - IL_0da1: sub - IL_0da2: sub - IL_0da3: stloc.1 - IL_0da4: br.s IL_0dac - - IL_0da6: ldloc.2 - IL_0da7: ldloc.1 - IL_0da8: ldloc.2 - IL_0da9: sub - IL_0daa: sub - IL_0dab: stloc.2 - IL_0dac: ldloc.1 - IL_0dad: ldloc.2 - IL_0dae: bgt.s IL_0db8 - - IL_0db0: ldloc.1 - IL_0db1: ldloc.1 - IL_0db2: ldloc.2 - IL_0db3: add - IL_0db4: mul - IL_0db5: stloc.1 - IL_0db6: br.s IL_0dbe - - IL_0db8: ldloc.2 - IL_0db9: ldloc.1 - IL_0dba: ldloc.2 - IL_0dbb: add - IL_0dbc: mul - IL_0dbd: stloc.2 - IL_0dbe: ldloc.1 - IL_0dbf: ldloc.2 - IL_0dc0: bne.un.s IL_0dca - - IL_0dc2: ldloc.1 - IL_0dc3: ldloc.1 - IL_0dc4: ldloc.2 - IL_0dc5: add - IL_0dc6: sub - IL_0dc7: stloc.1 - IL_0dc8: br.s IL_0dd0 - - IL_0dca: ldloc.2 - IL_0dcb: ldloc.1 - IL_0dcc: ldloc.2 - IL_0dcd: add - IL_0dce: mul - IL_0dcf: stloc.2 - IL_0dd0: ldloc.1 - IL_0dd1: ldloc.2 - IL_0dd2: blt.s IL_0ddc - - IL_0dd4: ldloc.1 - IL_0dd5: ldloc.1 - IL_0dd6: ldloc.2 - IL_0dd7: add - IL_0dd8: sub - IL_0dd9: stloc.1 - IL_0dda: br.s IL_0de2 - - IL_0ddc: ldloc.2 - IL_0ddd: ldloc.1 - IL_0dde: ldloc.2 - IL_0ddf: add - IL_0de0: sub - IL_0de1: stloc.2 - IL_0de2: ldloc.1 - IL_0de3: ldloc.2 - IL_0de4: blt.s IL_0dee - - IL_0de6: ldloc.1 - IL_0de7: ldloc.1 - IL_0de8: ldloc.2 - IL_0de9: add - IL_0dea: add - IL_0deb: stloc.1 - IL_0dec: br.s IL_0df4 - - IL_0dee: ldloc.2 - IL_0def: ldloc.1 - IL_0df0: ldloc.2 - IL_0df1: add - IL_0df2: sub - IL_0df3: stloc.2 - IL_0df4: ldloc.1 - IL_0df5: ldloc.2 - IL_0df6: bge.s IL_0e00 - - IL_0df8: ldloc.1 - IL_0df9: ldloc.1 - IL_0dfa: ldloc.2 - IL_0dfb: sub - IL_0dfc: sub - IL_0dfd: stloc.1 - IL_0dfe: br.s IL_0e06 - - IL_0e00: ldloc.2 - IL_0e01: ldloc.1 - IL_0e02: ldloc.2 - IL_0e03: sub - IL_0e04: mul - IL_0e05: stloc.2 - IL_0e06: ldloc.1 - IL_0e07: ldloc.2 - IL_0e08: bgt.s IL_0e12 - - IL_0e0a: ldloc.1 - IL_0e0b: ldloc.1 - IL_0e0c: ldloc.2 - IL_0e0d: add - IL_0e0e: sub - IL_0e0f: stloc.1 - IL_0e10: br.s IL_0e18 - - IL_0e12: ldloc.2 - IL_0e13: ldloc.1 - IL_0e14: ldloc.2 - IL_0e15: add - IL_0e16: mul - IL_0e17: stloc.2 - IL_0e18: ldloc.1 - IL_0e19: ldloc.2 - IL_0e1a: bne.un.s IL_0e24 - - IL_0e1c: ldloc.1 - IL_0e1d: ldloc.1 - IL_0e1e: ldloc.2 - IL_0e1f: add - IL_0e20: sub - IL_0e21: stloc.1 - IL_0e22: br.s IL_0e2a - - IL_0e24: ldloc.2 - IL_0e25: ldloc.1 - IL_0e26: ldloc.2 - IL_0e27: add - IL_0e28: add - IL_0e29: stloc.2 - IL_0e2a: ldloc.1 - IL_0e2b: ldloc.2 - IL_0e2c: bge.s IL_0e36 - - IL_0e2e: ldloc.1 - IL_0e2f: ldloc.1 - IL_0e30: ldloc.2 - IL_0e31: sub - IL_0e32: sub - IL_0e33: stloc.1 - IL_0e34: br.s IL_0e3c - - IL_0e36: ldloc.2 - IL_0e37: ldloc.1 - IL_0e38: ldloc.2 - IL_0e39: sub - IL_0e3a: mul - IL_0e3b: stloc.2 - IL_0e3c: ldloc.1 - IL_0e3d: ldloc.2 - IL_0e3e: blt.s IL_0e48 - - IL_0e40: ldloc.1 - IL_0e41: ldloc.1 - IL_0e42: ldloc.2 - IL_0e43: sub - IL_0e44: sub - IL_0e45: stloc.1 - IL_0e46: br.s IL_0e4e - - IL_0e48: ldloc.2 - IL_0e49: ldloc.1 - IL_0e4a: ldloc.2 - IL_0e4b: sub - IL_0e4c: add - IL_0e4d: stloc.2 - IL_0e4e: ldloc.1 - IL_0e4f: ldloc.2 - IL_0e50: ble.s IL_0e5a - - IL_0e52: ldloc.1 - IL_0e53: ldloc.1 - IL_0e54: ldloc.2 - IL_0e55: mul - IL_0e56: mul - IL_0e57: stloc.1 - IL_0e58: br.s IL_0e60 - - IL_0e5a: ldloc.2 - IL_0e5b: ldloc.1 - IL_0e5c: ldloc.2 - IL_0e5d: mul - IL_0e5e: mul - IL_0e5f: stloc.2 - IL_0e60: ldloc.1 - IL_0e61: ldloc.2 - IL_0e62: bgt.s IL_0e6c - - IL_0e64: ldloc.1 - IL_0e65: ldloc.1 - IL_0e66: ldloc.2 - IL_0e67: add - IL_0e68: mul - IL_0e69: stloc.1 - IL_0e6a: br.s IL_0e72 - - IL_0e6c: ldloc.2 - IL_0e6d: ldloc.1 - IL_0e6e: ldloc.2 - IL_0e6f: add - IL_0e70: mul - IL_0e71: stloc.2 - IL_0e72: ldloc.1 - IL_0e73: ldloc.2 - IL_0e74: ble.s IL_0e7e - - IL_0e76: ldloc.1 - IL_0e77: ldloc.1 - IL_0e78: ldloc.2 - IL_0e79: mul - IL_0e7a: add - IL_0e7b: stloc.1 - IL_0e7c: br.s IL_0e84 - - IL_0e7e: ldloc.2 - IL_0e7f: ldloc.1 - IL_0e80: ldloc.2 - IL_0e81: mul - IL_0e82: mul - IL_0e83: stloc.2 - IL_0e84: ldloc.1 - IL_0e85: ldloc.2 - IL_0e86: beq.s IL_0e90 - - IL_0e88: ldloc.1 - IL_0e89: ldloc.1 - IL_0e8a: ldloc.2 - IL_0e8b: add - IL_0e8c: sub - IL_0e8d: stloc.1 - IL_0e8e: br.s IL_0e96 - - IL_0e90: ldloc.2 - IL_0e91: ldloc.1 - IL_0e92: ldloc.2 - IL_0e93: add - IL_0e94: add - IL_0e95: stloc.2 - IL_0e96: ldloc.1 - IL_0e97: ldloc.2 - IL_0e98: bne.un.s IL_0ea2 - - IL_0e9a: ldloc.1 - IL_0e9b: ldloc.1 - IL_0e9c: ldloc.2 - IL_0e9d: add - IL_0e9e: mul - IL_0e9f: stloc.1 - IL_0ea0: br.s IL_0ea8 - - IL_0ea2: ldloc.2 - IL_0ea3: ldloc.1 - IL_0ea4: ldloc.2 - IL_0ea5: add - IL_0ea6: add - IL_0ea7: stloc.2 - IL_0ea8: ldloc.1 - IL_0ea9: ldloc.2 - IL_0eaa: ble.s IL_0eb4 - - IL_0eac: ldloc.1 - IL_0ead: ldloc.1 - IL_0eae: ldloc.2 - IL_0eaf: sub - IL_0eb0: mul - IL_0eb1: stloc.1 - IL_0eb2: br.s IL_0eba - - IL_0eb4: ldloc.2 - IL_0eb5: ldloc.1 - IL_0eb6: ldloc.2 - IL_0eb7: sub - IL_0eb8: sub - IL_0eb9: stloc.2 - IL_0eba: ldloc.1 - IL_0ebb: ldloc.2 - IL_0ebc: blt.s IL_0ec6 - - IL_0ebe: ldloc.1 - IL_0ebf: ldloc.1 - IL_0ec0: ldloc.2 - IL_0ec1: mul - IL_0ec2: mul - IL_0ec3: stloc.1 - IL_0ec4: br.s IL_0ecc - - IL_0ec6: ldloc.2 - IL_0ec7: ldloc.1 - IL_0ec8: ldloc.2 - IL_0ec9: mul - IL_0eca: add - IL_0ecb: stloc.2 - IL_0ecc: ldloc.1 - IL_0ecd: ldloc.2 - IL_0ece: beq.s IL_0ed8 - - IL_0ed0: ldloc.1 - IL_0ed1: ldloc.1 - IL_0ed2: ldloc.2 - IL_0ed3: mul - IL_0ed4: add - IL_0ed5: stloc.1 - IL_0ed6: br.s IL_0ede - - IL_0ed8: ldloc.2 - IL_0ed9: ldloc.1 - IL_0eda: ldloc.2 - IL_0edb: mul - IL_0edc: mul - IL_0edd: stloc.2 - IL_0ede: ldloc.1 - IL_0edf: ldloc.2 - IL_0ee0: ble.s IL_0eea - - IL_0ee2: ldloc.1 - IL_0ee3: ldloc.1 - IL_0ee4: ldloc.2 - IL_0ee5: sub - IL_0ee6: add - IL_0ee7: stloc.1 - IL_0ee8: br.s IL_0ef0 - - IL_0eea: ldloc.2 - IL_0eeb: ldloc.1 - IL_0eec: ldloc.2 - IL_0eed: sub - IL_0eee: add - IL_0eef: stloc.2 - IL_0ef0: ldloc.1 - IL_0ef1: ldloc.2 - IL_0ef2: bgt.s IL_0efc - - IL_0ef4: ldloc.1 - IL_0ef5: ldloc.1 - IL_0ef6: ldloc.2 - IL_0ef7: sub - IL_0ef8: mul - IL_0ef9: stloc.1 - IL_0efa: br.s IL_0f02 - - IL_0efc: ldloc.2 - IL_0efd: ldloc.1 - IL_0efe: ldloc.2 - IL_0eff: sub - IL_0f00: mul - IL_0f01: stloc.2 - IL_0f02: ldloc.1 - IL_0f03: ldloc.2 - IL_0f04: beq.s IL_0f0e - - IL_0f06: ldloc.1 - IL_0f07: ldloc.1 - IL_0f08: ldloc.2 - IL_0f09: sub - IL_0f0a: sub - IL_0f0b: stloc.1 - IL_0f0c: br.s IL_0f14 - - IL_0f0e: ldloc.2 - IL_0f0f: ldloc.1 - IL_0f10: ldloc.2 - IL_0f11: sub - IL_0f12: mul - IL_0f13: stloc.2 - IL_0f14: ldloc.1 - IL_0f15: ldloc.2 - IL_0f16: bgt.s IL_0f20 - - IL_0f18: ldloc.1 - IL_0f19: ldloc.1 - IL_0f1a: ldloc.2 - IL_0f1b: mul - IL_0f1c: sub - IL_0f1d: stloc.1 - IL_0f1e: br.s IL_0f26 - - IL_0f20: ldloc.2 - IL_0f21: ldloc.1 - IL_0f22: ldloc.2 - IL_0f23: mul - IL_0f24: sub - IL_0f25: stloc.2 - IL_0f26: ldloc.1 - IL_0f27: ldloc.2 - IL_0f28: blt.s IL_0f32 - - IL_0f2a: ldloc.1 - IL_0f2b: ldloc.1 - IL_0f2c: ldloc.2 - IL_0f2d: sub - IL_0f2e: sub - IL_0f2f: stloc.1 - IL_0f30: br.s IL_0f38 - - IL_0f32: ldloc.2 - IL_0f33: ldloc.1 - IL_0f34: ldloc.2 - IL_0f35: sub - IL_0f36: sub - IL_0f37: stloc.2 - IL_0f38: ldloc.1 - IL_0f39: ldloc.2 - IL_0f3a: blt.s IL_0f44 - - IL_0f3c: ldloc.1 - IL_0f3d: ldloc.1 - IL_0f3e: ldloc.2 - IL_0f3f: add - IL_0f40: mul - IL_0f41: stloc.1 - IL_0f42: br.s IL_0f4a - - IL_0f44: ldloc.2 - IL_0f45: ldloc.1 - IL_0f46: ldloc.2 - IL_0f47: add - IL_0f48: add - IL_0f49: stloc.2 - IL_0f4a: ldloc.1 - IL_0f4b: ldloc.2 - IL_0f4c: blt.s IL_0f56 - - IL_0f4e: ldloc.1 - IL_0f4f: ldloc.1 - IL_0f50: ldloc.2 - IL_0f51: mul - IL_0f52: sub - IL_0f53: stloc.1 - IL_0f54: br.s IL_0f5c - - IL_0f56: ldloc.2 - IL_0f57: ldloc.1 - IL_0f58: ldloc.2 - IL_0f59: mul - IL_0f5a: sub - IL_0f5b: stloc.2 - IL_0f5c: ldloc.1 - IL_0f5d: ldloc.2 - IL_0f5e: beq.s IL_0f68 - - IL_0f60: ldloc.1 - IL_0f61: ldloc.1 - IL_0f62: ldloc.2 - IL_0f63: mul - IL_0f64: mul - IL_0f65: stloc.1 - IL_0f66: br.s IL_0f6e - - IL_0f68: ldloc.2 - IL_0f69: ldloc.1 - IL_0f6a: ldloc.2 - IL_0f6b: mul - IL_0f6c: sub - IL_0f6d: stloc.2 - IL_0f6e: ldloc.1 - IL_0f6f: ldloc.2 - IL_0f70: bgt.s IL_0f7a - - IL_0f72: ldloc.1 - IL_0f73: ldloc.1 - IL_0f74: ldloc.2 - IL_0f75: mul - IL_0f76: mul - IL_0f77: stloc.1 - IL_0f78: br.s IL_0f80 - - IL_0f7a: ldloc.2 - IL_0f7b: ldloc.1 - IL_0f7c: ldloc.2 - IL_0f7d: mul - IL_0f7e: sub - IL_0f7f: stloc.2 - IL_0f80: ldloc.1 - IL_0f81: ldloc.2 - IL_0f82: bge.s IL_0f8c - - IL_0f84: ldloc.1 - IL_0f85: ldloc.1 - IL_0f86: ldloc.2 - IL_0f87: mul - IL_0f88: mul - IL_0f89: stloc.1 - IL_0f8a: br.s IL_0f92 - - IL_0f8c: ldloc.2 - IL_0f8d: ldloc.1 - IL_0f8e: ldloc.2 - IL_0f8f: mul - IL_0f90: mul - IL_0f91: stloc.2 - IL_0f92: ldloc.1 - IL_0f93: ldloc.2 - IL_0f94: bge.s IL_0f9e - - IL_0f96: ldloc.1 - IL_0f97: ldloc.1 - IL_0f98: ldloc.2 - IL_0f99: sub - IL_0f9a: sub - IL_0f9b: stloc.1 - IL_0f9c: br.s IL_0fa4 - - IL_0f9e: ldloc.2 - IL_0f9f: ldloc.1 - IL_0fa0: ldloc.2 - IL_0fa1: sub - IL_0fa2: add - IL_0fa3: stloc.2 - IL_0fa4: ldloc.1 - IL_0fa5: ldloc.2 - IL_0fa6: beq.s IL_0fb0 - - IL_0fa8: ldloc.1 - IL_0fa9: ldloc.1 - IL_0faa: ldloc.2 - IL_0fab: add - IL_0fac: add - IL_0fad: stloc.1 - IL_0fae: br.s IL_0fb6 - - IL_0fb0: ldloc.2 - IL_0fb1: ldloc.1 - IL_0fb2: ldloc.2 - IL_0fb3: add - IL_0fb4: mul - IL_0fb5: stloc.2 - IL_0fb6: ldloc.1 - IL_0fb7: ldloc.2 - IL_0fb8: blt.s IL_0fc2 - - IL_0fba: ldloc.1 - IL_0fbb: ldloc.1 - IL_0fbc: ldloc.2 - IL_0fbd: sub - IL_0fbe: add - IL_0fbf: stloc.1 - IL_0fc0: br.s IL_0fc8 - - IL_0fc2: ldloc.2 - IL_0fc3: ldloc.1 - IL_0fc4: ldloc.2 - IL_0fc5: sub - IL_0fc6: add - IL_0fc7: stloc.2 - IL_0fc8: ldloc.1 - IL_0fc9: ldloc.2 - IL_0fca: bne.un.s IL_0fd4 - - IL_0fcc: ldloc.1 - IL_0fcd: ldloc.1 - IL_0fce: ldloc.2 - IL_0fcf: add - IL_0fd0: sub - IL_0fd1: stloc.1 - IL_0fd2: br.s IL_0fda - - IL_0fd4: ldloc.2 - IL_0fd5: ldloc.1 - IL_0fd6: ldloc.2 - IL_0fd7: add - IL_0fd8: sub - IL_0fd9: stloc.2 - IL_0fda: ldloc.1 - IL_0fdb: ldloc.2 - IL_0fdc: bne.un.s IL_0fe6 - - IL_0fde: ldloc.1 - IL_0fdf: ldloc.1 - IL_0fe0: ldloc.2 - IL_0fe1: add - IL_0fe2: mul - IL_0fe3: stloc.1 - IL_0fe4: br.s IL_0fec - - IL_0fe6: ldloc.2 - IL_0fe7: ldloc.1 - IL_0fe8: ldloc.2 - IL_0fe9: add - IL_0fea: mul - IL_0feb: stloc.2 - IL_0fec: ldloc.1 - IL_0fed: ldloc.2 - IL_0fee: bge.s IL_0ff8 - - IL_0ff0: ldloc.1 - IL_0ff1: ldloc.1 - IL_0ff2: ldloc.2 - IL_0ff3: mul - IL_0ff4: mul - IL_0ff5: stloc.1 - IL_0ff6: br.s IL_0ffe - - IL_0ff8: ldloc.2 - IL_0ff9: ldloc.1 - IL_0ffa: ldloc.2 - IL_0ffb: mul - IL_0ffc: sub - IL_0ffd: stloc.2 - IL_0ffe: ldloc.1 - IL_0fff: ldloc.2 - IL_1000: bge.s IL_100a - - IL_1002: ldloc.1 - IL_1003: ldloc.1 - IL_1004: ldloc.2 - IL_1005: sub - IL_1006: add - IL_1007: stloc.1 - IL_1008: br.s IL_1010 - - IL_100a: ldloc.2 - IL_100b: ldloc.1 - IL_100c: ldloc.2 - IL_100d: sub - IL_100e: mul - IL_100f: stloc.2 - IL_1010: ldloc.1 - IL_1011: ldloc.2 - IL_1012: bne.un.s IL_101c - - IL_1014: ldloc.1 - IL_1015: ldloc.1 - IL_1016: ldloc.2 - IL_1017: sub - IL_1018: sub - IL_1019: stloc.1 - IL_101a: br.s IL_1022 - - IL_101c: ldloc.2 - IL_101d: ldloc.1 - IL_101e: ldloc.2 - IL_101f: sub - IL_1020: sub - IL_1021: stloc.2 - IL_1022: ldloc.1 - IL_1023: ldloc.2 - IL_1024: bgt.s IL_102e - - IL_1026: ldloc.1 - IL_1027: ldloc.1 - IL_1028: ldloc.2 - IL_1029: mul - IL_102a: mul - IL_102b: stloc.1 - IL_102c: br.s IL_1034 - - IL_102e: ldloc.2 - IL_102f: ldloc.1 - IL_1030: ldloc.2 - IL_1031: mul - IL_1032: add - IL_1033: stloc.2 - IL_1034: ldloc.1 - IL_1035: ldloc.2 - IL_1036: bne.un.s IL_1040 - - IL_1038: ldloc.1 - IL_1039: ldloc.1 - IL_103a: ldloc.2 - IL_103b: sub - IL_103c: mul - IL_103d: stloc.1 - IL_103e: br.s IL_1046 - - IL_1040: ldloc.2 - IL_1041: ldloc.1 - IL_1042: ldloc.2 - IL_1043: sub - IL_1044: add - IL_1045: stloc.2 - IL_1046: ldloc.1 - IL_1047: ldloc.2 - IL_1048: bne.un.s IL_1052 - - IL_104a: ldloc.1 - IL_104b: ldloc.1 - IL_104c: ldloc.2 - IL_104d: mul - IL_104e: sub - IL_104f: stloc.1 - IL_1050: br.s IL_1058 - - IL_1052: ldloc.2 - IL_1053: ldloc.1 - IL_1054: ldloc.2 - IL_1055: mul - IL_1056: sub - IL_1057: stloc.2 - IL_1058: ldloc.1 - IL_1059: ldloc.2 - IL_105a: bgt.s IL_1064 - - IL_105c: ldloc.1 - IL_105d: ldloc.1 - IL_105e: ldloc.2 - IL_105f: add - IL_1060: mul - IL_1061: stloc.1 - IL_1062: br.s IL_106a - - IL_1064: ldloc.2 - IL_1065: ldloc.1 - IL_1066: ldloc.2 - IL_1067: add - IL_1068: add - IL_1069: stloc.2 - IL_106a: ldloc.1 - IL_106b: ldloc.2 - IL_106c: bgt.s IL_1076 - - IL_106e: ldloc.1 - IL_106f: ldloc.1 - IL_1070: ldloc.2 - IL_1071: sub - IL_1072: sub - IL_1073: stloc.1 - IL_1074: br.s IL_107c - - IL_1076: ldloc.2 - IL_1077: ldloc.1 - IL_1078: ldloc.2 - IL_1079: sub - IL_107a: add - IL_107b: stloc.2 - IL_107c: ldloc.1 - IL_107d: ldloc.2 - IL_107e: beq.s IL_1088 - - IL_1080: ldloc.1 - IL_1081: ldloc.1 - IL_1082: ldloc.2 - IL_1083: add - IL_1084: mul - IL_1085: stloc.1 - IL_1086: br.s IL_108e - - IL_1088: ldloc.2 - IL_1089: ldloc.1 - IL_108a: ldloc.2 - IL_108b: add - IL_108c: sub - IL_108d: stloc.2 - IL_108e: ldloc.1 - IL_108f: ldloc.2 - IL_1090: bne.un.s IL_109a - - IL_1092: ldloc.1 - IL_1093: ldloc.1 - IL_1094: ldloc.2 - IL_1095: mul - IL_1096: add - IL_1097: stloc.1 - IL_1098: br.s IL_10a0 - - IL_109a: ldloc.2 - IL_109b: ldloc.1 - IL_109c: ldloc.2 - IL_109d: mul - IL_109e: add - IL_109f: stloc.2 - IL_10a0: ldloc.1 - IL_10a1: ldloc.2 - IL_10a2: ble.s IL_10ac - - IL_10a4: ldloc.1 - IL_10a5: ldloc.1 - IL_10a6: ldloc.2 - IL_10a7: mul - IL_10a8: add - IL_10a9: stloc.1 - IL_10aa: br.s IL_10b2 - - IL_10ac: ldloc.2 - IL_10ad: ldloc.1 - IL_10ae: ldloc.2 - IL_10af: mul - IL_10b0: add - IL_10b1: stloc.2 - IL_10b2: ldloc.1 - IL_10b3: ldloc.2 - IL_10b4: bne.un.s IL_10be - - IL_10b6: ldloc.1 - IL_10b7: ldloc.1 - IL_10b8: ldloc.2 - IL_10b9: mul - IL_10ba: sub - IL_10bb: stloc.1 - IL_10bc: br.s IL_10c4 - - IL_10be: ldloc.2 - IL_10bf: ldloc.1 - IL_10c0: ldloc.2 - IL_10c1: mul - IL_10c2: mul - IL_10c3: stloc.2 - IL_10c4: ldloc.1 - IL_10c5: ldloc.2 - IL_10c6: bge.s IL_10d0 - - IL_10c8: ldloc.1 - IL_10c9: ldloc.1 - IL_10ca: ldloc.2 - IL_10cb: add - IL_10cc: sub - IL_10cd: stloc.1 - IL_10ce: br.s IL_10d6 - - IL_10d0: ldloc.2 - IL_10d1: ldloc.1 - IL_10d2: ldloc.2 - IL_10d3: add - IL_10d4: add - IL_10d5: stloc.2 - IL_10d6: ldloc.1 - IL_10d7: ldloc.2 - IL_10d8: bgt.s IL_10e2 - - IL_10da: ldloc.1 - IL_10db: ldloc.1 - IL_10dc: ldloc.2 - IL_10dd: mul - IL_10de: sub - IL_10df: stloc.1 - IL_10e0: br.s IL_10e8 - - IL_10e2: ldloc.2 - IL_10e3: ldloc.1 - IL_10e4: ldloc.2 - IL_10e5: mul - IL_10e6: sub - IL_10e7: stloc.2 - IL_10e8: ldloc.1 - IL_10e9: ldloc.2 - IL_10ea: blt.s IL_10f4 - - IL_10ec: ldloc.1 - IL_10ed: ldloc.1 - IL_10ee: ldloc.2 - IL_10ef: sub - IL_10f0: mul - IL_10f1: stloc.1 - IL_10f2: br.s IL_10fa - - IL_10f4: ldloc.2 - IL_10f5: ldloc.1 - IL_10f6: ldloc.2 - IL_10f7: sub - IL_10f8: add - IL_10f9: stloc.2 - IL_10fa: ldloc.1 - IL_10fb: ldloc.2 - IL_10fc: beq.s IL_1106 - - IL_10fe: ldloc.1 - IL_10ff: ldloc.1 - IL_1100: ldloc.2 - IL_1101: add - IL_1102: mul - IL_1103: stloc.1 - IL_1104: br.s IL_110c - - IL_1106: ldloc.2 - IL_1107: ldloc.1 - IL_1108: ldloc.2 - IL_1109: add - IL_110a: add - IL_110b: stloc.2 - IL_110c: ldloc.1 - IL_110d: ldloc.2 - IL_110e: blt.s IL_1118 - - IL_1110: ldloc.1 - IL_1111: ldloc.1 - IL_1112: ldloc.2 - IL_1113: mul - IL_1114: add - IL_1115: stloc.1 - IL_1116: br.s IL_111e - - IL_1118: ldloc.2 - IL_1119: ldloc.1 - IL_111a: ldloc.2 - IL_111b: mul - IL_111c: mul - IL_111d: stloc.2 - IL_111e: ldloc.1 - IL_111f: ldloc.2 - IL_1120: blt.s IL_112a - - IL_1122: ldloc.1 - IL_1123: ldloc.1 - IL_1124: ldloc.2 - IL_1125: sub - IL_1126: mul - IL_1127: stloc.1 - IL_1128: br.s IL_1130 - - IL_112a: ldloc.2 - IL_112b: ldloc.1 - IL_112c: ldloc.2 - IL_112d: sub - IL_112e: add - IL_112f: stloc.2 - IL_1130: ldloc.1 - IL_1131: ldloc.2 - IL_1132: blt.s IL_113c - - IL_1134: ldloc.1 - IL_1135: ldloc.1 - IL_1136: ldloc.2 - IL_1137: sub - IL_1138: sub - IL_1139: stloc.1 - IL_113a: br.s IL_1142 - - IL_113c: ldloc.2 - IL_113d: ldloc.1 - IL_113e: ldloc.2 - IL_113f: sub - IL_1140: sub - IL_1141: stloc.2 - IL_1142: ldloc.1 - IL_1143: ldloc.2 - IL_1144: blt.s IL_114e - - IL_1146: ldloc.1 - IL_1147: ldloc.1 - IL_1148: ldloc.2 - IL_1149: mul - IL_114a: mul - IL_114b: stloc.1 - IL_114c: br.s IL_1154 - - IL_114e: ldloc.2 - IL_114f: ldloc.1 - IL_1150: ldloc.2 - IL_1151: mul - IL_1152: add - IL_1153: stloc.2 - IL_1154: ldloc.1 - IL_1155: ldloc.2 - IL_1156: ble.s IL_1160 - - IL_1158: ldloc.1 - IL_1159: ldloc.1 - IL_115a: ldloc.2 - IL_115b: add - IL_115c: add - IL_115d: stloc.1 - IL_115e: br.s IL_1166 - - IL_1160: ldloc.2 - IL_1161: ldloc.1 - IL_1162: ldloc.2 - IL_1163: add - IL_1164: mul - IL_1165: stloc.2 - IL_1166: ldloc.1 - IL_1167: ldloc.2 - IL_1168: ble.s IL_1172 - - IL_116a: ldloc.1 - IL_116b: ldloc.1 - IL_116c: ldloc.2 - IL_116d: sub - IL_116e: mul - IL_116f: stloc.1 - IL_1170: br.s IL_1178 - - IL_1172: ldloc.2 - IL_1173: ldloc.1 - IL_1174: ldloc.2 - IL_1175: sub - IL_1176: mul - IL_1177: stloc.2 - IL_1178: ldloc.1 - IL_1179: ldloc.2 - IL_117a: bge.s IL_1184 - - IL_117c: ldloc.1 - IL_117d: ldloc.1 - IL_117e: ldloc.2 - IL_117f: mul - IL_1180: mul - IL_1181: stloc.1 - IL_1182: br.s IL_118a - - IL_1184: ldloc.2 - IL_1185: ldloc.1 - IL_1186: ldloc.2 - IL_1187: mul - IL_1188: mul - IL_1189: stloc.2 - IL_118a: ldloc.1 - IL_118b: ldloc.2 - IL_118c: beq.s IL_1196 - - IL_118e: ldloc.1 - IL_118f: ldloc.1 - IL_1190: ldloc.2 - IL_1191: add - IL_1192: mul - IL_1193: stloc.1 - IL_1194: br.s IL_119c - - IL_1196: ldloc.2 - IL_1197: ldloc.1 - IL_1198: ldloc.2 - IL_1199: add - IL_119a: mul - IL_119b: stloc.2 - IL_119c: ldloc.1 - IL_119d: ldloc.2 - IL_119e: ble.s IL_11a8 - - IL_11a0: ldloc.1 - IL_11a1: ldloc.1 - IL_11a2: ldloc.2 - IL_11a3: sub - IL_11a4: mul - IL_11a5: stloc.1 - IL_11a6: br.s IL_11ae - - IL_11a8: ldloc.2 - IL_11a9: ldloc.1 - IL_11aa: ldloc.2 - IL_11ab: sub - IL_11ac: sub - IL_11ad: stloc.2 - IL_11ae: ldloc.1 - IL_11af: ldloc.2 - IL_11b0: beq.s IL_11ba - - IL_11b2: ldloc.1 - IL_11b3: ldloc.1 - IL_11b4: ldloc.2 - IL_11b5: sub - IL_11b6: mul - IL_11b7: stloc.1 - IL_11b8: br.s IL_11c0 - - IL_11ba: ldloc.2 - IL_11bb: ldloc.1 - IL_11bc: ldloc.2 - IL_11bd: sub - IL_11be: sub - IL_11bf: stloc.2 - IL_11c0: ldloc.1 - IL_11c1: ldloc.2 - IL_11c2: bge.s IL_11cc - - IL_11c4: ldloc.1 - IL_11c5: ldloc.1 - IL_11c6: ldloc.2 - IL_11c7: add - IL_11c8: mul - IL_11c9: stloc.1 - IL_11ca: br.s IL_11d2 - - IL_11cc: ldloc.2 - IL_11cd: ldloc.1 - IL_11ce: ldloc.2 - IL_11cf: add - IL_11d0: sub - IL_11d1: stloc.2 - IL_11d2: ldloc.1 - IL_11d3: ldloc.2 - IL_11d4: ble.s IL_11de - - IL_11d6: ldloc.1 - IL_11d7: ldloc.1 - IL_11d8: ldloc.2 - IL_11d9: mul - IL_11da: mul - IL_11db: stloc.1 - IL_11dc: br.s IL_11e4 - - IL_11de: ldloc.2 - IL_11df: ldloc.1 - IL_11e0: ldloc.2 - IL_11e1: mul - IL_11e2: sub - IL_11e3: stloc.2 - IL_11e4: ldloc.1 - IL_11e5: ldloc.2 - IL_11e6: beq.s IL_11f0 - - IL_11e8: ldloc.1 - IL_11e9: ldloc.1 - IL_11ea: ldloc.2 - IL_11eb: sub - IL_11ec: sub - IL_11ed: stloc.1 - IL_11ee: br.s IL_11f6 - - IL_11f0: ldloc.2 - IL_11f1: ldloc.1 - IL_11f2: ldloc.2 - IL_11f3: sub - IL_11f4: sub - IL_11f5: stloc.2 - IL_11f6: ldloc.1 - IL_11f7: ldloc.2 - IL_11f8: beq.s IL_1202 - - IL_11fa: ldloc.1 - IL_11fb: ldloc.1 - IL_11fc: ldloc.2 - IL_11fd: sub - IL_11fe: add - IL_11ff: stloc.1 - IL_1200: br.s IL_1208 - - IL_1202: ldloc.2 - IL_1203: ldloc.1 - IL_1204: ldloc.2 - IL_1205: sub - IL_1206: add - IL_1207: stloc.2 - IL_1208: ldloc.1 - IL_1209: ldloc.2 - IL_120a: blt.s IL_1214 - - IL_120c: ldloc.1 - IL_120d: ldloc.1 - IL_120e: ldloc.2 - IL_120f: sub - IL_1210: add - IL_1211: stloc.1 - IL_1212: br.s IL_121a - - IL_1214: ldloc.2 - IL_1215: ldloc.1 - IL_1216: ldloc.2 - IL_1217: sub - IL_1218: sub - IL_1219: stloc.2 - IL_121a: ldloc.1 - IL_121b: ldloc.2 - IL_121c: beq.s IL_1226 - - IL_121e: ldloc.1 - IL_121f: ldloc.1 - IL_1220: ldloc.2 - IL_1221: sub - IL_1222: add - IL_1223: stloc.1 - IL_1224: br.s IL_122c - - IL_1226: ldloc.2 - IL_1227: ldloc.1 - IL_1228: ldloc.2 - IL_1229: sub - IL_122a: sub - IL_122b: stloc.2 - IL_122c: ldloc.1 - IL_122d: ldloc.2 - IL_122e: blt.s IL_1238 - - IL_1230: ldloc.1 - IL_1231: ldloc.1 - IL_1232: ldloc.2 - IL_1233: sub - IL_1234: add - IL_1235: stloc.1 - IL_1236: br.s IL_123e - - IL_1238: ldloc.2 - IL_1239: ldloc.1 - IL_123a: ldloc.2 - IL_123b: sub - IL_123c: sub - IL_123d: stloc.2 - IL_123e: ldloc.1 - IL_123f: ldloc.2 - IL_1240: blt.s IL_124a - - IL_1242: ldloc.1 - IL_1243: ldloc.1 - IL_1244: ldloc.2 - IL_1245: add - IL_1246: sub - IL_1247: stloc.1 - IL_1248: br.s IL_1250 - - IL_124a: ldloc.2 - IL_124b: ldloc.1 - IL_124c: ldloc.2 - IL_124d: add - IL_124e: mul - IL_124f: stloc.2 - IL_1250: ldloc.1 - IL_1251: ldloc.2 - IL_1252: bne.un.s IL_125c - - IL_1254: ldloc.1 - IL_1255: ldloc.1 - IL_1256: ldloc.2 - IL_1257: sub - IL_1258: sub - IL_1259: stloc.1 - IL_125a: br.s IL_1262 - - IL_125c: ldloc.2 - IL_125d: ldloc.1 - IL_125e: ldloc.2 - IL_125f: sub - IL_1260: mul - IL_1261: stloc.2 - IL_1262: ldloc.1 - IL_1263: ldloc.2 - IL_1264: blt.s IL_126e - - IL_1266: ldloc.1 - IL_1267: ldloc.1 - IL_1268: ldloc.2 - IL_1269: sub - IL_126a: sub - IL_126b: stloc.1 - IL_126c: br.s IL_1274 - - IL_126e: ldloc.2 - IL_126f: ldloc.1 - IL_1270: ldloc.2 - IL_1271: sub - IL_1272: sub - IL_1273: stloc.2 - IL_1274: ldloc.1 - IL_1275: ldloc.2 - IL_1276: blt.s IL_1280 - - IL_1278: ldloc.1 - IL_1279: ldloc.1 - IL_127a: ldloc.2 - IL_127b: sub - IL_127c: add - IL_127d: stloc.1 - IL_127e: br.s IL_1286 - - IL_1280: ldloc.2 - IL_1281: ldloc.1 - IL_1282: ldloc.2 - IL_1283: sub - IL_1284: add - IL_1285: stloc.2 - IL_1286: ldloc.1 - IL_1287: ldloc.2 - IL_1288: blt.s IL_1292 - - IL_128a: ldloc.1 - IL_128b: ldloc.1 - IL_128c: ldloc.2 - IL_128d: mul - IL_128e: add - IL_128f: stloc.1 - IL_1290: br.s IL_1298 - - IL_1292: ldloc.2 - IL_1293: ldloc.1 - IL_1294: ldloc.2 - IL_1295: mul - IL_1296: sub - IL_1297: stloc.2 - IL_1298: ldloc.1 - IL_1299: ldloc.2 - IL_129a: bne.un.s IL_12a4 - - IL_129c: ldloc.1 - IL_129d: ldloc.1 - IL_129e: ldloc.2 - IL_129f: mul - IL_12a0: mul - IL_12a1: stloc.1 - IL_12a2: br.s IL_12aa - - IL_12a4: ldloc.2 - IL_12a5: ldloc.1 - IL_12a6: ldloc.2 - IL_12a7: mul - IL_12a8: add - IL_12a9: stloc.2 - IL_12aa: ldloc.1 - IL_12ab: ldloc.2 - IL_12ac: bge.s IL_12b6 - - IL_12ae: ldloc.1 - IL_12af: ldloc.1 - IL_12b0: ldloc.2 - IL_12b1: add - IL_12b2: mul - IL_12b3: stloc.1 - IL_12b4: br.s IL_12bc - - IL_12b6: ldloc.2 - IL_12b7: ldloc.1 - IL_12b8: ldloc.2 - IL_12b9: add - IL_12ba: sub - IL_12bb: stloc.2 - IL_12bc: ldloc.1 - IL_12bd: ldloc.2 - IL_12be: ble.s IL_12c8 - - IL_12c0: ldloc.1 - IL_12c1: ldloc.1 - IL_12c2: ldloc.2 - IL_12c3: add - IL_12c4: mul - IL_12c5: stloc.1 - IL_12c6: br.s IL_12ce - - IL_12c8: ldloc.2 - IL_12c9: ldloc.1 - IL_12ca: ldloc.2 - IL_12cb: add - IL_12cc: mul - IL_12cd: stloc.2 - IL_12ce: ldloc.1 - IL_12cf: ldloc.2 - IL_12d0: bge.s IL_12da - - IL_12d2: ldloc.1 - IL_12d3: ldloc.1 - IL_12d4: ldloc.2 - IL_12d5: sub - IL_12d6: mul - IL_12d7: stloc.1 - IL_12d8: br.s IL_12e0 - - IL_12da: ldloc.2 - IL_12db: ldloc.1 - IL_12dc: ldloc.2 - IL_12dd: sub - IL_12de: sub - IL_12df: stloc.2 - IL_12e0: ldloc.1 - IL_12e1: ldloc.2 - IL_12e2: blt.s IL_12ec - - IL_12e4: ldloc.1 - IL_12e5: ldloc.1 - IL_12e6: ldloc.2 - IL_12e7: sub - IL_12e8: add - IL_12e9: stloc.1 - IL_12ea: br.s IL_12f2 - - IL_12ec: ldloc.2 - IL_12ed: ldloc.1 - IL_12ee: ldloc.2 - IL_12ef: sub - IL_12f0: mul - IL_12f1: stloc.2 - IL_12f2: ldloc.1 - IL_12f3: ldloc.2 - IL_12f4: bge.s IL_12fe - - IL_12f6: ldloc.1 - IL_12f7: ldloc.1 - IL_12f8: ldloc.2 - IL_12f9: mul - IL_12fa: mul - IL_12fb: stloc.1 - IL_12fc: br.s IL_1304 - - IL_12fe: ldloc.2 - IL_12ff: ldloc.1 - IL_1300: ldloc.2 - IL_1301: mul - IL_1302: add - IL_1303: stloc.2 - IL_1304: ldloc.1 - IL_1305: ldloc.2 - IL_1306: bgt.s IL_1310 - - IL_1308: ldloc.1 - IL_1309: ldloc.1 - IL_130a: ldloc.2 - IL_130b: mul - IL_130c: add - IL_130d: stloc.1 - IL_130e: br.s IL_1316 - - IL_1310: ldloc.2 - IL_1311: ldloc.1 - IL_1312: ldloc.2 - IL_1313: mul - IL_1314: add - IL_1315: stloc.2 - IL_1316: ldloc.1 - IL_1317: ldloc.2 - IL_1318: bge.s IL_1322 - - IL_131a: ldloc.1 - IL_131b: ldloc.1 - IL_131c: ldloc.2 - IL_131d: add - IL_131e: add - IL_131f: stloc.1 - IL_1320: br.s IL_1328 - - IL_1322: ldloc.2 - IL_1323: ldloc.1 - IL_1324: ldloc.2 - IL_1325: add - IL_1326: add - IL_1327: stloc.2 - IL_1328: ldloc.1 - IL_1329: ldloc.2 - IL_132a: bgt.s IL_1334 - - IL_132c: ldloc.1 - IL_132d: ldloc.1 - IL_132e: ldloc.2 - IL_132f: sub - IL_1330: sub - IL_1331: stloc.1 - IL_1332: br.s IL_133a - - IL_1334: ldloc.2 - IL_1335: ldloc.1 - IL_1336: ldloc.2 - IL_1337: sub - IL_1338: sub - IL_1339: stloc.2 - IL_133a: ldloc.1 - IL_133b: ldloc.2 - IL_133c: ble.s IL_1346 - - IL_133e: ldloc.1 - IL_133f: ldloc.1 - IL_1340: ldloc.2 - IL_1341: mul - IL_1342: add - IL_1343: stloc.1 - IL_1344: br.s IL_134c - - IL_1346: ldloc.2 - IL_1347: ldloc.1 - IL_1348: ldloc.2 - IL_1349: mul - IL_134a: mul - IL_134b: stloc.2 - IL_134c: ldloc.1 - IL_134d: ldloc.2 - IL_134e: beq.s IL_1358 - - IL_1350: ldloc.1 - IL_1351: ldloc.1 - IL_1352: ldloc.2 - IL_1353: sub - IL_1354: mul - IL_1355: stloc.1 - IL_1356: br.s IL_135e - - IL_1358: ldloc.2 - IL_1359: ldloc.1 - IL_135a: ldloc.2 - IL_135b: sub - IL_135c: add - IL_135d: stloc.2 - IL_135e: ldloc.1 - IL_135f: ldloc.2 - IL_1360: bne.un.s IL_136a - - IL_1362: ldloc.1 - IL_1363: ldloc.1 - IL_1364: ldloc.2 - IL_1365: sub - IL_1366: sub - IL_1367: stloc.1 - IL_1368: br.s IL_1370 - - IL_136a: ldloc.2 - IL_136b: ldloc.1 - IL_136c: ldloc.2 - IL_136d: sub - IL_136e: add - IL_136f: stloc.2 - IL_1370: ldloc.1 - IL_1371: ldloc.2 - IL_1372: beq.s IL_137c - - IL_1374: ldloc.1 - IL_1375: ldloc.1 - IL_1376: ldloc.2 - IL_1377: add - IL_1378: sub - IL_1379: stloc.1 - IL_137a: br.s IL_1382 - - IL_137c: ldloc.2 - IL_137d: ldloc.1 - IL_137e: ldloc.2 - IL_137f: add - IL_1380: add - IL_1381: stloc.2 - IL_1382: ldloc.1 - IL_1383: ldloc.2 - IL_1384: blt.s IL_138e - - IL_1386: ldloc.1 - IL_1387: ldloc.1 - IL_1388: ldloc.2 - IL_1389: add - IL_138a: mul - IL_138b: stloc.1 - IL_138c: br.s IL_1394 - - IL_138e: ldloc.2 - IL_138f: ldloc.1 - IL_1390: ldloc.2 - IL_1391: add - IL_1392: mul - IL_1393: stloc.2 - IL_1394: ldloc.1 - IL_1395: ldloc.2 - IL_1396: bne.un.s IL_13a0 - - IL_1398: ldloc.1 - IL_1399: ldloc.1 - IL_139a: ldloc.2 - IL_139b: add - IL_139c: sub - IL_139d: stloc.1 - IL_139e: br.s IL_13a6 - - IL_13a0: ldloc.2 - IL_13a1: ldloc.1 - IL_13a2: ldloc.2 - IL_13a3: add - IL_13a4: sub - IL_13a5: stloc.2 - IL_13a6: ldloc.1 - IL_13a7: ldloc.2 - IL_13a8: bgt.s IL_13b2 - - IL_13aa: ldloc.1 - IL_13ab: ldloc.1 - IL_13ac: ldloc.2 - IL_13ad: add - IL_13ae: mul - IL_13af: stloc.1 - IL_13b0: br.s IL_13b8 - - IL_13b2: ldloc.2 - IL_13b3: ldloc.1 - IL_13b4: ldloc.2 - IL_13b5: add - IL_13b6: mul - IL_13b7: stloc.2 - IL_13b8: ldloc.1 - IL_13b9: ldloc.2 - IL_13ba: beq.s IL_13c4 - - IL_13bc: ldloc.1 - IL_13bd: ldloc.1 - IL_13be: ldloc.2 - IL_13bf: mul - IL_13c0: mul - IL_13c1: stloc.1 - IL_13c2: br.s IL_13ca - - IL_13c4: ldloc.2 - IL_13c5: ldloc.1 - IL_13c6: ldloc.2 - IL_13c7: mul - IL_13c8: sub - IL_13c9: stloc.2 - IL_13ca: ldloc.1 - IL_13cb: ldloc.2 - IL_13cc: bge.s IL_13d6 - - IL_13ce: ldloc.1 - IL_13cf: ldloc.1 - IL_13d0: ldloc.2 - IL_13d1: add - IL_13d2: mul - IL_13d3: stloc.1 - IL_13d4: br.s IL_13dc - - IL_13d6: ldloc.2 - IL_13d7: ldloc.1 - IL_13d8: ldloc.2 - IL_13d9: add - IL_13da: sub - IL_13db: stloc.2 - IL_13dc: ldloc.1 - IL_13dd: ldloc.2 - IL_13de: bgt.s IL_13e8 - - IL_13e0: ldloc.1 - IL_13e1: ldloc.1 - IL_13e2: ldloc.2 - IL_13e3: sub - IL_13e4: mul - IL_13e5: stloc.1 - IL_13e6: br.s IL_13ee - - IL_13e8: ldloc.2 - IL_13e9: ldloc.1 - IL_13ea: ldloc.2 - IL_13eb: sub - IL_13ec: sub - IL_13ed: stloc.2 - IL_13ee: ldloc.1 - IL_13ef: ldloc.2 - IL_13f0: blt.s IL_13fa - - IL_13f2: ldloc.1 - IL_13f3: ldloc.1 - IL_13f4: ldloc.2 - IL_13f5: mul - IL_13f6: sub - IL_13f7: stloc.1 - IL_13f8: br.s IL_1400 - - IL_13fa: ldloc.2 - IL_13fb: ldloc.1 - IL_13fc: ldloc.2 - IL_13fd: mul - IL_13fe: add - IL_13ff: stloc.2 - IL_1400: ldloc.1 - IL_1401: ldloc.2 - IL_1402: ble.s IL_140c - - IL_1404: ldloc.1 - IL_1405: ldloc.1 - IL_1406: ldloc.2 - IL_1407: mul - IL_1408: mul - IL_1409: stloc.1 - IL_140a: br.s IL_1412 - - IL_140c: ldloc.2 - IL_140d: ldloc.1 - IL_140e: ldloc.2 - IL_140f: mul - IL_1410: mul - IL_1411: stloc.2 - IL_1412: ldloc.1 - IL_1413: ldloc.2 - IL_1414: bne.un.s IL_141e - - IL_1416: ldloc.1 - IL_1417: ldloc.1 - IL_1418: ldloc.2 - IL_1419: mul - IL_141a: mul - IL_141b: stloc.1 - IL_141c: br.s IL_1424 - - IL_141e: ldloc.2 - IL_141f: ldloc.1 - IL_1420: ldloc.2 - IL_1421: mul - IL_1422: mul - IL_1423: stloc.2 - IL_1424: ldloc.1 - IL_1425: ldloc.2 - IL_1426: bne.un.s IL_1430 - - IL_1428: ldloc.1 - IL_1429: ldloc.1 - IL_142a: ldloc.2 - IL_142b: mul - IL_142c: sub - IL_142d: stloc.1 - IL_142e: br.s IL_1436 - - IL_1430: ldloc.2 - IL_1431: ldloc.1 - IL_1432: ldloc.2 - IL_1433: mul - IL_1434: mul - IL_1435: stloc.2 - IL_1436: ldloc.1 - IL_1437: ldloc.2 - IL_1438: bne.un.s IL_1442 - - IL_143a: ldloc.1 - IL_143b: ldloc.1 - IL_143c: ldloc.2 - IL_143d: add - IL_143e: mul - IL_143f: stloc.1 - IL_1440: br.s IL_1448 - - IL_1442: ldloc.2 - IL_1443: ldloc.1 - IL_1444: ldloc.2 - IL_1445: add - IL_1446: sub - IL_1447: stloc.2 - IL_1448: ldloc.1 - IL_1449: ldloc.2 - IL_144a: beq.s IL_1454 - - IL_144c: ldloc.1 - IL_144d: ldloc.1 - IL_144e: ldloc.2 - IL_144f: mul - IL_1450: add - IL_1451: stloc.1 - IL_1452: br.s IL_145a - - IL_1454: ldloc.2 - IL_1455: ldloc.1 - IL_1456: ldloc.2 - IL_1457: mul - IL_1458: sub - IL_1459: stloc.2 - IL_145a: ldloc.1 - IL_145b: ldloc.2 - IL_145c: bge.s IL_1466 - - IL_145e: ldloc.1 - IL_145f: ldloc.1 - IL_1460: ldloc.2 - IL_1461: add - IL_1462: add - IL_1463: stloc.1 - IL_1464: br.s IL_146c - - IL_1466: ldloc.2 - IL_1467: ldloc.1 - IL_1468: ldloc.2 - IL_1469: add - IL_146a: add - IL_146b: stloc.2 - IL_146c: ldloc.1 - IL_146d: ldloc.2 - IL_146e: bge.s IL_1478 - - IL_1470: ldloc.1 - IL_1471: ldloc.1 - IL_1472: ldloc.2 - IL_1473: sub - IL_1474: mul - IL_1475: stloc.1 - IL_1476: br.s IL_147e - - IL_1478: ldloc.2 - IL_1479: ldloc.1 - IL_147a: ldloc.2 - IL_147b: sub - IL_147c: sub - IL_147d: stloc.2 - IL_147e: ldloc.1 - IL_147f: ldloc.2 - IL_1480: ble.s IL_148a - - IL_1482: ldloc.1 - IL_1483: ldloc.1 - IL_1484: ldloc.2 - IL_1485: add - IL_1486: add - IL_1487: stloc.1 - IL_1488: br.s IL_1490 - - IL_148a: ldloc.2 - IL_148b: ldloc.1 - IL_148c: ldloc.2 - IL_148d: add - IL_148e: sub - IL_148f: stloc.2 - IL_1490: ldloc.1 - IL_1491: ldloc.2 - IL_1492: bge.s IL_149c - - IL_1494: ldloc.1 - IL_1495: ldloc.1 - IL_1496: ldloc.2 - IL_1497: sub - IL_1498: sub - IL_1499: stloc.1 - IL_149a: br.s IL_14a2 - - IL_149c: ldloc.2 - IL_149d: ldloc.1 - IL_149e: ldloc.2 - IL_149f: sub - IL_14a0: mul - IL_14a1: stloc.2 - IL_14a2: ldloc.1 - IL_14a3: ldloc.2 - IL_14a4: bne.un.s IL_14ae - - IL_14a6: ldloc.1 - IL_14a7: ldloc.1 - IL_14a8: ldloc.2 - IL_14a9: mul - IL_14aa: add - IL_14ab: stloc.1 - IL_14ac: br.s IL_14b4 - - IL_14ae: ldloc.2 - IL_14af: ldloc.1 - IL_14b0: ldloc.2 - IL_14b1: mul - IL_14b2: add - IL_14b3: stloc.2 - IL_14b4: ldloc.1 - IL_14b5: ldloc.2 - IL_14b6: beq.s IL_14c0 - - IL_14b8: ldloc.1 - IL_14b9: ldloc.1 - IL_14ba: ldloc.2 - IL_14bb: mul - IL_14bc: sub - IL_14bd: stloc.1 - IL_14be: br.s IL_14c6 - - IL_14c0: ldloc.2 - IL_14c1: ldloc.1 - IL_14c2: ldloc.2 - IL_14c3: mul - IL_14c4: mul - IL_14c5: stloc.2 - IL_14c6: ldloc.1 - IL_14c7: ldloc.2 - IL_14c8: ble.s IL_14d2 - - IL_14ca: ldloc.1 - IL_14cb: ldloc.1 - IL_14cc: ldloc.2 - IL_14cd: mul - IL_14ce: sub - IL_14cf: stloc.1 - IL_14d0: br.s IL_14d8 - - IL_14d2: ldloc.2 - IL_14d3: ldloc.1 - IL_14d4: ldloc.2 - IL_14d5: mul - IL_14d6: sub - IL_14d7: stloc.2 - IL_14d8: ldloc.1 - IL_14d9: ldloc.2 - IL_14da: blt.s IL_14e4 - - IL_14dc: ldloc.1 - IL_14dd: ldloc.1 - IL_14de: ldloc.2 - IL_14df: sub - IL_14e0: sub - IL_14e1: stloc.1 - IL_14e2: br.s IL_14ea - - IL_14e4: ldloc.2 - IL_14e5: ldloc.1 - IL_14e6: ldloc.2 - IL_14e7: sub - IL_14e8: sub - IL_14e9: stloc.2 - IL_14ea: ldloc.1 - IL_14eb: ldloc.2 - IL_14ec: ble.s IL_14f6 - - IL_14ee: ldloc.1 - IL_14ef: ldloc.1 - IL_14f0: ldloc.2 - IL_14f1: mul - IL_14f2: add - IL_14f3: stloc.1 - IL_14f4: br.s IL_14fc - - IL_14f6: ldloc.2 - IL_14f7: ldloc.1 - IL_14f8: ldloc.2 - IL_14f9: mul - IL_14fa: mul - IL_14fb: stloc.2 - IL_14fc: ldloc.1 - IL_14fd: ldloc.2 - IL_14fe: beq.s IL_1508 - - IL_1500: ldloc.1 - IL_1501: ldloc.1 - IL_1502: ldloc.2 - IL_1503: mul - IL_1504: mul - IL_1505: stloc.1 - IL_1506: br.s IL_150e - - IL_1508: ldloc.2 - IL_1509: ldloc.1 - IL_150a: ldloc.2 - IL_150b: mul - IL_150c: sub - IL_150d: stloc.2 - IL_150e: ldloc.1 - IL_150f: ldloc.2 - IL_1510: bge.s IL_151a - - IL_1512: ldloc.1 - IL_1513: ldloc.1 - IL_1514: ldloc.2 - IL_1515: sub - IL_1516: add - IL_1517: stloc.1 - IL_1518: br.s IL_1520 - - IL_151a: ldloc.2 - IL_151b: ldloc.1 - IL_151c: ldloc.2 - IL_151d: sub - IL_151e: mul - IL_151f: stloc.2 - IL_1520: ldloc.1 - IL_1521: ldloc.2 - IL_1522: ble.s IL_152c - - IL_1524: ldloc.1 - IL_1525: ldloc.1 - IL_1526: ldloc.2 - IL_1527: sub - IL_1528: sub - IL_1529: stloc.1 - IL_152a: br.s IL_1532 - - IL_152c: ldloc.2 - IL_152d: ldloc.1 - IL_152e: ldloc.2 - IL_152f: sub - IL_1530: sub - IL_1531: stloc.2 - IL_1532: ldloc.1 - IL_1533: ldloc.2 - IL_1534: bne.un.s IL_153e - - IL_1536: ldloc.1 - IL_1537: ldloc.1 - IL_1538: ldloc.2 - IL_1539: mul - IL_153a: mul - IL_153b: stloc.1 - IL_153c: br.s IL_1544 - - IL_153e: ldloc.2 - IL_153f: ldloc.1 - IL_1540: ldloc.2 - IL_1541: mul - IL_1542: sub - IL_1543: stloc.2 - IL_1544: ldloc.1 - IL_1545: ldloc.2 - IL_1546: beq.s IL_1550 - - IL_1548: ldloc.1 - IL_1549: ldloc.1 - IL_154a: ldloc.2 - IL_154b: mul - IL_154c: sub - IL_154d: stloc.1 - IL_154e: br.s IL_1556 - - IL_1550: ldloc.2 - IL_1551: ldloc.1 - IL_1552: ldloc.2 - IL_1553: mul - IL_1554: mul - IL_1555: stloc.2 - IL_1556: ldloc.1 - IL_1557: ldloc.2 - IL_1558: blt.s IL_1562 - - IL_155a: ldloc.1 - IL_155b: ldloc.1 - IL_155c: ldloc.2 - IL_155d: sub - IL_155e: sub - IL_155f: stloc.1 - IL_1560: br.s IL_1568 - - IL_1562: ldloc.2 - IL_1563: ldloc.1 - IL_1564: ldloc.2 - IL_1565: sub - IL_1566: mul - IL_1567: stloc.2 - IL_1568: ldloc.1 - IL_1569: ldloc.2 - IL_156a: blt.s IL_1574 - - IL_156c: ldloc.1 - IL_156d: ldloc.1 - IL_156e: ldloc.2 - IL_156f: mul - IL_1570: mul - IL_1571: stloc.1 - IL_1572: br.s IL_157a - - IL_1574: ldloc.2 - IL_1575: ldloc.1 - IL_1576: ldloc.2 - IL_1577: mul - IL_1578: add - IL_1579: stloc.2 - IL_157a: ldloc.1 - IL_157b: ldloc.2 - IL_157c: bgt.s IL_1586 - - IL_157e: ldloc.1 - IL_157f: ldloc.1 - IL_1580: ldloc.2 - IL_1581: add - IL_1582: add - IL_1583: stloc.1 - IL_1584: br.s IL_158c - - IL_1586: ldloc.2 - IL_1587: ldloc.1 - IL_1588: ldloc.2 - IL_1589: add - IL_158a: add - IL_158b: stloc.2 - IL_158c: ldloc.1 - IL_158d: ldloc.2 - IL_158e: bgt.s IL_1598 - - IL_1590: ldloc.1 - IL_1591: ldloc.1 - IL_1592: ldloc.2 - IL_1593: mul - IL_1594: add - IL_1595: stloc.1 - IL_1596: br.s IL_159e - - IL_1598: ldloc.2 - IL_1599: ldloc.1 - IL_159a: ldloc.2 - IL_159b: mul - IL_159c: mul - IL_159d: stloc.2 - IL_159e: ldloc.1 - IL_159f: ldloc.2 - IL_15a0: bgt.s IL_15aa - - IL_15a2: ldloc.1 - IL_15a3: ldloc.1 - IL_15a4: ldloc.2 - IL_15a5: mul - IL_15a6: sub - IL_15a7: stloc.1 - IL_15a8: br.s IL_15b0 - - IL_15aa: ldloc.2 - IL_15ab: ldloc.1 - IL_15ac: ldloc.2 - IL_15ad: mul - IL_15ae: sub - IL_15af: stloc.2 - IL_15b0: ldloc.1 - IL_15b1: ldloc.2 - IL_15b2: bne.un.s IL_15bc - - IL_15b4: ldloc.1 - IL_15b5: ldloc.1 - IL_15b6: ldloc.2 - IL_15b7: sub - IL_15b8: sub - IL_15b9: stloc.1 - IL_15ba: br.s IL_15c2 - - IL_15bc: ldloc.2 - IL_15bd: ldloc.1 - IL_15be: ldloc.2 - IL_15bf: sub - IL_15c0: sub - IL_15c1: stloc.2 - IL_15c2: ldloc.1 - IL_15c3: ldloc.2 - IL_15c4: bge.s IL_15ce - - IL_15c6: ldloc.1 - IL_15c7: ldloc.1 - IL_15c8: ldloc.2 - IL_15c9: sub - IL_15ca: add - IL_15cb: stloc.1 - IL_15cc: br.s IL_15d4 - - IL_15ce: ldloc.2 - IL_15cf: ldloc.1 - IL_15d0: ldloc.2 - IL_15d1: sub - IL_15d2: add - IL_15d3: stloc.2 - IL_15d4: ldloc.1 - IL_15d5: ldloc.2 - IL_15d6: beq.s IL_15e0 - - IL_15d8: ldloc.1 - IL_15d9: ldloc.1 - IL_15da: ldloc.2 - IL_15db: sub - IL_15dc: mul - IL_15dd: stloc.1 - IL_15de: br.s IL_15e6 - - IL_15e0: ldloc.2 - IL_15e1: ldloc.1 - IL_15e2: ldloc.2 - IL_15e3: sub - IL_15e4: sub - IL_15e5: stloc.2 - IL_15e6: ldloc.1 - IL_15e7: ldloc.2 - IL_15e8: bge.s IL_15f2 - - IL_15ea: ldloc.1 - IL_15eb: ldloc.1 - IL_15ec: ldloc.2 - IL_15ed: sub - IL_15ee: add - IL_15ef: stloc.1 - IL_15f0: br.s IL_15f8 - - IL_15f2: ldloc.2 - IL_15f3: ldloc.1 - IL_15f4: ldloc.2 - IL_15f5: sub - IL_15f6: sub - IL_15f7: stloc.2 - IL_15f8: ldloc.1 - IL_15f9: ldloc.2 - IL_15fa: beq.s IL_1604 - - IL_15fc: ldloc.1 - IL_15fd: ldloc.1 - IL_15fe: ldloc.2 - IL_15ff: sub - IL_1600: add - IL_1601: stloc.1 - IL_1602: br.s IL_160a - - IL_1604: ldloc.2 - IL_1605: ldloc.1 - IL_1606: ldloc.2 - IL_1607: sub - IL_1608: sub - IL_1609: stloc.2 - IL_160a: ldloc.1 - IL_160b: ldloc.2 - IL_160c: ble.s IL_1616 - - IL_160e: ldloc.1 - IL_160f: ldloc.1 - IL_1610: ldloc.2 - IL_1611: mul - IL_1612: mul - IL_1613: stloc.1 - IL_1614: br.s IL_161c - - IL_1616: ldloc.2 - IL_1617: ldloc.1 - IL_1618: ldloc.2 - IL_1619: mul - IL_161a: mul - IL_161b: stloc.2 - IL_161c: ldloc.1 - IL_161d: ldloc.2 - IL_161e: bgt.s IL_1628 - - IL_1620: ldloc.1 - IL_1621: ldloc.1 - IL_1622: ldloc.2 - IL_1623: sub - IL_1624: sub - IL_1625: stloc.1 - IL_1626: br.s IL_162e - - IL_1628: ldloc.2 - IL_1629: ldloc.1 - IL_162a: ldloc.2 - IL_162b: sub - IL_162c: mul - IL_162d: stloc.2 - IL_162e: ldloc.1 - IL_162f: ldloc.2 - IL_1630: ble.s IL_163a - - IL_1632: ldloc.1 - IL_1633: ldloc.1 - IL_1634: ldloc.2 - IL_1635: sub - IL_1636: sub - IL_1637: stloc.1 - IL_1638: br.s IL_1640 - - IL_163a: ldloc.2 - IL_163b: ldloc.1 - IL_163c: ldloc.2 - IL_163d: sub - IL_163e: add - IL_163f: stloc.2 - IL_1640: ldloc.1 - IL_1641: ldloc.2 - IL_1642: beq.s IL_164c - - IL_1644: ldloc.1 - IL_1645: ldloc.1 - IL_1646: ldloc.2 - IL_1647: mul - IL_1648: add - IL_1649: stloc.1 - IL_164a: br.s IL_1652 - - IL_164c: ldloc.2 - IL_164d: ldloc.1 - IL_164e: ldloc.2 - IL_164f: mul - IL_1650: mul - IL_1651: stloc.2 - IL_1652: ldloc.1 - IL_1653: ldloc.2 - IL_1654: bne.un.s IL_165e - - IL_1656: ldloc.1 - IL_1657: ldloc.1 - IL_1658: ldloc.2 - IL_1659: add - IL_165a: sub - IL_165b: stloc.1 - IL_165c: br.s IL_1664 - - IL_165e: ldloc.2 - IL_165f: ldloc.1 - IL_1660: ldloc.2 - IL_1661: add - IL_1662: add - IL_1663: stloc.2 - IL_1664: ldloc.1 - IL_1665: ldloc.2 - IL_1666: bne.un.s IL_1670 - - IL_1668: ldloc.1 - IL_1669: ldloc.1 - IL_166a: ldloc.2 - IL_166b: mul - IL_166c: sub - IL_166d: stloc.1 - IL_166e: br.s IL_1676 - - IL_1670: ldloc.2 - IL_1671: ldloc.1 - IL_1672: ldloc.2 - IL_1673: mul - IL_1674: mul - IL_1675: stloc.2 - IL_1676: ldloc.1 - IL_1677: ldloc.2 - IL_1678: bne.un.s IL_1682 - - IL_167a: ldloc.1 - IL_167b: ldloc.1 - IL_167c: ldloc.2 - IL_167d: sub - IL_167e: sub - IL_167f: stloc.1 - IL_1680: br.s IL_1688 - - IL_1682: ldloc.2 - IL_1683: ldloc.1 - IL_1684: ldloc.2 - IL_1685: sub - IL_1686: mul - IL_1687: stloc.2 - IL_1688: ldloc.1 - IL_1689: ldloc.2 - IL_168a: bne.un.s IL_1694 - - IL_168c: ldloc.1 - IL_168d: ldloc.1 - IL_168e: ldloc.2 - IL_168f: sub - IL_1690: add - IL_1691: stloc.1 - IL_1692: br.s IL_169a - - IL_1694: ldloc.2 - IL_1695: ldloc.1 - IL_1696: ldloc.2 - IL_1697: sub - IL_1698: mul - IL_1699: stloc.2 - IL_169a: ldloc.1 - IL_169b: ldloc.2 - IL_169c: ble.s IL_16a6 - - IL_169e: ldloc.1 - IL_169f: ldloc.1 - IL_16a0: ldloc.2 - IL_16a1: mul - IL_16a2: add - IL_16a3: stloc.1 - IL_16a4: br.s IL_16ac - - IL_16a6: ldloc.2 - IL_16a7: ldloc.1 - IL_16a8: ldloc.2 - IL_16a9: mul - IL_16aa: mul - IL_16ab: stloc.2 - IL_16ac: ldloc.1 - IL_16ad: ldloc.2 - IL_16ae: blt.s IL_16b8 - - IL_16b0: ldloc.1 - IL_16b1: ldloc.1 - IL_16b2: ldloc.2 - IL_16b3: mul - IL_16b4: mul - IL_16b5: stloc.1 - IL_16b6: br.s IL_16be - - IL_16b8: ldloc.2 - IL_16b9: ldloc.1 - IL_16ba: ldloc.2 - IL_16bb: mul - IL_16bc: mul - IL_16bd: stloc.2 - IL_16be: ldloc.1 - IL_16bf: ldloc.2 - IL_16c0: blt.s IL_16ca - - IL_16c2: ldloc.1 - IL_16c3: ldloc.1 - IL_16c4: ldloc.2 - IL_16c5: add - IL_16c6: sub - IL_16c7: stloc.1 - IL_16c8: br.s IL_16d0 - - IL_16ca: ldloc.2 - IL_16cb: ldloc.1 - IL_16cc: ldloc.2 - IL_16cd: add - IL_16ce: sub - IL_16cf: stloc.2 - IL_16d0: ldloc.1 - IL_16d1: ldloc.2 - IL_16d2: blt.s IL_16dc - - IL_16d4: ldloc.1 - IL_16d5: ldloc.1 - IL_16d6: ldloc.2 - IL_16d7: add - IL_16d8: add - IL_16d9: stloc.1 - IL_16da: br.s IL_16e2 - - IL_16dc: ldloc.2 - IL_16dd: ldloc.1 - IL_16de: ldloc.2 - IL_16df: add - IL_16e0: sub - IL_16e1: stloc.2 - IL_16e2: ldloc.1 - IL_16e3: ldloc.2 - IL_16e4: ble.s IL_16ee - - IL_16e6: ldloc.1 - IL_16e7: ldloc.1 - IL_16e8: ldloc.2 - IL_16e9: sub - IL_16ea: sub - IL_16eb: stloc.1 - IL_16ec: br.s IL_16f4 - - IL_16ee: ldloc.2 - IL_16ef: ldloc.1 - IL_16f0: ldloc.2 - IL_16f1: sub - IL_16f2: mul - IL_16f3: stloc.2 - IL_16f4: ldloc.1 - IL_16f5: ldloc.2 - IL_16f6: bne.un.s IL_1700 - - IL_16f8: ldloc.1 - IL_16f9: ldloc.1 - IL_16fa: ldloc.2 - IL_16fb: sub - IL_16fc: add - IL_16fd: stloc.1 - IL_16fe: br.s IL_1706 - - IL_1700: ldloc.2 - IL_1701: ldloc.1 - IL_1702: ldloc.2 - IL_1703: sub - IL_1704: mul - IL_1705: stloc.2 - IL_1706: ldloc.1 - IL_1707: ldloc.2 - IL_1708: bge.s IL_1712 - - IL_170a: ldloc.1 - IL_170b: ldloc.1 - IL_170c: ldloc.2 - IL_170d: add - IL_170e: add - IL_170f: stloc.1 - IL_1710: br.s IL_1718 - - IL_1712: ldloc.2 - IL_1713: ldloc.1 - IL_1714: ldloc.2 - IL_1715: add - IL_1716: add - IL_1717: stloc.2 - IL_1718: ldloc.1 - IL_1719: ldloc.2 - IL_171a: blt.s IL_1724 - - IL_171c: ldloc.1 - IL_171d: ldloc.1 - IL_171e: ldloc.2 - IL_171f: mul - IL_1720: add - IL_1721: stloc.1 - IL_1722: br.s IL_172a - - IL_1724: ldloc.2 - IL_1725: ldloc.1 - IL_1726: ldloc.2 - IL_1727: mul - IL_1728: mul - IL_1729: stloc.2 - IL_172a: ldloc.1 - IL_172b: ldloc.2 - IL_172c: bne.un.s IL_1736 - - IL_172e: ldloc.1 - IL_172f: ldloc.1 - IL_1730: ldloc.2 - IL_1731: mul - IL_1732: mul - IL_1733: stloc.1 - IL_1734: br.s IL_173c - - IL_1736: ldloc.2 - IL_1737: ldloc.1 - IL_1738: ldloc.2 - IL_1739: mul - IL_173a: add - IL_173b: stloc.2 - IL_173c: ldloc.1 - IL_173d: ldloc.2 - IL_173e: blt.s IL_1748 - - IL_1740: ldloc.1 - IL_1741: ldloc.1 - IL_1742: ldloc.2 - IL_1743: add - IL_1744: add - IL_1745: stloc.1 - IL_1746: br.s IL_174e - - IL_1748: ldloc.2 - IL_1749: ldloc.1 - IL_174a: ldloc.2 - IL_174b: add - IL_174c: sub - IL_174d: stloc.2 - IL_174e: ldloc.1 - IL_174f: ldloc.2 - IL_1750: bgt.s IL_175a - - IL_1752: ldloc.1 - IL_1753: ldloc.1 - IL_1754: ldloc.2 - IL_1755: add - IL_1756: sub - IL_1757: stloc.1 - IL_1758: br.s IL_1760 - - IL_175a: ldloc.2 - IL_175b: ldloc.1 - IL_175c: ldloc.2 - IL_175d: add - IL_175e: mul - IL_175f: stloc.2 - IL_1760: ldloc.1 - IL_1761: ldloc.2 - IL_1762: beq.s IL_176c - - IL_1764: ldloc.1 - IL_1765: ldloc.1 - IL_1766: ldloc.2 - IL_1767: sub - IL_1768: sub - IL_1769: stloc.1 - IL_176a: br.s IL_1772 - - IL_176c: ldloc.2 - IL_176d: ldloc.1 - IL_176e: ldloc.2 - IL_176f: sub - IL_1770: sub - IL_1771: stloc.2 - IL_1772: ldloc.1 - IL_1773: ldloc.2 - IL_1774: ble.s IL_177e - - IL_1776: ldloc.1 - IL_1777: ldloc.1 - IL_1778: ldloc.2 - IL_1779: add - IL_177a: mul - IL_177b: stloc.1 - IL_177c: br.s IL_1784 - - IL_177e: ldloc.2 - IL_177f: ldloc.1 - IL_1780: ldloc.2 - IL_1781: add - IL_1782: sub - IL_1783: stloc.2 - IL_1784: ldloc.1 - IL_1785: ldloc.2 - IL_1786: blt.s IL_1790 - - IL_1788: ldloc.1 - IL_1789: ldloc.1 - IL_178a: ldloc.2 - IL_178b: add - IL_178c: sub - IL_178d: stloc.1 - IL_178e: br.s IL_1796 - - IL_1790: ldloc.2 - IL_1791: ldloc.1 - IL_1792: ldloc.2 - IL_1793: add - IL_1794: mul - IL_1795: stloc.2 - IL_1796: ldloc.1 - IL_1797: ldloc.2 - IL_1798: bge.s IL_17a2 - - IL_179a: ldloc.1 - IL_179b: ldloc.1 - IL_179c: ldloc.2 - IL_179d: add - IL_179e: add - IL_179f: stloc.1 - IL_17a0: br.s IL_17a8 - - IL_17a2: ldloc.2 - IL_17a3: ldloc.1 - IL_17a4: ldloc.2 - IL_17a5: add - IL_17a6: sub - IL_17a7: stloc.2 - IL_17a8: ldloc.1 - IL_17a9: ldloc.2 - IL_17aa: blt.s IL_17b4 - - IL_17ac: ldloc.1 - IL_17ad: ldloc.1 - IL_17ae: ldloc.2 - IL_17af: add - IL_17b0: mul - IL_17b1: stloc.1 - IL_17b2: br.s IL_17ba - - IL_17b4: ldloc.2 - IL_17b5: ldloc.1 - IL_17b6: ldloc.2 - IL_17b7: add - IL_17b8: sub - IL_17b9: stloc.2 - IL_17ba: ldloc.1 - IL_17bb: ldloc.2 - IL_17bc: bgt.s IL_17c6 - - IL_17be: ldloc.1 - IL_17bf: ldloc.1 - IL_17c0: ldloc.2 - IL_17c1: mul - IL_17c2: mul - IL_17c3: stloc.1 - IL_17c4: br.s IL_17cc - - IL_17c6: ldloc.2 - IL_17c7: ldloc.1 - IL_17c8: ldloc.2 - IL_17c9: mul - IL_17ca: sub - IL_17cb: stloc.2 - IL_17cc: ldloc.1 - IL_17cd: ldloc.2 - IL_17ce: beq.s IL_17d8 - - IL_17d0: ldloc.1 - IL_17d1: ldloc.1 - IL_17d2: ldloc.2 - IL_17d3: add - IL_17d4: sub - IL_17d5: stloc.1 - IL_17d6: br.s IL_17de - - IL_17d8: ldloc.2 - IL_17d9: ldloc.1 - IL_17da: ldloc.2 - IL_17db: add - IL_17dc: mul - IL_17dd: stloc.2 - IL_17de: ldloc.1 - IL_17df: ldloc.2 - IL_17e0: beq.s IL_17ea - - IL_17e2: ldloc.1 - IL_17e3: ldloc.1 - IL_17e4: ldloc.2 - IL_17e5: add - IL_17e6: mul - IL_17e7: stloc.1 - IL_17e8: br.s IL_17f0 - - IL_17ea: ldloc.2 - IL_17eb: ldloc.1 - IL_17ec: ldloc.2 - IL_17ed: add - IL_17ee: mul - IL_17ef: stloc.2 - IL_17f0: ldloc.1 - IL_17f1: ldloc.2 - IL_17f2: bge.s IL_17fc - - IL_17f4: ldloc.1 - IL_17f5: ldloc.1 - IL_17f6: ldloc.2 - IL_17f7: mul - IL_17f8: sub - IL_17f9: stloc.1 - IL_17fa: br.s IL_1802 - - IL_17fc: ldloc.2 - IL_17fd: ldloc.1 - IL_17fe: ldloc.2 - IL_17ff: mul - IL_1800: mul - IL_1801: stloc.2 - IL_1802: ldloc.1 - IL_1803: ldloc.2 - IL_1804: bne.un.s IL_180e - - IL_1806: ldloc.1 - IL_1807: ldloc.1 - IL_1808: ldloc.2 - IL_1809: sub - IL_180a: mul - IL_180b: stloc.1 - IL_180c: br.s IL_1814 - - IL_180e: ldloc.2 - IL_180f: ldloc.1 - IL_1810: ldloc.2 - IL_1811: sub - IL_1812: mul - IL_1813: stloc.2 - IL_1814: ldloc.1 - IL_1815: ldloc.2 - IL_1816: bne.un.s IL_1820 - - IL_1818: ldloc.1 - IL_1819: ldloc.1 - IL_181a: ldloc.2 - IL_181b: sub - IL_181c: mul - IL_181d: stloc.1 - IL_181e: br.s IL_1826 - - IL_1820: ldloc.2 - IL_1821: ldloc.1 - IL_1822: ldloc.2 - IL_1823: sub - IL_1824: sub - IL_1825: stloc.2 - IL_1826: ldloc.1 - IL_1827: ldloc.2 - IL_1828: beq.s IL_1832 - - IL_182a: ldloc.1 - IL_182b: ldloc.1 - IL_182c: ldloc.2 - IL_182d: add - IL_182e: add - IL_182f: stloc.1 - IL_1830: br.s IL_1838 - - IL_1832: ldloc.2 - IL_1833: ldloc.1 - IL_1834: ldloc.2 - IL_1835: add - IL_1836: sub - IL_1837: stloc.2 - IL_1838: ldloc.1 - IL_1839: ldloc.2 - IL_183a: bgt.s IL_1844 - - IL_183c: ldloc.1 - IL_183d: ldloc.1 - IL_183e: ldloc.2 - IL_183f: mul - IL_1840: sub - IL_1841: stloc.1 - IL_1842: br.s IL_184a - - IL_1844: ldloc.2 - IL_1845: ldloc.1 - IL_1846: ldloc.2 - IL_1847: mul - IL_1848: sub - IL_1849: stloc.2 - IL_184a: ldloc.1 - IL_184b: ldloc.2 - IL_184c: ble.s IL_1856 - - IL_184e: ldloc.1 - IL_184f: ldloc.1 - IL_1850: ldloc.2 - IL_1851: add - IL_1852: sub - IL_1853: stloc.1 - IL_1854: br.s IL_185c - - IL_1856: ldloc.2 - IL_1857: ldloc.1 - IL_1858: ldloc.2 - IL_1859: add - IL_185a: sub - IL_185b: stloc.2 - IL_185c: ldloc.1 - IL_185d: ldloc.2 - IL_185e: beq.s IL_1868 - - IL_1860: ldloc.1 - IL_1861: ldloc.1 - IL_1862: ldloc.2 - IL_1863: sub - IL_1864: sub - IL_1865: stloc.1 - IL_1866: br.s IL_186e - - IL_1868: ldloc.2 - IL_1869: ldloc.1 - IL_186a: ldloc.2 - IL_186b: sub - IL_186c: sub - IL_186d: stloc.2 - IL_186e: ldloc.1 - IL_186f: ldloc.2 - IL_1870: bge.s IL_187a - - IL_1872: ldloc.1 - IL_1873: ldloc.1 - IL_1874: ldloc.2 - IL_1875: mul - IL_1876: sub - IL_1877: stloc.1 - IL_1878: br.s IL_1880 - - IL_187a: ldloc.2 - IL_187b: ldloc.1 - IL_187c: ldloc.2 - IL_187d: mul - IL_187e: add - IL_187f: stloc.2 - IL_1880: ldloc.1 - IL_1881: ldloc.2 - IL_1882: bgt.s IL_188c - - IL_1884: ldloc.1 - IL_1885: ldloc.1 - IL_1886: ldloc.2 - IL_1887: mul - IL_1888: mul - IL_1889: stloc.1 - IL_188a: br.s IL_1892 - - IL_188c: ldloc.2 - IL_188d: ldloc.1 - IL_188e: ldloc.2 - IL_188f: mul - IL_1890: mul - IL_1891: stloc.2 - IL_1892: ldloc.1 - IL_1893: ldloc.2 - IL_1894: blt.s IL_189e - - IL_1896: ldloc.1 - IL_1897: ldloc.1 - IL_1898: ldloc.2 - IL_1899: mul - IL_189a: mul - IL_189b: stloc.1 - IL_189c: br.s IL_18a4 - - IL_189e: ldloc.2 - IL_189f: ldloc.1 - IL_18a0: ldloc.2 - IL_18a1: mul - IL_18a2: sub - IL_18a3: stloc.2 - IL_18a4: ldloc.1 - IL_18a5: ldloc.2 - IL_18a6: beq.s IL_18b0 - - IL_18a8: ldloc.1 - IL_18a9: ldloc.1 - IL_18aa: ldloc.2 - IL_18ab: mul - IL_18ac: mul - IL_18ad: stloc.1 - IL_18ae: br.s IL_18b6 - - IL_18b0: ldloc.2 - IL_18b1: ldloc.1 - IL_18b2: ldloc.2 - IL_18b3: mul - IL_18b4: sub - IL_18b5: stloc.2 - IL_18b6: ldloc.1 - IL_18b7: ldloc.2 - IL_18b8: blt.s IL_18c2 - - IL_18ba: ldloc.1 - IL_18bb: ldloc.1 - IL_18bc: ldloc.2 - IL_18bd: mul - IL_18be: add - IL_18bf: stloc.1 - IL_18c0: br.s IL_18c8 - - IL_18c2: ldloc.2 - IL_18c3: ldloc.1 - IL_18c4: ldloc.2 - IL_18c5: mul - IL_18c6: mul - IL_18c7: stloc.2 - IL_18c8: ldloc.1 - IL_18c9: ldloc.2 - IL_18ca: ble.s IL_18d4 - - IL_18cc: ldloc.1 - IL_18cd: ldloc.1 - IL_18ce: ldloc.2 - IL_18cf: sub - IL_18d0: sub - IL_18d1: stloc.1 - IL_18d2: br.s IL_18da - - IL_18d4: ldloc.2 - IL_18d5: ldloc.1 - IL_18d6: ldloc.2 - IL_18d7: sub - IL_18d8: sub - IL_18d9: stloc.2 - IL_18da: ldloc.1 - IL_18db: ldloc.2 - IL_18dc: ble.s IL_18e6 - - IL_18de: ldloc.1 - IL_18df: ldloc.1 - IL_18e0: ldloc.2 - IL_18e1: mul - IL_18e2: mul - IL_18e3: stloc.1 - IL_18e4: br.s IL_18ec - - IL_18e6: ldloc.2 - IL_18e7: ldloc.1 - IL_18e8: ldloc.2 - IL_18e9: mul - IL_18ea: add - IL_18eb: stloc.2 - IL_18ec: ldloc.1 - IL_18ed: ldloc.2 - IL_18ee: ble.s IL_18f8 - - IL_18f0: ldloc.1 - IL_18f1: ldloc.1 - IL_18f2: ldloc.2 - IL_18f3: add - IL_18f4: mul - IL_18f5: stloc.1 - IL_18f6: br.s IL_18fe - - IL_18f8: ldloc.2 - IL_18f9: ldloc.1 - IL_18fa: ldloc.2 - IL_18fb: add - IL_18fc: mul - IL_18fd: stloc.2 - IL_18fe: ldloc.1 - IL_18ff: ldloc.2 - IL_1900: ble.s IL_190a - - IL_1902: ldloc.1 - IL_1903: ldloc.1 - IL_1904: ldloc.2 - IL_1905: sub - IL_1906: sub - IL_1907: stloc.1 - IL_1908: br.s IL_1910 - - IL_190a: ldloc.2 - IL_190b: ldloc.1 - IL_190c: ldloc.2 - IL_190d: sub - IL_190e: sub - IL_190f: stloc.2 - IL_1910: ldloc.1 - IL_1911: ldloc.2 - IL_1912: blt.s IL_191c - - IL_1914: ldloc.1 - IL_1915: ldloc.1 - IL_1916: ldloc.2 - IL_1917: add - IL_1918: sub - IL_1919: stloc.1 - IL_191a: br.s IL_1922 - - IL_191c: ldloc.2 - IL_191d: ldloc.1 - IL_191e: ldloc.2 - IL_191f: add - IL_1920: mul - IL_1921: stloc.2 - IL_1922: ldloc.1 - IL_1923: ldloc.2 - IL_1924: blt.s IL_192e - - IL_1926: ldloc.1 - IL_1927: ldloc.1 - IL_1928: ldloc.2 - IL_1929: sub - IL_192a: mul - IL_192b: stloc.1 - IL_192c: br.s IL_1934 - - IL_192e: ldloc.2 - IL_192f: ldloc.1 - IL_1930: ldloc.2 - IL_1931: sub - IL_1932: mul - IL_1933: stloc.2 - IL_1934: ldloc.1 - IL_1935: ldloc.2 - IL_1936: beq.s IL_1940 - - IL_1938: ldloc.1 - IL_1939: ldloc.1 - IL_193a: ldloc.2 - IL_193b: add - IL_193c: mul - IL_193d: stloc.1 - IL_193e: br.s IL_1946 - - IL_1940: ldloc.2 - IL_1941: ldloc.1 - IL_1942: ldloc.2 - IL_1943: add - IL_1944: add - IL_1945: stloc.2 - IL_1946: ldloc.1 - IL_1947: ldloc.2 - IL_1948: ble.s IL_1952 - - IL_194a: ldloc.1 - IL_194b: ldloc.1 - IL_194c: ldloc.2 - IL_194d: sub - IL_194e: mul - IL_194f: stloc.1 - IL_1950: br.s IL_1958 - - IL_1952: ldloc.2 - IL_1953: ldloc.1 - IL_1954: ldloc.2 - IL_1955: sub - IL_1956: sub - IL_1957: stloc.2 - IL_1958: ldloc.1 - IL_1959: ldloc.2 - IL_195a: bne.un.s IL_1964 - - IL_195c: ldloc.1 - IL_195d: ldloc.1 - IL_195e: ldloc.2 - IL_195f: mul - IL_1960: mul - IL_1961: stloc.1 - IL_1962: br.s IL_196a - - IL_1964: ldloc.2 - IL_1965: ldloc.1 - IL_1966: ldloc.2 - IL_1967: mul - IL_1968: sub - IL_1969: stloc.2 - IL_196a: ldloc.1 - IL_196b: ldloc.2 - IL_196c: beq.s IL_1976 - - IL_196e: ldloc.1 - IL_196f: ldloc.1 - IL_1970: ldloc.2 - IL_1971: sub - IL_1972: mul - IL_1973: stloc.1 - IL_1974: br.s IL_197c - - IL_1976: ldloc.2 - IL_1977: ldloc.1 - IL_1978: ldloc.2 - IL_1979: sub - IL_197a: sub - IL_197b: stloc.2 - IL_197c: ldloc.1 - IL_197d: ldloc.2 - IL_197e: bgt.s IL_1988 - - IL_1980: ldloc.1 - IL_1981: ldloc.1 - IL_1982: ldloc.2 - IL_1983: mul - IL_1984: add - IL_1985: stloc.1 - IL_1986: br.s IL_198e - - IL_1988: ldloc.2 - IL_1989: ldloc.1 - IL_198a: ldloc.2 - IL_198b: mul - IL_198c: mul - IL_198d: stloc.2 - IL_198e: ldloc.1 - IL_198f: ldloc.2 - IL_1990: ble.s IL_199a - - IL_1992: ldloc.1 - IL_1993: ldloc.1 - IL_1994: ldloc.2 - IL_1995: sub - IL_1996: add - IL_1997: stloc.1 - IL_1998: br.s IL_19a0 - - IL_199a: ldloc.2 - IL_199b: ldloc.1 - IL_199c: ldloc.2 - IL_199d: sub - IL_199e: mul - IL_199f: stloc.2 - IL_19a0: ldloc.1 - IL_19a1: ldloc.2 - IL_19a2: blt.s IL_19ac - - IL_19a4: ldloc.1 - IL_19a5: ldloc.1 - IL_19a6: ldloc.2 - IL_19a7: mul - IL_19a8: add - IL_19a9: stloc.1 - IL_19aa: br.s IL_19b2 - - IL_19ac: ldloc.2 - IL_19ad: ldloc.1 - IL_19ae: ldloc.2 - IL_19af: mul - IL_19b0: sub - IL_19b1: stloc.2 - IL_19b2: ldloc.1 - IL_19b3: ldloc.2 - IL_19b4: blt.s IL_19be - - IL_19b6: ldloc.1 - IL_19b7: ldloc.1 - IL_19b8: ldloc.2 - IL_19b9: add - IL_19ba: mul - IL_19bb: stloc.1 - IL_19bc: br.s IL_19c4 - - IL_19be: ldloc.2 - IL_19bf: ldloc.1 - IL_19c0: ldloc.2 - IL_19c1: add - IL_19c2: sub - IL_19c3: stloc.2 - IL_19c4: ldloc.1 - IL_19c5: ldloc.2 - IL_19c6: bne.un.s IL_19d0 - - IL_19c8: ldloc.1 - IL_19c9: ldloc.1 - IL_19ca: ldloc.2 - IL_19cb: add - IL_19cc: mul - IL_19cd: stloc.1 - IL_19ce: br.s IL_19d6 - - IL_19d0: ldloc.2 - IL_19d1: ldloc.1 - IL_19d2: ldloc.2 - IL_19d3: add - IL_19d4: sub - IL_19d5: stloc.2 - IL_19d6: ldloc.1 - IL_19d7: ldloc.2 - IL_19d8: beq.s IL_19e2 - - IL_19da: ldloc.1 - IL_19db: ldloc.1 - IL_19dc: ldloc.2 - IL_19dd: add - IL_19de: mul - IL_19df: stloc.1 - IL_19e0: br.s IL_19e8 - - IL_19e2: ldloc.2 - IL_19e3: ldloc.1 - IL_19e4: ldloc.2 - IL_19e5: add - IL_19e6: mul - IL_19e7: stloc.2 - IL_19e8: ldloc.1 - IL_19e9: ldloc.2 - IL_19ea: ble.s IL_19f4 - - IL_19ec: ldloc.1 - IL_19ed: ldloc.1 - IL_19ee: ldloc.2 - IL_19ef: add - IL_19f0: add - IL_19f1: stloc.1 - IL_19f2: br.s IL_19fa - - IL_19f4: ldloc.2 - IL_19f5: ldloc.1 - IL_19f6: ldloc.2 - IL_19f7: add - IL_19f8: sub - IL_19f9: stloc.2 - IL_19fa: ldloc.1 - IL_19fb: ldloc.2 - IL_19fc: ble.s IL_1a06 - - IL_19fe: ldloc.1 - IL_19ff: ldloc.1 - IL_1a00: ldloc.2 - IL_1a01: sub - IL_1a02: mul - IL_1a03: stloc.1 - IL_1a04: br.s IL_1a0c - - IL_1a06: ldloc.2 - IL_1a07: ldloc.1 - IL_1a08: ldloc.2 - IL_1a09: sub - IL_1a0a: sub - IL_1a0b: stloc.2 - IL_1a0c: ldloc.1 - IL_1a0d: ldloc.2 - IL_1a0e: beq.s IL_1a18 - - IL_1a10: ldloc.1 - IL_1a11: ldloc.1 - IL_1a12: ldloc.2 - IL_1a13: sub - IL_1a14: add - IL_1a15: stloc.1 - IL_1a16: br.s IL_1a1e - - IL_1a18: ldloc.2 - IL_1a19: ldloc.1 - IL_1a1a: ldloc.2 - IL_1a1b: sub - IL_1a1c: sub - IL_1a1d: stloc.2 - IL_1a1e: ldloc.1 - IL_1a1f: ldloc.2 - IL_1a20: bge.s IL_1a2a - - IL_1a22: ldloc.1 - IL_1a23: ldloc.1 - IL_1a24: ldloc.2 - IL_1a25: sub - IL_1a26: add - IL_1a27: stloc.1 - IL_1a28: br.s IL_1a30 - - IL_1a2a: ldloc.2 - IL_1a2b: ldloc.1 - IL_1a2c: ldloc.2 - IL_1a2d: sub - IL_1a2e: sub - IL_1a2f: stloc.2 - IL_1a30: ldloc.1 - IL_1a31: ldloc.2 - IL_1a32: ble.s IL_1a3c - - IL_1a34: ldloc.1 - IL_1a35: ldloc.1 - IL_1a36: ldloc.2 - IL_1a37: mul - IL_1a38: sub - IL_1a39: stloc.1 - IL_1a3a: br.s IL_1a42 - - IL_1a3c: ldloc.2 - IL_1a3d: ldloc.1 - IL_1a3e: ldloc.2 - IL_1a3f: mul - IL_1a40: mul - IL_1a41: stloc.2 - IL_1a42: ldloc.1 - IL_1a43: ldloc.2 - IL_1a44: blt.s IL_1a4e - - IL_1a46: ldloc.1 - IL_1a47: ldloc.1 - IL_1a48: ldloc.2 - IL_1a49: mul - IL_1a4a: mul - IL_1a4b: stloc.1 - IL_1a4c: br.s IL_1a54 - - IL_1a4e: ldloc.2 - IL_1a4f: ldloc.1 - IL_1a50: ldloc.2 - IL_1a51: mul - IL_1a52: add - IL_1a53: stloc.2 - IL_1a54: ldloc.1 - IL_1a55: ldloc.2 - IL_1a56: bgt.s IL_1a60 - - IL_1a58: ldloc.1 - IL_1a59: ldloc.1 - IL_1a5a: ldloc.2 - IL_1a5b: mul - IL_1a5c: add - IL_1a5d: stloc.1 - IL_1a5e: br.s IL_1a66 - - IL_1a60: ldloc.2 - IL_1a61: ldloc.1 - IL_1a62: ldloc.2 - IL_1a63: mul - IL_1a64: mul - IL_1a65: stloc.2 - IL_1a66: ldloc.1 - IL_1a67: ldloc.2 - IL_1a68: bge.s IL_1a72 - - IL_1a6a: ldloc.1 - IL_1a6b: ldloc.1 - IL_1a6c: ldloc.2 - IL_1a6d: mul - IL_1a6e: sub - IL_1a6f: stloc.1 - IL_1a70: br.s IL_1a78 - - IL_1a72: ldloc.2 - IL_1a73: ldloc.1 - IL_1a74: ldloc.2 - IL_1a75: mul - IL_1a76: sub - IL_1a77: stloc.2 - IL_1a78: ldloc.1 - IL_1a79: ldloc.2 - IL_1a7a: bge.s IL_1a84 - - IL_1a7c: ldloc.1 - IL_1a7d: ldloc.1 - IL_1a7e: ldloc.2 - IL_1a7f: mul - IL_1a80: sub - IL_1a81: stloc.1 - IL_1a82: br.s IL_1a8a - - IL_1a84: ldloc.2 - IL_1a85: ldloc.1 - IL_1a86: ldloc.2 - IL_1a87: mul - IL_1a88: sub - IL_1a89: stloc.2 - IL_1a8a: ldloc.1 - IL_1a8b: ldloc.2 - IL_1a8c: beq.s IL_1a96 - - IL_1a8e: ldloc.1 - IL_1a8f: ldloc.1 - IL_1a90: ldloc.2 - IL_1a91: sub - IL_1a92: sub - IL_1a93: stloc.1 - IL_1a94: br.s IL_1a9c - - IL_1a96: ldloc.2 - IL_1a97: ldloc.1 - IL_1a98: ldloc.2 - IL_1a99: sub - IL_1a9a: sub - IL_1a9b: stloc.2 - IL_1a9c: ldloc.1 - IL_1a9d: ldloc.2 - IL_1a9e: bgt.s IL_1aa8 - - IL_1aa0: ldloc.1 - IL_1aa1: ldloc.1 - IL_1aa2: ldloc.2 - IL_1aa3: add - IL_1aa4: mul - IL_1aa5: stloc.1 - IL_1aa6: br.s IL_1aae - - IL_1aa8: ldloc.2 - IL_1aa9: ldloc.1 - IL_1aaa: ldloc.2 - IL_1aab: add - IL_1aac: mul - IL_1aad: stloc.2 - IL_1aae: ldloc.1 - IL_1aaf: ldloc.2 - IL_1ab0: ble.s IL_1aba - - IL_1ab2: ldloc.1 - IL_1ab3: ldloc.1 - IL_1ab4: ldloc.2 - IL_1ab5: mul - IL_1ab6: add - IL_1ab7: stloc.1 - IL_1ab8: br.s IL_1ac0 - - IL_1aba: ldloc.2 - IL_1abb: ldloc.1 - IL_1abc: ldloc.2 - IL_1abd: mul - IL_1abe: add - IL_1abf: stloc.2 - IL_1ac0: ldloc.1 - IL_1ac1: ldloc.2 - IL_1ac2: blt.s IL_1acc - - IL_1ac4: ldloc.1 - IL_1ac5: ldloc.1 - IL_1ac6: ldloc.2 - IL_1ac7: sub - IL_1ac8: mul - IL_1ac9: stloc.1 - IL_1aca: br.s IL_1ad2 - - IL_1acc: ldloc.2 - IL_1acd: ldloc.1 - IL_1ace: ldloc.2 - IL_1acf: sub - IL_1ad0: add - IL_1ad1: stloc.2 - IL_1ad2: ldloc.1 - IL_1ad3: ldloc.2 - IL_1ad4: beq.s IL_1ade - - IL_1ad6: ldloc.1 - IL_1ad7: ldloc.1 - IL_1ad8: ldloc.2 - IL_1ad9: add - IL_1ada: mul - IL_1adb: stloc.1 - IL_1adc: br.s IL_1ae4 - - IL_1ade: ldloc.2 - IL_1adf: ldloc.1 - IL_1ae0: ldloc.2 - IL_1ae1: add - IL_1ae2: mul - IL_1ae3: stloc.2 - IL_1ae4: ldloc.1 - IL_1ae5: ldloc.2 - IL_1ae6: beq.s IL_1af0 - - IL_1ae8: ldloc.1 - IL_1ae9: ldloc.1 - IL_1aea: ldloc.2 - IL_1aeb: mul - IL_1aec: sub - IL_1aed: stloc.1 - IL_1aee: br.s IL_1af6 - - IL_1af0: ldloc.2 - IL_1af1: ldloc.1 - IL_1af2: ldloc.2 - IL_1af3: mul - IL_1af4: sub - IL_1af5: stloc.2 - IL_1af6: ldloc.1 - IL_1af7: ldloc.2 - IL_1af8: beq.s IL_1b02 - - IL_1afa: ldloc.1 - IL_1afb: ldloc.1 - IL_1afc: ldloc.2 - IL_1afd: sub - IL_1afe: sub - IL_1aff: stloc.1 - IL_1b00: br.s IL_1b08 - - IL_1b02: ldloc.2 - IL_1b03: ldloc.1 - IL_1b04: ldloc.2 - IL_1b05: sub - IL_1b06: sub - IL_1b07: stloc.2 - IL_1b08: ldloc.1 - IL_1b09: ldloc.2 - IL_1b0a: bne.un.s IL_1b14 - - IL_1b0c: ldloc.1 - IL_1b0d: ldloc.1 - IL_1b0e: ldloc.2 - IL_1b0f: mul - IL_1b10: mul - IL_1b11: stloc.1 - IL_1b12: br.s IL_1b1a - - IL_1b14: ldloc.2 - IL_1b15: ldloc.1 - IL_1b16: ldloc.2 - IL_1b17: mul - IL_1b18: add - IL_1b19: stloc.2 - IL_1b1a: ldloc.1 - IL_1b1b: ldloc.2 - IL_1b1c: blt.s IL_1b26 - - IL_1b1e: ldloc.1 - IL_1b1f: ldloc.1 - IL_1b20: ldloc.2 - IL_1b21: sub - IL_1b22: sub - IL_1b23: stloc.1 - IL_1b24: br.s IL_1b2c - - IL_1b26: ldloc.2 - IL_1b27: ldloc.1 - IL_1b28: ldloc.2 - IL_1b29: sub - IL_1b2a: mul - IL_1b2b: stloc.2 - IL_1b2c: ldloc.1 - IL_1b2d: ldloc.2 - IL_1b2e: bge.s IL_1b38 - - IL_1b30: ldloc.1 - IL_1b31: ldloc.1 - IL_1b32: ldloc.2 - IL_1b33: sub - IL_1b34: add - IL_1b35: stloc.1 - IL_1b36: br.s IL_1b3e - - IL_1b38: ldloc.2 - IL_1b39: ldloc.1 - IL_1b3a: ldloc.2 - IL_1b3b: sub - IL_1b3c: sub - IL_1b3d: stloc.2 - IL_1b3e: ldloc.1 - IL_1b3f: ldloc.2 - IL_1b40: ble.s IL_1b4a - - IL_1b42: ldloc.1 - IL_1b43: ldloc.1 - IL_1b44: ldloc.2 - IL_1b45: sub - IL_1b46: add - IL_1b47: stloc.1 - IL_1b48: br.s IL_1b50 - - IL_1b4a: ldloc.2 - IL_1b4b: ldloc.1 - IL_1b4c: ldloc.2 - IL_1b4d: sub - IL_1b4e: mul - IL_1b4f: stloc.2 - IL_1b50: ldloc.1 - IL_1b51: ldloc.2 - IL_1b52: ble.s IL_1b5c - - IL_1b54: ldloc.1 - IL_1b55: ldloc.1 - IL_1b56: ldloc.2 - IL_1b57: add - IL_1b58: add - IL_1b59: stloc.1 - IL_1b5a: br.s IL_1b62 - - IL_1b5c: ldloc.2 - IL_1b5d: ldloc.1 - IL_1b5e: ldloc.2 - IL_1b5f: add - IL_1b60: sub - IL_1b61: stloc.2 - IL_1b62: ldloc.1 - IL_1b63: ldloc.2 - IL_1b64: bge.s IL_1b6e - - IL_1b66: ldloc.1 - IL_1b67: ldloc.1 - IL_1b68: ldloc.2 - IL_1b69: sub - IL_1b6a: add - IL_1b6b: stloc.1 - IL_1b6c: br.s IL_1b74 - - IL_1b6e: ldloc.2 - IL_1b6f: ldloc.1 - IL_1b70: ldloc.2 - IL_1b71: sub - IL_1b72: mul - IL_1b73: stloc.2 - IL_1b74: ldloc.1 - IL_1b75: ldloc.2 - IL_1b76: bgt.s IL_1b80 - - IL_1b78: ldloc.1 - IL_1b79: ldloc.1 - IL_1b7a: ldloc.2 - IL_1b7b: sub - IL_1b7c: sub - IL_1b7d: stloc.1 - IL_1b7e: br.s IL_1b86 - - IL_1b80: ldloc.2 - IL_1b81: ldloc.1 - IL_1b82: ldloc.2 - IL_1b83: sub - IL_1b84: mul - IL_1b85: stloc.2 - IL_1b86: ldloc.1 - IL_1b87: ldloc.2 - IL_1b88: beq.s IL_1b92 - - IL_1b8a: ldloc.1 - IL_1b8b: ldloc.1 - IL_1b8c: ldloc.2 - IL_1b8d: add - IL_1b8e: sub - IL_1b8f: stloc.1 - IL_1b90: br.s IL_1b98 - - IL_1b92: ldloc.2 - IL_1b93: ldloc.1 - IL_1b94: ldloc.2 - IL_1b95: add - IL_1b96: mul - IL_1b97: stloc.2 - IL_1b98: ldloc.1 - IL_1b99: ldloc.2 - IL_1b9a: bge.s IL_1ba4 - - IL_1b9c: ldloc.1 - IL_1b9d: ldloc.1 - IL_1b9e: ldloc.2 - IL_1b9f: add - IL_1ba0: add - IL_1ba1: stloc.1 - IL_1ba2: br.s IL_1baa - - IL_1ba4: ldloc.2 - IL_1ba5: ldloc.1 - IL_1ba6: ldloc.2 - IL_1ba7: add - IL_1ba8: sub - IL_1ba9: stloc.2 - IL_1baa: ldloc.1 - IL_1bab: ldloc.2 - IL_1bac: beq.s IL_1bb6 - - IL_1bae: ldloc.1 - IL_1baf: ldloc.1 - IL_1bb0: ldloc.2 - IL_1bb1: mul - IL_1bb2: sub - IL_1bb3: stloc.1 - IL_1bb4: br.s IL_1bbc - - IL_1bb6: ldloc.2 - IL_1bb7: ldloc.1 - IL_1bb8: ldloc.2 - IL_1bb9: mul - IL_1bba: add - IL_1bbb: stloc.2 - IL_1bbc: ldloc.1 - IL_1bbd: ldloc.2 - IL_1bbe: bge.s IL_1bc8 - - IL_1bc0: ldloc.1 - IL_1bc1: ldloc.1 - IL_1bc2: ldloc.2 - IL_1bc3: sub - IL_1bc4: sub - IL_1bc5: stloc.1 - IL_1bc6: br.s IL_1bce - - IL_1bc8: ldloc.2 - IL_1bc9: ldloc.1 - IL_1bca: ldloc.2 - IL_1bcb: sub - IL_1bcc: add - IL_1bcd: stloc.2 - IL_1bce: ldloc.1 - IL_1bcf: ldloc.2 - IL_1bd0: blt.s IL_1bda - - IL_1bd2: ldloc.1 - IL_1bd3: ldloc.1 - IL_1bd4: ldloc.2 - IL_1bd5: mul - IL_1bd6: add - IL_1bd7: stloc.1 - IL_1bd8: br.s IL_1be0 - - IL_1bda: ldloc.2 - IL_1bdb: ldloc.1 - IL_1bdc: ldloc.2 - IL_1bdd: mul - IL_1bde: add - IL_1bdf: stloc.2 - IL_1be0: ldloc.1 - IL_1be1: ldloc.2 - IL_1be2: bgt.s IL_1bec - - IL_1be4: ldloc.1 - IL_1be5: ldloc.1 - IL_1be6: ldloc.2 - IL_1be7: sub - IL_1be8: add - IL_1be9: stloc.1 - IL_1bea: br.s IL_1bf2 - - IL_1bec: ldloc.2 - IL_1bed: ldloc.1 - IL_1bee: ldloc.2 - IL_1bef: sub - IL_1bf0: mul - IL_1bf1: stloc.2 - IL_1bf2: ldloc.1 - IL_1bf3: ldloc.2 - IL_1bf4: ble.s IL_1bfe - - IL_1bf6: ldloc.1 - IL_1bf7: ldloc.1 - IL_1bf8: ldloc.2 - IL_1bf9: sub - IL_1bfa: add - IL_1bfb: stloc.1 - IL_1bfc: br.s IL_1c04 - - IL_1bfe: ldloc.2 - IL_1bff: ldloc.1 - IL_1c00: ldloc.2 - IL_1c01: sub - IL_1c02: sub - IL_1c03: stloc.2 - IL_1c04: ldloc.1 - IL_1c05: ldloc.2 - IL_1c06: beq.s IL_1c10 - - IL_1c08: ldloc.1 - IL_1c09: ldloc.1 - IL_1c0a: ldloc.2 - IL_1c0b: add - IL_1c0c: sub - IL_1c0d: stloc.1 - IL_1c0e: br.s IL_1c16 - - IL_1c10: ldloc.2 - IL_1c11: ldloc.1 - IL_1c12: ldloc.2 - IL_1c13: add - IL_1c14: add - IL_1c15: stloc.2 - IL_1c16: ldloc.1 - IL_1c17: ldloc.2 - IL_1c18: bgt.s IL_1c22 - - IL_1c1a: ldloc.1 - IL_1c1b: ldloc.1 - IL_1c1c: ldloc.2 - IL_1c1d: mul - IL_1c1e: sub - IL_1c1f: stloc.1 - IL_1c20: br.s IL_1c28 - - IL_1c22: ldloc.2 - IL_1c23: ldloc.1 - IL_1c24: ldloc.2 - IL_1c25: mul - IL_1c26: sub - IL_1c27: stloc.2 - IL_1c28: ldloc.1 - IL_1c29: ldloc.2 - IL_1c2a: blt.s IL_1c34 - - IL_1c2c: ldloc.1 - IL_1c2d: ldloc.1 - IL_1c2e: ldloc.2 - IL_1c2f: mul - IL_1c30: sub - IL_1c31: stloc.1 - IL_1c32: br.s IL_1c3a - - IL_1c34: ldloc.2 - IL_1c35: ldloc.1 - IL_1c36: ldloc.2 - IL_1c37: mul - IL_1c38: add - IL_1c39: stloc.2 - IL_1c3a: ldloc.1 - IL_1c3b: ldloc.2 - IL_1c3c: bgt.s IL_1c46 - - IL_1c3e: ldloc.1 - IL_1c3f: ldloc.1 - IL_1c40: ldloc.2 - IL_1c41: mul - IL_1c42: sub - IL_1c43: stloc.1 - IL_1c44: br.s IL_1c4c - - IL_1c46: ldloc.2 - IL_1c47: ldloc.1 - IL_1c48: ldloc.2 - IL_1c49: mul - IL_1c4a: sub - IL_1c4b: stloc.2 - IL_1c4c: ldloc.1 - IL_1c4d: ldloc.2 - IL_1c4e: beq.s IL_1c58 - - IL_1c50: ldloc.1 - IL_1c51: ldloc.1 - IL_1c52: ldloc.2 - IL_1c53: sub - IL_1c54: sub - IL_1c55: stloc.1 - IL_1c56: br.s IL_1c5e - - IL_1c58: ldloc.2 - IL_1c59: ldloc.1 - IL_1c5a: ldloc.2 - IL_1c5b: sub - IL_1c5c: add - IL_1c5d: stloc.2 - IL_1c5e: ldloc.1 - IL_1c5f: ldloc.2 - IL_1c60: bge.s IL_1c6a - - IL_1c62: ldloc.1 - IL_1c63: ldloc.1 - IL_1c64: ldloc.2 - IL_1c65: sub - IL_1c66: add - IL_1c67: stloc.1 - IL_1c68: br.s IL_1c70 - - IL_1c6a: ldloc.2 - IL_1c6b: ldloc.1 - IL_1c6c: ldloc.2 - IL_1c6d: sub - IL_1c6e: add - IL_1c6f: stloc.2 - IL_1c70: ldloc.1 - IL_1c71: ldloc.2 - IL_1c72: bge.s IL_1c7c - - IL_1c74: ldloc.1 - IL_1c75: ldloc.1 - IL_1c76: ldloc.2 - IL_1c77: mul - IL_1c78: add - IL_1c79: stloc.1 - IL_1c7a: br.s IL_1c82 - - IL_1c7c: ldloc.2 - IL_1c7d: ldloc.1 - IL_1c7e: ldloc.2 - IL_1c7f: mul - IL_1c80: mul - IL_1c81: stloc.2 - IL_1c82: ldloc.1 - IL_1c83: ldloc.2 - IL_1c84: bne.un.s IL_1c8e - - IL_1c86: ldloc.1 - IL_1c87: ldloc.1 - IL_1c88: ldloc.2 - IL_1c89: add - IL_1c8a: add - IL_1c8b: stloc.1 - IL_1c8c: br.s IL_1c94 - - IL_1c8e: ldloc.2 - IL_1c8f: ldloc.1 - IL_1c90: ldloc.2 - IL_1c91: add - IL_1c92: mul - IL_1c93: stloc.2 - IL_1c94: ldloc.1 - IL_1c95: ldloc.2 - IL_1c96: bne.un.s IL_1ca0 - - IL_1c98: ldloc.1 - IL_1c99: ldloc.1 - IL_1c9a: ldloc.2 - IL_1c9b: sub - IL_1c9c: add - IL_1c9d: stloc.1 - IL_1c9e: br.s IL_1ca6 - - IL_1ca0: ldloc.2 - IL_1ca1: ldloc.1 - IL_1ca2: ldloc.2 - IL_1ca3: sub - IL_1ca4: add - IL_1ca5: stloc.2 - IL_1ca6: ldloc.1 - IL_1ca7: ldloc.2 - IL_1ca8: bge.s IL_1cb2 - - IL_1caa: ldloc.1 - IL_1cab: ldloc.1 - IL_1cac: ldloc.2 - IL_1cad: mul - IL_1cae: add - IL_1caf: stloc.1 - IL_1cb0: br.s IL_1cb8 - - IL_1cb2: ldloc.2 - IL_1cb3: ldloc.1 - IL_1cb4: ldloc.2 - IL_1cb5: mul - IL_1cb6: add - IL_1cb7: stloc.2 - IL_1cb8: ldloc.1 - IL_1cb9: ldloc.2 - IL_1cba: beq.s IL_1cc4 - - IL_1cbc: ldloc.1 - IL_1cbd: ldloc.1 - IL_1cbe: ldloc.2 - IL_1cbf: add - IL_1cc0: add - IL_1cc1: stloc.1 - IL_1cc2: br.s IL_1cca - - IL_1cc4: ldloc.2 - IL_1cc5: ldloc.1 - IL_1cc6: ldloc.2 - IL_1cc7: add - IL_1cc8: add - IL_1cc9: stloc.2 - IL_1cca: ldloc.1 - IL_1ccb: ldloc.2 - IL_1ccc: beq.s IL_1cd6 - - IL_1cce: ldloc.1 - IL_1ccf: ldloc.1 - IL_1cd0: ldloc.2 - IL_1cd1: add - IL_1cd2: add - IL_1cd3: stloc.1 - IL_1cd4: br.s IL_1cdc - - IL_1cd6: ldloc.2 - IL_1cd7: ldloc.1 - IL_1cd8: ldloc.2 - IL_1cd9: add - IL_1cda: sub - IL_1cdb: stloc.2 - IL_1cdc: ldloc.1 - IL_1cdd: ldloc.2 - IL_1cde: bgt.s IL_1ce8 - - IL_1ce0: ldloc.1 - IL_1ce1: ldloc.1 - IL_1ce2: ldloc.2 - IL_1ce3: sub - IL_1ce4: mul - IL_1ce5: stloc.1 - IL_1ce6: br.s IL_1cee - - IL_1ce8: ldloc.2 - IL_1ce9: ldloc.1 - IL_1cea: ldloc.2 - IL_1ceb: sub - IL_1cec: mul - IL_1ced: stloc.2 - IL_1cee: ldloc.1 - IL_1cef: ldloc.2 - IL_1cf0: ble.s IL_1cfa - - IL_1cf2: ldloc.1 - IL_1cf3: ldloc.1 - IL_1cf4: ldloc.2 - IL_1cf5: mul - IL_1cf6: mul - IL_1cf7: stloc.1 - IL_1cf8: br.s IL_1d00 - - IL_1cfa: ldloc.2 - IL_1cfb: ldloc.1 - IL_1cfc: ldloc.2 - IL_1cfd: mul - IL_1cfe: add - IL_1cff: stloc.2 - IL_1d00: ldloc.1 - IL_1d01: ldloc.2 - IL_1d02: blt.s IL_1d0c - - IL_1d04: ldloc.1 - IL_1d05: ldloc.1 - IL_1d06: ldloc.2 - IL_1d07: sub - IL_1d08: sub - IL_1d09: stloc.1 - IL_1d0a: br.s IL_1d12 - - IL_1d0c: ldloc.2 - IL_1d0d: ldloc.1 - IL_1d0e: ldloc.2 - IL_1d0f: sub - IL_1d10: mul - IL_1d11: stloc.2 - IL_1d12: ldloc.1 - IL_1d13: ldloc.2 - IL_1d14: bgt.s IL_1d1e - - IL_1d16: ldloc.1 - IL_1d17: ldloc.1 - IL_1d18: ldloc.2 - IL_1d19: add - IL_1d1a: mul - IL_1d1b: stloc.1 - IL_1d1c: br.s IL_1d24 - - IL_1d1e: ldloc.2 - IL_1d1f: ldloc.1 - IL_1d20: ldloc.2 - IL_1d21: add - IL_1d22: mul - IL_1d23: stloc.2 - IL_1d24: ldloc.1 - IL_1d25: ldloc.2 - IL_1d26: blt.s IL_1d30 - - IL_1d28: ldloc.1 - IL_1d29: ldloc.1 - IL_1d2a: ldloc.2 - IL_1d2b: sub - IL_1d2c: add - IL_1d2d: stloc.1 - IL_1d2e: br.s IL_1d36 - - IL_1d30: ldloc.2 - IL_1d31: ldloc.1 - IL_1d32: ldloc.2 - IL_1d33: sub - IL_1d34: add - IL_1d35: stloc.2 - IL_1d36: ldloc.1 - IL_1d37: ldloc.2 - IL_1d38: bge.s IL_1d42 - - IL_1d3a: ldloc.1 - IL_1d3b: ldloc.1 - IL_1d3c: ldloc.2 - IL_1d3d: mul - IL_1d3e: add - IL_1d3f: stloc.1 - IL_1d40: br.s IL_1d48 - - IL_1d42: ldloc.2 - IL_1d43: ldloc.1 - IL_1d44: ldloc.2 - IL_1d45: mul - IL_1d46: sub - IL_1d47: stloc.2 - IL_1d48: ldloc.1 - IL_1d49: ldloc.2 - IL_1d4a: bge.s IL_1d54 - - IL_1d4c: ldloc.1 - IL_1d4d: ldloc.1 - IL_1d4e: ldloc.2 - IL_1d4f: mul - IL_1d50: add - IL_1d51: stloc.1 - IL_1d52: br.s IL_1d5a - - IL_1d54: ldloc.2 - IL_1d55: ldloc.1 - IL_1d56: ldloc.2 - IL_1d57: mul - IL_1d58: sub - IL_1d59: stloc.2 - IL_1d5a: ldloc.1 - IL_1d5b: ldloc.2 - IL_1d5c: beq.s IL_1d66 - - IL_1d5e: ldloc.1 - IL_1d5f: ldloc.1 - IL_1d60: ldloc.2 - IL_1d61: mul - IL_1d62: add - IL_1d63: stloc.1 - IL_1d64: br.s IL_1d6c - - IL_1d66: ldloc.2 - IL_1d67: ldloc.1 - IL_1d68: ldloc.2 - IL_1d69: mul - IL_1d6a: sub - IL_1d6b: stloc.2 - IL_1d6c: ldloc.1 - IL_1d6d: ldloc.2 - IL_1d6e: bne.un.s IL_1d78 - - IL_1d70: ldloc.1 - IL_1d71: ldloc.1 - IL_1d72: ldloc.2 - IL_1d73: mul - IL_1d74: mul - IL_1d75: stloc.1 - IL_1d76: br.s IL_1d7e - - IL_1d78: ldloc.2 - IL_1d79: ldloc.1 - IL_1d7a: ldloc.2 - IL_1d7b: mul - IL_1d7c: add - IL_1d7d: stloc.2 - IL_1d7e: ldloc.1 - IL_1d7f: ldloc.2 - IL_1d80: bgt.s IL_1d8a - - IL_1d82: ldloc.1 - IL_1d83: ldloc.1 - IL_1d84: ldloc.2 - IL_1d85: add - IL_1d86: sub - IL_1d87: stloc.1 - IL_1d88: br.s IL_1d90 - - IL_1d8a: ldloc.2 - IL_1d8b: ldloc.1 - IL_1d8c: ldloc.2 - IL_1d8d: add - IL_1d8e: add - IL_1d8f: stloc.2 - IL_1d90: ldloc.1 - IL_1d91: ldloc.2 - IL_1d92: bne.un.s IL_1d9c - - IL_1d94: ldloc.1 - IL_1d95: ldloc.1 - IL_1d96: ldloc.2 - IL_1d97: sub - IL_1d98: sub - IL_1d99: stloc.1 - IL_1d9a: br.s IL_1da2 - - IL_1d9c: ldloc.2 - IL_1d9d: ldloc.1 - IL_1d9e: ldloc.2 - IL_1d9f: sub - IL_1da0: mul - IL_1da1: stloc.2 - IL_1da2: ldloc.1 - IL_1da3: ldloc.2 - IL_1da4: blt.s IL_1dae - - IL_1da6: ldloc.1 - IL_1da7: ldloc.1 - IL_1da8: ldloc.2 - IL_1da9: add - IL_1daa: mul - IL_1dab: stloc.1 - IL_1dac: br.s IL_1db4 - - IL_1dae: ldloc.2 - IL_1daf: ldloc.1 - IL_1db0: ldloc.2 - IL_1db1: add - IL_1db2: add - IL_1db3: stloc.2 - IL_1db4: ldloc.1 - IL_1db5: ldloc.2 - IL_1db6: bge.s IL_1dc0 - - IL_1db8: ldloc.1 - IL_1db9: ldloc.1 - IL_1dba: ldloc.2 - IL_1dbb: mul - IL_1dbc: mul - IL_1dbd: stloc.1 - IL_1dbe: br.s IL_1dc6 - - IL_1dc0: ldloc.2 - IL_1dc1: ldloc.1 - IL_1dc2: ldloc.2 - IL_1dc3: mul - IL_1dc4: mul - IL_1dc5: stloc.2 - IL_1dc6: ldloc.1 - IL_1dc7: ldloc.2 - IL_1dc8: bge.s IL_1dd2 - - IL_1dca: ldloc.1 - IL_1dcb: ldloc.1 - IL_1dcc: ldloc.2 - IL_1dcd: sub - IL_1dce: mul - IL_1dcf: stloc.1 - IL_1dd0: br.s IL_1dd8 - - IL_1dd2: ldloc.2 - IL_1dd3: ldloc.1 - IL_1dd4: ldloc.2 - IL_1dd5: sub - IL_1dd6: mul - IL_1dd7: stloc.2 - IL_1dd8: ldloc.1 - IL_1dd9: ldloc.2 - IL_1dda: blt.s IL_1de4 - - IL_1ddc: ldloc.1 - IL_1ddd: ldloc.1 - IL_1dde: ldloc.2 - IL_1ddf: mul - IL_1de0: mul - IL_1de1: stloc.1 - IL_1de2: br.s IL_1dea - - IL_1de4: ldloc.2 - IL_1de5: ldloc.1 - IL_1de6: ldloc.2 - IL_1de7: mul - IL_1de8: add - IL_1de9: stloc.2 - IL_1dea: ldloc.1 - IL_1deb: ldloc.2 - IL_1dec: ble.s IL_1df6 - - IL_1dee: ldloc.1 - IL_1def: ldloc.1 - IL_1df0: ldloc.2 - IL_1df1: sub - IL_1df2: sub - IL_1df3: stloc.1 - IL_1df4: br.s IL_1dfc - - IL_1df6: ldloc.2 - IL_1df7: ldloc.1 - IL_1df8: ldloc.2 - IL_1df9: sub - IL_1dfa: mul - IL_1dfb: stloc.2 - IL_1dfc: ldloc.1 - IL_1dfd: ldloc.2 - IL_1dfe: beq.s IL_1e08 - - IL_1e00: ldloc.1 - IL_1e01: ldloc.1 - IL_1e02: ldloc.2 - IL_1e03: mul - IL_1e04: mul - IL_1e05: stloc.1 - IL_1e06: br.s IL_1e0e - - IL_1e08: ldloc.2 - IL_1e09: ldloc.1 - IL_1e0a: ldloc.2 - IL_1e0b: mul - IL_1e0c: mul - IL_1e0d: stloc.2 - IL_1e0e: ldloc.1 - IL_1e0f: ldloc.2 - IL_1e10: bgt.s IL_1e1a - - IL_1e12: ldloc.1 - IL_1e13: ldloc.1 - IL_1e14: ldloc.2 - IL_1e15: mul - IL_1e16: add - IL_1e17: stloc.1 - IL_1e18: br.s IL_1e20 - - IL_1e1a: ldloc.2 - IL_1e1b: ldloc.1 - IL_1e1c: ldloc.2 - IL_1e1d: mul - IL_1e1e: mul - IL_1e1f: stloc.2 - IL_1e20: ldloc.1 - IL_1e21: ldloc.2 - IL_1e22: ble.s IL_1e2c - - IL_1e24: ldloc.1 - IL_1e25: ldloc.1 - IL_1e26: ldloc.2 - IL_1e27: mul - IL_1e28: mul - IL_1e29: stloc.1 - IL_1e2a: br.s IL_1e32 - - IL_1e2c: ldloc.2 - IL_1e2d: ldloc.1 - IL_1e2e: ldloc.2 - IL_1e2f: mul - IL_1e30: mul - IL_1e31: stloc.2 - IL_1e32: ldloc.1 - IL_1e33: ldloc.2 - IL_1e34: bge.s IL_1e3e - - IL_1e36: ldloc.1 - IL_1e37: ldloc.1 - IL_1e38: ldloc.2 - IL_1e39: sub - IL_1e3a: mul - IL_1e3b: stloc.1 - IL_1e3c: br.s IL_1e44 - - IL_1e3e: ldloc.2 - IL_1e3f: ldloc.1 - IL_1e40: ldloc.2 - IL_1e41: sub - IL_1e42: add - IL_1e43: stloc.2 - IL_1e44: ldloc.1 - IL_1e45: ldloc.2 - IL_1e46: beq.s IL_1e50 - - IL_1e48: ldloc.1 - IL_1e49: ldloc.1 - IL_1e4a: ldloc.2 - IL_1e4b: add - IL_1e4c: sub - IL_1e4d: stloc.1 - IL_1e4e: br.s IL_1e56 - - IL_1e50: ldloc.2 - IL_1e51: ldloc.1 - IL_1e52: ldloc.2 - IL_1e53: add - IL_1e54: sub - IL_1e55: stloc.2 - IL_1e56: ldloc.1 - IL_1e57: ldloc.2 - IL_1e58: bge.s IL_1e62 - - IL_1e5a: ldloc.1 - IL_1e5b: ldloc.1 - IL_1e5c: ldloc.2 - IL_1e5d: mul - IL_1e5e: mul - IL_1e5f: stloc.1 - IL_1e60: br.s IL_1e68 - - IL_1e62: ldloc.2 - IL_1e63: ldloc.1 - IL_1e64: ldloc.2 - IL_1e65: mul - IL_1e66: mul - IL_1e67: stloc.2 - IL_1e68: ldloc.1 - IL_1e69: ldloc.2 - IL_1e6a: ble.s IL_1e74 - - IL_1e6c: ldloc.1 - IL_1e6d: ldloc.1 - IL_1e6e: ldloc.2 - IL_1e6f: sub - IL_1e70: mul - IL_1e71: stloc.1 - IL_1e72: br.s IL_1e7a - - IL_1e74: ldloc.2 - IL_1e75: ldloc.1 - IL_1e76: ldloc.2 - IL_1e77: sub - IL_1e78: sub - IL_1e79: stloc.2 - IL_1e7a: ldloc.1 - IL_1e7b: ldloc.2 - IL_1e7c: blt.s IL_1e86 - - IL_1e7e: ldloc.1 - IL_1e7f: ldloc.1 - IL_1e80: ldloc.2 - IL_1e81: add - IL_1e82: add - IL_1e83: stloc.1 - IL_1e84: br.s IL_1e8c - - IL_1e86: ldloc.2 - IL_1e87: ldloc.1 - IL_1e88: ldloc.2 - IL_1e89: add - IL_1e8a: mul - IL_1e8b: stloc.2 - IL_1e8c: ldloc.1 - IL_1e8d: ldloc.2 - IL_1e8e: bgt.s IL_1e98 - - IL_1e90: ldloc.1 - IL_1e91: ldloc.1 - IL_1e92: ldloc.2 - IL_1e93: sub - IL_1e94: sub - IL_1e95: stloc.1 - IL_1e96: br.s IL_1e9e - - IL_1e98: ldloc.2 - IL_1e99: ldloc.1 - IL_1e9a: ldloc.2 - IL_1e9b: sub - IL_1e9c: mul - IL_1e9d: stloc.2 - IL_1e9e: ldloc.1 - IL_1e9f: ldloc.2 - IL_1ea0: beq.s IL_1eaa - - IL_1ea2: ldloc.1 - IL_1ea3: ldloc.1 - IL_1ea4: ldloc.2 - IL_1ea5: add - IL_1ea6: sub - IL_1ea7: stloc.1 - IL_1ea8: br.s IL_1eb0 - - IL_1eaa: ldloc.2 - IL_1eab: ldloc.1 - IL_1eac: ldloc.2 - IL_1ead: add - IL_1eae: sub - IL_1eaf: stloc.2 - IL_1eb0: ldloc.1 - IL_1eb1: ldloc.2 - IL_1eb2: bge.s IL_1ebc - - IL_1eb4: ldloc.1 - IL_1eb5: ldloc.1 - IL_1eb6: ldloc.2 - IL_1eb7: add - IL_1eb8: mul - IL_1eb9: stloc.1 - IL_1eba: br.s IL_1ec2 - - IL_1ebc: ldloc.2 - IL_1ebd: ldloc.1 - IL_1ebe: ldloc.2 - IL_1ebf: add - IL_1ec0: sub - IL_1ec1: stloc.2 - IL_1ec2: ldloc.1 - IL_1ec3: ldloc.2 - IL_1ec4: beq.s IL_1ece - - IL_1ec6: ldloc.1 - IL_1ec7: ldloc.1 - IL_1ec8: ldloc.2 - IL_1ec9: sub - IL_1eca: add - IL_1ecb: stloc.1 - IL_1ecc: br.s IL_1ed4 - - IL_1ece: ldloc.2 - IL_1ecf: ldloc.1 - IL_1ed0: ldloc.2 - IL_1ed1: sub - IL_1ed2: add - IL_1ed3: stloc.2 - IL_1ed4: ldloc.1 - IL_1ed5: ldloc.2 - IL_1ed6: bne.un.s IL_1ee0 - - IL_1ed8: ldloc.1 - IL_1ed9: ldloc.1 - IL_1eda: ldloc.2 - IL_1edb: sub - IL_1edc: sub - IL_1edd: stloc.1 - IL_1ede: br.s IL_1ee6 - - IL_1ee0: ldloc.2 - IL_1ee1: ldloc.1 - IL_1ee2: ldloc.2 - IL_1ee3: sub - IL_1ee4: mul - IL_1ee5: stloc.2 - IL_1ee6: ldloc.1 - IL_1ee7: ldloc.2 - IL_1ee8: bne.un.s IL_1ef2 - - IL_1eea: ldloc.1 - IL_1eeb: ldloc.1 - IL_1eec: ldloc.2 - IL_1eed: add - IL_1eee: mul - IL_1eef: stloc.1 - IL_1ef0: br.s IL_1ef8 - - IL_1ef2: ldloc.2 - IL_1ef3: ldloc.1 - IL_1ef4: ldloc.2 - IL_1ef5: add - IL_1ef6: add - IL_1ef7: stloc.2 - IL_1ef8: ldloc.1 - IL_1ef9: ldloc.2 - IL_1efa: ble.s IL_1f04 - - IL_1efc: ldloc.1 - IL_1efd: ldloc.1 - IL_1efe: ldloc.2 - IL_1eff: mul - IL_1f00: mul - IL_1f01: stloc.1 - IL_1f02: br.s IL_1f0a - - IL_1f04: ldloc.2 - IL_1f05: ldloc.1 - IL_1f06: ldloc.2 - IL_1f07: mul - IL_1f08: mul - IL_1f09: stloc.2 - IL_1f0a: ldloc.1 - IL_1f0b: ldloc.2 - IL_1f0c: bgt.s IL_1f16 - - IL_1f0e: ldloc.1 - IL_1f0f: ldloc.1 - IL_1f10: ldloc.2 - IL_1f11: mul - IL_1f12: add - IL_1f13: stloc.1 - IL_1f14: br.s IL_1f1c - - IL_1f16: ldloc.2 - IL_1f17: ldloc.1 - IL_1f18: ldloc.2 - IL_1f19: mul - IL_1f1a: sub - IL_1f1b: stloc.2 - IL_1f1c: ldloc.1 - IL_1f1d: ldloc.2 - IL_1f1e: ble.s IL_1f28 - - IL_1f20: ldloc.1 - IL_1f21: ldloc.1 - IL_1f22: ldloc.2 - IL_1f23: mul - IL_1f24: sub - IL_1f25: stloc.1 - IL_1f26: br.s IL_1f2e - - IL_1f28: ldloc.2 - IL_1f29: ldloc.1 - IL_1f2a: ldloc.2 - IL_1f2b: mul - IL_1f2c: add - IL_1f2d: stloc.2 - IL_1f2e: ldloc.1 - IL_1f2f: ldloc.2 - IL_1f30: bge.s IL_1f3a - - IL_1f32: ldloc.1 - IL_1f33: ldloc.1 - IL_1f34: ldloc.2 - IL_1f35: sub - IL_1f36: sub - IL_1f37: stloc.1 - IL_1f38: br.s IL_1f40 - - IL_1f3a: ldloc.2 - IL_1f3b: ldloc.1 - IL_1f3c: ldloc.2 - IL_1f3d: sub - IL_1f3e: sub - IL_1f3f: stloc.2 - IL_1f40: ldloc.1 - IL_1f41: ldloc.2 - IL_1f42: beq.s IL_1f4c - - IL_1f44: ldloc.1 - IL_1f45: ldloc.1 - IL_1f46: ldloc.2 - IL_1f47: sub - IL_1f48: sub - IL_1f49: stloc.1 - IL_1f4a: br.s IL_1f52 - - IL_1f4c: ldloc.2 - IL_1f4d: ldloc.1 - IL_1f4e: ldloc.2 - IL_1f4f: sub - IL_1f50: mul - IL_1f51: stloc.2 - IL_1f52: ldloc.1 - IL_1f53: ldloc.2 - IL_1f54: blt.s IL_1f5e - - IL_1f56: ldloc.1 - IL_1f57: ldloc.1 - IL_1f58: ldloc.2 - IL_1f59: mul - IL_1f5a: sub - IL_1f5b: stloc.1 - IL_1f5c: br.s IL_1f64 - - IL_1f5e: ldloc.2 - IL_1f5f: ldloc.1 - IL_1f60: ldloc.2 - IL_1f61: mul - IL_1f62: mul - IL_1f63: stloc.2 - IL_1f64: ldloc.1 - IL_1f65: ldloc.2 - IL_1f66: bne.un.s IL_1f70 - - IL_1f68: ldloc.1 - IL_1f69: ldloc.1 - IL_1f6a: ldloc.2 - IL_1f6b: mul - IL_1f6c: add - IL_1f6d: stloc.1 - IL_1f6e: br.s IL_1f76 - - IL_1f70: ldloc.2 - IL_1f71: ldloc.1 - IL_1f72: ldloc.2 - IL_1f73: mul - IL_1f74: mul - IL_1f75: stloc.2 - IL_1f76: ldloc.1 - IL_1f77: ldloc.2 - IL_1f78: bge.s IL_1f82 - - IL_1f7a: ldloc.1 - IL_1f7b: ldloc.1 - IL_1f7c: ldloc.2 - IL_1f7d: mul - IL_1f7e: sub - IL_1f7f: stloc.1 - IL_1f80: br.s IL_1f88 - - IL_1f82: ldloc.2 - IL_1f83: ldloc.1 - IL_1f84: ldloc.2 - IL_1f85: mul - IL_1f86: sub - IL_1f87: stloc.2 - IL_1f88: ldloc.1 - IL_1f89: ldloc.2 - IL_1f8a: bge.s IL_1f94 - - IL_1f8c: ldloc.1 - IL_1f8d: ldloc.1 - IL_1f8e: ldloc.2 - IL_1f8f: mul - IL_1f90: sub - IL_1f91: stloc.1 - IL_1f92: br.s IL_1f9a - - IL_1f94: ldloc.2 - IL_1f95: ldloc.1 - IL_1f96: ldloc.2 - IL_1f97: mul - IL_1f98: sub - IL_1f99: stloc.2 - IL_1f9a: ldloc.1 - IL_1f9b: ldloc.2 - IL_1f9c: beq.s IL_1fa6 - - IL_1f9e: ldloc.1 - IL_1f9f: ldloc.1 - IL_1fa0: ldloc.2 - IL_1fa1: mul - IL_1fa2: mul - IL_1fa3: stloc.1 - IL_1fa4: br.s IL_1fac - - IL_1fa6: ldloc.2 - IL_1fa7: ldloc.1 - IL_1fa8: ldloc.2 - IL_1fa9: mul - IL_1faa: sub - IL_1fab: stloc.2 - IL_1fac: ldloc.1 - IL_1fad: ldloc.2 - IL_1fae: bgt.s IL_1fb8 - - IL_1fb0: ldloc.1 - IL_1fb1: ldloc.1 - IL_1fb2: ldloc.2 - IL_1fb3: sub - IL_1fb4: sub - IL_1fb5: stloc.1 - IL_1fb6: br.s IL_1fbe - - IL_1fb8: ldloc.2 - IL_1fb9: ldloc.1 - IL_1fba: ldloc.2 - IL_1fbb: sub - IL_1fbc: add - IL_1fbd: stloc.2 - IL_1fbe: ldloc.1 - IL_1fbf: ldloc.2 - IL_1fc0: beq.s IL_1fca - - IL_1fc2: ldloc.1 - IL_1fc3: ldloc.1 - IL_1fc4: ldloc.2 - IL_1fc5: add - IL_1fc6: add - IL_1fc7: stloc.1 - IL_1fc8: br.s IL_1fd0 - - IL_1fca: ldloc.2 - IL_1fcb: ldloc.1 - IL_1fcc: ldloc.2 - IL_1fcd: add - IL_1fce: add - IL_1fcf: stloc.2 - IL_1fd0: ldloc.1 - IL_1fd1: ldloc.2 - IL_1fd2: beq.s IL_1fdc - - IL_1fd4: ldloc.1 - IL_1fd5: ldloc.1 - IL_1fd6: ldloc.2 - IL_1fd7: sub - IL_1fd8: sub - IL_1fd9: stloc.1 - IL_1fda: br.s IL_1fe2 - - IL_1fdc: ldloc.2 - IL_1fdd: ldloc.1 - IL_1fde: ldloc.2 - IL_1fdf: sub - IL_1fe0: sub - IL_1fe1: stloc.2 - IL_1fe2: ldloc.1 - IL_1fe3: ldloc.2 - IL_1fe4: beq.s IL_1fee - - IL_1fe6: ldloc.1 - IL_1fe7: ldloc.1 - IL_1fe8: ldloc.2 - IL_1fe9: sub - IL_1fea: mul - IL_1feb: stloc.1 - IL_1fec: br.s IL_1ff4 - - IL_1fee: ldloc.2 - IL_1fef: ldloc.1 - IL_1ff0: ldloc.2 - IL_1ff1: sub - IL_1ff2: mul - IL_1ff3: stloc.2 - IL_1ff4: ldloc.1 - IL_1ff5: ldloc.2 - IL_1ff6: beq.s IL_2000 - - IL_1ff8: ldloc.1 - IL_1ff9: ldloc.1 - IL_1ffa: ldloc.2 - IL_1ffb: sub - IL_1ffc: mul - IL_1ffd: stloc.1 - IL_1ffe: br.s IL_2006 - - IL_2000: ldloc.2 - IL_2001: ldloc.1 - IL_2002: ldloc.2 - IL_2003: sub - IL_2004: mul - IL_2005: stloc.2 - IL_2006: ldloc.1 - IL_2007: ldloc.2 - IL_2008: blt.s IL_2012 - - IL_200a: ldloc.1 - IL_200b: ldloc.1 - IL_200c: ldloc.2 - IL_200d: sub - IL_200e: sub - IL_200f: stloc.1 - IL_2010: br.s IL_2018 - - IL_2012: ldloc.2 - IL_2013: ldloc.1 - IL_2014: ldloc.2 - IL_2015: sub - IL_2016: sub - IL_2017: stloc.2 - IL_2018: ldloc.1 - IL_2019: ldloc.2 - IL_201a: beq.s IL_2024 - - IL_201c: ldloc.1 - IL_201d: ldloc.1 - IL_201e: ldloc.2 - IL_201f: sub - IL_2020: add - IL_2021: stloc.1 - IL_2022: br.s IL_202a - - IL_2024: ldloc.2 - IL_2025: ldloc.1 - IL_2026: ldloc.2 - IL_2027: sub - IL_2028: sub - IL_2029: stloc.2 - IL_202a: ldloc.1 - IL_202b: ldloc.2 - IL_202c: ble.s IL_2036 - - IL_202e: ldloc.1 - IL_202f: ldloc.1 - IL_2030: ldloc.2 - IL_2031: add - IL_2032: mul - IL_2033: stloc.1 - IL_2034: br.s IL_203c - - IL_2036: ldloc.2 - IL_2037: ldloc.1 - IL_2038: ldloc.2 - IL_2039: add - IL_203a: sub - IL_203b: stloc.2 - IL_203c: ldloc.1 - IL_203d: ldloc.2 - IL_203e: bne.un.s IL_2048 - - IL_2040: ldloc.1 - IL_2041: ldloc.1 - IL_2042: ldloc.2 - IL_2043: mul - IL_2044: mul - IL_2045: stloc.1 - IL_2046: br.s IL_204e - - IL_2048: ldloc.2 - IL_2049: ldloc.1 - IL_204a: ldloc.2 - IL_204b: mul - IL_204c: mul - IL_204d: stloc.2 - IL_204e: ldloc.1 - IL_204f: ldloc.2 - IL_2050: bge.s IL_205a - - IL_2052: ldloc.1 - IL_2053: ldloc.1 - IL_2054: ldloc.2 - IL_2055: sub - IL_2056: sub - IL_2057: stloc.1 - IL_2058: br.s IL_2060 - - IL_205a: ldloc.2 - IL_205b: ldloc.1 - IL_205c: ldloc.2 - IL_205d: sub - IL_205e: add - IL_205f: stloc.2 - IL_2060: ldloc.1 - IL_2061: ldloc.2 - IL_2062: bne.un.s IL_206c - - IL_2064: ldloc.1 - IL_2065: ldloc.1 - IL_2066: ldloc.2 - IL_2067: mul - IL_2068: mul - IL_2069: stloc.1 - IL_206a: br.s IL_2072 - - IL_206c: ldloc.2 - IL_206d: ldloc.1 - IL_206e: ldloc.2 - IL_206f: mul - IL_2070: add - IL_2071: stloc.2 - IL_2072: ldloc.1 - IL_2073: ldloc.2 - IL_2074: beq.s IL_207e - - IL_2076: ldloc.1 - IL_2077: ldloc.1 - IL_2078: ldloc.2 - IL_2079: sub - IL_207a: add - IL_207b: stloc.1 - IL_207c: br.s IL_2084 - - IL_207e: ldloc.2 - IL_207f: ldloc.1 - IL_2080: ldloc.2 - IL_2081: sub - IL_2082: mul - IL_2083: stloc.2 - IL_2084: ldloc.1 - IL_2085: ldloc.2 - IL_2086: beq.s IL_2090 - - IL_2088: ldloc.1 - IL_2089: ldloc.1 - IL_208a: ldloc.2 - IL_208b: add - IL_208c: mul - IL_208d: stloc.1 - IL_208e: br.s IL_2096 - - IL_2090: ldloc.2 - IL_2091: ldloc.1 - IL_2092: ldloc.2 - IL_2093: add - IL_2094: mul - IL_2095: stloc.2 - IL_2096: ldloc.1 - IL_2097: ldloc.2 - IL_2098: beq.s IL_20a2 - - IL_209a: ldloc.1 - IL_209b: ldloc.1 - IL_209c: ldloc.2 - IL_209d: add - IL_209e: add - IL_209f: stloc.1 - IL_20a0: br.s IL_20a8 - - IL_20a2: ldloc.2 - IL_20a3: ldloc.1 - IL_20a4: ldloc.2 - IL_20a5: add - IL_20a6: sub - IL_20a7: stloc.2 - IL_20a8: ldloc.1 - IL_20a9: ldloc.2 - IL_20aa: beq.s IL_20b4 - - IL_20ac: ldloc.1 - IL_20ad: ldloc.1 - IL_20ae: ldloc.2 - IL_20af: mul - IL_20b0: sub - IL_20b1: stloc.1 - IL_20b2: br.s IL_20ba - - IL_20b4: ldloc.2 - IL_20b5: ldloc.1 - IL_20b6: ldloc.2 - IL_20b7: mul - IL_20b8: sub - IL_20b9: stloc.2 - IL_20ba: ldloc.1 - IL_20bb: ldloc.2 - IL_20bc: bgt.s IL_20c6 - - IL_20be: ldloc.1 - IL_20bf: ldloc.1 - IL_20c0: ldloc.2 - IL_20c1: add - IL_20c2: mul - IL_20c3: stloc.1 - IL_20c4: br.s IL_20cc - - IL_20c6: ldloc.2 - IL_20c7: ldloc.1 - IL_20c8: ldloc.2 - IL_20c9: add - IL_20ca: add - IL_20cb: stloc.2 - IL_20cc: ldloc.1 - IL_20cd: ldloc.2 - IL_20ce: beq.s IL_20d8 - - IL_20d0: ldloc.1 - IL_20d1: ldloc.1 - IL_20d2: ldloc.2 - IL_20d3: add - IL_20d4: sub - IL_20d5: stloc.1 - IL_20d6: br.s IL_20de - - IL_20d8: ldloc.2 - IL_20d9: ldloc.1 - IL_20da: ldloc.2 - IL_20db: add - IL_20dc: sub - IL_20dd: stloc.2 - IL_20de: ldloc.1 - IL_20df: ldloc.2 - IL_20e0: bne.un.s IL_20ea - - IL_20e2: ldloc.1 - IL_20e3: ldloc.1 - IL_20e4: ldloc.2 - IL_20e5: sub - IL_20e6: add - IL_20e7: stloc.1 - IL_20e8: br.s IL_20f0 - - IL_20ea: ldloc.2 - IL_20eb: ldloc.1 - IL_20ec: ldloc.2 - IL_20ed: sub - IL_20ee: add - IL_20ef: stloc.2 - IL_20f0: ldloc.1 - IL_20f1: ldloc.2 - IL_20f2: bgt.s IL_20fc - - IL_20f4: ldloc.1 - IL_20f5: ldloc.1 - IL_20f6: ldloc.2 - IL_20f7: sub - IL_20f8: sub - IL_20f9: stloc.1 - IL_20fa: br.s IL_2102 - - IL_20fc: ldloc.2 - IL_20fd: ldloc.1 - IL_20fe: ldloc.2 - IL_20ff: sub - IL_2100: mul - IL_2101: stloc.2 - IL_2102: ldloc.1 - IL_2103: ldloc.2 - IL_2104: blt.s IL_210e - - IL_2106: ldloc.1 - IL_2107: ldloc.1 - IL_2108: ldloc.2 - IL_2109: mul - IL_210a: mul - IL_210b: stloc.1 - IL_210c: br.s IL_2114 - - IL_210e: ldloc.2 - IL_210f: ldloc.1 - IL_2110: ldloc.2 - IL_2111: mul - IL_2112: mul - IL_2113: stloc.2 - IL_2114: ldloc.1 - IL_2115: ldloc.2 - IL_2116: blt.s IL_2120 - - IL_2118: ldloc.1 - IL_2119: ldloc.1 - IL_211a: ldloc.2 - IL_211b: add - IL_211c: add - IL_211d: stloc.1 - IL_211e: br.s IL_2126 - - IL_2120: ldloc.2 - IL_2121: ldloc.1 - IL_2122: ldloc.2 - IL_2123: add - IL_2124: mul - IL_2125: stloc.2 - IL_2126: ldloc.1 - IL_2127: ldloc.2 - IL_2128: bne.un.s IL_2132 - - IL_212a: ldloc.1 - IL_212b: ldloc.1 - IL_212c: ldloc.2 - IL_212d: mul - IL_212e: sub - IL_212f: stloc.1 - IL_2130: br.s IL_2138 - - IL_2132: ldloc.2 - IL_2133: ldloc.1 - IL_2134: ldloc.2 - IL_2135: mul - IL_2136: add - IL_2137: stloc.2 - IL_2138: ldloc.1 - IL_2139: ldloc.2 - IL_213a: blt.s IL_2144 - - IL_213c: ldloc.1 - IL_213d: ldloc.1 - IL_213e: ldloc.2 - IL_213f: sub - IL_2140: mul - IL_2141: stloc.1 - IL_2142: br.s IL_214a - - IL_2144: ldloc.2 - IL_2145: ldloc.1 - IL_2146: ldloc.2 - IL_2147: sub - IL_2148: mul - IL_2149: stloc.2 - IL_214a: ldloc.1 - IL_214b: ldloc.2 - IL_214c: ble.s IL_2156 - - IL_214e: ldloc.1 - IL_214f: ldloc.1 - IL_2150: ldloc.2 - IL_2151: add - IL_2152: sub - IL_2153: stloc.1 - IL_2154: br.s IL_215c - - IL_2156: ldloc.2 - IL_2157: ldloc.1 - IL_2158: ldloc.2 - IL_2159: add - IL_215a: mul - IL_215b: stloc.2 - IL_215c: ldloc.1 - IL_215d: ldloc.2 - IL_215e: bne.un.s IL_2168 - - IL_2160: ldloc.1 - IL_2161: ldloc.1 - IL_2162: ldloc.2 - IL_2163: sub - IL_2164: mul - IL_2165: stloc.1 - IL_2166: br.s IL_216e - - IL_2168: ldloc.2 - IL_2169: ldloc.1 - IL_216a: ldloc.2 - IL_216b: sub - IL_216c: mul - IL_216d: stloc.2 - IL_216e: ldloc.1 - IL_216f: ldloc.2 - IL_2170: bgt.s IL_217a - - IL_2172: ldloc.1 - IL_2173: ldloc.1 - IL_2174: ldloc.2 - IL_2175: mul - IL_2176: mul - IL_2177: stloc.1 - IL_2178: br.s IL_2180 - - IL_217a: ldloc.2 - IL_217b: ldloc.1 - IL_217c: ldloc.2 - IL_217d: mul - IL_217e: mul - IL_217f: stloc.2 - IL_2180: ldloc.1 - IL_2181: ldloc.2 - IL_2182: bne.un.s IL_218c - - IL_2184: ldloc.1 - IL_2185: ldloc.1 - IL_2186: ldloc.2 - IL_2187: sub - IL_2188: sub - IL_2189: stloc.1 - IL_218a: br.s IL_2192 - - IL_218c: ldloc.2 - IL_218d: ldloc.1 - IL_218e: ldloc.2 - IL_218f: sub - IL_2190: sub - IL_2191: stloc.2 - IL_2192: ldloc.1 - IL_2193: ldloc.2 - IL_2194: bge.s IL_219e - - IL_2196: ldloc.1 - IL_2197: ldloc.1 - IL_2198: ldloc.2 - IL_2199: add - IL_219a: mul - IL_219b: stloc.1 - IL_219c: br.s IL_21a4 - - IL_219e: ldloc.2 - IL_219f: ldloc.1 - IL_21a0: ldloc.2 - IL_21a1: add - IL_21a2: mul - IL_21a3: stloc.2 - IL_21a4: ldloc.1 - IL_21a5: ldloc.2 - IL_21a6: beq.s IL_21b0 - - IL_21a8: ldloc.1 - IL_21a9: ldloc.1 - IL_21aa: ldloc.2 - IL_21ab: sub - IL_21ac: sub - IL_21ad: stloc.1 - IL_21ae: br.s IL_21b6 - - IL_21b0: ldloc.2 - IL_21b1: ldloc.1 - IL_21b2: ldloc.2 - IL_21b3: sub - IL_21b4: sub - IL_21b5: stloc.2 - IL_21b6: ldloc.1 - IL_21b7: ldloc.2 - IL_21b8: ble.s IL_21c2 - - IL_21ba: ldloc.1 - IL_21bb: ldloc.1 - IL_21bc: ldloc.2 - IL_21bd: sub - IL_21be: mul - IL_21bf: stloc.1 - IL_21c0: br.s IL_21c8 - - IL_21c2: ldloc.2 - IL_21c3: ldloc.1 - IL_21c4: ldloc.2 - IL_21c5: sub - IL_21c6: sub - IL_21c7: stloc.2 - IL_21c8: ldloc.1 - IL_21c9: ldloc.2 - IL_21ca: bge.s IL_21d4 - - IL_21cc: ldloc.1 - IL_21cd: ldloc.1 - IL_21ce: ldloc.2 - IL_21cf: mul - IL_21d0: mul - IL_21d1: stloc.1 - IL_21d2: br.s IL_21da - - IL_21d4: ldloc.2 - IL_21d5: ldloc.1 - IL_21d6: ldloc.2 - IL_21d7: mul - IL_21d8: sub - IL_21d9: stloc.2 - IL_21da: ldloc.1 - IL_21db: ldloc.2 - IL_21dc: blt.s IL_21e6 - - IL_21de: ldloc.1 - IL_21df: ldloc.1 - IL_21e0: ldloc.2 - IL_21e1: add - IL_21e2: mul - IL_21e3: stloc.1 - IL_21e4: br.s IL_21ec - - IL_21e6: ldloc.2 - IL_21e7: ldloc.1 - IL_21e8: ldloc.2 - IL_21e9: add - IL_21ea: sub - IL_21eb: stloc.2 - IL_21ec: ldloc.1 - IL_21ed: ldloc.2 - IL_21ee: bgt.s IL_21f8 - - IL_21f0: ldloc.1 - IL_21f1: ldloc.1 - IL_21f2: ldloc.2 - IL_21f3: sub - IL_21f4: mul - IL_21f5: stloc.1 - IL_21f6: br.s IL_21fe - - IL_21f8: ldloc.2 - IL_21f9: ldloc.1 - IL_21fa: ldloc.2 - IL_21fb: sub - IL_21fc: mul - IL_21fd: stloc.2 - IL_21fe: ldloc.1 - IL_21ff: ldloc.2 - IL_2200: ble.s IL_220a - - IL_2202: ldloc.1 - IL_2203: ldloc.1 - IL_2204: ldloc.2 - IL_2205: sub - IL_2206: sub - IL_2207: stloc.1 - IL_2208: br.s IL_2210 - - IL_220a: ldloc.2 - IL_220b: ldloc.1 - IL_220c: ldloc.2 - IL_220d: sub - IL_220e: add - IL_220f: stloc.2 - IL_2210: ldloc.1 - IL_2211: ldloc.2 - IL_2212: ble.s IL_221c - - IL_2214: ldloc.1 - IL_2215: ldloc.1 - IL_2216: ldloc.2 - IL_2217: add - IL_2218: mul - IL_2219: stloc.1 - IL_221a: br.s IL_2222 - - IL_221c: ldloc.2 - IL_221d: ldloc.1 - IL_221e: ldloc.2 - IL_221f: add - IL_2220: sub - IL_2221: stloc.2 - IL_2222: ldloc.1 - IL_2223: ldloc.2 - IL_2224: beq.s IL_222e - - IL_2226: ldloc.1 - IL_2227: ldloc.1 - IL_2228: ldloc.2 - IL_2229: sub - IL_222a: mul - IL_222b: stloc.1 - IL_222c: br.s IL_2234 - - IL_222e: ldloc.2 - IL_222f: ldloc.1 - IL_2230: ldloc.2 - IL_2231: sub - IL_2232: sub - IL_2233: stloc.2 - IL_2234: ldloc.1 - IL_2235: ldloc.2 - IL_2236: ble.s IL_2240 - - IL_2238: ldloc.1 - IL_2239: ldloc.1 - IL_223a: ldloc.2 - IL_223b: sub - IL_223c: sub - IL_223d: stloc.1 - IL_223e: br.s IL_2246 - - IL_2240: ldloc.2 - IL_2241: ldloc.1 - IL_2242: ldloc.2 - IL_2243: sub - IL_2244: mul - IL_2245: stloc.2 - IL_2246: ldloc.1 - IL_2247: ldloc.2 - IL_2248: ble.s IL_2252 - - IL_224a: ldloc.1 - IL_224b: ldloc.1 - IL_224c: ldloc.2 - IL_224d: mul - IL_224e: add - IL_224f: stloc.1 - IL_2250: br.s IL_2258 - - IL_2252: ldloc.2 - IL_2253: ldloc.1 - IL_2254: ldloc.2 - IL_2255: mul - IL_2256: add - IL_2257: stloc.2 - IL_2258: ldloc.1 - IL_2259: ldloc.2 - IL_225a: bge.s IL_2264 - - IL_225c: ldloc.1 - IL_225d: ldloc.1 - IL_225e: ldloc.2 - IL_225f: mul - IL_2260: sub - IL_2261: stloc.1 - IL_2262: br.s IL_226a - - IL_2264: ldloc.2 - IL_2265: ldloc.1 - IL_2266: ldloc.2 - IL_2267: mul - IL_2268: add - IL_2269: stloc.2 - IL_226a: ldloc.1 - IL_226b: ldloc.2 - IL_226c: bge.s IL_2276 - - IL_226e: ldloc.1 - IL_226f: ldloc.1 - IL_2270: ldloc.2 - IL_2271: mul - IL_2272: mul - IL_2273: stloc.1 - IL_2274: br.s IL_227c - - IL_2276: ldloc.2 - IL_2277: ldloc.1 - IL_2278: ldloc.2 - IL_2279: mul - IL_227a: sub - IL_227b: stloc.2 - IL_227c: ldloc.1 - IL_227d: ldloc.2 - IL_227e: bge.s IL_2288 - - IL_2280: ldloc.1 - IL_2281: ldloc.1 - IL_2282: ldloc.2 - IL_2283: sub - IL_2284: add - IL_2285: stloc.1 - IL_2286: br.s IL_228e - - IL_2288: ldloc.2 - IL_2289: ldloc.1 - IL_228a: ldloc.2 - IL_228b: sub - IL_228c: mul - IL_228d: stloc.2 - IL_228e: ldloc.1 - IL_228f: ldloc.2 - IL_2290: bge.s IL_229a - - IL_2292: ldloc.1 - IL_2293: ldloc.1 - IL_2294: ldloc.2 - IL_2295: sub - IL_2296: add - IL_2297: stloc.1 - IL_2298: br.s IL_22a0 - - IL_229a: ldloc.2 - IL_229b: ldloc.1 - IL_229c: ldloc.2 - IL_229d: sub - IL_229e: add - IL_229f: stloc.2 - IL_22a0: ldloc.1 - IL_22a1: ldloc.2 - IL_22a2: blt.s IL_22ac - - IL_22a4: ldloc.1 - IL_22a5: ldloc.1 - IL_22a6: ldloc.2 - IL_22a7: add - IL_22a8: mul - IL_22a9: stloc.1 - IL_22aa: br.s IL_22b2 - - IL_22ac: ldloc.2 - IL_22ad: ldloc.1 - IL_22ae: ldloc.2 - IL_22af: add - IL_22b0: sub - IL_22b1: stloc.2 - IL_22b2: ldloc.1 - IL_22b3: ldloc.2 - IL_22b4: bgt.s IL_22be - - IL_22b6: ldloc.1 - IL_22b7: ldloc.1 - IL_22b8: ldloc.2 - IL_22b9: sub - IL_22ba: sub - IL_22bb: stloc.1 - IL_22bc: br.s IL_22c4 - - IL_22be: ldloc.2 - IL_22bf: ldloc.1 - IL_22c0: ldloc.2 - IL_22c1: sub - IL_22c2: sub - IL_22c3: stloc.2 - IL_22c4: ldloc.1 - IL_22c5: ldloc.2 - IL_22c6: blt.s IL_22d0 - - IL_22c8: ldloc.1 - IL_22c9: ldloc.1 - IL_22ca: ldloc.2 - IL_22cb: mul - IL_22cc: add - IL_22cd: stloc.1 - IL_22ce: br.s IL_22d6 - - IL_22d0: ldloc.2 - IL_22d1: ldloc.1 - IL_22d2: ldloc.2 - IL_22d3: mul - IL_22d4: mul - IL_22d5: stloc.2 - IL_22d6: ldloc.1 - IL_22d7: ldloc.2 - IL_22d8: beq.s IL_22e2 - - IL_22da: ldloc.1 - IL_22db: ldloc.1 - IL_22dc: ldloc.2 - IL_22dd: add - IL_22de: mul - IL_22df: stloc.1 - IL_22e0: br.s IL_22e8 - - IL_22e2: ldloc.2 - IL_22e3: ldloc.1 - IL_22e4: ldloc.2 - IL_22e5: add - IL_22e6: add - IL_22e7: stloc.2 - IL_22e8: ldloc.1 - IL_22e9: ldloc.2 - IL_22ea: bne.un.s IL_22f4 - - IL_22ec: ldloc.1 - IL_22ed: ldloc.1 - IL_22ee: ldloc.2 - IL_22ef: mul - IL_22f0: mul - IL_22f1: stloc.1 - IL_22f2: br.s IL_22fa - - IL_22f4: ldloc.2 - IL_22f5: ldloc.1 - IL_22f6: ldloc.2 - IL_22f7: mul - IL_22f8: add - IL_22f9: stloc.2 - IL_22fa: ldloc.1 - IL_22fb: ldloc.2 - IL_22fc: bge.s IL_2306 - - IL_22fe: ldloc.1 - IL_22ff: ldloc.1 - IL_2300: ldloc.2 - IL_2301: add - IL_2302: sub - IL_2303: stloc.1 - IL_2304: br.s IL_230c - - IL_2306: ldloc.2 - IL_2307: ldloc.1 - IL_2308: ldloc.2 - IL_2309: add - IL_230a: add - IL_230b: stloc.2 - IL_230c: ldloc.1 - IL_230d: ldloc.2 - IL_230e: bge.s IL_2318 - - IL_2310: ldloc.1 - IL_2311: ldloc.1 - IL_2312: ldloc.2 - IL_2313: mul - IL_2314: sub - IL_2315: stloc.1 - IL_2316: br.s IL_231e - - IL_2318: ldloc.2 - IL_2319: ldloc.1 - IL_231a: ldloc.2 - IL_231b: mul - IL_231c: mul - IL_231d: stloc.2 - IL_231e: ldloc.1 - IL_231f: ldloc.2 - IL_2320: beq.s IL_232a - - IL_2322: ldloc.1 - IL_2323: ldloc.1 - IL_2324: ldloc.2 - IL_2325: mul - IL_2326: mul - IL_2327: stloc.1 - IL_2328: br.s IL_2330 - - IL_232a: ldloc.2 - IL_232b: ldloc.1 - IL_232c: ldloc.2 - IL_232d: mul - IL_232e: add - IL_232f: stloc.2 - IL_2330: ldloc.1 - IL_2331: ldloc.2 - IL_2332: bgt.s IL_233c - - IL_2334: ldloc.1 - IL_2335: ldloc.1 - IL_2336: ldloc.2 - IL_2337: add - IL_2338: add - IL_2339: stloc.1 - IL_233a: br.s IL_2342 - - IL_233c: ldloc.2 - IL_233d: ldloc.1 - IL_233e: ldloc.2 - IL_233f: add - IL_2340: add - IL_2341: stloc.2 - IL_2342: ldloc.1 - IL_2343: ldloc.2 - IL_2344: bne.un.s IL_234e - - IL_2346: ldloc.1 - IL_2347: ldloc.1 - IL_2348: ldloc.2 - IL_2349: mul - IL_234a: mul - IL_234b: stloc.1 - IL_234c: br.s IL_2354 - - IL_234e: ldloc.2 - IL_234f: ldloc.1 - IL_2350: ldloc.2 - IL_2351: mul - IL_2352: add - IL_2353: stloc.2 - IL_2354: ldloc.1 - IL_2355: ldloc.2 - IL_2356: beq.s IL_2360 - - IL_2358: ldloc.1 - IL_2359: ldloc.1 - IL_235a: ldloc.2 - IL_235b: mul - IL_235c: mul - IL_235d: stloc.1 - IL_235e: br.s IL_2366 - - IL_2360: ldloc.2 - IL_2361: ldloc.1 - IL_2362: ldloc.2 - IL_2363: mul - IL_2364: sub - IL_2365: stloc.2 - IL_2366: ldloc.1 - IL_2367: ldloc.2 - IL_2368: bge.s IL_2372 - - IL_236a: ldloc.1 - IL_236b: ldloc.1 - IL_236c: ldloc.2 - IL_236d: sub - IL_236e: mul - IL_236f: stloc.1 - IL_2370: br.s IL_2378 - - IL_2372: ldloc.2 - IL_2373: ldloc.1 - IL_2374: ldloc.2 - IL_2375: sub - IL_2376: add - IL_2377: stloc.2 - IL_2378: ldloc.1 - IL_2379: ldloc.2 - IL_237a: beq.s IL_2384 - - IL_237c: ldloc.1 - IL_237d: ldloc.1 - IL_237e: ldloc.2 - IL_237f: add - IL_2380: mul - IL_2381: stloc.1 - IL_2382: br.s IL_238a - - IL_2384: ldloc.2 - IL_2385: ldloc.1 - IL_2386: ldloc.2 - IL_2387: add - IL_2388: mul - IL_2389: stloc.2 - IL_238a: ldloc.1 - IL_238b: ldloc.2 - IL_238c: bne.un.s IL_2396 - - IL_238e: ldloc.1 - IL_238f: ldloc.1 - IL_2390: ldloc.2 - IL_2391: mul - IL_2392: sub - IL_2393: stloc.1 - IL_2394: br.s IL_239c - - IL_2396: ldloc.2 - IL_2397: ldloc.1 - IL_2398: ldloc.2 - IL_2399: mul - IL_239a: add - IL_239b: stloc.2 - IL_239c: ldloc.1 - IL_239d: ldloc.2 - IL_239e: bne.un.s IL_23a8 - - IL_23a0: ldloc.1 - IL_23a1: ldloc.1 - IL_23a2: ldloc.2 - IL_23a3: add - IL_23a4: add - IL_23a5: stloc.1 - IL_23a6: br.s IL_23ae - - IL_23a8: ldloc.2 - IL_23a9: ldloc.1 - IL_23aa: ldloc.2 - IL_23ab: add - IL_23ac: mul - IL_23ad: stloc.2 - IL_23ae: ldloc.1 - IL_23af: ldloc.2 - IL_23b0: blt.s IL_23ba - - IL_23b2: ldloc.1 - IL_23b3: ldloc.1 - IL_23b4: ldloc.2 - IL_23b5: mul - IL_23b6: sub - IL_23b7: stloc.1 - IL_23b8: br.s IL_23c0 - - IL_23ba: ldloc.2 - IL_23bb: ldloc.1 - IL_23bc: ldloc.2 - IL_23bd: mul - IL_23be: sub - IL_23bf: stloc.2 - IL_23c0: ldloc.1 - IL_23c1: ldloc.2 - IL_23c2: ble.s IL_23cc - - IL_23c4: ldloc.1 - IL_23c5: ldloc.1 - IL_23c6: ldloc.2 - IL_23c7: mul - IL_23c8: mul - IL_23c9: stloc.1 - IL_23ca: br.s IL_23d2 - - IL_23cc: ldloc.2 - IL_23cd: ldloc.1 - IL_23ce: ldloc.2 - IL_23cf: mul - IL_23d0: add - IL_23d1: stloc.2 - IL_23d2: ldloc.1 - IL_23d3: ldloc.2 - IL_23d4: bne.un.s IL_23de - - IL_23d6: ldloc.1 - IL_23d7: ldloc.1 - IL_23d8: ldloc.2 - IL_23d9: mul - IL_23da: add - IL_23db: stloc.1 - IL_23dc: br.s IL_23e4 - - IL_23de: ldloc.2 - IL_23df: ldloc.1 - IL_23e0: ldloc.2 - IL_23e1: mul - IL_23e2: sub - IL_23e3: stloc.2 - IL_23e4: ldloc.1 - IL_23e5: ldloc.2 - IL_23e6: bgt.s IL_23f0 - - IL_23e8: ldloc.1 - IL_23e9: ldloc.1 - IL_23ea: ldloc.2 - IL_23eb: sub - IL_23ec: sub - IL_23ed: stloc.1 - IL_23ee: br.s IL_23f6 - - IL_23f0: ldloc.2 - IL_23f1: ldloc.1 - IL_23f2: ldloc.2 - IL_23f3: sub - IL_23f4: mul - IL_23f5: stloc.2 - IL_23f6: ldloc.1 - IL_23f7: ldloc.2 - IL_23f8: ble.s IL_2402 - - IL_23fa: ldloc.1 - IL_23fb: ldloc.1 - IL_23fc: ldloc.2 - IL_23fd: sub - IL_23fe: add - IL_23ff: stloc.1 - IL_2400: br.s IL_2408 - - IL_2402: ldloc.2 - IL_2403: ldloc.1 - IL_2404: ldloc.2 - IL_2405: sub - IL_2406: mul - IL_2407: stloc.2 - IL_2408: ldloc.1 - IL_2409: ldloc.2 - IL_240a: blt.s IL_2414 - - IL_240c: ldloc.1 - IL_240d: ldloc.1 - IL_240e: ldloc.2 - IL_240f: add - IL_2410: sub - IL_2411: stloc.1 - IL_2412: br.s IL_241a - - IL_2414: ldloc.2 - IL_2415: ldloc.1 - IL_2416: ldloc.2 - IL_2417: add - IL_2418: mul - IL_2419: stloc.2 - IL_241a: ldloc.1 - IL_241b: ldloc.2 - IL_241c: bne.un.s IL_2426 - - IL_241e: ldloc.1 - IL_241f: ldloc.1 - IL_2420: ldloc.2 - IL_2421: add - IL_2422: mul - IL_2423: stloc.1 - IL_2424: br.s IL_242c - - IL_2426: ldloc.2 - IL_2427: ldloc.1 - IL_2428: ldloc.2 - IL_2429: add - IL_242a: add - IL_242b: stloc.2 - IL_242c: ldloc.1 - IL_242d: ldloc.2 - IL_242e: beq.s IL_2438 - - IL_2430: ldloc.1 - IL_2431: ldloc.1 - IL_2432: ldloc.2 - IL_2433: sub - IL_2434: add - IL_2435: stloc.1 - IL_2436: br.s IL_243e - - IL_2438: ldloc.2 - IL_2439: ldloc.1 - IL_243a: ldloc.2 - IL_243b: sub - IL_243c: sub - IL_243d: stloc.2 - IL_243e: ldloc.1 - IL_243f: ldloc.2 - IL_2440: beq.s IL_244a - - IL_2442: ldloc.1 - IL_2443: ldloc.1 - IL_2444: ldloc.2 - IL_2445: add - IL_2446: add - IL_2447: stloc.1 - IL_2448: br.s IL_2450 - - IL_244a: ldloc.2 - IL_244b: ldloc.1 - IL_244c: ldloc.2 - IL_244d: add - IL_244e: sub - IL_244f: stloc.2 - IL_2450: ldloc.1 - IL_2451: ldloc.2 - IL_2452: bge.s IL_245c - - IL_2454: ldloc.1 - IL_2455: ldloc.1 - IL_2456: ldloc.2 - IL_2457: sub - IL_2458: mul - IL_2459: stloc.1 - IL_245a: br.s IL_2462 - - IL_245c: ldloc.2 - IL_245d: ldloc.1 - IL_245e: ldloc.2 - IL_245f: sub - IL_2460: mul - IL_2461: stloc.2 - IL_2462: ldloc.1 - IL_2463: ldloc.2 - IL_2464: bgt.s IL_246e - - IL_2466: ldloc.1 - IL_2467: ldloc.1 - IL_2468: ldloc.2 - IL_2469: mul - IL_246a: add - IL_246b: stloc.1 - IL_246c: br.s IL_2474 - - IL_246e: ldloc.2 - IL_246f: ldloc.1 - IL_2470: ldloc.2 - IL_2471: mul - IL_2472: sub - IL_2473: stloc.2 - IL_2474: ldloc.1 - IL_2475: ldloc.2 - IL_2476: bge.s IL_2480 - - IL_2478: ldloc.1 - IL_2479: ldloc.1 - IL_247a: ldloc.2 - IL_247b: sub - IL_247c: add - IL_247d: stloc.1 - IL_247e: br.s IL_2486 - - IL_2480: ldloc.2 - IL_2481: ldloc.1 - IL_2482: ldloc.2 - IL_2483: sub - IL_2484: sub - IL_2485: stloc.2 - IL_2486: ldloc.1 - IL_2487: ldloc.2 - IL_2488: bgt.s IL_2492 - - IL_248a: ldloc.1 - IL_248b: ldloc.1 - IL_248c: ldloc.2 - IL_248d: sub - IL_248e: mul - IL_248f: stloc.1 - IL_2490: br.s IL_2498 - - IL_2492: ldloc.2 - IL_2493: ldloc.1 - IL_2494: ldloc.2 - IL_2495: sub - IL_2496: mul - IL_2497: stloc.2 - IL_2498: ldloc.1 - IL_2499: ldloc.2 - IL_249a: bge.s IL_24a4 - - IL_249c: ldloc.1 - IL_249d: ldloc.1 - IL_249e: ldloc.2 - IL_249f: mul - IL_24a0: sub - IL_24a1: stloc.1 - IL_24a2: br.s IL_24aa - - IL_24a4: ldloc.2 - IL_24a5: ldloc.1 - IL_24a6: ldloc.2 - IL_24a7: mul - IL_24a8: mul - IL_24a9: stloc.2 - IL_24aa: ldloc.1 - IL_24ab: ldloc.2 - IL_24ac: bne.un.s IL_24b6 - - IL_24ae: ldloc.1 - IL_24af: ldloc.1 - IL_24b0: ldloc.2 - IL_24b1: add - IL_24b2: sub - IL_24b3: stloc.1 - IL_24b4: br.s IL_24bc - - IL_24b6: ldloc.2 - IL_24b7: ldloc.1 - IL_24b8: ldloc.2 - IL_24b9: add - IL_24ba: mul - IL_24bb: stloc.2 - IL_24bc: ldloc.1 - IL_24bd: ldloc.2 - IL_24be: bgt.s IL_24c8 - - IL_24c0: ldloc.1 - IL_24c1: ldloc.1 - IL_24c2: ldloc.2 - IL_24c3: sub - IL_24c4: add - IL_24c5: stloc.1 - IL_24c6: br.s IL_24ce - - IL_24c8: ldloc.2 - IL_24c9: ldloc.1 - IL_24ca: ldloc.2 - IL_24cb: sub - IL_24cc: mul - IL_24cd: stloc.2 - IL_24ce: ldloc.1 - IL_24cf: ldloc.2 - IL_24d0: bne.un.s IL_24da - - IL_24d2: ldloc.1 - IL_24d3: ldloc.1 - IL_24d4: ldloc.2 - IL_24d5: sub - IL_24d6: mul - IL_24d7: stloc.1 - IL_24d8: br.s IL_24e0 - - IL_24da: ldloc.2 - IL_24db: ldloc.1 - IL_24dc: ldloc.2 - IL_24dd: sub - IL_24de: mul - IL_24df: stloc.2 - IL_24e0: ldloc.1 - IL_24e1: ldloc.2 - IL_24e2: beq.s IL_24ec - - IL_24e4: ldloc.1 - IL_24e5: ldloc.1 - IL_24e6: ldloc.2 - IL_24e7: sub - IL_24e8: sub - IL_24e9: stloc.1 - IL_24ea: br.s IL_24f2 - - IL_24ec: ldloc.2 - IL_24ed: ldloc.1 - IL_24ee: ldloc.2 - IL_24ef: sub - IL_24f0: add - IL_24f1: stloc.2 - IL_24f2: ldloc.1 - IL_24f3: ldloc.2 - IL_24f4: blt.s IL_24fe - - IL_24f6: ldloc.1 - IL_24f7: ldloc.1 - IL_24f8: ldloc.2 - IL_24f9: add - IL_24fa: sub - IL_24fb: stloc.1 - IL_24fc: br.s IL_2504 - - IL_24fe: ldloc.2 - IL_24ff: ldloc.1 - IL_2500: ldloc.2 - IL_2501: add - IL_2502: mul - IL_2503: stloc.2 - IL_2504: ldloc.1 - IL_2505: ldloc.2 - IL_2506: ble.s IL_2510 - - IL_2508: ldloc.1 - IL_2509: ldloc.1 - IL_250a: ldloc.2 - IL_250b: mul - IL_250c: add - IL_250d: stloc.1 - IL_250e: br.s IL_2516 - - IL_2510: ldloc.2 - IL_2511: ldloc.1 - IL_2512: ldloc.2 - IL_2513: mul - IL_2514: mul - IL_2515: stloc.2 - IL_2516: ldloc.1 - IL_2517: ldloc.2 - IL_2518: bge.s IL_2522 - - IL_251a: ldloc.1 - IL_251b: ldloc.1 - IL_251c: ldloc.2 - IL_251d: mul - IL_251e: mul - IL_251f: stloc.1 - IL_2520: br.s IL_2528 - - IL_2522: ldloc.2 - IL_2523: ldloc.1 - IL_2524: ldloc.2 - IL_2525: mul - IL_2526: sub - IL_2527: stloc.2 - IL_2528: ldloc.1 - IL_2529: ldloc.2 - IL_252a: blt.s IL_2534 - - IL_252c: ldloc.1 - IL_252d: ldloc.1 - IL_252e: ldloc.2 - IL_252f: sub - IL_2530: mul - IL_2531: stloc.1 - IL_2532: br.s IL_253a - - IL_2534: ldloc.2 - IL_2535: ldloc.1 - IL_2536: ldloc.2 - IL_2537: sub - IL_2538: add - IL_2539: stloc.2 - IL_253a: ldloc.1 - IL_253b: ldloc.2 - IL_253c: bge.s IL_2546 - - IL_253e: ldloc.1 - IL_253f: ldloc.1 - IL_2540: ldloc.2 - IL_2541: mul - IL_2542: sub - IL_2543: stloc.1 - IL_2544: br.s IL_254c - - IL_2546: ldloc.2 - IL_2547: ldloc.1 - IL_2548: ldloc.2 - IL_2549: mul - IL_254a: sub - IL_254b: stloc.2 - IL_254c: ldloc.1 - IL_254d: ldloc.2 - IL_254e: bne.un.s IL_2558 - - IL_2550: ldloc.1 - IL_2551: ldloc.1 - IL_2552: ldloc.2 - IL_2553: sub - IL_2554: sub - IL_2555: stloc.1 - IL_2556: br.s IL_255e - - IL_2558: ldloc.2 - IL_2559: ldloc.1 - IL_255a: ldloc.2 - IL_255b: sub - IL_255c: mul - IL_255d: stloc.2 - IL_255e: ldloc.1 - IL_255f: ldloc.2 - IL_2560: bge.s IL_256a - - IL_2562: ldloc.1 - IL_2563: ldloc.1 - IL_2564: ldloc.2 - IL_2565: add - IL_2566: mul - IL_2567: stloc.1 - IL_2568: br.s IL_2570 - - IL_256a: ldloc.2 - IL_256b: ldloc.1 - IL_256c: ldloc.2 - IL_256d: add - IL_256e: add - IL_256f: stloc.2 - IL_2570: ldloc.1 - IL_2571: ldloc.2 - IL_2572: ble.s IL_257c - - IL_2574: ldloc.1 - IL_2575: ldloc.1 - IL_2576: ldloc.2 - IL_2577: mul - IL_2578: add - IL_2579: stloc.1 - IL_257a: br.s IL_2582 - - IL_257c: ldloc.2 - IL_257d: ldloc.1 - IL_257e: ldloc.2 - IL_257f: mul - IL_2580: sub - IL_2581: stloc.2 - IL_2582: ldloc.1 - IL_2583: ldloc.2 - IL_2584: bgt.s IL_258e - - IL_2586: ldloc.1 - IL_2587: ldloc.1 - IL_2588: ldloc.2 - IL_2589: mul - IL_258a: add - IL_258b: stloc.1 - IL_258c: br.s IL_2594 - - IL_258e: ldloc.2 - IL_258f: ldloc.1 - IL_2590: ldloc.2 - IL_2591: mul - IL_2592: mul - IL_2593: stloc.2 - IL_2594: ldloc.1 - IL_2595: ldloc.2 - IL_2596: blt.s IL_25a0 - - IL_2598: ldloc.1 - IL_2599: ldloc.1 - IL_259a: ldloc.2 - IL_259b: sub - IL_259c: sub - IL_259d: stloc.1 - IL_259e: br.s IL_25a6 - - IL_25a0: ldloc.2 - IL_25a1: ldloc.1 - IL_25a2: ldloc.2 - IL_25a3: sub - IL_25a4: mul - IL_25a5: stloc.2 - IL_25a6: ldloc.1 - IL_25a7: ldloc.2 - IL_25a8: blt.s IL_25b2 - - IL_25aa: ldloc.1 - IL_25ab: ldloc.1 - IL_25ac: ldloc.2 - IL_25ad: mul - IL_25ae: add - IL_25af: stloc.1 - IL_25b0: br.s IL_25b8 - - IL_25b2: ldloc.2 - IL_25b3: ldloc.1 - IL_25b4: ldloc.2 - IL_25b5: mul - IL_25b6: mul - IL_25b7: stloc.2 - IL_25b8: ldloc.1 - IL_25b9: ldloc.2 - IL_25ba: blt.s IL_25c4 - - IL_25bc: ldloc.1 - IL_25bd: ldloc.1 - IL_25be: ldloc.2 - IL_25bf: mul - IL_25c0: add - IL_25c1: stloc.1 - IL_25c2: br.s IL_25ca - - IL_25c4: ldloc.2 - IL_25c5: ldloc.1 - IL_25c6: ldloc.2 - IL_25c7: mul - IL_25c8: add - IL_25c9: stloc.2 - IL_25ca: ldloc.1 - IL_25cb: ldloc.2 - IL_25cc: bne.un.s IL_25d6 - - IL_25ce: ldloc.1 - IL_25cf: ldloc.1 - IL_25d0: ldloc.2 - IL_25d1: sub - IL_25d2: sub - IL_25d3: stloc.1 - IL_25d4: br.s IL_25dc - - IL_25d6: ldloc.2 - IL_25d7: ldloc.1 - IL_25d8: ldloc.2 - IL_25d9: sub - IL_25da: add - IL_25db: stloc.2 - IL_25dc: ldloc.1 - IL_25dd: ldloc.2 - IL_25de: ble.s IL_25e8 - - IL_25e0: ldloc.1 - IL_25e1: ldloc.1 - IL_25e2: ldloc.2 - IL_25e3: mul - IL_25e4: sub - IL_25e5: stloc.1 - IL_25e6: br.s IL_25ee - - IL_25e8: ldloc.2 - IL_25e9: ldloc.1 - IL_25ea: ldloc.2 - IL_25eb: mul - IL_25ec: mul - IL_25ed: stloc.2 - IL_25ee: ldloc.1 - IL_25ef: ldloc.2 - IL_25f0: bne.un.s IL_25fa - - IL_25f2: ldloc.1 - IL_25f3: ldloc.1 - IL_25f4: ldloc.2 - IL_25f5: add - IL_25f6: sub - IL_25f7: stloc.1 - IL_25f8: br.s IL_2600 - - IL_25fa: ldloc.2 - IL_25fb: ldloc.1 - IL_25fc: ldloc.2 - IL_25fd: add - IL_25fe: mul - IL_25ff: stloc.2 - IL_2600: ldloc.1 - IL_2601: ldloc.2 - IL_2602: ble.s IL_260c - - IL_2604: ldloc.1 - IL_2605: ldloc.1 - IL_2606: ldloc.2 - IL_2607: add - IL_2608: mul - IL_2609: stloc.1 - IL_260a: br.s IL_2612 - - IL_260c: ldloc.2 - IL_260d: ldloc.1 - IL_260e: ldloc.2 - IL_260f: add - IL_2610: sub - IL_2611: stloc.2 - IL_2612: ldloc.1 - IL_2613: ldloc.2 - IL_2614: bge.s IL_261e - - IL_2616: ldloc.1 - IL_2617: ldloc.1 - IL_2618: ldloc.2 - IL_2619: add - IL_261a: mul - IL_261b: stloc.1 - IL_261c: br.s IL_2624 - - IL_261e: ldloc.2 - IL_261f: ldloc.1 - IL_2620: ldloc.2 - IL_2621: add - IL_2622: sub - IL_2623: stloc.2 - IL_2624: ldloc.1 - IL_2625: ldloc.2 - IL_2626: ble.s IL_2630 - - IL_2628: ldloc.1 - IL_2629: ldloc.1 - IL_262a: ldloc.2 - IL_262b: sub - IL_262c: sub - IL_262d: stloc.1 - IL_262e: br.s IL_2636 - - IL_2630: ldloc.2 - IL_2631: ldloc.1 - IL_2632: ldloc.2 - IL_2633: sub - IL_2634: add - IL_2635: stloc.2 - IL_2636: ldloc.1 - IL_2637: ldloc.2 - IL_2638: bne.un.s IL_2642 - - IL_263a: ldloc.1 - IL_263b: ldloc.1 - IL_263c: ldloc.2 - IL_263d: sub - IL_263e: mul - IL_263f: stloc.1 - IL_2640: br.s IL_2648 - - IL_2642: ldloc.2 - IL_2643: ldloc.1 - IL_2644: ldloc.2 - IL_2645: sub - IL_2646: sub - IL_2647: stloc.2 - IL_2648: ldloc.1 - IL_2649: ldloc.2 - IL_264a: bgt.s IL_2654 - - IL_264c: ldloc.1 - IL_264d: ldloc.1 - IL_264e: ldloc.2 - IL_264f: add - IL_2650: mul - IL_2651: stloc.1 - IL_2652: br.s IL_265a - - IL_2654: ldloc.2 - IL_2655: ldloc.1 - IL_2656: ldloc.2 - IL_2657: add - IL_2658: add - IL_2659: stloc.2 - IL_265a: ldloc.1 - IL_265b: ldloc.2 - IL_265c: bne.un.s IL_2666 - - IL_265e: ldloc.1 - IL_265f: ldloc.1 - IL_2660: ldloc.2 - IL_2661: sub - IL_2662: add - IL_2663: stloc.1 - IL_2664: br.s IL_266c - - IL_2666: ldloc.2 - IL_2667: ldloc.1 - IL_2668: ldloc.2 - IL_2669: sub - IL_266a: sub - IL_266b: stloc.2 - IL_266c: ldloc.1 - IL_266d: ldloc.2 - IL_266e: bne.un.s IL_2678 - - IL_2670: ldloc.1 - IL_2671: ldloc.1 - IL_2672: ldloc.2 - IL_2673: add - IL_2674: add - IL_2675: stloc.1 - IL_2676: br.s IL_267e - - IL_2678: ldloc.2 - IL_2679: ldloc.1 - IL_267a: ldloc.2 - IL_267b: add - IL_267c: mul - IL_267d: stloc.2 - IL_267e: ldloc.1 - IL_267f: ldloc.2 - IL_2680: bgt.s IL_268a - - IL_2682: ldloc.1 - IL_2683: ldloc.1 - IL_2684: ldloc.2 - IL_2685: mul - IL_2686: mul - IL_2687: stloc.1 - IL_2688: br.s IL_2690 - - IL_268a: ldloc.2 - IL_268b: ldloc.1 - IL_268c: ldloc.2 - IL_268d: mul - IL_268e: add - IL_268f: stloc.2 - IL_2690: ldloc.1 - IL_2691: ldloc.2 - IL_2692: bgt.s IL_269c - - IL_2694: ldloc.1 - IL_2695: ldloc.1 - IL_2696: ldloc.2 - IL_2697: mul - IL_2698: mul - IL_2699: stloc.1 - IL_269a: br.s IL_26a2 - - IL_269c: ldloc.2 - IL_269d: ldloc.1 - IL_269e: ldloc.2 - IL_269f: mul - IL_26a0: sub - IL_26a1: stloc.2 - IL_26a2: ldloc.1 - IL_26a3: ldloc.2 - IL_26a4: bgt.s IL_26ae - - IL_26a6: ldloc.1 - IL_26a7: ldloc.1 - IL_26a8: ldloc.2 - IL_26a9: mul - IL_26aa: mul - IL_26ab: stloc.1 - IL_26ac: br.s IL_26b4 - - IL_26ae: ldloc.2 - IL_26af: ldloc.1 - IL_26b0: ldloc.2 - IL_26b1: mul - IL_26b2: sub - IL_26b3: stloc.2 - IL_26b4: ldloc.1 - IL_26b5: ldloc.2 - IL_26b6: bgt.s IL_26c0 - - IL_26b8: ldloc.1 - IL_26b9: ldloc.1 - IL_26ba: ldloc.2 - IL_26bb: sub - IL_26bc: add - IL_26bd: stloc.1 - IL_26be: br.s IL_26c6 - - IL_26c0: ldloc.2 - IL_26c1: ldloc.1 - IL_26c2: ldloc.2 - IL_26c3: sub - IL_26c4: mul - IL_26c5: stloc.2 - IL_26c6: ldloc.1 - IL_26c7: ldloc.2 - IL_26c8: blt.s IL_26d2 - - IL_26ca: ldloc.1 - IL_26cb: ldloc.1 - IL_26cc: ldloc.2 - IL_26cd: add - IL_26ce: mul - IL_26cf: stloc.1 - IL_26d0: br.s IL_26d8 - - IL_26d2: ldloc.2 - IL_26d3: ldloc.1 - IL_26d4: ldloc.2 - IL_26d5: add - IL_26d6: sub - IL_26d7: stloc.2 - IL_26d8: ldloc.1 - IL_26d9: ldloc.2 - IL_26da: bge.s IL_26e4 - - IL_26dc: ldloc.1 - IL_26dd: ldloc.1 - IL_26de: ldloc.2 - IL_26df: mul - IL_26e0: add - IL_26e1: stloc.1 - IL_26e2: br.s IL_26ea - - IL_26e4: ldloc.2 - IL_26e5: ldloc.1 - IL_26e6: ldloc.2 - IL_26e7: mul - IL_26e8: sub - IL_26e9: stloc.2 - IL_26ea: ldloc.1 - IL_26eb: ldloc.2 - IL_26ec: blt.s IL_26f6 - - IL_26ee: ldloc.1 - IL_26ef: ldloc.1 - IL_26f0: ldloc.2 - IL_26f1: mul - IL_26f2: mul - IL_26f3: stloc.1 - IL_26f4: br.s IL_26fc - - IL_26f6: ldloc.2 - IL_26f7: ldloc.1 - IL_26f8: ldloc.2 - IL_26f9: mul - IL_26fa: add - IL_26fb: stloc.2 - IL_26fc: ldloc.1 - IL_26fd: ldloc.2 - IL_26fe: blt.s IL_2708 - - IL_2700: ldloc.1 - IL_2701: ldloc.1 - IL_2702: ldloc.2 - IL_2703: add - IL_2704: mul - IL_2705: stloc.1 - IL_2706: br.s IL_270e - - IL_2708: ldloc.2 - IL_2709: ldloc.1 - IL_270a: ldloc.2 - IL_270b: add - IL_270c: sub - IL_270d: stloc.2 - IL_270e: ldloc.1 - IL_270f: ldloc.2 - IL_2710: beq.s IL_271a - - IL_2712: ldloc.1 - IL_2713: ldloc.1 - IL_2714: ldloc.2 - IL_2715: add - IL_2716: sub - IL_2717: stloc.1 - IL_2718: br.s IL_2720 - - IL_271a: ldloc.2 - IL_271b: ldloc.1 - IL_271c: ldloc.2 - IL_271d: add - IL_271e: sub - IL_271f: stloc.2 - IL_2720: ldloc.1 - IL_2721: ldloc.2 - IL_2722: blt.s IL_272c - - IL_2724: ldloc.1 - IL_2725: ldloc.1 - IL_2726: ldloc.2 - IL_2727: mul - IL_2728: add - IL_2729: stloc.1 - IL_272a: br.s IL_2732 - - IL_272c: ldloc.2 - IL_272d: ldloc.1 - IL_272e: ldloc.2 - IL_272f: mul - IL_2730: mul - IL_2731: stloc.2 - IL_2732: ldloc.1 - IL_2733: ldloc.2 - IL_2734: blt.s IL_273e - - IL_2736: ldloc.1 - IL_2737: ldloc.1 - IL_2738: ldloc.2 - IL_2739: mul - IL_273a: mul - IL_273b: stloc.1 - IL_273c: br.s IL_2744 - - IL_273e: ldloc.2 - IL_273f: ldloc.1 - IL_2740: ldloc.2 - IL_2741: mul - IL_2742: mul - IL_2743: stloc.2 - IL_2744: ldloc.1 - IL_2745: ldloc.2 - IL_2746: blt.s IL_2750 - - IL_2748: ldloc.1 - IL_2749: ldloc.1 - IL_274a: ldloc.2 - IL_274b: mul - IL_274c: sub - IL_274d: stloc.1 - IL_274e: br.s IL_2756 - - IL_2750: ldloc.2 - IL_2751: ldloc.1 - IL_2752: ldloc.2 - IL_2753: mul - IL_2754: sub - IL_2755: stloc.2 - IL_2756: ldloc.1 - IL_2757: ldloc.2 - IL_2758: bgt.s IL_2762 - - IL_275a: ldloc.1 - IL_275b: ldloc.1 - IL_275c: ldloc.2 - IL_275d: mul - IL_275e: mul - IL_275f: stloc.1 - IL_2760: br.s IL_2768 - - IL_2762: ldloc.2 - IL_2763: ldloc.1 - IL_2764: ldloc.2 - IL_2765: mul - IL_2766: add - IL_2767: stloc.2 - IL_2768: ldloc.1 - IL_2769: ldloc.2 - IL_276a: blt.s IL_2774 - - IL_276c: ldloc.1 - IL_276d: ldloc.1 - IL_276e: ldloc.2 - IL_276f: sub - IL_2770: sub - IL_2771: stloc.1 - IL_2772: br.s IL_277a - - IL_2774: ldloc.2 - IL_2775: ldloc.1 - IL_2776: ldloc.2 - IL_2777: sub - IL_2778: mul - IL_2779: stloc.2 - IL_277a: ldloc.1 - IL_277b: ldloc.2 - IL_277c: bgt.s IL_2786 - - IL_277e: ldloc.1 - IL_277f: ldloc.1 - IL_2780: ldloc.2 - IL_2781: mul - IL_2782: sub - IL_2783: stloc.1 - IL_2784: br.s IL_278c - - IL_2786: ldloc.2 - IL_2787: ldloc.1 - IL_2788: ldloc.2 - IL_2789: mul - IL_278a: sub - IL_278b: stloc.2 - IL_278c: ldloc.1 - IL_278d: ldloc.2 - IL_278e: bgt.s IL_2798 - - IL_2790: ldloc.1 - IL_2791: ldloc.1 - IL_2792: ldloc.2 - IL_2793: mul - IL_2794: sub - IL_2795: stloc.1 - IL_2796: br.s IL_279e - - IL_2798: ldloc.2 - IL_2799: ldloc.1 - IL_279a: ldloc.2 - IL_279b: mul - IL_279c: add - IL_279d: stloc.2 - IL_279e: ldloc.1 - IL_279f: ldloc.2 - IL_27a0: bge.s IL_27aa - - IL_27a2: ldloc.1 - IL_27a3: ldloc.1 - IL_27a4: ldloc.2 - IL_27a5: add - IL_27a6: sub - IL_27a7: stloc.1 - IL_27a8: br.s IL_27b0 - - IL_27aa: ldloc.2 - IL_27ab: ldloc.1 - IL_27ac: ldloc.2 - IL_27ad: add - IL_27ae: mul - IL_27af: stloc.2 - IL_27b0: ldloc.1 - IL_27b1: ldloc.2 - IL_27b2: bgt.s IL_27bc - - IL_27b4: ldloc.1 - IL_27b5: ldloc.1 - IL_27b6: ldloc.2 - IL_27b7: sub - IL_27b8: sub - IL_27b9: stloc.1 - IL_27ba: br.s IL_27c2 - - IL_27bc: ldloc.2 - IL_27bd: ldloc.1 - IL_27be: ldloc.2 - IL_27bf: sub - IL_27c0: add - IL_27c1: stloc.2 - IL_27c2: ldloc.1 - IL_27c3: ldloc.2 - IL_27c4: bne.un.s IL_27ce - - IL_27c6: ldloc.1 - IL_27c7: ldloc.1 - IL_27c8: ldloc.2 - IL_27c9: sub - IL_27ca: sub - IL_27cb: stloc.1 - IL_27cc: br.s IL_27d4 - - IL_27ce: ldloc.2 - IL_27cf: ldloc.1 - IL_27d0: ldloc.2 - IL_27d1: sub - IL_27d2: mul - IL_27d3: stloc.2 - IL_27d4: ldloc.1 - IL_27d5: ldloc.2 - IL_27d6: ble.s IL_27e0 - - IL_27d8: ldloc.1 - IL_27d9: ldloc.1 - IL_27da: ldloc.2 - IL_27db: add - IL_27dc: sub - IL_27dd: stloc.1 - IL_27de: br.s IL_27e6 - - IL_27e0: ldloc.2 - IL_27e1: ldloc.1 - IL_27e2: ldloc.2 - IL_27e3: add - IL_27e4: add - IL_27e5: stloc.2 - IL_27e6: ldloc.1 - IL_27e7: ldloc.2 - IL_27e8: bge.s IL_27f2 - - IL_27ea: ldloc.1 - IL_27eb: ldloc.1 - IL_27ec: ldloc.2 - IL_27ed: sub - IL_27ee: sub - IL_27ef: stloc.1 - IL_27f0: br.s IL_27f8 - - IL_27f2: ldloc.2 - IL_27f3: ldloc.1 - IL_27f4: ldloc.2 - IL_27f5: sub - IL_27f6: add - IL_27f7: stloc.2 - IL_27f8: ldloc.1 - IL_27f9: ldloc.2 - IL_27fa: beq.s IL_2804 - - IL_27fc: ldloc.1 - IL_27fd: ldloc.1 - IL_27fe: ldloc.2 - IL_27ff: sub - IL_2800: sub - IL_2801: stloc.1 - IL_2802: br.s IL_280a - - IL_2804: ldloc.2 - IL_2805: ldloc.1 - IL_2806: ldloc.2 - IL_2807: sub - IL_2808: mul - IL_2809: stloc.2 - IL_280a: ldloc.1 - IL_280b: ldloc.2 - IL_280c: bgt.s IL_2816 - - IL_280e: ldloc.1 - IL_280f: ldloc.1 - IL_2810: ldloc.2 - IL_2811: mul - IL_2812: mul - IL_2813: stloc.1 - IL_2814: br.s IL_281c - - IL_2816: ldloc.2 - IL_2817: ldloc.1 - IL_2818: ldloc.2 - IL_2819: mul - IL_281a: sub - IL_281b: stloc.2 - IL_281c: ldloc.1 - IL_281d: ldloc.2 - IL_281e: bgt.s IL_2828 - - IL_2820: ldloc.1 - IL_2821: ldloc.1 - IL_2822: ldloc.2 - IL_2823: mul - IL_2824: add - IL_2825: stloc.1 - IL_2826: br.s IL_282e - - IL_2828: ldloc.2 - IL_2829: ldloc.1 - IL_282a: ldloc.2 - IL_282b: mul - IL_282c: sub - IL_282d: stloc.2 - IL_282e: ldloc.1 - IL_282f: ldloc.2 - IL_2830: blt.s IL_283a - - IL_2832: ldloc.1 - IL_2833: ldloc.1 - IL_2834: ldloc.2 - IL_2835: add - IL_2836: add - IL_2837: stloc.1 - IL_2838: br.s IL_2840 - - IL_283a: ldloc.2 - IL_283b: ldloc.1 - IL_283c: ldloc.2 - IL_283d: add - IL_283e: mul - IL_283f: stloc.2 - IL_2840: ldloc.1 - IL_2841: ldloc.2 - IL_2842: bgt.s IL_284c - - IL_2844: ldloc.1 - IL_2845: ldloc.1 - IL_2846: ldloc.2 - IL_2847: mul - IL_2848: sub - IL_2849: stloc.1 - IL_284a: br.s IL_2852 - - IL_284c: ldloc.2 - IL_284d: ldloc.1 - IL_284e: ldloc.2 - IL_284f: mul - IL_2850: add - IL_2851: stloc.2 - IL_2852: ldloc.1 - IL_2853: ldloc.2 - IL_2854: beq.s IL_285e - - IL_2856: ldloc.1 - IL_2857: ldloc.1 - IL_2858: ldloc.2 - IL_2859: mul - IL_285a: mul - IL_285b: stloc.1 - IL_285c: br.s IL_2864 - - IL_285e: ldloc.2 - IL_285f: ldloc.1 - IL_2860: ldloc.2 - IL_2861: mul - IL_2862: add - IL_2863: stloc.2 - IL_2864: ldloc.1 - IL_2865: ldloc.2 - IL_2866: bne.un.s IL_2870 - - IL_2868: ldloc.1 - IL_2869: ldloc.1 - IL_286a: ldloc.2 - IL_286b: add - IL_286c: add - IL_286d: stloc.1 - IL_286e: br.s IL_2876 - - IL_2870: ldloc.2 - IL_2871: ldloc.1 - IL_2872: ldloc.2 - IL_2873: add - IL_2874: sub - IL_2875: stloc.2 - IL_2876: ldloc.1 - IL_2877: ldloc.2 - IL_2878: ble.s IL_2882 - - IL_287a: ldloc.1 - IL_287b: ldloc.1 - IL_287c: ldloc.2 - IL_287d: add - IL_287e: sub - IL_287f: stloc.1 - IL_2880: br.s IL_2888 - - IL_2882: ldloc.2 - IL_2883: ldloc.1 - IL_2884: ldloc.2 - IL_2885: add - IL_2886: sub - IL_2887: stloc.2 - IL_2888: ldloc.1 - IL_2889: ldloc.2 - IL_288a: blt.s IL_2894 - - IL_288c: ldloc.1 - IL_288d: ldloc.1 - IL_288e: ldloc.2 - IL_288f: sub - IL_2890: mul - IL_2891: stloc.1 - IL_2892: br.s IL_289a - - IL_2894: ldloc.2 - IL_2895: ldloc.1 - IL_2896: ldloc.2 - IL_2897: sub - IL_2898: mul - IL_2899: stloc.2 - IL_289a: ldloc.1 - IL_289b: ldloc.2 - IL_289c: bne.un.s IL_28a6 - - IL_289e: ldloc.1 - IL_289f: ldloc.1 - IL_28a0: ldloc.2 - IL_28a1: sub - IL_28a2: sub - IL_28a3: stloc.1 - IL_28a4: br.s IL_28ac - - IL_28a6: ldloc.2 - IL_28a7: ldloc.1 - IL_28a8: ldloc.2 - IL_28a9: sub - IL_28aa: sub - IL_28ab: stloc.2 - IL_28ac: ldloc.1 - IL_28ad: ldloc.2 - IL_28ae: bge.s IL_28b8 - - IL_28b0: ldloc.1 - IL_28b1: ldloc.1 - IL_28b2: ldloc.2 - IL_28b3: sub - IL_28b4: add - IL_28b5: stloc.1 - IL_28b6: br.s IL_28be - - IL_28b8: ldloc.2 - IL_28b9: ldloc.1 - IL_28ba: ldloc.2 - IL_28bb: sub - IL_28bc: mul - IL_28bd: stloc.2 - IL_28be: ldloc.1 - IL_28bf: ldloc.2 - IL_28c0: bge.s IL_28ca - - IL_28c2: ldloc.1 - IL_28c3: ldloc.1 - IL_28c4: ldloc.2 - IL_28c5: mul - IL_28c6: mul - IL_28c7: stloc.1 - IL_28c8: br.s IL_28d0 - - IL_28ca: ldloc.2 - IL_28cb: ldloc.1 - IL_28cc: ldloc.2 - IL_28cd: mul - IL_28ce: add - IL_28cf: stloc.2 - IL_28d0: ldloc.1 - IL_28d1: ldloc.2 - IL_28d2: bne.un.s IL_28dc - - IL_28d4: ldloc.1 - IL_28d5: ldloc.1 - IL_28d6: ldloc.2 - IL_28d7: mul - IL_28d8: add - IL_28d9: stloc.1 - IL_28da: br.s IL_28e2 - - IL_28dc: ldloc.2 - IL_28dd: ldloc.1 - IL_28de: ldloc.2 - IL_28df: mul - IL_28e0: sub - IL_28e1: stloc.2 - IL_28e2: ldloc.1 - IL_28e3: ldloc.2 - IL_28e4: bge.s IL_28ee - - IL_28e6: ldloc.1 - IL_28e7: ldloc.1 - IL_28e8: ldloc.2 - IL_28e9: add - IL_28ea: add - IL_28eb: stloc.1 - IL_28ec: br.s IL_28f4 - - IL_28ee: ldloc.2 - IL_28ef: ldloc.1 - IL_28f0: ldloc.2 - IL_28f1: add - IL_28f2: sub - IL_28f3: stloc.2 - IL_28f4: ldloc.1 - IL_28f5: ldloc.2 - IL_28f6: bge.s IL_2900 - - IL_28f8: ldloc.1 - IL_28f9: ldloc.1 - IL_28fa: ldloc.2 - IL_28fb: add - IL_28fc: mul - IL_28fd: stloc.1 - IL_28fe: br.s IL_2906 - - IL_2900: ldloc.2 - IL_2901: ldloc.1 - IL_2902: ldloc.2 - IL_2903: add - IL_2904: sub - IL_2905: stloc.2 - IL_2906: ldloc.1 - IL_2907: ldloc.2 - IL_2908: bgt.s IL_2912 - - IL_290a: ldloc.1 - IL_290b: ldloc.1 - IL_290c: ldloc.2 - IL_290d: add - IL_290e: add - IL_290f: stloc.1 - IL_2910: br.s IL_2918 - - IL_2912: ldloc.2 - IL_2913: ldloc.1 - IL_2914: ldloc.2 - IL_2915: add - IL_2916: mul - IL_2917: stloc.2 - IL_2918: ldloc.1 - IL_2919: ldloc.2 - IL_291a: bgt.s IL_2924 - - IL_291c: ldloc.1 - IL_291d: ldloc.1 - IL_291e: ldloc.2 - IL_291f: sub - IL_2920: add - IL_2921: stloc.1 - IL_2922: br.s IL_292a - - IL_2924: ldloc.2 - IL_2925: ldloc.1 - IL_2926: ldloc.2 - IL_2927: sub - IL_2928: sub - IL_2929: stloc.2 - IL_292a: ldloc.1 - IL_292b: ldloc.2 - IL_292c: blt.s IL_2936 - - IL_292e: ldloc.1 - IL_292f: ldloc.1 - IL_2930: ldloc.2 - IL_2931: add - IL_2932: add - IL_2933: stloc.1 - IL_2934: br.s IL_293c - - IL_2936: ldloc.2 - IL_2937: ldloc.1 - IL_2938: ldloc.2 - IL_2939: add - IL_293a: sub - IL_293b: stloc.2 - IL_293c: ldloc.1 - IL_293d: ldloc.2 - IL_293e: bne.un.s IL_2948 - - IL_2940: ldloc.1 - IL_2941: ldloc.1 - IL_2942: ldloc.2 - IL_2943: mul - IL_2944: sub - IL_2945: stloc.1 - IL_2946: br.s IL_294e - - IL_2948: ldloc.2 - IL_2949: ldloc.1 - IL_294a: ldloc.2 - IL_294b: mul - IL_294c: mul - IL_294d: stloc.2 - IL_294e: ldloc.1 - IL_294f: ldloc.2 - IL_2950: beq.s IL_295a - - IL_2952: ldloc.1 - IL_2953: ldloc.1 - IL_2954: ldloc.2 - IL_2955: mul - IL_2956: sub - IL_2957: stloc.1 - IL_2958: br.s IL_2960 - - IL_295a: ldloc.2 - IL_295b: ldloc.1 - IL_295c: ldloc.2 - IL_295d: mul - IL_295e: sub - IL_295f: stloc.2 - IL_2960: ldloc.1 - IL_2961: ldloc.2 - IL_2962: bge.s IL_296c - - IL_2964: ldloc.1 - IL_2965: ldloc.1 - IL_2966: ldloc.2 - IL_2967: mul - IL_2968: sub - IL_2969: stloc.1 - IL_296a: br.s IL_2972 - - IL_296c: ldloc.2 - IL_296d: ldloc.1 - IL_296e: ldloc.2 - IL_296f: mul - IL_2970: add - IL_2971: stloc.2 - IL_2972: ldloc.1 - IL_2973: ldloc.2 - IL_2974: bne.un.s IL_297e - - IL_2976: ldloc.1 - IL_2977: ldloc.1 - IL_2978: ldloc.2 - IL_2979: add - IL_297a: mul - IL_297b: stloc.1 - IL_297c: br.s IL_2984 - - IL_297e: ldloc.2 - IL_297f: ldloc.1 - IL_2980: ldloc.2 - IL_2981: add - IL_2982: mul - IL_2983: stloc.2 - IL_2984: ldloc.1 - IL_2985: ldloc.2 - IL_2986: blt.s IL_2990 - - IL_2988: ldloc.1 - IL_2989: ldloc.1 - IL_298a: ldloc.2 - IL_298b: mul - IL_298c: sub - IL_298d: stloc.1 - IL_298e: br.s IL_2996 - - IL_2990: ldloc.2 - IL_2991: ldloc.1 - IL_2992: ldloc.2 - IL_2993: mul - IL_2994: add - IL_2995: stloc.2 - IL_2996: ldloc.1 - IL_2997: ldloc.2 - IL_2998: beq.s IL_29a2 - - IL_299a: ldloc.1 - IL_299b: ldloc.1 - IL_299c: ldloc.2 - IL_299d: mul - IL_299e: sub - IL_299f: stloc.1 - IL_29a0: br.s IL_29a8 - - IL_29a2: ldloc.2 - IL_29a3: ldloc.1 - IL_29a4: ldloc.2 - IL_29a5: mul - IL_29a6: add - IL_29a7: stloc.2 - IL_29a8: ldloc.1 - IL_29a9: ldloc.2 - IL_29aa: bge.s IL_29b4 - - IL_29ac: ldloc.1 - IL_29ad: ldloc.1 - IL_29ae: ldloc.2 - IL_29af: add - IL_29b0: sub - IL_29b1: stloc.1 - IL_29b2: br.s IL_29ba - - IL_29b4: ldloc.2 - IL_29b5: ldloc.1 - IL_29b6: ldloc.2 - IL_29b7: add - IL_29b8: add - IL_29b9: stloc.2 - IL_29ba: ldloc.1 - IL_29bb: ldloc.2 - IL_29bc: bgt.s IL_29c6 - - IL_29be: ldloc.1 - IL_29bf: ldloc.1 - IL_29c0: ldloc.2 - IL_29c1: mul - IL_29c2: mul - IL_29c3: stloc.1 - IL_29c4: br.s IL_29cc - - IL_29c6: ldloc.2 - IL_29c7: ldloc.1 - IL_29c8: ldloc.2 - IL_29c9: mul - IL_29ca: sub - IL_29cb: stloc.2 - IL_29cc: ldloc.1 - IL_29cd: ldloc.2 - IL_29ce: beq.s IL_29d8 - - IL_29d0: ldloc.1 - IL_29d1: ldloc.1 - IL_29d2: ldloc.2 - IL_29d3: mul - IL_29d4: sub - IL_29d5: stloc.1 - IL_29d6: br.s IL_29de - - IL_29d8: ldloc.2 - IL_29d9: ldloc.1 - IL_29da: ldloc.2 - IL_29db: mul - IL_29dc: mul - IL_29dd: stloc.2 - IL_29de: ldloc.1 - IL_29df: ldloc.2 - IL_29e0: bgt.s IL_29ea - - IL_29e2: ldloc.1 - IL_29e3: ldloc.1 - IL_29e4: ldloc.2 - IL_29e5: mul - IL_29e6: mul - IL_29e7: stloc.1 - IL_29e8: br.s IL_29f0 - - IL_29ea: ldloc.2 - IL_29eb: ldloc.1 - IL_29ec: ldloc.2 - IL_29ed: mul - IL_29ee: add - IL_29ef: stloc.2 - IL_29f0: ldloc.1 - IL_29f1: ldloc.2 - IL_29f2: bge.s IL_29fc - - IL_29f4: ldloc.1 - IL_29f5: ldloc.1 - IL_29f6: ldloc.2 - IL_29f7: add - IL_29f8: mul - IL_29f9: stloc.1 - IL_29fa: br.s IL_2a02 - - IL_29fc: ldloc.2 - IL_29fd: ldloc.1 - IL_29fe: ldloc.2 - IL_29ff: add - IL_2a00: add - IL_2a01: stloc.2 - IL_2a02: ldloc.1 - IL_2a03: ldloc.2 - IL_2a04: beq.s IL_2a0e - - IL_2a06: ldloc.1 - IL_2a07: ldloc.1 - IL_2a08: ldloc.2 - IL_2a09: mul - IL_2a0a: add - IL_2a0b: stloc.1 - IL_2a0c: br.s IL_2a14 - - IL_2a0e: ldloc.2 - IL_2a0f: ldloc.1 - IL_2a10: ldloc.2 - IL_2a11: mul - IL_2a12: sub - IL_2a13: stloc.2 - IL_2a14: ldloc.1 - IL_2a15: ldloc.2 - IL_2a16: bge.s IL_2a20 - - IL_2a18: ldloc.1 - IL_2a19: ldloc.1 - IL_2a1a: ldloc.2 - IL_2a1b: mul - IL_2a1c: sub - IL_2a1d: stloc.1 - IL_2a1e: br.s IL_2a26 - - IL_2a20: ldloc.2 - IL_2a21: ldloc.1 - IL_2a22: ldloc.2 - IL_2a23: mul - IL_2a24: add - IL_2a25: stloc.2 - IL_2a26: ldloc.1 - IL_2a27: ldloc.2 - IL_2a28: bne.un.s IL_2a32 - - IL_2a2a: ldloc.1 - IL_2a2b: ldloc.1 - IL_2a2c: ldloc.2 - IL_2a2d: sub - IL_2a2e: sub - IL_2a2f: stloc.1 - IL_2a30: br.s IL_2a38 - - IL_2a32: ldloc.2 - IL_2a33: ldloc.1 - IL_2a34: ldloc.2 - IL_2a35: sub - IL_2a36: add - IL_2a37: stloc.2 - IL_2a38: ldloc.1 - IL_2a39: ldloc.2 - IL_2a3a: blt.s IL_2a44 - - IL_2a3c: ldloc.1 - IL_2a3d: ldloc.1 - IL_2a3e: ldloc.2 - IL_2a3f: sub - IL_2a40: mul - IL_2a41: stloc.1 - IL_2a42: br.s IL_2a4a - - IL_2a44: ldloc.2 - IL_2a45: ldloc.1 - IL_2a46: ldloc.2 - IL_2a47: sub - IL_2a48: sub - IL_2a49: stloc.2 - IL_2a4a: ldloc.1 - IL_2a4b: ldloc.2 - IL_2a4c: blt.s IL_2a56 - - IL_2a4e: ldloc.1 - IL_2a4f: ldloc.1 - IL_2a50: ldloc.2 - IL_2a51: sub - IL_2a52: sub - IL_2a53: stloc.1 - IL_2a54: br.s IL_2a5c - - IL_2a56: ldloc.2 - IL_2a57: ldloc.1 - IL_2a58: ldloc.2 - IL_2a59: sub - IL_2a5a: add - IL_2a5b: stloc.2 - IL_2a5c: ldloc.1 - IL_2a5d: ldloc.2 - IL_2a5e: ble.s IL_2a68 - - IL_2a60: ldloc.1 - IL_2a61: ldloc.1 - IL_2a62: ldloc.2 - IL_2a63: sub - IL_2a64: sub - IL_2a65: stloc.1 - IL_2a66: br.s IL_2a6e - - IL_2a68: ldloc.2 - IL_2a69: ldloc.1 - IL_2a6a: ldloc.2 - IL_2a6b: sub - IL_2a6c: mul - IL_2a6d: stloc.2 - IL_2a6e: ldloc.1 - IL_2a6f: ldloc.2 - IL_2a70: bne.un.s IL_2a7a - - IL_2a72: ldloc.1 - IL_2a73: ldloc.1 - IL_2a74: ldloc.2 - IL_2a75: mul - IL_2a76: add - IL_2a77: stloc.1 - IL_2a78: br.s IL_2a80 - - IL_2a7a: ldloc.2 - IL_2a7b: ldloc.1 - IL_2a7c: ldloc.2 - IL_2a7d: mul - IL_2a7e: sub - IL_2a7f: stloc.2 - IL_2a80: ldloc.1 - IL_2a81: ldloc.2 - IL_2a82: blt.s IL_2a8c - - IL_2a84: ldloc.1 - IL_2a85: ldloc.1 - IL_2a86: ldloc.2 - IL_2a87: add - IL_2a88: sub - IL_2a89: stloc.1 - IL_2a8a: br.s IL_2a92 - - IL_2a8c: ldloc.2 - IL_2a8d: ldloc.1 - IL_2a8e: ldloc.2 - IL_2a8f: add - IL_2a90: sub - IL_2a91: stloc.2 - IL_2a92: ldloc.1 - IL_2a93: ldloc.2 - IL_2a94: bge.s IL_2a9e - - IL_2a96: ldloc.1 - IL_2a97: ldloc.1 - IL_2a98: ldloc.2 - IL_2a99: add - IL_2a9a: add - IL_2a9b: stloc.1 - IL_2a9c: br.s IL_2aa4 - - IL_2a9e: ldloc.2 - IL_2a9f: ldloc.1 - IL_2aa0: ldloc.2 - IL_2aa1: add - IL_2aa2: mul - IL_2aa3: stloc.2 - IL_2aa4: ldloc.1 - IL_2aa5: ldloc.2 - IL_2aa6: ble.s IL_2ab0 - - IL_2aa8: ldloc.1 - IL_2aa9: ldloc.1 - IL_2aaa: ldloc.2 - IL_2aab: add - IL_2aac: sub - IL_2aad: stloc.1 - IL_2aae: br.s IL_2ab6 - - IL_2ab0: ldloc.2 - IL_2ab1: ldloc.1 - IL_2ab2: ldloc.2 - IL_2ab3: add - IL_2ab4: mul - IL_2ab5: stloc.2 - IL_2ab6: ldloc.1 - IL_2ab7: ldloc.2 - IL_2ab8: bne.un.s IL_2ac2 - - IL_2aba: ldloc.1 - IL_2abb: ldloc.1 - IL_2abc: ldloc.2 - IL_2abd: add - IL_2abe: sub - IL_2abf: stloc.1 - IL_2ac0: br.s IL_2ac8 - - IL_2ac2: ldloc.2 - IL_2ac3: ldloc.1 - IL_2ac4: ldloc.2 - IL_2ac5: add - IL_2ac6: add - IL_2ac7: stloc.2 - IL_2ac8: ldloc.1 - IL_2ac9: ldloc.2 - IL_2aca: bge.s IL_2ad4 - - IL_2acc: ldloc.1 - IL_2acd: ldloc.1 - IL_2ace: ldloc.2 - IL_2acf: mul - IL_2ad0: sub - IL_2ad1: stloc.1 - IL_2ad2: br.s IL_2ada - - IL_2ad4: ldloc.2 - IL_2ad5: ldloc.1 - IL_2ad6: ldloc.2 - IL_2ad7: mul - IL_2ad8: add - IL_2ad9: stloc.2 - IL_2ada: ldloc.1 - IL_2adb: ldloc.2 - IL_2adc: ble.s IL_2ae6 - - IL_2ade: ldloc.1 - IL_2adf: ldloc.1 - IL_2ae0: ldloc.2 - IL_2ae1: mul - IL_2ae2: mul - IL_2ae3: stloc.1 - IL_2ae4: br.s IL_2aec - - IL_2ae6: ldloc.2 - IL_2ae7: ldloc.1 - IL_2ae8: ldloc.2 - IL_2ae9: mul - IL_2aea: add - IL_2aeb: stloc.2 - IL_2aec: ldloc.1 - IL_2aed: ldloc.2 - IL_2aee: bgt.s IL_2af8 - - IL_2af0: ldloc.1 - IL_2af1: ldloc.1 - IL_2af2: ldloc.2 - IL_2af3: sub - IL_2af4: sub - IL_2af5: stloc.1 - IL_2af6: br.s IL_2afe - - IL_2af8: ldloc.2 - IL_2af9: ldloc.1 - IL_2afa: ldloc.2 - IL_2afb: sub - IL_2afc: mul - IL_2afd: stloc.2 - IL_2afe: ldloc.1 - IL_2aff: ldloc.2 - IL_2b00: ble.s IL_2b0a - - IL_2b02: ldloc.1 - IL_2b03: ldloc.1 - IL_2b04: ldloc.2 - IL_2b05: add - IL_2b06: add - IL_2b07: stloc.1 - IL_2b08: br.s IL_2b10 - - IL_2b0a: ldloc.2 - IL_2b0b: ldloc.1 - IL_2b0c: ldloc.2 - IL_2b0d: add - IL_2b0e: mul - IL_2b0f: stloc.2 - IL_2b10: ldloc.1 - IL_2b11: ldloc.2 - IL_2b12: beq.s IL_2b1c - - IL_2b14: ldloc.1 - IL_2b15: ldloc.1 - IL_2b16: ldloc.2 - IL_2b17: add - IL_2b18: add - IL_2b19: stloc.1 - IL_2b1a: br.s IL_2b22 - - IL_2b1c: ldloc.2 - IL_2b1d: ldloc.1 - IL_2b1e: ldloc.2 - IL_2b1f: add - IL_2b20: sub - IL_2b21: stloc.2 - IL_2b22: ldloc.1 - IL_2b23: ldloc.2 - IL_2b24: ble.s IL_2b2e - - IL_2b26: ldloc.1 - IL_2b27: ldloc.1 - IL_2b28: ldloc.2 - IL_2b29: sub - IL_2b2a: add - IL_2b2b: stloc.1 - IL_2b2c: br.s IL_2b34 - - IL_2b2e: ldloc.2 - IL_2b2f: ldloc.1 - IL_2b30: ldloc.2 - IL_2b31: sub - IL_2b32: add - IL_2b33: stloc.2 - IL_2b34: ldloc.1 - IL_2b35: ldloc.2 - IL_2b36: bne.un.s IL_2b40 - - IL_2b38: ldloc.1 - IL_2b39: ldloc.1 - IL_2b3a: ldloc.2 - IL_2b3b: add - IL_2b3c: sub - IL_2b3d: stloc.1 - IL_2b3e: br.s IL_2b46 - - IL_2b40: ldloc.2 - IL_2b41: ldloc.1 - IL_2b42: ldloc.2 - IL_2b43: add - IL_2b44: add - IL_2b45: stloc.2 - IL_2b46: ldloc.1 - IL_2b47: ldloc.2 - IL_2b48: bgt.s IL_2b52 - - IL_2b4a: ldloc.1 - IL_2b4b: ldloc.1 - IL_2b4c: ldloc.2 - IL_2b4d: sub - IL_2b4e: add - IL_2b4f: stloc.1 - IL_2b50: br.s IL_2b58 - - IL_2b52: ldloc.2 - IL_2b53: ldloc.1 - IL_2b54: ldloc.2 - IL_2b55: sub - IL_2b56: mul - IL_2b57: stloc.2 - IL_2b58: ldloc.1 - IL_2b59: ldloc.2 - IL_2b5a: blt.s IL_2b64 - - IL_2b5c: ldloc.1 - IL_2b5d: ldloc.1 - IL_2b5e: ldloc.2 - IL_2b5f: add - IL_2b60: mul - IL_2b61: stloc.1 - IL_2b62: br.s IL_2b6a - - IL_2b64: ldloc.2 - IL_2b65: ldloc.1 - IL_2b66: ldloc.2 - IL_2b67: add - IL_2b68: add - IL_2b69: stloc.2 - IL_2b6a: ldloc.1 - IL_2b6b: ldloc.2 - IL_2b6c: ble.s IL_2b76 - - IL_2b6e: ldloc.1 - IL_2b6f: ldloc.1 - IL_2b70: ldloc.2 - IL_2b71: sub - IL_2b72: sub - IL_2b73: stloc.1 - IL_2b74: br.s IL_2b7c - - IL_2b76: ldloc.2 - IL_2b77: ldloc.1 - IL_2b78: ldloc.2 - IL_2b79: sub - IL_2b7a: mul - IL_2b7b: stloc.2 - IL_2b7c: ldloc.1 - IL_2b7d: ldloc.2 - IL_2b7e: bge.s IL_2b88 - - IL_2b80: ldloc.1 - IL_2b81: ldloc.1 - IL_2b82: ldloc.2 - IL_2b83: mul - IL_2b84: sub - IL_2b85: stloc.1 - IL_2b86: br.s IL_2b8e - - IL_2b88: ldloc.2 - IL_2b89: ldloc.1 - IL_2b8a: ldloc.2 - IL_2b8b: mul - IL_2b8c: sub - IL_2b8d: stloc.2 - IL_2b8e: ldloc.1 - IL_2b8f: ldloc.2 - IL_2b90: bge.s IL_2b9a - - IL_2b92: ldloc.1 - IL_2b93: ldloc.1 - IL_2b94: ldloc.2 - IL_2b95: add - IL_2b96: sub - IL_2b97: stloc.1 - IL_2b98: br.s IL_2ba0 - - IL_2b9a: ldloc.2 - IL_2b9b: ldloc.1 - IL_2b9c: ldloc.2 - IL_2b9d: add - IL_2b9e: mul - IL_2b9f: stloc.2 - IL_2ba0: ldloc.1 - IL_2ba1: ldloc.2 - IL_2ba2: blt.s IL_2bac - - IL_2ba4: ldloc.1 - IL_2ba5: ldloc.1 - IL_2ba6: ldloc.2 - IL_2ba7: sub - IL_2ba8: mul - IL_2ba9: stloc.1 - IL_2baa: br.s IL_2bb2 - - IL_2bac: ldloc.2 - IL_2bad: ldloc.1 - IL_2bae: ldloc.2 - IL_2baf: sub - IL_2bb0: add - IL_2bb1: stloc.2 - IL_2bb2: ldloc.1 - IL_2bb3: ldloc.2 - IL_2bb4: ble.s IL_2bbe - - IL_2bb6: ldloc.1 - IL_2bb7: ldloc.1 - IL_2bb8: ldloc.2 - IL_2bb9: mul - IL_2bba: mul - IL_2bbb: stloc.1 - IL_2bbc: br.s IL_2bc4 - - IL_2bbe: ldloc.2 - IL_2bbf: ldloc.1 - IL_2bc0: ldloc.2 - IL_2bc1: mul - IL_2bc2: add - IL_2bc3: stloc.2 - IL_2bc4: ldloc.1 - IL_2bc5: ldloc.2 - IL_2bc6: blt.s IL_2bd0 - - IL_2bc8: ldloc.1 - IL_2bc9: ldloc.1 - IL_2bca: ldloc.2 - IL_2bcb: sub - IL_2bcc: mul - IL_2bcd: stloc.1 - IL_2bce: br.s IL_2bd6 - - IL_2bd0: ldloc.2 - IL_2bd1: ldloc.1 - IL_2bd2: ldloc.2 - IL_2bd3: sub - IL_2bd4: mul - IL_2bd5: stloc.2 - IL_2bd6: ldloc.1 - IL_2bd7: ldloc.2 - IL_2bd8: bgt.s IL_2be2 - - IL_2bda: ldloc.1 - IL_2bdb: ldloc.1 - IL_2bdc: ldloc.2 - IL_2bdd: sub - IL_2bde: add - IL_2bdf: stloc.1 - IL_2be0: br.s IL_2be8 - - IL_2be2: ldloc.2 - IL_2be3: ldloc.1 - IL_2be4: ldloc.2 - IL_2be5: sub - IL_2be6: add - IL_2be7: stloc.2 - IL_2be8: ldloc.1 - IL_2be9: ldloc.2 - IL_2bea: bne.un.s IL_2bf4 - - IL_2bec: ldloc.1 - IL_2bed: ldloc.1 - IL_2bee: ldloc.2 - IL_2bef: sub - IL_2bf0: add - IL_2bf1: stloc.1 - IL_2bf2: br.s IL_2bfa - - IL_2bf4: ldloc.2 - IL_2bf5: ldloc.1 - IL_2bf6: ldloc.2 - IL_2bf7: sub - IL_2bf8: mul - IL_2bf9: stloc.2 - IL_2bfa: ldloc.1 - IL_2bfb: ldloc.2 - IL_2bfc: beq.s IL_2c06 - - IL_2bfe: ldloc.1 - IL_2bff: ldloc.1 - IL_2c00: ldloc.2 - IL_2c01: add - IL_2c02: sub - IL_2c03: stloc.1 - IL_2c04: br.s IL_2c0c - - IL_2c06: ldloc.2 - IL_2c07: ldloc.1 - IL_2c08: ldloc.2 - IL_2c09: add - IL_2c0a: mul - IL_2c0b: stloc.2 - IL_2c0c: ldloc.1 - IL_2c0d: ldloc.2 - IL_2c0e: bgt.s IL_2c18 - - IL_2c10: ldloc.1 - IL_2c11: ldloc.1 - IL_2c12: ldloc.2 - IL_2c13: sub - IL_2c14: mul - IL_2c15: stloc.1 - IL_2c16: br.s IL_2c1e - - IL_2c18: ldloc.2 - IL_2c19: ldloc.1 - IL_2c1a: ldloc.2 - IL_2c1b: sub - IL_2c1c: mul - IL_2c1d: stloc.2 - IL_2c1e: ldloc.1 - IL_2c1f: ldloc.2 - IL_2c20: bne.un.s IL_2c2a - - IL_2c22: ldloc.1 - IL_2c23: ldloc.1 - IL_2c24: ldloc.2 - IL_2c25: add - IL_2c26: sub - IL_2c27: stloc.1 - IL_2c28: br.s IL_2c30 - - IL_2c2a: ldloc.2 - IL_2c2b: ldloc.1 - IL_2c2c: ldloc.2 - IL_2c2d: add - IL_2c2e: add - IL_2c2f: stloc.2 - IL_2c30: ldloc.1 - IL_2c31: ldloc.2 - IL_2c32: bgt.s IL_2c3c - - IL_2c34: ldloc.1 - IL_2c35: ldloc.1 - IL_2c36: ldloc.2 - IL_2c37: mul - IL_2c38: add - IL_2c39: stloc.1 - IL_2c3a: br.s IL_2c42 - - IL_2c3c: ldloc.2 - IL_2c3d: ldloc.1 - IL_2c3e: ldloc.2 - IL_2c3f: mul - IL_2c40: mul - IL_2c41: stloc.2 - IL_2c42: ldloc.1 - IL_2c43: ldloc.2 - IL_2c44: beq.s IL_2c4e - - IL_2c46: ldloc.1 - IL_2c47: ldloc.1 - IL_2c48: ldloc.2 - IL_2c49: sub - IL_2c4a: sub - IL_2c4b: stloc.1 - IL_2c4c: br.s IL_2c54 - - IL_2c4e: ldloc.2 - IL_2c4f: ldloc.1 - IL_2c50: ldloc.2 - IL_2c51: sub - IL_2c52: sub - IL_2c53: stloc.2 - IL_2c54: ldloc.1 - IL_2c55: ldloc.2 - IL_2c56: blt.s IL_2c60 - - IL_2c58: ldloc.1 - IL_2c59: ldloc.1 - IL_2c5a: ldloc.2 - IL_2c5b: add - IL_2c5c: add - IL_2c5d: stloc.1 - IL_2c5e: br.s IL_2c66 - - IL_2c60: ldloc.2 - IL_2c61: ldloc.1 - IL_2c62: ldloc.2 - IL_2c63: add - IL_2c64: mul - IL_2c65: stloc.2 - IL_2c66: ldloc.1 - IL_2c67: ldloc.2 - IL_2c68: bne.un.s IL_2c72 - - IL_2c6a: ldloc.1 - IL_2c6b: ldloc.1 - IL_2c6c: ldloc.2 - IL_2c6d: add - IL_2c6e: add - IL_2c6f: stloc.1 - IL_2c70: br.s IL_2c78 - - IL_2c72: ldloc.2 - IL_2c73: ldloc.1 - IL_2c74: ldloc.2 - IL_2c75: add - IL_2c76: mul - IL_2c77: stloc.2 - IL_2c78: ldloc.1 - IL_2c79: ldloc.2 - IL_2c7a: blt.s IL_2c84 - - IL_2c7c: ldloc.1 - IL_2c7d: ldloc.1 - IL_2c7e: ldloc.2 - IL_2c7f: mul - IL_2c80: mul - IL_2c81: stloc.1 - IL_2c82: br.s IL_2c8a - - IL_2c84: ldloc.2 - IL_2c85: ldloc.1 - IL_2c86: ldloc.2 - IL_2c87: mul - IL_2c88: add - IL_2c89: stloc.2 - IL_2c8a: ldloc.1 - IL_2c8b: ldloc.2 - IL_2c8c: bgt.s IL_2c96 - - IL_2c8e: ldloc.1 - IL_2c8f: ldloc.1 - IL_2c90: ldloc.2 - IL_2c91: mul - IL_2c92: sub - IL_2c93: stloc.1 - IL_2c94: br.s IL_2c9c - - IL_2c96: ldloc.2 - IL_2c97: ldloc.1 - IL_2c98: ldloc.2 - IL_2c99: mul - IL_2c9a: add - IL_2c9b: stloc.2 - IL_2c9c: ldloc.1 - IL_2c9d: ldloc.2 - IL_2c9e: beq.s IL_2ca8 - - IL_2ca0: ldloc.1 - IL_2ca1: ldloc.1 - IL_2ca2: ldloc.2 - IL_2ca3: add - IL_2ca4: mul - IL_2ca5: stloc.1 - IL_2ca6: br.s IL_2cae - - IL_2ca8: ldloc.2 - IL_2ca9: ldloc.1 - IL_2caa: ldloc.2 - IL_2cab: add - IL_2cac: mul - IL_2cad: stloc.2 - IL_2cae: ldloc.1 - IL_2caf: ldloc.2 - IL_2cb0: beq.s IL_2cba - - IL_2cb2: ldloc.1 - IL_2cb3: ldloc.1 - IL_2cb4: ldloc.2 - IL_2cb5: mul - IL_2cb6: mul - IL_2cb7: stloc.1 - IL_2cb8: br.s IL_2cc0 - - IL_2cba: ldloc.2 - IL_2cbb: ldloc.1 - IL_2cbc: ldloc.2 - IL_2cbd: mul - IL_2cbe: add - IL_2cbf: stloc.2 - IL_2cc0: ldloc.1 - IL_2cc1: ldloc.2 - IL_2cc2: bgt.s IL_2ccc - - IL_2cc4: ldloc.1 - IL_2cc5: ldloc.1 - IL_2cc6: ldloc.2 - IL_2cc7: add - IL_2cc8: mul - IL_2cc9: stloc.1 - IL_2cca: br.s IL_2cd2 - - IL_2ccc: ldloc.2 - IL_2ccd: ldloc.1 - IL_2cce: ldloc.2 - IL_2ccf: add - IL_2cd0: mul - IL_2cd1: stloc.2 - IL_2cd2: ldloc.1 - IL_2cd3: ldloc.2 - IL_2cd4: blt.s IL_2cde - - IL_2cd6: ldloc.1 - IL_2cd7: ldloc.1 - IL_2cd8: ldloc.2 - IL_2cd9: add - IL_2cda: sub - IL_2cdb: stloc.1 - IL_2cdc: br.s IL_2ce4 - - IL_2cde: ldloc.2 - IL_2cdf: ldloc.1 - IL_2ce0: ldloc.2 - IL_2ce1: add - IL_2ce2: sub - IL_2ce3: stloc.2 - IL_2ce4: ldloc.1 - IL_2ce5: ldloc.2 - IL_2ce6: bne.un.s IL_2cf0 - - IL_2ce8: ldloc.1 - IL_2ce9: ldloc.1 - IL_2cea: ldloc.2 - IL_2ceb: sub - IL_2cec: add - IL_2ced: stloc.1 - IL_2cee: br.s IL_2cf6 - - IL_2cf0: ldloc.2 - IL_2cf1: ldloc.1 - IL_2cf2: ldloc.2 - IL_2cf3: sub - IL_2cf4: add - IL_2cf5: stloc.2 - IL_2cf6: ldloc.1 - IL_2cf7: ldloc.2 - IL_2cf8: bne.un.s IL_2d02 - - IL_2cfa: ldloc.1 - IL_2cfb: ldloc.1 - IL_2cfc: ldloc.2 - IL_2cfd: sub - IL_2cfe: mul - IL_2cff: stloc.1 - IL_2d00: br.s IL_2d08 - - IL_2d02: ldloc.2 - IL_2d03: ldloc.1 - IL_2d04: ldloc.2 - IL_2d05: sub - IL_2d06: sub - IL_2d07: stloc.2 - IL_2d08: ldloc.1 - IL_2d09: ldloc.2 - IL_2d0a: beq.s IL_2d14 - - IL_2d0c: ldloc.1 - IL_2d0d: ldloc.1 - IL_2d0e: ldloc.2 - IL_2d0f: mul - IL_2d10: mul - IL_2d11: stloc.1 - IL_2d12: br.s IL_2d1a - - IL_2d14: ldloc.2 - IL_2d15: ldloc.1 - IL_2d16: ldloc.2 - IL_2d17: mul - IL_2d18: mul - IL_2d19: stloc.2 - IL_2d1a: ldloc.1 - IL_2d1b: ldloc.2 - IL_2d1c: bge.s IL_2d26 - - IL_2d1e: ldloc.1 - IL_2d1f: ldloc.1 - IL_2d20: ldloc.2 - IL_2d21: add - IL_2d22: add - IL_2d23: stloc.1 - IL_2d24: br.s IL_2d2c - - IL_2d26: ldloc.2 - IL_2d27: ldloc.1 - IL_2d28: ldloc.2 - IL_2d29: add - IL_2d2a: mul - IL_2d2b: stloc.2 - IL_2d2c: ldloc.1 - IL_2d2d: ldloc.2 - IL_2d2e: ble.s IL_2d38 - - IL_2d30: ldloc.1 - IL_2d31: ldloc.1 - IL_2d32: ldloc.2 - IL_2d33: add - IL_2d34: mul - IL_2d35: stloc.1 - IL_2d36: br.s IL_2d3e - - IL_2d38: ldloc.2 - IL_2d39: ldloc.1 - IL_2d3a: ldloc.2 - IL_2d3b: add - IL_2d3c: mul - IL_2d3d: stloc.2 - IL_2d3e: ldloc.1 - IL_2d3f: ldloc.2 - IL_2d40: bgt.s IL_2d4a - - IL_2d42: ldloc.1 - IL_2d43: ldloc.1 - IL_2d44: ldloc.2 - IL_2d45: sub - IL_2d46: sub - IL_2d47: stloc.1 - IL_2d48: br.s IL_2d50 - - IL_2d4a: ldloc.2 - IL_2d4b: ldloc.1 - IL_2d4c: ldloc.2 - IL_2d4d: sub - IL_2d4e: mul - IL_2d4f: stloc.2 - IL_2d50: ldloc.1 - IL_2d51: ldloc.2 - IL_2d52: ble.s IL_2d5c - - IL_2d54: ldloc.1 - IL_2d55: ldloc.1 - IL_2d56: ldloc.2 - IL_2d57: mul - IL_2d58: mul - IL_2d59: stloc.1 - IL_2d5a: br.s IL_2d62 - - IL_2d5c: ldloc.2 - IL_2d5d: ldloc.1 - IL_2d5e: ldloc.2 - IL_2d5f: mul - IL_2d60: sub - IL_2d61: stloc.2 - IL_2d62: ldloc.1 - IL_2d63: ldloc.2 - IL_2d64: bge.s IL_2d6e - - IL_2d66: ldloc.1 - IL_2d67: ldloc.1 - IL_2d68: ldloc.2 - IL_2d69: mul - IL_2d6a: sub - IL_2d6b: stloc.1 - IL_2d6c: br.s IL_2d74 - - IL_2d6e: ldloc.2 - IL_2d6f: ldloc.1 - IL_2d70: ldloc.2 - IL_2d71: mul - IL_2d72: mul - IL_2d73: stloc.2 - IL_2d74: ldloc.1 - IL_2d75: ldloc.2 - IL_2d76: bgt.s IL_2d80 - - IL_2d78: ldloc.1 - IL_2d79: ldloc.1 - IL_2d7a: ldloc.2 - IL_2d7b: add - IL_2d7c: mul - IL_2d7d: stloc.1 - IL_2d7e: br.s IL_2d86 - - IL_2d80: ldloc.2 - IL_2d81: ldloc.1 - IL_2d82: ldloc.2 - IL_2d83: add - IL_2d84: add - IL_2d85: stloc.2 - IL_2d86: ldloc.1 - IL_2d87: ldloc.2 - IL_2d88: blt.s IL_2d92 - - IL_2d8a: ldloc.1 - IL_2d8b: ldloc.1 - IL_2d8c: ldloc.2 - IL_2d8d: add - IL_2d8e: sub - IL_2d8f: stloc.1 - IL_2d90: br.s IL_2d98 - - IL_2d92: ldloc.2 - IL_2d93: ldloc.1 - IL_2d94: ldloc.2 - IL_2d95: add - IL_2d96: add - IL_2d97: stloc.2 - IL_2d98: ldloc.1 - IL_2d99: ldloc.2 - IL_2d9a: bge.s IL_2da4 - - IL_2d9c: ldloc.1 - IL_2d9d: ldloc.1 - IL_2d9e: ldloc.2 - IL_2d9f: add - IL_2da0: sub - IL_2da1: stloc.1 - IL_2da2: br.s IL_2daa - - IL_2da4: ldloc.2 - IL_2da5: ldloc.1 - IL_2da6: ldloc.2 - IL_2da7: add - IL_2da8: add - IL_2da9: stloc.2 - IL_2daa: ldloc.1 - IL_2dab: ldloc.2 - IL_2dac: beq.s IL_2db6 - - IL_2dae: ldloc.1 - IL_2daf: ldloc.1 - IL_2db0: ldloc.2 - IL_2db1: sub - IL_2db2: sub - IL_2db3: stloc.1 - IL_2db4: br.s IL_2dbc - - IL_2db6: ldloc.2 - IL_2db7: ldloc.1 - IL_2db8: ldloc.2 - IL_2db9: sub - IL_2dba: sub - IL_2dbb: stloc.2 - IL_2dbc: ldloc.1 - IL_2dbd: ldloc.2 - IL_2dbe: beq.s IL_2dc8 - - IL_2dc0: ldloc.1 - IL_2dc1: ldloc.1 - IL_2dc2: ldloc.2 - IL_2dc3: sub - IL_2dc4: mul - IL_2dc5: stloc.1 - IL_2dc6: br.s IL_2dce - - IL_2dc8: ldloc.2 - IL_2dc9: ldloc.1 - IL_2dca: ldloc.2 - IL_2dcb: sub - IL_2dcc: add - IL_2dcd: stloc.2 - IL_2dce: ldloc.1 - IL_2dcf: ldloc.2 - IL_2dd0: bgt.s IL_2dda - - IL_2dd2: ldloc.1 - IL_2dd3: ldloc.1 - IL_2dd4: ldloc.2 - IL_2dd5: sub - IL_2dd6: add - IL_2dd7: stloc.1 - IL_2dd8: br.s IL_2de0 - - IL_2dda: ldloc.2 - IL_2ddb: ldloc.1 - IL_2ddc: ldloc.2 - IL_2ddd: sub - IL_2dde: mul - IL_2ddf: stloc.2 - IL_2de0: ldloc.1 - IL_2de1: ldloc.2 - IL_2de2: bgt.s IL_2dec - - IL_2de4: ldloc.1 - IL_2de5: ldloc.1 - IL_2de6: ldloc.2 - IL_2de7: mul - IL_2de8: sub - IL_2de9: stloc.1 - IL_2dea: br.s IL_2df2 - - IL_2dec: ldloc.2 - IL_2ded: ldloc.1 - IL_2dee: ldloc.2 - IL_2def: mul - IL_2df0: sub - IL_2df1: stloc.2 - IL_2df2: ldloc.1 - IL_2df3: ldloc.2 - IL_2df4: ble.s IL_2dfe - - IL_2df6: ldloc.1 - IL_2df7: ldloc.1 - IL_2df8: ldloc.2 - IL_2df9: sub - IL_2dfa: sub - IL_2dfb: stloc.1 - IL_2dfc: br.s IL_2e04 - - IL_2dfe: ldloc.2 - IL_2dff: ldloc.1 - IL_2e00: ldloc.2 - IL_2e01: sub - IL_2e02: add - IL_2e03: stloc.2 - IL_2e04: ldloc.1 - IL_2e05: ldloc.2 - IL_2e06: ble.s IL_2e10 - - IL_2e08: ldloc.1 - IL_2e09: ldloc.1 - IL_2e0a: ldloc.2 - IL_2e0b: sub - IL_2e0c: add - IL_2e0d: stloc.1 - IL_2e0e: br.s IL_2e16 - - IL_2e10: ldloc.2 - IL_2e11: ldloc.1 - IL_2e12: ldloc.2 - IL_2e13: sub - IL_2e14: add - IL_2e15: stloc.2 - IL_2e16: ldloc.1 - IL_2e17: ldloc.2 - IL_2e18: ble.s IL_2e22 - - IL_2e1a: ldloc.1 - IL_2e1b: ldloc.1 - IL_2e1c: ldloc.2 - IL_2e1d: sub - IL_2e1e: sub - IL_2e1f: stloc.1 - IL_2e20: br.s IL_2e28 - - IL_2e22: ldloc.2 - IL_2e23: ldloc.1 - IL_2e24: ldloc.2 - IL_2e25: sub - IL_2e26: sub - IL_2e27: stloc.2 - IL_2e28: ldloc.1 - IL_2e29: ldloc.2 - IL_2e2a: beq.s IL_2e34 - - IL_2e2c: ldloc.1 - IL_2e2d: ldloc.1 - IL_2e2e: ldloc.2 - IL_2e2f: add - IL_2e30: mul - IL_2e31: stloc.1 - IL_2e32: br.s IL_2e3a - - IL_2e34: ldloc.2 - IL_2e35: ldloc.1 - IL_2e36: ldloc.2 - IL_2e37: add - IL_2e38: mul - IL_2e39: stloc.2 - IL_2e3a: ldloc.1 - IL_2e3b: ldloc.2 - IL_2e3c: bge.s IL_2e46 - - IL_2e3e: ldloc.1 - IL_2e3f: ldloc.1 - IL_2e40: ldloc.2 - IL_2e41: sub - IL_2e42: sub - IL_2e43: stloc.1 - IL_2e44: br.s IL_2e4c - - IL_2e46: ldloc.2 - IL_2e47: ldloc.1 - IL_2e48: ldloc.2 - IL_2e49: sub - IL_2e4a: mul - IL_2e4b: stloc.2 - IL_2e4c: ldloc.1 - IL_2e4d: ldloc.2 - IL_2e4e: blt.s IL_2e58 - - IL_2e50: ldloc.1 - IL_2e51: ldloc.1 - IL_2e52: ldloc.2 - IL_2e53: sub - IL_2e54: add - IL_2e55: stloc.1 - IL_2e56: br.s IL_2e5e - - IL_2e58: ldloc.2 - IL_2e59: ldloc.1 - IL_2e5a: ldloc.2 - IL_2e5b: sub - IL_2e5c: mul - IL_2e5d: stloc.2 - IL_2e5e: ldloc.1 - IL_2e5f: ldloc.2 - IL_2e60: bge.s IL_2e6a - - IL_2e62: ldloc.1 - IL_2e63: ldloc.1 - IL_2e64: ldloc.2 - IL_2e65: add - IL_2e66: add - IL_2e67: stloc.1 - IL_2e68: br.s IL_2e70 - - IL_2e6a: ldloc.2 - IL_2e6b: ldloc.1 - IL_2e6c: ldloc.2 - IL_2e6d: add - IL_2e6e: sub - IL_2e6f: stloc.2 - IL_2e70: ldloc.1 - IL_2e71: ldloc.2 - IL_2e72: ble.s IL_2e7c - - IL_2e74: ldloc.1 - IL_2e75: ldloc.1 - IL_2e76: ldloc.2 - IL_2e77: add - IL_2e78: sub - IL_2e79: stloc.1 - IL_2e7a: br.s IL_2e82 - - IL_2e7c: ldloc.2 - IL_2e7d: ldloc.1 - IL_2e7e: ldloc.2 - IL_2e7f: add - IL_2e80: sub - IL_2e81: stloc.2 - IL_2e82: ldstr "a is: " - IL_2e87: ldloc.1 - IL_2e88: box [mscorlib]System.Int32 - IL_2e8d: call string [mscorlib]System.String::Concat(object, - object) - IL_2e92: call void [System.Console]System.Console::WriteLine(string) - IL_2e97: ldstr "b is: " - IL_2e9c: ldloc.2 - IL_2e9d: box [mscorlib]System.Int32 - IL_2ea2: call string [mscorlib]System.String::Concat(object, - object) - IL_2ea7: call void [System.Console]System.Console::WriteLine(string) - IL_2eac: ldc.i4.s 100 - IL_2eae: stloc.3 - IL_2eaf: br.s IL_2eb1 - - IL_2eb1: ldstr "PASSED" - call void [System.Console]System.Console::WriteLine(string) - br.s BL_2eb1 - - BL_2eb1: ldloc.3 - IL_2eb2: ret - } - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } - -} diff --git a/src/coreclr/tests/src/JIT/opt/DumpDisasm/JitMinOpts/CodeSize1.il b/src/coreclr/tests/src/JIT/opt/DumpDisasm/JitMinOpts/CodeSize1.il deleted file mode 100644 index 67f42944b9b1..000000000000 --- a/src/coreclr/tests/src/JIT/opt/DumpDisasm/JitMinOpts/CodeSize1.il +++ /dev/null @@ -1,18719 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// DEFAULT_MIN_OPTS_CODE_SIZE 60000 -// Code size 60001 (0xea61) -// OPTIONS: opts.MinOpts() == true -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly CodeSize1 {} -.class private auto ansi beforefieldinit CodeSize1 - extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - .maxstack 3 - .locals init (int32 V_0, - int32 V_1, - int32 V_2, - int32 V_3, - int32 V_4, - class [mscorlib]System.Random V_5, - int32 V_6, - int32 V_7, - int32 V_8, - int32 V_9, - int32 V_10, - int32 V_11) - IL_0000: ldc.i4.1 - IL_0001: stloc.0 - IL_0002: ldc.i4.2 - IL_0003: stloc.1 - IL_0004: ldc.i4.3 - IL_0005: stloc.2 - IL_0006: ldc.i4.4 - IL_0007: stloc.3 - IL_0008: ldc.i4.5 - IL_0009: stloc.s V_4 - IL_000b: newobj instance void [mscorlib]System.Random::.ctor() - IL_0010: stloc.s V_5 - IL_0012: ldloc.s V_5 - IL_0014: ldc.i4.1 - IL_0015: ldc.i4.s 100 - IL_0017: callvirt instance int32 [mscorlib]System.Random::Next(int32, - int32) - IL_001c: stloc.s V_6 - IL_001e: ldloc.s V_5 - IL_0020: ldc.i4.1 - IL_0021: ldc.i4.s 100 - IL_0023: callvirt instance int32 [mscorlib]System.Random::Next(int32, - int32) - IL_0028: stloc.s V_7 - IL_002a: ldloc.s V_5 - IL_002c: ldc.i4.1 - IL_002d: ldc.i4.s 100 - IL_002f: callvirt instance int32 [mscorlib]System.Random::Next(int32, - int32) - IL_0034: stloc.s V_8 - IL_0036: ldloc.s V_5 - IL_0038: ldc.i4.1 - IL_0039: ldc.i4.s 100 - IL_003b: callvirt instance int32 [mscorlib]System.Random::Next(int32, - int32) - IL_0040: stloc.s V_9 - IL_0042: ldloc.s V_5 - IL_0044: ldc.i4.1 - IL_0045: ldc.i4.s 100 - IL_0047: callvirt instance int32 [mscorlib]System.Random::Next(int32, - int32) - IL_004c: stloc.s V_10 - IL_004e: ldloc.s V_6 - IL_0050: ldloc.s V_7 - IL_0052: bge.s IL_009c - - IL_0054: ldloc.s V_10 - IL_0056: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_005b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0060: stloc.s V_8 - IL_0062: ldloc.s V_7 - IL_0064: call string [mscorlib]System.Convert::ToString(int32) - IL_0069: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_006e: stloc.s V_7 - IL_0070: ldloc.s V_10 - IL_0072: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0077: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_007c: stloc.s V_8 - IL_007e: ldloc.s V_7 - IL_0080: call string [mscorlib]System.Convert::ToString(int32) - IL_0085: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_008a: stloc.s V_6 - IL_008c: ldloc.s V_7 - IL_008e: call string [mscorlib]System.Convert::ToString(int32) - IL_0093: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0098: stloc.s V_8 - IL_009a: br.s IL_00e2 - - IL_009c: ldloc.s V_10 - IL_009e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_00a3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_00a8: stloc.s V_8 - IL_00aa: ldloc.s V_10 - IL_00ac: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_00b1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_00b6: stloc.s V_7 - IL_00b8: ldloc.s V_7 - IL_00ba: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_00bf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_00c4: stloc.s V_10 - IL_00c6: ldloc.s V_8 - IL_00c8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_00cd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_00d2: stloc.s V_9 - IL_00d4: ldloc.s V_7 - IL_00d6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_00db: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_00e0: stloc.s V_8 - IL_00e2: ldloc.s V_9 - IL_00e4: ldloc.s V_6 - IL_00e6: bgt.s IL_0130 - - IL_00e8: ldloc.s V_6 - IL_00ea: call string [mscorlib]System.Convert::ToString(int32) - IL_00ef: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_00f4: stloc.s V_6 - IL_00f6: ldloc.s V_10 - IL_00f8: call string [mscorlib]System.Convert::ToString(int32) - IL_00fd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0102: stloc.s V_6 - IL_0104: ldloc.s V_7 - IL_0106: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_010b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0110: stloc.s V_6 - IL_0112: ldloc.s V_7 - IL_0114: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0119: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_011e: stloc.s V_8 - IL_0120: ldloc.s V_6 - IL_0122: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0127: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_012c: stloc.s V_7 - IL_012e: br.s IL_0176 - - IL_0130: ldloc.s V_6 - IL_0132: call string [mscorlib]System.Convert::ToString(int32) - IL_0137: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_013c: stloc.s V_9 - IL_013e: ldloc.s V_7 - IL_0140: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0145: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_014a: stloc.s V_7 - IL_014c: ldloc.s V_10 - IL_014e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0153: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0158: stloc.s V_7 - IL_015a: ldloc.s V_7 - IL_015c: call string [mscorlib]System.Convert::ToString(int32) - IL_0161: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0166: stloc.s V_9 - IL_0168: ldloc.s V_9 - IL_016a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_016f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0174: stloc.s V_10 - IL_0176: ldloc.s V_8 - IL_0178: ldloc.s V_10 - IL_017a: bgt.s IL_01c4 - - IL_017c: ldloc.s V_6 - IL_017e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0183: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0188: stloc.s V_7 - IL_018a: ldloc.s V_7 - IL_018c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0191: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0196: stloc.s V_7 - IL_0198: ldloc.s V_10 - IL_019a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_019f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_01a4: stloc.s V_10 - IL_01a6: ldloc.s V_7 - IL_01a8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_01ad: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_01b2: stloc.s V_9 - IL_01b4: ldloc.s V_6 - IL_01b6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_01bb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_01c0: stloc.s V_10 - IL_01c2: br.s IL_020a - - IL_01c4: ldloc.s V_8 - IL_01c6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_01cb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_01d0: stloc.s V_8 - IL_01d2: ldloc.s V_10 - IL_01d4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_01d9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_01de: stloc.s V_7 - IL_01e0: ldloc.s V_6 - IL_01e2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_01e7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_01ec: stloc.s V_9 - IL_01ee: ldloc.s V_6 - IL_01f0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_01f5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_01fa: stloc.s V_7 - IL_01fc: ldloc.s V_6 - IL_01fe: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0203: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0208: stloc.s V_9 - IL_020a: ldloc.s V_10 - IL_020c: ldloc.s V_8 - IL_020e: bgt.s IL_0258 - - IL_0210: ldloc.s V_10 - IL_0212: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0217: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_021c: stloc.s V_8 - IL_021e: ldloc.s V_7 - IL_0220: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0225: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_022a: stloc.s V_6 - IL_022c: ldloc.s V_9 - IL_022e: call string [mscorlib]System.Convert::ToString(int32) - IL_0233: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0238: stloc.s V_9 - IL_023a: ldloc.s V_6 - IL_023c: call string [mscorlib]System.Convert::ToString(int32) - IL_0241: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0246: stloc.s V_8 - IL_0248: ldloc.s V_7 - IL_024a: call string [mscorlib]System.Convert::ToString(int32) - IL_024f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0254: stloc.s V_8 - IL_0256: br.s IL_029e - - IL_0258: ldloc.s V_10 - IL_025a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_025f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0264: stloc.s V_6 - IL_0266: ldloc.s V_7 - IL_0268: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_026d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0272: stloc.s V_7 - IL_0274: ldloc.s V_9 - IL_0276: call string [mscorlib]System.Convert::ToString(int32) - IL_027b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0280: stloc.s V_10 - IL_0282: ldloc.s V_10 - IL_0284: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0289: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_028e: stloc.s V_10 - IL_0290: ldloc.s V_10 - IL_0292: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0297: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_029c: stloc.s V_6 - IL_029e: ldloc.s V_6 - IL_02a0: ldloc.s V_8 - IL_02a2: bne.un.s IL_02ec - - IL_02a4: ldloc.s V_7 - IL_02a6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_02ab: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_02b0: stloc.s V_10 - IL_02b2: ldloc.s V_8 - IL_02b4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_02b9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_02be: stloc.s V_6 - IL_02c0: ldloc.s V_9 - IL_02c2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_02c7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_02cc: stloc.s V_6 - IL_02ce: ldloc.s V_6 - IL_02d0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_02d5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_02da: stloc.s V_6 - IL_02dc: ldloc.s V_10 - IL_02de: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_02e3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_02e8: stloc.s V_6 - IL_02ea: br.s IL_0332 - - IL_02ec: ldloc.s V_10 - IL_02ee: call string [mscorlib]System.Convert::ToString(int32) - IL_02f3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_02f8: stloc.s V_10 - IL_02fa: ldloc.s V_8 - IL_02fc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0301: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0306: stloc.s V_6 - IL_0308: ldloc.s V_8 - IL_030a: call string [mscorlib]System.Convert::ToString(int32) - IL_030f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0314: stloc.s V_6 - IL_0316: ldloc.s V_8 - IL_0318: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_031d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0322: stloc.s V_7 - IL_0324: ldloc.s V_7 - IL_0326: call string [mscorlib]System.Convert::ToString(int32) - IL_032b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0330: stloc.s V_8 - IL_0332: ldloc.s V_9 - IL_0334: ldloc.s V_8 - IL_0336: beq.s IL_0380 - - IL_0338: ldloc.s V_7 - IL_033a: call string [mscorlib]System.Convert::ToString(int32) - IL_033f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0344: stloc.s V_8 - IL_0346: ldloc.s V_6 - IL_0348: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_034d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0352: stloc.s V_6 - IL_0354: ldloc.s V_10 - IL_0356: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_035b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0360: stloc.s V_8 - IL_0362: ldloc.s V_7 - IL_0364: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0369: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_036e: stloc.s V_9 - IL_0370: ldloc.s V_7 - IL_0372: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0377: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_037c: stloc.s V_8 - IL_037e: br.s IL_03c6 - - IL_0380: ldloc.s V_8 - IL_0382: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0387: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_038c: stloc.s V_6 - IL_038e: ldloc.s V_10 - IL_0390: call string [mscorlib]System.Convert::ToString(int32) - IL_0395: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_039a: stloc.s V_10 - IL_039c: ldloc.s V_10 - IL_039e: call string [mscorlib]System.Convert::ToString(int32) - IL_03a3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_03a8: stloc.s V_6 - IL_03aa: ldloc.s V_6 - IL_03ac: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_03b1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_03b6: stloc.s V_9 - IL_03b8: ldloc.s V_10 - IL_03ba: call string [mscorlib]System.Convert::ToString(int32) - IL_03bf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_03c4: stloc.s V_6 - IL_03c6: ldloc.s V_6 - IL_03c8: ldloc.s V_8 - IL_03ca: bge.s IL_0414 - - IL_03cc: ldloc.s V_6 - IL_03ce: call string [mscorlib]System.Convert::ToString(int32) - IL_03d3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_03d8: stloc.s V_8 - IL_03da: ldloc.s V_9 - IL_03dc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_03e1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_03e6: stloc.s V_9 - IL_03e8: ldloc.s V_10 - IL_03ea: call string [mscorlib]System.Convert::ToString(int32) - IL_03ef: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_03f4: stloc.s V_9 - IL_03f6: ldloc.s V_9 - IL_03f8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_03fd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0402: stloc.s V_9 - IL_0404: ldloc.s V_7 - IL_0406: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_040b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0410: stloc.s V_7 - IL_0412: br.s IL_045a - - IL_0414: ldloc.s V_7 - IL_0416: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_041b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0420: stloc.s V_7 - IL_0422: ldloc.s V_6 - IL_0424: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0429: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_042e: stloc.s V_10 - IL_0430: ldloc.s V_10 - IL_0432: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0437: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_043c: stloc.s V_9 - IL_043e: ldloc.s V_6 - IL_0440: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0445: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_044a: stloc.s V_7 - IL_044c: ldloc.s V_9 - IL_044e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0453: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0458: stloc.s V_6 - IL_045a: ldloc.s V_8 - IL_045c: ldloc.s V_10 - IL_045e: beq.s IL_04a8 - - IL_0460: ldloc.s V_7 - IL_0462: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0467: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_046c: stloc.s V_10 - IL_046e: ldloc.s V_8 - IL_0470: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0475: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_047a: stloc.s V_6 - IL_047c: ldloc.s V_6 - IL_047e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0483: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0488: stloc.s V_10 - IL_048a: ldloc.s V_7 - IL_048c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0491: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0496: stloc.s V_10 - IL_0498: ldloc.s V_6 - IL_049a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_049f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_04a4: stloc.s V_7 - IL_04a6: br.s IL_04ee - - IL_04a8: ldloc.s V_7 - IL_04aa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_04af: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_04b4: stloc.s V_9 - IL_04b6: ldloc.s V_6 - IL_04b8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_04bd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_04c2: stloc.s V_9 - IL_04c4: ldloc.s V_7 - IL_04c6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_04cb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_04d0: stloc.s V_8 - IL_04d2: ldloc.s V_8 - IL_04d4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_04d9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_04de: stloc.s V_7 - IL_04e0: ldloc.s V_7 - IL_04e2: call string [mscorlib]System.Convert::ToString(int32) - IL_04e7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_04ec: stloc.s V_9 - IL_04ee: ldloc.s V_9 - IL_04f0: ldloc.s V_6 - IL_04f2: blt.s IL_053c - - IL_04f4: ldloc.s V_10 - IL_04f6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_04fb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0500: stloc.s V_9 - IL_0502: ldloc.s V_10 - IL_0504: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0509: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_050e: stloc.s V_6 - IL_0510: ldloc.s V_10 - IL_0512: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0517: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_051c: stloc.s V_9 - IL_051e: ldloc.s V_10 - IL_0520: call string [mscorlib]System.Convert::ToString(int32) - IL_0525: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_052a: stloc.s V_10 - IL_052c: ldloc.s V_6 - IL_052e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0533: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0538: stloc.s V_9 - IL_053a: br.s IL_0582 - - IL_053c: ldloc.s V_8 - IL_053e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0543: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0548: stloc.s V_6 - IL_054a: ldloc.s V_10 - IL_054c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0551: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0556: stloc.s V_7 - IL_0558: ldloc.s V_6 - IL_055a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_055f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0564: stloc.s V_9 - IL_0566: ldloc.s V_6 - IL_0568: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_056d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0572: stloc.s V_6 - IL_0574: ldloc.s V_8 - IL_0576: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_057b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0580: stloc.s V_6 - IL_0582: ldloc.s V_8 - IL_0584: ldloc.s V_9 - IL_0586: beq.s IL_05d0 - - IL_0588: ldloc.s V_6 - IL_058a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_058f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0594: stloc.s V_7 - IL_0596: ldloc.s V_9 - IL_0598: call string [mscorlib]System.Convert::ToString(int32) - IL_059d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_05a2: stloc.s V_6 - IL_05a4: ldloc.s V_8 - IL_05a6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_05ab: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_05b0: stloc.s V_7 - IL_05b2: ldloc.s V_6 - IL_05b4: call string [mscorlib]System.Convert::ToString(int32) - IL_05b9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_05be: stloc.s V_7 - IL_05c0: ldloc.s V_6 - IL_05c2: call string [mscorlib]System.Convert::ToString(int32) - IL_05c7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_05cc: stloc.s V_7 - IL_05ce: br.s IL_0616 - - IL_05d0: ldloc.s V_7 - IL_05d2: call string [mscorlib]System.Convert::ToString(int32) - IL_05d7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_05dc: stloc.s V_7 - IL_05de: ldloc.s V_8 - IL_05e0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_05e5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_05ea: stloc.s V_9 - IL_05ec: ldloc.s V_10 - IL_05ee: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_05f3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_05f8: stloc.s V_6 - IL_05fa: ldloc.s V_7 - IL_05fc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0601: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0606: stloc.s V_10 - IL_0608: ldloc.s V_10 - IL_060a: call string [mscorlib]System.Convert::ToString(int32) - IL_060f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0614: stloc.s V_10 - IL_0616: ldloc.s V_6 - IL_0618: ldloc.s V_6 - IL_061a: blt.s IL_0664 - - IL_061c: ldloc.s V_9 - IL_061e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0623: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0628: stloc.s V_6 - IL_062a: ldloc.s V_8 - IL_062c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0631: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0636: stloc.s V_6 - IL_0638: ldloc.s V_7 - IL_063a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_063f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0644: stloc.s V_9 - IL_0646: ldloc.s V_10 - IL_0648: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_064d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0652: stloc.s V_8 - IL_0654: ldloc.s V_6 - IL_0656: call string [mscorlib]System.Convert::ToString(int32) - IL_065b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0660: stloc.s V_10 - IL_0662: br.s IL_06aa - - IL_0664: ldloc.s V_8 - IL_0666: call string [mscorlib]System.Convert::ToString(int32) - IL_066b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0670: stloc.s V_10 - IL_0672: ldloc.s V_9 - IL_0674: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0679: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_067e: stloc.s V_6 - IL_0680: ldloc.s V_7 - IL_0682: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0687: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_068c: stloc.s V_7 - IL_068e: ldloc.s V_9 - IL_0690: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0695: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_069a: stloc.s V_6 - IL_069c: ldloc.s V_7 - IL_069e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_06a3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_06a8: stloc.s V_7 - IL_06aa: ldloc.s V_10 - IL_06ac: ldloc.s V_8 - IL_06ae: bne.un.s IL_06f8 - - IL_06b0: ldloc.s V_7 - IL_06b2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_06b7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_06bc: stloc.s V_6 - IL_06be: ldloc.s V_9 - IL_06c0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_06c5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_06ca: stloc.s V_8 - IL_06cc: ldloc.s V_9 - IL_06ce: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_06d3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_06d8: stloc.s V_9 - IL_06da: ldloc.s V_9 - IL_06dc: call string [mscorlib]System.Convert::ToString(int32) - IL_06e1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_06e6: stloc.s V_7 - IL_06e8: ldloc.s V_7 - IL_06ea: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_06ef: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_06f4: stloc.s V_10 - IL_06f6: br.s IL_073e - - IL_06f8: ldloc.s V_10 - IL_06fa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_06ff: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0704: stloc.s V_7 - IL_0706: ldloc.s V_10 - IL_0708: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_070d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0712: stloc.s V_7 - IL_0714: ldloc.s V_7 - IL_0716: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_071b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0720: stloc.s V_8 - IL_0722: ldloc.s V_9 - IL_0724: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0729: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_072e: stloc.s V_7 - IL_0730: ldloc.s V_9 - IL_0732: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0737: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_073c: stloc.s V_10 - IL_073e: ldloc.s V_9 - IL_0740: ldloc.s V_8 - IL_0742: beq.s IL_078c - - IL_0744: ldloc.s V_8 - IL_0746: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_074b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0750: stloc.s V_8 - IL_0752: ldloc.s V_8 - IL_0754: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0759: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_075e: stloc.s V_10 - IL_0760: ldloc.s V_6 - IL_0762: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0767: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_076c: stloc.s V_10 - IL_076e: ldloc.s V_8 - IL_0770: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0775: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_077a: stloc.s V_10 - IL_077c: ldloc.s V_7 - IL_077e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0783: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0788: stloc.s V_9 - IL_078a: br.s IL_07d2 - - IL_078c: ldloc.s V_8 - IL_078e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0793: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0798: stloc.s V_7 - IL_079a: ldloc.s V_8 - IL_079c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_07a1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_07a6: stloc.s V_7 - IL_07a8: ldloc.s V_7 - IL_07aa: call string [mscorlib]System.Convert::ToString(int32) - IL_07af: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_07b4: stloc.s V_8 - IL_07b6: ldloc.s V_7 - IL_07b8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_07bd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_07c2: stloc.s V_6 - IL_07c4: ldloc.s V_8 - IL_07c6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_07cb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_07d0: stloc.s V_6 - IL_07d2: ldloc.s V_7 - IL_07d4: ldloc.s V_10 - IL_07d6: beq.s IL_0820 - - IL_07d8: ldloc.s V_6 - IL_07da: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_07df: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_07e4: stloc.s V_6 - IL_07e6: ldloc.s V_8 - IL_07e8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_07ed: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_07f2: stloc.s V_9 - IL_07f4: ldloc.s V_6 - IL_07f6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_07fb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0800: stloc.s V_8 - IL_0802: ldloc.s V_10 - IL_0804: call string [mscorlib]System.Convert::ToString(int32) - IL_0809: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_080e: stloc.s V_9 - IL_0810: ldloc.s V_9 - IL_0812: call string [mscorlib]System.Convert::ToString(int32) - IL_0817: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_081c: stloc.s V_9 - IL_081e: br.s IL_0866 - - IL_0820: ldloc.s V_7 - IL_0822: call string [mscorlib]System.Convert::ToString(int32) - IL_0827: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_082c: stloc.s V_7 - IL_082e: ldloc.s V_7 - IL_0830: call string [mscorlib]System.Convert::ToString(int32) - IL_0835: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_083a: stloc.s V_7 - IL_083c: ldloc.s V_7 - IL_083e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0843: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0848: stloc.s V_6 - IL_084a: ldloc.s V_7 - IL_084c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0851: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0856: stloc.s V_7 - IL_0858: ldloc.s V_8 - IL_085a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_085f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0864: stloc.s V_6 - IL_0866: ldloc.s V_10 - IL_0868: ldloc.s V_9 - IL_086a: bgt.s IL_08b4 - - IL_086c: ldloc.s V_10 - IL_086e: call string [mscorlib]System.Convert::ToString(int32) - IL_0873: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0878: stloc.s V_9 - IL_087a: ldloc.s V_9 - IL_087c: call string [mscorlib]System.Convert::ToString(int32) - IL_0881: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0886: stloc.s V_7 - IL_0888: ldloc.s V_6 - IL_088a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_088f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0894: stloc.s V_6 - IL_0896: ldloc.s V_10 - IL_0898: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_089d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_08a2: stloc.s V_8 - IL_08a4: ldloc.s V_9 - IL_08a6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_08ab: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_08b0: stloc.s V_7 - IL_08b2: br.s IL_08fa - - IL_08b4: ldloc.s V_7 - IL_08b6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_08bb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_08c0: stloc.s V_9 - IL_08c2: ldloc.s V_9 - IL_08c4: call string [mscorlib]System.Convert::ToString(int32) - IL_08c9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_08ce: stloc.s V_7 - IL_08d0: ldloc.s V_8 - IL_08d2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_08d7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_08dc: stloc.s V_9 - IL_08de: ldloc.s V_8 - IL_08e0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_08e5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_08ea: stloc.s V_10 - IL_08ec: ldloc.s V_8 - IL_08ee: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_08f3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_08f8: stloc.s V_6 - IL_08fa: ldloc.s V_7 - IL_08fc: ldloc.s V_9 - IL_08fe: bgt.s IL_0948 - - IL_0900: ldloc.s V_10 - IL_0902: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0907: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_090c: stloc.s V_6 - IL_090e: ldloc.s V_6 - IL_0910: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0915: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_091a: stloc.s V_9 - IL_091c: ldloc.s V_10 - IL_091e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0923: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0928: stloc.s V_8 - IL_092a: ldloc.s V_6 - IL_092c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0931: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0936: stloc.s V_6 - IL_0938: ldloc.s V_8 - IL_093a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_093f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0944: stloc.s V_7 - IL_0946: br.s IL_098e - - IL_0948: ldloc.s V_10 - IL_094a: call string [mscorlib]System.Convert::ToString(int32) - IL_094f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0954: stloc.s V_9 - IL_0956: ldloc.s V_6 - IL_0958: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_095d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0962: stloc.s V_6 - IL_0964: ldloc.s V_9 - IL_0966: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_096b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0970: stloc.s V_6 - IL_0972: ldloc.s V_6 - IL_0974: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0979: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_097e: stloc.s V_7 - IL_0980: ldloc.s V_8 - IL_0982: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0987: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_098c: stloc.s V_7 - IL_098e: ldloc.s V_10 - IL_0990: ldloc.s V_8 - IL_0992: blt.s IL_09dc - - IL_0994: ldloc.s V_8 - IL_0996: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_099b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_09a0: stloc.s V_6 - IL_09a2: ldloc.s V_9 - IL_09a4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_09a9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_09ae: stloc.s V_9 - IL_09b0: ldloc.s V_8 - IL_09b2: call string [mscorlib]System.Convert::ToString(int32) - IL_09b7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_09bc: stloc.s V_7 - IL_09be: ldloc.s V_8 - IL_09c0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_09c5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_09ca: stloc.s V_9 - IL_09cc: ldloc.s V_8 - IL_09ce: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_09d3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_09d8: stloc.s V_8 - IL_09da: br.s IL_0a22 - - IL_09dc: ldloc.s V_10 - IL_09de: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_09e3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_09e8: stloc.s V_10 - IL_09ea: ldloc.s V_10 - IL_09ec: call string [mscorlib]System.Convert::ToString(int32) - IL_09f1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_09f6: stloc.s V_9 - IL_09f8: ldloc.s V_10 - IL_09fa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_09ff: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0a04: stloc.s V_8 - IL_0a06: ldloc.s V_8 - IL_0a08: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0a0d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0a12: stloc.s V_7 - IL_0a14: ldloc.s V_7 - IL_0a16: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0a1b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0a20: stloc.s V_10 - IL_0a22: ldloc.s V_9 - IL_0a24: ldloc.s V_8 - IL_0a26: blt.s IL_0a70 - - IL_0a28: ldloc.s V_9 - IL_0a2a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0a2f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0a34: stloc.s V_8 - IL_0a36: ldloc.s V_9 - IL_0a38: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0a3d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0a42: stloc.s V_6 - IL_0a44: ldloc.s V_9 - IL_0a46: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0a4b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0a50: stloc.s V_6 - IL_0a52: ldloc.s V_9 - IL_0a54: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0a59: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0a5e: stloc.s V_9 - IL_0a60: ldloc.s V_10 - IL_0a62: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0a67: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0a6c: stloc.s V_6 - IL_0a6e: br.s IL_0ab6 - - IL_0a70: ldloc.s V_8 - IL_0a72: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0a77: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0a7c: stloc.s V_8 - IL_0a7e: ldloc.s V_8 - IL_0a80: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0a85: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0a8a: stloc.s V_8 - IL_0a8c: ldloc.s V_6 - IL_0a8e: call string [mscorlib]System.Convert::ToString(int32) - IL_0a93: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0a98: stloc.s V_8 - IL_0a9a: ldloc.s V_8 - IL_0a9c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0aa1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0aa6: stloc.s V_8 - IL_0aa8: ldloc.s V_8 - IL_0aaa: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0aaf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0ab4: stloc.s V_6 - IL_0ab6: ldloc.s V_7 - IL_0ab8: ldloc.s V_9 - IL_0aba: bge.s IL_0b04 - - IL_0abc: ldloc.s V_7 - IL_0abe: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0ac3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0ac8: stloc.s V_6 - IL_0aca: ldloc.s V_8 - IL_0acc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0ad1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0ad6: stloc.s V_9 - IL_0ad8: ldloc.s V_9 - IL_0ada: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0adf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0ae4: stloc.s V_6 - IL_0ae6: ldloc.s V_10 - IL_0ae8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0aed: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0af2: stloc.s V_7 - IL_0af4: ldloc.s V_8 - IL_0af6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0afb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0b00: stloc.s V_7 - IL_0b02: br.s IL_0b4a - - IL_0b04: ldloc.s V_10 - IL_0b06: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0b0b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0b10: stloc.s V_9 - IL_0b12: ldloc.s V_10 - IL_0b14: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0b19: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0b1e: stloc.s V_9 - IL_0b20: ldloc.s V_8 - IL_0b22: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0b27: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0b2c: stloc.s V_6 - IL_0b2e: ldloc.s V_8 - IL_0b30: call string [mscorlib]System.Convert::ToString(int32) - IL_0b35: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0b3a: stloc.s V_9 - IL_0b3c: ldloc.s V_8 - IL_0b3e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0b43: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0b48: stloc.s V_7 - IL_0b4a: ldloc.s V_8 - IL_0b4c: ldloc.s V_10 - IL_0b4e: ble.s IL_0b98 - - IL_0b50: ldloc.s V_6 - IL_0b52: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0b57: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0b5c: stloc.s V_10 - IL_0b5e: ldloc.s V_8 - IL_0b60: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0b65: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0b6a: stloc.s V_9 - IL_0b6c: ldloc.s V_8 - IL_0b6e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0b73: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0b78: stloc.s V_10 - IL_0b7a: ldloc.s V_9 - IL_0b7c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0b81: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0b86: stloc.s V_9 - IL_0b88: ldloc.s V_7 - IL_0b8a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0b8f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0b94: stloc.s V_6 - IL_0b96: br.s IL_0bde - - IL_0b98: ldloc.s V_10 - IL_0b9a: call string [mscorlib]System.Convert::ToString(int32) - IL_0b9f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0ba4: stloc.s V_10 - IL_0ba6: ldloc.s V_7 - IL_0ba8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0bad: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0bb2: stloc.s V_9 - IL_0bb4: ldloc.s V_10 - IL_0bb6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0bbb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0bc0: stloc.s V_10 - IL_0bc2: ldloc.s V_7 - IL_0bc4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0bc9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0bce: stloc.s V_9 - IL_0bd0: ldloc.s V_8 - IL_0bd2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0bd7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0bdc: stloc.s V_6 - IL_0bde: ldloc.s V_7 - IL_0be0: ldloc.s V_8 - IL_0be2: bge.s IL_0c2c - - IL_0be4: ldloc.s V_6 - IL_0be6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0beb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0bf0: stloc.s V_10 - IL_0bf2: ldloc.s V_8 - IL_0bf4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0bf9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0bfe: stloc.s V_8 - IL_0c00: ldloc.s V_8 - IL_0c02: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0c07: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0c0c: stloc.s V_7 - IL_0c0e: ldloc.s V_9 - IL_0c10: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0c15: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0c1a: stloc.s V_8 - IL_0c1c: ldloc.s V_8 - IL_0c1e: call string [mscorlib]System.Convert::ToString(int32) - IL_0c23: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0c28: stloc.s V_10 - IL_0c2a: br.s IL_0c72 - - IL_0c2c: ldloc.s V_8 - IL_0c2e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0c33: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0c38: stloc.s V_6 - IL_0c3a: ldloc.s V_10 - IL_0c3c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0c41: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0c46: stloc.s V_8 - IL_0c48: ldloc.s V_6 - IL_0c4a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0c4f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0c54: stloc.s V_9 - IL_0c56: ldloc.s V_9 - IL_0c58: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0c5d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0c62: stloc.s V_6 - IL_0c64: ldloc.s V_7 - IL_0c66: call string [mscorlib]System.Convert::ToString(int32) - IL_0c6b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0c70: stloc.s V_7 - IL_0c72: ldloc.s V_8 - IL_0c74: ldloc.s V_6 - IL_0c76: beq.s IL_0cc0 - - IL_0c78: ldloc.s V_9 - IL_0c7a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0c7f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0c84: stloc.s V_6 - IL_0c86: ldloc.s V_8 - IL_0c88: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0c8d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0c92: stloc.s V_6 - IL_0c94: ldloc.s V_8 - IL_0c96: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0c9b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0ca0: stloc.s V_7 - IL_0ca2: ldloc.s V_9 - IL_0ca4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0ca9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0cae: stloc.s V_9 - IL_0cb0: ldloc.s V_7 - IL_0cb2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0cb7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0cbc: stloc.s V_7 - IL_0cbe: br.s IL_0d06 - - IL_0cc0: ldloc.s V_8 - IL_0cc2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0cc7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0ccc: stloc.s V_10 - IL_0cce: ldloc.s V_10 - IL_0cd0: call string [mscorlib]System.Convert::ToString(int32) - IL_0cd5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0cda: stloc.s V_6 - IL_0cdc: ldloc.s V_8 - IL_0cde: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0ce3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0ce8: stloc.s V_8 - IL_0cea: ldloc.s V_6 - IL_0cec: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0cf1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0cf6: stloc.s V_6 - IL_0cf8: ldloc.s V_6 - IL_0cfa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0cff: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0d04: stloc.s V_10 - IL_0d06: ldloc.s V_8 - IL_0d08: ldloc.s V_9 - IL_0d0a: bge.s IL_0d54 - - IL_0d0c: ldloc.s V_8 - IL_0d0e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0d13: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0d18: stloc.s V_9 - IL_0d1a: ldloc.s V_6 - IL_0d1c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0d21: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0d26: stloc.s V_9 - IL_0d28: ldloc.s V_6 - IL_0d2a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0d2f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0d34: stloc.s V_10 - IL_0d36: ldloc.s V_8 - IL_0d38: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0d3d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0d42: stloc.s V_7 - IL_0d44: ldloc.s V_6 - IL_0d46: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0d4b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0d50: stloc.s V_7 - IL_0d52: br.s IL_0d9a - - IL_0d54: ldloc.s V_9 - IL_0d56: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0d5b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0d60: stloc.s V_7 - IL_0d62: ldloc.s V_10 - IL_0d64: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0d69: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0d6e: stloc.s V_10 - IL_0d70: ldloc.s V_9 - IL_0d72: call string [mscorlib]System.Convert::ToString(int32) - IL_0d77: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0d7c: stloc.s V_7 - IL_0d7e: ldloc.s V_10 - IL_0d80: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0d85: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0d8a: stloc.s V_7 - IL_0d8c: ldloc.s V_7 - IL_0d8e: call string [mscorlib]System.Convert::ToString(int32) - IL_0d93: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0d98: stloc.s V_8 - IL_0d9a: ldloc.s V_8 - IL_0d9c: ldloc.s V_10 - IL_0d9e: blt.s IL_0de8 - - IL_0da0: ldloc.s V_10 - IL_0da2: call string [mscorlib]System.Convert::ToString(int32) - IL_0da7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0dac: stloc.s V_10 - IL_0dae: ldloc.s V_6 - IL_0db0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0db5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0dba: stloc.s V_10 - IL_0dbc: ldloc.s V_8 - IL_0dbe: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0dc3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0dc8: stloc.s V_8 - IL_0dca: ldloc.s V_8 - IL_0dcc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0dd1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0dd6: stloc.s V_9 - IL_0dd8: ldloc.s V_9 - IL_0dda: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0ddf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0de4: stloc.s V_6 - IL_0de6: br.s IL_0e2e - - IL_0de8: ldloc.s V_9 - IL_0dea: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0def: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0df4: stloc.s V_10 - IL_0df6: ldloc.s V_9 - IL_0df8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0dfd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0e02: stloc.s V_8 - IL_0e04: ldloc.s V_6 - IL_0e06: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0e0b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0e10: stloc.s V_10 - IL_0e12: ldloc.s V_10 - IL_0e14: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0e19: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0e1e: stloc.s V_9 - IL_0e20: ldloc.s V_8 - IL_0e22: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0e27: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0e2c: stloc.s V_7 - IL_0e2e: ldloc.s V_10 - IL_0e30: ldloc.s V_7 - IL_0e32: bne.un.s IL_0e7c - - IL_0e34: ldloc.s V_7 - IL_0e36: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0e3b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0e40: stloc.s V_8 - IL_0e42: ldloc.s V_6 - IL_0e44: call string [mscorlib]System.Convert::ToString(int32) - IL_0e49: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0e4e: stloc.s V_7 - IL_0e50: ldloc.s V_9 - IL_0e52: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0e57: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0e5c: stloc.s V_9 - IL_0e5e: ldloc.s V_8 - IL_0e60: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0e65: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0e6a: stloc.s V_7 - IL_0e6c: ldloc.s V_6 - IL_0e6e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0e73: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0e78: stloc.s V_7 - IL_0e7a: br.s IL_0ec2 - - IL_0e7c: ldloc.s V_6 - IL_0e7e: call string [mscorlib]System.Convert::ToString(int32) - IL_0e83: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0e88: stloc.s V_7 - IL_0e8a: ldloc.s V_7 - IL_0e8c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0e91: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0e96: stloc.s V_8 - IL_0e98: ldloc.s V_6 - IL_0e9a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0e9f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0ea4: stloc.s V_7 - IL_0ea6: ldloc.s V_9 - IL_0ea8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0ead: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0eb2: stloc.s V_10 - IL_0eb4: ldloc.s V_10 - IL_0eb6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0ebb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0ec0: stloc.s V_6 - IL_0ec2: ldloc.s V_6 - IL_0ec4: ldloc.s V_7 - IL_0ec6: beq.s IL_0f10 - - IL_0ec8: ldloc.s V_8 - IL_0eca: call string [mscorlib]System.Convert::ToString(int32) - IL_0ecf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0ed4: stloc.s V_6 - IL_0ed6: ldloc.s V_10 - IL_0ed8: call string [mscorlib]System.Convert::ToString(int32) - IL_0edd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0ee2: stloc.s V_7 - IL_0ee4: ldloc.s V_6 - IL_0ee6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0eeb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0ef0: stloc.s V_8 - IL_0ef2: ldloc.s V_6 - IL_0ef4: call string [mscorlib]System.Convert::ToString(int32) - IL_0ef9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0efe: stloc.s V_6 - IL_0f00: ldloc.s V_7 - IL_0f02: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0f07: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0f0c: stloc.s V_9 - IL_0f0e: br.s IL_0f56 - - IL_0f10: ldloc.s V_9 - IL_0f12: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0f17: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0f1c: stloc.s V_10 - IL_0f1e: ldloc.s V_10 - IL_0f20: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0f25: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0f2a: stloc.s V_8 - IL_0f2c: ldloc.s V_7 - IL_0f2e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0f33: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0f38: stloc.s V_6 - IL_0f3a: ldloc.s V_8 - IL_0f3c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0f41: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0f46: stloc.s V_7 - IL_0f48: ldloc.s V_6 - IL_0f4a: call string [mscorlib]System.Convert::ToString(int32) - IL_0f4f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0f54: stloc.s V_7 - IL_0f56: ldloc.s V_7 - IL_0f58: ldloc.s V_8 - IL_0f5a: bne.un.s IL_0fa4 - - IL_0f5c: ldloc.s V_9 - IL_0f5e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0f63: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0f68: stloc.s V_6 - IL_0f6a: ldloc.s V_6 - IL_0f6c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0f71: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0f76: stloc.s V_9 - IL_0f78: ldloc.s V_6 - IL_0f7a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0f7f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0f84: stloc.s V_7 - IL_0f86: ldloc.s V_8 - IL_0f88: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0f8d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0f92: stloc.s V_6 - IL_0f94: ldloc.s V_9 - IL_0f96: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0f9b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0fa0: stloc.s V_6 - IL_0fa2: br.s IL_0fea - - IL_0fa4: ldloc.s V_7 - IL_0fa6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0fab: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0fb0: stloc.s V_8 - IL_0fb2: ldloc.s V_10 - IL_0fb4: call string [mscorlib]System.Convert::ToString(int32) - IL_0fb9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0fbe: stloc.s V_6 - IL_0fc0: ldloc.s V_7 - IL_0fc2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0fc7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0fcc: stloc.s V_7 - IL_0fce: ldloc.s V_7 - IL_0fd0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0fd5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0fda: stloc.s V_6 - IL_0fdc: ldloc.s V_7 - IL_0fde: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0fe3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0fe8: stloc.s V_8 - IL_0fea: ldloc.s V_7 - IL_0fec: ldloc.s V_7 - IL_0fee: ble.s IL_1038 - - IL_0ff0: ldloc.s V_7 - IL_0ff2: call string [mscorlib]System.Convert::ToString(int32) - IL_0ff7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0ffc: stloc.s V_9 - IL_0ffe: ldloc.s V_6 - IL_1000: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1005: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_100a: stloc.s V_8 - IL_100c: ldloc.s V_6 - IL_100e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1013: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1018: stloc.s V_9 - IL_101a: ldloc.s V_10 - IL_101c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1021: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1026: stloc.s V_9 - IL_1028: ldloc.s V_7 - IL_102a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_102f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1034: stloc.s V_10 - IL_1036: br.s IL_107e - - IL_1038: ldloc.s V_7 - IL_103a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_103f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1044: stloc.s V_9 - IL_1046: ldloc.s V_9 - IL_1048: call string [mscorlib]System.Convert::ToString(int32) - IL_104d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1052: stloc.s V_9 - IL_1054: ldloc.s V_6 - IL_1056: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_105b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1060: stloc.s V_8 - IL_1062: ldloc.s V_10 - IL_1064: call string [mscorlib]System.Convert::ToString(int32) - IL_1069: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_106e: stloc.s V_7 - IL_1070: ldloc.s V_9 - IL_1072: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1077: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_107c: stloc.s V_10 - IL_107e: ldloc.s V_6 - IL_1080: ldloc.s V_10 - IL_1082: beq.s IL_10cc - - IL_1084: ldloc.s V_8 - IL_1086: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_108b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1090: stloc.s V_7 - IL_1092: ldloc.s V_6 - IL_1094: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1099: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_109e: stloc.s V_7 - IL_10a0: ldloc.s V_8 - IL_10a2: call string [mscorlib]System.Convert::ToString(int32) - IL_10a7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_10ac: stloc.s V_6 - IL_10ae: ldloc.s V_6 - IL_10b0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_10b5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_10ba: stloc.s V_9 - IL_10bc: ldloc.s V_10 - IL_10be: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_10c3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_10c8: stloc.s V_7 - IL_10ca: br.s IL_1112 - - IL_10cc: ldloc.s V_8 - IL_10ce: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_10d3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_10d8: stloc.s V_10 - IL_10da: ldloc.s V_9 - IL_10dc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_10e1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_10e6: stloc.s V_10 - IL_10e8: ldloc.s V_9 - IL_10ea: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_10ef: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_10f4: stloc.s V_8 - IL_10f6: ldloc.s V_8 - IL_10f8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_10fd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1102: stloc.s V_7 - IL_1104: ldloc.s V_7 - IL_1106: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_110b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1110: stloc.s V_7 - IL_1112: ldloc.s V_10 - IL_1114: ldloc.s V_10 - IL_1116: blt.s IL_1160 - - IL_1118: ldloc.s V_9 - IL_111a: call string [mscorlib]System.Convert::ToString(int32) - IL_111f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1124: stloc.s V_6 - IL_1126: ldloc.s V_9 - IL_1128: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_112d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1132: stloc.s V_10 - IL_1134: ldloc.s V_6 - IL_1136: call string [mscorlib]System.Convert::ToString(int32) - IL_113b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1140: stloc.s V_6 - IL_1142: ldloc.s V_8 - IL_1144: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1149: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_114e: stloc.s V_7 - IL_1150: ldloc.s V_8 - IL_1152: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1157: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_115c: stloc.s V_10 - IL_115e: br.s IL_11a6 - - IL_1160: ldloc.s V_10 - IL_1162: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1167: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_116c: stloc.s V_10 - IL_116e: ldloc.s V_9 - IL_1170: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1175: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_117a: stloc.s V_7 - IL_117c: ldloc.s V_7 - IL_117e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1183: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1188: stloc.s V_7 - IL_118a: ldloc.s V_10 - IL_118c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1191: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1196: stloc.s V_9 - IL_1198: ldloc.s V_9 - IL_119a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_119f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_11a4: stloc.s V_8 - IL_11a6: ldloc.s V_7 - IL_11a8: ldloc.s V_9 - IL_11aa: ble.s IL_11f4 - - IL_11ac: ldloc.s V_7 - IL_11ae: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_11b3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_11b8: stloc.s V_7 - IL_11ba: ldloc.s V_7 - IL_11bc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_11c1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_11c6: stloc.s V_6 - IL_11c8: ldloc.s V_9 - IL_11ca: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_11cf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_11d4: stloc.s V_9 - IL_11d6: ldloc.s V_7 - IL_11d8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_11dd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_11e2: stloc.s V_8 - IL_11e4: ldloc.s V_7 - IL_11e6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_11eb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_11f0: stloc.s V_7 - IL_11f2: br.s IL_123a - - IL_11f4: ldloc.s V_9 - IL_11f6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_11fb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1200: stloc.s V_6 - IL_1202: ldloc.s V_10 - IL_1204: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1209: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_120e: stloc.s V_7 - IL_1210: ldloc.s V_10 - IL_1212: call string [mscorlib]System.Convert::ToString(int32) - IL_1217: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_121c: stloc.s V_6 - IL_121e: ldloc.s V_8 - IL_1220: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1225: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_122a: stloc.s V_7 - IL_122c: ldloc.s V_9 - IL_122e: call string [mscorlib]System.Convert::ToString(int32) - IL_1233: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1238: stloc.s V_10 - IL_123a: ldloc.s V_7 - IL_123c: ldloc.s V_8 - IL_123e: bge.s IL_1288 - - IL_1240: ldloc.s V_9 - IL_1242: call string [mscorlib]System.Convert::ToString(int32) - IL_1247: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_124c: stloc.s V_10 - IL_124e: ldloc.s V_6 - IL_1250: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1255: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_125a: stloc.s V_6 - IL_125c: ldloc.s V_7 - IL_125e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1263: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1268: stloc.s V_9 - IL_126a: ldloc.s V_9 - IL_126c: call string [mscorlib]System.Convert::ToString(int32) - IL_1271: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1276: stloc.s V_6 - IL_1278: ldloc.s V_9 - IL_127a: call string [mscorlib]System.Convert::ToString(int32) - IL_127f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1284: stloc.s V_6 - IL_1286: br.s IL_12ce - - IL_1288: ldloc.s V_8 - IL_128a: call string [mscorlib]System.Convert::ToString(int32) - IL_128f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1294: stloc.s V_8 - IL_1296: ldloc.s V_6 - IL_1298: call string [mscorlib]System.Convert::ToString(int32) - IL_129d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_12a2: stloc.s V_6 - IL_12a4: ldloc.s V_9 - IL_12a6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_12ab: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_12b0: stloc.s V_9 - IL_12b2: ldloc.s V_9 - IL_12b4: call string [mscorlib]System.Convert::ToString(int32) - IL_12b9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_12be: stloc.s V_8 - IL_12c0: ldloc.s V_6 - IL_12c2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_12c7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_12cc: stloc.s V_10 - IL_12ce: ldloc.s V_7 - IL_12d0: ldloc.s V_9 - IL_12d2: beq.s IL_131c - - IL_12d4: ldloc.s V_9 - IL_12d6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_12db: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_12e0: stloc.s V_9 - IL_12e2: ldloc.s V_9 - IL_12e4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_12e9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_12ee: stloc.s V_9 - IL_12f0: ldloc.s V_9 - IL_12f2: call string [mscorlib]System.Convert::ToString(int32) - IL_12f7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_12fc: stloc.s V_8 - IL_12fe: ldloc.s V_10 - IL_1300: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1305: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_130a: stloc.s V_8 - IL_130c: ldloc.s V_9 - IL_130e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1313: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1318: stloc.s V_6 - IL_131a: br.s IL_1362 - - IL_131c: ldloc.s V_6 - IL_131e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1323: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1328: stloc.s V_9 - IL_132a: ldloc.s V_9 - IL_132c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1331: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1336: stloc.s V_7 - IL_1338: ldloc.s V_8 - IL_133a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_133f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1344: stloc.s V_8 - IL_1346: ldloc.s V_6 - IL_1348: call string [mscorlib]System.Convert::ToString(int32) - IL_134d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1352: stloc.s V_10 - IL_1354: ldloc.s V_8 - IL_1356: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_135b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1360: stloc.s V_8 - IL_1362: ldloc.s V_6 - IL_1364: ldloc.s V_8 - IL_1366: ble.s IL_13b0 - - IL_1368: ldloc.s V_6 - IL_136a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_136f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1374: stloc.s V_6 - IL_1376: ldloc.s V_9 - IL_1378: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_137d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1382: stloc.s V_10 - IL_1384: ldloc.s V_10 - IL_1386: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_138b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1390: stloc.s V_10 - IL_1392: ldloc.s V_7 - IL_1394: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1399: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_139e: stloc.s V_7 - IL_13a0: ldloc.s V_8 - IL_13a2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_13a7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_13ac: stloc.s V_9 - IL_13ae: br.s IL_13f6 - - IL_13b0: ldloc.s V_8 - IL_13b2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_13b7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_13bc: stloc.s V_10 - IL_13be: ldloc.s V_6 - IL_13c0: call string [mscorlib]System.Convert::ToString(int32) - IL_13c5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_13ca: stloc.s V_6 - IL_13cc: ldloc.s V_7 - IL_13ce: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_13d3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_13d8: stloc.s V_10 - IL_13da: ldloc.s V_7 - IL_13dc: call string [mscorlib]System.Convert::ToString(int32) - IL_13e1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_13e6: stloc.s V_7 - IL_13e8: ldloc.s V_10 - IL_13ea: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_13ef: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_13f4: stloc.s V_8 - IL_13f6: ldloc.s V_8 - IL_13f8: ldloc.s V_10 - IL_13fa: bge.s IL_1444 - - IL_13fc: ldloc.s V_9 - IL_13fe: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1403: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1408: stloc.s V_8 - IL_140a: ldloc.s V_8 - IL_140c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1411: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1416: stloc.s V_8 - IL_1418: ldloc.s V_9 - IL_141a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_141f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1424: stloc.s V_7 - IL_1426: ldloc.s V_9 - IL_1428: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_142d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1432: stloc.s V_10 - IL_1434: ldloc.s V_7 - IL_1436: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_143b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1440: stloc.s V_7 - IL_1442: br.s IL_148a - - IL_1444: ldloc.s V_9 - IL_1446: call string [mscorlib]System.Convert::ToString(int32) - IL_144b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1450: stloc.s V_8 - IL_1452: ldloc.s V_8 - IL_1454: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1459: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_145e: stloc.s V_6 - IL_1460: ldloc.s V_8 - IL_1462: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1467: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_146c: stloc.s V_8 - IL_146e: ldloc.s V_6 - IL_1470: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1475: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_147a: stloc.s V_9 - IL_147c: ldloc.s V_8 - IL_147e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1483: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1488: stloc.s V_7 - IL_148a: ldloc.s V_6 - IL_148c: ldloc.s V_9 - IL_148e: beq.s IL_14d8 - - IL_1490: ldloc.s V_7 - IL_1492: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1497: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_149c: stloc.s V_7 - IL_149e: ldloc.s V_8 - IL_14a0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_14a5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_14aa: stloc.s V_9 - IL_14ac: ldloc.s V_6 - IL_14ae: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_14b3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_14b8: stloc.s V_6 - IL_14ba: ldloc.s V_9 - IL_14bc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_14c1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_14c6: stloc.s V_7 - IL_14c8: ldloc.s V_7 - IL_14ca: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_14cf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_14d4: stloc.s V_8 - IL_14d6: br.s IL_151e - - IL_14d8: ldloc.s V_8 - IL_14da: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_14df: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_14e4: stloc.s V_10 - IL_14e6: ldloc.s V_8 - IL_14e8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_14ed: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_14f2: stloc.s V_7 - IL_14f4: ldloc.s V_10 - IL_14f6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_14fb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1500: stloc.s V_8 - IL_1502: ldloc.s V_10 - IL_1504: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1509: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_150e: stloc.s V_7 - IL_1510: ldloc.s V_6 - IL_1512: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1517: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_151c: stloc.s V_7 - IL_151e: ldloc.s V_10 - IL_1520: ldloc.s V_7 - IL_1522: blt.s IL_156c - - IL_1524: ldloc.s V_6 - IL_1526: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_152b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1530: stloc.s V_6 - IL_1532: ldloc.s V_6 - IL_1534: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1539: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_153e: stloc.s V_6 - IL_1540: ldloc.s V_6 - IL_1542: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1547: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_154c: stloc.s V_7 - IL_154e: ldloc.s V_6 - IL_1550: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1555: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_155a: stloc.s V_7 - IL_155c: ldloc.s V_10 - IL_155e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1563: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1568: stloc.s V_9 - IL_156a: br.s IL_15b2 - - IL_156c: ldloc.s V_7 - IL_156e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1573: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1578: stloc.s V_9 - IL_157a: ldloc.s V_10 - IL_157c: call string [mscorlib]System.Convert::ToString(int32) - IL_1581: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1586: stloc.s V_10 - IL_1588: ldloc.s V_6 - IL_158a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_158f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1594: stloc.s V_7 - IL_1596: ldloc.s V_8 - IL_1598: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_159d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_15a2: stloc.s V_7 - IL_15a4: ldloc.s V_9 - IL_15a6: call string [mscorlib]System.Convert::ToString(int32) - IL_15ab: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_15b0: stloc.s V_8 - IL_15b2: ldloc.s V_10 - IL_15b4: ldloc.s V_7 - IL_15b6: beq.s IL_1600 - - IL_15b8: ldloc.s V_6 - IL_15ba: call string [mscorlib]System.Convert::ToString(int32) - IL_15bf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_15c4: stloc.s V_8 - IL_15c6: ldloc.s V_6 - IL_15c8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_15cd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_15d2: stloc.s V_6 - IL_15d4: ldloc.s V_6 - IL_15d6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_15db: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_15e0: stloc.s V_8 - IL_15e2: ldloc.s V_10 - IL_15e4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_15e9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_15ee: stloc.s V_7 - IL_15f0: ldloc.s V_9 - IL_15f2: call string [mscorlib]System.Convert::ToString(int32) - IL_15f7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_15fc: stloc.s V_10 - IL_15fe: br.s IL_1646 - - IL_1600: ldloc.s V_8 - IL_1602: call string [mscorlib]System.Convert::ToString(int32) - IL_1607: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_160c: stloc.s V_6 - IL_160e: ldloc.s V_6 - IL_1610: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1615: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_161a: stloc.s V_10 - IL_161c: ldloc.s V_10 - IL_161e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1623: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1628: stloc.s V_8 - IL_162a: ldloc.s V_9 - IL_162c: call string [mscorlib]System.Convert::ToString(int32) - IL_1631: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1636: stloc.s V_6 - IL_1638: ldloc.s V_7 - IL_163a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_163f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1644: stloc.s V_8 - IL_1646: ldloc.s V_7 - IL_1648: ldloc.s V_7 - IL_164a: blt.s IL_1694 - - IL_164c: ldloc.s V_8 - IL_164e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1653: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1658: stloc.s V_9 - IL_165a: ldloc.s V_8 - IL_165c: call string [mscorlib]System.Convert::ToString(int32) - IL_1661: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1666: stloc.s V_9 - IL_1668: ldloc.s V_9 - IL_166a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_166f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1674: stloc.s V_7 - IL_1676: ldloc.s V_9 - IL_1678: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_167d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1682: stloc.s V_9 - IL_1684: ldloc.s V_8 - IL_1686: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_168b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1690: stloc.s V_7 - IL_1692: br.s IL_16da - - IL_1694: ldloc.s V_6 - IL_1696: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_169b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_16a0: stloc.s V_9 - IL_16a2: ldloc.s V_7 - IL_16a4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_16a9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_16ae: stloc.s V_6 - IL_16b0: ldloc.s V_10 - IL_16b2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_16b7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_16bc: stloc.s V_6 - IL_16be: ldloc.s V_7 - IL_16c0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_16c5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_16ca: stloc.s V_6 - IL_16cc: ldloc.s V_7 - IL_16ce: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_16d3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_16d8: stloc.s V_8 - IL_16da: ldloc.s V_10 - IL_16dc: ldloc.s V_10 - IL_16de: bne.un.s IL_1728 - - IL_16e0: ldloc.s V_8 - IL_16e2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_16e7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_16ec: stloc.s V_8 - IL_16ee: ldloc.s V_10 - IL_16f0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_16f5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_16fa: stloc.s V_6 - IL_16fc: ldloc.s V_6 - IL_16fe: call string [mscorlib]System.Convert::ToString(int32) - IL_1703: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1708: stloc.s V_6 - IL_170a: ldloc.s V_10 - IL_170c: call string [mscorlib]System.Convert::ToString(int32) - IL_1711: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1716: stloc.s V_8 - IL_1718: ldloc.s V_6 - IL_171a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_171f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1724: stloc.s V_7 - IL_1726: br.s IL_176e - - IL_1728: ldloc.s V_8 - IL_172a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_172f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1734: stloc.s V_6 - IL_1736: ldloc.s V_6 - IL_1738: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_173d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1742: stloc.s V_7 - IL_1744: ldloc.s V_7 - IL_1746: call string [mscorlib]System.Convert::ToString(int32) - IL_174b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1750: stloc.s V_10 - IL_1752: ldloc.s V_8 - IL_1754: call string [mscorlib]System.Convert::ToString(int32) - IL_1759: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_175e: stloc.s V_9 - IL_1760: ldloc.s V_9 - IL_1762: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1767: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_176c: stloc.s V_6 - IL_176e: ldloc.s V_10 - IL_1770: ldloc.s V_6 - IL_1772: bge.s IL_17bc - - IL_1774: ldloc.s V_7 - IL_1776: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_177b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1780: stloc.s V_10 - IL_1782: ldloc.s V_6 - IL_1784: call string [mscorlib]System.Convert::ToString(int32) - IL_1789: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_178e: stloc.s V_6 - IL_1790: ldloc.s V_8 - IL_1792: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1797: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_179c: stloc.s V_6 - IL_179e: ldloc.s V_7 - IL_17a0: call string [mscorlib]System.Convert::ToString(int32) - IL_17a5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_17aa: stloc.s V_7 - IL_17ac: ldloc.s V_7 - IL_17ae: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_17b3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_17b8: stloc.s V_10 - IL_17ba: br.s IL_1802 - - IL_17bc: ldloc.s V_6 - IL_17be: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_17c3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_17c8: stloc.s V_6 - IL_17ca: ldloc.s V_9 - IL_17cc: call string [mscorlib]System.Convert::ToString(int32) - IL_17d1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_17d6: stloc.s V_10 - IL_17d8: ldloc.s V_9 - IL_17da: call string [mscorlib]System.Convert::ToString(int32) - IL_17df: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_17e4: stloc.s V_9 - IL_17e6: ldloc.s V_8 - IL_17e8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_17ed: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_17f2: stloc.s V_7 - IL_17f4: ldloc.s V_9 - IL_17f6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_17fb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1800: stloc.s V_8 - IL_1802: ldloc.s V_6 - IL_1804: ldloc.s V_9 - IL_1806: blt.s IL_1850 - - IL_1808: ldloc.s V_6 - IL_180a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_180f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1814: stloc.s V_10 - IL_1816: ldloc.s V_6 - IL_1818: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_181d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1822: stloc.s V_10 - IL_1824: ldloc.s V_6 - IL_1826: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_182b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1830: stloc.s V_8 - IL_1832: ldloc.s V_10 - IL_1834: call string [mscorlib]System.Convert::ToString(int32) - IL_1839: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_183e: stloc.s V_8 - IL_1840: ldloc.s V_10 - IL_1842: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1847: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_184c: stloc.s V_10 - IL_184e: br.s IL_1896 - - IL_1850: ldloc.s V_8 - IL_1852: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1857: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_185c: stloc.s V_7 - IL_185e: ldloc.s V_7 - IL_1860: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1865: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_186a: stloc.s V_9 - IL_186c: ldloc.s V_7 - IL_186e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1873: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1878: stloc.s V_7 - IL_187a: ldloc.s V_6 - IL_187c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1881: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1886: stloc.s V_9 - IL_1888: ldloc.s V_6 - IL_188a: call string [mscorlib]System.Convert::ToString(int32) - IL_188f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1894: stloc.s V_8 - IL_1896: ldloc.s V_10 - IL_1898: ldloc.s V_8 - IL_189a: beq.s IL_18e4 - - IL_189c: ldloc.s V_8 - IL_189e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_18a3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_18a8: stloc.s V_8 - IL_18aa: ldloc.s V_8 - IL_18ac: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_18b1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_18b6: stloc.s V_6 - IL_18b8: ldloc.s V_8 - IL_18ba: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_18bf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_18c4: stloc.s V_10 - IL_18c6: ldloc.s V_10 - IL_18c8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_18cd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_18d2: stloc.s V_9 - IL_18d4: ldloc.s V_9 - IL_18d6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_18db: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_18e0: stloc.s V_10 - IL_18e2: br.s IL_192a - - IL_18e4: ldloc.s V_10 - IL_18e6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_18eb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_18f0: stloc.s V_9 - IL_18f2: ldloc.s V_9 - IL_18f4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_18f9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_18fe: stloc.s V_6 - IL_1900: ldloc.s V_6 - IL_1902: call string [mscorlib]System.Convert::ToString(int32) - IL_1907: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_190c: stloc.s V_8 - IL_190e: ldloc.s V_6 - IL_1910: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1915: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_191a: stloc.s V_10 - IL_191c: ldloc.s V_7 - IL_191e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1923: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1928: stloc.s V_6 - IL_192a: ldloc.s V_9 - IL_192c: ldloc.s V_8 - IL_192e: beq.s IL_1978 - - IL_1930: ldloc.s V_9 - IL_1932: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1937: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_193c: stloc.s V_7 - IL_193e: ldloc.s V_10 - IL_1940: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1945: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_194a: stloc.s V_7 - IL_194c: ldloc.s V_6 - IL_194e: call string [mscorlib]System.Convert::ToString(int32) - IL_1953: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1958: stloc.s V_6 - IL_195a: ldloc.s V_6 - IL_195c: call string [mscorlib]System.Convert::ToString(int32) - IL_1961: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1966: stloc.s V_10 - IL_1968: ldloc.s V_8 - IL_196a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_196f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1974: stloc.s V_7 - IL_1976: br.s IL_19be - - IL_1978: ldloc.s V_8 - IL_197a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_197f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1984: stloc.s V_8 - IL_1986: ldloc.s V_6 - IL_1988: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_198d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1992: stloc.s V_7 - IL_1994: ldloc.s V_8 - IL_1996: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_199b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_19a0: stloc.s V_10 - IL_19a2: ldloc.s V_10 - IL_19a4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_19a9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_19ae: stloc.s V_8 - IL_19b0: ldloc.s V_8 - IL_19b2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_19b7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_19bc: stloc.s V_7 - IL_19be: ldloc.s V_9 - IL_19c0: ldloc.s V_8 - IL_19c2: ble.s IL_1a0c - - IL_19c4: ldloc.s V_10 - IL_19c6: call string [mscorlib]System.Convert::ToString(int32) - IL_19cb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_19d0: stloc.s V_7 - IL_19d2: ldloc.s V_6 - IL_19d4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_19d9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_19de: stloc.s V_6 - IL_19e0: ldloc.s V_6 - IL_19e2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_19e7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_19ec: stloc.s V_10 - IL_19ee: ldloc.s V_10 - IL_19f0: call string [mscorlib]System.Convert::ToString(int32) - IL_19f5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_19fa: stloc.s V_9 - IL_19fc: ldloc.s V_8 - IL_19fe: call string [mscorlib]System.Convert::ToString(int32) - IL_1a03: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1a08: stloc.s V_10 - IL_1a0a: br.s IL_1a52 - - IL_1a0c: ldloc.s V_7 - IL_1a0e: call string [mscorlib]System.Convert::ToString(int32) - IL_1a13: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1a18: stloc.s V_8 - IL_1a1a: ldloc.s V_10 - IL_1a1c: call string [mscorlib]System.Convert::ToString(int32) - IL_1a21: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1a26: stloc.s V_10 - IL_1a28: ldloc.s V_7 - IL_1a2a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1a2f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1a34: stloc.s V_7 - IL_1a36: ldloc.s V_9 - IL_1a38: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1a3d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1a42: stloc.s V_6 - IL_1a44: ldloc.s V_10 - IL_1a46: call string [mscorlib]System.Convert::ToString(int32) - IL_1a4b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1a50: stloc.s V_10 - IL_1a52: ldloc.s V_9 - IL_1a54: ldloc.s V_6 - IL_1a56: bgt.s IL_1aa0 - - IL_1a58: ldloc.s V_7 - IL_1a5a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1a5f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1a64: stloc.s V_9 - IL_1a66: ldloc.s V_8 - IL_1a68: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1a6d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1a72: stloc.s V_8 - IL_1a74: ldloc.s V_9 - IL_1a76: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1a7b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1a80: stloc.s V_8 - IL_1a82: ldloc.s V_8 - IL_1a84: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1a89: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1a8e: stloc.s V_6 - IL_1a90: ldloc.s V_10 - IL_1a92: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1a97: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1a9c: stloc.s V_9 - IL_1a9e: br.s IL_1ae6 - - IL_1aa0: ldloc.s V_7 - IL_1aa2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1aa7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1aac: stloc.s V_8 - IL_1aae: ldloc.s V_10 - IL_1ab0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1ab5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1aba: stloc.s V_6 - IL_1abc: ldloc.s V_6 - IL_1abe: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1ac3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1ac8: stloc.s V_8 - IL_1aca: ldloc.s V_7 - IL_1acc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1ad1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1ad6: stloc.s V_8 - IL_1ad8: ldloc.s V_8 - IL_1ada: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1adf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1ae4: stloc.s V_8 - IL_1ae6: ldloc.s V_10 - IL_1ae8: ldloc.s V_10 - IL_1aea: ble.s IL_1b34 - - IL_1aec: ldloc.s V_9 - IL_1aee: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1af3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1af8: stloc.s V_10 - IL_1afa: ldloc.s V_6 - IL_1afc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1b01: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1b06: stloc.s V_7 - IL_1b08: ldloc.s V_7 - IL_1b0a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1b0f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1b14: stloc.s V_9 - IL_1b16: ldloc.s V_7 - IL_1b18: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1b1d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1b22: stloc.s V_7 - IL_1b24: ldloc.s V_8 - IL_1b26: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1b2b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1b30: stloc.s V_10 - IL_1b32: br.s IL_1b7a - - IL_1b34: ldloc.s V_10 - IL_1b36: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1b3b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1b40: stloc.s V_10 - IL_1b42: ldloc.s V_8 - IL_1b44: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1b49: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1b4e: stloc.s V_8 - IL_1b50: ldloc.s V_10 - IL_1b52: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1b57: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1b5c: stloc.s V_6 - IL_1b5e: ldloc.s V_7 - IL_1b60: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1b65: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1b6a: stloc.s V_6 - IL_1b6c: ldloc.s V_7 - IL_1b6e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1b73: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1b78: stloc.s V_7 - IL_1b7a: ldloc.s V_6 - IL_1b7c: ldloc.s V_7 - IL_1b7e: ble.s IL_1bc8 - - IL_1b80: ldloc.s V_6 - IL_1b82: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1b87: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1b8c: stloc.s V_9 - IL_1b8e: ldloc.s V_10 - IL_1b90: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1b95: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1b9a: stloc.s V_6 - IL_1b9c: ldloc.s V_10 - IL_1b9e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1ba3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1ba8: stloc.s V_7 - IL_1baa: ldloc.s V_9 - IL_1bac: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1bb1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1bb6: stloc.s V_9 - IL_1bb8: ldloc.s V_9 - IL_1bba: call string [mscorlib]System.Convert::ToString(int32) - IL_1bbf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1bc4: stloc.s V_9 - IL_1bc6: br.s IL_1c0e - - IL_1bc8: ldloc.s V_9 - IL_1bca: call string [mscorlib]System.Convert::ToString(int32) - IL_1bcf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1bd4: stloc.s V_9 - IL_1bd6: ldloc.s V_8 - IL_1bd8: call string [mscorlib]System.Convert::ToString(int32) - IL_1bdd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1be2: stloc.s V_9 - IL_1be4: ldloc.s V_6 - IL_1be6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1beb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1bf0: stloc.s V_7 - IL_1bf2: ldloc.s V_10 - IL_1bf4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1bf9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1bfe: stloc.s V_10 - IL_1c00: ldloc.s V_8 - IL_1c02: call string [mscorlib]System.Convert::ToString(int32) - IL_1c07: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1c0c: stloc.s V_9 - IL_1c0e: ldloc.s V_6 - IL_1c10: ldloc.s V_7 - IL_1c12: ble.s IL_1c5c - - IL_1c14: ldloc.s V_8 - IL_1c16: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1c1b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1c20: stloc.s V_6 - IL_1c22: ldloc.s V_6 - IL_1c24: call string [mscorlib]System.Convert::ToString(int32) - IL_1c29: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1c2e: stloc.s V_8 - IL_1c30: ldloc.s V_6 - IL_1c32: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1c37: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1c3c: stloc.s V_6 - IL_1c3e: ldloc.s V_10 - IL_1c40: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1c45: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1c4a: stloc.s V_9 - IL_1c4c: ldloc.s V_7 - IL_1c4e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1c53: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1c58: stloc.s V_6 - IL_1c5a: br.s IL_1ca2 - - IL_1c5c: ldloc.s V_7 - IL_1c5e: call string [mscorlib]System.Convert::ToString(int32) - IL_1c63: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1c68: stloc.s V_8 - IL_1c6a: ldloc.s V_8 - IL_1c6c: call string [mscorlib]System.Convert::ToString(int32) - IL_1c71: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1c76: stloc.s V_8 - IL_1c78: ldloc.s V_6 - IL_1c7a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1c7f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1c84: stloc.s V_9 - IL_1c86: ldloc.s V_6 - IL_1c88: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1c8d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1c92: stloc.s V_6 - IL_1c94: ldloc.s V_10 - IL_1c96: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1c9b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1ca0: stloc.s V_10 - IL_1ca2: ldloc.s V_9 - IL_1ca4: ldloc.s V_6 - IL_1ca6: blt.s IL_1cf0 - - IL_1ca8: ldloc.s V_8 - IL_1caa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1caf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1cb4: stloc.s V_8 - IL_1cb6: ldloc.s V_10 - IL_1cb8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1cbd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1cc2: stloc.s V_7 - IL_1cc4: ldloc.s V_7 - IL_1cc6: call string [mscorlib]System.Convert::ToString(int32) - IL_1ccb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1cd0: stloc.s V_8 - IL_1cd2: ldloc.s V_7 - IL_1cd4: call string [mscorlib]System.Convert::ToString(int32) - IL_1cd9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1cde: stloc.s V_8 - IL_1ce0: ldloc.s V_9 - IL_1ce2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1ce7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1cec: stloc.s V_6 - IL_1cee: br.s IL_1d36 - - IL_1cf0: ldloc.s V_6 - IL_1cf2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1cf7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1cfc: stloc.s V_8 - IL_1cfe: ldloc.s V_8 - IL_1d00: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1d05: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1d0a: stloc.s V_6 - IL_1d0c: ldloc.s V_9 - IL_1d0e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1d13: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1d18: stloc.s V_10 - IL_1d1a: ldloc.s V_8 - IL_1d1c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1d21: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1d26: stloc.s V_8 - IL_1d28: ldloc.s V_10 - IL_1d2a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1d2f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1d34: stloc.s V_6 - IL_1d36: ldloc.s V_7 - IL_1d38: ldloc.s V_9 - IL_1d3a: ble.s IL_1d84 - - IL_1d3c: ldloc.s V_8 - IL_1d3e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1d43: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1d48: stloc.s V_10 - IL_1d4a: ldloc.s V_7 - IL_1d4c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1d51: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1d56: stloc.s V_9 - IL_1d58: ldloc.s V_10 - IL_1d5a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1d5f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1d64: stloc.s V_8 - IL_1d66: ldloc.s V_9 - IL_1d68: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1d6d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1d72: stloc.s V_6 - IL_1d74: ldloc.s V_8 - IL_1d76: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1d7b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1d80: stloc.s V_9 - IL_1d82: br.s IL_1dca - - IL_1d84: ldloc.s V_7 - IL_1d86: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1d8b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1d90: stloc.s V_7 - IL_1d92: ldloc.s V_6 - IL_1d94: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1d99: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1d9e: stloc.s V_10 - IL_1da0: ldloc.s V_8 - IL_1da2: call string [mscorlib]System.Convert::ToString(int32) - IL_1da7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1dac: stloc.s V_8 - IL_1dae: ldloc.s V_10 - IL_1db0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1db5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1dba: stloc.s V_10 - IL_1dbc: ldloc.s V_8 - IL_1dbe: call string [mscorlib]System.Convert::ToString(int32) - IL_1dc3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1dc8: stloc.s V_8 - IL_1dca: ldloc.s V_7 - IL_1dcc: ldloc.s V_7 - IL_1dce: blt.s IL_1e18 - - IL_1dd0: ldloc.s V_7 - IL_1dd2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1dd7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1ddc: stloc.s V_8 - IL_1dde: ldloc.s V_10 - IL_1de0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1de5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1dea: stloc.s V_6 - IL_1dec: ldloc.s V_8 - IL_1dee: call string [mscorlib]System.Convert::ToString(int32) - IL_1df3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1df8: stloc.s V_10 - IL_1dfa: ldloc.s V_10 - IL_1dfc: call string [mscorlib]System.Convert::ToString(int32) - IL_1e01: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1e06: stloc.s V_9 - IL_1e08: ldloc.s V_7 - IL_1e0a: call string [mscorlib]System.Convert::ToString(int32) - IL_1e0f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1e14: stloc.s V_6 - IL_1e16: br.s IL_1e5e - - IL_1e18: ldloc.s V_10 - IL_1e1a: call string [mscorlib]System.Convert::ToString(int32) - IL_1e1f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1e24: stloc.s V_10 - IL_1e26: ldloc.s V_6 - IL_1e28: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1e2d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1e32: stloc.s V_9 - IL_1e34: ldloc.s V_9 - IL_1e36: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1e3b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1e40: stloc.s V_9 - IL_1e42: ldloc.s V_7 - IL_1e44: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1e49: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1e4e: stloc.s V_6 - IL_1e50: ldloc.s V_8 - IL_1e52: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1e57: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1e5c: stloc.s V_7 - IL_1e5e: ldloc.s V_9 - IL_1e60: ldloc.s V_10 - IL_1e62: bgt.s IL_1eac - - IL_1e64: ldloc.s V_9 - IL_1e66: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1e6b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1e70: stloc.s V_7 - IL_1e72: ldloc.s V_8 - IL_1e74: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1e79: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1e7e: stloc.s V_7 - IL_1e80: ldloc.s V_9 - IL_1e82: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1e87: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1e8c: stloc.s V_7 - IL_1e8e: ldloc.s V_6 - IL_1e90: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1e95: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1e9a: stloc.s V_9 - IL_1e9c: ldloc.s V_7 - IL_1e9e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1ea3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1ea8: stloc.s V_8 - IL_1eaa: br.s IL_1ef2 - - IL_1eac: ldloc.s V_10 - IL_1eae: call string [mscorlib]System.Convert::ToString(int32) - IL_1eb3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1eb8: stloc.s V_9 - IL_1eba: ldloc.s V_6 - IL_1ebc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1ec1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1ec6: stloc.s V_8 - IL_1ec8: ldloc.s V_10 - IL_1eca: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1ecf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1ed4: stloc.s V_7 - IL_1ed6: ldloc.s V_10 - IL_1ed8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1edd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1ee2: stloc.s V_8 - IL_1ee4: ldloc.s V_8 - IL_1ee6: call string [mscorlib]System.Convert::ToString(int32) - IL_1eeb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1ef0: stloc.s V_9 - IL_1ef2: ldloc.s V_6 - IL_1ef4: ldloc.s V_6 - IL_1ef6: beq.s IL_1f40 - - IL_1ef8: ldloc.s V_8 - IL_1efa: call string [mscorlib]System.Convert::ToString(int32) - IL_1eff: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1f04: stloc.s V_6 - IL_1f06: ldloc.s V_8 - IL_1f08: call string [mscorlib]System.Convert::ToString(int32) - IL_1f0d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1f12: stloc.s V_8 - IL_1f14: ldloc.s V_6 - IL_1f16: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1f1b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1f20: stloc.s V_7 - IL_1f22: ldloc.s V_8 - IL_1f24: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1f29: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1f2e: stloc.s V_7 - IL_1f30: ldloc.s V_6 - IL_1f32: call string [mscorlib]System.Convert::ToString(int32) - IL_1f37: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1f3c: stloc.s V_9 - IL_1f3e: br.s IL_1f86 - - IL_1f40: ldloc.s V_8 - IL_1f42: call string [mscorlib]System.Convert::ToString(int32) - IL_1f47: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1f4c: stloc.s V_6 - IL_1f4e: ldloc.s V_10 - IL_1f50: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1f55: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1f5a: stloc.s V_9 - IL_1f5c: ldloc.s V_7 - IL_1f5e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1f63: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1f68: stloc.s V_9 - IL_1f6a: ldloc.s V_6 - IL_1f6c: call string [mscorlib]System.Convert::ToString(int32) - IL_1f71: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1f76: stloc.s V_10 - IL_1f78: ldloc.s V_8 - IL_1f7a: call string [mscorlib]System.Convert::ToString(int32) - IL_1f7f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1f84: stloc.s V_9 - IL_1f86: ldloc.s V_10 - IL_1f88: ldloc.s V_9 - IL_1f8a: blt.s IL_1fd4 - - IL_1f8c: ldloc.s V_6 - IL_1f8e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1f93: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1f98: stloc.s V_6 - IL_1f9a: ldloc.s V_10 - IL_1f9c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1fa1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1fa6: stloc.s V_9 - IL_1fa8: ldloc.s V_7 - IL_1faa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1faf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1fb4: stloc.s V_7 - IL_1fb6: ldloc.s V_6 - IL_1fb8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1fbd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1fc2: stloc.s V_6 - IL_1fc4: ldloc.s V_8 - IL_1fc6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1fcb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1fd0: stloc.s V_8 - IL_1fd2: br.s IL_201a - - IL_1fd4: ldloc.s V_6 - IL_1fd6: call string [mscorlib]System.Convert::ToString(int32) - IL_1fdb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1fe0: stloc.s V_9 - IL_1fe2: ldloc.s V_6 - IL_1fe4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1fe9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1fee: stloc.s V_10 - IL_1ff0: ldloc.s V_9 - IL_1ff2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1ff7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1ffc: stloc.s V_6 - IL_1ffe: ldloc.s V_10 - IL_2000: call string [mscorlib]System.Convert::ToString(int32) - IL_2005: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_200a: stloc.s V_7 - IL_200c: ldloc.s V_10 - IL_200e: call string [mscorlib]System.Convert::ToString(int32) - IL_2013: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2018: stloc.s V_8 - IL_201a: ldloc.s V_10 - IL_201c: ldloc.s V_6 - IL_201e: bgt.s IL_2068 - - IL_2020: ldloc.s V_7 - IL_2022: call string [mscorlib]System.Convert::ToString(int32) - IL_2027: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_202c: stloc.s V_9 - IL_202e: ldloc.s V_7 - IL_2030: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2035: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_203a: stloc.s V_6 - IL_203c: ldloc.s V_10 - IL_203e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2043: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2048: stloc.s V_9 - IL_204a: ldloc.s V_10 - IL_204c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2051: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2056: stloc.s V_9 - IL_2058: ldloc.s V_10 - IL_205a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_205f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2064: stloc.s V_6 - IL_2066: br.s IL_20ae - - IL_2068: ldloc.s V_10 - IL_206a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_206f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2074: stloc.s V_9 - IL_2076: ldloc.s V_8 - IL_2078: call string [mscorlib]System.Convert::ToString(int32) - IL_207d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2082: stloc.s V_8 - IL_2084: ldloc.s V_6 - IL_2086: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_208b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2090: stloc.s V_9 - IL_2092: ldloc.s V_8 - IL_2094: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2099: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_209e: stloc.s V_8 - IL_20a0: ldloc.s V_8 - IL_20a2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_20a7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_20ac: stloc.s V_10 - IL_20ae: ldloc.s V_8 - IL_20b0: ldloc.s V_6 - IL_20b2: blt.s IL_20fc - - IL_20b4: ldloc.s V_6 - IL_20b6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_20bb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_20c0: stloc.s V_6 - IL_20c2: ldloc.s V_6 - IL_20c4: call string [mscorlib]System.Convert::ToString(int32) - IL_20c9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_20ce: stloc.s V_7 - IL_20d0: ldloc.s V_6 - IL_20d2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_20d7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_20dc: stloc.s V_9 - IL_20de: ldloc.s V_8 - IL_20e0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_20e5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_20ea: stloc.s V_7 - IL_20ec: ldloc.s V_7 - IL_20ee: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_20f3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_20f8: stloc.s V_10 - IL_20fa: br.s IL_2142 - - IL_20fc: ldloc.s V_9 - IL_20fe: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2103: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2108: stloc.s V_6 - IL_210a: ldloc.s V_8 - IL_210c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2111: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2116: stloc.s V_10 - IL_2118: ldloc.s V_9 - IL_211a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_211f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2124: stloc.s V_8 - IL_2126: ldloc.s V_6 - IL_2128: call string [mscorlib]System.Convert::ToString(int32) - IL_212d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2132: stloc.s V_6 - IL_2134: ldloc.s V_8 - IL_2136: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_213b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2140: stloc.s V_9 - IL_2142: ldloc.s V_7 - IL_2144: ldloc.s V_7 - IL_2146: blt.s IL_2190 - - IL_2148: ldloc.s V_8 - IL_214a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_214f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2154: stloc.s V_9 - IL_2156: ldloc.s V_7 - IL_2158: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_215d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2162: stloc.s V_9 - IL_2164: ldloc.s V_7 - IL_2166: call string [mscorlib]System.Convert::ToString(int32) - IL_216b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2170: stloc.s V_10 - IL_2172: ldloc.s V_8 - IL_2174: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2179: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_217e: stloc.s V_8 - IL_2180: ldloc.s V_6 - IL_2182: call string [mscorlib]System.Convert::ToString(int32) - IL_2187: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_218c: stloc.s V_9 - IL_218e: br.s IL_21d6 - - IL_2190: ldloc.s V_10 - IL_2192: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2197: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_219c: stloc.s V_7 - IL_219e: ldloc.s V_7 - IL_21a0: call string [mscorlib]System.Convert::ToString(int32) - IL_21a5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_21aa: stloc.s V_9 - IL_21ac: ldloc.s V_10 - IL_21ae: call string [mscorlib]System.Convert::ToString(int32) - IL_21b3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_21b8: stloc.s V_9 - IL_21ba: ldloc.s V_6 - IL_21bc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_21c1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_21c6: stloc.s V_8 - IL_21c8: ldloc.s V_7 - IL_21ca: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_21cf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_21d4: stloc.s V_6 - IL_21d6: ldloc.s V_10 - IL_21d8: ldloc.s V_7 - IL_21da: bgt.s IL_2224 - - IL_21dc: ldloc.s V_7 - IL_21de: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_21e3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_21e8: stloc.s V_6 - IL_21ea: ldloc.s V_8 - IL_21ec: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_21f1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_21f6: stloc.s V_9 - IL_21f8: ldloc.s V_8 - IL_21fa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_21ff: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2204: stloc.s V_7 - IL_2206: ldloc.s V_8 - IL_2208: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_220d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2212: stloc.s V_6 - IL_2214: ldloc.s V_10 - IL_2216: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_221b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2220: stloc.s V_6 - IL_2222: br.s IL_226a - - IL_2224: ldloc.s V_10 - IL_2226: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_222b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2230: stloc.s V_10 - IL_2232: ldloc.s V_9 - IL_2234: call string [mscorlib]System.Convert::ToString(int32) - IL_2239: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_223e: stloc.s V_8 - IL_2240: ldloc.s V_7 - IL_2242: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2247: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_224c: stloc.s V_6 - IL_224e: ldloc.s V_7 - IL_2250: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2255: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_225a: stloc.s V_9 - IL_225c: ldloc.s V_9 - IL_225e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2263: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2268: stloc.s V_7 - IL_226a: ldloc.s V_9 - IL_226c: ldloc.s V_8 - IL_226e: ble.s IL_22b8 - - IL_2270: ldloc.s V_8 - IL_2272: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2277: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_227c: stloc.s V_7 - IL_227e: ldloc.s V_9 - IL_2280: call string [mscorlib]System.Convert::ToString(int32) - IL_2285: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_228a: stloc.s V_10 - IL_228c: ldloc.s V_8 - IL_228e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2293: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2298: stloc.s V_8 - IL_229a: ldloc.s V_8 - IL_229c: call string [mscorlib]System.Convert::ToString(int32) - IL_22a1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_22a6: stloc.s V_9 - IL_22a8: ldloc.s V_9 - IL_22aa: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_22af: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_22b4: stloc.s V_7 - IL_22b6: br.s IL_22fe - - IL_22b8: ldloc.s V_9 - IL_22ba: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_22bf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_22c4: stloc.s V_6 - IL_22c6: ldloc.s V_7 - IL_22c8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_22cd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_22d2: stloc.s V_8 - IL_22d4: ldloc.s V_6 - IL_22d6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_22db: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_22e0: stloc.s V_8 - IL_22e2: ldloc.s V_10 - IL_22e4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_22e9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_22ee: stloc.s V_10 - IL_22f0: ldloc.s V_6 - IL_22f2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_22f7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_22fc: stloc.s V_7 - IL_22fe: ldloc.s V_6 - IL_2300: ldloc.s V_7 - IL_2302: bne.un.s IL_234c - - IL_2304: ldloc.s V_6 - IL_2306: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_230b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2310: stloc.s V_6 - IL_2312: ldloc.s V_8 - IL_2314: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2319: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_231e: stloc.s V_8 - IL_2320: ldloc.s V_7 - IL_2322: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2327: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_232c: stloc.s V_7 - IL_232e: ldloc.s V_7 - IL_2330: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2335: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_233a: stloc.s V_6 - IL_233c: ldloc.s V_10 - IL_233e: call string [mscorlib]System.Convert::ToString(int32) - IL_2343: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2348: stloc.s V_10 - IL_234a: br.s IL_2392 - - IL_234c: ldloc.s V_9 - IL_234e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2353: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2358: stloc.s V_8 - IL_235a: ldloc.s V_9 - IL_235c: call string [mscorlib]System.Convert::ToString(int32) - IL_2361: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2366: stloc.s V_6 - IL_2368: ldloc.s V_8 - IL_236a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_236f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2374: stloc.s V_7 - IL_2376: ldloc.s V_10 - IL_2378: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_237d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2382: stloc.s V_8 - IL_2384: ldloc.s V_7 - IL_2386: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_238b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2390: stloc.s V_9 - IL_2392: ldloc.s V_6 - IL_2394: ldloc.s V_9 - IL_2396: bge.s IL_23e0 - - IL_2398: ldloc.s V_8 - IL_239a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_239f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_23a4: stloc.s V_6 - IL_23a6: ldloc.s V_6 - IL_23a8: call string [mscorlib]System.Convert::ToString(int32) - IL_23ad: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_23b2: stloc.s V_9 - IL_23b4: ldloc.s V_10 - IL_23b6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_23bb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_23c0: stloc.s V_6 - IL_23c2: ldloc.s V_9 - IL_23c4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_23c9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_23ce: stloc.s V_10 - IL_23d0: ldloc.s V_7 - IL_23d2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_23d7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_23dc: stloc.s V_10 - IL_23de: br.s IL_2426 - - IL_23e0: ldloc.s V_10 - IL_23e2: call string [mscorlib]System.Convert::ToString(int32) - IL_23e7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_23ec: stloc.s V_6 - IL_23ee: ldloc.s V_8 - IL_23f0: call string [mscorlib]System.Convert::ToString(int32) - IL_23f5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_23fa: stloc.s V_8 - IL_23fc: ldloc.s V_10 - IL_23fe: call string [mscorlib]System.Convert::ToString(int32) - IL_2403: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2408: stloc.s V_9 - IL_240a: ldloc.s V_10 - IL_240c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2411: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2416: stloc.s V_8 - IL_2418: ldloc.s V_10 - IL_241a: call string [mscorlib]System.Convert::ToString(int32) - IL_241f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2424: stloc.s V_9 - IL_2426: ldloc.s V_10 - IL_2428: ldloc.s V_7 - IL_242a: beq.s IL_2474 - - IL_242c: ldloc.s V_7 - IL_242e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2433: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2438: stloc.s V_9 - IL_243a: ldloc.s V_8 - IL_243c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2441: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2446: stloc.s V_8 - IL_2448: ldloc.s V_7 - IL_244a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_244f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2454: stloc.s V_9 - IL_2456: ldloc.s V_8 - IL_2458: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_245d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2462: stloc.s V_9 - IL_2464: ldloc.s V_6 - IL_2466: call string [mscorlib]System.Convert::ToString(int32) - IL_246b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2470: stloc.s V_9 - IL_2472: br.s IL_24ba - - IL_2474: ldloc.s V_8 - IL_2476: call string [mscorlib]System.Convert::ToString(int32) - IL_247b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2480: stloc.s V_8 - IL_2482: ldloc.s V_7 - IL_2484: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2489: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_248e: stloc.s V_7 - IL_2490: ldloc.s V_8 - IL_2492: call string [mscorlib]System.Convert::ToString(int32) - IL_2497: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_249c: stloc.s V_6 - IL_249e: ldloc.s V_9 - IL_24a0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_24a5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_24aa: stloc.s V_8 - IL_24ac: ldloc.s V_8 - IL_24ae: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_24b3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_24b8: stloc.s V_6 - IL_24ba: ldloc.s V_10 - IL_24bc: ldloc.s V_8 - IL_24be: ble.s IL_2508 - - IL_24c0: ldloc.s V_6 - IL_24c2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_24c7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_24cc: stloc.s V_8 - IL_24ce: ldloc.s V_9 - IL_24d0: call string [mscorlib]System.Convert::ToString(int32) - IL_24d5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_24da: stloc.s V_10 - IL_24dc: ldloc.s V_9 - IL_24de: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_24e3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_24e8: stloc.s V_8 - IL_24ea: ldloc.s V_7 - IL_24ec: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_24f1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_24f6: stloc.s V_6 - IL_24f8: ldloc.s V_7 - IL_24fa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_24ff: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2504: stloc.s V_8 - IL_2506: br.s IL_254e - - IL_2508: ldloc.s V_6 - IL_250a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_250f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2514: stloc.s V_10 - IL_2516: ldloc.s V_10 - IL_2518: call string [mscorlib]System.Convert::ToString(int32) - IL_251d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2522: stloc.s V_8 - IL_2524: ldloc.s V_7 - IL_2526: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_252b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2530: stloc.s V_10 - IL_2532: ldloc.s V_10 - IL_2534: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2539: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_253e: stloc.s V_9 - IL_2540: ldloc.s V_9 - IL_2542: call string [mscorlib]System.Convert::ToString(int32) - IL_2547: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_254c: stloc.s V_9 - IL_254e: ldloc.s V_9 - IL_2550: ldloc.s V_8 - IL_2552: bne.un.s IL_259c - - IL_2554: ldloc.s V_8 - IL_2556: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_255b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2560: stloc.s V_10 - IL_2562: ldloc.s V_10 - IL_2564: call string [mscorlib]System.Convert::ToString(int32) - IL_2569: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_256e: stloc.s V_6 - IL_2570: ldloc.s V_6 - IL_2572: call string [mscorlib]System.Convert::ToString(int32) - IL_2577: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_257c: stloc.s V_9 - IL_257e: ldloc.s V_9 - IL_2580: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2585: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_258a: stloc.s V_9 - IL_258c: ldloc.s V_7 - IL_258e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2593: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2598: stloc.s V_7 - IL_259a: br.s IL_25e2 - - IL_259c: ldloc.s V_7 - IL_259e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_25a3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_25a8: stloc.s V_7 - IL_25aa: ldloc.s V_7 - IL_25ac: call string [mscorlib]System.Convert::ToString(int32) - IL_25b1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_25b6: stloc.s V_8 - IL_25b8: ldloc.s V_9 - IL_25ba: call string [mscorlib]System.Convert::ToString(int32) - IL_25bf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_25c4: stloc.s V_8 - IL_25c6: ldloc.s V_9 - IL_25c8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_25cd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_25d2: stloc.s V_10 - IL_25d4: ldloc.s V_7 - IL_25d6: call string [mscorlib]System.Convert::ToString(int32) - IL_25db: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_25e0: stloc.s V_10 - IL_25e2: ldloc.s V_7 - IL_25e4: ldloc.s V_6 - IL_25e6: ble.s IL_2630 - - IL_25e8: ldloc.s V_8 - IL_25ea: call string [mscorlib]System.Convert::ToString(int32) - IL_25ef: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_25f4: stloc.s V_10 - IL_25f6: ldloc.s V_8 - IL_25f8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_25fd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2602: stloc.s V_10 - IL_2604: ldloc.s V_6 - IL_2606: call string [mscorlib]System.Convert::ToString(int32) - IL_260b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2610: stloc.s V_6 - IL_2612: ldloc.s V_8 - IL_2614: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2619: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_261e: stloc.s V_10 - IL_2620: ldloc.s V_10 - IL_2622: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2627: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_262c: stloc.s V_8 - IL_262e: br.s IL_2676 - - IL_2630: ldloc.s V_7 - IL_2632: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2637: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_263c: stloc.s V_9 - IL_263e: ldloc.s V_6 - IL_2640: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2645: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_264a: stloc.s V_7 - IL_264c: ldloc.s V_9 - IL_264e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2653: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2658: stloc.s V_6 - IL_265a: ldloc.s V_8 - IL_265c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2661: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2666: stloc.s V_9 - IL_2668: ldloc.s V_10 - IL_266a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_266f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2674: stloc.s V_6 - IL_2676: ldloc.s V_8 - IL_2678: ldloc.s V_9 - IL_267a: beq.s IL_26c4 - - IL_267c: ldloc.s V_8 - IL_267e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2683: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2688: stloc.s V_8 - IL_268a: ldloc.s V_8 - IL_268c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2691: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2696: stloc.s V_9 - IL_2698: ldloc.s V_10 - IL_269a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_269f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_26a4: stloc.s V_9 - IL_26a6: ldloc.s V_7 - IL_26a8: call string [mscorlib]System.Convert::ToString(int32) - IL_26ad: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_26b2: stloc.s V_7 - IL_26b4: ldloc.s V_9 - IL_26b6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_26bb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_26c0: stloc.s V_7 - IL_26c2: br.s IL_270a - - IL_26c4: ldloc.s V_7 - IL_26c6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_26cb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_26d0: stloc.s V_10 - IL_26d2: ldloc.s V_6 - IL_26d4: call string [mscorlib]System.Convert::ToString(int32) - IL_26d9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_26de: stloc.s V_10 - IL_26e0: ldloc.s V_6 - IL_26e2: call string [mscorlib]System.Convert::ToString(int32) - IL_26e7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_26ec: stloc.s V_6 - IL_26ee: ldloc.s V_8 - IL_26f0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_26f5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_26fa: stloc.s V_10 - IL_26fc: ldloc.s V_9 - IL_26fe: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2703: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2708: stloc.s V_6 - IL_270a: ldloc.s V_6 - IL_270c: ldloc.s V_9 - IL_270e: ble.s IL_2758 - - IL_2710: ldloc.s V_6 - IL_2712: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2717: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_271c: stloc.s V_9 - IL_271e: ldloc.s V_10 - IL_2720: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2725: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_272a: stloc.s V_7 - IL_272c: ldloc.s V_10 - IL_272e: call string [mscorlib]System.Convert::ToString(int32) - IL_2733: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2738: stloc.s V_10 - IL_273a: ldloc.s V_9 - IL_273c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2741: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2746: stloc.s V_6 - IL_2748: ldloc.s V_10 - IL_274a: call string [mscorlib]System.Convert::ToString(int32) - IL_274f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2754: stloc.s V_7 - IL_2756: br.s IL_279e - - IL_2758: ldloc.s V_10 - IL_275a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_275f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2764: stloc.s V_9 - IL_2766: ldloc.s V_10 - IL_2768: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_276d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2772: stloc.s V_9 - IL_2774: ldloc.s V_9 - IL_2776: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_277b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2780: stloc.s V_9 - IL_2782: ldloc.s V_8 - IL_2784: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2789: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_278e: stloc.s V_7 - IL_2790: ldloc.s V_8 - IL_2792: call string [mscorlib]System.Convert::ToString(int32) - IL_2797: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_279c: stloc.s V_10 - IL_279e: ldloc.s V_6 - IL_27a0: ldloc.s V_9 - IL_27a2: bge.s IL_27ec - - IL_27a4: ldloc.s V_6 - IL_27a6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_27ab: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_27b0: stloc.s V_9 - IL_27b2: ldloc.s V_6 - IL_27b4: call string [mscorlib]System.Convert::ToString(int32) - IL_27b9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_27be: stloc.s V_9 - IL_27c0: ldloc.s V_10 - IL_27c2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_27c7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_27cc: stloc.s V_7 - IL_27ce: ldloc.s V_9 - IL_27d0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_27d5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_27da: stloc.s V_6 - IL_27dc: ldloc.s V_8 - IL_27de: call string [mscorlib]System.Convert::ToString(int32) - IL_27e3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_27e8: stloc.s V_8 - IL_27ea: br.s IL_2832 - - IL_27ec: ldloc.s V_9 - IL_27ee: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_27f3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_27f8: stloc.s V_9 - IL_27fa: ldloc.s V_6 - IL_27fc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2801: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2806: stloc.s V_9 - IL_2808: ldloc.s V_9 - IL_280a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_280f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2814: stloc.s V_10 - IL_2816: ldloc.s V_6 - IL_2818: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_281d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2822: stloc.s V_7 - IL_2824: ldloc.s V_7 - IL_2826: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_282b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2830: stloc.s V_8 - IL_2832: ldloc.s V_10 - IL_2834: ldloc.s V_9 - IL_2836: bgt.s IL_2880 - - IL_2838: ldloc.s V_6 - IL_283a: call string [mscorlib]System.Convert::ToString(int32) - IL_283f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2844: stloc.s V_6 - IL_2846: ldloc.s V_8 - IL_2848: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_284d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2852: stloc.s V_10 - IL_2854: ldloc.s V_10 - IL_2856: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_285b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2860: stloc.s V_9 - IL_2862: ldloc.s V_8 - IL_2864: call string [mscorlib]System.Convert::ToString(int32) - IL_2869: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_286e: stloc.s V_10 - IL_2870: ldloc.s V_7 - IL_2872: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2877: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_287c: stloc.s V_6 - IL_287e: br.s IL_28c6 - - IL_2880: ldloc.s V_6 - IL_2882: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2887: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_288c: stloc.s V_10 - IL_288e: ldloc.s V_10 - IL_2890: call string [mscorlib]System.Convert::ToString(int32) - IL_2895: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_289a: stloc.s V_9 - IL_289c: ldloc.s V_8 - IL_289e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_28a3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_28a8: stloc.s V_8 - IL_28aa: ldloc.s V_8 - IL_28ac: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_28b1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_28b6: stloc.s V_8 - IL_28b8: ldloc.s V_6 - IL_28ba: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_28bf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_28c4: stloc.s V_10 - IL_28c6: ldloc.s V_8 - IL_28c8: ldloc.s V_6 - IL_28ca: bne.un.s IL_2914 - - IL_28cc: ldloc.s V_10 - IL_28ce: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_28d3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_28d8: stloc.s V_10 - IL_28da: ldloc.s V_7 - IL_28dc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_28e1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_28e6: stloc.s V_8 - IL_28e8: ldloc.s V_10 - IL_28ea: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_28ef: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_28f4: stloc.s V_6 - IL_28f6: ldloc.s V_8 - IL_28f8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_28fd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2902: stloc.s V_6 - IL_2904: ldloc.s V_7 - IL_2906: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_290b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2910: stloc.s V_6 - IL_2912: br.s IL_295a - - IL_2914: ldloc.s V_9 - IL_2916: call string [mscorlib]System.Convert::ToString(int32) - IL_291b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2920: stloc.s V_10 - IL_2922: ldloc.s V_7 - IL_2924: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2929: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_292e: stloc.s V_6 - IL_2930: ldloc.s V_9 - IL_2932: call string [mscorlib]System.Convert::ToString(int32) - IL_2937: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_293c: stloc.s V_10 - IL_293e: ldloc.s V_9 - IL_2940: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2945: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_294a: stloc.s V_9 - IL_294c: ldloc.s V_9 - IL_294e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2953: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2958: stloc.s V_6 - IL_295a: ldloc.s V_6 - IL_295c: ldloc.s V_6 - IL_295e: beq.s IL_29a8 - - IL_2960: ldloc.s V_8 - IL_2962: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2967: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_296c: stloc.s V_8 - IL_296e: ldloc.s V_8 - IL_2970: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2975: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_297a: stloc.s V_7 - IL_297c: ldloc.s V_8 - IL_297e: call string [mscorlib]System.Convert::ToString(int32) - IL_2983: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2988: stloc.s V_10 - IL_298a: ldloc.s V_10 - IL_298c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2991: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2996: stloc.s V_10 - IL_2998: ldloc.s V_7 - IL_299a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_299f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_29a4: stloc.s V_10 - IL_29a6: br.s IL_29ee - - IL_29a8: ldloc.s V_6 - IL_29aa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_29af: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_29b4: stloc.s V_7 - IL_29b6: ldloc.s V_9 - IL_29b8: call string [mscorlib]System.Convert::ToString(int32) - IL_29bd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_29c2: stloc.s V_7 - IL_29c4: ldloc.s V_10 - IL_29c6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_29cb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_29d0: stloc.s V_9 - IL_29d2: ldloc.s V_8 - IL_29d4: call string [mscorlib]System.Convert::ToString(int32) - IL_29d9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_29de: stloc.s V_7 - IL_29e0: ldloc.s V_7 - IL_29e2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_29e7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_29ec: stloc.s V_9 - IL_29ee: ldloc.s V_7 - IL_29f0: ldloc.s V_10 - IL_29f2: bge.s IL_2a3c - - IL_29f4: ldloc.s V_10 - IL_29f6: call string [mscorlib]System.Convert::ToString(int32) - IL_29fb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2a00: stloc.s V_7 - IL_2a02: ldloc.s V_6 - IL_2a04: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2a09: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2a0e: stloc.s V_10 - IL_2a10: ldloc.s V_7 - IL_2a12: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2a17: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2a1c: stloc.s V_7 - IL_2a1e: ldloc.s V_6 - IL_2a20: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2a25: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2a2a: stloc.s V_10 - IL_2a2c: ldloc.s V_10 - IL_2a2e: call string [mscorlib]System.Convert::ToString(int32) - IL_2a33: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2a38: stloc.s V_9 - IL_2a3a: br.s IL_2a82 - - IL_2a3c: ldloc.s V_9 - IL_2a3e: call string [mscorlib]System.Convert::ToString(int32) - IL_2a43: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2a48: stloc.s V_8 - IL_2a4a: ldloc.s V_7 - IL_2a4c: call string [mscorlib]System.Convert::ToString(int32) - IL_2a51: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2a56: stloc.s V_8 - IL_2a58: ldloc.s V_7 - IL_2a5a: call string [mscorlib]System.Convert::ToString(int32) - IL_2a5f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2a64: stloc.s V_8 - IL_2a66: ldloc.s V_9 - IL_2a68: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2a6d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2a72: stloc.s V_9 - IL_2a74: ldloc.s V_8 - IL_2a76: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2a7b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2a80: stloc.s V_6 - IL_2a82: ldloc.s V_9 - IL_2a84: ldloc.s V_6 - IL_2a86: bge.s IL_2ad0 - - IL_2a88: ldloc.s V_9 - IL_2a8a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2a8f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2a94: stloc.s V_6 - IL_2a96: ldloc.s V_9 - IL_2a98: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2a9d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2aa2: stloc.s V_7 - IL_2aa4: ldloc.s V_8 - IL_2aa6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2aab: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2ab0: stloc.s V_6 - IL_2ab2: ldloc.s V_6 - IL_2ab4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2ab9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2abe: stloc.s V_7 - IL_2ac0: ldloc.s V_6 - IL_2ac2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2ac7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2acc: stloc.s V_9 - IL_2ace: br.s IL_2b16 - - IL_2ad0: ldloc.s V_7 - IL_2ad2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2ad7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2adc: stloc.s V_8 - IL_2ade: ldloc.s V_9 - IL_2ae0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2ae5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2aea: stloc.s V_8 - IL_2aec: ldloc.s V_10 - IL_2aee: call string [mscorlib]System.Convert::ToString(int32) - IL_2af3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2af8: stloc.s V_8 - IL_2afa: ldloc.s V_7 - IL_2afc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2b01: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2b06: stloc.s V_9 - IL_2b08: ldloc.s V_10 - IL_2b0a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2b0f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2b14: stloc.s V_7 - IL_2b16: ldloc.s V_9 - IL_2b18: ldloc.s V_7 - IL_2b1a: bne.un.s IL_2b64 - - IL_2b1c: ldloc.s V_10 - IL_2b1e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2b23: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2b28: stloc.s V_6 - IL_2b2a: ldloc.s V_7 - IL_2b2c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2b31: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2b36: stloc.s V_6 - IL_2b38: ldloc.s V_8 - IL_2b3a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2b3f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2b44: stloc.s V_6 - IL_2b46: ldloc.s V_9 - IL_2b48: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2b4d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2b52: stloc.s V_10 - IL_2b54: ldloc.s V_9 - IL_2b56: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2b5b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2b60: stloc.s V_7 - IL_2b62: br.s IL_2baa - - IL_2b64: ldloc.s V_6 - IL_2b66: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2b6b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2b70: stloc.s V_9 - IL_2b72: ldloc.s V_9 - IL_2b74: call string [mscorlib]System.Convert::ToString(int32) - IL_2b79: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2b7e: stloc.s V_6 - IL_2b80: ldloc.s V_6 - IL_2b82: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2b87: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2b8c: stloc.s V_7 - IL_2b8e: ldloc.s V_7 - IL_2b90: call string [mscorlib]System.Convert::ToString(int32) - IL_2b95: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2b9a: stloc.s V_10 - IL_2b9c: ldloc.s V_9 - IL_2b9e: call string [mscorlib]System.Convert::ToString(int32) - IL_2ba3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2ba8: stloc.s V_7 - IL_2baa: ldloc.s V_8 - IL_2bac: ldloc.s V_7 - IL_2bae: blt.s IL_2bf8 - - IL_2bb0: ldloc.s V_9 - IL_2bb2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2bb7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2bbc: stloc.s V_9 - IL_2bbe: ldloc.s V_6 - IL_2bc0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2bc5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2bca: stloc.s V_6 - IL_2bcc: ldloc.s V_7 - IL_2bce: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2bd3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2bd8: stloc.s V_6 - IL_2bda: ldloc.s V_8 - IL_2bdc: call string [mscorlib]System.Convert::ToString(int32) - IL_2be1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2be6: stloc.s V_7 - IL_2be8: ldloc.s V_7 - IL_2bea: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2bef: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2bf4: stloc.s V_6 - IL_2bf6: br.s IL_2c3e - - IL_2bf8: ldloc.s V_10 - IL_2bfa: call string [mscorlib]System.Convert::ToString(int32) - IL_2bff: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2c04: stloc.s V_9 - IL_2c06: ldloc.s V_10 - IL_2c08: call string [mscorlib]System.Convert::ToString(int32) - IL_2c0d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2c12: stloc.s V_10 - IL_2c14: ldloc.s V_7 - IL_2c16: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2c1b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2c20: stloc.s V_8 - IL_2c22: ldloc.s V_7 - IL_2c24: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2c29: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2c2e: stloc.s V_10 - IL_2c30: ldloc.s V_10 - IL_2c32: call string [mscorlib]System.Convert::ToString(int32) - IL_2c37: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2c3c: stloc.s V_10 - IL_2c3e: ldloc.s V_8 - IL_2c40: ldloc.s V_8 - IL_2c42: beq.s IL_2c8c - - IL_2c44: ldloc.s V_8 - IL_2c46: call string [mscorlib]System.Convert::ToString(int32) - IL_2c4b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2c50: stloc.s V_8 - IL_2c52: ldloc.s V_6 - IL_2c54: call string [mscorlib]System.Convert::ToString(int32) - IL_2c59: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2c5e: stloc.s V_10 - IL_2c60: ldloc.s V_7 - IL_2c62: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2c67: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2c6c: stloc.s V_10 - IL_2c6e: ldloc.s V_10 - IL_2c70: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2c75: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2c7a: stloc.s V_8 - IL_2c7c: ldloc.s V_6 - IL_2c7e: call string [mscorlib]System.Convert::ToString(int32) - IL_2c83: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2c88: stloc.s V_8 - IL_2c8a: br.s IL_2cd2 - - IL_2c8c: ldloc.s V_10 - IL_2c8e: call string [mscorlib]System.Convert::ToString(int32) - IL_2c93: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2c98: stloc.s V_6 - IL_2c9a: ldloc.s V_10 - IL_2c9c: call string [mscorlib]System.Convert::ToString(int32) - IL_2ca1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2ca6: stloc.s V_10 - IL_2ca8: ldloc.s V_8 - IL_2caa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2caf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2cb4: stloc.s V_7 - IL_2cb6: ldloc.s V_6 - IL_2cb8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2cbd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2cc2: stloc.s V_8 - IL_2cc4: ldloc.s V_9 - IL_2cc6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2ccb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2cd0: stloc.s V_9 - IL_2cd2: ldloc.s V_7 - IL_2cd4: ldloc.s V_6 - IL_2cd6: blt.s IL_2d20 - - IL_2cd8: ldloc.s V_10 - IL_2cda: call string [mscorlib]System.Convert::ToString(int32) - IL_2cdf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2ce4: stloc.s V_10 - IL_2ce6: ldloc.s V_6 - IL_2ce8: call string [mscorlib]System.Convert::ToString(int32) - IL_2ced: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2cf2: stloc.s V_10 - IL_2cf4: ldloc.s V_8 - IL_2cf6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2cfb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2d00: stloc.s V_10 - IL_2d02: ldloc.s V_10 - IL_2d04: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2d09: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2d0e: stloc.s V_9 - IL_2d10: ldloc.s V_9 - IL_2d12: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2d17: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2d1c: stloc.s V_7 - IL_2d1e: br.s IL_2d66 - - IL_2d20: ldloc.s V_6 - IL_2d22: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2d27: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2d2c: stloc.s V_7 - IL_2d2e: ldloc.s V_10 - IL_2d30: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2d35: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2d3a: stloc.s V_10 - IL_2d3c: ldloc.s V_8 - IL_2d3e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2d43: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2d48: stloc.s V_9 - IL_2d4a: ldloc.s V_7 - IL_2d4c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2d51: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2d56: stloc.s V_10 - IL_2d58: ldloc.s V_10 - IL_2d5a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2d5f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2d64: stloc.s V_10 - IL_2d66: ldloc.s V_10 - IL_2d68: ldloc.s V_9 - IL_2d6a: blt.s IL_2db4 - - IL_2d6c: ldloc.s V_10 - IL_2d6e: call string [mscorlib]System.Convert::ToString(int32) - IL_2d73: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2d78: stloc.s V_9 - IL_2d7a: ldloc.s V_6 - IL_2d7c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2d81: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2d86: stloc.s V_7 - IL_2d88: ldloc.s V_8 - IL_2d8a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2d8f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2d94: stloc.s V_9 - IL_2d96: ldloc.s V_10 - IL_2d98: call string [mscorlib]System.Convert::ToString(int32) - IL_2d9d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2da2: stloc.s V_7 - IL_2da4: ldloc.s V_10 - IL_2da6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2dab: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2db0: stloc.s V_9 - IL_2db2: br.s IL_2dfa - - IL_2db4: ldloc.s V_6 - IL_2db6: call string [mscorlib]System.Convert::ToString(int32) - IL_2dbb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2dc0: stloc.s V_8 - IL_2dc2: ldloc.s V_8 - IL_2dc4: call string [mscorlib]System.Convert::ToString(int32) - IL_2dc9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2dce: stloc.s V_9 - IL_2dd0: ldloc.s V_9 - IL_2dd2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2dd7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2ddc: stloc.s V_7 - IL_2dde: ldloc.s V_6 - IL_2de0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2de5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2dea: stloc.s V_8 - IL_2dec: ldloc.s V_10 - IL_2dee: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2df3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2df8: stloc.s V_9 - IL_2dfa: ldloc.s V_7 - IL_2dfc: ldloc.s V_6 - IL_2dfe: bgt.s IL_2e48 - - IL_2e00: ldloc.s V_8 - IL_2e02: call string [mscorlib]System.Convert::ToString(int32) - IL_2e07: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2e0c: stloc.s V_7 - IL_2e0e: ldloc.s V_9 - IL_2e10: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2e15: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2e1a: stloc.s V_9 - IL_2e1c: ldloc.s V_10 - IL_2e1e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2e23: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2e28: stloc.s V_10 - IL_2e2a: ldloc.s V_8 - IL_2e2c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2e31: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2e36: stloc.s V_8 - IL_2e38: ldloc.s V_8 - IL_2e3a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2e3f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2e44: stloc.s V_8 - IL_2e46: br.s IL_2e8e - - IL_2e48: ldloc.s V_8 - IL_2e4a: call string [mscorlib]System.Convert::ToString(int32) - IL_2e4f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2e54: stloc.s V_7 - IL_2e56: ldloc.s V_8 - IL_2e58: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2e5d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2e62: stloc.s V_9 - IL_2e64: ldloc.s V_8 - IL_2e66: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2e6b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2e70: stloc.s V_7 - IL_2e72: ldloc.s V_7 - IL_2e74: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2e79: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2e7e: stloc.s V_7 - IL_2e80: ldloc.s V_6 - IL_2e82: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2e87: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2e8c: stloc.s V_10 - IL_2e8e: ldloc.s V_9 - IL_2e90: ldloc.s V_8 - IL_2e92: bgt.s IL_2edc - - IL_2e94: ldloc.s V_8 - IL_2e96: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2e9b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2ea0: stloc.s V_10 - IL_2ea2: ldloc.s V_8 - IL_2ea4: call string [mscorlib]System.Convert::ToString(int32) - IL_2ea9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2eae: stloc.s V_7 - IL_2eb0: ldloc.s V_7 - IL_2eb2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2eb7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2ebc: stloc.s V_7 - IL_2ebe: ldloc.s V_10 - IL_2ec0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2ec5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2eca: stloc.s V_8 - IL_2ecc: ldloc.s V_9 - IL_2ece: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2ed3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2ed8: stloc.s V_6 - IL_2eda: br.s IL_2f22 - - IL_2edc: ldloc.s V_7 - IL_2ede: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2ee3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2ee8: stloc.s V_9 - IL_2eea: ldloc.s V_8 - IL_2eec: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2ef1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2ef6: stloc.s V_7 - IL_2ef8: ldloc.s V_6 - IL_2efa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2eff: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2f04: stloc.s V_9 - IL_2f06: ldloc.s V_6 - IL_2f08: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2f0d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2f12: stloc.s V_6 - IL_2f14: ldloc.s V_6 - IL_2f16: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2f1b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2f20: stloc.s V_8 - IL_2f22: ldloc.s V_10 - IL_2f24: ldloc.s V_8 - IL_2f26: bne.un.s IL_2f70 - - IL_2f28: ldloc.s V_9 - IL_2f2a: call string [mscorlib]System.Convert::ToString(int32) - IL_2f2f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2f34: stloc.s V_6 - IL_2f36: ldloc.s V_10 - IL_2f38: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2f3d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2f42: stloc.s V_6 - IL_2f44: ldloc.s V_6 - IL_2f46: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2f4b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2f50: stloc.s V_10 - IL_2f52: ldloc.s V_9 - IL_2f54: call string [mscorlib]System.Convert::ToString(int32) - IL_2f59: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2f5e: stloc.s V_6 - IL_2f60: ldloc.s V_10 - IL_2f62: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2f67: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2f6c: stloc.s V_8 - IL_2f6e: br.s IL_2fb6 - - IL_2f70: ldloc.s V_8 - IL_2f72: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2f77: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2f7c: stloc.s V_8 - IL_2f7e: ldloc.s V_10 - IL_2f80: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2f85: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2f8a: stloc.s V_10 - IL_2f8c: ldloc.s V_8 - IL_2f8e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2f93: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2f98: stloc.s V_10 - IL_2f9a: ldloc.s V_6 - IL_2f9c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2fa1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2fa6: stloc.s V_7 - IL_2fa8: ldloc.s V_9 - IL_2faa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2faf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2fb4: stloc.s V_8 - IL_2fb6: ldloc.s V_10 - IL_2fb8: ldloc.s V_10 - IL_2fba: ble.s IL_3004 - - IL_2fbc: ldloc.s V_6 - IL_2fbe: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2fc3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2fc8: stloc.s V_7 - IL_2fca: ldloc.s V_8 - IL_2fcc: call string [mscorlib]System.Convert::ToString(int32) - IL_2fd1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2fd6: stloc.s V_6 - IL_2fd8: ldloc.s V_8 - IL_2fda: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2fdf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2fe4: stloc.s V_8 - IL_2fe6: ldloc.s V_7 - IL_2fe8: call string [mscorlib]System.Convert::ToString(int32) - IL_2fed: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2ff2: stloc.s V_8 - IL_2ff4: ldloc.s V_7 - IL_2ff6: call string [mscorlib]System.Convert::ToString(int32) - IL_2ffb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3000: stloc.s V_8 - IL_3002: br.s IL_304a - - IL_3004: ldloc.s V_10 - IL_3006: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_300b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3010: stloc.s V_6 - IL_3012: ldloc.s V_9 - IL_3014: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3019: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_301e: stloc.s V_9 - IL_3020: ldloc.s V_9 - IL_3022: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3027: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_302c: stloc.s V_9 - IL_302e: ldloc.s V_9 - IL_3030: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3035: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_303a: stloc.s V_6 - IL_303c: ldloc.s V_8 - IL_303e: call string [mscorlib]System.Convert::ToString(int32) - IL_3043: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3048: stloc.s V_9 - IL_304a: ldloc.s V_10 - IL_304c: ldloc.s V_10 - IL_304e: bge.s IL_3098 - - IL_3050: ldloc.s V_6 - IL_3052: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3057: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_305c: stloc.s V_9 - IL_305e: ldloc.s V_7 - IL_3060: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3065: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_306a: stloc.s V_10 - IL_306c: ldloc.s V_9 - IL_306e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3073: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3078: stloc.s V_6 - IL_307a: ldloc.s V_8 - IL_307c: call string [mscorlib]System.Convert::ToString(int32) - IL_3081: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3086: stloc.s V_8 - IL_3088: ldloc.s V_9 - IL_308a: call string [mscorlib]System.Convert::ToString(int32) - IL_308f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3094: stloc.s V_7 - IL_3096: br.s IL_30de - - IL_3098: ldloc.s V_10 - IL_309a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_309f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_30a4: stloc.s V_10 - IL_30a6: ldloc.s V_10 - IL_30a8: call string [mscorlib]System.Convert::ToString(int32) - IL_30ad: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_30b2: stloc.s V_9 - IL_30b4: ldloc.s V_6 - IL_30b6: call string [mscorlib]System.Convert::ToString(int32) - IL_30bb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_30c0: stloc.s V_6 - IL_30c2: ldloc.s V_10 - IL_30c4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_30c9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_30ce: stloc.s V_8 - IL_30d0: ldloc.s V_10 - IL_30d2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_30d7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_30dc: stloc.s V_10 - IL_30de: ldloc.s V_6 - IL_30e0: ldloc.s V_8 - IL_30e2: beq.s IL_312c - - IL_30e4: ldloc.s V_8 - IL_30e6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_30eb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_30f0: stloc.s V_7 - IL_30f2: ldloc.s V_8 - IL_30f4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_30f9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_30fe: stloc.s V_7 - IL_3100: ldloc.s V_8 - IL_3102: call string [mscorlib]System.Convert::ToString(int32) - IL_3107: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_310c: stloc.s V_8 - IL_310e: ldloc.s V_8 - IL_3110: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3115: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_311a: stloc.s V_6 - IL_311c: ldloc.s V_6 - IL_311e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3123: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3128: stloc.s V_6 - IL_312a: br.s IL_3172 - - IL_312c: ldloc.s V_7 - IL_312e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3133: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3138: stloc.s V_10 - IL_313a: ldloc.s V_8 - IL_313c: call string [mscorlib]System.Convert::ToString(int32) - IL_3141: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3146: stloc.s V_9 - IL_3148: ldloc.s V_8 - IL_314a: call string [mscorlib]System.Convert::ToString(int32) - IL_314f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3154: stloc.s V_10 - IL_3156: ldloc.s V_9 - IL_3158: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_315d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3162: stloc.s V_10 - IL_3164: ldloc.s V_8 - IL_3166: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_316b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3170: stloc.s V_8 - IL_3172: ldloc.s V_8 - IL_3174: ldloc.s V_8 - IL_3176: beq.s IL_31c0 - - IL_3178: ldloc.s V_10 - IL_317a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_317f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3184: stloc.s V_6 - IL_3186: ldloc.s V_6 - IL_3188: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_318d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3192: stloc.s V_6 - IL_3194: ldloc.s V_10 - IL_3196: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_319b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_31a0: stloc.s V_7 - IL_31a2: ldloc.s V_7 - IL_31a4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_31a9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_31ae: stloc.s V_7 - IL_31b0: ldloc.s V_10 - IL_31b2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_31b7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_31bc: stloc.s V_8 - IL_31be: br.s IL_3206 - - IL_31c0: ldloc.s V_10 - IL_31c2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_31c7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_31cc: stloc.s V_10 - IL_31ce: ldloc.s V_8 - IL_31d0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_31d5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_31da: stloc.s V_9 - IL_31dc: ldloc.s V_7 - IL_31de: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_31e3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_31e8: stloc.s V_6 - IL_31ea: ldloc.s V_10 - IL_31ec: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_31f1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_31f6: stloc.s V_6 - IL_31f8: ldloc.s V_7 - IL_31fa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_31ff: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3204: stloc.s V_10 - IL_3206: ldloc.s V_6 - IL_3208: ldloc.s V_9 - IL_320a: ble.s IL_3254 - - IL_320c: ldloc.s V_6 - IL_320e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3213: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3218: stloc.s V_6 - IL_321a: ldloc.s V_8 - IL_321c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3221: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3226: stloc.s V_6 - IL_3228: ldloc.s V_8 - IL_322a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_322f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3234: stloc.s V_6 - IL_3236: ldloc.s V_8 - IL_3238: call string [mscorlib]System.Convert::ToString(int32) - IL_323d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3242: stloc.s V_8 - IL_3244: ldloc.s V_10 - IL_3246: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_324b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3250: stloc.s V_6 - IL_3252: br.s IL_329a - - IL_3254: ldloc.s V_8 - IL_3256: call string [mscorlib]System.Convert::ToString(int32) - IL_325b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3260: stloc.s V_9 - IL_3262: ldloc.s V_7 - IL_3264: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3269: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_326e: stloc.s V_9 - IL_3270: ldloc.s V_8 - IL_3272: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3277: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_327c: stloc.s V_10 - IL_327e: ldloc.s V_6 - IL_3280: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3285: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_328a: stloc.s V_9 - IL_328c: ldloc.s V_6 - IL_328e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3293: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3298: stloc.s V_6 - IL_329a: ldloc.s V_7 - IL_329c: ldloc.s V_6 - IL_329e: bne.un.s IL_32e8 - - IL_32a0: ldloc.s V_8 - IL_32a2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_32a7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_32ac: stloc.s V_8 - IL_32ae: ldloc.s V_10 - IL_32b0: call string [mscorlib]System.Convert::ToString(int32) - IL_32b5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_32ba: stloc.s V_10 - IL_32bc: ldloc.s V_10 - IL_32be: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_32c3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_32c8: stloc.s V_8 - IL_32ca: ldloc.s V_10 - IL_32cc: call string [mscorlib]System.Convert::ToString(int32) - IL_32d1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_32d6: stloc.s V_6 - IL_32d8: ldloc.s V_10 - IL_32da: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_32df: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_32e4: stloc.s V_10 - IL_32e6: br.s IL_332e - - IL_32e8: ldloc.s V_8 - IL_32ea: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_32ef: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_32f4: stloc.s V_6 - IL_32f6: ldloc.s V_10 - IL_32f8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_32fd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3302: stloc.s V_10 - IL_3304: ldloc.s V_6 - IL_3306: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_330b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3310: stloc.s V_8 - IL_3312: ldloc.s V_9 - IL_3314: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3319: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_331e: stloc.s V_9 - IL_3320: ldloc.s V_10 - IL_3322: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3327: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_332c: stloc.s V_7 - IL_332e: ldloc.s V_10 - IL_3330: ldloc.s V_6 - IL_3332: blt.s IL_337c - - IL_3334: ldloc.s V_6 - IL_3336: call string [mscorlib]System.Convert::ToString(int32) - IL_333b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3340: stloc.s V_7 - IL_3342: ldloc.s V_10 - IL_3344: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3349: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_334e: stloc.s V_7 - IL_3350: ldloc.s V_9 - IL_3352: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3357: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_335c: stloc.s V_8 - IL_335e: ldloc.s V_7 - IL_3360: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3365: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_336a: stloc.s V_8 - IL_336c: ldloc.s V_6 - IL_336e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3373: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3378: stloc.s V_8 - IL_337a: br.s IL_33c2 - - IL_337c: ldloc.s V_6 - IL_337e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3383: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3388: stloc.s V_6 - IL_338a: ldloc.s V_6 - IL_338c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3391: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3396: stloc.s V_8 - IL_3398: ldloc.s V_6 - IL_339a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_339f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_33a4: stloc.s V_6 - IL_33a6: ldloc.s V_7 - IL_33a8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_33ad: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_33b2: stloc.s V_8 - IL_33b4: ldloc.s V_8 - IL_33b6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_33bb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_33c0: stloc.s V_7 - IL_33c2: ldloc.s V_9 - IL_33c4: ldloc.s V_9 - IL_33c6: beq.s IL_3410 - - IL_33c8: ldloc.s V_8 - IL_33ca: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_33cf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_33d4: stloc.s V_9 - IL_33d6: ldloc.s V_8 - IL_33d8: call string [mscorlib]System.Convert::ToString(int32) - IL_33dd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_33e2: stloc.s V_10 - IL_33e4: ldloc.s V_6 - IL_33e6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_33eb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_33f0: stloc.s V_9 - IL_33f2: ldloc.s V_8 - IL_33f4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_33f9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_33fe: stloc.s V_6 - IL_3400: ldloc.s V_9 - IL_3402: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3407: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_340c: stloc.s V_9 - IL_340e: br.s IL_3456 - - IL_3410: ldloc.s V_10 - IL_3412: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3417: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_341c: stloc.s V_8 - IL_341e: ldloc.s V_10 - IL_3420: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3425: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_342a: stloc.s V_9 - IL_342c: ldloc.s V_7 - IL_342e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3433: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3438: stloc.s V_6 - IL_343a: ldloc.s V_8 - IL_343c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3441: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3446: stloc.s V_10 - IL_3448: ldloc.s V_6 - IL_344a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_344f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3454: stloc.s V_9 - IL_3456: ldloc.s V_8 - IL_3458: ldloc.s V_6 - IL_345a: bge.s IL_34a4 - - IL_345c: ldloc.s V_8 - IL_345e: call string [mscorlib]System.Convert::ToString(int32) - IL_3463: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3468: stloc.s V_8 - IL_346a: ldloc.s V_8 - IL_346c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3471: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3476: stloc.s V_9 - IL_3478: ldloc.s V_8 - IL_347a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_347f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3484: stloc.s V_9 - IL_3486: ldloc.s V_6 - IL_3488: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_348d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3492: stloc.s V_10 - IL_3494: ldloc.s V_6 - IL_3496: call string [mscorlib]System.Convert::ToString(int32) - IL_349b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_34a0: stloc.s V_9 - IL_34a2: br.s IL_34ea - - IL_34a4: ldloc.s V_10 - IL_34a6: call string [mscorlib]System.Convert::ToString(int32) - IL_34ab: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_34b0: stloc.s V_8 - IL_34b2: ldloc.s V_10 - IL_34b4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_34b9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_34be: stloc.s V_8 - IL_34c0: ldloc.s V_6 - IL_34c2: call string [mscorlib]System.Convert::ToString(int32) - IL_34c7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_34cc: stloc.s V_10 - IL_34ce: ldloc.s V_9 - IL_34d0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_34d5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_34da: stloc.s V_6 - IL_34dc: ldloc.s V_7 - IL_34de: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_34e3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_34e8: stloc.s V_10 - IL_34ea: ldloc.s V_10 - IL_34ec: ldloc.s V_7 - IL_34ee: ble.s IL_3538 - - IL_34f0: ldloc.s V_8 - IL_34f2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_34f7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_34fc: stloc.s V_7 - IL_34fe: ldloc.s V_6 - IL_3500: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3505: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_350a: stloc.s V_7 - IL_350c: ldloc.s V_6 - IL_350e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3513: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3518: stloc.s V_7 - IL_351a: ldloc.s V_7 - IL_351c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3521: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3526: stloc.s V_8 - IL_3528: ldloc.s V_7 - IL_352a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_352f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3534: stloc.s V_6 - IL_3536: br.s IL_357e - - IL_3538: ldloc.s V_8 - IL_353a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_353f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3544: stloc.s V_7 - IL_3546: ldloc.s V_7 - IL_3548: call string [mscorlib]System.Convert::ToString(int32) - IL_354d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3552: stloc.s V_6 - IL_3554: ldloc.s V_10 - IL_3556: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_355b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3560: stloc.s V_7 - IL_3562: ldloc.s V_6 - IL_3564: call string [mscorlib]System.Convert::ToString(int32) - IL_3569: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_356e: stloc.s V_7 - IL_3570: ldloc.s V_9 - IL_3572: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3577: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_357c: stloc.s V_9 - IL_357e: ldloc.s V_10 - IL_3580: ldloc.s V_6 - IL_3582: bge.s IL_35cc - - IL_3584: ldloc.s V_8 - IL_3586: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_358b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3590: stloc.s V_9 - IL_3592: ldloc.s V_10 - IL_3594: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3599: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_359e: stloc.s V_9 - IL_35a0: ldloc.s V_6 - IL_35a2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_35a7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_35ac: stloc.s V_10 - IL_35ae: ldloc.s V_8 - IL_35b0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_35b5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_35ba: stloc.s V_10 - IL_35bc: ldloc.s V_10 - IL_35be: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_35c3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_35c8: stloc.s V_9 - IL_35ca: br.s IL_3612 - - IL_35cc: ldloc.s V_6 - IL_35ce: call string [mscorlib]System.Convert::ToString(int32) - IL_35d3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_35d8: stloc.s V_8 - IL_35da: ldloc.s V_7 - IL_35dc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_35e1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_35e6: stloc.s V_9 - IL_35e8: ldloc.s V_8 - IL_35ea: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_35ef: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_35f4: stloc.s V_6 - IL_35f6: ldloc.s V_7 - IL_35f8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_35fd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3602: stloc.s V_8 - IL_3604: ldloc.s V_7 - IL_3606: call string [mscorlib]System.Convert::ToString(int32) - IL_360b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3610: stloc.s V_10 - IL_3612: ldloc.s V_6 - IL_3614: ldloc.s V_7 - IL_3616: bge.s IL_3660 - - IL_3618: ldloc.s V_10 - IL_361a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_361f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3624: stloc.s V_7 - IL_3626: ldloc.s V_9 - IL_3628: call string [mscorlib]System.Convert::ToString(int32) - IL_362d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3632: stloc.s V_9 - IL_3634: ldloc.s V_8 - IL_3636: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_363b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3640: stloc.s V_8 - IL_3642: ldloc.s V_7 - IL_3644: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3649: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_364e: stloc.s V_7 - IL_3650: ldloc.s V_9 - IL_3652: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3657: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_365c: stloc.s V_8 - IL_365e: br.s IL_36a6 - - IL_3660: ldloc.s V_6 - IL_3662: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3667: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_366c: stloc.s V_7 - IL_366e: ldloc.s V_6 - IL_3670: call string [mscorlib]System.Convert::ToString(int32) - IL_3675: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_367a: stloc.s V_9 - IL_367c: ldloc.s V_6 - IL_367e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3683: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3688: stloc.s V_10 - IL_368a: ldloc.s V_7 - IL_368c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3691: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3696: stloc.s V_6 - IL_3698: ldloc.s V_8 - IL_369a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_369f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_36a4: stloc.s V_8 - IL_36a6: ldloc.s V_9 - IL_36a8: ldloc.s V_7 - IL_36aa: beq.s IL_36f4 - - IL_36ac: ldloc.s V_8 - IL_36ae: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_36b3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_36b8: stloc.s V_6 - IL_36ba: ldloc.s V_10 - IL_36bc: call string [mscorlib]System.Convert::ToString(int32) - IL_36c1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_36c6: stloc.s V_10 - IL_36c8: ldloc.s V_8 - IL_36ca: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_36cf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_36d4: stloc.s V_7 - IL_36d6: ldloc.s V_9 - IL_36d8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_36dd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_36e2: stloc.s V_9 - IL_36e4: ldloc.s V_8 - IL_36e6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_36eb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_36f0: stloc.s V_6 - IL_36f2: br.s IL_373a - - IL_36f4: ldloc.s V_7 - IL_36f6: call string [mscorlib]System.Convert::ToString(int32) - IL_36fb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3700: stloc.s V_9 - IL_3702: ldloc.s V_9 - IL_3704: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3709: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_370e: stloc.s V_6 - IL_3710: ldloc.s V_9 - IL_3712: call string [mscorlib]System.Convert::ToString(int32) - IL_3717: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_371c: stloc.s V_7 - IL_371e: ldloc.s V_7 - IL_3720: call string [mscorlib]System.Convert::ToString(int32) - IL_3725: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_372a: stloc.s V_9 - IL_372c: ldloc.s V_8 - IL_372e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3733: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3738: stloc.s V_7 - IL_373a: ldloc.s V_7 - IL_373c: ldloc.s V_10 - IL_373e: beq.s IL_3788 - - IL_3740: ldloc.s V_6 - IL_3742: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3747: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_374c: stloc.s V_6 - IL_374e: ldloc.s V_9 - IL_3750: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3755: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_375a: stloc.s V_6 - IL_375c: ldloc.s V_7 - IL_375e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3763: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3768: stloc.s V_6 - IL_376a: ldloc.s V_10 - IL_376c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3771: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3776: stloc.s V_8 - IL_3778: ldloc.s V_7 - IL_377a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_377f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3784: stloc.s V_8 - IL_3786: br.s IL_37ce - - IL_3788: ldloc.s V_7 - IL_378a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_378f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3794: stloc.s V_10 - IL_3796: ldloc.s V_6 - IL_3798: call string [mscorlib]System.Convert::ToString(int32) - IL_379d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_37a2: stloc.s V_7 - IL_37a4: ldloc.s V_10 - IL_37a6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_37ab: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_37b0: stloc.s V_9 - IL_37b2: ldloc.s V_10 - IL_37b4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_37b9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_37be: stloc.s V_10 - IL_37c0: ldloc.s V_7 - IL_37c2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_37c7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_37cc: stloc.s V_9 - IL_37ce: ldloc.s V_10 - IL_37d0: ldloc.s V_8 - IL_37d2: beq.s IL_381c - - IL_37d4: ldloc.s V_8 - IL_37d6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_37db: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_37e0: stloc.s V_10 - IL_37e2: ldloc.s V_7 - IL_37e4: call string [mscorlib]System.Convert::ToString(int32) - IL_37e9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_37ee: stloc.s V_8 - IL_37f0: ldloc.s V_6 - IL_37f2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_37f7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_37fc: stloc.s V_8 - IL_37fe: ldloc.s V_8 - IL_3800: call string [mscorlib]System.Convert::ToString(int32) - IL_3805: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_380a: stloc.s V_7 - IL_380c: ldloc.s V_9 - IL_380e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3813: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3818: stloc.s V_9 - IL_381a: br.s IL_3862 - - IL_381c: ldloc.s V_6 - IL_381e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3823: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3828: stloc.s V_6 - IL_382a: ldloc.s V_9 - IL_382c: call string [mscorlib]System.Convert::ToString(int32) - IL_3831: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3836: stloc.s V_7 - IL_3838: ldloc.s V_8 - IL_383a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_383f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3844: stloc.s V_9 - IL_3846: ldloc.s V_7 - IL_3848: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_384d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3852: stloc.s V_6 - IL_3854: ldloc.s V_7 - IL_3856: call string [mscorlib]System.Convert::ToString(int32) - IL_385b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3860: stloc.s V_9 - IL_3862: ldloc.s V_9 - IL_3864: ldloc.s V_7 - IL_3866: ble.s IL_38b0 - - IL_3868: ldloc.s V_6 - IL_386a: call string [mscorlib]System.Convert::ToString(int32) - IL_386f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3874: stloc.s V_8 - IL_3876: ldloc.s V_7 - IL_3878: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_387d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3882: stloc.s V_9 - IL_3884: ldloc.s V_9 - IL_3886: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_388b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3890: stloc.s V_10 - IL_3892: ldloc.s V_7 - IL_3894: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3899: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_389e: stloc.s V_6 - IL_38a0: ldloc.s V_10 - IL_38a2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_38a7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_38ac: stloc.s V_8 - IL_38ae: br.s IL_38f6 - - IL_38b0: ldloc.s V_9 - IL_38b2: call string [mscorlib]System.Convert::ToString(int32) - IL_38b7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_38bc: stloc.s V_7 - IL_38be: ldloc.s V_7 - IL_38c0: call string [mscorlib]System.Convert::ToString(int32) - IL_38c5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_38ca: stloc.s V_6 - IL_38cc: ldloc.s V_8 - IL_38ce: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_38d3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_38d8: stloc.s V_9 - IL_38da: ldloc.s V_7 - IL_38dc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_38e1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_38e6: stloc.s V_6 - IL_38e8: ldloc.s V_8 - IL_38ea: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_38ef: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_38f4: stloc.s V_10 - IL_38f6: ldloc.s V_7 - IL_38f8: ldloc.s V_6 - IL_38fa: bne.un.s IL_3944 - - IL_38fc: ldloc.s V_9 - IL_38fe: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3903: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3908: stloc.s V_6 - IL_390a: ldloc.s V_10 - IL_390c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3911: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3916: stloc.s V_8 - IL_3918: ldloc.s V_9 - IL_391a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_391f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3924: stloc.s V_9 - IL_3926: ldloc.s V_6 - IL_3928: call string [mscorlib]System.Convert::ToString(int32) - IL_392d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3932: stloc.s V_10 - IL_3934: ldloc.s V_6 - IL_3936: call string [mscorlib]System.Convert::ToString(int32) - IL_393b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3940: stloc.s V_6 - IL_3942: br.s IL_398a - - IL_3944: ldloc.s V_10 - IL_3946: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_394b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3950: stloc.s V_7 - IL_3952: ldloc.s V_10 - IL_3954: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3959: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_395e: stloc.s V_9 - IL_3960: ldloc.s V_7 - IL_3962: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3967: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_396c: stloc.s V_10 - IL_396e: ldloc.s V_7 - IL_3970: call string [mscorlib]System.Convert::ToString(int32) - IL_3975: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_397a: stloc.s V_9 - IL_397c: ldloc.s V_6 - IL_397e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3983: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3988: stloc.s V_6 - IL_398a: ldloc.s V_7 - IL_398c: ldloc.s V_6 - IL_398e: bge.s IL_39d8 - - IL_3990: ldloc.s V_6 - IL_3992: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3997: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_399c: stloc.s V_7 - IL_399e: ldloc.s V_7 - IL_39a0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_39a5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_39aa: stloc.s V_7 - IL_39ac: ldloc.s V_7 - IL_39ae: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_39b3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_39b8: stloc.s V_9 - IL_39ba: ldloc.s V_8 - IL_39bc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_39c1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_39c6: stloc.s V_9 - IL_39c8: ldloc.s V_8 - IL_39ca: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_39cf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_39d4: stloc.s V_7 - IL_39d6: br.s IL_3a1e - - IL_39d8: ldloc.s V_8 - IL_39da: call string [mscorlib]System.Convert::ToString(int32) - IL_39df: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_39e4: stloc.s V_6 - IL_39e6: ldloc.s V_7 - IL_39e8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_39ed: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_39f2: stloc.s V_8 - IL_39f4: ldloc.s V_7 - IL_39f6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_39fb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3a00: stloc.s V_6 - IL_3a02: ldloc.s V_9 - IL_3a04: call string [mscorlib]System.Convert::ToString(int32) - IL_3a09: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3a0e: stloc.s V_7 - IL_3a10: ldloc.s V_7 - IL_3a12: call string [mscorlib]System.Convert::ToString(int32) - IL_3a17: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3a1c: stloc.s V_9 - IL_3a1e: ldloc.s V_9 - IL_3a20: ldloc.s V_7 - IL_3a22: bgt.s IL_3a6c - - IL_3a24: ldloc.s V_7 - IL_3a26: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3a2b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3a30: stloc.s V_6 - IL_3a32: ldloc.s V_8 - IL_3a34: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3a39: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3a3e: stloc.s V_10 - IL_3a40: ldloc.s V_8 - IL_3a42: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3a47: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3a4c: stloc.s V_9 - IL_3a4e: ldloc.s V_10 - IL_3a50: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3a55: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3a5a: stloc.s V_8 - IL_3a5c: ldloc.s V_9 - IL_3a5e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3a63: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3a68: stloc.s V_9 - IL_3a6a: br.s IL_3ab2 - - IL_3a6c: ldloc.s V_8 - IL_3a6e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3a73: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3a78: stloc.s V_9 - IL_3a7a: ldloc.s V_7 - IL_3a7c: call string [mscorlib]System.Convert::ToString(int32) - IL_3a81: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3a86: stloc.s V_9 - IL_3a88: ldloc.s V_6 - IL_3a8a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3a8f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3a94: stloc.s V_9 - IL_3a96: ldloc.s V_6 - IL_3a98: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3a9d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3aa2: stloc.s V_9 - IL_3aa4: ldloc.s V_9 - IL_3aa6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3aab: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3ab0: stloc.s V_8 - IL_3ab2: ldloc.s V_6 - IL_3ab4: ldloc.s V_6 - IL_3ab6: ble.s IL_3b00 - - IL_3ab8: ldloc.s V_10 - IL_3aba: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3abf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3ac4: stloc.s V_7 - IL_3ac6: ldloc.s V_8 - IL_3ac8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3acd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3ad2: stloc.s V_7 - IL_3ad4: ldloc.s V_6 - IL_3ad6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3adb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3ae0: stloc.s V_10 - IL_3ae2: ldloc.s V_9 - IL_3ae4: call string [mscorlib]System.Convert::ToString(int32) - IL_3ae9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3aee: stloc.s V_10 - IL_3af0: ldloc.s V_7 - IL_3af2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3af7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3afc: stloc.s V_7 - IL_3afe: br.s IL_3b46 - - IL_3b00: ldloc.s V_9 - IL_3b02: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3b07: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3b0c: stloc.s V_6 - IL_3b0e: ldloc.s V_6 - IL_3b10: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3b15: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3b1a: stloc.s V_10 - IL_3b1c: ldloc.s V_10 - IL_3b1e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3b23: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3b28: stloc.s V_6 - IL_3b2a: ldloc.s V_6 - IL_3b2c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3b31: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3b36: stloc.s V_7 - IL_3b38: ldloc.s V_10 - IL_3b3a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3b3f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3b44: stloc.s V_7 - IL_3b46: ldloc.s V_8 - IL_3b48: ldloc.s V_7 - IL_3b4a: bne.un.s IL_3b94 - - IL_3b4c: ldloc.s V_7 - IL_3b4e: call string [mscorlib]System.Convert::ToString(int32) - IL_3b53: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3b58: stloc.s V_10 - IL_3b5a: ldloc.s V_9 - IL_3b5c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3b61: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3b66: stloc.s V_9 - IL_3b68: ldloc.s V_10 - IL_3b6a: call string [mscorlib]System.Convert::ToString(int32) - IL_3b6f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3b74: stloc.s V_10 - IL_3b76: ldloc.s V_8 - IL_3b78: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3b7d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3b82: stloc.s V_6 - IL_3b84: ldloc.s V_8 - IL_3b86: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3b8b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3b90: stloc.s V_7 - IL_3b92: br.s IL_3bda - - IL_3b94: ldloc.s V_10 - IL_3b96: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3b9b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3ba0: stloc.s V_10 - IL_3ba2: ldloc.s V_6 - IL_3ba4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3ba9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3bae: stloc.s V_6 - IL_3bb0: ldloc.s V_9 - IL_3bb2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3bb7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3bbc: stloc.s V_10 - IL_3bbe: ldloc.s V_6 - IL_3bc0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3bc5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3bca: stloc.s V_6 - IL_3bcc: ldloc.s V_8 - IL_3bce: call string [mscorlib]System.Convert::ToString(int32) - IL_3bd3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3bd8: stloc.s V_7 - IL_3bda: ldloc.s V_6 - IL_3bdc: ldloc.s V_6 - IL_3bde: bge.s IL_3c28 - - IL_3be0: ldloc.s V_10 - IL_3be2: call string [mscorlib]System.Convert::ToString(int32) - IL_3be7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3bec: stloc.s V_8 - IL_3bee: ldloc.s V_9 - IL_3bf0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3bf5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3bfa: stloc.s V_10 - IL_3bfc: ldloc.s V_7 - IL_3bfe: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3c03: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3c08: stloc.s V_10 - IL_3c0a: ldloc.s V_8 - IL_3c0c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3c11: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3c16: stloc.s V_7 - IL_3c18: ldloc.s V_9 - IL_3c1a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3c1f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3c24: stloc.s V_8 - IL_3c26: br.s IL_3c6e - - IL_3c28: ldloc.s V_10 - IL_3c2a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3c2f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3c34: stloc.s V_8 - IL_3c36: ldloc.s V_7 - IL_3c38: call string [mscorlib]System.Convert::ToString(int32) - IL_3c3d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3c42: stloc.s V_10 - IL_3c44: ldloc.s V_7 - IL_3c46: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3c4b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3c50: stloc.s V_7 - IL_3c52: ldloc.s V_8 - IL_3c54: call string [mscorlib]System.Convert::ToString(int32) - IL_3c59: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3c5e: stloc.s V_9 - IL_3c60: ldloc.s V_10 - IL_3c62: call string [mscorlib]System.Convert::ToString(int32) - IL_3c67: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3c6c: stloc.s V_8 - IL_3c6e: ldloc.s V_9 - IL_3c70: ldloc.s V_10 - IL_3c72: bge.s IL_3cbc - - IL_3c74: ldloc.s V_10 - IL_3c76: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3c7b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3c80: stloc.s V_7 - IL_3c82: ldloc.s V_10 - IL_3c84: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3c89: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3c8e: stloc.s V_9 - IL_3c90: ldloc.s V_7 - IL_3c92: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3c97: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3c9c: stloc.s V_7 - IL_3c9e: ldloc.s V_6 - IL_3ca0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3ca5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3caa: stloc.s V_10 - IL_3cac: ldloc.s V_6 - IL_3cae: call string [mscorlib]System.Convert::ToString(int32) - IL_3cb3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3cb8: stloc.s V_6 - IL_3cba: br.s IL_3d02 - - IL_3cbc: ldloc.s V_7 - IL_3cbe: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3cc3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3cc8: stloc.s V_7 - IL_3cca: ldloc.s V_7 - IL_3ccc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3cd1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3cd6: stloc.s V_9 - IL_3cd8: ldloc.s V_9 - IL_3cda: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3cdf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3ce4: stloc.s V_9 - IL_3ce6: ldloc.s V_10 - IL_3ce8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3ced: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3cf2: stloc.s V_8 - IL_3cf4: ldloc.s V_7 - IL_3cf6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3cfb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3d00: stloc.s V_7 - IL_3d02: ldloc.s V_10 - IL_3d04: ldloc.s V_7 - IL_3d06: bge.s IL_3d50 - - IL_3d08: ldloc.s V_10 - IL_3d0a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3d0f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3d14: stloc.s V_9 - IL_3d16: ldloc.s V_7 - IL_3d18: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3d1d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3d22: stloc.s V_10 - IL_3d24: ldloc.s V_8 - IL_3d26: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3d2b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3d30: stloc.s V_10 - IL_3d32: ldloc.s V_6 - IL_3d34: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3d39: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3d3e: stloc.s V_6 - IL_3d40: ldloc.s V_10 - IL_3d42: call string [mscorlib]System.Convert::ToString(int32) - IL_3d47: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3d4c: stloc.s V_7 - IL_3d4e: br.s IL_3d96 - - IL_3d50: ldloc.s V_10 - IL_3d52: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3d57: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3d5c: stloc.s V_7 - IL_3d5e: ldloc.s V_8 - IL_3d60: call string [mscorlib]System.Convert::ToString(int32) - IL_3d65: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3d6a: stloc.s V_8 - IL_3d6c: ldloc.s V_9 - IL_3d6e: call string [mscorlib]System.Convert::ToString(int32) - IL_3d73: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3d78: stloc.s V_8 - IL_3d7a: ldloc.s V_9 - IL_3d7c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3d81: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3d86: stloc.s V_7 - IL_3d88: ldloc.s V_9 - IL_3d8a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3d8f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3d94: stloc.s V_10 - IL_3d96: ldloc.s V_9 - IL_3d98: ldloc.s V_10 - IL_3d9a: ble.s IL_3de4 - - IL_3d9c: ldloc.s V_8 - IL_3d9e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3da3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3da8: stloc.s V_10 - IL_3daa: ldloc.s V_10 - IL_3dac: call string [mscorlib]System.Convert::ToString(int32) - IL_3db1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3db6: stloc.s V_7 - IL_3db8: ldloc.s V_8 - IL_3dba: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3dbf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3dc4: stloc.s V_10 - IL_3dc6: ldloc.s V_10 - IL_3dc8: call string [mscorlib]System.Convert::ToString(int32) - IL_3dcd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3dd2: stloc.s V_10 - IL_3dd4: ldloc.s V_8 - IL_3dd6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3ddb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3de0: stloc.s V_8 - IL_3de2: br.s IL_3e2a - - IL_3de4: ldloc.s V_6 - IL_3de6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3deb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3df0: stloc.s V_6 - IL_3df2: ldloc.s V_8 - IL_3df4: call string [mscorlib]System.Convert::ToString(int32) - IL_3df9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3dfe: stloc.s V_7 - IL_3e00: ldloc.s V_8 - IL_3e02: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3e07: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3e0c: stloc.s V_9 - IL_3e0e: ldloc.s V_10 - IL_3e10: call string [mscorlib]System.Convert::ToString(int32) - IL_3e15: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3e1a: stloc.s V_7 - IL_3e1c: ldloc.s V_10 - IL_3e1e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3e23: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3e28: stloc.s V_9 - IL_3e2a: ldloc.s V_6 - IL_3e2c: ldloc.s V_9 - IL_3e2e: bne.un.s IL_3e78 - - IL_3e30: ldloc.s V_7 - IL_3e32: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3e37: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3e3c: stloc.s V_7 - IL_3e3e: ldloc.s V_9 - IL_3e40: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3e45: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3e4a: stloc.s V_7 - IL_3e4c: ldloc.s V_9 - IL_3e4e: call string [mscorlib]System.Convert::ToString(int32) - IL_3e53: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3e58: stloc.s V_6 - IL_3e5a: ldloc.s V_10 - IL_3e5c: call string [mscorlib]System.Convert::ToString(int32) - IL_3e61: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3e66: stloc.s V_6 - IL_3e68: ldloc.s V_9 - IL_3e6a: call string [mscorlib]System.Convert::ToString(int32) - IL_3e6f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3e74: stloc.s V_9 - IL_3e76: br.s IL_3ebe - - IL_3e78: ldloc.s V_10 - IL_3e7a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3e7f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3e84: stloc.s V_7 - IL_3e86: ldloc.s V_6 - IL_3e88: call string [mscorlib]System.Convert::ToString(int32) - IL_3e8d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3e92: stloc.s V_9 - IL_3e94: ldloc.s V_6 - IL_3e96: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3e9b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3ea0: stloc.s V_7 - IL_3ea2: ldloc.s V_10 - IL_3ea4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3ea9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3eae: stloc.s V_6 - IL_3eb0: ldloc.s V_10 - IL_3eb2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3eb7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3ebc: stloc.s V_10 - IL_3ebe: ldloc.s V_6 - IL_3ec0: ldloc.s V_9 - IL_3ec2: bgt.s IL_3f0c - - IL_3ec4: ldloc.s V_10 - IL_3ec6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3ecb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3ed0: stloc.s V_7 - IL_3ed2: ldloc.s V_6 - IL_3ed4: call string [mscorlib]System.Convert::ToString(int32) - IL_3ed9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3ede: stloc.s V_7 - IL_3ee0: ldloc.s V_6 - IL_3ee2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3ee7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3eec: stloc.s V_8 - IL_3eee: ldloc.s V_9 - IL_3ef0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3ef5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3efa: stloc.s V_9 - IL_3efc: ldloc.s V_10 - IL_3efe: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3f03: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3f08: stloc.s V_8 - IL_3f0a: br.s IL_3f52 - - IL_3f0c: ldloc.s V_6 - IL_3f0e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3f13: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3f18: stloc.s V_6 - IL_3f1a: ldloc.s V_7 - IL_3f1c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3f21: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3f26: stloc.s V_10 - IL_3f28: ldloc.s V_7 - IL_3f2a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3f2f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3f34: stloc.s V_9 - IL_3f36: ldloc.s V_6 - IL_3f38: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3f3d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3f42: stloc.s V_6 - IL_3f44: ldloc.s V_7 - IL_3f46: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3f4b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3f50: stloc.s V_9 - IL_3f52: ldloc.s V_7 - IL_3f54: ldloc.s V_7 - IL_3f56: bne.un.s IL_3fa0 - - IL_3f58: ldloc.s V_8 - IL_3f5a: call string [mscorlib]System.Convert::ToString(int32) - IL_3f5f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3f64: stloc.s V_7 - IL_3f66: ldloc.s V_7 - IL_3f68: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3f6d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3f72: stloc.s V_9 - IL_3f74: ldloc.s V_8 - IL_3f76: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3f7b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3f80: stloc.s V_10 - IL_3f82: ldloc.s V_7 - IL_3f84: call string [mscorlib]System.Convert::ToString(int32) - IL_3f89: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3f8e: stloc.s V_10 - IL_3f90: ldloc.s V_8 - IL_3f92: call string [mscorlib]System.Convert::ToString(int32) - IL_3f97: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3f9c: stloc.s V_8 - IL_3f9e: br.s IL_3fe6 - - IL_3fa0: ldloc.s V_10 - IL_3fa2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3fa7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3fac: stloc.s V_6 - IL_3fae: ldloc.s V_6 - IL_3fb0: call string [mscorlib]System.Convert::ToString(int32) - IL_3fb5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3fba: stloc.s V_10 - IL_3fbc: ldloc.s V_7 - IL_3fbe: call string [mscorlib]System.Convert::ToString(int32) - IL_3fc3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3fc8: stloc.s V_7 - IL_3fca: ldloc.s V_7 - IL_3fcc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3fd1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3fd6: stloc.s V_9 - IL_3fd8: ldloc.s V_7 - IL_3fda: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3fdf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3fe4: stloc.s V_10 - IL_3fe6: ldloc.s V_10 - IL_3fe8: ldloc.s V_7 - IL_3fea: bne.un.s IL_4034 - - IL_3fec: ldloc.s V_10 - IL_3fee: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3ff3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3ff8: stloc.s V_7 - IL_3ffa: ldloc.s V_8 - IL_3ffc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4001: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4006: stloc.s V_7 - IL_4008: ldloc.s V_10 - IL_400a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_400f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4014: stloc.s V_9 - IL_4016: ldloc.s V_7 - IL_4018: call string [mscorlib]System.Convert::ToString(int32) - IL_401d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4022: stloc.s V_10 - IL_4024: ldloc.s V_8 - IL_4026: call string [mscorlib]System.Convert::ToString(int32) - IL_402b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4030: stloc.s V_10 - IL_4032: br.s IL_407a - - IL_4034: ldloc.s V_7 - IL_4036: call string [mscorlib]System.Convert::ToString(int32) - IL_403b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4040: stloc.s V_8 - IL_4042: ldloc.s V_9 - IL_4044: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4049: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_404e: stloc.s V_7 - IL_4050: ldloc.s V_6 - IL_4052: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4057: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_405c: stloc.s V_7 - IL_405e: ldloc.s V_9 - IL_4060: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4065: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_406a: stloc.s V_6 - IL_406c: ldloc.s V_7 - IL_406e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4073: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4078: stloc.s V_10 - IL_407a: ldloc.s V_6 - IL_407c: ldloc.s V_9 - IL_407e: bge.s IL_40c8 - - IL_4080: ldloc.s V_8 - IL_4082: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4087: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_408c: stloc.s V_10 - IL_408e: ldloc.s V_8 - IL_4090: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4095: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_409a: stloc.s V_8 - IL_409c: ldloc.s V_8 - IL_409e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_40a3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_40a8: stloc.s V_8 - IL_40aa: ldloc.s V_10 - IL_40ac: call string [mscorlib]System.Convert::ToString(int32) - IL_40b1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_40b6: stloc.s V_6 - IL_40b8: ldloc.s V_7 - IL_40ba: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_40bf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_40c4: stloc.s V_6 - IL_40c6: br.s IL_410e - - IL_40c8: ldloc.s V_7 - IL_40ca: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_40cf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_40d4: stloc.s V_9 - IL_40d6: ldloc.s V_10 - IL_40d8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_40dd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_40e2: stloc.s V_10 - IL_40e4: ldloc.s V_6 - IL_40e6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_40eb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_40f0: stloc.s V_9 - IL_40f2: ldloc.s V_7 - IL_40f4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_40f9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_40fe: stloc.s V_10 - IL_4100: ldloc.s V_7 - IL_4102: call string [mscorlib]System.Convert::ToString(int32) - IL_4107: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_410c: stloc.s V_9 - IL_410e: ldloc.s V_8 - IL_4110: ldloc.s V_8 - IL_4112: bne.un.s IL_415c - - IL_4114: ldloc.s V_9 - IL_4116: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_411b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4120: stloc.s V_9 - IL_4122: ldloc.s V_9 - IL_4124: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4129: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_412e: stloc.s V_6 - IL_4130: ldloc.s V_10 - IL_4132: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4137: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_413c: stloc.s V_9 - IL_413e: ldloc.s V_8 - IL_4140: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4145: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_414a: stloc.s V_7 - IL_414c: ldloc.s V_7 - IL_414e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4153: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4158: stloc.s V_6 - IL_415a: br.s IL_41a2 - - IL_415c: ldloc.s V_8 - IL_415e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4163: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4168: stloc.s V_7 - IL_416a: ldloc.s V_9 - IL_416c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4171: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4176: stloc.s V_10 - IL_4178: ldloc.s V_6 - IL_417a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_417f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4184: stloc.s V_9 - IL_4186: ldloc.s V_8 - IL_4188: call string [mscorlib]System.Convert::ToString(int32) - IL_418d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4192: stloc.s V_7 - IL_4194: ldloc.s V_8 - IL_4196: call string [mscorlib]System.Convert::ToString(int32) - IL_419b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_41a0: stloc.s V_6 - IL_41a2: ldloc.s V_8 - IL_41a4: ldloc.s V_10 - IL_41a6: ble.s IL_41f0 - - IL_41a8: ldloc.s V_9 - IL_41aa: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_41af: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_41b4: stloc.s V_7 - IL_41b6: ldloc.s V_8 - IL_41b8: call string [mscorlib]System.Convert::ToString(int32) - IL_41bd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_41c2: stloc.s V_9 - IL_41c4: ldloc.s V_8 - IL_41c6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_41cb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_41d0: stloc.s V_8 - IL_41d2: ldloc.s V_10 - IL_41d4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_41d9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_41de: stloc.s V_6 - IL_41e0: ldloc.s V_6 - IL_41e2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_41e7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_41ec: stloc.s V_9 - IL_41ee: br.s IL_4236 - - IL_41f0: ldloc.s V_8 - IL_41f2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_41f7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_41fc: stloc.s V_6 - IL_41fe: ldloc.s V_7 - IL_4200: call string [mscorlib]System.Convert::ToString(int32) - IL_4205: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_420a: stloc.s V_10 - IL_420c: ldloc.s V_9 - IL_420e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4213: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4218: stloc.s V_9 - IL_421a: ldloc.s V_7 - IL_421c: call string [mscorlib]System.Convert::ToString(int32) - IL_4221: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4226: stloc.s V_9 - IL_4228: ldloc.s V_6 - IL_422a: call string [mscorlib]System.Convert::ToString(int32) - IL_422f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4234: stloc.s V_6 - IL_4236: ldloc.s V_6 - IL_4238: ldloc.s V_9 - IL_423a: blt.s IL_4284 - - IL_423c: ldloc.s V_9 - IL_423e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4243: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4248: stloc.s V_8 - IL_424a: ldloc.s V_8 - IL_424c: call string [mscorlib]System.Convert::ToString(int32) - IL_4251: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4256: stloc.s V_8 - IL_4258: ldloc.s V_6 - IL_425a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_425f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4264: stloc.s V_6 - IL_4266: ldloc.s V_10 - IL_4268: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_426d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4272: stloc.s V_6 - IL_4274: ldloc.s V_10 - IL_4276: call string [mscorlib]System.Convert::ToString(int32) - IL_427b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4280: stloc.s V_6 - IL_4282: br.s IL_42ca - - IL_4284: ldloc.s V_7 - IL_4286: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_428b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4290: stloc.s V_7 - IL_4292: ldloc.s V_9 - IL_4294: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4299: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_429e: stloc.s V_10 - IL_42a0: ldloc.s V_7 - IL_42a2: call string [mscorlib]System.Convert::ToString(int32) - IL_42a7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_42ac: stloc.s V_9 - IL_42ae: ldloc.s V_6 - IL_42b0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_42b5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_42ba: stloc.s V_6 - IL_42bc: ldloc.s V_8 - IL_42be: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_42c3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_42c8: stloc.s V_6 - IL_42ca: ldloc.s V_10 - IL_42cc: ldloc.s V_6 - IL_42ce: blt.s IL_4318 - - IL_42d0: ldloc.s V_10 - IL_42d2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_42d7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_42dc: stloc.s V_6 - IL_42de: ldloc.s V_9 - IL_42e0: call string [mscorlib]System.Convert::ToString(int32) - IL_42e5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_42ea: stloc.s V_8 - IL_42ec: ldloc.s V_7 - IL_42ee: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_42f3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_42f8: stloc.s V_6 - IL_42fa: ldloc.s V_8 - IL_42fc: call string [mscorlib]System.Convert::ToString(int32) - IL_4301: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4306: stloc.s V_7 - IL_4308: ldloc.s V_10 - IL_430a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_430f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4314: stloc.s V_9 - IL_4316: br.s IL_435e - - IL_4318: ldloc.s V_10 - IL_431a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_431f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4324: stloc.s V_8 - IL_4326: ldloc.s V_10 - IL_4328: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_432d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4332: stloc.s V_9 - IL_4334: ldloc.s V_6 - IL_4336: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_433b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4340: stloc.s V_6 - IL_4342: ldloc.s V_8 - IL_4344: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4349: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_434e: stloc.s V_7 - IL_4350: ldloc.s V_6 - IL_4352: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4357: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_435c: stloc.s V_7 - IL_435e: ldloc.s V_9 - IL_4360: ldloc.s V_9 - IL_4362: bgt.s IL_43ac - - IL_4364: ldloc.s V_8 - IL_4366: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_436b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4370: stloc.s V_10 - IL_4372: ldloc.s V_7 - IL_4374: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4379: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_437e: stloc.s V_10 - IL_4380: ldloc.s V_7 - IL_4382: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4387: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_438c: stloc.s V_9 - IL_438e: ldloc.s V_10 - IL_4390: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4395: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_439a: stloc.s V_8 - IL_439c: ldloc.s V_9 - IL_439e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_43a3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_43a8: stloc.s V_10 - IL_43aa: br.s IL_43f2 - - IL_43ac: ldloc.s V_9 - IL_43ae: call string [mscorlib]System.Convert::ToString(int32) - IL_43b3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_43b8: stloc.s V_6 - IL_43ba: ldloc.s V_7 - IL_43bc: call string [mscorlib]System.Convert::ToString(int32) - IL_43c1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_43c6: stloc.s V_9 - IL_43c8: ldloc.s V_7 - IL_43ca: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_43cf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_43d4: stloc.s V_7 - IL_43d6: ldloc.s V_7 - IL_43d8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_43dd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_43e2: stloc.s V_9 - IL_43e4: ldloc.s V_10 - IL_43e6: call string [mscorlib]System.Convert::ToString(int32) - IL_43eb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_43f0: stloc.s V_7 - IL_43f2: ldloc.s V_9 - IL_43f4: ldloc.s V_10 - IL_43f6: bge.s IL_4440 - - IL_43f8: ldloc.s V_8 - IL_43fa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_43ff: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4404: stloc.s V_10 - IL_4406: ldloc.s V_10 - IL_4408: call string [mscorlib]System.Convert::ToString(int32) - IL_440d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4412: stloc.s V_8 - IL_4414: ldloc.s V_9 - IL_4416: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_441b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4420: stloc.s V_8 - IL_4422: ldloc.s V_7 - IL_4424: call string [mscorlib]System.Convert::ToString(int32) - IL_4429: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_442e: stloc.s V_9 - IL_4430: ldloc.s V_10 - IL_4432: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4437: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_443c: stloc.s V_7 - IL_443e: br.s IL_4486 - - IL_4440: ldloc.s V_7 - IL_4442: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4447: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_444c: stloc.s V_10 - IL_444e: ldloc.s V_6 - IL_4450: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4455: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_445a: stloc.s V_8 - IL_445c: ldloc.s V_10 - IL_445e: call string [mscorlib]System.Convert::ToString(int32) - IL_4463: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4468: stloc.s V_7 - IL_446a: ldloc.s V_9 - IL_446c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4471: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4476: stloc.s V_6 - IL_4478: ldloc.s V_6 - IL_447a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_447f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4484: stloc.s V_10 - IL_4486: ldloc.s V_6 - IL_4488: ldloc.s V_9 - IL_448a: blt.s IL_44d4 - - IL_448c: ldloc.s V_8 - IL_448e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4493: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4498: stloc.s V_6 - IL_449a: ldloc.s V_6 - IL_449c: call string [mscorlib]System.Convert::ToString(int32) - IL_44a1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_44a6: stloc.s V_7 - IL_44a8: ldloc.s V_8 - IL_44aa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_44af: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_44b4: stloc.s V_9 - IL_44b6: ldloc.s V_7 - IL_44b8: call string [mscorlib]System.Convert::ToString(int32) - IL_44bd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_44c2: stloc.s V_8 - IL_44c4: ldloc.s V_9 - IL_44c6: call string [mscorlib]System.Convert::ToString(int32) - IL_44cb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_44d0: stloc.s V_6 - IL_44d2: br.s IL_451a - - IL_44d4: ldloc.s V_8 - IL_44d6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_44db: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_44e0: stloc.s V_7 - IL_44e2: ldloc.s V_10 - IL_44e4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_44e9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_44ee: stloc.s V_8 - IL_44f0: ldloc.s V_7 - IL_44f2: call string [mscorlib]System.Convert::ToString(int32) - IL_44f7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_44fc: stloc.s V_10 - IL_44fe: ldloc.s V_8 - IL_4500: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4505: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_450a: stloc.s V_8 - IL_450c: ldloc.s V_9 - IL_450e: call string [mscorlib]System.Convert::ToString(int32) - IL_4513: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4518: stloc.s V_7 - IL_451a: ldloc.s V_7 - IL_451c: ldloc.s V_8 - IL_451e: bne.un.s IL_4568 - - IL_4520: ldloc.s V_8 - IL_4522: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4527: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_452c: stloc.s V_9 - IL_452e: ldloc.s V_8 - IL_4530: call string [mscorlib]System.Convert::ToString(int32) - IL_4535: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_453a: stloc.s V_8 - IL_453c: ldloc.s V_9 - IL_453e: call string [mscorlib]System.Convert::ToString(int32) - IL_4543: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4548: stloc.s V_7 - IL_454a: ldloc.s V_6 - IL_454c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4551: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4556: stloc.s V_8 - IL_4558: ldloc.s V_8 - IL_455a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_455f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4564: stloc.s V_8 - IL_4566: br.s IL_45ae - - IL_4568: ldloc.s V_6 - IL_456a: call string [mscorlib]System.Convert::ToString(int32) - IL_456f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4574: stloc.s V_10 - IL_4576: ldloc.s V_7 - IL_4578: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_457d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4582: stloc.s V_8 - IL_4584: ldloc.s V_7 - IL_4586: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_458b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4590: stloc.s V_10 - IL_4592: ldloc.s V_7 - IL_4594: call string [mscorlib]System.Convert::ToString(int32) - IL_4599: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_459e: stloc.s V_7 - IL_45a0: ldloc.s V_8 - IL_45a2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_45a7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_45ac: stloc.s V_9 - IL_45ae: ldloc.s V_10 - IL_45b0: ldloc.s V_7 - IL_45b2: bne.un.s IL_45fc - - IL_45b4: ldloc.s V_7 - IL_45b6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_45bb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_45c0: stloc.s V_10 - IL_45c2: ldloc.s V_9 - IL_45c4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_45c9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_45ce: stloc.s V_6 - IL_45d0: ldloc.s V_6 - IL_45d2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_45d7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_45dc: stloc.s V_10 - IL_45de: ldloc.s V_9 - IL_45e0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_45e5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_45ea: stloc.s V_6 - IL_45ec: ldloc.s V_7 - IL_45ee: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_45f3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_45f8: stloc.s V_7 - IL_45fa: br.s IL_4642 - - IL_45fc: ldloc.s V_6 - IL_45fe: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4603: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4608: stloc.s V_10 - IL_460a: ldloc.s V_7 - IL_460c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4611: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4616: stloc.s V_9 - IL_4618: ldloc.s V_10 - IL_461a: call string [mscorlib]System.Convert::ToString(int32) - IL_461f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4624: stloc.s V_6 - IL_4626: ldloc.s V_10 - IL_4628: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_462d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4632: stloc.s V_6 - IL_4634: ldloc.s V_7 - IL_4636: call string [mscorlib]System.Convert::ToString(int32) - IL_463b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4640: stloc.s V_7 - IL_4642: ldloc.s V_9 - IL_4644: ldloc.s V_10 - IL_4646: blt.s IL_4690 - - IL_4648: ldloc.s V_9 - IL_464a: call string [mscorlib]System.Convert::ToString(int32) - IL_464f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4654: stloc.s V_9 - IL_4656: ldloc.s V_9 - IL_4658: call string [mscorlib]System.Convert::ToString(int32) - IL_465d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4662: stloc.s V_7 - IL_4664: ldloc.s V_9 - IL_4666: call string [mscorlib]System.Convert::ToString(int32) - IL_466b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4670: stloc.s V_7 - IL_4672: ldloc.s V_10 - IL_4674: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4679: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_467e: stloc.s V_7 - IL_4680: ldloc.s V_9 - IL_4682: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4687: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_468c: stloc.s V_8 - IL_468e: br.s IL_46d6 - - IL_4690: ldloc.s V_6 - IL_4692: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4697: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_469c: stloc.s V_10 - IL_469e: ldloc.s V_10 - IL_46a0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_46a5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_46aa: stloc.s V_8 - IL_46ac: ldloc.s V_9 - IL_46ae: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_46b3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_46b8: stloc.s V_6 - IL_46ba: ldloc.s V_9 - IL_46bc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_46c1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_46c6: stloc.s V_8 - IL_46c8: ldloc.s V_8 - IL_46ca: call string [mscorlib]System.Convert::ToString(int32) - IL_46cf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_46d4: stloc.s V_10 - IL_46d6: ldloc.s V_9 - IL_46d8: ldloc.s V_8 - IL_46da: beq.s IL_4724 - - IL_46dc: ldloc.s V_7 - IL_46de: call string [mscorlib]System.Convert::ToString(int32) - IL_46e3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_46e8: stloc.s V_10 - IL_46ea: ldloc.s V_9 - IL_46ec: call string [mscorlib]System.Convert::ToString(int32) - IL_46f1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_46f6: stloc.s V_9 - IL_46f8: ldloc.s V_8 - IL_46fa: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_46ff: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4704: stloc.s V_7 - IL_4706: ldloc.s V_10 - IL_4708: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_470d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4712: stloc.s V_9 - IL_4714: ldloc.s V_6 - IL_4716: call string [mscorlib]System.Convert::ToString(int32) - IL_471b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4720: stloc.s V_10 - IL_4722: br.s IL_476a - - IL_4724: ldloc.s V_10 - IL_4726: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_472b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4730: stloc.s V_6 - IL_4732: ldloc.s V_8 - IL_4734: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4739: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_473e: stloc.s V_6 - IL_4740: ldloc.s V_10 - IL_4742: call string [mscorlib]System.Convert::ToString(int32) - IL_4747: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_474c: stloc.s V_6 - IL_474e: ldloc.s V_9 - IL_4750: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4755: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_475a: stloc.s V_10 - IL_475c: ldloc.s V_6 - IL_475e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4763: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4768: stloc.s V_6 - IL_476a: ldloc.s V_7 - IL_476c: ldloc.s V_6 - IL_476e: ble.s IL_47b8 - - IL_4770: ldloc.s V_8 - IL_4772: call string [mscorlib]System.Convert::ToString(int32) - IL_4777: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_477c: stloc.s V_8 - IL_477e: ldloc.s V_7 - IL_4780: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4785: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_478a: stloc.s V_8 - IL_478c: ldloc.s V_10 - IL_478e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4793: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4798: stloc.s V_8 - IL_479a: ldloc.s V_10 - IL_479c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_47a1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_47a6: stloc.s V_7 - IL_47a8: ldloc.s V_8 - IL_47aa: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_47af: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_47b4: stloc.s V_10 - IL_47b6: br.s IL_47fe - - IL_47b8: ldloc.s V_7 - IL_47ba: call string [mscorlib]System.Convert::ToString(int32) - IL_47bf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_47c4: stloc.s V_9 - IL_47c6: ldloc.s V_9 - IL_47c8: call string [mscorlib]System.Convert::ToString(int32) - IL_47cd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_47d2: stloc.s V_9 - IL_47d4: ldloc.s V_6 - IL_47d6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_47db: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_47e0: stloc.s V_10 - IL_47e2: ldloc.s V_9 - IL_47e4: call string [mscorlib]System.Convert::ToString(int32) - IL_47e9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_47ee: stloc.s V_7 - IL_47f0: ldloc.s V_9 - IL_47f2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_47f7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_47fc: stloc.s V_10 - IL_47fe: ldloc.s V_9 - IL_4800: ldloc.s V_8 - IL_4802: blt.s IL_484c - - IL_4804: ldloc.s V_10 - IL_4806: call string [mscorlib]System.Convert::ToString(int32) - IL_480b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4810: stloc.s V_9 - IL_4812: ldloc.s V_6 - IL_4814: call string [mscorlib]System.Convert::ToString(int32) - IL_4819: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_481e: stloc.s V_8 - IL_4820: ldloc.s V_9 - IL_4822: call string [mscorlib]System.Convert::ToString(int32) - IL_4827: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_482c: stloc.s V_8 - IL_482e: ldloc.s V_7 - IL_4830: call string [mscorlib]System.Convert::ToString(int32) - IL_4835: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_483a: stloc.s V_9 - IL_483c: ldloc.s V_7 - IL_483e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4843: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4848: stloc.s V_6 - IL_484a: br.s IL_4892 - - IL_484c: ldloc.s V_9 - IL_484e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4853: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4858: stloc.s V_7 - IL_485a: ldloc.s V_9 - IL_485c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4861: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4866: stloc.s V_10 - IL_4868: ldloc.s V_9 - IL_486a: call string [mscorlib]System.Convert::ToString(int32) - IL_486f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4874: stloc.s V_7 - IL_4876: ldloc.s V_8 - IL_4878: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_487d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4882: stloc.s V_8 - IL_4884: ldloc.s V_6 - IL_4886: call string [mscorlib]System.Convert::ToString(int32) - IL_488b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4890: stloc.s V_8 - IL_4892: ldloc.s V_10 - IL_4894: ldloc.s V_9 - IL_4896: ble.s IL_48e0 - - IL_4898: ldloc.s V_10 - IL_489a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_489f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_48a4: stloc.s V_7 - IL_48a6: ldloc.s V_6 - IL_48a8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_48ad: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_48b2: stloc.s V_8 - IL_48b4: ldloc.s V_10 - IL_48b6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_48bb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_48c0: stloc.s V_7 - IL_48c2: ldloc.s V_7 - IL_48c4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_48c9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_48ce: stloc.s V_6 - IL_48d0: ldloc.s V_9 - IL_48d2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_48d7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_48dc: stloc.s V_9 - IL_48de: br.s IL_4926 - - IL_48e0: ldloc.s V_9 - IL_48e2: call string [mscorlib]System.Convert::ToString(int32) - IL_48e7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_48ec: stloc.s V_8 - IL_48ee: ldloc.s V_7 - IL_48f0: call string [mscorlib]System.Convert::ToString(int32) - IL_48f5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_48fa: stloc.s V_6 - IL_48fc: ldloc.s V_10 - IL_48fe: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4903: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4908: stloc.s V_9 - IL_490a: ldloc.s V_8 - IL_490c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4911: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4916: stloc.s V_7 - IL_4918: ldloc.s V_6 - IL_491a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_491f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4924: stloc.s V_8 - IL_4926: ldloc.s V_8 - IL_4928: ldloc.s V_9 - IL_492a: bne.un.s IL_4974 - - IL_492c: ldloc.s V_10 - IL_492e: call string [mscorlib]System.Convert::ToString(int32) - IL_4933: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4938: stloc.s V_8 - IL_493a: ldloc.s V_7 - IL_493c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4941: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4946: stloc.s V_8 - IL_4948: ldloc.s V_6 - IL_494a: call string [mscorlib]System.Convert::ToString(int32) - IL_494f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4954: stloc.s V_9 - IL_4956: ldloc.s V_7 - IL_4958: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_495d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4962: stloc.s V_9 - IL_4964: ldloc.s V_10 - IL_4966: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_496b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4970: stloc.s V_7 - IL_4972: br.s IL_49ba - - IL_4974: ldloc.s V_10 - IL_4976: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_497b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4980: stloc.s V_10 - IL_4982: ldloc.s V_7 - IL_4984: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4989: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_498e: stloc.s V_7 - IL_4990: ldloc.s V_10 - IL_4992: call string [mscorlib]System.Convert::ToString(int32) - IL_4997: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_499c: stloc.s V_7 - IL_499e: ldloc.s V_6 - IL_49a0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_49a5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_49aa: stloc.s V_6 - IL_49ac: ldloc.s V_6 - IL_49ae: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_49b3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_49b8: stloc.s V_9 - IL_49ba: ldloc.s V_7 - IL_49bc: ldloc.s V_9 - IL_49be: beq.s IL_4a08 - - IL_49c0: ldloc.s V_8 - IL_49c2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_49c7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_49cc: stloc.s V_8 - IL_49ce: ldloc.s V_9 - IL_49d0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_49d5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_49da: stloc.s V_9 - IL_49dc: ldloc.s V_6 - IL_49de: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_49e3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_49e8: stloc.s V_7 - IL_49ea: ldloc.s V_10 - IL_49ec: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_49f1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_49f6: stloc.s V_6 - IL_49f8: ldloc.s V_7 - IL_49fa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_49ff: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4a04: stloc.s V_8 - IL_4a06: br.s IL_4a4e - - IL_4a08: ldloc.s V_6 - IL_4a0a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4a0f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4a14: stloc.s V_9 - IL_4a16: ldloc.s V_8 - IL_4a18: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4a1d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4a22: stloc.s V_6 - IL_4a24: ldloc.s V_7 - IL_4a26: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4a2b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4a30: stloc.s V_8 - IL_4a32: ldloc.s V_9 - IL_4a34: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4a39: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4a3e: stloc.s V_6 - IL_4a40: ldloc.s V_9 - IL_4a42: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4a47: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4a4c: stloc.s V_7 - IL_4a4e: ldloc.s V_10 - IL_4a50: ldloc.s V_6 - IL_4a52: ble.s IL_4a9c - - IL_4a54: ldloc.s V_9 - IL_4a56: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4a5b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4a60: stloc.s V_9 - IL_4a62: ldloc.s V_6 - IL_4a64: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4a69: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4a6e: stloc.s V_7 - IL_4a70: ldloc.s V_9 - IL_4a72: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4a77: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4a7c: stloc.s V_6 - IL_4a7e: ldloc.s V_8 - IL_4a80: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4a85: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4a8a: stloc.s V_7 - IL_4a8c: ldloc.s V_6 - IL_4a8e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4a93: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4a98: stloc.s V_10 - IL_4a9a: br.s IL_4ae2 - - IL_4a9c: ldloc.s V_7 - IL_4a9e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4aa3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4aa8: stloc.s V_10 - IL_4aaa: ldloc.s V_10 - IL_4aac: call string [mscorlib]System.Convert::ToString(int32) - IL_4ab1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4ab6: stloc.s V_10 - IL_4ab8: ldloc.s V_10 - IL_4aba: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4abf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4ac4: stloc.s V_7 - IL_4ac6: ldloc.s V_8 - IL_4ac8: call string [mscorlib]System.Convert::ToString(int32) - IL_4acd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4ad2: stloc.s V_7 - IL_4ad4: ldloc.s V_8 - IL_4ad6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4adb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4ae0: stloc.s V_6 - IL_4ae2: ldloc.s V_6 - IL_4ae4: ldloc.s V_6 - IL_4ae6: bge.s IL_4b30 - - IL_4ae8: ldloc.s V_7 - IL_4aea: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4aef: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4af4: stloc.s V_10 - IL_4af6: ldloc.s V_7 - IL_4af8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4afd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4b02: stloc.s V_9 - IL_4b04: ldloc.s V_7 - IL_4b06: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4b0b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4b10: stloc.s V_6 - IL_4b12: ldloc.s V_6 - IL_4b14: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4b19: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4b1e: stloc.s V_9 - IL_4b20: ldloc.s V_6 - IL_4b22: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4b27: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4b2c: stloc.s V_9 - IL_4b2e: br.s IL_4b76 - - IL_4b30: ldloc.s V_6 - IL_4b32: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4b37: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4b3c: stloc.s V_9 - IL_4b3e: ldloc.s V_6 - IL_4b40: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4b45: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4b4a: stloc.s V_8 - IL_4b4c: ldloc.s V_9 - IL_4b4e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4b53: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4b58: stloc.s V_6 - IL_4b5a: ldloc.s V_8 - IL_4b5c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4b61: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4b66: stloc.s V_9 - IL_4b68: ldloc.s V_10 - IL_4b6a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4b6f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4b74: stloc.s V_8 - IL_4b76: ldloc.s V_6 - IL_4b78: ldloc.s V_6 - IL_4b7a: bge.s IL_4bc4 - - IL_4b7c: ldloc.s V_8 - IL_4b7e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4b83: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4b88: stloc.s V_7 - IL_4b8a: ldloc.s V_8 - IL_4b8c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4b91: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4b96: stloc.s V_10 - IL_4b98: ldloc.s V_9 - IL_4b9a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4b9f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4ba4: stloc.s V_10 - IL_4ba6: ldloc.s V_10 - IL_4ba8: call string [mscorlib]System.Convert::ToString(int32) - IL_4bad: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4bb2: stloc.s V_8 - IL_4bb4: ldloc.s V_8 - IL_4bb6: call string [mscorlib]System.Convert::ToString(int32) - IL_4bbb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4bc0: stloc.s V_10 - IL_4bc2: br.s IL_4c0a - - IL_4bc4: ldloc.s V_9 - IL_4bc6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4bcb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4bd0: stloc.s V_8 - IL_4bd2: ldloc.s V_10 - IL_4bd4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4bd9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4bde: stloc.s V_8 - IL_4be0: ldloc.s V_9 - IL_4be2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4be7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4bec: stloc.s V_10 - IL_4bee: ldloc.s V_9 - IL_4bf0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4bf5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4bfa: stloc.s V_8 - IL_4bfc: ldloc.s V_10 - IL_4bfe: call string [mscorlib]System.Convert::ToString(int32) - IL_4c03: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4c08: stloc.s V_10 - IL_4c0a: ldloc.s V_8 - IL_4c0c: ldloc.s V_6 - IL_4c0e: blt.s IL_4c58 - - IL_4c10: ldloc.s V_6 - IL_4c12: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4c17: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4c1c: stloc.s V_10 - IL_4c1e: ldloc.s V_6 - IL_4c20: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4c25: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4c2a: stloc.s V_8 - IL_4c2c: ldloc.s V_7 - IL_4c2e: call string [mscorlib]System.Convert::ToString(int32) - IL_4c33: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4c38: stloc.s V_8 - IL_4c3a: ldloc.s V_10 - IL_4c3c: call string [mscorlib]System.Convert::ToString(int32) - IL_4c41: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4c46: stloc.s V_8 - IL_4c48: ldloc.s V_7 - IL_4c4a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4c4f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4c54: stloc.s V_9 - IL_4c56: br.s IL_4c9e - - IL_4c58: ldloc.s V_9 - IL_4c5a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4c5f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4c64: stloc.s V_10 - IL_4c66: ldloc.s V_7 - IL_4c68: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4c6d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4c72: stloc.s V_6 - IL_4c74: ldloc.s V_7 - IL_4c76: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4c7b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4c80: stloc.s V_7 - IL_4c82: ldloc.s V_7 - IL_4c84: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4c89: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4c8e: stloc.s V_10 - IL_4c90: ldloc.s V_7 - IL_4c92: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4c97: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4c9c: stloc.s V_10 - IL_4c9e: ldloc.s V_6 - IL_4ca0: ldloc.s V_6 - IL_4ca2: bne.un.s IL_4cec - - IL_4ca4: ldloc.s V_6 - IL_4ca6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4cab: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4cb0: stloc.s V_9 - IL_4cb2: ldloc.s V_8 - IL_4cb4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4cb9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4cbe: stloc.s V_7 - IL_4cc0: ldloc.s V_7 - IL_4cc2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4cc7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4ccc: stloc.s V_8 - IL_4cce: ldloc.s V_6 - IL_4cd0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4cd5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4cda: stloc.s V_8 - IL_4cdc: ldloc.s V_6 - IL_4cde: call string [mscorlib]System.Convert::ToString(int32) - IL_4ce3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4ce8: stloc.s V_10 - IL_4cea: br.s IL_4d32 - - IL_4cec: ldloc.s V_9 - IL_4cee: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4cf3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4cf8: stloc.s V_8 - IL_4cfa: ldloc.s V_9 - IL_4cfc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4d01: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4d06: stloc.s V_7 - IL_4d08: ldloc.s V_6 - IL_4d0a: call string [mscorlib]System.Convert::ToString(int32) - IL_4d0f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4d14: stloc.s V_10 - IL_4d16: ldloc.s V_8 - IL_4d18: call string [mscorlib]System.Convert::ToString(int32) - IL_4d1d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4d22: stloc.s V_10 - IL_4d24: ldloc.s V_7 - IL_4d26: call string [mscorlib]System.Convert::ToString(int32) - IL_4d2b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4d30: stloc.s V_10 - IL_4d32: ldloc.s V_10 - IL_4d34: ldloc.s V_8 - IL_4d36: beq.s IL_4d80 - - IL_4d38: ldloc.s V_10 - IL_4d3a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4d3f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4d44: stloc.s V_9 - IL_4d46: ldloc.s V_10 - IL_4d48: call string [mscorlib]System.Convert::ToString(int32) - IL_4d4d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4d52: stloc.s V_6 - IL_4d54: ldloc.s V_10 - IL_4d56: call string [mscorlib]System.Convert::ToString(int32) - IL_4d5b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4d60: stloc.s V_6 - IL_4d62: ldloc.s V_10 - IL_4d64: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4d69: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4d6e: stloc.s V_10 - IL_4d70: ldloc.s V_9 - IL_4d72: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4d77: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4d7c: stloc.s V_6 - IL_4d7e: br.s IL_4dc6 - - IL_4d80: ldloc.s V_7 - IL_4d82: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4d87: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4d8c: stloc.s V_7 - IL_4d8e: ldloc.s V_9 - IL_4d90: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4d95: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4d9a: stloc.s V_9 - IL_4d9c: ldloc.s V_7 - IL_4d9e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4da3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4da8: stloc.s V_8 - IL_4daa: ldloc.s V_7 - IL_4dac: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4db1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4db6: stloc.s V_6 - IL_4db8: ldloc.s V_7 - IL_4dba: call string [mscorlib]System.Convert::ToString(int32) - IL_4dbf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4dc4: stloc.s V_6 - IL_4dc6: ldloc.s V_9 - IL_4dc8: ldloc.s V_8 - IL_4dca: beq.s IL_4e14 - - IL_4dcc: ldloc.s V_9 - IL_4dce: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4dd3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4dd8: stloc.s V_9 - IL_4dda: ldloc.s V_7 - IL_4ddc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4de1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4de6: stloc.s V_6 - IL_4de8: ldloc.s V_9 - IL_4dea: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4def: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4df4: stloc.s V_9 - IL_4df6: ldloc.s V_9 - IL_4df8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4dfd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4e02: stloc.s V_9 - IL_4e04: ldloc.s V_9 - IL_4e06: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4e0b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4e10: stloc.s V_7 - IL_4e12: br.s IL_4e5a - - IL_4e14: ldloc.s V_6 - IL_4e16: call string [mscorlib]System.Convert::ToString(int32) - IL_4e1b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4e20: stloc.s V_9 - IL_4e22: ldloc.s V_8 - IL_4e24: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4e29: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4e2e: stloc.s V_6 - IL_4e30: ldloc.s V_6 - IL_4e32: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4e37: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4e3c: stloc.s V_10 - IL_4e3e: ldloc.s V_6 - IL_4e40: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4e45: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4e4a: stloc.s V_8 - IL_4e4c: ldloc.s V_10 - IL_4e4e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4e53: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4e58: stloc.s V_9 - IL_4e5a: ldloc.s V_6 - IL_4e5c: ldloc.s V_6 - IL_4e5e: bgt.s IL_4ea8 - - IL_4e60: ldloc.s V_6 - IL_4e62: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4e67: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4e6c: stloc.s V_7 - IL_4e6e: ldloc.s V_6 - IL_4e70: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4e75: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4e7a: stloc.s V_10 - IL_4e7c: ldloc.s V_7 - IL_4e7e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4e83: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4e88: stloc.s V_10 - IL_4e8a: ldloc.s V_10 - IL_4e8c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4e91: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4e96: stloc.s V_10 - IL_4e98: ldloc.s V_8 - IL_4e9a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4e9f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4ea4: stloc.s V_9 - IL_4ea6: br.s IL_4eee - - IL_4ea8: ldloc.s V_10 - IL_4eaa: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4eaf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4eb4: stloc.s V_9 - IL_4eb6: ldloc.s V_9 - IL_4eb8: call string [mscorlib]System.Convert::ToString(int32) - IL_4ebd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4ec2: stloc.s V_6 - IL_4ec4: ldloc.s V_9 - IL_4ec6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4ecb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4ed0: stloc.s V_6 - IL_4ed2: ldloc.s V_8 - IL_4ed4: call string [mscorlib]System.Convert::ToString(int32) - IL_4ed9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4ede: stloc.s V_8 - IL_4ee0: ldloc.s V_6 - IL_4ee2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4ee7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4eec: stloc.s V_6 - IL_4eee: ldloc.s V_10 - IL_4ef0: ldloc.s V_10 - IL_4ef2: bne.un.s IL_4f3c - - IL_4ef4: ldloc.s V_8 - IL_4ef6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4efb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4f00: stloc.s V_9 - IL_4f02: ldloc.s V_8 - IL_4f04: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4f09: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4f0e: stloc.s V_9 - IL_4f10: ldloc.s V_10 - IL_4f12: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4f17: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4f1c: stloc.s V_6 - IL_4f1e: ldloc.s V_8 - IL_4f20: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4f25: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4f2a: stloc.s V_6 - IL_4f2c: ldloc.s V_7 - IL_4f2e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4f33: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4f38: stloc.s V_7 - IL_4f3a: br.s IL_4f82 - - IL_4f3c: ldloc.s V_9 - IL_4f3e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4f43: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4f48: stloc.s V_9 - IL_4f4a: ldloc.s V_7 - IL_4f4c: call string [mscorlib]System.Convert::ToString(int32) - IL_4f51: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4f56: stloc.s V_6 - IL_4f58: ldloc.s V_8 - IL_4f5a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4f5f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4f64: stloc.s V_7 - IL_4f66: ldloc.s V_8 - IL_4f68: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4f6d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4f72: stloc.s V_7 - IL_4f74: ldloc.s V_6 - IL_4f76: call string [mscorlib]System.Convert::ToString(int32) - IL_4f7b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4f80: stloc.s V_9 - IL_4f82: ldloc.s V_6 - IL_4f84: ldloc.s V_9 - IL_4f86: bge.s IL_4fd0 - - IL_4f88: ldloc.s V_10 - IL_4f8a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4f8f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4f94: stloc.s V_10 - IL_4f96: ldloc.s V_8 - IL_4f98: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4f9d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4fa2: stloc.s V_6 - IL_4fa4: ldloc.s V_8 - IL_4fa6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4fab: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4fb0: stloc.s V_7 - IL_4fb2: ldloc.s V_10 - IL_4fb4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4fb9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4fbe: stloc.s V_9 - IL_4fc0: ldloc.s V_8 - IL_4fc2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4fc7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4fcc: stloc.s V_6 - IL_4fce: br.s IL_5016 - - IL_4fd0: ldloc.s V_6 - IL_4fd2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4fd7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4fdc: stloc.s V_6 - IL_4fde: ldloc.s V_8 - IL_4fe0: call string [mscorlib]System.Convert::ToString(int32) - IL_4fe5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4fea: stloc.s V_7 - IL_4fec: ldloc.s V_9 - IL_4fee: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4ff3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4ff8: stloc.s V_8 - IL_4ffa: ldloc.s V_8 - IL_4ffc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5001: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5006: stloc.s V_10 - IL_5008: ldloc.s V_8 - IL_500a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_500f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5014: stloc.s V_6 - IL_5016: ldloc.s V_10 - IL_5018: ldloc.s V_9 - IL_501a: beq.s IL_5064 - - IL_501c: ldloc.s V_6 - IL_501e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5023: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5028: stloc.s V_10 - IL_502a: ldloc.s V_6 - IL_502c: call string [mscorlib]System.Convert::ToString(int32) - IL_5031: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5036: stloc.s V_8 - IL_5038: ldloc.s V_7 - IL_503a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_503f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5044: stloc.s V_6 - IL_5046: ldloc.s V_7 - IL_5048: call string [mscorlib]System.Convert::ToString(int32) - IL_504d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5052: stloc.s V_10 - IL_5054: ldloc.s V_7 - IL_5056: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_505b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5060: stloc.s V_8 - IL_5062: br.s IL_50aa - - IL_5064: ldloc.s V_7 - IL_5066: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_506b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5070: stloc.s V_6 - IL_5072: ldloc.s V_8 - IL_5074: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5079: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_507e: stloc.s V_10 - IL_5080: ldloc.s V_7 - IL_5082: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5087: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_508c: stloc.s V_7 - IL_508e: ldloc.s V_9 - IL_5090: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5095: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_509a: stloc.s V_6 - IL_509c: ldloc.s V_9 - IL_509e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_50a3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_50a8: stloc.s V_6 - IL_50aa: ldloc.s V_10 - IL_50ac: ldloc.s V_6 - IL_50ae: beq.s IL_50f8 - - IL_50b0: ldloc.s V_9 - IL_50b2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_50b7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_50bc: stloc.s V_7 - IL_50be: ldloc.s V_9 - IL_50c0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_50c5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_50ca: stloc.s V_8 - IL_50cc: ldloc.s V_10 - IL_50ce: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_50d3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_50d8: stloc.s V_6 - IL_50da: ldloc.s V_10 - IL_50dc: call string [mscorlib]System.Convert::ToString(int32) - IL_50e1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_50e6: stloc.s V_6 - IL_50e8: ldloc.s V_6 - IL_50ea: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_50ef: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_50f4: stloc.s V_8 - IL_50f6: br.s IL_513e - - IL_50f8: ldloc.s V_10 - IL_50fa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_50ff: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5104: stloc.s V_7 - IL_5106: ldloc.s V_10 - IL_5108: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_510d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5112: stloc.s V_7 - IL_5114: ldloc.s V_6 - IL_5116: call string [mscorlib]System.Convert::ToString(int32) - IL_511b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5120: stloc.s V_7 - IL_5122: ldloc.s V_9 - IL_5124: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5129: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_512e: stloc.s V_9 - IL_5130: ldloc.s V_8 - IL_5132: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5137: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_513c: stloc.s V_7 - IL_513e: ldloc.s V_6 - IL_5140: ldloc.s V_9 - IL_5142: bgt.s IL_518c - - IL_5144: ldloc.s V_10 - IL_5146: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_514b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5150: stloc.s V_6 - IL_5152: ldloc.s V_9 - IL_5154: call string [mscorlib]System.Convert::ToString(int32) - IL_5159: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_515e: stloc.s V_8 - IL_5160: ldloc.s V_9 - IL_5162: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5167: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_516c: stloc.s V_8 - IL_516e: ldloc.s V_9 - IL_5170: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5175: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_517a: stloc.s V_8 - IL_517c: ldloc.s V_9 - IL_517e: call string [mscorlib]System.Convert::ToString(int32) - IL_5183: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5188: stloc.s V_8 - IL_518a: br.s IL_51d2 - - IL_518c: ldloc.s V_7 - IL_518e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5193: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5198: stloc.s V_8 - IL_519a: ldloc.s V_10 - IL_519c: call string [mscorlib]System.Convert::ToString(int32) - IL_51a1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_51a6: stloc.s V_10 - IL_51a8: ldloc.s V_9 - IL_51aa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_51af: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_51b4: stloc.s V_7 - IL_51b6: ldloc.s V_8 - IL_51b8: call string [mscorlib]System.Convert::ToString(int32) - IL_51bd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_51c2: stloc.s V_9 - IL_51c4: ldloc.s V_6 - IL_51c6: call string [mscorlib]System.Convert::ToString(int32) - IL_51cb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_51d0: stloc.s V_6 - IL_51d2: ldloc.s V_8 - IL_51d4: ldloc.s V_8 - IL_51d6: blt.s IL_5220 - - IL_51d8: ldloc.s V_6 - IL_51da: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_51df: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_51e4: stloc.s V_7 - IL_51e6: ldloc.s V_8 - IL_51e8: call string [mscorlib]System.Convert::ToString(int32) - IL_51ed: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_51f2: stloc.s V_6 - IL_51f4: ldloc.s V_10 - IL_51f6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_51fb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5200: stloc.s V_6 - IL_5202: ldloc.s V_7 - IL_5204: call string [mscorlib]System.Convert::ToString(int32) - IL_5209: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_520e: stloc.s V_7 - IL_5210: ldloc.s V_10 - IL_5212: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5217: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_521c: stloc.s V_7 - IL_521e: br.s IL_5266 - - IL_5220: ldloc.s V_7 - IL_5222: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5227: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_522c: stloc.s V_10 - IL_522e: ldloc.s V_8 - IL_5230: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5235: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_523a: stloc.s V_7 - IL_523c: ldloc.s V_7 - IL_523e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5243: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5248: stloc.s V_9 - IL_524a: ldloc.s V_10 - IL_524c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5251: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5256: stloc.s V_6 - IL_5258: ldloc.s V_7 - IL_525a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_525f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5264: stloc.s V_7 - IL_5266: ldloc.s V_6 - IL_5268: ldloc.s V_9 - IL_526a: bgt.s IL_52b4 - - IL_526c: ldloc.s V_6 - IL_526e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5273: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5278: stloc.s V_6 - IL_527a: ldloc.s V_6 - IL_527c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5281: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5286: stloc.s V_9 - IL_5288: ldloc.s V_9 - IL_528a: call string [mscorlib]System.Convert::ToString(int32) - IL_528f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5294: stloc.s V_10 - IL_5296: ldloc.s V_7 - IL_5298: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_529d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_52a2: stloc.s V_6 - IL_52a4: ldloc.s V_7 - IL_52a6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_52ab: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_52b0: stloc.s V_8 - IL_52b2: br.s IL_52fa - - IL_52b4: ldloc.s V_10 - IL_52b6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_52bb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_52c0: stloc.s V_9 - IL_52c2: ldloc.s V_9 - IL_52c4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_52c9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_52ce: stloc.s V_10 - IL_52d0: ldloc.s V_9 - IL_52d2: call string [mscorlib]System.Convert::ToString(int32) - IL_52d7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_52dc: stloc.s V_6 - IL_52de: ldloc.s V_10 - IL_52e0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_52e5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_52ea: stloc.s V_9 - IL_52ec: ldloc.s V_8 - IL_52ee: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_52f3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_52f8: stloc.s V_8 - IL_52fa: ldloc.s V_9 - IL_52fc: ldloc.s V_8 - IL_52fe: bne.un.s IL_5348 - - IL_5300: ldloc.s V_6 - IL_5302: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5307: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_530c: stloc.s V_8 - IL_530e: ldloc.s V_8 - IL_5310: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5315: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_531a: stloc.s V_9 - IL_531c: ldloc.s V_6 - IL_531e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5323: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5328: stloc.s V_6 - IL_532a: ldloc.s V_10 - IL_532c: call string [mscorlib]System.Convert::ToString(int32) - IL_5331: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5336: stloc.s V_9 - IL_5338: ldloc.s V_8 - IL_533a: call string [mscorlib]System.Convert::ToString(int32) - IL_533f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5344: stloc.s V_6 - IL_5346: br.s IL_538e - - IL_5348: ldloc.s V_7 - IL_534a: call string [mscorlib]System.Convert::ToString(int32) - IL_534f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5354: stloc.s V_9 - IL_5356: ldloc.s V_6 - IL_5358: call string [mscorlib]System.Convert::ToString(int32) - IL_535d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5362: stloc.s V_7 - IL_5364: ldloc.s V_9 - IL_5366: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_536b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5370: stloc.s V_6 - IL_5372: ldloc.s V_7 - IL_5374: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5379: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_537e: stloc.s V_8 - IL_5380: ldloc.s V_9 - IL_5382: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5387: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_538c: stloc.s V_7 - IL_538e: ldloc.s V_7 - IL_5390: ldloc.s V_7 - IL_5392: bge.s IL_53dc - - IL_5394: ldloc.s V_7 - IL_5396: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_539b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_53a0: stloc.s V_9 - IL_53a2: ldloc.s V_9 - IL_53a4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_53a9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_53ae: stloc.s V_6 - IL_53b0: ldloc.s V_9 - IL_53b2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_53b7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_53bc: stloc.s V_8 - IL_53be: ldloc.s V_9 - IL_53c0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_53c5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_53ca: stloc.s V_8 - IL_53cc: ldloc.s V_7 - IL_53ce: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_53d3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_53d8: stloc.s V_10 - IL_53da: br.s IL_5422 - - IL_53dc: ldloc.s V_7 - IL_53de: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_53e3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_53e8: stloc.s V_8 - IL_53ea: ldloc.s V_6 - IL_53ec: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_53f1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_53f6: stloc.s V_7 - IL_53f8: ldloc.s V_6 - IL_53fa: call string [mscorlib]System.Convert::ToString(int32) - IL_53ff: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5404: stloc.s V_8 - IL_5406: ldloc.s V_8 - IL_5408: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_540d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5412: stloc.s V_7 - IL_5414: ldloc.s V_6 - IL_5416: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_541b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5420: stloc.s V_6 - IL_5422: ldloc.s V_8 - IL_5424: ldloc.s V_8 - IL_5426: blt.s IL_5470 - - IL_5428: ldloc.s V_10 - IL_542a: call string [mscorlib]System.Convert::ToString(int32) - IL_542f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5434: stloc.s V_8 - IL_5436: ldloc.s V_9 - IL_5438: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_543d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5442: stloc.s V_6 - IL_5444: ldloc.s V_9 - IL_5446: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_544b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5450: stloc.s V_8 - IL_5452: ldloc.s V_9 - IL_5454: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5459: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_545e: stloc.s V_7 - IL_5460: ldloc.s V_8 - IL_5462: call string [mscorlib]System.Convert::ToString(int32) - IL_5467: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_546c: stloc.s V_10 - IL_546e: br.s IL_54b6 - - IL_5470: ldloc.s V_8 - IL_5472: call string [mscorlib]System.Convert::ToString(int32) - IL_5477: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_547c: stloc.s V_6 - IL_547e: ldloc.s V_10 - IL_5480: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5485: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_548a: stloc.s V_7 - IL_548c: ldloc.s V_7 - IL_548e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5493: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5498: stloc.s V_6 - IL_549a: ldloc.s V_9 - IL_549c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_54a1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_54a6: stloc.s V_6 - IL_54a8: ldloc.s V_10 - IL_54aa: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_54af: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_54b4: stloc.s V_7 - IL_54b6: ldloc.s V_6 - IL_54b8: ldloc.s V_10 - IL_54ba: bne.un.s IL_5504 - - IL_54bc: ldloc.s V_10 - IL_54be: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_54c3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_54c8: stloc.s V_7 - IL_54ca: ldloc.s V_8 - IL_54cc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_54d1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_54d6: stloc.s V_8 - IL_54d8: ldloc.s V_9 - IL_54da: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_54df: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_54e4: stloc.s V_9 - IL_54e6: ldloc.s V_6 - IL_54e8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_54ed: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_54f2: stloc.s V_7 - IL_54f4: ldloc.s V_9 - IL_54f6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_54fb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5500: stloc.s V_7 - IL_5502: br.s IL_554a - - IL_5504: ldloc.s V_6 - IL_5506: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_550b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5510: stloc.s V_10 - IL_5512: ldloc.s V_8 - IL_5514: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5519: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_551e: stloc.s V_8 - IL_5520: ldloc.s V_8 - IL_5522: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5527: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_552c: stloc.s V_9 - IL_552e: ldloc.s V_9 - IL_5530: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5535: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_553a: stloc.s V_8 - IL_553c: ldloc.s V_7 - IL_553e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5543: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5548: stloc.s V_6 - IL_554a: ldloc.s V_8 - IL_554c: ldloc.s V_7 - IL_554e: bne.un.s IL_5598 - - IL_5550: ldloc.s V_7 - IL_5552: call string [mscorlib]System.Convert::ToString(int32) - IL_5557: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_555c: stloc.s V_10 - IL_555e: ldloc.s V_7 - IL_5560: call string [mscorlib]System.Convert::ToString(int32) - IL_5565: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_556a: stloc.s V_8 - IL_556c: ldloc.s V_7 - IL_556e: call string [mscorlib]System.Convert::ToString(int32) - IL_5573: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5578: stloc.s V_6 - IL_557a: ldloc.s V_10 - IL_557c: call string [mscorlib]System.Convert::ToString(int32) - IL_5581: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5586: stloc.s V_6 - IL_5588: ldloc.s V_7 - IL_558a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_558f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5594: stloc.s V_7 - IL_5596: br.s IL_55de - - IL_5598: ldloc.s V_8 - IL_559a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_559f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_55a4: stloc.s V_10 - IL_55a6: ldloc.s V_6 - IL_55a8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_55ad: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_55b2: stloc.s V_10 - IL_55b4: ldloc.s V_9 - IL_55b6: call string [mscorlib]System.Convert::ToString(int32) - IL_55bb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_55c0: stloc.s V_8 - IL_55c2: ldloc.s V_7 - IL_55c4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_55c9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_55ce: stloc.s V_8 - IL_55d0: ldloc.s V_9 - IL_55d2: call string [mscorlib]System.Convert::ToString(int32) - IL_55d7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_55dc: stloc.s V_9 - IL_55de: ldloc.s V_8 - IL_55e0: ldloc.s V_10 - IL_55e2: bge.s IL_562c - - IL_55e4: ldloc.s V_10 - IL_55e6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_55eb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_55f0: stloc.s V_9 - IL_55f2: ldloc.s V_8 - IL_55f4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_55f9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_55fe: stloc.s V_8 - IL_5600: ldloc.s V_7 - IL_5602: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5607: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_560c: stloc.s V_9 - IL_560e: ldloc.s V_9 - IL_5610: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5615: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_561a: stloc.s V_6 - IL_561c: ldloc.s V_6 - IL_561e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5623: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5628: stloc.s V_9 - IL_562a: br.s IL_5672 - - IL_562c: ldloc.s V_9 - IL_562e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5633: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5638: stloc.s V_7 - IL_563a: ldloc.s V_7 - IL_563c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5641: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5646: stloc.s V_10 - IL_5648: ldloc.s V_10 - IL_564a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_564f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5654: stloc.s V_6 - IL_5656: ldloc.s V_8 - IL_5658: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_565d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5662: stloc.s V_8 - IL_5664: ldloc.s V_6 - IL_5666: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_566b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5670: stloc.s V_10 - IL_5672: ldloc.s V_10 - IL_5674: ldloc.s V_6 - IL_5676: bgt.s IL_56c0 - - IL_5678: ldloc.s V_8 - IL_567a: call string [mscorlib]System.Convert::ToString(int32) - IL_567f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5684: stloc.s V_6 - IL_5686: ldloc.s V_10 - IL_5688: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_568d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5692: stloc.s V_8 - IL_5694: ldloc.s V_10 - IL_5696: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_569b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_56a0: stloc.s V_10 - IL_56a2: ldloc.s V_7 - IL_56a4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_56a9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_56ae: stloc.s V_10 - IL_56b0: ldloc.s V_9 - IL_56b2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_56b7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_56bc: stloc.s V_6 - IL_56be: br.s IL_5706 - - IL_56c0: ldloc.s V_7 - IL_56c2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_56c7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_56cc: stloc.s V_7 - IL_56ce: ldloc.s V_8 - IL_56d0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_56d5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_56da: stloc.s V_6 - IL_56dc: ldloc.s V_10 - IL_56de: call string [mscorlib]System.Convert::ToString(int32) - IL_56e3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_56e8: stloc.s V_8 - IL_56ea: ldloc.s V_8 - IL_56ec: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_56f1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_56f6: stloc.s V_6 - IL_56f8: ldloc.s V_6 - IL_56fa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_56ff: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5704: stloc.s V_10 - IL_5706: ldloc.s V_9 - IL_5708: ldloc.s V_8 - IL_570a: ble.s IL_5754 - - IL_570c: ldloc.s V_9 - IL_570e: call string [mscorlib]System.Convert::ToString(int32) - IL_5713: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5718: stloc.s V_9 - IL_571a: ldloc.s V_10 - IL_571c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5721: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5726: stloc.s V_9 - IL_5728: ldloc.s V_10 - IL_572a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_572f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5734: stloc.s V_9 - IL_5736: ldloc.s V_6 - IL_5738: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_573d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5742: stloc.s V_8 - IL_5744: ldloc.s V_6 - IL_5746: call string [mscorlib]System.Convert::ToString(int32) - IL_574b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5750: stloc.s V_8 - IL_5752: br.s IL_579a - - IL_5754: ldloc.s V_9 - IL_5756: call string [mscorlib]System.Convert::ToString(int32) - IL_575b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5760: stloc.s V_10 - IL_5762: ldloc.s V_8 - IL_5764: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5769: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_576e: stloc.s V_10 - IL_5770: ldloc.s V_10 - IL_5772: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5777: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_577c: stloc.s V_9 - IL_577e: ldloc.s V_8 - IL_5780: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5785: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_578a: stloc.s V_8 - IL_578c: ldloc.s V_7 - IL_578e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5793: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5798: stloc.s V_8 - IL_579a: ldloc.s V_10 - IL_579c: ldloc.s V_9 - IL_579e: bgt.s IL_57e8 - - IL_57a0: ldloc.s V_7 - IL_57a2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_57a7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_57ac: stloc.s V_9 - IL_57ae: ldloc.s V_9 - IL_57b0: call string [mscorlib]System.Convert::ToString(int32) - IL_57b5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_57ba: stloc.s V_10 - IL_57bc: ldloc.s V_8 - IL_57be: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_57c3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_57c8: stloc.s V_8 - IL_57ca: ldloc.s V_8 - IL_57cc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_57d1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_57d6: stloc.s V_8 - IL_57d8: ldloc.s V_8 - IL_57da: call string [mscorlib]System.Convert::ToString(int32) - IL_57df: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_57e4: stloc.s V_9 - IL_57e6: br.s IL_582e - - IL_57e8: ldloc.s V_6 - IL_57ea: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_57ef: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_57f4: stloc.s V_7 - IL_57f6: ldloc.s V_6 - IL_57f8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_57fd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5802: stloc.s V_8 - IL_5804: ldloc.s V_7 - IL_5806: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_580b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5810: stloc.s V_6 - IL_5812: ldloc.s V_8 - IL_5814: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5819: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_581e: stloc.s V_10 - IL_5820: ldloc.s V_10 - IL_5822: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5827: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_582c: stloc.s V_7 - IL_582e: ldloc.s V_9 - IL_5830: ldloc.s V_7 - IL_5832: bne.un.s IL_587c - - IL_5834: ldloc.s V_6 - IL_5836: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_583b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5840: stloc.s V_8 - IL_5842: ldloc.s V_6 - IL_5844: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5849: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_584e: stloc.s V_10 - IL_5850: ldloc.s V_7 - IL_5852: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5857: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_585c: stloc.s V_6 - IL_585e: ldloc.s V_7 - IL_5860: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5865: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_586a: stloc.s V_6 - IL_586c: ldloc.s V_10 - IL_586e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5873: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5878: stloc.s V_8 - IL_587a: br.s IL_58c2 - - IL_587c: ldloc.s V_6 - IL_587e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5883: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5888: stloc.s V_6 - IL_588a: ldloc.s V_9 - IL_588c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5891: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5896: stloc.s V_6 - IL_5898: ldloc.s V_8 - IL_589a: call string [mscorlib]System.Convert::ToString(int32) - IL_589f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_58a4: stloc.s V_8 - IL_58a6: ldloc.s V_9 - IL_58a8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_58ad: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_58b2: stloc.s V_6 - IL_58b4: ldloc.s V_10 - IL_58b6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_58bb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_58c0: stloc.s V_6 - IL_58c2: ldloc.s V_10 - IL_58c4: ldloc.s V_8 - IL_58c6: bgt.s IL_5910 - - IL_58c8: ldloc.s V_9 - IL_58ca: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_58cf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_58d4: stloc.s V_6 - IL_58d6: ldloc.s V_6 - IL_58d8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_58dd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_58e2: stloc.s V_7 - IL_58e4: ldloc.s V_9 - IL_58e6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_58eb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_58f0: stloc.s V_6 - IL_58f2: ldloc.s V_10 - IL_58f4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_58f9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_58fe: stloc.s V_10 - IL_5900: ldloc.s V_6 - IL_5902: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5907: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_590c: stloc.s V_10 - IL_590e: br.s IL_5956 - - IL_5910: ldloc.s V_6 - IL_5912: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5917: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_591c: stloc.s V_9 - IL_591e: ldloc.s V_9 - IL_5920: call string [mscorlib]System.Convert::ToString(int32) - IL_5925: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_592a: stloc.s V_9 - IL_592c: ldloc.s V_6 - IL_592e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5933: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5938: stloc.s V_9 - IL_593a: ldloc.s V_9 - IL_593c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5941: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5946: stloc.s V_9 - IL_5948: ldloc.s V_7 - IL_594a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_594f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5954: stloc.s V_8 - IL_5956: ldloc.s V_7 - IL_5958: ldloc.s V_7 - IL_595a: bge.s IL_59a4 - - IL_595c: ldloc.s V_9 - IL_595e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5963: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5968: stloc.s V_10 - IL_596a: ldloc.s V_9 - IL_596c: call string [mscorlib]System.Convert::ToString(int32) - IL_5971: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5976: stloc.s V_6 - IL_5978: ldloc.s V_10 - IL_597a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_597f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5984: stloc.s V_10 - IL_5986: ldloc.s V_9 - IL_5988: call string [mscorlib]System.Convert::ToString(int32) - IL_598d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5992: stloc.s V_10 - IL_5994: ldloc.s V_9 - IL_5996: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_599b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_59a0: stloc.s V_8 - IL_59a2: br.s IL_59ea - - IL_59a4: ldloc.s V_9 - IL_59a6: call string [mscorlib]System.Convert::ToString(int32) - IL_59ab: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_59b0: stloc.s V_8 - IL_59b2: ldloc.s V_7 - IL_59b4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_59b9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_59be: stloc.s V_9 - IL_59c0: ldloc.s V_7 - IL_59c2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_59c7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_59cc: stloc.s V_9 - IL_59ce: ldloc.s V_8 - IL_59d0: call string [mscorlib]System.Convert::ToString(int32) - IL_59d5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_59da: stloc.s V_9 - IL_59dc: ldloc.s V_7 - IL_59de: call string [mscorlib]System.Convert::ToString(int32) - IL_59e3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_59e8: stloc.s V_7 - IL_59ea: ldloc.s V_9 - IL_59ec: ldloc.s V_8 - IL_59ee: blt.s IL_5a38 - - IL_59f0: ldloc.s V_6 - IL_59f2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_59f7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_59fc: stloc.s V_9 - IL_59fe: ldloc.s V_9 - IL_5a00: call string [mscorlib]System.Convert::ToString(int32) - IL_5a05: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5a0a: stloc.s V_8 - IL_5a0c: ldloc.s V_8 - IL_5a0e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5a13: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5a18: stloc.s V_8 - IL_5a1a: ldloc.s V_7 - IL_5a1c: call string [mscorlib]System.Convert::ToString(int32) - IL_5a21: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5a26: stloc.s V_9 - IL_5a28: ldloc.s V_10 - IL_5a2a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5a2f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5a34: stloc.s V_7 - IL_5a36: br.s IL_5a7e - - IL_5a38: ldloc.s V_8 - IL_5a3a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5a3f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5a44: stloc.s V_6 - IL_5a46: ldloc.s V_8 - IL_5a48: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5a4d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5a52: stloc.s V_9 - IL_5a54: ldloc.s V_10 - IL_5a56: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5a5b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5a60: stloc.s V_10 - IL_5a62: ldloc.s V_10 - IL_5a64: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5a69: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5a6e: stloc.s V_7 - IL_5a70: ldloc.s V_8 - IL_5a72: call string [mscorlib]System.Convert::ToString(int32) - IL_5a77: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5a7c: stloc.s V_7 - IL_5a7e: ldloc.s V_8 - IL_5a80: ldloc.s V_6 - IL_5a82: blt.s IL_5acc - - IL_5a84: ldloc.s V_10 - IL_5a86: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5a8b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5a90: stloc.s V_6 - IL_5a92: ldloc.s V_10 - IL_5a94: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5a99: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5a9e: stloc.s V_9 - IL_5aa0: ldloc.s V_6 - IL_5aa2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5aa7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5aac: stloc.s V_10 - IL_5aae: ldloc.s V_9 - IL_5ab0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5ab5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5aba: stloc.s V_10 - IL_5abc: ldloc.s V_9 - IL_5abe: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5ac3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5ac8: stloc.s V_10 - IL_5aca: br.s IL_5b12 - - IL_5acc: ldloc.s V_9 - IL_5ace: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5ad3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5ad8: stloc.s V_9 - IL_5ada: ldloc.s V_6 - IL_5adc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5ae1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5ae6: stloc.s V_10 - IL_5ae8: ldloc.s V_6 - IL_5aea: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5aef: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5af4: stloc.s V_6 - IL_5af6: ldloc.s V_7 - IL_5af8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5afd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5b02: stloc.s V_6 - IL_5b04: ldloc.s V_6 - IL_5b06: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5b0b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5b10: stloc.s V_9 - IL_5b12: ldloc.s V_7 - IL_5b14: ldloc.s V_6 - IL_5b16: beq.s IL_5b60 - - IL_5b18: ldloc.s V_6 - IL_5b1a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5b1f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5b24: stloc.s V_7 - IL_5b26: ldloc.s V_6 - IL_5b28: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5b2d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5b32: stloc.s V_10 - IL_5b34: ldloc.s V_6 - IL_5b36: call string [mscorlib]System.Convert::ToString(int32) - IL_5b3b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5b40: stloc.s V_8 - IL_5b42: ldloc.s V_6 - IL_5b44: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5b49: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5b4e: stloc.s V_7 - IL_5b50: ldloc.s V_10 - IL_5b52: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5b57: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5b5c: stloc.s V_6 - IL_5b5e: br.s IL_5ba6 - - IL_5b60: ldloc.s V_7 - IL_5b62: call string [mscorlib]System.Convert::ToString(int32) - IL_5b67: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5b6c: stloc.s V_7 - IL_5b6e: ldloc.s V_9 - IL_5b70: call string [mscorlib]System.Convert::ToString(int32) - IL_5b75: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5b7a: stloc.s V_10 - IL_5b7c: ldloc.s V_6 - IL_5b7e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5b83: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5b88: stloc.s V_10 - IL_5b8a: ldloc.s V_9 - IL_5b8c: call string [mscorlib]System.Convert::ToString(int32) - IL_5b91: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5b96: stloc.s V_9 - IL_5b98: ldloc.s V_7 - IL_5b9a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5b9f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5ba4: stloc.s V_9 - IL_5ba6: ldloc.s V_6 - IL_5ba8: ldloc.s V_9 - IL_5baa: ble.s IL_5bf4 - - IL_5bac: ldloc.s V_7 - IL_5bae: call string [mscorlib]System.Convert::ToString(int32) - IL_5bb3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5bb8: stloc.s V_9 - IL_5bba: ldloc.s V_10 - IL_5bbc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5bc1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5bc6: stloc.s V_8 - IL_5bc8: ldloc.s V_6 - IL_5bca: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5bcf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5bd4: stloc.s V_8 - IL_5bd6: ldloc.s V_10 - IL_5bd8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5bdd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5be2: stloc.s V_6 - IL_5be4: ldloc.s V_9 - IL_5be6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5beb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5bf0: stloc.s V_6 - IL_5bf2: br.s IL_5c3a - - IL_5bf4: ldloc.s V_9 - IL_5bf6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5bfb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5c00: stloc.s V_7 - IL_5c02: ldloc.s V_9 - IL_5c04: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5c09: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5c0e: stloc.s V_10 - IL_5c10: ldloc.s V_6 - IL_5c12: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5c17: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5c1c: stloc.s V_8 - IL_5c1e: ldloc.s V_9 - IL_5c20: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5c25: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5c2a: stloc.s V_6 - IL_5c2c: ldloc.s V_8 - IL_5c2e: call string [mscorlib]System.Convert::ToString(int32) - IL_5c33: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5c38: stloc.s V_8 - IL_5c3a: ldloc.s V_7 - IL_5c3c: ldloc.s V_10 - IL_5c3e: beq.s IL_5c88 - - IL_5c40: ldloc.s V_9 - IL_5c42: call string [mscorlib]System.Convert::ToString(int32) - IL_5c47: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5c4c: stloc.s V_7 - IL_5c4e: ldloc.s V_9 - IL_5c50: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5c55: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5c5a: stloc.s V_9 - IL_5c5c: ldloc.s V_6 - IL_5c5e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5c63: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5c68: stloc.s V_7 - IL_5c6a: ldloc.s V_6 - IL_5c6c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5c71: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5c76: stloc.s V_8 - IL_5c78: ldloc.s V_9 - IL_5c7a: call string [mscorlib]System.Convert::ToString(int32) - IL_5c7f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5c84: stloc.s V_6 - IL_5c86: br.s IL_5cce - - IL_5c88: ldloc.s V_10 - IL_5c8a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5c8f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5c94: stloc.s V_10 - IL_5c96: ldloc.s V_10 - IL_5c98: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5c9d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5ca2: stloc.s V_8 - IL_5ca4: ldloc.s V_7 - IL_5ca6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5cab: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5cb0: stloc.s V_6 - IL_5cb2: ldloc.s V_8 - IL_5cb4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5cb9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5cbe: stloc.s V_7 - IL_5cc0: ldloc.s V_9 - IL_5cc2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5cc7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5ccc: stloc.s V_7 - IL_5cce: ldloc.s V_7 - IL_5cd0: ldloc.s V_8 - IL_5cd2: bne.un.s IL_5d1c - - IL_5cd4: ldloc.s V_8 - IL_5cd6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5cdb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5ce0: stloc.s V_6 - IL_5ce2: ldloc.s V_8 - IL_5ce4: call string [mscorlib]System.Convert::ToString(int32) - IL_5ce9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5cee: stloc.s V_6 - IL_5cf0: ldloc.s V_9 - IL_5cf2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5cf7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5cfc: stloc.s V_10 - IL_5cfe: ldloc.s V_9 - IL_5d00: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5d05: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5d0a: stloc.s V_8 - IL_5d0c: ldloc.s V_8 - IL_5d0e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5d13: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5d18: stloc.s V_10 - IL_5d1a: br.s IL_5d62 - - IL_5d1c: ldloc.s V_7 - IL_5d1e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5d23: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5d28: stloc.s V_6 - IL_5d2a: ldloc.s V_6 - IL_5d2c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5d31: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5d36: stloc.s V_9 - IL_5d38: ldloc.s V_7 - IL_5d3a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5d3f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5d44: stloc.s V_10 - IL_5d46: ldloc.s V_8 - IL_5d48: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5d4d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5d52: stloc.s V_7 - IL_5d54: ldloc.s V_7 - IL_5d56: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5d5b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5d60: stloc.s V_7 - IL_5d62: ldloc.s V_10 - IL_5d64: ldloc.s V_8 - IL_5d66: blt.s IL_5db0 - - IL_5d68: ldloc.s V_10 - IL_5d6a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5d6f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5d74: stloc.s V_9 - IL_5d76: ldloc.s V_10 - IL_5d78: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5d7d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5d82: stloc.s V_7 - IL_5d84: ldloc.s V_9 - IL_5d86: call string [mscorlib]System.Convert::ToString(int32) - IL_5d8b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5d90: stloc.s V_7 - IL_5d92: ldloc.s V_7 - IL_5d94: call string [mscorlib]System.Convert::ToString(int32) - IL_5d99: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5d9e: stloc.s V_6 - IL_5da0: ldloc.s V_7 - IL_5da2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5da7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5dac: stloc.s V_9 - IL_5dae: br.s IL_5df6 - - IL_5db0: ldloc.s V_8 - IL_5db2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5db7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5dbc: stloc.s V_6 - IL_5dbe: ldloc.s V_10 - IL_5dc0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5dc5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5dca: stloc.s V_8 - IL_5dcc: ldloc.s V_8 - IL_5dce: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5dd3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5dd8: stloc.s V_8 - IL_5dda: ldloc.s V_7 - IL_5ddc: call string [mscorlib]System.Convert::ToString(int32) - IL_5de1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5de6: stloc.s V_6 - IL_5de8: ldloc.s V_7 - IL_5dea: call string [mscorlib]System.Convert::ToString(int32) - IL_5def: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5df4: stloc.s V_6 - IL_5df6: ldloc.s V_6 - IL_5df8: ldloc.s V_6 - IL_5dfa: bgt.s IL_5e44 - - IL_5dfc: ldloc.s V_10 - IL_5dfe: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5e03: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5e08: stloc.s V_6 - IL_5e0a: ldloc.s V_8 - IL_5e0c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5e11: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5e16: stloc.s V_9 - IL_5e18: ldloc.s V_9 - IL_5e1a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5e1f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5e24: stloc.s V_8 - IL_5e26: ldloc.s V_9 - IL_5e28: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5e2d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5e32: stloc.s V_7 - IL_5e34: ldloc.s V_6 - IL_5e36: call string [mscorlib]System.Convert::ToString(int32) - IL_5e3b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5e40: stloc.s V_6 - IL_5e42: br.s IL_5e8a - - IL_5e44: ldloc.s V_10 - IL_5e46: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5e4b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5e50: stloc.s V_6 - IL_5e52: ldloc.s V_9 - IL_5e54: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5e59: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5e5e: stloc.s V_9 - IL_5e60: ldloc.s V_10 - IL_5e62: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5e67: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5e6c: stloc.s V_8 - IL_5e6e: ldloc.s V_7 - IL_5e70: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5e75: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5e7a: stloc.s V_7 - IL_5e7c: ldloc.s V_10 - IL_5e7e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5e83: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5e88: stloc.s V_8 - IL_5e8a: ldloc.s V_9 - IL_5e8c: ldloc.s V_8 - IL_5e8e: blt.s IL_5ed8 - - IL_5e90: ldloc.s V_6 - IL_5e92: call string [mscorlib]System.Convert::ToString(int32) - IL_5e97: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5e9c: stloc.s V_7 - IL_5e9e: ldloc.s V_7 - IL_5ea0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5ea5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5eaa: stloc.s V_8 - IL_5eac: ldloc.s V_9 - IL_5eae: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5eb3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5eb8: stloc.s V_6 - IL_5eba: ldloc.s V_7 - IL_5ebc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5ec1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5ec6: stloc.s V_7 - IL_5ec8: ldloc.s V_10 - IL_5eca: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5ecf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5ed4: stloc.s V_9 - IL_5ed6: br.s IL_5f1e - - IL_5ed8: ldloc.s V_8 - IL_5eda: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5edf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5ee4: stloc.s V_7 - IL_5ee6: ldloc.s V_10 - IL_5ee8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5eed: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5ef2: stloc.s V_7 - IL_5ef4: ldloc.s V_6 - IL_5ef6: call string [mscorlib]System.Convert::ToString(int32) - IL_5efb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5f00: stloc.s V_7 - IL_5f02: ldloc.s V_9 - IL_5f04: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5f09: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5f0e: stloc.s V_6 - IL_5f10: ldloc.s V_6 - IL_5f12: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5f17: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5f1c: stloc.s V_7 - IL_5f1e: ldloc.s V_10 - IL_5f20: ldloc.s V_7 - IL_5f22: bgt.s IL_5f6c - - IL_5f24: ldloc.s V_6 - IL_5f26: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5f2b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5f30: stloc.s V_7 - IL_5f32: ldloc.s V_10 - IL_5f34: call string [mscorlib]System.Convert::ToString(int32) - IL_5f39: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5f3e: stloc.s V_10 - IL_5f40: ldloc.s V_6 - IL_5f42: call string [mscorlib]System.Convert::ToString(int32) - IL_5f47: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5f4c: stloc.s V_9 - IL_5f4e: ldloc.s V_6 - IL_5f50: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5f55: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5f5a: stloc.s V_10 - IL_5f5c: ldloc.s V_6 - IL_5f5e: call string [mscorlib]System.Convert::ToString(int32) - IL_5f63: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5f68: stloc.s V_8 - IL_5f6a: br.s IL_5fb2 - - IL_5f6c: ldloc.s V_8 - IL_5f6e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5f73: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5f78: stloc.s V_7 - IL_5f7a: ldloc.s V_9 - IL_5f7c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5f81: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5f86: stloc.s V_8 - IL_5f88: ldloc.s V_10 - IL_5f8a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5f8f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5f94: stloc.s V_8 - IL_5f96: ldloc.s V_10 - IL_5f98: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5f9d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5fa2: stloc.s V_10 - IL_5fa4: ldloc.s V_10 - IL_5fa6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5fab: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5fb0: stloc.s V_8 - IL_5fb2: ldloc.s V_9 - IL_5fb4: ldloc.s V_6 - IL_5fb6: bne.un.s IL_6000 - - IL_5fb8: ldloc.s V_6 - IL_5fba: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5fbf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5fc4: stloc.s V_6 - IL_5fc6: ldloc.s V_6 - IL_5fc8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5fcd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5fd2: stloc.s V_10 - IL_5fd4: ldloc.s V_7 - IL_5fd6: call string [mscorlib]System.Convert::ToString(int32) - IL_5fdb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5fe0: stloc.s V_8 - IL_5fe2: ldloc.s V_8 - IL_5fe4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5fe9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5fee: stloc.s V_10 - IL_5ff0: ldloc.s V_10 - IL_5ff2: call string [mscorlib]System.Convert::ToString(int32) - IL_5ff7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5ffc: stloc.s V_6 - IL_5ffe: br.s IL_6046 - - IL_6000: ldloc.s V_9 - IL_6002: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6007: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_600c: stloc.s V_8 - IL_600e: ldloc.s V_10 - IL_6010: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6015: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_601a: stloc.s V_8 - IL_601c: ldloc.s V_10 - IL_601e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6023: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6028: stloc.s V_8 - IL_602a: ldloc.s V_7 - IL_602c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6031: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6036: stloc.s V_6 - IL_6038: ldloc.s V_10 - IL_603a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_603f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6044: stloc.s V_6 - IL_6046: ldloc.s V_7 - IL_6048: ldloc.s V_7 - IL_604a: ble.s IL_6094 - - IL_604c: ldloc.s V_6 - IL_604e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6053: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6058: stloc.s V_10 - IL_605a: ldloc.s V_10 - IL_605c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6061: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6066: stloc.s V_6 - IL_6068: ldloc.s V_8 - IL_606a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_606f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6074: stloc.s V_7 - IL_6076: ldloc.s V_9 - IL_6078: call string [mscorlib]System.Convert::ToString(int32) - IL_607d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6082: stloc.s V_8 - IL_6084: ldloc.s V_9 - IL_6086: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_608b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6090: stloc.s V_8 - IL_6092: br.s IL_60da - - IL_6094: ldloc.s V_9 - IL_6096: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_609b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_60a0: stloc.s V_10 - IL_60a2: ldloc.s V_9 - IL_60a4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_60a9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_60ae: stloc.s V_7 - IL_60b0: ldloc.s V_9 - IL_60b2: call string [mscorlib]System.Convert::ToString(int32) - IL_60b7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_60bc: stloc.s V_7 - IL_60be: ldloc.s V_7 - IL_60c0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_60c5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_60ca: stloc.s V_7 - IL_60cc: ldloc.s V_9 - IL_60ce: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_60d3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_60d8: stloc.s V_9 - IL_60da: ldloc.s V_9 - IL_60dc: ldloc.s V_6 - IL_60de: blt.s IL_6128 - - IL_60e0: ldloc.s V_6 - IL_60e2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_60e7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_60ec: stloc.s V_6 - IL_60ee: ldloc.s V_9 - IL_60f0: call string [mscorlib]System.Convert::ToString(int32) - IL_60f5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_60fa: stloc.s V_10 - IL_60fc: ldloc.s V_6 - IL_60fe: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6103: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6108: stloc.s V_10 - IL_610a: ldloc.s V_6 - IL_610c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6111: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6116: stloc.s V_8 - IL_6118: ldloc.s V_6 - IL_611a: call string [mscorlib]System.Convert::ToString(int32) - IL_611f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6124: stloc.s V_6 - IL_6126: br.s IL_616e - - IL_6128: ldloc.s V_6 - IL_612a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_612f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6134: stloc.s V_9 - IL_6136: ldloc.s V_6 - IL_6138: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_613d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6142: stloc.s V_6 - IL_6144: ldloc.s V_10 - IL_6146: call string [mscorlib]System.Convert::ToString(int32) - IL_614b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6150: stloc.s V_9 - IL_6152: ldloc.s V_9 - IL_6154: call string [mscorlib]System.Convert::ToString(int32) - IL_6159: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_615e: stloc.s V_7 - IL_6160: ldloc.s V_8 - IL_6162: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6167: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_616c: stloc.s V_8 - IL_616e: ldloc.s V_6 - IL_6170: ldloc.s V_6 - IL_6172: bne.un.s IL_61bc - - IL_6174: ldloc.s V_9 - IL_6176: call string [mscorlib]System.Convert::ToString(int32) - IL_617b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6180: stloc.s V_9 - IL_6182: ldloc.s V_8 - IL_6184: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6189: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_618e: stloc.s V_9 - IL_6190: ldloc.s V_10 - IL_6192: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6197: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_619c: stloc.s V_6 - IL_619e: ldloc.s V_9 - IL_61a0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_61a5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_61aa: stloc.s V_8 - IL_61ac: ldloc.s V_6 - IL_61ae: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_61b3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_61b8: stloc.s V_9 - IL_61ba: br.s IL_6202 - - IL_61bc: ldloc.s V_7 - IL_61be: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_61c3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_61c8: stloc.s V_6 - IL_61ca: ldloc.s V_9 - IL_61cc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_61d1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_61d6: stloc.s V_9 - IL_61d8: ldloc.s V_9 - IL_61da: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_61df: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_61e4: stloc.s V_6 - IL_61e6: ldloc.s V_10 - IL_61e8: call string [mscorlib]System.Convert::ToString(int32) - IL_61ed: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_61f2: stloc.s V_7 - IL_61f4: ldloc.s V_10 - IL_61f6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_61fb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6200: stloc.s V_6 - IL_6202: ldloc.s V_9 - IL_6204: ldloc.s V_9 - IL_6206: bgt.s IL_6250 - - IL_6208: ldloc.s V_6 - IL_620a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_620f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6214: stloc.s V_6 - IL_6216: ldloc.s V_6 - IL_6218: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_621d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6222: stloc.s V_8 - IL_6224: ldloc.s V_8 - IL_6226: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_622b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6230: stloc.s V_8 - IL_6232: ldloc.s V_9 - IL_6234: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6239: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_623e: stloc.s V_6 - IL_6240: ldloc.s V_8 - IL_6242: call string [mscorlib]System.Convert::ToString(int32) - IL_6247: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_624c: stloc.s V_6 - IL_624e: br.s IL_6296 - - IL_6250: ldloc.s V_7 - IL_6252: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6257: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_625c: stloc.s V_8 - IL_625e: ldloc.s V_10 - IL_6260: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6265: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_626a: stloc.s V_6 - IL_626c: ldloc.s V_6 - IL_626e: call string [mscorlib]System.Convert::ToString(int32) - IL_6273: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6278: stloc.s V_7 - IL_627a: ldloc.s V_8 - IL_627c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6281: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6286: stloc.s V_6 - IL_6288: ldloc.s V_10 - IL_628a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_628f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6294: stloc.s V_8 - IL_6296: ldloc.s V_10 - IL_6298: ldloc.s V_7 - IL_629a: beq.s IL_62e4 - - IL_629c: ldloc.s V_6 - IL_629e: call string [mscorlib]System.Convert::ToString(int32) - IL_62a3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_62a8: stloc.s V_10 - IL_62aa: ldloc.s V_6 - IL_62ac: call string [mscorlib]System.Convert::ToString(int32) - IL_62b1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_62b6: stloc.s V_6 - IL_62b8: ldloc.s V_7 - IL_62ba: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_62bf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_62c4: stloc.s V_7 - IL_62c6: ldloc.s V_6 - IL_62c8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_62cd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_62d2: stloc.s V_7 - IL_62d4: ldloc.s V_10 - IL_62d6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_62db: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_62e0: stloc.s V_10 - IL_62e2: br.s IL_632a - - IL_62e4: ldloc.s V_6 - IL_62e6: call string [mscorlib]System.Convert::ToString(int32) - IL_62eb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_62f0: stloc.s V_8 - IL_62f2: ldloc.s V_8 - IL_62f4: call string [mscorlib]System.Convert::ToString(int32) - IL_62f9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_62fe: stloc.s V_9 - IL_6300: ldloc.s V_8 - IL_6302: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6307: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_630c: stloc.s V_10 - IL_630e: ldloc.s V_9 - IL_6310: call string [mscorlib]System.Convert::ToString(int32) - IL_6315: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_631a: stloc.s V_10 - IL_631c: ldloc.s V_10 - IL_631e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6323: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6328: stloc.s V_8 - IL_632a: ldloc.s V_7 - IL_632c: ldloc.s V_7 - IL_632e: bgt.s IL_6378 - - IL_6330: ldloc.s V_6 - IL_6332: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6337: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_633c: stloc.s V_8 - IL_633e: ldloc.s V_9 - IL_6340: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6345: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_634a: stloc.s V_8 - IL_634c: ldloc.s V_6 - IL_634e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6353: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6358: stloc.s V_6 - IL_635a: ldloc.s V_10 - IL_635c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6361: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6366: stloc.s V_8 - IL_6368: ldloc.s V_6 - IL_636a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_636f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6374: stloc.s V_6 - IL_6376: br.s IL_63be - - IL_6378: ldloc.s V_8 - IL_637a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_637f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6384: stloc.s V_9 - IL_6386: ldloc.s V_7 - IL_6388: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_638d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6392: stloc.s V_10 - IL_6394: ldloc.s V_10 - IL_6396: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_639b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_63a0: stloc.s V_9 - IL_63a2: ldloc.s V_6 - IL_63a4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_63a9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_63ae: stloc.s V_8 - IL_63b0: ldloc.s V_6 - IL_63b2: call string [mscorlib]System.Convert::ToString(int32) - IL_63b7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_63bc: stloc.s V_8 - IL_63be: ldloc.s V_9 - IL_63c0: ldloc.s V_8 - IL_63c2: blt.s IL_640c - - IL_63c4: ldloc.s V_6 - IL_63c6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_63cb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_63d0: stloc.s V_10 - IL_63d2: ldloc.s V_7 - IL_63d4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_63d9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_63de: stloc.s V_10 - IL_63e0: ldloc.s V_9 - IL_63e2: call string [mscorlib]System.Convert::ToString(int32) - IL_63e7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_63ec: stloc.s V_7 - IL_63ee: ldloc.s V_9 - IL_63f0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_63f5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_63fa: stloc.s V_7 - IL_63fc: ldloc.s V_8 - IL_63fe: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6403: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6408: stloc.s V_9 - IL_640a: br.s IL_6452 - - IL_640c: ldloc.s V_10 - IL_640e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6413: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6418: stloc.s V_8 - IL_641a: ldloc.s V_6 - IL_641c: call string [mscorlib]System.Convert::ToString(int32) - IL_6421: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6426: stloc.s V_7 - IL_6428: ldloc.s V_6 - IL_642a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_642f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6434: stloc.s V_10 - IL_6436: ldloc.s V_6 - IL_6438: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_643d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6442: stloc.s V_7 - IL_6444: ldloc.s V_6 - IL_6446: call string [mscorlib]System.Convert::ToString(int32) - IL_644b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6450: stloc.s V_9 - IL_6452: ldloc.s V_6 - IL_6454: ldloc.s V_7 - IL_6456: ble.s IL_64a0 - - IL_6458: ldloc.s V_9 - IL_645a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_645f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6464: stloc.s V_7 - IL_6466: ldloc.s V_6 - IL_6468: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_646d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6472: stloc.s V_6 - IL_6474: ldloc.s V_9 - IL_6476: call string [mscorlib]System.Convert::ToString(int32) - IL_647b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6480: stloc.s V_7 - IL_6482: ldloc.s V_10 - IL_6484: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6489: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_648e: stloc.s V_9 - IL_6490: ldloc.s V_7 - IL_6492: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6497: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_649c: stloc.s V_6 - IL_649e: br.s IL_64e6 - - IL_64a0: ldloc.s V_9 - IL_64a2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_64a7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_64ac: stloc.s V_9 - IL_64ae: ldloc.s V_6 - IL_64b0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_64b5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_64ba: stloc.s V_7 - IL_64bc: ldloc.s V_9 - IL_64be: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_64c3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_64c8: stloc.s V_8 - IL_64ca: ldloc.s V_6 - IL_64cc: call string [mscorlib]System.Convert::ToString(int32) - IL_64d1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_64d6: stloc.s V_10 - IL_64d8: ldloc.s V_6 - IL_64da: call string [mscorlib]System.Convert::ToString(int32) - IL_64df: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_64e4: stloc.s V_6 - IL_64e6: ldloc.s V_7 - IL_64e8: ldloc.s V_7 - IL_64ea: bgt.s IL_6534 - - IL_64ec: ldloc.s V_9 - IL_64ee: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_64f3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_64f8: stloc.s V_8 - IL_64fa: ldloc.s V_6 - IL_64fc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6501: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6506: stloc.s V_9 - IL_6508: ldloc.s V_10 - IL_650a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_650f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6514: stloc.s V_9 - IL_6516: ldloc.s V_8 - IL_6518: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_651d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6522: stloc.s V_7 - IL_6524: ldloc.s V_6 - IL_6526: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_652b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6530: stloc.s V_7 - IL_6532: br.s IL_657a - - IL_6534: ldloc.s V_8 - IL_6536: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_653b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6540: stloc.s V_10 - IL_6542: ldloc.s V_10 - IL_6544: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6549: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_654e: stloc.s V_8 - IL_6550: ldloc.s V_7 - IL_6552: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6557: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_655c: stloc.s V_7 - IL_655e: ldloc.s V_6 - IL_6560: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6565: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_656a: stloc.s V_6 - IL_656c: ldloc.s V_6 - IL_656e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6573: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6578: stloc.s V_6 - IL_657a: ldloc.s V_6 - IL_657c: ldloc.s V_6 - IL_657e: bne.un.s IL_65c8 - - IL_6580: ldloc.s V_9 - IL_6582: call string [mscorlib]System.Convert::ToString(int32) - IL_6587: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_658c: stloc.s V_8 - IL_658e: ldloc.s V_9 - IL_6590: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6595: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_659a: stloc.s V_9 - IL_659c: ldloc.s V_6 - IL_659e: call string [mscorlib]System.Convert::ToString(int32) - IL_65a3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_65a8: stloc.s V_9 - IL_65aa: ldloc.s V_9 - IL_65ac: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_65b1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_65b6: stloc.s V_6 - IL_65b8: ldloc.s V_8 - IL_65ba: call string [mscorlib]System.Convert::ToString(int32) - IL_65bf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_65c4: stloc.s V_6 - IL_65c6: br.s IL_660e - - IL_65c8: ldloc.s V_8 - IL_65ca: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_65cf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_65d4: stloc.s V_6 - IL_65d6: ldloc.s V_7 - IL_65d8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_65dd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_65e2: stloc.s V_8 - IL_65e4: ldloc.s V_8 - IL_65e6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_65eb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_65f0: stloc.s V_7 - IL_65f2: ldloc.s V_6 - IL_65f4: call string [mscorlib]System.Convert::ToString(int32) - IL_65f9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_65fe: stloc.s V_7 - IL_6600: ldloc.s V_9 - IL_6602: call string [mscorlib]System.Convert::ToString(int32) - IL_6607: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_660c: stloc.s V_10 - IL_660e: ldloc.s V_9 - IL_6610: ldloc.s V_6 - IL_6612: bne.un.s IL_665c - - IL_6614: ldloc.s V_8 - IL_6616: call string [mscorlib]System.Convert::ToString(int32) - IL_661b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6620: stloc.s V_7 - IL_6622: ldloc.s V_7 - IL_6624: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6629: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_662e: stloc.s V_8 - IL_6630: ldloc.s V_7 - IL_6632: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6637: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_663c: stloc.s V_9 - IL_663e: ldloc.s V_9 - IL_6640: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6645: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_664a: stloc.s V_9 - IL_664c: ldloc.s V_8 - IL_664e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6653: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6658: stloc.s V_9 - IL_665a: br.s IL_66a2 - - IL_665c: ldloc.s V_10 - IL_665e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6663: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6668: stloc.s V_9 - IL_666a: ldloc.s V_6 - IL_666c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6671: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6676: stloc.s V_9 - IL_6678: ldloc.s V_8 - IL_667a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_667f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6684: stloc.s V_9 - IL_6686: ldloc.s V_6 - IL_6688: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_668d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6692: stloc.s V_6 - IL_6694: ldloc.s V_6 - IL_6696: call string [mscorlib]System.Convert::ToString(int32) - IL_669b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_66a0: stloc.s V_8 - IL_66a2: ldloc.s V_7 - IL_66a4: ldloc.s V_8 - IL_66a6: blt.s IL_66f0 - - IL_66a8: ldloc.s V_6 - IL_66aa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_66af: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_66b4: stloc.s V_8 - IL_66b6: ldloc.s V_6 - IL_66b8: call string [mscorlib]System.Convert::ToString(int32) - IL_66bd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_66c2: stloc.s V_10 - IL_66c4: ldloc.s V_7 - IL_66c6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_66cb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_66d0: stloc.s V_6 - IL_66d2: ldloc.s V_9 - IL_66d4: call string [mscorlib]System.Convert::ToString(int32) - IL_66d9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_66de: stloc.s V_6 - IL_66e0: ldloc.s V_10 - IL_66e2: call string [mscorlib]System.Convert::ToString(int32) - IL_66e7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_66ec: stloc.s V_10 - IL_66ee: br.s IL_6736 - - IL_66f0: ldloc.s V_8 - IL_66f2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_66f7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_66fc: stloc.s V_9 - IL_66fe: ldloc.s V_8 - IL_6700: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6705: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_670a: stloc.s V_9 - IL_670c: ldloc.s V_8 - IL_670e: call string [mscorlib]System.Convert::ToString(int32) - IL_6713: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6718: stloc.s V_6 - IL_671a: ldloc.s V_9 - IL_671c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6721: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6726: stloc.s V_10 - IL_6728: ldloc.s V_6 - IL_672a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_672f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6734: stloc.s V_6 - IL_6736: ldloc.s V_7 - IL_6738: ldloc.s V_6 - IL_673a: bge.s IL_6784 - - IL_673c: ldloc.s V_6 - IL_673e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6743: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6748: stloc.s V_6 - IL_674a: ldloc.s V_8 - IL_674c: call string [mscorlib]System.Convert::ToString(int32) - IL_6751: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6756: stloc.s V_7 - IL_6758: ldloc.s V_7 - IL_675a: call string [mscorlib]System.Convert::ToString(int32) - IL_675f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6764: stloc.s V_10 - IL_6766: ldloc.s V_8 - IL_6768: call string [mscorlib]System.Convert::ToString(int32) - IL_676d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6772: stloc.s V_9 - IL_6774: ldloc.s V_9 - IL_6776: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_677b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6780: stloc.s V_10 - IL_6782: br.s IL_67ca - - IL_6784: ldloc.s V_8 - IL_6786: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_678b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6790: stloc.s V_7 - IL_6792: ldloc.s V_6 - IL_6794: call string [mscorlib]System.Convert::ToString(int32) - IL_6799: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_679e: stloc.s V_8 - IL_67a0: ldloc.s V_6 - IL_67a2: call string [mscorlib]System.Convert::ToString(int32) - IL_67a7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_67ac: stloc.s V_10 - IL_67ae: ldloc.s V_7 - IL_67b0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_67b5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_67ba: stloc.s V_9 - IL_67bc: ldloc.s V_9 - IL_67be: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_67c3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_67c8: stloc.s V_8 - IL_67ca: ldloc.s V_10 - IL_67cc: ldloc.s V_7 - IL_67ce: bge.s IL_6818 - - IL_67d0: ldloc.s V_9 - IL_67d2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_67d7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_67dc: stloc.s V_9 - IL_67de: ldloc.s V_8 - IL_67e0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_67e5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_67ea: stloc.s V_10 - IL_67ec: ldloc.s V_8 - IL_67ee: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_67f3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_67f8: stloc.s V_6 - IL_67fa: ldloc.s V_6 - IL_67fc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6801: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6806: stloc.s V_7 - IL_6808: ldloc.s V_10 - IL_680a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_680f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6814: stloc.s V_10 - IL_6816: br.s IL_685e - - IL_6818: ldloc.s V_7 - IL_681a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_681f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6824: stloc.s V_6 - IL_6826: ldloc.s V_9 - IL_6828: call string [mscorlib]System.Convert::ToString(int32) - IL_682d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6832: stloc.s V_8 - IL_6834: ldloc.s V_8 - IL_6836: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_683b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6840: stloc.s V_10 - IL_6842: ldloc.s V_9 - IL_6844: call string [mscorlib]System.Convert::ToString(int32) - IL_6849: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_684e: stloc.s V_10 - IL_6850: ldloc.s V_8 - IL_6852: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6857: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_685c: stloc.s V_6 - IL_685e: ldloc.s V_8 - IL_6860: ldloc.s V_9 - IL_6862: blt.s IL_68ac - - IL_6864: ldloc.s V_8 - IL_6866: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_686b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6870: stloc.s V_7 - IL_6872: ldloc.s V_8 - IL_6874: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6879: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_687e: stloc.s V_10 - IL_6880: ldloc.s V_9 - IL_6882: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6887: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_688c: stloc.s V_6 - IL_688e: ldloc.s V_7 - IL_6890: call string [mscorlib]System.Convert::ToString(int32) - IL_6895: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_689a: stloc.s V_8 - IL_689c: ldloc.s V_10 - IL_689e: call string [mscorlib]System.Convert::ToString(int32) - IL_68a3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_68a8: stloc.s V_10 - IL_68aa: br.s IL_68f2 - - IL_68ac: ldloc.s V_6 - IL_68ae: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_68b3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_68b8: stloc.s V_7 - IL_68ba: ldloc.s V_6 - IL_68bc: call string [mscorlib]System.Convert::ToString(int32) - IL_68c1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_68c6: stloc.s V_8 - IL_68c8: ldloc.s V_9 - IL_68ca: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_68cf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_68d4: stloc.s V_8 - IL_68d6: ldloc.s V_9 - IL_68d8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_68dd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_68e2: stloc.s V_6 - IL_68e4: ldloc.s V_8 - IL_68e6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_68eb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_68f0: stloc.s V_9 - IL_68f2: ldloc.s V_10 - IL_68f4: ldloc.s V_10 - IL_68f6: ble.s IL_6940 - - IL_68f8: ldloc.s V_10 - IL_68fa: call string [mscorlib]System.Convert::ToString(int32) - IL_68ff: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6904: stloc.s V_8 - IL_6906: ldloc.s V_8 - IL_6908: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_690d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6912: stloc.s V_8 - IL_6914: ldloc.s V_7 - IL_6916: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_691b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6920: stloc.s V_9 - IL_6922: ldloc.s V_7 - IL_6924: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6929: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_692e: stloc.s V_6 - IL_6930: ldloc.s V_10 - IL_6932: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6937: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_693c: stloc.s V_7 - IL_693e: br.s IL_6986 - - IL_6940: ldloc.s V_6 - IL_6942: call string [mscorlib]System.Convert::ToString(int32) - IL_6947: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_694c: stloc.s V_9 - IL_694e: ldloc.s V_9 - IL_6950: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6955: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_695a: stloc.s V_8 - IL_695c: ldloc.s V_7 - IL_695e: call string [mscorlib]System.Convert::ToString(int32) - IL_6963: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6968: stloc.s V_9 - IL_696a: ldloc.s V_8 - IL_696c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6971: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6976: stloc.s V_10 - IL_6978: ldloc.s V_7 - IL_697a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_697f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6984: stloc.s V_10 - IL_6986: ldloc.s V_8 - IL_6988: ldloc.s V_10 - IL_698a: ble.s IL_69d4 - - IL_698c: ldloc.s V_6 - IL_698e: call string [mscorlib]System.Convert::ToString(int32) - IL_6993: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6998: stloc.s V_8 - IL_699a: ldloc.s V_6 - IL_699c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_69a1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_69a6: stloc.s V_10 - IL_69a8: ldloc.s V_7 - IL_69aa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_69af: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_69b4: stloc.s V_8 - IL_69b6: ldloc.s V_8 - IL_69b8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_69bd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_69c2: stloc.s V_9 - IL_69c4: ldloc.s V_9 - IL_69c6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_69cb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_69d0: stloc.s V_7 - IL_69d2: br.s IL_6a1a - - IL_69d4: ldloc.s V_7 - IL_69d6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_69db: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_69e0: stloc.s V_9 - IL_69e2: ldloc.s V_10 - IL_69e4: call string [mscorlib]System.Convert::ToString(int32) - IL_69e9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_69ee: stloc.s V_7 - IL_69f0: ldloc.s V_10 - IL_69f2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_69f7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_69fc: stloc.s V_6 - IL_69fe: ldloc.s V_7 - IL_6a00: call string [mscorlib]System.Convert::ToString(int32) - IL_6a05: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6a0a: stloc.s V_9 - IL_6a0c: ldloc.s V_6 - IL_6a0e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6a13: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6a18: stloc.s V_6 - IL_6a1a: ldloc.s V_10 - IL_6a1c: ldloc.s V_9 - IL_6a1e: beq.s IL_6a68 - - IL_6a20: ldloc.s V_8 - IL_6a22: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6a27: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6a2c: stloc.s V_8 - IL_6a2e: ldloc.s V_9 - IL_6a30: call string [mscorlib]System.Convert::ToString(int32) - IL_6a35: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6a3a: stloc.s V_10 - IL_6a3c: ldloc.s V_6 - IL_6a3e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6a43: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6a48: stloc.s V_6 - IL_6a4a: ldloc.s V_6 - IL_6a4c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6a51: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6a56: stloc.s V_8 - IL_6a58: ldloc.s V_6 - IL_6a5a: call string [mscorlib]System.Convert::ToString(int32) - IL_6a5f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6a64: stloc.s V_9 - IL_6a66: br.s IL_6aae - - IL_6a68: ldloc.s V_6 - IL_6a6a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6a6f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6a74: stloc.s V_9 - IL_6a76: ldloc.s V_10 - IL_6a78: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6a7d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6a82: stloc.s V_6 - IL_6a84: ldloc.s V_9 - IL_6a86: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6a8b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6a90: stloc.s V_6 - IL_6a92: ldloc.s V_8 - IL_6a94: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6a99: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6a9e: stloc.s V_6 - IL_6aa0: ldloc.s V_10 - IL_6aa2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6aa7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6aac: stloc.s V_9 - IL_6aae: ldloc.s V_10 - IL_6ab0: ldloc.s V_8 - IL_6ab2: ble.s IL_6afc - - IL_6ab4: ldloc.s V_10 - IL_6ab6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6abb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6ac0: stloc.s V_10 - IL_6ac2: ldloc.s V_7 - IL_6ac4: call string [mscorlib]System.Convert::ToString(int32) - IL_6ac9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6ace: stloc.s V_6 - IL_6ad0: ldloc.s V_9 - IL_6ad2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6ad7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6adc: stloc.s V_8 - IL_6ade: ldloc.s V_10 - IL_6ae0: call string [mscorlib]System.Convert::ToString(int32) - IL_6ae5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6aea: stloc.s V_9 - IL_6aec: ldloc.s V_10 - IL_6aee: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6af3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6af8: stloc.s V_10 - IL_6afa: br.s IL_6b42 - - IL_6afc: ldloc.s V_9 - IL_6afe: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6b03: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6b08: stloc.s V_7 - IL_6b0a: ldloc.s V_6 - IL_6b0c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6b11: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6b16: stloc.s V_6 - IL_6b18: ldloc.s V_8 - IL_6b1a: call string [mscorlib]System.Convert::ToString(int32) - IL_6b1f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6b24: stloc.s V_10 - IL_6b26: ldloc.s V_8 - IL_6b28: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6b2d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6b32: stloc.s V_10 - IL_6b34: ldloc.s V_8 - IL_6b36: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6b3b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6b40: stloc.s V_7 - IL_6b42: ldloc.s V_7 - IL_6b44: ldloc.s V_10 - IL_6b46: bge.s IL_6b90 - - IL_6b48: ldloc.s V_9 - IL_6b4a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6b4f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6b54: stloc.s V_9 - IL_6b56: ldloc.s V_8 - IL_6b58: call string [mscorlib]System.Convert::ToString(int32) - IL_6b5d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6b62: stloc.s V_6 - IL_6b64: ldloc.s V_8 - IL_6b66: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6b6b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6b70: stloc.s V_9 - IL_6b72: ldloc.s V_9 - IL_6b74: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6b79: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6b7e: stloc.s V_6 - IL_6b80: ldloc.s V_6 - IL_6b82: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6b87: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6b8c: stloc.s V_9 - IL_6b8e: br.s IL_6bd6 - - IL_6b90: ldloc.s V_7 - IL_6b92: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6b97: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6b9c: stloc.s V_8 - IL_6b9e: ldloc.s V_10 - IL_6ba0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6ba5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6baa: stloc.s V_7 - IL_6bac: ldloc.s V_7 - IL_6bae: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6bb3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6bb8: stloc.s V_7 - IL_6bba: ldloc.s V_10 - IL_6bbc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6bc1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6bc6: stloc.s V_7 - IL_6bc8: ldloc.s V_10 - IL_6bca: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6bcf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6bd4: stloc.s V_10 - IL_6bd6: ldloc.s V_8 - IL_6bd8: ldloc.s V_7 - IL_6bda: bge.s IL_6c24 - - IL_6bdc: ldloc.s V_7 - IL_6bde: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6be3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6be8: stloc.s V_6 - IL_6bea: ldloc.s V_9 - IL_6bec: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6bf1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6bf6: stloc.s V_7 - IL_6bf8: ldloc.s V_8 - IL_6bfa: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6bff: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6c04: stloc.s V_6 - IL_6c06: ldloc.s V_7 - IL_6c08: call string [mscorlib]System.Convert::ToString(int32) - IL_6c0d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6c12: stloc.s V_9 - IL_6c14: ldloc.s V_8 - IL_6c16: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6c1b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6c20: stloc.s V_10 - IL_6c22: br.s IL_6c6a - - IL_6c24: ldloc.s V_6 - IL_6c26: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6c2b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6c30: stloc.s V_7 - IL_6c32: ldloc.s V_7 - IL_6c34: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6c39: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6c3e: stloc.s V_7 - IL_6c40: ldloc.s V_9 - IL_6c42: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6c47: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6c4c: stloc.s V_6 - IL_6c4e: ldloc.s V_7 - IL_6c50: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6c55: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6c5a: stloc.s V_8 - IL_6c5c: ldloc.s V_6 - IL_6c5e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6c63: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6c68: stloc.s V_9 - IL_6c6a: ldloc.s V_10 - IL_6c6c: ldloc.s V_10 - IL_6c6e: bgt.s IL_6cb8 - - IL_6c70: ldloc.s V_6 - IL_6c72: call string [mscorlib]System.Convert::ToString(int32) - IL_6c77: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6c7c: stloc.s V_8 - IL_6c7e: ldloc.s V_6 - IL_6c80: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6c85: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6c8a: stloc.s V_9 - IL_6c8c: ldloc.s V_10 - IL_6c8e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6c93: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6c98: stloc.s V_9 - IL_6c9a: ldloc.s V_7 - IL_6c9c: call string [mscorlib]System.Convert::ToString(int32) - IL_6ca1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6ca6: stloc.s V_8 - IL_6ca8: ldloc.s V_6 - IL_6caa: call string [mscorlib]System.Convert::ToString(int32) - IL_6caf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6cb4: stloc.s V_6 - IL_6cb6: br.s IL_6cfe - - IL_6cb8: ldloc.s V_8 - IL_6cba: call string [mscorlib]System.Convert::ToString(int32) - IL_6cbf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6cc4: stloc.s V_7 - IL_6cc6: ldloc.s V_8 - IL_6cc8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6ccd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6cd2: stloc.s V_10 - IL_6cd4: ldloc.s V_10 - IL_6cd6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6cdb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6ce0: stloc.s V_10 - IL_6ce2: ldloc.s V_8 - IL_6ce4: call string [mscorlib]System.Convert::ToString(int32) - IL_6ce9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6cee: stloc.s V_8 - IL_6cf0: ldloc.s V_8 - IL_6cf2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6cf7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6cfc: stloc.s V_7 - IL_6cfe: ldloc.s V_6 - IL_6d00: ldloc.s V_9 - IL_6d02: bge.s IL_6d4c - - IL_6d04: ldloc.s V_8 - IL_6d06: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6d0b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6d10: stloc.s V_7 - IL_6d12: ldloc.s V_9 - IL_6d14: call string [mscorlib]System.Convert::ToString(int32) - IL_6d19: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6d1e: stloc.s V_8 - IL_6d20: ldloc.s V_8 - IL_6d22: call string [mscorlib]System.Convert::ToString(int32) - IL_6d27: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6d2c: stloc.s V_10 - IL_6d2e: ldloc.s V_9 - IL_6d30: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6d35: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6d3a: stloc.s V_8 - IL_6d3c: ldloc.s V_7 - IL_6d3e: call string [mscorlib]System.Convert::ToString(int32) - IL_6d43: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6d48: stloc.s V_8 - IL_6d4a: br.s IL_6d92 - - IL_6d4c: ldloc.s V_7 - IL_6d4e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6d53: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6d58: stloc.s V_6 - IL_6d5a: ldloc.s V_6 - IL_6d5c: call string [mscorlib]System.Convert::ToString(int32) - IL_6d61: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6d66: stloc.s V_9 - IL_6d68: ldloc.s V_9 - IL_6d6a: call string [mscorlib]System.Convert::ToString(int32) - IL_6d6f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6d74: stloc.s V_7 - IL_6d76: ldloc.s V_8 - IL_6d78: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6d7d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6d82: stloc.s V_7 - IL_6d84: ldloc.s V_10 - IL_6d86: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6d8b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6d90: stloc.s V_9 - IL_6d92: ldloc.s V_7 - IL_6d94: ldloc.s V_8 - IL_6d96: blt.s IL_6de0 - - IL_6d98: ldloc.s V_7 - IL_6d9a: call string [mscorlib]System.Convert::ToString(int32) - IL_6d9f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6da4: stloc.s V_9 - IL_6da6: ldloc.s V_10 - IL_6da8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6dad: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6db2: stloc.s V_9 - IL_6db4: ldloc.s V_7 - IL_6db6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6dbb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6dc0: stloc.s V_10 - IL_6dc2: ldloc.s V_8 - IL_6dc4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6dc9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6dce: stloc.s V_10 - IL_6dd0: ldloc.s V_6 - IL_6dd2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6dd7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6ddc: stloc.s V_6 - IL_6dde: br.s IL_6e26 - - IL_6de0: ldloc.s V_6 - IL_6de2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6de7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6dec: stloc.s V_7 - IL_6dee: ldloc.s V_8 - IL_6df0: call string [mscorlib]System.Convert::ToString(int32) - IL_6df5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6dfa: stloc.s V_6 - IL_6dfc: ldloc.s V_9 - IL_6dfe: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6e03: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6e08: stloc.s V_9 - IL_6e0a: ldloc.s V_8 - IL_6e0c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6e11: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6e16: stloc.s V_10 - IL_6e18: ldloc.s V_7 - IL_6e1a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6e1f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6e24: stloc.s V_6 - IL_6e26: ldloc.s V_6 - IL_6e28: ldloc.s V_7 - IL_6e2a: bne.un.s IL_6e74 - - IL_6e2c: ldloc.s V_9 - IL_6e2e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6e33: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6e38: stloc.s V_7 - IL_6e3a: ldloc.s V_7 - IL_6e3c: call string [mscorlib]System.Convert::ToString(int32) - IL_6e41: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6e46: stloc.s V_10 - IL_6e48: ldloc.s V_9 - IL_6e4a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6e4f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6e54: stloc.s V_7 - IL_6e56: ldloc.s V_6 - IL_6e58: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6e5d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6e62: stloc.s V_9 - IL_6e64: ldloc.s V_6 - IL_6e66: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6e6b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6e70: stloc.s V_6 - IL_6e72: br.s IL_6eba - - IL_6e74: ldloc.s V_6 - IL_6e76: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6e7b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6e80: stloc.s V_8 - IL_6e82: ldloc.s V_9 - IL_6e84: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6e89: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6e8e: stloc.s V_9 - IL_6e90: ldloc.s V_9 - IL_6e92: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6e97: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6e9c: stloc.s V_10 - IL_6e9e: ldloc.s V_9 - IL_6ea0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6ea5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6eaa: stloc.s V_8 - IL_6eac: ldloc.s V_10 - IL_6eae: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6eb3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6eb8: stloc.s V_8 - IL_6eba: ldloc.s V_7 - IL_6ebc: ldloc.s V_7 - IL_6ebe: beq.s IL_6f08 - - IL_6ec0: ldloc.s V_6 - IL_6ec2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6ec7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6ecc: stloc.s V_7 - IL_6ece: ldloc.s V_8 - IL_6ed0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6ed5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6eda: stloc.s V_7 - IL_6edc: ldloc.s V_9 - IL_6ede: call string [mscorlib]System.Convert::ToString(int32) - IL_6ee3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6ee8: stloc.s V_10 - IL_6eea: ldloc.s V_9 - IL_6eec: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6ef1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6ef6: stloc.s V_10 - IL_6ef8: ldloc.s V_6 - IL_6efa: call string [mscorlib]System.Convert::ToString(int32) - IL_6eff: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6f04: stloc.s V_8 - IL_6f06: br.s IL_6f4e - - IL_6f08: ldloc.s V_9 - IL_6f0a: call string [mscorlib]System.Convert::ToString(int32) - IL_6f0f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6f14: stloc.s V_7 - IL_6f16: ldloc.s V_10 - IL_6f18: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6f1d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6f22: stloc.s V_6 - IL_6f24: ldloc.s V_10 - IL_6f26: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6f2b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6f30: stloc.s V_9 - IL_6f32: ldloc.s V_9 - IL_6f34: call string [mscorlib]System.Convert::ToString(int32) - IL_6f39: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6f3e: stloc.s V_6 - IL_6f40: ldloc.s V_6 - IL_6f42: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6f47: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6f4c: stloc.s V_8 - IL_6f4e: ldloc.s V_10 - IL_6f50: ldloc.s V_6 - IL_6f52: bne.un.s IL_6f9c - - IL_6f54: ldloc.s V_7 - IL_6f56: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6f5b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6f60: stloc.s V_10 - IL_6f62: ldloc.s V_7 - IL_6f64: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6f69: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6f6e: stloc.s V_10 - IL_6f70: ldloc.s V_8 - IL_6f72: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6f77: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6f7c: stloc.s V_9 - IL_6f7e: ldloc.s V_6 - IL_6f80: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6f85: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6f8a: stloc.s V_10 - IL_6f8c: ldloc.s V_6 - IL_6f8e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6f93: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6f98: stloc.s V_10 - IL_6f9a: br.s IL_6fe2 - - IL_6f9c: ldloc.s V_6 - IL_6f9e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6fa3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6fa8: stloc.s V_9 - IL_6faa: ldloc.s V_6 - IL_6fac: call string [mscorlib]System.Convert::ToString(int32) - IL_6fb1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6fb6: stloc.s V_6 - IL_6fb8: ldloc.s V_8 - IL_6fba: call string [mscorlib]System.Convert::ToString(int32) - IL_6fbf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6fc4: stloc.s V_8 - IL_6fc6: ldloc.s V_9 - IL_6fc8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6fcd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6fd2: stloc.s V_7 - IL_6fd4: ldloc.s V_10 - IL_6fd6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6fdb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6fe0: stloc.s V_10 - IL_6fe2: ldloc.s V_6 - IL_6fe4: ldloc.s V_10 - IL_6fe6: bne.un.s IL_7030 - - IL_6fe8: ldloc.s V_10 - IL_6fea: call string [mscorlib]System.Convert::ToString(int32) - IL_6fef: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6ff4: stloc.s V_9 - IL_6ff6: ldloc.s V_8 - IL_6ff8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6ffd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7002: stloc.s V_9 - IL_7004: ldloc.s V_7 - IL_7006: call string [mscorlib]System.Convert::ToString(int32) - IL_700b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7010: stloc.s V_8 - IL_7012: ldloc.s V_8 - IL_7014: call string [mscorlib]System.Convert::ToString(int32) - IL_7019: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_701e: stloc.s V_7 - IL_7020: ldloc.s V_8 - IL_7022: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7027: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_702c: stloc.s V_10 - IL_702e: br.s IL_7076 - - IL_7030: ldloc.s V_8 - IL_7032: call string [mscorlib]System.Convert::ToString(int32) - IL_7037: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_703c: stloc.s V_9 - IL_703e: ldloc.s V_6 - IL_7040: call string [mscorlib]System.Convert::ToString(int32) - IL_7045: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_704a: stloc.s V_10 - IL_704c: ldloc.s V_6 - IL_704e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7053: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7058: stloc.s V_6 - IL_705a: ldloc.s V_10 - IL_705c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7061: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7066: stloc.s V_10 - IL_7068: ldloc.s V_8 - IL_706a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_706f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7074: stloc.s V_8 - IL_7076: ldloc.s V_7 - IL_7078: ldloc.s V_10 - IL_707a: bgt.s IL_70c4 - - IL_707c: ldloc.s V_7 - IL_707e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7083: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7088: stloc.s V_6 - IL_708a: ldloc.s V_10 - IL_708c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7091: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7096: stloc.s V_6 - IL_7098: ldloc.s V_6 - IL_709a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_709f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_70a4: stloc.s V_9 - IL_70a6: ldloc.s V_10 - IL_70a8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_70ad: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_70b2: stloc.s V_9 - IL_70b4: ldloc.s V_10 - IL_70b6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_70bb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_70c0: stloc.s V_10 - IL_70c2: br.s IL_710a - - IL_70c4: ldloc.s V_8 - IL_70c6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_70cb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_70d0: stloc.s V_6 - IL_70d2: ldloc.s V_8 - IL_70d4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_70d9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_70de: stloc.s V_7 - IL_70e0: ldloc.s V_6 - IL_70e2: call string [mscorlib]System.Convert::ToString(int32) - IL_70e7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_70ec: stloc.s V_9 - IL_70ee: ldloc.s V_8 - IL_70f0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_70f5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_70fa: stloc.s V_9 - IL_70fc: ldloc.s V_9 - IL_70fe: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7103: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7108: stloc.s V_9 - IL_710a: ldloc.s V_9 - IL_710c: ldloc.s V_8 - IL_710e: beq.s IL_7158 - - IL_7110: ldloc.s V_6 - IL_7112: call string [mscorlib]System.Convert::ToString(int32) - IL_7117: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_711c: stloc.s V_8 - IL_711e: ldloc.s V_9 - IL_7120: call string [mscorlib]System.Convert::ToString(int32) - IL_7125: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_712a: stloc.s V_7 - IL_712c: ldloc.s V_10 - IL_712e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7133: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7138: stloc.s V_9 - IL_713a: ldloc.s V_7 - IL_713c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7141: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7146: stloc.s V_6 - IL_7148: ldloc.s V_7 - IL_714a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_714f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7154: stloc.s V_7 - IL_7156: br.s IL_719e - - IL_7158: ldloc.s V_9 - IL_715a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_715f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7164: stloc.s V_10 - IL_7166: ldloc.s V_8 - IL_7168: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_716d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7172: stloc.s V_10 - IL_7174: ldloc.s V_8 - IL_7176: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_717b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7180: stloc.s V_8 - IL_7182: ldloc.s V_7 - IL_7184: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7189: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_718e: stloc.s V_6 - IL_7190: ldloc.s V_10 - IL_7192: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7197: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_719c: stloc.s V_8 - IL_719e: ldloc.s V_9 - IL_71a0: ldloc.s V_8 - IL_71a2: blt.s IL_71ec - - IL_71a4: ldloc.s V_9 - IL_71a6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_71ab: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_71b0: stloc.s V_8 - IL_71b2: ldloc.s V_8 - IL_71b4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_71b9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_71be: stloc.s V_10 - IL_71c0: ldloc.s V_9 - IL_71c2: call string [mscorlib]System.Convert::ToString(int32) - IL_71c7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_71cc: stloc.s V_10 - IL_71ce: ldloc.s V_7 - IL_71d0: call string [mscorlib]System.Convert::ToString(int32) - IL_71d5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_71da: stloc.s V_8 - IL_71dc: ldloc.s V_10 - IL_71de: call string [mscorlib]System.Convert::ToString(int32) - IL_71e3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_71e8: stloc.s V_10 - IL_71ea: br.s IL_7232 - - IL_71ec: ldloc.s V_8 - IL_71ee: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_71f3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_71f8: stloc.s V_6 - IL_71fa: ldloc.s V_7 - IL_71fc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7201: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7206: stloc.s V_6 - IL_7208: ldloc.s V_7 - IL_720a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_720f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7214: stloc.s V_6 - IL_7216: ldloc.s V_6 - IL_7218: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_721d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7222: stloc.s V_8 - IL_7224: ldloc.s V_7 - IL_7226: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_722b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7230: stloc.s V_8 - IL_7232: ldloc.s V_9 - IL_7234: ldloc.s V_9 - IL_7236: beq.s IL_7280 - - IL_7238: ldloc.s V_8 - IL_723a: call string [mscorlib]System.Convert::ToString(int32) - IL_723f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7244: stloc.s V_10 - IL_7246: ldloc.s V_9 - IL_7248: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_724d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7252: stloc.s V_8 - IL_7254: ldloc.s V_9 - IL_7256: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_725b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7260: stloc.s V_7 - IL_7262: ldloc.s V_9 - IL_7264: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7269: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_726e: stloc.s V_9 - IL_7270: ldloc.s V_10 - IL_7272: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7277: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_727c: stloc.s V_7 - IL_727e: br.s IL_72c6 - - IL_7280: ldloc.s V_6 - IL_7282: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7287: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_728c: stloc.s V_7 - IL_728e: ldloc.s V_8 - IL_7290: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7295: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_729a: stloc.s V_8 - IL_729c: ldloc.s V_7 - IL_729e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_72a3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_72a8: stloc.s V_6 - IL_72aa: ldloc.s V_8 - IL_72ac: call string [mscorlib]System.Convert::ToString(int32) - IL_72b1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_72b6: stloc.s V_8 - IL_72b8: ldloc.s V_8 - IL_72ba: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_72bf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_72c4: stloc.s V_7 - IL_72c6: ldloc.s V_8 - IL_72c8: ldloc.s V_6 - IL_72ca: blt.s IL_7314 - - IL_72cc: ldloc.s V_10 - IL_72ce: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_72d3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_72d8: stloc.s V_8 - IL_72da: ldloc.s V_10 - IL_72dc: call string [mscorlib]System.Convert::ToString(int32) - IL_72e1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_72e6: stloc.s V_7 - IL_72e8: ldloc.s V_6 - IL_72ea: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_72ef: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_72f4: stloc.s V_10 - IL_72f6: ldloc.s V_7 - IL_72f8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_72fd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7302: stloc.s V_9 - IL_7304: ldloc.s V_6 - IL_7306: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_730b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7310: stloc.s V_9 - IL_7312: br.s IL_735a - - IL_7314: ldloc.s V_10 - IL_7316: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_731b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7320: stloc.s V_7 - IL_7322: ldloc.s V_7 - IL_7324: call string [mscorlib]System.Convert::ToString(int32) - IL_7329: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_732e: stloc.s V_6 - IL_7330: ldloc.s V_7 - IL_7332: call string [mscorlib]System.Convert::ToString(int32) - IL_7337: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_733c: stloc.s V_6 - IL_733e: ldloc.s V_7 - IL_7340: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7345: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_734a: stloc.s V_7 - IL_734c: ldloc.s V_8 - IL_734e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7353: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7358: stloc.s V_6 - IL_735a: ldloc.s V_8 - IL_735c: ldloc.s V_7 - IL_735e: ble.s IL_73a8 - - IL_7360: ldloc.s V_6 - IL_7362: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7367: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_736c: stloc.s V_8 - IL_736e: ldloc.s V_9 - IL_7370: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7375: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_737a: stloc.s V_6 - IL_737c: ldloc.s V_8 - IL_737e: call string [mscorlib]System.Convert::ToString(int32) - IL_7383: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7388: stloc.s V_6 - IL_738a: ldloc.s V_6 - IL_738c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7391: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7396: stloc.s V_8 - IL_7398: ldloc.s V_8 - IL_739a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_739f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_73a4: stloc.s V_10 - IL_73a6: br.s IL_73ee - - IL_73a8: ldloc.s V_7 - IL_73aa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_73af: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_73b4: stloc.s V_8 - IL_73b6: ldloc.s V_6 - IL_73b8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_73bd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_73c2: stloc.s V_9 - IL_73c4: ldloc.s V_7 - IL_73c6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_73cb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_73d0: stloc.s V_9 - IL_73d2: ldloc.s V_8 - IL_73d4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_73d9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_73de: stloc.s V_8 - IL_73e0: ldloc.s V_10 - IL_73e2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_73e7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_73ec: stloc.s V_9 - IL_73ee: ldloc.s V_9 - IL_73f0: ldloc.s V_10 - IL_73f2: bgt.s IL_743c - - IL_73f4: ldloc.s V_7 - IL_73f6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_73fb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7400: stloc.s V_10 - IL_7402: ldloc.s V_6 - IL_7404: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7409: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_740e: stloc.s V_10 - IL_7410: ldloc.s V_10 - IL_7412: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7417: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_741c: stloc.s V_7 - IL_741e: ldloc.s V_6 - IL_7420: call string [mscorlib]System.Convert::ToString(int32) - IL_7425: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_742a: stloc.s V_9 - IL_742c: ldloc.s V_7 - IL_742e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7433: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7438: stloc.s V_6 - IL_743a: br.s IL_7482 - - IL_743c: ldloc.s V_10 - IL_743e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7443: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7448: stloc.s V_10 - IL_744a: ldloc.s V_6 - IL_744c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7451: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7456: stloc.s V_6 - IL_7458: ldloc.s V_7 - IL_745a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_745f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7464: stloc.s V_7 - IL_7466: ldloc.s V_10 - IL_7468: call string [mscorlib]System.Convert::ToString(int32) - IL_746d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7472: stloc.s V_10 - IL_7474: ldloc.s V_10 - IL_7476: call string [mscorlib]System.Convert::ToString(int32) - IL_747b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7480: stloc.s V_6 - IL_7482: ldloc.s V_10 - IL_7484: ldloc.s V_10 - IL_7486: bne.un.s IL_74d0 - - IL_7488: ldloc.s V_10 - IL_748a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_748f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7494: stloc.s V_7 - IL_7496: ldloc.s V_9 - IL_7498: call string [mscorlib]System.Convert::ToString(int32) - IL_749d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_74a2: stloc.s V_6 - IL_74a4: ldloc.s V_7 - IL_74a6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_74ab: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_74b0: stloc.s V_7 - IL_74b2: ldloc.s V_9 - IL_74b4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_74b9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_74be: stloc.s V_7 - IL_74c0: ldloc.s V_9 - IL_74c2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_74c7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_74cc: stloc.s V_7 - IL_74ce: br.s IL_7516 - - IL_74d0: ldloc.s V_7 - IL_74d2: call string [mscorlib]System.Convert::ToString(int32) - IL_74d7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_74dc: stloc.s V_7 - IL_74de: ldloc.s V_6 - IL_74e0: call string [mscorlib]System.Convert::ToString(int32) - IL_74e5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_74ea: stloc.s V_10 - IL_74ec: ldloc.s V_7 - IL_74ee: call string [mscorlib]System.Convert::ToString(int32) - IL_74f3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_74f8: stloc.s V_9 - IL_74fa: ldloc.s V_9 - IL_74fc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7501: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7506: stloc.s V_6 - IL_7508: ldloc.s V_8 - IL_750a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_750f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7514: stloc.s V_6 - IL_7516: ldloc.s V_6 - IL_7518: ldloc.s V_10 - IL_751a: beq.s IL_7564 - - IL_751c: ldloc.s V_7 - IL_751e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7523: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7528: stloc.s V_7 - IL_752a: ldloc.s V_9 - IL_752c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7531: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7536: stloc.s V_8 - IL_7538: ldloc.s V_10 - IL_753a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_753f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7544: stloc.s V_6 - IL_7546: ldloc.s V_9 - IL_7548: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_754d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7552: stloc.s V_10 - IL_7554: ldloc.s V_6 - IL_7556: call string [mscorlib]System.Convert::ToString(int32) - IL_755b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7560: stloc.s V_8 - IL_7562: br.s IL_75aa - - IL_7564: ldloc.s V_9 - IL_7566: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_756b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7570: stloc.s V_6 - IL_7572: ldloc.s V_7 - IL_7574: call string [mscorlib]System.Convert::ToString(int32) - IL_7579: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_757e: stloc.s V_8 - IL_7580: ldloc.s V_7 - IL_7582: call string [mscorlib]System.Convert::ToString(int32) - IL_7587: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_758c: stloc.s V_9 - IL_758e: ldloc.s V_9 - IL_7590: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7595: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_759a: stloc.s V_8 - IL_759c: ldloc.s V_8 - IL_759e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_75a3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_75a8: stloc.s V_6 - IL_75aa: ldloc.s V_7 - IL_75ac: ldloc.s V_10 - IL_75ae: bne.un.s IL_75f8 - - IL_75b0: ldloc.s V_8 - IL_75b2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_75b7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_75bc: stloc.s V_10 - IL_75be: ldloc.s V_10 - IL_75c0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_75c5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_75ca: stloc.s V_8 - IL_75cc: ldloc.s V_9 - IL_75ce: call string [mscorlib]System.Convert::ToString(int32) - IL_75d3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_75d8: stloc.s V_8 - IL_75da: ldloc.s V_9 - IL_75dc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_75e1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_75e6: stloc.s V_7 - IL_75e8: ldloc.s V_8 - IL_75ea: call string [mscorlib]System.Convert::ToString(int32) - IL_75ef: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_75f4: stloc.s V_8 - IL_75f6: br.s IL_763e - - IL_75f8: ldloc.s V_6 - IL_75fa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_75ff: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7604: stloc.s V_8 - IL_7606: ldloc.s V_7 - IL_7608: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_760d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7612: stloc.s V_9 - IL_7614: ldloc.s V_7 - IL_7616: call string [mscorlib]System.Convert::ToString(int32) - IL_761b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7620: stloc.s V_8 - IL_7622: ldloc.s V_10 - IL_7624: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7629: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_762e: stloc.s V_10 - IL_7630: ldloc.s V_10 - IL_7632: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7637: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_763c: stloc.s V_6 - IL_763e: ldloc.s V_6 - IL_7640: ldloc.s V_9 - IL_7642: bgt.s IL_768c - - IL_7644: ldloc.s V_9 - IL_7646: call string [mscorlib]System.Convert::ToString(int32) - IL_764b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7650: stloc.s V_10 - IL_7652: ldloc.s V_6 - IL_7654: call string [mscorlib]System.Convert::ToString(int32) - IL_7659: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_765e: stloc.s V_9 - IL_7660: ldloc.s V_10 - IL_7662: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7667: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_766c: stloc.s V_10 - IL_766e: ldloc.s V_9 - IL_7670: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7675: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_767a: stloc.s V_9 - IL_767c: ldloc.s V_8 - IL_767e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7683: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7688: stloc.s V_8 - IL_768a: br.s IL_76d2 - - IL_768c: ldloc.s V_6 - IL_768e: call string [mscorlib]System.Convert::ToString(int32) - IL_7693: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7698: stloc.s V_7 - IL_769a: ldloc.s V_10 - IL_769c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_76a1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_76a6: stloc.s V_7 - IL_76a8: ldloc.s V_7 - IL_76aa: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_76af: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_76b4: stloc.s V_8 - IL_76b6: ldloc.s V_10 - IL_76b8: call string [mscorlib]System.Convert::ToString(int32) - IL_76bd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_76c2: stloc.s V_6 - IL_76c4: ldloc.s V_9 - IL_76c6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_76cb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_76d0: stloc.s V_6 - IL_76d2: ldloc.s V_9 - IL_76d4: ldloc.s V_10 - IL_76d6: beq.s IL_7720 - - IL_76d8: ldloc.s V_10 - IL_76da: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_76df: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_76e4: stloc.s V_10 - IL_76e6: ldloc.s V_7 - IL_76e8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_76ed: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_76f2: stloc.s V_9 - IL_76f4: ldloc.s V_7 - IL_76f6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_76fb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7700: stloc.s V_10 - IL_7702: ldloc.s V_6 - IL_7704: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7709: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_770e: stloc.s V_7 - IL_7710: ldloc.s V_10 - IL_7712: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7717: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_771c: stloc.s V_9 - IL_771e: br.s IL_7766 - - IL_7720: ldloc.s V_9 - IL_7722: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7727: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_772c: stloc.s V_8 - IL_772e: ldloc.s V_10 - IL_7730: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7735: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_773a: stloc.s V_9 - IL_773c: ldloc.s V_6 - IL_773e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7743: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7748: stloc.s V_10 - IL_774a: ldloc.s V_6 - IL_774c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7751: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7756: stloc.s V_7 - IL_7758: ldloc.s V_8 - IL_775a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_775f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7764: stloc.s V_6 - IL_7766: ldloc.s V_10 - IL_7768: ldloc.s V_9 - IL_776a: blt.s IL_77b4 - - IL_776c: ldloc.s V_6 - IL_776e: call string [mscorlib]System.Convert::ToString(int32) - IL_7773: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7778: stloc.s V_10 - IL_777a: ldloc.s V_9 - IL_777c: call string [mscorlib]System.Convert::ToString(int32) - IL_7781: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7786: stloc.s V_8 - IL_7788: ldloc.s V_7 - IL_778a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_778f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7794: stloc.s V_9 - IL_7796: ldloc.s V_8 - IL_7798: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_779d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_77a2: stloc.s V_8 - IL_77a4: ldloc.s V_6 - IL_77a6: call string [mscorlib]System.Convert::ToString(int32) - IL_77ab: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_77b0: stloc.s V_6 - IL_77b2: br.s IL_77fa - - IL_77b4: ldloc.s V_9 - IL_77b6: call string [mscorlib]System.Convert::ToString(int32) - IL_77bb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_77c0: stloc.s V_6 - IL_77c2: ldloc.s V_8 - IL_77c4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_77c9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_77ce: stloc.s V_10 - IL_77d0: ldloc.s V_8 - IL_77d2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_77d7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_77dc: stloc.s V_10 - IL_77de: ldloc.s V_8 - IL_77e0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_77e5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_77ea: stloc.s V_10 - IL_77ec: ldloc.s V_10 - IL_77ee: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_77f3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_77f8: stloc.s V_7 - IL_77fa: ldloc.s V_10 - IL_77fc: ldloc.s V_6 - IL_77fe: bne.un.s IL_7848 - - IL_7800: ldloc.s V_9 - IL_7802: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7807: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_780c: stloc.s V_8 - IL_780e: ldloc.s V_6 - IL_7810: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7815: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_781a: stloc.s V_9 - IL_781c: ldloc.s V_9 - IL_781e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7823: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7828: stloc.s V_6 - IL_782a: ldloc.s V_6 - IL_782c: call string [mscorlib]System.Convert::ToString(int32) - IL_7831: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7836: stloc.s V_8 - IL_7838: ldloc.s V_10 - IL_783a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_783f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7844: stloc.s V_9 - IL_7846: br.s IL_788e - - IL_7848: ldloc.s V_7 - IL_784a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_784f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7854: stloc.s V_6 - IL_7856: ldloc.s V_9 - IL_7858: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_785d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7862: stloc.s V_10 - IL_7864: ldloc.s V_9 - IL_7866: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_786b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7870: stloc.s V_6 - IL_7872: ldloc.s V_6 - IL_7874: call string [mscorlib]System.Convert::ToString(int32) - IL_7879: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_787e: stloc.s V_9 - IL_7880: ldloc.s V_8 - IL_7882: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7887: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_788c: stloc.s V_7 - IL_788e: ldloc.s V_9 - IL_7890: ldloc.s V_7 - IL_7892: blt.s IL_78dc - - IL_7894: ldloc.s V_9 - IL_7896: call string [mscorlib]System.Convert::ToString(int32) - IL_789b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_78a0: stloc.s V_7 - IL_78a2: ldloc.s V_9 - IL_78a4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_78a9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_78ae: stloc.s V_7 - IL_78b0: ldloc.s V_10 - IL_78b2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_78b7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_78bc: stloc.s V_8 - IL_78be: ldloc.s V_7 - IL_78c0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_78c5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_78ca: stloc.s V_10 - IL_78cc: ldloc.s V_6 - IL_78ce: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_78d3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_78d8: stloc.s V_8 - IL_78da: br.s IL_7922 - - IL_78dc: ldloc.s V_9 - IL_78de: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_78e3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_78e8: stloc.s V_8 - IL_78ea: ldloc.s V_8 - IL_78ec: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_78f1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_78f6: stloc.s V_9 - IL_78f8: ldloc.s V_10 - IL_78fa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_78ff: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7904: stloc.s V_7 - IL_7906: ldloc.s V_7 - IL_7908: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_790d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7912: stloc.s V_6 - IL_7914: ldloc.s V_9 - IL_7916: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_791b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7920: stloc.s V_6 - IL_7922: ldloc.s V_6 - IL_7924: ldloc.s V_10 - IL_7926: bge.s IL_7970 - - IL_7928: ldloc.s V_8 - IL_792a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_792f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7934: stloc.s V_10 - IL_7936: ldloc.s V_10 - IL_7938: call string [mscorlib]System.Convert::ToString(int32) - IL_793d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7942: stloc.s V_7 - IL_7944: ldloc.s V_8 - IL_7946: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_794b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7950: stloc.s V_9 - IL_7952: ldloc.s V_8 - IL_7954: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7959: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_795e: stloc.s V_9 - IL_7960: ldloc.s V_8 - IL_7962: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7967: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_796c: stloc.s V_7 - IL_796e: br.s IL_79b6 - - IL_7970: ldloc.s V_7 - IL_7972: call string [mscorlib]System.Convert::ToString(int32) - IL_7977: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_797c: stloc.s V_6 - IL_797e: ldloc.s V_9 - IL_7980: call string [mscorlib]System.Convert::ToString(int32) - IL_7985: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_798a: stloc.s V_9 - IL_798c: ldloc.s V_8 - IL_798e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7993: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7998: stloc.s V_9 - IL_799a: ldloc.s V_7 - IL_799c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_79a1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_79a6: stloc.s V_9 - IL_79a8: ldloc.s V_6 - IL_79aa: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_79af: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_79b4: stloc.s V_7 - IL_79b6: ldloc.s V_9 - IL_79b8: ldloc.s V_6 - IL_79ba: bge.s IL_7a04 - - IL_79bc: ldloc.s V_9 - IL_79be: call string [mscorlib]System.Convert::ToString(int32) - IL_79c3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_79c8: stloc.s V_8 - IL_79ca: ldloc.s V_8 - IL_79cc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_79d1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_79d6: stloc.s V_9 - IL_79d8: ldloc.s V_8 - IL_79da: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_79df: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_79e4: stloc.s V_10 - IL_79e6: ldloc.s V_10 - IL_79e8: call string [mscorlib]System.Convert::ToString(int32) - IL_79ed: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_79f2: stloc.s V_6 - IL_79f4: ldloc.s V_10 - IL_79f6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_79fb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7a00: stloc.s V_8 - IL_7a02: br.s IL_7a4a - - IL_7a04: ldloc.s V_6 - IL_7a06: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7a0b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7a10: stloc.s V_9 - IL_7a12: ldloc.s V_8 - IL_7a14: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7a19: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7a1e: stloc.s V_7 - IL_7a20: ldloc.s V_7 - IL_7a22: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7a27: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7a2c: stloc.s V_6 - IL_7a2e: ldloc.s V_8 - IL_7a30: call string [mscorlib]System.Convert::ToString(int32) - IL_7a35: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7a3a: stloc.s V_10 - IL_7a3c: ldloc.s V_10 - IL_7a3e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7a43: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7a48: stloc.s V_8 - IL_7a4a: ldloc.s V_8 - IL_7a4c: ldloc.s V_9 - IL_7a4e: bge.s IL_7a98 - - IL_7a50: ldloc.s V_8 - IL_7a52: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7a57: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7a5c: stloc.s V_7 - IL_7a5e: ldloc.s V_8 - IL_7a60: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7a65: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7a6a: stloc.s V_9 - IL_7a6c: ldloc.s V_9 - IL_7a6e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7a73: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7a78: stloc.s V_10 - IL_7a7a: ldloc.s V_7 - IL_7a7c: call string [mscorlib]System.Convert::ToString(int32) - IL_7a81: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7a86: stloc.s V_7 - IL_7a88: ldloc.s V_8 - IL_7a8a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7a8f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7a94: stloc.s V_9 - IL_7a96: br.s IL_7ade - - IL_7a98: ldloc.s V_8 - IL_7a9a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7a9f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7aa4: stloc.s V_7 - IL_7aa6: ldloc.s V_6 - IL_7aa8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7aad: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7ab2: stloc.s V_6 - IL_7ab4: ldloc.s V_8 - IL_7ab6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7abb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7ac0: stloc.s V_9 - IL_7ac2: ldloc.s V_9 - IL_7ac4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7ac9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7ace: stloc.s V_8 - IL_7ad0: ldloc.s V_9 - IL_7ad2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7ad7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7adc: stloc.s V_10 - IL_7ade: ldloc.s V_10 - IL_7ae0: ldloc.s V_6 - IL_7ae2: bgt.s IL_7b2c - - IL_7ae4: ldloc.s V_10 - IL_7ae6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7aeb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7af0: stloc.s V_6 - IL_7af2: ldloc.s V_9 - IL_7af4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7af9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7afe: stloc.s V_7 - IL_7b00: ldloc.s V_9 - IL_7b02: call string [mscorlib]System.Convert::ToString(int32) - IL_7b07: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7b0c: stloc.s V_8 - IL_7b0e: ldloc.s V_8 - IL_7b10: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7b15: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7b1a: stloc.s V_10 - IL_7b1c: ldloc.s V_7 - IL_7b1e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7b23: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7b28: stloc.s V_10 - IL_7b2a: br.s IL_7b72 - - IL_7b2c: ldloc.s V_10 - IL_7b2e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7b33: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7b38: stloc.s V_6 - IL_7b3a: ldloc.s V_8 - IL_7b3c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7b41: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7b46: stloc.s V_7 - IL_7b48: ldloc.s V_8 - IL_7b4a: call string [mscorlib]System.Convert::ToString(int32) - IL_7b4f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7b54: stloc.s V_9 - IL_7b56: ldloc.s V_8 - IL_7b58: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7b5d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7b62: stloc.s V_6 - IL_7b64: ldloc.s V_8 - IL_7b66: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7b6b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7b70: stloc.s V_9 - IL_7b72: ldloc.s V_9 - IL_7b74: ldloc.s V_9 - IL_7b76: beq.s IL_7bc0 - - IL_7b78: ldloc.s V_6 - IL_7b7a: call string [mscorlib]System.Convert::ToString(int32) - IL_7b7f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7b84: stloc.s V_7 - IL_7b86: ldloc.s V_8 - IL_7b88: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7b8d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7b92: stloc.s V_8 - IL_7b94: ldloc.s V_8 - IL_7b96: call string [mscorlib]System.Convert::ToString(int32) - IL_7b9b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7ba0: stloc.s V_10 - IL_7ba2: ldloc.s V_7 - IL_7ba4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7ba9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7bae: stloc.s V_8 - IL_7bb0: ldloc.s V_8 - IL_7bb2: call string [mscorlib]System.Convert::ToString(int32) - IL_7bb7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7bbc: stloc.s V_10 - IL_7bbe: br.s IL_7c06 - - IL_7bc0: ldloc.s V_6 - IL_7bc2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7bc7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7bcc: stloc.s V_8 - IL_7bce: ldloc.s V_9 - IL_7bd0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7bd5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7bda: stloc.s V_10 - IL_7bdc: ldloc.s V_9 - IL_7bde: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7be3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7be8: stloc.s V_9 - IL_7bea: ldloc.s V_9 - IL_7bec: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7bf1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7bf6: stloc.s V_7 - IL_7bf8: ldloc.s V_9 - IL_7bfa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7bff: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7c04: stloc.s V_6 - IL_7c06: ldloc.s V_6 - IL_7c08: ldloc.s V_7 - IL_7c0a: bge.s IL_7c54 - - IL_7c0c: ldloc.s V_9 - IL_7c0e: call string [mscorlib]System.Convert::ToString(int32) - IL_7c13: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7c18: stloc.s V_10 - IL_7c1a: ldloc.s V_7 - IL_7c1c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7c21: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7c26: stloc.s V_7 - IL_7c28: ldloc.s V_8 - IL_7c2a: call string [mscorlib]System.Convert::ToString(int32) - IL_7c2f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7c34: stloc.s V_8 - IL_7c36: ldloc.s V_10 - IL_7c38: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7c3d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7c42: stloc.s V_6 - IL_7c44: ldloc.s V_10 - IL_7c46: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7c4b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7c50: stloc.s V_7 - IL_7c52: br.s IL_7c9a - - IL_7c54: ldloc.s V_10 - IL_7c56: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7c5b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7c60: stloc.s V_6 - IL_7c62: ldloc.s V_7 - IL_7c64: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7c69: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7c6e: stloc.s V_7 - IL_7c70: ldloc.s V_6 - IL_7c72: call string [mscorlib]System.Convert::ToString(int32) - IL_7c77: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7c7c: stloc.s V_6 - IL_7c7e: ldloc.s V_9 - IL_7c80: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7c85: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7c8a: stloc.s V_8 - IL_7c8c: ldloc.s V_10 - IL_7c8e: call string [mscorlib]System.Convert::ToString(int32) - IL_7c93: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7c98: stloc.s V_9 - IL_7c9a: ldloc.s V_7 - IL_7c9c: ldloc.s V_9 - IL_7c9e: bgt.s IL_7ce8 - - IL_7ca0: ldloc.s V_10 - IL_7ca2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7ca7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7cac: stloc.s V_6 - IL_7cae: ldloc.s V_8 - IL_7cb0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7cb5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7cba: stloc.s V_10 - IL_7cbc: ldloc.s V_9 - IL_7cbe: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7cc3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7cc8: stloc.s V_10 - IL_7cca: ldloc.s V_7 - IL_7ccc: call string [mscorlib]System.Convert::ToString(int32) - IL_7cd1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7cd6: stloc.s V_6 - IL_7cd8: ldloc.s V_7 - IL_7cda: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7cdf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7ce4: stloc.s V_9 - IL_7ce6: br.s IL_7d2e - - IL_7ce8: ldloc.s V_8 - IL_7cea: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7cef: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7cf4: stloc.s V_10 - IL_7cf6: ldloc.s V_10 - IL_7cf8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7cfd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7d02: stloc.s V_10 - IL_7d04: ldloc.s V_6 - IL_7d06: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7d0b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7d10: stloc.s V_10 - IL_7d12: ldloc.s V_7 - IL_7d14: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7d19: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7d1e: stloc.s V_8 - IL_7d20: ldloc.s V_9 - IL_7d22: call string [mscorlib]System.Convert::ToString(int32) - IL_7d27: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7d2c: stloc.s V_8 - IL_7d2e: ldloc.s V_8 - IL_7d30: ldloc.s V_9 - IL_7d32: bgt.s IL_7d7c - - IL_7d34: ldloc.s V_10 - IL_7d36: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7d3b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7d40: stloc.s V_6 - IL_7d42: ldloc.s V_6 - IL_7d44: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7d49: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7d4e: stloc.s V_6 - IL_7d50: ldloc.s V_9 - IL_7d52: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7d57: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7d5c: stloc.s V_7 - IL_7d5e: ldloc.s V_10 - IL_7d60: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7d65: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7d6a: stloc.s V_9 - IL_7d6c: ldloc.s V_6 - IL_7d6e: call string [mscorlib]System.Convert::ToString(int32) - IL_7d73: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7d78: stloc.s V_10 - IL_7d7a: br.s IL_7dc2 - - IL_7d7c: ldloc.s V_9 - IL_7d7e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7d83: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7d88: stloc.s V_8 - IL_7d8a: ldloc.s V_8 - IL_7d8c: call string [mscorlib]System.Convert::ToString(int32) - IL_7d91: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7d96: stloc.s V_7 - IL_7d98: ldloc.s V_8 - IL_7d9a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7d9f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7da4: stloc.s V_10 - IL_7da6: ldloc.s V_7 - IL_7da8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7dad: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7db2: stloc.s V_9 - IL_7db4: ldloc.s V_9 - IL_7db6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7dbb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7dc0: stloc.s V_7 - IL_7dc2: ldloc.s V_8 - IL_7dc4: ldloc.s V_7 - IL_7dc6: beq.s IL_7e10 - - IL_7dc8: ldloc.s V_10 - IL_7dca: call string [mscorlib]System.Convert::ToString(int32) - IL_7dcf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7dd4: stloc.s V_9 - IL_7dd6: ldloc.s V_10 - IL_7dd8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7ddd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7de2: stloc.s V_7 - IL_7de4: ldloc.s V_8 - IL_7de6: call string [mscorlib]System.Convert::ToString(int32) - IL_7deb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7df0: stloc.s V_7 - IL_7df2: ldloc.s V_10 - IL_7df4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7df9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7dfe: stloc.s V_7 - IL_7e00: ldloc.s V_7 - IL_7e02: call string [mscorlib]System.Convert::ToString(int32) - IL_7e07: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7e0c: stloc.s V_7 - IL_7e0e: br.s IL_7e56 - - IL_7e10: ldloc.s V_9 - IL_7e12: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7e17: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7e1c: stloc.s V_7 - IL_7e1e: ldloc.s V_9 - IL_7e20: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7e25: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7e2a: stloc.s V_6 - IL_7e2c: ldloc.s V_6 - IL_7e2e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7e33: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7e38: stloc.s V_6 - IL_7e3a: ldloc.s V_10 - IL_7e3c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7e41: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7e46: stloc.s V_8 - IL_7e48: ldloc.s V_10 - IL_7e4a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7e4f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7e54: stloc.s V_9 - IL_7e56: ldloc.s V_9 - IL_7e58: ldloc.s V_7 - IL_7e5a: beq.s IL_7ea4 - - IL_7e5c: ldloc.s V_10 - IL_7e5e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7e63: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7e68: stloc.s V_9 - IL_7e6a: ldloc.s V_6 - IL_7e6c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7e71: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7e76: stloc.s V_6 - IL_7e78: ldloc.s V_6 - IL_7e7a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7e7f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7e84: stloc.s V_10 - IL_7e86: ldloc.s V_9 - IL_7e88: call string [mscorlib]System.Convert::ToString(int32) - IL_7e8d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7e92: stloc.s V_6 - IL_7e94: ldloc.s V_9 - IL_7e96: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7e9b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7ea0: stloc.s V_8 - IL_7ea2: br.s IL_7eea - - IL_7ea4: ldloc.s V_7 - IL_7ea6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7eab: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7eb0: stloc.s V_6 - IL_7eb2: ldloc.s V_7 - IL_7eb4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7eb9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7ebe: stloc.s V_6 - IL_7ec0: ldloc.s V_7 - IL_7ec2: call string [mscorlib]System.Convert::ToString(int32) - IL_7ec7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7ecc: stloc.s V_8 - IL_7ece: ldloc.s V_8 - IL_7ed0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7ed5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7eda: stloc.s V_10 - IL_7edc: ldloc.s V_8 - IL_7ede: call string [mscorlib]System.Convert::ToString(int32) - IL_7ee3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7ee8: stloc.s V_6 - IL_7eea: ldloc.s V_7 - IL_7eec: ldloc.s V_9 - IL_7eee: bgt.s IL_7f38 - - IL_7ef0: ldloc.s V_8 - IL_7ef2: call string [mscorlib]System.Convert::ToString(int32) - IL_7ef7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7efc: stloc.s V_8 - IL_7efe: ldloc.s V_6 - IL_7f00: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7f05: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7f0a: stloc.s V_7 - IL_7f0c: ldloc.s V_7 - IL_7f0e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7f13: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7f18: stloc.s V_9 - IL_7f1a: ldloc.s V_9 - IL_7f1c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7f21: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7f26: stloc.s V_8 - IL_7f28: ldloc.s V_6 - IL_7f2a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7f2f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7f34: stloc.s V_7 - IL_7f36: br.s IL_7f7e - - IL_7f38: ldloc.s V_6 - IL_7f3a: call string [mscorlib]System.Convert::ToString(int32) - IL_7f3f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7f44: stloc.s V_6 - IL_7f46: ldloc.s V_9 - IL_7f48: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7f4d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7f52: stloc.s V_9 - IL_7f54: ldloc.s V_8 - IL_7f56: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7f5b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7f60: stloc.s V_6 - IL_7f62: ldloc.s V_6 - IL_7f64: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7f69: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7f6e: stloc.s V_9 - IL_7f70: ldloc.s V_7 - IL_7f72: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7f77: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7f7c: stloc.s V_8 - IL_7f7e: ldloc.s V_8 - IL_7f80: ldloc.s V_7 - IL_7f82: bne.un.s IL_7fcc - - IL_7f84: ldloc.s V_9 - IL_7f86: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7f8b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7f90: stloc.s V_6 - IL_7f92: ldloc.s V_10 - IL_7f94: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7f99: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7f9e: stloc.s V_7 - IL_7fa0: ldloc.s V_9 - IL_7fa2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7fa7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7fac: stloc.s V_7 - IL_7fae: ldloc.s V_8 - IL_7fb0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7fb5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7fba: stloc.s V_10 - IL_7fbc: ldloc.s V_10 - IL_7fbe: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7fc3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7fc8: stloc.s V_9 - IL_7fca: br.s IL_8012 - - IL_7fcc: ldloc.s V_6 - IL_7fce: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7fd3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7fd8: stloc.s V_8 - IL_7fda: ldloc.s V_8 - IL_7fdc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7fe1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7fe6: stloc.s V_7 - IL_7fe8: ldloc.s V_8 - IL_7fea: call string [mscorlib]System.Convert::ToString(int32) - IL_7fef: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7ff4: stloc.s V_10 - IL_7ff6: ldloc.s V_9 - IL_7ff8: call string [mscorlib]System.Convert::ToString(int32) - IL_7ffd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8002: stloc.s V_6 - IL_8004: ldloc.s V_7 - IL_8006: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_800b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8010: stloc.s V_10 - IL_8012: ldloc.s V_9 - IL_8014: ldloc.s V_8 - IL_8016: beq.s IL_8060 - - IL_8018: ldloc.s V_6 - IL_801a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_801f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8024: stloc.s V_8 - IL_8026: ldloc.s V_8 - IL_8028: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_802d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8032: stloc.s V_7 - IL_8034: ldloc.s V_7 - IL_8036: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_803b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8040: stloc.s V_7 - IL_8042: ldloc.s V_6 - IL_8044: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8049: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_804e: stloc.s V_6 - IL_8050: ldloc.s V_10 - IL_8052: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8057: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_805c: stloc.s V_6 - IL_805e: br.s IL_80a6 - - IL_8060: ldloc.s V_10 - IL_8062: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8067: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_806c: stloc.s V_6 - IL_806e: ldloc.s V_9 - IL_8070: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8075: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_807a: stloc.s V_6 - IL_807c: ldloc.s V_8 - IL_807e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8083: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8088: stloc.s V_9 - IL_808a: ldloc.s V_7 - IL_808c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8091: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8096: stloc.s V_6 - IL_8098: ldloc.s V_7 - IL_809a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_809f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_80a4: stloc.s V_6 - IL_80a6: ldloc.s V_6 - IL_80a8: ldloc.s V_7 - IL_80aa: blt.s IL_80f4 - - IL_80ac: ldloc.s V_6 - IL_80ae: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_80b3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_80b8: stloc.s V_10 - IL_80ba: ldloc.s V_7 - IL_80bc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_80c1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_80c6: stloc.s V_10 - IL_80c8: ldloc.s V_9 - IL_80ca: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_80cf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_80d4: stloc.s V_9 - IL_80d6: ldloc.s V_8 - IL_80d8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_80dd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_80e2: stloc.s V_7 - IL_80e4: ldloc.s V_9 - IL_80e6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_80eb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_80f0: stloc.s V_8 - IL_80f2: br.s IL_813a - - IL_80f4: ldloc.s V_10 - IL_80f6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_80fb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8100: stloc.s V_10 - IL_8102: ldloc.s V_7 - IL_8104: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8109: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_810e: stloc.s V_8 - IL_8110: ldloc.s V_6 - IL_8112: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8117: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_811c: stloc.s V_10 - IL_811e: ldloc.s V_8 - IL_8120: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8125: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_812a: stloc.s V_9 - IL_812c: ldloc.s V_10 - IL_812e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8133: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8138: stloc.s V_6 - IL_813a: ldloc.s V_9 - IL_813c: ldloc.s V_6 - IL_813e: beq.s IL_8188 - - IL_8140: ldloc.s V_10 - IL_8142: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8147: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_814c: stloc.s V_10 - IL_814e: ldloc.s V_10 - IL_8150: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8155: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_815a: stloc.s V_9 - IL_815c: ldloc.s V_8 - IL_815e: call string [mscorlib]System.Convert::ToString(int32) - IL_8163: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8168: stloc.s V_9 - IL_816a: ldloc.s V_7 - IL_816c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8171: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8176: stloc.s V_10 - IL_8178: ldloc.s V_7 - IL_817a: call string [mscorlib]System.Convert::ToString(int32) - IL_817f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8184: stloc.s V_10 - IL_8186: br.s IL_81ce - - IL_8188: ldloc.s V_9 - IL_818a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_818f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8194: stloc.s V_9 - IL_8196: ldloc.s V_6 - IL_8198: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_819d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_81a2: stloc.s V_8 - IL_81a4: ldloc.s V_7 - IL_81a6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_81ab: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_81b0: stloc.s V_10 - IL_81b2: ldloc.s V_6 - IL_81b4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_81b9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_81be: stloc.s V_10 - IL_81c0: ldloc.s V_10 - IL_81c2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_81c7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_81cc: stloc.s V_9 - IL_81ce: ldloc.s V_7 - IL_81d0: ldloc.s V_6 - IL_81d2: bne.un.s IL_821c - - IL_81d4: ldloc.s V_10 - IL_81d6: call string [mscorlib]System.Convert::ToString(int32) - IL_81db: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_81e0: stloc.s V_7 - IL_81e2: ldloc.s V_9 - IL_81e4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_81e9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_81ee: stloc.s V_10 - IL_81f0: ldloc.s V_7 - IL_81f2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_81f7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_81fc: stloc.s V_10 - IL_81fe: ldloc.s V_8 - IL_8200: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8205: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_820a: stloc.s V_10 - IL_820c: ldloc.s V_8 - IL_820e: call string [mscorlib]System.Convert::ToString(int32) - IL_8213: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8218: stloc.s V_10 - IL_821a: br.s IL_8262 - - IL_821c: ldloc.s V_10 - IL_821e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8223: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8228: stloc.s V_7 - IL_822a: ldloc.s V_10 - IL_822c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8231: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8236: stloc.s V_6 - IL_8238: ldloc.s V_10 - IL_823a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_823f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8244: stloc.s V_10 - IL_8246: ldloc.s V_10 - IL_8248: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_824d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8252: stloc.s V_8 - IL_8254: ldloc.s V_6 - IL_8256: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_825b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8260: stloc.s V_10 - IL_8262: ldloc.s V_6 - IL_8264: ldloc.s V_6 - IL_8266: bgt.s IL_82b0 - - IL_8268: ldloc.s V_10 - IL_826a: call string [mscorlib]System.Convert::ToString(int32) - IL_826f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8274: stloc.s V_7 - IL_8276: ldloc.s V_6 - IL_8278: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_827d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8282: stloc.s V_7 - IL_8284: ldloc.s V_6 - IL_8286: call string [mscorlib]System.Convert::ToString(int32) - IL_828b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8290: stloc.s V_6 - IL_8292: ldloc.s V_6 - IL_8294: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8299: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_829e: stloc.s V_10 - IL_82a0: ldloc.s V_9 - IL_82a2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_82a7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_82ac: stloc.s V_9 - IL_82ae: br.s IL_82f6 - - IL_82b0: ldloc.s V_10 - IL_82b2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_82b7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_82bc: stloc.s V_8 - IL_82be: ldloc.s V_9 - IL_82c0: call string [mscorlib]System.Convert::ToString(int32) - IL_82c5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_82ca: stloc.s V_6 - IL_82cc: ldloc.s V_9 - IL_82ce: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_82d3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_82d8: stloc.s V_6 - IL_82da: ldloc.s V_7 - IL_82dc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_82e1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_82e6: stloc.s V_10 - IL_82e8: ldloc.s V_10 - IL_82ea: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_82ef: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_82f4: stloc.s V_9 - IL_82f6: ldloc.s V_7 - IL_82f8: ldloc.s V_9 - IL_82fa: bge.s IL_8344 - - IL_82fc: ldloc.s V_10 - IL_82fe: call string [mscorlib]System.Convert::ToString(int32) - IL_8303: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8308: stloc.s V_7 - IL_830a: ldloc.s V_8 - IL_830c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8311: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8316: stloc.s V_8 - IL_8318: ldloc.s V_10 - IL_831a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_831f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8324: stloc.s V_9 - IL_8326: ldloc.s V_10 - IL_8328: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_832d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8332: stloc.s V_10 - IL_8334: ldloc.s V_9 - IL_8336: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_833b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8340: stloc.s V_10 - IL_8342: br.s IL_838a - - IL_8344: ldloc.s V_8 - IL_8346: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_834b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8350: stloc.s V_6 - IL_8352: ldloc.s V_8 - IL_8354: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8359: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_835e: stloc.s V_6 - IL_8360: ldloc.s V_7 - IL_8362: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8367: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_836c: stloc.s V_7 - IL_836e: ldloc.s V_8 - IL_8370: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8375: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_837a: stloc.s V_6 - IL_837c: ldloc.s V_9 - IL_837e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8383: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8388: stloc.s V_10 - IL_838a: ldloc.s V_9 - IL_838c: ldloc.s V_8 - IL_838e: ble.s IL_83d8 - - IL_8390: ldloc.s V_9 - IL_8392: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8397: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_839c: stloc.s V_8 - IL_839e: ldloc.s V_8 - IL_83a0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_83a5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_83aa: stloc.s V_9 - IL_83ac: ldloc.s V_9 - IL_83ae: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_83b3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_83b8: stloc.s V_8 - IL_83ba: ldloc.s V_8 - IL_83bc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_83c1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_83c6: stloc.s V_10 - IL_83c8: ldloc.s V_8 - IL_83ca: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_83cf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_83d4: stloc.s V_10 - IL_83d6: br.s IL_841e - - IL_83d8: ldloc.s V_8 - IL_83da: call string [mscorlib]System.Convert::ToString(int32) - IL_83df: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_83e4: stloc.s V_8 - IL_83e6: ldloc.s V_10 - IL_83e8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_83ed: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_83f2: stloc.s V_8 - IL_83f4: ldloc.s V_7 - IL_83f6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_83fb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8400: stloc.s V_7 - IL_8402: ldloc.s V_9 - IL_8404: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8409: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_840e: stloc.s V_9 - IL_8410: ldloc.s V_9 - IL_8412: call string [mscorlib]System.Convert::ToString(int32) - IL_8417: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_841c: stloc.s V_6 - IL_841e: ldloc.s V_10 - IL_8420: ldloc.s V_8 - IL_8422: bge.s IL_846c - - IL_8424: ldloc.s V_8 - IL_8426: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_842b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8430: stloc.s V_7 - IL_8432: ldloc.s V_8 - IL_8434: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8439: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_843e: stloc.s V_6 - IL_8440: ldloc.s V_6 - IL_8442: call string [mscorlib]System.Convert::ToString(int32) - IL_8447: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_844c: stloc.s V_10 - IL_844e: ldloc.s V_10 - IL_8450: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8455: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_845a: stloc.s V_10 - IL_845c: ldloc.s V_6 - IL_845e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8463: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8468: stloc.s V_9 - IL_846a: br.s IL_84b2 - - IL_846c: ldloc.s V_8 - IL_846e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8473: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8478: stloc.s V_6 - IL_847a: ldloc.s V_7 - IL_847c: call string [mscorlib]System.Convert::ToString(int32) - IL_8481: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8486: stloc.s V_6 - IL_8488: ldloc.s V_7 - IL_848a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_848f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8494: stloc.s V_9 - IL_8496: ldloc.s V_9 - IL_8498: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_849d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_84a2: stloc.s V_7 - IL_84a4: ldloc.s V_9 - IL_84a6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_84ab: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_84b0: stloc.s V_10 - IL_84b2: ldloc.s V_8 - IL_84b4: ldloc.s V_8 - IL_84b6: beq.s IL_8500 - - IL_84b8: ldloc.s V_10 - IL_84ba: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_84bf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_84c4: stloc.s V_6 - IL_84c6: ldloc.s V_8 - IL_84c8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_84cd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_84d2: stloc.s V_6 - IL_84d4: ldloc.s V_8 - IL_84d6: call string [mscorlib]System.Convert::ToString(int32) - IL_84db: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_84e0: stloc.s V_6 - IL_84e2: ldloc.s V_9 - IL_84e4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_84e9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_84ee: stloc.s V_10 - IL_84f0: ldloc.s V_10 - IL_84f2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_84f7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_84fc: stloc.s V_8 - IL_84fe: br.s IL_8546 - - IL_8500: ldloc.s V_7 - IL_8502: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8507: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_850c: stloc.s V_8 - IL_850e: ldloc.s V_7 - IL_8510: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8515: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_851a: stloc.s V_7 - IL_851c: ldloc.s V_6 - IL_851e: call string [mscorlib]System.Convert::ToString(int32) - IL_8523: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8528: stloc.s V_6 - IL_852a: ldloc.s V_7 - IL_852c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8531: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8536: stloc.s V_6 - IL_8538: ldloc.s V_7 - IL_853a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_853f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8544: stloc.s V_9 - IL_8546: ldloc.s V_6 - IL_8548: ldloc.s V_10 - IL_854a: bge.s IL_8594 - - IL_854c: ldloc.s V_10 - IL_854e: call string [mscorlib]System.Convert::ToString(int32) - IL_8553: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8558: stloc.s V_7 - IL_855a: ldloc.s V_6 - IL_855c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8561: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8566: stloc.s V_7 - IL_8568: ldloc.s V_10 - IL_856a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_856f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8574: stloc.s V_6 - IL_8576: ldloc.s V_10 - IL_8578: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_857d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8582: stloc.s V_9 - IL_8584: ldloc.s V_6 - IL_8586: call string [mscorlib]System.Convert::ToString(int32) - IL_858b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8590: stloc.s V_9 - IL_8592: br.s IL_85da - - IL_8594: ldloc.s V_7 - IL_8596: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_859b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_85a0: stloc.s V_9 - IL_85a2: ldloc.s V_7 - IL_85a4: call string [mscorlib]System.Convert::ToString(int32) - IL_85a9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_85ae: stloc.s V_8 - IL_85b0: ldloc.s V_9 - IL_85b2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_85b7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_85bc: stloc.s V_6 - IL_85be: ldloc.s V_8 - IL_85c0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_85c5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_85ca: stloc.s V_9 - IL_85cc: ldloc.s V_8 - IL_85ce: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_85d3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_85d8: stloc.s V_6 - IL_85da: ldloc.s V_9 - IL_85dc: ldloc.s V_7 - IL_85de: bge.s IL_8628 - - IL_85e0: ldloc.s V_7 - IL_85e2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_85e7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_85ec: stloc.s V_9 - IL_85ee: ldloc.s V_6 - IL_85f0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_85f5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_85fa: stloc.s V_6 - IL_85fc: ldloc.s V_6 - IL_85fe: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8603: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8608: stloc.s V_6 - IL_860a: ldloc.s V_10 - IL_860c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8611: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8616: stloc.s V_7 - IL_8618: ldloc.s V_6 - IL_861a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_861f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8624: stloc.s V_7 - IL_8626: br.s IL_866e - - IL_8628: ldloc.s V_9 - IL_862a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_862f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8634: stloc.s V_6 - IL_8636: ldloc.s V_8 - IL_8638: call string [mscorlib]System.Convert::ToString(int32) - IL_863d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8642: stloc.s V_10 - IL_8644: ldloc.s V_9 - IL_8646: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_864b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8650: stloc.s V_8 - IL_8652: ldloc.s V_10 - IL_8654: call string [mscorlib]System.Convert::ToString(int32) - IL_8659: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_865e: stloc.s V_6 - IL_8660: ldloc.s V_9 - IL_8662: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8667: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_866c: stloc.s V_8 - IL_866e: ldloc.s V_8 - IL_8670: ldloc.s V_6 - IL_8672: blt.s IL_86bc - - IL_8674: ldloc.s V_8 - IL_8676: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_867b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8680: stloc.s V_8 - IL_8682: ldloc.s V_7 - IL_8684: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8689: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_868e: stloc.s V_10 - IL_8690: ldloc.s V_8 - IL_8692: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8697: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_869c: stloc.s V_7 - IL_869e: ldloc.s V_9 - IL_86a0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_86a5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_86aa: stloc.s V_7 - IL_86ac: ldloc.s V_8 - IL_86ae: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_86b3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_86b8: stloc.s V_10 - IL_86ba: br.s IL_8702 - - IL_86bc: ldloc.s V_8 - IL_86be: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_86c3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_86c8: stloc.s V_7 - IL_86ca: ldloc.s V_10 - IL_86cc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_86d1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_86d6: stloc.s V_10 - IL_86d8: ldloc.s V_10 - IL_86da: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_86df: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_86e4: stloc.s V_10 - IL_86e6: ldloc.s V_8 - IL_86e8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_86ed: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_86f2: stloc.s V_8 - IL_86f4: ldloc.s V_6 - IL_86f6: call string [mscorlib]System.Convert::ToString(int32) - IL_86fb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8700: stloc.s V_6 - IL_8702: ldloc.s V_10 - IL_8704: ldloc.s V_9 - IL_8706: bge.s IL_8750 - - IL_8708: ldloc.s V_8 - IL_870a: call string [mscorlib]System.Convert::ToString(int32) - IL_870f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8714: stloc.s V_9 - IL_8716: ldloc.s V_6 - IL_8718: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_871d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8722: stloc.s V_9 - IL_8724: ldloc.s V_7 - IL_8726: call string [mscorlib]System.Convert::ToString(int32) - IL_872b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8730: stloc.s V_7 - IL_8732: ldloc.s V_7 - IL_8734: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8739: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_873e: stloc.s V_10 - IL_8740: ldloc.s V_7 - IL_8742: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8747: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_874c: stloc.s V_10 - IL_874e: br.s IL_8796 - - IL_8750: ldloc.s V_10 - IL_8752: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8757: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_875c: stloc.s V_7 - IL_875e: ldloc.s V_6 - IL_8760: call string [mscorlib]System.Convert::ToString(int32) - IL_8765: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_876a: stloc.s V_7 - IL_876c: ldloc.s V_9 - IL_876e: call string [mscorlib]System.Convert::ToString(int32) - IL_8773: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8778: stloc.s V_7 - IL_877a: ldloc.s V_10 - IL_877c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8781: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8786: stloc.s V_9 - IL_8788: ldloc.s V_10 - IL_878a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_878f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8794: stloc.s V_10 - IL_8796: ldloc.s V_10 - IL_8798: ldloc.s V_6 - IL_879a: blt.s IL_87e4 - - IL_879c: ldloc.s V_9 - IL_879e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_87a3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_87a8: stloc.s V_10 - IL_87aa: ldloc.s V_9 - IL_87ac: call string [mscorlib]System.Convert::ToString(int32) - IL_87b1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_87b6: stloc.s V_6 - IL_87b8: ldloc.s V_10 - IL_87ba: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_87bf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_87c4: stloc.s V_7 - IL_87c6: ldloc.s V_10 - IL_87c8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_87cd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_87d2: stloc.s V_8 - IL_87d4: ldloc.s V_8 - IL_87d6: call string [mscorlib]System.Convert::ToString(int32) - IL_87db: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_87e0: stloc.s V_9 - IL_87e2: br.s IL_882a - - IL_87e4: ldloc.s V_7 - IL_87e6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_87eb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_87f0: stloc.s V_6 - IL_87f2: ldloc.s V_6 - IL_87f4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_87f9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_87fe: stloc.s V_6 - IL_8800: ldloc.s V_6 - IL_8802: call string [mscorlib]System.Convert::ToString(int32) - IL_8807: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_880c: stloc.s V_9 - IL_880e: ldloc.s V_10 - IL_8810: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8815: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_881a: stloc.s V_9 - IL_881c: ldloc.s V_7 - IL_881e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8823: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8828: stloc.s V_7 - IL_882a: ldloc.s V_7 - IL_882c: ldloc.s V_7 - IL_882e: bgt.s IL_8878 - - IL_8830: ldloc.s V_7 - IL_8832: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8837: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_883c: stloc.s V_7 - IL_883e: ldloc.s V_8 - IL_8840: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8845: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_884a: stloc.s V_8 - IL_884c: ldloc.s V_6 - IL_884e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8853: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8858: stloc.s V_7 - IL_885a: ldloc.s V_8 - IL_885c: call string [mscorlib]System.Convert::ToString(int32) - IL_8861: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8866: stloc.s V_6 - IL_8868: ldloc.s V_10 - IL_886a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_886f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8874: stloc.s V_10 - IL_8876: br.s IL_88be - - IL_8878: ldloc.s V_8 - IL_887a: call string [mscorlib]System.Convert::ToString(int32) - IL_887f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8884: stloc.s V_7 - IL_8886: ldloc.s V_10 - IL_8888: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_888d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8892: stloc.s V_8 - IL_8894: ldloc.s V_8 - IL_8896: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_889b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_88a0: stloc.s V_10 - IL_88a2: ldloc.s V_9 - IL_88a4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_88a9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_88ae: stloc.s V_8 - IL_88b0: ldloc.s V_10 - IL_88b2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_88b7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_88bc: stloc.s V_9 - IL_88be: ldloc.s V_6 - IL_88c0: ldloc.s V_9 - IL_88c2: bgt.s IL_890c - - IL_88c4: ldloc.s V_8 - IL_88c6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_88cb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_88d0: stloc.s V_9 - IL_88d2: ldloc.s V_8 - IL_88d4: call string [mscorlib]System.Convert::ToString(int32) - IL_88d9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_88de: stloc.s V_7 - IL_88e0: ldloc.s V_10 - IL_88e2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_88e7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_88ec: stloc.s V_10 - IL_88ee: ldloc.s V_10 - IL_88f0: call string [mscorlib]System.Convert::ToString(int32) - IL_88f5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_88fa: stloc.s V_10 - IL_88fc: ldloc.s V_6 - IL_88fe: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8903: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8908: stloc.s V_8 - IL_890a: br.s IL_8952 - - IL_890c: ldloc.s V_10 - IL_890e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8913: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8918: stloc.s V_6 - IL_891a: ldloc.s V_6 - IL_891c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8921: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8926: stloc.s V_10 - IL_8928: ldloc.s V_10 - IL_892a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_892f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8934: stloc.s V_7 - IL_8936: ldloc.s V_10 - IL_8938: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_893d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8942: stloc.s V_9 - IL_8944: ldloc.s V_6 - IL_8946: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_894b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8950: stloc.s V_10 - IL_8952: ldloc.s V_9 - IL_8954: ldloc.s V_9 - IL_8956: bge.s IL_89a0 - - IL_8958: ldloc.s V_9 - IL_895a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_895f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8964: stloc.s V_10 - IL_8966: ldloc.s V_6 - IL_8968: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_896d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8972: stloc.s V_7 - IL_8974: ldloc.s V_7 - IL_8976: call string [mscorlib]System.Convert::ToString(int32) - IL_897b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8980: stloc.s V_10 - IL_8982: ldloc.s V_9 - IL_8984: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8989: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_898e: stloc.s V_6 - IL_8990: ldloc.s V_8 - IL_8992: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8997: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_899c: stloc.s V_9 - IL_899e: br.s IL_89e6 - - IL_89a0: ldloc.s V_6 - IL_89a2: call string [mscorlib]System.Convert::ToString(int32) - IL_89a7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_89ac: stloc.s V_9 - IL_89ae: ldloc.s V_6 - IL_89b0: call string [mscorlib]System.Convert::ToString(int32) - IL_89b5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_89ba: stloc.s V_6 - IL_89bc: ldloc.s V_10 - IL_89be: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_89c3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_89c8: stloc.s V_8 - IL_89ca: ldloc.s V_9 - IL_89cc: call string [mscorlib]System.Convert::ToString(int32) - IL_89d1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_89d6: stloc.s V_9 - IL_89d8: ldloc.s V_8 - IL_89da: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_89df: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_89e4: stloc.s V_8 - IL_89e6: ldloc.s V_10 - IL_89e8: ldloc.s V_10 - IL_89ea: beq.s IL_8a34 - - IL_89ec: ldloc.s V_9 - IL_89ee: call string [mscorlib]System.Convert::ToString(int32) - IL_89f3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_89f8: stloc.s V_6 - IL_89fa: ldloc.s V_9 - IL_89fc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8a01: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8a06: stloc.s V_8 - IL_8a08: ldloc.s V_7 - IL_8a0a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8a0f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8a14: stloc.s V_9 - IL_8a16: ldloc.s V_8 - IL_8a18: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8a1d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8a22: stloc.s V_10 - IL_8a24: ldloc.s V_10 - IL_8a26: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8a2b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8a30: stloc.s V_7 - IL_8a32: br.s IL_8a7a - - IL_8a34: ldloc.s V_10 - IL_8a36: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8a3b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8a40: stloc.s V_8 - IL_8a42: ldloc.s V_10 - IL_8a44: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8a49: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8a4e: stloc.s V_10 - IL_8a50: ldloc.s V_10 - IL_8a52: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8a57: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8a5c: stloc.s V_9 - IL_8a5e: ldloc.s V_8 - IL_8a60: call string [mscorlib]System.Convert::ToString(int32) - IL_8a65: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8a6a: stloc.s V_9 - IL_8a6c: ldloc.s V_9 - IL_8a6e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8a73: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8a78: stloc.s V_7 - IL_8a7a: ldloc.s V_7 - IL_8a7c: ldloc.s V_6 - IL_8a7e: bne.un.s IL_8ac8 - - IL_8a80: ldloc.s V_7 - IL_8a82: call string [mscorlib]System.Convert::ToString(int32) - IL_8a87: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8a8c: stloc.s V_9 - IL_8a8e: ldloc.s V_10 - IL_8a90: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8a95: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8a9a: stloc.s V_9 - IL_8a9c: ldloc.s V_9 - IL_8a9e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8aa3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8aa8: stloc.s V_8 - IL_8aaa: ldloc.s V_6 - IL_8aac: call string [mscorlib]System.Convert::ToString(int32) - IL_8ab1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8ab6: stloc.s V_9 - IL_8ab8: ldloc.s V_9 - IL_8aba: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8abf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8ac4: stloc.s V_8 - IL_8ac6: br.s IL_8b0e - - IL_8ac8: ldloc.s V_10 - IL_8aca: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8acf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8ad4: stloc.s V_9 - IL_8ad6: ldloc.s V_10 - IL_8ad8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8add: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8ae2: stloc.s V_8 - IL_8ae4: ldloc.s V_8 - IL_8ae6: call string [mscorlib]System.Convert::ToString(int32) - IL_8aeb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8af0: stloc.s V_10 - IL_8af2: ldloc.s V_6 - IL_8af4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8af9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8afe: stloc.s V_10 - IL_8b00: ldloc.s V_8 - IL_8b02: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8b07: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8b0c: stloc.s V_7 - IL_8b0e: ldloc.s V_6 - IL_8b10: ldloc.s V_6 - IL_8b12: bne.un.s IL_8b5c - - IL_8b14: ldloc.s V_7 - IL_8b16: call string [mscorlib]System.Convert::ToString(int32) - IL_8b1b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8b20: stloc.s V_8 - IL_8b22: ldloc.s V_10 - IL_8b24: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8b29: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8b2e: stloc.s V_9 - IL_8b30: ldloc.s V_8 - IL_8b32: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8b37: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8b3c: stloc.s V_6 - IL_8b3e: ldloc.s V_8 - IL_8b40: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8b45: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8b4a: stloc.s V_7 - IL_8b4c: ldloc.s V_7 - IL_8b4e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8b53: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8b58: stloc.s V_9 - IL_8b5a: br.s IL_8ba2 - - IL_8b5c: ldloc.s V_8 - IL_8b5e: call string [mscorlib]System.Convert::ToString(int32) - IL_8b63: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8b68: stloc.s V_9 - IL_8b6a: ldloc.s V_7 - IL_8b6c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8b71: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8b76: stloc.s V_10 - IL_8b78: ldloc.s V_6 - IL_8b7a: call string [mscorlib]System.Convert::ToString(int32) - IL_8b7f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8b84: stloc.s V_7 - IL_8b86: ldloc.s V_8 - IL_8b88: call string [mscorlib]System.Convert::ToString(int32) - IL_8b8d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8b92: stloc.s V_9 - IL_8b94: ldloc.s V_6 - IL_8b96: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8b9b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8ba0: stloc.s V_10 - IL_8ba2: ldloc.s V_10 - IL_8ba4: ldloc.s V_9 - IL_8ba6: bge.s IL_8bf0 - - IL_8ba8: ldloc.s V_10 - IL_8baa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8baf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8bb4: stloc.s V_6 - IL_8bb6: ldloc.s V_6 - IL_8bb8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8bbd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8bc2: stloc.s V_8 - IL_8bc4: ldloc.s V_8 - IL_8bc6: call string [mscorlib]System.Convert::ToString(int32) - IL_8bcb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8bd0: stloc.s V_10 - IL_8bd2: ldloc.s V_8 - IL_8bd4: call string [mscorlib]System.Convert::ToString(int32) - IL_8bd9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8bde: stloc.s V_7 - IL_8be0: ldloc.s V_9 - IL_8be2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8be7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8bec: stloc.s V_10 - IL_8bee: br.s IL_8c36 - - IL_8bf0: ldloc.s V_9 - IL_8bf2: call string [mscorlib]System.Convert::ToString(int32) - IL_8bf7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8bfc: stloc.s V_9 - IL_8bfe: ldloc.s V_10 - IL_8c00: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8c05: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8c0a: stloc.s V_10 - IL_8c0c: ldloc.s V_10 - IL_8c0e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8c13: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8c18: stloc.s V_9 - IL_8c1a: ldloc.s V_6 - IL_8c1c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8c21: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8c26: stloc.s V_7 - IL_8c28: ldloc.s V_8 - IL_8c2a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8c2f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8c34: stloc.s V_8 - IL_8c36: ldloc.s V_10 - IL_8c38: ldloc.s V_6 - IL_8c3a: blt.s IL_8c84 - - IL_8c3c: ldloc.s V_10 - IL_8c3e: call string [mscorlib]System.Convert::ToString(int32) - IL_8c43: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8c48: stloc.s V_10 - IL_8c4a: ldloc.s V_8 - IL_8c4c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8c51: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8c56: stloc.s V_8 - IL_8c58: ldloc.s V_9 - IL_8c5a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8c5f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8c64: stloc.s V_8 - IL_8c66: ldloc.s V_10 - IL_8c68: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8c6d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8c72: stloc.s V_9 - IL_8c74: ldloc.s V_8 - IL_8c76: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8c7b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8c80: stloc.s V_8 - IL_8c82: br.s IL_8cca - - IL_8c84: ldloc.s V_7 - IL_8c86: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8c8b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8c90: stloc.s V_9 - IL_8c92: ldloc.s V_6 - IL_8c94: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8c99: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8c9e: stloc.s V_7 - IL_8ca0: ldloc.s V_10 - IL_8ca2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8ca7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8cac: stloc.s V_9 - IL_8cae: ldloc.s V_7 - IL_8cb0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8cb5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8cba: stloc.s V_6 - IL_8cbc: ldloc.s V_7 - IL_8cbe: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8cc3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8cc8: stloc.s V_10 - IL_8cca: ldloc.s V_10 - IL_8ccc: ldloc.s V_9 - IL_8cce: ble.s IL_8d18 - - IL_8cd0: ldloc.s V_8 - IL_8cd2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8cd7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8cdc: stloc.s V_8 - IL_8cde: ldloc.s V_7 - IL_8ce0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8ce5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8cea: stloc.s V_9 - IL_8cec: ldloc.s V_10 - IL_8cee: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8cf3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8cf8: stloc.s V_7 - IL_8cfa: ldloc.s V_7 - IL_8cfc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8d01: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8d06: stloc.s V_7 - IL_8d08: ldloc.s V_6 - IL_8d0a: call string [mscorlib]System.Convert::ToString(int32) - IL_8d0f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8d14: stloc.s V_10 - IL_8d16: br.s IL_8d5e - - IL_8d18: ldloc.s V_6 - IL_8d1a: call string [mscorlib]System.Convert::ToString(int32) - IL_8d1f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8d24: stloc.s V_9 - IL_8d26: ldloc.s V_8 - IL_8d28: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8d2d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8d32: stloc.s V_6 - IL_8d34: ldloc.s V_8 - IL_8d36: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8d3b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8d40: stloc.s V_6 - IL_8d42: ldloc.s V_6 - IL_8d44: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8d49: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8d4e: stloc.s V_6 - IL_8d50: ldloc.s V_8 - IL_8d52: call string [mscorlib]System.Convert::ToString(int32) - IL_8d57: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8d5c: stloc.s V_7 - IL_8d5e: ldloc.s V_8 - IL_8d60: ldloc.s V_6 - IL_8d62: blt.s IL_8dac - - IL_8d64: ldloc.s V_9 - IL_8d66: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8d6b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8d70: stloc.s V_6 - IL_8d72: ldloc.s V_9 - IL_8d74: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8d79: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8d7e: stloc.s V_6 - IL_8d80: ldloc.s V_6 - IL_8d82: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8d87: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8d8c: stloc.s V_6 - IL_8d8e: ldloc.s V_6 - IL_8d90: call string [mscorlib]System.Convert::ToString(int32) - IL_8d95: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8d9a: stloc.s V_6 - IL_8d9c: ldloc.s V_8 - IL_8d9e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8da3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8da8: stloc.s V_9 - IL_8daa: br.s IL_8df2 - - IL_8dac: ldloc.s V_9 - IL_8dae: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8db3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8db8: stloc.s V_7 - IL_8dba: ldloc.s V_9 - IL_8dbc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8dc1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8dc6: stloc.s V_6 - IL_8dc8: ldloc.s V_6 - IL_8dca: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8dcf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8dd4: stloc.s V_7 - IL_8dd6: ldloc.s V_10 - IL_8dd8: call string [mscorlib]System.Convert::ToString(int32) - IL_8ddd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8de2: stloc.s V_6 - IL_8de4: ldloc.s V_9 - IL_8de6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8deb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8df0: stloc.s V_6 - IL_8df2: ldloc.s V_10 - IL_8df4: ldloc.s V_8 - IL_8df6: bgt.s IL_8e40 - - IL_8df8: ldloc.s V_9 - IL_8dfa: call string [mscorlib]System.Convert::ToString(int32) - IL_8dff: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8e04: stloc.s V_6 - IL_8e06: ldloc.s V_9 - IL_8e08: call string [mscorlib]System.Convert::ToString(int32) - IL_8e0d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8e12: stloc.s V_7 - IL_8e14: ldloc.s V_10 - IL_8e16: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8e1b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8e20: stloc.s V_7 - IL_8e22: ldloc.s V_8 - IL_8e24: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8e29: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8e2e: stloc.s V_7 - IL_8e30: ldloc.s V_7 - IL_8e32: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8e37: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8e3c: stloc.s V_7 - IL_8e3e: br.s IL_8e86 - - IL_8e40: ldloc.s V_7 - IL_8e42: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8e47: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8e4c: stloc.s V_9 - IL_8e4e: ldloc.s V_7 - IL_8e50: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8e55: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8e5a: stloc.s V_9 - IL_8e5c: ldloc.s V_9 - IL_8e5e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8e63: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8e68: stloc.s V_7 - IL_8e6a: ldloc.s V_7 - IL_8e6c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8e71: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8e76: stloc.s V_8 - IL_8e78: ldloc.s V_6 - IL_8e7a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8e7f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8e84: stloc.s V_10 - IL_8e86: ldloc.s V_8 - IL_8e88: ldloc.s V_9 - IL_8e8a: blt.s IL_8ed4 - - IL_8e8c: ldloc.s V_8 - IL_8e8e: call string [mscorlib]System.Convert::ToString(int32) - IL_8e93: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8e98: stloc.s V_8 - IL_8e9a: ldloc.s V_9 - IL_8e9c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8ea1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8ea6: stloc.s V_9 - IL_8ea8: ldloc.s V_6 - IL_8eaa: call string [mscorlib]System.Convert::ToString(int32) - IL_8eaf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8eb4: stloc.s V_6 - IL_8eb6: ldloc.s V_8 - IL_8eb8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8ebd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8ec2: stloc.s V_9 - IL_8ec4: ldloc.s V_7 - IL_8ec6: call string [mscorlib]System.Convert::ToString(int32) - IL_8ecb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8ed0: stloc.s V_8 - IL_8ed2: br.s IL_8f1a - - IL_8ed4: ldloc.s V_6 - IL_8ed6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8edb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8ee0: stloc.s V_9 - IL_8ee2: ldloc.s V_9 - IL_8ee4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8ee9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8eee: stloc.s V_7 - IL_8ef0: ldloc.s V_10 - IL_8ef2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8ef7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8efc: stloc.s V_7 - IL_8efe: ldloc.s V_8 - IL_8f00: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8f05: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8f0a: stloc.s V_10 - IL_8f0c: ldloc.s V_6 - IL_8f0e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8f13: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8f18: stloc.s V_7 - IL_8f1a: ldloc.s V_10 - IL_8f1c: ldloc.s V_8 - IL_8f1e: bne.un.s IL_8f68 - - IL_8f20: ldloc.s V_10 - IL_8f22: call string [mscorlib]System.Convert::ToString(int32) - IL_8f27: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8f2c: stloc.s V_10 - IL_8f2e: ldloc.s V_6 - IL_8f30: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8f35: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8f3a: stloc.s V_9 - IL_8f3c: ldloc.s V_8 - IL_8f3e: call string [mscorlib]System.Convert::ToString(int32) - IL_8f43: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8f48: stloc.s V_9 - IL_8f4a: ldloc.s V_10 - IL_8f4c: call string [mscorlib]System.Convert::ToString(int32) - IL_8f51: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8f56: stloc.s V_6 - IL_8f58: ldloc.s V_7 - IL_8f5a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8f5f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8f64: stloc.s V_7 - IL_8f66: br.s IL_8fae - - IL_8f68: ldloc.s V_7 - IL_8f6a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8f6f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8f74: stloc.s V_6 - IL_8f76: ldloc.s V_9 - IL_8f78: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8f7d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8f82: stloc.s V_6 - IL_8f84: ldloc.s V_9 - IL_8f86: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8f8b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8f90: stloc.s V_10 - IL_8f92: ldloc.s V_6 - IL_8f94: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8f99: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8f9e: stloc.s V_9 - IL_8fa0: ldloc.s V_7 - IL_8fa2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8fa7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8fac: stloc.s V_7 - IL_8fae: ldloc.s V_10 - IL_8fb0: ldloc.s V_10 - IL_8fb2: ble.s IL_8ffc - - IL_8fb4: ldloc.s V_6 - IL_8fb6: call string [mscorlib]System.Convert::ToString(int32) - IL_8fbb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8fc0: stloc.s V_10 - IL_8fc2: ldloc.s V_8 - IL_8fc4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8fc9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8fce: stloc.s V_8 - IL_8fd0: ldloc.s V_7 - IL_8fd2: call string [mscorlib]System.Convert::ToString(int32) - IL_8fd7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8fdc: stloc.s V_6 - IL_8fde: ldloc.s V_7 - IL_8fe0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8fe5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8fea: stloc.s V_6 - IL_8fec: ldloc.s V_9 - IL_8fee: call string [mscorlib]System.Convert::ToString(int32) - IL_8ff3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8ff8: stloc.s V_10 - IL_8ffa: br.s IL_9042 - - IL_8ffc: ldloc.s V_7 - IL_8ffe: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9003: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9008: stloc.s V_6 - IL_900a: ldloc.s V_10 - IL_900c: call string [mscorlib]System.Convert::ToString(int32) - IL_9011: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9016: stloc.s V_9 - IL_9018: ldloc.s V_7 - IL_901a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_901f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9024: stloc.s V_9 - IL_9026: ldloc.s V_6 - IL_9028: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_902d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9032: stloc.s V_7 - IL_9034: ldloc.s V_10 - IL_9036: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_903b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9040: stloc.s V_10 - IL_9042: ldloc.s V_6 - IL_9044: ldloc.s V_8 - IL_9046: bge.s IL_9090 - - IL_9048: ldloc.s V_8 - IL_904a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_904f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9054: stloc.s V_10 - IL_9056: ldloc.s V_7 - IL_9058: call string [mscorlib]System.Convert::ToString(int32) - IL_905d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9062: stloc.s V_7 - IL_9064: ldloc.s V_7 - IL_9066: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_906b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9070: stloc.s V_10 - IL_9072: ldloc.s V_7 - IL_9074: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9079: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_907e: stloc.s V_8 - IL_9080: ldloc.s V_6 - IL_9082: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9087: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_908c: stloc.s V_7 - IL_908e: br.s IL_90d6 - - IL_9090: ldloc.s V_8 - IL_9092: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9097: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_909c: stloc.s V_8 - IL_909e: ldloc.s V_7 - IL_90a0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_90a5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_90aa: stloc.s V_6 - IL_90ac: ldloc.s V_9 - IL_90ae: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_90b3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_90b8: stloc.s V_6 - IL_90ba: ldloc.s V_10 - IL_90bc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_90c1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_90c6: stloc.s V_9 - IL_90c8: ldloc.s V_7 - IL_90ca: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_90cf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_90d4: stloc.s V_8 - IL_90d6: ldloc.s V_10 - IL_90d8: ldloc.s V_10 - IL_90da: blt.s IL_9124 - - IL_90dc: ldloc.s V_8 - IL_90de: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_90e3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_90e8: stloc.s V_9 - IL_90ea: ldloc.s V_9 - IL_90ec: call string [mscorlib]System.Convert::ToString(int32) - IL_90f1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_90f6: stloc.s V_6 - IL_90f8: ldloc.s V_9 - IL_90fa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_90ff: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9104: stloc.s V_10 - IL_9106: ldloc.s V_6 - IL_9108: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_910d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9112: stloc.s V_8 - IL_9114: ldloc.s V_7 - IL_9116: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_911b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9120: stloc.s V_6 - IL_9122: br.s IL_916a - - IL_9124: ldloc.s V_6 - IL_9126: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_912b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9130: stloc.s V_6 - IL_9132: ldloc.s V_9 - IL_9134: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9139: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_913e: stloc.s V_7 - IL_9140: ldloc.s V_6 - IL_9142: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9147: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_914c: stloc.s V_7 - IL_914e: ldloc.s V_7 - IL_9150: call string [mscorlib]System.Convert::ToString(int32) - IL_9155: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_915a: stloc.s V_10 - IL_915c: ldloc.s V_10 - IL_915e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9163: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9168: stloc.s V_7 - IL_916a: ldloc.s V_6 - IL_916c: ldloc.s V_10 - IL_916e: ble.s IL_91b8 - - IL_9170: ldloc.s V_9 - IL_9172: call string [mscorlib]System.Convert::ToString(int32) - IL_9177: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_917c: stloc.s V_8 - IL_917e: ldloc.s V_8 - IL_9180: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9185: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_918a: stloc.s V_9 - IL_918c: ldloc.s V_8 - IL_918e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9193: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9198: stloc.s V_10 - IL_919a: ldloc.s V_10 - IL_919c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_91a1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_91a6: stloc.s V_8 - IL_91a8: ldloc.s V_8 - IL_91aa: call string [mscorlib]System.Convert::ToString(int32) - IL_91af: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_91b4: stloc.s V_8 - IL_91b6: br.s IL_91fe - - IL_91b8: ldloc.s V_9 - IL_91ba: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_91bf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_91c4: stloc.s V_9 - IL_91c6: ldloc.s V_9 - IL_91c8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_91cd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_91d2: stloc.s V_7 - IL_91d4: ldloc.s V_6 - IL_91d6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_91db: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_91e0: stloc.s V_7 - IL_91e2: ldloc.s V_6 - IL_91e4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_91e9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_91ee: stloc.s V_7 - IL_91f0: ldloc.s V_8 - IL_91f2: call string [mscorlib]System.Convert::ToString(int32) - IL_91f7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_91fc: stloc.s V_7 - IL_91fe: ldloc.s V_8 - IL_9200: ldloc.s V_7 - IL_9202: bne.un.s IL_924c - - IL_9204: ldloc.s V_6 - IL_9206: call string [mscorlib]System.Convert::ToString(int32) - IL_920b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9210: stloc.s V_6 - IL_9212: ldloc.s V_7 - IL_9214: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9219: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_921e: stloc.s V_8 - IL_9220: ldloc.s V_6 - IL_9222: call string [mscorlib]System.Convert::ToString(int32) - IL_9227: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_922c: stloc.s V_8 - IL_922e: ldloc.s V_8 - IL_9230: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9235: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_923a: stloc.s V_7 - IL_923c: ldloc.s V_6 - IL_923e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9243: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9248: stloc.s V_6 - IL_924a: br.s IL_9292 - - IL_924c: ldloc.s V_6 - IL_924e: call string [mscorlib]System.Convert::ToString(int32) - IL_9253: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9258: stloc.s V_10 - IL_925a: ldloc.s V_10 - IL_925c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9261: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9266: stloc.s V_7 - IL_9268: ldloc.s V_7 - IL_926a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_926f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9274: stloc.s V_7 - IL_9276: ldloc.s V_10 - IL_9278: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_927d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9282: stloc.s V_9 - IL_9284: ldloc.s V_8 - IL_9286: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_928b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9290: stloc.s V_8 - IL_9292: ldloc.s V_10 - IL_9294: ldloc.s V_10 - IL_9296: beq.s IL_92e0 - - IL_9298: ldloc.s V_6 - IL_929a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_929f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_92a4: stloc.s V_9 - IL_92a6: ldloc.s V_10 - IL_92a8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_92ad: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_92b2: stloc.s V_7 - IL_92b4: ldloc.s V_9 - IL_92b6: call string [mscorlib]System.Convert::ToString(int32) - IL_92bb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_92c0: stloc.s V_7 - IL_92c2: ldloc.s V_8 - IL_92c4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_92c9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_92ce: stloc.s V_8 - IL_92d0: ldloc.s V_10 - IL_92d2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_92d7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_92dc: stloc.s V_9 - IL_92de: br.s IL_9326 - - IL_92e0: ldloc.s V_10 - IL_92e2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_92e7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_92ec: stloc.s V_10 - IL_92ee: ldloc.s V_9 - IL_92f0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_92f5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_92fa: stloc.s V_8 - IL_92fc: ldloc.s V_7 - IL_92fe: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9303: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9308: stloc.s V_7 - IL_930a: ldloc.s V_7 - IL_930c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9311: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9316: stloc.s V_9 - IL_9318: ldloc.s V_6 - IL_931a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_931f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9324: stloc.s V_7 - IL_9326: ldloc.s V_7 - IL_9328: ldloc.s V_10 - IL_932a: bne.un.s IL_9374 - - IL_932c: ldloc.s V_10 - IL_932e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9333: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9338: stloc.s V_8 - IL_933a: ldloc.s V_9 - IL_933c: call string [mscorlib]System.Convert::ToString(int32) - IL_9341: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9346: stloc.s V_6 - IL_9348: ldloc.s V_6 - IL_934a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_934f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9354: stloc.s V_7 - IL_9356: ldloc.s V_7 - IL_9358: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_935d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9362: stloc.s V_7 - IL_9364: ldloc.s V_10 - IL_9366: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_936b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9370: stloc.s V_10 - IL_9372: br.s IL_93ba - - IL_9374: ldloc.s V_6 - IL_9376: call string [mscorlib]System.Convert::ToString(int32) - IL_937b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9380: stloc.s V_10 - IL_9382: ldloc.s V_7 - IL_9384: call string [mscorlib]System.Convert::ToString(int32) - IL_9389: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_938e: stloc.s V_8 - IL_9390: ldloc.s V_8 - IL_9392: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9397: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_939c: stloc.s V_6 - IL_939e: ldloc.s V_7 - IL_93a0: call string [mscorlib]System.Convert::ToString(int32) - IL_93a5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_93aa: stloc.s V_9 - IL_93ac: ldloc.s V_8 - IL_93ae: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_93b3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_93b8: stloc.s V_8 - IL_93ba: ldloc.s V_9 - IL_93bc: ldloc.s V_9 - IL_93be: bgt.s IL_9408 - - IL_93c0: ldloc.s V_6 - IL_93c2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_93c7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_93cc: stloc.s V_8 - IL_93ce: ldloc.s V_9 - IL_93d0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_93d5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_93da: stloc.s V_10 - IL_93dc: ldloc.s V_8 - IL_93de: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_93e3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_93e8: stloc.s V_7 - IL_93ea: ldloc.s V_6 - IL_93ec: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_93f1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_93f6: stloc.s V_9 - IL_93f8: ldloc.s V_9 - IL_93fa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_93ff: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9404: stloc.s V_6 - IL_9406: br.s IL_944e - - IL_9408: ldloc.s V_9 - IL_940a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_940f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9414: stloc.s V_8 - IL_9416: ldloc.s V_9 - IL_9418: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_941d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9422: stloc.s V_10 - IL_9424: ldloc.s V_10 - IL_9426: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_942b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9430: stloc.s V_9 - IL_9432: ldloc.s V_6 - IL_9434: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9439: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_943e: stloc.s V_8 - IL_9440: ldloc.s V_10 - IL_9442: call string [mscorlib]System.Convert::ToString(int32) - IL_9447: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_944c: stloc.s V_7 - IL_944e: ldloc.s V_9 - IL_9450: ldloc.s V_6 - IL_9452: bgt.s IL_949c - - IL_9454: ldloc.s V_10 - IL_9456: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_945b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9460: stloc.s V_8 - IL_9462: ldloc.s V_8 - IL_9464: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9469: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_946e: stloc.s V_9 - IL_9470: ldloc.s V_7 - IL_9472: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9477: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_947c: stloc.s V_7 - IL_947e: ldloc.s V_7 - IL_9480: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9485: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_948a: stloc.s V_10 - IL_948c: ldloc.s V_8 - IL_948e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9493: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9498: stloc.s V_8 - IL_949a: br.s IL_94e2 - - IL_949c: ldloc.s V_9 - IL_949e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_94a3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_94a8: stloc.s V_8 - IL_94aa: ldloc.s V_8 - IL_94ac: call string [mscorlib]System.Convert::ToString(int32) - IL_94b1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_94b6: stloc.s V_10 - IL_94b8: ldloc.s V_8 - IL_94ba: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_94bf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_94c4: stloc.s V_6 - IL_94c6: ldloc.s V_8 - IL_94c8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_94cd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_94d2: stloc.s V_7 - IL_94d4: ldloc.s V_8 - IL_94d6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_94db: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_94e0: stloc.s V_9 - IL_94e2: ldloc.s V_6 - IL_94e4: ldloc.s V_7 - IL_94e6: bne.un.s IL_9530 - - IL_94e8: ldloc.s V_9 - IL_94ea: call string [mscorlib]System.Convert::ToString(int32) - IL_94ef: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_94f4: stloc.s V_10 - IL_94f6: ldloc.s V_7 - IL_94f8: call string [mscorlib]System.Convert::ToString(int32) - IL_94fd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9502: stloc.s V_10 - IL_9504: ldloc.s V_10 - IL_9506: call string [mscorlib]System.Convert::ToString(int32) - IL_950b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9510: stloc.s V_6 - IL_9512: ldloc.s V_6 - IL_9514: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9519: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_951e: stloc.s V_8 - IL_9520: ldloc.s V_10 - IL_9522: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9527: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_952c: stloc.s V_8 - IL_952e: br.s IL_9576 - - IL_9530: ldloc.s V_8 - IL_9532: call string [mscorlib]System.Convert::ToString(int32) - IL_9537: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_953c: stloc.s V_8 - IL_953e: ldloc.s V_10 - IL_9540: call string [mscorlib]System.Convert::ToString(int32) - IL_9545: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_954a: stloc.s V_6 - IL_954c: ldloc.s V_7 - IL_954e: call string [mscorlib]System.Convert::ToString(int32) - IL_9553: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9558: stloc.s V_9 - IL_955a: ldloc.s V_8 - IL_955c: call string [mscorlib]System.Convert::ToString(int32) - IL_9561: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9566: stloc.s V_7 - IL_9568: ldloc.s V_7 - IL_956a: call string [mscorlib]System.Convert::ToString(int32) - IL_956f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9574: stloc.s V_6 - IL_9576: ldloc.s V_6 - IL_9578: ldloc.s V_8 - IL_957a: bne.un.s IL_95c4 - - IL_957c: ldloc.s V_10 - IL_957e: call string [mscorlib]System.Convert::ToString(int32) - IL_9583: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9588: stloc.s V_6 - IL_958a: ldloc.s V_8 - IL_958c: call string [mscorlib]System.Convert::ToString(int32) - IL_9591: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9596: stloc.s V_10 - IL_9598: ldloc.s V_6 - IL_959a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_959f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_95a4: stloc.s V_7 - IL_95a6: ldloc.s V_6 - IL_95a8: call string [mscorlib]System.Convert::ToString(int32) - IL_95ad: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_95b2: stloc.s V_8 - IL_95b4: ldloc.s V_8 - IL_95b6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_95bb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_95c0: stloc.s V_8 - IL_95c2: br.s IL_960a - - IL_95c4: ldloc.s V_7 - IL_95c6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_95cb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_95d0: stloc.s V_8 - IL_95d2: ldloc.s V_7 - IL_95d4: call string [mscorlib]System.Convert::ToString(int32) - IL_95d9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_95de: stloc.s V_6 - IL_95e0: ldloc.s V_6 - IL_95e2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_95e7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_95ec: stloc.s V_8 - IL_95ee: ldloc.s V_6 - IL_95f0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_95f5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_95fa: stloc.s V_7 - IL_95fc: ldloc.s V_10 - IL_95fe: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9603: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9608: stloc.s V_9 - IL_960a: ldloc.s V_9 - IL_960c: ldloc.s V_9 - IL_960e: bgt.s IL_9658 - - IL_9610: ldloc.s V_7 - IL_9612: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9617: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_961c: stloc.s V_8 - IL_961e: ldloc.s V_6 - IL_9620: call string [mscorlib]System.Convert::ToString(int32) - IL_9625: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_962a: stloc.s V_6 - IL_962c: ldloc.s V_10 - IL_962e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9633: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9638: stloc.s V_10 - IL_963a: ldloc.s V_10 - IL_963c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9641: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9646: stloc.s V_10 - IL_9648: ldloc.s V_10 - IL_964a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_964f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9654: stloc.s V_6 - IL_9656: br.s IL_969e - - IL_9658: ldloc.s V_9 - IL_965a: call string [mscorlib]System.Convert::ToString(int32) - IL_965f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9664: stloc.s V_10 - IL_9666: ldloc.s V_9 - IL_9668: call string [mscorlib]System.Convert::ToString(int32) - IL_966d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9672: stloc.s V_6 - IL_9674: ldloc.s V_8 - IL_9676: call string [mscorlib]System.Convert::ToString(int32) - IL_967b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9680: stloc.s V_6 - IL_9682: ldloc.s V_7 - IL_9684: call string [mscorlib]System.Convert::ToString(int32) - IL_9689: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_968e: stloc.s V_9 - IL_9690: ldloc.s V_6 - IL_9692: call string [mscorlib]System.Convert::ToString(int32) - IL_9697: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_969c: stloc.s V_8 - IL_969e: ldloc.s V_6 - IL_96a0: ldloc.s V_10 - IL_96a2: bge.s IL_96ec - - IL_96a4: ldloc.s V_7 - IL_96a6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_96ab: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_96b0: stloc.s V_8 - IL_96b2: ldloc.s V_8 - IL_96b4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_96b9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_96be: stloc.s V_7 - IL_96c0: ldloc.s V_9 - IL_96c2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_96c7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_96cc: stloc.s V_7 - IL_96ce: ldloc.s V_6 - IL_96d0: call string [mscorlib]System.Convert::ToString(int32) - IL_96d5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_96da: stloc.s V_8 - IL_96dc: ldloc.s V_9 - IL_96de: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_96e3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_96e8: stloc.s V_6 - IL_96ea: br.s IL_9732 - - IL_96ec: ldloc.s V_7 - IL_96ee: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_96f3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_96f8: stloc.s V_7 - IL_96fa: ldloc.s V_6 - IL_96fc: call string [mscorlib]System.Convert::ToString(int32) - IL_9701: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9706: stloc.s V_7 - IL_9708: ldloc.s V_10 - IL_970a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_970f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9714: stloc.s V_6 - IL_9716: ldloc.s V_6 - IL_9718: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_971d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9722: stloc.s V_10 - IL_9724: ldloc.s V_6 - IL_9726: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_972b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9730: stloc.s V_10 - IL_9732: ldloc.s V_8 - IL_9734: ldloc.s V_6 - IL_9736: bne.un.s IL_9780 - - IL_9738: ldloc.s V_9 - IL_973a: call string [mscorlib]System.Convert::ToString(int32) - IL_973f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9744: stloc.s V_6 - IL_9746: ldloc.s V_7 - IL_9748: call string [mscorlib]System.Convert::ToString(int32) - IL_974d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9752: stloc.s V_8 - IL_9754: ldloc.s V_7 - IL_9756: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_975b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9760: stloc.s V_6 - IL_9762: ldloc.s V_6 - IL_9764: call string [mscorlib]System.Convert::ToString(int32) - IL_9769: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_976e: stloc.s V_10 - IL_9770: ldloc.s V_7 - IL_9772: call string [mscorlib]System.Convert::ToString(int32) - IL_9777: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_977c: stloc.s V_7 - IL_977e: br.s IL_97c6 - - IL_9780: ldloc.s V_10 - IL_9782: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9787: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_978c: stloc.s V_8 - IL_978e: ldloc.s V_8 - IL_9790: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9795: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_979a: stloc.s V_9 - IL_979c: ldloc.s V_9 - IL_979e: call string [mscorlib]System.Convert::ToString(int32) - IL_97a3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_97a8: stloc.s V_9 - IL_97aa: ldloc.s V_6 - IL_97ac: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_97b1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_97b6: stloc.s V_8 - IL_97b8: ldloc.s V_10 - IL_97ba: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_97bf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_97c4: stloc.s V_7 - IL_97c6: ldloc.s V_9 - IL_97c8: ldloc.s V_6 - IL_97ca: bgt.s IL_9814 - - IL_97cc: ldloc.s V_9 - IL_97ce: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_97d3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_97d8: stloc.s V_6 - IL_97da: ldloc.s V_6 - IL_97dc: call string [mscorlib]System.Convert::ToString(int32) - IL_97e1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_97e6: stloc.s V_10 - IL_97e8: ldloc.s V_9 - IL_97ea: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_97ef: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_97f4: stloc.s V_6 - IL_97f6: ldloc.s V_9 - IL_97f8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_97fd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9802: stloc.s V_9 - IL_9804: ldloc.s V_9 - IL_9806: call string [mscorlib]System.Convert::ToString(int32) - IL_980b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9810: stloc.s V_10 - IL_9812: br.s IL_985a - - IL_9814: ldloc.s V_6 - IL_9816: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_981b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9820: stloc.s V_10 - IL_9822: ldloc.s V_8 - IL_9824: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9829: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_982e: stloc.s V_7 - IL_9830: ldloc.s V_10 - IL_9832: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9837: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_983c: stloc.s V_8 - IL_983e: ldloc.s V_6 - IL_9840: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9845: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_984a: stloc.s V_6 - IL_984c: ldloc.s V_7 - IL_984e: call string [mscorlib]System.Convert::ToString(int32) - IL_9853: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9858: stloc.s V_6 - IL_985a: ldloc.s V_7 - IL_985c: ldloc.s V_10 - IL_985e: blt.s IL_98a8 - - IL_9860: ldloc.s V_8 - IL_9862: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9867: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_986c: stloc.s V_6 - IL_986e: ldloc.s V_8 - IL_9870: call string [mscorlib]System.Convert::ToString(int32) - IL_9875: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_987a: stloc.s V_8 - IL_987c: ldloc.s V_10 - IL_987e: call string [mscorlib]System.Convert::ToString(int32) - IL_9883: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9888: stloc.s V_9 - IL_988a: ldloc.s V_8 - IL_988c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9891: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9896: stloc.s V_9 - IL_9898: ldloc.s V_10 - IL_989a: call string [mscorlib]System.Convert::ToString(int32) - IL_989f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_98a4: stloc.s V_10 - IL_98a6: br.s IL_98ee - - IL_98a8: ldloc.s V_6 - IL_98aa: call string [mscorlib]System.Convert::ToString(int32) - IL_98af: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_98b4: stloc.s V_7 - IL_98b6: ldloc.s V_9 - IL_98b8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_98bd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_98c2: stloc.s V_10 - IL_98c4: ldloc.s V_10 - IL_98c6: call string [mscorlib]System.Convert::ToString(int32) - IL_98cb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_98d0: stloc.s V_8 - IL_98d2: ldloc.s V_9 - IL_98d4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_98d9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_98de: stloc.s V_9 - IL_98e0: ldloc.s V_8 - IL_98e2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_98e7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_98ec: stloc.s V_6 - IL_98ee: ldloc.s V_7 - IL_98f0: ldloc.s V_10 - IL_98f2: blt.s IL_993c - - IL_98f4: ldloc.s V_8 - IL_98f6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_98fb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9900: stloc.s V_10 - IL_9902: ldloc.s V_9 - IL_9904: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9909: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_990e: stloc.s V_7 - IL_9910: ldloc.s V_7 - IL_9912: call string [mscorlib]System.Convert::ToString(int32) - IL_9917: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_991c: stloc.s V_8 - IL_991e: ldloc.s V_7 - IL_9920: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9925: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_992a: stloc.s V_8 - IL_992c: ldloc.s V_7 - IL_992e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9933: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9938: stloc.s V_8 - IL_993a: br.s IL_9982 - - IL_993c: ldloc.s V_7 - IL_993e: call string [mscorlib]System.Convert::ToString(int32) - IL_9943: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9948: stloc.s V_7 - IL_994a: ldloc.s V_10 - IL_994c: call string [mscorlib]System.Convert::ToString(int32) - IL_9951: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9956: stloc.s V_6 - IL_9958: ldloc.s V_8 - IL_995a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_995f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9964: stloc.s V_7 - IL_9966: ldloc.s V_9 - IL_9968: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_996d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9972: stloc.s V_8 - IL_9974: ldloc.s V_9 - IL_9976: call string [mscorlib]System.Convert::ToString(int32) - IL_997b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9980: stloc.s V_10 - IL_9982: ldloc.s V_7 - IL_9984: ldloc.s V_9 - IL_9986: bgt.s IL_99d0 - - IL_9988: ldloc.s V_10 - IL_998a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_998f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9994: stloc.s V_8 - IL_9996: ldloc.s V_6 - IL_9998: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_999d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_99a2: stloc.s V_7 - IL_99a4: ldloc.s V_9 - IL_99a6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_99ab: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_99b0: stloc.s V_7 - IL_99b2: ldloc.s V_10 - IL_99b4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_99b9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_99be: stloc.s V_8 - IL_99c0: ldloc.s V_8 - IL_99c2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_99c7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_99cc: stloc.s V_9 - IL_99ce: br.s IL_9a16 - - IL_99d0: ldloc.s V_7 - IL_99d2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_99d7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_99dc: stloc.s V_7 - IL_99de: ldloc.s V_9 - IL_99e0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_99e5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_99ea: stloc.s V_6 - IL_99ec: ldloc.s V_7 - IL_99ee: call string [mscorlib]System.Convert::ToString(int32) - IL_99f3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_99f8: stloc.s V_6 - IL_99fa: ldloc.s V_9 - IL_99fc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9a01: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9a06: stloc.s V_6 - IL_9a08: ldloc.s V_10 - IL_9a0a: call string [mscorlib]System.Convert::ToString(int32) - IL_9a0f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9a14: stloc.s V_6 - IL_9a16: ldloc.s V_10 - IL_9a18: ldloc.s V_8 - IL_9a1a: blt.s IL_9a64 - - IL_9a1c: ldloc.s V_7 - IL_9a1e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9a23: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9a28: stloc.s V_8 - IL_9a2a: ldloc.s V_8 - IL_9a2c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9a31: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9a36: stloc.s V_8 - IL_9a38: ldloc.s V_7 - IL_9a3a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9a3f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9a44: stloc.s V_6 - IL_9a46: ldloc.s V_7 - IL_9a48: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9a4d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9a52: stloc.s V_6 - IL_9a54: ldloc.s V_9 - IL_9a56: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9a5b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9a60: stloc.s V_9 - IL_9a62: br.s IL_9aaa - - IL_9a64: ldloc.s V_10 - IL_9a66: call string [mscorlib]System.Convert::ToString(int32) - IL_9a6b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9a70: stloc.s V_6 - IL_9a72: ldloc.s V_6 - IL_9a74: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9a79: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9a7e: stloc.s V_8 - IL_9a80: ldloc.s V_8 - IL_9a82: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9a87: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9a8c: stloc.s V_10 - IL_9a8e: ldloc.s V_7 - IL_9a90: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9a95: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9a9a: stloc.s V_8 - IL_9a9c: ldloc.s V_9 - IL_9a9e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9aa3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9aa8: stloc.s V_8 - IL_9aaa: ldloc.s V_10 - IL_9aac: ldloc.s V_6 - IL_9aae: bne.un.s IL_9af8 - - IL_9ab0: ldloc.s V_6 - IL_9ab2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9ab7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9abc: stloc.s V_8 - IL_9abe: ldloc.s V_10 - IL_9ac0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9ac5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9aca: stloc.s V_7 - IL_9acc: ldloc.s V_8 - IL_9ace: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9ad3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9ad8: stloc.s V_9 - IL_9ada: ldloc.s V_10 - IL_9adc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9ae1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9ae6: stloc.s V_8 - IL_9ae8: ldloc.s V_10 - IL_9aea: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9aef: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9af4: stloc.s V_6 - IL_9af6: br.s IL_9b3e - - IL_9af8: ldloc.s V_6 - IL_9afa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9aff: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9b04: stloc.s V_6 - IL_9b06: ldloc.s V_9 - IL_9b08: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9b0d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9b12: stloc.s V_6 - IL_9b14: ldloc.s V_9 - IL_9b16: call string [mscorlib]System.Convert::ToString(int32) - IL_9b1b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9b20: stloc.s V_7 - IL_9b22: ldloc.s V_9 - IL_9b24: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9b29: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9b2e: stloc.s V_9 - IL_9b30: ldloc.s V_8 - IL_9b32: call string [mscorlib]System.Convert::ToString(int32) - IL_9b37: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9b3c: stloc.s V_7 - IL_9b3e: ldloc.s V_8 - IL_9b40: ldloc.s V_10 - IL_9b42: bgt.s IL_9b8c - - IL_9b44: ldloc.s V_9 - IL_9b46: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9b4b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9b50: stloc.s V_7 - IL_9b52: ldloc.s V_9 - IL_9b54: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9b59: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9b5e: stloc.s V_8 - IL_9b60: ldloc.s V_7 - IL_9b62: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9b67: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9b6c: stloc.s V_6 - IL_9b6e: ldloc.s V_8 - IL_9b70: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9b75: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9b7a: stloc.s V_9 - IL_9b7c: ldloc.s V_9 - IL_9b7e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9b83: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9b88: stloc.s V_9 - IL_9b8a: br.s IL_9bd2 - - IL_9b8c: ldloc.s V_7 - IL_9b8e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9b93: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9b98: stloc.s V_7 - IL_9b9a: ldloc.s V_10 - IL_9b9c: call string [mscorlib]System.Convert::ToString(int32) - IL_9ba1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9ba6: stloc.s V_9 - IL_9ba8: ldloc.s V_8 - IL_9baa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9baf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9bb4: stloc.s V_8 - IL_9bb6: ldloc.s V_9 - IL_9bb8: call string [mscorlib]System.Convert::ToString(int32) - IL_9bbd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9bc2: stloc.s V_7 - IL_9bc4: ldloc.s V_8 - IL_9bc6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9bcb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9bd0: stloc.s V_6 - IL_9bd2: ldloc.s V_10 - IL_9bd4: ldloc.s V_8 - IL_9bd6: bne.un.s IL_9c20 - - IL_9bd8: ldloc.s V_7 - IL_9bda: call string [mscorlib]System.Convert::ToString(int32) - IL_9bdf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9be4: stloc.s V_6 - IL_9be6: ldloc.s V_7 - IL_9be8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9bed: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9bf2: stloc.s V_7 - IL_9bf4: ldloc.s V_6 - IL_9bf6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9bfb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9c00: stloc.s V_7 - IL_9c02: ldloc.s V_6 - IL_9c04: call string [mscorlib]System.Convert::ToString(int32) - IL_9c09: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9c0e: stloc.s V_8 - IL_9c10: ldloc.s V_9 - IL_9c12: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9c17: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9c1c: stloc.s V_6 - IL_9c1e: br.s IL_9c66 - - IL_9c20: ldloc.s V_6 - IL_9c22: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9c27: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9c2c: stloc.s V_10 - IL_9c2e: ldloc.s V_10 - IL_9c30: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9c35: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9c3a: stloc.s V_7 - IL_9c3c: ldloc.s V_6 - IL_9c3e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9c43: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9c48: stloc.s V_10 - IL_9c4a: ldloc.s V_6 - IL_9c4c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9c51: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9c56: stloc.s V_6 - IL_9c58: ldloc.s V_8 - IL_9c5a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9c5f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9c64: stloc.s V_6 - IL_9c66: ldloc.s V_10 - IL_9c68: ldloc.s V_9 - IL_9c6a: bne.un.s IL_9cb4 - - IL_9c6c: ldloc.s V_9 - IL_9c6e: call string [mscorlib]System.Convert::ToString(int32) - IL_9c73: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9c78: stloc.s V_6 - IL_9c7a: ldloc.s V_6 - IL_9c7c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9c81: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9c86: stloc.s V_8 - IL_9c88: ldloc.s V_8 - IL_9c8a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9c8f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9c94: stloc.s V_6 - IL_9c96: ldloc.s V_8 - IL_9c98: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9c9d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9ca2: stloc.s V_10 - IL_9ca4: ldloc.s V_8 - IL_9ca6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9cab: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9cb0: stloc.s V_7 - IL_9cb2: br.s IL_9cfa - - IL_9cb4: ldloc.s V_8 - IL_9cb6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9cbb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9cc0: stloc.s V_6 - IL_9cc2: ldloc.s V_10 - IL_9cc4: call string [mscorlib]System.Convert::ToString(int32) - IL_9cc9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9cce: stloc.s V_8 - IL_9cd0: ldloc.s V_10 - IL_9cd2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9cd7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9cdc: stloc.s V_9 - IL_9cde: ldloc.s V_7 - IL_9ce0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9ce5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9cea: stloc.s V_6 - IL_9cec: ldloc.s V_6 - IL_9cee: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9cf3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9cf8: stloc.s V_6 - IL_9cfa: ldloc.s V_9 - IL_9cfc: ldloc.s V_9 - IL_9cfe: bgt.s IL_9d48 - - IL_9d00: ldloc.s V_8 - IL_9d02: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9d07: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9d0c: stloc.s V_8 - IL_9d0e: ldloc.s V_10 - IL_9d10: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9d15: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9d1a: stloc.s V_10 - IL_9d1c: ldloc.s V_9 - IL_9d1e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9d23: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9d28: stloc.s V_6 - IL_9d2a: ldloc.s V_10 - IL_9d2c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9d31: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9d36: stloc.s V_7 - IL_9d38: ldloc.s V_10 - IL_9d3a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9d3f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9d44: stloc.s V_8 - IL_9d46: br.s IL_9d8e - - IL_9d48: ldloc.s V_9 - IL_9d4a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9d4f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9d54: stloc.s V_9 - IL_9d56: ldloc.s V_7 - IL_9d58: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9d5d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9d62: stloc.s V_10 - IL_9d64: ldloc.s V_7 - IL_9d66: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9d6b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9d70: stloc.s V_9 - IL_9d72: ldloc.s V_10 - IL_9d74: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9d79: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9d7e: stloc.s V_10 - IL_9d80: ldloc.s V_6 - IL_9d82: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9d87: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9d8c: stloc.s V_9 - IL_9d8e: ldloc.s V_7 - IL_9d90: ldloc.s V_7 - IL_9d92: bge.s IL_9ddc - - IL_9d94: ldloc.s V_6 - IL_9d96: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9d9b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9da0: stloc.s V_9 - IL_9da2: ldloc.s V_10 - IL_9da4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9da9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9dae: stloc.s V_10 - IL_9db0: ldloc.s V_7 - IL_9db2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9db7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9dbc: stloc.s V_9 - IL_9dbe: ldloc.s V_7 - IL_9dc0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9dc5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9dca: stloc.s V_7 - IL_9dcc: ldloc.s V_7 - IL_9dce: call string [mscorlib]System.Convert::ToString(int32) - IL_9dd3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9dd8: stloc.s V_6 - IL_9dda: br.s IL_9e22 - - IL_9ddc: ldloc.s V_7 - IL_9dde: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9de3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9de8: stloc.s V_7 - IL_9dea: ldloc.s V_8 - IL_9dec: call string [mscorlib]System.Convert::ToString(int32) - IL_9df1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9df6: stloc.s V_8 - IL_9df8: ldloc.s V_9 - IL_9dfa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9dff: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9e04: stloc.s V_7 - IL_9e06: ldloc.s V_10 - IL_9e08: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9e0d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9e12: stloc.s V_6 - IL_9e14: ldloc.s V_7 - IL_9e16: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9e1b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9e20: stloc.s V_10 - IL_9e22: ldloc.s V_6 - IL_9e24: ldloc.s V_9 - IL_9e26: bgt.s IL_9e70 - - IL_9e28: ldloc.s V_10 - IL_9e2a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9e2f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9e34: stloc.s V_8 - IL_9e36: ldloc.s V_9 - IL_9e38: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9e3d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9e42: stloc.s V_10 - IL_9e44: ldloc.s V_10 - IL_9e46: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9e4b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9e50: stloc.s V_10 - IL_9e52: ldloc.s V_6 - IL_9e54: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9e59: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9e5e: stloc.s V_6 - IL_9e60: ldloc.s V_10 - IL_9e62: call string [mscorlib]System.Convert::ToString(int32) - IL_9e67: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9e6c: stloc.s V_6 - IL_9e6e: br.s IL_9eb6 - - IL_9e70: ldloc.s V_9 - IL_9e72: call string [mscorlib]System.Convert::ToString(int32) - IL_9e77: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9e7c: stloc.s V_8 - IL_9e7e: ldloc.s V_9 - IL_9e80: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9e85: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9e8a: stloc.s V_9 - IL_9e8c: ldloc.s V_10 - IL_9e8e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9e93: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9e98: stloc.s V_10 - IL_9e9a: ldloc.s V_6 - IL_9e9c: call string [mscorlib]System.Convert::ToString(int32) - IL_9ea1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9ea6: stloc.s V_7 - IL_9ea8: ldloc.s V_6 - IL_9eaa: call string [mscorlib]System.Convert::ToString(int32) - IL_9eaf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9eb4: stloc.s V_10 - IL_9eb6: ldloc.s V_9 - IL_9eb8: ldloc.s V_6 - IL_9eba: ble.s IL_9f04 - - IL_9ebc: ldloc.s V_9 - IL_9ebe: call string [mscorlib]System.Convert::ToString(int32) - IL_9ec3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9ec8: stloc.s V_9 - IL_9eca: ldloc.s V_8 - IL_9ecc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9ed1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9ed6: stloc.s V_8 - IL_9ed8: ldloc.s V_7 - IL_9eda: call string [mscorlib]System.Convert::ToString(int32) - IL_9edf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9ee4: stloc.s V_9 - IL_9ee6: ldloc.s V_8 - IL_9ee8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9eed: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9ef2: stloc.s V_8 - IL_9ef4: ldloc.s V_7 - IL_9ef6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9efb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9f00: stloc.s V_9 - IL_9f02: br.s IL_9f4a - - IL_9f04: ldloc.s V_10 - IL_9f06: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9f0b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9f10: stloc.s V_10 - IL_9f12: ldloc.s V_7 - IL_9f14: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9f19: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9f1e: stloc.s V_8 - IL_9f20: ldloc.s V_7 - IL_9f22: call string [mscorlib]System.Convert::ToString(int32) - IL_9f27: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9f2c: stloc.s V_6 - IL_9f2e: ldloc.s V_6 - IL_9f30: call string [mscorlib]System.Convert::ToString(int32) - IL_9f35: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9f3a: stloc.s V_10 - IL_9f3c: ldloc.s V_8 - IL_9f3e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9f43: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9f48: stloc.s V_8 - IL_9f4a: ldloc.s V_6 - IL_9f4c: ldloc.s V_9 - IL_9f4e: beq.s IL_9f98 - - IL_9f50: ldloc.s V_6 - IL_9f52: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9f57: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9f5c: stloc.s V_10 - IL_9f5e: ldloc.s V_6 - IL_9f60: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9f65: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9f6a: stloc.s V_7 - IL_9f6c: ldloc.s V_7 - IL_9f6e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9f73: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9f78: stloc.s V_6 - IL_9f7a: ldloc.s V_6 - IL_9f7c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9f81: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9f86: stloc.s V_7 - IL_9f88: ldloc.s V_8 - IL_9f8a: call string [mscorlib]System.Convert::ToString(int32) - IL_9f8f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9f94: stloc.s V_8 - IL_9f96: br.s IL_9fde - - IL_9f98: ldloc.s V_7 - IL_9f9a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9f9f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9fa4: stloc.s V_9 - IL_9fa6: ldloc.s V_9 - IL_9fa8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9fad: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9fb2: stloc.s V_7 - IL_9fb4: ldloc.s V_10 - IL_9fb6: call string [mscorlib]System.Convert::ToString(int32) - IL_9fbb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9fc0: stloc.s V_10 - IL_9fc2: ldloc.s V_9 - IL_9fc4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9fc9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9fce: stloc.s V_7 - IL_9fd0: ldloc.s V_8 - IL_9fd2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9fd7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9fdc: stloc.s V_8 - IL_9fde: ldloc.s V_9 - IL_9fe0: ldloc.s V_6 - IL_9fe2: bne.un.s IL_a02c - - IL_9fe4: ldloc.s V_9 - IL_9fe6: call string [mscorlib]System.Convert::ToString(int32) - IL_9feb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9ff0: stloc.s V_10 - IL_9ff2: ldloc.s V_7 - IL_9ff4: call string [mscorlib]System.Convert::ToString(int32) - IL_9ff9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9ffe: stloc.s V_7 - IL_a000: ldloc.s V_6 - IL_a002: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a007: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a00c: stloc.s V_9 - IL_a00e: ldloc.s V_7 - IL_a010: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a015: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a01a: stloc.s V_10 - IL_a01c: ldloc.s V_10 - IL_a01e: call string [mscorlib]System.Convert::ToString(int32) - IL_a023: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a028: stloc.s V_6 - IL_a02a: br.s IL_a072 - - IL_a02c: ldloc.s V_9 - IL_a02e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a033: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a038: stloc.s V_8 - IL_a03a: ldloc.s V_9 - IL_a03c: call string [mscorlib]System.Convert::ToString(int32) - IL_a041: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a046: stloc.s V_7 - IL_a048: ldloc.s V_9 - IL_a04a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a04f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a054: stloc.s V_10 - IL_a056: ldloc.s V_9 - IL_a058: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a05d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a062: stloc.s V_6 - IL_a064: ldloc.s V_10 - IL_a066: call string [mscorlib]System.Convert::ToString(int32) - IL_a06b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a070: stloc.s V_7 - IL_a072: ldloc.s V_8 - IL_a074: ldloc.s V_9 - IL_a076: bne.un.s IL_a0c0 - - IL_a078: ldloc.s V_6 - IL_a07a: call string [mscorlib]System.Convert::ToString(int32) - IL_a07f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a084: stloc.s V_6 - IL_a086: ldloc.s V_8 - IL_a088: call string [mscorlib]System.Convert::ToString(int32) - IL_a08d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a092: stloc.s V_10 - IL_a094: ldloc.s V_6 - IL_a096: call string [mscorlib]System.Convert::ToString(int32) - IL_a09b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a0a0: stloc.s V_10 - IL_a0a2: ldloc.s V_10 - IL_a0a4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a0a9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a0ae: stloc.s V_9 - IL_a0b0: ldloc.s V_10 - IL_a0b2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a0b7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a0bc: stloc.s V_9 - IL_a0be: br.s IL_a106 - - IL_a0c0: ldloc.s V_7 - IL_a0c2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a0c7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a0cc: stloc.s V_10 - IL_a0ce: ldloc.s V_10 - IL_a0d0: call string [mscorlib]System.Convert::ToString(int32) - IL_a0d5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a0da: stloc.s V_10 - IL_a0dc: ldloc.s V_9 - IL_a0de: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a0e3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a0e8: stloc.s V_8 - IL_a0ea: ldloc.s V_9 - IL_a0ec: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a0f1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a0f6: stloc.s V_10 - IL_a0f8: ldloc.s V_9 - IL_a0fa: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a0ff: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a104: stloc.s V_9 - IL_a106: ldloc.s V_6 - IL_a108: ldloc.s V_7 - IL_a10a: bge.s IL_a154 - - IL_a10c: ldloc.s V_10 - IL_a10e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a113: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a118: stloc.s V_8 - IL_a11a: ldloc.s V_6 - IL_a11c: call string [mscorlib]System.Convert::ToString(int32) - IL_a121: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a126: stloc.s V_10 - IL_a128: ldloc.s V_6 - IL_a12a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a12f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a134: stloc.s V_7 - IL_a136: ldloc.s V_10 - IL_a138: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a13d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a142: stloc.s V_8 - IL_a144: ldloc.s V_10 - IL_a146: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a14b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a150: stloc.s V_10 - IL_a152: br.s IL_a19a - - IL_a154: ldloc.s V_10 - IL_a156: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a15b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a160: stloc.s V_9 - IL_a162: ldloc.s V_10 - IL_a164: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a169: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a16e: stloc.s V_8 - IL_a170: ldloc.s V_8 - IL_a172: call string [mscorlib]System.Convert::ToString(int32) - IL_a177: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a17c: stloc.s V_10 - IL_a17e: ldloc.s V_8 - IL_a180: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a185: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a18a: stloc.s V_7 - IL_a18c: ldloc.s V_7 - IL_a18e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a193: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a198: stloc.s V_10 - IL_a19a: ldloc.s V_8 - IL_a19c: ldloc.s V_10 - IL_a19e: blt.s IL_a1e8 - - IL_a1a0: ldloc.s V_6 - IL_a1a2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a1a7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a1ac: stloc.s V_8 - IL_a1ae: ldloc.s V_7 - IL_a1b0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a1b5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a1ba: stloc.s V_6 - IL_a1bc: ldloc.s V_7 - IL_a1be: call string [mscorlib]System.Convert::ToString(int32) - IL_a1c3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a1c8: stloc.s V_7 - IL_a1ca: ldloc.s V_10 - IL_a1cc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a1d1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a1d6: stloc.s V_10 - IL_a1d8: ldloc.s V_9 - IL_a1da: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a1df: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a1e4: stloc.s V_9 - IL_a1e6: br.s IL_a22e - - IL_a1e8: ldloc.s V_10 - IL_a1ea: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a1ef: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a1f4: stloc.s V_9 - IL_a1f6: ldloc.s V_7 - IL_a1f8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a1fd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a202: stloc.s V_10 - IL_a204: ldloc.s V_8 - IL_a206: call string [mscorlib]System.Convert::ToString(int32) - IL_a20b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a210: stloc.s V_7 - IL_a212: ldloc.s V_9 - IL_a214: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a219: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a21e: stloc.s V_8 - IL_a220: ldloc.s V_10 - IL_a222: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a227: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a22c: stloc.s V_9 - IL_a22e: ldloc.s V_7 - IL_a230: ldloc.s V_8 - IL_a232: bne.un.s IL_a27c - - IL_a234: ldloc.s V_6 - IL_a236: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a23b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a240: stloc.s V_6 - IL_a242: ldloc.s V_7 - IL_a244: call string [mscorlib]System.Convert::ToString(int32) - IL_a249: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a24e: stloc.s V_9 - IL_a250: ldloc.s V_7 - IL_a252: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a257: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a25c: stloc.s V_8 - IL_a25e: ldloc.s V_9 - IL_a260: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a265: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a26a: stloc.s V_9 - IL_a26c: ldloc.s V_10 - IL_a26e: call string [mscorlib]System.Convert::ToString(int32) - IL_a273: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a278: stloc.s V_9 - IL_a27a: br.s IL_a2c2 - - IL_a27c: ldloc.s V_6 - IL_a27e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a283: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a288: stloc.s V_10 - IL_a28a: ldloc.s V_10 - IL_a28c: call string [mscorlib]System.Convert::ToString(int32) - IL_a291: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a296: stloc.s V_8 - IL_a298: ldloc.s V_9 - IL_a29a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a29f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a2a4: stloc.s V_9 - IL_a2a6: ldloc.s V_9 - IL_a2a8: call string [mscorlib]System.Convert::ToString(int32) - IL_a2ad: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a2b2: stloc.s V_8 - IL_a2b4: ldloc.s V_7 - IL_a2b6: call string [mscorlib]System.Convert::ToString(int32) - IL_a2bb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a2c0: stloc.s V_8 - IL_a2c2: ldloc.s V_6 - IL_a2c4: ldloc.s V_9 - IL_a2c6: bge.s IL_a310 - - IL_a2c8: ldloc.s V_8 - IL_a2ca: call string [mscorlib]System.Convert::ToString(int32) - IL_a2cf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a2d4: stloc.s V_7 - IL_a2d6: ldloc.s V_8 - IL_a2d8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a2dd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a2e2: stloc.s V_8 - IL_a2e4: ldloc.s V_8 - IL_a2e6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a2eb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a2f0: stloc.s V_8 - IL_a2f2: ldloc.s V_9 - IL_a2f4: call string [mscorlib]System.Convert::ToString(int32) - IL_a2f9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a2fe: stloc.s V_10 - IL_a300: ldloc.s V_10 - IL_a302: call string [mscorlib]System.Convert::ToString(int32) - IL_a307: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a30c: stloc.s V_10 - IL_a30e: br.s IL_a356 - - IL_a310: ldloc.s V_6 - IL_a312: call string [mscorlib]System.Convert::ToString(int32) - IL_a317: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a31c: stloc.s V_10 - IL_a31e: ldloc.s V_9 - IL_a320: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a325: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a32a: stloc.s V_10 - IL_a32c: ldloc.s V_8 - IL_a32e: call string [mscorlib]System.Convert::ToString(int32) - IL_a333: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a338: stloc.s V_9 - IL_a33a: ldloc.s V_10 - IL_a33c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a341: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a346: stloc.s V_8 - IL_a348: ldloc.s V_8 - IL_a34a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a34f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a354: stloc.s V_9 - IL_a356: ldloc.s V_8 - IL_a358: ldloc.s V_10 - IL_a35a: ble.s IL_a3a4 - - IL_a35c: ldloc.s V_10 - IL_a35e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a363: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a368: stloc.s V_6 - IL_a36a: ldloc.s V_6 - IL_a36c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a371: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a376: stloc.s V_7 - IL_a378: ldloc.s V_6 - IL_a37a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a37f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a384: stloc.s V_9 - IL_a386: ldloc.s V_8 - IL_a388: call string [mscorlib]System.Convert::ToString(int32) - IL_a38d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a392: stloc.s V_7 - IL_a394: ldloc.s V_10 - IL_a396: call string [mscorlib]System.Convert::ToString(int32) - IL_a39b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a3a0: stloc.s V_6 - IL_a3a2: br.s IL_a3ea - - IL_a3a4: ldloc.s V_10 - IL_a3a6: call string [mscorlib]System.Convert::ToString(int32) - IL_a3ab: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a3b0: stloc.s V_9 - IL_a3b2: ldloc.s V_9 - IL_a3b4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a3b9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a3be: stloc.s V_6 - IL_a3c0: ldloc.s V_6 - IL_a3c2: call string [mscorlib]System.Convert::ToString(int32) - IL_a3c7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a3cc: stloc.s V_10 - IL_a3ce: ldloc.s V_9 - IL_a3d0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a3d5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a3da: stloc.s V_6 - IL_a3dc: ldloc.s V_7 - IL_a3de: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a3e3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a3e8: stloc.s V_8 - IL_a3ea: ldloc.s V_9 - IL_a3ec: ldloc.s V_6 - IL_a3ee: beq.s IL_a438 - - IL_a3f0: ldloc.s V_7 - IL_a3f2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a3f7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a3fc: stloc.s V_9 - IL_a3fe: ldloc.s V_7 - IL_a400: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a405: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a40a: stloc.s V_10 - IL_a40c: ldloc.s V_7 - IL_a40e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a413: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a418: stloc.s V_6 - IL_a41a: ldloc.s V_9 - IL_a41c: call string [mscorlib]System.Convert::ToString(int32) - IL_a421: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a426: stloc.s V_8 - IL_a428: ldloc.s V_9 - IL_a42a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a42f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a434: stloc.s V_10 - IL_a436: br.s IL_a47e - - IL_a438: ldloc.s V_7 - IL_a43a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a43f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a444: stloc.s V_6 - IL_a446: ldloc.s V_6 - IL_a448: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a44d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a452: stloc.s V_9 - IL_a454: ldloc.s V_10 - IL_a456: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a45b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a460: stloc.s V_7 - IL_a462: ldloc.s V_8 - IL_a464: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a469: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a46e: stloc.s V_10 - IL_a470: ldloc.s V_6 - IL_a472: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a477: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a47c: stloc.s V_8 - IL_a47e: ldloc.s V_7 - IL_a480: ldloc.s V_6 - IL_a482: beq.s IL_a4cc - - IL_a484: ldloc.s V_10 - IL_a486: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a48b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a490: stloc.s V_7 - IL_a492: ldloc.s V_7 - IL_a494: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a499: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a49e: stloc.s V_8 - IL_a4a0: ldloc.s V_7 - IL_a4a2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a4a7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a4ac: stloc.s V_9 - IL_a4ae: ldloc.s V_10 - IL_a4b0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a4b5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a4ba: stloc.s V_7 - IL_a4bc: ldloc.s V_9 - IL_a4be: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a4c3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a4c8: stloc.s V_7 - IL_a4ca: br.s IL_a512 - - IL_a4cc: ldloc.s V_10 - IL_a4ce: call string [mscorlib]System.Convert::ToString(int32) - IL_a4d3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a4d8: stloc.s V_6 - IL_a4da: ldloc.s V_8 - IL_a4dc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a4e1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a4e6: stloc.s V_6 - IL_a4e8: ldloc.s V_9 - IL_a4ea: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a4ef: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a4f4: stloc.s V_6 - IL_a4f6: ldloc.s V_6 - IL_a4f8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a4fd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a502: stloc.s V_8 - IL_a504: ldloc.s V_6 - IL_a506: call string [mscorlib]System.Convert::ToString(int32) - IL_a50b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a510: stloc.s V_10 - IL_a512: ldloc.s V_9 - IL_a514: ldloc.s V_6 - IL_a516: bge.s IL_a560 - - IL_a518: ldloc.s V_6 - IL_a51a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a51f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a524: stloc.s V_9 - IL_a526: ldloc.s V_6 - IL_a528: call string [mscorlib]System.Convert::ToString(int32) - IL_a52d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a532: stloc.s V_10 - IL_a534: ldloc.s V_6 - IL_a536: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a53b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a540: stloc.s V_6 - IL_a542: ldloc.s V_8 - IL_a544: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a549: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a54e: stloc.s V_10 - IL_a550: ldloc.s V_6 - IL_a552: call string [mscorlib]System.Convert::ToString(int32) - IL_a557: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a55c: stloc.s V_10 - IL_a55e: br.s IL_a5a6 - - IL_a560: ldloc.s V_8 - IL_a562: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a567: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a56c: stloc.s V_10 - IL_a56e: ldloc.s V_6 - IL_a570: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a575: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a57a: stloc.s V_6 - IL_a57c: ldloc.s V_10 - IL_a57e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a583: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a588: stloc.s V_8 - IL_a58a: ldloc.s V_9 - IL_a58c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a591: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a596: stloc.s V_6 - IL_a598: ldloc.s V_7 - IL_a59a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a59f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a5a4: stloc.s V_6 - IL_a5a6: ldloc.s V_6 - IL_a5a8: ldloc.s V_10 - IL_a5aa: bge.s IL_a5f4 - - IL_a5ac: ldloc.s V_7 - IL_a5ae: call string [mscorlib]System.Convert::ToString(int32) - IL_a5b3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a5b8: stloc.s V_9 - IL_a5ba: ldloc.s V_10 - IL_a5bc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a5c1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a5c6: stloc.s V_8 - IL_a5c8: ldloc.s V_7 - IL_a5ca: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a5cf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a5d4: stloc.s V_10 - IL_a5d6: ldloc.s V_8 - IL_a5d8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a5dd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a5e2: stloc.s V_8 - IL_a5e4: ldloc.s V_8 - IL_a5e6: call string [mscorlib]System.Convert::ToString(int32) - IL_a5eb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a5f0: stloc.s V_7 - IL_a5f2: br.s IL_a63a - - IL_a5f4: ldloc.s V_7 - IL_a5f6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a5fb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a600: stloc.s V_6 - IL_a602: ldloc.s V_9 - IL_a604: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a609: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a60e: stloc.s V_8 - IL_a610: ldloc.s V_9 - IL_a612: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a617: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a61c: stloc.s V_6 - IL_a61e: ldloc.s V_8 - IL_a620: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a625: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a62a: stloc.s V_6 - IL_a62c: ldloc.s V_6 - IL_a62e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a633: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a638: stloc.s V_7 - IL_a63a: ldloc.s V_9 - IL_a63c: ldloc.s V_10 - IL_a63e: bne.un.s IL_a688 - - IL_a640: ldloc.s V_10 - IL_a642: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a647: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a64c: stloc.s V_9 - IL_a64e: ldloc.s V_6 - IL_a650: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a655: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a65a: stloc.s V_10 - IL_a65c: ldloc.s V_10 - IL_a65e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a663: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a668: stloc.s V_8 - IL_a66a: ldloc.s V_10 - IL_a66c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a671: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a676: stloc.s V_9 - IL_a678: ldloc.s V_8 - IL_a67a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a67f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a684: stloc.s V_8 - IL_a686: br.s IL_a6ce - - IL_a688: ldloc.s V_10 - IL_a68a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a68f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a694: stloc.s V_6 - IL_a696: ldloc.s V_10 - IL_a698: call string [mscorlib]System.Convert::ToString(int32) - IL_a69d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a6a2: stloc.s V_6 - IL_a6a4: ldloc.s V_7 - IL_a6a6: call string [mscorlib]System.Convert::ToString(int32) - IL_a6ab: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a6b0: stloc.s V_6 - IL_a6b2: ldloc.s V_8 - IL_a6b4: call string [mscorlib]System.Convert::ToString(int32) - IL_a6b9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a6be: stloc.s V_9 - IL_a6c0: ldloc.s V_10 - IL_a6c2: call string [mscorlib]System.Convert::ToString(int32) - IL_a6c7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a6cc: stloc.s V_8 - IL_a6ce: ldloc.s V_9 - IL_a6d0: ldloc.s V_9 - IL_a6d2: bge.s IL_a71c - - IL_a6d4: ldloc.s V_8 - IL_a6d6: call string [mscorlib]System.Convert::ToString(int32) - IL_a6db: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a6e0: stloc.s V_9 - IL_a6e2: ldloc.s V_9 - IL_a6e4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a6e9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a6ee: stloc.s V_9 - IL_a6f0: ldloc.s V_6 - IL_a6f2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a6f7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a6fc: stloc.s V_6 - IL_a6fe: ldloc.s V_7 - IL_a700: call string [mscorlib]System.Convert::ToString(int32) - IL_a705: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a70a: stloc.s V_10 - IL_a70c: ldloc.s V_10 - IL_a70e: call string [mscorlib]System.Convert::ToString(int32) - IL_a713: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a718: stloc.s V_10 - IL_a71a: br.s IL_a762 - - IL_a71c: ldloc.s V_6 - IL_a71e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a723: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a728: stloc.s V_6 - IL_a72a: ldloc.s V_6 - IL_a72c: call string [mscorlib]System.Convert::ToString(int32) - IL_a731: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a736: stloc.s V_6 - IL_a738: ldloc.s V_8 - IL_a73a: call string [mscorlib]System.Convert::ToString(int32) - IL_a73f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a744: stloc.s V_6 - IL_a746: ldloc.s V_9 - IL_a748: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a74d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a752: stloc.s V_9 - IL_a754: ldloc.s V_9 - IL_a756: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a75b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a760: stloc.s V_9 - IL_a762: ldloc.s V_7 - IL_a764: ldloc.s V_7 - IL_a766: ble.s IL_a7b0 - - IL_a768: ldloc.s V_7 - IL_a76a: call string [mscorlib]System.Convert::ToString(int32) - IL_a76f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a774: stloc.s V_7 - IL_a776: ldloc.s V_9 - IL_a778: call string [mscorlib]System.Convert::ToString(int32) - IL_a77d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a782: stloc.s V_10 - IL_a784: ldloc.s V_9 - IL_a786: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a78b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a790: stloc.s V_6 - IL_a792: ldloc.s V_6 - IL_a794: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a799: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a79e: stloc.s V_10 - IL_a7a0: ldloc.s V_10 - IL_a7a2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a7a7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a7ac: stloc.s V_10 - IL_a7ae: br.s IL_a7f6 - - IL_a7b0: ldloc.s V_7 - IL_a7b2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a7b7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a7bc: stloc.s V_8 - IL_a7be: ldloc.s V_10 - IL_a7c0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a7c5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a7ca: stloc.s V_10 - IL_a7cc: ldloc.s V_10 - IL_a7ce: call string [mscorlib]System.Convert::ToString(int32) - IL_a7d3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a7d8: stloc.s V_9 - IL_a7da: ldloc.s V_6 - IL_a7dc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a7e1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a7e6: stloc.s V_6 - IL_a7e8: ldloc.s V_10 - IL_a7ea: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a7ef: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a7f4: stloc.s V_6 - IL_a7f6: ldloc.s V_10 - IL_a7f8: ldloc.s V_6 - IL_a7fa: bge.s IL_a844 - - IL_a7fc: ldloc.s V_10 - IL_a7fe: call string [mscorlib]System.Convert::ToString(int32) - IL_a803: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a808: stloc.s V_10 - IL_a80a: ldloc.s V_9 - IL_a80c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a811: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a816: stloc.s V_9 - IL_a818: ldloc.s V_9 - IL_a81a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a81f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a824: stloc.s V_7 - IL_a826: ldloc.s V_8 - IL_a828: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a82d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a832: stloc.s V_7 - IL_a834: ldloc.s V_7 - IL_a836: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a83b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a840: stloc.s V_7 - IL_a842: br.s IL_a88a - - IL_a844: ldloc.s V_9 - IL_a846: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a84b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a850: stloc.s V_10 - IL_a852: ldloc.s V_6 - IL_a854: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a859: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a85e: stloc.s V_8 - IL_a860: ldloc.s V_10 - IL_a862: call string [mscorlib]System.Convert::ToString(int32) - IL_a867: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a86c: stloc.s V_7 - IL_a86e: ldloc.s V_9 - IL_a870: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a875: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a87a: stloc.s V_7 - IL_a87c: ldloc.s V_9 - IL_a87e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a883: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a888: stloc.s V_9 - IL_a88a: ldloc.s V_8 - IL_a88c: ldloc.s V_7 - IL_a88e: bne.un.s IL_a8d8 - - IL_a890: ldloc.s V_7 - IL_a892: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a897: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a89c: stloc.s V_10 - IL_a89e: ldloc.s V_7 - IL_a8a0: call string [mscorlib]System.Convert::ToString(int32) - IL_a8a5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a8aa: stloc.s V_10 - IL_a8ac: ldloc.s V_6 - IL_a8ae: call string [mscorlib]System.Convert::ToString(int32) - IL_a8b3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a8b8: stloc.s V_8 - IL_a8ba: ldloc.s V_8 - IL_a8bc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a8c1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a8c6: stloc.s V_7 - IL_a8c8: ldloc.s V_6 - IL_a8ca: call string [mscorlib]System.Convert::ToString(int32) - IL_a8cf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a8d4: stloc.s V_8 - IL_a8d6: br.s IL_a91e - - IL_a8d8: ldloc.s V_6 - IL_a8da: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a8df: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a8e4: stloc.s V_10 - IL_a8e6: ldloc.s V_9 - IL_a8e8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a8ed: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a8f2: stloc.s V_7 - IL_a8f4: ldloc.s V_6 - IL_a8f6: call string [mscorlib]System.Convert::ToString(int32) - IL_a8fb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a900: stloc.s V_6 - IL_a902: ldloc.s V_7 - IL_a904: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a909: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a90e: stloc.s V_6 - IL_a910: ldloc.s V_10 - IL_a912: call string [mscorlib]System.Convert::ToString(int32) - IL_a917: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a91c: stloc.s V_6 - IL_a91e: ldloc.s V_8 - IL_a920: ldloc.s V_9 - IL_a922: beq.s IL_a96c - - IL_a924: ldloc.s V_10 - IL_a926: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a92b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a930: stloc.s V_6 - IL_a932: ldloc.s V_8 - IL_a934: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a939: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a93e: stloc.s V_10 - IL_a940: ldloc.s V_9 - IL_a942: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a947: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a94c: stloc.s V_7 - IL_a94e: ldloc.s V_7 - IL_a950: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a955: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a95a: stloc.s V_10 - IL_a95c: ldloc.s V_7 - IL_a95e: call string [mscorlib]System.Convert::ToString(int32) - IL_a963: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a968: stloc.s V_8 - IL_a96a: br.s IL_a9b2 - - IL_a96c: ldloc.s V_10 - IL_a96e: call string [mscorlib]System.Convert::ToString(int32) - IL_a973: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a978: stloc.s V_8 - IL_a97a: ldloc.s V_8 - IL_a97c: call string [mscorlib]System.Convert::ToString(int32) - IL_a981: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a986: stloc.s V_9 - IL_a988: ldloc.s V_7 - IL_a98a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a98f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a994: stloc.s V_9 - IL_a996: ldloc.s V_7 - IL_a998: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a99d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a9a2: stloc.s V_7 - IL_a9a4: ldloc.s V_9 - IL_a9a6: call string [mscorlib]System.Convert::ToString(int32) - IL_a9ab: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a9b0: stloc.s V_6 - IL_a9b2: ldloc.s V_8 - IL_a9b4: ldloc.s V_9 - IL_a9b6: bge.s IL_aa00 - - IL_a9b8: ldloc.s V_6 - IL_a9ba: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a9bf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a9c4: stloc.s V_9 - IL_a9c6: ldloc.s V_6 - IL_a9c8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a9cd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a9d2: stloc.s V_7 - IL_a9d4: ldloc.s V_6 - IL_a9d6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a9db: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a9e0: stloc.s V_8 - IL_a9e2: ldloc.s V_8 - IL_a9e4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a9e9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a9ee: stloc.s V_10 - IL_a9f0: ldloc.s V_9 - IL_a9f2: call string [mscorlib]System.Convert::ToString(int32) - IL_a9f7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a9fc: stloc.s V_9 - IL_a9fe: br.s IL_aa46 - - IL_aa00: ldloc.s V_6 - IL_aa02: call string [mscorlib]System.Convert::ToString(int32) - IL_aa07: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_aa0c: stloc.s V_10 - IL_aa0e: ldloc.s V_6 - IL_aa10: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_aa15: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_aa1a: stloc.s V_6 - IL_aa1c: ldloc.s V_9 - IL_aa1e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_aa23: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_aa28: stloc.s V_6 - IL_aa2a: ldloc.s V_7 - IL_aa2c: call string [mscorlib]System.Convert::ToString(int32) - IL_aa31: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_aa36: stloc.s V_8 - IL_aa38: ldloc.s V_7 - IL_aa3a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_aa3f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_aa44: stloc.s V_7 - IL_aa46: ldloc.s V_9 - IL_aa48: ldloc.s V_8 - IL_aa4a: beq.s IL_aa94 - - IL_aa4c: ldloc.s V_7 - IL_aa4e: call string [mscorlib]System.Convert::ToString(int32) - IL_aa53: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_aa58: stloc.s V_8 - IL_aa5a: ldloc.s V_9 - IL_aa5c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_aa61: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_aa66: stloc.s V_6 - IL_aa68: ldloc.s V_8 - IL_aa6a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_aa6f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_aa74: stloc.s V_9 - IL_aa76: ldloc.s V_9 - IL_aa78: call string [mscorlib]System.Convert::ToString(int32) - IL_aa7d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_aa82: stloc.s V_8 - IL_aa84: ldloc.s V_7 - IL_aa86: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_aa8b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_aa90: stloc.s V_10 - IL_aa92: br.s IL_aada - - IL_aa94: ldloc.s V_10 - IL_aa96: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_aa9b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_aaa0: stloc.s V_8 - IL_aaa2: ldloc.s V_7 - IL_aaa4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_aaa9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_aaae: stloc.s V_9 - IL_aab0: ldloc.s V_10 - IL_aab2: call string [mscorlib]System.Convert::ToString(int32) - IL_aab7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_aabc: stloc.s V_9 - IL_aabe: ldloc.s V_7 - IL_aac0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_aac5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_aaca: stloc.s V_8 - IL_aacc: ldloc.s V_9 - IL_aace: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_aad3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_aad8: stloc.s V_10 - IL_aada: ldloc.s V_6 - IL_aadc: ldloc.s V_8 - IL_aade: bne.un.s IL_ab28 - - IL_aae0: ldloc.s V_10 - IL_aae2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_aae7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_aaec: stloc.s V_10 - IL_aaee: ldloc.s V_7 - IL_aaf0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_aaf5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_aafa: stloc.s V_7 - IL_aafc: ldloc.s V_10 - IL_aafe: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ab03: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ab08: stloc.s V_7 - IL_ab0a: ldloc.s V_10 - IL_ab0c: call string [mscorlib]System.Convert::ToString(int32) - IL_ab11: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ab16: stloc.s V_8 - IL_ab18: ldloc.s V_7 - IL_ab1a: call string [mscorlib]System.Convert::ToString(int32) - IL_ab1f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ab24: stloc.s V_10 - IL_ab26: br.s IL_ab6e - - IL_ab28: ldloc.s V_6 - IL_ab2a: call string [mscorlib]System.Convert::ToString(int32) - IL_ab2f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ab34: stloc.s V_10 - IL_ab36: ldloc.s V_8 - IL_ab38: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_ab3d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ab42: stloc.s V_8 - IL_ab44: ldloc.s V_6 - IL_ab46: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ab4b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ab50: stloc.s V_7 - IL_ab52: ldloc.s V_7 - IL_ab54: call string [mscorlib]System.Convert::ToString(int32) - IL_ab59: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ab5e: stloc.s V_7 - IL_ab60: ldloc.s V_10 - IL_ab62: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ab67: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ab6c: stloc.s V_8 - IL_ab6e: ldloc.s V_10 - IL_ab70: ldloc.s V_8 - IL_ab72: beq.s IL_abbc - - IL_ab74: ldloc.s V_6 - IL_ab76: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ab7b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ab80: stloc.s V_7 - IL_ab82: ldloc.s V_7 - IL_ab84: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_ab89: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ab8e: stloc.s V_7 - IL_ab90: ldloc.s V_10 - IL_ab92: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ab97: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ab9c: stloc.s V_8 - IL_ab9e: ldloc.s V_10 - IL_aba0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_aba5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_abaa: stloc.s V_7 - IL_abac: ldloc.s V_7 - IL_abae: call string [mscorlib]System.Convert::ToString(int32) - IL_abb3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_abb8: stloc.s V_6 - IL_abba: br.s IL_ac02 - - IL_abbc: ldloc.s V_8 - IL_abbe: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_abc3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_abc8: stloc.s V_10 - IL_abca: ldloc.s V_6 - IL_abcc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_abd1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_abd6: stloc.s V_9 - IL_abd8: ldloc.s V_8 - IL_abda: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_abdf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_abe4: stloc.s V_10 - IL_abe6: ldloc.s V_6 - IL_abe8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_abed: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_abf2: stloc.s V_10 - IL_abf4: ldloc.s V_7 - IL_abf6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_abfb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ac00: stloc.s V_6 - IL_ac02: ldloc.s V_8 - IL_ac04: ldloc.s V_10 - IL_ac06: ble.s IL_ac50 - - IL_ac08: ldloc.s V_9 - IL_ac0a: call string [mscorlib]System.Convert::ToString(int32) - IL_ac0f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ac14: stloc.s V_7 - IL_ac16: ldloc.s V_8 - IL_ac18: call string [mscorlib]System.Convert::ToString(int32) - IL_ac1d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ac22: stloc.s V_6 - IL_ac24: ldloc.s V_9 - IL_ac26: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ac2b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ac30: stloc.s V_9 - IL_ac32: ldloc.s V_8 - IL_ac34: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ac39: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ac3e: stloc.s V_9 - IL_ac40: ldloc.s V_6 - IL_ac42: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ac47: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ac4c: stloc.s V_6 - IL_ac4e: br.s IL_ac96 - - IL_ac50: ldloc.s V_6 - IL_ac52: call string [mscorlib]System.Convert::ToString(int32) - IL_ac57: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ac5c: stloc.s V_10 - IL_ac5e: ldloc.s V_8 - IL_ac60: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_ac65: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ac6a: stloc.s V_7 - IL_ac6c: ldloc.s V_6 - IL_ac6e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ac73: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ac78: stloc.s V_8 - IL_ac7a: ldloc.s V_6 - IL_ac7c: call string [mscorlib]System.Convert::ToString(int32) - IL_ac81: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ac86: stloc.s V_9 - IL_ac88: ldloc.s V_9 - IL_ac8a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ac8f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ac94: stloc.s V_6 - IL_ac96: ldloc.s V_7 - IL_ac98: ldloc.s V_9 - IL_ac9a: bgt.s IL_ace4 - - IL_ac9c: ldloc.s V_10 - IL_ac9e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_aca3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_aca8: stloc.s V_6 - IL_acaa: ldloc.s V_7 - IL_acac: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_acb1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_acb6: stloc.s V_8 - IL_acb8: ldloc.s V_8 - IL_acba: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_acbf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_acc4: stloc.s V_6 - IL_acc6: ldloc.s V_10 - IL_acc8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_accd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_acd2: stloc.s V_7 - IL_acd4: ldloc.s V_9 - IL_acd6: call string [mscorlib]System.Convert::ToString(int32) - IL_acdb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ace0: stloc.s V_6 - IL_ace2: br.s IL_ad2a - - IL_ace4: ldloc.s V_7 - IL_ace6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_aceb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_acf0: stloc.s V_6 - IL_acf2: ldloc.s V_7 - IL_acf4: call string [mscorlib]System.Convert::ToString(int32) - IL_acf9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_acfe: stloc.s V_7 - IL_ad00: ldloc.s V_7 - IL_ad02: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ad07: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ad0c: stloc.s V_7 - IL_ad0e: ldloc.s V_6 - IL_ad10: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ad15: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ad1a: stloc.s V_9 - IL_ad1c: ldloc.s V_8 - IL_ad1e: call string [mscorlib]System.Convert::ToString(int32) - IL_ad23: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ad28: stloc.s V_7 - IL_ad2a: ldloc.s V_6 - IL_ad2c: ldloc.s V_8 - IL_ad2e: beq.s IL_ad78 - - IL_ad30: ldloc.s V_8 - IL_ad32: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ad37: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ad3c: stloc.s V_9 - IL_ad3e: ldloc.s V_9 - IL_ad40: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ad45: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ad4a: stloc.s V_7 - IL_ad4c: ldloc.s V_7 - IL_ad4e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ad53: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ad58: stloc.s V_10 - IL_ad5a: ldloc.s V_7 - IL_ad5c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_ad61: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ad66: stloc.s V_6 - IL_ad68: ldloc.s V_10 - IL_ad6a: call string [mscorlib]System.Convert::ToString(int32) - IL_ad6f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ad74: stloc.s V_7 - IL_ad76: br.s IL_adbe - - IL_ad78: ldloc.s V_7 - IL_ad7a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_ad7f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ad84: stloc.s V_8 - IL_ad86: ldloc.s V_9 - IL_ad88: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ad8d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ad92: stloc.s V_8 - IL_ad94: ldloc.s V_6 - IL_ad96: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ad9b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ada0: stloc.s V_7 - IL_ada2: ldloc.s V_7 - IL_ada4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ada9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_adae: stloc.s V_9 - IL_adb0: ldloc.s V_7 - IL_adb2: call string [mscorlib]System.Convert::ToString(int32) - IL_adb7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_adbc: stloc.s V_7 - IL_adbe: ldloc.s V_8 - IL_adc0: ldloc.s V_6 - IL_adc2: beq.s IL_ae0c - - IL_adc4: ldloc.s V_10 - IL_adc6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_adcb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_add0: stloc.s V_7 - IL_add2: ldloc.s V_9 - IL_add4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_add9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_adde: stloc.s V_7 - IL_ade0: ldloc.s V_7 - IL_ade2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ade7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_adec: stloc.s V_8 - IL_adee: ldloc.s V_9 - IL_adf0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_adf5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_adfa: stloc.s V_6 - IL_adfc: ldloc.s V_10 - IL_adfe: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ae03: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ae08: stloc.s V_10 - IL_ae0a: br.s IL_ae52 - - IL_ae0c: ldloc.s V_8 - IL_ae0e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ae13: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ae18: stloc.s V_6 - IL_ae1a: ldloc.s V_10 - IL_ae1c: call string [mscorlib]System.Convert::ToString(int32) - IL_ae21: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ae26: stloc.s V_6 - IL_ae28: ldloc.s V_6 - IL_ae2a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ae2f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ae34: stloc.s V_10 - IL_ae36: ldloc.s V_8 - IL_ae38: call string [mscorlib]System.Convert::ToString(int32) - IL_ae3d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ae42: stloc.s V_8 - IL_ae44: ldloc.s V_8 - IL_ae46: call string [mscorlib]System.Convert::ToString(int32) - IL_ae4b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ae50: stloc.s V_8 - IL_ae52: ldloc.s V_6 - IL_ae54: ldloc.s V_9 - IL_ae56: beq.s IL_aea0 - - IL_ae58: ldloc.s V_8 - IL_ae5a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ae5f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ae64: stloc.s V_7 - IL_ae66: ldloc.s V_7 - IL_ae68: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_ae6d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ae72: stloc.s V_6 - IL_ae74: ldloc.s V_10 - IL_ae76: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ae7b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ae80: stloc.s V_8 - IL_ae82: ldloc.s V_8 - IL_ae84: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ae89: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ae8e: stloc.s V_7 - IL_ae90: ldloc.s V_7 - IL_ae92: call string [mscorlib]System.Convert::ToString(int32) - IL_ae97: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ae9c: stloc.s V_7 - IL_ae9e: br.s IL_aee6 - - IL_aea0: ldloc.s V_10 - IL_aea2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_aea7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_aeac: stloc.s V_8 - IL_aeae: ldloc.s V_10 - IL_aeb0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_aeb5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_aeba: stloc.s V_10 - IL_aebc: ldloc.s V_9 - IL_aebe: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_aec3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_aec8: stloc.s V_7 - IL_aeca: ldloc.s V_7 - IL_aecc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_aed1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_aed6: stloc.s V_9 - IL_aed8: ldloc.s V_10 - IL_aeda: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_aedf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_aee4: stloc.s V_6 - IL_aee6: ldloc.s V_6 - IL_aee8: ldloc.s V_6 - IL_aeea: bne.un.s IL_af34 - - IL_aeec: ldloc.s V_8 - IL_aeee: call string [mscorlib]System.Convert::ToString(int32) - IL_aef3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_aef8: stloc.s V_10 - IL_aefa: ldloc.s V_9 - IL_aefc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_af01: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_af06: stloc.s V_8 - IL_af08: ldloc.s V_9 - IL_af0a: call string [mscorlib]System.Convert::ToString(int32) - IL_af0f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_af14: stloc.s V_7 - IL_af16: ldloc.s V_6 - IL_af18: call string [mscorlib]System.Convert::ToString(int32) - IL_af1d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_af22: stloc.s V_10 - IL_af24: ldloc.s V_10 - IL_af26: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_af2b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_af30: stloc.s V_8 - IL_af32: br.s IL_af7a - - IL_af34: ldloc.s V_8 - IL_af36: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_af3b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_af40: stloc.s V_6 - IL_af42: ldloc.s V_7 - IL_af44: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_af49: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_af4e: stloc.s V_9 - IL_af50: ldloc.s V_8 - IL_af52: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_af57: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_af5c: stloc.s V_10 - IL_af5e: ldloc.s V_7 - IL_af60: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_af65: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_af6a: stloc.s V_9 - IL_af6c: ldloc.s V_10 - IL_af6e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_af73: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_af78: stloc.s V_6 - IL_af7a: ldloc.s V_8 - IL_af7c: ldloc.s V_6 - IL_af7e: beq.s IL_afc8 - - IL_af80: ldloc.s V_6 - IL_af82: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_af87: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_af8c: stloc.s V_7 - IL_af8e: ldloc.s V_10 - IL_af90: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_af95: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_af9a: stloc.s V_10 - IL_af9c: ldloc.s V_7 - IL_af9e: call string [mscorlib]System.Convert::ToString(int32) - IL_afa3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_afa8: stloc.s V_6 - IL_afaa: ldloc.s V_9 - IL_afac: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_afb1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_afb6: stloc.s V_7 - IL_afb8: ldloc.s V_10 - IL_afba: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_afbf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_afc4: stloc.s V_9 - IL_afc6: br.s IL_b00e - - IL_afc8: ldloc.s V_6 - IL_afca: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_afcf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_afd4: stloc.s V_7 - IL_afd6: ldloc.s V_6 - IL_afd8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_afdd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_afe2: stloc.s V_8 - IL_afe4: ldloc.s V_8 - IL_afe6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_afeb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_aff0: stloc.s V_10 - IL_aff2: ldloc.s V_10 - IL_aff4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_aff9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_affe: stloc.s V_6 - IL_b000: ldloc.s V_6 - IL_b002: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b007: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b00c: stloc.s V_8 - IL_b00e: ldloc.s V_10 - IL_b010: ldloc.s V_6 - IL_b012: bne.un.s IL_b05c - - IL_b014: ldloc.s V_9 - IL_b016: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b01b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b020: stloc.s V_10 - IL_b022: ldloc.s V_6 - IL_b024: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b029: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b02e: stloc.s V_9 - IL_b030: ldloc.s V_7 - IL_b032: call string [mscorlib]System.Convert::ToString(int32) - IL_b037: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b03c: stloc.s V_8 - IL_b03e: ldloc.s V_9 - IL_b040: call string [mscorlib]System.Convert::ToString(int32) - IL_b045: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b04a: stloc.s V_10 - IL_b04c: ldloc.s V_7 - IL_b04e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b053: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b058: stloc.s V_9 - IL_b05a: br.s IL_b0a2 - - IL_b05c: ldloc.s V_8 - IL_b05e: call string [mscorlib]System.Convert::ToString(int32) - IL_b063: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b068: stloc.s V_8 - IL_b06a: ldloc.s V_7 - IL_b06c: call string [mscorlib]System.Convert::ToString(int32) - IL_b071: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b076: stloc.s V_9 - IL_b078: ldloc.s V_7 - IL_b07a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b07f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b084: stloc.s V_6 - IL_b086: ldloc.s V_6 - IL_b088: call string [mscorlib]System.Convert::ToString(int32) - IL_b08d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b092: stloc.s V_8 - IL_b094: ldloc.s V_8 - IL_b096: call string [mscorlib]System.Convert::ToString(int32) - IL_b09b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b0a0: stloc.s V_6 - IL_b0a2: ldloc.s V_8 - IL_b0a4: ldloc.s V_7 - IL_b0a6: bge.s IL_b0f0 - - IL_b0a8: ldloc.s V_10 - IL_b0aa: call string [mscorlib]System.Convert::ToString(int32) - IL_b0af: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b0b4: stloc.s V_8 - IL_b0b6: ldloc.s V_9 - IL_b0b8: call string [mscorlib]System.Convert::ToString(int32) - IL_b0bd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b0c2: stloc.s V_6 - IL_b0c4: ldloc.s V_8 - IL_b0c6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b0cb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b0d0: stloc.s V_6 - IL_b0d2: ldloc.s V_8 - IL_b0d4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b0d9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b0de: stloc.s V_10 - IL_b0e0: ldloc.s V_10 - IL_b0e2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b0e7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b0ec: stloc.s V_10 - IL_b0ee: br.s IL_b136 - - IL_b0f0: ldloc.s V_8 - IL_b0f2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b0f7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b0fc: stloc.s V_9 - IL_b0fe: ldloc.s V_8 - IL_b100: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b105: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b10a: stloc.s V_9 - IL_b10c: ldloc.s V_9 - IL_b10e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b113: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b118: stloc.s V_9 - IL_b11a: ldloc.s V_9 - IL_b11c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b121: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b126: stloc.s V_8 - IL_b128: ldloc.s V_6 - IL_b12a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b12f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b134: stloc.s V_10 - IL_b136: ldloc.s V_9 - IL_b138: ldloc.s V_7 - IL_b13a: bne.un.s IL_b184 - - IL_b13c: ldloc.s V_7 - IL_b13e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b143: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b148: stloc.s V_8 - IL_b14a: ldloc.s V_10 - IL_b14c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b151: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b156: stloc.s V_7 - IL_b158: ldloc.s V_8 - IL_b15a: call string [mscorlib]System.Convert::ToString(int32) - IL_b15f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b164: stloc.s V_10 - IL_b166: ldloc.s V_8 - IL_b168: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b16d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b172: stloc.s V_10 - IL_b174: ldloc.s V_8 - IL_b176: call string [mscorlib]System.Convert::ToString(int32) - IL_b17b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b180: stloc.s V_9 - IL_b182: br.s IL_b1ca - - IL_b184: ldloc.s V_8 - IL_b186: call string [mscorlib]System.Convert::ToString(int32) - IL_b18b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b190: stloc.s V_7 - IL_b192: ldloc.s V_7 - IL_b194: call string [mscorlib]System.Convert::ToString(int32) - IL_b199: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b19e: stloc.s V_10 - IL_b1a0: ldloc.s V_9 - IL_b1a2: call string [mscorlib]System.Convert::ToString(int32) - IL_b1a7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b1ac: stloc.s V_10 - IL_b1ae: ldloc.s V_8 - IL_b1b0: call string [mscorlib]System.Convert::ToString(int32) - IL_b1b5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b1ba: stloc.s V_6 - IL_b1bc: ldloc.s V_9 - IL_b1be: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b1c3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b1c8: stloc.s V_10 - IL_b1ca: ldloc.s V_10 - IL_b1cc: ldloc.s V_6 - IL_b1ce: blt.s IL_b218 - - IL_b1d0: ldloc.s V_6 - IL_b1d2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b1d7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b1dc: stloc.s V_7 - IL_b1de: ldloc.s V_10 - IL_b1e0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b1e5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b1ea: stloc.s V_8 - IL_b1ec: ldloc.s V_7 - IL_b1ee: call string [mscorlib]System.Convert::ToString(int32) - IL_b1f3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b1f8: stloc.s V_8 - IL_b1fa: ldloc.s V_9 - IL_b1fc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b201: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b206: stloc.s V_10 - IL_b208: ldloc.s V_8 - IL_b20a: call string [mscorlib]System.Convert::ToString(int32) - IL_b20f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b214: stloc.s V_7 - IL_b216: br.s IL_b25e - - IL_b218: ldloc.s V_10 - IL_b21a: call string [mscorlib]System.Convert::ToString(int32) - IL_b21f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b224: stloc.s V_6 - IL_b226: ldloc.s V_6 - IL_b228: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b22d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b232: stloc.s V_9 - IL_b234: ldloc.s V_8 - IL_b236: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b23b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b240: stloc.s V_10 - IL_b242: ldloc.s V_8 - IL_b244: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b249: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b24e: stloc.s V_9 - IL_b250: ldloc.s V_8 - IL_b252: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b257: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b25c: stloc.s V_8 - IL_b25e: ldloc.s V_9 - IL_b260: ldloc.s V_7 - IL_b262: beq.s IL_b2ac - - IL_b264: ldloc.s V_7 - IL_b266: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b26b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b270: stloc.s V_7 - IL_b272: ldloc.s V_6 - IL_b274: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b279: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b27e: stloc.s V_7 - IL_b280: ldloc.s V_10 - IL_b282: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b287: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b28c: stloc.s V_9 - IL_b28e: ldloc.s V_10 - IL_b290: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b295: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b29a: stloc.s V_10 - IL_b29c: ldloc.s V_6 - IL_b29e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b2a3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b2a8: stloc.s V_10 - IL_b2aa: br.s IL_b2f2 - - IL_b2ac: ldloc.s V_9 - IL_b2ae: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b2b3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b2b8: stloc.s V_6 - IL_b2ba: ldloc.s V_6 - IL_b2bc: call string [mscorlib]System.Convert::ToString(int32) - IL_b2c1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b2c6: stloc.s V_10 - IL_b2c8: ldloc.s V_10 - IL_b2ca: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b2cf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b2d4: stloc.s V_6 - IL_b2d6: ldloc.s V_6 - IL_b2d8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b2dd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b2e2: stloc.s V_8 - IL_b2e4: ldloc.s V_9 - IL_b2e6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b2eb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b2f0: stloc.s V_7 - IL_b2f2: ldloc.s V_10 - IL_b2f4: ldloc.s V_7 - IL_b2f6: beq.s IL_b340 - - IL_b2f8: ldloc.s V_6 - IL_b2fa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b2ff: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b304: stloc.s V_8 - IL_b306: ldloc.s V_9 - IL_b308: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b30d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b312: stloc.s V_6 - IL_b314: ldloc.s V_8 - IL_b316: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b31b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b320: stloc.s V_9 - IL_b322: ldloc.s V_8 - IL_b324: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b329: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b32e: stloc.s V_7 - IL_b330: ldloc.s V_7 - IL_b332: call string [mscorlib]System.Convert::ToString(int32) - IL_b337: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b33c: stloc.s V_9 - IL_b33e: br.s IL_b386 - - IL_b340: ldloc.s V_6 - IL_b342: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b347: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b34c: stloc.s V_8 - IL_b34e: ldloc.s V_10 - IL_b350: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b355: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b35a: stloc.s V_10 - IL_b35c: ldloc.s V_6 - IL_b35e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b363: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b368: stloc.s V_6 - IL_b36a: ldloc.s V_10 - IL_b36c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b371: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b376: stloc.s V_8 - IL_b378: ldloc.s V_7 - IL_b37a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b37f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b384: stloc.s V_6 - IL_b386: ldloc.s V_6 - IL_b388: ldloc.s V_6 - IL_b38a: ble.s IL_b3d4 - - IL_b38c: ldloc.s V_9 - IL_b38e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b393: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b398: stloc.s V_9 - IL_b39a: ldloc.s V_10 - IL_b39c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b3a1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b3a6: stloc.s V_10 - IL_b3a8: ldloc.s V_9 - IL_b3aa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b3af: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b3b4: stloc.s V_10 - IL_b3b6: ldloc.s V_8 - IL_b3b8: call string [mscorlib]System.Convert::ToString(int32) - IL_b3bd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b3c2: stloc.s V_8 - IL_b3c4: ldloc.s V_6 - IL_b3c6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b3cb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b3d0: stloc.s V_8 - IL_b3d2: br.s IL_b41a - - IL_b3d4: ldloc.s V_8 - IL_b3d6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b3db: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b3e0: stloc.s V_9 - IL_b3e2: ldloc.s V_10 - IL_b3e4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b3e9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b3ee: stloc.s V_9 - IL_b3f0: ldloc.s V_9 - IL_b3f2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b3f7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b3fc: stloc.s V_7 - IL_b3fe: ldloc.s V_10 - IL_b400: call string [mscorlib]System.Convert::ToString(int32) - IL_b405: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b40a: stloc.s V_6 - IL_b40c: ldloc.s V_8 - IL_b40e: call string [mscorlib]System.Convert::ToString(int32) - IL_b413: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b418: stloc.s V_10 - IL_b41a: ldloc.s V_7 - IL_b41c: ldloc.s V_10 - IL_b41e: bge.s IL_b468 - - IL_b420: ldloc.s V_7 - IL_b422: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b427: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b42c: stloc.s V_7 - IL_b42e: ldloc.s V_9 - IL_b430: call string [mscorlib]System.Convert::ToString(int32) - IL_b435: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b43a: stloc.s V_8 - IL_b43c: ldloc.s V_10 - IL_b43e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b443: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b448: stloc.s V_6 - IL_b44a: ldloc.s V_8 - IL_b44c: call string [mscorlib]System.Convert::ToString(int32) - IL_b451: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b456: stloc.s V_6 - IL_b458: ldloc.s V_10 - IL_b45a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b45f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b464: stloc.s V_8 - IL_b466: br.s IL_b4ae - - IL_b468: ldloc.s V_8 - IL_b46a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b46f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b474: stloc.s V_10 - IL_b476: ldloc.s V_6 - IL_b478: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b47d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b482: stloc.s V_9 - IL_b484: ldloc.s V_10 - IL_b486: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b48b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b490: stloc.s V_6 - IL_b492: ldloc.s V_7 - IL_b494: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b499: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b49e: stloc.s V_6 - IL_b4a0: ldloc.s V_9 - IL_b4a2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b4a7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b4ac: stloc.s V_6 - IL_b4ae: ldloc.s V_7 - IL_b4b0: ldloc.s V_8 - IL_b4b2: bge.s IL_b4fc - - IL_b4b4: ldloc.s V_10 - IL_b4b6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b4bb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b4c0: stloc.s V_9 - IL_b4c2: ldloc.s V_7 - IL_b4c4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b4c9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b4ce: stloc.s V_9 - IL_b4d0: ldloc.s V_10 - IL_b4d2: call string [mscorlib]System.Convert::ToString(int32) - IL_b4d7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b4dc: stloc.s V_10 - IL_b4de: ldloc.s V_10 - IL_b4e0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b4e5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b4ea: stloc.s V_6 - IL_b4ec: ldloc.s V_9 - IL_b4ee: call string [mscorlib]System.Convert::ToString(int32) - IL_b4f3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b4f8: stloc.s V_7 - IL_b4fa: br.s IL_b542 - - IL_b4fc: ldloc.s V_6 - IL_b4fe: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b503: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b508: stloc.s V_10 - IL_b50a: ldloc.s V_9 - IL_b50c: call string [mscorlib]System.Convert::ToString(int32) - IL_b511: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b516: stloc.s V_6 - IL_b518: ldloc.s V_8 - IL_b51a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b51f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b524: stloc.s V_9 - IL_b526: ldloc.s V_9 - IL_b528: call string [mscorlib]System.Convert::ToString(int32) - IL_b52d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b532: stloc.s V_7 - IL_b534: ldloc.s V_6 - IL_b536: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b53b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b540: stloc.s V_7 - IL_b542: ldloc.s V_10 - IL_b544: ldloc.s V_7 - IL_b546: bge.s IL_b590 - - IL_b548: ldloc.s V_10 - IL_b54a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b54f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b554: stloc.s V_6 - IL_b556: ldloc.s V_6 - IL_b558: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b55d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b562: stloc.s V_6 - IL_b564: ldloc.s V_10 - IL_b566: call string [mscorlib]System.Convert::ToString(int32) - IL_b56b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b570: stloc.s V_7 - IL_b572: ldloc.s V_6 - IL_b574: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b579: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b57e: stloc.s V_7 - IL_b580: ldloc.s V_7 - IL_b582: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b587: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b58c: stloc.s V_6 - IL_b58e: br.s IL_b5d6 - - IL_b590: ldloc.s V_10 - IL_b592: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b597: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b59c: stloc.s V_8 - IL_b59e: ldloc.s V_9 - IL_b5a0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b5a5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b5aa: stloc.s V_8 - IL_b5ac: ldloc.s V_10 - IL_b5ae: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b5b3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b5b8: stloc.s V_9 - IL_b5ba: ldloc.s V_9 - IL_b5bc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b5c1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b5c6: stloc.s V_8 - IL_b5c8: ldloc.s V_8 - IL_b5ca: call string [mscorlib]System.Convert::ToString(int32) - IL_b5cf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b5d4: stloc.s V_8 - IL_b5d6: ldloc.s V_10 - IL_b5d8: ldloc.s V_7 - IL_b5da: bne.un.s IL_b624 - - IL_b5dc: ldloc.s V_9 - IL_b5de: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b5e3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b5e8: stloc.s V_9 - IL_b5ea: ldloc.s V_6 - IL_b5ec: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b5f1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b5f6: stloc.s V_10 - IL_b5f8: ldloc.s V_10 - IL_b5fa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b5ff: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b604: stloc.s V_10 - IL_b606: ldloc.s V_6 - IL_b608: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b60d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b612: stloc.s V_10 - IL_b614: ldloc.s V_9 - IL_b616: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b61b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b620: stloc.s V_7 - IL_b622: br.s IL_b66a - - IL_b624: ldloc.s V_10 - IL_b626: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b62b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b630: stloc.s V_8 - IL_b632: ldloc.s V_9 - IL_b634: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b639: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b63e: stloc.s V_6 - IL_b640: ldloc.s V_10 - IL_b642: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b647: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b64c: stloc.s V_8 - IL_b64e: ldloc.s V_8 - IL_b650: call string [mscorlib]System.Convert::ToString(int32) - IL_b655: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b65a: stloc.s V_10 - IL_b65c: ldloc.s V_6 - IL_b65e: call string [mscorlib]System.Convert::ToString(int32) - IL_b663: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b668: stloc.s V_8 - IL_b66a: ldloc.s V_8 - IL_b66c: ldloc.s V_7 - IL_b66e: blt.s IL_b6b8 - - IL_b670: ldloc.s V_8 - IL_b672: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b677: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b67c: stloc.s V_10 - IL_b67e: ldloc.s V_7 - IL_b680: call string [mscorlib]System.Convert::ToString(int32) - IL_b685: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b68a: stloc.s V_8 - IL_b68c: ldloc.s V_7 - IL_b68e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b693: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b698: stloc.s V_10 - IL_b69a: ldloc.s V_9 - IL_b69c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b6a1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b6a6: stloc.s V_9 - IL_b6a8: ldloc.s V_6 - IL_b6aa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b6af: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b6b4: stloc.s V_9 - IL_b6b6: br.s IL_b6fe - - IL_b6b8: ldloc.s V_9 - IL_b6ba: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b6bf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b6c4: stloc.s V_10 - IL_b6c6: ldloc.s V_6 - IL_b6c8: call string [mscorlib]System.Convert::ToString(int32) - IL_b6cd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b6d2: stloc.s V_8 - IL_b6d4: ldloc.s V_10 - IL_b6d6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b6db: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b6e0: stloc.s V_8 - IL_b6e2: ldloc.s V_7 - IL_b6e4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b6e9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b6ee: stloc.s V_9 - IL_b6f0: ldloc.s V_6 - IL_b6f2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b6f7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b6fc: stloc.s V_8 - IL_b6fe: ldloc.s V_7 - IL_b700: ldloc.s V_10 - IL_b702: beq.s IL_b74c - - IL_b704: ldloc.s V_10 - IL_b706: call string [mscorlib]System.Convert::ToString(int32) - IL_b70b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b710: stloc.s V_10 - IL_b712: ldloc.s V_6 - IL_b714: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b719: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b71e: stloc.s V_6 - IL_b720: ldloc.s V_7 - IL_b722: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b727: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b72c: stloc.s V_8 - IL_b72e: ldloc.s V_7 - IL_b730: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b735: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b73a: stloc.s V_8 - IL_b73c: ldloc.s V_8 - IL_b73e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b743: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b748: stloc.s V_7 - IL_b74a: br.s IL_b792 - - IL_b74c: ldloc.s V_9 - IL_b74e: call string [mscorlib]System.Convert::ToString(int32) - IL_b753: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b758: stloc.s V_8 - IL_b75a: ldloc.s V_10 - IL_b75c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b761: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b766: stloc.s V_7 - IL_b768: ldloc.s V_7 - IL_b76a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b76f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b774: stloc.s V_7 - IL_b776: ldloc.s V_9 - IL_b778: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b77d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b782: stloc.s V_9 - IL_b784: ldloc.s V_6 - IL_b786: call string [mscorlib]System.Convert::ToString(int32) - IL_b78b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b790: stloc.s V_6 - IL_b792: ldloc.s V_9 - IL_b794: ldloc.s V_8 - IL_b796: bge.s IL_b7e0 - - IL_b798: ldloc.s V_8 - IL_b79a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b79f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b7a4: stloc.s V_9 - IL_b7a6: ldloc.s V_6 - IL_b7a8: call string [mscorlib]System.Convert::ToString(int32) - IL_b7ad: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b7b2: stloc.s V_6 - IL_b7b4: ldloc.s V_8 - IL_b7b6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b7bb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b7c0: stloc.s V_8 - IL_b7c2: ldloc.s V_6 - IL_b7c4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b7c9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b7ce: stloc.s V_9 - IL_b7d0: ldloc.s V_10 - IL_b7d2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b7d7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b7dc: stloc.s V_9 - IL_b7de: br.s IL_b826 - - IL_b7e0: ldloc.s V_9 - IL_b7e2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b7e7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b7ec: stloc.s V_9 - IL_b7ee: ldloc.s V_8 - IL_b7f0: call string [mscorlib]System.Convert::ToString(int32) - IL_b7f5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b7fa: stloc.s V_8 - IL_b7fc: ldloc.s V_7 - IL_b7fe: call string [mscorlib]System.Convert::ToString(int32) - IL_b803: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b808: stloc.s V_10 - IL_b80a: ldloc.s V_6 - IL_b80c: call string [mscorlib]System.Convert::ToString(int32) - IL_b811: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b816: stloc.s V_9 - IL_b818: ldloc.s V_9 - IL_b81a: call string [mscorlib]System.Convert::ToString(int32) - IL_b81f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b824: stloc.s V_8 - IL_b826: ldloc.s V_6 - IL_b828: ldloc.s V_6 - IL_b82a: bge.s IL_b874 - - IL_b82c: ldloc.s V_7 - IL_b82e: call string [mscorlib]System.Convert::ToString(int32) - IL_b833: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b838: stloc.s V_9 - IL_b83a: ldloc.s V_6 - IL_b83c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b841: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b846: stloc.s V_6 - IL_b848: ldloc.s V_10 - IL_b84a: call string [mscorlib]System.Convert::ToString(int32) - IL_b84f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b854: stloc.s V_8 - IL_b856: ldloc.s V_7 - IL_b858: call string [mscorlib]System.Convert::ToString(int32) - IL_b85d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b862: stloc.s V_8 - IL_b864: ldloc.s V_7 - IL_b866: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b86b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b870: stloc.s V_6 - IL_b872: br.s IL_b8ba - - IL_b874: ldloc.s V_9 - IL_b876: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b87b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b880: stloc.s V_10 - IL_b882: ldloc.s V_6 - IL_b884: call string [mscorlib]System.Convert::ToString(int32) - IL_b889: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b88e: stloc.s V_7 - IL_b890: ldloc.s V_6 - IL_b892: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b897: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b89c: stloc.s V_6 - IL_b89e: ldloc.s V_6 - IL_b8a0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b8a5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b8aa: stloc.s V_7 - IL_b8ac: ldloc.s V_8 - IL_b8ae: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b8b3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b8b8: stloc.s V_6 - IL_b8ba: ldloc.s V_7 - IL_b8bc: ldloc.s V_10 - IL_b8be: bne.un.s IL_b908 - - IL_b8c0: ldloc.s V_10 - IL_b8c2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b8c7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b8cc: stloc.s V_6 - IL_b8ce: ldloc.s V_8 - IL_b8d0: call string [mscorlib]System.Convert::ToString(int32) - IL_b8d5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b8da: stloc.s V_8 - IL_b8dc: ldloc.s V_10 - IL_b8de: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b8e3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b8e8: stloc.s V_9 - IL_b8ea: ldloc.s V_6 - IL_b8ec: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b8f1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b8f6: stloc.s V_9 - IL_b8f8: ldloc.s V_9 - IL_b8fa: call string [mscorlib]System.Convert::ToString(int32) - IL_b8ff: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b904: stloc.s V_10 - IL_b906: br.s IL_b94e - - IL_b908: ldloc.s V_6 - IL_b90a: call string [mscorlib]System.Convert::ToString(int32) - IL_b90f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b914: stloc.s V_9 - IL_b916: ldloc.s V_8 - IL_b918: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b91d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b922: stloc.s V_6 - IL_b924: ldloc.s V_9 - IL_b926: call string [mscorlib]System.Convert::ToString(int32) - IL_b92b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b930: stloc.s V_10 - IL_b932: ldloc.s V_6 - IL_b934: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b939: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b93e: stloc.s V_6 - IL_b940: ldloc.s V_9 - IL_b942: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b947: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b94c: stloc.s V_10 - IL_b94e: ldloc.s V_9 - IL_b950: ldloc.s V_6 - IL_b952: blt.s IL_b99c - - IL_b954: ldloc.s V_6 - IL_b956: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b95b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b960: stloc.s V_7 - IL_b962: ldloc.s V_9 - IL_b964: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b969: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b96e: stloc.s V_8 - IL_b970: ldloc.s V_9 - IL_b972: call string [mscorlib]System.Convert::ToString(int32) - IL_b977: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b97c: stloc.s V_7 - IL_b97e: ldloc.s V_7 - IL_b980: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b985: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b98a: stloc.s V_7 - IL_b98c: ldloc.s V_10 - IL_b98e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b993: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b998: stloc.s V_10 - IL_b99a: br.s IL_b9e2 - - IL_b99c: ldloc.s V_8 - IL_b99e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b9a3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b9a8: stloc.s V_8 - IL_b9aa: ldloc.s V_8 - IL_b9ac: call string [mscorlib]System.Convert::ToString(int32) - IL_b9b1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b9b6: stloc.s V_7 - IL_b9b8: ldloc.s V_7 - IL_b9ba: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b9bf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b9c4: stloc.s V_8 - IL_b9c6: ldloc.s V_10 - IL_b9c8: call string [mscorlib]System.Convert::ToString(int32) - IL_b9cd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b9d2: stloc.s V_7 - IL_b9d4: ldloc.s V_8 - IL_b9d6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b9db: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b9e0: stloc.s V_7 - IL_b9e2: ldloc.s V_7 - IL_b9e4: ldloc.s V_9 - IL_b9e6: bge.s IL_ba30 - - IL_b9e8: ldloc.s V_8 - IL_b9ea: call string [mscorlib]System.Convert::ToString(int32) - IL_b9ef: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b9f4: stloc.s V_6 - IL_b9f6: ldloc.s V_7 - IL_b9f8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b9fd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ba02: stloc.s V_9 - IL_ba04: ldloc.s V_7 - IL_ba06: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ba0b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ba10: stloc.s V_7 - IL_ba12: ldloc.s V_6 - IL_ba14: call string [mscorlib]System.Convert::ToString(int32) - IL_ba19: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ba1e: stloc.s V_9 - IL_ba20: ldloc.s V_8 - IL_ba22: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_ba27: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ba2c: stloc.s V_7 - IL_ba2e: br.s IL_ba76 - - IL_ba30: ldloc.s V_6 - IL_ba32: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ba37: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ba3c: stloc.s V_7 - IL_ba3e: ldloc.s V_6 - IL_ba40: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ba45: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ba4a: stloc.s V_6 - IL_ba4c: ldloc.s V_6 - IL_ba4e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ba53: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ba58: stloc.s V_9 - IL_ba5a: ldloc.s V_10 - IL_ba5c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_ba61: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ba66: stloc.s V_9 - IL_ba68: ldloc.s V_10 - IL_ba6a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ba6f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ba74: stloc.s V_10 - IL_ba76: ldloc.s V_6 - IL_ba78: ldloc.s V_7 - IL_ba7a: ble.s IL_bac4 - - IL_ba7c: ldloc.s V_9 - IL_ba7e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ba83: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ba88: stloc.s V_9 - IL_ba8a: ldloc.s V_6 - IL_ba8c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ba91: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ba96: stloc.s V_7 - IL_ba98: ldloc.s V_9 - IL_ba9a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ba9f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_baa4: stloc.s V_7 - IL_baa6: ldloc.s V_8 - IL_baa8: call string [mscorlib]System.Convert::ToString(int32) - IL_baad: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bab2: stloc.s V_6 - IL_bab4: ldloc.s V_8 - IL_bab6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_babb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bac0: stloc.s V_6 - IL_bac2: br.s IL_bb0a - - IL_bac4: ldloc.s V_8 - IL_bac6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bacb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bad0: stloc.s V_7 - IL_bad2: ldloc.s V_7 - IL_bad4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bad9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bade: stloc.s V_8 - IL_bae0: ldloc.s V_9 - IL_bae2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_bae7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_baec: stloc.s V_8 - IL_baee: ldloc.s V_6 - IL_baf0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_baf5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bafa: stloc.s V_8 - IL_bafc: ldloc.s V_10 - IL_bafe: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_bb03: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_bb08: stloc.s V_8 - IL_bb0a: ldloc.s V_9 - IL_bb0c: ldloc.s V_8 - IL_bb0e: bgt.s IL_bb58 - - IL_bb10: ldloc.s V_6 - IL_bb12: call string [mscorlib]System.Convert::ToString(int32) - IL_bb17: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bb1c: stloc.s V_10 - IL_bb1e: ldloc.s V_8 - IL_bb20: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bb25: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bb2a: stloc.s V_9 - IL_bb2c: ldloc.s V_6 - IL_bb2e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bb33: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bb38: stloc.s V_6 - IL_bb3a: ldloc.s V_6 - IL_bb3c: call string [mscorlib]System.Convert::ToString(int32) - IL_bb41: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bb46: stloc.s V_8 - IL_bb48: ldloc.s V_7 - IL_bb4a: call string [mscorlib]System.Convert::ToString(int32) - IL_bb4f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bb54: stloc.s V_8 - IL_bb56: br.s IL_bb9e - - IL_bb58: ldloc.s V_10 - IL_bb5a: call string [mscorlib]System.Convert::ToString(int32) - IL_bb5f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bb64: stloc.s V_7 - IL_bb66: ldloc.s V_10 - IL_bb68: call string [mscorlib]System.Convert::ToString(int32) - IL_bb6d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bb72: stloc.s V_7 - IL_bb74: ldloc.s V_8 - IL_bb76: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bb7b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bb80: stloc.s V_10 - IL_bb82: ldloc.s V_6 - IL_bb84: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bb89: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bb8e: stloc.s V_10 - IL_bb90: ldloc.s V_8 - IL_bb92: call string [mscorlib]System.Convert::ToString(int32) - IL_bb97: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bb9c: stloc.s V_6 - IL_bb9e: ldloc.s V_8 - IL_bba0: ldloc.s V_6 - IL_bba2: bne.un.s IL_bbec - - IL_bba4: ldloc.s V_7 - IL_bba6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bbab: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bbb0: stloc.s V_10 - IL_bbb2: ldloc.s V_6 - IL_bbb4: call string [mscorlib]System.Convert::ToString(int32) - IL_bbb9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bbbe: stloc.s V_7 - IL_bbc0: ldloc.s V_7 - IL_bbc2: call string [mscorlib]System.Convert::ToString(int32) - IL_bbc7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bbcc: stloc.s V_6 - IL_bbce: ldloc.s V_9 - IL_bbd0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bbd5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bbda: stloc.s V_7 - IL_bbdc: ldloc.s V_7 - IL_bbde: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bbe3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bbe8: stloc.s V_8 - IL_bbea: br.s IL_bc32 - - IL_bbec: ldloc.s V_10 - IL_bbee: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bbf3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bbf8: stloc.s V_9 - IL_bbfa: ldloc.s V_10 - IL_bbfc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bc01: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bc06: stloc.s V_6 - IL_bc08: ldloc.s V_7 - IL_bc0a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bc0f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bc14: stloc.s V_8 - IL_bc16: ldloc.s V_6 - IL_bc18: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bc1d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bc22: stloc.s V_8 - IL_bc24: ldloc.s V_6 - IL_bc26: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bc2b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bc30: stloc.s V_7 - IL_bc32: ldloc.s V_9 - IL_bc34: ldloc.s V_6 - IL_bc36: bgt.s IL_bc80 - - IL_bc38: ldloc.s V_7 - IL_bc3a: call string [mscorlib]System.Convert::ToString(int32) - IL_bc3f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bc44: stloc.s V_6 - IL_bc46: ldloc.s V_10 - IL_bc48: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bc4d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bc52: stloc.s V_10 - IL_bc54: ldloc.s V_6 - IL_bc56: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bc5b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bc60: stloc.s V_10 - IL_bc62: ldloc.s V_6 - IL_bc64: call string [mscorlib]System.Convert::ToString(int32) - IL_bc69: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bc6e: stloc.s V_9 - IL_bc70: ldloc.s V_6 - IL_bc72: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_bc77: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_bc7c: stloc.s V_10 - IL_bc7e: br.s IL_bcc6 - - IL_bc80: ldloc.s V_9 - IL_bc82: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_bc87: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_bc8c: stloc.s V_10 - IL_bc8e: ldloc.s V_7 - IL_bc90: call string [mscorlib]System.Convert::ToString(int32) - IL_bc95: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bc9a: stloc.s V_8 - IL_bc9c: ldloc.s V_7 - IL_bc9e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_bca3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_bca8: stloc.s V_6 - IL_bcaa: ldloc.s V_9 - IL_bcac: call string [mscorlib]System.Convert::ToString(int32) - IL_bcb1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bcb6: stloc.s V_6 - IL_bcb8: ldloc.s V_8 - IL_bcba: call string [mscorlib]System.Convert::ToString(int32) - IL_bcbf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bcc4: stloc.s V_6 - IL_bcc6: ldloc.s V_9 - IL_bcc8: ldloc.s V_8 - IL_bcca: ble.s IL_bd14 - - IL_bccc: ldloc.s V_7 - IL_bcce: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_bcd3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_bcd8: stloc.s V_9 - IL_bcda: ldloc.s V_6 - IL_bcdc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bce1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bce6: stloc.s V_10 - IL_bce8: ldloc.s V_10 - IL_bcea: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_bcef: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_bcf4: stloc.s V_10 - IL_bcf6: ldloc.s V_7 - IL_bcf8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bcfd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bd02: stloc.s V_10 - IL_bd04: ldloc.s V_8 - IL_bd06: call string [mscorlib]System.Convert::ToString(int32) - IL_bd0b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bd10: stloc.s V_7 - IL_bd12: br.s IL_bd5a - - IL_bd14: ldloc.s V_9 - IL_bd16: call string [mscorlib]System.Convert::ToString(int32) - IL_bd1b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bd20: stloc.s V_6 - IL_bd22: ldloc.s V_10 - IL_bd24: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bd29: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bd2e: stloc.s V_8 - IL_bd30: ldloc.s V_7 - IL_bd32: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bd37: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bd3c: stloc.s V_9 - IL_bd3e: ldloc.s V_8 - IL_bd40: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bd45: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bd4a: stloc.s V_6 - IL_bd4c: ldloc.s V_8 - IL_bd4e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bd53: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bd58: stloc.s V_7 - IL_bd5a: ldloc.s V_9 - IL_bd5c: ldloc.s V_10 - IL_bd5e: bgt.s IL_bda8 - - IL_bd60: ldloc.s V_10 - IL_bd62: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bd67: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bd6c: stloc.s V_9 - IL_bd6e: ldloc.s V_8 - IL_bd70: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bd75: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bd7a: stloc.s V_9 - IL_bd7c: ldloc.s V_8 - IL_bd7e: call string [mscorlib]System.Convert::ToString(int32) - IL_bd83: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bd88: stloc.s V_9 - IL_bd8a: ldloc.s V_8 - IL_bd8c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bd91: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bd96: stloc.s V_8 - IL_bd98: ldloc.s V_10 - IL_bd9a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bd9f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bda4: stloc.s V_10 - IL_bda6: br.s IL_bdee - - IL_bda8: ldloc.s V_6 - IL_bdaa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bdaf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bdb4: stloc.s V_6 - IL_bdb6: ldloc.s V_10 - IL_bdb8: call string [mscorlib]System.Convert::ToString(int32) - IL_bdbd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bdc2: stloc.s V_10 - IL_bdc4: ldloc.s V_8 - IL_bdc6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bdcb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bdd0: stloc.s V_8 - IL_bdd2: ldloc.s V_10 - IL_bdd4: call string [mscorlib]System.Convert::ToString(int32) - IL_bdd9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bdde: stloc.s V_10 - IL_bde0: ldloc.s V_8 - IL_bde2: call string [mscorlib]System.Convert::ToString(int32) - IL_bde7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bdec: stloc.s V_8 - IL_bdee: ldloc.s V_7 - IL_bdf0: ldloc.s V_6 - IL_bdf2: blt.s IL_be3c - - IL_bdf4: ldloc.s V_8 - IL_bdf6: call string [mscorlib]System.Convert::ToString(int32) - IL_bdfb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_be00: stloc.s V_8 - IL_be02: ldloc.s V_9 - IL_be04: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_be09: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_be0e: stloc.s V_9 - IL_be10: ldloc.s V_7 - IL_be12: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_be17: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_be1c: stloc.s V_7 - IL_be1e: ldloc.s V_9 - IL_be20: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_be25: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_be2a: stloc.s V_8 - IL_be2c: ldloc.s V_6 - IL_be2e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_be33: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_be38: stloc.s V_9 - IL_be3a: br.s IL_be82 - - IL_be3c: ldloc.s V_10 - IL_be3e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_be43: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_be48: stloc.s V_8 - IL_be4a: ldloc.s V_6 - IL_be4c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_be51: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_be56: stloc.s V_7 - IL_be58: ldloc.s V_6 - IL_be5a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_be5f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_be64: stloc.s V_6 - IL_be66: ldloc.s V_7 - IL_be68: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_be6d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_be72: stloc.s V_7 - IL_be74: ldloc.s V_10 - IL_be76: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_be7b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_be80: stloc.s V_8 - IL_be82: ldloc.s V_6 - IL_be84: ldloc.s V_10 - IL_be86: beq.s IL_bed0 - - IL_be88: ldloc.s V_7 - IL_be8a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_be8f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_be94: stloc.s V_8 - IL_be96: ldloc.s V_9 - IL_be98: call string [mscorlib]System.Convert::ToString(int32) - IL_be9d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bea2: stloc.s V_7 - IL_bea4: ldloc.s V_9 - IL_bea6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_beab: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_beb0: stloc.s V_8 - IL_beb2: ldloc.s V_9 - IL_beb4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_beb9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bebe: stloc.s V_8 - IL_bec0: ldloc.s V_8 - IL_bec2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_bec7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_becc: stloc.s V_9 - IL_bece: br.s IL_bf16 - - IL_bed0: ldloc.s V_9 - IL_bed2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bed7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bedc: stloc.s V_9 - IL_bede: ldloc.s V_8 - IL_bee0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bee5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_beea: stloc.s V_8 - IL_beec: ldloc.s V_7 - IL_beee: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_bef3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_bef8: stloc.s V_10 - IL_befa: ldloc.s V_8 - IL_befc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_bf01: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_bf06: stloc.s V_8 - IL_bf08: ldloc.s V_10 - IL_bf0a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bf0f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bf14: stloc.s V_7 - IL_bf16: ldloc.s V_8 - IL_bf18: ldloc.s V_7 - IL_bf1a: blt.s IL_bf64 - - IL_bf1c: ldloc.s V_10 - IL_bf1e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bf23: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bf28: stloc.s V_10 - IL_bf2a: ldloc.s V_8 - IL_bf2c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bf31: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bf36: stloc.s V_10 - IL_bf38: ldloc.s V_7 - IL_bf3a: call string [mscorlib]System.Convert::ToString(int32) - IL_bf3f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bf44: stloc.s V_6 - IL_bf46: ldloc.s V_7 - IL_bf48: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_bf4d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_bf52: stloc.s V_8 - IL_bf54: ldloc.s V_8 - IL_bf56: call string [mscorlib]System.Convert::ToString(int32) - IL_bf5b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bf60: stloc.s V_7 - IL_bf62: br.s IL_bfaa - - IL_bf64: ldloc.s V_10 - IL_bf66: call string [mscorlib]System.Convert::ToString(int32) - IL_bf6b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bf70: stloc.s V_10 - IL_bf72: ldloc.s V_10 - IL_bf74: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_bf79: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_bf7e: stloc.s V_7 - IL_bf80: ldloc.s V_10 - IL_bf82: call string [mscorlib]System.Convert::ToString(int32) - IL_bf87: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bf8c: stloc.s V_8 - IL_bf8e: ldloc.s V_7 - IL_bf90: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bf95: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bf9a: stloc.s V_10 - IL_bf9c: ldloc.s V_9 - IL_bf9e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bfa3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bfa8: stloc.s V_6 - IL_bfaa: ldloc.s V_6 - IL_bfac: ldloc.s V_7 - IL_bfae: beq.s IL_bff8 - - IL_bfb0: ldloc.s V_6 - IL_bfb2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bfb7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bfbc: stloc.s V_8 - IL_bfbe: ldloc.s V_10 - IL_bfc0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bfc5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bfca: stloc.s V_8 - IL_bfcc: ldloc.s V_7 - IL_bfce: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_bfd3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_bfd8: stloc.s V_6 - IL_bfda: ldloc.s V_6 - IL_bfdc: call string [mscorlib]System.Convert::ToString(int32) - IL_bfe1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bfe6: stloc.s V_6 - IL_bfe8: ldloc.s V_8 - IL_bfea: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bfef: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bff4: stloc.s V_6 - IL_bff6: br.s IL_c03e - - IL_bff8: ldloc.s V_6 - IL_bffa: call string [mscorlib]System.Convert::ToString(int32) - IL_bfff: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c004: stloc.s V_6 - IL_c006: ldloc.s V_6 - IL_c008: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c00d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c012: stloc.s V_10 - IL_c014: ldloc.s V_9 - IL_c016: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c01b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c020: stloc.s V_7 - IL_c022: ldloc.s V_7 - IL_c024: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c029: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c02e: stloc.s V_6 - IL_c030: ldloc.s V_8 - IL_c032: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c037: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c03c: stloc.s V_7 - IL_c03e: ldloc.s V_8 - IL_c040: ldloc.s V_7 - IL_c042: bgt.s IL_c08c - - IL_c044: ldloc.s V_10 - IL_c046: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c04b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c050: stloc.s V_10 - IL_c052: ldloc.s V_10 - IL_c054: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c059: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c05e: stloc.s V_7 - IL_c060: ldloc.s V_10 - IL_c062: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c067: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c06c: stloc.s V_10 - IL_c06e: ldloc.s V_6 - IL_c070: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c075: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c07a: stloc.s V_8 - IL_c07c: ldloc.s V_10 - IL_c07e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c083: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c088: stloc.s V_10 - IL_c08a: br.s IL_c0d2 - - IL_c08c: ldloc.s V_9 - IL_c08e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c093: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c098: stloc.s V_9 - IL_c09a: ldloc.s V_10 - IL_c09c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c0a1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c0a6: stloc.s V_8 - IL_c0a8: ldloc.s V_8 - IL_c0aa: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c0af: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c0b4: stloc.s V_6 - IL_c0b6: ldloc.s V_9 - IL_c0b8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c0bd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c0c2: stloc.s V_8 - IL_c0c4: ldloc.s V_7 - IL_c0c6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c0cb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c0d0: stloc.s V_9 - IL_c0d2: ldloc.s V_8 - IL_c0d4: ldloc.s V_10 - IL_c0d6: bne.un.s IL_c120 - - IL_c0d8: ldloc.s V_7 - IL_c0da: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c0df: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c0e4: stloc.s V_9 - IL_c0e6: ldloc.s V_6 - IL_c0e8: call string [mscorlib]System.Convert::ToString(int32) - IL_c0ed: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c0f2: stloc.s V_9 - IL_c0f4: ldloc.s V_6 - IL_c0f6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c0fb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c100: stloc.s V_7 - IL_c102: ldloc.s V_6 - IL_c104: call string [mscorlib]System.Convert::ToString(int32) - IL_c109: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c10e: stloc.s V_6 - IL_c110: ldloc.s V_7 - IL_c112: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c117: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c11c: stloc.s V_9 - IL_c11e: br.s IL_c166 - - IL_c120: ldloc.s V_10 - IL_c122: call string [mscorlib]System.Convert::ToString(int32) - IL_c127: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c12c: stloc.s V_7 - IL_c12e: ldloc.s V_9 - IL_c130: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c135: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c13a: stloc.s V_10 - IL_c13c: ldloc.s V_8 - IL_c13e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c143: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c148: stloc.s V_8 - IL_c14a: ldloc.s V_10 - IL_c14c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c151: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c156: stloc.s V_7 - IL_c158: ldloc.s V_6 - IL_c15a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c15f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c164: stloc.s V_6 - IL_c166: ldloc.s V_9 - IL_c168: ldloc.s V_9 - IL_c16a: bne.un.s IL_c1b4 - - IL_c16c: ldloc.s V_8 - IL_c16e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c173: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c178: stloc.s V_6 - IL_c17a: ldloc.s V_8 - IL_c17c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c181: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c186: stloc.s V_8 - IL_c188: ldloc.s V_10 - IL_c18a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c18f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c194: stloc.s V_8 - IL_c196: ldloc.s V_8 - IL_c198: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c19d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c1a2: stloc.s V_9 - IL_c1a4: ldloc.s V_7 - IL_c1a6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c1ab: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c1b0: stloc.s V_7 - IL_c1b2: br.s IL_c1fa - - IL_c1b4: ldloc.s V_7 - IL_c1b6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c1bb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c1c0: stloc.s V_8 - IL_c1c2: ldloc.s V_7 - IL_c1c4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c1c9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c1ce: stloc.s V_7 - IL_c1d0: ldloc.s V_8 - IL_c1d2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c1d7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c1dc: stloc.s V_7 - IL_c1de: ldloc.s V_9 - IL_c1e0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c1e5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c1ea: stloc.s V_9 - IL_c1ec: ldloc.s V_10 - IL_c1ee: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c1f3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c1f8: stloc.s V_7 - IL_c1fa: ldloc.s V_8 - IL_c1fc: ldloc.s V_6 - IL_c1fe: ble.s IL_c248 - - IL_c200: ldloc.s V_10 - IL_c202: call string [mscorlib]System.Convert::ToString(int32) - IL_c207: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c20c: stloc.s V_7 - IL_c20e: ldloc.s V_9 - IL_c210: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c215: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c21a: stloc.s V_9 - IL_c21c: ldloc.s V_6 - IL_c21e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c223: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c228: stloc.s V_8 - IL_c22a: ldloc.s V_9 - IL_c22c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c231: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c236: stloc.s V_9 - IL_c238: ldloc.s V_6 - IL_c23a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c23f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c244: stloc.s V_10 - IL_c246: br.s IL_c28e - - IL_c248: ldloc.s V_9 - IL_c24a: call string [mscorlib]System.Convert::ToString(int32) - IL_c24f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c254: stloc.s V_8 - IL_c256: ldloc.s V_9 - IL_c258: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c25d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c262: stloc.s V_9 - IL_c264: ldloc.s V_6 - IL_c266: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c26b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c270: stloc.s V_8 - IL_c272: ldloc.s V_8 - IL_c274: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c279: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c27e: stloc.s V_6 - IL_c280: ldloc.s V_9 - IL_c282: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c287: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c28c: stloc.s V_9 - IL_c28e: ldloc.s V_9 - IL_c290: ldloc.s V_8 - IL_c292: beq.s IL_c2dc - - IL_c294: ldloc.s V_7 - IL_c296: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c29b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c2a0: stloc.s V_8 - IL_c2a2: ldloc.s V_9 - IL_c2a4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c2a9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c2ae: stloc.s V_8 - IL_c2b0: ldloc.s V_9 - IL_c2b2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c2b7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c2bc: stloc.s V_9 - IL_c2be: ldloc.s V_7 - IL_c2c0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c2c5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c2ca: stloc.s V_7 - IL_c2cc: ldloc.s V_7 - IL_c2ce: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c2d3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c2d8: stloc.s V_9 - IL_c2da: br.s IL_c322 - - IL_c2dc: ldloc.s V_10 - IL_c2de: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c2e3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c2e8: stloc.s V_9 - IL_c2ea: ldloc.s V_7 - IL_c2ec: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c2f1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c2f6: stloc.s V_7 - IL_c2f8: ldloc.s V_9 - IL_c2fa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c2ff: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c304: stloc.s V_7 - IL_c306: ldloc.s V_10 - IL_c308: call string [mscorlib]System.Convert::ToString(int32) - IL_c30d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c312: stloc.s V_10 - IL_c314: ldloc.s V_6 - IL_c316: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c31b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c320: stloc.s V_6 - IL_c322: ldloc.s V_9 - IL_c324: ldloc.s V_6 - IL_c326: blt.s IL_c370 - - IL_c328: ldloc.s V_6 - IL_c32a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c32f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c334: stloc.s V_7 - IL_c336: ldloc.s V_9 - IL_c338: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c33d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c342: stloc.s V_10 - IL_c344: ldloc.s V_8 - IL_c346: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c34b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c350: stloc.s V_10 - IL_c352: ldloc.s V_8 - IL_c354: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c359: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c35e: stloc.s V_6 - IL_c360: ldloc.s V_10 - IL_c362: call string [mscorlib]System.Convert::ToString(int32) - IL_c367: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c36c: stloc.s V_10 - IL_c36e: br.s IL_c3b6 - - IL_c370: ldloc.s V_8 - IL_c372: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c377: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c37c: stloc.s V_7 - IL_c37e: ldloc.s V_7 - IL_c380: call string [mscorlib]System.Convert::ToString(int32) - IL_c385: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c38a: stloc.s V_10 - IL_c38c: ldloc.s V_10 - IL_c38e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c393: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c398: stloc.s V_7 - IL_c39a: ldloc.s V_7 - IL_c39c: call string [mscorlib]System.Convert::ToString(int32) - IL_c3a1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c3a6: stloc.s V_8 - IL_c3a8: ldloc.s V_10 - IL_c3aa: call string [mscorlib]System.Convert::ToString(int32) - IL_c3af: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c3b4: stloc.s V_9 - IL_c3b6: ldloc.s V_10 - IL_c3b8: ldloc.s V_9 - IL_c3ba: bgt.s IL_c404 - - IL_c3bc: ldloc.s V_8 - IL_c3be: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c3c3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c3c8: stloc.s V_6 - IL_c3ca: ldloc.s V_9 - IL_c3cc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c3d1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c3d6: stloc.s V_6 - IL_c3d8: ldloc.s V_6 - IL_c3da: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c3df: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c3e4: stloc.s V_6 - IL_c3e6: ldloc.s V_9 - IL_c3e8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c3ed: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c3f2: stloc.s V_9 - IL_c3f4: ldloc.s V_10 - IL_c3f6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c3fb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c400: stloc.s V_7 - IL_c402: br.s IL_c44a - - IL_c404: ldloc.s V_10 - IL_c406: call string [mscorlib]System.Convert::ToString(int32) - IL_c40b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c410: stloc.s V_6 - IL_c412: ldloc.s V_6 - IL_c414: call string [mscorlib]System.Convert::ToString(int32) - IL_c419: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c41e: stloc.s V_9 - IL_c420: ldloc.s V_6 - IL_c422: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c427: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c42c: stloc.s V_10 - IL_c42e: ldloc.s V_8 - IL_c430: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c435: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c43a: stloc.s V_6 - IL_c43c: ldloc.s V_8 - IL_c43e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c443: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c448: stloc.s V_8 - IL_c44a: ldloc.s V_8 - IL_c44c: ldloc.s V_8 - IL_c44e: bgt.s IL_c498 - - IL_c450: ldloc.s V_7 - IL_c452: call string [mscorlib]System.Convert::ToString(int32) - IL_c457: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c45c: stloc.s V_9 - IL_c45e: ldloc.s V_6 - IL_c460: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c465: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c46a: stloc.s V_8 - IL_c46c: ldloc.s V_8 - IL_c46e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c473: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c478: stloc.s V_9 - IL_c47a: ldloc.s V_6 - IL_c47c: call string [mscorlib]System.Convert::ToString(int32) - IL_c481: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c486: stloc.s V_7 - IL_c488: ldloc.s V_9 - IL_c48a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c48f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c494: stloc.s V_6 - IL_c496: br.s IL_c4de - - IL_c498: ldloc.s V_10 - IL_c49a: call string [mscorlib]System.Convert::ToString(int32) - IL_c49f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c4a4: stloc.s V_7 - IL_c4a6: ldloc.s V_7 - IL_c4a8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c4ad: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c4b2: stloc.s V_10 - IL_c4b4: ldloc.s V_6 - IL_c4b6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c4bb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c4c0: stloc.s V_9 - IL_c4c2: ldloc.s V_9 - IL_c4c4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c4c9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c4ce: stloc.s V_7 - IL_c4d0: ldloc.s V_6 - IL_c4d2: call string [mscorlib]System.Convert::ToString(int32) - IL_c4d7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c4dc: stloc.s V_6 - IL_c4de: ldloc.s V_6 - IL_c4e0: ldloc.s V_10 - IL_c4e2: bgt.s IL_c52c - - IL_c4e4: ldloc.s V_7 - IL_c4e6: call string [mscorlib]System.Convert::ToString(int32) - IL_c4eb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c4f0: stloc.s V_7 - IL_c4f2: ldloc.s V_8 - IL_c4f4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c4f9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c4fe: stloc.s V_9 - IL_c500: ldloc.s V_9 - IL_c502: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c507: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c50c: stloc.s V_10 - IL_c50e: ldloc.s V_8 - IL_c510: call string [mscorlib]System.Convert::ToString(int32) - IL_c515: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c51a: stloc.s V_8 - IL_c51c: ldloc.s V_10 - IL_c51e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c523: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c528: stloc.s V_6 - IL_c52a: br.s IL_c572 - - IL_c52c: ldloc.s V_8 - IL_c52e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c533: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c538: stloc.s V_10 - IL_c53a: ldloc.s V_8 - IL_c53c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c541: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c546: stloc.s V_9 - IL_c548: ldloc.s V_7 - IL_c54a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c54f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c554: stloc.s V_6 - IL_c556: ldloc.s V_7 - IL_c558: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c55d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c562: stloc.s V_6 - IL_c564: ldloc.s V_7 - IL_c566: call string [mscorlib]System.Convert::ToString(int32) - IL_c56b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c570: stloc.s V_8 - IL_c572: ldloc.s V_9 - IL_c574: ldloc.s V_8 - IL_c576: blt.s IL_c5c0 - - IL_c578: ldloc.s V_9 - IL_c57a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c57f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c584: stloc.s V_6 - IL_c586: ldloc.s V_7 - IL_c588: call string [mscorlib]System.Convert::ToString(int32) - IL_c58d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c592: stloc.s V_7 - IL_c594: ldloc.s V_10 - IL_c596: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c59b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c5a0: stloc.s V_7 - IL_c5a2: ldloc.s V_9 - IL_c5a4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c5a9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c5ae: stloc.s V_9 - IL_c5b0: ldloc.s V_10 - IL_c5b2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c5b7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c5bc: stloc.s V_8 - IL_c5be: br.s IL_c606 - - IL_c5c0: ldloc.s V_7 - IL_c5c2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c5c7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c5cc: stloc.s V_9 - IL_c5ce: ldloc.s V_7 - IL_c5d0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c5d5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c5da: stloc.s V_8 - IL_c5dc: ldloc.s V_7 - IL_c5de: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c5e3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c5e8: stloc.s V_7 - IL_c5ea: ldloc.s V_7 - IL_c5ec: call string [mscorlib]System.Convert::ToString(int32) - IL_c5f1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c5f6: stloc.s V_10 - IL_c5f8: ldloc.s V_7 - IL_c5fa: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c5ff: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c604: stloc.s V_7 - IL_c606: ldloc.s V_6 - IL_c608: ldloc.s V_10 - IL_c60a: blt.s IL_c654 - - IL_c60c: ldloc.s V_6 - IL_c60e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c613: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c618: stloc.s V_6 - IL_c61a: ldloc.s V_8 - IL_c61c: call string [mscorlib]System.Convert::ToString(int32) - IL_c621: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c626: stloc.s V_6 - IL_c628: ldloc.s V_9 - IL_c62a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c62f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c634: stloc.s V_7 - IL_c636: ldloc.s V_6 - IL_c638: call string [mscorlib]System.Convert::ToString(int32) - IL_c63d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c642: stloc.s V_9 - IL_c644: ldloc.s V_10 - IL_c646: call string [mscorlib]System.Convert::ToString(int32) - IL_c64b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c650: stloc.s V_9 - IL_c652: br.s IL_c69a - - IL_c654: ldloc.s V_8 - IL_c656: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c65b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c660: stloc.s V_7 - IL_c662: ldloc.s V_9 - IL_c664: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c669: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c66e: stloc.s V_10 - IL_c670: ldloc.s V_8 - IL_c672: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c677: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c67c: stloc.s V_7 - IL_c67e: ldloc.s V_6 - IL_c680: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c685: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c68a: stloc.s V_7 - IL_c68c: ldloc.s V_9 - IL_c68e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c693: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c698: stloc.s V_10 - IL_c69a: ldloc.s V_6 - IL_c69c: ldloc.s V_10 - IL_c69e: bgt.s IL_c6e8 - - IL_c6a0: ldloc.s V_7 - IL_c6a2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c6a7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c6ac: stloc.s V_9 - IL_c6ae: ldloc.s V_8 - IL_c6b0: call string [mscorlib]System.Convert::ToString(int32) - IL_c6b5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c6ba: stloc.s V_9 - IL_c6bc: ldloc.s V_9 - IL_c6be: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c6c3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c6c8: stloc.s V_10 - IL_c6ca: ldloc.s V_9 - IL_c6cc: call string [mscorlib]System.Convert::ToString(int32) - IL_c6d1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c6d6: stloc.s V_8 - IL_c6d8: ldloc.s V_10 - IL_c6da: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c6df: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c6e4: stloc.s V_7 - IL_c6e6: br.s IL_c72e - - IL_c6e8: ldloc.s V_8 - IL_c6ea: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c6ef: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c6f4: stloc.s V_7 - IL_c6f6: ldloc.s V_6 - IL_c6f8: call string [mscorlib]System.Convert::ToString(int32) - IL_c6fd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c702: stloc.s V_10 - IL_c704: ldloc.s V_10 - IL_c706: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c70b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c710: stloc.s V_7 - IL_c712: ldloc.s V_7 - IL_c714: call string [mscorlib]System.Convert::ToString(int32) - IL_c719: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c71e: stloc.s V_9 - IL_c720: ldloc.s V_6 - IL_c722: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c727: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c72c: stloc.s V_8 - IL_c72e: ldloc.s V_6 - IL_c730: ldloc.s V_7 - IL_c732: beq.s IL_c77c - - IL_c734: ldloc.s V_6 - IL_c736: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c73b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c740: stloc.s V_6 - IL_c742: ldloc.s V_7 - IL_c744: call string [mscorlib]System.Convert::ToString(int32) - IL_c749: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c74e: stloc.s V_9 - IL_c750: ldloc.s V_10 - IL_c752: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c757: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c75c: stloc.s V_10 - IL_c75e: ldloc.s V_8 - IL_c760: call string [mscorlib]System.Convert::ToString(int32) - IL_c765: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c76a: stloc.s V_10 - IL_c76c: ldloc.s V_6 - IL_c76e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c773: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c778: stloc.s V_9 - IL_c77a: br.s IL_c7c2 - - IL_c77c: ldloc.s V_6 - IL_c77e: call string [mscorlib]System.Convert::ToString(int32) - IL_c783: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c788: stloc.s V_6 - IL_c78a: ldloc.s V_9 - IL_c78c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c791: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c796: stloc.s V_7 - IL_c798: ldloc.s V_8 - IL_c79a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c79f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c7a4: stloc.s V_9 - IL_c7a6: ldloc.s V_10 - IL_c7a8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c7ad: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c7b2: stloc.s V_7 - IL_c7b4: ldloc.s V_10 - IL_c7b6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c7bb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c7c0: stloc.s V_7 - IL_c7c2: ldloc.s V_9 - IL_c7c4: ldloc.s V_8 - IL_c7c6: bgt.s IL_c810 - - IL_c7c8: ldloc.s V_7 - IL_c7ca: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c7cf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c7d4: stloc.s V_8 - IL_c7d6: ldloc.s V_7 - IL_c7d8: call string [mscorlib]System.Convert::ToString(int32) - IL_c7dd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c7e2: stloc.s V_10 - IL_c7e4: ldloc.s V_8 - IL_c7e6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c7eb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c7f0: stloc.s V_7 - IL_c7f2: ldloc.s V_7 - IL_c7f4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c7f9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c7fe: stloc.s V_7 - IL_c800: ldloc.s V_9 - IL_c802: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c807: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c80c: stloc.s V_8 - IL_c80e: br.s IL_c856 - - IL_c810: ldloc.s V_9 - IL_c812: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c817: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c81c: stloc.s V_6 - IL_c81e: ldloc.s V_7 - IL_c820: call string [mscorlib]System.Convert::ToString(int32) - IL_c825: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c82a: stloc.s V_6 - IL_c82c: ldloc.s V_8 - IL_c82e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c833: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c838: stloc.s V_9 - IL_c83a: ldloc.s V_8 - IL_c83c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c841: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c846: stloc.s V_8 - IL_c848: ldloc.s V_9 - IL_c84a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c84f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c854: stloc.s V_8 - IL_c856: ldloc.s V_7 - IL_c858: ldloc.s V_10 - IL_c85a: beq.s IL_c8a4 - - IL_c85c: ldloc.s V_6 - IL_c85e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c863: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c868: stloc.s V_10 - IL_c86a: ldloc.s V_10 - IL_c86c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c871: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c876: stloc.s V_10 - IL_c878: ldloc.s V_9 - IL_c87a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c87f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c884: stloc.s V_10 - IL_c886: ldloc.s V_10 - IL_c888: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c88d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c892: stloc.s V_6 - IL_c894: ldloc.s V_7 - IL_c896: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c89b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c8a0: stloc.s V_7 - IL_c8a2: br.s IL_c8ea - - IL_c8a4: ldloc.s V_10 - IL_c8a6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c8ab: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c8b0: stloc.s V_7 - IL_c8b2: ldloc.s V_6 - IL_c8b4: call string [mscorlib]System.Convert::ToString(int32) - IL_c8b9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c8be: stloc.s V_6 - IL_c8c0: ldloc.s V_9 - IL_c8c2: call string [mscorlib]System.Convert::ToString(int32) - IL_c8c7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c8cc: stloc.s V_6 - IL_c8ce: ldloc.s V_7 - IL_c8d0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c8d5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c8da: stloc.s V_9 - IL_c8dc: ldloc.s V_8 - IL_c8de: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c8e3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c8e8: stloc.s V_10 - IL_c8ea: ldloc.s V_7 - IL_c8ec: ldloc.s V_6 - IL_c8ee: bne.un.s IL_c938 - - IL_c8f0: ldloc.s V_8 - IL_c8f2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c8f7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c8fc: stloc.s V_7 - IL_c8fe: ldloc.s V_6 - IL_c900: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c905: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c90a: stloc.s V_8 - IL_c90c: ldloc.s V_8 - IL_c90e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c913: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c918: stloc.s V_9 - IL_c91a: ldloc.s V_10 - IL_c91c: call string [mscorlib]System.Convert::ToString(int32) - IL_c921: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c926: stloc.s V_8 - IL_c928: ldloc.s V_8 - IL_c92a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c92f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c934: stloc.s V_9 - IL_c936: br.s IL_c97e - - IL_c938: ldloc.s V_6 - IL_c93a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c93f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c944: stloc.s V_6 - IL_c946: ldloc.s V_10 - IL_c948: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c94d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c952: stloc.s V_9 - IL_c954: ldloc.s V_9 - IL_c956: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c95b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c960: stloc.s V_10 - IL_c962: ldloc.s V_10 - IL_c964: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c969: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c96e: stloc.s V_7 - IL_c970: ldloc.s V_7 - IL_c972: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c977: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c97c: stloc.s V_9 - IL_c97e: ldloc.s V_7 - IL_c980: ldloc.s V_6 - IL_c982: bge.s IL_c9cc - - IL_c984: ldloc.s V_7 - IL_c986: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c98b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c990: stloc.s V_9 - IL_c992: ldloc.s V_6 - IL_c994: call string [mscorlib]System.Convert::ToString(int32) - IL_c999: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c99e: stloc.s V_10 - IL_c9a0: ldloc.s V_7 - IL_c9a2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c9a7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c9ac: stloc.s V_10 - IL_c9ae: ldloc.s V_6 - IL_c9b0: call string [mscorlib]System.Convert::ToString(int32) - IL_c9b5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c9ba: stloc.s V_8 - IL_c9bc: ldloc.s V_6 - IL_c9be: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c9c3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c9c8: stloc.s V_9 - IL_c9ca: br.s IL_ca12 - - IL_c9cc: ldloc.s V_9 - IL_c9ce: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c9d3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c9d8: stloc.s V_9 - IL_c9da: ldloc.s V_7 - IL_c9dc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c9e1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c9e6: stloc.s V_8 - IL_c9e8: ldloc.s V_9 - IL_c9ea: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c9ef: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c9f4: stloc.s V_7 - IL_c9f6: ldloc.s V_6 - IL_c9f8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c9fd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ca02: stloc.s V_10 - IL_ca04: ldloc.s V_7 - IL_ca06: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_ca0b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ca10: stloc.s V_6 - IL_ca12: ldloc.s V_7 - IL_ca14: ldloc.s V_6 - IL_ca16: blt.s IL_ca60 - - IL_ca18: ldloc.s V_6 - IL_ca1a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_ca1f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ca24: stloc.s V_10 - IL_ca26: ldloc.s V_8 - IL_ca28: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ca2d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ca32: stloc.s V_6 - IL_ca34: ldloc.s V_9 - IL_ca36: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ca3b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ca40: stloc.s V_10 - IL_ca42: ldloc.s V_7 - IL_ca44: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ca49: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ca4e: stloc.s V_8 - IL_ca50: ldloc.s V_6 - IL_ca52: call string [mscorlib]System.Convert::ToString(int32) - IL_ca57: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ca5c: stloc.s V_8 - IL_ca5e: br.s IL_caa6 - - IL_ca60: ldloc.s V_6 - IL_ca62: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_ca67: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ca6c: stloc.s V_9 - IL_ca6e: ldloc.s V_7 - IL_ca70: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ca75: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ca7a: stloc.s V_8 - IL_ca7c: ldloc.s V_8 - IL_ca7e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ca83: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ca88: stloc.s V_9 - IL_ca8a: ldloc.s V_8 - IL_ca8c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ca91: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ca96: stloc.s V_9 - IL_ca98: ldloc.s V_7 - IL_ca9a: call string [mscorlib]System.Convert::ToString(int32) - IL_ca9f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_caa4: stloc.s V_6 - IL_caa6: ldloc.s V_6 - IL_caa8: ldloc.s V_7 - IL_caaa: ble.s IL_caf4 - - IL_caac: ldloc.s V_10 - IL_caae: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_cab3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_cab8: stloc.s V_10 - IL_caba: ldloc.s V_8 - IL_cabc: call string [mscorlib]System.Convert::ToString(int32) - IL_cac1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cac6: stloc.s V_10 - IL_cac8: ldloc.s V_6 - IL_caca: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cacf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cad4: stloc.s V_6 - IL_cad6: ldloc.s V_6 - IL_cad8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_cadd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_cae2: stloc.s V_9 - IL_cae4: ldloc.s V_8 - IL_cae6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_caeb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_caf0: stloc.s V_8 - IL_caf2: br.s IL_cb3a - - IL_caf4: ldloc.s V_6 - IL_caf6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cafb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cb00: stloc.s V_10 - IL_cb02: ldloc.s V_8 - IL_cb04: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_cb09: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_cb0e: stloc.s V_6 - IL_cb10: ldloc.s V_9 - IL_cb12: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_cb17: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_cb1c: stloc.s V_9 - IL_cb1e: ldloc.s V_7 - IL_cb20: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cb25: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cb2a: stloc.s V_9 - IL_cb2c: ldloc.s V_6 - IL_cb2e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_cb33: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_cb38: stloc.s V_6 - IL_cb3a: ldloc.s V_8 - IL_cb3c: ldloc.s V_7 - IL_cb3e: blt.s IL_cb88 - - IL_cb40: ldloc.s V_10 - IL_cb42: call string [mscorlib]System.Convert::ToString(int32) - IL_cb47: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cb4c: stloc.s V_10 - IL_cb4e: ldloc.s V_8 - IL_cb50: call string [mscorlib]System.Convert::ToString(int32) - IL_cb55: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cb5a: stloc.s V_7 - IL_cb5c: ldloc.s V_7 - IL_cb5e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cb63: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cb68: stloc.s V_9 - IL_cb6a: ldloc.s V_8 - IL_cb6c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_cb71: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_cb76: stloc.s V_7 - IL_cb78: ldloc.s V_9 - IL_cb7a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cb7f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cb84: stloc.s V_8 - IL_cb86: br.s IL_cbce - - IL_cb88: ldloc.s V_7 - IL_cb8a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cb8f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cb94: stloc.s V_6 - IL_cb96: ldloc.s V_7 - IL_cb98: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_cb9d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_cba2: stloc.s V_6 - IL_cba4: ldloc.s V_9 - IL_cba6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_cbab: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_cbb0: stloc.s V_9 - IL_cbb2: ldloc.s V_6 - IL_cbb4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cbb9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cbbe: stloc.s V_7 - IL_cbc0: ldloc.s V_9 - IL_cbc2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_cbc7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_cbcc: stloc.s V_6 - IL_cbce: ldloc.s V_6 - IL_cbd0: ldloc.s V_7 - IL_cbd2: ble.s IL_cc1c - - IL_cbd4: ldloc.s V_9 - IL_cbd6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cbdb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cbe0: stloc.s V_9 - IL_cbe2: ldloc.s V_9 - IL_cbe4: call string [mscorlib]System.Convert::ToString(int32) - IL_cbe9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cbee: stloc.s V_9 - IL_cbf0: ldloc.s V_7 - IL_cbf2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cbf7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cbfc: stloc.s V_9 - IL_cbfe: ldloc.s V_10 - IL_cc00: call string [mscorlib]System.Convert::ToString(int32) - IL_cc05: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cc0a: stloc.s V_6 - IL_cc0c: ldloc.s V_6 - IL_cc0e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_cc13: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_cc18: stloc.s V_6 - IL_cc1a: br.s IL_cc62 - - IL_cc1c: ldloc.s V_8 - IL_cc1e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_cc23: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_cc28: stloc.s V_9 - IL_cc2a: ldloc.s V_8 - IL_cc2c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cc31: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cc36: stloc.s V_10 - IL_cc38: ldloc.s V_8 - IL_cc3a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_cc3f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_cc44: stloc.s V_10 - IL_cc46: ldloc.s V_7 - IL_cc48: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_cc4d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_cc52: stloc.s V_6 - IL_cc54: ldloc.s V_7 - IL_cc56: call string [mscorlib]System.Convert::ToString(int32) - IL_cc5b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cc60: stloc.s V_7 - IL_cc62: ldloc.s V_6 - IL_cc64: ldloc.s V_10 - IL_cc66: bgt.s IL_ccb0 - - IL_cc68: ldloc.s V_10 - IL_cc6a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_cc6f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_cc74: stloc.s V_6 - IL_cc76: ldloc.s V_9 - IL_cc78: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cc7d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cc82: stloc.s V_10 - IL_cc84: ldloc.s V_8 - IL_cc86: call string [mscorlib]System.Convert::ToString(int32) - IL_cc8b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cc90: stloc.s V_8 - IL_cc92: ldloc.s V_8 - IL_cc94: call string [mscorlib]System.Convert::ToString(int32) - IL_cc99: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cc9e: stloc.s V_6 - IL_cca0: ldloc.s V_7 - IL_cca2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cca7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ccac: stloc.s V_9 - IL_ccae: br.s IL_ccf6 - - IL_ccb0: ldloc.s V_6 - IL_ccb2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ccb7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ccbc: stloc.s V_10 - IL_ccbe: ldloc.s V_10 - IL_ccc0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_ccc5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ccca: stloc.s V_6 - IL_cccc: ldloc.s V_7 - IL_ccce: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ccd3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ccd8: stloc.s V_10 - IL_ccda: ldloc.s V_9 - IL_ccdc: call string [mscorlib]System.Convert::ToString(int32) - IL_cce1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cce6: stloc.s V_7 - IL_cce8: ldloc.s V_9 - IL_ccea: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ccef: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ccf4: stloc.s V_8 - IL_ccf6: ldloc.s V_8 - IL_ccf8: ldloc.s V_7 - IL_ccfa: beq.s IL_cd44 - - IL_ccfc: ldloc.s V_7 - IL_ccfe: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_cd03: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_cd08: stloc.s V_6 - IL_cd0a: ldloc.s V_9 - IL_cd0c: call string [mscorlib]System.Convert::ToString(int32) - IL_cd11: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cd16: stloc.s V_7 - IL_cd18: ldloc.s V_9 - IL_cd1a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cd1f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cd24: stloc.s V_9 - IL_cd26: ldloc.s V_8 - IL_cd28: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_cd2d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_cd32: stloc.s V_6 - IL_cd34: ldloc.s V_9 - IL_cd36: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_cd3b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_cd40: stloc.s V_10 - IL_cd42: br.s IL_cd8a - - IL_cd44: ldloc.s V_7 - IL_cd46: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cd4b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cd50: stloc.s V_6 - IL_cd52: ldloc.s V_6 - IL_cd54: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cd59: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cd5e: stloc.s V_7 - IL_cd60: ldloc.s V_6 - IL_cd62: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cd67: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cd6c: stloc.s V_6 - IL_cd6e: ldloc.s V_9 - IL_cd70: call string [mscorlib]System.Convert::ToString(int32) - IL_cd75: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cd7a: stloc.s V_8 - IL_cd7c: ldloc.s V_7 - IL_cd7e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_cd83: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_cd88: stloc.s V_6 - IL_cd8a: ldloc.s V_7 - IL_cd8c: ldloc.s V_6 - IL_cd8e: bne.un.s IL_cdd8 - - IL_cd90: ldloc.s V_7 - IL_cd92: call string [mscorlib]System.Convert::ToString(int32) - IL_cd97: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cd9c: stloc.s V_6 - IL_cd9e: ldloc.s V_9 - IL_cda0: call string [mscorlib]System.Convert::ToString(int32) - IL_cda5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cdaa: stloc.s V_6 - IL_cdac: ldloc.s V_9 - IL_cdae: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cdb3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cdb8: stloc.s V_8 - IL_cdba: ldloc.s V_10 - IL_cdbc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_cdc1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_cdc6: stloc.s V_6 - IL_cdc8: ldloc.s V_8 - IL_cdca: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cdcf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cdd4: stloc.s V_10 - IL_cdd6: br.s IL_ce1e - - IL_cdd8: ldloc.s V_10 - IL_cdda: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cddf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cde4: stloc.s V_6 - IL_cde6: ldloc.s V_6 - IL_cde8: call string [mscorlib]System.Convert::ToString(int32) - IL_cded: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cdf2: stloc.s V_8 - IL_cdf4: ldloc.s V_8 - IL_cdf6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_cdfb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ce00: stloc.s V_7 - IL_ce02: ldloc.s V_10 - IL_ce04: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ce09: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ce0e: stloc.s V_7 - IL_ce10: ldloc.s V_8 - IL_ce12: call string [mscorlib]System.Convert::ToString(int32) - IL_ce17: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ce1c: stloc.s V_10 - IL_ce1e: ldloc.s V_7 - IL_ce20: ldloc.s V_9 - IL_ce22: bgt.s IL_ce6c - - IL_ce24: ldloc.s V_8 - IL_ce26: call string [mscorlib]System.Convert::ToString(int32) - IL_ce2b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ce30: stloc.s V_8 - IL_ce32: ldloc.s V_9 - IL_ce34: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ce39: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ce3e: stloc.s V_7 - IL_ce40: ldloc.s V_6 - IL_ce42: call string [mscorlib]System.Convert::ToString(int32) - IL_ce47: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ce4c: stloc.s V_8 - IL_ce4e: ldloc.s V_8 - IL_ce50: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ce55: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ce5a: stloc.s V_7 - IL_ce5c: ldloc.s V_7 - IL_ce5e: call string [mscorlib]System.Convert::ToString(int32) - IL_ce63: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ce68: stloc.s V_6 - IL_ce6a: br.s IL_ceb2 - - IL_ce6c: ldloc.s V_8 - IL_ce6e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_ce73: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ce78: stloc.s V_7 - IL_ce7a: ldloc.s V_9 - IL_ce7c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_ce81: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ce86: stloc.s V_7 - IL_ce88: ldloc.s V_9 - IL_ce8a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ce8f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ce94: stloc.s V_6 - IL_ce96: ldloc.s V_10 - IL_ce98: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ce9d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_cea2: stloc.s V_9 - IL_cea4: ldloc.s V_9 - IL_cea6: call string [mscorlib]System.Convert::ToString(int32) - IL_ceab: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ceb0: stloc.s V_9 - IL_ceb2: ldloc.s V_9 - IL_ceb4: ldloc.s V_8 - IL_ceb6: bge.s IL_cf00 - - IL_ceb8: ldloc.s V_9 - IL_ceba: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cebf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cec4: stloc.s V_7 - IL_cec6: ldloc.s V_8 - IL_cec8: call string [mscorlib]System.Convert::ToString(int32) - IL_cecd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ced2: stloc.s V_10 - IL_ced4: ldloc.s V_10 - IL_ced6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_cedb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_cee0: stloc.s V_7 - IL_cee2: ldloc.s V_6 - IL_cee4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_cee9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ceee: stloc.s V_10 - IL_cef0: ldloc.s V_6 - IL_cef2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_cef7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_cefc: stloc.s V_6 - IL_cefe: br.s IL_cf46 - - IL_cf00: ldloc.s V_9 - IL_cf02: call string [mscorlib]System.Convert::ToString(int32) - IL_cf07: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cf0c: stloc.s V_8 - IL_cf0e: ldloc.s V_6 - IL_cf10: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cf15: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cf1a: stloc.s V_10 - IL_cf1c: ldloc.s V_10 - IL_cf1e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cf23: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cf28: stloc.s V_6 - IL_cf2a: ldloc.s V_6 - IL_cf2c: call string [mscorlib]System.Convert::ToString(int32) - IL_cf31: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cf36: stloc.s V_10 - IL_cf38: ldloc.s V_6 - IL_cf3a: call string [mscorlib]System.Convert::ToString(int32) - IL_cf3f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cf44: stloc.s V_10 - IL_cf46: ldloc.s V_6 - IL_cf48: ldloc.s V_7 - IL_cf4a: blt.s IL_cf94 - - IL_cf4c: ldloc.s V_7 - IL_cf4e: call string [mscorlib]System.Convert::ToString(int32) - IL_cf53: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cf58: stloc.s V_10 - IL_cf5a: ldloc.s V_7 - IL_cf5c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cf61: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cf66: stloc.s V_9 - IL_cf68: ldloc.s V_6 - IL_cf6a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_cf6f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_cf74: stloc.s V_6 - IL_cf76: ldloc.s V_9 - IL_cf78: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_cf7d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_cf82: stloc.s V_9 - IL_cf84: ldloc.s V_8 - IL_cf86: call string [mscorlib]System.Convert::ToString(int32) - IL_cf8b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cf90: stloc.s V_8 - IL_cf92: br.s IL_cfda - - IL_cf94: ldloc.s V_6 - IL_cf96: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_cf9b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_cfa0: stloc.s V_9 - IL_cfa2: ldloc.s V_7 - IL_cfa4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cfa9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cfae: stloc.s V_10 - IL_cfb0: ldloc.s V_6 - IL_cfb2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cfb7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cfbc: stloc.s V_7 - IL_cfbe: ldloc.s V_7 - IL_cfc0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_cfc5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_cfca: stloc.s V_10 - IL_cfcc: ldloc.s V_7 - IL_cfce: call string [mscorlib]System.Convert::ToString(int32) - IL_cfd3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cfd8: stloc.s V_7 - IL_cfda: ldloc.s V_9 - IL_cfdc: ldloc.s V_6 - IL_cfde: bne.un.s IL_d028 - - IL_cfe0: ldloc.s V_8 - IL_cfe2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_cfe7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_cfec: stloc.s V_10 - IL_cfee: ldloc.s V_6 - IL_cff0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_cff5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_cffa: stloc.s V_10 - IL_cffc: ldloc.s V_7 - IL_cffe: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d003: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d008: stloc.s V_8 - IL_d00a: ldloc.s V_7 - IL_d00c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d011: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d016: stloc.s V_6 - IL_d018: ldloc.s V_10 - IL_d01a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d01f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d024: stloc.s V_6 - IL_d026: br.s IL_d06e - - IL_d028: ldloc.s V_8 - IL_d02a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d02f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d034: stloc.s V_9 - IL_d036: ldloc.s V_8 - IL_d038: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d03d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d042: stloc.s V_10 - IL_d044: ldloc.s V_7 - IL_d046: call string [mscorlib]System.Convert::ToString(int32) - IL_d04b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d050: stloc.s V_10 - IL_d052: ldloc.s V_8 - IL_d054: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d059: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d05e: stloc.s V_7 - IL_d060: ldloc.s V_8 - IL_d062: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d067: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d06c: stloc.s V_6 - IL_d06e: ldloc.s V_10 - IL_d070: ldloc.s V_8 - IL_d072: bne.un.s IL_d0bc - - IL_d074: ldloc.s V_9 - IL_d076: call string [mscorlib]System.Convert::ToString(int32) - IL_d07b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d080: stloc.s V_9 - IL_d082: ldloc.s V_7 - IL_d084: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d089: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d08e: stloc.s V_6 - IL_d090: ldloc.s V_9 - IL_d092: call string [mscorlib]System.Convert::ToString(int32) - IL_d097: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d09c: stloc.s V_6 - IL_d09e: ldloc.s V_6 - IL_d0a0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d0a5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d0aa: stloc.s V_10 - IL_d0ac: ldloc.s V_8 - IL_d0ae: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d0b3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d0b8: stloc.s V_10 - IL_d0ba: br.s IL_d102 - - IL_d0bc: ldloc.s V_7 - IL_d0be: call string [mscorlib]System.Convert::ToString(int32) - IL_d0c3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d0c8: stloc.s V_7 - IL_d0ca: ldloc.s V_7 - IL_d0cc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d0d1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d0d6: stloc.s V_10 - IL_d0d8: ldloc.s V_8 - IL_d0da: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d0df: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d0e4: stloc.s V_8 - IL_d0e6: ldloc.s V_6 - IL_d0e8: call string [mscorlib]System.Convert::ToString(int32) - IL_d0ed: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d0f2: stloc.s V_6 - IL_d0f4: ldloc.s V_10 - IL_d0f6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d0fb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d100: stloc.s V_8 - IL_d102: ldloc.s V_7 - IL_d104: ldloc.s V_7 - IL_d106: beq.s IL_d150 - - IL_d108: ldloc.s V_10 - IL_d10a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d10f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d114: stloc.s V_9 - IL_d116: ldloc.s V_7 - IL_d118: call string [mscorlib]System.Convert::ToString(int32) - IL_d11d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d122: stloc.s V_7 - IL_d124: ldloc.s V_10 - IL_d126: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d12b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d130: stloc.s V_6 - IL_d132: ldloc.s V_7 - IL_d134: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d139: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d13e: stloc.s V_10 - IL_d140: ldloc.s V_6 - IL_d142: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d147: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d14c: stloc.s V_7 - IL_d14e: br.s IL_d196 - - IL_d150: ldloc.s V_6 - IL_d152: call string [mscorlib]System.Convert::ToString(int32) - IL_d157: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d15c: stloc.s V_6 - IL_d15e: ldloc.s V_6 - IL_d160: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d165: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d16a: stloc.s V_6 - IL_d16c: ldloc.s V_9 - IL_d16e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d173: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d178: stloc.s V_6 - IL_d17a: ldloc.s V_6 - IL_d17c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d181: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d186: stloc.s V_6 - IL_d188: ldloc.s V_6 - IL_d18a: call string [mscorlib]System.Convert::ToString(int32) - IL_d18f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d194: stloc.s V_7 - IL_d196: ldloc.s V_6 - IL_d198: ldloc.s V_6 - IL_d19a: bne.un.s IL_d1e4 - - IL_d19c: ldloc.s V_8 - IL_d19e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d1a3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d1a8: stloc.s V_9 - IL_d1aa: ldloc.s V_6 - IL_d1ac: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d1b1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d1b6: stloc.s V_9 - IL_d1b8: ldloc.s V_6 - IL_d1ba: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d1bf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d1c4: stloc.s V_10 - IL_d1c6: ldloc.s V_10 - IL_d1c8: call string [mscorlib]System.Convert::ToString(int32) - IL_d1cd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d1d2: stloc.s V_8 - IL_d1d4: ldloc.s V_7 - IL_d1d6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d1db: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d1e0: stloc.s V_6 - IL_d1e2: br.s IL_d22a - - IL_d1e4: ldloc.s V_9 - IL_d1e6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d1eb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d1f0: stloc.s V_6 - IL_d1f2: ldloc.s V_8 - IL_d1f4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d1f9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d1fe: stloc.s V_9 - IL_d200: ldloc.s V_6 - IL_d202: call string [mscorlib]System.Convert::ToString(int32) - IL_d207: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d20c: stloc.s V_7 - IL_d20e: ldloc.s V_9 - IL_d210: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d215: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d21a: stloc.s V_6 - IL_d21c: ldloc.s V_7 - IL_d21e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d223: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d228: stloc.s V_7 - IL_d22a: ldloc.s V_6 - IL_d22c: ldloc.s V_10 - IL_d22e: bgt.s IL_d278 - - IL_d230: ldloc.s V_7 - IL_d232: call string [mscorlib]System.Convert::ToString(int32) - IL_d237: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d23c: stloc.s V_7 - IL_d23e: ldloc.s V_8 - IL_d240: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d245: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d24a: stloc.s V_8 - IL_d24c: ldloc.s V_6 - IL_d24e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d253: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d258: stloc.s V_6 - IL_d25a: ldloc.s V_9 - IL_d25c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d261: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d266: stloc.s V_10 - IL_d268: ldloc.s V_6 - IL_d26a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d26f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d274: stloc.s V_10 - IL_d276: br.s IL_d2be - - IL_d278: ldloc.s V_6 - IL_d27a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d27f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d284: stloc.s V_10 - IL_d286: ldloc.s V_6 - IL_d288: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d28d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d292: stloc.s V_8 - IL_d294: ldloc.s V_8 - IL_d296: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d29b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d2a0: stloc.s V_8 - IL_d2a2: ldloc.s V_6 - IL_d2a4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d2a9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d2ae: stloc.s V_7 - IL_d2b0: ldloc.s V_10 - IL_d2b2: call string [mscorlib]System.Convert::ToString(int32) - IL_d2b7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d2bc: stloc.s V_8 - IL_d2be: ldloc.s V_9 - IL_d2c0: ldloc.s V_7 - IL_d2c2: beq.s IL_d30c - - IL_d2c4: ldloc.s V_6 - IL_d2c6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d2cb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d2d0: stloc.s V_10 - IL_d2d2: ldloc.s V_6 - IL_d2d4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d2d9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d2de: stloc.s V_10 - IL_d2e0: ldloc.s V_10 - IL_d2e2: call string [mscorlib]System.Convert::ToString(int32) - IL_d2e7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d2ec: stloc.s V_6 - IL_d2ee: ldloc.s V_10 - IL_d2f0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d2f5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d2fa: stloc.s V_8 - IL_d2fc: ldloc.s V_6 - IL_d2fe: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d303: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d308: stloc.s V_8 - IL_d30a: br.s IL_d352 - - IL_d30c: ldloc.s V_9 - IL_d30e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d313: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d318: stloc.s V_8 - IL_d31a: ldloc.s V_7 - IL_d31c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d321: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d326: stloc.s V_6 - IL_d328: ldloc.s V_7 - IL_d32a: call string [mscorlib]System.Convert::ToString(int32) - IL_d32f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d334: stloc.s V_9 - IL_d336: ldloc.s V_10 - IL_d338: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d33d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d342: stloc.s V_10 - IL_d344: ldloc.s V_7 - IL_d346: call string [mscorlib]System.Convert::ToString(int32) - IL_d34b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d350: stloc.s V_8 - IL_d352: ldloc.s V_6 - IL_d354: ldloc.s V_10 - IL_d356: bge.s IL_d3a0 - - IL_d358: ldloc.s V_6 - IL_d35a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d35f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d364: stloc.s V_7 - IL_d366: ldloc.s V_9 - IL_d368: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d36d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d372: stloc.s V_6 - IL_d374: ldloc.s V_7 - IL_d376: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d37b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d380: stloc.s V_10 - IL_d382: ldloc.s V_10 - IL_d384: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d389: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d38e: stloc.s V_7 - IL_d390: ldloc.s V_6 - IL_d392: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d397: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d39c: stloc.s V_9 - IL_d39e: br.s IL_d3e6 - - IL_d3a0: ldloc.s V_7 - IL_d3a2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d3a7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d3ac: stloc.s V_10 - IL_d3ae: ldloc.s V_8 - IL_d3b0: call string [mscorlib]System.Convert::ToString(int32) - IL_d3b5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d3ba: stloc.s V_6 - IL_d3bc: ldloc.s V_6 - IL_d3be: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d3c3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d3c8: stloc.s V_6 - IL_d3ca: ldloc.s V_6 - IL_d3cc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d3d1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d3d6: stloc.s V_9 - IL_d3d8: ldloc.s V_10 - IL_d3da: call string [mscorlib]System.Convert::ToString(int32) - IL_d3df: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d3e4: stloc.s V_7 - IL_d3e6: ldloc.s V_7 - IL_d3e8: ldloc.s V_7 - IL_d3ea: blt.s IL_d434 - - IL_d3ec: ldloc.s V_8 - IL_d3ee: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d3f3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d3f8: stloc.s V_10 - IL_d3fa: ldloc.s V_9 - IL_d3fc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d401: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d406: stloc.s V_10 - IL_d408: ldloc.s V_10 - IL_d40a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d40f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d414: stloc.s V_10 - IL_d416: ldloc.s V_9 - IL_d418: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d41d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d422: stloc.s V_10 - IL_d424: ldloc.s V_7 - IL_d426: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d42b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d430: stloc.s V_8 - IL_d432: br.s IL_d47a - - IL_d434: ldloc.s V_10 - IL_d436: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d43b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d440: stloc.s V_9 - IL_d442: ldloc.s V_7 - IL_d444: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d449: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d44e: stloc.s V_6 - IL_d450: ldloc.s V_9 - IL_d452: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d457: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d45c: stloc.s V_8 - IL_d45e: ldloc.s V_9 - IL_d460: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d465: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d46a: stloc.s V_10 - IL_d46c: ldloc.s V_8 - IL_d46e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d473: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d478: stloc.s V_8 - IL_d47a: ldloc.s V_10 - IL_d47c: ldloc.s V_10 - IL_d47e: bgt.s IL_d4c8 - - IL_d480: ldloc.s V_10 - IL_d482: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d487: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d48c: stloc.s V_9 - IL_d48e: ldloc.s V_7 - IL_d490: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d495: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d49a: stloc.s V_9 - IL_d49c: ldloc.s V_8 - IL_d49e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d4a3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d4a8: stloc.s V_9 - IL_d4aa: ldloc.s V_9 - IL_d4ac: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d4b1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d4b6: stloc.s V_9 - IL_d4b8: ldloc.s V_10 - IL_d4ba: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d4bf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d4c4: stloc.s V_8 - IL_d4c6: br.s IL_d50e - - IL_d4c8: ldloc.s V_7 - IL_d4ca: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d4cf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d4d4: stloc.s V_10 - IL_d4d6: ldloc.s V_6 - IL_d4d8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d4dd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d4e2: stloc.s V_6 - IL_d4e4: ldloc.s V_10 - IL_d4e6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d4eb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d4f0: stloc.s V_10 - IL_d4f2: ldloc.s V_6 - IL_d4f4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d4f9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d4fe: stloc.s V_9 - IL_d500: ldloc.s V_7 - IL_d502: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d507: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d50c: stloc.s V_10 - IL_d50e: ldloc.s V_7 - IL_d510: ldloc.s V_8 - IL_d512: bge.s IL_d55c - - IL_d514: ldloc.s V_8 - IL_d516: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d51b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d520: stloc.s V_10 - IL_d522: ldloc.s V_8 - IL_d524: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d529: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d52e: stloc.s V_8 - IL_d530: ldloc.s V_10 - IL_d532: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d537: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d53c: stloc.s V_8 - IL_d53e: ldloc.s V_10 - IL_d540: call string [mscorlib]System.Convert::ToString(int32) - IL_d545: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d54a: stloc.s V_9 - IL_d54c: ldloc.s V_6 - IL_d54e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d553: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d558: stloc.s V_10 - IL_d55a: br.s IL_d5a2 - - IL_d55c: ldloc.s V_7 - IL_d55e: call string [mscorlib]System.Convert::ToString(int32) - IL_d563: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d568: stloc.s V_10 - IL_d56a: ldloc.s V_8 - IL_d56c: call string [mscorlib]System.Convert::ToString(int32) - IL_d571: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d576: stloc.s V_7 - IL_d578: ldloc.s V_7 - IL_d57a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d57f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d584: stloc.s V_9 - IL_d586: ldloc.s V_6 - IL_d588: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d58d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d592: stloc.s V_10 - IL_d594: ldloc.s V_9 - IL_d596: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d59b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d5a0: stloc.s V_7 - IL_d5a2: ldloc.s V_7 - IL_d5a4: ldloc.s V_6 - IL_d5a6: bge.s IL_d5f0 - - IL_d5a8: ldloc.s V_7 - IL_d5aa: call string [mscorlib]System.Convert::ToString(int32) - IL_d5af: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d5b4: stloc.s V_6 - IL_d5b6: ldloc.s V_8 - IL_d5b8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d5bd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d5c2: stloc.s V_7 - IL_d5c4: ldloc.s V_6 - IL_d5c6: call string [mscorlib]System.Convert::ToString(int32) - IL_d5cb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d5d0: stloc.s V_10 - IL_d5d2: ldloc.s V_9 - IL_d5d4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d5d9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d5de: stloc.s V_7 - IL_d5e0: ldloc.s V_8 - IL_d5e2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d5e7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d5ec: stloc.s V_6 - IL_d5ee: br.s IL_d636 - - IL_d5f0: ldloc.s V_9 - IL_d5f2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d5f7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d5fc: stloc.s V_10 - IL_d5fe: ldloc.s V_9 - IL_d600: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d605: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d60a: stloc.s V_6 - IL_d60c: ldloc.s V_6 - IL_d60e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d613: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d618: stloc.s V_6 - IL_d61a: ldloc.s V_6 - IL_d61c: call string [mscorlib]System.Convert::ToString(int32) - IL_d621: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d626: stloc.s V_6 - IL_d628: ldloc.s V_9 - IL_d62a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d62f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d634: stloc.s V_8 - IL_d636: ldloc.s V_8 - IL_d638: ldloc.s V_7 - IL_d63a: bge.s IL_d684 - - IL_d63c: ldloc.s V_10 - IL_d63e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d643: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d648: stloc.s V_9 - IL_d64a: ldloc.s V_7 - IL_d64c: call string [mscorlib]System.Convert::ToString(int32) - IL_d651: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d656: stloc.s V_9 - IL_d658: ldloc.s V_6 - IL_d65a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d65f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d664: stloc.s V_10 - IL_d666: ldloc.s V_9 - IL_d668: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d66d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d672: stloc.s V_8 - IL_d674: ldloc.s V_6 - IL_d676: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d67b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d680: stloc.s V_9 - IL_d682: br.s IL_d6ca - - IL_d684: ldloc.s V_10 - IL_d686: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d68b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d690: stloc.s V_8 - IL_d692: ldloc.s V_7 - IL_d694: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d699: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d69e: stloc.s V_6 - IL_d6a0: ldloc.s V_8 - IL_d6a2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d6a7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d6ac: stloc.s V_7 - IL_d6ae: ldloc.s V_10 - IL_d6b0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d6b5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d6ba: stloc.s V_7 - IL_d6bc: ldloc.s V_7 - IL_d6be: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d6c3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d6c8: stloc.s V_7 - IL_d6ca: ldloc.s V_10 - IL_d6cc: ldloc.s V_8 - IL_d6ce: blt.s IL_d718 - - IL_d6d0: ldloc.s V_10 - IL_d6d2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d6d7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d6dc: stloc.s V_7 - IL_d6de: ldloc.s V_7 - IL_d6e0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d6e5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d6ea: stloc.s V_9 - IL_d6ec: ldloc.s V_8 - IL_d6ee: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d6f3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d6f8: stloc.s V_8 - IL_d6fa: ldloc.s V_9 - IL_d6fc: call string [mscorlib]System.Convert::ToString(int32) - IL_d701: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d706: stloc.s V_9 - IL_d708: ldloc.s V_9 - IL_d70a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d70f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d714: stloc.s V_8 - IL_d716: br.s IL_d75e - - IL_d718: ldloc.s V_10 - IL_d71a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d71f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d724: stloc.s V_6 - IL_d726: ldloc.s V_8 - IL_d728: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d72d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d732: stloc.s V_9 - IL_d734: ldloc.s V_9 - IL_d736: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d73b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d740: stloc.s V_10 - IL_d742: ldloc.s V_7 - IL_d744: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d749: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d74e: stloc.s V_8 - IL_d750: ldloc.s V_6 - IL_d752: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d757: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d75c: stloc.s V_7 - IL_d75e: ldloc.s V_6 - IL_d760: ldloc.s V_8 - IL_d762: bne.un.s IL_d7ac - - IL_d764: ldloc.s V_8 - IL_d766: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d76b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d770: stloc.s V_6 - IL_d772: ldloc.s V_6 - IL_d774: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d779: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d77e: stloc.s V_6 - IL_d780: ldloc.s V_10 - IL_d782: call string [mscorlib]System.Convert::ToString(int32) - IL_d787: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d78c: stloc.s V_8 - IL_d78e: ldloc.s V_8 - IL_d790: call string [mscorlib]System.Convert::ToString(int32) - IL_d795: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d79a: stloc.s V_10 - IL_d79c: ldloc.s V_10 - IL_d79e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d7a3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d7a8: stloc.s V_9 - IL_d7aa: br.s IL_d7f2 - - IL_d7ac: ldloc.s V_8 - IL_d7ae: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d7b3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d7b8: stloc.s V_6 - IL_d7ba: ldloc.s V_9 - IL_d7bc: call string [mscorlib]System.Convert::ToString(int32) - IL_d7c1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d7c6: stloc.s V_7 - IL_d7c8: ldloc.s V_10 - IL_d7ca: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d7cf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d7d4: stloc.s V_6 - IL_d7d6: ldloc.s V_9 - IL_d7d8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d7dd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d7e2: stloc.s V_7 - IL_d7e4: ldloc.s V_10 - IL_d7e6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d7eb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d7f0: stloc.s V_6 - IL_d7f2: ldloc.s V_6 - IL_d7f4: ldloc.s V_8 - IL_d7f6: blt.s IL_d840 - - IL_d7f8: ldloc.s V_6 - IL_d7fa: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d7ff: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d804: stloc.s V_7 - IL_d806: ldloc.s V_6 - IL_d808: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d80d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d812: stloc.s V_7 - IL_d814: ldloc.s V_9 - IL_d816: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d81b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d820: stloc.s V_10 - IL_d822: ldloc.s V_10 - IL_d824: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d829: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d82e: stloc.s V_8 - IL_d830: ldloc.s V_8 - IL_d832: call string [mscorlib]System.Convert::ToString(int32) - IL_d837: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d83c: stloc.s V_7 - IL_d83e: br.s IL_d886 - - IL_d840: ldloc.s V_7 - IL_d842: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d847: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d84c: stloc.s V_8 - IL_d84e: ldloc.s V_8 - IL_d850: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d855: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d85a: stloc.s V_9 - IL_d85c: ldloc.s V_10 - IL_d85e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d863: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d868: stloc.s V_9 - IL_d86a: ldloc.s V_8 - IL_d86c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d871: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d876: stloc.s V_9 - IL_d878: ldloc.s V_8 - IL_d87a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d87f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d884: stloc.s V_7 - IL_d886: ldloc.s V_7 - IL_d888: ldloc.s V_8 - IL_d88a: ble.s IL_d8d4 - - IL_d88c: ldloc.s V_8 - IL_d88e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d893: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d898: stloc.s V_10 - IL_d89a: ldloc.s V_7 - IL_d89c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d8a1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d8a6: stloc.s V_9 - IL_d8a8: ldloc.s V_7 - IL_d8aa: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d8af: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d8b4: stloc.s V_7 - IL_d8b6: ldloc.s V_7 - IL_d8b8: call string [mscorlib]System.Convert::ToString(int32) - IL_d8bd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d8c2: stloc.s V_6 - IL_d8c4: ldloc.s V_8 - IL_d8c6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d8cb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d8d0: stloc.s V_10 - IL_d8d2: br.s IL_d91a - - IL_d8d4: ldloc.s V_10 - IL_d8d6: call string [mscorlib]System.Convert::ToString(int32) - IL_d8db: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d8e0: stloc.s V_6 - IL_d8e2: ldloc.s V_8 - IL_d8e4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d8e9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d8ee: stloc.s V_8 - IL_d8f0: ldloc.s V_7 - IL_d8f2: call string [mscorlib]System.Convert::ToString(int32) - IL_d8f7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d8fc: stloc.s V_6 - IL_d8fe: ldloc.s V_6 - IL_d900: call string [mscorlib]System.Convert::ToString(int32) - IL_d905: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d90a: stloc.s V_7 - IL_d90c: ldloc.s V_10 - IL_d90e: call string [mscorlib]System.Convert::ToString(int32) - IL_d913: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d918: stloc.s V_8 - IL_d91a: ldloc.s V_8 - IL_d91c: ldloc.s V_10 - IL_d91e: bge.s IL_d968 - - IL_d920: ldloc.s V_6 - IL_d922: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d927: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d92c: stloc.s V_7 - IL_d92e: ldloc.s V_7 - IL_d930: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d935: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d93a: stloc.s V_6 - IL_d93c: ldloc.s V_6 - IL_d93e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d943: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d948: stloc.s V_10 - IL_d94a: ldloc.s V_7 - IL_d94c: call string [mscorlib]System.Convert::ToString(int32) - IL_d951: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d956: stloc.s V_6 - IL_d958: ldloc.s V_10 - IL_d95a: call string [mscorlib]System.Convert::ToString(int32) - IL_d95f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d964: stloc.s V_8 - IL_d966: br.s IL_d9ae - - IL_d968: ldloc.s V_10 - IL_d96a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d96f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d974: stloc.s V_6 - IL_d976: ldloc.s V_8 - IL_d978: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d97d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d982: stloc.s V_9 - IL_d984: ldloc.s V_10 - IL_d986: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d98b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d990: stloc.s V_10 - IL_d992: ldloc.s V_7 - IL_d994: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d999: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d99e: stloc.s V_6 - IL_d9a0: ldloc.s V_9 - IL_d9a2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d9a7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d9ac: stloc.s V_7 - IL_d9ae: ldloc.s V_10 - IL_d9b0: ldloc.s V_6 - IL_d9b2: bgt.s IL_d9fc - - IL_d9b4: ldloc.s V_10 - IL_d9b6: call string [mscorlib]System.Convert::ToString(int32) - IL_d9bb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d9c0: stloc.s V_8 - IL_d9c2: ldloc.s V_9 - IL_d9c4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d9c9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d9ce: stloc.s V_7 - IL_d9d0: ldloc.s V_9 - IL_d9d2: call string [mscorlib]System.Convert::ToString(int32) - IL_d9d7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d9dc: stloc.s V_8 - IL_d9de: ldloc.s V_6 - IL_d9e0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d9e5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d9ea: stloc.s V_8 - IL_d9ec: ldloc.s V_10 - IL_d9ee: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d9f3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d9f8: stloc.s V_10 - IL_d9fa: br.s IL_da42 - - IL_d9fc: ldloc.s V_8 - IL_d9fe: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_da03: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_da08: stloc.s V_7 - IL_da0a: ldloc.s V_6 - IL_da0c: call string [mscorlib]System.Convert::ToString(int32) - IL_da11: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_da16: stloc.s V_10 - IL_da18: ldloc.s V_7 - IL_da1a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_da1f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_da24: stloc.s V_7 - IL_da26: ldloc.s V_8 - IL_da28: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_da2d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_da32: stloc.s V_7 - IL_da34: ldloc.s V_8 - IL_da36: call string [mscorlib]System.Convert::ToString(int32) - IL_da3b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_da40: stloc.s V_10 - IL_da42: ldloc.s V_8 - IL_da44: ldloc.s V_9 - IL_da46: blt.s IL_da90 - - IL_da48: ldloc.s V_6 - IL_da4a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_da4f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_da54: stloc.s V_7 - IL_da56: ldloc.s V_6 - IL_da58: call string [mscorlib]System.Convert::ToString(int32) - IL_da5d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_da62: stloc.s V_6 - IL_da64: ldloc.s V_9 - IL_da66: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_da6b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_da70: stloc.s V_7 - IL_da72: ldloc.s V_6 - IL_da74: call string [mscorlib]System.Convert::ToString(int32) - IL_da79: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_da7e: stloc.s V_10 - IL_da80: ldloc.s V_8 - IL_da82: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_da87: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_da8c: stloc.s V_10 - IL_da8e: br.s IL_dad6 - - IL_da90: ldloc.s V_7 - IL_da92: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_da97: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_da9c: stloc.s V_7 - IL_da9e: ldloc.s V_7 - IL_daa0: call string [mscorlib]System.Convert::ToString(int32) - IL_daa5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_daaa: stloc.s V_7 - IL_daac: ldloc.s V_7 - IL_daae: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dab3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dab8: stloc.s V_6 - IL_daba: ldloc.s V_7 - IL_dabc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dac1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dac6: stloc.s V_8 - IL_dac8: ldloc.s V_6 - IL_daca: call string [mscorlib]System.Convert::ToString(int32) - IL_dacf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_dad4: stloc.s V_6 - IL_dad6: ldloc.s V_6 - IL_dad8: ldloc.s V_8 - IL_dada: ble.s IL_db24 - - IL_dadc: ldloc.s V_9 - IL_dade: call string [mscorlib]System.Convert::ToString(int32) - IL_dae3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_dae8: stloc.s V_7 - IL_daea: ldloc.s V_10 - IL_daec: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_daf1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_daf6: stloc.s V_10 - IL_daf8: ldloc.s V_8 - IL_dafa: call string [mscorlib]System.Convert::ToString(int32) - IL_daff: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_db04: stloc.s V_8 - IL_db06: ldloc.s V_10 - IL_db08: call string [mscorlib]System.Convert::ToString(int32) - IL_db0d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_db12: stloc.s V_7 - IL_db14: ldloc.s V_9 - IL_db16: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_db1b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_db20: stloc.s V_7 - IL_db22: br.s IL_db6a - - IL_db24: ldloc.s V_9 - IL_db26: call string [mscorlib]System.Convert::ToString(int32) - IL_db2b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_db30: stloc.s V_6 - IL_db32: ldloc.s V_10 - IL_db34: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_db39: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_db3e: stloc.s V_6 - IL_db40: ldloc.s V_6 - IL_db42: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_db47: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_db4c: stloc.s V_7 - IL_db4e: ldloc.s V_8 - IL_db50: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_db55: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_db5a: stloc.s V_9 - IL_db5c: ldloc.s V_8 - IL_db5e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_db63: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_db68: stloc.s V_9 - IL_db6a: ldloc.s V_9 - IL_db6c: ldloc.s V_8 - IL_db6e: bgt.s IL_dbb8 - - IL_db70: ldloc.s V_8 - IL_db72: call string [mscorlib]System.Convert::ToString(int32) - IL_db77: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_db7c: stloc.s V_9 - IL_db7e: ldloc.s V_9 - IL_db80: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_db85: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_db8a: stloc.s V_10 - IL_db8c: ldloc.s V_10 - IL_db8e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_db93: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_db98: stloc.s V_8 - IL_db9a: ldloc.s V_8 - IL_db9c: call string [mscorlib]System.Convert::ToString(int32) - IL_dba1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_dba6: stloc.s V_9 - IL_dba8: ldloc.s V_9 - IL_dbaa: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_dbaf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_dbb4: stloc.s V_8 - IL_dbb6: br.s IL_dbfe - - IL_dbb8: ldloc.s V_6 - IL_dbba: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dbbf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dbc4: stloc.s V_9 - IL_dbc6: ldloc.s V_6 - IL_dbc8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dbcd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dbd2: stloc.s V_8 - IL_dbd4: ldloc.s V_7 - IL_dbd6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_dbdb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_dbe0: stloc.s V_8 - IL_dbe2: ldloc.s V_9 - IL_dbe4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dbe9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dbee: stloc.s V_8 - IL_dbf0: ldloc.s V_8 - IL_dbf2: call string [mscorlib]System.Convert::ToString(int32) - IL_dbf7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_dbfc: stloc.s V_7 - IL_dbfe: ldloc.s V_9 - IL_dc00: ldloc.s V_10 - IL_dc02: ble.s IL_dc4c - - IL_dc04: ldloc.s V_10 - IL_dc06: call string [mscorlib]System.Convert::ToString(int32) - IL_dc0b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_dc10: stloc.s V_7 - IL_dc12: ldloc.s V_6 - IL_dc14: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dc19: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dc1e: stloc.s V_6 - IL_dc20: ldloc.s V_7 - IL_dc22: call string [mscorlib]System.Convert::ToString(int32) - IL_dc27: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_dc2c: stloc.s V_10 - IL_dc2e: ldloc.s V_8 - IL_dc30: call string [mscorlib]System.Convert::ToString(int32) - IL_dc35: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_dc3a: stloc.s V_10 - IL_dc3c: ldloc.s V_7 - IL_dc3e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_dc43: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_dc48: stloc.s V_9 - IL_dc4a: br.s IL_dc92 - - IL_dc4c: ldloc.s V_6 - IL_dc4e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dc53: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dc58: stloc.s V_10 - IL_dc5a: ldloc.s V_8 - IL_dc5c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_dc61: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_dc66: stloc.s V_7 - IL_dc68: ldloc.s V_8 - IL_dc6a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dc6f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dc74: stloc.s V_8 - IL_dc76: ldloc.s V_6 - IL_dc78: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_dc7d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_dc82: stloc.s V_6 - IL_dc84: ldloc.s V_6 - IL_dc86: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dc8b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dc90: stloc.s V_10 - IL_dc92: ldloc.s V_8 - IL_dc94: ldloc.s V_6 - IL_dc96: blt.s IL_dce0 - - IL_dc98: ldloc.s V_8 - IL_dc9a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dc9f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dca4: stloc.s V_8 - IL_dca6: ldloc.s V_10 - IL_dca8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_dcad: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_dcb2: stloc.s V_9 - IL_dcb4: ldloc.s V_8 - IL_dcb6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_dcbb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_dcc0: stloc.s V_10 - IL_dcc2: ldloc.s V_7 - IL_dcc4: call string [mscorlib]System.Convert::ToString(int32) - IL_dcc9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_dcce: stloc.s V_9 - IL_dcd0: ldloc.s V_10 - IL_dcd2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_dcd7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_dcdc: stloc.s V_10 - IL_dcde: br.s IL_dd26 - - IL_dce0: ldloc.s V_9 - IL_dce2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_dce7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_dcec: stloc.s V_8 - IL_dcee: ldloc.s V_7 - IL_dcf0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_dcf5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_dcfa: stloc.s V_7 - IL_dcfc: ldloc.s V_8 - IL_dcfe: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_dd03: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_dd08: stloc.s V_7 - IL_dd0a: ldloc.s V_9 - IL_dd0c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dd11: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dd16: stloc.s V_7 - IL_dd18: ldloc.s V_7 - IL_dd1a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dd1f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dd24: stloc.s V_6 - IL_dd26: ldloc.s V_8 - IL_dd28: ldloc.s V_6 - IL_dd2a: bge.s IL_dd74 - - IL_dd2c: ldloc.s V_7 - IL_dd2e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dd33: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dd38: stloc.s V_8 - IL_dd3a: ldloc.s V_9 - IL_dd3c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dd41: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dd46: stloc.s V_9 - IL_dd48: ldloc.s V_9 - IL_dd4a: call string [mscorlib]System.Convert::ToString(int32) - IL_dd4f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_dd54: stloc.s V_7 - IL_dd56: ldloc.s V_9 - IL_dd58: call string [mscorlib]System.Convert::ToString(int32) - IL_dd5d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_dd62: stloc.s V_6 - IL_dd64: ldloc.s V_8 - IL_dd66: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_dd6b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_dd70: stloc.s V_7 - IL_dd72: br.s IL_ddba - - IL_dd74: ldloc.s V_10 - IL_dd76: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_dd7b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_dd80: stloc.s V_6 - IL_dd82: ldloc.s V_10 - IL_dd84: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dd89: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dd8e: stloc.s V_7 - IL_dd90: ldloc.s V_6 - IL_dd92: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_dd97: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_dd9c: stloc.s V_9 - IL_dd9e: ldloc.s V_7 - IL_dda0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_dda5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ddaa: stloc.s V_6 - IL_ddac: ldloc.s V_8 - IL_ddae: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ddb3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ddb8: stloc.s V_6 - IL_ddba: ldloc.s V_7 - IL_ddbc: ldloc.s V_6 - IL_ddbe: ble.s IL_de08 - - IL_ddc0: ldloc.s V_9 - IL_ddc2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ddc7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ddcc: stloc.s V_6 - IL_ddce: ldloc.s V_7 - IL_ddd0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ddd5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ddda: stloc.s V_9 - IL_dddc: ldloc.s V_6 - IL_ddde: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dde3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dde8: stloc.s V_10 - IL_ddea: ldloc.s V_7 - IL_ddec: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_ddf1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ddf6: stloc.s V_8 - IL_ddf8: ldloc.s V_9 - IL_ddfa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_ddff: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_de04: stloc.s V_10 - IL_de06: br.s IL_de4e - - IL_de08: ldloc.s V_9 - IL_de0a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_de0f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_de14: stloc.s V_6 - IL_de16: ldloc.s V_7 - IL_de18: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_de1d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_de22: stloc.s V_8 - IL_de24: ldloc.s V_9 - IL_de26: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_de2b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_de30: stloc.s V_7 - IL_de32: ldloc.s V_9 - IL_de34: call string [mscorlib]System.Convert::ToString(int32) - IL_de39: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_de3e: stloc.s V_6 - IL_de40: ldloc.s V_9 - IL_de42: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_de47: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_de4c: stloc.s V_7 - IL_de4e: ldloc.s V_10 - IL_de50: ldloc.s V_7 - IL_de52: blt.s IL_de9c - - IL_de54: ldloc.s V_6 - IL_de56: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_de5b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_de60: stloc.s V_9 - IL_de62: ldloc.s V_8 - IL_de64: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_de69: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_de6e: stloc.s V_9 - IL_de70: ldloc.s V_6 - IL_de72: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_de77: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_de7c: stloc.s V_9 - IL_de7e: ldloc.s V_6 - IL_de80: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_de85: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_de8a: stloc.s V_9 - IL_de8c: ldloc.s V_7 - IL_de8e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_de93: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_de98: stloc.s V_10 - IL_de9a: br.s IL_dee2 - - IL_de9c: ldloc.s V_10 - IL_de9e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dea3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dea8: stloc.s V_9 - IL_deaa: ldloc.s V_8 - IL_deac: call string [mscorlib]System.Convert::ToString(int32) - IL_deb1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_deb6: stloc.s V_10 - IL_deb8: ldloc.s V_8 - IL_deba: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_debf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_dec4: stloc.s V_9 - IL_dec6: ldloc.s V_7 - IL_dec8: call string [mscorlib]System.Convert::ToString(int32) - IL_decd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ded2: stloc.s V_6 - IL_ded4: ldloc.s V_6 - IL_ded6: call string [mscorlib]System.Convert::ToString(int32) - IL_dedb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_dee0: stloc.s V_8 - IL_dee2: ldloc.s V_7 - IL_dee4: ldloc.s V_6 - IL_dee6: blt.s IL_df30 - - IL_dee8: ldloc.s V_10 - IL_deea: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_deef: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_def4: stloc.s V_10 - IL_def6: ldloc.s V_8 - IL_def8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_defd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_df02: stloc.s V_9 - IL_df04: ldloc.s V_8 - IL_df06: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_df0b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_df10: stloc.s V_6 - IL_df12: ldloc.s V_9 - IL_df14: call string [mscorlib]System.Convert::ToString(int32) - IL_df19: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_df1e: stloc.s V_7 - IL_df20: ldloc.s V_8 - IL_df22: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_df27: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_df2c: stloc.s V_9 - IL_df2e: br.s IL_df76 - - IL_df30: ldloc.s V_6 - IL_df32: call string [mscorlib]System.Convert::ToString(int32) - IL_df37: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_df3c: stloc.s V_7 - IL_df3e: ldloc.s V_7 - IL_df40: call string [mscorlib]System.Convert::ToString(int32) - IL_df45: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_df4a: stloc.s V_10 - IL_df4c: ldloc.s V_7 - IL_df4e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_df53: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_df58: stloc.s V_10 - IL_df5a: ldloc.s V_9 - IL_df5c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_df61: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_df66: stloc.s V_8 - IL_df68: ldloc.s V_9 - IL_df6a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_df6f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_df74: stloc.s V_7 - IL_df76: ldloc.s V_6 - IL_df78: ldloc.s V_10 - IL_df7a: ble.s IL_dfc4 - - IL_df7c: ldloc.s V_9 - IL_df7e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_df83: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_df88: stloc.s V_10 - IL_df8a: ldloc.s V_9 - IL_df8c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_df91: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_df96: stloc.s V_8 - IL_df98: ldloc.s V_9 - IL_df9a: call string [mscorlib]System.Convert::ToString(int32) - IL_df9f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_dfa4: stloc.s V_8 - IL_dfa6: ldloc.s V_7 - IL_dfa8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_dfad: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_dfb2: stloc.s V_6 - IL_dfb4: ldloc.s V_7 - IL_dfb6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_dfbb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_dfc0: stloc.s V_9 - IL_dfc2: br.s IL_e00a - - IL_dfc4: ldloc.s V_10 - IL_dfc6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dfcb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dfd0: stloc.s V_9 - IL_dfd2: ldloc.s V_9 - IL_dfd4: call string [mscorlib]System.Convert::ToString(int32) - IL_dfd9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_dfde: stloc.s V_10 - IL_dfe0: ldloc.s V_7 - IL_dfe2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dfe7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dfec: stloc.s V_9 - IL_dfee: ldloc.s V_9 - IL_dff0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dff5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dffa: stloc.s V_9 - IL_dffc: ldloc.s V_9 - IL_dffe: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e003: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e008: stloc.s V_9 - IL_e00a: ldloc.s V_7 - IL_e00c: ldloc.s V_8 - IL_e00e: bne.un.s IL_e058 - - IL_e010: ldloc.s V_8 - IL_e012: call string [mscorlib]System.Convert::ToString(int32) - IL_e017: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e01c: stloc.s V_10 - IL_e01e: ldloc.s V_10 - IL_e020: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e025: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e02a: stloc.s V_9 - IL_e02c: ldloc.s V_9 - IL_e02e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e033: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e038: stloc.s V_8 - IL_e03a: ldloc.s V_9 - IL_e03c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e041: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e046: stloc.s V_9 - IL_e048: ldloc.s V_7 - IL_e04a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e04f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e054: stloc.s V_10 - IL_e056: br.s IL_e09e - - IL_e058: ldloc.s V_6 - IL_e05a: call string [mscorlib]System.Convert::ToString(int32) - IL_e05f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e064: stloc.s V_8 - IL_e066: ldloc.s V_8 - IL_e068: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e06d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e072: stloc.s V_10 - IL_e074: ldloc.s V_10 - IL_e076: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e07b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e080: stloc.s V_6 - IL_e082: ldloc.s V_9 - IL_e084: call string [mscorlib]System.Convert::ToString(int32) - IL_e089: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e08e: stloc.s V_8 - IL_e090: ldloc.s V_10 - IL_e092: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e097: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e09c: stloc.s V_10 - IL_e09e: ldloc.s V_7 - IL_e0a0: ldloc.s V_10 - IL_e0a2: ble.s IL_e0ec - - IL_e0a4: ldloc.s V_9 - IL_e0a6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e0ab: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e0b0: stloc.s V_9 - IL_e0b2: ldloc.s V_6 - IL_e0b4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e0b9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e0be: stloc.s V_10 - IL_e0c0: ldloc.s V_7 - IL_e0c2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e0c7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e0cc: stloc.s V_6 - IL_e0ce: ldloc.s V_7 - IL_e0d0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e0d5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e0da: stloc.s V_10 - IL_e0dc: ldloc.s V_7 - IL_e0de: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e0e3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e0e8: stloc.s V_9 - IL_e0ea: br.s IL_e132 - - IL_e0ec: ldloc.s V_7 - IL_e0ee: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e0f3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e0f8: stloc.s V_7 - IL_e0fa: ldloc.s V_7 - IL_e0fc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e101: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e106: stloc.s V_9 - IL_e108: ldloc.s V_8 - IL_e10a: call string [mscorlib]System.Convert::ToString(int32) - IL_e10f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e114: stloc.s V_10 - IL_e116: ldloc.s V_7 - IL_e118: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e11d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e122: stloc.s V_9 - IL_e124: ldloc.s V_8 - IL_e126: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e12b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e130: stloc.s V_6 - IL_e132: ldloc.s V_8 - IL_e134: ldloc.s V_8 - IL_e136: beq.s IL_e180 - - IL_e138: ldloc.s V_10 - IL_e13a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e13f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e144: stloc.s V_10 - IL_e146: ldloc.s V_8 - IL_e148: call string [mscorlib]System.Convert::ToString(int32) - IL_e14d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e152: stloc.s V_9 - IL_e154: ldloc.s V_9 - IL_e156: call string [mscorlib]System.Convert::ToString(int32) - IL_e15b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e160: stloc.s V_10 - IL_e162: ldloc.s V_10 - IL_e164: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e169: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e16e: stloc.s V_7 - IL_e170: ldloc.s V_10 - IL_e172: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e177: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e17c: stloc.s V_8 - IL_e17e: br.s IL_e1c6 - - IL_e180: ldloc.s V_9 - IL_e182: call string [mscorlib]System.Convert::ToString(int32) - IL_e187: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e18c: stloc.s V_7 - IL_e18e: ldloc.s V_8 - IL_e190: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e195: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e19a: stloc.s V_9 - IL_e19c: ldloc.s V_6 - IL_e19e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e1a3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e1a8: stloc.s V_9 - IL_e1aa: ldloc.s V_9 - IL_e1ac: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e1b1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e1b6: stloc.s V_6 - IL_e1b8: ldloc.s V_10 - IL_e1ba: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e1bf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e1c4: stloc.s V_10 - IL_e1c6: ldloc.s V_6 - IL_e1c8: ldloc.s V_8 - IL_e1ca: bne.un.s IL_e214 - - IL_e1cc: ldloc.s V_9 - IL_e1ce: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e1d3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e1d8: stloc.s V_10 - IL_e1da: ldloc.s V_9 - IL_e1dc: call string [mscorlib]System.Convert::ToString(int32) - IL_e1e1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e1e6: stloc.s V_7 - IL_e1e8: ldloc.s V_6 - IL_e1ea: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e1ef: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e1f4: stloc.s V_9 - IL_e1f6: ldloc.s V_8 - IL_e1f8: call string [mscorlib]System.Convert::ToString(int32) - IL_e1fd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e202: stloc.s V_9 - IL_e204: ldloc.s V_8 - IL_e206: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e20b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e210: stloc.s V_8 - IL_e212: br.s IL_e25a - - IL_e214: ldloc.s V_9 - IL_e216: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e21b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e220: stloc.s V_7 - IL_e222: ldloc.s V_7 - IL_e224: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e229: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e22e: stloc.s V_10 - IL_e230: ldloc.s V_7 - IL_e232: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e237: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e23c: stloc.s V_10 - IL_e23e: ldloc.s V_7 - IL_e240: call string [mscorlib]System.Convert::ToString(int32) - IL_e245: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e24a: stloc.s V_10 - IL_e24c: ldloc.s V_9 - IL_e24e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e253: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e258: stloc.s V_10 - IL_e25a: ldloc.s V_9 - IL_e25c: ldloc.s V_6 - IL_e25e: bgt.s IL_e2a8 - - IL_e260: ldloc.s V_6 - IL_e262: call string [mscorlib]System.Convert::ToString(int32) - IL_e267: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e26c: stloc.s V_8 - IL_e26e: ldloc.s V_6 - IL_e270: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e275: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e27a: stloc.s V_7 - IL_e27c: ldloc.s V_9 - IL_e27e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e283: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e288: stloc.s V_6 - IL_e28a: ldloc.s V_7 - IL_e28c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e291: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e296: stloc.s V_7 - IL_e298: ldloc.s V_7 - IL_e29a: call string [mscorlib]System.Convert::ToString(int32) - IL_e29f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e2a4: stloc.s V_9 - IL_e2a6: br.s IL_e2ee - - IL_e2a8: ldloc.s V_6 - IL_e2aa: call string [mscorlib]System.Convert::ToString(int32) - IL_e2af: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e2b4: stloc.s V_6 - IL_e2b6: ldloc.s V_10 - IL_e2b8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e2bd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e2c2: stloc.s V_7 - IL_e2c4: ldloc.s V_8 - IL_e2c6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e2cb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e2d0: stloc.s V_7 - IL_e2d2: ldloc.s V_6 - IL_e2d4: call string [mscorlib]System.Convert::ToString(int32) - IL_e2d9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e2de: stloc.s V_7 - IL_e2e0: ldloc.s V_9 - IL_e2e2: call string [mscorlib]System.Convert::ToString(int32) - IL_e2e7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e2ec: stloc.s V_7 - IL_e2ee: ldloc.s V_10 - IL_e2f0: ldloc.s V_10 - IL_e2f2: blt.s IL_e33c - - IL_e2f4: ldloc.s V_7 - IL_e2f6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e2fb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e300: stloc.s V_7 - IL_e302: ldloc.s V_6 - IL_e304: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e309: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e30e: stloc.s V_8 - IL_e310: ldloc.s V_6 - IL_e312: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e317: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e31c: stloc.s V_9 - IL_e31e: ldloc.s V_7 - IL_e320: call string [mscorlib]System.Convert::ToString(int32) - IL_e325: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e32a: stloc.s V_8 - IL_e32c: ldloc.s V_10 - IL_e32e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e333: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e338: stloc.s V_6 - IL_e33a: br.s IL_e382 - - IL_e33c: ldloc.s V_8 - IL_e33e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e343: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e348: stloc.s V_6 - IL_e34a: ldloc.s V_10 - IL_e34c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e351: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e356: stloc.s V_9 - IL_e358: ldloc.s V_10 - IL_e35a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e35f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e364: stloc.s V_7 - IL_e366: ldloc.s V_7 - IL_e368: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e36d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e372: stloc.s V_8 - IL_e374: ldloc.s V_7 - IL_e376: call string [mscorlib]System.Convert::ToString(int32) - IL_e37b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e380: stloc.s V_6 - IL_e382: ldloc.s V_10 - IL_e384: ldloc.s V_10 - IL_e386: beq.s IL_e3d0 - - IL_e388: ldloc.s V_8 - IL_e38a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e38f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e394: stloc.s V_7 - IL_e396: ldloc.s V_8 - IL_e398: call string [mscorlib]System.Convert::ToString(int32) - IL_e39d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e3a2: stloc.s V_10 - IL_e3a4: ldloc.s V_10 - IL_e3a6: call string [mscorlib]System.Convert::ToString(int32) - IL_e3ab: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e3b0: stloc.s V_10 - IL_e3b2: ldloc.s V_6 - IL_e3b4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e3b9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e3be: stloc.s V_10 - IL_e3c0: ldloc.s V_7 - IL_e3c2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e3c7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e3cc: stloc.s V_7 - IL_e3ce: br.s IL_e416 - - IL_e3d0: ldloc.s V_10 - IL_e3d2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e3d7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e3dc: stloc.s V_6 - IL_e3de: ldloc.s V_8 - IL_e3e0: call string [mscorlib]System.Convert::ToString(int32) - IL_e3e5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e3ea: stloc.s V_7 - IL_e3ec: ldloc.s V_6 - IL_e3ee: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e3f3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e3f8: stloc.s V_6 - IL_e3fa: ldloc.s V_6 - IL_e3fc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e401: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e406: stloc.s V_8 - IL_e408: ldloc.s V_7 - IL_e40a: call string [mscorlib]System.Convert::ToString(int32) - IL_e40f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e414: stloc.s V_9 - IL_e416: ldloc.s V_9 - IL_e418: ldloc.s V_10 - IL_e41a: bne.un.s IL_e464 - - IL_e41c: ldloc.s V_6 - IL_e41e: call string [mscorlib]System.Convert::ToString(int32) - IL_e423: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e428: stloc.s V_7 - IL_e42a: ldloc.s V_7 - IL_e42c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e431: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e436: stloc.s V_8 - IL_e438: ldloc.s V_10 - IL_e43a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e43f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e444: stloc.s V_10 - IL_e446: ldloc.s V_7 - IL_e448: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e44d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e452: stloc.s V_6 - IL_e454: ldloc.s V_9 - IL_e456: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e45b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e460: stloc.s V_9 - IL_e462: br.s IL_e4aa - - IL_e464: ldloc.s V_8 - IL_e466: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e46b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e470: stloc.s V_6 - IL_e472: ldloc.s V_7 - IL_e474: call string [mscorlib]System.Convert::ToString(int32) - IL_e479: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e47e: stloc.s V_8 - IL_e480: ldloc.s V_6 - IL_e482: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e487: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e48c: stloc.s V_8 - IL_e48e: ldloc.s V_8 - IL_e490: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e495: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e49a: stloc.s V_8 - IL_e49c: ldloc.s V_10 - IL_e49e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e4a3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e4a8: stloc.s V_8 - IL_e4aa: ldloc.s V_6 - IL_e4ac: ldloc.s V_6 - IL_e4ae: bgt.s IL_e4f8 - - IL_e4b0: ldloc.s V_9 - IL_e4b2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e4b7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e4bc: stloc.s V_7 - IL_e4be: ldloc.s V_6 - IL_e4c0: call string [mscorlib]System.Convert::ToString(int32) - IL_e4c5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e4ca: stloc.s V_7 - IL_e4cc: ldloc.s V_10 - IL_e4ce: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e4d3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e4d8: stloc.s V_8 - IL_e4da: ldloc.s V_9 - IL_e4dc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e4e1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e4e6: stloc.s V_9 - IL_e4e8: ldloc.s V_10 - IL_e4ea: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e4ef: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e4f4: stloc.s V_9 - IL_e4f6: br.s IL_e53e - - IL_e4f8: ldloc.s V_9 - IL_e4fa: call string [mscorlib]System.Convert::ToString(int32) - IL_e4ff: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e504: stloc.s V_7 - IL_e506: ldloc.s V_6 - IL_e508: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e50d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e512: stloc.s V_10 - IL_e514: ldloc.s V_7 - IL_e516: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e51b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e520: stloc.s V_9 - IL_e522: ldloc.s V_10 - IL_e524: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e529: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e52e: stloc.s V_10 - IL_e530: ldloc.s V_8 - IL_e532: call string [mscorlib]System.Convert::ToString(int32) - IL_e537: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e53c: stloc.s V_9 - IL_e53e: ldloc.s V_8 - IL_e540: ldloc.s V_6 - IL_e542: beq.s IL_e58c - - IL_e544: ldloc.s V_7 - IL_e546: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e54b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e550: stloc.s V_6 - IL_e552: ldloc.s V_6 - IL_e554: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e559: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e55e: stloc.s V_6 - IL_e560: ldloc.s V_6 - IL_e562: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e567: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e56c: stloc.s V_7 - IL_e56e: ldloc.s V_7 - IL_e570: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e575: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e57a: stloc.s V_7 - IL_e57c: ldloc.s V_8 - IL_e57e: call string [mscorlib]System.Convert::ToString(int32) - IL_e583: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e588: stloc.s V_7 - IL_e58a: br.s IL_e5d2 - - IL_e58c: ldloc.s V_10 - IL_e58e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e593: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e598: stloc.s V_9 - IL_e59a: ldloc.s V_10 - IL_e59c: call string [mscorlib]System.Convert::ToString(int32) - IL_e5a1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e5a6: stloc.s V_7 - IL_e5a8: ldloc.s V_6 - IL_e5aa: call string [mscorlib]System.Convert::ToString(int32) - IL_e5af: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e5b4: stloc.s V_10 - IL_e5b6: ldloc.s V_9 - IL_e5b8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e5bd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e5c2: stloc.s V_7 - IL_e5c4: ldloc.s V_10 - IL_e5c6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e5cb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e5d0: stloc.s V_7 - IL_e5d2: ldloc.s V_9 - IL_e5d4: ldloc.s V_8 - IL_e5d6: blt.s IL_e620 - - IL_e5d8: ldloc.s V_7 - IL_e5da: call string [mscorlib]System.Convert::ToString(int32) - IL_e5df: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e5e4: stloc.s V_9 - IL_e5e6: ldloc.s V_8 - IL_e5e8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e5ed: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e5f2: stloc.s V_8 - IL_e5f4: ldloc.s V_7 - IL_e5f6: call string [mscorlib]System.Convert::ToString(int32) - IL_e5fb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e600: stloc.s V_8 - IL_e602: ldloc.s V_6 - IL_e604: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e609: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e60e: stloc.s V_6 - IL_e610: ldloc.s V_7 - IL_e612: call string [mscorlib]System.Convert::ToString(int32) - IL_e617: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e61c: stloc.s V_10 - IL_e61e: br.s IL_e666 - - IL_e620: ldloc.s V_8 - IL_e622: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e627: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e62c: stloc.s V_7 - IL_e62e: ldloc.s V_10 - IL_e630: call string [mscorlib]System.Convert::ToString(int32) - IL_e635: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e63a: stloc.s V_8 - IL_e63c: ldloc.s V_9 - IL_e63e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e643: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e648: stloc.s V_6 - IL_e64a: ldloc.s V_8 - IL_e64c: call string [mscorlib]System.Convert::ToString(int32) - IL_e651: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e656: stloc.s V_6 - IL_e658: ldloc.s V_6 - IL_e65a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e65f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e664: stloc.s V_8 - IL_e666: ldloc.s V_10 - IL_e668: ldloc.s V_6 - IL_e66a: bge.s IL_e6b4 - - IL_e66c: ldloc.s V_6 - IL_e66e: call string [mscorlib]System.Convert::ToString(int32) - IL_e673: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e678: stloc.s V_10 - IL_e67a: ldloc.s V_10 - IL_e67c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e681: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e686: stloc.s V_7 - IL_e688: ldloc.s V_6 - IL_e68a: call string [mscorlib]System.Convert::ToString(int32) - IL_e68f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e694: stloc.s V_7 - IL_e696: ldloc.s V_8 - IL_e698: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e69d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e6a2: stloc.s V_9 - IL_e6a4: ldloc.s V_10 - IL_e6a6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e6ab: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e6b0: stloc.s V_6 - IL_e6b2: br.s IL_e6fa - - IL_e6b4: ldloc.s V_10 - IL_e6b6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e6bb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e6c0: stloc.s V_7 - IL_e6c2: ldloc.s V_10 - IL_e6c4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e6c9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e6ce: stloc.s V_8 - IL_e6d0: ldloc.s V_7 - IL_e6d2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e6d7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e6dc: stloc.s V_8 - IL_e6de: ldloc.s V_8 - IL_e6e0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e6e5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e6ea: stloc.s V_9 - IL_e6ec: ldloc.s V_7 - IL_e6ee: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e6f3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e6f8: stloc.s V_6 - IL_e6fa: ldloc.s V_9 - IL_e6fc: ldloc.s V_8 - IL_e6fe: bge.s IL_e748 - - IL_e700: ldloc.s V_9 - IL_e702: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e707: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e70c: stloc.s V_10 - IL_e70e: ldloc.s V_10 - IL_e710: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e715: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e71a: stloc.s V_7 - IL_e71c: ldloc.s V_6 - IL_e71e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e723: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e728: stloc.s V_8 - IL_e72a: ldloc.s V_7 - IL_e72c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e731: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e736: stloc.s V_9 - IL_e738: ldloc.s V_7 - IL_e73a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e73f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e744: stloc.s V_7 - IL_e746: br.s IL_e78e - - IL_e748: ldloc.s V_6 - IL_e74a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e74f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e754: stloc.s V_9 - IL_e756: ldloc.s V_10 - IL_e758: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e75d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e762: stloc.s V_7 - IL_e764: ldloc.s V_7 - IL_e766: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e76b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e770: stloc.s V_6 - IL_e772: ldloc.s V_9 - IL_e774: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e779: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e77e: stloc.s V_9 - IL_e780: ldloc.s V_8 - IL_e782: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e787: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e78c: stloc.s V_7 - IL_e78e: ldloc.s V_8 - IL_e790: ldloc.s V_7 - IL_e792: bne.un.s IL_e7dc - - IL_e794: ldloc.s V_8 - IL_e796: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e79b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e7a0: stloc.s V_10 - IL_e7a2: ldloc.s V_10 - IL_e7a4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e7a9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e7ae: stloc.s V_6 - IL_e7b0: ldloc.s V_8 - IL_e7b2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e7b7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e7bc: stloc.s V_6 - IL_e7be: ldloc.s V_10 - IL_e7c0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e7c5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e7ca: stloc.s V_10 - IL_e7cc: ldloc.s V_7 - IL_e7ce: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e7d3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e7d8: stloc.s V_6 - IL_e7da: br.s IL_e822 - - IL_e7dc: ldloc.s V_6 - IL_e7de: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e7e3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e7e8: stloc.s V_7 - IL_e7ea: ldloc.s V_10 - IL_e7ec: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e7f1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e7f6: stloc.s V_6 - IL_e7f8: ldloc.s V_9 - IL_e7fa: call string [mscorlib]System.Convert::ToString(int32) - IL_e7ff: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e804: stloc.s V_9 - IL_e806: ldloc.s V_8 - IL_e808: call string [mscorlib]System.Convert::ToString(int32) - IL_e80d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e812: stloc.s V_8 - IL_e814: ldloc.s V_6 - IL_e816: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e81b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e820: stloc.s V_6 - IL_e822: ldloc.s V_10 - IL_e824: ldloc.s V_10 - IL_e826: bgt.s IL_e870 - - IL_e828: ldloc.s V_10 - IL_e82a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e82f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e834: stloc.s V_6 - IL_e836: ldloc.s V_10 - IL_e838: call string [mscorlib]System.Convert::ToString(int32) - IL_e83d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e842: stloc.s V_9 - IL_e844: ldloc.s V_10 - IL_e846: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e84b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e850: stloc.s V_7 - IL_e852: ldloc.s V_8 - IL_e854: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e859: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e85e: stloc.s V_7 - IL_e860: ldloc.s V_10 - IL_e862: call string [mscorlib]System.Convert::ToString(int32) - IL_e867: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e86c: stloc.s V_7 - IL_e86e: br.s IL_e8b6 - - IL_e870: ldloc.s V_9 - IL_e872: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e877: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e87c: stloc.s V_8 - IL_e87e: ldloc.s V_8 - IL_e880: call string [mscorlib]System.Convert::ToString(int32) - IL_e885: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e88a: stloc.s V_8 - IL_e88c: ldloc.s V_8 - IL_e88e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e893: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e898: stloc.s V_7 - IL_e89a: ldloc.s V_8 - IL_e89c: call string [mscorlib]System.Convert::ToString(int32) - IL_e8a1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e8a6: stloc.s V_10 - IL_e8a8: ldloc.s V_9 - IL_e8aa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e8af: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e8b4: stloc.s V_7 - IL_e8b6: ldloc.s V_7 - IL_e8b8: ldloc.s V_6 - IL_e8ba: blt.s IL_e904 - - IL_e8bc: ldloc.s V_6 - IL_e8be: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e8c3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e8c8: stloc.s V_6 - IL_e8ca: ldloc.s V_10 - IL_e8cc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e8d1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e8d6: stloc.s V_7 - IL_e8d8: ldloc.s V_10 - IL_e8da: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e8df: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e8e4: stloc.s V_6 - IL_e8e6: ldloc.s V_7 - IL_e8e8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e8ed: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e8f2: stloc.s V_6 - IL_e8f4: ldloc.s V_10 - IL_e8f6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e8fb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e900: stloc.s V_6 - IL_e902: br.s IL_e94a - - IL_e904: ldloc.s V_7 - IL_e906: call string [mscorlib]System.Convert::ToString(int32) - IL_e90b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e910: stloc.s V_9 - IL_e912: ldloc.s V_7 - IL_e914: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e919: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e91e: stloc.s V_8 - IL_e920: ldloc.s V_6 - IL_e922: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e927: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e92c: stloc.s V_7 - IL_e92e: ldloc.s V_10 - IL_e930: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e935: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e93a: stloc.s V_8 - IL_e93c: ldloc.s V_6 - IL_e93e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e943: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e948: stloc.s V_7 - IL_e94a: ldloc.s V_6 - IL_e94c: ldloc.s V_6 - IL_e94e: bge.s IL_e998 - - IL_e950: ldloc.s V_8 - IL_e952: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e957: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e95c: stloc.s V_7 - IL_e95e: ldloc.s V_8 - IL_e960: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e965: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e96a: stloc.s V_10 - IL_e96c: ldloc.s V_9 - IL_e96e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e973: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e978: stloc.s V_10 - IL_e97a: ldloc.s V_6 - IL_e97c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e981: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e986: stloc.s V_9 - IL_e988: ldloc.s V_8 - IL_e98a: call string [mscorlib]System.Convert::ToString(int32) - IL_e98f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e994: stloc.s V_6 - IL_e996: br.s IL_e9de - - IL_e998: ldloc.s V_8 - IL_e99a: call string [mscorlib]System.Convert::ToString(int32) - IL_e99f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e9a4: stloc.s V_9 - IL_e9a6: ldloc.s V_6 - IL_e9a8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e9ad: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e9b2: stloc.s V_7 - IL_e9b4: ldloc.s V_7 - IL_e9b6: call string [mscorlib]System.Convert::ToString(int32) - IL_e9bb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e9c0: stloc.s V_9 - IL_e9c2: ldloc.s V_8 - IL_e9c4: call string [mscorlib]System.Convert::ToString(int32) - IL_e9c9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e9ce: stloc.s V_6 - IL_e9d0: ldloc.s V_10 - IL_e9d2: call string [mscorlib]System.Convert::ToString(int32) - IL_e9d7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e9dc: stloc.s V_10 - IL_e9de: ldstr "a is: " - IL_e9e3: ldloc.s V_6 - IL_e9e5: ldloc.0 - IL_e9e6: add - IL_e9e7: box [mscorlib]System.Int32 - IL_e9ec: call string [mscorlib]System.String::Concat(object, - object) - IL_e9f1: call void [System.Console]System.Console::WriteLine(string) - IL_e9f6: ldstr "b is: " - IL_e9fb: ldloc.s V_7 - IL_e9fd: ldloc.1 - IL_e9fe: add - IL_e9ff: box [mscorlib]System.Int32 - IL_ea04: call string [mscorlib]System.String::Concat(object, - object) - IL_ea09: call void [System.Console]System.Console::WriteLine(string) - IL_ea0e: ldstr "c is: " - IL_ea13: ldloc.s V_8 - IL_ea15: ldloc.2 - IL_ea16: add - IL_ea17: box [mscorlib]System.Int32 - IL_ea1c: call string [mscorlib]System.String::Concat(object, - object) - IL_ea21: call void [System.Console]System.Console::WriteLine(string) - IL_ea26: ldstr "d is: " - IL_ea2b: ldloc.s V_9 - IL_ea2d: ldloc V_3 - IL_ea2e: add - IL_ea2f: box [mscorlib]System.Int32 - IL_ea34: call string [mscorlib]System.String::Concat(object, - object) - IL_ea39: call void [System.Console]System.Console::WriteLine(string) - IL_ea3e: ldstr "e is: " - IL_ea43: ldloc.s V_10 - IL_ea45: ldloc.s V_4 - IL_ea47: add - IL_ea48: ldc.i4.1 - IL_ea49: add - IL_ea4a: box [mscorlib]System.Int32 - IL_ea4f: call string [mscorlib]System.String::Concat(object, - object) - IL_ea54: call void [System.Console]System.Console::WriteLine(string) - IL_ea59: ldc.i4.s 100 - IL_ea5b: stloc.s V_11 - - IL_ea5f: ldloc.s V_11 - IL_ea61: ret - } // end of method CodeSize1::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method CodeSize1::.ctor - -} diff --git a/src/coreclr/tests/src/JIT/opt/DumpDisasm/JitMinOpts/InstrCnt1.il b/src/coreclr/tests/src/JIT/opt/DumpDisasm/JitMinOpts/InstrCnt1.il deleted file mode 100644 index 651fe90c1d2b..000000000000 --- a/src/coreclr/tests/src/JIT/opt/DumpDisasm/JitMinOpts/InstrCnt1.il +++ /dev/null @@ -1,20041 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// DEFAULT_MIN_OPTS_INSTR_COUNT 20000 -// OPTIONS: opts.MinOpts() == true -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly InstrCnt1 {} -.class private auto ansi beforefieldinit InstrCnt1 - extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - .maxstack 4 - .locals init (class [mscorlib]System.Random V_0, - int32 V_1, - int32 V_2, - int32 V_3, - int32 V_4, - int32 V_5, - int32 V_6) - IL_0000: newobj instance void [mscorlib]System.Random::.ctor() - IL_0005: stloc.0 - IL_0006: ldloc.0 - IL_0007: ldc.i4.1 - IL_0008: ldc.i4.s 100 - IL_000a: callvirt instance int32 [mscorlib]System.Random::Next(int32,int32) - IL_000f: stloc.1 - IL_0010: ldloc.0 - IL_0011: ldc.i4.1 - IL_0012: ldc.i4.s 100 - IL_0014: callvirt instance int32 [mscorlib]System.Random::Next(int32,int32) - IL_0019: stloc.2 - IL_001a: ldloc.0 - IL_001b: ldc.i4.1 - IL_001c: ldc.i4.s 100 - IL_001e: callvirt instance int32 [mscorlib]System.Random::Next(int32,int32) - IL_0023: stloc.3 - IL_0024: ldloc.0 - IL_0025: ldc.i4.1 - IL_0026: ldc.i4.s 100 - IL_0028: callvirt instance int32 [mscorlib]System.Random::Next(int32,int32) - IL_002d: stloc.s V_4 - IL_002f: ldloc.0 - IL_0030: ldc.i4.1 - IL_0031: ldc.i4.s 100 - IL_0033: callvirt instance int32 [mscorlib]System.Random::Next(int32,int32) - IL_0038: stloc.s V_5 - IL_003a: ldloc.1 - IL_003b: ldloc.2 - IL_003c: bne.un.s IL_0078 - IL_003e: ldloc.1 - IL_003f: ldloc.2 - IL_0040: ldloc.3 - IL_0041: sub - IL_0042: add - IL_0043: stloc.1 - IL_0044: ldloc.s V_4 - IL_0046: ldc.i4.1 - IL_0047: add - IL_0048: stloc.s V_4 - IL_004a: ldloc.s V_5 - IL_004c: ldc.i4.1 - IL_004d: sub - IL_004e: stloc.s V_5 - IL_0050: ldloc.s V_5 - IL_0052: ldloc.s V_4 - IL_0054: ldloc.3 - IL_0055: ldc.i4.1 - IL_0056: sub - IL_0057: sub - IL_0058: mul - IL_0059: stloc.s V_5 - IL_005b: ldloc.2 - IL_005c: ldc.i4.1 - IL_005d: sub - IL_005e: stloc.2 - IL_005f: ldloc.1 - IL_0060: ldloc.s V_5 - IL_0062: sub - IL_0063: stloc.1 - IL_0064: ldloc.s V_4 - IL_0066: ldloc.3 - IL_0067: ldc.i4.2 - IL_0068: add - IL_0069: ldloc.2 - IL_006a: sub - IL_006b: mul - IL_006c: stloc.s V_4 - IL_006e: ldloc.1 - IL_006f: ldc.i4.1 - IL_0070: add - IL_0071: stloc.1 - IL_0072: ldloc.1 - IL_0073: ldc.i4.1 - IL_0074: sub - IL_0075: stloc.1 - IL_0076: br.s IL_00af - IL_0078: ldloc.2 - IL_0079: ldloc.3 - IL_007a: ldloc.s V_4 - IL_007c: mul - IL_007d: mul - IL_007e: stloc.2 - IL_007f: ldloc.s V_5 - IL_0081: ldc.i4.1 - IL_0082: add - IL_0083: stloc.s V_5 - IL_0085: ldloc.3 - IL_0086: ldc.i4.m1 - IL_0087: add - IL_0088: stloc.3 - IL_0089: ldloc.s V_4 - IL_008b: ldloc.s V_5 - IL_008d: ldloc.1 - IL_008e: ldc.i4.1 - IL_008f: add - IL_0090: mul - IL_0091: sub - IL_0092: stloc.s V_4 - IL_0094: ldloc.2 - IL_0095: ldc.i4.1 - IL_0096: add - IL_0097: stloc.2 - IL_0098: ldloc.1 - IL_0099: ldc.i4.2 - IL_009a: sub - IL_009b: stloc.1 - IL_009c: ldloc.2 - IL_009d: ldloc.3 - IL_009e: ldc.i4.1 - IL_009f: sub - IL_00a0: ldloc.s V_4 - IL_00a2: add - IL_00a3: mul - IL_00a4: stloc.2 - IL_00a5: ldloc.s V_5 - IL_00a7: ldc.i4.1 - IL_00a8: add - IL_00a9: stloc.s V_5 - IL_00ab: ldloc.2 - IL_00ac: ldc.i4.1 - IL_00ad: add - IL_00ae: stloc.2 - IL_00af: ldloc.1 - IL_00b0: ldloc.2 - IL_00b1: beq.s IL_00ed - IL_00b3: ldloc.1 - IL_00b4: ldloc.2 - IL_00b5: ldloc.3 - IL_00b6: mul - IL_00b7: sub - IL_00b8: stloc.1 - IL_00b9: ldloc.s V_4 - IL_00bb: ldc.i4.1 - IL_00bc: add - IL_00bd: stloc.s V_4 - IL_00bf: ldloc.s V_5 - IL_00c1: ldc.i4.1 - IL_00c2: sub - IL_00c3: stloc.s V_5 - IL_00c5: ldloc.s V_5 - IL_00c7: ldloc.s V_4 - IL_00c9: ldloc.3 - IL_00ca: ldc.i4.1 - IL_00cb: sub - IL_00cc: mul - IL_00cd: add - IL_00ce: stloc.s V_5 - IL_00d0: ldloc.2 - IL_00d1: ldc.i4.1 - IL_00d2: sub - IL_00d3: stloc.2 - IL_00d4: ldloc.1 - IL_00d5: ldloc.s V_5 - IL_00d7: sub - IL_00d8: stloc.1 - IL_00d9: ldloc.s V_4 - IL_00db: ldloc.3 - IL_00dc: ldc.i4.2 - IL_00dd: add - IL_00de: ldloc.2 - IL_00df: mul - IL_00e0: mul - IL_00e1: stloc.s V_4 - IL_00e3: ldloc.1 - IL_00e4: ldc.i4.1 - IL_00e5: add - IL_00e6: stloc.1 - IL_00e7: ldloc.1 - IL_00e8: ldc.i4.1 - IL_00e9: sub - IL_00ea: stloc.1 - IL_00eb: br.s IL_0124 - IL_00ed: ldloc.2 - IL_00ee: ldloc.3 - IL_00ef: ldloc.s V_4 - IL_00f1: mul - IL_00f2: add - IL_00f3: stloc.2 - IL_00f4: ldloc.s V_5 - IL_00f6: ldc.i4.1 - IL_00f7: add - IL_00f8: stloc.s V_5 - IL_00fa: ldloc.3 - IL_00fb: ldc.i4.m1 - IL_00fc: add - IL_00fd: stloc.3 - IL_00fe: ldloc.s V_4 - IL_0100: ldloc.s V_5 - IL_0102: ldloc.1 - IL_0103: ldc.i4.1 - IL_0104: add - IL_0105: mul - IL_0106: mul - IL_0107: stloc.s V_4 - IL_0109: ldloc.2 - IL_010a: ldc.i4.1 - IL_010b: add - IL_010c: stloc.2 - IL_010d: ldloc.1 - IL_010e: ldc.i4.2 - IL_010f: sub - IL_0110: stloc.1 - IL_0111: ldloc.2 - IL_0112: ldloc.3 - IL_0113: ldc.i4.1 - IL_0114: sub - IL_0115: ldloc.s V_4 - IL_0117: add - IL_0118: add - IL_0119: stloc.2 - IL_011a: ldloc.s V_5 - IL_011c: ldc.i4.1 - IL_011d: add - IL_011e: stloc.s V_5 - IL_0120: ldloc.2 - IL_0121: ldc.i4.1 - IL_0122: add - IL_0123: stloc.2 - IL_0124: ldloc.1 - IL_0125: ldloc.2 - IL_0126: beq.s IL_0162 - IL_0128: ldloc.1 - IL_0129: ldloc.2 - IL_012a: ldloc.3 - IL_012b: sub - IL_012c: add - IL_012d: stloc.1 - IL_012e: ldloc.s V_4 - IL_0130: ldc.i4.1 - IL_0131: add - IL_0132: stloc.s V_4 - IL_0134: ldloc.s V_5 - IL_0136: ldc.i4.1 - IL_0137: sub - IL_0138: stloc.s V_5 - IL_013a: ldloc.s V_5 - IL_013c: ldloc.s V_4 - IL_013e: ldloc.3 - IL_013f: ldc.i4.1 - IL_0140: sub - IL_0141: add - IL_0142: sub - IL_0143: stloc.s V_5 - IL_0145: ldloc.2 - IL_0146: ldc.i4.1 - IL_0147: sub - IL_0148: stloc.2 - IL_0149: ldloc.1 - IL_014a: ldloc.s V_5 - IL_014c: sub - IL_014d: stloc.1 - IL_014e: ldloc.s V_4 - IL_0150: ldloc.3 - IL_0151: ldc.i4.2 - IL_0152: add - IL_0153: ldloc.2 - IL_0154: add - IL_0155: mul - IL_0156: stloc.s V_4 - IL_0158: ldloc.1 - IL_0159: ldc.i4.1 - IL_015a: add - IL_015b: stloc.1 - IL_015c: ldloc.1 - IL_015d: ldc.i4.1 - IL_015e: sub - IL_015f: stloc.1 - IL_0160: br.s IL_0199 - IL_0162: ldloc.2 - IL_0163: ldloc.3 - IL_0164: ldloc.s V_4 - IL_0166: mul - IL_0167: sub - IL_0168: stloc.2 - IL_0169: ldloc.s V_5 - IL_016b: ldc.i4.1 - IL_016c: add - IL_016d: stloc.s V_5 - IL_016f: ldloc.3 - IL_0170: ldc.i4.m1 - IL_0171: add - IL_0172: stloc.3 - IL_0173: ldloc.s V_4 - IL_0175: ldloc.s V_5 - IL_0177: ldloc.1 - IL_0178: ldc.i4.1 - IL_0179: add - IL_017a: add - IL_017b: add - IL_017c: stloc.s V_4 - IL_017e: ldloc.2 - IL_017f: ldc.i4.1 - IL_0180: add - IL_0181: stloc.2 - IL_0182: ldloc.1 - IL_0183: ldc.i4.2 - IL_0184: sub - IL_0185: stloc.1 - IL_0186: ldloc.2 - IL_0187: ldloc.3 - IL_0188: ldc.i4.1 - IL_0189: sub - IL_018a: ldloc.s V_4 - IL_018c: mul - IL_018d: sub - IL_018e: stloc.2 - IL_018f: ldloc.s V_5 - IL_0191: ldc.i4.1 - IL_0192: add - IL_0193: stloc.s V_5 - IL_0195: ldloc.2 - IL_0196: ldc.i4.1 - IL_0197: add - IL_0198: stloc.2 - IL_0199: ldloc.1 - IL_019a: ldloc.2 - IL_019b: bge.s IL_01d7 - IL_019d: ldloc.1 - IL_019e: ldloc.2 - IL_019f: ldloc.3 - IL_01a0: mul - IL_01a1: sub - IL_01a2: stloc.1 - IL_01a3: ldloc.s V_4 - IL_01a5: ldc.i4.1 - IL_01a6: add - IL_01a7: stloc.s V_4 - IL_01a9: ldloc.s V_5 - IL_01ab: ldc.i4.1 - IL_01ac: sub - IL_01ad: stloc.s V_5 - IL_01af: ldloc.s V_5 - IL_01b1: ldloc.s V_4 - IL_01b3: ldloc.3 - IL_01b4: ldc.i4.1 - IL_01b5: sub - IL_01b6: add - IL_01b7: sub - IL_01b8: stloc.s V_5 - IL_01ba: ldloc.2 - IL_01bb: ldc.i4.1 - IL_01bc: sub - IL_01bd: stloc.2 - IL_01be: ldloc.1 - IL_01bf: ldloc.s V_5 - IL_01c1: sub - IL_01c2: stloc.1 - IL_01c3: ldloc.s V_4 - IL_01c5: ldloc.3 - IL_01c6: ldc.i4.2 - IL_01c7: add - IL_01c8: ldloc.2 - IL_01c9: add - IL_01ca: add - IL_01cb: stloc.s V_4 - IL_01cd: ldloc.1 - IL_01ce: ldc.i4.1 - IL_01cf: add - IL_01d0: stloc.1 - IL_01d1: ldloc.1 - IL_01d2: ldc.i4.1 - IL_01d3: sub - IL_01d4: stloc.1 - IL_01d5: br.s IL_020e - IL_01d7: ldloc.2 - IL_01d8: ldloc.3 - IL_01d9: ldloc.s V_4 - IL_01db: add - IL_01dc: sub - IL_01dd: stloc.2 - IL_01de: ldloc.s V_5 - IL_01e0: ldc.i4.1 - IL_01e1: add - IL_01e2: stloc.s V_5 - IL_01e4: ldloc.3 - IL_01e5: ldc.i4.m1 - IL_01e6: add - IL_01e7: stloc.3 - IL_01e8: ldloc.s V_4 - IL_01ea: ldloc.s V_5 - IL_01ec: ldloc.1 - IL_01ed: ldc.i4.1 - IL_01ee: add - IL_01ef: mul - IL_01f0: add - IL_01f1: stloc.s V_4 - IL_01f3: ldloc.2 - IL_01f4: ldc.i4.1 - IL_01f5: add - IL_01f6: stloc.2 - IL_01f7: ldloc.1 - IL_01f8: ldc.i4.2 - IL_01f9: sub - IL_01fa: stloc.1 - IL_01fb: ldloc.2 - IL_01fc: ldloc.3 - IL_01fd: ldc.i4.1 - IL_01fe: sub - IL_01ff: ldloc.s V_4 - IL_0201: mul - IL_0202: sub - IL_0203: stloc.2 - IL_0204: ldloc.s V_5 - IL_0206: ldc.i4.1 - IL_0207: add - IL_0208: stloc.s V_5 - IL_020a: ldloc.2 - IL_020b: ldc.i4.1 - IL_020c: add - IL_020d: stloc.2 - IL_020e: ldloc.1 - IL_020f: ldloc.2 - IL_0210: ble.s IL_024c - IL_0212: ldloc.1 - IL_0213: ldloc.2 - IL_0214: ldloc.3 - IL_0215: add - IL_0216: sub - IL_0217: stloc.1 - IL_0218: ldloc.s V_4 - IL_021a: ldc.i4.1 - IL_021b: add - IL_021c: stloc.s V_4 - IL_021e: ldloc.s V_5 - IL_0220: ldc.i4.1 - IL_0221: sub - IL_0222: stloc.s V_5 - IL_0224: ldloc.s V_5 - IL_0226: ldloc.s V_4 - IL_0228: ldloc.3 - IL_0229: ldc.i4.1 - IL_022a: sub - IL_022b: add - IL_022c: sub - IL_022d: stloc.s V_5 - IL_022f: ldloc.2 - IL_0230: ldc.i4.1 - IL_0231: sub - IL_0232: stloc.2 - IL_0233: ldloc.1 - IL_0234: ldloc.s V_5 - IL_0236: sub - IL_0237: stloc.1 - IL_0238: ldloc.s V_4 - IL_023a: ldloc.3 - IL_023b: ldc.i4.2 - IL_023c: add - IL_023d: ldloc.2 - IL_023e: add - IL_023f: sub - IL_0240: stloc.s V_4 - IL_0242: ldloc.1 - IL_0243: ldc.i4.1 - IL_0244: add - IL_0245: stloc.1 - IL_0246: ldloc.1 - IL_0247: ldc.i4.1 - IL_0248: sub - IL_0249: stloc.1 - IL_024a: br.s IL_0283 - IL_024c: ldloc.2 - IL_024d: ldloc.3 - IL_024e: ldloc.s V_4 - IL_0250: sub - IL_0251: sub - IL_0252: stloc.2 - IL_0253: ldloc.s V_5 - IL_0255: ldc.i4.1 - IL_0256: add - IL_0257: stloc.s V_5 - IL_0259: ldloc.3 - IL_025a: ldc.i4.m1 - IL_025b: add - IL_025c: stloc.3 - IL_025d: ldloc.s V_4 - IL_025f: ldloc.s V_5 - IL_0261: ldloc.1 - IL_0262: ldc.i4.1 - IL_0263: add - IL_0264: sub - IL_0265: add - IL_0266: stloc.s V_4 - IL_0268: ldloc.2 - IL_0269: ldc.i4.1 - IL_026a: add - IL_026b: stloc.2 - IL_026c: ldloc.1 - IL_026d: ldc.i4.2 - IL_026e: sub - IL_026f: stloc.1 - IL_0270: ldloc.2 - IL_0271: ldloc.3 - IL_0272: ldc.i4.1 - IL_0273: sub - IL_0274: ldloc.s V_4 - IL_0276: add - IL_0277: sub - IL_0278: stloc.2 - IL_0279: ldloc.s V_5 - IL_027b: ldc.i4.1 - IL_027c: add - IL_027d: stloc.s V_5 - IL_027f: ldloc.2 - IL_0280: ldc.i4.1 - IL_0281: add - IL_0282: stloc.2 - IL_0283: ldloc.3 - IL_0284: ldloc.2 - IL_0285: bge.s IL_02c1 - IL_0287: ldloc.1 - IL_0288: ldloc.2 - IL_0289: ldloc.3 - IL_028a: sub - IL_028b: sub - IL_028c: stloc.1 - IL_028d: ldloc.s V_4 - IL_028f: ldc.i4.1 - IL_0290: add - IL_0291: stloc.s V_4 - IL_0293: ldloc.s V_5 - IL_0295: ldc.i4.1 - IL_0296: sub - IL_0297: stloc.s V_5 - IL_0299: ldloc.s V_5 - IL_029b: ldloc.s V_4 - IL_029d: ldloc.3 - IL_029e: ldc.i4.1 - IL_029f: sub - IL_02a0: sub - IL_02a1: mul - IL_02a2: stloc.s V_5 - IL_02a4: ldloc.2 - IL_02a5: ldc.i4.1 - IL_02a6: sub - IL_02a7: stloc.2 - IL_02a8: ldloc.1 - IL_02a9: ldloc.s V_5 - IL_02ab: sub - IL_02ac: stloc.1 - IL_02ad: ldloc.s V_4 - IL_02af: ldloc.3 - IL_02b0: ldc.i4.2 - IL_02b1: add - IL_02b2: ldloc.2 - IL_02b3: sub - IL_02b4: sub - IL_02b5: stloc.s V_4 - IL_02b7: ldloc.1 - IL_02b8: ldc.i4.1 - IL_02b9: add - IL_02ba: stloc.1 - IL_02bb: ldloc.1 - IL_02bc: ldc.i4.1 - IL_02bd: sub - IL_02be: stloc.1 - IL_02bf: br.s IL_02f8 - IL_02c1: ldloc.2 - IL_02c2: ldloc.3 - IL_02c3: ldloc.s V_4 - IL_02c5: sub - IL_02c6: mul - IL_02c7: stloc.2 - IL_02c8: ldloc.s V_5 - IL_02ca: ldc.i4.1 - IL_02cb: add - IL_02cc: stloc.s V_5 - IL_02ce: ldloc.3 - IL_02cf: ldc.i4.m1 - IL_02d0: add - IL_02d1: stloc.3 - IL_02d2: ldloc.s V_4 - IL_02d4: ldloc.s V_5 - IL_02d6: ldloc.1 - IL_02d7: ldc.i4.1 - IL_02d8: add - IL_02d9: mul - IL_02da: sub - IL_02db: stloc.s V_4 - IL_02dd: ldloc.2 - IL_02de: ldc.i4.1 - IL_02df: add - IL_02e0: stloc.2 - IL_02e1: ldloc.1 - IL_02e2: ldc.i4.2 - IL_02e3: sub - IL_02e4: stloc.1 - IL_02e5: ldloc.2 - IL_02e6: ldloc.3 - IL_02e7: ldc.i4.1 - IL_02e8: sub - IL_02e9: ldloc.s V_4 - IL_02eb: sub - IL_02ec: mul - IL_02ed: stloc.2 - IL_02ee: ldloc.s V_5 - IL_02f0: ldc.i4.1 - IL_02f1: add - IL_02f2: stloc.s V_5 - IL_02f4: ldloc.2 - IL_02f5: ldc.i4.1 - IL_02f6: add - IL_02f7: stloc.2 - IL_02f8: ldloc.1 - IL_02f9: ldloc.2 - IL_02fa: bne.un.s IL_0336 - IL_02fc: ldloc.1 - IL_02fd: ldloc.2 - IL_02fe: ldloc.3 - IL_02ff: sub - IL_0300: mul - IL_0301: stloc.1 - IL_0302: ldloc.s V_4 - IL_0304: ldc.i4.1 - IL_0305: add - IL_0306: stloc.s V_4 - IL_0308: ldloc.s V_5 - IL_030a: ldc.i4.1 - IL_030b: sub - IL_030c: stloc.s V_5 - IL_030e: ldloc.s V_5 - IL_0310: ldloc.s V_4 - IL_0312: ldloc.3 - IL_0313: ldc.i4.1 - IL_0314: sub - IL_0315: add - IL_0316: sub - IL_0317: stloc.s V_5 - IL_0319: ldloc.2 - IL_031a: ldc.i4.1 - IL_031b: sub - IL_031c: stloc.2 - IL_031d: ldloc.1 - IL_031e: ldloc.s V_5 - IL_0320: sub - IL_0321: stloc.1 - IL_0322: ldloc.s V_4 - IL_0324: ldloc.3 - IL_0325: ldc.i4.2 - IL_0326: add - IL_0327: ldloc.2 - IL_0328: add - IL_0329: sub - IL_032a: stloc.s V_4 - IL_032c: ldloc.1 - IL_032d: ldc.i4.1 - IL_032e: add - IL_032f: stloc.1 - IL_0330: ldloc.1 - IL_0331: ldc.i4.1 - IL_0332: sub - IL_0333: stloc.1 - IL_0334: br.s IL_036d - IL_0336: ldloc.2 - IL_0337: ldloc.3 - IL_0338: ldloc.s V_4 - IL_033a: sub - IL_033b: sub - IL_033c: stloc.2 - IL_033d: ldloc.s V_5 - IL_033f: ldc.i4.1 - IL_0340: add - IL_0341: stloc.s V_5 - IL_0343: ldloc.3 - IL_0344: ldc.i4.m1 - IL_0345: add - IL_0346: stloc.3 - IL_0347: ldloc.s V_4 - IL_0349: ldloc.s V_5 - IL_034b: ldloc.1 - IL_034c: ldc.i4.1 - IL_034d: add - IL_034e: mul - IL_034f: add - IL_0350: stloc.s V_4 - IL_0352: ldloc.2 - IL_0353: ldc.i4.1 - IL_0354: add - IL_0355: stloc.2 - IL_0356: ldloc.1 - IL_0357: ldc.i4.2 - IL_0358: sub - IL_0359: stloc.1 - IL_035a: ldloc.2 - IL_035b: ldloc.3 - IL_035c: ldc.i4.1 - IL_035d: sub - IL_035e: ldloc.s V_4 - IL_0360: add - IL_0361: sub - IL_0362: stloc.2 - IL_0363: ldloc.s V_5 - IL_0365: ldc.i4.1 - IL_0366: add - IL_0367: stloc.s V_5 - IL_0369: ldloc.2 - IL_036a: ldc.i4.1 - IL_036b: add - IL_036c: stloc.2 - IL_036d: ldloc.1 - IL_036e: ldloc.2 - IL_036f: beq.s IL_03ab - IL_0371: ldloc.1 - IL_0372: ldloc.2 - IL_0373: ldloc.3 - IL_0374: add - IL_0375: add - IL_0376: stloc.1 - IL_0377: ldloc.s V_4 - IL_0379: ldc.i4.1 - IL_037a: add - IL_037b: stloc.s V_4 - IL_037d: ldloc.s V_5 - IL_037f: ldc.i4.1 - IL_0380: sub - IL_0381: stloc.s V_5 - IL_0383: ldloc.s V_5 - IL_0385: ldloc.s V_4 - IL_0387: ldloc.3 - IL_0388: ldc.i4.1 - IL_0389: sub - IL_038a: add - IL_038b: add - IL_038c: stloc.s V_5 - IL_038e: ldloc.2 - IL_038f: ldc.i4.1 - IL_0390: sub - IL_0391: stloc.2 - IL_0392: ldloc.1 - IL_0393: ldloc.s V_5 - IL_0395: sub - IL_0396: stloc.1 - IL_0397: ldloc.s V_4 - IL_0399: ldloc.3 - IL_039a: ldc.i4.2 - IL_039b: add - IL_039c: ldloc.2 - IL_039d: add - IL_039e: mul - IL_039f: stloc.s V_4 - IL_03a1: ldloc.1 - IL_03a2: ldc.i4.1 - IL_03a3: add - IL_03a4: stloc.1 - IL_03a5: ldloc.1 - IL_03a6: ldc.i4.1 - IL_03a7: sub - IL_03a8: stloc.1 - IL_03a9: br.s IL_03e2 - IL_03ab: ldloc.2 - IL_03ac: ldloc.3 - IL_03ad: ldloc.s V_4 - IL_03af: mul - IL_03b0: add - IL_03b1: stloc.2 - IL_03b2: ldloc.s V_5 - IL_03b4: ldc.i4.1 - IL_03b5: add - IL_03b6: stloc.s V_5 - IL_03b8: ldloc.3 - IL_03b9: ldc.i4.m1 - IL_03ba: add - IL_03bb: stloc.3 - IL_03bc: ldloc.s V_4 - IL_03be: ldloc.s V_5 - IL_03c0: ldloc.1 - IL_03c1: ldc.i4.1 - IL_03c2: add - IL_03c3: add - IL_03c4: add - IL_03c5: stloc.s V_4 - IL_03c7: ldloc.2 - IL_03c8: ldc.i4.1 - IL_03c9: add - IL_03ca: stloc.2 - IL_03cb: ldloc.1 - IL_03cc: ldc.i4.2 - IL_03cd: sub - IL_03ce: stloc.1 - IL_03cf: ldloc.2 - IL_03d0: ldloc.3 - IL_03d1: ldc.i4.1 - IL_03d2: sub - IL_03d3: ldloc.s V_4 - IL_03d5: mul - IL_03d6: add - IL_03d7: stloc.2 - IL_03d8: ldloc.s V_5 - IL_03da: ldc.i4.1 - IL_03db: add - IL_03dc: stloc.s V_5 - IL_03de: ldloc.2 - IL_03df: ldc.i4.1 - IL_03e0: add - IL_03e1: stloc.2 - IL_03e2: ldloc.1 - IL_03e3: ldloc.2 - IL_03e4: bgt.s IL_0420 - IL_03e6: ldloc.1 - IL_03e7: ldloc.2 - IL_03e8: ldloc.3 - IL_03e9: add - IL_03ea: add - IL_03eb: stloc.1 - IL_03ec: ldloc.s V_4 - IL_03ee: ldc.i4.1 - IL_03ef: add - IL_03f0: stloc.s V_4 - IL_03f2: ldloc.s V_5 - IL_03f4: ldc.i4.1 - IL_03f5: sub - IL_03f6: stloc.s V_5 - IL_03f8: ldloc.s V_5 - IL_03fa: ldloc.s V_4 - IL_03fc: ldloc.3 - IL_03fd: ldc.i4.1 - IL_03fe: sub - IL_03ff: add - IL_0400: mul - IL_0401: stloc.s V_5 - IL_0403: ldloc.2 - IL_0404: ldc.i4.1 - IL_0405: sub - IL_0406: stloc.2 - IL_0407: ldloc.1 - IL_0408: ldloc.s V_5 - IL_040a: sub - IL_040b: stloc.1 - IL_040c: ldloc.s V_4 - IL_040e: ldloc.3 - IL_040f: ldc.i4.2 - IL_0410: add - IL_0411: ldloc.2 - IL_0412: add - IL_0413: mul - IL_0414: stloc.s V_4 - IL_0416: ldloc.1 - IL_0417: ldc.i4.1 - IL_0418: add - IL_0419: stloc.1 - IL_041a: ldloc.1 - IL_041b: ldc.i4.1 - IL_041c: sub - IL_041d: stloc.1 - IL_041e: br.s IL_0457 - IL_0420: ldloc.2 - IL_0421: ldloc.3 - IL_0422: ldloc.s V_4 - IL_0424: mul - IL_0425: mul - IL_0426: stloc.2 - IL_0427: ldloc.s V_5 - IL_0429: ldc.i4.1 - IL_042a: add - IL_042b: stloc.s V_5 - IL_042d: ldloc.3 - IL_042e: ldc.i4.m1 - IL_042f: add - IL_0430: stloc.3 - IL_0431: ldloc.s V_4 - IL_0433: ldloc.s V_5 - IL_0435: ldloc.1 - IL_0436: ldc.i4.1 - IL_0437: add - IL_0438: add - IL_0439: add - IL_043a: stloc.s V_4 - IL_043c: ldloc.2 - IL_043d: ldc.i4.1 - IL_043e: add - IL_043f: stloc.2 - IL_0440: ldloc.1 - IL_0441: ldc.i4.2 - IL_0442: sub - IL_0443: stloc.1 - IL_0444: ldloc.2 - IL_0445: ldloc.3 - IL_0446: ldc.i4.1 - IL_0447: sub - IL_0448: ldloc.s V_4 - IL_044a: sub - IL_044b: mul - IL_044c: stloc.2 - IL_044d: ldloc.s V_5 - IL_044f: ldc.i4.1 - IL_0450: add - IL_0451: stloc.s V_5 - IL_0453: ldloc.2 - IL_0454: ldc.i4.1 - IL_0455: add - IL_0456: stloc.2 - IL_0457: ldloc.1 - IL_0458: ldloc.2 - IL_0459: bgt.s IL_0495 - IL_045b: ldloc.1 - IL_045c: ldloc.2 - IL_045d: ldloc.3 - IL_045e: mul - IL_045f: add - IL_0460: stloc.1 - IL_0461: ldloc.s V_4 - IL_0463: ldc.i4.1 - IL_0464: add - IL_0465: stloc.s V_4 - IL_0467: ldloc.s V_5 - IL_0469: ldc.i4.1 - IL_046a: sub - IL_046b: stloc.s V_5 - IL_046d: ldloc.s V_5 - IL_046f: ldloc.s V_4 - IL_0471: ldloc.3 - IL_0472: ldc.i4.1 - IL_0473: sub - IL_0474: add - IL_0475: add - IL_0476: stloc.s V_5 - IL_0478: ldloc.2 - IL_0479: ldc.i4.1 - IL_047a: sub - IL_047b: stloc.2 - IL_047c: ldloc.1 - IL_047d: ldloc.s V_5 - IL_047f: sub - IL_0480: stloc.1 - IL_0481: ldloc.s V_4 - IL_0483: ldloc.3 - IL_0484: ldc.i4.2 - IL_0485: add - IL_0486: ldloc.2 - IL_0487: add - IL_0488: mul - IL_0489: stloc.s V_4 - IL_048b: ldloc.1 - IL_048c: ldc.i4.1 - IL_048d: add - IL_048e: stloc.1 - IL_048f: ldloc.1 - IL_0490: ldc.i4.1 - IL_0491: sub - IL_0492: stloc.1 - IL_0493: br.s IL_04cc - IL_0495: ldloc.2 - IL_0496: ldloc.3 - IL_0497: ldloc.s V_4 - IL_0499: mul - IL_049a: add - IL_049b: stloc.2 - IL_049c: ldloc.s V_5 - IL_049e: ldc.i4.1 - IL_049f: add - IL_04a0: stloc.s V_5 - IL_04a2: ldloc.3 - IL_04a3: ldc.i4.m1 - IL_04a4: add - IL_04a5: stloc.3 - IL_04a6: ldloc.s V_4 - IL_04a8: ldloc.s V_5 - IL_04aa: ldloc.1 - IL_04ab: ldc.i4.1 - IL_04ac: add - IL_04ad: add - IL_04ae: add - IL_04af: stloc.s V_4 - IL_04b1: ldloc.2 - IL_04b2: ldc.i4.1 - IL_04b3: add - IL_04b4: stloc.2 - IL_04b5: ldloc.1 - IL_04b6: ldc.i4.2 - IL_04b7: sub - IL_04b8: stloc.1 - IL_04b9: ldloc.2 - IL_04ba: ldloc.3 - IL_04bb: ldc.i4.1 - IL_04bc: sub - IL_04bd: ldloc.s V_4 - IL_04bf: mul - IL_04c0: add - IL_04c1: stloc.2 - IL_04c2: ldloc.s V_5 - IL_04c4: ldc.i4.1 - IL_04c5: add - IL_04c6: stloc.s V_5 - IL_04c8: ldloc.2 - IL_04c9: ldc.i4.1 - IL_04ca: add - IL_04cb: stloc.2 - IL_04cc: ldloc.1 - IL_04cd: ldloc.2 - IL_04ce: blt.s IL_050a - IL_04d0: ldloc.1 - IL_04d1: ldloc.2 - IL_04d2: ldloc.3 - IL_04d3: sub - IL_04d4: mul - IL_04d5: stloc.1 - IL_04d6: ldloc.s V_4 - IL_04d8: ldc.i4.1 - IL_04d9: add - IL_04da: stloc.s V_4 - IL_04dc: ldloc.s V_5 - IL_04de: ldc.i4.1 - IL_04df: sub - IL_04e0: stloc.s V_5 - IL_04e2: ldloc.s V_5 - IL_04e4: ldloc.s V_4 - IL_04e6: ldloc.3 - IL_04e7: ldc.i4.1 - IL_04e8: sub - IL_04e9: sub - IL_04ea: add - IL_04eb: stloc.s V_5 - IL_04ed: ldloc.2 - IL_04ee: ldc.i4.1 - IL_04ef: sub - IL_04f0: stloc.2 - IL_04f1: ldloc.1 - IL_04f2: ldloc.s V_5 - IL_04f4: sub - IL_04f5: stloc.1 - IL_04f6: ldloc.s V_4 - IL_04f8: ldloc.3 - IL_04f9: ldc.i4.2 - IL_04fa: add - IL_04fb: ldloc.2 - IL_04fc: sub - IL_04fd: add - IL_04fe: stloc.s V_4 - IL_0500: ldloc.1 - IL_0501: ldc.i4.1 - IL_0502: add - IL_0503: stloc.1 - IL_0504: ldloc.1 - IL_0505: ldc.i4.1 - IL_0506: sub - IL_0507: stloc.1 - IL_0508: br.s IL_0541 - IL_050a: ldloc.2 - IL_050b: ldloc.3 - IL_050c: ldloc.s V_4 - IL_050e: add - IL_050f: add - IL_0510: stloc.2 - IL_0511: ldloc.s V_5 - IL_0513: ldc.i4.1 - IL_0514: add - IL_0515: stloc.s V_5 - IL_0517: ldloc.3 - IL_0518: ldc.i4.m1 - IL_0519: add - IL_051a: stloc.3 - IL_051b: ldloc.s V_4 - IL_051d: ldloc.s V_5 - IL_051f: ldloc.1 - IL_0520: ldc.i4.1 - IL_0521: add - IL_0522: mul - IL_0523: sub - IL_0524: stloc.s V_4 - IL_0526: ldloc.2 - IL_0527: ldc.i4.1 - IL_0528: add - IL_0529: stloc.2 - IL_052a: ldloc.1 - IL_052b: ldc.i4.2 - IL_052c: sub - IL_052d: stloc.1 - IL_052e: ldloc.2 - IL_052f: ldloc.3 - IL_0530: ldc.i4.1 - IL_0531: sub - IL_0532: ldloc.s V_4 - IL_0534: sub - IL_0535: add - IL_0536: stloc.2 - IL_0537: ldloc.s V_5 - IL_0539: ldc.i4.1 - IL_053a: add - IL_053b: stloc.s V_5 - IL_053d: ldloc.2 - IL_053e: ldc.i4.1 - IL_053f: add - IL_0540: stloc.2 - IL_0541: ldloc.1 - IL_0542: ldloc.2 - IL_0543: bne.un.s IL_057f - IL_0545: ldloc.1 - IL_0546: ldloc.2 - IL_0547: ldloc.3 - IL_0548: add - IL_0549: sub - IL_054a: stloc.1 - IL_054b: ldloc.s V_4 - IL_054d: ldc.i4.1 - IL_054e: add - IL_054f: stloc.s V_4 - IL_0551: ldloc.s V_5 - IL_0553: ldc.i4.1 - IL_0554: sub - IL_0555: stloc.s V_5 - IL_0557: ldloc.s V_5 - IL_0559: ldloc.s V_4 - IL_055b: ldloc.3 - IL_055c: ldc.i4.1 - IL_055d: sub - IL_055e: sub - IL_055f: add - IL_0560: stloc.s V_5 - IL_0562: ldloc.2 - IL_0563: ldc.i4.1 - IL_0564: sub - IL_0565: stloc.2 - IL_0566: ldloc.1 - IL_0567: ldloc.s V_5 - IL_0569: sub - IL_056a: stloc.1 - IL_056b: ldloc.s V_4 - IL_056d: ldloc.3 - IL_056e: ldc.i4.2 - IL_056f: add - IL_0570: ldloc.2 - IL_0571: sub - IL_0572: sub - IL_0573: stloc.s V_4 - IL_0575: ldloc.1 - IL_0576: ldc.i4.1 - IL_0577: add - IL_0578: stloc.1 - IL_0579: ldloc.1 - IL_057a: ldc.i4.1 - IL_057b: sub - IL_057c: stloc.1 - IL_057d: br.s IL_05b6 - IL_057f: ldloc.2 - IL_0580: ldloc.3 - IL_0581: ldloc.s V_4 - IL_0583: sub - IL_0584: add - IL_0585: stloc.2 - IL_0586: ldloc.s V_5 - IL_0588: ldc.i4.1 - IL_0589: add - IL_058a: stloc.s V_5 - IL_058c: ldloc.3 - IL_058d: ldc.i4.m1 - IL_058e: add - IL_058f: stloc.3 - IL_0590: ldloc.s V_4 - IL_0592: ldloc.s V_5 - IL_0594: ldloc.1 - IL_0595: ldc.i4.1 - IL_0596: add - IL_0597: mul - IL_0598: sub - IL_0599: stloc.s V_4 - IL_059b: ldloc.2 - IL_059c: ldc.i4.1 - IL_059d: add - IL_059e: stloc.2 - IL_059f: ldloc.1 - IL_05a0: ldc.i4.2 - IL_05a1: sub - IL_05a2: stloc.1 - IL_05a3: ldloc.2 - IL_05a4: ldloc.3 - IL_05a5: ldc.i4.1 - IL_05a6: sub - IL_05a7: ldloc.s V_4 - IL_05a9: sub - IL_05aa: add - IL_05ab: stloc.2 - IL_05ac: ldloc.s V_5 - IL_05ae: ldc.i4.1 - IL_05af: add - IL_05b0: stloc.s V_5 - IL_05b2: ldloc.2 - IL_05b3: ldc.i4.1 - IL_05b4: add - IL_05b5: stloc.2 - IL_05b6: ldloc.1 - IL_05b7: ldloc.2 - IL_05b8: blt.s IL_05f4 - IL_05ba: ldloc.1 - IL_05bb: ldloc.2 - IL_05bc: ldloc.3 - IL_05bd: add - IL_05be: mul - IL_05bf: stloc.1 - IL_05c0: ldloc.s V_4 - IL_05c2: ldc.i4.1 - IL_05c3: add - IL_05c4: stloc.s V_4 - IL_05c6: ldloc.s V_5 - IL_05c8: ldc.i4.1 - IL_05c9: sub - IL_05ca: stloc.s V_5 - IL_05cc: ldloc.s V_5 - IL_05ce: ldloc.s V_4 - IL_05d0: ldloc.3 - IL_05d1: ldc.i4.1 - IL_05d2: sub - IL_05d3: mul - IL_05d4: mul - IL_05d5: stloc.s V_5 - IL_05d7: ldloc.2 - IL_05d8: ldc.i4.1 - IL_05d9: sub - IL_05da: stloc.2 - IL_05db: ldloc.1 - IL_05dc: ldloc.s V_5 - IL_05de: sub - IL_05df: stloc.1 - IL_05e0: ldloc.s V_4 - IL_05e2: ldloc.3 - IL_05e3: ldc.i4.2 - IL_05e4: add - IL_05e5: ldloc.2 - IL_05e6: mul - IL_05e7: mul - IL_05e8: stloc.s V_4 - IL_05ea: ldloc.1 - IL_05eb: ldc.i4.1 - IL_05ec: add - IL_05ed: stloc.1 - IL_05ee: ldloc.1 - IL_05ef: ldc.i4.1 - IL_05f0: sub - IL_05f1: stloc.1 - IL_05f2: br.s IL_062b - IL_05f4: ldloc.2 - IL_05f5: ldloc.3 - IL_05f6: ldloc.s V_4 - IL_05f8: mul - IL_05f9: mul - IL_05fa: stloc.2 - IL_05fb: ldloc.s V_5 - IL_05fd: ldc.i4.1 - IL_05fe: add - IL_05ff: stloc.s V_5 - IL_0601: ldloc.3 - IL_0602: ldc.i4.m1 - IL_0603: add - IL_0604: stloc.3 - IL_0605: ldloc.s V_4 - IL_0607: ldloc.s V_5 - IL_0609: ldloc.1 - IL_060a: ldc.i4.1 - IL_060b: add - IL_060c: sub - IL_060d: mul - IL_060e: stloc.s V_4 - IL_0610: ldloc.2 - IL_0611: ldc.i4.1 - IL_0612: add - IL_0613: stloc.2 - IL_0614: ldloc.1 - IL_0615: ldc.i4.2 - IL_0616: sub - IL_0617: stloc.1 - IL_0618: ldloc.2 - IL_0619: ldloc.3 - IL_061a: ldc.i4.1 - IL_061b: sub - IL_061c: ldloc.s V_4 - IL_061e: mul - IL_061f: mul - IL_0620: stloc.2 - IL_0621: ldloc.s V_5 - IL_0623: ldc.i4.1 - IL_0624: add - IL_0625: stloc.s V_5 - IL_0627: ldloc.2 - IL_0628: ldc.i4.1 - IL_0629: add - IL_062a: stloc.2 - IL_062b: ldloc.1 - IL_062c: ldloc.2 - IL_062d: bne.un.s IL_0669 - IL_062f: ldloc.1 - IL_0630: ldloc.2 - IL_0631: ldloc.3 - IL_0632: mul - IL_0633: add - IL_0634: stloc.1 - IL_0635: ldloc.s V_4 - IL_0637: ldc.i4.1 - IL_0638: add - IL_0639: stloc.s V_4 - IL_063b: ldloc.s V_5 - IL_063d: ldc.i4.1 - IL_063e: sub - IL_063f: stloc.s V_5 - IL_0641: ldloc.s V_5 - IL_0643: ldloc.s V_4 - IL_0645: ldloc.3 - IL_0646: ldc.i4.1 - IL_0647: sub - IL_0648: sub - IL_0649: mul - IL_064a: stloc.s V_5 - IL_064c: ldloc.2 - IL_064d: ldc.i4.1 - IL_064e: sub - IL_064f: stloc.2 - IL_0650: ldloc.1 - IL_0651: ldloc.s V_5 - IL_0653: sub - IL_0654: stloc.1 - IL_0655: ldloc.s V_4 - IL_0657: ldloc.3 - IL_0658: ldc.i4.2 - IL_0659: add - IL_065a: ldloc.2 - IL_065b: sub - IL_065c: add - IL_065d: stloc.s V_4 - IL_065f: ldloc.1 - IL_0660: ldc.i4.1 - IL_0661: add - IL_0662: stloc.1 - IL_0663: ldloc.1 - IL_0664: ldc.i4.1 - IL_0665: sub - IL_0666: stloc.1 - IL_0667: br.s IL_06a0 - IL_0669: ldloc.2 - IL_066a: ldloc.3 - IL_066b: ldloc.s V_4 - IL_066d: add - IL_066e: mul - IL_066f: stloc.2 - IL_0670: ldloc.s V_5 - IL_0672: ldc.i4.1 - IL_0673: add - IL_0674: stloc.s V_5 - IL_0676: ldloc.3 - IL_0677: ldc.i4.m1 - IL_0678: add - IL_0679: stloc.3 - IL_067a: ldloc.s V_4 - IL_067c: ldloc.s V_5 - IL_067e: ldloc.1 - IL_067f: ldc.i4.1 - IL_0680: add - IL_0681: mul - IL_0682: sub - IL_0683: stloc.s V_4 - IL_0685: ldloc.2 - IL_0686: ldc.i4.1 - IL_0687: add - IL_0688: stloc.2 - IL_0689: ldloc.1 - IL_068a: ldc.i4.2 - IL_068b: sub - IL_068c: stloc.1 - IL_068d: ldloc.2 - IL_068e: ldloc.3 - IL_068f: ldc.i4.1 - IL_0690: sub - IL_0691: ldloc.s V_4 - IL_0693: add - IL_0694: mul - IL_0695: stloc.2 - IL_0696: ldloc.s V_5 - IL_0698: ldc.i4.1 - IL_0699: add - IL_069a: stloc.s V_5 - IL_069c: ldloc.2 - IL_069d: ldc.i4.1 - IL_069e: add - IL_069f: stloc.2 - IL_06a0: ldloc.1 - IL_06a1: ldloc.2 - IL_06a2: beq.s IL_06de - IL_06a4: ldloc.1 - IL_06a5: ldloc.2 - IL_06a6: ldloc.3 - IL_06a7: sub - IL_06a8: add - IL_06a9: stloc.1 - IL_06aa: ldloc.s V_4 - IL_06ac: ldc.i4.1 - IL_06ad: add - IL_06ae: stloc.s V_4 - IL_06b0: ldloc.s V_5 - IL_06b2: ldc.i4.1 - IL_06b3: sub - IL_06b4: stloc.s V_5 - IL_06b6: ldloc.s V_5 - IL_06b8: ldloc.s V_4 - IL_06ba: ldloc.3 - IL_06bb: ldc.i4.1 - IL_06bc: sub - IL_06bd: sub - IL_06be: mul - IL_06bf: stloc.s V_5 - IL_06c1: ldloc.2 - IL_06c2: ldc.i4.1 - IL_06c3: sub - IL_06c4: stloc.2 - IL_06c5: ldloc.1 - IL_06c6: ldloc.s V_5 - IL_06c8: sub - IL_06c9: stloc.1 - IL_06ca: ldloc.s V_4 - IL_06cc: ldloc.3 - IL_06cd: ldc.i4.2 - IL_06ce: add - IL_06cf: ldloc.2 - IL_06d0: sub - IL_06d1: sub - IL_06d2: stloc.s V_4 - IL_06d4: ldloc.1 - IL_06d5: ldc.i4.1 - IL_06d6: add - IL_06d7: stloc.1 - IL_06d8: ldloc.1 - IL_06d9: ldc.i4.1 - IL_06da: sub - IL_06db: stloc.1 - IL_06dc: br.s IL_0715 - IL_06de: ldloc.2 - IL_06df: ldloc.3 - IL_06e0: ldloc.s V_4 - IL_06e2: sub - IL_06e3: mul - IL_06e4: stloc.2 - IL_06e5: ldloc.s V_5 - IL_06e7: ldc.i4.1 - IL_06e8: add - IL_06e9: stloc.s V_5 - IL_06eb: ldloc.3 - IL_06ec: ldc.i4.m1 - IL_06ed: add - IL_06ee: stloc.3 - IL_06ef: ldloc.s V_4 - IL_06f1: ldloc.s V_5 - IL_06f3: ldloc.1 - IL_06f4: ldc.i4.1 - IL_06f5: add - IL_06f6: add - IL_06f7: sub - IL_06f8: stloc.s V_4 - IL_06fa: ldloc.2 - IL_06fb: ldc.i4.1 - IL_06fc: add - IL_06fd: stloc.2 - IL_06fe: ldloc.1 - IL_06ff: ldc.i4.2 - IL_0700: sub - IL_0701: stloc.1 - IL_0702: ldloc.2 - IL_0703: ldloc.3 - IL_0704: ldc.i4.1 - IL_0705: sub - IL_0706: ldloc.s V_4 - IL_0708: add - IL_0709: mul - IL_070a: stloc.2 - IL_070b: ldloc.s V_5 - IL_070d: ldc.i4.1 - IL_070e: add - IL_070f: stloc.s V_5 - IL_0711: ldloc.2 - IL_0712: ldc.i4.1 - IL_0713: add - IL_0714: stloc.2 - IL_0715: ldloc.1 - IL_0716: ldloc.2 - IL_0717: blt.s IL_0753 - IL_0719: ldloc.1 - IL_071a: ldloc.2 - IL_071b: ldloc.3 - IL_071c: sub - IL_071d: add - IL_071e: stloc.1 - IL_071f: ldloc.s V_4 - IL_0721: ldc.i4.1 - IL_0722: add - IL_0723: stloc.s V_4 - IL_0725: ldloc.s V_5 - IL_0727: ldc.i4.1 - IL_0728: sub - IL_0729: stloc.s V_5 - IL_072b: ldloc.s V_5 - IL_072d: ldloc.s V_4 - IL_072f: ldloc.3 - IL_0730: ldc.i4.1 - IL_0731: sub - IL_0732: mul - IL_0733: sub - IL_0734: stloc.s V_5 - IL_0736: ldloc.2 - IL_0737: ldc.i4.1 - IL_0738: sub - IL_0739: stloc.2 - IL_073a: ldloc.1 - IL_073b: ldloc.s V_5 - IL_073d: sub - IL_073e: stloc.1 - IL_073f: ldloc.s V_4 - IL_0741: ldloc.3 - IL_0742: ldc.i4.2 - IL_0743: add - IL_0744: ldloc.2 - IL_0745: mul - IL_0746: add - IL_0747: stloc.s V_4 - IL_0749: ldloc.1 - IL_074a: ldc.i4.1 - IL_074b: add - IL_074c: stloc.1 - IL_074d: ldloc.1 - IL_074e: ldc.i4.1 - IL_074f: sub - IL_0750: stloc.1 - IL_0751: br.s IL_078a - IL_0753: ldloc.2 - IL_0754: ldloc.3 - IL_0755: ldloc.s V_4 - IL_0757: add - IL_0758: sub - IL_0759: stloc.2 - IL_075a: ldloc.s V_5 - IL_075c: ldc.i4.1 - IL_075d: add - IL_075e: stloc.s V_5 - IL_0760: ldloc.3 - IL_0761: ldc.i4.m1 - IL_0762: add - IL_0763: stloc.3 - IL_0764: ldloc.s V_4 - IL_0766: ldloc.s V_5 - IL_0768: ldloc.1 - IL_0769: ldc.i4.1 - IL_076a: add - IL_076b: mul - IL_076c: mul - IL_076d: stloc.s V_4 - IL_076f: ldloc.2 - IL_0770: ldc.i4.1 - IL_0771: add - IL_0772: stloc.2 - IL_0773: ldloc.1 - IL_0774: ldc.i4.2 - IL_0775: sub - IL_0776: stloc.1 - IL_0777: ldloc.2 - IL_0778: ldloc.3 - IL_0779: ldc.i4.1 - IL_077a: sub - IL_077b: ldloc.s V_4 - IL_077d: add - IL_077e: sub - IL_077f: stloc.2 - IL_0780: ldloc.s V_5 - IL_0782: ldc.i4.1 - IL_0783: add - IL_0784: stloc.s V_5 - IL_0786: ldloc.2 - IL_0787: ldc.i4.1 - IL_0788: add - IL_0789: stloc.2 - IL_078a: ldloc.1 - IL_078b: ldloc.2 - IL_078c: bge.s IL_07c8 - IL_078e: ldloc.1 - IL_078f: ldloc.2 - IL_0790: ldloc.3 - IL_0791: add - IL_0792: mul - IL_0793: stloc.1 - IL_0794: ldloc.s V_4 - IL_0796: ldc.i4.1 - IL_0797: add - IL_0798: stloc.s V_4 - IL_079a: ldloc.s V_5 - IL_079c: ldc.i4.1 - IL_079d: sub - IL_079e: stloc.s V_5 - IL_07a0: ldloc.s V_5 - IL_07a2: ldloc.s V_4 - IL_07a4: ldloc.3 - IL_07a5: ldc.i4.1 - IL_07a6: sub - IL_07a7: mul - IL_07a8: sub - IL_07a9: stloc.s V_5 - IL_07ab: ldloc.2 - IL_07ac: ldc.i4.1 - IL_07ad: sub - IL_07ae: stloc.2 - IL_07af: ldloc.1 - IL_07b0: ldloc.s V_5 - IL_07b2: sub - IL_07b3: stloc.1 - IL_07b4: ldloc.s V_4 - IL_07b6: ldloc.3 - IL_07b7: ldc.i4.2 - IL_07b8: add - IL_07b9: ldloc.2 - IL_07ba: mul - IL_07bb: mul - IL_07bc: stloc.s V_4 - IL_07be: ldloc.1 - IL_07bf: ldc.i4.1 - IL_07c0: add - IL_07c1: stloc.1 - IL_07c2: ldloc.1 - IL_07c3: ldc.i4.1 - IL_07c4: sub - IL_07c5: stloc.1 - IL_07c6: br.s IL_07ff - IL_07c8: ldloc.2 - IL_07c9: ldloc.3 - IL_07ca: ldloc.s V_4 - IL_07cc: mul - IL_07cd: sub - IL_07ce: stloc.2 - IL_07cf: ldloc.s V_5 - IL_07d1: ldc.i4.1 - IL_07d2: add - IL_07d3: stloc.s V_5 - IL_07d5: ldloc.3 - IL_07d6: ldc.i4.m1 - IL_07d7: add - IL_07d8: stloc.3 - IL_07d9: ldloc.s V_4 - IL_07db: ldloc.s V_5 - IL_07dd: ldloc.1 - IL_07de: ldc.i4.1 - IL_07df: add - IL_07e0: add - IL_07e1: mul - IL_07e2: stloc.s V_4 - IL_07e4: ldloc.2 - IL_07e5: ldc.i4.1 - IL_07e6: add - IL_07e7: stloc.2 - IL_07e8: ldloc.1 - IL_07e9: ldc.i4.2 - IL_07ea: sub - IL_07eb: stloc.1 - IL_07ec: ldloc.2 - IL_07ed: ldloc.3 - IL_07ee: ldc.i4.1 - IL_07ef: sub - IL_07f0: ldloc.s V_4 - IL_07f2: mul - IL_07f3: sub - IL_07f4: stloc.2 - IL_07f5: ldloc.s V_5 - IL_07f7: ldc.i4.1 - IL_07f8: add - IL_07f9: stloc.s V_5 - IL_07fb: ldloc.2 - IL_07fc: ldc.i4.1 - IL_07fd: add - IL_07fe: stloc.2 - IL_07ff: ldloc.1 - IL_0800: ldloc.2 - IL_0801: blt.s IL_083d - IL_0803: ldloc.1 - IL_0804: ldloc.2 - IL_0805: ldloc.3 - IL_0806: sub - IL_0807: add - IL_0808: stloc.1 - IL_0809: ldloc.s V_4 - IL_080b: ldc.i4.1 - IL_080c: add - IL_080d: stloc.s V_4 - IL_080f: ldloc.s V_5 - IL_0811: ldc.i4.1 - IL_0812: sub - IL_0813: stloc.s V_5 - IL_0815: ldloc.s V_5 - IL_0817: ldloc.s V_4 - IL_0819: ldloc.3 - IL_081a: ldc.i4.1 - IL_081b: sub - IL_081c: sub - IL_081d: mul - IL_081e: stloc.s V_5 - IL_0820: ldloc.2 - IL_0821: ldc.i4.1 - IL_0822: sub - IL_0823: stloc.2 - IL_0824: ldloc.1 - IL_0825: ldloc.s V_5 - IL_0827: sub - IL_0828: stloc.1 - IL_0829: ldloc.s V_4 - IL_082b: ldloc.3 - IL_082c: ldc.i4.2 - IL_082d: add - IL_082e: ldloc.2 - IL_082f: sub - IL_0830: mul - IL_0831: stloc.s V_4 - IL_0833: ldloc.1 - IL_0834: ldc.i4.1 - IL_0835: add - IL_0836: stloc.1 - IL_0837: ldloc.1 - IL_0838: ldc.i4.1 - IL_0839: sub - IL_083a: stloc.1 - IL_083b: br.s IL_0874 - IL_083d: ldloc.2 - IL_083e: ldloc.3 - IL_083f: ldloc.s V_4 - IL_0841: mul - IL_0842: mul - IL_0843: stloc.2 - IL_0844: ldloc.s V_5 - IL_0846: ldc.i4.1 - IL_0847: add - IL_0848: stloc.s V_5 - IL_084a: ldloc.3 - IL_084b: ldc.i4.m1 - IL_084c: add - IL_084d: stloc.3 - IL_084e: ldloc.s V_4 - IL_0850: ldloc.s V_5 - IL_0852: ldloc.1 - IL_0853: ldc.i4.1 - IL_0854: add - IL_0855: add - IL_0856: sub - IL_0857: stloc.s V_4 - IL_0859: ldloc.2 - IL_085a: ldc.i4.1 - IL_085b: add - IL_085c: stloc.2 - IL_085d: ldloc.1 - IL_085e: ldc.i4.2 - IL_085f: sub - IL_0860: stloc.1 - IL_0861: ldloc.2 - IL_0862: ldloc.3 - IL_0863: ldc.i4.1 - IL_0864: sub - IL_0865: ldloc.s V_4 - IL_0867: sub - IL_0868: mul - IL_0869: stloc.2 - IL_086a: ldloc.s V_5 - IL_086c: ldc.i4.1 - IL_086d: add - IL_086e: stloc.s V_5 - IL_0870: ldloc.2 - IL_0871: ldc.i4.1 - IL_0872: add - IL_0873: stloc.2 - IL_0874: ldloc.1 - IL_0875: ldloc.2 - IL_0876: bne.un.s IL_08b2 - IL_0878: ldloc.1 - IL_0879: ldloc.2 - IL_087a: ldloc.3 - IL_087b: add - IL_087c: add - IL_087d: stloc.1 - IL_087e: ldloc.s V_4 - IL_0880: ldc.i4.1 - IL_0881: add - IL_0882: stloc.s V_4 - IL_0884: ldloc.s V_5 - IL_0886: ldc.i4.1 - IL_0887: sub - IL_0888: stloc.s V_5 - IL_088a: ldloc.s V_5 - IL_088c: ldloc.s V_4 - IL_088e: ldloc.3 - IL_088f: ldc.i4.1 - IL_0890: sub - IL_0891: mul - IL_0892: add - IL_0893: stloc.s V_5 - IL_0895: ldloc.2 - IL_0896: ldc.i4.1 - IL_0897: sub - IL_0898: stloc.2 - IL_0899: ldloc.1 - IL_089a: ldloc.s V_5 - IL_089c: sub - IL_089d: stloc.1 - IL_089e: ldloc.s V_4 - IL_08a0: ldloc.3 - IL_08a1: ldc.i4.2 - IL_08a2: add - IL_08a3: ldloc.2 - IL_08a4: mul - IL_08a5: add - IL_08a6: stloc.s V_4 - IL_08a8: ldloc.1 - IL_08a9: ldc.i4.1 - IL_08aa: add - IL_08ab: stloc.1 - IL_08ac: ldloc.1 - IL_08ad: ldc.i4.1 - IL_08ae: sub - IL_08af: stloc.1 - IL_08b0: br.s IL_08e9 - IL_08b2: ldloc.2 - IL_08b3: ldloc.3 - IL_08b4: ldloc.s V_4 - IL_08b6: add - IL_08b7: add - IL_08b8: stloc.2 - IL_08b9: ldloc.s V_5 - IL_08bb: ldc.i4.1 - IL_08bc: add - IL_08bd: stloc.s V_5 - IL_08bf: ldloc.3 - IL_08c0: ldc.i4.m1 - IL_08c1: add - IL_08c2: stloc.3 - IL_08c3: ldloc.s V_4 - IL_08c5: ldloc.s V_5 - IL_08c7: ldloc.1 - IL_08c8: ldc.i4.1 - IL_08c9: add - IL_08ca: mul - IL_08cb: mul - IL_08cc: stloc.s V_4 - IL_08ce: ldloc.2 - IL_08cf: ldc.i4.1 - IL_08d0: add - IL_08d1: stloc.2 - IL_08d2: ldloc.1 - IL_08d3: ldc.i4.2 - IL_08d4: sub - IL_08d5: stloc.1 - IL_08d6: ldloc.2 - IL_08d7: ldloc.3 - IL_08d8: ldc.i4.1 - IL_08d9: sub - IL_08da: ldloc.s V_4 - IL_08dc: mul - IL_08dd: add - IL_08de: stloc.2 - IL_08df: ldloc.s V_5 - IL_08e1: ldc.i4.1 - IL_08e2: add - IL_08e3: stloc.s V_5 - IL_08e5: ldloc.2 - IL_08e6: ldc.i4.1 - IL_08e7: add - IL_08e8: stloc.2 - IL_08e9: ldloc.1 - IL_08ea: ldloc.2 - IL_08eb: beq.s IL_0927 - IL_08ed: ldloc.1 - IL_08ee: ldloc.2 - IL_08ef: ldloc.3 - IL_08f0: sub - IL_08f1: sub - IL_08f2: stloc.1 - IL_08f3: ldloc.s V_4 - IL_08f5: ldc.i4.1 - IL_08f6: add - IL_08f7: stloc.s V_4 - IL_08f9: ldloc.s V_5 - IL_08fb: ldc.i4.1 - IL_08fc: sub - IL_08fd: stloc.s V_5 - IL_08ff: ldloc.s V_5 - IL_0901: ldloc.s V_4 - IL_0903: ldloc.3 - IL_0904: ldc.i4.1 - IL_0905: sub - IL_0906: add - IL_0907: mul - IL_0908: stloc.s V_5 - IL_090a: ldloc.2 - IL_090b: ldc.i4.1 - IL_090c: sub - IL_090d: stloc.2 - IL_090e: ldloc.1 - IL_090f: ldloc.s V_5 - IL_0911: sub - IL_0912: stloc.1 - IL_0913: ldloc.s V_4 - IL_0915: ldloc.3 - IL_0916: ldc.i4.2 - IL_0917: add - IL_0918: ldloc.2 - IL_0919: add - IL_091a: mul - IL_091b: stloc.s V_4 - IL_091d: ldloc.1 - IL_091e: ldc.i4.1 - IL_091f: add - IL_0920: stloc.1 - IL_0921: ldloc.1 - IL_0922: ldc.i4.1 - IL_0923: sub - IL_0924: stloc.1 - IL_0925: br.s IL_095e - IL_0927: ldloc.2 - IL_0928: ldloc.3 - IL_0929: ldloc.s V_4 - IL_092b: mul - IL_092c: mul - IL_092d: stloc.2 - IL_092e: ldloc.s V_5 - IL_0930: ldc.i4.1 - IL_0931: add - IL_0932: stloc.s V_5 - IL_0934: ldloc.3 - IL_0935: ldc.i4.m1 - IL_0936: add - IL_0937: stloc.3 - IL_0938: ldloc.s V_4 - IL_093a: ldloc.s V_5 - IL_093c: ldloc.1 - IL_093d: ldc.i4.1 - IL_093e: add - IL_093f: add - IL_0940: add - IL_0941: stloc.s V_4 - IL_0943: ldloc.2 - IL_0944: ldc.i4.1 - IL_0945: add - IL_0946: stloc.2 - IL_0947: ldloc.1 - IL_0948: ldc.i4.2 - IL_0949: sub - IL_094a: stloc.1 - IL_094b: ldloc.2 - IL_094c: ldloc.3 - IL_094d: ldc.i4.1 - IL_094e: sub - IL_094f: ldloc.s V_4 - IL_0951: mul - IL_0952: mul - IL_0953: stloc.2 - IL_0954: ldloc.s V_5 - IL_0956: ldc.i4.1 - IL_0957: add - IL_0958: stloc.s V_5 - IL_095a: ldloc.2 - IL_095b: ldc.i4.1 - IL_095c: add - IL_095d: stloc.2 - IL_095e: ldloc.1 - IL_095f: ldloc.2 - IL_0960: bge.s IL_099c - IL_0962: ldloc.1 - IL_0963: ldloc.2 - IL_0964: ldloc.3 - IL_0965: sub - IL_0966: sub - IL_0967: stloc.1 - IL_0968: ldloc.s V_4 - IL_096a: ldc.i4.1 - IL_096b: add - IL_096c: stloc.s V_4 - IL_096e: ldloc.s V_5 - IL_0970: ldc.i4.1 - IL_0971: sub - IL_0972: stloc.s V_5 - IL_0974: ldloc.s V_5 - IL_0976: ldloc.s V_4 - IL_0978: ldloc.3 - IL_0979: ldc.i4.1 - IL_097a: sub - IL_097b: sub - IL_097c: sub - IL_097d: stloc.s V_5 - IL_097f: ldloc.2 - IL_0980: ldc.i4.1 - IL_0981: sub - IL_0982: stloc.2 - IL_0983: ldloc.1 - IL_0984: ldloc.s V_5 - IL_0986: sub - IL_0987: stloc.1 - IL_0988: ldloc.s V_4 - IL_098a: ldloc.3 - IL_098b: ldc.i4.2 - IL_098c: add - IL_098d: ldloc.2 - IL_098e: sub - IL_098f: mul - IL_0990: stloc.s V_4 - IL_0992: ldloc.1 - IL_0993: ldc.i4.1 - IL_0994: add - IL_0995: stloc.1 - IL_0996: ldloc.1 - IL_0997: ldc.i4.1 - IL_0998: sub - IL_0999: stloc.1 - IL_099a: br.s IL_09d3 - IL_099c: ldloc.2 - IL_099d: ldloc.3 - IL_099e: ldloc.s V_4 - IL_09a0: mul - IL_09a1: sub - IL_09a2: stloc.2 - IL_09a3: ldloc.s V_5 - IL_09a5: ldc.i4.1 - IL_09a6: add - IL_09a7: stloc.s V_5 - IL_09a9: ldloc.3 - IL_09aa: ldc.i4.m1 - IL_09ab: add - IL_09ac: stloc.3 - IL_09ad: ldloc.s V_4 - IL_09af: ldloc.s V_5 - IL_09b1: ldloc.1 - IL_09b2: ldc.i4.1 - IL_09b3: add - IL_09b4: add - IL_09b5: sub - IL_09b6: stloc.s V_4 - IL_09b8: ldloc.2 - IL_09b9: ldc.i4.1 - IL_09ba: add - IL_09bb: stloc.2 - IL_09bc: ldloc.1 - IL_09bd: ldc.i4.2 - IL_09be: sub - IL_09bf: stloc.1 - IL_09c0: ldloc.2 - IL_09c1: ldloc.3 - IL_09c2: ldc.i4.1 - IL_09c3: sub - IL_09c4: ldloc.s V_4 - IL_09c6: mul - IL_09c7: sub - IL_09c8: stloc.2 - IL_09c9: ldloc.s V_5 - IL_09cb: ldc.i4.1 - IL_09cc: add - IL_09cd: stloc.s V_5 - IL_09cf: ldloc.2 - IL_09d0: ldc.i4.1 - IL_09d1: add - IL_09d2: stloc.2 - IL_09d3: ldloc.1 - IL_09d4: ldloc.2 - IL_09d5: bge.s IL_0a11 - IL_09d7: ldloc.1 - IL_09d8: ldloc.2 - IL_09d9: ldloc.3 - IL_09da: sub - IL_09db: mul - IL_09dc: stloc.1 - IL_09dd: ldloc.s V_4 - IL_09df: ldc.i4.1 - IL_09e0: add - IL_09e1: stloc.s V_4 - IL_09e3: ldloc.s V_5 - IL_09e5: ldc.i4.1 - IL_09e6: sub - IL_09e7: stloc.s V_5 - IL_09e9: ldloc.s V_5 - IL_09eb: ldloc.s V_4 - IL_09ed: ldloc.3 - IL_09ee: ldc.i4.1 - IL_09ef: sub - IL_09f0: mul - IL_09f1: add - IL_09f2: stloc.s V_5 - IL_09f4: ldloc.2 - IL_09f5: ldc.i4.1 - IL_09f6: sub - IL_09f7: stloc.2 - IL_09f8: ldloc.1 - IL_09f9: ldloc.s V_5 - IL_09fb: sub - IL_09fc: stloc.1 - IL_09fd: ldloc.s V_4 - IL_09ff: ldloc.3 - IL_0a00: ldc.i4.2 - IL_0a01: add - IL_0a02: ldloc.2 - IL_0a03: mul - IL_0a04: sub - IL_0a05: stloc.s V_4 - IL_0a07: ldloc.1 - IL_0a08: ldc.i4.1 - IL_0a09: add - IL_0a0a: stloc.1 - IL_0a0b: ldloc.1 - IL_0a0c: ldc.i4.1 - IL_0a0d: sub - IL_0a0e: stloc.1 - IL_0a0f: br.s IL_0a48 - IL_0a11: ldloc.2 - IL_0a12: ldloc.3 - IL_0a13: ldloc.s V_4 - IL_0a15: sub - IL_0a16: add - IL_0a17: stloc.2 - IL_0a18: ldloc.s V_5 - IL_0a1a: ldc.i4.1 - IL_0a1b: add - IL_0a1c: stloc.s V_5 - IL_0a1e: ldloc.3 - IL_0a1f: ldc.i4.m1 - IL_0a20: add - IL_0a21: stloc.3 - IL_0a22: ldloc.s V_4 - IL_0a24: ldloc.s V_5 - IL_0a26: ldloc.1 - IL_0a27: ldc.i4.1 - IL_0a28: add - IL_0a29: mul - IL_0a2a: mul - IL_0a2b: stloc.s V_4 - IL_0a2d: ldloc.2 - IL_0a2e: ldc.i4.1 - IL_0a2f: add - IL_0a30: stloc.2 - IL_0a31: ldloc.1 - IL_0a32: ldc.i4.2 - IL_0a33: sub - IL_0a34: stloc.1 - IL_0a35: ldloc.2 - IL_0a36: ldloc.3 - IL_0a37: ldc.i4.1 - IL_0a38: sub - IL_0a39: ldloc.s V_4 - IL_0a3b: sub - IL_0a3c: add - IL_0a3d: stloc.2 - IL_0a3e: ldloc.s V_5 - IL_0a40: ldc.i4.1 - IL_0a41: add - IL_0a42: stloc.s V_5 - IL_0a44: ldloc.2 - IL_0a45: ldc.i4.1 - IL_0a46: add - IL_0a47: stloc.2 - IL_0a48: ldloc.1 - IL_0a49: ldloc.2 - IL_0a4a: ble.s IL_0a86 - IL_0a4c: ldloc.1 - IL_0a4d: ldloc.2 - IL_0a4e: ldloc.3 - IL_0a4f: sub - IL_0a50: mul - IL_0a51: stloc.1 - IL_0a52: ldloc.s V_4 - IL_0a54: ldc.i4.1 - IL_0a55: add - IL_0a56: stloc.s V_4 - IL_0a58: ldloc.s V_5 - IL_0a5a: ldc.i4.1 - IL_0a5b: sub - IL_0a5c: stloc.s V_5 - IL_0a5e: ldloc.s V_5 - IL_0a60: ldloc.s V_4 - IL_0a62: ldloc.3 - IL_0a63: ldc.i4.1 - IL_0a64: sub - IL_0a65: mul - IL_0a66: mul - IL_0a67: stloc.s V_5 - IL_0a69: ldloc.2 - IL_0a6a: ldc.i4.1 - IL_0a6b: sub - IL_0a6c: stloc.2 - IL_0a6d: ldloc.1 - IL_0a6e: ldloc.s V_5 - IL_0a70: sub - IL_0a71: stloc.1 - IL_0a72: ldloc.s V_4 - IL_0a74: ldloc.3 - IL_0a75: ldc.i4.2 - IL_0a76: add - IL_0a77: ldloc.2 - IL_0a78: mul - IL_0a79: mul - IL_0a7a: stloc.s V_4 - IL_0a7c: ldloc.1 - IL_0a7d: ldc.i4.1 - IL_0a7e: add - IL_0a7f: stloc.1 - IL_0a80: ldloc.1 - IL_0a81: ldc.i4.1 - IL_0a82: sub - IL_0a83: stloc.1 - IL_0a84: br.s IL_0abd - IL_0a86: ldloc.2 - IL_0a87: ldloc.3 - IL_0a88: ldloc.s V_4 - IL_0a8a: mul - IL_0a8b: mul - IL_0a8c: stloc.2 - IL_0a8d: ldloc.s V_5 - IL_0a8f: ldc.i4.1 - IL_0a90: add - IL_0a91: stloc.s V_5 - IL_0a93: ldloc.3 - IL_0a94: ldc.i4.m1 - IL_0a95: add - IL_0a96: stloc.3 - IL_0a97: ldloc.s V_4 - IL_0a99: ldloc.s V_5 - IL_0a9b: ldloc.1 - IL_0a9c: ldc.i4.1 - IL_0a9d: add - IL_0a9e: sub - IL_0a9f: mul - IL_0aa0: stloc.s V_4 - IL_0aa2: ldloc.2 - IL_0aa3: ldc.i4.1 - IL_0aa4: add - IL_0aa5: stloc.2 - IL_0aa6: ldloc.1 - IL_0aa7: ldc.i4.2 - IL_0aa8: sub - IL_0aa9: stloc.1 - IL_0aaa: ldloc.2 - IL_0aab: ldloc.3 - IL_0aac: ldc.i4.1 - IL_0aad: sub - IL_0aae: ldloc.s V_4 - IL_0ab0: mul - IL_0ab1: mul - IL_0ab2: stloc.2 - IL_0ab3: ldloc.s V_5 - IL_0ab5: ldc.i4.1 - IL_0ab6: add - IL_0ab7: stloc.s V_5 - IL_0ab9: ldloc.2 - IL_0aba: ldc.i4.1 - IL_0abb: add - IL_0abc: stloc.2 - IL_0abd: ldloc.1 - IL_0abe: ldloc.2 - IL_0abf: beq.s IL_0afb - IL_0ac1: ldloc.1 - IL_0ac2: ldloc.2 - IL_0ac3: ldloc.3 - IL_0ac4: sub - IL_0ac5: sub - IL_0ac6: stloc.1 - IL_0ac7: ldloc.s V_4 - IL_0ac9: ldc.i4.1 - IL_0aca: add - IL_0acb: stloc.s V_4 - IL_0acd: ldloc.s V_5 - IL_0acf: ldc.i4.1 - IL_0ad0: sub - IL_0ad1: stloc.s V_5 - IL_0ad3: ldloc.s V_5 - IL_0ad5: ldloc.s V_4 - IL_0ad7: ldloc.3 - IL_0ad8: ldc.i4.1 - IL_0ad9: sub - IL_0ada: add - IL_0adb: add - IL_0adc: stloc.s V_5 - IL_0ade: ldloc.2 - IL_0adf: ldc.i4.1 - IL_0ae0: sub - IL_0ae1: stloc.2 - IL_0ae2: ldloc.1 - IL_0ae3: ldloc.s V_5 - IL_0ae5: sub - IL_0ae6: stloc.1 - IL_0ae7: ldloc.s V_4 - IL_0ae9: ldloc.3 - IL_0aea: ldc.i4.2 - IL_0aeb: add - IL_0aec: ldloc.2 - IL_0aed: add - IL_0aee: sub - IL_0aef: stloc.s V_4 - IL_0af1: ldloc.1 - IL_0af2: ldc.i4.1 - IL_0af3: add - IL_0af4: stloc.1 - IL_0af5: ldloc.1 - IL_0af6: ldc.i4.1 - IL_0af7: sub - IL_0af8: stloc.1 - IL_0af9: br.s IL_0b32 - IL_0afb: ldloc.2 - IL_0afc: ldloc.3 - IL_0afd: ldloc.s V_4 - IL_0aff: sub - IL_0b00: add - IL_0b01: stloc.2 - IL_0b02: ldloc.s V_5 - IL_0b04: ldc.i4.1 - IL_0b05: add - IL_0b06: stloc.s V_5 - IL_0b08: ldloc.3 - IL_0b09: ldc.i4.m1 - IL_0b0a: add - IL_0b0b: stloc.3 - IL_0b0c: ldloc.s V_4 - IL_0b0e: ldloc.s V_5 - IL_0b10: ldloc.1 - IL_0b11: ldc.i4.1 - IL_0b12: add - IL_0b13: sub - IL_0b14: add - IL_0b15: stloc.s V_4 - IL_0b17: ldloc.2 - IL_0b18: ldc.i4.1 - IL_0b19: add - IL_0b1a: stloc.2 - IL_0b1b: ldloc.1 - IL_0b1c: ldc.i4.2 - IL_0b1d: sub - IL_0b1e: stloc.1 - IL_0b1f: ldloc.2 - IL_0b20: ldloc.3 - IL_0b21: ldc.i4.1 - IL_0b22: sub - IL_0b23: ldloc.s V_4 - IL_0b25: sub - IL_0b26: add - IL_0b27: stloc.2 - IL_0b28: ldloc.s V_5 - IL_0b2a: ldc.i4.1 - IL_0b2b: add - IL_0b2c: stloc.s V_5 - IL_0b2e: ldloc.2 - IL_0b2f: ldc.i4.1 - IL_0b30: add - IL_0b31: stloc.2 - IL_0b32: ldloc.1 - IL_0b33: ldloc.2 - IL_0b34: ble.s IL_0b70 - IL_0b36: ldloc.1 - IL_0b37: ldloc.2 - IL_0b38: ldloc.3 - IL_0b39: mul - IL_0b3a: mul - IL_0b3b: stloc.1 - IL_0b3c: ldloc.s V_4 - IL_0b3e: ldc.i4.1 - IL_0b3f: add - IL_0b40: stloc.s V_4 - IL_0b42: ldloc.s V_5 - IL_0b44: ldc.i4.1 - IL_0b45: sub - IL_0b46: stloc.s V_5 - IL_0b48: ldloc.s V_5 - IL_0b4a: ldloc.s V_4 - IL_0b4c: ldloc.3 - IL_0b4d: ldc.i4.1 - IL_0b4e: sub - IL_0b4f: add - IL_0b50: add - IL_0b51: stloc.s V_5 - IL_0b53: ldloc.2 - IL_0b54: ldc.i4.1 - IL_0b55: sub - IL_0b56: stloc.2 - IL_0b57: ldloc.1 - IL_0b58: ldloc.s V_5 - IL_0b5a: sub - IL_0b5b: stloc.1 - IL_0b5c: ldloc.s V_4 - IL_0b5e: ldloc.3 - IL_0b5f: ldc.i4.2 - IL_0b60: add - IL_0b61: ldloc.2 - IL_0b62: add - IL_0b63: sub - IL_0b64: stloc.s V_4 - IL_0b66: ldloc.1 - IL_0b67: ldc.i4.1 - IL_0b68: add - IL_0b69: stloc.1 - IL_0b6a: ldloc.1 - IL_0b6b: ldc.i4.1 - IL_0b6c: sub - IL_0b6d: stloc.1 - IL_0b6e: br.s IL_0ba7 - IL_0b70: ldloc.2 - IL_0b71: ldloc.3 - IL_0b72: ldloc.s V_4 - IL_0b74: sub - IL_0b75: add - IL_0b76: stloc.2 - IL_0b77: ldloc.s V_5 - IL_0b79: ldc.i4.1 - IL_0b7a: add - IL_0b7b: stloc.s V_5 - IL_0b7d: ldloc.3 - IL_0b7e: ldc.i4.m1 - IL_0b7f: add - IL_0b80: stloc.3 - IL_0b81: ldloc.s V_4 - IL_0b83: ldloc.s V_5 - IL_0b85: ldloc.1 - IL_0b86: ldc.i4.1 - IL_0b87: add - IL_0b88: add - IL_0b89: add - IL_0b8a: stloc.s V_4 - IL_0b8c: ldloc.2 - IL_0b8d: ldc.i4.1 - IL_0b8e: add - IL_0b8f: stloc.2 - IL_0b90: ldloc.1 - IL_0b91: ldc.i4.2 - IL_0b92: sub - IL_0b93: stloc.1 - IL_0b94: ldloc.2 - IL_0b95: ldloc.3 - IL_0b96: ldc.i4.1 - IL_0b97: sub - IL_0b98: ldloc.s V_4 - IL_0b9a: mul - IL_0b9b: add - IL_0b9c: stloc.2 - IL_0b9d: ldloc.s V_5 - IL_0b9f: ldc.i4.1 - IL_0ba0: add - IL_0ba1: stloc.s V_5 - IL_0ba3: ldloc.2 - IL_0ba4: ldc.i4.1 - IL_0ba5: add - IL_0ba6: stloc.2 - IL_0ba7: ldloc.1 - IL_0ba8: ldloc.2 - IL_0ba9: beq.s IL_0be5 - IL_0bab: ldloc.1 - IL_0bac: ldloc.2 - IL_0bad: ldloc.3 - IL_0bae: mul - IL_0baf: add - IL_0bb0: stloc.1 - IL_0bb1: ldloc.s V_4 - IL_0bb3: ldc.i4.1 - IL_0bb4: add - IL_0bb5: stloc.s V_4 - IL_0bb7: ldloc.s V_5 - IL_0bb9: ldc.i4.1 - IL_0bba: sub - IL_0bbb: stloc.s V_5 - IL_0bbd: ldloc.s V_5 - IL_0bbf: ldloc.s V_4 - IL_0bc1: ldloc.3 - IL_0bc2: ldc.i4.1 - IL_0bc3: sub - IL_0bc4: add - IL_0bc5: mul - IL_0bc6: stloc.s V_5 - IL_0bc8: ldloc.2 - IL_0bc9: ldc.i4.1 - IL_0bca: sub - IL_0bcb: stloc.2 - IL_0bcc: ldloc.1 - IL_0bcd: ldloc.s V_5 - IL_0bcf: sub - IL_0bd0: stloc.1 - IL_0bd1: ldloc.s V_4 - IL_0bd3: ldloc.3 - IL_0bd4: ldc.i4.2 - IL_0bd5: add - IL_0bd6: ldloc.2 - IL_0bd7: add - IL_0bd8: sub - IL_0bd9: stloc.s V_4 - IL_0bdb: ldloc.1 - IL_0bdc: ldc.i4.1 - IL_0bdd: add - IL_0bde: stloc.1 - IL_0bdf: ldloc.1 - IL_0be0: ldc.i4.1 - IL_0be1: sub - IL_0be2: stloc.1 - IL_0be3: br.s IL_0c1c - IL_0be5: ldloc.2 - IL_0be6: ldloc.3 - IL_0be7: ldloc.s V_4 - IL_0be9: sub - IL_0bea: mul - IL_0beb: stloc.2 - IL_0bec: ldloc.s V_5 - IL_0bee: ldc.i4.1 - IL_0bef: add - IL_0bf0: stloc.s V_5 - IL_0bf2: ldloc.3 - IL_0bf3: ldc.i4.m1 - IL_0bf4: add - IL_0bf5: stloc.3 - IL_0bf6: ldloc.s V_4 - IL_0bf8: ldloc.s V_5 - IL_0bfa: ldloc.1 - IL_0bfb: ldc.i4.1 - IL_0bfc: add - IL_0bfd: add - IL_0bfe: add - IL_0bff: stloc.s V_4 - IL_0c01: ldloc.2 - IL_0c02: ldc.i4.1 - IL_0c03: add - IL_0c04: stloc.2 - IL_0c05: ldloc.1 - IL_0c06: ldc.i4.2 - IL_0c07: sub - IL_0c08: stloc.1 - IL_0c09: ldloc.2 - IL_0c0a: ldloc.3 - IL_0c0b: ldc.i4.1 - IL_0c0c: sub - IL_0c0d: ldloc.s V_4 - IL_0c0f: add - IL_0c10: mul - IL_0c11: stloc.2 - IL_0c12: ldloc.s V_5 - IL_0c14: ldc.i4.1 - IL_0c15: add - IL_0c16: stloc.s V_5 - IL_0c18: ldloc.2 - IL_0c19: ldc.i4.1 - IL_0c1a: add - IL_0c1b: stloc.2 - IL_0c1c: ldloc.1 - IL_0c1d: ldloc.2 - IL_0c1e: bne.un.s IL_0c5a - IL_0c20: ldloc.1 - IL_0c21: ldloc.2 - IL_0c22: ldloc.3 - IL_0c23: sub - IL_0c24: sub - IL_0c25: stloc.1 - IL_0c26: ldloc.s V_4 - IL_0c28: ldc.i4.1 - IL_0c29: add - IL_0c2a: stloc.s V_4 - IL_0c2c: ldloc.s V_5 - IL_0c2e: ldc.i4.1 - IL_0c2f: sub - IL_0c30: stloc.s V_5 - IL_0c32: ldloc.s V_5 - IL_0c34: ldloc.s V_4 - IL_0c36: ldloc.3 - IL_0c37: ldc.i4.1 - IL_0c38: sub - IL_0c39: mul - IL_0c3a: sub - IL_0c3b: stloc.s V_5 - IL_0c3d: ldloc.2 - IL_0c3e: ldc.i4.1 - IL_0c3f: sub - IL_0c40: stloc.2 - IL_0c41: ldloc.1 - IL_0c42: ldloc.s V_5 - IL_0c44: sub - IL_0c45: stloc.1 - IL_0c46: ldloc.s V_4 - IL_0c48: ldloc.3 - IL_0c49: ldc.i4.2 - IL_0c4a: add - IL_0c4b: ldloc.2 - IL_0c4c: mul - IL_0c4d: sub - IL_0c4e: stloc.s V_4 - IL_0c50: ldloc.1 - IL_0c51: ldc.i4.1 - IL_0c52: add - IL_0c53: stloc.1 - IL_0c54: ldloc.1 - IL_0c55: ldc.i4.1 - IL_0c56: sub - IL_0c57: stloc.1 - IL_0c58: br.s IL_0c91 - IL_0c5a: ldloc.2 - IL_0c5b: ldloc.3 - IL_0c5c: ldloc.s V_4 - IL_0c5e: sub - IL_0c5f: sub - IL_0c60: stloc.2 - IL_0c61: ldloc.s V_5 - IL_0c63: ldc.i4.1 - IL_0c64: add - IL_0c65: stloc.s V_5 - IL_0c67: ldloc.3 - IL_0c68: ldc.i4.m1 - IL_0c69: add - IL_0c6a: stloc.3 - IL_0c6b: ldloc.s V_4 - IL_0c6d: ldloc.s V_5 - IL_0c6f: ldloc.1 - IL_0c70: ldc.i4.1 - IL_0c71: add - IL_0c72: mul - IL_0c73: mul - IL_0c74: stloc.s V_4 - IL_0c76: ldloc.2 - IL_0c77: ldc.i4.1 - IL_0c78: add - IL_0c79: stloc.2 - IL_0c7a: ldloc.1 - IL_0c7b: ldc.i4.2 - IL_0c7c: sub - IL_0c7d: stloc.1 - IL_0c7e: ldloc.2 - IL_0c7f: ldloc.3 - IL_0c80: ldc.i4.1 - IL_0c81: sub - IL_0c82: ldloc.s V_4 - IL_0c84: sub - IL_0c85: sub - IL_0c86: stloc.2 - IL_0c87: ldloc.s V_5 - IL_0c89: ldc.i4.1 - IL_0c8a: add - IL_0c8b: stloc.s V_5 - IL_0c8d: ldloc.2 - IL_0c8e: ldc.i4.1 - IL_0c8f: add - IL_0c90: stloc.2 - IL_0c91: ldloc.1 - IL_0c92: ldloc.2 - IL_0c93: ble.s IL_0ccf - IL_0c95: ldloc.1 - IL_0c96: ldloc.2 - IL_0c97: ldloc.3 - IL_0c98: add - IL_0c99: mul - IL_0c9a: stloc.1 - IL_0c9b: ldloc.s V_4 - IL_0c9d: ldc.i4.1 - IL_0c9e: add - IL_0c9f: stloc.s V_4 - IL_0ca1: ldloc.s V_5 - IL_0ca3: ldc.i4.1 - IL_0ca4: sub - IL_0ca5: stloc.s V_5 - IL_0ca7: ldloc.s V_5 - IL_0ca9: ldloc.s V_4 - IL_0cab: ldloc.3 - IL_0cac: ldc.i4.1 - IL_0cad: sub - IL_0cae: sub - IL_0caf: mul - IL_0cb0: stloc.s V_5 - IL_0cb2: ldloc.2 - IL_0cb3: ldc.i4.1 - IL_0cb4: sub - IL_0cb5: stloc.2 - IL_0cb6: ldloc.1 - IL_0cb7: ldloc.s V_5 - IL_0cb9: sub - IL_0cba: stloc.1 - IL_0cbb: ldloc.s V_4 - IL_0cbd: ldloc.3 - IL_0cbe: ldc.i4.2 - IL_0cbf: add - IL_0cc0: ldloc.2 - IL_0cc1: sub - IL_0cc2: mul - IL_0cc3: stloc.s V_4 - IL_0cc5: ldloc.1 - IL_0cc6: ldc.i4.1 - IL_0cc7: add - IL_0cc8: stloc.1 - IL_0cc9: ldloc.1 - IL_0cca: ldc.i4.1 - IL_0ccb: sub - IL_0ccc: stloc.1 - IL_0ccd: br.s IL_0d06 - IL_0ccf: ldloc.2 - IL_0cd0: ldloc.3 - IL_0cd1: ldloc.s V_4 - IL_0cd3: mul - IL_0cd4: mul - IL_0cd5: stloc.2 - IL_0cd6: ldloc.s V_5 - IL_0cd8: ldc.i4.1 - IL_0cd9: add - IL_0cda: stloc.s V_5 - IL_0cdc: ldloc.3 - IL_0cdd: ldc.i4.m1 - IL_0cde: add - IL_0cdf: stloc.3 - IL_0ce0: ldloc.s V_4 - IL_0ce2: ldloc.s V_5 - IL_0ce4: ldloc.1 - IL_0ce5: ldc.i4.1 - IL_0ce6: add - IL_0ce7: mul - IL_0ce8: sub - IL_0ce9: stloc.s V_4 - IL_0ceb: ldloc.2 - IL_0cec: ldc.i4.1 - IL_0ced: add - IL_0cee: stloc.2 - IL_0cef: ldloc.1 - IL_0cf0: ldc.i4.2 - IL_0cf1: sub - IL_0cf2: stloc.1 - IL_0cf3: ldloc.2 - IL_0cf4: ldloc.3 - IL_0cf5: ldc.i4.1 - IL_0cf6: sub - IL_0cf7: ldloc.s V_4 - IL_0cf9: mul - IL_0cfa: mul - IL_0cfb: stloc.2 - IL_0cfc: ldloc.s V_5 - IL_0cfe: ldc.i4.1 - IL_0cff: add - IL_0d00: stloc.s V_5 - IL_0d02: ldloc.2 - IL_0d03: ldc.i4.1 - IL_0d04: add - IL_0d05: stloc.2 - IL_0d06: ldloc.1 - IL_0d07: ldloc.s V_5 - IL_0d09: bgt.s IL_0d45 - IL_0d0b: ldloc.1 - IL_0d0c: ldloc.2 - IL_0d0d: ldloc.3 - IL_0d0e: mul - IL_0d0f: sub - IL_0d10: stloc.1 - IL_0d11: ldloc.s V_4 - IL_0d13: ldc.i4.1 - IL_0d14: add - IL_0d15: stloc.s V_4 - IL_0d17: ldloc.s V_5 - IL_0d19: ldc.i4.1 - IL_0d1a: sub - IL_0d1b: stloc.s V_5 - IL_0d1d: ldloc.s V_5 - IL_0d1f: ldloc.s V_4 - IL_0d21: ldloc.3 - IL_0d22: ldc.i4.1 - IL_0d23: sub - IL_0d24: sub - IL_0d25: add - IL_0d26: stloc.s V_5 - IL_0d28: ldloc.2 - IL_0d29: ldc.i4.1 - IL_0d2a: sub - IL_0d2b: stloc.2 - IL_0d2c: ldloc.1 - IL_0d2d: ldloc.s V_5 - IL_0d2f: sub - IL_0d30: stloc.1 - IL_0d31: ldloc.s V_4 - IL_0d33: ldloc.3 - IL_0d34: ldc.i4.2 - IL_0d35: add - IL_0d36: ldloc.2 - IL_0d37: sub - IL_0d38: mul - IL_0d39: stloc.s V_4 - IL_0d3b: ldloc.1 - IL_0d3c: ldc.i4.1 - IL_0d3d: add - IL_0d3e: stloc.1 - IL_0d3f: ldloc.1 - IL_0d40: ldc.i4.1 - IL_0d41: sub - IL_0d42: stloc.1 - IL_0d43: br.s IL_0d7c - IL_0d45: ldloc.2 - IL_0d46: ldloc.3 - IL_0d47: ldloc.s V_4 - IL_0d49: mul - IL_0d4a: add - IL_0d4b: stloc.2 - IL_0d4c: ldloc.s V_5 - IL_0d4e: ldc.i4.1 - IL_0d4f: add - IL_0d50: stloc.s V_5 - IL_0d52: ldloc.3 - IL_0d53: ldc.i4.m1 - IL_0d54: add - IL_0d55: stloc.3 - IL_0d56: ldloc.s V_4 - IL_0d58: ldloc.s V_5 - IL_0d5a: ldloc.1 - IL_0d5b: ldc.i4.1 - IL_0d5c: add - IL_0d5d: sub - IL_0d5e: sub - IL_0d5f: stloc.s V_4 - IL_0d61: ldloc.2 - IL_0d62: ldc.i4.1 - IL_0d63: add - IL_0d64: stloc.2 - IL_0d65: ldloc.1 - IL_0d66: ldc.i4.2 - IL_0d67: sub - IL_0d68: stloc.1 - IL_0d69: ldloc.2 - IL_0d6a: ldloc.3 - IL_0d6b: ldc.i4.1 - IL_0d6c: sub - IL_0d6d: ldloc.s V_4 - IL_0d6f: sub - IL_0d70: add - IL_0d71: stloc.2 - IL_0d72: ldloc.s V_5 - IL_0d74: ldc.i4.1 - IL_0d75: add - IL_0d76: stloc.s V_5 - IL_0d78: ldloc.2 - IL_0d79: ldc.i4.1 - IL_0d7a: add - IL_0d7b: stloc.2 - IL_0d7c: ldloc.1 - IL_0d7d: ldloc.2 - IL_0d7e: bne.un.s IL_0dba - IL_0d80: ldloc.1 - IL_0d81: ldloc.2 - IL_0d82: ldloc.3 - IL_0d83: mul - IL_0d84: add - IL_0d85: stloc.1 - IL_0d86: ldloc.s V_4 - IL_0d88: ldc.i4.1 - IL_0d89: add - IL_0d8a: stloc.s V_4 - IL_0d8c: ldloc.s V_5 - IL_0d8e: ldc.i4.1 - IL_0d8f: sub - IL_0d90: stloc.s V_5 - IL_0d92: ldloc.s V_5 - IL_0d94: ldloc.s V_4 - IL_0d96: ldloc.3 - IL_0d97: ldc.i4.1 - IL_0d98: sub - IL_0d99: add - IL_0d9a: mul - IL_0d9b: stloc.s V_5 - IL_0d9d: ldloc.2 - IL_0d9e: ldc.i4.1 - IL_0d9f: sub - IL_0da0: stloc.2 - IL_0da1: ldloc.1 - IL_0da2: ldloc.s V_5 - IL_0da4: sub - IL_0da5: stloc.1 - IL_0da6: ldloc.s V_4 - IL_0da8: ldloc.3 - IL_0da9: ldc.i4.2 - IL_0daa: add - IL_0dab: ldloc.2 - IL_0dac: add - IL_0dad: mul - IL_0dae: stloc.s V_4 - IL_0db0: ldloc.1 - IL_0db1: ldc.i4.1 - IL_0db2: add - IL_0db3: stloc.1 - IL_0db4: ldloc.1 - IL_0db5: ldc.i4.1 - IL_0db6: sub - IL_0db7: stloc.1 - IL_0db8: br.s IL_0df1 - IL_0dba: ldloc.2 - IL_0dbb: ldloc.3 - IL_0dbc: ldloc.s V_4 - IL_0dbe: mul - IL_0dbf: mul - IL_0dc0: stloc.2 - IL_0dc1: ldloc.s V_5 - IL_0dc3: ldc.i4.1 - IL_0dc4: add - IL_0dc5: stloc.s V_5 - IL_0dc7: ldloc.3 - IL_0dc8: ldc.i4.m1 - IL_0dc9: add - IL_0dca: stloc.3 - IL_0dcb: ldloc.s V_4 - IL_0dcd: ldloc.s V_5 - IL_0dcf: ldloc.1 - IL_0dd0: ldc.i4.1 - IL_0dd1: add - IL_0dd2: mul - IL_0dd3: add - IL_0dd4: stloc.s V_4 - IL_0dd6: ldloc.2 - IL_0dd7: ldc.i4.1 - IL_0dd8: add - IL_0dd9: stloc.2 - IL_0dda: ldloc.1 - IL_0ddb: ldc.i4.2 - IL_0ddc: sub - IL_0ddd: stloc.1 - IL_0dde: ldloc.2 - IL_0ddf: ldloc.3 - IL_0de0: ldc.i4.1 - IL_0de1: sub - IL_0de2: ldloc.s V_4 - IL_0de4: sub - IL_0de5: mul - IL_0de6: stloc.2 - IL_0de7: ldloc.s V_5 - IL_0de9: ldc.i4.1 - IL_0dea: add - IL_0deb: stloc.s V_5 - IL_0ded: ldloc.2 - IL_0dee: ldc.i4.1 - IL_0def: add - IL_0df0: stloc.2 - IL_0df1: ldloc.1 - IL_0df2: ldloc.2 - IL_0df3: blt.s IL_0e2f - IL_0df5: ldloc.1 - IL_0df6: ldloc.2 - IL_0df7: ldloc.3 - IL_0df8: mul - IL_0df9: mul - IL_0dfa: stloc.1 - IL_0dfb: ldloc.s V_4 - IL_0dfd: ldc.i4.1 - IL_0dfe: add - IL_0dff: stloc.s V_4 - IL_0e01: ldloc.s V_5 - IL_0e03: ldc.i4.1 - IL_0e04: sub - IL_0e05: stloc.s V_5 - IL_0e07: ldloc.s V_5 - IL_0e09: ldloc.s V_4 - IL_0e0b: ldloc.3 - IL_0e0c: ldc.i4.1 - IL_0e0d: sub - IL_0e0e: add - IL_0e0f: mul - IL_0e10: stloc.s V_5 - IL_0e12: ldloc.2 - IL_0e13: ldc.i4.1 - IL_0e14: sub - IL_0e15: stloc.2 - IL_0e16: ldloc.1 - IL_0e17: ldloc.s V_5 - IL_0e19: sub - IL_0e1a: stloc.1 - IL_0e1b: ldloc.s V_4 - IL_0e1d: ldloc.3 - IL_0e1e: ldc.i4.2 - IL_0e1f: add - IL_0e20: ldloc.2 - IL_0e21: add - IL_0e22: mul - IL_0e23: stloc.s V_4 - IL_0e25: ldloc.1 - IL_0e26: ldc.i4.1 - IL_0e27: add - IL_0e28: stloc.1 - IL_0e29: ldloc.1 - IL_0e2a: ldc.i4.1 - IL_0e2b: sub - IL_0e2c: stloc.1 - IL_0e2d: br.s IL_0e66 - IL_0e2f: ldloc.2 - IL_0e30: ldloc.3 - IL_0e31: ldloc.s V_4 - IL_0e33: mul - IL_0e34: mul - IL_0e35: stloc.2 - IL_0e36: ldloc.s V_5 - IL_0e38: ldc.i4.1 - IL_0e39: add - IL_0e3a: stloc.s V_5 - IL_0e3c: ldloc.3 - IL_0e3d: ldc.i4.m1 - IL_0e3e: add - IL_0e3f: stloc.3 - IL_0e40: ldloc.s V_4 - IL_0e42: ldloc.s V_5 - IL_0e44: ldloc.1 - IL_0e45: ldc.i4.1 - IL_0e46: add - IL_0e47: sub - IL_0e48: add - IL_0e49: stloc.s V_4 - IL_0e4b: ldloc.2 - IL_0e4c: ldc.i4.1 - IL_0e4d: add - IL_0e4e: stloc.2 - IL_0e4f: ldloc.1 - IL_0e50: ldc.i4.2 - IL_0e51: sub - IL_0e52: stloc.1 - IL_0e53: ldloc.2 - IL_0e54: ldloc.3 - IL_0e55: ldc.i4.1 - IL_0e56: sub - IL_0e57: ldloc.s V_4 - IL_0e59: sub - IL_0e5a: mul - IL_0e5b: stloc.2 - IL_0e5c: ldloc.s V_5 - IL_0e5e: ldc.i4.1 - IL_0e5f: add - IL_0e60: stloc.s V_5 - IL_0e62: ldloc.2 - IL_0e63: ldc.i4.1 - IL_0e64: add - IL_0e65: stloc.2 - IL_0e66: ldloc.1 - IL_0e67: ldloc.2 - IL_0e68: ble.s IL_0ea4 - IL_0e6a: ldloc.1 - IL_0e6b: ldloc.2 - IL_0e6c: ldloc.3 - IL_0e6d: sub - IL_0e6e: mul - IL_0e6f: stloc.1 - IL_0e70: ldloc.s V_4 - IL_0e72: ldc.i4.1 - IL_0e73: add - IL_0e74: stloc.s V_4 - IL_0e76: ldloc.s V_5 - IL_0e78: ldc.i4.1 - IL_0e79: sub - IL_0e7a: stloc.s V_5 - IL_0e7c: ldloc.s V_5 - IL_0e7e: ldloc.s V_4 - IL_0e80: ldloc.3 - IL_0e81: ldc.i4.1 - IL_0e82: sub - IL_0e83: mul - IL_0e84: mul - IL_0e85: stloc.s V_5 - IL_0e87: ldloc.2 - IL_0e88: ldc.i4.1 - IL_0e89: sub - IL_0e8a: stloc.2 - IL_0e8b: ldloc.1 - IL_0e8c: ldloc.s V_5 - IL_0e8e: sub - IL_0e8f: stloc.1 - IL_0e90: ldloc.s V_4 - IL_0e92: ldloc.3 - IL_0e93: ldc.i4.2 - IL_0e94: add - IL_0e95: ldloc.2 - IL_0e96: mul - IL_0e97: mul - IL_0e98: stloc.s V_4 - IL_0e9a: ldloc.1 - IL_0e9b: ldc.i4.1 - IL_0e9c: add - IL_0e9d: stloc.1 - IL_0e9e: ldloc.1 - IL_0e9f: ldc.i4.1 - IL_0ea0: sub - IL_0ea1: stloc.1 - IL_0ea2: br.s IL_0edb - IL_0ea4: ldloc.2 - IL_0ea5: ldloc.3 - IL_0ea6: ldloc.s V_4 - IL_0ea8: mul - IL_0ea9: mul - IL_0eaa: stloc.2 - IL_0eab: ldloc.s V_5 - IL_0ead: ldc.i4.1 - IL_0eae: add - IL_0eaf: stloc.s V_5 - IL_0eb1: ldloc.3 - IL_0eb2: ldc.i4.m1 - IL_0eb3: add - IL_0eb4: stloc.3 - IL_0eb5: ldloc.s V_4 - IL_0eb7: ldloc.s V_5 - IL_0eb9: ldloc.1 - IL_0eba: ldc.i4.1 - IL_0ebb: add - IL_0ebc: add - IL_0ebd: mul - IL_0ebe: stloc.s V_4 - IL_0ec0: ldloc.2 - IL_0ec1: ldc.i4.1 - IL_0ec2: add - IL_0ec3: stloc.2 - IL_0ec4: ldloc.1 - IL_0ec5: ldc.i4.2 - IL_0ec6: sub - IL_0ec7: stloc.1 - IL_0ec8: ldloc.2 - IL_0ec9: ldloc.3 - IL_0eca: ldc.i4.1 - IL_0ecb: sub - IL_0ecc: ldloc.s V_4 - IL_0ece: add - IL_0ecf: mul - IL_0ed0: stloc.2 - IL_0ed1: ldloc.s V_5 - IL_0ed3: ldc.i4.1 - IL_0ed4: add - IL_0ed5: stloc.s V_5 - IL_0ed7: ldloc.2 - IL_0ed8: ldc.i4.1 - IL_0ed9: add - IL_0eda: stloc.2 - IL_0edb: ldloc.1 - IL_0edc: ldloc.2 - IL_0edd: ble.s IL_0f19 - IL_0edf: ldloc.1 - IL_0ee0: ldloc.2 - IL_0ee1: ldloc.3 - IL_0ee2: sub - IL_0ee3: add - IL_0ee4: stloc.1 - IL_0ee5: ldloc.s V_4 - IL_0ee7: ldc.i4.1 - IL_0ee8: add - IL_0ee9: stloc.s V_4 - IL_0eeb: ldloc.s V_5 - IL_0eed: ldc.i4.1 - IL_0eee: sub - IL_0eef: stloc.s V_5 - IL_0ef1: ldloc.s V_5 - IL_0ef3: ldloc.s V_4 - IL_0ef5: ldloc.3 - IL_0ef6: ldc.i4.1 - IL_0ef7: sub - IL_0ef8: add - IL_0ef9: add - IL_0efa: stloc.s V_5 - IL_0efc: ldloc.2 - IL_0efd: ldc.i4.1 - IL_0efe: sub - IL_0eff: stloc.2 - IL_0f00: ldloc.1 - IL_0f01: ldloc.s V_5 - IL_0f03: sub - IL_0f04: stloc.1 - IL_0f05: ldloc.s V_4 - IL_0f07: ldloc.3 - IL_0f08: ldc.i4.2 - IL_0f09: add - IL_0f0a: ldloc.2 - IL_0f0b: add - IL_0f0c: add - IL_0f0d: stloc.s V_4 - IL_0f0f: ldloc.1 - IL_0f10: ldc.i4.1 - IL_0f11: add - IL_0f12: stloc.1 - IL_0f13: ldloc.1 - IL_0f14: ldc.i4.1 - IL_0f15: sub - IL_0f16: stloc.1 - IL_0f17: br.s IL_0f50 - IL_0f19: ldloc.2 - IL_0f1a: ldloc.3 - IL_0f1b: ldloc.s V_4 - IL_0f1d: add - IL_0f1e: add - IL_0f1f: stloc.2 - IL_0f20: ldloc.s V_5 - IL_0f22: ldc.i4.1 - IL_0f23: add - IL_0f24: stloc.s V_5 - IL_0f26: ldloc.3 - IL_0f27: ldc.i4.m1 - IL_0f28: add - IL_0f29: stloc.3 - IL_0f2a: ldloc.s V_4 - IL_0f2c: ldloc.s V_5 - IL_0f2e: ldloc.1 - IL_0f2f: ldc.i4.1 - IL_0f30: add - IL_0f31: mul - IL_0f32: add - IL_0f33: stloc.s V_4 - IL_0f35: ldloc.2 - IL_0f36: ldc.i4.1 - IL_0f37: add - IL_0f38: stloc.2 - IL_0f39: ldloc.1 - IL_0f3a: ldc.i4.2 - IL_0f3b: sub - IL_0f3c: stloc.1 - IL_0f3d: ldloc.2 - IL_0f3e: ldloc.3 - IL_0f3f: ldc.i4.1 - IL_0f40: sub - IL_0f41: ldloc.s V_4 - IL_0f43: mul - IL_0f44: add - IL_0f45: stloc.2 - IL_0f46: ldloc.s V_5 - IL_0f48: ldc.i4.1 - IL_0f49: add - IL_0f4a: stloc.s V_5 - IL_0f4c: ldloc.2 - IL_0f4d: ldc.i4.1 - IL_0f4e: add - IL_0f4f: stloc.2 - IL_0f50: ldloc.1 - IL_0f51: ldloc.2 - IL_0f52: beq.s IL_0f8e - IL_0f54: ldloc.1 - IL_0f55: ldloc.2 - IL_0f56: ldloc.3 - IL_0f57: mul - IL_0f58: mul - IL_0f59: stloc.1 - IL_0f5a: ldloc.s V_4 - IL_0f5c: ldc.i4.1 - IL_0f5d: add - IL_0f5e: stloc.s V_4 - IL_0f60: ldloc.s V_5 - IL_0f62: ldc.i4.1 - IL_0f63: sub - IL_0f64: stloc.s V_5 - IL_0f66: ldloc.s V_5 - IL_0f68: ldloc.s V_4 - IL_0f6a: ldloc.3 - IL_0f6b: ldc.i4.1 - IL_0f6c: sub - IL_0f6d: mul - IL_0f6e: mul - IL_0f6f: stloc.s V_5 - IL_0f71: ldloc.2 - IL_0f72: ldc.i4.1 - IL_0f73: sub - IL_0f74: stloc.2 - IL_0f75: ldloc.1 - IL_0f76: ldloc.s V_5 - IL_0f78: sub - IL_0f79: stloc.1 - IL_0f7a: ldloc.s V_4 - IL_0f7c: ldloc.3 - IL_0f7d: ldc.i4.2 - IL_0f7e: add - IL_0f7f: ldloc.2 - IL_0f80: mul - IL_0f81: mul - IL_0f82: stloc.s V_4 - IL_0f84: ldloc.1 - IL_0f85: ldc.i4.1 - IL_0f86: add - IL_0f87: stloc.1 - IL_0f88: ldloc.1 - IL_0f89: ldc.i4.1 - IL_0f8a: sub - IL_0f8b: stloc.1 - IL_0f8c: br.s IL_0fc5 - IL_0f8e: ldloc.2 - IL_0f8f: ldloc.3 - IL_0f90: ldloc.s V_4 - IL_0f92: mul - IL_0f93: mul - IL_0f94: stloc.2 - IL_0f95: ldloc.s V_5 - IL_0f97: ldc.i4.1 - IL_0f98: add - IL_0f99: stloc.s V_5 - IL_0f9b: ldloc.3 - IL_0f9c: ldc.i4.m1 - IL_0f9d: add - IL_0f9e: stloc.3 - IL_0f9f: ldloc.s V_4 - IL_0fa1: ldloc.s V_5 - IL_0fa3: ldloc.1 - IL_0fa4: ldc.i4.1 - IL_0fa5: add - IL_0fa6: sub - IL_0fa7: mul - IL_0fa8: stloc.s V_4 - IL_0faa: ldloc.2 - IL_0fab: ldc.i4.1 - IL_0fac: add - IL_0fad: stloc.2 - IL_0fae: ldloc.1 - IL_0faf: ldc.i4.2 - IL_0fb0: sub - IL_0fb1: stloc.1 - IL_0fb2: ldloc.2 - IL_0fb3: ldloc.3 - IL_0fb4: ldc.i4.1 - IL_0fb5: sub - IL_0fb6: ldloc.s V_4 - IL_0fb8: sub - IL_0fb9: mul - IL_0fba: stloc.2 - IL_0fbb: ldloc.s V_5 - IL_0fbd: ldc.i4.1 - IL_0fbe: add - IL_0fbf: stloc.s V_5 - IL_0fc1: ldloc.2 - IL_0fc2: ldc.i4.1 - IL_0fc3: add - IL_0fc4: stloc.2 - IL_0fc5: ldloc.1 - IL_0fc6: ldloc.2 - IL_0fc7: beq.s IL_1003 - IL_0fc9: ldloc.1 - IL_0fca: ldloc.2 - IL_0fcb: ldloc.3 - IL_0fcc: mul - IL_0fcd: sub - IL_0fce: stloc.1 - IL_0fcf: ldloc.s V_4 - IL_0fd1: ldc.i4.1 - IL_0fd2: add - IL_0fd3: stloc.s V_4 - IL_0fd5: ldloc.s V_5 - IL_0fd7: ldc.i4.1 - IL_0fd8: sub - IL_0fd9: stloc.s V_5 - IL_0fdb: ldloc.s V_5 - IL_0fdd: ldloc.s V_4 - IL_0fdf: ldloc.3 - IL_0fe0: ldc.i4.1 - IL_0fe1: sub - IL_0fe2: mul - IL_0fe3: sub - IL_0fe4: stloc.s V_5 - IL_0fe6: ldloc.2 - IL_0fe7: ldc.i4.1 - IL_0fe8: sub - IL_0fe9: stloc.2 - IL_0fea: ldloc.1 - IL_0feb: ldloc.s V_5 - IL_0fed: sub - IL_0fee: stloc.1 - IL_0fef: ldloc.s V_4 - IL_0ff1: ldloc.3 - IL_0ff2: ldc.i4.2 - IL_0ff3: add - IL_0ff4: ldloc.2 - IL_0ff5: mul - IL_0ff6: add - IL_0ff7: stloc.s V_4 - IL_0ff9: ldloc.1 - IL_0ffa: ldc.i4.1 - IL_0ffb: add - IL_0ffc: stloc.1 - IL_0ffd: ldloc.1 - IL_0ffe: ldc.i4.1 - IL_0fff: sub - IL_1000: stloc.1 - IL_1001: br.s IL_103a - IL_1003: ldloc.2 - IL_1004: ldloc.3 - IL_1005: ldloc.s V_4 - IL_1007: add - IL_1008: sub - IL_1009: stloc.2 - IL_100a: ldloc.s V_5 - IL_100c: ldc.i4.1 - IL_100d: add - IL_100e: stloc.s V_5 - IL_1010: ldloc.3 - IL_1011: ldc.i4.m1 - IL_1012: add - IL_1013: stloc.3 - IL_1014: ldloc.s V_4 - IL_1016: ldloc.s V_5 - IL_1018: ldloc.1 - IL_1019: ldc.i4.1 - IL_101a: add - IL_101b: sub - IL_101c: mul - IL_101d: stloc.s V_4 - IL_101f: ldloc.2 - IL_1020: ldc.i4.1 - IL_1021: add - IL_1022: stloc.2 - IL_1023: ldloc.1 - IL_1024: ldc.i4.2 - IL_1025: sub - IL_1026: stloc.1 - IL_1027: ldloc.2 - IL_1028: ldloc.3 - IL_1029: ldc.i4.1 - IL_102a: sub - IL_102b: ldloc.s V_4 - IL_102d: mul - IL_102e: sub - IL_102f: stloc.2 - IL_1030: ldloc.s V_5 - IL_1032: ldc.i4.1 - IL_1033: add - IL_1034: stloc.s V_5 - IL_1036: ldloc.2 - IL_1037: ldc.i4.1 - IL_1038: add - IL_1039: stloc.2 - IL_103a: ldloc.1 - IL_103b: ldloc.2 - IL_103c: ble.s IL_1078 - IL_103e: ldloc.1 - IL_103f: ldloc.2 - IL_1040: ldloc.3 - IL_1041: mul - IL_1042: mul - IL_1043: stloc.1 - IL_1044: ldloc.s V_4 - IL_1046: ldc.i4.1 - IL_1047: add - IL_1048: stloc.s V_4 - IL_104a: ldloc.s V_5 - IL_104c: ldc.i4.1 - IL_104d: sub - IL_104e: stloc.s V_5 - IL_1050: ldloc.s V_5 - IL_1052: ldloc.s V_4 - IL_1054: ldloc.3 - IL_1055: ldc.i4.1 - IL_1056: sub - IL_1057: add - IL_1058: mul - IL_1059: stloc.s V_5 - IL_105b: ldloc.2 - IL_105c: ldc.i4.1 - IL_105d: sub - IL_105e: stloc.2 - IL_105f: ldloc.1 - IL_1060: ldloc.s V_5 - IL_1062: sub - IL_1063: stloc.1 - IL_1064: ldloc.s V_4 - IL_1066: ldloc.3 - IL_1067: ldc.i4.2 - IL_1068: add - IL_1069: ldloc.2 - IL_106a: add - IL_106b: mul - IL_106c: stloc.s V_4 - IL_106e: ldloc.1 - IL_106f: ldc.i4.1 - IL_1070: add - IL_1071: stloc.1 - IL_1072: ldloc.1 - IL_1073: ldc.i4.1 - IL_1074: sub - IL_1075: stloc.1 - IL_1076: br.s IL_10af - IL_1078: ldloc.2 - IL_1079: ldloc.3 - IL_107a: ldloc.s V_4 - IL_107c: mul - IL_107d: mul - IL_107e: stloc.2 - IL_107f: ldloc.s V_5 - IL_1081: ldc.i4.1 - IL_1082: add - IL_1083: stloc.s V_5 - IL_1085: ldloc.3 - IL_1086: ldc.i4.m1 - IL_1087: add - IL_1088: stloc.3 - IL_1089: ldloc.s V_4 - IL_108b: ldloc.s V_5 - IL_108d: ldloc.1 - IL_108e: ldc.i4.1 - IL_108f: add - IL_1090: mul - IL_1091: add - IL_1092: stloc.s V_4 - IL_1094: ldloc.2 - IL_1095: ldc.i4.1 - IL_1096: add - IL_1097: stloc.2 - IL_1098: ldloc.1 - IL_1099: ldc.i4.2 - IL_109a: sub - IL_109b: stloc.1 - IL_109c: ldloc.2 - IL_109d: ldloc.3 - IL_109e: ldc.i4.1 - IL_109f: sub - IL_10a0: ldloc.s V_4 - IL_10a2: mul - IL_10a3: mul - IL_10a4: stloc.2 - IL_10a5: ldloc.s V_5 - IL_10a7: ldc.i4.1 - IL_10a8: add - IL_10a9: stloc.s V_5 - IL_10ab: ldloc.2 - IL_10ac: ldc.i4.1 - IL_10ad: add - IL_10ae: stloc.2 - IL_10af: ldloc.1 - IL_10b0: ldloc.2 - IL_10b1: bne.un.s IL_10ed - IL_10b3: ldloc.1 - IL_10b4: ldloc.2 - IL_10b5: ldloc.3 - IL_10b6: mul - IL_10b7: sub - IL_10b8: stloc.1 - IL_10b9: ldloc.s V_4 - IL_10bb: ldc.i4.1 - IL_10bc: add - IL_10bd: stloc.s V_4 - IL_10bf: ldloc.s V_5 - IL_10c1: ldc.i4.1 - IL_10c2: sub - IL_10c3: stloc.s V_5 - IL_10c5: ldloc.s V_5 - IL_10c7: ldloc.s V_4 - IL_10c9: ldloc.3 - IL_10ca: ldc.i4.1 - IL_10cb: sub - IL_10cc: sub - IL_10cd: mul - IL_10ce: stloc.s V_5 - IL_10d0: ldloc.2 - IL_10d1: ldc.i4.1 - IL_10d2: sub - IL_10d3: stloc.2 - IL_10d4: ldloc.1 - IL_10d5: ldloc.s V_5 - IL_10d7: sub - IL_10d8: stloc.1 - IL_10d9: ldloc.s V_4 - IL_10db: ldloc.3 - IL_10dc: ldc.i4.2 - IL_10dd: add - IL_10de: ldloc.2 - IL_10df: sub - IL_10e0: add - IL_10e1: stloc.s V_4 - IL_10e3: ldloc.1 - IL_10e4: ldc.i4.1 - IL_10e5: add - IL_10e6: stloc.1 - IL_10e7: ldloc.1 - IL_10e8: ldc.i4.1 - IL_10e9: sub - IL_10ea: stloc.1 - IL_10eb: br.s IL_1124 - IL_10ed: ldloc.2 - IL_10ee: ldloc.3 - IL_10ef: ldloc.s V_4 - IL_10f1: add - IL_10f2: mul - IL_10f3: stloc.2 - IL_10f4: ldloc.s V_5 - IL_10f6: ldc.i4.1 - IL_10f7: add - IL_10f8: stloc.s V_5 - IL_10fa: ldloc.3 - IL_10fb: ldc.i4.m1 - IL_10fc: add - IL_10fd: stloc.3 - IL_10fe: ldloc.s V_4 - IL_1100: ldloc.s V_5 - IL_1102: ldloc.1 - IL_1103: ldc.i4.1 - IL_1104: add - IL_1105: add - IL_1106: sub - IL_1107: stloc.s V_4 - IL_1109: ldloc.2 - IL_110a: ldc.i4.1 - IL_110b: add - IL_110c: stloc.2 - IL_110d: ldloc.1 - IL_110e: ldc.i4.2 - IL_110f: sub - IL_1110: stloc.1 - IL_1111: ldloc.2 - IL_1112: ldloc.3 - IL_1113: ldc.i4.1 - IL_1114: sub - IL_1115: ldloc.s V_4 - IL_1117: add - IL_1118: mul - IL_1119: stloc.2 - IL_111a: ldloc.s V_5 - IL_111c: ldc.i4.1 - IL_111d: add - IL_111e: stloc.s V_5 - IL_1120: ldloc.2 - IL_1121: ldc.i4.1 - IL_1122: add - IL_1123: stloc.2 - IL_1124: ldloc.1 - IL_1125: ldloc.2 - IL_1126: ble.s IL_1162 - IL_1128: ldloc.1 - IL_1129: ldloc.2 - IL_112a: ldloc.3 - IL_112b: sub - IL_112c: mul - IL_112d: stloc.1 - IL_112e: ldloc.s V_4 - IL_1130: ldc.i4.1 - IL_1131: add - IL_1132: stloc.s V_4 - IL_1134: ldloc.s V_5 - IL_1136: ldc.i4.1 - IL_1137: sub - IL_1138: stloc.s V_5 - IL_113a: ldloc.s V_5 - IL_113c: ldloc.s V_4 - IL_113e: ldloc.3 - IL_113f: ldc.i4.1 - IL_1140: sub - IL_1141: add - IL_1142: mul - IL_1143: stloc.s V_5 - IL_1145: ldloc.2 - IL_1146: ldc.i4.1 - IL_1147: sub - IL_1148: stloc.2 - IL_1149: ldloc.1 - IL_114a: ldloc.s V_5 - IL_114c: sub - IL_114d: stloc.1 - IL_114e: ldloc.s V_4 - IL_1150: ldloc.3 - IL_1151: ldc.i4.2 - IL_1152: add - IL_1153: ldloc.2 - IL_1154: add - IL_1155: sub - IL_1156: stloc.s V_4 - IL_1158: ldloc.1 - IL_1159: ldc.i4.1 - IL_115a: add - IL_115b: stloc.1 - IL_115c: ldloc.1 - IL_115d: ldc.i4.1 - IL_115e: sub - IL_115f: stloc.1 - IL_1160: br.s IL_1199 - IL_1162: ldloc.2 - IL_1163: ldloc.3 - IL_1164: ldloc.s V_4 - IL_1166: sub - IL_1167: mul - IL_1168: stloc.2 - IL_1169: ldloc.s V_5 - IL_116b: ldc.i4.1 - IL_116c: add - IL_116d: stloc.s V_5 - IL_116f: ldloc.3 - IL_1170: ldc.i4.m1 - IL_1171: add - IL_1172: stloc.3 - IL_1173: ldloc.s V_4 - IL_1175: ldloc.s V_5 - IL_1177: ldloc.1 - IL_1178: ldc.i4.1 - IL_1179: add - IL_117a: sub - IL_117b: add - IL_117c: stloc.s V_4 - IL_117e: ldloc.2 - IL_117f: ldc.i4.1 - IL_1180: add - IL_1181: stloc.2 - IL_1182: ldloc.1 - IL_1183: ldc.i4.2 - IL_1184: sub - IL_1185: stloc.1 - IL_1186: ldloc.2 - IL_1187: ldloc.3 - IL_1188: ldc.i4.1 - IL_1189: sub - IL_118a: ldloc.s V_4 - IL_118c: add - IL_118d: mul - IL_118e: stloc.2 - IL_118f: ldloc.s V_5 - IL_1191: ldc.i4.1 - IL_1192: add - IL_1193: stloc.s V_5 - IL_1195: ldloc.2 - IL_1196: ldc.i4.1 - IL_1197: add - IL_1198: stloc.2 - IL_1199: ldloc.1 - IL_119a: ldloc.2 - IL_119b: blt.s IL_11d7 - IL_119d: ldloc.1 - IL_119e: ldloc.2 - IL_119f: ldloc.3 - IL_11a0: sub - IL_11a1: sub - IL_11a2: stloc.1 - IL_11a3: ldloc.s V_4 - IL_11a5: ldc.i4.1 - IL_11a6: add - IL_11a7: stloc.s V_4 - IL_11a9: ldloc.s V_5 - IL_11ab: ldc.i4.1 - IL_11ac: sub - IL_11ad: stloc.s V_5 - IL_11af: ldloc.s V_5 - IL_11b1: ldloc.s V_4 - IL_11b3: ldloc.3 - IL_11b4: ldc.i4.1 - IL_11b5: sub - IL_11b6: add - IL_11b7: sub - IL_11b8: stloc.s V_5 - IL_11ba: ldloc.2 - IL_11bb: ldc.i4.1 - IL_11bc: sub - IL_11bd: stloc.2 - IL_11be: ldloc.1 - IL_11bf: ldloc.s V_5 - IL_11c1: sub - IL_11c2: stloc.1 - IL_11c3: ldloc.s V_4 - IL_11c5: ldloc.3 - IL_11c6: ldc.i4.2 - IL_11c7: add - IL_11c8: ldloc.2 - IL_11c9: add - IL_11ca: sub - IL_11cb: stloc.s V_4 - IL_11cd: ldloc.1 - IL_11ce: ldc.i4.1 - IL_11cf: add - IL_11d0: stloc.1 - IL_11d1: ldloc.1 - IL_11d2: ldc.i4.1 - IL_11d3: sub - IL_11d4: stloc.1 - IL_11d5: br.s IL_120e - IL_11d7: ldloc.2 - IL_11d8: ldloc.3 - IL_11d9: ldloc.s V_4 - IL_11db: sub - IL_11dc: sub - IL_11dd: stloc.2 - IL_11de: ldloc.s V_5 - IL_11e0: ldc.i4.1 - IL_11e1: add - IL_11e2: stloc.s V_5 - IL_11e4: ldloc.3 - IL_11e5: ldc.i4.m1 - IL_11e6: add - IL_11e7: stloc.3 - IL_11e8: ldloc.s V_4 - IL_11ea: ldloc.s V_5 - IL_11ec: ldloc.1 - IL_11ed: ldc.i4.1 - IL_11ee: add - IL_11ef: add - IL_11f0: add - IL_11f1: stloc.s V_4 - IL_11f3: ldloc.2 - IL_11f4: ldc.i4.1 - IL_11f5: add - IL_11f6: stloc.2 - IL_11f7: ldloc.1 - IL_11f8: ldc.i4.2 - IL_11f9: sub - IL_11fa: stloc.1 - IL_11fb: ldloc.2 - IL_11fc: ldloc.3 - IL_11fd: ldc.i4.1 - IL_11fe: sub - IL_11ff: ldloc.s V_4 - IL_1201: mul - IL_1202: sub - IL_1203: stloc.2 - IL_1204: ldloc.s V_5 - IL_1206: ldc.i4.1 - IL_1207: add - IL_1208: stloc.s V_5 - IL_120a: ldloc.2 - IL_120b: ldc.i4.1 - IL_120c: add - IL_120d: stloc.2 - IL_120e: ldloc.1 - IL_120f: ldloc.2 - IL_1210: bgt.s IL_124c - IL_1212: ldloc.1 - IL_1213: ldloc.2 - IL_1214: ldloc.3 - IL_1215: sub - IL_1216: sub - IL_1217: stloc.1 - IL_1218: ldloc.s V_4 - IL_121a: ldc.i4.1 - IL_121b: add - IL_121c: stloc.s V_4 - IL_121e: ldloc.s V_5 - IL_1220: ldc.i4.1 - IL_1221: sub - IL_1222: stloc.s V_5 - IL_1224: ldloc.s V_5 - IL_1226: ldloc.s V_4 - IL_1228: ldloc.3 - IL_1229: ldc.i4.1 - IL_122a: sub - IL_122b: sub - IL_122c: sub - IL_122d: stloc.s V_5 - IL_122f: ldloc.2 - IL_1230: ldc.i4.1 - IL_1231: sub - IL_1232: stloc.2 - IL_1233: ldloc.1 - IL_1234: ldloc.s V_5 - IL_1236: sub - IL_1237: stloc.1 - IL_1238: ldloc.s V_4 - IL_123a: ldloc.3 - IL_123b: ldc.i4.2 - IL_123c: add - IL_123d: ldloc.2 - IL_123e: sub - IL_123f: mul - IL_1240: stloc.s V_4 - IL_1242: ldloc.1 - IL_1243: ldc.i4.1 - IL_1244: add - IL_1245: stloc.1 - IL_1246: ldloc.1 - IL_1247: ldc.i4.1 - IL_1248: sub - IL_1249: stloc.1 - IL_124a: br.s IL_1283 - IL_124c: ldloc.2 - IL_124d: ldloc.3 - IL_124e: ldloc.s V_4 - IL_1250: mul - IL_1251: sub - IL_1252: stloc.2 - IL_1253: ldloc.s V_5 - IL_1255: ldc.i4.1 - IL_1256: add - IL_1257: stloc.s V_5 - IL_1259: ldloc.3 - IL_125a: ldc.i4.m1 - IL_125b: add - IL_125c: stloc.3 - IL_125d: ldloc.s V_4 - IL_125f: ldloc.s V_5 - IL_1261: ldloc.1 - IL_1262: ldc.i4.1 - IL_1263: add - IL_1264: mul - IL_1265: sub - IL_1266: stloc.s V_4 - IL_1268: ldloc.2 - IL_1269: ldc.i4.1 - IL_126a: add - IL_126b: stloc.2 - IL_126c: ldloc.1 - IL_126d: ldc.i4.2 - IL_126e: sub - IL_126f: stloc.1 - IL_1270: ldloc.2 - IL_1271: ldloc.3 - IL_1272: ldc.i4.1 - IL_1273: sub - IL_1274: ldloc.s V_4 - IL_1276: add - IL_1277: sub - IL_1278: stloc.2 - IL_1279: ldloc.s V_5 - IL_127b: ldc.i4.1 - IL_127c: add - IL_127d: stloc.s V_5 - IL_127f: ldloc.2 - IL_1280: ldc.i4.1 - IL_1281: add - IL_1282: stloc.2 - IL_1283: ldloc.1 - IL_1284: ldloc.2 - IL_1285: ble.s IL_12c1 - IL_1287: ldloc.1 - IL_1288: ldloc.2 - IL_1289: ldloc.3 - IL_128a: add - IL_128b: mul - IL_128c: stloc.1 - IL_128d: ldloc.s V_4 - IL_128f: ldc.i4.1 - IL_1290: add - IL_1291: stloc.s V_4 - IL_1293: ldloc.s V_5 - IL_1295: ldc.i4.1 - IL_1296: sub - IL_1297: stloc.s V_5 - IL_1299: ldloc.s V_5 - IL_129b: ldloc.s V_4 - IL_129d: ldloc.3 - IL_129e: ldc.i4.1 - IL_129f: sub - IL_12a0: add - IL_12a1: add - IL_12a2: stloc.s V_5 - IL_12a4: ldloc.2 - IL_12a5: ldc.i4.1 - IL_12a6: sub - IL_12a7: stloc.2 - IL_12a8: ldloc.1 - IL_12a9: ldloc.s V_5 - IL_12ab: sub - IL_12ac: stloc.1 - IL_12ad: ldloc.s V_4 - IL_12af: ldloc.3 - IL_12b0: ldc.i4.2 - IL_12b1: add - IL_12b2: ldloc.2 - IL_12b3: add - IL_12b4: sub - IL_12b5: stloc.s V_4 - IL_12b7: ldloc.1 - IL_12b8: ldc.i4.1 - IL_12b9: add - IL_12ba: stloc.1 - IL_12bb: ldloc.1 - IL_12bc: ldc.i4.1 - IL_12bd: sub - IL_12be: stloc.1 - IL_12bf: br.s IL_12f8 - IL_12c1: ldloc.2 - IL_12c2: ldloc.3 - IL_12c3: ldloc.s V_4 - IL_12c5: sub - IL_12c6: add - IL_12c7: stloc.2 - IL_12c8: ldloc.s V_5 - IL_12ca: ldc.i4.1 - IL_12cb: add - IL_12cc: stloc.s V_5 - IL_12ce: ldloc.3 - IL_12cf: ldc.i4.m1 - IL_12d0: add - IL_12d1: stloc.3 - IL_12d2: ldloc.s V_4 - IL_12d4: ldloc.s V_5 - IL_12d6: ldloc.1 - IL_12d7: ldc.i4.1 - IL_12d8: add - IL_12d9: mul - IL_12da: add - IL_12db: stloc.s V_4 - IL_12dd: ldloc.2 - IL_12de: ldc.i4.1 - IL_12df: add - IL_12e0: stloc.2 - IL_12e1: ldloc.1 - IL_12e2: ldc.i4.2 - IL_12e3: sub - IL_12e4: stloc.1 - IL_12e5: ldloc.2 - IL_12e6: ldloc.3 - IL_12e7: ldc.i4.1 - IL_12e8: sub - IL_12e9: ldloc.s V_4 - IL_12eb: sub - IL_12ec: add - IL_12ed: stloc.2 - IL_12ee: ldloc.s V_5 - IL_12f0: ldc.i4.1 - IL_12f1: add - IL_12f2: stloc.s V_5 - IL_12f4: ldloc.2 - IL_12f5: ldc.i4.1 - IL_12f6: add - IL_12f7: stloc.2 - IL_12f8: ldloc.1 - IL_12f9: ldloc.2 - IL_12fa: bge.s IL_1336 - IL_12fc: ldloc.1 - IL_12fd: ldloc.2 - IL_12fe: ldloc.3 - IL_12ff: mul - IL_1300: sub - IL_1301: stloc.1 - IL_1302: ldloc.s V_4 - IL_1304: ldc.i4.1 - IL_1305: add - IL_1306: stloc.s V_4 - IL_1308: ldloc.s V_5 - IL_130a: ldc.i4.1 - IL_130b: sub - IL_130c: stloc.s V_5 - IL_130e: ldloc.s V_5 - IL_1310: ldloc.s V_4 - IL_1312: ldloc.3 - IL_1313: ldc.i4.1 - IL_1314: sub - IL_1315: sub - IL_1316: sub - IL_1317: stloc.s V_5 - IL_1319: ldloc.2 - IL_131a: ldc.i4.1 - IL_131b: sub - IL_131c: stloc.2 - IL_131d: ldloc.1 - IL_131e: ldloc.s V_5 - IL_1320: sub - IL_1321: stloc.1 - IL_1322: ldloc.s V_4 - IL_1324: ldloc.3 - IL_1325: ldc.i4.2 - IL_1326: add - IL_1327: ldloc.2 - IL_1328: sub - IL_1329: add - IL_132a: stloc.s V_4 - IL_132c: ldloc.1 - IL_132d: ldc.i4.1 - IL_132e: add - IL_132f: stloc.1 - IL_1330: ldloc.1 - IL_1331: ldc.i4.1 - IL_1332: sub - IL_1333: stloc.1 - IL_1334: br.s IL_136d - IL_1336: ldloc.2 - IL_1337: ldloc.3 - IL_1338: ldloc.s V_4 - IL_133a: add - IL_133b: sub - IL_133c: stloc.2 - IL_133d: ldloc.s V_5 - IL_133f: ldc.i4.1 - IL_1340: add - IL_1341: stloc.s V_5 - IL_1343: ldloc.3 - IL_1344: ldc.i4.m1 - IL_1345: add - IL_1346: stloc.3 - IL_1347: ldloc.s V_4 - IL_1349: ldloc.s V_5 - IL_134b: ldloc.1 - IL_134c: ldc.i4.1 - IL_134d: add - IL_134e: sub - IL_134f: sub - IL_1350: stloc.s V_4 - IL_1352: ldloc.2 - IL_1353: ldc.i4.1 - IL_1354: add - IL_1355: stloc.2 - IL_1356: ldloc.1 - IL_1357: ldc.i4.2 - IL_1358: sub - IL_1359: stloc.1 - IL_135a: ldloc.2 - IL_135b: ldloc.3 - IL_135c: ldc.i4.1 - IL_135d: sub - IL_135e: ldloc.s V_4 - IL_1360: sub - IL_1361: sub - IL_1362: stloc.2 - IL_1363: ldloc.s V_5 - IL_1365: ldc.i4.1 - IL_1366: add - IL_1367: stloc.s V_5 - IL_1369: ldloc.2 - IL_136a: ldc.i4.1 - IL_136b: add - IL_136c: stloc.2 - IL_136d: ldloc.1 - IL_136e: ldloc.2 - IL_136f: bge.s IL_13ab - IL_1371: ldloc.1 - IL_1372: ldloc.2 - IL_1373: ldloc.3 - IL_1374: sub - IL_1375: sub - IL_1376: stloc.1 - IL_1377: ldloc.s V_4 - IL_1379: ldc.i4.1 - IL_137a: add - IL_137b: stloc.s V_4 - IL_137d: ldloc.s V_5 - IL_137f: ldc.i4.1 - IL_1380: sub - IL_1381: stloc.s V_5 - IL_1383: ldloc.s V_5 - IL_1385: ldloc.s V_4 - IL_1387: ldloc.3 - IL_1388: ldc.i4.1 - IL_1389: sub - IL_138a: add - IL_138b: sub - IL_138c: stloc.s V_5 - IL_138e: ldloc.2 - IL_138f: ldc.i4.1 - IL_1390: sub - IL_1391: stloc.2 - IL_1392: ldloc.1 - IL_1393: ldloc.s V_5 - IL_1395: sub - IL_1396: stloc.1 - IL_1397: ldloc.s V_4 - IL_1399: ldloc.3 - IL_139a: ldc.i4.2 - IL_139b: add - IL_139c: ldloc.2 - IL_139d: add - IL_139e: add - IL_139f: stloc.s V_4 - IL_13a1: ldloc.1 - IL_13a2: ldc.i4.1 - IL_13a3: add - IL_13a4: stloc.1 - IL_13a5: ldloc.1 - IL_13a6: ldc.i4.1 - IL_13a7: sub - IL_13a8: stloc.1 - IL_13a9: br.s IL_13e2 - IL_13ab: ldloc.2 - IL_13ac: ldloc.3 - IL_13ad: ldloc.s V_4 - IL_13af: add - IL_13b0: sub - IL_13b1: stloc.2 - IL_13b2: ldloc.s V_5 - IL_13b4: ldc.i4.1 - IL_13b5: add - IL_13b6: stloc.s V_5 - IL_13b8: ldloc.3 - IL_13b9: ldc.i4.m1 - IL_13ba: add - IL_13bb: stloc.3 - IL_13bc: ldloc.s V_4 - IL_13be: ldloc.s V_5 - IL_13c0: ldloc.1 - IL_13c1: ldc.i4.1 - IL_13c2: add - IL_13c3: sub - IL_13c4: add - IL_13c5: stloc.s V_4 - IL_13c7: ldloc.2 - IL_13c8: ldc.i4.1 - IL_13c9: add - IL_13ca: stloc.2 - IL_13cb: ldloc.1 - IL_13cc: ldc.i4.2 - IL_13cd: sub - IL_13ce: stloc.1 - IL_13cf: ldloc.2 - IL_13d0: ldloc.3 - IL_13d1: ldc.i4.1 - IL_13d2: sub - IL_13d3: ldloc.s V_4 - IL_13d5: add - IL_13d6: sub - IL_13d7: stloc.2 - IL_13d8: ldloc.s V_5 - IL_13da: ldc.i4.1 - IL_13db: add - IL_13dc: stloc.s V_5 - IL_13de: ldloc.2 - IL_13df: ldc.i4.1 - IL_13e0: add - IL_13e1: stloc.2 - IL_13e2: ldloc.1 - IL_13e3: ldloc.2 - IL_13e4: blt.s IL_1420 - IL_13e6: ldloc.1 - IL_13e7: ldloc.2 - IL_13e8: ldloc.3 - IL_13e9: add - IL_13ea: mul - IL_13eb: stloc.1 - IL_13ec: ldloc.s V_4 - IL_13ee: ldc.i4.1 - IL_13ef: add - IL_13f0: stloc.s V_4 - IL_13f2: ldloc.s V_5 - IL_13f4: ldc.i4.1 - IL_13f5: sub - IL_13f6: stloc.s V_5 - IL_13f8: ldloc.s V_5 - IL_13fa: ldloc.s V_4 - IL_13fc: ldloc.3 - IL_13fd: ldc.i4.1 - IL_13fe: sub - IL_13ff: mul - IL_1400: add - IL_1401: stloc.s V_5 - IL_1403: ldloc.2 - IL_1404: ldc.i4.1 - IL_1405: sub - IL_1406: stloc.2 - IL_1407: ldloc.1 - IL_1408: ldloc.s V_5 - IL_140a: sub - IL_140b: stloc.1 - IL_140c: ldloc.s V_4 - IL_140e: ldloc.3 - IL_140f: ldc.i4.2 - IL_1410: add - IL_1411: ldloc.2 - IL_1412: mul - IL_1413: mul - IL_1414: stloc.s V_4 - IL_1416: ldloc.1 - IL_1417: ldc.i4.1 - IL_1418: add - IL_1419: stloc.1 - IL_141a: ldloc.1 - IL_141b: ldc.i4.1 - IL_141c: sub - IL_141d: stloc.1 - IL_141e: br.s IL_1457 - IL_1420: ldloc.2 - IL_1421: ldloc.3 - IL_1422: ldloc.s V_4 - IL_1424: mul - IL_1425: add - IL_1426: stloc.2 - IL_1427: ldloc.s V_5 - IL_1429: ldc.i4.1 - IL_142a: add - IL_142b: stloc.s V_5 - IL_142d: ldloc.3 - IL_142e: ldc.i4.m1 - IL_142f: add - IL_1430: stloc.3 - IL_1431: ldloc.s V_4 - IL_1433: ldloc.s V_5 - IL_1435: ldloc.1 - IL_1436: ldc.i4.1 - IL_1437: add - IL_1438: mul - IL_1439: mul - IL_143a: stloc.s V_4 - IL_143c: ldloc.2 - IL_143d: ldc.i4.1 - IL_143e: add - IL_143f: stloc.2 - IL_1440: ldloc.1 - IL_1441: ldc.i4.2 - IL_1442: sub - IL_1443: stloc.1 - IL_1444: ldloc.2 - IL_1445: ldloc.3 - IL_1446: ldc.i4.1 - IL_1447: sub - IL_1448: ldloc.s V_4 - IL_144a: add - IL_144b: add - IL_144c: stloc.2 - IL_144d: ldloc.s V_5 - IL_144f: ldc.i4.1 - IL_1450: add - IL_1451: stloc.s V_5 - IL_1453: ldloc.2 - IL_1454: ldc.i4.1 - IL_1455: add - IL_1456: stloc.2 - IL_1457: ldloc.1 - IL_1458: ldloc.2 - IL_1459: ble.s IL_1495 - IL_145b: ldloc.1 - IL_145c: ldloc.2 - IL_145d: ldloc.3 - IL_145e: add - IL_145f: sub - IL_1460: stloc.1 - IL_1461: ldloc.s V_4 - IL_1463: ldc.i4.1 - IL_1464: add - IL_1465: stloc.s V_4 - IL_1467: ldloc.s V_5 - IL_1469: ldc.i4.1 - IL_146a: sub - IL_146b: stloc.s V_5 - IL_146d: ldloc.s V_5 - IL_146f: ldloc.s V_4 - IL_1471: ldloc.3 - IL_1472: ldc.i4.1 - IL_1473: sub - IL_1474: sub - IL_1475: sub - IL_1476: stloc.s V_5 - IL_1478: ldloc.2 - IL_1479: ldc.i4.1 - IL_147a: sub - IL_147b: stloc.2 - IL_147c: ldloc.1 - IL_147d: ldloc.s V_5 - IL_147f: sub - IL_1480: stloc.1 - IL_1481: ldloc.s V_4 - IL_1483: ldloc.3 - IL_1484: ldc.i4.2 - IL_1485: add - IL_1486: ldloc.2 - IL_1487: sub - IL_1488: sub - IL_1489: stloc.s V_4 - IL_148b: ldloc.1 - IL_148c: ldc.i4.1 - IL_148d: add - IL_148e: stloc.1 - IL_148f: ldloc.1 - IL_1490: ldc.i4.1 - IL_1491: sub - IL_1492: stloc.1 - IL_1493: br.s IL_14cc - IL_1495: ldloc.2 - IL_1496: ldloc.3 - IL_1497: ldloc.s V_4 - IL_1499: sub - IL_149a: sub - IL_149b: stloc.2 - IL_149c: ldloc.s V_5 - IL_149e: ldc.i4.1 - IL_149f: add - IL_14a0: stloc.s V_5 - IL_14a2: ldloc.3 - IL_14a3: ldc.i4.m1 - IL_14a4: add - IL_14a5: stloc.3 - IL_14a6: ldloc.s V_4 - IL_14a8: ldloc.s V_5 - IL_14aa: ldloc.1 - IL_14ab: ldc.i4.1 - IL_14ac: add - IL_14ad: add - IL_14ae: sub - IL_14af: stloc.s V_4 - IL_14b1: ldloc.2 - IL_14b2: ldc.i4.1 - IL_14b3: add - IL_14b4: stloc.2 - IL_14b5: ldloc.1 - IL_14b6: ldc.i4.2 - IL_14b7: sub - IL_14b8: stloc.1 - IL_14b9: ldloc.2 - IL_14ba: ldloc.3 - IL_14bb: ldc.i4.1 - IL_14bc: sub - IL_14bd: ldloc.s V_4 - IL_14bf: mul - IL_14c0: sub - IL_14c1: stloc.2 - IL_14c2: ldloc.s V_5 - IL_14c4: ldc.i4.1 - IL_14c5: add - IL_14c6: stloc.s V_5 - IL_14c8: ldloc.2 - IL_14c9: ldc.i4.1 - IL_14ca: add - IL_14cb: stloc.2 - IL_14cc: ldloc.1 - IL_14cd: ldloc.2 - IL_14ce: bne.un.s IL_150a - IL_14d0: ldloc.1 - IL_14d1: ldloc.2 - IL_14d2: ldloc.3 - IL_14d3: mul - IL_14d4: mul - IL_14d5: stloc.1 - IL_14d6: ldloc.s V_4 - IL_14d8: ldc.i4.1 - IL_14d9: add - IL_14da: stloc.s V_4 - IL_14dc: ldloc.s V_5 - IL_14de: ldc.i4.1 - IL_14df: sub - IL_14e0: stloc.s V_5 - IL_14e2: ldloc.s V_5 - IL_14e4: ldloc.s V_4 - IL_14e6: ldloc.3 - IL_14e7: ldc.i4.1 - IL_14e8: sub - IL_14e9: mul - IL_14ea: add - IL_14eb: stloc.s V_5 - IL_14ed: ldloc.2 - IL_14ee: ldc.i4.1 - IL_14ef: sub - IL_14f0: stloc.2 - IL_14f1: ldloc.1 - IL_14f2: ldloc.s V_5 - IL_14f4: sub - IL_14f5: stloc.1 - IL_14f6: ldloc.s V_4 - IL_14f8: ldloc.3 - IL_14f9: ldc.i4.2 - IL_14fa: add - IL_14fb: ldloc.2 - IL_14fc: mul - IL_14fd: add - IL_14fe: stloc.s V_4 - IL_1500: ldloc.1 - IL_1501: ldc.i4.1 - IL_1502: add - IL_1503: stloc.1 - IL_1504: ldloc.1 - IL_1505: ldc.i4.1 - IL_1506: sub - IL_1507: stloc.1 - IL_1508: br.s IL_1541 - IL_150a: ldloc.2 - IL_150b: ldloc.3 - IL_150c: ldloc.s V_4 - IL_150e: add - IL_150f: add - IL_1510: stloc.2 - IL_1511: ldloc.s V_5 - IL_1513: ldc.i4.1 - IL_1514: add - IL_1515: stloc.s V_5 - IL_1517: ldloc.3 - IL_1518: ldc.i4.m1 - IL_1519: add - IL_151a: stloc.3 - IL_151b: ldloc.s V_4 - IL_151d: ldloc.s V_5 - IL_151f: ldloc.1 - IL_1520: ldc.i4.1 - IL_1521: add - IL_1522: sub - IL_1523: mul - IL_1524: stloc.s V_4 - IL_1526: ldloc.2 - IL_1527: ldc.i4.1 - IL_1528: add - IL_1529: stloc.2 - IL_152a: ldloc.1 - IL_152b: ldc.i4.2 - IL_152c: sub - IL_152d: stloc.1 - IL_152e: ldloc.2 - IL_152f: ldloc.3 - IL_1530: ldc.i4.1 - IL_1531: sub - IL_1532: ldloc.s V_4 - IL_1534: sub - IL_1535: add - IL_1536: stloc.2 - IL_1537: ldloc.s V_5 - IL_1539: ldc.i4.1 - IL_153a: add - IL_153b: stloc.s V_5 - IL_153d: ldloc.2 - IL_153e: ldc.i4.1 - IL_153f: add - IL_1540: stloc.2 - IL_1541: ldloc.1 - IL_1542: ldloc.2 - IL_1543: bne.un.s IL_157f - IL_1545: ldloc.1 - IL_1546: ldloc.2 - IL_1547: ldloc.3 - IL_1548: mul - IL_1549: add - IL_154a: stloc.1 - IL_154b: ldloc.s V_4 - IL_154d: ldc.i4.1 - IL_154e: add - IL_154f: stloc.s V_4 - IL_1551: ldloc.s V_5 - IL_1553: ldc.i4.1 - IL_1554: sub - IL_1555: stloc.s V_5 - IL_1557: ldloc.s V_5 - IL_1559: ldloc.s V_4 - IL_155b: ldloc.3 - IL_155c: ldc.i4.1 - IL_155d: sub - IL_155e: sub - IL_155f: add - IL_1560: stloc.s V_5 - IL_1562: ldloc.2 - IL_1563: ldc.i4.1 - IL_1564: sub - IL_1565: stloc.2 - IL_1566: ldloc.1 - IL_1567: ldloc.s V_5 - IL_1569: sub - IL_156a: stloc.1 - IL_156b: ldloc.s V_4 - IL_156d: ldloc.3 - IL_156e: ldc.i4.2 - IL_156f: add - IL_1570: ldloc.2 - IL_1571: sub - IL_1572: add - IL_1573: stloc.s V_4 - IL_1575: ldloc.1 - IL_1576: ldc.i4.1 - IL_1577: add - IL_1578: stloc.1 - IL_1579: ldloc.1 - IL_157a: ldc.i4.1 - IL_157b: sub - IL_157c: stloc.1 - IL_157d: br.s IL_15b6 - IL_157f: ldloc.2 - IL_1580: ldloc.3 - IL_1581: ldloc.s V_4 - IL_1583: add - IL_1584: add - IL_1585: stloc.2 - IL_1586: ldloc.s V_5 - IL_1588: ldc.i4.1 - IL_1589: add - IL_158a: stloc.s V_5 - IL_158c: ldloc.3 - IL_158d: ldc.i4.m1 - IL_158e: add - IL_158f: stloc.3 - IL_1590: ldloc.s V_4 - IL_1592: ldloc.s V_5 - IL_1594: ldloc.1 - IL_1595: ldc.i4.1 - IL_1596: add - IL_1597: mul - IL_1598: sub - IL_1599: stloc.s V_4 - IL_159b: ldloc.2 - IL_159c: ldc.i4.1 - IL_159d: add - IL_159e: stloc.2 - IL_159f: ldloc.1 - IL_15a0: ldc.i4.2 - IL_15a1: sub - IL_15a2: stloc.1 - IL_15a3: ldloc.2 - IL_15a4: ldloc.3 - IL_15a5: ldc.i4.1 - IL_15a6: sub - IL_15a7: ldloc.s V_4 - IL_15a9: mul - IL_15aa: add - IL_15ab: stloc.2 - IL_15ac: ldloc.s V_5 - IL_15ae: ldc.i4.1 - IL_15af: add - IL_15b0: stloc.s V_5 - IL_15b2: ldloc.2 - IL_15b3: ldc.i4.1 - IL_15b4: add - IL_15b5: stloc.2 - IL_15b6: ldloc.1 - IL_15b7: ldloc.2 - IL_15b8: blt.s IL_15f4 - IL_15ba: ldloc.1 - IL_15bb: ldloc.2 - IL_15bc: ldloc.3 - IL_15bd: add - IL_15be: add - IL_15bf: stloc.1 - IL_15c0: ldloc.s V_4 - IL_15c2: ldc.i4.1 - IL_15c3: add - IL_15c4: stloc.s V_4 - IL_15c6: ldloc.s V_5 - IL_15c8: ldc.i4.1 - IL_15c9: sub - IL_15ca: stloc.s V_5 - IL_15cc: ldloc.s V_5 - IL_15ce: ldloc.s V_4 - IL_15d0: ldloc.3 - IL_15d1: ldc.i4.1 - IL_15d2: sub - IL_15d3: add - IL_15d4: mul - IL_15d5: stloc.s V_5 - IL_15d7: ldloc.2 - IL_15d8: ldc.i4.1 - IL_15d9: sub - IL_15da: stloc.2 - IL_15db: ldloc.1 - IL_15dc: ldloc.s V_5 - IL_15de: sub - IL_15df: stloc.1 - IL_15e0: ldloc.s V_4 - IL_15e2: ldloc.3 - IL_15e3: ldc.i4.2 - IL_15e4: add - IL_15e5: ldloc.2 - IL_15e6: add - IL_15e7: sub - IL_15e8: stloc.s V_4 - IL_15ea: ldloc.1 - IL_15eb: ldc.i4.1 - IL_15ec: add - IL_15ed: stloc.1 - IL_15ee: ldloc.1 - IL_15ef: ldc.i4.1 - IL_15f0: sub - IL_15f1: stloc.1 - IL_15f2: br.s IL_162b - IL_15f4: ldloc.2 - IL_15f5: ldloc.3 - IL_15f6: ldloc.s V_4 - IL_15f8: sub - IL_15f9: mul - IL_15fa: stloc.2 - IL_15fb: ldloc.s V_5 - IL_15fd: ldc.i4.1 - IL_15fe: add - IL_15ff: stloc.s V_5 - IL_1601: ldloc.3 - IL_1602: ldc.i4.m1 - IL_1603: add - IL_1604: stloc.3 - IL_1605: ldloc.s V_4 - IL_1607: ldloc.s V_5 - IL_1609: ldloc.1 - IL_160a: ldc.i4.1 - IL_160b: add - IL_160c: mul - IL_160d: add - IL_160e: stloc.s V_4 - IL_1610: ldloc.2 - IL_1611: ldc.i4.1 - IL_1612: add - IL_1613: stloc.2 - IL_1614: ldloc.1 - IL_1615: ldc.i4.2 - IL_1616: sub - IL_1617: stloc.1 - IL_1618: ldloc.2 - IL_1619: ldloc.3 - IL_161a: ldc.i4.1 - IL_161b: sub - IL_161c: ldloc.s V_4 - IL_161e: sub - IL_161f: mul - IL_1620: stloc.2 - IL_1621: ldloc.s V_5 - IL_1623: ldc.i4.1 - IL_1624: add - IL_1625: stloc.s V_5 - IL_1627: ldloc.2 - IL_1628: ldc.i4.1 - IL_1629: add - IL_162a: stloc.2 - IL_162b: ldloc.1 - IL_162c: ldloc.2 - IL_162d: blt.s IL_1669 - IL_162f: ldloc.1 - IL_1630: ldloc.2 - IL_1631: ldloc.3 - IL_1632: mul - IL_1633: sub - IL_1634: stloc.1 - IL_1635: ldloc.s V_4 - IL_1637: ldc.i4.1 - IL_1638: add - IL_1639: stloc.s V_4 - IL_163b: ldloc.s V_5 - IL_163d: ldc.i4.1 - IL_163e: sub - IL_163f: stloc.s V_5 - IL_1641: ldloc.s V_5 - IL_1643: ldloc.s V_4 - IL_1645: ldloc.3 - IL_1646: ldc.i4.1 - IL_1647: sub - IL_1648: sub - IL_1649: mul - IL_164a: stloc.s V_5 - IL_164c: ldloc.2 - IL_164d: ldc.i4.1 - IL_164e: sub - IL_164f: stloc.2 - IL_1650: ldloc.1 - IL_1651: ldloc.s V_5 - IL_1653: sub - IL_1654: stloc.1 - IL_1655: ldloc.s V_4 - IL_1657: ldloc.3 - IL_1658: ldc.i4.2 - IL_1659: add - IL_165a: ldloc.2 - IL_165b: sub - IL_165c: add - IL_165d: stloc.s V_4 - IL_165f: ldloc.1 - IL_1660: ldc.i4.1 - IL_1661: add - IL_1662: stloc.1 - IL_1663: ldloc.1 - IL_1664: ldc.i4.1 - IL_1665: sub - IL_1666: stloc.1 - IL_1667: br.s IL_16a0 - IL_1669: ldloc.2 - IL_166a: ldloc.3 - IL_166b: ldloc.s V_4 - IL_166d: add - IL_166e: mul - IL_166f: stloc.2 - IL_1670: ldloc.s V_5 - IL_1672: ldc.i4.1 - IL_1673: add - IL_1674: stloc.s V_5 - IL_1676: ldloc.3 - IL_1677: ldc.i4.m1 - IL_1678: add - IL_1679: stloc.3 - IL_167a: ldloc.s V_4 - IL_167c: ldloc.s V_5 - IL_167e: ldloc.1 - IL_167f: ldc.i4.1 - IL_1680: add - IL_1681: mul - IL_1682: sub - IL_1683: stloc.s V_4 - IL_1685: ldloc.2 - IL_1686: ldc.i4.1 - IL_1687: add - IL_1688: stloc.2 - IL_1689: ldloc.1 - IL_168a: ldc.i4.2 - IL_168b: sub - IL_168c: stloc.1 - IL_168d: ldloc.2 - IL_168e: ldloc.3 - IL_168f: ldc.i4.1 - IL_1690: sub - IL_1691: ldloc.s V_4 - IL_1693: mul - IL_1694: mul - IL_1695: stloc.2 - IL_1696: ldloc.s V_5 - IL_1698: ldc.i4.1 - IL_1699: add - IL_169a: stloc.s V_5 - IL_169c: ldloc.2 - IL_169d: ldc.i4.1 - IL_169e: add - IL_169f: stloc.2 - IL_16a0: ldloc.1 - IL_16a1: ldloc.2 - IL_16a2: bgt.s IL_16de - IL_16a4: ldloc.1 - IL_16a5: ldloc.2 - IL_16a6: ldloc.3 - IL_16a7: add - IL_16a8: sub - IL_16a9: stloc.1 - IL_16aa: ldloc.s V_4 - IL_16ac: ldc.i4.1 - IL_16ad: add - IL_16ae: stloc.s V_4 - IL_16b0: ldloc.s V_5 - IL_16b2: ldc.i4.1 - IL_16b3: sub - IL_16b4: stloc.s V_5 - IL_16b6: ldloc.s V_5 - IL_16b8: ldloc.s V_4 - IL_16ba: ldloc.3 - IL_16bb: ldc.i4.1 - IL_16bc: sub - IL_16bd: mul - IL_16be: mul - IL_16bf: stloc.s V_5 - IL_16c1: ldloc.2 - IL_16c2: ldc.i4.1 - IL_16c3: sub - IL_16c4: stloc.2 - IL_16c5: ldloc.1 - IL_16c6: ldloc.s V_5 - IL_16c8: sub - IL_16c9: stloc.1 - IL_16ca: ldloc.s V_4 - IL_16cc: ldloc.3 - IL_16cd: ldc.i4.2 - IL_16ce: add - IL_16cf: ldloc.2 - IL_16d0: mul - IL_16d1: sub - IL_16d2: stloc.s V_4 - IL_16d4: ldloc.1 - IL_16d5: ldc.i4.1 - IL_16d6: add - IL_16d7: stloc.1 - IL_16d8: ldloc.1 - IL_16d9: ldc.i4.1 - IL_16da: sub - IL_16db: stloc.1 - IL_16dc: br.s IL_1715 - IL_16de: ldloc.2 - IL_16df: ldloc.3 - IL_16e0: ldloc.s V_4 - IL_16e2: sub - IL_16e3: mul - IL_16e4: stloc.2 - IL_16e5: ldloc.s V_5 - IL_16e7: ldc.i4.1 - IL_16e8: add - IL_16e9: stloc.s V_5 - IL_16eb: ldloc.3 - IL_16ec: ldc.i4.m1 - IL_16ed: add - IL_16ee: stloc.3 - IL_16ef: ldloc.s V_4 - IL_16f1: ldloc.s V_5 - IL_16f3: ldloc.1 - IL_16f4: ldc.i4.1 - IL_16f5: add - IL_16f6: add - IL_16f7: mul - IL_16f8: stloc.s V_4 - IL_16fa: ldloc.2 - IL_16fb: ldc.i4.1 - IL_16fc: add - IL_16fd: stloc.2 - IL_16fe: ldloc.1 - IL_16ff: ldc.i4.2 - IL_1700: sub - IL_1701: stloc.1 - IL_1702: ldloc.2 - IL_1703: ldloc.3 - IL_1704: ldc.i4.1 - IL_1705: sub - IL_1706: ldloc.s V_4 - IL_1708: add - IL_1709: mul - IL_170a: stloc.2 - IL_170b: ldloc.s V_5 - IL_170d: ldc.i4.1 - IL_170e: add - IL_170f: stloc.s V_5 - IL_1711: ldloc.2 - IL_1712: ldc.i4.1 - IL_1713: add - IL_1714: stloc.2 - IL_1715: ldloc.1 - IL_1716: ldloc.2 - IL_1717: blt.s IL_1753 - IL_1719: ldloc.1 - IL_171a: ldloc.2 - IL_171b: ldloc.3 - IL_171c: sub - IL_171d: sub - IL_171e: stloc.1 - IL_171f: ldloc.s V_4 - IL_1721: ldc.i4.1 - IL_1722: add - IL_1723: stloc.s V_4 - IL_1725: ldloc.s V_5 - IL_1727: ldc.i4.1 - IL_1728: sub - IL_1729: stloc.s V_5 - IL_172b: ldloc.s V_5 - IL_172d: ldloc.s V_4 - IL_172f: ldloc.3 - IL_1730: ldc.i4.1 - IL_1731: sub - IL_1732: sub - IL_1733: sub - IL_1734: stloc.s V_5 - IL_1736: ldloc.2 - IL_1737: ldc.i4.1 - IL_1738: sub - IL_1739: stloc.2 - IL_173a: ldloc.1 - IL_173b: ldloc.s V_5 - IL_173d: sub - IL_173e: stloc.1 - IL_173f: ldloc.s V_4 - IL_1741: ldloc.3 - IL_1742: ldc.i4.2 - IL_1743: add - IL_1744: ldloc.2 - IL_1745: sub - IL_1746: add - IL_1747: stloc.s V_4 - IL_1749: ldloc.1 - IL_174a: ldc.i4.1 - IL_174b: add - IL_174c: stloc.1 - IL_174d: ldloc.1 - IL_174e: ldc.i4.1 - IL_174f: sub - IL_1750: stloc.1 - IL_1751: br.s IL_178a - IL_1753: ldloc.2 - IL_1754: ldloc.3 - IL_1755: ldloc.s V_4 - IL_1757: add - IL_1758: sub - IL_1759: stloc.2 - IL_175a: ldloc.s V_5 - IL_175c: ldc.i4.1 - IL_175d: add - IL_175e: stloc.s V_5 - IL_1760: ldloc.3 - IL_1761: ldc.i4.m1 - IL_1762: add - IL_1763: stloc.3 - IL_1764: ldloc.s V_4 - IL_1766: ldloc.s V_5 - IL_1768: ldloc.1 - IL_1769: ldc.i4.1 - IL_176a: add - IL_176b: sub - IL_176c: sub - IL_176d: stloc.s V_4 - IL_176f: ldloc.2 - IL_1770: ldc.i4.1 - IL_1771: add - IL_1772: stloc.2 - IL_1773: ldloc.1 - IL_1774: ldc.i4.2 - IL_1775: sub - IL_1776: stloc.1 - IL_1777: ldloc.2 - IL_1778: ldloc.3 - IL_1779: ldc.i4.1 - IL_177a: sub - IL_177b: ldloc.s V_4 - IL_177d: mul - IL_177e: sub - IL_177f: stloc.2 - IL_1780: ldloc.s V_5 - IL_1782: ldc.i4.1 - IL_1783: add - IL_1784: stloc.s V_5 - IL_1786: ldloc.2 - IL_1787: ldc.i4.1 - IL_1788: add - IL_1789: stloc.2 - IL_178a: ldloc.1 - IL_178b: ldloc.2 - IL_178c: beq.s IL_17c8 - IL_178e: ldloc.1 - IL_178f: ldloc.2 - IL_1790: ldloc.3 - IL_1791: sub - IL_1792: sub - IL_1793: stloc.1 - IL_1794: ldloc.s V_4 - IL_1796: ldc.i4.1 - IL_1797: add - IL_1798: stloc.s V_4 - IL_179a: ldloc.s V_5 - IL_179c: ldc.i4.1 - IL_179d: sub - IL_179e: stloc.s V_5 - IL_17a0: ldloc.s V_5 - IL_17a2: ldloc.s V_4 - IL_17a4: ldloc.3 - IL_17a5: ldc.i4.1 - IL_17a6: sub - IL_17a7: mul - IL_17a8: mul - IL_17a9: stloc.s V_5 - IL_17ab: ldloc.2 - IL_17ac: ldc.i4.1 - IL_17ad: sub - IL_17ae: stloc.2 - IL_17af: ldloc.1 - IL_17b0: ldloc.s V_5 - IL_17b2: sub - IL_17b3: stloc.1 - IL_17b4: ldloc.s V_4 - IL_17b6: ldloc.3 - IL_17b7: ldc.i4.2 - IL_17b8: add - IL_17b9: ldloc.2 - IL_17ba: mul - IL_17bb: mul - IL_17bc: stloc.s V_4 - IL_17be: ldloc.1 - IL_17bf: ldc.i4.1 - IL_17c0: add - IL_17c1: stloc.1 - IL_17c2: ldloc.1 - IL_17c3: ldc.i4.1 - IL_17c4: sub - IL_17c5: stloc.1 - IL_17c6: br.s IL_17ff - IL_17c8: ldloc.2 - IL_17c9: ldloc.3 - IL_17ca: ldloc.s V_4 - IL_17cc: mul - IL_17cd: mul - IL_17ce: stloc.2 - IL_17cf: ldloc.s V_5 - IL_17d1: ldc.i4.1 - IL_17d2: add - IL_17d3: stloc.s V_5 - IL_17d5: ldloc.3 - IL_17d6: ldc.i4.m1 - IL_17d7: add - IL_17d8: stloc.3 - IL_17d9: ldloc.s V_4 - IL_17db: ldloc.s V_5 - IL_17dd: ldloc.1 - IL_17de: ldc.i4.1 - IL_17df: add - IL_17e0: mul - IL_17e1: mul - IL_17e2: stloc.s V_4 - IL_17e4: ldloc.2 - IL_17e5: ldc.i4.1 - IL_17e6: add - IL_17e7: stloc.2 - IL_17e8: ldloc.1 - IL_17e9: ldc.i4.2 - IL_17ea: sub - IL_17eb: stloc.1 - IL_17ec: ldloc.2 - IL_17ed: ldloc.3 - IL_17ee: ldc.i4.1 - IL_17ef: sub - IL_17f0: ldloc.s V_4 - IL_17f2: add - IL_17f3: mul - IL_17f4: stloc.2 - IL_17f5: ldloc.s V_5 - IL_17f7: ldc.i4.1 - IL_17f8: add - IL_17f9: stloc.s V_5 - IL_17fb: ldloc.2 - IL_17fc: ldc.i4.1 - IL_17fd: add - IL_17fe: stloc.2 - IL_17ff: ldloc.1 - IL_1800: ldloc.2 - IL_1801: ble.s IL_183d - IL_1803: ldloc.1 - IL_1804: ldloc.2 - IL_1805: ldloc.3 - IL_1806: sub - IL_1807: mul - IL_1808: stloc.1 - IL_1809: ldloc.s V_4 - IL_180b: ldc.i4.1 - IL_180c: add - IL_180d: stloc.s V_4 - IL_180f: ldloc.s V_5 - IL_1811: ldc.i4.1 - IL_1812: sub - IL_1813: stloc.s V_5 - IL_1815: ldloc.s V_5 - IL_1817: ldloc.s V_4 - IL_1819: ldloc.3 - IL_181a: ldc.i4.1 - IL_181b: sub - IL_181c: sub - IL_181d: sub - IL_181e: stloc.s V_5 - IL_1820: ldloc.2 - IL_1821: ldc.i4.1 - IL_1822: sub - IL_1823: stloc.2 - IL_1824: ldloc.1 - IL_1825: ldloc.s V_5 - IL_1827: sub - IL_1828: stloc.1 - IL_1829: ldloc.s V_4 - IL_182b: ldloc.3 - IL_182c: ldc.i4.2 - IL_182d: add - IL_182e: ldloc.2 - IL_182f: sub - IL_1830: sub - IL_1831: stloc.s V_4 - IL_1833: ldloc.1 - IL_1834: ldc.i4.1 - IL_1835: add - IL_1836: stloc.1 - IL_1837: ldloc.1 - IL_1838: ldc.i4.1 - IL_1839: sub - IL_183a: stloc.1 - IL_183b: br.s IL_1874 - IL_183d: ldloc.2 - IL_183e: ldloc.3 - IL_183f: ldloc.s V_4 - IL_1841: sub - IL_1842: sub - IL_1843: stloc.2 - IL_1844: ldloc.s V_5 - IL_1846: ldc.i4.1 - IL_1847: add - IL_1848: stloc.s V_5 - IL_184a: ldloc.3 - IL_184b: ldc.i4.m1 - IL_184c: add - IL_184d: stloc.3 - IL_184e: ldloc.s V_4 - IL_1850: ldloc.s V_5 - IL_1852: ldloc.1 - IL_1853: ldc.i4.1 - IL_1854: add - IL_1855: mul - IL_1856: sub - IL_1857: stloc.s V_4 - IL_1859: ldloc.2 - IL_185a: ldc.i4.1 - IL_185b: add - IL_185c: stloc.2 - IL_185d: ldloc.1 - IL_185e: ldc.i4.2 - IL_185f: sub - IL_1860: stloc.1 - IL_1861: ldloc.2 - IL_1862: ldloc.3 - IL_1863: ldc.i4.1 - IL_1864: sub - IL_1865: ldloc.s V_4 - IL_1867: sub - IL_1868: sub - IL_1869: stloc.2 - IL_186a: ldloc.s V_5 - IL_186c: ldc.i4.1 - IL_186d: add - IL_186e: stloc.s V_5 - IL_1870: ldloc.2 - IL_1871: ldc.i4.1 - IL_1872: add - IL_1873: stloc.2 - IL_1874: ldloc.1 - IL_1875: ldloc.2 - IL_1876: bge.s IL_18b2 - IL_1878: ldloc.1 - IL_1879: ldloc.2 - IL_187a: ldloc.3 - IL_187b: add - IL_187c: sub - IL_187d: stloc.1 - IL_187e: ldloc.s V_4 - IL_1880: ldc.i4.1 - IL_1881: add - IL_1882: stloc.s V_4 - IL_1884: ldloc.s V_5 - IL_1886: ldc.i4.1 - IL_1887: sub - IL_1888: stloc.s V_5 - IL_188a: ldloc.s V_5 - IL_188c: ldloc.s V_4 - IL_188e: ldloc.3 - IL_188f: ldc.i4.1 - IL_1890: sub - IL_1891: add - IL_1892: add - IL_1893: stloc.s V_5 - IL_1895: ldloc.2 - IL_1896: ldc.i4.1 - IL_1897: sub - IL_1898: stloc.2 - IL_1899: ldloc.1 - IL_189a: ldloc.s V_5 - IL_189c: sub - IL_189d: stloc.1 - IL_189e: ldloc.s V_4 - IL_18a0: ldloc.3 - IL_18a1: ldc.i4.2 - IL_18a2: add - IL_18a3: ldloc.2 - IL_18a4: add - IL_18a5: sub - IL_18a6: stloc.s V_4 - IL_18a8: ldloc.1 - IL_18a9: ldc.i4.1 - IL_18aa: add - IL_18ab: stloc.1 - IL_18ac: ldloc.1 - IL_18ad: ldc.i4.1 - IL_18ae: sub - IL_18af: stloc.1 - IL_18b0: br.s IL_18e9 - IL_18b2: ldloc.2 - IL_18b3: ldloc.3 - IL_18b4: ldloc.s V_4 - IL_18b6: sub - IL_18b7: add - IL_18b8: stloc.2 - IL_18b9: ldloc.s V_5 - IL_18bb: ldc.i4.1 - IL_18bc: add - IL_18bd: stloc.s V_5 - IL_18bf: ldloc.3 - IL_18c0: ldc.i4.m1 - IL_18c1: add - IL_18c2: stloc.3 - IL_18c3: ldloc.s V_4 - IL_18c5: ldloc.s V_5 - IL_18c7: ldloc.1 - IL_18c8: ldc.i4.1 - IL_18c9: add - IL_18ca: add - IL_18cb: add - IL_18cc: stloc.s V_4 - IL_18ce: ldloc.2 - IL_18cf: ldc.i4.1 - IL_18d0: add - IL_18d1: stloc.2 - IL_18d2: ldloc.1 - IL_18d3: ldc.i4.2 - IL_18d4: sub - IL_18d5: stloc.1 - IL_18d6: ldloc.2 - IL_18d7: ldloc.3 - IL_18d8: ldc.i4.1 - IL_18d9: sub - IL_18da: ldloc.s V_4 - IL_18dc: mul - IL_18dd: add - IL_18de: stloc.2 - IL_18df: ldloc.s V_5 - IL_18e1: ldc.i4.1 - IL_18e2: add - IL_18e3: stloc.s V_5 - IL_18e5: ldloc.2 - IL_18e6: ldc.i4.1 - IL_18e7: add - IL_18e8: stloc.2 - IL_18e9: ldloc.1 - IL_18ea: ldloc.2 - IL_18eb: bne.un.s IL_1927 - IL_18ed: ldloc.1 - IL_18ee: ldloc.2 - IL_18ef: ldloc.3 - IL_18f0: sub - IL_18f1: mul - IL_18f2: stloc.1 - IL_18f3: ldloc.s V_4 - IL_18f5: ldc.i4.1 - IL_18f6: add - IL_18f7: stloc.s V_4 - IL_18f9: ldloc.s V_5 - IL_18fb: ldc.i4.1 - IL_18fc: sub - IL_18fd: stloc.s V_5 - IL_18ff: ldloc.s V_5 - IL_1901: ldloc.s V_4 - IL_1903: ldloc.3 - IL_1904: ldc.i4.1 - IL_1905: sub - IL_1906: add - IL_1907: mul - IL_1908: stloc.s V_5 - IL_190a: ldloc.2 - IL_190b: ldc.i4.1 - IL_190c: sub - IL_190d: stloc.2 - IL_190e: ldloc.1 - IL_190f: ldloc.s V_5 - IL_1911: sub - IL_1912: stloc.1 - IL_1913: ldloc.s V_4 - IL_1915: ldloc.3 - IL_1916: ldc.i4.2 - IL_1917: add - IL_1918: ldloc.2 - IL_1919: add - IL_191a: add - IL_191b: stloc.s V_4 - IL_191d: ldloc.1 - IL_191e: ldc.i4.1 - IL_191f: add - IL_1920: stloc.1 - IL_1921: ldloc.1 - IL_1922: ldc.i4.1 - IL_1923: sub - IL_1924: stloc.1 - IL_1925: br.s IL_195e - IL_1927: ldloc.2 - IL_1928: ldloc.3 - IL_1929: ldloc.s V_4 - IL_192b: add - IL_192c: mul - IL_192d: stloc.2 - IL_192e: ldloc.s V_5 - IL_1930: ldc.i4.1 - IL_1931: add - IL_1932: stloc.s V_5 - IL_1934: ldloc.3 - IL_1935: ldc.i4.m1 - IL_1936: add - IL_1937: stloc.3 - IL_1938: ldloc.s V_4 - IL_193a: ldloc.s V_5 - IL_193c: ldloc.1 - IL_193d: ldc.i4.1 - IL_193e: add - IL_193f: mul - IL_1940: add - IL_1941: stloc.s V_4 - IL_1943: ldloc.2 - IL_1944: ldc.i4.1 - IL_1945: add - IL_1946: stloc.2 - IL_1947: ldloc.1 - IL_1948: ldc.i4.2 - IL_1949: sub - IL_194a: stloc.1 - IL_194b: ldloc.2 - IL_194c: ldloc.3 - IL_194d: ldc.i4.1 - IL_194e: sub - IL_194f: ldloc.s V_4 - IL_1951: add - IL_1952: mul - IL_1953: stloc.2 - IL_1954: ldloc.s V_5 - IL_1956: ldc.i4.1 - IL_1957: add - IL_1958: stloc.s V_5 - IL_195a: ldloc.2 - IL_195b: ldc.i4.1 - IL_195c: add - IL_195d: stloc.2 - IL_195e: ldloc.1 - IL_195f: ldloc.2 - IL_1960: bne.un.s IL_199c - IL_1962: ldloc.1 - IL_1963: ldloc.2 - IL_1964: ldloc.3 - IL_1965: add - IL_1966: mul - IL_1967: stloc.1 - IL_1968: ldloc.s V_4 - IL_196a: ldc.i4.1 - IL_196b: add - IL_196c: stloc.s V_4 - IL_196e: ldloc.s V_5 - IL_1970: ldc.i4.1 - IL_1971: sub - IL_1972: stloc.s V_5 - IL_1974: ldloc.s V_5 - IL_1976: ldloc.s V_4 - IL_1978: ldloc.3 - IL_1979: ldc.i4.1 - IL_197a: sub - IL_197b: sub - IL_197c: add - IL_197d: stloc.s V_5 - IL_197f: ldloc.2 - IL_1980: ldc.i4.1 - IL_1981: sub - IL_1982: stloc.2 - IL_1983: ldloc.1 - IL_1984: ldloc.s V_5 - IL_1986: sub - IL_1987: stloc.1 - IL_1988: ldloc.s V_4 - IL_198a: ldloc.3 - IL_198b: ldc.i4.2 - IL_198c: add - IL_198d: ldloc.2 - IL_198e: sub - IL_198f: sub - IL_1990: stloc.s V_4 - IL_1992: ldloc.1 - IL_1993: ldc.i4.1 - IL_1994: add - IL_1995: stloc.1 - IL_1996: ldloc.1 - IL_1997: ldc.i4.1 - IL_1998: sub - IL_1999: stloc.1 - IL_199a: br.s IL_19d3 - IL_199c: ldloc.2 - IL_199d: ldloc.3 - IL_199e: ldloc.s V_4 - IL_19a0: sub - IL_19a1: add - IL_19a2: stloc.2 - IL_19a3: ldloc.s V_5 - IL_19a5: ldc.i4.1 - IL_19a6: add - IL_19a7: stloc.s V_5 - IL_19a9: ldloc.3 - IL_19aa: ldc.i4.m1 - IL_19ab: add - IL_19ac: stloc.3 - IL_19ad: ldloc.s V_4 - IL_19af: ldloc.s V_5 - IL_19b1: ldloc.1 - IL_19b2: ldc.i4.1 - IL_19b3: add - IL_19b4: add - IL_19b5: sub - IL_19b6: stloc.s V_4 - IL_19b8: ldloc.2 - IL_19b9: ldc.i4.1 - IL_19ba: add - IL_19bb: stloc.2 - IL_19bc: ldloc.1 - IL_19bd: ldc.i4.2 - IL_19be: sub - IL_19bf: stloc.1 - IL_19c0: ldloc.2 - IL_19c1: ldloc.3 - IL_19c2: ldc.i4.1 - IL_19c3: sub - IL_19c4: ldloc.s V_4 - IL_19c6: sub - IL_19c7: add - IL_19c8: stloc.2 - IL_19c9: ldloc.s V_5 - IL_19cb: ldc.i4.1 - IL_19cc: add - IL_19cd: stloc.s V_5 - IL_19cf: ldloc.2 - IL_19d0: ldc.i4.1 - IL_19d1: add - IL_19d2: stloc.2 - IL_19d3: ldloc.1 - IL_19d4: ldloc.2 - IL_19d5: bne.un.s IL_1a11 - IL_19d7: ldloc.1 - IL_19d8: ldloc.2 - IL_19d9: ldloc.3 - IL_19da: mul - IL_19db: mul - IL_19dc: stloc.1 - IL_19dd: ldloc.s V_4 - IL_19df: ldc.i4.1 - IL_19e0: add - IL_19e1: stloc.s V_4 - IL_19e3: ldloc.s V_5 - IL_19e5: ldc.i4.1 - IL_19e6: sub - IL_19e7: stloc.s V_5 - IL_19e9: ldloc.s V_5 - IL_19eb: ldloc.s V_4 - IL_19ed: ldloc.3 - IL_19ee: ldc.i4.1 - IL_19ef: sub - IL_19f0: add - IL_19f1: add - IL_19f2: stloc.s V_5 - IL_19f4: ldloc.2 - IL_19f5: ldc.i4.1 - IL_19f6: sub - IL_19f7: stloc.2 - IL_19f8: ldloc.1 - IL_19f9: ldloc.s V_5 - IL_19fb: sub - IL_19fc: stloc.1 - IL_19fd: ldloc.s V_4 - IL_19ff: ldloc.3 - IL_1a00: ldc.i4.2 - IL_1a01: add - IL_1a02: ldloc.2 - IL_1a03: add - IL_1a04: mul - IL_1a05: stloc.s V_4 - IL_1a07: ldloc.1 - IL_1a08: ldc.i4.1 - IL_1a09: add - IL_1a0a: stloc.1 - IL_1a0b: ldloc.1 - IL_1a0c: ldc.i4.1 - IL_1a0d: sub - IL_1a0e: stloc.1 - IL_1a0f: br.s IL_1a48 - IL_1a11: ldloc.2 - IL_1a12: ldloc.3 - IL_1a13: ldloc.s V_4 - IL_1a15: mul - IL_1a16: add - IL_1a17: stloc.2 - IL_1a18: ldloc.s V_5 - IL_1a1a: ldc.i4.1 - IL_1a1b: add - IL_1a1c: stloc.s V_5 - IL_1a1e: ldloc.3 - IL_1a1f: ldc.i4.m1 - IL_1a20: add - IL_1a21: stloc.3 - IL_1a22: ldloc.s V_4 - IL_1a24: ldloc.s V_5 - IL_1a26: ldloc.1 - IL_1a27: ldc.i4.1 - IL_1a28: add - IL_1a29: mul - IL_1a2a: add - IL_1a2b: stloc.s V_4 - IL_1a2d: ldloc.2 - IL_1a2e: ldc.i4.1 - IL_1a2f: add - IL_1a30: stloc.2 - IL_1a31: ldloc.1 - IL_1a32: ldc.i4.2 - IL_1a33: sub - IL_1a34: stloc.1 - IL_1a35: ldloc.2 - IL_1a36: ldloc.3 - IL_1a37: ldc.i4.1 - IL_1a38: sub - IL_1a39: ldloc.s V_4 - IL_1a3b: mul - IL_1a3c: add - IL_1a3d: stloc.2 - IL_1a3e: ldloc.s V_5 - IL_1a40: ldc.i4.1 - IL_1a41: add - IL_1a42: stloc.s V_5 - IL_1a44: ldloc.2 - IL_1a45: ldc.i4.1 - IL_1a46: add - IL_1a47: stloc.2 - IL_1a48: ldloc.1 - IL_1a49: ldloc.2 - IL_1a4a: bgt.s IL_1a86 - IL_1a4c: ldloc.1 - IL_1a4d: ldloc.2 - IL_1a4e: ldloc.3 - IL_1a4f: add - IL_1a50: mul - IL_1a51: stloc.1 - IL_1a52: ldloc.s V_4 - IL_1a54: ldc.i4.1 - IL_1a55: add - IL_1a56: stloc.s V_4 - IL_1a58: ldloc.s V_5 - IL_1a5a: ldc.i4.1 - IL_1a5b: sub - IL_1a5c: stloc.s V_5 - IL_1a5e: ldloc.s V_5 - IL_1a60: ldloc.s V_4 - IL_1a62: ldloc.3 - IL_1a63: ldc.i4.1 - IL_1a64: sub - IL_1a65: mul - IL_1a66: sub - IL_1a67: stloc.s V_5 - IL_1a69: ldloc.2 - IL_1a6a: ldc.i4.1 - IL_1a6b: sub - IL_1a6c: stloc.2 - IL_1a6d: ldloc.1 - IL_1a6e: ldloc.s V_5 - IL_1a70: sub - IL_1a71: stloc.1 - IL_1a72: ldloc.s V_4 - IL_1a74: ldloc.3 - IL_1a75: ldc.i4.2 - IL_1a76: add - IL_1a77: ldloc.2 - IL_1a78: mul - IL_1a79: sub - IL_1a7a: stloc.s V_4 - IL_1a7c: ldloc.1 - IL_1a7d: ldc.i4.1 - IL_1a7e: add - IL_1a7f: stloc.1 - IL_1a80: ldloc.1 - IL_1a81: ldc.i4.1 - IL_1a82: sub - IL_1a83: stloc.1 - IL_1a84: br.s IL_1abd - IL_1a86: ldloc.2 - IL_1a87: ldloc.3 - IL_1a88: ldloc.s V_4 - IL_1a8a: sub - IL_1a8b: sub - IL_1a8c: stloc.2 - IL_1a8d: ldloc.s V_5 - IL_1a8f: ldc.i4.1 - IL_1a90: add - IL_1a91: stloc.s V_5 - IL_1a93: ldloc.3 - IL_1a94: ldc.i4.m1 - IL_1a95: add - IL_1a96: stloc.3 - IL_1a97: ldloc.s V_4 - IL_1a99: ldloc.s V_5 - IL_1a9b: ldloc.1 - IL_1a9c: ldc.i4.1 - IL_1a9d: add - IL_1a9e: sub - IL_1a9f: mul - IL_1aa0: stloc.s V_4 - IL_1aa2: ldloc.2 - IL_1aa3: ldc.i4.1 - IL_1aa4: add - IL_1aa5: stloc.2 - IL_1aa6: ldloc.1 - IL_1aa7: ldc.i4.2 - IL_1aa8: sub - IL_1aa9: stloc.1 - IL_1aaa: ldloc.2 - IL_1aab: ldloc.3 - IL_1aac: ldc.i4.1 - IL_1aad: sub - IL_1aae: ldloc.s V_4 - IL_1ab0: sub - IL_1ab1: sub - IL_1ab2: stloc.2 - IL_1ab3: ldloc.s V_5 - IL_1ab5: ldc.i4.1 - IL_1ab6: add - IL_1ab7: stloc.s V_5 - IL_1ab9: ldloc.2 - IL_1aba: ldc.i4.1 - IL_1abb: add - IL_1abc: stloc.2 - IL_1abd: ldloc.1 - IL_1abe: ldloc.2 - IL_1abf: blt.s IL_1afb - IL_1ac1: ldloc.1 - IL_1ac2: ldloc.2 - IL_1ac3: ldloc.3 - IL_1ac4: mul - IL_1ac5: add - IL_1ac6: stloc.1 - IL_1ac7: ldloc.s V_4 - IL_1ac9: ldc.i4.1 - IL_1aca: add - IL_1acb: stloc.s V_4 - IL_1acd: ldloc.s V_5 - IL_1acf: ldc.i4.1 - IL_1ad0: sub - IL_1ad1: stloc.s V_5 - IL_1ad3: ldloc.s V_5 - IL_1ad5: ldloc.s V_4 - IL_1ad7: ldloc.3 - IL_1ad8: ldc.i4.1 - IL_1ad9: sub - IL_1ada: add - IL_1adb: mul - IL_1adc: stloc.s V_5 - IL_1ade: ldloc.2 - IL_1adf: ldc.i4.1 - IL_1ae0: sub - IL_1ae1: stloc.2 - IL_1ae2: ldloc.1 - IL_1ae3: ldloc.s V_5 - IL_1ae5: sub - IL_1ae6: stloc.1 - IL_1ae7: ldloc.s V_4 - IL_1ae9: ldloc.3 - IL_1aea: ldc.i4.2 - IL_1aeb: add - IL_1aec: ldloc.2 - IL_1aed: add - IL_1aee: add - IL_1aef: stloc.s V_4 - IL_1af1: ldloc.1 - IL_1af2: ldc.i4.1 - IL_1af3: add - IL_1af4: stloc.1 - IL_1af5: ldloc.1 - IL_1af6: ldc.i4.1 - IL_1af7: sub - IL_1af8: stloc.1 - IL_1af9: br.s IL_1b32 - IL_1afb: ldloc.2 - IL_1afc: ldloc.3 - IL_1afd: ldloc.s V_4 - IL_1aff: add - IL_1b00: mul - IL_1b01: stloc.2 - IL_1b02: ldloc.s V_5 - IL_1b04: ldc.i4.1 - IL_1b05: add - IL_1b06: stloc.s V_5 - IL_1b08: ldloc.3 - IL_1b09: ldc.i4.m1 - IL_1b0a: add - IL_1b0b: stloc.3 - IL_1b0c: ldloc.s V_4 - IL_1b0e: ldloc.s V_5 - IL_1b10: ldloc.1 - IL_1b11: ldc.i4.1 - IL_1b12: add - IL_1b13: add - IL_1b14: add - IL_1b15: stloc.s V_4 - IL_1b17: ldloc.2 - IL_1b18: ldc.i4.1 - IL_1b19: add - IL_1b1a: stloc.2 - IL_1b1b: ldloc.1 - IL_1b1c: ldc.i4.2 - IL_1b1d: sub - IL_1b1e: stloc.1 - IL_1b1f: ldloc.2 - IL_1b20: ldloc.3 - IL_1b21: ldc.i4.1 - IL_1b22: sub - IL_1b23: ldloc.s V_4 - IL_1b25: mul - IL_1b26: mul - IL_1b27: stloc.2 - IL_1b28: ldloc.s V_5 - IL_1b2a: ldc.i4.1 - IL_1b2b: add - IL_1b2c: stloc.s V_5 - IL_1b2e: ldloc.2 - IL_1b2f: ldc.i4.1 - IL_1b30: add - IL_1b31: stloc.2 - IL_1b32: ldloc.1 - IL_1b33: ldloc.2 - IL_1b34: ble.s IL_1b70 - IL_1b36: ldloc.1 - IL_1b37: ldloc.2 - IL_1b38: ldloc.3 - IL_1b39: sub - IL_1b3a: add - IL_1b3b: stloc.1 - IL_1b3c: ldloc.s V_4 - IL_1b3e: ldc.i4.1 - IL_1b3f: add - IL_1b40: stloc.s V_4 - IL_1b42: ldloc.s V_5 - IL_1b44: ldc.i4.1 - IL_1b45: sub - IL_1b46: stloc.s V_5 - IL_1b48: ldloc.s V_5 - IL_1b4a: ldloc.s V_4 - IL_1b4c: ldloc.3 - IL_1b4d: ldc.i4.1 - IL_1b4e: sub - IL_1b4f: sub - IL_1b50: mul - IL_1b51: stloc.s V_5 - IL_1b53: ldloc.2 - IL_1b54: ldc.i4.1 - IL_1b55: sub - IL_1b56: stloc.2 - IL_1b57: ldloc.1 - IL_1b58: ldloc.s V_5 - IL_1b5a: sub - IL_1b5b: stloc.1 - IL_1b5c: ldloc.s V_4 - IL_1b5e: ldloc.3 - IL_1b5f: ldc.i4.2 - IL_1b60: add - IL_1b61: ldloc.2 - IL_1b62: sub - IL_1b63: mul - IL_1b64: stloc.s V_4 - IL_1b66: ldloc.1 - IL_1b67: ldc.i4.1 - IL_1b68: add - IL_1b69: stloc.1 - IL_1b6a: ldloc.1 - IL_1b6b: ldc.i4.1 - IL_1b6c: sub - IL_1b6d: stloc.1 - IL_1b6e: br.s IL_1ba7 - IL_1b70: ldloc.2 - IL_1b71: ldloc.3 - IL_1b72: ldloc.s V_4 - IL_1b74: mul - IL_1b75: mul - IL_1b76: stloc.2 - IL_1b77: ldloc.s V_5 - IL_1b79: ldc.i4.1 - IL_1b7a: add - IL_1b7b: stloc.s V_5 - IL_1b7d: ldloc.3 - IL_1b7e: ldc.i4.m1 - IL_1b7f: add - IL_1b80: stloc.3 - IL_1b81: ldloc.s V_4 - IL_1b83: ldloc.s V_5 - IL_1b85: ldloc.1 - IL_1b86: ldc.i4.1 - IL_1b87: add - IL_1b88: add - IL_1b89: sub - IL_1b8a: stloc.s V_4 - IL_1b8c: ldloc.2 - IL_1b8d: ldc.i4.1 - IL_1b8e: add - IL_1b8f: stloc.2 - IL_1b90: ldloc.1 - IL_1b91: ldc.i4.2 - IL_1b92: sub - IL_1b93: stloc.1 - IL_1b94: ldloc.2 - IL_1b95: ldloc.3 - IL_1b96: ldc.i4.1 - IL_1b97: sub - IL_1b98: ldloc.s V_4 - IL_1b9a: mul - IL_1b9b: mul - IL_1b9c: stloc.2 - IL_1b9d: ldloc.s V_5 - IL_1b9f: ldc.i4.1 - IL_1ba0: add - IL_1ba1: stloc.s V_5 - IL_1ba3: ldloc.2 - IL_1ba4: ldc.i4.1 - IL_1ba5: add - IL_1ba6: stloc.2 - IL_1ba7: ldloc.1 - IL_1ba8: ldloc.2 - IL_1ba9: blt.s IL_1be5 - IL_1bab: ldloc.1 - IL_1bac: ldloc.2 - IL_1bad: ldloc.3 - IL_1bae: sub - IL_1baf: sub - IL_1bb0: stloc.1 - IL_1bb1: ldloc.s V_4 - IL_1bb3: ldc.i4.1 - IL_1bb4: add - IL_1bb5: stloc.s V_4 - IL_1bb7: ldloc.s V_5 - IL_1bb9: ldc.i4.1 - IL_1bba: sub - IL_1bbb: stloc.s V_5 - IL_1bbd: ldloc.s V_5 - IL_1bbf: ldloc.s V_4 - IL_1bc1: ldloc.3 - IL_1bc2: ldc.i4.1 - IL_1bc3: sub - IL_1bc4: add - IL_1bc5: sub - IL_1bc6: stloc.s V_5 - IL_1bc8: ldloc.2 - IL_1bc9: ldc.i4.1 - IL_1bca: sub - IL_1bcb: stloc.2 - IL_1bcc: ldloc.1 - IL_1bcd: ldloc.s V_5 - IL_1bcf: sub - IL_1bd0: stloc.1 - IL_1bd1: ldloc.s V_4 - IL_1bd3: ldloc.3 - IL_1bd4: ldc.i4.2 - IL_1bd5: add - IL_1bd6: ldloc.2 - IL_1bd7: add - IL_1bd8: add - IL_1bd9: stloc.s V_4 - IL_1bdb: ldloc.1 - IL_1bdc: ldc.i4.1 - IL_1bdd: add - IL_1bde: stloc.1 - IL_1bdf: ldloc.1 - IL_1be0: ldc.i4.1 - IL_1be1: sub - IL_1be2: stloc.1 - IL_1be3: br.s IL_1c1c - IL_1be5: ldloc.2 - IL_1be6: ldloc.3 - IL_1be7: ldloc.s V_4 - IL_1be9: add - IL_1bea: sub - IL_1beb: stloc.2 - IL_1bec: ldloc.s V_5 - IL_1bee: ldc.i4.1 - IL_1bef: add - IL_1bf0: stloc.s V_5 - IL_1bf2: ldloc.3 - IL_1bf3: ldc.i4.m1 - IL_1bf4: add - IL_1bf5: stloc.3 - IL_1bf6: ldloc.s V_4 - IL_1bf8: ldloc.s V_5 - IL_1bfa: ldloc.1 - IL_1bfb: ldc.i4.1 - IL_1bfc: add - IL_1bfd: sub - IL_1bfe: add - IL_1bff: stloc.s V_4 - IL_1c01: ldloc.2 - IL_1c02: ldc.i4.1 - IL_1c03: add - IL_1c04: stloc.2 - IL_1c05: ldloc.1 - IL_1c06: ldc.i4.2 - IL_1c07: sub - IL_1c08: stloc.1 - IL_1c09: ldloc.2 - IL_1c0a: ldloc.3 - IL_1c0b: ldc.i4.1 - IL_1c0c: sub - IL_1c0d: ldloc.s V_4 - IL_1c0f: add - IL_1c10: sub - IL_1c11: stloc.2 - IL_1c12: ldloc.s V_5 - IL_1c14: ldc.i4.1 - IL_1c15: add - IL_1c16: stloc.s V_5 - IL_1c18: ldloc.2 - IL_1c19: ldc.i4.1 - IL_1c1a: add - IL_1c1b: stloc.2 - IL_1c1c: ldloc.1 - IL_1c1d: ldloc.2 - IL_1c1e: ble.s IL_1c5a - IL_1c20: ldloc.1 - IL_1c21: ldloc.2 - IL_1c22: ldloc.3 - IL_1c23: add - IL_1c24: mul - IL_1c25: stloc.1 - IL_1c26: ldloc.s V_4 - IL_1c28: ldc.i4.1 - IL_1c29: add - IL_1c2a: stloc.s V_4 - IL_1c2c: ldloc.s V_5 - IL_1c2e: ldc.i4.1 - IL_1c2f: sub - IL_1c30: stloc.s V_5 - IL_1c32: ldloc.s V_5 - IL_1c34: ldloc.s V_4 - IL_1c36: ldloc.3 - IL_1c37: ldc.i4.1 - IL_1c38: sub - IL_1c39: mul - IL_1c3a: mul - IL_1c3b: stloc.s V_5 - IL_1c3d: ldloc.2 - IL_1c3e: ldc.i4.1 - IL_1c3f: sub - IL_1c40: stloc.2 - IL_1c41: ldloc.1 - IL_1c42: ldloc.s V_5 - IL_1c44: sub - IL_1c45: stloc.1 - IL_1c46: ldloc.s V_4 - IL_1c48: ldloc.3 - IL_1c49: ldc.i4.2 - IL_1c4a: add - IL_1c4b: ldloc.2 - IL_1c4c: mul - IL_1c4d: sub - IL_1c4e: stloc.s V_4 - IL_1c50: ldloc.1 - IL_1c51: ldc.i4.1 - IL_1c52: add - IL_1c53: stloc.1 - IL_1c54: ldloc.1 - IL_1c55: ldc.i4.1 - IL_1c56: sub - IL_1c57: stloc.1 - IL_1c58: br.s IL_1c91 - IL_1c5a: ldloc.2 - IL_1c5b: ldloc.3 - IL_1c5c: ldloc.s V_4 - IL_1c5e: sub - IL_1c5f: mul - IL_1c60: stloc.2 - IL_1c61: ldloc.s V_5 - IL_1c63: ldc.i4.1 - IL_1c64: add - IL_1c65: stloc.s V_5 - IL_1c67: ldloc.3 - IL_1c68: ldc.i4.m1 - IL_1c69: add - IL_1c6a: stloc.3 - IL_1c6b: ldloc.s V_4 - IL_1c6d: ldloc.s V_5 - IL_1c6f: ldloc.1 - IL_1c70: ldc.i4.1 - IL_1c71: add - IL_1c72: add - IL_1c73: mul - IL_1c74: stloc.s V_4 - IL_1c76: ldloc.2 - IL_1c77: ldc.i4.1 - IL_1c78: add - IL_1c79: stloc.2 - IL_1c7a: ldloc.1 - IL_1c7b: ldc.i4.2 - IL_1c7c: sub - IL_1c7d: stloc.1 - IL_1c7e: ldloc.2 - IL_1c7f: ldloc.3 - IL_1c80: ldc.i4.1 - IL_1c81: sub - IL_1c82: ldloc.s V_4 - IL_1c84: add - IL_1c85: mul - IL_1c86: stloc.2 - IL_1c87: ldloc.s V_5 - IL_1c89: ldc.i4.1 - IL_1c8a: add - IL_1c8b: stloc.s V_5 - IL_1c8d: ldloc.2 - IL_1c8e: ldc.i4.1 - IL_1c8f: add - IL_1c90: stloc.2 - IL_1c91: ldloc.1 - IL_1c92: ldloc.2 - IL_1c93: bge.s IL_1ccf - IL_1c95: ldloc.1 - IL_1c96: ldloc.2 - IL_1c97: ldloc.3 - IL_1c98: add - IL_1c99: sub - IL_1c9a: stloc.1 - IL_1c9b: ldloc.s V_4 - IL_1c9d: ldc.i4.1 - IL_1c9e: add - IL_1c9f: stloc.s V_4 - IL_1ca1: ldloc.s V_5 - IL_1ca3: ldc.i4.1 - IL_1ca4: sub - IL_1ca5: stloc.s V_5 - IL_1ca7: ldloc.s V_5 - IL_1ca9: ldloc.s V_4 - IL_1cab: ldloc.3 - IL_1cac: ldc.i4.1 - IL_1cad: sub - IL_1cae: mul - IL_1caf: mul - IL_1cb0: stloc.s V_5 - IL_1cb2: ldloc.2 - IL_1cb3: ldc.i4.1 - IL_1cb4: sub - IL_1cb5: stloc.2 - IL_1cb6: ldloc.1 - IL_1cb7: ldloc.s V_5 - IL_1cb9: sub - IL_1cba: stloc.1 - IL_1cbb: ldloc.s V_4 - IL_1cbd: ldloc.3 - IL_1cbe: ldc.i4.2 - IL_1cbf: add - IL_1cc0: ldloc.2 - IL_1cc1: mul - IL_1cc2: add - IL_1cc3: stloc.s V_4 - IL_1cc5: ldloc.1 - IL_1cc6: ldc.i4.1 - IL_1cc7: add - IL_1cc8: stloc.1 - IL_1cc9: ldloc.1 - IL_1cca: ldc.i4.1 - IL_1ccb: sub - IL_1ccc: stloc.1 - IL_1ccd: br.s IL_1d06 - IL_1ccf: ldloc.2 - IL_1cd0: ldloc.3 - IL_1cd1: ldloc.s V_4 - IL_1cd3: add - IL_1cd4: mul - IL_1cd5: stloc.2 - IL_1cd6: ldloc.s V_5 - IL_1cd8: ldc.i4.1 - IL_1cd9: add - IL_1cda: stloc.s V_5 - IL_1cdc: ldloc.3 - IL_1cdd: ldc.i4.m1 - IL_1cde: add - IL_1cdf: stloc.3 - IL_1ce0: ldloc.s V_4 - IL_1ce2: ldloc.s V_5 - IL_1ce4: ldloc.1 - IL_1ce5: ldc.i4.1 - IL_1ce6: add - IL_1ce7: sub - IL_1ce8: mul - IL_1ce9: stloc.s V_4 - IL_1ceb: ldloc.2 - IL_1cec: ldc.i4.1 - IL_1ced: add - IL_1cee: stloc.2 - IL_1cef: ldloc.1 - IL_1cf0: ldc.i4.2 - IL_1cf1: sub - IL_1cf2: stloc.1 - IL_1cf3: ldloc.2 - IL_1cf4: ldloc.3 - IL_1cf5: ldc.i4.1 - IL_1cf6: sub - IL_1cf7: ldloc.s V_4 - IL_1cf9: sub - IL_1cfa: mul - IL_1cfb: stloc.2 - IL_1cfc: ldloc.s V_5 - IL_1cfe: ldc.i4.1 - IL_1cff: add - IL_1d00: stloc.s V_5 - IL_1d02: ldloc.2 - IL_1d03: ldc.i4.1 - IL_1d04: add - IL_1d05: stloc.2 - IL_1d06: ldloc.1 - IL_1d07: ldloc.2 - IL_1d08: bne.un.s IL_1d44 - IL_1d0a: ldloc.1 - IL_1d0b: ldloc.2 - IL_1d0c: ldloc.3 - IL_1d0d: mul - IL_1d0e: sub - IL_1d0f: stloc.1 - IL_1d10: ldloc.s V_4 - IL_1d12: ldc.i4.1 - IL_1d13: add - IL_1d14: stloc.s V_4 - IL_1d16: ldloc.s V_5 - IL_1d18: ldc.i4.1 - IL_1d19: sub - IL_1d1a: stloc.s V_5 - IL_1d1c: ldloc.s V_5 - IL_1d1e: ldloc.s V_4 - IL_1d20: ldloc.3 - IL_1d21: ldc.i4.1 - IL_1d22: sub - IL_1d23: mul - IL_1d24: mul - IL_1d25: stloc.s V_5 - IL_1d27: ldloc.2 - IL_1d28: ldc.i4.1 - IL_1d29: sub - IL_1d2a: stloc.2 - IL_1d2b: ldloc.1 - IL_1d2c: ldloc.s V_5 - IL_1d2e: sub - IL_1d2f: stloc.1 - IL_1d30: ldloc.s V_4 - IL_1d32: ldloc.3 - IL_1d33: ldc.i4.2 - IL_1d34: add - IL_1d35: ldloc.2 - IL_1d36: mul - IL_1d37: add - IL_1d38: stloc.s V_4 - IL_1d3a: ldloc.1 - IL_1d3b: ldc.i4.1 - IL_1d3c: add - IL_1d3d: stloc.1 - IL_1d3e: ldloc.1 - IL_1d3f: ldc.i4.1 - IL_1d40: sub - IL_1d41: stloc.1 - IL_1d42: br.s IL_1d7b - IL_1d44: ldloc.2 - IL_1d45: ldloc.3 - IL_1d46: ldloc.s V_4 - IL_1d48: add - IL_1d49: mul - IL_1d4a: stloc.2 - IL_1d4b: ldloc.s V_5 - IL_1d4d: ldc.i4.1 - IL_1d4e: add - IL_1d4f: stloc.s V_5 - IL_1d51: ldloc.3 - IL_1d52: ldc.i4.m1 - IL_1d53: add - IL_1d54: stloc.3 - IL_1d55: ldloc.s V_4 - IL_1d57: ldloc.s V_5 - IL_1d59: ldloc.1 - IL_1d5a: ldc.i4.1 - IL_1d5b: add - IL_1d5c: add - IL_1d5d: mul - IL_1d5e: stloc.s V_4 - IL_1d60: ldloc.2 - IL_1d61: ldc.i4.1 - IL_1d62: add - IL_1d63: stloc.2 - IL_1d64: ldloc.1 - IL_1d65: ldc.i4.2 - IL_1d66: sub - IL_1d67: stloc.1 - IL_1d68: ldloc.2 - IL_1d69: ldloc.3 - IL_1d6a: ldc.i4.1 - IL_1d6b: sub - IL_1d6c: ldloc.s V_4 - IL_1d6e: mul - IL_1d6f: mul - IL_1d70: stloc.2 - IL_1d71: ldloc.s V_5 - IL_1d73: ldc.i4.1 - IL_1d74: add - IL_1d75: stloc.s V_5 - IL_1d77: ldloc.2 - IL_1d78: ldc.i4.1 - IL_1d79: add - IL_1d7a: stloc.2 - IL_1d7b: ldloc.1 - IL_1d7c: ldloc.2 - IL_1d7d: bne.un.s IL_1db9 - IL_1d7f: ldloc.1 - IL_1d80: ldloc.2 - IL_1d81: ldloc.3 - IL_1d82: sub - IL_1d83: sub - IL_1d84: stloc.1 - IL_1d85: ldloc.s V_4 - IL_1d87: ldc.i4.1 - IL_1d88: add - IL_1d89: stloc.s V_4 - IL_1d8b: ldloc.s V_5 - IL_1d8d: ldc.i4.1 - IL_1d8e: sub - IL_1d8f: stloc.s V_5 - IL_1d91: ldloc.s V_5 - IL_1d93: ldloc.s V_4 - IL_1d95: ldloc.3 - IL_1d96: ldc.i4.1 - IL_1d97: sub - IL_1d98: add - IL_1d99: mul - IL_1d9a: stloc.s V_5 - IL_1d9c: ldloc.2 - IL_1d9d: ldc.i4.1 - IL_1d9e: sub - IL_1d9f: stloc.2 - IL_1da0: ldloc.1 - IL_1da1: ldloc.s V_5 - IL_1da3: sub - IL_1da4: stloc.1 - IL_1da5: ldloc.s V_4 - IL_1da7: ldloc.3 - IL_1da8: ldc.i4.2 - IL_1da9: add - IL_1daa: ldloc.2 - IL_1dab: add - IL_1dac: add - IL_1dad: stloc.s V_4 - IL_1daf: ldloc.1 - IL_1db0: ldc.i4.1 - IL_1db1: add - IL_1db2: stloc.1 - IL_1db3: ldloc.1 - IL_1db4: ldc.i4.1 - IL_1db5: sub - IL_1db6: stloc.1 - IL_1db7: br.s IL_1df0 - IL_1db9: ldloc.2 - IL_1dba: ldloc.3 - IL_1dbb: ldloc.s V_4 - IL_1dbd: add - IL_1dbe: mul - IL_1dbf: stloc.2 - IL_1dc0: ldloc.s V_5 - IL_1dc2: ldc.i4.1 - IL_1dc3: add - IL_1dc4: stloc.s V_5 - IL_1dc6: ldloc.3 - IL_1dc7: ldc.i4.m1 - IL_1dc8: add - IL_1dc9: stloc.3 - IL_1dca: ldloc.s V_4 - IL_1dcc: ldloc.s V_5 - IL_1dce: ldloc.1 - IL_1dcf: ldc.i4.1 - IL_1dd0: add - IL_1dd1: add - IL_1dd2: add - IL_1dd3: stloc.s V_4 - IL_1dd5: ldloc.2 - IL_1dd6: ldc.i4.1 - IL_1dd7: add - IL_1dd8: stloc.2 - IL_1dd9: ldloc.1 - IL_1dda: ldc.i4.2 - IL_1ddb: sub - IL_1ddc: stloc.1 - IL_1ddd: ldloc.2 - IL_1dde: ldloc.3 - IL_1ddf: ldc.i4.1 - IL_1de0: sub - IL_1de1: ldloc.s V_4 - IL_1de3: add - IL_1de4: mul - IL_1de5: stloc.2 - IL_1de6: ldloc.s V_5 - IL_1de8: ldc.i4.1 - IL_1de9: add - IL_1dea: stloc.s V_5 - IL_1dec: ldloc.2 - IL_1ded: ldc.i4.1 - IL_1dee: add - IL_1def: stloc.2 - IL_1df0: ldloc.s V_4 - IL_1df2: ldloc.2 - IL_1df3: bgt.s IL_1e2f - IL_1df5: ldloc.1 - IL_1df6: ldloc.2 - IL_1df7: ldloc.3 - IL_1df8: add - IL_1df9: sub - IL_1dfa: stloc.1 - IL_1dfb: ldloc.s V_4 - IL_1dfd: ldc.i4.1 - IL_1dfe: add - IL_1dff: stloc.s V_4 - IL_1e01: ldloc.s V_5 - IL_1e03: ldc.i4.1 - IL_1e04: sub - IL_1e05: stloc.s V_5 - IL_1e07: ldloc.s V_5 - IL_1e09: ldloc.s V_4 - IL_1e0b: ldloc.3 - IL_1e0c: ldc.i4.1 - IL_1e0d: sub - IL_1e0e: add - IL_1e0f: mul - IL_1e10: stloc.s V_5 - IL_1e12: ldloc.2 - IL_1e13: ldc.i4.1 - IL_1e14: sub - IL_1e15: stloc.2 - IL_1e16: ldloc.1 - IL_1e17: ldloc.s V_5 - IL_1e19: sub - IL_1e1a: stloc.1 - IL_1e1b: ldloc.s V_4 - IL_1e1d: ldloc.3 - IL_1e1e: ldc.i4.2 - IL_1e1f: add - IL_1e20: ldloc.2 - IL_1e21: add - IL_1e22: mul - IL_1e23: stloc.s V_4 - IL_1e25: ldloc.1 - IL_1e26: ldc.i4.1 - IL_1e27: add - IL_1e28: stloc.1 - IL_1e29: ldloc.1 - IL_1e2a: ldc.i4.1 - IL_1e2b: sub - IL_1e2c: stloc.1 - IL_1e2d: br.s IL_1e66 - IL_1e2f: ldloc.2 - IL_1e30: ldloc.3 - IL_1e31: ldloc.s V_4 - IL_1e33: mul - IL_1e34: mul - IL_1e35: stloc.2 - IL_1e36: ldloc.s V_5 - IL_1e38: ldc.i4.1 - IL_1e39: add - IL_1e3a: stloc.s V_5 - IL_1e3c: ldloc.3 - IL_1e3d: ldc.i4.m1 - IL_1e3e: add - IL_1e3f: stloc.3 - IL_1e40: ldloc.s V_4 - IL_1e42: ldloc.s V_5 - IL_1e44: ldloc.1 - IL_1e45: ldc.i4.1 - IL_1e46: add - IL_1e47: mul - IL_1e48: add - IL_1e49: stloc.s V_4 - IL_1e4b: ldloc.2 - IL_1e4c: ldc.i4.1 - IL_1e4d: add - IL_1e4e: stloc.2 - IL_1e4f: ldloc.1 - IL_1e50: ldc.i4.2 - IL_1e51: sub - IL_1e52: stloc.1 - IL_1e53: ldloc.2 - IL_1e54: ldloc.3 - IL_1e55: ldc.i4.1 - IL_1e56: sub - IL_1e57: ldloc.s V_4 - IL_1e59: sub - IL_1e5a: mul - IL_1e5b: stloc.2 - IL_1e5c: ldloc.s V_5 - IL_1e5e: ldc.i4.1 - IL_1e5f: add - IL_1e60: stloc.s V_5 - IL_1e62: ldloc.2 - IL_1e63: ldc.i4.1 - IL_1e64: add - IL_1e65: stloc.2 - IL_1e66: ldloc.1 - IL_1e67: ldloc.2 - IL_1e68: beq.s IL_1ea4 - IL_1e6a: ldloc.1 - IL_1e6b: ldloc.2 - IL_1e6c: ldloc.3 - IL_1e6d: mul - IL_1e6e: sub - IL_1e6f: stloc.1 - IL_1e70: ldloc.s V_4 - IL_1e72: ldc.i4.1 - IL_1e73: add - IL_1e74: stloc.s V_4 - IL_1e76: ldloc.s V_5 - IL_1e78: ldc.i4.1 - IL_1e79: sub - IL_1e7a: stloc.s V_5 - IL_1e7c: ldloc.s V_5 - IL_1e7e: ldloc.s V_4 - IL_1e80: ldloc.3 - IL_1e81: ldc.i4.1 - IL_1e82: sub - IL_1e83: mul - IL_1e84: add - IL_1e85: stloc.s V_5 - IL_1e87: ldloc.2 - IL_1e88: ldc.i4.1 - IL_1e89: sub - IL_1e8a: stloc.2 - IL_1e8b: ldloc.1 - IL_1e8c: ldloc.s V_5 - IL_1e8e: sub - IL_1e8f: stloc.1 - IL_1e90: ldloc.s V_4 - IL_1e92: ldloc.3 - IL_1e93: ldc.i4.2 - IL_1e94: add - IL_1e95: ldloc.2 - IL_1e96: mul - IL_1e97: mul - IL_1e98: stloc.s V_4 - IL_1e9a: ldloc.1 - IL_1e9b: ldc.i4.1 - IL_1e9c: add - IL_1e9d: stloc.1 - IL_1e9e: ldloc.1 - IL_1e9f: ldc.i4.1 - IL_1ea0: sub - IL_1ea1: stloc.1 - IL_1ea2: br.s IL_1edb - IL_1ea4: ldloc.2 - IL_1ea5: ldloc.3 - IL_1ea6: ldloc.s V_4 - IL_1ea8: mul - IL_1ea9: add - IL_1eaa: stloc.2 - IL_1eab: ldloc.s V_5 - IL_1ead: ldc.i4.1 - IL_1eae: add - IL_1eaf: stloc.s V_5 - IL_1eb1: ldloc.3 - IL_1eb2: ldc.i4.m1 - IL_1eb3: add - IL_1eb4: stloc.3 - IL_1eb5: ldloc.s V_4 - IL_1eb7: ldloc.s V_5 - IL_1eb9: ldloc.1 - IL_1eba: ldc.i4.1 - IL_1ebb: add - IL_1ebc: add - IL_1ebd: mul - IL_1ebe: stloc.s V_4 - IL_1ec0: ldloc.2 - IL_1ec1: ldc.i4.1 - IL_1ec2: add - IL_1ec3: stloc.2 - IL_1ec4: ldloc.1 - IL_1ec5: ldc.i4.2 - IL_1ec6: sub - IL_1ec7: stloc.1 - IL_1ec8: ldloc.2 - IL_1ec9: ldloc.3 - IL_1eca: ldc.i4.1 - IL_1ecb: sub - IL_1ecc: ldloc.s V_4 - IL_1ece: add - IL_1ecf: add - IL_1ed0: stloc.2 - IL_1ed1: ldloc.s V_5 - IL_1ed3: ldc.i4.1 - IL_1ed4: add - IL_1ed5: stloc.s V_5 - IL_1ed7: ldloc.2 - IL_1ed8: ldc.i4.1 - IL_1ed9: add - IL_1eda: stloc.2 - IL_1edb: ldloc.1 - IL_1edc: ldloc.2 - IL_1edd: bge.s IL_1f19 - IL_1edf: ldloc.1 - IL_1ee0: ldloc.2 - IL_1ee1: ldloc.3 - IL_1ee2: mul - IL_1ee3: mul - IL_1ee4: stloc.1 - IL_1ee5: ldloc.s V_4 - IL_1ee7: ldc.i4.1 - IL_1ee8: add - IL_1ee9: stloc.s V_4 - IL_1eeb: ldloc.s V_5 - IL_1eed: ldc.i4.1 - IL_1eee: sub - IL_1eef: stloc.s V_5 - IL_1ef1: ldloc.s V_5 - IL_1ef3: ldloc.s V_4 - IL_1ef5: ldloc.3 - IL_1ef6: ldc.i4.1 - IL_1ef7: sub - IL_1ef8: add - IL_1ef9: mul - IL_1efa: stloc.s V_5 - IL_1efc: ldloc.2 - IL_1efd: ldc.i4.1 - IL_1efe: sub - IL_1eff: stloc.2 - IL_1f00: ldloc.1 - IL_1f01: ldloc.s V_5 - IL_1f03: sub - IL_1f04: stloc.1 - IL_1f05: ldloc.s V_4 - IL_1f07: ldloc.3 - IL_1f08: ldc.i4.2 - IL_1f09: add - IL_1f0a: ldloc.2 - IL_1f0b: add - IL_1f0c: sub - IL_1f0d: stloc.s V_4 - IL_1f0f: ldloc.1 - IL_1f10: ldc.i4.1 - IL_1f11: add - IL_1f12: stloc.1 - IL_1f13: ldloc.1 - IL_1f14: ldc.i4.1 - IL_1f15: sub - IL_1f16: stloc.1 - IL_1f17: br.s IL_1f50 - IL_1f19: ldloc.2 - IL_1f1a: ldloc.3 - IL_1f1b: ldloc.s V_4 - IL_1f1d: sub - IL_1f1e: mul - IL_1f1f: stloc.2 - IL_1f20: ldloc.s V_5 - IL_1f22: ldc.i4.1 - IL_1f23: add - IL_1f24: stloc.s V_5 - IL_1f26: ldloc.3 - IL_1f27: ldc.i4.m1 - IL_1f28: add - IL_1f29: stloc.3 - IL_1f2a: ldloc.s V_4 - IL_1f2c: ldloc.s V_5 - IL_1f2e: ldloc.1 - IL_1f2f: ldc.i4.1 - IL_1f30: add - IL_1f31: add - IL_1f32: add - IL_1f33: stloc.s V_4 - IL_1f35: ldloc.2 - IL_1f36: ldc.i4.1 - IL_1f37: add - IL_1f38: stloc.2 - IL_1f39: ldloc.1 - IL_1f3a: ldc.i4.2 - IL_1f3b: sub - IL_1f3c: stloc.1 - IL_1f3d: ldloc.2 - IL_1f3e: ldloc.3 - IL_1f3f: ldc.i4.1 - IL_1f40: sub - IL_1f41: ldloc.s V_4 - IL_1f43: mul - IL_1f44: mul - IL_1f45: stloc.2 - IL_1f46: ldloc.s V_5 - IL_1f48: ldc.i4.1 - IL_1f49: add - IL_1f4a: stloc.s V_5 - IL_1f4c: ldloc.2 - IL_1f4d: ldc.i4.1 - IL_1f4e: add - IL_1f4f: stloc.2 - IL_1f50: ldloc.1 - IL_1f51: ldloc.2 - IL_1f52: bgt.s IL_1f8e - IL_1f54: ldloc.1 - IL_1f55: ldloc.2 - IL_1f56: ldloc.3 - IL_1f57: sub - IL_1f58: add - IL_1f59: stloc.1 - IL_1f5a: ldloc.s V_4 - IL_1f5c: ldc.i4.1 - IL_1f5d: add - IL_1f5e: stloc.s V_4 - IL_1f60: ldloc.s V_5 - IL_1f62: ldc.i4.1 - IL_1f63: sub - IL_1f64: stloc.s V_5 - IL_1f66: ldloc.s V_5 - IL_1f68: ldloc.s V_4 - IL_1f6a: ldloc.3 - IL_1f6b: ldc.i4.1 - IL_1f6c: sub - IL_1f6d: sub - IL_1f6e: add - IL_1f6f: stloc.s V_5 - IL_1f71: ldloc.2 - IL_1f72: ldc.i4.1 - IL_1f73: sub - IL_1f74: stloc.2 - IL_1f75: ldloc.1 - IL_1f76: ldloc.s V_5 - IL_1f78: sub - IL_1f79: stloc.1 - IL_1f7a: ldloc.s V_4 - IL_1f7c: ldloc.3 - IL_1f7d: ldc.i4.2 - IL_1f7e: add - IL_1f7f: ldloc.2 - IL_1f80: sub - IL_1f81: mul - IL_1f82: stloc.s V_4 - IL_1f84: ldloc.1 - IL_1f85: ldc.i4.1 - IL_1f86: add - IL_1f87: stloc.1 - IL_1f88: ldloc.1 - IL_1f89: ldc.i4.1 - IL_1f8a: sub - IL_1f8b: stloc.1 - IL_1f8c: br.s IL_1fc5 - IL_1f8e: ldloc.2 - IL_1f8f: ldloc.3 - IL_1f90: ldloc.s V_4 - IL_1f92: mul - IL_1f93: add - IL_1f94: stloc.2 - IL_1f95: ldloc.s V_5 - IL_1f97: ldc.i4.1 - IL_1f98: add - IL_1f99: stloc.s V_5 - IL_1f9b: ldloc.3 - IL_1f9c: ldc.i4.m1 - IL_1f9d: add - IL_1f9e: stloc.3 - IL_1f9f: ldloc.s V_4 - IL_1fa1: ldloc.s V_5 - IL_1fa3: ldloc.1 - IL_1fa4: ldc.i4.1 - IL_1fa5: add - IL_1fa6: add - IL_1fa7: sub - IL_1fa8: stloc.s V_4 - IL_1faa: ldloc.2 - IL_1fab: ldc.i4.1 - IL_1fac: add - IL_1fad: stloc.2 - IL_1fae: ldloc.1 - IL_1faf: ldc.i4.2 - IL_1fb0: sub - IL_1fb1: stloc.1 - IL_1fb2: ldloc.2 - IL_1fb3: ldloc.3 - IL_1fb4: ldc.i4.1 - IL_1fb5: sub - IL_1fb6: ldloc.s V_4 - IL_1fb8: add - IL_1fb9: add - IL_1fba: stloc.2 - IL_1fbb: ldloc.s V_5 - IL_1fbd: ldc.i4.1 - IL_1fbe: add - IL_1fbf: stloc.s V_5 - IL_1fc1: ldloc.2 - IL_1fc2: ldc.i4.1 - IL_1fc3: add - IL_1fc4: stloc.2 - IL_1fc5: ldloc.1 - IL_1fc6: ldloc.2 - IL_1fc7: bgt.s IL_2003 - IL_1fc9: ldloc.1 - IL_1fca: ldloc.2 - IL_1fcb: ldloc.3 - IL_1fcc: add - IL_1fcd: sub - IL_1fce: stloc.1 - IL_1fcf: ldloc.s V_4 - IL_1fd1: ldc.i4.1 - IL_1fd2: add - IL_1fd3: stloc.s V_4 - IL_1fd5: ldloc.s V_5 - IL_1fd7: ldc.i4.1 - IL_1fd8: sub - IL_1fd9: stloc.s V_5 - IL_1fdb: ldloc.s V_5 - IL_1fdd: ldloc.s V_4 - IL_1fdf: ldloc.3 - IL_1fe0: ldc.i4.1 - IL_1fe1: sub - IL_1fe2: add - IL_1fe3: mul - IL_1fe4: stloc.s V_5 - IL_1fe6: ldloc.2 - IL_1fe7: ldc.i4.1 - IL_1fe8: sub - IL_1fe9: stloc.2 - IL_1fea: ldloc.1 - IL_1feb: ldloc.s V_5 - IL_1fed: sub - IL_1fee: stloc.1 - IL_1fef: ldloc.s V_4 - IL_1ff1: ldloc.3 - IL_1ff2: ldc.i4.2 - IL_1ff3: add - IL_1ff4: ldloc.2 - IL_1ff5: add - IL_1ff6: add - IL_1ff7: stloc.s V_4 - IL_1ff9: ldloc.1 - IL_1ffa: ldc.i4.1 - IL_1ffb: add - IL_1ffc: stloc.1 - IL_1ffd: ldloc.1 - IL_1ffe: ldc.i4.1 - IL_1fff: sub - IL_2000: stloc.1 - IL_2001: br.s IL_203a - IL_2003: ldloc.2 - IL_2004: ldloc.3 - IL_2005: ldloc.s V_4 - IL_2007: add - IL_2008: mul - IL_2009: stloc.2 - IL_200a: ldloc.s V_5 - IL_200c: ldc.i4.1 - IL_200d: add - IL_200e: stloc.s V_5 - IL_2010: ldloc.3 - IL_2011: ldc.i4.m1 - IL_2012: add - IL_2013: stloc.3 - IL_2014: ldloc.s V_4 - IL_2016: ldloc.s V_5 - IL_2018: ldloc.1 - IL_2019: ldc.i4.1 - IL_201a: add - IL_201b: add - IL_201c: add - IL_201d: stloc.s V_4 - IL_201f: ldloc.2 - IL_2020: ldc.i4.1 - IL_2021: add - IL_2022: stloc.2 - IL_2023: ldloc.1 - IL_2024: ldc.i4.2 - IL_2025: sub - IL_2026: stloc.1 - IL_2027: ldloc.2 - IL_2028: ldloc.3 - IL_2029: ldc.i4.1 - IL_202a: sub - IL_202b: ldloc.s V_4 - IL_202d: mul - IL_202e: mul - IL_202f: stloc.2 - IL_2030: ldloc.s V_5 - IL_2032: ldc.i4.1 - IL_2033: add - IL_2034: stloc.s V_5 - IL_2036: ldloc.2 - IL_2037: ldc.i4.1 - IL_2038: add - IL_2039: stloc.2 - IL_203a: ldloc.1 - IL_203b: ldloc.2 - IL_203c: blt.s IL_2078 - IL_203e: ldloc.1 - IL_203f: ldloc.2 - IL_2040: ldloc.3 - IL_2041: sub - IL_2042: add - IL_2043: stloc.1 - IL_2044: ldloc.s V_4 - IL_2046: ldc.i4.1 - IL_2047: add - IL_2048: stloc.s V_4 - IL_204a: ldloc.s V_5 - IL_204c: ldc.i4.1 - IL_204d: sub - IL_204e: stloc.s V_5 - IL_2050: ldloc.s V_5 - IL_2052: ldloc.s V_4 - IL_2054: ldloc.3 - IL_2055: ldc.i4.1 - IL_2056: sub - IL_2057: mul - IL_2058: add - IL_2059: stloc.s V_5 - IL_205b: ldloc.2 - IL_205c: ldc.i4.1 - IL_205d: sub - IL_205e: stloc.2 - IL_205f: ldloc.1 - IL_2060: ldloc.s V_5 - IL_2062: sub - IL_2063: stloc.1 - IL_2064: ldloc.s V_4 - IL_2066: ldloc.3 - IL_2067: ldc.i4.2 - IL_2068: add - IL_2069: ldloc.2 - IL_206a: mul - IL_206b: sub - IL_206c: stloc.s V_4 - IL_206e: ldloc.1 - IL_206f: ldc.i4.1 - IL_2070: add - IL_2071: stloc.1 - IL_2072: ldloc.1 - IL_2073: ldc.i4.1 - IL_2074: sub - IL_2075: stloc.1 - IL_2076: br.s IL_20af - IL_2078: ldloc.2 - IL_2079: ldloc.3 - IL_207a: ldloc.s V_4 - IL_207c: sub - IL_207d: add - IL_207e: stloc.2 - IL_207f: ldloc.s V_5 - IL_2081: ldc.i4.1 - IL_2082: add - IL_2083: stloc.s V_5 - IL_2085: ldloc.3 - IL_2086: ldc.i4.m1 - IL_2087: add - IL_2088: stloc.3 - IL_2089: ldloc.s V_4 - IL_208b: ldloc.s V_5 - IL_208d: ldloc.1 - IL_208e: ldc.i4.1 - IL_208f: add - IL_2090: mul - IL_2091: mul - IL_2092: stloc.s V_4 - IL_2094: ldloc.2 - IL_2095: ldc.i4.1 - IL_2096: add - IL_2097: stloc.2 - IL_2098: ldloc.1 - IL_2099: ldc.i4.2 - IL_209a: sub - IL_209b: stloc.1 - IL_209c: ldloc.2 - IL_209d: ldloc.3 - IL_209e: ldc.i4.1 - IL_209f: sub - IL_20a0: ldloc.s V_4 - IL_20a2: mul - IL_20a3: add - IL_20a4: stloc.2 - IL_20a5: ldloc.s V_5 - IL_20a7: ldc.i4.1 - IL_20a8: add - IL_20a9: stloc.s V_5 - IL_20ab: ldloc.2 - IL_20ac: ldc.i4.1 - IL_20ad: add - IL_20ae: stloc.2 - IL_20af: ldloc.1 - IL_20b0: ldloc.2 - IL_20b1: blt.s IL_20ed - IL_20b3: ldloc.1 - IL_20b4: ldloc.2 - IL_20b5: ldloc.3 - IL_20b6: add - IL_20b7: mul - IL_20b8: stloc.1 - IL_20b9: ldloc.s V_4 - IL_20bb: ldc.i4.1 - IL_20bc: add - IL_20bd: stloc.s V_4 - IL_20bf: ldloc.s V_5 - IL_20c1: ldc.i4.1 - IL_20c2: sub - IL_20c3: stloc.s V_5 - IL_20c5: ldloc.s V_5 - IL_20c7: ldloc.s V_4 - IL_20c9: ldloc.3 - IL_20ca: ldc.i4.1 - IL_20cb: sub - IL_20cc: add - IL_20cd: add - IL_20ce: stloc.s V_5 - IL_20d0: ldloc.2 - IL_20d1: ldc.i4.1 - IL_20d2: sub - IL_20d3: stloc.2 - IL_20d4: ldloc.1 - IL_20d5: ldloc.s V_5 - IL_20d7: sub - IL_20d8: stloc.1 - IL_20d9: ldloc.s V_4 - IL_20db: ldloc.3 - IL_20dc: ldc.i4.2 - IL_20dd: add - IL_20de: ldloc.2 - IL_20df: add - IL_20e0: add - IL_20e1: stloc.s V_4 - IL_20e3: ldloc.1 - IL_20e4: ldc.i4.1 - IL_20e5: add - IL_20e6: stloc.1 - IL_20e7: ldloc.1 - IL_20e8: ldc.i4.1 - IL_20e9: sub - IL_20ea: stloc.1 - IL_20eb: br.s IL_2124 - IL_20ed: ldloc.2 - IL_20ee: ldloc.3 - IL_20ef: ldloc.s V_4 - IL_20f1: add - IL_20f2: add - IL_20f3: stloc.2 - IL_20f4: ldloc.s V_5 - IL_20f6: ldc.i4.1 - IL_20f7: add - IL_20f8: stloc.s V_5 - IL_20fa: ldloc.3 - IL_20fb: ldc.i4.m1 - IL_20fc: add - IL_20fd: stloc.3 - IL_20fe: ldloc.s V_4 - IL_2100: ldloc.s V_5 - IL_2102: ldloc.1 - IL_2103: ldc.i4.1 - IL_2104: add - IL_2105: add - IL_2106: add - IL_2107: stloc.s V_4 - IL_2109: ldloc.2 - IL_210a: ldc.i4.1 - IL_210b: add - IL_210c: stloc.2 - IL_210d: ldloc.1 - IL_210e: ldc.i4.2 - IL_210f: sub - IL_2110: stloc.1 - IL_2111: ldloc.2 - IL_2112: ldloc.3 - IL_2113: ldc.i4.1 - IL_2114: sub - IL_2115: ldloc.s V_4 - IL_2117: mul - IL_2118: add - IL_2119: stloc.2 - IL_211a: ldloc.s V_5 - IL_211c: ldc.i4.1 - IL_211d: add - IL_211e: stloc.s V_5 - IL_2120: ldloc.2 - IL_2121: ldc.i4.1 - IL_2122: add - IL_2123: stloc.2 - IL_2124: ldloc.1 - IL_2125: ldloc.2 - IL_2126: bgt.s IL_2162 - IL_2128: ldloc.1 - IL_2129: ldloc.2 - IL_212a: ldloc.3 - IL_212b: add - IL_212c: add - IL_212d: stloc.1 - IL_212e: ldloc.s V_4 - IL_2130: ldc.i4.1 - IL_2131: add - IL_2132: stloc.s V_4 - IL_2134: ldloc.s V_5 - IL_2136: ldc.i4.1 - IL_2137: sub - IL_2138: stloc.s V_5 - IL_213a: ldloc.s V_5 - IL_213c: ldloc.s V_4 - IL_213e: ldloc.3 - IL_213f: ldc.i4.1 - IL_2140: sub - IL_2141: mul - IL_2142: mul - IL_2143: stloc.s V_5 - IL_2145: ldloc.2 - IL_2146: ldc.i4.1 - IL_2147: sub - IL_2148: stloc.2 - IL_2149: ldloc.1 - IL_214a: ldloc.s V_5 - IL_214c: sub - IL_214d: stloc.1 - IL_214e: ldloc.s V_4 - IL_2150: ldloc.3 - IL_2151: ldc.i4.2 - IL_2152: add - IL_2153: ldloc.2 - IL_2154: mul - IL_2155: sub - IL_2156: stloc.s V_4 - IL_2158: ldloc.1 - IL_2159: ldc.i4.1 - IL_215a: add - IL_215b: stloc.1 - IL_215c: ldloc.1 - IL_215d: ldc.i4.1 - IL_215e: sub - IL_215f: stloc.1 - IL_2160: br.s IL_2199 - IL_2162: ldloc.2 - IL_2163: ldloc.3 - IL_2164: ldloc.s V_4 - IL_2166: sub - IL_2167: mul - IL_2168: stloc.2 - IL_2169: ldloc.s V_5 - IL_216b: ldc.i4.1 - IL_216c: add - IL_216d: stloc.s V_5 - IL_216f: ldloc.3 - IL_2170: ldc.i4.m1 - IL_2171: add - IL_2172: stloc.3 - IL_2173: ldloc.s V_4 - IL_2175: ldloc.s V_5 - IL_2177: ldloc.1 - IL_2178: ldc.i4.1 - IL_2179: add - IL_217a: add - IL_217b: mul - IL_217c: stloc.s V_4 - IL_217e: ldloc.2 - IL_217f: ldc.i4.1 - IL_2180: add - IL_2181: stloc.2 - IL_2182: ldloc.1 - IL_2183: ldc.i4.2 - IL_2184: sub - IL_2185: stloc.1 - IL_2186: ldloc.2 - IL_2187: ldloc.3 - IL_2188: ldc.i4.1 - IL_2189: sub - IL_218a: ldloc.s V_4 - IL_218c: mul - IL_218d: mul - IL_218e: stloc.2 - IL_218f: ldloc.s V_5 - IL_2191: ldc.i4.1 - IL_2192: add - IL_2193: stloc.s V_5 - IL_2195: ldloc.2 - IL_2196: ldc.i4.1 - IL_2197: add - IL_2198: stloc.2 - IL_2199: ldloc.1 - IL_219a: ldloc.2 - IL_219b: ble.s IL_21d7 - IL_219d: ldloc.1 - IL_219e: ldloc.2 - IL_219f: ldloc.3 - IL_21a0: sub - IL_21a1: add - IL_21a2: stloc.1 - IL_21a3: ldloc.s V_4 - IL_21a5: ldc.i4.1 - IL_21a6: add - IL_21a7: stloc.s V_4 - IL_21a9: ldloc.s V_5 - IL_21ab: ldc.i4.1 - IL_21ac: sub - IL_21ad: stloc.s V_5 - IL_21af: ldloc.s V_5 - IL_21b1: ldloc.s V_4 - IL_21b3: ldloc.3 - IL_21b4: ldc.i4.1 - IL_21b5: sub - IL_21b6: add - IL_21b7: sub - IL_21b8: stloc.s V_5 - IL_21ba: ldloc.2 - IL_21bb: ldc.i4.1 - IL_21bc: sub - IL_21bd: stloc.2 - IL_21be: ldloc.1 - IL_21bf: ldloc.s V_5 - IL_21c1: sub - IL_21c2: stloc.1 - IL_21c3: ldloc.s V_4 - IL_21c5: ldloc.3 - IL_21c6: ldc.i4.2 - IL_21c7: add - IL_21c8: ldloc.2 - IL_21c9: add - IL_21ca: mul - IL_21cb: stloc.s V_4 - IL_21cd: ldloc.1 - IL_21ce: ldc.i4.1 - IL_21cf: add - IL_21d0: stloc.1 - IL_21d1: ldloc.1 - IL_21d2: ldc.i4.1 - IL_21d3: sub - IL_21d4: stloc.1 - IL_21d5: br.s IL_220e - IL_21d7: ldloc.2 - IL_21d8: ldloc.3 - IL_21d9: ldloc.s V_4 - IL_21db: mul - IL_21dc: sub - IL_21dd: stloc.2 - IL_21de: ldloc.s V_5 - IL_21e0: ldc.i4.1 - IL_21e1: add - IL_21e2: stloc.s V_5 - IL_21e4: ldloc.3 - IL_21e5: ldc.i4.m1 - IL_21e6: add - IL_21e7: stloc.3 - IL_21e8: ldloc.s V_4 - IL_21ea: ldloc.s V_5 - IL_21ec: ldloc.1 - IL_21ed: ldc.i4.1 - IL_21ee: add - IL_21ef: add - IL_21f0: add - IL_21f1: stloc.s V_4 - IL_21f3: ldloc.2 - IL_21f4: ldc.i4.1 - IL_21f5: add - IL_21f6: stloc.2 - IL_21f7: ldloc.1 - IL_21f8: ldc.i4.2 - IL_21f9: sub - IL_21fa: stloc.1 - IL_21fb: ldloc.2 - IL_21fc: ldloc.3 - IL_21fd: ldc.i4.1 - IL_21fe: sub - IL_21ff: ldloc.s V_4 - IL_2201: add - IL_2202: sub - IL_2203: stloc.2 - IL_2204: ldloc.s V_5 - IL_2206: ldc.i4.1 - IL_2207: add - IL_2208: stloc.s V_5 - IL_220a: ldloc.2 - IL_220b: ldc.i4.1 - IL_220c: add - IL_220d: stloc.2 - IL_220e: ldloc.1 - IL_220f: ldloc.2 - IL_2210: bne.un.s IL_224c - IL_2212: ldloc.1 - IL_2213: ldloc.2 - IL_2214: ldloc.3 - IL_2215: add - IL_2216: add - IL_2217: stloc.1 - IL_2218: ldloc.s V_4 - IL_221a: ldc.i4.1 - IL_221b: add - IL_221c: stloc.s V_4 - IL_221e: ldloc.s V_5 - IL_2220: ldc.i4.1 - IL_2221: sub - IL_2222: stloc.s V_5 - IL_2224: ldloc.s V_5 - IL_2226: ldloc.s V_4 - IL_2228: ldloc.3 - IL_2229: ldc.i4.1 - IL_222a: sub - IL_222b: sub - IL_222c: sub - IL_222d: stloc.s V_5 - IL_222f: ldloc.2 - IL_2230: ldc.i4.1 - IL_2231: sub - IL_2232: stloc.2 - IL_2233: ldloc.1 - IL_2234: ldloc.s V_5 - IL_2236: sub - IL_2237: stloc.1 - IL_2238: ldloc.s V_4 - IL_223a: ldloc.3 - IL_223b: ldc.i4.2 - IL_223c: add - IL_223d: ldloc.2 - IL_223e: sub - IL_223f: sub - IL_2240: stloc.s V_4 - IL_2242: ldloc.1 - IL_2243: ldc.i4.1 - IL_2244: add - IL_2245: stloc.1 - IL_2246: ldloc.1 - IL_2247: ldc.i4.1 - IL_2248: sub - IL_2249: stloc.1 - IL_224a: br.s IL_2283 - IL_224c: ldloc.2 - IL_224d: ldloc.3 - IL_224e: ldloc.s V_4 - IL_2250: sub - IL_2251: sub - IL_2252: stloc.2 - IL_2253: ldloc.s V_5 - IL_2255: ldc.i4.1 - IL_2256: add - IL_2257: stloc.s V_5 - IL_2259: ldloc.3 - IL_225a: ldc.i4.m1 - IL_225b: add - IL_225c: stloc.3 - IL_225d: ldloc.s V_4 - IL_225f: ldloc.s V_5 - IL_2261: ldloc.1 - IL_2262: ldc.i4.1 - IL_2263: add - IL_2264: mul - IL_2265: sub - IL_2266: stloc.s V_4 - IL_2268: ldloc.2 - IL_2269: ldc.i4.1 - IL_226a: add - IL_226b: stloc.2 - IL_226c: ldloc.1 - IL_226d: ldc.i4.2 - IL_226e: sub - IL_226f: stloc.1 - IL_2270: ldloc.2 - IL_2271: ldloc.3 - IL_2272: ldc.i4.1 - IL_2273: sub - IL_2274: ldloc.s V_4 - IL_2276: add - IL_2277: sub - IL_2278: stloc.2 - IL_2279: ldloc.s V_5 - IL_227b: ldc.i4.1 - IL_227c: add - IL_227d: stloc.s V_5 - IL_227f: ldloc.2 - IL_2280: ldc.i4.1 - IL_2281: add - IL_2282: stloc.2 - IL_2283: ldloc.1 - IL_2284: ldloc.2 - IL_2285: ble.s IL_22c1 - IL_2287: ldloc.1 - IL_2288: ldloc.2 - IL_2289: ldloc.3 - IL_228a: mul - IL_228b: sub - IL_228c: stloc.1 - IL_228d: ldloc.s V_4 - IL_228f: ldc.i4.1 - IL_2290: add - IL_2291: stloc.s V_4 - IL_2293: ldloc.s V_5 - IL_2295: ldc.i4.1 - IL_2296: sub - IL_2297: stloc.s V_5 - IL_2299: ldloc.s V_5 - IL_229b: ldloc.s V_4 - IL_229d: ldloc.3 - IL_229e: ldc.i4.1 - IL_229f: sub - IL_22a0: mul - IL_22a1: mul - IL_22a2: stloc.s V_5 - IL_22a4: ldloc.2 - IL_22a5: ldc.i4.1 - IL_22a6: sub - IL_22a7: stloc.2 - IL_22a8: ldloc.1 - IL_22a9: ldloc.s V_5 - IL_22ab: sub - IL_22ac: stloc.1 - IL_22ad: ldloc.s V_4 - IL_22af: ldloc.3 - IL_22b0: ldc.i4.2 - IL_22b1: add - IL_22b2: ldloc.2 - IL_22b3: mul - IL_22b4: add - IL_22b5: stloc.s V_4 - IL_22b7: ldloc.1 - IL_22b8: ldc.i4.1 - IL_22b9: add - IL_22ba: stloc.1 - IL_22bb: ldloc.1 - IL_22bc: ldc.i4.1 - IL_22bd: sub - IL_22be: stloc.1 - IL_22bf: br.s IL_22f8 - IL_22c1: ldloc.2 - IL_22c2: ldloc.3 - IL_22c3: ldloc.s V_4 - IL_22c5: add - IL_22c6: mul - IL_22c7: stloc.2 - IL_22c8: ldloc.s V_5 - IL_22ca: ldc.i4.1 - IL_22cb: add - IL_22cc: stloc.s V_5 - IL_22ce: ldloc.3 - IL_22cf: ldc.i4.m1 - IL_22d0: add - IL_22d1: stloc.3 - IL_22d2: ldloc.s V_4 - IL_22d4: ldloc.s V_5 - IL_22d6: ldloc.1 - IL_22d7: ldc.i4.1 - IL_22d8: add - IL_22d9: add - IL_22da: mul - IL_22db: stloc.s V_4 - IL_22dd: ldloc.2 - IL_22de: ldc.i4.1 - IL_22df: add - IL_22e0: stloc.2 - IL_22e1: ldloc.1 - IL_22e2: ldc.i4.2 - IL_22e3: sub - IL_22e4: stloc.1 - IL_22e5: ldloc.2 - IL_22e6: ldloc.3 - IL_22e7: ldc.i4.1 - IL_22e8: sub - IL_22e9: ldloc.s V_4 - IL_22eb: sub - IL_22ec: mul - IL_22ed: stloc.2 - IL_22ee: ldloc.s V_5 - IL_22f0: ldc.i4.1 - IL_22f1: add - IL_22f2: stloc.s V_5 - IL_22f4: ldloc.2 - IL_22f5: ldc.i4.1 - IL_22f6: add - IL_22f7: stloc.2 - IL_22f8: ldloc.1 - IL_22f9: ldloc.2 - IL_22fa: bgt.s IL_2336 - IL_22fc: ldloc.1 - IL_22fd: ldloc.2 - IL_22fe: ldloc.3 - IL_22ff: add - IL_2300: mul - IL_2301: stloc.1 - IL_2302: ldloc.s V_4 - IL_2304: ldc.i4.1 - IL_2305: add - IL_2306: stloc.s V_4 - IL_2308: ldloc.s V_5 - IL_230a: ldc.i4.1 - IL_230b: sub - IL_230c: stloc.s V_5 - IL_230e: ldloc.s V_5 - IL_2310: ldloc.s V_4 - IL_2312: ldloc.3 - IL_2313: ldc.i4.1 - IL_2314: sub - IL_2315: sub - IL_2316: sub - IL_2317: stloc.s V_5 - IL_2319: ldloc.2 - IL_231a: ldc.i4.1 - IL_231b: sub - IL_231c: stloc.2 - IL_231d: ldloc.1 - IL_231e: ldloc.s V_5 - IL_2320: sub - IL_2321: stloc.1 - IL_2322: ldloc.s V_4 - IL_2324: ldloc.3 - IL_2325: ldc.i4.2 - IL_2326: add - IL_2327: ldloc.2 - IL_2328: sub - IL_2329: mul - IL_232a: stloc.s V_4 - IL_232c: ldloc.1 - IL_232d: ldc.i4.1 - IL_232e: add - IL_232f: stloc.1 - IL_2330: ldloc.1 - IL_2331: ldc.i4.1 - IL_2332: sub - IL_2333: stloc.1 - IL_2334: br.s IL_236d - IL_2336: ldloc.2 - IL_2337: ldloc.3 - IL_2338: ldloc.s V_4 - IL_233a: mul - IL_233b: sub - IL_233c: stloc.2 - IL_233d: ldloc.s V_5 - IL_233f: ldc.i4.1 - IL_2340: add - IL_2341: stloc.s V_5 - IL_2343: ldloc.3 - IL_2344: ldc.i4.m1 - IL_2345: add - IL_2346: stloc.3 - IL_2347: ldloc.s V_4 - IL_2349: ldloc.s V_5 - IL_234b: ldloc.1 - IL_234c: ldc.i4.1 - IL_234d: add - IL_234e: add - IL_234f: sub - IL_2350: stloc.s V_4 - IL_2352: ldloc.2 - IL_2353: ldc.i4.1 - IL_2354: add - IL_2355: stloc.2 - IL_2356: ldloc.1 - IL_2357: ldc.i4.2 - IL_2358: sub - IL_2359: stloc.1 - IL_235a: ldloc.2 - IL_235b: ldloc.3 - IL_235c: ldc.i4.1 - IL_235d: sub - IL_235e: ldloc.s V_4 - IL_2360: mul - IL_2361: sub - IL_2362: stloc.2 - IL_2363: ldloc.s V_5 - IL_2365: ldc.i4.1 - IL_2366: add - IL_2367: stloc.s V_5 - IL_2369: ldloc.2 - IL_236a: ldc.i4.1 - IL_236b: add - IL_236c: stloc.2 - IL_236d: ldloc.1 - IL_236e: ldloc.2 - IL_236f: ble.s IL_23ab - IL_2371: ldloc.1 - IL_2372: ldloc.2 - IL_2373: ldloc.3 - IL_2374: mul - IL_2375: add - IL_2376: stloc.1 - IL_2377: ldloc.s V_4 - IL_2379: ldc.i4.1 - IL_237a: add - IL_237b: stloc.s V_4 - IL_237d: ldloc.s V_5 - IL_237f: ldc.i4.1 - IL_2380: sub - IL_2381: stloc.s V_5 - IL_2383: ldloc.s V_5 - IL_2385: ldloc.s V_4 - IL_2387: ldloc.3 - IL_2388: ldc.i4.1 - IL_2389: sub - IL_238a: mul - IL_238b: sub - IL_238c: stloc.s V_5 - IL_238e: ldloc.2 - IL_238f: ldc.i4.1 - IL_2390: sub - IL_2391: stloc.2 - IL_2392: ldloc.1 - IL_2393: ldloc.s V_5 - IL_2395: sub - IL_2396: stloc.1 - IL_2397: ldloc.s V_4 - IL_2399: ldloc.3 - IL_239a: ldc.i4.2 - IL_239b: add - IL_239c: ldloc.2 - IL_239d: mul - IL_239e: sub - IL_239f: stloc.s V_4 - IL_23a1: ldloc.1 - IL_23a2: ldc.i4.1 - IL_23a3: add - IL_23a4: stloc.1 - IL_23a5: ldloc.1 - IL_23a6: ldc.i4.1 - IL_23a7: sub - IL_23a8: stloc.1 - IL_23a9: br.s IL_23e2 - IL_23ab: ldloc.2 - IL_23ac: ldloc.3 - IL_23ad: ldloc.s V_4 - IL_23af: sub - IL_23b0: sub - IL_23b1: stloc.2 - IL_23b2: ldloc.s V_5 - IL_23b4: ldc.i4.1 - IL_23b5: add - IL_23b6: stloc.s V_5 - IL_23b8: ldloc.3 - IL_23b9: ldc.i4.m1 - IL_23ba: add - IL_23bb: stloc.3 - IL_23bc: ldloc.s V_4 - IL_23be: ldloc.s V_5 - IL_23c0: ldloc.1 - IL_23c1: ldc.i4.1 - IL_23c2: add - IL_23c3: sub - IL_23c4: mul - IL_23c5: stloc.s V_4 - IL_23c7: ldloc.2 - IL_23c8: ldc.i4.1 - IL_23c9: add - IL_23ca: stloc.2 - IL_23cb: ldloc.1 - IL_23cc: ldc.i4.2 - IL_23cd: sub - IL_23ce: stloc.1 - IL_23cf: ldloc.2 - IL_23d0: ldloc.3 - IL_23d1: ldc.i4.1 - IL_23d2: sub - IL_23d3: ldloc.s V_4 - IL_23d5: sub - IL_23d6: sub - IL_23d7: stloc.2 - IL_23d8: ldloc.s V_5 - IL_23da: ldc.i4.1 - IL_23db: add - IL_23dc: stloc.s V_5 - IL_23de: ldloc.2 - IL_23df: ldc.i4.1 - IL_23e0: add - IL_23e1: stloc.2 - IL_23e2: ldloc.1 - IL_23e3: ldloc.2 - IL_23e4: bgt.s IL_2420 - IL_23e6: ldloc.1 - IL_23e7: ldloc.2 - IL_23e8: ldloc.3 - IL_23e9: add - IL_23ea: add - IL_23eb: stloc.1 - IL_23ec: ldloc.s V_4 - IL_23ee: ldc.i4.1 - IL_23ef: add - IL_23f0: stloc.s V_4 - IL_23f2: ldloc.s V_5 - IL_23f4: ldc.i4.1 - IL_23f5: sub - IL_23f6: stloc.s V_5 - IL_23f8: ldloc.s V_5 - IL_23fa: ldloc.s V_4 - IL_23fc: ldloc.3 - IL_23fd: ldc.i4.1 - IL_23fe: sub - IL_23ff: mul - IL_2400: sub - IL_2401: stloc.s V_5 - IL_2403: ldloc.2 - IL_2404: ldc.i4.1 - IL_2405: sub - IL_2406: stloc.2 - IL_2407: ldloc.1 - IL_2408: ldloc.s V_5 - IL_240a: sub - IL_240b: stloc.1 - IL_240c: ldloc.s V_4 - IL_240e: ldloc.3 - IL_240f: ldc.i4.2 - IL_2410: add - IL_2411: ldloc.2 - IL_2412: mul - IL_2413: mul - IL_2414: stloc.s V_4 - IL_2416: ldloc.1 - IL_2417: ldc.i4.1 - IL_2418: add - IL_2419: stloc.1 - IL_241a: ldloc.1 - IL_241b: ldc.i4.1 - IL_241c: sub - IL_241d: stloc.1 - IL_241e: br.s IL_2457 - IL_2420: ldloc.2 - IL_2421: ldloc.3 - IL_2422: ldloc.s V_4 - IL_2424: mul - IL_2425: sub - IL_2426: stloc.2 - IL_2427: ldloc.s V_5 - IL_2429: ldc.i4.1 - IL_242a: add - IL_242b: stloc.s V_5 - IL_242d: ldloc.3 - IL_242e: ldc.i4.m1 - IL_242f: add - IL_2430: stloc.3 - IL_2431: ldloc.s V_4 - IL_2433: ldloc.s V_5 - IL_2435: ldloc.1 - IL_2436: ldc.i4.1 - IL_2437: add - IL_2438: sub - IL_2439: mul - IL_243a: stloc.s V_4 - IL_243c: ldloc.2 - IL_243d: ldc.i4.1 - IL_243e: add - IL_243f: stloc.2 - IL_2440: ldloc.1 - IL_2441: ldc.i4.2 - IL_2442: sub - IL_2443: stloc.1 - IL_2444: ldloc.2 - IL_2445: ldloc.3 - IL_2446: ldc.i4.1 - IL_2447: sub - IL_2448: ldloc.s V_4 - IL_244a: add - IL_244b: sub - IL_244c: stloc.2 - IL_244d: ldloc.s V_5 - IL_244f: ldc.i4.1 - IL_2450: add - IL_2451: stloc.s V_5 - IL_2453: ldloc.2 - IL_2454: ldc.i4.1 - IL_2455: add - IL_2456: stloc.2 - IL_2457: ldloc.1 - IL_2458: ldloc.2 - IL_2459: ble.s IL_2495 - IL_245b: ldloc.1 - IL_245c: ldloc.2 - IL_245d: ldloc.3 - IL_245e: add - IL_245f: sub - IL_2460: stloc.1 - IL_2461: ldloc.s V_4 - IL_2463: ldc.i4.1 - IL_2464: add - IL_2465: stloc.s V_4 - IL_2467: ldloc.s V_5 - IL_2469: ldc.i4.1 - IL_246a: sub - IL_246b: stloc.s V_5 - IL_246d: ldloc.s V_5 - IL_246f: ldloc.s V_4 - IL_2471: ldloc.3 - IL_2472: ldc.i4.1 - IL_2473: sub - IL_2474: sub - IL_2475: add - IL_2476: stloc.s V_5 - IL_2478: ldloc.2 - IL_2479: ldc.i4.1 - IL_247a: sub - IL_247b: stloc.2 - IL_247c: ldloc.1 - IL_247d: ldloc.s V_5 - IL_247f: sub - IL_2480: stloc.1 - IL_2481: ldloc.s V_4 - IL_2483: ldloc.3 - IL_2484: ldc.i4.2 - IL_2485: add - IL_2486: ldloc.2 - IL_2487: sub - IL_2488: add - IL_2489: stloc.s V_4 - IL_248b: ldloc.1 - IL_248c: ldc.i4.1 - IL_248d: add - IL_248e: stloc.1 - IL_248f: ldloc.1 - IL_2490: ldc.i4.1 - IL_2491: sub - IL_2492: stloc.1 - IL_2493: br.s IL_24cc - IL_2495: ldloc.2 - IL_2496: ldloc.3 - IL_2497: ldloc.s V_4 - IL_2499: add - IL_249a: add - IL_249b: stloc.2 - IL_249c: ldloc.s V_5 - IL_249e: ldc.i4.1 - IL_249f: add - IL_24a0: stloc.s V_5 - IL_24a2: ldloc.3 - IL_24a3: ldc.i4.m1 - IL_24a4: add - IL_24a5: stloc.3 - IL_24a6: ldloc.s V_4 - IL_24a8: ldloc.s V_5 - IL_24aa: ldloc.1 - IL_24ab: ldc.i4.1 - IL_24ac: add - IL_24ad: add - IL_24ae: sub - IL_24af: stloc.s V_4 - IL_24b1: ldloc.2 - IL_24b2: ldc.i4.1 - IL_24b3: add - IL_24b4: stloc.2 - IL_24b5: ldloc.1 - IL_24b6: ldc.i4.2 - IL_24b7: sub - IL_24b8: stloc.1 - IL_24b9: ldloc.2 - IL_24ba: ldloc.3 - IL_24bb: ldc.i4.1 - IL_24bc: sub - IL_24bd: ldloc.s V_4 - IL_24bf: add - IL_24c0: add - IL_24c1: stloc.2 - IL_24c2: ldloc.s V_5 - IL_24c4: ldc.i4.1 - IL_24c5: add - IL_24c6: stloc.s V_5 - IL_24c8: ldloc.2 - IL_24c9: ldc.i4.1 - IL_24ca: add - IL_24cb: stloc.2 - IL_24cc: ldloc.1 - IL_24cd: ldloc.2 - IL_24ce: beq.s IL_250a - IL_24d0: ldloc.1 - IL_24d1: ldloc.2 - IL_24d2: ldloc.3 - IL_24d3: sub - IL_24d4: add - IL_24d5: stloc.1 - IL_24d6: ldloc.s V_4 - IL_24d8: ldc.i4.1 - IL_24d9: add - IL_24da: stloc.s V_4 - IL_24dc: ldloc.s V_5 - IL_24de: ldc.i4.1 - IL_24df: sub - IL_24e0: stloc.s V_5 - IL_24e2: ldloc.s V_5 - IL_24e4: ldloc.s V_4 - IL_24e6: ldloc.3 - IL_24e7: ldc.i4.1 - IL_24e8: sub - IL_24e9: add - IL_24ea: mul - IL_24eb: stloc.s V_5 - IL_24ed: ldloc.2 - IL_24ee: ldc.i4.1 - IL_24ef: sub - IL_24f0: stloc.2 - IL_24f1: ldloc.1 - IL_24f2: ldloc.s V_5 - IL_24f4: sub - IL_24f5: stloc.1 - IL_24f6: ldloc.s V_4 - IL_24f8: ldloc.3 - IL_24f9: ldc.i4.2 - IL_24fa: add - IL_24fb: ldloc.2 - IL_24fc: add - IL_24fd: add - IL_24fe: stloc.s V_4 - IL_2500: ldloc.1 - IL_2501: ldc.i4.1 - IL_2502: add - IL_2503: stloc.1 - IL_2504: ldloc.1 - IL_2505: ldc.i4.1 - IL_2506: sub - IL_2507: stloc.1 - IL_2508: br.s IL_2541 - IL_250a: ldloc.2 - IL_250b: ldloc.3 - IL_250c: ldloc.s V_4 - IL_250e: add - IL_250f: mul - IL_2510: stloc.2 - IL_2511: ldloc.s V_5 - IL_2513: ldc.i4.1 - IL_2514: add - IL_2515: stloc.s V_5 - IL_2517: ldloc.3 - IL_2518: ldc.i4.m1 - IL_2519: add - IL_251a: stloc.3 - IL_251b: ldloc.s V_4 - IL_251d: ldloc.s V_5 - IL_251f: ldloc.1 - IL_2520: ldc.i4.1 - IL_2521: add - IL_2522: sub - IL_2523: add - IL_2524: stloc.s V_4 - IL_2526: ldloc.2 - IL_2527: ldc.i4.1 - IL_2528: add - IL_2529: stloc.2 - IL_252a: ldloc.1 - IL_252b: ldc.i4.2 - IL_252c: sub - IL_252d: stloc.1 - IL_252e: ldloc.2 - IL_252f: ldloc.3 - IL_2530: ldc.i4.1 - IL_2531: sub - IL_2532: ldloc.s V_4 - IL_2534: mul - IL_2535: mul - IL_2536: stloc.2 - IL_2537: ldloc.s V_5 - IL_2539: ldc.i4.1 - IL_253a: add - IL_253b: stloc.s V_5 - IL_253d: ldloc.2 - IL_253e: ldc.i4.1 - IL_253f: add - IL_2540: stloc.2 - IL_2541: ldloc.1 - IL_2542: ldloc.2 - IL_2543: ble.s IL_257f - IL_2545: ldloc.1 - IL_2546: ldloc.2 - IL_2547: ldloc.3 - IL_2548: add - IL_2549: mul - IL_254a: stloc.1 - IL_254b: ldloc.s V_4 - IL_254d: ldc.i4.1 - IL_254e: add - IL_254f: stloc.s V_4 - IL_2551: ldloc.s V_5 - IL_2553: ldc.i4.1 - IL_2554: sub - IL_2555: stloc.s V_5 - IL_2557: ldloc.s V_5 - IL_2559: ldloc.s V_4 - IL_255b: ldloc.3 - IL_255c: ldc.i4.1 - IL_255d: sub - IL_255e: add - IL_255f: mul - IL_2560: stloc.s V_5 - IL_2562: ldloc.2 - IL_2563: ldc.i4.1 - IL_2564: sub - IL_2565: stloc.2 - IL_2566: ldloc.1 - IL_2567: ldloc.s V_5 - IL_2569: sub - IL_256a: stloc.1 - IL_256b: ldloc.s V_4 - IL_256d: ldloc.3 - IL_256e: ldc.i4.2 - IL_256f: add - IL_2570: ldloc.2 - IL_2571: add - IL_2572: add - IL_2573: stloc.s V_4 - IL_2575: ldloc.1 - IL_2576: ldc.i4.1 - IL_2577: add - IL_2578: stloc.1 - IL_2579: ldloc.1 - IL_257a: ldc.i4.1 - IL_257b: sub - IL_257c: stloc.1 - IL_257d: br.s IL_25b6 - IL_257f: ldloc.2 - IL_2580: ldloc.3 - IL_2581: ldloc.s V_4 - IL_2583: add - IL_2584: mul - IL_2585: stloc.2 - IL_2586: ldloc.s V_5 - IL_2588: ldc.i4.1 - IL_2589: add - IL_258a: stloc.s V_5 - IL_258c: ldloc.3 - IL_258d: ldc.i4.m1 - IL_258e: add - IL_258f: stloc.3 - IL_2590: ldloc.s V_4 - IL_2592: ldloc.s V_5 - IL_2594: ldloc.1 - IL_2595: ldc.i4.1 - IL_2596: add - IL_2597: add - IL_2598: add - IL_2599: stloc.s V_4 - IL_259b: ldloc.2 - IL_259c: ldc.i4.1 - IL_259d: add - IL_259e: stloc.2 - IL_259f: ldloc.1 - IL_25a0: ldc.i4.2 - IL_25a1: sub - IL_25a2: stloc.1 - IL_25a3: ldloc.2 - IL_25a4: ldloc.3 - IL_25a5: ldc.i4.1 - IL_25a6: sub - IL_25a7: ldloc.s V_4 - IL_25a9: sub - IL_25aa: mul - IL_25ab: stloc.2 - IL_25ac: ldloc.s V_5 - IL_25ae: ldc.i4.1 - IL_25af: add - IL_25b0: stloc.s V_5 - IL_25b2: ldloc.2 - IL_25b3: ldc.i4.1 - IL_25b4: add - IL_25b5: stloc.2 - IL_25b6: ldloc.1 - IL_25b7: ldloc.2 - IL_25b8: bne.un.s IL_25f4 - IL_25ba: ldloc.1 - IL_25bb: ldloc.2 - IL_25bc: ldloc.3 - IL_25bd: sub - IL_25be: sub - IL_25bf: stloc.1 - IL_25c0: ldloc.s V_4 - IL_25c2: ldc.i4.1 - IL_25c3: add - IL_25c4: stloc.s V_4 - IL_25c6: ldloc.s V_5 - IL_25c8: ldc.i4.1 - IL_25c9: sub - IL_25ca: stloc.s V_5 - IL_25cc: ldloc.s V_5 - IL_25ce: ldloc.s V_4 - IL_25d0: ldloc.3 - IL_25d1: ldc.i4.1 - IL_25d2: sub - IL_25d3: mul - IL_25d4: sub - IL_25d5: stloc.s V_5 - IL_25d7: ldloc.2 - IL_25d8: ldc.i4.1 - IL_25d9: sub - IL_25da: stloc.2 - IL_25db: ldloc.1 - IL_25dc: ldloc.s V_5 - IL_25de: sub - IL_25df: stloc.1 - IL_25e0: ldloc.s V_4 - IL_25e2: ldloc.3 - IL_25e3: ldc.i4.2 - IL_25e4: add - IL_25e5: ldloc.2 - IL_25e6: mul - IL_25e7: mul - IL_25e8: stloc.s V_4 - IL_25ea: ldloc.1 - IL_25eb: ldc.i4.1 - IL_25ec: add - IL_25ed: stloc.1 - IL_25ee: ldloc.1 - IL_25ef: ldc.i4.1 - IL_25f0: sub - IL_25f1: stloc.1 - IL_25f2: br.s IL_262b - IL_25f4: ldloc.2 - IL_25f5: ldloc.3 - IL_25f6: ldloc.s V_4 - IL_25f8: mul - IL_25f9: sub - IL_25fa: stloc.2 - IL_25fb: ldloc.s V_5 - IL_25fd: ldc.i4.1 - IL_25fe: add - IL_25ff: stloc.s V_5 - IL_2601: ldloc.3 - IL_2602: ldc.i4.m1 - IL_2603: add - IL_2604: stloc.3 - IL_2605: ldloc.s V_4 - IL_2607: ldloc.s V_5 - IL_2609: ldloc.1 - IL_260a: ldc.i4.1 - IL_260b: add - IL_260c: sub - IL_260d: mul - IL_260e: stloc.s V_4 - IL_2610: ldloc.2 - IL_2611: ldc.i4.1 - IL_2612: add - IL_2613: stloc.2 - IL_2614: ldloc.1 - IL_2615: ldc.i4.2 - IL_2616: sub - IL_2617: stloc.1 - IL_2618: ldloc.2 - IL_2619: ldloc.3 - IL_261a: ldc.i4.1 - IL_261b: sub - IL_261c: ldloc.s V_4 - IL_261e: sub - IL_261f: sub - IL_2620: stloc.2 - IL_2621: ldloc.s V_5 - IL_2623: ldc.i4.1 - IL_2624: add - IL_2625: stloc.s V_5 - IL_2627: ldloc.2 - IL_2628: ldc.i4.1 - IL_2629: add - IL_262a: stloc.2 - IL_262b: ldloc.1 - IL_262c: ldloc.2 - IL_262d: blt.s IL_2669 - IL_262f: ldloc.1 - IL_2630: ldloc.2 - IL_2631: ldloc.3 - IL_2632: mul - IL_2633: sub - IL_2634: stloc.1 - IL_2635: ldloc.s V_4 - IL_2637: ldc.i4.1 - IL_2638: add - IL_2639: stloc.s V_4 - IL_263b: ldloc.s V_5 - IL_263d: ldc.i4.1 - IL_263e: sub - IL_263f: stloc.s V_5 - IL_2641: ldloc.s V_5 - IL_2643: ldloc.s V_4 - IL_2645: ldloc.3 - IL_2646: ldc.i4.1 - IL_2647: sub - IL_2648: mul - IL_2649: mul - IL_264a: stloc.s V_5 - IL_264c: ldloc.2 - IL_264d: ldc.i4.1 - IL_264e: sub - IL_264f: stloc.2 - IL_2650: ldloc.1 - IL_2651: ldloc.s V_5 - IL_2653: sub - IL_2654: stloc.1 - IL_2655: ldloc.s V_4 - IL_2657: ldloc.3 - IL_2658: ldc.i4.2 - IL_2659: add - IL_265a: ldloc.2 - IL_265b: mul - IL_265c: mul - IL_265d: stloc.s V_4 - IL_265f: ldloc.1 - IL_2660: ldc.i4.1 - IL_2661: add - IL_2662: stloc.1 - IL_2663: ldloc.1 - IL_2664: ldc.i4.1 - IL_2665: sub - IL_2666: stloc.1 - IL_2667: br.s IL_26a0 - IL_2669: ldloc.2 - IL_266a: ldloc.3 - IL_266b: ldloc.s V_4 - IL_266d: mul - IL_266e: mul - IL_266f: stloc.2 - IL_2670: ldloc.s V_5 - IL_2672: ldc.i4.1 - IL_2673: add - IL_2674: stloc.s V_5 - IL_2676: ldloc.3 - IL_2677: ldc.i4.m1 - IL_2678: add - IL_2679: stloc.3 - IL_267a: ldloc.s V_4 - IL_267c: ldloc.s V_5 - IL_267e: ldloc.1 - IL_267f: ldc.i4.1 - IL_2680: add - IL_2681: add - IL_2682: mul - IL_2683: stloc.s V_4 - IL_2685: ldloc.2 - IL_2686: ldc.i4.1 - IL_2687: add - IL_2688: stloc.2 - IL_2689: ldloc.1 - IL_268a: ldc.i4.2 - IL_268b: sub - IL_268c: stloc.1 - IL_268d: ldloc.2 - IL_268e: ldloc.3 - IL_268f: ldc.i4.1 - IL_2690: sub - IL_2691: ldloc.s V_4 - IL_2693: mul - IL_2694: mul - IL_2695: stloc.2 - IL_2696: ldloc.s V_5 - IL_2698: ldc.i4.1 - IL_2699: add - IL_269a: stloc.s V_5 - IL_269c: ldloc.2 - IL_269d: ldc.i4.1 - IL_269e: add - IL_269f: stloc.2 - IL_26a0: ldloc.1 - IL_26a1: ldloc.2 - IL_26a2: ble.s IL_26de - IL_26a4: ldloc.1 - IL_26a5: ldloc.2 - IL_26a6: ldloc.3 - IL_26a7: mul - IL_26a8: sub - IL_26a9: stloc.1 - IL_26aa: ldloc.s V_4 - IL_26ac: ldc.i4.1 - IL_26ad: add - IL_26ae: stloc.s V_4 - IL_26b0: ldloc.s V_5 - IL_26b2: ldc.i4.1 - IL_26b3: sub - IL_26b4: stloc.s V_5 - IL_26b6: ldloc.s V_5 - IL_26b8: ldloc.s V_4 - IL_26ba: ldloc.3 - IL_26bb: ldc.i4.1 - IL_26bc: sub - IL_26bd: mul - IL_26be: mul - IL_26bf: stloc.s V_5 - IL_26c1: ldloc.2 - IL_26c2: ldc.i4.1 - IL_26c3: sub - IL_26c4: stloc.2 - IL_26c5: ldloc.1 - IL_26c6: ldloc.s V_5 - IL_26c8: sub - IL_26c9: stloc.1 - IL_26ca: ldloc.s V_4 - IL_26cc: ldloc.3 - IL_26cd: ldc.i4.2 - IL_26ce: add - IL_26cf: ldloc.2 - IL_26d0: mul - IL_26d1: add - IL_26d2: stloc.s V_4 - IL_26d4: ldloc.1 - IL_26d5: ldc.i4.1 - IL_26d6: add - IL_26d7: stloc.1 - IL_26d8: ldloc.1 - IL_26d9: ldc.i4.1 - IL_26da: sub - IL_26db: stloc.1 - IL_26dc: br.s IL_2715 - IL_26de: ldloc.2 - IL_26df: ldloc.3 - IL_26e0: ldloc.s V_4 - IL_26e2: add - IL_26e3: mul - IL_26e4: stloc.2 - IL_26e5: ldloc.s V_5 - IL_26e7: ldc.i4.1 - IL_26e8: add - IL_26e9: stloc.s V_5 - IL_26eb: ldloc.3 - IL_26ec: ldc.i4.m1 - IL_26ed: add - IL_26ee: stloc.3 - IL_26ef: ldloc.s V_4 - IL_26f1: ldloc.s V_5 - IL_26f3: ldloc.1 - IL_26f4: ldc.i4.1 - IL_26f5: add - IL_26f6: add - IL_26f7: mul - IL_26f8: stloc.s V_4 - IL_26fa: ldloc.2 - IL_26fb: ldc.i4.1 - IL_26fc: add - IL_26fd: stloc.2 - IL_26fe: ldloc.1 - IL_26ff: ldc.i4.2 - IL_2700: sub - IL_2701: stloc.1 - IL_2702: ldloc.2 - IL_2703: ldloc.3 - IL_2704: ldc.i4.1 - IL_2705: sub - IL_2706: ldloc.s V_4 - IL_2708: sub - IL_2709: mul - IL_270a: stloc.2 - IL_270b: ldloc.s V_5 - IL_270d: ldc.i4.1 - IL_270e: add - IL_270f: stloc.s V_5 - IL_2711: ldloc.2 - IL_2712: ldc.i4.1 - IL_2713: add - IL_2714: stloc.2 - IL_2715: ldloc.1 - IL_2716: ldloc.2 - IL_2717: bgt.s IL_2753 - IL_2719: ldloc.1 - IL_271a: ldloc.2 - IL_271b: ldloc.3 - IL_271c: mul - IL_271d: sub - IL_271e: stloc.1 - IL_271f: ldloc.s V_4 - IL_2721: ldc.i4.1 - IL_2722: add - IL_2723: stloc.s V_4 - IL_2725: ldloc.s V_5 - IL_2727: ldc.i4.1 - IL_2728: sub - IL_2729: stloc.s V_5 - IL_272b: ldloc.s V_5 - IL_272d: ldloc.s V_4 - IL_272f: ldloc.3 - IL_2730: ldc.i4.1 - IL_2731: sub - IL_2732: add - IL_2733: mul - IL_2734: stloc.s V_5 - IL_2736: ldloc.2 - IL_2737: ldc.i4.1 - IL_2738: sub - IL_2739: stloc.2 - IL_273a: ldloc.1 - IL_273b: ldloc.s V_5 - IL_273d: sub - IL_273e: stloc.1 - IL_273f: ldloc.s V_4 - IL_2741: ldloc.3 - IL_2742: ldc.i4.2 - IL_2743: add - IL_2744: ldloc.2 - IL_2745: add - IL_2746: add - IL_2747: stloc.s V_4 - IL_2749: ldloc.1 - IL_274a: ldc.i4.1 - IL_274b: add - IL_274c: stloc.1 - IL_274d: ldloc.1 - IL_274e: ldc.i4.1 - IL_274f: sub - IL_2750: stloc.1 - IL_2751: br.s IL_278a - IL_2753: ldloc.2 - IL_2754: ldloc.3 - IL_2755: ldloc.s V_4 - IL_2757: add - IL_2758: mul - IL_2759: stloc.2 - IL_275a: ldloc.s V_5 - IL_275c: ldc.i4.1 - IL_275d: add - IL_275e: stloc.s V_5 - IL_2760: ldloc.3 - IL_2761: ldc.i4.m1 - IL_2762: add - IL_2763: stloc.3 - IL_2764: ldloc.s V_4 - IL_2766: ldloc.s V_5 - IL_2768: ldloc.1 - IL_2769: ldc.i4.1 - IL_276a: add - IL_276b: mul - IL_276c: add - IL_276d: stloc.s V_4 - IL_276f: ldloc.2 - IL_2770: ldc.i4.1 - IL_2771: add - IL_2772: stloc.2 - IL_2773: ldloc.1 - IL_2774: ldc.i4.2 - IL_2775: sub - IL_2776: stloc.1 - IL_2777: ldloc.2 - IL_2778: ldloc.3 - IL_2779: ldc.i4.1 - IL_277a: sub - IL_277b: ldloc.s V_4 - IL_277d: add - IL_277e: mul - IL_277f: stloc.2 - IL_2780: ldloc.s V_5 - IL_2782: ldc.i4.1 - IL_2783: add - IL_2784: stloc.s V_5 - IL_2786: ldloc.2 - IL_2787: ldc.i4.1 - IL_2788: add - IL_2789: stloc.2 - IL_278a: ldloc.1 - IL_278b: ldloc.2 - IL_278c: bge.s IL_27c8 - IL_278e: ldloc.1 - IL_278f: ldloc.2 - IL_2790: ldloc.3 - IL_2791: add - IL_2792: sub - IL_2793: stloc.1 - IL_2794: ldloc.s V_4 - IL_2796: ldc.i4.1 - IL_2797: add - IL_2798: stloc.s V_4 - IL_279a: ldloc.s V_5 - IL_279c: ldc.i4.1 - IL_279d: sub - IL_279e: stloc.s V_5 - IL_27a0: ldloc.s V_5 - IL_27a2: ldloc.s V_4 - IL_27a4: ldloc.3 - IL_27a5: ldc.i4.1 - IL_27a6: sub - IL_27a7: mul - IL_27a8: sub - IL_27a9: stloc.s V_5 - IL_27ab: ldloc.2 - IL_27ac: ldc.i4.1 - IL_27ad: sub - IL_27ae: stloc.2 - IL_27af: ldloc.1 - IL_27b0: ldloc.s V_5 - IL_27b2: sub - IL_27b3: stloc.1 - IL_27b4: ldloc.s V_4 - IL_27b6: ldloc.3 - IL_27b7: ldc.i4.2 - IL_27b8: add - IL_27b9: ldloc.2 - IL_27ba: mul - IL_27bb: sub - IL_27bc: stloc.s V_4 - IL_27be: ldloc.1 - IL_27bf: ldc.i4.1 - IL_27c0: add - IL_27c1: stloc.1 - IL_27c2: ldloc.1 - IL_27c3: ldc.i4.1 - IL_27c4: sub - IL_27c5: stloc.1 - IL_27c6: br.s IL_27ff - IL_27c8: ldloc.2 - IL_27c9: ldloc.3 - IL_27ca: ldloc.s V_4 - IL_27cc: sub - IL_27cd: sub - IL_27ce: stloc.2 - IL_27cf: ldloc.s V_5 - IL_27d1: ldc.i4.1 - IL_27d2: add - IL_27d3: stloc.s V_5 - IL_27d5: ldloc.3 - IL_27d6: ldc.i4.m1 - IL_27d7: add - IL_27d8: stloc.3 - IL_27d9: ldloc.s V_4 - IL_27db: ldloc.s V_5 - IL_27dd: ldloc.1 - IL_27de: ldc.i4.1 - IL_27df: add - IL_27e0: add - IL_27e1: mul - IL_27e2: stloc.s V_4 - IL_27e4: ldloc.2 - IL_27e5: ldc.i4.1 - IL_27e6: add - IL_27e7: stloc.2 - IL_27e8: ldloc.1 - IL_27e9: ldc.i4.2 - IL_27ea: sub - IL_27eb: stloc.1 - IL_27ec: ldloc.2 - IL_27ed: ldloc.3 - IL_27ee: ldc.i4.1 - IL_27ef: sub - IL_27f0: ldloc.s V_4 - IL_27f2: mul - IL_27f3: sub - IL_27f4: stloc.2 - IL_27f5: ldloc.s V_5 - IL_27f7: ldc.i4.1 - IL_27f8: add - IL_27f9: stloc.s V_5 - IL_27fb: ldloc.2 - IL_27fc: ldc.i4.1 - IL_27fd: add - IL_27fe: stloc.2 - IL_27ff: ldloc.1 - IL_2800: ldloc.2 - IL_2801: blt.s IL_283d - IL_2803: ldloc.1 - IL_2804: ldloc.2 - IL_2805: ldloc.3 - IL_2806: sub - IL_2807: add - IL_2808: stloc.1 - IL_2809: ldloc.s V_4 - IL_280b: ldc.i4.1 - IL_280c: add - IL_280d: stloc.s V_4 - IL_280f: ldloc.s V_5 - IL_2811: ldc.i4.1 - IL_2812: sub - IL_2813: stloc.s V_5 - IL_2815: ldloc.s V_5 - IL_2817: ldloc.s V_4 - IL_2819: ldloc.3 - IL_281a: ldc.i4.1 - IL_281b: sub - IL_281c: add - IL_281d: add - IL_281e: stloc.s V_5 - IL_2820: ldloc.2 - IL_2821: ldc.i4.1 - IL_2822: sub - IL_2823: stloc.2 - IL_2824: ldloc.1 - IL_2825: ldloc.s V_5 - IL_2827: sub - IL_2828: stloc.1 - IL_2829: ldloc.s V_4 - IL_282b: ldloc.3 - IL_282c: ldc.i4.2 - IL_282d: add - IL_282e: ldloc.2 - IL_282f: add - IL_2830: mul - IL_2831: stloc.s V_4 - IL_2833: ldloc.1 - IL_2834: ldc.i4.1 - IL_2835: add - IL_2836: stloc.1 - IL_2837: ldloc.1 - IL_2838: ldc.i4.1 - IL_2839: sub - IL_283a: stloc.1 - IL_283b: br.s IL_2874 - IL_283d: ldloc.2 - IL_283e: ldloc.3 - IL_283f: ldloc.s V_4 - IL_2841: mul - IL_2842: add - IL_2843: stloc.2 - IL_2844: ldloc.s V_5 - IL_2846: ldc.i4.1 - IL_2847: add - IL_2848: stloc.s V_5 - IL_284a: ldloc.3 - IL_284b: ldc.i4.m1 - IL_284c: add - IL_284d: stloc.3 - IL_284e: ldloc.s V_4 - IL_2850: ldloc.s V_5 - IL_2852: ldloc.1 - IL_2853: ldc.i4.1 - IL_2854: add - IL_2855: mul - IL_2856: add - IL_2857: stloc.s V_4 - IL_2859: ldloc.2 - IL_285a: ldc.i4.1 - IL_285b: add - IL_285c: stloc.2 - IL_285d: ldloc.1 - IL_285e: ldc.i4.2 - IL_285f: sub - IL_2860: stloc.1 - IL_2861: ldloc.2 - IL_2862: ldloc.3 - IL_2863: ldc.i4.1 - IL_2864: sub - IL_2865: ldloc.s V_4 - IL_2867: sub - IL_2868: add - IL_2869: stloc.2 - IL_286a: ldloc.s V_5 - IL_286c: ldc.i4.1 - IL_286d: add - IL_286e: stloc.s V_5 - IL_2870: ldloc.2 - IL_2871: ldc.i4.1 - IL_2872: add - IL_2873: stloc.2 - IL_2874: ldloc.1 - IL_2875: ldloc.2 - IL_2876: bgt.s IL_28b2 - IL_2878: ldloc.1 - IL_2879: ldloc.2 - IL_287a: ldloc.3 - IL_287b: mul - IL_287c: mul - IL_287d: stloc.1 - IL_287e: ldloc.s V_4 - IL_2880: ldc.i4.1 - IL_2881: add - IL_2882: stloc.s V_4 - IL_2884: ldloc.s V_5 - IL_2886: ldc.i4.1 - IL_2887: sub - IL_2888: stloc.s V_5 - IL_288a: ldloc.s V_5 - IL_288c: ldloc.s V_4 - IL_288e: ldloc.3 - IL_288f: ldc.i4.1 - IL_2890: sub - IL_2891: add - IL_2892: add - IL_2893: stloc.s V_5 - IL_2895: ldloc.2 - IL_2896: ldc.i4.1 - IL_2897: sub - IL_2898: stloc.2 - IL_2899: ldloc.1 - IL_289a: ldloc.s V_5 - IL_289c: sub - IL_289d: stloc.1 - IL_289e: ldloc.s V_4 - IL_28a0: ldloc.3 - IL_28a1: ldc.i4.2 - IL_28a2: add - IL_28a3: ldloc.2 - IL_28a4: add - IL_28a5: sub - IL_28a6: stloc.s V_4 - IL_28a8: ldloc.1 - IL_28a9: ldc.i4.1 - IL_28aa: add - IL_28ab: stloc.1 - IL_28ac: ldloc.1 - IL_28ad: ldc.i4.1 - IL_28ae: sub - IL_28af: stloc.1 - IL_28b0: br.s IL_28e9 - IL_28b2: ldloc.2 - IL_28b3: ldloc.3 - IL_28b4: ldloc.s V_4 - IL_28b6: sub - IL_28b7: add - IL_28b8: stloc.2 - IL_28b9: ldloc.s V_5 - IL_28bb: ldc.i4.1 - IL_28bc: add - IL_28bd: stloc.s V_5 - IL_28bf: ldloc.3 - IL_28c0: ldc.i4.m1 - IL_28c1: add - IL_28c2: stloc.3 - IL_28c3: ldloc.s V_4 - IL_28c5: ldloc.s V_5 - IL_28c7: ldloc.1 - IL_28c8: ldc.i4.1 - IL_28c9: add - IL_28ca: mul - IL_28cb: add - IL_28cc: stloc.s V_4 - IL_28ce: ldloc.2 - IL_28cf: ldc.i4.1 - IL_28d0: add - IL_28d1: stloc.2 - IL_28d2: ldloc.1 - IL_28d3: ldc.i4.2 - IL_28d4: sub - IL_28d5: stloc.1 - IL_28d6: ldloc.2 - IL_28d7: ldloc.3 - IL_28d8: ldc.i4.1 - IL_28d9: sub - IL_28da: ldloc.s V_4 - IL_28dc: mul - IL_28dd: add - IL_28de: stloc.2 - IL_28df: ldloc.s V_5 - IL_28e1: ldc.i4.1 - IL_28e2: add - IL_28e3: stloc.s V_5 - IL_28e5: ldloc.2 - IL_28e6: ldc.i4.1 - IL_28e7: add - IL_28e8: stloc.2 - IL_28e9: ldloc.1 - IL_28ea: ldloc.2 - IL_28eb: ble.s IL_2927 - IL_28ed: ldloc.1 - IL_28ee: ldloc.2 - IL_28ef: ldloc.3 - IL_28f0: add - IL_28f1: mul - IL_28f2: stloc.1 - IL_28f3: ldloc.s V_4 - IL_28f5: ldc.i4.1 - IL_28f6: add - IL_28f7: stloc.s V_4 - IL_28f9: ldloc.s V_5 - IL_28fb: ldc.i4.1 - IL_28fc: sub - IL_28fd: stloc.s V_5 - IL_28ff: ldloc.s V_5 - IL_2901: ldloc.s V_4 - IL_2903: ldloc.3 - IL_2904: ldc.i4.1 - IL_2905: sub - IL_2906: add - IL_2907: add - IL_2908: stloc.s V_5 - IL_290a: ldloc.2 - IL_290b: ldc.i4.1 - IL_290c: sub - IL_290d: stloc.2 - IL_290e: ldloc.1 - IL_290f: ldloc.s V_5 - IL_2911: sub - IL_2912: stloc.1 - IL_2913: ldloc.s V_4 - IL_2915: ldloc.3 - IL_2916: ldc.i4.2 - IL_2917: add - IL_2918: ldloc.2 - IL_2919: add - IL_291a: mul - IL_291b: stloc.s V_4 - IL_291d: ldloc.1 - IL_291e: ldc.i4.1 - IL_291f: add - IL_2920: stloc.1 - IL_2921: ldloc.1 - IL_2922: ldc.i4.1 - IL_2923: sub - IL_2924: stloc.1 - IL_2925: br.s IL_295e - IL_2927: ldloc.2 - IL_2928: ldloc.3 - IL_2929: ldloc.s V_4 - IL_292b: mul - IL_292c: add - IL_292d: stloc.2 - IL_292e: ldloc.s V_5 - IL_2930: ldc.i4.1 - IL_2931: add - IL_2932: stloc.s V_5 - IL_2934: ldloc.3 - IL_2935: ldc.i4.m1 - IL_2936: add - IL_2937: stloc.3 - IL_2938: ldloc.s V_4 - IL_293a: ldloc.s V_5 - IL_293c: ldloc.1 - IL_293d: ldc.i4.1 - IL_293e: add - IL_293f: sub - IL_2940: add - IL_2941: stloc.s V_4 - IL_2943: ldloc.2 - IL_2944: ldc.i4.1 - IL_2945: add - IL_2946: stloc.2 - IL_2947: ldloc.1 - IL_2948: ldc.i4.2 - IL_2949: sub - IL_294a: stloc.1 - IL_294b: ldloc.2 - IL_294c: ldloc.3 - IL_294d: ldc.i4.1 - IL_294e: sub - IL_294f: ldloc.s V_4 - IL_2951: add - IL_2952: add - IL_2953: stloc.2 - IL_2954: ldloc.s V_5 - IL_2956: ldc.i4.1 - IL_2957: add - IL_2958: stloc.s V_5 - IL_295a: ldloc.2 - IL_295b: ldc.i4.1 - IL_295c: add - IL_295d: stloc.2 - IL_295e: ldloc.1 - IL_295f: ldloc.2 - IL_2960: bne.un.s IL_299c - IL_2962: ldloc.1 - IL_2963: ldloc.2 - IL_2964: ldloc.3 - IL_2965: sub - IL_2966: mul - IL_2967: stloc.1 - IL_2968: ldloc.s V_4 - IL_296a: ldc.i4.1 - IL_296b: add - IL_296c: stloc.s V_4 - IL_296e: ldloc.s V_5 - IL_2970: ldc.i4.1 - IL_2971: sub - IL_2972: stloc.s V_5 - IL_2974: ldloc.s V_5 - IL_2976: ldloc.s V_4 - IL_2978: ldloc.3 - IL_2979: ldc.i4.1 - IL_297a: sub - IL_297b: add - IL_297c: sub - IL_297d: stloc.s V_5 - IL_297f: ldloc.2 - IL_2980: ldc.i4.1 - IL_2981: sub - IL_2982: stloc.2 - IL_2983: ldloc.1 - IL_2984: ldloc.s V_5 - IL_2986: sub - IL_2987: stloc.1 - IL_2988: ldloc.s V_4 - IL_298a: ldloc.3 - IL_298b: ldc.i4.2 - IL_298c: add - IL_298d: ldloc.2 - IL_298e: add - IL_298f: mul - IL_2990: stloc.s V_4 - IL_2992: ldloc.1 - IL_2993: ldc.i4.1 - IL_2994: add - IL_2995: stloc.1 - IL_2996: ldloc.1 - IL_2997: ldc.i4.1 - IL_2998: sub - IL_2999: stloc.1 - IL_299a: br.s IL_29d3 - IL_299c: ldloc.2 - IL_299d: ldloc.3 - IL_299e: ldloc.s V_4 - IL_29a0: mul - IL_29a1: sub - IL_29a2: stloc.2 - IL_29a3: ldloc.s V_5 - IL_29a5: ldc.i4.1 - IL_29a6: add - IL_29a7: stloc.s V_5 - IL_29a9: ldloc.3 - IL_29aa: ldc.i4.m1 - IL_29ab: add - IL_29ac: stloc.3 - IL_29ad: ldloc.s V_4 - IL_29af: ldloc.s V_5 - IL_29b1: ldloc.1 - IL_29b2: ldc.i4.1 - IL_29b3: add - IL_29b4: add - IL_29b5: add - IL_29b6: stloc.s V_4 - IL_29b8: ldloc.2 - IL_29b9: ldc.i4.1 - IL_29ba: add - IL_29bb: stloc.2 - IL_29bc: ldloc.1 - IL_29bd: ldc.i4.2 - IL_29be: sub - IL_29bf: stloc.1 - IL_29c0: ldloc.2 - IL_29c1: ldloc.3 - IL_29c2: ldc.i4.1 - IL_29c3: sub - IL_29c4: ldloc.s V_4 - IL_29c6: sub - IL_29c7: sub - IL_29c8: stloc.2 - IL_29c9: ldloc.s V_5 - IL_29cb: ldc.i4.1 - IL_29cc: add - IL_29cd: stloc.s V_5 - IL_29cf: ldloc.2 - IL_29d0: ldc.i4.1 - IL_29d1: add - IL_29d2: stloc.2 - IL_29d3: ldloc.1 - IL_29d4: ldloc.2 - IL_29d5: ble.s IL_2a11 - IL_29d7: ldloc.1 - IL_29d8: ldloc.2 - IL_29d9: ldloc.3 - IL_29da: mul - IL_29db: mul - IL_29dc: stloc.1 - IL_29dd: ldloc.s V_4 - IL_29df: ldc.i4.1 - IL_29e0: add - IL_29e1: stloc.s V_4 - IL_29e3: ldloc.s V_5 - IL_29e5: ldc.i4.1 - IL_29e6: sub - IL_29e7: stloc.s V_5 - IL_29e9: ldloc.s V_5 - IL_29eb: ldloc.s V_4 - IL_29ed: ldloc.3 - IL_29ee: ldc.i4.1 - IL_29ef: sub - IL_29f0: mul - IL_29f1: sub - IL_29f2: stloc.s V_5 - IL_29f4: ldloc.2 - IL_29f5: ldc.i4.1 - IL_29f6: sub - IL_29f7: stloc.2 - IL_29f8: ldloc.1 - IL_29f9: ldloc.s V_5 - IL_29fb: sub - IL_29fc: stloc.1 - IL_29fd: ldloc.s V_4 - IL_29ff: ldloc.3 - IL_2a00: ldc.i4.2 - IL_2a01: add - IL_2a02: ldloc.2 - IL_2a03: mul - IL_2a04: sub - IL_2a05: stloc.s V_4 - IL_2a07: ldloc.1 - IL_2a08: ldc.i4.1 - IL_2a09: add - IL_2a0a: stloc.1 - IL_2a0b: ldloc.1 - IL_2a0c: ldc.i4.1 - IL_2a0d: sub - IL_2a0e: stloc.1 - IL_2a0f: br.s IL_2a48 - IL_2a11: ldloc.2 - IL_2a12: ldloc.3 - IL_2a13: ldloc.s V_4 - IL_2a15: sub - IL_2a16: sub - IL_2a17: stloc.2 - IL_2a18: ldloc.s V_5 - IL_2a1a: ldc.i4.1 - IL_2a1b: add - IL_2a1c: stloc.s V_5 - IL_2a1e: ldloc.3 - IL_2a1f: ldc.i4.m1 - IL_2a20: add - IL_2a21: stloc.3 - IL_2a22: ldloc.s V_4 - IL_2a24: ldloc.s V_5 - IL_2a26: ldloc.1 - IL_2a27: ldc.i4.1 - IL_2a28: add - IL_2a29: add - IL_2a2a: mul - IL_2a2b: stloc.s V_4 - IL_2a2d: ldloc.2 - IL_2a2e: ldc.i4.1 - IL_2a2f: add - IL_2a30: stloc.2 - IL_2a31: ldloc.1 - IL_2a32: ldc.i4.2 - IL_2a33: sub - IL_2a34: stloc.1 - IL_2a35: ldloc.2 - IL_2a36: ldloc.3 - IL_2a37: ldc.i4.1 - IL_2a38: sub - IL_2a39: ldloc.s V_4 - IL_2a3b: mul - IL_2a3c: sub - IL_2a3d: stloc.2 - IL_2a3e: ldloc.s V_5 - IL_2a40: ldc.i4.1 - IL_2a41: add - IL_2a42: stloc.s V_5 - IL_2a44: ldloc.2 - IL_2a45: ldc.i4.1 - IL_2a46: add - IL_2a47: stloc.2 - IL_2a48: ldloc.1 - IL_2a49: ldloc.2 - IL_2a4a: bne.un.s IL_2a86 - IL_2a4c: ldloc.1 - IL_2a4d: ldloc.2 - IL_2a4e: ldloc.3 - IL_2a4f: add - IL_2a50: sub - IL_2a51: stloc.1 - IL_2a52: ldloc.s V_4 - IL_2a54: ldc.i4.1 - IL_2a55: add - IL_2a56: stloc.s V_4 - IL_2a58: ldloc.s V_5 - IL_2a5a: ldc.i4.1 - IL_2a5b: sub - IL_2a5c: stloc.s V_5 - IL_2a5e: ldloc.s V_5 - IL_2a60: ldloc.s V_4 - IL_2a62: ldloc.3 - IL_2a63: ldc.i4.1 - IL_2a64: sub - IL_2a65: mul - IL_2a66: sub - IL_2a67: stloc.s V_5 - IL_2a69: ldloc.2 - IL_2a6a: ldc.i4.1 - IL_2a6b: sub - IL_2a6c: stloc.2 - IL_2a6d: ldloc.1 - IL_2a6e: ldloc.s V_5 - IL_2a70: sub - IL_2a71: stloc.1 - IL_2a72: ldloc.s V_4 - IL_2a74: ldloc.3 - IL_2a75: ldc.i4.2 - IL_2a76: add - IL_2a77: ldloc.2 - IL_2a78: mul - IL_2a79: add - IL_2a7a: stloc.s V_4 - IL_2a7c: ldloc.1 - IL_2a7d: ldc.i4.1 - IL_2a7e: add - IL_2a7f: stloc.1 - IL_2a80: ldloc.1 - IL_2a81: ldc.i4.1 - IL_2a82: sub - IL_2a83: stloc.1 - IL_2a84: br.s IL_2abd - IL_2a86: ldloc.2 - IL_2a87: ldloc.3 - IL_2a88: ldloc.s V_4 - IL_2a8a: add - IL_2a8b: sub - IL_2a8c: stloc.2 - IL_2a8d: ldloc.s V_5 - IL_2a8f: ldc.i4.1 - IL_2a90: add - IL_2a91: stloc.s V_5 - IL_2a93: ldloc.3 - IL_2a94: ldc.i4.m1 - IL_2a95: add - IL_2a96: stloc.3 - IL_2a97: ldloc.s V_4 - IL_2a99: ldloc.s V_5 - IL_2a9b: ldloc.1 - IL_2a9c: ldc.i4.1 - IL_2a9d: add - IL_2a9e: mul - IL_2a9f: mul - IL_2aa0: stloc.s V_4 - IL_2aa2: ldloc.2 - IL_2aa3: ldc.i4.1 - IL_2aa4: add - IL_2aa5: stloc.2 - IL_2aa6: ldloc.1 - IL_2aa7: ldc.i4.2 - IL_2aa8: sub - IL_2aa9: stloc.1 - IL_2aaa: ldloc.2 - IL_2aab: ldloc.3 - IL_2aac: ldc.i4.1 - IL_2aad: sub - IL_2aae: ldloc.s V_4 - IL_2ab0: mul - IL_2ab1: sub - IL_2ab2: stloc.2 - IL_2ab3: ldloc.s V_5 - IL_2ab5: ldc.i4.1 - IL_2ab6: add - IL_2ab7: stloc.s V_5 - IL_2ab9: ldloc.2 - IL_2aba: ldc.i4.1 - IL_2abb: add - IL_2abc: stloc.2 - IL_2abd: ldloc.1 - IL_2abe: ldloc.2 - IL_2abf: bne.un.s IL_2afb - IL_2ac1: ldloc.1 - IL_2ac2: ldloc.2 - IL_2ac3: ldloc.3 - IL_2ac4: mul - IL_2ac5: mul - IL_2ac6: stloc.1 - IL_2ac7: ldloc.s V_4 - IL_2ac9: ldc.i4.1 - IL_2aca: add - IL_2acb: stloc.s V_4 - IL_2acd: ldloc.s V_5 - IL_2acf: ldc.i4.1 - IL_2ad0: sub - IL_2ad1: stloc.s V_5 - IL_2ad3: ldloc.s V_5 - IL_2ad5: ldloc.s V_4 - IL_2ad7: ldloc.3 - IL_2ad8: ldc.i4.1 - IL_2ad9: sub - IL_2ada: sub - IL_2adb: add - IL_2adc: stloc.s V_5 - IL_2ade: ldloc.2 - IL_2adf: ldc.i4.1 - IL_2ae0: sub - IL_2ae1: stloc.2 - IL_2ae2: ldloc.1 - IL_2ae3: ldloc.s V_5 - IL_2ae5: sub - IL_2ae6: stloc.1 - IL_2ae7: ldloc.s V_4 - IL_2ae9: ldloc.3 - IL_2aea: ldc.i4.2 - IL_2aeb: add - IL_2aec: ldloc.2 - IL_2aed: sub - IL_2aee: add - IL_2aef: stloc.s V_4 - IL_2af1: ldloc.1 - IL_2af2: ldc.i4.1 - IL_2af3: add - IL_2af4: stloc.1 - IL_2af5: ldloc.1 - IL_2af6: ldc.i4.1 - IL_2af7: sub - IL_2af8: stloc.1 - IL_2af9: br.s IL_2b32 - IL_2afb: ldloc.2 - IL_2afc: ldloc.3 - IL_2afd: ldloc.s V_4 - IL_2aff: add - IL_2b00: add - IL_2b01: stloc.2 - IL_2b02: ldloc.s V_5 - IL_2b04: ldc.i4.1 - IL_2b05: add - IL_2b06: stloc.s V_5 - IL_2b08: ldloc.3 - IL_2b09: ldc.i4.m1 - IL_2b0a: add - IL_2b0b: stloc.3 - IL_2b0c: ldloc.s V_4 - IL_2b0e: ldloc.s V_5 - IL_2b10: ldloc.1 - IL_2b11: ldc.i4.1 - IL_2b12: add - IL_2b13: mul - IL_2b14: sub - IL_2b15: stloc.s V_4 - IL_2b17: ldloc.2 - IL_2b18: ldc.i4.1 - IL_2b19: add - IL_2b1a: stloc.2 - IL_2b1b: ldloc.1 - IL_2b1c: ldc.i4.2 - IL_2b1d: sub - IL_2b1e: stloc.1 - IL_2b1f: ldloc.2 - IL_2b20: ldloc.3 - IL_2b21: ldc.i4.1 - IL_2b22: sub - IL_2b23: ldloc.s V_4 - IL_2b25: mul - IL_2b26: add - IL_2b27: stloc.2 - IL_2b28: ldloc.s V_5 - IL_2b2a: ldc.i4.1 - IL_2b2b: add - IL_2b2c: stloc.s V_5 - IL_2b2e: ldloc.2 - IL_2b2f: ldc.i4.1 - IL_2b30: add - IL_2b31: stloc.2 - IL_2b32: ldloc.1 - IL_2b33: ldloc.2 - IL_2b34: bgt.s IL_2b70 - IL_2b36: ldloc.1 - IL_2b37: ldloc.2 - IL_2b38: ldloc.3 - IL_2b39: add - IL_2b3a: mul - IL_2b3b: stloc.1 - IL_2b3c: ldloc.s V_4 - IL_2b3e: ldc.i4.1 - IL_2b3f: add - IL_2b40: stloc.s V_4 - IL_2b42: ldloc.s V_5 - IL_2b44: ldc.i4.1 - IL_2b45: sub - IL_2b46: stloc.s V_5 - IL_2b48: ldloc.s V_5 - IL_2b4a: ldloc.s V_4 - IL_2b4c: ldloc.3 - IL_2b4d: ldc.i4.1 - IL_2b4e: sub - IL_2b4f: add - IL_2b50: mul - IL_2b51: stloc.s V_5 - IL_2b53: ldloc.2 - IL_2b54: ldc.i4.1 - IL_2b55: sub - IL_2b56: stloc.2 - IL_2b57: ldloc.1 - IL_2b58: ldloc.s V_5 - IL_2b5a: sub - IL_2b5b: stloc.1 - IL_2b5c: ldloc.s V_4 - IL_2b5e: ldloc.3 - IL_2b5f: ldc.i4.2 - IL_2b60: add - IL_2b61: ldloc.2 - IL_2b62: add - IL_2b63: add - IL_2b64: stloc.s V_4 - IL_2b66: ldloc.1 - IL_2b67: ldc.i4.1 - IL_2b68: add - IL_2b69: stloc.1 - IL_2b6a: ldloc.1 - IL_2b6b: ldc.i4.1 - IL_2b6c: sub - IL_2b6d: stloc.1 - IL_2b6e: br.s IL_2ba7 - IL_2b70: ldloc.2 - IL_2b71: ldloc.3 - IL_2b72: ldloc.s V_4 - IL_2b74: add - IL_2b75: mul - IL_2b76: stloc.2 - IL_2b77: ldloc.s V_5 - IL_2b79: ldc.i4.1 - IL_2b7a: add - IL_2b7b: stloc.s V_5 - IL_2b7d: ldloc.3 - IL_2b7e: ldc.i4.m1 - IL_2b7f: add - IL_2b80: stloc.3 - IL_2b81: ldloc.s V_4 - IL_2b83: ldloc.s V_5 - IL_2b85: ldloc.1 - IL_2b86: ldc.i4.1 - IL_2b87: add - IL_2b88: add - IL_2b89: add - IL_2b8a: stloc.s V_4 - IL_2b8c: ldloc.2 - IL_2b8d: ldc.i4.1 - IL_2b8e: add - IL_2b8f: stloc.2 - IL_2b90: ldloc.1 - IL_2b91: ldc.i4.2 - IL_2b92: sub - IL_2b93: stloc.1 - IL_2b94: ldloc.2 - IL_2b95: ldloc.3 - IL_2b96: ldc.i4.1 - IL_2b97: sub - IL_2b98: ldloc.s V_4 - IL_2b9a: sub - IL_2b9b: mul - IL_2b9c: stloc.2 - IL_2b9d: ldloc.s V_5 - IL_2b9f: ldc.i4.1 - IL_2ba0: add - IL_2ba1: stloc.s V_5 - IL_2ba3: ldloc.2 - IL_2ba4: ldc.i4.1 - IL_2ba5: add - IL_2ba6: stloc.2 - IL_2ba7: ldloc.1 - IL_2ba8: ldloc.2 - IL_2ba9: bne.un.s IL_2be5 - IL_2bab: ldloc.1 - IL_2bac: ldloc.2 - IL_2bad: ldloc.3 - IL_2bae: add - IL_2baf: sub - IL_2bb0: stloc.1 - IL_2bb1: ldloc.s V_4 - IL_2bb3: ldc.i4.1 - IL_2bb4: add - IL_2bb5: stloc.s V_4 - IL_2bb7: ldloc.s V_5 - IL_2bb9: ldc.i4.1 - IL_2bba: sub - IL_2bbb: stloc.s V_5 - IL_2bbd: ldloc.s V_5 - IL_2bbf: ldloc.s V_4 - IL_2bc1: ldloc.3 - IL_2bc2: ldc.i4.1 - IL_2bc3: sub - IL_2bc4: mul - IL_2bc5: sub - IL_2bc6: stloc.s V_5 - IL_2bc8: ldloc.2 - IL_2bc9: ldc.i4.1 - IL_2bca: sub - IL_2bcb: stloc.2 - IL_2bcc: ldloc.1 - IL_2bcd: ldloc.s V_5 - IL_2bcf: sub - IL_2bd0: stloc.1 - IL_2bd1: ldloc.s V_4 - IL_2bd3: ldloc.3 - IL_2bd4: ldc.i4.2 - IL_2bd5: add - IL_2bd6: ldloc.2 - IL_2bd7: mul - IL_2bd8: add - IL_2bd9: stloc.s V_4 - IL_2bdb: ldloc.1 - IL_2bdc: ldc.i4.1 - IL_2bdd: add - IL_2bde: stloc.1 - IL_2bdf: ldloc.1 - IL_2be0: ldc.i4.1 - IL_2be1: sub - IL_2be2: stloc.1 - IL_2be3: br.s IL_2c1c - IL_2be5: ldloc.2 - IL_2be6: ldloc.3 - IL_2be7: ldloc.s V_4 - IL_2be9: add - IL_2bea: sub - IL_2beb: stloc.2 - IL_2bec: ldloc.s V_5 - IL_2bee: ldc.i4.1 - IL_2bef: add - IL_2bf0: stloc.s V_5 - IL_2bf2: ldloc.3 - IL_2bf3: ldc.i4.m1 - IL_2bf4: add - IL_2bf5: stloc.3 - IL_2bf6: ldloc.s V_4 - IL_2bf8: ldloc.s V_5 - IL_2bfa: ldloc.1 - IL_2bfb: ldc.i4.1 - IL_2bfc: add - IL_2bfd: mul - IL_2bfe: mul - IL_2bff: stloc.s V_4 - IL_2c01: ldloc.2 - IL_2c02: ldc.i4.1 - IL_2c03: add - IL_2c04: stloc.2 - IL_2c05: ldloc.1 - IL_2c06: ldc.i4.2 - IL_2c07: sub - IL_2c08: stloc.1 - IL_2c09: ldloc.2 - IL_2c0a: ldloc.3 - IL_2c0b: ldc.i4.1 - IL_2c0c: sub - IL_2c0d: ldloc.s V_4 - IL_2c0f: sub - IL_2c10: sub - IL_2c11: stloc.2 - IL_2c12: ldloc.s V_5 - IL_2c14: ldc.i4.1 - IL_2c15: add - IL_2c16: stloc.s V_5 - IL_2c18: ldloc.2 - IL_2c19: ldc.i4.1 - IL_2c1a: add - IL_2c1b: stloc.2 - IL_2c1c: ldloc.1 - IL_2c1d: ldloc.2 - IL_2c1e: bgt.s IL_2c5a - IL_2c20: ldloc.1 - IL_2c21: ldloc.2 - IL_2c22: ldloc.3 - IL_2c23: sub - IL_2c24: add - IL_2c25: stloc.1 - IL_2c26: ldloc.s V_4 - IL_2c28: ldc.i4.1 - IL_2c29: add - IL_2c2a: stloc.s V_4 - IL_2c2c: ldloc.s V_5 - IL_2c2e: ldc.i4.1 - IL_2c2f: sub - IL_2c30: stloc.s V_5 - IL_2c32: ldloc.s V_5 - IL_2c34: ldloc.s V_4 - IL_2c36: ldloc.3 - IL_2c37: ldc.i4.1 - IL_2c38: sub - IL_2c39: add - IL_2c3a: sub - IL_2c3b: stloc.s V_5 - IL_2c3d: ldloc.2 - IL_2c3e: ldc.i4.1 - IL_2c3f: sub - IL_2c40: stloc.2 - IL_2c41: ldloc.1 - IL_2c42: ldloc.s V_5 - IL_2c44: sub - IL_2c45: stloc.1 - IL_2c46: ldloc.s V_4 - IL_2c48: ldloc.3 - IL_2c49: ldc.i4.2 - IL_2c4a: add - IL_2c4b: ldloc.2 - IL_2c4c: add - IL_2c4d: add - IL_2c4e: stloc.s V_4 - IL_2c50: ldloc.1 - IL_2c51: ldc.i4.1 - IL_2c52: add - IL_2c53: stloc.1 - IL_2c54: ldloc.1 - IL_2c55: ldc.i4.1 - IL_2c56: sub - IL_2c57: stloc.1 - IL_2c58: br.s IL_2c91 - IL_2c5a: ldloc.2 - IL_2c5b: ldloc.3 - IL_2c5c: ldloc.s V_4 - IL_2c5e: add - IL_2c5f: sub - IL_2c60: stloc.2 - IL_2c61: ldloc.s V_5 - IL_2c63: ldc.i4.1 - IL_2c64: add - IL_2c65: stloc.s V_5 - IL_2c67: ldloc.3 - IL_2c68: ldc.i4.m1 - IL_2c69: add - IL_2c6a: stloc.3 - IL_2c6b: ldloc.s V_4 - IL_2c6d: ldloc.s V_5 - IL_2c6f: ldloc.1 - IL_2c70: ldc.i4.1 - IL_2c71: add - IL_2c72: add - IL_2c73: add - IL_2c74: stloc.s V_4 - IL_2c76: ldloc.2 - IL_2c77: ldc.i4.1 - IL_2c78: add - IL_2c79: stloc.2 - IL_2c7a: ldloc.1 - IL_2c7b: ldc.i4.2 - IL_2c7c: sub - IL_2c7d: stloc.1 - IL_2c7e: ldloc.2 - IL_2c7f: ldloc.3 - IL_2c80: ldc.i4.1 - IL_2c81: sub - IL_2c82: ldloc.s V_4 - IL_2c84: sub - IL_2c85: sub - IL_2c86: stloc.2 - IL_2c87: ldloc.s V_5 - IL_2c89: ldc.i4.1 - IL_2c8a: add - IL_2c8b: stloc.s V_5 - IL_2c8d: ldloc.2 - IL_2c8e: ldc.i4.1 - IL_2c8f: add - IL_2c90: stloc.2 - IL_2c91: ldloc.1 - IL_2c92: ldloc.2 - IL_2c93: ble.s IL_2ccf - IL_2c95: ldloc.1 - IL_2c96: ldloc.2 - IL_2c97: ldloc.3 - IL_2c98: add - IL_2c99: mul - IL_2c9a: stloc.1 - IL_2c9b: ldloc.s V_4 - IL_2c9d: ldc.i4.1 - IL_2c9e: add - IL_2c9f: stloc.s V_4 - IL_2ca1: ldloc.s V_5 - IL_2ca3: ldc.i4.1 - IL_2ca4: sub - IL_2ca5: stloc.s V_5 - IL_2ca7: ldloc.s V_5 - IL_2ca9: ldloc.s V_4 - IL_2cab: ldloc.3 - IL_2cac: ldc.i4.1 - IL_2cad: sub - IL_2cae: mul - IL_2caf: mul - IL_2cb0: stloc.s V_5 - IL_2cb2: ldloc.2 - IL_2cb3: ldc.i4.1 - IL_2cb4: sub - IL_2cb5: stloc.2 - IL_2cb6: ldloc.1 - IL_2cb7: ldloc.s V_5 - IL_2cb9: sub - IL_2cba: stloc.1 - IL_2cbb: ldloc.s V_4 - IL_2cbd: ldloc.3 - IL_2cbe: ldc.i4.2 - IL_2cbf: add - IL_2cc0: ldloc.2 - IL_2cc1: mul - IL_2cc2: add - IL_2cc3: stloc.s V_4 - IL_2cc5: ldloc.1 - IL_2cc6: ldc.i4.1 - IL_2cc7: add - IL_2cc8: stloc.1 - IL_2cc9: ldloc.1 - IL_2cca: ldc.i4.1 - IL_2ccb: sub - IL_2ccc: stloc.1 - IL_2ccd: br.s IL_2d06 - IL_2ccf: ldloc.2 - IL_2cd0: ldloc.3 - IL_2cd1: ldloc.s V_4 - IL_2cd3: add - IL_2cd4: mul - IL_2cd5: stloc.2 - IL_2cd6: ldloc.s V_5 - IL_2cd8: ldc.i4.1 - IL_2cd9: add - IL_2cda: stloc.s V_5 - IL_2cdc: ldloc.3 - IL_2cdd: ldc.i4.m1 - IL_2cde: add - IL_2cdf: stloc.3 - IL_2ce0: ldloc.s V_4 - IL_2ce2: ldloc.s V_5 - IL_2ce4: ldloc.1 - IL_2ce5: ldc.i4.1 - IL_2ce6: add - IL_2ce7: add - IL_2ce8: mul - IL_2ce9: stloc.s V_4 - IL_2ceb: ldloc.2 - IL_2cec: ldc.i4.1 - IL_2ced: add - IL_2cee: stloc.2 - IL_2cef: ldloc.1 - IL_2cf0: ldc.i4.2 - IL_2cf1: sub - IL_2cf2: stloc.1 - IL_2cf3: ldloc.2 - IL_2cf4: ldloc.3 - IL_2cf5: ldc.i4.1 - IL_2cf6: sub - IL_2cf7: ldloc.s V_4 - IL_2cf9: mul - IL_2cfa: mul - IL_2cfb: stloc.2 - IL_2cfc: ldloc.s V_5 - IL_2cfe: ldc.i4.1 - IL_2cff: add - IL_2d00: stloc.s V_5 - IL_2d02: ldloc.2 - IL_2d03: ldc.i4.1 - IL_2d04: add - IL_2d05: stloc.2 - IL_2d06: ldloc.1 - IL_2d07: ldloc.2 - IL_2d08: ble.s IL_2d44 - IL_2d0a: ldloc.1 - IL_2d0b: ldloc.2 - IL_2d0c: ldloc.3 - IL_2d0d: mul - IL_2d0e: mul - IL_2d0f: stloc.1 - IL_2d10: ldloc.s V_4 - IL_2d12: ldc.i4.1 - IL_2d13: add - IL_2d14: stloc.s V_4 - IL_2d16: ldloc.s V_5 - IL_2d18: ldc.i4.1 - IL_2d19: sub - IL_2d1a: stloc.s V_5 - IL_2d1c: ldloc.s V_5 - IL_2d1e: ldloc.s V_4 - IL_2d20: ldloc.3 - IL_2d21: ldc.i4.1 - IL_2d22: sub - IL_2d23: sub - IL_2d24: add - IL_2d25: stloc.s V_5 - IL_2d27: ldloc.2 - IL_2d28: ldc.i4.1 - IL_2d29: sub - IL_2d2a: stloc.2 - IL_2d2b: ldloc.1 - IL_2d2c: ldloc.s V_5 - IL_2d2e: sub - IL_2d2f: stloc.1 - IL_2d30: ldloc.s V_4 - IL_2d32: ldloc.3 - IL_2d33: ldc.i4.2 - IL_2d34: add - IL_2d35: ldloc.2 - IL_2d36: sub - IL_2d37: mul - IL_2d38: stloc.s V_4 - IL_2d3a: ldloc.1 - IL_2d3b: ldc.i4.1 - IL_2d3c: add - IL_2d3d: stloc.1 - IL_2d3e: ldloc.1 - IL_2d3f: ldc.i4.1 - IL_2d40: sub - IL_2d41: stloc.1 - IL_2d42: br.s IL_2d7b - IL_2d44: ldloc.2 - IL_2d45: ldloc.3 - IL_2d46: ldloc.s V_4 - IL_2d48: mul - IL_2d49: add - IL_2d4a: stloc.2 - IL_2d4b: ldloc.s V_5 - IL_2d4d: ldc.i4.1 - IL_2d4e: add - IL_2d4f: stloc.s V_5 - IL_2d51: ldloc.3 - IL_2d52: ldc.i4.m1 - IL_2d53: add - IL_2d54: stloc.3 - IL_2d55: ldloc.s V_4 - IL_2d57: ldloc.s V_5 - IL_2d59: ldloc.1 - IL_2d5a: ldc.i4.1 - IL_2d5b: add - IL_2d5c: mul - IL_2d5d: sub - IL_2d5e: stloc.s V_4 - IL_2d60: ldloc.2 - IL_2d61: ldc.i4.1 - IL_2d62: add - IL_2d63: stloc.2 - IL_2d64: ldloc.1 - IL_2d65: ldc.i4.2 - IL_2d66: sub - IL_2d67: stloc.1 - IL_2d68: ldloc.2 - IL_2d69: ldloc.3 - IL_2d6a: ldc.i4.1 - IL_2d6b: sub - IL_2d6c: ldloc.s V_4 - IL_2d6e: sub - IL_2d6f: add - IL_2d70: stloc.2 - IL_2d71: ldloc.s V_5 - IL_2d73: ldc.i4.1 - IL_2d74: add - IL_2d75: stloc.s V_5 - IL_2d77: ldloc.2 - IL_2d78: ldc.i4.1 - IL_2d79: add - IL_2d7a: stloc.2 - IL_2d7b: ldloc.1 - IL_2d7c: ldloc.2 - IL_2d7d: bge.s IL_2db9 - IL_2d7f: ldloc.1 - IL_2d80: ldloc.2 - IL_2d81: ldloc.3 - IL_2d82: sub - IL_2d83: mul - IL_2d84: stloc.1 - IL_2d85: ldloc.s V_4 - IL_2d87: ldc.i4.1 - IL_2d88: add - IL_2d89: stloc.s V_4 - IL_2d8b: ldloc.s V_5 - IL_2d8d: ldc.i4.1 - IL_2d8e: sub - IL_2d8f: stloc.s V_5 - IL_2d91: ldloc.s V_5 - IL_2d93: ldloc.s V_4 - IL_2d95: ldloc.3 - IL_2d96: ldc.i4.1 - IL_2d97: sub - IL_2d98: sub - IL_2d99: sub - IL_2d9a: stloc.s V_5 - IL_2d9c: ldloc.2 - IL_2d9d: ldc.i4.1 - IL_2d9e: sub - IL_2d9f: stloc.2 - IL_2da0: ldloc.1 - IL_2da1: ldloc.s V_5 - IL_2da3: sub - IL_2da4: stloc.1 - IL_2da5: ldloc.s V_4 - IL_2da7: ldloc.3 - IL_2da8: ldc.i4.2 - IL_2da9: add - IL_2daa: ldloc.2 - IL_2dab: sub - IL_2dac: sub - IL_2dad: stloc.s V_4 - IL_2daf: ldloc.1 - IL_2db0: ldc.i4.1 - IL_2db1: add - IL_2db2: stloc.1 - IL_2db3: ldloc.1 - IL_2db4: ldc.i4.1 - IL_2db5: sub - IL_2db6: stloc.1 - IL_2db7: br.s IL_2df0 - IL_2db9: ldloc.2 - IL_2dba: ldloc.3 - IL_2dbb: ldloc.s V_4 - IL_2dbd: sub - IL_2dbe: sub - IL_2dbf: stloc.2 - IL_2dc0: ldloc.s V_5 - IL_2dc2: ldc.i4.1 - IL_2dc3: add - IL_2dc4: stloc.s V_5 - IL_2dc6: ldloc.3 - IL_2dc7: ldc.i4.m1 - IL_2dc8: add - IL_2dc9: stloc.3 - IL_2dca: ldloc.s V_4 - IL_2dcc: ldloc.s V_5 - IL_2dce: ldloc.1 - IL_2dcf: ldc.i4.1 - IL_2dd0: add - IL_2dd1: add - IL_2dd2: sub - IL_2dd3: stloc.s V_4 - IL_2dd5: ldloc.2 - IL_2dd6: ldc.i4.1 - IL_2dd7: add - IL_2dd8: stloc.2 - IL_2dd9: ldloc.1 - IL_2dda: ldc.i4.2 - IL_2ddb: sub - IL_2ddc: stloc.1 - IL_2ddd: ldloc.2 - IL_2dde: ldloc.3 - IL_2ddf: ldc.i4.1 - IL_2de0: sub - IL_2de1: ldloc.s V_4 - IL_2de3: mul - IL_2de4: sub - IL_2de5: stloc.2 - IL_2de6: ldloc.s V_5 - IL_2de8: ldc.i4.1 - IL_2de9: add - IL_2dea: stloc.s V_5 - IL_2dec: ldloc.2 - IL_2ded: ldc.i4.1 - IL_2dee: add - IL_2def: stloc.2 - IL_2df0: ldloc.1 - IL_2df1: ldloc.2 - IL_2df2: ble.s IL_2e2e - IL_2df4: ldloc.1 - IL_2df5: ldloc.2 - IL_2df6: ldloc.3 - IL_2df7: add - IL_2df8: sub - IL_2df9: stloc.1 - IL_2dfa: ldloc.s V_4 - IL_2dfc: ldc.i4.1 - IL_2dfd: add - IL_2dfe: stloc.s V_4 - IL_2e00: ldloc.s V_5 - IL_2e02: ldc.i4.1 - IL_2e03: sub - IL_2e04: stloc.s V_5 - IL_2e06: ldloc.s V_5 - IL_2e08: ldloc.s V_4 - IL_2e0a: ldloc.3 - IL_2e0b: ldc.i4.1 - IL_2e0c: sub - IL_2e0d: mul - IL_2e0e: add - IL_2e0f: stloc.s V_5 - IL_2e11: ldloc.2 - IL_2e12: ldc.i4.1 - IL_2e13: sub - IL_2e14: stloc.2 - IL_2e15: ldloc.1 - IL_2e16: ldloc.s V_5 - IL_2e18: sub - IL_2e19: stloc.1 - IL_2e1a: ldloc.s V_4 - IL_2e1c: ldloc.3 - IL_2e1d: ldc.i4.2 - IL_2e1e: add - IL_2e1f: ldloc.2 - IL_2e20: mul - IL_2e21: add - IL_2e22: stloc.s V_4 - IL_2e24: ldloc.1 - IL_2e25: ldc.i4.1 - IL_2e26: add - IL_2e27: stloc.1 - IL_2e28: ldloc.1 - IL_2e29: ldc.i4.1 - IL_2e2a: sub - IL_2e2b: stloc.1 - IL_2e2c: br.s IL_2e65 - IL_2e2e: ldloc.2 - IL_2e2f: ldloc.3 - IL_2e30: ldloc.s V_4 - IL_2e32: add - IL_2e33: add - IL_2e34: stloc.2 - IL_2e35: ldloc.s V_5 - IL_2e37: ldc.i4.1 - IL_2e38: add - IL_2e39: stloc.s V_5 - IL_2e3b: ldloc.3 - IL_2e3c: ldc.i4.m1 - IL_2e3d: add - IL_2e3e: stloc.3 - IL_2e3f: ldloc.s V_4 - IL_2e41: ldloc.s V_5 - IL_2e43: ldloc.1 - IL_2e44: ldc.i4.1 - IL_2e45: add - IL_2e46: sub - IL_2e47: mul - IL_2e48: stloc.s V_4 - IL_2e4a: ldloc.2 - IL_2e4b: ldc.i4.1 - IL_2e4c: add - IL_2e4d: stloc.2 - IL_2e4e: ldloc.1 - IL_2e4f: ldc.i4.2 - IL_2e50: sub - IL_2e51: stloc.1 - IL_2e52: ldloc.2 - IL_2e53: ldloc.3 - IL_2e54: ldc.i4.1 - IL_2e55: sub - IL_2e56: ldloc.s V_4 - IL_2e58: add - IL_2e59: add - IL_2e5a: stloc.2 - IL_2e5b: ldloc.s V_5 - IL_2e5d: ldc.i4.1 - IL_2e5e: add - IL_2e5f: stloc.s V_5 - IL_2e61: ldloc.2 - IL_2e62: ldc.i4.1 - IL_2e63: add - IL_2e64: stloc.2 - IL_2e65: ldloc.1 - IL_2e66: ldloc.s V_4 - IL_2e68: bne.un.s IL_2ea4 - IL_2e6a: ldloc.1 - IL_2e6b: ldloc.2 - IL_2e6c: ldloc.3 - IL_2e6d: add - IL_2e6e: sub - IL_2e6f: stloc.1 - IL_2e70: ldloc.s V_4 - IL_2e72: ldc.i4.1 - IL_2e73: add - IL_2e74: stloc.s V_4 - IL_2e76: ldloc.s V_5 - IL_2e78: ldc.i4.1 - IL_2e79: sub - IL_2e7a: stloc.s V_5 - IL_2e7c: ldloc.s V_5 - IL_2e7e: ldloc.s V_4 - IL_2e80: ldloc.3 - IL_2e81: ldc.i4.1 - IL_2e82: sub - IL_2e83: sub - IL_2e84: add - IL_2e85: stloc.s V_5 - IL_2e87: ldloc.2 - IL_2e88: ldc.i4.1 - IL_2e89: sub - IL_2e8a: stloc.2 - IL_2e8b: ldloc.1 - IL_2e8c: ldloc.s V_5 - IL_2e8e: sub - IL_2e8f: stloc.1 - IL_2e90: ldloc.s V_4 - IL_2e92: ldloc.3 - IL_2e93: ldc.i4.2 - IL_2e94: add - IL_2e95: ldloc.2 - IL_2e96: sub - IL_2e97: mul - IL_2e98: stloc.s V_4 - IL_2e9a: ldloc.1 - IL_2e9b: ldc.i4.1 - IL_2e9c: add - IL_2e9d: stloc.1 - IL_2e9e: ldloc.1 - IL_2e9f: ldc.i4.1 - IL_2ea0: sub - IL_2ea1: stloc.1 - IL_2ea2: br.s IL_2edb - IL_2ea4: ldloc.2 - IL_2ea5: ldloc.3 - IL_2ea6: ldloc.s V_4 - IL_2ea8: mul - IL_2ea9: add - IL_2eaa: stloc.2 - IL_2eab: ldloc.s V_5 - IL_2ead: ldc.i4.1 - IL_2eae: add - IL_2eaf: stloc.s V_5 - IL_2eb1: ldloc.3 - IL_2eb2: ldc.i4.m1 - IL_2eb3: add - IL_2eb4: stloc.3 - IL_2eb5: ldloc.s V_4 - IL_2eb7: ldloc.s V_5 - IL_2eb9: ldloc.1 - IL_2eba: ldc.i4.1 - IL_2ebb: add - IL_2ebc: mul - IL_2ebd: sub - IL_2ebe: stloc.s V_4 - IL_2ec0: ldloc.2 - IL_2ec1: ldc.i4.1 - IL_2ec2: add - IL_2ec3: stloc.2 - IL_2ec4: ldloc.1 - IL_2ec5: ldc.i4.2 - IL_2ec6: sub - IL_2ec7: stloc.1 - IL_2ec8: ldloc.2 - IL_2ec9: ldloc.3 - IL_2eca: ldc.i4.1 - IL_2ecb: sub - IL_2ecc: ldloc.s V_4 - IL_2ece: sub - IL_2ecf: add - IL_2ed0: stloc.2 - IL_2ed1: ldloc.s V_5 - IL_2ed3: ldc.i4.1 - IL_2ed4: add - IL_2ed5: stloc.s V_5 - IL_2ed7: ldloc.2 - IL_2ed8: ldc.i4.1 - IL_2ed9: add - IL_2eda: stloc.2 - IL_2edb: ldloc.1 - IL_2edc: ldloc.2 - IL_2edd: blt.s IL_2f19 - IL_2edf: ldloc.1 - IL_2ee0: ldloc.2 - IL_2ee1: ldloc.3 - IL_2ee2: add - IL_2ee3: mul - IL_2ee4: stloc.1 - IL_2ee5: ldloc.s V_4 - IL_2ee7: ldc.i4.1 - IL_2ee8: add - IL_2ee9: stloc.s V_4 - IL_2eeb: ldloc.s V_5 - IL_2eed: ldc.i4.1 - IL_2eee: sub - IL_2eef: stloc.s V_5 - IL_2ef1: ldloc.s V_5 - IL_2ef3: ldloc.s V_4 - IL_2ef5: ldloc.3 - IL_2ef6: ldc.i4.1 - IL_2ef7: sub - IL_2ef8: mul - IL_2ef9: add - IL_2efa: stloc.s V_5 - IL_2efc: ldloc.2 - IL_2efd: ldc.i4.1 - IL_2efe: sub - IL_2eff: stloc.2 - IL_2f00: ldloc.1 - IL_2f01: ldloc.s V_5 - IL_2f03: sub - IL_2f04: stloc.1 - IL_2f05: ldloc.s V_4 - IL_2f07: ldloc.3 - IL_2f08: ldc.i4.2 - IL_2f09: add - IL_2f0a: ldloc.2 - IL_2f0b: mul - IL_2f0c: mul - IL_2f0d: stloc.s V_4 - IL_2f0f: ldloc.1 - IL_2f10: ldc.i4.1 - IL_2f11: add - IL_2f12: stloc.1 - IL_2f13: ldloc.1 - IL_2f14: ldc.i4.1 - IL_2f15: sub - IL_2f16: stloc.1 - IL_2f17: br.s IL_2f50 - IL_2f19: ldloc.2 - IL_2f1a: ldloc.3 - IL_2f1b: ldloc.s V_4 - IL_2f1d: mul - IL_2f1e: add - IL_2f1f: stloc.2 - IL_2f20: ldloc.s V_5 - IL_2f22: ldc.i4.1 - IL_2f23: add - IL_2f24: stloc.s V_5 - IL_2f26: ldloc.3 - IL_2f27: ldc.i4.m1 - IL_2f28: add - IL_2f29: stloc.3 - IL_2f2a: ldloc.s V_4 - IL_2f2c: ldloc.s V_5 - IL_2f2e: ldloc.1 - IL_2f2f: ldc.i4.1 - IL_2f30: add - IL_2f31: mul - IL_2f32: mul - IL_2f33: stloc.s V_4 - IL_2f35: ldloc.2 - IL_2f36: ldc.i4.1 - IL_2f37: add - IL_2f38: stloc.2 - IL_2f39: ldloc.1 - IL_2f3a: ldc.i4.2 - IL_2f3b: sub - IL_2f3c: stloc.1 - IL_2f3d: ldloc.2 - IL_2f3e: ldloc.3 - IL_2f3f: ldc.i4.1 - IL_2f40: sub - IL_2f41: ldloc.s V_4 - IL_2f43: mul - IL_2f44: add - IL_2f45: stloc.2 - IL_2f46: ldloc.s V_5 - IL_2f48: ldc.i4.1 - IL_2f49: add - IL_2f4a: stloc.s V_5 - IL_2f4c: ldloc.2 - IL_2f4d: ldc.i4.1 - IL_2f4e: add - IL_2f4f: stloc.2 - IL_2f50: ldloc.1 - IL_2f51: ldloc.2 - IL_2f52: blt.s IL_2f8e - IL_2f54: ldloc.1 - IL_2f55: ldloc.2 - IL_2f56: ldloc.3 - IL_2f57: sub - IL_2f58: add - IL_2f59: stloc.1 - IL_2f5a: ldloc.s V_4 - IL_2f5c: ldc.i4.1 - IL_2f5d: add - IL_2f5e: stloc.s V_4 - IL_2f60: ldloc.s V_5 - IL_2f62: ldc.i4.1 - IL_2f63: sub - IL_2f64: stloc.s V_5 - IL_2f66: ldloc.s V_5 - IL_2f68: ldloc.s V_4 - IL_2f6a: ldloc.3 - IL_2f6b: ldc.i4.1 - IL_2f6c: sub - IL_2f6d: mul - IL_2f6e: sub - IL_2f6f: stloc.s V_5 - IL_2f71: ldloc.2 - IL_2f72: ldc.i4.1 - IL_2f73: sub - IL_2f74: stloc.2 - IL_2f75: ldloc.1 - IL_2f76: ldloc.s V_5 - IL_2f78: sub - IL_2f79: stloc.1 - IL_2f7a: ldloc.s V_4 - IL_2f7c: ldloc.3 - IL_2f7d: ldc.i4.2 - IL_2f7e: add - IL_2f7f: ldloc.2 - IL_2f80: mul - IL_2f81: mul - IL_2f82: stloc.s V_4 - IL_2f84: ldloc.1 - IL_2f85: ldc.i4.1 - IL_2f86: add - IL_2f87: stloc.1 - IL_2f88: ldloc.1 - IL_2f89: ldc.i4.1 - IL_2f8a: sub - IL_2f8b: stloc.1 - IL_2f8c: br.s IL_2fc5 - IL_2f8e: ldloc.2 - IL_2f8f: ldloc.3 - IL_2f90: ldloc.s V_4 - IL_2f92: mul - IL_2f93: sub - IL_2f94: stloc.2 - IL_2f95: ldloc.s V_5 - IL_2f97: ldc.i4.1 - IL_2f98: add - IL_2f99: stloc.s V_5 - IL_2f9b: ldloc.3 - IL_2f9c: ldc.i4.m1 - IL_2f9d: add - IL_2f9e: stloc.3 - IL_2f9f: ldloc.s V_4 - IL_2fa1: ldloc.s V_5 - IL_2fa3: ldloc.1 - IL_2fa4: ldc.i4.1 - IL_2fa5: add - IL_2fa6: mul - IL_2fa7: mul - IL_2fa8: stloc.s V_4 - IL_2faa: ldloc.2 - IL_2fab: ldc.i4.1 - IL_2fac: add - IL_2fad: stloc.2 - IL_2fae: ldloc.1 - IL_2faf: ldc.i4.2 - IL_2fb0: sub - IL_2fb1: stloc.1 - IL_2fb2: ldloc.2 - IL_2fb3: ldloc.3 - IL_2fb4: ldc.i4.1 - IL_2fb5: sub - IL_2fb6: ldloc.s V_4 - IL_2fb8: sub - IL_2fb9: sub - IL_2fba: stloc.2 - IL_2fbb: ldloc.s V_5 - IL_2fbd: ldc.i4.1 - IL_2fbe: add - IL_2fbf: stloc.s V_5 - IL_2fc1: ldloc.2 - IL_2fc2: ldc.i4.1 - IL_2fc3: add - IL_2fc4: stloc.2 - IL_2fc5: ldloc.1 - IL_2fc6: ldloc.2 - IL_2fc7: bne.un.s IL_3003 - IL_2fc9: ldloc.1 - IL_2fca: ldloc.2 - IL_2fcb: ldloc.3 - IL_2fcc: add - IL_2fcd: add - IL_2fce: stloc.1 - IL_2fcf: ldloc.s V_4 - IL_2fd1: ldc.i4.1 - IL_2fd2: add - IL_2fd3: stloc.s V_4 - IL_2fd5: ldloc.s V_5 - IL_2fd7: ldc.i4.1 - IL_2fd8: sub - IL_2fd9: stloc.s V_5 - IL_2fdb: ldloc.s V_5 - IL_2fdd: ldloc.s V_4 - IL_2fdf: ldloc.3 - IL_2fe0: ldc.i4.1 - IL_2fe1: sub - IL_2fe2: mul - IL_2fe3: add - IL_2fe4: stloc.s V_5 - IL_2fe6: ldloc.2 - IL_2fe7: ldc.i4.1 - IL_2fe8: sub - IL_2fe9: stloc.2 - IL_2fea: ldloc.1 - IL_2feb: ldloc.s V_5 - IL_2fed: sub - IL_2fee: stloc.1 - IL_2fef: ldloc.s V_4 - IL_2ff1: ldloc.3 - IL_2ff2: ldc.i4.2 - IL_2ff3: add - IL_2ff4: ldloc.2 - IL_2ff5: mul - IL_2ff6: mul - IL_2ff7: stloc.s V_4 - IL_2ff9: ldloc.1 - IL_2ffa: ldc.i4.1 - IL_2ffb: add - IL_2ffc: stloc.1 - IL_2ffd: ldloc.1 - IL_2ffe: ldc.i4.1 - IL_2fff: sub - IL_3000: stloc.1 - IL_3001: br.s IL_303a - IL_3003: ldloc.2 - IL_3004: ldloc.3 - IL_3005: ldloc.s V_4 - IL_3007: mul - IL_3008: add - IL_3009: stloc.2 - IL_300a: ldloc.s V_5 - IL_300c: ldc.i4.1 - IL_300d: add - IL_300e: stloc.s V_5 - IL_3010: ldloc.3 - IL_3011: ldc.i4.m1 - IL_3012: add - IL_3013: stloc.3 - IL_3014: ldloc.s V_4 - IL_3016: ldloc.s V_5 - IL_3018: ldloc.1 - IL_3019: ldc.i4.1 - IL_301a: add - IL_301b: add - IL_301c: mul - IL_301d: stloc.s V_4 - IL_301f: ldloc.2 - IL_3020: ldc.i4.1 - IL_3021: add - IL_3022: stloc.2 - IL_3023: ldloc.1 - IL_3024: ldc.i4.2 - IL_3025: sub - IL_3026: stloc.1 - IL_3027: ldloc.2 - IL_3028: ldloc.3 - IL_3029: ldc.i4.1 - IL_302a: sub - IL_302b: ldloc.s V_4 - IL_302d: mul - IL_302e: add - IL_302f: stloc.2 - IL_3030: ldloc.s V_5 - IL_3032: ldc.i4.1 - IL_3033: add - IL_3034: stloc.s V_5 - IL_3036: ldloc.2 - IL_3037: ldc.i4.1 - IL_3038: add - IL_3039: stloc.2 - IL_303a: ldloc.1 - IL_303b: ldloc.2 - IL_303c: blt.s IL_3078 - IL_303e: ldloc.1 - IL_303f: ldloc.2 - IL_3040: ldloc.3 - IL_3041: add - IL_3042: mul - IL_3043: stloc.1 - IL_3044: ldloc.s V_4 - IL_3046: ldc.i4.1 - IL_3047: add - IL_3048: stloc.s V_4 - IL_304a: ldloc.s V_5 - IL_304c: ldc.i4.1 - IL_304d: sub - IL_304e: stloc.s V_5 - IL_3050: ldloc.s V_5 - IL_3052: ldloc.s V_4 - IL_3054: ldloc.3 - IL_3055: ldc.i4.1 - IL_3056: sub - IL_3057: mul - IL_3058: add - IL_3059: stloc.s V_5 - IL_305b: ldloc.2 - IL_305c: ldc.i4.1 - IL_305d: sub - IL_305e: stloc.2 - IL_305f: ldloc.1 - IL_3060: ldloc.s V_5 - IL_3062: sub - IL_3063: stloc.1 - IL_3064: ldloc.s V_4 - IL_3066: ldloc.3 - IL_3067: ldc.i4.2 - IL_3068: add - IL_3069: ldloc.2 - IL_306a: mul - IL_306b: sub - IL_306c: stloc.s V_4 - IL_306e: ldloc.1 - IL_306f: ldc.i4.1 - IL_3070: add - IL_3071: stloc.1 - IL_3072: ldloc.1 - IL_3073: ldc.i4.1 - IL_3074: sub - IL_3075: stloc.1 - IL_3076: br.s IL_30af - IL_3078: ldloc.2 - IL_3079: ldloc.3 - IL_307a: ldloc.s V_4 - IL_307c: sub - IL_307d: add - IL_307e: stloc.2 - IL_307f: ldloc.s V_5 - IL_3081: ldc.i4.1 - IL_3082: add - IL_3083: stloc.s V_5 - IL_3085: ldloc.3 - IL_3086: ldc.i4.m1 - IL_3087: add - IL_3088: stloc.3 - IL_3089: ldloc.s V_4 - IL_308b: ldloc.s V_5 - IL_308d: ldloc.1 - IL_308e: ldc.i4.1 - IL_308f: add - IL_3090: mul - IL_3091: mul - IL_3092: stloc.s V_4 - IL_3094: ldloc.2 - IL_3095: ldc.i4.1 - IL_3096: add - IL_3097: stloc.2 - IL_3098: ldloc.1 - IL_3099: ldc.i4.2 - IL_309a: sub - IL_309b: stloc.1 - IL_309c: ldloc.2 - IL_309d: ldloc.3 - IL_309e: ldc.i4.1 - IL_309f: sub - IL_30a0: ldloc.s V_4 - IL_30a2: add - IL_30a3: add - IL_30a4: stloc.2 - IL_30a5: ldloc.s V_5 - IL_30a7: ldc.i4.1 - IL_30a8: add - IL_30a9: stloc.s V_5 - IL_30ab: ldloc.2 - IL_30ac: ldc.i4.1 - IL_30ad: add - IL_30ae: stloc.2 - IL_30af: ldloc.1 - IL_30b0: ldloc.2 - IL_30b1: ble.s IL_30ed - IL_30b3: ldloc.1 - IL_30b4: ldloc.2 - IL_30b5: ldloc.3 - IL_30b6: mul - IL_30b7: mul - IL_30b8: stloc.1 - IL_30b9: ldloc.s V_4 - IL_30bb: ldc.i4.1 - IL_30bc: add - IL_30bd: stloc.s V_4 - IL_30bf: ldloc.s V_5 - IL_30c1: ldc.i4.1 - IL_30c2: sub - IL_30c3: stloc.s V_5 - IL_30c5: ldloc.s V_5 - IL_30c7: ldloc.s V_4 - IL_30c9: ldloc.3 - IL_30ca: ldc.i4.1 - IL_30cb: sub - IL_30cc: sub - IL_30cd: mul - IL_30ce: stloc.s V_5 - IL_30d0: ldloc.2 - IL_30d1: ldc.i4.1 - IL_30d2: sub - IL_30d3: stloc.2 - IL_30d4: ldloc.1 - IL_30d5: ldloc.s V_5 - IL_30d7: sub - IL_30d8: stloc.1 - IL_30d9: ldloc.s V_4 - IL_30db: ldloc.3 - IL_30dc: ldc.i4.2 - IL_30dd: add - IL_30de: ldloc.2 - IL_30df: sub - IL_30e0: mul - IL_30e1: stloc.s V_4 - IL_30e3: ldloc.1 - IL_30e4: ldc.i4.1 - IL_30e5: add - IL_30e6: stloc.1 - IL_30e7: ldloc.1 - IL_30e8: ldc.i4.1 - IL_30e9: sub - IL_30ea: stloc.1 - IL_30eb: br.s IL_3124 - IL_30ed: ldloc.2 - IL_30ee: ldloc.3 - IL_30ef: ldloc.s V_4 - IL_30f1: mul - IL_30f2: mul - IL_30f3: stloc.2 - IL_30f4: ldloc.s V_5 - IL_30f6: ldc.i4.1 - IL_30f7: add - IL_30f8: stloc.s V_5 - IL_30fa: ldloc.3 - IL_30fb: ldc.i4.m1 - IL_30fc: add - IL_30fd: stloc.3 - IL_30fe: ldloc.s V_4 - IL_3100: ldloc.s V_5 - IL_3102: ldloc.1 - IL_3103: ldc.i4.1 - IL_3104: add - IL_3105: mul - IL_3106: sub - IL_3107: stloc.s V_4 - IL_3109: ldloc.2 - IL_310a: ldc.i4.1 - IL_310b: add - IL_310c: stloc.2 - IL_310d: ldloc.1 - IL_310e: ldc.i4.2 - IL_310f: sub - IL_3110: stloc.1 - IL_3111: ldloc.2 - IL_3112: ldloc.3 - IL_3113: ldc.i4.1 - IL_3114: sub - IL_3115: ldloc.s V_4 - IL_3117: sub - IL_3118: mul - IL_3119: stloc.2 - IL_311a: ldloc.s V_5 - IL_311c: ldc.i4.1 - IL_311d: add - IL_311e: stloc.s V_5 - IL_3120: ldloc.2 - IL_3121: ldc.i4.1 - IL_3122: add - IL_3123: stloc.2 - IL_3124: ldloc.1 - IL_3125: ldloc.2 - IL_3126: bgt.s IL_3162 - IL_3128: ldloc.1 - IL_3129: ldloc.2 - IL_312a: ldloc.3 - IL_312b: mul - IL_312c: sub - IL_312d: stloc.1 - IL_312e: ldloc.s V_4 - IL_3130: ldc.i4.1 - IL_3131: add - IL_3132: stloc.s V_4 - IL_3134: ldloc.s V_5 - IL_3136: ldc.i4.1 - IL_3137: sub - IL_3138: stloc.s V_5 - IL_313a: ldloc.s V_5 - IL_313c: ldloc.s V_4 - IL_313e: ldloc.3 - IL_313f: ldc.i4.1 - IL_3140: sub - IL_3141: mul - IL_3142: sub - IL_3143: stloc.s V_5 - IL_3145: ldloc.2 - IL_3146: ldc.i4.1 - IL_3147: sub - IL_3148: stloc.2 - IL_3149: ldloc.1 - IL_314a: ldloc.s V_5 - IL_314c: sub - IL_314d: stloc.1 - IL_314e: ldloc.s V_4 - IL_3150: ldloc.3 - IL_3151: ldc.i4.2 - IL_3152: add - IL_3153: ldloc.2 - IL_3154: mul - IL_3155: mul - IL_3156: stloc.s V_4 - IL_3158: ldloc.1 - IL_3159: ldc.i4.1 - IL_315a: add - IL_315b: stloc.1 - IL_315c: ldloc.1 - IL_315d: ldc.i4.1 - IL_315e: sub - IL_315f: stloc.1 - IL_3160: br.s IL_3199 - IL_3162: ldloc.2 - IL_3163: ldloc.3 - IL_3164: ldloc.s V_4 - IL_3166: mul - IL_3167: sub - IL_3168: stloc.2 - IL_3169: ldloc.s V_5 - IL_316b: ldc.i4.1 - IL_316c: add - IL_316d: stloc.s V_5 - IL_316f: ldloc.3 - IL_3170: ldc.i4.m1 - IL_3171: add - IL_3172: stloc.3 - IL_3173: ldloc.s V_4 - IL_3175: ldloc.s V_5 - IL_3177: ldloc.1 - IL_3178: ldc.i4.1 - IL_3179: add - IL_317a: sub - IL_317b: mul - IL_317c: stloc.s V_4 - IL_317e: ldloc.2 - IL_317f: ldc.i4.1 - IL_3180: add - IL_3181: stloc.2 - IL_3182: ldloc.1 - IL_3183: ldc.i4.2 - IL_3184: sub - IL_3185: stloc.1 - IL_3186: ldloc.2 - IL_3187: ldloc.3 - IL_3188: ldc.i4.1 - IL_3189: sub - IL_318a: ldloc.s V_4 - IL_318c: mul - IL_318d: sub - IL_318e: stloc.2 - IL_318f: ldloc.s V_5 - IL_3191: ldc.i4.1 - IL_3192: add - IL_3193: stloc.s V_5 - IL_3195: ldloc.2 - IL_3196: ldc.i4.1 - IL_3197: add - IL_3198: stloc.2 - IL_3199: ldloc.1 - IL_319a: ldloc.2 - IL_319b: bne.un.s IL_31d7 - IL_319d: ldloc.1 - IL_319e: ldloc.2 - IL_319f: ldloc.3 - IL_31a0: sub - IL_31a1: mul - IL_31a2: stloc.1 - IL_31a3: ldloc.s V_4 - IL_31a5: ldc.i4.1 - IL_31a6: add - IL_31a7: stloc.s V_4 - IL_31a9: ldloc.s V_5 - IL_31ab: ldc.i4.1 - IL_31ac: sub - IL_31ad: stloc.s V_5 - IL_31af: ldloc.s V_5 - IL_31b1: ldloc.s V_4 - IL_31b3: ldloc.3 - IL_31b4: ldc.i4.1 - IL_31b5: sub - IL_31b6: mul - IL_31b7: sub - IL_31b8: stloc.s V_5 - IL_31ba: ldloc.2 - IL_31bb: ldc.i4.1 - IL_31bc: sub - IL_31bd: stloc.2 - IL_31be: ldloc.1 - IL_31bf: ldloc.s V_5 - IL_31c1: sub - IL_31c2: stloc.1 - IL_31c3: ldloc.s V_4 - IL_31c5: ldloc.3 - IL_31c6: ldc.i4.2 - IL_31c7: add - IL_31c8: ldloc.2 - IL_31c9: mul - IL_31ca: sub - IL_31cb: stloc.s V_4 - IL_31cd: ldloc.1 - IL_31ce: ldc.i4.1 - IL_31cf: add - IL_31d0: stloc.1 - IL_31d1: ldloc.1 - IL_31d2: ldc.i4.1 - IL_31d3: sub - IL_31d4: stloc.1 - IL_31d5: br.s IL_320e - IL_31d7: ldloc.2 - IL_31d8: ldloc.3 - IL_31d9: ldloc.s V_4 - IL_31db: sub - IL_31dc: sub - IL_31dd: stloc.2 - IL_31de: ldloc.s V_5 - IL_31e0: ldc.i4.1 - IL_31e1: add - IL_31e2: stloc.s V_5 - IL_31e4: ldloc.3 - IL_31e5: ldc.i4.m1 - IL_31e6: add - IL_31e7: stloc.3 - IL_31e8: ldloc.s V_4 - IL_31ea: ldloc.s V_5 - IL_31ec: ldloc.1 - IL_31ed: ldc.i4.1 - IL_31ee: add - IL_31ef: mul - IL_31f0: mul - IL_31f1: stloc.s V_4 - IL_31f3: ldloc.2 - IL_31f4: ldc.i4.1 - IL_31f5: add - IL_31f6: stloc.2 - IL_31f7: ldloc.1 - IL_31f8: ldc.i4.2 - IL_31f9: sub - IL_31fa: stloc.1 - IL_31fb: ldloc.2 - IL_31fc: ldloc.3 - IL_31fd: ldc.i4.1 - IL_31fe: sub - IL_31ff: ldloc.s V_4 - IL_3201: sub - IL_3202: sub - IL_3203: stloc.2 - IL_3204: ldloc.s V_5 - IL_3206: ldc.i4.1 - IL_3207: add - IL_3208: stloc.s V_5 - IL_320a: ldloc.2 - IL_320b: ldc.i4.1 - IL_320c: add - IL_320d: stloc.2 - IL_320e: ldloc.1 - IL_320f: ldloc.2 - IL_3210: blt.s IL_324c - IL_3212: ldloc.1 - IL_3213: ldloc.2 - IL_3214: ldloc.3 - IL_3215: add - IL_3216: sub - IL_3217: stloc.1 - IL_3218: ldloc.s V_4 - IL_321a: ldc.i4.1 - IL_321b: add - IL_321c: stloc.s V_4 - IL_321e: ldloc.s V_5 - IL_3220: ldc.i4.1 - IL_3221: sub - IL_3222: stloc.s V_5 - IL_3224: ldloc.s V_5 - IL_3226: ldloc.s V_4 - IL_3228: ldloc.3 - IL_3229: ldc.i4.1 - IL_322a: sub - IL_322b: sub - IL_322c: mul - IL_322d: stloc.s V_5 - IL_322f: ldloc.2 - IL_3230: ldc.i4.1 - IL_3231: sub - IL_3232: stloc.2 - IL_3233: ldloc.1 - IL_3234: ldloc.s V_5 - IL_3236: sub - IL_3237: stloc.1 - IL_3238: ldloc.s V_4 - IL_323a: ldloc.3 - IL_323b: ldc.i4.2 - IL_323c: add - IL_323d: ldloc.2 - IL_323e: sub - IL_323f: mul - IL_3240: stloc.s V_4 - IL_3242: ldloc.1 - IL_3243: ldc.i4.1 - IL_3244: add - IL_3245: stloc.1 - IL_3246: ldloc.1 - IL_3247: ldc.i4.1 - IL_3248: sub - IL_3249: stloc.1 - IL_324a: br.s IL_3283 - IL_324c: ldloc.2 - IL_324d: ldloc.3 - IL_324e: ldloc.s V_4 - IL_3250: mul - IL_3251: mul - IL_3252: stloc.2 - IL_3253: ldloc.s V_5 - IL_3255: ldc.i4.1 - IL_3256: add - IL_3257: stloc.s V_5 - IL_3259: ldloc.3 - IL_325a: ldc.i4.m1 - IL_325b: add - IL_325c: stloc.3 - IL_325d: ldloc.s V_4 - IL_325f: ldloc.s V_5 - IL_3261: ldloc.1 - IL_3262: ldc.i4.1 - IL_3263: add - IL_3264: mul - IL_3265: sub - IL_3266: stloc.s V_4 - IL_3268: ldloc.2 - IL_3269: ldc.i4.1 - IL_326a: add - IL_326b: stloc.2 - IL_326c: ldloc.1 - IL_326d: ldc.i4.2 - IL_326e: sub - IL_326f: stloc.1 - IL_3270: ldloc.2 - IL_3271: ldloc.3 - IL_3272: ldc.i4.1 - IL_3273: sub - IL_3274: ldloc.s V_4 - IL_3276: add - IL_3277: mul - IL_3278: stloc.2 - IL_3279: ldloc.s V_5 - IL_327b: ldc.i4.1 - IL_327c: add - IL_327d: stloc.s V_5 - IL_327f: ldloc.2 - IL_3280: ldc.i4.1 - IL_3281: add - IL_3282: stloc.2 - IL_3283: ldloc.1 - IL_3284: ldloc.2 - IL_3285: ble.s IL_32c1 - IL_3287: ldloc.1 - IL_3288: ldloc.2 - IL_3289: ldloc.3 - IL_328a: mul - IL_328b: add - IL_328c: stloc.1 - IL_328d: ldloc.s V_4 - IL_328f: ldc.i4.1 - IL_3290: add - IL_3291: stloc.s V_4 - IL_3293: ldloc.s V_5 - IL_3295: ldc.i4.1 - IL_3296: sub - IL_3297: stloc.s V_5 - IL_3299: ldloc.s V_5 - IL_329b: ldloc.s V_4 - IL_329d: ldloc.3 - IL_329e: ldc.i4.1 - IL_329f: sub - IL_32a0: mul - IL_32a1: sub - IL_32a2: stloc.s V_5 - IL_32a4: ldloc.2 - IL_32a5: ldc.i4.1 - IL_32a6: sub - IL_32a7: stloc.2 - IL_32a8: ldloc.1 - IL_32a9: ldloc.s V_5 - IL_32ab: sub - IL_32ac: stloc.1 - IL_32ad: ldloc.s V_4 - IL_32af: ldloc.3 - IL_32b0: ldc.i4.2 - IL_32b1: add - IL_32b2: ldloc.2 - IL_32b3: mul - IL_32b4: mul - IL_32b5: stloc.s V_4 - IL_32b7: ldloc.1 - IL_32b8: ldc.i4.1 - IL_32b9: add - IL_32ba: stloc.1 - IL_32bb: ldloc.1 - IL_32bc: ldc.i4.1 - IL_32bd: sub - IL_32be: stloc.1 - IL_32bf: br.s IL_32f8 - IL_32c1: ldloc.2 - IL_32c2: ldloc.3 - IL_32c3: ldloc.s V_4 - IL_32c5: mul - IL_32c6: sub - IL_32c7: stloc.2 - IL_32c8: ldloc.s V_5 - IL_32ca: ldc.i4.1 - IL_32cb: add - IL_32cc: stloc.s V_5 - IL_32ce: ldloc.3 - IL_32cf: ldc.i4.m1 - IL_32d0: add - IL_32d1: stloc.3 - IL_32d2: ldloc.s V_4 - IL_32d4: ldloc.s V_5 - IL_32d6: ldloc.1 - IL_32d7: ldc.i4.1 - IL_32d8: add - IL_32d9: add - IL_32da: mul - IL_32db: stloc.s V_4 - IL_32dd: ldloc.2 - IL_32de: ldc.i4.1 - IL_32df: add - IL_32e0: stloc.2 - IL_32e1: ldloc.1 - IL_32e2: ldc.i4.2 - IL_32e3: sub - IL_32e4: stloc.1 - IL_32e5: ldloc.2 - IL_32e6: ldloc.3 - IL_32e7: ldc.i4.1 - IL_32e8: sub - IL_32e9: ldloc.s V_4 - IL_32eb: mul - IL_32ec: sub - IL_32ed: stloc.2 - IL_32ee: ldloc.s V_5 - IL_32f0: ldc.i4.1 - IL_32f1: add - IL_32f2: stloc.s V_5 - IL_32f4: ldloc.2 - IL_32f5: ldc.i4.1 - IL_32f6: add - IL_32f7: stloc.2 - IL_32f8: ldloc.1 - IL_32f9: ldloc.2 - IL_32fa: blt.s IL_3336 - IL_32fc: ldloc.1 - IL_32fd: ldloc.2 - IL_32fe: ldloc.3 - IL_32ff: add - IL_3300: mul - IL_3301: stloc.1 - IL_3302: ldloc.s V_4 - IL_3304: ldc.i4.1 - IL_3305: add - IL_3306: stloc.s V_4 - IL_3308: ldloc.s V_5 - IL_330a: ldc.i4.1 - IL_330b: sub - IL_330c: stloc.s V_5 - IL_330e: ldloc.s V_5 - IL_3310: ldloc.s V_4 - IL_3312: ldloc.3 - IL_3313: ldc.i4.1 - IL_3314: sub - IL_3315: add - IL_3316: sub - IL_3317: stloc.s V_5 - IL_3319: ldloc.2 - IL_331a: ldc.i4.1 - IL_331b: sub - IL_331c: stloc.2 - IL_331d: ldloc.1 - IL_331e: ldloc.s V_5 - IL_3320: sub - IL_3321: stloc.1 - IL_3322: ldloc.s V_4 - IL_3324: ldloc.3 - IL_3325: ldc.i4.2 - IL_3326: add - IL_3327: ldloc.2 - IL_3328: add - IL_3329: sub - IL_332a: stloc.s V_4 - IL_332c: ldloc.1 - IL_332d: ldc.i4.1 - IL_332e: add - IL_332f: stloc.1 - IL_3330: ldloc.1 - IL_3331: ldc.i4.1 - IL_3332: sub - IL_3333: stloc.1 - IL_3334: br.s IL_336d - IL_3336: ldloc.2 - IL_3337: ldloc.3 - IL_3338: ldloc.s V_4 - IL_333a: sub - IL_333b: sub - IL_333c: stloc.2 - IL_333d: ldloc.s V_5 - IL_333f: ldc.i4.1 - IL_3340: add - IL_3341: stloc.s V_5 - IL_3343: ldloc.3 - IL_3344: ldc.i4.m1 - IL_3345: add - IL_3346: stloc.3 - IL_3347: ldloc.s V_4 - IL_3349: ldloc.s V_5 - IL_334b: ldloc.1 - IL_334c: ldc.i4.1 - IL_334d: add - IL_334e: mul - IL_334f: add - IL_3350: stloc.s V_4 - IL_3352: ldloc.2 - IL_3353: ldc.i4.1 - IL_3354: add - IL_3355: stloc.2 - IL_3356: ldloc.1 - IL_3357: ldc.i4.2 - IL_3358: sub - IL_3359: stloc.1 - IL_335a: ldloc.2 - IL_335b: ldloc.3 - IL_335c: ldc.i4.1 - IL_335d: sub - IL_335e: ldloc.s V_4 - IL_3360: sub - IL_3361: sub - IL_3362: stloc.2 - IL_3363: ldloc.s V_5 - IL_3365: ldc.i4.1 - IL_3366: add - IL_3367: stloc.s V_5 - IL_3369: ldloc.2 - IL_336a: ldc.i4.1 - IL_336b: add - IL_336c: stloc.2 - IL_336d: ldloc.1 - IL_336e: ldloc.2 - IL_336f: bge.s IL_33ab - IL_3371: ldloc.1 - IL_3372: ldloc.2 - IL_3373: ldloc.3 - IL_3374: mul - IL_3375: add - IL_3376: stloc.1 - IL_3377: ldloc.s V_4 - IL_3379: ldc.i4.1 - IL_337a: add - IL_337b: stloc.s V_4 - IL_337d: ldloc.s V_5 - IL_337f: ldc.i4.1 - IL_3380: sub - IL_3381: stloc.s V_5 - IL_3383: ldloc.s V_5 - IL_3385: ldloc.s V_4 - IL_3387: ldloc.3 - IL_3388: ldc.i4.1 - IL_3389: sub - IL_338a: mul - IL_338b: add - IL_338c: stloc.s V_5 - IL_338e: ldloc.2 - IL_338f: ldc.i4.1 - IL_3390: sub - IL_3391: stloc.2 - IL_3392: ldloc.1 - IL_3393: ldloc.s V_5 - IL_3395: sub - IL_3396: stloc.1 - IL_3397: ldloc.s V_4 - IL_3399: ldloc.3 - IL_339a: ldc.i4.2 - IL_339b: add - IL_339c: ldloc.2 - IL_339d: mul - IL_339e: sub - IL_339f: stloc.s V_4 - IL_33a1: ldloc.1 - IL_33a2: ldc.i4.1 - IL_33a3: add - IL_33a4: stloc.1 - IL_33a5: ldloc.1 - IL_33a6: ldc.i4.1 - IL_33a7: sub - IL_33a8: stloc.1 - IL_33a9: br.s IL_33e2 - IL_33ab: ldloc.2 - IL_33ac: ldloc.3 - IL_33ad: ldloc.s V_4 - IL_33af: sub - IL_33b0: add - IL_33b1: stloc.2 - IL_33b2: ldloc.s V_5 - IL_33b4: ldc.i4.1 - IL_33b5: add - IL_33b6: stloc.s V_5 - IL_33b8: ldloc.3 - IL_33b9: ldc.i4.m1 - IL_33ba: add - IL_33bb: stloc.3 - IL_33bc: ldloc.s V_4 - IL_33be: ldloc.s V_5 - IL_33c0: ldloc.1 - IL_33c1: ldc.i4.1 - IL_33c2: add - IL_33c3: sub - IL_33c4: mul - IL_33c5: stloc.s V_4 - IL_33c7: ldloc.2 - IL_33c8: ldc.i4.1 - IL_33c9: add - IL_33ca: stloc.2 - IL_33cb: ldloc.1 - IL_33cc: ldc.i4.2 - IL_33cd: sub - IL_33ce: stloc.1 - IL_33cf: ldloc.2 - IL_33d0: ldloc.3 - IL_33d1: ldc.i4.1 - IL_33d2: sub - IL_33d3: ldloc.s V_4 - IL_33d5: sub - IL_33d6: add - IL_33d7: stloc.2 - IL_33d8: ldloc.s V_5 - IL_33da: ldc.i4.1 - IL_33db: add - IL_33dc: stloc.s V_5 - IL_33de: ldloc.2 - IL_33df: ldc.i4.1 - IL_33e0: add - IL_33e1: stloc.2 - IL_33e2: ldloc.1 - IL_33e3: ldloc.2 - IL_33e4: bge.s IL_3420 - IL_33e6: ldloc.1 - IL_33e7: ldloc.2 - IL_33e8: ldloc.3 - IL_33e9: mul - IL_33ea: sub - IL_33eb: stloc.1 - IL_33ec: ldloc.s V_4 - IL_33ee: ldc.i4.1 - IL_33ef: add - IL_33f0: stloc.s V_4 - IL_33f2: ldloc.s V_5 - IL_33f4: ldc.i4.1 - IL_33f5: sub - IL_33f6: stloc.s V_5 - IL_33f8: ldloc.s V_5 - IL_33fa: ldloc.s V_4 - IL_33fc: ldloc.3 - IL_33fd: ldc.i4.1 - IL_33fe: sub - IL_33ff: add - IL_3400: sub - IL_3401: stloc.s V_5 - IL_3403: ldloc.2 - IL_3404: ldc.i4.1 - IL_3405: sub - IL_3406: stloc.2 - IL_3407: ldloc.1 - IL_3408: ldloc.s V_5 - IL_340a: sub - IL_340b: stloc.1 - IL_340c: ldloc.s V_4 - IL_340e: ldloc.3 - IL_340f: ldc.i4.2 - IL_3410: add - IL_3411: ldloc.2 - IL_3412: add - IL_3413: sub - IL_3414: stloc.s V_4 - IL_3416: ldloc.1 - IL_3417: ldc.i4.1 - IL_3418: add - IL_3419: stloc.1 - IL_341a: ldloc.1 - IL_341b: ldc.i4.1 - IL_341c: sub - IL_341d: stloc.1 - IL_341e: br.s IL_3457 - IL_3420: ldloc.2 - IL_3421: ldloc.3 - IL_3422: ldloc.s V_4 - IL_3424: sub - IL_3425: sub - IL_3426: stloc.2 - IL_3427: ldloc.s V_5 - IL_3429: ldc.i4.1 - IL_342a: add - IL_342b: stloc.s V_5 - IL_342d: ldloc.3 - IL_342e: ldc.i4.m1 - IL_342f: add - IL_3430: stloc.3 - IL_3431: ldloc.s V_4 - IL_3433: ldloc.s V_5 - IL_3435: ldloc.1 - IL_3436: ldc.i4.1 - IL_3437: add - IL_3438: mul - IL_3439: add - IL_343a: stloc.s V_4 - IL_343c: ldloc.2 - IL_343d: ldc.i4.1 - IL_343e: add - IL_343f: stloc.2 - IL_3440: ldloc.1 - IL_3441: ldc.i4.2 - IL_3442: sub - IL_3443: stloc.1 - IL_3444: ldloc.2 - IL_3445: ldloc.3 - IL_3446: ldc.i4.1 - IL_3447: sub - IL_3448: ldloc.s V_4 - IL_344a: mul - IL_344b: sub - IL_344c: stloc.2 - IL_344d: ldloc.s V_5 - IL_344f: ldc.i4.1 - IL_3450: add - IL_3451: stloc.s V_5 - IL_3453: ldloc.2 - IL_3454: ldc.i4.1 - IL_3455: add - IL_3456: stloc.2 - IL_3457: ldloc.1 - IL_3458: ldloc.2 - IL_3459: bne.un.s IL_3495 - IL_345b: ldloc.1 - IL_345c: ldloc.2 - IL_345d: ldloc.3 - IL_345e: sub - IL_345f: sub - IL_3460: stloc.1 - IL_3461: ldloc.s V_4 - IL_3463: ldc.i4.1 - IL_3464: add - IL_3465: stloc.s V_4 - IL_3467: ldloc.s V_5 - IL_3469: ldc.i4.1 - IL_346a: sub - IL_346b: stloc.s V_5 - IL_346d: ldloc.s V_5 - IL_346f: ldloc.s V_4 - IL_3471: ldloc.3 - IL_3472: ldc.i4.1 - IL_3473: sub - IL_3474: sub - IL_3475: sub - IL_3476: stloc.s V_5 - IL_3478: ldloc.2 - IL_3479: ldc.i4.1 - IL_347a: sub - IL_347b: stloc.2 - IL_347c: ldloc.1 - IL_347d: ldloc.s V_5 - IL_347f: sub - IL_3480: stloc.1 - IL_3481: ldloc.s V_4 - IL_3483: ldloc.3 - IL_3484: ldc.i4.2 - IL_3485: add - IL_3486: ldloc.2 - IL_3487: sub - IL_3488: sub - IL_3489: stloc.s V_4 - IL_348b: ldloc.1 - IL_348c: ldc.i4.1 - IL_348d: add - IL_348e: stloc.1 - IL_348f: ldloc.1 - IL_3490: ldc.i4.1 - IL_3491: sub - IL_3492: stloc.1 - IL_3493: br.s IL_34cc - IL_3495: ldloc.2 - IL_3496: ldloc.3 - IL_3497: ldloc.s V_4 - IL_3499: sub - IL_349a: sub - IL_349b: stloc.2 - IL_349c: ldloc.s V_5 - IL_349e: ldc.i4.1 - IL_349f: add - IL_34a0: stloc.s V_5 - IL_34a2: ldloc.3 - IL_34a3: ldc.i4.m1 - IL_34a4: add - IL_34a5: stloc.3 - IL_34a6: ldloc.s V_4 - IL_34a8: ldloc.s V_5 - IL_34aa: ldloc.1 - IL_34ab: ldc.i4.1 - IL_34ac: add - IL_34ad: mul - IL_34ae: sub - IL_34af: stloc.s V_4 - IL_34b1: ldloc.2 - IL_34b2: ldc.i4.1 - IL_34b3: add - IL_34b4: stloc.2 - IL_34b5: ldloc.1 - IL_34b6: ldc.i4.2 - IL_34b7: sub - IL_34b8: stloc.1 - IL_34b9: ldloc.2 - IL_34ba: ldloc.3 - IL_34bb: ldc.i4.1 - IL_34bc: sub - IL_34bd: ldloc.s V_4 - IL_34bf: mul - IL_34c0: sub - IL_34c1: stloc.2 - IL_34c2: ldloc.s V_5 - IL_34c4: ldc.i4.1 - IL_34c5: add - IL_34c6: stloc.s V_5 - IL_34c8: ldloc.2 - IL_34c9: ldc.i4.1 - IL_34ca: add - IL_34cb: stloc.2 - IL_34cc: ldloc.1 - IL_34cd: ldloc.2 - IL_34ce: bne.un.s IL_350a - IL_34d0: ldloc.1 - IL_34d1: ldloc.2 - IL_34d2: ldloc.3 - IL_34d3: mul - IL_34d4: mul - IL_34d5: stloc.1 - IL_34d6: ldloc.s V_4 - IL_34d8: ldc.i4.1 - IL_34d9: add - IL_34da: stloc.s V_4 - IL_34dc: ldloc.s V_5 - IL_34de: ldc.i4.1 - IL_34df: sub - IL_34e0: stloc.s V_5 - IL_34e2: ldloc.s V_5 - IL_34e4: ldloc.s V_4 - IL_34e6: ldloc.3 - IL_34e7: ldc.i4.1 - IL_34e8: sub - IL_34e9: mul - IL_34ea: add - IL_34eb: stloc.s V_5 - IL_34ed: ldloc.2 - IL_34ee: ldc.i4.1 - IL_34ef: sub - IL_34f0: stloc.2 - IL_34f1: ldloc.1 - IL_34f2: ldloc.s V_5 - IL_34f4: sub - IL_34f5: stloc.1 - IL_34f6: ldloc.s V_4 - IL_34f8: ldloc.3 - IL_34f9: ldc.i4.2 - IL_34fa: add - IL_34fb: ldloc.2 - IL_34fc: mul - IL_34fd: sub - IL_34fe: stloc.s V_4 - IL_3500: ldloc.1 - IL_3501: ldc.i4.1 - IL_3502: add - IL_3503: stloc.1 - IL_3504: ldloc.1 - IL_3505: ldc.i4.1 - IL_3506: sub - IL_3507: stloc.1 - IL_3508: br.s IL_3541 - IL_350a: ldloc.2 - IL_350b: ldloc.3 - IL_350c: ldloc.s V_4 - IL_350e: sub - IL_350f: add - IL_3510: stloc.2 - IL_3511: ldloc.s V_5 - IL_3513: ldc.i4.1 - IL_3514: add - IL_3515: stloc.s V_5 - IL_3517: ldloc.3 - IL_3518: ldc.i4.m1 - IL_3519: add - IL_351a: stloc.3 - IL_351b: ldloc.s V_4 - IL_351d: ldloc.s V_5 - IL_351f: ldloc.1 - IL_3520: ldc.i4.1 - IL_3521: add - IL_3522: add - IL_3523: mul - IL_3524: stloc.s V_4 - IL_3526: ldloc.2 - IL_3527: ldc.i4.1 - IL_3528: add - IL_3529: stloc.2 - IL_352a: ldloc.1 - IL_352b: ldc.i4.2 - IL_352c: sub - IL_352d: stloc.1 - IL_352e: ldloc.2 - IL_352f: ldloc.3 - IL_3530: ldc.i4.1 - IL_3531: sub - IL_3532: ldloc.s V_4 - IL_3534: mul - IL_3535: add - IL_3536: stloc.2 - IL_3537: ldloc.s V_5 - IL_3539: ldc.i4.1 - IL_353a: add - IL_353b: stloc.s V_5 - IL_353d: ldloc.2 - IL_353e: ldc.i4.1 - IL_353f: add - IL_3540: stloc.2 - IL_3541: ldloc.1 - IL_3542: ldloc.2 - IL_3543: blt.s IL_357f - IL_3545: ldloc.1 - IL_3546: ldloc.2 - IL_3547: ldloc.3 - IL_3548: add - IL_3549: add - IL_354a: stloc.1 - IL_354b: ldloc.s V_4 - IL_354d: ldc.i4.1 - IL_354e: add - IL_354f: stloc.s V_4 - IL_3551: ldloc.s V_5 - IL_3553: ldc.i4.1 - IL_3554: sub - IL_3555: stloc.s V_5 - IL_3557: ldloc.s V_5 - IL_3559: ldloc.s V_4 - IL_355b: ldloc.3 - IL_355c: ldc.i4.1 - IL_355d: sub - IL_355e: sub - IL_355f: mul - IL_3560: stloc.s V_5 - IL_3562: ldloc.2 - IL_3563: ldc.i4.1 - IL_3564: sub - IL_3565: stloc.2 - IL_3566: ldloc.1 - IL_3567: ldloc.s V_5 - IL_3569: sub - IL_356a: stloc.1 - IL_356b: ldloc.s V_4 - IL_356d: ldloc.3 - IL_356e: ldc.i4.2 - IL_356f: add - IL_3570: ldloc.2 - IL_3571: sub - IL_3572: add - IL_3573: stloc.s V_4 - IL_3575: ldloc.1 - IL_3576: ldc.i4.1 - IL_3577: add - IL_3578: stloc.1 - IL_3579: ldloc.1 - IL_357a: ldc.i4.1 - IL_357b: sub - IL_357c: stloc.1 - IL_357d: br.s IL_35b6 - IL_357f: ldloc.2 - IL_3580: ldloc.3 - IL_3581: ldloc.s V_4 - IL_3583: add - IL_3584: mul - IL_3585: stloc.2 - IL_3586: ldloc.s V_5 - IL_3588: ldc.i4.1 - IL_3589: add - IL_358a: stloc.s V_5 - IL_358c: ldloc.3 - IL_358d: ldc.i4.m1 - IL_358e: add - IL_358f: stloc.3 - IL_3590: ldloc.s V_4 - IL_3592: ldloc.s V_5 - IL_3594: ldloc.1 - IL_3595: ldc.i4.1 - IL_3596: add - IL_3597: add - IL_3598: sub - IL_3599: stloc.s V_4 - IL_359b: ldloc.2 - IL_359c: ldc.i4.1 - IL_359d: add - IL_359e: stloc.2 - IL_359f: ldloc.1 - IL_35a0: ldc.i4.2 - IL_35a1: sub - IL_35a2: stloc.1 - IL_35a3: ldloc.2 - IL_35a4: ldloc.3 - IL_35a5: ldc.i4.1 - IL_35a6: sub - IL_35a7: ldloc.s V_4 - IL_35a9: mul - IL_35aa: mul - IL_35ab: stloc.2 - IL_35ac: ldloc.s V_5 - IL_35ae: ldc.i4.1 - IL_35af: add - IL_35b0: stloc.s V_5 - IL_35b2: ldloc.2 - IL_35b3: ldc.i4.1 - IL_35b4: add - IL_35b5: stloc.2 - IL_35b6: ldloc.1 - IL_35b7: ldloc.2 - IL_35b8: bne.un.s IL_35f4 - IL_35ba: ldloc.1 - IL_35bb: ldloc.2 - IL_35bc: ldloc.3 - IL_35bd: sub - IL_35be: add - IL_35bf: stloc.1 - IL_35c0: ldloc.s V_4 - IL_35c2: ldc.i4.1 - IL_35c3: add - IL_35c4: stloc.s V_4 - IL_35c6: ldloc.s V_5 - IL_35c8: ldc.i4.1 - IL_35c9: sub - IL_35ca: stloc.s V_5 - IL_35cc: ldloc.s V_5 - IL_35ce: ldloc.s V_4 - IL_35d0: ldloc.3 - IL_35d1: ldc.i4.1 - IL_35d2: sub - IL_35d3: add - IL_35d4: mul - IL_35d5: stloc.s V_5 - IL_35d7: ldloc.2 - IL_35d8: ldc.i4.1 - IL_35d9: sub - IL_35da: stloc.2 - IL_35db: ldloc.1 - IL_35dc: ldloc.s V_5 - IL_35de: sub - IL_35df: stloc.1 - IL_35e0: ldloc.s V_4 - IL_35e2: ldloc.3 - IL_35e3: ldc.i4.2 - IL_35e4: add - IL_35e5: ldloc.2 - IL_35e6: add - IL_35e7: add - IL_35e8: stloc.s V_4 - IL_35ea: ldloc.1 - IL_35eb: ldc.i4.1 - IL_35ec: add - IL_35ed: stloc.1 - IL_35ee: ldloc.1 - IL_35ef: ldc.i4.1 - IL_35f0: sub - IL_35f1: stloc.1 - IL_35f2: br.s IL_362b - IL_35f4: ldloc.2 - IL_35f5: ldloc.3 - IL_35f6: ldloc.s V_4 - IL_35f8: add - IL_35f9: mul - IL_35fa: stloc.2 - IL_35fb: ldloc.s V_5 - IL_35fd: ldc.i4.1 - IL_35fe: add - IL_35ff: stloc.s V_5 - IL_3601: ldloc.3 - IL_3602: ldc.i4.m1 - IL_3603: add - IL_3604: stloc.3 - IL_3605: ldloc.s V_4 - IL_3607: ldloc.s V_5 - IL_3609: ldloc.1 - IL_360a: ldc.i4.1 - IL_360b: add - IL_360c: sub - IL_360d: add - IL_360e: stloc.s V_4 - IL_3610: ldloc.2 - IL_3611: ldc.i4.1 - IL_3612: add - IL_3613: stloc.2 - IL_3614: ldloc.1 - IL_3615: ldc.i4.2 - IL_3616: sub - IL_3617: stloc.1 - IL_3618: ldloc.2 - IL_3619: ldloc.3 - IL_361a: ldc.i4.1 - IL_361b: sub - IL_361c: ldloc.s V_4 - IL_361e: mul - IL_361f: mul - IL_3620: stloc.2 - IL_3621: ldloc.s V_5 - IL_3623: ldc.i4.1 - IL_3624: add - IL_3625: stloc.s V_5 - IL_3627: ldloc.2 - IL_3628: ldc.i4.1 - IL_3629: add - IL_362a: stloc.2 - IL_362b: ldloc.1 - IL_362c: ldloc.2 - IL_362d: beq.s IL_3669 - IL_362f: ldloc.1 - IL_3630: ldloc.2 - IL_3631: ldloc.3 - IL_3632: mul - IL_3633: mul - IL_3634: stloc.1 - IL_3635: ldloc.s V_4 - IL_3637: ldc.i4.1 - IL_3638: add - IL_3639: stloc.s V_4 - IL_363b: ldloc.s V_5 - IL_363d: ldc.i4.1 - IL_363e: sub - IL_363f: stloc.s V_5 - IL_3641: ldloc.s V_5 - IL_3643: ldloc.s V_4 - IL_3645: ldloc.3 - IL_3646: ldc.i4.1 - IL_3647: sub - IL_3648: mul - IL_3649: sub - IL_364a: stloc.s V_5 - IL_364c: ldloc.2 - IL_364d: ldc.i4.1 - IL_364e: sub - IL_364f: stloc.2 - IL_3650: ldloc.1 - IL_3651: ldloc.s V_5 - IL_3653: sub - IL_3654: stloc.1 - IL_3655: ldloc.s V_4 - IL_3657: ldloc.3 - IL_3658: ldc.i4.2 - IL_3659: add - IL_365a: ldloc.2 - IL_365b: mul - IL_365c: sub - IL_365d: stloc.s V_4 - IL_365f: ldloc.1 - IL_3660: ldc.i4.1 - IL_3661: add - IL_3662: stloc.1 - IL_3663: ldloc.1 - IL_3664: ldc.i4.1 - IL_3665: sub - IL_3666: stloc.1 - IL_3667: br.s IL_36a0 - IL_3669: ldloc.2 - IL_366a: ldloc.3 - IL_366b: ldloc.s V_4 - IL_366d: sub - IL_366e: sub - IL_366f: stloc.2 - IL_3670: ldloc.s V_5 - IL_3672: ldc.i4.1 - IL_3673: add - IL_3674: stloc.s V_5 - IL_3676: ldloc.3 - IL_3677: ldc.i4.m1 - IL_3678: add - IL_3679: stloc.3 - IL_367a: ldloc.s V_4 - IL_367c: ldloc.s V_5 - IL_367e: ldloc.1 - IL_367f: ldc.i4.1 - IL_3680: add - IL_3681: add - IL_3682: mul - IL_3683: stloc.s V_4 - IL_3685: ldloc.2 - IL_3686: ldc.i4.1 - IL_3687: add - IL_3688: stloc.2 - IL_3689: ldloc.1 - IL_368a: ldc.i4.2 - IL_368b: sub - IL_368c: stloc.1 - IL_368d: ldloc.2 - IL_368e: ldloc.3 - IL_368f: ldc.i4.1 - IL_3690: sub - IL_3691: ldloc.s V_4 - IL_3693: mul - IL_3694: sub - IL_3695: stloc.2 - IL_3696: ldloc.s V_5 - IL_3698: ldc.i4.1 - IL_3699: add - IL_369a: stloc.s V_5 - IL_369c: ldloc.2 - IL_369d: ldc.i4.1 - IL_369e: add - IL_369f: stloc.2 - IL_36a0: ldloc.1 - IL_36a1: ldloc.2 - IL_36a2: blt.s IL_36de - IL_36a4: ldloc.1 - IL_36a5: ldloc.2 - IL_36a6: ldloc.3 - IL_36a7: add - IL_36a8: add - IL_36a9: stloc.1 - IL_36aa: ldloc.s V_4 - IL_36ac: ldc.i4.1 - IL_36ad: add - IL_36ae: stloc.s V_4 - IL_36b0: ldloc.s V_5 - IL_36b2: ldc.i4.1 - IL_36b3: sub - IL_36b4: stloc.s V_5 - IL_36b6: ldloc.s V_5 - IL_36b8: ldloc.s V_4 - IL_36ba: ldloc.3 - IL_36bb: ldc.i4.1 - IL_36bc: sub - IL_36bd: add - IL_36be: add - IL_36bf: stloc.s V_5 - IL_36c1: ldloc.2 - IL_36c2: ldc.i4.1 - IL_36c3: sub - IL_36c4: stloc.2 - IL_36c5: ldloc.1 - IL_36c6: ldloc.s V_5 - IL_36c8: sub - IL_36c9: stloc.1 - IL_36ca: ldloc.s V_4 - IL_36cc: ldloc.3 - IL_36cd: ldc.i4.2 - IL_36ce: add - IL_36cf: ldloc.2 - IL_36d0: add - IL_36d1: sub - IL_36d2: stloc.s V_4 - IL_36d4: ldloc.1 - IL_36d5: ldc.i4.1 - IL_36d6: add - IL_36d7: stloc.1 - IL_36d8: ldloc.1 - IL_36d9: ldc.i4.1 - IL_36da: sub - IL_36db: stloc.1 - IL_36dc: br.s IL_3715 - IL_36de: ldloc.2 - IL_36df: ldloc.3 - IL_36e0: ldloc.s V_4 - IL_36e2: sub - IL_36e3: add - IL_36e4: stloc.2 - IL_36e5: ldloc.s V_5 - IL_36e7: ldc.i4.1 - IL_36e8: add - IL_36e9: stloc.s V_5 - IL_36eb: ldloc.3 - IL_36ec: ldc.i4.m1 - IL_36ed: add - IL_36ee: stloc.3 - IL_36ef: ldloc.s V_4 - IL_36f1: ldloc.s V_5 - IL_36f3: ldloc.1 - IL_36f4: ldc.i4.1 - IL_36f5: add - IL_36f6: sub - IL_36f7: add - IL_36f8: stloc.s V_4 - IL_36fa: ldloc.2 - IL_36fb: ldc.i4.1 - IL_36fc: add - IL_36fd: stloc.2 - IL_36fe: ldloc.1 - IL_36ff: ldc.i4.2 - IL_3700: sub - IL_3701: stloc.1 - IL_3702: ldloc.2 - IL_3703: ldloc.3 - IL_3704: ldc.i4.1 - IL_3705: sub - IL_3706: ldloc.s V_4 - IL_3708: mul - IL_3709: add - IL_370a: stloc.2 - IL_370b: ldloc.s V_5 - IL_370d: ldc.i4.1 - IL_370e: add - IL_370f: stloc.s V_5 - IL_3711: ldloc.2 - IL_3712: ldc.i4.1 - IL_3713: add - IL_3714: stloc.2 - IL_3715: ldloc.1 - IL_3716: ldloc.2 - IL_3717: bge.s IL_3753 - IL_3719: ldloc.1 - IL_371a: ldloc.2 - IL_371b: ldloc.3 - IL_371c: mul - IL_371d: sub - IL_371e: stloc.1 - IL_371f: ldloc.s V_4 - IL_3721: ldc.i4.1 - IL_3722: add - IL_3723: stloc.s V_4 - IL_3725: ldloc.s V_5 - IL_3727: ldc.i4.1 - IL_3728: sub - IL_3729: stloc.s V_5 - IL_372b: ldloc.s V_5 - IL_372d: ldloc.s V_4 - IL_372f: ldloc.3 - IL_3730: ldc.i4.1 - IL_3731: sub - IL_3732: sub - IL_3733: sub - IL_3734: stloc.s V_5 - IL_3736: ldloc.2 - IL_3737: ldc.i4.1 - IL_3738: sub - IL_3739: stloc.2 - IL_373a: ldloc.1 - IL_373b: ldloc.s V_5 - IL_373d: sub - IL_373e: stloc.1 - IL_373f: ldloc.s V_4 - IL_3741: ldloc.3 - IL_3742: ldc.i4.2 - IL_3743: add - IL_3744: ldloc.2 - IL_3745: sub - IL_3746: sub - IL_3747: stloc.s V_4 - IL_3749: ldloc.1 - IL_374a: ldc.i4.1 - IL_374b: add - IL_374c: stloc.1 - IL_374d: ldloc.1 - IL_374e: ldc.i4.1 - IL_374f: sub - IL_3750: stloc.1 - IL_3751: br.s IL_378a - IL_3753: ldloc.2 - IL_3754: ldloc.3 - IL_3755: ldloc.s V_4 - IL_3757: sub - IL_3758: sub - IL_3759: stloc.2 - IL_375a: ldloc.s V_5 - IL_375c: ldc.i4.1 - IL_375d: add - IL_375e: stloc.s V_5 - IL_3760: ldloc.3 - IL_3761: ldc.i4.m1 - IL_3762: add - IL_3763: stloc.3 - IL_3764: ldloc.s V_4 - IL_3766: ldloc.s V_5 - IL_3768: ldloc.1 - IL_3769: ldc.i4.1 - IL_376a: add - IL_376b: add - IL_376c: sub - IL_376d: stloc.s V_4 - IL_376f: ldloc.2 - IL_3770: ldc.i4.1 - IL_3771: add - IL_3772: stloc.2 - IL_3773: ldloc.1 - IL_3774: ldc.i4.2 - IL_3775: sub - IL_3776: stloc.1 - IL_3777: ldloc.2 - IL_3778: ldloc.3 - IL_3779: ldc.i4.1 - IL_377a: sub - IL_377b: ldloc.s V_4 - IL_377d: sub - IL_377e: sub - IL_377f: stloc.2 - IL_3780: ldloc.s V_5 - IL_3782: ldc.i4.1 - IL_3783: add - IL_3784: stloc.s V_5 - IL_3786: ldloc.2 - IL_3787: ldc.i4.1 - IL_3788: add - IL_3789: stloc.2 - IL_378a: ldloc.1 - IL_378b: ldloc.2 - IL_378c: blt.s IL_37c8 - IL_378e: ldloc.1 - IL_378f: ldloc.2 - IL_3790: ldloc.3 - IL_3791: sub - IL_3792: mul - IL_3793: stloc.1 - IL_3794: ldloc.s V_4 - IL_3796: ldc.i4.1 - IL_3797: add - IL_3798: stloc.s V_4 - IL_379a: ldloc.s V_5 - IL_379c: ldc.i4.1 - IL_379d: sub - IL_379e: stloc.s V_5 - IL_37a0: ldloc.s V_5 - IL_37a2: ldloc.s V_4 - IL_37a4: ldloc.3 - IL_37a5: ldc.i4.1 - IL_37a6: sub - IL_37a7: mul - IL_37a8: mul - IL_37a9: stloc.s V_5 - IL_37ab: ldloc.2 - IL_37ac: ldc.i4.1 - IL_37ad: sub - IL_37ae: stloc.2 - IL_37af: ldloc.1 - IL_37b0: ldloc.s V_5 - IL_37b2: sub - IL_37b3: stloc.1 - IL_37b4: ldloc.s V_4 - IL_37b6: ldloc.3 - IL_37b7: ldc.i4.2 - IL_37b8: add - IL_37b9: ldloc.2 - IL_37ba: mul - IL_37bb: sub - IL_37bc: stloc.s V_4 - IL_37be: ldloc.1 - IL_37bf: ldc.i4.1 - IL_37c0: add - IL_37c1: stloc.1 - IL_37c2: ldloc.1 - IL_37c3: ldc.i4.1 - IL_37c4: sub - IL_37c5: stloc.1 - IL_37c6: br.s IL_37ff - IL_37c8: ldloc.2 - IL_37c9: ldloc.3 - IL_37ca: ldloc.s V_4 - IL_37cc: sub - IL_37cd: mul - IL_37ce: stloc.2 - IL_37cf: ldloc.s V_5 - IL_37d1: ldc.i4.1 - IL_37d2: add - IL_37d3: stloc.s V_5 - IL_37d5: ldloc.3 - IL_37d6: ldc.i4.m1 - IL_37d7: add - IL_37d8: stloc.3 - IL_37d9: ldloc.s V_4 - IL_37db: ldloc.s V_5 - IL_37dd: ldloc.1 - IL_37de: ldc.i4.1 - IL_37df: add - IL_37e0: mul - IL_37e1: mul - IL_37e2: stloc.s V_4 - IL_37e4: ldloc.2 - IL_37e5: ldc.i4.1 - IL_37e6: add - IL_37e7: stloc.2 - IL_37e8: ldloc.1 - IL_37e9: ldc.i4.2 - IL_37ea: sub - IL_37eb: stloc.1 - IL_37ec: ldloc.2 - IL_37ed: ldloc.3 - IL_37ee: ldc.i4.1 - IL_37ef: sub - IL_37f0: ldloc.s V_4 - IL_37f2: mul - IL_37f3: mul - IL_37f4: stloc.2 - IL_37f5: ldloc.s V_5 - IL_37f7: ldc.i4.1 - IL_37f8: add - IL_37f9: stloc.s V_5 - IL_37fb: ldloc.2 - IL_37fc: ldc.i4.1 - IL_37fd: add - IL_37fe: stloc.2 - IL_37ff: ldloc.1 - IL_3800: ldloc.2 - IL_3801: bge.s IL_383d - IL_3803: ldloc.1 - IL_3804: ldloc.2 - IL_3805: ldloc.3 - IL_3806: mul - IL_3807: add - IL_3808: stloc.1 - IL_3809: ldloc.s V_4 - IL_380b: ldc.i4.1 - IL_380c: add - IL_380d: stloc.s V_4 - IL_380f: ldloc.s V_5 - IL_3811: ldc.i4.1 - IL_3812: sub - IL_3813: stloc.s V_5 - IL_3815: ldloc.s V_5 - IL_3817: ldloc.s V_4 - IL_3819: ldloc.3 - IL_381a: ldc.i4.1 - IL_381b: sub - IL_381c: mul - IL_381d: mul - IL_381e: stloc.s V_5 - IL_3820: ldloc.2 - IL_3821: ldc.i4.1 - IL_3822: sub - IL_3823: stloc.2 - IL_3824: ldloc.1 - IL_3825: ldloc.s V_5 - IL_3827: sub - IL_3828: stloc.1 - IL_3829: ldloc.s V_4 - IL_382b: ldloc.3 - IL_382c: ldc.i4.2 - IL_382d: add - IL_382e: ldloc.2 - IL_382f: mul - IL_3830: sub - IL_3831: stloc.s V_4 - IL_3833: ldloc.1 - IL_3834: ldc.i4.1 - IL_3835: add - IL_3836: stloc.1 - IL_3837: ldloc.1 - IL_3838: ldc.i4.1 - IL_3839: sub - IL_383a: stloc.1 - IL_383b: br.s IL_3874 - IL_383d: ldloc.2 - IL_383e: ldloc.3 - IL_383f: ldloc.s V_4 - IL_3841: sub - IL_3842: mul - IL_3843: stloc.2 - IL_3844: ldloc.s V_5 - IL_3846: ldc.i4.1 - IL_3847: add - IL_3848: stloc.s V_5 - IL_384a: ldloc.3 - IL_384b: ldc.i4.m1 - IL_384c: add - IL_384d: stloc.3 - IL_384e: ldloc.s V_4 - IL_3850: ldloc.s V_5 - IL_3852: ldloc.1 - IL_3853: ldc.i4.1 - IL_3854: add - IL_3855: mul - IL_3856: mul - IL_3857: stloc.s V_4 - IL_3859: ldloc.2 - IL_385a: ldc.i4.1 - IL_385b: add - IL_385c: stloc.2 - IL_385d: ldloc.1 - IL_385e: ldc.i4.2 - IL_385f: sub - IL_3860: stloc.1 - IL_3861: ldloc.2 - IL_3862: ldloc.3 - IL_3863: ldc.i4.1 - IL_3864: sub - IL_3865: ldloc.s V_4 - IL_3867: add - IL_3868: mul - IL_3869: stloc.2 - IL_386a: ldloc.s V_5 - IL_386c: ldc.i4.1 - IL_386d: add - IL_386e: stloc.s V_5 - IL_3870: ldloc.2 - IL_3871: ldc.i4.1 - IL_3872: add - IL_3873: stloc.2 - IL_3874: ldloc.1 - IL_3875: ldloc.2 - IL_3876: bge.s IL_38b2 - IL_3878: ldloc.1 - IL_3879: ldloc.2 - IL_387a: ldloc.3 - IL_387b: sub - IL_387c: add - IL_387d: stloc.1 - IL_387e: ldloc.s V_4 - IL_3880: ldc.i4.1 - IL_3881: add - IL_3882: stloc.s V_4 - IL_3884: ldloc.s V_5 - IL_3886: ldc.i4.1 - IL_3887: sub - IL_3888: stloc.s V_5 - IL_388a: ldloc.s V_5 - IL_388c: ldloc.s V_4 - IL_388e: ldloc.3 - IL_388f: ldc.i4.1 - IL_3890: sub - IL_3891: add - IL_3892: mul - IL_3893: stloc.s V_5 - IL_3895: ldloc.2 - IL_3896: ldc.i4.1 - IL_3897: sub - IL_3898: stloc.2 - IL_3899: ldloc.1 - IL_389a: ldloc.s V_5 - IL_389c: sub - IL_389d: stloc.1 - IL_389e: ldloc.s V_4 - IL_38a0: ldloc.3 - IL_38a1: ldc.i4.2 - IL_38a2: add - IL_38a3: ldloc.2 - IL_38a4: add - IL_38a5: add - IL_38a6: stloc.s V_4 - IL_38a8: ldloc.1 - IL_38a9: ldc.i4.1 - IL_38aa: add - IL_38ab: stloc.1 - IL_38ac: ldloc.1 - IL_38ad: ldc.i4.1 - IL_38ae: sub - IL_38af: stloc.1 - IL_38b0: br.s IL_38e9 - IL_38b2: ldloc.2 - IL_38b3: ldloc.3 - IL_38b4: ldloc.s V_4 - IL_38b6: add - IL_38b7: mul - IL_38b8: stloc.2 - IL_38b9: ldloc.s V_5 - IL_38bb: ldc.i4.1 - IL_38bc: add - IL_38bd: stloc.s V_5 - IL_38bf: ldloc.3 - IL_38c0: ldc.i4.m1 - IL_38c1: add - IL_38c2: stloc.3 - IL_38c3: ldloc.s V_4 - IL_38c5: ldloc.s V_5 - IL_38c7: ldloc.1 - IL_38c8: ldc.i4.1 - IL_38c9: add - IL_38ca: sub - IL_38cb: add - IL_38cc: stloc.s V_4 - IL_38ce: ldloc.2 - IL_38cf: ldc.i4.1 - IL_38d0: add - IL_38d1: stloc.2 - IL_38d2: ldloc.1 - IL_38d3: ldc.i4.2 - IL_38d4: sub - IL_38d5: stloc.1 - IL_38d6: ldloc.2 - IL_38d7: ldloc.3 - IL_38d8: ldc.i4.1 - IL_38d9: sub - IL_38da: ldloc.s V_4 - IL_38dc: add - IL_38dd: mul - IL_38de: stloc.2 - IL_38df: ldloc.s V_5 - IL_38e1: ldc.i4.1 - IL_38e2: add - IL_38e3: stloc.s V_5 - IL_38e5: ldloc.2 - IL_38e6: ldc.i4.1 - IL_38e7: add - IL_38e8: stloc.2 - IL_38e9: ldloc.1 - IL_38ea: ldloc.2 - IL_38eb: blt.s IL_3927 - IL_38ed: ldloc.1 - IL_38ee: ldloc.2 - IL_38ef: ldloc.3 - IL_38f0: mul - IL_38f1: mul - IL_38f2: stloc.1 - IL_38f3: ldloc.s V_4 - IL_38f5: ldc.i4.1 - IL_38f6: add - IL_38f7: stloc.s V_4 - IL_38f9: ldloc.s V_5 - IL_38fb: ldc.i4.1 - IL_38fc: sub - IL_38fd: stloc.s V_5 - IL_38ff: ldloc.s V_5 - IL_3901: ldloc.s V_4 - IL_3903: ldloc.3 - IL_3904: ldc.i4.1 - IL_3905: sub - IL_3906: sub - IL_3907: add - IL_3908: stloc.s V_5 - IL_390a: ldloc.2 - IL_390b: ldc.i4.1 - IL_390c: sub - IL_390d: stloc.2 - IL_390e: ldloc.1 - IL_390f: ldloc.s V_5 - IL_3911: sub - IL_3912: stloc.1 - IL_3913: ldloc.s V_4 - IL_3915: ldloc.3 - IL_3916: ldc.i4.2 - IL_3917: add - IL_3918: ldloc.2 - IL_3919: sub - IL_391a: sub - IL_391b: stloc.s V_4 - IL_391d: ldloc.1 - IL_391e: ldc.i4.1 - IL_391f: add - IL_3920: stloc.1 - IL_3921: ldloc.1 - IL_3922: ldc.i4.1 - IL_3923: sub - IL_3924: stloc.1 - IL_3925: br.s IL_395e - IL_3927: ldloc.2 - IL_3928: ldloc.3 - IL_3929: ldloc.s V_4 - IL_392b: sub - IL_392c: add - IL_392d: stloc.2 - IL_392e: ldloc.s V_5 - IL_3930: ldc.i4.1 - IL_3931: add - IL_3932: stloc.s V_5 - IL_3934: ldloc.3 - IL_3935: ldc.i4.m1 - IL_3936: add - IL_3937: stloc.3 - IL_3938: ldloc.s V_4 - IL_393a: ldloc.s V_5 - IL_393c: ldloc.1 - IL_393d: ldc.i4.1 - IL_393e: add - IL_393f: sub - IL_3940: sub - IL_3941: stloc.s V_4 - IL_3943: ldloc.2 - IL_3944: ldc.i4.1 - IL_3945: add - IL_3946: stloc.2 - IL_3947: ldloc.1 - IL_3948: ldc.i4.2 - IL_3949: sub - IL_394a: stloc.1 - IL_394b: ldloc.2 - IL_394c: ldloc.3 - IL_394d: ldc.i4.1 - IL_394e: sub - IL_394f: ldloc.s V_4 - IL_3951: add - IL_3952: add - IL_3953: stloc.2 - IL_3954: ldloc.s V_5 - IL_3956: ldc.i4.1 - IL_3957: add - IL_3958: stloc.s V_5 - IL_395a: ldloc.2 - IL_395b: ldc.i4.1 - IL_395c: add - IL_395d: stloc.2 - IL_395e: ldloc.1 - IL_395f: ldloc.2 - IL_3960: beq.s IL_399c - IL_3962: ldloc.1 - IL_3963: ldloc.2 - IL_3964: ldloc.3 - IL_3965: add - IL_3966: mul - IL_3967: stloc.1 - IL_3968: ldloc.s V_4 - IL_396a: ldc.i4.1 - IL_396b: add - IL_396c: stloc.s V_4 - IL_396e: ldloc.s V_5 - IL_3970: ldc.i4.1 - IL_3971: sub - IL_3972: stloc.s V_5 - IL_3974: ldloc.s V_5 - IL_3976: ldloc.s V_4 - IL_3978: ldloc.3 - IL_3979: ldc.i4.1 - IL_397a: sub - IL_397b: sub - IL_397c: add - IL_397d: stloc.s V_5 - IL_397f: ldloc.2 - IL_3980: ldc.i4.1 - IL_3981: sub - IL_3982: stloc.2 - IL_3983: ldloc.1 - IL_3984: ldloc.s V_5 - IL_3986: sub - IL_3987: stloc.1 - IL_3988: ldloc.s V_4 - IL_398a: ldloc.3 - IL_398b: ldc.i4.2 - IL_398c: add - IL_398d: ldloc.2 - IL_398e: sub - IL_398f: sub - IL_3990: stloc.s V_4 - IL_3992: ldloc.1 - IL_3993: ldc.i4.1 - IL_3994: add - IL_3995: stloc.1 - IL_3996: ldloc.1 - IL_3997: ldc.i4.1 - IL_3998: sub - IL_3999: stloc.1 - IL_399a: br.s IL_39d3 - IL_399c: ldloc.2 - IL_399d: ldloc.3 - IL_399e: ldloc.s V_4 - IL_39a0: sub - IL_39a1: add - IL_39a2: stloc.2 - IL_39a3: ldloc.s V_5 - IL_39a5: ldc.i4.1 - IL_39a6: add - IL_39a7: stloc.s V_5 - IL_39a9: ldloc.3 - IL_39aa: ldc.i4.m1 - IL_39ab: add - IL_39ac: stloc.3 - IL_39ad: ldloc.s V_4 - IL_39af: ldloc.s V_5 - IL_39b1: ldloc.1 - IL_39b2: ldc.i4.1 - IL_39b3: add - IL_39b4: mul - IL_39b5: sub - IL_39b6: stloc.s V_4 - IL_39b8: ldloc.2 - IL_39b9: ldc.i4.1 - IL_39ba: add - IL_39bb: stloc.2 - IL_39bc: ldloc.1 - IL_39bd: ldc.i4.2 - IL_39be: sub - IL_39bf: stloc.1 - IL_39c0: ldloc.2 - IL_39c1: ldloc.3 - IL_39c2: ldc.i4.1 - IL_39c3: sub - IL_39c4: ldloc.s V_4 - IL_39c6: mul - IL_39c7: add - IL_39c8: stloc.2 - IL_39c9: ldloc.s V_5 - IL_39cb: ldc.i4.1 - IL_39cc: add - IL_39cd: stloc.s V_5 - IL_39cf: ldloc.2 - IL_39d0: ldc.i4.1 - IL_39d1: add - IL_39d2: stloc.2 - IL_39d3: ldloc.1 - IL_39d4: ldloc.2 - IL_39d5: bgt.s IL_3a11 - IL_39d7: ldloc.1 - IL_39d8: ldloc.2 - IL_39d9: ldloc.3 - IL_39da: add - IL_39db: sub - IL_39dc: stloc.1 - IL_39dd: ldloc.s V_4 - IL_39df: ldc.i4.1 - IL_39e0: add - IL_39e1: stloc.s V_4 - IL_39e3: ldloc.s V_5 - IL_39e5: ldc.i4.1 - IL_39e6: sub - IL_39e7: stloc.s V_5 - IL_39e9: ldloc.s V_5 - IL_39eb: ldloc.s V_4 - IL_39ed: ldloc.3 - IL_39ee: ldc.i4.1 - IL_39ef: sub - IL_39f0: sub - IL_39f1: mul - IL_39f2: stloc.s V_5 - IL_39f4: ldloc.2 - IL_39f5: ldc.i4.1 - IL_39f6: sub - IL_39f7: stloc.2 - IL_39f8: ldloc.1 - IL_39f9: ldloc.s V_5 - IL_39fb: sub - IL_39fc: stloc.1 - IL_39fd: ldloc.s V_4 - IL_39ff: ldloc.3 - IL_3a00: ldc.i4.2 - IL_3a01: add - IL_3a02: ldloc.2 - IL_3a03: sub - IL_3a04: sub - IL_3a05: stloc.s V_4 - IL_3a07: ldloc.1 - IL_3a08: ldc.i4.1 - IL_3a09: add - IL_3a0a: stloc.1 - IL_3a0b: ldloc.1 - IL_3a0c: ldc.i4.1 - IL_3a0d: sub - IL_3a0e: stloc.1 - IL_3a0f: br.s IL_3a48 - IL_3a11: ldloc.2 - IL_3a12: ldloc.3 - IL_3a13: ldloc.s V_4 - IL_3a15: sub - IL_3a16: mul - IL_3a17: stloc.2 - IL_3a18: ldloc.s V_5 - IL_3a1a: ldc.i4.1 - IL_3a1b: add - IL_3a1c: stloc.s V_5 - IL_3a1e: ldloc.3 - IL_3a1f: ldc.i4.m1 - IL_3a20: add - IL_3a21: stloc.3 - IL_3a22: ldloc.s V_4 - IL_3a24: ldloc.s V_5 - IL_3a26: ldloc.1 - IL_3a27: ldc.i4.1 - IL_3a28: add - IL_3a29: mul - IL_3a2a: sub - IL_3a2b: stloc.s V_4 - IL_3a2d: ldloc.2 - IL_3a2e: ldc.i4.1 - IL_3a2f: add - IL_3a30: stloc.2 - IL_3a31: ldloc.1 - IL_3a32: ldc.i4.2 - IL_3a33: sub - IL_3a34: stloc.1 - IL_3a35: ldloc.2 - IL_3a36: ldloc.3 - IL_3a37: ldc.i4.1 - IL_3a38: sub - IL_3a39: ldloc.s V_4 - IL_3a3b: mul - IL_3a3c: mul - IL_3a3d: stloc.2 - IL_3a3e: ldloc.s V_5 - IL_3a40: ldc.i4.1 - IL_3a41: add - IL_3a42: stloc.s V_5 - IL_3a44: ldloc.2 - IL_3a45: ldc.i4.1 - IL_3a46: add - IL_3a47: stloc.2 - IL_3a48: ldloc.1 - IL_3a49: ldloc.2 - IL_3a4a: bgt.s IL_3a86 - IL_3a4c: ldloc.1 - IL_3a4d: ldloc.2 - IL_3a4e: ldloc.3 - IL_3a4f: add - IL_3a50: sub - IL_3a51: stloc.1 - IL_3a52: ldloc.s V_4 - IL_3a54: ldc.i4.1 - IL_3a55: add - IL_3a56: stloc.s V_4 - IL_3a58: ldloc.s V_5 - IL_3a5a: ldc.i4.1 - IL_3a5b: sub - IL_3a5c: stloc.s V_5 - IL_3a5e: ldloc.s V_5 - IL_3a60: ldloc.s V_4 - IL_3a62: ldloc.3 - IL_3a63: ldc.i4.1 - IL_3a64: sub - IL_3a65: mul - IL_3a66: mul - IL_3a67: stloc.s V_5 - IL_3a69: ldloc.2 - IL_3a6a: ldc.i4.1 - IL_3a6b: sub - IL_3a6c: stloc.2 - IL_3a6d: ldloc.1 - IL_3a6e: ldloc.s V_5 - IL_3a70: sub - IL_3a71: stloc.1 - IL_3a72: ldloc.s V_4 - IL_3a74: ldloc.3 - IL_3a75: ldc.i4.2 - IL_3a76: add - IL_3a77: ldloc.2 - IL_3a78: mul - IL_3a79: mul - IL_3a7a: stloc.s V_4 - IL_3a7c: ldloc.1 - IL_3a7d: ldc.i4.1 - IL_3a7e: add - IL_3a7f: stloc.1 - IL_3a80: ldloc.1 - IL_3a81: ldc.i4.1 - IL_3a82: sub - IL_3a83: stloc.1 - IL_3a84: br.s IL_3abd - IL_3a86: ldloc.2 - IL_3a87: ldloc.3 - IL_3a88: ldloc.s V_4 - IL_3a8a: mul - IL_3a8b: mul - IL_3a8c: stloc.2 - IL_3a8d: ldloc.s V_5 - IL_3a8f: ldc.i4.1 - IL_3a90: add - IL_3a91: stloc.s V_5 - IL_3a93: ldloc.3 - IL_3a94: ldc.i4.m1 - IL_3a95: add - IL_3a96: stloc.3 - IL_3a97: ldloc.s V_4 - IL_3a99: ldloc.s V_5 - IL_3a9b: ldloc.1 - IL_3a9c: ldc.i4.1 - IL_3a9d: add - IL_3a9e: sub - IL_3a9f: mul - IL_3aa0: stloc.s V_4 - IL_3aa2: ldloc.2 - IL_3aa3: ldc.i4.1 - IL_3aa4: add - IL_3aa5: stloc.2 - IL_3aa6: ldloc.1 - IL_3aa7: ldc.i4.2 - IL_3aa8: sub - IL_3aa9: stloc.1 - IL_3aaa: ldloc.2 - IL_3aab: ldloc.3 - IL_3aac: ldc.i4.1 - IL_3aad: sub - IL_3aae: ldloc.s V_4 - IL_3ab0: sub - IL_3ab1: mul - IL_3ab2: stloc.2 - IL_3ab3: ldloc.s V_5 - IL_3ab5: ldc.i4.1 - IL_3ab6: add - IL_3ab7: stloc.s V_5 - IL_3ab9: ldloc.2 - IL_3aba: ldc.i4.1 - IL_3abb: add - IL_3abc: stloc.2 - IL_3abd: ldloc.1 - IL_3abe: ldloc.2 - IL_3abf: bge.s IL_3afb - IL_3ac1: ldloc.1 - IL_3ac2: ldloc.2 - IL_3ac3: ldloc.3 - IL_3ac4: mul - IL_3ac5: mul - IL_3ac6: stloc.1 - IL_3ac7: ldloc.s V_4 - IL_3ac9: ldc.i4.1 - IL_3aca: add - IL_3acb: stloc.s V_4 - IL_3acd: ldloc.s V_5 - IL_3acf: ldc.i4.1 - IL_3ad0: sub - IL_3ad1: stloc.s V_5 - IL_3ad3: ldloc.s V_5 - IL_3ad5: ldloc.s V_4 - IL_3ad7: ldloc.3 - IL_3ad8: ldc.i4.1 - IL_3ad9: sub - IL_3ada: add - IL_3adb: mul - IL_3adc: stloc.s V_5 - IL_3ade: ldloc.2 - IL_3adf: ldc.i4.1 - IL_3ae0: sub - IL_3ae1: stloc.2 - IL_3ae2: ldloc.1 - IL_3ae3: ldloc.s V_5 - IL_3ae5: sub - IL_3ae6: stloc.1 - IL_3ae7: ldloc.s V_4 - IL_3ae9: ldloc.3 - IL_3aea: ldc.i4.2 - IL_3aeb: add - IL_3aec: ldloc.2 - IL_3aed: add - IL_3aee: mul - IL_3aef: stloc.s V_4 - IL_3af1: ldloc.1 - IL_3af2: ldc.i4.1 - IL_3af3: add - IL_3af4: stloc.1 - IL_3af5: ldloc.1 - IL_3af6: ldc.i4.1 - IL_3af7: sub - IL_3af8: stloc.1 - IL_3af9: br.s IL_3b32 - IL_3afb: ldloc.2 - IL_3afc: ldloc.3 - IL_3afd: ldloc.s V_4 - IL_3aff: mul - IL_3b00: mul - IL_3b01: stloc.2 - IL_3b02: ldloc.s V_5 - IL_3b04: ldc.i4.1 - IL_3b05: add - IL_3b06: stloc.s V_5 - IL_3b08: ldloc.3 - IL_3b09: ldc.i4.m1 - IL_3b0a: add - IL_3b0b: stloc.3 - IL_3b0c: ldloc.s V_4 - IL_3b0e: ldloc.s V_5 - IL_3b10: ldloc.1 - IL_3b11: ldc.i4.1 - IL_3b12: add - IL_3b13: add - IL_3b14: add - IL_3b15: stloc.s V_4 - IL_3b17: ldloc.2 - IL_3b18: ldc.i4.1 - IL_3b19: add - IL_3b1a: stloc.2 - IL_3b1b: ldloc.1 - IL_3b1c: ldc.i4.2 - IL_3b1d: sub - IL_3b1e: stloc.1 - IL_3b1f: ldloc.2 - IL_3b20: ldloc.3 - IL_3b21: ldc.i4.1 - IL_3b22: sub - IL_3b23: ldloc.s V_4 - IL_3b25: mul - IL_3b26: mul - IL_3b27: stloc.2 - IL_3b28: ldloc.s V_5 - IL_3b2a: ldc.i4.1 - IL_3b2b: add - IL_3b2c: stloc.s V_5 - IL_3b2e: ldloc.2 - IL_3b2f: ldc.i4.1 - IL_3b30: add - IL_3b31: stloc.2 - IL_3b32: ldloc.1 - IL_3b33: ldloc.2 - IL_3b34: bne.un.s IL_3b70 - IL_3b36: ldloc.1 - IL_3b37: ldloc.2 - IL_3b38: ldloc.3 - IL_3b39: mul - IL_3b3a: sub - IL_3b3b: stloc.1 - IL_3b3c: ldloc.s V_4 - IL_3b3e: ldc.i4.1 - IL_3b3f: add - IL_3b40: stloc.s V_4 - IL_3b42: ldloc.s V_5 - IL_3b44: ldc.i4.1 - IL_3b45: sub - IL_3b46: stloc.s V_5 - IL_3b48: ldloc.s V_5 - IL_3b4a: ldloc.s V_4 - IL_3b4c: ldloc.3 - IL_3b4d: ldc.i4.1 - IL_3b4e: sub - IL_3b4f: add - IL_3b50: add - IL_3b51: stloc.s V_5 - IL_3b53: ldloc.2 - IL_3b54: ldc.i4.1 - IL_3b55: sub - IL_3b56: stloc.2 - IL_3b57: ldloc.1 - IL_3b58: ldloc.s V_5 - IL_3b5a: sub - IL_3b5b: stloc.1 - IL_3b5c: ldloc.s V_4 - IL_3b5e: ldloc.3 - IL_3b5f: ldc.i4.2 - IL_3b60: add - IL_3b61: ldloc.2 - IL_3b62: add - IL_3b63: mul - IL_3b64: stloc.s V_4 - IL_3b66: ldloc.1 - IL_3b67: ldc.i4.1 - IL_3b68: add - IL_3b69: stloc.1 - IL_3b6a: ldloc.1 - IL_3b6b: ldc.i4.1 - IL_3b6c: sub - IL_3b6d: stloc.1 - IL_3b6e: br.s IL_3ba7 - IL_3b70: ldloc.2 - IL_3b71: ldloc.3 - IL_3b72: ldloc.s V_4 - IL_3b74: mul - IL_3b75: add - IL_3b76: stloc.2 - IL_3b77: ldloc.s V_5 - IL_3b79: ldc.i4.1 - IL_3b7a: add - IL_3b7b: stloc.s V_5 - IL_3b7d: ldloc.3 - IL_3b7e: ldc.i4.m1 - IL_3b7f: add - IL_3b80: stloc.3 - IL_3b81: ldloc.s V_4 - IL_3b83: ldloc.s V_5 - IL_3b85: ldloc.1 - IL_3b86: ldc.i4.1 - IL_3b87: add - IL_3b88: sub - IL_3b89: add - IL_3b8a: stloc.s V_4 - IL_3b8c: ldloc.2 - IL_3b8d: ldc.i4.1 - IL_3b8e: add - IL_3b8f: stloc.2 - IL_3b90: ldloc.1 - IL_3b91: ldc.i4.2 - IL_3b92: sub - IL_3b93: stloc.1 - IL_3b94: ldloc.2 - IL_3b95: ldloc.3 - IL_3b96: ldc.i4.1 - IL_3b97: sub - IL_3b98: ldloc.s V_4 - IL_3b9a: sub - IL_3b9b: add - IL_3b9c: stloc.2 - IL_3b9d: ldloc.s V_5 - IL_3b9f: ldc.i4.1 - IL_3ba0: add - IL_3ba1: stloc.s V_5 - IL_3ba3: ldloc.2 - IL_3ba4: ldc.i4.1 - IL_3ba5: add - IL_3ba6: stloc.2 - IL_3ba7: ldloc.1 - IL_3ba8: ldloc.3 - IL_3ba9: blt.s IL_3be5 - IL_3bab: ldloc.1 - IL_3bac: ldloc.2 - IL_3bad: ldloc.3 - IL_3bae: sub - IL_3baf: mul - IL_3bb0: stloc.1 - IL_3bb1: ldloc.s V_4 - IL_3bb3: ldc.i4.1 - IL_3bb4: add - IL_3bb5: stloc.s V_4 - IL_3bb7: ldloc.s V_5 - IL_3bb9: ldc.i4.1 - IL_3bba: sub - IL_3bbb: stloc.s V_5 - IL_3bbd: ldloc.s V_5 - IL_3bbf: ldloc.s V_4 - IL_3bc1: ldloc.3 - IL_3bc2: ldc.i4.1 - IL_3bc3: sub - IL_3bc4: add - IL_3bc5: mul - IL_3bc6: stloc.s V_5 - IL_3bc8: ldloc.2 - IL_3bc9: ldc.i4.1 - IL_3bca: sub - IL_3bcb: stloc.2 - IL_3bcc: ldloc.1 - IL_3bcd: ldloc.s V_5 - IL_3bcf: sub - IL_3bd0: stloc.1 - IL_3bd1: ldloc.s V_4 - IL_3bd3: ldloc.3 - IL_3bd4: ldc.i4.2 - IL_3bd5: add - IL_3bd6: ldloc.2 - IL_3bd7: add - IL_3bd8: sub - IL_3bd9: stloc.s V_4 - IL_3bdb: ldloc.1 - IL_3bdc: ldc.i4.1 - IL_3bdd: add - IL_3bde: stloc.1 - IL_3bdf: ldloc.1 - IL_3be0: ldc.i4.1 - IL_3be1: sub - IL_3be2: stloc.1 - IL_3be3: br.s IL_3c1c - IL_3be5: ldloc.2 - IL_3be6: ldloc.3 - IL_3be7: ldloc.s V_4 - IL_3be9: sub - IL_3bea: mul - IL_3beb: stloc.2 - IL_3bec: ldloc.s V_5 - IL_3bee: ldc.i4.1 - IL_3bef: add - IL_3bf0: stloc.s V_5 - IL_3bf2: ldloc.3 - IL_3bf3: ldc.i4.m1 - IL_3bf4: add - IL_3bf5: stloc.3 - IL_3bf6: ldloc.s V_4 - IL_3bf8: ldloc.s V_5 - IL_3bfa: ldloc.1 - IL_3bfb: ldc.i4.1 - IL_3bfc: add - IL_3bfd: sub - IL_3bfe: add - IL_3bff: stloc.s V_4 - IL_3c01: ldloc.2 - IL_3c02: ldc.i4.1 - IL_3c03: add - IL_3c04: stloc.2 - IL_3c05: ldloc.1 - IL_3c06: ldc.i4.2 - IL_3c07: sub - IL_3c08: stloc.1 - IL_3c09: ldloc.2 - IL_3c0a: ldloc.3 - IL_3c0b: ldc.i4.1 - IL_3c0c: sub - IL_3c0d: ldloc.s V_4 - IL_3c0f: mul - IL_3c10: mul - IL_3c11: stloc.2 - IL_3c12: ldloc.s V_5 - IL_3c14: ldc.i4.1 - IL_3c15: add - IL_3c16: stloc.s V_5 - IL_3c18: ldloc.2 - IL_3c19: ldc.i4.1 - IL_3c1a: add - IL_3c1b: stloc.2 - IL_3c1c: ldloc.1 - IL_3c1d: ldloc.2 - IL_3c1e: ble.s IL_3c5a - IL_3c20: ldloc.1 - IL_3c21: ldloc.2 - IL_3c22: ldloc.3 - IL_3c23: add - IL_3c24: sub - IL_3c25: stloc.1 - IL_3c26: ldloc.s V_4 - IL_3c28: ldc.i4.1 - IL_3c29: add - IL_3c2a: stloc.s V_4 - IL_3c2c: ldloc.s V_5 - IL_3c2e: ldc.i4.1 - IL_3c2f: sub - IL_3c30: stloc.s V_5 - IL_3c32: ldloc.s V_5 - IL_3c34: ldloc.s V_4 - IL_3c36: ldloc.3 - IL_3c37: ldc.i4.1 - IL_3c38: sub - IL_3c39: mul - IL_3c3a: add - IL_3c3b: stloc.s V_5 - IL_3c3d: ldloc.2 - IL_3c3e: ldc.i4.1 - IL_3c3f: sub - IL_3c40: stloc.2 - IL_3c41: ldloc.1 - IL_3c42: ldloc.s V_5 - IL_3c44: sub - IL_3c45: stloc.1 - IL_3c46: ldloc.s V_4 - IL_3c48: ldloc.3 - IL_3c49: ldc.i4.2 - IL_3c4a: add - IL_3c4b: ldloc.2 - IL_3c4c: mul - IL_3c4d: add - IL_3c4e: stloc.s V_4 - IL_3c50: ldloc.1 - IL_3c51: ldc.i4.1 - IL_3c52: add - IL_3c53: stloc.1 - IL_3c54: ldloc.1 - IL_3c55: ldc.i4.1 - IL_3c56: sub - IL_3c57: stloc.1 - IL_3c58: br.s IL_3c91 - IL_3c5a: ldloc.2 - IL_3c5b: ldloc.3 - IL_3c5c: ldloc.s V_4 - IL_3c5e: add - IL_3c5f: add - IL_3c60: stloc.2 - IL_3c61: ldloc.s V_5 - IL_3c63: ldc.i4.1 - IL_3c64: add - IL_3c65: stloc.s V_5 - IL_3c67: ldloc.3 - IL_3c68: ldc.i4.m1 - IL_3c69: add - IL_3c6a: stloc.3 - IL_3c6b: ldloc.s V_4 - IL_3c6d: ldloc.s V_5 - IL_3c6f: ldloc.1 - IL_3c70: ldc.i4.1 - IL_3c71: add - IL_3c72: sub - IL_3c73: mul - IL_3c74: stloc.s V_4 - IL_3c76: ldloc.2 - IL_3c77: ldc.i4.1 - IL_3c78: add - IL_3c79: stloc.2 - IL_3c7a: ldloc.1 - IL_3c7b: ldc.i4.2 - IL_3c7c: sub - IL_3c7d: stloc.1 - IL_3c7e: ldloc.2 - IL_3c7f: ldloc.3 - IL_3c80: ldc.i4.1 - IL_3c81: sub - IL_3c82: ldloc.s V_4 - IL_3c84: add - IL_3c85: add - IL_3c86: stloc.2 - IL_3c87: ldloc.s V_5 - IL_3c89: ldc.i4.1 - IL_3c8a: add - IL_3c8b: stloc.s V_5 - IL_3c8d: ldloc.2 - IL_3c8e: ldc.i4.1 - IL_3c8f: add - IL_3c90: stloc.2 - IL_3c91: ldloc.1 - IL_3c92: ldloc.2 - IL_3c93: blt.s IL_3ccf - IL_3c95: ldloc.1 - IL_3c96: ldloc.2 - IL_3c97: ldloc.3 - IL_3c98: mul - IL_3c99: mul - IL_3c9a: stloc.1 - IL_3c9b: ldloc.s V_4 - IL_3c9d: ldc.i4.1 - IL_3c9e: add - IL_3c9f: stloc.s V_4 - IL_3ca1: ldloc.s V_5 - IL_3ca3: ldc.i4.1 - IL_3ca4: sub - IL_3ca5: stloc.s V_5 - IL_3ca7: ldloc.s V_5 - IL_3ca9: ldloc.s V_4 - IL_3cab: ldloc.3 - IL_3cac: ldc.i4.1 - IL_3cad: sub - IL_3cae: mul - IL_3caf: mul - IL_3cb0: stloc.s V_5 - IL_3cb2: ldloc.2 - IL_3cb3: ldc.i4.1 - IL_3cb4: sub - IL_3cb5: stloc.2 - IL_3cb6: ldloc.1 - IL_3cb7: ldloc.s V_5 - IL_3cb9: sub - IL_3cba: stloc.1 - IL_3cbb: ldloc.s V_4 - IL_3cbd: ldloc.3 - IL_3cbe: ldc.i4.2 - IL_3cbf: add - IL_3cc0: ldloc.2 - IL_3cc1: mul - IL_3cc2: mul - IL_3cc3: stloc.s V_4 - IL_3cc5: ldloc.1 - IL_3cc6: ldc.i4.1 - IL_3cc7: add - IL_3cc8: stloc.1 - IL_3cc9: ldloc.1 - IL_3cca: ldc.i4.1 - IL_3ccb: sub - IL_3ccc: stloc.1 - IL_3ccd: br.s IL_3d06 - IL_3ccf: ldloc.2 - IL_3cd0: ldloc.3 - IL_3cd1: ldloc.s V_4 - IL_3cd3: mul - IL_3cd4: mul - IL_3cd5: stloc.2 - IL_3cd6: ldloc.s V_5 - IL_3cd8: ldc.i4.1 - IL_3cd9: add - IL_3cda: stloc.s V_5 - IL_3cdc: ldloc.3 - IL_3cdd: ldc.i4.m1 - IL_3cde: add - IL_3cdf: stloc.3 - IL_3ce0: ldloc.s V_4 - IL_3ce2: ldloc.s V_5 - IL_3ce4: ldloc.1 - IL_3ce5: ldc.i4.1 - IL_3ce6: add - IL_3ce7: sub - IL_3ce8: mul - IL_3ce9: stloc.s V_4 - IL_3ceb: ldloc.2 - IL_3cec: ldc.i4.1 - IL_3ced: add - IL_3cee: stloc.2 - IL_3cef: ldloc.1 - IL_3cf0: ldc.i4.2 - IL_3cf1: sub - IL_3cf2: stloc.1 - IL_3cf3: ldloc.2 - IL_3cf4: ldloc.3 - IL_3cf5: ldc.i4.1 - IL_3cf6: sub - IL_3cf7: ldloc.s V_4 - IL_3cf9: sub - IL_3cfa: mul - IL_3cfb: stloc.2 - IL_3cfc: ldloc.s V_5 - IL_3cfe: ldc.i4.1 - IL_3cff: add - IL_3d00: stloc.s V_5 - IL_3d02: ldloc.2 - IL_3d03: ldc.i4.1 - IL_3d04: add - IL_3d05: stloc.2 - IL_3d06: ldloc.1 - IL_3d07: ldloc.2 - IL_3d08: bge.s IL_3d44 - IL_3d0a: ldloc.1 - IL_3d0b: ldloc.2 - IL_3d0c: ldloc.3 - IL_3d0d: mul - IL_3d0e: add - IL_3d0f: stloc.1 - IL_3d10: ldloc.s V_4 - IL_3d12: ldc.i4.1 - IL_3d13: add - IL_3d14: stloc.s V_4 - IL_3d16: ldloc.s V_5 - IL_3d18: ldc.i4.1 - IL_3d19: sub - IL_3d1a: stloc.s V_5 - IL_3d1c: ldloc.s V_5 - IL_3d1e: ldloc.s V_4 - IL_3d20: ldloc.3 - IL_3d21: ldc.i4.1 - IL_3d22: sub - IL_3d23: sub - IL_3d24: sub - IL_3d25: stloc.s V_5 - IL_3d27: ldloc.2 - IL_3d28: ldc.i4.1 - IL_3d29: sub - IL_3d2a: stloc.2 - IL_3d2b: ldloc.1 - IL_3d2c: ldloc.s V_5 - IL_3d2e: sub - IL_3d2f: stloc.1 - IL_3d30: ldloc.s V_4 - IL_3d32: ldloc.3 - IL_3d33: ldc.i4.2 - IL_3d34: add - IL_3d35: ldloc.2 - IL_3d36: sub - IL_3d37: mul - IL_3d38: stloc.s V_4 - IL_3d3a: ldloc.1 - IL_3d3b: ldc.i4.1 - IL_3d3c: add - IL_3d3d: stloc.1 - IL_3d3e: ldloc.1 - IL_3d3f: ldc.i4.1 - IL_3d40: sub - IL_3d41: stloc.1 - IL_3d42: br.s IL_3d7b - IL_3d44: ldloc.2 - IL_3d45: ldloc.3 - IL_3d46: ldloc.s V_4 - IL_3d48: mul - IL_3d49: sub - IL_3d4a: stloc.2 - IL_3d4b: ldloc.s V_5 - IL_3d4d: ldc.i4.1 - IL_3d4e: add - IL_3d4f: stloc.s V_5 - IL_3d51: ldloc.3 - IL_3d52: ldc.i4.m1 - IL_3d53: add - IL_3d54: stloc.3 - IL_3d55: ldloc.s V_4 - IL_3d57: ldloc.s V_5 - IL_3d59: ldloc.1 - IL_3d5a: ldc.i4.1 - IL_3d5b: add - IL_3d5c: sub - IL_3d5d: sub - IL_3d5e: stloc.s V_4 - IL_3d60: ldloc.2 - IL_3d61: ldc.i4.1 - IL_3d62: add - IL_3d63: stloc.2 - IL_3d64: ldloc.1 - IL_3d65: ldc.i4.2 - IL_3d66: sub - IL_3d67: stloc.1 - IL_3d68: ldloc.2 - IL_3d69: ldloc.3 - IL_3d6a: ldc.i4.1 - IL_3d6b: sub - IL_3d6c: ldloc.s V_4 - IL_3d6e: mul - IL_3d6f: sub - IL_3d70: stloc.2 - IL_3d71: ldloc.s V_5 - IL_3d73: ldc.i4.1 - IL_3d74: add - IL_3d75: stloc.s V_5 - IL_3d77: ldloc.2 - IL_3d78: ldc.i4.1 - IL_3d79: add - IL_3d7a: stloc.2 - IL_3d7b: ldloc.1 - IL_3d7c: ldloc.2 - IL_3d7d: ble.s IL_3db9 - IL_3d7f: ldloc.1 - IL_3d80: ldloc.2 - IL_3d81: ldloc.3 - IL_3d82: mul - IL_3d83: add - IL_3d84: stloc.1 - IL_3d85: ldloc.s V_4 - IL_3d87: ldc.i4.1 - IL_3d88: add - IL_3d89: stloc.s V_4 - IL_3d8b: ldloc.s V_5 - IL_3d8d: ldc.i4.1 - IL_3d8e: sub - IL_3d8f: stloc.s V_5 - IL_3d91: ldloc.s V_5 - IL_3d93: ldloc.s V_4 - IL_3d95: ldloc.3 - IL_3d96: ldc.i4.1 - IL_3d97: sub - IL_3d98: mul - IL_3d99: mul - IL_3d9a: stloc.s V_5 - IL_3d9c: ldloc.2 - IL_3d9d: ldc.i4.1 - IL_3d9e: sub - IL_3d9f: stloc.2 - IL_3da0: ldloc.1 - IL_3da1: ldloc.s V_5 - IL_3da3: sub - IL_3da4: stloc.1 - IL_3da5: ldloc.s V_4 - IL_3da7: ldloc.3 - IL_3da8: ldc.i4.2 - IL_3da9: add - IL_3daa: ldloc.2 - IL_3dab: mul - IL_3dac: mul - IL_3dad: stloc.s V_4 - IL_3daf: ldloc.1 - IL_3db0: ldc.i4.1 - IL_3db1: add - IL_3db2: stloc.1 - IL_3db3: ldloc.1 - IL_3db4: ldc.i4.1 - IL_3db5: sub - IL_3db6: stloc.1 - IL_3db7: br.s IL_3df0 - IL_3db9: ldloc.2 - IL_3dba: ldloc.3 - IL_3dbb: ldloc.s V_4 - IL_3dbd: mul - IL_3dbe: mul - IL_3dbf: stloc.2 - IL_3dc0: ldloc.s V_5 - IL_3dc2: ldc.i4.1 - IL_3dc3: add - IL_3dc4: stloc.s V_5 - IL_3dc6: ldloc.3 - IL_3dc7: ldc.i4.m1 - IL_3dc8: add - IL_3dc9: stloc.3 - IL_3dca: ldloc.s V_4 - IL_3dcc: ldloc.s V_5 - IL_3dce: ldloc.1 - IL_3dcf: ldc.i4.1 - IL_3dd0: add - IL_3dd1: add - IL_3dd2: mul - IL_3dd3: stloc.s V_4 - IL_3dd5: ldloc.2 - IL_3dd6: ldc.i4.1 - IL_3dd7: add - IL_3dd8: stloc.2 - IL_3dd9: ldloc.1 - IL_3dda: ldc.i4.2 - IL_3ddb: sub - IL_3ddc: stloc.1 - IL_3ddd: ldloc.2 - IL_3dde: ldloc.3 - IL_3ddf: ldc.i4.1 - IL_3de0: sub - IL_3de1: ldloc.s V_4 - IL_3de3: mul - IL_3de4: mul - IL_3de5: stloc.2 - IL_3de6: ldloc.s V_5 - IL_3de8: ldc.i4.1 - IL_3de9: add - IL_3dea: stloc.s V_5 - IL_3dec: ldloc.2 - IL_3ded: ldc.i4.1 - IL_3dee: add - IL_3def: stloc.2 - IL_3df0: ldloc.1 - IL_3df1: ldloc.2 - IL_3df2: ble.s IL_3e2e - IL_3df4: ldloc.1 - IL_3df5: ldloc.2 - IL_3df6: ldloc.3 - IL_3df7: mul - IL_3df8: add - IL_3df9: stloc.1 - IL_3dfa: ldloc.s V_4 - IL_3dfc: ldc.i4.1 - IL_3dfd: add - IL_3dfe: stloc.s V_4 - IL_3e00: ldloc.s V_5 - IL_3e02: ldc.i4.1 - IL_3e03: sub - IL_3e04: stloc.s V_5 - IL_3e06: ldloc.s V_5 - IL_3e08: ldloc.s V_4 - IL_3e0a: ldloc.3 - IL_3e0b: ldc.i4.1 - IL_3e0c: sub - IL_3e0d: mul - IL_3e0e: mul - IL_3e0f: stloc.s V_5 - IL_3e11: ldloc.2 - IL_3e12: ldc.i4.1 - IL_3e13: sub - IL_3e14: stloc.2 - IL_3e15: ldloc.1 - IL_3e16: ldloc.s V_5 - IL_3e18: sub - IL_3e19: stloc.1 - IL_3e1a: ldloc.s V_4 - IL_3e1c: ldloc.3 - IL_3e1d: ldc.i4.2 - IL_3e1e: add - IL_3e1f: ldloc.2 - IL_3e20: mul - IL_3e21: add - IL_3e22: stloc.s V_4 - IL_3e24: ldloc.1 - IL_3e25: ldc.i4.1 - IL_3e26: add - IL_3e27: stloc.1 - IL_3e28: ldloc.1 - IL_3e29: ldc.i4.1 - IL_3e2a: sub - IL_3e2b: stloc.1 - IL_3e2c: br.s IL_3e65 - IL_3e2e: ldloc.2 - IL_3e2f: ldloc.3 - IL_3e30: ldloc.s V_4 - IL_3e32: add - IL_3e33: mul - IL_3e34: stloc.2 - IL_3e35: ldloc.s V_5 - IL_3e37: ldc.i4.1 - IL_3e38: add - IL_3e39: stloc.s V_5 - IL_3e3b: ldloc.3 - IL_3e3c: ldc.i4.m1 - IL_3e3d: add - IL_3e3e: stloc.3 - IL_3e3f: ldloc.s V_4 - IL_3e41: ldloc.s V_5 - IL_3e43: ldloc.1 - IL_3e44: ldc.i4.1 - IL_3e45: add - IL_3e46: mul - IL_3e47: mul - IL_3e48: stloc.s V_4 - IL_3e4a: ldloc.2 - IL_3e4b: ldc.i4.1 - IL_3e4c: add - IL_3e4d: stloc.2 - IL_3e4e: ldloc.1 - IL_3e4f: ldc.i4.2 - IL_3e50: sub - IL_3e51: stloc.1 - IL_3e52: ldloc.2 - IL_3e53: ldloc.3 - IL_3e54: ldc.i4.1 - IL_3e55: sub - IL_3e56: ldloc.s V_4 - IL_3e58: sub - IL_3e59: mul - IL_3e5a: stloc.2 - IL_3e5b: ldloc.s V_5 - IL_3e5d: ldc.i4.1 - IL_3e5e: add - IL_3e5f: stloc.s V_5 - IL_3e61: ldloc.2 - IL_3e62: ldc.i4.1 - IL_3e63: add - IL_3e64: stloc.2 - IL_3e65: ldloc.1 - IL_3e66: ldloc.2 - IL_3e67: ble.s IL_3ea3 - IL_3e69: ldloc.1 - IL_3e6a: ldloc.2 - IL_3e6b: ldloc.3 - IL_3e6c: sub - IL_3e6d: add - IL_3e6e: stloc.1 - IL_3e6f: ldloc.s V_4 - IL_3e71: ldc.i4.1 - IL_3e72: add - IL_3e73: stloc.s V_4 - IL_3e75: ldloc.s V_5 - IL_3e77: ldc.i4.1 - IL_3e78: sub - IL_3e79: stloc.s V_5 - IL_3e7b: ldloc.s V_5 - IL_3e7d: ldloc.s V_4 - IL_3e7f: ldloc.3 - IL_3e80: ldc.i4.1 - IL_3e81: sub - IL_3e82: mul - IL_3e83: sub - IL_3e84: stloc.s V_5 - IL_3e86: ldloc.2 - IL_3e87: ldc.i4.1 - IL_3e88: sub - IL_3e89: stloc.2 - IL_3e8a: ldloc.1 - IL_3e8b: ldloc.s V_5 - IL_3e8d: sub - IL_3e8e: stloc.1 - IL_3e8f: ldloc.s V_4 - IL_3e91: ldloc.3 - IL_3e92: ldc.i4.2 - IL_3e93: add - IL_3e94: ldloc.2 - IL_3e95: mul - IL_3e96: sub - IL_3e97: stloc.s V_4 - IL_3e99: ldloc.1 - IL_3e9a: ldc.i4.1 - IL_3e9b: add - IL_3e9c: stloc.1 - IL_3e9d: ldloc.1 - IL_3e9e: ldc.i4.1 - IL_3e9f: sub - IL_3ea0: stloc.1 - IL_3ea1: br.s IL_3eda - IL_3ea3: ldloc.2 - IL_3ea4: ldloc.3 - IL_3ea5: ldloc.s V_4 - IL_3ea7: sub - IL_3ea8: sub - IL_3ea9: stloc.2 - IL_3eaa: ldloc.s V_5 - IL_3eac: ldc.i4.1 - IL_3ead: add - IL_3eae: stloc.s V_5 - IL_3eb0: ldloc.3 - IL_3eb1: ldc.i4.m1 - IL_3eb2: add - IL_3eb3: stloc.3 - IL_3eb4: ldloc.s V_4 - IL_3eb6: ldloc.s V_5 - IL_3eb8: ldloc.1 - IL_3eb9: ldc.i4.1 - IL_3eba: add - IL_3ebb: mul - IL_3ebc: mul - IL_3ebd: stloc.s V_4 - IL_3ebf: ldloc.2 - IL_3ec0: ldc.i4.1 - IL_3ec1: add - IL_3ec2: stloc.2 - IL_3ec3: ldloc.1 - IL_3ec4: ldc.i4.2 - IL_3ec5: sub - IL_3ec6: stloc.1 - IL_3ec7: ldloc.2 - IL_3ec8: ldloc.3 - IL_3ec9: ldc.i4.1 - IL_3eca: sub - IL_3ecb: ldloc.s V_4 - IL_3ecd: sub - IL_3ece: sub - IL_3ecf: stloc.2 - IL_3ed0: ldloc.s V_5 - IL_3ed2: ldc.i4.1 - IL_3ed3: add - IL_3ed4: stloc.s V_5 - IL_3ed6: ldloc.2 - IL_3ed7: ldc.i4.1 - IL_3ed8: add - IL_3ed9: stloc.2 - IL_3eda: ldloc.1 - IL_3edb: ldloc.2 - IL_3edc: bge.s IL_3f18 - IL_3ede: ldloc.1 - IL_3edf: ldloc.2 - IL_3ee0: ldloc.3 - IL_3ee1: add - IL_3ee2: add - IL_3ee3: stloc.1 - IL_3ee4: ldloc.s V_4 - IL_3ee6: ldc.i4.1 - IL_3ee7: add - IL_3ee8: stloc.s V_4 - IL_3eea: ldloc.s V_5 - IL_3eec: ldc.i4.1 - IL_3eed: sub - IL_3eee: stloc.s V_5 - IL_3ef0: ldloc.s V_5 - IL_3ef2: ldloc.s V_4 - IL_3ef4: ldloc.3 - IL_3ef5: ldc.i4.1 - IL_3ef6: sub - IL_3ef7: mul - IL_3ef8: sub - IL_3ef9: stloc.s V_5 - IL_3efb: ldloc.2 - IL_3efc: ldc.i4.1 - IL_3efd: sub - IL_3efe: stloc.2 - IL_3eff: ldloc.1 - IL_3f00: ldloc.s V_5 - IL_3f02: sub - IL_3f03: stloc.1 - IL_3f04: ldloc.s V_4 - IL_3f06: ldloc.3 - IL_3f07: ldc.i4.2 - IL_3f08: add - IL_3f09: ldloc.2 - IL_3f0a: mul - IL_3f0b: sub - IL_3f0c: stloc.s V_4 - IL_3f0e: ldloc.1 - IL_3f0f: ldc.i4.1 - IL_3f10: add - IL_3f11: stloc.1 - IL_3f12: ldloc.1 - IL_3f13: ldc.i4.1 - IL_3f14: sub - IL_3f15: stloc.1 - IL_3f16: br.s IL_3f4f - IL_3f18: ldloc.2 - IL_3f19: ldloc.3 - IL_3f1a: ldloc.s V_4 - IL_3f1c: sub - IL_3f1d: sub - IL_3f1e: stloc.2 - IL_3f1f: ldloc.s V_5 - IL_3f21: ldc.i4.1 - IL_3f22: add - IL_3f23: stloc.s V_5 - IL_3f25: ldloc.3 - IL_3f26: ldc.i4.m1 - IL_3f27: add - IL_3f28: stloc.3 - IL_3f29: ldloc.s V_4 - IL_3f2b: ldloc.s V_5 - IL_3f2d: ldloc.1 - IL_3f2e: ldc.i4.1 - IL_3f2f: add - IL_3f30: sub - IL_3f31: mul - IL_3f32: stloc.s V_4 - IL_3f34: ldloc.2 - IL_3f35: ldc.i4.1 - IL_3f36: add - IL_3f37: stloc.2 - IL_3f38: ldloc.1 - IL_3f39: ldc.i4.2 - IL_3f3a: sub - IL_3f3b: stloc.1 - IL_3f3c: ldloc.2 - IL_3f3d: ldloc.3 - IL_3f3e: ldc.i4.1 - IL_3f3f: sub - IL_3f40: ldloc.s V_4 - IL_3f42: add - IL_3f43: sub - IL_3f44: stloc.2 - IL_3f45: ldloc.s V_5 - IL_3f47: ldc.i4.1 - IL_3f48: add - IL_3f49: stloc.s V_5 - IL_3f4b: ldloc.2 - IL_3f4c: ldc.i4.1 - IL_3f4d: add - IL_3f4e: stloc.2 - IL_3f4f: ldloc.1 - IL_3f50: ldloc.2 - IL_3f51: bne.un.s IL_3f8d - IL_3f53: ldloc.1 - IL_3f54: ldloc.2 - IL_3f55: ldloc.3 - IL_3f56: sub - IL_3f57: add - IL_3f58: stloc.1 - IL_3f59: ldloc.s V_4 - IL_3f5b: ldc.i4.1 - IL_3f5c: add - IL_3f5d: stloc.s V_4 - IL_3f5f: ldloc.s V_5 - IL_3f61: ldc.i4.1 - IL_3f62: sub - IL_3f63: stloc.s V_5 - IL_3f65: ldloc.s V_5 - IL_3f67: ldloc.s V_4 - IL_3f69: ldloc.3 - IL_3f6a: ldc.i4.1 - IL_3f6b: sub - IL_3f6c: add - IL_3f6d: mul - IL_3f6e: stloc.s V_5 - IL_3f70: ldloc.2 - IL_3f71: ldc.i4.1 - IL_3f72: sub - IL_3f73: stloc.2 - IL_3f74: ldloc.1 - IL_3f75: ldloc.s V_5 - IL_3f77: sub - IL_3f78: stloc.1 - IL_3f79: ldloc.s V_4 - IL_3f7b: ldloc.3 - IL_3f7c: ldc.i4.2 - IL_3f7d: add - IL_3f7e: ldloc.2 - IL_3f7f: add - IL_3f80: mul - IL_3f81: stloc.s V_4 - IL_3f83: ldloc.1 - IL_3f84: ldc.i4.1 - IL_3f85: add - IL_3f86: stloc.1 - IL_3f87: ldloc.1 - IL_3f88: ldc.i4.1 - IL_3f89: sub - IL_3f8a: stloc.1 - IL_3f8b: br.s IL_3fc4 - IL_3f8d: ldloc.2 - IL_3f8e: ldloc.3 - IL_3f8f: ldloc.s V_4 - IL_3f91: mul - IL_3f92: mul - IL_3f93: stloc.2 - IL_3f94: ldloc.s V_5 - IL_3f96: ldc.i4.1 - IL_3f97: add - IL_3f98: stloc.s V_5 - IL_3f9a: ldloc.3 - IL_3f9b: ldc.i4.m1 - IL_3f9c: add - IL_3f9d: stloc.3 - IL_3f9e: ldloc.s V_4 - IL_3fa0: ldloc.s V_5 - IL_3fa2: ldloc.1 - IL_3fa3: ldc.i4.1 - IL_3fa4: add - IL_3fa5: add - IL_3fa6: add - IL_3fa7: stloc.s V_4 - IL_3fa9: ldloc.2 - IL_3faa: ldc.i4.1 - IL_3fab: add - IL_3fac: stloc.2 - IL_3fad: ldloc.1 - IL_3fae: ldc.i4.2 - IL_3faf: sub - IL_3fb0: stloc.1 - IL_3fb1: ldloc.2 - IL_3fb2: ldloc.3 - IL_3fb3: ldc.i4.1 - IL_3fb4: sub - IL_3fb5: ldloc.s V_4 - IL_3fb7: sub - IL_3fb8: mul - IL_3fb9: stloc.2 - IL_3fba: ldloc.s V_5 - IL_3fbc: ldc.i4.1 - IL_3fbd: add - IL_3fbe: stloc.s V_5 - IL_3fc0: ldloc.2 - IL_3fc1: ldc.i4.1 - IL_3fc2: add - IL_3fc3: stloc.2 - IL_3fc4: ldloc.1 - IL_3fc5: ldloc.2 - IL_3fc6: bne.un.s IL_4002 - IL_3fc8: ldloc.1 - IL_3fc9: ldloc.2 - IL_3fca: ldloc.3 - IL_3fcb: mul - IL_3fcc: mul - IL_3fcd: stloc.1 - IL_3fce: ldloc.s V_4 - IL_3fd0: ldc.i4.1 - IL_3fd1: add - IL_3fd2: stloc.s V_4 - IL_3fd4: ldloc.s V_5 - IL_3fd6: ldc.i4.1 - IL_3fd7: sub - IL_3fd8: stloc.s V_5 - IL_3fda: ldloc.s V_5 - IL_3fdc: ldloc.s V_4 - IL_3fde: ldloc.3 - IL_3fdf: ldc.i4.1 - IL_3fe0: sub - IL_3fe1: mul - IL_3fe2: mul - IL_3fe3: stloc.s V_5 - IL_3fe5: ldloc.2 - IL_3fe6: ldc.i4.1 - IL_3fe7: sub - IL_3fe8: stloc.2 - IL_3fe9: ldloc.1 - IL_3fea: ldloc.s V_5 - IL_3fec: sub - IL_3fed: stloc.1 - IL_3fee: ldloc.s V_4 - IL_3ff0: ldloc.3 - IL_3ff1: ldc.i4.2 - IL_3ff2: add - IL_3ff3: ldloc.2 - IL_3ff4: mul - IL_3ff5: mul - IL_3ff6: stloc.s V_4 - IL_3ff8: ldloc.1 - IL_3ff9: ldc.i4.1 - IL_3ffa: add - IL_3ffb: stloc.1 - IL_3ffc: ldloc.1 - IL_3ffd: ldc.i4.1 - IL_3ffe: sub - IL_3fff: stloc.1 - IL_4000: br.s IL_4039 - IL_4002: ldloc.2 - IL_4003: ldloc.3 - IL_4004: ldloc.s V_4 - IL_4006: mul - IL_4007: mul - IL_4008: stloc.2 - IL_4009: ldloc.s V_5 - IL_400b: ldc.i4.1 - IL_400c: add - IL_400d: stloc.s V_5 - IL_400f: ldloc.3 - IL_4010: ldc.i4.m1 - IL_4011: add - IL_4012: stloc.3 - IL_4013: ldloc.s V_4 - IL_4015: ldloc.s V_5 - IL_4017: ldloc.1 - IL_4018: ldc.i4.1 - IL_4019: add - IL_401a: mul - IL_401b: mul - IL_401c: stloc.s V_4 - IL_401e: ldloc.2 - IL_401f: ldc.i4.1 - IL_4020: add - IL_4021: stloc.2 - IL_4022: ldloc.1 - IL_4023: ldc.i4.2 - IL_4024: sub - IL_4025: stloc.1 - IL_4026: ldloc.2 - IL_4027: ldloc.3 - IL_4028: ldc.i4.1 - IL_4029: sub - IL_402a: ldloc.s V_4 - IL_402c: add - IL_402d: mul - IL_402e: stloc.2 - IL_402f: ldloc.s V_5 - IL_4031: ldc.i4.1 - IL_4032: add - IL_4033: stloc.s V_5 - IL_4035: ldloc.2 - IL_4036: ldc.i4.1 - IL_4037: add - IL_4038: stloc.2 - IL_4039: ldloc.1 - IL_403a: ldloc.2 - IL_403b: bge.s IL_4077 - IL_403d: ldloc.1 - IL_403e: ldloc.2 - IL_403f: ldloc.3 - IL_4040: sub - IL_4041: mul - IL_4042: stloc.1 - IL_4043: ldloc.s V_4 - IL_4045: ldc.i4.1 - IL_4046: add - IL_4047: stloc.s V_4 - IL_4049: ldloc.s V_5 - IL_404b: ldc.i4.1 - IL_404c: sub - IL_404d: stloc.s V_5 - IL_404f: ldloc.s V_5 - IL_4051: ldloc.s V_4 - IL_4053: ldloc.3 - IL_4054: ldc.i4.1 - IL_4055: sub - IL_4056: sub - IL_4057: mul - IL_4058: stloc.s V_5 - IL_405a: ldloc.2 - IL_405b: ldc.i4.1 - IL_405c: sub - IL_405d: stloc.2 - IL_405e: ldloc.1 - IL_405f: ldloc.s V_5 - IL_4061: sub - IL_4062: stloc.1 - IL_4063: ldloc.s V_4 - IL_4065: ldloc.3 - IL_4066: ldc.i4.2 - IL_4067: add - IL_4068: ldloc.2 - IL_4069: sub - IL_406a: add - IL_406b: stloc.s V_4 - IL_406d: ldloc.1 - IL_406e: ldc.i4.1 - IL_406f: add - IL_4070: stloc.1 - IL_4071: ldloc.1 - IL_4072: ldc.i4.1 - IL_4073: sub - IL_4074: stloc.1 - IL_4075: br.s IL_40ae - IL_4077: ldloc.2 - IL_4078: ldloc.3 - IL_4079: ldloc.s V_4 - IL_407b: add - IL_407c: mul - IL_407d: stloc.2 - IL_407e: ldloc.s V_5 - IL_4080: ldc.i4.1 - IL_4081: add - IL_4082: stloc.s V_5 - IL_4084: ldloc.3 - IL_4085: ldc.i4.m1 - IL_4086: add - IL_4087: stloc.3 - IL_4088: ldloc.s V_4 - IL_408a: ldloc.s V_5 - IL_408c: ldloc.1 - IL_408d: ldc.i4.1 - IL_408e: add - IL_408f: mul - IL_4090: sub - IL_4091: stloc.s V_4 - IL_4093: ldloc.2 - IL_4094: ldc.i4.1 - IL_4095: add - IL_4096: stloc.2 - IL_4097: ldloc.1 - IL_4098: ldc.i4.2 - IL_4099: sub - IL_409a: stloc.1 - IL_409b: ldloc.2 - IL_409c: ldloc.3 - IL_409d: ldc.i4.1 - IL_409e: sub - IL_409f: ldloc.s V_4 - IL_40a1: sub - IL_40a2: mul - IL_40a3: stloc.2 - IL_40a4: ldloc.s V_5 - IL_40a6: ldc.i4.1 - IL_40a7: add - IL_40a8: stloc.s V_5 - IL_40aa: ldloc.2 - IL_40ab: ldc.i4.1 - IL_40ac: add - IL_40ad: stloc.2 - IL_40ae: ldloc.1 - IL_40af: ldloc.2 - IL_40b0: blt.s IL_40ec - IL_40b2: ldloc.1 - IL_40b3: ldloc.2 - IL_40b4: ldloc.3 - IL_40b5: mul - IL_40b6: sub - IL_40b7: stloc.1 - IL_40b8: ldloc.s V_4 - IL_40ba: ldc.i4.1 - IL_40bb: add - IL_40bc: stloc.s V_4 - IL_40be: ldloc.s V_5 - IL_40c0: ldc.i4.1 - IL_40c1: sub - IL_40c2: stloc.s V_5 - IL_40c4: ldloc.s V_5 - IL_40c6: ldloc.s V_4 - IL_40c8: ldloc.3 - IL_40c9: ldc.i4.1 - IL_40ca: sub - IL_40cb: sub - IL_40cc: sub - IL_40cd: stloc.s V_5 - IL_40cf: ldloc.2 - IL_40d0: ldc.i4.1 - IL_40d1: sub - IL_40d2: stloc.2 - IL_40d3: ldloc.1 - IL_40d4: ldloc.s V_5 - IL_40d6: sub - IL_40d7: stloc.1 - IL_40d8: ldloc.s V_4 - IL_40da: ldloc.3 - IL_40db: ldc.i4.2 - IL_40dc: add - IL_40dd: ldloc.2 - IL_40de: sub - IL_40df: add - IL_40e0: stloc.s V_4 - IL_40e2: ldloc.1 - IL_40e3: ldc.i4.1 - IL_40e4: add - IL_40e5: stloc.1 - IL_40e6: ldloc.1 - IL_40e7: ldc.i4.1 - IL_40e8: sub - IL_40e9: stloc.1 - IL_40ea: br.s IL_4123 - IL_40ec: ldloc.2 - IL_40ed: ldloc.3 - IL_40ee: ldloc.s V_4 - IL_40f0: add - IL_40f1: sub - IL_40f2: stloc.2 - IL_40f3: ldloc.s V_5 - IL_40f5: ldc.i4.1 - IL_40f6: add - IL_40f7: stloc.s V_5 - IL_40f9: ldloc.3 - IL_40fa: ldc.i4.m1 - IL_40fb: add - IL_40fc: stloc.3 - IL_40fd: ldloc.s V_4 - IL_40ff: ldloc.s V_5 - IL_4101: ldloc.1 - IL_4102: ldc.i4.1 - IL_4103: add - IL_4104: mul - IL_4105: sub - IL_4106: stloc.s V_4 - IL_4108: ldloc.2 - IL_4109: ldc.i4.1 - IL_410a: add - IL_410b: stloc.2 - IL_410c: ldloc.1 - IL_410d: ldc.i4.2 - IL_410e: sub - IL_410f: stloc.1 - IL_4110: ldloc.2 - IL_4111: ldloc.3 - IL_4112: ldc.i4.1 - IL_4113: sub - IL_4114: ldloc.s V_4 - IL_4116: sub - IL_4117: sub - IL_4118: stloc.2 - IL_4119: ldloc.s V_5 - IL_411b: ldc.i4.1 - IL_411c: add - IL_411d: stloc.s V_5 - IL_411f: ldloc.2 - IL_4120: ldc.i4.1 - IL_4121: add - IL_4122: stloc.2 - IL_4123: ldloc.1 - IL_4124: ldloc.2 - IL_4125: bgt.s IL_4161 - IL_4127: ldloc.1 - IL_4128: ldloc.2 - IL_4129: ldloc.3 - IL_412a: mul - IL_412b: mul - IL_412c: stloc.1 - IL_412d: ldloc.s V_4 - IL_412f: ldc.i4.1 - IL_4130: add - IL_4131: stloc.s V_4 - IL_4133: ldloc.s V_5 - IL_4135: ldc.i4.1 - IL_4136: sub - IL_4137: stloc.s V_5 - IL_4139: ldloc.s V_5 - IL_413b: ldloc.s V_4 - IL_413d: ldloc.3 - IL_413e: ldc.i4.1 - IL_413f: sub - IL_4140: add - IL_4141: add - IL_4142: stloc.s V_5 - IL_4144: ldloc.2 - IL_4145: ldc.i4.1 - IL_4146: sub - IL_4147: stloc.2 - IL_4148: ldloc.1 - IL_4149: ldloc.s V_5 - IL_414b: sub - IL_414c: stloc.1 - IL_414d: ldloc.s V_4 - IL_414f: ldloc.3 - IL_4150: ldc.i4.2 - IL_4151: add - IL_4152: ldloc.2 - IL_4153: add - IL_4154: sub - IL_4155: stloc.s V_4 - IL_4157: ldloc.1 - IL_4158: ldc.i4.1 - IL_4159: add - IL_415a: stloc.1 - IL_415b: ldloc.1 - IL_415c: ldc.i4.1 - IL_415d: sub - IL_415e: stloc.1 - IL_415f: br.s IL_4198 - IL_4161: ldloc.2 - IL_4162: ldloc.3 - IL_4163: ldloc.s V_4 - IL_4165: sub - IL_4166: add - IL_4167: stloc.2 - IL_4168: ldloc.s V_5 - IL_416a: ldc.i4.1 - IL_416b: add - IL_416c: stloc.s V_5 - IL_416e: ldloc.3 - IL_416f: ldc.i4.m1 - IL_4170: add - IL_4171: stloc.3 - IL_4172: ldloc.s V_4 - IL_4174: ldloc.s V_5 - IL_4176: ldloc.1 - IL_4177: ldc.i4.1 - IL_4178: add - IL_4179: add - IL_417a: add - IL_417b: stloc.s V_4 - IL_417d: ldloc.2 - IL_417e: ldc.i4.1 - IL_417f: add - IL_4180: stloc.2 - IL_4181: ldloc.1 - IL_4182: ldc.i4.2 - IL_4183: sub - IL_4184: stloc.1 - IL_4185: ldloc.2 - IL_4186: ldloc.3 - IL_4187: ldc.i4.1 - IL_4188: sub - IL_4189: ldloc.s V_4 - IL_418b: sub - IL_418c: add - IL_418d: stloc.2 - IL_418e: ldloc.s V_5 - IL_4190: ldc.i4.1 - IL_4191: add - IL_4192: stloc.s V_5 - IL_4194: ldloc.2 - IL_4195: ldc.i4.1 - IL_4196: add - IL_4197: stloc.2 - IL_4198: ldloc.1 - IL_4199: ldloc.2 - IL_419a: bne.un.s IL_41d6 - IL_419c: ldloc.1 - IL_419d: ldloc.2 - IL_419e: ldloc.3 - IL_419f: mul - IL_41a0: mul - IL_41a1: stloc.1 - IL_41a2: ldloc.s V_4 - IL_41a4: ldc.i4.1 - IL_41a5: add - IL_41a6: stloc.s V_4 - IL_41a8: ldloc.s V_5 - IL_41aa: ldc.i4.1 - IL_41ab: sub - IL_41ac: stloc.s V_5 - IL_41ae: ldloc.s V_5 - IL_41b0: ldloc.s V_4 - IL_41b2: ldloc.3 - IL_41b3: ldc.i4.1 - IL_41b4: sub - IL_41b5: mul - IL_41b6: mul - IL_41b7: stloc.s V_5 - IL_41b9: ldloc.2 - IL_41ba: ldc.i4.1 - IL_41bb: sub - IL_41bc: stloc.2 - IL_41bd: ldloc.1 - IL_41be: ldloc.s V_5 - IL_41c0: sub - IL_41c1: stloc.1 - IL_41c2: ldloc.s V_4 - IL_41c4: ldloc.3 - IL_41c5: ldc.i4.2 - IL_41c6: add - IL_41c7: ldloc.2 - IL_41c8: mul - IL_41c9: add - IL_41ca: stloc.s V_4 - IL_41cc: ldloc.1 - IL_41cd: ldc.i4.1 - IL_41ce: add - IL_41cf: stloc.1 - IL_41d0: ldloc.1 - IL_41d1: ldc.i4.1 - IL_41d2: sub - IL_41d3: stloc.1 - IL_41d4: br.s IL_420d - IL_41d6: ldloc.2 - IL_41d7: ldloc.3 - IL_41d8: ldloc.s V_4 - IL_41da: add - IL_41db: mul - IL_41dc: stloc.2 - IL_41dd: ldloc.s V_5 - IL_41df: ldc.i4.1 - IL_41e0: add - IL_41e1: stloc.s V_5 - IL_41e3: ldloc.3 - IL_41e4: ldc.i4.m1 - IL_41e5: add - IL_41e6: stloc.3 - IL_41e7: ldloc.s V_4 - IL_41e9: ldloc.s V_5 - IL_41eb: ldloc.1 - IL_41ec: ldc.i4.1 - IL_41ed: add - IL_41ee: sub - IL_41ef: mul - IL_41f0: stloc.s V_4 - IL_41f2: ldloc.2 - IL_41f3: ldc.i4.1 - IL_41f4: add - IL_41f5: stloc.2 - IL_41f6: ldloc.1 - IL_41f7: ldc.i4.2 - IL_41f8: sub - IL_41f9: stloc.1 - IL_41fa: ldloc.2 - IL_41fb: ldloc.3 - IL_41fc: ldc.i4.1 - IL_41fd: sub - IL_41fe: ldloc.s V_4 - IL_4200: sub - IL_4201: mul - IL_4202: stloc.2 - IL_4203: ldloc.s V_5 - IL_4205: ldc.i4.1 - IL_4206: add - IL_4207: stloc.s V_5 - IL_4209: ldloc.2 - IL_420a: ldc.i4.1 - IL_420b: add - IL_420c: stloc.2 - IL_420d: ldloc.1 - IL_420e: ldloc.2 - IL_420f: bgt.s IL_424b - IL_4211: ldloc.1 - IL_4212: ldloc.2 - IL_4213: ldloc.3 - IL_4214: add - IL_4215: add - IL_4216: stloc.1 - IL_4217: ldloc.s V_4 - IL_4219: ldc.i4.1 - IL_421a: add - IL_421b: stloc.s V_4 - IL_421d: ldloc.s V_5 - IL_421f: ldc.i4.1 - IL_4220: sub - IL_4221: stloc.s V_5 - IL_4223: ldloc.s V_5 - IL_4225: ldloc.s V_4 - IL_4227: ldloc.3 - IL_4228: ldc.i4.1 - IL_4229: sub - IL_422a: mul - IL_422b: mul - IL_422c: stloc.s V_5 - IL_422e: ldloc.2 - IL_422f: ldc.i4.1 - IL_4230: sub - IL_4231: stloc.2 - IL_4232: ldloc.1 - IL_4233: ldloc.s V_5 - IL_4235: sub - IL_4236: stloc.1 - IL_4237: ldloc.s V_4 - IL_4239: ldloc.3 - IL_423a: ldc.i4.2 - IL_423b: add - IL_423c: ldloc.2 - IL_423d: mul - IL_423e: add - IL_423f: stloc.s V_4 - IL_4241: ldloc.1 - IL_4242: ldc.i4.1 - IL_4243: add - IL_4244: stloc.1 - IL_4245: ldloc.1 - IL_4246: ldc.i4.1 - IL_4247: sub - IL_4248: stloc.1 - IL_4249: br.s IL_4282 - IL_424b: ldloc.2 - IL_424c: ldloc.3 - IL_424d: ldloc.s V_4 - IL_424f: add - IL_4250: mul - IL_4251: stloc.2 - IL_4252: ldloc.s V_5 - IL_4254: ldc.i4.1 - IL_4255: add - IL_4256: stloc.s V_5 - IL_4258: ldloc.3 - IL_4259: ldc.i4.m1 - IL_425a: add - IL_425b: stloc.3 - IL_425c: ldloc.s V_4 - IL_425e: ldloc.s V_5 - IL_4260: ldloc.1 - IL_4261: ldc.i4.1 - IL_4262: add - IL_4263: sub - IL_4264: mul - IL_4265: stloc.s V_4 - IL_4267: ldloc.2 - IL_4268: ldc.i4.1 - IL_4269: add - IL_426a: stloc.2 - IL_426b: ldloc.1 - IL_426c: ldc.i4.2 - IL_426d: sub - IL_426e: stloc.1 - IL_426f: ldloc.2 - IL_4270: ldloc.3 - IL_4271: ldc.i4.1 - IL_4272: sub - IL_4273: ldloc.s V_4 - IL_4275: sub - IL_4276: mul - IL_4277: stloc.2 - IL_4278: ldloc.s V_5 - IL_427a: ldc.i4.1 - IL_427b: add - IL_427c: stloc.s V_5 - IL_427e: ldloc.2 - IL_427f: ldc.i4.1 - IL_4280: add - IL_4281: stloc.2 - IL_4282: ldloc.1 - IL_4283: ldloc.2 - IL_4284: bge.s IL_42c0 - IL_4286: ldloc.1 - IL_4287: ldloc.2 - IL_4288: ldloc.3 - IL_4289: mul - IL_428a: sub - IL_428b: stloc.1 - IL_428c: ldloc.s V_4 - IL_428e: ldc.i4.1 - IL_428f: add - IL_4290: stloc.s V_4 - IL_4292: ldloc.s V_5 - IL_4294: ldc.i4.1 - IL_4295: sub - IL_4296: stloc.s V_5 - IL_4298: ldloc.s V_5 - IL_429a: ldloc.s V_4 - IL_429c: ldloc.3 - IL_429d: ldc.i4.1 - IL_429e: sub - IL_429f: add - IL_42a0: add - IL_42a1: stloc.s V_5 - IL_42a3: ldloc.2 - IL_42a4: ldc.i4.1 - IL_42a5: sub - IL_42a6: stloc.2 - IL_42a7: ldloc.1 - IL_42a8: ldloc.s V_5 - IL_42aa: sub - IL_42ab: stloc.1 - IL_42ac: ldloc.s V_4 - IL_42ae: ldloc.3 - IL_42af: ldc.i4.2 - IL_42b0: add - IL_42b1: ldloc.2 - IL_42b2: add - IL_42b3: sub - IL_42b4: stloc.s V_4 - IL_42b6: ldloc.1 - IL_42b7: ldc.i4.1 - IL_42b8: add - IL_42b9: stloc.1 - IL_42ba: ldloc.1 - IL_42bb: ldc.i4.1 - IL_42bc: sub - IL_42bd: stloc.1 - IL_42be: br.s IL_42f7 - IL_42c0: ldloc.2 - IL_42c1: ldloc.3 - IL_42c2: ldloc.s V_4 - IL_42c4: sub - IL_42c5: add - IL_42c6: stloc.2 - IL_42c7: ldloc.s V_5 - IL_42c9: ldc.i4.1 - IL_42ca: add - IL_42cb: stloc.s V_5 - IL_42cd: ldloc.3 - IL_42ce: ldc.i4.m1 - IL_42cf: add - IL_42d0: stloc.3 - IL_42d1: ldloc.s V_4 - IL_42d3: ldloc.s V_5 - IL_42d5: ldloc.1 - IL_42d6: ldc.i4.1 - IL_42d7: add - IL_42d8: add - IL_42d9: add - IL_42da: stloc.s V_4 - IL_42dc: ldloc.2 - IL_42dd: ldc.i4.1 - IL_42de: add - IL_42df: stloc.2 - IL_42e0: ldloc.1 - IL_42e1: ldc.i4.2 - IL_42e2: sub - IL_42e3: stloc.1 - IL_42e4: ldloc.2 - IL_42e5: ldloc.3 - IL_42e6: ldc.i4.1 - IL_42e7: sub - IL_42e8: ldloc.s V_4 - IL_42ea: sub - IL_42eb: add - IL_42ec: stloc.2 - IL_42ed: ldloc.s V_5 - IL_42ef: ldc.i4.1 - IL_42f0: add - IL_42f1: stloc.s V_5 - IL_42f3: ldloc.2 - IL_42f4: ldc.i4.1 - IL_42f5: add - IL_42f6: stloc.2 - IL_42f7: ldloc.1 - IL_42f8: ldloc.2 - IL_42f9: beq.s IL_4335 - IL_42fb: ldloc.1 - IL_42fc: ldloc.2 - IL_42fd: ldloc.3 - IL_42fe: add - IL_42ff: sub - IL_4300: stloc.1 - IL_4301: ldloc.s V_4 - IL_4303: ldc.i4.1 - IL_4304: add - IL_4305: stloc.s V_4 - IL_4307: ldloc.s V_5 - IL_4309: ldc.i4.1 - IL_430a: sub - IL_430b: stloc.s V_5 - IL_430d: ldloc.s V_5 - IL_430f: ldloc.s V_4 - IL_4311: ldloc.3 - IL_4312: ldc.i4.1 - IL_4313: sub - IL_4314: sub - IL_4315: add - IL_4316: stloc.s V_5 - IL_4318: ldloc.2 - IL_4319: ldc.i4.1 - IL_431a: sub - IL_431b: stloc.2 - IL_431c: ldloc.1 - IL_431d: ldloc.s V_5 - IL_431f: sub - IL_4320: stloc.1 - IL_4321: ldloc.s V_4 - IL_4323: ldloc.3 - IL_4324: ldc.i4.2 - IL_4325: add - IL_4326: ldloc.2 - IL_4327: sub - IL_4328: mul - IL_4329: stloc.s V_4 - IL_432b: ldloc.1 - IL_432c: ldc.i4.1 - IL_432d: add - IL_432e: stloc.1 - IL_432f: ldloc.1 - IL_4330: ldc.i4.1 - IL_4331: sub - IL_4332: stloc.1 - IL_4333: br.s IL_436c - IL_4335: ldloc.2 - IL_4336: ldloc.3 - IL_4337: ldloc.s V_4 - IL_4339: mul - IL_433a: add - IL_433b: stloc.2 - IL_433c: ldloc.s V_5 - IL_433e: ldc.i4.1 - IL_433f: add - IL_4340: stloc.s V_5 - IL_4342: ldloc.3 - IL_4343: ldc.i4.m1 - IL_4344: add - IL_4345: stloc.3 - IL_4346: ldloc.s V_4 - IL_4348: ldloc.s V_5 - IL_434a: ldloc.1 - IL_434b: ldc.i4.1 - IL_434c: add - IL_434d: add - IL_434e: sub - IL_434f: stloc.s V_4 - IL_4351: ldloc.2 - IL_4352: ldc.i4.1 - IL_4353: add - IL_4354: stloc.2 - IL_4355: ldloc.1 - IL_4356: ldc.i4.2 - IL_4357: sub - IL_4358: stloc.1 - IL_4359: ldloc.2 - IL_435a: ldloc.3 - IL_435b: ldc.i4.1 - IL_435c: sub - IL_435d: ldloc.s V_4 - IL_435f: mul - IL_4360: add - IL_4361: stloc.2 - IL_4362: ldloc.s V_5 - IL_4364: ldc.i4.1 - IL_4365: add - IL_4366: stloc.s V_5 - IL_4368: ldloc.2 - IL_4369: ldc.i4.1 - IL_436a: add - IL_436b: stloc.2 - IL_436c: ldloc.1 - IL_436d: ldloc.2 - IL_436e: bne.un.s IL_43aa - IL_4370: ldloc.1 - IL_4371: ldloc.2 - IL_4372: ldloc.3 - IL_4373: sub - IL_4374: sub - IL_4375: stloc.1 - IL_4376: ldloc.s V_4 - IL_4378: ldc.i4.1 - IL_4379: add - IL_437a: stloc.s V_4 - IL_437c: ldloc.s V_5 - IL_437e: ldc.i4.1 - IL_437f: sub - IL_4380: stloc.s V_5 - IL_4382: ldloc.s V_5 - IL_4384: ldloc.s V_4 - IL_4386: ldloc.3 - IL_4387: ldc.i4.1 - IL_4388: sub - IL_4389: sub - IL_438a: sub - IL_438b: stloc.s V_5 - IL_438d: ldloc.2 - IL_438e: ldc.i4.1 - IL_438f: sub - IL_4390: stloc.2 - IL_4391: ldloc.1 - IL_4392: ldloc.s V_5 - IL_4394: sub - IL_4395: stloc.1 - IL_4396: ldloc.s V_4 - IL_4398: ldloc.3 - IL_4399: ldc.i4.2 - IL_439a: add - IL_439b: ldloc.2 - IL_439c: sub - IL_439d: add - IL_439e: stloc.s V_4 - IL_43a0: ldloc.1 - IL_43a1: ldc.i4.1 - IL_43a2: add - IL_43a3: stloc.1 - IL_43a4: ldloc.1 - IL_43a5: ldc.i4.1 - IL_43a6: sub - IL_43a7: stloc.1 - IL_43a8: br.s IL_43e1 - IL_43aa: ldloc.2 - IL_43ab: ldloc.3 - IL_43ac: ldloc.s V_4 - IL_43ae: add - IL_43af: sub - IL_43b0: stloc.2 - IL_43b1: ldloc.s V_5 - IL_43b3: ldc.i4.1 - IL_43b4: add - IL_43b5: stloc.s V_5 - IL_43b7: ldloc.3 - IL_43b8: ldc.i4.m1 - IL_43b9: add - IL_43ba: stloc.3 - IL_43bb: ldloc.s V_4 - IL_43bd: ldloc.s V_5 - IL_43bf: ldloc.1 - IL_43c0: ldc.i4.1 - IL_43c1: add - IL_43c2: mul - IL_43c3: sub - IL_43c4: stloc.s V_4 - IL_43c6: ldloc.2 - IL_43c7: ldc.i4.1 - IL_43c8: add - IL_43c9: stloc.2 - IL_43ca: ldloc.1 - IL_43cb: ldc.i4.2 - IL_43cc: sub - IL_43cd: stloc.1 - IL_43ce: ldloc.2 - IL_43cf: ldloc.3 - IL_43d0: ldc.i4.1 - IL_43d1: sub - IL_43d2: ldloc.s V_4 - IL_43d4: sub - IL_43d5: sub - IL_43d6: stloc.2 - IL_43d7: ldloc.s V_5 - IL_43d9: ldc.i4.1 - IL_43da: add - IL_43db: stloc.s V_5 - IL_43dd: ldloc.2 - IL_43de: ldc.i4.1 - IL_43df: add - IL_43e0: stloc.2 - IL_43e1: ldloc.1 - IL_43e2: ldloc.2 - IL_43e3: beq.s IL_441f - IL_43e5: ldloc.1 - IL_43e6: ldloc.2 - IL_43e7: ldloc.3 - IL_43e8: sub - IL_43e9: mul - IL_43ea: stloc.1 - IL_43eb: ldloc.s V_4 - IL_43ed: ldc.i4.1 - IL_43ee: add - IL_43ef: stloc.s V_4 - IL_43f1: ldloc.s V_5 - IL_43f3: ldc.i4.1 - IL_43f4: sub - IL_43f5: stloc.s V_5 - IL_43f7: ldloc.s V_5 - IL_43f9: ldloc.s V_4 - IL_43fb: ldloc.3 - IL_43fc: ldc.i4.1 - IL_43fd: sub - IL_43fe: add - IL_43ff: add - IL_4400: stloc.s V_5 - IL_4402: ldloc.2 - IL_4403: ldc.i4.1 - IL_4404: sub - IL_4405: stloc.2 - IL_4406: ldloc.1 - IL_4407: ldloc.s V_5 - IL_4409: sub - IL_440a: stloc.1 - IL_440b: ldloc.s V_4 - IL_440d: ldloc.3 - IL_440e: ldc.i4.2 - IL_440f: add - IL_4410: ldloc.2 - IL_4411: add - IL_4412: mul - IL_4413: stloc.s V_4 - IL_4415: ldloc.1 - IL_4416: ldc.i4.1 - IL_4417: add - IL_4418: stloc.1 - IL_4419: ldloc.1 - IL_441a: ldc.i4.1 - IL_441b: sub - IL_441c: stloc.1 - IL_441d: br.s IL_4456 - IL_441f: ldloc.2 - IL_4420: ldloc.3 - IL_4421: ldloc.s V_4 - IL_4423: mul - IL_4424: add - IL_4425: stloc.2 - IL_4426: ldloc.s V_5 - IL_4428: ldc.i4.1 - IL_4429: add - IL_442a: stloc.s V_5 - IL_442c: ldloc.3 - IL_442d: ldc.i4.m1 - IL_442e: add - IL_442f: stloc.3 - IL_4430: ldloc.s V_4 - IL_4432: ldloc.s V_5 - IL_4434: ldloc.1 - IL_4435: ldc.i4.1 - IL_4436: add - IL_4437: sub - IL_4438: add - IL_4439: stloc.s V_4 - IL_443b: ldloc.2 - IL_443c: ldc.i4.1 - IL_443d: add - IL_443e: stloc.2 - IL_443f: ldloc.1 - IL_4440: ldc.i4.2 - IL_4441: sub - IL_4442: stloc.1 - IL_4443: ldloc.2 - IL_4444: ldloc.3 - IL_4445: ldc.i4.1 - IL_4446: sub - IL_4447: ldloc.s V_4 - IL_4449: sub - IL_444a: add - IL_444b: stloc.2 - IL_444c: ldloc.s V_5 - IL_444e: ldc.i4.1 - IL_444f: add - IL_4450: stloc.s V_5 - IL_4452: ldloc.2 - IL_4453: ldc.i4.1 - IL_4454: add - IL_4455: stloc.2 - IL_4456: ldloc.1 - IL_4457: ldloc.2 - IL_4458: blt.s IL_4494 - IL_445a: ldloc.1 - IL_445b: ldloc.2 - IL_445c: ldloc.3 - IL_445d: sub - IL_445e: mul - IL_445f: stloc.1 - IL_4460: ldloc.s V_4 - IL_4462: ldc.i4.1 - IL_4463: add - IL_4464: stloc.s V_4 - IL_4466: ldloc.s V_5 - IL_4468: ldc.i4.1 - IL_4469: sub - IL_446a: stloc.s V_5 - IL_446c: ldloc.s V_5 - IL_446e: ldloc.s V_4 - IL_4470: ldloc.3 - IL_4471: ldc.i4.1 - IL_4472: sub - IL_4473: sub - IL_4474: sub - IL_4475: stloc.s V_5 - IL_4477: ldloc.2 - IL_4478: ldc.i4.1 - IL_4479: sub - IL_447a: stloc.2 - IL_447b: ldloc.1 - IL_447c: ldloc.s V_5 - IL_447e: sub - IL_447f: stloc.1 - IL_4480: ldloc.s V_4 - IL_4482: ldloc.3 - IL_4483: ldc.i4.2 - IL_4484: add - IL_4485: ldloc.2 - IL_4486: sub - IL_4487: sub - IL_4488: stloc.s V_4 - IL_448a: ldloc.1 - IL_448b: ldc.i4.1 - IL_448c: add - IL_448d: stloc.1 - IL_448e: ldloc.1 - IL_448f: ldc.i4.1 - IL_4490: sub - IL_4491: stloc.1 - IL_4492: br.s IL_44cb - IL_4494: ldloc.2 - IL_4495: ldloc.3 - IL_4496: ldloc.s V_4 - IL_4498: sub - IL_4499: sub - IL_449a: stloc.2 - IL_449b: ldloc.s V_5 - IL_449d: ldc.i4.1 - IL_449e: add - IL_449f: stloc.s V_5 - IL_44a1: ldloc.3 - IL_44a2: ldc.i4.m1 - IL_44a3: add - IL_44a4: stloc.3 - IL_44a5: ldloc.s V_4 - IL_44a7: ldloc.s V_5 - IL_44a9: ldloc.1 - IL_44aa: ldc.i4.1 - IL_44ab: add - IL_44ac: add - IL_44ad: sub - IL_44ae: stloc.s V_4 - IL_44b0: ldloc.2 - IL_44b1: ldc.i4.1 - IL_44b2: add - IL_44b3: stloc.2 - IL_44b4: ldloc.1 - IL_44b5: ldc.i4.2 - IL_44b6: sub - IL_44b7: stloc.1 - IL_44b8: ldloc.2 - IL_44b9: ldloc.3 - IL_44ba: ldc.i4.1 - IL_44bb: sub - IL_44bc: ldloc.s V_4 - IL_44be: add - IL_44bf: sub - IL_44c0: stloc.2 - IL_44c1: ldloc.s V_5 - IL_44c3: ldc.i4.1 - IL_44c4: add - IL_44c5: stloc.s V_5 - IL_44c7: ldloc.2 - IL_44c8: ldc.i4.1 - IL_44c9: add - IL_44ca: stloc.2 - IL_44cb: ldloc.1 - IL_44cc: ldloc.2 - IL_44cd: bne.un.s IL_4509 - IL_44cf: ldloc.1 - IL_44d0: ldloc.2 - IL_44d1: ldloc.3 - IL_44d2: sub - IL_44d3: add - IL_44d4: stloc.1 - IL_44d5: ldloc.s V_4 - IL_44d7: ldc.i4.1 - IL_44d8: add - IL_44d9: stloc.s V_4 - IL_44db: ldloc.s V_5 - IL_44dd: ldc.i4.1 - IL_44de: sub - IL_44df: stloc.s V_5 - IL_44e1: ldloc.s V_5 - IL_44e3: ldloc.s V_4 - IL_44e5: ldloc.3 - IL_44e6: ldc.i4.1 - IL_44e7: sub - IL_44e8: mul - IL_44e9: mul - IL_44ea: stloc.s V_5 - IL_44ec: ldloc.2 - IL_44ed: ldc.i4.1 - IL_44ee: sub - IL_44ef: stloc.2 - IL_44f0: ldloc.1 - IL_44f1: ldloc.s V_5 - IL_44f3: sub - IL_44f4: stloc.1 - IL_44f5: ldloc.s V_4 - IL_44f7: ldloc.3 - IL_44f8: ldc.i4.2 - IL_44f9: add - IL_44fa: ldloc.2 - IL_44fb: mul - IL_44fc: sub - IL_44fd: stloc.s V_4 - IL_44ff: ldloc.1 - IL_4500: ldc.i4.1 - IL_4501: add - IL_4502: stloc.1 - IL_4503: ldloc.1 - IL_4504: ldc.i4.1 - IL_4505: sub - IL_4506: stloc.1 - IL_4507: br.s IL_4540 - IL_4509: ldloc.2 - IL_450a: ldloc.3 - IL_450b: ldloc.s V_4 - IL_450d: sub - IL_450e: mul - IL_450f: stloc.2 - IL_4510: ldloc.s V_5 - IL_4512: ldc.i4.1 - IL_4513: add - IL_4514: stloc.s V_5 - IL_4516: ldloc.3 - IL_4517: ldc.i4.m1 - IL_4518: add - IL_4519: stloc.3 - IL_451a: ldloc.s V_4 - IL_451c: ldloc.s V_5 - IL_451e: ldloc.1 - IL_451f: ldc.i4.1 - IL_4520: add - IL_4521: mul - IL_4522: mul - IL_4523: stloc.s V_4 - IL_4525: ldloc.2 - IL_4526: ldc.i4.1 - IL_4527: add - IL_4528: stloc.2 - IL_4529: ldloc.1 - IL_452a: ldc.i4.2 - IL_452b: sub - IL_452c: stloc.1 - IL_452d: ldloc.2 - IL_452e: ldloc.3 - IL_452f: ldc.i4.1 - IL_4530: sub - IL_4531: ldloc.s V_4 - IL_4533: sub - IL_4534: mul - IL_4535: stloc.2 - IL_4536: ldloc.s V_5 - IL_4538: ldc.i4.1 - IL_4539: add - IL_453a: stloc.s V_5 - IL_453c: ldloc.2 - IL_453d: ldc.i4.1 - IL_453e: add - IL_453f: stloc.2 - IL_4540: ldloc.1 - IL_4541: ldloc.2 - IL_4542: beq.s IL_457e - IL_4544: ldloc.1 - IL_4545: ldloc.2 - IL_4546: ldloc.3 - IL_4547: sub - IL_4548: add - IL_4549: stloc.1 - IL_454a: ldloc.s V_4 - IL_454c: ldc.i4.1 - IL_454d: add - IL_454e: stloc.s V_4 - IL_4550: ldloc.s V_5 - IL_4552: ldc.i4.1 - IL_4553: sub - IL_4554: stloc.s V_5 - IL_4556: ldloc.s V_5 - IL_4558: ldloc.s V_4 - IL_455a: ldloc.3 - IL_455b: ldc.i4.1 - IL_455c: sub - IL_455d: sub - IL_455e: sub - IL_455f: stloc.s V_5 - IL_4561: ldloc.2 - IL_4562: ldc.i4.1 - IL_4563: sub - IL_4564: stloc.2 - IL_4565: ldloc.1 - IL_4566: ldloc.s V_5 - IL_4568: sub - IL_4569: stloc.1 - IL_456a: ldloc.s V_4 - IL_456c: ldloc.3 - IL_456d: ldc.i4.2 - IL_456e: add - IL_456f: ldloc.2 - IL_4570: sub - IL_4571: mul - IL_4572: stloc.s V_4 - IL_4574: ldloc.1 - IL_4575: ldc.i4.1 - IL_4576: add - IL_4577: stloc.1 - IL_4578: ldloc.1 - IL_4579: ldc.i4.1 - IL_457a: sub - IL_457b: stloc.1 - IL_457c: br.s IL_45b5 - IL_457e: ldloc.2 - IL_457f: ldloc.3 - IL_4580: ldloc.s V_4 - IL_4582: mul - IL_4583: sub - IL_4584: stloc.2 - IL_4585: ldloc.s V_5 - IL_4587: ldc.i4.1 - IL_4588: add - IL_4589: stloc.s V_5 - IL_458b: ldloc.3 - IL_458c: ldc.i4.m1 - IL_458d: add - IL_458e: stloc.3 - IL_458f: ldloc.s V_4 - IL_4591: ldloc.s V_5 - IL_4593: ldloc.1 - IL_4594: ldc.i4.1 - IL_4595: add - IL_4596: mul - IL_4597: sub - IL_4598: stloc.s V_4 - IL_459a: ldloc.2 - IL_459b: ldc.i4.1 - IL_459c: add - IL_459d: stloc.2 - IL_459e: ldloc.1 - IL_459f: ldc.i4.2 - IL_45a0: sub - IL_45a1: stloc.1 - IL_45a2: ldloc.2 - IL_45a3: ldloc.3 - IL_45a4: ldc.i4.1 - IL_45a5: sub - IL_45a6: ldloc.s V_4 - IL_45a8: add - IL_45a9: sub - IL_45aa: stloc.2 - IL_45ab: ldloc.s V_5 - IL_45ad: ldc.i4.1 - IL_45ae: add - IL_45af: stloc.s V_5 - IL_45b1: ldloc.2 - IL_45b2: ldc.i4.1 - IL_45b3: add - IL_45b4: stloc.2 - IL_45b5: ldloc.1 - IL_45b6: ldloc.2 - IL_45b7: bne.un.s IL_45f3 - IL_45b9: ldloc.1 - IL_45ba: ldloc.2 - IL_45bb: ldloc.3 - IL_45bc: add - IL_45bd: sub - IL_45be: stloc.1 - IL_45bf: ldloc.s V_4 - IL_45c1: ldc.i4.1 - IL_45c2: add - IL_45c3: stloc.s V_4 - IL_45c5: ldloc.s V_5 - IL_45c7: ldc.i4.1 - IL_45c8: sub - IL_45c9: stloc.s V_5 - IL_45cb: ldloc.s V_5 - IL_45cd: ldloc.s V_4 - IL_45cf: ldloc.3 - IL_45d0: ldc.i4.1 - IL_45d1: sub - IL_45d2: sub - IL_45d3: mul - IL_45d4: stloc.s V_5 - IL_45d6: ldloc.2 - IL_45d7: ldc.i4.1 - IL_45d8: sub - IL_45d9: stloc.2 - IL_45da: ldloc.1 - IL_45db: ldloc.s V_5 - IL_45dd: sub - IL_45de: stloc.1 - IL_45df: ldloc.s V_4 - IL_45e1: ldloc.3 - IL_45e2: ldc.i4.2 - IL_45e3: add - IL_45e4: ldloc.2 - IL_45e5: sub - IL_45e6: sub - IL_45e7: stloc.s V_4 - IL_45e9: ldloc.1 - IL_45ea: ldc.i4.1 - IL_45eb: add - IL_45ec: stloc.1 - IL_45ed: ldloc.1 - IL_45ee: ldc.i4.1 - IL_45ef: sub - IL_45f0: stloc.1 - IL_45f1: br.s IL_462a - IL_45f3: ldloc.2 - IL_45f4: ldloc.3 - IL_45f5: ldloc.s V_4 - IL_45f7: sub - IL_45f8: mul - IL_45f9: stloc.2 - IL_45fa: ldloc.s V_5 - IL_45fc: ldc.i4.1 - IL_45fd: add - IL_45fe: stloc.s V_5 - IL_4600: ldloc.3 - IL_4601: ldc.i4.m1 - IL_4602: add - IL_4603: stloc.3 - IL_4604: ldloc.s V_4 - IL_4606: ldloc.s V_5 - IL_4608: ldloc.1 - IL_4609: ldc.i4.1 - IL_460a: add - IL_460b: add - IL_460c: sub - IL_460d: stloc.s V_4 - IL_460f: ldloc.2 - IL_4610: ldc.i4.1 - IL_4611: add - IL_4612: stloc.2 - IL_4613: ldloc.1 - IL_4614: ldc.i4.2 - IL_4615: sub - IL_4616: stloc.1 - IL_4617: ldloc.2 - IL_4618: ldloc.3 - IL_4619: ldc.i4.1 - IL_461a: sub - IL_461b: ldloc.s V_4 - IL_461d: add - IL_461e: mul - IL_461f: stloc.2 - IL_4620: ldloc.s V_5 - IL_4622: ldc.i4.1 - IL_4623: add - IL_4624: stloc.s V_5 - IL_4626: ldloc.2 - IL_4627: ldc.i4.1 - IL_4628: add - IL_4629: stloc.2 - IL_462a: ldloc.s V_5 - IL_462c: ldloc.2 - IL_462d: bne.un.s IL_4669 - IL_462f: ldloc.1 - IL_4630: ldloc.2 - IL_4631: ldloc.3 - IL_4632: mul - IL_4633: mul - IL_4634: stloc.1 - IL_4635: ldloc.s V_4 - IL_4637: ldc.i4.1 - IL_4638: add - IL_4639: stloc.s V_4 - IL_463b: ldloc.s V_5 - IL_463d: ldc.i4.1 - IL_463e: sub - IL_463f: stloc.s V_5 - IL_4641: ldloc.s V_5 - IL_4643: ldloc.s V_4 - IL_4645: ldloc.3 - IL_4646: ldc.i4.1 - IL_4647: sub - IL_4648: sub - IL_4649: mul - IL_464a: stloc.s V_5 - IL_464c: ldloc.2 - IL_464d: ldc.i4.1 - IL_464e: sub - IL_464f: stloc.2 - IL_4650: ldloc.1 - IL_4651: ldloc.s V_5 - IL_4653: sub - IL_4654: stloc.1 - IL_4655: ldloc.s V_4 - IL_4657: ldloc.3 - IL_4658: ldc.i4.2 - IL_4659: add - IL_465a: ldloc.2 - IL_465b: sub - IL_465c: sub - IL_465d: stloc.s V_4 - IL_465f: ldloc.1 - IL_4660: ldc.i4.1 - IL_4661: add - IL_4662: stloc.1 - IL_4663: ldloc.1 - IL_4664: ldc.i4.1 - IL_4665: sub - IL_4666: stloc.1 - IL_4667: br.s IL_46a0 - IL_4669: ldloc.2 - IL_466a: ldloc.3 - IL_466b: ldloc.s V_4 - IL_466d: sub - IL_466e: mul - IL_466f: stloc.2 - IL_4670: ldloc.s V_5 - IL_4672: ldc.i4.1 - IL_4673: add - IL_4674: stloc.s V_5 - IL_4676: ldloc.3 - IL_4677: ldc.i4.m1 - IL_4678: add - IL_4679: stloc.3 - IL_467a: ldloc.s V_4 - IL_467c: ldloc.s V_5 - IL_467e: ldloc.1 - IL_467f: ldc.i4.1 - IL_4680: add - IL_4681: sub - IL_4682: sub - IL_4683: stloc.s V_4 - IL_4685: ldloc.2 - IL_4686: ldc.i4.1 - IL_4687: add - IL_4688: stloc.2 - IL_4689: ldloc.1 - IL_468a: ldc.i4.2 - IL_468b: sub - IL_468c: stloc.1 - IL_468d: ldloc.2 - IL_468e: ldloc.3 - IL_468f: ldc.i4.1 - IL_4690: sub - IL_4691: ldloc.s V_4 - IL_4693: add - IL_4694: mul - IL_4695: stloc.2 - IL_4696: ldloc.s V_5 - IL_4698: ldc.i4.1 - IL_4699: add - IL_469a: stloc.s V_5 - IL_469c: ldloc.2 - IL_469d: ldc.i4.1 - IL_469e: add - IL_469f: stloc.2 - IL_46a0: ldloc.1 - IL_46a1: ldloc.2 - IL_46a2: ble.s IL_46de - IL_46a4: ldloc.1 - IL_46a5: ldloc.2 - IL_46a6: ldloc.3 - IL_46a7: sub - IL_46a8: sub - IL_46a9: stloc.1 - IL_46aa: ldloc.s V_4 - IL_46ac: ldc.i4.1 - IL_46ad: add - IL_46ae: stloc.s V_4 - IL_46b0: ldloc.s V_5 - IL_46b2: ldc.i4.1 - IL_46b3: sub - IL_46b4: stloc.s V_5 - IL_46b6: ldloc.s V_5 - IL_46b8: ldloc.s V_4 - IL_46ba: ldloc.3 - IL_46bb: ldc.i4.1 - IL_46bc: sub - IL_46bd: add - IL_46be: mul - IL_46bf: stloc.s V_5 - IL_46c1: ldloc.2 - IL_46c2: ldc.i4.1 - IL_46c3: sub - IL_46c4: stloc.2 - IL_46c5: ldloc.1 - IL_46c6: ldloc.s V_5 - IL_46c8: sub - IL_46c9: stloc.1 - IL_46ca: ldloc.s V_4 - IL_46cc: ldloc.3 - IL_46cd: ldc.i4.2 - IL_46ce: add - IL_46cf: ldloc.2 - IL_46d0: add - IL_46d1: sub - IL_46d2: stloc.s V_4 - IL_46d4: ldloc.1 - IL_46d5: ldc.i4.1 - IL_46d6: add - IL_46d7: stloc.1 - IL_46d8: ldloc.1 - IL_46d9: ldc.i4.1 - IL_46da: sub - IL_46db: stloc.1 - IL_46dc: br.s IL_4715 - IL_46de: ldloc.2 - IL_46df: ldloc.3 - IL_46e0: ldloc.s V_4 - IL_46e2: sub - IL_46e3: mul - IL_46e4: stloc.2 - IL_46e5: ldloc.s V_5 - IL_46e7: ldc.i4.1 - IL_46e8: add - IL_46e9: stloc.s V_5 - IL_46eb: ldloc.3 - IL_46ec: ldc.i4.m1 - IL_46ed: add - IL_46ee: stloc.3 - IL_46ef: ldloc.s V_4 - IL_46f1: ldloc.s V_5 - IL_46f3: ldloc.1 - IL_46f4: ldc.i4.1 - IL_46f5: add - IL_46f6: sub - IL_46f7: add - IL_46f8: stloc.s V_4 - IL_46fa: ldloc.2 - IL_46fb: ldc.i4.1 - IL_46fc: add - IL_46fd: stloc.2 - IL_46fe: ldloc.1 - IL_46ff: ldc.i4.2 - IL_4700: sub - IL_4701: stloc.1 - IL_4702: ldloc.2 - IL_4703: ldloc.3 - IL_4704: ldc.i4.1 - IL_4705: sub - IL_4706: ldloc.s V_4 - IL_4708: sub - IL_4709: mul - IL_470a: stloc.2 - IL_470b: ldloc.s V_5 - IL_470d: ldc.i4.1 - IL_470e: add - IL_470f: stloc.s V_5 - IL_4711: ldloc.2 - IL_4712: ldc.i4.1 - IL_4713: add - IL_4714: stloc.2 - IL_4715: ldloc.1 - IL_4716: ldloc.2 - IL_4717: ble.s IL_4753 - IL_4719: ldloc.1 - IL_471a: ldloc.2 - IL_471b: ldloc.3 - IL_471c: add - IL_471d: sub - IL_471e: stloc.1 - IL_471f: ldloc.s V_4 - IL_4721: ldc.i4.1 - IL_4722: add - IL_4723: stloc.s V_4 - IL_4725: ldloc.s V_5 - IL_4727: ldc.i4.1 - IL_4728: sub - IL_4729: stloc.s V_5 - IL_472b: ldloc.s V_5 - IL_472d: ldloc.s V_4 - IL_472f: ldloc.3 - IL_4730: ldc.i4.1 - IL_4731: sub - IL_4732: sub - IL_4733: sub - IL_4734: stloc.s V_5 - IL_4736: ldloc.2 - IL_4737: ldc.i4.1 - IL_4738: sub - IL_4739: stloc.2 - IL_473a: ldloc.1 - IL_473b: ldloc.s V_5 - IL_473d: sub - IL_473e: stloc.1 - IL_473f: ldloc.s V_4 - IL_4741: ldloc.3 - IL_4742: ldc.i4.2 - IL_4743: add - IL_4744: ldloc.2 - IL_4745: sub - IL_4746: add - IL_4747: stloc.s V_4 - IL_4749: ldloc.1 - IL_474a: ldc.i4.1 - IL_474b: add - IL_474c: stloc.1 - IL_474d: ldloc.1 - IL_474e: ldc.i4.1 - IL_474f: sub - IL_4750: stloc.1 - IL_4751: br.s IL_478a - IL_4753: ldloc.2 - IL_4754: ldloc.3 - IL_4755: ldloc.s V_4 - IL_4757: add - IL_4758: sub - IL_4759: stloc.2 - IL_475a: ldloc.s V_5 - IL_475c: ldc.i4.1 - IL_475d: add - IL_475e: stloc.s V_5 - IL_4760: ldloc.3 - IL_4761: ldc.i4.m1 - IL_4762: add - IL_4763: stloc.3 - IL_4764: ldloc.s V_4 - IL_4766: ldloc.s V_5 - IL_4768: ldloc.1 - IL_4769: ldc.i4.1 - IL_476a: add - IL_476b: mul - IL_476c: sub - IL_476d: stloc.s V_4 - IL_476f: ldloc.2 - IL_4770: ldc.i4.1 - IL_4771: add - IL_4772: stloc.2 - IL_4773: ldloc.1 - IL_4774: ldc.i4.2 - IL_4775: sub - IL_4776: stloc.1 - IL_4777: ldloc.2 - IL_4778: ldloc.3 - IL_4779: ldc.i4.1 - IL_477a: sub - IL_477b: ldloc.s V_4 - IL_477d: sub - IL_477e: sub - IL_477f: stloc.2 - IL_4780: ldloc.s V_5 - IL_4782: ldc.i4.1 - IL_4783: add - IL_4784: stloc.s V_5 - IL_4786: ldloc.2 - IL_4787: ldc.i4.1 - IL_4788: add - IL_4789: stloc.2 - IL_478a: ldloc.1 - IL_478b: ldloc.2 - IL_478c: ble.s IL_47c8 - IL_478e: ldloc.1 - IL_478f: ldloc.2 - IL_4790: ldloc.3 - IL_4791: mul - IL_4792: add - IL_4793: stloc.1 - IL_4794: ldloc.s V_4 - IL_4796: ldc.i4.1 - IL_4797: add - IL_4798: stloc.s V_4 - IL_479a: ldloc.s V_5 - IL_479c: ldc.i4.1 - IL_479d: sub - IL_479e: stloc.s V_5 - IL_47a0: ldloc.s V_5 - IL_47a2: ldloc.s V_4 - IL_47a4: ldloc.3 - IL_47a5: ldc.i4.1 - IL_47a6: sub - IL_47a7: sub - IL_47a8: mul - IL_47a9: stloc.s V_5 - IL_47ab: ldloc.2 - IL_47ac: ldc.i4.1 - IL_47ad: sub - IL_47ae: stloc.2 - IL_47af: ldloc.1 - IL_47b0: ldloc.s V_5 - IL_47b2: sub - IL_47b3: stloc.1 - IL_47b4: ldloc.s V_4 - IL_47b6: ldloc.3 - IL_47b7: ldc.i4.2 - IL_47b8: add - IL_47b9: ldloc.2 - IL_47ba: sub - IL_47bb: add - IL_47bc: stloc.s V_4 - IL_47be: ldloc.1 - IL_47bf: ldc.i4.1 - IL_47c0: add - IL_47c1: stloc.1 - IL_47c2: ldloc.1 - IL_47c3: ldc.i4.1 - IL_47c4: sub - IL_47c5: stloc.1 - IL_47c6: br.s IL_47ff - IL_47c8: ldloc.2 - IL_47c9: ldloc.3 - IL_47ca: ldloc.s V_4 - IL_47cc: add - IL_47cd: mul - IL_47ce: stloc.2 - IL_47cf: ldloc.s V_5 - IL_47d1: ldc.i4.1 - IL_47d2: add - IL_47d3: stloc.s V_5 - IL_47d5: ldloc.3 - IL_47d6: ldc.i4.m1 - IL_47d7: add - IL_47d8: stloc.3 - IL_47d9: ldloc.s V_4 - IL_47db: ldloc.s V_5 - IL_47dd: ldloc.1 - IL_47de: ldc.i4.1 - IL_47df: add - IL_47e0: mul - IL_47e1: sub - IL_47e2: stloc.s V_4 - IL_47e4: ldloc.2 - IL_47e5: ldc.i4.1 - IL_47e6: add - IL_47e7: stloc.2 - IL_47e8: ldloc.1 - IL_47e9: ldc.i4.2 - IL_47ea: sub - IL_47eb: stloc.1 - IL_47ec: ldloc.2 - IL_47ed: ldloc.3 - IL_47ee: ldc.i4.1 - IL_47ef: sub - IL_47f0: ldloc.s V_4 - IL_47f2: add - IL_47f3: mul - IL_47f4: stloc.2 - IL_47f5: ldloc.s V_5 - IL_47f7: ldc.i4.1 - IL_47f8: add - IL_47f9: stloc.s V_5 - IL_47fb: ldloc.2 - IL_47fc: ldc.i4.1 - IL_47fd: add - IL_47fe: stloc.2 - IL_47ff: ldloc.1 - IL_4800: ldloc.2 - IL_4801: bne.un.s IL_483d - IL_4803: ldloc.1 - IL_4804: ldloc.2 - IL_4805: ldloc.3 - IL_4806: add - IL_4807: mul - IL_4808: stloc.1 - IL_4809: ldloc.s V_4 - IL_480b: ldc.i4.1 - IL_480c: add - IL_480d: stloc.s V_4 - IL_480f: ldloc.s V_5 - IL_4811: ldc.i4.1 - IL_4812: sub - IL_4813: stloc.s V_5 - IL_4815: ldloc.s V_5 - IL_4817: ldloc.s V_4 - IL_4819: ldloc.3 - IL_481a: ldc.i4.1 - IL_481b: sub - IL_481c: mul - IL_481d: mul - IL_481e: stloc.s V_5 - IL_4820: ldloc.2 - IL_4821: ldc.i4.1 - IL_4822: sub - IL_4823: stloc.2 - IL_4824: ldloc.1 - IL_4825: ldloc.s V_5 - IL_4827: sub - IL_4828: stloc.1 - IL_4829: ldloc.s V_4 - IL_482b: ldloc.3 - IL_482c: ldc.i4.2 - IL_482d: add - IL_482e: ldloc.2 - IL_482f: mul - IL_4830: add - IL_4831: stloc.s V_4 - IL_4833: ldloc.1 - IL_4834: ldc.i4.1 - IL_4835: add - IL_4836: stloc.1 - IL_4837: ldloc.1 - IL_4838: ldc.i4.1 - IL_4839: sub - IL_483a: stloc.1 - IL_483b: br.s IL_4874 - IL_483d: ldloc.2 - IL_483e: ldloc.3 - IL_483f: ldloc.s V_4 - IL_4841: add - IL_4842: mul - IL_4843: stloc.2 - IL_4844: ldloc.s V_5 - IL_4846: ldc.i4.1 - IL_4847: add - IL_4848: stloc.s V_5 - IL_484a: ldloc.3 - IL_484b: ldc.i4.m1 - IL_484c: add - IL_484d: stloc.3 - IL_484e: ldloc.s V_4 - IL_4850: ldloc.s V_5 - IL_4852: ldloc.1 - IL_4853: ldc.i4.1 - IL_4854: add - IL_4855: add - IL_4856: mul - IL_4857: stloc.s V_4 - IL_4859: ldloc.2 - IL_485a: ldc.i4.1 - IL_485b: add - IL_485c: stloc.2 - IL_485d: ldloc.1 - IL_485e: ldc.i4.2 - IL_485f: sub - IL_4860: stloc.1 - IL_4861: ldloc.2 - IL_4862: ldloc.3 - IL_4863: ldc.i4.1 - IL_4864: sub - IL_4865: ldloc.s V_4 - IL_4867: sub - IL_4868: mul - IL_4869: stloc.2 - IL_486a: ldloc.s V_5 - IL_486c: ldc.i4.1 - IL_486d: add - IL_486e: stloc.s V_5 - IL_4870: ldloc.2 - IL_4871: ldc.i4.1 - IL_4872: add - IL_4873: stloc.2 - IL_4874: ldloc.1 - IL_4875: ldloc.2 - IL_4876: bne.un.s IL_48b2 - IL_4878: ldloc.1 - IL_4879: ldloc.2 - IL_487a: ldloc.3 - IL_487b: add - IL_487c: add - IL_487d: stloc.1 - IL_487e: ldloc.s V_4 - IL_4880: ldc.i4.1 - IL_4881: add - IL_4882: stloc.s V_4 - IL_4884: ldloc.s V_5 - IL_4886: ldc.i4.1 - IL_4887: sub - IL_4888: stloc.s V_5 - IL_488a: ldloc.s V_5 - IL_488c: ldloc.s V_4 - IL_488e: ldloc.3 - IL_488f: ldc.i4.1 - IL_4890: sub - IL_4891: add - IL_4892: add - IL_4893: stloc.s V_5 - IL_4895: ldloc.2 - IL_4896: ldc.i4.1 - IL_4897: sub - IL_4898: stloc.2 - IL_4899: ldloc.1 - IL_489a: ldloc.s V_5 - IL_489c: sub - IL_489d: stloc.1 - IL_489e: ldloc.s V_4 - IL_48a0: ldloc.3 - IL_48a1: ldc.i4.2 - IL_48a2: add - IL_48a3: ldloc.2 - IL_48a4: add - IL_48a5: add - IL_48a6: stloc.s V_4 - IL_48a8: ldloc.1 - IL_48a9: ldc.i4.1 - IL_48aa: add - IL_48ab: stloc.1 - IL_48ac: ldloc.1 - IL_48ad: ldc.i4.1 - IL_48ae: sub - IL_48af: stloc.1 - IL_48b0: br.s IL_48e9 - IL_48b2: ldloc.2 - IL_48b3: ldloc.3 - IL_48b4: ldloc.s V_4 - IL_48b6: add - IL_48b7: add - IL_48b8: stloc.2 - IL_48b9: ldloc.s V_5 - IL_48bb: ldc.i4.1 - IL_48bc: add - IL_48bd: stloc.s V_5 - IL_48bf: ldloc.3 - IL_48c0: ldc.i4.m1 - IL_48c1: add - IL_48c2: stloc.3 - IL_48c3: ldloc.s V_4 - IL_48c5: ldloc.s V_5 - IL_48c7: ldloc.1 - IL_48c8: ldc.i4.1 - IL_48c9: add - IL_48ca: add - IL_48cb: add - IL_48cc: stloc.s V_4 - IL_48ce: ldloc.2 - IL_48cf: ldc.i4.1 - IL_48d0: add - IL_48d1: stloc.2 - IL_48d2: ldloc.1 - IL_48d3: ldc.i4.2 - IL_48d4: sub - IL_48d5: stloc.1 - IL_48d6: ldloc.2 - IL_48d7: ldloc.3 - IL_48d8: ldc.i4.1 - IL_48d9: sub - IL_48da: ldloc.s V_4 - IL_48dc: add - IL_48dd: add - IL_48de: stloc.2 - IL_48df: ldloc.s V_5 - IL_48e1: ldc.i4.1 - IL_48e2: add - IL_48e3: stloc.s V_5 - IL_48e5: ldloc.2 - IL_48e6: ldc.i4.1 - IL_48e7: add - IL_48e8: stloc.2 - IL_48e9: ldloc.1 - IL_48ea: ldloc.2 - IL_48eb: ble.s IL_4927 - IL_48ed: ldloc.1 - IL_48ee: ldloc.2 - IL_48ef: ldloc.3 - IL_48f0: mul - IL_48f1: sub - IL_48f2: stloc.1 - IL_48f3: ldloc.s V_4 - IL_48f5: ldc.i4.1 - IL_48f6: add - IL_48f7: stloc.s V_4 - IL_48f9: ldloc.s V_5 - IL_48fb: ldc.i4.1 - IL_48fc: sub - IL_48fd: stloc.s V_5 - IL_48ff: ldloc.s V_5 - IL_4901: ldloc.s V_4 - IL_4903: ldloc.3 - IL_4904: ldc.i4.1 - IL_4905: sub - IL_4906: add - IL_4907: add - IL_4908: stloc.s V_5 - IL_490a: ldloc.2 - IL_490b: ldc.i4.1 - IL_490c: sub - IL_490d: stloc.2 - IL_490e: ldloc.1 - IL_490f: ldloc.s V_5 - IL_4911: sub - IL_4912: stloc.1 - IL_4913: ldloc.s V_4 - IL_4915: ldloc.3 - IL_4916: ldc.i4.2 - IL_4917: add - IL_4918: ldloc.2 - IL_4919: add - IL_491a: add - IL_491b: stloc.s V_4 - IL_491d: ldloc.1 - IL_491e: ldc.i4.1 - IL_491f: add - IL_4920: stloc.1 - IL_4921: ldloc.1 - IL_4922: ldc.i4.1 - IL_4923: sub - IL_4924: stloc.1 - IL_4925: br.s IL_495e - IL_4927: ldloc.2 - IL_4928: ldloc.3 - IL_4929: ldloc.s V_4 - IL_492b: add - IL_492c: add - IL_492d: stloc.2 - IL_492e: ldloc.s V_5 - IL_4930: ldc.i4.1 - IL_4931: add - IL_4932: stloc.s V_5 - IL_4934: ldloc.3 - IL_4935: ldc.i4.m1 - IL_4936: add - IL_4937: stloc.3 - IL_4938: ldloc.s V_4 - IL_493a: ldloc.s V_5 - IL_493c: ldloc.1 - IL_493d: ldc.i4.1 - IL_493e: add - IL_493f: sub - IL_4940: add - IL_4941: stloc.s V_4 - IL_4943: ldloc.2 - IL_4944: ldc.i4.1 - IL_4945: add - IL_4946: stloc.2 - IL_4947: ldloc.1 - IL_4948: ldc.i4.2 - IL_4949: sub - IL_494a: stloc.1 - IL_494b: ldloc.2 - IL_494c: ldloc.3 - IL_494d: ldc.i4.1 - IL_494e: sub - IL_494f: ldloc.s V_4 - IL_4951: sub - IL_4952: add - IL_4953: stloc.2 - IL_4954: ldloc.s V_5 - IL_4956: ldc.i4.1 - IL_4957: add - IL_4958: stloc.s V_5 - IL_495a: ldloc.2 - IL_495b: ldc.i4.1 - IL_495c: add - IL_495d: stloc.2 - IL_495e: ldloc.1 - IL_495f: ldloc.2 - IL_4960: beq.s IL_499c - IL_4962: ldloc.1 - IL_4963: ldloc.2 - IL_4964: ldloc.3 - IL_4965: add - IL_4966: add - IL_4967: stloc.1 - IL_4968: ldloc.s V_4 - IL_496a: ldc.i4.1 - IL_496b: add - IL_496c: stloc.s V_4 - IL_496e: ldloc.s V_5 - IL_4970: ldc.i4.1 - IL_4971: sub - IL_4972: stloc.s V_5 - IL_4974: ldloc.s V_5 - IL_4976: ldloc.s V_4 - IL_4978: ldloc.3 - IL_4979: ldc.i4.1 - IL_497a: sub - IL_497b: mul - IL_497c: mul - IL_497d: stloc.s V_5 - IL_497f: ldloc.2 - IL_4980: ldc.i4.1 - IL_4981: sub - IL_4982: stloc.2 - IL_4983: ldloc.1 - IL_4984: ldloc.s V_5 - IL_4986: sub - IL_4987: stloc.1 - IL_4988: ldloc.s V_4 - IL_498a: ldloc.3 - IL_498b: ldc.i4.2 - IL_498c: add - IL_498d: ldloc.2 - IL_498e: mul - IL_498f: sub - IL_4990: stloc.s V_4 - IL_4992: ldloc.1 - IL_4993: ldc.i4.1 - IL_4994: add - IL_4995: stloc.1 - IL_4996: ldloc.1 - IL_4997: ldc.i4.1 - IL_4998: sub - IL_4999: stloc.1 - IL_499a: br.s IL_49d3 - IL_499c: ldloc.2 - IL_499d: ldloc.3 - IL_499e: ldloc.s V_4 - IL_49a0: sub - IL_49a1: mul - IL_49a2: stloc.2 - IL_49a3: ldloc.s V_5 - IL_49a5: ldc.i4.1 - IL_49a6: add - IL_49a7: stloc.s V_5 - IL_49a9: ldloc.3 - IL_49aa: ldc.i4.m1 - IL_49ab: add - IL_49ac: stloc.3 - IL_49ad: ldloc.s V_4 - IL_49af: ldloc.s V_5 - IL_49b1: ldloc.1 - IL_49b2: ldc.i4.1 - IL_49b3: add - IL_49b4: mul - IL_49b5: mul - IL_49b6: stloc.s V_4 - IL_49b8: ldloc.2 - IL_49b9: ldc.i4.1 - IL_49ba: add - IL_49bb: stloc.2 - IL_49bc: ldloc.1 - IL_49bd: ldc.i4.2 - IL_49be: sub - IL_49bf: stloc.1 - IL_49c0: ldloc.2 - IL_49c1: ldloc.3 - IL_49c2: ldc.i4.1 - IL_49c3: sub - IL_49c4: ldloc.s V_4 - IL_49c6: add - IL_49c7: mul - IL_49c8: stloc.2 - IL_49c9: ldloc.s V_5 - IL_49cb: ldc.i4.1 - IL_49cc: add - IL_49cd: stloc.s V_5 - IL_49cf: ldloc.2 - IL_49d0: ldc.i4.1 - IL_49d1: add - IL_49d2: stloc.2 - IL_49d3: ldloc.1 - IL_49d4: ldloc.2 - IL_49d5: bne.un.s IL_4a11 - IL_49d7: ldloc.1 - IL_49d8: ldloc.2 - IL_49d9: ldloc.3 - IL_49da: add - IL_49db: sub - IL_49dc: stloc.1 - IL_49dd: ldloc.s V_4 - IL_49df: ldc.i4.1 - IL_49e0: add - IL_49e1: stloc.s V_4 - IL_49e3: ldloc.s V_5 - IL_49e5: ldc.i4.1 - IL_49e6: sub - IL_49e7: stloc.s V_5 - IL_49e9: ldloc.s V_5 - IL_49eb: ldloc.s V_4 - IL_49ed: ldloc.3 - IL_49ee: ldc.i4.1 - IL_49ef: sub - IL_49f0: mul - IL_49f1: mul - IL_49f2: stloc.s V_5 - IL_49f4: ldloc.2 - IL_49f5: ldc.i4.1 - IL_49f6: sub - IL_49f7: stloc.2 - IL_49f8: ldloc.1 - IL_49f9: ldloc.s V_5 - IL_49fb: sub - IL_49fc: stloc.1 - IL_49fd: ldloc.s V_4 - IL_49ff: ldloc.3 - IL_4a00: ldc.i4.2 - IL_4a01: add - IL_4a02: ldloc.2 - IL_4a03: mul - IL_4a04: add - IL_4a05: stloc.s V_4 - IL_4a07: ldloc.1 - IL_4a08: ldc.i4.1 - IL_4a09: add - IL_4a0a: stloc.1 - IL_4a0b: ldloc.1 - IL_4a0c: ldc.i4.1 - IL_4a0d: sub - IL_4a0e: stloc.1 - IL_4a0f: br.s IL_4a48 - IL_4a11: ldloc.2 - IL_4a12: ldloc.3 - IL_4a13: ldloc.s V_4 - IL_4a15: add - IL_4a16: mul - IL_4a17: stloc.2 - IL_4a18: ldloc.s V_5 - IL_4a1a: ldc.i4.1 - IL_4a1b: add - IL_4a1c: stloc.s V_5 - IL_4a1e: ldloc.3 - IL_4a1f: ldc.i4.m1 - IL_4a20: add - IL_4a21: stloc.3 - IL_4a22: ldloc.s V_4 - IL_4a24: ldloc.s V_5 - IL_4a26: ldloc.1 - IL_4a27: ldc.i4.1 - IL_4a28: add - IL_4a29: mul - IL_4a2a: mul - IL_4a2b: stloc.s V_4 - IL_4a2d: ldloc.2 - IL_4a2e: ldc.i4.1 - IL_4a2f: add - IL_4a30: stloc.2 - IL_4a31: ldloc.1 - IL_4a32: ldc.i4.2 - IL_4a33: sub - IL_4a34: stloc.1 - IL_4a35: ldloc.2 - IL_4a36: ldloc.3 - IL_4a37: ldc.i4.1 - IL_4a38: sub - IL_4a39: ldloc.s V_4 - IL_4a3b: add - IL_4a3c: mul - IL_4a3d: stloc.2 - IL_4a3e: ldloc.s V_5 - IL_4a40: ldc.i4.1 - IL_4a41: add - IL_4a42: stloc.s V_5 - IL_4a44: ldloc.2 - IL_4a45: ldc.i4.1 - IL_4a46: add - IL_4a47: stloc.2 - IL_4a48: ldloc.1 - IL_4a49: ldloc.2 - IL_4a4a: bgt.s IL_4a86 - IL_4a4c: ldloc.1 - IL_4a4d: ldloc.2 - IL_4a4e: ldloc.3 - IL_4a4f: sub - IL_4a50: add - IL_4a51: stloc.1 - IL_4a52: ldloc.s V_4 - IL_4a54: ldc.i4.1 - IL_4a55: add - IL_4a56: stloc.s V_4 - IL_4a58: ldloc.s V_5 - IL_4a5a: ldc.i4.1 - IL_4a5b: sub - IL_4a5c: stloc.s V_5 - IL_4a5e: ldloc.s V_5 - IL_4a60: ldloc.s V_4 - IL_4a62: ldloc.3 - IL_4a63: ldc.i4.1 - IL_4a64: sub - IL_4a65: mul - IL_4a66: sub - IL_4a67: stloc.s V_5 - IL_4a69: ldloc.2 - IL_4a6a: ldc.i4.1 - IL_4a6b: sub - IL_4a6c: stloc.2 - IL_4a6d: ldloc.1 - IL_4a6e: ldloc.s V_5 - IL_4a70: sub - IL_4a71: stloc.1 - IL_4a72: ldloc.s V_4 - IL_4a74: ldloc.3 - IL_4a75: ldc.i4.2 - IL_4a76: add - IL_4a77: ldloc.2 - IL_4a78: mul - IL_4a79: mul - IL_4a7a: stloc.s V_4 - IL_4a7c: ldloc.1 - IL_4a7d: ldc.i4.1 - IL_4a7e: add - IL_4a7f: stloc.1 - IL_4a80: ldloc.1 - IL_4a81: ldc.i4.1 - IL_4a82: sub - IL_4a83: stloc.1 - IL_4a84: br.s IL_4abd - IL_4a86: ldloc.2 - IL_4a87: ldloc.3 - IL_4a88: ldloc.s V_4 - IL_4a8a: mul - IL_4a8b: sub - IL_4a8c: stloc.2 - IL_4a8d: ldloc.s V_5 - IL_4a8f: ldc.i4.1 - IL_4a90: add - IL_4a91: stloc.s V_5 - IL_4a93: ldloc.3 - IL_4a94: ldc.i4.m1 - IL_4a95: add - IL_4a96: stloc.3 - IL_4a97: ldloc.s V_4 - IL_4a99: ldloc.s V_5 - IL_4a9b: ldloc.1 - IL_4a9c: ldc.i4.1 - IL_4a9d: add - IL_4a9e: add - IL_4a9f: mul - IL_4aa0: stloc.s V_4 - IL_4aa2: ldloc.2 - IL_4aa3: ldc.i4.1 - IL_4aa4: add - IL_4aa5: stloc.2 - IL_4aa6: ldloc.1 - IL_4aa7: ldc.i4.2 - IL_4aa8: sub - IL_4aa9: stloc.1 - IL_4aaa: ldloc.2 - IL_4aab: ldloc.3 - IL_4aac: ldc.i4.1 - IL_4aad: sub - IL_4aae: ldloc.s V_4 - IL_4ab0: mul - IL_4ab1: sub - IL_4ab2: stloc.2 - IL_4ab3: ldloc.s V_5 - IL_4ab5: ldc.i4.1 - IL_4ab6: add - IL_4ab7: stloc.s V_5 - IL_4ab9: ldloc.2 - IL_4aba: ldc.i4.1 - IL_4abb: add - IL_4abc: stloc.2 - IL_4abd: ldloc.1 - IL_4abe: ldloc.2 - IL_4abf: ble.s IL_4afb - IL_4ac1: ldloc.1 - IL_4ac2: ldloc.2 - IL_4ac3: ldloc.3 - IL_4ac4: add - IL_4ac5: sub - IL_4ac6: stloc.1 - IL_4ac7: ldloc.s V_4 - IL_4ac9: ldc.i4.1 - IL_4aca: add - IL_4acb: stloc.s V_4 - IL_4acd: ldloc.s V_5 - IL_4acf: ldc.i4.1 - IL_4ad0: sub - IL_4ad1: stloc.s V_5 - IL_4ad3: ldloc.s V_5 - IL_4ad5: ldloc.s V_4 - IL_4ad7: ldloc.3 - IL_4ad8: ldc.i4.1 - IL_4ad9: sub - IL_4ada: mul - IL_4adb: sub - IL_4adc: stloc.s V_5 - IL_4ade: ldloc.2 - IL_4adf: ldc.i4.1 - IL_4ae0: sub - IL_4ae1: stloc.2 - IL_4ae2: ldloc.1 - IL_4ae3: ldloc.s V_5 - IL_4ae5: sub - IL_4ae6: stloc.1 - IL_4ae7: ldloc.s V_4 - IL_4ae9: ldloc.3 - IL_4aea: ldc.i4.2 - IL_4aeb: add - IL_4aec: ldloc.2 - IL_4aed: mul - IL_4aee: add - IL_4aef: stloc.s V_4 - IL_4af1: ldloc.1 - IL_4af2: ldc.i4.1 - IL_4af3: add - IL_4af4: stloc.1 - IL_4af5: ldloc.1 - IL_4af6: ldc.i4.1 - IL_4af7: sub - IL_4af8: stloc.1 - IL_4af9: br.s IL_4b32 - IL_4afb: ldloc.2 - IL_4afc: ldloc.3 - IL_4afd: ldloc.s V_4 - IL_4aff: add - IL_4b00: sub - IL_4b01: stloc.2 - IL_4b02: ldloc.s V_5 - IL_4b04: ldc.i4.1 - IL_4b05: add - IL_4b06: stloc.s V_5 - IL_4b08: ldloc.3 - IL_4b09: ldc.i4.m1 - IL_4b0a: add - IL_4b0b: stloc.3 - IL_4b0c: ldloc.s V_4 - IL_4b0e: ldloc.s V_5 - IL_4b10: ldloc.1 - IL_4b11: ldc.i4.1 - IL_4b12: add - IL_4b13: add - IL_4b14: mul - IL_4b15: stloc.s V_4 - IL_4b17: ldloc.2 - IL_4b18: ldc.i4.1 - IL_4b19: add - IL_4b1a: stloc.2 - IL_4b1b: ldloc.1 - IL_4b1c: ldc.i4.2 - IL_4b1d: sub - IL_4b1e: stloc.1 - IL_4b1f: ldloc.2 - IL_4b20: ldloc.3 - IL_4b21: ldc.i4.1 - IL_4b22: sub - IL_4b23: ldloc.s V_4 - IL_4b25: sub - IL_4b26: sub - IL_4b27: stloc.2 - IL_4b28: ldloc.s V_5 - IL_4b2a: ldc.i4.1 - IL_4b2b: add - IL_4b2c: stloc.s V_5 - IL_4b2e: ldloc.2 - IL_4b2f: ldc.i4.1 - IL_4b30: add - IL_4b31: stloc.2 - IL_4b32: ldloc.1 - IL_4b33: ldloc.2 - IL_4b34: blt.s IL_4b70 - IL_4b36: ldloc.1 - IL_4b37: ldloc.2 - IL_4b38: ldloc.3 - IL_4b39: sub - IL_4b3a: add - IL_4b3b: stloc.1 - IL_4b3c: ldloc.s V_4 - IL_4b3e: ldc.i4.1 - IL_4b3f: add - IL_4b40: stloc.s V_4 - IL_4b42: ldloc.s V_5 - IL_4b44: ldc.i4.1 - IL_4b45: sub - IL_4b46: stloc.s V_5 - IL_4b48: ldloc.s V_5 - IL_4b4a: ldloc.s V_4 - IL_4b4c: ldloc.3 - IL_4b4d: ldc.i4.1 - IL_4b4e: sub - IL_4b4f: add - IL_4b50: add - IL_4b51: stloc.s V_5 - IL_4b53: ldloc.2 - IL_4b54: ldc.i4.1 - IL_4b55: sub - IL_4b56: stloc.2 - IL_4b57: ldloc.1 - IL_4b58: ldloc.s V_5 - IL_4b5a: sub - IL_4b5b: stloc.1 - IL_4b5c: ldloc.s V_4 - IL_4b5e: ldloc.3 - IL_4b5f: ldc.i4.2 - IL_4b60: add - IL_4b61: ldloc.2 - IL_4b62: add - IL_4b63: mul - IL_4b64: stloc.s V_4 - IL_4b66: ldloc.1 - IL_4b67: ldc.i4.1 - IL_4b68: add - IL_4b69: stloc.1 - IL_4b6a: ldloc.1 - IL_4b6b: ldc.i4.1 - IL_4b6c: sub - IL_4b6d: stloc.1 - IL_4b6e: br.s IL_4ba7 - IL_4b70: ldloc.2 - IL_4b71: ldloc.3 - IL_4b72: ldloc.s V_4 - IL_4b74: mul - IL_4b75: add - IL_4b76: stloc.2 - IL_4b77: ldloc.s V_5 - IL_4b79: ldc.i4.1 - IL_4b7a: add - IL_4b7b: stloc.s V_5 - IL_4b7d: ldloc.3 - IL_4b7e: ldc.i4.m1 - IL_4b7f: add - IL_4b80: stloc.3 - IL_4b81: ldloc.s V_4 - IL_4b83: ldloc.s V_5 - IL_4b85: ldloc.1 - IL_4b86: ldc.i4.1 - IL_4b87: add - IL_4b88: mul - IL_4b89: add - IL_4b8a: stloc.s V_4 - IL_4b8c: ldloc.2 - IL_4b8d: ldc.i4.1 - IL_4b8e: add - IL_4b8f: stloc.2 - IL_4b90: ldloc.1 - IL_4b91: ldc.i4.2 - IL_4b92: sub - IL_4b93: stloc.1 - IL_4b94: ldloc.2 - IL_4b95: ldloc.3 - IL_4b96: ldc.i4.1 - IL_4b97: sub - IL_4b98: ldloc.s V_4 - IL_4b9a: add - IL_4b9b: add - IL_4b9c: stloc.2 - IL_4b9d: ldloc.s V_5 - IL_4b9f: ldc.i4.1 - IL_4ba0: add - IL_4ba1: stloc.s V_5 - IL_4ba3: ldloc.2 - IL_4ba4: ldc.i4.1 - IL_4ba5: add - IL_4ba6: stloc.2 - IL_4ba7: ldloc.1 - IL_4ba8: ldloc.2 - IL_4ba9: ble.s IL_4be5 - IL_4bab: ldloc.1 - IL_4bac: ldloc.2 - IL_4bad: ldloc.3 - IL_4bae: sub - IL_4baf: add - IL_4bb0: stloc.1 - IL_4bb1: ldloc.s V_4 - IL_4bb3: ldc.i4.1 - IL_4bb4: add - IL_4bb5: stloc.s V_4 - IL_4bb7: ldloc.s V_5 - IL_4bb9: ldc.i4.1 - IL_4bba: sub - IL_4bbb: stloc.s V_5 - IL_4bbd: ldloc.s V_5 - IL_4bbf: ldloc.s V_4 - IL_4bc1: ldloc.3 - IL_4bc2: ldc.i4.1 - IL_4bc3: sub - IL_4bc4: sub - IL_4bc5: sub - IL_4bc6: stloc.s V_5 - IL_4bc8: ldloc.2 - IL_4bc9: ldc.i4.1 - IL_4bca: sub - IL_4bcb: stloc.2 - IL_4bcc: ldloc.1 - IL_4bcd: ldloc.s V_5 - IL_4bcf: sub - IL_4bd0: stloc.1 - IL_4bd1: ldloc.s V_4 - IL_4bd3: ldloc.3 - IL_4bd4: ldc.i4.2 - IL_4bd5: add - IL_4bd6: ldloc.2 - IL_4bd7: sub - IL_4bd8: mul - IL_4bd9: stloc.s V_4 - IL_4bdb: ldloc.1 - IL_4bdc: ldc.i4.1 - IL_4bdd: add - IL_4bde: stloc.1 - IL_4bdf: ldloc.1 - IL_4be0: ldc.i4.1 - IL_4be1: sub - IL_4be2: stloc.1 - IL_4be3: br.s IL_4c1c - IL_4be5: ldloc.2 - IL_4be6: ldloc.3 - IL_4be7: ldloc.s V_4 - IL_4be9: mul - IL_4bea: sub - IL_4beb: stloc.2 - IL_4bec: ldloc.s V_5 - IL_4bee: ldc.i4.1 - IL_4bef: add - IL_4bf0: stloc.s V_5 - IL_4bf2: ldloc.3 - IL_4bf3: ldc.i4.m1 - IL_4bf4: add - IL_4bf5: stloc.3 - IL_4bf6: ldloc.s V_4 - IL_4bf8: ldloc.s V_5 - IL_4bfa: ldloc.1 - IL_4bfb: ldc.i4.1 - IL_4bfc: add - IL_4bfd: sub - IL_4bfe: sub - IL_4bff: stloc.s V_4 - IL_4c01: ldloc.2 - IL_4c02: ldc.i4.1 - IL_4c03: add - IL_4c04: stloc.2 - IL_4c05: ldloc.1 - IL_4c06: ldc.i4.2 - IL_4c07: sub - IL_4c08: stloc.1 - IL_4c09: ldloc.2 - IL_4c0a: ldloc.3 - IL_4c0b: ldc.i4.1 - IL_4c0c: sub - IL_4c0d: ldloc.s V_4 - IL_4c0f: mul - IL_4c10: sub - IL_4c11: stloc.2 - IL_4c12: ldloc.s V_5 - IL_4c14: ldc.i4.1 - IL_4c15: add - IL_4c16: stloc.s V_5 - IL_4c18: ldloc.2 - IL_4c19: ldc.i4.1 - IL_4c1a: add - IL_4c1b: stloc.2 - IL_4c1c: ldloc.1 - IL_4c1d: ldloc.2 - IL_4c1e: bgt.s IL_4c5a - IL_4c20: ldloc.1 - IL_4c21: ldloc.2 - IL_4c22: ldloc.3 - IL_4c23: mul - IL_4c24: add - IL_4c25: stloc.1 - IL_4c26: ldloc.s V_4 - IL_4c28: ldc.i4.1 - IL_4c29: add - IL_4c2a: stloc.s V_4 - IL_4c2c: ldloc.s V_5 - IL_4c2e: ldc.i4.1 - IL_4c2f: sub - IL_4c30: stloc.s V_5 - IL_4c32: ldloc.s V_5 - IL_4c34: ldloc.s V_4 - IL_4c36: ldloc.3 - IL_4c37: ldc.i4.1 - IL_4c38: sub - IL_4c39: sub - IL_4c3a: add - IL_4c3b: stloc.s V_5 - IL_4c3d: ldloc.2 - IL_4c3e: ldc.i4.1 - IL_4c3f: sub - IL_4c40: stloc.2 - IL_4c41: ldloc.1 - IL_4c42: ldloc.s V_5 - IL_4c44: sub - IL_4c45: stloc.1 - IL_4c46: ldloc.s V_4 - IL_4c48: ldloc.3 - IL_4c49: ldc.i4.2 - IL_4c4a: add - IL_4c4b: ldloc.2 - IL_4c4c: sub - IL_4c4d: add - IL_4c4e: stloc.s V_4 - IL_4c50: ldloc.1 - IL_4c51: ldc.i4.1 - IL_4c52: add - IL_4c53: stloc.1 - IL_4c54: ldloc.1 - IL_4c55: ldc.i4.1 - IL_4c56: sub - IL_4c57: stloc.1 - IL_4c58: br.s IL_4c91 - IL_4c5a: ldloc.2 - IL_4c5b: ldloc.3 - IL_4c5c: ldloc.s V_4 - IL_4c5e: add - IL_4c5f: add - IL_4c60: stloc.2 - IL_4c61: ldloc.s V_5 - IL_4c63: ldc.i4.1 - IL_4c64: add - IL_4c65: stloc.s V_5 - IL_4c67: ldloc.3 - IL_4c68: ldc.i4.m1 - IL_4c69: add - IL_4c6a: stloc.3 - IL_4c6b: ldloc.s V_4 - IL_4c6d: ldloc.s V_5 - IL_4c6f: ldloc.1 - IL_4c70: ldc.i4.1 - IL_4c71: add - IL_4c72: sub - IL_4c73: sub - IL_4c74: stloc.s V_4 - IL_4c76: ldloc.2 - IL_4c77: ldc.i4.1 - IL_4c78: add - IL_4c79: stloc.2 - IL_4c7a: ldloc.1 - IL_4c7b: ldc.i4.2 - IL_4c7c: sub - IL_4c7d: stloc.1 - IL_4c7e: ldloc.2 - IL_4c7f: ldloc.3 - IL_4c80: ldc.i4.1 - IL_4c81: sub - IL_4c82: ldloc.s V_4 - IL_4c84: mul - IL_4c85: add - IL_4c86: stloc.2 - IL_4c87: ldloc.s V_5 - IL_4c89: ldc.i4.1 - IL_4c8a: add - IL_4c8b: stloc.s V_5 - IL_4c8d: ldloc.2 - IL_4c8e: ldc.i4.1 - IL_4c8f: add - IL_4c90: stloc.2 - IL_4c91: ldloc.1 - IL_4c92: ldloc.2 - IL_4c93: beq.s IL_4ccf - IL_4c95: ldloc.1 - IL_4c96: ldloc.2 - IL_4c97: ldloc.3 - IL_4c98: add - IL_4c99: add - IL_4c9a: stloc.1 - IL_4c9b: ldloc.s V_4 - IL_4c9d: ldc.i4.1 - IL_4c9e: add - IL_4c9f: stloc.s V_4 - IL_4ca1: ldloc.s V_5 - IL_4ca3: ldc.i4.1 - IL_4ca4: sub - IL_4ca5: stloc.s V_5 - IL_4ca7: ldloc.s V_5 - IL_4ca9: ldloc.s V_4 - IL_4cab: ldloc.3 - IL_4cac: ldc.i4.1 - IL_4cad: sub - IL_4cae: mul - IL_4caf: add - IL_4cb0: stloc.s V_5 - IL_4cb2: ldloc.2 - IL_4cb3: ldc.i4.1 - IL_4cb4: sub - IL_4cb5: stloc.2 - IL_4cb6: ldloc.1 - IL_4cb7: ldloc.s V_5 - IL_4cb9: sub - IL_4cba: stloc.1 - IL_4cbb: ldloc.s V_4 - IL_4cbd: ldloc.3 - IL_4cbe: ldc.i4.2 - IL_4cbf: add - IL_4cc0: ldloc.2 - IL_4cc1: mul - IL_4cc2: mul - IL_4cc3: stloc.s V_4 - IL_4cc5: ldloc.1 - IL_4cc6: ldc.i4.1 - IL_4cc7: add - IL_4cc8: stloc.1 - IL_4cc9: ldloc.1 - IL_4cca: ldc.i4.1 - IL_4ccb: sub - IL_4ccc: stloc.1 - IL_4ccd: br.s IL_4d06 - IL_4ccf: ldloc.2 - IL_4cd0: ldloc.3 - IL_4cd1: ldloc.s V_4 - IL_4cd3: mul - IL_4cd4: add - IL_4cd5: stloc.2 - IL_4cd6: ldloc.s V_5 - IL_4cd8: ldc.i4.1 - IL_4cd9: add - IL_4cda: stloc.s V_5 - IL_4cdc: ldloc.3 - IL_4cdd: ldc.i4.m1 - IL_4cde: add - IL_4cdf: stloc.3 - IL_4ce0: ldloc.s V_4 - IL_4ce2: ldloc.s V_5 - IL_4ce4: ldloc.1 - IL_4ce5: ldc.i4.1 - IL_4ce6: add - IL_4ce7: add - IL_4ce8: mul - IL_4ce9: stloc.s V_4 - IL_4ceb: ldloc.2 - IL_4cec: ldc.i4.1 - IL_4ced: add - IL_4cee: stloc.2 - IL_4cef: ldloc.1 - IL_4cf0: ldc.i4.2 - IL_4cf1: sub - IL_4cf2: stloc.1 - IL_4cf3: ldloc.2 - IL_4cf4: ldloc.3 - IL_4cf5: ldc.i4.1 - IL_4cf6: sub - IL_4cf7: ldloc.s V_4 - IL_4cf9: sub - IL_4cfa: add - IL_4cfb: stloc.2 - IL_4cfc: ldloc.s V_5 - IL_4cfe: ldc.i4.1 - IL_4cff: add - IL_4d00: stloc.s V_5 - IL_4d02: ldloc.2 - IL_4d03: ldc.i4.1 - IL_4d04: add - IL_4d05: stloc.2 - IL_4d06: ldloc.1 - IL_4d07: ldloc.2 - IL_4d08: bgt.s IL_4d44 - IL_4d0a: ldloc.1 - IL_4d0b: ldloc.2 - IL_4d0c: ldloc.3 - IL_4d0d: sub - IL_4d0e: add - IL_4d0f: stloc.1 - IL_4d10: ldloc.s V_4 - IL_4d12: ldc.i4.1 - IL_4d13: add - IL_4d14: stloc.s V_4 - IL_4d16: ldloc.s V_5 - IL_4d18: ldc.i4.1 - IL_4d19: sub - IL_4d1a: stloc.s V_5 - IL_4d1c: ldloc.s V_5 - IL_4d1e: ldloc.s V_4 - IL_4d20: ldloc.3 - IL_4d21: ldc.i4.1 - IL_4d22: sub - IL_4d23: add - IL_4d24: mul - IL_4d25: stloc.s V_5 - IL_4d27: ldloc.2 - IL_4d28: ldc.i4.1 - IL_4d29: sub - IL_4d2a: stloc.2 - IL_4d2b: ldloc.1 - IL_4d2c: ldloc.s V_5 - IL_4d2e: sub - IL_4d2f: stloc.1 - IL_4d30: ldloc.s V_4 - IL_4d32: ldloc.3 - IL_4d33: ldc.i4.2 - IL_4d34: add - IL_4d35: ldloc.2 - IL_4d36: add - IL_4d37: add - IL_4d38: stloc.s V_4 - IL_4d3a: ldloc.1 - IL_4d3b: ldc.i4.1 - IL_4d3c: add - IL_4d3d: stloc.1 - IL_4d3e: ldloc.1 - IL_4d3f: ldc.i4.1 - IL_4d40: sub - IL_4d41: stloc.1 - IL_4d42: br.s IL_4d7b - IL_4d44: ldloc.2 - IL_4d45: ldloc.3 - IL_4d46: ldloc.s V_4 - IL_4d48: add - IL_4d49: mul - IL_4d4a: stloc.2 - IL_4d4b: ldloc.s V_5 - IL_4d4d: ldc.i4.1 - IL_4d4e: add - IL_4d4f: stloc.s V_5 - IL_4d51: ldloc.3 - IL_4d52: ldc.i4.m1 - IL_4d53: add - IL_4d54: stloc.3 - IL_4d55: ldloc.s V_4 - IL_4d57: ldloc.s V_5 - IL_4d59: ldloc.1 - IL_4d5a: ldc.i4.1 - IL_4d5b: add - IL_4d5c: mul - IL_4d5d: add - IL_4d5e: stloc.s V_4 - IL_4d60: ldloc.2 - IL_4d61: ldc.i4.1 - IL_4d62: add - IL_4d63: stloc.2 - IL_4d64: ldloc.1 - IL_4d65: ldc.i4.2 - IL_4d66: sub - IL_4d67: stloc.1 - IL_4d68: ldloc.2 - IL_4d69: ldloc.3 - IL_4d6a: ldc.i4.1 - IL_4d6b: sub - IL_4d6c: ldloc.s V_4 - IL_4d6e: mul - IL_4d6f: mul - IL_4d70: stloc.2 - IL_4d71: ldloc.s V_5 - IL_4d73: ldc.i4.1 - IL_4d74: add - IL_4d75: stloc.s V_5 - IL_4d77: ldloc.2 - IL_4d78: ldc.i4.1 - IL_4d79: add - IL_4d7a: stloc.2 - IL_4d7b: ldloc.1 - IL_4d7c: ldloc.2 - IL_4d7d: blt.s IL_4db9 - IL_4d7f: ldloc.1 - IL_4d80: ldloc.2 - IL_4d81: ldloc.3 - IL_4d82: mul - IL_4d83: add - IL_4d84: stloc.1 - IL_4d85: ldloc.s V_4 - IL_4d87: ldc.i4.1 - IL_4d88: add - IL_4d89: stloc.s V_4 - IL_4d8b: ldloc.s V_5 - IL_4d8d: ldc.i4.1 - IL_4d8e: sub - IL_4d8f: stloc.s V_5 - IL_4d91: ldloc.s V_5 - IL_4d93: ldloc.s V_4 - IL_4d95: ldloc.3 - IL_4d96: ldc.i4.1 - IL_4d97: sub - IL_4d98: sub - IL_4d99: add - IL_4d9a: stloc.s V_5 - IL_4d9c: ldloc.2 - IL_4d9d: ldc.i4.1 - IL_4d9e: sub - IL_4d9f: stloc.2 - IL_4da0: ldloc.1 - IL_4da1: ldloc.s V_5 - IL_4da3: sub - IL_4da4: stloc.1 - IL_4da5: ldloc.s V_4 - IL_4da7: ldloc.3 - IL_4da8: ldc.i4.2 - IL_4da9: add - IL_4daa: ldloc.2 - IL_4dab: sub - IL_4dac: mul - IL_4dad: stloc.s V_4 - IL_4daf: ldloc.1 - IL_4db0: ldc.i4.1 - IL_4db1: add - IL_4db2: stloc.1 - IL_4db3: ldloc.1 - IL_4db4: ldc.i4.1 - IL_4db5: sub - IL_4db6: stloc.1 - IL_4db7: br.s IL_4df0 - IL_4db9: ldloc.2 - IL_4dba: ldloc.3 - IL_4dbb: ldloc.s V_4 - IL_4dbd: mul - IL_4dbe: add - IL_4dbf: stloc.2 - IL_4dc0: ldloc.s V_5 - IL_4dc2: ldc.i4.1 - IL_4dc3: add - IL_4dc4: stloc.s V_5 - IL_4dc6: ldloc.3 - IL_4dc7: ldc.i4.m1 - IL_4dc8: add - IL_4dc9: stloc.3 - IL_4dca: ldloc.s V_4 - IL_4dcc: ldloc.s V_5 - IL_4dce: ldloc.1 - IL_4dcf: ldc.i4.1 - IL_4dd0: add - IL_4dd1: sub - IL_4dd2: sub - IL_4dd3: stloc.s V_4 - IL_4dd5: ldloc.2 - IL_4dd6: ldc.i4.1 - IL_4dd7: add - IL_4dd8: stloc.2 - IL_4dd9: ldloc.1 - IL_4dda: ldc.i4.2 - IL_4ddb: sub - IL_4ddc: stloc.1 - IL_4ddd: ldloc.2 - IL_4dde: ldloc.3 - IL_4ddf: ldc.i4.1 - IL_4de0: sub - IL_4de1: ldloc.s V_4 - IL_4de3: add - IL_4de4: add - IL_4de5: stloc.2 - IL_4de6: ldloc.s V_5 - IL_4de8: ldc.i4.1 - IL_4de9: add - IL_4dea: stloc.s V_5 - IL_4dec: ldloc.2 - IL_4ded: ldc.i4.1 - IL_4dee: add - IL_4def: stloc.2 - IL_4df0: ldloc.1 - IL_4df1: ldloc.2 - IL_4df2: ble.s IL_4e2e - IL_4df4: ldloc.1 - IL_4df5: ldloc.2 - IL_4df6: ldloc.3 - IL_4df7: mul - IL_4df8: mul - IL_4df9: stloc.1 - IL_4dfa: ldloc.s V_4 - IL_4dfc: ldc.i4.1 - IL_4dfd: add - IL_4dfe: stloc.s V_4 - IL_4e00: ldloc.s V_5 - IL_4e02: ldc.i4.1 - IL_4e03: sub - IL_4e04: stloc.s V_5 - IL_4e06: ldloc.s V_5 - IL_4e08: ldloc.s V_4 - IL_4e0a: ldloc.3 - IL_4e0b: ldc.i4.1 - IL_4e0c: sub - IL_4e0d: mul - IL_4e0e: sub - IL_4e0f: stloc.s V_5 - IL_4e11: ldloc.2 - IL_4e12: ldc.i4.1 - IL_4e13: sub - IL_4e14: stloc.2 - IL_4e15: ldloc.1 - IL_4e16: ldloc.s V_5 - IL_4e18: sub - IL_4e19: stloc.1 - IL_4e1a: ldloc.s V_4 - IL_4e1c: ldloc.3 - IL_4e1d: ldc.i4.2 - IL_4e1e: add - IL_4e1f: ldloc.2 - IL_4e20: mul - IL_4e21: add - IL_4e22: stloc.s V_4 - IL_4e24: ldloc.1 - IL_4e25: ldc.i4.1 - IL_4e26: add - IL_4e27: stloc.1 - IL_4e28: ldloc.1 - IL_4e29: ldc.i4.1 - IL_4e2a: sub - IL_4e2b: stloc.1 - IL_4e2c: br.s IL_4e65 - IL_4e2e: ldloc.2 - IL_4e2f: ldloc.3 - IL_4e30: ldloc.s V_4 - IL_4e32: add - IL_4e33: sub - IL_4e34: stloc.2 - IL_4e35: ldloc.s V_5 - IL_4e37: ldc.i4.1 - IL_4e38: add - IL_4e39: stloc.s V_5 - IL_4e3b: ldloc.3 - IL_4e3c: ldc.i4.m1 - IL_4e3d: add - IL_4e3e: stloc.3 - IL_4e3f: ldloc.s V_4 - IL_4e41: ldloc.s V_5 - IL_4e43: ldloc.1 - IL_4e44: ldc.i4.1 - IL_4e45: add - IL_4e46: mul - IL_4e47: mul - IL_4e48: stloc.s V_4 - IL_4e4a: ldloc.2 - IL_4e4b: ldc.i4.1 - IL_4e4c: add - IL_4e4d: stloc.2 - IL_4e4e: ldloc.1 - IL_4e4f: ldc.i4.2 - IL_4e50: sub - IL_4e51: stloc.1 - IL_4e52: ldloc.2 - IL_4e53: ldloc.3 - IL_4e54: ldc.i4.1 - IL_4e55: sub - IL_4e56: ldloc.s V_4 - IL_4e58: sub - IL_4e59: sub - IL_4e5a: stloc.2 - IL_4e5b: ldloc.s V_5 - IL_4e5d: ldc.i4.1 - IL_4e5e: add - IL_4e5f: stloc.s V_5 - IL_4e61: ldloc.2 - IL_4e62: ldc.i4.1 - IL_4e63: add - IL_4e64: stloc.2 - IL_4e65: ldloc.3 - IL_4e66: ldloc.2 - IL_4e67: bne.un.s IL_4ea3 - IL_4e69: ldloc.1 - IL_4e6a: ldloc.2 - IL_4e6b: ldloc.3 - IL_4e6c: add - IL_4e6d: sub - IL_4e6e: stloc.1 - IL_4e6f: ldloc.s V_4 - IL_4e71: ldc.i4.1 - IL_4e72: add - IL_4e73: stloc.s V_4 - IL_4e75: ldloc.s V_5 - IL_4e77: ldc.i4.1 - IL_4e78: sub - IL_4e79: stloc.s V_5 - IL_4e7b: ldloc.s V_5 - IL_4e7d: ldloc.s V_4 - IL_4e7f: ldloc.3 - IL_4e80: ldc.i4.1 - IL_4e81: sub - IL_4e82: mul - IL_4e83: sub - IL_4e84: stloc.s V_5 - IL_4e86: ldloc.2 - IL_4e87: ldc.i4.1 - IL_4e88: sub - IL_4e89: stloc.2 - IL_4e8a: ldloc.1 - IL_4e8b: ldloc.s V_5 - IL_4e8d: sub - IL_4e8e: stloc.1 - IL_4e8f: ldloc.s V_4 - IL_4e91: ldloc.3 - IL_4e92: ldc.i4.2 - IL_4e93: add - IL_4e94: ldloc.2 - IL_4e95: mul - IL_4e96: sub - IL_4e97: stloc.s V_4 - IL_4e99: ldloc.1 - IL_4e9a: ldc.i4.1 - IL_4e9b: add - IL_4e9c: stloc.1 - IL_4e9d: ldloc.1 - IL_4e9e: ldc.i4.1 - IL_4e9f: sub - IL_4ea0: stloc.1 - IL_4ea1: br.s IL_4eda - IL_4ea3: ldloc.2 - IL_4ea4: ldloc.3 - IL_4ea5: ldloc.s V_4 - IL_4ea7: sub - IL_4ea8: sub - IL_4ea9: stloc.2 - IL_4eaa: ldloc.s V_5 - IL_4eac: ldc.i4.1 - IL_4ead: add - IL_4eae: stloc.s V_5 - IL_4eb0: ldloc.3 - IL_4eb1: ldc.i4.m1 - IL_4eb2: add - IL_4eb3: stloc.3 - IL_4eb4: ldloc.s V_4 - IL_4eb6: ldloc.s V_5 - IL_4eb8: ldloc.1 - IL_4eb9: ldc.i4.1 - IL_4eba: add - IL_4ebb: add - IL_4ebc: mul - IL_4ebd: stloc.s V_4 - IL_4ebf: ldloc.2 - IL_4ec0: ldc.i4.1 - IL_4ec1: add - IL_4ec2: stloc.2 - IL_4ec3: ldloc.1 - IL_4ec4: ldc.i4.2 - IL_4ec5: sub - IL_4ec6: stloc.1 - IL_4ec7: ldloc.2 - IL_4ec8: ldloc.3 - IL_4ec9: ldc.i4.1 - IL_4eca: sub - IL_4ecb: ldloc.s V_4 - IL_4ecd: add - IL_4ece: sub - IL_4ecf: stloc.2 - IL_4ed0: ldloc.s V_5 - IL_4ed2: ldc.i4.1 - IL_4ed3: add - IL_4ed4: stloc.s V_5 - IL_4ed6: ldloc.2 - IL_4ed7: ldc.i4.1 - IL_4ed8: add - IL_4ed9: stloc.2 - IL_4eda: ldloc.1 - IL_4edb: ldloc.2 - IL_4edc: ble.s IL_4f18 - IL_4ede: ldloc.1 - IL_4edf: ldloc.2 - IL_4ee0: ldloc.3 - IL_4ee1: add - IL_4ee2: mul - IL_4ee3: stloc.1 - IL_4ee4: ldloc.s V_4 - IL_4ee6: ldc.i4.1 - IL_4ee7: add - IL_4ee8: stloc.s V_4 - IL_4eea: ldloc.s V_5 - IL_4eec: ldc.i4.1 - IL_4eed: sub - IL_4eee: stloc.s V_5 - IL_4ef0: ldloc.s V_5 - IL_4ef2: ldloc.s V_4 - IL_4ef4: ldloc.3 - IL_4ef5: ldc.i4.1 - IL_4ef6: sub - IL_4ef7: add - IL_4ef8: add - IL_4ef9: stloc.s V_5 - IL_4efb: ldloc.2 - IL_4efc: ldc.i4.1 - IL_4efd: sub - IL_4efe: stloc.2 - IL_4eff: ldloc.1 - IL_4f00: ldloc.s V_5 - IL_4f02: sub - IL_4f03: stloc.1 - IL_4f04: ldloc.s V_4 - IL_4f06: ldloc.3 - IL_4f07: ldc.i4.2 - IL_4f08: add - IL_4f09: ldloc.2 - IL_4f0a: add - IL_4f0b: add - IL_4f0c: stloc.s V_4 - IL_4f0e: ldloc.1 - IL_4f0f: ldc.i4.1 - IL_4f10: add - IL_4f11: stloc.1 - IL_4f12: ldloc.1 - IL_4f13: ldc.i4.1 - IL_4f14: sub - IL_4f15: stloc.1 - IL_4f16: br.s IL_4f4f - IL_4f18: ldloc.2 - IL_4f19: ldloc.3 - IL_4f1a: ldloc.s V_4 - IL_4f1c: add - IL_4f1d: add - IL_4f1e: stloc.2 - IL_4f1f: ldloc.s V_5 - IL_4f21: ldc.i4.1 - IL_4f22: add - IL_4f23: stloc.s V_5 - IL_4f25: ldloc.3 - IL_4f26: ldc.i4.m1 - IL_4f27: add - IL_4f28: stloc.3 - IL_4f29: ldloc.s V_4 - IL_4f2b: ldloc.s V_5 - IL_4f2d: ldloc.1 - IL_4f2e: ldc.i4.1 - IL_4f2f: add - IL_4f30: mul - IL_4f31: add - IL_4f32: stloc.s V_4 - IL_4f34: ldloc.2 - IL_4f35: ldc.i4.1 - IL_4f36: add - IL_4f37: stloc.2 - IL_4f38: ldloc.1 - IL_4f39: ldc.i4.2 - IL_4f3a: sub - IL_4f3b: stloc.1 - IL_4f3c: ldloc.2 - IL_4f3d: ldloc.3 - IL_4f3e: ldc.i4.1 - IL_4f3f: sub - IL_4f40: ldloc.s V_4 - IL_4f42: sub - IL_4f43: add - IL_4f44: stloc.2 - IL_4f45: ldloc.s V_5 - IL_4f47: ldc.i4.1 - IL_4f48: add - IL_4f49: stloc.s V_5 - IL_4f4b: ldloc.2 - IL_4f4c: ldc.i4.1 - IL_4f4d: add - IL_4f4e: stloc.2 - IL_4f4f: ldloc.1 - IL_4f50: ldloc.2 - IL_4f51: ble.s IL_4f8d - IL_4f53: ldloc.1 - IL_4f54: ldloc.2 - IL_4f55: ldloc.3 - IL_4f56: add - IL_4f57: sub - IL_4f58: stloc.1 - IL_4f59: ldloc.s V_4 - IL_4f5b: ldc.i4.1 - IL_4f5c: add - IL_4f5d: stloc.s V_4 - IL_4f5f: ldloc.s V_5 - IL_4f61: ldc.i4.1 - IL_4f62: sub - IL_4f63: stloc.s V_5 - IL_4f65: ldloc.s V_5 - IL_4f67: ldloc.s V_4 - IL_4f69: ldloc.3 - IL_4f6a: ldc.i4.1 - IL_4f6b: sub - IL_4f6c: mul - IL_4f6d: sub - IL_4f6e: stloc.s V_5 - IL_4f70: ldloc.2 - IL_4f71: ldc.i4.1 - IL_4f72: sub - IL_4f73: stloc.2 - IL_4f74: ldloc.1 - IL_4f75: ldloc.s V_5 - IL_4f77: sub - IL_4f78: stloc.1 - IL_4f79: ldloc.s V_4 - IL_4f7b: ldloc.3 - IL_4f7c: ldc.i4.2 - IL_4f7d: add - IL_4f7e: ldloc.2 - IL_4f7f: mul - IL_4f80: mul - IL_4f81: stloc.s V_4 - IL_4f83: ldloc.1 - IL_4f84: ldc.i4.1 - IL_4f85: add - IL_4f86: stloc.1 - IL_4f87: ldloc.1 - IL_4f88: ldc.i4.1 - IL_4f89: sub - IL_4f8a: stloc.1 - IL_4f8b: br.s IL_4fc4 - IL_4f8d: ldloc.2 - IL_4f8e: ldloc.3 - IL_4f8f: ldloc.s V_4 - IL_4f91: mul - IL_4f92: sub - IL_4f93: stloc.2 - IL_4f94: ldloc.s V_5 - IL_4f96: ldc.i4.1 - IL_4f97: add - IL_4f98: stloc.s V_5 - IL_4f9a: ldloc.3 - IL_4f9b: ldc.i4.m1 - IL_4f9c: add - IL_4f9d: stloc.3 - IL_4f9e: ldloc.s V_4 - IL_4fa0: ldloc.s V_5 - IL_4fa2: ldloc.1 - IL_4fa3: ldc.i4.1 - IL_4fa4: add - IL_4fa5: sub - IL_4fa6: mul - IL_4fa7: stloc.s V_4 - IL_4fa9: ldloc.2 - IL_4faa: ldc.i4.1 - IL_4fab: add - IL_4fac: stloc.2 - IL_4fad: ldloc.1 - IL_4fae: ldc.i4.2 - IL_4faf: sub - IL_4fb0: stloc.1 - IL_4fb1: ldloc.2 - IL_4fb2: ldloc.3 - IL_4fb3: ldc.i4.1 - IL_4fb4: sub - IL_4fb5: ldloc.s V_4 - IL_4fb7: add - IL_4fb8: sub - IL_4fb9: stloc.2 - IL_4fba: ldloc.s V_5 - IL_4fbc: ldc.i4.1 - IL_4fbd: add - IL_4fbe: stloc.s V_5 - IL_4fc0: ldloc.2 - IL_4fc1: ldc.i4.1 - IL_4fc2: add - IL_4fc3: stloc.2 - IL_4fc4: ldloc.1 - IL_4fc5: ldloc.2 - IL_4fc6: bgt.s IL_5002 - IL_4fc8: ldloc.1 - IL_4fc9: ldloc.2 - IL_4fca: ldloc.3 - IL_4fcb: add - IL_4fcc: mul - IL_4fcd: stloc.1 - IL_4fce: ldloc.s V_4 - IL_4fd0: ldc.i4.1 - IL_4fd1: add - IL_4fd2: stloc.s V_4 - IL_4fd4: ldloc.s V_5 - IL_4fd6: ldc.i4.1 - IL_4fd7: sub - IL_4fd8: stloc.s V_5 - IL_4fda: ldloc.s V_5 - IL_4fdc: ldloc.s V_4 - IL_4fde: ldloc.3 - IL_4fdf: ldc.i4.1 - IL_4fe0: sub - IL_4fe1: sub - IL_4fe2: mul - IL_4fe3: stloc.s V_5 - IL_4fe5: ldloc.2 - IL_4fe6: ldc.i4.1 - IL_4fe7: sub - IL_4fe8: stloc.2 - IL_4fe9: ldloc.1 - IL_4fea: ldloc.s V_5 - IL_4fec: sub - IL_4fed: stloc.1 - IL_4fee: ldloc.s V_4 - IL_4ff0: ldloc.3 - IL_4ff1: ldc.i4.2 - IL_4ff2: add - IL_4ff3: ldloc.2 - IL_4ff4: sub - IL_4ff5: add - IL_4ff6: stloc.s V_4 - IL_4ff8: ldloc.1 - IL_4ff9: ldc.i4.1 - IL_4ffa: add - IL_4ffb: stloc.1 - IL_4ffc: ldloc.1 - IL_4ffd: ldc.i4.1 - IL_4ffe: sub - IL_4fff: stloc.1 - IL_5000: br.s IL_5039 - IL_5002: ldloc.2 - IL_5003: ldloc.3 - IL_5004: ldloc.s V_4 - IL_5006: add - IL_5007: mul - IL_5008: stloc.2 - IL_5009: ldloc.s V_5 - IL_500b: ldc.i4.1 - IL_500c: add - IL_500d: stloc.s V_5 - IL_500f: ldloc.3 - IL_5010: ldc.i4.m1 - IL_5011: add - IL_5012: stloc.3 - IL_5013: ldloc.s V_4 - IL_5015: ldloc.s V_5 - IL_5017: ldloc.1 - IL_5018: ldc.i4.1 - IL_5019: add - IL_501a: mul - IL_501b: sub - IL_501c: stloc.s V_4 - IL_501e: ldloc.2 - IL_501f: ldc.i4.1 - IL_5020: add - IL_5021: stloc.2 - IL_5022: ldloc.1 - IL_5023: ldc.i4.2 - IL_5024: sub - IL_5025: stloc.1 - IL_5026: ldloc.2 - IL_5027: ldloc.3 - IL_5028: ldc.i4.1 - IL_5029: sub - IL_502a: ldloc.s V_4 - IL_502c: sub - IL_502d: mul - IL_502e: stloc.2 - IL_502f: ldloc.s V_5 - IL_5031: ldc.i4.1 - IL_5032: add - IL_5033: stloc.s V_5 - IL_5035: ldloc.2 - IL_5036: ldc.i4.1 - IL_5037: add - IL_5038: stloc.2 - IL_5039: ldloc.1 - IL_503a: ldloc.2 - IL_503b: bge.s IL_5077 - IL_503d: ldloc.1 - IL_503e: ldloc.2 - IL_503f: ldloc.3 - IL_5040: mul - IL_5041: sub - IL_5042: stloc.1 - IL_5043: ldloc.s V_4 - IL_5045: ldc.i4.1 - IL_5046: add - IL_5047: stloc.s V_4 - IL_5049: ldloc.s V_5 - IL_504b: ldc.i4.1 - IL_504c: sub - IL_504d: stloc.s V_5 - IL_504f: ldloc.s V_5 - IL_5051: ldloc.s V_4 - IL_5053: ldloc.3 - IL_5054: ldc.i4.1 - IL_5055: sub - IL_5056: sub - IL_5057: mul - IL_5058: stloc.s V_5 - IL_505a: ldloc.2 - IL_505b: ldc.i4.1 - IL_505c: sub - IL_505d: stloc.2 - IL_505e: ldloc.1 - IL_505f: ldloc.s V_5 - IL_5061: sub - IL_5062: stloc.1 - IL_5063: ldloc.s V_4 - IL_5065: ldloc.3 - IL_5066: ldc.i4.2 - IL_5067: add - IL_5068: ldloc.2 - IL_5069: sub - IL_506a: sub - IL_506b: stloc.s V_4 - IL_506d: ldloc.1 - IL_506e: ldc.i4.1 - IL_506f: add - IL_5070: stloc.1 - IL_5071: ldloc.1 - IL_5072: ldc.i4.1 - IL_5073: sub - IL_5074: stloc.1 - IL_5075: br.s IL_50ae - IL_5077: ldloc.2 - IL_5078: ldloc.3 - IL_5079: ldloc.s V_4 - IL_507b: sub - IL_507c: mul - IL_507d: stloc.2 - IL_507e: ldloc.s V_5 - IL_5080: ldc.i4.1 - IL_5081: add - IL_5082: stloc.s V_5 - IL_5084: ldloc.3 - IL_5085: ldc.i4.m1 - IL_5086: add - IL_5087: stloc.3 - IL_5088: ldloc.s V_4 - IL_508a: ldloc.s V_5 - IL_508c: ldloc.1 - IL_508d: ldc.i4.1 - IL_508e: add - IL_508f: mul - IL_5090: sub - IL_5091: stloc.s V_4 - IL_5093: ldloc.2 - IL_5094: ldc.i4.1 - IL_5095: add - IL_5096: stloc.2 - IL_5097: ldloc.1 - IL_5098: ldc.i4.2 - IL_5099: sub - IL_509a: stloc.1 - IL_509b: ldloc.2 - IL_509c: ldloc.3 - IL_509d: ldc.i4.1 - IL_509e: sub - IL_509f: ldloc.s V_4 - IL_50a1: mul - IL_50a2: mul - IL_50a3: stloc.2 - IL_50a4: ldloc.s V_5 - IL_50a6: ldc.i4.1 - IL_50a7: add - IL_50a8: stloc.s V_5 - IL_50aa: ldloc.2 - IL_50ab: ldc.i4.1 - IL_50ac: add - IL_50ad: stloc.2 - IL_50ae: ldloc.1 - IL_50af: ldloc.2 - IL_50b0: ble.s IL_50ec - IL_50b2: ldloc.1 - IL_50b3: ldloc.2 - IL_50b4: ldloc.3 - IL_50b5: mul - IL_50b6: add - IL_50b7: stloc.1 - IL_50b8: ldloc.s V_4 - IL_50ba: ldc.i4.1 - IL_50bb: add - IL_50bc: stloc.s V_4 - IL_50be: ldloc.s V_5 - IL_50c0: ldc.i4.1 - IL_50c1: sub - IL_50c2: stloc.s V_5 - IL_50c4: ldloc.s V_5 - IL_50c6: ldloc.s V_4 - IL_50c8: ldloc.3 - IL_50c9: ldc.i4.1 - IL_50ca: sub - IL_50cb: mul - IL_50cc: sub - IL_50cd: stloc.s V_5 - IL_50cf: ldloc.2 - IL_50d0: ldc.i4.1 - IL_50d1: sub - IL_50d2: stloc.2 - IL_50d3: ldloc.1 - IL_50d4: ldloc.s V_5 - IL_50d6: sub - IL_50d7: stloc.1 - IL_50d8: ldloc.s V_4 - IL_50da: ldloc.3 - IL_50db: ldc.i4.2 - IL_50dc: add - IL_50dd: ldloc.2 - IL_50de: mul - IL_50df: add - IL_50e0: stloc.s V_4 - IL_50e2: ldloc.1 - IL_50e3: ldc.i4.1 - IL_50e4: add - IL_50e5: stloc.1 - IL_50e6: ldloc.1 - IL_50e7: ldc.i4.1 - IL_50e8: sub - IL_50e9: stloc.1 - IL_50ea: br.s IL_5123 - IL_50ec: ldloc.2 - IL_50ed: ldloc.3 - IL_50ee: ldloc.s V_4 - IL_50f0: add - IL_50f1: sub - IL_50f2: stloc.2 - IL_50f3: ldloc.s V_5 - IL_50f5: ldc.i4.1 - IL_50f6: add - IL_50f7: stloc.s V_5 - IL_50f9: ldloc.3 - IL_50fa: ldc.i4.m1 - IL_50fb: add - IL_50fc: stloc.3 - IL_50fd: ldloc.s V_4 - IL_50ff: ldloc.s V_5 - IL_5101: ldloc.1 - IL_5102: ldc.i4.1 - IL_5103: add - IL_5104: mul - IL_5105: mul - IL_5106: stloc.s V_4 - IL_5108: ldloc.2 - IL_5109: ldc.i4.1 - IL_510a: add - IL_510b: stloc.2 - IL_510c: ldloc.1 - IL_510d: ldc.i4.2 - IL_510e: sub - IL_510f: stloc.1 - IL_5110: ldloc.2 - IL_5111: ldloc.3 - IL_5112: ldc.i4.1 - IL_5113: sub - IL_5114: ldloc.s V_4 - IL_5116: add - IL_5117: sub - IL_5118: stloc.2 - IL_5119: ldloc.s V_5 - IL_511b: ldc.i4.1 - IL_511c: add - IL_511d: stloc.s V_5 - IL_511f: ldloc.2 - IL_5120: ldc.i4.1 - IL_5121: add - IL_5122: stloc.2 - IL_5123: ldloc.1 - IL_5124: ldloc.2 - IL_5125: ble.s IL_5161 - IL_5127: ldloc.1 - IL_5128: ldloc.2 - IL_5129: ldloc.3 - IL_512a: sub - IL_512b: mul - IL_512c: stloc.1 - IL_512d: ldloc.s V_4 - IL_512f: ldc.i4.1 - IL_5130: add - IL_5131: stloc.s V_4 - IL_5133: ldloc.s V_5 - IL_5135: ldc.i4.1 - IL_5136: sub - IL_5137: stloc.s V_5 - IL_5139: ldloc.s V_5 - IL_513b: ldloc.s V_4 - IL_513d: ldloc.3 - IL_513e: ldc.i4.1 - IL_513f: sub - IL_5140: sub - IL_5141: mul - IL_5142: stloc.s V_5 - IL_5144: ldloc.2 - IL_5145: ldc.i4.1 - IL_5146: sub - IL_5147: stloc.2 - IL_5148: ldloc.1 - IL_5149: ldloc.s V_5 - IL_514b: sub - IL_514c: stloc.1 - IL_514d: ldloc.s V_4 - IL_514f: ldloc.3 - IL_5150: ldc.i4.2 - IL_5151: add - IL_5152: ldloc.2 - IL_5153: sub - IL_5154: sub - IL_5155: stloc.s V_4 - IL_5157: ldloc.1 - IL_5158: ldc.i4.1 - IL_5159: add - IL_515a: stloc.1 - IL_515b: ldloc.1 - IL_515c: ldc.i4.1 - IL_515d: sub - IL_515e: stloc.1 - IL_515f: br.s IL_5198 - IL_5161: ldloc.2 - IL_5162: ldloc.3 - IL_5163: ldloc.s V_4 - IL_5165: sub - IL_5166: mul - IL_5167: stloc.2 - IL_5168: ldloc.s V_5 - IL_516a: ldc.i4.1 - IL_516b: add - IL_516c: stloc.s V_5 - IL_516e: ldloc.3 - IL_516f: ldc.i4.m1 - IL_5170: add - IL_5171: stloc.3 - IL_5172: ldloc.s V_4 - IL_5174: ldloc.s V_5 - IL_5176: ldloc.1 - IL_5177: ldc.i4.1 - IL_5178: add - IL_5179: sub - IL_517a: sub - IL_517b: stloc.s V_4 - IL_517d: ldloc.2 - IL_517e: ldc.i4.1 - IL_517f: add - IL_5180: stloc.2 - IL_5181: ldloc.1 - IL_5182: ldc.i4.2 - IL_5183: sub - IL_5184: stloc.1 - IL_5185: ldloc.2 - IL_5186: ldloc.3 - IL_5187: ldc.i4.1 - IL_5188: sub - IL_5189: ldloc.s V_4 - IL_518b: add - IL_518c: mul - IL_518d: stloc.2 - IL_518e: ldloc.s V_5 - IL_5190: ldc.i4.1 - IL_5191: add - IL_5192: stloc.s V_5 - IL_5194: ldloc.2 - IL_5195: ldc.i4.1 - IL_5196: add - IL_5197: stloc.2 - IL_5198: ldloc.1 - IL_5199: ldloc.2 - IL_519a: beq.s IL_51d6 - IL_519c: ldloc.1 - IL_519d: ldloc.2 - IL_519e: ldloc.3 - IL_519f: mul - IL_51a0: sub - IL_51a1: stloc.1 - IL_51a2: ldloc.s V_4 - IL_51a4: ldc.i4.1 - IL_51a5: add - IL_51a6: stloc.s V_4 - IL_51a8: ldloc.s V_5 - IL_51aa: ldc.i4.1 - IL_51ab: sub - IL_51ac: stloc.s V_5 - IL_51ae: ldloc.s V_5 - IL_51b0: ldloc.s V_4 - IL_51b2: ldloc.3 - IL_51b3: ldc.i4.1 - IL_51b4: sub - IL_51b5: sub - IL_51b6: sub - IL_51b7: stloc.s V_5 - IL_51b9: ldloc.2 - IL_51ba: ldc.i4.1 - IL_51bb: sub - IL_51bc: stloc.2 - IL_51bd: ldloc.1 - IL_51be: ldloc.s V_5 - IL_51c0: sub - IL_51c1: stloc.1 - IL_51c2: ldloc.s V_4 - IL_51c4: ldloc.3 - IL_51c5: ldc.i4.2 - IL_51c6: add - IL_51c7: ldloc.2 - IL_51c8: sub - IL_51c9: add - IL_51ca: stloc.s V_4 - IL_51cc: ldloc.1 - IL_51cd: ldc.i4.1 - IL_51ce: add - IL_51cf: stloc.1 - IL_51d0: ldloc.1 - IL_51d1: ldc.i4.1 - IL_51d2: sub - IL_51d3: stloc.1 - IL_51d4: br.s IL_520d - IL_51d6: ldloc.2 - IL_51d7: ldloc.3 - IL_51d8: ldloc.s V_4 - IL_51da: add - IL_51db: sub - IL_51dc: stloc.2 - IL_51dd: ldloc.s V_5 - IL_51df: ldc.i4.1 - IL_51e0: add - IL_51e1: stloc.s V_5 - IL_51e3: ldloc.3 - IL_51e4: ldc.i4.m1 - IL_51e5: add - IL_51e6: stloc.3 - IL_51e7: ldloc.s V_4 - IL_51e9: ldloc.s V_5 - IL_51eb: ldloc.1 - IL_51ec: ldc.i4.1 - IL_51ed: add - IL_51ee: mul - IL_51ef: sub - IL_51f0: stloc.s V_4 - IL_51f2: ldloc.2 - IL_51f3: ldc.i4.1 - IL_51f4: add - IL_51f5: stloc.2 - IL_51f6: ldloc.1 - IL_51f7: ldc.i4.2 - IL_51f8: sub - IL_51f9: stloc.1 - IL_51fa: ldloc.2 - IL_51fb: ldloc.3 - IL_51fc: ldc.i4.1 - IL_51fd: sub - IL_51fe: ldloc.s V_4 - IL_5200: add - IL_5201: sub - IL_5202: stloc.2 - IL_5203: ldloc.s V_5 - IL_5205: ldc.i4.1 - IL_5206: add - IL_5207: stloc.s V_5 - IL_5209: ldloc.2 - IL_520a: ldc.i4.1 - IL_520b: add - IL_520c: stloc.2 - IL_520d: ldloc.1 - IL_520e: ldloc.2 - IL_520f: beq.s IL_524b - IL_5211: ldloc.1 - IL_5212: ldloc.2 - IL_5213: ldloc.3 - IL_5214: mul - IL_5215: sub - IL_5216: stloc.1 - IL_5217: ldloc.s V_4 - IL_5219: ldc.i4.1 - IL_521a: add - IL_521b: stloc.s V_4 - IL_521d: ldloc.s V_5 - IL_521f: ldc.i4.1 - IL_5220: sub - IL_5221: stloc.s V_5 - IL_5223: ldloc.s V_5 - IL_5225: ldloc.s V_4 - IL_5227: ldloc.3 - IL_5228: ldc.i4.1 - IL_5229: sub - IL_522a: add - IL_522b: add - IL_522c: stloc.s V_5 - IL_522e: ldloc.2 - IL_522f: ldc.i4.1 - IL_5230: sub - IL_5231: stloc.2 - IL_5232: ldloc.1 - IL_5233: ldloc.s V_5 - IL_5235: sub - IL_5236: stloc.1 - IL_5237: ldloc.s V_4 - IL_5239: ldloc.3 - IL_523a: ldc.i4.2 - IL_523b: add - IL_523c: ldloc.2 - IL_523d: add - IL_523e: add - IL_523f: stloc.s V_4 - IL_5241: ldloc.1 - IL_5242: ldc.i4.1 - IL_5243: add - IL_5244: stloc.1 - IL_5245: ldloc.1 - IL_5246: ldc.i4.1 - IL_5247: sub - IL_5248: stloc.1 - IL_5249: br.s IL_5282 - IL_524b: ldloc.2 - IL_524c: ldloc.3 - IL_524d: ldloc.s V_4 - IL_524f: add - IL_5250: add - IL_5251: stloc.2 - IL_5252: ldloc.s V_5 - IL_5254: ldc.i4.1 - IL_5255: add - IL_5256: stloc.s V_5 - IL_5258: ldloc.3 - IL_5259: ldc.i4.m1 - IL_525a: add - IL_525b: stloc.3 - IL_525c: ldloc.s V_4 - IL_525e: ldloc.s V_5 - IL_5260: ldloc.1 - IL_5261: ldc.i4.1 - IL_5262: add - IL_5263: mul - IL_5264: add - IL_5265: stloc.s V_4 - IL_5267: ldloc.2 - IL_5268: ldc.i4.1 - IL_5269: add - IL_526a: stloc.2 - IL_526b: ldloc.1 - IL_526c: ldc.i4.2 - IL_526d: sub - IL_526e: stloc.1 - IL_526f: ldloc.2 - IL_5270: ldloc.3 - IL_5271: ldc.i4.1 - IL_5272: sub - IL_5273: ldloc.s V_4 - IL_5275: sub - IL_5276: add - IL_5277: stloc.2 - IL_5278: ldloc.s V_5 - IL_527a: ldc.i4.1 - IL_527b: add - IL_527c: stloc.s V_5 - IL_527e: ldloc.2 - IL_527f: ldc.i4.1 - IL_5280: add - IL_5281: stloc.2 - IL_5282: ldloc.1 - IL_5283: ldloc.2 - IL_5284: blt.s IL_52c0 - IL_5286: ldloc.1 - IL_5287: ldloc.2 - IL_5288: ldloc.3 - IL_5289: mul - IL_528a: sub - IL_528b: stloc.1 - IL_528c: ldloc.s V_4 - IL_528e: ldc.i4.1 - IL_528f: add - IL_5290: stloc.s V_4 - IL_5292: ldloc.s V_5 - IL_5294: ldc.i4.1 - IL_5295: sub - IL_5296: stloc.s V_5 - IL_5298: ldloc.s V_5 - IL_529a: ldloc.s V_4 - IL_529c: ldloc.3 - IL_529d: ldc.i4.1 - IL_529e: sub - IL_529f: add - IL_52a0: add - IL_52a1: stloc.s V_5 - IL_52a3: ldloc.2 - IL_52a4: ldc.i4.1 - IL_52a5: sub - IL_52a6: stloc.2 - IL_52a7: ldloc.1 - IL_52a8: ldloc.s V_5 - IL_52aa: sub - IL_52ab: stloc.1 - IL_52ac: ldloc.s V_4 - IL_52ae: ldloc.3 - IL_52af: ldc.i4.2 - IL_52b0: add - IL_52b1: ldloc.2 - IL_52b2: add - IL_52b3: sub - IL_52b4: stloc.s V_4 - IL_52b6: ldloc.1 - IL_52b7: ldc.i4.1 - IL_52b8: add - IL_52b9: stloc.1 - IL_52ba: ldloc.1 - IL_52bb: ldc.i4.1 - IL_52bc: sub - IL_52bd: stloc.1 - IL_52be: br.s IL_52f7 - IL_52c0: ldloc.2 - IL_52c1: ldloc.3 - IL_52c2: ldloc.s V_4 - IL_52c4: sub - IL_52c5: add - IL_52c6: stloc.2 - IL_52c7: ldloc.s V_5 - IL_52c9: ldc.i4.1 - IL_52ca: add - IL_52cb: stloc.s V_5 - IL_52cd: ldloc.3 - IL_52ce: ldc.i4.m1 - IL_52cf: add - IL_52d0: stloc.3 - IL_52d1: ldloc.s V_4 - IL_52d3: ldloc.s V_5 - IL_52d5: ldloc.1 - IL_52d6: ldc.i4.1 - IL_52d7: add - IL_52d8: sub - IL_52d9: add - IL_52da: stloc.s V_4 - IL_52dc: ldloc.2 - IL_52dd: ldc.i4.1 - IL_52de: add - IL_52df: stloc.2 - IL_52e0: ldloc.1 - IL_52e1: ldc.i4.2 - IL_52e2: sub - IL_52e3: stloc.1 - IL_52e4: ldloc.2 - IL_52e5: ldloc.3 - IL_52e6: ldc.i4.1 - IL_52e7: sub - IL_52e8: ldloc.s V_4 - IL_52ea: sub - IL_52eb: add - IL_52ec: stloc.2 - IL_52ed: ldloc.s V_5 - IL_52ef: ldc.i4.1 - IL_52f0: add - IL_52f1: stloc.s V_5 - IL_52f3: ldloc.2 - IL_52f4: ldc.i4.1 - IL_52f5: add - IL_52f6: stloc.2 - IL_52f7: ldloc.1 - IL_52f8: ldloc.2 - IL_52f9: beq.s IL_5335 - IL_52fb: ldloc.1 - IL_52fc: ldloc.2 - IL_52fd: ldloc.3 - IL_52fe: sub - IL_52ff: mul - IL_5300: stloc.1 - IL_5301: ldloc.s V_4 - IL_5303: ldc.i4.1 - IL_5304: add - IL_5305: stloc.s V_4 - IL_5307: ldloc.s V_5 - IL_5309: ldc.i4.1 - IL_530a: sub - IL_530b: stloc.s V_5 - IL_530d: ldloc.s V_5 - IL_530f: ldloc.s V_4 - IL_5311: ldloc.3 - IL_5312: ldc.i4.1 - IL_5313: sub - IL_5314: add - IL_5315: add - IL_5316: stloc.s V_5 - IL_5318: ldloc.2 - IL_5319: ldc.i4.1 - IL_531a: sub - IL_531b: stloc.2 - IL_531c: ldloc.1 - IL_531d: ldloc.s V_5 - IL_531f: sub - IL_5320: stloc.1 - IL_5321: ldloc.s V_4 - IL_5323: ldloc.3 - IL_5324: ldc.i4.2 - IL_5325: add - IL_5326: ldloc.2 - IL_5327: add - IL_5328: sub - IL_5329: stloc.s V_4 - IL_532b: ldloc.1 - IL_532c: ldc.i4.1 - IL_532d: add - IL_532e: stloc.1 - IL_532f: ldloc.1 - IL_5330: ldc.i4.1 - IL_5331: sub - IL_5332: stloc.1 - IL_5333: br.s IL_536c - IL_5335: ldloc.2 - IL_5336: ldloc.3 - IL_5337: ldloc.s V_4 - IL_5339: sub - IL_533a: add - IL_533b: stloc.2 - IL_533c: ldloc.s V_5 - IL_533e: ldc.i4.1 - IL_533f: add - IL_5340: stloc.s V_5 - IL_5342: ldloc.3 - IL_5343: ldc.i4.m1 - IL_5344: add - IL_5345: stloc.3 - IL_5346: ldloc.s V_4 - IL_5348: ldloc.s V_5 - IL_534a: ldloc.1 - IL_534b: ldc.i4.1 - IL_534c: add - IL_534d: mul - IL_534e: add - IL_534f: stloc.s V_4 - IL_5351: ldloc.2 - IL_5352: ldc.i4.1 - IL_5353: add - IL_5354: stloc.2 - IL_5355: ldloc.1 - IL_5356: ldc.i4.2 - IL_5357: sub - IL_5358: stloc.1 - IL_5359: ldloc.2 - IL_535a: ldloc.3 - IL_535b: ldc.i4.1 - IL_535c: sub - IL_535d: ldloc.s V_4 - IL_535f: sub - IL_5360: add - IL_5361: stloc.2 - IL_5362: ldloc.s V_5 - IL_5364: ldc.i4.1 - IL_5365: add - IL_5366: stloc.s V_5 - IL_5368: ldloc.2 - IL_5369: ldc.i4.1 - IL_536a: add - IL_536b: stloc.2 - IL_536c: ldloc.1 - IL_536d: ldloc.2 - IL_536e: bne.un.s IL_53aa - IL_5370: ldloc.1 - IL_5371: ldloc.2 - IL_5372: ldloc.3 - IL_5373: add - IL_5374: mul - IL_5375: stloc.1 - IL_5376: ldloc.s V_4 - IL_5378: ldc.i4.1 - IL_5379: add - IL_537a: stloc.s V_4 - IL_537c: ldloc.s V_5 - IL_537e: ldc.i4.1 - IL_537f: sub - IL_5380: stloc.s V_5 - IL_5382: ldloc.s V_5 - IL_5384: ldloc.s V_4 - IL_5386: ldloc.3 - IL_5387: ldc.i4.1 - IL_5388: sub - IL_5389: add - IL_538a: mul - IL_538b: stloc.s V_5 - IL_538d: ldloc.2 - IL_538e: ldc.i4.1 - IL_538f: sub - IL_5390: stloc.2 - IL_5391: ldloc.1 - IL_5392: ldloc.s V_5 - IL_5394: sub - IL_5395: stloc.1 - IL_5396: ldloc.s V_4 - IL_5398: ldloc.3 - IL_5399: ldc.i4.2 - IL_539a: add - IL_539b: ldloc.2 - IL_539c: add - IL_539d: add - IL_539e: stloc.s V_4 - IL_53a0: ldloc.1 - IL_53a1: ldc.i4.1 - IL_53a2: add - IL_53a3: stloc.1 - IL_53a4: ldloc.1 - IL_53a5: ldc.i4.1 - IL_53a6: sub - IL_53a7: stloc.1 - IL_53a8: br.s IL_53e1 - IL_53aa: ldloc.2 - IL_53ab: ldloc.3 - IL_53ac: ldloc.s V_4 - IL_53ae: add - IL_53af: mul - IL_53b0: stloc.2 - IL_53b1: ldloc.s V_5 - IL_53b3: ldc.i4.1 - IL_53b4: add - IL_53b5: stloc.s V_5 - IL_53b7: ldloc.3 - IL_53b8: ldc.i4.m1 - IL_53b9: add - IL_53ba: stloc.3 - IL_53bb: ldloc.s V_4 - IL_53bd: ldloc.s V_5 - IL_53bf: ldloc.1 - IL_53c0: ldc.i4.1 - IL_53c1: add - IL_53c2: add - IL_53c3: add - IL_53c4: stloc.s V_4 - IL_53c6: ldloc.2 - IL_53c7: ldc.i4.1 - IL_53c8: add - IL_53c9: stloc.2 - IL_53ca: ldloc.1 - IL_53cb: ldc.i4.2 - IL_53cc: sub - IL_53cd: stloc.1 - IL_53ce: ldloc.2 - IL_53cf: ldloc.3 - IL_53d0: ldc.i4.1 - IL_53d1: sub - IL_53d2: ldloc.s V_4 - IL_53d4: mul - IL_53d5: mul - IL_53d6: stloc.2 - IL_53d7: ldloc.s V_5 - IL_53d9: ldc.i4.1 - IL_53da: add - IL_53db: stloc.s V_5 - IL_53dd: ldloc.2 - IL_53de: ldc.i4.1 - IL_53df: add - IL_53e0: stloc.2 - IL_53e1: ldloc.1 - IL_53e2: ldloc.2 - IL_53e3: ble.s IL_541f - IL_53e5: ldloc.1 - IL_53e6: ldloc.2 - IL_53e7: ldloc.3 - IL_53e8: add - IL_53e9: sub - IL_53ea: stloc.1 - IL_53eb: ldloc.s V_4 - IL_53ed: ldc.i4.1 - IL_53ee: add - IL_53ef: stloc.s V_4 - IL_53f1: ldloc.s V_5 - IL_53f3: ldc.i4.1 - IL_53f4: sub - IL_53f5: stloc.s V_5 - IL_53f7: ldloc.s V_5 - IL_53f9: ldloc.s V_4 - IL_53fb: ldloc.3 - IL_53fc: ldc.i4.1 - IL_53fd: sub - IL_53fe: add - IL_53ff: mul - IL_5400: stloc.s V_5 - IL_5402: ldloc.2 - IL_5403: ldc.i4.1 - IL_5404: sub - IL_5405: stloc.2 - IL_5406: ldloc.1 - IL_5407: ldloc.s V_5 - IL_5409: sub - IL_540a: stloc.1 - IL_540b: ldloc.s V_4 - IL_540d: ldloc.3 - IL_540e: ldc.i4.2 - IL_540f: add - IL_5410: ldloc.2 - IL_5411: add - IL_5412: add - IL_5413: stloc.s V_4 - IL_5415: ldloc.1 - IL_5416: ldc.i4.1 - IL_5417: add - IL_5418: stloc.1 - IL_5419: ldloc.1 - IL_541a: ldc.i4.1 - IL_541b: sub - IL_541c: stloc.1 - IL_541d: br.s IL_5456 - IL_541f: ldloc.2 - IL_5420: ldloc.3 - IL_5421: ldloc.s V_4 - IL_5423: add - IL_5424: mul - IL_5425: stloc.2 - IL_5426: ldloc.s V_5 - IL_5428: ldc.i4.1 - IL_5429: add - IL_542a: stloc.s V_5 - IL_542c: ldloc.3 - IL_542d: ldc.i4.m1 - IL_542e: add - IL_542f: stloc.3 - IL_5430: ldloc.s V_4 - IL_5432: ldloc.s V_5 - IL_5434: ldloc.1 - IL_5435: ldc.i4.1 - IL_5436: add - IL_5437: mul - IL_5438: add - IL_5439: stloc.s V_4 - IL_543b: ldloc.2 - IL_543c: ldc.i4.1 - IL_543d: add - IL_543e: stloc.2 - IL_543f: ldloc.1 - IL_5440: ldc.i4.2 - IL_5441: sub - IL_5442: stloc.1 - IL_5443: ldloc.2 - IL_5444: ldloc.3 - IL_5445: ldc.i4.1 - IL_5446: sub - IL_5447: ldloc.s V_4 - IL_5449: mul - IL_544a: mul - IL_544b: stloc.2 - IL_544c: ldloc.s V_5 - IL_544e: ldc.i4.1 - IL_544f: add - IL_5450: stloc.s V_5 - IL_5452: ldloc.2 - IL_5453: ldc.i4.1 - IL_5454: add - IL_5455: stloc.2 - IL_5456: ldloc.1 - IL_5457: ldloc.2 - IL_5458: bge.s IL_5494 - IL_545a: ldloc.1 - IL_545b: ldloc.2 - IL_545c: ldloc.3 - IL_545d: mul - IL_545e: add - IL_545f: stloc.1 - IL_5460: ldloc.s V_4 - IL_5462: ldc.i4.1 - IL_5463: add - IL_5464: stloc.s V_4 - IL_5466: ldloc.s V_5 - IL_5468: ldc.i4.1 - IL_5469: sub - IL_546a: stloc.s V_5 - IL_546c: ldloc.s V_5 - IL_546e: ldloc.s V_4 - IL_5470: ldloc.3 - IL_5471: ldc.i4.1 - IL_5472: sub - IL_5473: sub - IL_5474: mul - IL_5475: stloc.s V_5 - IL_5477: ldloc.2 - IL_5478: ldc.i4.1 - IL_5479: sub - IL_547a: stloc.2 - IL_547b: ldloc.1 - IL_547c: ldloc.s V_5 - IL_547e: sub - IL_547f: stloc.1 - IL_5480: ldloc.s V_4 - IL_5482: ldloc.3 - IL_5483: ldc.i4.2 - IL_5484: add - IL_5485: ldloc.2 - IL_5486: sub - IL_5487: mul - IL_5488: stloc.s V_4 - IL_548a: ldloc.1 - IL_548b: ldc.i4.1 - IL_548c: add - IL_548d: stloc.1 - IL_548e: ldloc.1 - IL_548f: ldc.i4.1 - IL_5490: sub - IL_5491: stloc.1 - IL_5492: br.s IL_54cb - IL_5494: ldloc.2 - IL_5495: ldloc.3 - IL_5496: ldloc.s V_4 - IL_5498: mul - IL_5499: mul - IL_549a: stloc.2 - IL_549b: ldloc.s V_5 - IL_549d: ldc.i4.1 - IL_549e: add - IL_549f: stloc.s V_5 - IL_54a1: ldloc.3 - IL_54a2: ldc.i4.m1 - IL_54a3: add - IL_54a4: stloc.3 - IL_54a5: ldloc.s V_4 - IL_54a7: ldloc.s V_5 - IL_54a9: ldloc.1 - IL_54aa: ldc.i4.1 - IL_54ab: add - IL_54ac: add - IL_54ad: sub - IL_54ae: stloc.s V_4 - IL_54b0: ldloc.2 - IL_54b1: ldc.i4.1 - IL_54b2: add - IL_54b3: stloc.2 - IL_54b4: ldloc.1 - IL_54b5: ldc.i4.2 - IL_54b6: sub - IL_54b7: stloc.1 - IL_54b8: ldloc.2 - IL_54b9: ldloc.3 - IL_54ba: ldc.i4.1 - IL_54bb: sub - IL_54bc: ldloc.s V_4 - IL_54be: sub - IL_54bf: mul - IL_54c0: stloc.2 - IL_54c1: ldloc.s V_5 - IL_54c3: ldc.i4.1 - IL_54c4: add - IL_54c5: stloc.s V_5 - IL_54c7: ldloc.2 - IL_54c8: ldc.i4.1 - IL_54c9: add - IL_54ca: stloc.2 - IL_54cb: ldloc.1 - IL_54cc: ldloc.2 - IL_54cd: ble.s IL_5509 - IL_54cf: ldloc.1 - IL_54d0: ldloc.2 - IL_54d1: ldloc.3 - IL_54d2: mul - IL_54d3: add - IL_54d4: stloc.1 - IL_54d5: ldloc.s V_4 - IL_54d7: ldc.i4.1 - IL_54d8: add - IL_54d9: stloc.s V_4 - IL_54db: ldloc.s V_5 - IL_54dd: ldc.i4.1 - IL_54de: sub - IL_54df: stloc.s V_5 - IL_54e1: ldloc.s V_5 - IL_54e3: ldloc.s V_4 - IL_54e5: ldloc.3 - IL_54e6: ldc.i4.1 - IL_54e7: sub - IL_54e8: add - IL_54e9: mul - IL_54ea: stloc.s V_5 - IL_54ec: ldloc.2 - IL_54ed: ldc.i4.1 - IL_54ee: sub - IL_54ef: stloc.2 - IL_54f0: ldloc.1 - IL_54f1: ldloc.s V_5 - IL_54f3: sub - IL_54f4: stloc.1 - IL_54f5: ldloc.s V_4 - IL_54f7: ldloc.3 - IL_54f8: ldc.i4.2 - IL_54f9: add - IL_54fa: ldloc.2 - IL_54fb: add - IL_54fc: sub - IL_54fd: stloc.s V_4 - IL_54ff: ldloc.1 - IL_5500: ldc.i4.1 - IL_5501: add - IL_5502: stloc.1 - IL_5503: ldloc.1 - IL_5504: ldc.i4.1 - IL_5505: sub - IL_5506: stloc.1 - IL_5507: br.s IL_5540 - IL_5509: ldloc.2 - IL_550a: ldloc.3 - IL_550b: ldloc.s V_4 - IL_550d: sub - IL_550e: mul - IL_550f: stloc.2 - IL_5510: ldloc.s V_5 - IL_5512: ldc.i4.1 - IL_5513: add - IL_5514: stloc.s V_5 - IL_5516: ldloc.3 - IL_5517: ldc.i4.m1 - IL_5518: add - IL_5519: stloc.3 - IL_551a: ldloc.s V_4 - IL_551c: ldloc.s V_5 - IL_551e: ldloc.1 - IL_551f: ldc.i4.1 - IL_5520: add - IL_5521: mul - IL_5522: add - IL_5523: stloc.s V_4 - IL_5525: ldloc.2 - IL_5526: ldc.i4.1 - IL_5527: add - IL_5528: stloc.2 - IL_5529: ldloc.1 - IL_552a: ldc.i4.2 - IL_552b: sub - IL_552c: stloc.1 - IL_552d: ldloc.2 - IL_552e: ldloc.3 - IL_552f: ldc.i4.1 - IL_5530: sub - IL_5531: ldloc.s V_4 - IL_5533: sub - IL_5534: mul - IL_5535: stloc.2 - IL_5536: ldloc.s V_5 - IL_5538: ldc.i4.1 - IL_5539: add - IL_553a: stloc.s V_5 - IL_553c: ldloc.2 - IL_553d: ldc.i4.1 - IL_553e: add - IL_553f: stloc.2 - IL_5540: ldloc.s V_4 - IL_5542: ldloc.s V_5 - IL_5544: bne.un.s IL_5580 - IL_5546: ldloc.1 - IL_5547: ldloc.2 - IL_5548: ldloc.3 - IL_5549: sub - IL_554a: sub - IL_554b: stloc.1 - IL_554c: ldloc.s V_4 - IL_554e: ldc.i4.1 - IL_554f: add - IL_5550: stloc.s V_4 - IL_5552: ldloc.s V_5 - IL_5554: ldc.i4.1 - IL_5555: sub - IL_5556: stloc.s V_5 - IL_5558: ldloc.s V_5 - IL_555a: ldloc.s V_4 - IL_555c: ldloc.3 - IL_555d: ldc.i4.1 - IL_555e: sub - IL_555f: sub - IL_5560: mul - IL_5561: stloc.s V_5 - IL_5563: ldloc.2 - IL_5564: ldc.i4.1 - IL_5565: sub - IL_5566: stloc.2 - IL_5567: ldloc.1 - IL_5568: ldloc.s V_5 - IL_556a: sub - IL_556b: stloc.1 - IL_556c: ldloc.s V_4 - IL_556e: ldloc.3 - IL_556f: ldc.i4.2 - IL_5570: add - IL_5571: ldloc.2 - IL_5572: sub - IL_5573: sub - IL_5574: stloc.s V_4 - IL_5576: ldloc.1 - IL_5577: ldc.i4.1 - IL_5578: add - IL_5579: stloc.1 - IL_557a: ldloc.1 - IL_557b: ldc.i4.1 - IL_557c: sub - IL_557d: stloc.1 - IL_557e: br.s IL_55b7 - IL_5580: ldloc.2 - IL_5581: ldloc.3 - IL_5582: ldloc.s V_4 - IL_5584: sub - IL_5585: mul - IL_5586: stloc.2 - IL_5587: ldloc.s V_5 - IL_5589: ldc.i4.1 - IL_558a: add - IL_558b: stloc.s V_5 - IL_558d: ldloc.3 - IL_558e: ldc.i4.m1 - IL_558f: add - IL_5590: stloc.3 - IL_5591: ldloc.s V_4 - IL_5593: ldloc.s V_5 - IL_5595: ldloc.1 - IL_5596: ldc.i4.1 - IL_5597: add - IL_5598: sub - IL_5599: sub - IL_559a: stloc.s V_4 - IL_559c: ldloc.2 - IL_559d: ldc.i4.1 - IL_559e: add - IL_559f: stloc.2 - IL_55a0: ldloc.1 - IL_55a1: ldc.i4.2 - IL_55a2: sub - IL_55a3: stloc.1 - IL_55a4: ldloc.2 - IL_55a5: ldloc.3 - IL_55a6: ldc.i4.1 - IL_55a7: sub - IL_55a8: ldloc.s V_4 - IL_55aa: add - IL_55ab: mul - IL_55ac: stloc.2 - IL_55ad: ldloc.s V_5 - IL_55af: ldc.i4.1 - IL_55b0: add - IL_55b1: stloc.s V_5 - IL_55b3: ldloc.2 - IL_55b4: ldc.i4.1 - IL_55b5: add - IL_55b6: stloc.2 - IL_55b7: ldloc.1 - IL_55b8: ldloc.2 - IL_55b9: blt.s IL_55f5 - IL_55bb: ldloc.1 - IL_55bc: ldloc.2 - IL_55bd: ldloc.3 - IL_55be: sub - IL_55bf: sub - IL_55c0: stloc.1 - IL_55c1: ldloc.s V_4 - IL_55c3: ldc.i4.1 - IL_55c4: add - IL_55c5: stloc.s V_4 - IL_55c7: ldloc.s V_5 - IL_55c9: ldc.i4.1 - IL_55ca: sub - IL_55cb: stloc.s V_5 - IL_55cd: ldloc.s V_5 - IL_55cf: ldloc.s V_4 - IL_55d1: ldloc.3 - IL_55d2: ldc.i4.1 - IL_55d3: sub - IL_55d4: sub - IL_55d5: sub - IL_55d6: stloc.s V_5 - IL_55d8: ldloc.2 - IL_55d9: ldc.i4.1 - IL_55da: sub - IL_55db: stloc.2 - IL_55dc: ldloc.1 - IL_55dd: ldloc.s V_5 - IL_55df: sub - IL_55e0: stloc.1 - IL_55e1: ldloc.s V_4 - IL_55e3: ldloc.3 - IL_55e4: ldc.i4.2 - IL_55e5: add - IL_55e6: ldloc.2 - IL_55e7: sub - IL_55e8: add - IL_55e9: stloc.s V_4 - IL_55eb: ldloc.1 - IL_55ec: ldc.i4.1 - IL_55ed: add - IL_55ee: stloc.1 - IL_55ef: ldloc.1 - IL_55f0: ldc.i4.1 - IL_55f1: sub - IL_55f2: stloc.1 - IL_55f3: br.s IL_562c - IL_55f5: ldloc.2 - IL_55f6: ldloc.3 - IL_55f7: ldloc.s V_4 - IL_55f9: add - IL_55fa: sub - IL_55fb: stloc.2 - IL_55fc: ldloc.s V_5 - IL_55fe: ldc.i4.1 - IL_55ff: add - IL_5600: stloc.s V_5 - IL_5602: ldloc.3 - IL_5603: ldc.i4.m1 - IL_5604: add - IL_5605: stloc.3 - IL_5606: ldloc.s V_4 - IL_5608: ldloc.s V_5 - IL_560a: ldloc.1 - IL_560b: ldc.i4.1 - IL_560c: add - IL_560d: add - IL_560e: sub - IL_560f: stloc.s V_4 - IL_5611: ldloc.2 - IL_5612: ldc.i4.1 - IL_5613: add - IL_5614: stloc.2 - IL_5615: ldloc.1 - IL_5616: ldc.i4.2 - IL_5617: sub - IL_5618: stloc.1 - IL_5619: ldloc.2 - IL_561a: ldloc.3 - IL_561b: ldc.i4.1 - IL_561c: sub - IL_561d: ldloc.s V_4 - IL_561f: mul - IL_5620: sub - IL_5621: stloc.2 - IL_5622: ldloc.s V_5 - IL_5624: ldc.i4.1 - IL_5625: add - IL_5626: stloc.s V_5 - IL_5628: ldloc.2 - IL_5629: ldc.i4.1 - IL_562a: add - IL_562b: stloc.2 - IL_562c: ldloc.1 - IL_562d: ldloc.2 - IL_562e: bge.s IL_566a - IL_5630: ldloc.1 - IL_5631: ldloc.2 - IL_5632: ldloc.3 - IL_5633: mul - IL_5634: add - IL_5635: stloc.1 - IL_5636: ldloc.s V_4 - IL_5638: ldc.i4.1 - IL_5639: add - IL_563a: stloc.s V_4 - IL_563c: ldloc.s V_5 - IL_563e: ldc.i4.1 - IL_563f: sub - IL_5640: stloc.s V_5 - IL_5642: ldloc.s V_5 - IL_5644: ldloc.s V_4 - IL_5646: ldloc.3 - IL_5647: ldc.i4.1 - IL_5648: sub - IL_5649: sub - IL_564a: add - IL_564b: stloc.s V_5 - IL_564d: ldloc.2 - IL_564e: ldc.i4.1 - IL_564f: sub - IL_5650: stloc.2 - IL_5651: ldloc.1 - IL_5652: ldloc.s V_5 - IL_5654: sub - IL_5655: stloc.1 - IL_5656: ldloc.s V_4 - IL_5658: ldloc.3 - IL_5659: ldc.i4.2 - IL_565a: add - IL_565b: ldloc.2 - IL_565c: sub - IL_565d: mul - IL_565e: stloc.s V_4 - IL_5660: ldloc.1 - IL_5661: ldc.i4.1 - IL_5662: add - IL_5663: stloc.1 - IL_5664: ldloc.1 - IL_5665: ldc.i4.1 - IL_5666: sub - IL_5667: stloc.1 - IL_5668: br.s IL_56a1 - IL_566a: ldloc.2 - IL_566b: ldloc.3 - IL_566c: ldloc.s V_4 - IL_566e: mul - IL_566f: add - IL_5670: stloc.2 - IL_5671: ldloc.s V_5 - IL_5673: ldc.i4.1 - IL_5674: add - IL_5675: stloc.s V_5 - IL_5677: ldloc.3 - IL_5678: ldc.i4.m1 - IL_5679: add - IL_567a: stloc.3 - IL_567b: ldloc.s V_4 - IL_567d: ldloc.s V_5 - IL_567f: ldloc.1 - IL_5680: ldc.i4.1 - IL_5681: add - IL_5682: add - IL_5683: sub - IL_5684: stloc.s V_4 - IL_5686: ldloc.2 - IL_5687: ldc.i4.1 - IL_5688: add - IL_5689: stloc.2 - IL_568a: ldloc.1 - IL_568b: ldc.i4.2 - IL_568c: sub - IL_568d: stloc.1 - IL_568e: ldloc.2 - IL_568f: ldloc.3 - IL_5690: ldc.i4.1 - IL_5691: sub - IL_5692: ldloc.s V_4 - IL_5694: mul - IL_5695: add - IL_5696: stloc.2 - IL_5697: ldloc.s V_5 - IL_5699: ldc.i4.1 - IL_569a: add - IL_569b: stloc.s V_5 - IL_569d: ldloc.2 - IL_569e: ldc.i4.1 - IL_569f: add - IL_56a0: stloc.2 - IL_56a1: ldloc.1 - IL_56a2: ldloc.2 - IL_56a3: bgt.s IL_56df - IL_56a5: ldloc.1 - IL_56a6: ldloc.2 - IL_56a7: ldloc.3 - IL_56a8: mul - IL_56a9: add - IL_56aa: stloc.1 - IL_56ab: ldloc.s V_4 - IL_56ad: ldc.i4.1 - IL_56ae: add - IL_56af: stloc.s V_4 - IL_56b1: ldloc.s V_5 - IL_56b3: ldc.i4.1 - IL_56b4: sub - IL_56b5: stloc.s V_5 - IL_56b7: ldloc.s V_5 - IL_56b9: ldloc.s V_4 - IL_56bb: ldloc.3 - IL_56bc: ldc.i4.1 - IL_56bd: sub - IL_56be: add - IL_56bf: add - IL_56c0: stloc.s V_5 - IL_56c2: ldloc.2 - IL_56c3: ldc.i4.1 - IL_56c4: sub - IL_56c5: stloc.2 - IL_56c6: ldloc.1 - IL_56c7: ldloc.s V_5 - IL_56c9: sub - IL_56ca: stloc.1 - IL_56cb: ldloc.s V_4 - IL_56cd: ldloc.3 - IL_56ce: ldc.i4.2 - IL_56cf: add - IL_56d0: ldloc.2 - IL_56d1: add - IL_56d2: sub - IL_56d3: stloc.s V_4 - IL_56d5: ldloc.1 - IL_56d6: ldc.i4.1 - IL_56d7: add - IL_56d8: stloc.1 - IL_56d9: ldloc.1 - IL_56da: ldc.i4.1 - IL_56db: sub - IL_56dc: stloc.1 - IL_56dd: br.s IL_5716 - IL_56df: ldloc.2 - IL_56e0: ldloc.3 - IL_56e1: ldloc.s V_4 - IL_56e3: sub - IL_56e4: add - IL_56e5: stloc.2 - IL_56e6: ldloc.s V_5 - IL_56e8: ldc.i4.1 - IL_56e9: add - IL_56ea: stloc.s V_5 - IL_56ec: ldloc.3 - IL_56ed: ldc.i4.m1 - IL_56ee: add - IL_56ef: stloc.3 - IL_56f0: ldloc.s V_4 - IL_56f2: ldloc.s V_5 - IL_56f4: ldloc.1 - IL_56f5: ldc.i4.1 - IL_56f6: add - IL_56f7: mul - IL_56f8: add - IL_56f9: stloc.s V_4 - IL_56fb: ldloc.2 - IL_56fc: ldc.i4.1 - IL_56fd: add - IL_56fe: stloc.2 - IL_56ff: ldloc.1 - IL_5700: ldc.i4.2 - IL_5701: sub - IL_5702: stloc.1 - IL_5703: ldloc.2 - IL_5704: ldloc.3 - IL_5705: ldc.i4.1 - IL_5706: sub - IL_5707: ldloc.s V_4 - IL_5709: mul - IL_570a: add - IL_570b: stloc.2 - IL_570c: ldloc.s V_5 - IL_570e: ldc.i4.1 - IL_570f: add - IL_5710: stloc.s V_5 - IL_5712: ldloc.2 - IL_5713: ldc.i4.1 - IL_5714: add - IL_5715: stloc.2 - IL_5716: ldloc.1 - IL_5717: ldloc.2 - IL_5718: bne.un.s IL_5754 - IL_571a: ldloc.1 - IL_571b: ldloc.2 - IL_571c: ldloc.3 - IL_571d: sub - IL_571e: sub - IL_571f: stloc.1 - IL_5720: ldloc.s V_4 - IL_5722: ldc.i4.1 - IL_5723: add - IL_5724: stloc.s V_4 - IL_5726: ldloc.s V_5 - IL_5728: ldc.i4.1 - IL_5729: sub - IL_572a: stloc.s V_5 - IL_572c: ldloc.s V_5 - IL_572e: ldloc.s V_4 - IL_5730: ldloc.3 - IL_5731: ldc.i4.1 - IL_5732: sub - IL_5733: add - IL_5734: add - IL_5735: stloc.s V_5 - IL_5737: ldloc.2 - IL_5738: ldc.i4.1 - IL_5739: sub - IL_573a: stloc.2 - IL_573b: ldloc.1 - IL_573c: ldloc.s V_5 - IL_573e: sub - IL_573f: stloc.1 - IL_5740: ldloc.s V_4 - IL_5742: ldloc.3 - IL_5743: ldc.i4.2 - IL_5744: add - IL_5745: ldloc.2 - IL_5746: add - IL_5747: add - IL_5748: stloc.s V_4 - IL_574a: ldloc.1 - IL_574b: ldc.i4.1 - IL_574c: add - IL_574d: stloc.1 - IL_574e: ldloc.1 - IL_574f: ldc.i4.1 - IL_5750: sub - IL_5751: stloc.1 - IL_5752: br.s IL_578b - IL_5754: ldloc.2 - IL_5755: ldloc.3 - IL_5756: ldloc.s V_4 - IL_5758: add - IL_5759: add - IL_575a: stloc.2 - IL_575b: ldloc.s V_5 - IL_575d: ldc.i4.1 - IL_575e: add - IL_575f: stloc.s V_5 - IL_5761: ldloc.3 - IL_5762: ldc.i4.m1 - IL_5763: add - IL_5764: stloc.3 - IL_5765: ldloc.s V_4 - IL_5767: ldloc.s V_5 - IL_5769: ldloc.1 - IL_576a: ldc.i4.1 - IL_576b: add - IL_576c: sub - IL_576d: add - IL_576e: stloc.s V_4 - IL_5770: ldloc.2 - IL_5771: ldc.i4.1 - IL_5772: add - IL_5773: stloc.2 - IL_5774: ldloc.1 - IL_5775: ldc.i4.2 - IL_5776: sub - IL_5777: stloc.1 - IL_5778: ldloc.2 - IL_5779: ldloc.3 - IL_577a: ldc.i4.1 - IL_577b: sub - IL_577c: ldloc.s V_4 - IL_577e: sub - IL_577f: add - IL_5780: stloc.2 - IL_5781: ldloc.s V_5 - IL_5783: ldc.i4.1 - IL_5784: add - IL_5785: stloc.s V_5 - IL_5787: ldloc.2 - IL_5788: ldc.i4.1 - IL_5789: add - IL_578a: stloc.2 - IL_578b: ldloc.1 - IL_578c: ldloc.2 - IL_578d: bne.un.s IL_57c9 - IL_578f: ldloc.1 - IL_5790: ldloc.2 - IL_5791: ldloc.3 - IL_5792: mul - IL_5793: sub - IL_5794: stloc.1 - IL_5795: ldloc.s V_4 - IL_5797: ldc.i4.1 - IL_5798: add - IL_5799: stloc.s V_4 - IL_579b: ldloc.s V_5 - IL_579d: ldc.i4.1 - IL_579e: sub - IL_579f: stloc.s V_5 - IL_57a1: ldloc.s V_5 - IL_57a3: ldloc.s V_4 - IL_57a5: ldloc.3 - IL_57a6: ldc.i4.1 - IL_57a7: sub - IL_57a8: sub - IL_57a9: sub - IL_57aa: stloc.s V_5 - IL_57ac: ldloc.2 - IL_57ad: ldc.i4.1 - IL_57ae: sub - IL_57af: stloc.2 - IL_57b0: ldloc.1 - IL_57b1: ldloc.s V_5 - IL_57b3: sub - IL_57b4: stloc.1 - IL_57b5: ldloc.s V_4 - IL_57b7: ldloc.3 - IL_57b8: ldc.i4.2 - IL_57b9: add - IL_57ba: ldloc.2 - IL_57bb: sub - IL_57bc: sub - IL_57bd: stloc.s V_4 - IL_57bf: ldloc.1 - IL_57c0: ldc.i4.1 - IL_57c1: add - IL_57c2: stloc.1 - IL_57c3: ldloc.1 - IL_57c4: ldc.i4.1 - IL_57c5: sub - IL_57c6: stloc.1 - IL_57c7: br.s IL_5800 - IL_57c9: ldloc.2 - IL_57ca: ldloc.3 - IL_57cb: ldloc.s V_4 - IL_57cd: sub - IL_57ce: sub - IL_57cf: stloc.2 - IL_57d0: ldloc.s V_5 - IL_57d2: ldc.i4.1 - IL_57d3: add - IL_57d4: stloc.s V_5 - IL_57d6: ldloc.3 - IL_57d7: ldc.i4.m1 - IL_57d8: add - IL_57d9: stloc.3 - IL_57da: ldloc.s V_4 - IL_57dc: ldloc.s V_5 - IL_57de: ldloc.1 - IL_57df: ldc.i4.1 - IL_57e0: add - IL_57e1: mul - IL_57e2: sub - IL_57e3: stloc.s V_4 - IL_57e5: ldloc.2 - IL_57e6: ldc.i4.1 - IL_57e7: add - IL_57e8: stloc.2 - IL_57e9: ldloc.1 - IL_57ea: ldc.i4.2 - IL_57eb: sub - IL_57ec: stloc.1 - IL_57ed: ldloc.2 - IL_57ee: ldloc.3 - IL_57ef: ldc.i4.1 - IL_57f0: sub - IL_57f1: ldloc.s V_4 - IL_57f3: mul - IL_57f4: sub - IL_57f5: stloc.2 - IL_57f6: ldloc.s V_5 - IL_57f8: ldc.i4.1 - IL_57f9: add - IL_57fa: stloc.s V_5 - IL_57fc: ldloc.2 - IL_57fd: ldc.i4.1 - IL_57fe: add - IL_57ff: stloc.2 - IL_5800: ldloc.3 - IL_5801: ldloc.s V_4 - IL_5803: beq.s IL_583f - IL_5805: ldloc.1 - IL_5806: ldloc.2 - IL_5807: ldloc.3 - IL_5808: mul - IL_5809: add - IL_580a: stloc.1 - IL_580b: ldloc.s V_4 - IL_580d: ldc.i4.1 - IL_580e: add - IL_580f: stloc.s V_4 - IL_5811: ldloc.s V_5 - IL_5813: ldc.i4.1 - IL_5814: sub - IL_5815: stloc.s V_5 - IL_5817: ldloc.s V_5 - IL_5819: ldloc.s V_4 - IL_581b: ldloc.3 - IL_581c: ldc.i4.1 - IL_581d: sub - IL_581e: add - IL_581f: sub - IL_5820: stloc.s V_5 - IL_5822: ldloc.2 - IL_5823: ldc.i4.1 - IL_5824: sub - IL_5825: stloc.2 - IL_5826: ldloc.1 - IL_5827: ldloc.s V_5 - IL_5829: sub - IL_582a: stloc.1 - IL_582b: ldloc.s V_4 - IL_582d: ldloc.3 - IL_582e: ldc.i4.2 - IL_582f: add - IL_5830: ldloc.2 - IL_5831: add - IL_5832: mul - IL_5833: stloc.s V_4 - IL_5835: ldloc.1 - IL_5836: ldc.i4.1 - IL_5837: add - IL_5838: stloc.1 - IL_5839: ldloc.1 - IL_583a: ldc.i4.1 - IL_583b: sub - IL_583c: stloc.1 - IL_583d: br.s IL_5876 - IL_583f: ldloc.2 - IL_5840: ldloc.3 - IL_5841: ldloc.s V_4 - IL_5843: mul - IL_5844: sub - IL_5845: stloc.2 - IL_5846: ldloc.s V_5 - IL_5848: ldc.i4.1 - IL_5849: add - IL_584a: stloc.s V_5 - IL_584c: ldloc.3 - IL_584d: ldc.i4.m1 - IL_584e: add - IL_584f: stloc.3 - IL_5850: ldloc.s V_4 - IL_5852: ldloc.s V_5 - IL_5854: ldloc.1 - IL_5855: ldc.i4.1 - IL_5856: add - IL_5857: add - IL_5858: add - IL_5859: stloc.s V_4 - IL_585b: ldloc.2 - IL_585c: ldc.i4.1 - IL_585d: add - IL_585e: stloc.2 - IL_585f: ldloc.1 - IL_5860: ldc.i4.2 - IL_5861: sub - IL_5862: stloc.1 - IL_5863: ldloc.2 - IL_5864: ldloc.3 - IL_5865: ldc.i4.1 - IL_5866: sub - IL_5867: ldloc.s V_4 - IL_5869: mul - IL_586a: sub - IL_586b: stloc.2 - IL_586c: ldloc.s V_5 - IL_586e: ldc.i4.1 - IL_586f: add - IL_5870: stloc.s V_5 - IL_5872: ldloc.2 - IL_5873: ldc.i4.1 - IL_5874: add - IL_5875: stloc.2 - IL_5876: ldloc.1 - IL_5877: ldloc.2 - IL_5878: bge.s IL_58b4 - IL_587a: ldloc.1 - IL_587b: ldloc.2 - IL_587c: ldloc.3 - IL_587d: add - IL_587e: add - IL_587f: stloc.1 - IL_5880: ldloc.s V_4 - IL_5882: ldc.i4.1 - IL_5883: add - IL_5884: stloc.s V_4 - IL_5886: ldloc.s V_5 - IL_5888: ldc.i4.1 - IL_5889: sub - IL_588a: stloc.s V_5 - IL_588c: ldloc.s V_5 - IL_588e: ldloc.s V_4 - IL_5890: ldloc.3 - IL_5891: ldc.i4.1 - IL_5892: sub - IL_5893: sub - IL_5894: mul - IL_5895: stloc.s V_5 - IL_5897: ldloc.2 - IL_5898: ldc.i4.1 - IL_5899: sub - IL_589a: stloc.2 - IL_589b: ldloc.1 - IL_589c: ldloc.s V_5 - IL_589e: sub - IL_589f: stloc.1 - IL_58a0: ldloc.s V_4 - IL_58a2: ldloc.3 - IL_58a3: ldc.i4.2 - IL_58a4: add - IL_58a5: ldloc.2 - IL_58a6: sub - IL_58a7: mul - IL_58a8: stloc.s V_4 - IL_58aa: ldloc.1 - IL_58ab: ldc.i4.1 - IL_58ac: add - IL_58ad: stloc.1 - IL_58ae: ldloc.1 - IL_58af: ldc.i4.1 - IL_58b0: sub - IL_58b1: stloc.1 - IL_58b2: br.s IL_58eb - IL_58b4: ldloc.2 - IL_58b5: ldloc.3 - IL_58b6: ldloc.s V_4 - IL_58b8: mul - IL_58b9: mul - IL_58ba: stloc.2 - IL_58bb: ldloc.s V_5 - IL_58bd: ldc.i4.1 - IL_58be: add - IL_58bf: stloc.s V_5 - IL_58c1: ldloc.3 - IL_58c2: ldc.i4.m1 - IL_58c3: add - IL_58c4: stloc.3 - IL_58c5: ldloc.s V_4 - IL_58c7: ldloc.s V_5 - IL_58c9: ldloc.1 - IL_58ca: ldc.i4.1 - IL_58cb: add - IL_58cc: add - IL_58cd: sub - IL_58ce: stloc.s V_4 - IL_58d0: ldloc.2 - IL_58d1: ldc.i4.1 - IL_58d2: add - IL_58d3: stloc.2 - IL_58d4: ldloc.1 - IL_58d5: ldc.i4.2 - IL_58d6: sub - IL_58d7: stloc.1 - IL_58d8: ldloc.2 - IL_58d9: ldloc.3 - IL_58da: ldc.i4.1 - IL_58db: sub - IL_58dc: ldloc.s V_4 - IL_58de: mul - IL_58df: mul - IL_58e0: stloc.2 - IL_58e1: ldloc.s V_5 - IL_58e3: ldc.i4.1 - IL_58e4: add - IL_58e5: stloc.s V_5 - IL_58e7: ldloc.2 - IL_58e8: ldc.i4.1 - IL_58e9: add - IL_58ea: stloc.2 - IL_58eb: ldloc.1 - IL_58ec: ldloc.2 - IL_58ed: bne.un.s IL_5929 - IL_58ef: ldloc.1 - IL_58f0: ldloc.2 - IL_58f1: ldloc.3 - IL_58f2: add - IL_58f3: mul - IL_58f4: stloc.1 - IL_58f5: ldloc.s V_4 - IL_58f7: ldc.i4.1 - IL_58f8: add - IL_58f9: stloc.s V_4 - IL_58fb: ldloc.s V_5 - IL_58fd: ldc.i4.1 - IL_58fe: sub - IL_58ff: stloc.s V_5 - IL_5901: ldloc.s V_5 - IL_5903: ldloc.s V_4 - IL_5905: ldloc.3 - IL_5906: ldc.i4.1 - IL_5907: sub - IL_5908: mul - IL_5909: mul - IL_590a: stloc.s V_5 - IL_590c: ldloc.2 - IL_590d: ldc.i4.1 - IL_590e: sub - IL_590f: stloc.2 - IL_5910: ldloc.1 - IL_5911: ldloc.s V_5 - IL_5913: sub - IL_5914: stloc.1 - IL_5915: ldloc.s V_4 - IL_5917: ldloc.3 - IL_5918: ldc.i4.2 - IL_5919: add - IL_591a: ldloc.2 - IL_591b: mul - IL_591c: sub - IL_591d: stloc.s V_4 - IL_591f: ldloc.1 - IL_5920: ldc.i4.1 - IL_5921: add - IL_5922: stloc.1 - IL_5923: ldloc.1 - IL_5924: ldc.i4.1 - IL_5925: sub - IL_5926: stloc.1 - IL_5927: br.s IL_5960 - IL_5929: ldloc.2 - IL_592a: ldloc.3 - IL_592b: ldloc.s V_4 - IL_592d: sub - IL_592e: mul - IL_592f: stloc.2 - IL_5930: ldloc.s V_5 - IL_5932: ldc.i4.1 - IL_5933: add - IL_5934: stloc.s V_5 - IL_5936: ldloc.3 - IL_5937: ldc.i4.m1 - IL_5938: add - IL_5939: stloc.3 - IL_593a: ldloc.s V_4 - IL_593c: ldloc.s V_5 - IL_593e: ldloc.1 - IL_593f: ldc.i4.1 - IL_5940: add - IL_5941: sub - IL_5942: mul - IL_5943: stloc.s V_4 - IL_5945: ldloc.2 - IL_5946: ldc.i4.1 - IL_5947: add - IL_5948: stloc.2 - IL_5949: ldloc.1 - IL_594a: ldc.i4.2 - IL_594b: sub - IL_594c: stloc.1 - IL_594d: ldloc.2 - IL_594e: ldloc.3 - IL_594f: ldc.i4.1 - IL_5950: sub - IL_5951: ldloc.s V_4 - IL_5953: add - IL_5954: mul - IL_5955: stloc.2 - IL_5956: ldloc.s V_5 - IL_5958: ldc.i4.1 - IL_5959: add - IL_595a: stloc.s V_5 - IL_595c: ldloc.2 - IL_595d: ldc.i4.1 - IL_595e: add - IL_595f: stloc.2 - IL_5960: ldloc.1 - IL_5961: ldloc.3 - IL_5962: bne.un.s IL_599e - IL_5964: ldloc.1 - IL_5965: ldloc.2 - IL_5966: ldloc.3 - IL_5967: mul - IL_5968: sub - IL_5969: stloc.1 - IL_596a: ldloc.s V_4 - IL_596c: ldc.i4.1 - IL_596d: add - IL_596e: stloc.s V_4 - IL_5970: ldloc.s V_5 - IL_5972: ldc.i4.1 - IL_5973: sub - IL_5974: stloc.s V_5 - IL_5976: ldloc.s V_5 - IL_5978: ldloc.s V_4 - IL_597a: ldloc.3 - IL_597b: ldc.i4.1 - IL_597c: sub - IL_597d: add - IL_597e: add - IL_597f: stloc.s V_5 - IL_5981: ldloc.2 - IL_5982: ldc.i4.1 - IL_5983: sub - IL_5984: stloc.2 - IL_5985: ldloc.1 - IL_5986: ldloc.s V_5 - IL_5988: sub - IL_5989: stloc.1 - IL_598a: ldloc.s V_4 - IL_598c: ldloc.3 - IL_598d: ldc.i4.2 - IL_598e: add - IL_598f: ldloc.2 - IL_5990: add - IL_5991: add - IL_5992: stloc.s V_4 - IL_5994: ldloc.1 - IL_5995: ldc.i4.1 - IL_5996: add - IL_5997: stloc.1 - IL_5998: ldloc.1 - IL_5999: ldc.i4.1 - IL_599a: sub - IL_599b: stloc.1 - IL_599c: br.s IL_59d5 - IL_599e: ldloc.2 - IL_599f: ldloc.3 - IL_59a0: ldloc.s V_4 - IL_59a2: add - IL_59a3: add - IL_59a4: stloc.2 - IL_59a5: ldloc.s V_5 - IL_59a7: ldc.i4.1 - IL_59a8: add - IL_59a9: stloc.s V_5 - IL_59ab: ldloc.3 - IL_59ac: ldc.i4.m1 - IL_59ad: add - IL_59ae: stloc.3 - IL_59af: ldloc.s V_4 - IL_59b1: ldloc.s V_5 - IL_59b3: ldloc.1 - IL_59b4: ldc.i4.1 - IL_59b5: add - IL_59b6: sub - IL_59b7: add - IL_59b8: stloc.s V_4 - IL_59ba: ldloc.2 - IL_59bb: ldc.i4.1 - IL_59bc: add - IL_59bd: stloc.2 - IL_59be: ldloc.1 - IL_59bf: ldc.i4.2 - IL_59c0: sub - IL_59c1: stloc.1 - IL_59c2: ldloc.2 - IL_59c3: ldloc.3 - IL_59c4: ldc.i4.1 - IL_59c5: sub - IL_59c6: ldloc.s V_4 - IL_59c8: add - IL_59c9: add - IL_59ca: stloc.2 - IL_59cb: ldloc.s V_5 - IL_59cd: ldc.i4.1 - IL_59ce: add - IL_59cf: stloc.s V_5 - IL_59d1: ldloc.2 - IL_59d2: ldc.i4.1 - IL_59d3: add - IL_59d4: stloc.2 - IL_59d5: ldloc.1 - IL_59d6: ldloc.2 - IL_59d7: blt.s IL_5a13 - IL_59d9: ldloc.1 - IL_59da: ldloc.2 - IL_59db: ldloc.3 - IL_59dc: add - IL_59dd: add - IL_59de: stloc.1 - IL_59df: ldloc.s V_4 - IL_59e1: ldc.i4.1 - IL_59e2: add - IL_59e3: stloc.s V_4 - IL_59e5: ldloc.s V_5 - IL_59e7: ldc.i4.1 - IL_59e8: sub - IL_59e9: stloc.s V_5 - IL_59eb: ldloc.s V_5 - IL_59ed: ldloc.s V_4 - IL_59ef: ldloc.3 - IL_59f0: ldc.i4.1 - IL_59f1: sub - IL_59f2: mul - IL_59f3: mul - IL_59f4: stloc.s V_5 - IL_59f6: ldloc.2 - IL_59f7: ldc.i4.1 - IL_59f8: sub - IL_59f9: stloc.2 - IL_59fa: ldloc.1 - IL_59fb: ldloc.s V_5 - IL_59fd: sub - IL_59fe: stloc.1 - IL_59ff: ldloc.s V_4 - IL_5a01: ldloc.3 - IL_5a02: ldc.i4.2 - IL_5a03: add - IL_5a04: ldloc.2 - IL_5a05: mul - IL_5a06: mul - IL_5a07: stloc.s V_4 - IL_5a09: ldloc.1 - IL_5a0a: ldc.i4.1 - IL_5a0b: add - IL_5a0c: stloc.1 - IL_5a0d: ldloc.1 - IL_5a0e: ldc.i4.1 - IL_5a0f: sub - IL_5a10: stloc.1 - IL_5a11: br.s IL_5a4a - IL_5a13: ldloc.2 - IL_5a14: ldloc.3 - IL_5a15: ldloc.s V_4 - IL_5a17: mul - IL_5a18: mul - IL_5a19: stloc.2 - IL_5a1a: ldloc.s V_5 - IL_5a1c: ldc.i4.1 - IL_5a1d: add - IL_5a1e: stloc.s V_5 - IL_5a20: ldloc.3 - IL_5a21: ldc.i4.m1 - IL_5a22: add - IL_5a23: stloc.3 - IL_5a24: ldloc.s V_4 - IL_5a26: ldloc.s V_5 - IL_5a28: ldloc.1 - IL_5a29: ldc.i4.1 - IL_5a2a: add - IL_5a2b: sub - IL_5a2c: mul - IL_5a2d: stloc.s V_4 - IL_5a2f: ldloc.2 - IL_5a30: ldc.i4.1 - IL_5a31: add - IL_5a32: stloc.2 - IL_5a33: ldloc.1 - IL_5a34: ldc.i4.2 - IL_5a35: sub - IL_5a36: stloc.1 - IL_5a37: ldloc.2 - IL_5a38: ldloc.3 - IL_5a39: ldc.i4.1 - IL_5a3a: sub - IL_5a3b: ldloc.s V_4 - IL_5a3d: mul - IL_5a3e: mul - IL_5a3f: stloc.2 - IL_5a40: ldloc.s V_5 - IL_5a42: ldc.i4.1 - IL_5a43: add - IL_5a44: stloc.s V_5 - IL_5a46: ldloc.2 - IL_5a47: ldc.i4.1 - IL_5a48: add - IL_5a49: stloc.2 - IL_5a4a: ldloc.1 - IL_5a4b: ldloc.2 - IL_5a4c: bge.s IL_5a88 - IL_5a4e: ldloc.1 - IL_5a4f: ldloc.2 - IL_5a50: ldloc.3 - IL_5a51: add - IL_5a52: add - IL_5a53: stloc.1 - IL_5a54: ldloc.s V_4 - IL_5a56: ldc.i4.1 - IL_5a57: add - IL_5a58: stloc.s V_4 - IL_5a5a: ldloc.s V_5 - IL_5a5c: ldc.i4.1 - IL_5a5d: sub - IL_5a5e: stloc.s V_5 - IL_5a60: ldloc.s V_5 - IL_5a62: ldloc.s V_4 - IL_5a64: ldloc.3 - IL_5a65: ldc.i4.1 - IL_5a66: sub - IL_5a67: add - IL_5a68: sub - IL_5a69: stloc.s V_5 - IL_5a6b: ldloc.2 - IL_5a6c: ldc.i4.1 - IL_5a6d: sub - IL_5a6e: stloc.2 - IL_5a6f: ldloc.1 - IL_5a70: ldloc.s V_5 - IL_5a72: sub - IL_5a73: stloc.1 - IL_5a74: ldloc.s V_4 - IL_5a76: ldloc.3 - IL_5a77: ldc.i4.2 - IL_5a78: add - IL_5a79: ldloc.2 - IL_5a7a: add - IL_5a7b: add - IL_5a7c: stloc.s V_4 - IL_5a7e: ldloc.1 - IL_5a7f: ldc.i4.1 - IL_5a80: add - IL_5a81: stloc.1 - IL_5a82: ldloc.1 - IL_5a83: ldc.i4.1 - IL_5a84: sub - IL_5a85: stloc.1 - IL_5a86: br.s IL_5abf - IL_5a88: ldloc.2 - IL_5a89: ldloc.3 - IL_5a8a: ldloc.s V_4 - IL_5a8c: add - IL_5a8d: sub - IL_5a8e: stloc.2 - IL_5a8f: ldloc.s V_5 - IL_5a91: ldc.i4.1 - IL_5a92: add - IL_5a93: stloc.s V_5 - IL_5a95: ldloc.3 - IL_5a96: ldc.i4.m1 - IL_5a97: add - IL_5a98: stloc.3 - IL_5a99: ldloc.s V_4 - IL_5a9b: ldloc.s V_5 - IL_5a9d: ldloc.1 - IL_5a9e: ldc.i4.1 - IL_5a9f: add - IL_5aa0: mul - IL_5aa1: add - IL_5aa2: stloc.s V_4 - IL_5aa4: ldloc.2 - IL_5aa5: ldc.i4.1 - IL_5aa6: add - IL_5aa7: stloc.2 - IL_5aa8: ldloc.1 - IL_5aa9: ldc.i4.2 - IL_5aaa: sub - IL_5aab: stloc.1 - IL_5aac: ldloc.2 - IL_5aad: ldloc.3 - IL_5aae: ldc.i4.1 - IL_5aaf: sub - IL_5ab0: ldloc.s V_4 - IL_5ab2: add - IL_5ab3: sub - IL_5ab4: stloc.2 - IL_5ab5: ldloc.s V_5 - IL_5ab7: ldc.i4.1 - IL_5ab8: add - IL_5ab9: stloc.s V_5 - IL_5abb: ldloc.2 - IL_5abc: ldc.i4.1 - IL_5abd: add - IL_5abe: stloc.2 - IL_5abf: ldloc.1 - IL_5ac0: ldloc.2 - IL_5ac1: bgt.s IL_5afd - IL_5ac3: ldloc.1 - IL_5ac4: ldloc.2 - IL_5ac5: ldloc.3 - IL_5ac6: sub - IL_5ac7: sub - IL_5ac8: stloc.1 - IL_5ac9: ldloc.s V_4 - IL_5acb: ldc.i4.1 - IL_5acc: add - IL_5acd: stloc.s V_4 - IL_5acf: ldloc.s V_5 - IL_5ad1: ldc.i4.1 - IL_5ad2: sub - IL_5ad3: stloc.s V_5 - IL_5ad5: ldloc.s V_5 - IL_5ad7: ldloc.s V_4 - IL_5ad9: ldloc.3 - IL_5ada: ldc.i4.1 - IL_5adb: sub - IL_5adc: mul - IL_5add: add - IL_5ade: stloc.s V_5 - IL_5ae0: ldloc.2 - IL_5ae1: ldc.i4.1 - IL_5ae2: sub - IL_5ae3: stloc.2 - IL_5ae4: ldloc.1 - IL_5ae5: ldloc.s V_5 - IL_5ae7: sub - IL_5ae8: stloc.1 - IL_5ae9: ldloc.s V_4 - IL_5aeb: ldloc.3 - IL_5aec: ldc.i4.2 - IL_5aed: add - IL_5aee: ldloc.2 - IL_5aef: mul - IL_5af0: sub - IL_5af1: stloc.s V_4 - IL_5af3: ldloc.1 - IL_5af4: ldc.i4.1 - IL_5af5: add - IL_5af6: stloc.1 - IL_5af7: ldloc.1 - IL_5af8: ldc.i4.1 - IL_5af9: sub - IL_5afa: stloc.1 - IL_5afb: br.s IL_5b34 - IL_5afd: ldloc.2 - IL_5afe: ldloc.3 - IL_5aff: ldloc.s V_4 - IL_5b01: sub - IL_5b02: add - IL_5b03: stloc.2 - IL_5b04: ldloc.s V_5 - IL_5b06: ldc.i4.1 - IL_5b07: add - IL_5b08: stloc.s V_5 - IL_5b0a: ldloc.3 - IL_5b0b: ldc.i4.m1 - IL_5b0c: add - IL_5b0d: stloc.3 - IL_5b0e: ldloc.s V_4 - IL_5b10: ldloc.s V_5 - IL_5b12: ldloc.1 - IL_5b13: ldc.i4.1 - IL_5b14: add - IL_5b15: add - IL_5b16: mul - IL_5b17: stloc.s V_4 - IL_5b19: ldloc.2 - IL_5b1a: ldc.i4.1 - IL_5b1b: add - IL_5b1c: stloc.2 - IL_5b1d: ldloc.1 - IL_5b1e: ldc.i4.2 - IL_5b1f: sub - IL_5b20: stloc.1 - IL_5b21: ldloc.2 - IL_5b22: ldloc.3 - IL_5b23: ldc.i4.1 - IL_5b24: sub - IL_5b25: ldloc.s V_4 - IL_5b27: sub - IL_5b28: add - IL_5b29: stloc.2 - IL_5b2a: ldloc.s V_5 - IL_5b2c: ldc.i4.1 - IL_5b2d: add - IL_5b2e: stloc.s V_5 - IL_5b30: ldloc.2 - IL_5b31: ldc.i4.1 - IL_5b32: add - IL_5b33: stloc.2 - IL_5b34: ldloc.1 - IL_5b35: ldloc.2 - IL_5b36: blt.s IL_5b72 - IL_5b38: ldloc.1 - IL_5b39: ldloc.2 - IL_5b3a: ldloc.3 - IL_5b3b: sub - IL_5b3c: sub - IL_5b3d: stloc.1 - IL_5b3e: ldloc.s V_4 - IL_5b40: ldc.i4.1 - IL_5b41: add - IL_5b42: stloc.s V_4 - IL_5b44: ldloc.s V_5 - IL_5b46: ldc.i4.1 - IL_5b47: sub - IL_5b48: stloc.s V_5 - IL_5b4a: ldloc.s V_5 - IL_5b4c: ldloc.s V_4 - IL_5b4e: ldloc.3 - IL_5b4f: ldc.i4.1 - IL_5b50: sub - IL_5b51: mul - IL_5b52: add - IL_5b53: stloc.s V_5 - IL_5b55: ldloc.2 - IL_5b56: ldc.i4.1 - IL_5b57: sub - IL_5b58: stloc.2 - IL_5b59: ldloc.1 - IL_5b5a: ldloc.s V_5 - IL_5b5c: sub - IL_5b5d: stloc.1 - IL_5b5e: ldloc.s V_4 - IL_5b60: ldloc.3 - IL_5b61: ldc.i4.2 - IL_5b62: add - IL_5b63: ldloc.2 - IL_5b64: mul - IL_5b65: add - IL_5b66: stloc.s V_4 - IL_5b68: ldloc.1 - IL_5b69: ldc.i4.1 - IL_5b6a: add - IL_5b6b: stloc.1 - IL_5b6c: ldloc.1 - IL_5b6d: ldc.i4.1 - IL_5b6e: sub - IL_5b6f: stloc.1 - IL_5b70: br.s IL_5ba9 - IL_5b72: ldloc.2 - IL_5b73: ldloc.3 - IL_5b74: ldloc.s V_4 - IL_5b76: add - IL_5b77: add - IL_5b78: stloc.2 - IL_5b79: ldloc.s V_5 - IL_5b7b: ldc.i4.1 - IL_5b7c: add - IL_5b7d: stloc.s V_5 - IL_5b7f: ldloc.3 - IL_5b80: ldc.i4.m1 - IL_5b81: add - IL_5b82: stloc.3 - IL_5b83: ldloc.s V_4 - IL_5b85: ldloc.s V_5 - IL_5b87: ldloc.1 - IL_5b88: ldc.i4.1 - IL_5b89: add - IL_5b8a: mul - IL_5b8b: mul - IL_5b8c: stloc.s V_4 - IL_5b8e: ldloc.2 - IL_5b8f: ldc.i4.1 - IL_5b90: add - IL_5b91: stloc.2 - IL_5b92: ldloc.1 - IL_5b93: ldc.i4.2 - IL_5b94: sub - IL_5b95: stloc.1 - IL_5b96: ldloc.2 - IL_5b97: ldloc.3 - IL_5b98: ldc.i4.1 - IL_5b99: sub - IL_5b9a: ldloc.s V_4 - IL_5b9c: add - IL_5b9d: add - IL_5b9e: stloc.2 - IL_5b9f: ldloc.s V_5 - IL_5ba1: ldc.i4.1 - IL_5ba2: add - IL_5ba3: stloc.s V_5 - IL_5ba5: ldloc.2 - IL_5ba6: ldc.i4.1 - IL_5ba7: add - IL_5ba8: stloc.2 - IL_5ba9: ldloc.1 - IL_5baa: ldloc.2 - IL_5bab: bne.un.s IL_5be7 - IL_5bad: ldloc.1 - IL_5bae: ldloc.2 - IL_5baf: ldloc.3 - IL_5bb0: sub - IL_5bb1: mul - IL_5bb2: stloc.1 - IL_5bb3: ldloc.s V_4 - IL_5bb5: ldc.i4.1 - IL_5bb6: add - IL_5bb7: stloc.s V_4 - IL_5bb9: ldloc.s V_5 - IL_5bbb: ldc.i4.1 - IL_5bbc: sub - IL_5bbd: stloc.s V_5 - IL_5bbf: ldloc.s V_5 - IL_5bc1: ldloc.s V_4 - IL_5bc3: ldloc.3 - IL_5bc4: ldc.i4.1 - IL_5bc5: sub - IL_5bc6: mul - IL_5bc7: mul - IL_5bc8: stloc.s V_5 - IL_5bca: ldloc.2 - IL_5bcb: ldc.i4.1 - IL_5bcc: sub - IL_5bcd: stloc.2 - IL_5bce: ldloc.1 - IL_5bcf: ldloc.s V_5 - IL_5bd1: sub - IL_5bd2: stloc.1 - IL_5bd3: ldloc.s V_4 - IL_5bd5: ldloc.3 - IL_5bd6: ldc.i4.2 - IL_5bd7: add - IL_5bd8: ldloc.2 - IL_5bd9: mul - IL_5bda: mul - IL_5bdb: stloc.s V_4 - IL_5bdd: ldloc.1 - IL_5bde: ldc.i4.1 - IL_5bdf: add - IL_5be0: stloc.1 - IL_5be1: ldloc.1 - IL_5be2: ldc.i4.1 - IL_5be3: sub - IL_5be4: stloc.1 - IL_5be5: br.s IL_5c1e - IL_5be7: ldloc.2 - IL_5be8: ldloc.3 - IL_5be9: ldloc.s V_4 - IL_5beb: mul - IL_5bec: mul - IL_5bed: stloc.2 - IL_5bee: ldloc.s V_5 - IL_5bf0: ldc.i4.1 - IL_5bf1: add - IL_5bf2: stloc.s V_5 - IL_5bf4: ldloc.3 - IL_5bf5: ldc.i4.m1 - IL_5bf6: add - IL_5bf7: stloc.3 - IL_5bf8: ldloc.s V_4 - IL_5bfa: ldloc.s V_5 - IL_5bfc: ldloc.1 - IL_5bfd: ldc.i4.1 - IL_5bfe: add - IL_5bff: add - IL_5c00: mul - IL_5c01: stloc.s V_4 - IL_5c03: ldloc.2 - IL_5c04: ldc.i4.1 - IL_5c05: add - IL_5c06: stloc.2 - IL_5c07: ldloc.1 - IL_5c08: ldc.i4.2 - IL_5c09: sub - IL_5c0a: stloc.1 - IL_5c0b: ldloc.2 - IL_5c0c: ldloc.3 - IL_5c0d: ldc.i4.1 - IL_5c0e: sub - IL_5c0f: ldloc.s V_4 - IL_5c11: add - IL_5c12: mul - IL_5c13: stloc.2 - IL_5c14: ldloc.s V_5 - IL_5c16: ldc.i4.1 - IL_5c17: add - IL_5c18: stloc.s V_5 - IL_5c1a: ldloc.2 - IL_5c1b: ldc.i4.1 - IL_5c1c: add - IL_5c1d: stloc.2 - IL_5c1e: ldloc.1 - IL_5c1f: ldloc.2 - IL_5c20: blt.s IL_5c5c - IL_5c22: ldloc.1 - IL_5c23: ldloc.2 - IL_5c24: ldloc.3 - IL_5c25: sub - IL_5c26: mul - IL_5c27: stloc.1 - IL_5c28: ldloc.s V_4 - IL_5c2a: ldc.i4.1 - IL_5c2b: add - IL_5c2c: stloc.s V_4 - IL_5c2e: ldloc.s V_5 - IL_5c30: ldc.i4.1 - IL_5c31: sub - IL_5c32: stloc.s V_5 - IL_5c34: ldloc.s V_5 - IL_5c36: ldloc.s V_4 - IL_5c38: ldloc.3 - IL_5c39: ldc.i4.1 - IL_5c3a: sub - IL_5c3b: add - IL_5c3c: mul - IL_5c3d: stloc.s V_5 - IL_5c3f: ldloc.2 - IL_5c40: ldc.i4.1 - IL_5c41: sub - IL_5c42: stloc.2 - IL_5c43: ldloc.1 - IL_5c44: ldloc.s V_5 - IL_5c46: sub - IL_5c47: stloc.1 - IL_5c48: ldloc.s V_4 - IL_5c4a: ldloc.3 - IL_5c4b: ldc.i4.2 - IL_5c4c: add - IL_5c4d: ldloc.2 - IL_5c4e: add - IL_5c4f: sub - IL_5c50: stloc.s V_4 - IL_5c52: ldloc.1 - IL_5c53: ldc.i4.1 - IL_5c54: add - IL_5c55: stloc.1 - IL_5c56: ldloc.1 - IL_5c57: ldc.i4.1 - IL_5c58: sub - IL_5c59: stloc.1 - IL_5c5a: br.s IL_5c93 - IL_5c5c: ldloc.2 - IL_5c5d: ldloc.3 - IL_5c5e: ldloc.s V_4 - IL_5c60: sub - IL_5c61: mul - IL_5c62: stloc.2 - IL_5c63: ldloc.s V_5 - IL_5c65: ldc.i4.1 - IL_5c66: add - IL_5c67: stloc.s V_5 - IL_5c69: ldloc.3 - IL_5c6a: ldc.i4.m1 - IL_5c6b: add - IL_5c6c: stloc.3 - IL_5c6d: ldloc.s V_4 - IL_5c6f: ldloc.s V_5 - IL_5c71: ldloc.1 - IL_5c72: ldc.i4.1 - IL_5c73: add - IL_5c74: mul - IL_5c75: add - IL_5c76: stloc.s V_4 - IL_5c78: ldloc.2 - IL_5c79: ldc.i4.1 - IL_5c7a: add - IL_5c7b: stloc.2 - IL_5c7c: ldloc.1 - IL_5c7d: ldc.i4.2 - IL_5c7e: sub - IL_5c7f: stloc.1 - IL_5c80: ldloc.2 - IL_5c81: ldloc.3 - IL_5c82: ldc.i4.1 - IL_5c83: sub - IL_5c84: ldloc.s V_4 - IL_5c86: sub - IL_5c87: mul - IL_5c88: stloc.2 - IL_5c89: ldloc.s V_5 - IL_5c8b: ldc.i4.1 - IL_5c8c: add - IL_5c8d: stloc.s V_5 - IL_5c8f: ldloc.2 - IL_5c90: ldc.i4.1 - IL_5c91: add - IL_5c92: stloc.2 - IL_5c93: ldloc.3 - IL_5c94: ldloc.2 - IL_5c95: bne.un.s IL_5cd1 - IL_5c97: ldloc.1 - IL_5c98: ldloc.2 - IL_5c99: ldloc.3 - IL_5c9a: mul - IL_5c9b: mul - IL_5c9c: stloc.1 - IL_5c9d: ldloc.s V_4 - IL_5c9f: ldc.i4.1 - IL_5ca0: add - IL_5ca1: stloc.s V_4 - IL_5ca3: ldloc.s V_5 - IL_5ca5: ldc.i4.1 - IL_5ca6: sub - IL_5ca7: stloc.s V_5 - IL_5ca9: ldloc.s V_5 - IL_5cab: ldloc.s V_4 - IL_5cad: ldloc.3 - IL_5cae: ldc.i4.1 - IL_5caf: sub - IL_5cb0: add - IL_5cb1: add - IL_5cb2: stloc.s V_5 - IL_5cb4: ldloc.2 - IL_5cb5: ldc.i4.1 - IL_5cb6: sub - IL_5cb7: stloc.2 - IL_5cb8: ldloc.1 - IL_5cb9: ldloc.s V_5 - IL_5cbb: sub - IL_5cbc: stloc.1 - IL_5cbd: ldloc.s V_4 - IL_5cbf: ldloc.3 - IL_5cc0: ldc.i4.2 - IL_5cc1: add - IL_5cc2: ldloc.2 - IL_5cc3: add - IL_5cc4: add - IL_5cc5: stloc.s V_4 - IL_5cc7: ldloc.1 - IL_5cc8: ldc.i4.1 - IL_5cc9: add - IL_5cca: stloc.1 - IL_5ccb: ldloc.1 - IL_5ccc: ldc.i4.1 - IL_5ccd: sub - IL_5cce: stloc.1 - IL_5ccf: br.s IL_5d08 - IL_5cd1: ldloc.2 - IL_5cd2: ldloc.3 - IL_5cd3: ldloc.s V_4 - IL_5cd5: add - IL_5cd6: add - IL_5cd7: stloc.2 - IL_5cd8: ldloc.s V_5 - IL_5cda: ldc.i4.1 - IL_5cdb: add - IL_5cdc: stloc.s V_5 - IL_5cde: ldloc.3 - IL_5cdf: ldc.i4.m1 - IL_5ce0: add - IL_5ce1: stloc.3 - IL_5ce2: ldloc.s V_4 - IL_5ce4: ldloc.s V_5 - IL_5ce6: ldloc.1 - IL_5ce7: ldc.i4.1 - IL_5ce8: add - IL_5ce9: add - IL_5cea: add - IL_5ceb: stloc.s V_4 - IL_5ced: ldloc.2 - IL_5cee: ldc.i4.1 - IL_5cef: add - IL_5cf0: stloc.2 - IL_5cf1: ldloc.1 - IL_5cf2: ldc.i4.2 - IL_5cf3: sub - IL_5cf4: stloc.1 - IL_5cf5: ldloc.2 - IL_5cf6: ldloc.3 - IL_5cf7: ldc.i4.1 - IL_5cf8: sub - IL_5cf9: ldloc.s V_4 - IL_5cfb: mul - IL_5cfc: add - IL_5cfd: stloc.2 - IL_5cfe: ldloc.s V_5 - IL_5d00: ldc.i4.1 - IL_5d01: add - IL_5d02: stloc.s V_5 - IL_5d04: ldloc.2 - IL_5d05: ldc.i4.1 - IL_5d06: add - IL_5d07: stloc.2 - IL_5d08: ldloc.1 - IL_5d09: ldloc.2 - IL_5d0a: beq.s IL_5d46 - IL_5d0c: ldloc.1 - IL_5d0d: ldloc.2 - IL_5d0e: ldloc.3 - IL_5d0f: sub - IL_5d10: sub - IL_5d11: stloc.1 - IL_5d12: ldloc.s V_4 - IL_5d14: ldc.i4.1 - IL_5d15: add - IL_5d16: stloc.s V_4 - IL_5d18: ldloc.s V_5 - IL_5d1a: ldc.i4.1 - IL_5d1b: sub - IL_5d1c: stloc.s V_5 - IL_5d1e: ldloc.s V_5 - IL_5d20: ldloc.s V_4 - IL_5d22: ldloc.3 - IL_5d23: ldc.i4.1 - IL_5d24: sub - IL_5d25: sub - IL_5d26: mul - IL_5d27: stloc.s V_5 - IL_5d29: ldloc.2 - IL_5d2a: ldc.i4.1 - IL_5d2b: sub - IL_5d2c: stloc.2 - IL_5d2d: ldloc.1 - IL_5d2e: ldloc.s V_5 - IL_5d30: sub - IL_5d31: stloc.1 - IL_5d32: ldloc.s V_4 - IL_5d34: ldloc.3 - IL_5d35: ldc.i4.2 - IL_5d36: add - IL_5d37: ldloc.2 - IL_5d38: sub - IL_5d39: add - IL_5d3a: stloc.s V_4 - IL_5d3c: ldloc.1 - IL_5d3d: ldc.i4.1 - IL_5d3e: add - IL_5d3f: stloc.1 - IL_5d40: ldloc.1 - IL_5d41: ldc.i4.1 - IL_5d42: sub - IL_5d43: stloc.1 - IL_5d44: br.s IL_5d7d - IL_5d46: ldloc.2 - IL_5d47: ldloc.3 - IL_5d48: ldloc.s V_4 - IL_5d4a: add - IL_5d4b: mul - IL_5d4c: stloc.2 - IL_5d4d: ldloc.s V_5 - IL_5d4f: ldc.i4.1 - IL_5d50: add - IL_5d51: stloc.s V_5 - IL_5d53: ldloc.3 - IL_5d54: ldc.i4.m1 - IL_5d55: add - IL_5d56: stloc.3 - IL_5d57: ldloc.s V_4 - IL_5d59: ldloc.s V_5 - IL_5d5b: ldloc.1 - IL_5d5c: ldc.i4.1 - IL_5d5d: add - IL_5d5e: add - IL_5d5f: sub - IL_5d60: stloc.s V_4 - IL_5d62: ldloc.2 - IL_5d63: ldc.i4.1 - IL_5d64: add - IL_5d65: stloc.2 - IL_5d66: ldloc.1 - IL_5d67: ldc.i4.2 - IL_5d68: sub - IL_5d69: stloc.1 - IL_5d6a: ldloc.2 - IL_5d6b: ldloc.3 - IL_5d6c: ldc.i4.1 - IL_5d6d: sub - IL_5d6e: ldloc.s V_4 - IL_5d70: add - IL_5d71: mul - IL_5d72: stloc.2 - IL_5d73: ldloc.s V_5 - IL_5d75: ldc.i4.1 - IL_5d76: add - IL_5d77: stloc.s V_5 - IL_5d79: ldloc.2 - IL_5d7a: ldc.i4.1 - IL_5d7b: add - IL_5d7c: stloc.2 - IL_5d7d: ldloc.1 - IL_5d7e: ldloc.2 - IL_5d7f: bgt.s IL_5dbb - IL_5d81: ldloc.1 - IL_5d82: ldloc.2 - IL_5d83: ldloc.3 - IL_5d84: add - IL_5d85: add - IL_5d86: stloc.1 - IL_5d87: ldloc.s V_4 - IL_5d89: ldc.i4.1 - IL_5d8a: add - IL_5d8b: stloc.s V_4 - IL_5d8d: ldloc.s V_5 - IL_5d8f: ldc.i4.1 - IL_5d90: sub - IL_5d91: stloc.s V_5 - IL_5d93: ldloc.s V_5 - IL_5d95: ldloc.s V_4 - IL_5d97: ldloc.3 - IL_5d98: ldc.i4.1 - IL_5d99: sub - IL_5d9a: sub - IL_5d9b: sub - IL_5d9c: stloc.s V_5 - IL_5d9e: ldloc.2 - IL_5d9f: ldc.i4.1 - IL_5da0: sub - IL_5da1: stloc.2 - IL_5da2: ldloc.1 - IL_5da3: ldloc.s V_5 - IL_5da5: sub - IL_5da6: stloc.1 - IL_5da7: ldloc.s V_4 - IL_5da9: ldloc.3 - IL_5daa: ldc.i4.2 - IL_5dab: add - IL_5dac: ldloc.2 - IL_5dad: sub - IL_5dae: sub - IL_5daf: stloc.s V_4 - IL_5db1: ldloc.1 - IL_5db2: ldc.i4.1 - IL_5db3: add - IL_5db4: stloc.1 - IL_5db5: ldloc.1 - IL_5db6: ldc.i4.1 - IL_5db7: sub - IL_5db8: stloc.1 - IL_5db9: br.s IL_5df2 - IL_5dbb: ldloc.2 - IL_5dbc: ldloc.3 - IL_5dbd: ldloc.s V_4 - IL_5dbf: sub - IL_5dc0: sub - IL_5dc1: stloc.2 - IL_5dc2: ldloc.s V_5 - IL_5dc4: ldc.i4.1 - IL_5dc5: add - IL_5dc6: stloc.s V_5 - IL_5dc8: ldloc.3 - IL_5dc9: ldc.i4.m1 - IL_5dca: add - IL_5dcb: stloc.3 - IL_5dcc: ldloc.s V_4 - IL_5dce: ldloc.s V_5 - IL_5dd0: ldloc.1 - IL_5dd1: ldc.i4.1 - IL_5dd2: add - IL_5dd3: add - IL_5dd4: sub - IL_5dd5: stloc.s V_4 - IL_5dd7: ldloc.2 - IL_5dd8: ldc.i4.1 - IL_5dd9: add - IL_5dda: stloc.2 - IL_5ddb: ldloc.1 - IL_5ddc: ldc.i4.2 - IL_5ddd: sub - IL_5dde: stloc.1 - IL_5ddf: ldloc.2 - IL_5de0: ldloc.3 - IL_5de1: ldc.i4.1 - IL_5de2: sub - IL_5de3: ldloc.s V_4 - IL_5de5: mul - IL_5de6: sub - IL_5de7: stloc.2 - IL_5de8: ldloc.s V_5 - IL_5dea: ldc.i4.1 - IL_5deb: add - IL_5dec: stloc.s V_5 - IL_5dee: ldloc.2 - IL_5def: ldc.i4.1 - IL_5df0: add - IL_5df1: stloc.2 - IL_5df2: ldloc.1 - IL_5df3: ldloc.2 - IL_5df4: bgt.s IL_5e30 - IL_5df6: ldloc.1 - IL_5df7: ldloc.2 - IL_5df8: ldloc.3 - IL_5df9: add - IL_5dfa: add - IL_5dfb: stloc.1 - IL_5dfc: ldloc.s V_4 - IL_5dfe: ldc.i4.1 - IL_5dff: add - IL_5e00: stloc.s V_4 - IL_5e02: ldloc.s V_5 - IL_5e04: ldc.i4.1 - IL_5e05: sub - IL_5e06: stloc.s V_5 - IL_5e08: ldloc.s V_5 - IL_5e0a: ldloc.s V_4 - IL_5e0c: ldloc.3 - IL_5e0d: ldc.i4.1 - IL_5e0e: sub - IL_5e0f: mul - IL_5e10: add - IL_5e11: stloc.s V_5 - IL_5e13: ldloc.2 - IL_5e14: ldc.i4.1 - IL_5e15: sub - IL_5e16: stloc.2 - IL_5e17: ldloc.1 - IL_5e18: ldloc.s V_5 - IL_5e1a: sub - IL_5e1b: stloc.1 - IL_5e1c: ldloc.s V_4 - IL_5e1e: ldloc.3 - IL_5e1f: ldc.i4.2 - IL_5e20: add - IL_5e21: ldloc.2 - IL_5e22: mul - IL_5e23: sub - IL_5e24: stloc.s V_4 - IL_5e26: ldloc.1 - IL_5e27: ldc.i4.1 - IL_5e28: add - IL_5e29: stloc.1 - IL_5e2a: ldloc.1 - IL_5e2b: ldc.i4.1 - IL_5e2c: sub - IL_5e2d: stloc.1 - IL_5e2e: br.s IL_5e67 - IL_5e30: ldloc.2 - IL_5e31: ldloc.3 - IL_5e32: ldloc.s V_4 - IL_5e34: sub - IL_5e35: add - IL_5e36: stloc.2 - IL_5e37: ldloc.s V_5 - IL_5e39: ldc.i4.1 - IL_5e3a: add - IL_5e3b: stloc.s V_5 - IL_5e3d: ldloc.3 - IL_5e3e: ldc.i4.m1 - IL_5e3f: add - IL_5e40: stloc.3 - IL_5e41: ldloc.s V_4 - IL_5e43: ldloc.s V_5 - IL_5e45: ldloc.1 - IL_5e46: ldc.i4.1 - IL_5e47: add - IL_5e48: add - IL_5e49: mul - IL_5e4a: stloc.s V_4 - IL_5e4c: ldloc.2 - IL_5e4d: ldc.i4.1 - IL_5e4e: add - IL_5e4f: stloc.2 - IL_5e50: ldloc.1 - IL_5e51: ldc.i4.2 - IL_5e52: sub - IL_5e53: stloc.1 - IL_5e54: ldloc.2 - IL_5e55: ldloc.3 - IL_5e56: ldc.i4.1 - IL_5e57: sub - IL_5e58: ldloc.s V_4 - IL_5e5a: mul - IL_5e5b: add - IL_5e5c: stloc.2 - IL_5e5d: ldloc.s V_5 - IL_5e5f: ldc.i4.1 - IL_5e60: add - IL_5e61: stloc.s V_5 - IL_5e63: ldloc.2 - IL_5e64: ldc.i4.1 - IL_5e65: add - IL_5e66: stloc.2 - IL_5e67: ldloc.1 - IL_5e68: ldloc.2 - IL_5e69: bgt.s IL_5ea5 - IL_5e6b: ldloc.1 - IL_5e6c: ldloc.2 - IL_5e6d: ldloc.3 - IL_5e6e: mul - IL_5e6f: mul - IL_5e70: stloc.1 - IL_5e71: ldloc.s V_4 - IL_5e73: ldc.i4.1 - IL_5e74: add - IL_5e75: stloc.s V_4 - IL_5e77: ldloc.s V_5 - IL_5e79: ldc.i4.1 - IL_5e7a: sub - IL_5e7b: stloc.s V_5 - IL_5e7d: ldloc.s V_5 - IL_5e7f: ldloc.s V_4 - IL_5e81: ldloc.3 - IL_5e82: ldc.i4.1 - IL_5e83: sub - IL_5e84: add - IL_5e85: mul - IL_5e86: stloc.s V_5 - IL_5e88: ldloc.2 - IL_5e89: ldc.i4.1 - IL_5e8a: sub - IL_5e8b: stloc.2 - IL_5e8c: ldloc.1 - IL_5e8d: ldloc.s V_5 - IL_5e8f: sub - IL_5e90: stloc.1 - IL_5e91: ldloc.s V_4 - IL_5e93: ldloc.3 - IL_5e94: ldc.i4.2 - IL_5e95: add - IL_5e96: ldloc.2 - IL_5e97: add - IL_5e98: mul - IL_5e99: stloc.s V_4 - IL_5e9b: ldloc.1 - IL_5e9c: ldc.i4.1 - IL_5e9d: add - IL_5e9e: stloc.1 - IL_5e9f: ldloc.1 - IL_5ea0: ldc.i4.1 - IL_5ea1: sub - IL_5ea2: stloc.1 - IL_5ea3: br.s IL_5edc - IL_5ea5: ldloc.2 - IL_5ea6: ldloc.3 - IL_5ea7: ldloc.s V_4 - IL_5ea9: mul - IL_5eaa: mul - IL_5eab: stloc.2 - IL_5eac: ldloc.s V_5 - IL_5eae: ldc.i4.1 - IL_5eaf: add - IL_5eb0: stloc.s V_5 - IL_5eb2: ldloc.3 - IL_5eb3: ldc.i4.m1 - IL_5eb4: add - IL_5eb5: stloc.3 - IL_5eb6: ldloc.s V_4 - IL_5eb8: ldloc.s V_5 - IL_5eba: ldloc.1 - IL_5ebb: ldc.i4.1 - IL_5ebc: add - IL_5ebd: mul - IL_5ebe: add - IL_5ebf: stloc.s V_4 - IL_5ec1: ldloc.2 - IL_5ec2: ldc.i4.1 - IL_5ec3: add - IL_5ec4: stloc.2 - IL_5ec5: ldloc.1 - IL_5ec6: ldc.i4.2 - IL_5ec7: sub - IL_5ec8: stloc.1 - IL_5ec9: ldloc.2 - IL_5eca: ldloc.3 - IL_5ecb: ldc.i4.1 - IL_5ecc: sub - IL_5ecd: ldloc.s V_4 - IL_5ecf: mul - IL_5ed0: mul - IL_5ed1: stloc.2 - IL_5ed2: ldloc.s V_5 - IL_5ed4: ldc.i4.1 - IL_5ed5: add - IL_5ed6: stloc.s V_5 - IL_5ed8: ldloc.2 - IL_5ed9: ldc.i4.1 - IL_5eda: add - IL_5edb: stloc.2 - IL_5edc: ldloc.1 - IL_5edd: ldloc.2 - IL_5ede: bgt.s IL_5f0e - IL_5ee0: ldloc.1 - IL_5ee1: ldloc.2 - IL_5ee2: ldloc.3 - IL_5ee3: sub - IL_5ee4: mul - IL_5ee5: stloc.1 - IL_5ee6: ldloc.s V_4 - IL_5ee8: ldc.i4.1 - IL_5ee9: add - IL_5eea: stloc.s V_4 - IL_5eec: ldloc.s V_5 - IL_5eee: ldc.i4.1 - IL_5eef: sub - IL_5ef0: stloc.s V_5 - IL_5ef2: ldloc.s V_5 - IL_5ef4: ldloc.s V_4 - IL_5ef6: ldloc.3 - IL_5ef7: ldc.i4.1 - IL_5ef8: sub - IL_5ef9: mul - IL_5efa: sub - IL_5efb: stloc.s V_5 - IL_5efd: ldloc.s V_4 - IL_5eff: ldloc.s V_5 - IL_5f01: ldloc.1 - IL_5f02: ldc.i4.1 - IL_5f03: add - IL_5f04: sub - IL_5f05: mul - IL_5f06: stloc.s V_4 - IL_5f08: ldloc.2 - IL_5f09: ldc.i4.1 - IL_5f0a: sub - IL_5f0b: stloc.2 - IL_5f0c: br.s IL_5f38 - IL_5f0e: ldloc.2 - IL_5f0f: ldloc.3 - IL_5f10: ldloc.s V_4 - IL_5f12: sub - IL_5f13: sub - IL_5f14: stloc.2 - IL_5f15: ldloc.s V_5 - IL_5f17: ldc.i4.1 - IL_5f18: add - IL_5f19: stloc.s V_5 - IL_5f1b: ldloc.3 - IL_5f1c: ldc.i4.m1 - IL_5f1d: add - IL_5f1e: stloc.3 - IL_5f1f: ldloc.s V_4 - IL_5f21: ldloc.s V_5 - IL_5f23: ldloc.1 - IL_5f24: ldc.i4.1 - IL_5f25: add - IL_5f26: sub - IL_5f27: mul - IL_5f28: stloc.s V_4 - IL_5f2a: ldloc.2 - IL_5f2b: ldc.i4.1 - IL_5f2c: add - IL_5f2d: stloc.2 - IL_5f2e: ldloc.1 - IL_5f2f: ldc.i4.2 - IL_5f30: sub - IL_5f31: stloc.1 - IL_5f32: ldloc.s V_5 - IL_5f34: ldc.i4.1 - IL_5f35: add - IL_5f36: stloc.s V_5 - IL_5f38: ldstr "a is: " - IL_5f3d: ldloc.1 - IL_5f3e: box [mscorlib]System.Int32 - IL_5f43: call string [mscorlib]System.String::Concat(object,object) - IL_5f48: call void [System.Console]System.Console::WriteLine(string) - IL_5f4d: ldstr "b is: " - IL_5f52: ldloc.2 - IL_5f53: box [mscorlib]System.Int32 - IL_5f58: call string [mscorlib]System.String::Concat(object,object) - IL_5f5d: call void [System.Console]System.Console::WriteLine(string) - IL_5f62: ldstr "c is: " - IL_5f67: ldloc.3 - IL_5f68: box [mscorlib]System.Int32 - IL_5f6d: call string [mscorlib]System.String::Concat(object,object) - IL_5f72: call void [System.Console]System.Console::WriteLine(string) - IL_5f77: ldstr "d is: " - IL_5f7c: ldloc.s V_4 - IL_5f7e: box [mscorlib]System.Int32 - IL_5f83: call string [mscorlib]System.String::Concat(object,object) - IL_5f88: call void [System.Console]System.Console::WriteLine(string) - IL_5f8d: ldstr "e is: " - IL_5f92: ldloc.s V_5 - IL_5f94: box [mscorlib]System.Int32 - IL_5f99: call string [mscorlib]System.String::Concat(object,object) - IL_5f9e: call void [System.Console]System.Console::WriteLine(string) - IL_5fa3: ldc.i4.s 100 - IL_5fa5: stloc.s V_6 - IL_5fa7: br.s IL_5fa9 - IL_5fa9: ldloc.s V_6 - IL_5fab: ret - } // end of method InstrCnt1::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method InstrCnt1::.ctor - -} diff --git a/src/coreclr/tests/src/JIT/opt/DumpDisasm/JitMinOpts/LVNumCnt1.il b/src/coreclr/tests/src/JIT/opt/DumpDisasm/JitMinOpts/LVNumCnt1.il deleted file mode 100644 index 2e4f984b785c..000000000000 --- a/src/coreclr/tests/src/JIT/opt/DumpDisasm/JitMinOpts/LVNumCnt1.il +++ /dev/null @@ -1,2048 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// DEFAULT_MIN_OPTS_LV_NUM_COUNT 2000 -// V2000 (loc2000) int -// OPTIONS: opts.MinOpts() == true -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly LVNumCnt1 {} -.method public static int32 Main() -{ -.entrypoint -call int32 TestLVNumCnt() -ldc.i4 100000199 -add -ret -} -.method public static int32 TestLVNumCnt() -{ -.locals init ( -int32 V_1, -int32 V_2, -int32 V_3, -int32 V_4, -int32 V_5, -int32 V_6, -int32 V_7, -int32 V_8, -int32 V_9, -int32 V_10, -int32 V_11, -int32 V_12, -int32 V_13, -int32 V_14, -int32 V_15, -int32 V_16, -int32 V_17, -int32 V_18, -int32 V_19, -int32 V_20, -int32 V_21, -int32 V_22, -int32 V_23, -int32 V_24, -int32 V_25, -int32 V_26, -int32 V_27, -int32 V_28, -int32 V_29, -int32 V_30, -int32 V_31, -int32 V_32, -int32 V_33, -int32 V_34, -int32 V_35, -int32 V_36, -int32 V_37, -int32 V_38, -int32 V_39, -int32 V_40, -int32 V_41, -int32 V_42, -int32 V_43, -int32 V_44, -int32 V_45, -int32 V_46, -int32 V_47, -int32 V_48, -int32 V_49, -int32 V_50, -int32 V_51, -int32 V_52, -int32 V_53, -int32 V_54, -int32 V_55, -int32 V_56, -int32 V_57, -int32 V_58, -int32 V_59, -int32 V_60, -int32 V_61, -int32 V_62, -int32 V_63, -int32 V_64, -int32 V_65, -int32 V_66, -int32 V_67, -int32 V_68, -int32 V_69, -int32 V_70, -int32 V_71, -int32 V_72, -int32 V_73, -int32 V_74, -int32 V_75, -int32 V_76, -int32 V_77, -int32 V_78, -int32 V_79, -int32 V_80, -int32 V_81, -int32 V_82, -int32 V_83, -int32 V_84, -int32 V_85, -int32 V_86, -int32 V_87, -int32 V_88, -int32 V_89, -int32 V_90, -int32 V_91, -int32 V_92, -int32 V_93, -int32 V_94, -int32 V_95, -int32 V_96, -int32 V_97, -int32 V_98, -int32 V_99, -int32 V_100, -int32 V_101, -int32 V_102, -int32 V_103, -int32 V_104, -int32 V_105, -int32 V_106, -int32 V_107, -int32 V_108, -int32 V_109, -int32 V_110, -int32 V_111, -int32 V_112, -int32 V_113, -int32 V_114, -int32 V_115, -int32 V_116, -int32 V_117, -int32 V_118, -int32 V_119, -int32 V_120, -int32 V_121, -int32 V_122, -int32 V_123, -int32 V_124, -int32 V_125, -int32 V_126, -int32 V_127, -int32 V_128, -int32 V_129, -int32 V_130, -int32 V_131, -int32 V_132, -int32 V_133, -int32 V_134, -int32 V_135, -int32 V_136, -int32 V_137, -int32 V_138, -int32 V_139, -int32 V_140, -int32 V_141, -int32 V_142, -int32 V_143, -int32 V_144, -int32 V_145, -int32 V_146, -int32 V_147, -int32 V_148, -int32 V_149, -int32 V_150, -int32 V_151, -int32 V_152, -int32 V_153, -int32 V_154, -int32 V_155, -int32 V_156, -int32 V_157, -int32 V_158, -int32 V_159, -int32 V_160, -int32 V_161, -int32 V_162, -int32 V_163, -int32 V_164, -int32 V_165, -int32 V_166, -int32 V_167, -int32 V_168, -int32 V_169, -int32 V_170, -int32 V_171, -int32 V_172, -int32 V_173, -int32 V_174, -int32 V_175, -int32 V_176, -int32 V_177, -int32 V_178, -int32 V_179, -int32 V_180, -int32 V_181, -int32 V_182, -int32 V_183, -int32 V_184, -int32 V_185, -int32 V_186, -int32 V_187, -int32 V_188, -int32 V_189, -int32 V_190, -int32 V_191, -int32 V_192, -int32 V_193, -int32 V_194, -int32 V_195, -int32 V_196, -int32 V_197, -int32 V_198, -int32 V_199, -int32 V_200, -int32 V_201, -int32 V_202, -int32 V_203, -int32 V_204, -int32 V_205, -int32 V_206, -int32 V_207, -int32 V_208, -int32 V_209, -int32 V_210, -int32 V_211, -int32 V_212, -int32 V_213, -int32 V_214, -int32 V_215, -int32 V_216, -int32 V_217, -int32 V_218, -int32 V_219, -int32 V_220, -int32 V_221, -int32 V_222, -int32 V_223, -int32 V_224, -int32 V_225, -int32 V_226, -int32 V_227, -int32 V_228, -int32 V_229, -int32 V_230, -int32 V_231, -int32 V_232, -int32 V_233, -int32 V_234, -int32 V_235, -int32 V_236, -int32 V_237, -int32 V_238, -int32 V_239, -int32 V_240, -int32 V_241, -int32 V_242, -int32 V_243, -int32 V_244, -int32 V_245, -int32 V_246, -int32 V_247, -int32 V_248, -int32 V_249, -int32 V_250, -int32 V_251, -int32 V_252, -int32 V_253, -int32 V_254, -int32 V_255, -int32 V_256, -int32 V_257, -int32 V_258, -int32 V_259, -int32 V_260, -int32 V_261, -int32 V_262, -int32 V_263, -int32 V_264, -int32 V_265, -int32 V_266, -int32 V_267, -int32 V_268, -int32 V_269, -int32 V_270, -int32 V_271, -int32 V_272, -int32 V_273, -int32 V_274, -int32 V_275, -int32 V_276, -int32 V_277, -int32 V_278, -int32 V_279, -int32 V_280, -int32 V_281, -int32 V_282, -int32 V_283, -int32 V_284, -int32 V_285, -int32 V_286, -int32 V_287, -int32 V_288, -int32 V_289, -int32 V_290, -int32 V_291, -int32 V_292, -int32 V_293, -int32 V_294, -int32 V_295, -int32 V_296, -int32 V_297, -int32 V_298, -int32 V_299, -int32 V_300, -int32 V_301, -int32 V_302, -int32 V_303, -int32 V_304, -int32 V_305, -int32 V_306, -int32 V_307, -int32 V_308, -int32 V_309, -int32 V_310, -int32 V_311, -int32 V_312, -int32 V_313, -int32 V_314, -int32 V_315, -int32 V_316, -int32 V_317, -int32 V_318, -int32 V_319, -int32 V_320, -int32 V_321, -int32 V_322, -int32 V_323, -int32 V_324, -int32 V_325, -int32 V_326, -int32 V_327, -int32 V_328, -int32 V_329, -int32 V_330, -int32 V_331, -int32 V_332, -int32 V_333, -int32 V_334, -int32 V_335, -int32 V_336, -int32 V_337, -int32 V_338, -int32 V_339, -int32 V_340, -int32 V_341, -int32 V_342, -int32 V_343, -int32 V_344, -int32 V_345, -int32 V_346, -int32 V_347, -int32 V_348, -int32 V_349, -int32 V_350, -int32 V_351, -int32 V_352, -int32 V_353, -int32 V_354, -int32 V_355, -int32 V_356, -int32 V_357, -int32 V_358, -int32 V_359, -int32 V_360, -int32 V_361, -int32 V_362, -int32 V_363, -int32 V_364, -int32 V_365, -int32 V_366, -int32 V_367, -int32 V_368, -int32 V_369, -int32 V_370, -int32 V_371, -int32 V_372, -int32 V_373, -int32 V_374, -int32 V_375, -int32 V_376, -int32 V_377, -int32 V_378, -int32 V_379, -int32 V_380, -int32 V_381, -int32 V_382, -int32 V_383, -int32 V_384, -int32 V_385, -int32 V_386, -int32 V_387, -int32 V_388, -int32 V_389, -int32 V_390, -int32 V_391, -int32 V_392, -int32 V_393, -int32 V_394, -int32 V_395, -int32 V_396, -int32 V_397, -int32 V_398, -int32 V_399, -int32 V_400, -int32 V_401, -int32 V_402, -int32 V_403, -int32 V_404, -int32 V_405, -int32 V_406, -int32 V_407, -int32 V_408, -int32 V_409, -int32 V_410, -int32 V_411, -int32 V_412, -int32 V_413, -int32 V_414, -int32 V_415, -int32 V_416, -int32 V_417, -int32 V_418, -int32 V_419, -int32 V_420, -int32 V_421, -int32 V_422, -int32 V_423, -int32 V_424, -int32 V_425, -int32 V_426, -int32 V_427, -int32 V_428, -int32 V_429, -int32 V_430, -int32 V_431, -int32 V_432, -int32 V_433, -int32 V_434, -int32 V_435, -int32 V_436, -int32 V_437, -int32 V_438, -int32 V_439, -int32 V_440, -int32 V_441, -int32 V_442, -int32 V_443, -int32 V_444, -int32 V_445, -int32 V_446, -int32 V_447, -int32 V_448, -int32 V_449, -int32 V_450, -int32 V_451, -int32 V_452, -int32 V_453, -int32 V_454, -int32 V_455, -int32 V_456, -int32 V_457, -int32 V_458, -int32 V_459, -int32 V_460, -int32 V_461, -int32 V_462, -int32 V_463, -int32 V_464, -int32 V_465, -int32 V_466, -int32 V_467, -int32 V_468, -int32 V_469, -int32 V_470, -int32 V_471, -int32 V_472, -int32 V_473, -int32 V_474, -int32 V_475, -int32 V_476, -int32 V_477, -int32 V_478, -int32 V_479, -int32 V_480, -int32 V_481, -int32 V_482, -int32 V_483, -int32 V_484, -int32 V_485, -int32 V_486, -int32 V_487, -int32 V_488, -int32 V_489, -int32 V_490, -int32 V_491, -int32 V_492, -int32 V_493, -int32 V_494, -int32 V_495, -int32 V_496, -int32 V_497, -int32 V_498, -int32 V_499, -int32 V_500, -int32 V_501, -int32 V_502, -int32 V_503, -int32 V_504, -int32 V_505, -int32 V_506, -int32 V_507, -int32 V_508, -int32 V_509, -int32 V_510, -int32 V_511, -int32 V_512, -int32 V_513, -int32 V_514, -int32 V_515, -int32 V_516, -int32 V_517, -int32 V_518, -int32 V_519, -int32 V_520, -int32 V_521, -int32 V_522, -int32 V_523, -int32 V_524, -int32 V_525, -int32 V_526, -int32 V_527, -int32 V_528, -int32 V_529, -int32 V_530, -int32 V_531, -int32 V_532, -int32 V_533, -int32 V_534, -int32 V_535, -int32 V_536, -int32 V_537, -int32 V_538, -int32 V_539, -int32 V_540, -int32 V_541, -int32 V_542, -int32 V_543, -int32 V_544, -int32 V_545, -int32 V_546, -int32 V_547, -int32 V_548, -int32 V_549, -int32 V_550, -int32 V_551, -int32 V_552, -int32 V_553, -int32 V_554, -int32 V_555, -int32 V_556, -int32 V_557, -int32 V_558, -int32 V_559, -int32 V_560, -int32 V_561, -int32 V_562, -int32 V_563, -int32 V_564, -int32 V_565, -int32 V_566, -int32 V_567, -int32 V_568, -int32 V_569, -int32 V_570, -int32 V_571, -int32 V_572, -int32 V_573, -int32 V_574, -int32 V_575, -int32 V_576, -int32 V_577, -int32 V_578, -int32 V_579, -int32 V_580, -int32 V_581, -int32 V_582, -int32 V_583, -int32 V_584, -int32 V_585, -int32 V_586, -int32 V_587, -int32 V_588, -int32 V_589, -int32 V_590, -int32 V_591, -int32 V_592, -int32 V_593, -int32 V_594, -int32 V_595, -int32 V_596, -int32 V_597, -int32 V_598, -int32 V_599, -int32 V_600, -int32 V_601, -int32 V_602, -int32 V_603, -int32 V_604, -int32 V_605, -int32 V_606, -int32 V_607, -int32 V_608, -int32 V_609, -int32 V_610, -int32 V_611, -int32 V_612, -int32 V_613, -int32 V_614, -int32 V_615, -int32 V_616, -int32 V_617, -int32 V_618, -int32 V_619, -int32 V_620, -int32 V_621, -int32 V_622, -int32 V_623, -int32 V_624, -int32 V_625, -int32 V_626, -int32 V_627, -int32 V_628, -int32 V_629, -int32 V_630, -int32 V_631, -int32 V_632, -int32 V_633, -int32 V_634, -int32 V_635, -int32 V_636, -int32 V_637, -int32 V_638, -int32 V_639, -int32 V_640, -int32 V_641, -int32 V_642, -int32 V_643, -int32 V_644, -int32 V_645, -int32 V_646, -int32 V_647, -int32 V_648, -int32 V_649, -int32 V_650, -int32 V_651, -int32 V_652, -int32 V_653, -int32 V_654, -int32 V_655, -int32 V_656, -int32 V_657, -int32 V_658, -int32 V_659, -int32 V_660, -int32 V_661, -int32 V_662, -int32 V_663, -int32 V_664, -int32 V_665, -int32 V_666, -int32 V_667, -int32 V_668, -int32 V_669, -int32 V_670, -int32 V_671, -int32 V_672, -int32 V_673, -int32 V_674, -int32 V_675, -int32 V_676, -int32 V_677, -int32 V_678, -int32 V_679, -int32 V_680, -int32 V_681, -int32 V_682, -int32 V_683, -int32 V_684, -int32 V_685, -int32 V_686, -int32 V_687, -int32 V_688, -int32 V_689, -int32 V_690, -int32 V_691, -int32 V_692, -int32 V_693, -int32 V_694, -int32 V_695, -int32 V_696, -int32 V_697, -int32 V_698, -int32 V_699, -int32 V_700, -int32 V_701, -int32 V_702, -int32 V_703, -int32 V_704, -int32 V_705, -int32 V_706, -int32 V_707, -int32 V_708, -int32 V_709, -int32 V_710, -int32 V_711, -int32 V_712, -int32 V_713, -int32 V_714, -int32 V_715, -int32 V_716, -int32 V_717, -int32 V_718, -int32 V_719, -int32 V_720, -int32 V_721, -int32 V_722, -int32 V_723, -int32 V_724, -int32 V_725, -int32 V_726, -int32 V_727, -int32 V_728, -int32 V_729, -int32 V_730, -int32 V_731, -int32 V_732, -int32 V_733, -int32 V_734, -int32 V_735, -int32 V_736, -int32 V_737, -int32 V_738, -int32 V_739, -int32 V_740, -int32 V_741, -int32 V_742, -int32 V_743, -int32 V_744, -int32 V_745, -int32 V_746, -int32 V_747, -int32 V_748, -int32 V_749, -int32 V_750, -int32 V_751, -int32 V_752, -int32 V_753, -int32 V_754, -int32 V_755, -int32 V_756, -int32 V_757, -int32 V_758, -int32 V_759, -int32 V_760, -int32 V_761, -int32 V_762, -int32 V_763, -int32 V_764, -int32 V_765, -int32 V_766, -int32 V_767, -int32 V_768, -int32 V_769, -int32 V_770, -int32 V_771, -int32 V_772, -int32 V_773, -int32 V_774, -int32 V_775, -int32 V_776, -int32 V_777, -int32 V_778, -int32 V_779, -int32 V_780, -int32 V_781, -int32 V_782, -int32 V_783, -int32 V_784, -int32 V_785, -int32 V_786, -int32 V_787, -int32 V_788, -int32 V_789, -int32 V_790, -int32 V_791, -int32 V_792, -int32 V_793, -int32 V_794, -int32 V_795, -int32 V_796, -int32 V_797, -int32 V_798, -int32 V_799, -int32 V_800, -int32 V_801, -int32 V_802, -int32 V_803, -int32 V_804, -int32 V_805, -int32 V_806, -int32 V_807, -int32 V_808, -int32 V_809, -int32 V_810, -int32 V_811, -int32 V_812, -int32 V_813, -int32 V_814, -int32 V_815, -int32 V_816, -int32 V_817, -int32 V_818, -int32 V_819, -int32 V_820, -int32 V_821, -int32 V_822, -int32 V_823, -int32 V_824, -int32 V_825, -int32 V_826, -int32 V_827, -int32 V_828, -int32 V_829, -int32 V_830, -int32 V_831, -int32 V_832, -int32 V_833, -int32 V_834, -int32 V_835, -int32 V_836, -int32 V_837, -int32 V_838, -int32 V_839, -int32 V_840, -int32 V_841, -int32 V_842, -int32 V_843, -int32 V_844, -int32 V_845, -int32 V_846, -int32 V_847, -int32 V_848, -int32 V_849, -int32 V_850, -int32 V_851, -int32 V_852, -int32 V_853, -int32 V_854, -int32 V_855, -int32 V_856, -int32 V_857, -int32 V_858, -int32 V_859, -int32 V_860, -int32 V_861, -int32 V_862, -int32 V_863, -int32 V_864, -int32 V_865, -int32 V_866, -int32 V_867, -int32 V_868, -int32 V_869, -int32 V_870, -int32 V_871, -int32 V_872, -int32 V_873, -int32 V_874, -int32 V_875, -int32 V_876, -int32 V_877, -int32 V_878, -int32 V_879, -int32 V_880, -int32 V_881, -int32 V_882, -int32 V_883, -int32 V_884, -int32 V_885, -int32 V_886, -int32 V_887, -int32 V_888, -int32 V_889, -int32 V_890, -int32 V_891, -int32 V_892, -int32 V_893, -int32 V_894, -int32 V_895, -int32 V_896, -int32 V_897, -int32 V_898, -int32 V_899, -int32 V_900, -int32 V_901, -int32 V_902, -int32 V_903, -int32 V_904, -int32 V_905, -int32 V_906, -int32 V_907, -int32 V_908, -int32 V_909, -int32 V_910, -int32 V_911, -int32 V_912, -int32 V_913, -int32 V_914, -int32 V_915, -int32 V_916, -int32 V_917, -int32 V_918, -int32 V_919, -int32 V_920, -int32 V_921, -int32 V_922, -int32 V_923, -int32 V_924, -int32 V_925, -int32 V_926, -int32 V_927, -int32 V_928, -int32 V_929, -int32 V_930, -int32 V_931, -int32 V_932, -int32 V_933, -int32 V_934, -int32 V_935, -int32 V_936, -int32 V_937, -int32 V_938, -int32 V_939, -int32 V_940, -int32 V_941, -int32 V_942, -int32 V_943, -int32 V_944, -int32 V_945, -int32 V_946, -int32 V_947, -int32 V_948, -int32 V_949, -int32 V_950, -int32 V_951, -int32 V_952, -int32 V_953, -int32 V_954, -int32 V_955, -int32 V_956, -int32 V_957, -int32 V_958, -int32 V_959, -int32 V_960, -int32 V_961, -int32 V_962, -int32 V_963, -int32 V_964, -int32 V_965, -int32 V_966, -int32 V_967, -int32 V_968, -int32 V_969, -int32 V_970, -int32 V_971, -int32 V_972, -int32 V_973, -int32 V_974, -int32 V_975, -int32 V_976, -int32 V_977, -int32 V_978, -int32 V_979, -int32 V_980, -int32 V_981, -int32 V_982, -int32 V_983, -int32 V_984, -int32 V_985, -int32 V_986, -int32 V_987, -int32 V_988, -int32 V_989, -int32 V_990, -int32 V_991, -int32 V_992, -int32 V_993, -int32 V_994, -int32 V_995, -int32 V_996, -int32 V_997, -int32 V_998, -int32 V_999, -int32 V_1000, -int32 V_1001, -int32 V_1002, -int32 V_1003, -int32 V_1004, -int32 V_1005, -int32 V_1006, -int32 V_1007, -int32 V_1008, -int32 V_1009, -int32 V_1010, -int32 V_1011, -int32 V_1012, -int32 V_1013, -int32 V_1014, -int32 V_1015, -int32 V_1016, -int32 V_1017, -int32 V_1018, -int32 V_1019, -int32 V_1020, -int32 V_1021, -int32 V_1022, -int32 V_1023, -int32 V_1024, -int32 V_1025, -int32 V_1026, -int32 V_1027, -int32 V_1028, -int32 V_1029, -int32 V_1030, -int32 V_1031, -int32 V_1032, -int32 V_1033, -int32 V_1034, -int32 V_1035, -int32 V_1036, -int32 V_1037, -int32 V_1038, -int32 V_1039, -int32 V_1040, -int32 V_1041, -int32 V_1042, -int32 V_1043, -int32 V_1044, -int32 V_1045, -int32 V_1046, -int32 V_1047, -int32 V_1048, -int32 V_1049, -int32 V_1050, -int32 V_1051, -int32 V_1052, -int32 V_1053, -int32 V_1054, -int32 V_1055, -int32 V_1056, -int32 V_1057, -int32 V_1058, -int32 V_1059, -int32 V_1060, -int32 V_1061, -int32 V_1062, -int32 V_1063, -int32 V_1064, -int32 V_1065, -int32 V_1066, -int32 V_1067, -int32 V_1068, -int32 V_1069, -int32 V_1070, -int32 V_1071, -int32 V_1072, -int32 V_1073, -int32 V_1074, -int32 V_1075, -int32 V_1076, -int32 V_1077, -int32 V_1078, -int32 V_1079, -int32 V_1080, -int32 V_1081, -int32 V_1082, -int32 V_1083, -int32 V_1084, -int32 V_1085, -int32 V_1086, -int32 V_1087, -int32 V_1088, -int32 V_1089, -int32 V_1090, -int32 V_1091, -int32 V_1092, -int32 V_1093, -int32 V_1094, -int32 V_1095, -int32 V_1096, -int32 V_1097, -int32 V_1098, -int32 V_1099, -int32 V_1100, -int32 V_1101, -int32 V_1102, -int32 V_1103, -int32 V_1104, -int32 V_1105, -int32 V_1106, -int32 V_1107, -int32 V_1108, -int32 V_1109, -int32 V_1110, -int32 V_1111, -int32 V_1112, -int32 V_1113, -int32 V_1114, -int32 V_1115, -int32 V_1116, -int32 V_1117, -int32 V_1118, -int32 V_1119, -int32 V_1120, -int32 V_1121, -int32 V_1122, -int32 V_1123, -int32 V_1124, -int32 V_1125, -int32 V_1126, -int32 V_1127, -int32 V_1128, -int32 V_1129, -int32 V_1130, -int32 V_1131, -int32 V_1132, -int32 V_1133, -int32 V_1134, -int32 V_1135, -int32 V_1136, -int32 V_1137, -int32 V_1138, -int32 V_1139, -int32 V_1140, -int32 V_1141, -int32 V_1142, -int32 V_1143, -int32 V_1144, -int32 V_1145, -int32 V_1146, -int32 V_1147, -int32 V_1148, -int32 V_1149, -int32 V_1150, -int32 V_1151, -int32 V_1152, -int32 V_1153, -int32 V_1154, -int32 V_1155, -int32 V_1156, -int32 V_1157, -int32 V_1158, -int32 V_1159, -int32 V_1160, -int32 V_1161, -int32 V_1162, -int32 V_1163, -int32 V_1164, -int32 V_1165, -int32 V_1166, -int32 V_1167, -int32 V_1168, -int32 V_1169, -int32 V_1170, -int32 V_1171, -int32 V_1172, -int32 V_1173, -int32 V_1174, -int32 V_1175, -int32 V_1176, -int32 V_1177, -int32 V_1178, -int32 V_1179, -int32 V_1180, -int32 V_1181, -int32 V_1182, -int32 V_1183, -int32 V_1184, -int32 V_1185, -int32 V_1186, -int32 V_1187, -int32 V_1188, -int32 V_1189, -int32 V_1190, -int32 V_1191, -int32 V_1192, -int32 V_1193, -int32 V_1194, -int32 V_1195, -int32 V_1196, -int32 V_1197, -int32 V_1198, -int32 V_1199, -int32 V_1200, -int32 V_1201, -int32 V_1202, -int32 V_1203, -int32 V_1204, -int32 V_1205, -int32 V_1206, -int32 V_1207, -int32 V_1208, -int32 V_1209, -int32 V_1210, -int32 V_1211, -int32 V_1212, -int32 V_1213, -int32 V_1214, -int32 V_1215, -int32 V_1216, -int32 V_1217, -int32 V_1218, -int32 V_1219, -int32 V_1220, -int32 V_1221, -int32 V_1222, -int32 V_1223, -int32 V_1224, -int32 V_1225, -int32 V_1226, -int32 V_1227, -int32 V_1228, -int32 V_1229, -int32 V_1230, -int32 V_1231, -int32 V_1232, -int32 V_1233, -int32 V_1234, -int32 V_1235, -int32 V_1236, -int32 V_1237, -int32 V_1238, -int32 V_1239, -int32 V_1240, -int32 V_1241, -int32 V_1242, -int32 V_1243, -int32 V_1244, -int32 V_1245, -int32 V_1246, -int32 V_1247, -int32 V_1248, -int32 V_1249, -int32 V_1250, -int32 V_1251, -int32 V_1252, -int32 V_1253, -int32 V_1254, -int32 V_1255, -int32 V_1256, -int32 V_1257, -int32 V_1258, -int32 V_1259, -int32 V_1260, -int32 V_1261, -int32 V_1262, -int32 V_1263, -int32 V_1264, -int32 V_1265, -int32 V_1266, -int32 V_1267, -int32 V_1268, -int32 V_1269, -int32 V_1270, -int32 V_1271, -int32 V_1272, -int32 V_1273, -int32 V_1274, -int32 V_1275, -int32 V_1276, -int32 V_1277, -int32 V_1278, -int32 V_1279, -int32 V_1280, -int32 V_1281, -int32 V_1282, -int32 V_1283, -int32 V_1284, -int32 V_1285, -int32 V_1286, -int32 V_1287, -int32 V_1288, -int32 V_1289, -int32 V_1290, -int32 V_1291, -int32 V_1292, -int32 V_1293, -int32 V_1294, -int32 V_1295, -int32 V_1296, -int32 V_1297, -int32 V_1298, -int32 V_1299, -int32 V_1300, -int32 V_1301, -int32 V_1302, -int32 V_1303, -int32 V_1304, -int32 V_1305, -int32 V_1306, -int32 V_1307, -int32 V_1308, -int32 V_1309, -int32 V_1310, -int32 V_1311, -int32 V_1312, -int32 V_1313, -int32 V_1314, -int32 V_1315, -int32 V_1316, -int32 V_1317, -int32 V_1318, -int32 V_1319, -int32 V_1320, -int32 V_1321, -int32 V_1322, -int32 V_1323, -int32 V_1324, -int32 V_1325, -int32 V_1326, -int32 V_1327, -int32 V_1328, -int32 V_1329, -int32 V_1330, -int32 V_1331, -int32 V_1332, -int32 V_1333, -int32 V_1334, -int32 V_1335, -int32 V_1336, -int32 V_1337, -int32 V_1338, -int32 V_1339, -int32 V_1340, -int32 V_1341, -int32 V_1342, -int32 V_1343, -int32 V_1344, -int32 V_1345, -int32 V_1346, -int32 V_1347, -int32 V_1348, -int32 V_1349, -int32 V_1350, -int32 V_1351, -int32 V_1352, -int32 V_1353, -int32 V_1354, -int32 V_1355, -int32 V_1356, -int32 V_1357, -int32 V_1358, -int32 V_1359, -int32 V_1360, -int32 V_1361, -int32 V_1362, -int32 V_1363, -int32 V_1364, -int32 V_1365, -int32 V_1366, -int32 V_1367, -int32 V_1368, -int32 V_1369, -int32 V_1370, -int32 V_1371, -int32 V_1372, -int32 V_1373, -int32 V_1374, -int32 V_1375, -int32 V_1376, -int32 V_1377, -int32 V_1378, -int32 V_1379, -int32 V_1380, -int32 V_1381, -int32 V_1382, -int32 V_1383, -int32 V_1384, -int32 V_1385, -int32 V_1386, -int32 V_1387, -int32 V_1388, -int32 V_1389, -int32 V_1390, -int32 V_1391, -int32 V_1392, -int32 V_1393, -int32 V_1394, -int32 V_1395, -int32 V_1396, -int32 V_1397, -int32 V_1398, -int32 V_1399, -int32 V_1400, -int32 V_1401, -int32 V_1402, -int32 V_1403, -int32 V_1404, -int32 V_1405, -int32 V_1406, -int32 V_1407, -int32 V_1408, -int32 V_1409, -int32 V_1410, -int32 V_1411, -int32 V_1412, -int32 V_1413, -int32 V_1414, -int32 V_1415, -int32 V_1416, -int32 V_1417, -int32 V_1418, -int32 V_1419, -int32 V_1420, -int32 V_1421, -int32 V_1422, -int32 V_1423, -int32 V_1424, -int32 V_1425, -int32 V_1426, -int32 V_1427, -int32 V_1428, -int32 V_1429, -int32 V_1430, -int32 V_1431, -int32 V_1432, -int32 V_1433, -int32 V_1434, -int32 V_1435, -int32 V_1436, -int32 V_1437, -int32 V_1438, -int32 V_1439, -int32 V_1440, -int32 V_1441, -int32 V_1442, -int32 V_1443, -int32 V_1444, -int32 V_1445, -int32 V_1446, -int32 V_1447, -int32 V_1448, -int32 V_1449, -int32 V_1450, -int32 V_1451, -int32 V_1452, -int32 V_1453, -int32 V_1454, -int32 V_1455, -int32 V_1456, -int32 V_1457, -int32 V_1458, -int32 V_1459, -int32 V_1460, -int32 V_1461, -int32 V_1462, -int32 V_1463, -int32 V_1464, -int32 V_1465, -int32 V_1466, -int32 V_1467, -int32 V_1468, -int32 V_1469, -int32 V_1470, -int32 V_1471, -int32 V_1472, -int32 V_1473, -int32 V_1474, -int32 V_1475, -int32 V_1476, -int32 V_1477, -int32 V_1478, -int32 V_1479, -int32 V_1480, -int32 V_1481, -int32 V_1482, -int32 V_1483, -int32 V_1484, -int32 V_1485, -int32 V_1486, -int32 V_1487, -int32 V_1488, -int32 V_1489, -int32 V_1490, -int32 V_1491, -int32 V_1492, -int32 V_1493, -int32 V_1494, -int32 V_1495, -int32 V_1496, -int32 V_1497, -int32 V_1498, -int32 V_1499, -int32 V_1500, -int32 V_1501, -int32 V_1502, -int32 V_1503, -int32 V_1504, -int32 V_1505, -int32 V_1506, -int32 V_1507, -int32 V_1508, -int32 V_1509, -int32 V_1510, -int32 V_1511, -int32 V_1512, -int32 V_1513, -int32 V_1514, -int32 V_1515, -int32 V_1516, -int32 V_1517, -int32 V_1518, -int32 V_1519, -int32 V_1520, -int32 V_1521, -int32 V_1522, -int32 V_1523, -int32 V_1524, -int32 V_1525, -int32 V_1526, -int32 V_1527, -int32 V_1528, -int32 V_1529, -int32 V_1530, -int32 V_1531, -int32 V_1532, -int32 V_1533, -int32 V_1534, -int32 V_1535, -int32 V_1536, -int32 V_1537, -int32 V_1538, -int32 V_1539, -int32 V_1540, -int32 V_1541, -int32 V_1542, -int32 V_1543, -int32 V_1544, -int32 V_1545, -int32 V_1546, -int32 V_1547, -int32 V_1548, -int32 V_1549, -int32 V_1550, -int32 V_1551, -int32 V_1552, -int32 V_1553, -int32 V_1554, -int32 V_1555, -int32 V_1556, -int32 V_1557, -int32 V_1558, -int32 V_1559, -int32 V_1560, -int32 V_1561, -int32 V_1562, -int32 V_1563, -int32 V_1564, -int32 V_1565, -int32 V_1566, -int32 V_1567, -int32 V_1568, -int32 V_1569, -int32 V_1570, -int32 V_1571, -int32 V_1572, -int32 V_1573, -int32 V_1574, -int32 V_1575, -int32 V_1576, -int32 V_1577, -int32 V_1578, -int32 V_1579, -int32 V_1580, -int32 V_1581, -int32 V_1582, -int32 V_1583, -int32 V_1584, -int32 V_1585, -int32 V_1586, -int32 V_1587, -int32 V_1588, -int32 V_1589, -int32 V_1590, -int32 V_1591, -int32 V_1592, -int32 V_1593, -int32 V_1594, -int32 V_1595, -int32 V_1596, -int32 V_1597, -int32 V_1598, -int32 V_1599, -int32 V_1600, -int32 V_1601, -int32 V_1602, -int32 V_1603, -int32 V_1604, -int32 V_1605, -int32 V_1606, -int32 V_1607, -int32 V_1608, -int32 V_1609, -int32 V_1610, -int32 V_1611, -int32 V_1612, -int32 V_1613, -int32 V_1614, -int32 V_1615, -int32 V_1616, -int32 V_1617, -int32 V_1618, -int32 V_1619, -int32 V_1620, -int32 V_1621, -int32 V_1622, -int32 V_1623, -int32 V_1624, -int32 V_1625, -int32 V_1626, -int32 V_1627, -int32 V_1628, -int32 V_1629, -int32 V_1630, -int32 V_1631, -int32 V_1632, -int32 V_1633, -int32 V_1634, -int32 V_1635, -int32 V_1636, -int32 V_1637, -int32 V_1638, -int32 V_1639, -int32 V_1640, -int32 V_1641, -int32 V_1642, -int32 V_1643, -int32 V_1644, -int32 V_1645, -int32 V_1646, -int32 V_1647, -int32 V_1648, -int32 V_1649, -int32 V_1650, -int32 V_1651, -int32 V_1652, -int32 V_1653, -int32 V_1654, -int32 V_1655, -int32 V_1656, -int32 V_1657, -int32 V_1658, -int32 V_1659, -int32 V_1660, -int32 V_1661, -int32 V_1662, -int32 V_1663, -int32 V_1664, -int32 V_1665, -int32 V_1666, -int32 V_1667, -int32 V_1668, -int32 V_1669, -int32 V_1670, -int32 V_1671, -int32 V_1672, -int32 V_1673, -int32 V_1674, -int32 V_1675, -int32 V_1676, -int32 V_1677, -int32 V_1678, -int32 V_1679, -int32 V_1680, -int32 V_1681, -int32 V_1682, -int32 V_1683, -int32 V_1684, -int32 V_1685, -int32 V_1686, -int32 V_1687, -int32 V_1688, -int32 V_1689, -int32 V_1690, -int32 V_1691, -int32 V_1692, -int32 V_1693, -int32 V_1694, -int32 V_1695, -int32 V_1696, -int32 V_1697, -int32 V_1698, -int32 V_1699, -int32 V_1700, -int32 V_1701, -int32 V_1702, -int32 V_1703, -int32 V_1704, -int32 V_1705, -int32 V_1706, -int32 V_1707, -int32 V_1708, -int32 V_1709, -int32 V_1710, -int32 V_1711, -int32 V_1712, -int32 V_1713, -int32 V_1714, -int32 V_1715, -int32 V_1716, -int32 V_1717, -int32 V_1718, -int32 V_1719, -int32 V_1720, -int32 V_1721, -int32 V_1722, -int32 V_1723, -int32 V_1724, -int32 V_1725, -int32 V_1726, -int32 V_1727, -int32 V_1728, -int32 V_1729, -int32 V_1730, -int32 V_1731, -int32 V_1732, -int32 V_1733, -int32 V_1734, -int32 V_1735, -int32 V_1736, -int32 V_1737, -int32 V_1738, -int32 V_1739, -int32 V_1740, -int32 V_1741, -int32 V_1742, -int32 V_1743, -int32 V_1744, -int32 V_1745, -int32 V_1746, -int32 V_1747, -int32 V_1748, -int32 V_1749, -int32 V_1750, -int32 V_1751, -int32 V_1752, -int32 V_1753, -int32 V_1754, -int32 V_1755, -int32 V_1756, -int32 V_1757, -int32 V_1758, -int32 V_1759, -int32 V_1760, -int32 V_1761, -int32 V_1762, -int32 V_1763, -int32 V_1764, -int32 V_1765, -int32 V_1766, -int32 V_1767, -int32 V_1768, -int32 V_1769, -int32 V_1770, -int32 V_1771, -int32 V_1772, -int32 V_1773, -int32 V_1774, -int32 V_1775, -int32 V_1776, -int32 V_1777, -int32 V_1778, -int32 V_1779, -int32 V_1780, -int32 V_1781, -int32 V_1782, -int32 V_1783, -int32 V_1784, -int32 V_1785, -int32 V_1786, -int32 V_1787, -int32 V_1788, -int32 V_1789, -int32 V_1790, -int32 V_1791, -int32 V_1792, -int32 V_1793, -int32 V_1794, -int32 V_1795, -int32 V_1796, -int32 V_1797, -int32 V_1798, -int32 V_1799, -int32 V_1800, -int32 V_1801, -int32 V_1802, -int32 V_1803, -int32 V_1804, -int32 V_1805, -int32 V_1806, -int32 V_1807, -int32 V_1808, -int32 V_1809, -int32 V_1810, -int32 V_1811, -int32 V_1812, -int32 V_1813, -int32 V_1814, -int32 V_1815, -int32 V_1816, -int32 V_1817, -int32 V_1818, -int32 V_1819, -int32 V_1820, -int32 V_1821, -int32 V_1822, -int32 V_1823, -int32 V_1824, -int32 V_1825, -int32 V_1826, -int32 V_1827, -int32 V_1828, -int32 V_1829, -int32 V_1830, -int32 V_1831, -int32 V_1832, -int32 V_1833, -int32 V_1834, -int32 V_1835, -int32 V_1836, -int32 V_1837, -int32 V_1838, -int32 V_1839, -int32 V_1840, -int32 V_1841, -int32 V_1842, -int32 V_1843, -int32 V_1844, -int32 V_1845, -int32 V_1846, -int32 V_1847, -int32 V_1848, -int32 V_1849, -int32 V_1850, -int32 V_1851, -int32 V_1852, -int32 V_1853, -int32 V_1854, -int32 V_1855, -int32 V_1856, -int32 V_1857, -int32 V_1858, -int32 V_1859, -int32 V_1860, -int32 V_1861, -int32 V_1862, -int32 V_1863, -int32 V_1864, -int32 V_1865, -int32 V_1866, -int32 V_1867, -int32 V_1868, -int32 V_1869, -int32 V_1870, -int32 V_1871, -int32 V_1872, -int32 V_1873, -int32 V_1874, -int32 V_1875, -int32 V_1876, -int32 V_1877, -int32 V_1878, -int32 V_1879, -int32 V_1880, -int32 V_1881, -int32 V_1882, -int32 V_1883, -int32 V_1884, -int32 V_1885, -int32 V_1886, -int32 V_1887, -int32 V_1888, -int32 V_1889, -int32 V_1890, -int32 V_1891, -int32 V_1892, -int32 V_1893, -int32 V_1894, -int32 V_1895, -int32 V_1896, -int32 V_1897, -int32 V_1898, -int32 V_1899, -int32 V_1900, -int32 V_1901, -int32 V_1902, -int32 V_1903, -int32 V_1904, -int32 V_1905, -int32 V_1906, -int32 V_1907, -int32 V_1908, -int32 V_1909, -int32 V_1910, -int32 V_1911, -int32 V_1912, -int32 V_1913, -int32 V_1914, -int32 V_1915, -int32 V_1916, -int32 V_1917, -int32 V_1918, -int32 V_1919, -int32 V_1920, -int32 V_1921, -int32 V_1922, -int32 V_1923, -int32 V_1924, -int32 V_1925, -int32 V_1926, -int32 V_1927, -int32 V_1928, -int32 V_1929, -int32 V_1930, -int32 V_1931, -int32 V_1932, -int32 V_1933, -int32 V_1934, -int32 V_1935, -int32 V_1936, -int32 V_1937, -int32 V_1938, -int32 V_1939, -int32 V_1940, -int32 V_1941, -int32 V_1942, -int32 V_1943, -int32 V_1944, -int32 V_1945, -int32 V_1946, -int32 V_1947, -int32 V_1948, -int32 V_1949, -int32 V_1950, -int32 V_1951, -int32 V_1952, -int32 V_1953, -int32 V_1954, -int32 V_1955, -int32 V_1956, -int32 V_1957, -int32 V_1958, -int32 V_1959, -int32 V_1960, -int32 V_1961, -int32 V_1962, -int32 V_1963, -int32 V_1964, -int32 V_1965, -int32 V_1966, -int32 V_1967, -int32 V_1968, -int32 V_1969, -int32 V_1970, -int32 V_1971, -int32 V_1972, -int32 V_1973, -int32 V_1974, -int32 V_1975, -int32 V_1976, -int32 V_1977, -int32 V_1978, -int32 V_1979, -int32 V_1980, -int32 V_1981, -int32 V_1982, -int32 V_1983, -int32 V_1984, -int32 V_1985, -int32 V_1986, -int32 V_1987, -int32 V_1988, -int32 V_1989, -int32 V_1990, -int32 V_1991, -int32 V_1992, -int32 V_1993, -int32 V_1994, -int32 V_1995, -int32 V_1996, -int32 V_1997, -int32 V_1998, -int32 V_1999, -int32 V_2000, -int32 V_2001 -) -ldc.i4 1 -stloc V_1 -ldloc V_1800 -ldc.i4 100 -stloc V_998 -ldloc V_1 -sub -ldc.i4.m1 -stloc V_1518 -ldloc V_998 -ldc.i4 100000000 -stloc V_1888 -ldloc V_1518 -add -mul -ldloc V_1888 -sub -dup -call void [System.Console]System.Console::WriteLine(int32) -ret -} diff --git a/src/coreclr/tests/src/JIT/opt/DumpDisasm/JitMinOpts/LVRefCnt1.il b/src/coreclr/tests/src/JIT/opt/DumpDisasm/JitMinOpts/LVRefCnt1.il deleted file mode 100644 index b04089a86b03..000000000000 --- a/src/coreclr/tests/src/JIT/opt/DumpDisasm/JitMinOpts/LVRefCnt1.il +++ /dev/null @@ -1,16032 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// DEFAULT_MIN_OPTS_LV_REF_COUNT 8000 -// New refCnts for V00: refCnt = 8001 -// OPTIONS: opts.MinOpts() == true -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly LVRefCnt1 {} -.method public static int32 Main() -{ -.entrypoint -call int32 TestLVRefCnt() -ldc.i4 100 -sub -ret -} -.method public static int32 TestLVRefCnt() -{ -.locals init (int32 V_0) -ldc.i4 100 -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldc.i4 100 -add -ret -} diff --git a/src/coreclr/tests/src/JIT/opt/Enum/shared.cs b/src/coreclr/tests/src/JIT/opt/Enum/shared.cs deleted file mode 100644 index f15361a05aa3..000000000000 --- a/src/coreclr/tests/src/JIT/opt/Enum/shared.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// Some simple tests for the Enum.HasFlag optimization. -// Verify the optimization avoids firing for shared types. - -using System; -using System.Runtime.CompilerServices; - -class MyG -{ - public enum A - { - X = 1 - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public static void foo() - { - var a = MyG.A.X; - a.HasFlag(MyG.A.X); - } -} - -class My -{ - public static int Main() - { - int result = 0; - try - { - MyG.foo(); - } - catch(ArgumentException) - { - result = 100; - } - return result; - } -} diff --git a/src/coreclr/tests/src/JIT/opt/Inline/regression/badcallee/badcallee.ilproj b/src/coreclr/tests/src/JIT/opt/Inline/regression/badcallee/badcallee.ilproj deleted file mode 100644 index 6f19d8121e7f..000000000000 --- a/src/coreclr/tests/src/JIT/opt/Inline/regression/badcallee/badcallee.ilproj +++ /dev/null @@ -1,12 +0,0 @@ - - - Exe - 1 - - - PdbOnly - - - - - diff --git a/src/coreclr/tests/src/JIT/opt/Inline/tests/calli.il b/src/coreclr/tests/src/JIT/opt/Inline/tests/calli.il deleted file mode 100644 index 101bc28810f8..000000000000 --- a/src/coreclr/tests/src/JIT/opt/Inline/tests/calli.il +++ /dev/null @@ -1,51 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// Test that inliner can now inline g1 and g2 - -.assembly extern legacy library mscorlib {} - -.assembly legacy library calli_inline {} -.class private auto ansi beforefieldinit calli_test - extends [mscorlib]System.Object -{ - .field private static int32 a - .field private static int32 b - .method public static int32 f1() - { - ldsfld int32 calli_test::a - ret - } - .method public static int32 f2() - { - ldsfld int32 calli_test::b - ret - } - .method public static int32 g1() - { - ldftn int32 calli_test::f1() - calli int32 () - ret - } - .method public static int32 g2() - { - ldftn int32 calli_test::f2() - calli int32 () - ret - } - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - .maxstack 2 - call int32 calli_test::g1() - call int32 calli_test::g2() - beq.s GOOD - ldc.i4 0 - br.s DONE - GOOD: - ldc.i4 100 - DONE: - ret - } -} diff --git a/src/coreclr/tests/src/JIT/opt/Inline/tests/trycatch.cs b/src/coreclr/tests/src/JIT/opt/Inline/tests/trycatch.cs deleted file mode 100644 index d71013fc6e4e..000000000000 --- a/src/coreclr/tests/src/JIT/opt/Inline/tests/trycatch.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// Getter and Setter: SEH - -using System; - -namespace JitInliningTest -{ - public class A - { - private int _prop; - public int prop - { - get { return _prop; } - set - { - try - { - _prop = value; - } - catch - { } - } - } - } - internal class PropTest5 - { - public static int Main() - { - A a = new A(); - a.prop = 100; - int retval = a.prop; - return retval; - } - } -} diff --git a/src/coreclr/tests/src/JIT/opt/JitMinOpts/Perf/BBCnt1.il b/src/coreclr/tests/src/JIT/opt/JitMinOpts/Perf/BBCnt1.il deleted file mode 100644 index 04f5b02def27..000000000000 --- a/src/coreclr/tests/src/JIT/opt/JitMinOpts/Perf/BBCnt1.il +++ /dev/null @@ -1,12063 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// DEFAULT_MIN_OPTS_BB_COUNT 2000 -// New Basic Block BB2001 created. -// OPTIONS: opts.MinOpts() == true -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly BBCnt1 {} -.class private auto ansi beforefieldinit BBCnt0 - extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - // Code size 11955 (0x2eb3) - .maxstack 3 - .locals init (class [mscorlib]System.Random V_0, - int32 V_1, - int32 V_2, - int32 V_3) - IL_0000: newobj instance void [mscorlib]System.Random::.ctor() - IL_0005: stloc.0 - IL_0006: ldloc.0 - IL_0007: ldc.i4.1 - IL_0008: ldc.i4.s 100 - IL_000a: callvirt instance int32 [mscorlib]System.Random::Next(int32, - int32) - IL_000f: stloc.1 - IL_0010: ldloc.0 - IL_0011: ldc.i4.1 - IL_0012: ldc.i4.s 100 - IL_0014: callvirt instance int32 [mscorlib]System.Random::Next(int32, - int32) - IL_0019: stloc.2 - IL_001a: ldloc.1 - IL_001b: ldloc.2 - IL_001c: blt.s BL_0026 - - BL_001e: ldloc.1 - BL_001f: ldloc.1 - BL_0020: ldloc.2 - BL_0021: sub - BL_0022: add - BL_0023: stloc.1 - BL_0024: br.s BL_002c - - BL_0026: ldloc.2 - BL_0027: ldloc.1 - BL_0028: ldloc.2 - BL_0029: sub - BL_002a: mul - BL_002b: stloc.2 - BL_002c: ldloc.1 - BL_002d: ldloc.2 - BL_002e: blt.s BL_0126 - - BL_011e: ldloc.1 - BL_011f: ldloc.1 - BL_0120: ldloc.2 - BL_0121: sub - BL_0122: add - BL_0123: stloc.1 - BL_0124: br.s BL_012c - - BL_0126: ldloc.2 - BL_0127: ldloc.1 - BL_0128: ldloc.2 - BL_0129: sub - BL_012a: mul - BL_012b: stloc.2 - BL_012c: ldloc.1 - BL_012d: ldloc.2 - BL_012e: blt.s BL_0226 - - BL_021e: ldloc.1 - BL_021f: ldloc.1 - BL_0220: ldloc.2 - BL_0221: sub - BL_0222: add - BL_0223: stloc.1 - BL_0224: br.s BL_022c - - BL_0226: ldloc.2 - BL_0227: ldloc.1 - BL_0228: ldloc.2 - BL_0229: sub - BL_022a: mul - BL_022b: stloc.2 - BL_022c: ldloc.1 - BL_022d: ldloc.2 - BL_022e: blt.s BL_0326 - - BL_031e: ldloc.1 - BL_031f: ldloc.1 - BL_0320: ldloc.2 - BL_0321: sub - BL_0322: add - BL_0323: stloc.1 - BL_0324: br.s BL_032c - - BL_0326: ldloc.2 - BL_0327: ldloc.1 - BL_0328: ldloc.2 - BL_0329: sub - BL_032a: mul - BL_032b: stloc.2 - BL_032c: ldloc.1 - BL_032d: ldloc.2 - BL_032e: blt.s BL_0426 - - BL_041e: ldloc.1 - BL_041f: ldloc.1 - BL_0420: ldloc.2 - BL_0421: sub - BL_0422: add - BL_0423: stloc.1 - BL_0424: br.s BL_042c - - BL_0426: ldloc.2 - BL_0427: ldloc.1 - BL_0428: ldloc.2 - BL_0429: sub - BL_042a: mul - BL_042b: stloc.2 - BL_042c: ldloc.1 - BL_042d: ldloc.2 - BL_042e: blt.s BL_0526 - - BL_051e: ldloc.1 - BL_051f: ldloc.1 - BL_0520: ldloc.2 - BL_0521: sub - BL_0522: add - BL_0523: stloc.1 - BL_0524: br.s BL_052c - - BL_0526: ldloc.2 - BL_0527: ldloc.1 - BL_0528: ldloc.2 - BL_0529: sub - BL_052a: mul - BL_052b: stloc.2 - BL_052c: ldloc.1 - BL_052d: ldloc.2 - BL_052e: blt.s IL_0026 - - IL_001e: ldloc.1 - IL_001f: ldloc.1 - IL_0020: ldloc.2 - IL_0021: sub - IL_0022: add - IL_0023: stloc.1 - IL_0024: br.s IL_002c - - IL_0026: ldloc.2 - IL_0027: ldloc.1 - IL_0028: ldloc.2 - IL_0029: sub - IL_002a: mul - IL_002b: stloc.2 - IL_002c: ldloc.1 - IL_002d: ldloc.2 - IL_002e: blt.s IL_0038 - - IL_0030: ldloc.1 - IL_0031: ldloc.1 - IL_0032: ldloc.2 - IL_0033: sub - IL_0034: mul - IL_0035: stloc.1 - IL_0036: br.s IL_003e - - IL_0038: ldloc.2 - IL_0039: ldloc.1 - IL_003a: ldloc.2 - IL_003b: sub - IL_003c: add - IL_003d: stloc.2 - IL_003e: ldloc.1 - IL_003f: ldloc.2 - IL_0040: bgt.s IL_004a - - IL_0042: ldloc.1 - IL_0043: ldloc.1 - IL_0044: ldloc.2 - IL_0045: add - IL_0046: add - IL_0047: stloc.1 - IL_0048: br.s IL_0050 - - IL_004a: ldloc.2 - IL_004b: ldloc.1 - IL_004c: ldloc.2 - IL_004d: add - IL_004e: mul - IL_004f: stloc.2 - IL_0050: ldloc.1 - IL_0051: ldloc.2 - IL_0052: bge.s IL_005c - - IL_0054: ldloc.1 - IL_0055: ldloc.1 - IL_0056: ldloc.2 - IL_0057: add - IL_0058: add - IL_0059: stloc.1 - IL_005a: br.s IL_0062 - - IL_005c: ldloc.2 - IL_005d: ldloc.1 - IL_005e: ldloc.2 - IL_005f: add - IL_0060: mul - IL_0061: stloc.2 - IL_0062: ldloc.1 - IL_0063: ldloc.2 - IL_0064: ble.s IL_006e - - IL_0066: ldloc.1 - IL_0067: ldloc.1 - IL_0068: ldloc.2 - IL_0069: sub - IL_006a: mul - IL_006b: stloc.1 - IL_006c: br.s IL_0074 - - IL_006e: ldloc.2 - IL_006f: ldloc.1 - IL_0070: ldloc.2 - IL_0071: sub - IL_0072: add - IL_0073: stloc.2 - IL_0074: ldloc.1 - IL_0075: ldloc.2 - IL_0076: beq.s IL_0080 - - IL_0078: ldloc.1 - IL_0079: ldloc.1 - IL_007a: ldloc.2 - IL_007b: add - IL_007c: mul - IL_007d: stloc.1 - IL_007e: br.s IL_0086 - - IL_0080: ldloc.2 - IL_0081: ldloc.1 - IL_0082: ldloc.2 - IL_0083: add - IL_0084: sub - IL_0085: stloc.2 - IL_0086: ldloc.1 - IL_0087: ldloc.2 - IL_0088: bgt.s IL_0092 - - IL_008a: ldloc.1 - IL_008b: ldloc.1 - IL_008c: ldloc.2 - IL_008d: mul - IL_008e: add - IL_008f: stloc.1 - IL_0090: br.s IL_0098 - - IL_0092: ldloc.2 - IL_0093: ldloc.1 - IL_0094: ldloc.2 - IL_0095: mul - IL_0096: add - IL_0097: stloc.2 - IL_0098: ldloc.1 - IL_0099: ldloc.2 - IL_009a: bgt.s IL_00a4 - - IL_009c: ldloc.1 - IL_009d: ldloc.1 - IL_009e: ldloc.2 - IL_009f: sub - IL_00a0: add - IL_00a1: stloc.1 - IL_00a2: br.s IL_00aa - - IL_00a4: ldloc.2 - IL_00a5: ldloc.1 - IL_00a6: ldloc.2 - IL_00a7: sub - IL_00a8: add - IL_00a9: stloc.2 - IL_00aa: ldloc.1 - IL_00ab: ldloc.2 - IL_00ac: bne.un.s IL_00b6 - - IL_00ae: ldloc.1 - IL_00af: ldloc.1 - IL_00b0: ldloc.2 - IL_00b1: add - IL_00b2: mul - IL_00b3: stloc.1 - IL_00b4: br.s IL_00bc - - IL_00b6: ldloc.2 - IL_00b7: ldloc.1 - IL_00b8: ldloc.2 - IL_00b9: add - IL_00ba: mul - IL_00bb: stloc.2 - IL_00bc: ldloc.1 - IL_00bd: ldloc.2 - IL_00be: bge.s IL_00c8 - - IL_00c0: ldloc.1 - IL_00c1: ldloc.1 - IL_00c2: ldloc.2 - IL_00c3: mul - IL_00c4: mul - IL_00c5: stloc.1 - IL_00c6: br.s IL_00ce - - IL_00c8: ldloc.2 - IL_00c9: ldloc.1 - IL_00ca: ldloc.2 - IL_00cb: mul - IL_00cc: mul - IL_00cd: stloc.2 - IL_00ce: ldloc.1 - IL_00cf: ldloc.2 - IL_00d0: beq.s IL_00da - - IL_00d2: ldloc.1 - IL_00d3: ldloc.1 - IL_00d4: ldloc.2 - IL_00d5: mul - IL_00d6: add - IL_00d7: stloc.1 - IL_00d8: br.s IL_00e0 - - IL_00da: ldloc.2 - IL_00db: ldloc.1 - IL_00dc: ldloc.2 - IL_00dd: mul - IL_00de: mul - IL_00df: stloc.2 - IL_00e0: ldloc.1 - IL_00e1: ldloc.2 - IL_00e2: bgt.s IL_00ec - - IL_00e4: ldloc.1 - IL_00e5: ldloc.1 - IL_00e6: ldloc.2 - IL_00e7: mul - IL_00e8: mul - IL_00e9: stloc.1 - IL_00ea: br.s IL_00f2 - - IL_00ec: ldloc.2 - IL_00ed: ldloc.1 - IL_00ee: ldloc.2 - IL_00ef: mul - IL_00f0: add - IL_00f1: stloc.2 - IL_00f2: ldloc.1 - IL_00f3: ldloc.2 - IL_00f4: bne.un.s IL_00fe - - IL_00f6: ldloc.1 - IL_00f7: ldloc.1 - IL_00f8: ldloc.2 - IL_00f9: add - IL_00fa: add - IL_00fb: stloc.1 - IL_00fc: br.s IL_0104 - - IL_00fe: ldloc.2 - IL_00ff: ldloc.1 - IL_0100: ldloc.2 - IL_0101: add - IL_0102: add - IL_0103: stloc.2 - IL_0104: ldloc.1 - IL_0105: ldloc.2 - IL_0106: blt.s IL_0110 - - IL_0108: ldloc.1 - IL_0109: ldloc.1 - IL_010a: ldloc.2 - IL_010b: sub - IL_010c: sub - IL_010d: stloc.1 - IL_010e: br.s IL_0116 - - IL_0110: ldloc.2 - IL_0111: ldloc.1 - IL_0112: ldloc.2 - IL_0113: sub - IL_0114: mul - IL_0115: stloc.2 - IL_0116: ldloc.1 - IL_0117: ldloc.2 - IL_0118: blt.s IL_0122 - - IL_011a: ldloc.1 - IL_011b: ldloc.1 - IL_011c: ldloc.2 - IL_011d: add - IL_011e: sub - IL_011f: stloc.1 - IL_0120: br.s IL_0128 - - IL_0122: ldloc.2 - IL_0123: ldloc.1 - IL_0124: ldloc.2 - IL_0125: add - IL_0126: mul - IL_0127: stloc.2 - IL_0128: ldloc.1 - IL_0129: ldloc.2 - IL_012a: bgt.s IL_0134 - - IL_012c: ldloc.1 - IL_012d: ldloc.1 - IL_012e: ldloc.2 - IL_012f: sub - IL_0130: add - IL_0131: stloc.1 - IL_0132: br.s IL_013a - - IL_0134: ldloc.2 - IL_0135: ldloc.1 - IL_0136: ldloc.2 - IL_0137: sub - IL_0138: mul - IL_0139: stloc.2 - IL_013a: ldloc.1 - IL_013b: ldloc.2 - IL_013c: beq.s IL_0146 - - IL_013e: ldloc.1 - IL_013f: ldloc.1 - IL_0140: ldloc.2 - IL_0141: sub - IL_0142: add - IL_0143: stloc.1 - IL_0144: br.s IL_014c - - IL_0146: ldloc.2 - IL_0147: ldloc.1 - IL_0148: ldloc.2 - IL_0149: sub - IL_014a: sub - IL_014b: stloc.2 - IL_014c: ldloc.1 - IL_014d: ldloc.2 - IL_014e: bgt.s IL_0158 - - IL_0150: ldloc.1 - IL_0151: ldloc.1 - IL_0152: ldloc.2 - IL_0153: add - IL_0154: sub - IL_0155: stloc.1 - IL_0156: br.s IL_015e - - IL_0158: ldloc.2 - IL_0159: ldloc.1 - IL_015a: ldloc.2 - IL_015b: add - IL_015c: add - IL_015d: stloc.2 - IL_015e: ldloc.1 - IL_015f: ldloc.2 - IL_0160: ble.s IL_016a - - IL_0162: ldloc.1 - IL_0163: ldloc.1 - IL_0164: ldloc.2 - IL_0165: sub - IL_0166: add - IL_0167: stloc.1 - IL_0168: br.s IL_0170 - - IL_016a: ldloc.2 - IL_016b: ldloc.1 - IL_016c: ldloc.2 - IL_016d: sub - IL_016e: sub - IL_016f: stloc.2 - IL_0170: ldloc.1 - IL_0171: ldloc.2 - IL_0172: bne.un.s IL_017c - - IL_0174: ldloc.1 - IL_0175: ldloc.1 - IL_0176: ldloc.2 - IL_0177: sub - IL_0178: mul - IL_0179: stloc.1 - IL_017a: br.s IL_0182 - - IL_017c: ldloc.2 - IL_017d: ldloc.1 - IL_017e: ldloc.2 - IL_017f: sub - IL_0180: mul - IL_0181: stloc.2 - IL_0182: ldloc.1 - IL_0183: ldloc.2 - IL_0184: beq.s IL_018e - - IL_0186: ldloc.1 - IL_0187: ldloc.1 - IL_0188: ldloc.2 - IL_0189: sub - IL_018a: add - IL_018b: stloc.1 - IL_018c: br.s IL_0194 - - IL_018e: ldloc.2 - IL_018f: ldloc.1 - IL_0190: ldloc.2 - IL_0191: sub - IL_0192: add - IL_0193: stloc.2 - IL_0194: ldloc.1 - IL_0195: ldloc.2 - IL_0196: bne.un.s IL_01a0 - - IL_0198: ldloc.1 - IL_0199: ldloc.1 - IL_019a: ldloc.2 - IL_019b: add - IL_019c: add - IL_019d: stloc.1 - IL_019e: br.s IL_01a6 - - IL_01a0: ldloc.2 - IL_01a1: ldloc.1 - IL_01a2: ldloc.2 - IL_01a3: add - IL_01a4: add - IL_01a5: stloc.2 - IL_01a6: ldloc.1 - IL_01a7: ldloc.2 - IL_01a8: beq.s IL_01b2 - - IL_01aa: ldloc.1 - IL_01ab: ldloc.1 - IL_01ac: ldloc.2 - IL_01ad: mul - IL_01ae: add - IL_01af: stloc.1 - IL_01b0: br.s IL_01b8 - - IL_01b2: ldloc.2 - IL_01b3: ldloc.1 - IL_01b4: ldloc.2 - IL_01b5: mul - IL_01b6: mul - IL_01b7: stloc.2 - IL_01b8: ldloc.1 - IL_01b9: ldloc.2 - IL_01ba: ble.s IL_01c4 - - IL_01bc: ldloc.1 - IL_01bd: ldloc.1 - IL_01be: ldloc.2 - IL_01bf: mul - IL_01c0: mul - IL_01c1: stloc.1 - IL_01c2: br.s IL_01ca - - IL_01c4: ldloc.2 - IL_01c5: ldloc.1 - IL_01c6: ldloc.2 - IL_01c7: mul - IL_01c8: add - IL_01c9: stloc.2 - IL_01ca: ldloc.1 - IL_01cb: ldloc.2 - IL_01cc: bge.s IL_01d6 - - IL_01ce: ldloc.1 - IL_01cf: ldloc.1 - IL_01d0: ldloc.2 - IL_01d1: sub - IL_01d2: sub - IL_01d3: stloc.1 - IL_01d4: br.s IL_01dc - - IL_01d6: ldloc.2 - IL_01d7: ldloc.1 - IL_01d8: ldloc.2 - IL_01d9: sub - IL_01da: add - IL_01db: stloc.2 - IL_01dc: ldloc.1 - IL_01dd: ldloc.2 - IL_01de: blt.s IL_01e8 - - IL_01e0: ldloc.1 - IL_01e1: ldloc.1 - IL_01e2: ldloc.2 - IL_01e3: add - IL_01e4: mul - IL_01e5: stloc.1 - IL_01e6: br.s IL_01ee - - IL_01e8: ldloc.2 - IL_01e9: ldloc.1 - IL_01ea: ldloc.2 - IL_01eb: add - IL_01ec: sub - IL_01ed: stloc.2 - IL_01ee: ldloc.1 - IL_01ef: ldloc.2 - IL_01f0: ble.s IL_01fa - - IL_01f2: ldloc.1 - IL_01f3: ldloc.1 - IL_01f4: ldloc.2 - IL_01f5: add - IL_01f6: add - IL_01f7: stloc.1 - IL_01f8: br.s IL_0200 - - IL_01fa: ldloc.2 - IL_01fb: ldloc.1 - IL_01fc: ldloc.2 - IL_01fd: add - IL_01fe: add - IL_01ff: stloc.2 - IL_0200: ldloc.1 - IL_0201: ldloc.2 - IL_0202: ble.s IL_020c - - IL_0204: ldloc.1 - IL_0205: ldloc.1 - IL_0206: ldloc.2 - IL_0207: sub - IL_0208: sub - IL_0209: stloc.1 - IL_020a: br.s IL_0212 - - IL_020c: ldloc.2 - IL_020d: ldloc.1 - IL_020e: ldloc.2 - IL_020f: sub - IL_0210: mul - IL_0211: stloc.2 - IL_0212: ldloc.1 - IL_0213: ldloc.2 - IL_0214: beq.s IL_021e - - IL_0216: ldloc.1 - IL_0217: ldloc.1 - IL_0218: ldloc.2 - IL_0219: sub - IL_021a: add - IL_021b: stloc.1 - IL_021c: br.s IL_0224 - - IL_021e: ldloc.2 - IL_021f: ldloc.1 - IL_0220: ldloc.2 - IL_0221: sub - IL_0222: add - IL_0223: stloc.2 - IL_0224: ldloc.1 - IL_0225: ldloc.2 - IL_0226: beq.s IL_0230 - - IL_0228: ldloc.1 - IL_0229: ldloc.1 - IL_022a: ldloc.2 - IL_022b: mul - IL_022c: sub - IL_022d: stloc.1 - IL_022e: br.s IL_0236 - - IL_0230: ldloc.2 - IL_0231: ldloc.1 - IL_0232: ldloc.2 - IL_0233: mul - IL_0234: mul - IL_0235: stloc.2 - IL_0236: ldloc.1 - IL_0237: ldloc.2 - IL_0238: ble.s IL_0242 - - IL_023a: ldloc.1 - IL_023b: ldloc.1 - IL_023c: ldloc.2 - IL_023d: sub - IL_023e: sub - IL_023f: stloc.1 - IL_0240: br.s IL_0248 - - IL_0242: ldloc.2 - IL_0243: ldloc.1 - IL_0244: ldloc.2 - IL_0245: sub - IL_0246: sub - IL_0247: stloc.2 - IL_0248: ldloc.1 - IL_0249: ldloc.2 - IL_024a: bne.un.s IL_0254 - - IL_024c: ldloc.1 - IL_024d: ldloc.1 - IL_024e: ldloc.2 - IL_024f: add - IL_0250: add - IL_0251: stloc.1 - IL_0252: br.s IL_025a - - IL_0254: ldloc.2 - IL_0255: ldloc.1 - IL_0256: ldloc.2 - IL_0257: add - IL_0258: add - IL_0259: stloc.2 - IL_025a: ldloc.1 - IL_025b: ldloc.2 - IL_025c: bne.un.s IL_0266 - - IL_025e: ldloc.1 - IL_025f: ldloc.1 - IL_0260: ldloc.2 - IL_0261: sub - IL_0262: mul - IL_0263: stloc.1 - IL_0264: br.s IL_026c - - IL_0266: ldloc.2 - IL_0267: ldloc.1 - IL_0268: ldloc.2 - IL_0269: sub - IL_026a: add - IL_026b: stloc.2 - IL_026c: ldloc.1 - IL_026d: ldloc.2 - IL_026e: bne.un.s IL_0278 - - IL_0270: ldloc.1 - IL_0271: ldloc.1 - IL_0272: ldloc.2 - IL_0273: add - IL_0274: sub - IL_0275: stloc.1 - IL_0276: br.s IL_027e - - IL_0278: ldloc.2 - IL_0279: ldloc.1 - IL_027a: ldloc.2 - IL_027b: add - IL_027c: add - IL_027d: stloc.2 - IL_027e: ldloc.1 - IL_027f: ldloc.2 - IL_0280: bgt.s IL_028a - - IL_0282: ldloc.1 - IL_0283: ldloc.1 - IL_0284: ldloc.2 - IL_0285: sub - IL_0286: mul - IL_0287: stloc.1 - IL_0288: br.s IL_0290 - - IL_028a: ldloc.2 - IL_028b: ldloc.1 - IL_028c: ldloc.2 - IL_028d: sub - IL_028e: sub - IL_028f: stloc.2 - IL_0290: ldloc.1 - IL_0291: ldloc.2 - IL_0292: bne.un.s IL_029c - - IL_0294: ldloc.1 - IL_0295: ldloc.1 - IL_0296: ldloc.2 - IL_0297: sub - IL_0298: mul - IL_0299: stloc.1 - IL_029a: br.s IL_02a2 - - IL_029c: ldloc.2 - IL_029d: ldloc.1 - IL_029e: ldloc.2 - IL_029f: sub - IL_02a0: mul - IL_02a1: stloc.2 - IL_02a2: ldloc.1 - IL_02a3: ldloc.2 - IL_02a4: bge.s IL_02ae - - IL_02a6: ldloc.1 - IL_02a7: ldloc.1 - IL_02a8: ldloc.2 - IL_02a9: mul - IL_02aa: add - IL_02ab: stloc.1 - IL_02ac: br.s IL_02b4 - - IL_02ae: ldloc.2 - IL_02af: ldloc.1 - IL_02b0: ldloc.2 - IL_02b1: mul - IL_02b2: mul - IL_02b3: stloc.2 - IL_02b4: ldloc.1 - IL_02b5: ldloc.2 - IL_02b6: bgt.s IL_02c0 - - IL_02b8: ldloc.1 - IL_02b9: ldloc.1 - IL_02ba: ldloc.2 - IL_02bb: mul - IL_02bc: mul - IL_02bd: stloc.1 - IL_02be: br.s IL_02c6 - - IL_02c0: ldloc.2 - IL_02c1: ldloc.1 - IL_02c2: ldloc.2 - IL_02c3: mul - IL_02c4: mul - IL_02c5: stloc.2 - IL_02c6: ldloc.1 - IL_02c7: ldloc.2 - IL_02c8: bne.un.s IL_02d2 - - IL_02ca: ldloc.1 - IL_02cb: ldloc.1 - IL_02cc: ldloc.2 - IL_02cd: add - IL_02ce: add - IL_02cf: stloc.1 - IL_02d0: br.s IL_02d8 - - IL_02d2: ldloc.2 - IL_02d3: ldloc.1 - IL_02d4: ldloc.2 - IL_02d5: add - IL_02d6: add - IL_02d7: stloc.2 - IL_02d8: ldloc.1 - IL_02d9: ldloc.2 - IL_02da: ble.s IL_02e4 - - IL_02dc: ldloc.1 - IL_02dd: ldloc.1 - IL_02de: ldloc.2 - IL_02df: mul - IL_02e0: mul - IL_02e1: stloc.1 - IL_02e2: br.s IL_02ea - - IL_02e4: ldloc.2 - IL_02e5: ldloc.1 - IL_02e6: ldloc.2 - IL_02e7: mul - IL_02e8: sub - IL_02e9: stloc.2 - IL_02ea: ldloc.1 - IL_02eb: ldloc.2 - IL_02ec: ble.s IL_02f6 - - IL_02ee: ldloc.1 - IL_02ef: ldloc.1 - IL_02f0: ldloc.2 - IL_02f1: add - IL_02f2: add - IL_02f3: stloc.1 - IL_02f4: br.s IL_02fc - - IL_02f6: ldloc.2 - IL_02f7: ldloc.1 - IL_02f8: ldloc.2 - IL_02f9: add - IL_02fa: sub - IL_02fb: stloc.2 - IL_02fc: ldloc.1 - IL_02fd: ldloc.2 - IL_02fe: ble.s IL_0308 - - IL_0300: ldloc.1 - IL_0301: ldloc.1 - IL_0302: ldloc.2 - IL_0303: sub - IL_0304: sub - IL_0305: stloc.1 - IL_0306: br.s IL_030e - - IL_0308: ldloc.2 - IL_0309: ldloc.1 - IL_030a: ldloc.2 - IL_030b: sub - IL_030c: mul - IL_030d: stloc.2 - IL_030e: ldloc.1 - IL_030f: ldloc.2 - IL_0310: ble.s IL_031a - - IL_0312: ldloc.1 - IL_0313: ldloc.1 - IL_0314: ldloc.2 - IL_0315: mul - IL_0316: mul - IL_0317: stloc.1 - IL_0318: br.s IL_0320 - - IL_031a: ldloc.2 - IL_031b: ldloc.1 - IL_031c: ldloc.2 - IL_031d: mul - IL_031e: mul - IL_031f: stloc.2 - IL_0320: ldloc.1 - IL_0321: ldloc.2 - IL_0322: ble.s IL_032c - - IL_0324: ldloc.1 - IL_0325: ldloc.1 - IL_0326: ldloc.2 - IL_0327: add - IL_0328: add - IL_0329: stloc.1 - IL_032a: br.s IL_0332 - - IL_032c: ldloc.2 - IL_032d: ldloc.1 - IL_032e: ldloc.2 - IL_032f: add - IL_0330: add - IL_0331: stloc.2 - IL_0332: ldloc.1 - IL_0333: ldloc.2 - IL_0334: blt.s IL_033e - - IL_0336: ldloc.1 - IL_0337: ldloc.1 - IL_0338: ldloc.2 - IL_0339: sub - IL_033a: add - IL_033b: stloc.1 - IL_033c: br.s IL_0344 - - IL_033e: ldloc.2 - IL_033f: ldloc.1 - IL_0340: ldloc.2 - IL_0341: sub - IL_0342: add - IL_0343: stloc.2 - IL_0344: ldloc.1 - IL_0345: ldloc.2 - IL_0346: bge.s IL_0350 - - IL_0348: ldloc.1 - IL_0349: ldloc.1 - IL_034a: ldloc.2 - IL_034b: mul - IL_034c: sub - IL_034d: stloc.1 - IL_034e: br.s IL_0356 - - IL_0350: ldloc.2 - IL_0351: ldloc.1 - IL_0352: ldloc.2 - IL_0353: mul - IL_0354: sub - IL_0355: stloc.2 - IL_0356: ldloc.1 - IL_0357: ldloc.2 - IL_0358: beq.s IL_0362 - - IL_035a: ldloc.1 - IL_035b: ldloc.1 - IL_035c: ldloc.2 - IL_035d: sub - IL_035e: sub - IL_035f: stloc.1 - IL_0360: br.s IL_0368 - - IL_0362: ldloc.2 - IL_0363: ldloc.1 - IL_0364: ldloc.2 - IL_0365: sub - IL_0366: sub - IL_0367: stloc.2 - IL_0368: ldloc.1 - IL_0369: ldloc.2 - IL_036a: ble.s IL_0374 - - IL_036c: ldloc.1 - IL_036d: ldloc.1 - IL_036e: ldloc.2 - IL_036f: mul - IL_0370: add - IL_0371: stloc.1 - IL_0372: br.s IL_037a - - IL_0374: ldloc.2 - IL_0375: ldloc.1 - IL_0376: ldloc.2 - IL_0377: mul - IL_0378: add - IL_0379: stloc.2 - IL_037a: ldloc.1 - IL_037b: ldloc.2 - IL_037c: bgt.s IL_0386 - - IL_037e: ldloc.1 - IL_037f: ldloc.1 - IL_0380: ldloc.2 - IL_0381: mul - IL_0382: sub - IL_0383: stloc.1 - IL_0384: br.s IL_038c - - IL_0386: ldloc.2 - IL_0387: ldloc.1 - IL_0388: ldloc.2 - IL_0389: mul - IL_038a: sub - IL_038b: stloc.2 - IL_038c: ldloc.1 - IL_038d: ldloc.2 - IL_038e: blt.s IL_0398 - - IL_0390: ldloc.1 - IL_0391: ldloc.1 - IL_0392: ldloc.2 - IL_0393: mul - IL_0394: mul - IL_0395: stloc.1 - IL_0396: br.s IL_039e - - IL_0398: ldloc.2 - IL_0399: ldloc.1 - IL_039a: ldloc.2 - IL_039b: mul - IL_039c: add - IL_039d: stloc.2 - IL_039e: ldloc.1 - IL_039f: ldloc.2 - IL_03a0: bge.s IL_03aa - - IL_03a2: ldloc.1 - IL_03a3: ldloc.1 - IL_03a4: ldloc.2 - IL_03a5: sub - IL_03a6: sub - IL_03a7: stloc.1 - IL_03a8: br.s IL_03b0 - - IL_03aa: ldloc.2 - IL_03ab: ldloc.1 - IL_03ac: ldloc.2 - IL_03ad: sub - IL_03ae: sub - IL_03af: stloc.2 - IL_03b0: ldloc.1 - IL_03b1: ldloc.2 - IL_03b2: ble.s IL_03bc - - IL_03b4: ldloc.1 - IL_03b5: ldloc.1 - IL_03b6: ldloc.2 - IL_03b7: sub - IL_03b8: add - IL_03b9: stloc.1 - IL_03ba: br.s IL_03c2 - - IL_03bc: ldloc.2 - IL_03bd: ldloc.1 - IL_03be: ldloc.2 - IL_03bf: sub - IL_03c0: mul - IL_03c1: stloc.2 - IL_03c2: ldloc.1 - IL_03c3: ldloc.2 - IL_03c4: bge.s IL_03ce - - IL_03c6: ldloc.1 - IL_03c7: ldloc.1 - IL_03c8: ldloc.2 - IL_03c9: mul - IL_03ca: add - IL_03cb: stloc.1 - IL_03cc: br.s IL_03d4 - - IL_03ce: ldloc.2 - IL_03cf: ldloc.1 - IL_03d0: ldloc.2 - IL_03d1: mul - IL_03d2: sub - IL_03d3: stloc.2 - IL_03d4: ldloc.1 - IL_03d5: ldloc.2 - IL_03d6: bne.un.s IL_03e0 - - IL_03d8: ldloc.1 - IL_03d9: ldloc.1 - IL_03da: ldloc.2 - IL_03db: sub - IL_03dc: mul - IL_03dd: stloc.1 - IL_03de: br.s IL_03e6 - - IL_03e0: ldloc.2 - IL_03e1: ldloc.1 - IL_03e2: ldloc.2 - IL_03e3: sub - IL_03e4: sub - IL_03e5: stloc.2 - IL_03e6: ldloc.1 - IL_03e7: ldloc.2 - IL_03e8: blt.s IL_03f2 - - IL_03ea: ldloc.1 - IL_03eb: ldloc.1 - IL_03ec: ldloc.2 - IL_03ed: mul - IL_03ee: sub - IL_03ef: stloc.1 - IL_03f0: br.s IL_03f8 - - IL_03f2: ldloc.2 - IL_03f3: ldloc.1 - IL_03f4: ldloc.2 - IL_03f5: mul - IL_03f6: sub - IL_03f7: stloc.2 - IL_03f8: ldloc.1 - IL_03f9: ldloc.2 - IL_03fa: bne.un.s IL_0404 - - IL_03fc: ldloc.1 - IL_03fd: ldloc.1 - IL_03fe: ldloc.2 - IL_03ff: add - IL_0400: sub - IL_0401: stloc.1 - IL_0402: br.s IL_040a - - IL_0404: ldloc.2 - IL_0405: ldloc.1 - IL_0406: ldloc.2 - IL_0407: add - IL_0408: sub - IL_0409: stloc.2 - IL_040a: ldloc.1 - IL_040b: ldloc.2 - IL_040c: bne.un.s IL_0416 - - IL_040e: ldloc.1 - IL_040f: ldloc.1 - IL_0410: ldloc.2 - IL_0411: sub - IL_0412: add - IL_0413: stloc.1 - IL_0414: br.s IL_041c - - IL_0416: ldloc.2 - IL_0417: ldloc.1 - IL_0418: ldloc.2 - IL_0419: sub - IL_041a: sub - IL_041b: stloc.2 - IL_041c: ldloc.1 - IL_041d: ldloc.2 - IL_041e: blt.s IL_0428 - - IL_0420: ldloc.1 - IL_0421: ldloc.1 - IL_0422: ldloc.2 - IL_0423: mul - IL_0424: add - IL_0425: stloc.1 - IL_0426: br.s IL_042e - - IL_0428: ldloc.2 - IL_0429: ldloc.1 - IL_042a: ldloc.2 - IL_042b: mul - IL_042c: mul - IL_042d: stloc.2 - IL_042e: ldloc.1 - IL_042f: ldloc.2 - IL_0430: bne.un.s IL_043a - - IL_0432: ldloc.1 - IL_0433: ldloc.1 - IL_0434: ldloc.2 - IL_0435: mul - IL_0436: sub - IL_0437: stloc.1 - IL_0438: br.s IL_0440 - - IL_043a: ldloc.2 - IL_043b: ldloc.1 - IL_043c: ldloc.2 - IL_043d: mul - IL_043e: add - IL_043f: stloc.2 - IL_0440: ldloc.1 - IL_0441: ldloc.2 - IL_0442: bne.un.s IL_044c - - IL_0444: ldloc.1 - IL_0445: ldloc.1 - IL_0446: ldloc.2 - IL_0447: mul - IL_0448: add - IL_0449: stloc.1 - IL_044a: br.s IL_0452 - - IL_044c: ldloc.2 - IL_044d: ldloc.1 - IL_044e: ldloc.2 - IL_044f: mul - IL_0450: mul - IL_0451: stloc.2 - IL_0452: ldloc.1 - IL_0453: ldloc.2 - IL_0454: blt.s IL_045e - - IL_0456: ldloc.1 - IL_0457: ldloc.1 - IL_0458: ldloc.2 - IL_0459: add - IL_045a: mul - IL_045b: stloc.1 - IL_045c: br.s IL_0464 - - IL_045e: ldloc.2 - IL_045f: ldloc.1 - IL_0460: ldloc.2 - IL_0461: add - IL_0462: add - IL_0463: stloc.2 - IL_0464: ldloc.1 - IL_0465: ldloc.2 - IL_0466: bgt.s IL_0470 - - IL_0468: ldloc.1 - IL_0469: ldloc.1 - IL_046a: ldloc.2 - IL_046b: sub - IL_046c: add - IL_046d: stloc.1 - IL_046e: br.s IL_0476 - - IL_0470: ldloc.2 - IL_0471: ldloc.1 - IL_0472: ldloc.2 - IL_0473: sub - IL_0474: mul - IL_0475: stloc.2 - IL_0476: ldloc.1 - IL_0477: ldloc.2 - IL_0478: beq.s IL_0482 - - IL_047a: ldloc.1 - IL_047b: ldloc.1 - IL_047c: ldloc.2 - IL_047d: mul - IL_047e: mul - IL_047f: stloc.1 - IL_0480: br.s IL_0488 - - IL_0482: ldloc.2 - IL_0483: ldloc.1 - IL_0484: ldloc.2 - IL_0485: mul - IL_0486: sub - IL_0487: stloc.2 - IL_0488: ldloc.1 - IL_0489: ldloc.2 - IL_048a: bge.s IL_0494 - - IL_048c: ldloc.1 - IL_048d: ldloc.1 - IL_048e: ldloc.2 - IL_048f: mul - IL_0490: sub - IL_0491: stloc.1 - IL_0492: br.s IL_049a - - IL_0494: ldloc.2 - IL_0495: ldloc.1 - IL_0496: ldloc.2 - IL_0497: mul - IL_0498: mul - IL_0499: stloc.2 - IL_049a: ldloc.1 - IL_049b: ldloc.2 - IL_049c: ble.s IL_04a6 - - IL_049e: ldloc.1 - IL_049f: ldloc.1 - IL_04a0: ldloc.2 - IL_04a1: add - IL_04a2: sub - IL_04a3: stloc.1 - IL_04a4: br.s IL_04ac - - IL_04a6: ldloc.2 - IL_04a7: ldloc.1 - IL_04a8: ldloc.2 - IL_04a9: add - IL_04aa: mul - IL_04ab: stloc.2 - IL_04ac: ldloc.1 - IL_04ad: ldloc.2 - IL_04ae: bgt.s IL_04b8 - - IL_04b0: ldloc.1 - IL_04b1: ldloc.1 - IL_04b2: ldloc.2 - IL_04b3: mul - IL_04b4: sub - IL_04b5: stloc.1 - IL_04b6: br.s IL_04be - - IL_04b8: ldloc.2 - IL_04b9: ldloc.1 - IL_04ba: ldloc.2 - IL_04bb: mul - IL_04bc: add - IL_04bd: stloc.2 - IL_04be: ldloc.1 - IL_04bf: ldloc.2 - IL_04c0: bge.s IL_04ca - - IL_04c2: ldloc.1 - IL_04c3: ldloc.1 - IL_04c4: ldloc.2 - IL_04c5: add - IL_04c6: mul - IL_04c7: stloc.1 - IL_04c8: br.s IL_04d0 - - IL_04ca: ldloc.2 - IL_04cb: ldloc.1 - IL_04cc: ldloc.2 - IL_04cd: add - IL_04ce: add - IL_04cf: stloc.2 - IL_04d0: ldloc.1 - IL_04d1: ldloc.2 - IL_04d2: bne.un.s IL_04dc - - IL_04d4: ldloc.1 - IL_04d5: ldloc.1 - IL_04d6: ldloc.2 - IL_04d7: add - IL_04d8: mul - IL_04d9: stloc.1 - IL_04da: br.s IL_04e2 - - IL_04dc: ldloc.2 - IL_04dd: ldloc.1 - IL_04de: ldloc.2 - IL_04df: add - IL_04e0: mul - IL_04e1: stloc.2 - IL_04e2: ldloc.1 - IL_04e3: ldloc.2 - IL_04e4: bne.un.s IL_04ee - - IL_04e6: ldloc.1 - IL_04e7: ldloc.1 - IL_04e8: ldloc.2 - IL_04e9: mul - IL_04ea: sub - IL_04eb: stloc.1 - IL_04ec: br.s IL_04f4 - - IL_04ee: ldloc.2 - IL_04ef: ldloc.1 - IL_04f0: ldloc.2 - IL_04f1: mul - IL_04f2: add - IL_04f3: stloc.2 - IL_04f4: ldloc.1 - IL_04f5: ldloc.2 - IL_04f6: ble.s IL_0500 - - IL_04f8: ldloc.1 - IL_04f9: ldloc.1 - IL_04fa: ldloc.2 - IL_04fb: sub - IL_04fc: sub - IL_04fd: stloc.1 - IL_04fe: br.s IL_0506 - - IL_0500: ldloc.2 - IL_0501: ldloc.1 - IL_0502: ldloc.2 - IL_0503: sub - IL_0504: sub - IL_0505: stloc.2 - IL_0506: ldloc.1 - IL_0507: ldloc.2 - IL_0508: ble.s IL_0512 - - IL_050a: ldloc.1 - IL_050b: ldloc.1 - IL_050c: ldloc.2 - IL_050d: sub - IL_050e: mul - IL_050f: stloc.1 - IL_0510: br.s IL_0518 - - IL_0512: ldloc.2 - IL_0513: ldloc.1 - IL_0514: ldloc.2 - IL_0515: sub - IL_0516: sub - IL_0517: stloc.2 - IL_0518: ldloc.1 - IL_0519: ldloc.2 - IL_051a: bne.un.s IL_0524 - - IL_051c: ldloc.1 - IL_051d: ldloc.1 - IL_051e: ldloc.2 - IL_051f: add - IL_0520: mul - IL_0521: stloc.1 - IL_0522: br.s IL_052a - - IL_0524: ldloc.2 - IL_0525: ldloc.1 - IL_0526: ldloc.2 - IL_0527: add - IL_0528: sub - IL_0529: stloc.2 - IL_052a: ldloc.1 - IL_052b: ldloc.2 - IL_052c: blt.s IL_0536 - - IL_052e: ldloc.1 - IL_052f: ldloc.1 - IL_0530: ldloc.2 - IL_0531: add - IL_0532: add - IL_0533: stloc.1 - IL_0534: br.s IL_053c - - IL_0536: ldloc.2 - IL_0537: ldloc.1 - IL_0538: ldloc.2 - IL_0539: add - IL_053a: mul - IL_053b: stloc.2 - IL_053c: ldloc.1 - IL_053d: ldloc.2 - IL_053e: bge.s IL_0548 - - IL_0540: ldloc.1 - IL_0541: ldloc.1 - IL_0542: ldloc.2 - IL_0543: add - IL_0544: mul - IL_0545: stloc.1 - IL_0546: br.s IL_054e - - IL_0548: ldloc.2 - IL_0549: ldloc.1 - IL_054a: ldloc.2 - IL_054b: add - IL_054c: add - IL_054d: stloc.2 - IL_054e: ldloc.1 - IL_054f: ldloc.2 - IL_0550: bne.un.s IL_055a - - IL_0552: ldloc.1 - IL_0553: ldloc.1 - IL_0554: ldloc.2 - IL_0555: mul - IL_0556: sub - IL_0557: stloc.1 - IL_0558: br.s IL_0560 - - IL_055a: ldloc.2 - IL_055b: ldloc.1 - IL_055c: ldloc.2 - IL_055d: mul - IL_055e: mul - IL_055f: stloc.2 - IL_0560: ldloc.1 - IL_0561: ldloc.2 - IL_0562: ble.s IL_056c - - IL_0564: ldloc.1 - IL_0565: ldloc.1 - IL_0566: ldloc.2 - IL_0567: add - IL_0568: mul - IL_0569: stloc.1 - IL_056a: br.s IL_0572 - - IL_056c: ldloc.2 - IL_056d: ldloc.1 - IL_056e: ldloc.2 - IL_056f: add - IL_0570: mul - IL_0571: stloc.2 - IL_0572: ldloc.1 - IL_0573: ldloc.2 - IL_0574: ble.s IL_057e - - IL_0576: ldloc.1 - IL_0577: ldloc.1 - IL_0578: ldloc.2 - IL_0579: mul - IL_057a: add - IL_057b: stloc.1 - IL_057c: br.s IL_0584 - - IL_057e: ldloc.2 - IL_057f: ldloc.1 - IL_0580: ldloc.2 - IL_0581: mul - IL_0582: add - IL_0583: stloc.2 - IL_0584: ldloc.1 - IL_0585: ldloc.2 - IL_0586: bge.s IL_0590 - - IL_0588: ldloc.1 - IL_0589: ldloc.1 - IL_058a: ldloc.2 - IL_058b: sub - IL_058c: add - IL_058d: stloc.1 - IL_058e: br.s IL_0596 - - IL_0590: ldloc.2 - IL_0591: ldloc.1 - IL_0592: ldloc.2 - IL_0593: sub - IL_0594: mul - IL_0595: stloc.2 - IL_0596: ldloc.1 - IL_0597: ldloc.2 - IL_0598: ble.s IL_05a2 - - IL_059a: ldloc.1 - IL_059b: ldloc.1 - IL_059c: ldloc.2 - IL_059d: mul - IL_059e: sub - IL_059f: stloc.1 - IL_05a0: br.s IL_05a8 - - IL_05a2: ldloc.2 - IL_05a3: ldloc.1 - IL_05a4: ldloc.2 - IL_05a5: mul - IL_05a6: mul - IL_05a7: stloc.2 - IL_05a8: ldloc.1 - IL_05a9: ldloc.2 - IL_05aa: beq.s IL_05b4 - - IL_05ac: ldloc.1 - IL_05ad: ldloc.1 - IL_05ae: ldloc.2 - IL_05af: add - IL_05b0: mul - IL_05b1: stloc.1 - IL_05b2: br.s IL_05ba - - IL_05b4: ldloc.2 - IL_05b5: ldloc.1 - IL_05b6: ldloc.2 - IL_05b7: add - IL_05b8: add - IL_05b9: stloc.2 - IL_05ba: ldloc.1 - IL_05bb: ldloc.2 - IL_05bc: bge.s IL_05c6 - - IL_05be: ldloc.1 - IL_05bf: ldloc.1 - IL_05c0: ldloc.2 - IL_05c1: sub - IL_05c2: mul - IL_05c3: stloc.1 - IL_05c4: br.s IL_05cc - - IL_05c6: ldloc.2 - IL_05c7: ldloc.1 - IL_05c8: ldloc.2 - IL_05c9: sub - IL_05ca: mul - IL_05cb: stloc.2 - IL_05cc: ldloc.1 - IL_05cd: ldloc.2 - IL_05ce: ble.s IL_05d8 - - IL_05d0: ldloc.1 - IL_05d1: ldloc.1 - IL_05d2: ldloc.2 - IL_05d3: add - IL_05d4: mul - IL_05d5: stloc.1 - IL_05d6: br.s IL_05de - - IL_05d8: ldloc.2 - IL_05d9: ldloc.1 - IL_05da: ldloc.2 - IL_05db: add - IL_05dc: add - IL_05dd: stloc.2 - IL_05de: ldloc.1 - IL_05df: ldloc.2 - IL_05e0: blt.s IL_05ea - - IL_05e2: ldloc.1 - IL_05e3: ldloc.1 - IL_05e4: ldloc.2 - IL_05e5: mul - IL_05e6: add - IL_05e7: stloc.1 - IL_05e8: br.s IL_05f0 - - IL_05ea: ldloc.2 - IL_05eb: ldloc.1 - IL_05ec: ldloc.2 - IL_05ed: mul - IL_05ee: add - IL_05ef: stloc.2 - IL_05f0: ldloc.1 - IL_05f1: ldloc.2 - IL_05f2: bgt.s IL_05fc - - IL_05f4: ldloc.1 - IL_05f5: ldloc.1 - IL_05f6: ldloc.2 - IL_05f7: sub - IL_05f8: mul - IL_05f9: stloc.1 - IL_05fa: br.s IL_0602 - - IL_05fc: ldloc.2 - IL_05fd: ldloc.1 - IL_05fe: ldloc.2 - IL_05ff: sub - IL_0600: add - IL_0601: stloc.2 - IL_0602: ldloc.1 - IL_0603: ldloc.2 - IL_0604: bne.un.s IL_060e - - IL_0606: ldloc.1 - IL_0607: ldloc.1 - IL_0608: ldloc.2 - IL_0609: sub - IL_060a: sub - IL_060b: stloc.1 - IL_060c: br.s IL_0614 - - IL_060e: ldloc.2 - IL_060f: ldloc.1 - IL_0610: ldloc.2 - IL_0611: sub - IL_0612: sub - IL_0613: stloc.2 - IL_0614: ldloc.1 - IL_0615: ldloc.2 - IL_0616: beq.s IL_0620 - - IL_0618: ldloc.1 - IL_0619: ldloc.1 - IL_061a: ldloc.2 - IL_061b: add - IL_061c: mul - IL_061d: stloc.1 - IL_061e: br.s IL_0626 - - IL_0620: ldloc.2 - IL_0621: ldloc.1 - IL_0622: ldloc.2 - IL_0623: add - IL_0624: add - IL_0625: stloc.2 - IL_0626: ldloc.1 - IL_0627: ldloc.2 - IL_0628: blt.s IL_0632 - - IL_062a: ldloc.1 - IL_062b: ldloc.1 - IL_062c: ldloc.2 - IL_062d: mul - IL_062e: add - IL_062f: stloc.1 - IL_0630: br.s IL_0638 - - IL_0632: ldloc.2 - IL_0633: ldloc.1 - IL_0634: ldloc.2 - IL_0635: mul - IL_0636: add - IL_0637: stloc.2 - IL_0638: ldloc.1 - IL_0639: ldloc.2 - IL_063a: bne.un.s IL_0644 - - IL_063c: ldloc.1 - IL_063d: ldloc.1 - IL_063e: ldloc.2 - IL_063f: add - IL_0640: add - IL_0641: stloc.1 - IL_0642: br.s IL_064a - - IL_0644: ldloc.2 - IL_0645: ldloc.1 - IL_0646: ldloc.2 - IL_0647: add - IL_0648: add - IL_0649: stloc.2 - IL_064a: ldloc.1 - IL_064b: ldloc.2 - IL_064c: ble.s IL_0656 - - IL_064e: ldloc.1 - IL_064f: ldloc.1 - IL_0650: ldloc.2 - IL_0651: sub - IL_0652: sub - IL_0653: stloc.1 - IL_0654: br.s IL_065c - - IL_0656: ldloc.2 - IL_0657: ldloc.1 - IL_0658: ldloc.2 - IL_0659: sub - IL_065a: sub - IL_065b: stloc.2 - IL_065c: ldloc.1 - IL_065d: ldloc.2 - IL_065e: beq.s IL_0668 - - IL_0660: ldloc.1 - IL_0661: ldloc.1 - IL_0662: ldloc.2 - IL_0663: sub - IL_0664: sub - IL_0665: stloc.1 - IL_0666: br.s IL_066e - - IL_0668: ldloc.2 - IL_0669: ldloc.1 - IL_066a: ldloc.2 - IL_066b: sub - IL_066c: mul - IL_066d: stloc.2 - IL_066e: ldloc.1 - IL_066f: ldloc.2 - IL_0670: ble.s IL_067a - - IL_0672: ldloc.1 - IL_0673: ldloc.1 - IL_0674: ldloc.2 - IL_0675: mul - IL_0676: mul - IL_0677: stloc.1 - IL_0678: br.s IL_0680 - - IL_067a: ldloc.2 - IL_067b: ldloc.1 - IL_067c: ldloc.2 - IL_067d: mul - IL_067e: add - IL_067f: stloc.2 - IL_0680: ldloc.1 - IL_0681: ldloc.2 - IL_0682: ble.s IL_068c - - IL_0684: ldloc.1 - IL_0685: ldloc.1 - IL_0686: ldloc.2 - IL_0687: sub - IL_0688: add - IL_0689: stloc.1 - IL_068a: br.s IL_0692 - - IL_068c: ldloc.2 - IL_068d: ldloc.1 - IL_068e: ldloc.2 - IL_068f: sub - IL_0690: add - IL_0691: stloc.2 - IL_0692: ldloc.1 - IL_0693: ldloc.2 - IL_0694: ble.s IL_069e - - IL_0696: ldloc.1 - IL_0697: ldloc.1 - IL_0698: ldloc.2 - IL_0699: sub - IL_069a: sub - IL_069b: stloc.1 - IL_069c: br.s IL_06a4 - - IL_069e: ldloc.2 - IL_069f: ldloc.1 - IL_06a0: ldloc.2 - IL_06a1: sub - IL_06a2: add - IL_06a3: stloc.2 - IL_06a4: ldloc.1 - IL_06a5: ldloc.2 - IL_06a6: blt.s IL_06b0 - - IL_06a8: ldloc.1 - IL_06a9: ldloc.1 - IL_06aa: ldloc.2 - IL_06ab: sub - IL_06ac: sub - IL_06ad: stloc.1 - IL_06ae: br.s IL_06b6 - - IL_06b0: ldloc.2 - IL_06b1: ldloc.1 - IL_06b2: ldloc.2 - IL_06b3: sub - IL_06b4: add - IL_06b5: stloc.2 - IL_06b6: ldloc.1 - IL_06b7: ldloc.2 - IL_06b8: bne.un.s IL_06c2 - - IL_06ba: ldloc.1 - IL_06bb: ldloc.1 - IL_06bc: ldloc.2 - IL_06bd: mul - IL_06be: sub - IL_06bf: stloc.1 - IL_06c0: br.s IL_06c8 - - IL_06c2: ldloc.2 - IL_06c3: ldloc.1 - IL_06c4: ldloc.2 - IL_06c5: mul - IL_06c6: add - IL_06c7: stloc.2 - IL_06c8: ldloc.1 - IL_06c9: ldloc.2 - IL_06ca: bgt.s IL_06d4 - - IL_06cc: ldloc.1 - IL_06cd: ldloc.1 - IL_06ce: ldloc.2 - IL_06cf: add - IL_06d0: add - IL_06d1: stloc.1 - IL_06d2: br.s IL_06da - - IL_06d4: ldloc.2 - IL_06d5: ldloc.1 - IL_06d6: ldloc.2 - IL_06d7: add - IL_06d8: add - IL_06d9: stloc.2 - IL_06da: ldloc.1 - IL_06db: ldloc.2 - IL_06dc: ble.s IL_06e6 - - IL_06de: ldloc.1 - IL_06df: ldloc.1 - IL_06e0: ldloc.2 - IL_06e1: add - IL_06e2: mul - IL_06e3: stloc.1 - IL_06e4: br.s IL_06ec - - IL_06e6: ldloc.2 - IL_06e7: ldloc.1 - IL_06e8: ldloc.2 - IL_06e9: add - IL_06ea: sub - IL_06eb: stloc.2 - IL_06ec: ldloc.1 - IL_06ed: ldloc.2 - IL_06ee: bge.s IL_06f8 - - IL_06f0: ldloc.1 - IL_06f1: ldloc.1 - IL_06f2: ldloc.2 - IL_06f3: add - IL_06f4: mul - IL_06f5: stloc.1 - IL_06f6: br.s IL_06fe - - IL_06f8: ldloc.2 - IL_06f9: ldloc.1 - IL_06fa: ldloc.2 - IL_06fb: add - IL_06fc: sub - IL_06fd: stloc.2 - IL_06fe: ldloc.1 - IL_06ff: ldloc.2 - IL_0700: bgt.s IL_070a - - IL_0702: ldloc.1 - IL_0703: ldloc.1 - IL_0704: ldloc.2 - IL_0705: mul - IL_0706: mul - IL_0707: stloc.1 - IL_0708: br.s IL_0710 - - IL_070a: ldloc.2 - IL_070b: ldloc.1 - IL_070c: ldloc.2 - IL_070d: mul - IL_070e: sub - IL_070f: stloc.2 - IL_0710: ldloc.1 - IL_0711: ldloc.2 - IL_0712: bgt.s IL_071c - - IL_0714: ldloc.1 - IL_0715: ldloc.1 - IL_0716: ldloc.2 - IL_0717: add - IL_0718: add - IL_0719: stloc.1 - IL_071a: br.s IL_0722 - - IL_071c: ldloc.2 - IL_071d: ldloc.1 - IL_071e: ldloc.2 - IL_071f: add - IL_0720: add - IL_0721: stloc.2 - IL_0722: ldloc.1 - IL_0723: ldloc.2 - IL_0724: ble.s IL_072e - - IL_0726: ldloc.1 - IL_0727: ldloc.1 - IL_0728: ldloc.2 - IL_0729: add - IL_072a: mul - IL_072b: stloc.1 - IL_072c: br.s IL_0734 - - IL_072e: ldloc.2 - IL_072f: ldloc.1 - IL_0730: ldloc.2 - IL_0731: add - IL_0732: mul - IL_0733: stloc.2 - IL_0734: ldloc.1 - IL_0735: ldloc.2 - IL_0736: ble.s IL_0740 - - IL_0738: ldloc.1 - IL_0739: ldloc.1 - IL_073a: ldloc.2 - IL_073b: sub - IL_073c: mul - IL_073d: stloc.1 - IL_073e: br.s IL_0746 - - IL_0740: ldloc.2 - IL_0741: ldloc.1 - IL_0742: ldloc.2 - IL_0743: sub - IL_0744: sub - IL_0745: stloc.2 - IL_0746: ldloc.1 - IL_0747: ldloc.2 - IL_0748: bge.s IL_0752 - - IL_074a: ldloc.1 - IL_074b: ldloc.1 - IL_074c: ldloc.2 - IL_074d: sub - IL_074e: add - IL_074f: stloc.1 - IL_0750: br.s IL_0758 - - IL_0752: ldloc.2 - IL_0753: ldloc.1 - IL_0754: ldloc.2 - IL_0755: sub - IL_0756: mul - IL_0757: stloc.2 - IL_0758: ldloc.1 - IL_0759: ldloc.2 - IL_075a: blt.s IL_0764 - - IL_075c: ldloc.1 - IL_075d: ldloc.1 - IL_075e: ldloc.2 - IL_075f: mul - IL_0760: mul - IL_0761: stloc.1 - IL_0762: br.s IL_076a - - IL_0764: ldloc.2 - IL_0765: ldloc.1 - IL_0766: ldloc.2 - IL_0767: mul - IL_0768: mul - IL_0769: stloc.2 - IL_076a: ldloc.1 - IL_076b: ldloc.2 - IL_076c: bne.un.s IL_0776 - - IL_076e: ldloc.1 - IL_076f: ldloc.1 - IL_0770: ldloc.2 - IL_0771: add - IL_0772: add - IL_0773: stloc.1 - IL_0774: br.s IL_077c - - IL_0776: ldloc.2 - IL_0777: ldloc.1 - IL_0778: ldloc.2 - IL_0779: add - IL_077a: mul - IL_077b: stloc.2 - IL_077c: ldloc.1 - IL_077d: ldloc.2 - IL_077e: bgt.s IL_0788 - - IL_0780: ldloc.1 - IL_0781: ldloc.1 - IL_0782: ldloc.2 - IL_0783: add - IL_0784: mul - IL_0785: stloc.1 - IL_0786: br.s IL_078e - - IL_0788: ldloc.2 - IL_0789: ldloc.1 - IL_078a: ldloc.2 - IL_078b: add - IL_078c: add - IL_078d: stloc.2 - IL_078e: ldloc.1 - IL_078f: ldloc.2 - IL_0790: bge.s IL_079a - - IL_0792: ldloc.1 - IL_0793: ldloc.1 - IL_0794: ldloc.2 - IL_0795: sub - IL_0796: mul - IL_0797: stloc.1 - IL_0798: br.s IL_07a0 - - IL_079a: ldloc.2 - IL_079b: ldloc.1 - IL_079c: ldloc.2 - IL_079d: sub - IL_079e: mul - IL_079f: stloc.2 - IL_07a0: ldloc.1 - IL_07a1: ldloc.2 - IL_07a2: ble.s IL_07ac - - IL_07a4: ldloc.1 - IL_07a5: ldloc.1 - IL_07a6: ldloc.2 - IL_07a7: sub - IL_07a8: add - IL_07a9: stloc.1 - IL_07aa: br.s IL_07b2 - - IL_07ac: ldloc.2 - IL_07ad: ldloc.1 - IL_07ae: ldloc.2 - IL_07af: sub - IL_07b0: mul - IL_07b1: stloc.2 - IL_07b2: ldloc.1 - IL_07b3: ldloc.2 - IL_07b4: bge.s IL_07be - - IL_07b6: ldloc.1 - IL_07b7: ldloc.1 - IL_07b8: ldloc.2 - IL_07b9: mul - IL_07ba: mul - IL_07bb: stloc.1 - IL_07bc: br.s IL_07c4 - - IL_07be: ldloc.2 - IL_07bf: ldloc.1 - IL_07c0: ldloc.2 - IL_07c1: mul - IL_07c2: mul - IL_07c3: stloc.2 - IL_07c4: ldloc.1 - IL_07c5: ldloc.2 - IL_07c6: bgt.s IL_07d0 - - IL_07c8: ldloc.1 - IL_07c9: ldloc.1 - IL_07ca: ldloc.2 - IL_07cb: sub - IL_07cc: add - IL_07cd: stloc.1 - IL_07ce: br.s IL_07d6 - - IL_07d0: ldloc.2 - IL_07d1: ldloc.1 - IL_07d2: ldloc.2 - IL_07d3: sub - IL_07d4: add - IL_07d5: stloc.2 - IL_07d6: ldloc.1 - IL_07d7: ldloc.2 - IL_07d8: blt.s IL_07e2 - - IL_07da: ldloc.1 - IL_07db: ldloc.1 - IL_07dc: ldloc.2 - IL_07dd: add - IL_07de: add - IL_07df: stloc.1 - IL_07e0: br.s IL_07e8 - - IL_07e2: ldloc.2 - IL_07e3: ldloc.1 - IL_07e4: ldloc.2 - IL_07e5: add - IL_07e6: mul - IL_07e7: stloc.2 - IL_07e8: ldloc.1 - IL_07e9: ldloc.2 - IL_07ea: bge.s IL_07f4 - - IL_07ec: ldloc.1 - IL_07ed: ldloc.1 - IL_07ee: ldloc.2 - IL_07ef: sub - IL_07f0: mul - IL_07f1: stloc.1 - IL_07f2: br.s IL_07fa - - IL_07f4: ldloc.2 - IL_07f5: ldloc.1 - IL_07f6: ldloc.2 - IL_07f7: sub - IL_07f8: mul - IL_07f9: stloc.2 - IL_07fa: ldloc.1 - IL_07fb: ldloc.2 - IL_07fc: bge.s IL_0806 - - IL_07fe: ldloc.1 - IL_07ff: ldloc.1 - IL_0800: ldloc.2 - IL_0801: sub - IL_0802: mul - IL_0803: stloc.1 - IL_0804: br.s IL_080c - - IL_0806: ldloc.2 - IL_0807: ldloc.1 - IL_0808: ldloc.2 - IL_0809: sub - IL_080a: add - IL_080b: stloc.2 - IL_080c: ldloc.1 - IL_080d: ldloc.2 - IL_080e: blt.s IL_0818 - - IL_0810: ldloc.1 - IL_0811: ldloc.1 - IL_0812: ldloc.2 - IL_0813: add - IL_0814: mul - IL_0815: stloc.1 - IL_0816: br.s IL_081e - - IL_0818: ldloc.2 - IL_0819: ldloc.1 - IL_081a: ldloc.2 - IL_081b: add - IL_081c: sub - IL_081d: stloc.2 - IL_081e: ldloc.1 - IL_081f: ldloc.2 - IL_0820: blt.s IL_082a - - IL_0822: ldloc.1 - IL_0823: ldloc.1 - IL_0824: ldloc.2 - IL_0825: add - IL_0826: sub - IL_0827: stloc.1 - IL_0828: br.s IL_0830 - - IL_082a: ldloc.2 - IL_082b: ldloc.1 - IL_082c: ldloc.2 - IL_082d: add - IL_082e: add - IL_082f: stloc.2 - IL_0830: ldloc.1 - IL_0831: ldloc.2 - IL_0832: bne.un.s IL_083c - - IL_0834: ldloc.1 - IL_0835: ldloc.1 - IL_0836: ldloc.2 - IL_0837: mul - IL_0838: add - IL_0839: stloc.1 - IL_083a: br.s IL_0842 - - IL_083c: ldloc.2 - IL_083d: ldloc.1 - IL_083e: ldloc.2 - IL_083f: mul - IL_0840: add - IL_0841: stloc.2 - IL_0842: ldloc.1 - IL_0843: ldloc.2 - IL_0844: bge.s IL_084e - - IL_0846: ldloc.1 - IL_0847: ldloc.1 - IL_0848: ldloc.2 - IL_0849: sub - IL_084a: add - IL_084b: stloc.1 - IL_084c: br.s IL_0854 - - IL_084e: ldloc.2 - IL_084f: ldloc.1 - IL_0850: ldloc.2 - IL_0851: sub - IL_0852: add - IL_0853: stloc.2 - IL_0854: ldloc.1 - IL_0855: ldloc.2 - IL_0856: ble.s IL_0860 - - IL_0858: ldloc.1 - IL_0859: ldloc.1 - IL_085a: ldloc.2 - IL_085b: sub - IL_085c: mul - IL_085d: stloc.1 - IL_085e: br.s IL_0866 - - IL_0860: ldloc.2 - IL_0861: ldloc.1 - IL_0862: ldloc.2 - IL_0863: sub - IL_0864: add - IL_0865: stloc.2 - IL_0866: ldloc.1 - IL_0867: ldloc.2 - IL_0868: beq.s IL_0872 - - IL_086a: ldloc.1 - IL_086b: ldloc.1 - IL_086c: ldloc.2 - IL_086d: sub - IL_086e: sub - IL_086f: stloc.1 - IL_0870: br.s IL_0878 - - IL_0872: ldloc.2 - IL_0873: ldloc.1 - IL_0874: ldloc.2 - IL_0875: sub - IL_0876: mul - IL_0877: stloc.2 - IL_0878: ldloc.1 - IL_0879: ldloc.2 - IL_087a: bge.s IL_0884 - - IL_087c: ldloc.1 - IL_087d: ldloc.1 - IL_087e: ldloc.2 - IL_087f: sub - IL_0880: add - IL_0881: stloc.1 - IL_0882: br.s IL_088a - - IL_0884: ldloc.2 - IL_0885: ldloc.1 - IL_0886: ldloc.2 - IL_0887: sub - IL_0888: mul - IL_0889: stloc.2 - IL_088a: ldloc.1 - IL_088b: ldloc.2 - IL_088c: bge.s IL_0896 - - IL_088e: ldloc.1 - IL_088f: ldloc.1 - IL_0890: ldloc.2 - IL_0891: sub - IL_0892: sub - IL_0893: stloc.1 - IL_0894: br.s IL_089c - - IL_0896: ldloc.2 - IL_0897: ldloc.1 - IL_0898: ldloc.2 - IL_0899: sub - IL_089a: add - IL_089b: stloc.2 - IL_089c: ldloc.1 - IL_089d: ldloc.2 - IL_089e: beq.s IL_08a8 - - IL_08a0: ldloc.1 - IL_08a1: ldloc.1 - IL_08a2: ldloc.2 - IL_08a3: add - IL_08a4: add - IL_08a5: stloc.1 - IL_08a6: br.s IL_08ae - - IL_08a8: ldloc.2 - IL_08a9: ldloc.1 - IL_08aa: ldloc.2 - IL_08ab: add - IL_08ac: add - IL_08ad: stloc.2 - IL_08ae: ldloc.1 - IL_08af: ldloc.2 - IL_08b0: bge.s IL_08ba - - IL_08b2: ldloc.1 - IL_08b3: ldloc.1 - IL_08b4: ldloc.2 - IL_08b5: add - IL_08b6: mul - IL_08b7: stloc.1 - IL_08b8: br.s IL_08c0 - - IL_08ba: ldloc.2 - IL_08bb: ldloc.1 - IL_08bc: ldloc.2 - IL_08bd: add - IL_08be: sub - IL_08bf: stloc.2 - IL_08c0: ldloc.1 - IL_08c1: ldloc.2 - IL_08c2: ble.s IL_08cc - - IL_08c4: ldloc.1 - IL_08c5: ldloc.1 - IL_08c6: ldloc.2 - IL_08c7: add - IL_08c8: add - IL_08c9: stloc.1 - IL_08ca: br.s IL_08d2 - - IL_08cc: ldloc.2 - IL_08cd: ldloc.1 - IL_08ce: ldloc.2 - IL_08cf: add - IL_08d0: sub - IL_08d1: stloc.2 - IL_08d2: ldloc.1 - IL_08d3: ldloc.2 - IL_08d4: beq.s IL_08de - - IL_08d6: ldloc.1 - IL_08d7: ldloc.1 - IL_08d8: ldloc.2 - IL_08d9: add - IL_08da: mul - IL_08db: stloc.1 - IL_08dc: br.s IL_08e4 - - IL_08de: ldloc.2 - IL_08df: ldloc.1 - IL_08e0: ldloc.2 - IL_08e1: add - IL_08e2: mul - IL_08e3: stloc.2 - IL_08e4: ldloc.1 - IL_08e5: ldloc.2 - IL_08e6: bgt.s IL_08f0 - - IL_08e8: ldloc.1 - IL_08e9: ldloc.1 - IL_08ea: ldloc.2 - IL_08eb: sub - IL_08ec: add - IL_08ed: stloc.1 - IL_08ee: br.s IL_08f6 - - IL_08f0: ldloc.2 - IL_08f1: ldloc.1 - IL_08f2: ldloc.2 - IL_08f3: sub - IL_08f4: sub - IL_08f5: stloc.2 - IL_08f6: ldloc.1 - IL_08f7: ldloc.2 - IL_08f8: bgt.s IL_0902 - - IL_08fa: ldloc.1 - IL_08fb: ldloc.1 - IL_08fc: ldloc.2 - IL_08fd: add - IL_08fe: mul - IL_08ff: stloc.1 - IL_0900: br.s IL_0908 - - IL_0902: ldloc.2 - IL_0903: ldloc.1 - IL_0904: ldloc.2 - IL_0905: add - IL_0906: mul - IL_0907: stloc.2 - IL_0908: ldloc.1 - IL_0909: ldloc.2 - IL_090a: bge.s IL_0914 - - IL_090c: ldloc.1 - IL_090d: ldloc.1 - IL_090e: ldloc.2 - IL_090f: sub - IL_0910: add - IL_0911: stloc.1 - IL_0912: br.s IL_091a - - IL_0914: ldloc.2 - IL_0915: ldloc.1 - IL_0916: ldloc.2 - IL_0917: sub - IL_0918: mul - IL_0919: stloc.2 - IL_091a: ldloc.1 - IL_091b: ldloc.2 - IL_091c: bgt.s IL_0926 - - IL_091e: ldloc.1 - IL_091f: ldloc.1 - IL_0920: ldloc.2 - IL_0921: sub - IL_0922: sub - IL_0923: stloc.1 - IL_0924: br.s IL_092c - - IL_0926: ldloc.2 - IL_0927: ldloc.1 - IL_0928: ldloc.2 - IL_0929: sub - IL_092a: mul - IL_092b: stloc.2 - IL_092c: ldloc.1 - IL_092d: ldloc.2 - IL_092e: beq.s IL_0938 - - IL_0930: ldloc.1 - IL_0931: ldloc.1 - IL_0932: ldloc.2 - IL_0933: add - IL_0934: mul - IL_0935: stloc.1 - IL_0936: br.s IL_093e - - IL_0938: ldloc.2 - IL_0939: ldloc.1 - IL_093a: ldloc.2 - IL_093b: add - IL_093c: mul - IL_093d: stloc.2 - IL_093e: ldloc.1 - IL_093f: ldloc.2 - IL_0940: ble.s IL_094a - - IL_0942: ldloc.1 - IL_0943: ldloc.1 - IL_0944: ldloc.2 - IL_0945: sub - IL_0946: mul - IL_0947: stloc.1 - IL_0948: br.s IL_0950 - - IL_094a: ldloc.2 - IL_094b: ldloc.1 - IL_094c: ldloc.2 - IL_094d: sub - IL_094e: sub - IL_094f: stloc.2 - IL_0950: ldloc.1 - IL_0951: ldloc.2 - IL_0952: bge.s IL_095c - - IL_0954: ldloc.1 - IL_0955: ldloc.1 - IL_0956: ldloc.2 - IL_0957: mul - IL_0958: add - IL_0959: stloc.1 - IL_095a: br.s IL_0962 - - IL_095c: ldloc.2 - IL_095d: ldloc.1 - IL_095e: ldloc.2 - IL_095f: mul - IL_0960: sub - IL_0961: stloc.2 - IL_0962: ldloc.1 - IL_0963: ldloc.2 - IL_0964: bne.un.s IL_096e - - IL_0966: ldloc.1 - IL_0967: ldloc.1 - IL_0968: ldloc.2 - IL_0969: sub - IL_096a: sub - IL_096b: stloc.1 - IL_096c: br.s IL_0974 - - IL_096e: ldloc.2 - IL_096f: ldloc.1 - IL_0970: ldloc.2 - IL_0971: sub - IL_0972: sub - IL_0973: stloc.2 - IL_0974: ldloc.1 - IL_0975: ldloc.2 - IL_0976: blt.s IL_0980 - - IL_0978: ldloc.1 - IL_0979: ldloc.1 - IL_097a: ldloc.2 - IL_097b: add - IL_097c: mul - IL_097d: stloc.1 - IL_097e: br.s IL_0986 - - IL_0980: ldloc.2 - IL_0981: ldloc.1 - IL_0982: ldloc.2 - IL_0983: add - IL_0984: mul - IL_0985: stloc.2 - IL_0986: ldloc.1 - IL_0987: ldloc.2 - IL_0988: beq.s IL_0992 - - IL_098a: ldloc.1 - IL_098b: ldloc.1 - IL_098c: ldloc.2 - IL_098d: add - IL_098e: mul - IL_098f: stloc.1 - IL_0990: br.s IL_0998 - - IL_0992: ldloc.2 - IL_0993: ldloc.1 - IL_0994: ldloc.2 - IL_0995: add - IL_0996: mul - IL_0997: stloc.2 - IL_0998: ldloc.1 - IL_0999: ldloc.2 - IL_099a: blt.s IL_09a4 - - IL_099c: ldloc.1 - IL_099d: ldloc.1 - IL_099e: ldloc.2 - IL_099f: mul - IL_09a0: mul - IL_09a1: stloc.1 - IL_09a2: br.s IL_09aa - - IL_09a4: ldloc.2 - IL_09a5: ldloc.1 - IL_09a6: ldloc.2 - IL_09a7: mul - IL_09a8: add - IL_09a9: stloc.2 - IL_09aa: ldloc.1 - IL_09ab: ldloc.2 - IL_09ac: bne.un.s IL_09b6 - - IL_09ae: ldloc.1 - IL_09af: ldloc.1 - IL_09b0: ldloc.2 - IL_09b1: sub - IL_09b2: add - IL_09b3: stloc.1 - IL_09b4: br.s IL_09bc - - IL_09b6: ldloc.2 - IL_09b7: ldloc.1 - IL_09b8: ldloc.2 - IL_09b9: sub - IL_09ba: sub - IL_09bb: stloc.2 - IL_09bc: ldloc.1 - IL_09bd: ldloc.2 - IL_09be: bge.s IL_09c8 - - IL_09c0: ldloc.1 - IL_09c1: ldloc.1 - IL_09c2: ldloc.2 - IL_09c3: add - IL_09c4: add - IL_09c5: stloc.1 - IL_09c6: br.s IL_09ce - - IL_09c8: ldloc.2 - IL_09c9: ldloc.1 - IL_09ca: ldloc.2 - IL_09cb: add - IL_09cc: sub - IL_09cd: stloc.2 - IL_09ce: ldloc.1 - IL_09cf: ldloc.2 - IL_09d0: bne.un.s IL_09da - - IL_09d2: ldloc.1 - IL_09d3: ldloc.1 - IL_09d4: ldloc.2 - IL_09d5: mul - IL_09d6: sub - IL_09d7: stloc.1 - IL_09d8: br.s IL_09e0 - - IL_09da: ldloc.2 - IL_09db: ldloc.1 - IL_09dc: ldloc.2 - IL_09dd: mul - IL_09de: mul - IL_09df: stloc.2 - IL_09e0: ldloc.1 - IL_09e1: ldloc.2 - IL_09e2: bgt.s IL_09ec - - IL_09e4: ldloc.1 - IL_09e5: ldloc.1 - IL_09e6: ldloc.2 - IL_09e7: sub - IL_09e8: add - IL_09e9: stloc.1 - IL_09ea: br.s IL_09f2 - - IL_09ec: ldloc.2 - IL_09ed: ldloc.1 - IL_09ee: ldloc.2 - IL_09ef: sub - IL_09f0: add - IL_09f1: stloc.2 - IL_09f2: ldloc.1 - IL_09f3: ldloc.2 - IL_09f4: ble.s IL_09fe - - IL_09f6: ldloc.1 - IL_09f7: ldloc.1 - IL_09f8: ldloc.2 - IL_09f9: mul - IL_09fa: add - IL_09fb: stloc.1 - IL_09fc: br.s IL_0a04 - - IL_09fe: ldloc.2 - IL_09ff: ldloc.1 - IL_0a00: ldloc.2 - IL_0a01: mul - IL_0a02: add - IL_0a03: stloc.2 - IL_0a04: ldloc.1 - IL_0a05: ldloc.2 - IL_0a06: beq.s IL_0a10 - - IL_0a08: ldloc.1 - IL_0a09: ldloc.1 - IL_0a0a: ldloc.2 - IL_0a0b: mul - IL_0a0c: sub - IL_0a0d: stloc.1 - IL_0a0e: br.s IL_0a16 - - IL_0a10: ldloc.2 - IL_0a11: ldloc.1 - IL_0a12: ldloc.2 - IL_0a13: mul - IL_0a14: add - IL_0a15: stloc.2 - IL_0a16: ldloc.1 - IL_0a17: ldloc.2 - IL_0a18: beq.s IL_0a22 - - IL_0a1a: ldloc.1 - IL_0a1b: ldloc.1 - IL_0a1c: ldloc.2 - IL_0a1d: add - IL_0a1e: mul - IL_0a1f: stloc.1 - IL_0a20: br.s IL_0a28 - - IL_0a22: ldloc.2 - IL_0a23: ldloc.1 - IL_0a24: ldloc.2 - IL_0a25: add - IL_0a26: sub - IL_0a27: stloc.2 - IL_0a28: ldloc.1 - IL_0a29: ldloc.2 - IL_0a2a: ble.s IL_0a34 - - IL_0a2c: ldloc.1 - IL_0a2d: ldloc.1 - IL_0a2e: ldloc.2 - IL_0a2f: add - IL_0a30: mul - IL_0a31: stloc.1 - IL_0a32: br.s IL_0a3a - - IL_0a34: ldloc.2 - IL_0a35: ldloc.1 - IL_0a36: ldloc.2 - IL_0a37: add - IL_0a38: sub - IL_0a39: stloc.2 - IL_0a3a: ldloc.1 - IL_0a3b: ldloc.2 - IL_0a3c: bne.un.s IL_0a46 - - IL_0a3e: ldloc.1 - IL_0a3f: ldloc.1 - IL_0a40: ldloc.2 - IL_0a41: add - IL_0a42: sub - IL_0a43: stloc.1 - IL_0a44: br.s IL_0a4c - - IL_0a46: ldloc.2 - IL_0a47: ldloc.1 - IL_0a48: ldloc.2 - IL_0a49: add - IL_0a4a: mul - IL_0a4b: stloc.2 - IL_0a4c: ldloc.1 - IL_0a4d: ldloc.2 - IL_0a4e: bne.un.s IL_0a58 - - IL_0a50: ldloc.1 - IL_0a51: ldloc.1 - IL_0a52: ldloc.2 - IL_0a53: sub - IL_0a54: add - IL_0a55: stloc.1 - IL_0a56: br.s IL_0a5e - - IL_0a58: ldloc.2 - IL_0a59: ldloc.1 - IL_0a5a: ldloc.2 - IL_0a5b: sub - IL_0a5c: sub - IL_0a5d: stloc.2 - IL_0a5e: ldloc.1 - IL_0a5f: ldloc.2 - IL_0a60: ble.s IL_0a6a - - IL_0a62: ldloc.1 - IL_0a63: ldloc.1 - IL_0a64: ldloc.2 - IL_0a65: mul - IL_0a66: sub - IL_0a67: stloc.1 - IL_0a68: br.s IL_0a70 - - IL_0a6a: ldloc.2 - IL_0a6b: ldloc.1 - IL_0a6c: ldloc.2 - IL_0a6d: mul - IL_0a6e: sub - IL_0a6f: stloc.2 - IL_0a70: ldloc.1 - IL_0a71: ldloc.2 - IL_0a72: beq.s IL_0a7c - - IL_0a74: ldloc.1 - IL_0a75: ldloc.1 - IL_0a76: ldloc.2 - IL_0a77: mul - IL_0a78: add - IL_0a79: stloc.1 - IL_0a7a: br.s IL_0a82 - - IL_0a7c: ldloc.2 - IL_0a7d: ldloc.1 - IL_0a7e: ldloc.2 - IL_0a7f: mul - IL_0a80: sub - IL_0a81: stloc.2 - IL_0a82: ldloc.1 - IL_0a83: ldloc.2 - IL_0a84: bgt.s IL_0a8e - - IL_0a86: ldloc.1 - IL_0a87: ldloc.1 - IL_0a88: ldloc.2 - IL_0a89: sub - IL_0a8a: add - IL_0a8b: stloc.1 - IL_0a8c: br.s IL_0a94 - - IL_0a8e: ldloc.2 - IL_0a8f: ldloc.1 - IL_0a90: ldloc.2 - IL_0a91: sub - IL_0a92: add - IL_0a93: stloc.2 - IL_0a94: ldloc.1 - IL_0a95: ldloc.2 - IL_0a96: bne.un.s IL_0aa0 - - IL_0a98: ldloc.1 - IL_0a99: ldloc.1 - IL_0a9a: ldloc.2 - IL_0a9b: add - IL_0a9c: sub - IL_0a9d: stloc.1 - IL_0a9e: br.s IL_0aa6 - - IL_0aa0: ldloc.2 - IL_0aa1: ldloc.1 - IL_0aa2: ldloc.2 - IL_0aa3: add - IL_0aa4: mul - IL_0aa5: stloc.2 - IL_0aa6: ldloc.1 - IL_0aa7: ldloc.2 - IL_0aa8: ble.s IL_0ab2 - - IL_0aaa: ldloc.1 - IL_0aab: ldloc.1 - IL_0aac: ldloc.2 - IL_0aad: sub - IL_0aae: sub - IL_0aaf: stloc.1 - IL_0ab0: br.s IL_0ab8 - - IL_0ab2: ldloc.2 - IL_0ab3: ldloc.1 - IL_0ab4: ldloc.2 - IL_0ab5: sub - IL_0ab6: sub - IL_0ab7: stloc.2 - IL_0ab8: ldloc.1 - IL_0ab9: ldloc.2 - IL_0aba: bgt.s IL_0ac4 - - IL_0abc: ldloc.1 - IL_0abd: ldloc.1 - IL_0abe: ldloc.2 - IL_0abf: add - IL_0ac0: add - IL_0ac1: stloc.1 - IL_0ac2: br.s IL_0aca - - IL_0ac4: ldloc.2 - IL_0ac5: ldloc.1 - IL_0ac6: ldloc.2 - IL_0ac7: add - IL_0ac8: mul - IL_0ac9: stloc.2 - IL_0aca: ldloc.1 - IL_0acb: ldloc.2 - IL_0acc: beq.s IL_0ad6 - - IL_0ace: ldloc.1 - IL_0acf: ldloc.1 - IL_0ad0: ldloc.2 - IL_0ad1: add - IL_0ad2: mul - IL_0ad3: stloc.1 - IL_0ad4: br.s IL_0adc - - IL_0ad6: ldloc.2 - IL_0ad7: ldloc.1 - IL_0ad8: ldloc.2 - IL_0ad9: add - IL_0ada: mul - IL_0adb: stloc.2 - IL_0adc: ldloc.1 - IL_0add: ldloc.2 - IL_0ade: blt.s IL_0ae8 - - IL_0ae0: ldloc.1 - IL_0ae1: ldloc.1 - IL_0ae2: ldloc.2 - IL_0ae3: add - IL_0ae4: mul - IL_0ae5: stloc.1 - IL_0ae6: br.s IL_0aee - - IL_0ae8: ldloc.2 - IL_0ae9: ldloc.1 - IL_0aea: ldloc.2 - IL_0aeb: add - IL_0aec: mul - IL_0aed: stloc.2 - IL_0aee: ldloc.1 - IL_0aef: ldloc.2 - IL_0af0: blt.s IL_0afa - - IL_0af2: ldloc.1 - IL_0af3: ldloc.1 - IL_0af4: ldloc.2 - IL_0af5: sub - IL_0af6: sub - IL_0af7: stloc.1 - IL_0af8: br.s IL_0b00 - - IL_0afa: ldloc.2 - IL_0afb: ldloc.1 - IL_0afc: ldloc.2 - IL_0afd: sub - IL_0afe: sub - IL_0aff: stloc.2 - IL_0b00: ldloc.1 - IL_0b01: ldloc.2 - IL_0b02: ble.s IL_0b0c - - IL_0b04: ldloc.1 - IL_0b05: ldloc.1 - IL_0b06: ldloc.2 - IL_0b07: mul - IL_0b08: sub - IL_0b09: stloc.1 - IL_0b0a: br.s IL_0b12 - - IL_0b0c: ldloc.2 - IL_0b0d: ldloc.1 - IL_0b0e: ldloc.2 - IL_0b0f: mul - IL_0b10: mul - IL_0b11: stloc.2 - IL_0b12: ldloc.1 - IL_0b13: ldloc.2 - IL_0b14: blt.s IL_0b1e - - IL_0b16: ldloc.1 - IL_0b17: ldloc.1 - IL_0b18: ldloc.2 - IL_0b19: mul - IL_0b1a: sub - IL_0b1b: stloc.1 - IL_0b1c: br.s IL_0b24 - - IL_0b1e: ldloc.2 - IL_0b1f: ldloc.1 - IL_0b20: ldloc.2 - IL_0b21: mul - IL_0b22: sub - IL_0b23: stloc.2 - IL_0b24: ldloc.1 - IL_0b25: ldloc.2 - IL_0b26: blt.s IL_0b30 - - IL_0b28: ldloc.1 - IL_0b29: ldloc.1 - IL_0b2a: ldloc.2 - IL_0b2b: add - IL_0b2c: add - IL_0b2d: stloc.1 - IL_0b2e: br.s IL_0b36 - - IL_0b30: ldloc.2 - IL_0b31: ldloc.1 - IL_0b32: ldloc.2 - IL_0b33: add - IL_0b34: sub - IL_0b35: stloc.2 - IL_0b36: ldloc.1 - IL_0b37: ldloc.2 - IL_0b38: bgt.s IL_0b42 - - IL_0b3a: ldloc.1 - IL_0b3b: ldloc.1 - IL_0b3c: ldloc.2 - IL_0b3d: add - IL_0b3e: sub - IL_0b3f: stloc.1 - IL_0b40: br.s IL_0b48 - - IL_0b42: ldloc.2 - IL_0b43: ldloc.1 - IL_0b44: ldloc.2 - IL_0b45: add - IL_0b46: add - IL_0b47: stloc.2 - IL_0b48: ldloc.1 - IL_0b49: ldloc.2 - IL_0b4a: bgt.s IL_0b54 - - IL_0b4c: ldloc.1 - IL_0b4d: ldloc.1 - IL_0b4e: ldloc.2 - IL_0b4f: mul - IL_0b50: add - IL_0b51: stloc.1 - IL_0b52: br.s IL_0b5a - - IL_0b54: ldloc.2 - IL_0b55: ldloc.1 - IL_0b56: ldloc.2 - IL_0b57: mul - IL_0b58: add - IL_0b59: stloc.2 - IL_0b5a: ldloc.1 - IL_0b5b: ldloc.2 - IL_0b5c: bgt.s IL_0b66 - - IL_0b5e: ldloc.1 - IL_0b5f: ldloc.1 - IL_0b60: ldloc.2 - IL_0b61: add - IL_0b62: sub - IL_0b63: stloc.1 - IL_0b64: br.s IL_0b6c - - IL_0b66: ldloc.2 - IL_0b67: ldloc.1 - IL_0b68: ldloc.2 - IL_0b69: add - IL_0b6a: mul - IL_0b6b: stloc.2 - IL_0b6c: ldloc.1 - IL_0b6d: ldloc.2 - IL_0b6e: ble.s IL_0b78 - - IL_0b70: ldloc.1 - IL_0b71: ldloc.1 - IL_0b72: ldloc.2 - IL_0b73: mul - IL_0b74: sub - IL_0b75: stloc.1 - IL_0b76: br.s IL_0b7e - - IL_0b78: ldloc.2 - IL_0b79: ldloc.1 - IL_0b7a: ldloc.2 - IL_0b7b: mul - IL_0b7c: sub - IL_0b7d: stloc.2 - IL_0b7e: ldloc.1 - IL_0b7f: ldloc.2 - IL_0b80: blt.s IL_0b8a - - IL_0b82: ldloc.1 - IL_0b83: ldloc.1 - IL_0b84: ldloc.2 - IL_0b85: add - IL_0b86: add - IL_0b87: stloc.1 - IL_0b88: br.s IL_0b90 - - IL_0b8a: ldloc.2 - IL_0b8b: ldloc.1 - IL_0b8c: ldloc.2 - IL_0b8d: add - IL_0b8e: mul - IL_0b8f: stloc.2 - IL_0b90: ldloc.1 - IL_0b91: ldloc.2 - IL_0b92: beq.s IL_0b9c - - IL_0b94: ldloc.1 - IL_0b95: ldloc.1 - IL_0b96: ldloc.2 - IL_0b97: mul - IL_0b98: sub - IL_0b99: stloc.1 - IL_0b9a: br.s IL_0ba2 - - IL_0b9c: ldloc.2 - IL_0b9d: ldloc.1 - IL_0b9e: ldloc.2 - IL_0b9f: mul - IL_0ba0: add - IL_0ba1: stloc.2 - IL_0ba2: ldloc.1 - IL_0ba3: ldloc.2 - IL_0ba4: bne.un.s IL_0bae - - IL_0ba6: ldloc.1 - IL_0ba7: ldloc.1 - IL_0ba8: ldloc.2 - IL_0ba9: add - IL_0baa: sub - IL_0bab: stloc.1 - IL_0bac: br.s IL_0bb4 - - IL_0bae: ldloc.2 - IL_0baf: ldloc.1 - IL_0bb0: ldloc.2 - IL_0bb1: add - IL_0bb2: mul - IL_0bb3: stloc.2 - IL_0bb4: ldloc.1 - IL_0bb5: ldloc.2 - IL_0bb6: beq.s IL_0bc0 - - IL_0bb8: ldloc.1 - IL_0bb9: ldloc.1 - IL_0bba: ldloc.2 - IL_0bbb: mul - IL_0bbc: mul - IL_0bbd: stloc.1 - IL_0bbe: br.s IL_0bc6 - - IL_0bc0: ldloc.2 - IL_0bc1: ldloc.1 - IL_0bc2: ldloc.2 - IL_0bc3: mul - IL_0bc4: sub - IL_0bc5: stloc.2 - IL_0bc6: ldloc.1 - IL_0bc7: ldloc.2 - IL_0bc8: bge.s IL_0bd2 - - IL_0bca: ldloc.1 - IL_0bcb: ldloc.1 - IL_0bcc: ldloc.2 - IL_0bcd: mul - IL_0bce: sub - IL_0bcf: stloc.1 - IL_0bd0: br.s IL_0bd8 - - IL_0bd2: ldloc.2 - IL_0bd3: ldloc.1 - IL_0bd4: ldloc.2 - IL_0bd5: mul - IL_0bd6: sub - IL_0bd7: stloc.2 - IL_0bd8: ldloc.1 - IL_0bd9: ldloc.2 - IL_0bda: bne.un.s IL_0be4 - - IL_0bdc: ldloc.1 - IL_0bdd: ldloc.1 - IL_0bde: ldloc.2 - IL_0bdf: add - IL_0be0: mul - IL_0be1: stloc.1 - IL_0be2: br.s IL_0bea - - IL_0be4: ldloc.2 - IL_0be5: ldloc.1 - IL_0be6: ldloc.2 - IL_0be7: add - IL_0be8: sub - IL_0be9: stloc.2 - IL_0bea: ldloc.1 - IL_0beb: ldloc.2 - IL_0bec: bgt.s IL_0bf6 - - IL_0bee: ldloc.1 - IL_0bef: ldloc.1 - IL_0bf0: ldloc.2 - IL_0bf1: sub - IL_0bf2: mul - IL_0bf3: stloc.1 - IL_0bf4: br.s IL_0bfc - - IL_0bf6: ldloc.2 - IL_0bf7: ldloc.1 - IL_0bf8: ldloc.2 - IL_0bf9: sub - IL_0bfa: mul - IL_0bfb: stloc.2 - IL_0bfc: ldloc.1 - IL_0bfd: ldloc.2 - IL_0bfe: bne.un.s IL_0c08 - - IL_0c00: ldloc.1 - IL_0c01: ldloc.1 - IL_0c02: ldloc.2 - IL_0c03: add - IL_0c04: sub - IL_0c05: stloc.1 - IL_0c06: br.s IL_0c0e - - IL_0c08: ldloc.2 - IL_0c09: ldloc.1 - IL_0c0a: ldloc.2 - IL_0c0b: add - IL_0c0c: mul - IL_0c0d: stloc.2 - IL_0c0e: ldloc.1 - IL_0c0f: ldloc.2 - IL_0c10: ble.s IL_0c1a - - IL_0c12: ldloc.1 - IL_0c13: ldloc.1 - IL_0c14: ldloc.2 - IL_0c15: sub - IL_0c16: mul - IL_0c17: stloc.1 - IL_0c18: br.s IL_0c20 - - IL_0c1a: ldloc.2 - IL_0c1b: ldloc.1 - IL_0c1c: ldloc.2 - IL_0c1d: sub - IL_0c1e: sub - IL_0c1f: stloc.2 - IL_0c20: ldloc.1 - IL_0c21: ldloc.2 - IL_0c22: bge.s IL_0c2c - - IL_0c24: ldloc.1 - IL_0c25: ldloc.1 - IL_0c26: ldloc.2 - IL_0c27: add - IL_0c28: sub - IL_0c29: stloc.1 - IL_0c2a: br.s IL_0c32 - - IL_0c2c: ldloc.2 - IL_0c2d: ldloc.1 - IL_0c2e: ldloc.2 - IL_0c2f: add - IL_0c30: sub - IL_0c31: stloc.2 - IL_0c32: ldloc.1 - IL_0c33: ldloc.2 - IL_0c34: blt.s IL_0c3e - - IL_0c36: ldloc.1 - IL_0c37: ldloc.1 - IL_0c38: ldloc.2 - IL_0c39: mul - IL_0c3a: sub - IL_0c3b: stloc.1 - IL_0c3c: br.s IL_0c44 - - IL_0c3e: ldloc.2 - IL_0c3f: ldloc.1 - IL_0c40: ldloc.2 - IL_0c41: mul - IL_0c42: add - IL_0c43: stloc.2 - IL_0c44: ldloc.1 - IL_0c45: ldloc.2 - IL_0c46: bge.s IL_0c50 - - IL_0c48: ldloc.1 - IL_0c49: ldloc.1 - IL_0c4a: ldloc.2 - IL_0c4b: sub - IL_0c4c: mul - IL_0c4d: stloc.1 - IL_0c4e: br.s IL_0c56 - - IL_0c50: ldloc.2 - IL_0c51: ldloc.1 - IL_0c52: ldloc.2 - IL_0c53: sub - IL_0c54: mul - IL_0c55: stloc.2 - IL_0c56: ldloc.1 - IL_0c57: ldloc.2 - IL_0c58: beq.s IL_0c62 - - IL_0c5a: ldloc.1 - IL_0c5b: ldloc.1 - IL_0c5c: ldloc.2 - IL_0c5d: sub - IL_0c5e: mul - IL_0c5f: stloc.1 - IL_0c60: br.s IL_0c68 - - IL_0c62: ldloc.2 - IL_0c63: ldloc.1 - IL_0c64: ldloc.2 - IL_0c65: sub - IL_0c66: add - IL_0c67: stloc.2 - IL_0c68: ldloc.1 - IL_0c69: ldloc.2 - IL_0c6a: beq.s IL_0c74 - - IL_0c6c: ldloc.1 - IL_0c6d: ldloc.1 - IL_0c6e: ldloc.2 - IL_0c6f: mul - IL_0c70: mul - IL_0c71: stloc.1 - IL_0c72: br.s IL_0c7a - - IL_0c74: ldloc.2 - IL_0c75: ldloc.1 - IL_0c76: ldloc.2 - IL_0c77: mul - IL_0c78: mul - IL_0c79: stloc.2 - IL_0c7a: ldloc.1 - IL_0c7b: ldloc.2 - IL_0c7c: bne.un.s IL_0c86 - - IL_0c7e: ldloc.1 - IL_0c7f: ldloc.1 - IL_0c80: ldloc.2 - IL_0c81: add - IL_0c82: mul - IL_0c83: stloc.1 - IL_0c84: br.s IL_0c8c - - IL_0c86: ldloc.2 - IL_0c87: ldloc.1 - IL_0c88: ldloc.2 - IL_0c89: add - IL_0c8a: sub - IL_0c8b: stloc.2 - IL_0c8c: ldloc.1 - IL_0c8d: ldloc.2 - IL_0c8e: bgt.s IL_0c98 - - IL_0c90: ldloc.1 - IL_0c91: ldloc.1 - IL_0c92: ldloc.2 - IL_0c93: add - IL_0c94: sub - IL_0c95: stloc.1 - IL_0c96: br.s IL_0c9e - - IL_0c98: ldloc.2 - IL_0c99: ldloc.1 - IL_0c9a: ldloc.2 - IL_0c9b: add - IL_0c9c: add - IL_0c9d: stloc.2 - IL_0c9e: ldloc.1 - IL_0c9f: ldloc.2 - IL_0ca0: beq.s IL_0caa - - IL_0ca2: ldloc.1 - IL_0ca3: ldloc.1 - IL_0ca4: ldloc.2 - IL_0ca5: add - IL_0ca6: mul - IL_0ca7: stloc.1 - IL_0ca8: br.s IL_0cb0 - - IL_0caa: ldloc.2 - IL_0cab: ldloc.1 - IL_0cac: ldloc.2 - IL_0cad: add - IL_0cae: mul - IL_0caf: stloc.2 - IL_0cb0: ldloc.1 - IL_0cb1: ldloc.2 - IL_0cb2: blt.s IL_0cbc - - IL_0cb4: ldloc.1 - IL_0cb5: ldloc.1 - IL_0cb6: ldloc.2 - IL_0cb7: mul - IL_0cb8: add - IL_0cb9: stloc.1 - IL_0cba: br.s IL_0cc2 - - IL_0cbc: ldloc.2 - IL_0cbd: ldloc.1 - IL_0cbe: ldloc.2 - IL_0cbf: mul - IL_0cc0: sub - IL_0cc1: stloc.2 - IL_0cc2: ldloc.1 - IL_0cc3: ldloc.2 - IL_0cc4: bge.s IL_0cce - - IL_0cc6: ldloc.1 - IL_0cc7: ldloc.1 - IL_0cc8: ldloc.2 - IL_0cc9: sub - IL_0cca: add - IL_0ccb: stloc.1 - IL_0ccc: br.s IL_0cd4 - - IL_0cce: ldloc.2 - IL_0ccf: ldloc.1 - IL_0cd0: ldloc.2 - IL_0cd1: sub - IL_0cd2: sub - IL_0cd3: stloc.2 - IL_0cd4: ldloc.1 - IL_0cd5: ldloc.2 - IL_0cd6: blt.s IL_0ce0 - - IL_0cd8: ldloc.1 - IL_0cd9: ldloc.1 - IL_0cda: ldloc.2 - IL_0cdb: sub - IL_0cdc: sub - IL_0cdd: stloc.1 - IL_0cde: br.s IL_0ce6 - - IL_0ce0: ldloc.2 - IL_0ce1: ldloc.1 - IL_0ce2: ldloc.2 - IL_0ce3: sub - IL_0ce4: mul - IL_0ce5: stloc.2 - IL_0ce6: ldloc.1 - IL_0ce7: ldloc.2 - IL_0ce8: bne.un.s IL_0cf2 - - IL_0cea: ldloc.1 - IL_0ceb: ldloc.1 - IL_0cec: ldloc.2 - IL_0ced: mul - IL_0cee: sub - IL_0cef: stloc.1 - IL_0cf0: br.s IL_0cf8 - - IL_0cf2: ldloc.2 - IL_0cf3: ldloc.1 - IL_0cf4: ldloc.2 - IL_0cf5: mul - IL_0cf6: mul - IL_0cf7: stloc.2 - IL_0cf8: ldloc.1 - IL_0cf9: ldloc.2 - IL_0cfa: blt.s IL_0d04 - - IL_0cfc: ldloc.1 - IL_0cfd: ldloc.1 - IL_0cfe: ldloc.2 - IL_0cff: add - IL_0d00: sub - IL_0d01: stloc.1 - IL_0d02: br.s IL_0d0a - - IL_0d04: ldloc.2 - IL_0d05: ldloc.1 - IL_0d06: ldloc.2 - IL_0d07: add - IL_0d08: add - IL_0d09: stloc.2 - IL_0d0a: ldloc.1 - IL_0d0b: ldloc.2 - IL_0d0c: beq.s IL_0d16 - - IL_0d0e: ldloc.1 - IL_0d0f: ldloc.1 - IL_0d10: ldloc.2 - IL_0d11: sub - IL_0d12: mul - IL_0d13: stloc.1 - IL_0d14: br.s IL_0d1c - - IL_0d16: ldloc.2 - IL_0d17: ldloc.1 - IL_0d18: ldloc.2 - IL_0d19: sub - IL_0d1a: mul - IL_0d1b: stloc.2 - IL_0d1c: ldloc.1 - IL_0d1d: ldloc.2 - IL_0d1e: beq.s IL_0d28 - - IL_0d20: ldloc.1 - IL_0d21: ldloc.1 - IL_0d22: ldloc.2 - IL_0d23: mul - IL_0d24: add - IL_0d25: stloc.1 - IL_0d26: br.s IL_0d2e - - IL_0d28: ldloc.2 - IL_0d29: ldloc.1 - IL_0d2a: ldloc.2 - IL_0d2b: mul - IL_0d2c: sub - IL_0d2d: stloc.2 - IL_0d2e: ldloc.1 - IL_0d2f: ldloc.2 - IL_0d30: blt.s IL_0d3a - - IL_0d32: ldloc.1 - IL_0d33: ldloc.1 - IL_0d34: ldloc.2 - IL_0d35: sub - IL_0d36: add - IL_0d37: stloc.1 - IL_0d38: br.s IL_0d40 - - IL_0d3a: ldloc.2 - IL_0d3b: ldloc.1 - IL_0d3c: ldloc.2 - IL_0d3d: sub - IL_0d3e: add - IL_0d3f: stloc.2 - IL_0d40: ldloc.1 - IL_0d41: ldloc.2 - IL_0d42: beq.s IL_0d4c - - IL_0d44: ldloc.1 - IL_0d45: ldloc.1 - IL_0d46: ldloc.2 - IL_0d47: sub - IL_0d48: mul - IL_0d49: stloc.1 - IL_0d4a: br.s IL_0d52 - - IL_0d4c: ldloc.2 - IL_0d4d: ldloc.1 - IL_0d4e: ldloc.2 - IL_0d4f: sub - IL_0d50: add - IL_0d51: stloc.2 - IL_0d52: ldloc.1 - IL_0d53: ldloc.2 - IL_0d54: blt.s IL_0d5e - - IL_0d56: ldloc.1 - IL_0d57: ldloc.1 - IL_0d58: ldloc.2 - IL_0d59: sub - IL_0d5a: add - IL_0d5b: stloc.1 - IL_0d5c: br.s IL_0d64 - - IL_0d5e: ldloc.2 - IL_0d5f: ldloc.1 - IL_0d60: ldloc.2 - IL_0d61: sub - IL_0d62: add - IL_0d63: stloc.2 - IL_0d64: ldloc.1 - IL_0d65: ldloc.2 - IL_0d66: blt.s IL_0d70 - - IL_0d68: ldloc.1 - IL_0d69: ldloc.1 - IL_0d6a: ldloc.2 - IL_0d6b: add - IL_0d6c: sub - IL_0d6d: stloc.1 - IL_0d6e: br.s IL_0d76 - - IL_0d70: ldloc.2 - IL_0d71: ldloc.1 - IL_0d72: ldloc.2 - IL_0d73: add - IL_0d74: add - IL_0d75: stloc.2 - IL_0d76: ldloc.1 - IL_0d77: ldloc.2 - IL_0d78: bne.un.s IL_0d82 - - IL_0d7a: ldloc.1 - IL_0d7b: ldloc.1 - IL_0d7c: ldloc.2 - IL_0d7d: add - IL_0d7e: mul - IL_0d7f: stloc.1 - IL_0d80: br.s IL_0d88 - - IL_0d82: ldloc.2 - IL_0d83: ldloc.1 - IL_0d84: ldloc.2 - IL_0d85: add - IL_0d86: sub - IL_0d87: stloc.2 - IL_0d88: ldloc.1 - IL_0d89: ldloc.2 - IL_0d8a: beq.s IL_0d94 - - IL_0d8c: ldloc.1 - IL_0d8d: ldloc.1 - IL_0d8e: ldloc.2 - IL_0d8f: sub - IL_0d90: add - IL_0d91: stloc.1 - IL_0d92: br.s IL_0d9a - - IL_0d94: ldloc.2 - IL_0d95: ldloc.1 - IL_0d96: ldloc.2 - IL_0d97: sub - IL_0d98: mul - IL_0d99: stloc.2 - IL_0d9a: ldloc.1 - IL_0d9b: ldloc.2 - IL_0d9c: bne.un.s IL_0da6 - - IL_0d9e: ldloc.1 - IL_0d9f: ldloc.1 - IL_0da0: ldloc.2 - IL_0da1: sub - IL_0da2: sub - IL_0da3: stloc.1 - IL_0da4: br.s IL_0dac - - IL_0da6: ldloc.2 - IL_0da7: ldloc.1 - IL_0da8: ldloc.2 - IL_0da9: sub - IL_0daa: sub - IL_0dab: stloc.2 - IL_0dac: ldloc.1 - IL_0dad: ldloc.2 - IL_0dae: bgt.s IL_0db8 - - IL_0db0: ldloc.1 - IL_0db1: ldloc.1 - IL_0db2: ldloc.2 - IL_0db3: add - IL_0db4: mul - IL_0db5: stloc.1 - IL_0db6: br.s IL_0dbe - - IL_0db8: ldloc.2 - IL_0db9: ldloc.1 - IL_0dba: ldloc.2 - IL_0dbb: add - IL_0dbc: mul - IL_0dbd: stloc.2 - IL_0dbe: ldloc.1 - IL_0dbf: ldloc.2 - IL_0dc0: bne.un.s IL_0dca - - IL_0dc2: ldloc.1 - IL_0dc3: ldloc.1 - IL_0dc4: ldloc.2 - IL_0dc5: add - IL_0dc6: sub - IL_0dc7: stloc.1 - IL_0dc8: br.s IL_0dd0 - - IL_0dca: ldloc.2 - IL_0dcb: ldloc.1 - IL_0dcc: ldloc.2 - IL_0dcd: add - IL_0dce: mul - IL_0dcf: stloc.2 - IL_0dd0: ldloc.1 - IL_0dd1: ldloc.2 - IL_0dd2: blt.s IL_0ddc - - IL_0dd4: ldloc.1 - IL_0dd5: ldloc.1 - IL_0dd6: ldloc.2 - IL_0dd7: add - IL_0dd8: sub - IL_0dd9: stloc.1 - IL_0dda: br.s IL_0de2 - - IL_0ddc: ldloc.2 - IL_0ddd: ldloc.1 - IL_0dde: ldloc.2 - IL_0ddf: add - IL_0de0: sub - IL_0de1: stloc.2 - IL_0de2: ldloc.1 - IL_0de3: ldloc.2 - IL_0de4: blt.s IL_0dee - - IL_0de6: ldloc.1 - IL_0de7: ldloc.1 - IL_0de8: ldloc.2 - IL_0de9: add - IL_0dea: add - IL_0deb: stloc.1 - IL_0dec: br.s IL_0df4 - - IL_0dee: ldloc.2 - IL_0def: ldloc.1 - IL_0df0: ldloc.2 - IL_0df1: add - IL_0df2: sub - IL_0df3: stloc.2 - IL_0df4: ldloc.1 - IL_0df5: ldloc.2 - IL_0df6: bge.s IL_0e00 - - IL_0df8: ldloc.1 - IL_0df9: ldloc.1 - IL_0dfa: ldloc.2 - IL_0dfb: sub - IL_0dfc: sub - IL_0dfd: stloc.1 - IL_0dfe: br.s IL_0e06 - - IL_0e00: ldloc.2 - IL_0e01: ldloc.1 - IL_0e02: ldloc.2 - IL_0e03: sub - IL_0e04: mul - IL_0e05: stloc.2 - IL_0e06: ldloc.1 - IL_0e07: ldloc.2 - IL_0e08: bgt.s IL_0e12 - - IL_0e0a: ldloc.1 - IL_0e0b: ldloc.1 - IL_0e0c: ldloc.2 - IL_0e0d: add - IL_0e0e: sub - IL_0e0f: stloc.1 - IL_0e10: br.s IL_0e18 - - IL_0e12: ldloc.2 - IL_0e13: ldloc.1 - IL_0e14: ldloc.2 - IL_0e15: add - IL_0e16: mul - IL_0e17: stloc.2 - IL_0e18: ldloc.1 - IL_0e19: ldloc.2 - IL_0e1a: bne.un.s IL_0e24 - - IL_0e1c: ldloc.1 - IL_0e1d: ldloc.1 - IL_0e1e: ldloc.2 - IL_0e1f: add - IL_0e20: sub - IL_0e21: stloc.1 - IL_0e22: br.s IL_0e2a - - IL_0e24: ldloc.2 - IL_0e25: ldloc.1 - IL_0e26: ldloc.2 - IL_0e27: add - IL_0e28: add - IL_0e29: stloc.2 - IL_0e2a: ldloc.1 - IL_0e2b: ldloc.2 - IL_0e2c: bge.s IL_0e36 - - IL_0e2e: ldloc.1 - IL_0e2f: ldloc.1 - IL_0e30: ldloc.2 - IL_0e31: sub - IL_0e32: sub - IL_0e33: stloc.1 - IL_0e34: br.s IL_0e3c - - IL_0e36: ldloc.2 - IL_0e37: ldloc.1 - IL_0e38: ldloc.2 - IL_0e39: sub - IL_0e3a: mul - IL_0e3b: stloc.2 - IL_0e3c: ldloc.1 - IL_0e3d: ldloc.2 - IL_0e3e: blt.s IL_0e48 - - IL_0e40: ldloc.1 - IL_0e41: ldloc.1 - IL_0e42: ldloc.2 - IL_0e43: sub - IL_0e44: sub - IL_0e45: stloc.1 - IL_0e46: br.s IL_0e4e - - IL_0e48: ldloc.2 - IL_0e49: ldloc.1 - IL_0e4a: ldloc.2 - IL_0e4b: sub - IL_0e4c: add - IL_0e4d: stloc.2 - IL_0e4e: ldloc.1 - IL_0e4f: ldloc.2 - IL_0e50: ble.s IL_0e5a - - IL_0e52: ldloc.1 - IL_0e53: ldloc.1 - IL_0e54: ldloc.2 - IL_0e55: mul - IL_0e56: mul - IL_0e57: stloc.1 - IL_0e58: br.s IL_0e60 - - IL_0e5a: ldloc.2 - IL_0e5b: ldloc.1 - IL_0e5c: ldloc.2 - IL_0e5d: mul - IL_0e5e: mul - IL_0e5f: stloc.2 - IL_0e60: ldloc.1 - IL_0e61: ldloc.2 - IL_0e62: bgt.s IL_0e6c - - IL_0e64: ldloc.1 - IL_0e65: ldloc.1 - IL_0e66: ldloc.2 - IL_0e67: add - IL_0e68: mul - IL_0e69: stloc.1 - IL_0e6a: br.s IL_0e72 - - IL_0e6c: ldloc.2 - IL_0e6d: ldloc.1 - IL_0e6e: ldloc.2 - IL_0e6f: add - IL_0e70: mul - IL_0e71: stloc.2 - IL_0e72: ldloc.1 - IL_0e73: ldloc.2 - IL_0e74: ble.s IL_0e7e - - IL_0e76: ldloc.1 - IL_0e77: ldloc.1 - IL_0e78: ldloc.2 - IL_0e79: mul - IL_0e7a: add - IL_0e7b: stloc.1 - IL_0e7c: br.s IL_0e84 - - IL_0e7e: ldloc.2 - IL_0e7f: ldloc.1 - IL_0e80: ldloc.2 - IL_0e81: mul - IL_0e82: mul - IL_0e83: stloc.2 - IL_0e84: ldloc.1 - IL_0e85: ldloc.2 - IL_0e86: beq.s IL_0e90 - - IL_0e88: ldloc.1 - IL_0e89: ldloc.1 - IL_0e8a: ldloc.2 - IL_0e8b: add - IL_0e8c: sub - IL_0e8d: stloc.1 - IL_0e8e: br.s IL_0e96 - - IL_0e90: ldloc.2 - IL_0e91: ldloc.1 - IL_0e92: ldloc.2 - IL_0e93: add - IL_0e94: add - IL_0e95: stloc.2 - IL_0e96: ldloc.1 - IL_0e97: ldloc.2 - IL_0e98: bne.un.s IL_0ea2 - - IL_0e9a: ldloc.1 - IL_0e9b: ldloc.1 - IL_0e9c: ldloc.2 - IL_0e9d: add - IL_0e9e: mul - IL_0e9f: stloc.1 - IL_0ea0: br.s IL_0ea8 - - IL_0ea2: ldloc.2 - IL_0ea3: ldloc.1 - IL_0ea4: ldloc.2 - IL_0ea5: add - IL_0ea6: add - IL_0ea7: stloc.2 - IL_0ea8: ldloc.1 - IL_0ea9: ldloc.2 - IL_0eaa: ble.s IL_0eb4 - - IL_0eac: ldloc.1 - IL_0ead: ldloc.1 - IL_0eae: ldloc.2 - IL_0eaf: sub - IL_0eb0: mul - IL_0eb1: stloc.1 - IL_0eb2: br.s IL_0eba - - IL_0eb4: ldloc.2 - IL_0eb5: ldloc.1 - IL_0eb6: ldloc.2 - IL_0eb7: sub - IL_0eb8: sub - IL_0eb9: stloc.2 - IL_0eba: ldloc.1 - IL_0ebb: ldloc.2 - IL_0ebc: blt.s IL_0ec6 - - IL_0ebe: ldloc.1 - IL_0ebf: ldloc.1 - IL_0ec0: ldloc.2 - IL_0ec1: mul - IL_0ec2: mul - IL_0ec3: stloc.1 - IL_0ec4: br.s IL_0ecc - - IL_0ec6: ldloc.2 - IL_0ec7: ldloc.1 - IL_0ec8: ldloc.2 - IL_0ec9: mul - IL_0eca: add - IL_0ecb: stloc.2 - IL_0ecc: ldloc.1 - IL_0ecd: ldloc.2 - IL_0ece: beq.s IL_0ed8 - - IL_0ed0: ldloc.1 - IL_0ed1: ldloc.1 - IL_0ed2: ldloc.2 - IL_0ed3: mul - IL_0ed4: add - IL_0ed5: stloc.1 - IL_0ed6: br.s IL_0ede - - IL_0ed8: ldloc.2 - IL_0ed9: ldloc.1 - IL_0eda: ldloc.2 - IL_0edb: mul - IL_0edc: mul - IL_0edd: stloc.2 - IL_0ede: ldloc.1 - IL_0edf: ldloc.2 - IL_0ee0: ble.s IL_0eea - - IL_0ee2: ldloc.1 - IL_0ee3: ldloc.1 - IL_0ee4: ldloc.2 - IL_0ee5: sub - IL_0ee6: add - IL_0ee7: stloc.1 - IL_0ee8: br.s IL_0ef0 - - IL_0eea: ldloc.2 - IL_0eeb: ldloc.1 - IL_0eec: ldloc.2 - IL_0eed: sub - IL_0eee: add - IL_0eef: stloc.2 - IL_0ef0: ldloc.1 - IL_0ef1: ldloc.2 - IL_0ef2: bgt.s IL_0efc - - IL_0ef4: ldloc.1 - IL_0ef5: ldloc.1 - IL_0ef6: ldloc.2 - IL_0ef7: sub - IL_0ef8: mul - IL_0ef9: stloc.1 - IL_0efa: br.s IL_0f02 - - IL_0efc: ldloc.2 - IL_0efd: ldloc.1 - IL_0efe: ldloc.2 - IL_0eff: sub - IL_0f00: mul - IL_0f01: stloc.2 - IL_0f02: ldloc.1 - IL_0f03: ldloc.2 - IL_0f04: beq.s IL_0f0e - - IL_0f06: ldloc.1 - IL_0f07: ldloc.1 - IL_0f08: ldloc.2 - IL_0f09: sub - IL_0f0a: sub - IL_0f0b: stloc.1 - IL_0f0c: br.s IL_0f14 - - IL_0f0e: ldloc.2 - IL_0f0f: ldloc.1 - IL_0f10: ldloc.2 - IL_0f11: sub - IL_0f12: mul - IL_0f13: stloc.2 - IL_0f14: ldloc.1 - IL_0f15: ldloc.2 - IL_0f16: bgt.s IL_0f20 - - IL_0f18: ldloc.1 - IL_0f19: ldloc.1 - IL_0f1a: ldloc.2 - IL_0f1b: mul - IL_0f1c: sub - IL_0f1d: stloc.1 - IL_0f1e: br.s IL_0f26 - - IL_0f20: ldloc.2 - IL_0f21: ldloc.1 - IL_0f22: ldloc.2 - IL_0f23: mul - IL_0f24: sub - IL_0f25: stloc.2 - IL_0f26: ldloc.1 - IL_0f27: ldloc.2 - IL_0f28: blt.s IL_0f32 - - IL_0f2a: ldloc.1 - IL_0f2b: ldloc.1 - IL_0f2c: ldloc.2 - IL_0f2d: sub - IL_0f2e: sub - IL_0f2f: stloc.1 - IL_0f30: br.s IL_0f38 - - IL_0f32: ldloc.2 - IL_0f33: ldloc.1 - IL_0f34: ldloc.2 - IL_0f35: sub - IL_0f36: sub - IL_0f37: stloc.2 - IL_0f38: ldloc.1 - IL_0f39: ldloc.2 - IL_0f3a: blt.s IL_0f44 - - IL_0f3c: ldloc.1 - IL_0f3d: ldloc.1 - IL_0f3e: ldloc.2 - IL_0f3f: add - IL_0f40: mul - IL_0f41: stloc.1 - IL_0f42: br.s IL_0f4a - - IL_0f44: ldloc.2 - IL_0f45: ldloc.1 - IL_0f46: ldloc.2 - IL_0f47: add - IL_0f48: add - IL_0f49: stloc.2 - IL_0f4a: ldloc.1 - IL_0f4b: ldloc.2 - IL_0f4c: blt.s IL_0f56 - - IL_0f4e: ldloc.1 - IL_0f4f: ldloc.1 - IL_0f50: ldloc.2 - IL_0f51: mul - IL_0f52: sub - IL_0f53: stloc.1 - IL_0f54: br.s IL_0f5c - - IL_0f56: ldloc.2 - IL_0f57: ldloc.1 - IL_0f58: ldloc.2 - IL_0f59: mul - IL_0f5a: sub - IL_0f5b: stloc.2 - IL_0f5c: ldloc.1 - IL_0f5d: ldloc.2 - IL_0f5e: beq.s IL_0f68 - - IL_0f60: ldloc.1 - IL_0f61: ldloc.1 - IL_0f62: ldloc.2 - IL_0f63: mul - IL_0f64: mul - IL_0f65: stloc.1 - IL_0f66: br.s IL_0f6e - - IL_0f68: ldloc.2 - IL_0f69: ldloc.1 - IL_0f6a: ldloc.2 - IL_0f6b: mul - IL_0f6c: sub - IL_0f6d: stloc.2 - IL_0f6e: ldloc.1 - IL_0f6f: ldloc.2 - IL_0f70: bgt.s IL_0f7a - - IL_0f72: ldloc.1 - IL_0f73: ldloc.1 - IL_0f74: ldloc.2 - IL_0f75: mul - IL_0f76: mul - IL_0f77: stloc.1 - IL_0f78: br.s IL_0f80 - - IL_0f7a: ldloc.2 - IL_0f7b: ldloc.1 - IL_0f7c: ldloc.2 - IL_0f7d: mul - IL_0f7e: sub - IL_0f7f: stloc.2 - IL_0f80: ldloc.1 - IL_0f81: ldloc.2 - IL_0f82: bge.s IL_0f8c - - IL_0f84: ldloc.1 - IL_0f85: ldloc.1 - IL_0f86: ldloc.2 - IL_0f87: mul - IL_0f88: mul - IL_0f89: stloc.1 - IL_0f8a: br.s IL_0f92 - - IL_0f8c: ldloc.2 - IL_0f8d: ldloc.1 - IL_0f8e: ldloc.2 - IL_0f8f: mul - IL_0f90: mul - IL_0f91: stloc.2 - IL_0f92: ldloc.1 - IL_0f93: ldloc.2 - IL_0f94: bge.s IL_0f9e - - IL_0f96: ldloc.1 - IL_0f97: ldloc.1 - IL_0f98: ldloc.2 - IL_0f99: sub - IL_0f9a: sub - IL_0f9b: stloc.1 - IL_0f9c: br.s IL_0fa4 - - IL_0f9e: ldloc.2 - IL_0f9f: ldloc.1 - IL_0fa0: ldloc.2 - IL_0fa1: sub - IL_0fa2: add - IL_0fa3: stloc.2 - IL_0fa4: ldloc.1 - IL_0fa5: ldloc.2 - IL_0fa6: beq.s IL_0fb0 - - IL_0fa8: ldloc.1 - IL_0fa9: ldloc.1 - IL_0faa: ldloc.2 - IL_0fab: add - IL_0fac: add - IL_0fad: stloc.1 - IL_0fae: br.s IL_0fb6 - - IL_0fb0: ldloc.2 - IL_0fb1: ldloc.1 - IL_0fb2: ldloc.2 - IL_0fb3: add - IL_0fb4: mul - IL_0fb5: stloc.2 - IL_0fb6: ldloc.1 - IL_0fb7: ldloc.2 - IL_0fb8: blt.s IL_0fc2 - - IL_0fba: ldloc.1 - IL_0fbb: ldloc.1 - IL_0fbc: ldloc.2 - IL_0fbd: sub - IL_0fbe: add - IL_0fbf: stloc.1 - IL_0fc0: br.s IL_0fc8 - - IL_0fc2: ldloc.2 - IL_0fc3: ldloc.1 - IL_0fc4: ldloc.2 - IL_0fc5: sub - IL_0fc6: add - IL_0fc7: stloc.2 - IL_0fc8: ldloc.1 - IL_0fc9: ldloc.2 - IL_0fca: bne.un.s IL_0fd4 - - IL_0fcc: ldloc.1 - IL_0fcd: ldloc.1 - IL_0fce: ldloc.2 - IL_0fcf: add - IL_0fd0: sub - IL_0fd1: stloc.1 - IL_0fd2: br.s IL_0fda - - IL_0fd4: ldloc.2 - IL_0fd5: ldloc.1 - IL_0fd6: ldloc.2 - IL_0fd7: add - IL_0fd8: sub - IL_0fd9: stloc.2 - IL_0fda: ldloc.1 - IL_0fdb: ldloc.2 - IL_0fdc: bne.un.s IL_0fe6 - - IL_0fde: ldloc.1 - IL_0fdf: ldloc.1 - IL_0fe0: ldloc.2 - IL_0fe1: add - IL_0fe2: mul - IL_0fe3: stloc.1 - IL_0fe4: br.s IL_0fec - - IL_0fe6: ldloc.2 - IL_0fe7: ldloc.1 - IL_0fe8: ldloc.2 - IL_0fe9: add - IL_0fea: mul - IL_0feb: stloc.2 - IL_0fec: ldloc.1 - IL_0fed: ldloc.2 - IL_0fee: bge.s IL_0ff8 - - IL_0ff0: ldloc.1 - IL_0ff1: ldloc.1 - IL_0ff2: ldloc.2 - IL_0ff3: mul - IL_0ff4: mul - IL_0ff5: stloc.1 - IL_0ff6: br.s IL_0ffe - - IL_0ff8: ldloc.2 - IL_0ff9: ldloc.1 - IL_0ffa: ldloc.2 - IL_0ffb: mul - IL_0ffc: sub - IL_0ffd: stloc.2 - IL_0ffe: ldloc.1 - IL_0fff: ldloc.2 - IL_1000: bge.s IL_100a - - IL_1002: ldloc.1 - IL_1003: ldloc.1 - IL_1004: ldloc.2 - IL_1005: sub - IL_1006: add - IL_1007: stloc.1 - IL_1008: br.s IL_1010 - - IL_100a: ldloc.2 - IL_100b: ldloc.1 - IL_100c: ldloc.2 - IL_100d: sub - IL_100e: mul - IL_100f: stloc.2 - IL_1010: ldloc.1 - IL_1011: ldloc.2 - IL_1012: bne.un.s IL_101c - - IL_1014: ldloc.1 - IL_1015: ldloc.1 - IL_1016: ldloc.2 - IL_1017: sub - IL_1018: sub - IL_1019: stloc.1 - IL_101a: br.s IL_1022 - - IL_101c: ldloc.2 - IL_101d: ldloc.1 - IL_101e: ldloc.2 - IL_101f: sub - IL_1020: sub - IL_1021: stloc.2 - IL_1022: ldloc.1 - IL_1023: ldloc.2 - IL_1024: bgt.s IL_102e - - IL_1026: ldloc.1 - IL_1027: ldloc.1 - IL_1028: ldloc.2 - IL_1029: mul - IL_102a: mul - IL_102b: stloc.1 - IL_102c: br.s IL_1034 - - IL_102e: ldloc.2 - IL_102f: ldloc.1 - IL_1030: ldloc.2 - IL_1031: mul - IL_1032: add - IL_1033: stloc.2 - IL_1034: ldloc.1 - IL_1035: ldloc.2 - IL_1036: bne.un.s IL_1040 - - IL_1038: ldloc.1 - IL_1039: ldloc.1 - IL_103a: ldloc.2 - IL_103b: sub - IL_103c: mul - IL_103d: stloc.1 - IL_103e: br.s IL_1046 - - IL_1040: ldloc.2 - IL_1041: ldloc.1 - IL_1042: ldloc.2 - IL_1043: sub - IL_1044: add - IL_1045: stloc.2 - IL_1046: ldloc.1 - IL_1047: ldloc.2 - IL_1048: bne.un.s IL_1052 - - IL_104a: ldloc.1 - IL_104b: ldloc.1 - IL_104c: ldloc.2 - IL_104d: mul - IL_104e: sub - IL_104f: stloc.1 - IL_1050: br.s IL_1058 - - IL_1052: ldloc.2 - IL_1053: ldloc.1 - IL_1054: ldloc.2 - IL_1055: mul - IL_1056: sub - IL_1057: stloc.2 - IL_1058: ldloc.1 - IL_1059: ldloc.2 - IL_105a: bgt.s IL_1064 - - IL_105c: ldloc.1 - IL_105d: ldloc.1 - IL_105e: ldloc.2 - IL_105f: add - IL_1060: mul - IL_1061: stloc.1 - IL_1062: br.s IL_106a - - IL_1064: ldloc.2 - IL_1065: ldloc.1 - IL_1066: ldloc.2 - IL_1067: add - IL_1068: add - IL_1069: stloc.2 - IL_106a: ldloc.1 - IL_106b: ldloc.2 - IL_106c: bgt.s IL_1076 - - IL_106e: ldloc.1 - IL_106f: ldloc.1 - IL_1070: ldloc.2 - IL_1071: sub - IL_1072: sub - IL_1073: stloc.1 - IL_1074: br.s IL_107c - - IL_1076: ldloc.2 - IL_1077: ldloc.1 - IL_1078: ldloc.2 - IL_1079: sub - IL_107a: add - IL_107b: stloc.2 - IL_107c: ldloc.1 - IL_107d: ldloc.2 - IL_107e: beq.s IL_1088 - - IL_1080: ldloc.1 - IL_1081: ldloc.1 - IL_1082: ldloc.2 - IL_1083: add - IL_1084: mul - IL_1085: stloc.1 - IL_1086: br.s IL_108e - - IL_1088: ldloc.2 - IL_1089: ldloc.1 - IL_108a: ldloc.2 - IL_108b: add - IL_108c: sub - IL_108d: stloc.2 - IL_108e: ldloc.1 - IL_108f: ldloc.2 - IL_1090: bne.un.s IL_109a - - IL_1092: ldloc.1 - IL_1093: ldloc.1 - IL_1094: ldloc.2 - IL_1095: mul - IL_1096: add - IL_1097: stloc.1 - IL_1098: br.s IL_10a0 - - IL_109a: ldloc.2 - IL_109b: ldloc.1 - IL_109c: ldloc.2 - IL_109d: mul - IL_109e: add - IL_109f: stloc.2 - IL_10a0: ldloc.1 - IL_10a1: ldloc.2 - IL_10a2: ble.s IL_10ac - - IL_10a4: ldloc.1 - IL_10a5: ldloc.1 - IL_10a6: ldloc.2 - IL_10a7: mul - IL_10a8: add - IL_10a9: stloc.1 - IL_10aa: br.s IL_10b2 - - IL_10ac: ldloc.2 - IL_10ad: ldloc.1 - IL_10ae: ldloc.2 - IL_10af: mul - IL_10b0: add - IL_10b1: stloc.2 - IL_10b2: ldloc.1 - IL_10b3: ldloc.2 - IL_10b4: bne.un.s IL_10be - - IL_10b6: ldloc.1 - IL_10b7: ldloc.1 - IL_10b8: ldloc.2 - IL_10b9: mul - IL_10ba: sub - IL_10bb: stloc.1 - IL_10bc: br.s IL_10c4 - - IL_10be: ldloc.2 - IL_10bf: ldloc.1 - IL_10c0: ldloc.2 - IL_10c1: mul - IL_10c2: mul - IL_10c3: stloc.2 - IL_10c4: ldloc.1 - IL_10c5: ldloc.2 - IL_10c6: bge.s IL_10d0 - - IL_10c8: ldloc.1 - IL_10c9: ldloc.1 - IL_10ca: ldloc.2 - IL_10cb: add - IL_10cc: sub - IL_10cd: stloc.1 - IL_10ce: br.s IL_10d6 - - IL_10d0: ldloc.2 - IL_10d1: ldloc.1 - IL_10d2: ldloc.2 - IL_10d3: add - IL_10d4: add - IL_10d5: stloc.2 - IL_10d6: ldloc.1 - IL_10d7: ldloc.2 - IL_10d8: bgt.s IL_10e2 - - IL_10da: ldloc.1 - IL_10db: ldloc.1 - IL_10dc: ldloc.2 - IL_10dd: mul - IL_10de: sub - IL_10df: stloc.1 - IL_10e0: br.s IL_10e8 - - IL_10e2: ldloc.2 - IL_10e3: ldloc.1 - IL_10e4: ldloc.2 - IL_10e5: mul - IL_10e6: sub - IL_10e7: stloc.2 - IL_10e8: ldloc.1 - IL_10e9: ldloc.2 - IL_10ea: blt.s IL_10f4 - - IL_10ec: ldloc.1 - IL_10ed: ldloc.1 - IL_10ee: ldloc.2 - IL_10ef: sub - IL_10f0: mul - IL_10f1: stloc.1 - IL_10f2: br.s IL_10fa - - IL_10f4: ldloc.2 - IL_10f5: ldloc.1 - IL_10f6: ldloc.2 - IL_10f7: sub - IL_10f8: add - IL_10f9: stloc.2 - IL_10fa: ldloc.1 - IL_10fb: ldloc.2 - IL_10fc: beq.s IL_1106 - - IL_10fe: ldloc.1 - IL_10ff: ldloc.1 - IL_1100: ldloc.2 - IL_1101: add - IL_1102: mul - IL_1103: stloc.1 - IL_1104: br.s IL_110c - - IL_1106: ldloc.2 - IL_1107: ldloc.1 - IL_1108: ldloc.2 - IL_1109: add - IL_110a: add - IL_110b: stloc.2 - IL_110c: ldloc.1 - IL_110d: ldloc.2 - IL_110e: blt.s IL_1118 - - IL_1110: ldloc.1 - IL_1111: ldloc.1 - IL_1112: ldloc.2 - IL_1113: mul - IL_1114: add - IL_1115: stloc.1 - IL_1116: br.s IL_111e - - IL_1118: ldloc.2 - IL_1119: ldloc.1 - IL_111a: ldloc.2 - IL_111b: mul - IL_111c: mul - IL_111d: stloc.2 - IL_111e: ldloc.1 - IL_111f: ldloc.2 - IL_1120: blt.s IL_112a - - IL_1122: ldloc.1 - IL_1123: ldloc.1 - IL_1124: ldloc.2 - IL_1125: sub - IL_1126: mul - IL_1127: stloc.1 - IL_1128: br.s IL_1130 - - IL_112a: ldloc.2 - IL_112b: ldloc.1 - IL_112c: ldloc.2 - IL_112d: sub - IL_112e: add - IL_112f: stloc.2 - IL_1130: ldloc.1 - IL_1131: ldloc.2 - IL_1132: blt.s IL_113c - - IL_1134: ldloc.1 - IL_1135: ldloc.1 - IL_1136: ldloc.2 - IL_1137: sub - IL_1138: sub - IL_1139: stloc.1 - IL_113a: br.s IL_1142 - - IL_113c: ldloc.2 - IL_113d: ldloc.1 - IL_113e: ldloc.2 - IL_113f: sub - IL_1140: sub - IL_1141: stloc.2 - IL_1142: ldloc.1 - IL_1143: ldloc.2 - IL_1144: blt.s IL_114e - - IL_1146: ldloc.1 - IL_1147: ldloc.1 - IL_1148: ldloc.2 - IL_1149: mul - IL_114a: mul - IL_114b: stloc.1 - IL_114c: br.s IL_1154 - - IL_114e: ldloc.2 - IL_114f: ldloc.1 - IL_1150: ldloc.2 - IL_1151: mul - IL_1152: add - IL_1153: stloc.2 - IL_1154: ldloc.1 - IL_1155: ldloc.2 - IL_1156: ble.s IL_1160 - - IL_1158: ldloc.1 - IL_1159: ldloc.1 - IL_115a: ldloc.2 - IL_115b: add - IL_115c: add - IL_115d: stloc.1 - IL_115e: br.s IL_1166 - - IL_1160: ldloc.2 - IL_1161: ldloc.1 - IL_1162: ldloc.2 - IL_1163: add - IL_1164: mul - IL_1165: stloc.2 - IL_1166: ldloc.1 - IL_1167: ldloc.2 - IL_1168: ble.s IL_1172 - - IL_116a: ldloc.1 - IL_116b: ldloc.1 - IL_116c: ldloc.2 - IL_116d: sub - IL_116e: mul - IL_116f: stloc.1 - IL_1170: br.s IL_1178 - - IL_1172: ldloc.2 - IL_1173: ldloc.1 - IL_1174: ldloc.2 - IL_1175: sub - IL_1176: mul - IL_1177: stloc.2 - IL_1178: ldloc.1 - IL_1179: ldloc.2 - IL_117a: bge.s IL_1184 - - IL_117c: ldloc.1 - IL_117d: ldloc.1 - IL_117e: ldloc.2 - IL_117f: mul - IL_1180: mul - IL_1181: stloc.1 - IL_1182: br.s IL_118a - - IL_1184: ldloc.2 - IL_1185: ldloc.1 - IL_1186: ldloc.2 - IL_1187: mul - IL_1188: mul - IL_1189: stloc.2 - IL_118a: ldloc.1 - IL_118b: ldloc.2 - IL_118c: beq.s IL_1196 - - IL_118e: ldloc.1 - IL_118f: ldloc.1 - IL_1190: ldloc.2 - IL_1191: add - IL_1192: mul - IL_1193: stloc.1 - IL_1194: br.s IL_119c - - IL_1196: ldloc.2 - IL_1197: ldloc.1 - IL_1198: ldloc.2 - IL_1199: add - IL_119a: mul - IL_119b: stloc.2 - IL_119c: ldloc.1 - IL_119d: ldloc.2 - IL_119e: ble.s IL_11a8 - - IL_11a0: ldloc.1 - IL_11a1: ldloc.1 - IL_11a2: ldloc.2 - IL_11a3: sub - IL_11a4: mul - IL_11a5: stloc.1 - IL_11a6: br.s IL_11ae - - IL_11a8: ldloc.2 - IL_11a9: ldloc.1 - IL_11aa: ldloc.2 - IL_11ab: sub - IL_11ac: sub - IL_11ad: stloc.2 - IL_11ae: ldloc.1 - IL_11af: ldloc.2 - IL_11b0: beq.s IL_11ba - - IL_11b2: ldloc.1 - IL_11b3: ldloc.1 - IL_11b4: ldloc.2 - IL_11b5: sub - IL_11b6: mul - IL_11b7: stloc.1 - IL_11b8: br.s IL_11c0 - - IL_11ba: ldloc.2 - IL_11bb: ldloc.1 - IL_11bc: ldloc.2 - IL_11bd: sub - IL_11be: sub - IL_11bf: stloc.2 - IL_11c0: ldloc.1 - IL_11c1: ldloc.2 - IL_11c2: bge.s IL_11cc - - IL_11c4: ldloc.1 - IL_11c5: ldloc.1 - IL_11c6: ldloc.2 - IL_11c7: add - IL_11c8: mul - IL_11c9: stloc.1 - IL_11ca: br.s IL_11d2 - - IL_11cc: ldloc.2 - IL_11cd: ldloc.1 - IL_11ce: ldloc.2 - IL_11cf: add - IL_11d0: sub - IL_11d1: stloc.2 - IL_11d2: ldloc.1 - IL_11d3: ldloc.2 - IL_11d4: ble.s IL_11de - - IL_11d6: ldloc.1 - IL_11d7: ldloc.1 - IL_11d8: ldloc.2 - IL_11d9: mul - IL_11da: mul - IL_11db: stloc.1 - IL_11dc: br.s IL_11e4 - - IL_11de: ldloc.2 - IL_11df: ldloc.1 - IL_11e0: ldloc.2 - IL_11e1: mul - IL_11e2: sub - IL_11e3: stloc.2 - IL_11e4: ldloc.1 - IL_11e5: ldloc.2 - IL_11e6: beq.s IL_11f0 - - IL_11e8: ldloc.1 - IL_11e9: ldloc.1 - IL_11ea: ldloc.2 - IL_11eb: sub - IL_11ec: sub - IL_11ed: stloc.1 - IL_11ee: br.s IL_11f6 - - IL_11f0: ldloc.2 - IL_11f1: ldloc.1 - IL_11f2: ldloc.2 - IL_11f3: sub - IL_11f4: sub - IL_11f5: stloc.2 - IL_11f6: ldloc.1 - IL_11f7: ldloc.2 - IL_11f8: beq.s IL_1202 - - IL_11fa: ldloc.1 - IL_11fb: ldloc.1 - IL_11fc: ldloc.2 - IL_11fd: sub - IL_11fe: add - IL_11ff: stloc.1 - IL_1200: br.s IL_1208 - - IL_1202: ldloc.2 - IL_1203: ldloc.1 - IL_1204: ldloc.2 - IL_1205: sub - IL_1206: add - IL_1207: stloc.2 - IL_1208: ldloc.1 - IL_1209: ldloc.2 - IL_120a: blt.s IL_1214 - - IL_120c: ldloc.1 - IL_120d: ldloc.1 - IL_120e: ldloc.2 - IL_120f: sub - IL_1210: add - IL_1211: stloc.1 - IL_1212: br.s IL_121a - - IL_1214: ldloc.2 - IL_1215: ldloc.1 - IL_1216: ldloc.2 - IL_1217: sub - IL_1218: sub - IL_1219: stloc.2 - IL_121a: ldloc.1 - IL_121b: ldloc.2 - IL_121c: beq.s IL_1226 - - IL_121e: ldloc.1 - IL_121f: ldloc.1 - IL_1220: ldloc.2 - IL_1221: sub - IL_1222: add - IL_1223: stloc.1 - IL_1224: br.s IL_122c - - IL_1226: ldloc.2 - IL_1227: ldloc.1 - IL_1228: ldloc.2 - IL_1229: sub - IL_122a: sub - IL_122b: stloc.2 - IL_122c: ldloc.1 - IL_122d: ldloc.2 - IL_122e: blt.s IL_1238 - - IL_1230: ldloc.1 - IL_1231: ldloc.1 - IL_1232: ldloc.2 - IL_1233: sub - IL_1234: add - IL_1235: stloc.1 - IL_1236: br.s IL_123e - - IL_1238: ldloc.2 - IL_1239: ldloc.1 - IL_123a: ldloc.2 - IL_123b: sub - IL_123c: sub - IL_123d: stloc.2 - IL_123e: ldloc.1 - IL_123f: ldloc.2 - IL_1240: blt.s IL_124a - - IL_1242: ldloc.1 - IL_1243: ldloc.1 - IL_1244: ldloc.2 - IL_1245: add - IL_1246: sub - IL_1247: stloc.1 - IL_1248: br.s IL_1250 - - IL_124a: ldloc.2 - IL_124b: ldloc.1 - IL_124c: ldloc.2 - IL_124d: add - IL_124e: mul - IL_124f: stloc.2 - IL_1250: ldloc.1 - IL_1251: ldloc.2 - IL_1252: bne.un.s IL_125c - - IL_1254: ldloc.1 - IL_1255: ldloc.1 - IL_1256: ldloc.2 - IL_1257: sub - IL_1258: sub - IL_1259: stloc.1 - IL_125a: br.s IL_1262 - - IL_125c: ldloc.2 - IL_125d: ldloc.1 - IL_125e: ldloc.2 - IL_125f: sub - IL_1260: mul - IL_1261: stloc.2 - IL_1262: ldloc.1 - IL_1263: ldloc.2 - IL_1264: blt.s IL_126e - - IL_1266: ldloc.1 - IL_1267: ldloc.1 - IL_1268: ldloc.2 - IL_1269: sub - IL_126a: sub - IL_126b: stloc.1 - IL_126c: br.s IL_1274 - - IL_126e: ldloc.2 - IL_126f: ldloc.1 - IL_1270: ldloc.2 - IL_1271: sub - IL_1272: sub - IL_1273: stloc.2 - IL_1274: ldloc.1 - IL_1275: ldloc.2 - IL_1276: blt.s IL_1280 - - IL_1278: ldloc.1 - IL_1279: ldloc.1 - IL_127a: ldloc.2 - IL_127b: sub - IL_127c: add - IL_127d: stloc.1 - IL_127e: br.s IL_1286 - - IL_1280: ldloc.2 - IL_1281: ldloc.1 - IL_1282: ldloc.2 - IL_1283: sub - IL_1284: add - IL_1285: stloc.2 - IL_1286: ldloc.1 - IL_1287: ldloc.2 - IL_1288: blt.s IL_1292 - - IL_128a: ldloc.1 - IL_128b: ldloc.1 - IL_128c: ldloc.2 - IL_128d: mul - IL_128e: add - IL_128f: stloc.1 - IL_1290: br.s IL_1298 - - IL_1292: ldloc.2 - IL_1293: ldloc.1 - IL_1294: ldloc.2 - IL_1295: mul - IL_1296: sub - IL_1297: stloc.2 - IL_1298: ldloc.1 - IL_1299: ldloc.2 - IL_129a: bne.un.s IL_12a4 - - IL_129c: ldloc.1 - IL_129d: ldloc.1 - IL_129e: ldloc.2 - IL_129f: mul - IL_12a0: mul - IL_12a1: stloc.1 - IL_12a2: br.s IL_12aa - - IL_12a4: ldloc.2 - IL_12a5: ldloc.1 - IL_12a6: ldloc.2 - IL_12a7: mul - IL_12a8: add - IL_12a9: stloc.2 - IL_12aa: ldloc.1 - IL_12ab: ldloc.2 - IL_12ac: bge.s IL_12b6 - - IL_12ae: ldloc.1 - IL_12af: ldloc.1 - IL_12b0: ldloc.2 - IL_12b1: add - IL_12b2: mul - IL_12b3: stloc.1 - IL_12b4: br.s IL_12bc - - IL_12b6: ldloc.2 - IL_12b7: ldloc.1 - IL_12b8: ldloc.2 - IL_12b9: add - IL_12ba: sub - IL_12bb: stloc.2 - IL_12bc: ldloc.1 - IL_12bd: ldloc.2 - IL_12be: ble.s IL_12c8 - - IL_12c0: ldloc.1 - IL_12c1: ldloc.1 - IL_12c2: ldloc.2 - IL_12c3: add - IL_12c4: mul - IL_12c5: stloc.1 - IL_12c6: br.s IL_12ce - - IL_12c8: ldloc.2 - IL_12c9: ldloc.1 - IL_12ca: ldloc.2 - IL_12cb: add - IL_12cc: mul - IL_12cd: stloc.2 - IL_12ce: ldloc.1 - IL_12cf: ldloc.2 - IL_12d0: bge.s IL_12da - - IL_12d2: ldloc.1 - IL_12d3: ldloc.1 - IL_12d4: ldloc.2 - IL_12d5: sub - IL_12d6: mul - IL_12d7: stloc.1 - IL_12d8: br.s IL_12e0 - - IL_12da: ldloc.2 - IL_12db: ldloc.1 - IL_12dc: ldloc.2 - IL_12dd: sub - IL_12de: sub - IL_12df: stloc.2 - IL_12e0: ldloc.1 - IL_12e1: ldloc.2 - IL_12e2: blt.s IL_12ec - - IL_12e4: ldloc.1 - IL_12e5: ldloc.1 - IL_12e6: ldloc.2 - IL_12e7: sub - IL_12e8: add - IL_12e9: stloc.1 - IL_12ea: br.s IL_12f2 - - IL_12ec: ldloc.2 - IL_12ed: ldloc.1 - IL_12ee: ldloc.2 - IL_12ef: sub - IL_12f0: mul - IL_12f1: stloc.2 - IL_12f2: ldloc.1 - IL_12f3: ldloc.2 - IL_12f4: bge.s IL_12fe - - IL_12f6: ldloc.1 - IL_12f7: ldloc.1 - IL_12f8: ldloc.2 - IL_12f9: mul - IL_12fa: mul - IL_12fb: stloc.1 - IL_12fc: br.s IL_1304 - - IL_12fe: ldloc.2 - IL_12ff: ldloc.1 - IL_1300: ldloc.2 - IL_1301: mul - IL_1302: add - IL_1303: stloc.2 - IL_1304: ldloc.1 - IL_1305: ldloc.2 - IL_1306: bgt.s IL_1310 - - IL_1308: ldloc.1 - IL_1309: ldloc.1 - IL_130a: ldloc.2 - IL_130b: mul - IL_130c: add - IL_130d: stloc.1 - IL_130e: br.s IL_1316 - - IL_1310: ldloc.2 - IL_1311: ldloc.1 - IL_1312: ldloc.2 - IL_1313: mul - IL_1314: add - IL_1315: stloc.2 - IL_1316: ldloc.1 - IL_1317: ldloc.2 - IL_1318: bge.s IL_1322 - - IL_131a: ldloc.1 - IL_131b: ldloc.1 - IL_131c: ldloc.2 - IL_131d: add - IL_131e: add - IL_131f: stloc.1 - IL_1320: br.s IL_1328 - - IL_1322: ldloc.2 - IL_1323: ldloc.1 - IL_1324: ldloc.2 - IL_1325: add - IL_1326: add - IL_1327: stloc.2 - IL_1328: ldloc.1 - IL_1329: ldloc.2 - IL_132a: bgt.s IL_1334 - - IL_132c: ldloc.1 - IL_132d: ldloc.1 - IL_132e: ldloc.2 - IL_132f: sub - IL_1330: sub - IL_1331: stloc.1 - IL_1332: br.s IL_133a - - IL_1334: ldloc.2 - IL_1335: ldloc.1 - IL_1336: ldloc.2 - IL_1337: sub - IL_1338: sub - IL_1339: stloc.2 - IL_133a: ldloc.1 - IL_133b: ldloc.2 - IL_133c: ble.s IL_1346 - - IL_133e: ldloc.1 - IL_133f: ldloc.1 - IL_1340: ldloc.2 - IL_1341: mul - IL_1342: add - IL_1343: stloc.1 - IL_1344: br.s IL_134c - - IL_1346: ldloc.2 - IL_1347: ldloc.1 - IL_1348: ldloc.2 - IL_1349: mul - IL_134a: mul - IL_134b: stloc.2 - IL_134c: ldloc.1 - IL_134d: ldloc.2 - IL_134e: beq.s IL_1358 - - IL_1350: ldloc.1 - IL_1351: ldloc.1 - IL_1352: ldloc.2 - IL_1353: sub - IL_1354: mul - IL_1355: stloc.1 - IL_1356: br.s IL_135e - - IL_1358: ldloc.2 - IL_1359: ldloc.1 - IL_135a: ldloc.2 - IL_135b: sub - IL_135c: add - IL_135d: stloc.2 - IL_135e: ldloc.1 - IL_135f: ldloc.2 - IL_1360: bne.un.s IL_136a - - IL_1362: ldloc.1 - IL_1363: ldloc.1 - IL_1364: ldloc.2 - IL_1365: sub - IL_1366: sub - IL_1367: stloc.1 - IL_1368: br.s IL_1370 - - IL_136a: ldloc.2 - IL_136b: ldloc.1 - IL_136c: ldloc.2 - IL_136d: sub - IL_136e: add - IL_136f: stloc.2 - IL_1370: ldloc.1 - IL_1371: ldloc.2 - IL_1372: beq.s IL_137c - - IL_1374: ldloc.1 - IL_1375: ldloc.1 - IL_1376: ldloc.2 - IL_1377: add - IL_1378: sub - IL_1379: stloc.1 - IL_137a: br.s IL_1382 - - IL_137c: ldloc.2 - IL_137d: ldloc.1 - IL_137e: ldloc.2 - IL_137f: add - IL_1380: add - IL_1381: stloc.2 - IL_1382: ldloc.1 - IL_1383: ldloc.2 - IL_1384: blt.s IL_138e - - IL_1386: ldloc.1 - IL_1387: ldloc.1 - IL_1388: ldloc.2 - IL_1389: add - IL_138a: mul - IL_138b: stloc.1 - IL_138c: br.s IL_1394 - - IL_138e: ldloc.2 - IL_138f: ldloc.1 - IL_1390: ldloc.2 - IL_1391: add - IL_1392: mul - IL_1393: stloc.2 - IL_1394: ldloc.1 - IL_1395: ldloc.2 - IL_1396: bne.un.s IL_13a0 - - IL_1398: ldloc.1 - IL_1399: ldloc.1 - IL_139a: ldloc.2 - IL_139b: add - IL_139c: sub - IL_139d: stloc.1 - IL_139e: br.s IL_13a6 - - IL_13a0: ldloc.2 - IL_13a1: ldloc.1 - IL_13a2: ldloc.2 - IL_13a3: add - IL_13a4: sub - IL_13a5: stloc.2 - IL_13a6: ldloc.1 - IL_13a7: ldloc.2 - IL_13a8: bgt.s IL_13b2 - - IL_13aa: ldloc.1 - IL_13ab: ldloc.1 - IL_13ac: ldloc.2 - IL_13ad: add - IL_13ae: mul - IL_13af: stloc.1 - IL_13b0: br.s IL_13b8 - - IL_13b2: ldloc.2 - IL_13b3: ldloc.1 - IL_13b4: ldloc.2 - IL_13b5: add - IL_13b6: mul - IL_13b7: stloc.2 - IL_13b8: ldloc.1 - IL_13b9: ldloc.2 - IL_13ba: beq.s IL_13c4 - - IL_13bc: ldloc.1 - IL_13bd: ldloc.1 - IL_13be: ldloc.2 - IL_13bf: mul - IL_13c0: mul - IL_13c1: stloc.1 - IL_13c2: br.s IL_13ca - - IL_13c4: ldloc.2 - IL_13c5: ldloc.1 - IL_13c6: ldloc.2 - IL_13c7: mul - IL_13c8: sub - IL_13c9: stloc.2 - IL_13ca: ldloc.1 - IL_13cb: ldloc.2 - IL_13cc: bge.s IL_13d6 - - IL_13ce: ldloc.1 - IL_13cf: ldloc.1 - IL_13d0: ldloc.2 - IL_13d1: add - IL_13d2: mul - IL_13d3: stloc.1 - IL_13d4: br.s IL_13dc - - IL_13d6: ldloc.2 - IL_13d7: ldloc.1 - IL_13d8: ldloc.2 - IL_13d9: add - IL_13da: sub - IL_13db: stloc.2 - IL_13dc: ldloc.1 - IL_13dd: ldloc.2 - IL_13de: bgt.s IL_13e8 - - IL_13e0: ldloc.1 - IL_13e1: ldloc.1 - IL_13e2: ldloc.2 - IL_13e3: sub - IL_13e4: mul - IL_13e5: stloc.1 - IL_13e6: br.s IL_13ee - - IL_13e8: ldloc.2 - IL_13e9: ldloc.1 - IL_13ea: ldloc.2 - IL_13eb: sub - IL_13ec: sub - IL_13ed: stloc.2 - IL_13ee: ldloc.1 - IL_13ef: ldloc.2 - IL_13f0: blt.s IL_13fa - - IL_13f2: ldloc.1 - IL_13f3: ldloc.1 - IL_13f4: ldloc.2 - IL_13f5: mul - IL_13f6: sub - IL_13f7: stloc.1 - IL_13f8: br.s IL_1400 - - IL_13fa: ldloc.2 - IL_13fb: ldloc.1 - IL_13fc: ldloc.2 - IL_13fd: mul - IL_13fe: add - IL_13ff: stloc.2 - IL_1400: ldloc.1 - IL_1401: ldloc.2 - IL_1402: ble.s IL_140c - - IL_1404: ldloc.1 - IL_1405: ldloc.1 - IL_1406: ldloc.2 - IL_1407: mul - IL_1408: mul - IL_1409: stloc.1 - IL_140a: br.s IL_1412 - - IL_140c: ldloc.2 - IL_140d: ldloc.1 - IL_140e: ldloc.2 - IL_140f: mul - IL_1410: mul - IL_1411: stloc.2 - IL_1412: ldloc.1 - IL_1413: ldloc.2 - IL_1414: bne.un.s IL_141e - - IL_1416: ldloc.1 - IL_1417: ldloc.1 - IL_1418: ldloc.2 - IL_1419: mul - IL_141a: mul - IL_141b: stloc.1 - IL_141c: br.s IL_1424 - - IL_141e: ldloc.2 - IL_141f: ldloc.1 - IL_1420: ldloc.2 - IL_1421: mul - IL_1422: mul - IL_1423: stloc.2 - IL_1424: ldloc.1 - IL_1425: ldloc.2 - IL_1426: bne.un.s IL_1430 - - IL_1428: ldloc.1 - IL_1429: ldloc.1 - IL_142a: ldloc.2 - IL_142b: mul - IL_142c: sub - IL_142d: stloc.1 - IL_142e: br.s IL_1436 - - IL_1430: ldloc.2 - IL_1431: ldloc.1 - IL_1432: ldloc.2 - IL_1433: mul - IL_1434: mul - IL_1435: stloc.2 - IL_1436: ldloc.1 - IL_1437: ldloc.2 - IL_1438: bne.un.s IL_1442 - - IL_143a: ldloc.1 - IL_143b: ldloc.1 - IL_143c: ldloc.2 - IL_143d: add - IL_143e: mul - IL_143f: stloc.1 - IL_1440: br.s IL_1448 - - IL_1442: ldloc.2 - IL_1443: ldloc.1 - IL_1444: ldloc.2 - IL_1445: add - IL_1446: sub - IL_1447: stloc.2 - IL_1448: ldloc.1 - IL_1449: ldloc.2 - IL_144a: beq.s IL_1454 - - IL_144c: ldloc.1 - IL_144d: ldloc.1 - IL_144e: ldloc.2 - IL_144f: mul - IL_1450: add - IL_1451: stloc.1 - IL_1452: br.s IL_145a - - IL_1454: ldloc.2 - IL_1455: ldloc.1 - IL_1456: ldloc.2 - IL_1457: mul - IL_1458: sub - IL_1459: stloc.2 - IL_145a: ldloc.1 - IL_145b: ldloc.2 - IL_145c: bge.s IL_1466 - - IL_145e: ldloc.1 - IL_145f: ldloc.1 - IL_1460: ldloc.2 - IL_1461: add - IL_1462: add - IL_1463: stloc.1 - IL_1464: br.s IL_146c - - IL_1466: ldloc.2 - IL_1467: ldloc.1 - IL_1468: ldloc.2 - IL_1469: add - IL_146a: add - IL_146b: stloc.2 - IL_146c: ldloc.1 - IL_146d: ldloc.2 - IL_146e: bge.s IL_1478 - - IL_1470: ldloc.1 - IL_1471: ldloc.1 - IL_1472: ldloc.2 - IL_1473: sub - IL_1474: mul - IL_1475: stloc.1 - IL_1476: br.s IL_147e - - IL_1478: ldloc.2 - IL_1479: ldloc.1 - IL_147a: ldloc.2 - IL_147b: sub - IL_147c: sub - IL_147d: stloc.2 - IL_147e: ldloc.1 - IL_147f: ldloc.2 - IL_1480: ble.s IL_148a - - IL_1482: ldloc.1 - IL_1483: ldloc.1 - IL_1484: ldloc.2 - IL_1485: add - IL_1486: add - IL_1487: stloc.1 - IL_1488: br.s IL_1490 - - IL_148a: ldloc.2 - IL_148b: ldloc.1 - IL_148c: ldloc.2 - IL_148d: add - IL_148e: sub - IL_148f: stloc.2 - IL_1490: ldloc.1 - IL_1491: ldloc.2 - IL_1492: bge.s IL_149c - - IL_1494: ldloc.1 - IL_1495: ldloc.1 - IL_1496: ldloc.2 - IL_1497: sub - IL_1498: sub - IL_1499: stloc.1 - IL_149a: br.s IL_14a2 - - IL_149c: ldloc.2 - IL_149d: ldloc.1 - IL_149e: ldloc.2 - IL_149f: sub - IL_14a0: mul - IL_14a1: stloc.2 - IL_14a2: ldloc.1 - IL_14a3: ldloc.2 - IL_14a4: bne.un.s IL_14ae - - IL_14a6: ldloc.1 - IL_14a7: ldloc.1 - IL_14a8: ldloc.2 - IL_14a9: mul - IL_14aa: add - IL_14ab: stloc.1 - IL_14ac: br.s IL_14b4 - - IL_14ae: ldloc.2 - IL_14af: ldloc.1 - IL_14b0: ldloc.2 - IL_14b1: mul - IL_14b2: add - IL_14b3: stloc.2 - IL_14b4: ldloc.1 - IL_14b5: ldloc.2 - IL_14b6: beq.s IL_14c0 - - IL_14b8: ldloc.1 - IL_14b9: ldloc.1 - IL_14ba: ldloc.2 - IL_14bb: mul - IL_14bc: sub - IL_14bd: stloc.1 - IL_14be: br.s IL_14c6 - - IL_14c0: ldloc.2 - IL_14c1: ldloc.1 - IL_14c2: ldloc.2 - IL_14c3: mul - IL_14c4: mul - IL_14c5: stloc.2 - IL_14c6: ldloc.1 - IL_14c7: ldloc.2 - IL_14c8: ble.s IL_14d2 - - IL_14ca: ldloc.1 - IL_14cb: ldloc.1 - IL_14cc: ldloc.2 - IL_14cd: mul - IL_14ce: sub - IL_14cf: stloc.1 - IL_14d0: br.s IL_14d8 - - IL_14d2: ldloc.2 - IL_14d3: ldloc.1 - IL_14d4: ldloc.2 - IL_14d5: mul - IL_14d6: sub - IL_14d7: stloc.2 - IL_14d8: ldloc.1 - IL_14d9: ldloc.2 - IL_14da: blt.s IL_14e4 - - IL_14dc: ldloc.1 - IL_14dd: ldloc.1 - IL_14de: ldloc.2 - IL_14df: sub - IL_14e0: sub - IL_14e1: stloc.1 - IL_14e2: br.s IL_14ea - - IL_14e4: ldloc.2 - IL_14e5: ldloc.1 - IL_14e6: ldloc.2 - IL_14e7: sub - IL_14e8: sub - IL_14e9: stloc.2 - IL_14ea: ldloc.1 - IL_14eb: ldloc.2 - IL_14ec: ble.s IL_14f6 - - IL_14ee: ldloc.1 - IL_14ef: ldloc.1 - IL_14f0: ldloc.2 - IL_14f1: mul - IL_14f2: add - IL_14f3: stloc.1 - IL_14f4: br.s IL_14fc - - IL_14f6: ldloc.2 - IL_14f7: ldloc.1 - IL_14f8: ldloc.2 - IL_14f9: mul - IL_14fa: mul - IL_14fb: stloc.2 - IL_14fc: ldloc.1 - IL_14fd: ldloc.2 - IL_14fe: beq.s IL_1508 - - IL_1500: ldloc.1 - IL_1501: ldloc.1 - IL_1502: ldloc.2 - IL_1503: mul - IL_1504: mul - IL_1505: stloc.1 - IL_1506: br.s IL_150e - - IL_1508: ldloc.2 - IL_1509: ldloc.1 - IL_150a: ldloc.2 - IL_150b: mul - IL_150c: sub - IL_150d: stloc.2 - IL_150e: ldloc.1 - IL_150f: ldloc.2 - IL_1510: bge.s IL_151a - - IL_1512: ldloc.1 - IL_1513: ldloc.1 - IL_1514: ldloc.2 - IL_1515: sub - IL_1516: add - IL_1517: stloc.1 - IL_1518: br.s IL_1520 - - IL_151a: ldloc.2 - IL_151b: ldloc.1 - IL_151c: ldloc.2 - IL_151d: sub - IL_151e: mul - IL_151f: stloc.2 - IL_1520: ldloc.1 - IL_1521: ldloc.2 - IL_1522: ble.s IL_152c - - IL_1524: ldloc.1 - IL_1525: ldloc.1 - IL_1526: ldloc.2 - IL_1527: sub - IL_1528: sub - IL_1529: stloc.1 - IL_152a: br.s IL_1532 - - IL_152c: ldloc.2 - IL_152d: ldloc.1 - IL_152e: ldloc.2 - IL_152f: sub - IL_1530: sub - IL_1531: stloc.2 - IL_1532: ldloc.1 - IL_1533: ldloc.2 - IL_1534: bne.un.s IL_153e - - IL_1536: ldloc.1 - IL_1537: ldloc.1 - IL_1538: ldloc.2 - IL_1539: mul - IL_153a: mul - IL_153b: stloc.1 - IL_153c: br.s IL_1544 - - IL_153e: ldloc.2 - IL_153f: ldloc.1 - IL_1540: ldloc.2 - IL_1541: mul - IL_1542: sub - IL_1543: stloc.2 - IL_1544: ldloc.1 - IL_1545: ldloc.2 - IL_1546: beq.s IL_1550 - - IL_1548: ldloc.1 - IL_1549: ldloc.1 - IL_154a: ldloc.2 - IL_154b: mul - IL_154c: sub - IL_154d: stloc.1 - IL_154e: br.s IL_1556 - - IL_1550: ldloc.2 - IL_1551: ldloc.1 - IL_1552: ldloc.2 - IL_1553: mul - IL_1554: mul - IL_1555: stloc.2 - IL_1556: ldloc.1 - IL_1557: ldloc.2 - IL_1558: blt.s IL_1562 - - IL_155a: ldloc.1 - IL_155b: ldloc.1 - IL_155c: ldloc.2 - IL_155d: sub - IL_155e: sub - IL_155f: stloc.1 - IL_1560: br.s IL_1568 - - IL_1562: ldloc.2 - IL_1563: ldloc.1 - IL_1564: ldloc.2 - IL_1565: sub - IL_1566: mul - IL_1567: stloc.2 - IL_1568: ldloc.1 - IL_1569: ldloc.2 - IL_156a: blt.s IL_1574 - - IL_156c: ldloc.1 - IL_156d: ldloc.1 - IL_156e: ldloc.2 - IL_156f: mul - IL_1570: mul - IL_1571: stloc.1 - IL_1572: br.s IL_157a - - IL_1574: ldloc.2 - IL_1575: ldloc.1 - IL_1576: ldloc.2 - IL_1577: mul - IL_1578: add - IL_1579: stloc.2 - IL_157a: ldloc.1 - IL_157b: ldloc.2 - IL_157c: bgt.s IL_1586 - - IL_157e: ldloc.1 - IL_157f: ldloc.1 - IL_1580: ldloc.2 - IL_1581: add - IL_1582: add - IL_1583: stloc.1 - IL_1584: br.s IL_158c - - IL_1586: ldloc.2 - IL_1587: ldloc.1 - IL_1588: ldloc.2 - IL_1589: add - IL_158a: add - IL_158b: stloc.2 - IL_158c: ldloc.1 - IL_158d: ldloc.2 - IL_158e: bgt.s IL_1598 - - IL_1590: ldloc.1 - IL_1591: ldloc.1 - IL_1592: ldloc.2 - IL_1593: mul - IL_1594: add - IL_1595: stloc.1 - IL_1596: br.s IL_159e - - IL_1598: ldloc.2 - IL_1599: ldloc.1 - IL_159a: ldloc.2 - IL_159b: mul - IL_159c: mul - IL_159d: stloc.2 - IL_159e: ldloc.1 - IL_159f: ldloc.2 - IL_15a0: bgt.s IL_15aa - - IL_15a2: ldloc.1 - IL_15a3: ldloc.1 - IL_15a4: ldloc.2 - IL_15a5: mul - IL_15a6: sub - IL_15a7: stloc.1 - IL_15a8: br.s IL_15b0 - - IL_15aa: ldloc.2 - IL_15ab: ldloc.1 - IL_15ac: ldloc.2 - IL_15ad: mul - IL_15ae: sub - IL_15af: stloc.2 - IL_15b0: ldloc.1 - IL_15b1: ldloc.2 - IL_15b2: bne.un.s IL_15bc - - IL_15b4: ldloc.1 - IL_15b5: ldloc.1 - IL_15b6: ldloc.2 - IL_15b7: sub - IL_15b8: sub - IL_15b9: stloc.1 - IL_15ba: br.s IL_15c2 - - IL_15bc: ldloc.2 - IL_15bd: ldloc.1 - IL_15be: ldloc.2 - IL_15bf: sub - IL_15c0: sub - IL_15c1: stloc.2 - IL_15c2: ldloc.1 - IL_15c3: ldloc.2 - IL_15c4: bge.s IL_15ce - - IL_15c6: ldloc.1 - IL_15c7: ldloc.1 - IL_15c8: ldloc.2 - IL_15c9: sub - IL_15ca: add - IL_15cb: stloc.1 - IL_15cc: br.s IL_15d4 - - IL_15ce: ldloc.2 - IL_15cf: ldloc.1 - IL_15d0: ldloc.2 - IL_15d1: sub - IL_15d2: add - IL_15d3: stloc.2 - IL_15d4: ldloc.1 - IL_15d5: ldloc.2 - IL_15d6: beq.s IL_15e0 - - IL_15d8: ldloc.1 - IL_15d9: ldloc.1 - IL_15da: ldloc.2 - IL_15db: sub - IL_15dc: mul - IL_15dd: stloc.1 - IL_15de: br.s IL_15e6 - - IL_15e0: ldloc.2 - IL_15e1: ldloc.1 - IL_15e2: ldloc.2 - IL_15e3: sub - IL_15e4: sub - IL_15e5: stloc.2 - IL_15e6: ldloc.1 - IL_15e7: ldloc.2 - IL_15e8: bge.s IL_15f2 - - IL_15ea: ldloc.1 - IL_15eb: ldloc.1 - IL_15ec: ldloc.2 - IL_15ed: sub - IL_15ee: add - IL_15ef: stloc.1 - IL_15f0: br.s IL_15f8 - - IL_15f2: ldloc.2 - IL_15f3: ldloc.1 - IL_15f4: ldloc.2 - IL_15f5: sub - IL_15f6: sub - IL_15f7: stloc.2 - IL_15f8: ldloc.1 - IL_15f9: ldloc.2 - IL_15fa: beq.s IL_1604 - - IL_15fc: ldloc.1 - IL_15fd: ldloc.1 - IL_15fe: ldloc.2 - IL_15ff: sub - IL_1600: add - IL_1601: stloc.1 - IL_1602: br.s IL_160a - - IL_1604: ldloc.2 - IL_1605: ldloc.1 - IL_1606: ldloc.2 - IL_1607: sub - IL_1608: sub - IL_1609: stloc.2 - IL_160a: ldloc.1 - IL_160b: ldloc.2 - IL_160c: ble.s IL_1616 - - IL_160e: ldloc.1 - IL_160f: ldloc.1 - IL_1610: ldloc.2 - IL_1611: mul - IL_1612: mul - IL_1613: stloc.1 - IL_1614: br.s IL_161c - - IL_1616: ldloc.2 - IL_1617: ldloc.1 - IL_1618: ldloc.2 - IL_1619: mul - IL_161a: mul - IL_161b: stloc.2 - IL_161c: ldloc.1 - IL_161d: ldloc.2 - IL_161e: bgt.s IL_1628 - - IL_1620: ldloc.1 - IL_1621: ldloc.1 - IL_1622: ldloc.2 - IL_1623: sub - IL_1624: sub - IL_1625: stloc.1 - IL_1626: br.s IL_162e - - IL_1628: ldloc.2 - IL_1629: ldloc.1 - IL_162a: ldloc.2 - IL_162b: sub - IL_162c: mul - IL_162d: stloc.2 - IL_162e: ldloc.1 - IL_162f: ldloc.2 - IL_1630: ble.s IL_163a - - IL_1632: ldloc.1 - IL_1633: ldloc.1 - IL_1634: ldloc.2 - IL_1635: sub - IL_1636: sub - IL_1637: stloc.1 - IL_1638: br.s IL_1640 - - IL_163a: ldloc.2 - IL_163b: ldloc.1 - IL_163c: ldloc.2 - IL_163d: sub - IL_163e: add - IL_163f: stloc.2 - IL_1640: ldloc.1 - IL_1641: ldloc.2 - IL_1642: beq.s IL_164c - - IL_1644: ldloc.1 - IL_1645: ldloc.1 - IL_1646: ldloc.2 - IL_1647: mul - IL_1648: add - IL_1649: stloc.1 - IL_164a: br.s IL_1652 - - IL_164c: ldloc.2 - IL_164d: ldloc.1 - IL_164e: ldloc.2 - IL_164f: mul - IL_1650: mul - IL_1651: stloc.2 - IL_1652: ldloc.1 - IL_1653: ldloc.2 - IL_1654: bne.un.s IL_165e - - IL_1656: ldloc.1 - IL_1657: ldloc.1 - IL_1658: ldloc.2 - IL_1659: add - IL_165a: sub - IL_165b: stloc.1 - IL_165c: br.s IL_1664 - - IL_165e: ldloc.2 - IL_165f: ldloc.1 - IL_1660: ldloc.2 - IL_1661: add - IL_1662: add - IL_1663: stloc.2 - IL_1664: ldloc.1 - IL_1665: ldloc.2 - IL_1666: bne.un.s IL_1670 - - IL_1668: ldloc.1 - IL_1669: ldloc.1 - IL_166a: ldloc.2 - IL_166b: mul - IL_166c: sub - IL_166d: stloc.1 - IL_166e: br.s IL_1676 - - IL_1670: ldloc.2 - IL_1671: ldloc.1 - IL_1672: ldloc.2 - IL_1673: mul - IL_1674: mul - IL_1675: stloc.2 - IL_1676: ldloc.1 - IL_1677: ldloc.2 - IL_1678: bne.un.s IL_1682 - - IL_167a: ldloc.1 - IL_167b: ldloc.1 - IL_167c: ldloc.2 - IL_167d: sub - IL_167e: sub - IL_167f: stloc.1 - IL_1680: br.s IL_1688 - - IL_1682: ldloc.2 - IL_1683: ldloc.1 - IL_1684: ldloc.2 - IL_1685: sub - IL_1686: mul - IL_1687: stloc.2 - IL_1688: ldloc.1 - IL_1689: ldloc.2 - IL_168a: bne.un.s IL_1694 - - IL_168c: ldloc.1 - IL_168d: ldloc.1 - IL_168e: ldloc.2 - IL_168f: sub - IL_1690: add - IL_1691: stloc.1 - IL_1692: br.s IL_169a - - IL_1694: ldloc.2 - IL_1695: ldloc.1 - IL_1696: ldloc.2 - IL_1697: sub - IL_1698: mul - IL_1699: stloc.2 - IL_169a: ldloc.1 - IL_169b: ldloc.2 - IL_169c: ble.s IL_16a6 - - IL_169e: ldloc.1 - IL_169f: ldloc.1 - IL_16a0: ldloc.2 - IL_16a1: mul - IL_16a2: add - IL_16a3: stloc.1 - IL_16a4: br.s IL_16ac - - IL_16a6: ldloc.2 - IL_16a7: ldloc.1 - IL_16a8: ldloc.2 - IL_16a9: mul - IL_16aa: mul - IL_16ab: stloc.2 - IL_16ac: ldloc.1 - IL_16ad: ldloc.2 - IL_16ae: blt.s IL_16b8 - - IL_16b0: ldloc.1 - IL_16b1: ldloc.1 - IL_16b2: ldloc.2 - IL_16b3: mul - IL_16b4: mul - IL_16b5: stloc.1 - IL_16b6: br.s IL_16be - - IL_16b8: ldloc.2 - IL_16b9: ldloc.1 - IL_16ba: ldloc.2 - IL_16bb: mul - IL_16bc: mul - IL_16bd: stloc.2 - IL_16be: ldloc.1 - IL_16bf: ldloc.2 - IL_16c0: blt.s IL_16ca - - IL_16c2: ldloc.1 - IL_16c3: ldloc.1 - IL_16c4: ldloc.2 - IL_16c5: add - IL_16c6: sub - IL_16c7: stloc.1 - IL_16c8: br.s IL_16d0 - - IL_16ca: ldloc.2 - IL_16cb: ldloc.1 - IL_16cc: ldloc.2 - IL_16cd: add - IL_16ce: sub - IL_16cf: stloc.2 - IL_16d0: ldloc.1 - IL_16d1: ldloc.2 - IL_16d2: blt.s IL_16dc - - IL_16d4: ldloc.1 - IL_16d5: ldloc.1 - IL_16d6: ldloc.2 - IL_16d7: add - IL_16d8: add - IL_16d9: stloc.1 - IL_16da: br.s IL_16e2 - - IL_16dc: ldloc.2 - IL_16dd: ldloc.1 - IL_16de: ldloc.2 - IL_16df: add - IL_16e0: sub - IL_16e1: stloc.2 - IL_16e2: ldloc.1 - IL_16e3: ldloc.2 - IL_16e4: ble.s IL_16ee - - IL_16e6: ldloc.1 - IL_16e7: ldloc.1 - IL_16e8: ldloc.2 - IL_16e9: sub - IL_16ea: sub - IL_16eb: stloc.1 - IL_16ec: br.s IL_16f4 - - IL_16ee: ldloc.2 - IL_16ef: ldloc.1 - IL_16f0: ldloc.2 - IL_16f1: sub - IL_16f2: mul - IL_16f3: stloc.2 - IL_16f4: ldloc.1 - IL_16f5: ldloc.2 - IL_16f6: bne.un.s IL_1700 - - IL_16f8: ldloc.1 - IL_16f9: ldloc.1 - IL_16fa: ldloc.2 - IL_16fb: sub - IL_16fc: add - IL_16fd: stloc.1 - IL_16fe: br.s IL_1706 - - IL_1700: ldloc.2 - IL_1701: ldloc.1 - IL_1702: ldloc.2 - IL_1703: sub - IL_1704: mul - IL_1705: stloc.2 - IL_1706: ldloc.1 - IL_1707: ldloc.2 - IL_1708: bge.s IL_1712 - - IL_170a: ldloc.1 - IL_170b: ldloc.1 - IL_170c: ldloc.2 - IL_170d: add - IL_170e: add - IL_170f: stloc.1 - IL_1710: br.s IL_1718 - - IL_1712: ldloc.2 - IL_1713: ldloc.1 - IL_1714: ldloc.2 - IL_1715: add - IL_1716: add - IL_1717: stloc.2 - IL_1718: ldloc.1 - IL_1719: ldloc.2 - IL_171a: blt.s IL_1724 - - IL_171c: ldloc.1 - IL_171d: ldloc.1 - IL_171e: ldloc.2 - IL_171f: mul - IL_1720: add - IL_1721: stloc.1 - IL_1722: br.s IL_172a - - IL_1724: ldloc.2 - IL_1725: ldloc.1 - IL_1726: ldloc.2 - IL_1727: mul - IL_1728: mul - IL_1729: stloc.2 - IL_172a: ldloc.1 - IL_172b: ldloc.2 - IL_172c: bne.un.s IL_1736 - - IL_172e: ldloc.1 - IL_172f: ldloc.1 - IL_1730: ldloc.2 - IL_1731: mul - IL_1732: mul - IL_1733: stloc.1 - IL_1734: br.s IL_173c - - IL_1736: ldloc.2 - IL_1737: ldloc.1 - IL_1738: ldloc.2 - IL_1739: mul - IL_173a: add - IL_173b: stloc.2 - IL_173c: ldloc.1 - IL_173d: ldloc.2 - IL_173e: blt.s IL_1748 - - IL_1740: ldloc.1 - IL_1741: ldloc.1 - IL_1742: ldloc.2 - IL_1743: add - IL_1744: add - IL_1745: stloc.1 - IL_1746: br.s IL_174e - - IL_1748: ldloc.2 - IL_1749: ldloc.1 - IL_174a: ldloc.2 - IL_174b: add - IL_174c: sub - IL_174d: stloc.2 - IL_174e: ldloc.1 - IL_174f: ldloc.2 - IL_1750: bgt.s IL_175a - - IL_1752: ldloc.1 - IL_1753: ldloc.1 - IL_1754: ldloc.2 - IL_1755: add - IL_1756: sub - IL_1757: stloc.1 - IL_1758: br.s IL_1760 - - IL_175a: ldloc.2 - IL_175b: ldloc.1 - IL_175c: ldloc.2 - IL_175d: add - IL_175e: mul - IL_175f: stloc.2 - IL_1760: ldloc.1 - IL_1761: ldloc.2 - IL_1762: beq.s IL_176c - - IL_1764: ldloc.1 - IL_1765: ldloc.1 - IL_1766: ldloc.2 - IL_1767: sub - IL_1768: sub - IL_1769: stloc.1 - IL_176a: br.s IL_1772 - - IL_176c: ldloc.2 - IL_176d: ldloc.1 - IL_176e: ldloc.2 - IL_176f: sub - IL_1770: sub - IL_1771: stloc.2 - IL_1772: ldloc.1 - IL_1773: ldloc.2 - IL_1774: ble.s IL_177e - - IL_1776: ldloc.1 - IL_1777: ldloc.1 - IL_1778: ldloc.2 - IL_1779: add - IL_177a: mul - IL_177b: stloc.1 - IL_177c: br.s IL_1784 - - IL_177e: ldloc.2 - IL_177f: ldloc.1 - IL_1780: ldloc.2 - IL_1781: add - IL_1782: sub - IL_1783: stloc.2 - IL_1784: ldloc.1 - IL_1785: ldloc.2 - IL_1786: blt.s IL_1790 - - IL_1788: ldloc.1 - IL_1789: ldloc.1 - IL_178a: ldloc.2 - IL_178b: add - IL_178c: sub - IL_178d: stloc.1 - IL_178e: br.s IL_1796 - - IL_1790: ldloc.2 - IL_1791: ldloc.1 - IL_1792: ldloc.2 - IL_1793: add - IL_1794: mul - IL_1795: stloc.2 - IL_1796: ldloc.1 - IL_1797: ldloc.2 - IL_1798: bge.s IL_17a2 - - IL_179a: ldloc.1 - IL_179b: ldloc.1 - IL_179c: ldloc.2 - IL_179d: add - IL_179e: add - IL_179f: stloc.1 - IL_17a0: br.s IL_17a8 - - IL_17a2: ldloc.2 - IL_17a3: ldloc.1 - IL_17a4: ldloc.2 - IL_17a5: add - IL_17a6: sub - IL_17a7: stloc.2 - IL_17a8: ldloc.1 - IL_17a9: ldloc.2 - IL_17aa: blt.s IL_17b4 - - IL_17ac: ldloc.1 - IL_17ad: ldloc.1 - IL_17ae: ldloc.2 - IL_17af: add - IL_17b0: mul - IL_17b1: stloc.1 - IL_17b2: br.s IL_17ba - - IL_17b4: ldloc.2 - IL_17b5: ldloc.1 - IL_17b6: ldloc.2 - IL_17b7: add - IL_17b8: sub - IL_17b9: stloc.2 - IL_17ba: ldloc.1 - IL_17bb: ldloc.2 - IL_17bc: bgt.s IL_17c6 - - IL_17be: ldloc.1 - IL_17bf: ldloc.1 - IL_17c0: ldloc.2 - IL_17c1: mul - IL_17c2: mul - IL_17c3: stloc.1 - IL_17c4: br.s IL_17cc - - IL_17c6: ldloc.2 - IL_17c7: ldloc.1 - IL_17c8: ldloc.2 - IL_17c9: mul - IL_17ca: sub - IL_17cb: stloc.2 - IL_17cc: ldloc.1 - IL_17cd: ldloc.2 - IL_17ce: beq.s IL_17d8 - - IL_17d0: ldloc.1 - IL_17d1: ldloc.1 - IL_17d2: ldloc.2 - IL_17d3: add - IL_17d4: sub - IL_17d5: stloc.1 - IL_17d6: br.s IL_17de - - IL_17d8: ldloc.2 - IL_17d9: ldloc.1 - IL_17da: ldloc.2 - IL_17db: add - IL_17dc: mul - IL_17dd: stloc.2 - IL_17de: ldloc.1 - IL_17df: ldloc.2 - IL_17e0: beq.s IL_17ea - - IL_17e2: ldloc.1 - IL_17e3: ldloc.1 - IL_17e4: ldloc.2 - IL_17e5: add - IL_17e6: mul - IL_17e7: stloc.1 - IL_17e8: br.s IL_17f0 - - IL_17ea: ldloc.2 - IL_17eb: ldloc.1 - IL_17ec: ldloc.2 - IL_17ed: add - IL_17ee: mul - IL_17ef: stloc.2 - IL_17f0: ldloc.1 - IL_17f1: ldloc.2 - IL_17f2: bge.s IL_17fc - - IL_17f4: ldloc.1 - IL_17f5: ldloc.1 - IL_17f6: ldloc.2 - IL_17f7: mul - IL_17f8: sub - IL_17f9: stloc.1 - IL_17fa: br.s IL_1802 - - IL_17fc: ldloc.2 - IL_17fd: ldloc.1 - IL_17fe: ldloc.2 - IL_17ff: mul - IL_1800: mul - IL_1801: stloc.2 - IL_1802: ldloc.1 - IL_1803: ldloc.2 - IL_1804: bne.un.s IL_180e - - IL_1806: ldloc.1 - IL_1807: ldloc.1 - IL_1808: ldloc.2 - IL_1809: sub - IL_180a: mul - IL_180b: stloc.1 - IL_180c: br.s IL_1814 - - IL_180e: ldloc.2 - IL_180f: ldloc.1 - IL_1810: ldloc.2 - IL_1811: sub - IL_1812: mul - IL_1813: stloc.2 - IL_1814: ldloc.1 - IL_1815: ldloc.2 - IL_1816: bne.un.s IL_1820 - - IL_1818: ldloc.1 - IL_1819: ldloc.1 - IL_181a: ldloc.2 - IL_181b: sub - IL_181c: mul - IL_181d: stloc.1 - IL_181e: br.s IL_1826 - - IL_1820: ldloc.2 - IL_1821: ldloc.1 - IL_1822: ldloc.2 - IL_1823: sub - IL_1824: sub - IL_1825: stloc.2 - IL_1826: ldloc.1 - IL_1827: ldloc.2 - IL_1828: beq.s IL_1832 - - IL_182a: ldloc.1 - IL_182b: ldloc.1 - IL_182c: ldloc.2 - IL_182d: add - IL_182e: add - IL_182f: stloc.1 - IL_1830: br.s IL_1838 - - IL_1832: ldloc.2 - IL_1833: ldloc.1 - IL_1834: ldloc.2 - IL_1835: add - IL_1836: sub - IL_1837: stloc.2 - IL_1838: ldloc.1 - IL_1839: ldloc.2 - IL_183a: bgt.s IL_1844 - - IL_183c: ldloc.1 - IL_183d: ldloc.1 - IL_183e: ldloc.2 - IL_183f: mul - IL_1840: sub - IL_1841: stloc.1 - IL_1842: br.s IL_184a - - IL_1844: ldloc.2 - IL_1845: ldloc.1 - IL_1846: ldloc.2 - IL_1847: mul - IL_1848: sub - IL_1849: stloc.2 - IL_184a: ldloc.1 - IL_184b: ldloc.2 - IL_184c: ble.s IL_1856 - - IL_184e: ldloc.1 - IL_184f: ldloc.1 - IL_1850: ldloc.2 - IL_1851: add - IL_1852: sub - IL_1853: stloc.1 - IL_1854: br.s IL_185c - - IL_1856: ldloc.2 - IL_1857: ldloc.1 - IL_1858: ldloc.2 - IL_1859: add - IL_185a: sub - IL_185b: stloc.2 - IL_185c: ldloc.1 - IL_185d: ldloc.2 - IL_185e: beq.s IL_1868 - - IL_1860: ldloc.1 - IL_1861: ldloc.1 - IL_1862: ldloc.2 - IL_1863: sub - IL_1864: sub - IL_1865: stloc.1 - IL_1866: br.s IL_186e - - IL_1868: ldloc.2 - IL_1869: ldloc.1 - IL_186a: ldloc.2 - IL_186b: sub - IL_186c: sub - IL_186d: stloc.2 - IL_186e: ldloc.1 - IL_186f: ldloc.2 - IL_1870: bge.s IL_187a - - IL_1872: ldloc.1 - IL_1873: ldloc.1 - IL_1874: ldloc.2 - IL_1875: mul - IL_1876: sub - IL_1877: stloc.1 - IL_1878: br.s IL_1880 - - IL_187a: ldloc.2 - IL_187b: ldloc.1 - IL_187c: ldloc.2 - IL_187d: mul - IL_187e: add - IL_187f: stloc.2 - IL_1880: ldloc.1 - IL_1881: ldloc.2 - IL_1882: bgt.s IL_188c - - IL_1884: ldloc.1 - IL_1885: ldloc.1 - IL_1886: ldloc.2 - IL_1887: mul - IL_1888: mul - IL_1889: stloc.1 - IL_188a: br.s IL_1892 - - IL_188c: ldloc.2 - IL_188d: ldloc.1 - IL_188e: ldloc.2 - IL_188f: mul - IL_1890: mul - IL_1891: stloc.2 - IL_1892: ldloc.1 - IL_1893: ldloc.2 - IL_1894: blt.s IL_189e - - IL_1896: ldloc.1 - IL_1897: ldloc.1 - IL_1898: ldloc.2 - IL_1899: mul - IL_189a: mul - IL_189b: stloc.1 - IL_189c: br.s IL_18a4 - - IL_189e: ldloc.2 - IL_189f: ldloc.1 - IL_18a0: ldloc.2 - IL_18a1: mul - IL_18a2: sub - IL_18a3: stloc.2 - IL_18a4: ldloc.1 - IL_18a5: ldloc.2 - IL_18a6: beq.s IL_18b0 - - IL_18a8: ldloc.1 - IL_18a9: ldloc.1 - IL_18aa: ldloc.2 - IL_18ab: mul - IL_18ac: mul - IL_18ad: stloc.1 - IL_18ae: br.s IL_18b6 - - IL_18b0: ldloc.2 - IL_18b1: ldloc.1 - IL_18b2: ldloc.2 - IL_18b3: mul - IL_18b4: sub - IL_18b5: stloc.2 - IL_18b6: ldloc.1 - IL_18b7: ldloc.2 - IL_18b8: blt.s IL_18c2 - - IL_18ba: ldloc.1 - IL_18bb: ldloc.1 - IL_18bc: ldloc.2 - IL_18bd: mul - IL_18be: add - IL_18bf: stloc.1 - IL_18c0: br.s IL_18c8 - - IL_18c2: ldloc.2 - IL_18c3: ldloc.1 - IL_18c4: ldloc.2 - IL_18c5: mul - IL_18c6: mul - IL_18c7: stloc.2 - IL_18c8: ldloc.1 - IL_18c9: ldloc.2 - IL_18ca: ble.s IL_18d4 - - IL_18cc: ldloc.1 - IL_18cd: ldloc.1 - IL_18ce: ldloc.2 - IL_18cf: sub - IL_18d0: sub - IL_18d1: stloc.1 - IL_18d2: br.s IL_18da - - IL_18d4: ldloc.2 - IL_18d5: ldloc.1 - IL_18d6: ldloc.2 - IL_18d7: sub - IL_18d8: sub - IL_18d9: stloc.2 - IL_18da: ldloc.1 - IL_18db: ldloc.2 - IL_18dc: ble.s IL_18e6 - - IL_18de: ldloc.1 - IL_18df: ldloc.1 - IL_18e0: ldloc.2 - IL_18e1: mul - IL_18e2: mul - IL_18e3: stloc.1 - IL_18e4: br.s IL_18ec - - IL_18e6: ldloc.2 - IL_18e7: ldloc.1 - IL_18e8: ldloc.2 - IL_18e9: mul - IL_18ea: add - IL_18eb: stloc.2 - IL_18ec: ldloc.1 - IL_18ed: ldloc.2 - IL_18ee: ble.s IL_18f8 - - IL_18f0: ldloc.1 - IL_18f1: ldloc.1 - IL_18f2: ldloc.2 - IL_18f3: add - IL_18f4: mul - IL_18f5: stloc.1 - IL_18f6: br.s IL_18fe - - IL_18f8: ldloc.2 - IL_18f9: ldloc.1 - IL_18fa: ldloc.2 - IL_18fb: add - IL_18fc: mul - IL_18fd: stloc.2 - IL_18fe: ldloc.1 - IL_18ff: ldloc.2 - IL_1900: ble.s IL_190a - - IL_1902: ldloc.1 - IL_1903: ldloc.1 - IL_1904: ldloc.2 - IL_1905: sub - IL_1906: sub - IL_1907: stloc.1 - IL_1908: br.s IL_1910 - - IL_190a: ldloc.2 - IL_190b: ldloc.1 - IL_190c: ldloc.2 - IL_190d: sub - IL_190e: sub - IL_190f: stloc.2 - IL_1910: ldloc.1 - IL_1911: ldloc.2 - IL_1912: blt.s IL_191c - - IL_1914: ldloc.1 - IL_1915: ldloc.1 - IL_1916: ldloc.2 - IL_1917: add - IL_1918: sub - IL_1919: stloc.1 - IL_191a: br.s IL_1922 - - IL_191c: ldloc.2 - IL_191d: ldloc.1 - IL_191e: ldloc.2 - IL_191f: add - IL_1920: mul - IL_1921: stloc.2 - IL_1922: ldloc.1 - IL_1923: ldloc.2 - IL_1924: blt.s IL_192e - - IL_1926: ldloc.1 - IL_1927: ldloc.1 - IL_1928: ldloc.2 - IL_1929: sub - IL_192a: mul - IL_192b: stloc.1 - IL_192c: br.s IL_1934 - - IL_192e: ldloc.2 - IL_192f: ldloc.1 - IL_1930: ldloc.2 - IL_1931: sub - IL_1932: mul - IL_1933: stloc.2 - IL_1934: ldloc.1 - IL_1935: ldloc.2 - IL_1936: beq.s IL_1940 - - IL_1938: ldloc.1 - IL_1939: ldloc.1 - IL_193a: ldloc.2 - IL_193b: add - IL_193c: mul - IL_193d: stloc.1 - IL_193e: br.s IL_1946 - - IL_1940: ldloc.2 - IL_1941: ldloc.1 - IL_1942: ldloc.2 - IL_1943: add - IL_1944: add - IL_1945: stloc.2 - IL_1946: ldloc.1 - IL_1947: ldloc.2 - IL_1948: ble.s IL_1952 - - IL_194a: ldloc.1 - IL_194b: ldloc.1 - IL_194c: ldloc.2 - IL_194d: sub - IL_194e: mul - IL_194f: stloc.1 - IL_1950: br.s IL_1958 - - IL_1952: ldloc.2 - IL_1953: ldloc.1 - IL_1954: ldloc.2 - IL_1955: sub - IL_1956: sub - IL_1957: stloc.2 - IL_1958: ldloc.1 - IL_1959: ldloc.2 - IL_195a: bne.un.s IL_1964 - - IL_195c: ldloc.1 - IL_195d: ldloc.1 - IL_195e: ldloc.2 - IL_195f: mul - IL_1960: mul - IL_1961: stloc.1 - IL_1962: br.s IL_196a - - IL_1964: ldloc.2 - IL_1965: ldloc.1 - IL_1966: ldloc.2 - IL_1967: mul - IL_1968: sub - IL_1969: stloc.2 - IL_196a: ldloc.1 - IL_196b: ldloc.2 - IL_196c: beq.s IL_1976 - - IL_196e: ldloc.1 - IL_196f: ldloc.1 - IL_1970: ldloc.2 - IL_1971: sub - IL_1972: mul - IL_1973: stloc.1 - IL_1974: br.s IL_197c - - IL_1976: ldloc.2 - IL_1977: ldloc.1 - IL_1978: ldloc.2 - IL_1979: sub - IL_197a: sub - IL_197b: stloc.2 - IL_197c: ldloc.1 - IL_197d: ldloc.2 - IL_197e: bgt.s IL_1988 - - IL_1980: ldloc.1 - IL_1981: ldloc.1 - IL_1982: ldloc.2 - IL_1983: mul - IL_1984: add - IL_1985: stloc.1 - IL_1986: br.s IL_198e - - IL_1988: ldloc.2 - IL_1989: ldloc.1 - IL_198a: ldloc.2 - IL_198b: mul - IL_198c: mul - IL_198d: stloc.2 - IL_198e: ldloc.1 - IL_198f: ldloc.2 - IL_1990: ble.s IL_199a - - IL_1992: ldloc.1 - IL_1993: ldloc.1 - IL_1994: ldloc.2 - IL_1995: sub - IL_1996: add - IL_1997: stloc.1 - IL_1998: br.s IL_19a0 - - IL_199a: ldloc.2 - IL_199b: ldloc.1 - IL_199c: ldloc.2 - IL_199d: sub - IL_199e: mul - IL_199f: stloc.2 - IL_19a0: ldloc.1 - IL_19a1: ldloc.2 - IL_19a2: blt.s IL_19ac - - IL_19a4: ldloc.1 - IL_19a5: ldloc.1 - IL_19a6: ldloc.2 - IL_19a7: mul - IL_19a8: add - IL_19a9: stloc.1 - IL_19aa: br.s IL_19b2 - - IL_19ac: ldloc.2 - IL_19ad: ldloc.1 - IL_19ae: ldloc.2 - IL_19af: mul - IL_19b0: sub - IL_19b1: stloc.2 - IL_19b2: ldloc.1 - IL_19b3: ldloc.2 - IL_19b4: blt.s IL_19be - - IL_19b6: ldloc.1 - IL_19b7: ldloc.1 - IL_19b8: ldloc.2 - IL_19b9: add - IL_19ba: mul - IL_19bb: stloc.1 - IL_19bc: br.s IL_19c4 - - IL_19be: ldloc.2 - IL_19bf: ldloc.1 - IL_19c0: ldloc.2 - IL_19c1: add - IL_19c2: sub - IL_19c3: stloc.2 - IL_19c4: ldloc.1 - IL_19c5: ldloc.2 - IL_19c6: bne.un.s IL_19d0 - - IL_19c8: ldloc.1 - IL_19c9: ldloc.1 - IL_19ca: ldloc.2 - IL_19cb: add - IL_19cc: mul - IL_19cd: stloc.1 - IL_19ce: br.s IL_19d6 - - IL_19d0: ldloc.2 - IL_19d1: ldloc.1 - IL_19d2: ldloc.2 - IL_19d3: add - IL_19d4: sub - IL_19d5: stloc.2 - IL_19d6: ldloc.1 - IL_19d7: ldloc.2 - IL_19d8: beq.s IL_19e2 - - IL_19da: ldloc.1 - IL_19db: ldloc.1 - IL_19dc: ldloc.2 - IL_19dd: add - IL_19de: mul - IL_19df: stloc.1 - IL_19e0: br.s IL_19e8 - - IL_19e2: ldloc.2 - IL_19e3: ldloc.1 - IL_19e4: ldloc.2 - IL_19e5: add - IL_19e6: mul - IL_19e7: stloc.2 - IL_19e8: ldloc.1 - IL_19e9: ldloc.2 - IL_19ea: ble.s IL_19f4 - - IL_19ec: ldloc.1 - IL_19ed: ldloc.1 - IL_19ee: ldloc.2 - IL_19ef: add - IL_19f0: add - IL_19f1: stloc.1 - IL_19f2: br.s IL_19fa - - IL_19f4: ldloc.2 - IL_19f5: ldloc.1 - IL_19f6: ldloc.2 - IL_19f7: add - IL_19f8: sub - IL_19f9: stloc.2 - IL_19fa: ldloc.1 - IL_19fb: ldloc.2 - IL_19fc: ble.s IL_1a06 - - IL_19fe: ldloc.1 - IL_19ff: ldloc.1 - IL_1a00: ldloc.2 - IL_1a01: sub - IL_1a02: mul - IL_1a03: stloc.1 - IL_1a04: br.s IL_1a0c - - IL_1a06: ldloc.2 - IL_1a07: ldloc.1 - IL_1a08: ldloc.2 - IL_1a09: sub - IL_1a0a: sub - IL_1a0b: stloc.2 - IL_1a0c: ldloc.1 - IL_1a0d: ldloc.2 - IL_1a0e: beq.s IL_1a18 - - IL_1a10: ldloc.1 - IL_1a11: ldloc.1 - IL_1a12: ldloc.2 - IL_1a13: sub - IL_1a14: add - IL_1a15: stloc.1 - IL_1a16: br.s IL_1a1e - - IL_1a18: ldloc.2 - IL_1a19: ldloc.1 - IL_1a1a: ldloc.2 - IL_1a1b: sub - IL_1a1c: sub - IL_1a1d: stloc.2 - IL_1a1e: ldloc.1 - IL_1a1f: ldloc.2 - IL_1a20: bge.s IL_1a2a - - IL_1a22: ldloc.1 - IL_1a23: ldloc.1 - IL_1a24: ldloc.2 - IL_1a25: sub - IL_1a26: add - IL_1a27: stloc.1 - IL_1a28: br.s IL_1a30 - - IL_1a2a: ldloc.2 - IL_1a2b: ldloc.1 - IL_1a2c: ldloc.2 - IL_1a2d: sub - IL_1a2e: sub - IL_1a2f: stloc.2 - IL_1a30: ldloc.1 - IL_1a31: ldloc.2 - IL_1a32: ble.s IL_1a3c - - IL_1a34: ldloc.1 - IL_1a35: ldloc.1 - IL_1a36: ldloc.2 - IL_1a37: mul - IL_1a38: sub - IL_1a39: stloc.1 - IL_1a3a: br.s IL_1a42 - - IL_1a3c: ldloc.2 - IL_1a3d: ldloc.1 - IL_1a3e: ldloc.2 - IL_1a3f: mul - IL_1a40: mul - IL_1a41: stloc.2 - IL_1a42: ldloc.1 - IL_1a43: ldloc.2 - IL_1a44: blt.s IL_1a4e - - IL_1a46: ldloc.1 - IL_1a47: ldloc.1 - IL_1a48: ldloc.2 - IL_1a49: mul - IL_1a4a: mul - IL_1a4b: stloc.1 - IL_1a4c: br.s IL_1a54 - - IL_1a4e: ldloc.2 - IL_1a4f: ldloc.1 - IL_1a50: ldloc.2 - IL_1a51: mul - IL_1a52: add - IL_1a53: stloc.2 - IL_1a54: ldloc.1 - IL_1a55: ldloc.2 - IL_1a56: bgt.s IL_1a60 - - IL_1a58: ldloc.1 - IL_1a59: ldloc.1 - IL_1a5a: ldloc.2 - IL_1a5b: mul - IL_1a5c: add - IL_1a5d: stloc.1 - IL_1a5e: br.s IL_1a66 - - IL_1a60: ldloc.2 - IL_1a61: ldloc.1 - IL_1a62: ldloc.2 - IL_1a63: mul - IL_1a64: mul - IL_1a65: stloc.2 - IL_1a66: ldloc.1 - IL_1a67: ldloc.2 - IL_1a68: bge.s IL_1a72 - - IL_1a6a: ldloc.1 - IL_1a6b: ldloc.1 - IL_1a6c: ldloc.2 - IL_1a6d: mul - IL_1a6e: sub - IL_1a6f: stloc.1 - IL_1a70: br.s IL_1a78 - - IL_1a72: ldloc.2 - IL_1a73: ldloc.1 - IL_1a74: ldloc.2 - IL_1a75: mul - IL_1a76: sub - IL_1a77: stloc.2 - IL_1a78: ldloc.1 - IL_1a79: ldloc.2 - IL_1a7a: bge.s IL_1a84 - - IL_1a7c: ldloc.1 - IL_1a7d: ldloc.1 - IL_1a7e: ldloc.2 - IL_1a7f: mul - IL_1a80: sub - IL_1a81: stloc.1 - IL_1a82: br.s IL_1a8a - - IL_1a84: ldloc.2 - IL_1a85: ldloc.1 - IL_1a86: ldloc.2 - IL_1a87: mul - IL_1a88: sub - IL_1a89: stloc.2 - IL_1a8a: ldloc.1 - IL_1a8b: ldloc.2 - IL_1a8c: beq.s IL_1a96 - - IL_1a8e: ldloc.1 - IL_1a8f: ldloc.1 - IL_1a90: ldloc.2 - IL_1a91: sub - IL_1a92: sub - IL_1a93: stloc.1 - IL_1a94: br.s IL_1a9c - - IL_1a96: ldloc.2 - IL_1a97: ldloc.1 - IL_1a98: ldloc.2 - IL_1a99: sub - IL_1a9a: sub - IL_1a9b: stloc.2 - IL_1a9c: ldloc.1 - IL_1a9d: ldloc.2 - IL_1a9e: bgt.s IL_1aa8 - - IL_1aa0: ldloc.1 - IL_1aa1: ldloc.1 - IL_1aa2: ldloc.2 - IL_1aa3: add - IL_1aa4: mul - IL_1aa5: stloc.1 - IL_1aa6: br.s IL_1aae - - IL_1aa8: ldloc.2 - IL_1aa9: ldloc.1 - IL_1aaa: ldloc.2 - IL_1aab: add - IL_1aac: mul - IL_1aad: stloc.2 - IL_1aae: ldloc.1 - IL_1aaf: ldloc.2 - IL_1ab0: ble.s IL_1aba - - IL_1ab2: ldloc.1 - IL_1ab3: ldloc.1 - IL_1ab4: ldloc.2 - IL_1ab5: mul - IL_1ab6: add - IL_1ab7: stloc.1 - IL_1ab8: br.s IL_1ac0 - - IL_1aba: ldloc.2 - IL_1abb: ldloc.1 - IL_1abc: ldloc.2 - IL_1abd: mul - IL_1abe: add - IL_1abf: stloc.2 - IL_1ac0: ldloc.1 - IL_1ac1: ldloc.2 - IL_1ac2: blt.s IL_1acc - - IL_1ac4: ldloc.1 - IL_1ac5: ldloc.1 - IL_1ac6: ldloc.2 - IL_1ac7: sub - IL_1ac8: mul - IL_1ac9: stloc.1 - IL_1aca: br.s IL_1ad2 - - IL_1acc: ldloc.2 - IL_1acd: ldloc.1 - IL_1ace: ldloc.2 - IL_1acf: sub - IL_1ad0: add - IL_1ad1: stloc.2 - IL_1ad2: ldloc.1 - IL_1ad3: ldloc.2 - IL_1ad4: beq.s IL_1ade - - IL_1ad6: ldloc.1 - IL_1ad7: ldloc.1 - IL_1ad8: ldloc.2 - IL_1ad9: add - IL_1ada: mul - IL_1adb: stloc.1 - IL_1adc: br.s IL_1ae4 - - IL_1ade: ldloc.2 - IL_1adf: ldloc.1 - IL_1ae0: ldloc.2 - IL_1ae1: add - IL_1ae2: mul - IL_1ae3: stloc.2 - IL_1ae4: ldloc.1 - IL_1ae5: ldloc.2 - IL_1ae6: beq.s IL_1af0 - - IL_1ae8: ldloc.1 - IL_1ae9: ldloc.1 - IL_1aea: ldloc.2 - IL_1aeb: mul - IL_1aec: sub - IL_1aed: stloc.1 - IL_1aee: br.s IL_1af6 - - IL_1af0: ldloc.2 - IL_1af1: ldloc.1 - IL_1af2: ldloc.2 - IL_1af3: mul - IL_1af4: sub - IL_1af5: stloc.2 - IL_1af6: ldloc.1 - IL_1af7: ldloc.2 - IL_1af8: beq.s IL_1b02 - - IL_1afa: ldloc.1 - IL_1afb: ldloc.1 - IL_1afc: ldloc.2 - IL_1afd: sub - IL_1afe: sub - IL_1aff: stloc.1 - IL_1b00: br.s IL_1b08 - - IL_1b02: ldloc.2 - IL_1b03: ldloc.1 - IL_1b04: ldloc.2 - IL_1b05: sub - IL_1b06: sub - IL_1b07: stloc.2 - IL_1b08: ldloc.1 - IL_1b09: ldloc.2 - IL_1b0a: bne.un.s IL_1b14 - - IL_1b0c: ldloc.1 - IL_1b0d: ldloc.1 - IL_1b0e: ldloc.2 - IL_1b0f: mul - IL_1b10: mul - IL_1b11: stloc.1 - IL_1b12: br.s IL_1b1a - - IL_1b14: ldloc.2 - IL_1b15: ldloc.1 - IL_1b16: ldloc.2 - IL_1b17: mul - IL_1b18: add - IL_1b19: stloc.2 - IL_1b1a: ldloc.1 - IL_1b1b: ldloc.2 - IL_1b1c: blt.s IL_1b26 - - IL_1b1e: ldloc.1 - IL_1b1f: ldloc.1 - IL_1b20: ldloc.2 - IL_1b21: sub - IL_1b22: sub - IL_1b23: stloc.1 - IL_1b24: br.s IL_1b2c - - IL_1b26: ldloc.2 - IL_1b27: ldloc.1 - IL_1b28: ldloc.2 - IL_1b29: sub - IL_1b2a: mul - IL_1b2b: stloc.2 - IL_1b2c: ldloc.1 - IL_1b2d: ldloc.2 - IL_1b2e: bge.s IL_1b38 - - IL_1b30: ldloc.1 - IL_1b31: ldloc.1 - IL_1b32: ldloc.2 - IL_1b33: sub - IL_1b34: add - IL_1b35: stloc.1 - IL_1b36: br.s IL_1b3e - - IL_1b38: ldloc.2 - IL_1b39: ldloc.1 - IL_1b3a: ldloc.2 - IL_1b3b: sub - IL_1b3c: sub - IL_1b3d: stloc.2 - IL_1b3e: ldloc.1 - IL_1b3f: ldloc.2 - IL_1b40: ble.s IL_1b4a - - IL_1b42: ldloc.1 - IL_1b43: ldloc.1 - IL_1b44: ldloc.2 - IL_1b45: sub - IL_1b46: add - IL_1b47: stloc.1 - IL_1b48: br.s IL_1b50 - - IL_1b4a: ldloc.2 - IL_1b4b: ldloc.1 - IL_1b4c: ldloc.2 - IL_1b4d: sub - IL_1b4e: mul - IL_1b4f: stloc.2 - IL_1b50: ldloc.1 - IL_1b51: ldloc.2 - IL_1b52: ble.s IL_1b5c - - IL_1b54: ldloc.1 - IL_1b55: ldloc.1 - IL_1b56: ldloc.2 - IL_1b57: add - IL_1b58: add - IL_1b59: stloc.1 - IL_1b5a: br.s IL_1b62 - - IL_1b5c: ldloc.2 - IL_1b5d: ldloc.1 - IL_1b5e: ldloc.2 - IL_1b5f: add - IL_1b60: sub - IL_1b61: stloc.2 - IL_1b62: ldloc.1 - IL_1b63: ldloc.2 - IL_1b64: bge.s IL_1b6e - - IL_1b66: ldloc.1 - IL_1b67: ldloc.1 - IL_1b68: ldloc.2 - IL_1b69: sub - IL_1b6a: add - IL_1b6b: stloc.1 - IL_1b6c: br.s IL_1b74 - - IL_1b6e: ldloc.2 - IL_1b6f: ldloc.1 - IL_1b70: ldloc.2 - IL_1b71: sub - IL_1b72: mul - IL_1b73: stloc.2 - IL_1b74: ldloc.1 - IL_1b75: ldloc.2 - IL_1b76: bgt.s IL_1b80 - - IL_1b78: ldloc.1 - IL_1b79: ldloc.1 - IL_1b7a: ldloc.2 - IL_1b7b: sub - IL_1b7c: sub - IL_1b7d: stloc.1 - IL_1b7e: br.s IL_1b86 - - IL_1b80: ldloc.2 - IL_1b81: ldloc.1 - IL_1b82: ldloc.2 - IL_1b83: sub - IL_1b84: mul - IL_1b85: stloc.2 - IL_1b86: ldloc.1 - IL_1b87: ldloc.2 - IL_1b88: beq.s IL_1b92 - - IL_1b8a: ldloc.1 - IL_1b8b: ldloc.1 - IL_1b8c: ldloc.2 - IL_1b8d: add - IL_1b8e: sub - IL_1b8f: stloc.1 - IL_1b90: br.s IL_1b98 - - IL_1b92: ldloc.2 - IL_1b93: ldloc.1 - IL_1b94: ldloc.2 - IL_1b95: add - IL_1b96: mul - IL_1b97: stloc.2 - IL_1b98: ldloc.1 - IL_1b99: ldloc.2 - IL_1b9a: bge.s IL_1ba4 - - IL_1b9c: ldloc.1 - IL_1b9d: ldloc.1 - IL_1b9e: ldloc.2 - IL_1b9f: add - IL_1ba0: add - IL_1ba1: stloc.1 - IL_1ba2: br.s IL_1baa - - IL_1ba4: ldloc.2 - IL_1ba5: ldloc.1 - IL_1ba6: ldloc.2 - IL_1ba7: add - IL_1ba8: sub - IL_1ba9: stloc.2 - IL_1baa: ldloc.1 - IL_1bab: ldloc.2 - IL_1bac: beq.s IL_1bb6 - - IL_1bae: ldloc.1 - IL_1baf: ldloc.1 - IL_1bb0: ldloc.2 - IL_1bb1: mul - IL_1bb2: sub - IL_1bb3: stloc.1 - IL_1bb4: br.s IL_1bbc - - IL_1bb6: ldloc.2 - IL_1bb7: ldloc.1 - IL_1bb8: ldloc.2 - IL_1bb9: mul - IL_1bba: add - IL_1bbb: stloc.2 - IL_1bbc: ldloc.1 - IL_1bbd: ldloc.2 - IL_1bbe: bge.s IL_1bc8 - - IL_1bc0: ldloc.1 - IL_1bc1: ldloc.1 - IL_1bc2: ldloc.2 - IL_1bc3: sub - IL_1bc4: sub - IL_1bc5: stloc.1 - IL_1bc6: br.s IL_1bce - - IL_1bc8: ldloc.2 - IL_1bc9: ldloc.1 - IL_1bca: ldloc.2 - IL_1bcb: sub - IL_1bcc: add - IL_1bcd: stloc.2 - IL_1bce: ldloc.1 - IL_1bcf: ldloc.2 - IL_1bd0: blt.s IL_1bda - - IL_1bd2: ldloc.1 - IL_1bd3: ldloc.1 - IL_1bd4: ldloc.2 - IL_1bd5: mul - IL_1bd6: add - IL_1bd7: stloc.1 - IL_1bd8: br.s IL_1be0 - - IL_1bda: ldloc.2 - IL_1bdb: ldloc.1 - IL_1bdc: ldloc.2 - IL_1bdd: mul - IL_1bde: add - IL_1bdf: stloc.2 - IL_1be0: ldloc.1 - IL_1be1: ldloc.2 - IL_1be2: bgt.s IL_1bec - - IL_1be4: ldloc.1 - IL_1be5: ldloc.1 - IL_1be6: ldloc.2 - IL_1be7: sub - IL_1be8: add - IL_1be9: stloc.1 - IL_1bea: br.s IL_1bf2 - - IL_1bec: ldloc.2 - IL_1bed: ldloc.1 - IL_1bee: ldloc.2 - IL_1bef: sub - IL_1bf0: mul - IL_1bf1: stloc.2 - IL_1bf2: ldloc.1 - IL_1bf3: ldloc.2 - IL_1bf4: ble.s IL_1bfe - - IL_1bf6: ldloc.1 - IL_1bf7: ldloc.1 - IL_1bf8: ldloc.2 - IL_1bf9: sub - IL_1bfa: add - IL_1bfb: stloc.1 - IL_1bfc: br.s IL_1c04 - - IL_1bfe: ldloc.2 - IL_1bff: ldloc.1 - IL_1c00: ldloc.2 - IL_1c01: sub - IL_1c02: sub - IL_1c03: stloc.2 - IL_1c04: ldloc.1 - IL_1c05: ldloc.2 - IL_1c06: beq.s IL_1c10 - - IL_1c08: ldloc.1 - IL_1c09: ldloc.1 - IL_1c0a: ldloc.2 - IL_1c0b: add - IL_1c0c: sub - IL_1c0d: stloc.1 - IL_1c0e: br.s IL_1c16 - - IL_1c10: ldloc.2 - IL_1c11: ldloc.1 - IL_1c12: ldloc.2 - IL_1c13: add - IL_1c14: add - IL_1c15: stloc.2 - IL_1c16: ldloc.1 - IL_1c17: ldloc.2 - IL_1c18: bgt.s IL_1c22 - - IL_1c1a: ldloc.1 - IL_1c1b: ldloc.1 - IL_1c1c: ldloc.2 - IL_1c1d: mul - IL_1c1e: sub - IL_1c1f: stloc.1 - IL_1c20: br.s IL_1c28 - - IL_1c22: ldloc.2 - IL_1c23: ldloc.1 - IL_1c24: ldloc.2 - IL_1c25: mul - IL_1c26: sub - IL_1c27: stloc.2 - IL_1c28: ldloc.1 - IL_1c29: ldloc.2 - IL_1c2a: blt.s IL_1c34 - - IL_1c2c: ldloc.1 - IL_1c2d: ldloc.1 - IL_1c2e: ldloc.2 - IL_1c2f: mul - IL_1c30: sub - IL_1c31: stloc.1 - IL_1c32: br.s IL_1c3a - - IL_1c34: ldloc.2 - IL_1c35: ldloc.1 - IL_1c36: ldloc.2 - IL_1c37: mul - IL_1c38: add - IL_1c39: stloc.2 - IL_1c3a: ldloc.1 - IL_1c3b: ldloc.2 - IL_1c3c: bgt.s IL_1c46 - - IL_1c3e: ldloc.1 - IL_1c3f: ldloc.1 - IL_1c40: ldloc.2 - IL_1c41: mul - IL_1c42: sub - IL_1c43: stloc.1 - IL_1c44: br.s IL_1c4c - - IL_1c46: ldloc.2 - IL_1c47: ldloc.1 - IL_1c48: ldloc.2 - IL_1c49: mul - IL_1c4a: sub - IL_1c4b: stloc.2 - IL_1c4c: ldloc.1 - IL_1c4d: ldloc.2 - IL_1c4e: beq.s IL_1c58 - - IL_1c50: ldloc.1 - IL_1c51: ldloc.1 - IL_1c52: ldloc.2 - IL_1c53: sub - IL_1c54: sub - IL_1c55: stloc.1 - IL_1c56: br.s IL_1c5e - - IL_1c58: ldloc.2 - IL_1c59: ldloc.1 - IL_1c5a: ldloc.2 - IL_1c5b: sub - IL_1c5c: add - IL_1c5d: stloc.2 - IL_1c5e: ldloc.1 - IL_1c5f: ldloc.2 - IL_1c60: bge.s IL_1c6a - - IL_1c62: ldloc.1 - IL_1c63: ldloc.1 - IL_1c64: ldloc.2 - IL_1c65: sub - IL_1c66: add - IL_1c67: stloc.1 - IL_1c68: br.s IL_1c70 - - IL_1c6a: ldloc.2 - IL_1c6b: ldloc.1 - IL_1c6c: ldloc.2 - IL_1c6d: sub - IL_1c6e: add - IL_1c6f: stloc.2 - IL_1c70: ldloc.1 - IL_1c71: ldloc.2 - IL_1c72: bge.s IL_1c7c - - IL_1c74: ldloc.1 - IL_1c75: ldloc.1 - IL_1c76: ldloc.2 - IL_1c77: mul - IL_1c78: add - IL_1c79: stloc.1 - IL_1c7a: br.s IL_1c82 - - IL_1c7c: ldloc.2 - IL_1c7d: ldloc.1 - IL_1c7e: ldloc.2 - IL_1c7f: mul - IL_1c80: mul - IL_1c81: stloc.2 - IL_1c82: ldloc.1 - IL_1c83: ldloc.2 - IL_1c84: bne.un.s IL_1c8e - - IL_1c86: ldloc.1 - IL_1c87: ldloc.1 - IL_1c88: ldloc.2 - IL_1c89: add - IL_1c8a: add - IL_1c8b: stloc.1 - IL_1c8c: br.s IL_1c94 - - IL_1c8e: ldloc.2 - IL_1c8f: ldloc.1 - IL_1c90: ldloc.2 - IL_1c91: add - IL_1c92: mul - IL_1c93: stloc.2 - IL_1c94: ldloc.1 - IL_1c95: ldloc.2 - IL_1c96: bne.un.s IL_1ca0 - - IL_1c98: ldloc.1 - IL_1c99: ldloc.1 - IL_1c9a: ldloc.2 - IL_1c9b: sub - IL_1c9c: add - IL_1c9d: stloc.1 - IL_1c9e: br.s IL_1ca6 - - IL_1ca0: ldloc.2 - IL_1ca1: ldloc.1 - IL_1ca2: ldloc.2 - IL_1ca3: sub - IL_1ca4: add - IL_1ca5: stloc.2 - IL_1ca6: ldloc.1 - IL_1ca7: ldloc.2 - IL_1ca8: bge.s IL_1cb2 - - IL_1caa: ldloc.1 - IL_1cab: ldloc.1 - IL_1cac: ldloc.2 - IL_1cad: mul - IL_1cae: add - IL_1caf: stloc.1 - IL_1cb0: br.s IL_1cb8 - - IL_1cb2: ldloc.2 - IL_1cb3: ldloc.1 - IL_1cb4: ldloc.2 - IL_1cb5: mul - IL_1cb6: add - IL_1cb7: stloc.2 - IL_1cb8: ldloc.1 - IL_1cb9: ldloc.2 - IL_1cba: beq.s IL_1cc4 - - IL_1cbc: ldloc.1 - IL_1cbd: ldloc.1 - IL_1cbe: ldloc.2 - IL_1cbf: add - IL_1cc0: add - IL_1cc1: stloc.1 - IL_1cc2: br.s IL_1cca - - IL_1cc4: ldloc.2 - IL_1cc5: ldloc.1 - IL_1cc6: ldloc.2 - IL_1cc7: add - IL_1cc8: add - IL_1cc9: stloc.2 - IL_1cca: ldloc.1 - IL_1ccb: ldloc.2 - IL_1ccc: beq.s IL_1cd6 - - IL_1cce: ldloc.1 - IL_1ccf: ldloc.1 - IL_1cd0: ldloc.2 - IL_1cd1: add - IL_1cd2: add - IL_1cd3: stloc.1 - IL_1cd4: br.s IL_1cdc - - IL_1cd6: ldloc.2 - IL_1cd7: ldloc.1 - IL_1cd8: ldloc.2 - IL_1cd9: add - IL_1cda: sub - IL_1cdb: stloc.2 - IL_1cdc: ldloc.1 - IL_1cdd: ldloc.2 - IL_1cde: bgt.s IL_1ce8 - - IL_1ce0: ldloc.1 - IL_1ce1: ldloc.1 - IL_1ce2: ldloc.2 - IL_1ce3: sub - IL_1ce4: mul - IL_1ce5: stloc.1 - IL_1ce6: br.s IL_1cee - - IL_1ce8: ldloc.2 - IL_1ce9: ldloc.1 - IL_1cea: ldloc.2 - IL_1ceb: sub - IL_1cec: mul - IL_1ced: stloc.2 - IL_1cee: ldloc.1 - IL_1cef: ldloc.2 - IL_1cf0: ble.s IL_1cfa - - IL_1cf2: ldloc.1 - IL_1cf3: ldloc.1 - IL_1cf4: ldloc.2 - IL_1cf5: mul - IL_1cf6: mul - IL_1cf7: stloc.1 - IL_1cf8: br.s IL_1d00 - - IL_1cfa: ldloc.2 - IL_1cfb: ldloc.1 - IL_1cfc: ldloc.2 - IL_1cfd: mul - IL_1cfe: add - IL_1cff: stloc.2 - IL_1d00: ldloc.1 - IL_1d01: ldloc.2 - IL_1d02: blt.s IL_1d0c - - IL_1d04: ldloc.1 - IL_1d05: ldloc.1 - IL_1d06: ldloc.2 - IL_1d07: sub - IL_1d08: sub - IL_1d09: stloc.1 - IL_1d0a: br.s IL_1d12 - - IL_1d0c: ldloc.2 - IL_1d0d: ldloc.1 - IL_1d0e: ldloc.2 - IL_1d0f: sub - IL_1d10: mul - IL_1d11: stloc.2 - IL_1d12: ldloc.1 - IL_1d13: ldloc.2 - IL_1d14: bgt.s IL_1d1e - - IL_1d16: ldloc.1 - IL_1d17: ldloc.1 - IL_1d18: ldloc.2 - IL_1d19: add - IL_1d1a: mul - IL_1d1b: stloc.1 - IL_1d1c: br.s IL_1d24 - - IL_1d1e: ldloc.2 - IL_1d1f: ldloc.1 - IL_1d20: ldloc.2 - IL_1d21: add - IL_1d22: mul - IL_1d23: stloc.2 - IL_1d24: ldloc.1 - IL_1d25: ldloc.2 - IL_1d26: blt.s IL_1d30 - - IL_1d28: ldloc.1 - IL_1d29: ldloc.1 - IL_1d2a: ldloc.2 - IL_1d2b: sub - IL_1d2c: add - IL_1d2d: stloc.1 - IL_1d2e: br.s IL_1d36 - - IL_1d30: ldloc.2 - IL_1d31: ldloc.1 - IL_1d32: ldloc.2 - IL_1d33: sub - IL_1d34: add - IL_1d35: stloc.2 - IL_1d36: ldloc.1 - IL_1d37: ldloc.2 - IL_1d38: bge.s IL_1d42 - - IL_1d3a: ldloc.1 - IL_1d3b: ldloc.1 - IL_1d3c: ldloc.2 - IL_1d3d: mul - IL_1d3e: add - IL_1d3f: stloc.1 - IL_1d40: br.s IL_1d48 - - IL_1d42: ldloc.2 - IL_1d43: ldloc.1 - IL_1d44: ldloc.2 - IL_1d45: mul - IL_1d46: sub - IL_1d47: stloc.2 - IL_1d48: ldloc.1 - IL_1d49: ldloc.2 - IL_1d4a: bge.s IL_1d54 - - IL_1d4c: ldloc.1 - IL_1d4d: ldloc.1 - IL_1d4e: ldloc.2 - IL_1d4f: mul - IL_1d50: add - IL_1d51: stloc.1 - IL_1d52: br.s IL_1d5a - - IL_1d54: ldloc.2 - IL_1d55: ldloc.1 - IL_1d56: ldloc.2 - IL_1d57: mul - IL_1d58: sub - IL_1d59: stloc.2 - IL_1d5a: ldloc.1 - IL_1d5b: ldloc.2 - IL_1d5c: beq.s IL_1d66 - - IL_1d5e: ldloc.1 - IL_1d5f: ldloc.1 - IL_1d60: ldloc.2 - IL_1d61: mul - IL_1d62: add - IL_1d63: stloc.1 - IL_1d64: br.s IL_1d6c - - IL_1d66: ldloc.2 - IL_1d67: ldloc.1 - IL_1d68: ldloc.2 - IL_1d69: mul - IL_1d6a: sub - IL_1d6b: stloc.2 - IL_1d6c: ldloc.1 - IL_1d6d: ldloc.2 - IL_1d6e: bne.un.s IL_1d78 - - IL_1d70: ldloc.1 - IL_1d71: ldloc.1 - IL_1d72: ldloc.2 - IL_1d73: mul - IL_1d74: mul - IL_1d75: stloc.1 - IL_1d76: br.s IL_1d7e - - IL_1d78: ldloc.2 - IL_1d79: ldloc.1 - IL_1d7a: ldloc.2 - IL_1d7b: mul - IL_1d7c: add - IL_1d7d: stloc.2 - IL_1d7e: ldloc.1 - IL_1d7f: ldloc.2 - IL_1d80: bgt.s IL_1d8a - - IL_1d82: ldloc.1 - IL_1d83: ldloc.1 - IL_1d84: ldloc.2 - IL_1d85: add - IL_1d86: sub - IL_1d87: stloc.1 - IL_1d88: br.s IL_1d90 - - IL_1d8a: ldloc.2 - IL_1d8b: ldloc.1 - IL_1d8c: ldloc.2 - IL_1d8d: add - IL_1d8e: add - IL_1d8f: stloc.2 - IL_1d90: ldloc.1 - IL_1d91: ldloc.2 - IL_1d92: bne.un.s IL_1d9c - - IL_1d94: ldloc.1 - IL_1d95: ldloc.1 - IL_1d96: ldloc.2 - IL_1d97: sub - IL_1d98: sub - IL_1d99: stloc.1 - IL_1d9a: br.s IL_1da2 - - IL_1d9c: ldloc.2 - IL_1d9d: ldloc.1 - IL_1d9e: ldloc.2 - IL_1d9f: sub - IL_1da0: mul - IL_1da1: stloc.2 - IL_1da2: ldloc.1 - IL_1da3: ldloc.2 - IL_1da4: blt.s IL_1dae - - IL_1da6: ldloc.1 - IL_1da7: ldloc.1 - IL_1da8: ldloc.2 - IL_1da9: add - IL_1daa: mul - IL_1dab: stloc.1 - IL_1dac: br.s IL_1db4 - - IL_1dae: ldloc.2 - IL_1daf: ldloc.1 - IL_1db0: ldloc.2 - IL_1db1: add - IL_1db2: add - IL_1db3: stloc.2 - IL_1db4: ldloc.1 - IL_1db5: ldloc.2 - IL_1db6: bge.s IL_1dc0 - - IL_1db8: ldloc.1 - IL_1db9: ldloc.1 - IL_1dba: ldloc.2 - IL_1dbb: mul - IL_1dbc: mul - IL_1dbd: stloc.1 - IL_1dbe: br.s IL_1dc6 - - IL_1dc0: ldloc.2 - IL_1dc1: ldloc.1 - IL_1dc2: ldloc.2 - IL_1dc3: mul - IL_1dc4: mul - IL_1dc5: stloc.2 - IL_1dc6: ldloc.1 - IL_1dc7: ldloc.2 - IL_1dc8: bge.s IL_1dd2 - - IL_1dca: ldloc.1 - IL_1dcb: ldloc.1 - IL_1dcc: ldloc.2 - IL_1dcd: sub - IL_1dce: mul - IL_1dcf: stloc.1 - IL_1dd0: br.s IL_1dd8 - - IL_1dd2: ldloc.2 - IL_1dd3: ldloc.1 - IL_1dd4: ldloc.2 - IL_1dd5: sub - IL_1dd6: mul - IL_1dd7: stloc.2 - IL_1dd8: ldloc.1 - IL_1dd9: ldloc.2 - IL_1dda: blt.s IL_1de4 - - IL_1ddc: ldloc.1 - IL_1ddd: ldloc.1 - IL_1dde: ldloc.2 - IL_1ddf: mul - IL_1de0: mul - IL_1de1: stloc.1 - IL_1de2: br.s IL_1dea - - IL_1de4: ldloc.2 - IL_1de5: ldloc.1 - IL_1de6: ldloc.2 - IL_1de7: mul - IL_1de8: add - IL_1de9: stloc.2 - IL_1dea: ldloc.1 - IL_1deb: ldloc.2 - IL_1dec: ble.s IL_1df6 - - IL_1dee: ldloc.1 - IL_1def: ldloc.1 - IL_1df0: ldloc.2 - IL_1df1: sub - IL_1df2: sub - IL_1df3: stloc.1 - IL_1df4: br.s IL_1dfc - - IL_1df6: ldloc.2 - IL_1df7: ldloc.1 - IL_1df8: ldloc.2 - IL_1df9: sub - IL_1dfa: mul - IL_1dfb: stloc.2 - IL_1dfc: ldloc.1 - IL_1dfd: ldloc.2 - IL_1dfe: beq.s IL_1e08 - - IL_1e00: ldloc.1 - IL_1e01: ldloc.1 - IL_1e02: ldloc.2 - IL_1e03: mul - IL_1e04: mul - IL_1e05: stloc.1 - IL_1e06: br.s IL_1e0e - - IL_1e08: ldloc.2 - IL_1e09: ldloc.1 - IL_1e0a: ldloc.2 - IL_1e0b: mul - IL_1e0c: mul - IL_1e0d: stloc.2 - IL_1e0e: ldloc.1 - IL_1e0f: ldloc.2 - IL_1e10: bgt.s IL_1e1a - - IL_1e12: ldloc.1 - IL_1e13: ldloc.1 - IL_1e14: ldloc.2 - IL_1e15: mul - IL_1e16: add - IL_1e17: stloc.1 - IL_1e18: br.s IL_1e20 - - IL_1e1a: ldloc.2 - IL_1e1b: ldloc.1 - IL_1e1c: ldloc.2 - IL_1e1d: mul - IL_1e1e: mul - IL_1e1f: stloc.2 - IL_1e20: ldloc.1 - IL_1e21: ldloc.2 - IL_1e22: ble.s IL_1e2c - - IL_1e24: ldloc.1 - IL_1e25: ldloc.1 - IL_1e26: ldloc.2 - IL_1e27: mul - IL_1e28: mul - IL_1e29: stloc.1 - IL_1e2a: br.s IL_1e32 - - IL_1e2c: ldloc.2 - IL_1e2d: ldloc.1 - IL_1e2e: ldloc.2 - IL_1e2f: mul - IL_1e30: mul - IL_1e31: stloc.2 - IL_1e32: ldloc.1 - IL_1e33: ldloc.2 - IL_1e34: bge.s IL_1e3e - - IL_1e36: ldloc.1 - IL_1e37: ldloc.1 - IL_1e38: ldloc.2 - IL_1e39: sub - IL_1e3a: mul - IL_1e3b: stloc.1 - IL_1e3c: br.s IL_1e44 - - IL_1e3e: ldloc.2 - IL_1e3f: ldloc.1 - IL_1e40: ldloc.2 - IL_1e41: sub - IL_1e42: add - IL_1e43: stloc.2 - IL_1e44: ldloc.1 - IL_1e45: ldloc.2 - IL_1e46: beq.s IL_1e50 - - IL_1e48: ldloc.1 - IL_1e49: ldloc.1 - IL_1e4a: ldloc.2 - IL_1e4b: add - IL_1e4c: sub - IL_1e4d: stloc.1 - IL_1e4e: br.s IL_1e56 - - IL_1e50: ldloc.2 - IL_1e51: ldloc.1 - IL_1e52: ldloc.2 - IL_1e53: add - IL_1e54: sub - IL_1e55: stloc.2 - IL_1e56: ldloc.1 - IL_1e57: ldloc.2 - IL_1e58: bge.s IL_1e62 - - IL_1e5a: ldloc.1 - IL_1e5b: ldloc.1 - IL_1e5c: ldloc.2 - IL_1e5d: mul - IL_1e5e: mul - IL_1e5f: stloc.1 - IL_1e60: br.s IL_1e68 - - IL_1e62: ldloc.2 - IL_1e63: ldloc.1 - IL_1e64: ldloc.2 - IL_1e65: mul - IL_1e66: mul - IL_1e67: stloc.2 - IL_1e68: ldloc.1 - IL_1e69: ldloc.2 - IL_1e6a: ble.s IL_1e74 - - IL_1e6c: ldloc.1 - IL_1e6d: ldloc.1 - IL_1e6e: ldloc.2 - IL_1e6f: sub - IL_1e70: mul - IL_1e71: stloc.1 - IL_1e72: br.s IL_1e7a - - IL_1e74: ldloc.2 - IL_1e75: ldloc.1 - IL_1e76: ldloc.2 - IL_1e77: sub - IL_1e78: sub - IL_1e79: stloc.2 - IL_1e7a: ldloc.1 - IL_1e7b: ldloc.2 - IL_1e7c: blt.s IL_1e86 - - IL_1e7e: ldloc.1 - IL_1e7f: ldloc.1 - IL_1e80: ldloc.2 - IL_1e81: add - IL_1e82: add - IL_1e83: stloc.1 - IL_1e84: br.s IL_1e8c - - IL_1e86: ldloc.2 - IL_1e87: ldloc.1 - IL_1e88: ldloc.2 - IL_1e89: add - IL_1e8a: mul - IL_1e8b: stloc.2 - IL_1e8c: ldloc.1 - IL_1e8d: ldloc.2 - IL_1e8e: bgt.s IL_1e98 - - IL_1e90: ldloc.1 - IL_1e91: ldloc.1 - IL_1e92: ldloc.2 - IL_1e93: sub - IL_1e94: sub - IL_1e95: stloc.1 - IL_1e96: br.s IL_1e9e - - IL_1e98: ldloc.2 - IL_1e99: ldloc.1 - IL_1e9a: ldloc.2 - IL_1e9b: sub - IL_1e9c: mul - IL_1e9d: stloc.2 - IL_1e9e: ldloc.1 - IL_1e9f: ldloc.2 - IL_1ea0: beq.s IL_1eaa - - IL_1ea2: ldloc.1 - IL_1ea3: ldloc.1 - IL_1ea4: ldloc.2 - IL_1ea5: add - IL_1ea6: sub - IL_1ea7: stloc.1 - IL_1ea8: br.s IL_1eb0 - - IL_1eaa: ldloc.2 - IL_1eab: ldloc.1 - IL_1eac: ldloc.2 - IL_1ead: add - IL_1eae: sub - IL_1eaf: stloc.2 - IL_1eb0: ldloc.1 - IL_1eb1: ldloc.2 - IL_1eb2: bge.s IL_1ebc - - IL_1eb4: ldloc.1 - IL_1eb5: ldloc.1 - IL_1eb6: ldloc.2 - IL_1eb7: add - IL_1eb8: mul - IL_1eb9: stloc.1 - IL_1eba: br.s IL_1ec2 - - IL_1ebc: ldloc.2 - IL_1ebd: ldloc.1 - IL_1ebe: ldloc.2 - IL_1ebf: add - IL_1ec0: sub - IL_1ec1: stloc.2 - IL_1ec2: ldloc.1 - IL_1ec3: ldloc.2 - IL_1ec4: beq.s IL_1ece - - IL_1ec6: ldloc.1 - IL_1ec7: ldloc.1 - IL_1ec8: ldloc.2 - IL_1ec9: sub - IL_1eca: add - IL_1ecb: stloc.1 - IL_1ecc: br.s IL_1ed4 - - IL_1ece: ldloc.2 - IL_1ecf: ldloc.1 - IL_1ed0: ldloc.2 - IL_1ed1: sub - IL_1ed2: add - IL_1ed3: stloc.2 - IL_1ed4: ldloc.1 - IL_1ed5: ldloc.2 - IL_1ed6: bne.un.s IL_1ee0 - - IL_1ed8: ldloc.1 - IL_1ed9: ldloc.1 - IL_1eda: ldloc.2 - IL_1edb: sub - IL_1edc: sub - IL_1edd: stloc.1 - IL_1ede: br.s IL_1ee6 - - IL_1ee0: ldloc.2 - IL_1ee1: ldloc.1 - IL_1ee2: ldloc.2 - IL_1ee3: sub - IL_1ee4: mul - IL_1ee5: stloc.2 - IL_1ee6: ldloc.1 - IL_1ee7: ldloc.2 - IL_1ee8: bne.un.s IL_1ef2 - - IL_1eea: ldloc.1 - IL_1eeb: ldloc.1 - IL_1eec: ldloc.2 - IL_1eed: add - IL_1eee: mul - IL_1eef: stloc.1 - IL_1ef0: br.s IL_1ef8 - - IL_1ef2: ldloc.2 - IL_1ef3: ldloc.1 - IL_1ef4: ldloc.2 - IL_1ef5: add - IL_1ef6: add - IL_1ef7: stloc.2 - IL_1ef8: ldloc.1 - IL_1ef9: ldloc.2 - IL_1efa: ble.s IL_1f04 - - IL_1efc: ldloc.1 - IL_1efd: ldloc.1 - IL_1efe: ldloc.2 - IL_1eff: mul - IL_1f00: mul - IL_1f01: stloc.1 - IL_1f02: br.s IL_1f0a - - IL_1f04: ldloc.2 - IL_1f05: ldloc.1 - IL_1f06: ldloc.2 - IL_1f07: mul - IL_1f08: mul - IL_1f09: stloc.2 - IL_1f0a: ldloc.1 - IL_1f0b: ldloc.2 - IL_1f0c: bgt.s IL_1f16 - - IL_1f0e: ldloc.1 - IL_1f0f: ldloc.1 - IL_1f10: ldloc.2 - IL_1f11: mul - IL_1f12: add - IL_1f13: stloc.1 - IL_1f14: br.s IL_1f1c - - IL_1f16: ldloc.2 - IL_1f17: ldloc.1 - IL_1f18: ldloc.2 - IL_1f19: mul - IL_1f1a: sub - IL_1f1b: stloc.2 - IL_1f1c: ldloc.1 - IL_1f1d: ldloc.2 - IL_1f1e: ble.s IL_1f28 - - IL_1f20: ldloc.1 - IL_1f21: ldloc.1 - IL_1f22: ldloc.2 - IL_1f23: mul - IL_1f24: sub - IL_1f25: stloc.1 - IL_1f26: br.s IL_1f2e - - IL_1f28: ldloc.2 - IL_1f29: ldloc.1 - IL_1f2a: ldloc.2 - IL_1f2b: mul - IL_1f2c: add - IL_1f2d: stloc.2 - IL_1f2e: ldloc.1 - IL_1f2f: ldloc.2 - IL_1f30: bge.s IL_1f3a - - IL_1f32: ldloc.1 - IL_1f33: ldloc.1 - IL_1f34: ldloc.2 - IL_1f35: sub - IL_1f36: sub - IL_1f37: stloc.1 - IL_1f38: br.s IL_1f40 - - IL_1f3a: ldloc.2 - IL_1f3b: ldloc.1 - IL_1f3c: ldloc.2 - IL_1f3d: sub - IL_1f3e: sub - IL_1f3f: stloc.2 - IL_1f40: ldloc.1 - IL_1f41: ldloc.2 - IL_1f42: beq.s IL_1f4c - - IL_1f44: ldloc.1 - IL_1f45: ldloc.1 - IL_1f46: ldloc.2 - IL_1f47: sub - IL_1f48: sub - IL_1f49: stloc.1 - IL_1f4a: br.s IL_1f52 - - IL_1f4c: ldloc.2 - IL_1f4d: ldloc.1 - IL_1f4e: ldloc.2 - IL_1f4f: sub - IL_1f50: mul - IL_1f51: stloc.2 - IL_1f52: ldloc.1 - IL_1f53: ldloc.2 - IL_1f54: blt.s IL_1f5e - - IL_1f56: ldloc.1 - IL_1f57: ldloc.1 - IL_1f58: ldloc.2 - IL_1f59: mul - IL_1f5a: sub - IL_1f5b: stloc.1 - IL_1f5c: br.s IL_1f64 - - IL_1f5e: ldloc.2 - IL_1f5f: ldloc.1 - IL_1f60: ldloc.2 - IL_1f61: mul - IL_1f62: mul - IL_1f63: stloc.2 - IL_1f64: ldloc.1 - IL_1f65: ldloc.2 - IL_1f66: bne.un.s IL_1f70 - - IL_1f68: ldloc.1 - IL_1f69: ldloc.1 - IL_1f6a: ldloc.2 - IL_1f6b: mul - IL_1f6c: add - IL_1f6d: stloc.1 - IL_1f6e: br.s IL_1f76 - - IL_1f70: ldloc.2 - IL_1f71: ldloc.1 - IL_1f72: ldloc.2 - IL_1f73: mul - IL_1f74: mul - IL_1f75: stloc.2 - IL_1f76: ldloc.1 - IL_1f77: ldloc.2 - IL_1f78: bge.s IL_1f82 - - IL_1f7a: ldloc.1 - IL_1f7b: ldloc.1 - IL_1f7c: ldloc.2 - IL_1f7d: mul - IL_1f7e: sub - IL_1f7f: stloc.1 - IL_1f80: br.s IL_1f88 - - IL_1f82: ldloc.2 - IL_1f83: ldloc.1 - IL_1f84: ldloc.2 - IL_1f85: mul - IL_1f86: sub - IL_1f87: stloc.2 - IL_1f88: ldloc.1 - IL_1f89: ldloc.2 - IL_1f8a: bge.s IL_1f94 - - IL_1f8c: ldloc.1 - IL_1f8d: ldloc.1 - IL_1f8e: ldloc.2 - IL_1f8f: mul - IL_1f90: sub - IL_1f91: stloc.1 - IL_1f92: br.s IL_1f9a - - IL_1f94: ldloc.2 - IL_1f95: ldloc.1 - IL_1f96: ldloc.2 - IL_1f97: mul - IL_1f98: sub - IL_1f99: stloc.2 - IL_1f9a: ldloc.1 - IL_1f9b: ldloc.2 - IL_1f9c: beq.s IL_1fa6 - - IL_1f9e: ldloc.1 - IL_1f9f: ldloc.1 - IL_1fa0: ldloc.2 - IL_1fa1: mul - IL_1fa2: mul - IL_1fa3: stloc.1 - IL_1fa4: br.s IL_1fac - - IL_1fa6: ldloc.2 - IL_1fa7: ldloc.1 - IL_1fa8: ldloc.2 - IL_1fa9: mul - IL_1faa: sub - IL_1fab: stloc.2 - IL_1fac: ldloc.1 - IL_1fad: ldloc.2 - IL_1fae: bgt.s IL_1fb8 - - IL_1fb0: ldloc.1 - IL_1fb1: ldloc.1 - IL_1fb2: ldloc.2 - IL_1fb3: sub - IL_1fb4: sub - IL_1fb5: stloc.1 - IL_1fb6: br.s IL_1fbe - - IL_1fb8: ldloc.2 - IL_1fb9: ldloc.1 - IL_1fba: ldloc.2 - IL_1fbb: sub - IL_1fbc: add - IL_1fbd: stloc.2 - IL_1fbe: ldloc.1 - IL_1fbf: ldloc.2 - IL_1fc0: beq.s IL_1fca - - IL_1fc2: ldloc.1 - IL_1fc3: ldloc.1 - IL_1fc4: ldloc.2 - IL_1fc5: add - IL_1fc6: add - IL_1fc7: stloc.1 - IL_1fc8: br.s IL_1fd0 - - IL_1fca: ldloc.2 - IL_1fcb: ldloc.1 - IL_1fcc: ldloc.2 - IL_1fcd: add - IL_1fce: add - IL_1fcf: stloc.2 - IL_1fd0: ldloc.1 - IL_1fd1: ldloc.2 - IL_1fd2: beq.s IL_1fdc - - IL_1fd4: ldloc.1 - IL_1fd5: ldloc.1 - IL_1fd6: ldloc.2 - IL_1fd7: sub - IL_1fd8: sub - IL_1fd9: stloc.1 - IL_1fda: br.s IL_1fe2 - - IL_1fdc: ldloc.2 - IL_1fdd: ldloc.1 - IL_1fde: ldloc.2 - IL_1fdf: sub - IL_1fe0: sub - IL_1fe1: stloc.2 - IL_1fe2: ldloc.1 - IL_1fe3: ldloc.2 - IL_1fe4: beq.s IL_1fee - - IL_1fe6: ldloc.1 - IL_1fe7: ldloc.1 - IL_1fe8: ldloc.2 - IL_1fe9: sub - IL_1fea: mul - IL_1feb: stloc.1 - IL_1fec: br.s IL_1ff4 - - IL_1fee: ldloc.2 - IL_1fef: ldloc.1 - IL_1ff0: ldloc.2 - IL_1ff1: sub - IL_1ff2: mul - IL_1ff3: stloc.2 - IL_1ff4: ldloc.1 - IL_1ff5: ldloc.2 - IL_1ff6: beq.s IL_2000 - - IL_1ff8: ldloc.1 - IL_1ff9: ldloc.1 - IL_1ffa: ldloc.2 - IL_1ffb: sub - IL_1ffc: mul - IL_1ffd: stloc.1 - IL_1ffe: br.s IL_2006 - - IL_2000: ldloc.2 - IL_2001: ldloc.1 - IL_2002: ldloc.2 - IL_2003: sub - IL_2004: mul - IL_2005: stloc.2 - IL_2006: ldloc.1 - IL_2007: ldloc.2 - IL_2008: blt.s IL_2012 - - IL_200a: ldloc.1 - IL_200b: ldloc.1 - IL_200c: ldloc.2 - IL_200d: sub - IL_200e: sub - IL_200f: stloc.1 - IL_2010: br.s IL_2018 - - IL_2012: ldloc.2 - IL_2013: ldloc.1 - IL_2014: ldloc.2 - IL_2015: sub - IL_2016: sub - IL_2017: stloc.2 - IL_2018: ldloc.1 - IL_2019: ldloc.2 - IL_201a: beq.s IL_2024 - - IL_201c: ldloc.1 - IL_201d: ldloc.1 - IL_201e: ldloc.2 - IL_201f: sub - IL_2020: add - IL_2021: stloc.1 - IL_2022: br.s IL_202a - - IL_2024: ldloc.2 - IL_2025: ldloc.1 - IL_2026: ldloc.2 - IL_2027: sub - IL_2028: sub - IL_2029: stloc.2 - IL_202a: ldloc.1 - IL_202b: ldloc.2 - IL_202c: ble.s IL_2036 - - IL_202e: ldloc.1 - IL_202f: ldloc.1 - IL_2030: ldloc.2 - IL_2031: add - IL_2032: mul - IL_2033: stloc.1 - IL_2034: br.s IL_203c - - IL_2036: ldloc.2 - IL_2037: ldloc.1 - IL_2038: ldloc.2 - IL_2039: add - IL_203a: sub - IL_203b: stloc.2 - IL_203c: ldloc.1 - IL_203d: ldloc.2 - IL_203e: bne.un.s IL_2048 - - IL_2040: ldloc.1 - IL_2041: ldloc.1 - IL_2042: ldloc.2 - IL_2043: mul - IL_2044: mul - IL_2045: stloc.1 - IL_2046: br.s IL_204e - - IL_2048: ldloc.2 - IL_2049: ldloc.1 - IL_204a: ldloc.2 - IL_204b: mul - IL_204c: mul - IL_204d: stloc.2 - IL_204e: ldloc.1 - IL_204f: ldloc.2 - IL_2050: bge.s IL_205a - - IL_2052: ldloc.1 - IL_2053: ldloc.1 - IL_2054: ldloc.2 - IL_2055: sub - IL_2056: sub - IL_2057: stloc.1 - IL_2058: br.s IL_2060 - - IL_205a: ldloc.2 - IL_205b: ldloc.1 - IL_205c: ldloc.2 - IL_205d: sub - IL_205e: add - IL_205f: stloc.2 - IL_2060: ldloc.1 - IL_2061: ldloc.2 - IL_2062: bne.un.s IL_206c - - IL_2064: ldloc.1 - IL_2065: ldloc.1 - IL_2066: ldloc.2 - IL_2067: mul - IL_2068: mul - IL_2069: stloc.1 - IL_206a: br.s IL_2072 - - IL_206c: ldloc.2 - IL_206d: ldloc.1 - IL_206e: ldloc.2 - IL_206f: mul - IL_2070: add - IL_2071: stloc.2 - IL_2072: ldloc.1 - IL_2073: ldloc.2 - IL_2074: beq.s IL_207e - - IL_2076: ldloc.1 - IL_2077: ldloc.1 - IL_2078: ldloc.2 - IL_2079: sub - IL_207a: add - IL_207b: stloc.1 - IL_207c: br.s IL_2084 - - IL_207e: ldloc.2 - IL_207f: ldloc.1 - IL_2080: ldloc.2 - IL_2081: sub - IL_2082: mul - IL_2083: stloc.2 - IL_2084: ldloc.1 - IL_2085: ldloc.2 - IL_2086: beq.s IL_2090 - - IL_2088: ldloc.1 - IL_2089: ldloc.1 - IL_208a: ldloc.2 - IL_208b: add - IL_208c: mul - IL_208d: stloc.1 - IL_208e: br.s IL_2096 - - IL_2090: ldloc.2 - IL_2091: ldloc.1 - IL_2092: ldloc.2 - IL_2093: add - IL_2094: mul - IL_2095: stloc.2 - IL_2096: ldloc.1 - IL_2097: ldloc.2 - IL_2098: beq.s IL_20a2 - - IL_209a: ldloc.1 - IL_209b: ldloc.1 - IL_209c: ldloc.2 - IL_209d: add - IL_209e: add - IL_209f: stloc.1 - IL_20a0: br.s IL_20a8 - - IL_20a2: ldloc.2 - IL_20a3: ldloc.1 - IL_20a4: ldloc.2 - IL_20a5: add - IL_20a6: sub - IL_20a7: stloc.2 - IL_20a8: ldloc.1 - IL_20a9: ldloc.2 - IL_20aa: beq.s IL_20b4 - - IL_20ac: ldloc.1 - IL_20ad: ldloc.1 - IL_20ae: ldloc.2 - IL_20af: mul - IL_20b0: sub - IL_20b1: stloc.1 - IL_20b2: br.s IL_20ba - - IL_20b4: ldloc.2 - IL_20b5: ldloc.1 - IL_20b6: ldloc.2 - IL_20b7: mul - IL_20b8: sub - IL_20b9: stloc.2 - IL_20ba: ldloc.1 - IL_20bb: ldloc.2 - IL_20bc: bgt.s IL_20c6 - - IL_20be: ldloc.1 - IL_20bf: ldloc.1 - IL_20c0: ldloc.2 - IL_20c1: add - IL_20c2: mul - IL_20c3: stloc.1 - IL_20c4: br.s IL_20cc - - IL_20c6: ldloc.2 - IL_20c7: ldloc.1 - IL_20c8: ldloc.2 - IL_20c9: add - IL_20ca: add - IL_20cb: stloc.2 - IL_20cc: ldloc.1 - IL_20cd: ldloc.2 - IL_20ce: beq.s IL_20d8 - - IL_20d0: ldloc.1 - IL_20d1: ldloc.1 - IL_20d2: ldloc.2 - IL_20d3: add - IL_20d4: sub - IL_20d5: stloc.1 - IL_20d6: br.s IL_20de - - IL_20d8: ldloc.2 - IL_20d9: ldloc.1 - IL_20da: ldloc.2 - IL_20db: add - IL_20dc: sub - IL_20dd: stloc.2 - IL_20de: ldloc.1 - IL_20df: ldloc.2 - IL_20e0: bne.un.s IL_20ea - - IL_20e2: ldloc.1 - IL_20e3: ldloc.1 - IL_20e4: ldloc.2 - IL_20e5: sub - IL_20e6: add - IL_20e7: stloc.1 - IL_20e8: br.s IL_20f0 - - IL_20ea: ldloc.2 - IL_20eb: ldloc.1 - IL_20ec: ldloc.2 - IL_20ed: sub - IL_20ee: add - IL_20ef: stloc.2 - IL_20f0: ldloc.1 - IL_20f1: ldloc.2 - IL_20f2: bgt.s IL_20fc - - IL_20f4: ldloc.1 - IL_20f5: ldloc.1 - IL_20f6: ldloc.2 - IL_20f7: sub - IL_20f8: sub - IL_20f9: stloc.1 - IL_20fa: br.s IL_2102 - - IL_20fc: ldloc.2 - IL_20fd: ldloc.1 - IL_20fe: ldloc.2 - IL_20ff: sub - IL_2100: mul - IL_2101: stloc.2 - IL_2102: ldloc.1 - IL_2103: ldloc.2 - IL_2104: blt.s IL_210e - - IL_2106: ldloc.1 - IL_2107: ldloc.1 - IL_2108: ldloc.2 - IL_2109: mul - IL_210a: mul - IL_210b: stloc.1 - IL_210c: br.s IL_2114 - - IL_210e: ldloc.2 - IL_210f: ldloc.1 - IL_2110: ldloc.2 - IL_2111: mul - IL_2112: mul - IL_2113: stloc.2 - IL_2114: ldloc.1 - IL_2115: ldloc.2 - IL_2116: blt.s IL_2120 - - IL_2118: ldloc.1 - IL_2119: ldloc.1 - IL_211a: ldloc.2 - IL_211b: add - IL_211c: add - IL_211d: stloc.1 - IL_211e: br.s IL_2126 - - IL_2120: ldloc.2 - IL_2121: ldloc.1 - IL_2122: ldloc.2 - IL_2123: add - IL_2124: mul - IL_2125: stloc.2 - IL_2126: ldloc.1 - IL_2127: ldloc.2 - IL_2128: bne.un.s IL_2132 - - IL_212a: ldloc.1 - IL_212b: ldloc.1 - IL_212c: ldloc.2 - IL_212d: mul - IL_212e: sub - IL_212f: stloc.1 - IL_2130: br.s IL_2138 - - IL_2132: ldloc.2 - IL_2133: ldloc.1 - IL_2134: ldloc.2 - IL_2135: mul - IL_2136: add - IL_2137: stloc.2 - IL_2138: ldloc.1 - IL_2139: ldloc.2 - IL_213a: blt.s IL_2144 - - IL_213c: ldloc.1 - IL_213d: ldloc.1 - IL_213e: ldloc.2 - IL_213f: sub - IL_2140: mul - IL_2141: stloc.1 - IL_2142: br.s IL_214a - - IL_2144: ldloc.2 - IL_2145: ldloc.1 - IL_2146: ldloc.2 - IL_2147: sub - IL_2148: mul - IL_2149: stloc.2 - IL_214a: ldloc.1 - IL_214b: ldloc.2 - IL_214c: ble.s IL_2156 - - IL_214e: ldloc.1 - IL_214f: ldloc.1 - IL_2150: ldloc.2 - IL_2151: add - IL_2152: sub - IL_2153: stloc.1 - IL_2154: br.s IL_215c - - IL_2156: ldloc.2 - IL_2157: ldloc.1 - IL_2158: ldloc.2 - IL_2159: add - IL_215a: mul - IL_215b: stloc.2 - IL_215c: ldloc.1 - IL_215d: ldloc.2 - IL_215e: bne.un.s IL_2168 - - IL_2160: ldloc.1 - IL_2161: ldloc.1 - IL_2162: ldloc.2 - IL_2163: sub - IL_2164: mul - IL_2165: stloc.1 - IL_2166: br.s IL_216e - - IL_2168: ldloc.2 - IL_2169: ldloc.1 - IL_216a: ldloc.2 - IL_216b: sub - IL_216c: mul - IL_216d: stloc.2 - IL_216e: ldloc.1 - IL_216f: ldloc.2 - IL_2170: bgt.s IL_217a - - IL_2172: ldloc.1 - IL_2173: ldloc.1 - IL_2174: ldloc.2 - IL_2175: mul - IL_2176: mul - IL_2177: stloc.1 - IL_2178: br.s IL_2180 - - IL_217a: ldloc.2 - IL_217b: ldloc.1 - IL_217c: ldloc.2 - IL_217d: mul - IL_217e: mul - IL_217f: stloc.2 - IL_2180: ldloc.1 - IL_2181: ldloc.2 - IL_2182: bne.un.s IL_218c - - IL_2184: ldloc.1 - IL_2185: ldloc.1 - IL_2186: ldloc.2 - IL_2187: sub - IL_2188: sub - IL_2189: stloc.1 - IL_218a: br.s IL_2192 - - IL_218c: ldloc.2 - IL_218d: ldloc.1 - IL_218e: ldloc.2 - IL_218f: sub - IL_2190: sub - IL_2191: stloc.2 - IL_2192: ldloc.1 - IL_2193: ldloc.2 - IL_2194: bge.s IL_219e - - IL_2196: ldloc.1 - IL_2197: ldloc.1 - IL_2198: ldloc.2 - IL_2199: add - IL_219a: mul - IL_219b: stloc.1 - IL_219c: br.s IL_21a4 - - IL_219e: ldloc.2 - IL_219f: ldloc.1 - IL_21a0: ldloc.2 - IL_21a1: add - IL_21a2: mul - IL_21a3: stloc.2 - IL_21a4: ldloc.1 - IL_21a5: ldloc.2 - IL_21a6: beq.s IL_21b0 - - IL_21a8: ldloc.1 - IL_21a9: ldloc.1 - IL_21aa: ldloc.2 - IL_21ab: sub - IL_21ac: sub - IL_21ad: stloc.1 - IL_21ae: br.s IL_21b6 - - IL_21b0: ldloc.2 - IL_21b1: ldloc.1 - IL_21b2: ldloc.2 - IL_21b3: sub - IL_21b4: sub - IL_21b5: stloc.2 - IL_21b6: ldloc.1 - IL_21b7: ldloc.2 - IL_21b8: ble.s IL_21c2 - - IL_21ba: ldloc.1 - IL_21bb: ldloc.1 - IL_21bc: ldloc.2 - IL_21bd: sub - IL_21be: mul - IL_21bf: stloc.1 - IL_21c0: br.s IL_21c8 - - IL_21c2: ldloc.2 - IL_21c3: ldloc.1 - IL_21c4: ldloc.2 - IL_21c5: sub - IL_21c6: sub - IL_21c7: stloc.2 - IL_21c8: ldloc.1 - IL_21c9: ldloc.2 - IL_21ca: bge.s IL_21d4 - - IL_21cc: ldloc.1 - IL_21cd: ldloc.1 - IL_21ce: ldloc.2 - IL_21cf: mul - IL_21d0: mul - IL_21d1: stloc.1 - IL_21d2: br.s IL_21da - - IL_21d4: ldloc.2 - IL_21d5: ldloc.1 - IL_21d6: ldloc.2 - IL_21d7: mul - IL_21d8: sub - IL_21d9: stloc.2 - IL_21da: ldloc.1 - IL_21db: ldloc.2 - IL_21dc: blt.s IL_21e6 - - IL_21de: ldloc.1 - IL_21df: ldloc.1 - IL_21e0: ldloc.2 - IL_21e1: add - IL_21e2: mul - IL_21e3: stloc.1 - IL_21e4: br.s IL_21ec - - IL_21e6: ldloc.2 - IL_21e7: ldloc.1 - IL_21e8: ldloc.2 - IL_21e9: add - IL_21ea: sub - IL_21eb: stloc.2 - IL_21ec: ldloc.1 - IL_21ed: ldloc.2 - IL_21ee: bgt.s IL_21f8 - - IL_21f0: ldloc.1 - IL_21f1: ldloc.1 - IL_21f2: ldloc.2 - IL_21f3: sub - IL_21f4: mul - IL_21f5: stloc.1 - IL_21f6: br.s IL_21fe - - IL_21f8: ldloc.2 - IL_21f9: ldloc.1 - IL_21fa: ldloc.2 - IL_21fb: sub - IL_21fc: mul - IL_21fd: stloc.2 - IL_21fe: ldloc.1 - IL_21ff: ldloc.2 - IL_2200: ble.s IL_220a - - IL_2202: ldloc.1 - IL_2203: ldloc.1 - IL_2204: ldloc.2 - IL_2205: sub - IL_2206: sub - IL_2207: stloc.1 - IL_2208: br.s IL_2210 - - IL_220a: ldloc.2 - IL_220b: ldloc.1 - IL_220c: ldloc.2 - IL_220d: sub - IL_220e: add - IL_220f: stloc.2 - IL_2210: ldloc.1 - IL_2211: ldloc.2 - IL_2212: ble.s IL_221c - - IL_2214: ldloc.1 - IL_2215: ldloc.1 - IL_2216: ldloc.2 - IL_2217: add - IL_2218: mul - IL_2219: stloc.1 - IL_221a: br.s IL_2222 - - IL_221c: ldloc.2 - IL_221d: ldloc.1 - IL_221e: ldloc.2 - IL_221f: add - IL_2220: sub - IL_2221: stloc.2 - IL_2222: ldloc.1 - IL_2223: ldloc.2 - IL_2224: beq.s IL_222e - - IL_2226: ldloc.1 - IL_2227: ldloc.1 - IL_2228: ldloc.2 - IL_2229: sub - IL_222a: mul - IL_222b: stloc.1 - IL_222c: br.s IL_2234 - - IL_222e: ldloc.2 - IL_222f: ldloc.1 - IL_2230: ldloc.2 - IL_2231: sub - IL_2232: sub - IL_2233: stloc.2 - IL_2234: ldloc.1 - IL_2235: ldloc.2 - IL_2236: ble.s IL_2240 - - IL_2238: ldloc.1 - IL_2239: ldloc.1 - IL_223a: ldloc.2 - IL_223b: sub - IL_223c: sub - IL_223d: stloc.1 - IL_223e: br.s IL_2246 - - IL_2240: ldloc.2 - IL_2241: ldloc.1 - IL_2242: ldloc.2 - IL_2243: sub - IL_2244: mul - IL_2245: stloc.2 - IL_2246: ldloc.1 - IL_2247: ldloc.2 - IL_2248: ble.s IL_2252 - - IL_224a: ldloc.1 - IL_224b: ldloc.1 - IL_224c: ldloc.2 - IL_224d: mul - IL_224e: add - IL_224f: stloc.1 - IL_2250: br.s IL_2258 - - IL_2252: ldloc.2 - IL_2253: ldloc.1 - IL_2254: ldloc.2 - IL_2255: mul - IL_2256: add - IL_2257: stloc.2 - IL_2258: ldloc.1 - IL_2259: ldloc.2 - IL_225a: bge.s IL_2264 - - IL_225c: ldloc.1 - IL_225d: ldloc.1 - IL_225e: ldloc.2 - IL_225f: mul - IL_2260: sub - IL_2261: stloc.1 - IL_2262: br.s IL_226a - - IL_2264: ldloc.2 - IL_2265: ldloc.1 - IL_2266: ldloc.2 - IL_2267: mul - IL_2268: add - IL_2269: stloc.2 - IL_226a: ldloc.1 - IL_226b: ldloc.2 - IL_226c: bge.s IL_2276 - - IL_226e: ldloc.1 - IL_226f: ldloc.1 - IL_2270: ldloc.2 - IL_2271: mul - IL_2272: mul - IL_2273: stloc.1 - IL_2274: br.s IL_227c - - IL_2276: ldloc.2 - IL_2277: ldloc.1 - IL_2278: ldloc.2 - IL_2279: mul - IL_227a: sub - IL_227b: stloc.2 - IL_227c: ldloc.1 - IL_227d: ldloc.2 - IL_227e: bge.s IL_2288 - - IL_2280: ldloc.1 - IL_2281: ldloc.1 - IL_2282: ldloc.2 - IL_2283: sub - IL_2284: add - IL_2285: stloc.1 - IL_2286: br.s IL_228e - - IL_2288: ldloc.2 - IL_2289: ldloc.1 - IL_228a: ldloc.2 - IL_228b: sub - IL_228c: mul - IL_228d: stloc.2 - IL_228e: ldloc.1 - IL_228f: ldloc.2 - IL_2290: bge.s IL_229a - - IL_2292: ldloc.1 - IL_2293: ldloc.1 - IL_2294: ldloc.2 - IL_2295: sub - IL_2296: add - IL_2297: stloc.1 - IL_2298: br.s IL_22a0 - - IL_229a: ldloc.2 - IL_229b: ldloc.1 - IL_229c: ldloc.2 - IL_229d: sub - IL_229e: add - IL_229f: stloc.2 - IL_22a0: ldloc.1 - IL_22a1: ldloc.2 - IL_22a2: blt.s IL_22ac - - IL_22a4: ldloc.1 - IL_22a5: ldloc.1 - IL_22a6: ldloc.2 - IL_22a7: add - IL_22a8: mul - IL_22a9: stloc.1 - IL_22aa: br.s IL_22b2 - - IL_22ac: ldloc.2 - IL_22ad: ldloc.1 - IL_22ae: ldloc.2 - IL_22af: add - IL_22b0: sub - IL_22b1: stloc.2 - IL_22b2: ldloc.1 - IL_22b3: ldloc.2 - IL_22b4: bgt.s IL_22be - - IL_22b6: ldloc.1 - IL_22b7: ldloc.1 - IL_22b8: ldloc.2 - IL_22b9: sub - IL_22ba: sub - IL_22bb: stloc.1 - IL_22bc: br.s IL_22c4 - - IL_22be: ldloc.2 - IL_22bf: ldloc.1 - IL_22c0: ldloc.2 - IL_22c1: sub - IL_22c2: sub - IL_22c3: stloc.2 - IL_22c4: ldloc.1 - IL_22c5: ldloc.2 - IL_22c6: blt.s IL_22d0 - - IL_22c8: ldloc.1 - IL_22c9: ldloc.1 - IL_22ca: ldloc.2 - IL_22cb: mul - IL_22cc: add - IL_22cd: stloc.1 - IL_22ce: br.s IL_22d6 - - IL_22d0: ldloc.2 - IL_22d1: ldloc.1 - IL_22d2: ldloc.2 - IL_22d3: mul - IL_22d4: mul - IL_22d5: stloc.2 - IL_22d6: ldloc.1 - IL_22d7: ldloc.2 - IL_22d8: beq.s IL_22e2 - - IL_22da: ldloc.1 - IL_22db: ldloc.1 - IL_22dc: ldloc.2 - IL_22dd: add - IL_22de: mul - IL_22df: stloc.1 - IL_22e0: br.s IL_22e8 - - IL_22e2: ldloc.2 - IL_22e3: ldloc.1 - IL_22e4: ldloc.2 - IL_22e5: add - IL_22e6: add - IL_22e7: stloc.2 - IL_22e8: ldloc.1 - IL_22e9: ldloc.2 - IL_22ea: bne.un.s IL_22f4 - - IL_22ec: ldloc.1 - IL_22ed: ldloc.1 - IL_22ee: ldloc.2 - IL_22ef: mul - IL_22f0: mul - IL_22f1: stloc.1 - IL_22f2: br.s IL_22fa - - IL_22f4: ldloc.2 - IL_22f5: ldloc.1 - IL_22f6: ldloc.2 - IL_22f7: mul - IL_22f8: add - IL_22f9: stloc.2 - IL_22fa: ldloc.1 - IL_22fb: ldloc.2 - IL_22fc: bge.s IL_2306 - - IL_22fe: ldloc.1 - IL_22ff: ldloc.1 - IL_2300: ldloc.2 - IL_2301: add - IL_2302: sub - IL_2303: stloc.1 - IL_2304: br.s IL_230c - - IL_2306: ldloc.2 - IL_2307: ldloc.1 - IL_2308: ldloc.2 - IL_2309: add - IL_230a: add - IL_230b: stloc.2 - IL_230c: ldloc.1 - IL_230d: ldloc.2 - IL_230e: bge.s IL_2318 - - IL_2310: ldloc.1 - IL_2311: ldloc.1 - IL_2312: ldloc.2 - IL_2313: mul - IL_2314: sub - IL_2315: stloc.1 - IL_2316: br.s IL_231e - - IL_2318: ldloc.2 - IL_2319: ldloc.1 - IL_231a: ldloc.2 - IL_231b: mul - IL_231c: mul - IL_231d: stloc.2 - IL_231e: ldloc.1 - IL_231f: ldloc.2 - IL_2320: beq.s IL_232a - - IL_2322: ldloc.1 - IL_2323: ldloc.1 - IL_2324: ldloc.2 - IL_2325: mul - IL_2326: mul - IL_2327: stloc.1 - IL_2328: br.s IL_2330 - - IL_232a: ldloc.2 - IL_232b: ldloc.1 - IL_232c: ldloc.2 - IL_232d: mul - IL_232e: add - IL_232f: stloc.2 - IL_2330: ldloc.1 - IL_2331: ldloc.2 - IL_2332: bgt.s IL_233c - - IL_2334: ldloc.1 - IL_2335: ldloc.1 - IL_2336: ldloc.2 - IL_2337: add - IL_2338: add - IL_2339: stloc.1 - IL_233a: br.s IL_2342 - - IL_233c: ldloc.2 - IL_233d: ldloc.1 - IL_233e: ldloc.2 - IL_233f: add - IL_2340: add - IL_2341: stloc.2 - IL_2342: ldloc.1 - IL_2343: ldloc.2 - IL_2344: bne.un.s IL_234e - - IL_2346: ldloc.1 - IL_2347: ldloc.1 - IL_2348: ldloc.2 - IL_2349: mul - IL_234a: mul - IL_234b: stloc.1 - IL_234c: br.s IL_2354 - - IL_234e: ldloc.2 - IL_234f: ldloc.1 - IL_2350: ldloc.2 - IL_2351: mul - IL_2352: add - IL_2353: stloc.2 - IL_2354: ldloc.1 - IL_2355: ldloc.2 - IL_2356: beq.s IL_2360 - - IL_2358: ldloc.1 - IL_2359: ldloc.1 - IL_235a: ldloc.2 - IL_235b: mul - IL_235c: mul - IL_235d: stloc.1 - IL_235e: br.s IL_2366 - - IL_2360: ldloc.2 - IL_2361: ldloc.1 - IL_2362: ldloc.2 - IL_2363: mul - IL_2364: sub - IL_2365: stloc.2 - IL_2366: ldloc.1 - IL_2367: ldloc.2 - IL_2368: bge.s IL_2372 - - IL_236a: ldloc.1 - IL_236b: ldloc.1 - IL_236c: ldloc.2 - IL_236d: sub - IL_236e: mul - IL_236f: stloc.1 - IL_2370: br.s IL_2378 - - IL_2372: ldloc.2 - IL_2373: ldloc.1 - IL_2374: ldloc.2 - IL_2375: sub - IL_2376: add - IL_2377: stloc.2 - IL_2378: ldloc.1 - IL_2379: ldloc.2 - IL_237a: beq.s IL_2384 - - IL_237c: ldloc.1 - IL_237d: ldloc.1 - IL_237e: ldloc.2 - IL_237f: add - IL_2380: mul - IL_2381: stloc.1 - IL_2382: br.s IL_238a - - IL_2384: ldloc.2 - IL_2385: ldloc.1 - IL_2386: ldloc.2 - IL_2387: add - IL_2388: mul - IL_2389: stloc.2 - IL_238a: ldloc.1 - IL_238b: ldloc.2 - IL_238c: bne.un.s IL_2396 - - IL_238e: ldloc.1 - IL_238f: ldloc.1 - IL_2390: ldloc.2 - IL_2391: mul - IL_2392: sub - IL_2393: stloc.1 - IL_2394: br.s IL_239c - - IL_2396: ldloc.2 - IL_2397: ldloc.1 - IL_2398: ldloc.2 - IL_2399: mul - IL_239a: add - IL_239b: stloc.2 - IL_239c: ldloc.1 - IL_239d: ldloc.2 - IL_239e: bne.un.s IL_23a8 - - IL_23a0: ldloc.1 - IL_23a1: ldloc.1 - IL_23a2: ldloc.2 - IL_23a3: add - IL_23a4: add - IL_23a5: stloc.1 - IL_23a6: br.s IL_23ae - - IL_23a8: ldloc.2 - IL_23a9: ldloc.1 - IL_23aa: ldloc.2 - IL_23ab: add - IL_23ac: mul - IL_23ad: stloc.2 - IL_23ae: ldloc.1 - IL_23af: ldloc.2 - IL_23b0: blt.s IL_23ba - - IL_23b2: ldloc.1 - IL_23b3: ldloc.1 - IL_23b4: ldloc.2 - IL_23b5: mul - IL_23b6: sub - IL_23b7: stloc.1 - IL_23b8: br.s IL_23c0 - - IL_23ba: ldloc.2 - IL_23bb: ldloc.1 - IL_23bc: ldloc.2 - IL_23bd: mul - IL_23be: sub - IL_23bf: stloc.2 - IL_23c0: ldloc.1 - IL_23c1: ldloc.2 - IL_23c2: ble.s IL_23cc - - IL_23c4: ldloc.1 - IL_23c5: ldloc.1 - IL_23c6: ldloc.2 - IL_23c7: mul - IL_23c8: mul - IL_23c9: stloc.1 - IL_23ca: br.s IL_23d2 - - IL_23cc: ldloc.2 - IL_23cd: ldloc.1 - IL_23ce: ldloc.2 - IL_23cf: mul - IL_23d0: add - IL_23d1: stloc.2 - IL_23d2: ldloc.1 - IL_23d3: ldloc.2 - IL_23d4: bne.un.s IL_23de - - IL_23d6: ldloc.1 - IL_23d7: ldloc.1 - IL_23d8: ldloc.2 - IL_23d9: mul - IL_23da: add - IL_23db: stloc.1 - IL_23dc: br.s IL_23e4 - - IL_23de: ldloc.2 - IL_23df: ldloc.1 - IL_23e0: ldloc.2 - IL_23e1: mul - IL_23e2: sub - IL_23e3: stloc.2 - IL_23e4: ldloc.1 - IL_23e5: ldloc.2 - IL_23e6: bgt.s IL_23f0 - - IL_23e8: ldloc.1 - IL_23e9: ldloc.1 - IL_23ea: ldloc.2 - IL_23eb: sub - IL_23ec: sub - IL_23ed: stloc.1 - IL_23ee: br.s IL_23f6 - - IL_23f0: ldloc.2 - IL_23f1: ldloc.1 - IL_23f2: ldloc.2 - IL_23f3: sub - IL_23f4: mul - IL_23f5: stloc.2 - IL_23f6: ldloc.1 - IL_23f7: ldloc.2 - IL_23f8: ble.s IL_2402 - - IL_23fa: ldloc.1 - IL_23fb: ldloc.1 - IL_23fc: ldloc.2 - IL_23fd: sub - IL_23fe: add - IL_23ff: stloc.1 - IL_2400: br.s IL_2408 - - IL_2402: ldloc.2 - IL_2403: ldloc.1 - IL_2404: ldloc.2 - IL_2405: sub - IL_2406: mul - IL_2407: stloc.2 - IL_2408: ldloc.1 - IL_2409: ldloc.2 - IL_240a: blt.s IL_2414 - - IL_240c: ldloc.1 - IL_240d: ldloc.1 - IL_240e: ldloc.2 - IL_240f: add - IL_2410: sub - IL_2411: stloc.1 - IL_2412: br.s IL_241a - - IL_2414: ldloc.2 - IL_2415: ldloc.1 - IL_2416: ldloc.2 - IL_2417: add - IL_2418: mul - IL_2419: stloc.2 - IL_241a: ldloc.1 - IL_241b: ldloc.2 - IL_241c: bne.un.s IL_2426 - - IL_241e: ldloc.1 - IL_241f: ldloc.1 - IL_2420: ldloc.2 - IL_2421: add - IL_2422: mul - IL_2423: stloc.1 - IL_2424: br.s IL_242c - - IL_2426: ldloc.2 - IL_2427: ldloc.1 - IL_2428: ldloc.2 - IL_2429: add - IL_242a: add - IL_242b: stloc.2 - IL_242c: ldloc.1 - IL_242d: ldloc.2 - IL_242e: beq.s IL_2438 - - IL_2430: ldloc.1 - IL_2431: ldloc.1 - IL_2432: ldloc.2 - IL_2433: sub - IL_2434: add - IL_2435: stloc.1 - IL_2436: br.s IL_243e - - IL_2438: ldloc.2 - IL_2439: ldloc.1 - IL_243a: ldloc.2 - IL_243b: sub - IL_243c: sub - IL_243d: stloc.2 - IL_243e: ldloc.1 - IL_243f: ldloc.2 - IL_2440: beq.s IL_244a - - IL_2442: ldloc.1 - IL_2443: ldloc.1 - IL_2444: ldloc.2 - IL_2445: add - IL_2446: add - IL_2447: stloc.1 - IL_2448: br.s IL_2450 - - IL_244a: ldloc.2 - IL_244b: ldloc.1 - IL_244c: ldloc.2 - IL_244d: add - IL_244e: sub - IL_244f: stloc.2 - IL_2450: ldloc.1 - IL_2451: ldloc.2 - IL_2452: bge.s IL_245c - - IL_2454: ldloc.1 - IL_2455: ldloc.1 - IL_2456: ldloc.2 - IL_2457: sub - IL_2458: mul - IL_2459: stloc.1 - IL_245a: br.s IL_2462 - - IL_245c: ldloc.2 - IL_245d: ldloc.1 - IL_245e: ldloc.2 - IL_245f: sub - IL_2460: mul - IL_2461: stloc.2 - IL_2462: ldloc.1 - IL_2463: ldloc.2 - IL_2464: bgt.s IL_246e - - IL_2466: ldloc.1 - IL_2467: ldloc.1 - IL_2468: ldloc.2 - IL_2469: mul - IL_246a: add - IL_246b: stloc.1 - IL_246c: br.s IL_2474 - - IL_246e: ldloc.2 - IL_246f: ldloc.1 - IL_2470: ldloc.2 - IL_2471: mul - IL_2472: sub - IL_2473: stloc.2 - IL_2474: ldloc.1 - IL_2475: ldloc.2 - IL_2476: bge.s IL_2480 - - IL_2478: ldloc.1 - IL_2479: ldloc.1 - IL_247a: ldloc.2 - IL_247b: sub - IL_247c: add - IL_247d: stloc.1 - IL_247e: br.s IL_2486 - - IL_2480: ldloc.2 - IL_2481: ldloc.1 - IL_2482: ldloc.2 - IL_2483: sub - IL_2484: sub - IL_2485: stloc.2 - IL_2486: ldloc.1 - IL_2487: ldloc.2 - IL_2488: bgt.s IL_2492 - - IL_248a: ldloc.1 - IL_248b: ldloc.1 - IL_248c: ldloc.2 - IL_248d: sub - IL_248e: mul - IL_248f: stloc.1 - IL_2490: br.s IL_2498 - - IL_2492: ldloc.2 - IL_2493: ldloc.1 - IL_2494: ldloc.2 - IL_2495: sub - IL_2496: mul - IL_2497: stloc.2 - IL_2498: ldloc.1 - IL_2499: ldloc.2 - IL_249a: bge.s IL_24a4 - - IL_249c: ldloc.1 - IL_249d: ldloc.1 - IL_249e: ldloc.2 - IL_249f: mul - IL_24a0: sub - IL_24a1: stloc.1 - IL_24a2: br.s IL_24aa - - IL_24a4: ldloc.2 - IL_24a5: ldloc.1 - IL_24a6: ldloc.2 - IL_24a7: mul - IL_24a8: mul - IL_24a9: stloc.2 - IL_24aa: ldloc.1 - IL_24ab: ldloc.2 - IL_24ac: bne.un.s IL_24b6 - - IL_24ae: ldloc.1 - IL_24af: ldloc.1 - IL_24b0: ldloc.2 - IL_24b1: add - IL_24b2: sub - IL_24b3: stloc.1 - IL_24b4: br.s IL_24bc - - IL_24b6: ldloc.2 - IL_24b7: ldloc.1 - IL_24b8: ldloc.2 - IL_24b9: add - IL_24ba: mul - IL_24bb: stloc.2 - IL_24bc: ldloc.1 - IL_24bd: ldloc.2 - IL_24be: bgt.s IL_24c8 - - IL_24c0: ldloc.1 - IL_24c1: ldloc.1 - IL_24c2: ldloc.2 - IL_24c3: sub - IL_24c4: add - IL_24c5: stloc.1 - IL_24c6: br.s IL_24ce - - IL_24c8: ldloc.2 - IL_24c9: ldloc.1 - IL_24ca: ldloc.2 - IL_24cb: sub - IL_24cc: mul - IL_24cd: stloc.2 - IL_24ce: ldloc.1 - IL_24cf: ldloc.2 - IL_24d0: bne.un.s IL_24da - - IL_24d2: ldloc.1 - IL_24d3: ldloc.1 - IL_24d4: ldloc.2 - IL_24d5: sub - IL_24d6: mul - IL_24d7: stloc.1 - IL_24d8: br.s IL_24e0 - - IL_24da: ldloc.2 - IL_24db: ldloc.1 - IL_24dc: ldloc.2 - IL_24dd: sub - IL_24de: mul - IL_24df: stloc.2 - IL_24e0: ldloc.1 - IL_24e1: ldloc.2 - IL_24e2: beq.s IL_24ec - - IL_24e4: ldloc.1 - IL_24e5: ldloc.1 - IL_24e6: ldloc.2 - IL_24e7: sub - IL_24e8: sub - IL_24e9: stloc.1 - IL_24ea: br.s IL_24f2 - - IL_24ec: ldloc.2 - IL_24ed: ldloc.1 - IL_24ee: ldloc.2 - IL_24ef: sub - IL_24f0: add - IL_24f1: stloc.2 - IL_24f2: ldloc.1 - IL_24f3: ldloc.2 - IL_24f4: blt.s IL_24fe - - IL_24f6: ldloc.1 - IL_24f7: ldloc.1 - IL_24f8: ldloc.2 - IL_24f9: add - IL_24fa: sub - IL_24fb: stloc.1 - IL_24fc: br.s IL_2504 - - IL_24fe: ldloc.2 - IL_24ff: ldloc.1 - IL_2500: ldloc.2 - IL_2501: add - IL_2502: mul - IL_2503: stloc.2 - IL_2504: ldloc.1 - IL_2505: ldloc.2 - IL_2506: ble.s IL_2510 - - IL_2508: ldloc.1 - IL_2509: ldloc.1 - IL_250a: ldloc.2 - IL_250b: mul - IL_250c: add - IL_250d: stloc.1 - IL_250e: br.s IL_2516 - - IL_2510: ldloc.2 - IL_2511: ldloc.1 - IL_2512: ldloc.2 - IL_2513: mul - IL_2514: mul - IL_2515: stloc.2 - IL_2516: ldloc.1 - IL_2517: ldloc.2 - IL_2518: bge.s IL_2522 - - IL_251a: ldloc.1 - IL_251b: ldloc.1 - IL_251c: ldloc.2 - IL_251d: mul - IL_251e: mul - IL_251f: stloc.1 - IL_2520: br.s IL_2528 - - IL_2522: ldloc.2 - IL_2523: ldloc.1 - IL_2524: ldloc.2 - IL_2525: mul - IL_2526: sub - IL_2527: stloc.2 - IL_2528: ldloc.1 - IL_2529: ldloc.2 - IL_252a: blt.s IL_2534 - - IL_252c: ldloc.1 - IL_252d: ldloc.1 - IL_252e: ldloc.2 - IL_252f: sub - IL_2530: mul - IL_2531: stloc.1 - IL_2532: br.s IL_253a - - IL_2534: ldloc.2 - IL_2535: ldloc.1 - IL_2536: ldloc.2 - IL_2537: sub - IL_2538: add - IL_2539: stloc.2 - IL_253a: ldloc.1 - IL_253b: ldloc.2 - IL_253c: bge.s IL_2546 - - IL_253e: ldloc.1 - IL_253f: ldloc.1 - IL_2540: ldloc.2 - IL_2541: mul - IL_2542: sub - IL_2543: stloc.1 - IL_2544: br.s IL_254c - - IL_2546: ldloc.2 - IL_2547: ldloc.1 - IL_2548: ldloc.2 - IL_2549: mul - IL_254a: sub - IL_254b: stloc.2 - IL_254c: ldloc.1 - IL_254d: ldloc.2 - IL_254e: bne.un.s IL_2558 - - IL_2550: ldloc.1 - IL_2551: ldloc.1 - IL_2552: ldloc.2 - IL_2553: sub - IL_2554: sub - IL_2555: stloc.1 - IL_2556: br.s IL_255e - - IL_2558: ldloc.2 - IL_2559: ldloc.1 - IL_255a: ldloc.2 - IL_255b: sub - IL_255c: mul - IL_255d: stloc.2 - IL_255e: ldloc.1 - IL_255f: ldloc.2 - IL_2560: bge.s IL_256a - - IL_2562: ldloc.1 - IL_2563: ldloc.1 - IL_2564: ldloc.2 - IL_2565: add - IL_2566: mul - IL_2567: stloc.1 - IL_2568: br.s IL_2570 - - IL_256a: ldloc.2 - IL_256b: ldloc.1 - IL_256c: ldloc.2 - IL_256d: add - IL_256e: add - IL_256f: stloc.2 - IL_2570: ldloc.1 - IL_2571: ldloc.2 - IL_2572: ble.s IL_257c - - IL_2574: ldloc.1 - IL_2575: ldloc.1 - IL_2576: ldloc.2 - IL_2577: mul - IL_2578: add - IL_2579: stloc.1 - IL_257a: br.s IL_2582 - - IL_257c: ldloc.2 - IL_257d: ldloc.1 - IL_257e: ldloc.2 - IL_257f: mul - IL_2580: sub - IL_2581: stloc.2 - IL_2582: ldloc.1 - IL_2583: ldloc.2 - IL_2584: bgt.s IL_258e - - IL_2586: ldloc.1 - IL_2587: ldloc.1 - IL_2588: ldloc.2 - IL_2589: mul - IL_258a: add - IL_258b: stloc.1 - IL_258c: br.s IL_2594 - - IL_258e: ldloc.2 - IL_258f: ldloc.1 - IL_2590: ldloc.2 - IL_2591: mul - IL_2592: mul - IL_2593: stloc.2 - IL_2594: ldloc.1 - IL_2595: ldloc.2 - IL_2596: blt.s IL_25a0 - - IL_2598: ldloc.1 - IL_2599: ldloc.1 - IL_259a: ldloc.2 - IL_259b: sub - IL_259c: sub - IL_259d: stloc.1 - IL_259e: br.s IL_25a6 - - IL_25a0: ldloc.2 - IL_25a1: ldloc.1 - IL_25a2: ldloc.2 - IL_25a3: sub - IL_25a4: mul - IL_25a5: stloc.2 - IL_25a6: ldloc.1 - IL_25a7: ldloc.2 - IL_25a8: blt.s IL_25b2 - - IL_25aa: ldloc.1 - IL_25ab: ldloc.1 - IL_25ac: ldloc.2 - IL_25ad: mul - IL_25ae: add - IL_25af: stloc.1 - IL_25b0: br.s IL_25b8 - - IL_25b2: ldloc.2 - IL_25b3: ldloc.1 - IL_25b4: ldloc.2 - IL_25b5: mul - IL_25b6: mul - IL_25b7: stloc.2 - IL_25b8: ldloc.1 - IL_25b9: ldloc.2 - IL_25ba: blt.s IL_25c4 - - IL_25bc: ldloc.1 - IL_25bd: ldloc.1 - IL_25be: ldloc.2 - IL_25bf: mul - IL_25c0: add - IL_25c1: stloc.1 - IL_25c2: br.s IL_25ca - - IL_25c4: ldloc.2 - IL_25c5: ldloc.1 - IL_25c6: ldloc.2 - IL_25c7: mul - IL_25c8: add - IL_25c9: stloc.2 - IL_25ca: ldloc.1 - IL_25cb: ldloc.2 - IL_25cc: bne.un.s IL_25d6 - - IL_25ce: ldloc.1 - IL_25cf: ldloc.1 - IL_25d0: ldloc.2 - IL_25d1: sub - IL_25d2: sub - IL_25d3: stloc.1 - IL_25d4: br.s IL_25dc - - IL_25d6: ldloc.2 - IL_25d7: ldloc.1 - IL_25d8: ldloc.2 - IL_25d9: sub - IL_25da: add - IL_25db: stloc.2 - IL_25dc: ldloc.1 - IL_25dd: ldloc.2 - IL_25de: ble.s IL_25e8 - - IL_25e0: ldloc.1 - IL_25e1: ldloc.1 - IL_25e2: ldloc.2 - IL_25e3: mul - IL_25e4: sub - IL_25e5: stloc.1 - IL_25e6: br.s IL_25ee - - IL_25e8: ldloc.2 - IL_25e9: ldloc.1 - IL_25ea: ldloc.2 - IL_25eb: mul - IL_25ec: mul - IL_25ed: stloc.2 - IL_25ee: ldloc.1 - IL_25ef: ldloc.2 - IL_25f0: bne.un.s IL_25fa - - IL_25f2: ldloc.1 - IL_25f3: ldloc.1 - IL_25f4: ldloc.2 - IL_25f5: add - IL_25f6: sub - IL_25f7: stloc.1 - IL_25f8: br.s IL_2600 - - IL_25fa: ldloc.2 - IL_25fb: ldloc.1 - IL_25fc: ldloc.2 - IL_25fd: add - IL_25fe: mul - IL_25ff: stloc.2 - IL_2600: ldloc.1 - IL_2601: ldloc.2 - IL_2602: ble.s IL_260c - - IL_2604: ldloc.1 - IL_2605: ldloc.1 - IL_2606: ldloc.2 - IL_2607: add - IL_2608: mul - IL_2609: stloc.1 - IL_260a: br.s IL_2612 - - IL_260c: ldloc.2 - IL_260d: ldloc.1 - IL_260e: ldloc.2 - IL_260f: add - IL_2610: sub - IL_2611: stloc.2 - IL_2612: ldloc.1 - IL_2613: ldloc.2 - IL_2614: bge.s IL_261e - - IL_2616: ldloc.1 - IL_2617: ldloc.1 - IL_2618: ldloc.2 - IL_2619: add - IL_261a: mul - IL_261b: stloc.1 - IL_261c: br.s IL_2624 - - IL_261e: ldloc.2 - IL_261f: ldloc.1 - IL_2620: ldloc.2 - IL_2621: add - IL_2622: sub - IL_2623: stloc.2 - IL_2624: ldloc.1 - IL_2625: ldloc.2 - IL_2626: ble.s IL_2630 - - IL_2628: ldloc.1 - IL_2629: ldloc.1 - IL_262a: ldloc.2 - IL_262b: sub - IL_262c: sub - IL_262d: stloc.1 - IL_262e: br.s IL_2636 - - IL_2630: ldloc.2 - IL_2631: ldloc.1 - IL_2632: ldloc.2 - IL_2633: sub - IL_2634: add - IL_2635: stloc.2 - IL_2636: ldloc.1 - IL_2637: ldloc.2 - IL_2638: bne.un.s IL_2642 - - IL_263a: ldloc.1 - IL_263b: ldloc.1 - IL_263c: ldloc.2 - IL_263d: sub - IL_263e: mul - IL_263f: stloc.1 - IL_2640: br.s IL_2648 - - IL_2642: ldloc.2 - IL_2643: ldloc.1 - IL_2644: ldloc.2 - IL_2645: sub - IL_2646: sub - IL_2647: stloc.2 - IL_2648: ldloc.1 - IL_2649: ldloc.2 - IL_264a: bgt.s IL_2654 - - IL_264c: ldloc.1 - IL_264d: ldloc.1 - IL_264e: ldloc.2 - IL_264f: add - IL_2650: mul - IL_2651: stloc.1 - IL_2652: br.s IL_265a - - IL_2654: ldloc.2 - IL_2655: ldloc.1 - IL_2656: ldloc.2 - IL_2657: add - IL_2658: add - IL_2659: stloc.2 - IL_265a: ldloc.1 - IL_265b: ldloc.2 - IL_265c: bne.un.s IL_2666 - - IL_265e: ldloc.1 - IL_265f: ldloc.1 - IL_2660: ldloc.2 - IL_2661: sub - IL_2662: add - IL_2663: stloc.1 - IL_2664: br.s IL_266c - - IL_2666: ldloc.2 - IL_2667: ldloc.1 - IL_2668: ldloc.2 - IL_2669: sub - IL_266a: sub - IL_266b: stloc.2 - IL_266c: ldloc.1 - IL_266d: ldloc.2 - IL_266e: bne.un.s IL_2678 - - IL_2670: ldloc.1 - IL_2671: ldloc.1 - IL_2672: ldloc.2 - IL_2673: add - IL_2674: add - IL_2675: stloc.1 - IL_2676: br.s IL_267e - - IL_2678: ldloc.2 - IL_2679: ldloc.1 - IL_267a: ldloc.2 - IL_267b: add - IL_267c: mul - IL_267d: stloc.2 - IL_267e: ldloc.1 - IL_267f: ldloc.2 - IL_2680: bgt.s IL_268a - - IL_2682: ldloc.1 - IL_2683: ldloc.1 - IL_2684: ldloc.2 - IL_2685: mul - IL_2686: mul - IL_2687: stloc.1 - IL_2688: br.s IL_2690 - - IL_268a: ldloc.2 - IL_268b: ldloc.1 - IL_268c: ldloc.2 - IL_268d: mul - IL_268e: add - IL_268f: stloc.2 - IL_2690: ldloc.1 - IL_2691: ldloc.2 - IL_2692: bgt.s IL_269c - - IL_2694: ldloc.1 - IL_2695: ldloc.1 - IL_2696: ldloc.2 - IL_2697: mul - IL_2698: mul - IL_2699: stloc.1 - IL_269a: br.s IL_26a2 - - IL_269c: ldloc.2 - IL_269d: ldloc.1 - IL_269e: ldloc.2 - IL_269f: mul - IL_26a0: sub - IL_26a1: stloc.2 - IL_26a2: ldloc.1 - IL_26a3: ldloc.2 - IL_26a4: bgt.s IL_26ae - - IL_26a6: ldloc.1 - IL_26a7: ldloc.1 - IL_26a8: ldloc.2 - IL_26a9: mul - IL_26aa: mul - IL_26ab: stloc.1 - IL_26ac: br.s IL_26b4 - - IL_26ae: ldloc.2 - IL_26af: ldloc.1 - IL_26b0: ldloc.2 - IL_26b1: mul - IL_26b2: sub - IL_26b3: stloc.2 - IL_26b4: ldloc.1 - IL_26b5: ldloc.2 - IL_26b6: bgt.s IL_26c0 - - IL_26b8: ldloc.1 - IL_26b9: ldloc.1 - IL_26ba: ldloc.2 - IL_26bb: sub - IL_26bc: add - IL_26bd: stloc.1 - IL_26be: br.s IL_26c6 - - IL_26c0: ldloc.2 - IL_26c1: ldloc.1 - IL_26c2: ldloc.2 - IL_26c3: sub - IL_26c4: mul - IL_26c5: stloc.2 - IL_26c6: ldloc.1 - IL_26c7: ldloc.2 - IL_26c8: blt.s IL_26d2 - - IL_26ca: ldloc.1 - IL_26cb: ldloc.1 - IL_26cc: ldloc.2 - IL_26cd: add - IL_26ce: mul - IL_26cf: stloc.1 - IL_26d0: br.s IL_26d8 - - IL_26d2: ldloc.2 - IL_26d3: ldloc.1 - IL_26d4: ldloc.2 - IL_26d5: add - IL_26d6: sub - IL_26d7: stloc.2 - IL_26d8: ldloc.1 - IL_26d9: ldloc.2 - IL_26da: bge.s IL_26e4 - - IL_26dc: ldloc.1 - IL_26dd: ldloc.1 - IL_26de: ldloc.2 - IL_26df: mul - IL_26e0: add - IL_26e1: stloc.1 - IL_26e2: br.s IL_26ea - - IL_26e4: ldloc.2 - IL_26e5: ldloc.1 - IL_26e6: ldloc.2 - IL_26e7: mul - IL_26e8: sub - IL_26e9: stloc.2 - IL_26ea: ldloc.1 - IL_26eb: ldloc.2 - IL_26ec: blt.s IL_26f6 - - IL_26ee: ldloc.1 - IL_26ef: ldloc.1 - IL_26f0: ldloc.2 - IL_26f1: mul - IL_26f2: mul - IL_26f3: stloc.1 - IL_26f4: br.s IL_26fc - - IL_26f6: ldloc.2 - IL_26f7: ldloc.1 - IL_26f8: ldloc.2 - IL_26f9: mul - IL_26fa: add - IL_26fb: stloc.2 - IL_26fc: ldloc.1 - IL_26fd: ldloc.2 - IL_26fe: blt.s IL_2708 - - IL_2700: ldloc.1 - IL_2701: ldloc.1 - IL_2702: ldloc.2 - IL_2703: add - IL_2704: mul - IL_2705: stloc.1 - IL_2706: br.s IL_270e - - IL_2708: ldloc.2 - IL_2709: ldloc.1 - IL_270a: ldloc.2 - IL_270b: add - IL_270c: sub - IL_270d: stloc.2 - IL_270e: ldloc.1 - IL_270f: ldloc.2 - IL_2710: beq.s IL_271a - - IL_2712: ldloc.1 - IL_2713: ldloc.1 - IL_2714: ldloc.2 - IL_2715: add - IL_2716: sub - IL_2717: stloc.1 - IL_2718: br.s IL_2720 - - IL_271a: ldloc.2 - IL_271b: ldloc.1 - IL_271c: ldloc.2 - IL_271d: add - IL_271e: sub - IL_271f: stloc.2 - IL_2720: ldloc.1 - IL_2721: ldloc.2 - IL_2722: blt.s IL_272c - - IL_2724: ldloc.1 - IL_2725: ldloc.1 - IL_2726: ldloc.2 - IL_2727: mul - IL_2728: add - IL_2729: stloc.1 - IL_272a: br.s IL_2732 - - IL_272c: ldloc.2 - IL_272d: ldloc.1 - IL_272e: ldloc.2 - IL_272f: mul - IL_2730: mul - IL_2731: stloc.2 - IL_2732: ldloc.1 - IL_2733: ldloc.2 - IL_2734: blt.s IL_273e - - IL_2736: ldloc.1 - IL_2737: ldloc.1 - IL_2738: ldloc.2 - IL_2739: mul - IL_273a: mul - IL_273b: stloc.1 - IL_273c: br.s IL_2744 - - IL_273e: ldloc.2 - IL_273f: ldloc.1 - IL_2740: ldloc.2 - IL_2741: mul - IL_2742: mul - IL_2743: stloc.2 - IL_2744: ldloc.1 - IL_2745: ldloc.2 - IL_2746: blt.s IL_2750 - - IL_2748: ldloc.1 - IL_2749: ldloc.1 - IL_274a: ldloc.2 - IL_274b: mul - IL_274c: sub - IL_274d: stloc.1 - IL_274e: br.s IL_2756 - - IL_2750: ldloc.2 - IL_2751: ldloc.1 - IL_2752: ldloc.2 - IL_2753: mul - IL_2754: sub - IL_2755: stloc.2 - IL_2756: ldloc.1 - IL_2757: ldloc.2 - IL_2758: bgt.s IL_2762 - - IL_275a: ldloc.1 - IL_275b: ldloc.1 - IL_275c: ldloc.2 - IL_275d: mul - IL_275e: mul - IL_275f: stloc.1 - IL_2760: br.s IL_2768 - - IL_2762: ldloc.2 - IL_2763: ldloc.1 - IL_2764: ldloc.2 - IL_2765: mul - IL_2766: add - IL_2767: stloc.2 - IL_2768: ldloc.1 - IL_2769: ldloc.2 - IL_276a: blt.s IL_2774 - - IL_276c: ldloc.1 - IL_276d: ldloc.1 - IL_276e: ldloc.2 - IL_276f: sub - IL_2770: sub - IL_2771: stloc.1 - IL_2772: br.s IL_277a - - IL_2774: ldloc.2 - IL_2775: ldloc.1 - IL_2776: ldloc.2 - IL_2777: sub - IL_2778: mul - IL_2779: stloc.2 - IL_277a: ldloc.1 - IL_277b: ldloc.2 - IL_277c: bgt.s IL_2786 - - IL_277e: ldloc.1 - IL_277f: ldloc.1 - IL_2780: ldloc.2 - IL_2781: mul - IL_2782: sub - IL_2783: stloc.1 - IL_2784: br.s IL_278c - - IL_2786: ldloc.2 - IL_2787: ldloc.1 - IL_2788: ldloc.2 - IL_2789: mul - IL_278a: sub - IL_278b: stloc.2 - IL_278c: ldloc.1 - IL_278d: ldloc.2 - IL_278e: bgt.s IL_2798 - - IL_2790: ldloc.1 - IL_2791: ldloc.1 - IL_2792: ldloc.2 - IL_2793: mul - IL_2794: sub - IL_2795: stloc.1 - IL_2796: br.s IL_279e - - IL_2798: ldloc.2 - IL_2799: ldloc.1 - IL_279a: ldloc.2 - IL_279b: mul - IL_279c: add - IL_279d: stloc.2 - IL_279e: ldloc.1 - IL_279f: ldloc.2 - IL_27a0: bge.s IL_27aa - - IL_27a2: ldloc.1 - IL_27a3: ldloc.1 - IL_27a4: ldloc.2 - IL_27a5: add - IL_27a6: sub - IL_27a7: stloc.1 - IL_27a8: br.s IL_27b0 - - IL_27aa: ldloc.2 - IL_27ab: ldloc.1 - IL_27ac: ldloc.2 - IL_27ad: add - IL_27ae: mul - IL_27af: stloc.2 - IL_27b0: ldloc.1 - IL_27b1: ldloc.2 - IL_27b2: bgt.s IL_27bc - - IL_27b4: ldloc.1 - IL_27b5: ldloc.1 - IL_27b6: ldloc.2 - IL_27b7: sub - IL_27b8: sub - IL_27b9: stloc.1 - IL_27ba: br.s IL_27c2 - - IL_27bc: ldloc.2 - IL_27bd: ldloc.1 - IL_27be: ldloc.2 - IL_27bf: sub - IL_27c0: add - IL_27c1: stloc.2 - IL_27c2: ldloc.1 - IL_27c3: ldloc.2 - IL_27c4: bne.un.s IL_27ce - - IL_27c6: ldloc.1 - IL_27c7: ldloc.1 - IL_27c8: ldloc.2 - IL_27c9: sub - IL_27ca: sub - IL_27cb: stloc.1 - IL_27cc: br.s IL_27d4 - - IL_27ce: ldloc.2 - IL_27cf: ldloc.1 - IL_27d0: ldloc.2 - IL_27d1: sub - IL_27d2: mul - IL_27d3: stloc.2 - IL_27d4: ldloc.1 - IL_27d5: ldloc.2 - IL_27d6: ble.s IL_27e0 - - IL_27d8: ldloc.1 - IL_27d9: ldloc.1 - IL_27da: ldloc.2 - IL_27db: add - IL_27dc: sub - IL_27dd: stloc.1 - IL_27de: br.s IL_27e6 - - IL_27e0: ldloc.2 - IL_27e1: ldloc.1 - IL_27e2: ldloc.2 - IL_27e3: add - IL_27e4: add - IL_27e5: stloc.2 - IL_27e6: ldloc.1 - IL_27e7: ldloc.2 - IL_27e8: bge.s IL_27f2 - - IL_27ea: ldloc.1 - IL_27eb: ldloc.1 - IL_27ec: ldloc.2 - IL_27ed: sub - IL_27ee: sub - IL_27ef: stloc.1 - IL_27f0: br.s IL_27f8 - - IL_27f2: ldloc.2 - IL_27f3: ldloc.1 - IL_27f4: ldloc.2 - IL_27f5: sub - IL_27f6: add - IL_27f7: stloc.2 - IL_27f8: ldloc.1 - IL_27f9: ldloc.2 - IL_27fa: beq.s IL_2804 - - IL_27fc: ldloc.1 - IL_27fd: ldloc.1 - IL_27fe: ldloc.2 - IL_27ff: sub - IL_2800: sub - IL_2801: stloc.1 - IL_2802: br.s IL_280a - - IL_2804: ldloc.2 - IL_2805: ldloc.1 - IL_2806: ldloc.2 - IL_2807: sub - IL_2808: mul - IL_2809: stloc.2 - IL_280a: ldloc.1 - IL_280b: ldloc.2 - IL_280c: bgt.s IL_2816 - - IL_280e: ldloc.1 - IL_280f: ldloc.1 - IL_2810: ldloc.2 - IL_2811: mul - IL_2812: mul - IL_2813: stloc.1 - IL_2814: br.s IL_281c - - IL_2816: ldloc.2 - IL_2817: ldloc.1 - IL_2818: ldloc.2 - IL_2819: mul - IL_281a: sub - IL_281b: stloc.2 - IL_281c: ldloc.1 - IL_281d: ldloc.2 - IL_281e: bgt.s IL_2828 - - IL_2820: ldloc.1 - IL_2821: ldloc.1 - IL_2822: ldloc.2 - IL_2823: mul - IL_2824: add - IL_2825: stloc.1 - IL_2826: br.s IL_282e - - IL_2828: ldloc.2 - IL_2829: ldloc.1 - IL_282a: ldloc.2 - IL_282b: mul - IL_282c: sub - IL_282d: stloc.2 - IL_282e: ldloc.1 - IL_282f: ldloc.2 - IL_2830: blt.s IL_283a - - IL_2832: ldloc.1 - IL_2833: ldloc.1 - IL_2834: ldloc.2 - IL_2835: add - IL_2836: add - IL_2837: stloc.1 - IL_2838: br.s IL_2840 - - IL_283a: ldloc.2 - IL_283b: ldloc.1 - IL_283c: ldloc.2 - IL_283d: add - IL_283e: mul - IL_283f: stloc.2 - IL_2840: ldloc.1 - IL_2841: ldloc.2 - IL_2842: bgt.s IL_284c - - IL_2844: ldloc.1 - IL_2845: ldloc.1 - IL_2846: ldloc.2 - IL_2847: mul - IL_2848: sub - IL_2849: stloc.1 - IL_284a: br.s IL_2852 - - IL_284c: ldloc.2 - IL_284d: ldloc.1 - IL_284e: ldloc.2 - IL_284f: mul - IL_2850: add - IL_2851: stloc.2 - IL_2852: ldloc.1 - IL_2853: ldloc.2 - IL_2854: beq.s IL_285e - - IL_2856: ldloc.1 - IL_2857: ldloc.1 - IL_2858: ldloc.2 - IL_2859: mul - IL_285a: mul - IL_285b: stloc.1 - IL_285c: br.s IL_2864 - - IL_285e: ldloc.2 - IL_285f: ldloc.1 - IL_2860: ldloc.2 - IL_2861: mul - IL_2862: add - IL_2863: stloc.2 - IL_2864: ldloc.1 - IL_2865: ldloc.2 - IL_2866: bne.un.s IL_2870 - - IL_2868: ldloc.1 - IL_2869: ldloc.1 - IL_286a: ldloc.2 - IL_286b: add - IL_286c: add - IL_286d: stloc.1 - IL_286e: br.s IL_2876 - - IL_2870: ldloc.2 - IL_2871: ldloc.1 - IL_2872: ldloc.2 - IL_2873: add - IL_2874: sub - IL_2875: stloc.2 - IL_2876: ldloc.1 - IL_2877: ldloc.2 - IL_2878: ble.s IL_2882 - - IL_287a: ldloc.1 - IL_287b: ldloc.1 - IL_287c: ldloc.2 - IL_287d: add - IL_287e: sub - IL_287f: stloc.1 - IL_2880: br.s IL_2888 - - IL_2882: ldloc.2 - IL_2883: ldloc.1 - IL_2884: ldloc.2 - IL_2885: add - IL_2886: sub - IL_2887: stloc.2 - IL_2888: ldloc.1 - IL_2889: ldloc.2 - IL_288a: blt.s IL_2894 - - IL_288c: ldloc.1 - IL_288d: ldloc.1 - IL_288e: ldloc.2 - IL_288f: sub - IL_2890: mul - IL_2891: stloc.1 - IL_2892: br.s IL_289a - - IL_2894: ldloc.2 - IL_2895: ldloc.1 - IL_2896: ldloc.2 - IL_2897: sub - IL_2898: mul - IL_2899: stloc.2 - IL_289a: ldloc.1 - IL_289b: ldloc.2 - IL_289c: bne.un.s IL_28a6 - - IL_289e: ldloc.1 - IL_289f: ldloc.1 - IL_28a0: ldloc.2 - IL_28a1: sub - IL_28a2: sub - IL_28a3: stloc.1 - IL_28a4: br.s IL_28ac - - IL_28a6: ldloc.2 - IL_28a7: ldloc.1 - IL_28a8: ldloc.2 - IL_28a9: sub - IL_28aa: sub - IL_28ab: stloc.2 - IL_28ac: ldloc.1 - IL_28ad: ldloc.2 - IL_28ae: bge.s IL_28b8 - - IL_28b0: ldloc.1 - IL_28b1: ldloc.1 - IL_28b2: ldloc.2 - IL_28b3: sub - IL_28b4: add - IL_28b5: stloc.1 - IL_28b6: br.s IL_28be - - IL_28b8: ldloc.2 - IL_28b9: ldloc.1 - IL_28ba: ldloc.2 - IL_28bb: sub - IL_28bc: mul - IL_28bd: stloc.2 - IL_28be: ldloc.1 - IL_28bf: ldloc.2 - IL_28c0: bge.s IL_28ca - - IL_28c2: ldloc.1 - IL_28c3: ldloc.1 - IL_28c4: ldloc.2 - IL_28c5: mul - IL_28c6: mul - IL_28c7: stloc.1 - IL_28c8: br.s IL_28d0 - - IL_28ca: ldloc.2 - IL_28cb: ldloc.1 - IL_28cc: ldloc.2 - IL_28cd: mul - IL_28ce: add - IL_28cf: stloc.2 - IL_28d0: ldloc.1 - IL_28d1: ldloc.2 - IL_28d2: bne.un.s IL_28dc - - IL_28d4: ldloc.1 - IL_28d5: ldloc.1 - IL_28d6: ldloc.2 - IL_28d7: mul - IL_28d8: add - IL_28d9: stloc.1 - IL_28da: br.s IL_28e2 - - IL_28dc: ldloc.2 - IL_28dd: ldloc.1 - IL_28de: ldloc.2 - IL_28df: mul - IL_28e0: sub - IL_28e1: stloc.2 - IL_28e2: ldloc.1 - IL_28e3: ldloc.2 - IL_28e4: bge.s IL_28ee - - IL_28e6: ldloc.1 - IL_28e7: ldloc.1 - IL_28e8: ldloc.2 - IL_28e9: add - IL_28ea: add - IL_28eb: stloc.1 - IL_28ec: br.s IL_28f4 - - IL_28ee: ldloc.2 - IL_28ef: ldloc.1 - IL_28f0: ldloc.2 - IL_28f1: add - IL_28f2: sub - IL_28f3: stloc.2 - IL_28f4: ldloc.1 - IL_28f5: ldloc.2 - IL_28f6: bge.s IL_2900 - - IL_28f8: ldloc.1 - IL_28f9: ldloc.1 - IL_28fa: ldloc.2 - IL_28fb: add - IL_28fc: mul - IL_28fd: stloc.1 - IL_28fe: br.s IL_2906 - - IL_2900: ldloc.2 - IL_2901: ldloc.1 - IL_2902: ldloc.2 - IL_2903: add - IL_2904: sub - IL_2905: stloc.2 - IL_2906: ldloc.1 - IL_2907: ldloc.2 - IL_2908: bgt.s IL_2912 - - IL_290a: ldloc.1 - IL_290b: ldloc.1 - IL_290c: ldloc.2 - IL_290d: add - IL_290e: add - IL_290f: stloc.1 - IL_2910: br.s IL_2918 - - IL_2912: ldloc.2 - IL_2913: ldloc.1 - IL_2914: ldloc.2 - IL_2915: add - IL_2916: mul - IL_2917: stloc.2 - IL_2918: ldloc.1 - IL_2919: ldloc.2 - IL_291a: bgt.s IL_2924 - - IL_291c: ldloc.1 - IL_291d: ldloc.1 - IL_291e: ldloc.2 - IL_291f: sub - IL_2920: add - IL_2921: stloc.1 - IL_2922: br.s IL_292a - - IL_2924: ldloc.2 - IL_2925: ldloc.1 - IL_2926: ldloc.2 - IL_2927: sub - IL_2928: sub - IL_2929: stloc.2 - IL_292a: ldloc.1 - IL_292b: ldloc.2 - IL_292c: blt.s IL_2936 - - IL_292e: ldloc.1 - IL_292f: ldloc.1 - IL_2930: ldloc.2 - IL_2931: add - IL_2932: add - IL_2933: stloc.1 - IL_2934: br.s IL_293c - - IL_2936: ldloc.2 - IL_2937: ldloc.1 - IL_2938: ldloc.2 - IL_2939: add - IL_293a: sub - IL_293b: stloc.2 - IL_293c: ldloc.1 - IL_293d: ldloc.2 - IL_293e: bne.un.s IL_2948 - - IL_2940: ldloc.1 - IL_2941: ldloc.1 - IL_2942: ldloc.2 - IL_2943: mul - IL_2944: sub - IL_2945: stloc.1 - IL_2946: br.s IL_294e - - IL_2948: ldloc.2 - IL_2949: ldloc.1 - IL_294a: ldloc.2 - IL_294b: mul - IL_294c: mul - IL_294d: stloc.2 - IL_294e: ldloc.1 - IL_294f: ldloc.2 - IL_2950: beq.s IL_295a - - IL_2952: ldloc.1 - IL_2953: ldloc.1 - IL_2954: ldloc.2 - IL_2955: mul - IL_2956: sub - IL_2957: stloc.1 - IL_2958: br.s IL_2960 - - IL_295a: ldloc.2 - IL_295b: ldloc.1 - IL_295c: ldloc.2 - IL_295d: mul - IL_295e: sub - IL_295f: stloc.2 - IL_2960: ldloc.1 - IL_2961: ldloc.2 - IL_2962: bge.s IL_296c - - IL_2964: ldloc.1 - IL_2965: ldloc.1 - IL_2966: ldloc.2 - IL_2967: mul - IL_2968: sub - IL_2969: stloc.1 - IL_296a: br.s IL_2972 - - IL_296c: ldloc.2 - IL_296d: ldloc.1 - IL_296e: ldloc.2 - IL_296f: mul - IL_2970: add - IL_2971: stloc.2 - IL_2972: ldloc.1 - IL_2973: ldloc.2 - IL_2974: bne.un.s IL_297e - - IL_2976: ldloc.1 - IL_2977: ldloc.1 - IL_2978: ldloc.2 - IL_2979: add - IL_297a: mul - IL_297b: stloc.1 - IL_297c: br.s IL_2984 - - IL_297e: ldloc.2 - IL_297f: ldloc.1 - IL_2980: ldloc.2 - IL_2981: add - IL_2982: mul - IL_2983: stloc.2 - IL_2984: ldloc.1 - IL_2985: ldloc.2 - IL_2986: blt.s IL_2990 - - IL_2988: ldloc.1 - IL_2989: ldloc.1 - IL_298a: ldloc.2 - IL_298b: mul - IL_298c: sub - IL_298d: stloc.1 - IL_298e: br.s IL_2996 - - IL_2990: ldloc.2 - IL_2991: ldloc.1 - IL_2992: ldloc.2 - IL_2993: mul - IL_2994: add - IL_2995: stloc.2 - IL_2996: ldloc.1 - IL_2997: ldloc.2 - IL_2998: beq.s IL_29a2 - - IL_299a: ldloc.1 - IL_299b: ldloc.1 - IL_299c: ldloc.2 - IL_299d: mul - IL_299e: sub - IL_299f: stloc.1 - IL_29a0: br.s IL_29a8 - - IL_29a2: ldloc.2 - IL_29a3: ldloc.1 - IL_29a4: ldloc.2 - IL_29a5: mul - IL_29a6: add - IL_29a7: stloc.2 - IL_29a8: ldloc.1 - IL_29a9: ldloc.2 - IL_29aa: bge.s IL_29b4 - - IL_29ac: ldloc.1 - IL_29ad: ldloc.1 - IL_29ae: ldloc.2 - IL_29af: add - IL_29b0: sub - IL_29b1: stloc.1 - IL_29b2: br.s IL_29ba - - IL_29b4: ldloc.2 - IL_29b5: ldloc.1 - IL_29b6: ldloc.2 - IL_29b7: add - IL_29b8: add - IL_29b9: stloc.2 - IL_29ba: ldloc.1 - IL_29bb: ldloc.2 - IL_29bc: bgt.s IL_29c6 - - IL_29be: ldloc.1 - IL_29bf: ldloc.1 - IL_29c0: ldloc.2 - IL_29c1: mul - IL_29c2: mul - IL_29c3: stloc.1 - IL_29c4: br.s IL_29cc - - IL_29c6: ldloc.2 - IL_29c7: ldloc.1 - IL_29c8: ldloc.2 - IL_29c9: mul - IL_29ca: sub - IL_29cb: stloc.2 - IL_29cc: ldloc.1 - IL_29cd: ldloc.2 - IL_29ce: beq.s IL_29d8 - - IL_29d0: ldloc.1 - IL_29d1: ldloc.1 - IL_29d2: ldloc.2 - IL_29d3: mul - IL_29d4: sub - IL_29d5: stloc.1 - IL_29d6: br.s IL_29de - - IL_29d8: ldloc.2 - IL_29d9: ldloc.1 - IL_29da: ldloc.2 - IL_29db: mul - IL_29dc: mul - IL_29dd: stloc.2 - IL_29de: ldloc.1 - IL_29df: ldloc.2 - IL_29e0: bgt.s IL_29ea - - IL_29e2: ldloc.1 - IL_29e3: ldloc.1 - IL_29e4: ldloc.2 - IL_29e5: mul - IL_29e6: mul - IL_29e7: stloc.1 - IL_29e8: br.s IL_29f0 - - IL_29ea: ldloc.2 - IL_29eb: ldloc.1 - IL_29ec: ldloc.2 - IL_29ed: mul - IL_29ee: add - IL_29ef: stloc.2 - IL_29f0: ldloc.1 - IL_29f1: ldloc.2 - IL_29f2: bge.s IL_29fc - - IL_29f4: ldloc.1 - IL_29f5: ldloc.1 - IL_29f6: ldloc.2 - IL_29f7: add - IL_29f8: mul - IL_29f9: stloc.1 - IL_29fa: br.s IL_2a02 - - IL_29fc: ldloc.2 - IL_29fd: ldloc.1 - IL_29fe: ldloc.2 - IL_29ff: add - IL_2a00: add - IL_2a01: stloc.2 - IL_2a02: ldloc.1 - IL_2a03: ldloc.2 - IL_2a04: beq.s IL_2a0e - - IL_2a06: ldloc.1 - IL_2a07: ldloc.1 - IL_2a08: ldloc.2 - IL_2a09: mul - IL_2a0a: add - IL_2a0b: stloc.1 - IL_2a0c: br.s IL_2a14 - - IL_2a0e: ldloc.2 - IL_2a0f: ldloc.1 - IL_2a10: ldloc.2 - IL_2a11: mul - IL_2a12: sub - IL_2a13: stloc.2 - IL_2a14: ldloc.1 - IL_2a15: ldloc.2 - IL_2a16: bge.s IL_2a20 - - IL_2a18: ldloc.1 - IL_2a19: ldloc.1 - IL_2a1a: ldloc.2 - IL_2a1b: mul - IL_2a1c: sub - IL_2a1d: stloc.1 - IL_2a1e: br.s IL_2a26 - - IL_2a20: ldloc.2 - IL_2a21: ldloc.1 - IL_2a22: ldloc.2 - IL_2a23: mul - IL_2a24: add - IL_2a25: stloc.2 - IL_2a26: ldloc.1 - IL_2a27: ldloc.2 - IL_2a28: bne.un.s IL_2a32 - - IL_2a2a: ldloc.1 - IL_2a2b: ldloc.1 - IL_2a2c: ldloc.2 - IL_2a2d: sub - IL_2a2e: sub - IL_2a2f: stloc.1 - IL_2a30: br.s IL_2a38 - - IL_2a32: ldloc.2 - IL_2a33: ldloc.1 - IL_2a34: ldloc.2 - IL_2a35: sub - IL_2a36: add - IL_2a37: stloc.2 - IL_2a38: ldloc.1 - IL_2a39: ldloc.2 - IL_2a3a: blt.s IL_2a44 - - IL_2a3c: ldloc.1 - IL_2a3d: ldloc.1 - IL_2a3e: ldloc.2 - IL_2a3f: sub - IL_2a40: mul - IL_2a41: stloc.1 - IL_2a42: br.s IL_2a4a - - IL_2a44: ldloc.2 - IL_2a45: ldloc.1 - IL_2a46: ldloc.2 - IL_2a47: sub - IL_2a48: sub - IL_2a49: stloc.2 - IL_2a4a: ldloc.1 - IL_2a4b: ldloc.2 - IL_2a4c: blt.s IL_2a56 - - IL_2a4e: ldloc.1 - IL_2a4f: ldloc.1 - IL_2a50: ldloc.2 - IL_2a51: sub - IL_2a52: sub - IL_2a53: stloc.1 - IL_2a54: br.s IL_2a5c - - IL_2a56: ldloc.2 - IL_2a57: ldloc.1 - IL_2a58: ldloc.2 - IL_2a59: sub - IL_2a5a: add - IL_2a5b: stloc.2 - IL_2a5c: ldloc.1 - IL_2a5d: ldloc.2 - IL_2a5e: ble.s IL_2a68 - - IL_2a60: ldloc.1 - IL_2a61: ldloc.1 - IL_2a62: ldloc.2 - IL_2a63: sub - IL_2a64: sub - IL_2a65: stloc.1 - IL_2a66: br.s IL_2a6e - - IL_2a68: ldloc.2 - IL_2a69: ldloc.1 - IL_2a6a: ldloc.2 - IL_2a6b: sub - IL_2a6c: mul - IL_2a6d: stloc.2 - IL_2a6e: ldloc.1 - IL_2a6f: ldloc.2 - IL_2a70: bne.un.s IL_2a7a - - IL_2a72: ldloc.1 - IL_2a73: ldloc.1 - IL_2a74: ldloc.2 - IL_2a75: mul - IL_2a76: add - IL_2a77: stloc.1 - IL_2a78: br.s IL_2a80 - - IL_2a7a: ldloc.2 - IL_2a7b: ldloc.1 - IL_2a7c: ldloc.2 - IL_2a7d: mul - IL_2a7e: sub - IL_2a7f: stloc.2 - IL_2a80: ldloc.1 - IL_2a81: ldloc.2 - IL_2a82: blt.s IL_2a8c - - IL_2a84: ldloc.1 - IL_2a85: ldloc.1 - IL_2a86: ldloc.2 - IL_2a87: add - IL_2a88: sub - IL_2a89: stloc.1 - IL_2a8a: br.s IL_2a92 - - IL_2a8c: ldloc.2 - IL_2a8d: ldloc.1 - IL_2a8e: ldloc.2 - IL_2a8f: add - IL_2a90: sub - IL_2a91: stloc.2 - IL_2a92: ldloc.1 - IL_2a93: ldloc.2 - IL_2a94: bge.s IL_2a9e - - IL_2a96: ldloc.1 - IL_2a97: ldloc.1 - IL_2a98: ldloc.2 - IL_2a99: add - IL_2a9a: add - IL_2a9b: stloc.1 - IL_2a9c: br.s IL_2aa4 - - IL_2a9e: ldloc.2 - IL_2a9f: ldloc.1 - IL_2aa0: ldloc.2 - IL_2aa1: add - IL_2aa2: mul - IL_2aa3: stloc.2 - IL_2aa4: ldloc.1 - IL_2aa5: ldloc.2 - IL_2aa6: ble.s IL_2ab0 - - IL_2aa8: ldloc.1 - IL_2aa9: ldloc.1 - IL_2aaa: ldloc.2 - IL_2aab: add - IL_2aac: sub - IL_2aad: stloc.1 - IL_2aae: br.s IL_2ab6 - - IL_2ab0: ldloc.2 - IL_2ab1: ldloc.1 - IL_2ab2: ldloc.2 - IL_2ab3: add - IL_2ab4: mul - IL_2ab5: stloc.2 - IL_2ab6: ldloc.1 - IL_2ab7: ldloc.2 - IL_2ab8: bne.un.s IL_2ac2 - - IL_2aba: ldloc.1 - IL_2abb: ldloc.1 - IL_2abc: ldloc.2 - IL_2abd: add - IL_2abe: sub - IL_2abf: stloc.1 - IL_2ac0: br.s IL_2ac8 - - IL_2ac2: ldloc.2 - IL_2ac3: ldloc.1 - IL_2ac4: ldloc.2 - IL_2ac5: add - IL_2ac6: add - IL_2ac7: stloc.2 - IL_2ac8: ldloc.1 - IL_2ac9: ldloc.2 - IL_2aca: bge.s IL_2ad4 - - IL_2acc: ldloc.1 - IL_2acd: ldloc.1 - IL_2ace: ldloc.2 - IL_2acf: mul - IL_2ad0: sub - IL_2ad1: stloc.1 - IL_2ad2: br.s IL_2ada - - IL_2ad4: ldloc.2 - IL_2ad5: ldloc.1 - IL_2ad6: ldloc.2 - IL_2ad7: mul - IL_2ad8: add - IL_2ad9: stloc.2 - IL_2ada: ldloc.1 - IL_2adb: ldloc.2 - IL_2adc: ble.s IL_2ae6 - - IL_2ade: ldloc.1 - IL_2adf: ldloc.1 - IL_2ae0: ldloc.2 - IL_2ae1: mul - IL_2ae2: mul - IL_2ae3: stloc.1 - IL_2ae4: br.s IL_2aec - - IL_2ae6: ldloc.2 - IL_2ae7: ldloc.1 - IL_2ae8: ldloc.2 - IL_2ae9: mul - IL_2aea: add - IL_2aeb: stloc.2 - IL_2aec: ldloc.1 - IL_2aed: ldloc.2 - IL_2aee: bgt.s IL_2af8 - - IL_2af0: ldloc.1 - IL_2af1: ldloc.1 - IL_2af2: ldloc.2 - IL_2af3: sub - IL_2af4: sub - IL_2af5: stloc.1 - IL_2af6: br.s IL_2afe - - IL_2af8: ldloc.2 - IL_2af9: ldloc.1 - IL_2afa: ldloc.2 - IL_2afb: sub - IL_2afc: mul - IL_2afd: stloc.2 - IL_2afe: ldloc.1 - IL_2aff: ldloc.2 - IL_2b00: ble.s IL_2b0a - - IL_2b02: ldloc.1 - IL_2b03: ldloc.1 - IL_2b04: ldloc.2 - IL_2b05: add - IL_2b06: add - IL_2b07: stloc.1 - IL_2b08: br.s IL_2b10 - - IL_2b0a: ldloc.2 - IL_2b0b: ldloc.1 - IL_2b0c: ldloc.2 - IL_2b0d: add - IL_2b0e: mul - IL_2b0f: stloc.2 - IL_2b10: ldloc.1 - IL_2b11: ldloc.2 - IL_2b12: beq.s IL_2b1c - - IL_2b14: ldloc.1 - IL_2b15: ldloc.1 - IL_2b16: ldloc.2 - IL_2b17: add - IL_2b18: add - IL_2b19: stloc.1 - IL_2b1a: br.s IL_2b22 - - IL_2b1c: ldloc.2 - IL_2b1d: ldloc.1 - IL_2b1e: ldloc.2 - IL_2b1f: add - IL_2b20: sub - IL_2b21: stloc.2 - IL_2b22: ldloc.1 - IL_2b23: ldloc.2 - IL_2b24: ble.s IL_2b2e - - IL_2b26: ldloc.1 - IL_2b27: ldloc.1 - IL_2b28: ldloc.2 - IL_2b29: sub - IL_2b2a: add - IL_2b2b: stloc.1 - IL_2b2c: br.s IL_2b34 - - IL_2b2e: ldloc.2 - IL_2b2f: ldloc.1 - IL_2b30: ldloc.2 - IL_2b31: sub - IL_2b32: add - IL_2b33: stloc.2 - IL_2b34: ldloc.1 - IL_2b35: ldloc.2 - IL_2b36: bne.un.s IL_2b40 - - IL_2b38: ldloc.1 - IL_2b39: ldloc.1 - IL_2b3a: ldloc.2 - IL_2b3b: add - IL_2b3c: sub - IL_2b3d: stloc.1 - IL_2b3e: br.s IL_2b46 - - IL_2b40: ldloc.2 - IL_2b41: ldloc.1 - IL_2b42: ldloc.2 - IL_2b43: add - IL_2b44: add - IL_2b45: stloc.2 - IL_2b46: ldloc.1 - IL_2b47: ldloc.2 - IL_2b48: bgt.s IL_2b52 - - IL_2b4a: ldloc.1 - IL_2b4b: ldloc.1 - IL_2b4c: ldloc.2 - IL_2b4d: sub - IL_2b4e: add - IL_2b4f: stloc.1 - IL_2b50: br.s IL_2b58 - - IL_2b52: ldloc.2 - IL_2b53: ldloc.1 - IL_2b54: ldloc.2 - IL_2b55: sub - IL_2b56: mul - IL_2b57: stloc.2 - IL_2b58: ldloc.1 - IL_2b59: ldloc.2 - IL_2b5a: blt.s IL_2b64 - - IL_2b5c: ldloc.1 - IL_2b5d: ldloc.1 - IL_2b5e: ldloc.2 - IL_2b5f: add - IL_2b60: mul - IL_2b61: stloc.1 - IL_2b62: br.s IL_2b6a - - IL_2b64: ldloc.2 - IL_2b65: ldloc.1 - IL_2b66: ldloc.2 - IL_2b67: add - IL_2b68: add - IL_2b69: stloc.2 - IL_2b6a: ldloc.1 - IL_2b6b: ldloc.2 - IL_2b6c: ble.s IL_2b76 - - IL_2b6e: ldloc.1 - IL_2b6f: ldloc.1 - IL_2b70: ldloc.2 - IL_2b71: sub - IL_2b72: sub - IL_2b73: stloc.1 - IL_2b74: br.s IL_2b7c - - IL_2b76: ldloc.2 - IL_2b77: ldloc.1 - IL_2b78: ldloc.2 - IL_2b79: sub - IL_2b7a: mul - IL_2b7b: stloc.2 - IL_2b7c: ldloc.1 - IL_2b7d: ldloc.2 - IL_2b7e: bge.s IL_2b88 - - IL_2b80: ldloc.1 - IL_2b81: ldloc.1 - IL_2b82: ldloc.2 - IL_2b83: mul - IL_2b84: sub - IL_2b85: stloc.1 - IL_2b86: br.s IL_2b8e - - IL_2b88: ldloc.2 - IL_2b89: ldloc.1 - IL_2b8a: ldloc.2 - IL_2b8b: mul - IL_2b8c: sub - IL_2b8d: stloc.2 - IL_2b8e: ldloc.1 - IL_2b8f: ldloc.2 - IL_2b90: bge.s IL_2b9a - - IL_2b92: ldloc.1 - IL_2b93: ldloc.1 - IL_2b94: ldloc.2 - IL_2b95: add - IL_2b96: sub - IL_2b97: stloc.1 - IL_2b98: br.s IL_2ba0 - - IL_2b9a: ldloc.2 - IL_2b9b: ldloc.1 - IL_2b9c: ldloc.2 - IL_2b9d: add - IL_2b9e: mul - IL_2b9f: stloc.2 - IL_2ba0: ldloc.1 - IL_2ba1: ldloc.2 - IL_2ba2: blt.s IL_2bac - - IL_2ba4: ldloc.1 - IL_2ba5: ldloc.1 - IL_2ba6: ldloc.2 - IL_2ba7: sub - IL_2ba8: mul - IL_2ba9: stloc.1 - IL_2baa: br.s IL_2bb2 - - IL_2bac: ldloc.2 - IL_2bad: ldloc.1 - IL_2bae: ldloc.2 - IL_2baf: sub - IL_2bb0: add - IL_2bb1: stloc.2 - IL_2bb2: ldloc.1 - IL_2bb3: ldloc.2 - IL_2bb4: ble.s IL_2bbe - - IL_2bb6: ldloc.1 - IL_2bb7: ldloc.1 - IL_2bb8: ldloc.2 - IL_2bb9: mul - IL_2bba: mul - IL_2bbb: stloc.1 - IL_2bbc: br.s IL_2bc4 - - IL_2bbe: ldloc.2 - IL_2bbf: ldloc.1 - IL_2bc0: ldloc.2 - IL_2bc1: mul - IL_2bc2: add - IL_2bc3: stloc.2 - IL_2bc4: ldloc.1 - IL_2bc5: ldloc.2 - IL_2bc6: blt.s IL_2bd0 - - IL_2bc8: ldloc.1 - IL_2bc9: ldloc.1 - IL_2bca: ldloc.2 - IL_2bcb: sub - IL_2bcc: mul - IL_2bcd: stloc.1 - IL_2bce: br.s IL_2bd6 - - IL_2bd0: ldloc.2 - IL_2bd1: ldloc.1 - IL_2bd2: ldloc.2 - IL_2bd3: sub - IL_2bd4: mul - IL_2bd5: stloc.2 - IL_2bd6: ldloc.1 - IL_2bd7: ldloc.2 - IL_2bd8: bgt.s IL_2be2 - - IL_2bda: ldloc.1 - IL_2bdb: ldloc.1 - IL_2bdc: ldloc.2 - IL_2bdd: sub - IL_2bde: add - IL_2bdf: stloc.1 - IL_2be0: br.s IL_2be8 - - IL_2be2: ldloc.2 - IL_2be3: ldloc.1 - IL_2be4: ldloc.2 - IL_2be5: sub - IL_2be6: add - IL_2be7: stloc.2 - IL_2be8: ldloc.1 - IL_2be9: ldloc.2 - IL_2bea: bne.un.s IL_2bf4 - - IL_2bec: ldloc.1 - IL_2bed: ldloc.1 - IL_2bee: ldloc.2 - IL_2bef: sub - IL_2bf0: add - IL_2bf1: stloc.1 - IL_2bf2: br.s IL_2bfa - - IL_2bf4: ldloc.2 - IL_2bf5: ldloc.1 - IL_2bf6: ldloc.2 - IL_2bf7: sub - IL_2bf8: mul - IL_2bf9: stloc.2 - IL_2bfa: ldloc.1 - IL_2bfb: ldloc.2 - IL_2bfc: beq.s IL_2c06 - - IL_2bfe: ldloc.1 - IL_2bff: ldloc.1 - IL_2c00: ldloc.2 - IL_2c01: add - IL_2c02: sub - IL_2c03: stloc.1 - IL_2c04: br.s IL_2c0c - - IL_2c06: ldloc.2 - IL_2c07: ldloc.1 - IL_2c08: ldloc.2 - IL_2c09: add - IL_2c0a: mul - IL_2c0b: stloc.2 - IL_2c0c: ldloc.1 - IL_2c0d: ldloc.2 - IL_2c0e: bgt.s IL_2c18 - - IL_2c10: ldloc.1 - IL_2c11: ldloc.1 - IL_2c12: ldloc.2 - IL_2c13: sub - IL_2c14: mul - IL_2c15: stloc.1 - IL_2c16: br.s IL_2c1e - - IL_2c18: ldloc.2 - IL_2c19: ldloc.1 - IL_2c1a: ldloc.2 - IL_2c1b: sub - IL_2c1c: mul - IL_2c1d: stloc.2 - IL_2c1e: ldloc.1 - IL_2c1f: ldloc.2 - IL_2c20: bne.un.s IL_2c2a - - IL_2c22: ldloc.1 - IL_2c23: ldloc.1 - IL_2c24: ldloc.2 - IL_2c25: add - IL_2c26: sub - IL_2c27: stloc.1 - IL_2c28: br.s IL_2c30 - - IL_2c2a: ldloc.2 - IL_2c2b: ldloc.1 - IL_2c2c: ldloc.2 - IL_2c2d: add - IL_2c2e: add - IL_2c2f: stloc.2 - IL_2c30: ldloc.1 - IL_2c31: ldloc.2 - IL_2c32: bgt.s IL_2c3c - - IL_2c34: ldloc.1 - IL_2c35: ldloc.1 - IL_2c36: ldloc.2 - IL_2c37: mul - IL_2c38: add - IL_2c39: stloc.1 - IL_2c3a: br.s IL_2c42 - - IL_2c3c: ldloc.2 - IL_2c3d: ldloc.1 - IL_2c3e: ldloc.2 - IL_2c3f: mul - IL_2c40: mul - IL_2c41: stloc.2 - IL_2c42: ldloc.1 - IL_2c43: ldloc.2 - IL_2c44: beq.s IL_2c4e - - IL_2c46: ldloc.1 - IL_2c47: ldloc.1 - IL_2c48: ldloc.2 - IL_2c49: sub - IL_2c4a: sub - IL_2c4b: stloc.1 - IL_2c4c: br.s IL_2c54 - - IL_2c4e: ldloc.2 - IL_2c4f: ldloc.1 - IL_2c50: ldloc.2 - IL_2c51: sub - IL_2c52: sub - IL_2c53: stloc.2 - IL_2c54: ldloc.1 - IL_2c55: ldloc.2 - IL_2c56: blt.s IL_2c60 - - IL_2c58: ldloc.1 - IL_2c59: ldloc.1 - IL_2c5a: ldloc.2 - IL_2c5b: add - IL_2c5c: add - IL_2c5d: stloc.1 - IL_2c5e: br.s IL_2c66 - - IL_2c60: ldloc.2 - IL_2c61: ldloc.1 - IL_2c62: ldloc.2 - IL_2c63: add - IL_2c64: mul - IL_2c65: stloc.2 - IL_2c66: ldloc.1 - IL_2c67: ldloc.2 - IL_2c68: bne.un.s IL_2c72 - - IL_2c6a: ldloc.1 - IL_2c6b: ldloc.1 - IL_2c6c: ldloc.2 - IL_2c6d: add - IL_2c6e: add - IL_2c6f: stloc.1 - IL_2c70: br.s IL_2c78 - - IL_2c72: ldloc.2 - IL_2c73: ldloc.1 - IL_2c74: ldloc.2 - IL_2c75: add - IL_2c76: mul - IL_2c77: stloc.2 - IL_2c78: ldloc.1 - IL_2c79: ldloc.2 - IL_2c7a: blt.s IL_2c84 - - IL_2c7c: ldloc.1 - IL_2c7d: ldloc.1 - IL_2c7e: ldloc.2 - IL_2c7f: mul - IL_2c80: mul - IL_2c81: stloc.1 - IL_2c82: br.s IL_2c8a - - IL_2c84: ldloc.2 - IL_2c85: ldloc.1 - IL_2c86: ldloc.2 - IL_2c87: mul - IL_2c88: add - IL_2c89: stloc.2 - IL_2c8a: ldloc.1 - IL_2c8b: ldloc.2 - IL_2c8c: bgt.s IL_2c96 - - IL_2c8e: ldloc.1 - IL_2c8f: ldloc.1 - IL_2c90: ldloc.2 - IL_2c91: mul - IL_2c92: sub - IL_2c93: stloc.1 - IL_2c94: br.s IL_2c9c - - IL_2c96: ldloc.2 - IL_2c97: ldloc.1 - IL_2c98: ldloc.2 - IL_2c99: mul - IL_2c9a: add - IL_2c9b: stloc.2 - IL_2c9c: ldloc.1 - IL_2c9d: ldloc.2 - IL_2c9e: beq.s IL_2ca8 - - IL_2ca0: ldloc.1 - IL_2ca1: ldloc.1 - IL_2ca2: ldloc.2 - IL_2ca3: add - IL_2ca4: mul - IL_2ca5: stloc.1 - IL_2ca6: br.s IL_2cae - - IL_2ca8: ldloc.2 - IL_2ca9: ldloc.1 - IL_2caa: ldloc.2 - IL_2cab: add - IL_2cac: mul - IL_2cad: stloc.2 - IL_2cae: ldloc.1 - IL_2caf: ldloc.2 - IL_2cb0: beq.s IL_2cba - - IL_2cb2: ldloc.1 - IL_2cb3: ldloc.1 - IL_2cb4: ldloc.2 - IL_2cb5: mul - IL_2cb6: mul - IL_2cb7: stloc.1 - IL_2cb8: br.s IL_2cc0 - - IL_2cba: ldloc.2 - IL_2cbb: ldloc.1 - IL_2cbc: ldloc.2 - IL_2cbd: mul - IL_2cbe: add - IL_2cbf: stloc.2 - IL_2cc0: ldloc.1 - IL_2cc1: ldloc.2 - IL_2cc2: bgt.s IL_2ccc - - IL_2cc4: ldloc.1 - IL_2cc5: ldloc.1 - IL_2cc6: ldloc.2 - IL_2cc7: add - IL_2cc8: mul - IL_2cc9: stloc.1 - IL_2cca: br.s IL_2cd2 - - IL_2ccc: ldloc.2 - IL_2ccd: ldloc.1 - IL_2cce: ldloc.2 - IL_2ccf: add - IL_2cd0: mul - IL_2cd1: stloc.2 - IL_2cd2: ldloc.1 - IL_2cd3: ldloc.2 - IL_2cd4: blt.s IL_2cde - - IL_2cd6: ldloc.1 - IL_2cd7: ldloc.1 - IL_2cd8: ldloc.2 - IL_2cd9: add - IL_2cda: sub - IL_2cdb: stloc.1 - IL_2cdc: br.s IL_2ce4 - - IL_2cde: ldloc.2 - IL_2cdf: ldloc.1 - IL_2ce0: ldloc.2 - IL_2ce1: add - IL_2ce2: sub - IL_2ce3: stloc.2 - IL_2ce4: ldloc.1 - IL_2ce5: ldloc.2 - IL_2ce6: bne.un.s IL_2cf0 - - IL_2ce8: ldloc.1 - IL_2ce9: ldloc.1 - IL_2cea: ldloc.2 - IL_2ceb: sub - IL_2cec: add - IL_2ced: stloc.1 - IL_2cee: br.s IL_2cf6 - - IL_2cf0: ldloc.2 - IL_2cf1: ldloc.1 - IL_2cf2: ldloc.2 - IL_2cf3: sub - IL_2cf4: add - IL_2cf5: stloc.2 - IL_2cf6: ldloc.1 - IL_2cf7: ldloc.2 - IL_2cf8: bne.un.s IL_2d02 - - IL_2cfa: ldloc.1 - IL_2cfb: ldloc.1 - IL_2cfc: ldloc.2 - IL_2cfd: sub - IL_2cfe: mul - IL_2cff: stloc.1 - IL_2d00: br.s IL_2d08 - - IL_2d02: ldloc.2 - IL_2d03: ldloc.1 - IL_2d04: ldloc.2 - IL_2d05: sub - IL_2d06: sub - IL_2d07: stloc.2 - IL_2d08: ldloc.1 - IL_2d09: ldloc.2 - IL_2d0a: beq.s IL_2d14 - - IL_2d0c: ldloc.1 - IL_2d0d: ldloc.1 - IL_2d0e: ldloc.2 - IL_2d0f: mul - IL_2d10: mul - IL_2d11: stloc.1 - IL_2d12: br.s IL_2d1a - - IL_2d14: ldloc.2 - IL_2d15: ldloc.1 - IL_2d16: ldloc.2 - IL_2d17: mul - IL_2d18: mul - IL_2d19: stloc.2 - IL_2d1a: ldloc.1 - IL_2d1b: ldloc.2 - IL_2d1c: bge.s IL_2d26 - - IL_2d1e: ldloc.1 - IL_2d1f: ldloc.1 - IL_2d20: ldloc.2 - IL_2d21: add - IL_2d22: add - IL_2d23: stloc.1 - IL_2d24: br.s IL_2d2c - - IL_2d26: ldloc.2 - IL_2d27: ldloc.1 - IL_2d28: ldloc.2 - IL_2d29: add - IL_2d2a: mul - IL_2d2b: stloc.2 - IL_2d2c: ldloc.1 - IL_2d2d: ldloc.2 - IL_2d2e: ble.s IL_2d38 - - IL_2d30: ldloc.1 - IL_2d31: ldloc.1 - IL_2d32: ldloc.2 - IL_2d33: add - IL_2d34: mul - IL_2d35: stloc.1 - IL_2d36: br.s IL_2d3e - - IL_2d38: ldloc.2 - IL_2d39: ldloc.1 - IL_2d3a: ldloc.2 - IL_2d3b: add - IL_2d3c: mul - IL_2d3d: stloc.2 - IL_2d3e: ldloc.1 - IL_2d3f: ldloc.2 - IL_2d40: bgt.s IL_2d4a - - IL_2d42: ldloc.1 - IL_2d43: ldloc.1 - IL_2d44: ldloc.2 - IL_2d45: sub - IL_2d46: sub - IL_2d47: stloc.1 - IL_2d48: br.s IL_2d50 - - IL_2d4a: ldloc.2 - IL_2d4b: ldloc.1 - IL_2d4c: ldloc.2 - IL_2d4d: sub - IL_2d4e: mul - IL_2d4f: stloc.2 - IL_2d50: ldloc.1 - IL_2d51: ldloc.2 - IL_2d52: ble.s IL_2d5c - - IL_2d54: ldloc.1 - IL_2d55: ldloc.1 - IL_2d56: ldloc.2 - IL_2d57: mul - IL_2d58: mul - IL_2d59: stloc.1 - IL_2d5a: br.s IL_2d62 - - IL_2d5c: ldloc.2 - IL_2d5d: ldloc.1 - IL_2d5e: ldloc.2 - IL_2d5f: mul - IL_2d60: sub - IL_2d61: stloc.2 - IL_2d62: ldloc.1 - IL_2d63: ldloc.2 - IL_2d64: bge.s IL_2d6e - - IL_2d66: ldloc.1 - IL_2d67: ldloc.1 - IL_2d68: ldloc.2 - IL_2d69: mul - IL_2d6a: sub - IL_2d6b: stloc.1 - IL_2d6c: br.s IL_2d74 - - IL_2d6e: ldloc.2 - IL_2d6f: ldloc.1 - IL_2d70: ldloc.2 - IL_2d71: mul - IL_2d72: mul - IL_2d73: stloc.2 - IL_2d74: ldloc.1 - IL_2d75: ldloc.2 - IL_2d76: bgt.s IL_2d80 - - IL_2d78: ldloc.1 - IL_2d79: ldloc.1 - IL_2d7a: ldloc.2 - IL_2d7b: add - IL_2d7c: mul - IL_2d7d: stloc.1 - IL_2d7e: br.s IL_2d86 - - IL_2d80: ldloc.2 - IL_2d81: ldloc.1 - IL_2d82: ldloc.2 - IL_2d83: add - IL_2d84: add - IL_2d85: stloc.2 - IL_2d86: ldloc.1 - IL_2d87: ldloc.2 - IL_2d88: blt.s IL_2d92 - - IL_2d8a: ldloc.1 - IL_2d8b: ldloc.1 - IL_2d8c: ldloc.2 - IL_2d8d: add - IL_2d8e: sub - IL_2d8f: stloc.1 - IL_2d90: br.s IL_2d98 - - IL_2d92: ldloc.2 - IL_2d93: ldloc.1 - IL_2d94: ldloc.2 - IL_2d95: add - IL_2d96: add - IL_2d97: stloc.2 - IL_2d98: ldloc.1 - IL_2d99: ldloc.2 - IL_2d9a: bge.s IL_2da4 - - IL_2d9c: ldloc.1 - IL_2d9d: ldloc.1 - IL_2d9e: ldloc.2 - IL_2d9f: add - IL_2da0: sub - IL_2da1: stloc.1 - IL_2da2: br.s IL_2daa - - IL_2da4: ldloc.2 - IL_2da5: ldloc.1 - IL_2da6: ldloc.2 - IL_2da7: add - IL_2da8: add - IL_2da9: stloc.2 - IL_2daa: ldloc.1 - IL_2dab: ldloc.2 - IL_2dac: beq.s IL_2db6 - - IL_2dae: ldloc.1 - IL_2daf: ldloc.1 - IL_2db0: ldloc.2 - IL_2db1: sub - IL_2db2: sub - IL_2db3: stloc.1 - IL_2db4: br.s IL_2dbc - - IL_2db6: ldloc.2 - IL_2db7: ldloc.1 - IL_2db8: ldloc.2 - IL_2db9: sub - IL_2dba: sub - IL_2dbb: stloc.2 - IL_2dbc: ldloc.1 - IL_2dbd: ldloc.2 - IL_2dbe: beq.s IL_2dc8 - - IL_2dc0: ldloc.1 - IL_2dc1: ldloc.1 - IL_2dc2: ldloc.2 - IL_2dc3: sub - IL_2dc4: mul - IL_2dc5: stloc.1 - IL_2dc6: br.s IL_2dce - - IL_2dc8: ldloc.2 - IL_2dc9: ldloc.1 - IL_2dca: ldloc.2 - IL_2dcb: sub - IL_2dcc: add - IL_2dcd: stloc.2 - IL_2dce: ldloc.1 - IL_2dcf: ldloc.2 - IL_2dd0: bgt.s IL_2dda - - IL_2dd2: ldloc.1 - IL_2dd3: ldloc.1 - IL_2dd4: ldloc.2 - IL_2dd5: sub - IL_2dd6: add - IL_2dd7: stloc.1 - IL_2dd8: br.s IL_2de0 - - IL_2dda: ldloc.2 - IL_2ddb: ldloc.1 - IL_2ddc: ldloc.2 - IL_2ddd: sub - IL_2dde: mul - IL_2ddf: stloc.2 - IL_2de0: ldloc.1 - IL_2de1: ldloc.2 - IL_2de2: bgt.s IL_2dec - - IL_2de4: ldloc.1 - IL_2de5: ldloc.1 - IL_2de6: ldloc.2 - IL_2de7: mul - IL_2de8: sub - IL_2de9: stloc.1 - IL_2dea: br.s IL_2df2 - - IL_2dec: ldloc.2 - IL_2ded: ldloc.1 - IL_2dee: ldloc.2 - IL_2def: mul - IL_2df0: sub - IL_2df1: stloc.2 - IL_2df2: ldloc.1 - IL_2df3: ldloc.2 - IL_2df4: ble.s IL_2dfe - - IL_2df6: ldloc.1 - IL_2df7: ldloc.1 - IL_2df8: ldloc.2 - IL_2df9: sub - IL_2dfa: sub - IL_2dfb: stloc.1 - IL_2dfc: br.s IL_2e04 - - IL_2dfe: ldloc.2 - IL_2dff: ldloc.1 - IL_2e00: ldloc.2 - IL_2e01: sub - IL_2e02: add - IL_2e03: stloc.2 - IL_2e04: ldloc.1 - IL_2e05: ldloc.2 - IL_2e06: ble.s IL_2e10 - - IL_2e08: ldloc.1 - IL_2e09: ldloc.1 - IL_2e0a: ldloc.2 - IL_2e0b: sub - IL_2e0c: add - IL_2e0d: stloc.1 - IL_2e0e: br.s IL_2e16 - - IL_2e10: ldloc.2 - IL_2e11: ldloc.1 - IL_2e12: ldloc.2 - IL_2e13: sub - IL_2e14: add - IL_2e15: stloc.2 - IL_2e16: ldloc.1 - IL_2e17: ldloc.2 - IL_2e18: ble.s IL_2e22 - - IL_2e1a: ldloc.1 - IL_2e1b: ldloc.1 - IL_2e1c: ldloc.2 - IL_2e1d: sub - IL_2e1e: sub - IL_2e1f: stloc.1 - IL_2e20: br.s IL_2e28 - - IL_2e22: ldloc.2 - IL_2e23: ldloc.1 - IL_2e24: ldloc.2 - IL_2e25: sub - IL_2e26: sub - IL_2e27: stloc.2 - IL_2e28: ldloc.1 - IL_2e29: ldloc.2 - IL_2e2a: beq.s IL_2e34 - - IL_2e2c: ldloc.1 - IL_2e2d: ldloc.1 - IL_2e2e: ldloc.2 - IL_2e2f: add - IL_2e30: mul - IL_2e31: stloc.1 - IL_2e32: br.s IL_2e3a - - IL_2e34: ldloc.2 - IL_2e35: ldloc.1 - IL_2e36: ldloc.2 - IL_2e37: add - IL_2e38: mul - IL_2e39: stloc.2 - IL_2e3a: ldloc.1 - IL_2e3b: ldloc.2 - IL_2e3c: bge.s IL_2e46 - - IL_2e3e: ldloc.1 - IL_2e3f: ldloc.1 - IL_2e40: ldloc.2 - IL_2e41: sub - IL_2e42: sub - IL_2e43: stloc.1 - IL_2e44: br.s IL_2e4c - - IL_2e46: ldloc.2 - IL_2e47: ldloc.1 - IL_2e48: ldloc.2 - IL_2e49: sub - IL_2e4a: mul - IL_2e4b: stloc.2 - IL_2e4c: ldloc.1 - IL_2e4d: ldloc.2 - IL_2e4e: blt.s IL_2e58 - - IL_2e50: ldloc.1 - IL_2e51: ldloc.1 - IL_2e52: ldloc.2 - IL_2e53: sub - IL_2e54: add - IL_2e55: stloc.1 - IL_2e56: br.s IL_2e5e - - IL_2e58: ldloc.2 - IL_2e59: ldloc.1 - IL_2e5a: ldloc.2 - IL_2e5b: sub - IL_2e5c: mul - IL_2e5d: stloc.2 - IL_2e5e: ldloc.1 - IL_2e5f: ldloc.2 - IL_2e60: bge.s IL_2e6a - - IL_2e62: ldloc.1 - IL_2e63: ldloc.1 - IL_2e64: ldloc.2 - IL_2e65: add - IL_2e66: add - IL_2e67: stloc.1 - IL_2e68: br.s IL_2e70 - - IL_2e6a: ldloc.2 - IL_2e6b: ldloc.1 - IL_2e6c: ldloc.2 - IL_2e6d: add - IL_2e6e: sub - IL_2e6f: stloc.2 - IL_2e70: ldloc.1 - IL_2e71: ldloc.2 - IL_2e72: ble.s IL_2e7c - - IL_2e74: ldloc.1 - IL_2e75: ldloc.1 - IL_2e76: ldloc.2 - IL_2e77: add - IL_2e78: sub - IL_2e79: stloc.1 - IL_2e7a: br.s IL_2e82 - - IL_2e7c: ldloc.2 - IL_2e7d: ldloc.1 - IL_2e7e: ldloc.2 - IL_2e7f: add - IL_2e80: sub - IL_2e81: stloc.2 - IL_2e82: ldstr "a is: " - IL_2e87: ldloc.1 - IL_2e88: box [mscorlib]System.Int32 - IL_2e8d: call string [mscorlib]System.String::Concat(object, - object) - IL_2e92: call void [System.Console]System.Console::WriteLine(string) - IL_2e97: ldstr "b is: " - IL_2e9c: ldloc.2 - IL_2e9d: box [mscorlib]System.Int32 - IL_2ea2: call string [mscorlib]System.String::Concat(object, - object) - IL_2ea7: call void [System.Console]System.Console::WriteLine(string) - IL_2eac: ldc.i4.s 100 - IL_2eae: stloc.3 - IL_2eaf: br.s IL_2eb1 - - IL_2eb1: ldstr "PASSED" - call void [System.Console]System.Console::WriteLine(string) - br.s BL_2eb1 - - BL_2eb1: ldloc.3 - IL_2eb2: ret - } - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } - -} diff --git a/src/coreclr/tests/src/JIT/opt/JitMinOpts/Perf/CodeSize1.il b/src/coreclr/tests/src/JIT/opt/JitMinOpts/Perf/CodeSize1.il deleted file mode 100644 index 48be4c94776f..000000000000 --- a/src/coreclr/tests/src/JIT/opt/JitMinOpts/Perf/CodeSize1.il +++ /dev/null @@ -1,18722 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// DEFAULT_MIN_OPTS_CODE_SIZE 60000 -// OPTIONS: opts.MinOpts() == true -// TID abc: IL Code Size exceeded, using MinOpts for method CodeSize1.Main():int -// TID abc: IL Code Size,Instr 60002,15515, Basic Block count 722, Local Variable Num,Ref count 17,5328 for method CodeSize1.Main():int - -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly CodeSize1 {} -.module CodeSize1.exe -.class private auto ansi beforefieldinit CodeSize1 - extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - // Code size 60003 (0xea63) - .maxstack 3 - .locals init ([0] int32 V_0, - [1] int32 V_1, - [2] int32 V_2, - [3] int32 V_3, - [4] int32 V_4, - [5] class [mscorlib]System.Random V_5, - [6] int32 V_6, - [7] int32 V_7, - [8] int32 V_8, - [9] int32 V_9, - [10] int32 V_10, - [11] int32 V_11) - IL_0000: ldc.i4.1 - IL_0001: stloc.0 - IL_0002: ldc.i4.2 - IL_0003: stloc.1 - IL_0004: ldc.i4.3 - IL_0005: stloc.2 - IL_0006: ldc.i4.4 - IL_0007: stloc.3 - IL_0008: ldc.i4.5 - IL_0009: stloc.s V_4 - IL_000b: newobj instance void [mscorlib]System.Random::.ctor() - IL_0010: stloc.s V_5 - IL_0012: ldloc.s V_5 - IL_0014: ldc.i4.1 - IL_0015: ldc.i4.s 100 - IL_0017: callvirt instance int32 [mscorlib]System.Random::Next(int32, - int32) - IL_001c: stloc.s V_6 - IL_001e: ldloc.s V_5 - IL_0020: ldc.i4.1 - IL_0021: ldc.i4.s 100 - IL_0023: callvirt instance int32 [mscorlib]System.Random::Next(int32, - int32) - IL_0028: stloc.s V_7 - IL_002a: ldloc.s V_5 - IL_002c: ldc.i4.1 - IL_002d: ldc.i4.s 100 - IL_002f: callvirt instance int32 [mscorlib]System.Random::Next(int32, - int32) - IL_0034: stloc.s V_8 - IL_0036: ldloc.s V_5 - IL_0038: ldc.i4.1 - IL_0039: ldc.i4.s 100 - IL_003b: callvirt instance int32 [mscorlib]System.Random::Next(int32, - int32) - IL_0040: stloc.s V_9 - IL_0042: ldloc.s V_5 - IL_0044: ldc.i4.1 - IL_0045: ldc.i4.s 100 - IL_0047: callvirt instance int32 [mscorlib]System.Random::Next(int32, - int32) - IL_004c: stloc.s V_10 - IL_004e: ldloc.s V_6 - IL_0050: ldloc.s V_7 - IL_0052: bge.s IL_009c - - IL_0054: ldloc.s V_10 - IL_0056: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_005b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0060: stloc.s V_8 - IL_0062: ldloc.s V_7 - IL_0064: call string [mscorlib]System.Convert::ToString(int32) - IL_0069: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_006e: stloc.s V_7 - IL_0070: ldloc.s V_10 - IL_0072: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0077: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_007c: stloc.s V_8 - IL_007e: ldloc.s V_7 - IL_0080: call string [mscorlib]System.Convert::ToString(int32) - IL_0085: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_008a: stloc.s V_6 - IL_008c: ldloc.s V_7 - IL_008e: call string [mscorlib]System.Convert::ToString(int32) - IL_0093: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0098: stloc.s V_8 - IL_009a: br.s IL_00e2 - - IL_009c: ldloc.s V_10 - IL_009e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_00a3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_00a8: stloc.s V_8 - IL_00aa: ldloc.s V_10 - IL_00ac: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_00b1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_00b6: stloc.s V_7 - IL_00b8: ldloc.s V_7 - IL_00ba: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_00bf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_00c4: stloc.s V_10 - IL_00c6: ldloc.s V_8 - IL_00c8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_00cd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_00d2: stloc.s V_9 - IL_00d4: ldloc.s V_7 - IL_00d6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_00db: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_00e0: stloc.s V_8 - IL_00e2: ldloc.s V_9 - IL_00e4: ldloc.s V_6 - IL_00e6: bgt.s IL_0130 - - IL_00e8: ldloc.s V_6 - IL_00ea: call string [mscorlib]System.Convert::ToString(int32) - IL_00ef: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_00f4: stloc.s V_6 - IL_00f6: ldloc.s V_10 - IL_00f8: call string [mscorlib]System.Convert::ToString(int32) - IL_00fd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0102: stloc.s V_6 - IL_0104: ldloc.s V_7 - IL_0106: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_010b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0110: stloc.s V_6 - IL_0112: ldloc.s V_7 - IL_0114: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0119: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_011e: stloc.s V_8 - IL_0120: ldloc.s V_6 - IL_0122: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0127: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_012c: stloc.s V_7 - IL_012e: br.s IL_0176 - - IL_0130: ldloc.s V_6 - IL_0132: call string [mscorlib]System.Convert::ToString(int32) - IL_0137: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_013c: stloc.s V_9 - IL_013e: ldloc.s V_7 - IL_0140: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0145: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_014a: stloc.s V_7 - IL_014c: ldloc.s V_10 - IL_014e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0153: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0158: stloc.s V_7 - IL_015a: ldloc.s V_7 - IL_015c: call string [mscorlib]System.Convert::ToString(int32) - IL_0161: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0166: stloc.s V_9 - IL_0168: ldloc.s V_9 - IL_016a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_016f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0174: stloc.s V_10 - IL_0176: ldloc.s V_8 - IL_0178: ldloc.s V_10 - IL_017a: bgt.s IL_01c4 - - IL_017c: ldloc.s V_6 - IL_017e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0183: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0188: stloc.s V_7 - IL_018a: ldloc.s V_7 - IL_018c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0191: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0196: stloc.s V_7 - IL_0198: ldloc.s V_10 - IL_019a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_019f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_01a4: stloc.s V_10 - IL_01a6: ldloc.s V_7 - IL_01a8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_01ad: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_01b2: stloc.s V_9 - IL_01b4: ldloc.s V_6 - IL_01b6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_01bb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_01c0: stloc.s V_10 - IL_01c2: br.s IL_020a - - IL_01c4: ldloc.s V_8 - IL_01c6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_01cb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_01d0: stloc.s V_8 - IL_01d2: ldloc.s V_10 - IL_01d4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_01d9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_01de: stloc.s V_7 - IL_01e0: ldloc.s V_6 - IL_01e2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_01e7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_01ec: stloc.s V_9 - IL_01ee: ldloc.s V_6 - IL_01f0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_01f5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_01fa: stloc.s V_7 - IL_01fc: ldloc.s V_6 - IL_01fe: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0203: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0208: stloc.s V_9 - IL_020a: ldloc.s V_10 - IL_020c: ldloc.s V_8 - IL_020e: bgt.s IL_0258 - - IL_0210: ldloc.s V_10 - IL_0212: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0217: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_021c: stloc.s V_8 - IL_021e: ldloc.s V_7 - IL_0220: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0225: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_022a: stloc.s V_6 - IL_022c: ldloc.s V_9 - IL_022e: call string [mscorlib]System.Convert::ToString(int32) - IL_0233: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0238: stloc.s V_9 - IL_023a: ldloc.s V_6 - IL_023c: call string [mscorlib]System.Convert::ToString(int32) - IL_0241: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0246: stloc.s V_8 - IL_0248: ldloc.s V_7 - IL_024a: call string [mscorlib]System.Convert::ToString(int32) - IL_024f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0254: stloc.s V_8 - IL_0256: br.s IL_029e - - IL_0258: ldloc.s V_10 - IL_025a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_025f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0264: stloc.s V_6 - IL_0266: ldloc.s V_7 - IL_0268: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_026d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0272: stloc.s V_7 - IL_0274: ldloc.s V_9 - IL_0276: call string [mscorlib]System.Convert::ToString(int32) - IL_027b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0280: stloc.s V_10 - IL_0282: ldloc.s V_10 - IL_0284: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0289: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_028e: stloc.s V_10 - IL_0290: ldloc.s V_10 - IL_0292: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0297: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_029c: stloc.s V_6 - IL_029e: ldloc.s V_6 - IL_02a0: ldloc.s V_8 - IL_02a2: bne.un.s IL_02ec - - IL_02a4: ldloc.s V_7 - IL_02a6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_02ab: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_02b0: stloc.s V_10 - IL_02b2: ldloc.s V_8 - IL_02b4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_02b9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_02be: stloc.s V_6 - IL_02c0: ldloc.s V_9 - IL_02c2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_02c7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_02cc: stloc.s V_6 - IL_02ce: ldloc.s V_6 - IL_02d0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_02d5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_02da: stloc.s V_6 - IL_02dc: ldloc.s V_10 - IL_02de: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_02e3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_02e8: stloc.s V_6 - IL_02ea: br.s IL_0332 - - IL_02ec: ldloc.s V_10 - IL_02ee: call string [mscorlib]System.Convert::ToString(int32) - IL_02f3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_02f8: stloc.s V_10 - IL_02fa: ldloc.s V_8 - IL_02fc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0301: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0306: stloc.s V_6 - IL_0308: ldloc.s V_8 - IL_030a: call string [mscorlib]System.Convert::ToString(int32) - IL_030f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0314: stloc.s V_6 - IL_0316: ldloc.s V_8 - IL_0318: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_031d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0322: stloc.s V_7 - IL_0324: ldloc.s V_7 - IL_0326: call string [mscorlib]System.Convert::ToString(int32) - IL_032b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0330: stloc.s V_8 - IL_0332: ldloc.s V_9 - IL_0334: ldloc.s V_8 - IL_0336: beq.s IL_0380 - - IL_0338: ldloc.s V_7 - IL_033a: call string [mscorlib]System.Convert::ToString(int32) - IL_033f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0344: stloc.s V_8 - IL_0346: ldloc.s V_6 - IL_0348: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_034d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0352: stloc.s V_6 - IL_0354: ldloc.s V_10 - IL_0356: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_035b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0360: stloc.s V_8 - IL_0362: ldloc.s V_7 - IL_0364: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0369: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_036e: stloc.s V_9 - IL_0370: ldloc.s V_7 - IL_0372: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0377: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_037c: stloc.s V_8 - IL_037e: br.s IL_03c6 - - IL_0380: ldloc.s V_8 - IL_0382: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0387: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_038c: stloc.s V_6 - IL_038e: ldloc.s V_10 - IL_0390: call string [mscorlib]System.Convert::ToString(int32) - IL_0395: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_039a: stloc.s V_10 - IL_039c: ldloc.s V_10 - IL_039e: call string [mscorlib]System.Convert::ToString(int32) - IL_03a3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_03a8: stloc.s V_6 - IL_03aa: ldloc.s V_6 - IL_03ac: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_03b1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_03b6: stloc.s V_9 - IL_03b8: ldloc.s V_10 - IL_03ba: call string [mscorlib]System.Convert::ToString(int32) - IL_03bf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_03c4: stloc.s V_6 - IL_03c6: ldloc.s V_6 - IL_03c8: ldloc.s V_8 - IL_03ca: bge.s IL_0414 - - IL_03cc: ldloc.s V_6 - IL_03ce: call string [mscorlib]System.Convert::ToString(int32) - IL_03d3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_03d8: stloc.s V_8 - IL_03da: ldloc.s V_9 - IL_03dc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_03e1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_03e6: stloc.s V_9 - IL_03e8: ldloc.s V_10 - IL_03ea: call string [mscorlib]System.Convert::ToString(int32) - IL_03ef: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_03f4: stloc.s V_9 - IL_03f6: ldloc.s V_9 - IL_03f8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_03fd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0402: stloc.s V_9 - IL_0404: ldloc.s V_7 - IL_0406: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_040b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0410: stloc.s V_7 - IL_0412: br.s IL_045a - - IL_0414: ldloc.s V_7 - IL_0416: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_041b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0420: stloc.s V_7 - IL_0422: ldloc.s V_6 - IL_0424: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0429: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_042e: stloc.s V_10 - IL_0430: ldloc.s V_10 - IL_0432: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0437: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_043c: stloc.s V_9 - IL_043e: ldloc.s V_6 - IL_0440: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0445: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_044a: stloc.s V_7 - IL_044c: ldloc.s V_9 - IL_044e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0453: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0458: stloc.s V_6 - IL_045a: ldloc.s V_8 - IL_045c: ldloc.s V_10 - IL_045e: beq.s IL_04a8 - - IL_0460: ldloc.s V_7 - IL_0462: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0467: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_046c: stloc.s V_10 - IL_046e: ldloc.s V_8 - IL_0470: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0475: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_047a: stloc.s V_6 - IL_047c: ldloc.s V_6 - IL_047e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0483: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0488: stloc.s V_10 - IL_048a: ldloc.s V_7 - IL_048c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0491: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0496: stloc.s V_10 - IL_0498: ldloc.s V_6 - IL_049a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_049f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_04a4: stloc.s V_7 - IL_04a6: br.s IL_04ee - - IL_04a8: ldloc.s V_7 - IL_04aa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_04af: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_04b4: stloc.s V_9 - IL_04b6: ldloc.s V_6 - IL_04b8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_04bd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_04c2: stloc.s V_9 - IL_04c4: ldloc.s V_7 - IL_04c6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_04cb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_04d0: stloc.s V_8 - IL_04d2: ldloc.s V_8 - IL_04d4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_04d9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_04de: stloc.s V_7 - IL_04e0: ldloc.s V_7 - IL_04e2: call string [mscorlib]System.Convert::ToString(int32) - IL_04e7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_04ec: stloc.s V_9 - IL_04ee: ldloc.s V_9 - IL_04f0: ldloc.s V_6 - IL_04f2: blt.s IL_053c - - IL_04f4: ldloc.s V_10 - IL_04f6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_04fb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0500: stloc.s V_9 - IL_0502: ldloc.s V_10 - IL_0504: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0509: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_050e: stloc.s V_6 - IL_0510: ldloc.s V_10 - IL_0512: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0517: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_051c: stloc.s V_9 - IL_051e: ldloc.s V_10 - IL_0520: call string [mscorlib]System.Convert::ToString(int32) - IL_0525: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_052a: stloc.s V_10 - IL_052c: ldloc.s V_6 - IL_052e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0533: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0538: stloc.s V_9 - IL_053a: br.s IL_0582 - - IL_053c: ldloc.s V_8 - IL_053e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0543: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0548: stloc.s V_6 - IL_054a: ldloc.s V_10 - IL_054c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0551: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0556: stloc.s V_7 - IL_0558: ldloc.s V_6 - IL_055a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_055f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0564: stloc.s V_9 - IL_0566: ldloc.s V_6 - IL_0568: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_056d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0572: stloc.s V_6 - IL_0574: ldloc.s V_8 - IL_0576: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_057b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0580: stloc.s V_6 - IL_0582: ldloc.s V_8 - IL_0584: ldloc.s V_9 - IL_0586: beq.s IL_05d0 - - IL_0588: ldloc.s V_6 - IL_058a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_058f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0594: stloc.s V_7 - IL_0596: ldloc.s V_9 - IL_0598: call string [mscorlib]System.Convert::ToString(int32) - IL_059d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_05a2: stloc.s V_6 - IL_05a4: ldloc.s V_8 - IL_05a6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_05ab: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_05b0: stloc.s V_7 - IL_05b2: ldloc.s V_6 - IL_05b4: call string [mscorlib]System.Convert::ToString(int32) - IL_05b9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_05be: stloc.s V_7 - IL_05c0: ldloc.s V_6 - IL_05c2: call string [mscorlib]System.Convert::ToString(int32) - IL_05c7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_05cc: stloc.s V_7 - IL_05ce: br.s IL_0616 - - IL_05d0: ldloc.s V_7 - IL_05d2: call string [mscorlib]System.Convert::ToString(int32) - IL_05d7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_05dc: stloc.s V_7 - IL_05de: ldloc.s V_8 - IL_05e0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_05e5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_05ea: stloc.s V_9 - IL_05ec: ldloc.s V_10 - IL_05ee: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_05f3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_05f8: stloc.s V_6 - IL_05fa: ldloc.s V_7 - IL_05fc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0601: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0606: stloc.s V_10 - IL_0608: ldloc.s V_10 - IL_060a: call string [mscorlib]System.Convert::ToString(int32) - IL_060f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0614: stloc.s V_10 - IL_0616: ldloc.s V_6 - IL_0618: ldloc.s V_6 - IL_061a: blt.s IL_0664 - - IL_061c: ldloc.s V_9 - IL_061e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0623: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0628: stloc.s V_6 - IL_062a: ldloc.s V_8 - IL_062c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0631: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0636: stloc.s V_6 - IL_0638: ldloc.s V_7 - IL_063a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_063f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0644: stloc.s V_9 - IL_0646: ldloc.s V_10 - IL_0648: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_064d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0652: stloc.s V_8 - IL_0654: ldloc.s V_6 - IL_0656: call string [mscorlib]System.Convert::ToString(int32) - IL_065b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0660: stloc.s V_10 - IL_0662: br.s IL_06aa - - IL_0664: ldloc.s V_8 - IL_0666: call string [mscorlib]System.Convert::ToString(int32) - IL_066b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0670: stloc.s V_10 - IL_0672: ldloc.s V_9 - IL_0674: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0679: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_067e: stloc.s V_6 - IL_0680: ldloc.s V_7 - IL_0682: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0687: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_068c: stloc.s V_7 - IL_068e: ldloc.s V_9 - IL_0690: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0695: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_069a: stloc.s V_6 - IL_069c: ldloc.s V_7 - IL_069e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_06a3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_06a8: stloc.s V_7 - IL_06aa: ldloc.s V_10 - IL_06ac: ldloc.s V_8 - IL_06ae: bne.un.s IL_06f8 - - IL_06b0: ldloc.s V_7 - IL_06b2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_06b7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_06bc: stloc.s V_6 - IL_06be: ldloc.s V_9 - IL_06c0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_06c5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_06ca: stloc.s V_8 - IL_06cc: ldloc.s V_9 - IL_06ce: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_06d3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_06d8: stloc.s V_9 - IL_06da: ldloc.s V_9 - IL_06dc: call string [mscorlib]System.Convert::ToString(int32) - IL_06e1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_06e6: stloc.s V_7 - IL_06e8: ldloc.s V_7 - IL_06ea: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_06ef: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_06f4: stloc.s V_10 - IL_06f6: br.s IL_073e - - IL_06f8: ldloc.s V_10 - IL_06fa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_06ff: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0704: stloc.s V_7 - IL_0706: ldloc.s V_10 - IL_0708: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_070d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0712: stloc.s V_7 - IL_0714: ldloc.s V_7 - IL_0716: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_071b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0720: stloc.s V_8 - IL_0722: ldloc.s V_9 - IL_0724: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0729: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_072e: stloc.s V_7 - IL_0730: ldloc.s V_9 - IL_0732: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0737: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_073c: stloc.s V_10 - IL_073e: ldloc.s V_9 - IL_0740: ldloc.s V_8 - IL_0742: beq.s IL_078c - - IL_0744: ldloc.s V_8 - IL_0746: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_074b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0750: stloc.s V_8 - IL_0752: ldloc.s V_8 - IL_0754: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0759: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_075e: stloc.s V_10 - IL_0760: ldloc.s V_6 - IL_0762: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0767: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_076c: stloc.s V_10 - IL_076e: ldloc.s V_8 - IL_0770: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0775: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_077a: stloc.s V_10 - IL_077c: ldloc.s V_7 - IL_077e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0783: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0788: stloc.s V_9 - IL_078a: br.s IL_07d2 - - IL_078c: ldloc.s V_8 - IL_078e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0793: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0798: stloc.s V_7 - IL_079a: ldloc.s V_8 - IL_079c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_07a1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_07a6: stloc.s V_7 - IL_07a8: ldloc.s V_7 - IL_07aa: call string [mscorlib]System.Convert::ToString(int32) - IL_07af: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_07b4: stloc.s V_8 - IL_07b6: ldloc.s V_7 - IL_07b8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_07bd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_07c2: stloc.s V_6 - IL_07c4: ldloc.s V_8 - IL_07c6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_07cb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_07d0: stloc.s V_6 - IL_07d2: ldloc.s V_7 - IL_07d4: ldloc.s V_10 - IL_07d6: beq.s IL_0820 - - IL_07d8: ldloc.s V_6 - IL_07da: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_07df: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_07e4: stloc.s V_6 - IL_07e6: ldloc.s V_8 - IL_07e8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_07ed: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_07f2: stloc.s V_9 - IL_07f4: ldloc.s V_6 - IL_07f6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_07fb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0800: stloc.s V_8 - IL_0802: ldloc.s V_10 - IL_0804: call string [mscorlib]System.Convert::ToString(int32) - IL_0809: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_080e: stloc.s V_9 - IL_0810: ldloc.s V_9 - IL_0812: call string [mscorlib]System.Convert::ToString(int32) - IL_0817: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_081c: stloc.s V_9 - IL_081e: br.s IL_0866 - - IL_0820: ldloc.s V_7 - IL_0822: call string [mscorlib]System.Convert::ToString(int32) - IL_0827: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_082c: stloc.s V_7 - IL_082e: ldloc.s V_7 - IL_0830: call string [mscorlib]System.Convert::ToString(int32) - IL_0835: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_083a: stloc.s V_7 - IL_083c: ldloc.s V_7 - IL_083e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0843: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0848: stloc.s V_6 - IL_084a: ldloc.s V_7 - IL_084c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0851: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0856: stloc.s V_7 - IL_0858: ldloc.s V_8 - IL_085a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_085f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0864: stloc.s V_6 - IL_0866: ldloc.s V_10 - IL_0868: ldloc.s V_9 - IL_086a: bgt.s IL_08b4 - - IL_086c: ldloc.s V_10 - IL_086e: call string [mscorlib]System.Convert::ToString(int32) - IL_0873: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0878: stloc.s V_9 - IL_087a: ldloc.s V_9 - IL_087c: call string [mscorlib]System.Convert::ToString(int32) - IL_0881: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0886: stloc.s V_7 - IL_0888: ldloc.s V_6 - IL_088a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_088f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0894: stloc.s V_6 - IL_0896: ldloc.s V_10 - IL_0898: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_089d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_08a2: stloc.s V_8 - IL_08a4: ldloc.s V_9 - IL_08a6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_08ab: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_08b0: stloc.s V_7 - IL_08b2: br.s IL_08fa - - IL_08b4: ldloc.s V_7 - IL_08b6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_08bb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_08c0: stloc.s V_9 - IL_08c2: ldloc.s V_9 - IL_08c4: call string [mscorlib]System.Convert::ToString(int32) - IL_08c9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_08ce: stloc.s V_7 - IL_08d0: ldloc.s V_8 - IL_08d2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_08d7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_08dc: stloc.s V_9 - IL_08de: ldloc.s V_8 - IL_08e0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_08e5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_08ea: stloc.s V_10 - IL_08ec: ldloc.s V_8 - IL_08ee: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_08f3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_08f8: stloc.s V_6 - IL_08fa: ldloc.s V_7 - IL_08fc: ldloc.s V_9 - IL_08fe: bgt.s IL_0948 - - IL_0900: ldloc.s V_10 - IL_0902: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0907: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_090c: stloc.s V_6 - IL_090e: ldloc.s V_6 - IL_0910: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0915: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_091a: stloc.s V_9 - IL_091c: ldloc.s V_10 - IL_091e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0923: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0928: stloc.s V_8 - IL_092a: ldloc.s V_6 - IL_092c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0931: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0936: stloc.s V_6 - IL_0938: ldloc.s V_8 - IL_093a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_093f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0944: stloc.s V_7 - IL_0946: br.s IL_098e - - IL_0948: ldloc.s V_10 - IL_094a: call string [mscorlib]System.Convert::ToString(int32) - IL_094f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0954: stloc.s V_9 - IL_0956: ldloc.s V_6 - IL_0958: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_095d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0962: stloc.s V_6 - IL_0964: ldloc.s V_9 - IL_0966: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_096b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0970: stloc.s V_6 - IL_0972: ldloc.s V_6 - IL_0974: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0979: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_097e: stloc.s V_7 - IL_0980: ldloc.s V_8 - IL_0982: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0987: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_098c: stloc.s V_7 - IL_098e: ldloc.s V_10 - IL_0990: ldloc.s V_8 - IL_0992: blt.s IL_09dc - - IL_0994: ldloc.s V_8 - IL_0996: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_099b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_09a0: stloc.s V_6 - IL_09a2: ldloc.s V_9 - IL_09a4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_09a9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_09ae: stloc.s V_9 - IL_09b0: ldloc.s V_8 - IL_09b2: call string [mscorlib]System.Convert::ToString(int32) - IL_09b7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_09bc: stloc.s V_7 - IL_09be: ldloc.s V_8 - IL_09c0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_09c5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_09ca: stloc.s V_9 - IL_09cc: ldloc.s V_8 - IL_09ce: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_09d3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_09d8: stloc.s V_8 - IL_09da: br.s IL_0a22 - - IL_09dc: ldloc.s V_10 - IL_09de: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_09e3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_09e8: stloc.s V_10 - IL_09ea: ldloc.s V_10 - IL_09ec: call string [mscorlib]System.Convert::ToString(int32) - IL_09f1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_09f6: stloc.s V_9 - IL_09f8: ldloc.s V_10 - IL_09fa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_09ff: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0a04: stloc.s V_8 - IL_0a06: ldloc.s V_8 - IL_0a08: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0a0d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0a12: stloc.s V_7 - IL_0a14: ldloc.s V_7 - IL_0a16: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0a1b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0a20: stloc.s V_10 - IL_0a22: ldloc.s V_9 - IL_0a24: ldloc.s V_8 - IL_0a26: blt.s IL_0a70 - - IL_0a28: ldloc.s V_9 - IL_0a2a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0a2f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0a34: stloc.s V_8 - IL_0a36: ldloc.s V_9 - IL_0a38: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0a3d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0a42: stloc.s V_6 - IL_0a44: ldloc.s V_9 - IL_0a46: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0a4b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0a50: stloc.s V_6 - IL_0a52: ldloc.s V_9 - IL_0a54: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0a59: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0a5e: stloc.s V_9 - IL_0a60: ldloc.s V_10 - IL_0a62: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0a67: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0a6c: stloc.s V_6 - IL_0a6e: br.s IL_0ab6 - - IL_0a70: ldloc.s V_8 - IL_0a72: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0a77: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0a7c: stloc.s V_8 - IL_0a7e: ldloc.s V_8 - IL_0a80: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0a85: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0a8a: stloc.s V_8 - IL_0a8c: ldloc.s V_6 - IL_0a8e: call string [mscorlib]System.Convert::ToString(int32) - IL_0a93: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0a98: stloc.s V_8 - IL_0a9a: ldloc.s V_8 - IL_0a9c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0aa1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0aa6: stloc.s V_8 - IL_0aa8: ldloc.s V_8 - IL_0aaa: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0aaf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0ab4: stloc.s V_6 - IL_0ab6: ldloc.s V_7 - IL_0ab8: ldloc.s V_9 - IL_0aba: bge.s IL_0b04 - - IL_0abc: ldloc.s V_7 - IL_0abe: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0ac3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0ac8: stloc.s V_6 - IL_0aca: ldloc.s V_8 - IL_0acc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0ad1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0ad6: stloc.s V_9 - IL_0ad8: ldloc.s V_9 - IL_0ada: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0adf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0ae4: stloc.s V_6 - IL_0ae6: ldloc.s V_10 - IL_0ae8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0aed: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0af2: stloc.s V_7 - IL_0af4: ldloc.s V_8 - IL_0af6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0afb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0b00: stloc.s V_7 - IL_0b02: br.s IL_0b4a - - IL_0b04: ldloc.s V_10 - IL_0b06: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0b0b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0b10: stloc.s V_9 - IL_0b12: ldloc.s V_10 - IL_0b14: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0b19: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0b1e: stloc.s V_9 - IL_0b20: ldloc.s V_8 - IL_0b22: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0b27: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0b2c: stloc.s V_6 - IL_0b2e: ldloc.s V_8 - IL_0b30: call string [mscorlib]System.Convert::ToString(int32) - IL_0b35: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0b3a: stloc.s V_9 - IL_0b3c: ldloc.s V_8 - IL_0b3e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0b43: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0b48: stloc.s V_7 - IL_0b4a: ldloc.s V_8 - IL_0b4c: ldloc.s V_10 - IL_0b4e: ble.s IL_0b98 - - IL_0b50: ldloc.s V_6 - IL_0b52: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0b57: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0b5c: stloc.s V_10 - IL_0b5e: ldloc.s V_8 - IL_0b60: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0b65: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0b6a: stloc.s V_9 - IL_0b6c: ldloc.s V_8 - IL_0b6e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0b73: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0b78: stloc.s V_10 - IL_0b7a: ldloc.s V_9 - IL_0b7c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0b81: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0b86: stloc.s V_9 - IL_0b88: ldloc.s V_7 - IL_0b8a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0b8f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0b94: stloc.s V_6 - IL_0b96: br.s IL_0bde - - IL_0b98: ldloc.s V_10 - IL_0b9a: call string [mscorlib]System.Convert::ToString(int32) - IL_0b9f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0ba4: stloc.s V_10 - IL_0ba6: ldloc.s V_7 - IL_0ba8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0bad: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0bb2: stloc.s V_9 - IL_0bb4: ldloc.s V_10 - IL_0bb6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0bbb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0bc0: stloc.s V_10 - IL_0bc2: ldloc.s V_7 - IL_0bc4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0bc9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0bce: stloc.s V_9 - IL_0bd0: ldloc.s V_8 - IL_0bd2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0bd7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0bdc: stloc.s V_6 - IL_0bde: ldloc.s V_7 - IL_0be0: ldloc.s V_8 - IL_0be2: bge.s IL_0c2c - - IL_0be4: ldloc.s V_6 - IL_0be6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0beb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0bf0: stloc.s V_10 - IL_0bf2: ldloc.s V_8 - IL_0bf4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0bf9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0bfe: stloc.s V_8 - IL_0c00: ldloc.s V_8 - IL_0c02: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0c07: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0c0c: stloc.s V_7 - IL_0c0e: ldloc.s V_9 - IL_0c10: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0c15: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0c1a: stloc.s V_8 - IL_0c1c: ldloc.s V_8 - IL_0c1e: call string [mscorlib]System.Convert::ToString(int32) - IL_0c23: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0c28: stloc.s V_10 - IL_0c2a: br.s IL_0c72 - - IL_0c2c: ldloc.s V_8 - IL_0c2e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0c33: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0c38: stloc.s V_6 - IL_0c3a: ldloc.s V_10 - IL_0c3c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0c41: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0c46: stloc.s V_8 - IL_0c48: ldloc.s V_6 - IL_0c4a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0c4f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0c54: stloc.s V_9 - IL_0c56: ldloc.s V_9 - IL_0c58: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0c5d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0c62: stloc.s V_6 - IL_0c64: ldloc.s V_7 - IL_0c66: call string [mscorlib]System.Convert::ToString(int32) - IL_0c6b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0c70: stloc.s V_7 - IL_0c72: ldloc.s V_8 - IL_0c74: ldloc.s V_6 - IL_0c76: beq.s IL_0cc0 - - IL_0c78: ldloc.s V_9 - IL_0c7a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0c7f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0c84: stloc.s V_6 - IL_0c86: ldloc.s V_8 - IL_0c88: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0c8d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0c92: stloc.s V_6 - IL_0c94: ldloc.s V_8 - IL_0c96: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0c9b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0ca0: stloc.s V_7 - IL_0ca2: ldloc.s V_9 - IL_0ca4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0ca9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0cae: stloc.s V_9 - IL_0cb0: ldloc.s V_7 - IL_0cb2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0cb7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0cbc: stloc.s V_7 - IL_0cbe: br.s IL_0d06 - - IL_0cc0: ldloc.s V_8 - IL_0cc2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0cc7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0ccc: stloc.s V_10 - IL_0cce: ldloc.s V_10 - IL_0cd0: call string [mscorlib]System.Convert::ToString(int32) - IL_0cd5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0cda: stloc.s V_6 - IL_0cdc: ldloc.s V_8 - IL_0cde: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0ce3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0ce8: stloc.s V_8 - IL_0cea: ldloc.s V_6 - IL_0cec: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0cf1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0cf6: stloc.s V_6 - IL_0cf8: ldloc.s V_6 - IL_0cfa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0cff: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0d04: stloc.s V_10 - IL_0d06: ldloc.s V_8 - IL_0d08: ldloc.s V_9 - IL_0d0a: bge.s IL_0d54 - - IL_0d0c: ldloc.s V_8 - IL_0d0e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0d13: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0d18: stloc.s V_9 - IL_0d1a: ldloc.s V_6 - IL_0d1c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0d21: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0d26: stloc.s V_9 - IL_0d28: ldloc.s V_6 - IL_0d2a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0d2f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0d34: stloc.s V_10 - IL_0d36: ldloc.s V_8 - IL_0d38: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0d3d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0d42: stloc.s V_7 - IL_0d44: ldloc.s V_6 - IL_0d46: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0d4b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0d50: stloc.s V_7 - IL_0d52: br.s IL_0d9a - - IL_0d54: ldloc.s V_9 - IL_0d56: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0d5b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0d60: stloc.s V_7 - IL_0d62: ldloc.s V_10 - IL_0d64: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0d69: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0d6e: stloc.s V_10 - IL_0d70: ldloc.s V_9 - IL_0d72: call string [mscorlib]System.Convert::ToString(int32) - IL_0d77: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0d7c: stloc.s V_7 - IL_0d7e: ldloc.s V_10 - IL_0d80: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0d85: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0d8a: stloc.s V_7 - IL_0d8c: ldloc.s V_7 - IL_0d8e: call string [mscorlib]System.Convert::ToString(int32) - IL_0d93: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0d98: stloc.s V_8 - IL_0d9a: ldloc.s V_8 - IL_0d9c: ldloc.s V_10 - IL_0d9e: blt.s IL_0de8 - - IL_0da0: ldloc.s V_10 - IL_0da2: call string [mscorlib]System.Convert::ToString(int32) - IL_0da7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0dac: stloc.s V_10 - IL_0dae: ldloc.s V_6 - IL_0db0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0db5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0dba: stloc.s V_10 - IL_0dbc: ldloc.s V_8 - IL_0dbe: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0dc3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0dc8: stloc.s V_8 - IL_0dca: ldloc.s V_8 - IL_0dcc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0dd1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0dd6: stloc.s V_9 - IL_0dd8: ldloc.s V_9 - IL_0dda: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0ddf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0de4: stloc.s V_6 - IL_0de6: br.s IL_0e2e - - IL_0de8: ldloc.s V_9 - IL_0dea: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0def: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0df4: stloc.s V_10 - IL_0df6: ldloc.s V_9 - IL_0df8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0dfd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0e02: stloc.s V_8 - IL_0e04: ldloc.s V_6 - IL_0e06: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0e0b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0e10: stloc.s V_10 - IL_0e12: ldloc.s V_10 - IL_0e14: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0e19: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0e1e: stloc.s V_9 - IL_0e20: ldloc.s V_8 - IL_0e22: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0e27: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0e2c: stloc.s V_7 - IL_0e2e: ldloc.s V_10 - IL_0e30: ldloc.s V_7 - IL_0e32: bne.un.s IL_0e7c - - IL_0e34: ldloc.s V_7 - IL_0e36: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0e3b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0e40: stloc.s V_8 - IL_0e42: ldloc.s V_6 - IL_0e44: call string [mscorlib]System.Convert::ToString(int32) - IL_0e49: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0e4e: stloc.s V_7 - IL_0e50: ldloc.s V_9 - IL_0e52: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0e57: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0e5c: stloc.s V_9 - IL_0e5e: ldloc.s V_8 - IL_0e60: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0e65: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0e6a: stloc.s V_7 - IL_0e6c: ldloc.s V_6 - IL_0e6e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0e73: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0e78: stloc.s V_7 - IL_0e7a: br.s IL_0ec2 - - IL_0e7c: ldloc.s V_6 - IL_0e7e: call string [mscorlib]System.Convert::ToString(int32) - IL_0e83: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0e88: stloc.s V_7 - IL_0e8a: ldloc.s V_7 - IL_0e8c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0e91: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0e96: stloc.s V_8 - IL_0e98: ldloc.s V_6 - IL_0e9a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0e9f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0ea4: stloc.s V_7 - IL_0ea6: ldloc.s V_9 - IL_0ea8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0ead: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0eb2: stloc.s V_10 - IL_0eb4: ldloc.s V_10 - IL_0eb6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0ebb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0ec0: stloc.s V_6 - IL_0ec2: ldloc.s V_6 - IL_0ec4: ldloc.s V_7 - IL_0ec6: beq.s IL_0f10 - - IL_0ec8: ldloc.s V_8 - IL_0eca: call string [mscorlib]System.Convert::ToString(int32) - IL_0ecf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0ed4: stloc.s V_6 - IL_0ed6: ldloc.s V_10 - IL_0ed8: call string [mscorlib]System.Convert::ToString(int32) - IL_0edd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0ee2: stloc.s V_7 - IL_0ee4: ldloc.s V_6 - IL_0ee6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0eeb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0ef0: stloc.s V_8 - IL_0ef2: ldloc.s V_6 - IL_0ef4: call string [mscorlib]System.Convert::ToString(int32) - IL_0ef9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0efe: stloc.s V_6 - IL_0f00: ldloc.s V_7 - IL_0f02: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0f07: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0f0c: stloc.s V_9 - IL_0f0e: br.s IL_0f56 - - IL_0f10: ldloc.s V_9 - IL_0f12: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0f17: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0f1c: stloc.s V_10 - IL_0f1e: ldloc.s V_10 - IL_0f20: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0f25: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0f2a: stloc.s V_8 - IL_0f2c: ldloc.s V_7 - IL_0f2e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0f33: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0f38: stloc.s V_6 - IL_0f3a: ldloc.s V_8 - IL_0f3c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0f41: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0f46: stloc.s V_7 - IL_0f48: ldloc.s V_6 - IL_0f4a: call string [mscorlib]System.Convert::ToString(int32) - IL_0f4f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0f54: stloc.s V_7 - IL_0f56: ldloc.s V_7 - IL_0f58: ldloc.s V_8 - IL_0f5a: bne.un.s IL_0fa4 - - IL_0f5c: ldloc.s V_9 - IL_0f5e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0f63: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0f68: stloc.s V_6 - IL_0f6a: ldloc.s V_6 - IL_0f6c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0f71: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0f76: stloc.s V_9 - IL_0f78: ldloc.s V_6 - IL_0f7a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_0f7f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_0f84: stloc.s V_7 - IL_0f86: ldloc.s V_8 - IL_0f88: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0f8d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0f92: stloc.s V_6 - IL_0f94: ldloc.s V_9 - IL_0f96: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0f9b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0fa0: stloc.s V_6 - IL_0fa2: br.s IL_0fea - - IL_0fa4: ldloc.s V_7 - IL_0fa6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0fab: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0fb0: stloc.s V_8 - IL_0fb2: ldloc.s V_10 - IL_0fb4: call string [mscorlib]System.Convert::ToString(int32) - IL_0fb9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0fbe: stloc.s V_6 - IL_0fc0: ldloc.s V_7 - IL_0fc2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0fc7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0fcc: stloc.s V_7 - IL_0fce: ldloc.s V_7 - IL_0fd0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_0fd5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_0fda: stloc.s V_6 - IL_0fdc: ldloc.s V_7 - IL_0fde: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_0fe3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_0fe8: stloc.s V_8 - IL_0fea: ldloc.s V_7 - IL_0fec: ldloc.s V_7 - IL_0fee: ble.s IL_1038 - - IL_0ff0: ldloc.s V_7 - IL_0ff2: call string [mscorlib]System.Convert::ToString(int32) - IL_0ff7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_0ffc: stloc.s V_9 - IL_0ffe: ldloc.s V_6 - IL_1000: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1005: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_100a: stloc.s V_8 - IL_100c: ldloc.s V_6 - IL_100e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1013: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1018: stloc.s V_9 - IL_101a: ldloc.s V_10 - IL_101c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1021: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1026: stloc.s V_9 - IL_1028: ldloc.s V_7 - IL_102a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_102f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1034: stloc.s V_10 - IL_1036: br.s IL_107e - - IL_1038: ldloc.s V_7 - IL_103a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_103f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1044: stloc.s V_9 - IL_1046: ldloc.s V_9 - IL_1048: call string [mscorlib]System.Convert::ToString(int32) - IL_104d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1052: stloc.s V_9 - IL_1054: ldloc.s V_6 - IL_1056: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_105b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1060: stloc.s V_8 - IL_1062: ldloc.s V_10 - IL_1064: call string [mscorlib]System.Convert::ToString(int32) - IL_1069: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_106e: stloc.s V_7 - IL_1070: ldloc.s V_9 - IL_1072: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1077: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_107c: stloc.s V_10 - IL_107e: ldloc.s V_6 - IL_1080: ldloc.s V_10 - IL_1082: beq.s IL_10cc - - IL_1084: ldloc.s V_8 - IL_1086: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_108b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1090: stloc.s V_7 - IL_1092: ldloc.s V_6 - IL_1094: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1099: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_109e: stloc.s V_7 - IL_10a0: ldloc.s V_8 - IL_10a2: call string [mscorlib]System.Convert::ToString(int32) - IL_10a7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_10ac: stloc.s V_6 - IL_10ae: ldloc.s V_6 - IL_10b0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_10b5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_10ba: stloc.s V_9 - IL_10bc: ldloc.s V_10 - IL_10be: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_10c3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_10c8: stloc.s V_7 - IL_10ca: br.s IL_1112 - - IL_10cc: ldloc.s V_8 - IL_10ce: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_10d3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_10d8: stloc.s V_10 - IL_10da: ldloc.s V_9 - IL_10dc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_10e1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_10e6: stloc.s V_10 - IL_10e8: ldloc.s V_9 - IL_10ea: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_10ef: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_10f4: stloc.s V_8 - IL_10f6: ldloc.s V_8 - IL_10f8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_10fd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1102: stloc.s V_7 - IL_1104: ldloc.s V_7 - IL_1106: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_110b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1110: stloc.s V_7 - IL_1112: ldloc.s V_10 - IL_1114: ldloc.s V_10 - IL_1116: blt.s IL_1160 - - IL_1118: ldloc.s V_9 - IL_111a: call string [mscorlib]System.Convert::ToString(int32) - IL_111f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1124: stloc.s V_6 - IL_1126: ldloc.s V_9 - IL_1128: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_112d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1132: stloc.s V_10 - IL_1134: ldloc.s V_6 - IL_1136: call string [mscorlib]System.Convert::ToString(int32) - IL_113b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1140: stloc.s V_6 - IL_1142: ldloc.s V_8 - IL_1144: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1149: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_114e: stloc.s V_7 - IL_1150: ldloc.s V_8 - IL_1152: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1157: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_115c: stloc.s V_10 - IL_115e: br.s IL_11a6 - - IL_1160: ldloc.s V_10 - IL_1162: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1167: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_116c: stloc.s V_10 - IL_116e: ldloc.s V_9 - IL_1170: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1175: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_117a: stloc.s V_7 - IL_117c: ldloc.s V_7 - IL_117e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1183: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1188: stloc.s V_7 - IL_118a: ldloc.s V_10 - IL_118c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1191: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1196: stloc.s V_9 - IL_1198: ldloc.s V_9 - IL_119a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_119f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_11a4: stloc.s V_8 - IL_11a6: ldloc.s V_7 - IL_11a8: ldloc.s V_9 - IL_11aa: ble.s IL_11f4 - - IL_11ac: ldloc.s V_7 - IL_11ae: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_11b3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_11b8: stloc.s V_7 - IL_11ba: ldloc.s V_7 - IL_11bc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_11c1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_11c6: stloc.s V_6 - IL_11c8: ldloc.s V_9 - IL_11ca: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_11cf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_11d4: stloc.s V_9 - IL_11d6: ldloc.s V_7 - IL_11d8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_11dd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_11e2: stloc.s V_8 - IL_11e4: ldloc.s V_7 - IL_11e6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_11eb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_11f0: stloc.s V_7 - IL_11f2: br.s IL_123a - - IL_11f4: ldloc.s V_9 - IL_11f6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_11fb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1200: stloc.s V_6 - IL_1202: ldloc.s V_10 - IL_1204: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1209: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_120e: stloc.s V_7 - IL_1210: ldloc.s V_10 - IL_1212: call string [mscorlib]System.Convert::ToString(int32) - IL_1217: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_121c: stloc.s V_6 - IL_121e: ldloc.s V_8 - IL_1220: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1225: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_122a: stloc.s V_7 - IL_122c: ldloc.s V_9 - IL_122e: call string [mscorlib]System.Convert::ToString(int32) - IL_1233: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1238: stloc.s V_10 - IL_123a: ldloc.s V_7 - IL_123c: ldloc.s V_8 - IL_123e: bge.s IL_1288 - - IL_1240: ldloc.s V_9 - IL_1242: call string [mscorlib]System.Convert::ToString(int32) - IL_1247: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_124c: stloc.s V_10 - IL_124e: ldloc.s V_6 - IL_1250: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1255: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_125a: stloc.s V_6 - IL_125c: ldloc.s V_7 - IL_125e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1263: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1268: stloc.s V_9 - IL_126a: ldloc.s V_9 - IL_126c: call string [mscorlib]System.Convert::ToString(int32) - IL_1271: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1276: stloc.s V_6 - IL_1278: ldloc.s V_9 - IL_127a: call string [mscorlib]System.Convert::ToString(int32) - IL_127f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1284: stloc.s V_6 - IL_1286: br.s IL_12ce - - IL_1288: ldloc.s V_8 - IL_128a: call string [mscorlib]System.Convert::ToString(int32) - IL_128f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1294: stloc.s V_8 - IL_1296: ldloc.s V_6 - IL_1298: call string [mscorlib]System.Convert::ToString(int32) - IL_129d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_12a2: stloc.s V_6 - IL_12a4: ldloc.s V_9 - IL_12a6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_12ab: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_12b0: stloc.s V_9 - IL_12b2: ldloc.s V_9 - IL_12b4: call string [mscorlib]System.Convert::ToString(int32) - IL_12b9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_12be: stloc.s V_8 - IL_12c0: ldloc.s V_6 - IL_12c2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_12c7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_12cc: stloc.s V_10 - IL_12ce: ldloc.s V_7 - IL_12d0: ldloc.s V_9 - IL_12d2: beq.s IL_131c - - IL_12d4: ldloc.s V_9 - IL_12d6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_12db: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_12e0: stloc.s V_9 - IL_12e2: ldloc.s V_9 - IL_12e4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_12e9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_12ee: stloc.s V_9 - IL_12f0: ldloc.s V_9 - IL_12f2: call string [mscorlib]System.Convert::ToString(int32) - IL_12f7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_12fc: stloc.s V_8 - IL_12fe: ldloc.s V_10 - IL_1300: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1305: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_130a: stloc.s V_8 - IL_130c: ldloc.s V_9 - IL_130e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1313: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1318: stloc.s V_6 - IL_131a: br.s IL_1362 - - IL_131c: ldloc.s V_6 - IL_131e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1323: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1328: stloc.s V_9 - IL_132a: ldloc.s V_9 - IL_132c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1331: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1336: stloc.s V_7 - IL_1338: ldloc.s V_8 - IL_133a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_133f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1344: stloc.s V_8 - IL_1346: ldloc.s V_6 - IL_1348: call string [mscorlib]System.Convert::ToString(int32) - IL_134d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1352: stloc.s V_10 - IL_1354: ldloc.s V_8 - IL_1356: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_135b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1360: stloc.s V_8 - IL_1362: ldloc.s V_6 - IL_1364: ldloc.s V_8 - IL_1366: ble.s IL_13b0 - - IL_1368: ldloc.s V_6 - IL_136a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_136f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1374: stloc.s V_6 - IL_1376: ldloc.s V_9 - IL_1378: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_137d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1382: stloc.s V_10 - IL_1384: ldloc.s V_10 - IL_1386: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_138b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1390: stloc.s V_10 - IL_1392: ldloc.s V_7 - IL_1394: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1399: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_139e: stloc.s V_7 - IL_13a0: ldloc.s V_8 - IL_13a2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_13a7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_13ac: stloc.s V_9 - IL_13ae: br.s IL_13f6 - - IL_13b0: ldloc.s V_8 - IL_13b2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_13b7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_13bc: stloc.s V_10 - IL_13be: ldloc.s V_6 - IL_13c0: call string [mscorlib]System.Convert::ToString(int32) - IL_13c5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_13ca: stloc.s V_6 - IL_13cc: ldloc.s V_7 - IL_13ce: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_13d3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_13d8: stloc.s V_10 - IL_13da: ldloc.s V_7 - IL_13dc: call string [mscorlib]System.Convert::ToString(int32) - IL_13e1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_13e6: stloc.s V_7 - IL_13e8: ldloc.s V_10 - IL_13ea: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_13ef: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_13f4: stloc.s V_8 - IL_13f6: ldloc.s V_8 - IL_13f8: ldloc.s V_10 - IL_13fa: bge.s IL_1444 - - IL_13fc: ldloc.s V_9 - IL_13fe: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1403: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1408: stloc.s V_8 - IL_140a: ldloc.s V_8 - IL_140c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1411: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1416: stloc.s V_8 - IL_1418: ldloc.s V_9 - IL_141a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_141f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1424: stloc.s V_7 - IL_1426: ldloc.s V_9 - IL_1428: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_142d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1432: stloc.s V_10 - IL_1434: ldloc.s V_7 - IL_1436: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_143b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1440: stloc.s V_7 - IL_1442: br.s IL_148a - - IL_1444: ldloc.s V_9 - IL_1446: call string [mscorlib]System.Convert::ToString(int32) - IL_144b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1450: stloc.s V_8 - IL_1452: ldloc.s V_8 - IL_1454: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1459: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_145e: stloc.s V_6 - IL_1460: ldloc.s V_8 - IL_1462: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1467: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_146c: stloc.s V_8 - IL_146e: ldloc.s V_6 - IL_1470: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1475: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_147a: stloc.s V_9 - IL_147c: ldloc.s V_8 - IL_147e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1483: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1488: stloc.s V_7 - IL_148a: ldloc.s V_6 - IL_148c: ldloc.s V_9 - IL_148e: beq.s IL_14d8 - - IL_1490: ldloc.s V_7 - IL_1492: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1497: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_149c: stloc.s V_7 - IL_149e: ldloc.s V_8 - IL_14a0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_14a5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_14aa: stloc.s V_9 - IL_14ac: ldloc.s V_6 - IL_14ae: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_14b3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_14b8: stloc.s V_6 - IL_14ba: ldloc.s V_9 - IL_14bc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_14c1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_14c6: stloc.s V_7 - IL_14c8: ldloc.s V_7 - IL_14ca: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_14cf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_14d4: stloc.s V_8 - IL_14d6: br.s IL_151e - - IL_14d8: ldloc.s V_8 - IL_14da: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_14df: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_14e4: stloc.s V_10 - IL_14e6: ldloc.s V_8 - IL_14e8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_14ed: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_14f2: stloc.s V_7 - IL_14f4: ldloc.s V_10 - IL_14f6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_14fb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1500: stloc.s V_8 - IL_1502: ldloc.s V_10 - IL_1504: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1509: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_150e: stloc.s V_7 - IL_1510: ldloc.s V_6 - IL_1512: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1517: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_151c: stloc.s V_7 - IL_151e: ldloc.s V_10 - IL_1520: ldloc.s V_7 - IL_1522: blt.s IL_156c - - IL_1524: ldloc.s V_6 - IL_1526: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_152b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1530: stloc.s V_6 - IL_1532: ldloc.s V_6 - IL_1534: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1539: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_153e: stloc.s V_6 - IL_1540: ldloc.s V_6 - IL_1542: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1547: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_154c: stloc.s V_7 - IL_154e: ldloc.s V_6 - IL_1550: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1555: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_155a: stloc.s V_7 - IL_155c: ldloc.s V_10 - IL_155e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1563: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1568: stloc.s V_9 - IL_156a: br.s IL_15b2 - - IL_156c: ldloc.s V_7 - IL_156e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1573: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1578: stloc.s V_9 - IL_157a: ldloc.s V_10 - IL_157c: call string [mscorlib]System.Convert::ToString(int32) - IL_1581: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1586: stloc.s V_10 - IL_1588: ldloc.s V_6 - IL_158a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_158f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1594: stloc.s V_7 - IL_1596: ldloc.s V_8 - IL_1598: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_159d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_15a2: stloc.s V_7 - IL_15a4: ldloc.s V_9 - IL_15a6: call string [mscorlib]System.Convert::ToString(int32) - IL_15ab: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_15b0: stloc.s V_8 - IL_15b2: ldloc.s V_10 - IL_15b4: ldloc.s V_7 - IL_15b6: beq.s IL_1600 - - IL_15b8: ldloc.s V_6 - IL_15ba: call string [mscorlib]System.Convert::ToString(int32) - IL_15bf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_15c4: stloc.s V_8 - IL_15c6: ldloc.s V_6 - IL_15c8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_15cd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_15d2: stloc.s V_6 - IL_15d4: ldloc.s V_6 - IL_15d6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_15db: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_15e0: stloc.s V_8 - IL_15e2: ldloc.s V_10 - IL_15e4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_15e9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_15ee: stloc.s V_7 - IL_15f0: ldloc.s V_9 - IL_15f2: call string [mscorlib]System.Convert::ToString(int32) - IL_15f7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_15fc: stloc.s V_10 - IL_15fe: br.s IL_1646 - - IL_1600: ldloc.s V_8 - IL_1602: call string [mscorlib]System.Convert::ToString(int32) - IL_1607: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_160c: stloc.s V_6 - IL_160e: ldloc.s V_6 - IL_1610: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1615: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_161a: stloc.s V_10 - IL_161c: ldloc.s V_10 - IL_161e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1623: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1628: stloc.s V_8 - IL_162a: ldloc.s V_9 - IL_162c: call string [mscorlib]System.Convert::ToString(int32) - IL_1631: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1636: stloc.s V_6 - IL_1638: ldloc.s V_7 - IL_163a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_163f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1644: stloc.s V_8 - IL_1646: ldloc.s V_7 - IL_1648: ldloc.s V_7 - IL_164a: blt.s IL_1694 - - IL_164c: ldloc.s V_8 - IL_164e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1653: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1658: stloc.s V_9 - IL_165a: ldloc.s V_8 - IL_165c: call string [mscorlib]System.Convert::ToString(int32) - IL_1661: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1666: stloc.s V_9 - IL_1668: ldloc.s V_9 - IL_166a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_166f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1674: stloc.s V_7 - IL_1676: ldloc.s V_9 - IL_1678: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_167d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1682: stloc.s V_9 - IL_1684: ldloc.s V_8 - IL_1686: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_168b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1690: stloc.s V_7 - IL_1692: br.s IL_16da - - IL_1694: ldloc.s V_6 - IL_1696: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_169b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_16a0: stloc.s V_9 - IL_16a2: ldloc.s V_7 - IL_16a4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_16a9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_16ae: stloc.s V_6 - IL_16b0: ldloc.s V_10 - IL_16b2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_16b7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_16bc: stloc.s V_6 - IL_16be: ldloc.s V_7 - IL_16c0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_16c5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_16ca: stloc.s V_6 - IL_16cc: ldloc.s V_7 - IL_16ce: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_16d3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_16d8: stloc.s V_8 - IL_16da: ldloc.s V_10 - IL_16dc: ldloc.s V_10 - IL_16de: bne.un.s IL_1728 - - IL_16e0: ldloc.s V_8 - IL_16e2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_16e7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_16ec: stloc.s V_8 - IL_16ee: ldloc.s V_10 - IL_16f0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_16f5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_16fa: stloc.s V_6 - IL_16fc: ldloc.s V_6 - IL_16fe: call string [mscorlib]System.Convert::ToString(int32) - IL_1703: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1708: stloc.s V_6 - IL_170a: ldloc.s V_10 - IL_170c: call string [mscorlib]System.Convert::ToString(int32) - IL_1711: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1716: stloc.s V_8 - IL_1718: ldloc.s V_6 - IL_171a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_171f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1724: stloc.s V_7 - IL_1726: br.s IL_176e - - IL_1728: ldloc.s V_8 - IL_172a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_172f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1734: stloc.s V_6 - IL_1736: ldloc.s V_6 - IL_1738: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_173d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1742: stloc.s V_7 - IL_1744: ldloc.s V_7 - IL_1746: call string [mscorlib]System.Convert::ToString(int32) - IL_174b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1750: stloc.s V_10 - IL_1752: ldloc.s V_8 - IL_1754: call string [mscorlib]System.Convert::ToString(int32) - IL_1759: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_175e: stloc.s V_9 - IL_1760: ldloc.s V_9 - IL_1762: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1767: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_176c: stloc.s V_6 - IL_176e: ldloc.s V_10 - IL_1770: ldloc.s V_6 - IL_1772: bge.s IL_17bc - - IL_1774: ldloc.s V_7 - IL_1776: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_177b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1780: stloc.s V_10 - IL_1782: ldloc.s V_6 - IL_1784: call string [mscorlib]System.Convert::ToString(int32) - IL_1789: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_178e: stloc.s V_6 - IL_1790: ldloc.s V_8 - IL_1792: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1797: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_179c: stloc.s V_6 - IL_179e: ldloc.s V_7 - IL_17a0: call string [mscorlib]System.Convert::ToString(int32) - IL_17a5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_17aa: stloc.s V_7 - IL_17ac: ldloc.s V_7 - IL_17ae: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_17b3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_17b8: stloc.s V_10 - IL_17ba: br.s IL_1802 - - IL_17bc: ldloc.s V_6 - IL_17be: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_17c3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_17c8: stloc.s V_6 - IL_17ca: ldloc.s V_9 - IL_17cc: call string [mscorlib]System.Convert::ToString(int32) - IL_17d1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_17d6: stloc.s V_10 - IL_17d8: ldloc.s V_9 - IL_17da: call string [mscorlib]System.Convert::ToString(int32) - IL_17df: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_17e4: stloc.s V_9 - IL_17e6: ldloc.s V_8 - IL_17e8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_17ed: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_17f2: stloc.s V_7 - IL_17f4: ldloc.s V_9 - IL_17f6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_17fb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1800: stloc.s V_8 - IL_1802: ldloc.s V_6 - IL_1804: ldloc.s V_9 - IL_1806: blt.s IL_1850 - - IL_1808: ldloc.s V_6 - IL_180a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_180f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1814: stloc.s V_10 - IL_1816: ldloc.s V_6 - IL_1818: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_181d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1822: stloc.s V_10 - IL_1824: ldloc.s V_6 - IL_1826: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_182b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1830: stloc.s V_8 - IL_1832: ldloc.s V_10 - IL_1834: call string [mscorlib]System.Convert::ToString(int32) - IL_1839: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_183e: stloc.s V_8 - IL_1840: ldloc.s V_10 - IL_1842: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1847: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_184c: stloc.s V_10 - IL_184e: br.s IL_1896 - - IL_1850: ldloc.s V_8 - IL_1852: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1857: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_185c: stloc.s V_7 - IL_185e: ldloc.s V_7 - IL_1860: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1865: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_186a: stloc.s V_9 - IL_186c: ldloc.s V_7 - IL_186e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1873: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1878: stloc.s V_7 - IL_187a: ldloc.s V_6 - IL_187c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1881: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1886: stloc.s V_9 - IL_1888: ldloc.s V_6 - IL_188a: call string [mscorlib]System.Convert::ToString(int32) - IL_188f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1894: stloc.s V_8 - IL_1896: ldloc.s V_10 - IL_1898: ldloc.s V_8 - IL_189a: beq.s IL_18e4 - - IL_189c: ldloc.s V_8 - IL_189e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_18a3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_18a8: stloc.s V_8 - IL_18aa: ldloc.s V_8 - IL_18ac: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_18b1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_18b6: stloc.s V_6 - IL_18b8: ldloc.s V_8 - IL_18ba: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_18bf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_18c4: stloc.s V_10 - IL_18c6: ldloc.s V_10 - IL_18c8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_18cd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_18d2: stloc.s V_9 - IL_18d4: ldloc.s V_9 - IL_18d6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_18db: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_18e0: stloc.s V_10 - IL_18e2: br.s IL_192a - - IL_18e4: ldloc.s V_10 - IL_18e6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_18eb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_18f0: stloc.s V_9 - IL_18f2: ldloc.s V_9 - IL_18f4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_18f9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_18fe: stloc.s V_6 - IL_1900: ldloc.s V_6 - IL_1902: call string [mscorlib]System.Convert::ToString(int32) - IL_1907: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_190c: stloc.s V_8 - IL_190e: ldloc.s V_6 - IL_1910: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1915: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_191a: stloc.s V_10 - IL_191c: ldloc.s V_7 - IL_191e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1923: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1928: stloc.s V_6 - IL_192a: ldloc.s V_9 - IL_192c: ldloc.s V_8 - IL_192e: beq.s IL_1978 - - IL_1930: ldloc.s V_9 - IL_1932: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1937: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_193c: stloc.s V_7 - IL_193e: ldloc.s V_10 - IL_1940: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1945: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_194a: stloc.s V_7 - IL_194c: ldloc.s V_6 - IL_194e: call string [mscorlib]System.Convert::ToString(int32) - IL_1953: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1958: stloc.s V_6 - IL_195a: ldloc.s V_6 - IL_195c: call string [mscorlib]System.Convert::ToString(int32) - IL_1961: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1966: stloc.s V_10 - IL_1968: ldloc.s V_8 - IL_196a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_196f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1974: stloc.s V_7 - IL_1976: br.s IL_19be - - IL_1978: ldloc.s V_8 - IL_197a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_197f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1984: stloc.s V_8 - IL_1986: ldloc.s V_6 - IL_1988: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_198d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1992: stloc.s V_7 - IL_1994: ldloc.s V_8 - IL_1996: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_199b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_19a0: stloc.s V_10 - IL_19a2: ldloc.s V_10 - IL_19a4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_19a9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_19ae: stloc.s V_8 - IL_19b0: ldloc.s V_8 - IL_19b2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_19b7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_19bc: stloc.s V_7 - IL_19be: ldloc.s V_9 - IL_19c0: ldloc.s V_8 - IL_19c2: ble.s IL_1a0c - - IL_19c4: ldloc.s V_10 - IL_19c6: call string [mscorlib]System.Convert::ToString(int32) - IL_19cb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_19d0: stloc.s V_7 - IL_19d2: ldloc.s V_6 - IL_19d4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_19d9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_19de: stloc.s V_6 - IL_19e0: ldloc.s V_6 - IL_19e2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_19e7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_19ec: stloc.s V_10 - IL_19ee: ldloc.s V_10 - IL_19f0: call string [mscorlib]System.Convert::ToString(int32) - IL_19f5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_19fa: stloc.s V_9 - IL_19fc: ldloc.s V_8 - IL_19fe: call string [mscorlib]System.Convert::ToString(int32) - IL_1a03: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1a08: stloc.s V_10 - IL_1a0a: br.s IL_1a52 - - IL_1a0c: ldloc.s V_7 - IL_1a0e: call string [mscorlib]System.Convert::ToString(int32) - IL_1a13: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1a18: stloc.s V_8 - IL_1a1a: ldloc.s V_10 - IL_1a1c: call string [mscorlib]System.Convert::ToString(int32) - IL_1a21: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1a26: stloc.s V_10 - IL_1a28: ldloc.s V_7 - IL_1a2a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1a2f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1a34: stloc.s V_7 - IL_1a36: ldloc.s V_9 - IL_1a38: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1a3d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1a42: stloc.s V_6 - IL_1a44: ldloc.s V_10 - IL_1a46: call string [mscorlib]System.Convert::ToString(int32) - IL_1a4b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1a50: stloc.s V_10 - IL_1a52: ldloc.s V_9 - IL_1a54: ldloc.s V_6 - IL_1a56: bgt.s IL_1aa0 - - IL_1a58: ldloc.s V_7 - IL_1a5a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1a5f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1a64: stloc.s V_9 - IL_1a66: ldloc.s V_8 - IL_1a68: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1a6d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1a72: stloc.s V_8 - IL_1a74: ldloc.s V_9 - IL_1a76: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1a7b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1a80: stloc.s V_8 - IL_1a82: ldloc.s V_8 - IL_1a84: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1a89: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1a8e: stloc.s V_6 - IL_1a90: ldloc.s V_10 - IL_1a92: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1a97: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1a9c: stloc.s V_9 - IL_1a9e: br.s IL_1ae6 - - IL_1aa0: ldloc.s V_7 - IL_1aa2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1aa7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1aac: stloc.s V_8 - IL_1aae: ldloc.s V_10 - IL_1ab0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1ab5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1aba: stloc.s V_6 - IL_1abc: ldloc.s V_6 - IL_1abe: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1ac3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1ac8: stloc.s V_8 - IL_1aca: ldloc.s V_7 - IL_1acc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1ad1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1ad6: stloc.s V_8 - IL_1ad8: ldloc.s V_8 - IL_1ada: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1adf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1ae4: stloc.s V_8 - IL_1ae6: ldloc.s V_10 - IL_1ae8: ldloc.s V_10 - IL_1aea: ble.s IL_1b34 - - IL_1aec: ldloc.s V_9 - IL_1aee: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1af3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1af8: stloc.s V_10 - IL_1afa: ldloc.s V_6 - IL_1afc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1b01: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1b06: stloc.s V_7 - IL_1b08: ldloc.s V_7 - IL_1b0a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1b0f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1b14: stloc.s V_9 - IL_1b16: ldloc.s V_7 - IL_1b18: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1b1d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1b22: stloc.s V_7 - IL_1b24: ldloc.s V_8 - IL_1b26: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1b2b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1b30: stloc.s V_10 - IL_1b32: br.s IL_1b7a - - IL_1b34: ldloc.s V_10 - IL_1b36: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1b3b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1b40: stloc.s V_10 - IL_1b42: ldloc.s V_8 - IL_1b44: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1b49: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1b4e: stloc.s V_8 - IL_1b50: ldloc.s V_10 - IL_1b52: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1b57: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1b5c: stloc.s V_6 - IL_1b5e: ldloc.s V_7 - IL_1b60: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1b65: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1b6a: stloc.s V_6 - IL_1b6c: ldloc.s V_7 - IL_1b6e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1b73: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1b78: stloc.s V_7 - IL_1b7a: ldloc.s V_6 - IL_1b7c: ldloc.s V_7 - IL_1b7e: ble.s IL_1bc8 - - IL_1b80: ldloc.s V_6 - IL_1b82: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1b87: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1b8c: stloc.s V_9 - IL_1b8e: ldloc.s V_10 - IL_1b90: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1b95: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1b9a: stloc.s V_6 - IL_1b9c: ldloc.s V_10 - IL_1b9e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1ba3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1ba8: stloc.s V_7 - IL_1baa: ldloc.s V_9 - IL_1bac: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1bb1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1bb6: stloc.s V_9 - IL_1bb8: ldloc.s V_9 - IL_1bba: call string [mscorlib]System.Convert::ToString(int32) - IL_1bbf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1bc4: stloc.s V_9 - IL_1bc6: br.s IL_1c0e - - IL_1bc8: ldloc.s V_9 - IL_1bca: call string [mscorlib]System.Convert::ToString(int32) - IL_1bcf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1bd4: stloc.s V_9 - IL_1bd6: ldloc.s V_8 - IL_1bd8: call string [mscorlib]System.Convert::ToString(int32) - IL_1bdd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1be2: stloc.s V_9 - IL_1be4: ldloc.s V_6 - IL_1be6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1beb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1bf0: stloc.s V_7 - IL_1bf2: ldloc.s V_10 - IL_1bf4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1bf9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1bfe: stloc.s V_10 - IL_1c00: ldloc.s V_8 - IL_1c02: call string [mscorlib]System.Convert::ToString(int32) - IL_1c07: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1c0c: stloc.s V_9 - IL_1c0e: ldloc.s V_6 - IL_1c10: ldloc.s V_7 - IL_1c12: ble.s IL_1c5c - - IL_1c14: ldloc.s V_8 - IL_1c16: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1c1b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1c20: stloc.s V_6 - IL_1c22: ldloc.s V_6 - IL_1c24: call string [mscorlib]System.Convert::ToString(int32) - IL_1c29: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1c2e: stloc.s V_8 - IL_1c30: ldloc.s V_6 - IL_1c32: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1c37: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1c3c: stloc.s V_6 - IL_1c3e: ldloc.s V_10 - IL_1c40: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1c45: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1c4a: stloc.s V_9 - IL_1c4c: ldloc.s V_7 - IL_1c4e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1c53: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1c58: stloc.s V_6 - IL_1c5a: br.s IL_1ca2 - - IL_1c5c: ldloc.s V_7 - IL_1c5e: call string [mscorlib]System.Convert::ToString(int32) - IL_1c63: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1c68: stloc.s V_8 - IL_1c6a: ldloc.s V_8 - IL_1c6c: call string [mscorlib]System.Convert::ToString(int32) - IL_1c71: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1c76: stloc.s V_8 - IL_1c78: ldloc.s V_6 - IL_1c7a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1c7f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1c84: stloc.s V_9 - IL_1c86: ldloc.s V_6 - IL_1c88: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1c8d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1c92: stloc.s V_6 - IL_1c94: ldloc.s V_10 - IL_1c96: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1c9b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1ca0: stloc.s V_10 - IL_1ca2: ldloc.s V_9 - IL_1ca4: ldloc.s V_6 - IL_1ca6: blt.s IL_1cf0 - - IL_1ca8: ldloc.s V_8 - IL_1caa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1caf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1cb4: stloc.s V_8 - IL_1cb6: ldloc.s V_10 - IL_1cb8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1cbd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1cc2: stloc.s V_7 - IL_1cc4: ldloc.s V_7 - IL_1cc6: call string [mscorlib]System.Convert::ToString(int32) - IL_1ccb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1cd0: stloc.s V_8 - IL_1cd2: ldloc.s V_7 - IL_1cd4: call string [mscorlib]System.Convert::ToString(int32) - IL_1cd9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1cde: stloc.s V_8 - IL_1ce0: ldloc.s V_9 - IL_1ce2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1ce7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1cec: stloc.s V_6 - IL_1cee: br.s IL_1d36 - - IL_1cf0: ldloc.s V_6 - IL_1cf2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1cf7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1cfc: stloc.s V_8 - IL_1cfe: ldloc.s V_8 - IL_1d00: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1d05: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1d0a: stloc.s V_6 - IL_1d0c: ldloc.s V_9 - IL_1d0e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1d13: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1d18: stloc.s V_10 - IL_1d1a: ldloc.s V_8 - IL_1d1c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1d21: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1d26: stloc.s V_8 - IL_1d28: ldloc.s V_10 - IL_1d2a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1d2f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1d34: stloc.s V_6 - IL_1d36: ldloc.s V_7 - IL_1d38: ldloc.s V_9 - IL_1d3a: ble.s IL_1d84 - - IL_1d3c: ldloc.s V_8 - IL_1d3e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1d43: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1d48: stloc.s V_10 - IL_1d4a: ldloc.s V_7 - IL_1d4c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1d51: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1d56: stloc.s V_9 - IL_1d58: ldloc.s V_10 - IL_1d5a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1d5f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1d64: stloc.s V_8 - IL_1d66: ldloc.s V_9 - IL_1d68: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1d6d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1d72: stloc.s V_6 - IL_1d74: ldloc.s V_8 - IL_1d76: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1d7b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1d80: stloc.s V_9 - IL_1d82: br.s IL_1dca - - IL_1d84: ldloc.s V_7 - IL_1d86: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1d8b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1d90: stloc.s V_7 - IL_1d92: ldloc.s V_6 - IL_1d94: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1d99: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1d9e: stloc.s V_10 - IL_1da0: ldloc.s V_8 - IL_1da2: call string [mscorlib]System.Convert::ToString(int32) - IL_1da7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1dac: stloc.s V_8 - IL_1dae: ldloc.s V_10 - IL_1db0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1db5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1dba: stloc.s V_10 - IL_1dbc: ldloc.s V_8 - IL_1dbe: call string [mscorlib]System.Convert::ToString(int32) - IL_1dc3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1dc8: stloc.s V_8 - IL_1dca: ldloc.s V_7 - IL_1dcc: ldloc.s V_7 - IL_1dce: blt.s IL_1e18 - - IL_1dd0: ldloc.s V_7 - IL_1dd2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1dd7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1ddc: stloc.s V_8 - IL_1dde: ldloc.s V_10 - IL_1de0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1de5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1dea: stloc.s V_6 - IL_1dec: ldloc.s V_8 - IL_1dee: call string [mscorlib]System.Convert::ToString(int32) - IL_1df3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1df8: stloc.s V_10 - IL_1dfa: ldloc.s V_10 - IL_1dfc: call string [mscorlib]System.Convert::ToString(int32) - IL_1e01: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1e06: stloc.s V_9 - IL_1e08: ldloc.s V_7 - IL_1e0a: call string [mscorlib]System.Convert::ToString(int32) - IL_1e0f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1e14: stloc.s V_6 - IL_1e16: br.s IL_1e5e - - IL_1e18: ldloc.s V_10 - IL_1e1a: call string [mscorlib]System.Convert::ToString(int32) - IL_1e1f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1e24: stloc.s V_10 - IL_1e26: ldloc.s V_6 - IL_1e28: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1e2d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1e32: stloc.s V_9 - IL_1e34: ldloc.s V_9 - IL_1e36: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1e3b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1e40: stloc.s V_9 - IL_1e42: ldloc.s V_7 - IL_1e44: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1e49: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1e4e: stloc.s V_6 - IL_1e50: ldloc.s V_8 - IL_1e52: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1e57: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1e5c: stloc.s V_7 - IL_1e5e: ldloc.s V_9 - IL_1e60: ldloc.s V_10 - IL_1e62: bgt.s IL_1eac - - IL_1e64: ldloc.s V_9 - IL_1e66: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1e6b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1e70: stloc.s V_7 - IL_1e72: ldloc.s V_8 - IL_1e74: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1e79: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1e7e: stloc.s V_7 - IL_1e80: ldloc.s V_9 - IL_1e82: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1e87: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1e8c: stloc.s V_7 - IL_1e8e: ldloc.s V_6 - IL_1e90: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1e95: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1e9a: stloc.s V_9 - IL_1e9c: ldloc.s V_7 - IL_1e9e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1ea3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1ea8: stloc.s V_8 - IL_1eaa: br.s IL_1ef2 - - IL_1eac: ldloc.s V_10 - IL_1eae: call string [mscorlib]System.Convert::ToString(int32) - IL_1eb3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1eb8: stloc.s V_9 - IL_1eba: ldloc.s V_6 - IL_1ebc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1ec1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1ec6: stloc.s V_8 - IL_1ec8: ldloc.s V_10 - IL_1eca: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1ecf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1ed4: stloc.s V_7 - IL_1ed6: ldloc.s V_10 - IL_1ed8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1edd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1ee2: stloc.s V_8 - IL_1ee4: ldloc.s V_8 - IL_1ee6: call string [mscorlib]System.Convert::ToString(int32) - IL_1eeb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1ef0: stloc.s V_9 - IL_1ef2: ldloc.s V_6 - IL_1ef4: ldloc.s V_6 - IL_1ef6: beq.s IL_1f40 - - IL_1ef8: ldloc.s V_8 - IL_1efa: call string [mscorlib]System.Convert::ToString(int32) - IL_1eff: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1f04: stloc.s V_6 - IL_1f06: ldloc.s V_8 - IL_1f08: call string [mscorlib]System.Convert::ToString(int32) - IL_1f0d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1f12: stloc.s V_8 - IL_1f14: ldloc.s V_6 - IL_1f16: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1f1b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1f20: stloc.s V_7 - IL_1f22: ldloc.s V_8 - IL_1f24: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1f29: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1f2e: stloc.s V_7 - IL_1f30: ldloc.s V_6 - IL_1f32: call string [mscorlib]System.Convert::ToString(int32) - IL_1f37: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1f3c: stloc.s V_9 - IL_1f3e: br.s IL_1f86 - - IL_1f40: ldloc.s V_8 - IL_1f42: call string [mscorlib]System.Convert::ToString(int32) - IL_1f47: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1f4c: stloc.s V_6 - IL_1f4e: ldloc.s V_10 - IL_1f50: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1f55: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1f5a: stloc.s V_9 - IL_1f5c: ldloc.s V_7 - IL_1f5e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1f63: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1f68: stloc.s V_9 - IL_1f6a: ldloc.s V_6 - IL_1f6c: call string [mscorlib]System.Convert::ToString(int32) - IL_1f71: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1f76: stloc.s V_10 - IL_1f78: ldloc.s V_8 - IL_1f7a: call string [mscorlib]System.Convert::ToString(int32) - IL_1f7f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1f84: stloc.s V_9 - IL_1f86: ldloc.s V_10 - IL_1f88: ldloc.s V_9 - IL_1f8a: blt.s IL_1fd4 - - IL_1f8c: ldloc.s V_6 - IL_1f8e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1f93: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1f98: stloc.s V_6 - IL_1f9a: ldloc.s V_10 - IL_1f9c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1fa1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1fa6: stloc.s V_9 - IL_1fa8: ldloc.s V_7 - IL_1faa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1faf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1fb4: stloc.s V_7 - IL_1fb6: ldloc.s V_6 - IL_1fb8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_1fbd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_1fc2: stloc.s V_6 - IL_1fc4: ldloc.s V_8 - IL_1fc6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_1fcb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_1fd0: stloc.s V_8 - IL_1fd2: br.s IL_201a - - IL_1fd4: ldloc.s V_6 - IL_1fd6: call string [mscorlib]System.Convert::ToString(int32) - IL_1fdb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_1fe0: stloc.s V_9 - IL_1fe2: ldloc.s V_6 - IL_1fe4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1fe9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1fee: stloc.s V_10 - IL_1ff0: ldloc.s V_9 - IL_1ff2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_1ff7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_1ffc: stloc.s V_6 - IL_1ffe: ldloc.s V_10 - IL_2000: call string [mscorlib]System.Convert::ToString(int32) - IL_2005: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_200a: stloc.s V_7 - IL_200c: ldloc.s V_10 - IL_200e: call string [mscorlib]System.Convert::ToString(int32) - IL_2013: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2018: stloc.s V_8 - IL_201a: ldloc.s V_10 - IL_201c: ldloc.s V_6 - IL_201e: bgt.s IL_2068 - - IL_2020: ldloc.s V_7 - IL_2022: call string [mscorlib]System.Convert::ToString(int32) - IL_2027: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_202c: stloc.s V_9 - IL_202e: ldloc.s V_7 - IL_2030: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2035: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_203a: stloc.s V_6 - IL_203c: ldloc.s V_10 - IL_203e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2043: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2048: stloc.s V_9 - IL_204a: ldloc.s V_10 - IL_204c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2051: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2056: stloc.s V_9 - IL_2058: ldloc.s V_10 - IL_205a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_205f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2064: stloc.s V_6 - IL_2066: br.s IL_20ae - - IL_2068: ldloc.s V_10 - IL_206a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_206f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2074: stloc.s V_9 - IL_2076: ldloc.s V_8 - IL_2078: call string [mscorlib]System.Convert::ToString(int32) - IL_207d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2082: stloc.s V_8 - IL_2084: ldloc.s V_6 - IL_2086: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_208b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2090: stloc.s V_9 - IL_2092: ldloc.s V_8 - IL_2094: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2099: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_209e: stloc.s V_8 - IL_20a0: ldloc.s V_8 - IL_20a2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_20a7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_20ac: stloc.s V_10 - IL_20ae: ldloc.s V_8 - IL_20b0: ldloc.s V_6 - IL_20b2: blt.s IL_20fc - - IL_20b4: ldloc.s V_6 - IL_20b6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_20bb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_20c0: stloc.s V_6 - IL_20c2: ldloc.s V_6 - IL_20c4: call string [mscorlib]System.Convert::ToString(int32) - IL_20c9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_20ce: stloc.s V_7 - IL_20d0: ldloc.s V_6 - IL_20d2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_20d7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_20dc: stloc.s V_9 - IL_20de: ldloc.s V_8 - IL_20e0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_20e5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_20ea: stloc.s V_7 - IL_20ec: ldloc.s V_7 - IL_20ee: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_20f3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_20f8: stloc.s V_10 - IL_20fa: br.s IL_2142 - - IL_20fc: ldloc.s V_9 - IL_20fe: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2103: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2108: stloc.s V_6 - IL_210a: ldloc.s V_8 - IL_210c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2111: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2116: stloc.s V_10 - IL_2118: ldloc.s V_9 - IL_211a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_211f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2124: stloc.s V_8 - IL_2126: ldloc.s V_6 - IL_2128: call string [mscorlib]System.Convert::ToString(int32) - IL_212d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2132: stloc.s V_6 - IL_2134: ldloc.s V_8 - IL_2136: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_213b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2140: stloc.s V_9 - IL_2142: ldloc.s V_7 - IL_2144: ldloc.s V_7 - IL_2146: blt.s IL_2190 - - IL_2148: ldloc.s V_8 - IL_214a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_214f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2154: stloc.s V_9 - IL_2156: ldloc.s V_7 - IL_2158: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_215d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2162: stloc.s V_9 - IL_2164: ldloc.s V_7 - IL_2166: call string [mscorlib]System.Convert::ToString(int32) - IL_216b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2170: stloc.s V_10 - IL_2172: ldloc.s V_8 - IL_2174: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2179: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_217e: stloc.s V_8 - IL_2180: ldloc.s V_6 - IL_2182: call string [mscorlib]System.Convert::ToString(int32) - IL_2187: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_218c: stloc.s V_9 - IL_218e: br.s IL_21d6 - - IL_2190: ldloc.s V_10 - IL_2192: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2197: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_219c: stloc.s V_7 - IL_219e: ldloc.s V_7 - IL_21a0: call string [mscorlib]System.Convert::ToString(int32) - IL_21a5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_21aa: stloc.s V_9 - IL_21ac: ldloc.s V_10 - IL_21ae: call string [mscorlib]System.Convert::ToString(int32) - IL_21b3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_21b8: stloc.s V_9 - IL_21ba: ldloc.s V_6 - IL_21bc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_21c1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_21c6: stloc.s V_8 - IL_21c8: ldloc.s V_7 - IL_21ca: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_21cf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_21d4: stloc.s V_6 - IL_21d6: ldloc.s V_10 - IL_21d8: ldloc.s V_7 - IL_21da: bgt.s IL_2224 - - IL_21dc: ldloc.s V_7 - IL_21de: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_21e3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_21e8: stloc.s V_6 - IL_21ea: ldloc.s V_8 - IL_21ec: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_21f1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_21f6: stloc.s V_9 - IL_21f8: ldloc.s V_8 - IL_21fa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_21ff: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2204: stloc.s V_7 - IL_2206: ldloc.s V_8 - IL_2208: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_220d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2212: stloc.s V_6 - IL_2214: ldloc.s V_10 - IL_2216: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_221b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2220: stloc.s V_6 - IL_2222: br.s IL_226a - - IL_2224: ldloc.s V_10 - IL_2226: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_222b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2230: stloc.s V_10 - IL_2232: ldloc.s V_9 - IL_2234: call string [mscorlib]System.Convert::ToString(int32) - IL_2239: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_223e: stloc.s V_8 - IL_2240: ldloc.s V_7 - IL_2242: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2247: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_224c: stloc.s V_6 - IL_224e: ldloc.s V_7 - IL_2250: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2255: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_225a: stloc.s V_9 - IL_225c: ldloc.s V_9 - IL_225e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2263: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2268: stloc.s V_7 - IL_226a: ldloc.s V_9 - IL_226c: ldloc.s V_8 - IL_226e: ble.s IL_22b8 - - IL_2270: ldloc.s V_8 - IL_2272: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2277: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_227c: stloc.s V_7 - IL_227e: ldloc.s V_9 - IL_2280: call string [mscorlib]System.Convert::ToString(int32) - IL_2285: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_228a: stloc.s V_10 - IL_228c: ldloc.s V_8 - IL_228e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2293: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2298: stloc.s V_8 - IL_229a: ldloc.s V_8 - IL_229c: call string [mscorlib]System.Convert::ToString(int32) - IL_22a1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_22a6: stloc.s V_9 - IL_22a8: ldloc.s V_9 - IL_22aa: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_22af: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_22b4: stloc.s V_7 - IL_22b6: br.s IL_22fe - - IL_22b8: ldloc.s V_9 - IL_22ba: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_22bf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_22c4: stloc.s V_6 - IL_22c6: ldloc.s V_7 - IL_22c8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_22cd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_22d2: stloc.s V_8 - IL_22d4: ldloc.s V_6 - IL_22d6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_22db: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_22e0: stloc.s V_8 - IL_22e2: ldloc.s V_10 - IL_22e4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_22e9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_22ee: stloc.s V_10 - IL_22f0: ldloc.s V_6 - IL_22f2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_22f7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_22fc: stloc.s V_7 - IL_22fe: ldloc.s V_6 - IL_2300: ldloc.s V_7 - IL_2302: bne.un.s IL_234c - - IL_2304: ldloc.s V_6 - IL_2306: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_230b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2310: stloc.s V_6 - IL_2312: ldloc.s V_8 - IL_2314: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2319: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_231e: stloc.s V_8 - IL_2320: ldloc.s V_7 - IL_2322: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2327: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_232c: stloc.s V_7 - IL_232e: ldloc.s V_7 - IL_2330: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2335: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_233a: stloc.s V_6 - IL_233c: ldloc.s V_10 - IL_233e: call string [mscorlib]System.Convert::ToString(int32) - IL_2343: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2348: stloc.s V_10 - IL_234a: br.s IL_2392 - - IL_234c: ldloc.s V_9 - IL_234e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2353: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2358: stloc.s V_8 - IL_235a: ldloc.s V_9 - IL_235c: call string [mscorlib]System.Convert::ToString(int32) - IL_2361: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2366: stloc.s V_6 - IL_2368: ldloc.s V_8 - IL_236a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_236f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2374: stloc.s V_7 - IL_2376: ldloc.s V_10 - IL_2378: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_237d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2382: stloc.s V_8 - IL_2384: ldloc.s V_7 - IL_2386: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_238b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2390: stloc.s V_9 - IL_2392: ldloc.s V_6 - IL_2394: ldloc.s V_9 - IL_2396: bge.s IL_23e0 - - IL_2398: ldloc.s V_8 - IL_239a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_239f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_23a4: stloc.s V_6 - IL_23a6: ldloc.s V_6 - IL_23a8: call string [mscorlib]System.Convert::ToString(int32) - IL_23ad: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_23b2: stloc.s V_9 - IL_23b4: ldloc.s V_10 - IL_23b6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_23bb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_23c0: stloc.s V_6 - IL_23c2: ldloc.s V_9 - IL_23c4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_23c9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_23ce: stloc.s V_10 - IL_23d0: ldloc.s V_7 - IL_23d2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_23d7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_23dc: stloc.s V_10 - IL_23de: br.s IL_2426 - - IL_23e0: ldloc.s V_10 - IL_23e2: call string [mscorlib]System.Convert::ToString(int32) - IL_23e7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_23ec: stloc.s V_6 - IL_23ee: ldloc.s V_8 - IL_23f0: call string [mscorlib]System.Convert::ToString(int32) - IL_23f5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_23fa: stloc.s V_8 - IL_23fc: ldloc.s V_10 - IL_23fe: call string [mscorlib]System.Convert::ToString(int32) - IL_2403: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2408: stloc.s V_9 - IL_240a: ldloc.s V_10 - IL_240c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2411: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2416: stloc.s V_8 - IL_2418: ldloc.s V_10 - IL_241a: call string [mscorlib]System.Convert::ToString(int32) - IL_241f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2424: stloc.s V_9 - IL_2426: ldloc.s V_10 - IL_2428: ldloc.s V_7 - IL_242a: beq.s IL_2474 - - IL_242c: ldloc.s V_7 - IL_242e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2433: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2438: stloc.s V_9 - IL_243a: ldloc.s V_8 - IL_243c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2441: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2446: stloc.s V_8 - IL_2448: ldloc.s V_7 - IL_244a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_244f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2454: stloc.s V_9 - IL_2456: ldloc.s V_8 - IL_2458: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_245d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2462: stloc.s V_9 - IL_2464: ldloc.s V_6 - IL_2466: call string [mscorlib]System.Convert::ToString(int32) - IL_246b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2470: stloc.s V_9 - IL_2472: br.s IL_24ba - - IL_2474: ldloc.s V_8 - IL_2476: call string [mscorlib]System.Convert::ToString(int32) - IL_247b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2480: stloc.s V_8 - IL_2482: ldloc.s V_7 - IL_2484: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2489: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_248e: stloc.s V_7 - IL_2490: ldloc.s V_8 - IL_2492: call string [mscorlib]System.Convert::ToString(int32) - IL_2497: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_249c: stloc.s V_6 - IL_249e: ldloc.s V_9 - IL_24a0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_24a5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_24aa: stloc.s V_8 - IL_24ac: ldloc.s V_8 - IL_24ae: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_24b3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_24b8: stloc.s V_6 - IL_24ba: ldloc.s V_10 - IL_24bc: ldloc.s V_8 - IL_24be: ble.s IL_2508 - - IL_24c0: ldloc.s V_6 - IL_24c2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_24c7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_24cc: stloc.s V_8 - IL_24ce: ldloc.s V_9 - IL_24d0: call string [mscorlib]System.Convert::ToString(int32) - IL_24d5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_24da: stloc.s V_10 - IL_24dc: ldloc.s V_9 - IL_24de: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_24e3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_24e8: stloc.s V_8 - IL_24ea: ldloc.s V_7 - IL_24ec: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_24f1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_24f6: stloc.s V_6 - IL_24f8: ldloc.s V_7 - IL_24fa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_24ff: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2504: stloc.s V_8 - IL_2506: br.s IL_254e - - IL_2508: ldloc.s V_6 - IL_250a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_250f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2514: stloc.s V_10 - IL_2516: ldloc.s V_10 - IL_2518: call string [mscorlib]System.Convert::ToString(int32) - IL_251d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2522: stloc.s V_8 - IL_2524: ldloc.s V_7 - IL_2526: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_252b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2530: stloc.s V_10 - IL_2532: ldloc.s V_10 - IL_2534: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2539: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_253e: stloc.s V_9 - IL_2540: ldloc.s V_9 - IL_2542: call string [mscorlib]System.Convert::ToString(int32) - IL_2547: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_254c: stloc.s V_9 - IL_254e: ldloc.s V_9 - IL_2550: ldloc.s V_8 - IL_2552: bne.un.s IL_259c - - IL_2554: ldloc.s V_8 - IL_2556: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_255b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2560: stloc.s V_10 - IL_2562: ldloc.s V_10 - IL_2564: call string [mscorlib]System.Convert::ToString(int32) - IL_2569: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_256e: stloc.s V_6 - IL_2570: ldloc.s V_6 - IL_2572: call string [mscorlib]System.Convert::ToString(int32) - IL_2577: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_257c: stloc.s V_9 - IL_257e: ldloc.s V_9 - IL_2580: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2585: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_258a: stloc.s V_9 - IL_258c: ldloc.s V_7 - IL_258e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2593: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2598: stloc.s V_7 - IL_259a: br.s IL_25e2 - - IL_259c: ldloc.s V_7 - IL_259e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_25a3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_25a8: stloc.s V_7 - IL_25aa: ldloc.s V_7 - IL_25ac: call string [mscorlib]System.Convert::ToString(int32) - IL_25b1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_25b6: stloc.s V_8 - IL_25b8: ldloc.s V_9 - IL_25ba: call string [mscorlib]System.Convert::ToString(int32) - IL_25bf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_25c4: stloc.s V_8 - IL_25c6: ldloc.s V_9 - IL_25c8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_25cd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_25d2: stloc.s V_10 - IL_25d4: ldloc.s V_7 - IL_25d6: call string [mscorlib]System.Convert::ToString(int32) - IL_25db: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_25e0: stloc.s V_10 - IL_25e2: ldloc.s V_7 - IL_25e4: ldloc.s V_6 - IL_25e6: ble.s IL_2630 - - IL_25e8: ldloc.s V_8 - IL_25ea: call string [mscorlib]System.Convert::ToString(int32) - IL_25ef: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_25f4: stloc.s V_10 - IL_25f6: ldloc.s V_8 - IL_25f8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_25fd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2602: stloc.s V_10 - IL_2604: ldloc.s V_6 - IL_2606: call string [mscorlib]System.Convert::ToString(int32) - IL_260b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2610: stloc.s V_6 - IL_2612: ldloc.s V_8 - IL_2614: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2619: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_261e: stloc.s V_10 - IL_2620: ldloc.s V_10 - IL_2622: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2627: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_262c: stloc.s V_8 - IL_262e: br.s IL_2676 - - IL_2630: ldloc.s V_7 - IL_2632: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2637: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_263c: stloc.s V_9 - IL_263e: ldloc.s V_6 - IL_2640: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2645: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_264a: stloc.s V_7 - IL_264c: ldloc.s V_9 - IL_264e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2653: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2658: stloc.s V_6 - IL_265a: ldloc.s V_8 - IL_265c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2661: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2666: stloc.s V_9 - IL_2668: ldloc.s V_10 - IL_266a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_266f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2674: stloc.s V_6 - IL_2676: ldloc.s V_8 - IL_2678: ldloc.s V_9 - IL_267a: beq.s IL_26c4 - - IL_267c: ldloc.s V_8 - IL_267e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2683: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2688: stloc.s V_8 - IL_268a: ldloc.s V_8 - IL_268c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2691: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2696: stloc.s V_9 - IL_2698: ldloc.s V_10 - IL_269a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_269f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_26a4: stloc.s V_9 - IL_26a6: ldloc.s V_7 - IL_26a8: call string [mscorlib]System.Convert::ToString(int32) - IL_26ad: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_26b2: stloc.s V_7 - IL_26b4: ldloc.s V_9 - IL_26b6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_26bb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_26c0: stloc.s V_7 - IL_26c2: br.s IL_270a - - IL_26c4: ldloc.s V_7 - IL_26c6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_26cb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_26d0: stloc.s V_10 - IL_26d2: ldloc.s V_6 - IL_26d4: call string [mscorlib]System.Convert::ToString(int32) - IL_26d9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_26de: stloc.s V_10 - IL_26e0: ldloc.s V_6 - IL_26e2: call string [mscorlib]System.Convert::ToString(int32) - IL_26e7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_26ec: stloc.s V_6 - IL_26ee: ldloc.s V_8 - IL_26f0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_26f5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_26fa: stloc.s V_10 - IL_26fc: ldloc.s V_9 - IL_26fe: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2703: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2708: stloc.s V_6 - IL_270a: ldloc.s V_6 - IL_270c: ldloc.s V_9 - IL_270e: ble.s IL_2758 - - IL_2710: ldloc.s V_6 - IL_2712: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2717: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_271c: stloc.s V_9 - IL_271e: ldloc.s V_10 - IL_2720: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2725: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_272a: stloc.s V_7 - IL_272c: ldloc.s V_10 - IL_272e: call string [mscorlib]System.Convert::ToString(int32) - IL_2733: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2738: stloc.s V_10 - IL_273a: ldloc.s V_9 - IL_273c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2741: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2746: stloc.s V_6 - IL_2748: ldloc.s V_10 - IL_274a: call string [mscorlib]System.Convert::ToString(int32) - IL_274f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2754: stloc.s V_7 - IL_2756: br.s IL_279e - - IL_2758: ldloc.s V_10 - IL_275a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_275f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2764: stloc.s V_9 - IL_2766: ldloc.s V_10 - IL_2768: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_276d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2772: stloc.s V_9 - IL_2774: ldloc.s V_9 - IL_2776: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_277b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2780: stloc.s V_9 - IL_2782: ldloc.s V_8 - IL_2784: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2789: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_278e: stloc.s V_7 - IL_2790: ldloc.s V_8 - IL_2792: call string [mscorlib]System.Convert::ToString(int32) - IL_2797: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_279c: stloc.s V_10 - IL_279e: ldloc.s V_6 - IL_27a0: ldloc.s V_9 - IL_27a2: bge.s IL_27ec - - IL_27a4: ldloc.s V_6 - IL_27a6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_27ab: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_27b0: stloc.s V_9 - IL_27b2: ldloc.s V_6 - IL_27b4: call string [mscorlib]System.Convert::ToString(int32) - IL_27b9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_27be: stloc.s V_9 - IL_27c0: ldloc.s V_10 - IL_27c2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_27c7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_27cc: stloc.s V_7 - IL_27ce: ldloc.s V_9 - IL_27d0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_27d5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_27da: stloc.s V_6 - IL_27dc: ldloc.s V_8 - IL_27de: call string [mscorlib]System.Convert::ToString(int32) - IL_27e3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_27e8: stloc.s V_8 - IL_27ea: br.s IL_2832 - - IL_27ec: ldloc.s V_9 - IL_27ee: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_27f3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_27f8: stloc.s V_9 - IL_27fa: ldloc.s V_6 - IL_27fc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2801: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2806: stloc.s V_9 - IL_2808: ldloc.s V_9 - IL_280a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_280f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2814: stloc.s V_10 - IL_2816: ldloc.s V_6 - IL_2818: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_281d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2822: stloc.s V_7 - IL_2824: ldloc.s V_7 - IL_2826: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_282b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2830: stloc.s V_8 - IL_2832: ldloc.s V_10 - IL_2834: ldloc.s V_9 - IL_2836: bgt.s IL_2880 - - IL_2838: ldloc.s V_6 - IL_283a: call string [mscorlib]System.Convert::ToString(int32) - IL_283f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2844: stloc.s V_6 - IL_2846: ldloc.s V_8 - IL_2848: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_284d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2852: stloc.s V_10 - IL_2854: ldloc.s V_10 - IL_2856: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_285b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2860: stloc.s V_9 - IL_2862: ldloc.s V_8 - IL_2864: call string [mscorlib]System.Convert::ToString(int32) - IL_2869: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_286e: stloc.s V_10 - IL_2870: ldloc.s V_7 - IL_2872: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2877: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_287c: stloc.s V_6 - IL_287e: br.s IL_28c6 - - IL_2880: ldloc.s V_6 - IL_2882: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2887: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_288c: stloc.s V_10 - IL_288e: ldloc.s V_10 - IL_2890: call string [mscorlib]System.Convert::ToString(int32) - IL_2895: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_289a: stloc.s V_9 - IL_289c: ldloc.s V_8 - IL_289e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_28a3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_28a8: stloc.s V_8 - IL_28aa: ldloc.s V_8 - IL_28ac: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_28b1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_28b6: stloc.s V_8 - IL_28b8: ldloc.s V_6 - IL_28ba: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_28bf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_28c4: stloc.s V_10 - IL_28c6: ldloc.s V_8 - IL_28c8: ldloc.s V_6 - IL_28ca: bne.un.s IL_2914 - - IL_28cc: ldloc.s V_10 - IL_28ce: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_28d3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_28d8: stloc.s V_10 - IL_28da: ldloc.s V_7 - IL_28dc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_28e1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_28e6: stloc.s V_8 - IL_28e8: ldloc.s V_10 - IL_28ea: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_28ef: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_28f4: stloc.s V_6 - IL_28f6: ldloc.s V_8 - IL_28f8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_28fd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2902: stloc.s V_6 - IL_2904: ldloc.s V_7 - IL_2906: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_290b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2910: stloc.s V_6 - IL_2912: br.s IL_295a - - IL_2914: ldloc.s V_9 - IL_2916: call string [mscorlib]System.Convert::ToString(int32) - IL_291b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2920: stloc.s V_10 - IL_2922: ldloc.s V_7 - IL_2924: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2929: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_292e: stloc.s V_6 - IL_2930: ldloc.s V_9 - IL_2932: call string [mscorlib]System.Convert::ToString(int32) - IL_2937: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_293c: stloc.s V_10 - IL_293e: ldloc.s V_9 - IL_2940: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2945: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_294a: stloc.s V_9 - IL_294c: ldloc.s V_9 - IL_294e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2953: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2958: stloc.s V_6 - IL_295a: ldloc.s V_6 - IL_295c: ldloc.s V_6 - IL_295e: beq.s IL_29a8 - - IL_2960: ldloc.s V_8 - IL_2962: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2967: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_296c: stloc.s V_8 - IL_296e: ldloc.s V_8 - IL_2970: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2975: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_297a: stloc.s V_7 - IL_297c: ldloc.s V_8 - IL_297e: call string [mscorlib]System.Convert::ToString(int32) - IL_2983: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2988: stloc.s V_10 - IL_298a: ldloc.s V_10 - IL_298c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2991: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2996: stloc.s V_10 - IL_2998: ldloc.s V_7 - IL_299a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_299f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_29a4: stloc.s V_10 - IL_29a6: br.s IL_29ee - - IL_29a8: ldloc.s V_6 - IL_29aa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_29af: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_29b4: stloc.s V_7 - IL_29b6: ldloc.s V_9 - IL_29b8: call string [mscorlib]System.Convert::ToString(int32) - IL_29bd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_29c2: stloc.s V_7 - IL_29c4: ldloc.s V_10 - IL_29c6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_29cb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_29d0: stloc.s V_9 - IL_29d2: ldloc.s V_8 - IL_29d4: call string [mscorlib]System.Convert::ToString(int32) - IL_29d9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_29de: stloc.s V_7 - IL_29e0: ldloc.s V_7 - IL_29e2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_29e7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_29ec: stloc.s V_9 - IL_29ee: ldloc.s V_7 - IL_29f0: ldloc.s V_10 - IL_29f2: bge.s IL_2a3c - - IL_29f4: ldloc.s V_10 - IL_29f6: call string [mscorlib]System.Convert::ToString(int32) - IL_29fb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2a00: stloc.s V_7 - IL_2a02: ldloc.s V_6 - IL_2a04: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2a09: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2a0e: stloc.s V_10 - IL_2a10: ldloc.s V_7 - IL_2a12: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2a17: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2a1c: stloc.s V_7 - IL_2a1e: ldloc.s V_6 - IL_2a20: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2a25: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2a2a: stloc.s V_10 - IL_2a2c: ldloc.s V_10 - IL_2a2e: call string [mscorlib]System.Convert::ToString(int32) - IL_2a33: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2a38: stloc.s V_9 - IL_2a3a: br.s IL_2a82 - - IL_2a3c: ldloc.s V_9 - IL_2a3e: call string [mscorlib]System.Convert::ToString(int32) - IL_2a43: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2a48: stloc.s V_8 - IL_2a4a: ldloc.s V_7 - IL_2a4c: call string [mscorlib]System.Convert::ToString(int32) - IL_2a51: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2a56: stloc.s V_8 - IL_2a58: ldloc.s V_7 - IL_2a5a: call string [mscorlib]System.Convert::ToString(int32) - IL_2a5f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2a64: stloc.s V_8 - IL_2a66: ldloc.s V_9 - IL_2a68: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2a6d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2a72: stloc.s V_9 - IL_2a74: ldloc.s V_8 - IL_2a76: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2a7b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2a80: stloc.s V_6 - IL_2a82: ldloc.s V_9 - IL_2a84: ldloc.s V_6 - IL_2a86: bge.s IL_2ad0 - - IL_2a88: ldloc.s V_9 - IL_2a8a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2a8f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2a94: stloc.s V_6 - IL_2a96: ldloc.s V_9 - IL_2a98: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2a9d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2aa2: stloc.s V_7 - IL_2aa4: ldloc.s V_8 - IL_2aa6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2aab: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2ab0: stloc.s V_6 - IL_2ab2: ldloc.s V_6 - IL_2ab4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2ab9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2abe: stloc.s V_7 - IL_2ac0: ldloc.s V_6 - IL_2ac2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2ac7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2acc: stloc.s V_9 - IL_2ace: br.s IL_2b16 - - IL_2ad0: ldloc.s V_7 - IL_2ad2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2ad7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2adc: stloc.s V_8 - IL_2ade: ldloc.s V_9 - IL_2ae0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2ae5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2aea: stloc.s V_8 - IL_2aec: ldloc.s V_10 - IL_2aee: call string [mscorlib]System.Convert::ToString(int32) - IL_2af3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2af8: stloc.s V_8 - IL_2afa: ldloc.s V_7 - IL_2afc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2b01: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2b06: stloc.s V_9 - IL_2b08: ldloc.s V_10 - IL_2b0a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2b0f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2b14: stloc.s V_7 - IL_2b16: ldloc.s V_9 - IL_2b18: ldloc.s V_7 - IL_2b1a: bne.un.s IL_2b64 - - IL_2b1c: ldloc.s V_10 - IL_2b1e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2b23: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2b28: stloc.s V_6 - IL_2b2a: ldloc.s V_7 - IL_2b2c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2b31: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2b36: stloc.s V_6 - IL_2b38: ldloc.s V_8 - IL_2b3a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2b3f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2b44: stloc.s V_6 - IL_2b46: ldloc.s V_9 - IL_2b48: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2b4d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2b52: stloc.s V_10 - IL_2b54: ldloc.s V_9 - IL_2b56: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2b5b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2b60: stloc.s V_7 - IL_2b62: br.s IL_2baa - - IL_2b64: ldloc.s V_6 - IL_2b66: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2b6b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2b70: stloc.s V_9 - IL_2b72: ldloc.s V_9 - IL_2b74: call string [mscorlib]System.Convert::ToString(int32) - IL_2b79: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2b7e: stloc.s V_6 - IL_2b80: ldloc.s V_6 - IL_2b82: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2b87: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2b8c: stloc.s V_7 - IL_2b8e: ldloc.s V_7 - IL_2b90: call string [mscorlib]System.Convert::ToString(int32) - IL_2b95: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2b9a: stloc.s V_10 - IL_2b9c: ldloc.s V_9 - IL_2b9e: call string [mscorlib]System.Convert::ToString(int32) - IL_2ba3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2ba8: stloc.s V_7 - IL_2baa: ldloc.s V_8 - IL_2bac: ldloc.s V_7 - IL_2bae: blt.s IL_2bf8 - - IL_2bb0: ldloc.s V_9 - IL_2bb2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2bb7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2bbc: stloc.s V_9 - IL_2bbe: ldloc.s V_6 - IL_2bc0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2bc5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2bca: stloc.s V_6 - IL_2bcc: ldloc.s V_7 - IL_2bce: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2bd3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2bd8: stloc.s V_6 - IL_2bda: ldloc.s V_8 - IL_2bdc: call string [mscorlib]System.Convert::ToString(int32) - IL_2be1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2be6: stloc.s V_7 - IL_2be8: ldloc.s V_7 - IL_2bea: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2bef: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2bf4: stloc.s V_6 - IL_2bf6: br.s IL_2c3e - - IL_2bf8: ldloc.s V_10 - IL_2bfa: call string [mscorlib]System.Convert::ToString(int32) - IL_2bff: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2c04: stloc.s V_9 - IL_2c06: ldloc.s V_10 - IL_2c08: call string [mscorlib]System.Convert::ToString(int32) - IL_2c0d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2c12: stloc.s V_10 - IL_2c14: ldloc.s V_7 - IL_2c16: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2c1b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2c20: stloc.s V_8 - IL_2c22: ldloc.s V_7 - IL_2c24: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2c29: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2c2e: stloc.s V_10 - IL_2c30: ldloc.s V_10 - IL_2c32: call string [mscorlib]System.Convert::ToString(int32) - IL_2c37: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2c3c: stloc.s V_10 - IL_2c3e: ldloc.s V_8 - IL_2c40: ldloc.s V_8 - IL_2c42: beq.s IL_2c8c - - IL_2c44: ldloc.s V_8 - IL_2c46: call string [mscorlib]System.Convert::ToString(int32) - IL_2c4b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2c50: stloc.s V_8 - IL_2c52: ldloc.s V_6 - IL_2c54: call string [mscorlib]System.Convert::ToString(int32) - IL_2c59: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2c5e: stloc.s V_10 - IL_2c60: ldloc.s V_7 - IL_2c62: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2c67: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2c6c: stloc.s V_10 - IL_2c6e: ldloc.s V_10 - IL_2c70: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2c75: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2c7a: stloc.s V_8 - IL_2c7c: ldloc.s V_6 - IL_2c7e: call string [mscorlib]System.Convert::ToString(int32) - IL_2c83: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2c88: stloc.s V_8 - IL_2c8a: br.s IL_2cd2 - - IL_2c8c: ldloc.s V_10 - IL_2c8e: call string [mscorlib]System.Convert::ToString(int32) - IL_2c93: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2c98: stloc.s V_6 - IL_2c9a: ldloc.s V_10 - IL_2c9c: call string [mscorlib]System.Convert::ToString(int32) - IL_2ca1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2ca6: stloc.s V_10 - IL_2ca8: ldloc.s V_8 - IL_2caa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2caf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2cb4: stloc.s V_7 - IL_2cb6: ldloc.s V_6 - IL_2cb8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2cbd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2cc2: stloc.s V_8 - IL_2cc4: ldloc.s V_9 - IL_2cc6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2ccb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2cd0: stloc.s V_9 - IL_2cd2: ldloc.s V_7 - IL_2cd4: ldloc.s V_6 - IL_2cd6: blt.s IL_2d20 - - IL_2cd8: ldloc.s V_10 - IL_2cda: call string [mscorlib]System.Convert::ToString(int32) - IL_2cdf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2ce4: stloc.s V_10 - IL_2ce6: ldloc.s V_6 - IL_2ce8: call string [mscorlib]System.Convert::ToString(int32) - IL_2ced: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2cf2: stloc.s V_10 - IL_2cf4: ldloc.s V_8 - IL_2cf6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2cfb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2d00: stloc.s V_10 - IL_2d02: ldloc.s V_10 - IL_2d04: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2d09: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2d0e: stloc.s V_9 - IL_2d10: ldloc.s V_9 - IL_2d12: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2d17: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2d1c: stloc.s V_7 - IL_2d1e: br.s IL_2d66 - - IL_2d20: ldloc.s V_6 - IL_2d22: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2d27: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2d2c: stloc.s V_7 - IL_2d2e: ldloc.s V_10 - IL_2d30: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2d35: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2d3a: stloc.s V_10 - IL_2d3c: ldloc.s V_8 - IL_2d3e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2d43: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2d48: stloc.s V_9 - IL_2d4a: ldloc.s V_7 - IL_2d4c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2d51: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2d56: stloc.s V_10 - IL_2d58: ldloc.s V_10 - IL_2d5a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2d5f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2d64: stloc.s V_10 - IL_2d66: ldloc.s V_10 - IL_2d68: ldloc.s V_9 - IL_2d6a: blt.s IL_2db4 - - IL_2d6c: ldloc.s V_10 - IL_2d6e: call string [mscorlib]System.Convert::ToString(int32) - IL_2d73: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2d78: stloc.s V_9 - IL_2d7a: ldloc.s V_6 - IL_2d7c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2d81: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2d86: stloc.s V_7 - IL_2d88: ldloc.s V_8 - IL_2d8a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2d8f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2d94: stloc.s V_9 - IL_2d96: ldloc.s V_10 - IL_2d98: call string [mscorlib]System.Convert::ToString(int32) - IL_2d9d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2da2: stloc.s V_7 - IL_2da4: ldloc.s V_10 - IL_2da6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2dab: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2db0: stloc.s V_9 - IL_2db2: br.s IL_2dfa - - IL_2db4: ldloc.s V_6 - IL_2db6: call string [mscorlib]System.Convert::ToString(int32) - IL_2dbb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2dc0: stloc.s V_8 - IL_2dc2: ldloc.s V_8 - IL_2dc4: call string [mscorlib]System.Convert::ToString(int32) - IL_2dc9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2dce: stloc.s V_9 - IL_2dd0: ldloc.s V_9 - IL_2dd2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2dd7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2ddc: stloc.s V_7 - IL_2dde: ldloc.s V_6 - IL_2de0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2de5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2dea: stloc.s V_8 - IL_2dec: ldloc.s V_10 - IL_2dee: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2df3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2df8: stloc.s V_9 - IL_2dfa: ldloc.s V_7 - IL_2dfc: ldloc.s V_6 - IL_2dfe: bgt.s IL_2e48 - - IL_2e00: ldloc.s V_8 - IL_2e02: call string [mscorlib]System.Convert::ToString(int32) - IL_2e07: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2e0c: stloc.s V_7 - IL_2e0e: ldloc.s V_9 - IL_2e10: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2e15: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2e1a: stloc.s V_9 - IL_2e1c: ldloc.s V_10 - IL_2e1e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2e23: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2e28: stloc.s V_10 - IL_2e2a: ldloc.s V_8 - IL_2e2c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2e31: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2e36: stloc.s V_8 - IL_2e38: ldloc.s V_8 - IL_2e3a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2e3f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2e44: stloc.s V_8 - IL_2e46: br.s IL_2e8e - - IL_2e48: ldloc.s V_8 - IL_2e4a: call string [mscorlib]System.Convert::ToString(int32) - IL_2e4f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2e54: stloc.s V_7 - IL_2e56: ldloc.s V_8 - IL_2e58: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2e5d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2e62: stloc.s V_9 - IL_2e64: ldloc.s V_8 - IL_2e66: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2e6b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2e70: stloc.s V_7 - IL_2e72: ldloc.s V_7 - IL_2e74: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2e79: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2e7e: stloc.s V_7 - IL_2e80: ldloc.s V_6 - IL_2e82: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2e87: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2e8c: stloc.s V_10 - IL_2e8e: ldloc.s V_9 - IL_2e90: ldloc.s V_8 - IL_2e92: bgt.s IL_2edc - - IL_2e94: ldloc.s V_8 - IL_2e96: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2e9b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2ea0: stloc.s V_10 - IL_2ea2: ldloc.s V_8 - IL_2ea4: call string [mscorlib]System.Convert::ToString(int32) - IL_2ea9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2eae: stloc.s V_7 - IL_2eb0: ldloc.s V_7 - IL_2eb2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2eb7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2ebc: stloc.s V_7 - IL_2ebe: ldloc.s V_10 - IL_2ec0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2ec5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2eca: stloc.s V_8 - IL_2ecc: ldloc.s V_9 - IL_2ece: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2ed3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2ed8: stloc.s V_6 - IL_2eda: br.s IL_2f22 - - IL_2edc: ldloc.s V_7 - IL_2ede: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2ee3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2ee8: stloc.s V_9 - IL_2eea: ldloc.s V_8 - IL_2eec: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2ef1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2ef6: stloc.s V_7 - IL_2ef8: ldloc.s V_6 - IL_2efa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2eff: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2f04: stloc.s V_9 - IL_2f06: ldloc.s V_6 - IL_2f08: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2f0d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2f12: stloc.s V_6 - IL_2f14: ldloc.s V_6 - IL_2f16: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2f1b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2f20: stloc.s V_8 - IL_2f22: ldloc.s V_10 - IL_2f24: ldloc.s V_8 - IL_2f26: bne.un.s IL_2f70 - - IL_2f28: ldloc.s V_9 - IL_2f2a: call string [mscorlib]System.Convert::ToString(int32) - IL_2f2f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2f34: stloc.s V_6 - IL_2f36: ldloc.s V_10 - IL_2f38: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2f3d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2f42: stloc.s V_6 - IL_2f44: ldloc.s V_6 - IL_2f46: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2f4b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2f50: stloc.s V_10 - IL_2f52: ldloc.s V_9 - IL_2f54: call string [mscorlib]System.Convert::ToString(int32) - IL_2f59: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2f5e: stloc.s V_6 - IL_2f60: ldloc.s V_10 - IL_2f62: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2f67: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2f6c: stloc.s V_8 - IL_2f6e: br.s IL_2fb6 - - IL_2f70: ldloc.s V_8 - IL_2f72: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2f77: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2f7c: stloc.s V_8 - IL_2f7e: ldloc.s V_10 - IL_2f80: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2f85: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2f8a: stloc.s V_10 - IL_2f8c: ldloc.s V_8 - IL_2f8e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2f93: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2f98: stloc.s V_10 - IL_2f9a: ldloc.s V_6 - IL_2f9c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2fa1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2fa6: stloc.s V_7 - IL_2fa8: ldloc.s V_9 - IL_2faa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_2faf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_2fb4: stloc.s V_8 - IL_2fb6: ldloc.s V_10 - IL_2fb8: ldloc.s V_10 - IL_2fba: ble.s IL_3004 - - IL_2fbc: ldloc.s V_6 - IL_2fbe: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_2fc3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_2fc8: stloc.s V_7 - IL_2fca: ldloc.s V_8 - IL_2fcc: call string [mscorlib]System.Convert::ToString(int32) - IL_2fd1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2fd6: stloc.s V_6 - IL_2fd8: ldloc.s V_8 - IL_2fda: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_2fdf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_2fe4: stloc.s V_8 - IL_2fe6: ldloc.s V_7 - IL_2fe8: call string [mscorlib]System.Convert::ToString(int32) - IL_2fed: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_2ff2: stloc.s V_8 - IL_2ff4: ldloc.s V_7 - IL_2ff6: call string [mscorlib]System.Convert::ToString(int32) - IL_2ffb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3000: stloc.s V_8 - IL_3002: br.s IL_304a - - IL_3004: ldloc.s V_10 - IL_3006: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_300b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3010: stloc.s V_6 - IL_3012: ldloc.s V_9 - IL_3014: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3019: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_301e: stloc.s V_9 - IL_3020: ldloc.s V_9 - IL_3022: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3027: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_302c: stloc.s V_9 - IL_302e: ldloc.s V_9 - IL_3030: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3035: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_303a: stloc.s V_6 - IL_303c: ldloc.s V_8 - IL_303e: call string [mscorlib]System.Convert::ToString(int32) - IL_3043: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3048: stloc.s V_9 - IL_304a: ldloc.s V_10 - IL_304c: ldloc.s V_10 - IL_304e: bge.s IL_3098 - - IL_3050: ldloc.s V_6 - IL_3052: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3057: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_305c: stloc.s V_9 - IL_305e: ldloc.s V_7 - IL_3060: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3065: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_306a: stloc.s V_10 - IL_306c: ldloc.s V_9 - IL_306e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3073: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3078: stloc.s V_6 - IL_307a: ldloc.s V_8 - IL_307c: call string [mscorlib]System.Convert::ToString(int32) - IL_3081: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3086: stloc.s V_8 - IL_3088: ldloc.s V_9 - IL_308a: call string [mscorlib]System.Convert::ToString(int32) - IL_308f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3094: stloc.s V_7 - IL_3096: br.s IL_30de - - IL_3098: ldloc.s V_10 - IL_309a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_309f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_30a4: stloc.s V_10 - IL_30a6: ldloc.s V_10 - IL_30a8: call string [mscorlib]System.Convert::ToString(int32) - IL_30ad: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_30b2: stloc.s V_9 - IL_30b4: ldloc.s V_6 - IL_30b6: call string [mscorlib]System.Convert::ToString(int32) - IL_30bb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_30c0: stloc.s V_6 - IL_30c2: ldloc.s V_10 - IL_30c4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_30c9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_30ce: stloc.s V_8 - IL_30d0: ldloc.s V_10 - IL_30d2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_30d7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_30dc: stloc.s V_10 - IL_30de: ldloc.s V_6 - IL_30e0: ldloc.s V_8 - IL_30e2: beq.s IL_312c - - IL_30e4: ldloc.s V_8 - IL_30e6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_30eb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_30f0: stloc.s V_7 - IL_30f2: ldloc.s V_8 - IL_30f4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_30f9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_30fe: stloc.s V_7 - IL_3100: ldloc.s V_8 - IL_3102: call string [mscorlib]System.Convert::ToString(int32) - IL_3107: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_310c: stloc.s V_8 - IL_310e: ldloc.s V_8 - IL_3110: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3115: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_311a: stloc.s V_6 - IL_311c: ldloc.s V_6 - IL_311e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3123: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3128: stloc.s V_6 - IL_312a: br.s IL_3172 - - IL_312c: ldloc.s V_7 - IL_312e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3133: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3138: stloc.s V_10 - IL_313a: ldloc.s V_8 - IL_313c: call string [mscorlib]System.Convert::ToString(int32) - IL_3141: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3146: stloc.s V_9 - IL_3148: ldloc.s V_8 - IL_314a: call string [mscorlib]System.Convert::ToString(int32) - IL_314f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3154: stloc.s V_10 - IL_3156: ldloc.s V_9 - IL_3158: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_315d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3162: stloc.s V_10 - IL_3164: ldloc.s V_8 - IL_3166: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_316b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3170: stloc.s V_8 - IL_3172: ldloc.s V_8 - IL_3174: ldloc.s V_8 - IL_3176: beq.s IL_31c0 - - IL_3178: ldloc.s V_10 - IL_317a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_317f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3184: stloc.s V_6 - IL_3186: ldloc.s V_6 - IL_3188: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_318d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3192: stloc.s V_6 - IL_3194: ldloc.s V_10 - IL_3196: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_319b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_31a0: stloc.s V_7 - IL_31a2: ldloc.s V_7 - IL_31a4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_31a9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_31ae: stloc.s V_7 - IL_31b0: ldloc.s V_10 - IL_31b2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_31b7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_31bc: stloc.s V_8 - IL_31be: br.s IL_3206 - - IL_31c0: ldloc.s V_10 - IL_31c2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_31c7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_31cc: stloc.s V_10 - IL_31ce: ldloc.s V_8 - IL_31d0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_31d5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_31da: stloc.s V_9 - IL_31dc: ldloc.s V_7 - IL_31de: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_31e3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_31e8: stloc.s V_6 - IL_31ea: ldloc.s V_10 - IL_31ec: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_31f1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_31f6: stloc.s V_6 - IL_31f8: ldloc.s V_7 - IL_31fa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_31ff: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3204: stloc.s V_10 - IL_3206: ldloc.s V_6 - IL_3208: ldloc.s V_9 - IL_320a: ble.s IL_3254 - - IL_320c: ldloc.s V_6 - IL_320e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3213: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3218: stloc.s V_6 - IL_321a: ldloc.s V_8 - IL_321c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3221: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3226: stloc.s V_6 - IL_3228: ldloc.s V_8 - IL_322a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_322f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3234: stloc.s V_6 - IL_3236: ldloc.s V_8 - IL_3238: call string [mscorlib]System.Convert::ToString(int32) - IL_323d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3242: stloc.s V_8 - IL_3244: ldloc.s V_10 - IL_3246: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_324b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3250: stloc.s V_6 - IL_3252: br.s IL_329a - - IL_3254: ldloc.s V_8 - IL_3256: call string [mscorlib]System.Convert::ToString(int32) - IL_325b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3260: stloc.s V_9 - IL_3262: ldloc.s V_7 - IL_3264: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3269: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_326e: stloc.s V_9 - IL_3270: ldloc.s V_8 - IL_3272: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3277: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_327c: stloc.s V_10 - IL_327e: ldloc.s V_6 - IL_3280: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3285: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_328a: stloc.s V_9 - IL_328c: ldloc.s V_6 - IL_328e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3293: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3298: stloc.s V_6 - IL_329a: ldloc.s V_7 - IL_329c: ldloc.s V_6 - IL_329e: bne.un.s IL_32e8 - - IL_32a0: ldloc.s V_8 - IL_32a2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_32a7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_32ac: stloc.s V_8 - IL_32ae: ldloc.s V_10 - IL_32b0: call string [mscorlib]System.Convert::ToString(int32) - IL_32b5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_32ba: stloc.s V_10 - IL_32bc: ldloc.s V_10 - IL_32be: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_32c3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_32c8: stloc.s V_8 - IL_32ca: ldloc.s V_10 - IL_32cc: call string [mscorlib]System.Convert::ToString(int32) - IL_32d1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_32d6: stloc.s V_6 - IL_32d8: ldloc.s V_10 - IL_32da: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_32df: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_32e4: stloc.s V_10 - IL_32e6: br.s IL_332e - - IL_32e8: ldloc.s V_8 - IL_32ea: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_32ef: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_32f4: stloc.s V_6 - IL_32f6: ldloc.s V_10 - IL_32f8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_32fd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3302: stloc.s V_10 - IL_3304: ldloc.s V_6 - IL_3306: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_330b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3310: stloc.s V_8 - IL_3312: ldloc.s V_9 - IL_3314: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3319: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_331e: stloc.s V_9 - IL_3320: ldloc.s V_10 - IL_3322: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3327: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_332c: stloc.s V_7 - IL_332e: ldloc.s V_10 - IL_3330: ldloc.s V_6 - IL_3332: blt.s IL_337c - - IL_3334: ldloc.s V_6 - IL_3336: call string [mscorlib]System.Convert::ToString(int32) - IL_333b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3340: stloc.s V_7 - IL_3342: ldloc.s V_10 - IL_3344: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3349: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_334e: stloc.s V_7 - IL_3350: ldloc.s V_9 - IL_3352: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3357: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_335c: stloc.s V_8 - IL_335e: ldloc.s V_7 - IL_3360: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3365: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_336a: stloc.s V_8 - IL_336c: ldloc.s V_6 - IL_336e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3373: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3378: stloc.s V_8 - IL_337a: br.s IL_33c2 - - IL_337c: ldloc.s V_6 - IL_337e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3383: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3388: stloc.s V_6 - IL_338a: ldloc.s V_6 - IL_338c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3391: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3396: stloc.s V_8 - IL_3398: ldloc.s V_6 - IL_339a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_339f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_33a4: stloc.s V_6 - IL_33a6: ldloc.s V_7 - IL_33a8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_33ad: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_33b2: stloc.s V_8 - IL_33b4: ldloc.s V_8 - IL_33b6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_33bb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_33c0: stloc.s V_7 - IL_33c2: ldloc.s V_9 - IL_33c4: ldloc.s V_9 - IL_33c6: beq.s IL_3410 - - IL_33c8: ldloc.s V_8 - IL_33ca: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_33cf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_33d4: stloc.s V_9 - IL_33d6: ldloc.s V_8 - IL_33d8: call string [mscorlib]System.Convert::ToString(int32) - IL_33dd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_33e2: stloc.s V_10 - IL_33e4: ldloc.s V_6 - IL_33e6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_33eb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_33f0: stloc.s V_9 - IL_33f2: ldloc.s V_8 - IL_33f4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_33f9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_33fe: stloc.s V_6 - IL_3400: ldloc.s V_9 - IL_3402: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3407: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_340c: stloc.s V_9 - IL_340e: br.s IL_3456 - - IL_3410: ldloc.s V_10 - IL_3412: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3417: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_341c: stloc.s V_8 - IL_341e: ldloc.s V_10 - IL_3420: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3425: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_342a: stloc.s V_9 - IL_342c: ldloc.s V_7 - IL_342e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3433: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3438: stloc.s V_6 - IL_343a: ldloc.s V_8 - IL_343c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3441: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3446: stloc.s V_10 - IL_3448: ldloc.s V_6 - IL_344a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_344f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3454: stloc.s V_9 - IL_3456: ldloc.s V_8 - IL_3458: ldloc.s V_6 - IL_345a: bge.s IL_34a4 - - IL_345c: ldloc.s V_8 - IL_345e: call string [mscorlib]System.Convert::ToString(int32) - IL_3463: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3468: stloc.s V_8 - IL_346a: ldloc.s V_8 - IL_346c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3471: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3476: stloc.s V_9 - IL_3478: ldloc.s V_8 - IL_347a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_347f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3484: stloc.s V_9 - IL_3486: ldloc.s V_6 - IL_3488: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_348d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3492: stloc.s V_10 - IL_3494: ldloc.s V_6 - IL_3496: call string [mscorlib]System.Convert::ToString(int32) - IL_349b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_34a0: stloc.s V_9 - IL_34a2: br.s IL_34ea - - IL_34a4: ldloc.s V_10 - IL_34a6: call string [mscorlib]System.Convert::ToString(int32) - IL_34ab: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_34b0: stloc.s V_8 - IL_34b2: ldloc.s V_10 - IL_34b4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_34b9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_34be: stloc.s V_8 - IL_34c0: ldloc.s V_6 - IL_34c2: call string [mscorlib]System.Convert::ToString(int32) - IL_34c7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_34cc: stloc.s V_10 - IL_34ce: ldloc.s V_9 - IL_34d0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_34d5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_34da: stloc.s V_6 - IL_34dc: ldloc.s V_7 - IL_34de: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_34e3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_34e8: stloc.s V_10 - IL_34ea: ldloc.s V_10 - IL_34ec: ldloc.s V_7 - IL_34ee: ble.s IL_3538 - - IL_34f0: ldloc.s V_8 - IL_34f2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_34f7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_34fc: stloc.s V_7 - IL_34fe: ldloc.s V_6 - IL_3500: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3505: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_350a: stloc.s V_7 - IL_350c: ldloc.s V_6 - IL_350e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3513: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3518: stloc.s V_7 - IL_351a: ldloc.s V_7 - IL_351c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3521: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3526: stloc.s V_8 - IL_3528: ldloc.s V_7 - IL_352a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_352f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3534: stloc.s V_6 - IL_3536: br.s IL_357e - - IL_3538: ldloc.s V_8 - IL_353a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_353f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3544: stloc.s V_7 - IL_3546: ldloc.s V_7 - IL_3548: call string [mscorlib]System.Convert::ToString(int32) - IL_354d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3552: stloc.s V_6 - IL_3554: ldloc.s V_10 - IL_3556: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_355b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3560: stloc.s V_7 - IL_3562: ldloc.s V_6 - IL_3564: call string [mscorlib]System.Convert::ToString(int32) - IL_3569: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_356e: stloc.s V_7 - IL_3570: ldloc.s V_9 - IL_3572: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3577: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_357c: stloc.s V_9 - IL_357e: ldloc.s V_10 - IL_3580: ldloc.s V_6 - IL_3582: bge.s IL_35cc - - IL_3584: ldloc.s V_8 - IL_3586: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_358b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3590: stloc.s V_9 - IL_3592: ldloc.s V_10 - IL_3594: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3599: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_359e: stloc.s V_9 - IL_35a0: ldloc.s V_6 - IL_35a2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_35a7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_35ac: stloc.s V_10 - IL_35ae: ldloc.s V_8 - IL_35b0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_35b5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_35ba: stloc.s V_10 - IL_35bc: ldloc.s V_10 - IL_35be: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_35c3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_35c8: stloc.s V_9 - IL_35ca: br.s IL_3612 - - IL_35cc: ldloc.s V_6 - IL_35ce: call string [mscorlib]System.Convert::ToString(int32) - IL_35d3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_35d8: stloc.s V_8 - IL_35da: ldloc.s V_7 - IL_35dc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_35e1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_35e6: stloc.s V_9 - IL_35e8: ldloc.s V_8 - IL_35ea: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_35ef: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_35f4: stloc.s V_6 - IL_35f6: ldloc.s V_7 - IL_35f8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_35fd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3602: stloc.s V_8 - IL_3604: ldloc.s V_7 - IL_3606: call string [mscorlib]System.Convert::ToString(int32) - IL_360b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3610: stloc.s V_10 - IL_3612: ldloc.s V_6 - IL_3614: ldloc.s V_7 - IL_3616: bge.s IL_3660 - - IL_3618: ldloc.s V_10 - IL_361a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_361f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3624: stloc.s V_7 - IL_3626: ldloc.s V_9 - IL_3628: call string [mscorlib]System.Convert::ToString(int32) - IL_362d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3632: stloc.s V_9 - IL_3634: ldloc.s V_8 - IL_3636: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_363b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3640: stloc.s V_8 - IL_3642: ldloc.s V_7 - IL_3644: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3649: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_364e: stloc.s V_7 - IL_3650: ldloc.s V_9 - IL_3652: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3657: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_365c: stloc.s V_8 - IL_365e: br.s IL_36a6 - - IL_3660: ldloc.s V_6 - IL_3662: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3667: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_366c: stloc.s V_7 - IL_366e: ldloc.s V_6 - IL_3670: call string [mscorlib]System.Convert::ToString(int32) - IL_3675: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_367a: stloc.s V_9 - IL_367c: ldloc.s V_6 - IL_367e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3683: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3688: stloc.s V_10 - IL_368a: ldloc.s V_7 - IL_368c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3691: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3696: stloc.s V_6 - IL_3698: ldloc.s V_8 - IL_369a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_369f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_36a4: stloc.s V_8 - IL_36a6: ldloc.s V_9 - IL_36a8: ldloc.s V_7 - IL_36aa: beq.s IL_36f4 - - IL_36ac: ldloc.s V_8 - IL_36ae: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_36b3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_36b8: stloc.s V_6 - IL_36ba: ldloc.s V_10 - IL_36bc: call string [mscorlib]System.Convert::ToString(int32) - IL_36c1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_36c6: stloc.s V_10 - IL_36c8: ldloc.s V_8 - IL_36ca: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_36cf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_36d4: stloc.s V_7 - IL_36d6: ldloc.s V_9 - IL_36d8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_36dd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_36e2: stloc.s V_9 - IL_36e4: ldloc.s V_8 - IL_36e6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_36eb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_36f0: stloc.s V_6 - IL_36f2: br.s IL_373a - - IL_36f4: ldloc.s V_7 - IL_36f6: call string [mscorlib]System.Convert::ToString(int32) - IL_36fb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3700: stloc.s V_9 - IL_3702: ldloc.s V_9 - IL_3704: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3709: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_370e: stloc.s V_6 - IL_3710: ldloc.s V_9 - IL_3712: call string [mscorlib]System.Convert::ToString(int32) - IL_3717: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_371c: stloc.s V_7 - IL_371e: ldloc.s V_7 - IL_3720: call string [mscorlib]System.Convert::ToString(int32) - IL_3725: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_372a: stloc.s V_9 - IL_372c: ldloc.s V_8 - IL_372e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3733: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3738: stloc.s V_7 - IL_373a: ldloc.s V_7 - IL_373c: ldloc.s V_10 - IL_373e: beq.s IL_3788 - - IL_3740: ldloc.s V_6 - IL_3742: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3747: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_374c: stloc.s V_6 - IL_374e: ldloc.s V_9 - IL_3750: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3755: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_375a: stloc.s V_6 - IL_375c: ldloc.s V_7 - IL_375e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3763: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3768: stloc.s V_6 - IL_376a: ldloc.s V_10 - IL_376c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3771: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3776: stloc.s V_8 - IL_3778: ldloc.s V_7 - IL_377a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_377f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3784: stloc.s V_8 - IL_3786: br.s IL_37ce - - IL_3788: ldloc.s V_7 - IL_378a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_378f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3794: stloc.s V_10 - IL_3796: ldloc.s V_6 - IL_3798: call string [mscorlib]System.Convert::ToString(int32) - IL_379d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_37a2: stloc.s V_7 - IL_37a4: ldloc.s V_10 - IL_37a6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_37ab: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_37b0: stloc.s V_9 - IL_37b2: ldloc.s V_10 - IL_37b4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_37b9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_37be: stloc.s V_10 - IL_37c0: ldloc.s V_7 - IL_37c2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_37c7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_37cc: stloc.s V_9 - IL_37ce: ldloc.s V_10 - IL_37d0: ldloc.s V_8 - IL_37d2: beq.s IL_381c - - IL_37d4: ldloc.s V_8 - IL_37d6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_37db: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_37e0: stloc.s V_10 - IL_37e2: ldloc.s V_7 - IL_37e4: call string [mscorlib]System.Convert::ToString(int32) - IL_37e9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_37ee: stloc.s V_8 - IL_37f0: ldloc.s V_6 - IL_37f2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_37f7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_37fc: stloc.s V_8 - IL_37fe: ldloc.s V_8 - IL_3800: call string [mscorlib]System.Convert::ToString(int32) - IL_3805: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_380a: stloc.s V_7 - IL_380c: ldloc.s V_9 - IL_380e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3813: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3818: stloc.s V_9 - IL_381a: br.s IL_3862 - - IL_381c: ldloc.s V_6 - IL_381e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3823: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3828: stloc.s V_6 - IL_382a: ldloc.s V_9 - IL_382c: call string [mscorlib]System.Convert::ToString(int32) - IL_3831: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3836: stloc.s V_7 - IL_3838: ldloc.s V_8 - IL_383a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_383f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3844: stloc.s V_9 - IL_3846: ldloc.s V_7 - IL_3848: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_384d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3852: stloc.s V_6 - IL_3854: ldloc.s V_7 - IL_3856: call string [mscorlib]System.Convert::ToString(int32) - IL_385b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3860: stloc.s V_9 - IL_3862: ldloc.s V_9 - IL_3864: ldloc.s V_7 - IL_3866: ble.s IL_38b0 - - IL_3868: ldloc.s V_6 - IL_386a: call string [mscorlib]System.Convert::ToString(int32) - IL_386f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3874: stloc.s V_8 - IL_3876: ldloc.s V_7 - IL_3878: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_387d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3882: stloc.s V_9 - IL_3884: ldloc.s V_9 - IL_3886: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_388b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3890: stloc.s V_10 - IL_3892: ldloc.s V_7 - IL_3894: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3899: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_389e: stloc.s V_6 - IL_38a0: ldloc.s V_10 - IL_38a2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_38a7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_38ac: stloc.s V_8 - IL_38ae: br.s IL_38f6 - - IL_38b0: ldloc.s V_9 - IL_38b2: call string [mscorlib]System.Convert::ToString(int32) - IL_38b7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_38bc: stloc.s V_7 - IL_38be: ldloc.s V_7 - IL_38c0: call string [mscorlib]System.Convert::ToString(int32) - IL_38c5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_38ca: stloc.s V_6 - IL_38cc: ldloc.s V_8 - IL_38ce: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_38d3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_38d8: stloc.s V_9 - IL_38da: ldloc.s V_7 - IL_38dc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_38e1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_38e6: stloc.s V_6 - IL_38e8: ldloc.s V_8 - IL_38ea: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_38ef: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_38f4: stloc.s V_10 - IL_38f6: ldloc.s V_7 - IL_38f8: ldloc.s V_6 - IL_38fa: bne.un.s IL_3944 - - IL_38fc: ldloc.s V_9 - IL_38fe: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3903: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3908: stloc.s V_6 - IL_390a: ldloc.s V_10 - IL_390c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3911: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3916: stloc.s V_8 - IL_3918: ldloc.s V_9 - IL_391a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_391f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3924: stloc.s V_9 - IL_3926: ldloc.s V_6 - IL_3928: call string [mscorlib]System.Convert::ToString(int32) - IL_392d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3932: stloc.s V_10 - IL_3934: ldloc.s V_6 - IL_3936: call string [mscorlib]System.Convert::ToString(int32) - IL_393b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3940: stloc.s V_6 - IL_3942: br.s IL_398a - - IL_3944: ldloc.s V_10 - IL_3946: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_394b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3950: stloc.s V_7 - IL_3952: ldloc.s V_10 - IL_3954: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3959: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_395e: stloc.s V_9 - IL_3960: ldloc.s V_7 - IL_3962: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3967: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_396c: stloc.s V_10 - IL_396e: ldloc.s V_7 - IL_3970: call string [mscorlib]System.Convert::ToString(int32) - IL_3975: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_397a: stloc.s V_9 - IL_397c: ldloc.s V_6 - IL_397e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3983: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3988: stloc.s V_6 - IL_398a: ldloc.s V_7 - IL_398c: ldloc.s V_6 - IL_398e: bge.s IL_39d8 - - IL_3990: ldloc.s V_6 - IL_3992: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3997: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_399c: stloc.s V_7 - IL_399e: ldloc.s V_7 - IL_39a0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_39a5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_39aa: stloc.s V_7 - IL_39ac: ldloc.s V_7 - IL_39ae: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_39b3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_39b8: stloc.s V_9 - IL_39ba: ldloc.s V_8 - IL_39bc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_39c1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_39c6: stloc.s V_9 - IL_39c8: ldloc.s V_8 - IL_39ca: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_39cf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_39d4: stloc.s V_7 - IL_39d6: br.s IL_3a1e - - IL_39d8: ldloc.s V_8 - IL_39da: call string [mscorlib]System.Convert::ToString(int32) - IL_39df: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_39e4: stloc.s V_6 - IL_39e6: ldloc.s V_7 - IL_39e8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_39ed: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_39f2: stloc.s V_8 - IL_39f4: ldloc.s V_7 - IL_39f6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_39fb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3a00: stloc.s V_6 - IL_3a02: ldloc.s V_9 - IL_3a04: call string [mscorlib]System.Convert::ToString(int32) - IL_3a09: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3a0e: stloc.s V_7 - IL_3a10: ldloc.s V_7 - IL_3a12: call string [mscorlib]System.Convert::ToString(int32) - IL_3a17: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3a1c: stloc.s V_9 - IL_3a1e: ldloc.s V_9 - IL_3a20: ldloc.s V_7 - IL_3a22: bgt.s IL_3a6c - - IL_3a24: ldloc.s V_7 - IL_3a26: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3a2b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3a30: stloc.s V_6 - IL_3a32: ldloc.s V_8 - IL_3a34: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3a39: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3a3e: stloc.s V_10 - IL_3a40: ldloc.s V_8 - IL_3a42: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3a47: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3a4c: stloc.s V_9 - IL_3a4e: ldloc.s V_10 - IL_3a50: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3a55: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3a5a: stloc.s V_8 - IL_3a5c: ldloc.s V_9 - IL_3a5e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3a63: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3a68: stloc.s V_9 - IL_3a6a: br.s IL_3ab2 - - IL_3a6c: ldloc.s V_8 - IL_3a6e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3a73: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3a78: stloc.s V_9 - IL_3a7a: ldloc.s V_7 - IL_3a7c: call string [mscorlib]System.Convert::ToString(int32) - IL_3a81: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3a86: stloc.s V_9 - IL_3a88: ldloc.s V_6 - IL_3a8a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3a8f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3a94: stloc.s V_9 - IL_3a96: ldloc.s V_6 - IL_3a98: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3a9d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3aa2: stloc.s V_9 - IL_3aa4: ldloc.s V_9 - IL_3aa6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3aab: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3ab0: stloc.s V_8 - IL_3ab2: ldloc.s V_6 - IL_3ab4: ldloc.s V_6 - IL_3ab6: ble.s IL_3b00 - - IL_3ab8: ldloc.s V_10 - IL_3aba: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3abf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3ac4: stloc.s V_7 - IL_3ac6: ldloc.s V_8 - IL_3ac8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3acd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3ad2: stloc.s V_7 - IL_3ad4: ldloc.s V_6 - IL_3ad6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3adb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3ae0: stloc.s V_10 - IL_3ae2: ldloc.s V_9 - IL_3ae4: call string [mscorlib]System.Convert::ToString(int32) - IL_3ae9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3aee: stloc.s V_10 - IL_3af0: ldloc.s V_7 - IL_3af2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3af7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3afc: stloc.s V_7 - IL_3afe: br.s IL_3b46 - - IL_3b00: ldloc.s V_9 - IL_3b02: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3b07: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3b0c: stloc.s V_6 - IL_3b0e: ldloc.s V_6 - IL_3b10: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3b15: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3b1a: stloc.s V_10 - IL_3b1c: ldloc.s V_10 - IL_3b1e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3b23: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3b28: stloc.s V_6 - IL_3b2a: ldloc.s V_6 - IL_3b2c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3b31: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3b36: stloc.s V_7 - IL_3b38: ldloc.s V_10 - IL_3b3a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3b3f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3b44: stloc.s V_7 - IL_3b46: ldloc.s V_8 - IL_3b48: ldloc.s V_7 - IL_3b4a: bne.un.s IL_3b94 - - IL_3b4c: ldloc.s V_7 - IL_3b4e: call string [mscorlib]System.Convert::ToString(int32) - IL_3b53: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3b58: stloc.s V_10 - IL_3b5a: ldloc.s V_9 - IL_3b5c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3b61: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3b66: stloc.s V_9 - IL_3b68: ldloc.s V_10 - IL_3b6a: call string [mscorlib]System.Convert::ToString(int32) - IL_3b6f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3b74: stloc.s V_10 - IL_3b76: ldloc.s V_8 - IL_3b78: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3b7d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3b82: stloc.s V_6 - IL_3b84: ldloc.s V_8 - IL_3b86: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3b8b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3b90: stloc.s V_7 - IL_3b92: br.s IL_3bda - - IL_3b94: ldloc.s V_10 - IL_3b96: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3b9b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3ba0: stloc.s V_10 - IL_3ba2: ldloc.s V_6 - IL_3ba4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3ba9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3bae: stloc.s V_6 - IL_3bb0: ldloc.s V_9 - IL_3bb2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3bb7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3bbc: stloc.s V_10 - IL_3bbe: ldloc.s V_6 - IL_3bc0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3bc5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3bca: stloc.s V_6 - IL_3bcc: ldloc.s V_8 - IL_3bce: call string [mscorlib]System.Convert::ToString(int32) - IL_3bd3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3bd8: stloc.s V_7 - IL_3bda: ldloc.s V_6 - IL_3bdc: ldloc.s V_6 - IL_3bde: bge.s IL_3c28 - - IL_3be0: ldloc.s V_10 - IL_3be2: call string [mscorlib]System.Convert::ToString(int32) - IL_3be7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3bec: stloc.s V_8 - IL_3bee: ldloc.s V_9 - IL_3bf0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3bf5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3bfa: stloc.s V_10 - IL_3bfc: ldloc.s V_7 - IL_3bfe: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3c03: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3c08: stloc.s V_10 - IL_3c0a: ldloc.s V_8 - IL_3c0c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3c11: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3c16: stloc.s V_7 - IL_3c18: ldloc.s V_9 - IL_3c1a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3c1f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3c24: stloc.s V_8 - IL_3c26: br.s IL_3c6e - - IL_3c28: ldloc.s V_10 - IL_3c2a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3c2f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3c34: stloc.s V_8 - IL_3c36: ldloc.s V_7 - IL_3c38: call string [mscorlib]System.Convert::ToString(int32) - IL_3c3d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3c42: stloc.s V_10 - IL_3c44: ldloc.s V_7 - IL_3c46: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3c4b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3c50: stloc.s V_7 - IL_3c52: ldloc.s V_8 - IL_3c54: call string [mscorlib]System.Convert::ToString(int32) - IL_3c59: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3c5e: stloc.s V_9 - IL_3c60: ldloc.s V_10 - IL_3c62: call string [mscorlib]System.Convert::ToString(int32) - IL_3c67: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3c6c: stloc.s V_8 - IL_3c6e: ldloc.s V_9 - IL_3c70: ldloc.s V_10 - IL_3c72: bge.s IL_3cbc - - IL_3c74: ldloc.s V_10 - IL_3c76: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3c7b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3c80: stloc.s V_7 - IL_3c82: ldloc.s V_10 - IL_3c84: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3c89: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3c8e: stloc.s V_9 - IL_3c90: ldloc.s V_7 - IL_3c92: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3c97: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3c9c: stloc.s V_7 - IL_3c9e: ldloc.s V_6 - IL_3ca0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3ca5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3caa: stloc.s V_10 - IL_3cac: ldloc.s V_6 - IL_3cae: call string [mscorlib]System.Convert::ToString(int32) - IL_3cb3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3cb8: stloc.s V_6 - IL_3cba: br.s IL_3d02 - - IL_3cbc: ldloc.s V_7 - IL_3cbe: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3cc3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3cc8: stloc.s V_7 - IL_3cca: ldloc.s V_7 - IL_3ccc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3cd1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3cd6: stloc.s V_9 - IL_3cd8: ldloc.s V_9 - IL_3cda: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3cdf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3ce4: stloc.s V_9 - IL_3ce6: ldloc.s V_10 - IL_3ce8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3ced: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3cf2: stloc.s V_8 - IL_3cf4: ldloc.s V_7 - IL_3cf6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3cfb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3d00: stloc.s V_7 - IL_3d02: ldloc.s V_10 - IL_3d04: ldloc.s V_7 - IL_3d06: bge.s IL_3d50 - - IL_3d08: ldloc.s V_10 - IL_3d0a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3d0f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3d14: stloc.s V_9 - IL_3d16: ldloc.s V_7 - IL_3d18: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3d1d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3d22: stloc.s V_10 - IL_3d24: ldloc.s V_8 - IL_3d26: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3d2b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3d30: stloc.s V_10 - IL_3d32: ldloc.s V_6 - IL_3d34: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3d39: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3d3e: stloc.s V_6 - IL_3d40: ldloc.s V_10 - IL_3d42: call string [mscorlib]System.Convert::ToString(int32) - IL_3d47: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3d4c: stloc.s V_7 - IL_3d4e: br.s IL_3d96 - - IL_3d50: ldloc.s V_10 - IL_3d52: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3d57: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3d5c: stloc.s V_7 - IL_3d5e: ldloc.s V_8 - IL_3d60: call string [mscorlib]System.Convert::ToString(int32) - IL_3d65: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3d6a: stloc.s V_8 - IL_3d6c: ldloc.s V_9 - IL_3d6e: call string [mscorlib]System.Convert::ToString(int32) - IL_3d73: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3d78: stloc.s V_8 - IL_3d7a: ldloc.s V_9 - IL_3d7c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3d81: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3d86: stloc.s V_7 - IL_3d88: ldloc.s V_9 - IL_3d8a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3d8f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3d94: stloc.s V_10 - IL_3d96: ldloc.s V_9 - IL_3d98: ldloc.s V_10 - IL_3d9a: ble.s IL_3de4 - - IL_3d9c: ldloc.s V_8 - IL_3d9e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3da3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3da8: stloc.s V_10 - IL_3daa: ldloc.s V_10 - IL_3dac: call string [mscorlib]System.Convert::ToString(int32) - IL_3db1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3db6: stloc.s V_7 - IL_3db8: ldloc.s V_8 - IL_3dba: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3dbf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3dc4: stloc.s V_10 - IL_3dc6: ldloc.s V_10 - IL_3dc8: call string [mscorlib]System.Convert::ToString(int32) - IL_3dcd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3dd2: stloc.s V_10 - IL_3dd4: ldloc.s V_8 - IL_3dd6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3ddb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3de0: stloc.s V_8 - IL_3de2: br.s IL_3e2a - - IL_3de4: ldloc.s V_6 - IL_3de6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3deb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3df0: stloc.s V_6 - IL_3df2: ldloc.s V_8 - IL_3df4: call string [mscorlib]System.Convert::ToString(int32) - IL_3df9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3dfe: stloc.s V_7 - IL_3e00: ldloc.s V_8 - IL_3e02: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3e07: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3e0c: stloc.s V_9 - IL_3e0e: ldloc.s V_10 - IL_3e10: call string [mscorlib]System.Convert::ToString(int32) - IL_3e15: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3e1a: stloc.s V_7 - IL_3e1c: ldloc.s V_10 - IL_3e1e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3e23: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3e28: stloc.s V_9 - IL_3e2a: ldloc.s V_6 - IL_3e2c: ldloc.s V_9 - IL_3e2e: bne.un.s IL_3e78 - - IL_3e30: ldloc.s V_7 - IL_3e32: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3e37: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3e3c: stloc.s V_7 - IL_3e3e: ldloc.s V_9 - IL_3e40: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3e45: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3e4a: stloc.s V_7 - IL_3e4c: ldloc.s V_9 - IL_3e4e: call string [mscorlib]System.Convert::ToString(int32) - IL_3e53: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3e58: stloc.s V_6 - IL_3e5a: ldloc.s V_10 - IL_3e5c: call string [mscorlib]System.Convert::ToString(int32) - IL_3e61: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3e66: stloc.s V_6 - IL_3e68: ldloc.s V_9 - IL_3e6a: call string [mscorlib]System.Convert::ToString(int32) - IL_3e6f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3e74: stloc.s V_9 - IL_3e76: br.s IL_3ebe - - IL_3e78: ldloc.s V_10 - IL_3e7a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3e7f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3e84: stloc.s V_7 - IL_3e86: ldloc.s V_6 - IL_3e88: call string [mscorlib]System.Convert::ToString(int32) - IL_3e8d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3e92: stloc.s V_9 - IL_3e94: ldloc.s V_6 - IL_3e96: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3e9b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3ea0: stloc.s V_7 - IL_3ea2: ldloc.s V_10 - IL_3ea4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3ea9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3eae: stloc.s V_6 - IL_3eb0: ldloc.s V_10 - IL_3eb2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3eb7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3ebc: stloc.s V_10 - IL_3ebe: ldloc.s V_6 - IL_3ec0: ldloc.s V_9 - IL_3ec2: bgt.s IL_3f0c - - IL_3ec4: ldloc.s V_10 - IL_3ec6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3ecb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3ed0: stloc.s V_7 - IL_3ed2: ldloc.s V_6 - IL_3ed4: call string [mscorlib]System.Convert::ToString(int32) - IL_3ed9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3ede: stloc.s V_7 - IL_3ee0: ldloc.s V_6 - IL_3ee2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3ee7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3eec: stloc.s V_8 - IL_3eee: ldloc.s V_9 - IL_3ef0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3ef5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3efa: stloc.s V_9 - IL_3efc: ldloc.s V_10 - IL_3efe: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3f03: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3f08: stloc.s V_8 - IL_3f0a: br.s IL_3f52 - - IL_3f0c: ldloc.s V_6 - IL_3f0e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3f13: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3f18: stloc.s V_6 - IL_3f1a: ldloc.s V_7 - IL_3f1c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3f21: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3f26: stloc.s V_10 - IL_3f28: ldloc.s V_7 - IL_3f2a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3f2f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3f34: stloc.s V_9 - IL_3f36: ldloc.s V_6 - IL_3f38: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_3f3d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_3f42: stloc.s V_6 - IL_3f44: ldloc.s V_7 - IL_3f46: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3f4b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3f50: stloc.s V_9 - IL_3f52: ldloc.s V_7 - IL_3f54: ldloc.s V_7 - IL_3f56: bne.un.s IL_3fa0 - - IL_3f58: ldloc.s V_8 - IL_3f5a: call string [mscorlib]System.Convert::ToString(int32) - IL_3f5f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3f64: stloc.s V_7 - IL_3f66: ldloc.s V_7 - IL_3f68: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3f6d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3f72: stloc.s V_9 - IL_3f74: ldloc.s V_8 - IL_3f76: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3f7b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3f80: stloc.s V_10 - IL_3f82: ldloc.s V_7 - IL_3f84: call string [mscorlib]System.Convert::ToString(int32) - IL_3f89: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3f8e: stloc.s V_10 - IL_3f90: ldloc.s V_8 - IL_3f92: call string [mscorlib]System.Convert::ToString(int32) - IL_3f97: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3f9c: stloc.s V_8 - IL_3f9e: br.s IL_3fe6 - - IL_3fa0: ldloc.s V_10 - IL_3fa2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3fa7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3fac: stloc.s V_6 - IL_3fae: ldloc.s V_6 - IL_3fb0: call string [mscorlib]System.Convert::ToString(int32) - IL_3fb5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3fba: stloc.s V_10 - IL_3fbc: ldloc.s V_7 - IL_3fbe: call string [mscorlib]System.Convert::ToString(int32) - IL_3fc3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_3fc8: stloc.s V_7 - IL_3fca: ldloc.s V_7 - IL_3fcc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3fd1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3fd6: stloc.s V_9 - IL_3fd8: ldloc.s V_7 - IL_3fda: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_3fdf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_3fe4: stloc.s V_10 - IL_3fe6: ldloc.s V_10 - IL_3fe8: ldloc.s V_7 - IL_3fea: bne.un.s IL_4034 - - IL_3fec: ldloc.s V_10 - IL_3fee: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_3ff3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_3ff8: stloc.s V_7 - IL_3ffa: ldloc.s V_8 - IL_3ffc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4001: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4006: stloc.s V_7 - IL_4008: ldloc.s V_10 - IL_400a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_400f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4014: stloc.s V_9 - IL_4016: ldloc.s V_7 - IL_4018: call string [mscorlib]System.Convert::ToString(int32) - IL_401d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4022: stloc.s V_10 - IL_4024: ldloc.s V_8 - IL_4026: call string [mscorlib]System.Convert::ToString(int32) - IL_402b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4030: stloc.s V_10 - IL_4032: br.s IL_407a - - IL_4034: ldloc.s V_7 - IL_4036: call string [mscorlib]System.Convert::ToString(int32) - IL_403b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4040: stloc.s V_8 - IL_4042: ldloc.s V_9 - IL_4044: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4049: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_404e: stloc.s V_7 - IL_4050: ldloc.s V_6 - IL_4052: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4057: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_405c: stloc.s V_7 - IL_405e: ldloc.s V_9 - IL_4060: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4065: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_406a: stloc.s V_6 - IL_406c: ldloc.s V_7 - IL_406e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4073: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4078: stloc.s V_10 - IL_407a: ldloc.s V_6 - IL_407c: ldloc.s V_9 - IL_407e: bge.s IL_40c8 - - IL_4080: ldloc.s V_8 - IL_4082: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4087: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_408c: stloc.s V_10 - IL_408e: ldloc.s V_8 - IL_4090: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4095: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_409a: stloc.s V_8 - IL_409c: ldloc.s V_8 - IL_409e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_40a3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_40a8: stloc.s V_8 - IL_40aa: ldloc.s V_10 - IL_40ac: call string [mscorlib]System.Convert::ToString(int32) - IL_40b1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_40b6: stloc.s V_6 - IL_40b8: ldloc.s V_7 - IL_40ba: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_40bf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_40c4: stloc.s V_6 - IL_40c6: br.s IL_410e - - IL_40c8: ldloc.s V_7 - IL_40ca: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_40cf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_40d4: stloc.s V_9 - IL_40d6: ldloc.s V_10 - IL_40d8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_40dd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_40e2: stloc.s V_10 - IL_40e4: ldloc.s V_6 - IL_40e6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_40eb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_40f0: stloc.s V_9 - IL_40f2: ldloc.s V_7 - IL_40f4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_40f9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_40fe: stloc.s V_10 - IL_4100: ldloc.s V_7 - IL_4102: call string [mscorlib]System.Convert::ToString(int32) - IL_4107: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_410c: stloc.s V_9 - IL_410e: ldloc.s V_8 - IL_4110: ldloc.s V_8 - IL_4112: bne.un.s IL_415c - - IL_4114: ldloc.s V_9 - IL_4116: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_411b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4120: stloc.s V_9 - IL_4122: ldloc.s V_9 - IL_4124: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4129: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_412e: stloc.s V_6 - IL_4130: ldloc.s V_10 - IL_4132: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4137: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_413c: stloc.s V_9 - IL_413e: ldloc.s V_8 - IL_4140: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4145: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_414a: stloc.s V_7 - IL_414c: ldloc.s V_7 - IL_414e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4153: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4158: stloc.s V_6 - IL_415a: br.s IL_41a2 - - IL_415c: ldloc.s V_8 - IL_415e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4163: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4168: stloc.s V_7 - IL_416a: ldloc.s V_9 - IL_416c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4171: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4176: stloc.s V_10 - IL_4178: ldloc.s V_6 - IL_417a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_417f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4184: stloc.s V_9 - IL_4186: ldloc.s V_8 - IL_4188: call string [mscorlib]System.Convert::ToString(int32) - IL_418d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4192: stloc.s V_7 - IL_4194: ldloc.s V_8 - IL_4196: call string [mscorlib]System.Convert::ToString(int32) - IL_419b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_41a0: stloc.s V_6 - IL_41a2: ldloc.s V_8 - IL_41a4: ldloc.s V_10 - IL_41a6: ble.s IL_41f0 - - IL_41a8: ldloc.s V_9 - IL_41aa: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_41af: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_41b4: stloc.s V_7 - IL_41b6: ldloc.s V_8 - IL_41b8: call string [mscorlib]System.Convert::ToString(int32) - IL_41bd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_41c2: stloc.s V_9 - IL_41c4: ldloc.s V_8 - IL_41c6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_41cb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_41d0: stloc.s V_8 - IL_41d2: ldloc.s V_10 - IL_41d4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_41d9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_41de: stloc.s V_6 - IL_41e0: ldloc.s V_6 - IL_41e2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_41e7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_41ec: stloc.s V_9 - IL_41ee: br.s IL_4236 - - IL_41f0: ldloc.s V_8 - IL_41f2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_41f7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_41fc: stloc.s V_6 - IL_41fe: ldloc.s V_7 - IL_4200: call string [mscorlib]System.Convert::ToString(int32) - IL_4205: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_420a: stloc.s V_10 - IL_420c: ldloc.s V_9 - IL_420e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4213: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4218: stloc.s V_9 - IL_421a: ldloc.s V_7 - IL_421c: call string [mscorlib]System.Convert::ToString(int32) - IL_4221: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4226: stloc.s V_9 - IL_4228: ldloc.s V_6 - IL_422a: call string [mscorlib]System.Convert::ToString(int32) - IL_422f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4234: stloc.s V_6 - IL_4236: ldloc.s V_6 - IL_4238: ldloc.s V_9 - IL_423a: blt.s IL_4284 - - IL_423c: ldloc.s V_9 - IL_423e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4243: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4248: stloc.s V_8 - IL_424a: ldloc.s V_8 - IL_424c: call string [mscorlib]System.Convert::ToString(int32) - IL_4251: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4256: stloc.s V_8 - IL_4258: ldloc.s V_6 - IL_425a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_425f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4264: stloc.s V_6 - IL_4266: ldloc.s V_10 - IL_4268: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_426d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4272: stloc.s V_6 - IL_4274: ldloc.s V_10 - IL_4276: call string [mscorlib]System.Convert::ToString(int32) - IL_427b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4280: stloc.s V_6 - IL_4282: br.s IL_42ca - - IL_4284: ldloc.s V_7 - IL_4286: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_428b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4290: stloc.s V_7 - IL_4292: ldloc.s V_9 - IL_4294: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4299: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_429e: stloc.s V_10 - IL_42a0: ldloc.s V_7 - IL_42a2: call string [mscorlib]System.Convert::ToString(int32) - IL_42a7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_42ac: stloc.s V_9 - IL_42ae: ldloc.s V_6 - IL_42b0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_42b5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_42ba: stloc.s V_6 - IL_42bc: ldloc.s V_8 - IL_42be: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_42c3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_42c8: stloc.s V_6 - IL_42ca: ldloc.s V_10 - IL_42cc: ldloc.s V_6 - IL_42ce: blt.s IL_4318 - - IL_42d0: ldloc.s V_10 - IL_42d2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_42d7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_42dc: stloc.s V_6 - IL_42de: ldloc.s V_9 - IL_42e0: call string [mscorlib]System.Convert::ToString(int32) - IL_42e5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_42ea: stloc.s V_8 - IL_42ec: ldloc.s V_7 - IL_42ee: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_42f3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_42f8: stloc.s V_6 - IL_42fa: ldloc.s V_8 - IL_42fc: call string [mscorlib]System.Convert::ToString(int32) - IL_4301: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4306: stloc.s V_7 - IL_4308: ldloc.s V_10 - IL_430a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_430f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4314: stloc.s V_9 - IL_4316: br.s IL_435e - - IL_4318: ldloc.s V_10 - IL_431a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_431f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4324: stloc.s V_8 - IL_4326: ldloc.s V_10 - IL_4328: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_432d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4332: stloc.s V_9 - IL_4334: ldloc.s V_6 - IL_4336: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_433b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4340: stloc.s V_6 - IL_4342: ldloc.s V_8 - IL_4344: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4349: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_434e: stloc.s V_7 - IL_4350: ldloc.s V_6 - IL_4352: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4357: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_435c: stloc.s V_7 - IL_435e: ldloc.s V_9 - IL_4360: ldloc.s V_9 - IL_4362: bgt.s IL_43ac - - IL_4364: ldloc.s V_8 - IL_4366: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_436b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4370: stloc.s V_10 - IL_4372: ldloc.s V_7 - IL_4374: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4379: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_437e: stloc.s V_10 - IL_4380: ldloc.s V_7 - IL_4382: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4387: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_438c: stloc.s V_9 - IL_438e: ldloc.s V_10 - IL_4390: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4395: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_439a: stloc.s V_8 - IL_439c: ldloc.s V_9 - IL_439e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_43a3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_43a8: stloc.s V_10 - IL_43aa: br.s IL_43f2 - - IL_43ac: ldloc.s V_9 - IL_43ae: call string [mscorlib]System.Convert::ToString(int32) - IL_43b3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_43b8: stloc.s V_6 - IL_43ba: ldloc.s V_7 - IL_43bc: call string [mscorlib]System.Convert::ToString(int32) - IL_43c1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_43c6: stloc.s V_9 - IL_43c8: ldloc.s V_7 - IL_43ca: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_43cf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_43d4: stloc.s V_7 - IL_43d6: ldloc.s V_7 - IL_43d8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_43dd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_43e2: stloc.s V_9 - IL_43e4: ldloc.s V_10 - IL_43e6: call string [mscorlib]System.Convert::ToString(int32) - IL_43eb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_43f0: stloc.s V_7 - IL_43f2: ldloc.s V_9 - IL_43f4: ldloc.s V_10 - IL_43f6: bge.s IL_4440 - - IL_43f8: ldloc.s V_8 - IL_43fa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_43ff: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4404: stloc.s V_10 - IL_4406: ldloc.s V_10 - IL_4408: call string [mscorlib]System.Convert::ToString(int32) - IL_440d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4412: stloc.s V_8 - IL_4414: ldloc.s V_9 - IL_4416: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_441b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4420: stloc.s V_8 - IL_4422: ldloc.s V_7 - IL_4424: call string [mscorlib]System.Convert::ToString(int32) - IL_4429: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_442e: stloc.s V_9 - IL_4430: ldloc.s V_10 - IL_4432: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4437: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_443c: stloc.s V_7 - IL_443e: br.s IL_4486 - - IL_4440: ldloc.s V_7 - IL_4442: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4447: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_444c: stloc.s V_10 - IL_444e: ldloc.s V_6 - IL_4450: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4455: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_445a: stloc.s V_8 - IL_445c: ldloc.s V_10 - IL_445e: call string [mscorlib]System.Convert::ToString(int32) - IL_4463: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4468: stloc.s V_7 - IL_446a: ldloc.s V_9 - IL_446c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4471: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4476: stloc.s V_6 - IL_4478: ldloc.s V_6 - IL_447a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_447f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4484: stloc.s V_10 - IL_4486: ldloc.s V_6 - IL_4488: ldloc.s V_9 - IL_448a: blt.s IL_44d4 - - IL_448c: ldloc.s V_8 - IL_448e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4493: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4498: stloc.s V_6 - IL_449a: ldloc.s V_6 - IL_449c: call string [mscorlib]System.Convert::ToString(int32) - IL_44a1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_44a6: stloc.s V_7 - IL_44a8: ldloc.s V_8 - IL_44aa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_44af: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_44b4: stloc.s V_9 - IL_44b6: ldloc.s V_7 - IL_44b8: call string [mscorlib]System.Convert::ToString(int32) - IL_44bd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_44c2: stloc.s V_8 - IL_44c4: ldloc.s V_9 - IL_44c6: call string [mscorlib]System.Convert::ToString(int32) - IL_44cb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_44d0: stloc.s V_6 - IL_44d2: br.s IL_451a - - IL_44d4: ldloc.s V_8 - IL_44d6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_44db: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_44e0: stloc.s V_7 - IL_44e2: ldloc.s V_10 - IL_44e4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_44e9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_44ee: stloc.s V_8 - IL_44f0: ldloc.s V_7 - IL_44f2: call string [mscorlib]System.Convert::ToString(int32) - IL_44f7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_44fc: stloc.s V_10 - IL_44fe: ldloc.s V_8 - IL_4500: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4505: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_450a: stloc.s V_8 - IL_450c: ldloc.s V_9 - IL_450e: call string [mscorlib]System.Convert::ToString(int32) - IL_4513: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4518: stloc.s V_7 - IL_451a: ldloc.s V_7 - IL_451c: ldloc.s V_8 - IL_451e: bne.un.s IL_4568 - - IL_4520: ldloc.s V_8 - IL_4522: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4527: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_452c: stloc.s V_9 - IL_452e: ldloc.s V_8 - IL_4530: call string [mscorlib]System.Convert::ToString(int32) - IL_4535: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_453a: stloc.s V_8 - IL_453c: ldloc.s V_9 - IL_453e: call string [mscorlib]System.Convert::ToString(int32) - IL_4543: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4548: stloc.s V_7 - IL_454a: ldloc.s V_6 - IL_454c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4551: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4556: stloc.s V_8 - IL_4558: ldloc.s V_8 - IL_455a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_455f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4564: stloc.s V_8 - IL_4566: br.s IL_45ae - - IL_4568: ldloc.s V_6 - IL_456a: call string [mscorlib]System.Convert::ToString(int32) - IL_456f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4574: stloc.s V_10 - IL_4576: ldloc.s V_7 - IL_4578: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_457d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4582: stloc.s V_8 - IL_4584: ldloc.s V_7 - IL_4586: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_458b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4590: stloc.s V_10 - IL_4592: ldloc.s V_7 - IL_4594: call string [mscorlib]System.Convert::ToString(int32) - IL_4599: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_459e: stloc.s V_7 - IL_45a0: ldloc.s V_8 - IL_45a2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_45a7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_45ac: stloc.s V_9 - IL_45ae: ldloc.s V_10 - IL_45b0: ldloc.s V_7 - IL_45b2: bne.un.s IL_45fc - - IL_45b4: ldloc.s V_7 - IL_45b6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_45bb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_45c0: stloc.s V_10 - IL_45c2: ldloc.s V_9 - IL_45c4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_45c9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_45ce: stloc.s V_6 - IL_45d0: ldloc.s V_6 - IL_45d2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_45d7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_45dc: stloc.s V_10 - IL_45de: ldloc.s V_9 - IL_45e0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_45e5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_45ea: stloc.s V_6 - IL_45ec: ldloc.s V_7 - IL_45ee: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_45f3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_45f8: stloc.s V_7 - IL_45fa: br.s IL_4642 - - IL_45fc: ldloc.s V_6 - IL_45fe: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4603: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4608: stloc.s V_10 - IL_460a: ldloc.s V_7 - IL_460c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4611: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4616: stloc.s V_9 - IL_4618: ldloc.s V_10 - IL_461a: call string [mscorlib]System.Convert::ToString(int32) - IL_461f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4624: stloc.s V_6 - IL_4626: ldloc.s V_10 - IL_4628: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_462d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4632: stloc.s V_6 - IL_4634: ldloc.s V_7 - IL_4636: call string [mscorlib]System.Convert::ToString(int32) - IL_463b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4640: stloc.s V_7 - IL_4642: ldloc.s V_9 - IL_4644: ldloc.s V_10 - IL_4646: blt.s IL_4690 - - IL_4648: ldloc.s V_9 - IL_464a: call string [mscorlib]System.Convert::ToString(int32) - IL_464f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4654: stloc.s V_9 - IL_4656: ldloc.s V_9 - IL_4658: call string [mscorlib]System.Convert::ToString(int32) - IL_465d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4662: stloc.s V_7 - IL_4664: ldloc.s V_9 - IL_4666: call string [mscorlib]System.Convert::ToString(int32) - IL_466b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4670: stloc.s V_7 - IL_4672: ldloc.s V_10 - IL_4674: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4679: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_467e: stloc.s V_7 - IL_4680: ldloc.s V_9 - IL_4682: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4687: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_468c: stloc.s V_8 - IL_468e: br.s IL_46d6 - - IL_4690: ldloc.s V_6 - IL_4692: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4697: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_469c: stloc.s V_10 - IL_469e: ldloc.s V_10 - IL_46a0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_46a5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_46aa: stloc.s V_8 - IL_46ac: ldloc.s V_9 - IL_46ae: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_46b3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_46b8: stloc.s V_6 - IL_46ba: ldloc.s V_9 - IL_46bc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_46c1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_46c6: stloc.s V_8 - IL_46c8: ldloc.s V_8 - IL_46ca: call string [mscorlib]System.Convert::ToString(int32) - IL_46cf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_46d4: stloc.s V_10 - IL_46d6: ldloc.s V_9 - IL_46d8: ldloc.s V_8 - IL_46da: beq.s IL_4724 - - IL_46dc: ldloc.s V_7 - IL_46de: call string [mscorlib]System.Convert::ToString(int32) - IL_46e3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_46e8: stloc.s V_10 - IL_46ea: ldloc.s V_9 - IL_46ec: call string [mscorlib]System.Convert::ToString(int32) - IL_46f1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_46f6: stloc.s V_9 - IL_46f8: ldloc.s V_8 - IL_46fa: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_46ff: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4704: stloc.s V_7 - IL_4706: ldloc.s V_10 - IL_4708: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_470d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4712: stloc.s V_9 - IL_4714: ldloc.s V_6 - IL_4716: call string [mscorlib]System.Convert::ToString(int32) - IL_471b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4720: stloc.s V_10 - IL_4722: br.s IL_476a - - IL_4724: ldloc.s V_10 - IL_4726: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_472b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4730: stloc.s V_6 - IL_4732: ldloc.s V_8 - IL_4734: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4739: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_473e: stloc.s V_6 - IL_4740: ldloc.s V_10 - IL_4742: call string [mscorlib]System.Convert::ToString(int32) - IL_4747: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_474c: stloc.s V_6 - IL_474e: ldloc.s V_9 - IL_4750: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4755: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_475a: stloc.s V_10 - IL_475c: ldloc.s V_6 - IL_475e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4763: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4768: stloc.s V_6 - IL_476a: ldloc.s V_7 - IL_476c: ldloc.s V_6 - IL_476e: ble.s IL_47b8 - - IL_4770: ldloc.s V_8 - IL_4772: call string [mscorlib]System.Convert::ToString(int32) - IL_4777: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_477c: stloc.s V_8 - IL_477e: ldloc.s V_7 - IL_4780: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4785: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_478a: stloc.s V_8 - IL_478c: ldloc.s V_10 - IL_478e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4793: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4798: stloc.s V_8 - IL_479a: ldloc.s V_10 - IL_479c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_47a1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_47a6: stloc.s V_7 - IL_47a8: ldloc.s V_8 - IL_47aa: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_47af: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_47b4: stloc.s V_10 - IL_47b6: br.s IL_47fe - - IL_47b8: ldloc.s V_7 - IL_47ba: call string [mscorlib]System.Convert::ToString(int32) - IL_47bf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_47c4: stloc.s V_9 - IL_47c6: ldloc.s V_9 - IL_47c8: call string [mscorlib]System.Convert::ToString(int32) - IL_47cd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_47d2: stloc.s V_9 - IL_47d4: ldloc.s V_6 - IL_47d6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_47db: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_47e0: stloc.s V_10 - IL_47e2: ldloc.s V_9 - IL_47e4: call string [mscorlib]System.Convert::ToString(int32) - IL_47e9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_47ee: stloc.s V_7 - IL_47f0: ldloc.s V_9 - IL_47f2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_47f7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_47fc: stloc.s V_10 - IL_47fe: ldloc.s V_9 - IL_4800: ldloc.s V_8 - IL_4802: blt.s IL_484c - - IL_4804: ldloc.s V_10 - IL_4806: call string [mscorlib]System.Convert::ToString(int32) - IL_480b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4810: stloc.s V_9 - IL_4812: ldloc.s V_6 - IL_4814: call string [mscorlib]System.Convert::ToString(int32) - IL_4819: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_481e: stloc.s V_8 - IL_4820: ldloc.s V_9 - IL_4822: call string [mscorlib]System.Convert::ToString(int32) - IL_4827: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_482c: stloc.s V_8 - IL_482e: ldloc.s V_7 - IL_4830: call string [mscorlib]System.Convert::ToString(int32) - IL_4835: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_483a: stloc.s V_9 - IL_483c: ldloc.s V_7 - IL_483e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4843: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4848: stloc.s V_6 - IL_484a: br.s IL_4892 - - IL_484c: ldloc.s V_9 - IL_484e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4853: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4858: stloc.s V_7 - IL_485a: ldloc.s V_9 - IL_485c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4861: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4866: stloc.s V_10 - IL_4868: ldloc.s V_9 - IL_486a: call string [mscorlib]System.Convert::ToString(int32) - IL_486f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4874: stloc.s V_7 - IL_4876: ldloc.s V_8 - IL_4878: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_487d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4882: stloc.s V_8 - IL_4884: ldloc.s V_6 - IL_4886: call string [mscorlib]System.Convert::ToString(int32) - IL_488b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4890: stloc.s V_8 - IL_4892: ldloc.s V_10 - IL_4894: ldloc.s V_9 - IL_4896: ble.s IL_48e0 - - IL_4898: ldloc.s V_10 - IL_489a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_489f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_48a4: stloc.s V_7 - IL_48a6: ldloc.s V_6 - IL_48a8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_48ad: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_48b2: stloc.s V_8 - IL_48b4: ldloc.s V_10 - IL_48b6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_48bb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_48c0: stloc.s V_7 - IL_48c2: ldloc.s V_7 - IL_48c4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_48c9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_48ce: stloc.s V_6 - IL_48d0: ldloc.s V_9 - IL_48d2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_48d7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_48dc: stloc.s V_9 - IL_48de: br.s IL_4926 - - IL_48e0: ldloc.s V_9 - IL_48e2: call string [mscorlib]System.Convert::ToString(int32) - IL_48e7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_48ec: stloc.s V_8 - IL_48ee: ldloc.s V_7 - IL_48f0: call string [mscorlib]System.Convert::ToString(int32) - IL_48f5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_48fa: stloc.s V_6 - IL_48fc: ldloc.s V_10 - IL_48fe: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4903: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4908: stloc.s V_9 - IL_490a: ldloc.s V_8 - IL_490c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4911: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4916: stloc.s V_7 - IL_4918: ldloc.s V_6 - IL_491a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_491f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4924: stloc.s V_8 - IL_4926: ldloc.s V_8 - IL_4928: ldloc.s V_9 - IL_492a: bne.un.s IL_4974 - - IL_492c: ldloc.s V_10 - IL_492e: call string [mscorlib]System.Convert::ToString(int32) - IL_4933: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4938: stloc.s V_8 - IL_493a: ldloc.s V_7 - IL_493c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4941: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4946: stloc.s V_8 - IL_4948: ldloc.s V_6 - IL_494a: call string [mscorlib]System.Convert::ToString(int32) - IL_494f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4954: stloc.s V_9 - IL_4956: ldloc.s V_7 - IL_4958: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_495d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4962: stloc.s V_9 - IL_4964: ldloc.s V_10 - IL_4966: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_496b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4970: stloc.s V_7 - IL_4972: br.s IL_49ba - - IL_4974: ldloc.s V_10 - IL_4976: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_497b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4980: stloc.s V_10 - IL_4982: ldloc.s V_7 - IL_4984: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4989: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_498e: stloc.s V_7 - IL_4990: ldloc.s V_10 - IL_4992: call string [mscorlib]System.Convert::ToString(int32) - IL_4997: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_499c: stloc.s V_7 - IL_499e: ldloc.s V_6 - IL_49a0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_49a5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_49aa: stloc.s V_6 - IL_49ac: ldloc.s V_6 - IL_49ae: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_49b3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_49b8: stloc.s V_9 - IL_49ba: ldloc.s V_7 - IL_49bc: ldloc.s V_9 - IL_49be: beq.s IL_4a08 - - IL_49c0: ldloc.s V_8 - IL_49c2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_49c7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_49cc: stloc.s V_8 - IL_49ce: ldloc.s V_9 - IL_49d0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_49d5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_49da: stloc.s V_9 - IL_49dc: ldloc.s V_6 - IL_49de: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_49e3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_49e8: stloc.s V_7 - IL_49ea: ldloc.s V_10 - IL_49ec: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_49f1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_49f6: stloc.s V_6 - IL_49f8: ldloc.s V_7 - IL_49fa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_49ff: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4a04: stloc.s V_8 - IL_4a06: br.s IL_4a4e - - IL_4a08: ldloc.s V_6 - IL_4a0a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4a0f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4a14: stloc.s V_9 - IL_4a16: ldloc.s V_8 - IL_4a18: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4a1d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4a22: stloc.s V_6 - IL_4a24: ldloc.s V_7 - IL_4a26: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4a2b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4a30: stloc.s V_8 - IL_4a32: ldloc.s V_9 - IL_4a34: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4a39: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4a3e: stloc.s V_6 - IL_4a40: ldloc.s V_9 - IL_4a42: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4a47: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4a4c: stloc.s V_7 - IL_4a4e: ldloc.s V_10 - IL_4a50: ldloc.s V_6 - IL_4a52: ble.s IL_4a9c - - IL_4a54: ldloc.s V_9 - IL_4a56: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4a5b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4a60: stloc.s V_9 - IL_4a62: ldloc.s V_6 - IL_4a64: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4a69: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4a6e: stloc.s V_7 - IL_4a70: ldloc.s V_9 - IL_4a72: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4a77: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4a7c: stloc.s V_6 - IL_4a7e: ldloc.s V_8 - IL_4a80: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4a85: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4a8a: stloc.s V_7 - IL_4a8c: ldloc.s V_6 - IL_4a8e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4a93: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4a98: stloc.s V_10 - IL_4a9a: br.s IL_4ae2 - - IL_4a9c: ldloc.s V_7 - IL_4a9e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4aa3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4aa8: stloc.s V_10 - IL_4aaa: ldloc.s V_10 - IL_4aac: call string [mscorlib]System.Convert::ToString(int32) - IL_4ab1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4ab6: stloc.s V_10 - IL_4ab8: ldloc.s V_10 - IL_4aba: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4abf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4ac4: stloc.s V_7 - IL_4ac6: ldloc.s V_8 - IL_4ac8: call string [mscorlib]System.Convert::ToString(int32) - IL_4acd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4ad2: stloc.s V_7 - IL_4ad4: ldloc.s V_8 - IL_4ad6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4adb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4ae0: stloc.s V_6 - IL_4ae2: ldloc.s V_6 - IL_4ae4: ldloc.s V_6 - IL_4ae6: bge.s IL_4b30 - - IL_4ae8: ldloc.s V_7 - IL_4aea: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4aef: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4af4: stloc.s V_10 - IL_4af6: ldloc.s V_7 - IL_4af8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4afd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4b02: stloc.s V_9 - IL_4b04: ldloc.s V_7 - IL_4b06: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4b0b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4b10: stloc.s V_6 - IL_4b12: ldloc.s V_6 - IL_4b14: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4b19: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4b1e: stloc.s V_9 - IL_4b20: ldloc.s V_6 - IL_4b22: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4b27: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4b2c: stloc.s V_9 - IL_4b2e: br.s IL_4b76 - - IL_4b30: ldloc.s V_6 - IL_4b32: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4b37: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4b3c: stloc.s V_9 - IL_4b3e: ldloc.s V_6 - IL_4b40: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4b45: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4b4a: stloc.s V_8 - IL_4b4c: ldloc.s V_9 - IL_4b4e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4b53: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4b58: stloc.s V_6 - IL_4b5a: ldloc.s V_8 - IL_4b5c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4b61: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4b66: stloc.s V_9 - IL_4b68: ldloc.s V_10 - IL_4b6a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4b6f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4b74: stloc.s V_8 - IL_4b76: ldloc.s V_6 - IL_4b78: ldloc.s V_6 - IL_4b7a: bge.s IL_4bc4 - - IL_4b7c: ldloc.s V_8 - IL_4b7e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4b83: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4b88: stloc.s V_7 - IL_4b8a: ldloc.s V_8 - IL_4b8c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4b91: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4b96: stloc.s V_10 - IL_4b98: ldloc.s V_9 - IL_4b9a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4b9f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4ba4: stloc.s V_10 - IL_4ba6: ldloc.s V_10 - IL_4ba8: call string [mscorlib]System.Convert::ToString(int32) - IL_4bad: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4bb2: stloc.s V_8 - IL_4bb4: ldloc.s V_8 - IL_4bb6: call string [mscorlib]System.Convert::ToString(int32) - IL_4bbb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4bc0: stloc.s V_10 - IL_4bc2: br.s IL_4c0a - - IL_4bc4: ldloc.s V_9 - IL_4bc6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4bcb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4bd0: stloc.s V_8 - IL_4bd2: ldloc.s V_10 - IL_4bd4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4bd9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4bde: stloc.s V_8 - IL_4be0: ldloc.s V_9 - IL_4be2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4be7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4bec: stloc.s V_10 - IL_4bee: ldloc.s V_9 - IL_4bf0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4bf5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4bfa: stloc.s V_8 - IL_4bfc: ldloc.s V_10 - IL_4bfe: call string [mscorlib]System.Convert::ToString(int32) - IL_4c03: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4c08: stloc.s V_10 - IL_4c0a: ldloc.s V_8 - IL_4c0c: ldloc.s V_6 - IL_4c0e: blt.s IL_4c58 - - IL_4c10: ldloc.s V_6 - IL_4c12: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4c17: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4c1c: stloc.s V_10 - IL_4c1e: ldloc.s V_6 - IL_4c20: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4c25: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4c2a: stloc.s V_8 - IL_4c2c: ldloc.s V_7 - IL_4c2e: call string [mscorlib]System.Convert::ToString(int32) - IL_4c33: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4c38: stloc.s V_8 - IL_4c3a: ldloc.s V_10 - IL_4c3c: call string [mscorlib]System.Convert::ToString(int32) - IL_4c41: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4c46: stloc.s V_8 - IL_4c48: ldloc.s V_7 - IL_4c4a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4c4f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4c54: stloc.s V_9 - IL_4c56: br.s IL_4c9e - - IL_4c58: ldloc.s V_9 - IL_4c5a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4c5f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4c64: stloc.s V_10 - IL_4c66: ldloc.s V_7 - IL_4c68: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4c6d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4c72: stloc.s V_6 - IL_4c74: ldloc.s V_7 - IL_4c76: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4c7b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4c80: stloc.s V_7 - IL_4c82: ldloc.s V_7 - IL_4c84: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4c89: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4c8e: stloc.s V_10 - IL_4c90: ldloc.s V_7 - IL_4c92: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4c97: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4c9c: stloc.s V_10 - IL_4c9e: ldloc.s V_6 - IL_4ca0: ldloc.s V_6 - IL_4ca2: bne.un.s IL_4cec - - IL_4ca4: ldloc.s V_6 - IL_4ca6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4cab: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4cb0: stloc.s V_9 - IL_4cb2: ldloc.s V_8 - IL_4cb4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4cb9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4cbe: stloc.s V_7 - IL_4cc0: ldloc.s V_7 - IL_4cc2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4cc7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4ccc: stloc.s V_8 - IL_4cce: ldloc.s V_6 - IL_4cd0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4cd5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4cda: stloc.s V_8 - IL_4cdc: ldloc.s V_6 - IL_4cde: call string [mscorlib]System.Convert::ToString(int32) - IL_4ce3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4ce8: stloc.s V_10 - IL_4cea: br.s IL_4d32 - - IL_4cec: ldloc.s V_9 - IL_4cee: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4cf3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4cf8: stloc.s V_8 - IL_4cfa: ldloc.s V_9 - IL_4cfc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4d01: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4d06: stloc.s V_7 - IL_4d08: ldloc.s V_6 - IL_4d0a: call string [mscorlib]System.Convert::ToString(int32) - IL_4d0f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4d14: stloc.s V_10 - IL_4d16: ldloc.s V_8 - IL_4d18: call string [mscorlib]System.Convert::ToString(int32) - IL_4d1d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4d22: stloc.s V_10 - IL_4d24: ldloc.s V_7 - IL_4d26: call string [mscorlib]System.Convert::ToString(int32) - IL_4d2b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4d30: stloc.s V_10 - IL_4d32: ldloc.s V_10 - IL_4d34: ldloc.s V_8 - IL_4d36: beq.s IL_4d80 - - IL_4d38: ldloc.s V_10 - IL_4d3a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4d3f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4d44: stloc.s V_9 - IL_4d46: ldloc.s V_10 - IL_4d48: call string [mscorlib]System.Convert::ToString(int32) - IL_4d4d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4d52: stloc.s V_6 - IL_4d54: ldloc.s V_10 - IL_4d56: call string [mscorlib]System.Convert::ToString(int32) - IL_4d5b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4d60: stloc.s V_6 - IL_4d62: ldloc.s V_10 - IL_4d64: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4d69: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4d6e: stloc.s V_10 - IL_4d70: ldloc.s V_9 - IL_4d72: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4d77: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4d7c: stloc.s V_6 - IL_4d7e: br.s IL_4dc6 - - IL_4d80: ldloc.s V_7 - IL_4d82: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4d87: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4d8c: stloc.s V_7 - IL_4d8e: ldloc.s V_9 - IL_4d90: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4d95: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4d9a: stloc.s V_9 - IL_4d9c: ldloc.s V_7 - IL_4d9e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4da3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4da8: stloc.s V_8 - IL_4daa: ldloc.s V_7 - IL_4dac: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4db1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4db6: stloc.s V_6 - IL_4db8: ldloc.s V_7 - IL_4dba: call string [mscorlib]System.Convert::ToString(int32) - IL_4dbf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4dc4: stloc.s V_6 - IL_4dc6: ldloc.s V_9 - IL_4dc8: ldloc.s V_8 - IL_4dca: beq.s IL_4e14 - - IL_4dcc: ldloc.s V_9 - IL_4dce: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4dd3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4dd8: stloc.s V_9 - IL_4dda: ldloc.s V_7 - IL_4ddc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4de1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4de6: stloc.s V_6 - IL_4de8: ldloc.s V_9 - IL_4dea: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4def: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4df4: stloc.s V_9 - IL_4df6: ldloc.s V_9 - IL_4df8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4dfd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4e02: stloc.s V_9 - IL_4e04: ldloc.s V_9 - IL_4e06: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4e0b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4e10: stloc.s V_7 - IL_4e12: br.s IL_4e5a - - IL_4e14: ldloc.s V_6 - IL_4e16: call string [mscorlib]System.Convert::ToString(int32) - IL_4e1b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4e20: stloc.s V_9 - IL_4e22: ldloc.s V_8 - IL_4e24: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4e29: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4e2e: stloc.s V_6 - IL_4e30: ldloc.s V_6 - IL_4e32: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4e37: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4e3c: stloc.s V_10 - IL_4e3e: ldloc.s V_6 - IL_4e40: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4e45: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4e4a: stloc.s V_8 - IL_4e4c: ldloc.s V_10 - IL_4e4e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4e53: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4e58: stloc.s V_9 - IL_4e5a: ldloc.s V_6 - IL_4e5c: ldloc.s V_6 - IL_4e5e: bgt.s IL_4ea8 - - IL_4e60: ldloc.s V_6 - IL_4e62: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4e67: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4e6c: stloc.s V_7 - IL_4e6e: ldloc.s V_6 - IL_4e70: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4e75: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4e7a: stloc.s V_10 - IL_4e7c: ldloc.s V_7 - IL_4e7e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4e83: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4e88: stloc.s V_10 - IL_4e8a: ldloc.s V_10 - IL_4e8c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4e91: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4e96: stloc.s V_10 - IL_4e98: ldloc.s V_8 - IL_4e9a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4e9f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4ea4: stloc.s V_9 - IL_4ea6: br.s IL_4eee - - IL_4ea8: ldloc.s V_10 - IL_4eaa: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4eaf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4eb4: stloc.s V_9 - IL_4eb6: ldloc.s V_9 - IL_4eb8: call string [mscorlib]System.Convert::ToString(int32) - IL_4ebd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4ec2: stloc.s V_6 - IL_4ec4: ldloc.s V_9 - IL_4ec6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4ecb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4ed0: stloc.s V_6 - IL_4ed2: ldloc.s V_8 - IL_4ed4: call string [mscorlib]System.Convert::ToString(int32) - IL_4ed9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4ede: stloc.s V_8 - IL_4ee0: ldloc.s V_6 - IL_4ee2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4ee7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4eec: stloc.s V_6 - IL_4eee: ldloc.s V_10 - IL_4ef0: ldloc.s V_10 - IL_4ef2: bne.un.s IL_4f3c - - IL_4ef4: ldloc.s V_8 - IL_4ef6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4efb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4f00: stloc.s V_9 - IL_4f02: ldloc.s V_8 - IL_4f04: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4f09: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4f0e: stloc.s V_9 - IL_4f10: ldloc.s V_10 - IL_4f12: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4f17: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4f1c: stloc.s V_6 - IL_4f1e: ldloc.s V_8 - IL_4f20: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4f25: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4f2a: stloc.s V_6 - IL_4f2c: ldloc.s V_7 - IL_4f2e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4f33: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4f38: stloc.s V_7 - IL_4f3a: br.s IL_4f82 - - IL_4f3c: ldloc.s V_9 - IL_4f3e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4f43: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4f48: stloc.s V_9 - IL_4f4a: ldloc.s V_7 - IL_4f4c: call string [mscorlib]System.Convert::ToString(int32) - IL_4f51: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4f56: stloc.s V_6 - IL_4f58: ldloc.s V_8 - IL_4f5a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4f5f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4f64: stloc.s V_7 - IL_4f66: ldloc.s V_8 - IL_4f68: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4f6d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4f72: stloc.s V_7 - IL_4f74: ldloc.s V_6 - IL_4f76: call string [mscorlib]System.Convert::ToString(int32) - IL_4f7b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4f80: stloc.s V_9 - IL_4f82: ldloc.s V_6 - IL_4f84: ldloc.s V_9 - IL_4f86: bge.s IL_4fd0 - - IL_4f88: ldloc.s V_10 - IL_4f8a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4f8f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4f94: stloc.s V_10 - IL_4f96: ldloc.s V_8 - IL_4f98: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4f9d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4fa2: stloc.s V_6 - IL_4fa4: ldloc.s V_8 - IL_4fa6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4fab: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4fb0: stloc.s V_7 - IL_4fb2: ldloc.s V_10 - IL_4fb4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_4fb9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_4fbe: stloc.s V_9 - IL_4fc0: ldloc.s V_8 - IL_4fc2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_4fc7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_4fcc: stloc.s V_6 - IL_4fce: br.s IL_5016 - - IL_4fd0: ldloc.s V_6 - IL_4fd2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4fd7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4fdc: stloc.s V_6 - IL_4fde: ldloc.s V_8 - IL_4fe0: call string [mscorlib]System.Convert::ToString(int32) - IL_4fe5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_4fea: stloc.s V_7 - IL_4fec: ldloc.s V_9 - IL_4fee: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_4ff3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_4ff8: stloc.s V_8 - IL_4ffa: ldloc.s V_8 - IL_4ffc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5001: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5006: stloc.s V_10 - IL_5008: ldloc.s V_8 - IL_500a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_500f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5014: stloc.s V_6 - IL_5016: ldloc.s V_10 - IL_5018: ldloc.s V_9 - IL_501a: beq.s IL_5064 - - IL_501c: ldloc.s V_6 - IL_501e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5023: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5028: stloc.s V_10 - IL_502a: ldloc.s V_6 - IL_502c: call string [mscorlib]System.Convert::ToString(int32) - IL_5031: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5036: stloc.s V_8 - IL_5038: ldloc.s V_7 - IL_503a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_503f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5044: stloc.s V_6 - IL_5046: ldloc.s V_7 - IL_5048: call string [mscorlib]System.Convert::ToString(int32) - IL_504d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5052: stloc.s V_10 - IL_5054: ldloc.s V_7 - IL_5056: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_505b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5060: stloc.s V_8 - IL_5062: br.s IL_50aa - - IL_5064: ldloc.s V_7 - IL_5066: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_506b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5070: stloc.s V_6 - IL_5072: ldloc.s V_8 - IL_5074: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5079: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_507e: stloc.s V_10 - IL_5080: ldloc.s V_7 - IL_5082: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5087: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_508c: stloc.s V_7 - IL_508e: ldloc.s V_9 - IL_5090: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5095: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_509a: stloc.s V_6 - IL_509c: ldloc.s V_9 - IL_509e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_50a3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_50a8: stloc.s V_6 - IL_50aa: ldloc.s V_10 - IL_50ac: ldloc.s V_6 - IL_50ae: beq.s IL_50f8 - - IL_50b0: ldloc.s V_9 - IL_50b2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_50b7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_50bc: stloc.s V_7 - IL_50be: ldloc.s V_9 - IL_50c0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_50c5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_50ca: stloc.s V_8 - IL_50cc: ldloc.s V_10 - IL_50ce: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_50d3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_50d8: stloc.s V_6 - IL_50da: ldloc.s V_10 - IL_50dc: call string [mscorlib]System.Convert::ToString(int32) - IL_50e1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_50e6: stloc.s V_6 - IL_50e8: ldloc.s V_6 - IL_50ea: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_50ef: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_50f4: stloc.s V_8 - IL_50f6: br.s IL_513e - - IL_50f8: ldloc.s V_10 - IL_50fa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_50ff: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5104: stloc.s V_7 - IL_5106: ldloc.s V_10 - IL_5108: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_510d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5112: stloc.s V_7 - IL_5114: ldloc.s V_6 - IL_5116: call string [mscorlib]System.Convert::ToString(int32) - IL_511b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5120: stloc.s V_7 - IL_5122: ldloc.s V_9 - IL_5124: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5129: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_512e: stloc.s V_9 - IL_5130: ldloc.s V_8 - IL_5132: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5137: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_513c: stloc.s V_7 - IL_513e: ldloc.s V_6 - IL_5140: ldloc.s V_9 - IL_5142: bgt.s IL_518c - - IL_5144: ldloc.s V_10 - IL_5146: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_514b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5150: stloc.s V_6 - IL_5152: ldloc.s V_9 - IL_5154: call string [mscorlib]System.Convert::ToString(int32) - IL_5159: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_515e: stloc.s V_8 - IL_5160: ldloc.s V_9 - IL_5162: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5167: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_516c: stloc.s V_8 - IL_516e: ldloc.s V_9 - IL_5170: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5175: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_517a: stloc.s V_8 - IL_517c: ldloc.s V_9 - IL_517e: call string [mscorlib]System.Convert::ToString(int32) - IL_5183: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5188: stloc.s V_8 - IL_518a: br.s IL_51d2 - - IL_518c: ldloc.s V_7 - IL_518e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5193: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5198: stloc.s V_8 - IL_519a: ldloc.s V_10 - IL_519c: call string [mscorlib]System.Convert::ToString(int32) - IL_51a1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_51a6: stloc.s V_10 - IL_51a8: ldloc.s V_9 - IL_51aa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_51af: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_51b4: stloc.s V_7 - IL_51b6: ldloc.s V_8 - IL_51b8: call string [mscorlib]System.Convert::ToString(int32) - IL_51bd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_51c2: stloc.s V_9 - IL_51c4: ldloc.s V_6 - IL_51c6: call string [mscorlib]System.Convert::ToString(int32) - IL_51cb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_51d0: stloc.s V_6 - IL_51d2: ldloc.s V_8 - IL_51d4: ldloc.s V_8 - IL_51d6: blt.s IL_5220 - - IL_51d8: ldloc.s V_6 - IL_51da: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_51df: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_51e4: stloc.s V_7 - IL_51e6: ldloc.s V_8 - IL_51e8: call string [mscorlib]System.Convert::ToString(int32) - IL_51ed: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_51f2: stloc.s V_6 - IL_51f4: ldloc.s V_10 - IL_51f6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_51fb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5200: stloc.s V_6 - IL_5202: ldloc.s V_7 - IL_5204: call string [mscorlib]System.Convert::ToString(int32) - IL_5209: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_520e: stloc.s V_7 - IL_5210: ldloc.s V_10 - IL_5212: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5217: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_521c: stloc.s V_7 - IL_521e: br.s IL_5266 - - IL_5220: ldloc.s V_7 - IL_5222: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5227: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_522c: stloc.s V_10 - IL_522e: ldloc.s V_8 - IL_5230: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5235: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_523a: stloc.s V_7 - IL_523c: ldloc.s V_7 - IL_523e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5243: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5248: stloc.s V_9 - IL_524a: ldloc.s V_10 - IL_524c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5251: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5256: stloc.s V_6 - IL_5258: ldloc.s V_7 - IL_525a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_525f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5264: stloc.s V_7 - IL_5266: ldloc.s V_6 - IL_5268: ldloc.s V_9 - IL_526a: bgt.s IL_52b4 - - IL_526c: ldloc.s V_6 - IL_526e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5273: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5278: stloc.s V_6 - IL_527a: ldloc.s V_6 - IL_527c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5281: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5286: stloc.s V_9 - IL_5288: ldloc.s V_9 - IL_528a: call string [mscorlib]System.Convert::ToString(int32) - IL_528f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5294: stloc.s V_10 - IL_5296: ldloc.s V_7 - IL_5298: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_529d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_52a2: stloc.s V_6 - IL_52a4: ldloc.s V_7 - IL_52a6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_52ab: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_52b0: stloc.s V_8 - IL_52b2: br.s IL_52fa - - IL_52b4: ldloc.s V_10 - IL_52b6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_52bb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_52c0: stloc.s V_9 - IL_52c2: ldloc.s V_9 - IL_52c4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_52c9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_52ce: stloc.s V_10 - IL_52d0: ldloc.s V_9 - IL_52d2: call string [mscorlib]System.Convert::ToString(int32) - IL_52d7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_52dc: stloc.s V_6 - IL_52de: ldloc.s V_10 - IL_52e0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_52e5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_52ea: stloc.s V_9 - IL_52ec: ldloc.s V_8 - IL_52ee: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_52f3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_52f8: stloc.s V_8 - IL_52fa: ldloc.s V_9 - IL_52fc: ldloc.s V_8 - IL_52fe: bne.un.s IL_5348 - - IL_5300: ldloc.s V_6 - IL_5302: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5307: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_530c: stloc.s V_8 - IL_530e: ldloc.s V_8 - IL_5310: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5315: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_531a: stloc.s V_9 - IL_531c: ldloc.s V_6 - IL_531e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5323: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5328: stloc.s V_6 - IL_532a: ldloc.s V_10 - IL_532c: call string [mscorlib]System.Convert::ToString(int32) - IL_5331: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5336: stloc.s V_9 - IL_5338: ldloc.s V_8 - IL_533a: call string [mscorlib]System.Convert::ToString(int32) - IL_533f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5344: stloc.s V_6 - IL_5346: br.s IL_538e - - IL_5348: ldloc.s V_7 - IL_534a: call string [mscorlib]System.Convert::ToString(int32) - IL_534f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5354: stloc.s V_9 - IL_5356: ldloc.s V_6 - IL_5358: call string [mscorlib]System.Convert::ToString(int32) - IL_535d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5362: stloc.s V_7 - IL_5364: ldloc.s V_9 - IL_5366: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_536b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5370: stloc.s V_6 - IL_5372: ldloc.s V_7 - IL_5374: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5379: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_537e: stloc.s V_8 - IL_5380: ldloc.s V_9 - IL_5382: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5387: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_538c: stloc.s V_7 - IL_538e: ldloc.s V_7 - IL_5390: ldloc.s V_7 - IL_5392: bge.s IL_53dc - - IL_5394: ldloc.s V_7 - IL_5396: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_539b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_53a0: stloc.s V_9 - IL_53a2: ldloc.s V_9 - IL_53a4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_53a9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_53ae: stloc.s V_6 - IL_53b0: ldloc.s V_9 - IL_53b2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_53b7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_53bc: stloc.s V_8 - IL_53be: ldloc.s V_9 - IL_53c0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_53c5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_53ca: stloc.s V_8 - IL_53cc: ldloc.s V_7 - IL_53ce: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_53d3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_53d8: stloc.s V_10 - IL_53da: br.s IL_5422 - - IL_53dc: ldloc.s V_7 - IL_53de: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_53e3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_53e8: stloc.s V_8 - IL_53ea: ldloc.s V_6 - IL_53ec: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_53f1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_53f6: stloc.s V_7 - IL_53f8: ldloc.s V_6 - IL_53fa: call string [mscorlib]System.Convert::ToString(int32) - IL_53ff: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5404: stloc.s V_8 - IL_5406: ldloc.s V_8 - IL_5408: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_540d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5412: stloc.s V_7 - IL_5414: ldloc.s V_6 - IL_5416: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_541b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5420: stloc.s V_6 - IL_5422: ldloc.s V_8 - IL_5424: ldloc.s V_8 - IL_5426: blt.s IL_5470 - - IL_5428: ldloc.s V_10 - IL_542a: call string [mscorlib]System.Convert::ToString(int32) - IL_542f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5434: stloc.s V_8 - IL_5436: ldloc.s V_9 - IL_5438: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_543d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5442: stloc.s V_6 - IL_5444: ldloc.s V_9 - IL_5446: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_544b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5450: stloc.s V_8 - IL_5452: ldloc.s V_9 - IL_5454: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5459: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_545e: stloc.s V_7 - IL_5460: ldloc.s V_8 - IL_5462: call string [mscorlib]System.Convert::ToString(int32) - IL_5467: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_546c: stloc.s V_10 - IL_546e: br.s IL_54b6 - - IL_5470: ldloc.s V_8 - IL_5472: call string [mscorlib]System.Convert::ToString(int32) - IL_5477: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_547c: stloc.s V_6 - IL_547e: ldloc.s V_10 - IL_5480: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5485: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_548a: stloc.s V_7 - IL_548c: ldloc.s V_7 - IL_548e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5493: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5498: stloc.s V_6 - IL_549a: ldloc.s V_9 - IL_549c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_54a1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_54a6: stloc.s V_6 - IL_54a8: ldloc.s V_10 - IL_54aa: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_54af: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_54b4: stloc.s V_7 - IL_54b6: ldloc.s V_6 - IL_54b8: ldloc.s V_10 - IL_54ba: bne.un.s IL_5504 - - IL_54bc: ldloc.s V_10 - IL_54be: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_54c3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_54c8: stloc.s V_7 - IL_54ca: ldloc.s V_8 - IL_54cc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_54d1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_54d6: stloc.s V_8 - IL_54d8: ldloc.s V_9 - IL_54da: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_54df: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_54e4: stloc.s V_9 - IL_54e6: ldloc.s V_6 - IL_54e8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_54ed: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_54f2: stloc.s V_7 - IL_54f4: ldloc.s V_9 - IL_54f6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_54fb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5500: stloc.s V_7 - IL_5502: br.s IL_554a - - IL_5504: ldloc.s V_6 - IL_5506: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_550b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5510: stloc.s V_10 - IL_5512: ldloc.s V_8 - IL_5514: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5519: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_551e: stloc.s V_8 - IL_5520: ldloc.s V_8 - IL_5522: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5527: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_552c: stloc.s V_9 - IL_552e: ldloc.s V_9 - IL_5530: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5535: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_553a: stloc.s V_8 - IL_553c: ldloc.s V_7 - IL_553e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5543: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5548: stloc.s V_6 - IL_554a: ldloc.s V_8 - IL_554c: ldloc.s V_7 - IL_554e: bne.un.s IL_5598 - - IL_5550: ldloc.s V_7 - IL_5552: call string [mscorlib]System.Convert::ToString(int32) - IL_5557: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_555c: stloc.s V_10 - IL_555e: ldloc.s V_7 - IL_5560: call string [mscorlib]System.Convert::ToString(int32) - IL_5565: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_556a: stloc.s V_8 - IL_556c: ldloc.s V_7 - IL_556e: call string [mscorlib]System.Convert::ToString(int32) - IL_5573: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5578: stloc.s V_6 - IL_557a: ldloc.s V_10 - IL_557c: call string [mscorlib]System.Convert::ToString(int32) - IL_5581: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5586: stloc.s V_6 - IL_5588: ldloc.s V_7 - IL_558a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_558f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5594: stloc.s V_7 - IL_5596: br.s IL_55de - - IL_5598: ldloc.s V_8 - IL_559a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_559f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_55a4: stloc.s V_10 - IL_55a6: ldloc.s V_6 - IL_55a8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_55ad: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_55b2: stloc.s V_10 - IL_55b4: ldloc.s V_9 - IL_55b6: call string [mscorlib]System.Convert::ToString(int32) - IL_55bb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_55c0: stloc.s V_8 - IL_55c2: ldloc.s V_7 - IL_55c4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_55c9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_55ce: stloc.s V_8 - IL_55d0: ldloc.s V_9 - IL_55d2: call string [mscorlib]System.Convert::ToString(int32) - IL_55d7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_55dc: stloc.s V_9 - IL_55de: ldloc.s V_8 - IL_55e0: ldloc.s V_10 - IL_55e2: bge.s IL_562c - - IL_55e4: ldloc.s V_10 - IL_55e6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_55eb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_55f0: stloc.s V_9 - IL_55f2: ldloc.s V_8 - IL_55f4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_55f9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_55fe: stloc.s V_8 - IL_5600: ldloc.s V_7 - IL_5602: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5607: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_560c: stloc.s V_9 - IL_560e: ldloc.s V_9 - IL_5610: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5615: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_561a: stloc.s V_6 - IL_561c: ldloc.s V_6 - IL_561e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5623: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5628: stloc.s V_9 - IL_562a: br.s IL_5672 - - IL_562c: ldloc.s V_9 - IL_562e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5633: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5638: stloc.s V_7 - IL_563a: ldloc.s V_7 - IL_563c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5641: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5646: stloc.s V_10 - IL_5648: ldloc.s V_10 - IL_564a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_564f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5654: stloc.s V_6 - IL_5656: ldloc.s V_8 - IL_5658: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_565d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5662: stloc.s V_8 - IL_5664: ldloc.s V_6 - IL_5666: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_566b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5670: stloc.s V_10 - IL_5672: ldloc.s V_10 - IL_5674: ldloc.s V_6 - IL_5676: bgt.s IL_56c0 - - IL_5678: ldloc.s V_8 - IL_567a: call string [mscorlib]System.Convert::ToString(int32) - IL_567f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5684: stloc.s V_6 - IL_5686: ldloc.s V_10 - IL_5688: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_568d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5692: stloc.s V_8 - IL_5694: ldloc.s V_10 - IL_5696: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_569b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_56a0: stloc.s V_10 - IL_56a2: ldloc.s V_7 - IL_56a4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_56a9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_56ae: stloc.s V_10 - IL_56b0: ldloc.s V_9 - IL_56b2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_56b7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_56bc: stloc.s V_6 - IL_56be: br.s IL_5706 - - IL_56c0: ldloc.s V_7 - IL_56c2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_56c7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_56cc: stloc.s V_7 - IL_56ce: ldloc.s V_8 - IL_56d0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_56d5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_56da: stloc.s V_6 - IL_56dc: ldloc.s V_10 - IL_56de: call string [mscorlib]System.Convert::ToString(int32) - IL_56e3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_56e8: stloc.s V_8 - IL_56ea: ldloc.s V_8 - IL_56ec: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_56f1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_56f6: stloc.s V_6 - IL_56f8: ldloc.s V_6 - IL_56fa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_56ff: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5704: stloc.s V_10 - IL_5706: ldloc.s V_9 - IL_5708: ldloc.s V_8 - IL_570a: ble.s IL_5754 - - IL_570c: ldloc.s V_9 - IL_570e: call string [mscorlib]System.Convert::ToString(int32) - IL_5713: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5718: stloc.s V_9 - IL_571a: ldloc.s V_10 - IL_571c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5721: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5726: stloc.s V_9 - IL_5728: ldloc.s V_10 - IL_572a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_572f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5734: stloc.s V_9 - IL_5736: ldloc.s V_6 - IL_5738: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_573d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5742: stloc.s V_8 - IL_5744: ldloc.s V_6 - IL_5746: call string [mscorlib]System.Convert::ToString(int32) - IL_574b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5750: stloc.s V_8 - IL_5752: br.s IL_579a - - IL_5754: ldloc.s V_9 - IL_5756: call string [mscorlib]System.Convert::ToString(int32) - IL_575b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5760: stloc.s V_10 - IL_5762: ldloc.s V_8 - IL_5764: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5769: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_576e: stloc.s V_10 - IL_5770: ldloc.s V_10 - IL_5772: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5777: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_577c: stloc.s V_9 - IL_577e: ldloc.s V_8 - IL_5780: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5785: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_578a: stloc.s V_8 - IL_578c: ldloc.s V_7 - IL_578e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5793: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5798: stloc.s V_8 - IL_579a: ldloc.s V_10 - IL_579c: ldloc.s V_9 - IL_579e: bgt.s IL_57e8 - - IL_57a0: ldloc.s V_7 - IL_57a2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_57a7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_57ac: stloc.s V_9 - IL_57ae: ldloc.s V_9 - IL_57b0: call string [mscorlib]System.Convert::ToString(int32) - IL_57b5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_57ba: stloc.s V_10 - IL_57bc: ldloc.s V_8 - IL_57be: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_57c3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_57c8: stloc.s V_8 - IL_57ca: ldloc.s V_8 - IL_57cc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_57d1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_57d6: stloc.s V_8 - IL_57d8: ldloc.s V_8 - IL_57da: call string [mscorlib]System.Convert::ToString(int32) - IL_57df: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_57e4: stloc.s V_9 - IL_57e6: br.s IL_582e - - IL_57e8: ldloc.s V_6 - IL_57ea: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_57ef: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_57f4: stloc.s V_7 - IL_57f6: ldloc.s V_6 - IL_57f8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_57fd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5802: stloc.s V_8 - IL_5804: ldloc.s V_7 - IL_5806: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_580b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5810: stloc.s V_6 - IL_5812: ldloc.s V_8 - IL_5814: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5819: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_581e: stloc.s V_10 - IL_5820: ldloc.s V_10 - IL_5822: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5827: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_582c: stloc.s V_7 - IL_582e: ldloc.s V_9 - IL_5830: ldloc.s V_7 - IL_5832: bne.un.s IL_587c - - IL_5834: ldloc.s V_6 - IL_5836: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_583b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5840: stloc.s V_8 - IL_5842: ldloc.s V_6 - IL_5844: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5849: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_584e: stloc.s V_10 - IL_5850: ldloc.s V_7 - IL_5852: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5857: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_585c: stloc.s V_6 - IL_585e: ldloc.s V_7 - IL_5860: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5865: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_586a: stloc.s V_6 - IL_586c: ldloc.s V_10 - IL_586e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5873: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5878: stloc.s V_8 - IL_587a: br.s IL_58c2 - - IL_587c: ldloc.s V_6 - IL_587e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5883: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5888: stloc.s V_6 - IL_588a: ldloc.s V_9 - IL_588c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5891: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5896: stloc.s V_6 - IL_5898: ldloc.s V_8 - IL_589a: call string [mscorlib]System.Convert::ToString(int32) - IL_589f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_58a4: stloc.s V_8 - IL_58a6: ldloc.s V_9 - IL_58a8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_58ad: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_58b2: stloc.s V_6 - IL_58b4: ldloc.s V_10 - IL_58b6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_58bb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_58c0: stloc.s V_6 - IL_58c2: ldloc.s V_10 - IL_58c4: ldloc.s V_8 - IL_58c6: bgt.s IL_5910 - - IL_58c8: ldloc.s V_9 - IL_58ca: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_58cf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_58d4: stloc.s V_6 - IL_58d6: ldloc.s V_6 - IL_58d8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_58dd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_58e2: stloc.s V_7 - IL_58e4: ldloc.s V_9 - IL_58e6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_58eb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_58f0: stloc.s V_6 - IL_58f2: ldloc.s V_10 - IL_58f4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_58f9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_58fe: stloc.s V_10 - IL_5900: ldloc.s V_6 - IL_5902: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5907: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_590c: stloc.s V_10 - IL_590e: br.s IL_5956 - - IL_5910: ldloc.s V_6 - IL_5912: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5917: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_591c: stloc.s V_9 - IL_591e: ldloc.s V_9 - IL_5920: call string [mscorlib]System.Convert::ToString(int32) - IL_5925: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_592a: stloc.s V_9 - IL_592c: ldloc.s V_6 - IL_592e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5933: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5938: stloc.s V_9 - IL_593a: ldloc.s V_9 - IL_593c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5941: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5946: stloc.s V_9 - IL_5948: ldloc.s V_7 - IL_594a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_594f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5954: stloc.s V_8 - IL_5956: ldloc.s V_7 - IL_5958: ldloc.s V_7 - IL_595a: bge.s IL_59a4 - - IL_595c: ldloc.s V_9 - IL_595e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5963: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5968: stloc.s V_10 - IL_596a: ldloc.s V_9 - IL_596c: call string [mscorlib]System.Convert::ToString(int32) - IL_5971: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5976: stloc.s V_6 - IL_5978: ldloc.s V_10 - IL_597a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_597f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5984: stloc.s V_10 - IL_5986: ldloc.s V_9 - IL_5988: call string [mscorlib]System.Convert::ToString(int32) - IL_598d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5992: stloc.s V_10 - IL_5994: ldloc.s V_9 - IL_5996: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_599b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_59a0: stloc.s V_8 - IL_59a2: br.s IL_59ea - - IL_59a4: ldloc.s V_9 - IL_59a6: call string [mscorlib]System.Convert::ToString(int32) - IL_59ab: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_59b0: stloc.s V_8 - IL_59b2: ldloc.s V_7 - IL_59b4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_59b9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_59be: stloc.s V_9 - IL_59c0: ldloc.s V_7 - IL_59c2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_59c7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_59cc: stloc.s V_9 - IL_59ce: ldloc.s V_8 - IL_59d0: call string [mscorlib]System.Convert::ToString(int32) - IL_59d5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_59da: stloc.s V_9 - IL_59dc: ldloc.s V_7 - IL_59de: call string [mscorlib]System.Convert::ToString(int32) - IL_59e3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_59e8: stloc.s V_7 - IL_59ea: ldloc.s V_9 - IL_59ec: ldloc.s V_8 - IL_59ee: blt.s IL_5a38 - - IL_59f0: ldloc.s V_6 - IL_59f2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_59f7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_59fc: stloc.s V_9 - IL_59fe: ldloc.s V_9 - IL_5a00: call string [mscorlib]System.Convert::ToString(int32) - IL_5a05: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5a0a: stloc.s V_8 - IL_5a0c: ldloc.s V_8 - IL_5a0e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5a13: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5a18: stloc.s V_8 - IL_5a1a: ldloc.s V_7 - IL_5a1c: call string [mscorlib]System.Convert::ToString(int32) - IL_5a21: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5a26: stloc.s V_9 - IL_5a28: ldloc.s V_10 - IL_5a2a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5a2f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5a34: stloc.s V_7 - IL_5a36: br.s IL_5a7e - - IL_5a38: ldloc.s V_8 - IL_5a3a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5a3f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5a44: stloc.s V_6 - IL_5a46: ldloc.s V_8 - IL_5a48: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5a4d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5a52: stloc.s V_9 - IL_5a54: ldloc.s V_10 - IL_5a56: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5a5b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5a60: stloc.s V_10 - IL_5a62: ldloc.s V_10 - IL_5a64: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5a69: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5a6e: stloc.s V_7 - IL_5a70: ldloc.s V_8 - IL_5a72: call string [mscorlib]System.Convert::ToString(int32) - IL_5a77: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5a7c: stloc.s V_7 - IL_5a7e: ldloc.s V_8 - IL_5a80: ldloc.s V_6 - IL_5a82: blt.s IL_5acc - - IL_5a84: ldloc.s V_10 - IL_5a86: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5a8b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5a90: stloc.s V_6 - IL_5a92: ldloc.s V_10 - IL_5a94: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5a99: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5a9e: stloc.s V_9 - IL_5aa0: ldloc.s V_6 - IL_5aa2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5aa7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5aac: stloc.s V_10 - IL_5aae: ldloc.s V_9 - IL_5ab0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5ab5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5aba: stloc.s V_10 - IL_5abc: ldloc.s V_9 - IL_5abe: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5ac3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5ac8: stloc.s V_10 - IL_5aca: br.s IL_5b12 - - IL_5acc: ldloc.s V_9 - IL_5ace: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5ad3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5ad8: stloc.s V_9 - IL_5ada: ldloc.s V_6 - IL_5adc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5ae1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5ae6: stloc.s V_10 - IL_5ae8: ldloc.s V_6 - IL_5aea: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5aef: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5af4: stloc.s V_6 - IL_5af6: ldloc.s V_7 - IL_5af8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5afd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5b02: stloc.s V_6 - IL_5b04: ldloc.s V_6 - IL_5b06: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5b0b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5b10: stloc.s V_9 - IL_5b12: ldloc.s V_7 - IL_5b14: ldloc.s V_6 - IL_5b16: beq.s IL_5b60 - - IL_5b18: ldloc.s V_6 - IL_5b1a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5b1f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5b24: stloc.s V_7 - IL_5b26: ldloc.s V_6 - IL_5b28: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5b2d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5b32: stloc.s V_10 - IL_5b34: ldloc.s V_6 - IL_5b36: call string [mscorlib]System.Convert::ToString(int32) - IL_5b3b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5b40: stloc.s V_8 - IL_5b42: ldloc.s V_6 - IL_5b44: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5b49: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5b4e: stloc.s V_7 - IL_5b50: ldloc.s V_10 - IL_5b52: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5b57: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5b5c: stloc.s V_6 - IL_5b5e: br.s IL_5ba6 - - IL_5b60: ldloc.s V_7 - IL_5b62: call string [mscorlib]System.Convert::ToString(int32) - IL_5b67: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5b6c: stloc.s V_7 - IL_5b6e: ldloc.s V_9 - IL_5b70: call string [mscorlib]System.Convert::ToString(int32) - IL_5b75: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5b7a: stloc.s V_10 - IL_5b7c: ldloc.s V_6 - IL_5b7e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5b83: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5b88: stloc.s V_10 - IL_5b8a: ldloc.s V_9 - IL_5b8c: call string [mscorlib]System.Convert::ToString(int32) - IL_5b91: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5b96: stloc.s V_9 - IL_5b98: ldloc.s V_7 - IL_5b9a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5b9f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5ba4: stloc.s V_9 - IL_5ba6: ldloc.s V_6 - IL_5ba8: ldloc.s V_9 - IL_5baa: ble.s IL_5bf4 - - IL_5bac: ldloc.s V_7 - IL_5bae: call string [mscorlib]System.Convert::ToString(int32) - IL_5bb3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5bb8: stloc.s V_9 - IL_5bba: ldloc.s V_10 - IL_5bbc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5bc1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5bc6: stloc.s V_8 - IL_5bc8: ldloc.s V_6 - IL_5bca: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5bcf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5bd4: stloc.s V_8 - IL_5bd6: ldloc.s V_10 - IL_5bd8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5bdd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5be2: stloc.s V_6 - IL_5be4: ldloc.s V_9 - IL_5be6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5beb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5bf0: stloc.s V_6 - IL_5bf2: br.s IL_5c3a - - IL_5bf4: ldloc.s V_9 - IL_5bf6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5bfb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5c00: stloc.s V_7 - IL_5c02: ldloc.s V_9 - IL_5c04: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5c09: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5c0e: stloc.s V_10 - IL_5c10: ldloc.s V_6 - IL_5c12: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5c17: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5c1c: stloc.s V_8 - IL_5c1e: ldloc.s V_9 - IL_5c20: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5c25: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5c2a: stloc.s V_6 - IL_5c2c: ldloc.s V_8 - IL_5c2e: call string [mscorlib]System.Convert::ToString(int32) - IL_5c33: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5c38: stloc.s V_8 - IL_5c3a: ldloc.s V_7 - IL_5c3c: ldloc.s V_10 - IL_5c3e: beq.s IL_5c88 - - IL_5c40: ldloc.s V_9 - IL_5c42: call string [mscorlib]System.Convert::ToString(int32) - IL_5c47: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5c4c: stloc.s V_7 - IL_5c4e: ldloc.s V_9 - IL_5c50: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5c55: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5c5a: stloc.s V_9 - IL_5c5c: ldloc.s V_6 - IL_5c5e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5c63: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5c68: stloc.s V_7 - IL_5c6a: ldloc.s V_6 - IL_5c6c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5c71: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5c76: stloc.s V_8 - IL_5c78: ldloc.s V_9 - IL_5c7a: call string [mscorlib]System.Convert::ToString(int32) - IL_5c7f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5c84: stloc.s V_6 - IL_5c86: br.s IL_5cce - - IL_5c88: ldloc.s V_10 - IL_5c8a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5c8f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5c94: stloc.s V_10 - IL_5c96: ldloc.s V_10 - IL_5c98: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5c9d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5ca2: stloc.s V_8 - IL_5ca4: ldloc.s V_7 - IL_5ca6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5cab: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5cb0: stloc.s V_6 - IL_5cb2: ldloc.s V_8 - IL_5cb4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5cb9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5cbe: stloc.s V_7 - IL_5cc0: ldloc.s V_9 - IL_5cc2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5cc7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5ccc: stloc.s V_7 - IL_5cce: ldloc.s V_7 - IL_5cd0: ldloc.s V_8 - IL_5cd2: bne.un.s IL_5d1c - - IL_5cd4: ldloc.s V_8 - IL_5cd6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5cdb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5ce0: stloc.s V_6 - IL_5ce2: ldloc.s V_8 - IL_5ce4: call string [mscorlib]System.Convert::ToString(int32) - IL_5ce9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5cee: stloc.s V_6 - IL_5cf0: ldloc.s V_9 - IL_5cf2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5cf7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5cfc: stloc.s V_10 - IL_5cfe: ldloc.s V_9 - IL_5d00: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5d05: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5d0a: stloc.s V_8 - IL_5d0c: ldloc.s V_8 - IL_5d0e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5d13: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5d18: stloc.s V_10 - IL_5d1a: br.s IL_5d62 - - IL_5d1c: ldloc.s V_7 - IL_5d1e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5d23: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5d28: stloc.s V_6 - IL_5d2a: ldloc.s V_6 - IL_5d2c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5d31: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5d36: stloc.s V_9 - IL_5d38: ldloc.s V_7 - IL_5d3a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5d3f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5d44: stloc.s V_10 - IL_5d46: ldloc.s V_8 - IL_5d48: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5d4d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5d52: stloc.s V_7 - IL_5d54: ldloc.s V_7 - IL_5d56: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5d5b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5d60: stloc.s V_7 - IL_5d62: ldloc.s V_10 - IL_5d64: ldloc.s V_8 - IL_5d66: blt.s IL_5db0 - - IL_5d68: ldloc.s V_10 - IL_5d6a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5d6f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5d74: stloc.s V_9 - IL_5d76: ldloc.s V_10 - IL_5d78: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5d7d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5d82: stloc.s V_7 - IL_5d84: ldloc.s V_9 - IL_5d86: call string [mscorlib]System.Convert::ToString(int32) - IL_5d8b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5d90: stloc.s V_7 - IL_5d92: ldloc.s V_7 - IL_5d94: call string [mscorlib]System.Convert::ToString(int32) - IL_5d99: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5d9e: stloc.s V_6 - IL_5da0: ldloc.s V_7 - IL_5da2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5da7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5dac: stloc.s V_9 - IL_5dae: br.s IL_5df6 - - IL_5db0: ldloc.s V_8 - IL_5db2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5db7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5dbc: stloc.s V_6 - IL_5dbe: ldloc.s V_10 - IL_5dc0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5dc5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5dca: stloc.s V_8 - IL_5dcc: ldloc.s V_8 - IL_5dce: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5dd3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5dd8: stloc.s V_8 - IL_5dda: ldloc.s V_7 - IL_5ddc: call string [mscorlib]System.Convert::ToString(int32) - IL_5de1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5de6: stloc.s V_6 - IL_5de8: ldloc.s V_7 - IL_5dea: call string [mscorlib]System.Convert::ToString(int32) - IL_5def: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5df4: stloc.s V_6 - IL_5df6: ldloc.s V_6 - IL_5df8: ldloc.s V_6 - IL_5dfa: bgt.s IL_5e44 - - IL_5dfc: ldloc.s V_10 - IL_5dfe: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5e03: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5e08: stloc.s V_6 - IL_5e0a: ldloc.s V_8 - IL_5e0c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5e11: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5e16: stloc.s V_9 - IL_5e18: ldloc.s V_9 - IL_5e1a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5e1f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5e24: stloc.s V_8 - IL_5e26: ldloc.s V_9 - IL_5e28: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5e2d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5e32: stloc.s V_7 - IL_5e34: ldloc.s V_6 - IL_5e36: call string [mscorlib]System.Convert::ToString(int32) - IL_5e3b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5e40: stloc.s V_6 - IL_5e42: br.s IL_5e8a - - IL_5e44: ldloc.s V_10 - IL_5e46: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5e4b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5e50: stloc.s V_6 - IL_5e52: ldloc.s V_9 - IL_5e54: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5e59: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5e5e: stloc.s V_9 - IL_5e60: ldloc.s V_10 - IL_5e62: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5e67: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5e6c: stloc.s V_8 - IL_5e6e: ldloc.s V_7 - IL_5e70: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5e75: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5e7a: stloc.s V_7 - IL_5e7c: ldloc.s V_10 - IL_5e7e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5e83: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5e88: stloc.s V_8 - IL_5e8a: ldloc.s V_9 - IL_5e8c: ldloc.s V_8 - IL_5e8e: blt.s IL_5ed8 - - IL_5e90: ldloc.s V_6 - IL_5e92: call string [mscorlib]System.Convert::ToString(int32) - IL_5e97: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5e9c: stloc.s V_7 - IL_5e9e: ldloc.s V_7 - IL_5ea0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5ea5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5eaa: stloc.s V_8 - IL_5eac: ldloc.s V_9 - IL_5eae: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5eb3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5eb8: stloc.s V_6 - IL_5eba: ldloc.s V_7 - IL_5ebc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5ec1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5ec6: stloc.s V_7 - IL_5ec8: ldloc.s V_10 - IL_5eca: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5ecf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5ed4: stloc.s V_9 - IL_5ed6: br.s IL_5f1e - - IL_5ed8: ldloc.s V_8 - IL_5eda: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5edf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5ee4: stloc.s V_7 - IL_5ee6: ldloc.s V_10 - IL_5ee8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5eed: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5ef2: stloc.s V_7 - IL_5ef4: ldloc.s V_6 - IL_5ef6: call string [mscorlib]System.Convert::ToString(int32) - IL_5efb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5f00: stloc.s V_7 - IL_5f02: ldloc.s V_9 - IL_5f04: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5f09: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5f0e: stloc.s V_6 - IL_5f10: ldloc.s V_6 - IL_5f12: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5f17: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5f1c: stloc.s V_7 - IL_5f1e: ldloc.s V_10 - IL_5f20: ldloc.s V_7 - IL_5f22: bgt.s IL_5f6c - - IL_5f24: ldloc.s V_6 - IL_5f26: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5f2b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5f30: stloc.s V_7 - IL_5f32: ldloc.s V_10 - IL_5f34: call string [mscorlib]System.Convert::ToString(int32) - IL_5f39: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5f3e: stloc.s V_10 - IL_5f40: ldloc.s V_6 - IL_5f42: call string [mscorlib]System.Convert::ToString(int32) - IL_5f47: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5f4c: stloc.s V_9 - IL_5f4e: ldloc.s V_6 - IL_5f50: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5f55: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5f5a: stloc.s V_10 - IL_5f5c: ldloc.s V_6 - IL_5f5e: call string [mscorlib]System.Convert::ToString(int32) - IL_5f63: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5f68: stloc.s V_8 - IL_5f6a: br.s IL_5fb2 - - IL_5f6c: ldloc.s V_8 - IL_5f6e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5f73: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5f78: stloc.s V_7 - IL_5f7a: ldloc.s V_9 - IL_5f7c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5f81: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5f86: stloc.s V_8 - IL_5f88: ldloc.s V_10 - IL_5f8a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5f8f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5f94: stloc.s V_8 - IL_5f96: ldloc.s V_10 - IL_5f98: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5f9d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5fa2: stloc.s V_10 - IL_5fa4: ldloc.s V_10 - IL_5fa6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_5fab: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_5fb0: stloc.s V_8 - IL_5fb2: ldloc.s V_9 - IL_5fb4: ldloc.s V_6 - IL_5fb6: bne.un.s IL_6000 - - IL_5fb8: ldloc.s V_6 - IL_5fba: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5fbf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5fc4: stloc.s V_6 - IL_5fc6: ldloc.s V_6 - IL_5fc8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_5fcd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_5fd2: stloc.s V_10 - IL_5fd4: ldloc.s V_7 - IL_5fd6: call string [mscorlib]System.Convert::ToString(int32) - IL_5fdb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5fe0: stloc.s V_8 - IL_5fe2: ldloc.s V_8 - IL_5fe4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_5fe9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_5fee: stloc.s V_10 - IL_5ff0: ldloc.s V_10 - IL_5ff2: call string [mscorlib]System.Convert::ToString(int32) - IL_5ff7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_5ffc: stloc.s V_6 - IL_5ffe: br.s IL_6046 - - IL_6000: ldloc.s V_9 - IL_6002: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6007: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_600c: stloc.s V_8 - IL_600e: ldloc.s V_10 - IL_6010: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6015: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_601a: stloc.s V_8 - IL_601c: ldloc.s V_10 - IL_601e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6023: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6028: stloc.s V_8 - IL_602a: ldloc.s V_7 - IL_602c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6031: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6036: stloc.s V_6 - IL_6038: ldloc.s V_10 - IL_603a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_603f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6044: stloc.s V_6 - IL_6046: ldloc.s V_7 - IL_6048: ldloc.s V_7 - IL_604a: ble.s IL_6094 - - IL_604c: ldloc.s V_6 - IL_604e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6053: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6058: stloc.s V_10 - IL_605a: ldloc.s V_10 - IL_605c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6061: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6066: stloc.s V_6 - IL_6068: ldloc.s V_8 - IL_606a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_606f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6074: stloc.s V_7 - IL_6076: ldloc.s V_9 - IL_6078: call string [mscorlib]System.Convert::ToString(int32) - IL_607d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6082: stloc.s V_8 - IL_6084: ldloc.s V_9 - IL_6086: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_608b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6090: stloc.s V_8 - IL_6092: br.s IL_60da - - IL_6094: ldloc.s V_9 - IL_6096: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_609b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_60a0: stloc.s V_10 - IL_60a2: ldloc.s V_9 - IL_60a4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_60a9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_60ae: stloc.s V_7 - IL_60b0: ldloc.s V_9 - IL_60b2: call string [mscorlib]System.Convert::ToString(int32) - IL_60b7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_60bc: stloc.s V_7 - IL_60be: ldloc.s V_7 - IL_60c0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_60c5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_60ca: stloc.s V_7 - IL_60cc: ldloc.s V_9 - IL_60ce: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_60d3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_60d8: stloc.s V_9 - IL_60da: ldloc.s V_9 - IL_60dc: ldloc.s V_6 - IL_60de: blt.s IL_6128 - - IL_60e0: ldloc.s V_6 - IL_60e2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_60e7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_60ec: stloc.s V_6 - IL_60ee: ldloc.s V_9 - IL_60f0: call string [mscorlib]System.Convert::ToString(int32) - IL_60f5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_60fa: stloc.s V_10 - IL_60fc: ldloc.s V_6 - IL_60fe: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6103: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6108: stloc.s V_10 - IL_610a: ldloc.s V_6 - IL_610c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6111: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6116: stloc.s V_8 - IL_6118: ldloc.s V_6 - IL_611a: call string [mscorlib]System.Convert::ToString(int32) - IL_611f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6124: stloc.s V_6 - IL_6126: br.s IL_616e - - IL_6128: ldloc.s V_6 - IL_612a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_612f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6134: stloc.s V_9 - IL_6136: ldloc.s V_6 - IL_6138: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_613d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6142: stloc.s V_6 - IL_6144: ldloc.s V_10 - IL_6146: call string [mscorlib]System.Convert::ToString(int32) - IL_614b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6150: stloc.s V_9 - IL_6152: ldloc.s V_9 - IL_6154: call string [mscorlib]System.Convert::ToString(int32) - IL_6159: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_615e: stloc.s V_7 - IL_6160: ldloc.s V_8 - IL_6162: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6167: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_616c: stloc.s V_8 - IL_616e: ldloc.s V_6 - IL_6170: ldloc.s V_6 - IL_6172: bne.un.s IL_61bc - - IL_6174: ldloc.s V_9 - IL_6176: call string [mscorlib]System.Convert::ToString(int32) - IL_617b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6180: stloc.s V_9 - IL_6182: ldloc.s V_8 - IL_6184: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6189: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_618e: stloc.s V_9 - IL_6190: ldloc.s V_10 - IL_6192: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6197: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_619c: stloc.s V_6 - IL_619e: ldloc.s V_9 - IL_61a0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_61a5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_61aa: stloc.s V_8 - IL_61ac: ldloc.s V_6 - IL_61ae: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_61b3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_61b8: stloc.s V_9 - IL_61ba: br.s IL_6202 - - IL_61bc: ldloc.s V_7 - IL_61be: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_61c3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_61c8: stloc.s V_6 - IL_61ca: ldloc.s V_9 - IL_61cc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_61d1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_61d6: stloc.s V_9 - IL_61d8: ldloc.s V_9 - IL_61da: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_61df: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_61e4: stloc.s V_6 - IL_61e6: ldloc.s V_10 - IL_61e8: call string [mscorlib]System.Convert::ToString(int32) - IL_61ed: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_61f2: stloc.s V_7 - IL_61f4: ldloc.s V_10 - IL_61f6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_61fb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6200: stloc.s V_6 - IL_6202: ldloc.s V_9 - IL_6204: ldloc.s V_9 - IL_6206: bgt.s IL_6250 - - IL_6208: ldloc.s V_6 - IL_620a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_620f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6214: stloc.s V_6 - IL_6216: ldloc.s V_6 - IL_6218: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_621d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6222: stloc.s V_8 - IL_6224: ldloc.s V_8 - IL_6226: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_622b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6230: stloc.s V_8 - IL_6232: ldloc.s V_9 - IL_6234: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6239: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_623e: stloc.s V_6 - IL_6240: ldloc.s V_8 - IL_6242: call string [mscorlib]System.Convert::ToString(int32) - IL_6247: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_624c: stloc.s V_6 - IL_624e: br.s IL_6296 - - IL_6250: ldloc.s V_7 - IL_6252: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6257: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_625c: stloc.s V_8 - IL_625e: ldloc.s V_10 - IL_6260: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6265: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_626a: stloc.s V_6 - IL_626c: ldloc.s V_6 - IL_626e: call string [mscorlib]System.Convert::ToString(int32) - IL_6273: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6278: stloc.s V_7 - IL_627a: ldloc.s V_8 - IL_627c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6281: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6286: stloc.s V_6 - IL_6288: ldloc.s V_10 - IL_628a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_628f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6294: stloc.s V_8 - IL_6296: ldloc.s V_10 - IL_6298: ldloc.s V_7 - IL_629a: beq.s IL_62e4 - - IL_629c: ldloc.s V_6 - IL_629e: call string [mscorlib]System.Convert::ToString(int32) - IL_62a3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_62a8: stloc.s V_10 - IL_62aa: ldloc.s V_6 - IL_62ac: call string [mscorlib]System.Convert::ToString(int32) - IL_62b1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_62b6: stloc.s V_6 - IL_62b8: ldloc.s V_7 - IL_62ba: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_62bf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_62c4: stloc.s V_7 - IL_62c6: ldloc.s V_6 - IL_62c8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_62cd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_62d2: stloc.s V_7 - IL_62d4: ldloc.s V_10 - IL_62d6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_62db: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_62e0: stloc.s V_10 - IL_62e2: br.s IL_632a - - IL_62e4: ldloc.s V_6 - IL_62e6: call string [mscorlib]System.Convert::ToString(int32) - IL_62eb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_62f0: stloc.s V_8 - IL_62f2: ldloc.s V_8 - IL_62f4: call string [mscorlib]System.Convert::ToString(int32) - IL_62f9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_62fe: stloc.s V_9 - IL_6300: ldloc.s V_8 - IL_6302: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6307: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_630c: stloc.s V_10 - IL_630e: ldloc.s V_9 - IL_6310: call string [mscorlib]System.Convert::ToString(int32) - IL_6315: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_631a: stloc.s V_10 - IL_631c: ldloc.s V_10 - IL_631e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6323: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6328: stloc.s V_8 - IL_632a: ldloc.s V_7 - IL_632c: ldloc.s V_7 - IL_632e: bgt.s IL_6378 - - IL_6330: ldloc.s V_6 - IL_6332: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6337: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_633c: stloc.s V_8 - IL_633e: ldloc.s V_9 - IL_6340: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6345: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_634a: stloc.s V_8 - IL_634c: ldloc.s V_6 - IL_634e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6353: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6358: stloc.s V_6 - IL_635a: ldloc.s V_10 - IL_635c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6361: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6366: stloc.s V_8 - IL_6368: ldloc.s V_6 - IL_636a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_636f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6374: stloc.s V_6 - IL_6376: br.s IL_63be - - IL_6378: ldloc.s V_8 - IL_637a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_637f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6384: stloc.s V_9 - IL_6386: ldloc.s V_7 - IL_6388: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_638d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6392: stloc.s V_10 - IL_6394: ldloc.s V_10 - IL_6396: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_639b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_63a0: stloc.s V_9 - IL_63a2: ldloc.s V_6 - IL_63a4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_63a9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_63ae: stloc.s V_8 - IL_63b0: ldloc.s V_6 - IL_63b2: call string [mscorlib]System.Convert::ToString(int32) - IL_63b7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_63bc: stloc.s V_8 - IL_63be: ldloc.s V_9 - IL_63c0: ldloc.s V_8 - IL_63c2: blt.s IL_640c - - IL_63c4: ldloc.s V_6 - IL_63c6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_63cb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_63d0: stloc.s V_10 - IL_63d2: ldloc.s V_7 - IL_63d4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_63d9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_63de: stloc.s V_10 - IL_63e0: ldloc.s V_9 - IL_63e2: call string [mscorlib]System.Convert::ToString(int32) - IL_63e7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_63ec: stloc.s V_7 - IL_63ee: ldloc.s V_9 - IL_63f0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_63f5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_63fa: stloc.s V_7 - IL_63fc: ldloc.s V_8 - IL_63fe: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6403: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6408: stloc.s V_9 - IL_640a: br.s IL_6452 - - IL_640c: ldloc.s V_10 - IL_640e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6413: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6418: stloc.s V_8 - IL_641a: ldloc.s V_6 - IL_641c: call string [mscorlib]System.Convert::ToString(int32) - IL_6421: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6426: stloc.s V_7 - IL_6428: ldloc.s V_6 - IL_642a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_642f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6434: stloc.s V_10 - IL_6436: ldloc.s V_6 - IL_6438: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_643d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6442: stloc.s V_7 - IL_6444: ldloc.s V_6 - IL_6446: call string [mscorlib]System.Convert::ToString(int32) - IL_644b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6450: stloc.s V_9 - IL_6452: ldloc.s V_6 - IL_6454: ldloc.s V_7 - IL_6456: ble.s IL_64a0 - - IL_6458: ldloc.s V_9 - IL_645a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_645f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6464: stloc.s V_7 - IL_6466: ldloc.s V_6 - IL_6468: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_646d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6472: stloc.s V_6 - IL_6474: ldloc.s V_9 - IL_6476: call string [mscorlib]System.Convert::ToString(int32) - IL_647b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6480: stloc.s V_7 - IL_6482: ldloc.s V_10 - IL_6484: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6489: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_648e: stloc.s V_9 - IL_6490: ldloc.s V_7 - IL_6492: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6497: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_649c: stloc.s V_6 - IL_649e: br.s IL_64e6 - - IL_64a0: ldloc.s V_9 - IL_64a2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_64a7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_64ac: stloc.s V_9 - IL_64ae: ldloc.s V_6 - IL_64b0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_64b5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_64ba: stloc.s V_7 - IL_64bc: ldloc.s V_9 - IL_64be: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_64c3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_64c8: stloc.s V_8 - IL_64ca: ldloc.s V_6 - IL_64cc: call string [mscorlib]System.Convert::ToString(int32) - IL_64d1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_64d6: stloc.s V_10 - IL_64d8: ldloc.s V_6 - IL_64da: call string [mscorlib]System.Convert::ToString(int32) - IL_64df: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_64e4: stloc.s V_6 - IL_64e6: ldloc.s V_7 - IL_64e8: ldloc.s V_7 - IL_64ea: bgt.s IL_6534 - - IL_64ec: ldloc.s V_9 - IL_64ee: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_64f3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_64f8: stloc.s V_8 - IL_64fa: ldloc.s V_6 - IL_64fc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6501: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6506: stloc.s V_9 - IL_6508: ldloc.s V_10 - IL_650a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_650f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6514: stloc.s V_9 - IL_6516: ldloc.s V_8 - IL_6518: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_651d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6522: stloc.s V_7 - IL_6524: ldloc.s V_6 - IL_6526: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_652b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6530: stloc.s V_7 - IL_6532: br.s IL_657a - - IL_6534: ldloc.s V_8 - IL_6536: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_653b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6540: stloc.s V_10 - IL_6542: ldloc.s V_10 - IL_6544: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6549: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_654e: stloc.s V_8 - IL_6550: ldloc.s V_7 - IL_6552: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6557: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_655c: stloc.s V_7 - IL_655e: ldloc.s V_6 - IL_6560: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6565: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_656a: stloc.s V_6 - IL_656c: ldloc.s V_6 - IL_656e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6573: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6578: stloc.s V_6 - IL_657a: ldloc.s V_6 - IL_657c: ldloc.s V_6 - IL_657e: bne.un.s IL_65c8 - - IL_6580: ldloc.s V_9 - IL_6582: call string [mscorlib]System.Convert::ToString(int32) - IL_6587: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_658c: stloc.s V_8 - IL_658e: ldloc.s V_9 - IL_6590: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6595: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_659a: stloc.s V_9 - IL_659c: ldloc.s V_6 - IL_659e: call string [mscorlib]System.Convert::ToString(int32) - IL_65a3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_65a8: stloc.s V_9 - IL_65aa: ldloc.s V_9 - IL_65ac: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_65b1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_65b6: stloc.s V_6 - IL_65b8: ldloc.s V_8 - IL_65ba: call string [mscorlib]System.Convert::ToString(int32) - IL_65bf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_65c4: stloc.s V_6 - IL_65c6: br.s IL_660e - - IL_65c8: ldloc.s V_8 - IL_65ca: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_65cf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_65d4: stloc.s V_6 - IL_65d6: ldloc.s V_7 - IL_65d8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_65dd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_65e2: stloc.s V_8 - IL_65e4: ldloc.s V_8 - IL_65e6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_65eb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_65f0: stloc.s V_7 - IL_65f2: ldloc.s V_6 - IL_65f4: call string [mscorlib]System.Convert::ToString(int32) - IL_65f9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_65fe: stloc.s V_7 - IL_6600: ldloc.s V_9 - IL_6602: call string [mscorlib]System.Convert::ToString(int32) - IL_6607: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_660c: stloc.s V_10 - IL_660e: ldloc.s V_9 - IL_6610: ldloc.s V_6 - IL_6612: bne.un.s IL_665c - - IL_6614: ldloc.s V_8 - IL_6616: call string [mscorlib]System.Convert::ToString(int32) - IL_661b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6620: stloc.s V_7 - IL_6622: ldloc.s V_7 - IL_6624: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6629: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_662e: stloc.s V_8 - IL_6630: ldloc.s V_7 - IL_6632: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6637: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_663c: stloc.s V_9 - IL_663e: ldloc.s V_9 - IL_6640: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6645: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_664a: stloc.s V_9 - IL_664c: ldloc.s V_8 - IL_664e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6653: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6658: stloc.s V_9 - IL_665a: br.s IL_66a2 - - IL_665c: ldloc.s V_10 - IL_665e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6663: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6668: stloc.s V_9 - IL_666a: ldloc.s V_6 - IL_666c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6671: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6676: stloc.s V_9 - IL_6678: ldloc.s V_8 - IL_667a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_667f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6684: stloc.s V_9 - IL_6686: ldloc.s V_6 - IL_6688: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_668d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6692: stloc.s V_6 - IL_6694: ldloc.s V_6 - IL_6696: call string [mscorlib]System.Convert::ToString(int32) - IL_669b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_66a0: stloc.s V_8 - IL_66a2: ldloc.s V_7 - IL_66a4: ldloc.s V_8 - IL_66a6: blt.s IL_66f0 - - IL_66a8: ldloc.s V_6 - IL_66aa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_66af: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_66b4: stloc.s V_8 - IL_66b6: ldloc.s V_6 - IL_66b8: call string [mscorlib]System.Convert::ToString(int32) - IL_66bd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_66c2: stloc.s V_10 - IL_66c4: ldloc.s V_7 - IL_66c6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_66cb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_66d0: stloc.s V_6 - IL_66d2: ldloc.s V_9 - IL_66d4: call string [mscorlib]System.Convert::ToString(int32) - IL_66d9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_66de: stloc.s V_6 - IL_66e0: ldloc.s V_10 - IL_66e2: call string [mscorlib]System.Convert::ToString(int32) - IL_66e7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_66ec: stloc.s V_10 - IL_66ee: br.s IL_6736 - - IL_66f0: ldloc.s V_8 - IL_66f2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_66f7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_66fc: stloc.s V_9 - IL_66fe: ldloc.s V_8 - IL_6700: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6705: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_670a: stloc.s V_9 - IL_670c: ldloc.s V_8 - IL_670e: call string [mscorlib]System.Convert::ToString(int32) - IL_6713: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6718: stloc.s V_6 - IL_671a: ldloc.s V_9 - IL_671c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6721: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6726: stloc.s V_10 - IL_6728: ldloc.s V_6 - IL_672a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_672f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6734: stloc.s V_6 - IL_6736: ldloc.s V_7 - IL_6738: ldloc.s V_6 - IL_673a: bge.s IL_6784 - - IL_673c: ldloc.s V_6 - IL_673e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6743: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6748: stloc.s V_6 - IL_674a: ldloc.s V_8 - IL_674c: call string [mscorlib]System.Convert::ToString(int32) - IL_6751: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6756: stloc.s V_7 - IL_6758: ldloc.s V_7 - IL_675a: call string [mscorlib]System.Convert::ToString(int32) - IL_675f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6764: stloc.s V_10 - IL_6766: ldloc.s V_8 - IL_6768: call string [mscorlib]System.Convert::ToString(int32) - IL_676d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6772: stloc.s V_9 - IL_6774: ldloc.s V_9 - IL_6776: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_677b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6780: stloc.s V_10 - IL_6782: br.s IL_67ca - - IL_6784: ldloc.s V_8 - IL_6786: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_678b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6790: stloc.s V_7 - IL_6792: ldloc.s V_6 - IL_6794: call string [mscorlib]System.Convert::ToString(int32) - IL_6799: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_679e: stloc.s V_8 - IL_67a0: ldloc.s V_6 - IL_67a2: call string [mscorlib]System.Convert::ToString(int32) - IL_67a7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_67ac: stloc.s V_10 - IL_67ae: ldloc.s V_7 - IL_67b0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_67b5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_67ba: stloc.s V_9 - IL_67bc: ldloc.s V_9 - IL_67be: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_67c3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_67c8: stloc.s V_8 - IL_67ca: ldloc.s V_10 - IL_67cc: ldloc.s V_7 - IL_67ce: bge.s IL_6818 - - IL_67d0: ldloc.s V_9 - IL_67d2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_67d7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_67dc: stloc.s V_9 - IL_67de: ldloc.s V_8 - IL_67e0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_67e5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_67ea: stloc.s V_10 - IL_67ec: ldloc.s V_8 - IL_67ee: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_67f3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_67f8: stloc.s V_6 - IL_67fa: ldloc.s V_6 - IL_67fc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6801: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6806: stloc.s V_7 - IL_6808: ldloc.s V_10 - IL_680a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_680f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6814: stloc.s V_10 - IL_6816: br.s IL_685e - - IL_6818: ldloc.s V_7 - IL_681a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_681f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6824: stloc.s V_6 - IL_6826: ldloc.s V_9 - IL_6828: call string [mscorlib]System.Convert::ToString(int32) - IL_682d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6832: stloc.s V_8 - IL_6834: ldloc.s V_8 - IL_6836: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_683b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6840: stloc.s V_10 - IL_6842: ldloc.s V_9 - IL_6844: call string [mscorlib]System.Convert::ToString(int32) - IL_6849: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_684e: stloc.s V_10 - IL_6850: ldloc.s V_8 - IL_6852: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6857: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_685c: stloc.s V_6 - IL_685e: ldloc.s V_8 - IL_6860: ldloc.s V_9 - IL_6862: blt.s IL_68ac - - IL_6864: ldloc.s V_8 - IL_6866: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_686b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6870: stloc.s V_7 - IL_6872: ldloc.s V_8 - IL_6874: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6879: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_687e: stloc.s V_10 - IL_6880: ldloc.s V_9 - IL_6882: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6887: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_688c: stloc.s V_6 - IL_688e: ldloc.s V_7 - IL_6890: call string [mscorlib]System.Convert::ToString(int32) - IL_6895: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_689a: stloc.s V_8 - IL_689c: ldloc.s V_10 - IL_689e: call string [mscorlib]System.Convert::ToString(int32) - IL_68a3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_68a8: stloc.s V_10 - IL_68aa: br.s IL_68f2 - - IL_68ac: ldloc.s V_6 - IL_68ae: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_68b3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_68b8: stloc.s V_7 - IL_68ba: ldloc.s V_6 - IL_68bc: call string [mscorlib]System.Convert::ToString(int32) - IL_68c1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_68c6: stloc.s V_8 - IL_68c8: ldloc.s V_9 - IL_68ca: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_68cf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_68d4: stloc.s V_8 - IL_68d6: ldloc.s V_9 - IL_68d8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_68dd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_68e2: stloc.s V_6 - IL_68e4: ldloc.s V_8 - IL_68e6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_68eb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_68f0: stloc.s V_9 - IL_68f2: ldloc.s V_10 - IL_68f4: ldloc.s V_10 - IL_68f6: ble.s IL_6940 - - IL_68f8: ldloc.s V_10 - IL_68fa: call string [mscorlib]System.Convert::ToString(int32) - IL_68ff: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6904: stloc.s V_8 - IL_6906: ldloc.s V_8 - IL_6908: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_690d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6912: stloc.s V_8 - IL_6914: ldloc.s V_7 - IL_6916: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_691b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6920: stloc.s V_9 - IL_6922: ldloc.s V_7 - IL_6924: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6929: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_692e: stloc.s V_6 - IL_6930: ldloc.s V_10 - IL_6932: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6937: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_693c: stloc.s V_7 - IL_693e: br.s IL_6986 - - IL_6940: ldloc.s V_6 - IL_6942: call string [mscorlib]System.Convert::ToString(int32) - IL_6947: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_694c: stloc.s V_9 - IL_694e: ldloc.s V_9 - IL_6950: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6955: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_695a: stloc.s V_8 - IL_695c: ldloc.s V_7 - IL_695e: call string [mscorlib]System.Convert::ToString(int32) - IL_6963: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6968: stloc.s V_9 - IL_696a: ldloc.s V_8 - IL_696c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6971: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6976: stloc.s V_10 - IL_6978: ldloc.s V_7 - IL_697a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_697f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6984: stloc.s V_10 - IL_6986: ldloc.s V_8 - IL_6988: ldloc.s V_10 - IL_698a: ble.s IL_69d4 - - IL_698c: ldloc.s V_6 - IL_698e: call string [mscorlib]System.Convert::ToString(int32) - IL_6993: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6998: stloc.s V_8 - IL_699a: ldloc.s V_6 - IL_699c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_69a1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_69a6: stloc.s V_10 - IL_69a8: ldloc.s V_7 - IL_69aa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_69af: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_69b4: stloc.s V_8 - IL_69b6: ldloc.s V_8 - IL_69b8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_69bd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_69c2: stloc.s V_9 - IL_69c4: ldloc.s V_9 - IL_69c6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_69cb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_69d0: stloc.s V_7 - IL_69d2: br.s IL_6a1a - - IL_69d4: ldloc.s V_7 - IL_69d6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_69db: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_69e0: stloc.s V_9 - IL_69e2: ldloc.s V_10 - IL_69e4: call string [mscorlib]System.Convert::ToString(int32) - IL_69e9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_69ee: stloc.s V_7 - IL_69f0: ldloc.s V_10 - IL_69f2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_69f7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_69fc: stloc.s V_6 - IL_69fe: ldloc.s V_7 - IL_6a00: call string [mscorlib]System.Convert::ToString(int32) - IL_6a05: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6a0a: stloc.s V_9 - IL_6a0c: ldloc.s V_6 - IL_6a0e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6a13: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6a18: stloc.s V_6 - IL_6a1a: ldloc.s V_10 - IL_6a1c: ldloc.s V_9 - IL_6a1e: beq.s IL_6a68 - - IL_6a20: ldloc.s V_8 - IL_6a22: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6a27: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6a2c: stloc.s V_8 - IL_6a2e: ldloc.s V_9 - IL_6a30: call string [mscorlib]System.Convert::ToString(int32) - IL_6a35: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6a3a: stloc.s V_10 - IL_6a3c: ldloc.s V_6 - IL_6a3e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6a43: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6a48: stloc.s V_6 - IL_6a4a: ldloc.s V_6 - IL_6a4c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6a51: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6a56: stloc.s V_8 - IL_6a58: ldloc.s V_6 - IL_6a5a: call string [mscorlib]System.Convert::ToString(int32) - IL_6a5f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6a64: stloc.s V_9 - IL_6a66: br.s IL_6aae - - IL_6a68: ldloc.s V_6 - IL_6a6a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6a6f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6a74: stloc.s V_9 - IL_6a76: ldloc.s V_10 - IL_6a78: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6a7d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6a82: stloc.s V_6 - IL_6a84: ldloc.s V_9 - IL_6a86: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6a8b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6a90: stloc.s V_6 - IL_6a92: ldloc.s V_8 - IL_6a94: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6a99: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6a9e: stloc.s V_6 - IL_6aa0: ldloc.s V_10 - IL_6aa2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6aa7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6aac: stloc.s V_9 - IL_6aae: ldloc.s V_10 - IL_6ab0: ldloc.s V_8 - IL_6ab2: ble.s IL_6afc - - IL_6ab4: ldloc.s V_10 - IL_6ab6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6abb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6ac0: stloc.s V_10 - IL_6ac2: ldloc.s V_7 - IL_6ac4: call string [mscorlib]System.Convert::ToString(int32) - IL_6ac9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6ace: stloc.s V_6 - IL_6ad0: ldloc.s V_9 - IL_6ad2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6ad7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6adc: stloc.s V_8 - IL_6ade: ldloc.s V_10 - IL_6ae0: call string [mscorlib]System.Convert::ToString(int32) - IL_6ae5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6aea: stloc.s V_9 - IL_6aec: ldloc.s V_10 - IL_6aee: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6af3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6af8: stloc.s V_10 - IL_6afa: br.s IL_6b42 - - IL_6afc: ldloc.s V_9 - IL_6afe: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6b03: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6b08: stloc.s V_7 - IL_6b0a: ldloc.s V_6 - IL_6b0c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6b11: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6b16: stloc.s V_6 - IL_6b18: ldloc.s V_8 - IL_6b1a: call string [mscorlib]System.Convert::ToString(int32) - IL_6b1f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6b24: stloc.s V_10 - IL_6b26: ldloc.s V_8 - IL_6b28: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6b2d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6b32: stloc.s V_10 - IL_6b34: ldloc.s V_8 - IL_6b36: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6b3b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6b40: stloc.s V_7 - IL_6b42: ldloc.s V_7 - IL_6b44: ldloc.s V_10 - IL_6b46: bge.s IL_6b90 - - IL_6b48: ldloc.s V_9 - IL_6b4a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6b4f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6b54: stloc.s V_9 - IL_6b56: ldloc.s V_8 - IL_6b58: call string [mscorlib]System.Convert::ToString(int32) - IL_6b5d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6b62: stloc.s V_6 - IL_6b64: ldloc.s V_8 - IL_6b66: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6b6b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6b70: stloc.s V_9 - IL_6b72: ldloc.s V_9 - IL_6b74: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6b79: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6b7e: stloc.s V_6 - IL_6b80: ldloc.s V_6 - IL_6b82: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6b87: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6b8c: stloc.s V_9 - IL_6b8e: br.s IL_6bd6 - - IL_6b90: ldloc.s V_7 - IL_6b92: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6b97: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6b9c: stloc.s V_8 - IL_6b9e: ldloc.s V_10 - IL_6ba0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6ba5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6baa: stloc.s V_7 - IL_6bac: ldloc.s V_7 - IL_6bae: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6bb3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6bb8: stloc.s V_7 - IL_6bba: ldloc.s V_10 - IL_6bbc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6bc1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6bc6: stloc.s V_7 - IL_6bc8: ldloc.s V_10 - IL_6bca: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6bcf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6bd4: stloc.s V_10 - IL_6bd6: ldloc.s V_8 - IL_6bd8: ldloc.s V_7 - IL_6bda: bge.s IL_6c24 - - IL_6bdc: ldloc.s V_7 - IL_6bde: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6be3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6be8: stloc.s V_6 - IL_6bea: ldloc.s V_9 - IL_6bec: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6bf1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6bf6: stloc.s V_7 - IL_6bf8: ldloc.s V_8 - IL_6bfa: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6bff: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6c04: stloc.s V_6 - IL_6c06: ldloc.s V_7 - IL_6c08: call string [mscorlib]System.Convert::ToString(int32) - IL_6c0d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6c12: stloc.s V_9 - IL_6c14: ldloc.s V_8 - IL_6c16: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6c1b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6c20: stloc.s V_10 - IL_6c22: br.s IL_6c6a - - IL_6c24: ldloc.s V_6 - IL_6c26: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6c2b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6c30: stloc.s V_7 - IL_6c32: ldloc.s V_7 - IL_6c34: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6c39: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6c3e: stloc.s V_7 - IL_6c40: ldloc.s V_9 - IL_6c42: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6c47: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6c4c: stloc.s V_6 - IL_6c4e: ldloc.s V_7 - IL_6c50: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6c55: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6c5a: stloc.s V_8 - IL_6c5c: ldloc.s V_6 - IL_6c5e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6c63: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6c68: stloc.s V_9 - IL_6c6a: ldloc.s V_10 - IL_6c6c: ldloc.s V_10 - IL_6c6e: bgt.s IL_6cb8 - - IL_6c70: ldloc.s V_6 - IL_6c72: call string [mscorlib]System.Convert::ToString(int32) - IL_6c77: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6c7c: stloc.s V_8 - IL_6c7e: ldloc.s V_6 - IL_6c80: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6c85: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6c8a: stloc.s V_9 - IL_6c8c: ldloc.s V_10 - IL_6c8e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6c93: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6c98: stloc.s V_9 - IL_6c9a: ldloc.s V_7 - IL_6c9c: call string [mscorlib]System.Convert::ToString(int32) - IL_6ca1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6ca6: stloc.s V_8 - IL_6ca8: ldloc.s V_6 - IL_6caa: call string [mscorlib]System.Convert::ToString(int32) - IL_6caf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6cb4: stloc.s V_6 - IL_6cb6: br.s IL_6cfe - - IL_6cb8: ldloc.s V_8 - IL_6cba: call string [mscorlib]System.Convert::ToString(int32) - IL_6cbf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6cc4: stloc.s V_7 - IL_6cc6: ldloc.s V_8 - IL_6cc8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6ccd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6cd2: stloc.s V_10 - IL_6cd4: ldloc.s V_10 - IL_6cd6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6cdb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6ce0: stloc.s V_10 - IL_6ce2: ldloc.s V_8 - IL_6ce4: call string [mscorlib]System.Convert::ToString(int32) - IL_6ce9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6cee: stloc.s V_8 - IL_6cf0: ldloc.s V_8 - IL_6cf2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6cf7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6cfc: stloc.s V_7 - IL_6cfe: ldloc.s V_6 - IL_6d00: ldloc.s V_9 - IL_6d02: bge.s IL_6d4c - - IL_6d04: ldloc.s V_8 - IL_6d06: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6d0b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6d10: stloc.s V_7 - IL_6d12: ldloc.s V_9 - IL_6d14: call string [mscorlib]System.Convert::ToString(int32) - IL_6d19: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6d1e: stloc.s V_8 - IL_6d20: ldloc.s V_8 - IL_6d22: call string [mscorlib]System.Convert::ToString(int32) - IL_6d27: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6d2c: stloc.s V_10 - IL_6d2e: ldloc.s V_9 - IL_6d30: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6d35: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6d3a: stloc.s V_8 - IL_6d3c: ldloc.s V_7 - IL_6d3e: call string [mscorlib]System.Convert::ToString(int32) - IL_6d43: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6d48: stloc.s V_8 - IL_6d4a: br.s IL_6d92 - - IL_6d4c: ldloc.s V_7 - IL_6d4e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6d53: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6d58: stloc.s V_6 - IL_6d5a: ldloc.s V_6 - IL_6d5c: call string [mscorlib]System.Convert::ToString(int32) - IL_6d61: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6d66: stloc.s V_9 - IL_6d68: ldloc.s V_9 - IL_6d6a: call string [mscorlib]System.Convert::ToString(int32) - IL_6d6f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6d74: stloc.s V_7 - IL_6d76: ldloc.s V_8 - IL_6d78: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6d7d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6d82: stloc.s V_7 - IL_6d84: ldloc.s V_10 - IL_6d86: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6d8b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6d90: stloc.s V_9 - IL_6d92: ldloc.s V_7 - IL_6d94: ldloc.s V_8 - IL_6d96: blt.s IL_6de0 - - IL_6d98: ldloc.s V_7 - IL_6d9a: call string [mscorlib]System.Convert::ToString(int32) - IL_6d9f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6da4: stloc.s V_9 - IL_6da6: ldloc.s V_10 - IL_6da8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6dad: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6db2: stloc.s V_9 - IL_6db4: ldloc.s V_7 - IL_6db6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6dbb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6dc0: stloc.s V_10 - IL_6dc2: ldloc.s V_8 - IL_6dc4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6dc9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6dce: stloc.s V_10 - IL_6dd0: ldloc.s V_6 - IL_6dd2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6dd7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6ddc: stloc.s V_6 - IL_6dde: br.s IL_6e26 - - IL_6de0: ldloc.s V_6 - IL_6de2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6de7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6dec: stloc.s V_7 - IL_6dee: ldloc.s V_8 - IL_6df0: call string [mscorlib]System.Convert::ToString(int32) - IL_6df5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6dfa: stloc.s V_6 - IL_6dfc: ldloc.s V_9 - IL_6dfe: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6e03: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6e08: stloc.s V_9 - IL_6e0a: ldloc.s V_8 - IL_6e0c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6e11: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6e16: stloc.s V_10 - IL_6e18: ldloc.s V_7 - IL_6e1a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6e1f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6e24: stloc.s V_6 - IL_6e26: ldloc.s V_6 - IL_6e28: ldloc.s V_7 - IL_6e2a: bne.un.s IL_6e74 - - IL_6e2c: ldloc.s V_9 - IL_6e2e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6e33: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6e38: stloc.s V_7 - IL_6e3a: ldloc.s V_7 - IL_6e3c: call string [mscorlib]System.Convert::ToString(int32) - IL_6e41: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6e46: stloc.s V_10 - IL_6e48: ldloc.s V_9 - IL_6e4a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6e4f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6e54: stloc.s V_7 - IL_6e56: ldloc.s V_6 - IL_6e58: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6e5d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6e62: stloc.s V_9 - IL_6e64: ldloc.s V_6 - IL_6e66: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6e6b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6e70: stloc.s V_6 - IL_6e72: br.s IL_6eba - - IL_6e74: ldloc.s V_6 - IL_6e76: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6e7b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6e80: stloc.s V_8 - IL_6e82: ldloc.s V_9 - IL_6e84: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6e89: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6e8e: stloc.s V_9 - IL_6e90: ldloc.s V_9 - IL_6e92: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6e97: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6e9c: stloc.s V_10 - IL_6e9e: ldloc.s V_9 - IL_6ea0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6ea5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6eaa: stloc.s V_8 - IL_6eac: ldloc.s V_10 - IL_6eae: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6eb3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6eb8: stloc.s V_8 - IL_6eba: ldloc.s V_7 - IL_6ebc: ldloc.s V_7 - IL_6ebe: beq.s IL_6f08 - - IL_6ec0: ldloc.s V_6 - IL_6ec2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6ec7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6ecc: stloc.s V_7 - IL_6ece: ldloc.s V_8 - IL_6ed0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6ed5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6eda: stloc.s V_7 - IL_6edc: ldloc.s V_9 - IL_6ede: call string [mscorlib]System.Convert::ToString(int32) - IL_6ee3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6ee8: stloc.s V_10 - IL_6eea: ldloc.s V_9 - IL_6eec: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6ef1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6ef6: stloc.s V_10 - IL_6ef8: ldloc.s V_6 - IL_6efa: call string [mscorlib]System.Convert::ToString(int32) - IL_6eff: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6f04: stloc.s V_8 - IL_6f06: br.s IL_6f4e - - IL_6f08: ldloc.s V_9 - IL_6f0a: call string [mscorlib]System.Convert::ToString(int32) - IL_6f0f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6f14: stloc.s V_7 - IL_6f16: ldloc.s V_10 - IL_6f18: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6f1d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6f22: stloc.s V_6 - IL_6f24: ldloc.s V_10 - IL_6f26: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6f2b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6f30: stloc.s V_9 - IL_6f32: ldloc.s V_9 - IL_6f34: call string [mscorlib]System.Convert::ToString(int32) - IL_6f39: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6f3e: stloc.s V_6 - IL_6f40: ldloc.s V_6 - IL_6f42: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6f47: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6f4c: stloc.s V_8 - IL_6f4e: ldloc.s V_10 - IL_6f50: ldloc.s V_6 - IL_6f52: bne.un.s IL_6f9c - - IL_6f54: ldloc.s V_7 - IL_6f56: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6f5b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6f60: stloc.s V_10 - IL_6f62: ldloc.s V_7 - IL_6f64: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6f69: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6f6e: stloc.s V_10 - IL_6f70: ldloc.s V_8 - IL_6f72: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6f77: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6f7c: stloc.s V_9 - IL_6f7e: ldloc.s V_6 - IL_6f80: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6f85: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6f8a: stloc.s V_10 - IL_6f8c: ldloc.s V_6 - IL_6f8e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_6f93: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_6f98: stloc.s V_10 - IL_6f9a: br.s IL_6fe2 - - IL_6f9c: ldloc.s V_6 - IL_6f9e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6fa3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6fa8: stloc.s V_9 - IL_6faa: ldloc.s V_6 - IL_6fac: call string [mscorlib]System.Convert::ToString(int32) - IL_6fb1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6fb6: stloc.s V_6 - IL_6fb8: ldloc.s V_8 - IL_6fba: call string [mscorlib]System.Convert::ToString(int32) - IL_6fbf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6fc4: stloc.s V_8 - IL_6fc6: ldloc.s V_9 - IL_6fc8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_6fcd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_6fd2: stloc.s V_7 - IL_6fd4: ldloc.s V_10 - IL_6fd6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6fdb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_6fe0: stloc.s V_10 - IL_6fe2: ldloc.s V_6 - IL_6fe4: ldloc.s V_10 - IL_6fe6: bne.un.s IL_7030 - - IL_6fe8: ldloc.s V_10 - IL_6fea: call string [mscorlib]System.Convert::ToString(int32) - IL_6fef: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_6ff4: stloc.s V_9 - IL_6ff6: ldloc.s V_8 - IL_6ff8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_6ffd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7002: stloc.s V_9 - IL_7004: ldloc.s V_7 - IL_7006: call string [mscorlib]System.Convert::ToString(int32) - IL_700b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7010: stloc.s V_8 - IL_7012: ldloc.s V_8 - IL_7014: call string [mscorlib]System.Convert::ToString(int32) - IL_7019: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_701e: stloc.s V_7 - IL_7020: ldloc.s V_8 - IL_7022: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7027: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_702c: stloc.s V_10 - IL_702e: br.s IL_7076 - - IL_7030: ldloc.s V_8 - IL_7032: call string [mscorlib]System.Convert::ToString(int32) - IL_7037: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_703c: stloc.s V_9 - IL_703e: ldloc.s V_6 - IL_7040: call string [mscorlib]System.Convert::ToString(int32) - IL_7045: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_704a: stloc.s V_10 - IL_704c: ldloc.s V_6 - IL_704e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7053: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7058: stloc.s V_6 - IL_705a: ldloc.s V_10 - IL_705c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7061: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7066: stloc.s V_10 - IL_7068: ldloc.s V_8 - IL_706a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_706f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7074: stloc.s V_8 - IL_7076: ldloc.s V_7 - IL_7078: ldloc.s V_10 - IL_707a: bgt.s IL_70c4 - - IL_707c: ldloc.s V_7 - IL_707e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7083: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7088: stloc.s V_6 - IL_708a: ldloc.s V_10 - IL_708c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7091: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7096: stloc.s V_6 - IL_7098: ldloc.s V_6 - IL_709a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_709f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_70a4: stloc.s V_9 - IL_70a6: ldloc.s V_10 - IL_70a8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_70ad: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_70b2: stloc.s V_9 - IL_70b4: ldloc.s V_10 - IL_70b6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_70bb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_70c0: stloc.s V_10 - IL_70c2: br.s IL_710a - - IL_70c4: ldloc.s V_8 - IL_70c6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_70cb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_70d0: stloc.s V_6 - IL_70d2: ldloc.s V_8 - IL_70d4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_70d9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_70de: stloc.s V_7 - IL_70e0: ldloc.s V_6 - IL_70e2: call string [mscorlib]System.Convert::ToString(int32) - IL_70e7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_70ec: stloc.s V_9 - IL_70ee: ldloc.s V_8 - IL_70f0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_70f5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_70fa: stloc.s V_9 - IL_70fc: ldloc.s V_9 - IL_70fe: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7103: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7108: stloc.s V_9 - IL_710a: ldloc.s V_9 - IL_710c: ldloc.s V_8 - IL_710e: beq.s IL_7158 - - IL_7110: ldloc.s V_6 - IL_7112: call string [mscorlib]System.Convert::ToString(int32) - IL_7117: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_711c: stloc.s V_8 - IL_711e: ldloc.s V_9 - IL_7120: call string [mscorlib]System.Convert::ToString(int32) - IL_7125: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_712a: stloc.s V_7 - IL_712c: ldloc.s V_10 - IL_712e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7133: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7138: stloc.s V_9 - IL_713a: ldloc.s V_7 - IL_713c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7141: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7146: stloc.s V_6 - IL_7148: ldloc.s V_7 - IL_714a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_714f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7154: stloc.s V_7 - IL_7156: br.s IL_719e - - IL_7158: ldloc.s V_9 - IL_715a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_715f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7164: stloc.s V_10 - IL_7166: ldloc.s V_8 - IL_7168: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_716d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7172: stloc.s V_10 - IL_7174: ldloc.s V_8 - IL_7176: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_717b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7180: stloc.s V_8 - IL_7182: ldloc.s V_7 - IL_7184: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7189: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_718e: stloc.s V_6 - IL_7190: ldloc.s V_10 - IL_7192: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7197: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_719c: stloc.s V_8 - IL_719e: ldloc.s V_9 - IL_71a0: ldloc.s V_8 - IL_71a2: blt.s IL_71ec - - IL_71a4: ldloc.s V_9 - IL_71a6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_71ab: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_71b0: stloc.s V_8 - IL_71b2: ldloc.s V_8 - IL_71b4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_71b9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_71be: stloc.s V_10 - IL_71c0: ldloc.s V_9 - IL_71c2: call string [mscorlib]System.Convert::ToString(int32) - IL_71c7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_71cc: stloc.s V_10 - IL_71ce: ldloc.s V_7 - IL_71d0: call string [mscorlib]System.Convert::ToString(int32) - IL_71d5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_71da: stloc.s V_8 - IL_71dc: ldloc.s V_10 - IL_71de: call string [mscorlib]System.Convert::ToString(int32) - IL_71e3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_71e8: stloc.s V_10 - IL_71ea: br.s IL_7232 - - IL_71ec: ldloc.s V_8 - IL_71ee: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_71f3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_71f8: stloc.s V_6 - IL_71fa: ldloc.s V_7 - IL_71fc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7201: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7206: stloc.s V_6 - IL_7208: ldloc.s V_7 - IL_720a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_720f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7214: stloc.s V_6 - IL_7216: ldloc.s V_6 - IL_7218: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_721d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7222: stloc.s V_8 - IL_7224: ldloc.s V_7 - IL_7226: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_722b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7230: stloc.s V_8 - IL_7232: ldloc.s V_9 - IL_7234: ldloc.s V_9 - IL_7236: beq.s IL_7280 - - IL_7238: ldloc.s V_8 - IL_723a: call string [mscorlib]System.Convert::ToString(int32) - IL_723f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7244: stloc.s V_10 - IL_7246: ldloc.s V_9 - IL_7248: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_724d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7252: stloc.s V_8 - IL_7254: ldloc.s V_9 - IL_7256: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_725b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7260: stloc.s V_7 - IL_7262: ldloc.s V_9 - IL_7264: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7269: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_726e: stloc.s V_9 - IL_7270: ldloc.s V_10 - IL_7272: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7277: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_727c: stloc.s V_7 - IL_727e: br.s IL_72c6 - - IL_7280: ldloc.s V_6 - IL_7282: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7287: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_728c: stloc.s V_7 - IL_728e: ldloc.s V_8 - IL_7290: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7295: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_729a: stloc.s V_8 - IL_729c: ldloc.s V_7 - IL_729e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_72a3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_72a8: stloc.s V_6 - IL_72aa: ldloc.s V_8 - IL_72ac: call string [mscorlib]System.Convert::ToString(int32) - IL_72b1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_72b6: stloc.s V_8 - IL_72b8: ldloc.s V_8 - IL_72ba: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_72bf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_72c4: stloc.s V_7 - IL_72c6: ldloc.s V_8 - IL_72c8: ldloc.s V_6 - IL_72ca: blt.s IL_7314 - - IL_72cc: ldloc.s V_10 - IL_72ce: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_72d3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_72d8: stloc.s V_8 - IL_72da: ldloc.s V_10 - IL_72dc: call string [mscorlib]System.Convert::ToString(int32) - IL_72e1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_72e6: stloc.s V_7 - IL_72e8: ldloc.s V_6 - IL_72ea: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_72ef: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_72f4: stloc.s V_10 - IL_72f6: ldloc.s V_7 - IL_72f8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_72fd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7302: stloc.s V_9 - IL_7304: ldloc.s V_6 - IL_7306: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_730b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7310: stloc.s V_9 - IL_7312: br.s IL_735a - - IL_7314: ldloc.s V_10 - IL_7316: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_731b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7320: stloc.s V_7 - IL_7322: ldloc.s V_7 - IL_7324: call string [mscorlib]System.Convert::ToString(int32) - IL_7329: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_732e: stloc.s V_6 - IL_7330: ldloc.s V_7 - IL_7332: call string [mscorlib]System.Convert::ToString(int32) - IL_7337: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_733c: stloc.s V_6 - IL_733e: ldloc.s V_7 - IL_7340: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7345: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_734a: stloc.s V_7 - IL_734c: ldloc.s V_8 - IL_734e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7353: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7358: stloc.s V_6 - IL_735a: ldloc.s V_8 - IL_735c: ldloc.s V_7 - IL_735e: ble.s IL_73a8 - - IL_7360: ldloc.s V_6 - IL_7362: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7367: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_736c: stloc.s V_8 - IL_736e: ldloc.s V_9 - IL_7370: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7375: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_737a: stloc.s V_6 - IL_737c: ldloc.s V_8 - IL_737e: call string [mscorlib]System.Convert::ToString(int32) - IL_7383: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7388: stloc.s V_6 - IL_738a: ldloc.s V_6 - IL_738c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7391: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7396: stloc.s V_8 - IL_7398: ldloc.s V_8 - IL_739a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_739f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_73a4: stloc.s V_10 - IL_73a6: br.s IL_73ee - - IL_73a8: ldloc.s V_7 - IL_73aa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_73af: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_73b4: stloc.s V_8 - IL_73b6: ldloc.s V_6 - IL_73b8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_73bd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_73c2: stloc.s V_9 - IL_73c4: ldloc.s V_7 - IL_73c6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_73cb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_73d0: stloc.s V_9 - IL_73d2: ldloc.s V_8 - IL_73d4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_73d9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_73de: stloc.s V_8 - IL_73e0: ldloc.s V_10 - IL_73e2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_73e7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_73ec: stloc.s V_9 - IL_73ee: ldloc.s V_9 - IL_73f0: ldloc.s V_10 - IL_73f2: bgt.s IL_743c - - IL_73f4: ldloc.s V_7 - IL_73f6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_73fb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7400: stloc.s V_10 - IL_7402: ldloc.s V_6 - IL_7404: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7409: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_740e: stloc.s V_10 - IL_7410: ldloc.s V_10 - IL_7412: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7417: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_741c: stloc.s V_7 - IL_741e: ldloc.s V_6 - IL_7420: call string [mscorlib]System.Convert::ToString(int32) - IL_7425: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_742a: stloc.s V_9 - IL_742c: ldloc.s V_7 - IL_742e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7433: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7438: stloc.s V_6 - IL_743a: br.s IL_7482 - - IL_743c: ldloc.s V_10 - IL_743e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7443: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7448: stloc.s V_10 - IL_744a: ldloc.s V_6 - IL_744c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7451: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7456: stloc.s V_6 - IL_7458: ldloc.s V_7 - IL_745a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_745f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7464: stloc.s V_7 - IL_7466: ldloc.s V_10 - IL_7468: call string [mscorlib]System.Convert::ToString(int32) - IL_746d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7472: stloc.s V_10 - IL_7474: ldloc.s V_10 - IL_7476: call string [mscorlib]System.Convert::ToString(int32) - IL_747b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7480: stloc.s V_6 - IL_7482: ldloc.s V_10 - IL_7484: ldloc.s V_10 - IL_7486: bne.un.s IL_74d0 - - IL_7488: ldloc.s V_10 - IL_748a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_748f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7494: stloc.s V_7 - IL_7496: ldloc.s V_9 - IL_7498: call string [mscorlib]System.Convert::ToString(int32) - IL_749d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_74a2: stloc.s V_6 - IL_74a4: ldloc.s V_7 - IL_74a6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_74ab: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_74b0: stloc.s V_7 - IL_74b2: ldloc.s V_9 - IL_74b4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_74b9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_74be: stloc.s V_7 - IL_74c0: ldloc.s V_9 - IL_74c2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_74c7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_74cc: stloc.s V_7 - IL_74ce: br.s IL_7516 - - IL_74d0: ldloc.s V_7 - IL_74d2: call string [mscorlib]System.Convert::ToString(int32) - IL_74d7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_74dc: stloc.s V_7 - IL_74de: ldloc.s V_6 - IL_74e0: call string [mscorlib]System.Convert::ToString(int32) - IL_74e5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_74ea: stloc.s V_10 - IL_74ec: ldloc.s V_7 - IL_74ee: call string [mscorlib]System.Convert::ToString(int32) - IL_74f3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_74f8: stloc.s V_9 - IL_74fa: ldloc.s V_9 - IL_74fc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7501: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7506: stloc.s V_6 - IL_7508: ldloc.s V_8 - IL_750a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_750f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7514: stloc.s V_6 - IL_7516: ldloc.s V_6 - IL_7518: ldloc.s V_10 - IL_751a: beq.s IL_7564 - - IL_751c: ldloc.s V_7 - IL_751e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7523: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7528: stloc.s V_7 - IL_752a: ldloc.s V_9 - IL_752c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7531: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7536: stloc.s V_8 - IL_7538: ldloc.s V_10 - IL_753a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_753f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7544: stloc.s V_6 - IL_7546: ldloc.s V_9 - IL_7548: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_754d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7552: stloc.s V_10 - IL_7554: ldloc.s V_6 - IL_7556: call string [mscorlib]System.Convert::ToString(int32) - IL_755b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7560: stloc.s V_8 - IL_7562: br.s IL_75aa - - IL_7564: ldloc.s V_9 - IL_7566: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_756b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7570: stloc.s V_6 - IL_7572: ldloc.s V_7 - IL_7574: call string [mscorlib]System.Convert::ToString(int32) - IL_7579: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_757e: stloc.s V_8 - IL_7580: ldloc.s V_7 - IL_7582: call string [mscorlib]System.Convert::ToString(int32) - IL_7587: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_758c: stloc.s V_9 - IL_758e: ldloc.s V_9 - IL_7590: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7595: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_759a: stloc.s V_8 - IL_759c: ldloc.s V_8 - IL_759e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_75a3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_75a8: stloc.s V_6 - IL_75aa: ldloc.s V_7 - IL_75ac: ldloc.s V_10 - IL_75ae: bne.un.s IL_75f8 - - IL_75b0: ldloc.s V_8 - IL_75b2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_75b7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_75bc: stloc.s V_10 - IL_75be: ldloc.s V_10 - IL_75c0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_75c5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_75ca: stloc.s V_8 - IL_75cc: ldloc.s V_9 - IL_75ce: call string [mscorlib]System.Convert::ToString(int32) - IL_75d3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_75d8: stloc.s V_8 - IL_75da: ldloc.s V_9 - IL_75dc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_75e1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_75e6: stloc.s V_7 - IL_75e8: ldloc.s V_8 - IL_75ea: call string [mscorlib]System.Convert::ToString(int32) - IL_75ef: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_75f4: stloc.s V_8 - IL_75f6: br.s IL_763e - - IL_75f8: ldloc.s V_6 - IL_75fa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_75ff: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7604: stloc.s V_8 - IL_7606: ldloc.s V_7 - IL_7608: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_760d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7612: stloc.s V_9 - IL_7614: ldloc.s V_7 - IL_7616: call string [mscorlib]System.Convert::ToString(int32) - IL_761b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7620: stloc.s V_8 - IL_7622: ldloc.s V_10 - IL_7624: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7629: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_762e: stloc.s V_10 - IL_7630: ldloc.s V_10 - IL_7632: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7637: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_763c: stloc.s V_6 - IL_763e: ldloc.s V_6 - IL_7640: ldloc.s V_9 - IL_7642: bgt.s IL_768c - - IL_7644: ldloc.s V_9 - IL_7646: call string [mscorlib]System.Convert::ToString(int32) - IL_764b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7650: stloc.s V_10 - IL_7652: ldloc.s V_6 - IL_7654: call string [mscorlib]System.Convert::ToString(int32) - IL_7659: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_765e: stloc.s V_9 - IL_7660: ldloc.s V_10 - IL_7662: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7667: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_766c: stloc.s V_10 - IL_766e: ldloc.s V_9 - IL_7670: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7675: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_767a: stloc.s V_9 - IL_767c: ldloc.s V_8 - IL_767e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7683: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7688: stloc.s V_8 - IL_768a: br.s IL_76d2 - - IL_768c: ldloc.s V_6 - IL_768e: call string [mscorlib]System.Convert::ToString(int32) - IL_7693: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7698: stloc.s V_7 - IL_769a: ldloc.s V_10 - IL_769c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_76a1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_76a6: stloc.s V_7 - IL_76a8: ldloc.s V_7 - IL_76aa: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_76af: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_76b4: stloc.s V_8 - IL_76b6: ldloc.s V_10 - IL_76b8: call string [mscorlib]System.Convert::ToString(int32) - IL_76bd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_76c2: stloc.s V_6 - IL_76c4: ldloc.s V_9 - IL_76c6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_76cb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_76d0: stloc.s V_6 - IL_76d2: ldloc.s V_9 - IL_76d4: ldloc.s V_10 - IL_76d6: beq.s IL_7720 - - IL_76d8: ldloc.s V_10 - IL_76da: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_76df: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_76e4: stloc.s V_10 - IL_76e6: ldloc.s V_7 - IL_76e8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_76ed: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_76f2: stloc.s V_9 - IL_76f4: ldloc.s V_7 - IL_76f6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_76fb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7700: stloc.s V_10 - IL_7702: ldloc.s V_6 - IL_7704: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7709: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_770e: stloc.s V_7 - IL_7710: ldloc.s V_10 - IL_7712: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7717: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_771c: stloc.s V_9 - IL_771e: br.s IL_7766 - - IL_7720: ldloc.s V_9 - IL_7722: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7727: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_772c: stloc.s V_8 - IL_772e: ldloc.s V_10 - IL_7730: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7735: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_773a: stloc.s V_9 - IL_773c: ldloc.s V_6 - IL_773e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7743: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7748: stloc.s V_10 - IL_774a: ldloc.s V_6 - IL_774c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7751: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7756: stloc.s V_7 - IL_7758: ldloc.s V_8 - IL_775a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_775f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7764: stloc.s V_6 - IL_7766: ldloc.s V_10 - IL_7768: ldloc.s V_9 - IL_776a: blt.s IL_77b4 - - IL_776c: ldloc.s V_6 - IL_776e: call string [mscorlib]System.Convert::ToString(int32) - IL_7773: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7778: stloc.s V_10 - IL_777a: ldloc.s V_9 - IL_777c: call string [mscorlib]System.Convert::ToString(int32) - IL_7781: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7786: stloc.s V_8 - IL_7788: ldloc.s V_7 - IL_778a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_778f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7794: stloc.s V_9 - IL_7796: ldloc.s V_8 - IL_7798: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_779d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_77a2: stloc.s V_8 - IL_77a4: ldloc.s V_6 - IL_77a6: call string [mscorlib]System.Convert::ToString(int32) - IL_77ab: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_77b0: stloc.s V_6 - IL_77b2: br.s IL_77fa - - IL_77b4: ldloc.s V_9 - IL_77b6: call string [mscorlib]System.Convert::ToString(int32) - IL_77bb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_77c0: stloc.s V_6 - IL_77c2: ldloc.s V_8 - IL_77c4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_77c9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_77ce: stloc.s V_10 - IL_77d0: ldloc.s V_8 - IL_77d2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_77d7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_77dc: stloc.s V_10 - IL_77de: ldloc.s V_8 - IL_77e0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_77e5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_77ea: stloc.s V_10 - IL_77ec: ldloc.s V_10 - IL_77ee: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_77f3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_77f8: stloc.s V_7 - IL_77fa: ldloc.s V_10 - IL_77fc: ldloc.s V_6 - IL_77fe: bne.un.s IL_7848 - - IL_7800: ldloc.s V_9 - IL_7802: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7807: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_780c: stloc.s V_8 - IL_780e: ldloc.s V_6 - IL_7810: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7815: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_781a: stloc.s V_9 - IL_781c: ldloc.s V_9 - IL_781e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7823: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7828: stloc.s V_6 - IL_782a: ldloc.s V_6 - IL_782c: call string [mscorlib]System.Convert::ToString(int32) - IL_7831: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7836: stloc.s V_8 - IL_7838: ldloc.s V_10 - IL_783a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_783f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7844: stloc.s V_9 - IL_7846: br.s IL_788e - - IL_7848: ldloc.s V_7 - IL_784a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_784f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7854: stloc.s V_6 - IL_7856: ldloc.s V_9 - IL_7858: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_785d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7862: stloc.s V_10 - IL_7864: ldloc.s V_9 - IL_7866: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_786b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7870: stloc.s V_6 - IL_7872: ldloc.s V_6 - IL_7874: call string [mscorlib]System.Convert::ToString(int32) - IL_7879: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_787e: stloc.s V_9 - IL_7880: ldloc.s V_8 - IL_7882: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7887: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_788c: stloc.s V_7 - IL_788e: ldloc.s V_9 - IL_7890: ldloc.s V_7 - IL_7892: blt.s IL_78dc - - IL_7894: ldloc.s V_9 - IL_7896: call string [mscorlib]System.Convert::ToString(int32) - IL_789b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_78a0: stloc.s V_7 - IL_78a2: ldloc.s V_9 - IL_78a4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_78a9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_78ae: stloc.s V_7 - IL_78b0: ldloc.s V_10 - IL_78b2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_78b7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_78bc: stloc.s V_8 - IL_78be: ldloc.s V_7 - IL_78c0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_78c5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_78ca: stloc.s V_10 - IL_78cc: ldloc.s V_6 - IL_78ce: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_78d3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_78d8: stloc.s V_8 - IL_78da: br.s IL_7922 - - IL_78dc: ldloc.s V_9 - IL_78de: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_78e3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_78e8: stloc.s V_8 - IL_78ea: ldloc.s V_8 - IL_78ec: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_78f1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_78f6: stloc.s V_9 - IL_78f8: ldloc.s V_10 - IL_78fa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_78ff: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7904: stloc.s V_7 - IL_7906: ldloc.s V_7 - IL_7908: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_790d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7912: stloc.s V_6 - IL_7914: ldloc.s V_9 - IL_7916: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_791b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7920: stloc.s V_6 - IL_7922: ldloc.s V_6 - IL_7924: ldloc.s V_10 - IL_7926: bge.s IL_7970 - - IL_7928: ldloc.s V_8 - IL_792a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_792f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7934: stloc.s V_10 - IL_7936: ldloc.s V_10 - IL_7938: call string [mscorlib]System.Convert::ToString(int32) - IL_793d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7942: stloc.s V_7 - IL_7944: ldloc.s V_8 - IL_7946: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_794b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7950: stloc.s V_9 - IL_7952: ldloc.s V_8 - IL_7954: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7959: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_795e: stloc.s V_9 - IL_7960: ldloc.s V_8 - IL_7962: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7967: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_796c: stloc.s V_7 - IL_796e: br.s IL_79b6 - - IL_7970: ldloc.s V_7 - IL_7972: call string [mscorlib]System.Convert::ToString(int32) - IL_7977: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_797c: stloc.s V_6 - IL_797e: ldloc.s V_9 - IL_7980: call string [mscorlib]System.Convert::ToString(int32) - IL_7985: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_798a: stloc.s V_9 - IL_798c: ldloc.s V_8 - IL_798e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7993: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7998: stloc.s V_9 - IL_799a: ldloc.s V_7 - IL_799c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_79a1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_79a6: stloc.s V_9 - IL_79a8: ldloc.s V_6 - IL_79aa: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_79af: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_79b4: stloc.s V_7 - IL_79b6: ldloc.s V_9 - IL_79b8: ldloc.s V_6 - IL_79ba: bge.s IL_7a04 - - IL_79bc: ldloc.s V_9 - IL_79be: call string [mscorlib]System.Convert::ToString(int32) - IL_79c3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_79c8: stloc.s V_8 - IL_79ca: ldloc.s V_8 - IL_79cc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_79d1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_79d6: stloc.s V_9 - IL_79d8: ldloc.s V_8 - IL_79da: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_79df: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_79e4: stloc.s V_10 - IL_79e6: ldloc.s V_10 - IL_79e8: call string [mscorlib]System.Convert::ToString(int32) - IL_79ed: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_79f2: stloc.s V_6 - IL_79f4: ldloc.s V_10 - IL_79f6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_79fb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7a00: stloc.s V_8 - IL_7a02: br.s IL_7a4a - - IL_7a04: ldloc.s V_6 - IL_7a06: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7a0b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7a10: stloc.s V_9 - IL_7a12: ldloc.s V_8 - IL_7a14: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7a19: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7a1e: stloc.s V_7 - IL_7a20: ldloc.s V_7 - IL_7a22: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7a27: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7a2c: stloc.s V_6 - IL_7a2e: ldloc.s V_8 - IL_7a30: call string [mscorlib]System.Convert::ToString(int32) - IL_7a35: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7a3a: stloc.s V_10 - IL_7a3c: ldloc.s V_10 - IL_7a3e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7a43: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7a48: stloc.s V_8 - IL_7a4a: ldloc.s V_8 - IL_7a4c: ldloc.s V_9 - IL_7a4e: bge.s IL_7a98 - - IL_7a50: ldloc.s V_8 - IL_7a52: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7a57: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7a5c: stloc.s V_7 - IL_7a5e: ldloc.s V_8 - IL_7a60: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7a65: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7a6a: stloc.s V_9 - IL_7a6c: ldloc.s V_9 - IL_7a6e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7a73: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7a78: stloc.s V_10 - IL_7a7a: ldloc.s V_7 - IL_7a7c: call string [mscorlib]System.Convert::ToString(int32) - IL_7a81: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7a86: stloc.s V_7 - IL_7a88: ldloc.s V_8 - IL_7a8a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7a8f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7a94: stloc.s V_9 - IL_7a96: br.s IL_7ade - - IL_7a98: ldloc.s V_8 - IL_7a9a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7a9f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7aa4: stloc.s V_7 - IL_7aa6: ldloc.s V_6 - IL_7aa8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7aad: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7ab2: stloc.s V_6 - IL_7ab4: ldloc.s V_8 - IL_7ab6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7abb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7ac0: stloc.s V_9 - IL_7ac2: ldloc.s V_9 - IL_7ac4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7ac9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7ace: stloc.s V_8 - IL_7ad0: ldloc.s V_9 - IL_7ad2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7ad7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7adc: stloc.s V_10 - IL_7ade: ldloc.s V_10 - IL_7ae0: ldloc.s V_6 - IL_7ae2: bgt.s IL_7b2c - - IL_7ae4: ldloc.s V_10 - IL_7ae6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7aeb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7af0: stloc.s V_6 - IL_7af2: ldloc.s V_9 - IL_7af4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7af9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7afe: stloc.s V_7 - IL_7b00: ldloc.s V_9 - IL_7b02: call string [mscorlib]System.Convert::ToString(int32) - IL_7b07: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7b0c: stloc.s V_8 - IL_7b0e: ldloc.s V_8 - IL_7b10: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7b15: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7b1a: stloc.s V_10 - IL_7b1c: ldloc.s V_7 - IL_7b1e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7b23: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7b28: stloc.s V_10 - IL_7b2a: br.s IL_7b72 - - IL_7b2c: ldloc.s V_10 - IL_7b2e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7b33: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7b38: stloc.s V_6 - IL_7b3a: ldloc.s V_8 - IL_7b3c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7b41: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7b46: stloc.s V_7 - IL_7b48: ldloc.s V_8 - IL_7b4a: call string [mscorlib]System.Convert::ToString(int32) - IL_7b4f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7b54: stloc.s V_9 - IL_7b56: ldloc.s V_8 - IL_7b58: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7b5d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7b62: stloc.s V_6 - IL_7b64: ldloc.s V_8 - IL_7b66: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7b6b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7b70: stloc.s V_9 - IL_7b72: ldloc.s V_9 - IL_7b74: ldloc.s V_9 - IL_7b76: beq.s IL_7bc0 - - IL_7b78: ldloc.s V_6 - IL_7b7a: call string [mscorlib]System.Convert::ToString(int32) - IL_7b7f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7b84: stloc.s V_7 - IL_7b86: ldloc.s V_8 - IL_7b88: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7b8d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7b92: stloc.s V_8 - IL_7b94: ldloc.s V_8 - IL_7b96: call string [mscorlib]System.Convert::ToString(int32) - IL_7b9b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7ba0: stloc.s V_10 - IL_7ba2: ldloc.s V_7 - IL_7ba4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7ba9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7bae: stloc.s V_8 - IL_7bb0: ldloc.s V_8 - IL_7bb2: call string [mscorlib]System.Convert::ToString(int32) - IL_7bb7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7bbc: stloc.s V_10 - IL_7bbe: br.s IL_7c06 - - IL_7bc0: ldloc.s V_6 - IL_7bc2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7bc7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7bcc: stloc.s V_8 - IL_7bce: ldloc.s V_9 - IL_7bd0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7bd5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7bda: stloc.s V_10 - IL_7bdc: ldloc.s V_9 - IL_7bde: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7be3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7be8: stloc.s V_9 - IL_7bea: ldloc.s V_9 - IL_7bec: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7bf1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7bf6: stloc.s V_7 - IL_7bf8: ldloc.s V_9 - IL_7bfa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7bff: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7c04: stloc.s V_6 - IL_7c06: ldloc.s V_6 - IL_7c08: ldloc.s V_7 - IL_7c0a: bge.s IL_7c54 - - IL_7c0c: ldloc.s V_9 - IL_7c0e: call string [mscorlib]System.Convert::ToString(int32) - IL_7c13: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7c18: stloc.s V_10 - IL_7c1a: ldloc.s V_7 - IL_7c1c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7c21: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7c26: stloc.s V_7 - IL_7c28: ldloc.s V_8 - IL_7c2a: call string [mscorlib]System.Convert::ToString(int32) - IL_7c2f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7c34: stloc.s V_8 - IL_7c36: ldloc.s V_10 - IL_7c38: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7c3d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7c42: stloc.s V_6 - IL_7c44: ldloc.s V_10 - IL_7c46: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7c4b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7c50: stloc.s V_7 - IL_7c52: br.s IL_7c9a - - IL_7c54: ldloc.s V_10 - IL_7c56: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7c5b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7c60: stloc.s V_6 - IL_7c62: ldloc.s V_7 - IL_7c64: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7c69: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7c6e: stloc.s V_7 - IL_7c70: ldloc.s V_6 - IL_7c72: call string [mscorlib]System.Convert::ToString(int32) - IL_7c77: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7c7c: stloc.s V_6 - IL_7c7e: ldloc.s V_9 - IL_7c80: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7c85: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7c8a: stloc.s V_8 - IL_7c8c: ldloc.s V_10 - IL_7c8e: call string [mscorlib]System.Convert::ToString(int32) - IL_7c93: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7c98: stloc.s V_9 - IL_7c9a: ldloc.s V_7 - IL_7c9c: ldloc.s V_9 - IL_7c9e: bgt.s IL_7ce8 - - IL_7ca0: ldloc.s V_10 - IL_7ca2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7ca7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7cac: stloc.s V_6 - IL_7cae: ldloc.s V_8 - IL_7cb0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7cb5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7cba: stloc.s V_10 - IL_7cbc: ldloc.s V_9 - IL_7cbe: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7cc3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7cc8: stloc.s V_10 - IL_7cca: ldloc.s V_7 - IL_7ccc: call string [mscorlib]System.Convert::ToString(int32) - IL_7cd1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7cd6: stloc.s V_6 - IL_7cd8: ldloc.s V_7 - IL_7cda: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7cdf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7ce4: stloc.s V_9 - IL_7ce6: br.s IL_7d2e - - IL_7ce8: ldloc.s V_8 - IL_7cea: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7cef: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7cf4: stloc.s V_10 - IL_7cf6: ldloc.s V_10 - IL_7cf8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7cfd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7d02: stloc.s V_10 - IL_7d04: ldloc.s V_6 - IL_7d06: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7d0b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7d10: stloc.s V_10 - IL_7d12: ldloc.s V_7 - IL_7d14: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7d19: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7d1e: stloc.s V_8 - IL_7d20: ldloc.s V_9 - IL_7d22: call string [mscorlib]System.Convert::ToString(int32) - IL_7d27: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7d2c: stloc.s V_8 - IL_7d2e: ldloc.s V_8 - IL_7d30: ldloc.s V_9 - IL_7d32: bgt.s IL_7d7c - - IL_7d34: ldloc.s V_10 - IL_7d36: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7d3b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7d40: stloc.s V_6 - IL_7d42: ldloc.s V_6 - IL_7d44: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7d49: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7d4e: stloc.s V_6 - IL_7d50: ldloc.s V_9 - IL_7d52: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7d57: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7d5c: stloc.s V_7 - IL_7d5e: ldloc.s V_10 - IL_7d60: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7d65: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7d6a: stloc.s V_9 - IL_7d6c: ldloc.s V_6 - IL_7d6e: call string [mscorlib]System.Convert::ToString(int32) - IL_7d73: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7d78: stloc.s V_10 - IL_7d7a: br.s IL_7dc2 - - IL_7d7c: ldloc.s V_9 - IL_7d7e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7d83: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7d88: stloc.s V_8 - IL_7d8a: ldloc.s V_8 - IL_7d8c: call string [mscorlib]System.Convert::ToString(int32) - IL_7d91: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7d96: stloc.s V_7 - IL_7d98: ldloc.s V_8 - IL_7d9a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7d9f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7da4: stloc.s V_10 - IL_7da6: ldloc.s V_7 - IL_7da8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7dad: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7db2: stloc.s V_9 - IL_7db4: ldloc.s V_9 - IL_7db6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7dbb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7dc0: stloc.s V_7 - IL_7dc2: ldloc.s V_8 - IL_7dc4: ldloc.s V_7 - IL_7dc6: beq.s IL_7e10 - - IL_7dc8: ldloc.s V_10 - IL_7dca: call string [mscorlib]System.Convert::ToString(int32) - IL_7dcf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7dd4: stloc.s V_9 - IL_7dd6: ldloc.s V_10 - IL_7dd8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7ddd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7de2: stloc.s V_7 - IL_7de4: ldloc.s V_8 - IL_7de6: call string [mscorlib]System.Convert::ToString(int32) - IL_7deb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7df0: stloc.s V_7 - IL_7df2: ldloc.s V_10 - IL_7df4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7df9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7dfe: stloc.s V_7 - IL_7e00: ldloc.s V_7 - IL_7e02: call string [mscorlib]System.Convert::ToString(int32) - IL_7e07: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7e0c: stloc.s V_7 - IL_7e0e: br.s IL_7e56 - - IL_7e10: ldloc.s V_9 - IL_7e12: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7e17: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7e1c: stloc.s V_7 - IL_7e1e: ldloc.s V_9 - IL_7e20: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7e25: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7e2a: stloc.s V_6 - IL_7e2c: ldloc.s V_6 - IL_7e2e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7e33: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7e38: stloc.s V_6 - IL_7e3a: ldloc.s V_10 - IL_7e3c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7e41: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7e46: stloc.s V_8 - IL_7e48: ldloc.s V_10 - IL_7e4a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7e4f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7e54: stloc.s V_9 - IL_7e56: ldloc.s V_9 - IL_7e58: ldloc.s V_7 - IL_7e5a: beq.s IL_7ea4 - - IL_7e5c: ldloc.s V_10 - IL_7e5e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7e63: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7e68: stloc.s V_9 - IL_7e6a: ldloc.s V_6 - IL_7e6c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7e71: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7e76: stloc.s V_6 - IL_7e78: ldloc.s V_6 - IL_7e7a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7e7f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7e84: stloc.s V_10 - IL_7e86: ldloc.s V_9 - IL_7e88: call string [mscorlib]System.Convert::ToString(int32) - IL_7e8d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7e92: stloc.s V_6 - IL_7e94: ldloc.s V_9 - IL_7e96: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7e9b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7ea0: stloc.s V_8 - IL_7ea2: br.s IL_7eea - - IL_7ea4: ldloc.s V_7 - IL_7ea6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7eab: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7eb0: stloc.s V_6 - IL_7eb2: ldloc.s V_7 - IL_7eb4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7eb9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7ebe: stloc.s V_6 - IL_7ec0: ldloc.s V_7 - IL_7ec2: call string [mscorlib]System.Convert::ToString(int32) - IL_7ec7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7ecc: stloc.s V_8 - IL_7ece: ldloc.s V_8 - IL_7ed0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7ed5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7eda: stloc.s V_10 - IL_7edc: ldloc.s V_8 - IL_7ede: call string [mscorlib]System.Convert::ToString(int32) - IL_7ee3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7ee8: stloc.s V_6 - IL_7eea: ldloc.s V_7 - IL_7eec: ldloc.s V_9 - IL_7eee: bgt.s IL_7f38 - - IL_7ef0: ldloc.s V_8 - IL_7ef2: call string [mscorlib]System.Convert::ToString(int32) - IL_7ef7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7efc: stloc.s V_8 - IL_7efe: ldloc.s V_6 - IL_7f00: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7f05: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7f0a: stloc.s V_7 - IL_7f0c: ldloc.s V_7 - IL_7f0e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7f13: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7f18: stloc.s V_9 - IL_7f1a: ldloc.s V_9 - IL_7f1c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7f21: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7f26: stloc.s V_8 - IL_7f28: ldloc.s V_6 - IL_7f2a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7f2f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7f34: stloc.s V_7 - IL_7f36: br.s IL_7f7e - - IL_7f38: ldloc.s V_6 - IL_7f3a: call string [mscorlib]System.Convert::ToString(int32) - IL_7f3f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7f44: stloc.s V_6 - IL_7f46: ldloc.s V_9 - IL_7f48: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7f4d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7f52: stloc.s V_9 - IL_7f54: ldloc.s V_8 - IL_7f56: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7f5b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7f60: stloc.s V_6 - IL_7f62: ldloc.s V_6 - IL_7f64: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7f69: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7f6e: stloc.s V_9 - IL_7f70: ldloc.s V_7 - IL_7f72: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7f77: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7f7c: stloc.s V_8 - IL_7f7e: ldloc.s V_8 - IL_7f80: ldloc.s V_7 - IL_7f82: bne.un.s IL_7fcc - - IL_7f84: ldloc.s V_9 - IL_7f86: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7f8b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7f90: stloc.s V_6 - IL_7f92: ldloc.s V_10 - IL_7f94: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7f99: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7f9e: stloc.s V_7 - IL_7fa0: ldloc.s V_9 - IL_7fa2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7fa7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7fac: stloc.s V_7 - IL_7fae: ldloc.s V_8 - IL_7fb0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_7fb5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_7fba: stloc.s V_10 - IL_7fbc: ldloc.s V_10 - IL_7fbe: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_7fc3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_7fc8: stloc.s V_9 - IL_7fca: br.s IL_8012 - - IL_7fcc: ldloc.s V_6 - IL_7fce: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7fd3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7fd8: stloc.s V_8 - IL_7fda: ldloc.s V_8 - IL_7fdc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_7fe1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_7fe6: stloc.s V_7 - IL_7fe8: ldloc.s V_8 - IL_7fea: call string [mscorlib]System.Convert::ToString(int32) - IL_7fef: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_7ff4: stloc.s V_10 - IL_7ff6: ldloc.s V_9 - IL_7ff8: call string [mscorlib]System.Convert::ToString(int32) - IL_7ffd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8002: stloc.s V_6 - IL_8004: ldloc.s V_7 - IL_8006: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_800b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8010: stloc.s V_10 - IL_8012: ldloc.s V_9 - IL_8014: ldloc.s V_8 - IL_8016: beq.s IL_8060 - - IL_8018: ldloc.s V_6 - IL_801a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_801f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8024: stloc.s V_8 - IL_8026: ldloc.s V_8 - IL_8028: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_802d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8032: stloc.s V_7 - IL_8034: ldloc.s V_7 - IL_8036: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_803b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8040: stloc.s V_7 - IL_8042: ldloc.s V_6 - IL_8044: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8049: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_804e: stloc.s V_6 - IL_8050: ldloc.s V_10 - IL_8052: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8057: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_805c: stloc.s V_6 - IL_805e: br.s IL_80a6 - - IL_8060: ldloc.s V_10 - IL_8062: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8067: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_806c: stloc.s V_6 - IL_806e: ldloc.s V_9 - IL_8070: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8075: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_807a: stloc.s V_6 - IL_807c: ldloc.s V_8 - IL_807e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8083: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8088: stloc.s V_9 - IL_808a: ldloc.s V_7 - IL_808c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8091: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8096: stloc.s V_6 - IL_8098: ldloc.s V_7 - IL_809a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_809f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_80a4: stloc.s V_6 - IL_80a6: ldloc.s V_6 - IL_80a8: ldloc.s V_7 - IL_80aa: blt.s IL_80f4 - - IL_80ac: ldloc.s V_6 - IL_80ae: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_80b3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_80b8: stloc.s V_10 - IL_80ba: ldloc.s V_7 - IL_80bc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_80c1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_80c6: stloc.s V_10 - IL_80c8: ldloc.s V_9 - IL_80ca: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_80cf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_80d4: stloc.s V_9 - IL_80d6: ldloc.s V_8 - IL_80d8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_80dd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_80e2: stloc.s V_7 - IL_80e4: ldloc.s V_9 - IL_80e6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_80eb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_80f0: stloc.s V_8 - IL_80f2: br.s IL_813a - - IL_80f4: ldloc.s V_10 - IL_80f6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_80fb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8100: stloc.s V_10 - IL_8102: ldloc.s V_7 - IL_8104: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8109: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_810e: stloc.s V_8 - IL_8110: ldloc.s V_6 - IL_8112: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8117: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_811c: stloc.s V_10 - IL_811e: ldloc.s V_8 - IL_8120: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8125: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_812a: stloc.s V_9 - IL_812c: ldloc.s V_10 - IL_812e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8133: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8138: stloc.s V_6 - IL_813a: ldloc.s V_9 - IL_813c: ldloc.s V_6 - IL_813e: beq.s IL_8188 - - IL_8140: ldloc.s V_10 - IL_8142: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8147: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_814c: stloc.s V_10 - IL_814e: ldloc.s V_10 - IL_8150: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8155: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_815a: stloc.s V_9 - IL_815c: ldloc.s V_8 - IL_815e: call string [mscorlib]System.Convert::ToString(int32) - IL_8163: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8168: stloc.s V_9 - IL_816a: ldloc.s V_7 - IL_816c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8171: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8176: stloc.s V_10 - IL_8178: ldloc.s V_7 - IL_817a: call string [mscorlib]System.Convert::ToString(int32) - IL_817f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8184: stloc.s V_10 - IL_8186: br.s IL_81ce - - IL_8188: ldloc.s V_9 - IL_818a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_818f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8194: stloc.s V_9 - IL_8196: ldloc.s V_6 - IL_8198: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_819d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_81a2: stloc.s V_8 - IL_81a4: ldloc.s V_7 - IL_81a6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_81ab: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_81b0: stloc.s V_10 - IL_81b2: ldloc.s V_6 - IL_81b4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_81b9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_81be: stloc.s V_10 - IL_81c0: ldloc.s V_10 - IL_81c2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_81c7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_81cc: stloc.s V_9 - IL_81ce: ldloc.s V_7 - IL_81d0: ldloc.s V_6 - IL_81d2: bne.un.s IL_821c - - IL_81d4: ldloc.s V_10 - IL_81d6: call string [mscorlib]System.Convert::ToString(int32) - IL_81db: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_81e0: stloc.s V_7 - IL_81e2: ldloc.s V_9 - IL_81e4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_81e9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_81ee: stloc.s V_10 - IL_81f0: ldloc.s V_7 - IL_81f2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_81f7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_81fc: stloc.s V_10 - IL_81fe: ldloc.s V_8 - IL_8200: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8205: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_820a: stloc.s V_10 - IL_820c: ldloc.s V_8 - IL_820e: call string [mscorlib]System.Convert::ToString(int32) - IL_8213: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8218: stloc.s V_10 - IL_821a: br.s IL_8262 - - IL_821c: ldloc.s V_10 - IL_821e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8223: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8228: stloc.s V_7 - IL_822a: ldloc.s V_10 - IL_822c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8231: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8236: stloc.s V_6 - IL_8238: ldloc.s V_10 - IL_823a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_823f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8244: stloc.s V_10 - IL_8246: ldloc.s V_10 - IL_8248: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_824d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8252: stloc.s V_8 - IL_8254: ldloc.s V_6 - IL_8256: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_825b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8260: stloc.s V_10 - IL_8262: ldloc.s V_6 - IL_8264: ldloc.s V_6 - IL_8266: bgt.s IL_82b0 - - IL_8268: ldloc.s V_10 - IL_826a: call string [mscorlib]System.Convert::ToString(int32) - IL_826f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8274: stloc.s V_7 - IL_8276: ldloc.s V_6 - IL_8278: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_827d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8282: stloc.s V_7 - IL_8284: ldloc.s V_6 - IL_8286: call string [mscorlib]System.Convert::ToString(int32) - IL_828b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8290: stloc.s V_6 - IL_8292: ldloc.s V_6 - IL_8294: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8299: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_829e: stloc.s V_10 - IL_82a0: ldloc.s V_9 - IL_82a2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_82a7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_82ac: stloc.s V_9 - IL_82ae: br.s IL_82f6 - - IL_82b0: ldloc.s V_10 - IL_82b2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_82b7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_82bc: stloc.s V_8 - IL_82be: ldloc.s V_9 - IL_82c0: call string [mscorlib]System.Convert::ToString(int32) - IL_82c5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_82ca: stloc.s V_6 - IL_82cc: ldloc.s V_9 - IL_82ce: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_82d3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_82d8: stloc.s V_6 - IL_82da: ldloc.s V_7 - IL_82dc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_82e1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_82e6: stloc.s V_10 - IL_82e8: ldloc.s V_10 - IL_82ea: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_82ef: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_82f4: stloc.s V_9 - IL_82f6: ldloc.s V_7 - IL_82f8: ldloc.s V_9 - IL_82fa: bge.s IL_8344 - - IL_82fc: ldloc.s V_10 - IL_82fe: call string [mscorlib]System.Convert::ToString(int32) - IL_8303: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8308: stloc.s V_7 - IL_830a: ldloc.s V_8 - IL_830c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8311: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8316: stloc.s V_8 - IL_8318: ldloc.s V_10 - IL_831a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_831f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8324: stloc.s V_9 - IL_8326: ldloc.s V_10 - IL_8328: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_832d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8332: stloc.s V_10 - IL_8334: ldloc.s V_9 - IL_8336: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_833b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8340: stloc.s V_10 - IL_8342: br.s IL_838a - - IL_8344: ldloc.s V_8 - IL_8346: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_834b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8350: stloc.s V_6 - IL_8352: ldloc.s V_8 - IL_8354: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8359: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_835e: stloc.s V_6 - IL_8360: ldloc.s V_7 - IL_8362: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8367: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_836c: stloc.s V_7 - IL_836e: ldloc.s V_8 - IL_8370: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8375: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_837a: stloc.s V_6 - IL_837c: ldloc.s V_9 - IL_837e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8383: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8388: stloc.s V_10 - IL_838a: ldloc.s V_9 - IL_838c: ldloc.s V_8 - IL_838e: ble.s IL_83d8 - - IL_8390: ldloc.s V_9 - IL_8392: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8397: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_839c: stloc.s V_8 - IL_839e: ldloc.s V_8 - IL_83a0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_83a5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_83aa: stloc.s V_9 - IL_83ac: ldloc.s V_9 - IL_83ae: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_83b3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_83b8: stloc.s V_8 - IL_83ba: ldloc.s V_8 - IL_83bc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_83c1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_83c6: stloc.s V_10 - IL_83c8: ldloc.s V_8 - IL_83ca: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_83cf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_83d4: stloc.s V_10 - IL_83d6: br.s IL_841e - - IL_83d8: ldloc.s V_8 - IL_83da: call string [mscorlib]System.Convert::ToString(int32) - IL_83df: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_83e4: stloc.s V_8 - IL_83e6: ldloc.s V_10 - IL_83e8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_83ed: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_83f2: stloc.s V_8 - IL_83f4: ldloc.s V_7 - IL_83f6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_83fb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8400: stloc.s V_7 - IL_8402: ldloc.s V_9 - IL_8404: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8409: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_840e: stloc.s V_9 - IL_8410: ldloc.s V_9 - IL_8412: call string [mscorlib]System.Convert::ToString(int32) - IL_8417: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_841c: stloc.s V_6 - IL_841e: ldloc.s V_10 - IL_8420: ldloc.s V_8 - IL_8422: bge.s IL_846c - - IL_8424: ldloc.s V_8 - IL_8426: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_842b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8430: stloc.s V_7 - IL_8432: ldloc.s V_8 - IL_8434: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8439: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_843e: stloc.s V_6 - IL_8440: ldloc.s V_6 - IL_8442: call string [mscorlib]System.Convert::ToString(int32) - IL_8447: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_844c: stloc.s V_10 - IL_844e: ldloc.s V_10 - IL_8450: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8455: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_845a: stloc.s V_10 - IL_845c: ldloc.s V_6 - IL_845e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8463: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8468: stloc.s V_9 - IL_846a: br.s IL_84b2 - - IL_846c: ldloc.s V_8 - IL_846e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8473: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8478: stloc.s V_6 - IL_847a: ldloc.s V_7 - IL_847c: call string [mscorlib]System.Convert::ToString(int32) - IL_8481: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8486: stloc.s V_6 - IL_8488: ldloc.s V_7 - IL_848a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_848f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8494: stloc.s V_9 - IL_8496: ldloc.s V_9 - IL_8498: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_849d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_84a2: stloc.s V_7 - IL_84a4: ldloc.s V_9 - IL_84a6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_84ab: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_84b0: stloc.s V_10 - IL_84b2: ldloc.s V_8 - IL_84b4: ldloc.s V_8 - IL_84b6: beq.s IL_8500 - - IL_84b8: ldloc.s V_10 - IL_84ba: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_84bf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_84c4: stloc.s V_6 - IL_84c6: ldloc.s V_8 - IL_84c8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_84cd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_84d2: stloc.s V_6 - IL_84d4: ldloc.s V_8 - IL_84d6: call string [mscorlib]System.Convert::ToString(int32) - IL_84db: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_84e0: stloc.s V_6 - IL_84e2: ldloc.s V_9 - IL_84e4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_84e9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_84ee: stloc.s V_10 - IL_84f0: ldloc.s V_10 - IL_84f2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_84f7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_84fc: stloc.s V_8 - IL_84fe: br.s IL_8546 - - IL_8500: ldloc.s V_7 - IL_8502: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8507: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_850c: stloc.s V_8 - IL_850e: ldloc.s V_7 - IL_8510: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8515: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_851a: stloc.s V_7 - IL_851c: ldloc.s V_6 - IL_851e: call string [mscorlib]System.Convert::ToString(int32) - IL_8523: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8528: stloc.s V_6 - IL_852a: ldloc.s V_7 - IL_852c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8531: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8536: stloc.s V_6 - IL_8538: ldloc.s V_7 - IL_853a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_853f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8544: stloc.s V_9 - IL_8546: ldloc.s V_6 - IL_8548: ldloc.s V_10 - IL_854a: bge.s IL_8594 - - IL_854c: ldloc.s V_10 - IL_854e: call string [mscorlib]System.Convert::ToString(int32) - IL_8553: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8558: stloc.s V_7 - IL_855a: ldloc.s V_6 - IL_855c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8561: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8566: stloc.s V_7 - IL_8568: ldloc.s V_10 - IL_856a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_856f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8574: stloc.s V_6 - IL_8576: ldloc.s V_10 - IL_8578: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_857d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8582: stloc.s V_9 - IL_8584: ldloc.s V_6 - IL_8586: call string [mscorlib]System.Convert::ToString(int32) - IL_858b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8590: stloc.s V_9 - IL_8592: br.s IL_85da - - IL_8594: ldloc.s V_7 - IL_8596: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_859b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_85a0: stloc.s V_9 - IL_85a2: ldloc.s V_7 - IL_85a4: call string [mscorlib]System.Convert::ToString(int32) - IL_85a9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_85ae: stloc.s V_8 - IL_85b0: ldloc.s V_9 - IL_85b2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_85b7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_85bc: stloc.s V_6 - IL_85be: ldloc.s V_8 - IL_85c0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_85c5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_85ca: stloc.s V_9 - IL_85cc: ldloc.s V_8 - IL_85ce: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_85d3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_85d8: stloc.s V_6 - IL_85da: ldloc.s V_9 - IL_85dc: ldloc.s V_7 - IL_85de: bge.s IL_8628 - - IL_85e0: ldloc.s V_7 - IL_85e2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_85e7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_85ec: stloc.s V_9 - IL_85ee: ldloc.s V_6 - IL_85f0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_85f5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_85fa: stloc.s V_6 - IL_85fc: ldloc.s V_6 - IL_85fe: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8603: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8608: stloc.s V_6 - IL_860a: ldloc.s V_10 - IL_860c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8611: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8616: stloc.s V_7 - IL_8618: ldloc.s V_6 - IL_861a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_861f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8624: stloc.s V_7 - IL_8626: br.s IL_866e - - IL_8628: ldloc.s V_9 - IL_862a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_862f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8634: stloc.s V_6 - IL_8636: ldloc.s V_8 - IL_8638: call string [mscorlib]System.Convert::ToString(int32) - IL_863d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8642: stloc.s V_10 - IL_8644: ldloc.s V_9 - IL_8646: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_864b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8650: stloc.s V_8 - IL_8652: ldloc.s V_10 - IL_8654: call string [mscorlib]System.Convert::ToString(int32) - IL_8659: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_865e: stloc.s V_6 - IL_8660: ldloc.s V_9 - IL_8662: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8667: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_866c: stloc.s V_8 - IL_866e: ldloc.s V_8 - IL_8670: ldloc.s V_6 - IL_8672: blt.s IL_86bc - - IL_8674: ldloc.s V_8 - IL_8676: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_867b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8680: stloc.s V_8 - IL_8682: ldloc.s V_7 - IL_8684: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8689: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_868e: stloc.s V_10 - IL_8690: ldloc.s V_8 - IL_8692: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8697: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_869c: stloc.s V_7 - IL_869e: ldloc.s V_9 - IL_86a0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_86a5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_86aa: stloc.s V_7 - IL_86ac: ldloc.s V_8 - IL_86ae: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_86b3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_86b8: stloc.s V_10 - IL_86ba: br.s IL_8702 - - IL_86bc: ldloc.s V_8 - IL_86be: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_86c3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_86c8: stloc.s V_7 - IL_86ca: ldloc.s V_10 - IL_86cc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_86d1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_86d6: stloc.s V_10 - IL_86d8: ldloc.s V_10 - IL_86da: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_86df: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_86e4: stloc.s V_10 - IL_86e6: ldloc.s V_8 - IL_86e8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_86ed: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_86f2: stloc.s V_8 - IL_86f4: ldloc.s V_6 - IL_86f6: call string [mscorlib]System.Convert::ToString(int32) - IL_86fb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8700: stloc.s V_6 - IL_8702: ldloc.s V_10 - IL_8704: ldloc.s V_9 - IL_8706: bge.s IL_8750 - - IL_8708: ldloc.s V_8 - IL_870a: call string [mscorlib]System.Convert::ToString(int32) - IL_870f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8714: stloc.s V_9 - IL_8716: ldloc.s V_6 - IL_8718: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_871d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8722: stloc.s V_9 - IL_8724: ldloc.s V_7 - IL_8726: call string [mscorlib]System.Convert::ToString(int32) - IL_872b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8730: stloc.s V_7 - IL_8732: ldloc.s V_7 - IL_8734: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8739: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_873e: stloc.s V_10 - IL_8740: ldloc.s V_7 - IL_8742: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8747: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_874c: stloc.s V_10 - IL_874e: br.s IL_8796 - - IL_8750: ldloc.s V_10 - IL_8752: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8757: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_875c: stloc.s V_7 - IL_875e: ldloc.s V_6 - IL_8760: call string [mscorlib]System.Convert::ToString(int32) - IL_8765: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_876a: stloc.s V_7 - IL_876c: ldloc.s V_9 - IL_876e: call string [mscorlib]System.Convert::ToString(int32) - IL_8773: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8778: stloc.s V_7 - IL_877a: ldloc.s V_10 - IL_877c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8781: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8786: stloc.s V_9 - IL_8788: ldloc.s V_10 - IL_878a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_878f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8794: stloc.s V_10 - IL_8796: ldloc.s V_10 - IL_8798: ldloc.s V_6 - IL_879a: blt.s IL_87e4 - - IL_879c: ldloc.s V_9 - IL_879e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_87a3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_87a8: stloc.s V_10 - IL_87aa: ldloc.s V_9 - IL_87ac: call string [mscorlib]System.Convert::ToString(int32) - IL_87b1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_87b6: stloc.s V_6 - IL_87b8: ldloc.s V_10 - IL_87ba: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_87bf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_87c4: stloc.s V_7 - IL_87c6: ldloc.s V_10 - IL_87c8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_87cd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_87d2: stloc.s V_8 - IL_87d4: ldloc.s V_8 - IL_87d6: call string [mscorlib]System.Convert::ToString(int32) - IL_87db: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_87e0: stloc.s V_9 - IL_87e2: br.s IL_882a - - IL_87e4: ldloc.s V_7 - IL_87e6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_87eb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_87f0: stloc.s V_6 - IL_87f2: ldloc.s V_6 - IL_87f4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_87f9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_87fe: stloc.s V_6 - IL_8800: ldloc.s V_6 - IL_8802: call string [mscorlib]System.Convert::ToString(int32) - IL_8807: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_880c: stloc.s V_9 - IL_880e: ldloc.s V_10 - IL_8810: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8815: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_881a: stloc.s V_9 - IL_881c: ldloc.s V_7 - IL_881e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8823: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8828: stloc.s V_7 - IL_882a: ldloc.s V_7 - IL_882c: ldloc.s V_7 - IL_882e: bgt.s IL_8878 - - IL_8830: ldloc.s V_7 - IL_8832: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8837: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_883c: stloc.s V_7 - IL_883e: ldloc.s V_8 - IL_8840: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8845: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_884a: stloc.s V_8 - IL_884c: ldloc.s V_6 - IL_884e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8853: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8858: stloc.s V_7 - IL_885a: ldloc.s V_8 - IL_885c: call string [mscorlib]System.Convert::ToString(int32) - IL_8861: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8866: stloc.s V_6 - IL_8868: ldloc.s V_10 - IL_886a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_886f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8874: stloc.s V_10 - IL_8876: br.s IL_88be - - IL_8878: ldloc.s V_8 - IL_887a: call string [mscorlib]System.Convert::ToString(int32) - IL_887f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8884: stloc.s V_7 - IL_8886: ldloc.s V_10 - IL_8888: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_888d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8892: stloc.s V_8 - IL_8894: ldloc.s V_8 - IL_8896: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_889b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_88a0: stloc.s V_10 - IL_88a2: ldloc.s V_9 - IL_88a4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_88a9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_88ae: stloc.s V_8 - IL_88b0: ldloc.s V_10 - IL_88b2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_88b7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_88bc: stloc.s V_9 - IL_88be: ldloc.s V_6 - IL_88c0: ldloc.s V_9 - IL_88c2: bgt.s IL_890c - - IL_88c4: ldloc.s V_8 - IL_88c6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_88cb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_88d0: stloc.s V_9 - IL_88d2: ldloc.s V_8 - IL_88d4: call string [mscorlib]System.Convert::ToString(int32) - IL_88d9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_88de: stloc.s V_7 - IL_88e0: ldloc.s V_10 - IL_88e2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_88e7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_88ec: stloc.s V_10 - IL_88ee: ldloc.s V_10 - IL_88f0: call string [mscorlib]System.Convert::ToString(int32) - IL_88f5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_88fa: stloc.s V_10 - IL_88fc: ldloc.s V_6 - IL_88fe: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8903: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8908: stloc.s V_8 - IL_890a: br.s IL_8952 - - IL_890c: ldloc.s V_10 - IL_890e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8913: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8918: stloc.s V_6 - IL_891a: ldloc.s V_6 - IL_891c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8921: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8926: stloc.s V_10 - IL_8928: ldloc.s V_10 - IL_892a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_892f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8934: stloc.s V_7 - IL_8936: ldloc.s V_10 - IL_8938: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_893d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8942: stloc.s V_9 - IL_8944: ldloc.s V_6 - IL_8946: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_894b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8950: stloc.s V_10 - IL_8952: ldloc.s V_9 - IL_8954: ldloc.s V_9 - IL_8956: bge.s IL_89a0 - - IL_8958: ldloc.s V_9 - IL_895a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_895f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8964: stloc.s V_10 - IL_8966: ldloc.s V_6 - IL_8968: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_896d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8972: stloc.s V_7 - IL_8974: ldloc.s V_7 - IL_8976: call string [mscorlib]System.Convert::ToString(int32) - IL_897b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8980: stloc.s V_10 - IL_8982: ldloc.s V_9 - IL_8984: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8989: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_898e: stloc.s V_6 - IL_8990: ldloc.s V_8 - IL_8992: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8997: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_899c: stloc.s V_9 - IL_899e: br.s IL_89e6 - - IL_89a0: ldloc.s V_6 - IL_89a2: call string [mscorlib]System.Convert::ToString(int32) - IL_89a7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_89ac: stloc.s V_9 - IL_89ae: ldloc.s V_6 - IL_89b0: call string [mscorlib]System.Convert::ToString(int32) - IL_89b5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_89ba: stloc.s V_6 - IL_89bc: ldloc.s V_10 - IL_89be: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_89c3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_89c8: stloc.s V_8 - IL_89ca: ldloc.s V_9 - IL_89cc: call string [mscorlib]System.Convert::ToString(int32) - IL_89d1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_89d6: stloc.s V_9 - IL_89d8: ldloc.s V_8 - IL_89da: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_89df: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_89e4: stloc.s V_8 - IL_89e6: ldloc.s V_10 - IL_89e8: ldloc.s V_10 - IL_89ea: beq.s IL_8a34 - - IL_89ec: ldloc.s V_9 - IL_89ee: call string [mscorlib]System.Convert::ToString(int32) - IL_89f3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_89f8: stloc.s V_6 - IL_89fa: ldloc.s V_9 - IL_89fc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8a01: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8a06: stloc.s V_8 - IL_8a08: ldloc.s V_7 - IL_8a0a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8a0f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8a14: stloc.s V_9 - IL_8a16: ldloc.s V_8 - IL_8a18: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8a1d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8a22: stloc.s V_10 - IL_8a24: ldloc.s V_10 - IL_8a26: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8a2b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8a30: stloc.s V_7 - IL_8a32: br.s IL_8a7a - - IL_8a34: ldloc.s V_10 - IL_8a36: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8a3b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8a40: stloc.s V_8 - IL_8a42: ldloc.s V_10 - IL_8a44: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8a49: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8a4e: stloc.s V_10 - IL_8a50: ldloc.s V_10 - IL_8a52: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8a57: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8a5c: stloc.s V_9 - IL_8a5e: ldloc.s V_8 - IL_8a60: call string [mscorlib]System.Convert::ToString(int32) - IL_8a65: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8a6a: stloc.s V_9 - IL_8a6c: ldloc.s V_9 - IL_8a6e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8a73: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8a78: stloc.s V_7 - IL_8a7a: ldloc.s V_7 - IL_8a7c: ldloc.s V_6 - IL_8a7e: bne.un.s IL_8ac8 - - IL_8a80: ldloc.s V_7 - IL_8a82: call string [mscorlib]System.Convert::ToString(int32) - IL_8a87: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8a8c: stloc.s V_9 - IL_8a8e: ldloc.s V_10 - IL_8a90: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8a95: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8a9a: stloc.s V_9 - IL_8a9c: ldloc.s V_9 - IL_8a9e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8aa3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8aa8: stloc.s V_8 - IL_8aaa: ldloc.s V_6 - IL_8aac: call string [mscorlib]System.Convert::ToString(int32) - IL_8ab1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8ab6: stloc.s V_9 - IL_8ab8: ldloc.s V_9 - IL_8aba: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8abf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8ac4: stloc.s V_8 - IL_8ac6: br.s IL_8b0e - - IL_8ac8: ldloc.s V_10 - IL_8aca: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8acf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8ad4: stloc.s V_9 - IL_8ad6: ldloc.s V_10 - IL_8ad8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8add: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8ae2: stloc.s V_8 - IL_8ae4: ldloc.s V_8 - IL_8ae6: call string [mscorlib]System.Convert::ToString(int32) - IL_8aeb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8af0: stloc.s V_10 - IL_8af2: ldloc.s V_6 - IL_8af4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8af9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8afe: stloc.s V_10 - IL_8b00: ldloc.s V_8 - IL_8b02: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8b07: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8b0c: stloc.s V_7 - IL_8b0e: ldloc.s V_6 - IL_8b10: ldloc.s V_6 - IL_8b12: bne.un.s IL_8b5c - - IL_8b14: ldloc.s V_7 - IL_8b16: call string [mscorlib]System.Convert::ToString(int32) - IL_8b1b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8b20: stloc.s V_8 - IL_8b22: ldloc.s V_10 - IL_8b24: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8b29: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8b2e: stloc.s V_9 - IL_8b30: ldloc.s V_8 - IL_8b32: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8b37: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8b3c: stloc.s V_6 - IL_8b3e: ldloc.s V_8 - IL_8b40: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8b45: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8b4a: stloc.s V_7 - IL_8b4c: ldloc.s V_7 - IL_8b4e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8b53: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8b58: stloc.s V_9 - IL_8b5a: br.s IL_8ba2 - - IL_8b5c: ldloc.s V_8 - IL_8b5e: call string [mscorlib]System.Convert::ToString(int32) - IL_8b63: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8b68: stloc.s V_9 - IL_8b6a: ldloc.s V_7 - IL_8b6c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8b71: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8b76: stloc.s V_10 - IL_8b78: ldloc.s V_6 - IL_8b7a: call string [mscorlib]System.Convert::ToString(int32) - IL_8b7f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8b84: stloc.s V_7 - IL_8b86: ldloc.s V_8 - IL_8b88: call string [mscorlib]System.Convert::ToString(int32) - IL_8b8d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8b92: stloc.s V_9 - IL_8b94: ldloc.s V_6 - IL_8b96: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8b9b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8ba0: stloc.s V_10 - IL_8ba2: ldloc.s V_10 - IL_8ba4: ldloc.s V_9 - IL_8ba6: bge.s IL_8bf0 - - IL_8ba8: ldloc.s V_10 - IL_8baa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8baf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8bb4: stloc.s V_6 - IL_8bb6: ldloc.s V_6 - IL_8bb8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8bbd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8bc2: stloc.s V_8 - IL_8bc4: ldloc.s V_8 - IL_8bc6: call string [mscorlib]System.Convert::ToString(int32) - IL_8bcb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8bd0: stloc.s V_10 - IL_8bd2: ldloc.s V_8 - IL_8bd4: call string [mscorlib]System.Convert::ToString(int32) - IL_8bd9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8bde: stloc.s V_7 - IL_8be0: ldloc.s V_9 - IL_8be2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8be7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8bec: stloc.s V_10 - IL_8bee: br.s IL_8c36 - - IL_8bf0: ldloc.s V_9 - IL_8bf2: call string [mscorlib]System.Convert::ToString(int32) - IL_8bf7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8bfc: stloc.s V_9 - IL_8bfe: ldloc.s V_10 - IL_8c00: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8c05: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8c0a: stloc.s V_10 - IL_8c0c: ldloc.s V_10 - IL_8c0e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8c13: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8c18: stloc.s V_9 - IL_8c1a: ldloc.s V_6 - IL_8c1c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8c21: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8c26: stloc.s V_7 - IL_8c28: ldloc.s V_8 - IL_8c2a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8c2f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8c34: stloc.s V_8 - IL_8c36: ldloc.s V_10 - IL_8c38: ldloc.s V_6 - IL_8c3a: blt.s IL_8c84 - - IL_8c3c: ldloc.s V_10 - IL_8c3e: call string [mscorlib]System.Convert::ToString(int32) - IL_8c43: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8c48: stloc.s V_10 - IL_8c4a: ldloc.s V_8 - IL_8c4c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8c51: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8c56: stloc.s V_8 - IL_8c58: ldloc.s V_9 - IL_8c5a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8c5f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8c64: stloc.s V_8 - IL_8c66: ldloc.s V_10 - IL_8c68: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8c6d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8c72: stloc.s V_9 - IL_8c74: ldloc.s V_8 - IL_8c76: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8c7b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8c80: stloc.s V_8 - IL_8c82: br.s IL_8cca - - IL_8c84: ldloc.s V_7 - IL_8c86: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8c8b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8c90: stloc.s V_9 - IL_8c92: ldloc.s V_6 - IL_8c94: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8c99: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8c9e: stloc.s V_7 - IL_8ca0: ldloc.s V_10 - IL_8ca2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8ca7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8cac: stloc.s V_9 - IL_8cae: ldloc.s V_7 - IL_8cb0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8cb5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8cba: stloc.s V_6 - IL_8cbc: ldloc.s V_7 - IL_8cbe: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8cc3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8cc8: stloc.s V_10 - IL_8cca: ldloc.s V_10 - IL_8ccc: ldloc.s V_9 - IL_8cce: ble.s IL_8d18 - - IL_8cd0: ldloc.s V_8 - IL_8cd2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8cd7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8cdc: stloc.s V_8 - IL_8cde: ldloc.s V_7 - IL_8ce0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8ce5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8cea: stloc.s V_9 - IL_8cec: ldloc.s V_10 - IL_8cee: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8cf3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8cf8: stloc.s V_7 - IL_8cfa: ldloc.s V_7 - IL_8cfc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8d01: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8d06: stloc.s V_7 - IL_8d08: ldloc.s V_6 - IL_8d0a: call string [mscorlib]System.Convert::ToString(int32) - IL_8d0f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8d14: stloc.s V_10 - IL_8d16: br.s IL_8d5e - - IL_8d18: ldloc.s V_6 - IL_8d1a: call string [mscorlib]System.Convert::ToString(int32) - IL_8d1f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8d24: stloc.s V_9 - IL_8d26: ldloc.s V_8 - IL_8d28: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8d2d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8d32: stloc.s V_6 - IL_8d34: ldloc.s V_8 - IL_8d36: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8d3b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8d40: stloc.s V_6 - IL_8d42: ldloc.s V_6 - IL_8d44: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8d49: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8d4e: stloc.s V_6 - IL_8d50: ldloc.s V_8 - IL_8d52: call string [mscorlib]System.Convert::ToString(int32) - IL_8d57: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8d5c: stloc.s V_7 - IL_8d5e: ldloc.s V_8 - IL_8d60: ldloc.s V_6 - IL_8d62: blt.s IL_8dac - - IL_8d64: ldloc.s V_9 - IL_8d66: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8d6b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8d70: stloc.s V_6 - IL_8d72: ldloc.s V_9 - IL_8d74: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8d79: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8d7e: stloc.s V_6 - IL_8d80: ldloc.s V_6 - IL_8d82: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8d87: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8d8c: stloc.s V_6 - IL_8d8e: ldloc.s V_6 - IL_8d90: call string [mscorlib]System.Convert::ToString(int32) - IL_8d95: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8d9a: stloc.s V_6 - IL_8d9c: ldloc.s V_8 - IL_8d9e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8da3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8da8: stloc.s V_9 - IL_8daa: br.s IL_8df2 - - IL_8dac: ldloc.s V_9 - IL_8dae: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8db3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8db8: stloc.s V_7 - IL_8dba: ldloc.s V_9 - IL_8dbc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8dc1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8dc6: stloc.s V_6 - IL_8dc8: ldloc.s V_6 - IL_8dca: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8dcf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8dd4: stloc.s V_7 - IL_8dd6: ldloc.s V_10 - IL_8dd8: call string [mscorlib]System.Convert::ToString(int32) - IL_8ddd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8de2: stloc.s V_6 - IL_8de4: ldloc.s V_9 - IL_8de6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8deb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8df0: stloc.s V_6 - IL_8df2: ldloc.s V_10 - IL_8df4: ldloc.s V_8 - IL_8df6: bgt.s IL_8e40 - - IL_8df8: ldloc.s V_9 - IL_8dfa: call string [mscorlib]System.Convert::ToString(int32) - IL_8dff: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8e04: stloc.s V_6 - IL_8e06: ldloc.s V_9 - IL_8e08: call string [mscorlib]System.Convert::ToString(int32) - IL_8e0d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8e12: stloc.s V_7 - IL_8e14: ldloc.s V_10 - IL_8e16: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8e1b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8e20: stloc.s V_7 - IL_8e22: ldloc.s V_8 - IL_8e24: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8e29: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8e2e: stloc.s V_7 - IL_8e30: ldloc.s V_7 - IL_8e32: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8e37: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8e3c: stloc.s V_7 - IL_8e3e: br.s IL_8e86 - - IL_8e40: ldloc.s V_7 - IL_8e42: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8e47: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8e4c: stloc.s V_9 - IL_8e4e: ldloc.s V_7 - IL_8e50: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8e55: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8e5a: stloc.s V_9 - IL_8e5c: ldloc.s V_9 - IL_8e5e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8e63: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8e68: stloc.s V_7 - IL_8e6a: ldloc.s V_7 - IL_8e6c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8e71: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8e76: stloc.s V_8 - IL_8e78: ldloc.s V_6 - IL_8e7a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8e7f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8e84: stloc.s V_10 - IL_8e86: ldloc.s V_8 - IL_8e88: ldloc.s V_9 - IL_8e8a: blt.s IL_8ed4 - - IL_8e8c: ldloc.s V_8 - IL_8e8e: call string [mscorlib]System.Convert::ToString(int32) - IL_8e93: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8e98: stloc.s V_8 - IL_8e9a: ldloc.s V_9 - IL_8e9c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8ea1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8ea6: stloc.s V_9 - IL_8ea8: ldloc.s V_6 - IL_8eaa: call string [mscorlib]System.Convert::ToString(int32) - IL_8eaf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8eb4: stloc.s V_6 - IL_8eb6: ldloc.s V_8 - IL_8eb8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8ebd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8ec2: stloc.s V_9 - IL_8ec4: ldloc.s V_7 - IL_8ec6: call string [mscorlib]System.Convert::ToString(int32) - IL_8ecb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8ed0: stloc.s V_8 - IL_8ed2: br.s IL_8f1a - - IL_8ed4: ldloc.s V_6 - IL_8ed6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8edb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8ee0: stloc.s V_9 - IL_8ee2: ldloc.s V_9 - IL_8ee4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8ee9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8eee: stloc.s V_7 - IL_8ef0: ldloc.s V_10 - IL_8ef2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8ef7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8efc: stloc.s V_7 - IL_8efe: ldloc.s V_8 - IL_8f00: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8f05: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8f0a: stloc.s V_10 - IL_8f0c: ldloc.s V_6 - IL_8f0e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8f13: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8f18: stloc.s V_7 - IL_8f1a: ldloc.s V_10 - IL_8f1c: ldloc.s V_8 - IL_8f1e: bne.un.s IL_8f68 - - IL_8f20: ldloc.s V_10 - IL_8f22: call string [mscorlib]System.Convert::ToString(int32) - IL_8f27: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8f2c: stloc.s V_10 - IL_8f2e: ldloc.s V_6 - IL_8f30: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8f35: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8f3a: stloc.s V_9 - IL_8f3c: ldloc.s V_8 - IL_8f3e: call string [mscorlib]System.Convert::ToString(int32) - IL_8f43: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8f48: stloc.s V_9 - IL_8f4a: ldloc.s V_10 - IL_8f4c: call string [mscorlib]System.Convert::ToString(int32) - IL_8f51: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8f56: stloc.s V_6 - IL_8f58: ldloc.s V_7 - IL_8f5a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8f5f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8f64: stloc.s V_7 - IL_8f66: br.s IL_8fae - - IL_8f68: ldloc.s V_7 - IL_8f6a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8f6f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8f74: stloc.s V_6 - IL_8f76: ldloc.s V_9 - IL_8f78: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8f7d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8f82: stloc.s V_6 - IL_8f84: ldloc.s V_9 - IL_8f86: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_8f8b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_8f90: stloc.s V_10 - IL_8f92: ldloc.s V_6 - IL_8f94: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8f99: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8f9e: stloc.s V_9 - IL_8fa0: ldloc.s V_7 - IL_8fa2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8fa7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8fac: stloc.s V_7 - IL_8fae: ldloc.s V_10 - IL_8fb0: ldloc.s V_10 - IL_8fb2: ble.s IL_8ffc - - IL_8fb4: ldloc.s V_6 - IL_8fb6: call string [mscorlib]System.Convert::ToString(int32) - IL_8fbb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8fc0: stloc.s V_10 - IL_8fc2: ldloc.s V_8 - IL_8fc4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_8fc9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_8fce: stloc.s V_8 - IL_8fd0: ldloc.s V_7 - IL_8fd2: call string [mscorlib]System.Convert::ToString(int32) - IL_8fd7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8fdc: stloc.s V_6 - IL_8fde: ldloc.s V_7 - IL_8fe0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_8fe5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_8fea: stloc.s V_6 - IL_8fec: ldloc.s V_9 - IL_8fee: call string [mscorlib]System.Convert::ToString(int32) - IL_8ff3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_8ff8: stloc.s V_10 - IL_8ffa: br.s IL_9042 - - IL_8ffc: ldloc.s V_7 - IL_8ffe: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9003: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9008: stloc.s V_6 - IL_900a: ldloc.s V_10 - IL_900c: call string [mscorlib]System.Convert::ToString(int32) - IL_9011: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9016: stloc.s V_9 - IL_9018: ldloc.s V_7 - IL_901a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_901f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9024: stloc.s V_9 - IL_9026: ldloc.s V_6 - IL_9028: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_902d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9032: stloc.s V_7 - IL_9034: ldloc.s V_10 - IL_9036: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_903b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9040: stloc.s V_10 - IL_9042: ldloc.s V_6 - IL_9044: ldloc.s V_8 - IL_9046: bge.s IL_9090 - - IL_9048: ldloc.s V_8 - IL_904a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_904f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9054: stloc.s V_10 - IL_9056: ldloc.s V_7 - IL_9058: call string [mscorlib]System.Convert::ToString(int32) - IL_905d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9062: stloc.s V_7 - IL_9064: ldloc.s V_7 - IL_9066: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_906b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9070: stloc.s V_10 - IL_9072: ldloc.s V_7 - IL_9074: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9079: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_907e: stloc.s V_8 - IL_9080: ldloc.s V_6 - IL_9082: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9087: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_908c: stloc.s V_7 - IL_908e: br.s IL_90d6 - - IL_9090: ldloc.s V_8 - IL_9092: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9097: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_909c: stloc.s V_8 - IL_909e: ldloc.s V_7 - IL_90a0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_90a5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_90aa: stloc.s V_6 - IL_90ac: ldloc.s V_9 - IL_90ae: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_90b3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_90b8: stloc.s V_6 - IL_90ba: ldloc.s V_10 - IL_90bc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_90c1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_90c6: stloc.s V_9 - IL_90c8: ldloc.s V_7 - IL_90ca: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_90cf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_90d4: stloc.s V_8 - IL_90d6: ldloc.s V_10 - IL_90d8: ldloc.s V_10 - IL_90da: blt.s IL_9124 - - IL_90dc: ldloc.s V_8 - IL_90de: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_90e3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_90e8: stloc.s V_9 - IL_90ea: ldloc.s V_9 - IL_90ec: call string [mscorlib]System.Convert::ToString(int32) - IL_90f1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_90f6: stloc.s V_6 - IL_90f8: ldloc.s V_9 - IL_90fa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_90ff: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9104: stloc.s V_10 - IL_9106: ldloc.s V_6 - IL_9108: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_910d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9112: stloc.s V_8 - IL_9114: ldloc.s V_7 - IL_9116: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_911b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9120: stloc.s V_6 - IL_9122: br.s IL_916a - - IL_9124: ldloc.s V_6 - IL_9126: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_912b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9130: stloc.s V_6 - IL_9132: ldloc.s V_9 - IL_9134: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9139: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_913e: stloc.s V_7 - IL_9140: ldloc.s V_6 - IL_9142: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9147: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_914c: stloc.s V_7 - IL_914e: ldloc.s V_7 - IL_9150: call string [mscorlib]System.Convert::ToString(int32) - IL_9155: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_915a: stloc.s V_10 - IL_915c: ldloc.s V_10 - IL_915e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9163: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9168: stloc.s V_7 - IL_916a: ldloc.s V_6 - IL_916c: ldloc.s V_10 - IL_916e: ble.s IL_91b8 - - IL_9170: ldloc.s V_9 - IL_9172: call string [mscorlib]System.Convert::ToString(int32) - IL_9177: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_917c: stloc.s V_8 - IL_917e: ldloc.s V_8 - IL_9180: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9185: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_918a: stloc.s V_9 - IL_918c: ldloc.s V_8 - IL_918e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9193: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9198: stloc.s V_10 - IL_919a: ldloc.s V_10 - IL_919c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_91a1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_91a6: stloc.s V_8 - IL_91a8: ldloc.s V_8 - IL_91aa: call string [mscorlib]System.Convert::ToString(int32) - IL_91af: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_91b4: stloc.s V_8 - IL_91b6: br.s IL_91fe - - IL_91b8: ldloc.s V_9 - IL_91ba: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_91bf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_91c4: stloc.s V_9 - IL_91c6: ldloc.s V_9 - IL_91c8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_91cd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_91d2: stloc.s V_7 - IL_91d4: ldloc.s V_6 - IL_91d6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_91db: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_91e0: stloc.s V_7 - IL_91e2: ldloc.s V_6 - IL_91e4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_91e9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_91ee: stloc.s V_7 - IL_91f0: ldloc.s V_8 - IL_91f2: call string [mscorlib]System.Convert::ToString(int32) - IL_91f7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_91fc: stloc.s V_7 - IL_91fe: ldloc.s V_8 - IL_9200: ldloc.s V_7 - IL_9202: bne.un.s IL_924c - - IL_9204: ldloc.s V_6 - IL_9206: call string [mscorlib]System.Convert::ToString(int32) - IL_920b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9210: stloc.s V_6 - IL_9212: ldloc.s V_7 - IL_9214: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9219: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_921e: stloc.s V_8 - IL_9220: ldloc.s V_6 - IL_9222: call string [mscorlib]System.Convert::ToString(int32) - IL_9227: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_922c: stloc.s V_8 - IL_922e: ldloc.s V_8 - IL_9230: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9235: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_923a: stloc.s V_7 - IL_923c: ldloc.s V_6 - IL_923e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9243: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9248: stloc.s V_6 - IL_924a: br.s IL_9292 - - IL_924c: ldloc.s V_6 - IL_924e: call string [mscorlib]System.Convert::ToString(int32) - IL_9253: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9258: stloc.s V_10 - IL_925a: ldloc.s V_10 - IL_925c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9261: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9266: stloc.s V_7 - IL_9268: ldloc.s V_7 - IL_926a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_926f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9274: stloc.s V_7 - IL_9276: ldloc.s V_10 - IL_9278: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_927d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9282: stloc.s V_9 - IL_9284: ldloc.s V_8 - IL_9286: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_928b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9290: stloc.s V_8 - IL_9292: ldloc.s V_10 - IL_9294: ldloc.s V_10 - IL_9296: beq.s IL_92e0 - - IL_9298: ldloc.s V_6 - IL_929a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_929f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_92a4: stloc.s V_9 - IL_92a6: ldloc.s V_10 - IL_92a8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_92ad: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_92b2: stloc.s V_7 - IL_92b4: ldloc.s V_9 - IL_92b6: call string [mscorlib]System.Convert::ToString(int32) - IL_92bb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_92c0: stloc.s V_7 - IL_92c2: ldloc.s V_8 - IL_92c4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_92c9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_92ce: stloc.s V_8 - IL_92d0: ldloc.s V_10 - IL_92d2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_92d7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_92dc: stloc.s V_9 - IL_92de: br.s IL_9326 - - IL_92e0: ldloc.s V_10 - IL_92e2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_92e7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_92ec: stloc.s V_10 - IL_92ee: ldloc.s V_9 - IL_92f0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_92f5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_92fa: stloc.s V_8 - IL_92fc: ldloc.s V_7 - IL_92fe: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9303: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9308: stloc.s V_7 - IL_930a: ldloc.s V_7 - IL_930c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9311: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9316: stloc.s V_9 - IL_9318: ldloc.s V_6 - IL_931a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_931f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9324: stloc.s V_7 - IL_9326: ldloc.s V_7 - IL_9328: ldloc.s V_10 - IL_932a: bne.un.s IL_9374 - - IL_932c: ldloc.s V_10 - IL_932e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9333: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9338: stloc.s V_8 - IL_933a: ldloc.s V_9 - IL_933c: call string [mscorlib]System.Convert::ToString(int32) - IL_9341: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9346: stloc.s V_6 - IL_9348: ldloc.s V_6 - IL_934a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_934f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9354: stloc.s V_7 - IL_9356: ldloc.s V_7 - IL_9358: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_935d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9362: stloc.s V_7 - IL_9364: ldloc.s V_10 - IL_9366: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_936b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9370: stloc.s V_10 - IL_9372: br.s IL_93ba - - IL_9374: ldloc.s V_6 - IL_9376: call string [mscorlib]System.Convert::ToString(int32) - IL_937b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9380: stloc.s V_10 - IL_9382: ldloc.s V_7 - IL_9384: call string [mscorlib]System.Convert::ToString(int32) - IL_9389: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_938e: stloc.s V_8 - IL_9390: ldloc.s V_8 - IL_9392: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9397: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_939c: stloc.s V_6 - IL_939e: ldloc.s V_7 - IL_93a0: call string [mscorlib]System.Convert::ToString(int32) - IL_93a5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_93aa: stloc.s V_9 - IL_93ac: ldloc.s V_8 - IL_93ae: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_93b3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_93b8: stloc.s V_8 - IL_93ba: ldloc.s V_9 - IL_93bc: ldloc.s V_9 - IL_93be: bgt.s IL_9408 - - IL_93c0: ldloc.s V_6 - IL_93c2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_93c7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_93cc: stloc.s V_8 - IL_93ce: ldloc.s V_9 - IL_93d0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_93d5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_93da: stloc.s V_10 - IL_93dc: ldloc.s V_8 - IL_93de: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_93e3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_93e8: stloc.s V_7 - IL_93ea: ldloc.s V_6 - IL_93ec: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_93f1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_93f6: stloc.s V_9 - IL_93f8: ldloc.s V_9 - IL_93fa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_93ff: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9404: stloc.s V_6 - IL_9406: br.s IL_944e - - IL_9408: ldloc.s V_9 - IL_940a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_940f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9414: stloc.s V_8 - IL_9416: ldloc.s V_9 - IL_9418: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_941d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9422: stloc.s V_10 - IL_9424: ldloc.s V_10 - IL_9426: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_942b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9430: stloc.s V_9 - IL_9432: ldloc.s V_6 - IL_9434: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9439: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_943e: stloc.s V_8 - IL_9440: ldloc.s V_10 - IL_9442: call string [mscorlib]System.Convert::ToString(int32) - IL_9447: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_944c: stloc.s V_7 - IL_944e: ldloc.s V_9 - IL_9450: ldloc.s V_6 - IL_9452: bgt.s IL_949c - - IL_9454: ldloc.s V_10 - IL_9456: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_945b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9460: stloc.s V_8 - IL_9462: ldloc.s V_8 - IL_9464: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9469: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_946e: stloc.s V_9 - IL_9470: ldloc.s V_7 - IL_9472: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9477: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_947c: stloc.s V_7 - IL_947e: ldloc.s V_7 - IL_9480: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9485: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_948a: stloc.s V_10 - IL_948c: ldloc.s V_8 - IL_948e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9493: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9498: stloc.s V_8 - IL_949a: br.s IL_94e2 - - IL_949c: ldloc.s V_9 - IL_949e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_94a3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_94a8: stloc.s V_8 - IL_94aa: ldloc.s V_8 - IL_94ac: call string [mscorlib]System.Convert::ToString(int32) - IL_94b1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_94b6: stloc.s V_10 - IL_94b8: ldloc.s V_8 - IL_94ba: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_94bf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_94c4: stloc.s V_6 - IL_94c6: ldloc.s V_8 - IL_94c8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_94cd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_94d2: stloc.s V_7 - IL_94d4: ldloc.s V_8 - IL_94d6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_94db: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_94e0: stloc.s V_9 - IL_94e2: ldloc.s V_6 - IL_94e4: ldloc.s V_7 - IL_94e6: bne.un.s IL_9530 - - IL_94e8: ldloc.s V_9 - IL_94ea: call string [mscorlib]System.Convert::ToString(int32) - IL_94ef: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_94f4: stloc.s V_10 - IL_94f6: ldloc.s V_7 - IL_94f8: call string [mscorlib]System.Convert::ToString(int32) - IL_94fd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9502: stloc.s V_10 - IL_9504: ldloc.s V_10 - IL_9506: call string [mscorlib]System.Convert::ToString(int32) - IL_950b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9510: stloc.s V_6 - IL_9512: ldloc.s V_6 - IL_9514: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9519: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_951e: stloc.s V_8 - IL_9520: ldloc.s V_10 - IL_9522: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9527: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_952c: stloc.s V_8 - IL_952e: br.s IL_9576 - - IL_9530: ldloc.s V_8 - IL_9532: call string [mscorlib]System.Convert::ToString(int32) - IL_9537: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_953c: stloc.s V_8 - IL_953e: ldloc.s V_10 - IL_9540: call string [mscorlib]System.Convert::ToString(int32) - IL_9545: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_954a: stloc.s V_6 - IL_954c: ldloc.s V_7 - IL_954e: call string [mscorlib]System.Convert::ToString(int32) - IL_9553: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9558: stloc.s V_9 - IL_955a: ldloc.s V_8 - IL_955c: call string [mscorlib]System.Convert::ToString(int32) - IL_9561: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9566: stloc.s V_7 - IL_9568: ldloc.s V_7 - IL_956a: call string [mscorlib]System.Convert::ToString(int32) - IL_956f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9574: stloc.s V_6 - IL_9576: ldloc.s V_6 - IL_9578: ldloc.s V_8 - IL_957a: bne.un.s IL_95c4 - - IL_957c: ldloc.s V_10 - IL_957e: call string [mscorlib]System.Convert::ToString(int32) - IL_9583: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9588: stloc.s V_6 - IL_958a: ldloc.s V_8 - IL_958c: call string [mscorlib]System.Convert::ToString(int32) - IL_9591: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9596: stloc.s V_10 - IL_9598: ldloc.s V_6 - IL_959a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_959f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_95a4: stloc.s V_7 - IL_95a6: ldloc.s V_6 - IL_95a8: call string [mscorlib]System.Convert::ToString(int32) - IL_95ad: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_95b2: stloc.s V_8 - IL_95b4: ldloc.s V_8 - IL_95b6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_95bb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_95c0: stloc.s V_8 - IL_95c2: br.s IL_960a - - IL_95c4: ldloc.s V_7 - IL_95c6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_95cb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_95d0: stloc.s V_8 - IL_95d2: ldloc.s V_7 - IL_95d4: call string [mscorlib]System.Convert::ToString(int32) - IL_95d9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_95de: stloc.s V_6 - IL_95e0: ldloc.s V_6 - IL_95e2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_95e7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_95ec: stloc.s V_8 - IL_95ee: ldloc.s V_6 - IL_95f0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_95f5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_95fa: stloc.s V_7 - IL_95fc: ldloc.s V_10 - IL_95fe: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9603: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9608: stloc.s V_9 - IL_960a: ldloc.s V_9 - IL_960c: ldloc.s V_9 - IL_960e: bgt.s IL_9658 - - IL_9610: ldloc.s V_7 - IL_9612: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9617: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_961c: stloc.s V_8 - IL_961e: ldloc.s V_6 - IL_9620: call string [mscorlib]System.Convert::ToString(int32) - IL_9625: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_962a: stloc.s V_6 - IL_962c: ldloc.s V_10 - IL_962e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9633: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9638: stloc.s V_10 - IL_963a: ldloc.s V_10 - IL_963c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9641: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9646: stloc.s V_10 - IL_9648: ldloc.s V_10 - IL_964a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_964f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9654: stloc.s V_6 - IL_9656: br.s IL_969e - - IL_9658: ldloc.s V_9 - IL_965a: call string [mscorlib]System.Convert::ToString(int32) - IL_965f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9664: stloc.s V_10 - IL_9666: ldloc.s V_9 - IL_9668: call string [mscorlib]System.Convert::ToString(int32) - IL_966d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9672: stloc.s V_6 - IL_9674: ldloc.s V_8 - IL_9676: call string [mscorlib]System.Convert::ToString(int32) - IL_967b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9680: stloc.s V_6 - IL_9682: ldloc.s V_7 - IL_9684: call string [mscorlib]System.Convert::ToString(int32) - IL_9689: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_968e: stloc.s V_9 - IL_9690: ldloc.s V_6 - IL_9692: call string [mscorlib]System.Convert::ToString(int32) - IL_9697: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_969c: stloc.s V_8 - IL_969e: ldloc.s V_6 - IL_96a0: ldloc.s V_10 - IL_96a2: bge.s IL_96ec - - IL_96a4: ldloc.s V_7 - IL_96a6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_96ab: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_96b0: stloc.s V_8 - IL_96b2: ldloc.s V_8 - IL_96b4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_96b9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_96be: stloc.s V_7 - IL_96c0: ldloc.s V_9 - IL_96c2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_96c7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_96cc: stloc.s V_7 - IL_96ce: ldloc.s V_6 - IL_96d0: call string [mscorlib]System.Convert::ToString(int32) - IL_96d5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_96da: stloc.s V_8 - IL_96dc: ldloc.s V_9 - IL_96de: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_96e3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_96e8: stloc.s V_6 - IL_96ea: br.s IL_9732 - - IL_96ec: ldloc.s V_7 - IL_96ee: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_96f3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_96f8: stloc.s V_7 - IL_96fa: ldloc.s V_6 - IL_96fc: call string [mscorlib]System.Convert::ToString(int32) - IL_9701: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9706: stloc.s V_7 - IL_9708: ldloc.s V_10 - IL_970a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_970f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9714: stloc.s V_6 - IL_9716: ldloc.s V_6 - IL_9718: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_971d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9722: stloc.s V_10 - IL_9724: ldloc.s V_6 - IL_9726: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_972b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9730: stloc.s V_10 - IL_9732: ldloc.s V_8 - IL_9734: ldloc.s V_6 - IL_9736: bne.un.s IL_9780 - - IL_9738: ldloc.s V_9 - IL_973a: call string [mscorlib]System.Convert::ToString(int32) - IL_973f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9744: stloc.s V_6 - IL_9746: ldloc.s V_7 - IL_9748: call string [mscorlib]System.Convert::ToString(int32) - IL_974d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9752: stloc.s V_8 - IL_9754: ldloc.s V_7 - IL_9756: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_975b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9760: stloc.s V_6 - IL_9762: ldloc.s V_6 - IL_9764: call string [mscorlib]System.Convert::ToString(int32) - IL_9769: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_976e: stloc.s V_10 - IL_9770: ldloc.s V_7 - IL_9772: call string [mscorlib]System.Convert::ToString(int32) - IL_9777: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_977c: stloc.s V_7 - IL_977e: br.s IL_97c6 - - IL_9780: ldloc.s V_10 - IL_9782: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9787: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_978c: stloc.s V_8 - IL_978e: ldloc.s V_8 - IL_9790: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9795: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_979a: stloc.s V_9 - IL_979c: ldloc.s V_9 - IL_979e: call string [mscorlib]System.Convert::ToString(int32) - IL_97a3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_97a8: stloc.s V_9 - IL_97aa: ldloc.s V_6 - IL_97ac: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_97b1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_97b6: stloc.s V_8 - IL_97b8: ldloc.s V_10 - IL_97ba: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_97bf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_97c4: stloc.s V_7 - IL_97c6: ldloc.s V_9 - IL_97c8: ldloc.s V_6 - IL_97ca: bgt.s IL_9814 - - IL_97cc: ldloc.s V_9 - IL_97ce: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_97d3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_97d8: stloc.s V_6 - IL_97da: ldloc.s V_6 - IL_97dc: call string [mscorlib]System.Convert::ToString(int32) - IL_97e1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_97e6: stloc.s V_10 - IL_97e8: ldloc.s V_9 - IL_97ea: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_97ef: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_97f4: stloc.s V_6 - IL_97f6: ldloc.s V_9 - IL_97f8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_97fd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9802: stloc.s V_9 - IL_9804: ldloc.s V_9 - IL_9806: call string [mscorlib]System.Convert::ToString(int32) - IL_980b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9810: stloc.s V_10 - IL_9812: br.s IL_985a - - IL_9814: ldloc.s V_6 - IL_9816: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_981b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9820: stloc.s V_10 - IL_9822: ldloc.s V_8 - IL_9824: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9829: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_982e: stloc.s V_7 - IL_9830: ldloc.s V_10 - IL_9832: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9837: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_983c: stloc.s V_8 - IL_983e: ldloc.s V_6 - IL_9840: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9845: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_984a: stloc.s V_6 - IL_984c: ldloc.s V_7 - IL_984e: call string [mscorlib]System.Convert::ToString(int32) - IL_9853: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9858: stloc.s V_6 - IL_985a: ldloc.s V_7 - IL_985c: ldloc.s V_10 - IL_985e: blt.s IL_98a8 - - IL_9860: ldloc.s V_8 - IL_9862: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9867: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_986c: stloc.s V_6 - IL_986e: ldloc.s V_8 - IL_9870: call string [mscorlib]System.Convert::ToString(int32) - IL_9875: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_987a: stloc.s V_8 - IL_987c: ldloc.s V_10 - IL_987e: call string [mscorlib]System.Convert::ToString(int32) - IL_9883: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9888: stloc.s V_9 - IL_988a: ldloc.s V_8 - IL_988c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9891: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9896: stloc.s V_9 - IL_9898: ldloc.s V_10 - IL_989a: call string [mscorlib]System.Convert::ToString(int32) - IL_989f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_98a4: stloc.s V_10 - IL_98a6: br.s IL_98ee - - IL_98a8: ldloc.s V_6 - IL_98aa: call string [mscorlib]System.Convert::ToString(int32) - IL_98af: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_98b4: stloc.s V_7 - IL_98b6: ldloc.s V_9 - IL_98b8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_98bd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_98c2: stloc.s V_10 - IL_98c4: ldloc.s V_10 - IL_98c6: call string [mscorlib]System.Convert::ToString(int32) - IL_98cb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_98d0: stloc.s V_8 - IL_98d2: ldloc.s V_9 - IL_98d4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_98d9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_98de: stloc.s V_9 - IL_98e0: ldloc.s V_8 - IL_98e2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_98e7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_98ec: stloc.s V_6 - IL_98ee: ldloc.s V_7 - IL_98f0: ldloc.s V_10 - IL_98f2: blt.s IL_993c - - IL_98f4: ldloc.s V_8 - IL_98f6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_98fb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9900: stloc.s V_10 - IL_9902: ldloc.s V_9 - IL_9904: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9909: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_990e: stloc.s V_7 - IL_9910: ldloc.s V_7 - IL_9912: call string [mscorlib]System.Convert::ToString(int32) - IL_9917: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_991c: stloc.s V_8 - IL_991e: ldloc.s V_7 - IL_9920: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9925: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_992a: stloc.s V_8 - IL_992c: ldloc.s V_7 - IL_992e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9933: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9938: stloc.s V_8 - IL_993a: br.s IL_9982 - - IL_993c: ldloc.s V_7 - IL_993e: call string [mscorlib]System.Convert::ToString(int32) - IL_9943: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9948: stloc.s V_7 - IL_994a: ldloc.s V_10 - IL_994c: call string [mscorlib]System.Convert::ToString(int32) - IL_9951: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9956: stloc.s V_6 - IL_9958: ldloc.s V_8 - IL_995a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_995f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9964: stloc.s V_7 - IL_9966: ldloc.s V_9 - IL_9968: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_996d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9972: stloc.s V_8 - IL_9974: ldloc.s V_9 - IL_9976: call string [mscorlib]System.Convert::ToString(int32) - IL_997b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9980: stloc.s V_10 - IL_9982: ldloc.s V_7 - IL_9984: ldloc.s V_9 - IL_9986: bgt.s IL_99d0 - - IL_9988: ldloc.s V_10 - IL_998a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_998f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9994: stloc.s V_8 - IL_9996: ldloc.s V_6 - IL_9998: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_999d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_99a2: stloc.s V_7 - IL_99a4: ldloc.s V_9 - IL_99a6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_99ab: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_99b0: stloc.s V_7 - IL_99b2: ldloc.s V_10 - IL_99b4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_99b9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_99be: stloc.s V_8 - IL_99c0: ldloc.s V_8 - IL_99c2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_99c7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_99cc: stloc.s V_9 - IL_99ce: br.s IL_9a16 - - IL_99d0: ldloc.s V_7 - IL_99d2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_99d7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_99dc: stloc.s V_7 - IL_99de: ldloc.s V_9 - IL_99e0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_99e5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_99ea: stloc.s V_6 - IL_99ec: ldloc.s V_7 - IL_99ee: call string [mscorlib]System.Convert::ToString(int32) - IL_99f3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_99f8: stloc.s V_6 - IL_99fa: ldloc.s V_9 - IL_99fc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9a01: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9a06: stloc.s V_6 - IL_9a08: ldloc.s V_10 - IL_9a0a: call string [mscorlib]System.Convert::ToString(int32) - IL_9a0f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9a14: stloc.s V_6 - IL_9a16: ldloc.s V_10 - IL_9a18: ldloc.s V_8 - IL_9a1a: blt.s IL_9a64 - - IL_9a1c: ldloc.s V_7 - IL_9a1e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9a23: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9a28: stloc.s V_8 - IL_9a2a: ldloc.s V_8 - IL_9a2c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9a31: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9a36: stloc.s V_8 - IL_9a38: ldloc.s V_7 - IL_9a3a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9a3f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9a44: stloc.s V_6 - IL_9a46: ldloc.s V_7 - IL_9a48: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9a4d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9a52: stloc.s V_6 - IL_9a54: ldloc.s V_9 - IL_9a56: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9a5b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9a60: stloc.s V_9 - IL_9a62: br.s IL_9aaa - - IL_9a64: ldloc.s V_10 - IL_9a66: call string [mscorlib]System.Convert::ToString(int32) - IL_9a6b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9a70: stloc.s V_6 - IL_9a72: ldloc.s V_6 - IL_9a74: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9a79: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9a7e: stloc.s V_8 - IL_9a80: ldloc.s V_8 - IL_9a82: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9a87: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9a8c: stloc.s V_10 - IL_9a8e: ldloc.s V_7 - IL_9a90: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9a95: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9a9a: stloc.s V_8 - IL_9a9c: ldloc.s V_9 - IL_9a9e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9aa3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9aa8: stloc.s V_8 - IL_9aaa: ldloc.s V_10 - IL_9aac: ldloc.s V_6 - IL_9aae: bne.un.s IL_9af8 - - IL_9ab0: ldloc.s V_6 - IL_9ab2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9ab7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9abc: stloc.s V_8 - IL_9abe: ldloc.s V_10 - IL_9ac0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9ac5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9aca: stloc.s V_7 - IL_9acc: ldloc.s V_8 - IL_9ace: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9ad3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9ad8: stloc.s V_9 - IL_9ada: ldloc.s V_10 - IL_9adc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9ae1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9ae6: stloc.s V_8 - IL_9ae8: ldloc.s V_10 - IL_9aea: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9aef: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9af4: stloc.s V_6 - IL_9af6: br.s IL_9b3e - - IL_9af8: ldloc.s V_6 - IL_9afa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9aff: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9b04: stloc.s V_6 - IL_9b06: ldloc.s V_9 - IL_9b08: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9b0d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9b12: stloc.s V_6 - IL_9b14: ldloc.s V_9 - IL_9b16: call string [mscorlib]System.Convert::ToString(int32) - IL_9b1b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9b20: stloc.s V_7 - IL_9b22: ldloc.s V_9 - IL_9b24: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9b29: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9b2e: stloc.s V_9 - IL_9b30: ldloc.s V_8 - IL_9b32: call string [mscorlib]System.Convert::ToString(int32) - IL_9b37: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9b3c: stloc.s V_7 - IL_9b3e: ldloc.s V_8 - IL_9b40: ldloc.s V_10 - IL_9b42: bgt.s IL_9b8c - - IL_9b44: ldloc.s V_9 - IL_9b46: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9b4b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9b50: stloc.s V_7 - IL_9b52: ldloc.s V_9 - IL_9b54: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9b59: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9b5e: stloc.s V_8 - IL_9b60: ldloc.s V_7 - IL_9b62: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9b67: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9b6c: stloc.s V_6 - IL_9b6e: ldloc.s V_8 - IL_9b70: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9b75: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9b7a: stloc.s V_9 - IL_9b7c: ldloc.s V_9 - IL_9b7e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9b83: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9b88: stloc.s V_9 - IL_9b8a: br.s IL_9bd2 - - IL_9b8c: ldloc.s V_7 - IL_9b8e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9b93: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9b98: stloc.s V_7 - IL_9b9a: ldloc.s V_10 - IL_9b9c: call string [mscorlib]System.Convert::ToString(int32) - IL_9ba1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9ba6: stloc.s V_9 - IL_9ba8: ldloc.s V_8 - IL_9baa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9baf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9bb4: stloc.s V_8 - IL_9bb6: ldloc.s V_9 - IL_9bb8: call string [mscorlib]System.Convert::ToString(int32) - IL_9bbd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9bc2: stloc.s V_7 - IL_9bc4: ldloc.s V_8 - IL_9bc6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9bcb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9bd0: stloc.s V_6 - IL_9bd2: ldloc.s V_10 - IL_9bd4: ldloc.s V_8 - IL_9bd6: bne.un.s IL_9c20 - - IL_9bd8: ldloc.s V_7 - IL_9bda: call string [mscorlib]System.Convert::ToString(int32) - IL_9bdf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9be4: stloc.s V_6 - IL_9be6: ldloc.s V_7 - IL_9be8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9bed: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9bf2: stloc.s V_7 - IL_9bf4: ldloc.s V_6 - IL_9bf6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9bfb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9c00: stloc.s V_7 - IL_9c02: ldloc.s V_6 - IL_9c04: call string [mscorlib]System.Convert::ToString(int32) - IL_9c09: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9c0e: stloc.s V_8 - IL_9c10: ldloc.s V_9 - IL_9c12: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9c17: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9c1c: stloc.s V_6 - IL_9c1e: br.s IL_9c66 - - IL_9c20: ldloc.s V_6 - IL_9c22: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9c27: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9c2c: stloc.s V_10 - IL_9c2e: ldloc.s V_10 - IL_9c30: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9c35: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9c3a: stloc.s V_7 - IL_9c3c: ldloc.s V_6 - IL_9c3e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9c43: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9c48: stloc.s V_10 - IL_9c4a: ldloc.s V_6 - IL_9c4c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9c51: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9c56: stloc.s V_6 - IL_9c58: ldloc.s V_8 - IL_9c5a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9c5f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9c64: stloc.s V_6 - IL_9c66: ldloc.s V_10 - IL_9c68: ldloc.s V_9 - IL_9c6a: bne.un.s IL_9cb4 - - IL_9c6c: ldloc.s V_9 - IL_9c6e: call string [mscorlib]System.Convert::ToString(int32) - IL_9c73: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9c78: stloc.s V_6 - IL_9c7a: ldloc.s V_6 - IL_9c7c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9c81: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9c86: stloc.s V_8 - IL_9c88: ldloc.s V_8 - IL_9c8a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9c8f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9c94: stloc.s V_6 - IL_9c96: ldloc.s V_8 - IL_9c98: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9c9d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9ca2: stloc.s V_10 - IL_9ca4: ldloc.s V_8 - IL_9ca6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9cab: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9cb0: stloc.s V_7 - IL_9cb2: br.s IL_9cfa - - IL_9cb4: ldloc.s V_8 - IL_9cb6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9cbb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9cc0: stloc.s V_6 - IL_9cc2: ldloc.s V_10 - IL_9cc4: call string [mscorlib]System.Convert::ToString(int32) - IL_9cc9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9cce: stloc.s V_8 - IL_9cd0: ldloc.s V_10 - IL_9cd2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9cd7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9cdc: stloc.s V_9 - IL_9cde: ldloc.s V_7 - IL_9ce0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9ce5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9cea: stloc.s V_6 - IL_9cec: ldloc.s V_6 - IL_9cee: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9cf3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9cf8: stloc.s V_6 - IL_9cfa: ldloc.s V_9 - IL_9cfc: ldloc.s V_9 - IL_9cfe: bgt.s IL_9d48 - - IL_9d00: ldloc.s V_8 - IL_9d02: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9d07: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9d0c: stloc.s V_8 - IL_9d0e: ldloc.s V_10 - IL_9d10: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9d15: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9d1a: stloc.s V_10 - IL_9d1c: ldloc.s V_9 - IL_9d1e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9d23: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9d28: stloc.s V_6 - IL_9d2a: ldloc.s V_10 - IL_9d2c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9d31: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9d36: stloc.s V_7 - IL_9d38: ldloc.s V_10 - IL_9d3a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9d3f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9d44: stloc.s V_8 - IL_9d46: br.s IL_9d8e - - IL_9d48: ldloc.s V_9 - IL_9d4a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9d4f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9d54: stloc.s V_9 - IL_9d56: ldloc.s V_7 - IL_9d58: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9d5d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9d62: stloc.s V_10 - IL_9d64: ldloc.s V_7 - IL_9d66: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9d6b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9d70: stloc.s V_9 - IL_9d72: ldloc.s V_10 - IL_9d74: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9d79: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9d7e: stloc.s V_10 - IL_9d80: ldloc.s V_6 - IL_9d82: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9d87: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9d8c: stloc.s V_9 - IL_9d8e: ldloc.s V_7 - IL_9d90: ldloc.s V_7 - IL_9d92: bge.s IL_9ddc - - IL_9d94: ldloc.s V_6 - IL_9d96: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9d9b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9da0: stloc.s V_9 - IL_9da2: ldloc.s V_10 - IL_9da4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9da9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9dae: stloc.s V_10 - IL_9db0: ldloc.s V_7 - IL_9db2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9db7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9dbc: stloc.s V_9 - IL_9dbe: ldloc.s V_7 - IL_9dc0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9dc5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9dca: stloc.s V_7 - IL_9dcc: ldloc.s V_7 - IL_9dce: call string [mscorlib]System.Convert::ToString(int32) - IL_9dd3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9dd8: stloc.s V_6 - IL_9dda: br.s IL_9e22 - - IL_9ddc: ldloc.s V_7 - IL_9dde: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9de3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9de8: stloc.s V_7 - IL_9dea: ldloc.s V_8 - IL_9dec: call string [mscorlib]System.Convert::ToString(int32) - IL_9df1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9df6: stloc.s V_8 - IL_9df8: ldloc.s V_9 - IL_9dfa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9dff: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9e04: stloc.s V_7 - IL_9e06: ldloc.s V_10 - IL_9e08: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9e0d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9e12: stloc.s V_6 - IL_9e14: ldloc.s V_7 - IL_9e16: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9e1b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9e20: stloc.s V_10 - IL_9e22: ldloc.s V_6 - IL_9e24: ldloc.s V_9 - IL_9e26: bgt.s IL_9e70 - - IL_9e28: ldloc.s V_10 - IL_9e2a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9e2f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9e34: stloc.s V_8 - IL_9e36: ldloc.s V_9 - IL_9e38: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9e3d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9e42: stloc.s V_10 - IL_9e44: ldloc.s V_10 - IL_9e46: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9e4b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9e50: stloc.s V_10 - IL_9e52: ldloc.s V_6 - IL_9e54: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9e59: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9e5e: stloc.s V_6 - IL_9e60: ldloc.s V_10 - IL_9e62: call string [mscorlib]System.Convert::ToString(int32) - IL_9e67: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9e6c: stloc.s V_6 - IL_9e6e: br.s IL_9eb6 - - IL_9e70: ldloc.s V_9 - IL_9e72: call string [mscorlib]System.Convert::ToString(int32) - IL_9e77: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9e7c: stloc.s V_8 - IL_9e7e: ldloc.s V_9 - IL_9e80: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9e85: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9e8a: stloc.s V_9 - IL_9e8c: ldloc.s V_10 - IL_9e8e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9e93: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9e98: stloc.s V_10 - IL_9e9a: ldloc.s V_6 - IL_9e9c: call string [mscorlib]System.Convert::ToString(int32) - IL_9ea1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9ea6: stloc.s V_7 - IL_9ea8: ldloc.s V_6 - IL_9eaa: call string [mscorlib]System.Convert::ToString(int32) - IL_9eaf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9eb4: stloc.s V_10 - IL_9eb6: ldloc.s V_9 - IL_9eb8: ldloc.s V_6 - IL_9eba: ble.s IL_9f04 - - IL_9ebc: ldloc.s V_9 - IL_9ebe: call string [mscorlib]System.Convert::ToString(int32) - IL_9ec3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9ec8: stloc.s V_9 - IL_9eca: ldloc.s V_8 - IL_9ecc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9ed1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9ed6: stloc.s V_8 - IL_9ed8: ldloc.s V_7 - IL_9eda: call string [mscorlib]System.Convert::ToString(int32) - IL_9edf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9ee4: stloc.s V_9 - IL_9ee6: ldloc.s V_8 - IL_9ee8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9eed: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9ef2: stloc.s V_8 - IL_9ef4: ldloc.s V_7 - IL_9ef6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9efb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9f00: stloc.s V_9 - IL_9f02: br.s IL_9f4a - - IL_9f04: ldloc.s V_10 - IL_9f06: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9f0b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9f10: stloc.s V_10 - IL_9f12: ldloc.s V_7 - IL_9f14: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9f19: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9f1e: stloc.s V_8 - IL_9f20: ldloc.s V_7 - IL_9f22: call string [mscorlib]System.Convert::ToString(int32) - IL_9f27: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9f2c: stloc.s V_6 - IL_9f2e: ldloc.s V_6 - IL_9f30: call string [mscorlib]System.Convert::ToString(int32) - IL_9f35: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9f3a: stloc.s V_10 - IL_9f3c: ldloc.s V_8 - IL_9f3e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9f43: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9f48: stloc.s V_8 - IL_9f4a: ldloc.s V_6 - IL_9f4c: ldloc.s V_9 - IL_9f4e: beq.s IL_9f98 - - IL_9f50: ldloc.s V_6 - IL_9f52: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9f57: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9f5c: stloc.s V_10 - IL_9f5e: ldloc.s V_6 - IL_9f60: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9f65: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9f6a: stloc.s V_7 - IL_9f6c: ldloc.s V_7 - IL_9f6e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_9f73: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_9f78: stloc.s V_6 - IL_9f7a: ldloc.s V_6 - IL_9f7c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9f81: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9f86: stloc.s V_7 - IL_9f88: ldloc.s V_8 - IL_9f8a: call string [mscorlib]System.Convert::ToString(int32) - IL_9f8f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9f94: stloc.s V_8 - IL_9f96: br.s IL_9fde - - IL_9f98: ldloc.s V_7 - IL_9f9a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9f9f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9fa4: stloc.s V_9 - IL_9fa6: ldloc.s V_9 - IL_9fa8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9fad: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9fb2: stloc.s V_7 - IL_9fb4: ldloc.s V_10 - IL_9fb6: call string [mscorlib]System.Convert::ToString(int32) - IL_9fbb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9fc0: stloc.s V_10 - IL_9fc2: ldloc.s V_9 - IL_9fc4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_9fc9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_9fce: stloc.s V_7 - IL_9fd0: ldloc.s V_8 - IL_9fd2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_9fd7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_9fdc: stloc.s V_8 - IL_9fde: ldloc.s V_9 - IL_9fe0: ldloc.s V_6 - IL_9fe2: bne.un.s IL_a02c - - IL_9fe4: ldloc.s V_9 - IL_9fe6: call string [mscorlib]System.Convert::ToString(int32) - IL_9feb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9ff0: stloc.s V_10 - IL_9ff2: ldloc.s V_7 - IL_9ff4: call string [mscorlib]System.Convert::ToString(int32) - IL_9ff9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_9ffe: stloc.s V_7 - IL_a000: ldloc.s V_6 - IL_a002: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a007: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a00c: stloc.s V_9 - IL_a00e: ldloc.s V_7 - IL_a010: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a015: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a01a: stloc.s V_10 - IL_a01c: ldloc.s V_10 - IL_a01e: call string [mscorlib]System.Convert::ToString(int32) - IL_a023: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a028: stloc.s V_6 - IL_a02a: br.s IL_a072 - - IL_a02c: ldloc.s V_9 - IL_a02e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a033: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a038: stloc.s V_8 - IL_a03a: ldloc.s V_9 - IL_a03c: call string [mscorlib]System.Convert::ToString(int32) - IL_a041: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a046: stloc.s V_7 - IL_a048: ldloc.s V_9 - IL_a04a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a04f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a054: stloc.s V_10 - IL_a056: ldloc.s V_9 - IL_a058: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a05d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a062: stloc.s V_6 - IL_a064: ldloc.s V_10 - IL_a066: call string [mscorlib]System.Convert::ToString(int32) - IL_a06b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a070: stloc.s V_7 - IL_a072: ldloc.s V_8 - IL_a074: ldloc.s V_9 - IL_a076: bne.un.s IL_a0c0 - - IL_a078: ldloc.s V_6 - IL_a07a: call string [mscorlib]System.Convert::ToString(int32) - IL_a07f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a084: stloc.s V_6 - IL_a086: ldloc.s V_8 - IL_a088: call string [mscorlib]System.Convert::ToString(int32) - IL_a08d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a092: stloc.s V_10 - IL_a094: ldloc.s V_6 - IL_a096: call string [mscorlib]System.Convert::ToString(int32) - IL_a09b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a0a0: stloc.s V_10 - IL_a0a2: ldloc.s V_10 - IL_a0a4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a0a9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a0ae: stloc.s V_9 - IL_a0b0: ldloc.s V_10 - IL_a0b2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a0b7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a0bc: stloc.s V_9 - IL_a0be: br.s IL_a106 - - IL_a0c0: ldloc.s V_7 - IL_a0c2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a0c7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a0cc: stloc.s V_10 - IL_a0ce: ldloc.s V_10 - IL_a0d0: call string [mscorlib]System.Convert::ToString(int32) - IL_a0d5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a0da: stloc.s V_10 - IL_a0dc: ldloc.s V_9 - IL_a0de: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a0e3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a0e8: stloc.s V_8 - IL_a0ea: ldloc.s V_9 - IL_a0ec: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a0f1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a0f6: stloc.s V_10 - IL_a0f8: ldloc.s V_9 - IL_a0fa: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a0ff: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a104: stloc.s V_9 - IL_a106: ldloc.s V_6 - IL_a108: ldloc.s V_7 - IL_a10a: bge.s IL_a154 - - IL_a10c: ldloc.s V_10 - IL_a10e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a113: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a118: stloc.s V_8 - IL_a11a: ldloc.s V_6 - IL_a11c: call string [mscorlib]System.Convert::ToString(int32) - IL_a121: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a126: stloc.s V_10 - IL_a128: ldloc.s V_6 - IL_a12a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a12f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a134: stloc.s V_7 - IL_a136: ldloc.s V_10 - IL_a138: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a13d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a142: stloc.s V_8 - IL_a144: ldloc.s V_10 - IL_a146: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a14b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a150: stloc.s V_10 - IL_a152: br.s IL_a19a - - IL_a154: ldloc.s V_10 - IL_a156: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a15b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a160: stloc.s V_9 - IL_a162: ldloc.s V_10 - IL_a164: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a169: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a16e: stloc.s V_8 - IL_a170: ldloc.s V_8 - IL_a172: call string [mscorlib]System.Convert::ToString(int32) - IL_a177: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a17c: stloc.s V_10 - IL_a17e: ldloc.s V_8 - IL_a180: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a185: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a18a: stloc.s V_7 - IL_a18c: ldloc.s V_7 - IL_a18e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a193: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a198: stloc.s V_10 - IL_a19a: ldloc.s V_8 - IL_a19c: ldloc.s V_10 - IL_a19e: blt.s IL_a1e8 - - IL_a1a0: ldloc.s V_6 - IL_a1a2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a1a7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a1ac: stloc.s V_8 - IL_a1ae: ldloc.s V_7 - IL_a1b0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a1b5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a1ba: stloc.s V_6 - IL_a1bc: ldloc.s V_7 - IL_a1be: call string [mscorlib]System.Convert::ToString(int32) - IL_a1c3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a1c8: stloc.s V_7 - IL_a1ca: ldloc.s V_10 - IL_a1cc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a1d1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a1d6: stloc.s V_10 - IL_a1d8: ldloc.s V_9 - IL_a1da: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a1df: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a1e4: stloc.s V_9 - IL_a1e6: br.s IL_a22e - - IL_a1e8: ldloc.s V_10 - IL_a1ea: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a1ef: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a1f4: stloc.s V_9 - IL_a1f6: ldloc.s V_7 - IL_a1f8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a1fd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a202: stloc.s V_10 - IL_a204: ldloc.s V_8 - IL_a206: call string [mscorlib]System.Convert::ToString(int32) - IL_a20b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a210: stloc.s V_7 - IL_a212: ldloc.s V_9 - IL_a214: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a219: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a21e: stloc.s V_8 - IL_a220: ldloc.s V_10 - IL_a222: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a227: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a22c: stloc.s V_9 - IL_a22e: ldloc.s V_7 - IL_a230: ldloc.s V_8 - IL_a232: bne.un.s IL_a27c - - IL_a234: ldloc.s V_6 - IL_a236: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a23b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a240: stloc.s V_6 - IL_a242: ldloc.s V_7 - IL_a244: call string [mscorlib]System.Convert::ToString(int32) - IL_a249: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a24e: stloc.s V_9 - IL_a250: ldloc.s V_7 - IL_a252: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a257: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a25c: stloc.s V_8 - IL_a25e: ldloc.s V_9 - IL_a260: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a265: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a26a: stloc.s V_9 - IL_a26c: ldloc.s V_10 - IL_a26e: call string [mscorlib]System.Convert::ToString(int32) - IL_a273: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a278: stloc.s V_9 - IL_a27a: br.s IL_a2c2 - - IL_a27c: ldloc.s V_6 - IL_a27e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a283: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a288: stloc.s V_10 - IL_a28a: ldloc.s V_10 - IL_a28c: call string [mscorlib]System.Convert::ToString(int32) - IL_a291: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a296: stloc.s V_8 - IL_a298: ldloc.s V_9 - IL_a29a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a29f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a2a4: stloc.s V_9 - IL_a2a6: ldloc.s V_9 - IL_a2a8: call string [mscorlib]System.Convert::ToString(int32) - IL_a2ad: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a2b2: stloc.s V_8 - IL_a2b4: ldloc.s V_7 - IL_a2b6: call string [mscorlib]System.Convert::ToString(int32) - IL_a2bb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a2c0: stloc.s V_8 - IL_a2c2: ldloc.s V_6 - IL_a2c4: ldloc.s V_9 - IL_a2c6: bge.s IL_a310 - - IL_a2c8: ldloc.s V_8 - IL_a2ca: call string [mscorlib]System.Convert::ToString(int32) - IL_a2cf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a2d4: stloc.s V_7 - IL_a2d6: ldloc.s V_8 - IL_a2d8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a2dd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a2e2: stloc.s V_8 - IL_a2e4: ldloc.s V_8 - IL_a2e6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a2eb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a2f0: stloc.s V_8 - IL_a2f2: ldloc.s V_9 - IL_a2f4: call string [mscorlib]System.Convert::ToString(int32) - IL_a2f9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a2fe: stloc.s V_10 - IL_a300: ldloc.s V_10 - IL_a302: call string [mscorlib]System.Convert::ToString(int32) - IL_a307: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a30c: stloc.s V_10 - IL_a30e: br.s IL_a356 - - IL_a310: ldloc.s V_6 - IL_a312: call string [mscorlib]System.Convert::ToString(int32) - IL_a317: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a31c: stloc.s V_10 - IL_a31e: ldloc.s V_9 - IL_a320: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a325: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a32a: stloc.s V_10 - IL_a32c: ldloc.s V_8 - IL_a32e: call string [mscorlib]System.Convert::ToString(int32) - IL_a333: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a338: stloc.s V_9 - IL_a33a: ldloc.s V_10 - IL_a33c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a341: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a346: stloc.s V_8 - IL_a348: ldloc.s V_8 - IL_a34a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a34f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a354: stloc.s V_9 - IL_a356: ldloc.s V_8 - IL_a358: ldloc.s V_10 - IL_a35a: ble.s IL_a3a4 - - IL_a35c: ldloc.s V_10 - IL_a35e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a363: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a368: stloc.s V_6 - IL_a36a: ldloc.s V_6 - IL_a36c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a371: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a376: stloc.s V_7 - IL_a378: ldloc.s V_6 - IL_a37a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a37f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a384: stloc.s V_9 - IL_a386: ldloc.s V_8 - IL_a388: call string [mscorlib]System.Convert::ToString(int32) - IL_a38d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a392: stloc.s V_7 - IL_a394: ldloc.s V_10 - IL_a396: call string [mscorlib]System.Convert::ToString(int32) - IL_a39b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a3a0: stloc.s V_6 - IL_a3a2: br.s IL_a3ea - - IL_a3a4: ldloc.s V_10 - IL_a3a6: call string [mscorlib]System.Convert::ToString(int32) - IL_a3ab: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a3b0: stloc.s V_9 - IL_a3b2: ldloc.s V_9 - IL_a3b4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a3b9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a3be: stloc.s V_6 - IL_a3c0: ldloc.s V_6 - IL_a3c2: call string [mscorlib]System.Convert::ToString(int32) - IL_a3c7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a3cc: stloc.s V_10 - IL_a3ce: ldloc.s V_9 - IL_a3d0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a3d5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a3da: stloc.s V_6 - IL_a3dc: ldloc.s V_7 - IL_a3de: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a3e3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a3e8: stloc.s V_8 - IL_a3ea: ldloc.s V_9 - IL_a3ec: ldloc.s V_6 - IL_a3ee: beq.s IL_a438 - - IL_a3f0: ldloc.s V_7 - IL_a3f2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a3f7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a3fc: stloc.s V_9 - IL_a3fe: ldloc.s V_7 - IL_a400: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a405: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a40a: stloc.s V_10 - IL_a40c: ldloc.s V_7 - IL_a40e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a413: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a418: stloc.s V_6 - IL_a41a: ldloc.s V_9 - IL_a41c: call string [mscorlib]System.Convert::ToString(int32) - IL_a421: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a426: stloc.s V_8 - IL_a428: ldloc.s V_9 - IL_a42a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a42f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a434: stloc.s V_10 - IL_a436: br.s IL_a47e - - IL_a438: ldloc.s V_7 - IL_a43a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a43f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a444: stloc.s V_6 - IL_a446: ldloc.s V_6 - IL_a448: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a44d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a452: stloc.s V_9 - IL_a454: ldloc.s V_10 - IL_a456: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a45b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a460: stloc.s V_7 - IL_a462: ldloc.s V_8 - IL_a464: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a469: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a46e: stloc.s V_10 - IL_a470: ldloc.s V_6 - IL_a472: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a477: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a47c: stloc.s V_8 - IL_a47e: ldloc.s V_7 - IL_a480: ldloc.s V_6 - IL_a482: beq.s IL_a4cc - - IL_a484: ldloc.s V_10 - IL_a486: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a48b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a490: stloc.s V_7 - IL_a492: ldloc.s V_7 - IL_a494: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a499: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a49e: stloc.s V_8 - IL_a4a0: ldloc.s V_7 - IL_a4a2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a4a7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a4ac: stloc.s V_9 - IL_a4ae: ldloc.s V_10 - IL_a4b0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a4b5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a4ba: stloc.s V_7 - IL_a4bc: ldloc.s V_9 - IL_a4be: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a4c3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a4c8: stloc.s V_7 - IL_a4ca: br.s IL_a512 - - IL_a4cc: ldloc.s V_10 - IL_a4ce: call string [mscorlib]System.Convert::ToString(int32) - IL_a4d3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a4d8: stloc.s V_6 - IL_a4da: ldloc.s V_8 - IL_a4dc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a4e1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a4e6: stloc.s V_6 - IL_a4e8: ldloc.s V_9 - IL_a4ea: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a4ef: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a4f4: stloc.s V_6 - IL_a4f6: ldloc.s V_6 - IL_a4f8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a4fd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a502: stloc.s V_8 - IL_a504: ldloc.s V_6 - IL_a506: call string [mscorlib]System.Convert::ToString(int32) - IL_a50b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a510: stloc.s V_10 - IL_a512: ldloc.s V_9 - IL_a514: ldloc.s V_6 - IL_a516: bge.s IL_a560 - - IL_a518: ldloc.s V_6 - IL_a51a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a51f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a524: stloc.s V_9 - IL_a526: ldloc.s V_6 - IL_a528: call string [mscorlib]System.Convert::ToString(int32) - IL_a52d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a532: stloc.s V_10 - IL_a534: ldloc.s V_6 - IL_a536: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a53b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a540: stloc.s V_6 - IL_a542: ldloc.s V_8 - IL_a544: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a549: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a54e: stloc.s V_10 - IL_a550: ldloc.s V_6 - IL_a552: call string [mscorlib]System.Convert::ToString(int32) - IL_a557: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a55c: stloc.s V_10 - IL_a55e: br.s IL_a5a6 - - IL_a560: ldloc.s V_8 - IL_a562: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a567: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a56c: stloc.s V_10 - IL_a56e: ldloc.s V_6 - IL_a570: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a575: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a57a: stloc.s V_6 - IL_a57c: ldloc.s V_10 - IL_a57e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a583: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a588: stloc.s V_8 - IL_a58a: ldloc.s V_9 - IL_a58c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a591: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a596: stloc.s V_6 - IL_a598: ldloc.s V_7 - IL_a59a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a59f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a5a4: stloc.s V_6 - IL_a5a6: ldloc.s V_6 - IL_a5a8: ldloc.s V_10 - IL_a5aa: bge.s IL_a5f4 - - IL_a5ac: ldloc.s V_7 - IL_a5ae: call string [mscorlib]System.Convert::ToString(int32) - IL_a5b3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a5b8: stloc.s V_9 - IL_a5ba: ldloc.s V_10 - IL_a5bc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a5c1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a5c6: stloc.s V_8 - IL_a5c8: ldloc.s V_7 - IL_a5ca: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a5cf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a5d4: stloc.s V_10 - IL_a5d6: ldloc.s V_8 - IL_a5d8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a5dd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a5e2: stloc.s V_8 - IL_a5e4: ldloc.s V_8 - IL_a5e6: call string [mscorlib]System.Convert::ToString(int32) - IL_a5eb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a5f0: stloc.s V_7 - IL_a5f2: br.s IL_a63a - - IL_a5f4: ldloc.s V_7 - IL_a5f6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a5fb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a600: stloc.s V_6 - IL_a602: ldloc.s V_9 - IL_a604: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a609: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a60e: stloc.s V_8 - IL_a610: ldloc.s V_9 - IL_a612: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a617: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a61c: stloc.s V_6 - IL_a61e: ldloc.s V_8 - IL_a620: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a625: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a62a: stloc.s V_6 - IL_a62c: ldloc.s V_6 - IL_a62e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a633: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a638: stloc.s V_7 - IL_a63a: ldloc.s V_9 - IL_a63c: ldloc.s V_10 - IL_a63e: bne.un.s IL_a688 - - IL_a640: ldloc.s V_10 - IL_a642: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a647: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a64c: stloc.s V_9 - IL_a64e: ldloc.s V_6 - IL_a650: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a655: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a65a: stloc.s V_10 - IL_a65c: ldloc.s V_10 - IL_a65e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a663: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a668: stloc.s V_8 - IL_a66a: ldloc.s V_10 - IL_a66c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a671: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a676: stloc.s V_9 - IL_a678: ldloc.s V_8 - IL_a67a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a67f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a684: stloc.s V_8 - IL_a686: br.s IL_a6ce - - IL_a688: ldloc.s V_10 - IL_a68a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a68f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a694: stloc.s V_6 - IL_a696: ldloc.s V_10 - IL_a698: call string [mscorlib]System.Convert::ToString(int32) - IL_a69d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a6a2: stloc.s V_6 - IL_a6a4: ldloc.s V_7 - IL_a6a6: call string [mscorlib]System.Convert::ToString(int32) - IL_a6ab: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a6b0: stloc.s V_6 - IL_a6b2: ldloc.s V_8 - IL_a6b4: call string [mscorlib]System.Convert::ToString(int32) - IL_a6b9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a6be: stloc.s V_9 - IL_a6c0: ldloc.s V_10 - IL_a6c2: call string [mscorlib]System.Convert::ToString(int32) - IL_a6c7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a6cc: stloc.s V_8 - IL_a6ce: ldloc.s V_9 - IL_a6d0: ldloc.s V_9 - IL_a6d2: bge.s IL_a71c - - IL_a6d4: ldloc.s V_8 - IL_a6d6: call string [mscorlib]System.Convert::ToString(int32) - IL_a6db: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a6e0: stloc.s V_9 - IL_a6e2: ldloc.s V_9 - IL_a6e4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a6e9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a6ee: stloc.s V_9 - IL_a6f0: ldloc.s V_6 - IL_a6f2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a6f7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a6fc: stloc.s V_6 - IL_a6fe: ldloc.s V_7 - IL_a700: call string [mscorlib]System.Convert::ToString(int32) - IL_a705: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a70a: stloc.s V_10 - IL_a70c: ldloc.s V_10 - IL_a70e: call string [mscorlib]System.Convert::ToString(int32) - IL_a713: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a718: stloc.s V_10 - IL_a71a: br.s IL_a762 - - IL_a71c: ldloc.s V_6 - IL_a71e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a723: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a728: stloc.s V_6 - IL_a72a: ldloc.s V_6 - IL_a72c: call string [mscorlib]System.Convert::ToString(int32) - IL_a731: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a736: stloc.s V_6 - IL_a738: ldloc.s V_8 - IL_a73a: call string [mscorlib]System.Convert::ToString(int32) - IL_a73f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a744: stloc.s V_6 - IL_a746: ldloc.s V_9 - IL_a748: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a74d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a752: stloc.s V_9 - IL_a754: ldloc.s V_9 - IL_a756: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a75b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a760: stloc.s V_9 - IL_a762: ldloc.s V_7 - IL_a764: ldloc.s V_7 - IL_a766: ble.s IL_a7b0 - - IL_a768: ldloc.s V_7 - IL_a76a: call string [mscorlib]System.Convert::ToString(int32) - IL_a76f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a774: stloc.s V_7 - IL_a776: ldloc.s V_9 - IL_a778: call string [mscorlib]System.Convert::ToString(int32) - IL_a77d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a782: stloc.s V_10 - IL_a784: ldloc.s V_9 - IL_a786: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a78b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a790: stloc.s V_6 - IL_a792: ldloc.s V_6 - IL_a794: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a799: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a79e: stloc.s V_10 - IL_a7a0: ldloc.s V_10 - IL_a7a2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a7a7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a7ac: stloc.s V_10 - IL_a7ae: br.s IL_a7f6 - - IL_a7b0: ldloc.s V_7 - IL_a7b2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a7b7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a7bc: stloc.s V_8 - IL_a7be: ldloc.s V_10 - IL_a7c0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a7c5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a7ca: stloc.s V_10 - IL_a7cc: ldloc.s V_10 - IL_a7ce: call string [mscorlib]System.Convert::ToString(int32) - IL_a7d3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a7d8: stloc.s V_9 - IL_a7da: ldloc.s V_6 - IL_a7dc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a7e1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a7e6: stloc.s V_6 - IL_a7e8: ldloc.s V_10 - IL_a7ea: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a7ef: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a7f4: stloc.s V_6 - IL_a7f6: ldloc.s V_10 - IL_a7f8: ldloc.s V_6 - IL_a7fa: bge.s IL_a844 - - IL_a7fc: ldloc.s V_10 - IL_a7fe: call string [mscorlib]System.Convert::ToString(int32) - IL_a803: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a808: stloc.s V_10 - IL_a80a: ldloc.s V_9 - IL_a80c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a811: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a816: stloc.s V_9 - IL_a818: ldloc.s V_9 - IL_a81a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a81f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a824: stloc.s V_7 - IL_a826: ldloc.s V_8 - IL_a828: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a82d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a832: stloc.s V_7 - IL_a834: ldloc.s V_7 - IL_a836: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a83b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a840: stloc.s V_7 - IL_a842: br.s IL_a88a - - IL_a844: ldloc.s V_9 - IL_a846: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a84b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a850: stloc.s V_10 - IL_a852: ldloc.s V_6 - IL_a854: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a859: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a85e: stloc.s V_8 - IL_a860: ldloc.s V_10 - IL_a862: call string [mscorlib]System.Convert::ToString(int32) - IL_a867: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a86c: stloc.s V_7 - IL_a86e: ldloc.s V_9 - IL_a870: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a875: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a87a: stloc.s V_7 - IL_a87c: ldloc.s V_9 - IL_a87e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a883: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a888: stloc.s V_9 - IL_a88a: ldloc.s V_8 - IL_a88c: ldloc.s V_7 - IL_a88e: bne.un.s IL_a8d8 - - IL_a890: ldloc.s V_7 - IL_a892: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a897: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a89c: stloc.s V_10 - IL_a89e: ldloc.s V_7 - IL_a8a0: call string [mscorlib]System.Convert::ToString(int32) - IL_a8a5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a8aa: stloc.s V_10 - IL_a8ac: ldloc.s V_6 - IL_a8ae: call string [mscorlib]System.Convert::ToString(int32) - IL_a8b3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a8b8: stloc.s V_8 - IL_a8ba: ldloc.s V_8 - IL_a8bc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a8c1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a8c6: stloc.s V_7 - IL_a8c8: ldloc.s V_6 - IL_a8ca: call string [mscorlib]System.Convert::ToString(int32) - IL_a8cf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a8d4: stloc.s V_8 - IL_a8d6: br.s IL_a91e - - IL_a8d8: ldloc.s V_6 - IL_a8da: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a8df: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a8e4: stloc.s V_10 - IL_a8e6: ldloc.s V_9 - IL_a8e8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a8ed: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a8f2: stloc.s V_7 - IL_a8f4: ldloc.s V_6 - IL_a8f6: call string [mscorlib]System.Convert::ToString(int32) - IL_a8fb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a900: stloc.s V_6 - IL_a902: ldloc.s V_7 - IL_a904: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a909: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a90e: stloc.s V_6 - IL_a910: ldloc.s V_10 - IL_a912: call string [mscorlib]System.Convert::ToString(int32) - IL_a917: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a91c: stloc.s V_6 - IL_a91e: ldloc.s V_8 - IL_a920: ldloc.s V_9 - IL_a922: beq.s IL_a96c - - IL_a924: ldloc.s V_10 - IL_a926: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a92b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a930: stloc.s V_6 - IL_a932: ldloc.s V_8 - IL_a934: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a939: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a93e: stloc.s V_10 - IL_a940: ldloc.s V_9 - IL_a942: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a947: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a94c: stloc.s V_7 - IL_a94e: ldloc.s V_7 - IL_a950: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a955: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a95a: stloc.s V_10 - IL_a95c: ldloc.s V_7 - IL_a95e: call string [mscorlib]System.Convert::ToString(int32) - IL_a963: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a968: stloc.s V_8 - IL_a96a: br.s IL_a9b2 - - IL_a96c: ldloc.s V_10 - IL_a96e: call string [mscorlib]System.Convert::ToString(int32) - IL_a973: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a978: stloc.s V_8 - IL_a97a: ldloc.s V_8 - IL_a97c: call string [mscorlib]System.Convert::ToString(int32) - IL_a981: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a986: stloc.s V_9 - IL_a988: ldloc.s V_7 - IL_a98a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a98f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a994: stloc.s V_9 - IL_a996: ldloc.s V_7 - IL_a998: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a99d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a9a2: stloc.s V_7 - IL_a9a4: ldloc.s V_9 - IL_a9a6: call string [mscorlib]System.Convert::ToString(int32) - IL_a9ab: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a9b0: stloc.s V_6 - IL_a9b2: ldloc.s V_8 - IL_a9b4: ldloc.s V_9 - IL_a9b6: bge.s IL_aa00 - - IL_a9b8: ldloc.s V_6 - IL_a9ba: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_a9bf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_a9c4: stloc.s V_9 - IL_a9c6: ldloc.s V_6 - IL_a9c8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a9cd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a9d2: stloc.s V_7 - IL_a9d4: ldloc.s V_6 - IL_a9d6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_a9db: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_a9e0: stloc.s V_8 - IL_a9e2: ldloc.s V_8 - IL_a9e4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_a9e9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_a9ee: stloc.s V_10 - IL_a9f0: ldloc.s V_9 - IL_a9f2: call string [mscorlib]System.Convert::ToString(int32) - IL_a9f7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_a9fc: stloc.s V_9 - IL_a9fe: br.s IL_aa46 - - IL_aa00: ldloc.s V_6 - IL_aa02: call string [mscorlib]System.Convert::ToString(int32) - IL_aa07: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_aa0c: stloc.s V_10 - IL_aa0e: ldloc.s V_6 - IL_aa10: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_aa15: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_aa1a: stloc.s V_6 - IL_aa1c: ldloc.s V_9 - IL_aa1e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_aa23: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_aa28: stloc.s V_6 - IL_aa2a: ldloc.s V_7 - IL_aa2c: call string [mscorlib]System.Convert::ToString(int32) - IL_aa31: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_aa36: stloc.s V_8 - IL_aa38: ldloc.s V_7 - IL_aa3a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_aa3f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_aa44: stloc.s V_7 - IL_aa46: ldloc.s V_9 - IL_aa48: ldloc.s V_8 - IL_aa4a: beq.s IL_aa94 - - IL_aa4c: ldloc.s V_7 - IL_aa4e: call string [mscorlib]System.Convert::ToString(int32) - IL_aa53: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_aa58: stloc.s V_8 - IL_aa5a: ldloc.s V_9 - IL_aa5c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_aa61: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_aa66: stloc.s V_6 - IL_aa68: ldloc.s V_8 - IL_aa6a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_aa6f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_aa74: stloc.s V_9 - IL_aa76: ldloc.s V_9 - IL_aa78: call string [mscorlib]System.Convert::ToString(int32) - IL_aa7d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_aa82: stloc.s V_8 - IL_aa84: ldloc.s V_7 - IL_aa86: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_aa8b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_aa90: stloc.s V_10 - IL_aa92: br.s IL_aada - - IL_aa94: ldloc.s V_10 - IL_aa96: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_aa9b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_aaa0: stloc.s V_8 - IL_aaa2: ldloc.s V_7 - IL_aaa4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_aaa9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_aaae: stloc.s V_9 - IL_aab0: ldloc.s V_10 - IL_aab2: call string [mscorlib]System.Convert::ToString(int32) - IL_aab7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_aabc: stloc.s V_9 - IL_aabe: ldloc.s V_7 - IL_aac0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_aac5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_aaca: stloc.s V_8 - IL_aacc: ldloc.s V_9 - IL_aace: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_aad3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_aad8: stloc.s V_10 - IL_aada: ldloc.s V_6 - IL_aadc: ldloc.s V_8 - IL_aade: bne.un.s IL_ab28 - - IL_aae0: ldloc.s V_10 - IL_aae2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_aae7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_aaec: stloc.s V_10 - IL_aaee: ldloc.s V_7 - IL_aaf0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_aaf5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_aafa: stloc.s V_7 - IL_aafc: ldloc.s V_10 - IL_aafe: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ab03: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ab08: stloc.s V_7 - IL_ab0a: ldloc.s V_10 - IL_ab0c: call string [mscorlib]System.Convert::ToString(int32) - IL_ab11: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ab16: stloc.s V_8 - IL_ab18: ldloc.s V_7 - IL_ab1a: call string [mscorlib]System.Convert::ToString(int32) - IL_ab1f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ab24: stloc.s V_10 - IL_ab26: br.s IL_ab6e - - IL_ab28: ldloc.s V_6 - IL_ab2a: call string [mscorlib]System.Convert::ToString(int32) - IL_ab2f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ab34: stloc.s V_10 - IL_ab36: ldloc.s V_8 - IL_ab38: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_ab3d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ab42: stloc.s V_8 - IL_ab44: ldloc.s V_6 - IL_ab46: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ab4b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ab50: stloc.s V_7 - IL_ab52: ldloc.s V_7 - IL_ab54: call string [mscorlib]System.Convert::ToString(int32) - IL_ab59: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ab5e: stloc.s V_7 - IL_ab60: ldloc.s V_10 - IL_ab62: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ab67: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ab6c: stloc.s V_8 - IL_ab6e: ldloc.s V_10 - IL_ab70: ldloc.s V_8 - IL_ab72: beq.s IL_abbc - - IL_ab74: ldloc.s V_6 - IL_ab76: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ab7b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ab80: stloc.s V_7 - IL_ab82: ldloc.s V_7 - IL_ab84: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_ab89: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ab8e: stloc.s V_7 - IL_ab90: ldloc.s V_10 - IL_ab92: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ab97: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ab9c: stloc.s V_8 - IL_ab9e: ldloc.s V_10 - IL_aba0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_aba5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_abaa: stloc.s V_7 - IL_abac: ldloc.s V_7 - IL_abae: call string [mscorlib]System.Convert::ToString(int32) - IL_abb3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_abb8: stloc.s V_6 - IL_abba: br.s IL_ac02 - - IL_abbc: ldloc.s V_8 - IL_abbe: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_abc3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_abc8: stloc.s V_10 - IL_abca: ldloc.s V_6 - IL_abcc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_abd1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_abd6: stloc.s V_9 - IL_abd8: ldloc.s V_8 - IL_abda: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_abdf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_abe4: stloc.s V_10 - IL_abe6: ldloc.s V_6 - IL_abe8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_abed: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_abf2: stloc.s V_10 - IL_abf4: ldloc.s V_7 - IL_abf6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_abfb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ac00: stloc.s V_6 - IL_ac02: ldloc.s V_8 - IL_ac04: ldloc.s V_10 - IL_ac06: ble.s IL_ac50 - - IL_ac08: ldloc.s V_9 - IL_ac0a: call string [mscorlib]System.Convert::ToString(int32) - IL_ac0f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ac14: stloc.s V_7 - IL_ac16: ldloc.s V_8 - IL_ac18: call string [mscorlib]System.Convert::ToString(int32) - IL_ac1d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ac22: stloc.s V_6 - IL_ac24: ldloc.s V_9 - IL_ac26: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ac2b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ac30: stloc.s V_9 - IL_ac32: ldloc.s V_8 - IL_ac34: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ac39: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ac3e: stloc.s V_9 - IL_ac40: ldloc.s V_6 - IL_ac42: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ac47: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ac4c: stloc.s V_6 - IL_ac4e: br.s IL_ac96 - - IL_ac50: ldloc.s V_6 - IL_ac52: call string [mscorlib]System.Convert::ToString(int32) - IL_ac57: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ac5c: stloc.s V_10 - IL_ac5e: ldloc.s V_8 - IL_ac60: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_ac65: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ac6a: stloc.s V_7 - IL_ac6c: ldloc.s V_6 - IL_ac6e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ac73: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ac78: stloc.s V_8 - IL_ac7a: ldloc.s V_6 - IL_ac7c: call string [mscorlib]System.Convert::ToString(int32) - IL_ac81: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ac86: stloc.s V_9 - IL_ac88: ldloc.s V_9 - IL_ac8a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ac8f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ac94: stloc.s V_6 - IL_ac96: ldloc.s V_7 - IL_ac98: ldloc.s V_9 - IL_ac9a: bgt.s IL_ace4 - - IL_ac9c: ldloc.s V_10 - IL_ac9e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_aca3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_aca8: stloc.s V_6 - IL_acaa: ldloc.s V_7 - IL_acac: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_acb1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_acb6: stloc.s V_8 - IL_acb8: ldloc.s V_8 - IL_acba: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_acbf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_acc4: stloc.s V_6 - IL_acc6: ldloc.s V_10 - IL_acc8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_accd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_acd2: stloc.s V_7 - IL_acd4: ldloc.s V_9 - IL_acd6: call string [mscorlib]System.Convert::ToString(int32) - IL_acdb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ace0: stloc.s V_6 - IL_ace2: br.s IL_ad2a - - IL_ace4: ldloc.s V_7 - IL_ace6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_aceb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_acf0: stloc.s V_6 - IL_acf2: ldloc.s V_7 - IL_acf4: call string [mscorlib]System.Convert::ToString(int32) - IL_acf9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_acfe: stloc.s V_7 - IL_ad00: ldloc.s V_7 - IL_ad02: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ad07: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ad0c: stloc.s V_7 - IL_ad0e: ldloc.s V_6 - IL_ad10: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ad15: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ad1a: stloc.s V_9 - IL_ad1c: ldloc.s V_8 - IL_ad1e: call string [mscorlib]System.Convert::ToString(int32) - IL_ad23: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ad28: stloc.s V_7 - IL_ad2a: ldloc.s V_6 - IL_ad2c: ldloc.s V_8 - IL_ad2e: beq.s IL_ad78 - - IL_ad30: ldloc.s V_8 - IL_ad32: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ad37: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ad3c: stloc.s V_9 - IL_ad3e: ldloc.s V_9 - IL_ad40: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ad45: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ad4a: stloc.s V_7 - IL_ad4c: ldloc.s V_7 - IL_ad4e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ad53: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ad58: stloc.s V_10 - IL_ad5a: ldloc.s V_7 - IL_ad5c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_ad61: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ad66: stloc.s V_6 - IL_ad68: ldloc.s V_10 - IL_ad6a: call string [mscorlib]System.Convert::ToString(int32) - IL_ad6f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ad74: stloc.s V_7 - IL_ad76: br.s IL_adbe - - IL_ad78: ldloc.s V_7 - IL_ad7a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_ad7f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ad84: stloc.s V_8 - IL_ad86: ldloc.s V_9 - IL_ad88: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ad8d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ad92: stloc.s V_8 - IL_ad94: ldloc.s V_6 - IL_ad96: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ad9b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ada0: stloc.s V_7 - IL_ada2: ldloc.s V_7 - IL_ada4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ada9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_adae: stloc.s V_9 - IL_adb0: ldloc.s V_7 - IL_adb2: call string [mscorlib]System.Convert::ToString(int32) - IL_adb7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_adbc: stloc.s V_7 - IL_adbe: ldloc.s V_8 - IL_adc0: ldloc.s V_6 - IL_adc2: beq.s IL_ae0c - - IL_adc4: ldloc.s V_10 - IL_adc6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_adcb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_add0: stloc.s V_7 - IL_add2: ldloc.s V_9 - IL_add4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_add9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_adde: stloc.s V_7 - IL_ade0: ldloc.s V_7 - IL_ade2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ade7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_adec: stloc.s V_8 - IL_adee: ldloc.s V_9 - IL_adf0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_adf5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_adfa: stloc.s V_6 - IL_adfc: ldloc.s V_10 - IL_adfe: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ae03: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ae08: stloc.s V_10 - IL_ae0a: br.s IL_ae52 - - IL_ae0c: ldloc.s V_8 - IL_ae0e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ae13: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ae18: stloc.s V_6 - IL_ae1a: ldloc.s V_10 - IL_ae1c: call string [mscorlib]System.Convert::ToString(int32) - IL_ae21: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ae26: stloc.s V_6 - IL_ae28: ldloc.s V_6 - IL_ae2a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ae2f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ae34: stloc.s V_10 - IL_ae36: ldloc.s V_8 - IL_ae38: call string [mscorlib]System.Convert::ToString(int32) - IL_ae3d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ae42: stloc.s V_8 - IL_ae44: ldloc.s V_8 - IL_ae46: call string [mscorlib]System.Convert::ToString(int32) - IL_ae4b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ae50: stloc.s V_8 - IL_ae52: ldloc.s V_6 - IL_ae54: ldloc.s V_9 - IL_ae56: beq.s IL_aea0 - - IL_ae58: ldloc.s V_8 - IL_ae5a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ae5f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ae64: stloc.s V_7 - IL_ae66: ldloc.s V_7 - IL_ae68: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_ae6d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ae72: stloc.s V_6 - IL_ae74: ldloc.s V_10 - IL_ae76: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ae7b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ae80: stloc.s V_8 - IL_ae82: ldloc.s V_8 - IL_ae84: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ae89: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ae8e: stloc.s V_7 - IL_ae90: ldloc.s V_7 - IL_ae92: call string [mscorlib]System.Convert::ToString(int32) - IL_ae97: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ae9c: stloc.s V_7 - IL_ae9e: br.s IL_aee6 - - IL_aea0: ldloc.s V_10 - IL_aea2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_aea7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_aeac: stloc.s V_8 - IL_aeae: ldloc.s V_10 - IL_aeb0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_aeb5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_aeba: stloc.s V_10 - IL_aebc: ldloc.s V_9 - IL_aebe: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_aec3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_aec8: stloc.s V_7 - IL_aeca: ldloc.s V_7 - IL_aecc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_aed1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_aed6: stloc.s V_9 - IL_aed8: ldloc.s V_10 - IL_aeda: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_aedf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_aee4: stloc.s V_6 - IL_aee6: ldloc.s V_6 - IL_aee8: ldloc.s V_6 - IL_aeea: bne.un.s IL_af34 - - IL_aeec: ldloc.s V_8 - IL_aeee: call string [mscorlib]System.Convert::ToString(int32) - IL_aef3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_aef8: stloc.s V_10 - IL_aefa: ldloc.s V_9 - IL_aefc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_af01: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_af06: stloc.s V_8 - IL_af08: ldloc.s V_9 - IL_af0a: call string [mscorlib]System.Convert::ToString(int32) - IL_af0f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_af14: stloc.s V_7 - IL_af16: ldloc.s V_6 - IL_af18: call string [mscorlib]System.Convert::ToString(int32) - IL_af1d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_af22: stloc.s V_10 - IL_af24: ldloc.s V_10 - IL_af26: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_af2b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_af30: stloc.s V_8 - IL_af32: br.s IL_af7a - - IL_af34: ldloc.s V_8 - IL_af36: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_af3b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_af40: stloc.s V_6 - IL_af42: ldloc.s V_7 - IL_af44: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_af49: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_af4e: stloc.s V_9 - IL_af50: ldloc.s V_8 - IL_af52: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_af57: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_af5c: stloc.s V_10 - IL_af5e: ldloc.s V_7 - IL_af60: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_af65: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_af6a: stloc.s V_9 - IL_af6c: ldloc.s V_10 - IL_af6e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_af73: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_af78: stloc.s V_6 - IL_af7a: ldloc.s V_8 - IL_af7c: ldloc.s V_6 - IL_af7e: beq.s IL_afc8 - - IL_af80: ldloc.s V_6 - IL_af82: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_af87: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_af8c: stloc.s V_7 - IL_af8e: ldloc.s V_10 - IL_af90: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_af95: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_af9a: stloc.s V_10 - IL_af9c: ldloc.s V_7 - IL_af9e: call string [mscorlib]System.Convert::ToString(int32) - IL_afa3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_afa8: stloc.s V_6 - IL_afaa: ldloc.s V_9 - IL_afac: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_afb1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_afb6: stloc.s V_7 - IL_afb8: ldloc.s V_10 - IL_afba: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_afbf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_afc4: stloc.s V_9 - IL_afc6: br.s IL_b00e - - IL_afc8: ldloc.s V_6 - IL_afca: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_afcf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_afd4: stloc.s V_7 - IL_afd6: ldloc.s V_6 - IL_afd8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_afdd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_afe2: stloc.s V_8 - IL_afe4: ldloc.s V_8 - IL_afe6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_afeb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_aff0: stloc.s V_10 - IL_aff2: ldloc.s V_10 - IL_aff4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_aff9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_affe: stloc.s V_6 - IL_b000: ldloc.s V_6 - IL_b002: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b007: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b00c: stloc.s V_8 - IL_b00e: ldloc.s V_10 - IL_b010: ldloc.s V_6 - IL_b012: bne.un.s IL_b05c - - IL_b014: ldloc.s V_9 - IL_b016: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b01b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b020: stloc.s V_10 - IL_b022: ldloc.s V_6 - IL_b024: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b029: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b02e: stloc.s V_9 - IL_b030: ldloc.s V_7 - IL_b032: call string [mscorlib]System.Convert::ToString(int32) - IL_b037: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b03c: stloc.s V_8 - IL_b03e: ldloc.s V_9 - IL_b040: call string [mscorlib]System.Convert::ToString(int32) - IL_b045: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b04a: stloc.s V_10 - IL_b04c: ldloc.s V_7 - IL_b04e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b053: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b058: stloc.s V_9 - IL_b05a: br.s IL_b0a2 - - IL_b05c: ldloc.s V_8 - IL_b05e: call string [mscorlib]System.Convert::ToString(int32) - IL_b063: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b068: stloc.s V_8 - IL_b06a: ldloc.s V_7 - IL_b06c: call string [mscorlib]System.Convert::ToString(int32) - IL_b071: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b076: stloc.s V_9 - IL_b078: ldloc.s V_7 - IL_b07a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b07f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b084: stloc.s V_6 - IL_b086: ldloc.s V_6 - IL_b088: call string [mscorlib]System.Convert::ToString(int32) - IL_b08d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b092: stloc.s V_8 - IL_b094: ldloc.s V_8 - IL_b096: call string [mscorlib]System.Convert::ToString(int32) - IL_b09b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b0a0: stloc.s V_6 - IL_b0a2: ldloc.s V_8 - IL_b0a4: ldloc.s V_7 - IL_b0a6: bge.s IL_b0f0 - - IL_b0a8: ldloc.s V_10 - IL_b0aa: call string [mscorlib]System.Convert::ToString(int32) - IL_b0af: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b0b4: stloc.s V_8 - IL_b0b6: ldloc.s V_9 - IL_b0b8: call string [mscorlib]System.Convert::ToString(int32) - IL_b0bd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b0c2: stloc.s V_6 - IL_b0c4: ldloc.s V_8 - IL_b0c6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b0cb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b0d0: stloc.s V_6 - IL_b0d2: ldloc.s V_8 - IL_b0d4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b0d9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b0de: stloc.s V_10 - IL_b0e0: ldloc.s V_10 - IL_b0e2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b0e7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b0ec: stloc.s V_10 - IL_b0ee: br.s IL_b136 - - IL_b0f0: ldloc.s V_8 - IL_b0f2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b0f7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b0fc: stloc.s V_9 - IL_b0fe: ldloc.s V_8 - IL_b100: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b105: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b10a: stloc.s V_9 - IL_b10c: ldloc.s V_9 - IL_b10e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b113: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b118: stloc.s V_9 - IL_b11a: ldloc.s V_9 - IL_b11c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b121: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b126: stloc.s V_8 - IL_b128: ldloc.s V_6 - IL_b12a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b12f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b134: stloc.s V_10 - IL_b136: ldloc.s V_9 - IL_b138: ldloc.s V_7 - IL_b13a: bne.un.s IL_b184 - - IL_b13c: ldloc.s V_7 - IL_b13e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b143: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b148: stloc.s V_8 - IL_b14a: ldloc.s V_10 - IL_b14c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b151: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b156: stloc.s V_7 - IL_b158: ldloc.s V_8 - IL_b15a: call string [mscorlib]System.Convert::ToString(int32) - IL_b15f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b164: stloc.s V_10 - IL_b166: ldloc.s V_8 - IL_b168: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b16d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b172: stloc.s V_10 - IL_b174: ldloc.s V_8 - IL_b176: call string [mscorlib]System.Convert::ToString(int32) - IL_b17b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b180: stloc.s V_9 - IL_b182: br.s IL_b1ca - - IL_b184: ldloc.s V_8 - IL_b186: call string [mscorlib]System.Convert::ToString(int32) - IL_b18b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b190: stloc.s V_7 - IL_b192: ldloc.s V_7 - IL_b194: call string [mscorlib]System.Convert::ToString(int32) - IL_b199: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b19e: stloc.s V_10 - IL_b1a0: ldloc.s V_9 - IL_b1a2: call string [mscorlib]System.Convert::ToString(int32) - IL_b1a7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b1ac: stloc.s V_10 - IL_b1ae: ldloc.s V_8 - IL_b1b0: call string [mscorlib]System.Convert::ToString(int32) - IL_b1b5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b1ba: stloc.s V_6 - IL_b1bc: ldloc.s V_9 - IL_b1be: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b1c3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b1c8: stloc.s V_10 - IL_b1ca: ldloc.s V_10 - IL_b1cc: ldloc.s V_6 - IL_b1ce: blt.s IL_b218 - - IL_b1d0: ldloc.s V_6 - IL_b1d2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b1d7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b1dc: stloc.s V_7 - IL_b1de: ldloc.s V_10 - IL_b1e0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b1e5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b1ea: stloc.s V_8 - IL_b1ec: ldloc.s V_7 - IL_b1ee: call string [mscorlib]System.Convert::ToString(int32) - IL_b1f3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b1f8: stloc.s V_8 - IL_b1fa: ldloc.s V_9 - IL_b1fc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b201: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b206: stloc.s V_10 - IL_b208: ldloc.s V_8 - IL_b20a: call string [mscorlib]System.Convert::ToString(int32) - IL_b20f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b214: stloc.s V_7 - IL_b216: br.s IL_b25e - - IL_b218: ldloc.s V_10 - IL_b21a: call string [mscorlib]System.Convert::ToString(int32) - IL_b21f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b224: stloc.s V_6 - IL_b226: ldloc.s V_6 - IL_b228: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b22d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b232: stloc.s V_9 - IL_b234: ldloc.s V_8 - IL_b236: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b23b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b240: stloc.s V_10 - IL_b242: ldloc.s V_8 - IL_b244: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b249: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b24e: stloc.s V_9 - IL_b250: ldloc.s V_8 - IL_b252: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b257: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b25c: stloc.s V_8 - IL_b25e: ldloc.s V_9 - IL_b260: ldloc.s V_7 - IL_b262: beq.s IL_b2ac - - IL_b264: ldloc.s V_7 - IL_b266: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b26b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b270: stloc.s V_7 - IL_b272: ldloc.s V_6 - IL_b274: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b279: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b27e: stloc.s V_7 - IL_b280: ldloc.s V_10 - IL_b282: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b287: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b28c: stloc.s V_9 - IL_b28e: ldloc.s V_10 - IL_b290: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b295: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b29a: stloc.s V_10 - IL_b29c: ldloc.s V_6 - IL_b29e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b2a3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b2a8: stloc.s V_10 - IL_b2aa: br.s IL_b2f2 - - IL_b2ac: ldloc.s V_9 - IL_b2ae: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b2b3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b2b8: stloc.s V_6 - IL_b2ba: ldloc.s V_6 - IL_b2bc: call string [mscorlib]System.Convert::ToString(int32) - IL_b2c1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b2c6: stloc.s V_10 - IL_b2c8: ldloc.s V_10 - IL_b2ca: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b2cf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b2d4: stloc.s V_6 - IL_b2d6: ldloc.s V_6 - IL_b2d8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b2dd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b2e2: stloc.s V_8 - IL_b2e4: ldloc.s V_9 - IL_b2e6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b2eb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b2f0: stloc.s V_7 - IL_b2f2: ldloc.s V_10 - IL_b2f4: ldloc.s V_7 - IL_b2f6: beq.s IL_b340 - - IL_b2f8: ldloc.s V_6 - IL_b2fa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b2ff: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b304: stloc.s V_8 - IL_b306: ldloc.s V_9 - IL_b308: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b30d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b312: stloc.s V_6 - IL_b314: ldloc.s V_8 - IL_b316: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b31b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b320: stloc.s V_9 - IL_b322: ldloc.s V_8 - IL_b324: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b329: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b32e: stloc.s V_7 - IL_b330: ldloc.s V_7 - IL_b332: call string [mscorlib]System.Convert::ToString(int32) - IL_b337: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b33c: stloc.s V_9 - IL_b33e: br.s IL_b386 - - IL_b340: ldloc.s V_6 - IL_b342: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b347: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b34c: stloc.s V_8 - IL_b34e: ldloc.s V_10 - IL_b350: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b355: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b35a: stloc.s V_10 - IL_b35c: ldloc.s V_6 - IL_b35e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b363: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b368: stloc.s V_6 - IL_b36a: ldloc.s V_10 - IL_b36c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b371: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b376: stloc.s V_8 - IL_b378: ldloc.s V_7 - IL_b37a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b37f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b384: stloc.s V_6 - IL_b386: ldloc.s V_6 - IL_b388: ldloc.s V_6 - IL_b38a: ble.s IL_b3d4 - - IL_b38c: ldloc.s V_9 - IL_b38e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b393: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b398: stloc.s V_9 - IL_b39a: ldloc.s V_10 - IL_b39c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b3a1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b3a6: stloc.s V_10 - IL_b3a8: ldloc.s V_9 - IL_b3aa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b3af: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b3b4: stloc.s V_10 - IL_b3b6: ldloc.s V_8 - IL_b3b8: call string [mscorlib]System.Convert::ToString(int32) - IL_b3bd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b3c2: stloc.s V_8 - IL_b3c4: ldloc.s V_6 - IL_b3c6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b3cb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b3d0: stloc.s V_8 - IL_b3d2: br.s IL_b41a - - IL_b3d4: ldloc.s V_8 - IL_b3d6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b3db: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b3e0: stloc.s V_9 - IL_b3e2: ldloc.s V_10 - IL_b3e4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b3e9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b3ee: stloc.s V_9 - IL_b3f0: ldloc.s V_9 - IL_b3f2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b3f7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b3fc: stloc.s V_7 - IL_b3fe: ldloc.s V_10 - IL_b400: call string [mscorlib]System.Convert::ToString(int32) - IL_b405: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b40a: stloc.s V_6 - IL_b40c: ldloc.s V_8 - IL_b40e: call string [mscorlib]System.Convert::ToString(int32) - IL_b413: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b418: stloc.s V_10 - IL_b41a: ldloc.s V_7 - IL_b41c: ldloc.s V_10 - IL_b41e: bge.s IL_b468 - - IL_b420: ldloc.s V_7 - IL_b422: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b427: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b42c: stloc.s V_7 - IL_b42e: ldloc.s V_9 - IL_b430: call string [mscorlib]System.Convert::ToString(int32) - IL_b435: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b43a: stloc.s V_8 - IL_b43c: ldloc.s V_10 - IL_b43e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b443: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b448: stloc.s V_6 - IL_b44a: ldloc.s V_8 - IL_b44c: call string [mscorlib]System.Convert::ToString(int32) - IL_b451: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b456: stloc.s V_6 - IL_b458: ldloc.s V_10 - IL_b45a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b45f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b464: stloc.s V_8 - IL_b466: br.s IL_b4ae - - IL_b468: ldloc.s V_8 - IL_b46a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b46f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b474: stloc.s V_10 - IL_b476: ldloc.s V_6 - IL_b478: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b47d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b482: stloc.s V_9 - IL_b484: ldloc.s V_10 - IL_b486: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b48b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b490: stloc.s V_6 - IL_b492: ldloc.s V_7 - IL_b494: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b499: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b49e: stloc.s V_6 - IL_b4a0: ldloc.s V_9 - IL_b4a2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b4a7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b4ac: stloc.s V_6 - IL_b4ae: ldloc.s V_7 - IL_b4b0: ldloc.s V_8 - IL_b4b2: bge.s IL_b4fc - - IL_b4b4: ldloc.s V_10 - IL_b4b6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b4bb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b4c0: stloc.s V_9 - IL_b4c2: ldloc.s V_7 - IL_b4c4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b4c9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b4ce: stloc.s V_9 - IL_b4d0: ldloc.s V_10 - IL_b4d2: call string [mscorlib]System.Convert::ToString(int32) - IL_b4d7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b4dc: stloc.s V_10 - IL_b4de: ldloc.s V_10 - IL_b4e0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b4e5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b4ea: stloc.s V_6 - IL_b4ec: ldloc.s V_9 - IL_b4ee: call string [mscorlib]System.Convert::ToString(int32) - IL_b4f3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b4f8: stloc.s V_7 - IL_b4fa: br.s IL_b542 - - IL_b4fc: ldloc.s V_6 - IL_b4fe: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b503: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b508: stloc.s V_10 - IL_b50a: ldloc.s V_9 - IL_b50c: call string [mscorlib]System.Convert::ToString(int32) - IL_b511: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b516: stloc.s V_6 - IL_b518: ldloc.s V_8 - IL_b51a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b51f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b524: stloc.s V_9 - IL_b526: ldloc.s V_9 - IL_b528: call string [mscorlib]System.Convert::ToString(int32) - IL_b52d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b532: stloc.s V_7 - IL_b534: ldloc.s V_6 - IL_b536: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b53b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b540: stloc.s V_7 - IL_b542: ldloc.s V_10 - IL_b544: ldloc.s V_7 - IL_b546: bge.s IL_b590 - - IL_b548: ldloc.s V_10 - IL_b54a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b54f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b554: stloc.s V_6 - IL_b556: ldloc.s V_6 - IL_b558: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b55d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b562: stloc.s V_6 - IL_b564: ldloc.s V_10 - IL_b566: call string [mscorlib]System.Convert::ToString(int32) - IL_b56b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b570: stloc.s V_7 - IL_b572: ldloc.s V_6 - IL_b574: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b579: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b57e: stloc.s V_7 - IL_b580: ldloc.s V_7 - IL_b582: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b587: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b58c: stloc.s V_6 - IL_b58e: br.s IL_b5d6 - - IL_b590: ldloc.s V_10 - IL_b592: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b597: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b59c: stloc.s V_8 - IL_b59e: ldloc.s V_9 - IL_b5a0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b5a5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b5aa: stloc.s V_8 - IL_b5ac: ldloc.s V_10 - IL_b5ae: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b5b3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b5b8: stloc.s V_9 - IL_b5ba: ldloc.s V_9 - IL_b5bc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b5c1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b5c6: stloc.s V_8 - IL_b5c8: ldloc.s V_8 - IL_b5ca: call string [mscorlib]System.Convert::ToString(int32) - IL_b5cf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b5d4: stloc.s V_8 - IL_b5d6: ldloc.s V_10 - IL_b5d8: ldloc.s V_7 - IL_b5da: bne.un.s IL_b624 - - IL_b5dc: ldloc.s V_9 - IL_b5de: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b5e3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b5e8: stloc.s V_9 - IL_b5ea: ldloc.s V_6 - IL_b5ec: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b5f1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b5f6: stloc.s V_10 - IL_b5f8: ldloc.s V_10 - IL_b5fa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b5ff: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b604: stloc.s V_10 - IL_b606: ldloc.s V_6 - IL_b608: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b60d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b612: stloc.s V_10 - IL_b614: ldloc.s V_9 - IL_b616: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b61b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b620: stloc.s V_7 - IL_b622: br.s IL_b66a - - IL_b624: ldloc.s V_10 - IL_b626: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b62b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b630: stloc.s V_8 - IL_b632: ldloc.s V_9 - IL_b634: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b639: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b63e: stloc.s V_6 - IL_b640: ldloc.s V_10 - IL_b642: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b647: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b64c: stloc.s V_8 - IL_b64e: ldloc.s V_8 - IL_b650: call string [mscorlib]System.Convert::ToString(int32) - IL_b655: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b65a: stloc.s V_10 - IL_b65c: ldloc.s V_6 - IL_b65e: call string [mscorlib]System.Convert::ToString(int32) - IL_b663: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b668: stloc.s V_8 - IL_b66a: ldloc.s V_8 - IL_b66c: ldloc.s V_7 - IL_b66e: blt.s IL_b6b8 - - IL_b670: ldloc.s V_8 - IL_b672: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b677: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b67c: stloc.s V_10 - IL_b67e: ldloc.s V_7 - IL_b680: call string [mscorlib]System.Convert::ToString(int32) - IL_b685: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b68a: stloc.s V_8 - IL_b68c: ldloc.s V_7 - IL_b68e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b693: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b698: stloc.s V_10 - IL_b69a: ldloc.s V_9 - IL_b69c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b6a1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b6a6: stloc.s V_9 - IL_b6a8: ldloc.s V_6 - IL_b6aa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b6af: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b6b4: stloc.s V_9 - IL_b6b6: br.s IL_b6fe - - IL_b6b8: ldloc.s V_9 - IL_b6ba: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b6bf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b6c4: stloc.s V_10 - IL_b6c6: ldloc.s V_6 - IL_b6c8: call string [mscorlib]System.Convert::ToString(int32) - IL_b6cd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b6d2: stloc.s V_8 - IL_b6d4: ldloc.s V_10 - IL_b6d6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b6db: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b6e0: stloc.s V_8 - IL_b6e2: ldloc.s V_7 - IL_b6e4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b6e9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b6ee: stloc.s V_9 - IL_b6f0: ldloc.s V_6 - IL_b6f2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b6f7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b6fc: stloc.s V_8 - IL_b6fe: ldloc.s V_7 - IL_b700: ldloc.s V_10 - IL_b702: beq.s IL_b74c - - IL_b704: ldloc.s V_10 - IL_b706: call string [mscorlib]System.Convert::ToString(int32) - IL_b70b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b710: stloc.s V_10 - IL_b712: ldloc.s V_6 - IL_b714: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b719: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b71e: stloc.s V_6 - IL_b720: ldloc.s V_7 - IL_b722: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b727: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b72c: stloc.s V_8 - IL_b72e: ldloc.s V_7 - IL_b730: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b735: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b73a: stloc.s V_8 - IL_b73c: ldloc.s V_8 - IL_b73e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b743: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b748: stloc.s V_7 - IL_b74a: br.s IL_b792 - - IL_b74c: ldloc.s V_9 - IL_b74e: call string [mscorlib]System.Convert::ToString(int32) - IL_b753: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b758: stloc.s V_8 - IL_b75a: ldloc.s V_10 - IL_b75c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b761: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b766: stloc.s V_7 - IL_b768: ldloc.s V_7 - IL_b76a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b76f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b774: stloc.s V_7 - IL_b776: ldloc.s V_9 - IL_b778: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b77d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b782: stloc.s V_9 - IL_b784: ldloc.s V_6 - IL_b786: call string [mscorlib]System.Convert::ToString(int32) - IL_b78b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b790: stloc.s V_6 - IL_b792: ldloc.s V_9 - IL_b794: ldloc.s V_8 - IL_b796: bge.s IL_b7e0 - - IL_b798: ldloc.s V_8 - IL_b79a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b79f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b7a4: stloc.s V_9 - IL_b7a6: ldloc.s V_6 - IL_b7a8: call string [mscorlib]System.Convert::ToString(int32) - IL_b7ad: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b7b2: stloc.s V_6 - IL_b7b4: ldloc.s V_8 - IL_b7b6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b7bb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b7c0: stloc.s V_8 - IL_b7c2: ldloc.s V_6 - IL_b7c4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b7c9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b7ce: stloc.s V_9 - IL_b7d0: ldloc.s V_10 - IL_b7d2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b7d7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b7dc: stloc.s V_9 - IL_b7de: br.s IL_b826 - - IL_b7e0: ldloc.s V_9 - IL_b7e2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b7e7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b7ec: stloc.s V_9 - IL_b7ee: ldloc.s V_8 - IL_b7f0: call string [mscorlib]System.Convert::ToString(int32) - IL_b7f5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b7fa: stloc.s V_8 - IL_b7fc: ldloc.s V_7 - IL_b7fe: call string [mscorlib]System.Convert::ToString(int32) - IL_b803: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b808: stloc.s V_10 - IL_b80a: ldloc.s V_6 - IL_b80c: call string [mscorlib]System.Convert::ToString(int32) - IL_b811: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b816: stloc.s V_9 - IL_b818: ldloc.s V_9 - IL_b81a: call string [mscorlib]System.Convert::ToString(int32) - IL_b81f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b824: stloc.s V_8 - IL_b826: ldloc.s V_6 - IL_b828: ldloc.s V_6 - IL_b82a: bge.s IL_b874 - - IL_b82c: ldloc.s V_7 - IL_b82e: call string [mscorlib]System.Convert::ToString(int32) - IL_b833: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b838: stloc.s V_9 - IL_b83a: ldloc.s V_6 - IL_b83c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b841: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b846: stloc.s V_6 - IL_b848: ldloc.s V_10 - IL_b84a: call string [mscorlib]System.Convert::ToString(int32) - IL_b84f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b854: stloc.s V_8 - IL_b856: ldloc.s V_7 - IL_b858: call string [mscorlib]System.Convert::ToString(int32) - IL_b85d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b862: stloc.s V_8 - IL_b864: ldloc.s V_7 - IL_b866: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b86b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b870: stloc.s V_6 - IL_b872: br.s IL_b8ba - - IL_b874: ldloc.s V_9 - IL_b876: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b87b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b880: stloc.s V_10 - IL_b882: ldloc.s V_6 - IL_b884: call string [mscorlib]System.Convert::ToString(int32) - IL_b889: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b88e: stloc.s V_7 - IL_b890: ldloc.s V_6 - IL_b892: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b897: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b89c: stloc.s V_6 - IL_b89e: ldloc.s V_6 - IL_b8a0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b8a5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b8aa: stloc.s V_7 - IL_b8ac: ldloc.s V_8 - IL_b8ae: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b8b3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b8b8: stloc.s V_6 - IL_b8ba: ldloc.s V_7 - IL_b8bc: ldloc.s V_10 - IL_b8be: bne.un.s IL_b908 - - IL_b8c0: ldloc.s V_10 - IL_b8c2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b8c7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b8cc: stloc.s V_6 - IL_b8ce: ldloc.s V_8 - IL_b8d0: call string [mscorlib]System.Convert::ToString(int32) - IL_b8d5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b8da: stloc.s V_8 - IL_b8dc: ldloc.s V_10 - IL_b8de: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b8e3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b8e8: stloc.s V_9 - IL_b8ea: ldloc.s V_6 - IL_b8ec: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b8f1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b8f6: stloc.s V_9 - IL_b8f8: ldloc.s V_9 - IL_b8fa: call string [mscorlib]System.Convert::ToString(int32) - IL_b8ff: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b904: stloc.s V_10 - IL_b906: br.s IL_b94e - - IL_b908: ldloc.s V_6 - IL_b90a: call string [mscorlib]System.Convert::ToString(int32) - IL_b90f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b914: stloc.s V_9 - IL_b916: ldloc.s V_8 - IL_b918: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b91d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b922: stloc.s V_6 - IL_b924: ldloc.s V_9 - IL_b926: call string [mscorlib]System.Convert::ToString(int32) - IL_b92b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b930: stloc.s V_10 - IL_b932: ldloc.s V_6 - IL_b934: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b939: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b93e: stloc.s V_6 - IL_b940: ldloc.s V_9 - IL_b942: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b947: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b94c: stloc.s V_10 - IL_b94e: ldloc.s V_9 - IL_b950: ldloc.s V_6 - IL_b952: blt.s IL_b99c - - IL_b954: ldloc.s V_6 - IL_b956: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b95b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b960: stloc.s V_7 - IL_b962: ldloc.s V_9 - IL_b964: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b969: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b96e: stloc.s V_8 - IL_b970: ldloc.s V_9 - IL_b972: call string [mscorlib]System.Convert::ToString(int32) - IL_b977: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b97c: stloc.s V_7 - IL_b97e: ldloc.s V_7 - IL_b980: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b985: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b98a: stloc.s V_7 - IL_b98c: ldloc.s V_10 - IL_b98e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b993: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b998: stloc.s V_10 - IL_b99a: br.s IL_b9e2 - - IL_b99c: ldloc.s V_8 - IL_b99e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b9a3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_b9a8: stloc.s V_8 - IL_b9aa: ldloc.s V_8 - IL_b9ac: call string [mscorlib]System.Convert::ToString(int32) - IL_b9b1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b9b6: stloc.s V_7 - IL_b9b8: ldloc.s V_7 - IL_b9ba: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_b9bf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_b9c4: stloc.s V_8 - IL_b9c6: ldloc.s V_10 - IL_b9c8: call string [mscorlib]System.Convert::ToString(int32) - IL_b9cd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b9d2: stloc.s V_7 - IL_b9d4: ldloc.s V_8 - IL_b9d6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_b9db: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_b9e0: stloc.s V_7 - IL_b9e2: ldloc.s V_7 - IL_b9e4: ldloc.s V_9 - IL_b9e6: bge.s IL_ba30 - - IL_b9e8: ldloc.s V_8 - IL_b9ea: call string [mscorlib]System.Convert::ToString(int32) - IL_b9ef: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_b9f4: stloc.s V_6 - IL_b9f6: ldloc.s V_7 - IL_b9f8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_b9fd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ba02: stloc.s V_9 - IL_ba04: ldloc.s V_7 - IL_ba06: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ba0b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ba10: stloc.s V_7 - IL_ba12: ldloc.s V_6 - IL_ba14: call string [mscorlib]System.Convert::ToString(int32) - IL_ba19: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ba1e: stloc.s V_9 - IL_ba20: ldloc.s V_8 - IL_ba22: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_ba27: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ba2c: stloc.s V_7 - IL_ba2e: br.s IL_ba76 - - IL_ba30: ldloc.s V_6 - IL_ba32: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ba37: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ba3c: stloc.s V_7 - IL_ba3e: ldloc.s V_6 - IL_ba40: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ba45: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ba4a: stloc.s V_6 - IL_ba4c: ldloc.s V_6 - IL_ba4e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ba53: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ba58: stloc.s V_9 - IL_ba5a: ldloc.s V_10 - IL_ba5c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_ba61: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ba66: stloc.s V_9 - IL_ba68: ldloc.s V_10 - IL_ba6a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ba6f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ba74: stloc.s V_10 - IL_ba76: ldloc.s V_6 - IL_ba78: ldloc.s V_7 - IL_ba7a: ble.s IL_bac4 - - IL_ba7c: ldloc.s V_9 - IL_ba7e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ba83: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ba88: stloc.s V_9 - IL_ba8a: ldloc.s V_6 - IL_ba8c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ba91: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ba96: stloc.s V_7 - IL_ba98: ldloc.s V_9 - IL_ba9a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ba9f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_baa4: stloc.s V_7 - IL_baa6: ldloc.s V_8 - IL_baa8: call string [mscorlib]System.Convert::ToString(int32) - IL_baad: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bab2: stloc.s V_6 - IL_bab4: ldloc.s V_8 - IL_bab6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_babb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bac0: stloc.s V_6 - IL_bac2: br.s IL_bb0a - - IL_bac4: ldloc.s V_8 - IL_bac6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bacb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bad0: stloc.s V_7 - IL_bad2: ldloc.s V_7 - IL_bad4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bad9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bade: stloc.s V_8 - IL_bae0: ldloc.s V_9 - IL_bae2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_bae7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_baec: stloc.s V_8 - IL_baee: ldloc.s V_6 - IL_baf0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_baf5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bafa: stloc.s V_8 - IL_bafc: ldloc.s V_10 - IL_bafe: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_bb03: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_bb08: stloc.s V_8 - IL_bb0a: ldloc.s V_9 - IL_bb0c: ldloc.s V_8 - IL_bb0e: bgt.s IL_bb58 - - IL_bb10: ldloc.s V_6 - IL_bb12: call string [mscorlib]System.Convert::ToString(int32) - IL_bb17: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bb1c: stloc.s V_10 - IL_bb1e: ldloc.s V_8 - IL_bb20: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bb25: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bb2a: stloc.s V_9 - IL_bb2c: ldloc.s V_6 - IL_bb2e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bb33: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bb38: stloc.s V_6 - IL_bb3a: ldloc.s V_6 - IL_bb3c: call string [mscorlib]System.Convert::ToString(int32) - IL_bb41: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bb46: stloc.s V_8 - IL_bb48: ldloc.s V_7 - IL_bb4a: call string [mscorlib]System.Convert::ToString(int32) - IL_bb4f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bb54: stloc.s V_8 - IL_bb56: br.s IL_bb9e - - IL_bb58: ldloc.s V_10 - IL_bb5a: call string [mscorlib]System.Convert::ToString(int32) - IL_bb5f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bb64: stloc.s V_7 - IL_bb66: ldloc.s V_10 - IL_bb68: call string [mscorlib]System.Convert::ToString(int32) - IL_bb6d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bb72: stloc.s V_7 - IL_bb74: ldloc.s V_8 - IL_bb76: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bb7b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bb80: stloc.s V_10 - IL_bb82: ldloc.s V_6 - IL_bb84: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bb89: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bb8e: stloc.s V_10 - IL_bb90: ldloc.s V_8 - IL_bb92: call string [mscorlib]System.Convert::ToString(int32) - IL_bb97: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bb9c: stloc.s V_6 - IL_bb9e: ldloc.s V_8 - IL_bba0: ldloc.s V_6 - IL_bba2: bne.un.s IL_bbec - - IL_bba4: ldloc.s V_7 - IL_bba6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bbab: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bbb0: stloc.s V_10 - IL_bbb2: ldloc.s V_6 - IL_bbb4: call string [mscorlib]System.Convert::ToString(int32) - IL_bbb9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bbbe: stloc.s V_7 - IL_bbc0: ldloc.s V_7 - IL_bbc2: call string [mscorlib]System.Convert::ToString(int32) - IL_bbc7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bbcc: stloc.s V_6 - IL_bbce: ldloc.s V_9 - IL_bbd0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bbd5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bbda: stloc.s V_7 - IL_bbdc: ldloc.s V_7 - IL_bbde: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bbe3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bbe8: stloc.s V_8 - IL_bbea: br.s IL_bc32 - - IL_bbec: ldloc.s V_10 - IL_bbee: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bbf3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bbf8: stloc.s V_9 - IL_bbfa: ldloc.s V_10 - IL_bbfc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bc01: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bc06: stloc.s V_6 - IL_bc08: ldloc.s V_7 - IL_bc0a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bc0f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bc14: stloc.s V_8 - IL_bc16: ldloc.s V_6 - IL_bc18: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bc1d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bc22: stloc.s V_8 - IL_bc24: ldloc.s V_6 - IL_bc26: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bc2b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bc30: stloc.s V_7 - IL_bc32: ldloc.s V_9 - IL_bc34: ldloc.s V_6 - IL_bc36: bgt.s IL_bc80 - - IL_bc38: ldloc.s V_7 - IL_bc3a: call string [mscorlib]System.Convert::ToString(int32) - IL_bc3f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bc44: stloc.s V_6 - IL_bc46: ldloc.s V_10 - IL_bc48: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bc4d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bc52: stloc.s V_10 - IL_bc54: ldloc.s V_6 - IL_bc56: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bc5b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bc60: stloc.s V_10 - IL_bc62: ldloc.s V_6 - IL_bc64: call string [mscorlib]System.Convert::ToString(int32) - IL_bc69: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bc6e: stloc.s V_9 - IL_bc70: ldloc.s V_6 - IL_bc72: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_bc77: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_bc7c: stloc.s V_10 - IL_bc7e: br.s IL_bcc6 - - IL_bc80: ldloc.s V_9 - IL_bc82: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_bc87: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_bc8c: stloc.s V_10 - IL_bc8e: ldloc.s V_7 - IL_bc90: call string [mscorlib]System.Convert::ToString(int32) - IL_bc95: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bc9a: stloc.s V_8 - IL_bc9c: ldloc.s V_7 - IL_bc9e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_bca3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_bca8: stloc.s V_6 - IL_bcaa: ldloc.s V_9 - IL_bcac: call string [mscorlib]System.Convert::ToString(int32) - IL_bcb1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bcb6: stloc.s V_6 - IL_bcb8: ldloc.s V_8 - IL_bcba: call string [mscorlib]System.Convert::ToString(int32) - IL_bcbf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bcc4: stloc.s V_6 - IL_bcc6: ldloc.s V_9 - IL_bcc8: ldloc.s V_8 - IL_bcca: ble.s IL_bd14 - - IL_bccc: ldloc.s V_7 - IL_bcce: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_bcd3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_bcd8: stloc.s V_9 - IL_bcda: ldloc.s V_6 - IL_bcdc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bce1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bce6: stloc.s V_10 - IL_bce8: ldloc.s V_10 - IL_bcea: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_bcef: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_bcf4: stloc.s V_10 - IL_bcf6: ldloc.s V_7 - IL_bcf8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bcfd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bd02: stloc.s V_10 - IL_bd04: ldloc.s V_8 - IL_bd06: call string [mscorlib]System.Convert::ToString(int32) - IL_bd0b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bd10: stloc.s V_7 - IL_bd12: br.s IL_bd5a - - IL_bd14: ldloc.s V_9 - IL_bd16: call string [mscorlib]System.Convert::ToString(int32) - IL_bd1b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bd20: stloc.s V_6 - IL_bd22: ldloc.s V_10 - IL_bd24: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bd29: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bd2e: stloc.s V_8 - IL_bd30: ldloc.s V_7 - IL_bd32: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bd37: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bd3c: stloc.s V_9 - IL_bd3e: ldloc.s V_8 - IL_bd40: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bd45: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bd4a: stloc.s V_6 - IL_bd4c: ldloc.s V_8 - IL_bd4e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bd53: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bd58: stloc.s V_7 - IL_bd5a: ldloc.s V_9 - IL_bd5c: ldloc.s V_10 - IL_bd5e: bgt.s IL_bda8 - - IL_bd60: ldloc.s V_10 - IL_bd62: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bd67: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bd6c: stloc.s V_9 - IL_bd6e: ldloc.s V_8 - IL_bd70: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bd75: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bd7a: stloc.s V_9 - IL_bd7c: ldloc.s V_8 - IL_bd7e: call string [mscorlib]System.Convert::ToString(int32) - IL_bd83: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bd88: stloc.s V_9 - IL_bd8a: ldloc.s V_8 - IL_bd8c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bd91: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bd96: stloc.s V_8 - IL_bd98: ldloc.s V_10 - IL_bd9a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bd9f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bda4: stloc.s V_10 - IL_bda6: br.s IL_bdee - - IL_bda8: ldloc.s V_6 - IL_bdaa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bdaf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bdb4: stloc.s V_6 - IL_bdb6: ldloc.s V_10 - IL_bdb8: call string [mscorlib]System.Convert::ToString(int32) - IL_bdbd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bdc2: stloc.s V_10 - IL_bdc4: ldloc.s V_8 - IL_bdc6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bdcb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bdd0: stloc.s V_8 - IL_bdd2: ldloc.s V_10 - IL_bdd4: call string [mscorlib]System.Convert::ToString(int32) - IL_bdd9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bdde: stloc.s V_10 - IL_bde0: ldloc.s V_8 - IL_bde2: call string [mscorlib]System.Convert::ToString(int32) - IL_bde7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bdec: stloc.s V_8 - IL_bdee: ldloc.s V_7 - IL_bdf0: ldloc.s V_6 - IL_bdf2: blt.s IL_be3c - - IL_bdf4: ldloc.s V_8 - IL_bdf6: call string [mscorlib]System.Convert::ToString(int32) - IL_bdfb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_be00: stloc.s V_8 - IL_be02: ldloc.s V_9 - IL_be04: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_be09: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_be0e: stloc.s V_9 - IL_be10: ldloc.s V_7 - IL_be12: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_be17: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_be1c: stloc.s V_7 - IL_be1e: ldloc.s V_9 - IL_be20: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_be25: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_be2a: stloc.s V_8 - IL_be2c: ldloc.s V_6 - IL_be2e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_be33: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_be38: stloc.s V_9 - IL_be3a: br.s IL_be82 - - IL_be3c: ldloc.s V_10 - IL_be3e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_be43: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_be48: stloc.s V_8 - IL_be4a: ldloc.s V_6 - IL_be4c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_be51: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_be56: stloc.s V_7 - IL_be58: ldloc.s V_6 - IL_be5a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_be5f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_be64: stloc.s V_6 - IL_be66: ldloc.s V_7 - IL_be68: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_be6d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_be72: stloc.s V_7 - IL_be74: ldloc.s V_10 - IL_be76: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_be7b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_be80: stloc.s V_8 - IL_be82: ldloc.s V_6 - IL_be84: ldloc.s V_10 - IL_be86: beq.s IL_bed0 - - IL_be88: ldloc.s V_7 - IL_be8a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_be8f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_be94: stloc.s V_8 - IL_be96: ldloc.s V_9 - IL_be98: call string [mscorlib]System.Convert::ToString(int32) - IL_be9d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bea2: stloc.s V_7 - IL_bea4: ldloc.s V_9 - IL_bea6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_beab: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_beb0: stloc.s V_8 - IL_beb2: ldloc.s V_9 - IL_beb4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_beb9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bebe: stloc.s V_8 - IL_bec0: ldloc.s V_8 - IL_bec2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_bec7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_becc: stloc.s V_9 - IL_bece: br.s IL_bf16 - - IL_bed0: ldloc.s V_9 - IL_bed2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bed7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bedc: stloc.s V_9 - IL_bede: ldloc.s V_8 - IL_bee0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bee5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_beea: stloc.s V_8 - IL_beec: ldloc.s V_7 - IL_beee: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_bef3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_bef8: stloc.s V_10 - IL_befa: ldloc.s V_8 - IL_befc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_bf01: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_bf06: stloc.s V_8 - IL_bf08: ldloc.s V_10 - IL_bf0a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bf0f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bf14: stloc.s V_7 - IL_bf16: ldloc.s V_8 - IL_bf18: ldloc.s V_7 - IL_bf1a: blt.s IL_bf64 - - IL_bf1c: ldloc.s V_10 - IL_bf1e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bf23: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bf28: stloc.s V_10 - IL_bf2a: ldloc.s V_8 - IL_bf2c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bf31: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bf36: stloc.s V_10 - IL_bf38: ldloc.s V_7 - IL_bf3a: call string [mscorlib]System.Convert::ToString(int32) - IL_bf3f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bf44: stloc.s V_6 - IL_bf46: ldloc.s V_7 - IL_bf48: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_bf4d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_bf52: stloc.s V_8 - IL_bf54: ldloc.s V_8 - IL_bf56: call string [mscorlib]System.Convert::ToString(int32) - IL_bf5b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bf60: stloc.s V_7 - IL_bf62: br.s IL_bfaa - - IL_bf64: ldloc.s V_10 - IL_bf66: call string [mscorlib]System.Convert::ToString(int32) - IL_bf6b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bf70: stloc.s V_10 - IL_bf72: ldloc.s V_10 - IL_bf74: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_bf79: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_bf7e: stloc.s V_7 - IL_bf80: ldloc.s V_10 - IL_bf82: call string [mscorlib]System.Convert::ToString(int32) - IL_bf87: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bf8c: stloc.s V_8 - IL_bf8e: ldloc.s V_7 - IL_bf90: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bf95: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bf9a: stloc.s V_10 - IL_bf9c: ldloc.s V_9 - IL_bf9e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bfa3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bfa8: stloc.s V_6 - IL_bfaa: ldloc.s V_6 - IL_bfac: ldloc.s V_7 - IL_bfae: beq.s IL_bff8 - - IL_bfb0: ldloc.s V_6 - IL_bfb2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bfb7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bfbc: stloc.s V_8 - IL_bfbe: ldloc.s V_10 - IL_bfc0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_bfc5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_bfca: stloc.s V_8 - IL_bfcc: ldloc.s V_7 - IL_bfce: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_bfd3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_bfd8: stloc.s V_6 - IL_bfda: ldloc.s V_6 - IL_bfdc: call string [mscorlib]System.Convert::ToString(int32) - IL_bfe1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_bfe6: stloc.s V_6 - IL_bfe8: ldloc.s V_8 - IL_bfea: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_bfef: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_bff4: stloc.s V_6 - IL_bff6: br.s IL_c03e - - IL_bff8: ldloc.s V_6 - IL_bffa: call string [mscorlib]System.Convert::ToString(int32) - IL_bfff: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c004: stloc.s V_6 - IL_c006: ldloc.s V_6 - IL_c008: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c00d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c012: stloc.s V_10 - IL_c014: ldloc.s V_9 - IL_c016: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c01b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c020: stloc.s V_7 - IL_c022: ldloc.s V_7 - IL_c024: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c029: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c02e: stloc.s V_6 - IL_c030: ldloc.s V_8 - IL_c032: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c037: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c03c: stloc.s V_7 - IL_c03e: ldloc.s V_8 - IL_c040: ldloc.s V_7 - IL_c042: bgt.s IL_c08c - - IL_c044: ldloc.s V_10 - IL_c046: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c04b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c050: stloc.s V_10 - IL_c052: ldloc.s V_10 - IL_c054: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c059: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c05e: stloc.s V_7 - IL_c060: ldloc.s V_10 - IL_c062: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c067: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c06c: stloc.s V_10 - IL_c06e: ldloc.s V_6 - IL_c070: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c075: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c07a: stloc.s V_8 - IL_c07c: ldloc.s V_10 - IL_c07e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c083: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c088: stloc.s V_10 - IL_c08a: br.s IL_c0d2 - - IL_c08c: ldloc.s V_9 - IL_c08e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c093: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c098: stloc.s V_9 - IL_c09a: ldloc.s V_10 - IL_c09c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c0a1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c0a6: stloc.s V_8 - IL_c0a8: ldloc.s V_8 - IL_c0aa: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c0af: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c0b4: stloc.s V_6 - IL_c0b6: ldloc.s V_9 - IL_c0b8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c0bd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c0c2: stloc.s V_8 - IL_c0c4: ldloc.s V_7 - IL_c0c6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c0cb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c0d0: stloc.s V_9 - IL_c0d2: ldloc.s V_8 - IL_c0d4: ldloc.s V_10 - IL_c0d6: bne.un.s IL_c120 - - IL_c0d8: ldloc.s V_7 - IL_c0da: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c0df: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c0e4: stloc.s V_9 - IL_c0e6: ldloc.s V_6 - IL_c0e8: call string [mscorlib]System.Convert::ToString(int32) - IL_c0ed: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c0f2: stloc.s V_9 - IL_c0f4: ldloc.s V_6 - IL_c0f6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c0fb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c100: stloc.s V_7 - IL_c102: ldloc.s V_6 - IL_c104: call string [mscorlib]System.Convert::ToString(int32) - IL_c109: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c10e: stloc.s V_6 - IL_c110: ldloc.s V_7 - IL_c112: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c117: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c11c: stloc.s V_9 - IL_c11e: br.s IL_c166 - - IL_c120: ldloc.s V_10 - IL_c122: call string [mscorlib]System.Convert::ToString(int32) - IL_c127: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c12c: stloc.s V_7 - IL_c12e: ldloc.s V_9 - IL_c130: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c135: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c13a: stloc.s V_10 - IL_c13c: ldloc.s V_8 - IL_c13e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c143: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c148: stloc.s V_8 - IL_c14a: ldloc.s V_10 - IL_c14c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c151: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c156: stloc.s V_7 - IL_c158: ldloc.s V_6 - IL_c15a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c15f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c164: stloc.s V_6 - IL_c166: ldloc.s V_9 - IL_c168: ldloc.s V_9 - IL_c16a: bne.un.s IL_c1b4 - - IL_c16c: ldloc.s V_8 - IL_c16e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c173: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c178: stloc.s V_6 - IL_c17a: ldloc.s V_8 - IL_c17c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c181: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c186: stloc.s V_8 - IL_c188: ldloc.s V_10 - IL_c18a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c18f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c194: stloc.s V_8 - IL_c196: ldloc.s V_8 - IL_c198: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c19d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c1a2: stloc.s V_9 - IL_c1a4: ldloc.s V_7 - IL_c1a6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c1ab: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c1b0: stloc.s V_7 - IL_c1b2: br.s IL_c1fa - - IL_c1b4: ldloc.s V_7 - IL_c1b6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c1bb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c1c0: stloc.s V_8 - IL_c1c2: ldloc.s V_7 - IL_c1c4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c1c9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c1ce: stloc.s V_7 - IL_c1d0: ldloc.s V_8 - IL_c1d2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c1d7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c1dc: stloc.s V_7 - IL_c1de: ldloc.s V_9 - IL_c1e0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c1e5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c1ea: stloc.s V_9 - IL_c1ec: ldloc.s V_10 - IL_c1ee: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c1f3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c1f8: stloc.s V_7 - IL_c1fa: ldloc.s V_8 - IL_c1fc: ldloc.s V_6 - IL_c1fe: ble.s IL_c248 - - IL_c200: ldloc.s V_10 - IL_c202: call string [mscorlib]System.Convert::ToString(int32) - IL_c207: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c20c: stloc.s V_7 - IL_c20e: ldloc.s V_9 - IL_c210: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c215: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c21a: stloc.s V_9 - IL_c21c: ldloc.s V_6 - IL_c21e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c223: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c228: stloc.s V_8 - IL_c22a: ldloc.s V_9 - IL_c22c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c231: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c236: stloc.s V_9 - IL_c238: ldloc.s V_6 - IL_c23a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c23f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c244: stloc.s V_10 - IL_c246: br.s IL_c28e - - IL_c248: ldloc.s V_9 - IL_c24a: call string [mscorlib]System.Convert::ToString(int32) - IL_c24f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c254: stloc.s V_8 - IL_c256: ldloc.s V_9 - IL_c258: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c25d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c262: stloc.s V_9 - IL_c264: ldloc.s V_6 - IL_c266: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c26b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c270: stloc.s V_8 - IL_c272: ldloc.s V_8 - IL_c274: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c279: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c27e: stloc.s V_6 - IL_c280: ldloc.s V_9 - IL_c282: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c287: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c28c: stloc.s V_9 - IL_c28e: ldloc.s V_9 - IL_c290: ldloc.s V_8 - IL_c292: beq.s IL_c2dc - - IL_c294: ldloc.s V_7 - IL_c296: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c29b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c2a0: stloc.s V_8 - IL_c2a2: ldloc.s V_9 - IL_c2a4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c2a9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c2ae: stloc.s V_8 - IL_c2b0: ldloc.s V_9 - IL_c2b2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c2b7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c2bc: stloc.s V_9 - IL_c2be: ldloc.s V_7 - IL_c2c0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c2c5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c2ca: stloc.s V_7 - IL_c2cc: ldloc.s V_7 - IL_c2ce: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c2d3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c2d8: stloc.s V_9 - IL_c2da: br.s IL_c322 - - IL_c2dc: ldloc.s V_10 - IL_c2de: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c2e3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c2e8: stloc.s V_9 - IL_c2ea: ldloc.s V_7 - IL_c2ec: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c2f1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c2f6: stloc.s V_7 - IL_c2f8: ldloc.s V_9 - IL_c2fa: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c2ff: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c304: stloc.s V_7 - IL_c306: ldloc.s V_10 - IL_c308: call string [mscorlib]System.Convert::ToString(int32) - IL_c30d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c312: stloc.s V_10 - IL_c314: ldloc.s V_6 - IL_c316: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c31b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c320: stloc.s V_6 - IL_c322: ldloc.s V_9 - IL_c324: ldloc.s V_6 - IL_c326: blt.s IL_c370 - - IL_c328: ldloc.s V_6 - IL_c32a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c32f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c334: stloc.s V_7 - IL_c336: ldloc.s V_9 - IL_c338: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c33d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c342: stloc.s V_10 - IL_c344: ldloc.s V_8 - IL_c346: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c34b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c350: stloc.s V_10 - IL_c352: ldloc.s V_8 - IL_c354: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c359: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c35e: stloc.s V_6 - IL_c360: ldloc.s V_10 - IL_c362: call string [mscorlib]System.Convert::ToString(int32) - IL_c367: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c36c: stloc.s V_10 - IL_c36e: br.s IL_c3b6 - - IL_c370: ldloc.s V_8 - IL_c372: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c377: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c37c: stloc.s V_7 - IL_c37e: ldloc.s V_7 - IL_c380: call string [mscorlib]System.Convert::ToString(int32) - IL_c385: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c38a: stloc.s V_10 - IL_c38c: ldloc.s V_10 - IL_c38e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c393: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c398: stloc.s V_7 - IL_c39a: ldloc.s V_7 - IL_c39c: call string [mscorlib]System.Convert::ToString(int32) - IL_c3a1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c3a6: stloc.s V_8 - IL_c3a8: ldloc.s V_10 - IL_c3aa: call string [mscorlib]System.Convert::ToString(int32) - IL_c3af: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c3b4: stloc.s V_9 - IL_c3b6: ldloc.s V_10 - IL_c3b8: ldloc.s V_9 - IL_c3ba: bgt.s IL_c404 - - IL_c3bc: ldloc.s V_8 - IL_c3be: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c3c3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c3c8: stloc.s V_6 - IL_c3ca: ldloc.s V_9 - IL_c3cc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c3d1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c3d6: stloc.s V_6 - IL_c3d8: ldloc.s V_6 - IL_c3da: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c3df: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c3e4: stloc.s V_6 - IL_c3e6: ldloc.s V_9 - IL_c3e8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c3ed: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c3f2: stloc.s V_9 - IL_c3f4: ldloc.s V_10 - IL_c3f6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c3fb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c400: stloc.s V_7 - IL_c402: br.s IL_c44a - - IL_c404: ldloc.s V_10 - IL_c406: call string [mscorlib]System.Convert::ToString(int32) - IL_c40b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c410: stloc.s V_6 - IL_c412: ldloc.s V_6 - IL_c414: call string [mscorlib]System.Convert::ToString(int32) - IL_c419: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c41e: stloc.s V_9 - IL_c420: ldloc.s V_6 - IL_c422: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c427: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c42c: stloc.s V_10 - IL_c42e: ldloc.s V_8 - IL_c430: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c435: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c43a: stloc.s V_6 - IL_c43c: ldloc.s V_8 - IL_c43e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c443: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c448: stloc.s V_8 - IL_c44a: ldloc.s V_8 - IL_c44c: ldloc.s V_8 - IL_c44e: bgt.s IL_c498 - - IL_c450: ldloc.s V_7 - IL_c452: call string [mscorlib]System.Convert::ToString(int32) - IL_c457: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c45c: stloc.s V_9 - IL_c45e: ldloc.s V_6 - IL_c460: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c465: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c46a: stloc.s V_8 - IL_c46c: ldloc.s V_8 - IL_c46e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c473: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c478: stloc.s V_9 - IL_c47a: ldloc.s V_6 - IL_c47c: call string [mscorlib]System.Convert::ToString(int32) - IL_c481: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c486: stloc.s V_7 - IL_c488: ldloc.s V_9 - IL_c48a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c48f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c494: stloc.s V_6 - IL_c496: br.s IL_c4de - - IL_c498: ldloc.s V_10 - IL_c49a: call string [mscorlib]System.Convert::ToString(int32) - IL_c49f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c4a4: stloc.s V_7 - IL_c4a6: ldloc.s V_7 - IL_c4a8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c4ad: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c4b2: stloc.s V_10 - IL_c4b4: ldloc.s V_6 - IL_c4b6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c4bb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c4c0: stloc.s V_9 - IL_c4c2: ldloc.s V_9 - IL_c4c4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c4c9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c4ce: stloc.s V_7 - IL_c4d0: ldloc.s V_6 - IL_c4d2: call string [mscorlib]System.Convert::ToString(int32) - IL_c4d7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c4dc: stloc.s V_6 - IL_c4de: ldloc.s V_6 - IL_c4e0: ldloc.s V_10 - IL_c4e2: bgt.s IL_c52c - - IL_c4e4: ldloc.s V_7 - IL_c4e6: call string [mscorlib]System.Convert::ToString(int32) - IL_c4eb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c4f0: stloc.s V_7 - IL_c4f2: ldloc.s V_8 - IL_c4f4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c4f9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c4fe: stloc.s V_9 - IL_c500: ldloc.s V_9 - IL_c502: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c507: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c50c: stloc.s V_10 - IL_c50e: ldloc.s V_8 - IL_c510: call string [mscorlib]System.Convert::ToString(int32) - IL_c515: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c51a: stloc.s V_8 - IL_c51c: ldloc.s V_10 - IL_c51e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c523: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c528: stloc.s V_6 - IL_c52a: br.s IL_c572 - - IL_c52c: ldloc.s V_8 - IL_c52e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c533: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c538: stloc.s V_10 - IL_c53a: ldloc.s V_8 - IL_c53c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c541: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c546: stloc.s V_9 - IL_c548: ldloc.s V_7 - IL_c54a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c54f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c554: stloc.s V_6 - IL_c556: ldloc.s V_7 - IL_c558: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c55d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c562: stloc.s V_6 - IL_c564: ldloc.s V_7 - IL_c566: call string [mscorlib]System.Convert::ToString(int32) - IL_c56b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c570: stloc.s V_8 - IL_c572: ldloc.s V_9 - IL_c574: ldloc.s V_8 - IL_c576: blt.s IL_c5c0 - - IL_c578: ldloc.s V_9 - IL_c57a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c57f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c584: stloc.s V_6 - IL_c586: ldloc.s V_7 - IL_c588: call string [mscorlib]System.Convert::ToString(int32) - IL_c58d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c592: stloc.s V_7 - IL_c594: ldloc.s V_10 - IL_c596: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c59b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c5a0: stloc.s V_7 - IL_c5a2: ldloc.s V_9 - IL_c5a4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c5a9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c5ae: stloc.s V_9 - IL_c5b0: ldloc.s V_10 - IL_c5b2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c5b7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c5bc: stloc.s V_8 - IL_c5be: br.s IL_c606 - - IL_c5c0: ldloc.s V_7 - IL_c5c2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c5c7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c5cc: stloc.s V_9 - IL_c5ce: ldloc.s V_7 - IL_c5d0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c5d5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c5da: stloc.s V_8 - IL_c5dc: ldloc.s V_7 - IL_c5de: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c5e3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c5e8: stloc.s V_7 - IL_c5ea: ldloc.s V_7 - IL_c5ec: call string [mscorlib]System.Convert::ToString(int32) - IL_c5f1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c5f6: stloc.s V_10 - IL_c5f8: ldloc.s V_7 - IL_c5fa: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c5ff: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c604: stloc.s V_7 - IL_c606: ldloc.s V_6 - IL_c608: ldloc.s V_10 - IL_c60a: blt.s IL_c654 - - IL_c60c: ldloc.s V_6 - IL_c60e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c613: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c618: stloc.s V_6 - IL_c61a: ldloc.s V_8 - IL_c61c: call string [mscorlib]System.Convert::ToString(int32) - IL_c621: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c626: stloc.s V_6 - IL_c628: ldloc.s V_9 - IL_c62a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c62f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c634: stloc.s V_7 - IL_c636: ldloc.s V_6 - IL_c638: call string [mscorlib]System.Convert::ToString(int32) - IL_c63d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c642: stloc.s V_9 - IL_c644: ldloc.s V_10 - IL_c646: call string [mscorlib]System.Convert::ToString(int32) - IL_c64b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c650: stloc.s V_9 - IL_c652: br.s IL_c69a - - IL_c654: ldloc.s V_8 - IL_c656: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c65b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c660: stloc.s V_7 - IL_c662: ldloc.s V_9 - IL_c664: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c669: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c66e: stloc.s V_10 - IL_c670: ldloc.s V_8 - IL_c672: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c677: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c67c: stloc.s V_7 - IL_c67e: ldloc.s V_6 - IL_c680: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c685: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c68a: stloc.s V_7 - IL_c68c: ldloc.s V_9 - IL_c68e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c693: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c698: stloc.s V_10 - IL_c69a: ldloc.s V_6 - IL_c69c: ldloc.s V_10 - IL_c69e: bgt.s IL_c6e8 - - IL_c6a0: ldloc.s V_7 - IL_c6a2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c6a7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c6ac: stloc.s V_9 - IL_c6ae: ldloc.s V_8 - IL_c6b0: call string [mscorlib]System.Convert::ToString(int32) - IL_c6b5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c6ba: stloc.s V_9 - IL_c6bc: ldloc.s V_9 - IL_c6be: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c6c3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c6c8: stloc.s V_10 - IL_c6ca: ldloc.s V_9 - IL_c6cc: call string [mscorlib]System.Convert::ToString(int32) - IL_c6d1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c6d6: stloc.s V_8 - IL_c6d8: ldloc.s V_10 - IL_c6da: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c6df: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c6e4: stloc.s V_7 - IL_c6e6: br.s IL_c72e - - IL_c6e8: ldloc.s V_8 - IL_c6ea: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c6ef: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c6f4: stloc.s V_7 - IL_c6f6: ldloc.s V_6 - IL_c6f8: call string [mscorlib]System.Convert::ToString(int32) - IL_c6fd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c702: stloc.s V_10 - IL_c704: ldloc.s V_10 - IL_c706: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c70b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c710: stloc.s V_7 - IL_c712: ldloc.s V_7 - IL_c714: call string [mscorlib]System.Convert::ToString(int32) - IL_c719: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c71e: stloc.s V_9 - IL_c720: ldloc.s V_6 - IL_c722: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c727: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c72c: stloc.s V_8 - IL_c72e: ldloc.s V_6 - IL_c730: ldloc.s V_7 - IL_c732: beq.s IL_c77c - - IL_c734: ldloc.s V_6 - IL_c736: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c73b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c740: stloc.s V_6 - IL_c742: ldloc.s V_7 - IL_c744: call string [mscorlib]System.Convert::ToString(int32) - IL_c749: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c74e: stloc.s V_9 - IL_c750: ldloc.s V_10 - IL_c752: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c757: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c75c: stloc.s V_10 - IL_c75e: ldloc.s V_8 - IL_c760: call string [mscorlib]System.Convert::ToString(int32) - IL_c765: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c76a: stloc.s V_10 - IL_c76c: ldloc.s V_6 - IL_c76e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c773: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c778: stloc.s V_9 - IL_c77a: br.s IL_c7c2 - - IL_c77c: ldloc.s V_6 - IL_c77e: call string [mscorlib]System.Convert::ToString(int32) - IL_c783: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c788: stloc.s V_6 - IL_c78a: ldloc.s V_9 - IL_c78c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c791: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c796: stloc.s V_7 - IL_c798: ldloc.s V_8 - IL_c79a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c79f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c7a4: stloc.s V_9 - IL_c7a6: ldloc.s V_10 - IL_c7a8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c7ad: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c7b2: stloc.s V_7 - IL_c7b4: ldloc.s V_10 - IL_c7b6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c7bb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c7c0: stloc.s V_7 - IL_c7c2: ldloc.s V_9 - IL_c7c4: ldloc.s V_8 - IL_c7c6: bgt.s IL_c810 - - IL_c7c8: ldloc.s V_7 - IL_c7ca: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c7cf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c7d4: stloc.s V_8 - IL_c7d6: ldloc.s V_7 - IL_c7d8: call string [mscorlib]System.Convert::ToString(int32) - IL_c7dd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c7e2: stloc.s V_10 - IL_c7e4: ldloc.s V_8 - IL_c7e6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c7eb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c7f0: stloc.s V_7 - IL_c7f2: ldloc.s V_7 - IL_c7f4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c7f9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c7fe: stloc.s V_7 - IL_c800: ldloc.s V_9 - IL_c802: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c807: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c80c: stloc.s V_8 - IL_c80e: br.s IL_c856 - - IL_c810: ldloc.s V_9 - IL_c812: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c817: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c81c: stloc.s V_6 - IL_c81e: ldloc.s V_7 - IL_c820: call string [mscorlib]System.Convert::ToString(int32) - IL_c825: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c82a: stloc.s V_6 - IL_c82c: ldloc.s V_8 - IL_c82e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c833: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c838: stloc.s V_9 - IL_c83a: ldloc.s V_8 - IL_c83c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c841: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c846: stloc.s V_8 - IL_c848: ldloc.s V_9 - IL_c84a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c84f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c854: stloc.s V_8 - IL_c856: ldloc.s V_7 - IL_c858: ldloc.s V_10 - IL_c85a: beq.s IL_c8a4 - - IL_c85c: ldloc.s V_6 - IL_c85e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c863: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c868: stloc.s V_10 - IL_c86a: ldloc.s V_10 - IL_c86c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c871: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c876: stloc.s V_10 - IL_c878: ldloc.s V_9 - IL_c87a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c87f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c884: stloc.s V_10 - IL_c886: ldloc.s V_10 - IL_c888: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c88d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c892: stloc.s V_6 - IL_c894: ldloc.s V_7 - IL_c896: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c89b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c8a0: stloc.s V_7 - IL_c8a2: br.s IL_c8ea - - IL_c8a4: ldloc.s V_10 - IL_c8a6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c8ab: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c8b0: stloc.s V_7 - IL_c8b2: ldloc.s V_6 - IL_c8b4: call string [mscorlib]System.Convert::ToString(int32) - IL_c8b9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c8be: stloc.s V_6 - IL_c8c0: ldloc.s V_9 - IL_c8c2: call string [mscorlib]System.Convert::ToString(int32) - IL_c8c7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c8cc: stloc.s V_6 - IL_c8ce: ldloc.s V_7 - IL_c8d0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c8d5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c8da: stloc.s V_9 - IL_c8dc: ldloc.s V_8 - IL_c8de: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c8e3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c8e8: stloc.s V_10 - IL_c8ea: ldloc.s V_7 - IL_c8ec: ldloc.s V_6 - IL_c8ee: bne.un.s IL_c938 - - IL_c8f0: ldloc.s V_8 - IL_c8f2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c8f7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c8fc: stloc.s V_7 - IL_c8fe: ldloc.s V_6 - IL_c900: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c905: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c90a: stloc.s V_8 - IL_c90c: ldloc.s V_8 - IL_c90e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c913: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c918: stloc.s V_9 - IL_c91a: ldloc.s V_10 - IL_c91c: call string [mscorlib]System.Convert::ToString(int32) - IL_c921: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c926: stloc.s V_8 - IL_c928: ldloc.s V_8 - IL_c92a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c92f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c934: stloc.s V_9 - IL_c936: br.s IL_c97e - - IL_c938: ldloc.s V_6 - IL_c93a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c93f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c944: stloc.s V_6 - IL_c946: ldloc.s V_10 - IL_c948: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c94d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c952: stloc.s V_9 - IL_c954: ldloc.s V_9 - IL_c956: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c95b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c960: stloc.s V_10 - IL_c962: ldloc.s V_10 - IL_c964: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c969: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c96e: stloc.s V_7 - IL_c970: ldloc.s V_7 - IL_c972: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c977: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c97c: stloc.s V_9 - IL_c97e: ldloc.s V_7 - IL_c980: ldloc.s V_6 - IL_c982: bge.s IL_c9cc - - IL_c984: ldloc.s V_7 - IL_c986: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c98b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_c990: stloc.s V_9 - IL_c992: ldloc.s V_6 - IL_c994: call string [mscorlib]System.Convert::ToString(int32) - IL_c999: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c99e: stloc.s V_10 - IL_c9a0: ldloc.s V_7 - IL_c9a2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c9a7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c9ac: stloc.s V_10 - IL_c9ae: ldloc.s V_6 - IL_c9b0: call string [mscorlib]System.Convert::ToString(int32) - IL_c9b5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_c9ba: stloc.s V_8 - IL_c9bc: ldloc.s V_6 - IL_c9be: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c9c3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c9c8: stloc.s V_9 - IL_c9ca: br.s IL_ca12 - - IL_c9cc: ldloc.s V_9 - IL_c9ce: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c9d3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c9d8: stloc.s V_9 - IL_c9da: ldloc.s V_7 - IL_c9dc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_c9e1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_c9e6: stloc.s V_8 - IL_c9e8: ldloc.s V_9 - IL_c9ea: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_c9ef: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_c9f4: stloc.s V_7 - IL_c9f6: ldloc.s V_6 - IL_c9f8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_c9fd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ca02: stloc.s V_10 - IL_ca04: ldloc.s V_7 - IL_ca06: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_ca0b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ca10: stloc.s V_6 - IL_ca12: ldloc.s V_7 - IL_ca14: ldloc.s V_6 - IL_ca16: blt.s IL_ca60 - - IL_ca18: ldloc.s V_6 - IL_ca1a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_ca1f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ca24: stloc.s V_10 - IL_ca26: ldloc.s V_8 - IL_ca28: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ca2d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ca32: stloc.s V_6 - IL_ca34: ldloc.s V_9 - IL_ca36: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ca3b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ca40: stloc.s V_10 - IL_ca42: ldloc.s V_7 - IL_ca44: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ca49: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ca4e: stloc.s V_8 - IL_ca50: ldloc.s V_6 - IL_ca52: call string [mscorlib]System.Convert::ToString(int32) - IL_ca57: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ca5c: stloc.s V_8 - IL_ca5e: br.s IL_caa6 - - IL_ca60: ldloc.s V_6 - IL_ca62: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_ca67: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ca6c: stloc.s V_9 - IL_ca6e: ldloc.s V_7 - IL_ca70: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ca75: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ca7a: stloc.s V_8 - IL_ca7c: ldloc.s V_8 - IL_ca7e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ca83: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ca88: stloc.s V_9 - IL_ca8a: ldloc.s V_8 - IL_ca8c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ca91: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ca96: stloc.s V_9 - IL_ca98: ldloc.s V_7 - IL_ca9a: call string [mscorlib]System.Convert::ToString(int32) - IL_ca9f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_caa4: stloc.s V_6 - IL_caa6: ldloc.s V_6 - IL_caa8: ldloc.s V_7 - IL_caaa: ble.s IL_caf4 - - IL_caac: ldloc.s V_10 - IL_caae: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_cab3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_cab8: stloc.s V_10 - IL_caba: ldloc.s V_8 - IL_cabc: call string [mscorlib]System.Convert::ToString(int32) - IL_cac1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cac6: stloc.s V_10 - IL_cac8: ldloc.s V_6 - IL_caca: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cacf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cad4: stloc.s V_6 - IL_cad6: ldloc.s V_6 - IL_cad8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_cadd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_cae2: stloc.s V_9 - IL_cae4: ldloc.s V_8 - IL_cae6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_caeb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_caf0: stloc.s V_8 - IL_caf2: br.s IL_cb3a - - IL_caf4: ldloc.s V_6 - IL_caf6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cafb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cb00: stloc.s V_10 - IL_cb02: ldloc.s V_8 - IL_cb04: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_cb09: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_cb0e: stloc.s V_6 - IL_cb10: ldloc.s V_9 - IL_cb12: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_cb17: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_cb1c: stloc.s V_9 - IL_cb1e: ldloc.s V_7 - IL_cb20: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cb25: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cb2a: stloc.s V_9 - IL_cb2c: ldloc.s V_6 - IL_cb2e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_cb33: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_cb38: stloc.s V_6 - IL_cb3a: ldloc.s V_8 - IL_cb3c: ldloc.s V_7 - IL_cb3e: blt.s IL_cb88 - - IL_cb40: ldloc.s V_10 - IL_cb42: call string [mscorlib]System.Convert::ToString(int32) - IL_cb47: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cb4c: stloc.s V_10 - IL_cb4e: ldloc.s V_8 - IL_cb50: call string [mscorlib]System.Convert::ToString(int32) - IL_cb55: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cb5a: stloc.s V_7 - IL_cb5c: ldloc.s V_7 - IL_cb5e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cb63: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cb68: stloc.s V_9 - IL_cb6a: ldloc.s V_8 - IL_cb6c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_cb71: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_cb76: stloc.s V_7 - IL_cb78: ldloc.s V_9 - IL_cb7a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cb7f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cb84: stloc.s V_8 - IL_cb86: br.s IL_cbce - - IL_cb88: ldloc.s V_7 - IL_cb8a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cb8f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cb94: stloc.s V_6 - IL_cb96: ldloc.s V_7 - IL_cb98: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_cb9d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_cba2: stloc.s V_6 - IL_cba4: ldloc.s V_9 - IL_cba6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_cbab: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_cbb0: stloc.s V_9 - IL_cbb2: ldloc.s V_6 - IL_cbb4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cbb9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cbbe: stloc.s V_7 - IL_cbc0: ldloc.s V_9 - IL_cbc2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_cbc7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_cbcc: stloc.s V_6 - IL_cbce: ldloc.s V_6 - IL_cbd0: ldloc.s V_7 - IL_cbd2: ble.s IL_cc1c - - IL_cbd4: ldloc.s V_9 - IL_cbd6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cbdb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cbe0: stloc.s V_9 - IL_cbe2: ldloc.s V_9 - IL_cbe4: call string [mscorlib]System.Convert::ToString(int32) - IL_cbe9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cbee: stloc.s V_9 - IL_cbf0: ldloc.s V_7 - IL_cbf2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cbf7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cbfc: stloc.s V_9 - IL_cbfe: ldloc.s V_10 - IL_cc00: call string [mscorlib]System.Convert::ToString(int32) - IL_cc05: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cc0a: stloc.s V_6 - IL_cc0c: ldloc.s V_6 - IL_cc0e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_cc13: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_cc18: stloc.s V_6 - IL_cc1a: br.s IL_cc62 - - IL_cc1c: ldloc.s V_8 - IL_cc1e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_cc23: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_cc28: stloc.s V_9 - IL_cc2a: ldloc.s V_8 - IL_cc2c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cc31: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cc36: stloc.s V_10 - IL_cc38: ldloc.s V_8 - IL_cc3a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_cc3f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_cc44: stloc.s V_10 - IL_cc46: ldloc.s V_7 - IL_cc48: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_cc4d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_cc52: stloc.s V_6 - IL_cc54: ldloc.s V_7 - IL_cc56: call string [mscorlib]System.Convert::ToString(int32) - IL_cc5b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cc60: stloc.s V_7 - IL_cc62: ldloc.s V_6 - IL_cc64: ldloc.s V_10 - IL_cc66: bgt.s IL_ccb0 - - IL_cc68: ldloc.s V_10 - IL_cc6a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_cc6f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_cc74: stloc.s V_6 - IL_cc76: ldloc.s V_9 - IL_cc78: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cc7d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cc82: stloc.s V_10 - IL_cc84: ldloc.s V_8 - IL_cc86: call string [mscorlib]System.Convert::ToString(int32) - IL_cc8b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cc90: stloc.s V_8 - IL_cc92: ldloc.s V_8 - IL_cc94: call string [mscorlib]System.Convert::ToString(int32) - IL_cc99: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cc9e: stloc.s V_6 - IL_cca0: ldloc.s V_7 - IL_cca2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cca7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ccac: stloc.s V_9 - IL_ccae: br.s IL_ccf6 - - IL_ccb0: ldloc.s V_6 - IL_ccb2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ccb7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ccbc: stloc.s V_10 - IL_ccbe: ldloc.s V_10 - IL_ccc0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_ccc5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ccca: stloc.s V_6 - IL_cccc: ldloc.s V_7 - IL_ccce: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ccd3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ccd8: stloc.s V_10 - IL_ccda: ldloc.s V_9 - IL_ccdc: call string [mscorlib]System.Convert::ToString(int32) - IL_cce1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cce6: stloc.s V_7 - IL_cce8: ldloc.s V_9 - IL_ccea: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ccef: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ccf4: stloc.s V_8 - IL_ccf6: ldloc.s V_8 - IL_ccf8: ldloc.s V_7 - IL_ccfa: beq.s IL_cd44 - - IL_ccfc: ldloc.s V_7 - IL_ccfe: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_cd03: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_cd08: stloc.s V_6 - IL_cd0a: ldloc.s V_9 - IL_cd0c: call string [mscorlib]System.Convert::ToString(int32) - IL_cd11: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cd16: stloc.s V_7 - IL_cd18: ldloc.s V_9 - IL_cd1a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cd1f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cd24: stloc.s V_9 - IL_cd26: ldloc.s V_8 - IL_cd28: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_cd2d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_cd32: stloc.s V_6 - IL_cd34: ldloc.s V_9 - IL_cd36: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_cd3b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_cd40: stloc.s V_10 - IL_cd42: br.s IL_cd8a - - IL_cd44: ldloc.s V_7 - IL_cd46: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cd4b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cd50: stloc.s V_6 - IL_cd52: ldloc.s V_6 - IL_cd54: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cd59: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cd5e: stloc.s V_7 - IL_cd60: ldloc.s V_6 - IL_cd62: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cd67: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cd6c: stloc.s V_6 - IL_cd6e: ldloc.s V_9 - IL_cd70: call string [mscorlib]System.Convert::ToString(int32) - IL_cd75: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cd7a: stloc.s V_8 - IL_cd7c: ldloc.s V_7 - IL_cd7e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_cd83: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_cd88: stloc.s V_6 - IL_cd8a: ldloc.s V_7 - IL_cd8c: ldloc.s V_6 - IL_cd8e: bne.un.s IL_cdd8 - - IL_cd90: ldloc.s V_7 - IL_cd92: call string [mscorlib]System.Convert::ToString(int32) - IL_cd97: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cd9c: stloc.s V_6 - IL_cd9e: ldloc.s V_9 - IL_cda0: call string [mscorlib]System.Convert::ToString(int32) - IL_cda5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cdaa: stloc.s V_6 - IL_cdac: ldloc.s V_9 - IL_cdae: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cdb3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cdb8: stloc.s V_8 - IL_cdba: ldloc.s V_10 - IL_cdbc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_cdc1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_cdc6: stloc.s V_6 - IL_cdc8: ldloc.s V_8 - IL_cdca: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cdcf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cdd4: stloc.s V_10 - IL_cdd6: br.s IL_ce1e - - IL_cdd8: ldloc.s V_10 - IL_cdda: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cddf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cde4: stloc.s V_6 - IL_cde6: ldloc.s V_6 - IL_cde8: call string [mscorlib]System.Convert::ToString(int32) - IL_cded: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cdf2: stloc.s V_8 - IL_cdf4: ldloc.s V_8 - IL_cdf6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_cdfb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ce00: stloc.s V_7 - IL_ce02: ldloc.s V_10 - IL_ce04: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ce09: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ce0e: stloc.s V_7 - IL_ce10: ldloc.s V_8 - IL_ce12: call string [mscorlib]System.Convert::ToString(int32) - IL_ce17: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ce1c: stloc.s V_10 - IL_ce1e: ldloc.s V_7 - IL_ce20: ldloc.s V_9 - IL_ce22: bgt.s IL_ce6c - - IL_ce24: ldloc.s V_8 - IL_ce26: call string [mscorlib]System.Convert::ToString(int32) - IL_ce2b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ce30: stloc.s V_8 - IL_ce32: ldloc.s V_9 - IL_ce34: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ce39: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ce3e: stloc.s V_7 - IL_ce40: ldloc.s V_6 - IL_ce42: call string [mscorlib]System.Convert::ToString(int32) - IL_ce47: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ce4c: stloc.s V_8 - IL_ce4e: ldloc.s V_8 - IL_ce50: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ce55: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ce5a: stloc.s V_7 - IL_ce5c: ldloc.s V_7 - IL_ce5e: call string [mscorlib]System.Convert::ToString(int32) - IL_ce63: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ce68: stloc.s V_6 - IL_ce6a: br.s IL_ceb2 - - IL_ce6c: ldloc.s V_8 - IL_ce6e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_ce73: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ce78: stloc.s V_7 - IL_ce7a: ldloc.s V_9 - IL_ce7c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_ce81: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ce86: stloc.s V_7 - IL_ce88: ldloc.s V_9 - IL_ce8a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ce8f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ce94: stloc.s V_6 - IL_ce96: ldloc.s V_10 - IL_ce98: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ce9d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_cea2: stloc.s V_9 - IL_cea4: ldloc.s V_9 - IL_cea6: call string [mscorlib]System.Convert::ToString(int32) - IL_ceab: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ceb0: stloc.s V_9 - IL_ceb2: ldloc.s V_9 - IL_ceb4: ldloc.s V_8 - IL_ceb6: bge.s IL_cf00 - - IL_ceb8: ldloc.s V_9 - IL_ceba: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cebf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cec4: stloc.s V_7 - IL_cec6: ldloc.s V_8 - IL_cec8: call string [mscorlib]System.Convert::ToString(int32) - IL_cecd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ced2: stloc.s V_10 - IL_ced4: ldloc.s V_10 - IL_ced6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_cedb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_cee0: stloc.s V_7 - IL_cee2: ldloc.s V_6 - IL_cee4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_cee9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ceee: stloc.s V_10 - IL_cef0: ldloc.s V_6 - IL_cef2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_cef7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_cefc: stloc.s V_6 - IL_cefe: br.s IL_cf46 - - IL_cf00: ldloc.s V_9 - IL_cf02: call string [mscorlib]System.Convert::ToString(int32) - IL_cf07: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cf0c: stloc.s V_8 - IL_cf0e: ldloc.s V_6 - IL_cf10: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cf15: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cf1a: stloc.s V_10 - IL_cf1c: ldloc.s V_10 - IL_cf1e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cf23: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cf28: stloc.s V_6 - IL_cf2a: ldloc.s V_6 - IL_cf2c: call string [mscorlib]System.Convert::ToString(int32) - IL_cf31: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cf36: stloc.s V_10 - IL_cf38: ldloc.s V_6 - IL_cf3a: call string [mscorlib]System.Convert::ToString(int32) - IL_cf3f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cf44: stloc.s V_10 - IL_cf46: ldloc.s V_6 - IL_cf48: ldloc.s V_7 - IL_cf4a: blt.s IL_cf94 - - IL_cf4c: ldloc.s V_7 - IL_cf4e: call string [mscorlib]System.Convert::ToString(int32) - IL_cf53: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cf58: stloc.s V_10 - IL_cf5a: ldloc.s V_7 - IL_cf5c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cf61: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cf66: stloc.s V_9 - IL_cf68: ldloc.s V_6 - IL_cf6a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_cf6f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_cf74: stloc.s V_6 - IL_cf76: ldloc.s V_9 - IL_cf78: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_cf7d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_cf82: stloc.s V_9 - IL_cf84: ldloc.s V_8 - IL_cf86: call string [mscorlib]System.Convert::ToString(int32) - IL_cf8b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cf90: stloc.s V_8 - IL_cf92: br.s IL_cfda - - IL_cf94: ldloc.s V_6 - IL_cf96: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_cf9b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_cfa0: stloc.s V_9 - IL_cfa2: ldloc.s V_7 - IL_cfa4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cfa9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cfae: stloc.s V_10 - IL_cfb0: ldloc.s V_6 - IL_cfb2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_cfb7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_cfbc: stloc.s V_7 - IL_cfbe: ldloc.s V_7 - IL_cfc0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_cfc5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_cfca: stloc.s V_10 - IL_cfcc: ldloc.s V_7 - IL_cfce: call string [mscorlib]System.Convert::ToString(int32) - IL_cfd3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_cfd8: stloc.s V_7 - IL_cfda: ldloc.s V_9 - IL_cfdc: ldloc.s V_6 - IL_cfde: bne.un.s IL_d028 - - IL_cfe0: ldloc.s V_8 - IL_cfe2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_cfe7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_cfec: stloc.s V_10 - IL_cfee: ldloc.s V_6 - IL_cff0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_cff5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_cffa: stloc.s V_10 - IL_cffc: ldloc.s V_7 - IL_cffe: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d003: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d008: stloc.s V_8 - IL_d00a: ldloc.s V_7 - IL_d00c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d011: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d016: stloc.s V_6 - IL_d018: ldloc.s V_10 - IL_d01a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d01f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d024: stloc.s V_6 - IL_d026: br.s IL_d06e - - IL_d028: ldloc.s V_8 - IL_d02a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d02f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d034: stloc.s V_9 - IL_d036: ldloc.s V_8 - IL_d038: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d03d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d042: stloc.s V_10 - IL_d044: ldloc.s V_7 - IL_d046: call string [mscorlib]System.Convert::ToString(int32) - IL_d04b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d050: stloc.s V_10 - IL_d052: ldloc.s V_8 - IL_d054: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d059: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d05e: stloc.s V_7 - IL_d060: ldloc.s V_8 - IL_d062: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d067: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d06c: stloc.s V_6 - IL_d06e: ldloc.s V_10 - IL_d070: ldloc.s V_8 - IL_d072: bne.un.s IL_d0bc - - IL_d074: ldloc.s V_9 - IL_d076: call string [mscorlib]System.Convert::ToString(int32) - IL_d07b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d080: stloc.s V_9 - IL_d082: ldloc.s V_7 - IL_d084: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d089: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d08e: stloc.s V_6 - IL_d090: ldloc.s V_9 - IL_d092: call string [mscorlib]System.Convert::ToString(int32) - IL_d097: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d09c: stloc.s V_6 - IL_d09e: ldloc.s V_6 - IL_d0a0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d0a5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d0aa: stloc.s V_10 - IL_d0ac: ldloc.s V_8 - IL_d0ae: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d0b3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d0b8: stloc.s V_10 - IL_d0ba: br.s IL_d102 - - IL_d0bc: ldloc.s V_7 - IL_d0be: call string [mscorlib]System.Convert::ToString(int32) - IL_d0c3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d0c8: stloc.s V_7 - IL_d0ca: ldloc.s V_7 - IL_d0cc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d0d1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d0d6: stloc.s V_10 - IL_d0d8: ldloc.s V_8 - IL_d0da: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d0df: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d0e4: stloc.s V_8 - IL_d0e6: ldloc.s V_6 - IL_d0e8: call string [mscorlib]System.Convert::ToString(int32) - IL_d0ed: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d0f2: stloc.s V_6 - IL_d0f4: ldloc.s V_10 - IL_d0f6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d0fb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d100: stloc.s V_8 - IL_d102: ldloc.s V_7 - IL_d104: ldloc.s V_7 - IL_d106: beq.s IL_d150 - - IL_d108: ldloc.s V_10 - IL_d10a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d10f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d114: stloc.s V_9 - IL_d116: ldloc.s V_7 - IL_d118: call string [mscorlib]System.Convert::ToString(int32) - IL_d11d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d122: stloc.s V_7 - IL_d124: ldloc.s V_10 - IL_d126: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d12b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d130: stloc.s V_6 - IL_d132: ldloc.s V_7 - IL_d134: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d139: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d13e: stloc.s V_10 - IL_d140: ldloc.s V_6 - IL_d142: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d147: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d14c: stloc.s V_7 - IL_d14e: br.s IL_d196 - - IL_d150: ldloc.s V_6 - IL_d152: call string [mscorlib]System.Convert::ToString(int32) - IL_d157: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d15c: stloc.s V_6 - IL_d15e: ldloc.s V_6 - IL_d160: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d165: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d16a: stloc.s V_6 - IL_d16c: ldloc.s V_9 - IL_d16e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d173: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d178: stloc.s V_6 - IL_d17a: ldloc.s V_6 - IL_d17c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d181: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d186: stloc.s V_6 - IL_d188: ldloc.s V_6 - IL_d18a: call string [mscorlib]System.Convert::ToString(int32) - IL_d18f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d194: stloc.s V_7 - IL_d196: ldloc.s V_6 - IL_d198: ldloc.s V_6 - IL_d19a: bne.un.s IL_d1e4 - - IL_d19c: ldloc.s V_8 - IL_d19e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d1a3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d1a8: stloc.s V_9 - IL_d1aa: ldloc.s V_6 - IL_d1ac: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d1b1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d1b6: stloc.s V_9 - IL_d1b8: ldloc.s V_6 - IL_d1ba: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d1bf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d1c4: stloc.s V_10 - IL_d1c6: ldloc.s V_10 - IL_d1c8: call string [mscorlib]System.Convert::ToString(int32) - IL_d1cd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d1d2: stloc.s V_8 - IL_d1d4: ldloc.s V_7 - IL_d1d6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d1db: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d1e0: stloc.s V_6 - IL_d1e2: br.s IL_d22a - - IL_d1e4: ldloc.s V_9 - IL_d1e6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d1eb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d1f0: stloc.s V_6 - IL_d1f2: ldloc.s V_8 - IL_d1f4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d1f9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d1fe: stloc.s V_9 - IL_d200: ldloc.s V_6 - IL_d202: call string [mscorlib]System.Convert::ToString(int32) - IL_d207: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d20c: stloc.s V_7 - IL_d20e: ldloc.s V_9 - IL_d210: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d215: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d21a: stloc.s V_6 - IL_d21c: ldloc.s V_7 - IL_d21e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d223: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d228: stloc.s V_7 - IL_d22a: ldloc.s V_6 - IL_d22c: ldloc.s V_10 - IL_d22e: bgt.s IL_d278 - - IL_d230: ldloc.s V_7 - IL_d232: call string [mscorlib]System.Convert::ToString(int32) - IL_d237: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d23c: stloc.s V_7 - IL_d23e: ldloc.s V_8 - IL_d240: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d245: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d24a: stloc.s V_8 - IL_d24c: ldloc.s V_6 - IL_d24e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d253: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d258: stloc.s V_6 - IL_d25a: ldloc.s V_9 - IL_d25c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d261: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d266: stloc.s V_10 - IL_d268: ldloc.s V_6 - IL_d26a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d26f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d274: stloc.s V_10 - IL_d276: br.s IL_d2be - - IL_d278: ldloc.s V_6 - IL_d27a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d27f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d284: stloc.s V_10 - IL_d286: ldloc.s V_6 - IL_d288: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d28d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d292: stloc.s V_8 - IL_d294: ldloc.s V_8 - IL_d296: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d29b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d2a0: stloc.s V_8 - IL_d2a2: ldloc.s V_6 - IL_d2a4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d2a9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d2ae: stloc.s V_7 - IL_d2b0: ldloc.s V_10 - IL_d2b2: call string [mscorlib]System.Convert::ToString(int32) - IL_d2b7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d2bc: stloc.s V_8 - IL_d2be: ldloc.s V_9 - IL_d2c0: ldloc.s V_7 - IL_d2c2: beq.s IL_d30c - - IL_d2c4: ldloc.s V_6 - IL_d2c6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d2cb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d2d0: stloc.s V_10 - IL_d2d2: ldloc.s V_6 - IL_d2d4: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d2d9: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d2de: stloc.s V_10 - IL_d2e0: ldloc.s V_10 - IL_d2e2: call string [mscorlib]System.Convert::ToString(int32) - IL_d2e7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d2ec: stloc.s V_6 - IL_d2ee: ldloc.s V_10 - IL_d2f0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d2f5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d2fa: stloc.s V_8 - IL_d2fc: ldloc.s V_6 - IL_d2fe: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d303: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d308: stloc.s V_8 - IL_d30a: br.s IL_d352 - - IL_d30c: ldloc.s V_9 - IL_d30e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d313: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d318: stloc.s V_8 - IL_d31a: ldloc.s V_7 - IL_d31c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d321: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d326: stloc.s V_6 - IL_d328: ldloc.s V_7 - IL_d32a: call string [mscorlib]System.Convert::ToString(int32) - IL_d32f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d334: stloc.s V_9 - IL_d336: ldloc.s V_10 - IL_d338: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d33d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d342: stloc.s V_10 - IL_d344: ldloc.s V_7 - IL_d346: call string [mscorlib]System.Convert::ToString(int32) - IL_d34b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d350: stloc.s V_8 - IL_d352: ldloc.s V_6 - IL_d354: ldloc.s V_10 - IL_d356: bge.s IL_d3a0 - - IL_d358: ldloc.s V_6 - IL_d35a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d35f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d364: stloc.s V_7 - IL_d366: ldloc.s V_9 - IL_d368: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d36d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d372: stloc.s V_6 - IL_d374: ldloc.s V_7 - IL_d376: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d37b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d380: stloc.s V_10 - IL_d382: ldloc.s V_10 - IL_d384: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d389: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d38e: stloc.s V_7 - IL_d390: ldloc.s V_6 - IL_d392: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d397: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d39c: stloc.s V_9 - IL_d39e: br.s IL_d3e6 - - IL_d3a0: ldloc.s V_7 - IL_d3a2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d3a7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d3ac: stloc.s V_10 - IL_d3ae: ldloc.s V_8 - IL_d3b0: call string [mscorlib]System.Convert::ToString(int32) - IL_d3b5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d3ba: stloc.s V_6 - IL_d3bc: ldloc.s V_6 - IL_d3be: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d3c3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d3c8: stloc.s V_6 - IL_d3ca: ldloc.s V_6 - IL_d3cc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d3d1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d3d6: stloc.s V_9 - IL_d3d8: ldloc.s V_10 - IL_d3da: call string [mscorlib]System.Convert::ToString(int32) - IL_d3df: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d3e4: stloc.s V_7 - IL_d3e6: ldloc.s V_7 - IL_d3e8: ldloc.s V_7 - IL_d3ea: blt.s IL_d434 - - IL_d3ec: ldloc.s V_8 - IL_d3ee: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d3f3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d3f8: stloc.s V_10 - IL_d3fa: ldloc.s V_9 - IL_d3fc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d401: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d406: stloc.s V_10 - IL_d408: ldloc.s V_10 - IL_d40a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d40f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d414: stloc.s V_10 - IL_d416: ldloc.s V_9 - IL_d418: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d41d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d422: stloc.s V_10 - IL_d424: ldloc.s V_7 - IL_d426: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d42b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d430: stloc.s V_8 - IL_d432: br.s IL_d47a - - IL_d434: ldloc.s V_10 - IL_d436: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d43b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d440: stloc.s V_9 - IL_d442: ldloc.s V_7 - IL_d444: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d449: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d44e: stloc.s V_6 - IL_d450: ldloc.s V_9 - IL_d452: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d457: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d45c: stloc.s V_8 - IL_d45e: ldloc.s V_9 - IL_d460: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d465: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d46a: stloc.s V_10 - IL_d46c: ldloc.s V_8 - IL_d46e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d473: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d478: stloc.s V_8 - IL_d47a: ldloc.s V_10 - IL_d47c: ldloc.s V_10 - IL_d47e: bgt.s IL_d4c8 - - IL_d480: ldloc.s V_10 - IL_d482: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d487: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d48c: stloc.s V_9 - IL_d48e: ldloc.s V_7 - IL_d490: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d495: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d49a: stloc.s V_9 - IL_d49c: ldloc.s V_8 - IL_d49e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d4a3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d4a8: stloc.s V_9 - IL_d4aa: ldloc.s V_9 - IL_d4ac: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d4b1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d4b6: stloc.s V_9 - IL_d4b8: ldloc.s V_10 - IL_d4ba: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d4bf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d4c4: stloc.s V_8 - IL_d4c6: br.s IL_d50e - - IL_d4c8: ldloc.s V_7 - IL_d4ca: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d4cf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d4d4: stloc.s V_10 - IL_d4d6: ldloc.s V_6 - IL_d4d8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d4dd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d4e2: stloc.s V_6 - IL_d4e4: ldloc.s V_10 - IL_d4e6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d4eb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d4f0: stloc.s V_10 - IL_d4f2: ldloc.s V_6 - IL_d4f4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d4f9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d4fe: stloc.s V_9 - IL_d500: ldloc.s V_7 - IL_d502: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d507: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d50c: stloc.s V_10 - IL_d50e: ldloc.s V_7 - IL_d510: ldloc.s V_8 - IL_d512: bge.s IL_d55c - - IL_d514: ldloc.s V_8 - IL_d516: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d51b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d520: stloc.s V_10 - IL_d522: ldloc.s V_8 - IL_d524: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d529: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d52e: stloc.s V_8 - IL_d530: ldloc.s V_10 - IL_d532: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d537: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d53c: stloc.s V_8 - IL_d53e: ldloc.s V_10 - IL_d540: call string [mscorlib]System.Convert::ToString(int32) - IL_d545: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d54a: stloc.s V_9 - IL_d54c: ldloc.s V_6 - IL_d54e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d553: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d558: stloc.s V_10 - IL_d55a: br.s IL_d5a2 - - IL_d55c: ldloc.s V_7 - IL_d55e: call string [mscorlib]System.Convert::ToString(int32) - IL_d563: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d568: stloc.s V_10 - IL_d56a: ldloc.s V_8 - IL_d56c: call string [mscorlib]System.Convert::ToString(int32) - IL_d571: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d576: stloc.s V_7 - IL_d578: ldloc.s V_7 - IL_d57a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d57f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d584: stloc.s V_9 - IL_d586: ldloc.s V_6 - IL_d588: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d58d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d592: stloc.s V_10 - IL_d594: ldloc.s V_9 - IL_d596: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d59b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d5a0: stloc.s V_7 - IL_d5a2: ldloc.s V_7 - IL_d5a4: ldloc.s V_6 - IL_d5a6: bge.s IL_d5f0 - - IL_d5a8: ldloc.s V_7 - IL_d5aa: call string [mscorlib]System.Convert::ToString(int32) - IL_d5af: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d5b4: stloc.s V_6 - IL_d5b6: ldloc.s V_8 - IL_d5b8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d5bd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d5c2: stloc.s V_7 - IL_d5c4: ldloc.s V_6 - IL_d5c6: call string [mscorlib]System.Convert::ToString(int32) - IL_d5cb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d5d0: stloc.s V_10 - IL_d5d2: ldloc.s V_9 - IL_d5d4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d5d9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d5de: stloc.s V_7 - IL_d5e0: ldloc.s V_8 - IL_d5e2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d5e7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d5ec: stloc.s V_6 - IL_d5ee: br.s IL_d636 - - IL_d5f0: ldloc.s V_9 - IL_d5f2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d5f7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d5fc: stloc.s V_10 - IL_d5fe: ldloc.s V_9 - IL_d600: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d605: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d60a: stloc.s V_6 - IL_d60c: ldloc.s V_6 - IL_d60e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d613: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d618: stloc.s V_6 - IL_d61a: ldloc.s V_6 - IL_d61c: call string [mscorlib]System.Convert::ToString(int32) - IL_d621: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d626: stloc.s V_6 - IL_d628: ldloc.s V_9 - IL_d62a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d62f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d634: stloc.s V_8 - IL_d636: ldloc.s V_8 - IL_d638: ldloc.s V_7 - IL_d63a: bge.s IL_d684 - - IL_d63c: ldloc.s V_10 - IL_d63e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d643: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d648: stloc.s V_9 - IL_d64a: ldloc.s V_7 - IL_d64c: call string [mscorlib]System.Convert::ToString(int32) - IL_d651: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d656: stloc.s V_9 - IL_d658: ldloc.s V_6 - IL_d65a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d65f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d664: stloc.s V_10 - IL_d666: ldloc.s V_9 - IL_d668: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d66d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d672: stloc.s V_8 - IL_d674: ldloc.s V_6 - IL_d676: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d67b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d680: stloc.s V_9 - IL_d682: br.s IL_d6ca - - IL_d684: ldloc.s V_10 - IL_d686: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d68b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d690: stloc.s V_8 - IL_d692: ldloc.s V_7 - IL_d694: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d699: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d69e: stloc.s V_6 - IL_d6a0: ldloc.s V_8 - IL_d6a2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d6a7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d6ac: stloc.s V_7 - IL_d6ae: ldloc.s V_10 - IL_d6b0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d6b5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d6ba: stloc.s V_7 - IL_d6bc: ldloc.s V_7 - IL_d6be: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d6c3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d6c8: stloc.s V_7 - IL_d6ca: ldloc.s V_10 - IL_d6cc: ldloc.s V_8 - IL_d6ce: blt.s IL_d718 - - IL_d6d0: ldloc.s V_10 - IL_d6d2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d6d7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d6dc: stloc.s V_7 - IL_d6de: ldloc.s V_7 - IL_d6e0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d6e5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d6ea: stloc.s V_9 - IL_d6ec: ldloc.s V_8 - IL_d6ee: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d6f3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d6f8: stloc.s V_8 - IL_d6fa: ldloc.s V_9 - IL_d6fc: call string [mscorlib]System.Convert::ToString(int32) - IL_d701: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d706: stloc.s V_9 - IL_d708: ldloc.s V_9 - IL_d70a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d70f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d714: stloc.s V_8 - IL_d716: br.s IL_d75e - - IL_d718: ldloc.s V_10 - IL_d71a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d71f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d724: stloc.s V_6 - IL_d726: ldloc.s V_8 - IL_d728: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d72d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d732: stloc.s V_9 - IL_d734: ldloc.s V_9 - IL_d736: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d73b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d740: stloc.s V_10 - IL_d742: ldloc.s V_7 - IL_d744: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d749: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d74e: stloc.s V_8 - IL_d750: ldloc.s V_6 - IL_d752: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d757: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d75c: stloc.s V_7 - IL_d75e: ldloc.s V_6 - IL_d760: ldloc.s V_8 - IL_d762: bne.un.s IL_d7ac - - IL_d764: ldloc.s V_8 - IL_d766: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d76b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d770: stloc.s V_6 - IL_d772: ldloc.s V_6 - IL_d774: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d779: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d77e: stloc.s V_6 - IL_d780: ldloc.s V_10 - IL_d782: call string [mscorlib]System.Convert::ToString(int32) - IL_d787: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d78c: stloc.s V_8 - IL_d78e: ldloc.s V_8 - IL_d790: call string [mscorlib]System.Convert::ToString(int32) - IL_d795: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d79a: stloc.s V_10 - IL_d79c: ldloc.s V_10 - IL_d79e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d7a3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d7a8: stloc.s V_9 - IL_d7aa: br.s IL_d7f2 - - IL_d7ac: ldloc.s V_8 - IL_d7ae: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d7b3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d7b8: stloc.s V_6 - IL_d7ba: ldloc.s V_9 - IL_d7bc: call string [mscorlib]System.Convert::ToString(int32) - IL_d7c1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d7c6: stloc.s V_7 - IL_d7c8: ldloc.s V_10 - IL_d7ca: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d7cf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d7d4: stloc.s V_6 - IL_d7d6: ldloc.s V_9 - IL_d7d8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d7dd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d7e2: stloc.s V_7 - IL_d7e4: ldloc.s V_10 - IL_d7e6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d7eb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d7f0: stloc.s V_6 - IL_d7f2: ldloc.s V_6 - IL_d7f4: ldloc.s V_8 - IL_d7f6: blt.s IL_d840 - - IL_d7f8: ldloc.s V_6 - IL_d7fa: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d7ff: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d804: stloc.s V_7 - IL_d806: ldloc.s V_6 - IL_d808: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d80d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d812: stloc.s V_7 - IL_d814: ldloc.s V_9 - IL_d816: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d81b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d820: stloc.s V_10 - IL_d822: ldloc.s V_10 - IL_d824: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d829: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d82e: stloc.s V_8 - IL_d830: ldloc.s V_8 - IL_d832: call string [mscorlib]System.Convert::ToString(int32) - IL_d837: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d83c: stloc.s V_7 - IL_d83e: br.s IL_d886 - - IL_d840: ldloc.s V_7 - IL_d842: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d847: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d84c: stloc.s V_8 - IL_d84e: ldloc.s V_8 - IL_d850: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d855: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d85a: stloc.s V_9 - IL_d85c: ldloc.s V_10 - IL_d85e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d863: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d868: stloc.s V_9 - IL_d86a: ldloc.s V_8 - IL_d86c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d871: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d876: stloc.s V_9 - IL_d878: ldloc.s V_8 - IL_d87a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d87f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d884: stloc.s V_7 - IL_d886: ldloc.s V_7 - IL_d888: ldloc.s V_8 - IL_d88a: ble.s IL_d8d4 - - IL_d88c: ldloc.s V_8 - IL_d88e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d893: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d898: stloc.s V_10 - IL_d89a: ldloc.s V_7 - IL_d89c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d8a1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d8a6: stloc.s V_9 - IL_d8a8: ldloc.s V_7 - IL_d8aa: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d8af: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d8b4: stloc.s V_7 - IL_d8b6: ldloc.s V_7 - IL_d8b8: call string [mscorlib]System.Convert::ToString(int32) - IL_d8bd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d8c2: stloc.s V_6 - IL_d8c4: ldloc.s V_8 - IL_d8c6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d8cb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d8d0: stloc.s V_10 - IL_d8d2: br.s IL_d91a - - IL_d8d4: ldloc.s V_10 - IL_d8d6: call string [mscorlib]System.Convert::ToString(int32) - IL_d8db: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d8e0: stloc.s V_6 - IL_d8e2: ldloc.s V_8 - IL_d8e4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d8e9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d8ee: stloc.s V_8 - IL_d8f0: ldloc.s V_7 - IL_d8f2: call string [mscorlib]System.Convert::ToString(int32) - IL_d8f7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d8fc: stloc.s V_6 - IL_d8fe: ldloc.s V_6 - IL_d900: call string [mscorlib]System.Convert::ToString(int32) - IL_d905: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d90a: stloc.s V_7 - IL_d90c: ldloc.s V_10 - IL_d90e: call string [mscorlib]System.Convert::ToString(int32) - IL_d913: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d918: stloc.s V_8 - IL_d91a: ldloc.s V_8 - IL_d91c: ldloc.s V_10 - IL_d91e: bge.s IL_d968 - - IL_d920: ldloc.s V_6 - IL_d922: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d927: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d92c: stloc.s V_7 - IL_d92e: ldloc.s V_7 - IL_d930: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d935: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d93a: stloc.s V_6 - IL_d93c: ldloc.s V_6 - IL_d93e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d943: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d948: stloc.s V_10 - IL_d94a: ldloc.s V_7 - IL_d94c: call string [mscorlib]System.Convert::ToString(int32) - IL_d951: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d956: stloc.s V_6 - IL_d958: ldloc.s V_10 - IL_d95a: call string [mscorlib]System.Convert::ToString(int32) - IL_d95f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d964: stloc.s V_8 - IL_d966: br.s IL_d9ae - - IL_d968: ldloc.s V_10 - IL_d96a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d96f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d974: stloc.s V_6 - IL_d976: ldloc.s V_8 - IL_d978: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d97d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d982: stloc.s V_9 - IL_d984: ldloc.s V_10 - IL_d986: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d98b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d990: stloc.s V_10 - IL_d992: ldloc.s V_7 - IL_d994: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_d999: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_d99e: stloc.s V_6 - IL_d9a0: ldloc.s V_9 - IL_d9a2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d9a7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d9ac: stloc.s V_7 - IL_d9ae: ldloc.s V_10 - IL_d9b0: ldloc.s V_6 - IL_d9b2: bgt.s IL_d9fc - - IL_d9b4: ldloc.s V_10 - IL_d9b6: call string [mscorlib]System.Convert::ToString(int32) - IL_d9bb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d9c0: stloc.s V_8 - IL_d9c2: ldloc.s V_9 - IL_d9c4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_d9c9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_d9ce: stloc.s V_7 - IL_d9d0: ldloc.s V_9 - IL_d9d2: call string [mscorlib]System.Convert::ToString(int32) - IL_d9d7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_d9dc: stloc.s V_8 - IL_d9de: ldloc.s V_6 - IL_d9e0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d9e5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d9ea: stloc.s V_8 - IL_d9ec: ldloc.s V_10 - IL_d9ee: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_d9f3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_d9f8: stloc.s V_10 - IL_d9fa: br.s IL_da42 - - IL_d9fc: ldloc.s V_8 - IL_d9fe: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_da03: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_da08: stloc.s V_7 - IL_da0a: ldloc.s V_6 - IL_da0c: call string [mscorlib]System.Convert::ToString(int32) - IL_da11: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_da16: stloc.s V_10 - IL_da18: ldloc.s V_7 - IL_da1a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_da1f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_da24: stloc.s V_7 - IL_da26: ldloc.s V_8 - IL_da28: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_da2d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_da32: stloc.s V_7 - IL_da34: ldloc.s V_8 - IL_da36: call string [mscorlib]System.Convert::ToString(int32) - IL_da3b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_da40: stloc.s V_10 - IL_da42: ldloc.s V_8 - IL_da44: ldloc.s V_9 - IL_da46: blt.s IL_da90 - - IL_da48: ldloc.s V_6 - IL_da4a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_da4f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_da54: stloc.s V_7 - IL_da56: ldloc.s V_6 - IL_da58: call string [mscorlib]System.Convert::ToString(int32) - IL_da5d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_da62: stloc.s V_6 - IL_da64: ldloc.s V_9 - IL_da66: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_da6b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_da70: stloc.s V_7 - IL_da72: ldloc.s V_6 - IL_da74: call string [mscorlib]System.Convert::ToString(int32) - IL_da79: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_da7e: stloc.s V_10 - IL_da80: ldloc.s V_8 - IL_da82: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_da87: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_da8c: stloc.s V_10 - IL_da8e: br.s IL_dad6 - - IL_da90: ldloc.s V_7 - IL_da92: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_da97: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_da9c: stloc.s V_7 - IL_da9e: ldloc.s V_7 - IL_daa0: call string [mscorlib]System.Convert::ToString(int32) - IL_daa5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_daaa: stloc.s V_7 - IL_daac: ldloc.s V_7 - IL_daae: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dab3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dab8: stloc.s V_6 - IL_daba: ldloc.s V_7 - IL_dabc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dac1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dac6: stloc.s V_8 - IL_dac8: ldloc.s V_6 - IL_daca: call string [mscorlib]System.Convert::ToString(int32) - IL_dacf: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_dad4: stloc.s V_6 - IL_dad6: ldloc.s V_6 - IL_dad8: ldloc.s V_8 - IL_dada: ble.s IL_db24 - - IL_dadc: ldloc.s V_9 - IL_dade: call string [mscorlib]System.Convert::ToString(int32) - IL_dae3: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_dae8: stloc.s V_7 - IL_daea: ldloc.s V_10 - IL_daec: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_daf1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_daf6: stloc.s V_10 - IL_daf8: ldloc.s V_8 - IL_dafa: call string [mscorlib]System.Convert::ToString(int32) - IL_daff: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_db04: stloc.s V_8 - IL_db06: ldloc.s V_10 - IL_db08: call string [mscorlib]System.Convert::ToString(int32) - IL_db0d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_db12: stloc.s V_7 - IL_db14: ldloc.s V_9 - IL_db16: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_db1b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_db20: stloc.s V_7 - IL_db22: br.s IL_db6a - - IL_db24: ldloc.s V_9 - IL_db26: call string [mscorlib]System.Convert::ToString(int32) - IL_db2b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_db30: stloc.s V_6 - IL_db32: ldloc.s V_10 - IL_db34: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_db39: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_db3e: stloc.s V_6 - IL_db40: ldloc.s V_6 - IL_db42: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_db47: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_db4c: stloc.s V_7 - IL_db4e: ldloc.s V_8 - IL_db50: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_db55: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_db5a: stloc.s V_9 - IL_db5c: ldloc.s V_8 - IL_db5e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_db63: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_db68: stloc.s V_9 - IL_db6a: ldloc.s V_9 - IL_db6c: ldloc.s V_8 - IL_db6e: bgt.s IL_dbb8 - - IL_db70: ldloc.s V_8 - IL_db72: call string [mscorlib]System.Convert::ToString(int32) - IL_db77: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_db7c: stloc.s V_9 - IL_db7e: ldloc.s V_9 - IL_db80: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_db85: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_db8a: stloc.s V_10 - IL_db8c: ldloc.s V_10 - IL_db8e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_db93: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_db98: stloc.s V_8 - IL_db9a: ldloc.s V_8 - IL_db9c: call string [mscorlib]System.Convert::ToString(int32) - IL_dba1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_dba6: stloc.s V_9 - IL_dba8: ldloc.s V_9 - IL_dbaa: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_dbaf: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_dbb4: stloc.s V_8 - IL_dbb6: br.s IL_dbfe - - IL_dbb8: ldloc.s V_6 - IL_dbba: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dbbf: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dbc4: stloc.s V_9 - IL_dbc6: ldloc.s V_6 - IL_dbc8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dbcd: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dbd2: stloc.s V_8 - IL_dbd4: ldloc.s V_7 - IL_dbd6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_dbdb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_dbe0: stloc.s V_8 - IL_dbe2: ldloc.s V_9 - IL_dbe4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dbe9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dbee: stloc.s V_8 - IL_dbf0: ldloc.s V_8 - IL_dbf2: call string [mscorlib]System.Convert::ToString(int32) - IL_dbf7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_dbfc: stloc.s V_7 - IL_dbfe: ldloc.s V_9 - IL_dc00: ldloc.s V_10 - IL_dc02: ble.s IL_dc4c - - IL_dc04: ldloc.s V_10 - IL_dc06: call string [mscorlib]System.Convert::ToString(int32) - IL_dc0b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_dc10: stloc.s V_7 - IL_dc12: ldloc.s V_6 - IL_dc14: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dc19: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dc1e: stloc.s V_6 - IL_dc20: ldloc.s V_7 - IL_dc22: call string [mscorlib]System.Convert::ToString(int32) - IL_dc27: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_dc2c: stloc.s V_10 - IL_dc2e: ldloc.s V_8 - IL_dc30: call string [mscorlib]System.Convert::ToString(int32) - IL_dc35: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_dc3a: stloc.s V_10 - IL_dc3c: ldloc.s V_7 - IL_dc3e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_dc43: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_dc48: stloc.s V_9 - IL_dc4a: br.s IL_dc92 - - IL_dc4c: ldloc.s V_6 - IL_dc4e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dc53: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dc58: stloc.s V_10 - IL_dc5a: ldloc.s V_8 - IL_dc5c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_dc61: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_dc66: stloc.s V_7 - IL_dc68: ldloc.s V_8 - IL_dc6a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dc6f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dc74: stloc.s V_8 - IL_dc76: ldloc.s V_6 - IL_dc78: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_dc7d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_dc82: stloc.s V_6 - IL_dc84: ldloc.s V_6 - IL_dc86: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dc8b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dc90: stloc.s V_10 - IL_dc92: ldloc.s V_8 - IL_dc94: ldloc.s V_6 - IL_dc96: blt.s IL_dce0 - - IL_dc98: ldloc.s V_8 - IL_dc9a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dc9f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dca4: stloc.s V_8 - IL_dca6: ldloc.s V_10 - IL_dca8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_dcad: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_dcb2: stloc.s V_9 - IL_dcb4: ldloc.s V_8 - IL_dcb6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_dcbb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_dcc0: stloc.s V_10 - IL_dcc2: ldloc.s V_7 - IL_dcc4: call string [mscorlib]System.Convert::ToString(int32) - IL_dcc9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_dcce: stloc.s V_9 - IL_dcd0: ldloc.s V_10 - IL_dcd2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_dcd7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_dcdc: stloc.s V_10 - IL_dcde: br.s IL_dd26 - - IL_dce0: ldloc.s V_9 - IL_dce2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_dce7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_dcec: stloc.s V_8 - IL_dcee: ldloc.s V_7 - IL_dcf0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_dcf5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_dcfa: stloc.s V_7 - IL_dcfc: ldloc.s V_8 - IL_dcfe: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_dd03: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_dd08: stloc.s V_7 - IL_dd0a: ldloc.s V_9 - IL_dd0c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dd11: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dd16: stloc.s V_7 - IL_dd18: ldloc.s V_7 - IL_dd1a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dd1f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dd24: stloc.s V_6 - IL_dd26: ldloc.s V_8 - IL_dd28: ldloc.s V_6 - IL_dd2a: bge.s IL_dd74 - - IL_dd2c: ldloc.s V_7 - IL_dd2e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dd33: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dd38: stloc.s V_8 - IL_dd3a: ldloc.s V_9 - IL_dd3c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dd41: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dd46: stloc.s V_9 - IL_dd48: ldloc.s V_9 - IL_dd4a: call string [mscorlib]System.Convert::ToString(int32) - IL_dd4f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_dd54: stloc.s V_7 - IL_dd56: ldloc.s V_9 - IL_dd58: call string [mscorlib]System.Convert::ToString(int32) - IL_dd5d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_dd62: stloc.s V_6 - IL_dd64: ldloc.s V_8 - IL_dd66: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_dd6b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_dd70: stloc.s V_7 - IL_dd72: br.s IL_ddba - - IL_dd74: ldloc.s V_10 - IL_dd76: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_dd7b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_dd80: stloc.s V_6 - IL_dd82: ldloc.s V_10 - IL_dd84: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dd89: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dd8e: stloc.s V_7 - IL_dd90: ldloc.s V_6 - IL_dd92: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_dd97: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_dd9c: stloc.s V_9 - IL_dd9e: ldloc.s V_7 - IL_dda0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_dda5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ddaa: stloc.s V_6 - IL_ddac: ldloc.s V_8 - IL_ddae: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ddb3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ddb8: stloc.s V_6 - IL_ddba: ldloc.s V_7 - IL_ddbc: ldloc.s V_6 - IL_ddbe: ble.s IL_de08 - - IL_ddc0: ldloc.s V_9 - IL_ddc2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_ddc7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_ddcc: stloc.s V_6 - IL_ddce: ldloc.s V_7 - IL_ddd0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_ddd5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_ddda: stloc.s V_9 - IL_dddc: ldloc.s V_6 - IL_ddde: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dde3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dde8: stloc.s V_10 - IL_ddea: ldloc.s V_7 - IL_ddec: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_ddf1: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_ddf6: stloc.s V_8 - IL_ddf8: ldloc.s V_9 - IL_ddfa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_ddff: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_de04: stloc.s V_10 - IL_de06: br.s IL_de4e - - IL_de08: ldloc.s V_9 - IL_de0a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_de0f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_de14: stloc.s V_6 - IL_de16: ldloc.s V_7 - IL_de18: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_de1d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_de22: stloc.s V_8 - IL_de24: ldloc.s V_9 - IL_de26: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_de2b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_de30: stloc.s V_7 - IL_de32: ldloc.s V_9 - IL_de34: call string [mscorlib]System.Convert::ToString(int32) - IL_de39: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_de3e: stloc.s V_6 - IL_de40: ldloc.s V_9 - IL_de42: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_de47: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_de4c: stloc.s V_7 - IL_de4e: ldloc.s V_10 - IL_de50: ldloc.s V_7 - IL_de52: blt.s IL_de9c - - IL_de54: ldloc.s V_6 - IL_de56: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_de5b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_de60: stloc.s V_9 - IL_de62: ldloc.s V_8 - IL_de64: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_de69: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_de6e: stloc.s V_9 - IL_de70: ldloc.s V_6 - IL_de72: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_de77: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_de7c: stloc.s V_9 - IL_de7e: ldloc.s V_6 - IL_de80: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_de85: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_de8a: stloc.s V_9 - IL_de8c: ldloc.s V_7 - IL_de8e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_de93: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_de98: stloc.s V_10 - IL_de9a: br.s IL_dee2 - - IL_de9c: ldloc.s V_10 - IL_de9e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dea3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dea8: stloc.s V_9 - IL_deaa: ldloc.s V_8 - IL_deac: call string [mscorlib]System.Convert::ToString(int32) - IL_deb1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_deb6: stloc.s V_10 - IL_deb8: ldloc.s V_8 - IL_deba: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_debf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_dec4: stloc.s V_9 - IL_dec6: ldloc.s V_7 - IL_dec8: call string [mscorlib]System.Convert::ToString(int32) - IL_decd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_ded2: stloc.s V_6 - IL_ded4: ldloc.s V_6 - IL_ded6: call string [mscorlib]System.Convert::ToString(int32) - IL_dedb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_dee0: stloc.s V_8 - IL_dee2: ldloc.s V_7 - IL_dee4: ldloc.s V_6 - IL_dee6: blt.s IL_df30 - - IL_dee8: ldloc.s V_10 - IL_deea: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_deef: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_def4: stloc.s V_10 - IL_def6: ldloc.s V_8 - IL_def8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_defd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_df02: stloc.s V_9 - IL_df04: ldloc.s V_8 - IL_df06: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_df0b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_df10: stloc.s V_6 - IL_df12: ldloc.s V_9 - IL_df14: call string [mscorlib]System.Convert::ToString(int32) - IL_df19: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_df1e: stloc.s V_7 - IL_df20: ldloc.s V_8 - IL_df22: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_df27: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_df2c: stloc.s V_9 - IL_df2e: br.s IL_df76 - - IL_df30: ldloc.s V_6 - IL_df32: call string [mscorlib]System.Convert::ToString(int32) - IL_df37: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_df3c: stloc.s V_7 - IL_df3e: ldloc.s V_7 - IL_df40: call string [mscorlib]System.Convert::ToString(int32) - IL_df45: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_df4a: stloc.s V_10 - IL_df4c: ldloc.s V_7 - IL_df4e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_df53: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_df58: stloc.s V_10 - IL_df5a: ldloc.s V_9 - IL_df5c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_df61: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_df66: stloc.s V_8 - IL_df68: ldloc.s V_9 - IL_df6a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_df6f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_df74: stloc.s V_7 - IL_df76: ldloc.s V_6 - IL_df78: ldloc.s V_10 - IL_df7a: ble.s IL_dfc4 - - IL_df7c: ldloc.s V_9 - IL_df7e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_df83: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_df88: stloc.s V_10 - IL_df8a: ldloc.s V_9 - IL_df8c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_df91: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_df96: stloc.s V_8 - IL_df98: ldloc.s V_9 - IL_df9a: call string [mscorlib]System.Convert::ToString(int32) - IL_df9f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_dfa4: stloc.s V_8 - IL_dfa6: ldloc.s V_7 - IL_dfa8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_dfad: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_dfb2: stloc.s V_6 - IL_dfb4: ldloc.s V_7 - IL_dfb6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_dfbb: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_dfc0: stloc.s V_9 - IL_dfc2: br.s IL_e00a - - IL_dfc4: ldloc.s V_10 - IL_dfc6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dfcb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dfd0: stloc.s V_9 - IL_dfd2: ldloc.s V_9 - IL_dfd4: call string [mscorlib]System.Convert::ToString(int32) - IL_dfd9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_dfde: stloc.s V_10 - IL_dfe0: ldloc.s V_7 - IL_dfe2: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dfe7: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dfec: stloc.s V_9 - IL_dfee: ldloc.s V_9 - IL_dff0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_dff5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_dffa: stloc.s V_9 - IL_dffc: ldloc.s V_9 - IL_dffe: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e003: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e008: stloc.s V_9 - IL_e00a: ldloc.s V_7 - IL_e00c: ldloc.s V_8 - IL_e00e: bne.un.s IL_e058 - - IL_e010: ldloc.s V_8 - IL_e012: call string [mscorlib]System.Convert::ToString(int32) - IL_e017: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e01c: stloc.s V_10 - IL_e01e: ldloc.s V_10 - IL_e020: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e025: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e02a: stloc.s V_9 - IL_e02c: ldloc.s V_9 - IL_e02e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e033: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e038: stloc.s V_8 - IL_e03a: ldloc.s V_9 - IL_e03c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e041: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e046: stloc.s V_9 - IL_e048: ldloc.s V_7 - IL_e04a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e04f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e054: stloc.s V_10 - IL_e056: br.s IL_e09e - - IL_e058: ldloc.s V_6 - IL_e05a: call string [mscorlib]System.Convert::ToString(int32) - IL_e05f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e064: stloc.s V_8 - IL_e066: ldloc.s V_8 - IL_e068: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e06d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e072: stloc.s V_10 - IL_e074: ldloc.s V_10 - IL_e076: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e07b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e080: stloc.s V_6 - IL_e082: ldloc.s V_9 - IL_e084: call string [mscorlib]System.Convert::ToString(int32) - IL_e089: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e08e: stloc.s V_8 - IL_e090: ldloc.s V_10 - IL_e092: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e097: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e09c: stloc.s V_10 - IL_e09e: ldloc.s V_7 - IL_e0a0: ldloc.s V_10 - IL_e0a2: ble.s IL_e0ec - - IL_e0a4: ldloc.s V_9 - IL_e0a6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e0ab: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e0b0: stloc.s V_9 - IL_e0b2: ldloc.s V_6 - IL_e0b4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e0b9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e0be: stloc.s V_10 - IL_e0c0: ldloc.s V_7 - IL_e0c2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e0c7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e0cc: stloc.s V_6 - IL_e0ce: ldloc.s V_7 - IL_e0d0: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e0d5: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e0da: stloc.s V_10 - IL_e0dc: ldloc.s V_7 - IL_e0de: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e0e3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e0e8: stloc.s V_9 - IL_e0ea: br.s IL_e132 - - IL_e0ec: ldloc.s V_7 - IL_e0ee: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e0f3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e0f8: stloc.s V_7 - IL_e0fa: ldloc.s V_7 - IL_e0fc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e101: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e106: stloc.s V_9 - IL_e108: ldloc.s V_8 - IL_e10a: call string [mscorlib]System.Convert::ToString(int32) - IL_e10f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e114: stloc.s V_10 - IL_e116: ldloc.s V_7 - IL_e118: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e11d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e122: stloc.s V_9 - IL_e124: ldloc.s V_8 - IL_e126: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e12b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e130: stloc.s V_6 - IL_e132: ldloc.s V_8 - IL_e134: ldloc.s V_8 - IL_e136: beq.s IL_e180 - - IL_e138: ldloc.s V_10 - IL_e13a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e13f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e144: stloc.s V_10 - IL_e146: ldloc.s V_8 - IL_e148: call string [mscorlib]System.Convert::ToString(int32) - IL_e14d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e152: stloc.s V_9 - IL_e154: ldloc.s V_9 - IL_e156: call string [mscorlib]System.Convert::ToString(int32) - IL_e15b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e160: stloc.s V_10 - IL_e162: ldloc.s V_10 - IL_e164: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e169: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e16e: stloc.s V_7 - IL_e170: ldloc.s V_10 - IL_e172: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e177: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e17c: stloc.s V_8 - IL_e17e: br.s IL_e1c6 - - IL_e180: ldloc.s V_9 - IL_e182: call string [mscorlib]System.Convert::ToString(int32) - IL_e187: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e18c: stloc.s V_7 - IL_e18e: ldloc.s V_8 - IL_e190: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e195: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e19a: stloc.s V_9 - IL_e19c: ldloc.s V_6 - IL_e19e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e1a3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e1a8: stloc.s V_9 - IL_e1aa: ldloc.s V_9 - IL_e1ac: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e1b1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e1b6: stloc.s V_6 - IL_e1b8: ldloc.s V_10 - IL_e1ba: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e1bf: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e1c4: stloc.s V_10 - IL_e1c6: ldloc.s V_6 - IL_e1c8: ldloc.s V_8 - IL_e1ca: bne.un.s IL_e214 - - IL_e1cc: ldloc.s V_9 - IL_e1ce: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e1d3: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e1d8: stloc.s V_10 - IL_e1da: ldloc.s V_9 - IL_e1dc: call string [mscorlib]System.Convert::ToString(int32) - IL_e1e1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e1e6: stloc.s V_7 - IL_e1e8: ldloc.s V_6 - IL_e1ea: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e1ef: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e1f4: stloc.s V_9 - IL_e1f6: ldloc.s V_8 - IL_e1f8: call string [mscorlib]System.Convert::ToString(int32) - IL_e1fd: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e202: stloc.s V_9 - IL_e204: ldloc.s V_8 - IL_e206: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e20b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e210: stloc.s V_8 - IL_e212: br.s IL_e25a - - IL_e214: ldloc.s V_9 - IL_e216: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e21b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e220: stloc.s V_7 - IL_e222: ldloc.s V_7 - IL_e224: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e229: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e22e: stloc.s V_10 - IL_e230: ldloc.s V_7 - IL_e232: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e237: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e23c: stloc.s V_10 - IL_e23e: ldloc.s V_7 - IL_e240: call string [mscorlib]System.Convert::ToString(int32) - IL_e245: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e24a: stloc.s V_10 - IL_e24c: ldloc.s V_9 - IL_e24e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e253: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e258: stloc.s V_10 - IL_e25a: ldloc.s V_9 - IL_e25c: ldloc.s V_6 - IL_e25e: bgt.s IL_e2a8 - - IL_e260: ldloc.s V_6 - IL_e262: call string [mscorlib]System.Convert::ToString(int32) - IL_e267: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e26c: stloc.s V_8 - IL_e26e: ldloc.s V_6 - IL_e270: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e275: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e27a: stloc.s V_7 - IL_e27c: ldloc.s V_9 - IL_e27e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e283: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e288: stloc.s V_6 - IL_e28a: ldloc.s V_7 - IL_e28c: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e291: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e296: stloc.s V_7 - IL_e298: ldloc.s V_7 - IL_e29a: call string [mscorlib]System.Convert::ToString(int32) - IL_e29f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e2a4: stloc.s V_9 - IL_e2a6: br.s IL_e2ee - - IL_e2a8: ldloc.s V_6 - IL_e2aa: call string [mscorlib]System.Convert::ToString(int32) - IL_e2af: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e2b4: stloc.s V_6 - IL_e2b6: ldloc.s V_10 - IL_e2b8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e2bd: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e2c2: stloc.s V_7 - IL_e2c4: ldloc.s V_8 - IL_e2c6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e2cb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e2d0: stloc.s V_7 - IL_e2d2: ldloc.s V_6 - IL_e2d4: call string [mscorlib]System.Convert::ToString(int32) - IL_e2d9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e2de: stloc.s V_7 - IL_e2e0: ldloc.s V_9 - IL_e2e2: call string [mscorlib]System.Convert::ToString(int32) - IL_e2e7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e2ec: stloc.s V_7 - IL_e2ee: ldloc.s V_10 - IL_e2f0: ldloc.s V_10 - IL_e2f2: blt.s IL_e33c - - IL_e2f4: ldloc.s V_7 - IL_e2f6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e2fb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e300: stloc.s V_7 - IL_e302: ldloc.s V_6 - IL_e304: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e309: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e30e: stloc.s V_8 - IL_e310: ldloc.s V_6 - IL_e312: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e317: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e31c: stloc.s V_9 - IL_e31e: ldloc.s V_7 - IL_e320: call string [mscorlib]System.Convert::ToString(int32) - IL_e325: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e32a: stloc.s V_8 - IL_e32c: ldloc.s V_10 - IL_e32e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e333: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e338: stloc.s V_6 - IL_e33a: br.s IL_e382 - - IL_e33c: ldloc.s V_8 - IL_e33e: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e343: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e348: stloc.s V_6 - IL_e34a: ldloc.s V_10 - IL_e34c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e351: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e356: stloc.s V_9 - IL_e358: ldloc.s V_10 - IL_e35a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e35f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e364: stloc.s V_7 - IL_e366: ldloc.s V_7 - IL_e368: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e36d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e372: stloc.s V_8 - IL_e374: ldloc.s V_7 - IL_e376: call string [mscorlib]System.Convert::ToString(int32) - IL_e37b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e380: stloc.s V_6 - IL_e382: ldloc.s V_10 - IL_e384: ldloc.s V_10 - IL_e386: beq.s IL_e3d0 - - IL_e388: ldloc.s V_8 - IL_e38a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e38f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e394: stloc.s V_7 - IL_e396: ldloc.s V_8 - IL_e398: call string [mscorlib]System.Convert::ToString(int32) - IL_e39d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e3a2: stloc.s V_10 - IL_e3a4: ldloc.s V_10 - IL_e3a6: call string [mscorlib]System.Convert::ToString(int32) - IL_e3ab: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e3b0: stloc.s V_10 - IL_e3b2: ldloc.s V_6 - IL_e3b4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e3b9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e3be: stloc.s V_10 - IL_e3c0: ldloc.s V_7 - IL_e3c2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e3c7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e3cc: stloc.s V_7 - IL_e3ce: br.s IL_e416 - - IL_e3d0: ldloc.s V_10 - IL_e3d2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e3d7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e3dc: stloc.s V_6 - IL_e3de: ldloc.s V_8 - IL_e3e0: call string [mscorlib]System.Convert::ToString(int32) - IL_e3e5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e3ea: stloc.s V_7 - IL_e3ec: ldloc.s V_6 - IL_e3ee: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e3f3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e3f8: stloc.s V_6 - IL_e3fa: ldloc.s V_6 - IL_e3fc: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e401: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e406: stloc.s V_8 - IL_e408: ldloc.s V_7 - IL_e40a: call string [mscorlib]System.Convert::ToString(int32) - IL_e40f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e414: stloc.s V_9 - IL_e416: ldloc.s V_9 - IL_e418: ldloc.s V_10 - IL_e41a: bne.un.s IL_e464 - - IL_e41c: ldloc.s V_6 - IL_e41e: call string [mscorlib]System.Convert::ToString(int32) - IL_e423: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e428: stloc.s V_7 - IL_e42a: ldloc.s V_7 - IL_e42c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e431: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e436: stloc.s V_8 - IL_e438: ldloc.s V_10 - IL_e43a: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e43f: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e444: stloc.s V_10 - IL_e446: ldloc.s V_7 - IL_e448: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e44d: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e452: stloc.s V_6 - IL_e454: ldloc.s V_9 - IL_e456: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e45b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e460: stloc.s V_9 - IL_e462: br.s IL_e4aa - - IL_e464: ldloc.s V_8 - IL_e466: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e46b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e470: stloc.s V_6 - IL_e472: ldloc.s V_7 - IL_e474: call string [mscorlib]System.Convert::ToString(int32) - IL_e479: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e47e: stloc.s V_8 - IL_e480: ldloc.s V_6 - IL_e482: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e487: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e48c: stloc.s V_8 - IL_e48e: ldloc.s V_8 - IL_e490: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e495: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e49a: stloc.s V_8 - IL_e49c: ldloc.s V_10 - IL_e49e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e4a3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e4a8: stloc.s V_8 - IL_e4aa: ldloc.s V_6 - IL_e4ac: ldloc.s V_6 - IL_e4ae: bgt.s IL_e4f8 - - IL_e4b0: ldloc.s V_9 - IL_e4b2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e4b7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e4bc: stloc.s V_7 - IL_e4be: ldloc.s V_6 - IL_e4c0: call string [mscorlib]System.Convert::ToString(int32) - IL_e4c5: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e4ca: stloc.s V_7 - IL_e4cc: ldloc.s V_10 - IL_e4ce: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e4d3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e4d8: stloc.s V_8 - IL_e4da: ldloc.s V_9 - IL_e4dc: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e4e1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e4e6: stloc.s V_9 - IL_e4e8: ldloc.s V_10 - IL_e4ea: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e4ef: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e4f4: stloc.s V_9 - IL_e4f6: br.s IL_e53e - - IL_e4f8: ldloc.s V_9 - IL_e4fa: call string [mscorlib]System.Convert::ToString(int32) - IL_e4ff: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e504: stloc.s V_7 - IL_e506: ldloc.s V_6 - IL_e508: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e50d: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e512: stloc.s V_10 - IL_e514: ldloc.s V_7 - IL_e516: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e51b: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e520: stloc.s V_9 - IL_e522: ldloc.s V_10 - IL_e524: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e529: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e52e: stloc.s V_10 - IL_e530: ldloc.s V_8 - IL_e532: call string [mscorlib]System.Convert::ToString(int32) - IL_e537: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e53c: stloc.s V_9 - IL_e53e: ldloc.s V_8 - IL_e540: ldloc.s V_6 - IL_e542: beq.s IL_e58c - - IL_e544: ldloc.s V_7 - IL_e546: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e54b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e550: stloc.s V_6 - IL_e552: ldloc.s V_6 - IL_e554: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e559: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e55e: stloc.s V_6 - IL_e560: ldloc.s V_6 - IL_e562: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e567: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e56c: stloc.s V_7 - IL_e56e: ldloc.s V_7 - IL_e570: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e575: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e57a: stloc.s V_7 - IL_e57c: ldloc.s V_8 - IL_e57e: call string [mscorlib]System.Convert::ToString(int32) - IL_e583: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e588: stloc.s V_7 - IL_e58a: br.s IL_e5d2 - - IL_e58c: ldloc.s V_10 - IL_e58e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e593: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e598: stloc.s V_9 - IL_e59a: ldloc.s V_10 - IL_e59c: call string [mscorlib]System.Convert::ToString(int32) - IL_e5a1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e5a6: stloc.s V_7 - IL_e5a8: ldloc.s V_6 - IL_e5aa: call string [mscorlib]System.Convert::ToString(int32) - IL_e5af: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e5b4: stloc.s V_10 - IL_e5b6: ldloc.s V_9 - IL_e5b8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e5bd: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e5c2: stloc.s V_7 - IL_e5c4: ldloc.s V_10 - IL_e5c6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e5cb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e5d0: stloc.s V_7 - IL_e5d2: ldloc.s V_9 - IL_e5d4: ldloc.s V_8 - IL_e5d6: blt.s IL_e620 - - IL_e5d8: ldloc.s V_7 - IL_e5da: call string [mscorlib]System.Convert::ToString(int32) - IL_e5df: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e5e4: stloc.s V_9 - IL_e5e6: ldloc.s V_8 - IL_e5e8: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e5ed: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e5f2: stloc.s V_8 - IL_e5f4: ldloc.s V_7 - IL_e5f6: call string [mscorlib]System.Convert::ToString(int32) - IL_e5fb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e600: stloc.s V_8 - IL_e602: ldloc.s V_6 - IL_e604: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e609: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e60e: stloc.s V_6 - IL_e610: ldloc.s V_7 - IL_e612: call string [mscorlib]System.Convert::ToString(int32) - IL_e617: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e61c: stloc.s V_10 - IL_e61e: br.s IL_e666 - - IL_e620: ldloc.s V_8 - IL_e622: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e627: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e62c: stloc.s V_7 - IL_e62e: ldloc.s V_10 - IL_e630: call string [mscorlib]System.Convert::ToString(int32) - IL_e635: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e63a: stloc.s V_8 - IL_e63c: ldloc.s V_9 - IL_e63e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e643: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e648: stloc.s V_6 - IL_e64a: ldloc.s V_8 - IL_e64c: call string [mscorlib]System.Convert::ToString(int32) - IL_e651: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e656: stloc.s V_6 - IL_e658: ldloc.s V_6 - IL_e65a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e65f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e664: stloc.s V_8 - IL_e666: ldloc.s V_10 - IL_e668: ldloc.s V_6 - IL_e66a: bge.s IL_e6b4 - - IL_e66c: ldloc.s V_6 - IL_e66e: call string [mscorlib]System.Convert::ToString(int32) - IL_e673: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e678: stloc.s V_10 - IL_e67a: ldloc.s V_10 - IL_e67c: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e681: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e686: stloc.s V_7 - IL_e688: ldloc.s V_6 - IL_e68a: call string [mscorlib]System.Convert::ToString(int32) - IL_e68f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e694: stloc.s V_7 - IL_e696: ldloc.s V_8 - IL_e698: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e69d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e6a2: stloc.s V_9 - IL_e6a4: ldloc.s V_10 - IL_e6a6: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e6ab: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e6b0: stloc.s V_6 - IL_e6b2: br.s IL_e6fa - - IL_e6b4: ldloc.s V_10 - IL_e6b6: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e6bb: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e6c0: stloc.s V_7 - IL_e6c2: ldloc.s V_10 - IL_e6c4: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e6c9: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e6ce: stloc.s V_8 - IL_e6d0: ldloc.s V_7 - IL_e6d2: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e6d7: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e6dc: stloc.s V_8 - IL_e6de: ldloc.s V_8 - IL_e6e0: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e6e5: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e6ea: stloc.s V_9 - IL_e6ec: ldloc.s V_7 - IL_e6ee: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e6f3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e6f8: stloc.s V_6 - IL_e6fa: ldloc.s V_9 - IL_e6fc: ldloc.s V_8 - IL_e6fe: bge.s IL_e748 - - IL_e700: ldloc.s V_9 - IL_e702: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e707: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e70c: stloc.s V_10 - IL_e70e: ldloc.s V_10 - IL_e710: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e715: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e71a: stloc.s V_7 - IL_e71c: ldloc.s V_6 - IL_e71e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e723: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e728: stloc.s V_8 - IL_e72a: ldloc.s V_7 - IL_e72c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e731: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e736: stloc.s V_9 - IL_e738: ldloc.s V_7 - IL_e73a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e73f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e744: stloc.s V_7 - IL_e746: br.s IL_e78e - - IL_e748: ldloc.s V_6 - IL_e74a: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e74f: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e754: stloc.s V_9 - IL_e756: ldloc.s V_10 - IL_e758: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e75d: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e762: stloc.s V_7 - IL_e764: ldloc.s V_7 - IL_e766: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e76b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e770: stloc.s V_6 - IL_e772: ldloc.s V_9 - IL_e774: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e779: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e77e: stloc.s V_9 - IL_e780: ldloc.s V_8 - IL_e782: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e787: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e78c: stloc.s V_7 - IL_e78e: ldloc.s V_8 - IL_e790: ldloc.s V_7 - IL_e792: bne.un.s IL_e7dc - - IL_e794: ldloc.s V_8 - IL_e796: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e79b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e7a0: stloc.s V_10 - IL_e7a2: ldloc.s V_10 - IL_e7a4: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e7a9: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e7ae: stloc.s V_6 - IL_e7b0: ldloc.s V_8 - IL_e7b2: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e7b7: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e7bc: stloc.s V_6 - IL_e7be: ldloc.s V_10 - IL_e7c0: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e7c5: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e7ca: stloc.s V_10 - IL_e7cc: ldloc.s V_7 - IL_e7ce: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e7d3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e7d8: stloc.s V_6 - IL_e7da: br.s IL_e822 - - IL_e7dc: ldloc.s V_6 - IL_e7de: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e7e3: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e7e8: stloc.s V_7 - IL_e7ea: ldloc.s V_10 - IL_e7ec: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e7f1: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e7f6: stloc.s V_6 - IL_e7f8: ldloc.s V_9 - IL_e7fa: call string [mscorlib]System.Convert::ToString(int32) - IL_e7ff: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e804: stloc.s V_9 - IL_e806: ldloc.s V_8 - IL_e808: call string [mscorlib]System.Convert::ToString(int32) - IL_e80d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e812: stloc.s V_8 - IL_e814: ldloc.s V_6 - IL_e816: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e81b: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e820: stloc.s V_6 - IL_e822: ldloc.s V_10 - IL_e824: ldloc.s V_10 - IL_e826: bgt.s IL_e870 - - IL_e828: ldloc.s V_10 - IL_e82a: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e82f: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e834: stloc.s V_6 - IL_e836: ldloc.s V_10 - IL_e838: call string [mscorlib]System.Convert::ToString(int32) - IL_e83d: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e842: stloc.s V_9 - IL_e844: ldloc.s V_10 - IL_e846: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e84b: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e850: stloc.s V_7 - IL_e852: ldloc.s V_8 - IL_e854: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e859: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e85e: stloc.s V_7 - IL_e860: ldloc.s V_10 - IL_e862: call string [mscorlib]System.Convert::ToString(int32) - IL_e867: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e86c: stloc.s V_7 - IL_e86e: br.s IL_e8b6 - - IL_e870: ldloc.s V_9 - IL_e872: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e877: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e87c: stloc.s V_8 - IL_e87e: ldloc.s V_8 - IL_e880: call string [mscorlib]System.Convert::ToString(int32) - IL_e885: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e88a: stloc.s V_8 - IL_e88c: ldloc.s V_8 - IL_e88e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e893: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e898: stloc.s V_7 - IL_e89a: ldloc.s V_8 - IL_e89c: call string [mscorlib]System.Convert::ToString(int32) - IL_e8a1: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e8a6: stloc.s V_10 - IL_e8a8: ldloc.s V_9 - IL_e8aa: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e8af: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e8b4: stloc.s V_7 - IL_e8b6: ldloc.s V_7 - IL_e8b8: ldloc.s V_6 - IL_e8ba: blt.s IL_e904 - - IL_e8bc: ldloc.s V_6 - IL_e8be: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e8c3: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e8c8: stloc.s V_6 - IL_e8ca: ldloc.s V_10 - IL_e8cc: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e8d1: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e8d6: stloc.s V_7 - IL_e8d8: ldloc.s V_10 - IL_e8da: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e8df: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e8e4: stloc.s V_6 - IL_e8e6: ldloc.s V_7 - IL_e8e8: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e8ed: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e8f2: stloc.s V_6 - IL_e8f4: ldloc.s V_10 - IL_e8f6: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e8fb: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e900: stloc.s V_6 - IL_e902: br.s IL_e94a - - IL_e904: ldloc.s V_7 - IL_e906: call string [mscorlib]System.Convert::ToString(int32) - IL_e90b: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e910: stloc.s V_9 - IL_e912: ldloc.s V_7 - IL_e914: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e919: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e91e: stloc.s V_8 - IL_e920: ldloc.s V_6 - IL_e922: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e927: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e92c: stloc.s V_7 - IL_e92e: ldloc.s V_10 - IL_e930: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e935: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e93a: stloc.s V_8 - IL_e93c: ldloc.s V_6 - IL_e93e: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e943: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e948: stloc.s V_7 - IL_e94a: ldloc.s V_6 - IL_e94c: ldloc.s V_6 - IL_e94e: bge.s IL_e998 - - IL_e950: ldloc.s V_8 - IL_e952: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e957: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e95c: stloc.s V_7 - IL_e95e: ldloc.s V_8 - IL_e960: call float32 [mscorlib]System.Convert::ToSingle(int32) - IL_e965: call int32 [mscorlib]System.Convert::ToInt32(float32) - IL_e96a: stloc.s V_10 - IL_e96c: ldloc.s V_9 - IL_e96e: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e973: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e978: stloc.s V_10 - IL_e97a: ldloc.s V_6 - IL_e97c: call float64 [mscorlib]System.Convert::ToDouble(int32) - IL_e981: call int32 [mscorlib]System.Convert::ToInt32(float64) - IL_e986: stloc.s V_9 - IL_e988: ldloc.s V_8 - IL_e98a: call string [mscorlib]System.Convert::ToString(int32) - IL_e98f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e994: stloc.s V_6 - IL_e996: br.s IL_e9de - - IL_e998: ldloc.s V_8 - IL_e99a: call string [mscorlib]System.Convert::ToString(int32) - IL_e99f: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e9a4: stloc.s V_9 - IL_e9a6: ldloc.s V_6 - IL_e9a8: call int64 [mscorlib]System.Convert::ToInt64(int32) - IL_e9ad: call int32 [mscorlib]System.Convert::ToInt32(int64) - IL_e9b2: stloc.s V_7 - IL_e9b4: ldloc.s V_7 - IL_e9b6: call string [mscorlib]System.Convert::ToString(int32) - IL_e9bb: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e9c0: stloc.s V_9 - IL_e9c2: ldloc.s V_8 - IL_e9c4: call string [mscorlib]System.Convert::ToString(int32) - IL_e9c9: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e9ce: stloc.s V_6 - IL_e9d0: ldloc.s V_10 - IL_e9d2: call string [mscorlib]System.Convert::ToString(int32) - IL_e9d7: call int32 [mscorlib]System.Convert::ToInt32(string) - IL_e9dc: stloc.s V_10 - IL_e9de: ldstr "a is: " - IL_e9e3: ldloc.s V_6 - IL_e9e5: ldloc.0 - IL_e9e6: add - IL_e9e7: box [mscorlib]System.Int32 - IL_e9ec: call string [mscorlib]System.String::Concat(object, - object) - IL_e9f1: call void [System.Console]System.Console::WriteLine(string) - IL_e9f6: ldstr "b is: " - IL_e9fb: ldloc.s V_7 - IL_e9fd: ldloc.1 - IL_e9fe: add - IL_e9ff: box [mscorlib]System.Int32 - IL_ea04: call string [mscorlib]System.String::Concat(object, - object) - IL_ea09: call void [System.Console]System.Console::WriteLine(string) - IL_ea0e: ldstr "c is: " - IL_ea13: ldloc.s V_8 - IL_ea15: ldloc.2 - IL_ea16: add - IL_ea17: box [mscorlib]System.Int32 - IL_ea1c: call string [mscorlib]System.String::Concat(object, - object) - IL_ea21: call void [System.Console]System.Console::WriteLine(string) - IL_ea26: ldstr "d is: " - IL_ea2b: ldloc.s V_9 - IL_ea2d: ldloc V_3 - IL_ea31: add - IL_ea32: box [mscorlib]System.Int32 - IL_ea37: call string [mscorlib]System.String::Concat(object, - object) - IL_ea3c: call void [System.Console]System.Console::WriteLine(string) - IL_ea41: ldstr "e is: " - IL_ea46: ldloc.s V_10 - IL_ea48: ldloc.s V_4 - IL_ea4a: add - IL_ea4b: ldc.i4.1 - IL_ea4c: add - IL_ea4d: box [mscorlib]System.Int32 - IL_ea52: call string [mscorlib]System.String::Concat(object, - object) - IL_ea57: call void [System.Console]System.Console::WriteLine(string) - IL_ea5c: ldc.i4.s 100 - IL_ea5e: stloc.s V_11 - IL_ea60: ldloc.s V_11 - IL_ea62: ret - } // end of method CodeSize1::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method CodeSize1::.ctor - -} diff --git a/src/coreclr/tests/src/JIT/opt/JitMinOpts/Perf/InstrCnt1.il b/src/coreclr/tests/src/JIT/opt/JitMinOpts/Perf/InstrCnt1.il deleted file mode 100644 index ce13ff532ebd..000000000000 --- a/src/coreclr/tests/src/JIT/opt/JitMinOpts/Perf/InstrCnt1.il +++ /dev/null @@ -1,20035 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// DEFAULT_MIN_OPTS_INSTR_COUNT 20000 -// OPTIONS: opts.MinOpts() == true -// TID ab0: IL instruction count exceeded, using MinOpts for method .f():int -// TID ab0: IL Code Size,Instr 20018,20002, Basic Block count 1, Local Variable Num,Ref count 0, 0 for method .f():int - -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly InstrCnt0 {} -.module InstrCnt0.exe -.method public static int32 Main() cil managed -{ - .entrypoint - // Code size 12 (0xc) - .maxstack 8 - IL_0000: call int32 f() - IL_0005: ldc.i4 0x1 - IL_000a: add - IL_000b: ret -} // end of global method Main - -.method public static int32 f() cil managed -{ - // Code size 39998 (0x9c3e) - .maxstack 8 - IL_0000: ldc.i4.m1 - IL_0001: dup - IL_0002: ldc.i4.6 - IL_0003: sub - IL_0004: pop - IL_0009: dup - IL_000a: ldc.i4.8 - IL_000b: add - IL_000c: pop - IL_0011: dup - IL_0012: ldc.i4.4 - IL_0013: and - IL_0014: pop - IL_0019: dup - IL_001a: ldc.i4.6 - IL_001b: mul - IL_001c: pop - IL_0021: dup - IL_0022: ldc.i4.3 - IL_0023: and - IL_0024: pop - IL_0029: dup - IL_002a: ldc.i4.4 - IL_002b: sub - IL_002c: pop - IL_0031: dup - IL_0032: ldc.i4.6 - IL_0033: shr - IL_0034: pop - IL_0039: dup - IL_003a: ldc.i4.1 - IL_003b: mul - IL_003c: pop - IL_0041: dup - IL_0042: ldc.i4.8 - IL_0043: shr - IL_0044: pop - IL_0049: dup - IL_004a: ldc.i4.8 - IL_004b: shl - IL_004c: pop - IL_0051: dup - IL_0052: ldc.i4.4 - IL_0053: add - IL_0054: pop - IL_0059: dup - IL_005a: ldc.i4.5 - IL_005b: and - IL_005c: pop - IL_0061: dup - IL_0062: ldc.i4.1 - IL_0063: add - IL_0064: pop - IL_0069: dup - IL_006a: ldc.i4.1 - IL_006b: sub - IL_006c: pop - IL_0071: dup - IL_0072: ldc.i4.8 - IL_0073: sub - IL_0074: pop - IL_0079: dup - IL_007a: ldc.i4.2 - IL_007b: or - IL_007c: pop - IL_0081: dup - IL_0082: ldc.i4.0 - IL_0083: shr - IL_0084: pop - IL_0089: dup - IL_008a: ldc.i4.7 - IL_008b: sub - IL_008c: pop - IL_0091: dup - IL_0092: ldc.i4.6 - IL_0093: shl - IL_0094: pop - IL_0099: dup - IL_009a: ldc.i4.1 - IL_009b: shr - IL_009c: pop - IL_00a1: dup - IL_00a2: ldc.i4.1 - IL_00a3: sub - IL_00a4: pop - IL_00a9: dup - IL_00aa: ldc.i4.3 - IL_00ab: sub - IL_00ac: pop - IL_00b1: dup - IL_00b2: ldc.i4.4 - IL_00b3: add - IL_00b4: pop - IL_00b9: dup - IL_00ba: ldc.i4.3 - IL_00bb: shr - IL_00bc: pop - IL_00c1: dup - IL_00c2: ldc.i4.7 - IL_00c3: xor - IL_00c4: pop - IL_00c9: dup - IL_00ca: ldc.i4.8 - IL_00cb: shr - IL_00cc: pop - IL_00d1: dup - IL_00d2: ldc.i4.7 - IL_00d3: and - IL_00d4: pop - IL_00d9: dup - IL_00da: ldc.i4.3 - IL_00db: shr - IL_00dc: pop - IL_00e1: dup - IL_00e2: ldc.i4.5 - IL_00e3: sub - IL_00e4: pop - IL_00e9: dup - IL_00ea: ldc.i4.7 - IL_00eb: xor - IL_00ec: pop - IL_00f1: dup - IL_00f2: ldc.i4.5 - IL_00f3: shl - IL_00f4: pop - IL_00f9: dup - IL_00fa: ldc.i4.3 - IL_00fb: sub - IL_00fc: pop - IL_0101: dup - IL_0102: ldc.i4.4 - IL_0103: shl - IL_0104: pop - IL_0109: dup - IL_010a: ldc.i4.1 - IL_010b: or - IL_010c: pop - IL_0111: dup - IL_0112: ldc.i4.7 - IL_0113: add - IL_0114: pop - IL_0119: dup - IL_011a: ldc.i4.5 - IL_011b: mul - IL_011c: pop - IL_0121: dup - IL_0122: ldc.i4.4 - IL_0123: sub - IL_0124: pop - IL_0129: dup - IL_012a: ldc.i4.3 - IL_012b: mul - IL_012c: pop - IL_0131: dup - IL_0132: ldc.i4.5 - IL_0133: xor - IL_0134: pop - IL_0139: dup - IL_013a: ldc.i4.2 - IL_013b: sub - IL_013c: pop - IL_0141: dup - IL_0142: ldc.i4.6 - IL_0143: shl - IL_0144: pop - IL_0149: dup - IL_014a: ldc.i4.3 - IL_014b: xor - IL_014c: pop - IL_0151: dup - IL_0152: ldc.i4.2 - IL_0153: shl - IL_0154: pop - IL_0159: dup - IL_015a: ldc.i4.0 - IL_015b: mul - IL_015c: pop - IL_0161: dup - IL_0162: ldc.i4.2 - IL_0163: add - IL_0164: pop - IL_0169: dup - IL_016a: ldc.i4.4 - IL_016b: shr - IL_016c: pop - IL_0171: dup - IL_0172: ldc.i4.6 - IL_0173: and - IL_0174: pop - IL_0179: dup - IL_017a: ldc.i4.1 - IL_017b: shr - IL_017c: pop - IL_0181: dup - IL_0182: ldc.i4.6 - IL_0183: sub - IL_0184: pop - IL_0189: dup - IL_018a: ldc.i4.6 - IL_018b: or - IL_018c: pop - IL_0191: dup - IL_0192: ldc.i4.7 - IL_0193: xor - IL_0194: pop - IL_0199: dup - IL_019a: ldc.i4.7 - IL_019b: shr - IL_019c: pop - IL_01a1: dup - IL_01a2: ldc.i4.8 - IL_01a3: shr - IL_01a4: pop - IL_01a9: dup - IL_01aa: ldc.i4.2 - IL_01ab: shl - IL_01ac: pop - IL_01b1: dup - IL_01b2: ldc.i4.3 - IL_01b3: add - IL_01b4: pop - IL_01b9: dup - IL_01ba: ldc.i4.0 - IL_01bb: sub - IL_01bc: pop - IL_01c1: dup - IL_01c2: ldc.i4.7 - IL_01c3: shr - IL_01c4: pop - IL_01c9: dup - IL_01ca: ldc.i4.6 - IL_01cb: add - IL_01cc: pop - IL_01d1: dup - IL_01d2: ldc.i4.0 - IL_01d3: or - IL_01d4: pop - IL_01d9: dup - IL_01da: ldc.i4.8 - IL_01db: or - IL_01dc: pop - IL_01e1: dup - IL_01e2: ldc.i4.4 - IL_01e3: or - IL_01e4: pop - IL_01e9: dup - IL_01ea: ldc.i4.5 - IL_01eb: and - IL_01ec: pop - IL_01f1: dup - IL_01f2: ldc.i4.4 - IL_01f3: or - IL_01f4: pop - IL_01f9: dup - IL_01fa: ldc.i4.5 - IL_01fb: shr - IL_01fc: pop - IL_0201: dup - IL_0202: ldc.i4.0 - IL_0203: and - IL_0204: pop - IL_0209: dup - IL_020a: ldc.i4.5 - IL_020b: xor - IL_020c: pop - IL_0211: dup - IL_0212: ldc.i4.6 - IL_0213: mul - IL_0214: pop - IL_0219: dup - IL_021a: ldc.i4.2 - IL_021b: mul - IL_021c: pop - IL_0221: dup - IL_0222: ldc.i4.6 - IL_0223: shr - IL_0224: pop - IL_0229: dup - IL_022a: ldc.i4.5 - IL_022b: shl - IL_022c: pop - IL_0231: dup - IL_0232: ldc.i4.2 - IL_0233: shl - IL_0234: pop - IL_0239: dup - IL_023a: ldc.i4.8 - IL_023b: mul - IL_023c: pop - IL_0241: dup - IL_0242: ldc.i4.8 - IL_0243: mul - IL_0244: pop - IL_0249: dup - IL_024a: ldc.i4.6 - IL_024b: add - IL_024c: pop - IL_0251: dup - IL_0252: ldc.i4.0 - IL_0253: add - IL_0254: pop - IL_0259: dup - IL_025a: ldc.i4.5 - IL_025b: and - IL_025c: pop - IL_0261: dup - IL_0262: ldc.i4.2 - IL_0263: shr - IL_0264: pop - IL_0269: dup - IL_026a: ldc.i4.3 - IL_026b: or - IL_026c: pop - IL_0271: dup - IL_0272: ldc.i4.7 - IL_0273: or - IL_0274: pop - IL_0279: dup - IL_027a: ldc.i4.2 - IL_027b: or - IL_027c: pop - IL_0281: dup - IL_0282: ldc.i4.0 - IL_0283: shl - IL_0284: pop - IL_0289: dup - IL_028a: ldc.i4.4 - IL_028b: shl - IL_028c: pop - IL_0291: dup - IL_0292: ldc.i4.4 - IL_0293: shr - IL_0294: pop - IL_0299: dup - IL_029a: ldc.i4.4 - IL_029b: xor - IL_029c: pop - IL_02a1: dup - IL_02a2: ldc.i4.4 - IL_02a3: xor - IL_02a4: pop - IL_02a9: dup - IL_02aa: ldc.i4.3 - IL_02ab: xor - IL_02ac: pop - IL_02b1: dup - IL_02b2: ldc.i4.2 - IL_02b3: mul - IL_02b4: pop - IL_02b9: dup - IL_02ba: ldc.i4.6 - IL_02bb: or - IL_02bc: pop - IL_02c1: dup - IL_02c2: ldc.i4.0 - IL_02c3: mul - IL_02c4: pop - IL_02c9: dup - IL_02ca: ldc.i4.7 - IL_02cb: sub - IL_02cc: pop - IL_02d1: dup - IL_02d2: ldc.i4.1 - IL_02d3: shl - IL_02d4: pop - IL_02d9: dup - IL_02da: ldc.i4.6 - IL_02db: or - IL_02dc: pop - IL_02e1: dup - IL_02e2: ldc.i4.1 - IL_02e3: and - IL_02e4: pop - IL_02e9: dup - IL_02ea: ldc.i4.1 - IL_02eb: add - IL_02ec: pop - IL_02f1: dup - IL_02f2: ldc.i4.8 - IL_02f3: mul - IL_02f4: pop - IL_02f9: dup - IL_02fa: ldc.i4.4 - IL_02fb: shr - IL_02fc: pop - IL_0301: dup - IL_0302: ldc.i4.4 - IL_0303: shr - IL_0304: pop - IL_0309: dup - IL_030a: ldc.i4.4 - IL_030b: and - IL_030c: pop - IL_0311: dup - IL_0312: ldc.i4.0 - IL_0313: mul - IL_0314: pop - IL_0319: dup - IL_031a: ldc.i4.7 - IL_031b: mul - IL_031c: pop - IL_0321: dup - IL_0322: ldc.i4.7 - IL_0323: mul - IL_0324: pop - IL_0329: dup - IL_032a: ldc.i4.5 - IL_032b: shl - IL_032c: pop - IL_0331: dup - IL_0332: ldc.i4.6 - IL_0333: sub - IL_0334: pop - IL_0339: dup - IL_033a: ldc.i4.4 - IL_033b: or - IL_033c: pop - IL_0341: dup - IL_0342: ldc.i4.0 - IL_0343: xor - IL_0344: pop - IL_0349: dup - IL_034a: ldc.i4.8 - IL_034b: xor - IL_034c: pop - IL_0351: dup - IL_0352: ldc.i4.0 - IL_0353: add - IL_0354: pop - IL_0359: dup - IL_035a: ldc.i4.7 - IL_035b: shl - IL_035c: pop - IL_0361: dup - IL_0362: ldc.i4.7 - IL_0363: shl - IL_0364: pop - IL_0369: dup - IL_036a: ldc.i4.3 - IL_036b: shr - IL_036c: pop - IL_0371: dup - IL_0372: ldc.i4.3 - IL_0373: xor - IL_0374: pop - IL_0379: dup - IL_037a: ldc.i4.4 - IL_037b: add - IL_037c: pop - IL_0381: dup - IL_0382: ldc.i4.8 - IL_0383: shl - IL_0384: pop - IL_0389: dup - IL_038a: ldc.i4.8 - IL_038b: shr - IL_038c: pop - IL_0391: dup - IL_0392: ldc.i4.7 - IL_0393: or - IL_0394: pop - IL_0399: dup - IL_039a: ldc.i4.8 - IL_039b: shr - IL_039c: pop - IL_03a1: dup - IL_03a2: ldc.i4.5 - IL_03a3: shl - IL_03a4: pop - IL_03a9: dup - IL_03aa: ldc.i4.2 - IL_03ab: and - IL_03ac: pop - IL_03b1: dup - IL_03b2: ldc.i4.8 - IL_03b3: sub - IL_03b4: pop - IL_03b9: dup - IL_03ba: ldc.i4.2 - IL_03bb: add - IL_03bc: pop - IL_03c1: dup - IL_03c2: ldc.i4.2 - IL_03c3: mul - IL_03c4: pop - IL_03c9: dup - IL_03ca: ldc.i4.8 - IL_03cb: xor - IL_03cc: pop - IL_03d1: dup - IL_03d2: ldc.i4.3 - IL_03d3: add - IL_03d4: pop - IL_03d9: dup - IL_03da: ldc.i4.5 - IL_03db: mul - IL_03dc: pop - IL_03e1: dup - IL_03e2: ldc.i4.7 - IL_03e3: add - IL_03e4: pop - IL_03e9: dup - IL_03ea: ldc.i4.8 - IL_03eb: shl - IL_03ec: pop - IL_03f1: dup - IL_03f2: ldc.i4.8 - IL_03f3: add - IL_03f4: pop - IL_03f9: dup - IL_03fa: ldc.i4.8 - IL_03fb: xor - IL_03fc: pop - IL_0401: dup - IL_0402: ldc.i4.6 - IL_0403: xor - IL_0404: pop - IL_0409: dup - IL_040a: ldc.i4.5 - IL_040b: sub - IL_040c: pop - IL_0411: dup - IL_0412: ldc.i4.1 - IL_0413: and - IL_0414: pop - IL_0419: dup - IL_041a: ldc.i4.1 - IL_041b: sub - IL_041c: pop - IL_0421: dup - IL_0422: ldc.i4.4 - IL_0423: mul - IL_0424: pop - IL_0429: dup - IL_042a: ldc.i4.7 - IL_042b: shl - IL_042c: pop - IL_0431: dup - IL_0432: ldc.i4.7 - IL_0433: or - IL_0434: pop - IL_0439: dup - IL_043a: ldc.i4.4 - IL_043b: shr - IL_043c: pop - IL_0441: dup - IL_0442: ldc.i4.2 - IL_0443: mul - IL_0444: pop - IL_0449: dup - IL_044a: ldc.i4.3 - IL_044b: add - IL_044c: pop - IL_0451: dup - IL_0452: ldc.i4.3 - IL_0453: add - IL_0454: pop - IL_0459: dup - IL_045a: ldc.i4.6 - IL_045b: or - IL_045c: pop - IL_0461: dup - IL_0462: ldc.i4.8 - IL_0463: shl - IL_0464: pop - IL_0469: dup - IL_046a: ldc.i4.8 - IL_046b: shr - IL_046c: pop - IL_0471: dup - IL_0472: ldc.i4.8 - IL_0473: xor - IL_0474: pop - IL_0479: dup - IL_047a: ldc.i4.6 - IL_047b: xor - IL_047c: pop - IL_0481: dup - IL_0482: ldc.i4.5 - IL_0483: and - IL_0484: pop - IL_0489: dup - IL_048a: ldc.i4.1 - IL_048b: shl - IL_048c: pop - IL_0491: dup - IL_0492: ldc.i4.5 - IL_0493: add - IL_0494: pop - IL_0499: dup - IL_049a: ldc.i4.7 - IL_049b: xor - IL_049c: pop - IL_04a1: dup - IL_04a2: ldc.i4.1 - IL_04a3: and - IL_04a4: pop - IL_04a9: dup - IL_04aa: ldc.i4.8 - IL_04ab: sub - IL_04ac: pop - IL_04b1: dup - IL_04b2: ldc.i4.1 - IL_04b3: add - IL_04b4: pop - IL_04b9: dup - IL_04ba: ldc.i4.4 - IL_04bb: and - IL_04bc: pop - IL_04c1: dup - IL_04c2: ldc.i4.4 - IL_04c3: mul - IL_04c4: pop - IL_04c9: dup - IL_04ca: ldc.i4.1 - IL_04cb: shr - IL_04cc: pop - IL_04d1: dup - IL_04d2: ldc.i4.6 - IL_04d3: and - IL_04d4: pop - IL_04d9: dup - IL_04da: ldc.i4.0 - IL_04db: shr - IL_04dc: pop - IL_04e1: dup - IL_04e2: ldc.i4.6 - IL_04e3: shr - IL_04e4: pop - IL_04e9: dup - IL_04ea: ldc.i4.1 - IL_04eb: shl - IL_04ec: pop - IL_04f1: dup - IL_04f2: ldc.i4.8 - IL_04f3: xor - IL_04f4: pop - IL_04f9: dup - IL_04fa: ldc.i4.1 - IL_04fb: add - IL_04fc: pop - IL_0501: dup - IL_0502: ldc.i4.5 - IL_0503: mul - IL_0504: pop - IL_0509: dup - IL_050a: ldc.i4.8 - IL_050b: add - IL_050c: pop - IL_0511: dup - IL_0512: ldc.i4.7 - IL_0513: or - IL_0514: pop - IL_0519: dup - IL_051a: ldc.i4.0 - IL_051b: sub - IL_051c: pop - IL_0521: dup - IL_0522: ldc.i4.3 - IL_0523: or - IL_0524: pop - IL_0529: dup - IL_052a: ldc.i4.8 - IL_052b: shl - IL_052c: pop - IL_0531: dup - IL_0532: ldc.i4.0 - IL_0533: shl - IL_0534: pop - IL_0539: dup - IL_053a: ldc.i4.6 - IL_053b: or - IL_053c: pop - IL_0541: dup - IL_0542: ldc.i4.1 - IL_0543: add - IL_0544: pop - IL_0549: dup - IL_054a: ldc.i4.2 - IL_054b: shr - IL_054c: pop - IL_0551: dup - IL_0552: ldc.i4.1 - IL_0553: or - IL_0554: pop - IL_0559: dup - IL_055a: ldc.i4.7 - IL_055b: and - IL_055c: pop - IL_0561: dup - IL_0562: ldc.i4.7 - IL_0563: xor - IL_0564: pop - IL_0569: dup - IL_056a: ldc.i4.7 - IL_056b: or - IL_056c: pop - IL_0571: dup - IL_0572: ldc.i4.7 - IL_0573: mul - IL_0574: pop - IL_0579: dup - IL_057a: ldc.i4.5 - IL_057b: and - IL_057c: pop - IL_0581: dup - IL_0582: ldc.i4.6 - IL_0583: or - IL_0584: pop - IL_0589: dup - IL_058a: ldc.i4.4 - IL_058b: and - IL_058c: pop - IL_0591: dup - IL_0592: ldc.i4.1 - IL_0593: xor - IL_0594: pop - IL_0599: dup - IL_059a: ldc.i4.8 - IL_059b: shl - IL_059c: pop - IL_05a1: dup - IL_05a2: ldc.i4.1 - IL_05a3: or - IL_05a4: pop - IL_05a9: dup - IL_05aa: ldc.i4.2 - IL_05ab: and - IL_05ac: pop - IL_05b1: dup - IL_05b2: ldc.i4.8 - IL_05b3: xor - IL_05b4: pop - IL_05b9: dup - IL_05ba: ldc.i4.5 - IL_05bb: sub - IL_05bc: pop - IL_05c1: dup - IL_05c2: ldc.i4.8 - IL_05c3: mul - IL_05c4: pop - IL_05c9: dup - IL_05ca: ldc.i4.4 - IL_05cb: and - IL_05cc: pop - IL_05d1: dup - IL_05d2: ldc.i4.1 - IL_05d3: shl - IL_05d4: pop - IL_05d9: dup - IL_05da: ldc.i4.7 - IL_05db: shl - IL_05dc: pop - IL_05e1: dup - IL_05e2: ldc.i4.5 - IL_05e3: add - IL_05e4: pop - IL_05e9: dup - IL_05ea: ldc.i4.2 - IL_05eb: xor - IL_05ec: pop - IL_05f1: dup - IL_05f2: ldc.i4.1 - IL_05f3: sub - IL_05f4: pop - IL_05f9: dup - IL_05fa: ldc.i4.3 - IL_05fb: sub - IL_05fc: pop - IL_0601: dup - IL_0602: ldc.i4.3 - IL_0603: add - IL_0604: pop - IL_0609: dup - IL_060a: ldc.i4.7 - IL_060b: sub - IL_060c: pop - IL_0611: dup - IL_0612: ldc.i4.0 - IL_0613: or - IL_0614: pop - IL_0619: dup - IL_061a: ldc.i4.6 - IL_061b: shr - IL_061c: pop - IL_0621: dup - IL_0622: ldc.i4.0 - IL_0623: shr - IL_0624: pop - IL_0629: dup - IL_062a: ldc.i4.4 - IL_062b: sub - IL_062c: pop - IL_0631: dup - IL_0632: ldc.i4.6 - IL_0633: or - IL_0634: pop - IL_0639: dup - IL_063a: ldc.i4.8 - IL_063b: mul - IL_063c: pop - IL_0641: dup - IL_0642: ldc.i4.7 - IL_0643: shl - IL_0644: pop - IL_0649: dup - IL_064a: ldc.i4.8 - IL_064b: shl - IL_064c: pop - IL_0651: dup - IL_0652: ldc.i4.7 - IL_0653: shr - IL_0654: pop - IL_0659: dup - IL_065a: ldc.i4.6 - IL_065b: sub - IL_065c: pop - IL_0661: dup - IL_0662: ldc.i4.0 - IL_0663: or - IL_0664: pop - IL_0669: dup - IL_066a: ldc.i4.2 - IL_066b: add - IL_066c: pop - IL_0671: dup - IL_0672: ldc.i4.1 - IL_0673: shl - IL_0674: pop - IL_0679: dup - IL_067a: ldc.i4.2 - IL_067b: add - IL_067c: pop - IL_0681: dup - IL_0682: ldc.i4.5 - IL_0683: add - IL_0684: pop - IL_0689: dup - IL_068a: ldc.i4.3 - IL_068b: and - IL_068c: pop - IL_0691: dup - IL_0692: ldc.i4.5 - IL_0693: xor - IL_0694: pop - IL_0699: dup - IL_069a: ldc.i4.1 - IL_069b: add - IL_069c: pop - IL_06a1: dup - IL_06a2: ldc.i4.5 - IL_06a3: shr - IL_06a4: pop - IL_06a9: dup - IL_06aa: ldc.i4.7 - IL_06ab: xor - IL_06ac: pop - IL_06b1: dup - IL_06b2: ldc.i4.0 - IL_06b3: shr - IL_06b4: pop - IL_06b9: dup - IL_06ba: ldc.i4.7 - IL_06bb: shl - IL_06bc: pop - IL_06c1: dup - IL_06c2: ldc.i4.2 - IL_06c3: or - IL_06c4: pop - IL_06c9: dup - IL_06ca: ldc.i4.5 - IL_06cb: shl - IL_06cc: pop - IL_06d1: dup - IL_06d2: ldc.i4.1 - IL_06d3: and - IL_06d4: pop - IL_06d9: dup - IL_06da: ldc.i4.3 - IL_06db: shr - IL_06dc: pop - IL_06e1: dup - IL_06e2: ldc.i4.3 - IL_06e3: shr - IL_06e4: pop - IL_06e9: dup - IL_06ea: ldc.i4.1 - IL_06eb: add - IL_06ec: pop - IL_06f1: dup - IL_06f2: ldc.i4.6 - IL_06f3: shr - IL_06f4: pop - IL_06f9: dup - IL_06fa: ldc.i4.4 - IL_06fb: xor - IL_06fc: pop - IL_0701: dup - IL_0702: ldc.i4.3 - IL_0703: xor - IL_0704: pop - IL_0709: dup - IL_070a: ldc.i4.5 - IL_070b: shr - IL_070c: pop - IL_0711: dup - IL_0712: ldc.i4.5 - IL_0713: add - IL_0714: pop - IL_0719: dup - IL_071a: ldc.i4.7 - IL_071b: mul - IL_071c: pop - IL_0721: dup - IL_0722: ldc.i4.3 - IL_0723: or - IL_0724: pop - IL_0729: dup - IL_072a: ldc.i4.8 - IL_072b: add - IL_072c: pop - IL_0731: dup - IL_0732: ldc.i4.8 - IL_0733: sub - IL_0734: pop - IL_0739: dup - IL_073a: ldc.i4.0 - IL_073b: mul - IL_073c: pop - IL_0741: dup - IL_0742: ldc.i4.0 - IL_0743: shr - IL_0744: pop - IL_0749: dup - IL_074a: ldc.i4.7 - IL_074b: mul - IL_074c: pop - IL_0751: dup - IL_0752: ldc.i4.8 - IL_0753: shr - IL_0754: pop - IL_0759: dup - IL_075a: ldc.i4.7 - IL_075b: and - IL_075c: pop - IL_0761: dup - IL_0762: ldc.i4.6 - IL_0763: and - IL_0764: pop - IL_0769: dup - IL_076a: ldc.i4.3 - IL_076b: and - IL_076c: pop - IL_0771: dup - IL_0772: ldc.i4.3 - IL_0773: add - IL_0774: pop - IL_0779: dup - IL_077a: ldc.i4.3 - IL_077b: and - IL_077c: pop - IL_0781: dup - IL_0782: ldc.i4.1 - IL_0783: mul - IL_0784: pop - IL_0789: dup - IL_078a: ldc.i4.0 - IL_078b: shr - IL_078c: pop - IL_0791: dup - IL_0792: ldc.i4.0 - IL_0793: sub - IL_0794: pop - IL_0799: dup - IL_079a: ldc.i4.0 - IL_079b: sub - IL_079c: pop - IL_07a1: dup - IL_07a2: ldc.i4.0 - IL_07a3: mul - IL_07a4: pop - IL_07a9: dup - IL_07aa: ldc.i4.1 - IL_07ab: sub - IL_07ac: pop - IL_07b1: dup - IL_07b2: ldc.i4.7 - IL_07b3: mul - IL_07b4: pop - IL_07b9: dup - IL_07ba: ldc.i4.6 - IL_07bb: sub - IL_07bc: pop - IL_07c1: dup - IL_07c2: ldc.i4.5 - IL_07c3: shr - IL_07c4: pop - IL_07c9: dup - IL_07ca: ldc.i4.8 - IL_07cb: add - IL_07cc: pop - IL_07d1: dup - IL_07d2: ldc.i4.8 - IL_07d3: sub - IL_07d4: pop - IL_07d9: dup - IL_07da: ldc.i4.4 - IL_07db: and - IL_07dc: pop - IL_07e1: dup - IL_07e2: ldc.i4.4 - IL_07e3: shr - IL_07e4: pop - IL_07e9: dup - IL_07ea: ldc.i4.8 - IL_07eb: and - IL_07ec: pop - IL_07f1: dup - IL_07f2: ldc.i4.5 - IL_07f3: or - IL_07f4: pop - IL_07f9: dup - IL_07fa: ldc.i4.8 - IL_07fb: mul - IL_07fc: pop - IL_0801: dup - IL_0802: ldc.i4.5 - IL_0803: sub - IL_0804: pop - IL_0809: dup - IL_080a: ldc.i4.7 - IL_080b: shl - IL_080c: pop - IL_0811: dup - IL_0812: ldc.i4.2 - IL_0813: xor - IL_0814: pop - IL_0819: dup - IL_081a: ldc.i4.2 - IL_081b: and - IL_081c: pop - IL_0821: dup - IL_0822: ldc.i4.5 - IL_0823: shr - IL_0824: pop - IL_0829: dup - IL_082a: ldc.i4.2 - IL_082b: shl - IL_082c: pop - IL_0831: dup - IL_0832: ldc.i4.4 - IL_0833: shr - IL_0834: pop - IL_0839: dup - IL_083a: ldc.i4.0 - IL_083b: xor - IL_083c: pop - IL_0841: dup - IL_0842: ldc.i4.0 - IL_0843: mul - IL_0844: pop - IL_0849: dup - IL_084a: ldc.i4.2 - IL_084b: shr - IL_084c: pop - IL_0851: dup - IL_0852: ldc.i4.1 - IL_0853: mul - IL_0854: pop - IL_0859: dup - IL_085a: ldc.i4.8 - IL_085b: or - IL_085c: pop - IL_0861: dup - IL_0862: ldc.i4.7 - IL_0863: mul - IL_0864: pop - IL_0869: dup - IL_086a: ldc.i4.1 - IL_086b: xor - IL_086c: pop - IL_0871: dup - IL_0872: ldc.i4.2 - IL_0873: sub - IL_0874: pop - IL_0879: dup - IL_087a: ldc.i4.4 - IL_087b: sub - IL_087c: pop - IL_0881: dup - IL_0882: ldc.i4.4 - IL_0883: and - IL_0884: pop - IL_0889: dup - IL_088a: ldc.i4.5 - IL_088b: shr - IL_088c: pop - IL_0891: dup - IL_0892: ldc.i4.4 - IL_0893: sub - IL_0894: pop - IL_0899: dup - IL_089a: ldc.i4.8 - IL_089b: sub - IL_089c: pop - IL_08a1: dup - IL_08a2: ldc.i4.4 - IL_08a3: sub - IL_08a4: pop - IL_08a9: dup - IL_08aa: ldc.i4.3 - IL_08ab: mul - IL_08ac: pop - IL_08b1: dup - IL_08b2: ldc.i4.0 - IL_08b3: or - IL_08b4: pop - IL_08b9: dup - IL_08ba: ldc.i4.2 - IL_08bb: and - IL_08bc: pop - IL_08c1: dup - IL_08c2: ldc.i4.5 - IL_08c3: shl - IL_08c4: pop - IL_08c9: dup - IL_08ca: ldc.i4.7 - IL_08cb: xor - IL_08cc: pop - IL_08d1: dup - IL_08d2: ldc.i4.6 - IL_08d3: mul - IL_08d4: pop - IL_08d9: dup - IL_08da: ldc.i4.1 - IL_08db: mul - IL_08dc: pop - IL_08e1: dup - IL_08e2: ldc.i4.1 - IL_08e3: and - IL_08e4: pop - IL_08e9: dup - IL_08ea: ldc.i4.7 - IL_08eb: or - IL_08ec: pop - IL_08f1: dup - IL_08f2: ldc.i4.2 - IL_08f3: and - IL_08f4: pop - IL_08f9: dup - IL_08fa: ldc.i4.5 - IL_08fb: xor - IL_08fc: pop - IL_0901: dup - IL_0902: ldc.i4.1 - IL_0903: add - IL_0904: pop - IL_0909: dup - IL_090a: ldc.i4.1 - IL_090b: shl - IL_090c: pop - IL_0911: dup - IL_0912: ldc.i4.0 - IL_0913: xor - IL_0914: pop - IL_0919: dup - IL_091a: ldc.i4.8 - IL_091b: and - IL_091c: pop - IL_0921: dup - IL_0922: ldc.i4.2 - IL_0923: add - IL_0924: pop - IL_0929: dup - IL_092a: ldc.i4.1 - IL_092b: or - IL_092c: pop - IL_0931: dup - IL_0932: ldc.i4.8 - IL_0933: shr - IL_0934: pop - IL_0939: dup - IL_093a: ldc.i4.8 - IL_093b: and - IL_093c: pop - IL_0941: dup - IL_0942: ldc.i4.8 - IL_0943: mul - IL_0944: pop - IL_0949: dup - IL_094a: ldc.i4.7 - IL_094b: shr - IL_094c: pop - IL_0951: dup - IL_0952: ldc.i4.3 - IL_0953: add - IL_0954: pop - IL_0959: dup - IL_095a: ldc.i4.4 - IL_095b: sub - IL_095c: pop - IL_0961: dup - IL_0962: ldc.i4.5 - IL_0963: mul - IL_0964: pop - IL_0969: dup - IL_096a: ldc.i4.4 - IL_096b: shl - IL_096c: pop - IL_0971: dup - IL_0972: ldc.i4.3 - IL_0973: or - IL_0974: pop - IL_0979: dup - IL_097a: ldc.i4.8 - IL_097b: shr - IL_097c: pop - IL_0981: dup - IL_0982: ldc.i4.5 - IL_0983: add - IL_0984: pop - IL_0989: dup - IL_098a: ldc.i4.1 - IL_098b: or - IL_098c: pop - IL_0991: dup - IL_0992: ldc.i4.7 - IL_0993: shr - IL_0994: pop - IL_0999: dup - IL_099a: ldc.i4.6 - IL_099b: sub - IL_099c: pop - IL_09a1: dup - IL_09a2: ldc.i4.5 - IL_09a3: or - IL_09a4: pop - IL_09a9: dup - IL_09aa: ldc.i4.0 - IL_09ab: shl - IL_09ac: pop - IL_09b1: dup - IL_09b2: ldc.i4.0 - IL_09b3: sub - IL_09b4: pop - IL_09b9: dup - IL_09ba: ldc.i4.3 - IL_09bb: shl - IL_09bc: pop - IL_09c1: dup - IL_09c2: ldc.i4.7 - IL_09c3: or - IL_09c4: pop - IL_09c9: dup - IL_09ca: ldc.i4.0 - IL_09cb: or - IL_09cc: pop - IL_09d1: dup - IL_09d2: ldc.i4.0 - IL_09d3: and - IL_09d4: pop - IL_09d9: dup - IL_09da: ldc.i4.8 - IL_09db: add - IL_09dc: pop - IL_09e1: dup - IL_09e2: ldc.i4.5 - IL_09e3: or - IL_09e4: pop - IL_09e9: dup - IL_09ea: ldc.i4.8 - IL_09eb: and - IL_09ec: pop - IL_09f1: dup - IL_09f2: ldc.i4.8 - IL_09f3: mul - IL_09f4: pop - IL_09f9: dup - IL_09fa: ldc.i4.4 - IL_09fb: xor - IL_09fc: pop - IL_0a01: dup - IL_0a02: ldc.i4.1 - IL_0a03: shl - IL_0a04: pop - IL_0a09: dup - IL_0a0a: ldc.i4.3 - IL_0a0b: or - IL_0a0c: pop - IL_0a11: dup - IL_0a12: ldc.i4.4 - IL_0a13: add - IL_0a14: pop - IL_0a19: dup - IL_0a1a: ldc.i4.0 - IL_0a1b: mul - IL_0a1c: pop - IL_0a21: dup - IL_0a22: ldc.i4.5 - IL_0a23: shl - IL_0a24: pop - IL_0a29: dup - IL_0a2a: ldc.i4.1 - IL_0a2b: xor - IL_0a2c: pop - IL_0a31: dup - IL_0a32: ldc.i4.0 - IL_0a33: or - IL_0a34: pop - IL_0a39: dup - IL_0a3a: ldc.i4.0 - IL_0a3b: xor - IL_0a3c: pop - IL_0a41: dup - IL_0a42: ldc.i4.8 - IL_0a43: or - IL_0a44: pop - IL_0a49: dup - IL_0a4a: ldc.i4.6 - IL_0a4b: xor - IL_0a4c: pop - IL_0a51: dup - IL_0a52: ldc.i4.8 - IL_0a53: add - IL_0a54: pop - IL_0a59: dup - IL_0a5a: ldc.i4.5 - IL_0a5b: shr - IL_0a5c: pop - IL_0a61: dup - IL_0a62: ldc.i4.0 - IL_0a63: sub - IL_0a64: pop - IL_0a69: dup - IL_0a6a: ldc.i4.2 - IL_0a6b: and - IL_0a6c: pop - IL_0a71: dup - IL_0a72: ldc.i4.6 - IL_0a73: or - IL_0a74: pop - IL_0a79: dup - IL_0a7a: ldc.i4.2 - IL_0a7b: sub - IL_0a7c: pop - IL_0a81: dup - IL_0a82: ldc.i4.4 - IL_0a83: shr - IL_0a84: pop - IL_0a89: dup - IL_0a8a: ldc.i4.3 - IL_0a8b: shl - IL_0a8c: pop - IL_0a91: dup - IL_0a92: ldc.i4.7 - IL_0a93: shl - IL_0a94: pop - IL_0a99: dup - IL_0a9a: ldc.i4.0 - IL_0a9b: and - IL_0a9c: pop - IL_0aa1: dup - IL_0aa2: ldc.i4.7 - IL_0aa3: shr - IL_0aa4: pop - IL_0aa9: dup - IL_0aaa: ldc.i4.2 - IL_0aab: xor - IL_0aac: pop - IL_0ab1: dup - IL_0ab2: ldc.i4.6 - IL_0ab3: xor - IL_0ab4: pop - IL_0ab9: dup - IL_0aba: ldc.i4.8 - IL_0abb: shr - IL_0abc: pop - IL_0ac1: dup - IL_0ac2: ldc.i4.7 - IL_0ac3: shl - IL_0ac4: pop - IL_0ac9: dup - IL_0aca: ldc.i4.8 - IL_0acb: add - IL_0acc: pop - IL_0ad1: dup - IL_0ad2: ldc.i4.5 - IL_0ad3: add - IL_0ad4: pop - IL_0ad9: dup - IL_0ada: ldc.i4.4 - IL_0adb: sub - IL_0adc: pop - IL_0ae1: dup - IL_0ae2: ldc.i4.8 - IL_0ae3: shr - IL_0ae4: pop - IL_0ae9: dup - IL_0aea: ldc.i4.7 - IL_0aeb: mul - IL_0aec: pop - IL_0af1: dup - IL_0af2: ldc.i4.7 - IL_0af3: sub - IL_0af4: pop - IL_0af9: dup - IL_0afa: ldc.i4.5 - IL_0afb: and - IL_0afc: pop - IL_0b01: dup - IL_0b02: ldc.i4.2 - IL_0b03: or - IL_0b04: pop - IL_0b09: dup - IL_0b0a: ldc.i4.0 - IL_0b0b: xor - IL_0b0c: pop - IL_0b11: dup - IL_0b12: ldc.i4.5 - IL_0b13: xor - IL_0b14: pop - IL_0b19: dup - IL_0b1a: ldc.i4.5 - IL_0b1b: xor - IL_0b1c: pop - IL_0b21: dup - IL_0b22: ldc.i4.7 - IL_0b23: or - IL_0b24: pop - IL_0b29: dup - IL_0b2a: ldc.i4.4 - IL_0b2b: mul - IL_0b2c: pop - IL_0b31: dup - IL_0b32: ldc.i4.6 - IL_0b33: add - IL_0b34: pop - IL_0b39: dup - IL_0b3a: ldc.i4.0 - IL_0b3b: shl - IL_0b3c: pop - IL_0b41: dup - IL_0b42: ldc.i4.1 - IL_0b43: shl - IL_0b44: pop - IL_0b49: dup - IL_0b4a: ldc.i4.8 - IL_0b4b: sub - IL_0b4c: pop - IL_0b51: dup - IL_0b52: ldc.i4.8 - IL_0b53: mul - IL_0b54: pop - IL_0b59: dup - IL_0b5a: ldc.i4.5 - IL_0b5b: xor - IL_0b5c: pop - IL_0b61: dup - IL_0b62: ldc.i4.1 - IL_0b63: sub - IL_0b64: pop - IL_0b69: dup - IL_0b6a: ldc.i4.6 - IL_0b6b: add - IL_0b6c: pop - IL_0b71: dup - IL_0b72: ldc.i4.5 - IL_0b73: shr - IL_0b74: pop - IL_0b79: dup - IL_0b7a: ldc.i4.0 - IL_0b7b: shr - IL_0b7c: pop - IL_0b81: dup - IL_0b82: ldc.i4.0 - IL_0b83: xor - IL_0b84: pop - IL_0b89: dup - IL_0b8a: ldc.i4.2 - IL_0b8b: and - IL_0b8c: pop - IL_0b91: dup - IL_0b92: ldc.i4.3 - IL_0b93: shl - IL_0b94: pop - IL_0b99: dup - IL_0b9a: ldc.i4.1 - IL_0b9b: mul - IL_0b9c: pop - IL_0ba1: dup - IL_0ba2: ldc.i4.8 - IL_0ba3: shl - IL_0ba4: pop - IL_0ba9: dup - IL_0baa: ldc.i4.1 - IL_0bab: shr - IL_0bac: pop - IL_0bb1: dup - IL_0bb2: ldc.i4.4 - IL_0bb3: sub - IL_0bb4: pop - IL_0bb9: dup - IL_0bba: ldc.i4.3 - IL_0bbb: and - IL_0bbc: pop - IL_0bc1: dup - IL_0bc2: ldc.i4.6 - IL_0bc3: mul - IL_0bc4: pop - IL_0bc9: dup - IL_0bca: ldc.i4.1 - IL_0bcb: sub - IL_0bcc: pop - IL_0bd1: dup - IL_0bd2: ldc.i4.2 - IL_0bd3: xor - IL_0bd4: pop - IL_0bd9: dup - IL_0bda: ldc.i4.6 - IL_0bdb: or - IL_0bdc: pop - IL_0be1: dup - IL_0be2: ldc.i4.2 - IL_0be3: shr - IL_0be4: pop - IL_0be9: dup - IL_0bea: ldc.i4.1 - IL_0beb: xor - IL_0bec: pop - IL_0bf1: dup - IL_0bf2: ldc.i4.7 - IL_0bf3: shl - IL_0bf4: pop - IL_0bf9: dup - IL_0bfa: ldc.i4.6 - IL_0bfb: add - IL_0bfc: pop - IL_0c01: dup - IL_0c02: ldc.i4.8 - IL_0c03: or - IL_0c04: pop - IL_0c09: dup - IL_0c0a: ldc.i4.1 - IL_0c0b: mul - IL_0c0c: pop - IL_0c11: dup - IL_0c12: ldc.i4.7 - IL_0c13: sub - IL_0c14: pop - IL_0c19: dup - IL_0c1a: ldc.i4.1 - IL_0c1b: shr - IL_0c1c: pop - IL_0c21: dup - IL_0c22: ldc.i4.3 - IL_0c23: shl - IL_0c24: pop - IL_0c29: dup - IL_0c2a: ldc.i4.2 - IL_0c2b: xor - IL_0c2c: pop - IL_0c31: dup - IL_0c32: ldc.i4.0 - IL_0c33: or - IL_0c34: pop - IL_0c39: dup - IL_0c3a: ldc.i4.8 - IL_0c3b: or - IL_0c3c: pop - IL_0c41: dup - IL_0c42: ldc.i4.6 - IL_0c43: and - IL_0c44: pop - IL_0c49: dup - IL_0c4a: ldc.i4.3 - IL_0c4b: xor - IL_0c4c: pop - IL_0c51: dup - IL_0c52: ldc.i4.5 - IL_0c53: and - IL_0c54: pop - IL_0c59: dup - IL_0c5a: ldc.i4.3 - IL_0c5b: shl - IL_0c5c: pop - IL_0c61: dup - IL_0c62: ldc.i4.6 - IL_0c63: sub - IL_0c64: pop - IL_0c69: dup - IL_0c6a: ldc.i4.4 - IL_0c6b: and - IL_0c6c: pop - IL_0c71: dup - IL_0c72: ldc.i4.2 - IL_0c73: and - IL_0c74: pop - IL_0c79: dup - IL_0c7a: ldc.i4.4 - IL_0c7b: xor - IL_0c7c: pop - IL_0c81: dup - IL_0c82: ldc.i4.6 - IL_0c83: add - IL_0c84: pop - IL_0c89: dup - IL_0c8a: ldc.i4.7 - IL_0c8b: shl - IL_0c8c: pop - IL_0c91: dup - IL_0c92: ldc.i4.8 - IL_0c93: add - IL_0c94: pop - IL_0c99: dup - IL_0c9a: ldc.i4.8 - IL_0c9b: shl - IL_0c9c: pop - IL_0ca1: dup - IL_0ca2: ldc.i4.0 - IL_0ca3: xor - IL_0ca4: pop - IL_0ca9: dup - IL_0caa: ldc.i4.7 - IL_0cab: shl - IL_0cac: pop - IL_0cb1: dup - IL_0cb2: ldc.i4.2 - IL_0cb3: mul - IL_0cb4: pop - IL_0cb9: dup - IL_0cba: ldc.i4.8 - IL_0cbb: xor - IL_0cbc: pop - IL_0cc1: dup - IL_0cc2: ldc.i4.6 - IL_0cc3: sub - IL_0cc4: pop - IL_0cc9: dup - IL_0cca: ldc.i4.5 - IL_0ccb: or - IL_0ccc: pop - IL_0cd1: dup - IL_0cd2: ldc.i4.1 - IL_0cd3: mul - IL_0cd4: pop - IL_0cd9: dup - IL_0cda: ldc.i4.4 - IL_0cdb: sub - IL_0cdc: pop - IL_0ce1: dup - IL_0ce2: ldc.i4.4 - IL_0ce3: shr - IL_0ce4: pop - IL_0ce9: dup - IL_0cea: ldc.i4.5 - IL_0ceb: shr - IL_0cec: pop - IL_0cf1: dup - IL_0cf2: ldc.i4.5 - IL_0cf3: mul - IL_0cf4: pop - IL_0cf9: dup - IL_0cfa: ldc.i4.3 - IL_0cfb: shr - IL_0cfc: pop - IL_0d01: dup - IL_0d02: ldc.i4.0 - IL_0d03: and - IL_0d04: pop - IL_0d09: dup - IL_0d0a: ldc.i4.6 - IL_0d0b: or - IL_0d0c: pop - IL_0d11: dup - IL_0d12: ldc.i4.1 - IL_0d13: mul - IL_0d14: pop - IL_0d19: dup - IL_0d1a: ldc.i4.0 - IL_0d1b: shr - IL_0d1c: pop - IL_0d21: dup - IL_0d22: ldc.i4.8 - IL_0d23: or - IL_0d24: pop - IL_0d29: dup - IL_0d2a: ldc.i4.2 - IL_0d2b: sub - IL_0d2c: pop - IL_0d31: dup - IL_0d32: ldc.i4.8 - IL_0d33: and - IL_0d34: pop - IL_0d39: dup - IL_0d3a: ldc.i4.2 - IL_0d3b: xor - IL_0d3c: pop - IL_0d41: dup - IL_0d42: ldc.i4.2 - IL_0d43: sub - IL_0d44: pop - IL_0d49: dup - IL_0d4a: ldc.i4.0 - IL_0d4b: add - IL_0d4c: pop - IL_0d51: dup - IL_0d52: ldc.i4.1 - IL_0d53: shl - IL_0d54: pop - IL_0d59: dup - IL_0d5a: ldc.i4.2 - IL_0d5b: xor - IL_0d5c: pop - IL_0d61: dup - IL_0d62: ldc.i4.5 - IL_0d63: shr - IL_0d64: pop - IL_0d69: dup - IL_0d6a: ldc.i4.1 - IL_0d6b: mul - IL_0d6c: pop - IL_0d71: dup - IL_0d72: ldc.i4.4 - IL_0d73: mul - IL_0d74: pop - IL_0d79: dup - IL_0d7a: ldc.i4.7 - IL_0d7b: shr - IL_0d7c: pop - IL_0d81: dup - IL_0d82: ldc.i4.0 - IL_0d83: sub - IL_0d84: pop - IL_0d89: dup - IL_0d8a: ldc.i4.4 - IL_0d8b: xor - IL_0d8c: pop - IL_0d91: dup - IL_0d92: ldc.i4.5 - IL_0d93: or - IL_0d94: pop - IL_0d99: dup - IL_0d9a: ldc.i4.2 - IL_0d9b: xor - IL_0d9c: pop - IL_0da1: dup - IL_0da2: ldc.i4.1 - IL_0da3: add - IL_0da4: pop - IL_0da9: dup - IL_0daa: ldc.i4.0 - IL_0dab: sub - IL_0dac: pop - IL_0db1: dup - IL_0db2: ldc.i4.0 - IL_0db3: mul - IL_0db4: pop - IL_0db9: dup - IL_0dba: ldc.i4.2 - IL_0dbb: shr - IL_0dbc: pop - IL_0dc1: dup - IL_0dc2: ldc.i4.3 - IL_0dc3: sub - IL_0dc4: pop - IL_0dc9: dup - IL_0dca: ldc.i4.2 - IL_0dcb: shl - IL_0dcc: pop - IL_0dd1: dup - IL_0dd2: ldc.i4.2 - IL_0dd3: mul - IL_0dd4: pop - IL_0dd9: dup - IL_0dda: ldc.i4.4 - IL_0ddb: shl - IL_0ddc: pop - IL_0de1: dup - IL_0de2: ldc.i4.4 - IL_0de3: mul - IL_0de4: pop - IL_0de9: dup - IL_0dea: ldc.i4.2 - IL_0deb: xor - IL_0dec: pop - IL_0df1: dup - IL_0df2: ldc.i4.1 - IL_0df3: shr - IL_0df4: pop - IL_0df9: dup - IL_0dfa: ldc.i4.1 - IL_0dfb: shl - IL_0dfc: pop - IL_0e01: dup - IL_0e02: ldc.i4.0 - IL_0e03: shl - IL_0e04: pop - IL_0e09: dup - IL_0e0a: ldc.i4.0 - IL_0e0b: shr - IL_0e0c: pop - IL_0e11: dup - IL_0e12: ldc.i4.2 - IL_0e13: and - IL_0e14: pop - IL_0e19: dup - IL_0e1a: ldc.i4.7 - IL_0e1b: mul - IL_0e1c: pop - IL_0e21: dup - IL_0e22: ldc.i4.7 - IL_0e23: shl - IL_0e24: pop - IL_0e29: dup - IL_0e2a: ldc.i4.8 - IL_0e2b: add - IL_0e2c: pop - IL_0e31: dup - IL_0e32: ldc.i4.4 - IL_0e33: add - IL_0e34: pop - IL_0e39: dup - IL_0e3a: ldc.i4.3 - IL_0e3b: mul - IL_0e3c: pop - IL_0e41: dup - IL_0e42: ldc.i4.3 - IL_0e43: xor - IL_0e44: pop - IL_0e49: dup - IL_0e4a: ldc.i4.8 - IL_0e4b: mul - IL_0e4c: pop - IL_0e51: dup - IL_0e52: ldc.i4.0 - IL_0e53: mul - IL_0e54: pop - IL_0e59: dup - IL_0e5a: ldc.i4.3 - IL_0e5b: and - IL_0e5c: pop - IL_0e61: dup - IL_0e62: ldc.i4.6 - IL_0e63: add - IL_0e64: pop - IL_0e69: dup - IL_0e6a: ldc.i4.8 - IL_0e6b: mul - IL_0e6c: pop - IL_0e71: dup - IL_0e72: ldc.i4.5 - IL_0e73: and - IL_0e74: pop - IL_0e79: dup - IL_0e7a: ldc.i4.2 - IL_0e7b: shl - IL_0e7c: pop - IL_0e81: dup - IL_0e82: ldc.i4.8 - IL_0e83: shl - IL_0e84: pop - IL_0e89: dup - IL_0e8a: ldc.i4.1 - IL_0e8b: xor - IL_0e8c: pop - IL_0e91: dup - IL_0e92: ldc.i4.1 - IL_0e93: shl - IL_0e94: pop - IL_0e99: dup - IL_0e9a: ldc.i4.3 - IL_0e9b: xor - IL_0e9c: pop - IL_0ea1: dup - IL_0ea2: ldc.i4.3 - IL_0ea3: or - IL_0ea4: pop - IL_0ea9: dup - IL_0eaa: ldc.i4.5 - IL_0eab: shr - IL_0eac: pop - IL_0eb1: dup - IL_0eb2: ldc.i4.3 - IL_0eb3: xor - IL_0eb4: pop - IL_0eb9: dup - IL_0eba: ldc.i4.0 - IL_0ebb: xor - IL_0ebc: pop - IL_0ec1: dup - IL_0ec2: ldc.i4.7 - IL_0ec3: or - IL_0ec4: pop - IL_0ec9: dup - IL_0eca: ldc.i4.1 - IL_0ecb: shr - IL_0ecc: pop - IL_0ed1: dup - IL_0ed2: ldc.i4.6 - IL_0ed3: and - IL_0ed4: pop - IL_0ed9: dup - IL_0eda: ldc.i4.4 - IL_0edb: shr - IL_0edc: pop - IL_0ee1: dup - IL_0ee2: ldc.i4.1 - IL_0ee3: mul - IL_0ee4: pop - IL_0ee9: dup - IL_0eea: ldc.i4.8 - IL_0eeb: sub - IL_0eec: pop - IL_0ef1: dup - IL_0ef2: ldc.i4.8 - IL_0ef3: xor - IL_0ef4: pop - IL_0ef9: dup - IL_0efa: ldc.i4.6 - IL_0efb: add - IL_0efc: pop - IL_0f01: dup - IL_0f02: ldc.i4.2 - IL_0f03: mul - IL_0f04: pop - IL_0f09: dup - IL_0f0a: ldc.i4.1 - IL_0f0b: or - IL_0f0c: pop - IL_0f11: dup - IL_0f12: ldc.i4.7 - IL_0f13: or - IL_0f14: pop - IL_0f19: dup - IL_0f1a: ldc.i4.1 - IL_0f1b: and - IL_0f1c: pop - IL_0f21: dup - IL_0f22: ldc.i4.0 - IL_0f23: shl - IL_0f24: pop - IL_0f29: dup - IL_0f2a: ldc.i4.8 - IL_0f2b: add - IL_0f2c: pop - IL_0f31: dup - IL_0f32: ldc.i4.6 - IL_0f33: shr - IL_0f34: pop - IL_0f39: dup - IL_0f3a: ldc.i4.4 - IL_0f3b: mul - IL_0f3c: pop - IL_0f41: dup - IL_0f42: ldc.i4.0 - IL_0f43: shl - IL_0f44: pop - IL_0f49: dup - IL_0f4a: ldc.i4.4 - IL_0f4b: shr - IL_0f4c: pop - IL_0f51: dup - IL_0f52: ldc.i4.5 - IL_0f53: shl - IL_0f54: pop - IL_0f59: dup - IL_0f5a: ldc.i4.7 - IL_0f5b: add - IL_0f5c: pop - IL_0f61: dup - IL_0f62: ldc.i4.8 - IL_0f63: xor - IL_0f64: pop - IL_0f69: dup - IL_0f6a: ldc.i4.2 - IL_0f6b: or - IL_0f6c: pop - IL_0f71: dup - IL_0f72: ldc.i4.5 - IL_0f73: sub - IL_0f74: pop - IL_0f79: dup - IL_0f7a: ldc.i4.5 - IL_0f7b: or - IL_0f7c: pop - IL_0f81: dup - IL_0f82: ldc.i4.2 - IL_0f83: shl - IL_0f84: pop - IL_0f89: dup - IL_0f8a: ldc.i4.3 - IL_0f8b: add - IL_0f8c: pop - IL_0f91: dup - IL_0f92: ldc.i4.1 - IL_0f93: add - IL_0f94: pop - IL_0f99: dup - IL_0f9a: ldc.i4.4 - IL_0f9b: or - IL_0f9c: pop - IL_0fa1: dup - IL_0fa2: ldc.i4.7 - IL_0fa3: mul - IL_0fa4: pop - IL_0fa9: dup - IL_0faa: ldc.i4.5 - IL_0fab: sub - IL_0fac: pop - IL_0fb1: dup - IL_0fb2: ldc.i4.7 - IL_0fb3: xor - IL_0fb4: pop - IL_0fb9: dup - IL_0fba: ldc.i4.0 - IL_0fbb: xor - IL_0fbc: pop - IL_0fc1: dup - IL_0fc2: ldc.i4.7 - IL_0fc3: shr - IL_0fc4: pop - IL_0fc9: dup - IL_0fca: ldc.i4.1 - IL_0fcb: mul - IL_0fcc: pop - IL_0fd1: dup - IL_0fd2: ldc.i4.0 - IL_0fd3: or - IL_0fd4: pop - IL_0fd9: dup - IL_0fda: ldc.i4.4 - IL_0fdb: shr - IL_0fdc: pop - IL_0fe1: dup - IL_0fe2: ldc.i4.4 - IL_0fe3: add - IL_0fe4: pop - IL_0fe9: dup - IL_0fea: ldc.i4.8 - IL_0feb: xor - IL_0fec: pop - IL_0ff1: dup - IL_0ff2: ldc.i4.5 - IL_0ff3: sub - IL_0ff4: pop - IL_0ff9: dup - IL_0ffa: ldc.i4.0 - IL_0ffb: or - IL_0ffc: pop - IL_1001: dup - IL_1002: ldc.i4.8 - IL_1003: add - IL_1004: pop - IL_1009: dup - IL_100a: ldc.i4.7 - IL_100b: sub - IL_100c: pop - IL_1011: dup - IL_1012: ldc.i4.2 - IL_1013: xor - IL_1014: pop - IL_1019: dup - IL_101a: ldc.i4.0 - IL_101b: or - IL_101c: pop - IL_1021: dup - IL_1022: ldc.i4.0 - IL_1023: shl - IL_1024: pop - IL_1029: dup - IL_102a: ldc.i4.8 - IL_102b: mul - IL_102c: pop - IL_1031: dup - IL_1032: ldc.i4.0 - IL_1033: shr - IL_1034: pop - IL_1039: dup - IL_103a: ldc.i4.2 - IL_103b: shl - IL_103c: pop - IL_1041: dup - IL_1042: ldc.i4.4 - IL_1043: and - IL_1044: pop - IL_1049: dup - IL_104a: ldc.i4.1 - IL_104b: add - IL_104c: pop - IL_1051: dup - IL_1052: ldc.i4.8 - IL_1053: sub - IL_1054: pop - IL_1059: dup - IL_105a: ldc.i4.7 - IL_105b: mul - IL_105c: pop - IL_1061: dup - IL_1062: ldc.i4.0 - IL_1063: shr - IL_1064: pop - IL_1069: dup - IL_106a: ldc.i4.4 - IL_106b: sub - IL_106c: pop - IL_1071: dup - IL_1072: ldc.i4.0 - IL_1073: sub - IL_1074: pop - IL_1079: dup - IL_107a: ldc.i4.2 - IL_107b: shl - IL_107c: pop - IL_1081: dup - IL_1082: ldc.i4.2 - IL_1083: shl - IL_1084: pop - IL_1089: dup - IL_108a: ldc.i4.2 - IL_108b: and - IL_108c: pop - IL_1091: dup - IL_1092: ldc.i4.5 - IL_1093: and - IL_1094: pop - IL_1099: dup - IL_109a: ldc.i4.2 - IL_109b: mul - IL_109c: pop - IL_10a1: dup - IL_10a2: ldc.i4.4 - IL_10a3: sub - IL_10a4: pop - IL_10a9: dup - IL_10aa: ldc.i4.3 - IL_10ab: xor - IL_10ac: pop - IL_10b1: dup - IL_10b2: ldc.i4.0 - IL_10b3: sub - IL_10b4: pop - IL_10b9: dup - IL_10ba: ldc.i4.6 - IL_10bb: and - IL_10bc: pop - IL_10c1: dup - IL_10c2: ldc.i4.6 - IL_10c3: xor - IL_10c4: pop - IL_10c9: dup - IL_10ca: ldc.i4.8 - IL_10cb: and - IL_10cc: pop - IL_10d1: dup - IL_10d2: ldc.i4.0 - IL_10d3: add - IL_10d4: pop - IL_10d9: dup - IL_10da: ldc.i4.0 - IL_10db: shr - IL_10dc: pop - IL_10e1: dup - IL_10e2: ldc.i4.1 - IL_10e3: shl - IL_10e4: pop - IL_10e9: dup - IL_10ea: ldc.i4.0 - IL_10eb: shl - IL_10ec: pop - IL_10f1: dup - IL_10f2: ldc.i4.8 - IL_10f3: or - IL_10f4: pop - IL_10f9: dup - IL_10fa: ldc.i4.8 - IL_10fb: and - IL_10fc: pop - IL_1101: dup - IL_1102: ldc.i4.2 - IL_1103: xor - IL_1104: pop - IL_1109: dup - IL_110a: ldc.i4.0 - IL_110b: xor - IL_110c: pop - IL_1111: dup - IL_1112: ldc.i4.3 - IL_1113: shl - IL_1114: pop - IL_1119: dup - IL_111a: ldc.i4.8 - IL_111b: shl - IL_111c: pop - IL_1121: dup - IL_1122: ldc.i4.5 - IL_1123: and - IL_1124: pop - IL_1129: dup - IL_112a: ldc.i4.4 - IL_112b: shr - IL_112c: pop - IL_1131: dup - IL_1132: ldc.i4.7 - IL_1133: xor - IL_1134: pop - IL_1139: dup - IL_113a: ldc.i4.1 - IL_113b: or - IL_113c: pop - IL_1141: dup - IL_1142: ldc.i4.0 - IL_1143: shr - IL_1144: pop - IL_1149: dup - IL_114a: ldc.i4.3 - IL_114b: shl - IL_114c: pop - IL_1151: dup - IL_1152: ldc.i4.1 - IL_1153: xor - IL_1154: pop - IL_1159: dup - IL_115a: ldc.i4.4 - IL_115b: sub - IL_115c: pop - IL_1161: dup - IL_1162: ldc.i4.5 - IL_1163: shl - IL_1164: pop - IL_1169: dup - IL_116a: ldc.i4.5 - IL_116b: add - IL_116c: pop - IL_1171: dup - IL_1172: ldc.i4.6 - IL_1173: shr - IL_1174: pop - IL_1179: dup - IL_117a: ldc.i4.3 - IL_117b: shl - IL_117c: pop - IL_1181: dup - IL_1182: ldc.i4.2 - IL_1183: xor - IL_1184: pop - IL_1189: dup - IL_118a: ldc.i4.1 - IL_118b: shr - IL_118c: pop - IL_1191: dup - IL_1192: ldc.i4.1 - IL_1193: mul - IL_1194: pop - IL_1199: dup - IL_119a: ldc.i4.3 - IL_119b: sub - IL_119c: pop - IL_11a1: dup - IL_11a2: ldc.i4.5 - IL_11a3: mul - IL_11a4: pop - IL_11a9: dup - IL_11aa: ldc.i4.2 - IL_11ab: mul - IL_11ac: pop - IL_11b1: dup - IL_11b2: ldc.i4.5 - IL_11b3: mul - IL_11b4: pop - IL_11b9: dup - IL_11ba: ldc.i4.8 - IL_11bb: and - IL_11bc: pop - IL_11c1: dup - IL_11c2: ldc.i4.3 - IL_11c3: sub - IL_11c4: pop - IL_11c9: dup - IL_11ca: ldc.i4.4 - IL_11cb: mul - IL_11cc: pop - IL_11d1: dup - IL_11d2: ldc.i4.5 - IL_11d3: mul - IL_11d4: pop - IL_11d9: dup - IL_11da: ldc.i4.6 - IL_11db: or - IL_11dc: pop - IL_11e1: dup - IL_11e2: ldc.i4.8 - IL_11e3: and - IL_11e4: pop - IL_11e9: dup - IL_11ea: ldc.i4.7 - IL_11eb: or - IL_11ec: pop - IL_11f1: dup - IL_11f2: ldc.i4.8 - IL_11f3: or - IL_11f4: pop - IL_11f9: dup - IL_11fa: ldc.i4.7 - IL_11fb: and - IL_11fc: pop - IL_1201: dup - IL_1202: ldc.i4.3 - IL_1203: and - IL_1204: pop - IL_1209: dup - IL_120a: ldc.i4.3 - IL_120b: mul - IL_120c: pop - IL_1211: dup - IL_1212: ldc.i4.1 - IL_1213: shl - IL_1214: pop - IL_1219: dup - IL_121a: ldc.i4.6 - IL_121b: shr - IL_121c: pop - IL_1221: dup - IL_1222: ldc.i4.1 - IL_1223: sub - IL_1224: pop - IL_1229: dup - IL_122a: ldc.i4.8 - IL_122b: and - IL_122c: pop - IL_1231: dup - IL_1232: ldc.i4.1 - IL_1233: sub - IL_1234: pop - IL_1239: dup - IL_123a: ldc.i4.4 - IL_123b: sub - IL_123c: pop - IL_1241: dup - IL_1242: ldc.i4.5 - IL_1243: and - IL_1244: pop - IL_1249: dup - IL_124a: ldc.i4.5 - IL_124b: shl - IL_124c: pop - IL_1251: dup - IL_1252: ldc.i4.1 - IL_1253: add - IL_1254: pop - IL_1259: dup - IL_125a: ldc.i4.0 - IL_125b: or - IL_125c: pop - IL_1261: dup - IL_1262: ldc.i4.7 - IL_1263: mul - IL_1264: pop - IL_1269: dup - IL_126a: ldc.i4.6 - IL_126b: mul - IL_126c: pop - IL_1271: dup - IL_1272: ldc.i4.4 - IL_1273: shl - IL_1274: pop - IL_1279: dup - IL_127a: ldc.i4.2 - IL_127b: shr - IL_127c: pop - IL_1281: dup - IL_1282: ldc.i4.4 - IL_1283: xor - IL_1284: pop - IL_1289: dup - IL_128a: ldc.i4.8 - IL_128b: and - IL_128c: pop - IL_1291: dup - IL_1292: ldc.i4.8 - IL_1293: shl - IL_1294: pop - IL_1299: dup - IL_129a: ldc.i4.5 - IL_129b: and - IL_129c: pop - IL_12a1: dup - IL_12a2: ldc.i4.4 - IL_12a3: and - IL_12a4: pop - IL_12a9: dup - IL_12aa: ldc.i4.0 - IL_12ab: xor - IL_12ac: pop - IL_12b1: dup - IL_12b2: ldc.i4.3 - IL_12b3: and - IL_12b4: pop - IL_12b9: dup - IL_12ba: ldc.i4.6 - IL_12bb: shr - IL_12bc: pop - IL_12c1: dup - IL_12c2: ldc.i4.2 - IL_12c3: shl - IL_12c4: pop - IL_12c9: dup - IL_12ca: ldc.i4.2 - IL_12cb: sub - IL_12cc: pop - IL_12d1: dup - IL_12d2: ldc.i4.2 - IL_12d3: mul - IL_12d4: pop - IL_12d9: dup - IL_12da: ldc.i4.5 - IL_12db: mul - IL_12dc: pop - IL_12e1: dup - IL_12e2: ldc.i4.7 - IL_12e3: xor - IL_12e4: pop - IL_12e9: dup - IL_12ea: ldc.i4.4 - IL_12eb: or - IL_12ec: pop - IL_12f1: dup - IL_12f2: ldc.i4.7 - IL_12f3: xor - IL_12f4: pop - IL_12f9: dup - IL_12fa: ldc.i4.2 - IL_12fb: shr - IL_12fc: pop - IL_1301: dup - IL_1302: ldc.i4.8 - IL_1303: mul - IL_1304: pop - IL_1309: dup - IL_130a: ldc.i4.3 - IL_130b: shr - IL_130c: pop - IL_1311: dup - IL_1312: ldc.i4.1 - IL_1313: shr - IL_1314: pop - IL_1319: dup - IL_131a: ldc.i4.2 - IL_131b: add - IL_131c: pop - IL_1321: dup - IL_1322: ldc.i4.1 - IL_1323: and - IL_1324: pop - IL_1329: dup - IL_132a: ldc.i4.0 - IL_132b: xor - IL_132c: pop - IL_1331: dup - IL_1332: ldc.i4.0 - IL_1333: shl - IL_1334: pop - IL_1339: dup - IL_133a: ldc.i4.5 - IL_133b: add - IL_133c: pop - IL_1341: dup - IL_1342: ldc.i4.4 - IL_1343: add - IL_1344: pop - IL_1349: dup - IL_134a: ldc.i4.0 - IL_134b: or - IL_134c: pop - IL_1351: dup - IL_1352: ldc.i4.2 - IL_1353: or - IL_1354: pop - IL_1359: dup - IL_135a: ldc.i4.3 - IL_135b: sub - IL_135c: pop - IL_1361: dup - IL_1362: ldc.i4.7 - IL_1363: shr - IL_1364: pop - IL_1369: dup - IL_136a: ldc.i4.8 - IL_136b: shl - IL_136c: pop - IL_1371: dup - IL_1372: ldc.i4.0 - IL_1373: shr - IL_1374: pop - IL_1379: dup - IL_137a: ldc.i4.0 - IL_137b: add - IL_137c: pop - IL_1381: dup - IL_1382: ldc.i4.5 - IL_1383: xor - IL_1384: pop - IL_1389: dup - IL_138a: ldc.i4.4 - IL_138b: add - IL_138c: pop - IL_1391: dup - IL_1392: ldc.i4.3 - IL_1393: add - IL_1394: pop - IL_1399: dup - IL_139a: ldc.i4.4 - IL_139b: shl - IL_139c: pop - IL_13a1: dup - IL_13a2: ldc.i4.3 - IL_13a3: sub - IL_13a4: pop - IL_13a9: dup - IL_13aa: ldc.i4.0 - IL_13ab: xor - IL_13ac: pop - IL_13b1: dup - IL_13b2: ldc.i4.2 - IL_13b3: mul - IL_13b4: pop - IL_13b9: dup - IL_13ba: ldc.i4.2 - IL_13bb: mul - IL_13bc: pop - IL_13c1: dup - IL_13c2: ldc.i4.7 - IL_13c3: shl - IL_13c4: pop - IL_13c9: dup - IL_13ca: ldc.i4.3 - IL_13cb: and - IL_13cc: pop - IL_13d1: dup - IL_13d2: ldc.i4.3 - IL_13d3: mul - IL_13d4: pop - IL_13d9: dup - IL_13da: ldc.i4.3 - IL_13db: or - IL_13dc: pop - IL_13e1: dup - IL_13e2: ldc.i4.8 - IL_13e3: mul - IL_13e4: pop - IL_13e9: dup - IL_13ea: ldc.i4.8 - IL_13eb: shl - IL_13ec: pop - IL_13f1: dup - IL_13f2: ldc.i4.7 - IL_13f3: shr - IL_13f4: pop - IL_13f9: dup - IL_13fa: ldc.i4.8 - IL_13fb: xor - IL_13fc: pop - IL_1401: dup - IL_1402: ldc.i4.7 - IL_1403: or - IL_1404: pop - IL_1409: dup - IL_140a: ldc.i4.7 - IL_140b: shl - IL_140c: pop - IL_1411: dup - IL_1412: ldc.i4.0 - IL_1413: shl - IL_1414: pop - IL_1419: dup - IL_141a: ldc.i4.5 - IL_141b: xor - IL_141c: pop - IL_1421: dup - IL_1422: ldc.i4.4 - IL_1423: xor - IL_1424: pop - IL_1429: dup - IL_142a: ldc.i4.4 - IL_142b: add - IL_142c: pop - IL_1431: dup - IL_1432: ldc.i4.8 - IL_1433: and - IL_1434: pop - IL_1439: dup - IL_143a: ldc.i4.8 - IL_143b: xor - IL_143c: pop - IL_1441: dup - IL_1442: ldc.i4.4 - IL_1443: shr - IL_1444: pop - IL_1449: dup - IL_144a: ldc.i4.6 - IL_144b: shl - IL_144c: pop - IL_1451: dup - IL_1452: ldc.i4.2 - IL_1453: sub - IL_1454: pop - IL_1459: dup - IL_145a: ldc.i4.6 - IL_145b: sub - IL_145c: pop - IL_1461: dup - IL_1462: ldc.i4.8 - IL_1463: shl - IL_1464: pop - IL_1469: dup - IL_146a: ldc.i4.0 - IL_146b: sub - IL_146c: pop - IL_1471: dup - IL_1472: ldc.i4.1 - IL_1473: add - IL_1474: pop - IL_1479: dup - IL_147a: ldc.i4.7 - IL_147b: shr - IL_147c: pop - IL_1481: dup - IL_1482: ldc.i4.2 - IL_1483: shl - IL_1484: pop - IL_1489: dup - IL_148a: ldc.i4.6 - IL_148b: mul - IL_148c: pop - IL_1491: dup - IL_1492: ldc.i4.4 - IL_1493: shr - IL_1494: pop - IL_1499: dup - IL_149a: ldc.i4.2 - IL_149b: mul - IL_149c: pop - IL_14a1: dup - IL_14a2: ldc.i4.8 - IL_14a3: and - IL_14a4: pop - IL_14a9: dup - IL_14aa: ldc.i4.2 - IL_14ab: or - IL_14ac: pop - IL_14b1: dup - IL_14b2: ldc.i4.7 - IL_14b3: xor - IL_14b4: pop - IL_14b9: dup - IL_14ba: ldc.i4.0 - IL_14bb: sub - IL_14bc: pop - IL_14c1: dup - IL_14c2: ldc.i4.3 - IL_14c3: xor - IL_14c4: pop - IL_14c9: dup - IL_14ca: ldc.i4.0 - IL_14cb: add - IL_14cc: pop - IL_14d1: dup - IL_14d2: ldc.i4.8 - IL_14d3: xor - IL_14d4: pop - IL_14d9: dup - IL_14da: ldc.i4.1 - IL_14db: shl - IL_14dc: pop - IL_14e1: dup - IL_14e2: ldc.i4.1 - IL_14e3: shl - IL_14e4: pop - IL_14e9: dup - IL_14ea: ldc.i4.5 - IL_14eb: xor - IL_14ec: pop - IL_14f1: dup - IL_14f2: ldc.i4.4 - IL_14f3: xor - IL_14f4: pop - IL_14f9: dup - IL_14fa: ldc.i4.2 - IL_14fb: shl - IL_14fc: pop - IL_1501: dup - IL_1502: ldc.i4.5 - IL_1503: and - IL_1504: pop - IL_1509: dup - IL_150a: ldc.i4.6 - IL_150b: mul - IL_150c: pop - IL_1511: dup - IL_1512: ldc.i4.1 - IL_1513: shl - IL_1514: pop - IL_1519: dup - IL_151a: ldc.i4.0 - IL_151b: and - IL_151c: pop - IL_1521: dup - IL_1522: ldc.i4.3 - IL_1523: xor - IL_1524: pop - IL_1529: dup - IL_152a: ldc.i4.5 - IL_152b: xor - IL_152c: pop - IL_1531: dup - IL_1532: ldc.i4.0 - IL_1533: and - IL_1534: pop - IL_1539: dup - IL_153a: ldc.i4.3 - IL_153b: shl - IL_153c: pop - IL_1541: dup - IL_1542: ldc.i4.5 - IL_1543: or - IL_1544: pop - IL_1549: dup - IL_154a: ldc.i4.6 - IL_154b: shr - IL_154c: pop - IL_1551: dup - IL_1552: ldc.i4.8 - IL_1553: shr - IL_1554: pop - IL_1559: dup - IL_155a: ldc.i4.7 - IL_155b: and - IL_155c: pop - IL_1561: dup - IL_1562: ldc.i4.3 - IL_1563: sub - IL_1564: pop - IL_1569: dup - IL_156a: ldc.i4.0 - IL_156b: and - IL_156c: pop - IL_1571: dup - IL_1572: ldc.i4.8 - IL_1573: and - IL_1574: pop - IL_1579: dup - IL_157a: ldc.i4.6 - IL_157b: xor - IL_157c: pop - IL_1581: dup - IL_1582: ldc.i4.4 - IL_1583: shr - IL_1584: pop - IL_1589: dup - IL_158a: ldc.i4.2 - IL_158b: add - IL_158c: pop - IL_1591: dup - IL_1592: ldc.i4.5 - IL_1593: shr - IL_1594: pop - IL_1599: dup - IL_159a: ldc.i4.8 - IL_159b: shr - IL_159c: pop - IL_15a1: dup - IL_15a2: ldc.i4.3 - IL_15a3: sub - IL_15a4: pop - IL_15a9: dup - IL_15aa: ldc.i4.6 - IL_15ab: xor - IL_15ac: pop - IL_15b1: dup - IL_15b2: ldc.i4.7 - IL_15b3: shr - IL_15b4: pop - IL_15b9: dup - IL_15ba: ldc.i4.4 - IL_15bb: mul - IL_15bc: pop - IL_15c1: dup - IL_15c2: ldc.i4.2 - IL_15c3: add - IL_15c4: pop - IL_15c9: dup - IL_15ca: ldc.i4.8 - IL_15cb: shr - IL_15cc: pop - IL_15d1: dup - IL_15d2: ldc.i4.6 - IL_15d3: shl - IL_15d4: pop - IL_15d9: dup - IL_15da: ldc.i4.4 - IL_15db: or - IL_15dc: pop - IL_15e1: dup - IL_15e2: ldc.i4.0 - IL_15e3: or - IL_15e4: pop - IL_15e9: dup - IL_15ea: ldc.i4.7 - IL_15eb: or - IL_15ec: pop - IL_15f1: dup - IL_15f2: ldc.i4.4 - IL_15f3: sub - IL_15f4: pop - IL_15f9: dup - IL_15fa: ldc.i4.7 - IL_15fb: shr - IL_15fc: pop - IL_1601: dup - IL_1602: ldc.i4.6 - IL_1603: sub - IL_1604: pop - IL_1609: dup - IL_160a: ldc.i4.8 - IL_160b: mul - IL_160c: pop - IL_1611: dup - IL_1612: ldc.i4.5 - IL_1613: mul - IL_1614: pop - IL_1619: dup - IL_161a: ldc.i4.7 - IL_161b: and - IL_161c: pop - IL_1621: dup - IL_1622: ldc.i4.8 - IL_1623: add - IL_1624: pop - IL_1629: dup - IL_162a: ldc.i4.3 - IL_162b: and - IL_162c: pop - IL_1631: dup - IL_1632: ldc.i4.8 - IL_1633: xor - IL_1634: pop - IL_1639: dup - IL_163a: ldc.i4.8 - IL_163b: shr - IL_163c: pop - IL_1641: dup - IL_1642: ldc.i4.5 - IL_1643: shr - IL_1644: pop - IL_1649: dup - IL_164a: ldc.i4.5 - IL_164b: and - IL_164c: pop - IL_1651: dup - IL_1652: ldc.i4.7 - IL_1653: add - IL_1654: pop - IL_1659: dup - IL_165a: ldc.i4.6 - IL_165b: or - IL_165c: pop - IL_1661: dup - IL_1662: ldc.i4.1 - IL_1663: mul - IL_1664: pop - IL_1669: dup - IL_166a: ldc.i4.0 - IL_166b: shr - IL_166c: pop - IL_1671: dup - IL_1672: ldc.i4.7 - IL_1673: or - IL_1674: pop - IL_1679: dup - IL_167a: ldc.i4.1 - IL_167b: sub - IL_167c: pop - IL_1681: dup - IL_1682: ldc.i4.3 - IL_1683: add - IL_1684: pop - IL_1689: dup - IL_168a: ldc.i4.5 - IL_168b: shr - IL_168c: pop - IL_1691: dup - IL_1692: ldc.i4.6 - IL_1693: mul - IL_1694: pop - IL_1699: dup - IL_169a: ldc.i4.7 - IL_169b: or - IL_169c: pop - IL_16a1: dup - IL_16a2: ldc.i4.2 - IL_16a3: add - IL_16a4: pop - IL_16a9: dup - IL_16aa: ldc.i4.6 - IL_16ab: shr - IL_16ac: pop - IL_16b1: dup - IL_16b2: ldc.i4.1 - IL_16b3: and - IL_16b4: pop - IL_16b9: dup - IL_16ba: ldc.i4.0 - IL_16bb: shr - IL_16bc: pop - IL_16c1: dup - IL_16c2: ldc.i4.8 - IL_16c3: sub - IL_16c4: pop - IL_16c9: dup - IL_16ca: ldc.i4.3 - IL_16cb: and - IL_16cc: pop - IL_16d1: dup - IL_16d2: ldc.i4.4 - IL_16d3: or - IL_16d4: pop - IL_16d9: dup - IL_16da: ldc.i4.7 - IL_16db: shr - IL_16dc: pop - IL_16e1: dup - IL_16e2: ldc.i4.3 - IL_16e3: or - IL_16e4: pop - IL_16e9: dup - IL_16ea: ldc.i4.0 - IL_16eb: mul - IL_16ec: pop - IL_16f1: dup - IL_16f2: ldc.i4.3 - IL_16f3: sub - IL_16f4: pop - IL_16f9: dup - IL_16fa: ldc.i4.0 - IL_16fb: or - IL_16fc: pop - IL_1701: dup - IL_1702: ldc.i4.7 - IL_1703: sub - IL_1704: pop - IL_1709: dup - IL_170a: ldc.i4.3 - IL_170b: or - IL_170c: pop - IL_1711: dup - IL_1712: ldc.i4.6 - IL_1713: mul - IL_1714: pop - IL_1719: dup - IL_171a: ldc.i4.8 - IL_171b: mul - IL_171c: pop - IL_1721: dup - IL_1722: ldc.i4.8 - IL_1723: shr - IL_1724: pop - IL_1729: dup - IL_172a: ldc.i4.5 - IL_172b: and - IL_172c: pop - IL_1731: dup - IL_1732: ldc.i4.3 - IL_1733: add - IL_1734: pop - IL_1739: dup - IL_173a: ldc.i4.6 - IL_173b: xor - IL_173c: pop - IL_1741: dup - IL_1742: ldc.i4.2 - IL_1743: mul - IL_1744: pop - IL_1749: dup - IL_174a: ldc.i4.6 - IL_174b: shr - IL_174c: pop - IL_1751: dup - IL_1752: ldc.i4.5 - IL_1753: mul - IL_1754: pop - IL_1759: dup - IL_175a: ldc.i4.5 - IL_175b: mul - IL_175c: pop - IL_1761: dup - IL_1762: ldc.i4.1 - IL_1763: or - IL_1764: pop - IL_1769: dup - IL_176a: ldc.i4.1 - IL_176b: and - IL_176c: pop - IL_1771: dup - IL_1772: ldc.i4.1 - IL_1773: xor - IL_1774: pop - IL_1779: dup - IL_177a: ldc.i4.5 - IL_177b: add - IL_177c: pop - IL_1781: dup - IL_1782: ldc.i4.8 - IL_1783: and - IL_1784: pop - IL_1789: dup - IL_178a: ldc.i4.7 - IL_178b: add - IL_178c: pop - IL_1791: dup - IL_1792: ldc.i4.3 - IL_1793: add - IL_1794: pop - IL_1799: dup - IL_179a: ldc.i4.8 - IL_179b: shr - IL_179c: pop - IL_17a1: dup - IL_17a2: ldc.i4.1 - IL_17a3: or - IL_17a4: pop - IL_17a9: dup - IL_17aa: ldc.i4.8 - IL_17ab: and - IL_17ac: pop - IL_17b1: dup - IL_17b2: ldc.i4.3 - IL_17b3: or - IL_17b4: pop - IL_17b9: dup - IL_17ba: ldc.i4.2 - IL_17bb: mul - IL_17bc: pop - IL_17c1: dup - IL_17c2: ldc.i4.2 - IL_17c3: shr - IL_17c4: pop - IL_17c9: dup - IL_17ca: ldc.i4.0 - IL_17cb: or - IL_17cc: pop - IL_17d1: dup - IL_17d2: ldc.i4.4 - IL_17d3: xor - IL_17d4: pop - IL_17d9: dup - IL_17da: ldc.i4.2 - IL_17db: xor - IL_17dc: pop - IL_17e1: dup - IL_17e2: ldc.i4.4 - IL_17e3: add - IL_17e4: pop - IL_17e9: dup - IL_17ea: ldc.i4.7 - IL_17eb: shr - IL_17ec: pop - IL_17f1: dup - IL_17f2: ldc.i4.1 - IL_17f3: sub - IL_17f4: pop - IL_17f9: dup - IL_17fa: ldc.i4.1 - IL_17fb: xor - IL_17fc: pop - IL_1801: dup - IL_1802: ldc.i4.1 - IL_1803: shl - IL_1804: pop - IL_1809: dup - IL_180a: ldc.i4.7 - IL_180b: shr - IL_180c: pop - IL_1811: dup - IL_1812: ldc.i4.2 - IL_1813: shr - IL_1814: pop - IL_1819: dup - IL_181a: ldc.i4.0 - IL_181b: sub - IL_181c: pop - IL_1821: dup - IL_1822: ldc.i4.3 - IL_1823: add - IL_1824: pop - IL_1829: dup - IL_182a: ldc.i4.4 - IL_182b: shr - IL_182c: pop - IL_1831: dup - IL_1832: ldc.i4.3 - IL_1833: and - IL_1834: pop - IL_1839: dup - IL_183a: ldc.i4.0 - IL_183b: sub - IL_183c: pop - IL_1841: dup - IL_1842: ldc.i4.6 - IL_1843: and - IL_1844: pop - IL_1849: dup - IL_184a: ldc.i4.5 - IL_184b: shl - IL_184c: pop - IL_1851: dup - IL_1852: ldc.i4.3 - IL_1853: shl - IL_1854: pop - IL_1859: dup - IL_185a: ldc.i4.5 - IL_185b: shl - IL_185c: pop - IL_1861: dup - IL_1862: ldc.i4.4 - IL_1863: mul - IL_1864: pop - IL_1869: dup - IL_186a: ldc.i4.4 - IL_186b: mul - IL_186c: pop - IL_1871: dup - IL_1872: ldc.i4.1 - IL_1873: sub - IL_1874: pop - IL_1879: dup - IL_187a: ldc.i4.4 - IL_187b: add - IL_187c: pop - IL_1881: dup - IL_1882: ldc.i4.7 - IL_1883: xor - IL_1884: pop - IL_1889: dup - IL_188a: ldc.i4.6 - IL_188b: and - IL_188c: pop - IL_1891: dup - IL_1892: ldc.i4.1 - IL_1893: shr - IL_1894: pop - IL_1899: dup - IL_189a: ldc.i4.0 - IL_189b: shl - IL_189c: pop - IL_18a1: dup - IL_18a2: ldc.i4.5 - IL_18a3: and - IL_18a4: pop - IL_18a9: dup - IL_18aa: ldc.i4.5 - IL_18ab: mul - IL_18ac: pop - IL_18b1: dup - IL_18b2: ldc.i4.7 - IL_18b3: shl - IL_18b4: pop - IL_18b9: dup - IL_18ba: ldc.i4.1 - IL_18bb: shr - IL_18bc: pop - IL_18c1: dup - IL_18c2: ldc.i4.0 - IL_18c3: shr - IL_18c4: pop - IL_18c9: dup - IL_18ca: ldc.i4.0 - IL_18cb: mul - IL_18cc: pop - IL_18d1: dup - IL_18d2: ldc.i4.5 - IL_18d3: shr - IL_18d4: pop - IL_18d9: dup - IL_18da: ldc.i4.0 - IL_18db: shl - IL_18dc: pop - IL_18e1: dup - IL_18e2: ldc.i4.8 - IL_18e3: mul - IL_18e4: pop - IL_18e9: dup - IL_18ea: ldc.i4.1 - IL_18eb: or - IL_18ec: pop - IL_18f1: dup - IL_18f2: ldc.i4.1 - IL_18f3: and - IL_18f4: pop - IL_18f9: dup - IL_18fa: ldc.i4.0 - IL_18fb: sub - IL_18fc: pop - IL_1901: dup - IL_1902: ldc.i4.5 - IL_1903: shl - IL_1904: pop - IL_1909: dup - IL_190a: ldc.i4.8 - IL_190b: or - IL_190c: pop - IL_1911: dup - IL_1912: ldc.i4.1 - IL_1913: sub - IL_1914: pop - IL_1919: dup - IL_191a: ldc.i4.0 - IL_191b: add - IL_191c: pop - IL_1921: dup - IL_1922: ldc.i4.6 - IL_1923: add - IL_1924: pop - IL_1929: dup - IL_192a: ldc.i4.8 - IL_192b: shl - IL_192c: pop - IL_1931: dup - IL_1932: ldc.i4.0 - IL_1933: mul - IL_1934: pop - IL_1939: dup - IL_193a: ldc.i4.6 - IL_193b: and - IL_193c: pop - IL_1941: dup - IL_1942: ldc.i4.2 - IL_1943: and - IL_1944: pop - IL_1949: dup - IL_194a: ldc.i4.1 - IL_194b: shl - IL_194c: pop - IL_1951: dup - IL_1952: ldc.i4.1 - IL_1953: sub - IL_1954: pop - IL_1959: dup - IL_195a: ldc.i4.3 - IL_195b: add - IL_195c: pop - IL_1961: dup - IL_1962: ldc.i4.3 - IL_1963: add - IL_1964: pop - IL_1969: dup - IL_196a: ldc.i4.7 - IL_196b: and - IL_196c: pop - IL_1971: dup - IL_1972: ldc.i4.4 - IL_1973: sub - IL_1974: pop - IL_1979: dup - IL_197a: ldc.i4.3 - IL_197b: and - IL_197c: pop - IL_1981: dup - IL_1982: ldc.i4.7 - IL_1983: mul - IL_1984: pop - IL_1989: dup - IL_198a: ldc.i4.6 - IL_198b: mul - IL_198c: pop - IL_1991: dup - IL_1992: ldc.i4.6 - IL_1993: sub - IL_1994: pop - IL_1999: dup - IL_199a: ldc.i4.5 - IL_199b: and - IL_199c: pop - IL_19a1: dup - IL_19a2: ldc.i4.5 - IL_19a3: or - IL_19a4: pop - IL_19a9: dup - IL_19aa: ldc.i4.4 - IL_19ab: shl - IL_19ac: pop - IL_19b1: dup - IL_19b2: ldc.i4.6 - IL_19b3: shl - IL_19b4: pop - IL_19b9: dup - IL_19ba: ldc.i4.5 - IL_19bb: shr - IL_19bc: pop - IL_19c1: dup - IL_19c2: ldc.i4.5 - IL_19c3: mul - IL_19c4: pop - IL_19c9: dup - IL_19ca: ldc.i4.6 - IL_19cb: mul - IL_19cc: pop - IL_19d1: dup - IL_19d2: ldc.i4.5 - IL_19d3: xor - IL_19d4: pop - IL_19d9: dup - IL_19da: ldc.i4.0 - IL_19db: xor - IL_19dc: pop - IL_19e1: dup - IL_19e2: ldc.i4.0 - IL_19e3: and - IL_19e4: pop - IL_19e9: dup - IL_19ea: ldc.i4.4 - IL_19eb: add - IL_19ec: pop - IL_19f1: dup - IL_19f2: ldc.i4.3 - IL_19f3: sub - IL_19f4: pop - IL_19f9: dup - IL_19fa: ldc.i4.5 - IL_19fb: shl - IL_19fc: pop - IL_1a01: dup - IL_1a02: ldc.i4.5 - IL_1a03: add - IL_1a04: pop - IL_1a09: dup - IL_1a0a: ldc.i4.6 - IL_1a0b: shr - IL_1a0c: pop - IL_1a11: dup - IL_1a12: ldc.i4.4 - IL_1a13: mul - IL_1a14: pop - IL_1a19: dup - IL_1a1a: ldc.i4.1 - IL_1a1b: add - IL_1a1c: pop - IL_1a21: dup - IL_1a22: ldc.i4.2 - IL_1a23: mul - IL_1a24: pop - IL_1a29: dup - IL_1a2a: ldc.i4.0 - IL_1a2b: mul - IL_1a2c: pop - IL_1a31: dup - IL_1a32: ldc.i4.6 - IL_1a33: or - IL_1a34: pop - IL_1a39: dup - IL_1a3a: ldc.i4.3 - IL_1a3b: or - IL_1a3c: pop - IL_1a41: dup - IL_1a42: ldc.i4.4 - IL_1a43: sub - IL_1a44: pop - IL_1a49: dup - IL_1a4a: ldc.i4.2 - IL_1a4b: sub - IL_1a4c: pop - IL_1a51: dup - IL_1a52: ldc.i4.4 - IL_1a53: sub - IL_1a54: pop - IL_1a59: dup - IL_1a5a: ldc.i4.1 - IL_1a5b: mul - IL_1a5c: pop - IL_1a61: dup - IL_1a62: ldc.i4.2 - IL_1a63: mul - IL_1a64: pop - IL_1a69: dup - IL_1a6a: ldc.i4.2 - IL_1a6b: or - IL_1a6c: pop - IL_1a71: dup - IL_1a72: ldc.i4.6 - IL_1a73: shl - IL_1a74: pop - IL_1a79: dup - IL_1a7a: ldc.i4.3 - IL_1a7b: xor - IL_1a7c: pop - IL_1a81: dup - IL_1a82: ldc.i4.2 - IL_1a83: or - IL_1a84: pop - IL_1a89: dup - IL_1a8a: ldc.i4.7 - IL_1a8b: shr - IL_1a8c: pop - IL_1a91: dup - IL_1a92: ldc.i4.6 - IL_1a93: or - IL_1a94: pop - IL_1a99: dup - IL_1a9a: ldc.i4.1 - IL_1a9b: sub - IL_1a9c: pop - IL_1aa1: dup - IL_1aa2: ldc.i4.1 - IL_1aa3: shr - IL_1aa4: pop - IL_1aa9: dup - IL_1aaa: ldc.i4.8 - IL_1aab: mul - IL_1aac: pop - IL_1ab1: dup - IL_1ab2: ldc.i4.4 - IL_1ab3: and - IL_1ab4: pop - IL_1ab9: dup - IL_1aba: ldc.i4.6 - IL_1abb: sub - IL_1abc: pop - IL_1ac1: dup - IL_1ac2: ldc.i4.3 - IL_1ac3: shl - IL_1ac4: pop - IL_1ac9: dup - IL_1aca: ldc.i4.4 - IL_1acb: mul - IL_1acc: pop - IL_1ad1: dup - IL_1ad2: ldc.i4.8 - IL_1ad3: xor - IL_1ad4: pop - IL_1ad9: dup - IL_1ada: ldc.i4.0 - IL_1adb: shl - IL_1adc: pop - IL_1ae1: dup - IL_1ae2: ldc.i4.7 - IL_1ae3: xor - IL_1ae4: pop - IL_1ae9: dup - IL_1aea: ldc.i4.3 - IL_1aeb: sub - IL_1aec: pop - IL_1af1: dup - IL_1af2: ldc.i4.0 - IL_1af3: sub - IL_1af4: pop - IL_1af9: dup - IL_1afa: ldc.i4.2 - IL_1afb: and - IL_1afc: pop - IL_1b01: dup - IL_1b02: ldc.i4.8 - IL_1b03: shl - IL_1b04: pop - IL_1b09: dup - IL_1b0a: ldc.i4.8 - IL_1b0b: shr - IL_1b0c: pop - IL_1b11: dup - IL_1b12: ldc.i4.0 - IL_1b13: shr - IL_1b14: pop - IL_1b19: dup - IL_1b1a: ldc.i4.1 - IL_1b1b: shr - IL_1b1c: pop - IL_1b21: dup - IL_1b22: ldc.i4.8 - IL_1b23: add - IL_1b24: pop - IL_1b29: dup - IL_1b2a: ldc.i4.0 - IL_1b2b: and - IL_1b2c: pop - IL_1b31: dup - IL_1b32: ldc.i4.1 - IL_1b33: or - IL_1b34: pop - IL_1b39: dup - IL_1b3a: ldc.i4.7 - IL_1b3b: xor - IL_1b3c: pop - IL_1b41: dup - IL_1b42: ldc.i4.5 - IL_1b43: sub - IL_1b44: pop - IL_1b49: dup - IL_1b4a: ldc.i4.4 - IL_1b4b: sub - IL_1b4c: pop - IL_1b51: dup - IL_1b52: ldc.i4.0 - IL_1b53: sub - IL_1b54: pop - IL_1b59: dup - IL_1b5a: ldc.i4.3 - IL_1b5b: and - IL_1b5c: pop - IL_1b61: dup - IL_1b62: ldc.i4.8 - IL_1b63: mul - IL_1b64: pop - IL_1b69: dup - IL_1b6a: ldc.i4.7 - IL_1b6b: mul - IL_1b6c: pop - IL_1b71: dup - IL_1b72: ldc.i4.4 - IL_1b73: or - IL_1b74: pop - IL_1b79: dup - IL_1b7a: ldc.i4.1 - IL_1b7b: or - IL_1b7c: pop - IL_1b81: dup - IL_1b82: ldc.i4.3 - IL_1b83: sub - IL_1b84: pop - IL_1b89: dup - IL_1b8a: ldc.i4.3 - IL_1b8b: and - IL_1b8c: pop - IL_1b91: dup - IL_1b92: ldc.i4.7 - IL_1b93: or - IL_1b94: pop - IL_1b99: dup - IL_1b9a: ldc.i4.0 - IL_1b9b: and - IL_1b9c: pop - IL_1ba1: dup - IL_1ba2: ldc.i4.3 - IL_1ba3: and - IL_1ba4: pop - IL_1ba9: dup - IL_1baa: ldc.i4.2 - IL_1bab: or - IL_1bac: pop - IL_1bb1: dup - IL_1bb2: ldc.i4.3 - IL_1bb3: sub - IL_1bb4: pop - IL_1bb9: dup - IL_1bba: ldc.i4.3 - IL_1bbb: or - IL_1bbc: pop - IL_1bc1: dup - IL_1bc2: ldc.i4.5 - IL_1bc3: or - IL_1bc4: pop - IL_1bc9: dup - IL_1bca: ldc.i4.5 - IL_1bcb: or - IL_1bcc: pop - IL_1bd1: dup - IL_1bd2: ldc.i4.6 - IL_1bd3: add - IL_1bd4: pop - IL_1bd9: dup - IL_1bda: ldc.i4.7 - IL_1bdb: and - IL_1bdc: pop - IL_1be1: dup - IL_1be2: ldc.i4.1 - IL_1be3: sub - IL_1be4: pop - IL_1be9: dup - IL_1bea: ldc.i4.7 - IL_1beb: shr - IL_1bec: pop - IL_1bf1: dup - IL_1bf2: ldc.i4.7 - IL_1bf3: and - IL_1bf4: pop - IL_1bf9: dup - IL_1bfa: ldc.i4.1 - IL_1bfb: add - IL_1bfc: pop - IL_1c01: dup - IL_1c02: ldc.i4.7 - IL_1c03: add - IL_1c04: pop - IL_1c09: dup - IL_1c0a: ldc.i4.4 - IL_1c0b: or - IL_1c0c: pop - IL_1c11: dup - IL_1c12: ldc.i4.5 - IL_1c13: add - IL_1c14: pop - IL_1c19: dup - IL_1c1a: ldc.i4.6 - IL_1c1b: shr - IL_1c1c: pop - IL_1c21: dup - IL_1c22: ldc.i4.0 - IL_1c23: shr - IL_1c24: pop - IL_1c29: dup - IL_1c2a: ldc.i4.6 - IL_1c2b: sub - IL_1c2c: pop - IL_1c31: dup - IL_1c32: ldc.i4.7 - IL_1c33: shl - IL_1c34: pop - IL_1c39: dup - IL_1c3a: ldc.i4.3 - IL_1c3b: and - IL_1c3c: pop - IL_1c41: dup - IL_1c42: ldc.i4.8 - IL_1c43: or - IL_1c44: pop - IL_1c49: dup - IL_1c4a: ldc.i4.6 - IL_1c4b: shl - IL_1c4c: pop - IL_1c51: dup - IL_1c52: ldc.i4.3 - IL_1c53: sub - IL_1c54: pop - IL_1c59: dup - IL_1c5a: ldc.i4.1 - IL_1c5b: mul - IL_1c5c: pop - IL_1c61: dup - IL_1c62: ldc.i4.3 - IL_1c63: shl - IL_1c64: pop - IL_1c69: dup - IL_1c6a: ldc.i4.5 - IL_1c6b: shr - IL_1c6c: pop - IL_1c71: dup - IL_1c72: ldc.i4.1 - IL_1c73: xor - IL_1c74: pop - IL_1c79: dup - IL_1c7a: ldc.i4.8 - IL_1c7b: shl - IL_1c7c: pop - IL_1c81: dup - IL_1c82: ldc.i4.6 - IL_1c83: mul - IL_1c84: pop - IL_1c89: dup - IL_1c8a: ldc.i4.0 - IL_1c8b: mul - IL_1c8c: pop - IL_1c91: dup - IL_1c92: ldc.i4.6 - IL_1c93: xor - IL_1c94: pop - IL_1c99: dup - IL_1c9a: ldc.i4.2 - IL_1c9b: shl - IL_1c9c: pop - IL_1ca1: dup - IL_1ca2: ldc.i4.2 - IL_1ca3: or - IL_1ca4: pop - IL_1ca9: dup - IL_1caa: ldc.i4.8 - IL_1cab: add - IL_1cac: pop - IL_1cb1: dup - IL_1cb2: ldc.i4.3 - IL_1cb3: shr - IL_1cb4: pop - IL_1cb9: dup - IL_1cba: ldc.i4.8 - IL_1cbb: shr - IL_1cbc: pop - IL_1cc1: dup - IL_1cc2: ldc.i4.6 - IL_1cc3: add - IL_1cc4: pop - IL_1cc9: dup - IL_1cca: ldc.i4.6 - IL_1ccb: or - IL_1ccc: pop - IL_1cd1: dup - IL_1cd2: ldc.i4.1 - IL_1cd3: shl - IL_1cd4: pop - IL_1cd9: dup - IL_1cda: ldc.i4.5 - IL_1cdb: shl - IL_1cdc: pop - IL_1ce1: dup - IL_1ce2: ldc.i4.8 - IL_1ce3: sub - IL_1ce4: pop - IL_1ce9: dup - IL_1cea: ldc.i4.4 - IL_1ceb: or - IL_1cec: pop - IL_1cf1: dup - IL_1cf2: ldc.i4.3 - IL_1cf3: add - IL_1cf4: pop - IL_1cf9: dup - IL_1cfa: ldc.i4.4 - IL_1cfb: shl - IL_1cfc: pop - IL_1d01: dup - IL_1d02: ldc.i4.6 - IL_1d03: add - IL_1d04: pop - IL_1d09: dup - IL_1d0a: ldc.i4.4 - IL_1d0b: shl - IL_1d0c: pop - IL_1d11: dup - IL_1d12: ldc.i4.4 - IL_1d13: add - IL_1d14: pop - IL_1d19: dup - IL_1d1a: ldc.i4.1 - IL_1d1b: shl - IL_1d1c: pop - IL_1d21: dup - IL_1d22: ldc.i4.5 - IL_1d23: sub - IL_1d24: pop - IL_1d29: dup - IL_1d2a: ldc.i4.3 - IL_1d2b: shl - IL_1d2c: pop - IL_1d31: dup - IL_1d32: ldc.i4.3 - IL_1d33: sub - IL_1d34: pop - IL_1d39: dup - IL_1d3a: ldc.i4.7 - IL_1d3b: and - IL_1d3c: pop - IL_1d41: dup - IL_1d42: ldc.i4.6 - IL_1d43: or - IL_1d44: pop - IL_1d49: dup - IL_1d4a: ldc.i4.8 - IL_1d4b: add - IL_1d4c: pop - IL_1d51: dup - IL_1d52: ldc.i4.6 - IL_1d53: add - IL_1d54: pop - IL_1d59: dup - IL_1d5a: ldc.i4.4 - IL_1d5b: add - IL_1d5c: pop - IL_1d61: dup - IL_1d62: ldc.i4.5 - IL_1d63: xor - IL_1d64: pop - IL_1d69: dup - IL_1d6a: ldc.i4.3 - IL_1d6b: xor - IL_1d6c: pop - IL_1d71: dup - IL_1d72: ldc.i4.8 - IL_1d73: mul - IL_1d74: pop - IL_1d79: dup - IL_1d7a: ldc.i4.0 - IL_1d7b: sub - IL_1d7c: pop - IL_1d81: dup - IL_1d82: ldc.i4.2 - IL_1d83: mul - IL_1d84: pop - IL_1d89: dup - IL_1d8a: ldc.i4.2 - IL_1d8b: mul - IL_1d8c: pop - IL_1d91: dup - IL_1d92: ldc.i4.1 - IL_1d93: mul - IL_1d94: pop - IL_1d99: dup - IL_1d9a: ldc.i4.1 - IL_1d9b: shr - IL_1d9c: pop - IL_1da1: dup - IL_1da2: ldc.i4.8 - IL_1da3: sub - IL_1da4: pop - IL_1da9: dup - IL_1daa: ldc.i4.2 - IL_1dab: or - IL_1dac: pop - IL_1db1: dup - IL_1db2: ldc.i4.2 - IL_1db3: sub - IL_1db4: pop - IL_1db9: dup - IL_1dba: ldc.i4.2 - IL_1dbb: and - IL_1dbc: pop - IL_1dc1: dup - IL_1dc2: ldc.i4.3 - IL_1dc3: shr - IL_1dc4: pop - IL_1dc9: dup - IL_1dca: ldc.i4.2 - IL_1dcb: xor - IL_1dcc: pop - IL_1dd1: dup - IL_1dd2: ldc.i4.0 - IL_1dd3: xor - IL_1dd4: pop - IL_1dd9: dup - IL_1dda: ldc.i4.7 - IL_1ddb: shr - IL_1ddc: pop - IL_1de1: dup - IL_1de2: ldc.i4.5 - IL_1de3: mul - IL_1de4: pop - IL_1de9: dup - IL_1dea: ldc.i4.8 - IL_1deb: add - IL_1dec: pop - IL_1df1: dup - IL_1df2: ldc.i4.5 - IL_1df3: shr - IL_1df4: pop - IL_1df9: dup - IL_1dfa: ldc.i4.5 - IL_1dfb: mul - IL_1dfc: pop - IL_1e01: dup - IL_1e02: ldc.i4.1 - IL_1e03: sub - IL_1e04: pop - IL_1e09: dup - IL_1e0a: ldc.i4.1 - IL_1e0b: add - IL_1e0c: pop - IL_1e11: dup - IL_1e12: ldc.i4.8 - IL_1e13: shl - IL_1e14: pop - IL_1e19: dup - IL_1e1a: ldc.i4.5 - IL_1e1b: xor - IL_1e1c: pop - IL_1e21: dup - IL_1e22: ldc.i4.7 - IL_1e23: mul - IL_1e24: pop - IL_1e29: dup - IL_1e2a: ldc.i4.1 - IL_1e2b: shr - IL_1e2c: pop - IL_1e31: dup - IL_1e32: ldc.i4.7 - IL_1e33: shl - IL_1e34: pop - IL_1e39: dup - IL_1e3a: ldc.i4.7 - IL_1e3b: xor - IL_1e3c: pop - IL_1e41: dup - IL_1e42: ldc.i4.1 - IL_1e43: shr - IL_1e44: pop - IL_1e49: dup - IL_1e4a: ldc.i4.1 - IL_1e4b: mul - IL_1e4c: pop - IL_1e51: dup - IL_1e52: ldc.i4.0 - IL_1e53: shr - IL_1e54: pop - IL_1e59: dup - IL_1e5a: ldc.i4.1 - IL_1e5b: or - IL_1e5c: pop - IL_1e61: dup - IL_1e62: ldc.i4.3 - IL_1e63: shl - IL_1e64: pop - IL_1e69: dup - IL_1e6a: ldc.i4.5 - IL_1e6b: and - IL_1e6c: pop - IL_1e71: dup - IL_1e72: ldc.i4.2 - IL_1e73: sub - IL_1e74: pop - IL_1e79: dup - IL_1e7a: ldc.i4.0 - IL_1e7b: mul - IL_1e7c: pop - IL_1e81: dup - IL_1e82: ldc.i4.4 - IL_1e83: or - IL_1e84: pop - IL_1e89: dup - IL_1e8a: ldc.i4.6 - IL_1e8b: sub - IL_1e8c: pop - IL_1e91: dup - IL_1e92: ldc.i4.8 - IL_1e93: sub - IL_1e94: pop - IL_1e99: dup - IL_1e9a: ldc.i4.7 - IL_1e9b: and - IL_1e9c: pop - IL_1ea1: dup - IL_1ea2: ldc.i4.0 - IL_1ea3: and - IL_1ea4: pop - IL_1ea9: dup - IL_1eaa: ldc.i4.5 - IL_1eab: and - IL_1eac: pop - IL_1eb1: dup - IL_1eb2: ldc.i4.2 - IL_1eb3: sub - IL_1eb4: pop - IL_1eb9: dup - IL_1eba: ldc.i4.7 - IL_1ebb: add - IL_1ebc: pop - IL_1ec1: dup - IL_1ec2: ldc.i4.4 - IL_1ec3: shl - IL_1ec4: pop - IL_1ec9: dup - IL_1eca: ldc.i4.7 - IL_1ecb: add - IL_1ecc: pop - IL_1ed1: dup - IL_1ed2: ldc.i4.4 - IL_1ed3: mul - IL_1ed4: pop - IL_1ed9: dup - IL_1eda: ldc.i4.2 - IL_1edb: xor - IL_1edc: pop - IL_1ee1: dup - IL_1ee2: ldc.i4.8 - IL_1ee3: mul - IL_1ee4: pop - IL_1ee9: dup - IL_1eea: ldc.i4.5 - IL_1eeb: mul - IL_1eec: pop - IL_1ef1: dup - IL_1ef2: ldc.i4.8 - IL_1ef3: and - IL_1ef4: pop - IL_1ef9: dup - IL_1efa: ldc.i4.0 - IL_1efb: shr - IL_1efc: pop - IL_1f01: dup - IL_1f02: ldc.i4.2 - IL_1f03: or - IL_1f04: pop - IL_1f09: dup - IL_1f0a: ldc.i4.0 - IL_1f0b: and - IL_1f0c: pop - IL_1f11: dup - IL_1f12: ldc.i4.7 - IL_1f13: shr - IL_1f14: pop - IL_1f19: dup - IL_1f1a: ldc.i4.4 - IL_1f1b: add - IL_1f1c: pop - IL_1f21: dup - IL_1f22: ldc.i4.7 - IL_1f23: mul - IL_1f24: pop - IL_1f29: dup - IL_1f2a: ldc.i4.1 - IL_1f2b: sub - IL_1f2c: pop - IL_1f31: dup - IL_1f32: ldc.i4.0 - IL_1f33: mul - IL_1f34: pop - IL_1f39: dup - IL_1f3a: ldc.i4.6 - IL_1f3b: sub - IL_1f3c: pop - IL_1f41: dup - IL_1f42: ldc.i4.6 - IL_1f43: shl - IL_1f44: pop - IL_1f49: dup - IL_1f4a: ldc.i4.2 - IL_1f4b: and - IL_1f4c: pop - IL_1f51: dup - IL_1f52: ldc.i4.2 - IL_1f53: add - IL_1f54: pop - IL_1f59: dup - IL_1f5a: ldc.i4.7 - IL_1f5b: sub - IL_1f5c: pop - IL_1f61: dup - IL_1f62: ldc.i4.6 - IL_1f63: mul - IL_1f64: pop - IL_1f69: dup - IL_1f6a: ldc.i4.1 - IL_1f6b: shr - IL_1f6c: pop - IL_1f71: dup - IL_1f72: ldc.i4.5 - IL_1f73: shl - IL_1f74: pop - IL_1f79: dup - IL_1f7a: ldc.i4.7 - IL_1f7b: mul - IL_1f7c: pop - IL_1f81: dup - IL_1f82: ldc.i4.6 - IL_1f83: or - IL_1f84: pop - IL_1f89: dup - IL_1f8a: ldc.i4.5 - IL_1f8b: mul - IL_1f8c: pop - IL_1f91: dup - IL_1f92: ldc.i4.1 - IL_1f93: or - IL_1f94: pop - IL_1f99: dup - IL_1f9a: ldc.i4.2 - IL_1f9b: and - IL_1f9c: pop - IL_1fa1: dup - IL_1fa2: ldc.i4.0 - IL_1fa3: and - IL_1fa4: pop - IL_1fa9: dup - IL_1faa: ldc.i4.1 - IL_1fab: sub - IL_1fac: pop - IL_1fb1: dup - IL_1fb2: ldc.i4.1 - IL_1fb3: add - IL_1fb4: pop - IL_1fb9: dup - IL_1fba: ldc.i4.3 - IL_1fbb: shr - IL_1fbc: pop - IL_1fc1: dup - IL_1fc2: ldc.i4.5 - IL_1fc3: xor - IL_1fc4: pop - IL_1fc9: dup - IL_1fca: ldc.i4.5 - IL_1fcb: mul - IL_1fcc: pop - IL_1fd1: dup - IL_1fd2: ldc.i4.4 - IL_1fd3: mul - IL_1fd4: pop - IL_1fd9: dup - IL_1fda: ldc.i4.3 - IL_1fdb: sub - IL_1fdc: pop - IL_1fe1: dup - IL_1fe2: ldc.i4.1 - IL_1fe3: or - IL_1fe4: pop - IL_1fe9: dup - IL_1fea: ldc.i4.1 - IL_1feb: shl - IL_1fec: pop - IL_1ff1: dup - IL_1ff2: ldc.i4.5 - IL_1ff3: and - IL_1ff4: pop - IL_1ff9: dup - IL_1ffa: ldc.i4.4 - IL_1ffb: mul - IL_1ffc: pop - IL_2001: dup - IL_2002: ldc.i4.4 - IL_2003: and - IL_2004: pop - IL_2009: dup - IL_200a: ldc.i4.3 - IL_200b: sub - IL_200c: pop - IL_2011: dup - IL_2012: ldc.i4.6 - IL_2013: mul - IL_2014: pop - IL_2019: dup - IL_201a: ldc.i4.0 - IL_201b: shr - IL_201c: pop - IL_2021: dup - IL_2022: ldc.i4.2 - IL_2023: xor - IL_2024: pop - IL_2029: dup - IL_202a: ldc.i4.6 - IL_202b: xor - IL_202c: pop - IL_2031: dup - IL_2032: ldc.i4.7 - IL_2033: shr - IL_2034: pop - IL_2039: dup - IL_203a: ldc.i4.0 - IL_203b: shl - IL_203c: pop - IL_2041: dup - IL_2042: ldc.i4.8 - IL_2043: xor - IL_2044: pop - IL_2049: dup - IL_204a: ldc.i4.0 - IL_204b: sub - IL_204c: pop - IL_2051: dup - IL_2052: ldc.i4.8 - IL_2053: shl - IL_2054: pop - IL_2059: dup - IL_205a: ldc.i4.7 - IL_205b: xor - IL_205c: pop - IL_2061: dup - IL_2062: ldc.i4.4 - IL_2063: xor - IL_2064: pop - IL_2069: dup - IL_206a: ldc.i4.1 - IL_206b: sub - IL_206c: pop - IL_2071: dup - IL_2072: ldc.i4.7 - IL_2073: shr - IL_2074: pop - IL_2079: dup - IL_207a: ldc.i4.2 - IL_207b: sub - IL_207c: pop - IL_2081: dup - IL_2082: ldc.i4.3 - IL_2083: or - IL_2084: pop - IL_2089: dup - IL_208a: ldc.i4.6 - IL_208b: mul - IL_208c: pop - IL_2091: dup - IL_2092: ldc.i4.6 - IL_2093: sub - IL_2094: pop - IL_2099: dup - IL_209a: ldc.i4.8 - IL_209b: sub - IL_209c: pop - IL_20a1: dup - IL_20a2: ldc.i4.2 - IL_20a3: and - IL_20a4: pop - IL_20a9: dup - IL_20aa: ldc.i4.0 - IL_20ab: add - IL_20ac: pop - IL_20b1: dup - IL_20b2: ldc.i4.4 - IL_20b3: or - IL_20b4: pop - IL_20b9: dup - IL_20ba: ldc.i4.3 - IL_20bb: shl - IL_20bc: pop - IL_20c1: dup - IL_20c2: ldc.i4.7 - IL_20c3: shl - IL_20c4: pop - IL_20c9: dup - IL_20ca: ldc.i4.5 - IL_20cb: add - IL_20cc: pop - IL_20d1: dup - IL_20d2: ldc.i4.6 - IL_20d3: mul - IL_20d4: pop - IL_20d9: dup - IL_20da: ldc.i4.2 - IL_20db: or - IL_20dc: pop - IL_20e1: dup - IL_20e2: ldc.i4.0 - IL_20e3: or - IL_20e4: pop - IL_20e9: dup - IL_20ea: ldc.i4.6 - IL_20eb: mul - IL_20ec: pop - IL_20f1: dup - IL_20f2: ldc.i4.1 - IL_20f3: and - IL_20f4: pop - IL_20f9: dup - IL_20fa: ldc.i4.8 - IL_20fb: shl - IL_20fc: pop - IL_2101: dup - IL_2102: ldc.i4.1 - IL_2103: shl - IL_2104: pop - IL_2109: dup - IL_210a: ldc.i4.0 - IL_210b: or - IL_210c: pop - IL_2111: dup - IL_2112: ldc.i4.8 - IL_2113: shr - IL_2114: pop - IL_2119: dup - IL_211a: ldc.i4.8 - IL_211b: shr - IL_211c: pop - IL_2121: dup - IL_2122: ldc.i4.4 - IL_2123: and - IL_2124: pop - IL_2129: dup - IL_212a: ldc.i4.7 - IL_212b: sub - IL_212c: pop - IL_2131: dup - IL_2132: ldc.i4.4 - IL_2133: and - IL_2134: pop - IL_2139: dup - IL_213a: ldc.i4.8 - IL_213b: shl - IL_213c: pop - IL_2141: dup - IL_2142: ldc.i4.8 - IL_2143: shr - IL_2144: pop - IL_2149: dup - IL_214a: ldc.i4.3 - IL_214b: sub - IL_214c: pop - IL_2151: dup - IL_2152: ldc.i4.1 - IL_2153: sub - IL_2154: pop - IL_2159: dup - IL_215a: ldc.i4.4 - IL_215b: add - IL_215c: pop - IL_2161: dup - IL_2162: ldc.i4.5 - IL_2163: and - IL_2164: pop - IL_2169: dup - IL_216a: ldc.i4.2 - IL_216b: shr - IL_216c: pop - IL_2171: dup - IL_2172: ldc.i4.4 - IL_2173: shl - IL_2174: pop - IL_2179: dup - IL_217a: ldc.i4.0 - IL_217b: xor - IL_217c: pop - IL_2181: dup - IL_2182: ldc.i4.8 - IL_2183: shl - IL_2184: pop - IL_2189: dup - IL_218a: ldc.i4.7 - IL_218b: or - IL_218c: pop - IL_2191: dup - IL_2192: ldc.i4.7 - IL_2193: xor - IL_2194: pop - IL_2199: dup - IL_219a: ldc.i4.5 - IL_219b: sub - IL_219c: pop - IL_21a1: dup - IL_21a2: ldc.i4.6 - IL_21a3: or - IL_21a4: pop - IL_21a9: dup - IL_21aa: ldc.i4.5 - IL_21ab: or - IL_21ac: pop - IL_21b1: dup - IL_21b2: ldc.i4.4 - IL_21b3: sub - IL_21b4: pop - IL_21b9: dup - IL_21ba: ldc.i4.3 - IL_21bb: sub - IL_21bc: pop - IL_21c1: dup - IL_21c2: ldc.i4.0 - IL_21c3: sub - IL_21c4: pop - IL_21c9: dup - IL_21ca: ldc.i4.3 - IL_21cb: shl - IL_21cc: pop - IL_21d1: dup - IL_21d2: ldc.i4.4 - IL_21d3: shr - IL_21d4: pop - IL_21d9: dup - IL_21da: ldc.i4.3 - IL_21db: or - IL_21dc: pop - IL_21e1: dup - IL_21e2: ldc.i4.0 - IL_21e3: add - IL_21e4: pop - IL_21e9: dup - IL_21ea: ldc.i4.2 - IL_21eb: sub - IL_21ec: pop - IL_21f1: dup - IL_21f2: ldc.i4.3 - IL_21f3: sub - IL_21f4: pop - IL_21f9: dup - IL_21fa: ldc.i4.2 - IL_21fb: or - IL_21fc: pop - IL_2201: dup - IL_2202: ldc.i4.7 - IL_2203: xor - IL_2204: pop - IL_2209: dup - IL_220a: ldc.i4.2 - IL_220b: or - IL_220c: pop - IL_2211: dup - IL_2212: ldc.i4.8 - IL_2213: or - IL_2214: pop - IL_2219: dup - IL_221a: ldc.i4.5 - IL_221b: shl - IL_221c: pop - IL_2221: dup - IL_2222: ldc.i4.0 - IL_2223: mul - IL_2224: pop - IL_2229: dup - IL_222a: ldc.i4.4 - IL_222b: sub - IL_222c: pop - IL_2231: dup - IL_2232: ldc.i4.5 - IL_2233: shl - IL_2234: pop - IL_2239: dup - IL_223a: ldc.i4.5 - IL_223b: xor - IL_223c: pop - IL_2241: dup - IL_2242: ldc.i4.3 - IL_2243: add - IL_2244: pop - IL_2249: dup - IL_224a: ldc.i4.6 - IL_224b: mul - IL_224c: pop - IL_2251: dup - IL_2252: ldc.i4.2 - IL_2253: xor - IL_2254: pop - IL_2259: dup - IL_225a: ldc.i4.8 - IL_225b: sub - IL_225c: pop - IL_2261: dup - IL_2262: ldc.i4.0 - IL_2263: and - IL_2264: pop - IL_2269: dup - IL_226a: ldc.i4.8 - IL_226b: and - IL_226c: pop - IL_2271: dup - IL_2272: ldc.i4.2 - IL_2273: xor - IL_2274: pop - IL_2279: dup - IL_227a: ldc.i4.6 - IL_227b: shl - IL_227c: pop - IL_2281: dup - IL_2282: ldc.i4.5 - IL_2283: shr - IL_2284: pop - IL_2289: dup - IL_228a: ldc.i4.1 - IL_228b: add - IL_228c: pop - IL_2291: dup - IL_2292: ldc.i4.8 - IL_2293: xor - IL_2294: pop - IL_2299: dup - IL_229a: ldc.i4.2 - IL_229b: sub - IL_229c: pop - IL_22a1: dup - IL_22a2: ldc.i4.4 - IL_22a3: and - IL_22a4: pop - IL_22a9: dup - IL_22aa: ldc.i4.4 - IL_22ab: sub - IL_22ac: pop - IL_22b1: dup - IL_22b2: ldc.i4.1 - IL_22b3: sub - IL_22b4: pop - IL_22b9: dup - IL_22ba: ldc.i4.3 - IL_22bb: shl - IL_22bc: pop - IL_22c1: dup - IL_22c2: ldc.i4.3 - IL_22c3: and - IL_22c4: pop - IL_22c9: dup - IL_22ca: ldc.i4.7 - IL_22cb: xor - IL_22cc: pop - IL_22d1: dup - IL_22d2: ldc.i4.4 - IL_22d3: or - IL_22d4: pop - IL_22d9: dup - IL_22da: ldc.i4.6 - IL_22db: mul - IL_22dc: pop - IL_22e1: dup - IL_22e2: ldc.i4.3 - IL_22e3: add - IL_22e4: pop - IL_22e9: dup - IL_22ea: ldc.i4.7 - IL_22eb: add - IL_22ec: pop - IL_22f1: dup - IL_22f2: ldc.i4.0 - IL_22f3: and - IL_22f4: pop - IL_22f9: dup - IL_22fa: ldc.i4.2 - IL_22fb: shl - IL_22fc: pop - IL_2301: dup - IL_2302: ldc.i4.5 - IL_2303: or - IL_2304: pop - IL_2309: dup - IL_230a: ldc.i4.4 - IL_230b: or - IL_230c: pop - IL_2311: dup - IL_2312: ldc.i4.3 - IL_2313: shl - IL_2314: pop - IL_2319: dup - IL_231a: ldc.i4.5 - IL_231b: and - IL_231c: pop - IL_2321: dup - IL_2322: ldc.i4.6 - IL_2323: shl - IL_2324: pop - IL_2329: dup - IL_232a: ldc.i4.6 - IL_232b: xor - IL_232c: pop - IL_2331: dup - IL_2332: ldc.i4.8 - IL_2333: and - IL_2334: pop - IL_2339: dup - IL_233a: ldc.i4.0 - IL_233b: or - IL_233c: pop - IL_2341: dup - IL_2342: ldc.i4.4 - IL_2343: mul - IL_2344: pop - IL_2349: dup - IL_234a: ldc.i4.3 - IL_234b: xor - IL_234c: pop - IL_2351: dup - IL_2352: ldc.i4.5 - IL_2353: mul - IL_2354: pop - IL_2359: dup - IL_235a: ldc.i4.0 - IL_235b: shr - IL_235c: pop - IL_2361: dup - IL_2362: ldc.i4.8 - IL_2363: and - IL_2364: pop - IL_2369: dup - IL_236a: ldc.i4.6 - IL_236b: or - IL_236c: pop - IL_2371: dup - IL_2372: ldc.i4.5 - IL_2373: sub - IL_2374: pop - IL_2379: dup - IL_237a: ldc.i4.1 - IL_237b: shr - IL_237c: pop - IL_2381: dup - IL_2382: ldc.i4.5 - IL_2383: or - IL_2384: pop - IL_2389: dup - IL_238a: ldc.i4.5 - IL_238b: sub - IL_238c: pop - IL_2391: dup - IL_2392: ldc.i4.6 - IL_2393: xor - IL_2394: pop - IL_2399: dup - IL_239a: ldc.i4.1 - IL_239b: or - IL_239c: pop - IL_23a1: dup - IL_23a2: ldc.i4.1 - IL_23a3: or - IL_23a4: pop - IL_23a9: dup - IL_23aa: ldc.i4.6 - IL_23ab: or - IL_23ac: pop - IL_23b1: dup - IL_23b2: ldc.i4.2 - IL_23b3: mul - IL_23b4: pop - IL_23b9: dup - IL_23ba: ldc.i4.3 - IL_23bb: shl - IL_23bc: pop - IL_23c1: dup - IL_23c2: ldc.i4.8 - IL_23c3: or - IL_23c4: pop - IL_23c9: dup - IL_23ca: ldc.i4.5 - IL_23cb: shr - IL_23cc: pop - IL_23d1: dup - IL_23d2: ldc.i4.3 - IL_23d3: and - IL_23d4: pop - IL_23d9: dup - IL_23da: ldc.i4.8 - IL_23db: mul - IL_23dc: pop - IL_23e1: dup - IL_23e2: ldc.i4.7 - IL_23e3: and - IL_23e4: pop - IL_23e9: dup - IL_23ea: ldc.i4.0 - IL_23eb: shr - IL_23ec: pop - IL_23f1: dup - IL_23f2: ldc.i4.7 - IL_23f3: shr - IL_23f4: pop - IL_23f9: dup - IL_23fa: ldc.i4.1 - IL_23fb: shl - IL_23fc: pop - IL_2401: dup - IL_2402: ldc.i4.3 - IL_2403: add - IL_2404: pop - IL_2409: dup - IL_240a: ldc.i4.7 - IL_240b: add - IL_240c: pop - IL_2411: dup - IL_2412: ldc.i4.1 - IL_2413: or - IL_2414: pop - IL_2419: dup - IL_241a: ldc.i4.1 - IL_241b: add - IL_241c: pop - IL_2421: dup - IL_2422: ldc.i4.1 - IL_2423: shl - IL_2424: pop - IL_2429: dup - IL_242a: ldc.i4.2 - IL_242b: shr - IL_242c: pop - IL_2431: dup - IL_2432: ldc.i4.5 - IL_2433: sub - IL_2434: pop - IL_2439: dup - IL_243a: ldc.i4.3 - IL_243b: shl - IL_243c: pop - IL_2441: dup - IL_2442: ldc.i4.3 - IL_2443: add - IL_2444: pop - IL_2449: dup - IL_244a: ldc.i4.8 - IL_244b: shr - IL_244c: pop - IL_2451: dup - IL_2452: ldc.i4.5 - IL_2453: xor - IL_2454: pop - IL_2459: dup - IL_245a: ldc.i4.2 - IL_245b: and - IL_245c: pop - IL_2461: dup - IL_2462: ldc.i4.8 - IL_2463: mul - IL_2464: pop - IL_2469: dup - IL_246a: ldc.i4.2 - IL_246b: and - IL_246c: pop - IL_2471: dup - IL_2472: ldc.i4.2 - IL_2473: shl - IL_2474: pop - IL_2479: dup - IL_247a: ldc.i4.0 - IL_247b: xor - IL_247c: pop - IL_2481: dup - IL_2482: ldc.i4.6 - IL_2483: sub - IL_2484: pop - IL_2489: dup - IL_248a: ldc.i4.4 - IL_248b: mul - IL_248c: pop - IL_2491: dup - IL_2492: ldc.i4.4 - IL_2493: mul - IL_2494: pop - IL_2499: dup - IL_249a: ldc.i4.4 - IL_249b: add - IL_249c: pop - IL_24a1: dup - IL_24a2: ldc.i4.6 - IL_24a3: xor - IL_24a4: pop - IL_24a9: dup - IL_24aa: ldc.i4.4 - IL_24ab: or - IL_24ac: pop - IL_24b1: dup - IL_24b2: ldc.i4.4 - IL_24b3: mul - IL_24b4: pop - IL_24b9: dup - IL_24ba: ldc.i4.6 - IL_24bb: shr - IL_24bc: pop - IL_24c1: dup - IL_24c2: ldc.i4.4 - IL_24c3: xor - IL_24c4: pop - IL_24c9: dup - IL_24ca: ldc.i4.2 - IL_24cb: shr - IL_24cc: pop - IL_24d1: dup - IL_24d2: ldc.i4.6 - IL_24d3: shl - IL_24d4: pop - IL_24d9: dup - IL_24da: ldc.i4.7 - IL_24db: or - IL_24dc: pop - IL_24e1: dup - IL_24e2: ldc.i4.6 - IL_24e3: or - IL_24e4: pop - IL_24e9: dup - IL_24ea: ldc.i4.1 - IL_24eb: and - IL_24ec: pop - IL_24f1: dup - IL_24f2: ldc.i4.5 - IL_24f3: xor - IL_24f4: pop - IL_24f9: dup - IL_24fa: ldc.i4.7 - IL_24fb: shr - IL_24fc: pop - IL_2501: dup - IL_2502: ldc.i4.3 - IL_2503: and - IL_2504: pop - IL_2509: dup - IL_250a: ldc.i4.8 - IL_250b: xor - IL_250c: pop - IL_2511: dup - IL_2512: ldc.i4.6 - IL_2513: add - IL_2514: pop - IL_2519: dup - IL_251a: ldc.i4.0 - IL_251b: add - IL_251c: pop - IL_2521: dup - IL_2522: ldc.i4.5 - IL_2523: or - IL_2524: pop - IL_2529: dup - IL_252a: ldc.i4.8 - IL_252b: add - IL_252c: pop - IL_2531: dup - IL_2532: ldc.i4.8 - IL_2533: mul - IL_2534: pop - IL_2539: dup - IL_253a: ldc.i4.2 - IL_253b: shl - IL_253c: pop - IL_2541: dup - IL_2542: ldc.i4.6 - IL_2543: shr - IL_2544: pop - IL_2549: dup - IL_254a: ldc.i4.2 - IL_254b: and - IL_254c: pop - IL_2551: dup - IL_2552: ldc.i4.2 - IL_2553: mul - IL_2554: pop - IL_2559: dup - IL_255a: ldc.i4.6 - IL_255b: sub - IL_255c: pop - IL_2561: dup - IL_2562: ldc.i4.2 - IL_2563: shl - IL_2564: pop - IL_2569: dup - IL_256a: ldc.i4.5 - IL_256b: shl - IL_256c: pop - IL_2571: dup - IL_2572: ldc.i4.2 - IL_2573: shr - IL_2574: pop - IL_2579: dup - IL_257a: ldc.i4.4 - IL_257b: mul - IL_257c: pop - IL_2581: dup - IL_2582: ldc.i4.6 - IL_2583: and - IL_2584: pop - IL_2589: dup - IL_258a: ldc.i4.4 - IL_258b: shr - IL_258c: pop - IL_2591: dup - IL_2592: ldc.i4.3 - IL_2593: mul - IL_2594: pop - IL_2599: dup - IL_259a: ldc.i4.8 - IL_259b: mul - IL_259c: pop - IL_25a1: dup - IL_25a2: ldc.i4.3 - IL_25a3: sub - IL_25a4: pop - IL_25a9: dup - IL_25aa: ldc.i4.1 - IL_25ab: and - IL_25ac: pop - IL_25b1: dup - IL_25b2: ldc.i4.5 - IL_25b3: and - IL_25b4: pop - IL_25b9: dup - IL_25ba: ldc.i4.8 - IL_25bb: mul - IL_25bc: pop - IL_25c1: dup - IL_25c2: ldc.i4.6 - IL_25c3: shl - IL_25c4: pop - IL_25c9: dup - IL_25ca: ldc.i4.0 - IL_25cb: or - IL_25cc: pop - IL_25d1: dup - IL_25d2: ldc.i4.0 - IL_25d3: or - IL_25d4: pop - IL_25d9: dup - IL_25da: ldc.i4.3 - IL_25db: add - IL_25dc: pop - IL_25e1: dup - IL_25e2: ldc.i4.0 - IL_25e3: shr - IL_25e4: pop - IL_25e9: dup - IL_25ea: ldc.i4.1 - IL_25eb: sub - IL_25ec: pop - IL_25f1: dup - IL_25f2: ldc.i4.4 - IL_25f3: shl - IL_25f4: pop - IL_25f9: dup - IL_25fa: ldc.i4.7 - IL_25fb: or - IL_25fc: pop - IL_2601: dup - IL_2602: ldc.i4.3 - IL_2603: shl - IL_2604: pop - IL_2609: dup - IL_260a: ldc.i4.3 - IL_260b: sub - IL_260c: pop - IL_2611: dup - IL_2612: ldc.i4.8 - IL_2613: shr - IL_2614: pop - IL_2619: dup - IL_261a: ldc.i4.1 - IL_261b: xor - IL_261c: pop - IL_2621: dup - IL_2622: ldc.i4.6 - IL_2623: or - IL_2624: pop - IL_2629: dup - IL_262a: ldc.i4.3 - IL_262b: add - IL_262c: pop - IL_2631: dup - IL_2632: ldc.i4.1 - IL_2633: or - IL_2634: pop - IL_2639: dup - IL_263a: ldc.i4.5 - IL_263b: shl - IL_263c: pop - IL_2641: dup - IL_2642: ldc.i4.4 - IL_2643: sub - IL_2644: pop - IL_2649: dup - IL_264a: ldc.i4.7 - IL_264b: shr - IL_264c: pop - IL_2651: dup - IL_2652: ldc.i4.5 - IL_2653: shl - IL_2654: pop - IL_2659: dup - IL_265a: ldc.i4.2 - IL_265b: shr - IL_265c: pop - IL_2661: dup - IL_2662: ldc.i4.4 - IL_2663: mul - IL_2664: pop - IL_2669: dup - IL_266a: ldc.i4.4 - IL_266b: shr - IL_266c: pop - IL_2671: dup - IL_2672: ldc.i4.1 - IL_2673: shr - IL_2674: pop - IL_2679: dup - IL_267a: ldc.i4.7 - IL_267b: or - IL_267c: pop - IL_2681: dup - IL_2682: ldc.i4.3 - IL_2683: sub - IL_2684: pop - IL_2689: dup - IL_268a: ldc.i4.3 - IL_268b: add - IL_268c: pop - IL_2691: dup - IL_2692: ldc.i4.2 - IL_2693: and - IL_2694: pop - IL_2699: dup - IL_269a: ldc.i4.4 - IL_269b: add - IL_269c: pop - IL_26a1: dup - IL_26a2: ldc.i4.2 - IL_26a3: shr - IL_26a4: pop - IL_26a9: dup - IL_26aa: ldc.i4.2 - IL_26ab: sub - IL_26ac: pop - IL_26b1: dup - IL_26b2: ldc.i4.5 - IL_26b3: mul - IL_26b4: pop - IL_26b9: dup - IL_26ba: ldc.i4.8 - IL_26bb: sub - IL_26bc: pop - IL_26c1: dup - IL_26c2: ldc.i4.0 - IL_26c3: shl - IL_26c4: pop - IL_26c9: dup - IL_26ca: ldc.i4.6 - IL_26cb: mul - IL_26cc: pop - IL_26d1: dup - IL_26d2: ldc.i4.5 - IL_26d3: add - IL_26d4: pop - IL_26d9: dup - IL_26da: ldc.i4.2 - IL_26db: or - IL_26dc: pop - IL_26e1: dup - IL_26e2: ldc.i4.3 - IL_26e3: shr - IL_26e4: pop - IL_26e9: dup - IL_26ea: ldc.i4.6 - IL_26eb: shl - IL_26ec: pop - IL_26f1: dup - IL_26f2: ldc.i4.1 - IL_26f3: xor - IL_26f4: pop - IL_26f9: dup - IL_26fa: ldc.i4.2 - IL_26fb: add - IL_26fc: pop - IL_2701: dup - IL_2702: ldc.i4.0 - IL_2703: xor - IL_2704: pop - IL_2709: dup - IL_270a: ldc.i4.6 - IL_270b: or - IL_270c: pop - IL_2711: dup - IL_2712: ldc.i4.4 - IL_2713: shl - IL_2714: pop - IL_2719: dup - IL_271a: ldc.i4.1 - IL_271b: shr - IL_271c: pop - IL_2721: dup - IL_2722: ldc.i4.7 - IL_2723: and - IL_2724: pop - IL_2729: dup - IL_272a: ldc.i4.3 - IL_272b: or - IL_272c: pop - IL_2731: dup - IL_2732: ldc.i4.2 - IL_2733: add - IL_2734: pop - IL_2739: dup - IL_273a: ldc.i4.1 - IL_273b: sub - IL_273c: pop - IL_2741: dup - IL_2742: ldc.i4.3 - IL_2743: mul - IL_2744: pop - IL_2749: dup - IL_274a: ldc.i4.6 - IL_274b: shl - IL_274c: pop - IL_2751: dup - IL_2752: ldc.i4.0 - IL_2753: shl - IL_2754: pop - IL_2759: dup - IL_275a: ldc.i4.2 - IL_275b: mul - IL_275c: pop - IL_2761: dup - IL_2762: ldc.i4.8 - IL_2763: shl - IL_2764: pop - IL_2769: dup - IL_276a: ldc.i4.6 - IL_276b: shr - IL_276c: pop - IL_2771: dup - IL_2772: ldc.i4.1 - IL_2773: or - IL_2774: pop - IL_2779: dup - IL_277a: ldc.i4.8 - IL_277b: or - IL_277c: pop - IL_2781: dup - IL_2782: ldc.i4.3 - IL_2783: sub - IL_2784: pop - IL_2789: dup - IL_278a: ldc.i4.0 - IL_278b: add - IL_278c: pop - IL_2791: dup - IL_2792: ldc.i4.5 - IL_2793: or - IL_2794: pop - IL_2799: dup - IL_279a: ldc.i4.6 - IL_279b: xor - IL_279c: pop - IL_27a1: dup - IL_27a2: ldc.i4.3 - IL_27a3: or - IL_27a4: pop - IL_27a9: dup - IL_27aa: ldc.i4.4 - IL_27ab: and - IL_27ac: pop - IL_27b1: dup - IL_27b2: ldc.i4.5 - IL_27b3: mul - IL_27b4: pop - IL_27b9: dup - IL_27ba: ldc.i4.5 - IL_27bb: sub - IL_27bc: pop - IL_27c1: dup - IL_27c2: ldc.i4.4 - IL_27c3: shl - IL_27c4: pop - IL_27c9: dup - IL_27ca: ldc.i4.0 - IL_27cb: and - IL_27cc: pop - IL_27d1: dup - IL_27d2: ldc.i4.6 - IL_27d3: and - IL_27d4: pop - IL_27d9: dup - IL_27da: ldc.i4.8 - IL_27db: shl - IL_27dc: pop - IL_27e1: dup - IL_27e2: ldc.i4.1 - IL_27e3: mul - IL_27e4: pop - IL_27e9: dup - IL_27ea: ldc.i4.0 - IL_27eb: or - IL_27ec: pop - IL_27f1: dup - IL_27f2: ldc.i4.8 - IL_27f3: shl - IL_27f4: pop - IL_27f9: dup - IL_27fa: ldc.i4.5 - IL_27fb: and - IL_27fc: pop - IL_2801: dup - IL_2802: ldc.i4.8 - IL_2803: shl - IL_2804: pop - IL_2809: dup - IL_280a: ldc.i4.4 - IL_280b: add - IL_280c: pop - IL_2811: dup - IL_2812: ldc.i4.0 - IL_2813: add - IL_2814: pop - IL_2819: dup - IL_281a: ldc.i4.5 - IL_281b: xor - IL_281c: pop - IL_2821: dup - IL_2822: ldc.i4.4 - IL_2823: sub - IL_2824: pop - IL_2829: dup - IL_282a: ldc.i4.1 - IL_282b: add - IL_282c: pop - IL_2831: dup - IL_2832: ldc.i4.8 - IL_2833: xor - IL_2834: pop - IL_2839: dup - IL_283a: ldc.i4.6 - IL_283b: shl - IL_283c: pop - IL_2841: dup - IL_2842: ldc.i4.8 - IL_2843: xor - IL_2844: pop - IL_2849: dup - IL_284a: ldc.i4.1 - IL_284b: shl - IL_284c: pop - IL_2851: dup - IL_2852: ldc.i4.7 - IL_2853: add - IL_2854: pop - IL_2859: dup - IL_285a: ldc.i4.1 - IL_285b: shl - IL_285c: pop - IL_2861: dup - IL_2862: ldc.i4.2 - IL_2863: xor - IL_2864: pop - IL_2869: dup - IL_286a: ldc.i4.7 - IL_286b: mul - IL_286c: pop - IL_2871: dup - IL_2872: ldc.i4.8 - IL_2873: and - IL_2874: pop - IL_2879: dup - IL_287a: ldc.i4.4 - IL_287b: and - IL_287c: pop - IL_2881: dup - IL_2882: ldc.i4.3 - IL_2883: shr - IL_2884: pop - IL_2889: dup - IL_288a: ldc.i4.7 - IL_288b: sub - IL_288c: pop - IL_2891: dup - IL_2892: ldc.i4.7 - IL_2893: xor - IL_2894: pop - IL_2899: dup - IL_289a: ldc.i4.1 - IL_289b: xor - IL_289c: pop - IL_28a1: dup - IL_28a2: ldc.i4.8 - IL_28a3: shr - IL_28a4: pop - IL_28a9: dup - IL_28aa: ldc.i4.2 - IL_28ab: shl - IL_28ac: pop - IL_28b1: dup - IL_28b2: ldc.i4.5 - IL_28b3: or - IL_28b4: pop - IL_28b9: dup - IL_28ba: ldc.i4.5 - IL_28bb: shr - IL_28bc: pop - IL_28c1: dup - IL_28c2: ldc.i4.5 - IL_28c3: xor - IL_28c4: pop - IL_28c9: dup - IL_28ca: ldc.i4.8 - IL_28cb: xor - IL_28cc: pop - IL_28d1: dup - IL_28d2: ldc.i4.4 - IL_28d3: or - IL_28d4: pop - IL_28d9: dup - IL_28da: ldc.i4.0 - IL_28db: or - IL_28dc: pop - IL_28e1: dup - IL_28e2: ldc.i4.3 - IL_28e3: or - IL_28e4: pop - IL_28e9: dup - IL_28ea: ldc.i4.7 - IL_28eb: shl - IL_28ec: pop - IL_28f1: dup - IL_28f2: ldc.i4.2 - IL_28f3: mul - IL_28f4: pop - IL_28f9: dup - IL_28fa: ldc.i4.4 - IL_28fb: shr - IL_28fc: pop - IL_2901: dup - IL_2902: ldc.i4.6 - IL_2903: mul - IL_2904: pop - IL_2909: dup - IL_290a: ldc.i4.6 - IL_290b: mul - IL_290c: pop - IL_2911: dup - IL_2912: ldc.i4.6 - IL_2913: shl - IL_2914: pop - IL_2919: dup - IL_291a: ldc.i4.6 - IL_291b: xor - IL_291c: pop - IL_2921: dup - IL_2922: ldc.i4.2 - IL_2923: shr - IL_2924: pop - IL_2929: dup - IL_292a: ldc.i4.5 - IL_292b: sub - IL_292c: pop - IL_2931: dup - IL_2932: ldc.i4.7 - IL_2933: shl - IL_2934: pop - IL_2939: dup - IL_293a: ldc.i4.0 - IL_293b: mul - IL_293c: pop - IL_2941: dup - IL_2942: ldc.i4.7 - IL_2943: sub - IL_2944: pop - IL_2949: dup - IL_294a: ldc.i4.6 - IL_294b: xor - IL_294c: pop - IL_2951: dup - IL_2952: ldc.i4.8 - IL_2953: add - IL_2954: pop - IL_2959: dup - IL_295a: ldc.i4.3 - IL_295b: mul - IL_295c: pop - IL_2961: dup - IL_2962: ldc.i4.5 - IL_2963: or - IL_2964: pop - IL_2969: dup - IL_296a: ldc.i4.6 - IL_296b: or - IL_296c: pop - IL_2971: dup - IL_2972: ldc.i4.5 - IL_2973: shr - IL_2974: pop - IL_2979: dup - IL_297a: ldc.i4.1 - IL_297b: shr - IL_297c: pop - IL_2981: dup - IL_2982: ldc.i4.1 - IL_2983: shl - IL_2984: pop - IL_2989: dup - IL_298a: ldc.i4.7 - IL_298b: mul - IL_298c: pop - IL_2991: dup - IL_2992: ldc.i4.1 - IL_2993: mul - IL_2994: pop - IL_2999: dup - IL_299a: ldc.i4.0 - IL_299b: or - IL_299c: pop - IL_29a1: dup - IL_29a2: ldc.i4.6 - IL_29a3: xor - IL_29a4: pop - IL_29a9: dup - IL_29aa: ldc.i4.2 - IL_29ab: shr - IL_29ac: pop - IL_29b1: dup - IL_29b2: ldc.i4.2 - IL_29b3: or - IL_29b4: pop - IL_29b9: dup - IL_29ba: ldc.i4.0 - IL_29bb: and - IL_29bc: pop - IL_29c1: dup - IL_29c2: ldc.i4.8 - IL_29c3: shl - IL_29c4: pop - IL_29c9: dup - IL_29ca: ldc.i4.6 - IL_29cb: add - IL_29cc: pop - IL_29d1: dup - IL_29d2: ldc.i4.4 - IL_29d3: add - IL_29d4: pop - IL_29d9: dup - IL_29da: ldc.i4.6 - IL_29db: shl - IL_29dc: pop - IL_29e1: dup - IL_29e2: ldc.i4.8 - IL_29e3: mul - IL_29e4: pop - IL_29e9: dup - IL_29ea: ldc.i4.6 - IL_29eb: shr - IL_29ec: pop - IL_29f1: dup - IL_29f2: ldc.i4.7 - IL_29f3: and - IL_29f4: pop - IL_29f9: dup - IL_29fa: ldc.i4.7 - IL_29fb: shl - IL_29fc: pop - IL_2a01: dup - IL_2a02: ldc.i4.4 - IL_2a03: or - IL_2a04: pop - IL_2a09: dup - IL_2a0a: ldc.i4.0 - IL_2a0b: sub - IL_2a0c: pop - IL_2a11: dup - IL_2a12: ldc.i4.6 - IL_2a13: shr - IL_2a14: pop - IL_2a19: dup - IL_2a1a: ldc.i4.1 - IL_2a1b: shl - IL_2a1c: pop - IL_2a21: dup - IL_2a22: ldc.i4.0 - IL_2a23: and - IL_2a24: pop - IL_2a29: dup - IL_2a2a: ldc.i4.6 - IL_2a2b: xor - IL_2a2c: pop - IL_2a31: dup - IL_2a32: ldc.i4.7 - IL_2a33: shr - IL_2a34: pop - IL_2a39: dup - IL_2a3a: ldc.i4.0 - IL_2a3b: shr - IL_2a3c: pop - IL_2a41: dup - IL_2a42: ldc.i4.7 - IL_2a43: or - IL_2a44: pop - IL_2a49: dup - IL_2a4a: ldc.i4.8 - IL_2a4b: add - IL_2a4c: pop - IL_2a51: dup - IL_2a52: ldc.i4.8 - IL_2a53: add - IL_2a54: pop - IL_2a59: dup - IL_2a5a: ldc.i4.1 - IL_2a5b: add - IL_2a5c: pop - IL_2a61: dup - IL_2a62: ldc.i4.7 - IL_2a63: mul - IL_2a64: pop - IL_2a69: dup - IL_2a6a: ldc.i4.3 - IL_2a6b: and - IL_2a6c: pop - IL_2a71: dup - IL_2a72: ldc.i4.5 - IL_2a73: mul - IL_2a74: pop - IL_2a79: dup - IL_2a7a: ldc.i4.1 - IL_2a7b: or - IL_2a7c: pop - IL_2a81: dup - IL_2a82: ldc.i4.5 - IL_2a83: shl - IL_2a84: pop - IL_2a89: dup - IL_2a8a: ldc.i4.1 - IL_2a8b: mul - IL_2a8c: pop - IL_2a91: dup - IL_2a92: ldc.i4.7 - IL_2a93: or - IL_2a94: pop - IL_2a99: dup - IL_2a9a: ldc.i4.0 - IL_2a9b: sub - IL_2a9c: pop - IL_2aa1: dup - IL_2aa2: ldc.i4.3 - IL_2aa3: sub - IL_2aa4: pop - IL_2aa9: dup - IL_2aaa: ldc.i4.0 - IL_2aab: and - IL_2aac: pop - IL_2ab1: dup - IL_2ab2: ldc.i4.3 - IL_2ab3: sub - IL_2ab4: pop - IL_2ab9: dup - IL_2aba: ldc.i4.6 - IL_2abb: mul - IL_2abc: pop - IL_2ac1: dup - IL_2ac2: ldc.i4.3 - IL_2ac3: or - IL_2ac4: pop - IL_2ac9: dup - IL_2aca: ldc.i4.8 - IL_2acb: or - IL_2acc: pop - IL_2ad1: dup - IL_2ad2: ldc.i4.7 - IL_2ad3: and - IL_2ad4: pop - IL_2ad9: dup - IL_2ada: ldc.i4.6 - IL_2adb: xor - IL_2adc: pop - IL_2ae1: dup - IL_2ae2: ldc.i4.7 - IL_2ae3: add - IL_2ae4: pop - IL_2ae9: dup - IL_2aea: ldc.i4.2 - IL_2aeb: xor - IL_2aec: pop - IL_2af1: dup - IL_2af2: ldc.i4.3 - IL_2af3: mul - IL_2af4: pop - IL_2af9: dup - IL_2afa: ldc.i4.8 - IL_2afb: and - IL_2afc: pop - IL_2b01: dup - IL_2b02: ldc.i4.5 - IL_2b03: shr - IL_2b04: pop - IL_2b09: dup - IL_2b0a: ldc.i4.7 - IL_2b0b: mul - IL_2b0c: pop - IL_2b11: dup - IL_2b12: ldc.i4.3 - IL_2b13: shr - IL_2b14: pop - IL_2b19: dup - IL_2b1a: ldc.i4.7 - IL_2b1b: or - IL_2b1c: pop - IL_2b21: dup - IL_2b22: ldc.i4.7 - IL_2b23: and - IL_2b24: pop - IL_2b29: dup - IL_2b2a: ldc.i4.6 - IL_2b2b: shr - IL_2b2c: pop - IL_2b31: dup - IL_2b32: ldc.i4.0 - IL_2b33: xor - IL_2b34: pop - IL_2b39: dup - IL_2b3a: ldc.i4.5 - IL_2b3b: shr - IL_2b3c: pop - IL_2b41: dup - IL_2b42: ldc.i4.5 - IL_2b43: add - IL_2b44: pop - IL_2b49: dup - IL_2b4a: ldc.i4.4 - IL_2b4b: shl - IL_2b4c: pop - IL_2b51: dup - IL_2b52: ldc.i4.3 - IL_2b53: sub - IL_2b54: pop - IL_2b59: dup - IL_2b5a: ldc.i4.1 - IL_2b5b: and - IL_2b5c: pop - IL_2b61: dup - IL_2b62: ldc.i4.8 - IL_2b63: shr - IL_2b64: pop - IL_2b69: dup - IL_2b6a: ldc.i4.4 - IL_2b6b: and - IL_2b6c: pop - IL_2b71: dup - IL_2b72: ldc.i4.5 - IL_2b73: shl - IL_2b74: pop - IL_2b79: dup - IL_2b7a: ldc.i4.7 - IL_2b7b: sub - IL_2b7c: pop - IL_2b81: dup - IL_2b82: ldc.i4.2 - IL_2b83: mul - IL_2b84: pop - IL_2b89: dup - IL_2b8a: ldc.i4.1 - IL_2b8b: shr - IL_2b8c: pop - IL_2b91: dup - IL_2b92: ldc.i4.3 - IL_2b93: xor - IL_2b94: pop - IL_2b99: dup - IL_2b9a: ldc.i4.7 - IL_2b9b: shr - IL_2b9c: pop - IL_2ba1: dup - IL_2ba2: ldc.i4.1 - IL_2ba3: or - IL_2ba4: pop - IL_2ba9: dup - IL_2baa: ldc.i4.0 - IL_2bab: add - IL_2bac: pop - IL_2bb1: dup - IL_2bb2: ldc.i4.0 - IL_2bb3: add - IL_2bb4: pop - IL_2bb9: dup - IL_2bba: ldc.i4.4 - IL_2bbb: xor - IL_2bbc: pop - IL_2bc1: dup - IL_2bc2: ldc.i4.3 - IL_2bc3: shr - IL_2bc4: pop - IL_2bc9: dup - IL_2bca: ldc.i4.7 - IL_2bcb: mul - IL_2bcc: pop - IL_2bd1: dup - IL_2bd2: ldc.i4.7 - IL_2bd3: mul - IL_2bd4: pop - IL_2bd9: dup - IL_2bda: ldc.i4.3 - IL_2bdb: xor - IL_2bdc: pop - IL_2be1: dup - IL_2be2: ldc.i4.5 - IL_2be3: add - IL_2be4: pop - IL_2be9: dup - IL_2bea: ldc.i4.3 - IL_2beb: shr - IL_2bec: pop - IL_2bf1: dup - IL_2bf2: ldc.i4.1 - IL_2bf3: add - IL_2bf4: pop - IL_2bf9: dup - IL_2bfa: ldc.i4.3 - IL_2bfb: sub - IL_2bfc: pop - IL_2c01: dup - IL_2c02: ldc.i4.8 - IL_2c03: shl - IL_2c04: pop - IL_2c09: dup - IL_2c0a: ldc.i4.4 - IL_2c0b: shr - IL_2c0c: pop - IL_2c11: dup - IL_2c12: ldc.i4.2 - IL_2c13: or - IL_2c14: pop - IL_2c19: dup - IL_2c1a: ldc.i4.2 - IL_2c1b: add - IL_2c1c: pop - IL_2c21: dup - IL_2c22: ldc.i4.1 - IL_2c23: and - IL_2c24: pop - IL_2c29: dup - IL_2c2a: ldc.i4.4 - IL_2c2b: xor - IL_2c2c: pop - IL_2c31: dup - IL_2c32: ldc.i4.1 - IL_2c33: add - IL_2c34: pop - IL_2c39: dup - IL_2c3a: ldc.i4.6 - IL_2c3b: or - IL_2c3c: pop - IL_2c41: dup - IL_2c42: ldc.i4.1 - IL_2c43: add - IL_2c44: pop - IL_2c49: dup - IL_2c4a: ldc.i4.3 - IL_2c4b: and - IL_2c4c: pop - IL_2c51: dup - IL_2c52: ldc.i4.6 - IL_2c53: shl - IL_2c54: pop - IL_2c59: dup - IL_2c5a: ldc.i4.2 - IL_2c5b: or - IL_2c5c: pop - IL_2c61: dup - IL_2c62: ldc.i4.7 - IL_2c63: shr - IL_2c64: pop - IL_2c69: dup - IL_2c6a: ldc.i4.0 - IL_2c6b: mul - IL_2c6c: pop - IL_2c71: dup - IL_2c72: ldc.i4.0 - IL_2c73: sub - IL_2c74: pop - IL_2c79: dup - IL_2c7a: ldc.i4.4 - IL_2c7b: add - IL_2c7c: pop - IL_2c81: dup - IL_2c82: ldc.i4.4 - IL_2c83: and - IL_2c84: pop - IL_2c89: dup - IL_2c8a: ldc.i4.1 - IL_2c8b: shl - IL_2c8c: pop - IL_2c91: dup - IL_2c92: ldc.i4.4 - IL_2c93: and - IL_2c94: pop - IL_2c99: dup - IL_2c9a: ldc.i4.1 - IL_2c9b: shl - IL_2c9c: pop - IL_2ca1: dup - IL_2ca2: ldc.i4.3 - IL_2ca3: and - IL_2ca4: pop - IL_2ca9: dup - IL_2caa: ldc.i4.0 - IL_2cab: add - IL_2cac: pop - IL_2cb1: dup - IL_2cb2: ldc.i4.7 - IL_2cb3: or - IL_2cb4: pop - IL_2cb9: dup - IL_2cba: ldc.i4.3 - IL_2cbb: shl - IL_2cbc: pop - IL_2cc1: dup - IL_2cc2: ldc.i4.2 - IL_2cc3: xor - IL_2cc4: pop - IL_2cc9: dup - IL_2cca: ldc.i4.4 - IL_2ccb: add - IL_2ccc: pop - IL_2cd1: dup - IL_2cd2: ldc.i4.5 - IL_2cd3: shl - IL_2cd4: pop - IL_2cd9: dup - IL_2cda: ldc.i4.4 - IL_2cdb: mul - IL_2cdc: pop - IL_2ce1: dup - IL_2ce2: ldc.i4.2 - IL_2ce3: shl - IL_2ce4: pop - IL_2ce9: dup - IL_2cea: ldc.i4.7 - IL_2ceb: shr - IL_2cec: pop - IL_2cf1: dup - IL_2cf2: ldc.i4.7 - IL_2cf3: or - IL_2cf4: pop - IL_2cf9: dup - IL_2cfa: ldc.i4.0 - IL_2cfb: add - IL_2cfc: pop - IL_2d01: dup - IL_2d02: ldc.i4.2 - IL_2d03: xor - IL_2d04: pop - IL_2d09: dup - IL_2d0a: ldc.i4.8 - IL_2d0b: mul - IL_2d0c: pop - IL_2d11: dup - IL_2d12: ldc.i4.8 - IL_2d13: sub - IL_2d14: pop - IL_2d19: dup - IL_2d1a: ldc.i4.3 - IL_2d1b: xor - IL_2d1c: pop - IL_2d21: dup - IL_2d22: ldc.i4.8 - IL_2d23: or - IL_2d24: pop - IL_2d29: dup - IL_2d2a: ldc.i4.3 - IL_2d2b: or - IL_2d2c: pop - IL_2d31: dup - IL_2d32: ldc.i4.4 - IL_2d33: mul - IL_2d34: pop - IL_2d39: dup - IL_2d3a: ldc.i4.0 - IL_2d3b: or - IL_2d3c: pop - IL_2d41: dup - IL_2d42: ldc.i4.2 - IL_2d43: shl - IL_2d44: pop - IL_2d49: dup - IL_2d4a: ldc.i4.0 - IL_2d4b: shr - IL_2d4c: pop - IL_2d51: dup - IL_2d52: ldc.i4.5 - IL_2d53: xor - IL_2d54: pop - IL_2d59: dup - IL_2d5a: ldc.i4.4 - IL_2d5b: add - IL_2d5c: pop - IL_2d61: dup - IL_2d62: ldc.i4.2 - IL_2d63: and - IL_2d64: pop - IL_2d69: dup - IL_2d6a: ldc.i4.2 - IL_2d6b: or - IL_2d6c: pop - IL_2d71: dup - IL_2d72: ldc.i4.8 - IL_2d73: shl - IL_2d74: pop - IL_2d79: dup - IL_2d7a: ldc.i4.6 - IL_2d7b: shl - IL_2d7c: pop - IL_2d81: dup - IL_2d82: ldc.i4.6 - IL_2d83: add - IL_2d84: pop - IL_2d89: dup - IL_2d8a: ldc.i4.6 - IL_2d8b: xor - IL_2d8c: pop - IL_2d91: dup - IL_2d92: ldc.i4.8 - IL_2d93: add - IL_2d94: pop - IL_2d99: dup - IL_2d9a: ldc.i4.5 - IL_2d9b: add - IL_2d9c: pop - IL_2da1: dup - IL_2da2: ldc.i4.0 - IL_2da3: add - IL_2da4: pop - IL_2da9: dup - IL_2daa: ldc.i4.0 - IL_2dab: shr - IL_2dac: pop - IL_2db1: dup - IL_2db2: ldc.i4.0 - IL_2db3: shl - IL_2db4: pop - IL_2db9: dup - IL_2dba: ldc.i4.7 - IL_2dbb: or - IL_2dbc: pop - IL_2dc1: dup - IL_2dc2: ldc.i4.5 - IL_2dc3: and - IL_2dc4: pop - IL_2dc9: dup - IL_2dca: ldc.i4.2 - IL_2dcb: mul - IL_2dcc: pop - IL_2dd1: dup - IL_2dd2: ldc.i4.8 - IL_2dd3: xor - IL_2dd4: pop - IL_2dd9: dup - IL_2dda: ldc.i4.4 - IL_2ddb: and - IL_2ddc: pop - IL_2de1: dup - IL_2de2: ldc.i4.8 - IL_2de3: or - IL_2de4: pop - IL_2de9: dup - IL_2dea: ldc.i4.0 - IL_2deb: sub - IL_2dec: pop - IL_2df1: dup - IL_2df2: ldc.i4.7 - IL_2df3: xor - IL_2df4: pop - IL_2df9: dup - IL_2dfa: ldc.i4.4 - IL_2dfb: xor - IL_2dfc: pop - IL_2e01: dup - IL_2e02: ldc.i4.1 - IL_2e03: or - IL_2e04: pop - IL_2e09: dup - IL_2e0a: ldc.i4.2 - IL_2e0b: xor - IL_2e0c: pop - IL_2e11: dup - IL_2e12: ldc.i4.5 - IL_2e13: shl - IL_2e14: pop - IL_2e19: dup - IL_2e1a: ldc.i4.0 - IL_2e1b: mul - IL_2e1c: pop - IL_2e21: dup - IL_2e22: ldc.i4.8 - IL_2e23: or - IL_2e24: pop - IL_2e29: dup - IL_2e2a: ldc.i4.4 - IL_2e2b: shl - IL_2e2c: pop - IL_2e31: dup - IL_2e32: ldc.i4.3 - IL_2e33: shr - IL_2e34: pop - IL_2e39: dup - IL_2e3a: ldc.i4.8 - IL_2e3b: and - IL_2e3c: pop - IL_2e41: dup - IL_2e42: ldc.i4.8 - IL_2e43: xor - IL_2e44: pop - IL_2e49: dup - IL_2e4a: ldc.i4.3 - IL_2e4b: add - IL_2e4c: pop - IL_2e51: dup - IL_2e52: ldc.i4.1 - IL_2e53: xor - IL_2e54: pop - IL_2e59: dup - IL_2e5a: ldc.i4.5 - IL_2e5b: mul - IL_2e5c: pop - IL_2e61: dup - IL_2e62: ldc.i4.5 - IL_2e63: or - IL_2e64: pop - IL_2e69: dup - IL_2e6a: ldc.i4.4 - IL_2e6b: add - IL_2e6c: pop - IL_2e71: dup - IL_2e72: ldc.i4.0 - IL_2e73: xor - IL_2e74: pop - IL_2e79: dup - IL_2e7a: ldc.i4.1 - IL_2e7b: shr - IL_2e7c: pop - IL_2e81: dup - IL_2e82: ldc.i4.4 - IL_2e83: shl - IL_2e84: pop - IL_2e89: dup - IL_2e8a: ldc.i4.4 - IL_2e8b: sub - IL_2e8c: pop - IL_2e91: dup - IL_2e92: ldc.i4.2 - IL_2e93: xor - IL_2e94: pop - IL_2e99: dup - IL_2e9a: ldc.i4.2 - IL_2e9b: add - IL_2e9c: pop - IL_2ea1: dup - IL_2ea2: ldc.i4.7 - IL_2ea3: add - IL_2ea4: pop - IL_2ea9: dup - IL_2eaa: ldc.i4.2 - IL_2eab: or - IL_2eac: pop - IL_2eb1: dup - IL_2eb2: ldc.i4.7 - IL_2eb3: or - IL_2eb4: pop - IL_2eb9: dup - IL_2eba: ldc.i4.3 - IL_2ebb: sub - IL_2ebc: pop - IL_2ec1: dup - IL_2ec2: ldc.i4.8 - IL_2ec3: sub - IL_2ec4: pop - IL_2ec9: dup - IL_2eca: ldc.i4.1 - IL_2ecb: xor - IL_2ecc: pop - IL_2ed1: dup - IL_2ed2: ldc.i4.0 - IL_2ed3: shl - IL_2ed4: pop - IL_2ed9: dup - IL_2eda: ldc.i4.2 - IL_2edb: shr - IL_2edc: pop - IL_2ee1: dup - IL_2ee2: ldc.i4.3 - IL_2ee3: and - IL_2ee4: pop - IL_2ee9: dup - IL_2eea: ldc.i4.7 - IL_2eeb: shr - IL_2eec: pop - IL_2ef1: dup - IL_2ef2: ldc.i4.0 - IL_2ef3: or - IL_2ef4: pop - IL_2ef9: dup - IL_2efa: ldc.i4.2 - IL_2efb: xor - IL_2efc: pop - IL_2f01: dup - IL_2f02: ldc.i4.6 - IL_2f03: and - IL_2f04: pop - IL_2f09: dup - IL_2f0a: ldc.i4.8 - IL_2f0b: and - IL_2f0c: pop - IL_2f11: dup - IL_2f12: ldc.i4.1 - IL_2f13: and - IL_2f14: pop - IL_2f19: dup - IL_2f1a: ldc.i4.4 - IL_2f1b: shl - IL_2f1c: pop - IL_2f21: dup - IL_2f22: ldc.i4.0 - IL_2f23: mul - IL_2f24: pop - IL_2f29: dup - IL_2f2a: ldc.i4.1 - IL_2f2b: sub - IL_2f2c: pop - IL_2f31: dup - IL_2f32: ldc.i4.1 - IL_2f33: shr - IL_2f34: pop - IL_2f39: dup - IL_2f3a: ldc.i4.4 - IL_2f3b: shr - IL_2f3c: pop - IL_2f41: dup - IL_2f42: ldc.i4.4 - IL_2f43: sub - IL_2f44: pop - IL_2f49: dup - IL_2f4a: ldc.i4.1 - IL_2f4b: and - IL_2f4c: pop - IL_2f51: dup - IL_2f52: ldc.i4.2 - IL_2f53: shr - IL_2f54: pop - IL_2f59: dup - IL_2f5a: ldc.i4.5 - IL_2f5b: add - IL_2f5c: pop - IL_2f61: dup - IL_2f62: ldc.i4.3 - IL_2f63: and - IL_2f64: pop - IL_2f69: dup - IL_2f6a: ldc.i4.7 - IL_2f6b: xor - IL_2f6c: pop - IL_2f71: dup - IL_2f72: ldc.i4.5 - IL_2f73: shr - IL_2f74: pop - IL_2f79: dup - IL_2f7a: ldc.i4.8 - IL_2f7b: or - IL_2f7c: pop - IL_2f81: dup - IL_2f82: ldc.i4.6 - IL_2f83: and - IL_2f84: pop - IL_2f89: dup - IL_2f8a: ldc.i4.2 - IL_2f8b: add - IL_2f8c: pop - IL_2f91: dup - IL_2f92: ldc.i4.8 - IL_2f93: shl - IL_2f94: pop - IL_2f99: dup - IL_2f9a: ldc.i4.0 - IL_2f9b: add - IL_2f9c: pop - IL_2fa1: dup - IL_2fa2: ldc.i4.6 - IL_2fa3: shr - IL_2fa4: pop - IL_2fa9: dup - IL_2faa: ldc.i4.3 - IL_2fab: shr - IL_2fac: pop - IL_2fb1: dup - IL_2fb2: ldc.i4.2 - IL_2fb3: add - IL_2fb4: pop - IL_2fb9: dup - IL_2fba: ldc.i4.5 - IL_2fbb: shr - IL_2fbc: pop - IL_2fc1: dup - IL_2fc2: ldc.i4.3 - IL_2fc3: sub - IL_2fc4: pop - IL_2fc9: dup - IL_2fca: ldc.i4.0 - IL_2fcb: and - IL_2fcc: pop - IL_2fd1: dup - IL_2fd2: ldc.i4.7 - IL_2fd3: shl - IL_2fd4: pop - IL_2fd9: dup - IL_2fda: ldc.i4.1 - IL_2fdb: or - IL_2fdc: pop - IL_2fe1: dup - IL_2fe2: ldc.i4.2 - IL_2fe3: or - IL_2fe4: pop - IL_2fe9: dup - IL_2fea: ldc.i4.3 - IL_2feb: mul - IL_2fec: pop - IL_2ff1: dup - IL_2ff2: ldc.i4.0 - IL_2ff3: add - IL_2ff4: pop - IL_2ff9: dup - IL_2ffa: ldc.i4.8 - IL_2ffb: xor - IL_2ffc: pop - IL_3001: dup - IL_3002: ldc.i4.3 - IL_3003: mul - IL_3004: pop - IL_3009: dup - IL_300a: ldc.i4.3 - IL_300b: mul - IL_300c: pop - IL_3011: dup - IL_3012: ldc.i4.3 - IL_3013: shl - IL_3014: pop - IL_3019: dup - IL_301a: ldc.i4.6 - IL_301b: or - IL_301c: pop - IL_3021: dup - IL_3022: ldc.i4.1 - IL_3023: add - IL_3024: pop - IL_3029: dup - IL_302a: ldc.i4.8 - IL_302b: shl - IL_302c: pop - IL_3031: dup - IL_3032: ldc.i4.2 - IL_3033: and - IL_3034: pop - IL_3039: dup - IL_303a: ldc.i4.6 - IL_303b: mul - IL_303c: pop - IL_3041: dup - IL_3042: ldc.i4.1 - IL_3043: add - IL_3044: pop - IL_3049: dup - IL_304a: ldc.i4.0 - IL_304b: xor - IL_304c: pop - IL_3051: dup - IL_3052: ldc.i4.5 - IL_3053: add - IL_3054: pop - IL_3059: dup - IL_305a: ldc.i4.1 - IL_305b: sub - IL_305c: pop - IL_3061: dup - IL_3062: ldc.i4.6 - IL_3063: mul - IL_3064: pop - IL_3069: dup - IL_306a: ldc.i4.6 - IL_306b: or - IL_306c: pop - IL_3071: dup - IL_3072: ldc.i4.1 - IL_3073: shr - IL_3074: pop - IL_3079: dup - IL_307a: ldc.i4.1 - IL_307b: and - IL_307c: pop - IL_3081: dup - IL_3082: ldc.i4.6 - IL_3083: add - IL_3084: pop - IL_3089: dup - IL_308a: ldc.i4.2 - IL_308b: add - IL_308c: pop - IL_3091: dup - IL_3092: ldc.i4.5 - IL_3093: mul - IL_3094: pop - IL_3099: dup - IL_309a: ldc.i4.2 - IL_309b: and - IL_309c: pop - IL_30a1: dup - IL_30a2: ldc.i4.3 - IL_30a3: sub - IL_30a4: pop - IL_30a9: dup - IL_30aa: ldc.i4.6 - IL_30ab: and - IL_30ac: pop - IL_30b1: dup - IL_30b2: ldc.i4.4 - IL_30b3: shl - IL_30b4: pop - IL_30b9: dup - IL_30ba: ldc.i4.5 - IL_30bb: xor - IL_30bc: pop - IL_30c1: dup - IL_30c2: ldc.i4.1 - IL_30c3: sub - IL_30c4: pop - IL_30c9: dup - IL_30ca: ldc.i4.1 - IL_30cb: or - IL_30cc: pop - IL_30d1: dup - IL_30d2: ldc.i4.8 - IL_30d3: shl - IL_30d4: pop - IL_30d9: dup - IL_30da: ldc.i4.7 - IL_30db: mul - IL_30dc: pop - IL_30e1: dup - IL_30e2: ldc.i4.1 - IL_30e3: sub - IL_30e4: pop - IL_30e9: dup - IL_30ea: ldc.i4.4 - IL_30eb: sub - IL_30ec: pop - IL_30f1: dup - IL_30f2: ldc.i4.6 - IL_30f3: shr - IL_30f4: pop - IL_30f9: dup - IL_30fa: ldc.i4.7 - IL_30fb: xor - IL_30fc: pop - IL_3101: dup - IL_3102: ldc.i4.8 - IL_3103: sub - IL_3104: pop - IL_3109: dup - IL_310a: ldc.i4.7 - IL_310b: mul - IL_310c: pop - IL_3111: dup - IL_3112: ldc.i4.5 - IL_3113: shr - IL_3114: pop - IL_3119: dup - IL_311a: ldc.i4.5 - IL_311b: and - IL_311c: pop - IL_3121: dup - IL_3122: ldc.i4.7 - IL_3123: sub - IL_3124: pop - IL_3129: dup - IL_312a: ldc.i4.8 - IL_312b: xor - IL_312c: pop - IL_3131: dup - IL_3132: ldc.i4.3 - IL_3133: mul - IL_3134: pop - IL_3139: dup - IL_313a: ldc.i4.6 - IL_313b: sub - IL_313c: pop - IL_3141: dup - IL_3142: ldc.i4.5 - IL_3143: xor - IL_3144: pop - IL_3149: dup - IL_314a: ldc.i4.6 - IL_314b: add - IL_314c: pop - IL_3151: dup - IL_3152: ldc.i4.5 - IL_3153: sub - IL_3154: pop - IL_3159: dup - IL_315a: ldc.i4.7 - IL_315b: sub - IL_315c: pop - IL_3161: dup - IL_3162: ldc.i4.1 - IL_3163: or - IL_3164: pop - IL_3169: dup - IL_316a: ldc.i4.8 - IL_316b: xor - IL_316c: pop - IL_3171: dup - IL_3172: ldc.i4.7 - IL_3173: sub - IL_3174: pop - IL_3179: dup - IL_317a: ldc.i4.0 - IL_317b: shr - IL_317c: pop - IL_3181: dup - IL_3182: ldc.i4.2 - IL_3183: sub - IL_3184: pop - IL_3189: dup - IL_318a: ldc.i4.7 - IL_318b: mul - IL_318c: pop - IL_3191: dup - IL_3192: ldc.i4.6 - IL_3193: mul - IL_3194: pop - IL_3199: dup - IL_319a: ldc.i4.7 - IL_319b: shl - IL_319c: pop - IL_31a1: dup - IL_31a2: ldc.i4.4 - IL_31a3: mul - IL_31a4: pop - IL_31a9: dup - IL_31aa: ldc.i4.0 - IL_31ab: shr - IL_31ac: pop - IL_31b1: dup - IL_31b2: ldc.i4.5 - IL_31b3: xor - IL_31b4: pop - IL_31b9: dup - IL_31ba: ldc.i4.8 - IL_31bb: and - IL_31bc: pop - IL_31c1: dup - IL_31c2: ldc.i4.4 - IL_31c3: xor - IL_31c4: pop - IL_31c9: dup - IL_31ca: ldc.i4.5 - IL_31cb: mul - IL_31cc: pop - IL_31d1: dup - IL_31d2: ldc.i4.8 - IL_31d3: and - IL_31d4: pop - IL_31d9: dup - IL_31da: ldc.i4.7 - IL_31db: shr - IL_31dc: pop - IL_31e1: dup - IL_31e2: ldc.i4.3 - IL_31e3: shr - IL_31e4: pop - IL_31e9: dup - IL_31ea: ldc.i4.0 - IL_31eb: shr - IL_31ec: pop - IL_31f1: dup - IL_31f2: ldc.i4.6 - IL_31f3: sub - IL_31f4: pop - IL_31f9: dup - IL_31fa: ldc.i4.0 - IL_31fb: shr - IL_31fc: pop - IL_3201: dup - IL_3202: ldc.i4.1 - IL_3203: mul - IL_3204: pop - IL_3209: dup - IL_320a: ldc.i4.1 - IL_320b: sub - IL_320c: pop - IL_3211: dup - IL_3212: ldc.i4.4 - IL_3213: xor - IL_3214: pop - IL_3219: dup - IL_321a: ldc.i4.4 - IL_321b: sub - IL_321c: pop - IL_3221: dup - IL_3222: ldc.i4.5 - IL_3223: sub - IL_3224: pop - IL_3229: dup - IL_322a: ldc.i4.4 - IL_322b: mul - IL_322c: pop - IL_3231: dup - IL_3232: ldc.i4.1 - IL_3233: sub - IL_3234: pop - IL_3239: dup - IL_323a: ldc.i4.5 - IL_323b: and - IL_323c: pop - IL_3241: dup - IL_3242: ldc.i4.0 - IL_3243: sub - IL_3244: pop - IL_3249: dup - IL_324a: ldc.i4.7 - IL_324b: xor - IL_324c: pop - IL_3251: dup - IL_3252: ldc.i4.5 - IL_3253: shr - IL_3254: pop - IL_3259: dup - IL_325a: ldc.i4.6 - IL_325b: shl - IL_325c: pop - IL_3261: dup - IL_3262: ldc.i4.3 - IL_3263: sub - IL_3264: pop - IL_3269: dup - IL_326a: ldc.i4.7 - IL_326b: add - IL_326c: pop - IL_3271: dup - IL_3272: ldc.i4.2 - IL_3273: sub - IL_3274: pop - IL_3279: dup - IL_327a: ldc.i4.7 - IL_327b: sub - IL_327c: pop - IL_3281: dup - IL_3282: ldc.i4.2 - IL_3283: xor - IL_3284: pop - IL_3289: dup - IL_328a: ldc.i4.4 - IL_328b: mul - IL_328c: pop - IL_3291: dup - IL_3292: ldc.i4.2 - IL_3293: shr - IL_3294: pop - IL_3299: dup - IL_329a: ldc.i4.2 - IL_329b: sub - IL_329c: pop - IL_32a1: dup - IL_32a2: ldc.i4.8 - IL_32a3: mul - IL_32a4: pop - IL_32a9: dup - IL_32aa: ldc.i4.7 - IL_32ab: and - IL_32ac: pop - IL_32b1: dup - IL_32b2: ldc.i4.2 - IL_32b3: shl - IL_32b4: pop - IL_32b9: dup - IL_32ba: ldc.i4.4 - IL_32bb: mul - IL_32bc: pop - IL_32c1: dup - IL_32c2: ldc.i4.0 - IL_32c3: mul - IL_32c4: pop - IL_32c9: dup - IL_32ca: ldc.i4.5 - IL_32cb: shl - IL_32cc: pop - IL_32d1: dup - IL_32d2: ldc.i4.3 - IL_32d3: shl - IL_32d4: pop - IL_32d9: dup - IL_32da: ldc.i4.0 - IL_32db: xor - IL_32dc: pop - IL_32e1: dup - IL_32e2: ldc.i4.5 - IL_32e3: shl - IL_32e4: pop - IL_32e9: dup - IL_32ea: ldc.i4.7 - IL_32eb: mul - IL_32ec: pop - IL_32f1: dup - IL_32f2: ldc.i4.4 - IL_32f3: xor - IL_32f4: pop - IL_32f9: dup - IL_32fa: ldc.i4.8 - IL_32fb: xor - IL_32fc: pop - IL_3301: dup - IL_3302: ldc.i4.3 - IL_3303: mul - IL_3304: pop - IL_3309: dup - IL_330a: ldc.i4.8 - IL_330b: and - IL_330c: pop - IL_3311: dup - IL_3312: ldc.i4.5 - IL_3313: mul - IL_3314: pop - IL_3319: dup - IL_331a: ldc.i4.4 - IL_331b: mul - IL_331c: pop - IL_3321: dup - IL_3322: ldc.i4.8 - IL_3323: shr - IL_3324: pop - IL_3329: dup - IL_332a: ldc.i4.4 - IL_332b: mul - IL_332c: pop - IL_3331: dup - IL_3332: ldc.i4.8 - IL_3333: or - IL_3334: pop - IL_3339: dup - IL_333a: ldc.i4.2 - IL_333b: and - IL_333c: pop - IL_3341: dup - IL_3342: ldc.i4.5 - IL_3343: shl - IL_3344: pop - IL_3349: dup - IL_334a: ldc.i4.8 - IL_334b: or - IL_334c: pop - IL_3351: dup - IL_3352: ldc.i4.4 - IL_3353: sub - IL_3354: pop - IL_3359: dup - IL_335a: ldc.i4.8 - IL_335b: shr - IL_335c: pop - IL_3361: dup - IL_3362: ldc.i4.2 - IL_3363: add - IL_3364: pop - IL_3369: dup - IL_336a: ldc.i4.6 - IL_336b: shr - IL_336c: pop - IL_3371: dup - IL_3372: ldc.i4.8 - IL_3373: or - IL_3374: pop - IL_3379: dup - IL_337a: ldc.i4.5 - IL_337b: xor - IL_337c: pop - IL_3381: dup - IL_3382: ldc.i4.3 - IL_3383: xor - IL_3384: pop - IL_3389: dup - IL_338a: ldc.i4.3 - IL_338b: or - IL_338c: pop - IL_3391: dup - IL_3392: ldc.i4.5 - IL_3393: and - IL_3394: pop - IL_3399: dup - IL_339a: ldc.i4.6 - IL_339b: shr - IL_339c: pop - IL_33a1: dup - IL_33a2: ldc.i4.6 - IL_33a3: mul - IL_33a4: pop - IL_33a9: dup - IL_33aa: ldc.i4.6 - IL_33ab: shl - IL_33ac: pop - IL_33b1: dup - IL_33b2: ldc.i4.1 - IL_33b3: and - IL_33b4: pop - IL_33b9: dup - IL_33ba: ldc.i4.4 - IL_33bb: shl - IL_33bc: pop - IL_33c1: dup - IL_33c2: ldc.i4.3 - IL_33c3: add - IL_33c4: pop - IL_33c9: dup - IL_33ca: ldc.i4.6 - IL_33cb: or - IL_33cc: pop - IL_33d1: dup - IL_33d2: ldc.i4.4 - IL_33d3: add - IL_33d4: pop - IL_33d9: dup - IL_33da: ldc.i4.7 - IL_33db: sub - IL_33dc: pop - IL_33e1: dup - IL_33e2: ldc.i4.3 - IL_33e3: mul - IL_33e4: pop - IL_33e9: dup - IL_33ea: ldc.i4.4 - IL_33eb: xor - IL_33ec: pop - IL_33f1: dup - IL_33f2: ldc.i4.5 - IL_33f3: or - IL_33f4: pop - IL_33f9: dup - IL_33fa: ldc.i4.3 - IL_33fb: add - IL_33fc: pop - IL_3401: dup - IL_3402: ldc.i4.0 - IL_3403: add - IL_3404: pop - IL_3409: dup - IL_340a: ldc.i4.8 - IL_340b: shl - IL_340c: pop - IL_3411: dup - IL_3412: ldc.i4.5 - IL_3413: mul - IL_3414: pop - IL_3419: dup - IL_341a: ldc.i4.1 - IL_341b: and - IL_341c: pop - IL_3421: dup - IL_3422: ldc.i4.8 - IL_3423: mul - IL_3424: pop - IL_3429: dup - IL_342a: ldc.i4.1 - IL_342b: sub - IL_342c: pop - IL_3431: dup - IL_3432: ldc.i4.4 - IL_3433: mul - IL_3434: pop - IL_3439: dup - IL_343a: ldc.i4.4 - IL_343b: xor - IL_343c: pop - IL_3441: dup - IL_3442: ldc.i4.5 - IL_3443: add - IL_3444: pop - IL_3449: dup - IL_344a: ldc.i4.2 - IL_344b: and - IL_344c: pop - IL_3451: dup - IL_3452: ldc.i4.1 - IL_3453: shr - IL_3454: pop - IL_3459: dup - IL_345a: ldc.i4.8 - IL_345b: mul - IL_345c: pop - IL_3461: dup - IL_3462: ldc.i4.4 - IL_3463: sub - IL_3464: pop - IL_3469: dup - IL_346a: ldc.i4.4 - IL_346b: mul - IL_346c: pop - IL_3471: dup - IL_3472: ldc.i4.3 - IL_3473: sub - IL_3474: pop - IL_3479: dup - IL_347a: ldc.i4.8 - IL_347b: or - IL_347c: pop - IL_3481: dup - IL_3482: ldc.i4.0 - IL_3483: shr - IL_3484: pop - IL_3489: dup - IL_348a: ldc.i4.4 - IL_348b: add - IL_348c: pop - IL_3491: dup - IL_3492: ldc.i4.8 - IL_3493: or - IL_3494: pop - IL_3499: dup - IL_349a: ldc.i4.8 - IL_349b: add - IL_349c: pop - IL_34a1: dup - IL_34a2: ldc.i4.8 - IL_34a3: or - IL_34a4: pop - IL_34a9: dup - IL_34aa: ldc.i4.0 - IL_34ab: sub - IL_34ac: pop - IL_34b1: dup - IL_34b2: ldc.i4.7 - IL_34b3: shr - IL_34b4: pop - IL_34b9: dup - IL_34ba: ldc.i4.6 - IL_34bb: sub - IL_34bc: pop - IL_34c1: dup - IL_34c2: ldc.i4.6 - IL_34c3: add - IL_34c4: pop - IL_34c9: dup - IL_34ca: ldc.i4.8 - IL_34cb: shl - IL_34cc: pop - IL_34d1: dup - IL_34d2: ldc.i4.5 - IL_34d3: xor - IL_34d4: pop - IL_34d9: dup - IL_34da: ldc.i4.7 - IL_34db: xor - IL_34dc: pop - IL_34e1: dup - IL_34e2: ldc.i4.0 - IL_34e3: shl - IL_34e4: pop - IL_34e9: dup - IL_34ea: ldc.i4.8 - IL_34eb: shl - IL_34ec: pop - IL_34f1: dup - IL_34f2: ldc.i4.7 - IL_34f3: and - IL_34f4: pop - IL_34f9: dup - IL_34fa: ldc.i4.4 - IL_34fb: shr - IL_34fc: pop - IL_3501: dup - IL_3502: ldc.i4.2 - IL_3503: mul - IL_3504: pop - IL_3509: dup - IL_350a: ldc.i4.1 - IL_350b: and - IL_350c: pop - IL_3511: dup - IL_3512: ldc.i4.6 - IL_3513: xor - IL_3514: pop - IL_3519: dup - IL_351a: ldc.i4.4 - IL_351b: shl - IL_351c: pop - IL_3521: dup - IL_3522: ldc.i4.1 - IL_3523: mul - IL_3524: pop - IL_3529: dup - IL_352a: ldc.i4.8 - IL_352b: sub - IL_352c: pop - IL_3531: dup - IL_3532: ldc.i4.6 - IL_3533: and - IL_3534: pop - IL_3539: dup - IL_353a: ldc.i4.4 - IL_353b: or - IL_353c: pop - IL_3541: dup - IL_3542: ldc.i4.4 - IL_3543: xor - IL_3544: pop - IL_3549: dup - IL_354a: ldc.i4.4 - IL_354b: mul - IL_354c: pop - IL_3551: dup - IL_3552: ldc.i4.2 - IL_3553: xor - IL_3554: pop - IL_3559: dup - IL_355a: ldc.i4.2 - IL_355b: shl - IL_355c: pop - IL_3561: dup - IL_3562: ldc.i4.7 - IL_3563: sub - IL_3564: pop - IL_3569: dup - IL_356a: ldc.i4.0 - IL_356b: xor - IL_356c: pop - IL_3571: dup - IL_3572: ldc.i4.0 - IL_3573: xor - IL_3574: pop - IL_3579: dup - IL_357a: ldc.i4.1 - IL_357b: add - IL_357c: pop - IL_3581: dup - IL_3582: ldc.i4.4 - IL_3583: mul - IL_3584: pop - IL_3589: dup - IL_358a: ldc.i4.7 - IL_358b: shl - IL_358c: pop - IL_3591: dup - IL_3592: ldc.i4.4 - IL_3593: and - IL_3594: pop - IL_3599: dup - IL_359a: ldc.i4.3 - IL_359b: mul - IL_359c: pop - IL_35a1: dup - IL_35a2: ldc.i4.4 - IL_35a3: mul - IL_35a4: pop - IL_35a9: dup - IL_35aa: ldc.i4.3 - IL_35ab: mul - IL_35ac: pop - IL_35b1: dup - IL_35b2: ldc.i4.5 - IL_35b3: shr - IL_35b4: pop - IL_35b9: dup - IL_35ba: ldc.i4.6 - IL_35bb: sub - IL_35bc: pop - IL_35c1: dup - IL_35c2: ldc.i4.0 - IL_35c3: add - IL_35c4: pop - IL_35c9: dup - IL_35ca: ldc.i4.0 - IL_35cb: xor - IL_35cc: pop - IL_35d1: dup - IL_35d2: ldc.i4.2 - IL_35d3: add - IL_35d4: pop - IL_35d9: dup - IL_35da: ldc.i4.3 - IL_35db: or - IL_35dc: pop - IL_35e1: dup - IL_35e2: ldc.i4.8 - IL_35e3: shr - IL_35e4: pop - IL_35e9: dup - IL_35ea: ldc.i4.0 - IL_35eb: shr - IL_35ec: pop - IL_35f1: dup - IL_35f2: ldc.i4.3 - IL_35f3: add - IL_35f4: pop - IL_35f9: dup - IL_35fa: ldc.i4.5 - IL_35fb: shr - IL_35fc: pop - IL_3601: dup - IL_3602: ldc.i4.0 - IL_3603: and - IL_3604: pop - IL_3609: dup - IL_360a: ldc.i4.6 - IL_360b: mul - IL_360c: pop - IL_3611: dup - IL_3612: ldc.i4.0 - IL_3613: or - IL_3614: pop - IL_3619: dup - IL_361a: ldc.i4.3 - IL_361b: shl - IL_361c: pop - IL_3621: dup - IL_3622: ldc.i4.0 - IL_3623: sub - IL_3624: pop - IL_3629: dup - IL_362a: ldc.i4.7 - IL_362b: add - IL_362c: pop - IL_3631: dup - IL_3632: ldc.i4.0 - IL_3633: add - IL_3634: pop - IL_3639: dup - IL_363a: ldc.i4.8 - IL_363b: sub - IL_363c: pop - IL_3641: dup - IL_3642: ldc.i4.3 - IL_3643: or - IL_3644: pop - IL_3649: dup - IL_364a: ldc.i4.2 - IL_364b: or - IL_364c: pop - IL_3651: dup - IL_3652: ldc.i4.3 - IL_3653: and - IL_3654: pop - IL_3659: dup - IL_365a: ldc.i4.7 - IL_365b: mul - IL_365c: pop - IL_3661: dup - IL_3662: ldc.i4.8 - IL_3663: or - IL_3664: pop - IL_3669: dup - IL_366a: ldc.i4.5 - IL_366b: and - IL_366c: pop - IL_3671: dup - IL_3672: ldc.i4.7 - IL_3673: shr - IL_3674: pop - IL_3679: dup - IL_367a: ldc.i4.8 - IL_367b: xor - IL_367c: pop - IL_3681: dup - IL_3682: ldc.i4.6 - IL_3683: and - IL_3684: pop - IL_3689: dup - IL_368a: ldc.i4.1 - IL_368b: and - IL_368c: pop - IL_3691: dup - IL_3692: ldc.i4.8 - IL_3693: mul - IL_3694: pop - IL_3699: dup - IL_369a: ldc.i4.1 - IL_369b: sub - IL_369c: pop - IL_36a1: dup - IL_36a2: ldc.i4.6 - IL_36a3: xor - IL_36a4: pop - IL_36a9: dup - IL_36aa: ldc.i4.3 - IL_36ab: add - IL_36ac: pop - IL_36b1: dup - IL_36b2: ldc.i4.2 - IL_36b3: xor - IL_36b4: pop - IL_36b9: dup - IL_36ba: ldc.i4.8 - IL_36bb: or - IL_36bc: pop - IL_36c1: dup - IL_36c2: ldc.i4.6 - IL_36c3: and - IL_36c4: pop - IL_36c9: dup - IL_36ca: ldc.i4.1 - IL_36cb: xor - IL_36cc: pop - IL_36d1: dup - IL_36d2: ldc.i4.7 - IL_36d3: shr - IL_36d4: pop - IL_36d9: dup - IL_36da: ldc.i4.2 - IL_36db: mul - IL_36dc: pop - IL_36e1: dup - IL_36e2: ldc.i4.8 - IL_36e3: mul - IL_36e4: pop - IL_36e9: dup - IL_36ea: ldc.i4.4 - IL_36eb: add - IL_36ec: pop - IL_36f1: dup - IL_36f2: ldc.i4.2 - IL_36f3: shl - IL_36f4: pop - IL_36f9: dup - IL_36fa: ldc.i4.7 - IL_36fb: mul - IL_36fc: pop - IL_3701: dup - IL_3702: ldc.i4.2 - IL_3703: xor - IL_3704: pop - IL_3709: dup - IL_370a: ldc.i4.2 - IL_370b: sub - IL_370c: pop - IL_3711: dup - IL_3712: ldc.i4.7 - IL_3713: sub - IL_3714: pop - IL_3719: dup - IL_371a: ldc.i4.1 - IL_371b: add - IL_371c: pop - IL_3721: dup - IL_3722: ldc.i4.6 - IL_3723: add - IL_3724: pop - IL_3729: dup - IL_372a: ldc.i4.2 - IL_372b: or - IL_372c: pop - IL_3731: dup - IL_3732: ldc.i4.3 - IL_3733: and - IL_3734: pop - IL_3739: dup - IL_373a: ldc.i4.0 - IL_373b: shl - IL_373c: pop - IL_3741: dup - IL_3742: ldc.i4.0 - IL_3743: shr - IL_3744: pop - IL_3749: dup - IL_374a: ldc.i4.1 - IL_374b: or - IL_374c: pop - IL_3751: dup - IL_3752: ldc.i4.5 - IL_3753: shl - IL_3754: pop - IL_3759: dup - IL_375a: ldc.i4.5 - IL_375b: add - IL_375c: pop - IL_3761: dup - IL_3762: ldc.i4.4 - IL_3763: or - IL_3764: pop - IL_3769: dup - IL_376a: ldc.i4.7 - IL_376b: shl - IL_376c: pop - IL_3771: dup - IL_3772: ldc.i4.7 - IL_3773: add - IL_3774: pop - IL_3779: dup - IL_377a: ldc.i4.8 - IL_377b: sub - IL_377c: pop - IL_3781: dup - IL_3782: ldc.i4.5 - IL_3783: sub - IL_3784: pop - IL_3789: dup - IL_378a: ldc.i4.6 - IL_378b: or - IL_378c: pop - IL_3791: dup - IL_3792: ldc.i4.0 - IL_3793: shr - IL_3794: pop - IL_3799: dup - IL_379a: ldc.i4.0 - IL_379b: shl - IL_379c: pop - IL_37a1: dup - IL_37a2: ldc.i4.5 - IL_37a3: add - IL_37a4: pop - IL_37a9: dup - IL_37aa: ldc.i4.6 - IL_37ab: shr - IL_37ac: pop - IL_37b1: dup - IL_37b2: ldc.i4.3 - IL_37b3: sub - IL_37b4: pop - IL_37b9: dup - IL_37ba: ldc.i4.8 - IL_37bb: sub - IL_37bc: pop - IL_37c1: dup - IL_37c2: ldc.i4.2 - IL_37c3: or - IL_37c4: pop - IL_37c9: dup - IL_37ca: ldc.i4.0 - IL_37cb: shl - IL_37cc: pop - IL_37d1: dup - IL_37d2: ldc.i4.3 - IL_37d3: and - IL_37d4: pop - IL_37d9: dup - IL_37da: ldc.i4.6 - IL_37db: and - IL_37dc: pop - IL_37e1: dup - IL_37e2: ldc.i4.6 - IL_37e3: mul - IL_37e4: pop - IL_37e9: dup - IL_37ea: ldc.i4.6 - IL_37eb: or - IL_37ec: pop - IL_37f1: dup - IL_37f2: ldc.i4.3 - IL_37f3: shl - IL_37f4: pop - IL_37f9: dup - IL_37fa: ldc.i4.2 - IL_37fb: shr - IL_37fc: pop - IL_3801: dup - IL_3802: ldc.i4.1 - IL_3803: add - IL_3804: pop - IL_3809: dup - IL_380a: ldc.i4.3 - IL_380b: sub - IL_380c: pop - IL_3811: dup - IL_3812: ldc.i4.0 - IL_3813: sub - IL_3814: pop - IL_3819: dup - IL_381a: ldc.i4.3 - IL_381b: mul - IL_381c: pop - IL_3821: dup - IL_3822: ldc.i4.6 - IL_3823: shr - IL_3824: pop - IL_3829: dup - IL_382a: ldc.i4.2 - IL_382b: xor - IL_382c: pop - IL_3831: dup - IL_3832: ldc.i4.7 - IL_3833: or - IL_3834: pop - IL_3839: dup - IL_383a: ldc.i4.5 - IL_383b: mul - IL_383c: pop - IL_3841: dup - IL_3842: ldc.i4.8 - IL_3843: shr - IL_3844: pop - IL_3849: dup - IL_384a: ldc.i4.3 - IL_384b: or - IL_384c: pop - IL_3851: dup - IL_3852: ldc.i4.0 - IL_3853: xor - IL_3854: pop - IL_3859: dup - IL_385a: ldc.i4.6 - IL_385b: and - IL_385c: pop - IL_3861: dup - IL_3862: ldc.i4.3 - IL_3863: or - IL_3864: pop - IL_3869: dup - IL_386a: ldc.i4.1 - IL_386b: and - IL_386c: pop - IL_3871: dup - IL_3872: ldc.i4.8 - IL_3873: add - IL_3874: pop - IL_3879: dup - IL_387a: ldc.i4.1 - IL_387b: add - IL_387c: pop - IL_3881: dup - IL_3882: ldc.i4.7 - IL_3883: add - IL_3884: pop - IL_3889: dup - IL_388a: ldc.i4.4 - IL_388b: mul - IL_388c: pop - IL_3891: dup - IL_3892: ldc.i4.7 - IL_3893: shr - IL_3894: pop - IL_3899: dup - IL_389a: ldc.i4.0 - IL_389b: add - IL_389c: pop - IL_38a1: dup - IL_38a2: ldc.i4.4 - IL_38a3: shr - IL_38a4: pop - IL_38a9: dup - IL_38aa: ldc.i4.7 - IL_38ab: and - IL_38ac: pop - IL_38b1: dup - IL_38b2: ldc.i4.5 - IL_38b3: sub - IL_38b4: pop - IL_38b9: dup - IL_38ba: ldc.i4.8 - IL_38bb: and - IL_38bc: pop - IL_38c1: dup - IL_38c2: ldc.i4.5 - IL_38c3: xor - IL_38c4: pop - IL_38c9: dup - IL_38ca: ldc.i4.0 - IL_38cb: and - IL_38cc: pop - IL_38d1: dup - IL_38d2: ldc.i4.2 - IL_38d3: mul - IL_38d4: pop - IL_38d9: dup - IL_38da: ldc.i4.5 - IL_38db: shr - IL_38dc: pop - IL_38e1: dup - IL_38e2: ldc.i4.2 - IL_38e3: shr - IL_38e4: pop - IL_38e9: dup - IL_38ea: ldc.i4.7 - IL_38eb: add - IL_38ec: pop - IL_38f1: dup - IL_38f2: ldc.i4.0 - IL_38f3: shl - IL_38f4: pop - IL_38f9: dup - IL_38fa: ldc.i4.3 - IL_38fb: shr - IL_38fc: pop - IL_3901: dup - IL_3902: ldc.i4.4 - IL_3903: sub - IL_3904: pop - IL_3909: dup - IL_390a: ldc.i4.6 - IL_390b: shr - IL_390c: pop - IL_3911: dup - IL_3912: ldc.i4.3 - IL_3913: sub - IL_3914: pop - IL_3919: dup - IL_391a: ldc.i4.3 - IL_391b: mul - IL_391c: pop - IL_3921: dup - IL_3922: ldc.i4.4 - IL_3923: sub - IL_3924: pop - IL_3929: dup - IL_392a: ldc.i4.3 - IL_392b: mul - IL_392c: pop - IL_3931: dup - IL_3932: ldc.i4.5 - IL_3933: or - IL_3934: pop - IL_3939: dup - IL_393a: ldc.i4.1 - IL_393b: sub - IL_393c: pop - IL_3941: dup - IL_3942: ldc.i4.0 - IL_3943: mul - IL_3944: pop - IL_3949: dup - IL_394a: ldc.i4.1 - IL_394b: shl - IL_394c: pop - IL_3951: dup - IL_3952: ldc.i4.0 - IL_3953: mul - IL_3954: pop - IL_3959: dup - IL_395a: ldc.i4.7 - IL_395b: shl - IL_395c: pop - IL_3961: dup - IL_3962: ldc.i4.3 - IL_3963: and - IL_3964: pop - IL_3969: dup - IL_396a: ldc.i4.0 - IL_396b: sub - IL_396c: pop - IL_3971: dup - IL_3972: ldc.i4.8 - IL_3973: add - IL_3974: pop - IL_3979: dup - IL_397a: ldc.i4.0 - IL_397b: or - IL_397c: pop - IL_3981: dup - IL_3982: ldc.i4.2 - IL_3983: sub - IL_3984: pop - IL_3989: dup - IL_398a: ldc.i4.2 - IL_398b: mul - IL_398c: pop - IL_3991: dup - IL_3992: ldc.i4.4 - IL_3993: mul - IL_3994: pop - IL_3999: dup - IL_399a: ldc.i4.3 - IL_399b: xor - IL_399c: pop - IL_39a1: dup - IL_39a2: ldc.i4.0 - IL_39a3: and - IL_39a4: pop - IL_39a9: dup - IL_39aa: ldc.i4.1 - IL_39ab: add - IL_39ac: pop - IL_39b1: dup - IL_39b2: ldc.i4.8 - IL_39b3: mul - IL_39b4: pop - IL_39b9: dup - IL_39ba: ldc.i4.0 - IL_39bb: mul - IL_39bc: pop - IL_39c1: dup - IL_39c2: ldc.i4.4 - IL_39c3: shl - IL_39c4: pop - IL_39c9: dup - IL_39ca: ldc.i4.0 - IL_39cb: shr - IL_39cc: pop - IL_39d1: dup - IL_39d2: ldc.i4.3 - IL_39d3: or - IL_39d4: pop - IL_39d9: dup - IL_39da: ldc.i4.5 - IL_39db: sub - IL_39dc: pop - IL_39e1: dup - IL_39e2: ldc.i4.3 - IL_39e3: sub - IL_39e4: pop - IL_39e9: dup - IL_39ea: ldc.i4.2 - IL_39eb: shl - IL_39ec: pop - IL_39f1: dup - IL_39f2: ldc.i4.1 - IL_39f3: sub - IL_39f4: pop - IL_39f9: dup - IL_39fa: ldc.i4.3 - IL_39fb: xor - IL_39fc: pop - IL_3a01: dup - IL_3a02: ldc.i4.1 - IL_3a03: xor - IL_3a04: pop - IL_3a09: dup - IL_3a0a: ldc.i4.0 - IL_3a0b: xor - IL_3a0c: pop - IL_3a11: dup - IL_3a12: ldc.i4.6 - IL_3a13: and - IL_3a14: pop - IL_3a19: dup - IL_3a1a: ldc.i4.6 - IL_3a1b: shr - IL_3a1c: pop - IL_3a21: dup - IL_3a22: ldc.i4.8 - IL_3a23: and - IL_3a24: pop - IL_3a29: dup - IL_3a2a: ldc.i4.4 - IL_3a2b: mul - IL_3a2c: pop - IL_3a31: dup - IL_3a32: ldc.i4.1 - IL_3a33: and - IL_3a34: pop - IL_3a39: dup - IL_3a3a: ldc.i4.5 - IL_3a3b: add - IL_3a3c: pop - IL_3a41: dup - IL_3a42: ldc.i4.6 - IL_3a43: shr - IL_3a44: pop - IL_3a49: dup - IL_3a4a: ldc.i4.7 - IL_3a4b: mul - IL_3a4c: pop - IL_3a51: dup - IL_3a52: ldc.i4.0 - IL_3a53: xor - IL_3a54: pop - IL_3a59: dup - IL_3a5a: ldc.i4.4 - IL_3a5b: mul - IL_3a5c: pop - IL_3a61: dup - IL_3a62: ldc.i4.5 - IL_3a63: add - IL_3a64: pop - IL_3a69: dup - IL_3a6a: ldc.i4.8 - IL_3a6b: mul - IL_3a6c: pop - IL_3a71: dup - IL_3a72: ldc.i4.0 - IL_3a73: and - IL_3a74: pop - IL_3a79: dup - IL_3a7a: ldc.i4.1 - IL_3a7b: and - IL_3a7c: pop - IL_3a81: dup - IL_3a82: ldc.i4.3 - IL_3a83: shr - IL_3a84: pop - IL_3a89: dup - IL_3a8a: ldc.i4.8 - IL_3a8b: xor - IL_3a8c: pop - IL_3a91: dup - IL_3a92: ldc.i4.2 - IL_3a93: shl - IL_3a94: pop - IL_3a99: dup - IL_3a9a: ldc.i4.5 - IL_3a9b: shl - IL_3a9c: pop - IL_3aa1: dup - IL_3aa2: ldc.i4.7 - IL_3aa3: mul - IL_3aa4: pop - IL_3aa9: dup - IL_3aaa: ldc.i4.7 - IL_3aab: shr - IL_3aac: pop - IL_3ab1: dup - IL_3ab2: ldc.i4.3 - IL_3ab3: mul - IL_3ab4: pop - IL_3ab9: dup - IL_3aba: ldc.i4.0 - IL_3abb: shr - IL_3abc: pop - IL_3ac1: dup - IL_3ac2: ldc.i4.5 - IL_3ac3: sub - IL_3ac4: pop - IL_3ac9: dup - IL_3aca: ldc.i4.7 - IL_3acb: shl - IL_3acc: pop - IL_3ad1: dup - IL_3ad2: ldc.i4.3 - IL_3ad3: add - IL_3ad4: pop - IL_3ad9: dup - IL_3ada: ldc.i4.4 - IL_3adb: and - IL_3adc: pop - IL_3ae1: dup - IL_3ae2: ldc.i4.8 - IL_3ae3: shr - IL_3ae4: pop - IL_3ae9: dup - IL_3aea: ldc.i4.7 - IL_3aeb: shl - IL_3aec: pop - IL_3af1: dup - IL_3af2: ldc.i4.8 - IL_3af3: mul - IL_3af4: pop - IL_3af9: dup - IL_3afa: ldc.i4.6 - IL_3afb: add - IL_3afc: pop - IL_3b01: dup - IL_3b02: ldc.i4.5 - IL_3b03: shl - IL_3b04: pop - IL_3b09: dup - IL_3b0a: ldc.i4.7 - IL_3b0b: xor - IL_3b0c: pop - IL_3b11: dup - IL_3b12: ldc.i4.7 - IL_3b13: sub - IL_3b14: pop - IL_3b19: dup - IL_3b1a: ldc.i4.7 - IL_3b1b: sub - IL_3b1c: pop - IL_3b21: dup - IL_3b22: ldc.i4.0 - IL_3b23: sub - IL_3b24: pop - IL_3b29: dup - IL_3b2a: ldc.i4.4 - IL_3b2b: shr - IL_3b2c: pop - IL_3b31: dup - IL_3b32: ldc.i4.5 - IL_3b33: or - IL_3b34: pop - IL_3b39: dup - IL_3b3a: ldc.i4.8 - IL_3b3b: mul - IL_3b3c: pop - IL_3b41: dup - IL_3b42: ldc.i4.0 - IL_3b43: mul - IL_3b44: pop - IL_3b49: dup - IL_3b4a: ldc.i4.7 - IL_3b4b: and - IL_3b4c: pop - IL_3b51: dup - IL_3b52: ldc.i4.0 - IL_3b53: shr - IL_3b54: pop - IL_3b59: dup - IL_3b5a: ldc.i4.4 - IL_3b5b: mul - IL_3b5c: pop - IL_3b61: dup - IL_3b62: ldc.i4.2 - IL_3b63: sub - IL_3b64: pop - IL_3b69: dup - IL_3b6a: ldc.i4.4 - IL_3b6b: shl - IL_3b6c: pop - IL_3b71: dup - IL_3b72: ldc.i4.6 - IL_3b73: add - IL_3b74: pop - IL_3b79: dup - IL_3b7a: ldc.i4.6 - IL_3b7b: shl - IL_3b7c: pop - IL_3b81: dup - IL_3b82: ldc.i4.5 - IL_3b83: shr - IL_3b84: pop - IL_3b89: dup - IL_3b8a: ldc.i4.0 - IL_3b8b: and - IL_3b8c: pop - IL_3b91: dup - IL_3b92: ldc.i4.4 - IL_3b93: shl - IL_3b94: pop - IL_3b99: dup - IL_3b9a: ldc.i4.6 - IL_3b9b: mul - IL_3b9c: pop - IL_3ba1: dup - IL_3ba2: ldc.i4.2 - IL_3ba3: shr - IL_3ba4: pop - IL_3ba9: dup - IL_3baa: ldc.i4.4 - IL_3bab: sub - IL_3bac: pop - IL_3bb1: dup - IL_3bb2: ldc.i4.5 - IL_3bb3: and - IL_3bb4: pop - IL_3bb9: dup - IL_3bba: ldc.i4.1 - IL_3bbb: add - IL_3bbc: pop - IL_3bc1: dup - IL_3bc2: ldc.i4.6 - IL_3bc3: shl - IL_3bc4: pop - IL_3bc9: dup - IL_3bca: ldc.i4.4 - IL_3bcb: shr - IL_3bcc: pop - IL_3bd1: dup - IL_3bd2: ldc.i4.5 - IL_3bd3: or - IL_3bd4: pop - IL_3bd9: dup - IL_3bda: ldc.i4.0 - IL_3bdb: or - IL_3bdc: pop - IL_3be1: dup - IL_3be2: ldc.i4.1 - IL_3be3: shl - IL_3be4: pop - IL_3be9: dup - IL_3bea: ldc.i4.1 - IL_3beb: shr - IL_3bec: pop - IL_3bf1: dup - IL_3bf2: ldc.i4.6 - IL_3bf3: sub - IL_3bf4: pop - IL_3bf9: dup - IL_3bfa: ldc.i4.3 - IL_3bfb: add - IL_3bfc: pop - IL_3c01: dup - IL_3c02: ldc.i4.4 - IL_3c03: or - IL_3c04: pop - IL_3c09: dup - IL_3c0a: ldc.i4.0 - IL_3c0b: or - IL_3c0c: pop - IL_3c11: dup - IL_3c12: ldc.i4.7 - IL_3c13: sub - IL_3c14: pop - IL_3c19: dup - IL_3c1a: ldc.i4.7 - IL_3c1b: xor - IL_3c1c: pop - IL_3c21: dup - IL_3c22: ldc.i4.4 - IL_3c23: xor - IL_3c24: pop - IL_3c29: dup - IL_3c2a: ldc.i4.4 - IL_3c2b: mul - IL_3c2c: pop - IL_3c31: dup - IL_3c32: ldc.i4.1 - IL_3c33: mul - IL_3c34: pop - IL_3c39: dup - IL_3c3a: ldc.i4.6 - IL_3c3b: xor - IL_3c3c: pop - IL_3c41: dup - IL_3c42: ldc.i4.8 - IL_3c43: xor - IL_3c44: pop - IL_3c49: dup - IL_3c4a: ldc.i4.7 - IL_3c4b: sub - IL_3c4c: pop - IL_3c51: dup - IL_3c52: ldc.i4.4 - IL_3c53: add - IL_3c54: pop - IL_3c59: dup - IL_3c5a: ldc.i4.8 - IL_3c5b: shr - IL_3c5c: pop - IL_3c61: dup - IL_3c62: ldc.i4.5 - IL_3c63: sub - IL_3c64: pop - IL_3c69: dup - IL_3c6a: ldc.i4.6 - IL_3c6b: or - IL_3c6c: pop - IL_3c71: dup - IL_3c72: ldc.i4.4 - IL_3c73: add - IL_3c74: pop - IL_3c79: dup - IL_3c7a: ldc.i4.5 - IL_3c7b: add - IL_3c7c: pop - IL_3c81: dup - IL_3c82: ldc.i4.2 - IL_3c83: xor - IL_3c84: pop - IL_3c89: dup - IL_3c8a: ldc.i4.6 - IL_3c8b: shr - IL_3c8c: pop - IL_3c91: dup - IL_3c92: ldc.i4.6 - IL_3c93: mul - IL_3c94: pop - IL_3c99: dup - IL_3c9a: ldc.i4.1 - IL_3c9b: shl - IL_3c9c: pop - IL_3ca1: dup - IL_3ca2: ldc.i4.7 - IL_3ca3: add - IL_3ca4: pop - IL_3ca9: dup - IL_3caa: ldc.i4.1 - IL_3cab: sub - IL_3cac: pop - IL_3cb1: dup - IL_3cb2: ldc.i4.3 - IL_3cb3: shr - IL_3cb4: pop - IL_3cb9: dup - IL_3cba: ldc.i4.6 - IL_3cbb: and - IL_3cbc: pop - IL_3cc1: dup - IL_3cc2: ldc.i4.6 - IL_3cc3: shr - IL_3cc4: pop - IL_3cc9: dup - IL_3cca: ldc.i4.6 - IL_3ccb: mul - IL_3ccc: pop - IL_3cd1: dup - IL_3cd2: ldc.i4.3 - IL_3cd3: sub - IL_3cd4: pop - IL_3cd9: dup - IL_3cda: ldc.i4.4 - IL_3cdb: xor - IL_3cdc: pop - IL_3ce1: dup - IL_3ce2: ldc.i4.8 - IL_3ce3: mul - IL_3ce4: pop - IL_3ce9: dup - IL_3cea: ldc.i4.2 - IL_3ceb: shr - IL_3cec: pop - IL_3cf1: dup - IL_3cf2: ldc.i4.4 - IL_3cf3: and - IL_3cf4: pop - IL_3cf9: dup - IL_3cfa: ldc.i4.0 - IL_3cfb: xor - IL_3cfc: pop - IL_3d01: dup - IL_3d02: ldc.i4.7 - IL_3d03: xor - IL_3d04: pop - IL_3d09: dup - IL_3d0a: ldc.i4.0 - IL_3d0b: shr - IL_3d0c: pop - IL_3d11: dup - IL_3d12: ldc.i4.4 - IL_3d13: add - IL_3d14: pop - IL_3d19: dup - IL_3d1a: ldc.i4.6 - IL_3d1b: shr - IL_3d1c: pop - IL_3d21: dup - IL_3d22: ldc.i4.1 - IL_3d23: mul - IL_3d24: pop - IL_3d29: dup - IL_3d2a: ldc.i4.3 - IL_3d2b: xor - IL_3d2c: pop - IL_3d31: dup - IL_3d32: ldc.i4.8 - IL_3d33: and - IL_3d34: pop - IL_3d39: dup - IL_3d3a: ldc.i4.3 - IL_3d3b: or - IL_3d3c: pop - IL_3d41: dup - IL_3d42: ldc.i4.4 - IL_3d43: and - IL_3d44: pop - IL_3d49: dup - IL_3d4a: ldc.i4.2 - IL_3d4b: and - IL_3d4c: pop - IL_3d51: dup - IL_3d52: ldc.i4.2 - IL_3d53: mul - IL_3d54: pop - IL_3d59: dup - IL_3d5a: ldc.i4.6 - IL_3d5b: add - IL_3d5c: pop - IL_3d61: dup - IL_3d62: ldc.i4.8 - IL_3d63: mul - IL_3d64: pop - IL_3d69: dup - IL_3d6a: ldc.i4.6 - IL_3d6b: xor - IL_3d6c: pop - IL_3d71: dup - IL_3d72: ldc.i4.0 - IL_3d73: shl - IL_3d74: pop - IL_3d79: dup - IL_3d7a: ldc.i4.1 - IL_3d7b: or - IL_3d7c: pop - IL_3d81: dup - IL_3d82: ldc.i4.0 - IL_3d83: shr - IL_3d84: pop - IL_3d89: dup - IL_3d8a: ldc.i4.2 - IL_3d8b: or - IL_3d8c: pop - IL_3d91: dup - IL_3d92: ldc.i4.5 - IL_3d93: add - IL_3d94: pop - IL_3d99: dup - IL_3d9a: ldc.i4.2 - IL_3d9b: shr - IL_3d9c: pop - IL_3da1: dup - IL_3da2: ldc.i4.8 - IL_3da3: add - IL_3da4: pop - IL_3da9: dup - IL_3daa: ldc.i4.1 - IL_3dab: add - IL_3dac: pop - IL_3db1: dup - IL_3db2: ldc.i4.7 - IL_3db3: add - IL_3db4: pop - IL_3db9: dup - IL_3dba: ldc.i4.4 - IL_3dbb: sub - IL_3dbc: pop - IL_3dc1: dup - IL_3dc2: ldc.i4.8 - IL_3dc3: mul - IL_3dc4: pop - IL_3dc9: dup - IL_3dca: ldc.i4.1 - IL_3dcb: shr - IL_3dcc: pop - IL_3dd1: dup - IL_3dd2: ldc.i4.5 - IL_3dd3: sub - IL_3dd4: pop - IL_3dd9: dup - IL_3dda: ldc.i4.1 - IL_3ddb: shl - IL_3ddc: pop - IL_3de1: dup - IL_3de2: ldc.i4.5 - IL_3de3: add - IL_3de4: pop - IL_3de9: dup - IL_3dea: ldc.i4.7 - IL_3deb: sub - IL_3dec: pop - IL_3df1: dup - IL_3df2: ldc.i4.3 - IL_3df3: mul - IL_3df4: pop - IL_3df9: dup - IL_3dfa: ldc.i4.6 - IL_3dfb: shl - IL_3dfc: pop - IL_3e01: dup - IL_3e02: ldc.i4.1 - IL_3e03: mul - IL_3e04: pop - IL_3e09: dup - IL_3e0a: ldc.i4.3 - IL_3e0b: mul - IL_3e0c: pop - IL_3e11: dup - IL_3e12: ldc.i4.4 - IL_3e13: xor - IL_3e14: pop - IL_3e19: dup - IL_3e1a: ldc.i4.2 - IL_3e1b: xor - IL_3e1c: pop - IL_3e21: dup - IL_3e22: ldc.i4.4 - IL_3e23: shl - IL_3e24: pop - IL_3e29: dup - IL_3e2a: ldc.i4.7 - IL_3e2b: sub - IL_3e2c: pop - IL_3e31: dup - IL_3e32: ldc.i4.1 - IL_3e33: shr - IL_3e34: pop - IL_3e39: dup - IL_3e3a: ldc.i4.1 - IL_3e3b: and - IL_3e3c: pop - IL_3e41: dup - IL_3e42: ldc.i4.7 - IL_3e43: xor - IL_3e44: pop - IL_3e49: dup - IL_3e4a: ldc.i4.3 - IL_3e4b: shr - IL_3e4c: pop - IL_3e51: dup - IL_3e52: ldc.i4.3 - IL_3e53: xor - IL_3e54: pop - IL_3e59: dup - IL_3e5a: ldc.i4.3 - IL_3e5b: and - IL_3e5c: pop - IL_3e61: dup - IL_3e62: ldc.i4.4 - IL_3e63: and - IL_3e64: pop - IL_3e69: dup - IL_3e6a: ldc.i4.3 - IL_3e6b: shl - IL_3e6c: pop - IL_3e71: dup - IL_3e72: ldc.i4.1 - IL_3e73: add - IL_3e74: pop - IL_3e79: dup - IL_3e7a: ldc.i4.1 - IL_3e7b: shr - IL_3e7c: pop - IL_3e81: dup - IL_3e82: ldc.i4.3 - IL_3e83: xor - IL_3e84: pop - IL_3e89: dup - IL_3e8a: ldc.i4.7 - IL_3e8b: shl - IL_3e8c: pop - IL_3e91: dup - IL_3e92: ldc.i4.6 - IL_3e93: sub - IL_3e94: pop - IL_3e99: dup - IL_3e9a: ldc.i4.6 - IL_3e9b: shl - IL_3e9c: pop - IL_3ea1: dup - IL_3ea2: ldc.i4.0 - IL_3ea3: shr - IL_3ea4: pop - IL_3ea9: dup - IL_3eaa: ldc.i4.1 - IL_3eab: add - IL_3eac: pop - IL_3eb1: dup - IL_3eb2: ldc.i4.3 - IL_3eb3: or - IL_3eb4: pop - IL_3eb9: dup - IL_3eba: ldc.i4.3 - IL_3ebb: or - IL_3ebc: pop - IL_3ec1: dup - IL_3ec2: ldc.i4.8 - IL_3ec3: or - IL_3ec4: pop - IL_3ec9: dup - IL_3eca: ldc.i4.3 - IL_3ecb: or - IL_3ecc: pop - IL_3ed1: dup - IL_3ed2: ldc.i4.8 - IL_3ed3: add - IL_3ed4: pop - IL_3ed9: dup - IL_3eda: ldc.i4.1 - IL_3edb: shr - IL_3edc: pop - IL_3ee1: dup - IL_3ee2: ldc.i4.8 - IL_3ee3: shl - IL_3ee4: pop - IL_3ee9: dup - IL_3eea: ldc.i4.7 - IL_3eeb: shr - IL_3eec: pop - IL_3ef1: dup - IL_3ef2: ldc.i4.0 - IL_3ef3: shr - IL_3ef4: pop - IL_3ef9: dup - IL_3efa: ldc.i4.2 - IL_3efb: xor - IL_3efc: pop - IL_3f01: dup - IL_3f02: ldc.i4.3 - IL_3f03: sub - IL_3f04: pop - IL_3f09: dup - IL_3f0a: ldc.i4.7 - IL_3f0b: shr - IL_3f0c: pop - IL_3f11: dup - IL_3f12: ldc.i4.8 - IL_3f13: shr - IL_3f14: pop - IL_3f19: dup - IL_3f1a: ldc.i4.1 - IL_3f1b: shl - IL_3f1c: pop - IL_3f21: dup - IL_3f22: ldc.i4.7 - IL_3f23: and - IL_3f24: pop - IL_3f29: dup - IL_3f2a: ldc.i4.5 - IL_3f2b: shr - IL_3f2c: pop - IL_3f31: dup - IL_3f32: ldc.i4.2 - IL_3f33: mul - IL_3f34: pop - IL_3f39: dup - IL_3f3a: ldc.i4.3 - IL_3f3b: shl - IL_3f3c: pop - IL_3f41: dup - IL_3f42: ldc.i4.3 - IL_3f43: xor - IL_3f44: pop - IL_3f49: dup - IL_3f4a: ldc.i4.6 - IL_3f4b: mul - IL_3f4c: pop - IL_3f51: dup - IL_3f52: ldc.i4.5 - IL_3f53: mul - IL_3f54: pop - IL_3f59: dup - IL_3f5a: ldc.i4.6 - IL_3f5b: mul - IL_3f5c: pop - IL_3f61: dup - IL_3f62: ldc.i4.2 - IL_3f63: sub - IL_3f64: pop - IL_3f69: dup - IL_3f6a: ldc.i4.4 - IL_3f6b: add - IL_3f6c: pop - IL_3f71: dup - IL_3f72: ldc.i4.4 - IL_3f73: or - IL_3f74: pop - IL_3f79: dup - IL_3f7a: ldc.i4.4 - IL_3f7b: xor - IL_3f7c: pop - IL_3f81: dup - IL_3f82: ldc.i4.3 - IL_3f83: shr - IL_3f84: pop - IL_3f89: dup - IL_3f8a: ldc.i4.5 - IL_3f8b: sub - IL_3f8c: pop - IL_3f91: dup - IL_3f92: ldc.i4.0 - IL_3f93: shr - IL_3f94: pop - IL_3f99: dup - IL_3f9a: ldc.i4.8 - IL_3f9b: mul - IL_3f9c: pop - IL_3fa1: dup - IL_3fa2: ldc.i4.7 - IL_3fa3: or - IL_3fa4: pop - IL_3fa9: dup - IL_3faa: ldc.i4.1 - IL_3fab: add - IL_3fac: pop - IL_3fb1: dup - IL_3fb2: ldc.i4.3 - IL_3fb3: xor - IL_3fb4: pop - IL_3fb9: dup - IL_3fba: ldc.i4.3 - IL_3fbb: shr - IL_3fbc: pop - IL_3fc1: dup - IL_3fc2: ldc.i4.1 - IL_3fc3: mul - IL_3fc4: pop - IL_3fc9: dup - IL_3fca: ldc.i4.3 - IL_3fcb: shl - IL_3fcc: pop - IL_3fd1: dup - IL_3fd2: ldc.i4.8 - IL_3fd3: or - IL_3fd4: pop - IL_3fd9: dup - IL_3fda: ldc.i4.7 - IL_3fdb: add - IL_3fdc: pop - IL_3fe1: dup - IL_3fe2: ldc.i4.3 - IL_3fe3: shl - IL_3fe4: pop - IL_3fe9: dup - IL_3fea: ldc.i4.3 - IL_3feb: and - IL_3fec: pop - IL_3ff1: dup - IL_3ff2: ldc.i4.1 - IL_3ff3: add - IL_3ff4: pop - IL_3ff9: dup - IL_3ffa: ldc.i4.0 - IL_3ffb: and - IL_3ffc: pop - IL_4001: dup - IL_4002: ldc.i4.2 - IL_4003: sub - IL_4004: pop - IL_4009: dup - IL_400a: ldc.i4.2 - IL_400b: shl - IL_400c: pop - IL_4011: dup - IL_4012: ldc.i4.6 - IL_4013: sub - IL_4014: pop - IL_4019: dup - IL_401a: ldc.i4.4 - IL_401b: shr - IL_401c: pop - IL_4021: dup - IL_4022: ldc.i4.4 - IL_4023: xor - IL_4024: pop - IL_4029: dup - IL_402a: ldc.i4.4 - IL_402b: shr - IL_402c: pop - IL_4031: dup - IL_4032: ldc.i4.0 - IL_4033: shr - IL_4034: pop - IL_4039: dup - IL_403a: ldc.i4.8 - IL_403b: and - IL_403c: pop - IL_4041: dup - IL_4042: ldc.i4.6 - IL_4043: or - IL_4044: pop - IL_4049: dup - IL_404a: ldc.i4.8 - IL_404b: sub - IL_404c: pop - IL_4051: dup - IL_4052: ldc.i4.5 - IL_4053: or - IL_4054: pop - IL_4059: dup - IL_405a: ldc.i4.3 - IL_405b: xor - IL_405c: pop - IL_4061: dup - IL_4062: ldc.i4.8 - IL_4063: shl - IL_4064: pop - IL_4069: dup - IL_406a: ldc.i4.6 - IL_406b: shl - IL_406c: pop - IL_4071: dup - IL_4072: ldc.i4.3 - IL_4073: sub - IL_4074: pop - IL_4079: dup - IL_407a: ldc.i4.1 - IL_407b: shr - IL_407c: pop - IL_4081: dup - IL_4082: ldc.i4.7 - IL_4083: mul - IL_4084: pop - IL_4089: dup - IL_408a: ldc.i4.7 - IL_408b: sub - IL_408c: pop - IL_4091: dup - IL_4092: ldc.i4.1 - IL_4093: and - IL_4094: pop - IL_4099: dup - IL_409a: ldc.i4.8 - IL_409b: or - IL_409c: pop - IL_40a1: dup - IL_40a2: ldc.i4.7 - IL_40a3: shr - IL_40a4: pop - IL_40a9: dup - IL_40aa: ldc.i4.1 - IL_40ab: shl - IL_40ac: pop - IL_40b1: dup - IL_40b2: ldc.i4.4 - IL_40b3: add - IL_40b4: pop - IL_40b9: dup - IL_40ba: ldc.i4.0 - IL_40bb: and - IL_40bc: pop - IL_40c1: dup - IL_40c2: ldc.i4.5 - IL_40c3: shl - IL_40c4: pop - IL_40c9: dup - IL_40ca: ldc.i4.0 - IL_40cb: sub - IL_40cc: pop - IL_40d1: dup - IL_40d2: ldc.i4.0 - IL_40d3: or - IL_40d4: pop - IL_40d9: dup - IL_40da: ldc.i4.1 - IL_40db: mul - IL_40dc: pop - IL_40e1: dup - IL_40e2: ldc.i4.6 - IL_40e3: and - IL_40e4: pop - IL_40e9: dup - IL_40ea: ldc.i4.5 - IL_40eb: sub - IL_40ec: pop - IL_40f1: dup - IL_40f2: ldc.i4.4 - IL_40f3: or - IL_40f4: pop - IL_40f9: dup - IL_40fa: ldc.i4.3 - IL_40fb: sub - IL_40fc: pop - IL_4101: dup - IL_4102: ldc.i4.2 - IL_4103: shr - IL_4104: pop - IL_4109: dup - IL_410a: ldc.i4.8 - IL_410b: and - IL_410c: pop - IL_4111: dup - IL_4112: ldc.i4.7 - IL_4113: shr - IL_4114: pop - IL_4119: dup - IL_411a: ldc.i4.5 - IL_411b: or - IL_411c: pop - IL_4121: dup - IL_4122: ldc.i4.8 - IL_4123: add - IL_4124: pop - IL_4129: dup - IL_412a: ldc.i4.3 - IL_412b: or - IL_412c: pop - IL_4131: dup - IL_4132: ldc.i4.7 - IL_4133: or - IL_4134: pop - IL_4139: dup - IL_413a: ldc.i4.8 - IL_413b: and - IL_413c: pop - IL_4141: dup - IL_4142: ldc.i4.4 - IL_4143: add - IL_4144: pop - IL_4149: dup - IL_414a: ldc.i4.8 - IL_414b: and - IL_414c: pop - IL_4151: dup - IL_4152: ldc.i4.1 - IL_4153: or - IL_4154: pop - IL_4159: dup - IL_415a: ldc.i4.5 - IL_415b: or - IL_415c: pop - IL_4161: dup - IL_4162: ldc.i4.1 - IL_4163: shl - IL_4164: pop - IL_4169: dup - IL_416a: ldc.i4.4 - IL_416b: xor - IL_416c: pop - IL_4171: dup - IL_4172: ldc.i4.1 - IL_4173: shr - IL_4174: pop - IL_4179: dup - IL_417a: ldc.i4.3 - IL_417b: or - IL_417c: pop - IL_4181: dup - IL_4182: ldc.i4.3 - IL_4183: or - IL_4184: pop - IL_4189: dup - IL_418a: ldc.i4.2 - IL_418b: and - IL_418c: pop - IL_4191: dup - IL_4192: ldc.i4.1 - IL_4193: mul - IL_4194: pop - IL_4199: dup - IL_419a: ldc.i4.8 - IL_419b: and - IL_419c: pop - IL_41a1: dup - IL_41a2: ldc.i4.8 - IL_41a3: sub - IL_41a4: pop - IL_41a9: dup - IL_41aa: ldc.i4.2 - IL_41ab: add - IL_41ac: pop - IL_41b1: dup - IL_41b2: ldc.i4.4 - IL_41b3: sub - IL_41b4: pop - IL_41b9: dup - IL_41ba: ldc.i4.4 - IL_41bb: and - IL_41bc: pop - IL_41c1: dup - IL_41c2: ldc.i4.8 - IL_41c3: and - IL_41c4: pop - IL_41c9: dup - IL_41ca: ldc.i4.6 - IL_41cb: xor - IL_41cc: pop - IL_41d1: dup - IL_41d2: ldc.i4.8 - IL_41d3: shl - IL_41d4: pop - IL_41d9: dup - IL_41da: ldc.i4.0 - IL_41db: xor - IL_41dc: pop - IL_41e1: dup - IL_41e2: ldc.i4.0 - IL_41e3: add - IL_41e4: pop - IL_41e9: dup - IL_41ea: ldc.i4.5 - IL_41eb: mul - IL_41ec: pop - IL_41f1: dup - IL_41f2: ldc.i4.2 - IL_41f3: sub - IL_41f4: pop - IL_41f9: dup - IL_41fa: ldc.i4.6 - IL_41fb: mul - IL_41fc: pop - IL_4201: dup - IL_4202: ldc.i4.5 - IL_4203: shl - IL_4204: pop - IL_4209: dup - IL_420a: ldc.i4.5 - IL_420b: or - IL_420c: pop - IL_4211: dup - IL_4212: ldc.i4.6 - IL_4213: add - IL_4214: pop - IL_4219: dup - IL_421a: ldc.i4.6 - IL_421b: mul - IL_421c: pop - IL_4221: dup - IL_4222: ldc.i4.1 - IL_4223: sub - IL_4224: pop - IL_4229: dup - IL_422a: ldc.i4.6 - IL_422b: add - IL_422c: pop - IL_4231: dup - IL_4232: ldc.i4.5 - IL_4233: shl - IL_4234: pop - IL_4239: dup - IL_423a: ldc.i4.4 - IL_423b: or - IL_423c: pop - IL_4241: dup - IL_4242: ldc.i4.0 - IL_4243: shl - IL_4244: pop - IL_4249: dup - IL_424a: ldc.i4.4 - IL_424b: xor - IL_424c: pop - IL_4251: dup - IL_4252: ldc.i4.0 - IL_4253: or - IL_4254: pop - IL_4259: dup - IL_425a: ldc.i4.8 - IL_425b: and - IL_425c: pop - IL_4261: dup - IL_4262: ldc.i4.8 - IL_4263: and - IL_4264: pop - IL_4269: dup - IL_426a: ldc.i4.6 - IL_426b: add - IL_426c: pop - IL_4271: dup - IL_4272: ldc.i4.5 - IL_4273: shl - IL_4274: pop - IL_4279: dup - IL_427a: ldc.i4.4 - IL_427b: and - IL_427c: pop - IL_4281: dup - IL_4282: ldc.i4.3 - IL_4283: or - IL_4284: pop - IL_4289: dup - IL_428a: ldc.i4.3 - IL_428b: or - IL_428c: pop - IL_4291: dup - IL_4292: ldc.i4.5 - IL_4293: shl - IL_4294: pop - IL_4299: dup - IL_429a: ldc.i4.1 - IL_429b: and - IL_429c: pop - IL_42a1: dup - IL_42a2: ldc.i4.0 - IL_42a3: xor - IL_42a4: pop - IL_42a9: dup - IL_42aa: ldc.i4.2 - IL_42ab: and - IL_42ac: pop - IL_42b1: dup - IL_42b2: ldc.i4.7 - IL_42b3: or - IL_42b4: pop - IL_42b9: dup - IL_42ba: ldc.i4.7 - IL_42bb: xor - IL_42bc: pop - IL_42c1: dup - IL_42c2: ldc.i4.5 - IL_42c3: shr - IL_42c4: pop - IL_42c9: dup - IL_42ca: ldc.i4.2 - IL_42cb: shr - IL_42cc: pop - IL_42d1: dup - IL_42d2: ldc.i4.6 - IL_42d3: mul - IL_42d4: pop - IL_42d9: dup - IL_42da: ldc.i4.2 - IL_42db: shr - IL_42dc: pop - IL_42e1: dup - IL_42e2: ldc.i4.5 - IL_42e3: and - IL_42e4: pop - IL_42e9: dup - IL_42ea: ldc.i4.0 - IL_42eb: or - IL_42ec: pop - IL_42f1: dup - IL_42f2: ldc.i4.3 - IL_42f3: shr - IL_42f4: pop - IL_42f9: dup - IL_42fa: ldc.i4.5 - IL_42fb: shl - IL_42fc: pop - IL_4301: dup - IL_4302: ldc.i4.5 - IL_4303: or - IL_4304: pop - IL_4309: dup - IL_430a: ldc.i4.5 - IL_430b: shr - IL_430c: pop - IL_4311: dup - IL_4312: ldc.i4.1 - IL_4313: xor - IL_4314: pop - IL_4319: dup - IL_431a: ldc.i4.2 - IL_431b: shl - IL_431c: pop - IL_4321: dup - IL_4322: ldc.i4.3 - IL_4323: shr - IL_4324: pop - IL_4329: dup - IL_432a: ldc.i4.3 - IL_432b: shr - IL_432c: pop - IL_4331: dup - IL_4332: ldc.i4.5 - IL_4333: sub - IL_4334: pop - IL_4339: dup - IL_433a: ldc.i4.8 - IL_433b: or - IL_433c: pop - IL_4341: dup - IL_4342: ldc.i4.0 - IL_4343: mul - IL_4344: pop - IL_4349: dup - IL_434a: ldc.i4.4 - IL_434b: or - IL_434c: pop - IL_4351: dup - IL_4352: ldc.i4.2 - IL_4353: and - IL_4354: pop - IL_4359: dup - IL_435a: ldc.i4.0 - IL_435b: sub - IL_435c: pop - IL_4361: dup - IL_4362: ldc.i4.6 - IL_4363: and - IL_4364: pop - IL_4369: dup - IL_436a: ldc.i4.3 - IL_436b: and - IL_436c: pop - IL_4371: dup - IL_4372: ldc.i4.4 - IL_4373: mul - IL_4374: pop - IL_4379: dup - IL_437a: ldc.i4.3 - IL_437b: xor - IL_437c: pop - IL_4381: dup - IL_4382: ldc.i4.7 - IL_4383: shr - IL_4384: pop - IL_4389: dup - IL_438a: ldc.i4.1 - IL_438b: and - IL_438c: pop - IL_4391: dup - IL_4392: ldc.i4.2 - IL_4393: sub - IL_4394: pop - IL_4399: dup - IL_439a: ldc.i4.2 - IL_439b: add - IL_439c: pop - IL_43a1: dup - IL_43a2: ldc.i4.3 - IL_43a3: and - IL_43a4: pop - IL_43a9: dup - IL_43aa: ldc.i4.2 - IL_43ab: or - IL_43ac: pop - IL_43b1: dup - IL_43b2: ldc.i4.8 - IL_43b3: shl - IL_43b4: pop - IL_43b9: dup - IL_43ba: ldc.i4.8 - IL_43bb: xor - IL_43bc: pop - IL_43c1: dup - IL_43c2: ldc.i4.7 - IL_43c3: add - IL_43c4: pop - IL_43c9: dup - IL_43ca: ldc.i4.7 - IL_43cb: add - IL_43cc: pop - IL_43d1: dup - IL_43d2: ldc.i4.1 - IL_43d3: shr - IL_43d4: pop - IL_43d9: dup - IL_43da: ldc.i4.3 - IL_43db: and - IL_43dc: pop - IL_43e1: dup - IL_43e2: ldc.i4.8 - IL_43e3: xor - IL_43e4: pop - IL_43e9: dup - IL_43ea: ldc.i4.8 - IL_43eb: xor - IL_43ec: pop - IL_43f1: dup - IL_43f2: ldc.i4.0 - IL_43f3: shl - IL_43f4: pop - IL_43f9: dup - IL_43fa: ldc.i4.8 - IL_43fb: sub - IL_43fc: pop - IL_4401: dup - IL_4402: ldc.i4.2 - IL_4403: or - IL_4404: pop - IL_4409: dup - IL_440a: ldc.i4.7 - IL_440b: or - IL_440c: pop - IL_4411: dup - IL_4412: ldc.i4.0 - IL_4413: sub - IL_4414: pop - IL_4419: dup - IL_441a: ldc.i4.5 - IL_441b: or - IL_441c: pop - IL_4421: dup - IL_4422: ldc.i4.0 - IL_4423: xor - IL_4424: pop - IL_4429: dup - IL_442a: ldc.i4.4 - IL_442b: xor - IL_442c: pop - IL_4431: dup - IL_4432: ldc.i4.5 - IL_4433: add - IL_4434: pop - IL_4439: dup - IL_443a: ldc.i4.1 - IL_443b: sub - IL_443c: pop - IL_4441: dup - IL_4442: ldc.i4.7 - IL_4443: add - IL_4444: pop - IL_4449: dup - IL_444a: ldc.i4.7 - IL_444b: xor - IL_444c: pop - IL_4451: dup - IL_4452: ldc.i4.3 - IL_4453: mul - IL_4454: pop - IL_4459: dup - IL_445a: ldc.i4.2 - IL_445b: add - IL_445c: pop - IL_4461: dup - IL_4462: ldc.i4.3 - IL_4463: xor - IL_4464: pop - IL_4469: dup - IL_446a: ldc.i4.7 - IL_446b: and - IL_446c: pop - IL_4471: dup - IL_4472: ldc.i4.1 - IL_4473: and - IL_4474: pop - IL_4479: dup - IL_447a: ldc.i4.8 - IL_447b: and - IL_447c: pop - IL_4481: dup - IL_4482: ldc.i4.7 - IL_4483: add - IL_4484: pop - IL_4489: dup - IL_448a: ldc.i4.5 - IL_448b: or - IL_448c: pop - IL_4491: dup - IL_4492: ldc.i4.6 - IL_4493: add - IL_4494: pop - IL_4499: dup - IL_449a: ldc.i4.3 - IL_449b: shr - IL_449c: pop - IL_44a1: dup - IL_44a2: ldc.i4.3 - IL_44a3: or - IL_44a4: pop - IL_44a9: dup - IL_44aa: ldc.i4.0 - IL_44ab: shr - IL_44ac: pop - IL_44b1: dup - IL_44b2: ldc.i4.1 - IL_44b3: or - IL_44b4: pop - IL_44b9: dup - IL_44ba: ldc.i4.1 - IL_44bb: and - IL_44bc: pop - IL_44c1: dup - IL_44c2: ldc.i4.2 - IL_44c3: and - IL_44c4: pop - IL_44c9: dup - IL_44ca: ldc.i4.5 - IL_44cb: add - IL_44cc: pop - IL_44d1: dup - IL_44d2: ldc.i4.5 - IL_44d3: shl - IL_44d4: pop - IL_44d9: dup - IL_44da: ldc.i4.6 - IL_44db: add - IL_44dc: pop - IL_44e1: dup - IL_44e2: ldc.i4.6 - IL_44e3: shr - IL_44e4: pop - IL_44e9: dup - IL_44ea: ldc.i4.4 - IL_44eb: shl - IL_44ec: pop - IL_44f1: dup - IL_44f2: ldc.i4.2 - IL_44f3: and - IL_44f4: pop - IL_44f9: dup - IL_44fa: ldc.i4.6 - IL_44fb: sub - IL_44fc: pop - IL_4501: dup - IL_4502: ldc.i4.4 - IL_4503: shr - IL_4504: pop - IL_4509: dup - IL_450a: ldc.i4.5 - IL_450b: shl - IL_450c: pop - IL_4511: dup - IL_4512: ldc.i4.3 - IL_4513: sub - IL_4514: pop - IL_4519: dup - IL_451a: ldc.i4.3 - IL_451b: shr - IL_451c: pop - IL_4521: dup - IL_4522: ldc.i4.5 - IL_4523: sub - IL_4524: pop - IL_4529: dup - IL_452a: ldc.i4.0 - IL_452b: xor - IL_452c: pop - IL_4531: dup - IL_4532: ldc.i4.1 - IL_4533: shl - IL_4534: pop - IL_4539: dup - IL_453a: ldc.i4.8 - IL_453b: xor - IL_453c: pop - IL_4541: dup - IL_4542: ldc.i4.2 - IL_4543: add - IL_4544: pop - IL_4549: dup - IL_454a: ldc.i4.5 - IL_454b: xor - IL_454c: pop - IL_4551: dup - IL_4552: ldc.i4.1 - IL_4553: or - IL_4554: pop - IL_4559: dup - IL_455a: ldc.i4.2 - IL_455b: mul - IL_455c: pop - IL_4561: dup - IL_4562: ldc.i4.3 - IL_4563: shl - IL_4564: pop - IL_4569: dup - IL_456a: ldc.i4.2 - IL_456b: add - IL_456c: pop - IL_4571: dup - IL_4572: ldc.i4.4 - IL_4573: and - IL_4574: pop - IL_4579: dup - IL_457a: ldc.i4.3 - IL_457b: shl - IL_457c: pop - IL_4581: dup - IL_4582: ldc.i4.2 - IL_4583: or - IL_4584: pop - IL_4589: dup - IL_458a: ldc.i4.1 - IL_458b: xor - IL_458c: pop - IL_4591: dup - IL_4592: ldc.i4.2 - IL_4593: shl - IL_4594: pop - IL_4599: dup - IL_459a: ldc.i4.3 - IL_459b: add - IL_459c: pop - IL_45a1: dup - IL_45a2: ldc.i4.3 - IL_45a3: or - IL_45a4: pop - IL_45a9: dup - IL_45aa: ldc.i4.4 - IL_45ab: xor - IL_45ac: pop - IL_45b1: dup - IL_45b2: ldc.i4.4 - IL_45b3: mul - IL_45b4: pop - IL_45b9: dup - IL_45ba: ldc.i4.7 - IL_45bb: add - IL_45bc: pop - IL_45c1: dup - IL_45c2: ldc.i4.6 - IL_45c3: add - IL_45c4: pop - IL_45c9: dup - IL_45ca: ldc.i4.3 - IL_45cb: sub - IL_45cc: pop - IL_45d1: dup - IL_45d2: ldc.i4.2 - IL_45d3: sub - IL_45d4: pop - IL_45d9: dup - IL_45da: ldc.i4.0 - IL_45db: shl - IL_45dc: pop - IL_45e1: dup - IL_45e2: ldc.i4.4 - IL_45e3: mul - IL_45e4: pop - IL_45e9: dup - IL_45ea: ldc.i4.1 - IL_45eb: and - IL_45ec: pop - IL_45f1: dup - IL_45f2: ldc.i4.8 - IL_45f3: mul - IL_45f4: pop - IL_45f9: dup - IL_45fa: ldc.i4.1 - IL_45fb: or - IL_45fc: pop - IL_4601: dup - IL_4602: ldc.i4.6 - IL_4603: xor - IL_4604: pop - IL_4609: dup - IL_460a: ldc.i4.1 - IL_460b: mul - IL_460c: pop - IL_4611: dup - IL_4612: ldc.i4.3 - IL_4613: shl - IL_4614: pop - IL_4619: dup - IL_461a: ldc.i4.1 - IL_461b: shr - IL_461c: pop - IL_4621: dup - IL_4622: ldc.i4.6 - IL_4623: xor - IL_4624: pop - IL_4629: dup - IL_462a: ldc.i4.8 - IL_462b: sub - IL_462c: pop - IL_4631: dup - IL_4632: ldc.i4.3 - IL_4633: and - IL_4634: pop - IL_4639: dup - IL_463a: ldc.i4.7 - IL_463b: add - IL_463c: pop - IL_4641: dup - IL_4642: ldc.i4.6 - IL_4643: sub - IL_4644: pop - IL_4649: dup - IL_464a: ldc.i4.2 - IL_464b: xor - IL_464c: pop - IL_4651: dup - IL_4652: ldc.i4.3 - IL_4653: sub - IL_4654: pop - IL_4659: dup - IL_465a: ldc.i4.3 - IL_465b: add - IL_465c: pop - IL_4661: dup - IL_4662: ldc.i4.7 - IL_4663: shl - IL_4664: pop - IL_4669: dup - IL_466a: ldc.i4.8 - IL_466b: add - IL_466c: pop - IL_4671: dup - IL_4672: ldc.i4.3 - IL_4673: shl - IL_4674: pop - IL_4679: dup - IL_467a: ldc.i4.0 - IL_467b: add - IL_467c: pop - IL_4681: dup - IL_4682: ldc.i4.6 - IL_4683: shl - IL_4684: pop - IL_4689: dup - IL_468a: ldc.i4.6 - IL_468b: add - IL_468c: pop - IL_4691: dup - IL_4692: ldc.i4.1 - IL_4693: shl - IL_4694: pop - IL_4699: dup - IL_469a: ldc.i4.6 - IL_469b: sub - IL_469c: pop - IL_46a1: dup - IL_46a2: ldc.i4.8 - IL_46a3: shr - IL_46a4: pop - IL_46a9: dup - IL_46aa: ldc.i4.4 - IL_46ab: shr - IL_46ac: pop - IL_46b1: dup - IL_46b2: ldc.i4.2 - IL_46b3: and - IL_46b4: pop - IL_46b9: dup - IL_46ba: ldc.i4.1 - IL_46bb: shr - IL_46bc: pop - IL_46c1: dup - IL_46c2: ldc.i4.3 - IL_46c3: add - IL_46c4: pop - IL_46c9: dup - IL_46ca: ldc.i4.0 - IL_46cb: and - IL_46cc: pop - IL_46d1: dup - IL_46d2: ldc.i4.0 - IL_46d3: shr - IL_46d4: pop - IL_46d9: dup - IL_46da: ldc.i4.4 - IL_46db: shl - IL_46dc: pop - IL_46e1: dup - IL_46e2: ldc.i4.0 - IL_46e3: add - IL_46e4: pop - IL_46e9: dup - IL_46ea: ldc.i4.4 - IL_46eb: and - IL_46ec: pop - IL_46f1: dup - IL_46f2: ldc.i4.5 - IL_46f3: add - IL_46f4: pop - IL_46f9: dup - IL_46fa: ldc.i4.1 - IL_46fb: add - IL_46fc: pop - IL_4701: dup - IL_4702: ldc.i4.3 - IL_4703: or - IL_4704: pop - IL_4709: dup - IL_470a: ldc.i4.4 - IL_470b: and - IL_470c: pop - IL_4711: dup - IL_4712: ldc.i4.0 - IL_4713: and - IL_4714: pop - IL_4719: dup - IL_471a: ldc.i4.8 - IL_471b: mul - IL_471c: pop - IL_4721: dup - IL_4722: ldc.i4.3 - IL_4723: add - IL_4724: pop - IL_4729: dup - IL_472a: ldc.i4.4 - IL_472b: shr - IL_472c: pop - IL_4731: dup - IL_4732: ldc.i4.6 - IL_4733: shr - IL_4734: pop - IL_4739: dup - IL_473a: ldc.i4.7 - IL_473b: add - IL_473c: pop - IL_4741: dup - IL_4742: ldc.i4.4 - IL_4743: mul - IL_4744: pop - IL_4749: dup - IL_474a: ldc.i4.5 - IL_474b: mul - IL_474c: pop - IL_4751: dup - IL_4752: ldc.i4.4 - IL_4753: mul - IL_4754: pop - IL_4759: dup - IL_475a: ldc.i4.0 - IL_475b: add - IL_475c: pop - IL_4761: dup - IL_4762: ldc.i4.1 - IL_4763: sub - IL_4764: pop - IL_4769: dup - IL_476a: ldc.i4.8 - IL_476b: add - IL_476c: pop - IL_4771: dup - IL_4772: ldc.i4.0 - IL_4773: or - IL_4774: pop - IL_4779: dup - IL_477a: ldc.i4.5 - IL_477b: and - IL_477c: pop - IL_4781: dup - IL_4782: ldc.i4.4 - IL_4783: xor - IL_4784: pop - IL_4789: dup - IL_478a: ldc.i4.3 - IL_478b: mul - IL_478c: pop - IL_4791: dup - IL_4792: ldc.i4.2 - IL_4793: mul - IL_4794: pop - IL_4799: dup - IL_479a: ldc.i4.6 - IL_479b: shl - IL_479c: pop - IL_47a1: dup - IL_47a2: ldc.i4.1 - IL_47a3: and - IL_47a4: pop - IL_47a9: dup - IL_47aa: ldc.i4.3 - IL_47ab: or - IL_47ac: pop - IL_47b1: dup - IL_47b2: ldc.i4.1 - IL_47b3: shr - IL_47b4: pop - IL_47b9: dup - IL_47ba: ldc.i4.7 - IL_47bb: xor - IL_47bc: pop - IL_47c1: dup - IL_47c2: ldc.i4.2 - IL_47c3: mul - IL_47c4: pop - IL_47c9: dup - IL_47ca: ldc.i4.2 - IL_47cb: mul - IL_47cc: pop - IL_47d1: dup - IL_47d2: ldc.i4.4 - IL_47d3: or - IL_47d4: pop - IL_47d9: dup - IL_47da: ldc.i4.5 - IL_47db: add - IL_47dc: pop - IL_47e1: dup - IL_47e2: ldc.i4.7 - IL_47e3: xor - IL_47e4: pop - IL_47e9: dup - IL_47ea: ldc.i4.6 - IL_47eb: and - IL_47ec: pop - IL_47f1: dup - IL_47f2: ldc.i4.8 - IL_47f3: and - IL_47f4: pop - IL_47f9: dup - IL_47fa: ldc.i4.1 - IL_47fb: xor - IL_47fc: pop - IL_4801: dup - IL_4802: ldc.i4.4 - IL_4803: shr - IL_4804: pop - IL_4809: dup - IL_480a: ldc.i4.2 - IL_480b: sub - IL_480c: pop - IL_4811: dup - IL_4812: ldc.i4.2 - IL_4813: xor - IL_4814: pop - IL_4819: dup - IL_481a: ldc.i4.7 - IL_481b: sub - IL_481c: pop - IL_4821: dup - IL_4822: ldc.i4.5 - IL_4823: add - IL_4824: pop - IL_4829: dup - IL_482a: ldc.i4.1 - IL_482b: shr - IL_482c: pop - IL_4831: dup - IL_4832: ldc.i4.8 - IL_4833: sub - IL_4834: pop - IL_4839: dup - IL_483a: ldc.i4.7 - IL_483b: mul - IL_483c: pop - IL_4841: dup - IL_4842: ldc.i4.3 - IL_4843: shl - IL_4844: pop - IL_4849: dup - IL_484a: ldc.i4.7 - IL_484b: shr - IL_484c: pop - IL_4851: dup - IL_4852: ldc.i4.5 - IL_4853: mul - IL_4854: pop - IL_4859: dup - IL_485a: ldc.i4.3 - IL_485b: shl - IL_485c: pop - IL_4861: dup - IL_4862: ldc.i4.7 - IL_4863: sub - IL_4864: pop - IL_4869: dup - IL_486a: ldc.i4.5 - IL_486b: and - IL_486c: pop - IL_4871: dup - IL_4872: ldc.i4.4 - IL_4873: and - IL_4874: pop - IL_4879: dup - IL_487a: ldc.i4.6 - IL_487b: mul - IL_487c: pop - IL_4881: dup - IL_4882: ldc.i4.5 - IL_4883: or - IL_4884: pop - IL_4889: dup - IL_488a: ldc.i4.3 - IL_488b: shl - IL_488c: pop - IL_4891: dup - IL_4892: ldc.i4.4 - IL_4893: shl - IL_4894: pop - IL_4899: dup - IL_489a: ldc.i4.1 - IL_489b: and - IL_489c: pop - IL_48a1: dup - IL_48a2: ldc.i4.5 - IL_48a3: add - IL_48a4: pop - IL_48a9: dup - IL_48aa: ldc.i4.5 - IL_48ab: xor - IL_48ac: pop - IL_48b1: dup - IL_48b2: ldc.i4.6 - IL_48b3: and - IL_48b4: pop - IL_48b9: dup - IL_48ba: ldc.i4.1 - IL_48bb: shl - IL_48bc: pop - IL_48c1: dup - IL_48c2: ldc.i4.5 - IL_48c3: xor - IL_48c4: pop - IL_48c9: dup - IL_48ca: ldc.i4.4 - IL_48cb: xor - IL_48cc: pop - IL_48d1: dup - IL_48d2: ldc.i4.0 - IL_48d3: xor - IL_48d4: pop - IL_48d9: dup - IL_48da: ldc.i4.7 - IL_48db: sub - IL_48dc: pop - IL_48e1: dup - IL_48e2: ldc.i4.2 - IL_48e3: shr - IL_48e4: pop - IL_48e9: dup - IL_48ea: ldc.i4.3 - IL_48eb: add - IL_48ec: pop - IL_48f1: dup - IL_48f2: ldc.i4.7 - IL_48f3: or - IL_48f4: pop - IL_48f9: dup - IL_48fa: ldc.i4.6 - IL_48fb: and - IL_48fc: pop - IL_4901: dup - IL_4902: ldc.i4.3 - IL_4903: and - IL_4904: pop - IL_4909: dup - IL_490a: ldc.i4.1 - IL_490b: add - IL_490c: pop - IL_4911: dup - IL_4912: ldc.i4.7 - IL_4913: mul - IL_4914: pop - IL_4919: dup - IL_491a: ldc.i4.7 - IL_491b: shr - IL_491c: pop - IL_4921: dup - IL_4922: ldc.i4.3 - IL_4923: add - IL_4924: pop - IL_4929: dup - IL_492a: ldc.i4.1 - IL_492b: shl - IL_492c: pop - IL_4931: dup - IL_4932: ldc.i4.6 - IL_4933: and - IL_4934: pop - IL_4939: dup - IL_493a: ldc.i4.7 - IL_493b: add - IL_493c: pop - IL_4941: dup - IL_4942: ldc.i4.0 - IL_4943: or - IL_4944: pop - IL_4949: dup - IL_494a: ldc.i4.2 - IL_494b: add - IL_494c: pop - IL_4951: dup - IL_4952: ldc.i4.3 - IL_4953: mul - IL_4954: pop - IL_4959: dup - IL_495a: ldc.i4.2 - IL_495b: add - IL_495c: pop - IL_4961: dup - IL_4962: ldc.i4.0 - IL_4963: sub - IL_4964: pop - IL_4969: dup - IL_496a: ldc.i4.2 - IL_496b: and - IL_496c: pop - IL_4971: dup - IL_4972: ldc.i4.2 - IL_4973: add - IL_4974: pop - IL_4979: dup - IL_497a: ldc.i4.8 - IL_497b: shl - IL_497c: pop - IL_4981: dup - IL_4982: ldc.i4.3 - IL_4983: and - IL_4984: pop - IL_4989: dup - IL_498a: ldc.i4.1 - IL_498b: or - IL_498c: pop - IL_4991: dup - IL_4992: ldc.i4.6 - IL_4993: add - IL_4994: pop - IL_4999: dup - IL_499a: ldc.i4.7 - IL_499b: mul - IL_499c: pop - IL_49a1: dup - IL_49a2: ldc.i4.4 - IL_49a3: shr - IL_49a4: pop - IL_49a9: dup - IL_49aa: ldc.i4.0 - IL_49ab: or - IL_49ac: pop - IL_49b1: dup - IL_49b2: ldc.i4.3 - IL_49b3: sub - IL_49b4: pop - IL_49b9: dup - IL_49ba: ldc.i4.4 - IL_49bb: xor - IL_49bc: pop - IL_49c1: dup - IL_49c2: ldc.i4.7 - IL_49c3: mul - IL_49c4: pop - IL_49c9: dup - IL_49ca: ldc.i4.8 - IL_49cb: or - IL_49cc: pop - IL_49d1: dup - IL_49d2: ldc.i4.6 - IL_49d3: shl - IL_49d4: pop - IL_49d9: dup - IL_49da: ldc.i4.3 - IL_49db: add - IL_49dc: pop - IL_49e1: dup - IL_49e2: ldc.i4.4 - IL_49e3: add - IL_49e4: pop - IL_49e9: dup - IL_49ea: ldc.i4.8 - IL_49eb: shl - IL_49ec: pop - IL_49f1: dup - IL_49f2: ldc.i4.8 - IL_49f3: or - IL_49f4: pop - IL_49f9: dup - IL_49fa: ldc.i4.4 - IL_49fb: mul - IL_49fc: pop - IL_4a01: dup - IL_4a02: ldc.i4.1 - IL_4a03: shl - IL_4a04: pop - IL_4a09: dup - IL_4a0a: ldc.i4.1 - IL_4a0b: and - IL_4a0c: pop - IL_4a11: dup - IL_4a12: ldc.i4.6 - IL_4a13: or - IL_4a14: pop - IL_4a19: dup - IL_4a1a: ldc.i4.3 - IL_4a1b: or - IL_4a1c: pop - IL_4a21: dup - IL_4a22: ldc.i4.1 - IL_4a23: and - IL_4a24: pop - IL_4a29: dup - IL_4a2a: ldc.i4.5 - IL_4a2b: shr - IL_4a2c: pop - IL_4a31: dup - IL_4a32: ldc.i4.2 - IL_4a33: mul - IL_4a34: pop - IL_4a39: dup - IL_4a3a: ldc.i4.6 - IL_4a3b: and - IL_4a3c: pop - IL_4a41: dup - IL_4a42: ldc.i4.6 - IL_4a43: and - IL_4a44: pop - IL_4a49: dup - IL_4a4a: ldc.i4.0 - IL_4a4b: or - IL_4a4c: pop - IL_4a51: dup - IL_4a52: ldc.i4.1 - IL_4a53: or - IL_4a54: pop - IL_4a59: dup - IL_4a5a: ldc.i4.8 - IL_4a5b: and - IL_4a5c: pop - IL_4a61: dup - IL_4a62: ldc.i4.4 - IL_4a63: add - IL_4a64: pop - IL_4a69: dup - IL_4a6a: ldc.i4.4 - IL_4a6b: shr - IL_4a6c: pop - IL_4a71: dup - IL_4a72: ldc.i4.1 - IL_4a73: sub - IL_4a74: pop - IL_4a79: dup - IL_4a7a: ldc.i4.3 - IL_4a7b: shl - IL_4a7c: pop - IL_4a81: dup - IL_4a82: ldc.i4.2 - IL_4a83: shr - IL_4a84: pop - IL_4a89: dup - IL_4a8a: ldc.i4.7 - IL_4a8b: and - IL_4a8c: pop - IL_4a91: dup - IL_4a92: ldc.i4.0 - IL_4a93: shr - IL_4a94: pop - IL_4a99: dup - IL_4a9a: ldc.i4.6 - IL_4a9b: or - IL_4a9c: pop - IL_4aa1: dup - IL_4aa2: ldc.i4.8 - IL_4aa3: add - IL_4aa4: pop - IL_4aa9: dup - IL_4aaa: ldc.i4.6 - IL_4aab: and - IL_4aac: pop - IL_4ab1: dup - IL_4ab2: ldc.i4.8 - IL_4ab3: shr - IL_4ab4: pop - IL_4ab9: dup - IL_4aba: ldc.i4.7 - IL_4abb: sub - IL_4abc: pop - IL_4ac1: dup - IL_4ac2: ldc.i4.2 - IL_4ac3: sub - IL_4ac4: pop - IL_4ac9: dup - IL_4aca: ldc.i4.7 - IL_4acb: sub - IL_4acc: pop - IL_4ad1: dup - IL_4ad2: ldc.i4.8 - IL_4ad3: xor - IL_4ad4: pop - IL_4ad9: dup - IL_4ada: ldc.i4.1 - IL_4adb: sub - IL_4adc: pop - IL_4ae1: dup - IL_4ae2: ldc.i4.5 - IL_4ae3: xor - IL_4ae4: pop - IL_4ae9: dup - IL_4aea: ldc.i4.3 - IL_4aeb: shl - IL_4aec: pop - IL_4af1: dup - IL_4af2: ldc.i4.3 - IL_4af3: shr - IL_4af4: pop - IL_4af9: dup - IL_4afa: ldc.i4.7 - IL_4afb: add - IL_4afc: pop - IL_4b01: dup - IL_4b02: ldc.i4.4 - IL_4b03: add - IL_4b04: pop - IL_4b09: dup - IL_4b0a: ldc.i4.3 - IL_4b0b: shl - IL_4b0c: pop - IL_4b11: dup - IL_4b12: ldc.i4.4 - IL_4b13: or - IL_4b14: pop - IL_4b19: dup - IL_4b1a: ldc.i4.7 - IL_4b1b: add - IL_4b1c: pop - IL_4b21: dup - IL_4b22: ldc.i4.1 - IL_4b23: sub - IL_4b24: pop - IL_4b29: dup - IL_4b2a: ldc.i4.0 - IL_4b2b: add - IL_4b2c: pop - IL_4b31: dup - IL_4b32: ldc.i4.2 - IL_4b33: add - IL_4b34: pop - IL_4b39: dup - IL_4b3a: ldc.i4.7 - IL_4b3b: shr - IL_4b3c: pop - IL_4b41: dup - IL_4b42: ldc.i4.2 - IL_4b43: mul - IL_4b44: pop - IL_4b49: dup - IL_4b4a: ldc.i4.3 - IL_4b4b: or - IL_4b4c: pop - IL_4b51: dup - IL_4b52: ldc.i4.2 - IL_4b53: mul - IL_4b54: pop - IL_4b59: dup - IL_4b5a: ldc.i4.5 - IL_4b5b: and - IL_4b5c: pop - IL_4b61: dup - IL_4b62: ldc.i4.5 - IL_4b63: shr - IL_4b64: pop - IL_4b69: dup - IL_4b6a: ldc.i4.2 - IL_4b6b: shl - IL_4b6c: pop - IL_4b71: dup - IL_4b72: ldc.i4.2 - IL_4b73: add - IL_4b74: pop - IL_4b79: dup - IL_4b7a: ldc.i4.4 - IL_4b7b: sub - IL_4b7c: pop - IL_4b81: dup - IL_4b82: ldc.i4.1 - IL_4b83: shr - IL_4b84: pop - IL_4b89: dup - IL_4b8a: ldc.i4.3 - IL_4b8b: or - IL_4b8c: pop - IL_4b91: dup - IL_4b92: ldc.i4.2 - IL_4b93: mul - IL_4b94: pop - IL_4b99: dup - IL_4b9a: ldc.i4.5 - IL_4b9b: mul - IL_4b9c: pop - IL_4ba1: dup - IL_4ba2: ldc.i4.3 - IL_4ba3: and - IL_4ba4: pop - IL_4ba9: dup - IL_4baa: ldc.i4.8 - IL_4bab: and - IL_4bac: pop - IL_4bb1: dup - IL_4bb2: ldc.i4.3 - IL_4bb3: add - IL_4bb4: pop - IL_4bb9: dup - IL_4bba: ldc.i4.7 - IL_4bbb: shl - IL_4bbc: pop - IL_4bc1: dup - IL_4bc2: ldc.i4.5 - IL_4bc3: shl - IL_4bc4: pop - IL_4bc9: dup - IL_4bca: ldc.i4.2 - IL_4bcb: add - IL_4bcc: pop - IL_4bd1: dup - IL_4bd2: ldc.i4.2 - IL_4bd3: and - IL_4bd4: pop - IL_4bd9: dup - IL_4bda: ldc.i4.6 - IL_4bdb: sub - IL_4bdc: pop - IL_4be1: dup - IL_4be2: ldc.i4.4 - IL_4be3: shr - IL_4be4: pop - IL_4be9: dup - IL_4bea: ldc.i4.8 - IL_4beb: and - IL_4bec: pop - IL_4bf1: dup - IL_4bf2: ldc.i4.6 - IL_4bf3: sub - IL_4bf4: pop - IL_4bf9: dup - IL_4bfa: ldc.i4.7 - IL_4bfb: add - IL_4bfc: pop - IL_4c01: dup - IL_4c02: ldc.i4.5 - IL_4c03: and - IL_4c04: pop - IL_4c09: dup - IL_4c0a: ldc.i4.7 - IL_4c0b: shl - IL_4c0c: pop - IL_4c11: dup - IL_4c12: ldc.i4.6 - IL_4c13: and - IL_4c14: pop - IL_4c19: dup - IL_4c1a: ldc.i4.3 - IL_4c1b: add - IL_4c1c: pop - IL_4c21: dup - IL_4c22: ldc.i4.6 - IL_4c23: add - IL_4c24: pop - IL_4c29: dup - IL_4c2a: ldc.i4.5 - IL_4c2b: shl - IL_4c2c: pop - IL_4c31: dup - IL_4c32: ldc.i4.2 - IL_4c33: and - IL_4c34: pop - IL_4c39: dup - IL_4c3a: ldc.i4.2 - IL_4c3b: shl - IL_4c3c: pop - IL_4c41: dup - IL_4c42: ldc.i4.7 - IL_4c43: shr - IL_4c44: pop - IL_4c49: dup - IL_4c4a: ldc.i4.8 - IL_4c4b: shr - IL_4c4c: pop - IL_4c51: dup - IL_4c52: ldc.i4.7 - IL_4c53: xor - IL_4c54: pop - IL_4c59: dup - IL_4c5a: ldc.i4.8 - IL_4c5b: xor - IL_4c5c: pop - IL_4c61: dup - IL_4c62: ldc.i4.8 - IL_4c63: sub - IL_4c64: pop - IL_4c69: dup - IL_4c6a: ldc.i4.4 - IL_4c6b: shr - IL_4c6c: pop - IL_4c71: dup - IL_4c72: ldc.i4.3 - IL_4c73: and - IL_4c74: pop - IL_4c79: dup - IL_4c7a: ldc.i4.6 - IL_4c7b: sub - IL_4c7c: pop - IL_4c81: dup - IL_4c82: ldc.i4.8 - IL_4c83: or - IL_4c84: pop - IL_4c89: dup - IL_4c8a: ldc.i4.1 - IL_4c8b: shl - IL_4c8c: pop - IL_4c91: dup - IL_4c92: ldc.i4.1 - IL_4c93: mul - IL_4c94: pop - IL_4c99: dup - IL_4c9a: ldc.i4.7 - IL_4c9b: and - IL_4c9c: pop - IL_4ca1: dup - IL_4ca2: ldc.i4.1 - IL_4ca3: mul - IL_4ca4: pop - IL_4ca9: dup - IL_4caa: ldc.i4.2 - IL_4cab: sub - IL_4cac: pop - IL_4cb1: dup - IL_4cb2: ldc.i4.1 - IL_4cb3: sub - IL_4cb4: pop - IL_4cb9: dup - IL_4cba: ldc.i4.8 - IL_4cbb: shr - IL_4cbc: pop - IL_4cc1: dup - IL_4cc2: ldc.i4.2 - IL_4cc3: xor - IL_4cc4: pop - IL_4cc9: dup - IL_4cca: ldc.i4.8 - IL_4ccb: or - IL_4ccc: pop - IL_4cd1: dup - IL_4cd2: ldc.i4.2 - IL_4cd3: add - IL_4cd4: pop - IL_4cd9: dup - IL_4cda: ldc.i4.2 - IL_4cdb: sub - IL_4cdc: pop - IL_4ce1: dup - IL_4ce2: ldc.i4.8 - IL_4ce3: xor - IL_4ce4: pop - IL_4ce9: dup - IL_4cea: ldc.i4.5 - IL_4ceb: shl - IL_4cec: pop - IL_4cf1: dup - IL_4cf2: ldc.i4.3 - IL_4cf3: shr - IL_4cf4: pop - IL_4cf9: dup - IL_4cfa: ldc.i4.6 - IL_4cfb: or - IL_4cfc: pop - IL_4d01: dup - IL_4d02: ldc.i4.3 - IL_4d03: xor - IL_4d04: pop - IL_4d09: dup - IL_4d0a: ldc.i4.4 - IL_4d0b: mul - IL_4d0c: pop - IL_4d11: dup - IL_4d12: ldc.i4.5 - IL_4d13: shr - IL_4d14: pop - IL_4d19: dup - IL_4d1a: ldc.i4.3 - IL_4d1b: shl - IL_4d1c: pop - IL_4d21: dup - IL_4d22: ldc.i4.7 - IL_4d23: sub - IL_4d24: pop - IL_4d29: dup - IL_4d2a: ldc.i4.4 - IL_4d2b: shl - IL_4d2c: pop - IL_4d31: dup - IL_4d32: ldc.i4.1 - IL_4d33: shr - IL_4d34: pop - IL_4d39: dup - IL_4d3a: ldc.i4.1 - IL_4d3b: and - IL_4d3c: pop - IL_4d41: dup - IL_4d42: ldc.i4.1 - IL_4d43: and - IL_4d44: pop - IL_4d49: dup - IL_4d4a: ldc.i4.3 - IL_4d4b: or - IL_4d4c: pop - IL_4d51: dup - IL_4d52: ldc.i4.7 - IL_4d53: shr - IL_4d54: pop - IL_4d59: dup - IL_4d5a: ldc.i4.8 - IL_4d5b: or - IL_4d5c: pop - IL_4d61: dup - IL_4d62: ldc.i4.5 - IL_4d63: add - IL_4d64: pop - IL_4d69: dup - IL_4d6a: ldc.i4.5 - IL_4d6b: shr - IL_4d6c: pop - IL_4d71: dup - IL_4d72: ldc.i4.5 - IL_4d73: mul - IL_4d74: pop - IL_4d79: dup - IL_4d7a: ldc.i4.3 - IL_4d7b: xor - IL_4d7c: pop - IL_4d81: dup - IL_4d82: ldc.i4.4 - IL_4d83: xor - IL_4d84: pop - IL_4d89: dup - IL_4d8a: ldc.i4.7 - IL_4d8b: shr - IL_4d8c: pop - IL_4d91: dup - IL_4d92: ldc.i4.5 - IL_4d93: shl - IL_4d94: pop - IL_4d99: dup - IL_4d9a: ldc.i4.0 - IL_4d9b: shl - IL_4d9c: pop - IL_4da1: dup - IL_4da2: ldc.i4.0 - IL_4da3: mul - IL_4da4: pop - IL_4da9: dup - IL_4daa: ldc.i4.1 - IL_4dab: add - IL_4dac: pop - IL_4db1: dup - IL_4db2: ldc.i4.4 - IL_4db3: shr - IL_4db4: pop - IL_4db9: dup - IL_4dba: ldc.i4.8 - IL_4dbb: mul - IL_4dbc: pop - IL_4dc1: dup - IL_4dc2: ldc.i4.2 - IL_4dc3: and - IL_4dc4: pop - IL_4dc9: dup - IL_4dca: ldc.i4.3 - IL_4dcb: shr - IL_4dcc: pop - IL_4dd1: dup - IL_4dd2: ldc.i4.3 - IL_4dd3: and - IL_4dd4: pop - IL_4dd9: dup - IL_4dda: ldc.i4.0 - IL_4ddb: shr - IL_4ddc: pop - IL_4de1: dup - IL_4de2: ldc.i4.5 - IL_4de3: shl - IL_4de4: pop - IL_4de9: dup - IL_4dea: ldc.i4.6 - IL_4deb: shl - IL_4dec: pop - IL_4df1: dup - IL_4df2: ldc.i4.0 - IL_4df3: shr - IL_4df4: pop - IL_4df9: dup - IL_4dfa: ldc.i4.8 - IL_4dfb: xor - IL_4dfc: pop - IL_4e01: dup - IL_4e02: ldc.i4.7 - IL_4e03: add - IL_4e04: pop - IL_4e09: dup - IL_4e0a: ldc.i4.8 - IL_4e0b: shr - IL_4e0c: pop - IL_4e11: dup - IL_4e12: ldc.i4.7 - IL_4e13: xor - IL_4e14: pop - IL_4e19: dup - IL_4e1a: ldc.i4.1 - IL_4e1b: shl - IL_4e1c: pop - IL_4e21: dup - IL_4e22: ldc.i4.6 - IL_4e23: and - IL_4e24: pop - IL_4e29: dup - IL_4e2a: ldc.i4.8 - IL_4e2b: xor - IL_4e2c: pop - IL_4e31: dup - IL_4e32: ldc.i4.4 - IL_4e33: and - IL_4e34: pop - IL_4e39: dup - IL_4e3a: ldc.i4.3 - IL_4e3b: or - IL_4e3c: pop - IL_4e41: dup - IL_4e42: ldc.i4.0 - IL_4e43: mul - IL_4e44: pop - IL_4e49: dup - IL_4e4a: ldc.i4.3 - IL_4e4b: or - IL_4e4c: pop - IL_4e51: dup - IL_4e52: ldc.i4.8 - IL_4e53: shr - IL_4e54: pop - IL_4e59: dup - IL_4e5a: ldc.i4.0 - IL_4e5b: and - IL_4e5c: pop - IL_4e61: dup - IL_4e62: ldc.i4.3 - IL_4e63: sub - IL_4e64: pop - IL_4e69: dup - IL_4e6a: ldc.i4.1 - IL_4e6b: or - IL_4e6c: pop - IL_4e71: dup - IL_4e72: ldc.i4.8 - IL_4e73: shl - IL_4e74: pop - IL_4e79: dup - IL_4e7a: ldc.i4.4 - IL_4e7b: xor - IL_4e7c: pop - IL_4e81: dup - IL_4e82: ldc.i4.3 - IL_4e83: and - IL_4e84: pop - IL_4e89: dup - IL_4e8a: ldc.i4.2 - IL_4e8b: xor - IL_4e8c: pop - IL_4e91: dup - IL_4e92: ldc.i4.6 - IL_4e93: sub - IL_4e94: pop - IL_4e99: dup - IL_4e9a: ldc.i4.4 - IL_4e9b: or - IL_4e9c: pop - IL_4ea1: dup - IL_4ea2: ldc.i4.4 - IL_4ea3: and - IL_4ea4: pop - IL_4ea9: dup - IL_4eaa: ldc.i4.8 - IL_4eab: shl - IL_4eac: pop - IL_4eb1: dup - IL_4eb2: ldc.i4.7 - IL_4eb3: shl - IL_4eb4: pop - IL_4eb9: dup - IL_4eba: ldc.i4.2 - IL_4ebb: shr - IL_4ebc: pop - IL_4ec1: dup - IL_4ec2: ldc.i4.2 - IL_4ec3: and - IL_4ec4: pop - IL_4ec9: dup - IL_4eca: ldc.i4.3 - IL_4ecb: and - IL_4ecc: pop - IL_4ed1: dup - IL_4ed2: ldc.i4.2 - IL_4ed3: add - IL_4ed4: pop - IL_4ed9: dup - IL_4eda: ldc.i4.4 - IL_4edb: add - IL_4edc: pop - IL_4ee1: dup - IL_4ee2: ldc.i4.8 - IL_4ee3: sub - IL_4ee4: pop - IL_4ee9: dup - IL_4eea: ldc.i4.3 - IL_4eeb: shr - IL_4eec: pop - IL_4ef1: dup - IL_4ef2: ldc.i4.2 - IL_4ef3: sub - IL_4ef4: pop - IL_4ef9: dup - IL_4efa: ldc.i4.6 - IL_4efb: add - IL_4efc: pop - IL_4f01: dup - IL_4f02: ldc.i4.2 - IL_4f03: shl - IL_4f04: pop - IL_4f09: dup - IL_4f0a: ldc.i4.0 - IL_4f0b: shr - IL_4f0c: pop - IL_4f11: dup - IL_4f12: ldc.i4.5 - IL_4f13: or - IL_4f14: pop - IL_4f19: dup - IL_4f1a: ldc.i4.1 - IL_4f1b: and - IL_4f1c: pop - IL_4f21: dup - IL_4f22: ldc.i4.7 - IL_4f23: xor - IL_4f24: pop - IL_4f29: dup - IL_4f2a: ldc.i4.3 - IL_4f2b: sub - IL_4f2c: pop - IL_4f31: dup - IL_4f32: ldc.i4.7 - IL_4f33: shl - IL_4f34: pop - IL_4f39: dup - IL_4f3a: ldc.i4.8 - IL_4f3b: and - IL_4f3c: pop - IL_4f41: dup - IL_4f42: ldc.i4.7 - IL_4f43: xor - IL_4f44: pop - IL_4f49: dup - IL_4f4a: ldc.i4.6 - IL_4f4b: sub - IL_4f4c: pop - IL_4f51: dup - IL_4f52: ldc.i4.1 - IL_4f53: shr - IL_4f54: pop - IL_4f59: dup - IL_4f5a: ldc.i4.0 - IL_4f5b: xor - IL_4f5c: pop - IL_4f61: dup - IL_4f62: ldc.i4.2 - IL_4f63: sub - IL_4f64: pop - IL_4f69: dup - IL_4f6a: ldc.i4.4 - IL_4f6b: shl - IL_4f6c: pop - IL_4f71: dup - IL_4f72: ldc.i4.7 - IL_4f73: and - IL_4f74: pop - IL_4f79: dup - IL_4f7a: ldc.i4.5 - IL_4f7b: mul - IL_4f7c: pop - IL_4f81: dup - IL_4f82: ldc.i4.0 - IL_4f83: and - IL_4f84: pop - IL_4f89: dup - IL_4f8a: ldc.i4.2 - IL_4f8b: mul - IL_4f8c: pop - IL_4f91: dup - IL_4f92: ldc.i4.4 - IL_4f93: shl - IL_4f94: pop - IL_4f99: dup - IL_4f9a: ldc.i4.0 - IL_4f9b: mul - IL_4f9c: pop - IL_4fa1: dup - IL_4fa2: ldc.i4.5 - IL_4fa3: shl - IL_4fa4: pop - IL_4fa9: dup - IL_4faa: ldc.i4.8 - IL_4fab: and - IL_4fac: pop - IL_4fb1: dup - IL_4fb2: ldc.i4.6 - IL_4fb3: sub - IL_4fb4: pop - IL_4fb9: dup - IL_4fba: ldc.i4.2 - IL_4fbb: xor - IL_4fbc: pop - IL_4fc1: dup - IL_4fc2: ldc.i4.2 - IL_4fc3: shl - IL_4fc4: pop - IL_4fc9: dup - IL_4fca: ldc.i4.7 - IL_4fcb: and - IL_4fcc: pop - IL_4fd1: dup - IL_4fd2: ldc.i4.4 - IL_4fd3: shl - IL_4fd4: pop - IL_4fd9: dup - IL_4fda: ldc.i4.8 - IL_4fdb: shl - IL_4fdc: pop - IL_4fe1: dup - IL_4fe2: ldc.i4.4 - IL_4fe3: shr - IL_4fe4: pop - IL_4fe9: dup - IL_4fea: ldc.i4.3 - IL_4feb: xor - IL_4fec: pop - IL_4ff1: dup - IL_4ff2: ldc.i4.3 - IL_4ff3: shr - IL_4ff4: pop - IL_4ff9: dup - IL_4ffa: ldc.i4.8 - IL_4ffb: add - IL_4ffc: pop - IL_5001: dup - IL_5002: ldc.i4.7 - IL_5003: add - IL_5004: pop - IL_5009: dup - IL_500a: ldc.i4.1 - IL_500b: or - IL_500c: pop - IL_5011: dup - IL_5012: ldc.i4.2 - IL_5013: shl - IL_5014: pop - IL_5019: dup - IL_501a: ldc.i4.2 - IL_501b: mul - IL_501c: pop - IL_5021: dup - IL_5022: ldc.i4.3 - IL_5023: xor - IL_5024: pop - IL_5029: dup - IL_502a: ldc.i4.5 - IL_502b: shl - IL_502c: pop - IL_5031: dup - IL_5032: ldc.i4.6 - IL_5033: mul - IL_5034: pop - IL_5039: dup - IL_503a: ldc.i4.6 - IL_503b: add - IL_503c: pop - IL_5041: dup - IL_5042: ldc.i4.7 - IL_5043: add - IL_5044: pop - IL_5049: dup - IL_504a: ldc.i4.2 - IL_504b: mul - IL_504c: pop - IL_5051: dup - IL_5052: ldc.i4.8 - IL_5053: and - IL_5054: pop - IL_5059: dup - IL_505a: ldc.i4.7 - IL_505b: shl - IL_505c: pop - IL_5061: dup - IL_5062: ldc.i4.8 - IL_5063: shr - IL_5064: pop - IL_5069: dup - IL_506a: ldc.i4.8 - IL_506b: and - IL_506c: pop - IL_5071: dup - IL_5072: ldc.i4.0 - IL_5073: shl - IL_5074: pop - IL_5079: dup - IL_507a: ldc.i4.7 - IL_507b: or - IL_507c: pop - IL_5081: dup - IL_5082: ldc.i4.5 - IL_5083: or - IL_5084: pop - IL_5089: dup - IL_508a: ldc.i4.8 - IL_508b: shr - IL_508c: pop - IL_5091: dup - IL_5092: ldc.i4.0 - IL_5093: xor - IL_5094: pop - IL_5099: dup - IL_509a: ldc.i4.1 - IL_509b: shr - IL_509c: pop - IL_50a1: dup - IL_50a2: ldc.i4.2 - IL_50a3: xor - IL_50a4: pop - IL_50a9: dup - IL_50aa: ldc.i4.3 - IL_50ab: add - IL_50ac: pop - IL_50b1: dup - IL_50b2: ldc.i4.8 - IL_50b3: mul - IL_50b4: pop - IL_50b9: dup - IL_50ba: ldc.i4.7 - IL_50bb: sub - IL_50bc: pop - IL_50c1: dup - IL_50c2: ldc.i4.8 - IL_50c3: xor - IL_50c4: pop - IL_50c9: dup - IL_50ca: ldc.i4.5 - IL_50cb: mul - IL_50cc: pop - IL_50d1: dup - IL_50d2: ldc.i4.3 - IL_50d3: shr - IL_50d4: pop - IL_50d9: dup - IL_50da: ldc.i4.0 - IL_50db: add - IL_50dc: pop - IL_50e1: dup - IL_50e2: ldc.i4.1 - IL_50e3: shl - IL_50e4: pop - IL_50e9: dup - IL_50ea: ldc.i4.8 - IL_50eb: shr - IL_50ec: pop - IL_50f1: dup - IL_50f2: ldc.i4.5 - IL_50f3: xor - IL_50f4: pop - IL_50f9: dup - IL_50fa: ldc.i4.2 - IL_50fb: and - IL_50fc: pop - IL_5101: dup - IL_5102: ldc.i4.5 - IL_5103: shr - IL_5104: pop - IL_5109: dup - IL_510a: ldc.i4.0 - IL_510b: or - IL_510c: pop - IL_5111: dup - IL_5112: ldc.i4.2 - IL_5113: or - IL_5114: pop - IL_5119: dup - IL_511a: ldc.i4.8 - IL_511b: xor - IL_511c: pop - IL_5121: dup - IL_5122: ldc.i4.8 - IL_5123: shl - IL_5124: pop - IL_5129: dup - IL_512a: ldc.i4.0 - IL_512b: shl - IL_512c: pop - IL_5131: dup - IL_5132: ldc.i4.4 - IL_5133: and - IL_5134: pop - IL_5139: dup - IL_513a: ldc.i4.5 - IL_513b: shr - IL_513c: pop - IL_5141: dup - IL_5142: ldc.i4.7 - IL_5143: shr - IL_5144: pop - IL_5149: dup - IL_514a: ldc.i4.7 - IL_514b: shr - IL_514c: pop - IL_5151: dup - IL_5152: ldc.i4.0 - IL_5153: xor - IL_5154: pop - IL_5159: dup - IL_515a: ldc.i4.4 - IL_515b: or - IL_515c: pop - IL_5161: dup - IL_5162: ldc.i4.7 - IL_5163: or - IL_5164: pop - IL_5169: dup - IL_516a: ldc.i4.4 - IL_516b: shl - IL_516c: pop - IL_5171: dup - IL_5172: ldc.i4.3 - IL_5173: xor - IL_5174: pop - IL_5179: dup - IL_517a: ldc.i4.0 - IL_517b: and - IL_517c: pop - IL_5181: dup - IL_5182: ldc.i4.1 - IL_5183: shl - IL_5184: pop - IL_5189: dup - IL_518a: ldc.i4.3 - IL_518b: mul - IL_518c: pop - IL_5191: dup - IL_5192: ldc.i4.2 - IL_5193: or - IL_5194: pop - IL_5199: dup - IL_519a: ldc.i4.7 - IL_519b: add - IL_519c: pop - IL_51a1: dup - IL_51a2: ldc.i4.3 - IL_51a3: add - IL_51a4: pop - IL_51a9: dup - IL_51aa: ldc.i4.3 - IL_51ab: or - IL_51ac: pop - IL_51b1: dup - IL_51b2: ldc.i4.5 - IL_51b3: shl - IL_51b4: pop - IL_51b9: dup - IL_51ba: ldc.i4.5 - IL_51bb: mul - IL_51bc: pop - IL_51c1: dup - IL_51c2: ldc.i4.8 - IL_51c3: mul - IL_51c4: pop - IL_51c9: dup - IL_51ca: ldc.i4.7 - IL_51cb: or - IL_51cc: pop - IL_51d1: dup - IL_51d2: ldc.i4.5 - IL_51d3: shl - IL_51d4: pop - IL_51d9: dup - IL_51da: ldc.i4.6 - IL_51db: add - IL_51dc: pop - IL_51e1: dup - IL_51e2: ldc.i4.0 - IL_51e3: sub - IL_51e4: pop - IL_51e9: dup - IL_51ea: ldc.i4.0 - IL_51eb: xor - IL_51ec: pop - IL_51f1: dup - IL_51f2: ldc.i4.4 - IL_51f3: xor - IL_51f4: pop - IL_51f9: dup - IL_51fa: ldc.i4.0 - IL_51fb: shl - IL_51fc: pop - IL_5201: dup - IL_5202: ldc.i4.4 - IL_5203: mul - IL_5204: pop - IL_5209: dup - IL_520a: ldc.i4.3 - IL_520b: or - IL_520c: pop - IL_5211: dup - IL_5212: ldc.i4.3 - IL_5213: mul - IL_5214: pop - IL_5219: dup - IL_521a: ldc.i4.3 - IL_521b: and - IL_521c: pop - IL_5221: dup - IL_5222: ldc.i4.7 - IL_5223: and - IL_5224: pop - IL_5229: dup - IL_522a: ldc.i4.2 - IL_522b: or - IL_522c: pop - IL_5231: dup - IL_5232: ldc.i4.0 - IL_5233: shr - IL_5234: pop - IL_5239: dup - IL_523a: ldc.i4.2 - IL_523b: mul - IL_523c: pop - IL_5241: dup - IL_5242: ldc.i4.2 - IL_5243: sub - IL_5244: pop - IL_5249: dup - IL_524a: ldc.i4.5 - IL_524b: sub - IL_524c: pop - IL_5251: dup - IL_5252: ldc.i4.5 - IL_5253: add - IL_5254: pop - IL_5259: dup - IL_525a: ldc.i4.0 - IL_525b: shl - IL_525c: pop - IL_5261: dup - IL_5262: ldc.i4.7 - IL_5263: mul - IL_5264: pop - IL_5269: dup - IL_526a: ldc.i4.1 - IL_526b: add - IL_526c: pop - IL_5271: dup - IL_5272: ldc.i4.7 - IL_5273: xor - IL_5274: pop - IL_5279: dup - IL_527a: ldc.i4.4 - IL_527b: add - IL_527c: pop - IL_5281: dup - IL_5282: ldc.i4.0 - IL_5283: or - IL_5284: pop - IL_5289: dup - IL_528a: ldc.i4.3 - IL_528b: mul - IL_528c: pop - IL_5291: dup - IL_5292: ldc.i4.1 - IL_5293: shr - IL_5294: pop - IL_5299: dup - IL_529a: ldc.i4.8 - IL_529b: shl - IL_529c: pop - IL_52a1: dup - IL_52a2: ldc.i4.7 - IL_52a3: or - IL_52a4: pop - IL_52a9: dup - IL_52aa: ldc.i4.0 - IL_52ab: and - IL_52ac: pop - IL_52b1: dup - IL_52b2: ldc.i4.2 - IL_52b3: and - IL_52b4: pop - IL_52b9: dup - IL_52ba: ldc.i4.0 - IL_52bb: xor - IL_52bc: pop - IL_52c1: dup - IL_52c2: ldc.i4.7 - IL_52c3: and - IL_52c4: pop - IL_52c9: dup - IL_52ca: ldc.i4.0 - IL_52cb: mul - IL_52cc: pop - IL_52d1: dup - IL_52d2: ldc.i4.7 - IL_52d3: or - IL_52d4: pop - IL_52d9: dup - IL_52da: ldc.i4.8 - IL_52db: mul - IL_52dc: pop - IL_52e1: dup - IL_52e2: ldc.i4.1 - IL_52e3: and - IL_52e4: pop - IL_52e9: dup - IL_52ea: ldc.i4.0 - IL_52eb: add - IL_52ec: pop - IL_52f1: dup - IL_52f2: ldc.i4.0 - IL_52f3: mul - IL_52f4: pop - IL_52f9: dup - IL_52fa: ldc.i4.0 - IL_52fb: xor - IL_52fc: pop - IL_5301: dup - IL_5302: ldc.i4.2 - IL_5303: mul - IL_5304: pop - IL_5309: dup - IL_530a: ldc.i4.7 - IL_530b: sub - IL_530c: pop - IL_5311: dup - IL_5312: ldc.i4.2 - IL_5313: or - IL_5314: pop - IL_5319: dup - IL_531a: ldc.i4.1 - IL_531b: shr - IL_531c: pop - IL_5321: dup - IL_5322: ldc.i4.1 - IL_5323: or - IL_5324: pop - IL_5329: dup - IL_532a: ldc.i4.2 - IL_532b: shl - IL_532c: pop - IL_5331: dup - IL_5332: ldc.i4.0 - IL_5333: sub - IL_5334: pop - IL_5339: dup - IL_533a: ldc.i4.2 - IL_533b: or - IL_533c: pop - IL_5341: dup - IL_5342: ldc.i4.2 - IL_5343: and - IL_5344: pop - IL_5349: dup - IL_534a: ldc.i4.1 - IL_534b: add - IL_534c: pop - IL_5351: dup - IL_5352: ldc.i4.3 - IL_5353: sub - IL_5354: pop - IL_5359: dup - IL_535a: ldc.i4.1 - IL_535b: sub - IL_535c: pop - IL_5361: dup - IL_5362: ldc.i4.8 - IL_5363: add - IL_5364: pop - IL_5369: dup - IL_536a: ldc.i4.0 - IL_536b: mul - IL_536c: pop - IL_5371: dup - IL_5372: ldc.i4.5 - IL_5373: and - IL_5374: pop - IL_5379: dup - IL_537a: ldc.i4.4 - IL_537b: xor - IL_537c: pop - IL_5381: dup - IL_5382: ldc.i4.8 - IL_5383: shr - IL_5384: pop - IL_5389: dup - IL_538a: ldc.i4.5 - IL_538b: add - IL_538c: pop - IL_5391: dup - IL_5392: ldc.i4.8 - IL_5393: and - IL_5394: pop - IL_5399: dup - IL_539a: ldc.i4.1 - IL_539b: and - IL_539c: pop - IL_53a1: dup - IL_53a2: ldc.i4.5 - IL_53a3: xor - IL_53a4: pop - IL_53a9: dup - IL_53aa: ldc.i4.0 - IL_53ab: and - IL_53ac: pop - IL_53b1: dup - IL_53b2: ldc.i4.5 - IL_53b3: mul - IL_53b4: pop - IL_53b9: dup - IL_53ba: ldc.i4.2 - IL_53bb: or - IL_53bc: pop - IL_53c1: dup - IL_53c2: ldc.i4.4 - IL_53c3: add - IL_53c4: pop - IL_53c9: dup - IL_53ca: ldc.i4.7 - IL_53cb: mul - IL_53cc: pop - IL_53d1: dup - IL_53d2: ldc.i4.1 - IL_53d3: or - IL_53d4: pop - IL_53d9: dup - IL_53da: ldc.i4.0 - IL_53db: add - IL_53dc: pop - IL_53e1: dup - IL_53e2: ldc.i4.0 - IL_53e3: shr - IL_53e4: pop - IL_53e9: dup - IL_53ea: ldc.i4.2 - IL_53eb: sub - IL_53ec: pop - IL_53f1: dup - IL_53f2: ldc.i4.8 - IL_53f3: and - IL_53f4: pop - IL_53f9: dup - IL_53fa: ldc.i4.0 - IL_53fb: mul - IL_53fc: pop - IL_5401: dup - IL_5402: ldc.i4.4 - IL_5403: and - IL_5404: pop - IL_5409: dup - IL_540a: ldc.i4.5 - IL_540b: mul - IL_540c: pop - IL_5411: dup - IL_5412: ldc.i4.5 - IL_5413: mul - IL_5414: pop - IL_5419: dup - IL_541a: ldc.i4.8 - IL_541b: xor - IL_541c: pop - IL_5421: dup - IL_5422: ldc.i4.5 - IL_5423: mul - IL_5424: pop - IL_5429: dup - IL_542a: ldc.i4.4 - IL_542b: or - IL_542c: pop - IL_5431: dup - IL_5432: ldc.i4.1 - IL_5433: xor - IL_5434: pop - IL_5439: dup - IL_543a: ldc.i4.4 - IL_543b: shl - IL_543c: pop - IL_5441: dup - IL_5442: ldc.i4.6 - IL_5443: add - IL_5444: pop - IL_5449: dup - IL_544a: ldc.i4.6 - IL_544b: shl - IL_544c: pop - IL_5451: dup - IL_5452: ldc.i4.0 - IL_5453: sub - IL_5454: pop - IL_5459: dup - IL_545a: ldc.i4.3 - IL_545b: add - IL_545c: pop - IL_5461: dup - IL_5462: ldc.i4.6 - IL_5463: shl - IL_5464: pop - IL_5469: dup - IL_546a: ldc.i4.8 - IL_546b: sub - IL_546c: pop - IL_5471: dup - IL_5472: ldc.i4.5 - IL_5473: add - IL_5474: pop - IL_5479: dup - IL_547a: ldc.i4.8 - IL_547b: shr - IL_547c: pop - IL_5481: dup - IL_5482: ldc.i4.3 - IL_5483: shr - IL_5484: pop - IL_5489: dup - IL_548a: ldc.i4.2 - IL_548b: shr - IL_548c: pop - IL_5491: dup - IL_5492: ldc.i4.6 - IL_5493: or - IL_5494: pop - IL_5499: dup - IL_549a: ldc.i4.3 - IL_549b: mul - IL_549c: pop - IL_54a1: dup - IL_54a2: ldc.i4.1 - IL_54a3: mul - IL_54a4: pop - IL_54a9: dup - IL_54aa: ldc.i4.6 - IL_54ab: and - IL_54ac: pop - IL_54b1: dup - IL_54b2: ldc.i4.4 - IL_54b3: add - IL_54b4: pop - IL_54b9: dup - IL_54ba: ldc.i4.7 - IL_54bb: shr - IL_54bc: pop - IL_54c1: dup - IL_54c2: ldc.i4.1 - IL_54c3: shr - IL_54c4: pop - IL_54c9: dup - IL_54ca: ldc.i4.3 - IL_54cb: and - IL_54cc: pop - IL_54d1: dup - IL_54d2: ldc.i4.0 - IL_54d3: xor - IL_54d4: pop - IL_54d9: dup - IL_54da: ldc.i4.2 - IL_54db: mul - IL_54dc: pop - IL_54e1: dup - IL_54e2: ldc.i4.4 - IL_54e3: shl - IL_54e4: pop - IL_54e9: dup - IL_54ea: ldc.i4.5 - IL_54eb: add - IL_54ec: pop - IL_54f1: dup - IL_54f2: ldc.i4.3 - IL_54f3: shr - IL_54f4: pop - IL_54f9: dup - IL_54fa: ldc.i4.7 - IL_54fb: shl - IL_54fc: pop - IL_5501: dup - IL_5502: ldc.i4.3 - IL_5503: shr - IL_5504: pop - IL_5509: dup - IL_550a: ldc.i4.4 - IL_550b: xor - IL_550c: pop - IL_5511: dup - IL_5512: ldc.i4.0 - IL_5513: and - IL_5514: pop - IL_5519: dup - IL_551a: ldc.i4.7 - IL_551b: and - IL_551c: pop - IL_5521: dup - IL_5522: ldc.i4.6 - IL_5523: xor - IL_5524: pop - IL_5529: dup - IL_552a: ldc.i4.3 - IL_552b: shr - IL_552c: pop - IL_5531: dup - IL_5532: ldc.i4.4 - IL_5533: shl - IL_5534: pop - IL_5539: dup - IL_553a: ldc.i4.4 - IL_553b: shl - IL_553c: pop - IL_5541: dup - IL_5542: ldc.i4.6 - IL_5543: sub - IL_5544: pop - IL_5549: dup - IL_554a: ldc.i4.0 - IL_554b: or - IL_554c: pop - IL_5551: dup - IL_5552: ldc.i4.5 - IL_5553: add - IL_5554: pop - IL_5559: dup - IL_555a: ldc.i4.5 - IL_555b: or - IL_555c: pop - IL_5561: dup - IL_5562: ldc.i4.3 - IL_5563: add - IL_5564: pop - IL_5569: dup - IL_556a: ldc.i4.2 - IL_556b: sub - IL_556c: pop - IL_5571: dup - IL_5572: ldc.i4.2 - IL_5573: mul - IL_5574: pop - IL_5579: dup - IL_557a: ldc.i4.8 - IL_557b: xor - IL_557c: pop - IL_5581: dup - IL_5582: ldc.i4.4 - IL_5583: sub - IL_5584: pop - IL_5589: dup - IL_558a: ldc.i4.3 - IL_558b: and - IL_558c: pop - IL_5591: dup - IL_5592: ldc.i4.5 - IL_5593: xor - IL_5594: pop - IL_5599: dup - IL_559a: ldc.i4.5 - IL_559b: xor - IL_559c: pop - IL_55a1: dup - IL_55a2: ldc.i4.6 - IL_55a3: shr - IL_55a4: pop - IL_55a9: dup - IL_55aa: ldc.i4.0 - IL_55ab: shl - IL_55ac: pop - IL_55b1: dup - IL_55b2: ldc.i4.1 - IL_55b3: shl - IL_55b4: pop - IL_55b9: dup - IL_55ba: ldc.i4.7 - IL_55bb: or - IL_55bc: pop - IL_55c1: dup - IL_55c2: ldc.i4.0 - IL_55c3: add - IL_55c4: pop - IL_55c9: dup - IL_55ca: ldc.i4.2 - IL_55cb: add - IL_55cc: pop - IL_55d1: dup - IL_55d2: ldc.i4.6 - IL_55d3: or - IL_55d4: pop - IL_55d9: dup - IL_55da: ldc.i4.8 - IL_55db: mul - IL_55dc: pop - IL_55e1: dup - IL_55e2: ldc.i4.0 - IL_55e3: shl - IL_55e4: pop - IL_55e9: dup - IL_55ea: ldc.i4.0 - IL_55eb: add - IL_55ec: pop - IL_55f1: dup - IL_55f2: ldc.i4.5 - IL_55f3: and - IL_55f4: pop - IL_55f9: dup - IL_55fa: ldc.i4.3 - IL_55fb: xor - IL_55fc: pop - IL_5601: dup - IL_5602: ldc.i4.5 - IL_5603: or - IL_5604: pop - IL_5609: dup - IL_560a: ldc.i4.2 - IL_560b: mul - IL_560c: pop - IL_5611: dup - IL_5612: ldc.i4.1 - IL_5613: shr - IL_5614: pop - IL_5619: dup - IL_561a: ldc.i4.8 - IL_561b: mul - IL_561c: pop - IL_5621: dup - IL_5622: ldc.i4.5 - IL_5623: shr - IL_5624: pop - IL_5629: dup - IL_562a: ldc.i4.1 - IL_562b: or - IL_562c: pop - IL_5631: dup - IL_5632: ldc.i4.8 - IL_5633: add - IL_5634: pop - IL_5639: dup - IL_563a: ldc.i4.7 - IL_563b: and - IL_563c: pop - IL_5641: dup - IL_5642: ldc.i4.1 - IL_5643: mul - IL_5644: pop - IL_5649: dup - IL_564a: ldc.i4.0 - IL_564b: sub - IL_564c: pop - IL_5651: dup - IL_5652: ldc.i4.8 - IL_5653: and - IL_5654: pop - IL_5659: dup - IL_565a: ldc.i4.6 - IL_565b: shl - IL_565c: pop - IL_5661: dup - IL_5662: ldc.i4.1 - IL_5663: add - IL_5664: pop - IL_5669: dup - IL_566a: ldc.i4.6 - IL_566b: add - IL_566c: pop - IL_5671: dup - IL_5672: ldc.i4.3 - IL_5673: shl - IL_5674: pop - IL_5679: dup - IL_567a: ldc.i4.7 - IL_567b: or - IL_567c: pop - IL_5681: dup - IL_5682: ldc.i4.1 - IL_5683: shr - IL_5684: pop - IL_5689: dup - IL_568a: ldc.i4.0 - IL_568b: sub - IL_568c: pop - IL_5691: dup - IL_5692: ldc.i4.2 - IL_5693: shl - IL_5694: pop - IL_5699: dup - IL_569a: ldc.i4.7 - IL_569b: mul - IL_569c: pop - IL_56a1: dup - IL_56a2: ldc.i4.1 - IL_56a3: add - IL_56a4: pop - IL_56a9: dup - IL_56aa: ldc.i4.4 - IL_56ab: or - IL_56ac: pop - IL_56b1: dup - IL_56b2: ldc.i4.6 - IL_56b3: add - IL_56b4: pop - IL_56b9: dup - IL_56ba: ldc.i4.2 - IL_56bb: add - IL_56bc: pop - IL_56c1: dup - IL_56c2: ldc.i4.6 - IL_56c3: sub - IL_56c4: call void [System.Console]System.Console::Write(int32) - IL_56c9: dup - IL_56ca: ldc.i4.8 - IL_56cb: mul - IL_56cc: call void [System.Console]System.Console::Write(int32) - IL_56d1: dup - IL_56d2: ldc.i4.6 - IL_56d3: sub - IL_56d4: call void [System.Console]System.Console::Write(int32) - IL_56d9: dup - IL_56da: ldc.i4.4 - IL_56db: shr - IL_56dc: call void [System.Console]System.Console::Write(int32) - IL_56e1: dup - IL_56e2: ldc.i4.1 - IL_56e3: and - IL_56e4: call void [System.Console]System.Console::Write(int32) - IL_56e9: dup - IL_56ea: ldc.i4.1 - IL_56eb: add - IL_56ec: call void [System.Console]System.Console::Write(int32) - IL_56f1: dup - IL_56f2: ldc.i4.8 - IL_56f3: or - IL_56f4: call void [System.Console]System.Console::Write(int32) - IL_56f9: dup - IL_56fa: ldc.i4.8 - IL_56fb: or - IL_56fc: call void [System.Console]System.Console::Write(int32) - IL_5701: dup - IL_5702: ldc.i4.7 - IL_5703: sub - IL_5704: call void [System.Console]System.Console::Write(int32) - IL_5709: dup - IL_570a: ldc.i4.6 - IL_570b: mul - IL_570c: call void [System.Console]System.Console::Write(int32) - IL_5711: dup - IL_5712: ldc.i4.8 - IL_5713: shl - IL_5714: call void [System.Console]System.Console::Write(int32) - IL_5719: dup - IL_571a: ldc.i4.5 - IL_571b: shl - IL_571c: call void [System.Console]System.Console::Write(int32) - IL_5721: dup - IL_5722: ldc.i4.4 - IL_5723: shr - IL_5724: call void [System.Console]System.Console::Write(int32) - IL_5729: dup - IL_572a: ldc.i4.1 - IL_572b: or - IL_572c: call void [System.Console]System.Console::Write(int32) - IL_5731: dup - IL_5732: ldc.i4.2 - IL_5733: and - IL_5734: call void [System.Console]System.Console::Write(int32) - IL_5739: dup - IL_573a: ldc.i4.7 - IL_573b: sub - IL_573c: call void [System.Console]System.Console::Write(int32) - IL_5741: dup - IL_5742: ldc.i4.6 - IL_5743: shr - IL_5744: call void [System.Console]System.Console::Write(int32) - IL_5749: dup - IL_574a: ldc.i4.2 - IL_574b: mul - IL_574c: call void [System.Console]System.Console::Write(int32) - IL_5751: dup - IL_5752: ldc.i4.6 - IL_5753: shl - IL_5754: call void [System.Console]System.Console::Write(int32) - IL_5759: dup - IL_575a: ldc.i4.2 - IL_575b: add - IL_575c: call void [System.Console]System.Console::Write(int32) - IL_5761: dup - IL_5762: ldc.i4.1 - IL_5763: mul - IL_5764: call void [System.Console]System.Console::Write(int32) - IL_5769: dup - IL_576a: ldc.i4.0 - IL_576b: shl - IL_576c: call void [System.Console]System.Console::Write(int32) - IL_5771: dup - IL_5772: ldc.i4.3 - IL_5773: shr - IL_5774: call void [System.Console]System.Console::Write(int32) - IL_5779: dup - IL_577a: ldc.i4.3 - IL_577b: sub - IL_577c: call void [System.Console]System.Console::Write(int32) - IL_5781: dup - IL_5782: ldc.i4.0 - IL_5783: shl - IL_5784: call void [System.Console]System.Console::Write(int32) - IL_5789: dup - IL_578a: ldc.i4.1 - IL_578b: xor - IL_578c: call void [System.Console]System.Console::Write(int32) - IL_5791: dup - IL_5792: ldc.i4.2 - IL_5793: or - IL_5794: call void [System.Console]System.Console::Write(int32) - IL_5799: dup - IL_579a: ldc.i4.0 - IL_579b: sub - IL_579c: call void [System.Console]System.Console::Write(int32) - IL_57a1: dup - IL_57a2: ldc.i4.4 - IL_57a3: mul - IL_57a4: call void [System.Console]System.Console::Write(int32) - IL_57a9: dup - IL_57aa: ldc.i4.7 - IL_57ab: add - IL_57ac: call void [System.Console]System.Console::Write(int32) - IL_57b1: dup - IL_57b2: ldc.i4.0 - IL_57b3: xor - IL_57b4: call void [System.Console]System.Console::Write(int32) - IL_57b9: dup - IL_57ba: ldc.i4.3 - IL_57bb: xor - IL_57bc: call void [System.Console]System.Console::Write(int32) - IL_57c1: dup - IL_57c2: ldc.i4.8 - IL_57c3: add - IL_57c4: call void [System.Console]System.Console::Write(int32) - IL_57c9: dup - IL_57ca: ldc.i4.3 - IL_57cb: mul - IL_57cc: call void [System.Console]System.Console::Write(int32) - IL_57d1: dup - IL_57d2: ldc.i4.5 - IL_57d3: shr - IL_57d4: call void [System.Console]System.Console::Write(int32) - IL_57d9: dup - IL_57da: ldc.i4.2 - IL_57db: mul - IL_57dc: call void [System.Console]System.Console::Write(int32) - IL_57e1: dup - IL_57e2: ldc.i4.8 - IL_57e3: shr - IL_57e4: call void [System.Console]System.Console::Write(int32) - IL_57e9: dup - IL_57ea: ldc.i4.1 - IL_57eb: shr - IL_57ec: call void [System.Console]System.Console::Write(int32) - IL_57f1: dup - IL_57f2: ldc.i4.5 - IL_57f3: add - IL_57f4: call void [System.Console]System.Console::Write(int32) - IL_57f9: dup - IL_57fa: ldc.i4.2 - IL_57fb: shr - IL_57fc: call void [System.Console]System.Console::Write(int32) - IL_5801: dup - IL_5802: ldc.i4.2 - IL_5803: or - IL_5804: call void [System.Console]System.Console::Write(int32) - IL_5809: dup - IL_580a: ldc.i4.7 - IL_580b: shr - IL_580c: call void [System.Console]System.Console::Write(int32) - IL_5811: dup - IL_5812: ldc.i4.5 - IL_5813: mul - IL_5814: call void [System.Console]System.Console::Write(int32) - IL_5819: dup - IL_581a: ldc.i4.7 - IL_581b: and - IL_581c: call void [System.Console]System.Console::Write(int32) - IL_5821: dup - IL_5822: ldc.i4.6 - IL_5823: sub - IL_5824: call void [System.Console]System.Console::Write(int32) - IL_5829: dup - IL_582a: ldc.i4.6 - IL_582b: xor - IL_582c: call void [System.Console]System.Console::Write(int32) - IL_5831: dup - IL_5832: ldc.i4.6 - IL_5833: mul - IL_5834: call void [System.Console]System.Console::Write(int32) - IL_5839: dup - IL_583a: ldc.i4.8 - IL_583b: shr - IL_583c: call void [System.Console]System.Console::Write(int32) - IL_5841: dup - IL_5842: ldc.i4.7 - IL_5843: shl - IL_5844: call void [System.Console]System.Console::Write(int32) - IL_5849: dup - IL_584a: ldc.i4.4 - IL_584b: mul - IL_584c: call void [System.Console]System.Console::Write(int32) - IL_5851: dup - IL_5852: ldc.i4.3 - IL_5853: sub - IL_5854: call void [System.Console]System.Console::Write(int32) - IL_5859: dup - IL_585a: ldc.i4.5 - IL_585b: xor - IL_585c: call void [System.Console]System.Console::Write(int32) - IL_5861: dup - IL_5862: ldc.i4.2 - IL_5863: and - IL_5864: call void [System.Console]System.Console::Write(int32) - IL_5869: dup - IL_586a: ldc.i4.4 - IL_586b: shl - IL_586c: call void [System.Console]System.Console::Write(int32) - IL_5871: dup - IL_5872: ldc.i4.7 - IL_5873: mul - IL_5874: call void [System.Console]System.Console::Write(int32) - IL_5879: dup - IL_587a: ldc.i4.5 - IL_587b: xor - IL_587c: call void [System.Console]System.Console::Write(int32) - IL_5881: dup - IL_5882: ldc.i4.0 - IL_5883: add - IL_5884: call void [System.Console]System.Console::Write(int32) - IL_5889: dup - IL_588a: ldc.i4.6 - IL_588b: sub - IL_588c: call void [System.Console]System.Console::Write(int32) - IL_5891: dup - IL_5892: ldc.i4.5 - IL_5893: shr - IL_5894: call void [System.Console]System.Console::Write(int32) - IL_5899: dup - IL_589a: ldc.i4.7 - IL_589b: shr - IL_589c: call void [System.Console]System.Console::Write(int32) - IL_58a1: dup - IL_58a2: ldc.i4.1 - IL_58a3: shl - IL_58a4: call void [System.Console]System.Console::Write(int32) - IL_58a9: dup - IL_58aa: ldc.i4.5 - IL_58ab: xor - IL_58ac: call void [System.Console]System.Console::Write(int32) - IL_58b1: dup - IL_58b2: ldc.i4.8 - IL_58b3: and - IL_58b4: call void [System.Console]System.Console::Write(int32) - IL_58b9: dup - IL_58ba: ldc.i4.4 - IL_58bb: shr - IL_58bc: call void [System.Console]System.Console::Write(int32) - IL_58c1: dup - IL_58c2: ldc.i4.7 - IL_58c3: xor - IL_58c4: call void [System.Console]System.Console::Write(int32) - IL_58c9: dup - IL_58ca: ldc.i4.7 - IL_58cb: or - IL_58cc: call void [System.Console]System.Console::Write(int32) - IL_58d1: dup - IL_58d2: ldc.i4.4 - IL_58d3: or - IL_58d4: call void [System.Console]System.Console::Write(int32) - IL_58d9: dup - IL_58da: ldc.i4.3 - IL_58db: sub - IL_58dc: call void [System.Console]System.Console::Write(int32) - IL_58e1: dup - IL_58e2: ldc.i4.3 - IL_58e3: xor - IL_58e4: call void [System.Console]System.Console::Write(int32) - IL_58e9: dup - IL_58ea: ldc.i4.3 - IL_58eb: and - IL_58ec: call void [System.Console]System.Console::Write(int32) - IL_58f1: dup - IL_58f2: ldc.i4.6 - IL_58f3: mul - IL_58f4: call void [System.Console]System.Console::Write(int32) - IL_58f9: dup - IL_58fa: ldc.i4.7 - IL_58fb: mul - IL_58fc: call void [System.Console]System.Console::Write(int32) - IL_5901: dup - IL_5902: ldc.i4.4 - IL_5903: sub - IL_5904: call void [System.Console]System.Console::Write(int32) - IL_5909: dup - IL_590a: ldc.i4.3 - IL_590b: shr - IL_590c: call void [System.Console]System.Console::Write(int32) - IL_5911: dup - IL_5912: ldc.i4.4 - IL_5913: and - IL_5914: call void [System.Console]System.Console::Write(int32) - IL_5919: dup - IL_591a: ldc.i4.0 - IL_591b: sub - IL_591c: call void [System.Console]System.Console::Write(int32) - IL_5921: dup - IL_5922: ldc.i4.7 - IL_5923: or - IL_5924: call void [System.Console]System.Console::Write(int32) - IL_5929: dup - IL_592a: ldc.i4.1 - IL_592b: and - IL_592c: call void [System.Console]System.Console::Write(int32) - IL_5931: dup - IL_5932: ldc.i4.5 - IL_5933: add - IL_5934: call void [System.Console]System.Console::Write(int32) - IL_5939: dup - IL_593a: ldc.i4.4 - IL_593b: shl - IL_593c: call void [System.Console]System.Console::Write(int32) - IL_5941: dup - IL_5942: ldc.i4.2 - IL_5943: and - IL_5944: call void [System.Console]System.Console::Write(int32) - IL_5949: dup - IL_594a: ldc.i4.6 - IL_594b: xor - IL_594c: call void [System.Console]System.Console::Write(int32) - IL_5951: dup - IL_5952: ldc.i4.5 - IL_5953: shr - IL_5954: call void [System.Console]System.Console::Write(int32) - IL_5959: dup - IL_595a: ldc.i4.8 - IL_595b: add - IL_595c: call void [System.Console]System.Console::Write(int32) - IL_5961: dup - IL_5962: ldc.i4.6 - IL_5963: shl - IL_5964: call void [System.Console]System.Console::Write(int32) - IL_5969: dup - IL_596a: ldc.i4.7 - IL_596b: sub - IL_596c: call void [System.Console]System.Console::Write(int32) - IL_5971: dup - IL_5972: ldc.i4.3 - IL_5973: add - IL_5974: call void [System.Console]System.Console::Write(int32) - IL_5979: dup - IL_597a: ldc.i4.8 - IL_597b: and - IL_597c: call void [System.Console]System.Console::Write(int32) - IL_5981: dup - IL_5982: ldc.i4.6 - IL_5983: sub - IL_5984: call void [System.Console]System.Console::Write(int32) - IL_5989: dup - IL_598a: ldc.i4.8 - IL_598b: shr - IL_598c: call void [System.Console]System.Console::Write(int32) - IL_5991: dup - IL_5992: ldc.i4.3 - IL_5993: and - IL_5994: call void [System.Console]System.Console::Write(int32) - IL_5999: dup - IL_599a: ldc.i4.1 - IL_599b: or - IL_599c: call void [System.Console]System.Console::Write(int32) - IL_59a1: dup - IL_59a2: ldc.i4.2 - IL_59a3: shr - IL_59a4: call void [System.Console]System.Console::Write(int32) - IL_59a9: dup - IL_59aa: ldc.i4.1 - IL_59ab: shr - IL_59ac: call void [System.Console]System.Console::Write(int32) - IL_59b1: dup - IL_59b2: ldc.i4.6 - IL_59b3: shl - IL_59b4: call void [System.Console]System.Console::Write(int32) - IL_59b9: dup - IL_59ba: ldc.i4.5 - IL_59bb: sub - IL_59bc: call void [System.Console]System.Console::Write(int32) - IL_59c1: dup - IL_59c2: ldc.i4.7 - IL_59c3: and - IL_59c4: call void [System.Console]System.Console::Write(int32) - IL_59c9: dup - IL_59ca: ldc.i4.4 - IL_59cb: or - IL_59cc: call void [System.Console]System.Console::Write(int32) - IL_59d1: dup - IL_59d2: ldc.i4.5 - IL_59d3: xor - IL_59d4: call void [System.Console]System.Console::Write(int32) - IL_59d9: dup - IL_59da: ldc.i4.6 - IL_59db: or - IL_59dc: call void [System.Console]System.Console::Write(int32) - IL_59e1: dup - IL_59e2: ldc.i4.2 - IL_59e3: mul - IL_59e4: call void [System.Console]System.Console::Write(int32) - IL_59e9: dup - IL_59ea: ldc.i4.8 - IL_59eb: or - IL_59ec: call void [System.Console]System.Console::Write(int32) - IL_59f1: dup - IL_59f2: ldc.i4.0 - IL_59f3: or - IL_59f4: call void [System.Console]System.Console::Write(int32) - IL_59f9: dup - IL_59fa: ldc.i4.7 - IL_59fb: shr - IL_59fc: call void [System.Console]System.Console::Write(int32) - IL_5a01: dup - IL_5a02: ldc.i4.8 - IL_5a03: mul - IL_5a04: call void [System.Console]System.Console::Write(int32) - IL_5a09: dup - IL_5a0a: ldc.i4.0 - IL_5a0b: mul - IL_5a0c: call void [System.Console]System.Console::Write(int32) - IL_5a11: dup - IL_5a12: ldc.i4.1 - IL_5a13: and - IL_5a14: call void [System.Console]System.Console::Write(int32) - IL_5a19: dup - IL_5a1a: ldc.i4.1 - IL_5a1b: xor - IL_5a1c: call void [System.Console]System.Console::Write(int32) - IL_5a21: dup - IL_5a22: ldc.i4.5 - IL_5a23: shr - IL_5a24: call void [System.Console]System.Console::Write(int32) - IL_5a29: dup - IL_5a2a: ldc.i4.1 - IL_5a2b: or - IL_5a2c: call void [System.Console]System.Console::Write(int32) - IL_5a31: dup - IL_5a32: ldc.i4.4 - IL_5a33: mul - IL_5a34: call void [System.Console]System.Console::Write(int32) - IL_5a39: dup - IL_5a3a: ldc.i4.3 - IL_5a3b: sub - IL_5a3c: call void [System.Console]System.Console::Write(int32) - IL_5a41: dup - IL_5a42: ldc.i4.0 - IL_5a43: shl - IL_5a44: call void [System.Console]System.Console::Write(int32) - IL_5a49: dup - IL_5a4a: ldc.i4.2 - IL_5a4b: xor - IL_5a4c: call void [System.Console]System.Console::Write(int32) - IL_5a51: dup - IL_5a52: ldc.i4.5 - IL_5a53: or - IL_5a54: call void [System.Console]System.Console::Write(int32) - IL_5a59: dup - IL_5a5a: ldc.i4.1 - IL_5a5b: mul - IL_5a5c: call void [System.Console]System.Console::Write(int32) - IL_5a61: dup - IL_5a62: ldc.i4.4 - IL_5a63: add - IL_5a64: call void [System.Console]System.Console::Write(int32) - IL_5a69: dup - IL_5a6a: ldc.i4.3 - IL_5a6b: add - IL_5a6c: call void [System.Console]System.Console::Write(int32) - IL_5a71: dup - IL_5a72: ldc.i4.8 - IL_5a73: mul - IL_5a74: call void [System.Console]System.Console::Write(int32) - IL_5a79: dup - IL_5a7a: ldc.i4.8 - IL_5a7b: xor - IL_5a7c: call void [System.Console]System.Console::Write(int32) - IL_5a81: dup - IL_5a82: ldc.i4.7 - IL_5a83: xor - IL_5a84: call void [System.Console]System.Console::Write(int32) - IL_5a89: dup - IL_5a8a: ldc.i4.5 - IL_5a8b: xor - IL_5a8c: call void [System.Console]System.Console::Write(int32) - IL_5a91: dup - IL_5a92: ldc.i4.4 - IL_5a93: sub - IL_5a94: call void [System.Console]System.Console::Write(int32) - IL_5a99: dup - IL_5a9a: ldc.i4.0 - IL_5a9b: add - IL_5a9c: call void [System.Console]System.Console::Write(int32) - IL_5aa1: dup - IL_5aa2: ldc.i4.6 - IL_5aa3: add - IL_5aa4: call void [System.Console]System.Console::Write(int32) - IL_5aa9: dup - IL_5aaa: ldc.i4.2 - IL_5aab: or - IL_5aac: call void [System.Console]System.Console::Write(int32) - IL_5ab1: dup - IL_5ab2: ldc.i4.1 - IL_5ab3: and - IL_5ab4: call void [System.Console]System.Console::Write(int32) - IL_5ab9: dup - IL_5aba: ldc.i4.3 - IL_5abb: add - IL_5abc: call void [System.Console]System.Console::Write(int32) - IL_5ac1: dup - IL_5ac2: ldc.i4.8 - IL_5ac3: and - IL_5ac4: call void [System.Console]System.Console::Write(int32) - IL_5ac9: dup - IL_5aca: ldc.i4.7 - IL_5acb: xor - IL_5acc: call void [System.Console]System.Console::Write(int32) - IL_5ad1: dup - IL_5ad2: ldc.i4.5 - IL_5ad3: mul - IL_5ad4: call void [System.Console]System.Console::Write(int32) - IL_5ad9: dup - IL_5ada: ldc.i4.1 - IL_5adb: add - IL_5adc: call void [System.Console]System.Console::Write(int32) - IL_5ae1: dup - IL_5ae2: ldc.i4.1 - IL_5ae3: and - IL_5ae4: call void [System.Console]System.Console::Write(int32) - IL_5ae9: dup - IL_5aea: ldc.i4.7 - IL_5aeb: sub - IL_5aec: call void [System.Console]System.Console::Write(int32) - IL_5af1: dup - IL_5af2: ldc.i4.4 - IL_5af3: add - IL_5af4: call void [System.Console]System.Console::Write(int32) - IL_5af9: dup - IL_5afa: ldc.i4.4 - IL_5afb: xor - IL_5afc: call void [System.Console]System.Console::Write(int32) - IL_5b01: dup - IL_5b02: ldc.i4.6 - IL_5b03: and - IL_5b04: call void [System.Console]System.Console::Write(int32) - IL_5b09: dup - IL_5b0a: ldc.i4.0 - IL_5b0b: add - IL_5b0c: call void [System.Console]System.Console::Write(int32) - IL_5b11: dup - IL_5b12: ldc.i4.5 - IL_5b13: or - IL_5b14: call void [System.Console]System.Console::Write(int32) - IL_5b19: dup - IL_5b1a: ldc.i4.6 - IL_5b1b: and - IL_5b1c: call void [System.Console]System.Console::Write(int32) - IL_5b21: dup - IL_5b22: ldc.i4.4 - IL_5b23: mul - IL_5b24: call void [System.Console]System.Console::Write(int32) - IL_5b29: dup - IL_5b2a: ldc.i4.7 - IL_5b2b: shl - IL_5b2c: call void [System.Console]System.Console::Write(int32) - IL_5b31: dup - IL_5b32: ldc.i4.6 - IL_5b33: mul - IL_5b34: call void [System.Console]System.Console::Write(int32) - IL_5b39: dup - IL_5b3a: ldc.i4.1 - IL_5b3b: shr - IL_5b3c: call void [System.Console]System.Console::Write(int32) - IL_5b41: dup - IL_5b42: ldc.i4.5 - IL_5b43: mul - IL_5b44: call void [System.Console]System.Console::Write(int32) - IL_5b49: dup - IL_5b4a: ldc.i4.1 - IL_5b4b: add - IL_5b4c: call void [System.Console]System.Console::Write(int32) - IL_5b51: dup - IL_5b52: ldc.i4.3 - IL_5b53: shl - IL_5b54: call void [System.Console]System.Console::Write(int32) - IL_5b59: dup - IL_5b5a: ldc.i4.7 - IL_5b5b: shl - IL_5b5c: call void [System.Console]System.Console::Write(int32) - IL_5b61: dup - IL_5b62: ldc.i4.2 - IL_5b63: shr - IL_5b64: call void [System.Console]System.Console::Write(int32) - IL_5b69: dup - IL_5b6a: ldc.i4.3 - IL_5b6b: shr - IL_5b6c: call void [System.Console]System.Console::Write(int32) - IL_5b71: dup - IL_5b72: ldc.i4.3 - IL_5b73: and - IL_5b74: call void [System.Console]System.Console::Write(int32) - IL_5b79: dup - IL_5b7a: ldc.i4.5 - IL_5b7b: shr - IL_5b7c: call void [System.Console]System.Console::Write(int32) - IL_5b81: dup - IL_5b82: ldc.i4.4 - IL_5b83: and - IL_5b84: call void [System.Console]System.Console::Write(int32) - IL_5b89: dup - IL_5b8a: ldc.i4.1 - IL_5b8b: xor - IL_5b8c: call void [System.Console]System.Console::Write(int32) - IL_5b91: dup - IL_5b92: ldc.i4.7 - IL_5b93: xor - IL_5b94: call void [System.Console]System.Console::Write(int32) - IL_5b99: dup - IL_5b9a: ldc.i4.3 - IL_5b9b: add - IL_5b9c: call void [System.Console]System.Console::Write(int32) - IL_5ba1: dup - IL_5ba2: ldc.i4.1 - IL_5ba3: add - IL_5ba4: call void [System.Console]System.Console::Write(int32) - IL_5ba9: dup - IL_5baa: ldc.i4.7 - IL_5bab: mul - IL_5bac: call void [System.Console]System.Console::Write(int32) - IL_5bb1: dup - IL_5bb2: ldc.i4.4 - IL_5bb3: shl - IL_5bb4: call void [System.Console]System.Console::Write(int32) - IL_5bb9: dup - IL_5bba: ldc.i4.2 - IL_5bbb: and - IL_5bbc: call void [System.Console]System.Console::Write(int32) - IL_5bc1: dup - IL_5bc2: ldc.i4.5 - IL_5bc3: sub - IL_5bc4: call void [System.Console]System.Console::Write(int32) - IL_5bc9: dup - IL_5bca: ldc.i4.5 - IL_5bcb: add - IL_5bcc: call void [System.Console]System.Console::Write(int32) - IL_5bd1: dup - IL_5bd2: ldc.i4.7 - IL_5bd3: xor - IL_5bd4: call void [System.Console]System.Console::Write(int32) - IL_5bd9: dup - IL_5bda: ldc.i4.8 - IL_5bdb: sub - IL_5bdc: call void [System.Console]System.Console::Write(int32) - IL_5be1: dup - IL_5be2: ldc.i4.0 - IL_5be3: shl - IL_5be4: call void [System.Console]System.Console::Write(int32) - IL_5be9: dup - IL_5bea: ldc.i4.6 - IL_5beb: or - IL_5bec: call void [System.Console]System.Console::Write(int32) - IL_5bf1: dup - IL_5bf2: ldc.i4.4 - IL_5bf3: or - IL_5bf4: call void [System.Console]System.Console::Write(int32) - IL_5bf9: dup - IL_5bfa: ldc.i4.3 - IL_5bfb: shr - IL_5bfc: call void [System.Console]System.Console::Write(int32) - IL_5c01: dup - IL_5c02: ldc.i4.6 - IL_5c03: add - IL_5c04: call void [System.Console]System.Console::Write(int32) - IL_5c09: dup - IL_5c0a: ldc.i4.1 - IL_5c0b: and - IL_5c0c: call void [System.Console]System.Console::Write(int32) - IL_5c11: dup - IL_5c12: ldc.i4.0 - IL_5c13: shr - IL_5c14: call void [System.Console]System.Console::Write(int32) - IL_5c19: dup - IL_5c1a: ldc.i4.7 - IL_5c1b: sub - IL_5c1c: call void [System.Console]System.Console::Write(int32) - IL_5c21: dup - IL_5c22: ldc.i4.8 - IL_5c23: sub - IL_5c24: call void [System.Console]System.Console::Write(int32) - IL_5c29: dup - IL_5c2a: ldc.i4.8 - IL_5c2b: mul - IL_5c2c: call void [System.Console]System.Console::Write(int32) - IL_5c31: dup - IL_5c32: ldc.i4.6 - IL_5c33: xor - IL_5c34: call void [System.Console]System.Console::Write(int32) - IL_5c39: dup - IL_5c3a: ldc.i4.8 - IL_5c3b: and - IL_5c3c: call void [System.Console]System.Console::Write(int32) - IL_5c41: dup - IL_5c42: ldc.i4.3 - IL_5c43: shl - IL_5c44: call void [System.Console]System.Console::Write(int32) - IL_5c49: dup - IL_5c4a: ldc.i4.0 - IL_5c4b: sub - IL_5c4c: call void [System.Console]System.Console::Write(int32) - IL_5c51: dup - IL_5c52: ldc.i4.2 - IL_5c53: xor - IL_5c54: call void [System.Console]System.Console::Write(int32) - IL_5c59: dup - IL_5c5a: ldc.i4.7 - IL_5c5b: add - IL_5c5c: call void [System.Console]System.Console::Write(int32) - IL_5c61: dup - IL_5c62: ldc.i4.7 - IL_5c63: add - IL_5c64: call void [System.Console]System.Console::Write(int32) - IL_5c69: dup - IL_5c6a: ldc.i4.3 - IL_5c6b: mul - IL_5c6c: call void [System.Console]System.Console::Write(int32) - IL_5c71: dup - IL_5c72: ldc.i4.6 - IL_5c73: xor - IL_5c74: call void [System.Console]System.Console::Write(int32) - IL_5c79: dup - IL_5c7a: ldc.i4.4 - IL_5c7b: sub - IL_5c7c: call void [System.Console]System.Console::Write(int32) - IL_5c81: dup - IL_5c82: ldc.i4.6 - IL_5c83: sub - IL_5c84: call void [System.Console]System.Console::Write(int32) - IL_5c89: dup - IL_5c8a: ldc.i4.5 - IL_5c8b: xor - IL_5c8c: call void [System.Console]System.Console::Write(int32) - IL_5c91: dup - IL_5c92: ldc.i4.3 - IL_5c93: xor - IL_5c94: call void [System.Console]System.Console::Write(int32) - IL_5c99: dup - IL_5c9a: ldc.i4.6 - IL_5c9b: or - IL_5c9c: call void [System.Console]System.Console::Write(int32) - IL_5ca1: dup - IL_5ca2: ldc.i4.3 - IL_5ca3: xor - IL_5ca4: call void [System.Console]System.Console::Write(int32) - IL_5ca9: dup - IL_5caa: ldc.i4.1 - IL_5cab: shr - IL_5cac: call void [System.Console]System.Console::Write(int32) - IL_5cb1: dup - IL_5cb2: ldc.i4.4 - IL_5cb3: shr - IL_5cb4: call void [System.Console]System.Console::Write(int32) - IL_5cb9: dup - IL_5cba: ldc.i4.4 - IL_5cbb: shl - IL_5cbc: call void [System.Console]System.Console::Write(int32) - IL_5cc1: dup - IL_5cc2: ldc.i4.4 - IL_5cc3: or - IL_5cc4: call void [System.Console]System.Console::Write(int32) - IL_5cc9: dup - IL_5cca: ldc.i4.5 - IL_5ccb: add - IL_5ccc: call void [System.Console]System.Console::Write(int32) - IL_5cd1: dup - IL_5cd2: ldc.i4.8 - IL_5cd3: sub - IL_5cd4: call void [System.Console]System.Console::Write(int32) - IL_5cd9: dup - IL_5cda: ldc.i4.3 - IL_5cdb: sub - IL_5cdc: call void [System.Console]System.Console::Write(int32) - IL_5ce1: dup - IL_5ce2: ldc.i4.2 - IL_5ce3: add - IL_5ce4: call void [System.Console]System.Console::Write(int32) - IL_5ce9: dup - IL_5cea: ldc.i4.8 - IL_5ceb: add - IL_5cec: call void [System.Console]System.Console::Write(int32) - IL_5cf1: dup - IL_5cf2: ldc.i4.2 - IL_5cf3: shl - IL_5cf4: call void [System.Console]System.Console::Write(int32) - IL_5cf9: dup - IL_5cfa: ldc.i4.4 - IL_5cfb: shl - IL_5cfc: call void [System.Console]System.Console::Write(int32) - IL_5d01: dup - IL_5d02: ldc.i4.5 - IL_5d03: and - IL_5d04: call void [System.Console]System.Console::Write(int32) - IL_5d09: dup - IL_5d0a: ldc.i4.5 - IL_5d0b: xor - IL_5d0c: call void [System.Console]System.Console::Write(int32) - IL_5d11: dup - IL_5d12: ldc.i4.7 - IL_5d13: shl - IL_5d14: call void [System.Console]System.Console::Write(int32) - IL_5d19: dup - IL_5d1a: ldc.i4.3 - IL_5d1b: or - IL_5d1c: call void [System.Console]System.Console::Write(int32) - IL_5d21: dup - IL_5d22: ldc.i4.7 - IL_5d23: sub - IL_5d24: call void [System.Console]System.Console::Write(int32) - IL_5d29: dup - IL_5d2a: ldc.i4.7 - IL_5d2b: or - IL_5d2c: call void [System.Console]System.Console::Write(int32) - IL_5d31: dup - IL_5d32: ldc.i4.3 - IL_5d33: add - IL_5d34: call void [System.Console]System.Console::Write(int32) - IL_5d39: dup - IL_5d3a: ldc.i4.4 - IL_5d3b: sub - IL_5d3c: call void [System.Console]System.Console::Write(int32) - IL_5d41: dup - IL_5d42: ldc.i4.4 - IL_5d43: and - IL_5d44: call void [System.Console]System.Console::Write(int32) - IL_5d49: dup - IL_5d4a: ldc.i4.6 - IL_5d4b: and - IL_5d4c: call void [System.Console]System.Console::Write(int32) - IL_5d51: dup - IL_5d52: ldc.i4.7 - IL_5d53: xor - IL_5d54: call void [System.Console]System.Console::Write(int32) - IL_5d59: dup - IL_5d5a: ldc.i4.1 - IL_5d5b: xor - IL_5d5c: call void [System.Console]System.Console::Write(int32) - IL_5d61: dup - IL_5d62: ldc.i4.7 - IL_5d63: xor - IL_5d64: call void [System.Console]System.Console::Write(int32) - IL_5d69: dup - IL_5d6a: ldc.i4.1 - IL_5d6b: mul - IL_5d6c: call void [System.Console]System.Console::Write(int32) - IL_5d71: dup - IL_5d72: ldc.i4.3 - IL_5d73: shr - IL_5d74: call void [System.Console]System.Console::Write(int32) - IL_5d79: dup - IL_5d7a: ldc.i4.5 - IL_5d7b: and - IL_5d7c: call void [System.Console]System.Console::Write(int32) - IL_5d81: dup - IL_5d82: ldc.i4.7 - IL_5d83: shl - IL_5d84: call void [System.Console]System.Console::Write(int32) - IL_5d89: dup - IL_5d8a: ldc.i4.0 - IL_5d8b: shr - IL_5d8c: call void [System.Console]System.Console::Write(int32) - IL_5d91: dup - IL_5d92: ldc.i4.0 - IL_5d93: or - IL_5d94: call void [System.Console]System.Console::Write(int32) - IL_5d99: dup - IL_5d9a: ldc.i4.6 - IL_5d9b: or - IL_5d9c: call void [System.Console]System.Console::Write(int32) - IL_5da1: dup - IL_5da2: ldc.i4.4 - IL_5da3: shl - IL_5da4: call void [System.Console]System.Console::Write(int32) - IL_5da9: dup - IL_5daa: ldc.i4.2 - IL_5dab: and - IL_5dac: call void [System.Console]System.Console::Write(int32) - IL_5db1: dup - IL_5db2: ldc.i4.3 - IL_5db3: xor - IL_5db4: call void [System.Console]System.Console::Write(int32) - IL_5db9: dup - IL_5dba: ldc.i4.7 - IL_5dbb: sub - IL_5dbc: call void [System.Console]System.Console::Write(int32) - IL_5dc1: dup - IL_5dc2: ldc.i4.5 - IL_5dc3: and - IL_5dc4: call void [System.Console]System.Console::Write(int32) - IL_5dc9: dup - IL_5dca: ldc.i4.4 - IL_5dcb: xor - IL_5dcc: call void [System.Console]System.Console::Write(int32) - IL_5dd1: dup - IL_5dd2: ldc.i4.7 - IL_5dd3: and - IL_5dd4: call void [System.Console]System.Console::Write(int32) - IL_5dd9: dup - IL_5dda: ldc.i4.6 - IL_5ddb: sub - IL_5ddc: call void [System.Console]System.Console::Write(int32) - IL_5de1: dup - IL_5de2: ldc.i4.5 - IL_5de3: add - IL_5de4: call void [System.Console]System.Console::Write(int32) - IL_5de9: dup - IL_5dea: ldc.i4.6 - IL_5deb: xor - IL_5dec: call void [System.Console]System.Console::Write(int32) - IL_5df1: dup - IL_5df2: ldc.i4.3 - IL_5df3: sub - IL_5df4: call void [System.Console]System.Console::Write(int32) - IL_5df9: dup - IL_5dfa: ldc.i4.5 - IL_5dfb: sub - IL_5dfc: call void [System.Console]System.Console::Write(int32) - IL_5e01: dup - IL_5e02: ldc.i4.5 - IL_5e03: or - IL_5e04: call void [System.Console]System.Console::Write(int32) - IL_5e09: dup - IL_5e0a: ldc.i4.0 - IL_5e0b: and - IL_5e0c: call void [System.Console]System.Console::Write(int32) - IL_5e11: dup - IL_5e12: ldc.i4.0 - IL_5e13: shr - IL_5e14: call void [System.Console]System.Console::Write(int32) - IL_5e19: dup - IL_5e1a: ldc.i4.0 - IL_5e1b: shl - IL_5e1c: call void [System.Console]System.Console::Write(int32) - IL_5e21: dup - IL_5e22: ldc.i4.1 - IL_5e23: shr - IL_5e24: call void [System.Console]System.Console::Write(int32) - IL_5e29: dup - IL_5e2a: ldc.i4.2 - IL_5e2b: mul - IL_5e2c: call void [System.Console]System.Console::Write(int32) - IL_5e31: dup - IL_5e32: ldc.i4.2 - IL_5e33: xor - IL_5e34: call void [System.Console]System.Console::Write(int32) - IL_5e39: dup - IL_5e3a: ldc.i4.0 - IL_5e3b: mul - IL_5e3c: call void [System.Console]System.Console::Write(int32) - IL_5e41: dup - IL_5e42: ldc.i4.4 - IL_5e43: or - IL_5e44: call void [System.Console]System.Console::Write(int32) - IL_5e49: dup - IL_5e4a: ldc.i4.5 - IL_5e4b: shl - IL_5e4c: call void [System.Console]System.Console::Write(int32) - IL_5e51: dup - IL_5e52: ldc.i4.0 - IL_5e53: add - IL_5e54: call void [System.Console]System.Console::Write(int32) - IL_5e59: dup - IL_5e5a: ldc.i4.8 - IL_5e5b: add - IL_5e5c: call void [System.Console]System.Console::Write(int32) - IL_5e61: dup - IL_5e62: ldc.i4.8 - IL_5e63: or - IL_5e64: call void [System.Console]System.Console::Write(int32) - IL_5e69: dup - IL_5e6a: ldc.i4.1 - IL_5e6b: or - IL_5e6c: call void [System.Console]System.Console::Write(int32) - IL_5e71: dup - IL_5e72: ldc.i4.2 - IL_5e73: sub - IL_5e74: call void [System.Console]System.Console::Write(int32) - IL_5e79: dup - IL_5e7a: ldc.i4.5 - IL_5e7b: mul - IL_5e7c: call void [System.Console]System.Console::Write(int32) - IL_5e81: dup - IL_5e82: ldc.i4.0 - IL_5e83: add - IL_5e84: call void [System.Console]System.Console::Write(int32) - IL_5e89: dup - IL_5e8a: ldc.i4.1 - IL_5e8b: xor - IL_5e8c: call void [System.Console]System.Console::Write(int32) - IL_5e91: dup - IL_5e92: ldc.i4.3 - IL_5e93: add - IL_5e94: call void [System.Console]System.Console::Write(int32) - IL_5e99: dup - IL_5e9a: ldc.i4.1 - IL_5e9b: or - IL_5e9c: call void [System.Console]System.Console::Write(int32) - IL_5ea1: dup - IL_5ea2: ldc.i4.6 - IL_5ea3: or - IL_5ea4: call void [System.Console]System.Console::Write(int32) - IL_5ea9: dup - IL_5eaa: ldc.i4.2 - IL_5eab: sub - IL_5eac: call void [System.Console]System.Console::Write(int32) - IL_5eb1: dup - IL_5eb2: ldc.i4.4 - IL_5eb3: xor - IL_5eb4: call void [System.Console]System.Console::Write(int32) - IL_5eb9: dup - IL_5eba: ldc.i4.8 - IL_5ebb: sub - IL_5ebc: call void [System.Console]System.Console::Write(int32) - IL_5ec1: dup - IL_5ec2: ldc.i4.0 - IL_5ec3: xor - IL_5ec4: call void [System.Console]System.Console::Write(int32) - IL_5ec9: dup - IL_5eca: ldc.i4.8 - IL_5ecb: xor - IL_5ecc: call void [System.Console]System.Console::Write(int32) - IL_5ed1: dup - IL_5ed2: ldc.i4.4 - IL_5ed3: or - IL_5ed4: call void [System.Console]System.Console::Write(int32) - IL_5ed9: dup - IL_5eda: ldc.i4.0 - IL_5edb: xor - IL_5edc: call void [System.Console]System.Console::Write(int32) - IL_5ee1: dup - IL_5ee2: ldc.i4.0 - IL_5ee3: or - IL_5ee4: call void [System.Console]System.Console::Write(int32) - IL_5ee9: dup - IL_5eea: ldc.i4.8 - IL_5eeb: add - IL_5eec: call void [System.Console]System.Console::Write(int32) - IL_5ef1: dup - IL_5ef2: ldc.i4.5 - IL_5ef3: add - IL_5ef4: call void [System.Console]System.Console::Write(int32) - IL_5ef9: dup - IL_5efa: ldc.i4.2 - IL_5efb: or - IL_5efc: call void [System.Console]System.Console::Write(int32) - IL_5f01: dup - IL_5f02: ldc.i4.1 - IL_5f03: or - IL_5f04: call void [System.Console]System.Console::Write(int32) - IL_5f09: dup - IL_5f0a: ldc.i4.2 - IL_5f0b: sub - IL_5f0c: call void [System.Console]System.Console::Write(int32) - IL_5f11: dup - IL_5f12: ldc.i4.1 - IL_5f13: shr - IL_5f14: call void [System.Console]System.Console::Write(int32) - IL_5f19: dup - IL_5f1a: ldc.i4.7 - IL_5f1b: xor - IL_5f1c: call void [System.Console]System.Console::Write(int32) - IL_5f21: dup - IL_5f22: ldc.i4.7 - IL_5f23: shr - IL_5f24: call void [System.Console]System.Console::Write(int32) - IL_5f29: dup - IL_5f2a: ldc.i4.7 - IL_5f2b: sub - IL_5f2c: call void [System.Console]System.Console::Write(int32) - IL_5f31: dup - IL_5f32: ldc.i4.7 - IL_5f33: and - IL_5f34: call void [System.Console]System.Console::Write(int32) - IL_5f39: dup - IL_5f3a: ldc.i4.5 - IL_5f3b: xor - IL_5f3c: call void [System.Console]System.Console::Write(int32) - IL_5f41: dup - IL_5f42: ldc.i4.0 - IL_5f43: or - IL_5f44: call void [System.Console]System.Console::Write(int32) - IL_5f49: dup - IL_5f4a: ldc.i4.8 - IL_5f4b: or - IL_5f4c: call void [System.Console]System.Console::Write(int32) - IL_5f51: dup - IL_5f52: ldc.i4.2 - IL_5f53: sub - IL_5f54: call void [System.Console]System.Console::Write(int32) - IL_5f59: dup - IL_5f5a: ldc.i4.7 - IL_5f5b: add - IL_5f5c: call void [System.Console]System.Console::Write(int32) - IL_5f61: dup - IL_5f62: ldc.i4.8 - IL_5f63: shr - IL_5f64: call void [System.Console]System.Console::Write(int32) - IL_5f69: dup - IL_5f6a: ldc.i4.3 - IL_5f6b: xor - IL_5f6c: call void [System.Console]System.Console::Write(int32) - IL_5f71: dup - IL_5f72: ldc.i4.1 - IL_5f73: add - IL_5f74: call void [System.Console]System.Console::Write(int32) - IL_5f79: dup - IL_5f7a: ldc.i4.3 - IL_5f7b: shr - IL_5f7c: call void [System.Console]System.Console::Write(int32) - IL_5f81: dup - IL_5f82: ldc.i4.5 - IL_5f83: mul - IL_5f84: call void [System.Console]System.Console::Write(int32) - IL_5f89: dup - IL_5f8a: ldc.i4.0 - IL_5f8b: shl - IL_5f8c: call void [System.Console]System.Console::Write(int32) - IL_5f91: dup - IL_5f92: ldc.i4.1 - IL_5f93: shr - IL_5f94: call void [System.Console]System.Console::Write(int32) - IL_5f99: dup - IL_5f9a: ldc.i4.8 - IL_5f9b: xor - IL_5f9c: call void [System.Console]System.Console::Write(int32) - IL_5fa1: dup - IL_5fa2: ldc.i4.4 - IL_5fa3: xor - IL_5fa4: call void [System.Console]System.Console::Write(int32) - IL_5fa9: dup - IL_5faa: ldc.i4.4 - IL_5fab: and - IL_5fac: call void [System.Console]System.Console::Write(int32) - IL_5fb1: dup - IL_5fb2: ldc.i4.1 - IL_5fb3: or - IL_5fb4: call void [System.Console]System.Console::Write(int32) - IL_5fb9: dup - IL_5fba: ldc.i4.5 - IL_5fbb: mul - IL_5fbc: call void [System.Console]System.Console::Write(int32) - IL_5fc1: dup - IL_5fc2: ldc.i4.3 - IL_5fc3: xor - IL_5fc4: call void [System.Console]System.Console::Write(int32) - IL_5fc9: dup - IL_5fca: ldc.i4.0 - IL_5fcb: shl - IL_5fcc: call void [System.Console]System.Console::Write(int32) - IL_5fd1: dup - IL_5fd2: ldc.i4.1 - IL_5fd3: xor - IL_5fd4: call void [System.Console]System.Console::Write(int32) - IL_5fd9: dup - IL_5fda: ldc.i4.6 - IL_5fdb: or - IL_5fdc: call void [System.Console]System.Console::Write(int32) - IL_5fe1: dup - IL_5fe2: ldc.i4.0 - IL_5fe3: sub - IL_5fe4: call void [System.Console]System.Console::Write(int32) - IL_5fe9: dup - IL_5fea: ldc.i4.1 - IL_5feb: xor - IL_5fec: call void [System.Console]System.Console::Write(int32) - IL_5ff1: dup - IL_5ff2: ldc.i4.2 - IL_5ff3: xor - IL_5ff4: call void [System.Console]System.Console::Write(int32) - IL_5ff9: dup - IL_5ffa: ldc.i4.2 - IL_5ffb: shr - IL_5ffc: call void [System.Console]System.Console::Write(int32) - IL_6001: dup - IL_6002: ldc.i4.2 - IL_6003: sub - IL_6004: call void [System.Console]System.Console::Write(int32) - IL_6009: dup - IL_600a: ldc.i4.4 - IL_600b: shl - IL_600c: call void [System.Console]System.Console::Write(int32) - IL_6011: dup - IL_6012: ldc.i4.6 - IL_6013: or - IL_6014: call void [System.Console]System.Console::Write(int32) - IL_6019: dup - IL_601a: ldc.i4.3 - IL_601b: mul - IL_601c: call void [System.Console]System.Console::Write(int32) - IL_6021: dup - IL_6022: ldc.i4.0 - IL_6023: shl - IL_6024: call void [System.Console]System.Console::Write(int32) - IL_6029: dup - IL_602a: ldc.i4.3 - IL_602b: and - IL_602c: call void [System.Console]System.Console::Write(int32) - IL_6031: dup - IL_6032: ldc.i4.6 - IL_6033: add - IL_6034: call void [System.Console]System.Console::Write(int32) - IL_6039: dup - IL_603a: ldc.i4.8 - IL_603b: add - IL_603c: call void [System.Console]System.Console::Write(int32) - IL_6041: dup - IL_6042: ldc.i4.1 - IL_6043: add - IL_6044: call void [System.Console]System.Console::Write(int32) - IL_6049: dup - IL_604a: ldc.i4.0 - IL_604b: and - IL_604c: call void [System.Console]System.Console::Write(int32) - IL_6051: dup - IL_6052: ldc.i4.0 - IL_6053: and - IL_6054: call void [System.Console]System.Console::Write(int32) - IL_6059: dup - IL_605a: ldc.i4.4 - IL_605b: mul - IL_605c: call void [System.Console]System.Console::Write(int32) - IL_6061: dup - IL_6062: ldc.i4.4 - IL_6063: sub - IL_6064: call void [System.Console]System.Console::Write(int32) - IL_6069: dup - IL_606a: ldc.i4.5 - IL_606b: or - IL_606c: call void [System.Console]System.Console::Write(int32) - IL_6071: dup - IL_6072: ldc.i4.4 - IL_6073: xor - IL_6074: call void [System.Console]System.Console::Write(int32) - IL_6079: dup - IL_607a: ldc.i4.1 - IL_607b: add - IL_607c: call void [System.Console]System.Console::Write(int32) - IL_6081: dup - IL_6082: ldc.i4.1 - IL_6083: and - IL_6084: call void [System.Console]System.Console::Write(int32) - IL_6089: dup - IL_608a: ldc.i4.4 - IL_608b: or - IL_608c: call void [System.Console]System.Console::Write(int32) - IL_6091: dup - IL_6092: ldc.i4.4 - IL_6093: or - IL_6094: call void [System.Console]System.Console::Write(int32) - IL_6099: dup - IL_609a: ldc.i4.4 - IL_609b: xor - IL_609c: call void [System.Console]System.Console::Write(int32) - IL_60a1: dup - IL_60a2: ldc.i4.0 - IL_60a3: and - IL_60a4: call void [System.Console]System.Console::Write(int32) - IL_60a9: dup - IL_60aa: ldc.i4.4 - IL_60ab: shr - IL_60ac: call void [System.Console]System.Console::Write(int32) - IL_60b1: dup - IL_60b2: ldc.i4.8 - IL_60b3: or - IL_60b4: call void [System.Console]System.Console::Write(int32) - IL_60b9: dup - IL_60ba: ldc.i4.1 - IL_60bb: or - IL_60bc: call void [System.Console]System.Console::Write(int32) - IL_60c1: dup - IL_60c2: ldc.i4.2 - IL_60c3: sub - IL_60c4: call void [System.Console]System.Console::Write(int32) - IL_60c9: dup - IL_60ca: ldc.i4.2 - IL_60cb: sub - IL_60cc: call void [System.Console]System.Console::Write(int32) - IL_60d1: dup - IL_60d2: ldc.i4.2 - IL_60d3: xor - IL_60d4: call void [System.Console]System.Console::Write(int32) - IL_60d9: dup - IL_60da: ldc.i4.6 - IL_60db: shl - IL_60dc: call void [System.Console]System.Console::Write(int32) - IL_60e1: dup - IL_60e2: ldc.i4.6 - IL_60e3: sub - IL_60e4: call void [System.Console]System.Console::Write(int32) - IL_60e9: dup - IL_60ea: ldc.i4.0 - IL_60eb: shr - IL_60ec: call void [System.Console]System.Console::Write(int32) - IL_60f1: dup - IL_60f2: ldc.i4.3 - IL_60f3: xor - IL_60f4: call void [System.Console]System.Console::Write(int32) - IL_60f9: dup - IL_60fa: ldc.i4.6 - IL_60fb: shl - IL_60fc: call void [System.Console]System.Console::Write(int32) - IL_6101: dup - IL_6102: ldc.i4.3 - IL_6103: mul - IL_6104: call void [System.Console]System.Console::Write(int32) - IL_6109: dup - IL_610a: ldc.i4.5 - IL_610b: and - IL_610c: call void [System.Console]System.Console::Write(int32) - IL_6111: dup - IL_6112: ldc.i4.5 - IL_6113: or - IL_6114: call void [System.Console]System.Console::Write(int32) - IL_6119: dup - IL_611a: ldc.i4.5 - IL_611b: sub - IL_611c: call void [System.Console]System.Console::Write(int32) - IL_6121: dup - IL_6122: ldc.i4.5 - IL_6123: shr - IL_6124: call void [System.Console]System.Console::Write(int32) - IL_6129: dup - IL_612a: ldc.i4.6 - IL_612b: sub - IL_612c: call void [System.Console]System.Console::Write(int32) - IL_6131: dup - IL_6132: ldc.i4.2 - IL_6133: and - IL_6134: call void [System.Console]System.Console::Write(int32) - IL_6139: dup - IL_613a: ldc.i4.2 - IL_613b: shr - IL_613c: call void [System.Console]System.Console::Write(int32) - IL_6141: dup - IL_6142: ldc.i4.8 - IL_6143: shl - IL_6144: call void [System.Console]System.Console::Write(int32) - IL_6149: dup - IL_614a: ldc.i4.6 - IL_614b: xor - IL_614c: call void [System.Console]System.Console::Write(int32) - IL_6151: dup - IL_6152: ldc.i4.1 - IL_6153: or - IL_6154: call void [System.Console]System.Console::Write(int32) - IL_6159: dup - IL_615a: ldc.i4.6 - IL_615b: shr - IL_615c: call void [System.Console]System.Console::Write(int32) - IL_6161: dup - IL_6162: ldc.i4.0 - IL_6163: or - IL_6164: call void [System.Console]System.Console::Write(int32) - IL_6169: dup - IL_616a: ldc.i4.2 - IL_616b: sub - IL_616c: call void [System.Console]System.Console::Write(int32) - IL_6171: dup - IL_6172: ldc.i4.8 - IL_6173: and - IL_6174: call void [System.Console]System.Console::Write(int32) - IL_6179: dup - IL_617a: ldc.i4.0 - IL_617b: shr - IL_617c: call void [System.Console]System.Console::Write(int32) - IL_6181: dup - IL_6182: ldc.i4.0 - IL_6183: or - IL_6184: call void [System.Console]System.Console::Write(int32) - IL_6189: dup - IL_618a: ldc.i4.2 - IL_618b: shr - IL_618c: call void [System.Console]System.Console::Write(int32) - IL_6191: dup - IL_6192: ldc.i4.2 - IL_6193: mul - IL_6194: call void [System.Console]System.Console::Write(int32) - IL_6199: dup - IL_619a: ldc.i4.3 - IL_619b: mul - IL_619c: call void [System.Console]System.Console::Write(int32) - IL_61a1: dup - IL_61a2: ldc.i4.5 - IL_61a3: sub - IL_61a4: call void [System.Console]System.Console::Write(int32) - IL_61a9: dup - IL_61aa: ldc.i4.5 - IL_61ab: shr - IL_61ac: call void [System.Console]System.Console::Write(int32) - IL_61b1: dup - IL_61b2: ldc.i4.6 - IL_61b3: xor - IL_61b4: call void [System.Console]System.Console::Write(int32) - IL_61b9: dup - IL_61ba: ldc.i4.2 - IL_61bb: or - IL_61bc: call void [System.Console]System.Console::Write(int32) - IL_61c1: dup - IL_61c2: ldc.i4.8 - IL_61c3: xor - IL_61c4: call void [System.Console]System.Console::Write(int32) - IL_61c9: dup - IL_61ca: ldc.i4.6 - IL_61cb: and - IL_61cc: call void [System.Console]System.Console::Write(int32) - IL_61d1: dup - IL_61d2: ldc.i4.6 - IL_61d3: mul - IL_61d4: call void [System.Console]System.Console::Write(int32) - IL_61d9: dup - IL_61da: ldc.i4.3 - IL_61db: xor - IL_61dc: call void [System.Console]System.Console::Write(int32) - IL_61e1: dup - IL_61e2: ldc.i4.4 - IL_61e3: and - IL_61e4: call void [System.Console]System.Console::Write(int32) - IL_61e9: dup - IL_61ea: ldc.i4.6 - IL_61eb: shl - IL_61ec: call void [System.Console]System.Console::Write(int32) - IL_61f1: dup - IL_61f2: ldc.i4.6 - IL_61f3: mul - IL_61f4: call void [System.Console]System.Console::Write(int32) - IL_61f9: dup - IL_61fa: ldc.i4.2 - IL_61fb: and - IL_61fc: call void [System.Console]System.Console::Write(int32) - IL_6201: dup - IL_6202: ldc.i4.5 - IL_6203: add - IL_6204: call void [System.Console]System.Console::Write(int32) - IL_6209: dup - IL_620a: ldc.i4.1 - IL_620b: sub - IL_620c: call void [System.Console]System.Console::Write(int32) - IL_6211: dup - IL_6212: ldc.i4.4 - IL_6213: shl - IL_6214: call void [System.Console]System.Console::Write(int32) - IL_6219: dup - IL_621a: ldc.i4.3 - IL_621b: shl - IL_621c: call void [System.Console]System.Console::Write(int32) - IL_6221: dup - IL_6222: ldc.i4.1 - IL_6223: xor - IL_6224: call void [System.Console]System.Console::Write(int32) - IL_6229: dup - IL_622a: ldc.i4.7 - IL_622b: add - IL_622c: call void [System.Console]System.Console::Write(int32) - IL_6231: dup - IL_6232: ldc.i4.3 - IL_6233: add - IL_6234: call void [System.Console]System.Console::Write(int32) - IL_6239: dup - IL_623a: ldc.i4.8 - IL_623b: shr - IL_623c: call void [System.Console]System.Console::Write(int32) - IL_6241: dup - IL_6242: ldc.i4.5 - IL_6243: mul - IL_6244: call void [System.Console]System.Console::Write(int32) - IL_6249: dup - IL_624a: ldc.i4.2 - IL_624b: shl - IL_624c: call void [System.Console]System.Console::Write(int32) - IL_6251: dup - IL_6252: ldc.i4.1 - IL_6253: mul - IL_6254: call void [System.Console]System.Console::Write(int32) - IL_6259: dup - IL_625a: ldc.i4.8 - IL_625b: and - IL_625c: call void [System.Console]System.Console::Write(int32) - IL_6261: dup - IL_6262: ldc.i4.5 - IL_6263: or - IL_6264: call void [System.Console]System.Console::Write(int32) - IL_6269: dup - IL_626a: ldc.i4.1 - IL_626b: xor - IL_626c: call void [System.Console]System.Console::Write(int32) - IL_6271: dup - IL_6272: ldc.i4.5 - IL_6273: and - IL_6274: call void [System.Console]System.Console::Write(int32) - IL_6279: dup - IL_627a: ldc.i4.4 - IL_627b: sub - IL_627c: call void [System.Console]System.Console::Write(int32) - IL_6281: dup - IL_6282: ldc.i4.7 - IL_6283: and - IL_6284: call void [System.Console]System.Console::Write(int32) - IL_6289: dup - IL_628a: ldc.i4.0 - IL_628b: shr - IL_628c: call void [System.Console]System.Console::Write(int32) - IL_6291: dup - IL_6292: ldc.i4.2 - IL_6293: add - IL_6294: call void [System.Console]System.Console::Write(int32) - IL_6299: dup - IL_629a: ldc.i4.3 - IL_629b: xor - IL_629c: call void [System.Console]System.Console::Write(int32) - IL_62a1: dup - IL_62a2: ldc.i4.0 - IL_62a3: add - IL_62a4: call void [System.Console]System.Console::Write(int32) - IL_62a9: dup - IL_62aa: ldc.i4.5 - IL_62ab: mul - IL_62ac: call void [System.Console]System.Console::Write(int32) - IL_62b1: dup - IL_62b2: ldc.i4.4 - IL_62b3: xor - IL_62b4: call void [System.Console]System.Console::Write(int32) - IL_62b9: dup - IL_62ba: ldc.i4.0 - IL_62bb: xor - IL_62bc: call void [System.Console]System.Console::Write(int32) - IL_62c1: dup - IL_62c2: ldc.i4.7 - IL_62c3: add - IL_62c4: call void [System.Console]System.Console::Write(int32) - IL_62c9: dup - IL_62ca: ldc.i4.8 - IL_62cb: xor - IL_62cc: call void [System.Console]System.Console::Write(int32) - IL_62d1: dup - IL_62d2: ldc.i4.0 - IL_62d3: shr - IL_62d4: call void [System.Console]System.Console::Write(int32) - IL_62d9: dup - IL_62da: ldc.i4.5 - IL_62db: mul - IL_62dc: call void [System.Console]System.Console::Write(int32) - IL_62e1: dup - IL_62e2: ldc.i4.1 - IL_62e3: xor - IL_62e4: call void [System.Console]System.Console::Write(int32) - IL_62e9: dup - IL_62ea: ldc.i4.5 - IL_62eb: shl - IL_62ec: call void [System.Console]System.Console::Write(int32) - IL_62f1: dup - IL_62f2: ldc.i4.3 - IL_62f3: or - IL_62f4: call void [System.Console]System.Console::Write(int32) - IL_62f9: dup - IL_62fa: ldc.i4.0 - IL_62fb: mul - IL_62fc: call void [System.Console]System.Console::Write(int32) - IL_6301: dup - IL_6302: ldc.i4.8 - IL_6303: shl - IL_6304: call void [System.Console]System.Console::Write(int32) - IL_6309: dup - IL_630a: ldc.i4.1 - IL_630b: shl - IL_630c: call void [System.Console]System.Console::Write(int32) - IL_6311: dup - IL_6312: ldc.i4.8 - IL_6313: mul - IL_6314: call void [System.Console]System.Console::Write(int32) - IL_6319: dup - IL_631a: ldc.i4.3 - IL_631b: shl - IL_631c: call void [System.Console]System.Console::Write(int32) - IL_6321: dup - IL_6322: ldc.i4.8 - IL_6323: or - IL_6324: call void [System.Console]System.Console::Write(int32) - IL_6329: dup - IL_632a: ldc.i4.4 - IL_632b: add - IL_632c: call void [System.Console]System.Console::Write(int32) - IL_6331: dup - IL_6332: ldc.i4.5 - IL_6333: shl - IL_6334: call void [System.Console]System.Console::Write(int32) - IL_6339: dup - IL_633a: ldc.i4.2 - IL_633b: sub - IL_633c: call void [System.Console]System.Console::Write(int32) - IL_6341: dup - IL_6342: ldc.i4.7 - IL_6343: shr - IL_6344: call void [System.Console]System.Console::Write(int32) - IL_6349: dup - IL_634a: ldc.i4.5 - IL_634b: xor - IL_634c: call void [System.Console]System.Console::Write(int32) - IL_6351: dup - IL_6352: ldc.i4.7 - IL_6353: add - IL_6354: call void [System.Console]System.Console::Write(int32) - IL_6359: dup - IL_635a: ldc.i4.1 - IL_635b: sub - IL_635c: call void [System.Console]System.Console::Write(int32) - IL_6361: dup - IL_6362: ldc.i4.1 - IL_6363: and - IL_6364: call void [System.Console]System.Console::Write(int32) - IL_6369: dup - IL_636a: ldc.i4.4 - IL_636b: or - IL_636c: call void [System.Console]System.Console::Write(int32) - IL_6371: dup - IL_6372: ldc.i4.3 - IL_6373: and - IL_6374: call void [System.Console]System.Console::Write(int32) - IL_6379: dup - IL_637a: ldc.i4.0 - IL_637b: sub - IL_637c: call void [System.Console]System.Console::Write(int32) - IL_6381: dup - IL_6382: ldc.i4.0 - IL_6383: mul - IL_6384: call void [System.Console]System.Console::Write(int32) - IL_6389: dup - IL_638a: ldc.i4.3 - IL_638b: and - IL_638c: call void [System.Console]System.Console::Write(int32) - IL_6391: dup - IL_6392: ldc.i4.2 - IL_6393: xor - IL_6394: call void [System.Console]System.Console::Write(int32) - IL_6399: dup - IL_639a: ldc.i4.4 - IL_639b: shl - IL_639c: call void [System.Console]System.Console::Write(int32) - IL_63a1: dup - IL_63a2: ldc.i4.6 - IL_63a3: mul - IL_63a4: call void [System.Console]System.Console::Write(int32) - IL_63a9: dup - IL_63aa: ldc.i4.4 - IL_63ab: sub - IL_63ac: call void [System.Console]System.Console::Write(int32) - IL_63b1: dup - IL_63b2: ldc.i4.2 - IL_63b3: shl - IL_63b4: call void [System.Console]System.Console::Write(int32) - IL_63b9: dup - IL_63ba: ldc.i4.6 - IL_63bb: shl - IL_63bc: call void [System.Console]System.Console::Write(int32) - IL_63c1: dup - IL_63c2: ldc.i4.1 - IL_63c3: xor - IL_63c4: call void [System.Console]System.Console::Write(int32) - IL_63c9: dup - IL_63ca: ldc.i4.7 - IL_63cb: shr - IL_63cc: call void [System.Console]System.Console::Write(int32) - IL_63d1: dup - IL_63d2: ldc.i4.2 - IL_63d3: shl - IL_63d4: call void [System.Console]System.Console::Write(int32) - IL_63d9: dup - IL_63da: ldc.i4.4 - IL_63db: and - IL_63dc: call void [System.Console]System.Console::Write(int32) - IL_63e1: dup - IL_63e2: ldc.i4.3 - IL_63e3: or - IL_63e4: call void [System.Console]System.Console::Write(int32) - IL_63e9: dup - IL_63ea: ldc.i4.3 - IL_63eb: sub - IL_63ec: call void [System.Console]System.Console::Write(int32) - IL_63f1: dup - IL_63f2: ldc.i4.6 - IL_63f3: xor - IL_63f4: call void [System.Console]System.Console::Write(int32) - IL_63f9: dup - IL_63fa: ldc.i4.1 - IL_63fb: sub - IL_63fc: call void [System.Console]System.Console::Write(int32) - IL_6401: dup - IL_6402: ldc.i4.7 - IL_6403: mul - IL_6404: call void [System.Console]System.Console::Write(int32) - IL_6409: dup - IL_640a: ldc.i4.8 - IL_640b: xor - IL_640c: call void [System.Console]System.Console::Write(int32) - IL_6411: dup - IL_6412: ldc.i4.1 - IL_6413: xor - IL_6414: call void [System.Console]System.Console::Write(int32) - IL_6419: dup - IL_641a: ldc.i4.8 - IL_641b: xor - IL_641c: call void [System.Console]System.Console::Write(int32) - IL_6421: dup - IL_6422: ldc.i4.1 - IL_6423: add - IL_6424: call void [System.Console]System.Console::Write(int32) - IL_6429: dup - IL_642a: ldc.i4.6 - IL_642b: shl - IL_642c: call void [System.Console]System.Console::Write(int32) - IL_6431: dup - IL_6432: ldc.i4.4 - IL_6433: or - IL_6434: call void [System.Console]System.Console::Write(int32) - IL_6439: dup - IL_643a: ldc.i4.7 - IL_643b: shl - IL_643c: call void [System.Console]System.Console::Write(int32) - IL_6441: dup - IL_6442: ldc.i4.0 - IL_6443: or - IL_6444: call void [System.Console]System.Console::Write(int32) - IL_6449: dup - IL_644a: ldc.i4.6 - IL_644b: or - IL_644c: call void [System.Console]System.Console::Write(int32) - IL_6451: dup - IL_6452: ldc.i4.8 - IL_6453: mul - IL_6454: call void [System.Console]System.Console::Write(int32) - IL_6459: dup - IL_645a: ldc.i4.8 - IL_645b: shl - IL_645c: call void [System.Console]System.Console::Write(int32) - IL_6461: dup - IL_6462: ldc.i4.6 - IL_6463: shl - IL_6464: call void [System.Console]System.Console::Write(int32) - IL_6469: dup - IL_646a: ldc.i4.3 - IL_646b: mul - IL_646c: call void [System.Console]System.Console::Write(int32) - IL_6471: dup - IL_6472: ldc.i4.0 - IL_6473: mul - IL_6474: call void [System.Console]System.Console::Write(int32) - IL_6479: dup - IL_647a: ldc.i4.7 - IL_647b: mul - IL_647c: call void [System.Console]System.Console::Write(int32) - IL_6481: dup - IL_6482: ldc.i4.0 - IL_6483: mul - IL_6484: call void [System.Console]System.Console::Write(int32) - IL_6489: dup - IL_648a: ldc.i4.2 - IL_648b: add - IL_648c: call void [System.Console]System.Console::Write(int32) - IL_6491: dup - IL_6492: ldc.i4.5 - IL_6493: mul - IL_6494: call void [System.Console]System.Console::Write(int32) - IL_6499: dup - IL_649a: ldc.i4.3 - IL_649b: shr - IL_649c: call void [System.Console]System.Console::Write(int32) - IL_64a1: dup - IL_64a2: ldc.i4.4 - IL_64a3: xor - IL_64a4: call void [System.Console]System.Console::Write(int32) - IL_64a9: dup - IL_64aa: ldc.i4.4 - IL_64ab: sub - IL_64ac: call void [System.Console]System.Console::Write(int32) - IL_64b1: dup - IL_64b2: ldc.i4.7 - IL_64b3: or - IL_64b4: call void [System.Console]System.Console::Write(int32) - IL_64b9: dup - IL_64ba: ldc.i4.2 - IL_64bb: xor - IL_64bc: call void [System.Console]System.Console::Write(int32) - IL_64c1: dup - IL_64c2: ldc.i4.1 - IL_64c3: and - IL_64c4: call void [System.Console]System.Console::Write(int32) - IL_64c9: dup - IL_64ca: ldc.i4.0 - IL_64cb: and - IL_64cc: call void [System.Console]System.Console::Write(int32) - IL_64d1: dup - IL_64d2: ldc.i4.6 - IL_64d3: mul - IL_64d4: call void [System.Console]System.Console::Write(int32) - IL_64d9: dup - IL_64da: ldc.i4.1 - IL_64db: shl - IL_64dc: call void [System.Console]System.Console::Write(int32) - IL_64e1: dup - IL_64e2: ldc.i4.3 - IL_64e3: xor - IL_64e4: call void [System.Console]System.Console::Write(int32) - IL_64e9: dup - IL_64ea: ldc.i4.5 - IL_64eb: shl - IL_64ec: call void [System.Console]System.Console::Write(int32) - IL_64f1: dup - IL_64f2: ldc.i4.8 - IL_64f3: shr - IL_64f4: call void [System.Console]System.Console::Write(int32) - IL_64f9: dup - IL_64fa: ldc.i4.3 - IL_64fb: or - IL_64fc: call void [System.Console]System.Console::Write(int32) - IL_6501: dup - IL_6502: ldc.i4.2 - IL_6503: xor - IL_6504: call void [System.Console]System.Console::Write(int32) - IL_6509: dup - IL_650a: ldc.i4.3 - IL_650b: sub - IL_650c: call void [System.Console]System.Console::Write(int32) - IL_6511: dup - IL_6512: ldc.i4.6 - IL_6513: and - IL_6514: call void [System.Console]System.Console::Write(int32) - IL_6519: dup - IL_651a: ldc.i4.8 - IL_651b: and - IL_651c: call void [System.Console]System.Console::Write(int32) - IL_6521: dup - IL_6522: ldc.i4.5 - IL_6523: add - IL_6524: call void [System.Console]System.Console::Write(int32) - IL_6529: dup - IL_652a: ldc.i4.3 - IL_652b: shl - IL_652c: call void [System.Console]System.Console::Write(int32) - IL_6531: dup - IL_6532: ldc.i4.7 - IL_6533: shr - IL_6534: call void [System.Console]System.Console::Write(int32) - IL_6539: dup - IL_653a: ldc.i4.5 - IL_653b: and - IL_653c: call void [System.Console]System.Console::Write(int32) - IL_6541: dup - IL_6542: ldc.i4.2 - IL_6543: or - IL_6544: call void [System.Console]System.Console::Write(int32) - IL_6549: dup - IL_654a: ldc.i4.1 - IL_654b: sub - IL_654c: call void [System.Console]System.Console::Write(int32) - IL_6551: dup - IL_6552: ldc.i4.2 - IL_6553: add - IL_6554: call void [System.Console]System.Console::Write(int32) - IL_6559: dup - IL_655a: ldc.i4.4 - IL_655b: and - IL_655c: call void [System.Console]System.Console::Write(int32) - IL_6561: dup - IL_6562: ldc.i4.1 - IL_6563: and - IL_6564: call void [System.Console]System.Console::Write(int32) - IL_6569: dup - IL_656a: ldc.i4.5 - IL_656b: sub - IL_656c: call void [System.Console]System.Console::Write(int32) - IL_6571: dup - IL_6572: ldc.i4.5 - IL_6573: and - IL_6574: call void [System.Console]System.Console::Write(int32) - IL_6579: dup - IL_657a: ldc.i4.6 - IL_657b: and - IL_657c: call void [System.Console]System.Console::Write(int32) - IL_6581: dup - IL_6582: ldc.i4.0 - IL_6583: shl - IL_6584: call void [System.Console]System.Console::Write(int32) - IL_6589: dup - IL_658a: ldc.i4.0 - IL_658b: xor - IL_658c: call void [System.Console]System.Console::Write(int32) - IL_6591: dup - IL_6592: ldc.i4.4 - IL_6593: add - IL_6594: call void [System.Console]System.Console::Write(int32) - IL_6599: dup - IL_659a: ldc.i4.6 - IL_659b: mul - IL_659c: call void [System.Console]System.Console::Write(int32) - IL_65a1: dup - IL_65a2: ldc.i4.8 - IL_65a3: mul - IL_65a4: call void [System.Console]System.Console::Write(int32) - IL_65a9: dup - IL_65aa: ldc.i4.1 - IL_65ab: shr - IL_65ac: call void [System.Console]System.Console::Write(int32) - IL_65b1: dup - IL_65b2: ldc.i4.8 - IL_65b3: shl - IL_65b4: call void [System.Console]System.Console::Write(int32) - IL_65b9: dup - IL_65ba: ldc.i4.5 - IL_65bb: shr - IL_65bc: call void [System.Console]System.Console::Write(int32) - IL_65c1: dup - IL_65c2: ldc.i4.7 - IL_65c3: and - IL_65c4: call void [System.Console]System.Console::Write(int32) - IL_65c9: dup - IL_65ca: ldc.i4.2 - IL_65cb: or - IL_65cc: call void [System.Console]System.Console::Write(int32) - IL_65d1: dup - IL_65d2: ldc.i4.4 - IL_65d3: sub - IL_65d4: call void [System.Console]System.Console::Write(int32) - IL_65d9: dup - IL_65da: ldc.i4.5 - IL_65db: sub - IL_65dc: call void [System.Console]System.Console::Write(int32) - IL_65e1: dup - IL_65e2: ldc.i4.7 - IL_65e3: shr - IL_65e4: call void [System.Console]System.Console::Write(int32) - IL_65e9: dup - IL_65ea: ldc.i4.8 - IL_65eb: or - IL_65ec: call void [System.Console]System.Console::Write(int32) - IL_65f1: dup - IL_65f2: ldc.i4.1 - IL_65f3: shr - IL_65f4: call void [System.Console]System.Console::Write(int32) - IL_65f9: dup - IL_65fa: ldc.i4.1 - IL_65fb: and - IL_65fc: call void [System.Console]System.Console::Write(int32) - IL_6601: dup - IL_6602: ldc.i4.3 - IL_6603: shl - IL_6604: call void [System.Console]System.Console::Write(int32) - IL_6609: dup - IL_660a: ldc.i4.4 - IL_660b: mul - IL_660c: call void [System.Console]System.Console::Write(int32) - IL_6611: dup - IL_6612: ldc.i4.6 - IL_6613: sub - IL_6614: call void [System.Console]System.Console::Write(int32) - IL_6619: dup - IL_661a: ldc.i4.2 - IL_661b: sub - IL_661c: call void [System.Console]System.Console::Write(int32) - IL_6621: dup - IL_6622: ldc.i4.2 - IL_6623: and - IL_6624: call void [System.Console]System.Console::Write(int32) - IL_6629: dup - IL_662a: ldc.i4.1 - IL_662b: or - IL_662c: call void [System.Console]System.Console::Write(int32) - IL_6631: dup - IL_6632: ldc.i4.8 - IL_6633: or - IL_6634: call void [System.Console]System.Console::Write(int32) - IL_6639: dup - IL_663a: ldc.i4.8 - IL_663b: shl - IL_663c: call void [System.Console]System.Console::Write(int32) - IL_6641: dup - IL_6642: ldc.i4.1 - IL_6643: or - IL_6644: call void [System.Console]System.Console::Write(int32) - IL_6649: dup - IL_664a: ldc.i4.4 - IL_664b: and - IL_664c: call void [System.Console]System.Console::Write(int32) - IL_6651: dup - IL_6652: ldc.i4.5 - IL_6653: shr - IL_6654: call void [System.Console]System.Console::Write(int32) - IL_6659: dup - IL_665a: ldc.i4.3 - IL_665b: or - IL_665c: call void [System.Console]System.Console::Write(int32) - IL_6661: dup - IL_6662: ldc.i4.8 - IL_6663: and - IL_6664: call void [System.Console]System.Console::Write(int32) - IL_6669: dup - IL_666a: ldc.i4.5 - IL_666b: and - IL_666c: call void [System.Console]System.Console::Write(int32) - IL_6671: dup - IL_6672: ldc.i4.1 - IL_6673: and - IL_6674: call void [System.Console]System.Console::Write(int32) - IL_6679: dup - IL_667a: ldc.i4.1 - IL_667b: mul - IL_667c: call void [System.Console]System.Console::Write(int32) - IL_6681: dup - IL_6682: ldc.i4.1 - IL_6683: xor - IL_6684: call void [System.Console]System.Console::Write(int32) - IL_6689: dup - IL_668a: ldc.i4.2 - IL_668b: mul - IL_668c: call void [System.Console]System.Console::Write(int32) - IL_6691: dup - IL_6692: ldc.i4.0 - IL_6693: mul - IL_6694: call void [System.Console]System.Console::Write(int32) - IL_6699: dup - IL_669a: ldc.i4.0 - IL_669b: shl - IL_669c: call void [System.Console]System.Console::Write(int32) - IL_66a1: dup - IL_66a2: ldc.i4.4 - IL_66a3: add - IL_66a4: call void [System.Console]System.Console::Write(int32) - IL_66a9: dup - IL_66aa: ldc.i4.6 - IL_66ab: shr - IL_66ac: call void [System.Console]System.Console::Write(int32) - IL_66b1: dup - IL_66b2: ldc.i4.8 - IL_66b3: shr - IL_66b4: call void [System.Console]System.Console::Write(int32) - IL_66b9: dup - IL_66ba: ldc.i4.2 - IL_66bb: or - IL_66bc: call void [System.Console]System.Console::Write(int32) - IL_66c1: dup - IL_66c2: ldc.i4.6 - IL_66c3: xor - IL_66c4: call void [System.Console]System.Console::Write(int32) - IL_66c9: dup - IL_66ca: ldc.i4.6 - IL_66cb: sub - IL_66cc: call void [System.Console]System.Console::Write(int32) - IL_66d1: dup - IL_66d2: ldc.i4.1 - IL_66d3: mul - IL_66d4: call void [System.Console]System.Console::Write(int32) - IL_66d9: dup - IL_66da: ldc.i4.1 - IL_66db: shr - IL_66dc: call void [System.Console]System.Console::Write(int32) - IL_66e1: dup - IL_66e2: ldc.i4.1 - IL_66e3: shl - IL_66e4: call void [System.Console]System.Console::Write(int32) - IL_66e9: dup - IL_66ea: ldc.i4.3 - IL_66eb: and - IL_66ec: call void [System.Console]System.Console::Write(int32) - IL_66f1: dup - IL_66f2: ldc.i4.5 - IL_66f3: xor - IL_66f4: call void [System.Console]System.Console::Write(int32) - IL_66f9: dup - IL_66fa: ldc.i4.0 - IL_66fb: mul - IL_66fc: call void [System.Console]System.Console::Write(int32) - IL_6701: dup - IL_6702: ldc.i4.6 - IL_6703: or - IL_6704: call void [System.Console]System.Console::Write(int32) - IL_6709: dup - IL_670a: ldc.i4.7 - IL_670b: shl - IL_670c: call void [System.Console]System.Console::Write(int32) - IL_6711: dup - IL_6712: ldc.i4.5 - IL_6713: shl - IL_6714: call void [System.Console]System.Console::Write(int32) - IL_6719: dup - IL_671a: ldc.i4.4 - IL_671b: and - IL_671c: call void [System.Console]System.Console::Write(int32) - IL_6721: dup - IL_6722: ldc.i4.8 - IL_6723: and - IL_6724: call void [System.Console]System.Console::Write(int32) - IL_6729: dup - IL_672a: ldc.i4.3 - IL_672b: xor - IL_672c: call void [System.Console]System.Console::Write(int32) - IL_6731: dup - IL_6732: ldc.i4.8 - IL_6733: shl - IL_6734: call void [System.Console]System.Console::Write(int32) - IL_6739: dup - IL_673a: ldc.i4.8 - IL_673b: sub - IL_673c: call void [System.Console]System.Console::Write(int32) - IL_6741: dup - IL_6742: ldc.i4.5 - IL_6743: shl - IL_6744: call void [System.Console]System.Console::Write(int32) - IL_6749: dup - IL_674a: ldc.i4.1 - IL_674b: and - IL_674c: call void [System.Console]System.Console::Write(int32) - IL_6751: dup - IL_6752: ldc.i4.1 - IL_6753: or - IL_6754: call void [System.Console]System.Console::Write(int32) - IL_6759: dup - IL_675a: ldc.i4.0 - IL_675b: and - IL_675c: call void [System.Console]System.Console::Write(int32) - IL_6761: dup - IL_6762: ldc.i4.1 - IL_6763: shl - IL_6764: call void [System.Console]System.Console::Write(int32) - IL_6769: dup - IL_676a: ldc.i4.1 - IL_676b: xor - IL_676c: call void [System.Console]System.Console::Write(int32) - IL_6771: dup - IL_6772: ldc.i4.7 - IL_6773: sub - IL_6774: call void [System.Console]System.Console::Write(int32) - IL_6779: dup - IL_677a: ldc.i4.8 - IL_677b: add - IL_677c: call void [System.Console]System.Console::Write(int32) - IL_6781: dup - IL_6782: ldc.i4.0 - IL_6783: xor - IL_6784: call void [System.Console]System.Console::Write(int32) - IL_6789: dup - IL_678a: ldc.i4.0 - IL_678b: add - IL_678c: call void [System.Console]System.Console::Write(int32) - IL_6791: dup - IL_6792: ldc.i4.7 - IL_6793: and - IL_6794: call void [System.Console]System.Console::Write(int32) - IL_6799: dup - IL_679a: ldc.i4.3 - IL_679b: sub - IL_679c: call void [System.Console]System.Console::Write(int32) - IL_67a1: dup - IL_67a2: ldc.i4.7 - IL_67a3: and - IL_67a4: call void [System.Console]System.Console::Write(int32) - IL_67a9: dup - IL_67aa: ldc.i4.2 - IL_67ab: mul - IL_67ac: call void [System.Console]System.Console::Write(int32) - IL_67b1: dup - IL_67b2: ldc.i4.8 - IL_67b3: shr - IL_67b4: call void [System.Console]System.Console::Write(int32) - IL_67b9: dup - IL_67ba: ldc.i4.6 - IL_67bb: shl - IL_67bc: call void [System.Console]System.Console::Write(int32) - IL_67c1: dup - IL_67c2: ldc.i4.6 - IL_67c3: sub - IL_67c4: call void [System.Console]System.Console::Write(int32) - IL_67c9: dup - IL_67ca: ldc.i4.2 - IL_67cb: add - IL_67cc: call void [System.Console]System.Console::Write(int32) - IL_67d1: dup - IL_67d2: ldc.i4.2 - IL_67d3: mul - IL_67d4: call void [System.Console]System.Console::Write(int32) - IL_67d9: dup - IL_67da: ldc.i4.2 - IL_67db: shr - IL_67dc: call void [System.Console]System.Console::Write(int32) - IL_67e1: dup - IL_67e2: ldc.i4.7 - IL_67e3: add - IL_67e4: call void [System.Console]System.Console::Write(int32) - IL_67e9: dup - IL_67ea: ldc.i4.2 - IL_67eb: or - IL_67ec: call void [System.Console]System.Console::Write(int32) - IL_67f1: dup - IL_67f2: ldc.i4.3 - IL_67f3: add - IL_67f4: call void [System.Console]System.Console::Write(int32) - IL_67f9: dup - IL_67fa: ldc.i4.0 - IL_67fb: and - IL_67fc: call void [System.Console]System.Console::Write(int32) - IL_6801: dup - IL_6802: ldc.i4.8 - IL_6803: mul - IL_6804: call void [System.Console]System.Console::Write(int32) - IL_6809: dup - IL_680a: ldc.i4.3 - IL_680b: shl - IL_680c: call void [System.Console]System.Console::Write(int32) - IL_6811: dup - IL_6812: ldc.i4.5 - IL_6813: and - IL_6814: call void [System.Console]System.Console::Write(int32) - IL_6819: dup - IL_681a: ldc.i4.3 - IL_681b: and - IL_681c: call void [System.Console]System.Console::Write(int32) - IL_6821: dup - IL_6822: ldc.i4.2 - IL_6823: add - IL_6824: call void [System.Console]System.Console::Write(int32) - IL_6829: dup - IL_682a: ldc.i4.8 - IL_682b: mul - IL_682c: call void [System.Console]System.Console::Write(int32) - IL_6831: dup - IL_6832: ldc.i4.5 - IL_6833: and - IL_6834: call void [System.Console]System.Console::Write(int32) - IL_6839: dup - IL_683a: ldc.i4.8 - IL_683b: xor - IL_683c: call void [System.Console]System.Console::Write(int32) - IL_6841: dup - IL_6842: ldc.i4.8 - IL_6843: shl - IL_6844: call void [System.Console]System.Console::Write(int32) - IL_6849: dup - IL_684a: ldc.i4.6 - IL_684b: shl - IL_684c: call void [System.Console]System.Console::Write(int32) - IL_6851: dup - IL_6852: ldc.i4.8 - IL_6853: or - IL_6854: call void [System.Console]System.Console::Write(int32) - IL_6859: dup - IL_685a: ldc.i4.6 - IL_685b: and - IL_685c: call void [System.Console]System.Console::Write(int32) - IL_6861: dup - IL_6862: ldc.i4.1 - IL_6863: mul - IL_6864: call void [System.Console]System.Console::Write(int32) - IL_6869: dup - IL_686a: ldc.i4.2 - IL_686b: and - IL_686c: call void [System.Console]System.Console::Write(int32) - IL_6871: dup - IL_6872: ldc.i4.4 - IL_6873: xor - IL_6874: call void [System.Console]System.Console::Write(int32) - IL_6879: dup - IL_687a: ldc.i4.6 - IL_687b: shr - IL_687c: call void [System.Console]System.Console::Write(int32) - IL_6881: dup - IL_6882: ldc.i4.7 - IL_6883: shl - IL_6884: call void [System.Console]System.Console::Write(int32) - IL_6889: dup - IL_688a: ldc.i4.4 - IL_688b: shl - IL_688c: call void [System.Console]System.Console::Write(int32) - IL_6891: dup - IL_6892: ldc.i4.2 - IL_6893: sub - IL_6894: call void [System.Console]System.Console::Write(int32) - IL_6899: dup - IL_689a: ldc.i4.0 - IL_689b: and - IL_689c: call void [System.Console]System.Console::Write(int32) - IL_68a1: dup - IL_68a2: ldc.i4.7 - IL_68a3: xor - IL_68a4: call void [System.Console]System.Console::Write(int32) - IL_68a9: dup - IL_68aa: ldc.i4.6 - IL_68ab: mul - IL_68ac: call void [System.Console]System.Console::Write(int32) - IL_68b1: dup - IL_68b2: ldc.i4.3 - IL_68b3: or - IL_68b4: call void [System.Console]System.Console::Write(int32) - IL_68b9: dup - IL_68ba: ldc.i4.0 - IL_68bb: add - IL_68bc: call void [System.Console]System.Console::Write(int32) - IL_68c1: dup - IL_68c2: ldc.i4.0 - IL_68c3: and - IL_68c4: call void [System.Console]System.Console::Write(int32) - IL_68c9: dup - IL_68ca: ldc.i4.0 - IL_68cb: and - IL_68cc: call void [System.Console]System.Console::Write(int32) - IL_68d1: dup - IL_68d2: ldc.i4.3 - IL_68d3: xor - IL_68d4: call void [System.Console]System.Console::Write(int32) - IL_68d9: dup - IL_68da: ldc.i4.7 - IL_68db: or - IL_68dc: call void [System.Console]System.Console::Write(int32) - IL_68e1: dup - IL_68e2: ldc.i4.5 - IL_68e3: shr - IL_68e4: call void [System.Console]System.Console::Write(int32) - IL_68e9: dup - IL_68ea: ldc.i4.3 - IL_68eb: mul - IL_68ec: call void [System.Console]System.Console::Write(int32) - IL_68f1: dup - IL_68f2: ldc.i4.4 - IL_68f3: shl - IL_68f4: call void [System.Console]System.Console::Write(int32) - IL_68f9: dup - IL_68fa: ldc.i4.3 - IL_68fb: and - IL_68fc: call void [System.Console]System.Console::Write(int32) - IL_6901: dup - IL_6902: ldc.i4.2 - IL_6903: sub - IL_6904: call void [System.Console]System.Console::Write(int32) - IL_6909: dup - IL_690a: ldc.i4.3 - IL_690b: sub - IL_690c: call void [System.Console]System.Console::Write(int32) - IL_6911: dup - IL_6912: ldc.i4.2 - IL_6913: mul - IL_6914: call void [System.Console]System.Console::Write(int32) - IL_6919: dup - IL_691a: ldc.i4.1 - IL_691b: shr - IL_691c: call void [System.Console]System.Console::Write(int32) - IL_6921: dup - IL_6922: ldc.i4.5 - IL_6923: or - IL_6924: call void [System.Console]System.Console::Write(int32) - IL_6929: dup - IL_692a: ldc.i4.7 - IL_692b: xor - IL_692c: call void [System.Console]System.Console::Write(int32) - IL_6931: dup - IL_6932: ldc.i4.1 - IL_6933: shl - IL_6934: call void [System.Console]System.Console::Write(int32) - IL_6939: dup - IL_693a: ldc.i4.3 - IL_693b: sub - IL_693c: call void [System.Console]System.Console::Write(int32) - IL_6941: dup - IL_6942: ldc.i4.2 - IL_6943: mul - IL_6944: call void [System.Console]System.Console::Write(int32) - IL_6949: dup - IL_694a: ldc.i4.6 - IL_694b: shr - IL_694c: call void [System.Console]System.Console::Write(int32) - IL_6951: dup - IL_6952: ldc.i4.2 - IL_6953: or - IL_6954: call void [System.Console]System.Console::Write(int32) - IL_6959: dup - IL_695a: ldc.i4.3 - IL_695b: xor - IL_695c: call void [System.Console]System.Console::Write(int32) - IL_6961: dup - IL_6962: ldc.i4.5 - IL_6963: shl - IL_6964: call void [System.Console]System.Console::Write(int32) - IL_6969: dup - IL_696a: ldc.i4.8 - IL_696b: shr - IL_696c: call void [System.Console]System.Console::Write(int32) - IL_6971: dup - IL_6972: ldc.i4.7 - IL_6973: and - IL_6974: call void [System.Console]System.Console::Write(int32) - IL_6979: dup - IL_697a: ldc.i4.2 - IL_697b: mul - IL_697c: call void [System.Console]System.Console::Write(int32) - IL_6981: dup - IL_6982: ldc.i4.1 - IL_6983: or - IL_6984: call void [System.Console]System.Console::Write(int32) - IL_6989: dup - IL_698a: ldc.i4.8 - IL_698b: sub - IL_698c: call void [System.Console]System.Console::Write(int32) - IL_6991: dup - IL_6992: ldc.i4.5 - IL_6993: or - IL_6994: call void [System.Console]System.Console::Write(int32) - IL_6999: dup - IL_699a: ldc.i4.6 - IL_699b: shr - IL_699c: call void [System.Console]System.Console::Write(int32) - IL_69a1: dup - IL_69a2: ldc.i4.5 - IL_69a3: xor - IL_69a4: call void [System.Console]System.Console::Write(int32) - IL_69a9: dup - IL_69aa: ldc.i4.1 - IL_69ab: xor - IL_69ac: call void [System.Console]System.Console::Write(int32) - IL_69b1: dup - IL_69b2: ldc.i4.5 - IL_69b3: xor - IL_69b4: call void [System.Console]System.Console::Write(int32) - IL_69b9: dup - IL_69ba: ldc.i4.6 - IL_69bb: add - IL_69bc: call void [System.Console]System.Console::Write(int32) - IL_69c1: dup - IL_69c2: ldc.i4.2 - IL_69c3: sub - IL_69c4: call void [System.Console]System.Console::Write(int32) - IL_69c9: dup - IL_69ca: ldc.i4.0 - IL_69cb: sub - IL_69cc: call void [System.Console]System.Console::Write(int32) - IL_69d1: dup - IL_69d2: ldc.i4.7 - IL_69d3: shr - IL_69d4: call void [System.Console]System.Console::Write(int32) - IL_69d9: dup - IL_69da: ldc.i4.5 - IL_69db: mul - IL_69dc: call void [System.Console]System.Console::Write(int32) - IL_69e1: dup - IL_69e2: ldc.i4.7 - IL_69e3: or - IL_69e4: call void [System.Console]System.Console::Write(int32) - IL_69e9: dup - IL_69ea: ldc.i4.4 - IL_69eb: and - IL_69ec: call void [System.Console]System.Console::Write(int32) - IL_69f1: dup - IL_69f2: ldc.i4.3 - IL_69f3: shl - IL_69f4: call void [System.Console]System.Console::Write(int32) - IL_69f9: dup - IL_69fa: ldc.i4.8 - IL_69fb: and - IL_69fc: call void [System.Console]System.Console::Write(int32) - IL_6a01: dup - IL_6a02: ldc.i4.5 - IL_6a03: shl - IL_6a04: call void [System.Console]System.Console::Write(int32) - IL_6a09: dup - IL_6a0a: ldc.i4.2 - IL_6a0b: mul - IL_6a0c: call void [System.Console]System.Console::Write(int32) - IL_6a11: dup - IL_6a12: ldc.i4.4 - IL_6a13: mul - IL_6a14: call void [System.Console]System.Console::Write(int32) - IL_6a19: dup - IL_6a1a: ldc.i4.5 - IL_6a1b: mul - IL_6a1c: call void [System.Console]System.Console::Write(int32) - IL_6a21: dup - IL_6a22: ldc.i4.5 - IL_6a23: or - IL_6a24: call void [System.Console]System.Console::Write(int32) - IL_6a29: dup - IL_6a2a: ldc.i4.0 - IL_6a2b: or - IL_6a2c: call void [System.Console]System.Console::Write(int32) - IL_6a31: dup - IL_6a32: ldc.i4.7 - IL_6a33: or - IL_6a34: call void [System.Console]System.Console::Write(int32) - IL_6a39: dup - IL_6a3a: ldc.i4.7 - IL_6a3b: sub - IL_6a3c: call void [System.Console]System.Console::Write(int32) - IL_6a41: dup - IL_6a42: ldc.i4.7 - IL_6a43: or - IL_6a44: call void [System.Console]System.Console::Write(int32) - IL_6a49: dup - IL_6a4a: ldc.i4.3 - IL_6a4b: shl - IL_6a4c: call void [System.Console]System.Console::Write(int32) - IL_6a51: dup - IL_6a52: ldc.i4.6 - IL_6a53: add - IL_6a54: call void [System.Console]System.Console::Write(int32) - IL_6a59: dup - IL_6a5a: ldc.i4.3 - IL_6a5b: xor - IL_6a5c: call void [System.Console]System.Console::Write(int32) - IL_6a61: dup - IL_6a62: ldc.i4.2 - IL_6a63: shr - IL_6a64: call void [System.Console]System.Console::Write(int32) - IL_6a69: dup - IL_6a6a: ldc.i4.3 - IL_6a6b: shr - IL_6a6c: call void [System.Console]System.Console::Write(int32) - IL_6a71: dup - IL_6a72: ldc.i4.3 - IL_6a73: or - IL_6a74: call void [System.Console]System.Console::Write(int32) - IL_6a79: dup - IL_6a7a: ldc.i4.3 - IL_6a7b: add - IL_6a7c: call void [System.Console]System.Console::Write(int32) - IL_6a81: dup - IL_6a82: ldc.i4.4 - IL_6a83: mul - IL_6a84: call void [System.Console]System.Console::Write(int32) - IL_6a89: dup - IL_6a8a: ldc.i4.7 - IL_6a8b: add - IL_6a8c: call void [System.Console]System.Console::Write(int32) - IL_6a91: dup - IL_6a92: ldc.i4.1 - IL_6a93: xor - IL_6a94: call void [System.Console]System.Console::Write(int32) - IL_6a99: dup - IL_6a9a: ldc.i4.5 - IL_6a9b: or - IL_6a9c: call void [System.Console]System.Console::Write(int32) - IL_6aa1: dup - IL_6aa2: ldc.i4.5 - IL_6aa3: shr - IL_6aa4: call void [System.Console]System.Console::Write(int32) - IL_6aa9: dup - IL_6aaa: ldc.i4.6 - IL_6aab: or - IL_6aac: call void [System.Console]System.Console::Write(int32) - IL_6ab1: dup - IL_6ab2: ldc.i4.5 - IL_6ab3: shr - IL_6ab4: call void [System.Console]System.Console::Write(int32) - IL_6ab9: dup - IL_6aba: ldc.i4.3 - IL_6abb: and - IL_6abc: call void [System.Console]System.Console::Write(int32) - IL_6ac1: dup - IL_6ac2: ldc.i4.0 - IL_6ac3: sub - IL_6ac4: call void [System.Console]System.Console::Write(int32) - IL_6ac9: dup - IL_6aca: ldc.i4.8 - IL_6acb: xor - IL_6acc: call void [System.Console]System.Console::Write(int32) - IL_6ad1: dup - IL_6ad2: ldc.i4.0 - IL_6ad3: mul - IL_6ad4: call void [System.Console]System.Console::Write(int32) - IL_6ad9: dup - IL_6ada: ldc.i4.1 - IL_6adb: xor - IL_6adc: call void [System.Console]System.Console::Write(int32) - IL_6ae1: dup - IL_6ae2: ldc.i4.1 - IL_6ae3: and - IL_6ae4: call void [System.Console]System.Console::Write(int32) - IL_6ae9: dup - IL_6aea: ldc.i4.8 - IL_6aeb: and - IL_6aec: call void [System.Console]System.Console::Write(int32) - IL_6af1: dup - IL_6af2: ldc.i4.8 - IL_6af3: or - IL_6af4: call void [System.Console]System.Console::Write(int32) - IL_6af9: dup - IL_6afa: ldc.i4.7 - IL_6afb: shr - IL_6afc: call void [System.Console]System.Console::Write(int32) - IL_6b01: dup - IL_6b02: ldc.i4.5 - IL_6b03: or - IL_6b04: call void [System.Console]System.Console::Write(int32) - IL_6b09: dup - IL_6b0a: ldc.i4.4 - IL_6b0b: shl - IL_6b0c: call void [System.Console]System.Console::Write(int32) - IL_6b11: dup - IL_6b12: ldc.i4.0 - IL_6b13: and - IL_6b14: call void [System.Console]System.Console::Write(int32) - IL_6b19: dup - IL_6b1a: ldc.i4.0 - IL_6b1b: xor - IL_6b1c: call void [System.Console]System.Console::Write(int32) - IL_6b21: dup - IL_6b22: ldc.i4.2 - IL_6b23: xor - IL_6b24: call void [System.Console]System.Console::Write(int32) - IL_6b29: dup - IL_6b2a: ldc.i4.7 - IL_6b2b: add - IL_6b2c: call void [System.Console]System.Console::Write(int32) - IL_6b31: dup - IL_6b32: ldc.i4.3 - IL_6b33: xor - IL_6b34: call void [System.Console]System.Console::Write(int32) - IL_6b39: dup - IL_6b3a: ldc.i4.7 - IL_6b3b: shr - IL_6b3c: call void [System.Console]System.Console::Write(int32) - IL_6b41: dup - IL_6b42: ldc.i4.2 - IL_6b43: xor - IL_6b44: call void [System.Console]System.Console::Write(int32) - IL_6b49: dup - IL_6b4a: ldc.i4.6 - IL_6b4b: sub - IL_6b4c: call void [System.Console]System.Console::Write(int32) - IL_6b51: dup - IL_6b52: ldc.i4.8 - IL_6b53: or - IL_6b54: call void [System.Console]System.Console::Write(int32) - IL_6b59: dup - IL_6b5a: ldc.i4.8 - IL_6b5b: add - IL_6b5c: call void [System.Console]System.Console::Write(int32) - IL_6b61: dup - IL_6b62: ldc.i4.1 - IL_6b63: mul - IL_6b64: call void [System.Console]System.Console::Write(int32) - IL_6b69: dup - IL_6b6a: ldc.i4.8 - IL_6b6b: mul - IL_6b6c: call void [System.Console]System.Console::Write(int32) - IL_6b71: dup - IL_6b72: ldc.i4.3 - IL_6b73: and - IL_6b74: call void [System.Console]System.Console::Write(int32) - IL_6b79: dup - IL_6b7a: ldc.i4.0 - IL_6b7b: and - IL_6b7c: call void [System.Console]System.Console::Write(int32) - IL_6b81: dup - IL_6b82: ldc.i4.7 - IL_6b83: add - IL_6b84: call void [System.Console]System.Console::Write(int32) - IL_6b89: dup - IL_6b8a: ldc.i4.2 - IL_6b8b: shr - IL_6b8c: call void [System.Console]System.Console::Write(int32) - IL_6b91: dup - IL_6b92: ldc.i4.1 - IL_6b93: or - IL_6b94: call void [System.Console]System.Console::Write(int32) - IL_6b99: dup - IL_6b9a: ldc.i4.7 - IL_6b9b: sub - IL_6b9c: call void [System.Console]System.Console::Write(int32) - IL_6ba1: dup - IL_6ba2: ldc.i4.1 - IL_6ba3: shl - IL_6ba4: call void [System.Console]System.Console::Write(int32) - IL_6ba9: dup - IL_6baa: ldc.i4.1 - IL_6bab: shr - IL_6bac: call void [System.Console]System.Console::Write(int32) - IL_6bb1: dup - IL_6bb2: ldc.i4.4 - IL_6bb3: add - IL_6bb4: call void [System.Console]System.Console::Write(int32) - IL_6bb9: dup - IL_6bba: ldc.i4.0 - IL_6bbb: shr - IL_6bbc: call void [System.Console]System.Console::Write(int32) - IL_6bc1: dup - IL_6bc2: ldc.i4.0 - IL_6bc3: mul - IL_6bc4: call void [System.Console]System.Console::Write(int32) - IL_6bc9: dup - IL_6bca: ldc.i4.4 - IL_6bcb: xor - IL_6bcc: call void [System.Console]System.Console::Write(int32) - IL_6bd1: dup - IL_6bd2: ldc.i4.1 - IL_6bd3: shr - IL_6bd4: call void [System.Console]System.Console::Write(int32) - IL_6bd9: dup - IL_6bda: ldc.i4.6 - IL_6bdb: shr - IL_6bdc: call void [System.Console]System.Console::Write(int32) - IL_6be1: dup - IL_6be2: ldc.i4.8 - IL_6be3: mul - IL_6be4: call void [System.Console]System.Console::Write(int32) - IL_6be9: dup - IL_6bea: ldc.i4.2 - IL_6beb: shr - IL_6bec: call void [System.Console]System.Console::Write(int32) - IL_6bf1: dup - IL_6bf2: ldc.i4.7 - IL_6bf3: and - IL_6bf4: call void [System.Console]System.Console::Write(int32) - IL_6bf9: dup - IL_6bfa: ldc.i4.8 - IL_6bfb: shl - IL_6bfc: call void [System.Console]System.Console::Write(int32) - IL_6c01: dup - IL_6c02: ldc.i4.3 - IL_6c03: add - IL_6c04: call void [System.Console]System.Console::Write(int32) - IL_6c09: dup - IL_6c0a: ldc.i4.1 - IL_6c0b: mul - IL_6c0c: call void [System.Console]System.Console::Write(int32) - IL_6c11: dup - IL_6c12: ldc.i4.1 - IL_6c13: add - IL_6c14: call void [System.Console]System.Console::Write(int32) - IL_6c19: dup - IL_6c1a: ldc.i4.4 - IL_6c1b: xor - IL_6c1c: call void [System.Console]System.Console::Write(int32) - IL_6c21: dup - IL_6c22: ldc.i4.6 - IL_6c23: xor - IL_6c24: call void [System.Console]System.Console::Write(int32) - IL_6c29: dup - IL_6c2a: ldc.i4.0 - IL_6c2b: mul - IL_6c2c: call void [System.Console]System.Console::Write(int32) - IL_6c31: dup - IL_6c32: ldc.i4.7 - IL_6c33: mul - IL_6c34: call void [System.Console]System.Console::Write(int32) - IL_6c39: dup - IL_6c3a: ldc.i4.5 - IL_6c3b: add - IL_6c3c: call void [System.Console]System.Console::Write(int32) - IL_6c41: dup - IL_6c42: ldc.i4.2 - IL_6c43: mul - IL_6c44: call void [System.Console]System.Console::Write(int32) - IL_6c49: dup - IL_6c4a: ldc.i4.2 - IL_6c4b: add - IL_6c4c: call void [System.Console]System.Console::Write(int32) - IL_6c51: dup - IL_6c52: ldc.i4.3 - IL_6c53: shl - IL_6c54: call void [System.Console]System.Console::Write(int32) - IL_6c59: dup - IL_6c5a: ldc.i4.5 - IL_6c5b: sub - IL_6c5c: call void [System.Console]System.Console::Write(int32) - IL_6c61: dup - IL_6c62: ldc.i4.3 - IL_6c63: shl - IL_6c64: call void [System.Console]System.Console::Write(int32) - IL_6c69: dup - IL_6c6a: ldc.i4.6 - IL_6c6b: and - IL_6c6c: call void [System.Console]System.Console::Write(int32) - IL_6c71: dup - IL_6c72: ldc.i4.5 - IL_6c73: add - IL_6c74: call void [System.Console]System.Console::Write(int32) - IL_6c79: dup - IL_6c7a: ldc.i4.3 - IL_6c7b: xor - IL_6c7c: call void [System.Console]System.Console::Write(int32) - IL_6c81: dup - IL_6c82: ldc.i4.5 - IL_6c83: shl - IL_6c84: call void [System.Console]System.Console::Write(int32) - IL_6c89: dup - IL_6c8a: ldc.i4.2 - IL_6c8b: xor - IL_6c8c: call void [System.Console]System.Console::Write(int32) - IL_6c91: dup - IL_6c92: ldc.i4.8 - IL_6c93: and - IL_6c94: call void [System.Console]System.Console::Write(int32) - IL_6c99: dup - IL_6c9a: ldc.i4.4 - IL_6c9b: or - IL_6c9c: call void [System.Console]System.Console::Write(int32) - IL_6ca1: dup - IL_6ca2: ldc.i4.7 - IL_6ca3: add - IL_6ca4: call void [System.Console]System.Console::Write(int32) - IL_6ca9: dup - IL_6caa: ldc.i4.6 - IL_6cab: and - IL_6cac: call void [System.Console]System.Console::Write(int32) - IL_6cb1: dup - IL_6cb2: ldc.i4.5 - IL_6cb3: mul - IL_6cb4: call void [System.Console]System.Console::Write(int32) - IL_6cb9: dup - IL_6cba: ldc.i4.8 - IL_6cbb: shr - IL_6cbc: call void [System.Console]System.Console::Write(int32) - IL_6cc1: dup - IL_6cc2: ldc.i4.6 - IL_6cc3: sub - IL_6cc4: call void [System.Console]System.Console::Write(int32) - IL_6cc9: dup - IL_6cca: ldc.i4.4 - IL_6ccb: shl - IL_6ccc: call void [System.Console]System.Console::Write(int32) - IL_6cd1: dup - IL_6cd2: ldc.i4.3 - IL_6cd3: and - IL_6cd4: call void [System.Console]System.Console::Write(int32) - IL_6cd9: dup - IL_6cda: ldc.i4.1 - IL_6cdb: and - IL_6cdc: call void [System.Console]System.Console::Write(int32) - IL_6ce1: dup - IL_6ce2: ldc.i4.4 - IL_6ce3: or - IL_6ce4: call void [System.Console]System.Console::Write(int32) - IL_6ce9: dup - IL_6cea: ldc.i4.8 - IL_6ceb: shl - IL_6cec: call void [System.Console]System.Console::Write(int32) - IL_6cf1: dup - IL_6cf2: ldc.i4.3 - IL_6cf3: shr - IL_6cf4: call void [System.Console]System.Console::Write(int32) - IL_6cf9: dup - IL_6cfa: ldc.i4.7 - IL_6cfb: shr - IL_6cfc: call void [System.Console]System.Console::Write(int32) - IL_6d01: dup - IL_6d02: ldc.i4.0 - IL_6d03: shr - IL_6d04: call void [System.Console]System.Console::Write(int32) - IL_6d09: dup - IL_6d0a: ldc.i4.6 - IL_6d0b: sub - IL_6d0c: call void [System.Console]System.Console::Write(int32) - IL_6d11: dup - IL_6d12: ldc.i4.0 - IL_6d13: sub - IL_6d14: call void [System.Console]System.Console::Write(int32) - IL_6d19: dup - IL_6d1a: ldc.i4.1 - IL_6d1b: xor - IL_6d1c: call void [System.Console]System.Console::Write(int32) - IL_6d21: dup - IL_6d22: ldc.i4.7 - IL_6d23: xor - IL_6d24: call void [System.Console]System.Console::Write(int32) - IL_6d29: dup - IL_6d2a: ldc.i4.2 - IL_6d2b: mul - IL_6d2c: call void [System.Console]System.Console::Write(int32) - IL_6d31: dup - IL_6d32: ldc.i4.7 - IL_6d33: and - IL_6d34: call void [System.Console]System.Console::Write(int32) - IL_6d39: dup - IL_6d3a: ldc.i4.5 - IL_6d3b: add - IL_6d3c: call void [System.Console]System.Console::Write(int32) - IL_6d41: dup - IL_6d42: ldc.i4.6 - IL_6d43: add - IL_6d44: call void [System.Console]System.Console::Write(int32) - IL_6d49: dup - IL_6d4a: ldc.i4.0 - IL_6d4b: mul - IL_6d4c: call void [System.Console]System.Console::Write(int32) - IL_6d51: dup - IL_6d52: ldc.i4.5 - IL_6d53: and - IL_6d54: call void [System.Console]System.Console::Write(int32) - IL_6d59: dup - IL_6d5a: ldc.i4.8 - IL_6d5b: shr - IL_6d5c: call void [System.Console]System.Console::Write(int32) - IL_6d61: dup - IL_6d62: ldc.i4.4 - IL_6d63: xor - IL_6d64: call void [System.Console]System.Console::Write(int32) - IL_6d69: dup - IL_6d6a: ldc.i4.7 - IL_6d6b: or - IL_6d6c: call void [System.Console]System.Console::Write(int32) - IL_6d71: dup - IL_6d72: ldc.i4.7 - IL_6d73: or - IL_6d74: call void [System.Console]System.Console::Write(int32) - IL_6d79: dup - IL_6d7a: ldc.i4.4 - IL_6d7b: sub - IL_6d7c: call void [System.Console]System.Console::Write(int32) - IL_6d81: dup - IL_6d82: ldc.i4.1 - IL_6d83: add - IL_6d84: call void [System.Console]System.Console::Write(int32) - IL_6d89: dup - IL_6d8a: ldc.i4.6 - IL_6d8b: or - IL_6d8c: call void [System.Console]System.Console::Write(int32) - IL_6d91: dup - IL_6d92: ldc.i4.5 - IL_6d93: shr - IL_6d94: call void [System.Console]System.Console::Write(int32) - IL_6d99: dup - IL_6d9a: ldc.i4.5 - IL_6d9b: shl - IL_6d9c: call void [System.Console]System.Console::Write(int32) - IL_6da1: dup - IL_6da2: ldc.i4.0 - IL_6da3: or - IL_6da4: call void [System.Console]System.Console::Write(int32) - IL_6da9: dup - IL_6daa: ldc.i4.6 - IL_6dab: or - IL_6dac: call void [System.Console]System.Console::Write(int32) - IL_6db1: dup - IL_6db2: ldc.i4.5 - IL_6db3: and - IL_6db4: call void [System.Console]System.Console::Write(int32) - IL_6db9: dup - IL_6dba: ldc.i4.8 - IL_6dbb: shr - IL_6dbc: call void [System.Console]System.Console::Write(int32) - IL_6dc1: dup - IL_6dc2: ldc.i4.3 - IL_6dc3: or - IL_6dc4: call void [System.Console]System.Console::Write(int32) - IL_6dc9: dup - IL_6dca: ldc.i4.7 - IL_6dcb: xor - IL_6dcc: call void [System.Console]System.Console::Write(int32) - IL_6dd1: dup - IL_6dd2: ldc.i4.5 - IL_6dd3: xor - IL_6dd4: call void [System.Console]System.Console::Write(int32) - IL_6dd9: dup - IL_6dda: ldc.i4.0 - IL_6ddb: mul - IL_6ddc: call void [System.Console]System.Console::Write(int32) - IL_6de1: dup - IL_6de2: ldc.i4.6 - IL_6de3: add - IL_6de4: call void [System.Console]System.Console::Write(int32) - IL_6de9: dup - IL_6dea: ldc.i4.6 - IL_6deb: shr - IL_6dec: call void [System.Console]System.Console::Write(int32) - IL_6df1: dup - IL_6df2: ldc.i4.2 - IL_6df3: sub - IL_6df4: call void [System.Console]System.Console::Write(int32) - IL_6df9: dup - IL_6dfa: ldc.i4.6 - IL_6dfb: or - IL_6dfc: call void [System.Console]System.Console::Write(int32) - IL_6e01: dup - IL_6e02: ldc.i4.8 - IL_6e03: sub - IL_6e04: call void [System.Console]System.Console::Write(int32) - IL_6e09: dup - IL_6e0a: ldc.i4.1 - IL_6e0b: shr - IL_6e0c: call void [System.Console]System.Console::Write(int32) - IL_6e11: dup - IL_6e12: ldc.i4.1 - IL_6e13: shl - IL_6e14: call void [System.Console]System.Console::Write(int32) - IL_6e19: dup - IL_6e1a: ldc.i4.3 - IL_6e1b: or - IL_6e1c: call void [System.Console]System.Console::Write(int32) - IL_6e21: dup - IL_6e22: ldc.i4.4 - IL_6e23: shl - IL_6e24: call void [System.Console]System.Console::Write(int32) - IL_6e29: dup - IL_6e2a: ldc.i4.2 - IL_6e2b: shr - IL_6e2c: call void [System.Console]System.Console::Write(int32) - IL_6e31: dup - IL_6e32: ldc.i4.0 - IL_6e33: or - IL_6e34: call void [System.Console]System.Console::Write(int32) - IL_6e39: dup - IL_6e3a: ldc.i4.1 - IL_6e3b: shl - IL_6e3c: call void [System.Console]System.Console::Write(int32) - IL_6e41: dup - IL_6e42: ldc.i4.3 - IL_6e43: sub - IL_6e44: call void [System.Console]System.Console::Write(int32) - IL_6e49: dup - IL_6e4a: ldc.i4.4 - IL_6e4b: and - IL_6e4c: call void [System.Console]System.Console::Write(int32) - IL_6e51: dup - IL_6e52: ldc.i4.0 - IL_6e53: add - IL_6e54: call void [System.Console]System.Console::Write(int32) - IL_6e59: dup - IL_6e5a: ldc.i4.5 - IL_6e5b: shr - IL_6e5c: call void [System.Console]System.Console::Write(int32) - IL_6e61: dup - IL_6e62: ldc.i4.0 - IL_6e63: xor - IL_6e64: call void [System.Console]System.Console::Write(int32) - IL_6e69: dup - IL_6e6a: ldc.i4.2 - IL_6e6b: shl - IL_6e6c: call void [System.Console]System.Console::Write(int32) - IL_6e71: dup - IL_6e72: ldc.i4.0 - IL_6e73: and - IL_6e74: call void [System.Console]System.Console::Write(int32) - IL_6e79: dup - IL_6e7a: ldc.i4.2 - IL_6e7b: or - IL_6e7c: call void [System.Console]System.Console::Write(int32) - IL_6e81: dup - IL_6e82: ldc.i4.2 - IL_6e83: and - IL_6e84: call void [System.Console]System.Console::Write(int32) - IL_6e89: dup - IL_6e8a: ldc.i4.0 - IL_6e8b: xor - IL_6e8c: call void [System.Console]System.Console::Write(int32) - IL_6e91: dup - IL_6e92: ldc.i4.6 - IL_6e93: mul - IL_6e94: call void [System.Console]System.Console::Write(int32) - IL_6e99: dup - IL_6e9a: ldc.i4.4 - IL_6e9b: and - IL_6e9c: call void [System.Console]System.Console::Write(int32) - IL_6ea1: dup - IL_6ea2: ldc.i4.4 - IL_6ea3: or - IL_6ea4: call void [System.Console]System.Console::Write(int32) - IL_6ea9: dup - IL_6eaa: ldc.i4.8 - IL_6eab: add - IL_6eac: call void [System.Console]System.Console::Write(int32) - IL_6eb1: dup - IL_6eb2: ldc.i4.1 - IL_6eb3: xor - IL_6eb4: call void [System.Console]System.Console::Write(int32) - IL_6eb9: dup - IL_6eba: ldc.i4.2 - IL_6ebb: shr - IL_6ebc: call void [System.Console]System.Console::Write(int32) - IL_6ec1: dup - IL_6ec2: ldc.i4.7 - IL_6ec3: add - IL_6ec4: call void [System.Console]System.Console::Write(int32) - IL_6ec9: dup - IL_6eca: ldc.i4.2 - IL_6ecb: add - IL_6ecc: call void [System.Console]System.Console::Write(int32) - IL_6ed1: dup - IL_6ed2: ldc.i4.5 - IL_6ed3: and - IL_6ed4: call void [System.Console]System.Console::Write(int32) - IL_6ed9: dup - IL_6eda: ldc.i4.7 - IL_6edb: and - IL_6edc: call void [System.Console]System.Console::Write(int32) - IL_6ee1: dup - IL_6ee2: ldc.i4.5 - IL_6ee3: xor - IL_6ee4: call void [System.Console]System.Console::Write(int32) - IL_6ee9: dup - IL_6eea: ldc.i4.5 - IL_6eeb: and - IL_6eec: call void [System.Console]System.Console::Write(int32) - IL_6ef1: dup - IL_6ef2: ldc.i4.2 - IL_6ef3: and - IL_6ef4: call void [System.Console]System.Console::Write(int32) - IL_6ef9: dup - IL_6efa: ldc.i4.8 - IL_6efb: shl - IL_6efc: call void [System.Console]System.Console::Write(int32) - IL_6f01: dup - IL_6f02: ldc.i4.2 - IL_6f03: mul - IL_6f04: call void [System.Console]System.Console::Write(int32) - IL_6f09: dup - IL_6f0a: ldc.i4.3 - IL_6f0b: sub - IL_6f0c: call void [System.Console]System.Console::Write(int32) - IL_6f11: dup - IL_6f12: ldc.i4.8 - IL_6f13: shr - IL_6f14: call void [System.Console]System.Console::Write(int32) - IL_6f19: dup - IL_6f1a: ldc.i4.8 - IL_6f1b: sub - IL_6f1c: call void [System.Console]System.Console::Write(int32) - IL_6f21: dup - IL_6f22: ldc.i4.6 - IL_6f23: shr - IL_6f24: call void [System.Console]System.Console::Write(int32) - IL_6f29: dup - IL_6f2a: ldc.i4.3 - IL_6f2b: sub - IL_6f2c: call void [System.Console]System.Console::Write(int32) - IL_6f31: dup - IL_6f32: ldc.i4.1 - IL_6f33: xor - IL_6f34: call void [System.Console]System.Console::Write(int32) - IL_6f39: dup - IL_6f3a: ldc.i4.4 - IL_6f3b: shr - IL_6f3c: call void [System.Console]System.Console::Write(int32) - IL_6f41: dup - IL_6f42: ldc.i4.1 - IL_6f43: shl - IL_6f44: call void [System.Console]System.Console::Write(int32) - IL_6f49: dup - IL_6f4a: ldc.i4.6 - IL_6f4b: or - IL_6f4c: call void [System.Console]System.Console::Write(int32) - IL_6f51: dup - IL_6f52: ldc.i4.5 - IL_6f53: add - IL_6f54: call void [System.Console]System.Console::Write(int32) - IL_6f59: dup - IL_6f5a: ldc.i4.2 - IL_6f5b: xor - IL_6f5c: call void [System.Console]System.Console::Write(int32) - IL_6f61: dup - IL_6f62: ldc.i4.8 - IL_6f63: sub - IL_6f64: call void [System.Console]System.Console::Write(int32) - IL_6f69: dup - IL_6f6a: ldc.i4.7 - IL_6f6b: mul - IL_6f6c: call void [System.Console]System.Console::Write(int32) - IL_6f71: dup - IL_6f72: ldc.i4.5 - IL_6f73: shr - IL_6f74: call void [System.Console]System.Console::Write(int32) - IL_6f79: dup - IL_6f7a: ldc.i4.5 - IL_6f7b: shr - IL_6f7c: call void [System.Console]System.Console::Write(int32) - IL_6f81: dup - IL_6f82: ldc.i4.8 - IL_6f83: mul - IL_6f84: call void [System.Console]System.Console::Write(int32) - IL_6f89: dup - IL_6f8a: ldc.i4.7 - IL_6f8b: and - IL_6f8c: call void [System.Console]System.Console::Write(int32) - IL_6f91: dup - IL_6f92: ldc.i4.0 - IL_6f93: or - IL_6f94: call void [System.Console]System.Console::Write(int32) - IL_6f99: dup - IL_6f9a: ldc.i4.6 - IL_6f9b: sub - IL_6f9c: call void [System.Console]System.Console::Write(int32) - IL_6fa1: dup - IL_6fa2: ldc.i4.1 - IL_6fa3: sub - IL_6fa4: call void [System.Console]System.Console::Write(int32) - IL_6fa9: dup - IL_6faa: ldc.i4.3 - IL_6fab: or - IL_6fac: call void [System.Console]System.Console::Write(int32) - IL_6fb1: dup - IL_6fb2: ldc.i4.4 - IL_6fb3: shr - IL_6fb4: call void [System.Console]System.Console::Write(int32) - IL_6fb9: dup - IL_6fba: ldc.i4.6 - IL_6fbb: add - IL_6fbc: call void [System.Console]System.Console::Write(int32) - IL_6fc1: dup - IL_6fc2: ldc.i4.7 - IL_6fc3: or - IL_6fc4: call void [System.Console]System.Console::Write(int32) - IL_6fc9: dup - IL_6fca: ldc.i4.5 - IL_6fcb: shr - IL_6fcc: call void [System.Console]System.Console::Write(int32) - IL_6fd1: dup - IL_6fd2: ldc.i4.1 - IL_6fd3: add - IL_6fd4: call void [System.Console]System.Console::Write(int32) - IL_6fd9: dup - IL_6fda: ldc.i4.0 - IL_6fdb: sub - IL_6fdc: call void [System.Console]System.Console::Write(int32) - IL_6fe1: dup - IL_6fe2: ldc.i4.0 - IL_6fe3: or - IL_6fe4: call void [System.Console]System.Console::Write(int32) - IL_6fe9: dup - IL_6fea: ldc.i4.2 - IL_6feb: shr - IL_6fec: call void [System.Console]System.Console::Write(int32) - IL_6ff1: dup - IL_6ff2: ldc.i4.8 - IL_6ff3: shl - IL_6ff4: call void [System.Console]System.Console::Write(int32) - IL_6ff9: dup - IL_6ffa: ldc.i4.4 - IL_6ffb: or - IL_6ffc: call void [System.Console]System.Console::Write(int32) - IL_7001: dup - IL_7002: ldc.i4.1 - IL_7003: shr - IL_7004: call void [System.Console]System.Console::Write(int32) - IL_7009: dup - IL_700a: ldc.i4.2 - IL_700b: and - IL_700c: call void [System.Console]System.Console::Write(int32) - IL_7011: dup - IL_7012: ldc.i4.6 - IL_7013: shr - IL_7014: call void [System.Console]System.Console::Write(int32) - IL_7019: dup - IL_701a: ldc.i4.5 - IL_701b: sub - IL_701c: call void [System.Console]System.Console::Write(int32) - IL_7021: dup - IL_7022: ldc.i4.7 - IL_7023: shl - IL_7024: call void [System.Console]System.Console::Write(int32) - IL_7029: dup - IL_702a: ldc.i4.6 - IL_702b: xor - IL_702c: call void [System.Console]System.Console::Write(int32) - IL_7031: dup - IL_7032: ldc.i4.6 - IL_7033: mul - IL_7034: call void [System.Console]System.Console::Write(int32) - IL_7039: dup - IL_703a: ldc.i4.8 - IL_703b: mul - IL_703c: call void [System.Console]System.Console::Write(int32) - IL_7041: dup - IL_7042: ldc.i4.4 - IL_7043: shr - IL_7044: call void [System.Console]System.Console::Write(int32) - IL_7049: dup - IL_704a: ldc.i4.4 - IL_704b: shr - IL_704c: call void [System.Console]System.Console::Write(int32) - IL_7051: dup - IL_7052: ldc.i4.1 - IL_7053: or - IL_7054: call void [System.Console]System.Console::Write(int32) - IL_7059: dup - IL_705a: ldc.i4.4 - IL_705b: and - IL_705c: call void [System.Console]System.Console::Write(int32) - IL_7061: dup - IL_7062: ldc.i4.2 - IL_7063: shr - IL_7064: call void [System.Console]System.Console::Write(int32) - IL_7069: dup - IL_706a: ldc.i4.6 - IL_706b: sub - IL_706c: call void [System.Console]System.Console::Write(int32) - IL_7071: dup - IL_7072: ldc.i4.6 - IL_7073: add - IL_7074: call void [System.Console]System.Console::Write(int32) - IL_7079: dup - IL_707a: ldc.i4.2 - IL_707b: shl - IL_707c: call void [System.Console]System.Console::Write(int32) - IL_7081: dup - IL_7082: ldc.i4.6 - IL_7083: xor - IL_7084: call void [System.Console]System.Console::Write(int32) - IL_7089: dup - IL_708a: ldc.i4.7 - IL_708b: and - IL_708c: call void [System.Console]System.Console::Write(int32) - IL_7091: dup - IL_7092: ldc.i4.4 - IL_7093: and - IL_7094: call void [System.Console]System.Console::Write(int32) - IL_7099: dup - IL_709a: ldc.i4.3 - IL_709b: sub - IL_709c: call void [System.Console]System.Console::Write(int32) - IL_70a1: dup - IL_70a2: ldc.i4.3 - IL_70a3: xor - IL_70a4: call void [System.Console]System.Console::Write(int32) - IL_70a9: dup - IL_70aa: ldc.i4.7 - IL_70ab: shl - IL_70ac: call void [System.Console]System.Console::Write(int32) - IL_70b1: dup - IL_70b2: ldc.i4.3 - IL_70b3: shr - IL_70b4: call void [System.Console]System.Console::Write(int32) - IL_70b9: dup - IL_70ba: ldc.i4.4 - IL_70bb: and - IL_70bc: call void [System.Console]System.Console::Write(int32) - IL_70c1: dup - IL_70c2: ldc.i4.8 - IL_70c3: add - IL_70c4: call void [System.Console]System.Console::Write(int32) - IL_70c9: dup - IL_70ca: ldc.i4.2 - IL_70cb: sub - IL_70cc: call void [System.Console]System.Console::Write(int32) - IL_70d1: dup - IL_70d2: ldc.i4.0 - IL_70d3: and - IL_70d4: call void [System.Console]System.Console::Write(int32) - IL_70d9: dup - IL_70da: ldc.i4.7 - IL_70db: sub - IL_70dc: call void [System.Console]System.Console::Write(int32) - IL_70e1: dup - IL_70e2: ldc.i4.1 - IL_70e3: xor - IL_70e4: call void [System.Console]System.Console::Write(int32) - IL_70e9: dup - IL_70ea: ldc.i4.4 - IL_70eb: add - IL_70ec: call void [System.Console]System.Console::Write(int32) - IL_70f1: dup - IL_70f2: ldc.i4.8 - IL_70f3: xor - IL_70f4: call void [System.Console]System.Console::Write(int32) - IL_70f9: dup - IL_70fa: ldc.i4.4 - IL_70fb: and - IL_70fc: call void [System.Console]System.Console::Write(int32) - IL_7101: dup - IL_7102: ldc.i4.3 - IL_7103: add - IL_7104: call void [System.Console]System.Console::Write(int32) - IL_7109: dup - IL_710a: ldc.i4.6 - IL_710b: sub - IL_710c: call void [System.Console]System.Console::Write(int32) - IL_7111: dup - IL_7112: ldc.i4.4 - IL_7113: sub - IL_7114: call void [System.Console]System.Console::Write(int32) - IL_7119: dup - IL_711a: ldc.i4.7 - IL_711b: shl - IL_711c: call void [System.Console]System.Console::Write(int32) - IL_7121: dup - IL_7122: ldc.i4.2 - IL_7123: mul - IL_7124: call void [System.Console]System.Console::Write(int32) - IL_7129: dup - IL_712a: ldc.i4.2 - IL_712b: shr - IL_712c: call void [System.Console]System.Console::Write(int32) - IL_7131: dup - IL_7132: ldc.i4.1 - IL_7133: or - IL_7134: call void [System.Console]System.Console::Write(int32) - IL_7139: dup - IL_713a: ldc.i4.4 - IL_713b: shr - IL_713c: call void [System.Console]System.Console::Write(int32) - IL_7141: dup - IL_7142: ldc.i4.1 - IL_7143: or - IL_7144: call void [System.Console]System.Console::Write(int32) - IL_7149: dup - IL_714a: ldc.i4.2 - IL_714b: shr - IL_714c: call void [System.Console]System.Console::Write(int32) - IL_7151: dup - IL_7152: ldc.i4.6 - IL_7153: add - IL_7154: call void [System.Console]System.Console::Write(int32) - IL_7159: dup - IL_715a: ldc.i4.4 - IL_715b: or - IL_715c: call void [System.Console]System.Console::Write(int32) - IL_7161: dup - IL_7162: ldc.i4.5 - IL_7163: shl - IL_7164: call void [System.Console]System.Console::Write(int32) - IL_7169: dup - IL_716a: ldc.i4.5 - IL_716b: add - IL_716c: call void [System.Console]System.Console::Write(int32) - IL_7171: dup - IL_7172: ldc.i4.3 - IL_7173: xor - IL_7174: call void [System.Console]System.Console::Write(int32) - IL_7179: dup - IL_717a: ldc.i4.2 - IL_717b: or - IL_717c: call void [System.Console]System.Console::Write(int32) - IL_7181: dup - IL_7182: ldc.i4.0 - IL_7183: or - IL_7184: call void [System.Console]System.Console::Write(int32) - IL_7189: dup - IL_718a: ldc.i4.1 - IL_718b: mul - IL_718c: call void [System.Console]System.Console::Write(int32) - IL_7191: dup - IL_7192: ldc.i4.8 - IL_7193: sub - IL_7194: call void [System.Console]System.Console::Write(int32) - IL_7199: dup - IL_719a: ldc.i4.2 - IL_719b: shr - IL_719c: call void [System.Console]System.Console::Write(int32) - IL_71a1: dup - IL_71a2: ldc.i4.1 - IL_71a3: shr - IL_71a4: call void [System.Console]System.Console::Write(int32) - IL_71a9: dup - IL_71aa: ldc.i4.7 - IL_71ab: and - IL_71ac: call void [System.Console]System.Console::Write(int32) - IL_71b1: dup - IL_71b2: ldc.i4.4 - IL_71b3: sub - IL_71b4: call void [System.Console]System.Console::Write(int32) - IL_71b9: dup - IL_71ba: ldc.i4.0 - IL_71bb: mul - IL_71bc: call void [System.Console]System.Console::Write(int32) - IL_71c1: dup - IL_71c2: ldc.i4.8 - IL_71c3: and - IL_71c4: call void [System.Console]System.Console::Write(int32) - IL_71c9: dup - IL_71ca: ldc.i4.7 - IL_71cb: or - IL_71cc: call void [System.Console]System.Console::Write(int32) - IL_71d1: dup - IL_71d2: ldc.i4.1 - IL_71d3: shr - IL_71d4: call void [System.Console]System.Console::Write(int32) - IL_71d9: dup - IL_71da: ldc.i4.0 - IL_71db: mul - IL_71dc: call void [System.Console]System.Console::Write(int32) - IL_71e1: dup - IL_71e2: ldc.i4.4 - IL_71e3: and - IL_71e4: call void [System.Console]System.Console::Write(int32) - IL_71e9: dup - IL_71ea: ldc.i4.5 - IL_71eb: or - IL_71ec: call void [System.Console]System.Console::Write(int32) - IL_71f1: dup - IL_71f2: ldc.i4.6 - IL_71f3: shr - IL_71f4: call void [System.Console]System.Console::Write(int32) - IL_71f9: dup - IL_71fa: ldc.i4.2 - IL_71fb: or - IL_71fc: call void [System.Console]System.Console::Write(int32) - IL_7201: dup - IL_7202: ldc.i4.0 - IL_7203: xor - IL_7204: call void [System.Console]System.Console::Write(int32) - IL_7209: dup - IL_720a: ldc.i4.5 - IL_720b: sub - IL_720c: call void [System.Console]System.Console::Write(int32) - IL_7211: dup - IL_7212: ldc.i4.6 - IL_7213: sub - IL_7214: call void [System.Console]System.Console::Write(int32) - IL_7219: dup - IL_721a: ldc.i4.6 - IL_721b: or - IL_721c: call void [System.Console]System.Console::Write(int32) - IL_7221: dup - IL_7222: ldc.i4.6 - IL_7223: shr - IL_7224: call void [System.Console]System.Console::Write(int32) - IL_7229: dup - IL_722a: ldc.i4.4 - IL_722b: sub - IL_722c: call void [System.Console]System.Console::Write(int32) - IL_7231: dup - IL_7232: ldc.i4.2 - IL_7233: shr - IL_7234: call void [System.Console]System.Console::Write(int32) - IL_7239: dup - IL_723a: ldc.i4.3 - IL_723b: xor - IL_723c: call void [System.Console]System.Console::Write(int32) - IL_7241: dup - IL_7242: ldc.i4.5 - IL_7243: mul - IL_7244: call void [System.Console]System.Console::Write(int32) - IL_7249: dup - IL_724a: ldc.i4.1 - IL_724b: shl - IL_724c: call void [System.Console]System.Console::Write(int32) - IL_7251: dup - IL_7252: ldc.i4.5 - IL_7253: mul - IL_7254: call void [System.Console]System.Console::Write(int32) - IL_7259: dup - IL_725a: ldc.i4.7 - IL_725b: mul - IL_725c: call void [System.Console]System.Console::Write(int32) - IL_7261: dup - IL_7262: ldc.i4.8 - IL_7263: or - IL_7264: call void [System.Console]System.Console::Write(int32) - IL_7269: dup - IL_726a: ldc.i4.6 - IL_726b: add - IL_726c: call void [System.Console]System.Console::Write(int32) - IL_7271: dup - IL_7272: ldc.i4.5 - IL_7273: mul - IL_7274: call void [System.Console]System.Console::Write(int32) - IL_7279: dup - IL_727a: ldc.i4.8 - IL_727b: xor - IL_727c: call void [System.Console]System.Console::Write(int32) - IL_7281: dup - IL_7282: ldc.i4.3 - IL_7283: or - IL_7284: call void [System.Console]System.Console::Write(int32) - IL_7289: dup - IL_728a: ldc.i4.6 - IL_728b: add - IL_728c: call void [System.Console]System.Console::Write(int32) - IL_7291: dup - IL_7292: ldc.i4.4 - IL_7293: or - IL_7294: call void [System.Console]System.Console::Write(int32) - IL_7299: dup - IL_729a: ldc.i4.4 - IL_729b: and - IL_729c: call void [System.Console]System.Console::Write(int32) - IL_72a1: dup - IL_72a2: ldc.i4.0 - IL_72a3: and - IL_72a4: call void [System.Console]System.Console::Write(int32) - IL_72a9: dup - IL_72aa: ldc.i4.1 - IL_72ab: shl - IL_72ac: call void [System.Console]System.Console::Write(int32) - IL_72b1: dup - IL_72b2: ldc.i4.1 - IL_72b3: or - IL_72b4: call void [System.Console]System.Console::Write(int32) - IL_72b9: dup - IL_72ba: ldc.i4.8 - IL_72bb: and - IL_72bc: call void [System.Console]System.Console::Write(int32) - IL_72c1: dup - IL_72c2: ldc.i4.3 - IL_72c3: sub - IL_72c4: call void [System.Console]System.Console::Write(int32) - IL_72c9: dup - IL_72ca: ldc.i4.3 - IL_72cb: xor - IL_72cc: call void [System.Console]System.Console::Write(int32) - IL_72d1: dup - IL_72d2: ldc.i4.5 - IL_72d3: shr - IL_72d4: call void [System.Console]System.Console::Write(int32) - IL_72d9: dup - IL_72da: ldc.i4.2 - IL_72db: and - IL_72dc: call void [System.Console]System.Console::Write(int32) - IL_72e1: dup - IL_72e2: ldc.i4.5 - IL_72e3: xor - IL_72e4: call void [System.Console]System.Console::Write(int32) - IL_72e9: dup - IL_72ea: ldc.i4.1 - IL_72eb: and - IL_72ec: call void [System.Console]System.Console::Write(int32) - IL_72f1: dup - IL_72f2: ldc.i4.3 - IL_72f3: shl - IL_72f4: call void [System.Console]System.Console::Write(int32) - IL_72f9: dup - IL_72fa: ldc.i4.2 - IL_72fb: xor - IL_72fc: call void [System.Console]System.Console::Write(int32) - IL_7301: dup - IL_7302: ldc.i4.5 - IL_7303: add - IL_7304: call void [System.Console]System.Console::Write(int32) - IL_7309: dup - IL_730a: ldc.i4.6 - IL_730b: mul - IL_730c: call void [System.Console]System.Console::Write(int32) - IL_7311: dup - IL_7312: ldc.i4.0 - IL_7313: mul - IL_7314: call void [System.Console]System.Console::Write(int32) - IL_7319: dup - IL_731a: ldc.i4.8 - IL_731b: shr - IL_731c: call void [System.Console]System.Console::Write(int32) - IL_7321: dup - IL_7322: ldc.i4.6 - IL_7323: mul - IL_7324: call void [System.Console]System.Console::Write(int32) - IL_7329: dup - IL_732a: ldc.i4.4 - IL_732b: and - IL_732c: call void [System.Console]System.Console::Write(int32) - IL_7331: dup - IL_7332: ldc.i4.0 - IL_7333: mul - IL_7334: call void [System.Console]System.Console::Write(int32) - IL_7339: dup - IL_733a: ldc.i4.0 - IL_733b: add - IL_733c: call void [System.Console]System.Console::Write(int32) - IL_7341: dup - IL_7342: ldc.i4.8 - IL_7343: or - IL_7344: call void [System.Console]System.Console::Write(int32) - IL_7349: dup - IL_734a: ldc.i4.6 - IL_734b: shl - IL_734c: call void [System.Console]System.Console::Write(int32) - IL_7351: dup - IL_7352: ldc.i4.0 - IL_7353: shl - IL_7354: call void [System.Console]System.Console::Write(int32) - IL_7359: dup - IL_735a: ldc.i4.7 - IL_735b: shr - IL_735c: call void [System.Console]System.Console::Write(int32) - IL_7361: dup - IL_7362: ldc.i4.5 - IL_7363: or - IL_7364: call void [System.Console]System.Console::Write(int32) - IL_7369: dup - IL_736a: ldc.i4.4 - IL_736b: sub - IL_736c: call void [System.Console]System.Console::Write(int32) - IL_7371: dup - IL_7372: ldc.i4.6 - IL_7373: and - IL_7374: call void [System.Console]System.Console::Write(int32) - IL_7379: dup - IL_737a: ldc.i4.3 - IL_737b: xor - IL_737c: call void [System.Console]System.Console::Write(int32) - IL_7381: dup - IL_7382: ldc.i4.5 - IL_7383: and - IL_7384: call void [System.Console]System.Console::Write(int32) - IL_7389: dup - IL_738a: ldc.i4.7 - IL_738b: add - IL_738c: call void [System.Console]System.Console::Write(int32) - IL_7391: dup - IL_7392: ldc.i4.1 - IL_7393: shr - IL_7394: call void [System.Console]System.Console::Write(int32) - IL_7399: dup - IL_739a: ldc.i4.7 - IL_739b: sub - IL_739c: call void [System.Console]System.Console::Write(int32) - IL_73a1: dup - IL_73a2: ldc.i4.1 - IL_73a3: shr - IL_73a4: call void [System.Console]System.Console::Write(int32) - IL_73a9: dup - IL_73aa: ldc.i4.5 - IL_73ab: mul - IL_73ac: call void [System.Console]System.Console::Write(int32) - IL_73b1: dup - IL_73b2: ldc.i4.2 - IL_73b3: shl - IL_73b4: call void [System.Console]System.Console::Write(int32) - IL_73b9: dup - IL_73ba: ldc.i4.6 - IL_73bb: mul - IL_73bc: call void [System.Console]System.Console::Write(int32) - IL_73c1: dup - IL_73c2: ldc.i4.2 - IL_73c3: sub - IL_73c4: call void [System.Console]System.Console::Write(int32) - IL_73c9: dup - IL_73ca: ldc.i4.6 - IL_73cb: xor - IL_73cc: call void [System.Console]System.Console::Write(int32) - IL_73d1: dup - IL_73d2: ldc.i4.8 - IL_73d3: and - IL_73d4: call void [System.Console]System.Console::Write(int32) - IL_73d9: dup - IL_73da: ldc.i4.3 - IL_73db: add - IL_73dc: call void [System.Console]System.Console::Write(int32) - IL_73e1: dup - IL_73e2: ldc.i4.2 - IL_73e3: add - IL_73e4: call void [System.Console]System.Console::Write(int32) - IL_73e9: dup - IL_73ea: ldc.i4.6 - IL_73eb: sub - IL_73ec: call void [System.Console]System.Console::Write(int32) - IL_73f1: dup - IL_73f2: ldc.i4.6 - IL_73f3: and - IL_73f4: call void [System.Console]System.Console::Write(int32) - IL_73f9: dup - IL_73fa: ldc.i4.8 - IL_73fb: or - IL_73fc: call void [System.Console]System.Console::Write(int32) - IL_7401: dup - IL_7402: ldc.i4.8 - IL_7403: or - IL_7404: call void [System.Console]System.Console::Write(int32) - IL_7409: dup - IL_740a: ldc.i4.1 - IL_740b: mul - IL_740c: call void [System.Console]System.Console::Write(int32) - IL_7411: dup - IL_7412: ldc.i4.3 - IL_7413: or - IL_7414: call void [System.Console]System.Console::Write(int32) - IL_7419: dup - IL_741a: ldc.i4.7 - IL_741b: mul - IL_741c: call void [System.Console]System.Console::Write(int32) - IL_7421: dup - IL_7422: ldc.i4.1 - IL_7423: shl - IL_7424: call void [System.Console]System.Console::Write(int32) - IL_7429: dup - IL_742a: ldc.i4.2 - IL_742b: mul - IL_742c: call void [System.Console]System.Console::Write(int32) - IL_7431: dup - IL_7432: ldc.i4.8 - IL_7433: shl - IL_7434: call void [System.Console]System.Console::Write(int32) - IL_7439: dup - IL_743a: ldc.i4.3 - IL_743b: sub - IL_743c: call void [System.Console]System.Console::Write(int32) - IL_7441: dup - IL_7442: ldc.i4.1 - IL_7443: sub - IL_7444: call void [System.Console]System.Console::Write(int32) - IL_7449: dup - IL_744a: ldc.i4.7 - IL_744b: shl - IL_744c: call void [System.Console]System.Console::Write(int32) - IL_7451: dup - IL_7452: ldc.i4.0 - IL_7453: or - IL_7454: call void [System.Console]System.Console::Write(int32) - IL_7459: dup - IL_745a: ldc.i4.4 - IL_745b: and - IL_745c: call void [System.Console]System.Console::Write(int32) - IL_7461: dup - IL_7462: ldc.i4.3 - IL_7463: and - IL_7464: call void [System.Console]System.Console::Write(int32) - IL_7469: dup - IL_746a: ldc.i4.8 - IL_746b: add - IL_746c: call void [System.Console]System.Console::Write(int32) - IL_7471: dup - IL_7472: ldc.i4.8 - IL_7473: shr - IL_7474: call void [System.Console]System.Console::Write(int32) - IL_7479: dup - IL_747a: ldc.i4.3 - IL_747b: xor - IL_747c: call void [System.Console]System.Console::Write(int32) - IL_7481: dup - IL_7482: ldc.i4.6 - IL_7483: shr - IL_7484: call void [System.Console]System.Console::Write(int32) - IL_7489: dup - IL_748a: ldc.i4.3 - IL_748b: mul - IL_748c: call void [System.Console]System.Console::Write(int32) - IL_7491: dup - IL_7492: ldc.i4.2 - IL_7493: xor - IL_7494: call void [System.Console]System.Console::Write(int32) - IL_7499: dup - IL_749a: ldc.i4.8 - IL_749b: mul - IL_749c: call void [System.Console]System.Console::Write(int32) - IL_74a1: dup - IL_74a2: ldc.i4.2 - IL_74a3: xor - IL_74a4: call void [System.Console]System.Console::Write(int32) - IL_74a9: dup - IL_74aa: ldc.i4.2 - IL_74ab: mul - IL_74ac: call void [System.Console]System.Console::Write(int32) - IL_74b1: dup - IL_74b2: ldc.i4.4 - IL_74b3: add - IL_74b4: call void [System.Console]System.Console::Write(int32) - IL_74b9: dup - IL_74ba: ldc.i4.0 - IL_74bb: shr - IL_74bc: call void [System.Console]System.Console::Write(int32) - IL_74c1: dup - IL_74c2: ldc.i4.6 - IL_74c3: shl - IL_74c4: call void [System.Console]System.Console::Write(int32) - IL_74c9: dup - IL_74ca: ldc.i4.8 - IL_74cb: shl - IL_74cc: call void [System.Console]System.Console::Write(int32) - IL_74d1: dup - IL_74d2: ldc.i4.8 - IL_74d3: xor - IL_74d4: call void [System.Console]System.Console::Write(int32) - IL_74d9: dup - IL_74da: ldc.i4.8 - IL_74db: or - IL_74dc: call void [System.Console]System.Console::Write(int32) - IL_74e1: dup - IL_74e2: ldc.i4.4 - IL_74e3: xor - IL_74e4: call void [System.Console]System.Console::Write(int32) - IL_74e9: dup - IL_74ea: ldc.i4.7 - IL_74eb: shl - IL_74ec: call void [System.Console]System.Console::Write(int32) - IL_74f1: dup - IL_74f2: ldc.i4.0 - IL_74f3: and - IL_74f4: call void [System.Console]System.Console::Write(int32) - IL_74f9: dup - IL_74fa: ldc.i4.3 - IL_74fb: xor - IL_74fc: call void [System.Console]System.Console::Write(int32) - IL_7501: dup - IL_7502: ldc.i4.1 - IL_7503: or - IL_7504: call void [System.Console]System.Console::Write(int32) - IL_7509: dup - IL_750a: ldc.i4.5 - IL_750b: mul - IL_750c: call void [System.Console]System.Console::Write(int32) - IL_7511: dup - IL_7512: ldc.i4.1 - IL_7513: sub - IL_7514: call void [System.Console]System.Console::Write(int32) - IL_7519: dup - IL_751a: ldc.i4.7 - IL_751b: shr - IL_751c: call void [System.Console]System.Console::Write(int32) - IL_7521: dup - IL_7522: ldc.i4.2 - IL_7523: shl - IL_7524: call void [System.Console]System.Console::Write(int32) - IL_7529: dup - IL_752a: ldc.i4.2 - IL_752b: shl - IL_752c: call void [System.Console]System.Console::Write(int32) - IL_7531: dup - IL_7532: ldc.i4.6 - IL_7533: sub - IL_7534: call void [System.Console]System.Console::Write(int32) - IL_7539: dup - IL_753a: ldc.i4.2 - IL_753b: mul - IL_753c: call void [System.Console]System.Console::Write(int32) - IL_7541: dup - IL_7542: ldc.i4.6 - IL_7543: sub - IL_7544: call void [System.Console]System.Console::Write(int32) - IL_7549: dup - IL_754a: ldc.i4.3 - IL_754b: xor - IL_754c: call void [System.Console]System.Console::Write(int32) - IL_7551: dup - IL_7552: ldc.i4.5 - IL_7553: and - IL_7554: call void [System.Console]System.Console::Write(int32) - IL_7559: dup - IL_755a: ldc.i4.4 - IL_755b: mul - IL_755c: call void [System.Console]System.Console::Write(int32) - IL_7561: dup - IL_7562: ldc.i4.6 - IL_7563: xor - IL_7564: call void [System.Console]System.Console::Write(int32) - IL_7569: dup - IL_756a: ldc.i4.7 - IL_756b: or - IL_756c: call void [System.Console]System.Console::Write(int32) - IL_7571: dup - IL_7572: ldc.i4.5 - IL_7573: mul - IL_7574: call void [System.Console]System.Console::Write(int32) - IL_7579: dup - IL_757a: ldc.i4.2 - IL_757b: xor - IL_757c: call void [System.Console]System.Console::Write(int32) - IL_7581: dup - IL_7582: ldc.i4.0 - IL_7583: and - IL_7584: call void [System.Console]System.Console::Write(int32) - IL_7589: dup - IL_758a: ldc.i4.1 - IL_758b: shl - IL_758c: call void [System.Console]System.Console::Write(int32) - IL_7591: dup - IL_7592: ldc.i4.4 - IL_7593: shr - IL_7594: call void [System.Console]System.Console::Write(int32) - IL_7599: dup - IL_759a: ldc.i4.4 - IL_759b: shl - IL_759c: call void [System.Console]System.Console::Write(int32) - IL_75a1: dup - IL_75a2: ldc.i4.6 - IL_75a3: mul - IL_75a4: call void [System.Console]System.Console::Write(int32) - IL_75a9: dup - IL_75aa: ldc.i4.3 - IL_75ab: xor - IL_75ac: call void [System.Console]System.Console::Write(int32) - IL_75b1: dup - IL_75b2: ldc.i4.1 - IL_75b3: mul - IL_75b4: call void [System.Console]System.Console::Write(int32) - IL_75b9: dup - IL_75ba: ldc.i4.1 - IL_75bb: mul - IL_75bc: call void [System.Console]System.Console::Write(int32) - IL_75c1: dup - IL_75c2: ldc.i4.1 - IL_75c3: shl - IL_75c4: call void [System.Console]System.Console::Write(int32) - IL_75c9: dup - IL_75ca: ldc.i4.7 - IL_75cb: and - IL_75cc: call void [System.Console]System.Console::Write(int32) - IL_75d1: dup - IL_75d2: ldc.i4.4 - IL_75d3: or - IL_75d4: call void [System.Console]System.Console::Write(int32) - IL_75d9: dup - IL_75da: ldc.i4.7 - IL_75db: mul - IL_75dc: call void [System.Console]System.Console::Write(int32) - IL_75e1: dup - IL_75e2: ldc.i4.3 - IL_75e3: mul - IL_75e4: call void [System.Console]System.Console::Write(int32) - IL_75e9: dup - IL_75ea: ldc.i4.5 - IL_75eb: shr - IL_75ec: call void [System.Console]System.Console::Write(int32) - IL_75f1: dup - IL_75f2: ldc.i4.2 - IL_75f3: or - IL_75f4: call void [System.Console]System.Console::Write(int32) - IL_75f9: dup - IL_75fa: ldc.i4.0 - IL_75fb: or - IL_75fc: call void [System.Console]System.Console::Write(int32) - IL_7601: dup - IL_7602: ldc.i4.2 - IL_7603: and - IL_7604: call void [System.Console]System.Console::Write(int32) - IL_7609: dup - IL_760a: ldc.i4.5 - IL_760b: or - IL_760c: call void [System.Console]System.Console::Write(int32) - IL_7611: dup - IL_7612: ldc.i4.8 - IL_7613: shr - IL_7614: call void [System.Console]System.Console::Write(int32) - IL_7619: dup - IL_761a: ldc.i4.7 - IL_761b: add - IL_761c: call void [System.Console]System.Console::Write(int32) - IL_7621: dup - IL_7622: ldc.i4.6 - IL_7623: and - IL_7624: call void [System.Console]System.Console::Write(int32) - IL_7629: dup - IL_762a: ldc.i4.5 - IL_762b: mul - IL_762c: call void [System.Console]System.Console::Write(int32) - IL_7631: dup - IL_7632: ldc.i4.4 - IL_7633: add - IL_7634: call void [System.Console]System.Console::Write(int32) - IL_7639: dup - IL_763a: ldc.i4.1 - IL_763b: mul - IL_763c: call void [System.Console]System.Console::Write(int32) - IL_7641: dup - IL_7642: ldc.i4.2 - IL_7643: shl - IL_7644: call void [System.Console]System.Console::Write(int32) - IL_7649: dup - IL_764a: ldc.i4.6 - IL_764b: add - IL_764c: call void [System.Console]System.Console::Write(int32) - IL_7651: dup - IL_7652: ldc.i4.4 - IL_7653: xor - IL_7654: call void [System.Console]System.Console::Write(int32) - IL_7659: dup - IL_765a: ldc.i4.0 - IL_765b: add - IL_765c: call void [System.Console]System.Console::Write(int32) - IL_7661: dup - IL_7662: ldc.i4.8 - IL_7663: and - IL_7664: call void [System.Console]System.Console::Write(int32) - IL_7669: dup - IL_766a: ldc.i4.1 - IL_766b: sub - IL_766c: call void [System.Console]System.Console::Write(int32) - IL_7671: dup - IL_7672: ldc.i4.0 - IL_7673: and - IL_7674: call void [System.Console]System.Console::Write(int32) - IL_7679: dup - IL_767a: ldc.i4.2 - IL_767b: and - IL_767c: call void [System.Console]System.Console::Write(int32) - IL_7681: dup - IL_7682: ldc.i4.2 - IL_7683: xor - IL_7684: call void [System.Console]System.Console::Write(int32) - IL_7689: dup - IL_768a: ldc.i4.1 - IL_768b: xor - IL_768c: call void [System.Console]System.Console::Write(int32) - IL_7691: dup - IL_7692: ldc.i4.7 - IL_7693: sub - IL_7694: call void [System.Console]System.Console::Write(int32) - IL_7699: dup - IL_769a: ldc.i4.3 - IL_769b: shl - IL_769c: call void [System.Console]System.Console::Write(int32) - IL_76a1: dup - IL_76a2: ldc.i4.6 - IL_76a3: and - IL_76a4: call void [System.Console]System.Console::Write(int32) - IL_76a9: dup - IL_76aa: ldc.i4.1 - IL_76ab: shr - IL_76ac: call void [System.Console]System.Console::Write(int32) - IL_76b1: dup - IL_76b2: ldc.i4.3 - IL_76b3: shl - IL_76b4: call void [System.Console]System.Console::Write(int32) - IL_76b9: dup - IL_76ba: ldc.i4.8 - IL_76bb: xor - IL_76bc: call void [System.Console]System.Console::Write(int32) - IL_76c1: dup - IL_76c2: ldc.i4.1 - IL_76c3: mul - IL_76c4: call void [System.Console]System.Console::Write(int32) - IL_76c9: dup - IL_76ca: ldc.i4.3 - IL_76cb: and - IL_76cc: call void [System.Console]System.Console::Write(int32) - IL_76d1: dup - IL_76d2: ldc.i4.1 - IL_76d3: or - IL_76d4: call void [System.Console]System.Console::Write(int32) - IL_76d9: dup - IL_76da: ldc.i4.4 - IL_76db: or - IL_76dc: call void [System.Console]System.Console::Write(int32) - IL_76e1: dup - IL_76e2: ldc.i4.7 - IL_76e3: shl - IL_76e4: call void [System.Console]System.Console::Write(int32) - IL_76e9: dup - IL_76ea: ldc.i4.8 - IL_76eb: sub - IL_76ec: call void [System.Console]System.Console::Write(int32) - IL_76f1: dup - IL_76f2: ldc.i4.4 - IL_76f3: shl - IL_76f4: call void [System.Console]System.Console::Write(int32) - IL_76f9: dup - IL_76fa: ldc.i4.8 - IL_76fb: and - IL_76fc: call void [System.Console]System.Console::Write(int32) - IL_7701: dup - IL_7702: ldc.i4.5 - IL_7703: and - IL_7704: call void [System.Console]System.Console::Write(int32) - IL_7709: dup - IL_770a: ldc.i4.8 - IL_770b: add - IL_770c: call void [System.Console]System.Console::Write(int32) - IL_7711: dup - IL_7712: ldc.i4.8 - IL_7713: and - IL_7714: call void [System.Console]System.Console::Write(int32) - IL_7719: dup - IL_771a: ldc.i4.4 - IL_771b: add - IL_771c: call void [System.Console]System.Console::Write(int32) - IL_7721: dup - IL_7722: ldc.i4.1 - IL_7723: sub - IL_7724: call void [System.Console]System.Console::Write(int32) - IL_7729: dup - IL_772a: ldc.i4.2 - IL_772b: shl - IL_772c: call void [System.Console]System.Console::Write(int32) - IL_7731: dup - IL_7732: ldc.i4.1 - IL_7733: xor - IL_7734: call void [System.Console]System.Console::Write(int32) - IL_7739: dup - IL_773a: ldc.i4.5 - IL_773b: xor - IL_773c: call void [System.Console]System.Console::Write(int32) - IL_7741: dup - IL_7742: ldc.i4.8 - IL_7743: and - IL_7744: call void [System.Console]System.Console::Write(int32) - IL_7749: dup - IL_774a: ldc.i4.0 - IL_774b: shr - IL_774c: call void [System.Console]System.Console::Write(int32) - IL_7751: dup - IL_7752: ldc.i4.3 - IL_7753: xor - IL_7754: call void [System.Console]System.Console::Write(int32) - IL_7759: dup - IL_775a: ldc.i4.5 - IL_775b: mul - IL_775c: call void [System.Console]System.Console::Write(int32) - IL_7761: dup - IL_7762: ldc.i4.8 - IL_7763: sub - IL_7764: call void [System.Console]System.Console::Write(int32) - IL_7769: dup - IL_776a: ldc.i4.5 - IL_776b: sub - IL_776c: call void [System.Console]System.Console::Write(int32) - IL_7771: dup - IL_7772: ldc.i4.2 - IL_7773: sub - IL_7774: call void [System.Console]System.Console::Write(int32) - IL_7779: dup - IL_777a: ldc.i4.0 - IL_777b: sub - IL_777c: call void [System.Console]System.Console::Write(int32) - IL_7781: dup - IL_7782: ldc.i4.8 - IL_7783: mul - IL_7784: call void [System.Console]System.Console::Write(int32) - IL_7789: dup - IL_778a: ldc.i4.0 - IL_778b: shl - IL_778c: call void [System.Console]System.Console::Write(int32) - IL_7791: dup - IL_7792: ldc.i4.4 - IL_7793: and - IL_7794: call void [System.Console]System.Console::Write(int32) - IL_7799: dup - IL_779a: ldc.i4.4 - IL_779b: xor - IL_779c: call void [System.Console]System.Console::Write(int32) - IL_77a1: dup - IL_77a2: ldc.i4.7 - IL_77a3: mul - IL_77a4: call void [System.Console]System.Console::Write(int32) - IL_77a9: dup - IL_77aa: ldc.i4.5 - IL_77ab: add - IL_77ac: call void [System.Console]System.Console::Write(int32) - IL_77b1: dup - IL_77b2: ldc.i4.5 - IL_77b3: and - IL_77b4: call void [System.Console]System.Console::Write(int32) - IL_77b9: dup - IL_77ba: ldc.i4.6 - IL_77bb: xor - IL_77bc: call void [System.Console]System.Console::Write(int32) - IL_77c1: dup - IL_77c2: ldc.i4.7 - IL_77c3: shl - IL_77c4: call void [System.Console]System.Console::Write(int32) - IL_77c9: dup - IL_77ca: ldc.i4.1 - IL_77cb: shr - IL_77cc: call void [System.Console]System.Console::Write(int32) - IL_77d1: dup - IL_77d2: ldc.i4.4 - IL_77d3: sub - IL_77d4: call void [System.Console]System.Console::Write(int32) - IL_77d9: dup - IL_77da: ldc.i4.3 - IL_77db: sub - IL_77dc: call void [System.Console]System.Console::Write(int32) - IL_77e1: dup - IL_77e2: ldc.i4.0 - IL_77e3: shl - IL_77e4: call void [System.Console]System.Console::Write(int32) - IL_77e9: dup - IL_77ea: ldc.i4.1 - IL_77eb: shr - IL_77ec: call void [System.Console]System.Console::Write(int32) - IL_77f1: dup - IL_77f2: ldc.i4.1 - IL_77f3: mul - IL_77f4: call void [System.Console]System.Console::Write(int32) - IL_77f9: dup - IL_77fa: ldc.i4.7 - IL_77fb: or - IL_77fc: call void [System.Console]System.Console::Write(int32) - IL_7801: dup - IL_7802: ldc.i4.0 - IL_7803: sub - IL_7804: call void [System.Console]System.Console::Write(int32) - IL_7809: dup - IL_780a: ldc.i4.6 - IL_780b: and - IL_780c: call void [System.Console]System.Console::Write(int32) - IL_7811: dup - IL_7812: ldc.i4.2 - IL_7813: add - IL_7814: call void [System.Console]System.Console::Write(int32) - IL_7819: dup - IL_781a: ldc.i4.7 - IL_781b: add - IL_781c: call void [System.Console]System.Console::Write(int32) - IL_7821: dup - IL_7822: ldc.i4.2 - IL_7823: shr - IL_7824: call void [System.Console]System.Console::Write(int32) - IL_7829: dup - IL_782a: ldc.i4.8 - IL_782b: add - IL_782c: call void [System.Console]System.Console::Write(int32) - IL_7831: dup - IL_7832: ldc.i4.6 - IL_7833: shr - IL_7834: call void [System.Console]System.Console::Write(int32) - IL_7839: dup - IL_783a: ldc.i4.6 - IL_783b: add - IL_783c: call void [System.Console]System.Console::Write(int32) - IL_7841: dup - IL_7842: ldc.i4.4 - IL_7843: sub - IL_7844: call void [System.Console]System.Console::Write(int32) - IL_7849: dup - IL_784a: ldc.i4.3 - IL_784b: shr - IL_784c: call void [System.Console]System.Console::Write(int32) - IL_7851: dup - IL_7852: ldc.i4.8 - IL_7853: xor - IL_7854: call void [System.Console]System.Console::Write(int32) - IL_7859: dup - IL_785a: ldc.i4.5 - IL_785b: shr - IL_785c: call void [System.Console]System.Console::Write(int32) - IL_7861: dup - IL_7862: ldc.i4.8 - IL_7863: and - IL_7864: call void [System.Console]System.Console::Write(int32) - IL_7869: dup - IL_786a: ldc.i4.4 - IL_786b: or - IL_786c: call void [System.Console]System.Console::Write(int32) - IL_7871: dup - IL_7872: ldc.i4.6 - IL_7873: and - IL_7874: call void [System.Console]System.Console::Write(int32) - IL_7879: dup - IL_787a: ldc.i4.1 - IL_787b: xor - IL_787c: call void [System.Console]System.Console::Write(int32) - IL_7881: dup - IL_7882: ldc.i4.5 - IL_7883: shr - IL_7884: call void [System.Console]System.Console::Write(int32) - IL_7889: dup - IL_788a: ldc.i4.8 - IL_788b: xor - IL_788c: call void [System.Console]System.Console::Write(int32) - IL_7891: dup - IL_7892: ldc.i4.1 - IL_7893: and - IL_7894: call void [System.Console]System.Console::Write(int32) - IL_7899: dup - IL_789a: ldc.i4.0 - IL_789b: and - IL_789c: call void [System.Console]System.Console::Write(int32) - IL_78a1: dup - IL_78a2: ldc.i4.6 - IL_78a3: sub - IL_78a4: call void [System.Console]System.Console::Write(int32) - IL_78a9: dup - IL_78aa: ldc.i4.2 - IL_78ab: or - IL_78ac: call void [System.Console]System.Console::Write(int32) - IL_78b1: dup - IL_78b2: ldc.i4.2 - IL_78b3: mul - IL_78b4: call void [System.Console]System.Console::Write(int32) - IL_78b9: dup - IL_78ba: ldc.i4.3 - IL_78bb: xor - IL_78bc: call void [System.Console]System.Console::Write(int32) - IL_78c1: dup - IL_78c2: ldc.i4.8 - IL_78c3: add - IL_78c4: call void [System.Console]System.Console::Write(int32) - IL_78c9: dup - IL_78ca: ldc.i4.0 - IL_78cb: or - IL_78cc: call void [System.Console]System.Console::Write(int32) - IL_78d1: dup - IL_78d2: ldc.i4.8 - IL_78d3: add - IL_78d4: call void [System.Console]System.Console::Write(int32) - IL_78d9: dup - IL_78da: ldc.i4.8 - IL_78db: shr - IL_78dc: call void [System.Console]System.Console::Write(int32) - IL_78e1: dup - IL_78e2: ldc.i4.5 - IL_78e3: add - IL_78e4: call void [System.Console]System.Console::Write(int32) - IL_78e9: dup - IL_78ea: ldc.i4.8 - IL_78eb: xor - IL_78ec: call void [System.Console]System.Console::Write(int32) - IL_78f1: dup - IL_78f2: ldc.i4.5 - IL_78f3: or - IL_78f4: call void [System.Console]System.Console::Write(int32) - IL_78f9: dup - IL_78fa: ldc.i4.3 - IL_78fb: xor - IL_78fc: call void [System.Console]System.Console::Write(int32) - IL_7901: dup - IL_7902: ldc.i4.4 - IL_7903: xor - IL_7904: call void [System.Console]System.Console::Write(int32) - IL_7909: dup - IL_790a: ldc.i4.4 - IL_790b: add - IL_790c: call void [System.Console]System.Console::Write(int32) - IL_7911: dup - IL_7912: ldc.i4.6 - IL_7913: sub - IL_7914: call void [System.Console]System.Console::Write(int32) - IL_7919: dup - IL_791a: ldc.i4.8 - IL_791b: shr - IL_791c: call void [System.Console]System.Console::Write(int32) - IL_7921: dup - IL_7922: ldc.i4.1 - IL_7923: shl - IL_7924: call void [System.Console]System.Console::Write(int32) - IL_7929: dup - IL_792a: ldc.i4.8 - IL_792b: and - IL_792c: call void [System.Console]System.Console::Write(int32) - IL_7931: dup - IL_7932: ldc.i4.1 - IL_7933: shr - IL_7934: call void [System.Console]System.Console::Write(int32) - IL_7939: dup - IL_793a: ldc.i4.3 - IL_793b: shl - IL_793c: call void [System.Console]System.Console::Write(int32) - IL_7941: dup - IL_7942: ldc.i4.3 - IL_7943: add - IL_7944: call void [System.Console]System.Console::Write(int32) - IL_7949: dup - IL_794a: ldc.i4.0 - IL_794b: shr - IL_794c: call void [System.Console]System.Console::Write(int32) - IL_7951: dup - IL_7952: ldc.i4.6 - IL_7953: sub - IL_7954: call void [System.Console]System.Console::Write(int32) - IL_7959: dup - IL_795a: ldc.i4.4 - IL_795b: xor - IL_795c: call void [System.Console]System.Console::Write(int32) - IL_7961: dup - IL_7962: ldc.i4.6 - IL_7963: sub - IL_7964: call void [System.Console]System.Console::Write(int32) - IL_7969: dup - IL_796a: ldc.i4.7 - IL_796b: add - IL_796c: call void [System.Console]System.Console::Write(int32) - IL_7971: dup - IL_7972: ldc.i4.8 - IL_7973: shl - IL_7974: call void [System.Console]System.Console::Write(int32) - IL_7979: dup - IL_797a: ldc.i4.2 - IL_797b: shr - IL_797c: call void [System.Console]System.Console::Write(int32) - IL_7981: dup - IL_7982: ldc.i4.7 - IL_7983: and - IL_7984: call void [System.Console]System.Console::Write(int32) - IL_7989: dup - IL_798a: ldc.i4.3 - IL_798b: and - IL_798c: call void [System.Console]System.Console::Write(int32) - IL_7991: dup - IL_7992: ldc.i4.7 - IL_7993: xor - IL_7994: call void [System.Console]System.Console::Write(int32) - IL_7999: dup - IL_799a: ldc.i4.6 - IL_799b: shr - IL_799c: call void [System.Console]System.Console::Write(int32) - IL_79a1: dup - IL_79a2: ldc.i4.1 - IL_79a3: xor - IL_79a4: call void [System.Console]System.Console::Write(int32) - IL_79a9: dup - IL_79aa: ldc.i4.7 - IL_79ab: xor - IL_79ac: call void [System.Console]System.Console::Write(int32) - IL_79b1: dup - IL_79b2: ldc.i4.1 - IL_79b3: add - IL_79b4: call void [System.Console]System.Console::Write(int32) - IL_79b9: dup - IL_79ba: ldc.i4.5 - IL_79bb: or - IL_79bc: call void [System.Console]System.Console::Write(int32) - IL_79c1: dup - IL_79c2: ldc.i4.6 - IL_79c3: mul - IL_79c4: call void [System.Console]System.Console::Write(int32) - IL_79c9: dup - IL_79ca: ldc.i4.0 - IL_79cb: shl - IL_79cc: call void [System.Console]System.Console::Write(int32) - IL_79d1: dup - IL_79d2: ldc.i4.8 - IL_79d3: shr - IL_79d4: call void [System.Console]System.Console::Write(int32) - IL_79d9: dup - IL_79da: ldc.i4.6 - IL_79db: sub - IL_79dc: call void [System.Console]System.Console::Write(int32) - IL_79e1: dup - IL_79e2: ldc.i4.8 - IL_79e3: add - IL_79e4: call void [System.Console]System.Console::Write(int32) - IL_79e9: dup - IL_79ea: ldc.i4.2 - IL_79eb: shl - IL_79ec: call void [System.Console]System.Console::Write(int32) - IL_79f1: dup - IL_79f2: ldc.i4.3 - IL_79f3: and - IL_79f4: call void [System.Console]System.Console::Write(int32) - IL_79f9: dup - IL_79fa: ldc.i4.6 - IL_79fb: shl - IL_79fc: call void [System.Console]System.Console::Write(int32) - IL_7a01: dup - IL_7a02: ldc.i4.2 - IL_7a03: mul - IL_7a04: call void [System.Console]System.Console::Write(int32) - IL_7a09: dup - IL_7a0a: ldc.i4.0 - IL_7a0b: mul - IL_7a0c: call void [System.Console]System.Console::Write(int32) - IL_7a11: dup - IL_7a12: ldc.i4.2 - IL_7a13: shl - IL_7a14: call void [System.Console]System.Console::Write(int32) - IL_7a19: dup - IL_7a1a: ldc.i4.7 - IL_7a1b: add - IL_7a1c: call void [System.Console]System.Console::Write(int32) - IL_7a21: dup - IL_7a22: ldc.i4.2 - IL_7a23: mul - IL_7a24: call void [System.Console]System.Console::Write(int32) - IL_7a29: dup - IL_7a2a: ldc.i4.4 - IL_7a2b: mul - IL_7a2c: call void [System.Console]System.Console::Write(int32) - IL_7a31: dup - IL_7a32: ldc.i4.3 - IL_7a33: add - IL_7a34: call void [System.Console]System.Console::Write(int32) - IL_7a39: dup - IL_7a3a: ldc.i4.2 - IL_7a3b: shr - IL_7a3c: call void [System.Console]System.Console::Write(int32) - IL_7a41: dup - IL_7a42: ldc.i4.5 - IL_7a43: or - IL_7a44: call void [System.Console]System.Console::Write(int32) - IL_7a49: dup - IL_7a4a: ldc.i4.3 - IL_7a4b: shr - IL_7a4c: call void [System.Console]System.Console::Write(int32) - IL_7a51: dup - IL_7a52: ldc.i4.5 - IL_7a53: shr - IL_7a54: call void [System.Console]System.Console::Write(int32) - IL_7a59: dup - IL_7a5a: ldc.i4.7 - IL_7a5b: sub - IL_7a5c: call void [System.Console]System.Console::Write(int32) - IL_7a61: dup - IL_7a62: ldc.i4.0 - IL_7a63: sub - IL_7a64: call void [System.Console]System.Console::Write(int32) - IL_7a69: dup - IL_7a6a: ldc.i4.7 - IL_7a6b: shr - IL_7a6c: call void [System.Console]System.Console::Write(int32) - IL_7a71: dup - IL_7a72: ldc.i4.1 - IL_7a73: sub - IL_7a74: call void [System.Console]System.Console::Write(int32) - IL_7a79: dup - IL_7a7a: ldc.i4.2 - IL_7a7b: mul - IL_7a7c: call void [System.Console]System.Console::Write(int32) - IL_7a81: dup - IL_7a82: ldc.i4.6 - IL_7a83: mul - IL_7a84: call void [System.Console]System.Console::Write(int32) - IL_7a89: dup - IL_7a8a: ldc.i4.0 - IL_7a8b: and - IL_7a8c: call void [System.Console]System.Console::Write(int32) - IL_7a91: dup - IL_7a92: ldc.i4.0 - IL_7a93: mul - IL_7a94: call void [System.Console]System.Console::Write(int32) - IL_7a99: dup - IL_7a9a: ldc.i4.5 - IL_7a9b: add - IL_7a9c: call void [System.Console]System.Console::Write(int32) - IL_7aa1: dup - IL_7aa2: ldc.i4.4 - IL_7aa3: add - IL_7aa4: call void [System.Console]System.Console::Write(int32) - IL_7aa9: dup - IL_7aaa: ldc.i4.2 - IL_7aab: shl - IL_7aac: call void [System.Console]System.Console::Write(int32) - IL_7ab1: dup - IL_7ab2: ldc.i4.1 - IL_7ab3: xor - IL_7ab4: call void [System.Console]System.Console::Write(int32) - IL_7ab9: dup - IL_7aba: ldc.i4.7 - IL_7abb: or - IL_7abc: call void [System.Console]System.Console::Write(int32) - IL_7ac1: dup - IL_7ac2: ldc.i4.6 - IL_7ac3: shl - IL_7ac4: call void [System.Console]System.Console::Write(int32) - IL_7ac9: dup - IL_7aca: ldc.i4.7 - IL_7acb: mul - IL_7acc: call void [System.Console]System.Console::Write(int32) - IL_7ad1: dup - IL_7ad2: ldc.i4.3 - IL_7ad3: add - IL_7ad4: call void [System.Console]System.Console::Write(int32) - IL_7ad9: dup - IL_7ada: ldc.i4.8 - IL_7adb: shr - IL_7adc: call void [System.Console]System.Console::Write(int32) - IL_7ae1: dup - IL_7ae2: ldc.i4.4 - IL_7ae3: or - IL_7ae4: call void [System.Console]System.Console::Write(int32) - IL_7ae9: dup - IL_7aea: ldc.i4.1 - IL_7aeb: add - IL_7aec: call void [System.Console]System.Console::Write(int32) - IL_7af1: dup - IL_7af2: ldc.i4.6 - IL_7af3: add - IL_7af4: call void [System.Console]System.Console::Write(int32) - IL_7af9: dup - IL_7afa: ldc.i4.7 - IL_7afb: sub - IL_7afc: call void [System.Console]System.Console::Write(int32) - IL_7b01: dup - IL_7b02: ldc.i4.0 - IL_7b03: sub - IL_7b04: call void [System.Console]System.Console::Write(int32) - IL_7b09: dup - IL_7b0a: ldc.i4.5 - IL_7b0b: or - IL_7b0c: call void [System.Console]System.Console::Write(int32) - IL_7b11: dup - IL_7b12: ldc.i4.8 - IL_7b13: xor - IL_7b14: call void [System.Console]System.Console::Write(int32) - IL_7b19: dup - IL_7b1a: ldc.i4.5 - IL_7b1b: mul - IL_7b1c: call void [System.Console]System.Console::Write(int32) - IL_7b21: dup - IL_7b22: ldc.i4.3 - IL_7b23: mul - IL_7b24: call void [System.Console]System.Console::Write(int32) - IL_7b29: dup - IL_7b2a: ldc.i4.1 - IL_7b2b: shl - IL_7b2c: call void [System.Console]System.Console::Write(int32) - IL_7b31: dup - IL_7b32: ldc.i4.4 - IL_7b33: sub - IL_7b34: call void [System.Console]System.Console::Write(int32) - IL_7b39: dup - IL_7b3a: ldc.i4.8 - IL_7b3b: shr - IL_7b3c: call void [System.Console]System.Console::Write(int32) - IL_7b41: dup - IL_7b42: ldc.i4.2 - IL_7b43: or - IL_7b44: call void [System.Console]System.Console::Write(int32) - IL_7b49: dup - IL_7b4a: ldc.i4.8 - IL_7b4b: shl - IL_7b4c: call void [System.Console]System.Console::Write(int32) - IL_7b51: dup - IL_7b52: ldc.i4.2 - IL_7b53: or - IL_7b54: call void [System.Console]System.Console::Write(int32) - IL_7b59: dup - IL_7b5a: ldc.i4.0 - IL_7b5b: shr - IL_7b5c: call void [System.Console]System.Console::Write(int32) - IL_7b61: dup - IL_7b62: ldc.i4.3 - IL_7b63: xor - IL_7b64: call void [System.Console]System.Console::Write(int32) - IL_7b69: dup - IL_7b6a: ldc.i4.3 - IL_7b6b: sub - IL_7b6c: call void [System.Console]System.Console::Write(int32) - IL_7b71: dup - IL_7b72: ldc.i4.0 - IL_7b73: shl - IL_7b74: call void [System.Console]System.Console::Write(int32) - IL_7b79: dup - IL_7b7a: ldc.i4.3 - IL_7b7b: xor - IL_7b7c: call void [System.Console]System.Console::Write(int32) - IL_7b81: dup - IL_7b82: ldc.i4.1 - IL_7b83: add - IL_7b84: call void [System.Console]System.Console::Write(int32) - IL_7b89: dup - IL_7b8a: ldc.i4.4 - IL_7b8b: add - IL_7b8c: call void [System.Console]System.Console::Write(int32) - IL_7b91: dup - IL_7b92: ldc.i4.8 - IL_7b93: and - IL_7b94: call void [System.Console]System.Console::Write(int32) - IL_7b99: dup - IL_7b9a: ldc.i4.8 - IL_7b9b: mul - IL_7b9c: call void [System.Console]System.Console::Write(int32) - IL_7ba1: dup - IL_7ba2: ldc.i4.0 - IL_7ba3: xor - IL_7ba4: call void [System.Console]System.Console::Write(int32) - IL_7ba9: dup - IL_7baa: ldc.i4.0 - IL_7bab: add - IL_7bac: call void [System.Console]System.Console::Write(int32) - IL_7bb1: dup - IL_7bb2: ldc.i4.7 - IL_7bb3: mul - IL_7bb4: call void [System.Console]System.Console::Write(int32) - IL_7bb9: dup - IL_7bba: ldc.i4.1 - IL_7bbb: mul - IL_7bbc: call void [System.Console]System.Console::Write(int32) - IL_7bc1: dup - IL_7bc2: ldc.i4.8 - IL_7bc3: shl - IL_7bc4: call void [System.Console]System.Console::Write(int32) - IL_7bc9: dup - IL_7bca: ldc.i4.6 - IL_7bcb: and - IL_7bcc: call void [System.Console]System.Console::Write(int32) - IL_7bd1: dup - IL_7bd2: ldc.i4.0 - IL_7bd3: mul - IL_7bd4: call void [System.Console]System.Console::Write(int32) - IL_7bd9: dup - IL_7bda: ldc.i4.7 - IL_7bdb: add - IL_7bdc: call void [System.Console]System.Console::Write(int32) - IL_7be1: dup - IL_7be2: ldc.i4.1 - IL_7be3: and - IL_7be4: call void [System.Console]System.Console::Write(int32) - IL_7be9: dup - IL_7bea: ldc.i4.4 - IL_7beb: shl - IL_7bec: call void [System.Console]System.Console::Write(int32) - IL_7bf1: dup - IL_7bf2: ldc.i4.0 - IL_7bf3: xor - IL_7bf4: call void [System.Console]System.Console::Write(int32) - IL_7bf9: dup - IL_7bfa: ldc.i4.2 - IL_7bfb: and - IL_7bfc: call void [System.Console]System.Console::Write(int32) - IL_7c01: dup - IL_7c02: ldc.i4.8 - IL_7c03: shr - IL_7c04: call void [System.Console]System.Console::Write(int32) - IL_7c09: dup - IL_7c0a: ldc.i4.3 - IL_7c0b: mul - IL_7c0c: call void [System.Console]System.Console::Write(int32) - IL_7c11: dup - IL_7c12: ldc.i4.6 - IL_7c13: or - IL_7c14: call void [System.Console]System.Console::Write(int32) - IL_7c19: dup - IL_7c1a: ldc.i4.6 - IL_7c1b: xor - IL_7c1c: call void [System.Console]System.Console::Write(int32) - IL_7c21: dup - IL_7c22: ldc.i4.0 - IL_7c23: shr - IL_7c24: call void [System.Console]System.Console::Write(int32) - IL_7c29: dup - IL_7c2a: ldc.i4.4 - IL_7c2b: and - IL_7c2c: call void [System.Console]System.Console::Write(int32) - IL_7c31: dup - IL_7c32: ldc.i4.8 - IL_7c33: or - IL_7c34: call void [System.Console]System.Console::Write(int32) - IL_7c39: dup - IL_7c3a: ldc.i4.7 - IL_7c3b: add - IL_7c3c: call void [System.Console]System.Console::Write(int32) - IL_7c41: dup - IL_7c42: ldc.i4.2 - IL_7c43: add - IL_7c44: call void [System.Console]System.Console::Write(int32) - IL_7c49: dup - IL_7c4a: ldc.i4.2 - IL_7c4b: shl - IL_7c4c: call void [System.Console]System.Console::Write(int32) - IL_7c51: dup - IL_7c52: ldc.i4.7 - IL_7c53: shl - IL_7c54: call void [System.Console]System.Console::Write(int32) - IL_7c59: dup - IL_7c5a: ldc.i4.3 - IL_7c5b: and - IL_7c5c: call void [System.Console]System.Console::Write(int32) - IL_7c61: dup - IL_7c62: ldc.i4.2 - IL_7c63: xor - IL_7c64: call void [System.Console]System.Console::Write(int32) - IL_7c69: dup - IL_7c6a: ldc.i4.7 - IL_7c6b: add - IL_7c6c: call void [System.Console]System.Console::Write(int32) - IL_7c71: dup - IL_7c72: ldc.i4.2 - IL_7c73: xor - IL_7c74: call void [System.Console]System.Console::Write(int32) - IL_7c79: dup - IL_7c7a: ldc.i4.2 - IL_7c7b: shr - IL_7c7c: call void [System.Console]System.Console::Write(int32) - IL_7c81: dup - IL_7c82: ldc.i4.1 - IL_7c83: sub - IL_7c84: call void [System.Console]System.Console::Write(int32) - IL_7c89: dup - IL_7c8a: ldc.i4.0 - IL_7c8b: sub - IL_7c8c: call void [System.Console]System.Console::Write(int32) - IL_7c91: dup - IL_7c92: ldc.i4.8 - IL_7c93: and - IL_7c94: call void [System.Console]System.Console::Write(int32) - IL_7c99: dup - IL_7c9a: ldc.i4.5 - IL_7c9b: or - IL_7c9c: call void [System.Console]System.Console::Write(int32) - IL_7ca1: dup - IL_7ca2: ldc.i4.7 - IL_7ca3: mul - IL_7ca4: call void [System.Console]System.Console::Write(int32) - IL_7ca9: dup - IL_7caa: ldc.i4.6 - IL_7cab: xor - IL_7cac: call void [System.Console]System.Console::Write(int32) - IL_7cb1: dup - IL_7cb2: ldc.i4.7 - IL_7cb3: add - IL_7cb4: call void [System.Console]System.Console::Write(int32) - IL_7cb9: dup - IL_7cba: ldc.i4.1 - IL_7cbb: sub - IL_7cbc: call void [System.Console]System.Console::Write(int32) - IL_7cc1: dup - IL_7cc2: ldc.i4.0 - IL_7cc3: xor - IL_7cc4: call void [System.Console]System.Console::Write(int32) - IL_7cc9: dup - IL_7cca: ldc.i4.1 - IL_7ccb: or - IL_7ccc: call void [System.Console]System.Console::Write(int32) - IL_7cd1: dup - IL_7cd2: ldc.i4.1 - IL_7cd3: and - IL_7cd4: call void [System.Console]System.Console::Write(int32) - IL_7cd9: dup - IL_7cda: ldc.i4.0 - IL_7cdb: mul - IL_7cdc: call void [System.Console]System.Console::Write(int32) - IL_7ce1: dup - IL_7ce2: ldc.i4.2 - IL_7ce3: shl - IL_7ce4: call void [System.Console]System.Console::Write(int32) - IL_7ce9: dup - IL_7cea: ldc.i4.0 - IL_7ceb: mul - IL_7cec: call void [System.Console]System.Console::Write(int32) - IL_7cf1: dup - IL_7cf2: ldc.i4.1 - IL_7cf3: shr - IL_7cf4: call void [System.Console]System.Console::Write(int32) - IL_7cf9: dup - IL_7cfa: ldc.i4.1 - IL_7cfb: shr - IL_7cfc: call void [System.Console]System.Console::Write(int32) - IL_7d01: dup - IL_7d02: ldc.i4.3 - IL_7d03: and - IL_7d04: call void [System.Console]System.Console::Write(int32) - IL_7d09: dup - IL_7d0a: ldc.i4.5 - IL_7d0b: shr - IL_7d0c: call void [System.Console]System.Console::Write(int32) - IL_7d11: dup - IL_7d12: ldc.i4.8 - IL_7d13: shr - IL_7d14: call void [System.Console]System.Console::Write(int32) - IL_7d19: dup - IL_7d1a: ldc.i4.0 - IL_7d1b: xor - IL_7d1c: call void [System.Console]System.Console::Write(int32) - IL_7d21: dup - IL_7d22: ldc.i4.4 - IL_7d23: mul - IL_7d24: call void [System.Console]System.Console::Write(int32) - IL_7d29: dup - IL_7d2a: ldc.i4.6 - IL_7d2b: xor - IL_7d2c: call void [System.Console]System.Console::Write(int32) - IL_7d31: dup - IL_7d32: ldc.i4.7 - IL_7d33: or - IL_7d34: call void [System.Console]System.Console::Write(int32) - IL_7d39: dup - IL_7d3a: ldc.i4.8 - IL_7d3b: mul - IL_7d3c: call void [System.Console]System.Console::Write(int32) - IL_7d41: dup - IL_7d42: ldc.i4.2 - IL_7d43: shr - IL_7d44: call void [System.Console]System.Console::Write(int32) - IL_7d49: dup - IL_7d4a: ldc.i4.0 - IL_7d4b: and - IL_7d4c: call void [System.Console]System.Console::Write(int32) - IL_7d51: dup - IL_7d52: ldc.i4.1 - IL_7d53: mul - IL_7d54: call void [System.Console]System.Console::Write(int32) - IL_7d59: dup - IL_7d5a: ldc.i4.4 - IL_7d5b: xor - IL_7d5c: call void [System.Console]System.Console::Write(int32) - IL_7d61: dup - IL_7d62: ldc.i4.1 - IL_7d63: shr - IL_7d64: call void [System.Console]System.Console::Write(int32) - IL_7d69: dup - IL_7d6a: ldc.i4.7 - IL_7d6b: xor - IL_7d6c: call void [System.Console]System.Console::Write(int32) - IL_7d71: dup - IL_7d72: ldc.i4.6 - IL_7d73: mul - IL_7d74: call void [System.Console]System.Console::Write(int32) - IL_7d79: dup - IL_7d7a: ldc.i4.7 - IL_7d7b: add - IL_7d7c: call void [System.Console]System.Console::Write(int32) - IL_7d81: dup - IL_7d82: ldc.i4.1 - IL_7d83: add - IL_7d84: call void [System.Console]System.Console::Write(int32) - IL_7d89: dup - IL_7d8a: ldc.i4.0 - IL_7d8b: add - IL_7d8c: call void [System.Console]System.Console::Write(int32) - IL_7d91: dup - IL_7d92: ldc.i4.3 - IL_7d93: xor - IL_7d94: call void [System.Console]System.Console::Write(int32) - IL_7d99: dup - IL_7d9a: ldc.i4.1 - IL_7d9b: mul - IL_7d9c: call void [System.Console]System.Console::Write(int32) - IL_7da1: dup - IL_7da2: ldc.i4.3 - IL_7da3: shr - IL_7da4: call void [System.Console]System.Console::Write(int32) - IL_7da9: dup - IL_7daa: ldc.i4.4 - IL_7dab: and - IL_7dac: call void [System.Console]System.Console::Write(int32) - IL_7db1: dup - IL_7db2: ldc.i4.0 - IL_7db3: shl - IL_7db4: call void [System.Console]System.Console::Write(int32) - IL_7db9: dup - IL_7dba: ldc.i4.4 - IL_7dbb: mul - IL_7dbc: call void [System.Console]System.Console::Write(int32) - IL_7dc1: dup - IL_7dc2: ldc.i4.5 - IL_7dc3: and - IL_7dc4: call void [System.Console]System.Console::Write(int32) - IL_7dc9: dup - IL_7dca: ldc.i4.0 - IL_7dcb: xor - IL_7dcc: call void [System.Console]System.Console::Write(int32) - IL_7dd1: dup - IL_7dd2: ldc.i4.5 - IL_7dd3: mul - IL_7dd4: call void [System.Console]System.Console::Write(int32) - IL_7dd9: dup - IL_7dda: ldc.i4.4 - IL_7ddb: sub - IL_7ddc: call void [System.Console]System.Console::Write(int32) - IL_7de1: dup - IL_7de2: ldc.i4.3 - IL_7de3: sub - IL_7de4: call void [System.Console]System.Console::Write(int32) - IL_7de9: dup - IL_7dea: ldc.i4.5 - IL_7deb: sub - IL_7dec: call void [System.Console]System.Console::Write(int32) - IL_7df1: dup - IL_7df2: ldc.i4.7 - IL_7df3: shr - IL_7df4: call void [System.Console]System.Console::Write(int32) - IL_7df9: dup - IL_7dfa: ldc.i4.7 - IL_7dfb: sub - IL_7dfc: call void [System.Console]System.Console::Write(int32) - IL_7e01: dup - IL_7e02: ldc.i4.4 - IL_7e03: shl - IL_7e04: call void [System.Console]System.Console::Write(int32) - IL_7e09: dup - IL_7e0a: ldc.i4.3 - IL_7e0b: and - IL_7e0c: call void [System.Console]System.Console::Write(int32) - IL_7e11: dup - IL_7e12: ldc.i4.8 - IL_7e13: or - IL_7e14: call void [System.Console]System.Console::Write(int32) - IL_7e19: dup - IL_7e1a: ldc.i4.7 - IL_7e1b: and - IL_7e1c: call void [System.Console]System.Console::Write(int32) - IL_7e21: dup - IL_7e22: ldc.i4.4 - IL_7e23: shr - IL_7e24: call void [System.Console]System.Console::Write(int32) - IL_7e29: dup - IL_7e2a: ldc.i4.4 - IL_7e2b: xor - IL_7e2c: call void [System.Console]System.Console::Write(int32) - IL_7e31: dup - IL_7e32: ldc.i4.7 - IL_7e33: shl - IL_7e34: call void [System.Console]System.Console::Write(int32) - IL_7e39: dup - IL_7e3a: ldc.i4.3 - IL_7e3b: shr - IL_7e3c: call void [System.Console]System.Console::Write(int32) - IL_7e41: dup - IL_7e42: ldc.i4.1 - IL_7e43: shl - IL_7e44: call void [System.Console]System.Console::Write(int32) - IL_7e49: dup - IL_7e4a: ldc.i4.7 - IL_7e4b: and - IL_7e4c: call void [System.Console]System.Console::Write(int32) - IL_7e51: dup - IL_7e52: ldc.i4.2 - IL_7e53: xor - IL_7e54: call void [System.Console]System.Console::Write(int32) - IL_7e59: dup - IL_7e5a: ldc.i4.4 - IL_7e5b: and - IL_7e5c: call void [System.Console]System.Console::Write(int32) - IL_7e61: dup - IL_7e62: ldc.i4.5 - IL_7e63: or - IL_7e64: call void [System.Console]System.Console::Write(int32) - IL_7e69: dup - IL_7e6a: ldc.i4.5 - IL_7e6b: sub - IL_7e6c: call void [System.Console]System.Console::Write(int32) - IL_7e71: dup - IL_7e72: ldc.i4.7 - IL_7e73: or - IL_7e74: call void [System.Console]System.Console::Write(int32) - IL_7e79: dup - IL_7e7a: ldc.i4.5 - IL_7e7b: shr - IL_7e7c: call void [System.Console]System.Console::Write(int32) - IL_7e81: dup - IL_7e82: ldc.i4.8 - IL_7e83: mul - IL_7e84: call void [System.Console]System.Console::Write(int32) - IL_7e89: dup - IL_7e8a: ldc.i4.3 - IL_7e8b: xor - IL_7e8c: call void [System.Console]System.Console::Write(int32) - IL_7e91: dup - IL_7e92: ldc.i4.1 - IL_7e93: shr - IL_7e94: call void [System.Console]System.Console::Write(int32) - IL_7e99: dup - IL_7e9a: ldc.i4.4 - IL_7e9b: shr - IL_7e9c: call void [System.Console]System.Console::Write(int32) - IL_7ea1: dup - IL_7ea2: ldc.i4.8 - IL_7ea3: mul - IL_7ea4: call void [System.Console]System.Console::Write(int32) - IL_7ea9: dup - IL_7eaa: ldc.i4.7 - IL_7eab: or - IL_7eac: call void [System.Console]System.Console::Write(int32) - IL_7eb1: dup - IL_7eb2: ldc.i4.7 - IL_7eb3: add - IL_7eb4: call void [System.Console]System.Console::Write(int32) - IL_7eb9: dup - IL_7eba: ldc.i4.3 - IL_7ebb: and - IL_7ebc: call void [System.Console]System.Console::Write(int32) - IL_7ec1: dup - IL_7ec2: ldc.i4.6 - IL_7ec3: or - IL_7ec4: call void [System.Console]System.Console::Write(int32) - IL_7ec9: dup - IL_7eca: ldc.i4.8 - IL_7ecb: mul - IL_7ecc: call void [System.Console]System.Console::Write(int32) - IL_7ed1: dup - IL_7ed2: ldc.i4.8 - IL_7ed3: or - IL_7ed4: call void [System.Console]System.Console::Write(int32) - IL_7ed9: dup - IL_7eda: ldc.i4.8 - IL_7edb: add - IL_7edc: call void [System.Console]System.Console::Write(int32) - IL_7ee1: dup - IL_7ee2: ldc.i4.1 - IL_7ee3: xor - IL_7ee4: call void [System.Console]System.Console::Write(int32) - IL_7ee9: dup - IL_7eea: ldc.i4.1 - IL_7eeb: or - IL_7eec: call void [System.Console]System.Console::Write(int32) - IL_7ef1: dup - IL_7ef2: ldc.i4.2 - IL_7ef3: shl - IL_7ef4: call void [System.Console]System.Console::Write(int32) - IL_7ef9: dup - IL_7efa: ldc.i4.8 - IL_7efb: shl - IL_7efc: call void [System.Console]System.Console::Write(int32) - IL_7f01: dup - IL_7f02: ldc.i4.1 - IL_7f03: and - IL_7f04: call void [System.Console]System.Console::Write(int32) - IL_7f09: dup - IL_7f0a: ldc.i4.4 - IL_7f0b: shl - IL_7f0c: call void [System.Console]System.Console::Write(int32) - IL_7f11: dup - IL_7f12: ldc.i4.1 - IL_7f13: or - IL_7f14: call void [System.Console]System.Console::Write(int32) - IL_7f19: dup - IL_7f1a: ldc.i4.4 - IL_7f1b: xor - IL_7f1c: call void [System.Console]System.Console::Write(int32) - IL_7f21: dup - IL_7f22: ldc.i4.0 - IL_7f23: sub - IL_7f24: call void [System.Console]System.Console::Write(int32) - IL_7f29: dup - IL_7f2a: ldc.i4.7 - IL_7f2b: or - IL_7f2c: call void [System.Console]System.Console::Write(int32) - IL_7f31: dup - IL_7f32: ldc.i4.5 - IL_7f33: shl - IL_7f34: call void [System.Console]System.Console::Write(int32) - IL_7f39: dup - IL_7f3a: ldc.i4.0 - IL_7f3b: shl - IL_7f3c: call void [System.Console]System.Console::Write(int32) - IL_7f41: dup - IL_7f42: ldc.i4.5 - IL_7f43: and - IL_7f44: call void [System.Console]System.Console::Write(int32) - IL_7f49: dup - IL_7f4a: ldc.i4.4 - IL_7f4b: or - IL_7f4c: call void [System.Console]System.Console::Write(int32) - IL_7f51: dup - IL_7f52: ldc.i4.8 - IL_7f53: mul - IL_7f54: call void [System.Console]System.Console::Write(int32) - IL_7f59: dup - IL_7f5a: ldc.i4.7 - IL_7f5b: add - IL_7f5c: call void [System.Console]System.Console::Write(int32) - IL_7f61: dup - IL_7f62: ldc.i4.2 - IL_7f63: xor - IL_7f64: call void [System.Console]System.Console::Write(int32) - IL_7f69: dup - IL_7f6a: ldc.i4.3 - IL_7f6b: shr - IL_7f6c: call void [System.Console]System.Console::Write(int32) - IL_7f71: dup - IL_7f72: ldc.i4.5 - IL_7f73: xor - IL_7f74: call void [System.Console]System.Console::Write(int32) - IL_7f79: dup - IL_7f7a: ldc.i4.2 - IL_7f7b: xor - IL_7f7c: call void [System.Console]System.Console::Write(int32) - IL_7f81: dup - IL_7f82: ldc.i4.3 - IL_7f83: mul - IL_7f84: call void [System.Console]System.Console::Write(int32) - IL_7f89: dup - IL_7f8a: ldc.i4.7 - IL_7f8b: add - IL_7f8c: call void [System.Console]System.Console::Write(int32) - IL_7f91: dup - IL_7f92: ldc.i4.5 - IL_7f93: and - IL_7f94: call void [System.Console]System.Console::Write(int32) - IL_7f99: dup - IL_7f9a: ldc.i4.5 - IL_7f9b: and - IL_7f9c: call void [System.Console]System.Console::Write(int32) - IL_7fa1: dup - IL_7fa2: ldc.i4.4 - IL_7fa3: shl - IL_7fa4: call void [System.Console]System.Console::Write(int32) - IL_7fa9: dup - IL_7faa: ldc.i4.2 - IL_7fab: and - IL_7fac: call void [System.Console]System.Console::Write(int32) - IL_7fb1: dup - IL_7fb2: ldc.i4.0 - IL_7fb3: or - IL_7fb4: call void [System.Console]System.Console::Write(int32) - IL_7fb9: dup - IL_7fba: ldc.i4.3 - IL_7fbb: shl - IL_7fbc: call void [System.Console]System.Console::Write(int32) - IL_7fc1: dup - IL_7fc2: ldc.i4.3 - IL_7fc3: shl - IL_7fc4: call void [System.Console]System.Console::Write(int32) - IL_7fc9: dup - IL_7fca: ldc.i4.3 - IL_7fcb: xor - IL_7fcc: call void [System.Console]System.Console::Write(int32) - IL_7fd1: dup - IL_7fd2: ldc.i4.0 - IL_7fd3: add - IL_7fd4: call void [System.Console]System.Console::Write(int32) - IL_7fd9: dup - IL_7fda: ldc.i4.4 - IL_7fdb: and - IL_7fdc: call void [System.Console]System.Console::Write(int32) - IL_7fe1: dup - IL_7fe2: ldc.i4.8 - IL_7fe3: xor - IL_7fe4: call void [System.Console]System.Console::Write(int32) - IL_7fe9: dup - IL_7fea: ldc.i4.1 - IL_7feb: and - IL_7fec: call void [System.Console]System.Console::Write(int32) - IL_7ff1: dup - IL_7ff2: ldc.i4.5 - IL_7ff3: shr - IL_7ff4: call void [System.Console]System.Console::Write(int32) - IL_7ff9: dup - IL_7ffa: ldc.i4.8 - IL_7ffb: shl - IL_7ffc: call void [System.Console]System.Console::Write(int32) - IL_8001: dup - IL_8002: ldc.i4.7 - IL_8003: xor - IL_8004: call void [System.Console]System.Console::Write(int32) - IL_8009: dup - IL_800a: ldc.i4.5 - IL_800b: sub - IL_800c: call void [System.Console]System.Console::Write(int32) - IL_8011: dup - IL_8012: ldc.i4.6 - IL_8013: or - IL_8014: call void [System.Console]System.Console::Write(int32) - IL_8019: dup - IL_801a: ldc.i4.8 - IL_801b: shr - IL_801c: call void [System.Console]System.Console::Write(int32) - IL_8021: dup - IL_8022: ldc.i4.2 - IL_8023: shr - IL_8024: call void [System.Console]System.Console::Write(int32) - IL_8029: dup - IL_802a: ldc.i4.3 - IL_802b: xor - IL_802c: call void [System.Console]System.Console::Write(int32) - IL_8031: dup - IL_8032: ldc.i4.0 - IL_8033: add - IL_8034: call void [System.Console]System.Console::Write(int32) - IL_8039: dup - IL_803a: ldc.i4.8 - IL_803b: mul - IL_803c: call void [System.Console]System.Console::Write(int32) - IL_8041: dup - IL_8042: ldc.i4.8 - IL_8043: shr - IL_8044: call void [System.Console]System.Console::Write(int32) - IL_8049: dup - IL_804a: ldc.i4.2 - IL_804b: or - IL_804c: call void [System.Console]System.Console::Write(int32) - IL_8051: dup - IL_8052: ldc.i4.0 - IL_8053: and - IL_8054: call void [System.Console]System.Console::Write(int32) - IL_8059: dup - IL_805a: ldc.i4.2 - IL_805b: mul - IL_805c: call void [System.Console]System.Console::Write(int32) - IL_8061: dup - IL_8062: ldc.i4.7 - IL_8063: or - IL_8064: call void [System.Console]System.Console::Write(int32) - IL_8069: dup - IL_806a: ldc.i4.1 - IL_806b: sub - IL_806c: call void [System.Console]System.Console::Write(int32) - IL_8071: dup - IL_8072: ldc.i4.5 - IL_8073: and - IL_8074: call void [System.Console]System.Console::Write(int32) - IL_8079: dup - IL_807a: ldc.i4.1 - IL_807b: and - IL_807c: call void [System.Console]System.Console::Write(int32) - IL_8081: dup - IL_8082: ldc.i4.5 - IL_8083: shr - IL_8084: call void [System.Console]System.Console::Write(int32) - IL_8089: dup - IL_808a: ldc.i4.8 - IL_808b: shl - IL_808c: call void [System.Console]System.Console::Write(int32) - IL_8091: dup - IL_8092: ldc.i4.2 - IL_8093: sub - IL_8094: call void [System.Console]System.Console::Write(int32) - IL_8099: dup - IL_809a: ldc.i4.8 - IL_809b: xor - IL_809c: call void [System.Console]System.Console::Write(int32) - IL_80a1: dup - IL_80a2: ldc.i4.5 - IL_80a3: shr - IL_80a4: call void [System.Console]System.Console::Write(int32) - IL_80a9: dup - IL_80aa: ldc.i4.2 - IL_80ab: mul - IL_80ac: call void [System.Console]System.Console::Write(int32) - IL_80b1: dup - IL_80b2: ldc.i4.5 - IL_80b3: add - IL_80b4: call void [System.Console]System.Console::Write(int32) - IL_80b9: dup - IL_80ba: ldc.i4.7 - IL_80bb: or - IL_80bc: call void [System.Console]System.Console::Write(int32) - IL_80c1: dup - IL_80c2: ldc.i4.4 - IL_80c3: and - IL_80c4: call void [System.Console]System.Console::Write(int32) - IL_80c9: dup - IL_80ca: ldc.i4.7 - IL_80cb: or - IL_80cc: call void [System.Console]System.Console::Write(int32) - IL_80d1: dup - IL_80d2: ldc.i4.4 - IL_80d3: or - IL_80d4: call void [System.Console]System.Console::Write(int32) - IL_80d9: dup - IL_80da: ldc.i4.4 - IL_80db: or - IL_80dc: call void [System.Console]System.Console::Write(int32) - IL_80e1: dup - IL_80e2: ldc.i4.1 - IL_80e3: mul - IL_80e4: call void [System.Console]System.Console::Write(int32) - IL_80e9: dup - IL_80ea: ldc.i4.3 - IL_80eb: shr - IL_80ec: call void [System.Console]System.Console::Write(int32) - IL_80f1: dup - IL_80f2: ldc.i4.7 - IL_80f3: and - IL_80f4: call void [System.Console]System.Console::Write(int32) - IL_80f9: dup - IL_80fa: ldc.i4.1 - IL_80fb: xor - IL_80fc: call void [System.Console]System.Console::Write(int32) - IL_8101: dup - IL_8102: ldc.i4.5 - IL_8103: shr - IL_8104: call void [System.Console]System.Console::Write(int32) - IL_8109: dup - IL_810a: ldc.i4.8 - IL_810b: mul - IL_810c: call void [System.Console]System.Console::Write(int32) - IL_8111: dup - IL_8112: ldc.i4.0 - IL_8113: mul - IL_8114: call void [System.Console]System.Console::Write(int32) - IL_8119: dup - IL_811a: ldc.i4.0 - IL_811b: and - IL_811c: call void [System.Console]System.Console::Write(int32) - IL_8121: dup - IL_8122: ldc.i4.7 - IL_8123: and - IL_8124: call void [System.Console]System.Console::Write(int32) - IL_8129: dup - IL_812a: ldc.i4.2 - IL_812b: xor - IL_812c: call void [System.Console]System.Console::Write(int32) - IL_8131: dup - IL_8132: ldc.i4.5 - IL_8133: or - IL_8134: call void [System.Console]System.Console::Write(int32) - IL_8139: dup - IL_813a: ldc.i4.6 - IL_813b: and - IL_813c: call void [System.Console]System.Console::Write(int32) - IL_8141: dup - IL_8142: ldc.i4.1 - IL_8143: mul - IL_8144: call void [System.Console]System.Console::Write(int32) - IL_8149: dup - IL_814a: ldc.i4.5 - IL_814b: and - IL_814c: call void [System.Console]System.Console::Write(int32) - IL_8151: dup - IL_8152: ldc.i4.8 - IL_8153: sub - IL_8154: call void [System.Console]System.Console::Write(int32) - IL_8159: dup - IL_815a: ldc.i4.2 - IL_815b: shl - IL_815c: call void [System.Console]System.Console::Write(int32) - IL_8161: dup - IL_8162: ldc.i4.2 - IL_8163: or - IL_8164: call void [System.Console]System.Console::Write(int32) - IL_8169: dup - IL_816a: ldc.i4.3 - IL_816b: or - IL_816c: call void [System.Console]System.Console::Write(int32) - IL_8171: dup - IL_8172: ldc.i4.6 - IL_8173: sub - IL_8174: call void [System.Console]System.Console::Write(int32) - IL_8179: dup - IL_817a: ldc.i4.6 - IL_817b: and - IL_817c: call void [System.Console]System.Console::Write(int32) - IL_8181: dup - IL_8182: ldc.i4.5 - IL_8183: and - IL_8184: call void [System.Console]System.Console::Write(int32) - IL_8189: dup - IL_818a: ldc.i4.6 - IL_818b: or - IL_818c: call void [System.Console]System.Console::Write(int32) - IL_8191: dup - IL_8192: ldc.i4.1 - IL_8193: shl - IL_8194: call void [System.Console]System.Console::Write(int32) - IL_8199: dup - IL_819a: ldc.i4.7 - IL_819b: sub - IL_819c: call void [System.Console]System.Console::Write(int32) - IL_81a1: dup - IL_81a2: ldc.i4.7 - IL_81a3: add - IL_81a4: call void [System.Console]System.Console::Write(int32) - IL_81a9: dup - IL_81aa: ldc.i4.1 - IL_81ab: shr - IL_81ac: call void [System.Console]System.Console::Write(int32) - IL_81b1: dup - IL_81b2: ldc.i4.5 - IL_81b3: add - IL_81b4: call void [System.Console]System.Console::Write(int32) - IL_81b9: dup - IL_81ba: ldc.i4.2 - IL_81bb: sub - IL_81bc: call void [System.Console]System.Console::Write(int32) - IL_81c1: dup - IL_81c2: ldc.i4.4 - IL_81c3: shr - IL_81c4: call void [System.Console]System.Console::Write(int32) - IL_81c9: dup - IL_81ca: ldc.i4.5 - IL_81cb: shl - IL_81cc: call void [System.Console]System.Console::Write(int32) - IL_81d1: dup - IL_81d2: ldc.i4.1 - IL_81d3: mul - IL_81d4: call void [System.Console]System.Console::Write(int32) - IL_81d9: dup - IL_81da: ldc.i4.4 - IL_81db: mul - IL_81dc: call void [System.Console]System.Console::Write(int32) - IL_81e1: dup - IL_81e2: ldc.i4.3 - IL_81e3: mul - IL_81e4: call void [System.Console]System.Console::Write(int32) - IL_81e9: dup - IL_81ea: ldc.i4.0 - IL_81eb: add - IL_81ec: call void [System.Console]System.Console::Write(int32) - IL_81f1: dup - IL_81f2: ldc.i4.8 - IL_81f3: add - IL_81f4: call void [System.Console]System.Console::Write(int32) - IL_81f9: dup - IL_81fa: ldc.i4.0 - IL_81fb: shl - IL_81fc: call void [System.Console]System.Console::Write(int32) - IL_8201: dup - IL_8202: ldc.i4.0 - IL_8203: xor - IL_8204: call void [System.Console]System.Console::Write(int32) - IL_8209: dup - IL_820a: ldc.i4.7 - IL_820b: and - IL_820c: call void [System.Console]System.Console::Write(int32) - IL_8211: dup - IL_8212: ldc.i4.1 - IL_8213: and - IL_8214: call void [System.Console]System.Console::Write(int32) - IL_8219: dup - IL_821a: ldc.i4.5 - IL_821b: shl - IL_821c: call void [System.Console]System.Console::Write(int32) - IL_8221: dup - IL_8222: ldc.i4.4 - IL_8223: xor - IL_8224: call void [System.Console]System.Console::Write(int32) - IL_8229: dup - IL_822a: ldc.i4.8 - IL_822b: or - IL_822c: call void [System.Console]System.Console::Write(int32) - IL_8231: dup - IL_8232: ldc.i4.1 - IL_8233: shr - IL_8234: call void [System.Console]System.Console::Write(int32) - IL_8239: dup - IL_823a: ldc.i4.8 - IL_823b: sub - IL_823c: call void [System.Console]System.Console::Write(int32) - IL_8241: dup - IL_8242: ldc.i4.6 - IL_8243: sub - IL_8244: call void [System.Console]System.Console::Write(int32) - IL_8249: dup - IL_824a: ldc.i4.4 - IL_824b: add - IL_824c: call void [System.Console]System.Console::Write(int32) - IL_8251: dup - IL_8252: ldc.i4.5 - IL_8253: sub - IL_8254: call void [System.Console]System.Console::Write(int32) - IL_8259: dup - IL_825a: ldc.i4.5 - IL_825b: sub - IL_825c: call void [System.Console]System.Console::Write(int32) - IL_8261: dup - IL_8262: ldc.i4.3 - IL_8263: mul - IL_8264: call void [System.Console]System.Console::Write(int32) - IL_8269: dup - IL_826a: ldc.i4.4 - IL_826b: and - IL_826c: call void [System.Console]System.Console::Write(int32) - IL_8271: dup - IL_8272: ldc.i4.4 - IL_8273: shr - IL_8274: call void [System.Console]System.Console::Write(int32) - IL_8279: dup - IL_827a: ldc.i4.2 - IL_827b: shr - IL_827c: call void [System.Console]System.Console::Write(int32) - IL_8281: dup - IL_8282: ldc.i4.0 - IL_8283: shl - IL_8284: call void [System.Console]System.Console::Write(int32) - IL_8289: dup - IL_828a: ldc.i4.4 - IL_828b: sub - IL_828c: call void [System.Console]System.Console::Write(int32) - IL_8291: dup - IL_8292: ldc.i4.1 - IL_8293: shl - IL_8294: call void [System.Console]System.Console::Write(int32) - IL_8299: dup - IL_829a: ldc.i4.0 - IL_829b: shr - IL_829c: call void [System.Console]System.Console::Write(int32) - IL_82a1: dup - IL_82a2: ldc.i4.0 - IL_82a3: add - IL_82a4: call void [System.Console]System.Console::Write(int32) - IL_82a9: dup - IL_82aa: ldc.i4.0 - IL_82ab: and - IL_82ac: call void [System.Console]System.Console::Write(int32) - IL_82b1: dup - IL_82b2: ldc.i4.3 - IL_82b3: shl - IL_82b4: call void [System.Console]System.Console::Write(int32) - IL_82b9: dup - IL_82ba: ldc.i4.2 - IL_82bb: shr - IL_82bc: call void [System.Console]System.Console::Write(int32) - IL_82c1: dup - IL_82c2: ldc.i4.3 - IL_82c3: and - IL_82c4: call void [System.Console]System.Console::Write(int32) - IL_82c9: dup - IL_82ca: ldc.i4.3 - IL_82cb: shr - IL_82cc: call void [System.Console]System.Console::Write(int32) - IL_82d1: dup - IL_82d2: ldc.i4.5 - IL_82d3: or - IL_82d4: call void [System.Console]System.Console::Write(int32) - IL_82d9: dup - IL_82da: ldc.i4.8 - IL_82db: or - IL_82dc: call void [System.Console]System.Console::Write(int32) - IL_82e1: dup - IL_82e2: ldc.i4.7 - IL_82e3: shl - IL_82e4: call void [System.Console]System.Console::Write(int32) - IL_82e9: dup - IL_82ea: ldc.i4.4 - IL_82eb: and - IL_82ec: call void [System.Console]System.Console::Write(int32) - IL_82f1: dup - IL_82f2: ldc.i4.2 - IL_82f3: and - IL_82f4: call void [System.Console]System.Console::Write(int32) - IL_82f9: dup - IL_82fa: ldc.i4.0 - IL_82fb: and - IL_82fc: call void [System.Console]System.Console::Write(int32) - IL_8301: dup - IL_8302: ldc.i4.1 - IL_8303: mul - IL_8304: call void [System.Console]System.Console::Write(int32) - IL_8309: dup - IL_830a: ldc.i4.7 - IL_830b: shl - IL_830c: call void [System.Console]System.Console::Write(int32) - IL_8311: dup - IL_8312: ldc.i4.0 - IL_8313: and - IL_8314: call void [System.Console]System.Console::Write(int32) - IL_8319: dup - IL_831a: ldc.i4.0 - IL_831b: sub - IL_831c: call void [System.Console]System.Console::Write(int32) - IL_8321: dup - IL_8322: ldc.i4.1 - IL_8323: and - IL_8324: call void [System.Console]System.Console::Write(int32) - IL_8329: dup - IL_832a: ldc.i4.0 - IL_832b: shl - IL_832c: call void [System.Console]System.Console::Write(int32) - IL_8331: dup - IL_8332: ldc.i4.0 - IL_8333: and - IL_8334: call void [System.Console]System.Console::Write(int32) - IL_8339: dup - IL_833a: ldc.i4.7 - IL_833b: and - IL_833c: call void [System.Console]System.Console::Write(int32) - IL_8341: dup - IL_8342: ldc.i4.1 - IL_8343: and - IL_8344: call void [System.Console]System.Console::Write(int32) - IL_8349: dup - IL_834a: ldc.i4.4 - IL_834b: shr - IL_834c: call void [System.Console]System.Console::Write(int32) - IL_8351: dup - IL_8352: ldc.i4.2 - IL_8353: shl - IL_8354: call void [System.Console]System.Console::Write(int32) - IL_8359: dup - IL_835a: ldc.i4.1 - IL_835b: add - IL_835c: call void [System.Console]System.Console::Write(int32) - IL_8361: dup - IL_8362: ldc.i4.5 - IL_8363: shl - IL_8364: call void [System.Console]System.Console::Write(int32) - IL_8369: dup - IL_836a: ldc.i4.2 - IL_836b: shl - IL_836c: call void [System.Console]System.Console::Write(int32) - IL_8371: dup - IL_8372: ldc.i4.0 - IL_8373: sub - IL_8374: call void [System.Console]System.Console::Write(int32) - IL_8379: dup - IL_837a: ldc.i4.3 - IL_837b: sub - IL_837c: call void [System.Console]System.Console::Write(int32) - IL_8381: dup - IL_8382: ldc.i4.8 - IL_8383: mul - IL_8384: call void [System.Console]System.Console::Write(int32) - IL_8389: dup - IL_838a: ldc.i4.5 - IL_838b: add - IL_838c: call void [System.Console]System.Console::Write(int32) - IL_8391: dup - IL_8392: ldc.i4.5 - IL_8393: shr - IL_8394: call void [System.Console]System.Console::Write(int32) - IL_8399: dup - IL_839a: ldc.i4.5 - IL_839b: shl - IL_839c: call void [System.Console]System.Console::Write(int32) - IL_83a1: dup - IL_83a2: ldc.i4.7 - IL_83a3: mul - IL_83a4: call void [System.Console]System.Console::Write(int32) - IL_83a9: dup - IL_83aa: ldc.i4.5 - IL_83ab: and - IL_83ac: call void [System.Console]System.Console::Write(int32) - IL_83b1: dup - IL_83b2: ldc.i4.7 - IL_83b3: xor - IL_83b4: call void [System.Console]System.Console::Write(int32) - IL_83b9: dup - IL_83ba: ldc.i4.7 - IL_83bb: add - IL_83bc: call void [System.Console]System.Console::Write(int32) - IL_83c1: dup - IL_83c2: ldc.i4.6 - IL_83c3: shr - IL_83c4: call void [System.Console]System.Console::Write(int32) - IL_83c9: dup - IL_83ca: ldc.i4.6 - IL_83cb: xor - IL_83cc: call void [System.Console]System.Console::Write(int32) - IL_83d1: dup - IL_83d2: ldc.i4.3 - IL_83d3: xor - IL_83d4: call void [System.Console]System.Console::Write(int32) - IL_83d9: dup - IL_83da: ldc.i4.4 - IL_83db: shr - IL_83dc: call void [System.Console]System.Console::Write(int32) - IL_83e1: dup - IL_83e2: ldc.i4.1 - IL_83e3: shr - IL_83e4: call void [System.Console]System.Console::Write(int32) - IL_83e9: dup - IL_83ea: ldc.i4.0 - IL_83eb: shl - IL_83ec: call void [System.Console]System.Console::Write(int32) - IL_83f1: dup - IL_83f2: ldc.i4.4 - IL_83f3: xor - IL_83f4: call void [System.Console]System.Console::Write(int32) - IL_83f9: dup - IL_83fa: ldc.i4.0 - IL_83fb: or - IL_83fc: call void [System.Console]System.Console::Write(int32) - IL_8401: dup - IL_8402: ldc.i4.3 - IL_8403: and - IL_8404: call void [System.Console]System.Console::Write(int32) - IL_8409: dup - IL_840a: ldc.i4.6 - IL_840b: and - IL_840c: call void [System.Console]System.Console::Write(int32) - IL_8411: dup - IL_8412: ldc.i4.2 - IL_8413: and - IL_8414: call void [System.Console]System.Console::Write(int32) - IL_8419: dup - IL_841a: ldc.i4.1 - IL_841b: xor - IL_841c: call void [System.Console]System.Console::Write(int32) - IL_8421: dup - IL_8422: ldc.i4.2 - IL_8423: or - IL_8424: call void [System.Console]System.Console::Write(int32) - IL_8429: dup - IL_842a: ldc.i4.7 - IL_842b: or - IL_842c: call void [System.Console]System.Console::Write(int32) - IL_8431: dup - IL_8432: ldc.i4.8 - IL_8433: mul - IL_8434: call void [System.Console]System.Console::Write(int32) - IL_8439: dup - IL_843a: ldc.i4.2 - IL_843b: sub - IL_843c: call void [System.Console]System.Console::Write(int32) - IL_8441: dup - IL_8442: ldc.i4.6 - IL_8443: mul - IL_8444: call void [System.Console]System.Console::Write(int32) - IL_8449: dup - IL_844a: ldc.i4.7 - IL_844b: xor - IL_844c: call void [System.Console]System.Console::Write(int32) - IL_8451: dup - IL_8452: ldc.i4.4 - IL_8453: and - IL_8454: call void [System.Console]System.Console::Write(int32) - IL_8459: dup - IL_845a: ldc.i4.7 - IL_845b: xor - IL_845c: call void [System.Console]System.Console::Write(int32) - IL_8461: dup - IL_8462: ldc.i4.6 - IL_8463: or - IL_8464: call void [System.Console]System.Console::Write(int32) - IL_8469: dup - IL_846a: ldc.i4.8 - IL_846b: or - IL_846c: call void [System.Console]System.Console::Write(int32) - IL_8471: dup - IL_8472: ldc.i4.6 - IL_8473: add - IL_8474: call void [System.Console]System.Console::Write(int32) - IL_8479: dup - IL_847a: ldc.i4.0 - IL_847b: xor - IL_847c: call void [System.Console]System.Console::Write(int32) - IL_8481: dup - IL_8482: ldc.i4.1 - IL_8483: shr - IL_8484: call void [System.Console]System.Console::Write(int32) - IL_8489: dup - IL_848a: ldc.i4.3 - IL_848b: add - IL_848c: call void [System.Console]System.Console::Write(int32) - IL_8491: dup - IL_8492: ldc.i4.6 - IL_8493: add - IL_8494: call void [System.Console]System.Console::Write(int32) - IL_8499: dup - IL_849a: ldc.i4.6 - IL_849b: or - IL_849c: call void [System.Console]System.Console::Write(int32) - IL_84a1: dup - IL_84a2: ldc.i4.4 - IL_84a3: mul - IL_84a4: call void [System.Console]System.Console::Write(int32) - IL_84a9: dup - IL_84aa: ldc.i4.1 - IL_84ab: xor - IL_84ac: call void [System.Console]System.Console::Write(int32) - IL_84b1: dup - IL_84b2: ldc.i4.5 - IL_84b3: shl - IL_84b4: call void [System.Console]System.Console::Write(int32) - IL_84b9: dup - IL_84ba: ldc.i4.6 - IL_84bb: and - IL_84bc: call void [System.Console]System.Console::Write(int32) - IL_84c1: dup - IL_84c2: ldc.i4.4 - IL_84c3: and - IL_84c4: call void [System.Console]System.Console::Write(int32) - IL_84c9: dup - IL_84ca: ldc.i4.7 - IL_84cb: sub - IL_84cc: call void [System.Console]System.Console::Write(int32) - IL_84d1: dup - IL_84d2: ldc.i4.4 - IL_84d3: shr - IL_84d4: call void [System.Console]System.Console::Write(int32) - IL_84d9: dup - IL_84da: ldc.i4.4 - IL_84db: shl - IL_84dc: call void [System.Console]System.Console::Write(int32) - IL_84e1: dup - IL_84e2: ldc.i4.8 - IL_84e3: sub - IL_84e4: call void [System.Console]System.Console::Write(int32) - IL_84e9: dup - IL_84ea: ldc.i4.0 - IL_84eb: mul - IL_84ec: call void [System.Console]System.Console::Write(int32) - IL_84f1: dup - IL_84f2: ldc.i4.8 - IL_84f3: sub - IL_84f4: call void [System.Console]System.Console::Write(int32) - IL_84f9: dup - IL_84fa: ldc.i4.6 - IL_84fb: sub - IL_84fc: call void [System.Console]System.Console::Write(int32) - IL_8501: dup - IL_8502: ldc.i4.7 - IL_8503: xor - IL_8504: call void [System.Console]System.Console::Write(int32) - IL_8509: dup - IL_850a: ldc.i4.7 - IL_850b: mul - IL_850c: call void [System.Console]System.Console::Write(int32) - IL_8511: dup - IL_8512: ldc.i4.8 - IL_8513: sub - IL_8514: call void [System.Console]System.Console::Write(int32) - IL_8519: dup - IL_851a: ldc.i4.4 - IL_851b: shr - IL_851c: call void [System.Console]System.Console::Write(int32) - IL_8521: dup - IL_8522: ldc.i4.5 - IL_8523: or - IL_8524: call void [System.Console]System.Console::Write(int32) - IL_8529: dup - IL_852a: ldc.i4.8 - IL_852b: sub - IL_852c: call void [System.Console]System.Console::Write(int32) - IL_8531: dup - IL_8532: ldc.i4.5 - IL_8533: xor - IL_8534: call void [System.Console]System.Console::Write(int32) - IL_8539: dup - IL_853a: ldc.i4.7 - IL_853b: sub - IL_853c: call void [System.Console]System.Console::Write(int32) - IL_8541: dup - IL_8542: ldc.i4.2 - IL_8543: add - IL_8544: call void [System.Console]System.Console::Write(int32) - IL_8549: dup - IL_854a: ldc.i4.3 - IL_854b: and - IL_854c: call void [System.Console]System.Console::Write(int32) - IL_8551: dup - IL_8552: ldc.i4.2 - IL_8553: or - IL_8554: call void [System.Console]System.Console::Write(int32) - IL_8559: dup - IL_855a: ldc.i4.8 - IL_855b: xor - IL_855c: call void [System.Console]System.Console::Write(int32) - IL_8561: dup - IL_8562: ldc.i4.1 - IL_8563: and - IL_8564: call void [System.Console]System.Console::Write(int32) - IL_8569: dup - IL_856a: ldc.i4.0 - IL_856b: xor - IL_856c: call void [System.Console]System.Console::Write(int32) - IL_8571: dup - IL_8572: ldc.i4.0 - IL_8573: xor - IL_8574: call void [System.Console]System.Console::Write(int32) - IL_8579: dup - IL_857a: ldc.i4.8 - IL_857b: sub - IL_857c: call void [System.Console]System.Console::Write(int32) - IL_8581: dup - IL_8582: ldc.i4.4 - IL_8583: add - IL_8584: call void [System.Console]System.Console::Write(int32) - IL_8589: dup - IL_858a: ldc.i4.4 - IL_858b: sub - IL_858c: call void [System.Console]System.Console::Write(int32) - IL_8591: dup - IL_8592: ldc.i4.6 - IL_8593: mul - IL_8594: call void [System.Console]System.Console::Write(int32) - IL_8599: dup - IL_859a: ldc.i4.8 - IL_859b: mul - IL_859c: call void [System.Console]System.Console::Write(int32) - IL_85a1: dup - IL_85a2: ldc.i4.3 - IL_85a3: sub - IL_85a4: call void [System.Console]System.Console::Write(int32) - IL_85a9: dup - IL_85aa: ldc.i4.5 - IL_85ab: shl - IL_85ac: call void [System.Console]System.Console::Write(int32) - IL_85b1: dup - IL_85b2: ldc.i4.6 - IL_85b3: sub - IL_85b4: call void [System.Console]System.Console::Write(int32) - IL_85b9: dup - IL_85ba: ldc.i4.8 - IL_85bb: xor - IL_85bc: call void [System.Console]System.Console::Write(int32) - IL_85c1: dup - IL_85c2: ldc.i4.3 - IL_85c3: and - IL_85c4: call void [System.Console]System.Console::Write(int32) - IL_85c9: dup - IL_85ca: ldc.i4.8 - IL_85cb: or - IL_85cc: call void [System.Console]System.Console::Write(int32) - IL_85d1: dup - IL_85d2: ldc.i4.7 - IL_85d3: or - IL_85d4: call void [System.Console]System.Console::Write(int32) - IL_85d9: dup - IL_85da: ldc.i4.7 - IL_85db: or - IL_85dc: call void [System.Console]System.Console::Write(int32) - IL_85e1: dup - IL_85e2: ldc.i4.4 - IL_85e3: mul - IL_85e4: call void [System.Console]System.Console::Write(int32) - IL_85e9: dup - IL_85ea: ldc.i4.0 - IL_85eb: add - IL_85ec: call void [System.Console]System.Console::Write(int32) - IL_85f1: dup - IL_85f2: ldc.i4.1 - IL_85f3: or - IL_85f4: call void [System.Console]System.Console::Write(int32) - IL_85f9: dup - IL_85fa: ldc.i4.4 - IL_85fb: sub - IL_85fc: call void [System.Console]System.Console::Write(int32) - IL_8601: dup - IL_8602: ldc.i4.8 - IL_8603: shr - IL_8604: call void [System.Console]System.Console::Write(int32) - IL_8609: dup - IL_860a: ldc.i4.6 - IL_860b: shl - IL_860c: call void [System.Console]System.Console::Write(int32) - IL_8611: dup - IL_8612: ldc.i4.8 - IL_8613: shr - IL_8614: call void [System.Console]System.Console::Write(int32) - IL_8619: dup - IL_861a: ldc.i4.4 - IL_861b: or - IL_861c: call void [System.Console]System.Console::Write(int32) - IL_8621: dup - IL_8622: ldc.i4.0 - IL_8623: add - IL_8624: call void [System.Console]System.Console::Write(int32) - IL_8629: dup - IL_862a: ldc.i4.4 - IL_862b: sub - IL_862c: call void [System.Console]System.Console::Write(int32) - IL_8631: dup - IL_8632: ldc.i4.3 - IL_8633: mul - IL_8634: call void [System.Console]System.Console::Write(int32) - IL_8639: dup - IL_863a: ldc.i4.6 - IL_863b: or - IL_863c: call void [System.Console]System.Console::Write(int32) - IL_8641: dup - IL_8642: ldc.i4.8 - IL_8643: shl - IL_8644: call void [System.Console]System.Console::Write(int32) - IL_8649: dup - IL_864a: ldc.i4.1 - IL_864b: mul - IL_864c: call void [System.Console]System.Console::Write(int32) - IL_8651: dup - IL_8652: ldc.i4.4 - IL_8653: add - IL_8654: call void [System.Console]System.Console::Write(int32) - IL_8659: dup - IL_865a: ldc.i4.3 - IL_865b: shl - IL_865c: call void [System.Console]System.Console::Write(int32) - IL_8661: dup - IL_8662: ldc.i4.1 - IL_8663: shr - IL_8664: call void [System.Console]System.Console::Write(int32) - IL_8669: dup - IL_866a: ldc.i4.5 - IL_866b: xor - IL_866c: call void [System.Console]System.Console::Write(int32) - IL_8671: dup - IL_8672: ldc.i4.2 - IL_8673: or - IL_8674: call void [System.Console]System.Console::Write(int32) - IL_8679: dup - IL_867a: ldc.i4.1 - IL_867b: xor - IL_867c: call void [System.Console]System.Console::Write(int32) - IL_8681: dup - IL_8682: ldc.i4.5 - IL_8683: xor - IL_8684: call void [System.Console]System.Console::Write(int32) - IL_8689: dup - IL_868a: ldc.i4.5 - IL_868b: or - IL_868c: call void [System.Console]System.Console::Write(int32) - IL_8691: dup - IL_8692: ldc.i4.5 - IL_8693: mul - IL_8694: call void [System.Console]System.Console::Write(int32) - IL_8699: dup - IL_869a: ldc.i4.5 - IL_869b: shr - IL_869c: call void [System.Console]System.Console::Write(int32) - IL_86a1: dup - IL_86a2: ldc.i4.2 - IL_86a3: add - IL_86a4: call void [System.Console]System.Console::Write(int32) - IL_86a9: dup - IL_86aa: ldc.i4.7 - IL_86ab: shr - IL_86ac: call void [System.Console]System.Console::Write(int32) - IL_86b1: dup - IL_86b2: ldc.i4.3 - IL_86b3: shr - IL_86b4: call void [System.Console]System.Console::Write(int32) - IL_86b9: dup - IL_86ba: ldc.i4.4 - IL_86bb: sub - IL_86bc: call void [System.Console]System.Console::Write(int32) - IL_86c1: dup - IL_86c2: ldc.i4.5 - IL_86c3: sub - IL_86c4: call void [System.Console]System.Console::Write(int32) - IL_86c9: dup - IL_86ca: ldc.i4.1 - IL_86cb: shl - IL_86cc: call void [System.Console]System.Console::Write(int32) - IL_86d1: dup - IL_86d2: ldc.i4.7 - IL_86d3: mul - IL_86d4: call void [System.Console]System.Console::Write(int32) - IL_86d9: dup - IL_86da: ldc.i4.6 - IL_86db: and - IL_86dc: call void [System.Console]System.Console::Write(int32) - IL_86e1: dup - IL_86e2: ldc.i4.3 - IL_86e3: add - IL_86e4: call void [System.Console]System.Console::Write(int32) - IL_86e9: dup - IL_86ea: ldc.i4.4 - IL_86eb: mul - IL_86ec: call void [System.Console]System.Console::Write(int32) - IL_86f1: dup - IL_86f2: ldc.i4.0 - IL_86f3: add - IL_86f4: call void [System.Console]System.Console::Write(int32) - IL_86f9: dup - IL_86fa: ldc.i4.6 - IL_86fb: sub - IL_86fc: call void [System.Console]System.Console::Write(int32) - IL_8701: dup - IL_8702: ldc.i4.8 - IL_8703: add - IL_8704: call void [System.Console]System.Console::Write(int32) - IL_8709: dup - IL_870a: ldc.i4.5 - IL_870b: or - IL_870c: call void [System.Console]System.Console::Write(int32) - IL_8711: dup - IL_8712: ldc.i4.6 - IL_8713: and - IL_8714: call void [System.Console]System.Console::Write(int32) - IL_8719: dup - IL_871a: ldc.i4.3 - IL_871b: shr - IL_871c: call void [System.Console]System.Console::Write(int32) - IL_8721: dup - IL_8722: ldc.i4.0 - IL_8723: shl - IL_8724: call void [System.Console]System.Console::Write(int32) - IL_8729: dup - IL_872a: ldc.i4.8 - IL_872b: xor - IL_872c: call void [System.Console]System.Console::Write(int32) - IL_8731: dup - IL_8732: ldc.i4.2 - IL_8733: shr - IL_8734: call void [System.Console]System.Console::Write(int32) - IL_8739: dup - IL_873a: ldc.i4.1 - IL_873b: xor - IL_873c: call void [System.Console]System.Console::Write(int32) - IL_8741: dup - IL_8742: ldc.i4.0 - IL_8743: xor - IL_8744: call void [System.Console]System.Console::Write(int32) - IL_8749: dup - IL_874a: ldc.i4.7 - IL_874b: add - IL_874c: call void [System.Console]System.Console::Write(int32) - IL_8751: dup - IL_8752: ldc.i4.6 - IL_8753: shr - IL_8754: call void [System.Console]System.Console::Write(int32) - IL_8759: dup - IL_875a: ldc.i4.4 - IL_875b: mul - IL_875c: call void [System.Console]System.Console::Write(int32) - IL_8761: dup - IL_8762: ldc.i4.6 - IL_8763: shr - IL_8764: call void [System.Console]System.Console::Write(int32) - IL_8769: dup - IL_876a: ldc.i4.5 - IL_876b: xor - IL_876c: call void [System.Console]System.Console::Write(int32) - IL_8771: dup - IL_8772: ldc.i4.7 - IL_8773: mul - IL_8774: call void [System.Console]System.Console::Write(int32) - IL_8779: dup - IL_877a: ldc.i4.5 - IL_877b: sub - IL_877c: call void [System.Console]System.Console::Write(int32) - IL_8781: dup - IL_8782: ldc.i4.3 - IL_8783: shr - IL_8784: call void [System.Console]System.Console::Write(int32) - IL_8789: dup - IL_878a: ldc.i4.6 - IL_878b: mul - IL_878c: call void [System.Console]System.Console::Write(int32) - IL_8791: dup - IL_8792: ldc.i4.1 - IL_8793: shl - IL_8794: call void [System.Console]System.Console::Write(int32) - IL_8799: dup - IL_879a: ldc.i4.3 - IL_879b: and - IL_879c: call void [System.Console]System.Console::Write(int32) - IL_87a1: dup - IL_87a2: ldc.i4.6 - IL_87a3: shl - IL_87a4: call void [System.Console]System.Console::Write(int32) - IL_87a9: dup - IL_87aa: ldc.i4.4 - IL_87ab: mul - IL_87ac: call void [System.Console]System.Console::Write(int32) - IL_87b1: dup - IL_87b2: ldc.i4.3 - IL_87b3: mul - IL_87b4: call void [System.Console]System.Console::Write(int32) - IL_87b9: dup - IL_87ba: ldc.i4.5 - IL_87bb: shl - IL_87bc: call void [System.Console]System.Console::Write(int32) - IL_87c1: dup - IL_87c2: ldc.i4.8 - IL_87c3: add - IL_87c4: call void [System.Console]System.Console::Write(int32) - IL_87c9: dup - IL_87ca: ldc.i4.1 - IL_87cb: shl - IL_87cc: call void [System.Console]System.Console::Write(int32) - IL_87d1: dup - IL_87d2: ldc.i4.2 - IL_87d3: shl - IL_87d4: call void [System.Console]System.Console::Write(int32) - IL_87d9: dup - IL_87da: ldc.i4.3 - IL_87db: mul - IL_87dc: call void [System.Console]System.Console::Write(int32) - IL_87e1: dup - IL_87e2: ldc.i4.5 - IL_87e3: sub - IL_87e4: call void [System.Console]System.Console::Write(int32) - IL_87e9: dup - IL_87ea: ldc.i4.1 - IL_87eb: add - IL_87ec: call void [System.Console]System.Console::Write(int32) - IL_87f1: dup - IL_87f2: ldc.i4.1 - IL_87f3: or - IL_87f4: call void [System.Console]System.Console::Write(int32) - IL_87f9: dup - IL_87fa: ldc.i4.7 - IL_87fb: shr - IL_87fc: call void [System.Console]System.Console::Write(int32) - IL_8801: dup - IL_8802: ldc.i4.8 - IL_8803: shr - IL_8804: call void [System.Console]System.Console::Write(int32) - IL_8809: dup - IL_880a: ldc.i4.0 - IL_880b: shr - IL_880c: call void [System.Console]System.Console::Write(int32) - IL_8811: dup - IL_8812: ldc.i4.8 - IL_8813: and - IL_8814: call void [System.Console]System.Console::Write(int32) - IL_8819: dup - IL_881a: ldc.i4.2 - IL_881b: xor - IL_881c: call void [System.Console]System.Console::Write(int32) - IL_8821: dup - IL_8822: ldc.i4.0 - IL_8823: add - IL_8824: call void [System.Console]System.Console::Write(int32) - IL_8829: dup - IL_882a: ldc.i4.3 - IL_882b: sub - IL_882c: call void [System.Console]System.Console::Write(int32) - IL_8831: dup - IL_8832: ldc.i4.1 - IL_8833: sub - IL_8834: call void [System.Console]System.Console::Write(int32) - IL_8839: dup - IL_883a: ldc.i4.8 - IL_883b: xor - IL_883c: call void [System.Console]System.Console::Write(int32) - IL_8841: dup - IL_8842: ldc.i4.1 - IL_8843: add - IL_8844: call void [System.Console]System.Console::Write(int32) - IL_8849: dup - IL_884a: ldc.i4.5 - IL_884b: and - IL_884c: call void [System.Console]System.Console::Write(int32) - IL_8851: dup - IL_8852: ldc.i4.0 - IL_8853: or - IL_8854: call void [System.Console]System.Console::Write(int32) - IL_8859: dup - IL_885a: ldc.i4.8 - IL_885b: and - IL_885c: call void [System.Console]System.Console::Write(int32) - IL_8861: dup - IL_8862: ldc.i4.1 - IL_8863: xor - IL_8864: call void [System.Console]System.Console::Write(int32) - IL_8869: dup - IL_886a: ldc.i4.6 - IL_886b: or - IL_886c: call void [System.Console]System.Console::Write(int32) - IL_8871: dup - IL_8872: ldc.i4.3 - IL_8873: xor - IL_8874: call void [System.Console]System.Console::Write(int32) - IL_8879: dup - IL_887a: ldc.i4.5 - IL_887b: and - IL_887c: call void [System.Console]System.Console::Write(int32) - IL_8881: dup - IL_8882: ldc.i4.6 - IL_8883: and - IL_8884: call void [System.Console]System.Console::Write(int32) - IL_8889: dup - IL_888a: ldc.i4.3 - IL_888b: shr - IL_888c: call void [System.Console]System.Console::Write(int32) - IL_8891: dup - IL_8892: ldc.i4.2 - IL_8893: or - IL_8894: call void [System.Console]System.Console::Write(int32) - IL_8899: dup - IL_889a: ldc.i4.5 - IL_889b: add - IL_889c: call void [System.Console]System.Console::Write(int32) - IL_88a1: dup - IL_88a2: ldc.i4.6 - IL_88a3: shr - IL_88a4: call void [System.Console]System.Console::Write(int32) - IL_88a9: dup - IL_88aa: ldc.i4.5 - IL_88ab: sub - IL_88ac: call void [System.Console]System.Console::Write(int32) - IL_88b1: dup - IL_88b2: ldc.i4.1 - IL_88b3: sub - IL_88b4: call void [System.Console]System.Console::Write(int32) - IL_88b9: dup - IL_88ba: ldc.i4.1 - IL_88bb: xor - IL_88bc: call void [System.Console]System.Console::Write(int32) - IL_88c1: dup - IL_88c2: ldc.i4.2 - IL_88c3: shr - IL_88c4: call void [System.Console]System.Console::Write(int32) - IL_88c9: dup - IL_88ca: ldc.i4.7 - IL_88cb: sub - IL_88cc: call void [System.Console]System.Console::Write(int32) - IL_88d1: dup - IL_88d2: ldc.i4.3 - IL_88d3: add - IL_88d4: call void [System.Console]System.Console::Write(int32) - IL_88d9: dup - IL_88da: ldc.i4.5 - IL_88db: add - IL_88dc: call void [System.Console]System.Console::Write(int32) - IL_88e1: dup - IL_88e2: ldc.i4.6 - IL_88e3: sub - IL_88e4: call void [System.Console]System.Console::Write(int32) - IL_88e9: dup - IL_88ea: ldc.i4.3 - IL_88eb: shl - IL_88ec: call void [System.Console]System.Console::Write(int32) - IL_88f1: dup - IL_88f2: ldc.i4.0 - IL_88f3: mul - IL_88f4: call void [System.Console]System.Console::Write(int32) - IL_88f9: dup - IL_88fa: ldc.i4.0 - IL_88fb: shl - IL_88fc: call void [System.Console]System.Console::Write(int32) - IL_8901: dup - IL_8902: ldc.i4.3 - IL_8903: shl - IL_8904: call void [System.Console]System.Console::Write(int32) - IL_8909: dup - IL_890a: ldc.i4.4 - IL_890b: mul - IL_890c: call void [System.Console]System.Console::Write(int32) - IL_8911: dup - IL_8912: ldc.i4.7 - IL_8913: mul - IL_8914: call void [System.Console]System.Console::Write(int32) - IL_8919: dup - IL_891a: ldc.i4.1 - IL_891b: sub - IL_891c: call void [System.Console]System.Console::Write(int32) - IL_8921: dup - IL_8922: ldc.i4.3 - IL_8923: xor - IL_8924: call void [System.Console]System.Console::Write(int32) - IL_8929: dup - IL_892a: ldc.i4.0 - IL_892b: xor - IL_892c: call void [System.Console]System.Console::Write(int32) - IL_8931: dup - IL_8932: ldc.i4.3 - IL_8933: and - IL_8934: call void [System.Console]System.Console::Write(int32) - IL_8939: dup - IL_893a: ldc.i4.5 - IL_893b: add - IL_893c: call void [System.Console]System.Console::Write(int32) - IL_8941: dup - IL_8942: ldc.i4.2 - IL_8943: xor - IL_8944: call void [System.Console]System.Console::Write(int32) - IL_8949: dup - IL_894a: ldc.i4.5 - IL_894b: shr - IL_894c: call void [System.Console]System.Console::Write(int32) - IL_8951: dup - IL_8952: ldc.i4.4 - IL_8953: xor - IL_8954: call void [System.Console]System.Console::Write(int32) - IL_8959: dup - IL_895a: ldc.i4.4 - IL_895b: shr - IL_895c: call void [System.Console]System.Console::Write(int32) - IL_8961: dup - IL_8962: ldc.i4.1 - IL_8963: xor - IL_8964: call void [System.Console]System.Console::Write(int32) - IL_8969: dup - IL_896a: ldc.i4.8 - IL_896b: add - IL_896c: call void [System.Console]System.Console::Write(int32) - IL_8971: dup - IL_8972: ldc.i4.4 - IL_8973: add - IL_8974: call void [System.Console]System.Console::Write(int32) - IL_8979: dup - IL_897a: ldc.i4.0 - IL_897b: xor - IL_897c: call void [System.Console]System.Console::Write(int32) - IL_8981: dup - IL_8982: ldc.i4.5 - IL_8983: add - IL_8984: call void [System.Console]System.Console::Write(int32) - IL_8989: dup - IL_898a: ldc.i4.7 - IL_898b: shl - IL_898c: call void [System.Console]System.Console::Write(int32) - IL_8991: dup - IL_8992: ldc.i4.5 - IL_8993: and - IL_8994: call void [System.Console]System.Console::Write(int32) - IL_8999: dup - IL_899a: ldc.i4.5 - IL_899b: add - IL_899c: call void [System.Console]System.Console::Write(int32) - IL_89a1: dup - IL_89a2: ldc.i4.4 - IL_89a3: shr - IL_89a4: call void [System.Console]System.Console::Write(int32) - IL_89a9: dup - IL_89aa: ldc.i4.6 - IL_89ab: and - IL_89ac: call void [System.Console]System.Console::Write(int32) - IL_89b1: dup - IL_89b2: ldc.i4.8 - IL_89b3: sub - IL_89b4: call void [System.Console]System.Console::Write(int32) - IL_89b9: dup - IL_89ba: ldc.i4.6 - IL_89bb: or - IL_89bc: call void [System.Console]System.Console::Write(int32) - IL_89c1: dup - IL_89c2: ldc.i4.4 - IL_89c3: xor - IL_89c4: call void [System.Console]System.Console::Write(int32) - IL_89c9: dup - IL_89ca: ldc.i4.2 - IL_89cb: shr - IL_89cc: call void [System.Console]System.Console::Write(int32) - IL_89d1: dup - IL_89d2: ldc.i4.6 - IL_89d3: mul - IL_89d4: call void [System.Console]System.Console::Write(int32) - IL_89d9: dup - IL_89da: ldc.i4.0 - IL_89db: or - IL_89dc: call void [System.Console]System.Console::Write(int32) - IL_89e1: dup - IL_89e2: ldc.i4.0 - IL_89e3: and - IL_89e4: call void [System.Console]System.Console::Write(int32) - IL_89e9: dup - IL_89ea: ldc.i4.1 - IL_89eb: xor - IL_89ec: call void [System.Console]System.Console::Write(int32) - IL_89f1: dup - IL_89f2: ldc.i4.2 - IL_89f3: add - IL_89f4: call void [System.Console]System.Console::Write(int32) - IL_89f9: dup - IL_89fa: ldc.i4.6 - IL_89fb: mul - IL_89fc: call void [System.Console]System.Console::Write(int32) - IL_8a01: dup - IL_8a02: ldc.i4.4 - IL_8a03: shr - IL_8a04: call void [System.Console]System.Console::Write(int32) - IL_8a09: dup - IL_8a0a: ldc.i4.6 - IL_8a0b: mul - IL_8a0c: call void [System.Console]System.Console::Write(int32) - IL_8a11: dup - IL_8a12: ldc.i4.8 - IL_8a13: add - IL_8a14: call void [System.Console]System.Console::Write(int32) - IL_8a19: dup - IL_8a1a: ldc.i4.3 - IL_8a1b: mul - IL_8a1c: call void [System.Console]System.Console::Write(int32) - IL_8a21: dup - IL_8a22: ldc.i4.7 - IL_8a23: shl - IL_8a24: call void [System.Console]System.Console::Write(int32) - IL_8a29: dup - IL_8a2a: ldc.i4.1 - IL_8a2b: or - IL_8a2c: call void [System.Console]System.Console::Write(int32) - IL_8a31: dup - IL_8a32: ldc.i4.6 - IL_8a33: shr - IL_8a34: call void [System.Console]System.Console::Write(int32) - IL_8a39: dup - IL_8a3a: ldc.i4.6 - IL_8a3b: or - IL_8a3c: call void [System.Console]System.Console::Write(int32) - IL_8a41: dup - IL_8a42: ldc.i4.6 - IL_8a43: add - IL_8a44: call void [System.Console]System.Console::Write(int32) - IL_8a49: dup - IL_8a4a: ldc.i4.4 - IL_8a4b: add - IL_8a4c: call void [System.Console]System.Console::Write(int32) - IL_8a51: dup - IL_8a52: ldc.i4.7 - IL_8a53: mul - IL_8a54: call void [System.Console]System.Console::Write(int32) - IL_8a59: dup - IL_8a5a: ldc.i4.6 - IL_8a5b: mul - IL_8a5c: call void [System.Console]System.Console::Write(int32) - IL_8a61: dup - IL_8a62: ldc.i4.8 - IL_8a63: and - IL_8a64: call void [System.Console]System.Console::Write(int32) - IL_8a69: dup - IL_8a6a: ldc.i4.4 - IL_8a6b: and - IL_8a6c: call void [System.Console]System.Console::Write(int32) - IL_8a71: dup - IL_8a72: ldc.i4.6 - IL_8a73: sub - IL_8a74: call void [System.Console]System.Console::Write(int32) - IL_8a79: dup - IL_8a7a: ldc.i4.6 - IL_8a7b: xor - IL_8a7c: call void [System.Console]System.Console::Write(int32) - IL_8a81: dup - IL_8a82: ldc.i4.8 - IL_8a83: xor - IL_8a84: call void [System.Console]System.Console::Write(int32) - IL_8a89: dup - IL_8a8a: ldc.i4.3 - IL_8a8b: mul - IL_8a8c: call void [System.Console]System.Console::Write(int32) - IL_8a91: dup - IL_8a92: ldc.i4.4 - IL_8a93: mul - IL_8a94: call void [System.Console]System.Console::Write(int32) - IL_8a99: dup - IL_8a9a: ldc.i4.8 - IL_8a9b: xor - IL_8a9c: call void [System.Console]System.Console::Write(int32) - IL_8aa1: dup - IL_8aa2: ldc.i4.0 - IL_8aa3: or - IL_8aa4: call void [System.Console]System.Console::Write(int32) - IL_8aa9: dup - IL_8aaa: ldc.i4.8 - IL_8aab: add - IL_8aac: call void [System.Console]System.Console::Write(int32) - IL_8ab1: dup - IL_8ab2: ldc.i4.1 - IL_8ab3: sub - IL_8ab4: call void [System.Console]System.Console::Write(int32) - IL_8ab9: dup - IL_8aba: ldc.i4.1 - IL_8abb: xor - IL_8abc: call void [System.Console]System.Console::Write(int32) - IL_8ac1: dup - IL_8ac2: ldc.i4.1 - IL_8ac3: mul - IL_8ac4: call void [System.Console]System.Console::Write(int32) - IL_8ac9: dup - IL_8aca: ldc.i4.6 - IL_8acb: mul - IL_8acc: call void [System.Console]System.Console::Write(int32) - IL_8ad1: dup - IL_8ad2: ldc.i4.5 - IL_8ad3: shl - IL_8ad4: call void [System.Console]System.Console::Write(int32) - IL_8ad9: dup - IL_8ada: ldc.i4.4 - IL_8adb: add - IL_8adc: call void [System.Console]System.Console::Write(int32) - IL_8ae1: dup - IL_8ae2: ldc.i4.8 - IL_8ae3: xor - IL_8ae4: call void [System.Console]System.Console::Write(int32) - IL_8ae9: dup - IL_8aea: ldc.i4.3 - IL_8aeb: sub - IL_8aec: call void [System.Console]System.Console::Write(int32) - IL_8af1: dup - IL_8af2: ldc.i4.5 - IL_8af3: shl - IL_8af4: call void [System.Console]System.Console::Write(int32) - IL_8af9: dup - IL_8afa: ldc.i4.5 - IL_8afb: shl - IL_8afc: call void [System.Console]System.Console::Write(int32) - IL_8b01: dup - IL_8b02: ldc.i4.8 - IL_8b03: shr - IL_8b04: call void [System.Console]System.Console::Write(int32) - IL_8b09: dup - IL_8b0a: ldc.i4.8 - IL_8b0b: mul - IL_8b0c: call void [System.Console]System.Console::Write(int32) - IL_8b11: dup - IL_8b12: ldc.i4.2 - IL_8b13: xor - IL_8b14: call void [System.Console]System.Console::Write(int32) - IL_8b19: dup - IL_8b1a: ldc.i4.3 - IL_8b1b: mul - IL_8b1c: call void [System.Console]System.Console::Write(int32) - IL_8b21: dup - IL_8b22: ldc.i4.0 - IL_8b23: add - IL_8b24: call void [System.Console]System.Console::Write(int32) - IL_8b29: dup - IL_8b2a: ldc.i4.0 - IL_8b2b: and - IL_8b2c: call void [System.Console]System.Console::Write(int32) - IL_8b31: dup - IL_8b32: ldc.i4.4 - IL_8b33: shl - IL_8b34: call void [System.Console]System.Console::Write(int32) - IL_8b39: dup - IL_8b3a: ldc.i4.0 - IL_8b3b: and - IL_8b3c: call void [System.Console]System.Console::Write(int32) - IL_8b41: dup - IL_8b42: ldc.i4.5 - IL_8b43: add - IL_8b44: call void [System.Console]System.Console::Write(int32) - IL_8b49: dup - IL_8b4a: ldc.i4.5 - IL_8b4b: xor - IL_8b4c: call void [System.Console]System.Console::Write(int32) - IL_8b51: dup - IL_8b52: ldc.i4.4 - IL_8b53: mul - IL_8b54: call void [System.Console]System.Console::Write(int32) - IL_8b59: dup - IL_8b5a: ldc.i4.8 - IL_8b5b: mul - IL_8b5c: call void [System.Console]System.Console::Write(int32) - IL_8b61: dup - IL_8b62: ldc.i4.8 - IL_8b63: mul - IL_8b64: call void [System.Console]System.Console::Write(int32) - IL_8b69: dup - IL_8b6a: ldc.i4.3 - IL_8b6b: add - IL_8b6c: call void [System.Console]System.Console::Write(int32) - IL_8b71: dup - IL_8b72: ldc.i4.8 - IL_8b73: and - IL_8b74: call void [System.Console]System.Console::Write(int32) - IL_8b79: dup - IL_8b7a: ldc.i4.8 - IL_8b7b: xor - IL_8b7c: call void [System.Console]System.Console::Write(int32) - IL_8b81: dup - IL_8b82: ldc.i4.2 - IL_8b83: mul - IL_8b84: call void [System.Console]System.Console::Write(int32) - IL_8b89: dup - IL_8b8a: ldc.i4.1 - IL_8b8b: shl - IL_8b8c: call void [System.Console]System.Console::Write(int32) - IL_8b91: dup - IL_8b92: ldc.i4.1 - IL_8b93: or - IL_8b94: call void [System.Console]System.Console::Write(int32) - IL_8b99: dup - IL_8b9a: ldc.i4.2 - IL_8b9b: shr - IL_8b9c: call void [System.Console]System.Console::Write(int32) - IL_8ba1: dup - IL_8ba2: ldc.i4.7 - IL_8ba3: mul - IL_8ba4: call void [System.Console]System.Console::Write(int32) - IL_8ba9: dup - IL_8baa: ldc.i4.2 - IL_8bab: xor - IL_8bac: call void [System.Console]System.Console::Write(int32) - IL_8bb1: dup - IL_8bb2: ldc.i4.4 - IL_8bb3: shr - IL_8bb4: call void [System.Console]System.Console::Write(int32) - IL_8bb9: dup - IL_8bba: ldc.i4.5 - IL_8bbb: xor - IL_8bbc: call void [System.Console]System.Console::Write(int32) - IL_8bc1: dup - IL_8bc2: ldc.i4.3 - IL_8bc3: shr - IL_8bc4: call void [System.Console]System.Console::Write(int32) - IL_8bc9: dup - IL_8bca: ldc.i4.4 - IL_8bcb: shl - IL_8bcc: call void [System.Console]System.Console::Write(int32) - IL_8bd1: dup - IL_8bd2: ldc.i4.8 - IL_8bd3: sub - IL_8bd4: call void [System.Console]System.Console::Write(int32) - IL_8bd9: dup - IL_8bda: ldc.i4.0 - IL_8bdb: shl - IL_8bdc: call void [System.Console]System.Console::Write(int32) - IL_8be1: dup - IL_8be2: ldc.i4.7 - IL_8be3: shr - IL_8be4: call void [System.Console]System.Console::Write(int32) - IL_8be9: dup - IL_8bea: ldc.i4.3 - IL_8beb: or - IL_8bec: call void [System.Console]System.Console::Write(int32) - IL_8bf1: dup - IL_8bf2: ldc.i4.0 - IL_8bf3: mul - IL_8bf4: call void [System.Console]System.Console::Write(int32) - IL_8bf9: dup - IL_8bfa: ldc.i4.3 - IL_8bfb: sub - IL_8bfc: call void [System.Console]System.Console::Write(int32) - IL_8c01: dup - IL_8c02: ldc.i4.1 - IL_8c03: shr - IL_8c04: call void [System.Console]System.Console::Write(int32) - IL_8c09: dup - IL_8c0a: ldc.i4.5 - IL_8c0b: sub - IL_8c0c: call void [System.Console]System.Console::Write(int32) - IL_8c11: dup - IL_8c12: ldc.i4.3 - IL_8c13: shl - IL_8c14: call void [System.Console]System.Console::Write(int32) - IL_8c19: dup - IL_8c1a: ldc.i4.4 - IL_8c1b: shr - IL_8c1c: call void [System.Console]System.Console::Write(int32) - IL_8c21: dup - IL_8c22: ldc.i4.7 - IL_8c23: or - IL_8c24: call void [System.Console]System.Console::Write(int32) - IL_8c29: dup - IL_8c2a: ldc.i4.5 - IL_8c2b: sub - IL_8c2c: call void [System.Console]System.Console::Write(int32) - IL_8c31: dup - IL_8c32: ldc.i4.0 - IL_8c33: xor - IL_8c34: call void [System.Console]System.Console::Write(int32) - IL_8c39: dup - IL_8c3a: ldc.i4.6 - IL_8c3b: sub - IL_8c3c: call void [System.Console]System.Console::Write(int32) - IL_8c41: dup - IL_8c42: ldc.i4.5 - IL_8c43: or - IL_8c44: call void [System.Console]System.Console::Write(int32) - IL_8c49: dup - IL_8c4a: ldc.i4.6 - IL_8c4b: mul - IL_8c4c: call void [System.Console]System.Console::Write(int32) - IL_8c51: dup - IL_8c52: ldc.i4.2 - IL_8c53: mul - IL_8c54: call void [System.Console]System.Console::Write(int32) - IL_8c59: dup - IL_8c5a: ldc.i4.4 - IL_8c5b: add - IL_8c5c: call void [System.Console]System.Console::Write(int32) - IL_8c61: dup - IL_8c62: ldc.i4.1 - IL_8c63: shr - IL_8c64: call void [System.Console]System.Console::Write(int32) - IL_8c69: dup - IL_8c6a: ldc.i4.6 - IL_8c6b: shl - IL_8c6c: call void [System.Console]System.Console::Write(int32) - IL_8c71: dup - IL_8c72: ldc.i4.4 - IL_8c73: sub - IL_8c74: call void [System.Console]System.Console::Write(int32) - IL_8c79: dup - IL_8c7a: ldc.i4.5 - IL_8c7b: shl - IL_8c7c: call void [System.Console]System.Console::Write(int32) - IL_8c81: dup - IL_8c82: ldc.i4.8 - IL_8c83: add - IL_8c84: call void [System.Console]System.Console::Write(int32) - IL_8c89: dup - IL_8c8a: ldc.i4.2 - IL_8c8b: or - IL_8c8c: call void [System.Console]System.Console::Write(int32) - IL_8c91: dup - IL_8c92: ldc.i4.0 - IL_8c93: xor - IL_8c94: call void [System.Console]System.Console::Write(int32) - IL_8c99: dup - IL_8c9a: ldc.i4.0 - IL_8c9b: shr - IL_8c9c: call void [System.Console]System.Console::Write(int32) - IL_8ca1: dup - IL_8ca2: ldc.i4.0 - IL_8ca3: and - IL_8ca4: call void [System.Console]System.Console::Write(int32) - IL_8ca9: dup - IL_8caa: ldc.i4.6 - IL_8cab: or - IL_8cac: call void [System.Console]System.Console::Write(int32) - IL_8cb1: dup - IL_8cb2: ldc.i4.5 - IL_8cb3: or - IL_8cb4: call void [System.Console]System.Console::Write(int32) - IL_8cb9: dup - IL_8cba: ldc.i4.4 - IL_8cbb: xor - IL_8cbc: call void [System.Console]System.Console::Write(int32) - IL_8cc1: dup - IL_8cc2: ldc.i4.8 - IL_8cc3: sub - IL_8cc4: call void [System.Console]System.Console::Write(int32) - IL_8cc9: dup - IL_8cca: ldc.i4.3 - IL_8ccb: sub - IL_8ccc: call void [System.Console]System.Console::Write(int32) - IL_8cd1: dup - IL_8cd2: ldc.i4.5 - IL_8cd3: add - IL_8cd4: call void [System.Console]System.Console::Write(int32) - IL_8cd9: dup - IL_8cda: ldc.i4.7 - IL_8cdb: and - IL_8cdc: call void [System.Console]System.Console::Write(int32) - IL_8ce1: dup - IL_8ce2: ldc.i4.0 - IL_8ce3: xor - IL_8ce4: call void [System.Console]System.Console::Write(int32) - IL_8ce9: dup - IL_8cea: ldc.i4.8 - IL_8ceb: shr - IL_8cec: call void [System.Console]System.Console::Write(int32) - IL_8cf1: dup - IL_8cf2: ldc.i4.7 - IL_8cf3: or - IL_8cf4: call void [System.Console]System.Console::Write(int32) - IL_8cf9: dup - IL_8cfa: ldc.i4.1 - IL_8cfb: shl - IL_8cfc: call void [System.Console]System.Console::Write(int32) - IL_8d01: dup - IL_8d02: ldc.i4.2 - IL_8d03: add - IL_8d04: call void [System.Console]System.Console::Write(int32) - IL_8d09: dup - IL_8d0a: ldc.i4.2 - IL_8d0b: or - IL_8d0c: call void [System.Console]System.Console::Write(int32) - IL_8d11: dup - IL_8d12: ldc.i4.0 - IL_8d13: and - IL_8d14: call void [System.Console]System.Console::Write(int32) - IL_8d19: dup - IL_8d1a: ldc.i4.1 - IL_8d1b: sub - IL_8d1c: call void [System.Console]System.Console::Write(int32) - IL_8d21: dup - IL_8d22: ldc.i4.7 - IL_8d23: add - IL_8d24: call void [System.Console]System.Console::Write(int32) - IL_8d29: dup - IL_8d2a: ldc.i4.2 - IL_8d2b: shl - IL_8d2c: call void [System.Console]System.Console::Write(int32) - IL_8d31: dup - IL_8d32: ldc.i4.5 - IL_8d33: shl - IL_8d34: call void [System.Console]System.Console::Write(int32) - IL_8d39: dup - IL_8d3a: ldc.i4.4 - IL_8d3b: mul - IL_8d3c: call void [System.Console]System.Console::Write(int32) - IL_8d41: dup - IL_8d42: ldc.i4.1 - IL_8d43: mul - IL_8d44: call void [System.Console]System.Console::Write(int32) - IL_8d49: dup - IL_8d4a: ldc.i4.5 - IL_8d4b: mul - IL_8d4c: call void [System.Console]System.Console::Write(int32) - IL_8d51: dup - IL_8d52: ldc.i4.7 - IL_8d53: xor - IL_8d54: call void [System.Console]System.Console::Write(int32) - IL_8d59: dup - IL_8d5a: ldc.i4.8 - IL_8d5b: and - IL_8d5c: call void [System.Console]System.Console::Write(int32) - IL_8d61: dup - IL_8d62: ldc.i4.2 - IL_8d63: shl - IL_8d64: call void [System.Console]System.Console::Write(int32) - IL_8d69: dup - IL_8d6a: ldc.i4.7 - IL_8d6b: shl - IL_8d6c: call void [System.Console]System.Console::Write(int32) - IL_8d71: dup - IL_8d72: ldc.i4.4 - IL_8d73: mul - IL_8d74: call void [System.Console]System.Console::Write(int32) - IL_8d79: dup - IL_8d7a: ldc.i4.7 - IL_8d7b: add - IL_8d7c: call void [System.Console]System.Console::Write(int32) - IL_8d81: dup - IL_8d82: ldc.i4.5 - IL_8d83: sub - IL_8d84: call void [System.Console]System.Console::Write(int32) - IL_8d89: dup - IL_8d8a: ldc.i4.5 - IL_8d8b: shl - IL_8d8c: call void [System.Console]System.Console::Write(int32) - IL_8d91: dup - IL_8d92: ldc.i4.5 - IL_8d93: shl - IL_8d94: call void [System.Console]System.Console::Write(int32) - IL_8d99: dup - IL_8d9a: ldc.i4.2 - IL_8d9b: add - IL_8d9c: call void [System.Console]System.Console::Write(int32) - IL_8da1: dup - IL_8da2: ldc.i4.0 - IL_8da3: sub - IL_8da4: call void [System.Console]System.Console::Write(int32) - IL_8da9: dup - IL_8daa: ldc.i4.3 - IL_8dab: shl - IL_8dac: call void [System.Console]System.Console::Write(int32) - IL_8db1: dup - IL_8db2: ldc.i4.7 - IL_8db3: mul - IL_8db4: call void [System.Console]System.Console::Write(int32) - IL_8db9: dup - IL_8dba: ldc.i4.2 - IL_8dbb: shl - IL_8dbc: call void [System.Console]System.Console::Write(int32) - IL_8dc1: dup - IL_8dc2: ldc.i4.0 - IL_8dc3: shr - IL_8dc4: call void [System.Console]System.Console::Write(int32) - IL_8dc9: dup - IL_8dca: ldc.i4.5 - IL_8dcb: shl - IL_8dcc: call void [System.Console]System.Console::Write(int32) - IL_8dd1: dup - IL_8dd2: ldc.i4.3 - IL_8dd3: and - IL_8dd4: call void [System.Console]System.Console::Write(int32) - IL_8dd9: dup - IL_8dda: ldc.i4.6 - IL_8ddb: and - IL_8ddc: call void [System.Console]System.Console::Write(int32) - IL_8de1: dup - IL_8de2: ldc.i4.0 - IL_8de3: xor - IL_8de4: call void [System.Console]System.Console::Write(int32) - IL_8de9: dup - IL_8dea: ldc.i4.6 - IL_8deb: shl - IL_8dec: call void [System.Console]System.Console::Write(int32) - IL_8df1: dup - IL_8df2: ldc.i4.0 - IL_8df3: shl - IL_8df4: call void [System.Console]System.Console::Write(int32) - IL_8df9: dup - IL_8dfa: ldc.i4.5 - IL_8dfb: xor - IL_8dfc: call void [System.Console]System.Console::Write(int32) - IL_8e01: dup - IL_8e02: ldc.i4.1 - IL_8e03: sub - IL_8e04: call void [System.Console]System.Console::Write(int32) - IL_8e09: dup - IL_8e0a: ldc.i4.8 - IL_8e0b: mul - IL_8e0c: call void [System.Console]System.Console::Write(int32) - IL_8e11: dup - IL_8e12: ldc.i4.8 - IL_8e13: or - IL_8e14: call void [System.Console]System.Console::Write(int32) - IL_8e19: dup - IL_8e1a: ldc.i4.5 - IL_8e1b: shl - IL_8e1c: call void [System.Console]System.Console::Write(int32) - IL_8e21: dup - IL_8e22: ldc.i4.8 - IL_8e23: shl - IL_8e24: call void [System.Console]System.Console::Write(int32) - IL_8e29: dup - IL_8e2a: ldc.i4.3 - IL_8e2b: shl - IL_8e2c: call void [System.Console]System.Console::Write(int32) - IL_8e31: dup - IL_8e32: ldc.i4.0 - IL_8e33: xor - IL_8e34: call void [System.Console]System.Console::Write(int32) - IL_8e39: dup - IL_8e3a: ldc.i4.8 - IL_8e3b: or - IL_8e3c: call void [System.Console]System.Console::Write(int32) - IL_8e41: dup - IL_8e42: ldc.i4.2 - IL_8e43: mul - IL_8e44: call void [System.Console]System.Console::Write(int32) - IL_8e49: dup - IL_8e4a: ldc.i4.5 - IL_8e4b: and - IL_8e4c: call void [System.Console]System.Console::Write(int32) - IL_8e51: dup - IL_8e52: ldc.i4.7 - IL_8e53: mul - IL_8e54: call void [System.Console]System.Console::Write(int32) - IL_8e59: dup - IL_8e5a: ldc.i4.6 - IL_8e5b: shr - IL_8e5c: call void [System.Console]System.Console::Write(int32) - IL_8e61: dup - IL_8e62: ldc.i4.4 - IL_8e63: and - IL_8e64: call void [System.Console]System.Console::Write(int32) - IL_8e69: dup - IL_8e6a: ldc.i4.4 - IL_8e6b: sub - IL_8e6c: call void [System.Console]System.Console::Write(int32) - IL_8e71: dup - IL_8e72: ldc.i4.7 - IL_8e73: and - IL_8e74: call void [System.Console]System.Console::Write(int32) - IL_8e79: dup - IL_8e7a: ldc.i4.0 - IL_8e7b: xor - IL_8e7c: call void [System.Console]System.Console::Write(int32) - IL_8e81: dup - IL_8e82: ldc.i4.5 - IL_8e83: or - IL_8e84: call void [System.Console]System.Console::Write(int32) - IL_8e89: dup - IL_8e8a: ldc.i4.3 - IL_8e8b: shr - IL_8e8c: call void [System.Console]System.Console::Write(int32) - IL_8e91: dup - IL_8e92: ldc.i4.3 - IL_8e93: or - IL_8e94: call void [System.Console]System.Console::Write(int32) - IL_8e99: dup - IL_8e9a: ldc.i4.5 - IL_8e9b: add - IL_8e9c: call void [System.Console]System.Console::Write(int32) - IL_8ea1: dup - IL_8ea2: ldc.i4.0 - IL_8ea3: or - IL_8ea4: call void [System.Console]System.Console::Write(int32) - IL_8ea9: dup - IL_8eaa: ldc.i4.5 - IL_8eab: and - IL_8eac: call void [System.Console]System.Console::Write(int32) - IL_8eb1: dup - IL_8eb2: ldc.i4.4 - IL_8eb3: add - IL_8eb4: call void [System.Console]System.Console::Write(int32) - IL_8eb9: dup - IL_8eba: ldc.i4.6 - IL_8ebb: shl - IL_8ebc: call void [System.Console]System.Console::Write(int32) - IL_8ec1: dup - IL_8ec2: ldc.i4.4 - IL_8ec3: and - IL_8ec4: call void [System.Console]System.Console::Write(int32) - IL_8ec9: dup - IL_8eca: ldc.i4.2 - IL_8ecb: shr - IL_8ecc: call void [System.Console]System.Console::Write(int32) - IL_8ed1: dup - IL_8ed2: ldc.i4.8 - IL_8ed3: shr - IL_8ed4: call void [System.Console]System.Console::Write(int32) - IL_8ed9: dup - IL_8eda: ldc.i4.5 - IL_8edb: and - IL_8edc: call void [System.Console]System.Console::Write(int32) - IL_8ee1: dup - IL_8ee2: ldc.i4.3 - IL_8ee3: sub - IL_8ee4: call void [System.Console]System.Console::Write(int32) - IL_8ee9: dup - IL_8eea: ldc.i4.7 - IL_8eeb: sub - IL_8eec: call void [System.Console]System.Console::Write(int32) - IL_8ef1: dup - IL_8ef2: ldc.i4.3 - IL_8ef3: xor - IL_8ef4: call void [System.Console]System.Console::Write(int32) - IL_8ef9: dup - IL_8efa: ldc.i4.7 - IL_8efb: sub - IL_8efc: call void [System.Console]System.Console::Write(int32) - IL_8f01: dup - IL_8f02: ldc.i4.4 - IL_8f03: or - IL_8f04: call void [System.Console]System.Console::Write(int32) - IL_8f09: dup - IL_8f0a: ldc.i4.8 - IL_8f0b: sub - IL_8f0c: call void [System.Console]System.Console::Write(int32) - IL_8f11: dup - IL_8f12: ldc.i4.0 - IL_8f13: sub - IL_8f14: call void [System.Console]System.Console::Write(int32) - IL_8f19: dup - IL_8f1a: ldc.i4.5 - IL_8f1b: xor - IL_8f1c: call void [System.Console]System.Console::Write(int32) - IL_8f21: dup - IL_8f22: ldc.i4.6 - IL_8f23: shl - IL_8f24: call void [System.Console]System.Console::Write(int32) - IL_8f29: dup - IL_8f2a: ldc.i4.7 - IL_8f2b: and - IL_8f2c: call void [System.Console]System.Console::Write(int32) - IL_8f31: dup - IL_8f32: ldc.i4.6 - IL_8f33: or - IL_8f34: call void [System.Console]System.Console::Write(int32) - IL_8f39: dup - IL_8f3a: ldc.i4.1 - IL_8f3b: xor - IL_8f3c: call void [System.Console]System.Console::Write(int32) - IL_8f41: dup - IL_8f42: ldc.i4.0 - IL_8f43: or - IL_8f44: call void [System.Console]System.Console::Write(int32) - IL_8f49: dup - IL_8f4a: ldc.i4.5 - IL_8f4b: add - IL_8f4c: call void [System.Console]System.Console::Write(int32) - IL_8f51: dup - IL_8f52: ldc.i4.4 - IL_8f53: mul - IL_8f54: call void [System.Console]System.Console::Write(int32) - IL_8f59: dup - IL_8f5a: ldc.i4.4 - IL_8f5b: or - IL_8f5c: call void [System.Console]System.Console::Write(int32) - IL_8f61: dup - IL_8f62: ldc.i4.2 - IL_8f63: shl - IL_8f64: call void [System.Console]System.Console::Write(int32) - IL_8f69: dup - IL_8f6a: ldc.i4.3 - IL_8f6b: add - IL_8f6c: call void [System.Console]System.Console::Write(int32) - IL_8f71: dup - IL_8f72: ldc.i4.0 - IL_8f73: xor - IL_8f74: call void [System.Console]System.Console::Write(int32) - IL_8f79: dup - IL_8f7a: ldc.i4.5 - IL_8f7b: shl - IL_8f7c: call void [System.Console]System.Console::Write(int32) - IL_8f81: dup - IL_8f82: ldc.i4.1 - IL_8f83: mul - IL_8f84: call void [System.Console]System.Console::Write(int32) - IL_8f89: dup - IL_8f8a: ldc.i4.2 - IL_8f8b: shl - IL_8f8c: call void [System.Console]System.Console::Write(int32) - IL_8f91: dup - IL_8f92: ldc.i4.0 - IL_8f93: shl - IL_8f94: call void [System.Console]System.Console::Write(int32) - IL_8f99: dup - IL_8f9a: ldc.i4.5 - IL_8f9b: mul - IL_8f9c: call void [System.Console]System.Console::Write(int32) - IL_8fa1: dup - IL_8fa2: ldc.i4.1 - IL_8fa3: or - IL_8fa4: call void [System.Console]System.Console::Write(int32) - IL_8fa9: dup - IL_8faa: ldc.i4.0 - IL_8fab: xor - IL_8fac: call void [System.Console]System.Console::Write(int32) - IL_8fb1: dup - IL_8fb2: ldc.i4.7 - IL_8fb3: and - IL_8fb4: call void [System.Console]System.Console::Write(int32) - IL_8fb9: dup - IL_8fba: ldc.i4.0 - IL_8fbb: xor - IL_8fbc: call void [System.Console]System.Console::Write(int32) - IL_8fc1: dup - IL_8fc2: ldc.i4.0 - IL_8fc3: xor - IL_8fc4: call void [System.Console]System.Console::Write(int32) - IL_8fc9: dup - IL_8fca: ldc.i4.0 - IL_8fcb: shl - IL_8fcc: call void [System.Console]System.Console::Write(int32) - IL_8fd1: dup - IL_8fd2: ldc.i4.7 - IL_8fd3: and - IL_8fd4: call void [System.Console]System.Console::Write(int32) - IL_8fd9: dup - IL_8fda: ldc.i4.6 - IL_8fdb: sub - IL_8fdc: call void [System.Console]System.Console::Write(int32) - IL_8fe1: dup - IL_8fe2: ldc.i4.3 - IL_8fe3: add - IL_8fe4: call void [System.Console]System.Console::Write(int32) - IL_8fe9: dup - IL_8fea: ldc.i4.8 - IL_8feb: xor - IL_8fec: call void [System.Console]System.Console::Write(int32) - IL_8ff1: dup - IL_8ff2: ldc.i4.7 - IL_8ff3: xor - IL_8ff4: call void [System.Console]System.Console::Write(int32) - IL_8ff9: dup - IL_8ffa: ldc.i4.3 - IL_8ffb: sub - IL_8ffc: call void [System.Console]System.Console::Write(int32) - IL_9001: dup - IL_9002: ldc.i4.7 - IL_9003: mul - IL_9004: call void [System.Console]System.Console::Write(int32) - IL_9009: dup - IL_900a: ldc.i4.5 - IL_900b: xor - IL_900c: call void [System.Console]System.Console::Write(int32) - IL_9011: dup - IL_9012: ldc.i4.6 - IL_9013: shl - IL_9014: call void [System.Console]System.Console::Write(int32) - IL_9019: dup - IL_901a: ldc.i4.3 - IL_901b: shl - IL_901c: call void [System.Console]System.Console::Write(int32) - IL_9021: dup - IL_9022: ldc.i4.2 - IL_9023: mul - IL_9024: call void [System.Console]System.Console::Write(int32) - IL_9029: dup - IL_902a: ldc.i4.7 - IL_902b: shl - IL_902c: call void [System.Console]System.Console::Write(int32) - IL_9031: dup - IL_9032: ldc.i4.3 - IL_9033: add - IL_9034: call void [System.Console]System.Console::Write(int32) - IL_9039: dup - IL_903a: ldc.i4.0 - IL_903b: xor - IL_903c: call void [System.Console]System.Console::Write(int32) - IL_9041: dup - IL_9042: ldc.i4.4 - IL_9043: or - IL_9044: call void [System.Console]System.Console::Write(int32) - IL_9049: dup - IL_904a: ldc.i4.0 - IL_904b: shr - IL_904c: call void [System.Console]System.Console::Write(int32) - IL_9051: dup - IL_9052: ldc.i4.3 - IL_9053: add - IL_9054: call void [System.Console]System.Console::Write(int32) - IL_9059: dup - IL_905a: ldc.i4.6 - IL_905b: xor - IL_905c: call void [System.Console]System.Console::Write(int32) - IL_9061: dup - IL_9062: ldc.i4.5 - IL_9063: add - IL_9064: call void [System.Console]System.Console::Write(int32) - IL_9069: dup - IL_906a: ldc.i4.1 - IL_906b: or - IL_906c: call void [System.Console]System.Console::Write(int32) - IL_9071: dup - IL_9072: ldc.i4.5 - IL_9073: sub - IL_9074: call void [System.Console]System.Console::Write(int32) - IL_9079: dup - IL_907a: ldc.i4.4 - IL_907b: shr - IL_907c: call void [System.Console]System.Console::Write(int32) - IL_9081: dup - IL_9082: ldc.i4.4 - IL_9083: and - IL_9084: call void [System.Console]System.Console::Write(int32) - IL_9089: dup - IL_908a: ldc.i4.5 - IL_908b: shl - IL_908c: call void [System.Console]System.Console::Write(int32) - IL_9091: dup - IL_9092: ldc.i4.1 - IL_9093: shr - IL_9094: call void [System.Console]System.Console::Write(int32) - IL_9099: dup - IL_909a: ldc.i4.6 - IL_909b: xor - IL_909c: call void [System.Console]System.Console::Write(int32) - IL_90a1: dup - IL_90a2: ldc.i4.0 - IL_90a3: shl - IL_90a4: call void [System.Console]System.Console::Write(int32) - IL_90a9: dup - IL_90aa: ldc.i4.2 - IL_90ab: xor - IL_90ac: call void [System.Console]System.Console::Write(int32) - IL_90b1: dup - IL_90b2: ldc.i4.8 - IL_90b3: sub - IL_90b4: call void [System.Console]System.Console::Write(int32) - IL_90b9: dup - IL_90ba: ldc.i4.7 - IL_90bb: mul - IL_90bc: call void [System.Console]System.Console::Write(int32) - IL_90c1: dup - IL_90c2: ldc.i4.0 - IL_90c3: shl - IL_90c4: call void [System.Console]System.Console::Write(int32) - IL_90c9: dup - IL_90ca: ldc.i4.8 - IL_90cb: or - IL_90cc: call void [System.Console]System.Console::Write(int32) - IL_90d1: dup - IL_90d2: ldc.i4.3 - IL_90d3: shr - IL_90d4: call void [System.Console]System.Console::Write(int32) - IL_90d9: dup - IL_90da: ldc.i4.7 - IL_90db: shr - IL_90dc: call void [System.Console]System.Console::Write(int32) - IL_90e1: dup - IL_90e2: ldc.i4.4 - IL_90e3: sub - IL_90e4: call void [System.Console]System.Console::Write(int32) - IL_90e9: dup - IL_90ea: ldc.i4.6 - IL_90eb: shl - IL_90ec: call void [System.Console]System.Console::Write(int32) - IL_90f1: dup - IL_90f2: ldc.i4.3 - IL_90f3: xor - IL_90f4: call void [System.Console]System.Console::Write(int32) - IL_90f9: dup - IL_90fa: ldc.i4.8 - IL_90fb: sub - IL_90fc: call void [System.Console]System.Console::Write(int32) - IL_9101: dup - IL_9102: ldc.i4.7 - IL_9103: add - IL_9104: call void [System.Console]System.Console::Write(int32) - IL_9109: dup - IL_910a: ldc.i4.0 - IL_910b: shl - IL_910c: call void [System.Console]System.Console::Write(int32) - IL_9111: dup - IL_9112: ldc.i4.4 - IL_9113: xor - IL_9114: call void [System.Console]System.Console::Write(int32) - IL_9119: dup - IL_911a: ldc.i4.2 - IL_911b: and - IL_911c: call void [System.Console]System.Console::Write(int32) - IL_9121: dup - IL_9122: ldc.i4.1 - IL_9123: shr - IL_9124: call void [System.Console]System.Console::Write(int32) - IL_9129: dup - IL_912a: ldc.i4.5 - IL_912b: and - IL_912c: call void [System.Console]System.Console::Write(int32) - IL_9131: dup - IL_9132: ldc.i4.7 - IL_9133: mul - IL_9134: call void [System.Console]System.Console::Write(int32) - IL_9139: dup - IL_913a: ldc.i4.4 - IL_913b: xor - IL_913c: call void [System.Console]System.Console::Write(int32) - IL_9141: dup - IL_9142: ldc.i4.2 - IL_9143: and - IL_9144: call void [System.Console]System.Console::Write(int32) - IL_9149: dup - IL_914a: ldc.i4.7 - IL_914b: add - IL_914c: call void [System.Console]System.Console::Write(int32) - IL_9151: dup - IL_9152: ldc.i4.2 - IL_9153: shl - IL_9154: call void [System.Console]System.Console::Write(int32) - IL_9159: dup - IL_915a: ldc.i4.3 - IL_915b: and - IL_915c: call void [System.Console]System.Console::Write(int32) - IL_9161: dup - IL_9162: ldc.i4.8 - IL_9163: and - IL_9164: call void [System.Console]System.Console::Write(int32) - IL_9169: dup - IL_916a: ldc.i4.0 - IL_916b: or - IL_916c: call void [System.Console]System.Console::Write(int32) - IL_9171: dup - IL_9172: ldc.i4.8 - IL_9173: add - IL_9174: call void [System.Console]System.Console::Write(int32) - IL_9179: dup - IL_917a: ldc.i4.0 - IL_917b: shr - IL_917c: call void [System.Console]System.Console::Write(int32) - IL_9181: dup - IL_9182: ldc.i4.5 - IL_9183: add - IL_9184: call void [System.Console]System.Console::Write(int32) - IL_9189: dup - IL_918a: ldc.i4.5 - IL_918b: and - IL_918c: call void [System.Console]System.Console::Write(int32) - IL_9191: dup - IL_9192: ldc.i4.1 - IL_9193: mul - IL_9194: call void [System.Console]System.Console::Write(int32) - IL_9199: dup - IL_919a: ldc.i4.8 - IL_919b: shr - IL_919c: call void [System.Console]System.Console::Write(int32) - IL_91a1: dup - IL_91a2: ldc.i4.2 - IL_91a3: sub - IL_91a4: call void [System.Console]System.Console::Write(int32) - IL_91a9: dup - IL_91aa: ldc.i4.6 - IL_91ab: shr - IL_91ac: call void [System.Console]System.Console::Write(int32) - IL_91b1: dup - IL_91b2: ldc.i4.1 - IL_91b3: or - IL_91b4: call void [System.Console]System.Console::Write(int32) - IL_91b9: dup - IL_91ba: ldc.i4.7 - IL_91bb: mul - IL_91bc: call void [System.Console]System.Console::Write(int32) - IL_91c1: dup - IL_91c2: ldc.i4.6 - IL_91c3: mul - IL_91c4: call void [System.Console]System.Console::Write(int32) - IL_91c9: dup - IL_91ca: ldc.i4.2 - IL_91cb: shl - IL_91cc: call void [System.Console]System.Console::Write(int32) - IL_91d1: dup - IL_91d2: ldc.i4.4 - IL_91d3: or - IL_91d4: call void [System.Console]System.Console::Write(int32) - IL_91d9: dup - IL_91da: ldc.i4.7 - IL_91db: mul - IL_91dc: call void [System.Console]System.Console::Write(int32) - IL_91e1: dup - IL_91e2: ldc.i4.6 - IL_91e3: sub - IL_91e4: call void [System.Console]System.Console::Write(int32) - IL_91e9: dup - IL_91ea: ldc.i4.5 - IL_91eb: shl - IL_91ec: call void [System.Console]System.Console::Write(int32) - IL_91f1: dup - IL_91f2: ldc.i4.3 - IL_91f3: mul - IL_91f4: call void [System.Console]System.Console::Write(int32) - IL_91f9: dup - IL_91fa: ldc.i4.7 - IL_91fb: add - IL_91fc: call void [System.Console]System.Console::Write(int32) - IL_9201: dup - IL_9202: ldc.i4.5 - IL_9203: or - IL_9204: call void [System.Console]System.Console::Write(int32) - IL_9209: dup - IL_920a: ldc.i4.2 - IL_920b: and - IL_920c: call void [System.Console]System.Console::Write(int32) - IL_9211: dup - IL_9212: ldc.i4.6 - IL_9213: shr - IL_9214: call void [System.Console]System.Console::Write(int32) - IL_9219: dup - IL_921a: ldc.i4.3 - IL_921b: add - IL_921c: call void [System.Console]System.Console::Write(int32) - IL_9221: dup - IL_9222: ldc.i4.8 - IL_9223: sub - IL_9224: call void [System.Console]System.Console::Write(int32) - IL_9229: dup - IL_922a: ldc.i4.6 - IL_922b: sub - IL_922c: call void [System.Console]System.Console::Write(int32) - IL_9231: dup - IL_9232: ldc.i4.7 - IL_9233: shr - IL_9234: call void [System.Console]System.Console::Write(int32) - IL_9239: dup - IL_923a: ldc.i4.6 - IL_923b: add - IL_923c: call void [System.Console]System.Console::Write(int32) - IL_9241: dup - IL_9242: ldc.i4.8 - IL_9243: and - IL_9244: call void [System.Console]System.Console::Write(int32) - IL_9249: dup - IL_924a: ldc.i4.1 - IL_924b: shr - IL_924c: call void [System.Console]System.Console::Write(int32) - IL_9251: dup - IL_9252: ldc.i4.7 - IL_9253: shl - IL_9254: call void [System.Console]System.Console::Write(int32) - IL_9259: dup - IL_925a: ldc.i4.1 - IL_925b: shr - IL_925c: call void [System.Console]System.Console::Write(int32) - IL_9261: dup - IL_9262: ldc.i4.2 - IL_9263: mul - IL_9264: call void [System.Console]System.Console::Write(int32) - IL_9269: dup - IL_926a: ldc.i4.1 - IL_926b: or - IL_926c: call void [System.Console]System.Console::Write(int32) - IL_9271: dup - IL_9272: ldc.i4.6 - IL_9273: mul - IL_9274: call void [System.Console]System.Console::Write(int32) - IL_9279: dup - IL_927a: ldc.i4.2 - IL_927b: or - IL_927c: call void [System.Console]System.Console::Write(int32) - IL_9281: dup - IL_9282: ldc.i4.2 - IL_9283: shl - IL_9284: call void [System.Console]System.Console::Write(int32) - IL_9289: dup - IL_928a: ldc.i4.1 - IL_928b: sub - IL_928c: call void [System.Console]System.Console::Write(int32) - IL_9291: dup - IL_9292: ldc.i4.6 - IL_9293: add - IL_9294: call void [System.Console]System.Console::Write(int32) - IL_9299: dup - IL_929a: ldc.i4.5 - IL_929b: add - IL_929c: call void [System.Console]System.Console::Write(int32) - IL_92a1: dup - IL_92a2: ldc.i4.8 - IL_92a3: mul - IL_92a4: call void [System.Console]System.Console::Write(int32) - IL_92a9: dup - IL_92aa: ldc.i4.5 - IL_92ab: mul - IL_92ac: call void [System.Console]System.Console::Write(int32) - IL_92b1: dup - IL_92b2: ldc.i4.1 - IL_92b3: shr - IL_92b4: call void [System.Console]System.Console::Write(int32) - IL_92b9: dup - IL_92ba: ldc.i4.4 - IL_92bb: add - IL_92bc: call void [System.Console]System.Console::Write(int32) - IL_92c1: dup - IL_92c2: ldc.i4.4 - IL_92c3: shl - IL_92c4: call void [System.Console]System.Console::Write(int32) - IL_92c9: dup - IL_92ca: ldc.i4.5 - IL_92cb: shr - IL_92cc: call void [System.Console]System.Console::Write(int32) - IL_92d1: dup - IL_92d2: ldc.i4.1 - IL_92d3: sub - IL_92d4: call void [System.Console]System.Console::Write(int32) - IL_92d9: dup - IL_92da: ldc.i4.2 - IL_92db: add - IL_92dc: call void [System.Console]System.Console::Write(int32) - IL_92e1: dup - IL_92e2: ldc.i4.7 - IL_92e3: shl - IL_92e4: call void [System.Console]System.Console::Write(int32) - IL_92e9: dup - IL_92ea: ldc.i4.4 - IL_92eb: xor - IL_92ec: call void [System.Console]System.Console::Write(int32) - IL_92f1: dup - IL_92f2: ldc.i4.4 - IL_92f3: xor - IL_92f4: call void [System.Console]System.Console::Write(int32) - IL_92f9: dup - IL_92fa: ldc.i4.2 - IL_92fb: shl - IL_92fc: call void [System.Console]System.Console::Write(int32) - IL_9301: dup - IL_9302: ldc.i4.8 - IL_9303: and - IL_9304: call void [System.Console]System.Console::Write(int32) - IL_9309: dup - IL_930a: ldc.i4.7 - IL_930b: sub - IL_930c: call void [System.Console]System.Console::Write(int32) - IL_9311: dup - IL_9312: ldc.i4.4 - IL_9313: xor - IL_9314: call void [System.Console]System.Console::Write(int32) - IL_9319: dup - IL_931a: ldc.i4.2 - IL_931b: or - IL_931c: call void [System.Console]System.Console::Write(int32) - IL_9321: dup - IL_9322: ldc.i4.1 - IL_9323: sub - IL_9324: call void [System.Console]System.Console::Write(int32) - IL_9329: dup - IL_932a: ldc.i4.5 - IL_932b: shl - IL_932c: call void [System.Console]System.Console::Write(int32) - IL_9331: dup - IL_9332: ldc.i4.8 - IL_9333: or - IL_9334: call void [System.Console]System.Console::Write(int32) - IL_9339: dup - IL_933a: ldc.i4.4 - IL_933b: shl - IL_933c: call void [System.Console]System.Console::Write(int32) - IL_9341: dup - IL_9342: ldc.i4.7 - IL_9343: add - IL_9344: call void [System.Console]System.Console::Write(int32) - IL_9349: dup - IL_934a: ldc.i4.2 - IL_934b: sub - IL_934c: call void [System.Console]System.Console::Write(int32) - IL_9351: dup - IL_9352: ldc.i4.6 - IL_9353: shl - IL_9354: call void [System.Console]System.Console::Write(int32) - IL_9359: dup - IL_935a: ldc.i4.7 - IL_935b: add - IL_935c: call void [System.Console]System.Console::Write(int32) - IL_9361: dup - IL_9362: ldc.i4.2 - IL_9363: add - IL_9364: call void [System.Console]System.Console::Write(int32) - IL_9369: dup - IL_936a: ldc.i4.3 - IL_936b: add - IL_936c: call void [System.Console]System.Console::Write(int32) - IL_9371: dup - IL_9372: ldc.i4.4 - IL_9373: sub - IL_9374: call void [System.Console]System.Console::Write(int32) - IL_9379: dup - IL_937a: ldc.i4.4 - IL_937b: shl - IL_937c: call void [System.Console]System.Console::Write(int32) - IL_9381: dup - IL_9382: ldc.i4.0 - IL_9383: or - IL_9384: call void [System.Console]System.Console::Write(int32) - IL_9389: dup - IL_938a: ldc.i4.2 - IL_938b: xor - IL_938c: call void [System.Console]System.Console::Write(int32) - IL_9391: dup - IL_9392: ldc.i4.7 - IL_9393: sub - IL_9394: call void [System.Console]System.Console::Write(int32) - IL_9399: dup - IL_939a: ldc.i4.5 - IL_939b: add - IL_939c: call void [System.Console]System.Console::Write(int32) - IL_93a1: dup - IL_93a2: ldc.i4.2 - IL_93a3: shr - IL_93a4: call void [System.Console]System.Console::Write(int32) - IL_93a9: dup - IL_93aa: ldc.i4.4 - IL_93ab: or - IL_93ac: call void [System.Console]System.Console::Write(int32) - IL_93b1: dup - IL_93b2: ldc.i4.5 - IL_93b3: and - IL_93b4: call void [System.Console]System.Console::Write(int32) - IL_93b9: dup - IL_93ba: ldc.i4.1 - IL_93bb: or - IL_93bc: call void [System.Console]System.Console::Write(int32) - IL_93c1: dup - IL_93c2: ldc.i4.1 - IL_93c3: add - IL_93c4: call void [System.Console]System.Console::Write(int32) - IL_93c9: dup - IL_93ca: ldc.i4.4 - IL_93cb: xor - IL_93cc: call void [System.Console]System.Console::Write(int32) - IL_93d1: dup - IL_93d2: ldc.i4.1 - IL_93d3: sub - IL_93d4: call void [System.Console]System.Console::Write(int32) - IL_93d9: dup - IL_93da: ldc.i4.8 - IL_93db: xor - IL_93dc: call void [System.Console]System.Console::Write(int32) - IL_93e1: dup - IL_93e2: ldc.i4.8 - IL_93e3: and - IL_93e4: call void [System.Console]System.Console::Write(int32) - IL_93e9: dup - IL_93ea: ldc.i4.8 - IL_93eb: xor - IL_93ec: call void [System.Console]System.Console::Write(int32) - IL_93f1: dup - IL_93f2: ldc.i4.0 - IL_93f3: mul - IL_93f4: call void [System.Console]System.Console::Write(int32) - IL_93f9: dup - IL_93fa: ldc.i4.3 - IL_93fb: add - IL_93fc: call void [System.Console]System.Console::Write(int32) - IL_9401: dup - IL_9402: ldc.i4.5 - IL_9403: sub - IL_9404: call void [System.Console]System.Console::Write(int32) - IL_9409: dup - IL_940a: ldc.i4.4 - IL_940b: or - IL_940c: call void [System.Console]System.Console::Write(int32) - IL_9411: dup - IL_9412: ldc.i4.5 - IL_9413: add - IL_9414: call void [System.Console]System.Console::Write(int32) - IL_9419: dup - IL_941a: ldc.i4.5 - IL_941b: shr - IL_941c: call void [System.Console]System.Console::Write(int32) - IL_9421: dup - IL_9422: ldc.i4.4 - IL_9423: mul - IL_9424: call void [System.Console]System.Console::Write(int32) - IL_9429: dup - IL_942a: ldc.i4.8 - IL_942b: or - IL_942c: call void [System.Console]System.Console::Write(int32) - IL_9431: dup - IL_9432: ldc.i4.1 - IL_9433: and - IL_9434: call void [System.Console]System.Console::Write(int32) - IL_9439: dup - IL_943a: ldc.i4.4 - IL_943b: shl - IL_943c: call void [System.Console]System.Console::Write(int32) - IL_9441: dup - IL_9442: ldc.i4.8 - IL_9443: shl - IL_9444: call void [System.Console]System.Console::Write(int32) - IL_9449: dup - IL_944a: ldc.i4.8 - IL_944b: xor - IL_944c: call void [System.Console]System.Console::Write(int32) - IL_9451: dup - IL_9452: ldc.i4.5 - IL_9453: add - IL_9454: call void [System.Console]System.Console::Write(int32) - IL_9459: dup - IL_945a: ldc.i4.3 - IL_945b: and - IL_945c: call void [System.Console]System.Console::Write(int32) - IL_9461: dup - IL_9462: ldc.i4.0 - IL_9463: or - IL_9464: call void [System.Console]System.Console::Write(int32) - IL_9469: dup - IL_946a: ldc.i4.4 - IL_946b: add - IL_946c: call void [System.Console]System.Console::Write(int32) - IL_9471: dup - IL_9472: ldc.i4.2 - IL_9473: sub - IL_9474: call void [System.Console]System.Console::Write(int32) - IL_9479: dup - IL_947a: ldc.i4.0 - IL_947b: or - IL_947c: call void [System.Console]System.Console::Write(int32) - IL_9481: dup - IL_9482: ldc.i4.3 - IL_9483: xor - IL_9484: call void [System.Console]System.Console::Write(int32) - IL_9489: dup - IL_948a: ldc.i4.3 - IL_948b: xor - IL_948c: call void [System.Console]System.Console::Write(int32) - IL_9491: dup - IL_9492: ldc.i4.2 - IL_9493: sub - IL_9494: call void [System.Console]System.Console::Write(int32) - IL_9499: dup - IL_949a: ldc.i4.2 - IL_949b: sub - IL_949c: call void [System.Console]System.Console::Write(int32) - IL_94a1: dup - IL_94a2: ldc.i4.3 - IL_94a3: or - IL_94a4: call void [System.Console]System.Console::Write(int32) - IL_94a9: dup - IL_94aa: ldc.i4.8 - IL_94ab: and - IL_94ac: call void [System.Console]System.Console::Write(int32) - IL_94b1: dup - IL_94b2: ldc.i4.2 - IL_94b3: add - IL_94b4: call void [System.Console]System.Console::Write(int32) - IL_94b9: dup - IL_94ba: ldc.i4.2 - IL_94bb: add - IL_94bc: call void [System.Console]System.Console::Write(int32) - IL_94c1: dup - IL_94c2: ldc.i4.2 - IL_94c3: xor - IL_94c4: call void [System.Console]System.Console::Write(int32) - IL_94c9: dup - IL_94ca: ldc.i4.4 - IL_94cb: shl - IL_94cc: call void [System.Console]System.Console::Write(int32) - IL_94d1: dup - IL_94d2: ldc.i4.3 - IL_94d3: or - IL_94d4: call void [System.Console]System.Console::Write(int32) - IL_94d9: dup - IL_94da: ldc.i4.3 - IL_94db: shl - IL_94dc: call void [System.Console]System.Console::Write(int32) - IL_94e1: dup - IL_94e2: ldc.i4.6 - IL_94e3: shr - IL_94e4: call void [System.Console]System.Console::Write(int32) - IL_94e9: dup - IL_94ea: ldc.i4.7 - IL_94eb: shr - IL_94ec: call void [System.Console]System.Console::Write(int32) - IL_94f1: dup - IL_94f2: ldc.i4.4 - IL_94f3: shl - IL_94f4: call void [System.Console]System.Console::Write(int32) - IL_94f9: dup - IL_94fa: ldc.i4.3 - IL_94fb: mul - IL_94fc: call void [System.Console]System.Console::Write(int32) - IL_9501: dup - IL_9502: ldc.i4.2 - IL_9503: or - IL_9504: call void [System.Console]System.Console::Write(int32) - IL_9509: dup - IL_950a: ldc.i4.5 - IL_950b: shr - IL_950c: call void [System.Console]System.Console::Write(int32) - IL_9511: dup - IL_9512: ldc.i4.4 - IL_9513: add - IL_9514: call void [System.Console]System.Console::Write(int32) - IL_9519: dup - IL_951a: ldc.i4.1 - IL_951b: shr - IL_951c: call void [System.Console]System.Console::Write(int32) - IL_9521: dup - IL_9522: ldc.i4.1 - IL_9523: shr - IL_9524: call void [System.Console]System.Console::Write(int32) - IL_9529: dup - IL_952a: ldc.i4.0 - IL_952b: shr - IL_952c: call void [System.Console]System.Console::Write(int32) - IL_9531: dup - IL_9532: ldc.i4.0 - IL_9533: shl - IL_9534: call void [System.Console]System.Console::Write(int32) - IL_9539: dup - IL_953a: ldc.i4.5 - IL_953b: add - IL_953c: call void [System.Console]System.Console::Write(int32) - IL_9541: dup - IL_9542: ldc.i4.5 - IL_9543: xor - IL_9544: call void [System.Console]System.Console::Write(int32) - IL_9549: dup - IL_954a: ldc.i4.7 - IL_954b: and - IL_954c: call void [System.Console]System.Console::Write(int32) - IL_9551: dup - IL_9552: ldc.i4.6 - IL_9553: xor - IL_9554: call void [System.Console]System.Console::Write(int32) - IL_9559: dup - IL_955a: ldc.i4.5 - IL_955b: xor - IL_955c: call void [System.Console]System.Console::Write(int32) - IL_9561: dup - IL_9562: ldc.i4.0 - IL_9563: and - IL_9564: call void [System.Console]System.Console::Write(int32) - IL_9569: dup - IL_956a: ldc.i4.6 - IL_956b: shr - IL_956c: call void [System.Console]System.Console::Write(int32) - IL_9571: dup - IL_9572: ldc.i4.2 - IL_9573: shl - IL_9574: call void [System.Console]System.Console::Write(int32) - IL_9579: dup - IL_957a: ldc.i4.5 - IL_957b: or - IL_957c: call void [System.Console]System.Console::Write(int32) - IL_9581: dup - IL_9582: ldc.i4.4 - IL_9583: shl - IL_9584: call void [System.Console]System.Console::Write(int32) - IL_9589: dup - IL_958a: ldc.i4.5 - IL_958b: mul - IL_958c: call void [System.Console]System.Console::Write(int32) - IL_9591: dup - IL_9592: ldc.i4.3 - IL_9593: shl - IL_9594: call void [System.Console]System.Console::Write(int32) - IL_9599: dup - IL_959a: ldc.i4.4 - IL_959b: sub - IL_959c: call void [System.Console]System.Console::Write(int32) - IL_95a1: dup - IL_95a2: ldc.i4.1 - IL_95a3: shr - IL_95a4: call void [System.Console]System.Console::Write(int32) - IL_95a9: dup - IL_95aa: ldc.i4.3 - IL_95ab: shl - IL_95ac: call void [System.Console]System.Console::Write(int32) - IL_95b1: dup - IL_95b2: ldc.i4.7 - IL_95b3: shr - IL_95b4: call void [System.Console]System.Console::Write(int32) - IL_95b9: dup - IL_95ba: ldc.i4.3 - IL_95bb: sub - IL_95bc: call void [System.Console]System.Console::Write(int32) - IL_95c1: dup - IL_95c2: ldc.i4.0 - IL_95c3: and - IL_95c4: call void [System.Console]System.Console::Write(int32) - IL_95c9: dup - IL_95ca: ldc.i4.0 - IL_95cb: add - IL_95cc: call void [System.Console]System.Console::Write(int32) - IL_95d1: dup - IL_95d2: ldc.i4.6 - IL_95d3: shl - IL_95d4: call void [System.Console]System.Console::Write(int32) - IL_95d9: dup - IL_95da: ldc.i4.5 - IL_95db: and - IL_95dc: call void [System.Console]System.Console::Write(int32) - IL_95e1: dup - IL_95e2: ldc.i4.3 - IL_95e3: add - IL_95e4: call void [System.Console]System.Console::Write(int32) - IL_95e9: dup - IL_95ea: ldc.i4.6 - IL_95eb: shr - IL_95ec: call void [System.Console]System.Console::Write(int32) - IL_95f1: dup - IL_95f2: ldc.i4.3 - IL_95f3: shl - IL_95f4: call void [System.Console]System.Console::Write(int32) - IL_95f9: dup - IL_95fa: ldc.i4.3 - IL_95fb: shl - IL_95fc: call void [System.Console]System.Console::Write(int32) - IL_9601: dup - IL_9602: ldc.i4.1 - IL_9603: add - IL_9604: call void [System.Console]System.Console::Write(int32) - IL_9609: dup - IL_960a: ldc.i4.1 - IL_960b: shl - IL_960c: call void [System.Console]System.Console::Write(int32) - IL_9611: dup - IL_9612: ldc.i4.8 - IL_9613: mul - IL_9614: call void [System.Console]System.Console::Write(int32) - IL_9619: dup - IL_961a: ldc.i4.5 - IL_961b: sub - IL_961c: call void [System.Console]System.Console::Write(int32) - IL_9621: dup - IL_9622: ldc.i4.7 - IL_9623: shr - IL_9624: call void [System.Console]System.Console::Write(int32) - IL_9629: dup - IL_962a: ldc.i4.5 - IL_962b: or - IL_962c: call void [System.Console]System.Console::Write(int32) - IL_9631: dup - IL_9632: ldc.i4.0 - IL_9633: or - IL_9634: call void [System.Console]System.Console::Write(int32) - IL_9639: dup - IL_963a: ldc.i4.5 - IL_963b: mul - IL_963c: call void [System.Console]System.Console::Write(int32) - IL_9641: dup - IL_9642: ldc.i4.3 - IL_9643: xor - IL_9644: call void [System.Console]System.Console::Write(int32) - IL_9649: dup - IL_964a: ldc.i4.5 - IL_964b: xor - IL_964c: call void [System.Console]System.Console::Write(int32) - IL_9651: dup - IL_9652: ldc.i4.5 - IL_9653: shl - IL_9654: call void [System.Console]System.Console::Write(int32) - IL_9659: dup - IL_965a: ldc.i4.2 - IL_965b: add - IL_965c: call void [System.Console]System.Console::Write(int32) - IL_9661: dup - IL_9662: ldc.i4.8 - IL_9663: and - IL_9664: call void [System.Console]System.Console::Write(int32) - IL_9669: dup - IL_966a: ldc.i4.8 - IL_966b: mul - IL_966c: call void [System.Console]System.Console::Write(int32) - IL_9671: dup - IL_9672: ldc.i4.7 - IL_9673: and - IL_9674: call void [System.Console]System.Console::Write(int32) - IL_9679: dup - IL_967a: ldc.i4.7 - IL_967b: shr - IL_967c: call void [System.Console]System.Console::Write(int32) - IL_9681: dup - IL_9682: ldc.i4.2 - IL_9683: and - IL_9684: call void [System.Console]System.Console::Write(int32) - IL_9689: dup - IL_968a: ldc.i4.4 - IL_968b: shr - IL_968c: call void [System.Console]System.Console::Write(int32) - IL_9691: dup - IL_9692: ldc.i4.4 - IL_9693: or - IL_9694: call void [System.Console]System.Console::Write(int32) - IL_9699: dup - IL_969a: ldc.i4.2 - IL_969b: shr - IL_969c: call void [System.Console]System.Console::Write(int32) - IL_96a1: dup - IL_96a2: ldc.i4.2 - IL_96a3: or - IL_96a4: call void [System.Console]System.Console::Write(int32) - IL_96a9: dup - IL_96aa: ldc.i4.1 - IL_96ab: add - IL_96ac: call void [System.Console]System.Console::Write(int32) - IL_96b1: dup - IL_96b2: ldc.i4.8 - IL_96b3: shr - IL_96b4: call void [System.Console]System.Console::Write(int32) - IL_96b9: dup - IL_96ba: ldc.i4.6 - IL_96bb: mul - IL_96bc: call void [System.Console]System.Console::Write(int32) - IL_96c1: dup - IL_96c2: ldc.i4.4 - IL_96c3: mul - IL_96c4: call void [System.Console]System.Console::Write(int32) - IL_96c9: dup - IL_96ca: ldc.i4.3 - IL_96cb: or - IL_96cc: call void [System.Console]System.Console::Write(int32) - IL_96d1: dup - IL_96d2: ldc.i4.8 - IL_96d3: or - IL_96d4: call void [System.Console]System.Console::Write(int32) - IL_96d9: dup - IL_96da: ldc.i4.8 - IL_96db: shl - IL_96dc: call void [System.Console]System.Console::Write(int32) - IL_96e1: dup - IL_96e2: ldc.i4.7 - IL_96e3: sub - IL_96e4: call void [System.Console]System.Console::Write(int32) - IL_96e9: dup - IL_96ea: ldc.i4.5 - IL_96eb: add - IL_96ec: call void [System.Console]System.Console::Write(int32) - IL_96f1: dup - IL_96f2: ldc.i4.3 - IL_96f3: mul - IL_96f4: call void [System.Console]System.Console::Write(int32) - IL_96f9: dup - IL_96fa: ldc.i4.2 - IL_96fb: add - IL_96fc: call void [System.Console]System.Console::Write(int32) - IL_9701: dup - IL_9702: ldc.i4.7 - IL_9703: or - IL_9704: call void [System.Console]System.Console::Write(int32) - IL_9709: dup - IL_970a: ldc.i4.5 - IL_970b: sub - IL_970c: call void [System.Console]System.Console::Write(int32) - IL_9711: dup - IL_9712: ldc.i4.4 - IL_9713: or - IL_9714: call void [System.Console]System.Console::Write(int32) - IL_9719: dup - IL_971a: ldc.i4.7 - IL_971b: xor - IL_971c: call void [System.Console]System.Console::Write(int32) - IL_9721: dup - IL_9722: ldc.i4.1 - IL_9723: or - IL_9724: call void [System.Console]System.Console::Write(int32) - IL_9729: dup - IL_972a: ldc.i4.1 - IL_972b: shr - IL_972c: call void [System.Console]System.Console::Write(int32) - IL_9731: dup - IL_9732: ldc.i4.2 - IL_9733: sub - IL_9734: call void [System.Console]System.Console::Write(int32) - IL_9739: dup - IL_973a: ldc.i4.1 - IL_973b: sub - IL_973c: call void [System.Console]System.Console::Write(int32) - IL_9741: dup - IL_9742: ldc.i4.0 - IL_9743: shl - IL_9744: call void [System.Console]System.Console::Write(int32) - IL_9749: dup - IL_974a: ldc.i4.7 - IL_974b: xor - IL_974c: call void [System.Console]System.Console::Write(int32) - IL_9751: dup - IL_9752: ldc.i4.4 - IL_9753: or - IL_9754: call void [System.Console]System.Console::Write(int32) - IL_9759: dup - IL_975a: ldc.i4.6 - IL_975b: mul - IL_975c: call void [System.Console]System.Console::Write(int32) - IL_9761: dup - IL_9762: ldc.i4.7 - IL_9763: or - IL_9764: call void [System.Console]System.Console::Write(int32) - IL_9769: dup - IL_976a: ldc.i4.7 - IL_976b: xor - IL_976c: call void [System.Console]System.Console::Write(int32) - IL_9771: dup - IL_9772: ldc.i4.3 - IL_9773: sub - IL_9774: call void [System.Console]System.Console::Write(int32) - IL_9779: dup - IL_977a: ldc.i4.2 - IL_977b: or - IL_977c: call void [System.Console]System.Console::Write(int32) - IL_9781: dup - IL_9782: ldc.i4.5 - IL_9783: sub - IL_9784: call void [System.Console]System.Console::Write(int32) - IL_9789: dup - IL_978a: ldc.i4.2 - IL_978b: or - IL_978c: call void [System.Console]System.Console::Write(int32) - IL_9791: dup - IL_9792: ldc.i4.0 - IL_9793: shl - IL_9794: call void [System.Console]System.Console::Write(int32) - IL_9799: dup - IL_979a: ldc.i4.7 - IL_979b: shl - IL_979c: call void [System.Console]System.Console::Write(int32) - IL_97a1: dup - IL_97a2: ldc.i4.4 - IL_97a3: or - IL_97a4: call void [System.Console]System.Console::Write(int32) - IL_97a9: dup - IL_97aa: ldc.i4.7 - IL_97ab: add - IL_97ac: call void [System.Console]System.Console::Write(int32) - IL_97b1: dup - IL_97b2: ldc.i4.6 - IL_97b3: mul - IL_97b4: call void [System.Console]System.Console::Write(int32) - IL_97b9: dup - IL_97ba: ldc.i4.2 - IL_97bb: shr - IL_97bc: call void [System.Console]System.Console::Write(int32) - IL_97c1: dup - IL_97c2: ldc.i4.0 - IL_97c3: mul - IL_97c4: call void [System.Console]System.Console::Write(int32) - IL_97c9: dup - IL_97ca: ldc.i4.0 - IL_97cb: and - IL_97cc: call void [System.Console]System.Console::Write(int32) - IL_97d1: dup - IL_97d2: ldc.i4.3 - IL_97d3: and - IL_97d4: call void [System.Console]System.Console::Write(int32) - IL_97d9: dup - IL_97da: ldc.i4.5 - IL_97db: or - IL_97dc: call void [System.Console]System.Console::Write(int32) - IL_97e1: dup - IL_97e2: ldc.i4.2 - IL_97e3: mul - IL_97e4: call void [System.Console]System.Console::Write(int32) - IL_97e9: dup - IL_97ea: ldc.i4.3 - IL_97eb: shl - IL_97ec: call void [System.Console]System.Console::Write(int32) - IL_97f1: dup - IL_97f2: ldc.i4.0 - IL_97f3: xor - IL_97f4: call void [System.Console]System.Console::Write(int32) - IL_97f9: dup - IL_97fa: ldc.i4.0 - IL_97fb: or - IL_97fc: call void [System.Console]System.Console::Write(int32) - IL_9801: dup - IL_9802: ldc.i4.5 - IL_9803: sub - IL_9804: call void [System.Console]System.Console::Write(int32) - IL_9809: dup - IL_980a: ldc.i4.1 - IL_980b: sub - IL_980c: call void [System.Console]System.Console::Write(int32) - IL_9811: dup - IL_9812: ldc.i4.8 - IL_9813: sub - IL_9814: call void [System.Console]System.Console::Write(int32) - IL_9819: dup - IL_981a: ldc.i4.1 - IL_981b: xor - IL_981c: call void [System.Console]System.Console::Write(int32) - IL_9821: dup - IL_9822: ldc.i4.6 - IL_9823: mul - IL_9824: call void [System.Console]System.Console::Write(int32) - IL_9829: dup - IL_982a: ldc.i4.8 - IL_982b: shl - IL_982c: call void [System.Console]System.Console::Write(int32) - IL_9831: dup - IL_9832: ldc.i4.1 - IL_9833: shr - IL_9834: call void [System.Console]System.Console::Write(int32) - IL_9839: dup - IL_983a: ldc.i4.5 - IL_983b: shl - IL_983c: call void [System.Console]System.Console::Write(int32) - IL_9841: dup - IL_9842: ldc.i4.5 - IL_9843: sub - IL_9844: call void [System.Console]System.Console::Write(int32) - IL_9849: dup - IL_984a: ldc.i4.3 - IL_984b: add - IL_984c: call void [System.Console]System.Console::Write(int32) - IL_9851: dup - IL_9852: ldc.i4.1 - IL_9853: shl - IL_9854: call void [System.Console]System.Console::Write(int32) - IL_9859: dup - IL_985a: ldc.i4.5 - IL_985b: shr - IL_985c: call void [System.Console]System.Console::Write(int32) - IL_9861: dup - IL_9862: ldc.i4.5 - IL_9863: mul - IL_9864: call void [System.Console]System.Console::Write(int32) - IL_9869: dup - IL_986a: ldc.i4.6 - IL_986b: and - IL_986c: call void [System.Console]System.Console::Write(int32) - IL_9871: dup - IL_9872: ldc.i4.1 - IL_9873: sub - IL_9874: call void [System.Console]System.Console::Write(int32) - IL_9879: dup - IL_987a: ldc.i4.4 - IL_987b: add - IL_987c: call void [System.Console]System.Console::Write(int32) - IL_9881: dup - IL_9882: ldc.i4.7 - IL_9883: and - IL_9884: call void [System.Console]System.Console::Write(int32) - IL_9889: dup - IL_988a: ldc.i4.3 - IL_988b: shl - IL_988c: call void [System.Console]System.Console::Write(int32) - IL_9891: dup - IL_9892: ldc.i4.1 - IL_9893: sub - IL_9894: call void [System.Console]System.Console::Write(int32) - IL_9899: dup - IL_989a: ldc.i4.6 - IL_989b: and - IL_989c: call void [System.Console]System.Console::Write(int32) - IL_98a1: dup - IL_98a2: ldc.i4.0 - IL_98a3: shl - IL_98a4: call void [System.Console]System.Console::Write(int32) - IL_98a9: dup - IL_98aa: ldc.i4.0 - IL_98ab: add - IL_98ac: call void [System.Console]System.Console::Write(int32) - IL_98b1: dup - IL_98b2: ldc.i4.7 - IL_98b3: add - IL_98b4: call void [System.Console]System.Console::Write(int32) - IL_98b9: dup - IL_98ba: ldc.i4.7 - IL_98bb: shl - IL_98bc: call void [System.Console]System.Console::Write(int32) - IL_98c1: dup - IL_98c2: ldc.i4.5 - IL_98c3: shr - IL_98c4: call void [System.Console]System.Console::Write(int32) - IL_98c9: dup - IL_98ca: ldc.i4.0 - IL_98cb: and - IL_98cc: call void [System.Console]System.Console::Write(int32) - IL_98d1: dup - IL_98d2: ldc.i4.0 - IL_98d3: add - IL_98d4: call void [System.Console]System.Console::Write(int32) - IL_98d9: dup - IL_98da: ldc.i4.6 - IL_98db: add - IL_98dc: call void [System.Console]System.Console::Write(int32) - IL_98e1: dup - IL_98e2: ldc.i4.5 - IL_98e3: xor - IL_98e4: call void [System.Console]System.Console::Write(int32) - IL_98e9: dup - IL_98ea: ldc.i4.4 - IL_98eb: shr - IL_98ec: call void [System.Console]System.Console::Write(int32) - IL_98f1: dup - IL_98f2: ldc.i4.4 - IL_98f3: xor - IL_98f4: call void [System.Console]System.Console::Write(int32) - IL_98f9: dup - IL_98fa: ldc.i4.2 - IL_98fb: shl - IL_98fc: call void [System.Console]System.Console::Write(int32) - IL_9901: dup - IL_9902: ldc.i4.7 - IL_9903: and - IL_9904: call void [System.Console]System.Console::Write(int32) - IL_9909: dup - IL_990a: ldc.i4.6 - IL_990b: sub - IL_990c: call void [System.Console]System.Console::Write(int32) - IL_9911: dup - IL_9912: ldc.i4.2 - IL_9913: sub - IL_9914: call void [System.Console]System.Console::Write(int32) - IL_9919: dup - IL_991a: ldc.i4.4 - IL_991b: xor - IL_991c: call void [System.Console]System.Console::Write(int32) - IL_9921: dup - IL_9922: ldc.i4.4 - IL_9923: shl - IL_9924: call void [System.Console]System.Console::Write(int32) - IL_9929: dup - IL_992a: ldc.i4.8 - IL_992b: shl - IL_992c: call void [System.Console]System.Console::Write(int32) - IL_9931: dup - IL_9932: ldc.i4.4 - IL_9933: shl - IL_9934: call void [System.Console]System.Console::Write(int32) - IL_9939: dup - IL_993a: ldc.i4.7 - IL_993b: shl - IL_993c: call void [System.Console]System.Console::Write(int32) - IL_9941: dup - IL_9942: ldc.i4.4 - IL_9943: sub - IL_9944: call void [System.Console]System.Console::Write(int32) - IL_9949: dup - IL_994a: ldc.i4.1 - IL_994b: xor - IL_994c: call void [System.Console]System.Console::Write(int32) - IL_9951: dup - IL_9952: ldc.i4.2 - IL_9953: shl - IL_9954: call void [System.Console]System.Console::Write(int32) - IL_9959: dup - IL_995a: ldc.i4.0 - IL_995b: and - IL_995c: call void [System.Console]System.Console::Write(int32) - IL_9961: dup - IL_9962: ldc.i4.1 - IL_9963: mul - IL_9964: call void [System.Console]System.Console::Write(int32) - IL_9969: dup - IL_996a: ldc.i4.8 - IL_996b: shr - IL_996c: call void [System.Console]System.Console::Write(int32) - IL_9971: dup - IL_9972: ldc.i4.5 - IL_9973: add - IL_9974: call void [System.Console]System.Console::Write(int32) - IL_9979: dup - IL_997a: ldc.i4.3 - IL_997b: shr - IL_997c: call void [System.Console]System.Console::Write(int32) - IL_9981: dup - IL_9982: ldc.i4.2 - IL_9983: shl - IL_9984: call void [System.Console]System.Console::Write(int32) - IL_9989: dup - IL_998a: ldc.i4.1 - IL_998b: add - IL_998c: call void [System.Console]System.Console::Write(int32) - IL_9991: dup - IL_9992: ldc.i4.2 - IL_9993: shl - IL_9994: call void [System.Console]System.Console::Write(int32) - IL_9999: dup - IL_999a: ldc.i4.1 - IL_999b: shl - IL_999c: call void [System.Console]System.Console::Write(int32) - IL_99a1: dup - IL_99a2: ldc.i4.2 - IL_99a3: shl - IL_99a4: call void [System.Console]System.Console::Write(int32) - IL_99a9: dup - IL_99aa: ldc.i4.2 - IL_99ab: xor - IL_99ac: call void [System.Console]System.Console::Write(int32) - IL_99b1: dup - IL_99b2: ldc.i4.0 - IL_99b3: sub - IL_99b4: call void [System.Console]System.Console::Write(int32) - IL_99b9: dup - IL_99ba: ldc.i4.5 - IL_99bb: or - IL_99bc: call void [System.Console]System.Console::Write(int32) - IL_99c1: dup - IL_99c2: ldc.i4.5 - IL_99c3: or - IL_99c4: call void [System.Console]System.Console::Write(int32) - IL_99c9: dup - IL_99ca: ldc.i4.0 - IL_99cb: mul - IL_99cc: call void [System.Console]System.Console::Write(int32) - IL_99d1: dup - IL_99d2: ldc.i4.3 - IL_99d3: and - IL_99d4: call void [System.Console]System.Console::Write(int32) - IL_99d9: dup - IL_99da: ldc.i4.2 - IL_99db: mul - IL_99dc: call void [System.Console]System.Console::Write(int32) - IL_99e1: dup - IL_99e2: ldc.i4.7 - IL_99e3: and - IL_99e4: call void [System.Console]System.Console::Write(int32) - IL_99e9: dup - IL_99ea: ldc.i4.1 - IL_99eb: add - IL_99ec: call void [System.Console]System.Console::Write(int32) - IL_99f1: dup - IL_99f2: ldc.i4.1 - IL_99f3: and - IL_99f4: call void [System.Console]System.Console::Write(int32) - IL_99f9: dup - IL_99fa: ldc.i4.6 - IL_99fb: shl - IL_99fc: call void [System.Console]System.Console::Write(int32) - IL_9a01: dup - IL_9a02: ldc.i4.1 - IL_9a03: mul - IL_9a04: call void [System.Console]System.Console::Write(int32) - IL_9a09: dup - IL_9a0a: ldc.i4.2 - IL_9a0b: or - IL_9a0c: call void [System.Console]System.Console::Write(int32) - IL_9a11: dup - IL_9a12: ldc.i4.4 - IL_9a13: and - IL_9a14: call void [System.Console]System.Console::Write(int32) - IL_9a19: dup - IL_9a1a: ldc.i4.2 - IL_9a1b: or - IL_9a1c: call void [System.Console]System.Console::Write(int32) - IL_9a21: dup - IL_9a22: ldc.i4.8 - IL_9a23: shl - IL_9a24: call void [System.Console]System.Console::Write(int32) - IL_9a29: dup - IL_9a2a: ldc.i4.1 - IL_9a2b: shr - IL_9a2c: call void [System.Console]System.Console::Write(int32) - IL_9a31: dup - IL_9a32: ldc.i4.2 - IL_9a33: shl - IL_9a34: call void [System.Console]System.Console::Write(int32) - IL_9a39: dup - IL_9a3a: ldc.i4.7 - IL_9a3b: or - IL_9a3c: call void [System.Console]System.Console::Write(int32) - IL_9a41: dup - IL_9a42: ldc.i4.5 - IL_9a43: or - IL_9a44: call void [System.Console]System.Console::Write(int32) - IL_9a49: dup - IL_9a4a: ldc.i4.1 - IL_9a4b: and - IL_9a4c: call void [System.Console]System.Console::Write(int32) - IL_9a51: dup - IL_9a52: ldc.i4.8 - IL_9a53: add - IL_9a54: call void [System.Console]System.Console::Write(int32) - IL_9a59: dup - IL_9a5a: ldc.i4.2 - IL_9a5b: xor - IL_9a5c: call void [System.Console]System.Console::Write(int32) - IL_9a61: dup - IL_9a62: ldc.i4.2 - IL_9a63: or - IL_9a64: call void [System.Console]System.Console::Write(int32) - IL_9a69: dup - IL_9a6a: ldc.i4.1 - IL_9a6b: xor - IL_9a6c: call void [System.Console]System.Console::Write(int32) - IL_9a71: dup - IL_9a72: ldc.i4.3 - IL_9a73: sub - IL_9a74: call void [System.Console]System.Console::Write(int32) - IL_9a79: dup - IL_9a7a: ldc.i4.2 - IL_9a7b: xor - IL_9a7c: call void [System.Console]System.Console::Write(int32) - IL_9a81: dup - IL_9a82: ldc.i4.7 - IL_9a83: and - IL_9a84: call void [System.Console]System.Console::Write(int32) - IL_9a89: dup - IL_9a8a: ldc.i4.2 - IL_9a8b: and - IL_9a8c: call void [System.Console]System.Console::Write(int32) - IL_9a91: dup - IL_9a92: ldc.i4.7 - IL_9a93: shr - IL_9a94: call void [System.Console]System.Console::Write(int32) - IL_9a99: dup - IL_9a9a: ldc.i4.4 - IL_9a9b: shr - IL_9a9c: call void [System.Console]System.Console::Write(int32) - IL_9aa1: dup - IL_9aa2: ldc.i4.5 - IL_9aa3: add - IL_9aa4: call void [System.Console]System.Console::Write(int32) - IL_9aa9: dup - IL_9aaa: ldc.i4.2 - IL_9aab: shr - IL_9aac: call void [System.Console]System.Console::Write(int32) - IL_9ab1: dup - IL_9ab2: ldc.i4.6 - IL_9ab3: shl - IL_9ab4: call void [System.Console]System.Console::Write(int32) - IL_9ab9: dup - IL_9aba: ldc.i4.8 - IL_9abb: sub - IL_9abc: call void [System.Console]System.Console::Write(int32) - IL_9ac1: dup - IL_9ac2: ldc.i4.0 - IL_9ac3: sub - IL_9ac4: call void [System.Console]System.Console::Write(int32) - IL_9ac9: dup - IL_9aca: ldc.i4.3 - IL_9acb: mul - IL_9acc: call void [System.Console]System.Console::Write(int32) - IL_9ad1: dup - IL_9ad2: ldc.i4.6 - IL_9ad3: add - IL_9ad4: call void [System.Console]System.Console::Write(int32) - IL_9ad9: dup - IL_9ada: ldc.i4.5 - IL_9adb: add - IL_9adc: call void [System.Console]System.Console::Write(int32) - IL_9ae1: dup - IL_9ae2: ldc.i4.8 - IL_9ae3: or - IL_9ae4: call void [System.Console]System.Console::Write(int32) - IL_9ae9: dup - IL_9aea: ldc.i4.6 - IL_9aeb: shl - IL_9aec: call void [System.Console]System.Console::Write(int32) - IL_9af1: dup - IL_9af2: ldc.i4.5 - IL_9af3: and - IL_9af4: call void [System.Console]System.Console::Write(int32) - IL_9af9: dup - IL_9afa: ldc.i4.4 - IL_9afb: and - IL_9afc: call void [System.Console]System.Console::Write(int32) - IL_9b01: dup - IL_9b02: ldc.i4.2 - IL_9b03: shr - IL_9b04: call void [System.Console]System.Console::Write(int32) - IL_9b09: dup - IL_9b0a: ldc.i4.7 - IL_9b0b: shl - IL_9b0c: call void [System.Console]System.Console::Write(int32) - IL_9b11: dup - IL_9b12: ldc.i4.2 - IL_9b13: add - IL_9b14: call void [System.Console]System.Console::Write(int32) - IL_9b19: dup - IL_9b1a: ldc.i4.1 - IL_9b1b: or - IL_9b1c: call void [System.Console]System.Console::Write(int32) - IL_9b21: dup - IL_9b22: ldc.i4.3 - IL_9b23: xor - IL_9b24: call void [System.Console]System.Console::Write(int32) - IL_9b29: dup - IL_9b2a: ldc.i4.1 - IL_9b2b: and - IL_9b2c: call void [System.Console]System.Console::Write(int32) - IL_9b31: dup - IL_9b32: ldc.i4.7 - IL_9b33: shl - IL_9b34: call void [System.Console]System.Console::Write(int32) - IL_9b39: dup - IL_9b3a: ldc.i4.6 - IL_9b3b: shr - IL_9b3c: call void [System.Console]System.Console::Write(int32) - IL_9b41: dup - IL_9b42: ldc.i4.8 - IL_9b43: or - IL_9b44: call void [System.Console]System.Console::Write(int32) - IL_9b49: dup - IL_9b4a: ldc.i4.4 - IL_9b4b: mul - IL_9b4c: call void [System.Console]System.Console::Write(int32) - IL_9b51: dup - IL_9b52: ldc.i4.7 - IL_9b53: add - IL_9b54: call void [System.Console]System.Console::Write(int32) - IL_9b59: dup - IL_9b5a: ldc.i4.6 - IL_9b5b: and - IL_9b5c: call void [System.Console]System.Console::Write(int32) - IL_9b61: dup - IL_9b62: ldc.i4.2 - IL_9b63: sub - IL_9b64: call void [System.Console]System.Console::Write(int32) - IL_9b69: dup - IL_9b6a: ldc.i4.7 - IL_9b6b: or - IL_9b6c: call void [System.Console]System.Console::Write(int32) - IL_9b71: dup - IL_9b72: ldc.i4.0 - IL_9b73: or - IL_9b74: call void [System.Console]System.Console::Write(int32) - IL_9b79: dup - IL_9b7a: ldc.i4.0 - IL_9b7b: and - IL_9b7c: call void [System.Console]System.Console::Write(int32) - IL_9b81: dup - IL_9b82: ldc.i4.5 - IL_9b83: xor - IL_9b84: call void [System.Console]System.Console::Write(int32) - IL_9b89: dup - IL_9b8a: ldc.i4.3 - IL_9b8b: or - IL_9b8c: call void [System.Console]System.Console::Write(int32) - IL_9b91: dup - IL_9b92: ldc.i4.7 - IL_9b93: xor - IL_9b94: call void [System.Console]System.Console::Write(int32) - IL_9b99: dup - IL_9b9a: ldc.i4.8 - IL_9b9b: add - IL_9b9c: call void [System.Console]System.Console::Write(int32) - IL_9ba1: dup - IL_9ba2: ldc.i4.0 - IL_9ba3: xor - IL_9ba4: call void [System.Console]System.Console::Write(int32) - IL_9ba9: dup - IL_9baa: ldc.i4.7 - IL_9bab: mul - IL_9bac: call void [System.Console]System.Console::Write(int32) - IL_9bb1: dup - IL_9bb2: ldc.i4.7 - IL_9bb3: and - IL_9bb4: call void [System.Console]System.Console::Write(int32) - IL_9bb9: dup - IL_9bba: ldc.i4.2 - IL_9bbb: xor - IL_9bbc: call void [System.Console]System.Console::Write(int32) - IL_9bc1: dup - IL_9bc2: ldc.i4.1 - IL_9bc3: add - IL_9bc4: call void [System.Console]System.Console::Write(int32) - IL_9bc9: dup - IL_9bca: ldc.i4.5 - IL_9bcb: shr - IL_9bcc: call void [System.Console]System.Console::Write(int32) - IL_9bd1: dup - IL_9bd2: ldc.i4.3 - IL_9bd3: mul - IL_9bd4: call void [System.Console]System.Console::Write(int32) - IL_9bd9: dup - IL_9bda: ldc.i4.8 - IL_9bdb: mul - IL_9bdc: call void [System.Console]System.Console::Write(int32) - IL_9be1: dup - IL_9be2: ldc.i4.8 - IL_9be3: add - IL_9be4: call void [System.Console]System.Console::Write(int32) - IL_9be9: dup - IL_9bea: ldc.i4.2 - IL_9beb: add - IL_9bec: call void [System.Console]System.Console::Write(int32) - IL_9bf1: dup - IL_9bf2: ldc.i4.2 - IL_9bf3: mul - IL_9bf4: call void [System.Console]System.Console::Write(int32) - IL_9bf9: dup - IL_9bfa: ldc.i4.8 - IL_9bfb: xor - IL_9bfc: call void [System.Console]System.Console::Write(int32) - IL_9c01: dup - IL_9c02: ldc.i4.2 - IL_9c03: xor - IL_9c04: call void [System.Console]System.Console::Write(int32) - IL_9c09: dup - IL_9c0a: ldc.i4.2 - IL_9c0b: mul - IL_9c0c: call void [System.Console]System.Console::Write(int32) - IL_9c11: dup - IL_9c12: ldc.i4.1 - IL_9c13: and - IL_9c14: call void [System.Console]System.Console::Write(int32) - IL_9c19: dup - IL_9c1a: ldc.i4.7 - IL_9c1b: shl - IL_9c1c: call void [System.Console]System.Console::Write(int32) - IL_9c21: dup - IL_9c22: ldc.i4.0 - IL_9c23: xor - IL_9c24: call void [System.Console]System.Console::Write(int32) - IL_9c29: dup - IL_9c2a: ldc.i4.2 - IL_9c2b: xor - IL_9c2c: ldc.i4 0x1234 - IL_9c31: add - ldc.i4 100 - add - ldc.i4 1 - sub - IL_9c32: call void [System.Console]System.Console::WriteLine(int32) - IL_9c37: ldc.i4 0x64 - IL_9c3c: add - IL_9c3d: ret -} diff --git a/src/coreclr/tests/src/JIT/opt/JitMinOpts/Perf/LVNumCnt1.il b/src/coreclr/tests/src/JIT/opt/JitMinOpts/Perf/LVNumCnt1.il deleted file mode 100644 index a8d272642ce1..000000000000 --- a/src/coreclr/tests/src/JIT/opt/JitMinOpts/Perf/LVNumCnt1.il +++ /dev/null @@ -1,2594 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// DEFAULT_MIN_OPTS_LV_NUM_COUNT 2000 -// OPTIONS: opts.MinOpts() == true -// TID f90: Local Variable Num count exceeded, using MinOpts for method .f():int -// TID f90: IL Code Size,Instr 1893, 560, Basic Block count 1, Local Variable Num,Ref count 2001,279 for method .f():int - -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly LVNumCnt1 {} -.module LVNumCnt1.exe -.method public static int32 Main() cil managed -{ - .entrypoint - // Code size 12 (0xc) - .maxstack 8 - IL_0000: call int32 f() - IL_0005: ldc.i4 0x5f5e1c7 - IL_000a: add - IL_000b: ret -} // end of global method Main - -.method public static int32 f() cil managed -{ - // Code size 1893 (0x765) - .maxstack 50 - .locals init ([0] int32 V_1, - [1] int32 V_2, - [2] int32 V_3, - [3] int32 V_4, - [4] int32 V_5, - [5] int32 V_6, - [6] int32 V_7, - [7] int32 V_8, - [8] int32 V_9, - [9] int32 V_10, - [10] int32 V_11, - [11] int32 V_12, - [12] int32 V_13, - [13] int32 V_14, - [14] int32 V_15, - [15] int32 V_16, - [16] int32 V_17, - [17] int32 V_18, - [18] int32 V_19, - [19] int32 V_20, - [20] int32 V_21, - [21] int32 V_22, - [22] int32 V_23, - [23] int32 V_24, - [24] int32 V_25, - [25] int32 V_26, - [26] int32 V_27, - [27] int32 V_28, - [28] int32 V_29, - [29] int32 V_30, - [30] int32 V_31, - [31] int32 V_32, - [32] int32 V_33, - [33] int32 V_34, - [34] int32 V_35, - [35] int32 V_36, - [36] int32 V_37, - [37] int32 V_38, - [38] int32 V_39, - [39] int32 V_40, - [40] int32 V_41, - [41] int32 V_42, - [42] int32 V_43, - [43] int32 V_44, - [44] int32 V_45, - [45] int32 V_46, - [46] int32 V_47, - [47] int32 V_48, - [48] int32 V_49, - [49] int32 V_50, - [50] int32 V_51, - [51] int32 V_52, - [52] int32 V_53, - [53] int32 V_54, - [54] int32 V_55, - [55] int32 V_56, - [56] int32 V_57, - [57] int32 V_58, - [58] int32 V_59, - [59] int32 V_60, - [60] int32 V_61, - [61] int32 V_62, - [62] int32 V_63, - [63] int32 V_64, - [64] int32 V_65, - [65] int32 V_66, - [66] int32 V_67, - [67] int32 V_68, - [68] int32 V_69, - [69] int32 V_70, - [70] int32 V_71, - [71] int32 V_72, - [72] int32 V_73, - [73] int32 V_74, - [74] int32 V_75, - [75] int32 V_76, - [76] int32 V_77, - [77] int32 V_78, - [78] int32 V_79, - [79] int32 V_80, - [80] int32 V_81, - [81] int32 V_82, - [82] int32 V_83, - [83] int32 V_84, - [84] int32 V_85, - [85] int32 V_86, - [86] int32 V_87, - [87] int32 V_88, - [88] int32 V_89, - [89] int32 V_90, - [90] int32 V_91, - [91] int32 V_92, - [92] int32 V_93, - [93] int32 V_94, - [94] int32 V_95, - [95] int32 V_96, - [96] int32 V_97, - [97] int32 V_98, - [98] int32 V_99, - [99] int32 V_100, - [100] int32 V_101, - [101] int32 V_102, - [102] int32 V_103, - [103] int32 V_104, - [104] int32 V_105, - [105] int32 V_106, - [106] int32 V_107, - [107] int32 V_108, - [108] int32 V_109, - [109] int32 V_110, - [110] int32 V_111, - [111] int32 V_112, - [112] int32 V_113, - [113] int32 V_114, - [114] int32 V_115, - [115] int32 V_116, - [116] int32 V_117, - [117] int32 V_118, - [118] int32 V_119, - [119] int32 V_120, - [120] int32 V_121, - [121] int32 V_122, - [122] int32 V_123, - [123] int32 V_124, - [124] int32 V_125, - [125] int32 V_126, - [126] int32 V_127, - [127] int32 V_128, - [128] int32 V_129, - [129] int32 V_130, - [130] int32 V_131, - [131] int32 V_132, - [132] int32 V_133, - [133] int32 V_134, - [134] int32 V_135, - [135] int32 V_136, - [136] int32 V_137, - [137] int32 V_138, - [138] int32 V_139, - [139] int32 V_140, - [140] int32 V_141, - [141] int32 V_142, - [142] int32 V_143, - [143] int32 V_144, - [144] int32 V_145, - [145] int32 V_146, - [146] int32 V_147, - [147] int32 V_148, - [148] int32 V_149, - [149] int32 V_150, - [150] int32 V_151, - [151] int32 V_152, - [152] int32 V_153, - [153] int32 V_154, - [154] int32 V_155, - [155] int32 V_156, - [156] int32 V_157, - [157] int32 V_158, - [158] int32 V_159, - [159] int32 V_160, - [160] int32 V_161, - [161] int32 V_162, - [162] int32 V_163, - [163] int32 V_164, - [164] int32 V_165, - [165] int32 V_166, - [166] int32 V_167, - [167] int32 V_168, - [168] int32 V_169, - [169] int32 V_170, - [170] int32 V_171, - [171] int32 V_172, - [172] int32 V_173, - [173] int32 V_174, - [174] int32 V_175, - [175] int32 V_176, - [176] int32 V_177, - [177] int32 V_178, - [178] int32 V_179, - [179] int32 V_180, - [180] int32 V_181, - [181] int32 V_182, - [182] int32 V_183, - [183] int32 V_184, - [184] int32 V_185, - [185] int32 V_186, - [186] int32 V_187, - [187] int32 V_188, - [188] int32 V_189, - [189] int32 V_190, - [190] int32 V_191, - [191] int32 V_192, - [192] int32 V_193, - [193] int32 V_194, - [194] int32 V_195, - [195] int32 V_196, - [196] int32 V_197, - [197] int32 V_198, - [198] int32 V_199, - [199] int32 V_200, - [200] int32 V_201, - [201] int32 V_202, - [202] int32 V_203, - [203] int32 V_204, - [204] int32 V_205, - [205] int32 V_206, - [206] int32 V_207, - [207] int32 V_208, - [208] int32 V_209, - [209] int32 V_210, - [210] int32 V_211, - [211] int32 V_212, - [212] int32 V_213, - [213] int32 V_214, - [214] int32 V_215, - [215] int32 V_216, - [216] int32 V_217, - [217] int32 V_218, - [218] int32 V_219, - [219] int32 V_220, - [220] int32 V_221, - [221] int32 V_222, - [222] int32 V_223, - [223] int32 V_224, - [224] int32 V_225, - [225] int32 V_226, - [226] int32 V_227, - [227] int32 V_228, - [228] int32 V_229, - [229] int32 V_230, - [230] int32 V_231, - [231] int32 V_232, - [232] int32 V_233, - [233] int32 V_234, - [234] int32 V_235, - [235] int32 V_236, - [236] int32 V_237, - [237] int32 V_238, - [238] int32 V_239, - [239] int32 V_240, - [240] int32 V_241, - [241] int32 V_242, - [242] int32 V_243, - [243] int32 V_244, - [244] int32 V_245, - [245] int32 V_246, - [246] int32 V_247, - [247] int32 V_248, - [248] int32 V_249, - [249] int32 V_250, - [250] int32 V_251, - [251] int32 V_252, - [252] int32 V_253, - [253] int32 V_254, - [254] int32 V_255, - [255] int32 V_256, - [256] int32 V_257, - [257] int32 V_258, - [258] int32 V_259, - [259] int32 V_260, - [260] int32 V_261, - [261] int32 V_262, - [262] int32 V_263, - [263] int32 V_264, - [264] int32 V_265, - [265] int32 V_266, - [266] int32 V_267, - [267] int32 V_268, - [268] int32 V_269, - [269] int32 V_270, - [270] int32 V_271, - [271] int32 V_272, - [272] int32 V_273, - [273] int32 V_274, - [274] int32 V_275, - [275] int32 V_276, - [276] int32 V_277, - [277] int32 V_278, - [278] int32 V_279, - [279] int32 V_280, - [280] int32 V_281, - [281] int32 V_282, - [282] int32 V_283, - [283] int32 V_284, - [284] int32 V_285, - [285] int32 V_286, - [286] int32 V_287, - [287] int32 V_288, - [288] int32 V_289, - [289] int32 V_290, - [290] int32 V_291, - [291] int32 V_292, - [292] int32 V_293, - [293] int32 V_294, - [294] int32 V_295, - [295] int32 V_296, - [296] int32 V_297, - [297] int32 V_298, - [298] int32 V_299, - [299] int32 V_300, - [300] int32 V_301, - [301] int32 V_302, - [302] int32 V_303, - [303] int32 V_304, - [304] int32 V_305, - [305] int32 V_306, - [306] int32 V_307, - [307] int32 V_308, - [308] int32 V_309, - [309] int32 V_310, - [310] int32 V_311, - [311] int32 V_312, - [312] int32 V_313, - [313] int32 V_314, - [314] int32 V_315, - [315] int32 V_316, - [316] int32 V_317, - [317] int32 V_318, - [318] int32 V_319, - [319] int32 V_320, - [320] int32 V_321, - [321] int32 V_322, - [322] int32 V_323, - [323] int32 V_324, - [324] int32 V_325, - [325] int32 V_326, - [326] int32 V_327, - [327] int32 V_328, - [328] int32 V_329, - [329] int32 V_330, - [330] int32 V_331, - [331] int32 V_332, - [332] int32 V_333, - [333] int32 V_334, - [334] int32 V_335, - [335] int32 V_336, - [336] int32 V_337, - [337] int32 V_338, - [338] int32 V_339, - [339] int32 V_340, - [340] int32 V_341, - [341] int32 V_342, - [342] int32 V_343, - [343] int32 V_344, - [344] int32 V_345, - [345] int32 V_346, - [346] int32 V_347, - [347] int32 V_348, - [348] int32 V_349, - [349] int32 V_350, - [350] int32 V_351, - [351] int32 V_352, - [352] int32 V_353, - [353] int32 V_354, - [354] int32 V_355, - [355] int32 V_356, - [356] int32 V_357, - [357] int32 V_358, - [358] int32 V_359, - [359] int32 V_360, - [360] int32 V_361, - [361] int32 V_362, - [362] int32 V_363, - [363] int32 V_364, - [364] int32 V_365, - [365] int32 V_366, - [366] int32 V_367, - [367] int32 V_368, - [368] int32 V_369, - [369] int32 V_370, - [370] int32 V_371, - [371] int32 V_372, - [372] int32 V_373, - [373] int32 V_374, - [374] int32 V_375, - [375] int32 V_376, - [376] int32 V_377, - [377] int32 V_378, - [378] int32 V_379, - [379] int32 V_380, - [380] int32 V_381, - [381] int32 V_382, - [382] int32 V_383, - [383] int32 V_384, - [384] int32 V_385, - [385] int32 V_386, - [386] int32 V_387, - [387] int32 V_388, - [388] int32 V_389, - [389] int32 V_390, - [390] int32 V_391, - [391] int32 V_392, - [392] int32 V_393, - [393] int32 V_394, - [394] int32 V_395, - [395] int32 V_396, - [396] int32 V_397, - [397] int32 V_398, - [398] int32 V_399, - [399] int32 V_400, - [400] int32 V_401, - [401] int32 V_402, - [402] int32 V_403, - [403] int32 V_404, - [404] int32 V_405, - [405] int32 V_406, - [406] int32 V_407, - [407] int32 V_408, - [408] int32 V_409, - [409] int32 V_410, - [410] int32 V_411, - [411] int32 V_412, - [412] int32 V_413, - [413] int32 V_414, - [414] int32 V_415, - [415] int32 V_416, - [416] int32 V_417, - [417] int32 V_418, - [418] int32 V_419, - [419] int32 V_420, - [420] int32 V_421, - [421] int32 V_422, - [422] int32 V_423, - [423] int32 V_424, - [424] int32 V_425, - [425] int32 V_426, - [426] int32 V_427, - [427] int32 V_428, - [428] int32 V_429, - [429] int32 V_430, - [430] int32 V_431, - [431] int32 V_432, - [432] int32 V_433, - [433] int32 V_434, - [434] int32 V_435, - [435] int32 V_436, - [436] int32 V_437, - [437] int32 V_438, - [438] int32 V_439, - [439] int32 V_440, - [440] int32 V_441, - [441] int32 V_442, - [442] int32 V_443, - [443] int32 V_444, - [444] int32 V_445, - [445] int32 V_446, - [446] int32 V_447, - [447] int32 V_448, - [448] int32 V_449, - [449] int32 V_450, - [450] int32 V_451, - [451] int32 V_452, - [452] int32 V_453, - [453] int32 V_454, - [454] int32 V_455, - [455] int32 V_456, - [456] int32 V_457, - [457] int32 V_458, - [458] int32 V_459, - [459] int32 V_460, - [460] int32 V_461, - [461] int32 V_462, - [462] int32 V_463, - [463] int32 V_464, - [464] int32 V_465, - [465] int32 V_466, - [466] int32 V_467, - [467] int32 V_468, - [468] int32 V_469, - [469] int32 V_470, - [470] int32 V_471, - [471] int32 V_472, - [472] int32 V_473, - [473] int32 V_474, - [474] int32 V_475, - [475] int32 V_476, - [476] int32 V_477, - [477] int32 V_478, - [478] int32 V_479, - [479] int32 V_480, - [480] int32 V_481, - [481] int32 V_482, - [482] int32 V_483, - [483] int32 V_484, - [484] int32 V_485, - [485] int32 V_486, - [486] int32 V_487, - [487] int32 V_488, - [488] int32 V_489, - [489] int32 V_490, - [490] int32 V_491, - [491] int32 V_492, - [492] int32 V_493, - [493] int32 V_494, - [494] int32 V_495, - [495] int32 V_496, - [496] int32 V_497, - [497] int32 V_498, - [498] int32 V_499, - [499] int32 V_500, - [500] int32 V_501, - [501] int32 V_502, - [502] int32 V_503, - [503] int32 V_504, - [504] int32 V_505, - [505] int32 V_506, - [506] int32 V_507, - [507] int32 V_508, - [508] int32 V_509, - [509] int32 V_510, - [510] int32 V_511, - [511] int32 V_512, - [512] int32 V_513, - [513] int32 V_514, - [514] int32 V_515, - [515] int32 V_516, - [516] int32 V_517, - [517] int32 V_518, - [518] int32 V_519, - [519] int32 V_520, - [520] int32 V_521, - [521] int32 V_522, - [522] int32 V_523, - [523] int32 V_524, - [524] int32 V_525, - [525] int32 V_526, - [526] int32 V_527, - [527] int32 V_528, - [528] int32 V_529, - [529] int32 V_530, - [530] int32 V_531, - [531] int32 V_532, - [532] int32 V_533, - [533] int32 V_534, - [534] int32 V_535, - [535] int32 V_536, - [536] int32 V_537, - [537] int32 V_538, - [538] int32 V_539, - [539] int32 V_540, - [540] int32 V_541, - [541] int32 V_542, - [542] int32 V_543, - [543] int32 V_544, - [544] int32 V_545, - [545] int32 V_546, - [546] int32 V_547, - [547] int32 V_548, - [548] int32 V_549, - [549] int32 V_550, - [550] int32 V_551, - [551] int32 V_552, - [552] int32 V_553, - [553] int32 V_554, - [554] int32 V_555, - [555] int32 V_556, - [556] int32 V_557, - [557] int32 V_558, - [558] int32 V_559, - [559] int32 V_560, - [560] int32 V_561, - [561] int32 V_562, - [562] int32 V_563, - [563] int32 V_564, - [564] int32 V_565, - [565] int32 V_566, - [566] int32 V_567, - [567] int32 V_568, - [568] int32 V_569, - [569] int32 V_570, - [570] int32 V_571, - [571] int32 V_572, - [572] int32 V_573, - [573] int32 V_574, - [574] int32 V_575, - [575] int32 V_576, - [576] int32 V_577, - [577] int32 V_578, - [578] int32 V_579, - [579] int32 V_580, - [580] int32 V_581, - [581] int32 V_582, - [582] int32 V_583, - [583] int32 V_584, - [584] int32 V_585, - [585] int32 V_586, - [586] int32 V_587, - [587] int32 V_588, - [588] int32 V_589, - [589] int32 V_590, - [590] int32 V_591, - [591] int32 V_592, - [592] int32 V_593, - [593] int32 V_594, - [594] int32 V_595, - [595] int32 V_596, - [596] int32 V_597, - [597] int32 V_598, - [598] int32 V_599, - [599] int32 V_600, - [600] int32 V_601, - [601] int32 V_602, - [602] int32 V_603, - [603] int32 V_604, - [604] int32 V_605, - [605] int32 V_606, - [606] int32 V_607, - [607] int32 V_608, - [608] int32 V_609, - [609] int32 V_610, - [610] int32 V_611, - [611] int32 V_612, - [612] int32 V_613, - [613] int32 V_614, - [614] int32 V_615, - [615] int32 V_616, - [616] int32 V_617, - [617] int32 V_618, - [618] int32 V_619, - [619] int32 V_620, - [620] int32 V_621, - [621] int32 V_622, - [622] int32 V_623, - [623] int32 V_624, - [624] int32 V_625, - [625] int32 V_626, - [626] int32 V_627, - [627] int32 V_628, - [628] int32 V_629, - [629] int32 V_630, - [630] int32 V_631, - [631] int32 V_632, - [632] int32 V_633, - [633] int32 V_634, - [634] int32 V_635, - [635] int32 V_636, - [636] int32 V_637, - [637] int32 V_638, - [638] int32 V_639, - [639] int32 V_640, - [640] int32 V_641, - [641] int32 V_642, - [642] int32 V_643, - [643] int32 V_644, - [644] int32 V_645, - [645] int32 V_646, - [646] int32 V_647, - [647] int32 V_648, - [648] int32 V_649, - [649] int32 V_650, - [650] int32 V_651, - [651] int32 V_652, - [652] int32 V_653, - [653] int32 V_654, - [654] int32 V_655, - [655] int32 V_656, - [656] int32 V_657, - [657] int32 V_658, - [658] int32 V_659, - [659] int32 V_660, - [660] int32 V_661, - [661] int32 V_662, - [662] int32 V_663, - [663] int32 V_664, - [664] int32 V_665, - [665] int32 V_666, - [666] int32 V_667, - [667] int32 V_668, - [668] int32 V_669, - [669] int32 V_670, - [670] int32 V_671, - [671] int32 V_672, - [672] int32 V_673, - [673] int32 V_674, - [674] int32 V_675, - [675] int32 V_676, - [676] int32 V_677, - [677] int32 V_678, - [678] int32 V_679, - [679] int32 V_680, - [680] int32 V_681, - [681] int32 V_682, - [682] int32 V_683, - [683] int32 V_684, - [684] int32 V_685, - [685] int32 V_686, - [686] int32 V_687, - [687] int32 V_688, - [688] int32 V_689, - [689] int32 V_690, - [690] int32 V_691, - [691] int32 V_692, - [692] int32 V_693, - [693] int32 V_694, - [694] int32 V_695, - [695] int32 V_696, - [696] int32 V_697, - [697] int32 V_698, - [698] int32 V_699, - [699] int32 V_700, - [700] int32 V_701, - [701] int32 V_702, - [702] int32 V_703, - [703] int32 V_704, - [704] int32 V_705, - [705] int32 V_706, - [706] int32 V_707, - [707] int32 V_708, - [708] int32 V_709, - [709] int32 V_710, - [710] int32 V_711, - [711] int32 V_712, - [712] int32 V_713, - [713] int32 V_714, - [714] int32 V_715, - [715] int32 V_716, - [716] int32 V_717, - [717] int32 V_718, - [718] int32 V_719, - [719] int32 V_720, - [720] int32 V_721, - [721] int32 V_722, - [722] int32 V_723, - [723] int32 V_724, - [724] int32 V_725, - [725] int32 V_726, - [726] int32 V_727, - [727] int32 V_728, - [728] int32 V_729, - [729] int32 V_730, - [730] int32 V_731, - [731] int32 V_732, - [732] int32 V_733, - [733] int32 V_734, - [734] int32 V_735, - [735] int32 V_736, - [736] int32 V_737, - [737] int32 V_738, - [738] int32 V_739, - [739] int32 V_740, - [740] int32 V_741, - [741] int32 V_742, - [742] int32 V_743, - [743] int32 V_744, - [744] int32 V_745, - [745] int32 V_746, - [746] int32 V_747, - [747] int32 V_748, - [748] int32 V_749, - [749] int32 V_750, - [750] int32 V_751, - [751] int32 V_752, - [752] int32 V_753, - [753] int32 V_754, - [754] int32 V_755, - [755] int32 V_756, - [756] int32 V_757, - [757] int32 V_758, - [758] int32 V_759, - [759] int32 V_760, - [760] int32 V_761, - [761] int32 V_762, - [762] int32 V_763, - [763] int32 V_764, - [764] int32 V_765, - [765] int32 V_766, - [766] int32 V_767, - [767] int32 V_768, - [768] int32 V_769, - [769] int32 V_770, - [770] int32 V_771, - [771] int32 V_772, - [772] int32 V_773, - [773] int32 V_774, - [774] int32 V_775, - [775] int32 V_776, - [776] int32 V_777, - [777] int32 V_778, - [778] int32 V_779, - [779] int32 V_780, - [780] int32 V_781, - [781] int32 V_782, - [782] int32 V_783, - [783] int32 V_784, - [784] int32 V_785, - [785] int32 V_786, - [786] int32 V_787, - [787] int32 V_788, - [788] int32 V_789, - [789] int32 V_790, - [790] int32 V_791, - [791] int32 V_792, - [792] int32 V_793, - [793] int32 V_794, - [794] int32 V_795, - [795] int32 V_796, - [796] int32 V_797, - [797] int32 V_798, - [798] int32 V_799, - [799] int32 V_800, - [800] int32 V_801, - [801] int32 V_802, - [802] int32 V_803, - [803] int32 V_804, - [804] int32 V_805, - [805] int32 V_806, - [806] int32 V_807, - [807] int32 V_808, - [808] int32 V_809, - [809] int32 V_810, - [810] int32 V_811, - [811] int32 V_812, - [812] int32 V_813, - [813] int32 V_814, - [814] int32 V_815, - [815] int32 V_816, - [816] int32 V_817, - [817] int32 V_818, - [818] int32 V_819, - [819] int32 V_820, - [820] int32 V_821, - [821] int32 V_822, - [822] int32 V_823, - [823] int32 V_824, - [824] int32 V_825, - [825] int32 V_826, - [826] int32 V_827, - [827] int32 V_828, - [828] int32 V_829, - [829] int32 V_830, - [830] int32 V_831, - [831] int32 V_832, - [832] int32 V_833, - [833] int32 V_834, - [834] int32 V_835, - [835] int32 V_836, - [836] int32 V_837, - [837] int32 V_838, - [838] int32 V_839, - [839] int32 V_840, - [840] int32 V_841, - [841] int32 V_842, - [842] int32 V_843, - [843] int32 V_844, - [844] int32 V_845, - [845] int32 V_846, - [846] int32 V_847, - [847] int32 V_848, - [848] int32 V_849, - [849] int32 V_850, - [850] int32 V_851, - [851] int32 V_852, - [852] int32 V_853, - [853] int32 V_854, - [854] int32 V_855, - [855] int32 V_856, - [856] int32 V_857, - [857] int32 V_858, - [858] int32 V_859, - [859] int32 V_860, - [860] int32 V_861, - [861] int32 V_862, - [862] int32 V_863, - [863] int32 V_864, - [864] int32 V_865, - [865] int32 V_866, - [866] int32 V_867, - [867] int32 V_868, - [868] int32 V_869, - [869] int32 V_870, - [870] int32 V_871, - [871] int32 V_872, - [872] int32 V_873, - [873] int32 V_874, - [874] int32 V_875, - [875] int32 V_876, - [876] int32 V_877, - [877] int32 V_878, - [878] int32 V_879, - [879] int32 V_880, - [880] int32 V_881, - [881] int32 V_882, - [882] int32 V_883, - [883] int32 V_884, - [884] int32 V_885, - [885] int32 V_886, - [886] int32 V_887, - [887] int32 V_888, - [888] int32 V_889, - [889] int32 V_890, - [890] int32 V_891, - [891] int32 V_892, - [892] int32 V_893, - [893] int32 V_894, - [894] int32 V_895, - [895] int32 V_896, - [896] int32 V_897, - [897] int32 V_898, - [898] int32 V_899, - [899] int32 V_900, - [900] int32 V_901, - [901] int32 V_902, - [902] int32 V_903, - [903] int32 V_904, - [904] int32 V_905, - [905] int32 V_906, - [906] int32 V_907, - [907] int32 V_908, - [908] int32 V_909, - [909] int32 V_910, - [910] int32 V_911, - [911] int32 V_912, - [912] int32 V_913, - [913] int32 V_914, - [914] int32 V_915, - [915] int32 V_916, - [916] int32 V_917, - [917] int32 V_918, - [918] int32 V_919, - [919] int32 V_920, - [920] int32 V_921, - [921] int32 V_922, - [922] int32 V_923, - [923] int32 V_924, - [924] int32 V_925, - [925] int32 V_926, - [926] int32 V_927, - [927] int32 V_928, - [928] int32 V_929, - [929] int32 V_930, - [930] int32 V_931, - [931] int32 V_932, - [932] int32 V_933, - [933] int32 V_934, - [934] int32 V_935, - [935] int32 V_936, - [936] int32 V_937, - [937] int32 V_938, - [938] int32 V_939, - [939] int32 V_940, - [940] int32 V_941, - [941] int32 V_942, - [942] int32 V_943, - [943] int32 V_944, - [944] int32 V_945, - [945] int32 V_946, - [946] int32 V_947, - [947] int32 V_948, - [948] int32 V_949, - [949] int32 V_950, - [950] int32 V_951, - [951] int32 V_952, - [952] int32 V_953, - [953] int32 V_954, - [954] int32 V_955, - [955] int32 V_956, - [956] int32 V_957, - [957] int32 V_958, - [958] int32 V_959, - [959] int32 V_960, - [960] int32 V_961, - [961] int32 V_962, - [962] int32 V_963, - [963] int32 V_964, - [964] int32 V_965, - [965] int32 V_966, - [966] int32 V_967, - [967] int32 V_968, - [968] int32 V_969, - [969] int32 V_970, - [970] int32 V_971, - [971] int32 V_972, - [972] int32 V_973, - [973] int32 V_974, - [974] int32 V_975, - [975] int32 V_976, - [976] int32 V_977, - [977] int32 V_978, - [978] int32 V_979, - [979] int32 V_980, - [980] int32 V_981, - [981] int32 V_982, - [982] int32 V_983, - [983] int32 V_984, - [984] int32 V_985, - [985] int32 V_986, - [986] int32 V_987, - [987] int32 V_988, - [988] int32 V_989, - [989] int32 V_990, - [990] int32 V_991, - [991] int32 V_992, - [992] int32 V_993, - [993] int32 V_994, - [994] int32 V_995, - [995] int32 V_996, - [996] int32 V_997, - [997] int32 V_998, - [998] int32 V_999, - [999] int32 V_1000, - [1000] int32 V_1001, - [1001] int32 V_1002, - [1002] int32 V_1003, - [1003] int32 V_1004, - [1004] int32 V_1005, - [1005] int32 V_1006, - [1006] int32 V_1007, - [1007] int32 V_1008, - [1008] int32 V_1009, - [1009] int32 V_1010, - [1010] int32 V_1011, - [1011] int32 V_1012, - [1012] int32 V_1013, - [1013] int32 V_1014, - [1014] int32 V_1015, - [1015] int32 V_1016, - [1016] int32 V_1017, - [1017] int32 V_1018, - [1018] int32 V_1019, - [1019] int32 V_1020, - [1020] int32 V_1021, - [1021] int32 V_1022, - [1022] int32 V_1023, - [1023] int32 V_1024, - [1024] int32 V_1025, - [1025] int32 V_1026, - [1026] int32 V_1027, - [1027] int32 V_1028, - [1028] int32 V_1029, - [1029] int32 V_1030, - [1030] int32 V_1031, - [1031] int32 V_1032, - [1032] int32 V_1033, - [1033] int32 V_1034, - [1034] int32 V_1035, - [1035] int32 V_1036, - [1036] int32 V_1037, - [1037] int32 V_1038, - [1038] int32 V_1039, - [1039] int32 V_1040, - [1040] int32 V_1041, - [1041] int32 V_1042, - [1042] int32 V_1043, - [1043] int32 V_1044, - [1044] int32 V_1045, - [1045] int32 V_1046, - [1046] int32 V_1047, - [1047] int32 V_1048, - [1048] int32 V_1049, - [1049] int32 V_1050, - [1050] int32 V_1051, - [1051] int32 V_1052, - [1052] int32 V_1053, - [1053] int32 V_1054, - [1054] int32 V_1055, - [1055] int32 V_1056, - [1056] int32 V_1057, - [1057] int32 V_1058, - [1058] int32 V_1059, - [1059] int32 V_1060, - [1060] int32 V_1061, - [1061] int32 V_1062, - [1062] int32 V_1063, - [1063] int32 V_1064, - [1064] int32 V_1065, - [1065] int32 V_1066, - [1066] int32 V_1067, - [1067] int32 V_1068, - [1068] int32 V_1069, - [1069] int32 V_1070, - [1070] int32 V_1071, - [1071] int32 V_1072, - [1072] int32 V_1073, - [1073] int32 V_1074, - [1074] int32 V_1075, - [1075] int32 V_1076, - [1076] int32 V_1077, - [1077] int32 V_1078, - [1078] int32 V_1079, - [1079] int32 V_1080, - [1080] int32 V_1081, - [1081] int32 V_1082, - [1082] int32 V_1083, - [1083] int32 V_1084, - [1084] int32 V_1085, - [1085] int32 V_1086, - [1086] int32 V_1087, - [1087] int32 V_1088, - [1088] int32 V_1089, - [1089] int32 V_1090, - [1090] int32 V_1091, - [1091] int32 V_1092, - [1092] int32 V_1093, - [1093] int32 V_1094, - [1094] int32 V_1095, - [1095] int32 V_1096, - [1096] int32 V_1097, - [1097] int32 V_1098, - [1098] int32 V_1099, - [1099] int32 V_1100, - [1100] int32 V_1101, - [1101] int32 V_1102, - [1102] int32 V_1103, - [1103] int32 V_1104, - [1104] int32 V_1105, - [1105] int32 V_1106, - [1106] int32 V_1107, - [1107] int32 V_1108, - [1108] int32 V_1109, - [1109] int32 V_1110, - [1110] int32 V_1111, - [1111] int32 V_1112, - [1112] int32 V_1113, - [1113] int32 V_1114, - [1114] int32 V_1115, - [1115] int32 V_1116, - [1116] int32 V_1117, - [1117] int32 V_1118, - [1118] int32 V_1119, - [1119] int32 V_1120, - [1120] int32 V_1121, - [1121] int32 V_1122, - [1122] int32 V_1123, - [1123] int32 V_1124, - [1124] int32 V_1125, - [1125] int32 V_1126, - [1126] int32 V_1127, - [1127] int32 V_1128, - [1128] int32 V_1129, - [1129] int32 V_1130, - [1130] int32 V_1131, - [1131] int32 V_1132, - [1132] int32 V_1133, - [1133] int32 V_1134, - [1134] int32 V_1135, - [1135] int32 V_1136, - [1136] int32 V_1137, - [1137] int32 V_1138, - [1138] int32 V_1139, - [1139] int32 V_1140, - [1140] int32 V_1141, - [1141] int32 V_1142, - [1142] int32 V_1143, - [1143] int32 V_1144, - [1144] int32 V_1145, - [1145] int32 V_1146, - [1146] int32 V_1147, - [1147] int32 V_1148, - [1148] int32 V_1149, - [1149] int32 V_1150, - [1150] int32 V_1151, - [1151] int32 V_1152, - [1152] int32 V_1153, - [1153] int32 V_1154, - [1154] int32 V_1155, - [1155] int32 V_1156, - [1156] int32 V_1157, - [1157] int32 V_1158, - [1158] int32 V_1159, - [1159] int32 V_1160, - [1160] int32 V_1161, - [1161] int32 V_1162, - [1162] int32 V_1163, - [1163] int32 V_1164, - [1164] int32 V_1165, - [1165] int32 V_1166, - [1166] int32 V_1167, - [1167] int32 V_1168, - [1168] int32 V_1169, - [1169] int32 V_1170, - [1170] int32 V_1171, - [1171] int32 V_1172, - [1172] int32 V_1173, - [1173] int32 V_1174, - [1174] int32 V_1175, - [1175] int32 V_1176, - [1176] int32 V_1177, - [1177] int32 V_1178, - [1178] int32 V_1179, - [1179] int32 V_1180, - [1180] int32 V_1181, - [1181] int32 V_1182, - [1182] int32 V_1183, - [1183] int32 V_1184, - [1184] int32 V_1185, - [1185] int32 V_1186, - [1186] int32 V_1187, - [1187] int32 V_1188, - [1188] int32 V_1189, - [1189] int32 V_1190, - [1190] int32 V_1191, - [1191] int32 V_1192, - [1192] int32 V_1193, - [1193] int32 V_1194, - [1194] int32 V_1195, - [1195] int32 V_1196, - [1196] int32 V_1197, - [1197] int32 V_1198, - [1198] int32 V_1199, - [1199] int32 V_1200, - [1200] int32 V_1201, - [1201] int32 V_1202, - [1202] int32 V_1203, - [1203] int32 V_1204, - [1204] int32 V_1205, - [1205] int32 V_1206, - [1206] int32 V_1207, - [1207] int32 V_1208, - [1208] int32 V_1209, - [1209] int32 V_1210, - [1210] int32 V_1211, - [1211] int32 V_1212, - [1212] int32 V_1213, - [1213] int32 V_1214, - [1214] int32 V_1215, - [1215] int32 V_1216, - [1216] int32 V_1217, - [1217] int32 V_1218, - [1218] int32 V_1219, - [1219] int32 V_1220, - [1220] int32 V_1221, - [1221] int32 V_1222, - [1222] int32 V_1223, - [1223] int32 V_1224, - [1224] int32 V_1225, - [1225] int32 V_1226, - [1226] int32 V_1227, - [1227] int32 V_1228, - [1228] int32 V_1229, - [1229] int32 V_1230, - [1230] int32 V_1231, - [1231] int32 V_1232, - [1232] int32 V_1233, - [1233] int32 V_1234, - [1234] int32 V_1235, - [1235] int32 V_1236, - [1236] int32 V_1237, - [1237] int32 V_1238, - [1238] int32 V_1239, - [1239] int32 V_1240, - [1240] int32 V_1241, - [1241] int32 V_1242, - [1242] int32 V_1243, - [1243] int32 V_1244, - [1244] int32 V_1245, - [1245] int32 V_1246, - [1246] int32 V_1247, - [1247] int32 V_1248, - [1248] int32 V_1249, - [1249] int32 V_1250, - [1250] int32 V_1251, - [1251] int32 V_1252, - [1252] int32 V_1253, - [1253] int32 V_1254, - [1254] int32 V_1255, - [1255] int32 V_1256, - [1256] int32 V_1257, - [1257] int32 V_1258, - [1258] int32 V_1259, - [1259] int32 V_1260, - [1260] int32 V_1261, - [1261] int32 V_1262, - [1262] int32 V_1263, - [1263] int32 V_1264, - [1264] int32 V_1265, - [1265] int32 V_1266, - [1266] int32 V_1267, - [1267] int32 V_1268, - [1268] int32 V_1269, - [1269] int32 V_1270, - [1270] int32 V_1271, - [1271] int32 V_1272, - [1272] int32 V_1273, - [1273] int32 V_1274, - [1274] int32 V_1275, - [1275] int32 V_1276, - [1276] int32 V_1277, - [1277] int32 V_1278, - [1278] int32 V_1279, - [1279] int32 V_1280, - [1280] int32 V_1281, - [1281] int32 V_1282, - [1282] int32 V_1283, - [1283] int32 V_1284, - [1284] int32 V_1285, - [1285] int32 V_1286, - [1286] int32 V_1287, - [1287] int32 V_1288, - [1288] int32 V_1289, - [1289] int32 V_1290, - [1290] int32 V_1291, - [1291] int32 V_1292, - [1292] int32 V_1293, - [1293] int32 V_1294, - [1294] int32 V_1295, - [1295] int32 V_1296, - [1296] int32 V_1297, - [1297] int32 V_1298, - [1298] int32 V_1299, - [1299] int32 V_1300, - [1300] int32 V_1301, - [1301] int32 V_1302, - [1302] int32 V_1303, - [1303] int32 V_1304, - [1304] int32 V_1305, - [1305] int32 V_1306, - [1306] int32 V_1307, - [1307] int32 V_1308, - [1308] int32 V_1309, - [1309] int32 V_1310, - [1310] int32 V_1311, - [1311] int32 V_1312, - [1312] int32 V_1313, - [1313] int32 V_1314, - [1314] int32 V_1315, - [1315] int32 V_1316, - [1316] int32 V_1317, - [1317] int32 V_1318, - [1318] int32 V_1319, - [1319] int32 V_1320, - [1320] int32 V_1321, - [1321] int32 V_1322, - [1322] int32 V_1323, - [1323] int32 V_1324, - [1324] int32 V_1325, - [1325] int32 V_1326, - [1326] int32 V_1327, - [1327] int32 V_1328, - [1328] int32 V_1329, - [1329] int32 V_1330, - [1330] int32 V_1331, - [1331] int32 V_1332, - [1332] int32 V_1333, - [1333] int32 V_1334, - [1334] int32 V_1335, - [1335] int32 V_1336, - [1336] int32 V_1337, - [1337] int32 V_1338, - [1338] int32 V_1339, - [1339] int32 V_1340, - [1340] int32 V_1341, - [1341] int32 V_1342, - [1342] int32 V_1343, - [1343] int32 V_1344, - [1344] int32 V_1345, - [1345] int32 V_1346, - [1346] int32 V_1347, - [1347] int32 V_1348, - [1348] int32 V_1349, - [1349] int32 V_1350, - [1350] int32 V_1351, - [1351] int32 V_1352, - [1352] int32 V_1353, - [1353] int32 V_1354, - [1354] int32 V_1355, - [1355] int32 V_1356, - [1356] int32 V_1357, - [1357] int32 V_1358, - [1358] int32 V_1359, - [1359] int32 V_1360, - [1360] int32 V_1361, - [1361] int32 V_1362, - [1362] int32 V_1363, - [1363] int32 V_1364, - [1364] int32 V_1365, - [1365] int32 V_1366, - [1366] int32 V_1367, - [1367] int32 V_1368, - [1368] int32 V_1369, - [1369] int32 V_1370, - [1370] int32 V_1371, - [1371] int32 V_1372, - [1372] int32 V_1373, - [1373] int32 V_1374, - [1374] int32 V_1375, - [1375] int32 V_1376, - [1376] int32 V_1377, - [1377] int32 V_1378, - [1378] int32 V_1379, - [1379] int32 V_1380, - [1380] int32 V_1381, - [1381] int32 V_1382, - [1382] int32 V_1383, - [1383] int32 V_1384, - [1384] int32 V_1385, - [1385] int32 V_1386, - [1386] int32 V_1387, - [1387] int32 V_1388, - [1388] int32 V_1389, - [1389] int32 V_1390, - [1390] int32 V_1391, - [1391] int32 V_1392, - [1392] int32 V_1393, - [1393] int32 V_1394, - [1394] int32 V_1395, - [1395] int32 V_1396, - [1396] int32 V_1397, - [1397] int32 V_1398, - [1398] int32 V_1399, - [1399] int32 V_1400, - [1400] int32 V_1401, - [1401] int32 V_1402, - [1402] int32 V_1403, - [1403] int32 V_1404, - [1404] int32 V_1405, - [1405] int32 V_1406, - [1406] int32 V_1407, - [1407] int32 V_1408, - [1408] int32 V_1409, - [1409] int32 V_1410, - [1410] int32 V_1411, - [1411] int32 V_1412, - [1412] int32 V_1413, - [1413] int32 V_1414, - [1414] int32 V_1415, - [1415] int32 V_1416, - [1416] int32 V_1417, - [1417] int32 V_1418, - [1418] int32 V_1419, - [1419] int32 V_1420, - [1420] int32 V_1421, - [1421] int32 V_1422, - [1422] int32 V_1423, - [1423] int32 V_1424, - [1424] int32 V_1425, - [1425] int32 V_1426, - [1426] int32 V_1427, - [1427] int32 V_1428, - [1428] int32 V_1429, - [1429] int32 V_1430, - [1430] int32 V_1431, - [1431] int32 V_1432, - [1432] int32 V_1433, - [1433] int32 V_1434, - [1434] int32 V_1435, - [1435] int32 V_1436, - [1436] int32 V_1437, - [1437] int32 V_1438, - [1438] int32 V_1439, - [1439] int32 V_1440, - [1440] int32 V_1441, - [1441] int32 V_1442, - [1442] int32 V_1443, - [1443] int32 V_1444, - [1444] int32 V_1445, - [1445] int32 V_1446, - [1446] int32 V_1447, - [1447] int32 V_1448, - [1448] int32 V_1449, - [1449] int32 V_1450, - [1450] int32 V_1451, - [1451] int32 V_1452, - [1452] int32 V_1453, - [1453] int32 V_1454, - [1454] int32 V_1455, - [1455] int32 V_1456, - [1456] int32 V_1457, - [1457] int32 V_1458, - [1458] int32 V_1459, - [1459] int32 V_1460, - [1460] int32 V_1461, - [1461] int32 V_1462, - [1462] int32 V_1463, - [1463] int32 V_1464, - [1464] int32 V_1465, - [1465] int32 V_1466, - [1466] int32 V_1467, - [1467] int32 V_1468, - [1468] int32 V_1469, - [1469] int32 V_1470, - [1470] int32 V_1471, - [1471] int32 V_1472, - [1472] int32 V_1473, - [1473] int32 V_1474, - [1474] int32 V_1475, - [1475] int32 V_1476, - [1476] int32 V_1477, - [1477] int32 V_1478, - [1478] int32 V_1479, - [1479] int32 V_1480, - [1480] int32 V_1481, - [1481] int32 V_1482, - [1482] int32 V_1483, - [1483] int32 V_1484, - [1484] int32 V_1485, - [1485] int32 V_1486, - [1486] int32 V_1487, - [1487] int32 V_1488, - [1488] int32 V_1489, - [1489] int32 V_1490, - [1490] int32 V_1491, - [1491] int32 V_1492, - [1492] int32 V_1493, - [1493] int32 V_1494, - [1494] int32 V_1495, - [1495] int32 V_1496, - [1496] int32 V_1497, - [1497] int32 V_1498, - [1498] int32 V_1499, - [1499] int32 V_1500, - [1500] int32 V_1501, - [1501] int32 V_1502, - [1502] int32 V_1503, - [1503] int32 V_1504, - [1504] int32 V_1505, - [1505] int32 V_1506, - [1506] int32 V_1507, - [1507] int32 V_1508, - [1508] int32 V_1509, - [1509] int32 V_1510, - [1510] int32 V_1511, - [1511] int32 V_1512, - [1512] int32 V_1513, - [1513] int32 V_1514, - [1514] int32 V_1515, - [1515] int32 V_1516, - [1516] int32 V_1517, - [1517] int32 V_1518, - [1518] int32 V_1519, - [1519] int32 V_1520, - [1520] int32 V_1521, - [1521] int32 V_1522, - [1522] int32 V_1523, - [1523] int32 V_1524, - [1524] int32 V_1525, - [1525] int32 V_1526, - [1526] int32 V_1527, - [1527] int32 V_1528, - [1528] int32 V_1529, - [1529] int32 V_1530, - [1530] int32 V_1531, - [1531] int32 V_1532, - [1532] int32 V_1533, - [1533] int32 V_1534, - [1534] int32 V_1535, - [1535] int32 V_1536, - [1536] int32 V_1537, - [1537] int32 V_1538, - [1538] int32 V_1539, - [1539] int32 V_1540, - [1540] int32 V_1541, - [1541] int32 V_1542, - [1542] int32 V_1543, - [1543] int32 V_1544, - [1544] int32 V_1545, - [1545] int32 V_1546, - [1546] int32 V_1547, - [1547] int32 V_1548, - [1548] int32 V_1549, - [1549] int32 V_1550, - [1550] int32 V_1551, - [1551] int32 V_1552, - [1552] int32 V_1553, - [1553] int32 V_1554, - [1554] int32 V_1555, - [1555] int32 V_1556, - [1556] int32 V_1557, - [1557] int32 V_1558, - [1558] int32 V_1559, - [1559] int32 V_1560, - [1560] int32 V_1561, - [1561] int32 V_1562, - [1562] int32 V_1563, - [1563] int32 V_1564, - [1564] int32 V_1565, - [1565] int32 V_1566, - [1566] int32 V_1567, - [1567] int32 V_1568, - [1568] int32 V_1569, - [1569] int32 V_1570, - [1570] int32 V_1571, - [1571] int32 V_1572, - [1572] int32 V_1573, - [1573] int32 V_1574, - [1574] int32 V_1575, - [1575] int32 V_1576, - [1576] int32 V_1577, - [1577] int32 V_1578, - [1578] int32 V_1579, - [1579] int32 V_1580, - [1580] int32 V_1581, - [1581] int32 V_1582, - [1582] int32 V_1583, - [1583] int32 V_1584, - [1584] int32 V_1585, - [1585] int32 V_1586, - [1586] int32 V_1587, - [1587] int32 V_1588, - [1588] int32 V_1589, - [1589] int32 V_1590, - [1590] int32 V_1591, - [1591] int32 V_1592, - [1592] int32 V_1593, - [1593] int32 V_1594, - [1594] int32 V_1595, - [1595] int32 V_1596, - [1596] int32 V_1597, - [1597] int32 V_1598, - [1598] int32 V_1599, - [1599] int32 V_1600, - [1600] int32 V_1601, - [1601] int32 V_1602, - [1602] int32 V_1603, - [1603] int32 V_1604, - [1604] int32 V_1605, - [1605] int32 V_1606, - [1606] int32 V_1607, - [1607] int32 V_1608, - [1608] int32 V_1609, - [1609] int32 V_1610, - [1610] int32 V_1611, - [1611] int32 V_1612, - [1612] int32 V_1613, - [1613] int32 V_1614, - [1614] int32 V_1615, - [1615] int32 V_1616, - [1616] int32 V_1617, - [1617] int32 V_1618, - [1618] int32 V_1619, - [1619] int32 V_1620, - [1620] int32 V_1621, - [1621] int32 V_1622, - [1622] int32 V_1623, - [1623] int32 V_1624, - [1624] int32 V_1625, - [1625] int32 V_1626, - [1626] int32 V_1627, - [1627] int32 V_1628, - [1628] int32 V_1629, - [1629] int32 V_1630, - [1630] int32 V_1631, - [1631] int32 V_1632, - [1632] int32 V_1633, - [1633] int32 V_1634, - [1634] int32 V_1635, - [1635] int32 V_1636, - [1636] int32 V_1637, - [1637] int32 V_1638, - [1638] int32 V_1639, - [1639] int32 V_1640, - [1640] int32 V_1641, - [1641] int32 V_1642, - [1642] int32 V_1643, - [1643] int32 V_1644, - [1644] int32 V_1645, - [1645] int32 V_1646, - [1646] int32 V_1647, - [1647] int32 V_1648, - [1648] int32 V_1649, - [1649] int32 V_1650, - [1650] int32 V_1651, - [1651] int32 V_1652, - [1652] int32 V_1653, - [1653] int32 V_1654, - [1654] int32 V_1655, - [1655] int32 V_1656, - [1656] int32 V_1657, - [1657] int32 V_1658, - [1658] int32 V_1659, - [1659] int32 V_1660, - [1660] int32 V_1661, - [1661] int32 V_1662, - [1662] int32 V_1663, - [1663] int32 V_1664, - [1664] int32 V_1665, - [1665] int32 V_1666, - [1666] int32 V_1667, - [1667] int32 V_1668, - [1668] int32 V_1669, - [1669] int32 V_1670, - [1670] int32 V_1671, - [1671] int32 V_1672, - [1672] int32 V_1673, - [1673] int32 V_1674, - [1674] int32 V_1675, - [1675] int32 V_1676, - [1676] int32 V_1677, - [1677] int32 V_1678, - [1678] int32 V_1679, - [1679] int32 V_1680, - [1680] int32 V_1681, - [1681] int32 V_1682, - [1682] int32 V_1683, - [1683] int32 V_1684, - [1684] int32 V_1685, - [1685] int32 V_1686, - [1686] int32 V_1687, - [1687] int32 V_1688, - [1688] int32 V_1689, - [1689] int32 V_1690, - [1690] int32 V_1691, - [1691] int32 V_1692, - [1692] int32 V_1693, - [1693] int32 V_1694, - [1694] int32 V_1695, - [1695] int32 V_1696, - [1696] int32 V_1697, - [1697] int32 V_1698, - [1698] int32 V_1699, - [1699] int32 V_1700, - [1700] int32 V_1701, - [1701] int32 V_1702, - [1702] int32 V_1703, - [1703] int32 V_1704, - [1704] int32 V_1705, - [1705] int32 V_1706, - [1706] int32 V_1707, - [1707] int32 V_1708, - [1708] int32 V_1709, - [1709] int32 V_1710, - [1710] int32 V_1711, - [1711] int32 V_1712, - [1712] int32 V_1713, - [1713] int32 V_1714, - [1714] int32 V_1715, - [1715] int32 V_1716, - [1716] int32 V_1717, - [1717] int32 V_1718, - [1718] int32 V_1719, - [1719] int32 V_1720, - [1720] int32 V_1721, - [1721] int32 V_1722, - [1722] int32 V_1723, - [1723] int32 V_1724, - [1724] int32 V_1725, - [1725] int32 V_1726, - [1726] int32 V_1727, - [1727] int32 V_1728, - [1728] int32 V_1729, - [1729] int32 V_1730, - [1730] int32 V_1731, - [1731] int32 V_1732, - [1732] int32 V_1733, - [1733] int32 V_1734, - [1734] int32 V_1735, - [1735] int32 V_1736, - [1736] int32 V_1737, - [1737] int32 V_1738, - [1738] int32 V_1739, - [1739] int32 V_1740, - [1740] int32 V_1741, - [1741] int32 V_1742, - [1742] int32 V_1743, - [1743] int32 V_1744, - [1744] int32 V_1745, - [1745] int32 V_1746, - [1746] int32 V_1747, - [1747] int32 V_1748, - [1748] int32 V_1749, - [1749] int32 V_1750, - [1750] int32 V_1751, - [1751] int32 V_1752, - [1752] int32 V_1753, - [1753] int32 V_1754, - [1754] int32 V_1755, - [1755] int32 V_1756, - [1756] int32 V_1757, - [1757] int32 V_1758, - [1758] int32 V_1759, - [1759] int32 V_1760, - [1760] int32 V_1761, - [1761] int32 V_1762, - [1762] int32 V_1763, - [1763] int32 V_1764, - [1764] int32 V_1765, - [1765] int32 V_1766, - [1766] int32 V_1767, - [1767] int32 V_1768, - [1768] int32 V_1769, - [1769] int32 V_1770, - [1770] int32 V_1771, - [1771] int32 V_1772, - [1772] int32 V_1773, - [1773] int32 V_1774, - [1774] int32 V_1775, - [1775] int32 V_1776, - [1776] int32 V_1777, - [1777] int32 V_1778, - [1778] int32 V_1779, - [1779] int32 V_1780, - [1780] int32 V_1781, - [1781] int32 V_1782, - [1782] int32 V_1783, - [1783] int32 V_1784, - [1784] int32 V_1785, - [1785] int32 V_1786, - [1786] int32 V_1787, - [1787] int32 V_1788, - [1788] int32 V_1789, - [1789] int32 V_1790, - [1790] int32 V_1791, - [1791] int32 V_1792, - [1792] int32 V_1793, - [1793] int32 V_1794, - [1794] int32 V_1795, - [1795] int32 V_1796, - [1796] int32 V_1797, - [1797] int32 V_1798, - [1798] int32 V_1799, - [1799] int32 V_1800, - [1800] int32 V_1801, - [1801] int32 V_1802, - [1802] int32 V_1803, - [1803] int32 V_1804, - [1804] int32 V_1805, - [1805] int32 V_1806, - [1806] int32 V_1807, - [1807] int32 V_1808, - [1808] int32 V_1809, - [1809] int32 V_1810, - [1810] int32 V_1811, - [1811] int32 V_1812, - [1812] int32 V_1813, - [1813] int32 V_1814, - [1814] int32 V_1815, - [1815] int32 V_1816, - [1816] int32 V_1817, - [1817] int32 V_1818, - [1818] int32 V_1819, - [1819] int32 V_1820, - [1820] int32 V_1821, - [1821] int32 V_1822, - [1822] int32 V_1823, - [1823] int32 V_1824, - [1824] int32 V_1825, - [1825] int32 V_1826, - [1826] int32 V_1827, - [1827] int32 V_1828, - [1828] int32 V_1829, - [1829] int32 V_1830, - [1830] int32 V_1831, - [1831] int32 V_1832, - [1832] int32 V_1833, - [1833] int32 V_1834, - [1834] int32 V_1835, - [1835] int32 V_1836, - [1836] int32 V_1837, - [1837] int32 V_1838, - [1838] int32 V_1839, - [1839] int32 V_1840, - [1840] int32 V_1841, - [1841] int32 V_1842, - [1842] int32 V_1843, - [1843] int32 V_1844, - [1844] int32 V_1845, - [1845] int32 V_1846, - [1846] int32 V_1847, - [1847] int32 V_1848, - [1848] int32 V_1849, - [1849] int32 V_1850, - [1850] int32 V_1851, - [1851] int32 V_1852, - [1852] int32 V_1853, - [1853] int32 V_1854, - [1854] int32 V_1855, - [1855] int32 V_1856, - [1856] int32 V_1857, - [1857] int32 V_1858, - [1858] int32 V_1859, - [1859] int32 V_1860, - [1860] int32 V_1861, - [1861] int32 V_1862, - [1862] int32 V_1863, - [1863] int32 V_1864, - [1864] int32 V_1865, - [1865] int32 V_1866, - [1866] int32 V_1867, - [1867] int32 V_1868, - [1868] int32 V_1869, - [1869] int32 V_1870, - [1870] int32 V_1871, - [1871] int32 V_1872, - [1872] int32 V_1873, - [1873] int32 V_1874, - [1874] int32 V_1875, - [1875] int32 V_1876, - [1876] int32 V_1877, - [1877] int32 V_1878, - [1878] int32 V_1879, - [1879] int32 V_1880, - [1880] int32 V_1881, - [1881] int32 V_1882, - [1882] int32 V_1883, - [1883] int32 V_1884, - [1884] int32 V_1885, - [1885] int32 V_1886, - [1886] int32 V_1887, - [1887] int32 V_1888, - [1888] int32 V_1889, - [1889] int32 V_1890, - [1890] int32 V_1891, - [1891] int32 V_1892, - [1892] int32 V_1893, - [1893] int32 V_1894, - [1894] int32 V_1895, - [1895] int32 V_1896, - [1896] int32 V_1897, - [1897] int32 V_1898, - [1898] int32 V_1899, - [1899] int32 V_1900, - [1900] int32 V_1901, - [1901] int32 V_1902, - [1902] int32 V_1903, - [1903] int32 V_1904, - [1904] int32 V_1905, - [1905] int32 V_1906, - [1906] int32 V_1907, - [1907] int32 V_1908, - [1908] int32 V_1909, - [1909] int32 V_1910, - [1910] int32 V_1911, - [1911] int32 V_1912, - [1912] int32 V_1913, - [1913] int32 V_1914, - [1914] int32 V_1915, - [1915] int32 V_1916, - [1916] int32 V_1917, - [1917] int32 V_1918, - [1918] int32 V_1919, - [1919] int32 V_1920, - [1920] int32 V_1921, - [1921] int32 V_1922, - [1922] int32 V_1923, - [1923] int32 V_1924, - [1924] int32 V_1925, - [1925] int32 V_1926, - [1926] int32 V_1927, - [1927] int32 V_1928, - [1928] int32 V_1929, - [1929] int32 V_1930, - [1930] int32 V_1931, - [1931] int32 V_1932, - [1932] int32 V_1933, - [1933] int32 V_1934, - [1934] int32 V_1935, - [1935] int32 V_1936, - [1936] int32 V_1937, - [1937] int32 V_1938, - [1938] int32 V_1939, - [1939] int32 V_1940, - [1940] int32 V_1941, - [1941] int32 V_1942, - [1942] int32 V_1943, - [1943] int32 V_1944, - [1944] int32 V_1945, - [1945] int32 V_1946, - [1946] int32 V_1947, - [1947] int32 V_1948, - [1948] int32 V_1949, - [1949] int32 V_1950, - [1950] int32 V_1951, - [1951] int32 V_1952, - [1952] int32 V_1953, - [1953] int32 V_1954, - [1954] int32 V_1955, - [1955] int32 V_1956, - [1956] int32 V_1957, - [1957] int32 V_1958, - [1958] int32 V_1959, - [1959] int32 V_1960, - [1960] int32 V_1961, - [1961] int32 V_1962, - [1962] int32 V_1963, - [1963] int32 V_1964, - [1964] int32 V_1965, - [1965] int32 V_1966, - [1966] int32 V_1967, - [1967] int32 V_1968, - [1968] int32 V_1969, - [1969] int32 V_1970, - [1970] int32 V_1971, - [1971] int32 V_1972, - [1972] int32 V_1973, - [1973] int32 V_1974, - [1974] int32 V_1975, - [1975] int32 V_1976, - [1976] int32 V_1977, - [1977] int32 V_1978, - [1978] int32 V_1979, - [1979] int32 V_1980, - [1980] int32 V_1981, - [1981] int32 V_1982, - [1982] int32 V_1983, - [1983] int32 V_1984, - [1984] int32 V_1985, - [1985] int32 V_1986, - [1986] int32 V_1987, - [1987] int32 V_1988, - [1988] int32 V_1989, - [1989] int32 V_1990, - [1990] int32 V_1991, - [1991] int32 V_1992, - [1992] int32 V_1993, - [1993] int32 V_1994, - [1994] int32 V_1995, - [1995] int32 V_1996, - [1996] int32 V_1997, - [1997] int32 V_1998, - [1998] int32 V_1999, - [1999] int32 V_2000, - [2000] int32 V_2001) - IL_0000: ldc.i4 0x1 - IL_0005: stloc V_1 - IL_0009: ldloc V_1800 - IL_000d: ldc.i4 0x64 - IL_0012: stloc V_998 - IL_0016: ldloc V_1 - IL_001a: sub - IL_001b: ldc.i4.m1 - IL_001c: stloc V_1518 - IL_0020: ldloc V_998 - IL_0024: ldc.i4 0x5f5e100 - IL_0029: stloc V_1888 - IL_002d: ldloc V_1518 - IL_0031: add - IL_0032: mul - IL_0033: ldloc V_1888 - IL_0037: sub - IL_0038: call void [System.Console]System.Console::WriteLine(int32) - IL_003d: ldc.i4 0x1 - IL_0042: stloc V_8 - IL_0046: ldloc V_7 - IL_004a: ldc.i4 0x64 - IL_004f: stloc V_6 - IL_0053: ldloc V_5 - IL_0057: sub - IL_0058: ldc.i4.m1 - IL_0059: stloc V_4 - IL_005d: ldloc V_3 - IL_0061: ldc.i4 0x5f5e100 - IL_0066: stloc V_2 - IL_006a: ldloc V_1 - IL_006e: add - IL_006f: mul - IL_0070: ldloc V_1888 - IL_0074: sub - IL_0075: call void [System.Console]System.Console::WriteLine(int32) - IL_007a: ldc.i4 0x1 - IL_007f: stloc V_1 - IL_0083: ldloc V_2 - IL_0087: ldc.i4 0x64 - IL_008c: stloc V_3 - IL_0090: ldloc V_4 - IL_0094: sub - IL_0095: ldc.i4.m1 - IL_0096: stloc V_5 - IL_009a: ldloc V_6 - IL_009e: ldc.i4 0x5f5e100 - IL_00a3: stloc V_7 - IL_00a7: ldloc V_8 - IL_00ab: add - IL_00ac: mul - IL_00ad: ldloc V_1888 - IL_00b1: sub - IL_00b2: call void [System.Console]System.Console::WriteLine(int32) - IL_00b7: ldc.i4 0x1 - IL_00bc: stloc V_1 - IL_00c0: ldloc V_158 - IL_00c4: ldc.i4 0x64 - IL_00c9: stloc V_58 - IL_00cd: ldloc V_1 - IL_00d1: sub - IL_00d2: ldc.i4.m1 - IL_00d3: stloc V_598 - IL_00d7: ldloc V_998 - IL_00db: ldc.i4 0x5f5e100 - IL_00e0: stloc V_1888 - IL_00e4: ldloc V_958 - IL_00e8: add - IL_00e9: mul - IL_00ea: ldloc V_918 - IL_00ee: sub - IL_00ef: call void [System.Console]System.Console::WriteLine(int32) - IL_00f4: ldc.i4 0x1 - IL_00f9: stloc V_1 - IL_00fd: ldloc V_10 - IL_0101: ldc.i4 0x64 - IL_0106: stloc V_98 - IL_010a: ldloc V_124 - IL_010e: sub - IL_010f: ldc.i4.m1 - IL_0110: stloc V_1518 - IL_0114: ldloc V_911 - IL_0118: ldc.i4 0x5f5e100 - IL_011d: stloc V_158 - IL_0121: ldloc V_518 - IL_0125: add - IL_0126: mul - IL_0127: ldloc V_1888 - IL_012b: sub - IL_012c: call void [System.Console]System.Console::WriteLine(int32) - IL_0131: ldc.i4 0x1 - IL_0136: stloc V_1 - IL_013a: ldloc V_10 - IL_013e: ldc.i4 0x64 - IL_0143: stloc V_9 - IL_0147: ldloc V_2 - IL_014b: sub - IL_014c: ldc.i4.m1 - IL_014d: stloc V_18 - IL_0151: ldloc V_98 - IL_0155: ldc.i4 0xa - IL_015a: stloc V_88 - IL_015e: ldloc V_51 - IL_0162: add - IL_0163: mul - IL_0164: ldloc V_1888 - IL_0168: sub - IL_0169: call void [System.Console]System.Console::WriteLine(int32) - IL_016e: ldc.i4 0x1 - IL_0173: stloc V_1 - IL_0177: ldloc V_1800 - IL_017b: ldc.i4 0x64 - IL_0180: stloc V_998 - IL_0184: ldloc V_1 - IL_0188: sub - IL_0189: ldc.i4.m1 - IL_018a: stloc V_1518 - IL_018e: ldloc V_998 - IL_0192: ldc.i4 0x5f5e100 - IL_0197: stloc V_1888 - IL_019b: ldloc V_1518 - IL_019f: add - IL_01a0: mul - IL_01a1: ldloc V_1888 - IL_01a5: sub - IL_01a6: call void [System.Console]System.Console::WriteLine(int32) - IL_01ab: ldc.i4 0x1 - IL_01b0: stloc V_8 - IL_01b4: ldloc V_7 - IL_01b8: ldc.i4 0x64 - IL_01bd: stloc V_6 - IL_01c1: ldloc V_5 - IL_01c5: sub - IL_01c6: ldc.i4.m1 - IL_01c7: stloc V_4 - IL_01cb: ldloc V_3 - IL_01cf: ldc.i4 0x5f5e100 - IL_01d4: stloc V_2 - IL_01d8: ldloc V_1 - IL_01dc: add - IL_01dd: mul - IL_01de: ldloc V_1888 - IL_01e2: sub - IL_01e3: call void [System.Console]System.Console::WriteLine(int32) - IL_01e8: ldc.i4 0x1 - IL_01ed: stloc V_1 - IL_01f1: ldloc V_2 - IL_01f5: ldc.i4 0x64 - IL_01fa: stloc V_3 - IL_01fe: ldloc V_4 - IL_0202: sub - IL_0203: ldc.i4.m1 - IL_0204: stloc V_5 - IL_0208: ldloc V_6 - IL_020c: ldc.i4 0x5f5e100 - IL_0211: stloc V_7 - IL_0215: ldloc V_8 - IL_0219: add - IL_021a: mul - IL_021b: ldloc V_1888 - IL_021f: sub - IL_0220: call void [System.Console]System.Console::WriteLine(int32) - IL_0225: ldc.i4 0x1 - IL_022a: stloc V_1 - IL_022e: ldloc V_158 - IL_0232: ldc.i4 0x64 - IL_0237: stloc V_58 - IL_023b: ldloc V_1 - IL_023f: sub - IL_0240: ldc.i4.m1 - IL_0241: stloc V_598 - IL_0245: ldloc V_998 - IL_0249: ldc.i4 0x5f5e100 - IL_024e: stloc V_1888 - IL_0252: ldloc V_958 - IL_0256: add - IL_0257: mul - IL_0258: ldloc V_918 - IL_025c: sub - IL_025d: call void [System.Console]System.Console::WriteLine(int32) - IL_0262: ldc.i4 0x1 - IL_0267: stloc V_1 - IL_026b: ldloc V_10 - IL_026f: ldc.i4 0x64 - IL_0274: stloc V_98 - IL_0278: ldloc V_124 - IL_027c: sub - IL_027d: ldc.i4.m1 - IL_027e: stloc V_1518 - IL_0282: ldloc V_911 - IL_0286: ldc.i4 0x5f5e100 - IL_028b: stloc V_158 - IL_028f: ldloc V_518 - IL_0293: add - IL_0294: mul - IL_0295: ldloc V_1888 - IL_0299: sub - IL_029a: call void [System.Console]System.Console::WriteLine(int32) - IL_029f: ldc.i4 0x1 - IL_02a4: stloc V_1 - IL_02a8: ldloc V_10 - IL_02ac: ldc.i4 0x64 - IL_02b1: stloc V_9 - IL_02b5: ldloc V_2 - IL_02b9: sub - IL_02ba: ldc.i4.m1 - IL_02bb: stloc V_18 - IL_02bf: ldloc V_98 - IL_02c3: ldc.i4 0xa - IL_02c8: stloc V_88 - IL_02cc: ldloc V_51 - IL_02d0: add - IL_02d1: mul - IL_02d2: ldloc V_1888 - IL_02d6: sub - IL_02d7: call void [System.Console]System.Console::WriteLine(int32) - IL_02dc: ldc.i4 0x1 - IL_02e1: stloc V_1 - IL_02e5: ldloc V_1800 - IL_02e9: ldc.i4 0x64 - IL_02ee: stloc V_998 - IL_02f2: ldloc V_1 - IL_02f6: sub - IL_02f7: ldc.i4.m1 - IL_02f8: stloc V_1518 - IL_02fc: ldloc V_998 - IL_0300: ldc.i4 0x5f5e100 - IL_0305: stloc V_1888 - IL_0309: ldloc V_1518 - IL_030d: add - IL_030e: mul - IL_030f: ldloc V_1888 - IL_0313: sub - IL_0314: call void [System.Console]System.Console::WriteLine(int32) - IL_0319: ldc.i4 0x1 - IL_031e: stloc V_8 - IL_0322: ldloc V_7 - IL_0326: ldc.i4 0x64 - IL_032b: stloc V_6 - IL_032f: ldloc V_5 - IL_0333: sub - IL_0334: ldc.i4.m1 - IL_0335: stloc V_4 - IL_0339: ldloc V_3 - IL_033d: ldc.i4 0x5f5e100 - IL_0342: stloc V_2 - IL_0346: ldloc V_1 - IL_034a: add - IL_034b: mul - IL_034c: ldloc V_1888 - IL_0350: sub - IL_0351: call void [System.Console]System.Console::WriteLine(int32) - IL_0356: ldc.i4 0x1 - IL_035b: stloc V_1 - IL_035f: ldloc V_2 - IL_0363: ldc.i4 0x64 - IL_0368: stloc V_3 - IL_036c: ldloc V_4 - IL_0370: sub - IL_0371: ldc.i4.m1 - IL_0372: stloc V_5 - IL_0376: ldloc V_6 - IL_037a: ldc.i4 0x5f5e100 - IL_037f: stloc V_7 - IL_0383: ldloc V_8 - IL_0387: add - IL_0388: mul - IL_0389: ldloc V_1888 - IL_038d: sub - IL_038e: call void [System.Console]System.Console::WriteLine(int32) - IL_0393: ldc.i4 0x1 - IL_0398: stloc V_1 - IL_039c: ldloc V_158 - IL_03a0: ldc.i4 0x64 - IL_03a5: stloc V_58 - IL_03a9: ldloc V_1 - IL_03ad: sub - IL_03ae: ldc.i4.m1 - IL_03af: stloc V_598 - IL_03b3: ldloc V_998 - IL_03b7: ldc.i4 0x5f5e100 - IL_03bc: stloc V_1888 - IL_03c0: ldloc V_958 - IL_03c4: add - IL_03c5: mul - IL_03c6: ldloc V_918 - IL_03ca: sub - IL_03cb: call void [System.Console]System.Console::WriteLine(int32) - IL_03d0: ldc.i4 0x1 - IL_03d5: stloc V_1 - IL_03d9: ldloc V_10 - IL_03dd: ldc.i4 0x64 - IL_03e2: stloc V_98 - IL_03e6: ldloc V_124 - IL_03ea: sub - IL_03eb: ldc.i4.m1 - IL_03ec: stloc V_1518 - IL_03f0: ldloc V_911 - IL_03f4: ldc.i4 0x5f5e100 - IL_03f9: stloc V_158 - IL_03fd: ldloc V_518 - IL_0401: add - IL_0402: mul - IL_0403: ldloc V_1888 - IL_0407: sub - IL_0408: call void [System.Console]System.Console::WriteLine(int32) - IL_040d: ldc.i4 0x1 - IL_0412: stloc V_1 - IL_0416: ldloc V_10 - IL_041a: ldc.i4 0x64 - IL_041f: stloc V_9 - IL_0423: ldloc V_2 - IL_0427: sub - IL_0428: ldc.i4.m1 - IL_0429: stloc V_18 - IL_042d: ldloc V_98 - IL_0431: ldc.i4 0xa - IL_0436: stloc V_88 - IL_043a: ldloc V_51 - IL_043e: add - IL_043f: mul - IL_0440: ldloc V_1888 - IL_0444: sub - IL_0445: call void [System.Console]System.Console::WriteLine(int32) - IL_044a: ldc.i4 0x1 - IL_044f: stloc V_1 - IL_0453: ldloc V_1800 - IL_0457: ldc.i4 0x64 - IL_045c: stloc V_998 - IL_0460: ldloc V_1 - IL_0464: sub - IL_0465: ldc.i4.m1 - IL_0466: stloc V_1518 - IL_046a: ldloc V_998 - IL_046e: ldc.i4 0x5f5e100 - IL_0473: stloc V_1888 - IL_0477: ldloc V_1518 - IL_047b: add - IL_047c: mul - IL_047d: ldloc V_1888 - IL_0481: sub - IL_0482: call void [System.Console]System.Console::WriteLine(int32) - IL_0487: ldc.i4 0x1 - IL_048c: stloc V_8 - IL_0490: ldloc V_7 - IL_0494: ldc.i4 0x64 - IL_0499: stloc V_6 - IL_049d: ldloc V_5 - IL_04a1: sub - IL_04a2: ldc.i4.m1 - IL_04a3: stloc V_4 - IL_04a7: ldloc V_3 - IL_04ab: ldc.i4 0x5f5e100 - IL_04b0: stloc V_2 - IL_04b4: ldloc V_1 - IL_04b8: add - IL_04b9: mul - IL_04ba: ldloc V_1888 - IL_04be: sub - IL_04bf: call void [System.Console]System.Console::WriteLine(int32) - IL_04c4: ldc.i4 0x1 - IL_04c9: stloc V_1 - IL_04cd: ldloc V_2 - IL_04d1: ldc.i4 0x64 - IL_04d6: stloc V_3 - IL_04da: ldloc V_4 - IL_04de: sub - IL_04df: ldc.i4.m1 - IL_04e0: stloc V_5 - IL_04e4: ldloc V_6 - IL_04e8: ldc.i4 0x5f5e100 - IL_04ed: stloc V_7 - IL_04f1: ldloc V_8 - IL_04f5: add - IL_04f6: mul - IL_04f7: ldloc V_1888 - IL_04fb: sub - IL_04fc: call void [System.Console]System.Console::WriteLine(int32) - IL_0501: ldc.i4 0x1 - IL_0506: stloc V_1 - IL_050a: ldloc V_158 - IL_050e: ldc.i4 0x64 - IL_0513: stloc V_58 - IL_0517: ldloc V_1 - IL_051b: sub - IL_051c: ldc.i4.m1 - IL_051d: stloc V_598 - IL_0521: ldloc V_998 - IL_0525: ldc.i4 0x5f5e100 - IL_052a: stloc V_1888 - IL_052e: ldloc V_958 - IL_0532: add - IL_0533: mul - IL_0534: ldloc V_918 - IL_0538: sub - IL_0539: call void [System.Console]System.Console::WriteLine(int32) - IL_053e: ldc.i4 0x1 - IL_0543: stloc V_1 - IL_0547: ldloc V_10 - IL_054b: ldc.i4 0x64 - IL_0550: stloc V_98 - IL_0554: ldloc V_124 - IL_0558: sub - IL_0559: ldc.i4.m1 - IL_055a: stloc V_1518 - IL_055e: ldloc V_911 - IL_0562: ldc.i4 0x5f5e100 - IL_0567: stloc V_158 - IL_056b: ldloc V_518 - IL_056f: add - IL_0570: mul - IL_0571: ldloc V_1888 - IL_0575: sub - IL_0576: call void [System.Console]System.Console::WriteLine(int32) - IL_057b: ldc.i4 0x1 - IL_0580: stloc V_1 - IL_0584: ldloc V_10 - IL_0588: ldc.i4 0x64 - IL_058d: stloc V_9 - IL_0591: ldloc V_2 - IL_0595: sub - IL_0596: ldc.i4.m1 - IL_0597: stloc V_18 - IL_059b: ldloc V_98 - IL_059f: ldc.i4 0xa - IL_05a4: stloc V_88 - IL_05a8: ldloc V_51 - IL_05ac: add - IL_05ad: mul - IL_05ae: ldloc V_1888 - IL_05b2: sub - IL_05b3: call void [System.Console]System.Console::WriteLine(int32) - IL_05b8: ldc.i4 0x1 - IL_05bd: stloc V_1 - IL_05c1: ldloc V_1800 - IL_05c5: ldc.i4 0x64 - IL_05ca: stloc V_998 - IL_05ce: ldloc V_1 - IL_05d2: sub - IL_05d3: ldc.i4.m1 - IL_05d4: stloc V_1518 - IL_05d8: ldloc V_998 - IL_05dc: ldc.i4 0x5f5e100 - IL_05e1: stloc V_1888 - IL_05e5: ldloc V_1518 - IL_05e9: add - IL_05ea: mul - IL_05eb: ldloc V_1888 - IL_05ef: sub - IL_05f0: call void [System.Console]System.Console::WriteLine(int32) - IL_05f5: ldc.i4 0x1 - IL_05fa: stloc V_8 - IL_05fe: ldloc V_7 - IL_0602: ldc.i4 0x64 - IL_0607: stloc V_6 - IL_060b: ldloc V_5 - IL_060f: sub - IL_0610: ldc.i4.m1 - IL_0611: stloc V_4 - IL_0615: ldloc V_3 - IL_0619: ldc.i4 0x5f5e100 - IL_061e: stloc V_2 - IL_0622: ldloc V_1 - IL_0626: add - IL_0627: mul - IL_0628: ldloc V_1888 - IL_062c: sub - IL_062d: call void [System.Console]System.Console::WriteLine(int32) - IL_0632: ldc.i4 0x1 - IL_0637: stloc V_1 - IL_063b: ldloc V_2 - IL_063f: ldc.i4 0x64 - IL_0644: stloc V_3 - IL_0648: ldloc V_4 - IL_064c: sub - IL_064d: ldc.i4.m1 - IL_064e: stloc V_5 - IL_0652: ldloc V_6 - IL_0656: ldc.i4 0x5f5e100 - IL_065b: stloc V_7 - IL_065f: ldloc V_8 - IL_0663: add - IL_0664: mul - IL_0665: ldloc V_1888 - IL_0669: sub - IL_066a: call void [System.Console]System.Console::WriteLine(int32) - IL_066f: ldc.i4 0x1 - IL_0674: stloc V_1 - IL_0678: ldloc V_158 - IL_067c: ldc.i4 0x64 - IL_0681: stloc V_58 - IL_0685: ldloc V_1 - IL_0689: sub - IL_068a: ldc.i4.m1 - IL_068b: stloc V_598 - IL_068f: ldloc V_998 - IL_0693: ldc.i4 0x5f5e100 - IL_0698: stloc V_1888 - IL_069c: ldloc V_958 - IL_06a0: add - IL_06a1: mul - IL_06a2: ldloc V_918 - IL_06a6: sub - IL_06a7: call void [System.Console]System.Console::WriteLine(int32) - IL_06ac: ldc.i4 0x1 - IL_06b1: stloc V_1 - IL_06b5: ldloc V_10 - IL_06b9: ldc.i4 0x64 - IL_06be: stloc V_98 - IL_06c2: ldloc V_124 - IL_06c6: sub - IL_06c7: ldc.i4.m1 - IL_06c8: stloc V_1518 - IL_06cc: ldloc V_911 - IL_06d0: ldc.i4 0x5f5e100 - IL_06d5: stloc V_158 - IL_06d9: ldloc V_518 - IL_06dd: add - IL_06de: mul - IL_06df: ldloc V_1888 - IL_06e3: sub - IL_06e4: call void [System.Console]System.Console::WriteLine(int32) - IL_06e9: ldc.i4 0x1 - IL_06ee: stloc V_1 - IL_06f2: ldloc V_10 - IL_06f6: ldc.i4 0x64 - IL_06fb: stloc V_9 - IL_06ff: ldloc V_2 - IL_0703: sub - IL_0704: ldc.i4.m1 - IL_0705: stloc V_18 - IL_0709: ldloc V_98 - IL_070d: ldc.i4 0xa - IL_0712: stloc V_88 - IL_0716: ldloc V_51 - IL_071a: add - IL_071b: mul - IL_071c: ldloc V_1888 - IL_0720: sub - IL_0721: call void [System.Console]System.Console::WriteLine(int32) - IL_0726: ldc.i4 0x1 - IL_072b: stloc V_1 - IL_072f: ldloc V_1800 - IL_0733: ldc.i4 0x64 - IL_0738: stloc V_998 - IL_073c: ldloc V_1 - IL_0740: sub - IL_0741: ldc.i4.m1 - IL_0742: stloc V_1518 - IL_0746: ldloc V_998 - IL_074a: ldc.i4 0x5f5e100 - IL_074f: stloc V_1888 - IL_0753: ldloc V_1518 - IL_0757: add - IL_0758: mul - IL_0759: ldloc V_1888 - IL_075d: sub - IL_075e: dup - IL_075f: call void [System.Console]System.Console::WriteLine(int32) - IL_0764: ret -} diff --git a/src/coreclr/tests/src/JIT/opt/JitMinOpts/Perf/LVRefCnt1.il b/src/coreclr/tests/src/JIT/opt/JitMinOpts/Perf/LVRefCnt1.il deleted file mode 100644 index 10dc2394719b..000000000000 --- a/src/coreclr/tests/src/JIT/opt/JitMinOpts/Perf/LVRefCnt1.il +++ /dev/null @@ -1,16032 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// DEFAULT_MIN_OPTS_LV_REF_COUNT 8000 -// New refCnts for V00: refCnt = 8001 -// OPTIONS: opts.MinOpts() == true -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly LVRefCnt1 {} -.method public static int32 Main() -{ -.entrypoint -call int32 f() -ldc.i4 100 -sub -ret -} -.method public static int32 f() -{ -.locals init (int32 V_0) -ldc.i4 100 -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldloc V_0 -add -ldc.i4 100 -add -ret -} diff --git a/src/coreclr/tests/src/JIT/opt/Types/Equality.cs b/src/coreclr/tests/src/JIT/opt/Types/Equality.cs deleted file mode 100644 index dea3e3073d6c..000000000000 --- a/src/coreclr/tests/src/JIT/opt/Types/Equality.cs +++ /dev/null @@ -1,90 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// Optimization of type equality tests - -using System; - -struct Wrap1 {} - -struct Wrap2 {} - -class EqualityTests -{ - static bool IsInt() - { - return (typeof(T) == typeof(int)); - } - - static bool IsInt(T t) - { - return (t.GetType() == typeof(int)); - } - - static bool IsString() - { - return (typeof(T) == typeof(string)); - } - - static bool IsString(T t) - { - return (t.GetType() == typeof(string)); - } - - static bool IsIntArray() - { - return (typeof(T) == typeof(int[])); - } - - static bool IsStringArray() - { - return (typeof(T) == typeof(string[])); - } - - static bool IsWrap1() - { - return (typeof(U) == typeof(Wrap1)); - } - - static bool IsWrap1(U u) - { - return (u.GetType() == typeof(Wrap1)); - } - - public static int Main() - { - // Fully optimized - bool c1 = IsInt(); - bool c2 = IsInt(); - bool c3 = IsString(); - - // Partially optimized (method table check) - bool c4 = IsString(); - - // Fully optimized - bool d1 = IsInt(3); - bool d3 = IsString(3); - - // Partially optimized (method table check) - bool d2 = IsInt("three"); - bool d4 = IsString("three"); - - // Partially optimized (runtime lookup) - bool e1 = IsIntArray(); - bool e2 = IsIntArray(); - bool e3 = IsStringArray(); - bool e4 = IsStringArray(); - - // Fully optimized - bool f1 = IsWrap1>(); - bool f2 = IsWrap1>(); - bool f3 = IsWrap1>(new Wrap2()); - bool f4 = IsWrap1>(new Wrap1()); - - bool pos = c1 & c4 & d1 & d4 & e1 & e4 & f1 & f4; - bool neg = c2 & c3 & d2 & d3 & e2 & e3 & f2 & f3; - - return pos & !neg ? 100 : 0; - } -} diff --git a/src/coreclr/tests/src/Loader/binding/assemblies/assemblybugs/102140/test.cs b/src/coreclr/tests/src/Loader/binding/assemblies/assemblybugs/102140/test.cs deleted file mode 100644 index 486413b488a6..000000000000 --- a/src/coreclr/tests/src/Loader/binding/assemblies/assemblybugs/102140/test.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Reflection; - -public class test{ - - private static double numtests = 4.0; - - public static int Main () { - Console.WriteLine("Test1: new AssemblyName(\"server2\")"); - AssemblyName asmN1 = new AssemblyName("server2"); - int ret = Check(asmN1); - Console.WriteLine("Test2: new AssemblyName(\"server2, Version=0.0.0.0\")"); - AssemblyName asmN2 = new AssemblyName("server2, Version=0.0.0.0"); - ret = ret + Check(asmN2); - Console.WriteLine("Test3: new AssemblyName(\"server2, Culture=neutral\")"); - AssemblyName asmN3 = new AssemblyName("server2, Culture=neutral"); - ret = ret + Check(asmN3); - Console.WriteLine("Test4: new AssemblyName(\"server2, Culture=neutral, Version=0.0.0.0\")"); - AssemblyName asmN4 = new AssemblyName("server2, Culture=neutral, Version=0.0.0.0"); - ret = ret + Check(asmN4); - if(ret/numtests==100.0){ - Console.WriteLine("All Passed!"); - return 100; - }else{ - Console.WriteLine("Failed!"); - return ret; - } - } - - public static int Check(AssemblyName asmN){ - String strVersion = asmN.ToString(); - int index = strVersion.ToLower().IndexOf("version="); - if(asmN.Version==null){ - if(index==-1){ - Console.WriteLine("Passed: both asmName.ToString() version and asmName.Version are null."); - return 100; - }else{ - Console.WriteLine("Failed: asmName.Version != asmName.ToString() Version"); - Console.WriteLine ("\tasmName.Version = \"{0}\"", asmN.Version); - Console.WriteLine ("\tasmName.ToString() = \"{0}\"", strVersion); - return 101; - } - }else{ - strVersion = strVersion.Substring(index+8,7); - if(strVersion.Equals(asmN.Version.ToString())){ - Console.WriteLine("Passed: asmName.Version == asmName.ToString() Version"); - return 100; - }else{ - Console.WriteLine("Failed: asmName.Version != asmName.ToString() Version"); - Console.WriteLine ("\tasmName.Version = \"{0}\"", asmN.Version); - Console.WriteLine ("\tasmName.ToString() = \"{0}\"", strVersion); - return 101; - } - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Loader/binding/tracing/Helpers.cs b/src/coreclr/tests/src/Loader/binding/tracing/Helpers.cs deleted file mode 100644 index 9f05bb508afe..000000000000 --- a/src/coreclr/tests/src/Loader/binding/tracing/Helpers.cs +++ /dev/null @@ -1,191 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Reflection; -using System.Runtime.Loader; - -using TestLibrary; - -namespace BinderTracingTests -{ - internal class Helpers - { - public static void ValidateBindOperation(BindOperation expected, BindOperation actual) - { - ValidateAssemblyName(expected.AssemblyName, actual.AssemblyName, nameof(BindOperation.AssemblyName)); - Assert.AreEqual(expected.AssemblyPath ?? string.Empty, actual.AssemblyPath, $"Unexpected value for {nameof(BindOperation.AssemblyPath)} on event"); - Assert.AreEqual(expected.AssemblyLoadContext, actual.AssemblyLoadContext, $"Unexpected value for {nameof(BindOperation.AssemblyLoadContext)} on event"); - Assert.AreEqual(expected.RequestingAssemblyLoadContext ?? string.Empty, actual.RequestingAssemblyLoadContext, $"Unexpected value for {nameof(BindOperation.RequestingAssemblyLoadContext)} on event"); - ValidateAssemblyName(expected.RequestingAssembly, actual.RequestingAssembly, nameof(BindOperation.RequestingAssembly)); - - Assert.AreEqual(expected.Success, actual.Success, $"Unexpected value for {nameof(BindOperation.Success)} on event"); - Assert.AreEqual(expected.ResultAssemblyPath ?? string.Empty, actual.ResultAssemblyPath, $"Unexpected value for {nameof(BindOperation.ResultAssemblyPath)} on event"); - Assert.AreEqual(expected.Cached, actual.Cached, $"Unexpected value for {nameof(BindOperation.Cached)} on event"); - ValidateAssemblyName(expected.ResultAssemblyName, actual.ResultAssemblyName, nameof(BindOperation.ResultAssemblyName)); - - ValidateResolutionAttempts(expected.ResolutionAttempts, actual.ResolutionAttempts); - - ValidateHandlerInvocations(expected.AssemblyLoadContextResolvingHandlers, actual.AssemblyLoadContextResolvingHandlers, "AssemblyLoadContextResolving"); - ValidateHandlerInvocations(expected.AppDomainAssemblyResolveHandlers, actual.AppDomainAssemblyResolveHandlers, "AppDomainAssemblyResolve"); - ValidateLoadFromHandlerInvocation(expected.AssemblyLoadFromHandler, actual.AssemblyLoadFromHandler); - - ValidateProbedPaths(expected.ProbedPaths, actual.ProbedPaths); - - ValidateNestedBinds(expected.NestedBinds, actual.NestedBinds); - } - - public static string GetAssemblyInAppPath(string assemblyName) - { - string appPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); - return Path.Combine(appPath, $"{assemblyName}.dll"); - } - - public static string GetAssemblyInSubdirectoryPath(string assemblyName) - { - return Path.Combine(GetSubdirectoryPath(), $"{assemblyName}.dll"); - } - - public static string GetSubdirectoryPath() - { - string appPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); - return Path.Combine(appPath, "DependentAssemblies"); - } - - public static string GetProbingFilePath(ProbedPath.PathSource pathSource, string assemblyName, string culture, string baseAssemblyDirectory = null) - { - return GetProbingFilePath(pathSource, assemblyName, false, culture, baseAssemblyDirectory); - } - - public static string GetProbingFilePath(ProbedPath.PathSource pathSource, string assemblyName, bool isExe) - { - return GetProbingFilePath(pathSource, assemblyName, isExe, null, null); - } - - private static string GetProbingFilePath(ProbedPath.PathSource pathSource, string assemblyName, bool isExe, string culture, string baseAssemblyDirectory) - { - string baseDirectory = baseAssemblyDirectory ?? Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); - if (!string.IsNullOrEmpty(culture)) - baseDirectory = Path.Combine(baseDirectory, culture); - - string extension = isExe ? "exe" : "dll"; - switch (pathSource) - { - case ProbedPath.PathSource.AppNativeImagePaths: - return Path.Combine(baseDirectory, $"{assemblyName}.ni.{extension}"); - case ProbedPath.PathSource.AppPaths: - case ProbedPath.PathSource.SatelliteSubdirectory: - return Path.Combine(baseDirectory, $"{assemblyName}.{extension}"); - default: - throw new ArgumentOutOfRangeException(nameof(pathSource)); - } - } - - public static bool AssemblyNamesMatch(AssemblyName name1, AssemblyName name2) - { - if (name1 == null || name2 == null) - return name1 == null && name2 == null; - - return name1.Name == name2.Name - && ((name1.Version == null && name2.Version == null) || name1.Version == name2.Version) - && ((string.IsNullOrEmpty(name1.CultureName) && string.IsNullOrEmpty(name2.CultureName)) || name1.CultureName == name2.CultureName); - } - - private static void ValidateAssemblyName(AssemblyName expected, AssemblyName actual, string propertyName) - { - Assert.IsTrue(AssemblyNamesMatch(expected, actual), $"Unexpected value for {propertyName} on event - expected: {expected}, actual: {actual}"); - } - - private static void ValidateResolutionAttempts(List expected, List actual) - { - if (expected.Count > 0) - Assert.AreEqual(expected.Count, actual.Count, - $"Unexpected resolution attempt count. Actual events:{Environment.NewLine}{string.Join(Environment.NewLine, actual.Select(a => a.ToString()))}"); - - for (var i = 0; i < expected.Count; i++) - { - var a = actual[i]; - var e = expected[i]; - - string expectedActualMessage = $"{Environment.NewLine}Expected resolution attempt:{Environment.NewLine}{e.ToString()}{Environment.NewLine}Actual resolution attempt:{Environment.NewLine}{a.ToString()}"; - ValidateAssemblyName(e.AssemblyName, a.AssemblyName, nameof(ResolutionAttempt.AssemblyName)); - Assert.AreEqual(e.Stage, a.Stage, $"Unexpected value for {nameof(ResolutionAttempt.Stage)} {expectedActualMessage}"); - Assert.AreEqual(e.AssemblyLoadContext, a.AssemblyLoadContext, $"Unexpected value for {nameof(ResolutionAttempt.AssemblyLoadContext)} {expectedActualMessage}"); - Assert.AreEqual(e.Result, a.Result, $"Unexpected value for {nameof(ResolutionAttempt.Result)} {expectedActualMessage}"); - ValidateAssemblyName(e.ResultAssemblyName, a.ResultAssemblyName, nameof(ResolutionAttempt.ResultAssemblyName)); - Assert.AreEqual(e.ResultAssemblyPath ?? string.Empty, a.ResultAssemblyPath, $"Unexpected value for {nameof(ResolutionAttempt.ResultAssemblyPath)} {expectedActualMessage}"); - Assert.AreEqual(e.ErrorMessage ?? string.Empty, a.ErrorMessage, $"Unexpected value for {nameof(ResolutionAttempt.ErrorMessage)} {expectedActualMessage}"); - } - } - - private static void ValidateHandlerInvocations(List expected, List actual, string eventName) - { - Assert.AreEqual(expected.Count, actual.Count, $"Unexpected handler invocation count for {eventName}"); - - foreach (var match in expected) - { - Predicate pred = h => - AssemblyNamesMatch(h.AssemblyName, match.AssemblyName) - && h.HandlerName == match.HandlerName - && h.AssemblyLoadContext == match.AssemblyLoadContext - && AssemblyNamesMatch(h.ResultAssemblyName, match.ResultAssemblyName) - && h.ResultAssemblyPath == match.ResultAssemblyPath; - Assert.IsTrue(actual.Exists(pred), $"Handler invocation not found: {match.ToString()}"); - } - } - - private static void ValidateLoadFromHandlerInvocation(LoadFromHandlerInvocation expected, LoadFromHandlerInvocation actual) - { - if (expected == null || actual == null) - { - Assert.IsNull(expected); - Assert.IsNull(actual); - return; - } - - ValidateAssemblyName(expected.AssemblyName, actual.AssemblyName, nameof(LoadFromHandlerInvocation.AssemblyName)); - Assert.AreEqual(expected.IsTrackedLoad, actual.IsTrackedLoad, $"Unexpected value for {nameof(LoadFromHandlerInvocation.IsTrackedLoad)} on event"); - Assert.AreEqual(expected.RequestingAssemblyPath, actual.RequestingAssemblyPath, $"Unexpected value for {nameof(LoadFromHandlerInvocation.RequestingAssemblyPath)} on event"); - Assert.AreEqual(expected.ComputedRequestedAssemblyPath, actual.ComputedRequestedAssemblyPath, $"Unexpected value for {nameof(LoadFromHandlerInvocation.ComputedRequestedAssemblyPath)} on event"); - } - - private static void ValidateProbedPaths(List expected, List actual) - { - foreach (var match in expected) - { - Predicate pred = p => p.FilePath == match.FilePath - && p.Source == match.Source - && p.Result == match.Result; - Assert.IsTrue(actual.Exists(pred), $"Probed path not found: {match.ToString()}"); - } - } - - private static bool BindOperationsMatch(BindOperation bind1, BindOperation bind2) - { - try - { - ValidateBindOperation(bind1, bind2); - } - catch (AssertTestException e) - { - return false; - } - - return true; - } - - private static void ValidateNestedBinds(List expected, List actual) - { - foreach (var match in expected) - { - Predicate pred = b => BindOperationsMatch(match, b); - Assert.IsTrue(actual.Exists(pred), $"Nested bind operation not found: {match.ToString()}"); - } - } - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/DefaultInterfaceMethods/constrainedcall/constrained2.il b/src/coreclr/tests/src/Loader/classloader/DefaultInterfaceMethods/constrainedcall/constrained2.il deleted file mode 100644 index 5a928ff385a6..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/DefaultInterfaceMethods/constrainedcall/constrained2.il +++ /dev/null @@ -1,152 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib { } -.assembly constrained2 { } - -.class interface private abstract auto ansi IAdder`1 -{ - .method public hidebysig newslot abstract virtual instance int32 Add(int32) - { - } - - .method public hidebysig newslot virtual instance int32 PlusPlus() - { - ldstr "IAdder`1:PlusPlus" - call void [mscorlib]System.Console::WriteLine(string) - - ldarg.0 - ldc.i4.1 - callvirt instance int32 class IAdder`1::Add(int32) - ret - } -} - -.class value Adder`1 implements class IAdder`1, class IAdder`1 -{ - .field private int32 _field - - .method public hidebysig newslot virtual instance int32 Add(int32) cil managed - { - ldarg.0 - dup - ldfld int32 valuetype Adder`1::_field - ldarg.1 - add - stfld int32 valuetype Adder`1::_field - ldarg.0 - ldfld int32 valuetype Adder`1::_field - ret - } - - .method private hidebysig newslot virtual instance int32 'IAdder.PlusPlus'() - { - .override method instance int32 class IAdder`1::PlusPlus() - - ldstr "Adder`1:'IAdder.PlusPlus'" - call void [mscorlib]System.Console::WriteLine(string) - - ldarg.0 - ldc.i4.2 - call instance int32 valuetype Adder`1::Add(int32) - ret - } -} - -.method public hidebysig static int32 Check<(class IAdder`1, class IAdder`1) T,U>(!!T t) -{ - // The constrained calls below may or may not box for a valuetype T - // depending on whether IAdder`1::PlusPlus() ends up calling - // the default implementation of the interface method. - - ldarga.s 0 - constrained. !!T - callvirt instance int32 class IAdder`1::PlusPlus() - ldarga.s 0 - constrained. !!T - callvirt instance int32 class IAdder`1::PlusPlus() - add - - ldarga.s 0 - constrained. !!T - callvirt instance int32 class IAdder`1::PlusPlus() - ldarga.s 0 - constrained. !!T - callvirt instance int32 class IAdder`1::PlusPlus() - add - - add - - ret -} - -.method public hidebysig static int32 Main() -{ - .entrypoint - - .locals init ( - valuetype Adder`1, - int32 - ) - - // This will end up calling the implementation of IAdder.PlusPlus - // provided by the Adder valuetype. - // The sum returned by the Check method will be 2+4+6+8 = 20. - ldloc.0 - call int32 Check,string>(!!0) - ldc.i4 20 - ceq - brtrue String_OK - - ldc.i4 1 - ret - -String_OK: - - // This will end up calling the implementation of IAdder.PlusPlus - // provided by the default interface method. - // The sum returned by the Check method will be 1+1+2+4 = 8. - - // This requires a runtime that can generate boxing stubs. We will support - // both the case when this is not supported, and when it's implemented. - ldc.i4.8 - stloc.1 - - .try - { - ldloca 0 - initobj valuetype Adder`1 - ldloc.0 - call int32 Check,object>(!!0) - stloc.1 - - ldstr "Runtime supports lookups with runtime determined boxing" - call void [mscorlib]System.Console::WriteLine(string) - - leave AfterBoxingCall - } - catch [mscorlib]System.Exception - { - pop - leave AfterFailedBoxingCall - } - -AfterFailedBoxingCall: - ldstr "Runtime does not support lookups with runtime determined boxing" - call void [mscorlib]System.Console::WriteLine(string) - -AfterBoxingCall: - ldloc.1 - ldc.i4 8 - ceq - brtrue Object_OK - - ldc.i4.2 - ret - -Object_OK: - - ldc.i4 100 - ret -} diff --git a/src/coreclr/tests/src/Loader/classloader/DefaultInterfaceMethods/methodimpl/methodimpl.il b/src/coreclr/tests/src/Loader/classloader/DefaultInterfaceMethods/methodimpl/methodimpl.il deleted file mode 100644 index 914f9a4614cb..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/DefaultInterfaceMethods/methodimpl/methodimpl.il +++ /dev/null @@ -1,1680 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 -// Copyright (c) Microsoft Corporation. All rights reserved. - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly methodimpl -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) - - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module methodimpl.exe -// MVID: {F249A85F-3FD2-488F-B084-97B542AD68D6} -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x02FD0000 - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class interface private abstract auto ansi IFoo -{ - .method public hidebysig newslot virtual - instance int32 Foo1(int32 a) cil managed - { - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IIFoo.Foo1" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4.s 1 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IFoo::Foo1 - - .method public hidebysig newslot virtual - instance int32 Foo2(int32 a) cil managed - { - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IFoo.Foo2" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4.s 2 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IFoo::Foo2 - - .method public hidebysig newslot virtual - instance int32 Foo3(int32 a) cil managed - { - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IFoo.Foo3" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4.s 3 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IFoo::Foo3 - - .method public hidebysig newslot virtual - instance int32 Foo4(int32 a) cil managed - { - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IFoo.Foo4" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4.s 4 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IFoo::Foo4 - - .method public hidebysig newslot virtual - instance int32 Foo5(int32 a) cil managed - { - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IFoo.Foo5" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4.s 5 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IFoo::Foo5 - - .method public hidebysig newslot virtual - instance int32 Foo6(int32 a) cil managed - { - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IFoo.Foo6" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4.s 6 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IFoo::Foo6 - - .method public hidebysig newslot virtual - instance int32 Foo7(int32 a) cil managed - { - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IFoo.Foo7" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4.s 7 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IFoo::Foo7 - - .method public hidebysig newslot virtual - instance int32 Foo8(int32 a) cil managed - { - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IFoo.Foo8" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4.s 8 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IFoo::Foo8 - - .method public hidebysig newslot virtual - instance int32 Foo9(int32 a) cil managed - { - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IFoo.Foo9" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4.s 9 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IFoo::Foo9 -} // end of class IFoo - -.class interface private abstract auto ansi IBar - implements IFoo -{ - .method public hidebysig newslot virtual - instance int32 Bar1(int32 a) cil managed - { - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IIBar.Bar1" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4.s 11 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IBar::Bar1 - - .method public hidebysig newslot virtual - instance int32 Bar2(int32 a) cil managed - { - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IBar.Bar2" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4.s 22 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IBar::Bar2 - - .method public hidebysig newslot virtual - instance int32 Bar3(int32 a) cil managed - { - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IBar.Bar3" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4.s 33 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IBar::Bar3 - - .method public hidebysig newslot virtual - instance int32 Bar4(int32 a) cil managed - { - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IBar.Bar4" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4.s 44 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IBar::Bar4 - - .method public hidebysig newslot virtual - instance int32 Bar5(int32 a) cil managed - { - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IBar.Bar5" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4.s 55 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IBar::Bar5 - - .method public hidebysig newslot virtual - instance int32 Bar6(int32 a) cil managed - { - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IBar.Bar6" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4.s 66 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IBar::Bar6 - - .method public hidebysig newslot virtual - instance int32 Bar7(int32 a) cil managed - { - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IBar.Bar7" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4.s 77 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IBar::Bar7 - - .method public hidebysig newslot virtual - instance int32 Bar8(int32 a) cil managed - { - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IBar.Bar8" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4.s 88 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IBar::Bar8 - - .method public hidebysig newslot virtual - instance int32 Bar9(int32 a) cil managed - { - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IBar.Bar9" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4.s 99 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IBar::Bar9 - - ////////////////////////////////////////////////////////////////////////////// - // Overriding IFoo - ////////////////////////////////////////////////////////////////////////////// - - .method private hidebysig newslot virtual final - instance int32 IFoo.Foo1(int32 a) cil managed - { - .override IFoo::Foo1 - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IBar::IFoo.Foo1" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4.s 10 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IBar::IFoo.Foo1 - - .method private hidebysig newslot virtual final - instance int32 IFoo.Foo2(int32 a) cil managed - { - .override IFoo::Foo2 - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IBar::IFoo.Foo2" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4.s 20 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IBar::IFoo.Foo2 - - .method private hidebysig newslot virtual final - instance int32 IFoo.Foo3(int32 a) cil managed - { - .override IFoo::Foo3 - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IBar::IFoo.Foo3" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4.s 30 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IBar::IFoo.Foo3 - - .method private hidebysig newslot virtual final - instance int32 IFoo.Foo4(int32 a) cil managed - { - .override IFoo::Foo4 - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IBar::IFoo.Foo4" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4.s 40 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IBar::IFoo.Foo4 - - .method private hidebysig newslot virtual final - instance int32 IFoo.Foo5(int32 a) cil managed - { - .override IFoo::Foo5 - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IBar::IFoo.Foo5" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4.s 50 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IBar::IFoo.Foo5 -} // end of class IBar - -.class interface private abstract auto ansi IBlah - implements IBar, - IFoo -{ - .method public hidebysig newslot virtual - instance int32 Blah1(int32 c) cil managed - { - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IBlah.Blah1" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4 111 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IBlah::Blah1 - - .method public hidebysig newslot virtual - instance int32 Blah2(int32 c) cil managed - { - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IBlah.Blah2" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4 222 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IBlah::Blah2 - - .method public hidebysig newslot virtual - instance int32 Blah3(int32 c) cil managed - { - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IBlah.Blah3" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4 333 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IBlah::Blah3 - - ////////////////////////////////////////////////////////////////////////////// - // Overriding IFoo - ////////////////////////////////////////////////////////////////////////////// - - .method private hidebysig newslot virtual final - instance int32 IFoo.Foo6(int32 a) cil managed - { - .override IFoo::Foo6 - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IBlah::IFoo.Foo6" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4.s 60 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IBlah::IFoo.Foo6 - - .method private hidebysig newslot virtual final - instance int32 IFoo.Foo7(int32 a) cil managed - { - .override IFoo::Foo7 - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IBlah::IFoo.Foo7" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4.s 70 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IBlah::IFoo.Foo6 - - .method private hidebysig newslot virtual final - instance int32 IFoo.Foo8(int32 a) cil managed - { - .override IFoo::Foo8 - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IBlah::IFoo.Foo8" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4.s 80 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IBlah::IFoo.Foo8 - - .method private hidebysig newslot virtual final - instance int32 IFoo.Foo9(int32 a) cil managed - { - .override IFoo::Foo9 - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IBlah::IFoo.Foo9" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4.s 90 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IBlah::IFoo.Foo9 - - ////////////////////////////////////////////////////////////////////////////// - // Overriding IBar - ////////////////////////////////////////////////////////////////////////////// - - .method private hidebysig newslot virtual final - instance int32 IBar.Bar1(int32 a) cil managed - { - .override IBar::Bar1 - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IBlah::IBar.Bar1" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4.s 110 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IBlah::IBar.Bar1 - - .method private hidebysig newslot virtual final - instance int32 IBar.Bar2(int32 a) cil managed - { - .override IBar::Bar2 - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IBlah::IBar.Bar2" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4 220 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IBlah::IBar.Bar2 - - .method private hidebysig newslot virtual final - instance int32 IBar.Bar3(int32 a) cil managed - { - .override IBar::Bar3 - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IBlah::IBar.Bar3" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4 330 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IBlah::IBar.Bar3 - - .method private hidebysig newslot virtual final - instance int32 IBar.Bar4(int32 a) cil managed - { - .override IBar::Bar4 - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IBlah::IBar.Bar4" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4 440 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IBlah::IBar.Bar4 - - .method private hidebysig newslot virtual final - instance int32 IBar.Bar5(int32 a) cil managed - { - .override IBar::Bar5 - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IBlah::IBar.Bar5" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4 550 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IBlah::IBar.Bar5 -} // end of class IBlah - -.class private auto ansi beforefieldinit IBarImpl - extends [mscorlib]System.Object - implements IBar, - IFoo -{ - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: nop - IL_0007: ret - } // end of method IBarImpl::.ctor - -} // end of class IBarImpl - -.class private auto ansi beforefieldinit IBlahImpl - extends IBarImpl - implements IBlah, - IBar, - IFoo -{ - .method private hidebysig newslot virtual final - instance int32 IBlah.Blah2(int32 c) cil managed - { - .override IBlah::Blah2 - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IBlahImpl::IBlah.Blah2" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4 2220 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IBlahImpl::IBlah.Blah2 - - .method private hidebysig newslot virtual final - instance int32 IBlah.Blah3(int32 c) cil managed - { - .override IBlah::Blah3 - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IBlahImpl::IBlah.Blah2" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4 3330 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IBlahImpl::IBlah.Blah3 - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void IBarImpl::.ctor() - IL_0006: nop - IL_0007: ret - } // end of method IBlahImpl::.ctor - -} // end of class IBlahImpl - -.class interface private abstract auto ansi IFooBarBlah - implements IFoo, - IBar, - IBlah -{ - .method private hidebysig newslot virtual final - instance int32 IFooBarBlah.FooBarBlah1(int32 c) cil managed - { - .override IFoo::Foo1 - .override IBar::Bar1 - .override IBlah::Blah1 - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IFooBarBlah.FooBarBlah1" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4 11111 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IFooBarBlah.FooBarBlah1 - .method private hidebysig newslot virtual final - instance int32 IFooBarBlah.FooBarBlah2(int32 c) cil managed - { - .override IFoo::Foo2 - .override IBar::Bar2 - .override IBlah::Blah2 - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IFooBarBlah.FooBarBlah2" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4 22222 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IFooBarBlah.FooBarBlah1 - - .method private hidebysig newslot virtual final - instance int32 IFooBarBlah.FooBarBlah3(int32 c) cil managed - { - .override IFoo::Foo3 - .override IFoo::Foo4 - .override IFoo::Foo5 - .override IBar::Bar3 - .override IBar::Bar4 - .override IBar::Bar5 - .override IBlah::Blah3 - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IFooBarBlah.FooBarBlah3" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4 33333 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IFooBarBlah.FooBarBlah3 -} // end of class IFooBarBlah - -.class private auto ansi beforefieldinit FooBarBlahImpl - implements IFooBarBlah, - IFoo, - IBar, - IBlah -{ - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void IBlahImpl::.ctor() - IL_0006: nop - IL_0007: ret - } // end of method FooBarBlahImpl::.ctor - -} // end of class FooBarBlahImpl - -.class private auto ansi beforefieldinit Program - extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - // Code size 23 (0x17) - .maxstack 1 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: call void Program::SingleOverride() - IL_0006: nop - IL_0007: call void Program::MultiOverride() - IL_000c: nop - IL_000d: call int32 Test::Ret() - IL_0012: stloc.0 - IL_0013: br.s IL_0015 - - IL_0015: ldloc.0 - IL_0016: ret - } // end of method Program::Main - - .method private hidebysig static void SingleOverride() cil managed - { - // Code size 946 (0x3b2) - .maxstack 2 - .locals init (class IBarImpl V_0, - class IFoo V_1, - class IBar V_2, - class IBlahImpl V_3, - class IBlah V_4) - IL_0000: nop - IL_0001: newobj instance void IBarImpl::.ctor() - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: stloc.1 - IL_0009: ldstr "Calling IFoo.Foo methods on IBarImpl..." - IL_000e: call void [mscorlib]System.Console::WriteLine(string) - IL_0013: nop - IL_0014: ldloc.1 - IL_0015: ldc.i4.1 - IL_0016: callvirt instance int32 IFoo::Foo1(int32) - IL_001b: ldc.i4.s 11 - IL_001d: ceq - IL_001f: ldstr "Calling IFoo.Foo1 on IBarImpl" - IL_0024: call void Test::Assert(bool, - string) - IL_0029: nop - IL_002a: ldloc.1 - IL_002b: ldc.i4.2 - IL_002c: callvirt instance int32 IFoo::Foo2(int32) - IL_0031: ldc.i4.s 22 - IL_0033: ceq - IL_0035: ldstr "Calling IFoo.Foo2 on IBarImpl" - IL_003a: call void Test::Assert(bool, - string) - IL_003f: nop - IL_0040: ldloc.1 - IL_0041: ldc.i4.3 - IL_0042: callvirt instance int32 IFoo::Foo3(int32) - IL_0047: ldc.i4.s 33 - IL_0049: ceq - IL_004b: ldstr "Calling IFoo.Foo3 on IBarImpl" - IL_0050: call void Test::Assert(bool, - string) - IL_0055: nop - IL_0056: ldloc.1 - IL_0057: ldc.i4.4 - IL_0058: callvirt instance int32 IFoo::Foo4(int32) - IL_005d: ldc.i4.s 44 - IL_005f: ceq - IL_0061: ldstr "Calling IFoo.Foo4 on IBarImpl" - IL_0066: call void Test::Assert(bool, - string) - IL_006b: nop - IL_006c: ldloc.1 - IL_006d: ldc.i4.5 - IL_006e: callvirt instance int32 IFoo::Foo5(int32) - IL_0073: ldc.i4.s 55 - IL_0075: ceq - IL_0077: ldstr "Calling IFoo.Foo5 on IBarImpl" - IL_007c: call void Test::Assert(bool, - string) - IL_0081: nop - IL_0082: ldloc.1 - IL_0083: ldc.i4.0 - IL_0084: callvirt instance int32 IFoo::Foo6(int32) - IL_0089: ldc.i4.6 - IL_008a: ceq - IL_008c: ldstr "Calling IFoo.Foo6 on IBarImpl" - IL_0091: call void Test::Assert(bool, - string) - IL_0096: nop - IL_0097: ldloc.1 - IL_0098: ldc.i4.0 - IL_0099: callvirt instance int32 IFoo::Foo7(int32) - IL_009e: ldc.i4.7 - IL_009f: ceq - IL_00a1: ldstr "Calling IFoo.Foo7 on IBarImpl" - IL_00a6: call void Test::Assert(bool, - string) - IL_00ab: nop - IL_00ac: ldloc.1 - IL_00ad: ldc.i4.0 - IL_00ae: callvirt instance int32 IFoo::Foo8(int32) - IL_00b3: ldc.i4.8 - IL_00b4: ceq - IL_00b6: ldstr "Calling IFoo.Foo8 on IBarImpl" - IL_00bb: call void Test::Assert(bool, - string) - IL_00c0: nop - IL_00c1: ldloc.1 - IL_00c2: ldc.i4.0 - IL_00c3: callvirt instance int32 IFoo::Foo9(int32) - IL_00c8: ldc.i4.s 9 - IL_00ca: ceq - IL_00cc: ldstr "Calling IFoo.Foo9 on IBarImpl" - IL_00d1: call void Test::Assert(bool, - string) - IL_00d6: nop - IL_00d7: ldloc.0 - IL_00d8: stloc.2 - IL_00d9: ldstr "Calling IBar.Bar methods on IBarImpl..." - IL_00de: call void [mscorlib]System.Console::WriteLine(string) - IL_00e3: nop - IL_00e4: ldloc.2 - IL_00e5: ldc.i4.0 - IL_00e6: callvirt instance int32 IBar::Bar1(int32) - IL_00eb: ldc.i4.s 11 - IL_00ed: ceq - IL_00ef: ldstr "Calling IBar.Bar1 on IBarImpl" - IL_00f4: call void Test::Assert(bool, - string) - IL_00f9: nop - IL_00fa: ldloc.2 - IL_00fb: ldc.i4.0 - IL_00fc: callvirt instance int32 IBar::Bar2(int32) - IL_0101: ldc.i4.s 22 - IL_0103: ceq - IL_0105: ldstr "Calling IBar.Bar2 on IBarImpl" - IL_010a: call void Test::Assert(bool, - string) - IL_010f: nop - IL_0110: ldloc.2 - IL_0111: ldc.i4.0 - IL_0112: callvirt instance int32 IBar::Bar3(int32) - IL_0117: ldc.i4.s 33 - IL_0119: ceq - IL_011b: ldstr "Calling IBar.Bar3 on IBarImpl" - IL_0120: call void Test::Assert(bool, - string) - IL_0125: nop - IL_0126: ldloc.2 - IL_0127: ldc.i4.0 - IL_0128: callvirt instance int32 IBar::Bar4(int32) - IL_012d: ldc.i4.s 44 - IL_012f: ceq - IL_0131: ldstr "Calling IBar.Bar4 on IBarImpl" - IL_0136: call void Test::Assert(bool, - string) - IL_013b: nop - IL_013c: ldloc.2 - IL_013d: ldc.i4.0 - IL_013e: callvirt instance int32 IBar::Bar5(int32) - IL_0143: ldc.i4.s 55 - IL_0145: ceq - IL_0147: ldstr "Calling IBar.Bar5 on IBarImpl" - IL_014c: call void Test::Assert(bool, - string) - IL_0151: nop - IL_0152: ldloc.2 - IL_0153: ldc.i4.0 - IL_0154: callvirt instance int32 IBar::Bar6(int32) - IL_0159: ldc.i4.s 66 - IL_015b: ceq - IL_015d: ldstr "Calling IBar.Bar6 on IBarImpl" - IL_0162: call void Test::Assert(bool, - string) - IL_0167: nop - IL_0168: ldloc.2 - IL_0169: ldc.i4.0 - IL_016a: callvirt instance int32 IBar::Bar7(int32) - IL_016f: ldc.i4.s 77 - IL_0171: ceq - IL_0173: ldstr "Calling IBar.Bar7 on IBarImpl" - IL_0178: call void Test::Assert(bool, - string) - IL_017d: nop - IL_017e: ldloc.2 - IL_017f: ldc.i4.0 - IL_0180: callvirt instance int32 IBar::Bar8(int32) - IL_0185: ldc.i4.s 88 - IL_0187: ceq - IL_0189: ldstr "Calling IBar.Bar8 on IBarImpl" - IL_018e: call void Test::Assert(bool, - string) - IL_0193: nop - IL_0194: ldloc.2 - IL_0195: ldc.i4.0 - IL_0196: callvirt instance int32 IBar::Bar9(int32) - IL_019b: ldc.i4.s 99 - IL_019d: ceq - IL_019f: ldstr "Calling IBar.Bar9 on IBarImpl" - IL_01a4: call void Test::Assert(bool, - string) - IL_01a9: nop - IL_01aa: newobj instance void IBlahImpl::.ctor() - IL_01af: stloc.3 - IL_01b0: ldloc.3 - IL_01b1: stloc.1 - IL_01b2: ldloc.1 - IL_01b3: ldc.i4.1 - IL_01b4: callvirt instance int32 IFoo::Foo1(int32) - IL_01b9: ldc.i4.s 11 - IL_01bb: ceq - IL_01bd: ldstr "Calling IFoo.Foo1 on IBlahImpl" - IL_01c2: call void Test::Assert(bool, - string) - IL_01c7: nop - IL_01c8: ldloc.1 - IL_01c9: ldc.i4.2 - IL_01ca: callvirt instance int32 IFoo::Foo2(int32) - IL_01cf: ldc.i4.s 22 - IL_01d1: ceq - IL_01d3: ldstr "Calling IFoo.Foo2 on IBlahImpl" - IL_01d8: call void Test::Assert(bool, - string) - IL_01dd: nop - IL_01de: ldloc.1 - IL_01df: ldc.i4.3 - IL_01e0: callvirt instance int32 IFoo::Foo3(int32) - IL_01e5: ldc.i4.s 33 - IL_01e7: ceq - IL_01e9: ldstr "Calling IFoo.Foo3 on IBlahImpl" - IL_01ee: call void Test::Assert(bool, - string) - IL_01f3: nop - IL_01f4: ldloc.1 - IL_01f5: ldc.i4.4 - IL_01f6: callvirt instance int32 IFoo::Foo4(int32) - IL_01fb: ldc.i4.s 44 - IL_01fd: ceq - IL_01ff: ldstr "Calling IFoo.Foo4 on IBlahImpl" - IL_0204: call void Test::Assert(bool, - string) - IL_0209: nop - IL_020a: ldloc.1 - IL_020b: ldc.i4.5 - IL_020c: callvirt instance int32 IFoo::Foo5(int32) - IL_0211: ldc.i4.s 55 - IL_0213: ceq - IL_0215: ldstr "Calling IFoo.Foo5 on IBlahImpl" - IL_021a: call void Test::Assert(bool, - string) - IL_021f: nop - IL_0220: ldloc.1 - IL_0221: ldc.i4.6 - IL_0222: callvirt instance int32 IFoo::Foo6(int32) - IL_0227: ldc.i4.s 66 - IL_0229: ceq - IL_022b: ldstr "Calling IFoo.Foo6 on IBlahImpl" - IL_0230: call void Test::Assert(bool, - string) - IL_0235: nop - IL_0236: ldloc.1 - IL_0237: ldc.i4.7 - IL_0238: callvirt instance int32 IFoo::Foo7(int32) - IL_023d: ldc.i4.s 77 - IL_023f: ceq - IL_0241: ldstr "Calling IFoo.Foo7 on IBlahImpl" - IL_0246: call void Test::Assert(bool, - string) - IL_024b: nop - IL_024c: ldloc.1 - IL_024d: ldc.i4.8 - IL_024e: callvirt instance int32 IFoo::Foo8(int32) - IL_0253: ldc.i4.s 88 - IL_0255: ceq - IL_0257: ldstr "Calling IFoo.Foo8 on IBlahImpl" - IL_025c: call void Test::Assert(bool, - string) - IL_0261: nop - IL_0262: ldloc.1 - IL_0263: ldc.i4.s 9 - IL_0265: callvirt instance int32 IFoo::Foo9(int32) - IL_026a: ldc.i4.s 99 - IL_026c: ceq - IL_026e: ldstr "Calling IFoo.Foo9 on IBlahImpl" - IL_0273: call void Test::Assert(bool, - string) - IL_0278: nop - IL_0279: ldloc.3 - IL_027a: stloc.2 - IL_027b: ldstr "Calling IBar.Bar methods on IBlahImpl..." - IL_0280: call void [mscorlib]System.Console::WriteLine(string) - IL_0285: nop - IL_0286: ldloc.2 - IL_0287: ldc.i4.1 - IL_0288: callvirt instance int32 IBar::Bar1(int32) - IL_028d: ldc.i4.s 111 - IL_028f: ceq - IL_0291: ldstr "Calling IBar.Bar1 on IBlahImpl" - IL_0296: call void Test::Assert(bool, - string) - IL_029b: nop - IL_029c: ldloc.2 - IL_029d: ldc.i4.2 - IL_029e: callvirt instance int32 IBar::Bar2(int32) - IL_02a3: ldc.i4 0xde - IL_02a8: ceq - IL_02aa: ldstr "Calling IBar.Bar2 on IBlahImpl" - IL_02af: call void Test::Assert(bool, - string) - IL_02b4: nop - IL_02b5: ldloc.2 - IL_02b6: ldc.i4.3 - IL_02b7: callvirt instance int32 IBar::Bar3(int32) - IL_02bc: ldc.i4 0x14d - IL_02c1: ceq - IL_02c3: ldstr "Calling IBar.Bar3 on IBlahImpl" - IL_02c8: call void Test::Assert(bool, - string) - IL_02cd: nop - IL_02ce: ldloc.2 - IL_02cf: ldc.i4.4 - IL_02d0: callvirt instance int32 IBar::Bar4(int32) - IL_02d5: ldc.i4 0x1bc - IL_02da: ceq - IL_02dc: ldstr "Calling IBar.Bar4 on IBlahImpl" - IL_02e1: call void Test::Assert(bool, - string) - IL_02e6: nop - IL_02e7: ldloc.2 - IL_02e8: ldc.i4.5 - IL_02e9: callvirt instance int32 IBar::Bar5(int32) - IL_02ee: ldc.i4 0x22b - IL_02f3: ceq - IL_02f5: ldstr "Calling IBar.Bar5 on IBlahImpl" - IL_02fa: call void Test::Assert(bool, - string) - IL_02ff: nop - IL_0300: ldloc.2 - IL_0301: ldc.i4.0 - IL_0302: callvirt instance int32 IBar::Bar6(int32) - IL_0307: ldc.i4.s 66 - IL_0309: ceq - IL_030b: ldstr "Calling IBar.Bar6 on IBlahImpl" - IL_0310: call void Test::Assert(bool, - string) - IL_0315: nop - IL_0316: ldloc.2 - IL_0317: ldc.i4.0 - IL_0318: callvirt instance int32 IBar::Bar7(int32) - IL_031d: ldc.i4.s 77 - IL_031f: ceq - IL_0321: ldstr "Calling IBar.Bar7 on IBlahImpl" - IL_0326: call void Test::Assert(bool, - string) - IL_032b: nop - IL_032c: ldloc.2 - IL_032d: ldc.i4.0 - IL_032e: callvirt instance int32 IBar::Bar8(int32) - IL_0333: ldc.i4.s 88 - IL_0335: ceq - IL_0337: ldstr "Calling IBar.Bar8 on IBlahImpl" - IL_033c: call void Test::Assert(bool, - string) - IL_0341: nop - IL_0342: ldloc.2 - IL_0343: ldc.i4.0 - IL_0344: callvirt instance int32 IBar::Bar9(int32) - IL_0349: ldc.i4.s 99 - IL_034b: ceq - IL_034d: ldstr "Calling IBar.Bar9 on IBlahImpl" - IL_0352: call void Test::Assert(bool, - string) - IL_0357: nop - IL_0358: ldloc.3 - IL_0359: stloc.s V_4 - IL_035b: ldstr "Calling IBlah.Blah methods on IBlahImpl..." - IL_0360: call void [mscorlib]System.Console::WriteLine(string) - IL_0365: nop - IL_0366: ldloc.s V_4 - IL_0368: ldc.i4.0 - IL_0369: callvirt instance int32 IBlah::Blah1(int32) - IL_036e: ldc.i4.s 111 - IL_0370: ceq - IL_0372: ldstr "Calling IBlah.Blah1 on IBlahImpl" - IL_0377: call void Test::Assert(bool, - string) - IL_037c: nop - IL_037d: ldloc.s V_4 - IL_037f: ldc.i4.2 - IL_0380: callvirt instance int32 IBlah::Blah2(int32) - IL_0385: ldc.i4 0x8ae - IL_038a: ceq - IL_038c: ldstr "Calling IBlah.Blah1 on IBlahImpl" - IL_0391: call void Test::Assert(bool, - string) - IL_0396: nop - IL_0397: ldloc.s V_4 - IL_0399: ldc.i4.3 - IL_039a: callvirt instance int32 IBlah::Blah3(int32) - IL_039f: ldc.i4 0xd05 - IL_03a4: ceq - IL_03a6: ldstr "Calling IBlah.Blah1 on IBlahImpl" - IL_03ab: call void Test::Assert(bool, - string) - IL_03b0: nop - IL_03b1: ret - } // end of method Program::SingleOverride - - .method private hidebysig static void MultiOverride() cil managed - { - // Code size 549 (0x225) - .maxstack 2 - .locals init (class FooBarBlahImpl V_0, - class IFoo V_1, - class IBar V_2, - class IBlah V_3) - IL_0000: nop - IL_0001: newobj instance void FooBarBlahImpl::.ctor() - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: stloc.1 - IL_0009: ldstr "Calling IFoo.Foo methods on FooBarBlahImpl..." - IL_000e: call void [mscorlib]System.Console::WriteLine(string) - IL_0013: nop - IL_0014: ldloc.1 - IL_0015: ldc.i4.0 - IL_0016: callvirt instance int32 IFoo::Foo1(int32) - IL_001b: ldc.i4 0x2b67 - IL_0020: ceq - IL_0022: ldstr "Calling IFoo.Foo1 on FooBarBlahImpl" - IL_0027: call void Test::Assert(bool, - string) - IL_002c: nop - IL_002d: ldloc.1 - IL_002e: ldc.i4.0 - IL_002f: callvirt instance int32 IFoo::Foo2(int32) - IL_0034: ldc.i4 0x56ce - IL_0039: ceq - IL_003b: ldstr "Calling IFoo.Foo2 on FooBarBlahImpl" - IL_0040: call void Test::Assert(bool, - string) - IL_0045: nop - IL_0046: ldloc.1 - IL_0047: ldc.i4.0 - IL_0048: callvirt instance int32 IFoo::Foo3(int32) - IL_004d: ldc.i4 0x8235 - IL_0052: ceq - IL_0054: ldstr "Calling IFoo.Foo3 on FooBarBlahImpl" - IL_0059: call void Test::Assert(bool, - string) - IL_005e: nop - IL_005f: ldloc.1 - IL_0060: ldc.i4.0 - IL_0061: callvirt instance int32 IFoo::Foo4(int32) - IL_0066: ldc.i4 0x8235 - IL_006b: ceq - IL_006d: ldstr "Calling IFoo.Foo4 on FooBarBlahImpl" - IL_0072: call void Test::Assert(bool, - string) - IL_0077: nop - IL_0078: ldloc.1 - IL_0079: ldc.i4.0 - IL_007a: callvirt instance int32 IFoo::Foo5(int32) - IL_007f: ldc.i4 0x8235 - IL_0084: ceq - IL_0086: ldstr "Calling IFoo.Foo5 on FooBarBlahImpl" - IL_008b: call void Test::Assert(bool, - string) - IL_0090: nop - IL_0091: ldloc.1 - IL_0092: ldc.i4.6 - IL_0093: callvirt instance int32 IFoo::Foo6(int32) - IL_0098: ldc.i4.s 66 - IL_009a: ceq - IL_009c: ldstr "Calling IFoo.Foo6 on FooBarBlahImpl" - IL_00a1: call void Test::Assert(bool, - string) - IL_00a6: nop - IL_00a7: ldloc.1 - IL_00a8: ldc.i4.7 - IL_00a9: callvirt instance int32 IFoo::Foo7(int32) - IL_00ae: ldc.i4.s 77 - IL_00b0: ceq - IL_00b2: ldstr "Calling IFoo.Foo7 on FooBarBlahImpl" - IL_00b7: call void Test::Assert(bool, - string) - IL_00bc: nop - IL_00bd: ldloc.1 - IL_00be: ldc.i4.8 - IL_00bf: callvirt instance int32 IFoo::Foo8(int32) - IL_00c4: ldc.i4.s 88 - IL_00c6: ceq - IL_00c8: ldstr "Calling IFoo.Foo8 on FooBarBlahImpl" - IL_00cd: call void Test::Assert(bool, - string) - IL_00d2: nop - IL_00d3: ldloc.1 - IL_00d4: ldc.i4.s 9 - IL_00d6: callvirt instance int32 IFoo::Foo9(int32) - IL_00db: ldc.i4.s 99 - IL_00dd: ceq - IL_00df: ldstr "Calling IFoo.Foo9 on FooBarBlahImpl" - IL_00e4: call void Test::Assert(bool, - string) - IL_00e9: nop - IL_00ea: ldloc.0 - IL_00eb: stloc.2 - IL_00ec: ldstr "Calling IBar.Bar methods on FooBarBlahImpl..." - IL_00f1: call void [mscorlib]System.Console::WriteLine(string) - IL_00f6: nop - IL_00f7: ldloc.2 - IL_00f8: ldc.i4.0 - IL_00f9: callvirt instance int32 IBar::Bar1(int32) - IL_00fe: ldc.i4 0x2b67 - IL_0103: ceq - IL_0105: ldstr "Calling IBar.Bar1 on FooBarBlahImpl" - IL_010a: call void Test::Assert(bool, - string) - IL_010f: nop - IL_0110: ldloc.2 - IL_0111: ldc.i4.0 - IL_0112: callvirt instance int32 IBar::Bar2(int32) - IL_0117: ldc.i4 0x56ce - IL_011c: ceq - IL_011e: ldstr "Calling IBar.Bar2 on FooBarBlahImpl" - IL_0123: call void Test::Assert(bool, - string) - IL_0128: nop - IL_0129: ldloc.2 - IL_012a: ldc.i4.0 - IL_012b: callvirt instance int32 IBar::Bar3(int32) - IL_0130: ldc.i4 0x8235 - IL_0135: ceq - IL_0137: ldstr "Calling IBar.Bar3 on FooBarBlahImpl" - IL_013c: call void Test::Assert(bool, - string) - IL_0141: nop - IL_0142: ldloc.2 - IL_0143: ldc.i4.0 - IL_0144: callvirt instance int32 IBar::Bar4(int32) - IL_0149: ldc.i4 0x8235 - IL_014e: ceq - IL_0150: ldstr "Calling IBar.Bar4 on FooBarBlahImpl" - IL_0155: call void Test::Assert(bool, - string) - IL_015a: nop - IL_015b: ldloc.2 - IL_015c: ldc.i4.0 - IL_015d: callvirt instance int32 IBar::Bar5(int32) - IL_0162: ldc.i4 0x8235 - IL_0167: ceq - IL_0169: ldstr "Calling IBar.Bar5 on FooBarBlahImpl" - IL_016e: call void Test::Assert(bool, - string) - IL_0173: nop - IL_0174: ldloc.2 - IL_0175: ldc.i4.0 - IL_0176: callvirt instance int32 IBar::Bar6(int32) - IL_017b: ldc.i4.s 66 - IL_017d: ceq - IL_017f: ldstr "Calling IBar.Bar6 on FooBarBlahImpl" - IL_0184: call void Test::Assert(bool, - string) - IL_0189: nop - IL_018a: ldloc.2 - IL_018b: ldc.i4.0 - IL_018c: callvirt instance int32 IBar::Bar7(int32) - IL_0191: ldc.i4.s 77 - IL_0193: ceq - IL_0195: ldstr "Calling IBar.Bar7 on FooBarBlahImpl" - IL_019a: call void Test::Assert(bool, - string) - IL_019f: nop - IL_01a0: ldloc.2 - IL_01a1: ldc.i4.0 - IL_01a2: callvirt instance int32 IBar::Bar8(int32) - IL_01a7: ldc.i4.s 88 - IL_01a9: ceq - IL_01ab: ldstr "Calling IBar.Bar8 on FooBarBlahImpl" - IL_01b0: call void Test::Assert(bool, - string) - IL_01b5: nop - IL_01b6: ldloc.2 - IL_01b7: ldc.i4.0 - IL_01b8: callvirt instance int32 IBar::Bar9(int32) - IL_01bd: ldc.i4.s 99 - IL_01bf: ceq - IL_01c1: ldstr "Calling IBar.Bar9 on FooBarBlahImpl" - IL_01c6: call void Test::Assert(bool, - string) - IL_01cb: nop - IL_01cc: ldloc.0 - IL_01cd: stloc.3 - IL_01ce: ldstr "Calling IBlah.Blah methods on FooBarBlahImpl..." - IL_01d3: call void [mscorlib]System.Console::WriteLine(string) - IL_01d8: nop - IL_01d9: ldloc.3 - IL_01da: ldc.i4.0 - IL_01db: callvirt instance int32 IBlah::Blah1(int32) - IL_01e0: ldc.i4 0x2b67 - IL_01e5: ceq - IL_01e7: ldstr "Calling IBlah.Blah1 on FooBarBlahImpl" - IL_01ec: call void Test::Assert(bool, - string) - IL_01f1: nop - IL_01f2: ldloc.3 - IL_01f3: ldc.i4.0 - IL_01f4: callvirt instance int32 IBlah::Blah2(int32) - IL_01f9: ldc.i4 0x56ce - IL_01fe: ceq - IL_0200: ldstr "Calling IBlah.Blah1 on FooBarBlahImpl" - IL_0205: call void Test::Assert(bool, - string) - IL_020a: nop - IL_020b: ldloc.3 - IL_020c: ldc.i4.0 - IL_020d: callvirt instance int32 IBlah::Blah3(int32) - IL_0212: ldc.i4 0x8235 - IL_0217: ceq - IL_0219: ldstr "Calling IBlah.Blah1 on FooBarBlahImpl" - IL_021e: call void Test::Assert(bool, - string) - IL_0223: nop - IL_0224: ret - } // end of method Program::MultiOverride - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: nop - IL_0007: ret - } // end of method Program::.ctor - -} // end of class Program - -.class private auto ansi beforefieldinit Test - extends [mscorlib]System.Object -{ - .field private static bool Pass - .method public hidebysig static int32 Ret() cil managed - { - // Code size 19 (0x13) - .maxstack 1 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldsfld bool Test::Pass - IL_0006: brtrue.s IL_000c - - IL_0008: ldc.i4.s 101 - IL_000a: br.s IL_000e - - IL_000c: ldc.i4.s 100 - IL_000e: stloc.0 - IL_000f: br.s IL_0011 - - IL_0011: ldloc.0 - IL_0012: ret - } // end of method Test::Ret - - .method public hidebysig static void Assert(bool cond, - string msg) cil managed - { - // Code size 47 (0x2f) - .maxstack 2 - .locals init (bool V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: stloc.0 - IL_0003: ldloc.0 - IL_0004: brfalse.s IL_0015 - - IL_0006: nop - IL_0007: ldstr "PASS" - IL_000c: call void [mscorlib]System.Console::WriteLine(string) - IL_0011: nop - IL_0012: nop - IL_0013: br.s IL_002e - - IL_0015: nop - IL_0016: ldstr "FAIL: " - IL_001b: ldarg.1 - IL_001c: call string [mscorlib]System.String::Concat(string, - string) - IL_0021: call void [mscorlib]System.Console::WriteLine(string) - IL_0026: nop - IL_0027: ldc.i4.0 - IL_0028: stsfld bool Test::Pass - IL_002d: nop - IL_002e: ret - } // end of method Test::Assert - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: nop - IL_0007: ret - } // end of method Test::.ctor - - .method private hidebysig specialname rtspecialname static - void .cctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldc.i4.1 - IL_0001: stsfld bool Test::Pass - IL_0006: ret - } // end of method Test::.cctor - -} // end of class Test - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file methodimpl.res diff --git a/src/coreclr/tests/src/Loader/classloader/DefaultInterfaceMethods/simple/simple.cs b/src/coreclr/tests/src/Loader/classloader/DefaultInterfaceMethods/simple/simple.cs deleted file mode 100644 index 3a31bd5e28e2..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/DefaultInterfaceMethods/simple/simple.cs +++ /dev/null @@ -1,127 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -interface IBlah -{ - int Blah(int c); -} - -// All methods go into IBlah -class IBlah_Impl -{ - public int Blah(int c) - { - Console.WriteLine("At IBlah.Blah"); - return c + Blah_Private_GetA() + Blah_Internal_GetB() + Blah_Protected_GetC(); - } - - private int Blah_Private_GetA() - { - Console.WriteLine("At IBlah.Blah_Private_GetA"); - return 1; - } - - internal int Blah_Internal_GetB() - { - Console.WriteLine("At IBlah.Blah_Internal_GetB"); - return 2; - } - - protected int Blah_Protected_GetC() - { - Console.WriteLine("At IBlah.Blah_Protected_GetC"); - return 3; - } -} - -interface IFoo -{ - int Foo(int a); -} - -interface IBar -{ - int Bar(int b); -} - -class Base : IBlah -{ - public int Blah(int c) - { - // Dummy - return 0; - } -} - -class FooBar : Base, IFoo, IBar -{ - public int Foo(int a) - { - Console.WriteLine("At IFoo.Foo"); - return a+1; - } - - public int Bar(int b) - { - Console.WriteLine("At IBar.Bar"); - return b+10; - } - - public int CallBlahProtected() - { - // change to IBlah.Blah_Protected_GetC(); - return CallBlahProtected(); - } -} - -class Program -{ - public static int Main() - { - FooBar fooBar = new FooBar(); - IFoo foo = (IFoo) fooBar; - IBar bar = (IBar) fooBar; - IBlah blah = (IBlah) fooBar; - - Console.WriteLine("Calling IFoo.Foo on FooBar - expecting default method on IFoo.Foo. "); - Test.Assert(foo.Foo(10) == 11, "Calling IFoo.Foo on FooBar"); - - Console.WriteLine("Calling IBar.Bar on FooBar - expecting default method on IBar.Bar. "); - Test.Assert(bar.Bar(10) == 20, "Calling IBar.Bar on FooBar"); - - Console.WriteLine("Calling IBlah.Blah on FooBar - expecting default method on IBlah.Blah from Base. "); - Test.Assert(blah.Blah(10) == 16, "Calling IBlah.Blah on FooBar"); - - Console.WriteLine("Calling FooBar.CallBlahProtected - expecting protected methods on interface can be called"); - Test.Assert(fooBar.CallBlahProtected() == 3, "Calling FooBar.CallBlahProtected"); - - return Test.Ret(); - } -} - -class Test -{ - private static bool Pass = true; - - public static int Ret() - { - return Pass? 100 : 101; - } - - public static void Assert(bool cond, string msg) - { - if (cond) - { - Console.WriteLine("PASS"); - } - else - { - Console.WriteLine("FAIL: " + msg); - Pass = false; - } - } -} - diff --git a/src/coreclr/tests/src/Loader/classloader/DefaultInterfaceMethods/simple/simple.il b/src/coreclr/tests/src/Loader/classloader/DefaultInterfaceMethods/simple/simple.il deleted file mode 100644 index 629ee4f71e52..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/DefaultInterfaceMethods/simple/simple.il +++ /dev/null @@ -1,400 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 -// Copyright (c) Microsoft Corporation. All rights reserved. - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly simple -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) - - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module simple.exe -// MVID: {0B8FCFD0-673A-4DEB-90CC-B96749DE09C8} -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x01A80000 - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class interface private abstract auto ansi IBlah -{ - .method public hidebysig newslot virtual - instance int32 Blah(int32 c) cil managed - { - // Code size 39 (0x27) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IBlah.Blah" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldarg.0 - IL_000e: call instance int32 IBlah::Blah_Private_GetA() - IL_0013: add - IL_0014: ldarg.0 - IL_0015: call instance int32 IBlah::Blah_Internal_GetB() - IL_001a: add - IL_001b: ldarg.0 - IL_001c: call instance int32 IBlah::Blah_Protected_GetC() - IL_0021: add - IL_0022: stloc.0 - IL_0023: br.s IL_0025 - - IL_0025: ldloc.0 - IL_0026: ret - } // end of method IBlah::Blah - - .method private hidebysig instance int32 - Blah_Private_GetA() cil managed - { - // Code size 18 (0x12) - .maxstack 1 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IBlah.Blah_Private_GetA" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldc.i4.1 - IL_000d: stloc.0 - IL_000e: br.s IL_0010 - - IL_0010: ldloc.0 - IL_0011: ret - } // end of method IBlah_Impl::Blah_Private_GetA - - .method assembly hidebysig instance int32 - Blah_Internal_GetB() cil managed - { - // Code size 18 (0x12) - .maxstack 1 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IBlah.Blah_Internal_GetB" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldc.i4.2 - IL_000d: stloc.0 - IL_000e: br.s IL_0010 - - IL_0010: ldloc.0 - IL_0011: ret - } // end of method IBlah_Impl::Blah_Internal_GetB - - .method family hidebysig instance int32 - Blah_Protected_GetC() cil managed - { - // Code size 18 (0x12) - .maxstack 1 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IBlah.Blah_Protected_GetC" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldc.i4.3 - IL_000d: stloc.0 - IL_000e: br.s IL_0010 - - IL_0010: ldloc.0 - IL_0011: ret - } // end of method IBlah_Impl::Blah_Protected_GetC -} // end of class IBlah - -.class interface private abstract auto ansi IFoo -{ - .method public hidebysig newslot virtual - instance int32 Foo(int32 a) cil managed - { - // Code size 20 (0x14) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IFoo.Foo" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4.1 - IL_000e: add - IL_000f: stloc.0 - IL_0010: br.s IL_0012 - - IL_0012: ldloc.0 - IL_0013: ret - } // end of method IFoo::Foo - -} // end of class IFoo - -.class interface private abstract auto ansi IBar -{ - .method public hidebysig newslot virtual - instance int32 Bar(int32 b) cil managed - { - // Code size 21 (0x15) - .maxstack 2 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldstr "At IBar.Bar" - IL_0006: call void [mscorlib]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldarg.1 - IL_000d: ldc.i4.s 10 - IL_000f: add - IL_0010: stloc.0 - IL_0011: br.s IL_0013 - - IL_0013: ldloc.0 - IL_0014: ret - } // end of method IBar::Bar - -} // end of class IBar - -.class private auto ansi beforefieldinit Base - extends [mscorlib]System.Object - implements IBlah -{ - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: nop - IL_0007: ret - } // end of method Base::.ctor - -} // end of class Base - -.class private auto ansi beforefieldinit FooBar - extends Base - implements IFoo, - IBar -{ - .method public hidebysig instance int32 - CallBlahProtected() cil managed - { - // Code size 12 (0xc) - .maxstack 1 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: call instance int32 IBlah::Blah_Protected_GetC() - IL_0007: stloc.0 - IL_0008: br.s IL_000a - - IL_000a: ldloc.0 - IL_000b: ret - } // end of method FooBar::CallBlahProtected - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void Base::.ctor() - IL_0006: nop - IL_0007: ret - } // end of method FooBar::.ctor - -} // end of class FooBar - -.class private auto ansi beforefieldinit Program - extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - // Code size 158 (0x9e) - .maxstack 2 - .locals init (class FooBar V_0, - class IFoo V_1, - class IBar V_2, - class IBlah V_3, - int32 V_4) - IL_0000: nop - IL_0001: newobj instance void FooBar::.ctor() - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: stloc.1 - IL_0009: ldloc.0 - IL_000a: stloc.2 - IL_000b: ldloc.0 - IL_000c: stloc.3 - IL_000d: ldstr "Calling IFoo.Foo on FooBar - expecting default met" - + "hod on IFoo.Foo. " - IL_0012: call void [mscorlib]System.Console::WriteLine(string) - IL_0017: nop - IL_0018: ldloc.1 - IL_0019: ldc.i4.s 10 - IL_001b: callvirt instance int32 IFoo::Foo(int32) - IL_0020: ldc.i4.s 11 - IL_0022: ceq - IL_0024: ldstr "Calling IFoo.Foo on FooBar" - IL_0029: call void Test::Assert(bool, - string) - IL_002e: nop - IL_002f: ldstr "Calling IBar.Bar on FooBar - expecting default met" - + "hod on IBar.Bar. " - IL_0034: call void [mscorlib]System.Console::WriteLine(string) - IL_0039: nop - IL_003a: ldloc.2 - IL_003b: ldc.i4.s 10 - IL_003d: callvirt instance int32 IBar::Bar(int32) - IL_0042: ldc.i4.s 20 - IL_0044: ceq - IL_0046: ldstr "Calling IBar.Bar on FooBar" - IL_004b: call void Test::Assert(bool, - string) - IL_0050: nop - IL_0051: ldstr "Calling IBlah.Blah on FooBar - expecting default m" - + "ethod on IBlah.Blah from Base. " - IL_0056: call void [mscorlib]System.Console::WriteLine(string) - IL_005b: nop - IL_005c: ldloc.3 - IL_005d: ldc.i4.s 10 - IL_005f: callvirt instance int32 IBlah::Blah(int32) - IL_0064: ldc.i4.s 16 - IL_0066: ceq - IL_0068: ldstr "Calling IBlah.Blah on FooBar" - IL_006d: call void Test::Assert(bool, - string) - IL_0072: nop - IL_0073: ldstr "Calling FooBar.CallBlahProtected - expecting prote" - + "cted methods on interface can be called" - IL_0078: call void [mscorlib]System.Console::WriteLine(string) - IL_007d: nop - IL_007e: ldloc.0 - IL_007f: callvirt instance int32 FooBar::CallBlahProtected() - IL_0084: ldc.i4.3 - IL_0085: ceq - IL_0087: ldstr "Calling FooBar.CallBlahProtected" - IL_008c: call void Test::Assert(bool, - string) - IL_0091: nop - IL_0092: call int32 Test::Ret() - IL_0097: stloc.s V_4 - IL_0099: br.s IL_009b - - IL_009b: ldloc.s V_4 - IL_009d: ret - } // end of method Program::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: nop - IL_0007: ret - } // end of method Program::.ctor - -} // end of class Program - -.class private auto ansi beforefieldinit Test - extends [mscorlib]System.Object -{ - .field private static bool Pass - .method public hidebysig static int32 Ret() cil managed - { - // Code size 19 (0x13) - .maxstack 1 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldsfld bool Test::Pass - IL_0006: brtrue.s IL_000c - - IL_0008: ldc.i4.s 101 - IL_000a: br.s IL_000e - - IL_000c: ldc.i4.s 100 - IL_000e: stloc.0 - IL_000f: br.s IL_0011 - - IL_0011: ldloc.0 - IL_0012: ret - } // end of method Test::Ret - - .method public hidebysig static void Assert(bool cond, - string msg) cil managed - { - // Code size 47 (0x2f) - .maxstack 2 - .locals init (bool V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: stloc.0 - IL_0003: ldloc.0 - IL_0004: brfalse.s IL_0015 - - IL_0006: nop - IL_0007: ldstr "PASS" - IL_000c: call void [mscorlib]System.Console::WriteLine(string) - IL_0011: nop - IL_0012: nop - IL_0013: br.s IL_002e - - IL_0015: nop - IL_0016: ldstr "FAIL: " - IL_001b: ldarg.1 - IL_001c: call string [mscorlib]System.String::Concat(string, - string) - IL_0021: call void [mscorlib]System.Console::WriteLine(string) - IL_0026: nop - IL_0027: ldc.i4.0 - IL_0028: stsfld bool Test::Pass - IL_002d: nop - IL_002e: ret - } // end of method Test::Assert - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: nop - IL_0007: ret - } // end of method Test::.ctor - - .method private hidebysig specialname rtspecialname static - void .cctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldc.i4.1 - IL_0001: stsfld bool Test::Pass - IL_0006: ret - } // end of method Test::.cctor - -} // end of class Test - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file simple.res diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I/TestCase0.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I/TestCase0.il deleted file mode 100644 index f8721456a21c..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I/TestCase0.il +++ /dev/null @@ -1,117 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.assembly TestCase0 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class interface private abstract auto ansi J -{ - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} -} - -.class private auto ansi beforefieldinit A`1 - implements class A`1/I`1 -{ - .class interface nested family abstract auto ansi I`1 - { .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} } - - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "A::Foo" - ret - } - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "A::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "A::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit B`2 - extends class A`1 - implements class A`1/I`1, J -{ - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "B::Foo" - ret - } - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "B::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "B::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "B::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "B::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "B::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I/TestCase1.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I/TestCase1.il deleted file mode 100644 index 05c6c998a51c..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I/TestCase1.il +++ /dev/null @@ -1,100 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.assembly TestCase1 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class interface private abstract auto ansi J -{ - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} -} - -.class private auto ansi beforefieldinit A`1 - implements class A`1/I`1 -{ - .class interface nested family abstract auto ansi I`1 - { .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} } - - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "A::Foo" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit B`2 - extends class A`1 - implements class A`1/I`1, J -{ - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "B::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "B::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "A::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "B::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "B::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I/TestCase2.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I/TestCase2.il deleted file mode 100644 index 6cf4e13278af..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I/TestCase2.il +++ /dev/null @@ -1,100 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.assembly TestCase2 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class interface private abstract auto ansi J -{ - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} -} - -.class private abstract auto ansi beforefieldinit A`1 - implements class A`1/I`1 -{ - .class interface nested family abstract auto ansi I`1 - { .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} } - - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "A::Foo" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private abstract auto ansi beforefieldinit B`2 - extends class A`1 - implements class A`1/I`1, J -{ - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "B::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "B::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "A::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "B::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "B::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I/TestCase3.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I/TestCase3.il deleted file mode 100644 index d41d8cb2934b..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I/TestCase3.il +++ /dev/null @@ -1,100 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.assembly TestCase3 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class interface private abstract auto ansi J -{ - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} -} - -.class private abstract auto ansi beforefieldinit A`1 - implements class A`1/I`1 -{ - .class interface nested family abstract auto ansi I`1 - { .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} } - - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit B`2 - extends class A`1 - implements class A`1/I`1, J -{ - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "B::Foo" - ret - } - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "B::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "B::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "B::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "B::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "B::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I/TestCase4.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I/TestCase4.il deleted file mode 100644 index bbd564bc6226..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I/TestCase4.il +++ /dev/null @@ -1,100 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.assembly TestCase4 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class interface private abstract auto ansi J -{ - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} -} - -.class private abstract auto ansi beforefieldinit A`1 - implements class A`1/I`1 -{ - .class interface nested family abstract auto ansi I`1 - { .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} } - - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private abstract auto ansi beforefieldinit B`2 - extends class A`1 - implements class A`1/I`1, J -{ - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "B::Foo" - ret - } - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "B::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "B::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "B::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "B::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "B::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I/TestCase5.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I/TestCase5.il deleted file mode 100644 index 1cb5217e419e..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I/TestCase5.il +++ /dev/null @@ -1,100 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.assembly TestCase5 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class interface private abstract auto ansi J -{ - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} -} - -.class private auto ansi beforefieldinit A`1 - implements class A`1/I`1 -{ - .class interface nested family abstract auto ansi I`1 - { .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} } - - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "A::Foo" - ret - } - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "A::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "A::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit B`2 - extends class A`1 - implements class A`1/I`1, J -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "A::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "A::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "A::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I/TestCase6.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I/TestCase6.il deleted file mode 100644 index 7c08f9c34589..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I/TestCase6.il +++ /dev/null @@ -1,100 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.assembly TestCase6 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class interface private abstract auto ansi J -{ - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} -} - -.class private abstract auto ansi beforefieldinit A`1 - implements class A`1/I`1 -{ - .class interface nested family abstract auto ansi I`1 - { .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} } - - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "A::Foo" - ret - } - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "A::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "A::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private abstract auto ansi beforefieldinit B`2 - extends class A`1 - implements class A`1/I`1, J -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "A::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "A::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "A::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I_Nested_J/TestCase0.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I_Nested_J/TestCase0.il deleted file mode 100644 index 490c82972755..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I_Nested_J/TestCase0.il +++ /dev/null @@ -1,117 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.assembly TestCase0 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class private auto ansi beforefieldinit A`1 - implements class A`1/I`1 -{ - .class interface nested family abstract auto ansi I`1 - { - .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} - .class interface nested public abstract auto ansi J - { - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} - } - } - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "A::Foo" - ret - } - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "A::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "A::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit B`2 - extends class A`1 - implements class A`1/I`1, A`1/I`1/J -{ - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "B::Foo" - ret - } - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "B::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "B::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "B::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "B::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "B::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I_Nested_J/TestCase1.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I_Nested_J/TestCase1.il deleted file mode 100644 index 5501eb4f4c58..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I_Nested_J/TestCase1.il +++ /dev/null @@ -1,100 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.assembly TestCase1 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class private auto ansi beforefieldinit A`1 - implements class A`1/I`1 -{ - .class interface nested family abstract auto ansi I`1 - { - .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} - .class interface nested public abstract auto ansi J - { - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} - } - } - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "A::Foo" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit B`2 - extends class A`1 - implements class A`1/I`1, A`1/I`1/J -{ - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "B::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "B::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "A::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "B::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "B::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I_Nested_J/TestCase2.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I_Nested_J/TestCase2.il deleted file mode 100644 index 900afd1fe864..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I_Nested_J/TestCase2.il +++ /dev/null @@ -1,100 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.assembly TestCase2 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class private abstract auto ansi beforefieldinit A`1 - implements class A`1/I`1 -{ - .class interface nested family abstract auto ansi I`1 - { - .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} - .class interface nested public abstract auto ansi J - { - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} - } - } - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "A::Foo" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private abstract auto ansi beforefieldinit B`2 - extends class A`1 - implements class A`1/I`1, A`1/I`1/J -{ - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "B::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "B::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "A::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "B::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "B::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I_Nested_J/TestCase3.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I_Nested_J/TestCase3.il deleted file mode 100644 index d8a6ded6f731..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I_Nested_J/TestCase3.il +++ /dev/null @@ -1,100 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.assembly TestCase3 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class private abstract auto ansi beforefieldinit A`1 - implements class A`1/I`1 -{ - .class interface nested family abstract auto ansi I`1 - { - .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} - .class interface nested public abstract auto ansi J - { - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} - } - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit B`2 - extends class A`1 - implements class A`1/I`1, A`1/I`1/J -{ - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "B::Foo" - ret - } - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "B::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "B::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "B::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "B::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "B::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I_Nested_J/TestCase4.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I_Nested_J/TestCase4.il deleted file mode 100644 index 14fe4646d468..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I_Nested_J/TestCase4.il +++ /dev/null @@ -1,100 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.assembly TestCase4 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class private abstract auto ansi beforefieldinit A`1 - implements class A`1/I`1 -{ - .class interface nested family abstract auto ansi I`1 - { - .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} - .class interface nested public abstract auto ansi J - { - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} - } - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private abstract auto ansi beforefieldinit B`2 - extends class A`1 - implements class A`1/I`1, A`1/I`1/J -{ - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "B::Foo" - ret - } - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "B::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "B::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "B::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "B::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "B::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I_Nested_J/TestCase5.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I_Nested_J/TestCase5.il deleted file mode 100644 index 03ff440d1b36..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I_Nested_J/TestCase5.il +++ /dev/null @@ -1,101 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.assembly TestCase5 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class private auto ansi beforefieldinit A`1 - implements class A`1/I`1 -{ - .class interface nested family abstract auto ansi I`1 - { - .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} - .class interface nested public abstract auto ansi J - { - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} - } - } - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "A::Foo" - ret - } - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "A::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "A::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit B`2 - extends class A`1 - implements class A`1/I`1, A`1/I`1/J -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "A::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "A::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "A::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I_Nested_J/TestCase6.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I_Nested_J/TestCase6.il deleted file mode 100644 index bdc70e8d4292..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_I_Nested_J/TestCase6.il +++ /dev/null @@ -1,100 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.assembly TestCase6 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class private abstract auto ansi beforefieldinit A`1 - implements class A`1/I`1 -{ - .class interface nested family abstract auto ansi I`1 - { - .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} - .class interface nested public abstract auto ansi J - { - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} - } - } - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "A::Foo" - ret - } - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "A::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "A::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private abstract auto ansi beforefieldinit B`2 - extends class A`1 - implements class A`1/I`1, A`1/I`1/J -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "A::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "A::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "A::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J/TestCase0.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J/TestCase0.il deleted file mode 100644 index d4aecd808adb..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J/TestCase0.il +++ /dev/null @@ -1,117 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.assembly TestCase0 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class interface private abstract auto ansi I`1 -{ .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} } - - -.class private auto ansi beforefieldinit A`1 - implements class I`1 -{ - .class interface nested family abstract auto ansi J - { - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} - } - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "A::Foo" - ret - } - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "A::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "A::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit B`2 - extends class A`1 - implements class I`1, A`1/J -{ - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "B::Foo" - ret - } - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "B::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "B::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "B::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "B::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "B::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J/TestCase1.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J/TestCase1.il deleted file mode 100644 index f24aba9bf182..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J/TestCase1.il +++ /dev/null @@ -1,99 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.assembly TestCase1 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class interface private abstract auto ansi I`1 -{ .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} } - -.class private auto ansi beforefieldinit A`1 - implements class I`1 -{ - .class interface nested family abstract auto ansi J - { - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} - } - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "A::Foo" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit B`2 - extends class A`1 - implements class I`1, A`1/J -{ - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "B::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "B::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "A::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "B::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "B::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J/TestCase2.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J/TestCase2.il deleted file mode 100644 index eda666b305c7..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J/TestCase2.il +++ /dev/null @@ -1,99 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.assembly TestCase2 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class interface private abstract auto ansi I`1 -{ .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} } - -.class private abstract auto ansi beforefieldinit A`1 - implements class I`1 -{ - .class interface nested family abstract auto ansi J - { - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} - } - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "A::Foo" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private abstract auto ansi beforefieldinit B`2 - extends class A`1 - implements class I`1, A`1/J -{ - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "B::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "B::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "A::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "B::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "B::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J/TestCase3.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J/TestCase3.il deleted file mode 100644 index e15e0abb086c..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J/TestCase3.il +++ /dev/null @@ -1,99 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.assembly TestCase3 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class interface private abstract auto ansi I`1 -{ .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} } - -.class private abstract auto ansi beforefieldinit A`1 - implements class I`1 -{ - .class interface nested family abstract auto ansi J - { - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit B`2 - extends class A`1 - implements class I`1, A`1/J -{ - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "B::Foo" - ret - } - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "B::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "B::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "B::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "B::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "B::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J/TestCase4.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J/TestCase4.il deleted file mode 100644 index 91ed35840ab4..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J/TestCase4.il +++ /dev/null @@ -1,99 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.assembly TestCase4 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class interface private abstract auto ansi I`1 -{ .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} } - -.class private abstract auto ansi beforefieldinit A`1 - implements class I`1 -{ - .class interface nested family abstract auto ansi J - { - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private abstract auto ansi beforefieldinit B`2 - extends class A`1 - implements class I`1, A`1/J -{ - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "B::Foo" - ret - } - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "B::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "B::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "B::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "B::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "B::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J/TestCase5.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J/TestCase5.il deleted file mode 100644 index 1ceb777800e1..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J/TestCase5.il +++ /dev/null @@ -1,99 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.assembly TestCase5 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class interface private abstract auto ansi I`1 -{ .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} } - -.class private auto ansi beforefieldinit A`1 - implements class I`1 -{ - .class interface nested family abstract auto ansi J - { - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} - } - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "A::Foo" - ret - } - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "A::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "A::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit B`2 - extends class A`1 - implements class I`1, A`1/J -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "A::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "A::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "A::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J/TestCase6.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J/TestCase6.il deleted file mode 100644 index 52d4631c636b..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J/TestCase6.il +++ /dev/null @@ -1,99 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.assembly TestCase6 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class interface private abstract auto ansi I`1 -{ .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} } - -.class private abstract auto ansi beforefieldinit A`1 - implements class I`1 -{ - .class interface nested family abstract auto ansi J - { - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} - } - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "A::Foo" - ret - } - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "A::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "A::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private abstract auto ansi beforefieldinit B`2 - extends class A`1 - implements class I`1, A`1/J -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "A::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "A::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "A::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J_Nested_I/TestCase0.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J_Nested_I/TestCase0.il deleted file mode 100644 index 5fab5b8d0adc..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J_Nested_I/TestCase0.il +++ /dev/null @@ -1,115 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.assembly TestCase0 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class private auto ansi beforefieldinit A`1 - implements class A`1/J/I`1 -{ - .class interface nested family abstract auto ansi J - { - .class interface nested public abstract auto ansi I`1 - { .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} } - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} - } - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "A::Foo" - ret - } - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "A::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "A::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit B`2 - extends class A`1 - implements class A`1/J/I`1, A`1/J -{ - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "B::Foo" - ret - } - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "B::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "B::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "B::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "B::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "B::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J_Nested_I/TestCase1.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J_Nested_I/TestCase1.il deleted file mode 100644 index d2a73e30209a..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J_Nested_I/TestCase1.il +++ /dev/null @@ -1,98 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.assembly TestCase1 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class private auto ansi beforefieldinit A`1 - implements class A`1/J/I`1 -{ - .class interface nested family abstract auto ansi J - { - .class interface nested public abstract auto ansi I`1 - { .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} } - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} - } - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "A::Foo" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit B`2 - extends class A`1 - implements class A`1/J/I`1, A`1/J -{ - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "B::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "B::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "A::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "B::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "B::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J_Nested_I/TestCase2.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J_Nested_I/TestCase2.il deleted file mode 100644 index 6874dca76c82..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J_Nested_I/TestCase2.il +++ /dev/null @@ -1,98 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.assembly TestCase2 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class private abstract auto ansi beforefieldinit A`1 - implements class A`1/J/I`1 -{ - .class interface nested family abstract auto ansi J - { - .class interface nested public abstract auto ansi I`1 - { .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} } - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} - } - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "A::Foo" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private abstract auto ansi beforefieldinit B`2 - extends class A`1 - implements class A`1/J/I`1, A`1/J -{ - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "B::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "B::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "A::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "B::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "B::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J_Nested_I/TestCase3.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J_Nested_I/TestCase3.il deleted file mode 100644 index 03516e449448..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J_Nested_I/TestCase3.il +++ /dev/null @@ -1,98 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.assembly TestCase3 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class private abstract auto ansi beforefieldinit A`1 - implements class A`1/J/I`1 -{ - .class interface nested family abstract auto ansi J - { - .class interface nested public abstract auto ansi I`1 - { .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} } - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit B`2 - extends class A`1 - implements class A`1/J/I`1, A`1/J -{ - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "B::Foo" - ret - } - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "B::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "B::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "B::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "B::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "B::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J_Nested_I/TestCase4.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J_Nested_I/TestCase4.il deleted file mode 100644 index 72b3ed1e62e8..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J_Nested_I/TestCase4.il +++ /dev/null @@ -1,98 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.assembly TestCase4 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class private abstract auto ansi beforefieldinit A`1 - implements class A`1/J/I`1 -{ - .class interface nested family abstract auto ansi J - { - .class interface nested public abstract auto ansi I`1 - { .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} } - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private abstract auto ansi beforefieldinit B`2 - extends class A`1 - implements class A`1/J/I`1, A`1/J -{ - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "B::Foo" - ret - } - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "B::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "B::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "B::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "B::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "B::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J_Nested_I/TestCase5.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J_Nested_I/TestCase5.il deleted file mode 100644 index 0fb52a5c62a6..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J_Nested_I/TestCase5.il +++ /dev/null @@ -1,98 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.assembly TestCase5 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class private auto ansi beforefieldinit A`1 - implements class A`1/J/I`1 -{ - .class interface nested family abstract auto ansi J - { - .class interface nested public abstract auto ansi I`1 - { .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} } - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} - } - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "A::Foo" - ret - } - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "A::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "A::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit B`2 - extends class A`1 - implements class A`1/J/I`1, A`1/J -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "A::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "A::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "A::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J_Nested_I/TestCase6.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J_Nested_I/TestCase6.il deleted file mode 100644 index fd5047eaf358..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/Nested_J_Nested_I/TestCase6.il +++ /dev/null @@ -1,98 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib {} -.assembly TestCase6 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class private abstract auto ansi beforefieldinit A`1 - implements class A`1/J/I`1 -{ - .class interface nested family abstract auto ansi J - { - .class interface nested public abstract auto ansi I`1 - { .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} } - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} - } - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "A::Foo" - ret - } - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "A::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "A::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private abstract auto ansi beforefieldinit B`2 - extends class A`1 - implements class A`1/J/I`1, A`1/J -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "A::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "A::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "A::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/TestCase0.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/TestCase0.il deleted file mode 100644 index 068a309944d2..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/TestCase0.il +++ /dev/null @@ -1,114 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } -.assembly extern mscorlib {} -.assembly TestCase0 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class interface private abstract auto ansi I`1 -{ .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} } - -.class interface private abstract auto ansi J -{ - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} -} - -.class private auto ansi beforefieldinit A`1 - implements class I`1 -{ - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "A::Foo" - ret - } - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "A::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "A::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit B`2 - extends class A`1 - implements class I`1, J -{ - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "B::Foo" - ret - } - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "B::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "B::Bar2" - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "B::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "B::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "B::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/TestCase1.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/TestCase1.il deleted file mode 100644 index e5d41839f86b..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/TestCase1.il +++ /dev/null @@ -1,101 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } -.assembly extern mscorlib {} -.assembly TestCase1 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class interface private abstract auto ansi I`1 -{ .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} } - -.class interface private abstract auto ansi J -{ - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} -} - -.class private auto ansi beforefieldinit A`1 - implements class I`1 -{ - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "A::Foo" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit B`2 - extends class A`1 - implements class I`1, J -{ - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "B::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "B::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "A::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "B::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "B::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/TestCase2.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/TestCase2.il deleted file mode 100644 index 30e99dca24a7..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/TestCase2.il +++ /dev/null @@ -1,101 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } -.assembly extern mscorlib {} -.assembly TestCase2 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class interface private abstract auto ansi I`1 -{ .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} } - -.class interface private abstract auto ansi J -{ - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} -} - -.class private abstract auto ansi beforefieldinit A`1 - implements class I`1 -{ - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "A::Foo" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private abstract auto ansi beforefieldinit B`2 - extends class A`1 - implements class I`1, J -{ - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "B::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "B::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "A::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "B::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "B::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/TestCase3.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/TestCase3.il deleted file mode 100644 index d84965ce38f1..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/TestCase3.il +++ /dev/null @@ -1,101 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } -.assembly extern mscorlib {} -.assembly TestCase3 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class interface private abstract auto ansi I`1 -{ .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} } - -.class interface private abstract auto ansi J -{ - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} -} - -.class private abstract auto ansi beforefieldinit A`1 - implements class I`1 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit B`2 - extends class A`1 - implements class I`1, J -{ - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "B::Foo" - ret - } - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "B::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "B::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "B::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "B::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "B::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/TestCase4.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/TestCase4.il deleted file mode 100644 index f41de5c05d4d..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/TestCase4.il +++ /dev/null @@ -1,101 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } -.assembly extern mscorlib {} -.assembly TestCase4 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class interface private abstract auto ansi I`1 -{ .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} } - -.class interface private abstract auto ansi J -{ - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} -} - -.class private abstract auto ansi beforefieldinit A`1 - implements class I`1 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private abstract auto ansi beforefieldinit B`2 - extends class A`1 - implements class I`1, J -{ - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "B::Foo" - ret - } - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "B::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "B::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "B::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "B::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "B::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/TestCase5.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/TestCase5.il deleted file mode 100644 index 51ddd83515a6..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/TestCase5.il +++ /dev/null @@ -1,101 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } -.assembly extern mscorlib {} -.assembly TestCase5 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class interface private abstract auto ansi I`1 -{ .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} } - -.class interface private abstract auto ansi J -{ - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} -} - -.class private auto ansi beforefieldinit A`1 - implements class I`1 -{ - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "A::Foo" - ret - } - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "A::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "A::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit B`2 - extends class A`1 - implements class I`1, J -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "A::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "A::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "A::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/TestCase6.il b/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/TestCase6.il deleted file mode 100644 index ceba5455b28f..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/InterfaceFolding/TestCase6.il +++ /dev/null @@ -1,101 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } -.assembly extern mscorlib {} -.assembly TestCase6 {} - - -// =============== CLASS MEMBERS DECLARATION =================== -.class interface private abstract auto ansi I`1 -{ .method public hidebysig newslot abstract virtual instance string Foo() cil managed {} } - -.class interface private abstract auto ansi J -{ - .method public hidebysig newslot abstract virtual instance string Bar1() cil managed {} - .method public hidebysig newslot abstract virtual instance string Bar2() cil managed {} -} - -.class private abstract auto ansi beforefieldinit A`1 - implements class I`1 -{ - .method public hidebysig newslot virtual instance string Foo() cil managed - { - ldstr "A::Foo" - ret - } - .method public hidebysig newslot virtual instance string Bar1() cil managed - { - .maxstack 8 - ldstr "A::Bar1" - ret - } - .method public hidebysig newslot virtual instance string Bar2() cil managed - { - .maxstack 8 - ldstr "A::Bar2" - ret - } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private abstract auto ansi beforefieldinit B`2 - extends class A`1 - implements class I`1, J -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class private auto ansi beforefieldinit C extends class B`2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - ret - } -} - -.class public auto ansi beforefieldinit Test extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - - newobj instance void C::.ctor() - callvirt instance string class C::Foo() - ldstr "A::Foo" - call bool [mscorlib]System.String::op_Inequality(string, string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar1() - ldstr "A::Bar1" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - newobj instance void C::.ctor() - callvirt instance string class C::Bar2() - ldstr "A::Bar2" - call bool [mscorlib]System.String::op_Inequality(string,string) - brtrue FAILURE - - -PASS: - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - -FAILURE: - ldstr "Failed!" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.m1 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/MethodImpl/CovariantReturns/Interfaces/UnitTest.il b/src/coreclr/tests/src/Loader/classloader/MethodImpl/CovariantReturns/Interfaces/UnitTest.il deleted file mode 100644 index 5afa5155a755..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/MethodImpl/CovariantReturns/Interfaces/UnitTest.il +++ /dev/null @@ -1,1350 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } -.assembly extern System.Runtime { } -.assembly extern mscorlib { } -.assembly UnitTest { } - -// ======================================================================================== -// Types that will be used as return types on the various methods -// ======================================================================================== - -.class interface public auto ansi abstract IUnused1 { } -.class interface public auto ansi abstract IUnused2 { } - -.class interface public auto ansi abstract IA implements IUnused1, IUnused2 { } -.class interface public auto ansi abstract IB implements IUnused1, IUnused2, IA { } -.class interface public auto ansi abstract IC implements IUnused1, IUnused2, IB { } - -.class interface public auto ansi abstract IGenRetType { } -.class interface public auto ansi abstract IDictionary { } - -.class public auto ansi abstract CA {} -.class public auto ansi abstract CB extends CA {} -.class public auto ansi abstract CC extends CB {} - -.class interface public auto ansi abstract ICovariant<+ T> { } -.class interface public auto ansi abstract IContravariant<- T> { } - -.class interface public auto ansi abstract IGenDerive1 implements IUnused1, IUnused2, class IGenRetType { } -.class interface public auto ansi abstract IGenDerive2 implements IUnused1, IUnused2, class IGenDerive1> { } -.class interface public auto ansi abstract IGenDerive3 implements IUnused1, IUnused2, class IGenDerive2 { } - -.class interface public auto ansi abstract INonGenericDerived1 implements IUnused1, IUnused2, class IGenRetType { } -.class interface public auto ansi abstract INonGenericDerived2 implements IUnused1, IUnused2, class INonGenericDerived1 { } -.class interface public auto ansi abstract INonGenericDerived3 implements IUnused1, IUnused2, class INonGenericDerived2 { } -.class interface public auto ansi abstract INonGenericDerived4 implements IUnused1, IUnused2, INonGenericDerived3 { } - -.class interface public auto ansi abstract IGenToNonGen1 implements IUnused1, IUnused2, IC { } -.class interface public auto ansi abstract IGenToNonGen2 implements IUnused1, IUnused2, class IGenToNonGen1> { } -.class interface public auto ansi abstract IGenToNonGen3 implements IUnused1, IUnused2, class IGenToNonGen2 { } - -.class interface public auto ansi abstract INonGenThroughGen1 implements IUnused1, IUnused2, IC { } -.class interface public auto ansi abstract INonGenThroughGen2 implements IUnused1, IUnused2, class INonGenThroughGen1> { } -.class interface public auto ansi abstract INonGenThroughGen3 implements IUnused1, IUnused2, class INonGenThroughGen2 { } -.class interface public auto ansi abstract INonGenThroughGen4 implements IUnused1, IUnused2, INonGenThroughGen3 { } - -// class implementing the interfaces -.class public auto ansi beforefieldinit NonGenThroughGen4 implements IUnused1, IUnused2, INonGenThroughGen4 { } -.class public auto ansi beforefieldinit GenToNonGen3 implements IUnused1, IUnused2, class IGenToNonGen3 { } -.class public auto ansi beforefieldinit NonGenericDerived4 implements IUnused1, IUnused2, INonGenericDerived4 { } -.class public auto ansi beforefieldinit GenDerive3 implements IUnused1, IUnused2, class IGenDerive3 { } -.class public auto ansi beforefieldinit C implements IUnused1, IUnused2, IC { } -.class public auto ansi beforefieldinit GenRetType implements IUnused1, IUnused2, class IGenRetType { } - -.class public auto ansi beforefieldinit Base {} -.class public auto ansi beforefieldinit Derived extends class Base {} -.class public auto ansi beforefieldinit Derived2 extends class Base {} - -.class interface public auto ansi abstract IVariant<+ V> -{ - .method public hidebysig newslot virtual instance void Test() - { - ret - } -} - -// ======================================================================================== -// Main base type with various virtual methods that will be overriden later -// ======================================================================================== - -.class public auto ansi beforefieldinit GenBaseType -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } - - .method public hidebysig newslot virtual instance object MyFunc(string& res) - { - ldarg.1 - ldstr "object GenBaseType.MyFunc()" - stind.ref - ldnull - ret - } - .method public hidebysig newslot virtual instance class IB MyFunc(string& res) - { - ldarg.1 - ldstr "IB GenBaseType.MyFunc()" - stind.ref - ldnull - ret - } - .method public hidebysig newslot virtual instance class ICovariant MyFuncCovariant(string& res) - { - ldarg.1 - ldstr "ICovariant GenBaseType.MyFuncCovariant()" - stind.ref - ldnull - ret - } - .method public hidebysig newslot virtual instance class IContravariant MyFuncContravariant(string& res) - { - ldarg.1 - ldstr "IContravariant GenBaseType.MyFuncContravariant()" - stind.ref - ldnull - ret - } - .method public hidebysig newslot virtual instance class IB GenToNonGen(string& res) - { - ldarg.1 - ldstr "IB GenBaseType.GenToNonGen()" - stind.ref - ldnull - ret - } - .method public hidebysig newslot virtual instance class IB NonGenThroughGenFunc(string& res) - { - ldarg.1 - ldstr "IB GenBaseType.NonGenThroughGenFunc()" - stind.ref - ldnull - ret - } - .method public hidebysig newslot virtual instance class IGenRetType MyGenFunc(string& res) - { - ldarg.1 - ldstr "IGenRetType GenBaseType.MyGenFunc()" - stind.ref - ldnull - ret - } - .method public hidebysig newslot virtual instance class IGenRetType> MyGenFunc(string& res) - { - ldarg.1 - ldstr "IGenRetType> GenBaseType.MyGenFunc()" - stind.ref - ldnull - ret - } - - .method public hidebysig newslot virtual instance class IVariant> MultiLevelGenericVariantFunc(string&) - { - ldarg.1 - ldstr "IVariant> GenBaseType.MultiLevelGenericVariantFunc()" - stind.ref - ldnull - ret - } -} - -// ======================================================================================== -// SECOND LAYER type: overrides *SOME* virtuals on GenBaseType using MethodImpls with -// covariant return types (more derived return types) -// ======================================================================================== - -.class public auto ansi beforefieldinit GenMiddleType extends class GenBaseType -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } - - .method public hidebysig newslot virtual instance class INonGenThroughGen2 NonGenThroughGenFunc(string& res) - { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.PreserveBaseOverridesAttribute::.ctor() = (01 00 00 00) - .override method instance class IB class GenBaseType::NonGenThroughGenFunc(string& res) - ldarg.1 - ldstr "INonGenThroughGen2 GenMiddleType.NonGenThroughGenFunc()" - stind.ref - ldnull - ret - } - - .method public hidebysig newslot virtual instance class IGenToNonGen1> GenToNonGen(string& res) - { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.PreserveBaseOverridesAttribute::.ctor() = (01 00 00 00) - .override method instance class IB class GenBaseType::GenToNonGen(string& res) - ldarg.1 - ldstr "IGenToNonGen1> GenMiddleType.GenToNonGen()" - stind.ref - ldnull - ret - } - - .method public hidebysig newslot virtual instance class INonGenericDerived1 MyGenFunc(string& res) - { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.PreserveBaseOverridesAttribute::.ctor() = (01 00 00 00) - .override method instance class IGenRetType class GenBaseType::MyGenFunc(string& res) - ldarg.1 - ldstr "INonGenericDerived1 GenMiddleType.MyGenFunc()" - stind.ref - ldnull - ret - } - - .method public hidebysig newslot virtual instance class IGenDerive1> MyGenFunc(string& res) - { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.PreserveBaseOverridesAttribute::.ctor() = (01 00 00 00) - .override method instance class IGenRetType> class GenBaseType::MyGenFunc(string& res) - ldarg.1 - ldstr "IGenDerive1> GenMiddleType.MyGenFunc()" - stind.ref - ldnull - ret - } -} - - -// ======================================================================================== -// THIRD LAYER type: overrides all virtuals from GenBaseType using MethodImpls with -// covariant return types (more derived return types than the ones used in GenMiddleType) -// ======================================================================================== - -.class public auto ansi beforefieldinit GenTestType extends class GenMiddleType -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } - - .method public hidebysig newslot virtual instance class INonGenThroughGen4 NonGenThroughGenFunc(string& res) - { - .override method instance class IB class GenBaseType::NonGenThroughGenFunc(string& res) - ldarg.1 - ldstr "INonGenThroughGen4 TestType.NonGenThroughGenFunc()" - stind.ref - ldnull - ret - } - - .method public hidebysig newslot virtual instance class IGenToNonGen3 GenToNonGen(string& res) - { - .override method instance class IB class GenBaseType::GenToNonGen(string& res) - ldarg.1 - ldstr "IGenToNonGen3 TestType.GenToNonGen()" - stind.ref - ldnull - ret - } - - .method public hidebysig newslot virtual instance class INonGenericDerived4 MyGenFunc(string& res) - { - .override method instance class IGenRetType class GenBaseType::MyGenFunc(string& res) - ldarg.1 - ldstr "INonGenericDerived4 TestType.MyGenFunc()" - stind.ref - ldnull - ret - } - - .method public hidebysig newslot virtual instance class IGenDerive3 MyGenFunc(string& res) - { - .override method instance class IGenRetType> class GenBaseType::MyGenFunc(string& res) - ldarg.1 - ldstr "IGenDerive3 TestType.MyGenFunc()" - stind.ref - ldnull - ret - } - - .method public hidebysig newslot virtual instance class IGenRetType MyFunc(string& res) - { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.PreserveBaseOverridesAttribute::.ctor() = (01 00 00 00) - .override method instance object class GenBaseType::MyFunc(string& res) - ldarg.1 - ldstr "IGenRetType TestType.MyFunc()" - stind.ref - ldnull - ret - } - - .method public hidebysig newslot virtual instance class IC MyFunc(string& res) - { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.PreserveBaseOverridesAttribute::.ctor() = (01 00 00 00) - .override method instance class IB class GenBaseType::MyFunc(string& res) - ldarg.1 - ldstr "IC TestType.MyFunc()" - stind.ref - ldnull - ret - } - - .method public hidebysig newslot virtual instance class ICovariant MyFuncCovariant(string& res) - { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.PreserveBaseOverridesAttribute::.ctor() = (01 00 00 00) - .override method instance class ICovariant class GenBaseType::MyFuncCovariant(string& res) - ldarg.1 - ldstr "ICovariant TestType.MyFuncCovariant()" - stind.ref - ldnull - ret - } - - .method public hidebysig newslot virtual instance class IContravariant MyFuncContravariant(string& res) - { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.PreserveBaseOverridesAttribute::.ctor() = (01 00 00 00) - .override method instance class IContravariant class GenBaseType::MyFuncContravariant(string& res) - ldarg.1 - ldstr "IContravariant TestType.MyFuncContravariant()" - stind.ref - ldnull - ret - } - - // ======================================================================================== - // Set of implicit overrides that should be ignored given there are explicit overrides from the MethodImpls - // ======================================================================================== - .method public hidebysig virtual instance class IB NonGenThroughGenFunc(string& res) - { - ldstr "Should never execute this method" - newobj instance void [System.Runtime]System.Exception::.ctor(string) - throw - } - - .method public hidebysig virtual instance class IB GenToNonGen(string& res) - { - ldstr "Should never execute this method" - newobj instance void [System.Runtime]System.Exception::.ctor(string) - throw - } - - .method public hidebysig virtual instance class IGenRetType MyGenFunc(string& res) - { - ldstr "Should never execute this method" - newobj instance void [System.Runtime]System.Exception::.ctor(string) - throw - } - - .method public hidebysig virtual instance class IGenRetType> MyGenFunc(string& res) - { - ldstr "Should never execute this method" - newobj instance void [System.Runtime]System.Exception::.ctor(string) - throw - } - - .method public hidebysig virtual instance object MyFunc(string& res) - { - ldstr "Should never execute this method" - newobj instance void [System.Runtime]System.Exception::.ctor(string) - throw - } - - .method public hidebysig virtual instance class IB MyFunc(string& res) - { - ldstr "Should never execute this method" - newobj instance void [System.Runtime]System.Exception::.ctor(string) - throw - } - - .method public hidebysig virtual instance class ICovariant MyFuncCovariant(string& res) - { - ldstr "Should never execute this method" - newobj instance void [System.Runtime]System.Exception::.ctor(string) - throw - } - - .method public hidebysig virtual instance class IContravariant MyFuncContravariant(string& res) - { - ldstr "Should never execute this method" - newobj instance void [System.Runtime]System.Exception::.ctor(string) - throw - } -} - -// ======================================================================================== -// FOURTH LAYER type: overrides all virtuals from GenBaseType using MethodImpls with -// covariant return types (classes that implement the interfaces used as return types) -// ======================================================================================== - -.class public auto ansi beforefieldinit GenMoreDerived extends class GenTestType -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } - - .method public hidebysig newslot virtual instance class NonGenThroughGen4 NonGenThroughGenFunc(string& res) - { - .override method instance class IB class GenBaseType::NonGenThroughGenFunc(string& res) - ldarg.1 - ldstr "class NonGenThroughGen4 GenMoreDerived.NonGenThroughGenFunc()" - stind.ref - ldnull - ret - } - - .method public hidebysig newslot virtual instance class GenToNonGen3 GenToNonGen(string& res) - { - .override method instance class IB class GenBaseType::GenToNonGen(string& res) - ldarg.1 - ldstr "class GenToNonGen3 GenMoreDerived.GenToNonGen()" - stind.ref - ldnull - ret - } - - .method public hidebysig newslot virtual instance class NonGenericDerived4 MyGenFunc(string& res) - { - .override method instance class IGenRetType class GenBaseType::MyGenFunc(string& res) - ldarg.1 - ldstr "class NonGenericDerived4 GenMoreDerived.MyGenFunc()" - stind.ref - ldnull - ret - } - - .method public hidebysig newslot virtual instance class GenDerive3 MyGenFunc(string& res) - { - .override method instance class IGenRetType> class GenBaseType::MyGenFunc(string& res) - ldarg.1 - ldstr "class GenDerive3 GenMoreDerived.MyGenFunc()" - stind.ref - ldnull - ret - } - - .method public hidebysig newslot virtual instance class GenRetType MyFunc(string& res) - { - .override method instance object class GenBaseType::MyFunc(string& res) - ldarg.1 - ldstr "class GenRetType GenMoreDerived.MyFunc()" - stind.ref - ldnull - ret - } - - .method public hidebysig newslot virtual instance class C MyFunc(string& res) - { - .override method instance class IB class GenBaseType::MyFunc(string& res) - ldarg.1 - ldstr "class C GenMoreDerived.MyFunc()" - stind.ref - ldnull - ret - } - - .method public hidebysig newslot virtual instance class IVariant MultiLevelGenericVariantFunc(string&) - { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.PreserveBaseOverridesAttribute::.ctor() = (01 00 00 00) - .override method instance class IVariant> class GenBaseType::MultiLevelGenericVariantFunc(string&) - ldarg.1 - ldstr "class IVariant GenMoreDerived.MultiLevelGenericVariantFunc()" - stind.ref - ldnull - ret - } -} - - -// ======================================================================================== -// FIFTH LAYER INVALID type: Used to verify we can't override the method using a compatible interface -// if it has been already overridden using a class that implements the interface (i.e. the new -// interface return type won't be compatible with the class return type on the previous override -// ======================================================================================== - -.class public auto ansi beforefieldinit Invalid1 extends class GenMoreDerived -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } - - .method public hidebysig newslot virtual instance class INonGenThroughGen4 NonGenThroughGenFunc(string& res) - { - .override method instance class IB class GenBaseType::NonGenThroughGenFunc(string& res) - ldnull - ret - } -} - -// ======================================================================================== -// FIFTH LAYER INVALID type: Used to verify we can't override the method using a less derived interface -// than one that has already been used in a previous override -// ======================================================================================== - -.class public auto ansi beforefieldinit Invalid2 extends class GenTestType -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } - - .method public hidebysig newslot virtual instance class INonGenThroughGen2 NonGenThroughGenFunc(string& res) - { - .override method instance class IB class GenBaseType::NonGenThroughGenFunc(string& res) - ldnull - ret - } -} - -.class public auto ansi beforefieldinit Invalid3 extends class GenTestType -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } - - .method public hidebysig newslot virtual instance class IVariant MultiLevelGenericVariantFunc(string&) - { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.PreserveBaseOverridesAttribute::.ctor() = (01 00 00 00) - .override method instance class IVariant> class GenBaseType::MultiLevelGenericVariantFunc(string&) - ldnull - ret - } -} - -// ======================================================================================== - -.class public auto ansi beforefieldinit CMain extends [mscorlib]System.Object -{ - .method private hidebysig static bool CheckResults ( - string expected, - string a, - [opt] string b, - [opt] string c, - [opt] string d) cil managed - { - .param [3] = nullref - .param [4] = nullref - .param [5] = nullref - // Method begins at RVA 0x20a0 - // Code size 164 (0xa4) - .maxstack 2 - .locals /* 11000002 */ init ( - [0] bool - ) - - IL_0000: ldarg.1 - IL_0001: ldarg.0 - IL_0002: call bool [System.Runtime]System.String::op_Equality(string, string) /* 0A000012 */ - IL_0007: stloc.0 - IL_0008: ldstr "EXPECTED: " /* 70000001 */ - IL_000d: ldarg.0 - IL_000e: call string [System.Runtime]System.String::Concat(string, string) /* 0A000013 */ - IL_0013: call void [System.Console]System.Console::WriteLine(string) /* 0A000014 */ - IL_0018: ldstr "ACTUAL1 : " /* 70000017 */ - IL_001d: ldarg.1 - IL_001e: call string [System.Runtime]System.String::Concat(string, string) /* 0A000013 */ - IL_0023: call void [System.Console]System.Console::WriteLine(string) /* 0A000014 */ - IL_0028: ldarg.2 - IL_0029: call bool [System.Runtime]System.String::IsNullOrEmpty(string) /* 0A000015 */ - IL_002e: brtrue.s IL_004e - - IL_0030: ldstr "ACTUAL2 : " /* 7000002D */ - IL_0035: ldarg.2 - IL_0036: call string [System.Runtime]System.String::Concat(string, string) /* 0A000013 */ - IL_003b: call void [System.Console]System.Console::WriteLine(string) /* 0A000014 */ - IL_0040: ldloc.0 - IL_0041: brfalse.s IL_004c - - IL_0043: ldarg.2 - IL_0044: ldarg.0 - IL_0045: call bool [System.Runtime]System.String::op_Equality(string, string) /* 0A000012 */ - IL_004a: br.s IL_004d - - IL_004c: ldc.i4.0 - - IL_004d: stloc.0 - - IL_004e: ldarg.3 - IL_004f: call bool [System.Runtime]System.String::IsNullOrEmpty(string) /* 0A000015 */ - IL_0054: brtrue.s IL_0074 - - IL_0056: ldstr "ACTUAL3 : " /* 70000043 */ - IL_005b: ldarg.3 - IL_005c: call string [System.Runtime]System.String::Concat(string, string) /* 0A000013 */ - IL_0061: call void [System.Console]System.Console::WriteLine(string) /* 0A000014 */ - IL_0066: ldloc.0 - IL_0067: brfalse.s IL_0072 - - IL_0069: ldarg.3 - IL_006a: ldarg.0 - IL_006b: call bool [System.Runtime]System.String::op_Equality(string, string) /* 0A000012 */ - IL_0070: br.s IL_0073 - - IL_0072: ldc.i4.0 - - IL_0073: stloc.0 - - IL_0074: ldarg.s d - IL_0076: call bool [System.Runtime]System.String::IsNullOrEmpty(string) /* 0A000015 */ - IL_007b: brtrue.s IL_009d - - IL_007d: ldstr "ACTUAL4 : " /* 70000059 */ - IL_0082: ldarg.s d - IL_0084: call string [System.Runtime]System.String::Concat(string, string) /* 0A000013 */ - IL_0089: call void [System.Console]System.Console::WriteLine(string) /* 0A000014 */ - IL_008e: ldloc.0 - IL_008f: brfalse.s IL_009b - - IL_0091: ldarg.s d - IL_0093: ldarg.0 - IL_0094: call bool [System.Runtime]System.String::op_Equality(string, string) /* 0A000012 */ - IL_0099: br.s IL_009c - - IL_009b: ldc.i4.0 - - IL_009c: stloc.0 - - IL_009d: call void [System.Console]System.Console::WriteLine() /* 0A000016 */ - IL_00a2: ldloc.0 - IL_00a3: ret - } // end of method Program::CheckResults - - // ============== Test using GenTestType ============== // - // These test methods will callvirt each method using: - // 1) The signature from GetBaseType - // 2) The signature from GenMiddleType with covariant returns (when applicable) - // 3) The signature from GenTestType with covariant returns - // And verify that the override on GetTestType is the one that executes - - .method public static bool RunTest1() noinlining - { - .locals init (string res1, string res2, string res3) - - newobj instance void class GenTestType::.ctor() - ldloca.s 0 - callvirt instance object class GenBaseType::MyFunc(string&) - pop - - newobj instance void class GenTestType::.ctor() - ldloca.s 1 - callvirt instance class IGenRetType class GenTestType::MyFunc(string&) - pop - - ldstr "IGenRetType TestType.MyFunc()" - ldloc.0 - ldloc.1 - ldloc.2 - ldnull - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - .method public static bool RunTest2() noinlining - { - .locals init (string res1, string res2, string res3) - - newobj instance void class GenTestType::.ctor() - ldloca.s 0 - callvirt instance class IB class GenBaseType::MyFunc(string&) - pop - - newobj instance void class GenTestType::.ctor() - ldloca.s 1 - callvirt instance class IC class GenTestType::MyFunc(string&) - pop - - ldstr "IC TestType.MyFunc()" - ldloc.0 - ldloc.1 - ldloc.2 - ldnull - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - .method public static bool RunTest3() noinlining - { - .locals init (string res1, string res2, string res3) - - newobj instance void class GenTestType::.ctor() - ldloca.s 0 - callvirt instance class IGenRetType> class GenBaseType::MyGenFunc(string&) - pop - - newobj instance void class GenTestType::.ctor() - ldloca.s 1 - callvirt instance class IGenDerive1> class GenMiddleType::MyGenFunc(string&) - pop - - newobj instance void class GenTestType::.ctor() - ldloca.s 2 - callvirt instance class IGenDerive3 class GenTestType::MyGenFunc(string&) - pop - - ldstr "IGenDerive3 TestType.MyGenFunc()" - ldloc.0 - ldloc.1 - ldloc.2 - ldnull - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - .method public static bool RunTest4() noinlining - { - .locals init (string res1, string res2, string res3) - - newobj instance void class GenTestType::.ctor() - ldloca.s 0 - callvirt instance class IGenRetType class GenBaseType::MyGenFunc(string&) - pop - - newobj instance void class GenTestType::.ctor() - ldloca.s 1 - callvirt instance class INonGenericDerived1 class GenMiddleType::MyGenFunc(string&) - pop - - newobj instance void class GenTestType::.ctor() - ldloca.s 2 - callvirt instance class INonGenericDerived4 class GenTestType::MyGenFunc(string&) - pop - - ldstr "INonGenericDerived4 TestType.MyGenFunc()" - ldloc.0 - ldloc.1 - ldloc.2 - ldnull - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - .method public static bool RunTest5() noinlining - { - .locals init (string res1, string res2, string res3) - - newobj instance void class GenTestType::.ctor() - ldloca.s 0 - callvirt instance class IB class GenBaseType::GenToNonGen(string&) - pop - - newobj instance void class GenTestType::.ctor() - ldloca.s 1 - callvirt instance class IGenToNonGen1> class GenMiddleType::GenToNonGen(string&) - pop - - newobj instance void class GenTestType::.ctor() - ldloca.s 2 - callvirt instance class IGenToNonGen3 class GenTestType::GenToNonGen(string&) - pop - - ldstr "IGenToNonGen3 TestType.GenToNonGen()" - ldloc.0 - ldloc.1 - ldloc.2 - ldnull - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - .method public static bool RunTest6() noinlining - { - .locals init (string res1, string res2, string res3) - - newobj instance void class GenTestType::.ctor() - ldloca.s 0 - callvirt instance class IB class GenBaseType::NonGenThroughGenFunc(string&) - pop - - newobj instance void class GenTestType::.ctor() - ldloca.s 1 - callvirt instance class INonGenThroughGen2 class GenMiddleType::NonGenThroughGenFunc(string&) - pop - - newobj instance void class GenTestType::.ctor() - ldloca.s 2 - callvirt instance class INonGenThroughGen4 class GenTestType::NonGenThroughGenFunc(string&) - pop - - ldstr "INonGenThroughGen4 TestType.NonGenThroughGenFunc()" - ldloc.0 - ldloc.1 - ldloc.2 - ldnull - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - .method public static bool RunTest7() noinlining - { - .locals init (string res1, string res2, string res3) - - newobj instance void class GenTestType::.ctor() - ldloca.s 0 - callvirt instance class ICovariant class GenBaseType::MyFuncCovariant(string&) - pop - - newobj instance void class GenTestType::.ctor() - ldloca.s 1 - callvirt instance class ICovariant class GenTestType::MyFuncCovariant(string&) - pop - - ldstr "ICovariant TestType.MyFuncCovariant()" - ldloc.0 - ldloc.1 - ldloc.2 - ldnull - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - .method public static bool RunTest8() noinlining - { - .locals init (string res1, string res2, string res3) - - newobj instance void class GenTestType::.ctor() - ldloca.s 0 - callvirt instance class IContravariant class GenBaseType::MyFuncContravariant(string&) - pop - - newobj instance void class GenTestType::.ctor() - ldloca.s 1 - callvirt instance class IContravariant class GenTestType::MyFuncContravariant(string&) - pop - - ldstr "IContravariant TestType.MyFuncContravariant()" - ldloc.0 - ldloc.1 - ldloc.2 - ldnull - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - .method public static bool RunTest9() noinlining - { - .locals init (string res1) - newobj instance void class GenMoreDerived::.ctor() - ldloca.s 0 - callvirt instance class IVariant class GenMoreDerived::MultiLevelGenericVariantFunc(string&) - pop - - ldstr "class IVariant GenMoreDerived.MultiLevelGenericVariantFunc()" - ldloc.0 - ldnull - ldnull - ldnull - call bool CMain::CheckResults(string,string,string,string,string) - - ret - } - - - - // ============== Test using GenMiddleType ============== // - // These test methods will callvirt each method using: - // 1) The signature from GetBaseType - // 2) The signature from GenMiddleType with covariant returns - // And verify that the override on GenMiddleType is the one that executes - - .method public static bool RunTest_Middle1() noinlining - { - .locals init (string res1, string res2, string res3) - - newobj instance void class GenMiddleType::.ctor() - ldloca.s 0 - callvirt instance class IGenRetType> class GenBaseType::MyGenFunc(string&) - pop - - newobj instance void class GenMiddleType::.ctor() - ldloca.s 1 - callvirt instance class IGenDerive1> class GenMiddleType::MyGenFunc(string&) - pop - - ldstr "IGenDerive1> GenMiddleType.MyGenFunc()" - ldloc.0 - ldloc.1 - ldloc.2 - ldnull - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - .method public static bool RunTest_Middle2() noinlining - { - .locals init (string res1, string res2, string res3) - - newobj instance void class GenMiddleType::.ctor() - ldloca.s 0 - callvirt instance class IGenRetType class GenBaseType::MyGenFunc(string&) - pop - - newobj instance void class GenMiddleType::.ctor() - ldloca.s 1 - callvirt instance class INonGenericDerived1 class GenMiddleType::MyGenFunc(string&) - pop - - ldstr "INonGenericDerived1 GenMiddleType.MyGenFunc()" - ldloc.0 - ldloc.1 - ldloc.2 - ldnull - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - .method public static bool RunTest_Middle3() noinlining - { - .locals init (string res1, string res2, string res3) - - newobj instance void class GenMiddleType::.ctor() - ldloca.s 0 - callvirt instance class IB class GenBaseType::GenToNonGen(string&) - pop - - newobj instance void class GenMiddleType::.ctor() - ldloca.s 1 - callvirt instance class IGenToNonGen1> class GenMiddleType::GenToNonGen(string&) - pop - - ldstr "IGenToNonGen1> GenMiddleType.GenToNonGen()" - ldloc.0 - ldloc.1 - ldloc.2 - ldnull - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - .method public static bool RunTest_Middle4() noinlining - { - .locals init (string res1, string res2, string res3) - - newobj instance void class GenMiddleType::.ctor() - ldloca.s 0 - callvirt instance class IB class GenBaseType::NonGenThroughGenFunc(string&) - pop - - newobj instance void class GenMiddleType::.ctor() - ldloca.s 1 - callvirt instance class INonGenThroughGen2 class GenMiddleType::NonGenThroughGenFunc(string&) - pop - - ldstr "INonGenThroughGen2 GenMiddleType.NonGenThroughGenFunc()" - ldloc.0 - ldloc.1 - ldloc.2 - ldnull - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - // ============== Test using GenMoreDerived ============== // - // These test methods will callvirt each method using: - // 1) The signature from GetBaseType - // 2) The signature from GenMiddleType with covariant returns (when applicable) - // 3) The signature from GenTestType with covariant returns - // 4) The signature from GenMoreDerived with covariant returns - // And verify that the override on GenMoreDerived is the one that executes - - .method public static bool RunTest_MoreDerived1() noinlining - { - .locals init (string res1, string res2, string res3, string res4) - - newobj instance void class GenMoreDerived::.ctor() - ldloca.s 0 - callvirt instance object class GenBaseType::MyFunc(string&) - pop - - newobj instance void class GenMoreDerived::.ctor() - ldloca.s 1 - callvirt instance class IGenRetType class GenTestType::MyFunc(string&) - pop - - newobj instance void class GenMoreDerived::.ctor() - ldloca.s 2 - callvirt instance class GenRetType class GenMoreDerived::MyFunc(string&) - pop - - ldstr "class GenRetType GenMoreDerived.MyFunc()" - ldloc.0 - ldloc.1 - ldloc.2 - ldloc.3 - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - .method public static bool RunTest_MoreDerived2() noinlining - { - .locals init (string res1, string res2, string res3, string res4) - - newobj instance void class GenMoreDerived::.ctor() - ldloca.s 0 - callvirt instance class IB class GenBaseType::MyFunc(string&) - pop - - newobj instance void class GenMoreDerived::.ctor() - ldloca.s 1 - callvirt instance class IC class GenTestType::MyFunc(string&) - pop - - newobj instance void class GenMoreDerived::.ctor() - ldloca.s 2 - callvirt instance class C class GenMoreDerived::MyFunc(string&) - pop - - ldstr "class C GenMoreDerived.MyFunc()" - ldloc.0 - ldloc.1 - ldloc.2 - ldloc.3 - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - .method public static bool RunTest_MoreDerived3() noinlining - { - .locals init (string res1, string res2, string res3, string res4) - - newobj instance void class GenMoreDerived::.ctor() - ldloca.s 0 - callvirt instance class IGenRetType> class GenBaseType::MyGenFunc(string&) - pop - - newobj instance void class GenMoreDerived::.ctor() - ldloca.s 1 - callvirt instance class IGenDerive1> class GenMiddleType::MyGenFunc(string&) - pop - - newobj instance void class GenMoreDerived::.ctor() - ldloca.s 2 - callvirt instance class IGenDerive3 class GenTestType::MyGenFunc(string&) - pop - - newobj instance void class GenMoreDerived::.ctor() - ldloca.s 3 - callvirt instance class GenDerive3 class GenMoreDerived::MyGenFunc(string&) - pop - - ldstr "class GenDerive3 GenMoreDerived.MyGenFunc()" - ldloc.0 - ldloc.1 - ldloc.2 - ldloc.3 - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - .method public static bool RunTest_MoreDerived4() noinlining - { - .locals init (string res1, string res2, string res3, string res4) - - newobj instance void class GenMoreDerived::.ctor() - ldloca.s 0 - callvirt instance class IGenRetType class GenBaseType::MyGenFunc(string&) - pop - - newobj instance void class GenMoreDerived::.ctor() - ldloca.s 1 - callvirt instance class INonGenericDerived1 class GenMiddleType::MyGenFunc(string&) - pop - - newobj instance void class GenMoreDerived::.ctor() - ldloca.s 2 - callvirt instance class INonGenericDerived4 class GenTestType::MyGenFunc(string&) - pop - - newobj instance void class GenMoreDerived::.ctor() - ldloca.s 3 - callvirt instance class NonGenericDerived4 class GenMoreDerived::MyGenFunc(string&) - pop - - ldstr "class NonGenericDerived4 GenMoreDerived.MyGenFunc()" - ldloc.0 - ldloc.1 - ldloc.2 - ldloc.3 - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - .method public static bool RunTest_MoreDerived5() noinlining - { - .locals init (string res1, string res2, string res3, string res4) - - newobj instance void class GenMoreDerived::.ctor() - ldloca.s 0 - callvirt instance class IB class GenBaseType::GenToNonGen(string&) - pop - - newobj instance void class GenMoreDerived::.ctor() - ldloca.s 1 - callvirt instance class IGenToNonGen1> class GenMiddleType::GenToNonGen(string&) - pop - - newobj instance void class GenMoreDerived::.ctor() - ldloca.s 2 - callvirt instance class IGenToNonGen3 class GenTestType::GenToNonGen(string&) - pop - - newobj instance void class GenMoreDerived::.ctor() - ldloca.s 3 - callvirt instance class GenToNonGen3 class GenMoreDerived::GenToNonGen(string&) - pop - - ldstr "class GenToNonGen3 GenMoreDerived.GenToNonGen()" - ldloc.0 - ldloc.1 - ldloc.2 - ldloc.3 - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - .method public static bool RunTest_MoreDerived6() noinlining - { - .locals init (string res1, string res2, string res3, string res4) - - newobj instance void class GenMoreDerived::.ctor() - ldloca.s 0 - callvirt instance class IB class GenBaseType::NonGenThroughGenFunc(string&) - pop - - newobj instance void class GenMoreDerived::.ctor() - ldloca.s 1 - callvirt instance class INonGenThroughGen2 class GenMiddleType::NonGenThroughGenFunc(string&) - pop - - newobj instance void class GenMoreDerived::.ctor() - ldloca.s 2 - callvirt instance class INonGenThroughGen4 class GenTestType::NonGenThroughGenFunc(string&) - pop - - newobj instance void class GenMoreDerived::.ctor() - ldloca.s 3 - callvirt instance class NonGenThroughGen4 class GenMoreDerived::NonGenThroughGenFunc(string&) - pop - - ldstr "class NonGenThroughGen4 GenMoreDerived.NonGenThroughGenFunc()" - ldloc.0 - ldloc.1 - ldloc.2 - ldloc.3 - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - - // ===================================================================================== // - - .method public static void RunTest_Invalid1() noinlining - { - newobj instance void class Invalid1::.ctor() - call void [System.Console]System.Console::WriteLine(object) - ret - } - - .method public static void RunTest_Invalid2() noinlining - { - newobj instance void class Invalid2::.ctor() - call void [System.Console]System.Console::WriteLine(object) - ret - } - - .method public static void RunTest_Invalid3() noinlining - { - newobj instance void class Invalid3::.ctor() - callvirt instance class IVariant class Invalid3::MultiLevelGenericVariantFunc() - pop - ret - } - // ===================================================================================== // - - .method public hidebysig static int32 Main( string[] args) cil managed - { - .entrypoint - .maxstack 2 - .locals init ( bool result ) - - ldc.i4.1 - stloc.0 - - T1: - call bool CMain::RunTest1() - brtrue.s T2 - ldc.i4.0 - stloc.0 - - T2: - call bool CMain::RunTest2() - brtrue.s T3 - ldc.i4.0 - stloc.0 - - T3: - call bool CMain::RunTest3() - brtrue.s T4 - ldc.i4.0 - stloc.0 - - T4: - call bool CMain::RunTest4() - brtrue.s T5 - ldc.i4.0 - stloc.0 - - T5: - call bool CMain::RunTest5() - brtrue.s T6 - ldc.i4.0 - stloc.0 - - T6: - call bool CMain::RunTest6() - brtrue.s T7 - ldc.i4.0 - stloc.0 - - T7: - call bool CMain::RunTest7() - brtrue.s T8 - ldc.i4.0 - stloc.0 - - T8: - call bool CMain::RunTest8() - brtrue.s T9 - ldc.i4.0 - stloc.0 - - T9: - call bool CMain::RunTest9() - brtrue.s M1 - ldc.i4.0 - stloc.0 - - // ===================================================================================== // - - M1: - call bool CMain::RunTest_Middle1() - brtrue.s M2 - ldc.i4.0 - stloc.0 - - M2: - call bool CMain::RunTest_Middle2() - brtrue.s M3 - ldc.i4.0 - stloc.0 - - M3: - call bool CMain::RunTest_Middle3() - brtrue.s M4 - ldc.i4.0 - stloc.0 - - M4: - call bool CMain::RunTest_Middle4() - brtrue.s MOREDERIVED1 - ldc.i4.0 - stloc.0 - - // ===================================================================================== // - - MOREDERIVED1: - call bool CMain::RunTest_MoreDerived1() - brtrue.s MOREDERIVED2 - ldc.i4.0 - stloc.0 - - MOREDERIVED2: - call bool CMain::RunTest_MoreDerived2() - brtrue.s MOREDERIVED3 - ldc.i4.0 - stloc.0 - - MOREDERIVED3: - call bool CMain::RunTest_MoreDerived3() - brtrue.s MOREDERIVED4 - ldc.i4.0 - stloc.0 - - MOREDERIVED4: - call bool CMain::RunTest_MoreDerived4() - brtrue.s MOREDERIVED5 - ldc.i4.0 - stloc.0 - - MOREDERIVED5: - call bool CMain::RunTest_MoreDerived5() - brtrue.s MOREDERIVED6 - ldc.i4.0 - stloc.0 - - MOREDERIVED6: - call bool CMain::RunTest_MoreDerived6() - brtrue.s INVALID1 - ldc.i4.0 - stloc.0 - - // ===================================================================================== // - - INVALID1: - .try - { - call void CMain::RunTest_Invalid1() - ldc.i4.0 - stloc.0 - ldstr "FAIL: did not catch expected TypeLoadException when loading Invalid1." - call void [System.Console]System.Console::WriteLine(string) - leave.s INVALID2 - } - catch [mscorlib]System.TypeLoadException - { - ldstr "Caught expected TypeLoadException:" - call void [System.Console]System.Console::WriteLine(string) - call void [System.Console]System.Console::WriteLine(object) - leave.s INVALID2 - } - - INVALID2: - .try - { - call void CMain::RunTest_Invalid2() - ldc.i4.0 - stloc.0 - ldstr "FAIL: did not catch expected TypeLoadException when loading Invalid2." - call void [System.Console]System.Console::WriteLine(string) - leave.s INVALID3 - } - catch [mscorlib]System.TypeLoadException - { - ldstr "Caught expected TypeLoadException:" - call void [System.Console]System.Console::WriteLine(string) - call void [System.Console]System.Console::WriteLine(object) - leave.s INVALID3 - } - - INVALID3: - .try - { - call void CMain::RunTest_Invalid3() - ldc.i4.0 - stloc.0 - ldstr "FAIL: did not catch expected TypeLoadException when loading DerivedClassFail1." - call void [System.Console]System.Console::WriteLine(string) - leave.s DONE - } - catch [mscorlib]System.TypeLoadException - { - ldstr "Caught expected TypeLoadException:" - call void [System.Console]System.Console::WriteLine(string) - call void [System.Console]System.Console::WriteLine(object) - leave.s DONE - } - - // ===================================================================================== // - - DONE: - ldloc.0 - brtrue.s PASS - - ldstr "Test FAILED" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.s 101 - ret - - PASS: - ldstr "Test PASSED" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - - ldc.i4.s 100 - ret - } - - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - .maxstack 8 - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/CompatibleWithTest.ilproj b/src/coreclr/tests/src/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/CompatibleWithTest.ilproj deleted file mode 100644 index 2a6c4198b627..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/CompatibleWithTest.ilproj +++ /dev/null @@ -1,10 +0,0 @@ - - - Exe - BuildAndRun - 0 - - - - - diff --git a/src/coreclr/tests/src/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/UnitTest.il b/src/coreclr/tests/src/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/UnitTest.il deleted file mode 100644 index ec1022254d0f..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/UnitTest.il +++ /dev/null @@ -1,1392 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } -.assembly extern System.Runtime { } -.assembly extern mscorlib { } -.assembly UnitTest { } - -// ======================================================================================== -// Types that will be used as return types on the various methods -// ======================================================================================== - -.class public auto ansi beforefieldinit A -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } -} -.class public auto ansi beforefieldinit B extends A -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } -} -.class public auto ansi beforefieldinit C extends B -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } -} - -.class public auto ansi beforefieldinit GenRetType -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } -} -.class public auto ansi beforefieldinit Dictionary -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } -} - -.class public auto ansi beforefieldinit GenDerive1 extends class GenRetType -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } -} -.class public auto ansi beforefieldinit GenDerive2 extends class GenDerive1> -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } -} -.class public auto ansi beforefieldinit GenDerive3 extends class GenDerive2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } -} - -.class public auto ansi beforefieldinit NonGenericDerived1 extends class GenRetType -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } -} -.class public auto ansi beforefieldinit NonGenericDerived2 extends class NonGenericDerived1 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } -} -.class public auto ansi beforefieldinit NonGenericDerived3 extends class NonGenericDerived2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } -} -.class public auto ansi beforefieldinit NonGenericDerived4 extends NonGenericDerived3 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } -} - -.class public auto ansi beforefieldinit GenToNonGen1 extends C -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } -} -.class public auto ansi beforefieldinit GenToNonGen2 extends class GenToNonGen1> -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } -} -.class public auto ansi beforefieldinit GenToNonGen3 extends class GenToNonGen2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } -} - - -.class public auto ansi beforefieldinit NonGenThroughGen1 extends C -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } -} -.class public auto ansi beforefieldinit NonGenThroughGen2 extends class NonGenThroughGen1> -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } -} -.class public auto ansi beforefieldinit NonGenThroughGen3 extends class NonGenThroughGen2 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } -} -.class public auto ansi beforefieldinit NonGenThroughGen4 extends NonGenThroughGen3 -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } -} - - -// ======================================================================================== -// Main base type with various virtual methods that will be overriden later -// ======================================================================================== - -.class public auto ansi beforefieldinit GenBaseType -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } - - .method public hidebysig newslot virtual instance object MyFunc(string& res) - { - ldarg.1 - ldstr "object GenBaseType.MyFunc()" - stind.ref - newobj instance void A::.ctor() - ret - } - .method public hidebysig newslot virtual instance class B MyFunc(string& res) - { - ldarg.1 - ldstr "B GenBaseType.MyFunc()" - stind.ref - newobj instance void B::.ctor() - ret - } - .method public hidebysig newslot virtual instance class B GenToNonGen(string& res) - { - ldarg.1 - ldstr "B GenBaseType.GenToNonGen()" - stind.ref - newobj instance void B::.ctor() - ret - } - .method public hidebysig newslot virtual instance class B NonGenThroughGenFunc(string& res) - { - ldarg.1 - ldstr "B GenBaseType.NonGenThroughGenFunc()" - stind.ref - newobj instance void B::.ctor() - ret - } - .method public hidebysig newslot virtual instance class GenRetType MyGenFunc(string& res) - { - ldarg.1 - ldstr "GenRetType GenBaseType.MyGenFunc()" - stind.ref - newobj instance void class GenRetType::.ctor() - ret - } - .method public hidebysig newslot virtual instance class GenRetType> MyGenFunc(string& res) - { - ldarg.1 - ldstr "GenRetType> GenBaseType.MyGenFunc()" - stind.ref - newobj instance void class GenRetType>::.ctor() - ret - } -} - -// ======================================================================================== -// SECOND LAYER type: overrides *SOME* virtuals on GenBaseType using MethodImpls with -// covariant return types (more derived return types) -// ======================================================================================== - -.class public auto ansi beforefieldinit GenMiddleType extends class GenBaseType -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } - - .method public hidebysig newslot virtual instance class NonGenThroughGen2 NonGenThroughGenFunc(string& res) - { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.PreserveBaseOverridesAttribute::.ctor() = (01 00 00 00) - .override method instance class B class GenBaseType::NonGenThroughGenFunc(string& res) - ldarg.1 - ldstr "NonGenThroughGen2 GenMiddleType.NonGenThroughGenFunc()" - stind.ref - ldnull - ret - } - - .method public hidebysig newslot virtual instance class GenToNonGen1> GenToNonGen(string& res) - { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.PreserveBaseOverridesAttribute::.ctor() = (01 00 00 00) - .override method instance class B class GenBaseType::GenToNonGen(string& res) - ldarg.1 - ldstr "GenToNonGen1> GenMiddleType.GenToNonGen()" - stind.ref - ldnull - ret - } - - .method public hidebysig newslot virtual instance class NonGenericDerived1 MyGenFunc(string& res) - { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.PreserveBaseOverridesAttribute::.ctor() = (01 00 00 00) - .override method instance class GenRetType class GenBaseType::MyGenFunc(string& res) - ldarg.1 - ldstr "NonGenericDerived1 GenMiddleType.MyGenFunc()" - stind.ref - ldnull - ret - } - - .method public hidebysig newslot virtual instance class GenDerive1> MyGenFunc(string& res) - { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.PreserveBaseOverridesAttribute::.ctor() = (01 00 00 00) - .override method instance class GenRetType> class GenBaseType::MyGenFunc(string& res) - ldarg.1 - ldstr "GenDerive1> GenMiddleType.MyGenFunc()" - stind.ref - ldnull - ret - } -} - - -// ======================================================================================== -// THIRD LAYER type: overrides all virtuals from GenBaseType using MethodImpls with -// covariant return types (more derived return types than the ones used in GenMiddleType) -// ======================================================================================== - -.class public auto ansi beforefieldinit GenTestType extends class GenMiddleType -{ - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } - - .method public hidebysig newslot virtual instance class NonGenThroughGen4 NonGenThroughGenFunc(string& res) - { - .override method instance class B class GenBaseType::NonGenThroughGenFunc(string& res) - ldarg.1 - ldstr "NonGenThroughGen4 TestType.NonGenThroughGenFunc()" - stind.ref - ldnull - ret - } - - .method public hidebysig newslot virtual instance class GenToNonGen3 GenToNonGen(string& res) - { - .override method instance class B class GenBaseType::GenToNonGen(string& res) - ldarg.1 - ldstr "GenToNonGen3 TestType.GenToNonGen()" - stind.ref - ldnull - ret - } - - .method public hidebysig newslot virtual instance class NonGenericDerived4 MyGenFunc(string& res) - { - .override method instance class GenRetType class GenBaseType::MyGenFunc(string& res) - ldarg.1 - ldstr "NonGenericDerived4 TestType.MyGenFunc()" - stind.ref - ldnull - ret - } - - .method public hidebysig newslot virtual instance class GenDerive3 MyGenFunc(string& res) - { - .override method instance class GenRetType> class GenBaseType::MyGenFunc(string& res) - ldarg.1 - ldstr "GenDerive3 TestType.MyGenFunc()" - stind.ref - ldnull - ret - } - - .method public hidebysig newslot virtual instance class GenRetType MyFunc(string& res) - { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.PreserveBaseOverridesAttribute::.ctor() = (01 00 00 00) - .override method instance object class GenBaseType::MyFunc(string& res) - ldarg.1 - ldstr "GenRetType TestType.MyFunc()" - stind.ref - ldnull - ret - } - - .method public hidebysig newslot virtual instance class C MyFunc(string& res) - { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.PreserveBaseOverridesAttribute::.ctor() = (01 00 00 00) - .override method instance class B class GenBaseType::MyFunc(string& res) - ldarg.1 - ldstr "C TestType.MyFunc()" - stind.ref - ldnull - ret - } - - // ======================================================================================== - // Set of implicit overrides that should be ignored given there are explicit overrides from the MethodImpls - // ======================================================================================== - .method public hidebysig virtual instance class B NonGenThroughGenFunc(string& res) - { - ldstr "Should never execute this method" - newobj instance void [System.Runtime]System.Exception::.ctor(string) - throw - } - - .method public hidebysig virtual instance class B GenToNonGen(string& res) - { - ldstr "Should never execute this method" - newobj instance void [System.Runtime]System.Exception::.ctor(string) - throw - } - - .method public hidebysig virtual instance class GenRetType MyGenFunc(string& res) - { - ldstr "Should never execute this method" - newobj instance void [System.Runtime]System.Exception::.ctor(string) - throw - } - - .method public hidebysig virtual instance class GenRetType> MyGenFunc(string& res) - { - ldstr "Should never execute this method" - newobj instance void [System.Runtime]System.Exception::.ctor(string) - throw - } - - .method public hidebysig virtual instance object MyFunc(string& res) - { - ldstr "Should never execute this method" - newobj instance void [System.Runtime]System.Exception::.ctor(string) - throw - } - - .method public hidebysig virtual instance class B MyFunc(string& res) - { - ldstr "Should never execute this method" - newobj instance void [System.Runtime]System.Exception::.ctor(string) - throw - } -} - - -// ======================================================================================== -// FOURTH LAYER type: implicitly overrides all MethodImpls from GenTestType -// ======================================================================================== - -.class public auto ansi beforefieldinit ImplicitOverrideToMethodImpls extends class GenTestType -{ - .method public hidebysig virtual instance class NonGenThroughGen4 NonGenThroughGenFunc(string& res) - { - ldarg.1 - ldstr "NonGenThroughGen4 ImplicitOverrideToMethodImpls.NonGenThroughGenFunc()" - stind.ref - ldnull - ret - } - - .method public hidebysig virtual instance class GenToNonGen3 GenToNonGen(string& res) - { - ldarg.1 - ldstr "GenToNonGen3 ImplicitOverrideToMethodImpls.GenToNonGen()" - stind.ref - ldnull - ret - } - - .method public hidebysig virtual instance class NonGenericDerived4 MyGenFunc(string& res) - { - ldarg.1 - ldstr "NonGenericDerived4 ImplicitOverrideToMethodImpls.MyGenFunc()" - stind.ref - ldnull - ret - } - - .method public hidebysig virtual instance class GenDerive3 MyGenFunc(string& res) - { - ldarg.1 - ldstr "GenDerive3 ImplicitOverrideToMethodImpls.MyGenFunc()" - stind.ref - ldnull - ret - } - - .method public hidebysig virtual instance class GenRetType MyFunc(string& res) - { - ldarg.1 - ldstr "GenRetType ImplicitOverrideToMethodImpls.MyFunc()" - stind.ref - ldnull - ret - } - - .method public hidebysig virtual instance class C MyFunc(string& res) - { - ldarg.1 - ldstr "C ImplicitOverrideToMethodImpls.MyFunc()" - stind.ref - ldnull - ret - } - - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } -} - -// ======================================================================================== -// FOURTH LAYER type: overrides all MethodImpls from GenTestType using MethodImpls with the -// same return type used in GetTestType -// ======================================================================================== - -.class public auto ansi beforefieldinit ExplicitOverrideToMethodImpls extends class GenTestType -{ - .method public hidebysig virtual instance class NonGenThroughGen4 NonGenThroughGenFunc_MethodImpl(string& res) - { - .override method instance class NonGenThroughGen4 class GenTestType::NonGenThroughGenFunc(string& res) - ldarg.1 - ldstr "NonGenThroughGen4 ExplicitOverrideToMethodImpls.NonGenThroughGenFunc()" - stind.ref - ldnull - ret - } - - .method public hidebysig virtual instance class GenToNonGen3 GenToNonGen_MethodImpl(string& res) - { - .override method instance class GenToNonGen3 class GenTestType::GenToNonGen(string& res) - ldarg.1 - ldstr "GenToNonGen3 ExplicitOverrideToMethodImpls.GenToNonGen()" - stind.ref - ldnull - ret - } - - .method public hidebysig virtual instance class NonGenericDerived4 MyGenFunc_MethodImpl(string& res) - { - .override method instance class NonGenericDerived4 class GenTestType::MyGenFunc(string& res) - ldarg.1 - ldstr "NonGenericDerived4 ExplicitOverrideToMethodImpls.MyGenFunc()" - stind.ref - ldnull - ret - } - - .method public hidebysig virtual instance class GenDerive3 MyGenFunc_MethodImpl(string& res) - { - .override method instance class GenDerive3 class GenTestType::MyGenFunc(string& res) - ldarg.1 - ldstr "GenDerive3 ExplicitOverrideToMethodImpls.MyGenFunc()" - stind.ref - ldnull - ret - } - - .method public hidebysig virtual instance class GenRetType MyFunc_MethodImpl(string& res) - { - .override method instance class GenRetType class GenTestType::MyFunc(string& res) - ldarg.1 - ldstr "GenRetType ExplicitOverrideToMethodImpls.MyFunc()" - stind.ref - ldnull - ret - } - - .method public hidebysig virtual instance class C MyFunc_MethodImpl(string& res) - { - .override method instance class C class GenTestType::MyFunc(string& res) - ldarg.1 - ldstr "C ExplicitOverrideToMethodImpls.MyFunc()" - stind.ref - ldnull - ret - } - - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } -} - -// ======================================================================================== - -.class public auto ansi beforefieldinit CMain extends [mscorlib]System.Object -{ - .method private hidebysig static bool CheckResults ( - string expected, - string a, - [opt] string b, - [opt] string c, - [opt] string d) cil managed - { - .param [3] = nullref - .param [4] = nullref - .param [5] = nullref - // Method begins at RVA 0x20a0 - // Code size 164 (0xa4) - .maxstack 2 - .locals /* 11000002 */ init ( - [0] bool - ) - - IL_0000: ldarg.1 - IL_0001: ldarg.0 - IL_0002: call bool [System.Runtime]System.String::op_Equality(string, string) /* 0A000012 */ - IL_0007: stloc.0 - IL_0008: ldstr "EXPECTED: " /* 70000001 */ - IL_000d: ldarg.0 - IL_000e: call string [System.Runtime]System.String::Concat(string, string) /* 0A000013 */ - IL_0013: call void [System.Console]System.Console::WriteLine(string) /* 0A000014 */ - IL_0018: ldstr "ACTUAL1 : " /* 70000017 */ - IL_001d: ldarg.1 - IL_001e: call string [System.Runtime]System.String::Concat(string, string) /* 0A000013 */ - IL_0023: call void [System.Console]System.Console::WriteLine(string) /* 0A000014 */ - IL_0028: ldarg.2 - IL_0029: call bool [System.Runtime]System.String::IsNullOrEmpty(string) /* 0A000015 */ - IL_002e: brtrue.s IL_004e - - IL_0030: ldstr "ACTUAL2 : " /* 7000002D */ - IL_0035: ldarg.2 - IL_0036: call string [System.Runtime]System.String::Concat(string, string) /* 0A000013 */ - IL_003b: call void [System.Console]System.Console::WriteLine(string) /* 0A000014 */ - IL_0040: ldloc.0 - IL_0041: brfalse.s IL_004c - - IL_0043: ldarg.2 - IL_0044: ldarg.0 - IL_0045: call bool [System.Runtime]System.String::op_Equality(string, string) /* 0A000012 */ - IL_004a: br.s IL_004d - - IL_004c: ldc.i4.0 - - IL_004d: stloc.0 - - IL_004e: ldarg.3 - IL_004f: call bool [System.Runtime]System.String::IsNullOrEmpty(string) /* 0A000015 */ - IL_0054: brtrue.s IL_0074 - - IL_0056: ldstr "ACTUAL3 : " /* 70000043 */ - IL_005b: ldarg.3 - IL_005c: call string [System.Runtime]System.String::Concat(string, string) /* 0A000013 */ - IL_0061: call void [System.Console]System.Console::WriteLine(string) /* 0A000014 */ - IL_0066: ldloc.0 - IL_0067: brfalse.s IL_0072 - - IL_0069: ldarg.3 - IL_006a: ldarg.0 - IL_006b: call bool [System.Runtime]System.String::op_Equality(string, string) /* 0A000012 */ - IL_0070: br.s IL_0073 - - IL_0072: ldc.i4.0 - - IL_0073: stloc.0 - - IL_0074: ldarg.s d - IL_0076: call bool [System.Runtime]System.String::IsNullOrEmpty(string) /* 0A000015 */ - IL_007b: brtrue.s IL_009d - - IL_007d: ldstr "ACTUAL4 : " /* 70000059 */ - IL_0082: ldarg.s d - IL_0084: call string [System.Runtime]System.String::Concat(string, string) /* 0A000013 */ - IL_0089: call void [System.Console]System.Console::WriteLine(string) /* 0A000014 */ - IL_008e: ldloc.0 - IL_008f: brfalse.s IL_009b - - IL_0091: ldarg.s d - IL_0093: ldarg.0 - IL_0094: call bool [System.Runtime]System.String::op_Equality(string, string) /* 0A000012 */ - IL_0099: br.s IL_009c - - IL_009b: ldc.i4.0 - - IL_009c: stloc.0 - - IL_009d: call void [System.Console]System.Console::WriteLine() /* 0A000016 */ - IL_00a2: ldloc.0 - IL_00a3: ret - } // end of method Program::CheckResults - - // ============== Test using GenTestType ============== // - // These test methods will callvirt each method using: - // 1) The signature from GetBaseType - // 2) The signature from GenMiddleType with covariant returns (when applicable) - // 3) The signature from GenTestType with covariant returns - // And verify that the override on GetTestType is the one that executes - - .method public static bool RunTest1() noinlining - { - .locals init (string res1, string res2, string res3) - - newobj instance void class GenTestType::.ctor() - ldloca.s 0 - callvirt instance object class GenBaseType::MyFunc(string&) - pop - - newobj instance void class GenTestType::.ctor() - ldloca.s 1 - callvirt instance class GenRetType class GenTestType::MyFunc(string&) - pop - - ldstr "GenRetType TestType.MyFunc()" - ldloc.0 - ldloc.1 - ldloc.2 - ldnull - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - .method public static bool RunTest2() noinlining - { - .locals init (string res1, string res2, string res3) - - newobj instance void class GenTestType::.ctor() - ldloca.s 0 - callvirt instance class B class GenBaseType::MyFunc(string&) - pop - - newobj instance void class GenTestType::.ctor() - ldloca.s 1 - callvirt instance class C class GenTestType::MyFunc(string&) - pop - - ldstr "C TestType.MyFunc()" - ldloc.0 - ldloc.1 - ldloc.2 - ldnull - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - .method public static bool RunTest3() noinlining - { - .locals init (string res1, string res2, string res3) - - newobj instance void class GenTestType::.ctor() - ldloca.s 0 - callvirt instance class GenRetType> class GenBaseType::MyGenFunc(string&) - pop - - newobj instance void class GenTestType::.ctor() - ldloca.s 1 - callvirt instance class GenDerive1> class GenMiddleType::MyGenFunc(string&) - pop - - newobj instance void class GenTestType::.ctor() - ldloca.s 2 - callvirt instance class GenDerive3 class GenTestType::MyGenFunc(string&) - pop - - ldstr "GenDerive3 TestType.MyGenFunc()" - ldloc.0 - ldloc.1 - ldloc.2 - ldnull - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - .method public static bool RunTest4() noinlining - { - .locals init (string res1, string res2, string res3) - - newobj instance void class GenTestType::.ctor() - ldloca.s 0 - callvirt instance class GenRetType class GenBaseType::MyGenFunc(string&) - pop - - newobj instance void class GenTestType::.ctor() - ldloca.s 1 - callvirt instance class NonGenericDerived1 class GenMiddleType::MyGenFunc(string&) - pop - - newobj instance void class GenTestType::.ctor() - ldloca.s 2 - callvirt instance class NonGenericDerived4 class GenTestType::MyGenFunc(string&) - pop - - ldstr "NonGenericDerived4 TestType.MyGenFunc()" - ldloc.0 - ldloc.1 - ldloc.2 - ldnull - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - .method public static bool RunTest5() noinlining - { - .locals init (string res1, string res2, string res3) - - newobj instance void class GenTestType::.ctor() - ldloca.s 0 - callvirt instance class B class GenBaseType::GenToNonGen(string&) - pop - - newobj instance void class GenTestType::.ctor() - ldloca.s 1 - callvirt instance class GenToNonGen1> class GenMiddleType::GenToNonGen(string&) - pop - - newobj instance void class GenTestType::.ctor() - ldloca.s 2 - callvirt instance class GenToNonGen3 class GenTestType::GenToNonGen(string&) - pop - - ldstr "GenToNonGen3 TestType.GenToNonGen()" - ldloc.0 - ldloc.1 - ldloc.2 - ldnull - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - .method public static bool RunTest6() noinlining - { - .locals init (string res1, string res2, string res3) - - newobj instance void class GenTestType::.ctor() - ldloca.s 0 - callvirt instance class B class GenBaseType::NonGenThroughGenFunc(string&) - pop - - newobj instance void class GenTestType::.ctor() - ldloca.s 1 - callvirt instance class NonGenThroughGen2 class GenMiddleType::NonGenThroughGenFunc(string&) - pop - - newobj instance void class GenTestType::.ctor() - ldloca.s 2 - callvirt instance class NonGenThroughGen4 class GenTestType::NonGenThroughGenFunc(string&) - pop - - ldstr "NonGenThroughGen4 TestType.NonGenThroughGenFunc()" - ldloc.0 - ldloc.1 - ldloc.2 - ldnull - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - // ============== Test using ImplicitOverrideToMethodImpls ============== // - // These test methods will callvirt each method using: - // 1) The signature from GetBaseType - // 2) The signature from GenMiddleType with covariant returns (when applicable) - // 3) The signature from GenTestType with covariant returns - // 4) The signature from ImplicitOverrideToMethodImpls - // And verify that the override on ImplicitOverrideToMethodImpls is the one that executes - - .method public static bool RunTest_ImplicitOverride1() noinlining - { - .locals init (string res1, string res2, string res3, string res4) - - newobj instance void class ImplicitOverrideToMethodImpls::.ctor() - ldloca.s 0 - callvirt instance object class GenBaseType::MyFunc(string&) - pop - - newobj instance void class ImplicitOverrideToMethodImpls::.ctor() - ldloca.s 1 - callvirt instance class GenRetType class GenTestType::MyFunc(string&) - pop - - newobj instance void class ImplicitOverrideToMethodImpls::.ctor() - ldloca.s 2 - callvirt instance class GenRetType class ImplicitOverrideToMethodImpls::MyFunc(string&) - pop - - ldstr "GenRetType ImplicitOverrideToMethodImpls.MyFunc()" - ldloc.0 - ldloc.1 - ldloc.2 - ldloc.3 - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - .method public static bool RunTest_ImplicitOverride2() noinlining - { - .locals init (string res1, string res2, string res3, string res4) - - newobj instance void class ImplicitOverrideToMethodImpls::.ctor() - ldloca.s 0 - callvirt instance class B class GenBaseType::MyFunc(string&) - pop - - newobj instance void class ImplicitOverrideToMethodImpls::.ctor() - ldloca.s 1 - callvirt instance class C class GenTestType::MyFunc(string&) - pop - - newobj instance void class ImplicitOverrideToMethodImpls::.ctor() - ldloca.s 2 - callvirt instance class C class ImplicitOverrideToMethodImpls::MyFunc(string&) - pop - - ldstr "C ImplicitOverrideToMethodImpls.MyFunc()" - ldloc.0 - ldloc.1 - ldloc.2 - ldloc.3 - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - .method public static bool RunTest_ImplicitOverride3() noinlining - { - .locals init (string res1, string res2, string res3, string res4) - - newobj instance void class ImplicitOverrideToMethodImpls::.ctor() - ldloca.s 0 - callvirt instance class GenRetType> class GenBaseType::MyGenFunc(string&) - pop - - newobj instance void class ImplicitOverrideToMethodImpls::.ctor() - ldloca.s 1 - callvirt instance class GenDerive1> class GenMiddleType::MyGenFunc(string&) - pop - - newobj instance void class ImplicitOverrideToMethodImpls::.ctor() - ldloca.s 2 - callvirt instance class GenDerive3 class GenTestType::MyGenFunc(string&) - pop - - newobj instance void class ImplicitOverrideToMethodImpls::.ctor() - ldloca.s 3 - callvirt instance class GenDerive3 class ImplicitOverrideToMethodImpls::MyGenFunc(string&) - pop - - ldstr "GenDerive3 ImplicitOverrideToMethodImpls.MyGenFunc()" - ldloc.0 - ldloc.1 - ldloc.2 - ldloc.3 - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - .method public static bool RunTest_ImplicitOverride4() noinlining - { - .locals init (string res1, string res2, string res3, string res4) - - newobj instance void class ImplicitOverrideToMethodImpls::.ctor() - ldloca.s 0 - callvirt instance class GenRetType class GenBaseType::MyGenFunc(string&) - pop - - newobj instance void class ImplicitOverrideToMethodImpls::.ctor() - ldloca.s 1 - callvirt instance class NonGenericDerived1 class GenMiddleType::MyGenFunc(string&) - pop - - newobj instance void class ImplicitOverrideToMethodImpls::.ctor() - ldloca.s 2 - callvirt instance class NonGenericDerived4 class GenTestType::MyGenFunc(string&) - pop - - newobj instance void class ImplicitOverrideToMethodImpls::.ctor() - ldloca.s 3 - callvirt instance class NonGenericDerived4 class ImplicitOverrideToMethodImpls::MyGenFunc(string&) - pop - - ldstr "NonGenericDerived4 ImplicitOverrideToMethodImpls.MyGenFunc()" - ldloc.0 - ldloc.1 - ldloc.2 - ldloc.3 - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - .method public static bool RunTest_ImplicitOverride5() noinlining - { - .locals init (string res1, string res2, string res3, string res4) - - newobj instance void class ImplicitOverrideToMethodImpls::.ctor() - ldloca.s 0 - callvirt instance class B class GenBaseType::GenToNonGen(string&) - pop - - newobj instance void class ImplicitOverrideToMethodImpls::.ctor() - ldloca.s 1 - callvirt instance class GenToNonGen1> class GenMiddleType::GenToNonGen(string&) - pop - - newobj instance void class ImplicitOverrideToMethodImpls::.ctor() - ldloca.s 2 - callvirt instance class GenToNonGen3 class GenTestType::GenToNonGen(string&) - pop - - newobj instance void class ImplicitOverrideToMethodImpls::.ctor() - ldloca.s 3 - callvirt instance class GenToNonGen3 class ImplicitOverrideToMethodImpls::GenToNonGen(string&) - pop - - ldstr "GenToNonGen3 ImplicitOverrideToMethodImpls.GenToNonGen()" - ldloc.0 - ldloc.1 - ldloc.2 - ldloc.3 - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - .method public static bool RunTest_ImplicitOverride6() noinlining - { - .locals init (string res1, string res2, string res3, string res4) - - newobj instance void class ImplicitOverrideToMethodImpls::.ctor() - ldloca.s 0 - callvirt instance class B class GenBaseType::NonGenThroughGenFunc(string&) - pop - - newobj instance void class ImplicitOverrideToMethodImpls::.ctor() - ldloca.s 1 - callvirt instance class NonGenThroughGen2 class GenMiddleType::NonGenThroughGenFunc(string&) - pop - - newobj instance void class ImplicitOverrideToMethodImpls::.ctor() - ldloca.s 2 - callvirt instance class NonGenThroughGen4 class GenTestType::NonGenThroughGenFunc(string&) - pop - - newobj instance void class ImplicitOverrideToMethodImpls::.ctor() - ldloca.s 3 - callvirt instance class NonGenThroughGen4 class ImplicitOverrideToMethodImpls::NonGenThroughGenFunc(string&) - pop - - ldstr "NonGenThroughGen4 ImplicitOverrideToMethodImpls.NonGenThroughGenFunc()" - ldloc.0 - ldloc.1 - ldloc.2 - ldloc.3 - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - // ============== Test using ExplicitOverrideToMethodImpls ============== // - // These test methods will callvirt each method using: - // 1) The signature from GetBaseType - // 2) The signature from GenMiddleType with covariant returns (when applicable) - // 3) The signature from GenTestType with covariant returns - // 4) The signature from ExplicitOverrideToMethodImpls - // And verify that the override on ExplicitOverrideToMethodImpls is the one that executes - - .method public static bool RunTest_ExplicitOverride1() noinlining - { - .locals init (string res1, string res2, string res3, string res4) - - newobj instance void class ExplicitOverrideToMethodImpls::.ctor() - ldloca.s 0 - callvirt instance object class GenBaseType::MyFunc(string&) - pop - - newobj instance void class ExplicitOverrideToMethodImpls::.ctor() - ldloca.s 1 - callvirt instance class GenRetType class GenTestType::MyFunc(string&) - pop - - newobj instance void class ExplicitOverrideToMethodImpls::.ctor() - ldloca.s 2 - callvirt instance class GenRetType class ExplicitOverrideToMethodImpls::MyFunc(string&) - pop - - ldstr "GenRetType ExplicitOverrideToMethodImpls.MyFunc()" - ldloc.0 - ldloc.1 - ldloc.2 - ldloc.3 - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - .method public static bool RunTest_ExplicitOverride2() noinlining - { - .locals init (string res1, string res2, string res3, string res4) - - newobj instance void class ExplicitOverrideToMethodImpls::.ctor() - ldloca.s 0 - callvirt instance class B class GenBaseType::MyFunc(string&) - pop - - newobj instance void class ExplicitOverrideToMethodImpls::.ctor() - ldloca.s 1 - callvirt instance class C class GenTestType::MyFunc(string&) - pop - - newobj instance void class ExplicitOverrideToMethodImpls::.ctor() - ldloca.s 2 - callvirt instance class C class ExplicitOverrideToMethodImpls::MyFunc(string&) - pop - - ldstr "C ExplicitOverrideToMethodImpls.MyFunc()" - ldloc.0 - ldloc.1 - ldloc.2 - ldloc.3 - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - .method public static bool RunTest_ExplicitOverride3() noinlining - { - .locals init (string res1, string res2, string res3, string res4) - - newobj instance void class ExplicitOverrideToMethodImpls::.ctor() - ldloca.s 0 - callvirt instance class GenRetType> class GenBaseType::MyGenFunc(string&) - pop - - newobj instance void class ExplicitOverrideToMethodImpls::.ctor() - ldloca.s 1 - callvirt instance class GenDerive1> class GenMiddleType::MyGenFunc(string&) - pop - - newobj instance void class ExplicitOverrideToMethodImpls::.ctor() - ldloca.s 2 - callvirt instance class GenDerive3 class GenTestType::MyGenFunc(string&) - pop - - newobj instance void class ExplicitOverrideToMethodImpls::.ctor() - ldloca.s 3 - callvirt instance class GenDerive3 class ExplicitOverrideToMethodImpls::MyGenFunc(string&) - pop - - ldstr "GenDerive3 ExplicitOverrideToMethodImpls.MyGenFunc()" - ldloc.0 - ldloc.1 - ldloc.2 - ldloc.3 - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - .method public static bool RunTest_ExplicitOverride4() noinlining - { - .locals init (string res1, string res2, string res3, string res4) - - newobj instance void class ExplicitOverrideToMethodImpls::.ctor() - ldloca.s 0 - callvirt instance class GenRetType class GenBaseType::MyGenFunc(string&) - pop - - newobj instance void class ExplicitOverrideToMethodImpls::.ctor() - ldloca.s 1 - callvirt instance class NonGenericDerived1 class GenMiddleType::MyGenFunc(string&) - pop - - newobj instance void class ExplicitOverrideToMethodImpls::.ctor() - ldloca.s 2 - callvirt instance class NonGenericDerived4 class GenTestType::MyGenFunc(string&) - pop - - newobj instance void class ExplicitOverrideToMethodImpls::.ctor() - ldloca.s 3 - callvirt instance class NonGenericDerived4 class ExplicitOverrideToMethodImpls::MyGenFunc(string&) - pop - - ldstr "NonGenericDerived4 ExplicitOverrideToMethodImpls.MyGenFunc()" - ldloc.0 - ldloc.1 - ldloc.2 - ldloc.3 - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - .method public static bool RunTest_ExplicitOverride5() noinlining - { - .locals init (string res1, string res2, string res3, string res4) - - newobj instance void class ExplicitOverrideToMethodImpls::.ctor() - ldloca.s 0 - callvirt instance class B class GenBaseType::GenToNonGen(string&) - pop - - newobj instance void class ExplicitOverrideToMethodImpls::.ctor() - ldloca.s 1 - callvirt instance class GenToNonGen1> class GenMiddleType::GenToNonGen(string&) - pop - - newobj instance void class ExplicitOverrideToMethodImpls::.ctor() - ldloca.s 2 - callvirt instance class GenToNonGen3 class GenTestType::GenToNonGen(string&) - pop - - newobj instance void class ExplicitOverrideToMethodImpls::.ctor() - ldloca.s 3 - callvirt instance class GenToNonGen3 class ExplicitOverrideToMethodImpls::GenToNonGen(string&) - pop - - ldstr "GenToNonGen3 ExplicitOverrideToMethodImpls.GenToNonGen()" - ldloc.0 - ldloc.1 - ldloc.2 - ldloc.3 - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - .method public static bool RunTest_ExplicitOverride6() noinlining - { - .locals init (string res1, string res2, string res3, string res4) - - newobj instance void class ExplicitOverrideToMethodImpls::.ctor() - ldloca.s 0 - callvirt instance class B class GenBaseType::NonGenThroughGenFunc(string&) - pop - - newobj instance void class ExplicitOverrideToMethodImpls::.ctor() - ldloca.s 1 - callvirt instance class NonGenThroughGen2 class GenMiddleType::NonGenThroughGenFunc(string&) - pop - - newobj instance void class ExplicitOverrideToMethodImpls::.ctor() - ldloca.s 2 - callvirt instance class NonGenThroughGen4 class GenTestType::NonGenThroughGenFunc(string&) - pop - - newobj instance void class ExplicitOverrideToMethodImpls::.ctor() - ldloca.s 3 - callvirt instance class NonGenThroughGen4 class ExplicitOverrideToMethodImpls::NonGenThroughGenFunc(string&) - pop - - ldstr "NonGenThroughGen4 ExplicitOverrideToMethodImpls.NonGenThroughGenFunc()" - ldloc.0 - ldloc.1 - ldloc.2 - ldloc.3 - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - // ============== Test using GenMiddleType ============== // - // These test methods will callvirt each method using: - // 1) The signature from GetBaseType - // 2) The signature from GenMiddleType with covariant returns - // And verify that the override on GenMiddleType is the one that executes - - .method public static bool RunTest_Middle1() noinlining - { - .locals init (string res1, string res2, string res3) - - newobj instance void class GenMiddleType::.ctor() - ldloca.s 0 - callvirt instance class GenRetType> class GenBaseType::MyGenFunc(string&) - pop - - newobj instance void class GenMiddleType::.ctor() - ldloca.s 1 - callvirt instance class GenDerive1> class GenMiddleType::MyGenFunc(string&) - pop - - ldstr "GenDerive1> GenMiddleType.MyGenFunc()" - ldloc.0 - ldloc.1 - ldloc.2 - ldnull - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - .method public static bool RunTest_Middle2() noinlining - { - .locals init (string res1, string res2, string res3) - - newobj instance void class GenMiddleType::.ctor() - ldloca.s 0 - callvirt instance class GenRetType class GenBaseType::MyGenFunc(string&) - pop - - newobj instance void class GenMiddleType::.ctor() - ldloca.s 1 - callvirt instance class NonGenericDerived1 class GenMiddleType::MyGenFunc(string&) - pop - - ldstr "NonGenericDerived1 GenMiddleType.MyGenFunc()" - ldloc.0 - ldloc.1 - ldloc.2 - ldnull - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - .method public static bool RunTest_Middle3() noinlining - { - .locals init (string res1, string res2, string res3) - - newobj instance void class GenMiddleType::.ctor() - ldloca.s 0 - callvirt instance class B class GenBaseType::GenToNonGen(string&) - pop - - newobj instance void class GenMiddleType::.ctor() - ldloca.s 1 - callvirt instance class GenToNonGen1> class GenMiddleType::GenToNonGen(string&) - pop - - ldstr "GenToNonGen1> GenMiddleType.GenToNonGen()" - ldloc.0 - ldloc.1 - ldloc.2 - ldnull - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - .method public static bool RunTest_Middle4() noinlining - { - .locals init (string res1, string res2, string res3) - - newobj instance void class GenMiddleType::.ctor() - ldloca.s 0 - callvirt instance class B class GenBaseType::NonGenThroughGenFunc(string&) - pop - - newobj instance void class GenMiddleType::.ctor() - ldloca.s 1 - callvirt instance class NonGenThroughGen2 class GenMiddleType::NonGenThroughGenFunc(string&) - pop - - ldstr "NonGenThroughGen2 GenMiddleType.NonGenThroughGenFunc()" - ldloc.0 - ldloc.1 - ldloc.2 - ldnull - call bool CMain::CheckResults(string,string,string,string,string) - ret - } - - // ===================================================================================== // - - .method public hidebysig static int32 Main( string[] args) cil managed - { - .entrypoint - .maxstack 2 - .locals init ( bool result ) - - ldc.i4.1 - stloc.0 - - T1: - call bool CMain::RunTest1() - brtrue.s T2 - ldc.i4.0 - stloc.0 - - T2: - call bool CMain::RunTest2() - brtrue.s T3 - ldc.i4.0 - stloc.0 - - T3: - call bool CMain::RunTest3() - brtrue.s T4 - ldc.i4.0 - stloc.0 - - T4: - call bool CMain::RunTest4() - brtrue.s T5 - ldc.i4.0 - stloc.0 - - T5: - call bool CMain::RunTest5() - brtrue.s T6 - ldc.i4.0 - stloc.0 - - T6: - call bool CMain::RunTest6() - brtrue.s M1 - ldc.i4.0 - stloc.0 - - // ===================================================================================== // - - M1: - call bool CMain::RunTest_Middle1() - brtrue.s M2 - ldc.i4.0 - stloc.0 - - M2: - call bool CMain::RunTest_Middle2() - brtrue.s M3 - ldc.i4.0 - stloc.0 - - M3: - call bool CMain::RunTest_Middle3() - brtrue.s M4 - ldc.i4.0 - stloc.0 - - M4: - call bool CMain::RunTest_Middle4() - brtrue.s IMP_OVERRIDE1 - ldc.i4.0 - stloc.0 - - // ===================================================================================== // - - IMP_OVERRIDE1: - call bool CMain::RunTest_ImplicitOverride1() - brtrue.s IMP_OVERRIDE2 - ldc.i4.0 - stloc.0 - - IMP_OVERRIDE2: - call bool CMain::RunTest_ImplicitOverride2() - brtrue.s IMP_OVERRIDE3 - ldc.i4.0 - stloc.0 - - IMP_OVERRIDE3: - call bool CMain::RunTest_ImplicitOverride3() - brtrue.s IMP_OVERRIDE4 - ldc.i4.0 - stloc.0 - - IMP_OVERRIDE4: - call bool CMain::RunTest_ImplicitOverride4() - brtrue.s IMP_OVERRIDE5 - ldc.i4.0 - stloc.0 - - IMP_OVERRIDE5: - call bool CMain::RunTest_ImplicitOverride5() - brtrue.s IMP_OVERRIDE6 - ldc.i4.0 - stloc.0 - - IMP_OVERRIDE6: - call bool CMain::RunTest_ImplicitOverride6() - brtrue.s EXP_OVERRIDE1 - ldc.i4.0 - stloc.0 - - // ===================================================================================== // - - EXP_OVERRIDE1: - call bool CMain::RunTest_ExplicitOverride1() - brtrue.s EXP_OVERRIDE2 - ldc.i4.0 - stloc.0 - - EXP_OVERRIDE2: - call bool CMain::RunTest_ExplicitOverride2() - brtrue.s EXP_OVERRIDE3 - ldc.i4.0 - stloc.0 - - EXP_OVERRIDE3: - call bool CMain::RunTest_ExplicitOverride3() - brtrue.s EXP_OVERRIDE4 - ldc.i4.0 - stloc.0 - - EXP_OVERRIDE4: - call bool CMain::RunTest_ExplicitOverride4() - brtrue.s EXP_OVERRIDE5 - ldc.i4.0 - stloc.0 - - EXP_OVERRIDE5: - call bool CMain::RunTest_ExplicitOverride5() - brtrue.s EXP_OVERRIDE6 - ldc.i4.0 - stloc.0 - - EXP_OVERRIDE6: - call bool CMain::RunTest_ExplicitOverride6() - brtrue.s DONE - ldc.i4.0 - stloc.0 - - // ===================================================================================== // - - DONE: - ldloc.0 - brtrue.s PASS - - ldstr "Test FAILED" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.s 101 - ret - - PASS: - ldstr "Test PASSED" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.s 100 - ret - - ldc.i4.s 100 - ret - } - - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed - { - .maxstack 8 - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/MethodImpl/Desktop/override_override1.il b/src/coreclr/tests/src/Loader/classloader/MethodImpl/Desktop/override_override1.il deleted file mode 100644 index 576ce94a1b10..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/MethodImpl/Desktop/override_override1.il +++ /dev/null @@ -1,155 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// MyFoo is a normal reference type with virtual method DoFoo() -// MyBar is a normal reference type that extends MyFoo. -// MyBar::DoBar explicitly overrides MyFoo::DoFoo -// MyBar::DoBarOverride explicitly overrides MyBar::DoBar -// Expect TypeLoadException when loading MyBar because on override is being overriden. - -.assembly extern mscorlib{} -.assembly override_override1{} - - -.class public auto ansi beforefieldinit MyFoo{ - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method MyFoo::.ctor - - .method public hidebysig newslot virtual instance int32 DoFoo(){ - .maxstack 2 - ldstr "In MyFoo::DoFoo" - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.3 - ret - } - -} -.class public auto ansi beforefieldinit MyBar - extends MyFoo -{ - .method public hidebysig newslot virtual - instance int32 DoBar() - { - .maxstack 1 - .override MyFoo::DoFoo - .locals init (int32 V_0) - IL_0000: ldstr "In MyBar.DoBar" - IL_0005: call void [mscorlib]System.Console::WriteLine(string) - IL_000a: ldc.i4.4 - IL_000b: stloc.0 - IL_000c: br.s IL_000e - - IL_000e: ldloc.0 - IL_000f: ret - } // end of method MyBar::DoBar - - - .method public hidebysig newslot virtual - instance int32 DoBarOverride() - { - // Code size 16 (0x10) - .maxstack 1 - .override MyBar::DoBar - .locals init (int32 V_0) - IL_0000: ldstr "In MyBar.DoBarOverride" - IL_0005: call void [mscorlib]System.Console::WriteLine(string) - IL_000a: ldc.i4.5 - IL_000b: stloc.0 - IL_000c: br.s IL_000e - - IL_000e: ldloc.0 - IL_000f: ret - } - - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void MyFoo::.ctor() - IL_0006: ret - } // end of method MyBar::.ctor - -} // end of class MyBar - -.class public auto ansi beforefieldinit CMain - extends [mscorlib]System.Object -{ - - .method public static int32 Go(){ - .maxstack 8 - .locals init (class MyFoo V_1) - newobj instance void MyBar::.ctor() - stloc.0 - ldloc.0 - callvirt instance int32 MyFoo::DoFoo() - ret - } - - .method public hidebysig static int32 Main(string[] args) cil managed - { - .entrypoint - // Code size 43 (0x2b) - .maxstack 2 - .locals init (bool V_0, - int32 V_2) - - IL_0000: ldc.i4.1 - IL_0001: stloc.0 - .try{ - call int32 CMain::Go() - pop - ldc.i4.0 - stloc.0 // pass=false because we shouldn't have returned from CMain::Go, expected TypeLoadException - ldstr "FAIL: did not catch expected TypeLoadException when loading MyBar." - call void [mscorlib]System.Console::WriteLine(string) - leave.s L1 - } - catch [mscorlib]System.TypeLoadException{ - ldstr "Caught expected TypeLoadException:" - call void [mscorlib]System.Console::WriteLine(string) - call void [mscorlib]System.Console::WriteLine(object) - leave.s L1 - } - - L1: - IL_001d: ldloc.0 - IL_001e: brtrue.s IL_0024 - - IL_0020: ldc.i4.s 101 - stloc.1 - ldstr "FAIL" - call void [mscorlib]System.Console::WriteLine(string) - IL_0022: br.s IL_0029 - - IL_0024: ldc.i4.s 100 - IL_0026: stloc.1 - ldstr "PASS" - call void [mscorlib]System.Console::WriteLine(string) - IL_0027: br.s IL_0029 - - IL_0029: ldloc.1 - IL_002a: ret - } // end of method CMain::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method CMain::.ctor - -} // end of class CMain diff --git a/src/coreclr/tests/src/Loader/classloader/MethodImpl/Desktop/self_override1.il b/src/coreclr/tests/src/Loader/classloader/MethodImpl/Desktop/self_override1.il deleted file mode 100644 index 3e543ca7bb1b..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/MethodImpl/Desktop/self_override1.il +++ /dev/null @@ -1,169 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// MyBar is an abstract class which declares an abstract method MyBar::DoBar(). -// MyBar also DoSelfBar() that explicitly overrides DoBar(). -// BarImpl extends MyBar and also overrides DoBar(). -// Expect that b.DoBar() will invoke BarImpl::DoBar() if called virtually, whether b is a BarImpl reference -// or a MyBar reference. Expect that b.DoBar() will invoke MyBar::DoSelfBar() if b is -// a MyBar reference and DoBar() is invoke non-virtually. - -.assembly extern mscorlib{} -.assembly self_override1{} - -.class public abstract auto ansi beforefieldinit MyBar - extends [mscorlib]System.Object -{ - .method public hidebysig newslot abstract virtual - instance int32 DoBar() cil managed - { - } // end of method MyBar::DoBar - - .method public hidebysig virtual instance int32 - DoSelfBar() cil managed - { - .override MyBar::DoBar - .maxstack 1 - .locals init (int32 V_0) - IL_0000: ldstr "In MyBar.DoSelfBar" - IL_0005: call void [mscorlib]System.Console::WriteLine(string) - IL_000a: ldc.i4.1 - IL_000b: stloc.0 - IL_000c: br.s IL_000e - - IL_000e: ldloc.0 - IL_000f: ret - } // end of method BarImpl::DoBar - - - .method family hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method MyBar::.ctor - -} // end of class MyBar - -.class public auto ansi beforefieldinit BarImpl - extends MyBar -{ - .method public hidebysig virtual instance int32 - DoBar() cil managed - { - // Code size 16 (0x10) - .maxstack 1 - .locals init (int32 V_0) - IL_0000: ldstr "In BarImpl.DoBar" - IL_0005: call void [mscorlib]System.Console::WriteLine(string) - IL_000a: ldc.i4.2 - IL_000b: stloc.0 - IL_000c: br.s IL_000e - - IL_000e: ldloc.0 - IL_000f: ret - } // end of method BarImpl::DoBar - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void MyBar::.ctor() - IL_0006: ret - } // end of method BarImpl::.ctor - -} // end of class BarImpl - -.class public auto ansi beforefieldinit CMain - extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main(string[] args) cil managed - { - .entrypoint - // Code size 66 (0x42) - .maxstack 2 - .locals init (bool V_0, - class BarImpl V_1, - class MyBar V_2, - int32 V_3) - - - // Invoke b.DoBar() virtually where b is a BarImpl reference. - IL_0000: ldc.i4.1 - IL_0001: stloc.0 - IL_0002: newobj instance void BarImpl::.ctor() - IL_0007: stloc.1 - IL_0008: ldc.i4.2 - IL_0009: ldloc.1 - IL_000a: callvirt instance int32 MyBar::DoBar() - IL_000f: beq.s IL_001d - - IL_0011: ldstr "FAIL: expected BarImpl.DoBar to execute, but anoth" - + "er method was executed instead." - IL_0016: call void [mscorlib]System.Console::WriteLine(string) - IL_001b: ldc.i4.0 - IL_001c: stloc.0 - - // Invoke b.DoBar() virtually where b is a MyBar reference. - IL_001d: ldloc.1 - IL_001e: stloc.2 - IL_001f: ldc.i4.2 - IL_0020: ldloc.2 - IL_0021: callvirt instance int32 MyBar::DoBar() - IL_0026: beq.s IL_0033b - IL_0028: ldstr "FAIL: expected BarImpl.DoBar to execute, but ano" - + "ther method was executed instead." - IL_002d: call void [mscorlib]System.Console::WriteLine(string) - IL_0032: ldc.i4.0 - IL_0033: stloc.0 - - - // Invoke b.DoBar() non-virtually where b is a MyBar reference. - IL_0033b: ldc.i4.1 - ldloc.2 - call instance int32 MyBar::DoBar() - beq.s IL_0034 - ldstr "FAIL: expected MyBar.DoSelfBar to execute, but ano" - + "ther method was executed instead." - call void [mscorlib]System.Console::WriteLine(string) - ldc.i4.0 - stloc.0 - - // return a status - IL_0034: ldloc.0 - IL_0035: brtrue.s IL_003b - - IL_0037: ldc.i4.s 101 - stloc.3 - ldstr "FAIL" - call void [mscorlib]System.Console::WriteLine(string) - IL_0039: br.s IL_0040 - - IL_003b: ldc.i4.s 100 - IL_003d: stloc.3 - ldstr "PASS" - call void [mscorlib]System.Console::WriteLine(string) - IL_003e: br.s IL_0040 - - IL_0040: ldloc.3 - IL_0041: ret - } // end of method CMain::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method CMain::.ctor - -} // end of class CMain - diff --git a/src/coreclr/tests/src/Loader/classloader/MethodImpl/Desktop/self_override3.il b/src/coreclr/tests/src/Loader/classloader/MethodImpl/Desktop/self_override3.il deleted file mode 100644 index 758369d2d7da..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/MethodImpl/Desktop/self_override3.il +++ /dev/null @@ -1,129 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// MyBar is a normal reference type. -// MyBar::DoSelfBar explicitly overrides MyBar::DoBar -// DoSelfBar has a different signature than DoBar. -// Expect TypeLoadException when loading MyBar. - -.assembly extern mscorlib{} -.assembly self_override3{} - -.class public auto ansi beforefieldinit MyBar - extends [mscorlib]System.Object -{ - .method public hidebysig newslot virtual - instance int32 DoBar() - { - .maxstack 1 - .locals init (int32 V_0) - IL_0000: ldstr "In MyBar.DoBar" - IL_0005: call void [mscorlib]System.Console::WriteLine(string) - IL_000a: ldc.i4.4 - IL_000b: stloc.0 - IL_000c: br.s IL_000e - - IL_000e: ldloc.0 - IL_000f: ret - } // end of method MyBar::DoBar - - .method public hidebysig newslot virtual - instance int32 DoSelfBar(int32 i) - { - // Code size 16 (0x10) - .maxstack 1 - .override MyBar::DoBar - .locals init (int32 V_0) - IL_0000: ldstr "In MyBar.DoSelfBar" - IL_0005: call void [mscorlib]System.Console::WriteLine(string) - IL_000a: ldc.i4.5 - IL_000b: stloc.0 - IL_000c: br.s IL_000e - - IL_000e: ldloc.0 - IL_000f: ret - } - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method MyBar::.ctor - -} // end of class MyBar - -.class public auto ansi beforefieldinit CMain - extends [mscorlib]System.Object -{ - - .method public static int32 Go(){ - .maxstack 8 - .locals init (class MyBar V_1) - newobj instance void MyBar::.ctor() - stloc.0 - ldloc.0 - callvirt instance int32 MyBar::DoBar() - ret - } - - .method public hidebysig static int32 Main(string[] args) cil managed - { - .entrypoint - // Code size 43 (0x2b) - .maxstack 2 - .locals init (bool V_0, int32 V_2) - - IL_0000: ldc.i4.1 - IL_0001: stloc.0 - .try{ - call int32 CMain::Go() - pop - ldc.i4.0 - stloc.0 // pass=false because we shouldn't have returned from CMain::Go, expected TypeLoadException - ldstr "FAIL: did not catch expected TypeLoadException when loading MyBar." - call void [mscorlib]System.Console::WriteLine(string) - leave.s L1 - } - catch [mscorlib]System.TypeLoadException{ - ldstr "Caught expected TypeLoadException:" - call void [mscorlib]System.Console::WriteLine(string) - call void [mscorlib]System.Console::WriteLine(object) - leave.s L1 - } - - L1: - IL_001d: ldloc.0 - IL_001e: brtrue.s IL_0024 - - IL_0020: ldc.i4.s 101 - stloc.1 - ldstr "FAIL" - call void [mscorlib]System.Console::WriteLine(string) - IL_0022: br.s IL_0029 - - IL_0024: ldc.i4.s 100 - IL_0026: stloc.1 - ldstr "PASS" - call void [mscorlib]System.Console::WriteLine(string) - IL_0027: br.s IL_0029 - - IL_0029: ldloc.1 - IL_002a: ret - } // end of method CMain::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method CMain::.ctor - -} // end of class CMain diff --git a/src/coreclr/tests/src/Loader/classloader/MethodImpl/override_override1.il b/src/coreclr/tests/src/Loader/classloader/MethodImpl/override_override1.il deleted file mode 100644 index c891e329bd9b..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/MethodImpl/override_override1.il +++ /dev/null @@ -1,156 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } -// MyFoo is a normal reference type with virtual method DoFoo() -// MyBar is a normal reference type that extends MyFoo. -// MyBar::DoBar explicitly overrides MyFoo::DoFoo -// MyBar::DoBarOverride explicitly overrides MyBar::DoBar -// Expect TypeLoadException when loading MyBar because on override is being overriden. - -.assembly extern mscorlib{} -.assembly override_override1{} - - -.class public auto ansi beforefieldinit MyFoo{ - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method MyFoo::.ctor - - .method public hidebysig newslot virtual instance int32 DoFoo(){ - .maxstack 2 - ldstr "In MyFoo::DoFoo" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.3 - ret - } - -} -.class public auto ansi beforefieldinit MyBar - extends MyFoo -{ - .method public hidebysig newslot virtual - instance int32 DoBar() - { - .maxstack 1 - .override MyFoo::DoFoo - .locals init (int32 V_0) - IL_0000: ldstr "In MyBar.DoBar" - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: ldc.i4.4 - IL_000b: stloc.0 - IL_000c: br.s IL_000e - - IL_000e: ldloc.0 - IL_000f: ret - } // end of method MyBar::DoBar - - - .method public hidebysig newslot virtual - instance int32 DoBarOverride() - { - // Code size 16 (0x10) - .maxstack 1 - .override MyBar::DoBar - .locals init (int32 V_0) - IL_0000: ldstr "In MyBar.DoBarOverride" - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: ldc.i4.5 - IL_000b: stloc.0 - IL_000c: br.s IL_000e - - IL_000e: ldloc.0 - IL_000f: ret - } - - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void MyFoo::.ctor() - IL_0006: ret - } // end of method MyBar::.ctor - -} // end of class MyBar - -.class public auto ansi beforefieldinit CMain - extends [mscorlib]System.Object -{ - - .method public static int32 Go() noinlining { - .maxstack 8 - .locals init (class MyFoo V_1) - newobj instance void MyBar::.ctor() - stloc.0 - ldloc.0 - callvirt instance int32 MyFoo::DoFoo() - ret - } - - .method public hidebysig static int32 Main(string[] args) cil managed - { - .entrypoint - // Code size 43 (0x2b) - .maxstack 2 - .locals init (bool V_0, - int32 V_2) - - IL_0000: ldc.i4.1 - IL_0001: stloc.0 - .try{ - call int32 CMain::Go() - pop - ldc.i4.0 - stloc.0 // pass=false because we shouldn't have returned from CMain::Go, expected TypeLoadException - ldstr "FAIL: did not catch expected TypeLoadException when loading MyBar." - call void [System.Console]System.Console::WriteLine(string) - leave.s L1 - } - catch [mscorlib]System.TypeLoadException{ - ldstr "Caught expected TypeLoadException:" - call void [System.Console]System.Console::WriteLine(string) - call void [System.Console]System.Console::WriteLine(object) - leave.s L1 - } - - L1: - IL_001d: ldloc.0 - IL_001e: brtrue.s IL_0024 - - IL_0020: ldc.i4.s 101 - stloc.1 - ldstr "FAIL" - call void [System.Console]System.Console::WriteLine(string) - IL_0022: br.s IL_0029 - - IL_0024: ldc.i4.s 100 - IL_0026: stloc.1 - ldstr "PASS" - call void [System.Console]System.Console::WriteLine(string) - IL_0027: br.s IL_0029 - - IL_0029: ldloc.1 - IL_002a: ret - } // end of method CMain::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method CMain::.ctor - -} // end of class CMain diff --git a/src/coreclr/tests/src/Loader/classloader/MethodImpl/self_override1.il b/src/coreclr/tests/src/Loader/classloader/MethodImpl/self_override1.il deleted file mode 100644 index 9c08b4d081b1..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/MethodImpl/self_override1.il +++ /dev/null @@ -1,158 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } -// MyBar is an abstract class which declares an abstract method MyBar::DoBar(). -// MyBar also DoSelfBar() that explicitly overrides DoBar(). -// BarImpl extends MyBar and also overrides DoBar(). -// Expect that b.DoBar() will invoke BarImpl::DoBar() if called virtually, whether b is a BarImpl reference -// or a MyBar reference. - -.assembly extern mscorlib{} -.assembly self_override1{} - -.class public abstract auto ansi beforefieldinit MyBar - extends [mscorlib]System.Object -{ - .method public hidebysig newslot abstract virtual - instance int32 DoBar() cil managed - { - } // end of method MyBar::DoBar - - .method public hidebysig virtual instance int32 - DoSelfBar() cil managed - { - .override MyBar::DoBar - .maxstack 1 - .locals init (int32 V_0) - IL_0000: ldstr "In MyBar.DoSelfBar" - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: ldc.i4.1 - IL_000b: stloc.0 - IL_000c: br.s IL_000e - - IL_000e: ldloc.0 - IL_000f: ret - } // end of method BarImpl::DoBar - - - .method family hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method MyBar::.ctor - -} // end of class MyBar - -.class public auto ansi beforefieldinit BarImpl - extends MyBar -{ - .method public hidebysig virtual instance int32 - DoBar() cil managed - { - // Code size 16 (0x10) - .maxstack 1 - .locals init (int32 V_0) - IL_0000: ldstr "In BarImpl.DoBar" - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: ldc.i4.2 - IL_000b: stloc.0 - IL_000c: br.s IL_000e - - IL_000e: ldloc.0 - IL_000f: ret - } // end of method BarImpl::DoBar - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void MyBar::.ctor() - IL_0006: ret - } // end of method BarImpl::.ctor - -} // end of class BarImpl - -.class public auto ansi beforefieldinit CMain - extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main(string[] args) cil managed - { - .entrypoint - // Code size 66 (0x42) - .maxstack 2 - .locals init (bool V_0, - class BarImpl V_1, - class MyBar V_2, - int32 V_3) - - - // Invoke b.DoBar() virtually where b is a BarImpl reference. - IL_0000: ldc.i4.1 - IL_0001: stloc.0 - IL_0002: newobj instance void BarImpl::.ctor() - IL_0007: stloc.1 - IL_0008: ldc.i4.2 - IL_0009: ldloc.1 - IL_000a: callvirt instance int32 MyBar::DoBar() - IL_000f: beq.s IL_001d - - IL_0011: ldstr "FAIL: expected BarImpl.DoBar to execute, but anoth" - + "er method was executed instead." - IL_0016: call void [System.Console]System.Console::WriteLine(string) - IL_001b: ldc.i4.0 - IL_001c: stloc.0 - - // Invoke b.DoBar() virtually where b is a MyBar reference. - IL_001d: ldloc.1 - IL_001e: stloc.2 - IL_001f: ldc.i4.2 - IL_0020: ldloc.2 - IL_0021: callvirt instance int32 MyBar::DoBar() - IL_0026: beq.s IL_0034 - IL_0028: ldstr "FAIL: expected BarImpl.DoBar to execute, but ano" - + "ther method was executed instead." - IL_002d: call void [System.Console]System.Console::WriteLine(string) - IL_0032: ldc.i4.0 - IL_0033: stloc.0 - - - // return a status - IL_0034: ldloc.0 - IL_0035: brtrue.s IL_003b - - IL_0037: ldc.i4.s 101 - stloc.3 - ldstr "FAIL" - call void [System.Console]System.Console::WriteLine(string) - IL_0039: br.s IL_0040 - - IL_003b: ldc.i4.s 100 - IL_003d: stloc.3 - ldstr "PASS" - call void [System.Console]System.Console::WriteLine(string) - IL_003e: br.s IL_0040 - - IL_0040: ldloc.3 - IL_0041: ret - } // end of method CMain::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method CMain::.ctor - -} // end of class CMain - diff --git a/src/coreclr/tests/src/Loader/classloader/MethodImpl/self_override3.il b/src/coreclr/tests/src/Loader/classloader/MethodImpl/self_override3.il deleted file mode 100644 index 2b868ceb4149..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/MethodImpl/self_override3.il +++ /dev/null @@ -1,130 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } -// MyBar is a normal reference type. -// MyBar::DoSelfBar explicitly overrides MyBar::DoBar -// DoSelfBar has a different signature than DoBar. -// Expect TypeLoadException when loading MyBar. - -.assembly extern mscorlib{} -.assembly self_override3{} - -.class public auto ansi beforefieldinit MyBar - extends [mscorlib]System.Object -{ - .method public hidebysig newslot virtual - instance int32 DoBar() - { - .maxstack 1 - .locals init (int32 V_0) - IL_0000: ldstr "In MyBar.DoBar" - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: ldc.i4.4 - IL_000b: stloc.0 - IL_000c: br.s IL_000e - - IL_000e: ldloc.0 - IL_000f: ret - } // end of method MyBar::DoBar - - .method public hidebysig newslot virtual - instance int32 DoSelfBar(int32 i) - { - // Code size 16 (0x10) - .maxstack 1 - .override MyBar::DoBar - .locals init (int32 V_0) - IL_0000: ldstr "In MyBar.DoSelfBar" - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: ldc.i4.5 - IL_000b: stloc.0 - IL_000c: br.s IL_000e - - IL_000e: ldloc.0 - IL_000f: ret - } - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method MyBar::.ctor - -} // end of class MyBar - -.class public auto ansi beforefieldinit CMain - extends [mscorlib]System.Object -{ - - .method public static int32 Go(){ - .maxstack 8 - .locals init (class MyBar V_1) - newobj instance void MyBar::.ctor() - stloc.0 - ldloc.0 - callvirt instance int32 MyBar::DoBar() - ret - } - - .method public hidebysig static int32 Main(string[] args) cil managed - { - .entrypoint - // Code size 43 (0x2b) - .maxstack 2 - .locals init (bool V_0, int32 V_2) - - IL_0000: ldc.i4.1 - IL_0001: stloc.0 - .try{ - call int32 CMain::Go() - pop - ldc.i4.0 - stloc.0 // pass=false because we shouldn't have returned from CMain::Go, expected TypeLoadException - ldstr "FAIL: did not catch expected TypeLoadException when loading MyBar." - call void [System.Console]System.Console::WriteLine(string) - leave.s L1 - } - catch [mscorlib]System.TypeLoadException{ - ldstr "Caught expected TypeLoadException:" - call void [System.Console]System.Console::WriteLine(string) - call void [System.Console]System.Console::WriteLine(object) - leave.s L1 - } - - L1: - IL_001d: ldloc.0 - IL_001e: brtrue.s IL_0024 - - IL_0020: ldc.i4.s 101 - stloc.1 - ldstr "FAIL" - call void [System.Console]System.Console::WriteLine(string) - IL_0022: br.s IL_0029 - - IL_0024: ldc.i4.s 100 - IL_0026: stloc.1 - ldstr "PASS" - call void [System.Console]System.Console::WriteLine(string) - IL_0027: br.s IL_0029 - - IL_0029: ldloc.1 - IL_002a: ret - } // end of method CMain::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method CMain::.ctor - -} // end of class CMain diff --git a/src/coreclr/tests/src/Loader/classloader/SequentialLayout/Regress/217070/t1.il b/src/coreclr/tests/src/Loader/classloader/SequentialLayout/Regress/217070/t1.il deleted file mode 100644 index 97338a6af753..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/SequentialLayout/Regress/217070/t1.il +++ /dev/null @@ -1,51 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } -.assembly extern mscorlib { } -.assembly typeload { } - -.class public main extends [mscorlib]System.Object -{ - .class sequential sealed nested private NumberNode - extends [mscorlib]System.ValueType - { - .field public int32 i - .field public valuetype main/NumberNode[] next - } - - .method public static int32 Main() - { - .entrypoint - .locals init (valuetype main/NumberNode[] V_0, - class [mscorlib]System.Exception V_1, - int32 V_2) - .try - { - ldc.i4.1 - newarr main/NumberNode - stloc.0 - - ldstr "PASS" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.s 100 - stloc.2 - leave.s end - } - catch [mscorlib]System.Exception - { - stloc.1 - ldstr "{0}Caught unexpected exception." - ldloc.1 - call void [System.Console]System.Console::WriteLine(string,object) - ldstr "FAIL" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.s 101 - stloc.2 - leave.s end - } - end: ldloc.2 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/SequentialLayout/Regress/217070/t2.il b/src/coreclr/tests/src/Loader/classloader/SequentialLayout/Regress/217070/t2.il deleted file mode 100644 index ab16fd7acbbb..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/SequentialLayout/Regress/217070/t2.il +++ /dev/null @@ -1,52 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } -.assembly extern mscorlib { } -.assembly typeload { } -.class sequential sealed public NumberNode - extends [mscorlib]System.ValueType -{ - .field public int32 i - .field public valuetype NumberNode[] next -} - -.class public main extends [mscorlib]System.Object -{ - - .method public static int32 Main() - { - .entrypoint - .locals init (valuetype NumberNode[] V_0, - class [mscorlib]System.Exception V_1, - int32 V_2) - - .try - { - ldc.i4.1 - newarr NumberNode - stloc.0 - - ldstr "PASS" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.s 100 - stloc.2 - leave.s end - } - catch [mscorlib]System.Exception - { - stloc.1 - ldstr "{0}Caught unexpected exception." - ldloc.1 - call void [System.Console]System.Console::WriteLine(string,object) - ldstr "FAIL" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.s 101 - stloc.2 - leave.s end - } - end: ldloc.2 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/TSAmbiguities/CollapsedInterfaces/HelloWorld.il b/src/coreclr/tests/src/Loader/classloader/TSAmbiguities/CollapsedInterfaces/HelloWorld.il deleted file mode 100644 index 97bb1c41f1b9..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/TSAmbiguities/CollapsedInterfaces/HelloWorld.il +++ /dev/null @@ -1,666 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } - -// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.20512.0 -// Copyright (c) Microsoft Corporation. All rights reserved. - - - -// Metadata version: v4.0.20512 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly HelloWorld -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module HelloWorld.exe -// MVID: {ED3BD1E6-3FBD-4590-8CC8-2B84D3A177C9} -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x00990000 - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class private auto ansi beforefieldinit HelloWorld - extends [mscorlib]System.Object -{ - .method private hidebysig static int32 - Main(string[] args) cil managed - { - .entrypoint - // Code size 337 (0x151) - .maxstack 3 - .locals init (bool V_0, - class [mscorlib]System.Reflection.MethodInfo V_1, - object[] V_2, - class TypeTestAttribute V_3, - class [mscorlib]System.Type V_4, - int32 V_5, - class [mscorlib]System.Reflection.MethodInfo[] V_6, - int32 V_7, - bool V_8) - IL_0000: nop - IL_0001: ldc.i4.1 - IL_0002: stloc.0 - IL_0003: nop - IL_0004: ldtoken HelloWorld - IL_0009: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_000e: ldc.i4.s 24 - IL_0010: callvirt instance class [mscorlib]System.Reflection.MethodInfo[] [mscorlib]System.Type::GetMethods(valuetype [mscorlib]System.Reflection.BindingFlags) - IL_0015: stloc.s V_6 - IL_0017: ldc.i4.0 - IL_0018: stloc.s V_7 - IL_001a: br IL_0128 - - IL_001f: ldloc.s V_6 - IL_0021: ldloc.s V_7 - IL_0023: ldelem.ref - IL_0024: stloc.1 - IL_0025: nop - IL_0026: ldloc.1 - IL_0027: ldtoken TypeTestAttribute - IL_002c: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_0031: ldc.i4.0 - IL_0032: callvirt instance object[] [mscorlib]System.Reflection.MemberInfo::GetCustomAttributes(class [mscorlib]System.Type, - bool) - IL_0037: stloc.2 - IL_0038: ldloc.2 - IL_0039: ldlen - IL_003a: conv.i4 - IL_003b: ldc.i4.1 - IL_003c: clt - IL_003e: stloc.s V_8 - IL_0040: ldloc.s V_8 - IL_0042: brtrue IL_0121 - - IL_0047: nop - IL_0048: ldloc.2 - IL_0049: ldc.i4.0 - IL_004a: ldelem.ref - IL_004b: castclass TypeTestAttribute - IL_0050: stloc.3 - IL_0051: ldstr "TEST {0}:" - IL_0056: ldloc.1 - IL_0057: callvirt instance string [mscorlib]System.Reflection.MemberInfo::get_Name() - IL_005c: call void [System.Console]System.Console::WriteLine(string, - object) - IL_0061: nop - IL_0062: ldstr " -> Instantiation : " - IL_0067: ldloc.3 - IL_0068: ldfld string TypeTestAttribute::instantiation - IL_006d: call string [mscorlib]System.String::Concat(string, - string) - IL_0072: call void [System.Console]System.Console::WriteLine(string) - IL_0077: nop - IL_0078: ldstr " -> Should fail : " - IL_007d: ldloc.3 - IL_007e: ldfld bool TypeTestAttribute::shouldFail - IL_0083: box [mscorlib]System.Boolean - IL_0088: call string [mscorlib]System.String::Concat(object, - object) - IL_008d: call void [System.Console]System.Console::WriteLine(string) - IL_0092: nop - .try - { - IL_0093: nop - IL_0094: ldloc.1 - IL_0095: ldnull - IL_0096: ldc.i4.0 - IL_0097: newarr [mscorlib]System.Object - IL_009c: callvirt instance object [mscorlib]System.Reflection.MethodBase::Invoke(object, - object[]) - IL_00a1: castclass [mscorlib]System.Type - IL_00a6: stloc.s V_4 - IL_00a8: ldstr " + TYPE LOADED" - IL_00ad: call void [System.Console]System.Console::WriteLine(string) - IL_00b2: nop - IL_00b3: ldloc.3 - IL_00b4: ldfld bool TypeTestAttribute::shouldFail - IL_00b9: ldc.i4.0 - IL_00ba: ceq - IL_00bc: stloc.s V_8 - IL_00be: ldloc.s V_8 - IL_00c0: brtrue.s IL_00d3 - - IL_00c2: nop - IL_00c3: ldstr " + TEST FAILED!\n\n" - IL_00c8: call void [System.Console]System.Console::WriteLine(string) - IL_00cd: nop - IL_00ce: ldc.i4.0 - IL_00cf: stloc.0 - IL_00d0: nop - IL_00d1: br.s IL_00de - - IL_00d3: ldstr " + TEST PASSED!\n\n" - IL_00d8: call void [System.Console]System.Console::WriteLine(string) - IL_00dd: nop - IL_00de: nop - IL_00df: leave.s IL_0119 - - } // end .try - catch [mscorlib]System.Object - { - IL_00e1: pop - IL_00e2: nop - IL_00e3: ldstr " + TYPE NOT LOADED" - IL_00e8: call void [System.Console]System.Console::WriteLine(string) - IL_00ed: nop - IL_00ee: ldloc.3 - IL_00ef: ldfld bool TypeTestAttribute::shouldFail - IL_00f4: stloc.s V_8 - IL_00f6: ldloc.s V_8 - IL_00f8: brtrue.s IL_010b - - IL_00fa: nop - IL_00fb: ldstr " + TEST FAILED!\n\n" - IL_0100: call void [System.Console]System.Console::WriteLine(string) - IL_0105: nop - IL_0106: ldc.i4.0 - IL_0107: stloc.0 - IL_0108: nop - IL_0109: br.s IL_0116 - - IL_010b: ldstr " + TEST PASSED!\n\n" - IL_0110: call void [System.Console]System.Console::WriteLine(string) - IL_0115: nop - IL_0116: nop - IL_0117: leave.s IL_0119 - - } // end handler - IL_0119: nop - IL_011a: call void [System.Console]System.Console::WriteLine() - IL_011f: nop - IL_0120: nop - IL_0121: nop - IL_0122: ldloc.s V_7 - IL_0124: ldc.i4.1 - IL_0125: add - IL_0126: stloc.s V_7 - IL_0128: ldloc.s V_7 - IL_012a: ldloc.s V_6 - IL_012c: ldlen - IL_012d: conv.i4 - IL_012e: clt - IL_0130: stloc.s V_8 - IL_0132: ldloc.s V_8 - IL_0134: brtrue IL_001f - - IL_0139: ldloc.0 - IL_013a: ldc.i4.0 - IL_013b: ceq - IL_013d: stloc.s V_8 - IL_013f: ldloc.s V_8 - IL_0141: brtrue.s IL_0149 - - IL_0143: ldc.i4.s 100 - IL_0145: stloc.s V_5 - IL_0147: br.s IL_014e - - IL_0149: ldc.i4.m1 - IL_014a: stloc.s V_5 - IL_014c: br.s IL_014e - - IL_014e: ldloc.s V_5 - IL_0150: ret - } // end of method HelloWorld::Main - - .method public hidebysig static class [mscorlib]System.Type - Test_A_int_byte() cil managed - { - .custom instance void TypeTestAttribute::.ctor(string, - class [mscorlib]System.Type, - bool) = ( 01 00 0C 41 3C 69 6E 74 2C 20 62 79 74 65 3E 03 // ...A. - 41 60 32 00 00 00 ) // A`2... - // Code size 16 (0x10) - .maxstack 1 - .locals init (class [mscorlib]System.Type V_0) - IL_0000: nop - IL_0001: ldtoken class A`2 - IL_0006: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_000b: stloc.0 - IL_000c: br.s IL_000e - - IL_000e: ldloc.0 - IL_000f: ret - } // end of method HelloWorld::Test_A_int_byte - - .method public hidebysig static class [mscorlib]System.Type - Test_A_int_int() cil managed - { - .custom instance void TypeTestAttribute::.ctor(string, - class [mscorlib]System.Type, - bool) = ( 01 00 0B 41 3C 69 6E 74 2C 20 69 6E 74 3E 03 41 // ...A.A - 60 32 01 00 00 ) // `2... - // Code size 16 (0x10) - .maxstack 1 - .locals init (class [mscorlib]System.Type V_0) - IL_0000: nop - IL_0001: ldtoken class A`2 - IL_0006: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_000b: stloc.0 - IL_000c: br.s IL_000e - - IL_000e: ldloc.0 - IL_000f: ret - } // end of method HelloWorld::Test_A_int_int - - .method public hidebysig static class [mscorlib]System.Type - Test_A_string_object() cil managed - { - .custom instance void TypeTestAttribute::.ctor(string, - class [mscorlib]System.Type, - bool) = ( 01 00 11 41 3C 73 74 72 69 6E 67 2C 20 6F 62 6A // ...A.A`2... - // Code size 16 (0x10) - .maxstack 1 - .locals init (class [mscorlib]System.Type V_0) - IL_0000: nop - IL_0001: ldtoken class A`2 - IL_0006: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_000b: stloc.0 - IL_000c: br.s IL_000e - - IL_000e: ldloc.0 - IL_000f: ret - } // end of method HelloWorld::Test_A_string_object - - .method public hidebysig static class [mscorlib]System.Type - Test_A_string_string() cil managed - { - .custom instance void TypeTestAttribute::.ctor(string, - class [mscorlib]System.Type, - bool) = ( 01 00 11 41 3C 73 74 72 69 6E 67 2C 20 73 74 72 // ...A.A`2... - // Code size 16 (0x10) - .maxstack 1 - .locals init (class [mscorlib]System.Type V_0) - IL_0000: nop - IL_0001: ldtoken class A`2 - IL_0006: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_000b: stloc.0 - IL_000c: br.s IL_000e - - IL_000e: ldloc.0 - IL_000f: ret - } // end of method HelloWorld::Test_A_string_string - - .method public hidebysig static class [mscorlib]System.Type - Test_B_int_byte() cil managed - { - .custom instance void TypeTestAttribute::.ctor(string, - class [mscorlib]System.Type, - bool) = ( 01 00 0C 42 3C 69 6E 74 2C 20 62 79 74 65 3E 03 // ...B. - 42 60 32 00 00 00 ) // B`2... - // Code size 16 (0x10) - .maxstack 1 - .locals init (class [mscorlib]System.Type V_0) - IL_0000: nop - IL_0001: ldtoken class B`2 - IL_0006: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_000b: stloc.0 - IL_000c: br.s IL_000e - - IL_000e: ldloc.0 - IL_000f: ret - } // end of method HelloWorld::Test_B_int_byte - - .method public hidebysig static class [mscorlib]System.Type - Test_B_int_int() cil managed - { - .custom instance void TypeTestAttribute::.ctor(string, - class [mscorlib]System.Type, - bool) = ( 01 00 0B 42 3C 69 6E 74 2C 20 69 6E 74 3E 03 42 // ...B.B - 60 32 01 00 00 ) // `2... - // Code size 16 (0x10) - .maxstack 1 - .locals init (class [mscorlib]System.Type V_0) - IL_0000: nop - IL_0001: ldtoken class B`2 - IL_0006: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_000b: stloc.0 - IL_000c: br.s IL_000e - - IL_000e: ldloc.0 - IL_000f: ret - } // end of method HelloWorld::Test_B_int_int - - .method public hidebysig static class [mscorlib]System.Type - Test_B_string_object() cil managed - { - .custom instance void TypeTestAttribute::.ctor(string, - class [mscorlib]System.Type, - bool) = ( 01 00 11 42 3C 73 74 72 69 6E 67 2C 20 6F 62 6A // ...B.B`2... - // Code size 16 (0x10) - .maxstack 1 - .locals init (class [mscorlib]System.Type V_0) - IL_0000: nop - IL_0001: ldtoken class B`2 - IL_0006: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_000b: stloc.0 - IL_000c: br.s IL_000e - - IL_000e: ldloc.0 - IL_000f: ret - } // end of method HelloWorld::Test_B_string_object - - .method public hidebysig static class [mscorlib]System.Type - Test_B_string_string() cil managed - { - .custom instance void TypeTestAttribute::.ctor(string, - class [mscorlib]System.Type, - bool) = ( 01 00 11 42 3C 73 74 72 69 6E 67 2C 20 73 74 72 // ...B.B`2... - // Code size 16 (0x10) - .maxstack 1 - .locals init (class [mscorlib]System.Type V_0) - IL_0000: nop - IL_0001: ldtoken class B`2 - IL_0006: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_000b: stloc.0 - IL_000c: br.s IL_000e - - IL_000e: ldloc.0 - IL_000f: ret - } // end of method HelloWorld::Test_B_string_string - - .method public hidebysig static class [mscorlib]System.Type - Test_C_int_byte() cil managed - { - .custom instance void TypeTestAttribute::.ctor(string, - class [mscorlib]System.Type, - bool) = ( 01 00 0C 43 3C 69 6E 74 2C 20 62 79 74 65 3E 03 // ...C. - 43 60 32 00 00 00 ) // C`2... - // Code size 16 (0x10) - .maxstack 1 - .locals init (class [mscorlib]System.Type V_0) - IL_0000: nop - IL_0001: ldtoken class C`2 - IL_0006: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_000b: stloc.0 - IL_000c: br.s IL_000e - - IL_000e: ldloc.0 - IL_000f: ret - } // end of method HelloWorld::Test_C_int_byte - - .method public hidebysig static class [mscorlib]System.Type - Test_C_string_string() cil managed - { - .custom instance void TypeTestAttribute::.ctor(string, - class [mscorlib]System.Type, - bool) = ( 01 00 11 43 3C 73 74 72 69 6E 67 2C 20 73 74 72 // ...C.C`2... - // Code size 16 (0x10) - .maxstack 1 - .locals init (class [mscorlib]System.Type V_0) - IL_0000: nop - IL_0001: ldtoken class C`2 - IL_0006: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_000b: stloc.0 - IL_000c: br.s IL_000e - - IL_000e: ldloc.0 - IL_000f: ret - } // end of method HelloWorld::Test_C_string_string - - .method public hidebysig static class [mscorlib]System.Type - Test_C_ListInt_byte() cil managed - { - .custom instance void TypeTestAttribute::.ctor(string, - class [mscorlib]System.Type, - bool) = ( 01 00 12 43 3C 4C 69 73 74 3C 69 6E 74 3E 2C 20 // ...C, - 62 79 74 65 3E 03 43 60 32 00 00 00 ) // byte>.C`2... - // Code size 16 (0x10) - .maxstack 1 - .locals init (class [mscorlib]System.Type V_0) - IL_0000: nop - IL_0001: ldtoken class C`2,uint8> - IL_0006: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_000b: stloc.0 - IL_000c: br.s IL_000e - - IL_000e: ldloc.0 - IL_000f: ret - } // end of method HelloWorld::Test_C_ListInt_byte - - .method public hidebysig static class [mscorlib]System.Type - Test_C_ListInt_int() cil managed - { - .custom instance void TypeTestAttribute::.ctor(string, - class [mscorlib]System.Type, - bool) = ( 01 00 11 43 3C 4C 69 73 74 3C 69 6E 74 3E 2C 20 // ...C, - 69 6E 74 3E 03 43 60 32 01 00 00 ) // int>.C`2... - // Code size 16 (0x10) - .maxstack 1 - .locals init (class [mscorlib]System.Type V_0) - IL_0000: nop - IL_0001: ldtoken class C`2,int32> - IL_0006: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_000b: stloc.0 - IL_000c: br.s IL_000e - - IL_000e: ldloc.0 - IL_000f: ret - } // end of method HelloWorld::Test_C_ListInt_int - - .method public hidebysig static class [mscorlib]System.Type - Test_C_ListString_object() cil managed - { - .custom instance void TypeTestAttribute::.ctor(string, - class [mscorlib]System.Type, - bool) = ( 01 00 17 43 3C 4C 69 73 74 3C 73 74 72 69 6E 67 // ...C, object>.C`2.. - 00 ) - // Code size 16 (0x10) - .maxstack 1 - .locals init (class [mscorlib]System.Type V_0) - IL_0000: nop - IL_0001: ldtoken class C`2,object> - IL_0006: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_000b: stloc.0 - IL_000c: br.s IL_000e - - IL_000e: ldloc.0 - IL_000f: ret - } // end of method HelloWorld::Test_C_ListString_object - - .method public hidebysig static class [mscorlib]System.Type - Test_C_ListString_string() cil managed - { - .custom instance void TypeTestAttribute::.ctor(string, - class [mscorlib]System.Type, - bool) = ( 01 00 17 43 3C 4C 69 73 74 3C 73 74 72 69 6E 67 // ...C, string>.C`2.. - 00 ) - // Code size 16 (0x10) - .maxstack 1 - .locals init (class [mscorlib]System.Type V_0) - IL_0000: nop - IL_0001: ldtoken class C`2,string> - IL_0006: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_000b: stloc.0 - IL_000c: br.s IL_000e - - IL_000e: ldloc.0 - IL_000f: ret - } // end of method HelloWorld::Test_C_ListString_string - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method HelloWorld::.ctor - -} // end of class HelloWorld - -.class private auto ansi beforefieldinit TypeTestAttribute - extends [mscorlib]System.Attribute -{ - .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 40 00 00 00 00 00 ) // ..@..... - .field public initonly string instantiation - .field public initonly class [mscorlib]System.Type 'type' - .field public initonly bool shouldFail - .method public hidebysig specialname rtspecialname - instance void .ctor(string instantiation, - class [mscorlib]System.Type 'type', - bool shouldFail) cil managed - { - // Code size 31 (0x1f) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Attribute::.ctor() - IL_0006: nop - IL_0007: nop - IL_0008: ldarg.0 - IL_0009: ldarg.1 - IL_000a: stfld string TypeTestAttribute::instantiation - IL_000f: ldarg.0 - IL_0010: ldarg.2 - IL_0011: stfld class [mscorlib]System.Type TypeTestAttribute::'type' - IL_0016: ldarg.0 - IL_0017: ldarg.3 - IL_0018: stfld bool TypeTestAttribute::shouldFail - IL_001d: nop - IL_001e: ret - } // end of method TypeTestAttribute::.ctor - -} // end of class TypeTestAttribute - -.class interface private abstract auto ansi I`1 -{ - .method public hidebysig newslot abstract virtual - instance void M() cil managed - { - } // end of method I`1::M - -} // end of class I`1 - -.class private auto ansi beforefieldinit A`2 - extends [mscorlib]System.Object - implements class I`1, - class I`1 -{ - .method public hidebysig newslot virtual - instance void M() cil managed - { - // Code size 33 (0x21) - .maxstack 8 - IL_0000: nop - IL_0001: ldstr "A<{0},{1}>.M()" - IL_0006: ldtoken !T - IL_000b: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_0010: ldtoken !U - IL_0015: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_001a: call void [System.Console]System.Console::WriteLine(string, - object, - object) - IL_001f: nop - IL_0020: ret - } // end of method A`2::M - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method A`2::.ctor - -} // end of class A`2 - -.class private auto ansi beforefieldinit B`2 - extends [mscorlib]System.Object - implements class I`1>, - class I`1> -{ - .method public hidebysig newslot virtual - instance void M() cil managed - { - // Code size 33 (0x21) - .maxstack 8 - IL_0000: nop - IL_0001: ldstr "B<{0},{1}>.M()" - IL_0006: ldtoken !T - IL_000b: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_0010: ldtoken !U - IL_0015: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_001a: call void [System.Console]System.Console::WriteLine(string, - object, - object) - IL_001f: nop - IL_0020: ret - } // end of method B`2::M - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method B`2::.ctor - -} // end of class B`2 - -.class private auto ansi beforefieldinit C`2 - extends [mscorlib]System.Object - implements class I`1>, - class I`1>> -{ - .method public hidebysig newslot virtual - instance void M() cil managed - { - // Code size 33 (0x21) - .maxstack 8 - IL_0000: nop - IL_0001: ldstr "C<{0},{1}>.M()" - IL_0006: ldtoken !T - IL_000b: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_0010: ldtoken !U - IL_0015: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_001a: call void [System.Console]System.Console::WriteLine(string, - object, - object) - IL_001f: nop - IL_0020: ret - } // end of method C`2::M - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method C`2::.ctor - -} // end of class C`2 - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file HelloWorld.res diff --git a/src/coreclr/tests/src/Loader/classloader/TSAmbiguities/CollapsedMethods/InterfaceDefinition/HelloWorld.il b/src/coreclr/tests/src/Loader/classloader/TSAmbiguities/CollapsedMethods/InterfaceDefinition/HelloWorld.il deleted file mode 100644 index 876c6d8a2990..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/TSAmbiguities/CollapsedMethods/InterfaceDefinition/HelloWorld.il +++ /dev/null @@ -1,437 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } - -// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.20508.0 -// Copyright (c) Microsoft Corporation. All rights reserved. - - - -// Metadata version: v4.0.20508 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly HelloWorld -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module HelloWorld.exe -// MVID: {CA3A864B-A75E-4A75-9454-0BEF07F1FCF4} -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x01590000 - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class private auto ansi beforefieldinit HelloWorld - extends [mscorlib]System.Object -{ - .method private hidebysig static bool Check(string actual, - string expected) cil managed - { - // Code size 20 (0x14) - .maxstack 2 - .locals init (bool V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: call void [System.Console]System.Console::WriteLine(string) - IL_0007: nop - IL_0008: ldarg.0 - IL_0009: ldarg.1 - IL_000a: call bool [mscorlib]System.String::op_Equality(string, - string) - IL_000f: stloc.0 - IL_0010: br.s IL_0012 - - IL_0012: ldloc.0 - IL_0013: ret - } // end of method HelloWorld::Check - - .method private hidebysig static int32 - Main() cil managed - { - .entrypoint - // Code size 450 (0x1c2) - .maxstack 3 - .locals init (bool V_0, - class I`1 V_1, - class I2`1 V_2, - class J`2 V_3, - class J2`2 V_4, - class K`1 V_5, - class K2`1 V_6, - class J`2 V_7, - class J2`2 V_8, - int32 V_9, - bool V_10) - IL_0000: nop - IL_0001: ldc.i4.1 - IL_0002: stloc.0 - IL_0003: newobj instance void A::.ctor() - IL_0008: castclass class I`1 - IL_000d: stloc.1 - IL_000e: ldloc.0 - IL_000f: ldloc.1 - IL_0010: ldc.i4.1 - IL_0011: callvirt instance string class I`1::Print(int32) - IL_0016: ldstr "A.Print(int)" - IL_001b: call bool HelloWorld::Check(string, - string) - IL_0020: and - IL_0021: stloc.0 - IL_0022: ldloc.0 - IL_0023: ldloc.1 - IL_0024: ldc.i4.1 - IL_0025: callvirt instance string class I`1::Print(!0) - IL_002a: ldstr "A.Print(int)" - IL_002f: call bool HelloWorld::Check(string, - string) - IL_0034: and - IL_0035: stloc.0 - IL_0036: newobj instance void A::.ctor() - IL_003b: castclass class I2`1 - IL_0040: stloc.2 - IL_0041: ldloc.0 - IL_0042: ldloc.2 - IL_0043: ldc.i4.1 - IL_0044: callvirt instance string class I2`1::Print(int32) - IL_0049: ldstr "A.Print(int)" - IL_004e: call bool HelloWorld::Check(string, - string) - IL_0053: and - IL_0054: stloc.0 - IL_0055: ldloc.0 - IL_0056: ldloc.2 - IL_0057: ldc.i4.1 - IL_0058: callvirt instance string class I2`1::Print(!0) - IL_005d: ldstr "A.Print(int)" - IL_0062: call bool HelloWorld::Check(string, - string) - IL_0067: and - IL_0068: stloc.0 - IL_0069: newobj instance void A::.ctor() - IL_006e: castclass class J`2 - IL_0073: stloc.3 - IL_0074: ldloc.0 - IL_0075: ldloc.3 - IL_0076: ldc.i4.1 - IL_0077: callvirt instance string class J`2::Print(!0) - IL_007c: ldstr "A.Print(int)" - IL_0081: call bool HelloWorld::Check(string, - string) - IL_0086: and - IL_0087: stloc.0 - IL_0088: ldloc.0 - IL_0089: ldloc.3 - IL_008a: ldc.i4.1 - IL_008b: callvirt instance string class J`2::Print(!1) - IL_0090: ldstr "A.Print(int)" - IL_0095: call bool HelloWorld::Check(string, - string) - IL_009a: and - IL_009b: stloc.0 - IL_009c: newobj instance void A::.ctor() - IL_00a1: castclass class J2`2 - IL_00a6: stloc.s V_4 - IL_00a8: ldloc.0 - IL_00a9: ldloc.s V_4 - IL_00ab: ldc.i4.1 - IL_00ac: callvirt instance string class J2`2::Print(!0) - IL_00b1: ldstr "A.Print(int)" - IL_00b6: call bool HelloWorld::Check(string, - string) - IL_00bb: and - IL_00bc: stloc.0 - IL_00bd: ldloc.0 - IL_00be: ldloc.s V_4 - IL_00c0: ldc.i4.1 - IL_00c1: callvirt instance string class J2`2::Print(!1) - IL_00c6: ldstr "A.Print(int)" - IL_00cb: call bool HelloWorld::Check(string, - string) - IL_00d0: and - IL_00d1: stloc.0 - IL_00d2: newobj instance void B::.ctor() - IL_00d7: castclass class K`1 - IL_00dc: stloc.s V_5 - IL_00de: ldloc.0 - IL_00df: ldloc.s V_5 - IL_00e1: ldnull - IL_00e2: callvirt instance string class K`1::Print(string) - IL_00e7: ldstr "B.Print(string)" - IL_00ec: call bool HelloWorld::Check(string, - string) - IL_00f1: and - IL_00f2: stloc.0 - IL_00f3: ldloc.0 - IL_00f4: ldloc.s V_5 - IL_00f6: ldnull - IL_00f7: callvirt instance string class K`1::Print(!0) - IL_00fc: ldstr "B.Print(string)" - IL_0101: call bool HelloWorld::Check(string, - string) - IL_0106: and - IL_0107: stloc.0 - IL_0108: newobj instance void B::.ctor() - IL_010d: castclass class K2`1 - IL_0112: stloc.s V_6 - IL_0114: ldloc.0 - IL_0115: ldloc.s V_6 - IL_0117: ldnull - IL_0118: callvirt instance string class K2`1::Print(string) - IL_011d: ldstr "B.Print(string)" - IL_0122: call bool HelloWorld::Check(string, - string) - IL_0127: and - IL_0128: stloc.0 - IL_0129: ldloc.0 - IL_012a: ldloc.s V_6 - IL_012c: ldnull - IL_012d: callvirt instance string class K2`1::Print(!0) - IL_0132: ldstr "B.Print(string)" - IL_0137: call bool HelloWorld::Check(string, - string) - IL_013c: and - IL_013d: stloc.0 - IL_013e: newobj instance void B::.ctor() - IL_0143: castclass class J`2 - IL_0148: stloc.s V_7 - IL_014a: ldloc.0 - IL_014b: ldloc.s V_7 - IL_014d: ldnull - IL_014e: callvirt instance string class J`2::Print(!0) - IL_0153: ldstr "B.Print(string)" - IL_0158: call bool HelloWorld::Check(string, - string) - IL_015d: and - IL_015e: stloc.0 - IL_015f: ldloc.0 - IL_0160: ldloc.s V_7 - IL_0162: ldnull - IL_0163: callvirt instance string class J`2::Print(!1) - IL_0168: ldstr "B.Print(string)" - IL_016d: call bool HelloWorld::Check(string, - string) - IL_0172: and - IL_0173: stloc.0 - IL_0174: newobj instance void B::.ctor() - IL_0179: castclass class J2`2 - IL_017e: stloc.s V_8 - IL_0180: ldloc.0 - IL_0181: ldloc.s V_8 - IL_0183: ldnull - IL_0184: callvirt instance string class J2`2::Print(!0) - IL_0189: ldstr "B.Print(string)" - IL_018e: call bool HelloWorld::Check(string, - string) - IL_0193: and - IL_0194: stloc.0 - IL_0195: ldloc.0 - IL_0196: ldloc.s V_8 - IL_0198: ldnull - IL_0199: callvirt instance string class J2`2::Print(!1) - IL_019e: ldstr "B.Print(string)" - IL_01a3: call bool HelloWorld::Check(string, - string) - IL_01a8: and - IL_01a9: stloc.0 - IL_01aa: ldloc.0 - IL_01ab: ldc.i4.0 - IL_01ac: ceq - IL_01ae: stloc.s V_10 - IL_01b0: ldloc.s V_10 - IL_01b2: brtrue.s IL_01ba - - IL_01b4: ldc.i4.s 100 - IL_01b6: stloc.s V_9 - IL_01b8: br.s IL_01bf - - IL_01ba: ldc.i4.m1 - IL_01bb: stloc.s V_9 - IL_01bd: br.s IL_01bf - - IL_01bf: ldloc.s V_9 - IL_01c1: ret - } // end of method HelloWorld::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method HelloWorld::.ctor - -} // end of class HelloWorld - -.class interface private abstract auto ansi I`1 -{ - .method public hidebysig newslot abstract virtual - instance string Print(int32 i) cil managed - { - } // end of method I`1::Print - - .method public hidebysig newslot abstract virtual - instance string Print(!T t) cil managed - { - } // end of method I`1::Print - -} // end of class I`1 - -.class interface private abstract auto ansi I2`1 -{ - .method public hidebysig newslot abstract virtual - instance string Print(!T t) cil managed - { - } // end of method I2`1::Print - - .method public hidebysig newslot abstract virtual - instance string Print(int32 i) cil managed - { - } // end of method I2`1::Print - -} // end of class I2`1 - -.class interface private abstract auto ansi J`2 -{ - .method public hidebysig newslot abstract virtual - instance string Print(!T t) cil managed - { - } // end of method J`2::Print - - .method public hidebysig newslot abstract virtual - instance string Print(!U u) cil managed - { - } // end of method J`2::Print - -} // end of class J`2 - -.class interface private abstract auto ansi J2`2 -{ - .method public hidebysig newslot abstract virtual - instance string Print(!U u) cil managed - { - } // end of method J2`2::Print - - .method public hidebysig newslot abstract virtual - instance string Print(!T t) cil managed - { - } // end of method J2`2::Print - -} // end of class J2`2 - -.class private auto ansi beforefieldinit A - extends [mscorlib]System.Object - implements class I`1, - class I2`1, - class J`2, - class J2`2 -{ - .method public hidebysig newslot virtual - instance string Print(int32 i) cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "A.Print(int)" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method A::Print - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method A::.ctor - -} // end of class A - -.class interface private abstract auto ansi K`1 -{ - .method public hidebysig newslot abstract virtual - instance string Print(string s) cil managed - { - } // end of method K`1::Print - - .method public hidebysig newslot abstract virtual - instance string Print(!T t) cil managed - { - } // end of method K`1::Print - -} // end of class K`1 - -.class interface private abstract auto ansi K2`1 -{ - .method public hidebysig newslot abstract virtual - instance string Print(!T t) cil managed - { - } // end of method K2`1::Print - - .method public hidebysig newslot abstract virtual - instance string Print(string s) cil managed - { - } // end of method K2`1::Print - -} // end of class K2`1 - -.class private auto ansi beforefieldinit B - extends [mscorlib]System.Object - implements class K`1, - class K2`1, - class J`2, - class J2`2 -{ - .method public hidebysig newslot virtual - instance string Print(string s) cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "B.Print(string)" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method B::Print - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method B::.ctor - -} // end of class B - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file HelloWorld.res diff --git a/src/coreclr/tests/src/Loader/classloader/TSAmbiguities/CollapsedMethods/InterfaceImplementation/HelloWorld.cs b/src/coreclr/tests/src/Loader/classloader/TSAmbiguities/CollapsedMethods/InterfaceImplementation/HelloWorld.cs deleted file mode 100644 index 57155b7cd68d..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/TSAmbiguities/CollapsedMethods/InterfaceImplementation/HelloWorld.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -#pragma warning disable 1956 //this is exactly what this is testing. - -class HelloWorld -{ - static int Main() - { - I i = (I)new A2_IntInt(); - string res1 = i.Print(1); - J ji = (J)new A2_IntInt(); - string res2 = ji.Print(1); - J js = (J)new A2_StringString(); - string res3 = js.Print(""); - - Console.WriteLine(res1); - Console.WriteLine(res2); - Console.WriteLine(res3); - - if (res1 == "A.Print(U)" && res2 == "A.Print(U)" && res3 == "A.Print(U)") - return 100; - return -1; - } -} - -// ---------------------------------------------------------------------------- -class A -{ - public virtual string Print(T t) { return "A.Print(T)"; } - public virtual string Print(U u) { return "A.Print(U)"; } -} - -interface I -{ - string Print(int i); -} - -interface J -{ - string Print(T t); -} - -class A2_IntInt : A, I, J -{ -} - -class A2_StringString : A, J -{ -} diff --git a/src/coreclr/tests/src/Loader/classloader/TSAmbiguities/CollapsedMethods/Override/HelloWorld.il b/src/coreclr/tests/src/Loader/classloader/TSAmbiguities/CollapsedMethods/Override/HelloWorld.il deleted file mode 100644 index 0015f5a21f73..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/TSAmbiguities/CollapsedMethods/Override/HelloWorld.il +++ /dev/null @@ -1,487 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } - -// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.20508.0 -// Copyright (c) Microsoft Corporation. All rights reserved. - - - -// Metadata version: v4.0.20508 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly HelloWorld -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module HelloWorld.exe -// MVID: {30A53143-221A-4FEF-A46B-0607BADC72A0} -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x003A0000 - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class private auto ansi beforefieldinit HelloWorld - extends [mscorlib]System.Object -{ - .method private hidebysig static int32 - Main() cil managed - { - .entrypoint - // Code size 313 (0x139) - .maxstack 2 - .locals init (class A`2 V_0, - string V_1, - string V_2, - class A`2 V_3, - string V_4, - string V_5, - class B`2 V_6, - string V_7, - string V_8, - class B`2 V_9, - string V_10, - string V_11, - int32 V_12, - bool V_13) - IL_0000: nop - IL_0001: newobj instance void A2_IntInt::.ctor() - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: ldc.i4.1 - IL_0009: callvirt instance string class A`2::CallPrintT(!0) - IL_000e: stloc.1 - IL_000f: ldloc.0 - IL_0010: ldc.i4.1 - IL_0011: callvirt instance string class A`2::CallPrintU(!1) - IL_0016: stloc.2 - IL_0017: newobj instance void A2_StringString::.ctor() - IL_001c: stloc.3 - IL_001d: ldloc.3 - IL_001e: ldstr "" - IL_0023: callvirt instance string class A`2::CallPrintT(!0) - IL_0028: stloc.s V_4 - IL_002a: ldloc.3 - IL_002b: ldstr "" - IL_0030: callvirt instance string class A`2::CallPrintU(!1) - IL_0035: stloc.s V_5 - IL_0037: newobj instance void B2_IntInt::.ctor() - IL_003c: stloc.s V_6 - IL_003e: ldloc.s V_6 - IL_0040: ldc.i4.1 - IL_0041: callvirt instance string class B`2::CallPrintT(!0) - IL_0046: stloc.s V_7 - IL_0048: ldloc.s V_6 - IL_004a: ldc.i4.1 - IL_004b: callvirt instance string class B`2::CallPrintU(!1) - IL_0050: stloc.s V_8 - IL_0052: newobj instance void B2_StringString::.ctor() - IL_0057: stloc.s V_9 - IL_0059: ldloc.s V_9 - IL_005b: ldstr "" - IL_0060: callvirt instance string class B`2::CallPrintT(!0) - IL_0065: stloc.s V_10 - IL_0067: ldloc.s V_9 - IL_0069: ldstr "" - IL_006e: callvirt instance string class B`2::CallPrintU(!1) - IL_0073: stloc.s V_11 - IL_0075: ldloc.1 - IL_0076: call void [System.Console]System.Console::WriteLine(string) - IL_007b: nop - IL_007c: ldloc.2 - IL_007d: call void [System.Console]System.Console::WriteLine(string) - IL_0082: nop - IL_0083: ldloc.s V_4 - IL_0085: call void [System.Console]System.Console::WriteLine(string) - IL_008a: nop - IL_008b: ldloc.s V_5 - IL_008d: call void [System.Console]System.Console::WriteLine(string) - IL_0092: nop - IL_0093: ldloc.s V_7 - IL_0095: call void [System.Console]System.Console::WriteLine(string) - IL_009a: nop - IL_009b: ldloc.s V_8 - IL_009d: call void [System.Console]System.Console::WriteLine(string) - IL_00a2: nop - IL_00a3: ldloc.s V_10 - IL_00a5: call void [System.Console]System.Console::WriteLine(string) - IL_00aa: nop - IL_00ab: ldloc.s V_11 - IL_00ad: call void [System.Console]System.Console::WriteLine(string) - IL_00b2: nop - IL_00b3: ldloc.1 - IL_00b4: ldstr "A.Print(T)" - IL_00b9: call bool [mscorlib]System.String::op_Equality(string, - string) - IL_00be: brfalse.s IL_0124 - - IL_00c0: ldloc.2 - IL_00c1: ldstr "A2_IntInt.Print()" - IL_00c6: call bool [mscorlib]System.String::op_Equality(string, - string) - IL_00cb: brfalse.s IL_0124 - - IL_00cd: ldloc.s V_4 - IL_00cf: ldstr "A.Print(T)" - IL_00d4: call bool [mscorlib]System.String::op_Equality(string, - string) - IL_00d9: brfalse.s IL_0124 - - IL_00db: ldloc.s V_5 - IL_00dd: ldstr "A2_StringString.Print()" - IL_00e2: call bool [mscorlib]System.String::op_Equality(string, - string) - IL_00e7: brfalse.s IL_0124 - - IL_00e9: ldloc.s V_7 - IL_00eb: ldstr "B2_IntInt.Print()" - IL_00f0: call bool [mscorlib]System.String::op_Equality(string, - string) - IL_00f5: brfalse.s IL_0124 - - IL_00f7: ldloc.s V_8 - IL_00f9: ldstr "B.Print(U)" - IL_00fe: call bool [mscorlib]System.String::op_Equality(string, - string) - IL_0103: brfalse.s IL_0124 - - IL_0105: ldloc.s V_10 - IL_0107: ldstr "B2_StringString.Print()" - IL_010c: call bool [mscorlib]System.String::op_Equality(string, - string) - IL_0111: brfalse.s IL_0124 - - IL_0113: ldloc.s V_11 - IL_0115: ldstr "B.Print(U)" - IL_011a: call bool [mscorlib]System.String::op_Equality(string, - string) - IL_011f: ldc.i4.0 - IL_0120: ceq - IL_0122: br.s IL_0125 - - IL_0124: ldc.i4.1 - IL_0125: stloc.s V_13 - IL_0127: ldloc.s V_13 - IL_0129: brtrue.s IL_0131 - - IL_012b: ldc.i4.s 100 - IL_012d: stloc.s V_12 - IL_012f: br.s IL_0136 - - IL_0131: ldc.i4.m1 - IL_0132: stloc.s V_12 - IL_0134: br.s IL_0136 - - IL_0136: ldloc.s V_12 - IL_0138: ret - } // end of method HelloWorld::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method HelloWorld::.ctor - -} // end of class HelloWorld - -.class private auto ansi beforefieldinit A`2 - extends [mscorlib]System.Object -{ - .method public hidebysig newslot virtual - instance string Print(!T t) cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "A.Print(T)" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method A`2::Print - - .method public hidebysig newslot virtual - instance string Print(!U u) cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "A.Print(U)" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method A`2::Print - - .method public hidebysig instance string - CallPrintT(!T t) cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldarg.1 - IL_0003: callvirt instance string class A`2::Print(!0) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method A`2::CallPrintT - - .method public hidebysig instance string - CallPrintU(!U u) cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldarg.1 - IL_0003: callvirt instance string class A`2::Print(!1) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method A`2::CallPrintU - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method A`2::.ctor - -} // end of class A`2 - -.class private auto ansi beforefieldinit A2_IntInt - extends class A`2 -{ - .method public hidebysig virtual - instance string Print(int32 i) cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "A2_IntInt.Print()" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method A2_IntInt::Print - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class A`2::.ctor() - IL_0006: ret - } // end of method A2_IntInt::.ctor - -} // end of class A2_IntInt - -.class private auto ansi beforefieldinit A2_StringString - extends class A`2 -{ - .method public hidebysig virtual - instance string Print(string s) cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "A2_StringString.Print()" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method A2_StringString::Print - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class A`2::.ctor() - IL_0006: ret - } // end of method A2_StringString::.ctor - -} // end of class A2_StringString - -.class private auto ansi beforefieldinit B`2 - extends [mscorlib]System.Object -{ - .method public hidebysig newslot virtual - instance string Print(!U u) cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "B.Print(U)" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method B`2::Print - - .method public hidebysig newslot virtual - instance string Print(!T t) cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "B.Print(T)" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method B`2::Print - - .method public hidebysig instance string - CallPrintT(!T t) cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldarg.1 - IL_0003: callvirt instance string class B`2::Print(!0) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method B`2::CallPrintT - - .method public hidebysig instance string - CallPrintU(!U u) cil managed - { - // Code size 13 (0xd) - .maxstack 2 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldarg.1 - IL_0003: callvirt instance string class B`2::Print(!1) - IL_0008: stloc.0 - IL_0009: br.s IL_000b - - IL_000b: ldloc.0 - IL_000c: ret - } // end of method B`2::CallPrintU - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method B`2::.ctor - -} // end of class B`2 - -.class private auto ansi beforefieldinit B2_IntInt - extends class B`2 -{ - .method public hidebysig virtual - instance string Print(int32 i) cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "B2_IntInt.Print()" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method B2_IntInt::Print - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class B`2::.ctor() - IL_0006: ret - } // end of method B2_IntInt::.ctor - -} // end of class B2_IntInt - -.class private auto ansi beforefieldinit B2_StringString - extends class B`2 -{ - .method public hidebysig virtual - instance string Print(string s) cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "B2_StringString.Print()" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method B2_StringString::Print - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class B`2::.ctor() - IL_0006: ret - } // end of method B2_StringString::.ctor - -} // end of class B2_StringString - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file HelloWorld.res diff --git a/src/coreclr/tests/src/Loader/classloader/TSAmbiguities/SameMethodImpl/CollapsedInterfaces/HelloWorld.il b/src/coreclr/tests/src/Loader/classloader/TSAmbiguities/SameMethodImpl/CollapsedInterfaces/HelloWorld.il deleted file mode 100644 index d8d045a6338d..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/TSAmbiguities/SameMethodImpl/CollapsedInterfaces/HelloWorld.il +++ /dev/null @@ -1,944 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } - -// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.20512.0 -// Copyright (c) Microsoft Corporation. All rights reserved. - - - -// Metadata version: v4.0.20512 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly HelloWorld -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module HelloWorld.exe -// MVID: {EE84F77E-91BD-4DE7-9EF8-6E248B067B89} -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x00310000 - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class private auto ansi beforefieldinit HelloWorld - extends [mscorlib]System.Object -{ - .method private hidebysig static int32 - Main(string[] args) cil managed - { - .entrypoint - // Code size 382 (0x17e) - .maxstack 2 - .locals init (bool V_0, - class I`1 V_1, - int32 V_2, - bool V_3) - IL_0000: nop - IL_0001: ldc.i4.1 - IL_0002: stloc.0 - IL_0003: call class I`1 HelloWorld::Test_B() - IL_0008: stloc.1 - IL_0009: ldloc.1 - IL_000a: ldc.i4.1 - IL_000b: callvirt instance string class I`1::Print(!0) - IL_0010: call void [System.Console]System.Console::WriteLine(string) - IL_0015: nop - IL_0016: ldloc.1 - IL_0017: ldc.i4.1 - IL_0018: callvirt instance string class I`1::Print(!0) - IL_001d: ldstr "B.Print_T(T)" - IL_0022: call bool [mscorlib]System.String::op_Inequality(string, - string) - IL_0027: ldc.i4.0 - IL_0028: ceq - IL_002a: stloc.3 - IL_002b: ldloc.3 - IL_002c: brtrue.s IL_0030 - - IL_002e: ldc.i4.0 - IL_002f: stloc.0 - IL_0030: call class I`1 HelloWorld::Test_C() - IL_0035: stloc.1 - IL_0036: ldloc.1 - IL_0037: ldc.i4.1 - IL_0038: callvirt instance string class I`1::Print(!0) - IL_003d: call void [System.Console]System.Console::WriteLine(string) - IL_0042: nop - IL_0043: ldloc.1 - IL_0044: ldc.i4.1 - IL_0045: callvirt instance string class I`1::Print(!0) - IL_004a: ldstr "C.Print_T(T)" - IL_004f: call bool [mscorlib]System.String::op_Inequality(string, - string) - IL_0054: ldc.i4.0 - IL_0055: ceq - IL_0057: stloc.3 - IL_0058: ldloc.3 - IL_0059: brtrue.s IL_005d - - IL_005b: ldc.i4.0 - IL_005c: stloc.0 - IL_005d: call class I`1 HelloWorld::Test_D_TUV() - IL_0062: stloc.1 - IL_0063: ldloc.1 - IL_0064: ldc.i4.1 - IL_0065: callvirt instance string class I`1::Print(!0) - IL_006a: call void [System.Console]System.Console::WriteLine(string) - IL_006f: nop - IL_0070: ldloc.1 - IL_0071: ldc.i4.1 - IL_0072: callvirt instance string class I`1::Print(!0) - IL_0077: ldstr "D.Print_T(T)" - IL_007c: call bool [mscorlib]System.String::op_Inequality(string, - string) - IL_0081: ldc.i4.0 - IL_0082: ceq - IL_0084: stloc.3 - IL_0085: ldloc.3 - IL_0086: brtrue.s IL_008a - - IL_0088: ldc.i4.0 - IL_0089: stloc.0 - IL_008a: call class I`1 HelloWorld::Test_D_TVU() - IL_008f: stloc.1 - IL_0090: ldloc.1 - IL_0091: ldc.i4.1 - IL_0092: callvirt instance string class I`1::Print(!0) - IL_0097: call void [System.Console]System.Console::WriteLine(string) - IL_009c: nop - IL_009d: ldloc.1 - IL_009e: ldc.i4.1 - IL_009f: callvirt instance string class I`1::Print(!0) - IL_00a4: ldstr "D.Print_T(T)" - IL_00a9: call bool [mscorlib]System.String::op_Inequality(string, - string) - IL_00ae: ldc.i4.0 - IL_00af: ceq - IL_00b1: stloc.3 - IL_00b2: ldloc.3 - IL_00b3: brtrue.s IL_00b7 - - IL_00b5: ldc.i4.0 - IL_00b6: stloc.0 - IL_00b7: call class I`1 HelloWorld::Test_D_UTV() - IL_00bc: stloc.1 - IL_00bd: ldloc.1 - IL_00be: ldc.i4.1 - IL_00bf: callvirt instance string class I`1::Print(!0) - IL_00c4: call void [System.Console]System.Console::WriteLine(string) - IL_00c9: nop - IL_00ca: ldloc.1 - IL_00cb: ldc.i4.1 - IL_00cc: callvirt instance string class I`1::Print(!0) - IL_00d1: ldstr "D.Print_T(T)" - IL_00d6: call bool [mscorlib]System.String::op_Inequality(string, - string) - IL_00db: ldc.i4.0 - IL_00dc: ceq - IL_00de: stloc.3 - IL_00df: ldloc.3 - IL_00e0: brtrue.s IL_00e4 - - IL_00e2: ldc.i4.0 - IL_00e3: stloc.0 - IL_00e4: call class I`1 HelloWorld::Test_D_UVT() - IL_00e9: stloc.1 - IL_00ea: ldloc.1 - IL_00eb: ldc.i4.1 - IL_00ec: callvirt instance string class I`1::Print(!0) - IL_00f1: call void [System.Console]System.Console::WriteLine(string) - IL_00f6: nop - IL_00f7: ldloc.1 - IL_00f8: ldc.i4.1 - IL_00f9: callvirt instance string class I`1::Print(!0) - IL_00fe: ldstr "D.Print_T(T)" - IL_0103: call bool [mscorlib]System.String::op_Inequality(string, - string) - IL_0108: ldc.i4.0 - IL_0109: ceq - IL_010b: stloc.3 - IL_010c: ldloc.3 - IL_010d: brtrue.s IL_0111 - - IL_010f: ldc.i4.0 - IL_0110: stloc.0 - IL_0111: call class I`1 HelloWorld::Test_D_VTU() - IL_0116: stloc.1 - IL_0117: ldloc.1 - IL_0118: ldc.i4.1 - IL_0119: callvirt instance string class I`1::Print(!0) - IL_011e: call void [System.Console]System.Console::WriteLine(string) - IL_0123: nop - IL_0124: ldloc.1 - IL_0125: ldc.i4.1 - IL_0126: callvirt instance string class I`1::Print(!0) - IL_012b: ldstr "D.Print_T(T)" - IL_0130: call bool [mscorlib]System.String::op_Inequality(string, - string) - IL_0135: ldc.i4.0 - IL_0136: ceq - IL_0138: stloc.3 - IL_0139: ldloc.3 - IL_013a: brtrue.s IL_013e - - IL_013c: ldc.i4.0 - IL_013d: stloc.0 - IL_013e: call class I`1 HelloWorld::Test_D_VUT() - IL_0143: stloc.1 - IL_0144: ldloc.1 - IL_0145: ldc.i4.1 - IL_0146: callvirt instance string class I`1::Print(!0) - IL_014b: call void [System.Console]System.Console::WriteLine(string) - IL_0150: nop - IL_0151: ldloc.1 - IL_0152: ldc.i4.1 - IL_0153: callvirt instance string class I`1::Print(!0) - IL_0158: ldstr "D.Print_T(T)" - IL_015d: call bool [mscorlib]System.String::op_Inequality(string, - string) - IL_0162: ldc.i4.0 - IL_0163: ceq - IL_0165: stloc.3 - IL_0166: ldloc.3 - IL_0167: brtrue.s IL_016b - - IL_0169: ldc.i4.0 - IL_016a: stloc.0 - IL_016b: ldloc.0 - IL_016c: ldc.i4.0 - IL_016d: ceq - IL_016f: stloc.3 - IL_0170: ldloc.3 - IL_0171: brtrue.s IL_0178 - - IL_0173: ldc.i4.s 100 - IL_0175: stloc.2 - IL_0176: br.s IL_017c - - IL_0178: ldc.i4.m1 - IL_0179: stloc.2 - IL_017a: br.s IL_017c - - IL_017c: ldloc.2 - IL_017d: ret - } // end of method HelloWorld::Main - - .method public hidebysig static class I`1 - Test_B() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (class I`1 V_0) - IL_0000: nop - IL_0001: newobj instance void class B`2::.ctor() - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method HelloWorld::Test_B - - .method public hidebysig static class I`1 - Test_C() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (class I`1 V_0) - IL_0000: nop - IL_0001: newobj instance void class C`2::.ctor() - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method HelloWorld::Test_C - - .method public hidebysig static class I`1 - Test_D_TUV() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (class I`1 V_0) - IL_0000: nop - IL_0001: newobj instance void class D_TUV`3::.ctor() - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method HelloWorld::Test_D_TUV - - .method public hidebysig static class I`1 - Test_D_TVU() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (class I`1 V_0) - IL_0000: nop - IL_0001: newobj instance void class D_TVU`3::.ctor() - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method HelloWorld::Test_D_TVU - - .method public hidebysig static class I`1 - Test_D_UTV() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (class I`1 V_0) - IL_0000: nop - IL_0001: newobj instance void class D_UTV`3::.ctor() - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method HelloWorld::Test_D_UTV - - .method public hidebysig static class I`1 - Test_D_UVT() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (class I`1 V_0) - IL_0000: nop - IL_0001: newobj instance void class D_UVT`3::.ctor() - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method HelloWorld::Test_D_UVT - - .method public hidebysig static class I`1 - Test_D_VTU() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (class I`1 V_0) - IL_0000: nop - IL_0001: newobj instance void class D_VTU`3::.ctor() - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method HelloWorld::Test_D_VTU - - .method public hidebysig static class I`1 - Test_D_VUT() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (class I`1 V_0) - IL_0000: nop - IL_0001: newobj instance void class D_VUT`3::.ctor() - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method HelloWorld::Test_D_VUT - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method HelloWorld::.ctor - -} // end of class HelloWorld - -.class interface private abstract auto ansi I`1 -{ - .method public hidebysig newslot abstract virtual - instance string Print(!T t) cil managed - { - } // end of method I`1::Print - -} // end of class I`1 - -.class private auto ansi beforefieldinit A`1 - extends [mscorlib]System.Object - implements class I`1 -{ - .method private hidebysig newslot virtual final - instance string 'I.Print'(!T t) cil managed - { - .override method instance string class I`1::Print(!0) - // Code size 11 (0xb) - .maxstack 1 - .locals init ([0] string CS$1$0000) - IL_0000: nop - IL_0001: ldstr "A.I.Print(T)" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method A`1::'I.Print' - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method A`1::.ctor - -} // end of class A`1 - -.class private auto ansi beforefieldinit B`2 - extends class A`1 - implements class I`1 -{ - .method private hidebysig newslot virtual final - instance string 'I.Print'(!U u) cil managed - { - .override method instance string class I`1::Print(!0) - // Code size 11 (0xb) - .maxstack 1 - .locals init ([0] string CS$1$0000) - IL_0000: nop - IL_0001: ldstr "B.I.Print(U)" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method B`2::'I.Print' - - .method public hidebysig newslot virtual - instance string Print_T(!T t) cil managed - { -//CHANGE: Add implementation of I.Print - .override method instance string class I`1::Print(!0) - // Code size 11 (0xb) - .maxstack 1 - .locals init ([0] string CS$1$0000) - IL_0000: nop - IL_0001: ldstr "B.Print_T(T)" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method B`2::Print_T - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class A`1::.ctor() - IL_0006: ret - } // end of method B`2::.ctor - -} // end of class B`2 - -.class private auto ansi beforefieldinit C`2 - extends class A`1 - implements class I`1 -{ - .method public hidebysig newslot virtual - instance string Print_T(!T t) cil managed - { -//CHANGE: Add implementation of I.Print - .override method instance string class I`1::Print(!0) - // Code size 11 (0xb) - .maxstack 1 - .locals init ([0] string CS$1$0000) - IL_0000: nop - IL_0001: ldstr "C.Print_T(T)" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method C`2::Print_T - - .method private hidebysig newslot virtual final - instance string 'I.Print'(!U u) cil managed - { - .override method instance string class I`1::Print(!0) - // Code size 11 (0xb) - .maxstack 1 - .locals init ([0] string CS$1$0000) - IL_0000: nop - IL_0001: ldstr "C.I.Print(U)" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method C`2::'I.Print' - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class A`1::.ctor() - IL_0006: ret - } // end of method C`2::.ctor - -} // end of class C`2 - -.class private auto ansi beforefieldinit DBase`2 - extends class A`1 - implements class I`1 -{ - .method private hidebysig newslot virtual final - instance string 'I.Print'(!U u) cil managed - { - .override method instance string class I`1::Print(!0) - // Code size 11 (0xb) - .maxstack 1 - .locals init ([0] string CS$1$0000) - IL_0000: nop - IL_0001: ldstr "DBase.I.Print(U)" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method DBase`2::'I.Print' - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class A`1::.ctor() - IL_0006: ret - } // end of method DBase`2::.ctor - -} // end of class DBase`2 - -.class private auto ansi beforefieldinit D_TUV`3 - extends class DBase`2 - implements class I`1 -{ - .method public hidebysig newslot virtual - instance string Print_T(!T t) cil managed - { -//CHANGE: Add implementation of I.Print - .override method instance string class I`1::Print(!0) - // Code size 11 (0xb) - .maxstack 1 - .locals init ([0] string CS$1$0000) - IL_0000: nop - IL_0001: ldstr "D.Print_T(T)" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method D_TUV`3::Print_T - - .method public hidebysig newslot virtual - instance string Print_U(!U u) cil managed - { -//CHANGE: Add implementation of I.Print - .override method instance string class I`1::Print(!0) - // Code size 11 (0xb) - .maxstack 1 - .locals init ([0] string CS$1$0000) - IL_0000: nop - IL_0001: ldstr "D.Print_U(U)" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method D_TUV`3::Print_U - - .method private hidebysig newslot virtual final - instance string 'I.Print'(!V v) cil managed - { - .override method instance string class I`1::Print(!0) - // Code size 11 (0xb) - .maxstack 1 - .locals init ([0] string CS$1$0000) - IL_0000: nop - IL_0001: ldstr "D.I.Print(V)" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method D_TUV`3::'I.Print' - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class DBase`2::.ctor() - IL_0006: ret - } // end of method D_TUV`3::.ctor - -} // end of class D_TUV`3 - -.class private auto ansi beforefieldinit D_TVU`3 - extends class DBase`2 - implements class I`1 -{ - .method public hidebysig newslot virtual - instance string Print_T(!T t) cil managed - { -//CHANGE: Add implementation of I.Print - .override method instance string class I`1::Print(!0) - // Code size 11 (0xb) - .maxstack 1 - .locals init ([0] string CS$1$0000) - IL_0000: nop - IL_0001: ldstr "D.Print_T(T)" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method D_TVU`3::Print_T - - .method private hidebysig newslot virtual final - instance string 'I.Print'(!V v) cil managed - { - .override method instance string class I`1::Print(!0) - // Code size 11 (0xb) - .maxstack 1 - .locals init ([0] string CS$1$0000) - IL_0000: nop - IL_0001: ldstr "D.I.Print(V)" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method D_TVU`3::'I.Print' - - .method public hidebysig newslot virtual - instance string Print_U(!U u) cil managed - { -//CHANGE: Add implementation of I.Print - .override method instance string class I`1::Print(!0) - // Code size 11 (0xb) - .maxstack 1 - .locals init ([0] string CS$1$0000) - IL_0000: nop - IL_0001: ldstr "D.Print_U(U)" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method D_TVU`3::Print_U - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class DBase`2::.ctor() - IL_0006: ret - } // end of method D_TVU`3::.ctor - -} // end of class D_TVU`3 - -.class private auto ansi beforefieldinit D_UTV`3 - extends class DBase`2 - implements class I`1 -{ - .method public hidebysig newslot virtual - instance string Print_U(!U u) cil managed - { -//CHANGE: Add implementation of I.Print - .override method instance string class I`1::Print(!0) - // Code size 11 (0xb) - .maxstack 1 - .locals init ([0] string CS$1$0000) - IL_0000: nop - IL_0001: ldstr "D.Print_U(U)" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method D_UTV`3::Print_U - - .method public hidebysig newslot virtual - instance string Print_T(!T t) cil managed - { -//CHANGE: Add implementation of I.Print - .override method instance string class I`1::Print(!0) - // Code size 11 (0xb) - .maxstack 1 - .locals init ([0] string CS$1$0000) - IL_0000: nop - IL_0001: ldstr "D.Print_T(T)" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method D_UTV`3::Print_T - - .method private hidebysig newslot virtual final - instance string 'I.Print'(!V v) cil managed - { - .override method instance string class I`1::Print(!0) - // Code size 11 (0xb) - .maxstack 1 - .locals init ([0] string CS$1$0000) - IL_0000: nop - IL_0001: ldstr "D.I.Print(V)" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method D_UTV`3::'I.Print' - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class DBase`2::.ctor() - IL_0006: ret - } // end of method D_UTV`3::.ctor - -} // end of class D_UTV`3 - -.class private auto ansi beforefieldinit D_UVT`3 - extends class DBase`2 - implements class I`1 -{ - .method public hidebysig newslot virtual - instance string Print_U(!U u) cil managed - { -//CHANGE: Add implementation of I.Print - .override method instance string class I`1::Print(!0) - // Code size 11 (0xb) - .maxstack 1 - .locals init ([0] string CS$1$0000) - IL_0000: nop - IL_0001: ldstr "D.Print_U(U)" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method D_UVT`3::Print_U - - .method private hidebysig newslot virtual final - instance string 'I.Print'(!V v) cil managed - { - .override method instance string class I`1::Print(!0) - // Code size 11 (0xb) - .maxstack 1 - .locals init ([0] string CS$1$0000) - IL_0000: nop - IL_0001: ldstr "D.I.Print(V)" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method D_UVT`3::'I.Print' - - .method public hidebysig newslot virtual - instance string Print_T(!T t) cil managed - { -//CHANGE: Add implementation of I.Print - .override method instance string class I`1::Print(!0) - // Code size 11 (0xb) - .maxstack 1 - .locals init ([0] string CS$1$0000) - IL_0000: nop - IL_0001: ldstr "D.Print_T(T)" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method D_UVT`3::Print_T - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class DBase`2::.ctor() - IL_0006: ret - } // end of method D_UVT`3::.ctor - -} // end of class D_UVT`3 - -.class private auto ansi beforefieldinit D_VTU`3 - extends class DBase`2 - implements class I`1 -{ - .method private hidebysig newslot virtual final - instance string 'I.Print'(!V v) cil managed - { - .override method instance string class I`1::Print(!0) - // Code size 11 (0xb) - .maxstack 1 - .locals init ([0] string CS$1$0000) - IL_0000: nop - IL_0001: ldstr "D.I.Print(V)" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method D_VTU`3::'I.Print' - - .method public hidebysig newslot virtual - instance string Print_T(!T t) cil managed - { -//CHANGE: Add implementation of I.Print - .override method instance string class I`1::Print(!0) - // Code size 11 (0xb) - .maxstack 1 - .locals init ([0] string CS$1$0000) - IL_0000: nop - IL_0001: ldstr "D.Print_T(T)" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method D_VTU`3::Print_T - - .method public hidebysig newslot virtual - instance string Print_U(!U u) cil managed - { -//CHANGE: Add implementation of I.Print - .override method instance string class I`1::Print(!0) - // Code size 11 (0xb) - .maxstack 1 - .locals init ([0] string CS$1$0000) - IL_0000: nop - IL_0001: ldstr "D.Print_U(U)" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method D_VTU`3::Print_U - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class DBase`2::.ctor() - IL_0006: ret - } // end of method D_VTU`3::.ctor - -} // end of class D_VTU`3 - -.class private auto ansi beforefieldinit D_VUT`3 - extends class DBase`2 - implements class I`1 -{ - .method private hidebysig newslot virtual final - instance string 'I.Print'(!V v) cil managed - { - .override method instance string class I`1::Print(!0) - // Code size 11 (0xb) - .maxstack 1 - .locals init ([0] string CS$1$0000) - IL_0000: nop - IL_0001: ldstr "D.I.Print(V)" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method D_VUT`3::'I.Print' - - .method public hidebysig newslot virtual - instance string Print_U(!U u) cil managed - { -//CHANGE: Add implementation of I.Print - .override method instance string class I`1::Print(!0) - // Code size 11 (0xb) - .maxstack 1 - .locals init ([0] string CS$1$0000) - IL_0000: nop - IL_0001: ldstr "D.Print_U(U)" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method D_VUT`3::Print_U - - .method public hidebysig newslot virtual - instance string Print_T(!T t) cil managed - { -//CHANGE: Add implementation of I.Print - .override method instance string class I`1::Print(!0) - // Code size 11 (0xb) - .maxstack 1 - .locals init ([0] string CS$1$0000) - IL_0000: nop - IL_0001: ldstr "D.Print_T(T)" - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method D_VUT`3::Print_T - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class DBase`2::.ctor() - IL_0006: ret - } // end of method D_VUT`3::.ctor - -} // end of class D_VUT`3 - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file HelloWorld_out.res diff --git a/src/coreclr/tests/src/Loader/classloader/TSAmbiguities/SameMethodImpl/Override/HelloWorld.il b/src/coreclr/tests/src/Loader/classloader/TSAmbiguities/SameMethodImpl/Override/HelloWorld.il deleted file mode 100644 index 76ed62c50f52..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/TSAmbiguities/SameMethodImpl/Override/HelloWorld.il +++ /dev/null @@ -1,332 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } - -// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.20512.0 -// Copyright (c) Microsoft Corporation. All rights reserved. - - - -// Metadata version: v4.0.20512 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly HelloWorld -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module HelloWorld.exe -// MVID: {EE5EBACC-D919-44C6-9FC2-1636154C3772} -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x00890000 - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class private auto ansi beforefieldinit HelloWorld - extends [mscorlib]System.Object -{ - .method private hidebysig static int32 - Main(string[] args) cil managed - { - .entrypoint - // Code size 171 (0xab) - .maxstack 3 - .locals init (bool V_0, - class [mscorlib]System.Reflection.MethodInfo V_1, - class [mscorlib]System.Type V_2, - int32 V_3, - class [mscorlib]System.Reflection.MethodInfo[] V_4, - int32 V_5, - bool V_6) - IL_0000: nop - IL_0001: ldc.i4.1 - IL_0002: stloc.0 - IL_0003: nop - IL_0004: ldtoken HelloWorld - IL_0009: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_000e: ldc.i4.s 24 - IL_0010: callvirt instance class [mscorlib]System.Reflection.MethodInfo[] [mscorlib]System.Type::GetMethods(valuetype [mscorlib]System.Reflection.BindingFlags) - IL_0015: stloc.s V_4 - IL_0017: ldc.i4.0 - IL_0018: stloc.s V_5 - IL_001a: br.s IL_0088 - - IL_001c: ldloc.s V_4 - IL_001e: ldloc.s V_5 - IL_0020: ldelem.ref - IL_0021: stloc.1 - IL_0022: nop - IL_0023: ldstr "Test {0}:" - IL_0028: ldloc.1 - IL_0029: callvirt instance string [mscorlib]System.Reflection.MemberInfo::get_Name() - IL_002e: call void [System.Console]System.Console::WriteLine(string, - object) - IL_0033: nop - .try - { - IL_0034: nop - IL_0035: ldloc.1 - IL_0036: ldnull - IL_0037: ldc.i4.0 - IL_0038: newarr [mscorlib]System.Object - IL_003d: callvirt instance object [mscorlib]System.Reflection.MethodBase::Invoke(object, - object[]) - IL_0042: castclass [mscorlib]System.Type - IL_0047: stloc.2 - IL_0048: ldstr " + TYPE LOADED" - IL_004d: call void [System.Console]System.Console::WriteLine(string) - IL_0052: nop - IL_0053: ldstr " + TEST FAILED\n\n" - IL_0058: call void [System.Console]System.Console::WriteLine(string) - IL_005d: nop - IL_005e: ldc.i4.0 - IL_005f: stloc.0 - IL_0060: nop - IL_0061: leave.s IL_0080 - - } // end .try - catch [mscorlib]System.Object - { - IL_0063: pop - IL_0064: nop - IL_0065: ldstr " + TYPE NOT LOADED" - IL_006a: call void [System.Console]System.Console::WriteLine(string) - IL_006f: nop - IL_0070: ldstr " + TEST PASSED\n\n" - IL_0075: call void [System.Console]System.Console::WriteLine(string) - IL_007a: nop - IL_007e: leave.s IL_0080 - - } // end handler - IL_0080: nop - IL_0081: nop - IL_0082: ldloc.s V_5 - IL_0084: ldc.i4.1 - IL_0085: add - IL_0086: stloc.s V_5 - IL_0088: ldloc.s V_5 - IL_008a: ldloc.s V_4 - IL_008c: ldlen - IL_008d: conv.i4 - IL_008e: clt - IL_0090: stloc.s V_6 - IL_0092: ldloc.s V_6 - IL_0094: brtrue.s IL_001c - - IL_0096: ldloc.0 - IL_0097: ldc.i4.0 - IL_0098: ceq - IL_009a: stloc.s V_6 - IL_009c: ldloc.s V_6 - IL_009e: brtrue.s IL_00a5 - - IL_00a0: ldc.i4.s 100 - IL_00a2: stloc.3 - IL_00a3: br.s IL_00a9 - - IL_00a5: ldc.i4.m1 - IL_00a6: stloc.3 - IL_00a7: br.s IL_00a9 - - IL_00a9: ldloc.3 - IL_00aa: ret - } // end of method HelloWorld::Main - - .method public hidebysig static class [mscorlib]System.Type - Test_B() cil managed - { - // Code size 16 (0x10) - .maxstack 1 - .locals init (class [mscorlib]System.Type V_0) - IL_0000: nop - IL_0001: ldtoken B - IL_0006: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_000b: stloc.0 - IL_000c: br.s IL_000e - - IL_000e: ldloc.0 - IL_000f: ret - } // end of method HelloWorld::Test_B - - .method public hidebysig static class [mscorlib]System.Type - Test_C() cil managed - { - // Code size 16 (0x10) - .maxstack 1 - .locals init (class [mscorlib]System.Type V_0) - IL_0000: nop - IL_0001: ldtoken C - IL_0006: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) - IL_000b: stloc.0 - IL_000c: br.s IL_000e - - IL_000e: ldloc.0 - IL_000f: ret - } // end of method HelloWorld::Test_C - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method HelloWorld::.ctor - -} // end of class HelloWorld - -.class private auto ansi beforefieldinit A - extends [mscorlib]System.Object -{ - .method public hidebysig newslot virtual - instance void Print() cil managed - { - // Code size 13 (0xd) - .maxstack 8 - IL_0000: nop - IL_0001: ldstr "A.Print" - IL_0006: call void [System.Console]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ret - } // end of method A::Print - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method A::.ctor - -} // end of class A - -.class private auto ansi beforefieldinit B - extends A -{ - .method public hidebysig newslot virtual - instance void Print1() cil managed - { - .override A::Print - // Code size 13 (0xd) - .maxstack 8 - IL_0000: nop - IL_0001: ldstr "B.Print1" - IL_0006: call void [System.Console]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ret - } // end of method B::Print1 - - .method public hidebysig newslot virtual - instance void Print2() cil managed - { - .override A::Print - // Code size 13 (0xd) - .maxstack 8 - IL_0000: nop - IL_0001: ldstr "B.Print2" - IL_0006: call void [System.Console]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ret - } // end of method B::Print2 - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void A::.ctor() - IL_0006: ret - } // end of method B::.ctor - -} // end of class B - -.class private auto ansi beforefieldinit CBase - extends A -{ - .method public hidebysig virtual instance void - Print() cil managed - { - // Code size 13 (0xd) - .maxstack 8 - IL_0000: nop - IL_0001: ldstr "CBase.Print" - IL_0006: call void [System.Console]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ret - } // end of method CBase::Print - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void A::.ctor() - IL_0006: ret - } // end of method CBase::.ctor - -} // end of class CBase - -.class private auto ansi beforefieldinit C - extends CBase -{ - .method public hidebysig newslot virtual - instance void Print1() cil managed - { - .override A::Print - // Code size 13 (0xd) - .maxstack 8 - IL_0000: nop - IL_0001: ldstr "C.Print1" - IL_0006: call void [System.Console]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ret - } // end of method C::Print1 - - .method public hidebysig newslot virtual - instance void Print2() cil managed - { - .override CBase::Print - // Code size 13 (0xd) - .maxstack 8 - IL_0000: nop - IL_0001: ldstr "C.Print2" - IL_0006: call void [System.Console]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ret - } // end of method C::Print2 - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void CBase::.ctor() - IL_0006: ret - } // end of method C::.ctor - -} // end of class C - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file HelloWorld.res diff --git a/src/coreclr/tests/src/Loader/classloader/TSAmbiguities/Variance/Covariant_CollapsedInterfaces/HelloWorld.il b/src/coreclr/tests/src/Loader/classloader/TSAmbiguities/Variance/Covariant_CollapsedInterfaces/HelloWorld.il deleted file mode 100644 index 346eaa9f982a..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/TSAmbiguities/Variance/Covariant_CollapsedInterfaces/HelloWorld.il +++ /dev/null @@ -1,379 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } - -// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.20512.0 -// Copyright (c) Microsoft Corporation. All rights reserved. - - - -// Metadata version: v4.0.20512 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly HelloWorld -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module HelloWorld.exe -// MVID: {713D21D5-3295-43C3-9260-D4E561C25BB7} -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x00300000 - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class private auto ansi beforefieldinit HelloWorld - extends [mscorlib]System.Object -{ - .method private hidebysig static int32 - Main() cil managed - { - .entrypoint - // Code size 72 (0x48) - .maxstack 2 - .locals init (string V_0, - string V_1, - int32 V_2, - bool V_3) - IL_0000: nop - IL_0001: call string HelloWorld::StepAB() - IL_0006: stloc.0 - IL_0007: call string HelloWorld::StepBA() - IL_000c: stloc.1 - IL_000d: ldloc.0 - IL_000e: call void [System.Console]System.Console::WriteLine(string) - IL_0013: nop - IL_0014: ldloc.1 - IL_0015: call void [System.Console]System.Console::WriteLine(string) - IL_001a: nop - IL_001b: ldloc.0 - IL_001c: ldstr "XAB.Print(A='C_1')" - IL_0021: call bool [mscorlib]System.String::op_Equality(string, - string) - IL_0026: brfalse.s IL_0038 - - IL_0028: ldloc.1 - IL_0029: ldstr "XBA.Print(B='C_2')" - IL_002e: call bool [mscorlib]System.String::op_Equality(string, - string) - IL_0033: ldc.i4.0 - IL_0034: ceq - IL_0036: br.s IL_0039 - - IL_0038: ldc.i4.1 - IL_0039: stloc.3 - IL_003a: ldloc.3 - IL_003b: brtrue.s IL_0042 - - IL_003d: ldc.i4.s 100 - IL_003f: stloc.2 - IL_0040: br.s IL_0046 - - IL_0042: ldc.i4.m1 - IL_0043: stloc.2 - IL_0044: br.s IL_0046 - - IL_0046: ldloc.2 - IL_0047: ret - } // end of method HelloWorld::Main - - .method public hidebysig static string - StepAB() cil managed - { - // Code size 29 (0x1d) - .maxstack 3 - .locals init (class I`1 V_0, - string V_1) - IL_0000: nop - IL_0001: newobj instance void XAB::.ctor() - IL_0006: castclass class I`1 - IL_000b: stloc.0 - IL_000c: ldloc.0 - IL_000d: ldc.i4.1 - IL_000e: newobj instance void C::.ctor(int32) - IL_0013: callvirt instance string class I`1::Print(!0) - IL_0018: stloc.1 - IL_0019: br.s IL_001b - - IL_001b: ldloc.1 - IL_001c: ret - } // end of method HelloWorld::StepAB - - .method public hidebysig static string - StepBA() cil managed - { - // Code size 29 (0x1d) - .maxstack 3 - .locals init (class I`1 V_0, - string V_1) - IL_0000: nop - IL_0001: newobj instance void XBA::.ctor() - IL_0006: castclass class I`1 - IL_000b: stloc.0 - IL_000c: ldloc.0 - IL_000d: ldc.i4.2 - IL_000e: newobj instance void C::.ctor(int32) - IL_0013: callvirt instance string class I`1::Print(!0) - IL_0018: stloc.1 - IL_0019: br.s IL_001b - - IL_001b: ldloc.1 - IL_001c: ret - } // end of method HelloWorld::StepBA - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method HelloWorld::.ctor - -} // end of class HelloWorld - -.class interface private abstract auto ansi I`1<-T> -{ - .method public hidebysig newslot abstract virtual - instance string Print(!T t) cil managed - { - } // end of method I`1::Print - -} // end of class I`1 - - -.class private auto ansi beforefieldinit A - extends [mscorlib]System.Object -{ - .field family string 'value' - .method public hidebysig specialname rtspecialname - instance void .ctor(int32 index) cil managed - { - // Code size 32 (0x20) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: nop - IL_0007: nop - IL_0008: ldarg.0 - IL_0009: ldstr "A_" - IL_000e: ldarg.1 - IL_000f: box [mscorlib]System.Int32 - IL_0014: call string [mscorlib]System.String::Concat(object, - object) - IL_0019: stfld string A::'value' - IL_001e: nop - IL_001f: ret - } // end of method A::.ctor - - .method public hidebysig specialname instance string - get_Value() cil managed - { - // Code size 12 (0xc) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldfld string A::'value' - IL_0007: stloc.0 - IL_0008: br.s IL_000a - - IL_000a: ldloc.0 - IL_000b: ret - } // end of method A::get_Value - - .property instance string Value() - { - .get instance string A::get_Value() - } // end of property A::Value -} // end of class A - -.class private auto ansi beforefieldinit B - extends A -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(int32 index) cil managed - { - // Code size 33 (0x21) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: call instance void A::.ctor(int32) - IL_0007: nop - IL_0008: nop - IL_0009: ldarg.0 - IL_000a: ldstr "B_" - IL_000f: ldarg.1 - IL_0010: box [mscorlib]System.Int32 - IL_0015: call string [mscorlib]System.String::Concat(object, - object) - IL_001a: stfld string A::'value' - IL_001f: nop - IL_0020: ret - } // end of method B::.ctor - -} // end of class B - -.class private auto ansi beforefieldinit C - extends B -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(int32 index) cil managed - { - // Code size 33 (0x21) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: call instance void B::.ctor(int32) - IL_0007: nop - IL_0008: nop - IL_0009: ldarg.0 - IL_000a: ldstr "C_" - IL_000f: ldarg.1 - IL_0010: box [mscorlib]System.Int32 - IL_0015: call string [mscorlib]System.String::Concat(object, - object) - IL_001a: stfld string A::'value' - IL_001f: nop - IL_0020: ret - } // end of method C::.ctor - -} // end of class C - -.class private auto ansi beforefieldinit XAB - extends [mscorlib]System.Object - implements class I`1, - class I`1 -{ - .method public hidebysig newslot virtual final - instance string Print(class A a) cil managed - { - // Code size 27 (0x1b) - .maxstack 3 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "XAB.Print(A='" - IL_0006: ldarg.1 - IL_0007: callvirt instance string A::get_Value() - IL_000c: ldstr "')" - IL_0011: call string [mscorlib]System.String::Concat(string, - string, - string) - IL_0016: stloc.0 - IL_0017: br.s IL_0019 - - IL_0019: ldloc.0 - IL_001a: ret - } // end of method XAB::Print - - .method public hidebysig newslot virtual final - instance string Print(class B b) cil managed - { - // Code size 27 (0x1b) - .maxstack 3 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "XAB.Print(B='" - IL_0006: ldarg.1 - IL_0007: callvirt instance string A::get_Value() - IL_000c: ldstr "')" - IL_0011: call string [mscorlib]System.String::Concat(string, - string, - string) - IL_0016: stloc.0 - IL_0017: br.s IL_0019 - - IL_0019: ldloc.0 - IL_001a: ret - } // end of method XAB::Print - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method XAB::.ctor - -} // end of class XAB - -.class private auto ansi beforefieldinit XBA - extends [mscorlib]System.Object - implements class I`1, - class I`1 -{ - .method public hidebysig newslot virtual final - instance string Print(class B b) cil managed - { - // Code size 27 (0x1b) - .maxstack 3 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "XBA.Print(B='" - IL_0006: ldarg.1 - IL_0007: callvirt instance string A::get_Value() - IL_000c: ldstr "')" - IL_0011: call string [mscorlib]System.String::Concat(string, - string, - string) - IL_0016: stloc.0 - IL_0017: br.s IL_0019 - - IL_0019: ldloc.0 - IL_001a: ret - } // end of method XBA::Print - - .method public hidebysig newslot virtual final - instance string Print(class A a) cil managed - { - // Code size 27 (0x1b) - .maxstack 3 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "XBA.Print(A='" - IL_0006: ldarg.1 - IL_0007: callvirt instance string A::get_Value() - IL_000c: ldstr "')" - IL_0011: call string [mscorlib]System.String::Concat(string, - string, - string) - IL_0016: stloc.0 - IL_0017: br.s IL_0019 - - IL_0019: ldloc.0 - IL_001a: ret - } // end of method XBA::Print - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method XBA::.ctor - -} // end of class XBA - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file HelloWorld.res diff --git a/src/coreclr/tests/src/Loader/classloader/TSAmbiguities/Variance/Covariant_InherittedCollision/HelloWorld.il b/src/coreclr/tests/src/Loader/classloader/TSAmbiguities/Variance/Covariant_InherittedCollision/HelloWorld.il deleted file mode 100644 index 56445b0c27b0..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/TSAmbiguities/Variance/Covariant_InherittedCollision/HelloWorld.il +++ /dev/null @@ -1,476 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } - -// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.20512.0 -// Copyright (c) Microsoft Corporation. All rights reserved. - - - -// Metadata version: v4.0.20512 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly HelloWorld -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module HelloWorld.exe -// MVID: {E623A36D-5AFB-422F-A603-902960F86566} -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x016A0000 - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class private auto ansi beforefieldinit HelloWorld - extends [mscorlib]System.Object -{ - .method private hidebysig static int32 - Main() cil managed - { - .entrypoint - // Code size 129 (0x81) - .maxstack 2 - .locals init (string V_0, - string V_1, - string V_2, - string V_3, - int32 V_4, - bool V_5) - IL_0000: nop - IL_0001: call string HelloWorld::StepAB_1() - IL_0006: stloc.0 - IL_0007: call string HelloWorld::StepAB_2() - IL_000c: stloc.1 - IL_000d: call string HelloWorld::StepBA_1() - IL_0012: stloc.2 - IL_0013: call string HelloWorld::StepBA_2() - IL_0018: stloc.3 - IL_0019: ldloc.0 - IL_001a: call void [System.Console]System.Console::WriteLine(string) - IL_001f: nop - IL_0020: ldloc.1 - IL_0021: call void [System.Console]System.Console::WriteLine(string) - IL_0026: nop - IL_0027: ldloc.2 - IL_0028: call void [System.Console]System.Console::WriteLine(string) - IL_002d: nop - IL_002e: ldloc.3 - IL_002f: call void [System.Console]System.Console::WriteLine(string) - IL_0034: nop - IL_0035: ldloc.0 - IL_0036: ldstr "XIAB_1.Print(A='C_1')" - IL_003b: call bool [mscorlib]System.String::op_Equality(string, - string) - IL_0040: brfalse.s IL_006c - - IL_0042: ldloc.1 - IL_0043: ldstr "XIAB_2.Print(B='C_2')" - IL_0048: call bool [mscorlib]System.String::op_Equality(string, - string) - IL_004d: brfalse.s IL_006c - - IL_004f: ldloc.2 - IL_0050: ldstr "XIBA_1.Print(B='C_11')" - IL_0055: call bool [mscorlib]System.String::op_Equality(string, - string) - IL_005a: brfalse.s IL_006c - - IL_005c: ldloc.3 - IL_005d: ldstr "XIBA_2.Print(A='C_12')" - IL_0062: call bool [mscorlib]System.String::op_Equality(string, - string) - IL_0067: ldc.i4.0 - IL_0068: ceq - IL_006a: br.s IL_006d - - IL_006c: ldc.i4.1 - IL_006d: stloc.s V_5 - IL_006f: ldloc.s V_5 - IL_0071: brtrue.s IL_0079 - - IL_0073: ldc.i4.s 100 - IL_0075: stloc.s V_4 - IL_0077: br.s IL_007e - - IL_0079: ldc.i4.m1 - IL_007a: stloc.s V_4 - IL_007c: br.s IL_007e - - IL_007e: ldloc.s V_4 - IL_0080: ret - } // end of method HelloWorld::Main - - .method public hidebysig static string - StepAB_1() cil managed - { - // Code size 29 (0x1d) - .maxstack 3 - .locals init (class I`1 V_0, - string V_1) - IL_0000: nop - IL_0001: newobj instance void XIAB_1::.ctor() - IL_0006: castclass class I`1 - IL_000b: stloc.0 - IL_000c: ldloc.0 - IL_000d: ldc.i4.1 - IL_000e: newobj instance void C::.ctor(int32) - IL_0013: callvirt instance string class I`1::Print(!0) - IL_0018: stloc.1 - IL_0019: br.s IL_001b - - IL_001b: ldloc.1 - IL_001c: ret - } // end of method HelloWorld::StepAB_1 - - .method public hidebysig static string - StepAB_2() cil managed - { - // Code size 29 (0x1d) - .maxstack 3 - .locals init (class I`1 V_0, - string V_1) - IL_0000: nop - IL_0001: newobj instance void XIAB_2::.ctor() - IL_0006: castclass class I`1 - IL_000b: stloc.0 - IL_000c: ldloc.0 - IL_000d: ldc.i4.2 - IL_000e: newobj instance void C::.ctor(int32) - IL_0013: callvirt instance string class I`1::Print(!0) - IL_0018: stloc.1 - IL_0019: br.s IL_001b - - IL_001b: ldloc.1 - IL_001c: ret - } // end of method HelloWorld::StepAB_2 - - .method public hidebysig static string - StepBA_1() cil managed - { - // Code size 30 (0x1e) - .maxstack 3 - .locals init (class I`1 V_0, - string V_1) - IL_0000: nop - IL_0001: newobj instance void XIBA_1::.ctor() - IL_0006: castclass class I`1 - IL_000b: stloc.0 - IL_000c: ldloc.0 - IL_000d: ldc.i4.s 11 - IL_000f: newobj instance void C::.ctor(int32) - IL_0014: callvirt instance string class I`1::Print(!0) - IL_0019: stloc.1 - IL_001a: br.s IL_001c - - IL_001c: ldloc.1 - IL_001d: ret - } // end of method HelloWorld::StepBA_1 - - .method public hidebysig static string - StepBA_2() cil managed - { - // Code size 30 (0x1e) - .maxstack 3 - .locals init (class I`1 V_0, - string V_1) - IL_0000: nop - IL_0001: newobj instance void XIBA_2::.ctor() - IL_0006: castclass class I`1 - IL_000b: stloc.0 - IL_000c: ldloc.0 - IL_000d: ldc.i4.s 12 - IL_000f: newobj instance void C::.ctor(int32) - IL_0014: callvirt instance string class I`1::Print(!0) - IL_0019: stloc.1 - IL_001a: br.s IL_001c - - IL_001c: ldloc.1 - IL_001d: ret - } // end of method HelloWorld::StepBA_2 - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method HelloWorld::.ctor - -} // end of class HelloWorld - -.class interface private abstract auto ansi I`1<-T> -{ - .method public hidebysig newslot abstract virtual - instance string Print(!T t) cil managed - { - } // end of method I`1::Print - -} // end of class I`1 - -.class private auto ansi beforefieldinit A - extends [mscorlib]System.Object -{ - .field family string 'value' - .method public hidebysig specialname rtspecialname - instance void .ctor(int32 index) cil managed - { - // Code size 32 (0x20) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: nop - IL_0007: nop - IL_0008: ldarg.0 - IL_0009: ldstr "A_" - IL_000e: ldarg.1 - IL_000f: box [mscorlib]System.Int32 - IL_0014: call string [mscorlib]System.String::Concat(object, - object) - IL_0019: stfld string A::'value' - IL_001e: nop - IL_001f: ret - } // end of method A::.ctor - - .method public hidebysig specialname instance string - get_Value() cil managed - { - // Code size 12 (0xc) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldfld string A::'value' - IL_0007: stloc.0 - IL_0008: br.s IL_000a - - IL_000a: ldloc.0 - IL_000b: ret - } // end of method A::get_Value - - .property instance string Value() - { - .get instance string A::get_Value() - } // end of property A::Value -} // end of class A - -.class private auto ansi beforefieldinit B - extends A -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(int32 index) cil managed - { - // Code size 33 (0x21) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: call instance void A::.ctor(int32) - IL_0007: nop - IL_0008: nop - IL_0009: ldarg.0 - IL_000a: ldstr "B_" - IL_000f: ldarg.1 - IL_0010: box [mscorlib]System.Int32 - IL_0015: call string [mscorlib]System.String::Concat(object, - object) - IL_001a: stfld string A::'value' - IL_001f: nop - IL_0020: ret - } // end of method B::.ctor - -} // end of class B - -.class private auto ansi beforefieldinit C - extends B -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(int32 index) cil managed - { - // Code size 33 (0x21) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: call instance void B::.ctor(int32) - IL_0007: nop - IL_0008: nop - IL_0009: ldarg.0 - IL_000a: ldstr "C_" - IL_000f: ldarg.1 - IL_0010: box [mscorlib]System.Int32 - IL_0015: call string [mscorlib]System.String::Concat(object, - object) - IL_001a: stfld string A::'value' - IL_001f: nop - IL_0020: ret - } // end of method C::.ctor - -} // end of class C - -.class private auto ansi beforefieldinit XIAB_1 - extends [mscorlib]System.Object - implements class I`1 -{ - .method public hidebysig newslot virtual final - instance string Print(class A a) cil managed - { - // Code size 27 (0x1b) - .maxstack 3 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "XIAB_1.Print(A='" - IL_0006: ldarg.1 - IL_0007: callvirt instance string A::get_Value() - IL_000c: ldstr "')" - IL_0011: call string [mscorlib]System.String::Concat(string, - string, - string) - IL_0016: stloc.0 - IL_0017: br.s IL_0019 - - IL_0019: ldloc.0 - IL_001a: ret - } // end of method XIAB_1::Print - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method XIAB_1::.ctor - -} // end of class XIAB_1 - -.class private auto ansi beforefieldinit XIAB_2 - extends XIAB_1 - implements class I`1 -{ - .method public hidebysig newslot virtual final - instance string Print(class B b) cil managed - { - // Code size 27 (0x1b) - .maxstack 3 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "XIAB_2.Print(B='" - IL_0006: ldarg.1 - IL_0007: callvirt instance string A::get_Value() - IL_000c: ldstr "')" - IL_0011: call string [mscorlib]System.String::Concat(string, - string, - string) - IL_0016: stloc.0 - IL_0017: br.s IL_0019 - - IL_0019: ldloc.0 - IL_001a: ret - } // end of method XIAB_2::Print - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void XIAB_1::.ctor() - IL_0006: ret - } // end of method XIAB_2::.ctor - -} // end of class XIAB_2 - -.class private auto ansi beforefieldinit XIBA_1 - extends [mscorlib]System.Object - implements class I`1 -{ - .method public hidebysig newslot virtual final - instance string Print(class B b) cil managed - { - // Code size 27 (0x1b) - .maxstack 3 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "XIBA_1.Print(B='" - IL_0006: ldarg.1 - IL_0007: callvirt instance string A::get_Value() - IL_000c: ldstr "')" - IL_0011: call string [mscorlib]System.String::Concat(string, - string, - string) - IL_0016: stloc.0 - IL_0017: br.s IL_0019 - - IL_0019: ldloc.0 - IL_001a: ret - } // end of method XIBA_1::Print - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method XIBA_1::.ctor - -} // end of class XIBA_1 - -.class private auto ansi beforefieldinit XIBA_2 - extends XIBA_1 - implements class I`1 -{ - .method public hidebysig newslot virtual final - instance string Print(class A a) cil managed - { - // Code size 27 (0x1b) - .maxstack 3 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldstr "XIBA_2.Print(A='" - IL_0006: ldarg.1 - IL_0007: callvirt instance string A::get_Value() - IL_000c: ldstr "')" - IL_0011: call string [mscorlib]System.String::Concat(string, - string, - string) - IL_0016: stloc.0 - IL_0017: br.s IL_0019 - - IL_0019: ldloc.0 - IL_001a: ret - } // end of method XIBA_2::Print - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void XIBA_1::.ctor() - IL_0006: ret - } // end of method XIBA_2::.ctor - -} // end of class XIBA_2 - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file HelloWorld.res diff --git a/src/coreclr/tests/src/Loader/classloader/TSAmbiguities/Variance/Variant_CollapsedInterfaces/HelloWorld.il b/src/coreclr/tests/src/Loader/classloader/TSAmbiguities/Variance/Variant_CollapsedInterfaces/HelloWorld.il deleted file mode 100644 index 85843c046b34..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/TSAmbiguities/Variance/Variant_CollapsedInterfaces/HelloWorld.il +++ /dev/null @@ -1,413 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } - -// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.20512.0 -// Copyright (c) Microsoft Corporation. All rights reserved. - - - -// Metadata version: v4.0.20512 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly HelloWorld -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module HelloWorld.exe -// MVID: {926DC4B2-C753-404F-9BD2-D179FBD7F4F7} -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x00120000 - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class private auto ansi beforefieldinit HelloWorld - extends [mscorlib]System.Object -{ - .method private hidebysig static int32 - Main() cil managed - { - .entrypoint - // Code size 72 (0x48) - .maxstack 2 - .locals init (string V_0, - string V_1, - int32 V_2, - bool V_3) - IL_0000: nop - IL_0001: call string HelloWorld::StepBC() - IL_0006: stloc.0 - IL_0007: call string HelloWorld::StepCB() - IL_000c: stloc.1 - IL_000d: ldloc.0 - IL_000e: call void [System.Console]System.Console::WriteLine(string) - IL_0013: nop - IL_0014: ldloc.1 - IL_0015: call void [System.Console]System.Console::WriteLine(string) - IL_001a: nop - IL_001b: ldloc.0 - IL_001c: ldstr "B_1" - IL_0021: call bool [mscorlib]System.String::op_Equality(string, - string) - IL_0026: brfalse.s IL_0038 - - IL_0028: ldloc.1 - IL_0029: ldstr "C_11" - IL_002e: call bool [mscorlib]System.String::op_Equality(string, - string) - IL_0033: ldc.i4.0 - IL_0034: ceq - IL_0036: br.s IL_0039 - - IL_0038: ldc.i4.1 - IL_0039: stloc.3 - IL_003a: ldloc.3 - IL_003b: brtrue.s IL_0042 - - IL_003d: ldc.i4.s 100 - IL_003f: stloc.2 - IL_0040: br.s IL_0046 - - IL_0042: ldc.i4.m1 - IL_0043: stloc.2 - IL_0044: br.s IL_0046 - - IL_0046: ldloc.2 - IL_0047: ret - } // end of method HelloWorld::Main - - .method public hidebysig static string - StepBC() cil managed - { - // Code size 31 (0x1f) - .maxstack 2 - .locals init (class I`1 V_0, - class A V_1, - string V_2) - IL_0000: nop - IL_0001: newobj instance void XBC::.ctor() - IL_0006: castclass class I`1 - IL_000b: stloc.0 - IL_000c: ldloc.0 - IL_000d: ldc.i4.1 - IL_000e: callvirt instance !0 class I`1::Print(int32) - IL_0013: stloc.1 - IL_0014: ldloc.1 - IL_0015: callvirt instance string A::get_Value() - IL_001a: stloc.2 - IL_001b: br.s IL_001d - - IL_001d: ldloc.2 - IL_001e: ret - } // end of method HelloWorld::StepBC - - .method public hidebysig static string - StepCB() cil managed - { - // Code size 32 (0x20) - .maxstack 2 - .locals init (class I`1 V_0, - class A V_1, - string V_2) - IL_0000: nop - IL_0001: newobj instance void XCB::.ctor() - IL_0006: castclass class I`1 - IL_000b: stloc.0 - IL_000c: ldloc.0 - IL_000d: ldc.i4.s 11 - IL_000f: callvirt instance !0 class I`1::Print(int32) - IL_0014: stloc.1 - IL_0015: ldloc.1 - IL_0016: callvirt instance string A::get_Value() - IL_001b: stloc.2 - IL_001c: br.s IL_001e - - IL_001e: ldloc.2 - IL_001f: ret - } // end of method HelloWorld::StepCB - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method HelloWorld::.ctor - -} // end of class HelloWorld - -.class interface private abstract auto ansi I`1<+T> -{ - .method public hidebysig newslot abstract virtual - instance !T Print(int32 index) cil managed - { - } // end of method I`1::Print - -} // end of class I`1 - - -.class private auto ansi beforefieldinit A - extends [mscorlib]System.Object -{ - .field family string 'value' - .method public hidebysig specialname rtspecialname - instance void .ctor(int32 index) cil managed - { - // Code size 32 (0x20) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: nop - IL_0007: nop - IL_0008: ldarg.0 - IL_0009: ldstr "A_" - IL_000e: ldarg.1 - IL_000f: box [mscorlib]System.Int32 - IL_0014: call string [mscorlib]System.String::Concat(object, - object) - IL_0019: stfld string A::'value' - IL_001e: nop - IL_001f: ret - } // end of method A::.ctor - - .method public hidebysig specialname instance string - get_Value() cil managed - { - // Code size 12 (0xc) - .maxstack 1 - .locals init (string V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldfld string A::'value' - IL_0007: stloc.0 - IL_0008: br.s IL_000a - - IL_000a: ldloc.0 - IL_000b: ret - } // end of method A::get_Value - - .property instance string Value() - { - .get instance string A::get_Value() - } // end of property A::Value -} // end of class A - -.class private auto ansi beforefieldinit B - extends A -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(int32 index) cil managed - { - // Code size 33 (0x21) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: call instance void A::.ctor(int32) - IL_0007: nop - IL_0008: nop - IL_0009: ldarg.0 - IL_000a: ldstr "B_" - IL_000f: ldarg.1 - IL_0010: box [mscorlib]System.Int32 - IL_0015: call string [mscorlib]System.String::Concat(object, - object) - IL_001a: stfld string A::'value' - IL_001f: nop - IL_0020: ret - } // end of method B::.ctor - -} // end of class B - -.class private auto ansi beforefieldinit C - extends B -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(int32 index) cil managed - { - // Code size 33 (0x21) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: call instance void B::.ctor(int32) - IL_0007: nop - IL_0008: nop - IL_0009: ldarg.0 - IL_000a: ldstr "C_" - IL_000f: ldarg.1 - IL_0010: box [mscorlib]System.Int32 - IL_0015: call string [mscorlib]System.String::Concat(object, - object) - IL_001a: stfld string A::'value' - IL_001f: nop - IL_0020: ret - } // end of method C::.ctor - -} // end of class C - -.class private auto ansi beforefieldinit XBC - extends [mscorlib]System.Object - implements class I`1, - class I`1 -{ - .method public hidebysig newslot virtual final - instance class B Print(int32 index) cil managed - { - // Code size 37 (0x25) - .maxstack 3 - .locals init (class B V_0, - class B V_1) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: newobj instance void B::.ctor(int32) - IL_0007: stloc.0 - IL_0008: ldstr " B XBC.Print(index={0}) = '{1}'" - IL_000d: ldarg.1 - IL_000e: box [mscorlib]System.Int32 - IL_0013: ldloc.0 - IL_0014: callvirt instance string A::get_Value() - IL_0019: call void [System.Console]System.Console::WriteLine(string, - object, - object) - IL_001e: nop - IL_001f: ldloc.0 - IL_0020: stloc.1 - IL_0021: br.s IL_0023 - - IL_0023: ldloc.1 - IL_0024: ret - } // end of method XBC::Print - - .method public hidebysig newslot virtual final - instance class C Print(int32 index) cil managed - { - // Code size 37 (0x25) - .maxstack 3 - .locals init (class C V_0, - class C V_1) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: newobj instance void C::.ctor(int32) - IL_0007: stloc.0 - IL_0008: ldstr " C XBC.Print(index={0}) = '{1}'" - IL_000d: ldarg.1 - IL_000e: box [mscorlib]System.Int32 - IL_0013: ldloc.0 - IL_0014: callvirt instance string A::get_Value() - IL_0019: call void [System.Console]System.Console::WriteLine(string, - object, - object) - IL_001e: nop - IL_001f: ldloc.0 - IL_0020: stloc.1 - IL_0021: br.s IL_0023 - - IL_0023: ldloc.1 - IL_0024: ret - } // end of method XBC::Print2 - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method XBC::.ctor - -} // end of class XBC - -.class private auto ansi beforefieldinit XCB - extends [mscorlib]System.Object - implements class I`1, - class I`1 -{ - .method public hidebysig newslot virtual final - instance class C Print(int32 index) cil managed - { - // Code size 37 (0x25) - .maxstack 3 - .locals init (class C V_0, - class C V_1) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: newobj instance void C::.ctor(int32) - IL_0007: stloc.0 - IL_0008: ldstr " C XCB.Print(index={0}) = '{1}'" - IL_000d: ldarg.1 - IL_000e: box [mscorlib]System.Int32 - IL_0013: ldloc.0 - IL_0014: callvirt instance string A::get_Value() - IL_0019: call void [System.Console]System.Console::WriteLine(string, - object, - object) - IL_001e: nop - IL_001f: ldloc.0 - IL_0020: stloc.1 - IL_0021: br.s IL_0023 - - IL_0023: ldloc.1 - IL_0024: ret - } // end of method XCB::Print - - .method public hidebysig newslot virtual final - instance class B Print(int32 index) cil managed - { - // Code size 37 (0x25) - .maxstack 3 - .locals init (class B V_0, - class B V_1) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: newobj instance void B::.ctor(int32) - IL_0007: stloc.0 - IL_0008: ldstr " B XCB.Print(index={0}) = '{1}'" - IL_000d: ldarg.1 - IL_000e: box [mscorlib]System.Int32 - IL_0013: ldloc.0 - IL_0014: callvirt instance string A::get_Value() - IL_0019: call void [System.Console]System.Console::WriteLine(string, - object, - object) - IL_001e: nop - IL_001f: ldloc.0 - IL_0020: stloc.1 - IL_0021: br.s IL_0023 - - IL_0023: ldloc.1 - IL_0024: ret - } // end of method XCB::Print2 - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method XCB::.ctor - -} // end of class XCB - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file HelloWorld.res diff --git a/src/coreclr/tests/src/Loader/classloader/TSAmbiguities/Variance/Variant_InherittedCollision/HelloWorld.il b/src/coreclr/tests/src/Loader/classloader/TSAmbiguities/Variance/Variant_InherittedCollision/HelloWorld.il deleted file mode 100644 index b8e6d91fc37f..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/TSAmbiguities/Variance/Variant_InherittedCollision/HelloWorld.il +++ /dev/null @@ -1,518 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } - -// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.20512.0 -// Copyright (c) Microsoft Corporation. All rights reserved. - - - -// Metadata version: v4.0.20512 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly HelloWorld -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module HelloWorld.exe -// MVID: {8F0BCC1D-8425-48B7-A9BE-1043DA25AD87} -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x01B90000 - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class private auto ansi beforefieldinit HelloWorld - extends [mscorlib]System.Object -{ - .method private hidebysig static int32 - Main() cil managed - { - .entrypoint - // Code size 129 (0x81) - .maxstack 2 - .locals init (string V_0, - string V_1, - string V_2, - string V_3, - int32 V_4, - bool V_5) - IL_0000: nop - IL_0001: call string HelloWorld::StepBC_1() - IL_0006: stloc.0 - IL_0007: call string HelloWorld::StepBC_2() - IL_000c: stloc.1 - IL_000d: call string HelloWorld::StepCB_1() - IL_0012: stloc.2 - IL_0013: call string HelloWorld::StepCB_2() - IL_0018: stloc.3 - IL_0019: ldloc.0 - IL_001a: call void [System.Console]System.Console::WriteLine(string) - IL_001f: nop - IL_0020: ldloc.1 - IL_0021: call void [System.Console]System.Console::WriteLine(string) - IL_0026: nop - IL_0027: ldloc.2 - IL_0028: call void [System.Console]System.Console::WriteLine(string) - IL_002d: nop - IL_002e: ldloc.3 - IL_002f: call void [System.Console]System.Console::WriteLine(string) - IL_0034: nop - IL_0035: ldloc.0 - IL_0036: ldstr "B_1" - IL_003b: call bool [mscorlib]System.String::op_Equality(string, - string) - IL_0040: brfalse.s IL_006c - - IL_0042: ldloc.1 - IL_0043: ldstr "C_2" - IL_0048: call bool [mscorlib]System.String::op_Equality(string, - string) - IL_004d: brfalse.s IL_006c - - IL_004f: ldloc.2 - IL_0050: ldstr "C_11" - IL_0055: call bool [mscorlib]System.String::op_Equality(string, - string) - IL_005a: brfalse.s IL_006c - - IL_005c: ldloc.3 - IL_005d: ldstr "B_12" - IL_0062: call bool [mscorlib]System.String::op_Equality(string, - string) - IL_0067: ldc.i4.0 - IL_0068: ceq - IL_006a: br.s IL_006d - - IL_006c: ldc.i4.1 - IL_006d: stloc.s V_5 - IL_006f: ldloc.s V_5 - IL_0071: brtrue.s IL_0079 - - IL_0073: ldc.i4.s 100 - IL_0075: stloc.s V_4 - IL_0077: br.s IL_007e - - IL_0079: ldc.i4.m1 - IL_007a: stloc.s V_4 - IL_007c: br.s IL_007e - - IL_007e: ldloc.s V_4 - IL_0080: ret - } // end of method HelloWorld::Main - - .method public hidebysig static string - StepBC_1() cil managed - { - // Code size 31 (0x1f) - .maxstack 2 - .locals init (class I`1 V_0, - class A V_1, - string V_2) - IL_0000: nop - IL_0001: newobj instance void XIBC_1::.ctor() - IL_0006: castclass class I`1 - IL_000b: stloc.0 - IL_000c: ldloc.0 - IL_000d: ldc.i4.1 - IL_000e: callvirt instance !0 class I`1::Print(int32) - IL_0013: stloc.1 - IL_0014: ldloc.1 - IL_0015: callvirt instance string A::get_Value() - IL_001a: stloc.2 - IL_001b: br.s IL_001d - - IL_001d: ldloc.2 - IL_001e: ret - } // end of method HelloWorld::StepBC_1 - - .method public hidebysig static string - StepBC_2() cil managed - { - // Code size 31 (0x1f) - .maxstack 2 - .locals init (class I`1 V_0, - class A V_1, - string V_2) - IL_0000: nop - IL_0001: newobj instance void XIBC_2::.ctor() - IL_0006: castclass class I`1 - IL_000b: stloc.0 - IL_000c: ldloc.0 - IL_000d: ldc.i4.2 - IL_000e: callvirt instance !0 class I`1::Print(int32) - IL_0013: stloc.1 - IL_0014: ldloc.1 - IL_0015: callvirt instance string A::get_Value() - IL_001a: stloc.2 - IL_001b: br.s IL_001d - - IL_001d: ldloc.2 - IL_001e: ret - } // end of method HelloWorld::StepBC_2 - - .method public hidebysig static string - StepCB_1() cil managed - { - // Code size 32 (0x20) - .maxstack 2 - .locals init (class I`1 V_0, - class A V_1, - string V_2) - IL_0000: nop - IL_0001: newobj instance void XICB_1::.ctor() - IL_0006: castclass class I`1 - IL_000b: stloc.0 - IL_000c: ldloc.0 - IL_000d: ldc.i4.s 11 - IL_000f: callvirt instance !0 class I`1::Print(int32) - IL_0014: stloc.1 - IL_0015: ldloc.1 - IL_0016: callvirt instance string A::get_Value() - IL_001b: stloc.2 - IL_001c: br.s IL_001e - - IL_001e: ldloc.2 - IL_001f: ret - } // end of method HelloWorld::StepCB_1 - - .method public hidebysig static string - StepCB_2() cil managed - { - // Code size 32 (0x20) - .maxstack 2 - .locals init (class I`1 V_0, - class A V_1, - string V_2) - IL_0000: nop - IL_0001: newobj instance void XICB_2::.ctor() - IL_0006: castclass class I`1 - IL_000b: stloc.0 - IL_000c: ldloc.0 - IL_000d: ldc.i4.s 12 - IL_000f: callvirt instance !0 class I`1::Print(int32) - IL_0014: stloc.1 - IL_0015: ldloc.1 - IL_0016: callvirt instance string A::get_Value() - IL_001b: stloc.2 - IL_001c: br.s IL_001e - - IL_001e: ldloc.2 - IL_001f: ret - } // end of method HelloWorld::StepCB_2 - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method HelloWorld::.ctor - -} // end of class HelloWorld - -//CHANGE: add variance to I: -//.class interface private abstract auto ansi I`1 -.class interface private abstract auto ansi I`1<+T> -{ - .method public hidebysig newslot abstract virtual - instance !T Print(int32 index) cil managed - { - } // end of method I`1::Print - -} // end of class I`1 - -.class private auto ansi beforefieldinit A - extends [mscorlib]System.Object -{ - .field family string 'value' - .method public hidebysig specialname rtspecialname - instance void .ctor(int32 index) cil managed - { - // Code size 32 (0x20) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: nop - IL_0007: nop - IL_0008: ldarg.0 - IL_0009: ldstr "A_" - IL_000e: ldarg.1 - IL_000f: box [mscorlib]System.Int32 - IL_0014: call string [mscorlib]System.String::Concat(object, - object) - IL_0019: stfld string A::'value' - IL_001e: nop - IL_001f: ret - } // end of method A::.ctor - - .method public hidebysig specialname instance string - get_Value() cil managed - { - // Code size 12 (0xc) - .maxstack 1 - .locals init ([0] string CS$1$0000) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldfld string A::'value' - IL_0007: stloc.0 - IL_0008: br.s IL_000a - - IL_000a: ldloc.0 - IL_000b: ret - } // end of method A::get_Value - - .property instance string Value() - { - .get instance string A::get_Value() - } // end of property A::Value -} // end of class A - -.class private auto ansi beforefieldinit B - extends A -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(int32 index) cil managed - { - // Code size 33 (0x21) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: call instance void A::.ctor(int32) - IL_0007: nop - IL_0008: nop - IL_0009: ldarg.0 - IL_000a: ldstr "B_" - IL_000f: ldarg.1 - IL_0010: box [mscorlib]System.Int32 - IL_0015: call string [mscorlib]System.String::Concat(object, - object) - IL_001a: stfld string A::'value' - IL_001f: nop - IL_0020: ret - } // end of method B::.ctor - -} // end of class B - -.class private auto ansi beforefieldinit C - extends B -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(int32 index) cil managed - { - // Code size 33 (0x21) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: call instance void B::.ctor(int32) - IL_0007: nop - IL_0008: nop - IL_0009: ldarg.0 - IL_000a: ldstr "C_" - IL_000f: ldarg.1 - IL_0010: box [mscorlib]System.Int32 - IL_0015: call string [mscorlib]System.String::Concat(object, - object) - IL_001a: stfld string A::'value' - IL_001f: nop - IL_0020: ret - } // end of method C::.ctor - -} // end of class C - -.class private auto ansi beforefieldinit XIBC_1 - extends [mscorlib]System.Object - implements class I`1 -{ - .method public hidebysig newslot virtual final - instance class B Print(int32 index) cil managed - { - // Code size 37 (0x25) - .maxstack 3 - .locals init ([0] class B b, - [1] class B CS$1$0000) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: newobj instance void B::.ctor(int32) - IL_0007: stloc.0 - IL_0008: ldstr " B XIBC_1.Print(index={0}) = '{1}'" - IL_000d: ldarg.1 - IL_000e: box [mscorlib]System.Int32 - IL_0013: ldloc.0 - IL_0014: callvirt instance string A::get_Value() - IL_0019: call void [System.Console]System.Console::WriteLine(string, - object, - object) - IL_001e: nop - IL_001f: ldloc.0 - IL_0020: stloc.1 - IL_0021: br.s IL_0023 - - IL_0023: ldloc.1 - IL_0024: ret - } // end of method XIBC_1::Print - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method XIBC_1::.ctor - -} // end of class XIBC_1 - -.class private auto ansi beforefieldinit XIBC_2 - extends XIBC_1 - implements class I`1 -{ - .method public hidebysig newslot virtual final - instance class C Print(int32 index) cil managed - { - // Code size 37 (0x25) - .maxstack 3 - .locals init ([0] class C c, - [1] class C CS$1$0000) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: newobj instance void C::.ctor(int32) - IL_0007: stloc.0 - IL_0008: ldstr " C XIBC_2.Print(index={0}) = '{1}'" - IL_000d: ldarg.1 - IL_000e: box [mscorlib]System.Int32 - IL_0013: ldloc.0 - IL_0014: callvirt instance string A::get_Value() - IL_0019: call void [System.Console]System.Console::WriteLine(string, - object, - object) - IL_001e: nop - IL_001f: ldloc.0 - IL_0020: stloc.1 - IL_0021: br.s IL_0023 - - IL_0023: ldloc.1 - IL_0024: ret - } // end of method XIBC_2::Print - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void XIBC_1::.ctor() - IL_0006: ret - } // end of method XIBC_2::.ctor - -} // end of class XIBC_2 - -.class private auto ansi beforefieldinit XICB_1 - extends [mscorlib]System.Object - implements class I`1 -{ - .method public hidebysig newslot virtual final - instance class C Print(int32 index) cil managed - { - // Code size 37 (0x25) - .maxstack 3 - .locals init ([0] class C c, - [1] class C CS$1$0000) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: newobj instance void C::.ctor(int32) - IL_0007: stloc.0 - IL_0008: ldstr " C XICB_1.Print(index={0}) = '{1}'" - IL_000d: ldarg.1 - IL_000e: box [mscorlib]System.Int32 - IL_0013: ldloc.0 - IL_0014: callvirt instance string A::get_Value() - IL_0019: call void [System.Console]System.Console::WriteLine(string, - object, - object) - IL_001e: nop - IL_001f: ldloc.0 - IL_0020: stloc.1 - IL_0021: br.s IL_0023 - - IL_0023: ldloc.1 - IL_0024: ret - } // end of method XICB_1::Print - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method XICB_1::.ctor - -} // end of class XICB_1 - -.class private auto ansi beforefieldinit XICB_2 - extends XICB_1 - implements class I`1 -{ - .method public hidebysig newslot virtual final - instance class B Print(int32 index) cil managed - { - // Code size 37 (0x25) - .maxstack 3 - .locals init ([0] class B b, - [1] class B CS$1$0000) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: newobj instance void B::.ctor(int32) - IL_0007: stloc.0 - IL_0008: ldstr " B XICB_2.Print(index={0}) = '{1}'" - IL_000d: ldarg.1 - IL_000e: box [mscorlib]System.Int32 - IL_0013: ldloc.0 - IL_0014: callvirt instance string A::get_Value() - IL_0019: call void [System.Console]System.Console::WriteLine(string, - object, - object) - IL_001e: nop - IL_001f: ldloc.0 - IL_0020: stloc.1 - IL_0021: br.s IL_0023 - - IL_0023: ldloc.1 - IL_0024: ret - } // end of method XICB_2::Print - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void XICB_1::.ctor() - IL_0006: ret - } // end of method XICB_2::.ctor - -} // end of class XICB_2 - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file HelloWorld_out.res diff --git a/src/coreclr/tests/src/Loader/classloader/TypeForwarding/UnitTest/UnitTest.il b/src/coreclr/tests/src/Loader/classloader/TypeForwarding/UnitTest/UnitTest.il deleted file mode 100644 index 44090d817c23..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/TypeForwarding/UnitTest/UnitTest.il +++ /dev/null @@ -1,186 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern mscorlib { } - -.assembly extern MyDep -{ - .ver 1:0:0:0 -} - -.assembly UnitTest { } - - - -.class public auto ansi beforefieldinit Program - extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main(string[] args) cil managed noinlining - { - .entrypoint - // Code size 410 (0x19a) - .maxstack 3 - .locals init ([0] int32 V_0) - IL_0000: nop - IL_0001: nop - IL_0002: newobj instance void [MyDep]MyDep.Enclosing1::.ctor() - IL_0007: pop - IL_0008: ldstr "MyDep.Enclosing2, MyDep, Version=1.0.0.0, Culture=" - + "neutral, PublicKeyToken=null" - IL_000d: call class [mscorlib]System.Type [mscorlib]System.Type::GetType(string) - IL_0012: call object [mscorlib]System.Activator::CreateInstance(class [mscorlib]System.Type) - IL_0017: pop - IL_0018: newobj instance void [MyDep]MyDep.Enclosing1/Nested1/SubNested1::.ctor() - IL_001d: pop - IL_001e: ldstr "MyDep.Enclosing1+Nested1+SubNested2, MyDep, Versio" - + "n=1.0.0.0, Culture=neutral, PublicKeyToken=null" - IL_0023: call class [mscorlib]System.Type [mscorlib]System.Type::GetType(string) - IL_0028: call object [mscorlib]System.Activator::CreateInstance(class [mscorlib]System.Type) - IL_002d: pop - IL_002e: newobj instance void [MyDep]MyDep.Enclosing1/Nested2/SubNested1::.ctor() - IL_0033: pop - IL_0034: ldstr "MyDep.Enclosing1+Nested2+SubNested2, MyDep, Versio" - + "n=1.0.0.0, Culture=neutral, PublicKeyToken=null" - IL_0039: call class [mscorlib]System.Type [mscorlib]System.Type::GetType(string) - IL_003e: call object [mscorlib]System.Activator::CreateInstance(class [mscorlib]System.Type) - IL_0043: pop - IL_0044: ldstr "MyDep.Enclosing2+Nested1+SubNested1, MyDep, Versio" - + "n=1.0.0.0, Culture=neutral, PublicKeyToken=null" - IL_0049: call class [mscorlib]System.Type [mscorlib]System.Type::GetType(string) - IL_004e: call object [mscorlib]System.Activator::CreateInstance(class [mscorlib]System.Type) - IL_0053: pop - IL_0054: ldstr "MyDEP.EnclosING2+NesTED1+SubNesTED2, MyDep, Versio" - + "n=1.0.0.0, Culture=neutral, PublicKeyToken=null" - IL_0059: ldc.i4.1 - IL_005a: ldc.i4.1 - IL_005b: call class [mscorlib]System.Type [mscorlib]System.Type::GetType(string, - bool, - bool) - IL_0060: call object [mscorlib]System.Activator::CreateInstance(class [mscorlib]System.Type) - IL_0065: pop - IL_0066: ldstr "MyDep.Enclosing2+Nested2+SubNested1, MyDep, Versio" - + "n=1.0.0.0, Culture=neutral, PublicKeyToken=null" - IL_006b: call class [mscorlib]System.Type [mscorlib]System.Type::GetType(string) - IL_0070: call object [mscorlib]System.Activator::CreateInstance(class [mscorlib]System.Type) - IL_0075: pop - IL_0076: ldstr "MyDep.Enclosing2+Nested2+SubNested2, MyDep, Versio" - + "n=1.0.0.0, Culture=neutral, PublicKeyToken=null" - IL_007b: call class [mscorlib]System.Type [mscorlib]System.Type::GetType(string) - IL_0080: call object [mscorlib]System.Activator::CreateInstance(class [mscorlib]System.Type) - IL_0085: pop - IL_0086: nop - IL_0087: nop - IL_0088: newobj instance void [MyDep]MyDep2.Enclosing1::.ctor() - IL_008d: pop - IL_008e: ldstr "MyDep2.Enclosing2, MyDep, Version=1.0.0.0, Culture" - + "=neutral, PublicKeyToken=null" - IL_0093: call class [mscorlib]System.Type [mscorlib]System.Type::GetType(string) - IL_0098: call object [mscorlib]System.Activator::CreateInstance(class [mscorlib]System.Type) - IL_009d: pop - IL_009e: newobj instance void [MyDep]MyDep2.Enclosing1/Nested1/SubNested1::.ctor() - IL_00a3: pop - IL_00a4: ldstr "MyDep2.Enclosing1+Nested1+SubNested2, MyDep, Versi" - + "on=1.0.0.0, Culture=neutral, PublicKeyToken=null" - IL_00a9: call class [mscorlib]System.Type [mscorlib]System.Type::GetType(string) - IL_00ae: call object [mscorlib]System.Activator::CreateInstance(class [mscorlib]System.Type) - IL_00b3: pop - IL_00b4: newobj instance void [MyDep]MyDep2.Enclosing1/Nested2/SubNested1::.ctor() - IL_00b9: pop - IL_00ba: ldstr "MyDep2.Enclosing1+Nested2+SubNested2, MyDep, Versi" - + "on=1.0.0.0, Culture=neutral, PublicKeyToken=null" - IL_00bf: call class [mscorlib]System.Type [mscorlib]System.Type::GetType(string) - IL_00c4: call object [mscorlib]System.Activator::CreateInstance(class [mscorlib]System.Type) - IL_00c9: pop - IL_00ca: ldstr "MyDep2.Enclosing2+Nested1+SubNested1, MyDep, Versi" - + "on=1.0.0.0, Culture=neutral, PublicKeyToken=null" - IL_00cf: call class [mscorlib]System.Type [mscorlib]System.Type::GetType(string) - IL_00d4: call object [mscorlib]System.Activator::CreateInstance(class [mscorlib]System.Type) - IL_00d9: pop - IL_00da: ldstr "MyDEP2.EnclosING2+NesTED1+SubNesTED2, MyDep, Versi" - + "on=1.0.0.0, Culture=neutral, PublicKeyToken=null" - IL_00df: ldc.i4.1 - IL_00e0: ldc.i4.1 - IL_00e1: call class [mscorlib]System.Type [mscorlib]System.Type::GetType(string, - bool, - bool) - IL_00e6: call object [mscorlib]System.Activator::CreateInstance(class [mscorlib]System.Type) - IL_00eb: pop - IL_00ec: ldstr "MyDep2.Enclosing2+Nested2+SubNested1, MyDep, Versi" - + "on=1.0.0.0, Culture=neutral, PublicKeyToken=null" - IL_00f1: call class [mscorlib]System.Type [mscorlib]System.Type::GetType(string) - IL_00f6: call object [mscorlib]System.Activator::CreateInstance(class [mscorlib]System.Type) - IL_00fb: pop - IL_00fc: ldstr "MyDep2.Enclosing2+Nested2+SubNested2, MyDep, Versi" - + "on=1.0.0.0, Culture=neutral, PublicKeyToken=null" - IL_0101: call class [mscorlib]System.Type [mscorlib]System.Type::GetType(string) - IL_0106: call object [mscorlib]System.Activator::CreateInstance(class [mscorlib]System.Type) - IL_010b: pop - IL_010c: nop - IL_010d: nop - IL_010e: newobj instance void [MyDep]MyDep3.Enclosing1::.ctor() - IL_0113: pop - IL_0114: ldstr "MyDep3.Enclosing2, MyDep, Version=1.0.0.0, Culture" - + "=neutral, PublicKeyToken=null" - IL_0119: call class [mscorlib]System.Type [mscorlib]System.Type::GetType(string) - IL_011e: call object [mscorlib]System.Activator::CreateInstance(class [mscorlib]System.Type) - IL_0123: pop - IL_0124: newobj instance void [MyDep]MyDep3.Enclosing1/Nested1/SubNested1::.ctor() - IL_0129: pop - IL_012a: ldstr "MyDep3.Enclosing1+Nested1+SubNested2, MyDep, Versi" - + "on=1.0.0.0, Culture=neutral, PublicKeyToken=null" - IL_012f: call class [mscorlib]System.Type [mscorlib]System.Type::GetType(string) - IL_0134: call object [mscorlib]System.Activator::CreateInstance(class [mscorlib]System.Type) - IL_0139: pop - IL_013a: newobj instance void [MyDep]MyDep3.Enclosing1/Nested2/SubNested1::.ctor() - IL_013f: pop - IL_0140: ldstr "MyDep3.Enclosing1+Nested2+SubNested2, MyDep, Versi" - + "on=1.0.0.0, Culture=neutral, PublicKeyToken=null" - IL_0145: call class [mscorlib]System.Type [mscorlib]System.Type::GetType(string) - IL_014a: call object [mscorlib]System.Activator::CreateInstance(class [mscorlib]System.Type) - IL_014f: pop - IL_0150: ldstr "MyDep3.Enclosing2+Nested1+SubNested1, MyDep, Versi" - + "on=1.0.0.0, Culture=neutral, PublicKeyToken=null" - IL_0155: call class [mscorlib]System.Type [mscorlib]System.Type::GetType(string) - IL_015a: call object [mscorlib]System.Activator::CreateInstance(class [mscorlib]System.Type) - IL_015f: pop - IL_0160: ldstr "MyDEP3.EnclosING2+NesTED1+SubNesTED2, MyDep, Versi" - + "on=1.0.0.0, Culture=neutral, PublicKeyToken=null" - IL_0165: ldc.i4.1 - IL_0166: ldc.i4.1 - IL_0167: call class [mscorlib]System.Type [mscorlib]System.Type::GetType(string, - bool, - bool) - IL_016c: call object [mscorlib]System.Activator::CreateInstance(class [mscorlib]System.Type) - IL_0171: pop - IL_0172: ldstr "MyDep3.Enclosing2+Nested2+SubNested1, MyDep, Versi" - + "on=1.0.0.0, Culture=neutral, PublicKeyToken=null" - IL_0177: call class [mscorlib]System.Type [mscorlib]System.Type::GetType(string) - IL_017c: call object [mscorlib]System.Activator::CreateInstance(class [mscorlib]System.Type) - IL_0181: pop - IL_0182: ldstr "MyDep3.Enclosing2+Nested2+SubNested2, MyDep, Versi" - + "on=1.0.0.0, Culture=neutral, PublicKeyToken=null" - IL_0187: call class [mscorlib]System.Type [mscorlib]System.Type::GetType(string) - IL_018c: call object [mscorlib]System.Activator::CreateInstance(class [mscorlib]System.Type) - IL_0191: pop - IL_0192: nop - IL_0193: ldc.i4.s 100 - IL_0195: stloc.0 - IL_0196: br.s IL_0198 - - IL_0198: ldloc.0 - IL_0199: ret - } // end of method Program::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: nop - IL_0007: ret - } // end of method Program::.ctor - -} \ No newline at end of file diff --git a/src/coreclr/tests/src/Loader/classloader/TypeGeneratorTests/TestFramework/TestFramework.cs b/src/coreclr/tests/src/Loader/classloader/TypeGeneratorTests/TestFramework/TestFramework.cs deleted file mode 100644 index 24e610ae85bd..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/TypeGeneratorTests/TestFramework/TestFramework.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Reflection; -using System.Collections.Generic; -using System.IO; - -public class TestFramework -{ - public static void MethodCallTest(string actualResult, string expectedResults, string invocationString) - { - Console.WriteLine(invocationString); - Console.WriteLine(" -> EXPECTED: " + expectedResults); - Console.WriteLine(" -> GOT: " + actualResult); - - if (expectedResults != actualResult) - { - Console.WriteLine("Wrong method called when calling " + invocationString); - throw new Exception("Wrong method called"); - } - } - - public static void MethodCallTest(string expectedResults, string constrainedCallerMethod, int count, params string[] actualResults) - { - Console.WriteLine(constrainedCallerMethod); - - string[] expectedResultsArray = expectedResults.Split(new char[] { '#' }); - - Console.WriteLine(" # count = " + count); - Console.WriteLine(" # expectedResultsArray.Length = " + (expectedResultsArray.Length - 1)); - for (int i = 0; i < expectedResultsArray.Length - 1; i++) - Console.WriteLine(" # expectedResultsArray[" + i + "] = '" + expectedResultsArray[i] + "'"); - - - if ((expectedResults == "" && count != 0) || (expectedResults != "" && count == 0) || ((expectedResultsArray.Length - 1) != count) || (count > 0 && count != actualResults.Length)) - { - Console.WriteLine("Error in method count in constrained caller [ " + constrainedCallerMethod + " ]"); - throw new Exception("Method count failure"); - } - - bool success = true; - for (int i = 0; i < count; i++) - { - Console.WriteLine(" -> EXPECTED: " + expectedResultsArray[i]); - Console.WriteLine(" -> GOT: " + actualResults[i]); - - if (expectedResultsArray[i] != actualResults[i]) - { - Console.WriteLine("Wrong method called in constrained caller " + constrainedCallerMethod); - success = false; - } - } - if (!success) throw new Exception("Wrong method called"); - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/TypeInitialization/CctorsWithSideEffects/CctorThrowStaticFieldBFI.il b/src/coreclr/tests/src/Loader/classloader/TypeInitialization/CctorsWithSideEffects/CctorThrowStaticFieldBFI.il deleted file mode 100644 index 255282576c57..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/TypeInitialization/CctorsWithSideEffects/CctorThrowStaticFieldBFI.il +++ /dev/null @@ -1,346 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } - -// Microsoft (R) .NET Framework IL Disassembler. Version 2.0.50103.00 -// Copyright (C) Microsoft Corporation. All rights reserved. - - - -// Metadata version: v2.0.50103 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 2:0:0:0 -} -.assembly CctorThrowStaticFieldBFI -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module CctorThrowStaticFieldBFI.exe -// MVID: {A7BE6B3C-FF8D-43DB-B091-60CBA24AD082} -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x03090000 - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class public auto ansi beforefieldinit A - extends [mscorlib]System.Object -{ - .field public static int32 i - .method private hidebysig specialname rtspecialname static - void .cctor() cil managed - { - // Code size 24 (0x18) - .maxstack 8 - IL_0000: nop - IL_0001: ldstr "In A.cctor" - IL_0006: call void [System.Console]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldc.i4.5 - IL_000d: stsfld int32 A::i - IL_0012: newobj instance void [mscorlib]System.Exception::.ctor() - IL_0017: throw - } // end of method A::.cctor - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method A::.ctor - -} // end of class A - -.class public sequential ansi sealed B - extends [mscorlib]System.ValueType -{ - .pack 0 - .size 1 - .field public static int32 i - .method private hidebysig specialname rtspecialname static - void .cctor() cil managed - { - // Code size 24 (0x18) - .maxstack 8 - IL_0000: nop - IL_0001: ldstr "In B.cctor" - IL_0006: call void [System.Console]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldc.i4.5 - IL_000d: stsfld int32 B::i - IL_0012: newobj instance void [mscorlib]System.Exception::.ctor() - IL_0017: throw - } // end of method B::.cctor - -} // end of class B - -.class public auto ansi beforefieldinit Test - extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - // Code size 405 (0x195) - .maxstack 2 - .locals init (bool V_0, - class [mscorlib]System.Exception V_1, - int32 V_2, - bool V_3) - IL_0000: nop - IL_0001: ldc.i4.1 - IL_0002: stloc.0 - .try - { - IL_0003: nop - IL_0004: ldstr "Accessing class's static field" - IL_0009: call void [System.Console]System.Console::WriteLine(string) - IL_000e: nop - IL_000f: ldstr "A.i: " - IL_0014: ldsfld int32 A::i - IL_0019: box [mscorlib]System.Int32 - IL_001e: call string [mscorlib]System.String::Concat(object, - object) - IL_0023: call void [System.Console]System.Console::WriteLine(string) - IL_0028: nop - IL_0029: ldstr "Did not catch expected TypeInitializationException" - + " exception" - IL_002e: call void [System.Console]System.Console::WriteLine(string) - IL_0033: nop - IL_0034: ldc.i4.0 - IL_0035: stloc.0 - IL_0036: nop - IL_0037: leave.s IL_0061 - - } // end .try - catch [mscorlib]System.TypeInitializationException - { - IL_0039: pop - IL_003a: nop - IL_003b: ldstr "Caught expected exception 1st time" - IL_0040: call void [System.Console]System.Console::WriteLine(string) - IL_0045: nop - IL_0046: nop - IL_0047: leave.s IL_0061 - - } // end handler - catch [mscorlib]System.Exception - { - IL_0049: stloc.1 - IL_004a: nop - IL_004b: ldstr "Caught unexpected exception: " - IL_0050: ldloc.1 - IL_0051: call string [mscorlib]System.String::Concat(object, - object) - IL_0056: call void [System.Console]System.Console::WriteLine(string) - IL_005b: nop - IL_005c: ldc.i4.0 - IL_005d: stloc.0 - IL_005e: nop - IL_005f: leave.s IL_0061 - - } // end handler - IL_0061: nop - .try - { - IL_0062: nop - IL_0063: ldstr "A.i: " - IL_0068: ldsfld int32 A::i - IL_006d: box [mscorlib]System.Int32 - IL_0072: call string [mscorlib]System.String::Concat(object, - object) - IL_0077: call void [System.Console]System.Console::WriteLine(string) - IL_007c: nop - IL_007d: ldstr "Did not catch expected TypeInitializationException" - + " exception" - IL_0082: call void [System.Console]System.Console::WriteLine(string) - IL_0087: nop - IL_0088: ldc.i4.0 - IL_0089: stloc.0 - IL_008a: nop - IL_008b: leave.s IL_00b5 - - } // end .try - catch [mscorlib]System.TypeInitializationException - { - IL_008d: pop - IL_008e: nop - IL_008f: ldstr "Caught expected exception 2nd time\n" - IL_0094: call void [System.Console]System.Console::WriteLine(string) - IL_0099: nop - IL_009a: nop - IL_009b: leave.s IL_00b5 - - } // end handler - catch [mscorlib]System.Exception - { - IL_009d: stloc.1 - IL_009e: nop - IL_009f: ldstr "Caught unexpected exception: " - IL_00a4: ldloc.1 - IL_00a5: call string [mscorlib]System.String::Concat(object, - object) - IL_00aa: call void [System.Console]System.Console::WriteLine(string) - IL_00af: nop - IL_00b0: ldc.i4.0 - IL_00b1: stloc.0 - IL_00b2: nop - IL_00b3: leave.s IL_00b5 - - } // end handler - IL_00b5: nop - IL_00b6: ldstr "Accessing struct's static field" - IL_00bb: call void [System.Console]System.Console::WriteLine(string) - IL_00c0: nop - .try - { - IL_00c1: nop - IL_00c2: ldstr "B.i: " - IL_00c7: ldsfld int32 B::i - IL_00cc: box [mscorlib]System.Int32 - IL_00d1: call string [mscorlib]System.String::Concat(object, - object) - IL_00d6: call void [System.Console]System.Console::WriteLine(string) - IL_00db: nop - IL_00dc: ldstr "Did not catch expected TypeInitializationException" - + " exception" - IL_00e1: call void [System.Console]System.Console::WriteLine(string) - IL_00e6: nop - IL_00e7: ldc.i4.0 - IL_00e8: stloc.0 - IL_00e9: nop - IL_00ea: leave.s IL_0114 - - } // end .try - catch [mscorlib]System.TypeInitializationException - { - IL_00ec: pop - IL_00ed: nop - IL_00ee: ldstr "Caught expected exception 1st time" - IL_00f3: call void [System.Console]System.Console::WriteLine(string) - IL_00f8: nop - IL_00f9: nop - IL_00fa: leave.s IL_0114 - - } // end handler - catch [mscorlib]System.Exception - { - IL_00fc: stloc.1 - IL_00fd: nop - IL_00fe: ldstr "Caught unexpected exception: " - IL_0103: ldloc.1 - IL_0104: call string [mscorlib]System.String::Concat(object, - object) - IL_0109: call void [System.Console]System.Console::WriteLine(string) - IL_010e: nop - IL_010f: ldc.i4.0 - IL_0110: stloc.0 - IL_0111: nop - IL_0112: leave.s IL_0114 - - } // end handler - IL_0114: nop - .try - { - IL_0115: nop - IL_0116: ldstr "B.i: " - IL_011b: ldsfld int32 B::i - IL_0120: box [mscorlib]System.Int32 - IL_0125: call string [mscorlib]System.String::Concat(object, - object) - IL_012a: call void [System.Console]System.Console::WriteLine(string) - IL_012f: nop - IL_0130: ldstr "Did not catch expected TypeInitializationException" - + " exception" - IL_0135: call void [System.Console]System.Console::WriteLine(string) - IL_013a: nop - IL_013b: ldc.i4.0 - IL_013c: stloc.0 - IL_013d: nop - IL_013e: leave.s IL_0168 - - } // end .try - catch [mscorlib]System.TypeInitializationException - { - IL_0140: pop - IL_0141: nop - IL_0142: ldstr "Caught expected exception 2nd time\n" - IL_0147: call void [System.Console]System.Console::WriteLine(string) - IL_014c: nop - IL_014d: nop - IL_014e: leave.s IL_0168 - - } // end handler - catch [mscorlib]System.Exception - { - IL_0150: stloc.1 - IL_0151: nop - IL_0152: ldstr "Caught unexpected exception: " - IL_0157: ldloc.1 - IL_0158: call string [mscorlib]System.String::Concat(object, - object) - IL_015d: call void [System.Console]System.Console::WriteLine(string) - IL_0162: nop - IL_0163: ldc.i4.0 - IL_0164: stloc.0 - IL_0165: nop - IL_0166: leave.s IL_0168 - - } // end handler - IL_0168: nop - IL_0169: ldloc.0 - IL_016a: ldc.i4.0 - IL_016b: ceq - IL_016d: stloc.3 - IL_016e: ldloc.3 - IL_016f: brtrue.s IL_0182 - - IL_0171: nop - IL_0172: ldstr "PASS" - IL_0177: call void [System.Console]System.Console::WriteLine(string) - IL_017c: nop - IL_017d: ldc.i4.s 100 - IL_017f: stloc.2 - IL_0180: br.s IL_0193 - - IL_0182: nop - IL_0183: ldstr "FAIL" - IL_0188: call void [System.Console]System.Console::WriteLine(string) - IL_018d: nop - IL_018e: ldc.i4.s 101 - IL_0190: stloc.2 - IL_0191: br.s IL_0193 - - IL_0193: ldloc.2 - IL_0194: ret - } // end of method Test::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method Test::.ctor - -} // end of class Test - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file TypeLoadInitExcepBFI.res diff --git a/src/coreclr/tests/src/Loader/classloader/TypeInitialization/CircularCctors/CircularCctorThreeThreads03.cs b/src/coreclr/tests/src/Loader/classloader/TypeInitialization/CircularCctors/CircularCctorThreeThreads03.cs deleted file mode 100644 index 5b6b09070975..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/TypeInitialization/CircularCctors/CircularCctorThreeThreads03.cs +++ /dev/null @@ -1,180 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/* -A --> B --> C --> D --> E --> A -3 threads: Thread T1 starts initialization at A, thread T2 starts initialization at C, and thread T3 starts initialization at E. -A::.cctor sleeps for a few seconds so Thread T1 is blocked. -C::.cctor sleeps for a few seconds so Thread T2 is blocked. - -T3 invokes E::.cctor and blocks because T1 is in A::.cctor. -T1 becomes unblocked, invokes B::.cctor, tries to invoke C::.cctor and becomes blocked (because C::.cctor is used by T2). -T2 becomes unblocked , invokes D.::cctor, tries to invokes E::.cctor at which point we get 3 thread deadlock since T3 is waiting for T1 and T1 is waiting for T2 and T2 is waiting for T3. -We detect the deadlock and allow T2 to see E.i uninitialized state. - -In D.cctor: thread T2: E.i 0 -In C.cctor: thread T2: D.i 8 -In B.cctor: thread T1: C.i 7 -In A.cctor: thread T1: B.i 6 -In E.cctor: thread T3: A.i 5 -*/ - -using System; -using System.Threading; -using System.Runtime.CompilerServices; -public class A -{ - public static int i; - - static A() - { - - Thread.Sleep(1000*2); // 1 second - Console.WriteLine("In A.cctor: thread {0}: B.i {1}",Thread.CurrentThread.Name,B.i); - A.i = 5; - } - - // invoking this should trigger the cctor - [MethodImpl(MethodImplOptions.NoInlining)] - public static void SomeMethod() - { - Console.WriteLine("In MyClass.SomeMethod(): thread {0}",Thread.CurrentThread.Name); - } - -} - -public class B -{ - public static int i; - - static B() - { - - - Console.WriteLine("In B.cctor: thread {0}: C.i {1}",Thread.CurrentThread.Name,C.i); - B.i = 6; - } - - // invoking this should trigger the cctor - [MethodImpl(MethodImplOptions.NoInlining)] - public static void SomeMethod() - { - Console.WriteLine("In MyClass.SomeMethod(): thread {0}",Thread.CurrentThread.Name); - } - -} - -public class C -{ - public static int i; - - static C() - { - - Thread.Sleep(1000*2); // 1 second - Console.WriteLine("In C.cctor: thread {0}: D.i {1}",Thread.CurrentThread.Name,D.i); - C.i = 7; - } - - // invoking this should trigger the cctor - [MethodImpl(MethodImplOptions.NoInlining)] - public static void SomeMethod() - { - Console.WriteLine("In MyClass.SomeMethod(): thread {0}",Thread.CurrentThread.Name); - } - -} - -public class D -{ - public static int i; - - static D() - { - Console.WriteLine("In D.cctor: thread {0}: E.i {1}",Thread.CurrentThread.Name,E.i); - D.i = 8; - } - - // invoking this should trigger the cctor - [MethodImpl(MethodImplOptions.NoInlining)] - public static void SomeMethod() - { - Console.WriteLine("In MyClass.SomeMethod(): thread {0}",Thread.CurrentThread.Name); - } - -} - -public class E -{ - public static int i; - - static E() - { - Console.WriteLine("In E.cctor: thread {0}: A.i {1}",Thread.CurrentThread.Name,A.i); - E.i = 9; - } - - // invoking this should trigger the cctor - [MethodImpl(MethodImplOptions.NoInlining)] - public static void SomeMethod() - { - Console.WriteLine("In MyClass.SomeMethod(): thread {0}",Thread.CurrentThread.Name); - } - -} - -public class Test -{ - - public static void RunGetA() - { - A.SomeMethod(); - } - - public static void RunGetC() - { - C.SomeMethod(); - } - - public static void RunGetE() - { - E.SomeMethod(); - } - - - public static int Main() - { - - Thread t1 = new Thread(RunGetA); - t1.Name = "T1"; - Thread t2 = new Thread(RunGetC); - t2.Name = "T2"; - Thread t3 = new Thread(RunGetE); - t3.Name = "T3"; - - - - t1.Start(); - Thread.Sleep(1000*1); // 1 second - t2.Start(); - Thread.Sleep(1000*1); // 1 second - t3.Start(); - - t3.Join(); - t2.Join(); - t1.Join(); - - // make sure that statics were set correctly. - if ( A.i == 5 && B.i == 6 && C.i == 7 && D.i == 8 && E.i == 9 ) - { - Console.WriteLine("PASS"); - return 100; - } - else - { - Console.WriteLine("FAIL"); - return 101; - } - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/TypeInitialization/CoreCLR/CctorThrowStaticFieldBFI.il b/src/coreclr/tests/src/Loader/classloader/TypeInitialization/CoreCLR/CctorThrowStaticFieldBFI.il deleted file mode 100644 index 255282576c57..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/TypeInitialization/CoreCLR/CctorThrowStaticFieldBFI.il +++ /dev/null @@ -1,346 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } - -// Microsoft (R) .NET Framework IL Disassembler. Version 2.0.50103.00 -// Copyright (C) Microsoft Corporation. All rights reserved. - - - -// Metadata version: v2.0.50103 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 2:0:0:0 -} -.assembly CctorThrowStaticFieldBFI -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module CctorThrowStaticFieldBFI.exe -// MVID: {A7BE6B3C-FF8D-43DB-B091-60CBA24AD082} -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x03090000 - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class public auto ansi beforefieldinit A - extends [mscorlib]System.Object -{ - .field public static int32 i - .method private hidebysig specialname rtspecialname static - void .cctor() cil managed - { - // Code size 24 (0x18) - .maxstack 8 - IL_0000: nop - IL_0001: ldstr "In A.cctor" - IL_0006: call void [System.Console]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldc.i4.5 - IL_000d: stsfld int32 A::i - IL_0012: newobj instance void [mscorlib]System.Exception::.ctor() - IL_0017: throw - } // end of method A::.cctor - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method A::.ctor - -} // end of class A - -.class public sequential ansi sealed B - extends [mscorlib]System.ValueType -{ - .pack 0 - .size 1 - .field public static int32 i - .method private hidebysig specialname rtspecialname static - void .cctor() cil managed - { - // Code size 24 (0x18) - .maxstack 8 - IL_0000: nop - IL_0001: ldstr "In B.cctor" - IL_0006: call void [System.Console]System.Console::WriteLine(string) - IL_000b: nop - IL_000c: ldc.i4.5 - IL_000d: stsfld int32 B::i - IL_0012: newobj instance void [mscorlib]System.Exception::.ctor() - IL_0017: throw - } // end of method B::.cctor - -} // end of class B - -.class public auto ansi beforefieldinit Test - extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - // Code size 405 (0x195) - .maxstack 2 - .locals init (bool V_0, - class [mscorlib]System.Exception V_1, - int32 V_2, - bool V_3) - IL_0000: nop - IL_0001: ldc.i4.1 - IL_0002: stloc.0 - .try - { - IL_0003: nop - IL_0004: ldstr "Accessing class's static field" - IL_0009: call void [System.Console]System.Console::WriteLine(string) - IL_000e: nop - IL_000f: ldstr "A.i: " - IL_0014: ldsfld int32 A::i - IL_0019: box [mscorlib]System.Int32 - IL_001e: call string [mscorlib]System.String::Concat(object, - object) - IL_0023: call void [System.Console]System.Console::WriteLine(string) - IL_0028: nop - IL_0029: ldstr "Did not catch expected TypeInitializationException" - + " exception" - IL_002e: call void [System.Console]System.Console::WriteLine(string) - IL_0033: nop - IL_0034: ldc.i4.0 - IL_0035: stloc.0 - IL_0036: nop - IL_0037: leave.s IL_0061 - - } // end .try - catch [mscorlib]System.TypeInitializationException - { - IL_0039: pop - IL_003a: nop - IL_003b: ldstr "Caught expected exception 1st time" - IL_0040: call void [System.Console]System.Console::WriteLine(string) - IL_0045: nop - IL_0046: nop - IL_0047: leave.s IL_0061 - - } // end handler - catch [mscorlib]System.Exception - { - IL_0049: stloc.1 - IL_004a: nop - IL_004b: ldstr "Caught unexpected exception: " - IL_0050: ldloc.1 - IL_0051: call string [mscorlib]System.String::Concat(object, - object) - IL_0056: call void [System.Console]System.Console::WriteLine(string) - IL_005b: nop - IL_005c: ldc.i4.0 - IL_005d: stloc.0 - IL_005e: nop - IL_005f: leave.s IL_0061 - - } // end handler - IL_0061: nop - .try - { - IL_0062: nop - IL_0063: ldstr "A.i: " - IL_0068: ldsfld int32 A::i - IL_006d: box [mscorlib]System.Int32 - IL_0072: call string [mscorlib]System.String::Concat(object, - object) - IL_0077: call void [System.Console]System.Console::WriteLine(string) - IL_007c: nop - IL_007d: ldstr "Did not catch expected TypeInitializationException" - + " exception" - IL_0082: call void [System.Console]System.Console::WriteLine(string) - IL_0087: nop - IL_0088: ldc.i4.0 - IL_0089: stloc.0 - IL_008a: nop - IL_008b: leave.s IL_00b5 - - } // end .try - catch [mscorlib]System.TypeInitializationException - { - IL_008d: pop - IL_008e: nop - IL_008f: ldstr "Caught expected exception 2nd time\n" - IL_0094: call void [System.Console]System.Console::WriteLine(string) - IL_0099: nop - IL_009a: nop - IL_009b: leave.s IL_00b5 - - } // end handler - catch [mscorlib]System.Exception - { - IL_009d: stloc.1 - IL_009e: nop - IL_009f: ldstr "Caught unexpected exception: " - IL_00a4: ldloc.1 - IL_00a5: call string [mscorlib]System.String::Concat(object, - object) - IL_00aa: call void [System.Console]System.Console::WriteLine(string) - IL_00af: nop - IL_00b0: ldc.i4.0 - IL_00b1: stloc.0 - IL_00b2: nop - IL_00b3: leave.s IL_00b5 - - } // end handler - IL_00b5: nop - IL_00b6: ldstr "Accessing struct's static field" - IL_00bb: call void [System.Console]System.Console::WriteLine(string) - IL_00c0: nop - .try - { - IL_00c1: nop - IL_00c2: ldstr "B.i: " - IL_00c7: ldsfld int32 B::i - IL_00cc: box [mscorlib]System.Int32 - IL_00d1: call string [mscorlib]System.String::Concat(object, - object) - IL_00d6: call void [System.Console]System.Console::WriteLine(string) - IL_00db: nop - IL_00dc: ldstr "Did not catch expected TypeInitializationException" - + " exception" - IL_00e1: call void [System.Console]System.Console::WriteLine(string) - IL_00e6: nop - IL_00e7: ldc.i4.0 - IL_00e8: stloc.0 - IL_00e9: nop - IL_00ea: leave.s IL_0114 - - } // end .try - catch [mscorlib]System.TypeInitializationException - { - IL_00ec: pop - IL_00ed: nop - IL_00ee: ldstr "Caught expected exception 1st time" - IL_00f3: call void [System.Console]System.Console::WriteLine(string) - IL_00f8: nop - IL_00f9: nop - IL_00fa: leave.s IL_0114 - - } // end handler - catch [mscorlib]System.Exception - { - IL_00fc: stloc.1 - IL_00fd: nop - IL_00fe: ldstr "Caught unexpected exception: " - IL_0103: ldloc.1 - IL_0104: call string [mscorlib]System.String::Concat(object, - object) - IL_0109: call void [System.Console]System.Console::WriteLine(string) - IL_010e: nop - IL_010f: ldc.i4.0 - IL_0110: stloc.0 - IL_0111: nop - IL_0112: leave.s IL_0114 - - } // end handler - IL_0114: nop - .try - { - IL_0115: nop - IL_0116: ldstr "B.i: " - IL_011b: ldsfld int32 B::i - IL_0120: box [mscorlib]System.Int32 - IL_0125: call string [mscorlib]System.String::Concat(object, - object) - IL_012a: call void [System.Console]System.Console::WriteLine(string) - IL_012f: nop - IL_0130: ldstr "Did not catch expected TypeInitializationException" - + " exception" - IL_0135: call void [System.Console]System.Console::WriteLine(string) - IL_013a: nop - IL_013b: ldc.i4.0 - IL_013c: stloc.0 - IL_013d: nop - IL_013e: leave.s IL_0168 - - } // end .try - catch [mscorlib]System.TypeInitializationException - { - IL_0140: pop - IL_0141: nop - IL_0142: ldstr "Caught expected exception 2nd time\n" - IL_0147: call void [System.Console]System.Console::WriteLine(string) - IL_014c: nop - IL_014d: nop - IL_014e: leave.s IL_0168 - - } // end handler - catch [mscorlib]System.Exception - { - IL_0150: stloc.1 - IL_0151: nop - IL_0152: ldstr "Caught unexpected exception: " - IL_0157: ldloc.1 - IL_0158: call string [mscorlib]System.String::Concat(object, - object) - IL_015d: call void [System.Console]System.Console::WriteLine(string) - IL_0162: nop - IL_0163: ldc.i4.0 - IL_0164: stloc.0 - IL_0165: nop - IL_0166: leave.s IL_0168 - - } // end handler - IL_0168: nop - IL_0169: ldloc.0 - IL_016a: ldc.i4.0 - IL_016b: ceq - IL_016d: stloc.3 - IL_016e: ldloc.3 - IL_016f: brtrue.s IL_0182 - - IL_0171: nop - IL_0172: ldstr "PASS" - IL_0177: call void [System.Console]System.Console::WriteLine(string) - IL_017c: nop - IL_017d: ldc.i4.s 100 - IL_017f: stloc.2 - IL_0180: br.s IL_0193 - - IL_0182: nop - IL_0183: ldstr "FAIL" - IL_0188: call void [System.Console]System.Console::WriteLine(string) - IL_018d: nop - IL_018e: ldc.i4.s 101 - IL_0190: stloc.2 - IL_0191: br.s IL_0193 - - IL_0193: ldloc.2 - IL_0194: ret - } // end of method Test::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method Test::.ctor - -} // end of class Test - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file TypeLoadInitExcepBFI.res diff --git a/src/coreclr/tests/src/Loader/classloader/TypeInitialization/CoreCLR/CircularCctorThreeThreads03.cs b/src/coreclr/tests/src/Loader/classloader/TypeInitialization/CoreCLR/CircularCctorThreeThreads03.cs deleted file mode 100644 index 5b6b09070975..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/TypeInitialization/CoreCLR/CircularCctorThreeThreads03.cs +++ /dev/null @@ -1,180 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/* -A --> B --> C --> D --> E --> A -3 threads: Thread T1 starts initialization at A, thread T2 starts initialization at C, and thread T3 starts initialization at E. -A::.cctor sleeps for a few seconds so Thread T1 is blocked. -C::.cctor sleeps for a few seconds so Thread T2 is blocked. - -T3 invokes E::.cctor and blocks because T1 is in A::.cctor. -T1 becomes unblocked, invokes B::.cctor, tries to invoke C::.cctor and becomes blocked (because C::.cctor is used by T2). -T2 becomes unblocked , invokes D.::cctor, tries to invokes E::.cctor at which point we get 3 thread deadlock since T3 is waiting for T1 and T1 is waiting for T2 and T2 is waiting for T3. -We detect the deadlock and allow T2 to see E.i uninitialized state. - -In D.cctor: thread T2: E.i 0 -In C.cctor: thread T2: D.i 8 -In B.cctor: thread T1: C.i 7 -In A.cctor: thread T1: B.i 6 -In E.cctor: thread T3: A.i 5 -*/ - -using System; -using System.Threading; -using System.Runtime.CompilerServices; -public class A -{ - public static int i; - - static A() - { - - Thread.Sleep(1000*2); // 1 second - Console.WriteLine("In A.cctor: thread {0}: B.i {1}",Thread.CurrentThread.Name,B.i); - A.i = 5; - } - - // invoking this should trigger the cctor - [MethodImpl(MethodImplOptions.NoInlining)] - public static void SomeMethod() - { - Console.WriteLine("In MyClass.SomeMethod(): thread {0}",Thread.CurrentThread.Name); - } - -} - -public class B -{ - public static int i; - - static B() - { - - - Console.WriteLine("In B.cctor: thread {0}: C.i {1}",Thread.CurrentThread.Name,C.i); - B.i = 6; - } - - // invoking this should trigger the cctor - [MethodImpl(MethodImplOptions.NoInlining)] - public static void SomeMethod() - { - Console.WriteLine("In MyClass.SomeMethod(): thread {0}",Thread.CurrentThread.Name); - } - -} - -public class C -{ - public static int i; - - static C() - { - - Thread.Sleep(1000*2); // 1 second - Console.WriteLine("In C.cctor: thread {0}: D.i {1}",Thread.CurrentThread.Name,D.i); - C.i = 7; - } - - // invoking this should trigger the cctor - [MethodImpl(MethodImplOptions.NoInlining)] - public static void SomeMethod() - { - Console.WriteLine("In MyClass.SomeMethod(): thread {0}",Thread.CurrentThread.Name); - } - -} - -public class D -{ - public static int i; - - static D() - { - Console.WriteLine("In D.cctor: thread {0}: E.i {1}",Thread.CurrentThread.Name,E.i); - D.i = 8; - } - - // invoking this should trigger the cctor - [MethodImpl(MethodImplOptions.NoInlining)] - public static void SomeMethod() - { - Console.WriteLine("In MyClass.SomeMethod(): thread {0}",Thread.CurrentThread.Name); - } - -} - -public class E -{ - public static int i; - - static E() - { - Console.WriteLine("In E.cctor: thread {0}: A.i {1}",Thread.CurrentThread.Name,A.i); - E.i = 9; - } - - // invoking this should trigger the cctor - [MethodImpl(MethodImplOptions.NoInlining)] - public static void SomeMethod() - { - Console.WriteLine("In MyClass.SomeMethod(): thread {0}",Thread.CurrentThread.Name); - } - -} - -public class Test -{ - - public static void RunGetA() - { - A.SomeMethod(); - } - - public static void RunGetC() - { - C.SomeMethod(); - } - - public static void RunGetE() - { - E.SomeMethod(); - } - - - public static int Main() - { - - Thread t1 = new Thread(RunGetA); - t1.Name = "T1"; - Thread t2 = new Thread(RunGetC); - t2.Name = "T2"; - Thread t3 = new Thread(RunGetE); - t3.Name = "T3"; - - - - t1.Start(); - Thread.Sleep(1000*1); // 1 second - t2.Start(); - Thread.Sleep(1000*1); // 1 second - t3.Start(); - - t3.Join(); - t2.Join(); - t1.Join(); - - // make sure that statics were set correctly. - if ( A.i == 5 && B.i == 6 && C.i == 7 && D.i == 8 && E.i == 9 ) - { - Console.WriteLine("PASS"); - return 100; - } - else - { - Console.WriteLine("FAIL"); - return 101; - } - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/TypeInitialization/backpatching/test1.cs b/src/coreclr/tests/src/Loader/classloader/TypeInitialization/backpatching/test1.cs deleted file mode 100644 index 54c199b03913..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/TypeInitialization/backpatching/test1.cs +++ /dev/null @@ -1,81 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Threading; -using System.Runtime.CompilerServices; - -// This test case reproduces a race condition involving type initialization (aka, .cctor, aka static constructor). -// -// The idea is that Thread1 initiates a type load and type initialization on MyClass (running of the static constructor/.cctor). -// -// While Thread1 is doing this, Thread2 attempts to access a static member, MyClass.X -// by invoking static method MyClass.getX(). -// -// The failing behavior is that Thread2 is able to access MyClass.X before it is initialized--Thread1 is still busy -// with type initialization, but hasn't yet initialized MyClass.X. This is because the prestub for MyClass.getX(), the mechanism that -// would normally trigger the .cctor to be run, was already run by Thread1. By the time Thread2 hit getX(), there is -// no more prestub to trigger the .cctor--so Thread2 (effectively) assumes that MyClass is already initialized and -// proceeds to access the still uninitialized static member, MyClass.X. -// -// A likely fix for this would be to delay backpatching getX() until after the .cctor has fully completed. -// mwilk. 2/3/04. - - -public class MyClass{ - private static int X; - public static int X0; - static MyClass(){ - X0 = getX(); // expect this to return 0, since this forces a cctor loop. - Thread.Sleep(1000*5); // 5 seconds - X=12; - } - [MethodImpl(MethodImplOptions.NoInlining)] - public static int getX(){ - Console.WriteLine("In MyClass.getX(): thread {0}",Thread.CurrentThread.Name); - return X; - } - // invoking this should trigger the cctor - [MethodImpl(MethodImplOptions.NoInlining)] - public static void SomeMethod(){ - Console.WriteLine("In MyClass.SomeMethod(): thread {0}",Thread.CurrentThread.Name); - } -} - -public class CMain{ - public static int X_getX; - - public static void RunSomeMethod(){ - MyClass.SomeMethod(); - } - public static void RunGetX(){ - - X_getX = MyClass.getX(); - Console.WriteLine("X_getX: {0}: thread {1}",X_getX,Thread.CurrentThread.Name); - } - public static int Main(){ - Thread t1 = new Thread(RunSomeMethod); - t1.Name = "T1"; - Thread t2 = new Thread(RunGetX); - t2.Name = "T2"; - - t1.Start(); - Thread.Sleep(1000*1); // 1 second - t2.Start(); - - t2.Join(); - t1.Join(); - - - //Console.WriteLine("MyClass.X0: {0}",MyClass.X0); - if(12==X_getX){ - Console.WriteLine("PASS"); - return 100; - } - else{ - Console.WriteLine("FAIL"); - return 101; - } - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/explicitlayout/Regressions/ASURT/ASURT150271/bigdat.il b/src/coreclr/tests/src/Loader/classloader/explicitlayout/Regressions/ASURT/ASURT150271/bigdat.il deleted file mode 100644 index 53c9656764e1..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/explicitlayout/Regressions/ASURT/ASURT150271/bigdat.il +++ /dev/null @@ -1,36 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } -.assembly BIGDAT {} -.assembly extern mscorlib{} -.module BIGDAT -.class public 'BIGDAT' -{ - .class nested private ansi explicit WS_TYPE - { - .field [100000008] public object EXCEPTION_OBJECT_00000242 - .size 100000016 - .method public specialname rtspecialname instance void .ctor () - { - ldarg.0 - call instance void object ::.ctor () - ret - } - } - .field static private class BIGDAT/WS_TYPE WS_DATA - - .method static public int32 BIGDAT() - { - .entrypoint - newobj instance void BIGDAT/WS_TYPE::.ctor () - stsfld class BIGDAT/WS_TYPE BIGDAT::WS_DATA - - ldstr "Pass" - call void [System.Console]System.Console::WriteLine(string) - - ldc.i4 100 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/explicitlayout/Regressions/ASURT/ASURT150271/test2.il b/src/coreclr/tests/src/Loader/classloader/explicitlayout/Regressions/ASURT/ASURT150271/test2.il deleted file mode 100644 index 60eeeb5795bd..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/explicitlayout/Regressions/ASURT/ASURT150271/test2.il +++ /dev/null @@ -1,58 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } -// blittable, large field offset. -// this case never caused a stack overflow. -// this test simply ensures continued correct behavior. -.assembly test2{} -.assembly extern mscorlib{} - -.class public explicit Class1 extends [mscorlib]System.Object{ - .field [0] public int32 i1 - .field [0x200004] public int32 i2 - - .method public specialname rtspecialname void .ctor(){ - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret - } -} - -.method public static int32 Main(){ - .entrypoint - - .locals init(class Class1 c1) - - newobj instance void Class1::.ctor() - stloc.0 - - - - ldstr "hello" - call void [System.Console]System.Console::WriteLine(string) - - ldloc.0 - ldc.i4.1 - stfld int32 Class1::i1 - - - ldloc.0 - ldc.i4.2 - stfld int32 Class1::i2 - - - ldstr "field i1: {0}, i2: {1}\n\n PASS" - ldloc.0 - ldfld int32 Class1::i1 - box int32 - ldloc.0 - ldfld int32 Class1::i2 - box int32 - call void [System.Console]System.Console::WriteLine(string,object,object) - - ldc.i4 100 - ret - -} diff --git a/src/coreclr/tests/src/Loader/classloader/explicitlayout/Regressions/ASURT/ASURT150271/test23.il b/src/coreclr/tests/src/Loader/classloader/explicitlayout/Regressions/ASURT/ASURT150271/test23.il deleted file mode 100644 index fe0d3fe23d03..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/explicitlayout/Regressions/ASURT/ASURT150271/test23.il +++ /dev/null @@ -1,67 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } -// non-blittable by objref field, large offset, large field size, -// one field is a valuetype that has an objref member field -// (this is to hit EEClass::CheckValueClassLayout()) -.assembly test23{} -.assembly extern mscorlib{} - -.class public explicit sealed LargeClass extends [mscorlib]System.ValueType{ - .field [0] public object o1 - .size 0x200004 -} - -.class public explicit Class1 extends [mscorlib]System.Object{ - .field [0] public int32 i1 - .field [8] public object o1 - .field [16] public int32 i2 - .field [24] public valuetype LargeClass lc - - - .method public specialname rtspecialname void .ctor(){ - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret - } - -} - -.method public static int32 Main(){ - .entrypoint - - .locals init(class Class1 c1) - - newobj instance void Class1::.ctor() - stloc.0 - - - - ldstr "hello" - call void [System.Console]System.Console::WriteLine(string) - - ldloc.0 - ldc.i4.1 - stfld int32 Class1::i1 - - - ldloc.0 - ldc.i4.2 - stfld int32 Class1::i2 - - - ldstr "field i1: {0}, i2: {1}\n\nPASS" - ldloc.0 - ldfld int32 Class1::i1 - box int32 - ldloc.0 - ldfld int32 Class1::i2 - box int32 - call void [System.Console]System.Console::WriteLine(string,object,object) - - ldc.i4 100 - ret - -} diff --git a/src/coreclr/tests/src/Loader/classloader/explicitlayout/Regressions/ASURT/ASURT150271/test3.il b/src/coreclr/tests/src/Loader/classloader/explicitlayout/Regressions/ASURT/ASURT150271/test3.il deleted file mode 100644 index bacccfd1f44e..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/explicitlayout/Regressions/ASURT/ASURT150271/test3.il +++ /dev/null @@ -1,95 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } -// blittable, absurdly large field offset, expect TypeLoadException -.assembly test3{} -.assembly extern mscorlib{} - -.class public explicit Class1 extends [mscorlib]System.Object{ - .field [0] public int32 i1 - .field [1073741824] public int32 i2 // offset: 1024*1024*1024 - - .method public specialname rtspecialname void .ctor(){ - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret - } - -} - - -.method public static int32 Main(){ - .entrypoint - - .locals init (class [mscorlib]System.Exception e2) - - .try{ - call void Go() - ldstr "FAIL: expected TypeLoadException, but no exception was caught" - call void [System.Console]System.Console::WriteLine(string) - leave NOT_CAUGHT - } - catch [mscorlib]System.TypeLoadException{ - pop // throw away the exception object - ldstr "PASS" - call void [System.Console]System.Console::WriteLine(string) - leave CAUGHT_EXPECTED - } - catch [mscorlib]System.Exception{ - stloc e2 - ldstr "FAIL: expected TypeLoadException, but instead caught the following:\n{0}" - ldloc e2 - call void [System.Console]System.Console::WriteLine(string,object) - leave CAUGHT_UNEXPECTED - } - - NOT_CAUGHT: - ldc.i4 101 - br END - - CAUGHT_EXPECTED: - ldc.i4 100 - br END - - CAUGHT_UNEXPECTED: - ldc.i4 102 - br END - - END: - ret -} - -.method public static void Go(){ - .locals init(class Class1 c1) - - newobj instance void Class1::.ctor() - stloc.0 - - - - ldstr "hello" - call void [System.Console]System.Console::WriteLine(string) - - ldloc.0 - ldc.i4.1 - stfld int32 Class1::i1 - - - ldloc.0 - ldc.i4.2 - stfld int32 Class1::i2 - - - ldstr "field i1: {0}, i2: {1}\n\nPASS" - ldloc.0 - ldfld int32 Class1::i1 - box int32 - ldloc.0 - ldfld int32 Class1::i2 - box int32 - call void [System.Console]System.Console::WriteLine(string,object,object) - - ret -} diff --git a/src/coreclr/tests/src/Loader/classloader/generics/Instantiation/Recursion/genrecur.cs b/src/coreclr/tests/src/Loader/classloader/generics/Instantiation/Recursion/genrecur.cs deleted file mode 100644 index aa07e3b3ebc5..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/generics/Instantiation/Recursion/genrecur.cs +++ /dev/null @@ -1,986 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -#pragma warning disable 0414 - -// Some generally-useful stuff -public class List { } - -public class Utils { - public static int failures = 0; - public static void Check(Type expected, Type actual) { - if (expected != actual) { - failures++; - Console.WriteLine("Expected " + expected + " but got " + actual); - } - } -} - -// Recursion through an instantiated superclass for a non-generic class -class Test1 { - class C - { - public virtual void m(Type expected) - { - Utils.Check(expected, typeof(T)); - } - } - - class D : C - { - } - - public static void Test() - { - D d = new D(); - C cd = new C(); - cd.m(typeof(D)); - d.m(typeof(D)); - } -} - -// Recursion through an instantiated interface for a non-generic class -class Test2 -{ - interface I - { - void m(T x); - } - - class D : I - { - public void m(D x) - { - object obj = this; - if (!(obj is I)) { - Utils.failures++; - Console.WriteLine("Test2.Test failed"); - } - } - } - - public static void Test() - { - D d = new D(); - I id = d; - id.m(d); - } -} - -// Mutual recursion through an instantiated superclass for a non-generic class -class Test3 -{ - class C - { - public void mymeth(Type expected) - { - Utils.Check(expected, typeof(T)); - } - } - - class D : C - { - } - - class E : C - { - } - - public static void Test() - { - D d = new D(); - E e = new E(); - C cd = new C(); - C ce = new C(); - d.mymeth(typeof(E)); - e.mymeth(typeof(D)); - cd.mymeth(typeof(D)); - ce.mymeth(typeof(E)); - } -} - -// Recursion through an instantiated superclass for a generic class -class Test4 -{ - class C - { - public virtual void m(Type expected) - { - Utils.Check(expected, typeof(T)); - } - } - - class D : C > - { - } - - public static void Test() - { - D di = new D(); - D ds = new D(); - D d = new D(); - di.m(typeof(D)); - ds.m(typeof(D)); - d.m(typeof(D)); - } -} - -// Mutual recursion through an instantiated superclass for a generic class -class Test5 -{ - class C - { - public virtual void m(Type expected) - { - Utils.Check(expected, typeof(T)); - } - } - - class D : C< E > - { - } - - class E : C< D > - { - } - - public static void Test() - { - D di = new D(); - D ds = new D(); - D d = new D(); - E ei = new E(); - E es = new E(); - E e = new E(); - di.m(typeof(E)); - ds.m(typeof(E)); - d.m(typeof(E)); - ei.m(typeof(D)); - es.m(typeof(D)); - e.m(typeof(D)); - } -} - -// Recursion through an instantiated interface for a generic class -class Test6 -{ - interface I - { - void m(T x); - } - - class D : I< D > - { - public void m(D x) - { - object obj = this; - if (!(obj is I< D >)) { - Utils.failures++; - Console.WriteLine("Test6 failed"); - } - } - } - - public static void Test() - { - D di = new D(); - D ds = new D(); - D d = new D(); - I< D > idi = di; - I< D > ids = ds; - I< D > id = d; - idi.m(di); - ids.m(ds); - id.m(d); - } -} - -// Use of instantiated generic structs inside other structures -// In particular, recursive reference to defining class in a struct field -class Test7 -{ - struct Pair - { - public A fst; - public B snd; - public Pair(A a, B b) { fst = a; snd = b; } - } - - struct Triple - { - public A fst; - public Pair snd; - public Triple(A a, B b, C c) { fst = a; snd = new Pair(b,c); } - } - - class P - { - public Triple fld; - public P(int x, P y, long z) { fld = new Triple(x, y, z); } - } - - public static void Test() - { - P p = new P(5, null, 12345678987654321); - p.fld.snd.fst = p; - if (p.fld.snd.snd != 12345678987654321) { - Console.WriteLine("Test7 failed"); - Utils.failures++; - } - } -} - -// Polymorphic recursion through classes and fields -class Test8 -{ - class Recursive2 - { - public Recursive2 f1; - public Recursive2(Recursive2 a1) { f1 = a1; } - } - - class Mixed2 - { - public Mixed2 f1; - public Mixed2 f2; - public Mixed2 f3; - public Mixed2(Mixed2 a1, Mixed2 a2, Mixed2 a3) { f1 = a1; f2 = a2; f3=a3; } - } - - class NonRecursive2 - { - public NonRecursive2 f2; - public NonRecursive2(NonRecursive2 a2) { f2 = a2; } - } - - class Expansive2 - { - public Expansive2, B > f1; - public Expansive2(Expansive2, B> a1) { f1 = a1; } - } - - public static void Test() - { - object x1 = new Recursive2(null); - object x2 = new Mixed2(null, null, null); - object x3 = new NonRecursive2(null); - object x4 = new Expansive2(null); - - object y1 = new Recursive2(null); - object y2 = new Mixed2(null, null, null); - object y3 = new NonRecursive2(null); - object y4 = new Expansive2(null); - } -} - -// Mutual polymorphic recursion through classes, structs and fields, where structs have two fields -class Test9 -{ - #pragma warning disable 649 - #pragma warning disable 0414 - class RecursiveClass2 - { - public RecursiveStruct2 f2; //TODO: Assign to default value after compile supports T.default - public RecursiveClass2() { } - } - - struct RecursiveStruct2 - { - public RecursiveClass2 f1; //TODO: Assign to default value after compile supports T.default - public RecursiveClass2 f2; //TODO: Assign to default value after compile supports T.default - public RecursiveStruct2(int x) { f1 = null; f2 = null; } - } - - class NonRecursiveClass2 - { - public NonRecursiveStruct2 f2; - public NonRecursiveClass2() { } - } - - struct NonRecursiveStruct2 - { - public NonRecursiveClass2 f1; - public NonRecursiveClass2 f2; - public NonRecursiveStruct2(int x) { f1 = null; f2 = null; } - } - - class ExpansiveClass2 - { - public ExpansiveStruct2 > f2; //TODO: Assign to default value after compile supports T.default - public ExpansiveClass2() { } - } - - struct ExpansiveStruct2 - { - public ExpansiveClass2 > f1; //TODO: Assign to default value after compile supports T.default - public ExpansiveClass2 > f2; //TODO: Assign to default value after compile supports T.default - public ExpansiveStruct2(int x) { f1 = null; f2 = null; } - } - #pragma warning restore 0414 - #pragma warning restore 649 - - public static void Test() - { - object x1 = new RecursiveClass2(); - object x2 = new RecursiveStruct2(3); - object x3 = new NonRecursiveClass2(); - object x4 = new NonRecursiveStruct2(3); - object x5 = new ExpansiveClass2(); - object x6 = new ExpansiveStruct2(3); - - object y1 = new RecursiveClass2(); - object y2 = new RecursiveStruct2(3); - object y3 = new NonRecursiveClass2(); - object y4 = new NonRecursiveStruct2(3); - object y5 = new ExpansiveClass2(); - object y6 = new ExpansiveStruct2(3); - - } -} - -// Mutual polymorphic recursion through classes, structs and fields, where structs have one field (these are optimized) -class Test10 -{ - #pragma warning disable 649 - #pragma warning disable 0414 - class RecursiveClass1 - { - public RecursiveStruct1 f1; - public RecursiveClass1() { } - } - - struct RecursiveStruct1 - { - public RecursiveClass1 f1; - public RecursiveStruct1(int x) { f1 = null; } - } - - class NonRecursiveClass1 - { - public NonRecursiveStruct1 f1; - public NonRecursiveClass1() { } - } - - struct NonRecursiveStruct1 - { - public NonRecursiveClass1 f1; - public NonRecursiveStruct1(int x) { f1 = null; } - } - - class ExpansiveClass1 - { - public ExpansiveStruct1 > f1; - public ExpansiveClass1() { } - } - - struct ExpansiveStruct1 - { - public ExpansiveClass1 > f1; - public ExpansiveStruct1(int x) { f1 = null; } - } - #pragma warning restore 649 - #pragma warning restore 0414 - - public static void Test() - { - object x1 = new RecursiveClass1(); - object x2 = new RecursiveStruct1(3); - object x3 = new NonRecursiveClass1(); - object x4 = new NonRecursiveStruct1(3); - object x5 = new ExpansiveClass1(); - object x6 = new ExpansiveStruct1(3); - - object y1 = new RecursiveClass1(); - object y2 = new RecursiveStruct1(3); - object y3 = new NonRecursiveClass1(); - object y4 = new NonRecursiveStruct1(3); - object y5 = new ExpansiveClass1(); - object y6 = new ExpansiveStruct1(3); - - } -} - - -// Recursion through base class instantiation at derived class -class Test11 { - class G - { - public virtual void m(Type expected) - { - Utils.Check(expected, typeof(T)); - } - } - - class C : G{} - - class D : C {} - - public static void Test() - { - D d = new D(); - C c = new C(); - G gd = new G(); - gd.m(typeof(D)); - d.m(typeof(D)); - } -} - - -// Recursion through base class instantiation at derived class (more complex) -class Test12 { - class G - { - public virtual void m(Type expected) - { - Utils.Check(expected, typeof(T)); - } - } - - class C : G{} - - class D : C {} - - class E : D{} - - public static void Test() - { - E> egd = new E>(); - D d = new D(); - C c = new C(); - G gd = new G(); - gd.m(typeof(D)); - d.m(typeof(D)); - egd.m(typeof(D)); - } -} - - -// Recursion through base class instantiation at derived class (more complex) -class Test13 { - class G - { - public virtual void m(Type expected) - { - Utils.Check(expected, typeof(T)); - } - } - - class C : G>{} - - class D : C {} - - class E : D{} - - public static void Test() - { - E e = new E(); - D d = new D(); - C c = new C(); - G> gd = new G>(); - gd.m(typeof(D)); - d.m(typeof(D)); - e.m(typeof(D)); - } -} - - -// Mutual recursion for classes through interface instantiation -class Test14 -{ - interface I - { - void m(T x); - } - - class C : I - { - public void m(D x) - { - object obj = this; - if (!(obj is I< D >)) { - Utils.failures++; - Console.WriteLine("Test14 failed"); - } - } - } - - class D : I - { - public void m(C x) - { - object obj = this; - if (!(obj is I< C >)) { - Utils.failures++; - Console.WriteLine("Test14 failed"); - } - } - } - - - public static void Test() - { - D d = new D(); - C c = new C(); - - I< C > id = d; - I< D > ic = c; - - id.m(c); - ic.m(d); - } -} - - -// Mutual recursion through interface instantiation for generic classes -class Test15 -{ - interface I - { - void m(T x); - } - - class C : I> - { - public void m(D x) - { - object obj = this; - if (!(obj is I< D >)) { - Utils.failures++; - Console.WriteLine("Test15 failed"); - } - } - } - - class D : I> - { - public void m(C x) - { - object obj = this; - if (!(obj is I< C >)) { - Utils.failures++; - Console.WriteLine("Test15 failed"); - } - } - } - - public static void Test() - { - D di = new D(); - D ds = new D(); - D d = new D(); - - C ci = new C(); - C cs = new C(); - C c = new C(); - - - I< D > idi = ci; - I< D > ids = cs; - I< D > id = c; - - idi.m(di); - ids.m(ds); - id.m(d); - - I< C > ici = di; - I< C > ics = ds; - I< C > ic = d; - - ici.m(ci); - ics.m(cs); - ic.m(c); - - - } -} - - - -// Interface instantiation is a derived class -class Test16 -{ - interface I - { - void m(T x); - } - - class C : I - { - public void m(D x) - { - object obj = this; - if (!(obj is I< D >)) { - Utils.failures++; - Console.WriteLine("Test16 failed"); - } - } - } - - class D : C - { - } - - public static void Test() - { - D d = new D(); - C c = new C(); - - I id = c; - id.m(d); - } -} - - - // Interface instantiation is a derived generic class -class Test17 -{ - interface I - { - void m(T x); - } - - class C : I> - { - public void m(D x) - { - object obj = this; - if (!(obj is I< D >)) { - Utils.failures++; - Console.WriteLine("Test17 failed"); - } - } - } - - class D : C - { - } - - public static void Test() - { - D di = new D(); - D ds = new D(); - D d = new D(); - - D> ddi = new D>(); - - C ci = new C(); - C cs = new C(); - C co = new C(); - - C> cci = new C>(); - - I> idi = ci; - I> ids = cs; - I> ido = co; - - I>> idci = cci; - - idi.m(di); - ids.m(ds); - ido.m(d); - - idci.m(ddi); - - } -} - - -// Direct recursion through interface instantiation, for struct -class Test18 -{ - interface I - { - void m(T x); - } - - struct S : I - { - public void m(S x) - { - object obj = this; - if (!(obj is I< S >)) { - Utils.failures++; - Console.WriteLine("Test18 failed"); - } - } - } - - struct S2 : I> - { - public void m(S2 x) - { - object obj = this; - if (!(obj is I< S2 >)) { - Utils.failures++; - Console.WriteLine("Test18 failed"); - } - } - } - - public static void Test() - { - S s = new S(); - I iofs = s; - iofs.m(s); - - S2 si = new S2(); - I> isi = si; - isi.m(si); - } -} - -// Recursion through instance field types of classes -class Test19 { - #pragma warning disable 649 - class C - { - public int i; - public D d; - } - - class D - { - public double d; - public C c; - } - #pragma warning restore 649 - public static void Test() - { - C c = new C(); - D d = new D(); - - } -} - - -// Recursion through instance field types of structs and classes -class Test20 { - #pragma warning disable 649 - class C - { - public int i; - public S s; - } - - struct S - { - public double d; - public C c; - } - #pragma warning restore 649 - - public static void Test() - { - C c = new C(); - - #pragma warning disable 219 - S s = new S(); - #pragma warning restore 219 - - } -} - - -// Recursion through instance field types of structs and classes -// and static struct/class field which is also recursive -class Test21 { - #pragma warning disable 649 - #pragma warning disable 0414 - class C - { - public int i; - public S s; - public static C c = new C(); - public static S st = new S(); - } - - struct S - { - public double d; - public C c; - public static S s = new S(); - public static C ct = new C(); - } - #pragma warning restore 649 - #pragma warning restore 0414 - public static void Test() - { - C c = new C(); - - #pragma warning disable 219 - S s = new S(); - #pragma warning restore 219 - - } -} - -// Mutual recursion for structs through interface instantiation -class Test22 -{ - interface I - { - void m(T x); - } - - struct S1 : I - { - public void m(S2 x) - { - object obj = this; - if (!(obj is I< S2 >)) { - Utils.failures++; - Console.WriteLine("Test22 failed"); - } - } - } - - struct S2 : I - { - public void m(S1 x) - { - object obj = this; - if (!(obj is I< S1 >)) { - Utils.failures++; - Console.WriteLine("Test22 failed"); - } - } - } - - - public static void Test() - { - S2 s2 = new S2(); - S1 s1 = new S1(); - - I< S1 > is2 = s2; - I< S2 > is1 = s1; - - is2.m(s1); - is1.m(s2); - } -} - - -// Mutual recursion through interface instantiation for generic structs -class Test23 -{ - interface I - { - void m(T x); - } - - struct S1 : I> - { - public void m(S2 x) - { - object obj = this; - if (!(obj is I< S2 >)) { - Utils.failures++; - Console.WriteLine("Test25 failed"); - } - } - } - - struct S2 : I> - { - public void m(S1 x) - { - object obj = this; - if (!(obj is I< S1 >)) { - Utils.failures++; - Console.WriteLine("Test25 failed"); - } - } - } - - public static void Test() - { - S2 di = new S2(); - S2 ds = new S2(); - S2 d = new S2(); - - S1 s1i = new S1(); - S1 s1s = new S1(); - S1 s1 = new S1(); - - - I< S2 > is2i = s1i; - I< S2 > is2s = s1s; - I< S2 > is2 = s1; - - is2i.m(di); - is2s.m(ds); - is2.m(d); - - I< S1 > is1i = di; - I< S1 > is1s = ds; - I< S1 > is1 = d; - - is1i.m(s1i); - is1s.m(s1s); - is1.m(s1); - - - } -} - - -public class M { - public static int Main() { - Test1.Test(); - if (Utils.failures == 0) Console.WriteLine("Test1 OK"); - Test2.Test(); - if (Utils.failures == 0) Console.WriteLine("Test2 OK"); - Test3.Test(); - if (Utils.failures == 0) Console.WriteLine("Test3 OK"); - Test4.Test(); - if (Utils.failures == 0) Console.WriteLine("Test4 OK"); - Test5.Test(); - if (Utils.failures == 0) Console.WriteLine("Test5 OK"); - Test6.Test(); - if (Utils.failures == 0) Console.WriteLine("Test6 OK"); - Test7.Test(); - if (Utils.failures == 0) Console.WriteLine("Test7 OK"); - Test8.Test(); - if (Utils.failures == 0) Console.WriteLine("Test8 OK"); - Test9.Test(); - if (Utils.failures == 0) Console.WriteLine("Test9 OK"); - Test10.Test(); - if (Utils.failures == 0) Console.WriteLine("Test10 OK"); - Test11.Test(); - if (Utils.failures == 0) Console.WriteLine("Test11 OK"); - Test12.Test(); - if (Utils.failures == 0) Console.WriteLine("Test12 OK"); - Test13.Test(); - if (Utils.failures == 0) Console.WriteLine("Test13 OK"); - Test14.Test(); - if (Utils.failures == 0) Console.WriteLine("Test14 OK"); - Test15.Test(); - if (Utils.failures == 0) Console.WriteLine("Test15 OK"); - Test16.Test(); - if (Utils.failures == 0) Console.WriteLine("Test16 OK"); - Test17.Test(); - if (Utils.failures == 0) Console.WriteLine("Test17 OK"); - Test18.Test(); - if (Utils.failures == 0) Console.WriteLine("Test18 OK"); - Test19.Test(); - if (Utils.failures == 0) Console.WriteLine("Test19 OK"); - Test20.Test(); - if (Utils.failures == 0) Console.WriteLine("Test20 OK"); - Test21.Test(); - if (Utils.failures == 0) Console.WriteLine("Test21 OK"); - Test22.Test(); - if (Utils.failures == 0) Console.WriteLine("Test22 OK"); - Test23.Test(); - if (Utils.failures == 0) Console.WriteLine("Test23 OK"); - if (Utils.failures > 0) return 101; - else - { - Console.WriteLine("PASS"); - return 100; - } - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/generics/Variance/CoreCLR/Lib.il b/src/coreclr/tests/src/Loader/classloader/generics/Variance/CoreCLR/Lib.il deleted file mode 100644 index c658bda75035..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/generics/Variance/CoreCLR/Lib.il +++ /dev/null @@ -1,268 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } - -// Metadata version: v2.0.40216 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .hash = (F2 9A DF 4E 4F 6B AB 87 31 14 43 DD C2 C8 D5 1E // ...NOk..1.C..... - 83 95 73 F7 ) // ..s. - .ver 2:0:3600:0 -} -.assembly Lib -{ - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(bool, - // bool) = ( 01 00 00 01 00 00 ) - - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module Lib.dll -// MVID: {90D94B96-3C0E-4A14-8E27-8AD41717FB3D} -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x041D0000 - - -// =============== CLASS MEMBERS DECLARATION =================== - - -.class interface public abstract auto ansi IMinusT<-([mscorlib]System.Object) MinusT> -{ -} // end of class IMinusT - -.class interface public abstract auto ansi IPlusT<+([mscorlib]System.Object) PlusT> -{ -} // end of class IPlusT - - - -.class interface public abstract auto ansi Test001PlusT<+([mscorlib]System.Object) PlusT> -{ - .method public hidebysig newslot abstract virtual - instance !PlusT method1(class IMinusT t) cil managed - { - } // end of method 'IPlusT1!1'::method1 - -} // end of class 'IPlusT1!1' - - -.class interface public abstract auto ansi Test002PlusT<+([mscorlib]System.Object) PlusT> -{ - .method public hidebysig newslot abstract virtual - instance !PlusT[] method2(class IMinusT t) cil managed - { - } // end of method 'IPlusT2!1'::method2 - -} // end of class 'IPlusT2!1' - - -.class interface public abstract auto ansi Test003PlusT<+([mscorlib]System.Object) PlusT> -{ - .method public hidebysig newslot abstract virtual - instance class IPlusT method3(class IMinusT[] t) cil managed - { - } // end of method 'IPlusT3!1'::method3 - -} // end of class 'IPlusT3!1' - -.class interface public abstract auto ansi Test004PlusT<+([mscorlib]System.Object) PlusT> -{ - .method public hidebysig newslot abstract virtual - instance class IMinusT> method4(class IPlusT> t) cil managed - { - } // end of method 'IPlusT4!1'::method4 - -} // end of class 'IPlusT4!1' - - -.class interface public abstract auto ansi Test005PlusT<+([mscorlib]System.Object) PlusT> -{ - .method public hidebysig newslot abstract virtual - instance class IMinusT[]> method5(class IMinusT[][] t) cil managed - { - } // end of method 'IMinusT5!1'::method5 - -} // end of class 'IMinusT5!1' - - - -.class interface public abstract auto ansi Test001MinusT<-([mscorlib]System.Object) MinusT> -{ - .method public hidebysig newslot abstract virtual - instance class IMinusT method1(!MinusT t) cil managed - { - } // end of method 'IMinusT1!1'::method1 - -} // end of class 'IMinusT1!1' - -.class interface public abstract auto ansi Test002MinusT<-([mscorlib]System.Object) MinusT> -{ - .method public hidebysig newslot abstract virtual - instance class IMinusT[] method2(!MinusT[] t) cil managed - { - } // end of method 'IMinusT2!1'::method2 - -} // end of class 'IMinusT2!1' - - -.class interface public abstract auto ansi Test003MinusT<-([mscorlib]System.Object) MinusT> -{ - .method public hidebysig newslot abstract virtual - instance class IMinusT> method3(class IPlusT t) cil managed - { - } // end of method 'IMinusT3!1'::method3 - -} // end of class 'IMinusT3!1' - - - -.class interface public abstract auto ansi Test004MinusT<-([mscorlib]System.Object) MinusT> -{ - .method public hidebysig newslot abstract virtual - instance class IMinusT[]> method4(class IPlusT> t) cil managed - { - } // end of method 'IMinusT4!1'::method4 - -} // end of class 'IMinusT4!1' - - -.class interface public abstract auto ansi Test005MinusT<-([mscorlib]System.Object) MinusT> -{ - .method public hidebysig newslot abstract virtual - instance class IPlusT> method5(class IPlusT[] t) cil managed - { - } // end of method 'IMinusT5!1'::method5 - -} // end of class 'IMinusT5!1' - - - -.class interface public abstract auto ansi Test101PlusT<+([mscorlib]System.Object) PlusT> -{ - .method public hidebysig newslot abstract virtual - instance class IMinusT method1(!PlusT t) cil managed - { - } // end of method 'IPlusT1!1'::method1 - -} // end of class 'IPlusT1!1' - - -.class interface public abstract auto ansi Test102PlusT<+([mscorlib]System.Object) PlusT> -{ - .method public hidebysig newslot abstract virtual - instance class IMinusT method2(!PlusT[] t) cil managed - { - } // end of method 'IPlusT2!1'::method2 - -} // end of class 'IPlusT2!1' - - -.class interface public abstract auto ansi Test103PlusT<+([mscorlib]System.Object) PlusT> -{ - .method public hidebysig newslot abstract virtual - instance class IMinusT[] method3(class IPlusT t) cil managed - { - } // end of method 'IPlusT3!1'::method3 - -} // end of class 'IPlusT3!1' - -.class interface public abstract auto ansi Test104PlusT<+([mscorlib]System.Object) PlusT> -{ - .method public hidebysig newslot abstract virtual - instance class IPlusT> method4(class IMinusT> t) cil managed - { - } // end of method 'IPlusT4!1'::method4 - -} // end of class 'IPlusT4!1' - - -.class interface public abstract auto ansi Test105PlusT<+([mscorlib]System.Object) PlusT> -{ - .method public hidebysig newslot abstract virtual - instance class IMinusT[][] method5(class IMinusT[]> t) cil managed - { - } // end of method 'IMinusT5!1'::method5 - -} // end of class 'IMinusT5!1' - -.class interface public abstract auto ansi Test106PlusT<+([mscorlib]System.Object) PlusT> -{ - .method public hidebysig newslot abstract virtual - instance class IMinusT[][] method5(!PlusT[] t) cil managed - { - } // end of method 'IMinusT5!1'::method5 - -} // end of class 'IMinusT5!1' - - -.class interface public abstract auto ansi Test101MinusT<-([mscorlib]System.Object) MinusT> -{ - .method public hidebysig newslot abstract virtual - instance !MinusT method1(class IMinusT t) cil managed - { - } // end of method 'IMinusT1!1'::method1 - -} // end of class 'IMinusT1!1' - -.class interface public abstract auto ansi Test102MinusT<-([mscorlib]System.Object) MinusT> -{ - .method public hidebysig newslot abstract virtual - instance !MinusT[] method2(class IMinusT[] t) cil managed - { - } // end of method 'IMinusT2!1'::method2 - -} // end of class 'IMinusT2!1' - - -.class interface public abstract auto ansi Test103MinusT<-([mscorlib]System.Object) MinusT> -{ - .method public hidebysig newslot abstract virtual - instance class IPlusT method3(class IMinusT> t) cil managed - { - } // end of method 'IMinusT3!1'::method3 - -} // end of class 'IMinusT3!1' - - -.class interface public abstract auto ansi Test104MinusT<-([mscorlib]System.Object) MinusT> -{ - .method public hidebysig newslot abstract virtual - instance class IPlusT> method4(class IMinusT[]> t) cil managed - { - } // end of method 'IMinusT4!1'::method4 - -} // end of class 'IMinusT4!1' - - -.class interface public abstract auto ansi Test105MinusT<-([mscorlib]System.Object) MinusT> -{ - .method public hidebysig newslot abstract virtual - instance class IPlusT[] method5(class IPlusT> t) cil managed - { - } // end of method 'IMinusT5!1'::method5 - -} // end of class 'IMinusT5!1' - - -.class interface public abstract auto ansi Test106MinusT<-([mscorlib]System.Object) MinusT> -{ - .method public hidebysig newslot abstract virtual - instance class IPlusT[] method5(!MinusT t) cil managed - { - } // end of method 'IMinusT5!1'::method5 - -} // end of class 'IMinusT5!1' -// ============================================================= - -//*********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file Lib.res diff --git a/src/coreclr/tests/src/Loader/classloader/generics/Variance/CoreCLR/Lib2.il b/src/coreclr/tests/src/Loader/classloader/generics/Variance/CoreCLR/Lib2.il deleted file mode 100644 index 30f9abb2dd85..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/generics/Variance/CoreCLR/Lib2.il +++ /dev/null @@ -1,146 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } - -// Metadata version: v2.0.40216 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .hash = (F2 9A DF 4E 4F 6B AB 87 31 14 43 DD C2 C8 D5 1E // ...NOk..1.C..... - 83 95 73 F7 ) // ..s. - .ver 2:0:3600:0 -} -.assembly Lib2 -{ - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(bool, - // bool) = ( 01 00 00 01 00 00 ) - - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module Lib2.dll -// MVID: {90D94B96-3C0E-4A14-8E27-8AD41717FB3D} -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x041D0000 - - -// =============== CLASS MEMBERS DECLARATION =================== - - -.class interface public abstract auto ansi IMinusT<-([mscorlib]System.Object) MinusT> -{ -} // end of class IMinusT - -.class interface public abstract auto ansi IPlusT<+([mscorlib]System.Object) PlusT> -{ -} // end of class IPlusT - - -// POSITIVE tests - -.class interface public auto ansi beforefieldinit Test001PlusT<+([mscorlib]System.Object) PlusT> -{ - .method public hidebysig newslot abstract virtual instance void - method1<(class IMinusT) M>(class IMinusT t) cil managed - - { - } // end of method Test001PlusT::method1 - -} // end of class Test101PlusT - - -.class interface public abstract auto ansi Test002PlusT<+([mscorlib]System.Object) PlusT> -{ - .method public hidebysig newslot abstract virtual - instance !PlusT[] method2<(class IMinusT) M>(class IMinusT t) cil managed - { - } // end of method Test102PlusT::method2 - -} // end of class Test102PlusT - - - - -.class interface public abstract auto ansi Test001MinusT<-([mscorlib]System.Object) MinusT> -{ - .method public hidebysig newslot abstract virtual - instance class IMinusT method1<(class IPlusT) M>(!MinusT t) cil managed - { - } // end of method Test101MinusT::method1 - -} // end of class Test101MinusT - - -.class interface public abstract auto ansi Test002MinusT<-([mscorlib]System.Object) MinusT> -{ - .method public hidebysig newslot abstract virtual - instance class IMinusT[] method2<(class IMinusT) M>() cil managed - { - } // end of method Test102MinusT::method2 - -} // end of class Test102MinusT - - - - -// NEGATIVE tests - - -.class interface public auto ansi beforefieldinit Test101PlusT<+([mscorlib]System.Object) PlusT> -{ - .method public hidebysig newslot abstract virtual instance void - method1<(class IPlusT) M>(class IMinusT t) cil managed - { - } // end of method Test001PlusT::method1 - -} // end of class Test101PlusT - - -.class interface public abstract auto ansi Test102PlusT<+([mscorlib]System.Object) PlusT> -{ - .method public hidebysig newslot abstract virtual - instance !PlusT[] method2<(class IPlusT) M>(class IMinusT t) cil managed - { - } // end of method Test102PlusT::method2 - -} // end of class Test102PlusT - - - - -.class interface public abstract auto ansi Test101MinusT<-([mscorlib]System.Object) MinusT> -{ - .method public hidebysig newslot abstract virtual - instance class IMinusT method1<(class IMinusT) M>(!MinusT t) cil managed - { - } // end of method Test101MinusT::method1 - -} // end of class Test101MinusT - - -.class interface public abstract auto ansi Test102MinusT<-([mscorlib]System.Object) MinusT> -{ - .method public hidebysig newslot abstract virtual - instance class IMinusT[] method2<(class IMinusT) M>() cil managed - { - } // end of method Test102MinusT::method2 - -} // end of class Test102MinusT - - - - - -// ============================================================= - -//*********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file Lib2.res diff --git a/src/coreclr/tests/src/Loader/classloader/generics/Variance/CoreCLR/Method001.cs b/src/coreclr/tests/src/Loader/classloader/generics/Variance/CoreCLR/Method001.cs deleted file mode 100644 index 915524ed1fcf..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/generics/Variance/CoreCLR/Method001.cs +++ /dev/null @@ -1,150 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -public class Base { } -public class Sub : Base { } - -public class GBase { } -public class GSubT : GBase { } -public class GSubTArr : GBase { } -public class GSubGRefT : GBase> { } - -public class GRef { } -public struct GVal { } - -public class TestClass -{ - static int iTestCount = 0; - static int iErrorCount = 0; - static int iExitCode = 101; - - public static void Eval(string location, bool exp) - { - ++iTestCount; - - if (!(exp)) - { - iErrorCount++; - Console.WriteLine("Test Failed at location: {0} @ count {1} ", location, iTestCount); - } - } - public static Type LoadTypeInternal(string testType) - { - - switch (testType) - { - case "Test001PlusT": return typeof(Test001PlusT); - case "Test002PlusT": return typeof(Test002PlusT); - case "Test003PlusT": return typeof(Test003PlusT); - case "Test004PlusT": return typeof(Test004PlusT); - case "Test005PlusT": return typeof(Test005PlusT>); - - case "Test001MinusT": return typeof(Test001MinusT); - case "Test002MinusT": return typeof(Test002MinusT); - case "Test003MinusT": return typeof(Test003MinusT); - case "Test004MinusT": return typeof(Test004MinusT); - case "Test005MinusT": return typeof(Test005MinusT>); - - default: throw new Exception("Unexpected testType"); - } - } - - public static void LoadTypeWrapper(string testType) - { - LoadTypeInternal(testType); - } - - public static bool LoadType(string testType, bool expected) - { - try - { - LoadTypeWrapper(testType); - - if (expected) - { - return true; - } - else - { - return false; - } - } - catch (MissingMethodException) - { - if (expected) - { - Console.WriteLine("Unexpected Exception MissingMethodException"); - return false; - } - else - { - return true; - } - - } - catch (TypeLoadException) - { - if (expected) - { - Console.WriteLine("Unexpected Exception TypeLoadException"); - return false; - } - else - { - return true; - } - } - catch (Exception E) - { - Console.WriteLine("Unexpected Exception {0}", E); - return false; - } - } - - private static bool RunTests() - { - Eval("Test101", LoadType("Test001MinusT", true)); - Eval("Test102", LoadType("Test002MinusT", true)); - Eval("Test103", LoadType("Test003MinusT", true)); - Eval("Test104", LoadType("Test004MinusT", true)); - Eval("Test105", LoadType("Test005MinusT", true)); - - Eval("Test001", LoadType("Test001PlusT", true)); - Eval("Test002", LoadType("Test002PlusT", true)); - Eval("Test003", LoadType("Test003PlusT", true)); - Eval("Test004", LoadType("Test004PlusT", true)); - Eval("Test005", LoadType("Test005PlusT", true)); - - - if (iErrorCount > 0) - { - Console.WriteLine("Total test cases: " + iTestCount + " Failed test cases: " + iErrorCount); - return false; - } - else - { - Console.WriteLine("Total test cases: " + iTestCount); - return true; - } - } - - public static int Main(String[] args) - { - - if (RunTests()) - { - iExitCode = 100; - Console.WriteLine("All test cases passed"); - } - else - { - iExitCode = 101; - Console.WriteLine("Test failed"); - } - return iExitCode; - } - -} diff --git a/src/coreclr/tests/src/Loader/classloader/generics/Variance/CoreCLR/Method003.cs b/src/coreclr/tests/src/Loader/classloader/generics/Variance/CoreCLR/Method003.cs deleted file mode 100644 index 1839560d32ff..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/generics/Variance/CoreCLR/Method003.cs +++ /dev/null @@ -1,192 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// This test tests constraints on method type parameters -// for generic methods of generic variant interfaces - -// POSITIVE tests - -using System; - -public class C : IMinusT { } -public class D : IMinusT { } -public class E : IMinusT { } - - - -public class A5 : Test001PlusT -{ - public void method1(IMinusT t) where M : IMinusT - { - } -} - -public class A6 : Test002PlusT -{ - public string[] method2(IMinusT t) where M : IMinusT - { - return new string[10]; - } -} - -public class A7 : Test001MinusT -{ - public IMinusT method1(object t) where M : IPlusT - { - return (IMinusT)new E(); - } -} - - -public class TestClass -{ - static int iTestCount = 0; - static int iErrorCount = 0; - static int iExitCode = 101; - - public static void Eval(string location, bool exp) - { - ++iTestCount; - - if (!(exp)) - { - iErrorCount++; - Console.WriteLine("Test Failed at location: {0} @ count {1} ", location, iTestCount); - } - } - - - public static void LoadTypeInternal(string testType) - { - switch (testType) - { - case "Test001PlusT": - { - // positive test - // return type: void - // argument type: contravariant - // method type constraint: contravariant - - Test001PlusT test = (Test001PlusT)new A5(); - test.method1>((IMinusT)new C()); - break; - } - - case "Test002PlusT": - { - // positive test - // return type: covariant - // argument type: contravariant - // method type constraint: contravariant - - Test002PlusT test = (Test002PlusT)new A6(); - string[] st = test.method2>((IMinusT)new D()); - break; - } - - case "Test001MinusT": - { - // positive test - // return type: covariant - // argument type: contravariant - // method type constraint: contravariant - - Test001MinusT test = (Test001MinusT)new A7(); - IMinusT obj = test.method1>(new object()); - break; - } - - - default: throw new Exception("Unexpected testType"); - } - } - - public static void LoadTypeWrapper(string testType) - { - LoadTypeInternal(testType); - } - - public static bool LoadType(string testType, bool expected) - { - try - { - LoadTypeWrapper(testType); - - if (expected) - { - return true; - } - else - { - return false; - } - } - catch (MissingMethodException) - { - if (expected) - { - Console.WriteLine("Unexpected Exception MissingMethodException"); - return false; - } - else - { - return true; - } - - } - catch (TypeLoadException) - { - if (expected) - { - Console.WriteLine("Unexpected Exception TypeLoadException"); - return false; - } - else - { - return true; - } - } - catch (Exception E) - { - Console.WriteLine("Unexpected Exception {0}", E); - return false; - } - } - - private static bool RunTests() - { - // positive - Eval("Test101", LoadType("Test001PlusT", true)); - Eval("Test102", LoadType("Test002PlusT", true)); - Eval("Test103", LoadType("Test001MinusT", true)); - - if (iErrorCount > 0) - { - Console.WriteLine("Total test cases: " + iTestCount + " Failed test cases: " + iErrorCount); - return false; - } - else - { - Console.WriteLine("Total test cases: " + iTestCount); - return true; - } - } - - public static int Main(String[] args) - { - - if (RunTests()) - { - iExitCode = 100; - Console.WriteLine("All test cases passed"); - } - else - { - iExitCode = 101; - Console.WriteLine("Test failed"); - } - return iExitCode; - } - -} diff --git a/src/coreclr/tests/src/Loader/classloader/generics/Variance/Delegates/Lib.il b/src/coreclr/tests/src/Loader/classloader/generics/Variance/Delegates/Lib.il deleted file mode 100644 index a9e4b95af876..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/generics/Variance/Delegates/Lib.il +++ /dev/null @@ -1,835 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } - -// Microsoft (R) .NET Framework IL Disassembler. Version 2.0.40216.00 -// Copyright (C) Microsoft Corporation 1998-2004. All rights reserved. - - - -// Metadata version: v2.0.40216 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .hash = (F6 F1 0B C9 D5 43 39 0C CC E4 FE 56 6B 52 C9 FA // .....C9....VkR.. - 18 FF 1F D7 ) - .ver 2:0:3600:0 -} -.assembly Lib -{ - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(bool, - // bool) = ( 01 00 00 01 00 00 ) - - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module Lib.exe -// MVID: {75BA810B-D357-475C-83C1-8C098D3CB2C3} -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x03C80000 - - -// =============== CLASS MEMBERS DECLARATION =================== - - -.class interface public abstract auto ansi IMinusT<-([mscorlib]System.Object) MinusT> -{ -} // end of class IMinusT - -.class interface public abstract auto ansi IPlusT<+([mscorlib]System.Object) PlusT> -{ -} // end of class IPlusT - - - - -.class public auto ansi sealed Test001MinusT<- ([mscorlib]System.Object) T> - extends [mscorlib]System.MulticastDelegate -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(object 'object', - native int 'method') runtime managed - { - } // end of method Test001MinusT::.ctor - - .method public hidebysig newslot virtual - instance class IMinusT Invoke(!T arg) runtime managed - { - } // end of method Test001MinusT::Invoke - - .method public hidebysig newslot virtual - instance class [mscorlib]System.IAsyncResult - BeginInvoke(!T arg, - class [mscorlib]System.AsyncCallback callback, - object 'object') runtime managed - { - } // end of method Test001MinusT::BeginInvoke - - .method public hidebysig newslot virtual - instance class IMinusT EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed - { - } // end of method Test001MinusT::EndInvoke - -} // end of class Test001MinusT - - -.class public auto ansi sealed Test002MinusT<- ([mscorlib]System.Object) T> - extends [mscorlib]System.MulticastDelegate -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(object 'object', - native int 'method') runtime managed - { - } // end of method Test002MinusT::.ctor - - .method public hidebysig newslot virtual - instance class IMinusT> Invoke(!T[] arg) runtime managed - { - } // end of method Test002MinusT::Invoke - - .method public hidebysig newslot virtual - instance class [mscorlib]System.IAsyncResult - BeginInvoke(!T[] arg, - class [mscorlib]System.AsyncCallback callback, - object 'object') runtime managed - { - } // end of method Test002MinusT::BeginInvoke - - .method public hidebysig newslot virtual - instance class IMinusT> EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed - { - } // end of method Test002MinusT::EndInvoke - -} // end of class Test002MinusT - - -.class public auto ansi sealed Test003MinusT<- ([mscorlib]System.Object) T> - extends [mscorlib]System.MulticastDelegate -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(object 'object', - native int 'method') runtime managed - { - } // end of method Test003MinusT::.ctor - - .method public hidebysig newslot virtual - instance class IPlusT> Invoke(class IPlusT arg) runtime managed - { - } // end of method Test003MinusT::Invoke - - .method public hidebysig newslot virtual - instance class [mscorlib]System.IAsyncResult - BeginInvoke(class IPlusT arg, - class [mscorlib]System.AsyncCallback callback, - object 'object') runtime managed - { - } // end of method Test003MinusT::BeginInvoke - - .method public hidebysig newslot virtual - instance class IPlusT> EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed - { - } // end of method Test003MinusT::EndInvoke - -} // end of class Test003MinusT - - -.class public auto ansi sealed Test004MinusT<- ([mscorlib]System.Object) T> - extends [mscorlib]System.MulticastDelegate -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(object 'object', - native int 'method') runtime managed - { - } // end of method Test004MinusT::.ctor - - .method public hidebysig newslot virtual - instance class IPlusT[]> Invoke(class IPlusT> arg) runtime managed - { - } // end of method Test004MinusT::Invoke - - .method public hidebysig newslot virtual - instance class [mscorlib]System.IAsyncResult - BeginInvoke(class IPlusT> arg, - class [mscorlib]System.AsyncCallback callback, - object 'object') runtime managed - { - } // end of method Test004MinusT::BeginInvoke - - .method public hidebysig newslot virtual - instance class IPlusT[]> EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed - { - } // end of method Test004MinusT::EndInvoke - -} // end of class Test004MinusT - -.class public auto ansi sealed Test005MinusT<- ([mscorlib]System.Object) T> - extends [mscorlib]System.MulticastDelegate -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(object 'object', - native int 'method') runtime managed - { - } // end of method Test005MinusT::.ctor - - .method public hidebysig newslot virtual - instance class IMinusT[] Invoke(class IPlusT>[] arg) runtime managed - { - } // end of method Test005MinusT::Invoke - - .method public hidebysig newslot virtual - instance class [mscorlib]System.IAsyncResult - BeginInvoke(class IPlusT>[] arg, - class [mscorlib]System.AsyncCallback callback, - object 'object') runtime managed - { - } // end of method Test005MinusT::BeginInvoke - - .method public hidebysig newslot virtual - instance class IMinusT[] EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed - { - } // end of method Test005MinusT::EndInvoke - -} // end of class Test005MinusT - - -.class public auto ansi sealed Test001PlusT<+ ([mscorlib]System.Object) T> - extends [mscorlib]System.MulticastDelegate -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(object 'object', - native int 'method') runtime managed - { - } // end of method Test001PlusT::.ctor - - .method public hidebysig newslot virtual - instance !T Invoke(class IMinusT arg) runtime managed - { - } // end of method Test001PlusT::Invoke - - .method public hidebysig newslot virtual - instance class [mscorlib]System.IAsyncResult - BeginInvoke(class IMinusT arg, - class [mscorlib]System.AsyncCallback callback, - object 'object') runtime managed - { - } // end of method Test001PlusT::BeginInvoke - - .method public hidebysig newslot virtual - instance !T EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed - { - } // end of method Test001PlusT::EndInvoke - -} // end of class Test001PlusT - - -.class public auto ansi sealed Test002PlusT<+ ([mscorlib]System.Object) T> - extends [mscorlib]System.MulticastDelegate -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(object 'object', - native int 'method') runtime managed - { - } // end of method Test002PlusT::.ctor - - .method public hidebysig newslot virtual - instance !T[] Invoke(class IMinusT arg) runtime managed - { - } // end of method Test002PlusT::Invoke - - .method public hidebysig newslot virtual - instance class [mscorlib]System.IAsyncResult - BeginInvoke(class IMinusT arg, - class [mscorlib]System.AsyncCallback callback, - object 'object') runtime managed - { - } // end of method Test002PlusT::BeginInvoke - - .method public hidebysig newslot virtual - instance !T[] EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed - { - } // end of method Test002PlusT::EndInvoke - -} // end of class Test002PlusT - - -.class public auto ansi sealed Test003PlusT<+ ([mscorlib]System.Object) T> - extends [mscorlib]System.MulticastDelegate -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(object 'object', - native int 'method') runtime managed - { - } // end of method Test003PlusT::.ctor - - .method public hidebysig newslot virtual - instance class IPlusT> Invoke(class IMinusT arg) runtime managed - { - } // end of method Test003PlusT::Invoke - - .method public hidebysig newslot virtual - instance class [mscorlib]System.IAsyncResult - BeginInvoke(class IMinusT arg, - class [mscorlib]System.AsyncCallback callback, - object 'object') runtime managed - { - } // end of method Test003PlusT::BeginInvoke - - .method public hidebysig newslot virtual - instance class IPlusT> EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed - { - } // end of method Test003PlusT::EndInvoke - -} // end of class Test003PlusT - - -.class public auto ansi sealed Test004PlusT<+ ([mscorlib]System.Object) T> - extends [mscorlib]System.MulticastDelegate -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(object 'object', - native int 'method') runtime managed - { - } // end of method Test004PlusT::.ctor - - .method public hidebysig newslot virtual - instance class IMinusT[]> Invoke(class IPlusT> arg) runtime managed - { - } // end of method Test004PlusT::Invoke - - .method public hidebysig newslot virtual - instance class [mscorlib]System.IAsyncResult - BeginInvoke(class IPlusT[]> arg, - class [mscorlib]System.AsyncCallback callback, - object 'object') runtime managed - { - } // end of method Test004PlusT::BeginInvoke - - .method public hidebysig newslot virtual - instance class IMinusT[]> EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed - { - } // end of method Test004PlusT::EndInvoke - -} // end of class Test004PlusT - - -.class public auto ansi sealed Test005PlusT<+ ([mscorlib]System.Object) T> - extends [mscorlib]System.MulticastDelegate -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(object 'object', - native int 'method') runtime managed - { - } // end of method Test005PlusT::.ctor - - .method public hidebysig newslot virtual - instance class IPlusT[] Invoke(class IMinusT>[] arg) runtime managed - { - } // end of method Test005PlusT::Invoke - - .method public hidebysig newslot virtual - instance class [mscorlib]System.IAsyncResult - BeginInvoke(class IMinusT>[] arg, - class [mscorlib]System.AsyncCallback callback, - object 'object') runtime managed - { - } // end of method Test005PlusT::BeginInvoke - - .method public hidebysig newslot virtual - instance class IPlusT[] EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed - { - } // end of method Test005PlusT::EndInvoke - -} // end of class Test005PlusT - - - -.class public auto ansi sealed Test001PlusTMinusU<+ ([mscorlib]System.Object) T, - ([mscorlib]System.Object) U> - extends [mscorlib]System.MulticastDelegate -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(object 'object', - native int 'method') runtime managed - { - } // end of method Test001PlusTMinusU::.ctor - - .method public hidebysig newslot virtual - instance !T Invoke(!U arg) runtime managed - { - } // end of method Test001PlusTMinusU::Invoke - - .method public hidebysig newslot virtual - instance class [mscorlib]System.IAsyncResult - BeginInvoke(!U arg, - class [mscorlib]System.AsyncCallback callback, - object 'object') runtime managed - { - } // end of method Test001PlusTMinusU::BeginInvoke - - .method public hidebysig newslot virtual - instance !T EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed - { - } // end of method Test001PlusTMinusU::EndInvoke - -} // end of class Test001PlusT - - -.class public auto ansi sealed Test002PlusTMinusU<+ ([mscorlib]System.Object) T, - ([mscorlib]System.Object) U> - extends [mscorlib]System.MulticastDelegate -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(object 'object', - native int 'method') runtime managed - { - } // end of method Test002PlusTMinusU::.ctor - - .method public hidebysig newslot virtual - instance class IMinusT Invoke(class IPlusT arg) runtime managed - { - } // end of method Test002PlusTMinusU::Invoke - - .method public hidebysig newslot virtual - instance class [mscorlib]System.IAsyncResult - BeginInvoke(class IPlusT arg, - class [mscorlib]System.AsyncCallback callback, - object 'object') runtime managed - { - } // end of method Test002PlusTMinusU::BeginInvoke - - .method public hidebysig newslot virtual - instance class IMinusT EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed - { - } // end of method Test002PlusTMinusU::EndInvoke - -} // end of class Test002PlusTMinusU - - -.class public auto ansi sealed Test003PlusTMinusU<+ ([mscorlib]System.Object) T, - ([mscorlib]System.Object) U> - extends [mscorlib]System.MulticastDelegate -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(object 'object', - native int 'method') runtime managed - { - } // end of method Test003PlusTMinusU::.ctor - - .method public hidebysig newslot virtual - instance void Invoke(class IMinusT arg) runtime managed - { - } // end of method Test003PlusTMinusU::Invoke - - .method public hidebysig newslot virtual - instance class [mscorlib]System.IAsyncResult - BeginInvoke(class IMinusT arg, - class [mscorlib]System.AsyncCallback callback, - object 'object') runtime managed - { - } // end of method Test003PlusTMinusU::BeginInvoke - - .method public hidebysig newslot virtual - instance void EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed - { - } // end of method Test003PlusTMinusU::EndInvoke - -} // end of class Test003PlusTMinusU - - - - -.class public auto ansi sealed Test101MinusT<- ([mscorlib]System.Object) T> - extends [mscorlib]System.MulticastDelegate -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(object 'object', - native int 'method') runtime managed - { - } // end of method Test101MinusT::.ctor - - .method public hidebysig newslot virtual - instance !T Invoke(class IMinusT arg) runtime managed - { - } // end of method Test101MinusT::Invoke - - .method public hidebysig newslot virtual - instance class [mscorlib]System.IAsyncResult - BeginInvoke(class IMinusT arg, - class [mscorlib]System.AsyncCallback callback, - object 'object') runtime managed - { - } // end of method Test101MinusT::BeginInvoke - - .method public hidebysig newslot virtual - instance !T EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed - { - } // end of method Test101MinusT::EndInvoke - -} // end of class Test101MinusT - - -.class public auto ansi sealed Test102MinusT<- ([mscorlib]System.Object) T> - extends [mscorlib]System.MulticastDelegate -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(object 'object', - native int 'method') runtime managed - { - } // end of method Test102MinusT::.ctor - - .method public hidebysig newslot virtual - instance class IPlusT Invoke(class IMinusT arg) runtime managed - { - } // end of method Test102MinusT::Invoke - - .method public hidebysig newslot virtual - instance class [mscorlib]System.IAsyncResult - BeginInvoke(class IMinusT arg, - class [mscorlib]System.AsyncCallback callback, - object 'object') runtime managed - { - } // end of method Test102MinusT::BeginInvoke - - .method public hidebysig newslot virtual - instance class IPlusT EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed - { - } // end of method Test102MinusT::EndInvoke - -} // end of class Test102MinusT - - -.class public auto ansi sealed Test103MinusT<- ([mscorlib]System.Object) T> - extends [mscorlib]System.MulticastDelegate -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(object 'object', - native int 'method') runtime managed - { - } // end of method Test103MinusT::.ctor - - .method public hidebysig newslot virtual - instance class IPlusT Invoke(!T arg) runtime managed - { - } // end of method Test103MinusT::Invoke - - .method public hidebysig newslot virtual - instance class [mscorlib]System.IAsyncResult - BeginInvoke(!T arg, - class [mscorlib]System.AsyncCallback callback, - object 'object') runtime managed - { - } // end of method Test103MinusT::BeginInvoke - - .method public hidebysig newslot virtual - instance class IPlusT EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed - { - } // end of method Test103MinusT::EndInvoke - -} // end of class Test103MinusT - - -.class public auto ansi sealed Test104MinusT<- ([mscorlib]System.Object) T> - extends [mscorlib]System.MulticastDelegate -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(object 'object', - native int 'method') runtime managed - { - } // end of method Test104MinusT::.ctor - - .method public hidebysig newslot virtual - instance class IPlusT[] Invoke(!T[] arg) runtime managed - { - } // end of method Test104MinusT::Invoke - - .method public hidebysig newslot virtual - instance class [mscorlib]System.IAsyncResult - BeginInvoke(!T[] arg, - class [mscorlib]System.AsyncCallback callback, - object 'object') runtime managed - { - } // end of method Test104MinusT::BeginInvoke - - .method public hidebysig newslot virtual - instance class IPlusT[] EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed - { - } // end of method Test104MinusT::EndInvoke - -} // end of class Test104MinusT - - -.class public auto ansi sealed Test105MinusT<- ([mscorlib]System.Object) T> - extends [mscorlib]System.MulticastDelegate -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(object 'object', - native int 'method') runtime managed - { - } // end of method Test105MinusT::.ctor - - .method public hidebysig newslot virtual - instance class IMinusT[] Invoke(class IMinusT>[] arg) runtime managed - { - } // end of method Test105MinusT::Invoke - - .method public hidebysig newslot virtual - instance class [mscorlib]System.IAsyncResult - BeginInvoke(class IMinusT>[] arg, - class [mscorlib]System.AsyncCallback callback, - object 'object') runtime managed - { - } // end of method Test105MinusT::BeginInvoke - - .method public hidebysig newslot virtual - instance class IMinusT[] EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed - { - } // end of method Test105MinusT::EndInvoke - -} // end of class Test105MinusT - - - -.class public auto ansi sealed Test101PlusT<+ ([mscorlib]System.Object) T> - extends [mscorlib]System.MulticastDelegate -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(object 'object', - native int 'method') runtime managed - { - } // end of method Test101PlusT::.ctor - - .method public hidebysig newslot virtual - instance class IMinusT Invoke(!T arg) runtime managed - { - } // end of method Test101PlusT::Invoke - - .method public hidebysig newslot virtual - instance class [mscorlib]System.IAsyncResult - BeginInvoke(!T arg, - class [mscorlib]System.AsyncCallback callback, - object 'object') runtime managed - { - } // end of method Test101PlusT::BeginInvoke - - .method public hidebysig newslot virtual - instance class IMinusT EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed - { - } // end of method Test101PlusT::EndInvoke - -} // end of class Test101PlusT - - -.class public auto ansi sealed Test102PlusT<+ ([mscorlib]System.Object) T> - extends [mscorlib]System.MulticastDelegate -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(object 'object', - native int 'method') runtime managed - { - } // end of method Test102PlusT::.ctor - - .method public hidebysig newslot virtual - instance class IMinusT Invoke(!T[] arg) runtime managed - { - } // end of method Test102PlusT::Invoke - - .method public hidebysig newslot virtual - instance class [mscorlib]System.IAsyncResult - BeginInvoke(!T[] arg, - class [mscorlib]System.AsyncCallback callback, - object 'object') runtime managed - { - } // end of method Test102PlusT::BeginInvoke - - .method public hidebysig newslot virtual - instance class IMinusT EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed - { - } // end of method Test102PlusT::EndInvoke - -} // end of class Test102PlusT - - -.class public auto ansi sealed Test103PlusT<+ ([mscorlib]System.Object) T> - extends [mscorlib]System.MulticastDelegate -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(object 'object', - native int 'method') runtime managed - { - } // end of method Test103PlusT::.ctor - - .method public hidebysig newslot virtual - instance class IPlusT Invoke(class IPlusT arg) runtime managed - { - } // end of method Test103PlusT::Invoke - - .method public hidebysig newslot virtual - instance class [mscorlib]System.IAsyncResult - BeginInvoke(class IPlusT arg, - class [mscorlib]System.AsyncCallback callback, - object 'object') runtime managed - { - } // end of method Test103PlusT::BeginInvoke - - .method public hidebysig newslot virtual - instance class IPlusT EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed - { - } // end of method Test103PlusT::EndInvoke - -} // end of class Test103PlusT - - -.class public auto ansi sealed Test104PlusT<+ ([mscorlib]System.Object) T> - extends [mscorlib]System.MulticastDelegate -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(object 'object', - native int 'method') runtime managed - { - } // end of method Test104PlusT::.ctor - - .method public hidebysig newslot virtual - instance class IMinusT[] Invoke(class IMinusT arg) runtime managed - { - } // end of method Test104PlusT::Invoke - - .method public hidebysig newslot virtual - instance class [mscorlib]System.IAsyncResult - BeginInvoke(class IMinusT arg, - class [mscorlib]System.AsyncCallback callback, - object 'object') runtime managed - { - } // end of method Test104PlusT::BeginInvoke - - .method public hidebysig newslot virtual - instance class IMinusT[] EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed - { - } // end of method Test104PlusT::EndInvoke - -} // end of class Test104PlusT - - -.class public auto ansi sealed Test105PlusT<+ ([mscorlib]System.Object) T> - extends [mscorlib]System.MulticastDelegate -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(object 'object', - native int 'method') runtime managed - { - } // end of method Test105PlusT::.ctor - - .method public hidebysig newslot virtual - instance class IMinusT[] Invoke(class IPlusT[] arg) runtime managed - { - } // end of method Test105PlusT::Invoke - - .method public hidebysig newslot virtual - instance class [mscorlib]System.IAsyncResult - BeginInvoke(class IPlusT[] arg, - class [mscorlib]System.AsyncCallback callback, - object 'object') runtime managed - { - } // end of method Test105PlusT::BeginInvoke - - .method public hidebysig newslot virtual - instance class IMinusT[] EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed - { - } // end of method Test105PlusT::EndInvoke - -} // end of class Test105PlusT - - -.class public auto ansi sealed Test101PlusTMinusU<+ ([mscorlib]System.Object) T, - ([mscorlib]System.Object) U> - extends [mscorlib]System.MulticastDelegate -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(object 'object', - native int 'method') runtime managed - { - } // end of method Test101PlusTMinusU::.ctor - - .method public hidebysig newslot virtual - instance !U Invoke(!T arg) runtime managed - { - } // end of method Test101PlusTMinusU::Invoke - - .method public hidebysig newslot virtual - instance class [mscorlib]System.IAsyncResult - BeginInvoke(!T arg, - class [mscorlib]System.AsyncCallback callback, - object 'object') runtime managed - { - } // end of method Test101PlusTMinusU::BeginInvoke - - .method public hidebysig newslot virtual - instance !U EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed - { - } // end of method Test101PlusTMinusU::EndInvoke - -} // end of class Test101PlusTMinusU - - -.class public auto ansi sealed Test102PlusTMinusU<+ ([mscorlib]System.Object) T, - ([mscorlib]System.Object) U> - extends [mscorlib]System.MulticastDelegate -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(object 'object', - native int 'method') runtime managed - { - } // end of method Test102PlusTMinusU::.ctor - - .method public hidebysig newslot virtual - instance class IMinusT Invoke(class IPlusT arg) runtime managed - { - } // end of method Test102PlusTMinusU::Invoke - - .method public hidebysig newslot virtual - instance class [mscorlib]System.IAsyncResult - BeginInvoke(class IPlusT arg, - class [mscorlib]System.AsyncCallback callback, - object 'object') runtime managed - { - } // end of method Test102PlusTMinusU::BeginInvoke - - .method public hidebysig newslot virtual - instance class IMinusT EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed - { - } // end of method Test102PlusTMinusU::EndInvoke - -} // end of class Test102PlusTMinusU - - -.class public auto ansi sealed Test103PlusTMinusU<+ ([mscorlib]System.Object) T, - ([mscorlib]System.Object) U> - extends [mscorlib]System.MulticastDelegate -{ - .method public hidebysig specialname rtspecialname - instance void .ctor(object 'object', - native int 'method') runtime managed - { - } // end of method Test103PlusTMinusU::.ctor - - .method public hidebysig newslot virtual - instance void Invoke(class IMinusT arg) runtime managed - { - } // end of method Test103PlusTMinusU::Invoke - - .method public hidebysig newslot virtual - instance class [mscorlib]System.IAsyncResult - BeginInvoke(class IMinusT arg, - class [mscorlib]System.AsyncCallback callback, - object 'object') runtime managed - { - } // end of method Test103PlusTMinusU::BeginInvoke - - .method public hidebysig newslot virtual - instance void EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed - { - } // end of method Test103PlusTMinusU::EndInvoke - -} // end of class Test103PlusTMinusU diff --git a/src/coreclr/tests/src/Loader/classloader/generics/Variance/IL/Lib.il b/src/coreclr/tests/src/Loader/classloader/generics/Variance/IL/Lib.il deleted file mode 100644 index d5faaea5ed85..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/generics/Variance/IL/Lib.il +++ /dev/null @@ -1,64 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } - -// Microsoft (R) .NET Framework IL Disassembler. Version 2.0.31217.0 -// Copyright (C) Microsoft Corporation 1998-2004. All rights reserved. - - - -// Metadata version: v2.0.31217 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .hash = (34 49 3D D8 CD 90 8A 7F 24 E0 96 E0 1F 82 E7 47 // 4I=.....$......G - CD A1 2A A0 ) // ..*. - .ver 2:0:3600:0 -} -.assembly Lib -{ - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(bool, - // bool) = ( 01 00 00 01 00 00 ) - - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module Lib.dll -// MVID: {A0B2C024-0046-46A4-83FE-8A184FC49D0D} -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x03FC0000 - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class interface public abstract auto ansi IPlusT<+([mscorlib]System.Object) PlusT> -{ -} // end of class IPlusT - - -.class interface public abstract auto ansi IMinusT<-([mscorlib]System.Object) MinusT> -{ -} // end of class IMinusT - -.class interface public abstract auto ansi IPlusTMinusU<+([mscorlib]System.Object) PlusT,-([mscorlib]System.Object) MinusU> -{ -} // end of class IPlusTMinusU - -.class interface public abstract auto ansi IMinusTPlusU<-([mscorlib]System.Object) PlusT,+([mscorlib]System.Object) MinusU> -{ -} // end of class IPlusTMinusU - - -// ============================================================= - -//*********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file IsInstLib001.res diff --git a/src/coreclr/tests/src/Loader/classloader/generics/Variance/Interfaces/Lib.il b/src/coreclr/tests/src/Loader/classloader/generics/Variance/Interfaces/Lib.il deleted file mode 100644 index f072e089f17a..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/generics/Variance/Interfaces/Lib.il +++ /dev/null @@ -1,179 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } - -// Microsoft (R) .NET Framework IL Disassembler. Version 2.0.31217.0 -// Copyright (C) Microsoft Corporation 1998-2004. All rights reserved. - - - -// Metadata version: v2.0.31217 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .hash = (34 49 3D D8 CD 90 8A 7F 24 E0 96 E0 1F 82 E7 47 // 4I=.....$......G - CD A1 2A A0 ) // ..*. - .ver 2:0:3600:0 -} -.assembly Lib -{ - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(bool, - // bool) = ( 01 00 00 01 00 00 ) - - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module Lib.dll -// MVID: {A0B2C024-0046-46A4-83FE-8A184FC49D0D} -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x03FC0000 - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class interface public abstract auto ansi IPlusT<+([mscorlib]System.Object) PlusT> -{ -} // end of class IPlusT - - -.class interface public abstract auto ansi IMinusT<-([mscorlib]System.Object) MinusT> -{ -} // end of class IMinusT - -.class interface public abstract auto ansi IPlusTMinusU<+([mscorlib]System.Object) PlusT,-([mscorlib]System.Object) MinusU> -{ -} // end of class IPlusTMinusU - -.class interface public abstract auto ansi IMinusTPlusU<-([mscorlib]System.Object) PlusT,+([mscorlib]System.Object) MinusU> -{ -} // end of class IPlusTMinusU - -.class interface public abstract auto ansi Test001PlusT<+([mscorlib]System.Object) T> - implements class IMinusT -{ -} // end of class Test001PlusT - -.class interface public abstract auto ansi Test002PlusT<+([mscorlib]System.Object) T> - implements class IMinusT -{ -} // end of class Test002PlusT - - -.class interface public abstract auto ansi Test003PlusT<+([mscorlib]System.Object) T> - implements class IMinusT> -{ -} // end of class Test003PlusT - - -.class interface public abstract auto ansi Test004PlusT<+([mscorlib]System.Object) T> - implements class IPlusT> -{ -} // end of class Test004PlusT - - -.class interface public abstract auto ansi Test005PlusT<+([mscorlib]System.Object) T> - implements class IPlusT[]> -{ -} // end of class Test005PlusT - - -.class interface public abstract auto ansi Test001MinusT<-([mscorlib]System.Object) T> - implements class IPlusT -{ -} // end of class Test001MinusT - -.class interface public abstract auto ansi Test002MinusT<-([mscorlib]System.Object) T> - implements class IPlusT -{ -} // end of class Test002MinusT - - -.class interface public abstract auto ansi Test003MinusT<-([mscorlib]System.Object) T> - implements class IPlusT> -{ -} // end of class Test003MinusT - - -.class interface public abstract auto ansi Test004MinusT<-([mscorlib]System.Object) T> - implements class IMinusT> -{ -} // end of class Test004MinusT - - -.class interface public abstract auto ansi Test005MinusT<-([mscorlib]System.Object) T> - implements class IMinusT[]> -{ -} // end of class Test005MinusT - - -.class interface public abstract auto ansi Test101PlusT<+([mscorlib]System.Object) T> - implements class IPlusT -{ -} // end of class Test101PlusT - -.class interface public abstract auto ansi Test102PlusT<+([mscorlib]System.Object) T> - implements class IPlusT -{ -} // end of class Test102PlusT - - -.class interface public abstract auto ansi Test103PlusT<+([mscorlib]System.Object) T> - implements class IPlusT> -{ -} // end of class Test103PlusT - - -.class interface public abstract auto ansi Test104PlusT<+([mscorlib]System.Object) T> - implements class IMinusT> -{ -} // end of class Test104PlusT - - -.class interface public abstract auto ansi Test105PlusT<+([mscorlib]System.Object) T> - implements class IPlusT[]> -{ -} // end of class Test105PlusT - - -.class interface public abstract auto ansi Test101MinusT<-([mscorlib]System.Object) T> - implements class IMinusT -{ -} // end of class Test001PlusT - -.class interface public abstract auto ansi Test102MinusT<-([mscorlib]System.Object) T> - implements class IMinusT -{ -} // end of class Test002PlusT - - -.class interface public abstract auto ansi Test103MinusT<-([mscorlib]System.Object) T> - implements class IPlusT> -{ -} // end of class Test003PlusT - - -.class interface public abstract auto ansi Test104MinusT<-([mscorlib]System.Object) T> - implements class IMinusT> -{ -} // end of class Test004PlusT - - -.class interface public abstract auto ansi Test105MinusT<-([mscorlib]System.Object) T> - implements class IPlusT[]> -{ -} // end of class Test005PlusT - - -// ============================================================= - -//*********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file IsInstLib001.res diff --git a/src/coreclr/tests/src/Loader/classloader/generics/Variance/Methods/Lib.il b/src/coreclr/tests/src/Loader/classloader/generics/Variance/Methods/Lib.il deleted file mode 100644 index c658bda75035..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/generics/Variance/Methods/Lib.il +++ /dev/null @@ -1,268 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } - -// Metadata version: v2.0.40216 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .hash = (F2 9A DF 4E 4F 6B AB 87 31 14 43 DD C2 C8 D5 1E // ...NOk..1.C..... - 83 95 73 F7 ) // ..s. - .ver 2:0:3600:0 -} -.assembly Lib -{ - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(bool, - // bool) = ( 01 00 00 01 00 00 ) - - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module Lib.dll -// MVID: {90D94B96-3C0E-4A14-8E27-8AD41717FB3D} -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x041D0000 - - -// =============== CLASS MEMBERS DECLARATION =================== - - -.class interface public abstract auto ansi IMinusT<-([mscorlib]System.Object) MinusT> -{ -} // end of class IMinusT - -.class interface public abstract auto ansi IPlusT<+([mscorlib]System.Object) PlusT> -{ -} // end of class IPlusT - - - -.class interface public abstract auto ansi Test001PlusT<+([mscorlib]System.Object) PlusT> -{ - .method public hidebysig newslot abstract virtual - instance !PlusT method1(class IMinusT t) cil managed - { - } // end of method 'IPlusT1!1'::method1 - -} // end of class 'IPlusT1!1' - - -.class interface public abstract auto ansi Test002PlusT<+([mscorlib]System.Object) PlusT> -{ - .method public hidebysig newslot abstract virtual - instance !PlusT[] method2(class IMinusT t) cil managed - { - } // end of method 'IPlusT2!1'::method2 - -} // end of class 'IPlusT2!1' - - -.class interface public abstract auto ansi Test003PlusT<+([mscorlib]System.Object) PlusT> -{ - .method public hidebysig newslot abstract virtual - instance class IPlusT method3(class IMinusT[] t) cil managed - { - } // end of method 'IPlusT3!1'::method3 - -} // end of class 'IPlusT3!1' - -.class interface public abstract auto ansi Test004PlusT<+([mscorlib]System.Object) PlusT> -{ - .method public hidebysig newslot abstract virtual - instance class IMinusT> method4(class IPlusT> t) cil managed - { - } // end of method 'IPlusT4!1'::method4 - -} // end of class 'IPlusT4!1' - - -.class interface public abstract auto ansi Test005PlusT<+([mscorlib]System.Object) PlusT> -{ - .method public hidebysig newslot abstract virtual - instance class IMinusT[]> method5(class IMinusT[][] t) cil managed - { - } // end of method 'IMinusT5!1'::method5 - -} // end of class 'IMinusT5!1' - - - -.class interface public abstract auto ansi Test001MinusT<-([mscorlib]System.Object) MinusT> -{ - .method public hidebysig newslot abstract virtual - instance class IMinusT method1(!MinusT t) cil managed - { - } // end of method 'IMinusT1!1'::method1 - -} // end of class 'IMinusT1!1' - -.class interface public abstract auto ansi Test002MinusT<-([mscorlib]System.Object) MinusT> -{ - .method public hidebysig newslot abstract virtual - instance class IMinusT[] method2(!MinusT[] t) cil managed - { - } // end of method 'IMinusT2!1'::method2 - -} // end of class 'IMinusT2!1' - - -.class interface public abstract auto ansi Test003MinusT<-([mscorlib]System.Object) MinusT> -{ - .method public hidebysig newslot abstract virtual - instance class IMinusT> method3(class IPlusT t) cil managed - { - } // end of method 'IMinusT3!1'::method3 - -} // end of class 'IMinusT3!1' - - - -.class interface public abstract auto ansi Test004MinusT<-([mscorlib]System.Object) MinusT> -{ - .method public hidebysig newslot abstract virtual - instance class IMinusT[]> method4(class IPlusT> t) cil managed - { - } // end of method 'IMinusT4!1'::method4 - -} // end of class 'IMinusT4!1' - - -.class interface public abstract auto ansi Test005MinusT<-([mscorlib]System.Object) MinusT> -{ - .method public hidebysig newslot abstract virtual - instance class IPlusT> method5(class IPlusT[] t) cil managed - { - } // end of method 'IMinusT5!1'::method5 - -} // end of class 'IMinusT5!1' - - - -.class interface public abstract auto ansi Test101PlusT<+([mscorlib]System.Object) PlusT> -{ - .method public hidebysig newslot abstract virtual - instance class IMinusT method1(!PlusT t) cil managed - { - } // end of method 'IPlusT1!1'::method1 - -} // end of class 'IPlusT1!1' - - -.class interface public abstract auto ansi Test102PlusT<+([mscorlib]System.Object) PlusT> -{ - .method public hidebysig newslot abstract virtual - instance class IMinusT method2(!PlusT[] t) cil managed - { - } // end of method 'IPlusT2!1'::method2 - -} // end of class 'IPlusT2!1' - - -.class interface public abstract auto ansi Test103PlusT<+([mscorlib]System.Object) PlusT> -{ - .method public hidebysig newslot abstract virtual - instance class IMinusT[] method3(class IPlusT t) cil managed - { - } // end of method 'IPlusT3!1'::method3 - -} // end of class 'IPlusT3!1' - -.class interface public abstract auto ansi Test104PlusT<+([mscorlib]System.Object) PlusT> -{ - .method public hidebysig newslot abstract virtual - instance class IPlusT> method4(class IMinusT> t) cil managed - { - } // end of method 'IPlusT4!1'::method4 - -} // end of class 'IPlusT4!1' - - -.class interface public abstract auto ansi Test105PlusT<+([mscorlib]System.Object) PlusT> -{ - .method public hidebysig newslot abstract virtual - instance class IMinusT[][] method5(class IMinusT[]> t) cil managed - { - } // end of method 'IMinusT5!1'::method5 - -} // end of class 'IMinusT5!1' - -.class interface public abstract auto ansi Test106PlusT<+([mscorlib]System.Object) PlusT> -{ - .method public hidebysig newslot abstract virtual - instance class IMinusT[][] method5(!PlusT[] t) cil managed - { - } // end of method 'IMinusT5!1'::method5 - -} // end of class 'IMinusT5!1' - - -.class interface public abstract auto ansi Test101MinusT<-([mscorlib]System.Object) MinusT> -{ - .method public hidebysig newslot abstract virtual - instance !MinusT method1(class IMinusT t) cil managed - { - } // end of method 'IMinusT1!1'::method1 - -} // end of class 'IMinusT1!1' - -.class interface public abstract auto ansi Test102MinusT<-([mscorlib]System.Object) MinusT> -{ - .method public hidebysig newslot abstract virtual - instance !MinusT[] method2(class IMinusT[] t) cil managed - { - } // end of method 'IMinusT2!1'::method2 - -} // end of class 'IMinusT2!1' - - -.class interface public abstract auto ansi Test103MinusT<-([mscorlib]System.Object) MinusT> -{ - .method public hidebysig newslot abstract virtual - instance class IPlusT method3(class IMinusT> t) cil managed - { - } // end of method 'IMinusT3!1'::method3 - -} // end of class 'IMinusT3!1' - - -.class interface public abstract auto ansi Test104MinusT<-([mscorlib]System.Object) MinusT> -{ - .method public hidebysig newslot abstract virtual - instance class IPlusT> method4(class IMinusT[]> t) cil managed - { - } // end of method 'IMinusT4!1'::method4 - -} // end of class 'IMinusT4!1' - - -.class interface public abstract auto ansi Test105MinusT<-([mscorlib]System.Object) MinusT> -{ - .method public hidebysig newslot abstract virtual - instance class IPlusT[] method5(class IPlusT> t) cil managed - { - } // end of method 'IMinusT5!1'::method5 - -} // end of class 'IMinusT5!1' - - -.class interface public abstract auto ansi Test106MinusT<-([mscorlib]System.Object) MinusT> -{ - .method public hidebysig newslot abstract virtual - instance class IPlusT[] method5(!MinusT t) cil managed - { - } // end of method 'IMinusT5!1'::method5 - -} // end of class 'IMinusT5!1' -// ============================================================= - -//*********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file Lib.res diff --git a/src/coreclr/tests/src/Loader/classloader/generics/Variance/Methods/Lib2.il b/src/coreclr/tests/src/Loader/classloader/generics/Variance/Methods/Lib2.il deleted file mode 100644 index 30f9abb2dd85..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/generics/Variance/Methods/Lib2.il +++ /dev/null @@ -1,146 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } - -// Metadata version: v2.0.40216 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .hash = (F2 9A DF 4E 4F 6B AB 87 31 14 43 DD C2 C8 D5 1E // ...NOk..1.C..... - 83 95 73 F7 ) // ..s. - .ver 2:0:3600:0 -} -.assembly Lib2 -{ - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(bool, - // bool) = ( 01 00 00 01 00 00 ) - - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module Lib2.dll -// MVID: {90D94B96-3C0E-4A14-8E27-8AD41717FB3D} -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x041D0000 - - -// =============== CLASS MEMBERS DECLARATION =================== - - -.class interface public abstract auto ansi IMinusT<-([mscorlib]System.Object) MinusT> -{ -} // end of class IMinusT - -.class interface public abstract auto ansi IPlusT<+([mscorlib]System.Object) PlusT> -{ -} // end of class IPlusT - - -// POSITIVE tests - -.class interface public auto ansi beforefieldinit Test001PlusT<+([mscorlib]System.Object) PlusT> -{ - .method public hidebysig newslot abstract virtual instance void - method1<(class IMinusT) M>(class IMinusT t) cil managed - - { - } // end of method Test001PlusT::method1 - -} // end of class Test101PlusT - - -.class interface public abstract auto ansi Test002PlusT<+([mscorlib]System.Object) PlusT> -{ - .method public hidebysig newslot abstract virtual - instance !PlusT[] method2<(class IMinusT) M>(class IMinusT t) cil managed - { - } // end of method Test102PlusT::method2 - -} // end of class Test102PlusT - - - - -.class interface public abstract auto ansi Test001MinusT<-([mscorlib]System.Object) MinusT> -{ - .method public hidebysig newslot abstract virtual - instance class IMinusT method1<(class IPlusT) M>(!MinusT t) cil managed - { - } // end of method Test101MinusT::method1 - -} // end of class Test101MinusT - - -.class interface public abstract auto ansi Test002MinusT<-([mscorlib]System.Object) MinusT> -{ - .method public hidebysig newslot abstract virtual - instance class IMinusT[] method2<(class IMinusT) M>() cil managed - { - } // end of method Test102MinusT::method2 - -} // end of class Test102MinusT - - - - -// NEGATIVE tests - - -.class interface public auto ansi beforefieldinit Test101PlusT<+([mscorlib]System.Object) PlusT> -{ - .method public hidebysig newslot abstract virtual instance void - method1<(class IPlusT) M>(class IMinusT t) cil managed - { - } // end of method Test001PlusT::method1 - -} // end of class Test101PlusT - - -.class interface public abstract auto ansi Test102PlusT<+([mscorlib]System.Object) PlusT> -{ - .method public hidebysig newslot abstract virtual - instance !PlusT[] method2<(class IPlusT) M>(class IMinusT t) cil managed - { - } // end of method Test102PlusT::method2 - -} // end of class Test102PlusT - - - - -.class interface public abstract auto ansi Test101MinusT<-([mscorlib]System.Object) MinusT> -{ - .method public hidebysig newslot abstract virtual - instance class IMinusT method1<(class IMinusT) M>(!MinusT t) cil managed - { - } // end of method Test101MinusT::method1 - -} // end of class Test101MinusT - - -.class interface public abstract auto ansi Test102MinusT<-([mscorlib]System.Object) MinusT> -{ - .method public hidebysig newslot abstract virtual - instance class IMinusT[] method2<(class IMinusT) M>() cil managed - { - } // end of method Test102MinusT::method2 - -} // end of class Test102MinusT - - - - - -// ============================================================= - -//*********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file Lib2.res diff --git a/src/coreclr/tests/src/Loader/classloader/generics/Variance/Methods/Method001.cs b/src/coreclr/tests/src/Loader/classloader/generics/Variance/Methods/Method001.cs deleted file mode 100644 index 915524ed1fcf..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/generics/Variance/Methods/Method001.cs +++ /dev/null @@ -1,150 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -public class Base { } -public class Sub : Base { } - -public class GBase { } -public class GSubT : GBase { } -public class GSubTArr : GBase { } -public class GSubGRefT : GBase> { } - -public class GRef { } -public struct GVal { } - -public class TestClass -{ - static int iTestCount = 0; - static int iErrorCount = 0; - static int iExitCode = 101; - - public static void Eval(string location, bool exp) - { - ++iTestCount; - - if (!(exp)) - { - iErrorCount++; - Console.WriteLine("Test Failed at location: {0} @ count {1} ", location, iTestCount); - } - } - public static Type LoadTypeInternal(string testType) - { - - switch (testType) - { - case "Test001PlusT": return typeof(Test001PlusT); - case "Test002PlusT": return typeof(Test002PlusT); - case "Test003PlusT": return typeof(Test003PlusT); - case "Test004PlusT": return typeof(Test004PlusT); - case "Test005PlusT": return typeof(Test005PlusT>); - - case "Test001MinusT": return typeof(Test001MinusT); - case "Test002MinusT": return typeof(Test002MinusT); - case "Test003MinusT": return typeof(Test003MinusT); - case "Test004MinusT": return typeof(Test004MinusT); - case "Test005MinusT": return typeof(Test005MinusT>); - - default: throw new Exception("Unexpected testType"); - } - } - - public static void LoadTypeWrapper(string testType) - { - LoadTypeInternal(testType); - } - - public static bool LoadType(string testType, bool expected) - { - try - { - LoadTypeWrapper(testType); - - if (expected) - { - return true; - } - else - { - return false; - } - } - catch (MissingMethodException) - { - if (expected) - { - Console.WriteLine("Unexpected Exception MissingMethodException"); - return false; - } - else - { - return true; - } - - } - catch (TypeLoadException) - { - if (expected) - { - Console.WriteLine("Unexpected Exception TypeLoadException"); - return false; - } - else - { - return true; - } - } - catch (Exception E) - { - Console.WriteLine("Unexpected Exception {0}", E); - return false; - } - } - - private static bool RunTests() - { - Eval("Test101", LoadType("Test001MinusT", true)); - Eval("Test102", LoadType("Test002MinusT", true)); - Eval("Test103", LoadType("Test003MinusT", true)); - Eval("Test104", LoadType("Test004MinusT", true)); - Eval("Test105", LoadType("Test005MinusT", true)); - - Eval("Test001", LoadType("Test001PlusT", true)); - Eval("Test002", LoadType("Test002PlusT", true)); - Eval("Test003", LoadType("Test003PlusT", true)); - Eval("Test004", LoadType("Test004PlusT", true)); - Eval("Test005", LoadType("Test005PlusT", true)); - - - if (iErrorCount > 0) - { - Console.WriteLine("Total test cases: " + iTestCount + " Failed test cases: " + iErrorCount); - return false; - } - else - { - Console.WriteLine("Total test cases: " + iTestCount); - return true; - } - } - - public static int Main(String[] args) - { - - if (RunTests()) - { - iExitCode = 100; - Console.WriteLine("All test cases passed"); - } - else - { - iExitCode = 101; - Console.WriteLine("Test failed"); - } - return iExitCode; - } - -} diff --git a/src/coreclr/tests/src/Loader/classloader/generics/Variance/Methods/Method003.cs b/src/coreclr/tests/src/Loader/classloader/generics/Variance/Methods/Method003.cs deleted file mode 100644 index 1839560d32ff..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/generics/Variance/Methods/Method003.cs +++ /dev/null @@ -1,192 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// This test tests constraints on method type parameters -// for generic methods of generic variant interfaces - -// POSITIVE tests - -using System; - -public class C : IMinusT { } -public class D : IMinusT { } -public class E : IMinusT { } - - - -public class A5 : Test001PlusT -{ - public void method1(IMinusT t) where M : IMinusT - { - } -} - -public class A6 : Test002PlusT -{ - public string[] method2(IMinusT t) where M : IMinusT - { - return new string[10]; - } -} - -public class A7 : Test001MinusT -{ - public IMinusT method1(object t) where M : IPlusT - { - return (IMinusT)new E(); - } -} - - -public class TestClass -{ - static int iTestCount = 0; - static int iErrorCount = 0; - static int iExitCode = 101; - - public static void Eval(string location, bool exp) - { - ++iTestCount; - - if (!(exp)) - { - iErrorCount++; - Console.WriteLine("Test Failed at location: {0} @ count {1} ", location, iTestCount); - } - } - - - public static void LoadTypeInternal(string testType) - { - switch (testType) - { - case "Test001PlusT": - { - // positive test - // return type: void - // argument type: contravariant - // method type constraint: contravariant - - Test001PlusT test = (Test001PlusT)new A5(); - test.method1>((IMinusT)new C()); - break; - } - - case "Test002PlusT": - { - // positive test - // return type: covariant - // argument type: contravariant - // method type constraint: contravariant - - Test002PlusT test = (Test002PlusT)new A6(); - string[] st = test.method2>((IMinusT)new D()); - break; - } - - case "Test001MinusT": - { - // positive test - // return type: covariant - // argument type: contravariant - // method type constraint: contravariant - - Test001MinusT test = (Test001MinusT)new A7(); - IMinusT obj = test.method1>(new object()); - break; - } - - - default: throw new Exception("Unexpected testType"); - } - } - - public static void LoadTypeWrapper(string testType) - { - LoadTypeInternal(testType); - } - - public static bool LoadType(string testType, bool expected) - { - try - { - LoadTypeWrapper(testType); - - if (expected) - { - return true; - } - else - { - return false; - } - } - catch (MissingMethodException) - { - if (expected) - { - Console.WriteLine("Unexpected Exception MissingMethodException"); - return false; - } - else - { - return true; - } - - } - catch (TypeLoadException) - { - if (expected) - { - Console.WriteLine("Unexpected Exception TypeLoadException"); - return false; - } - else - { - return true; - } - } - catch (Exception E) - { - Console.WriteLine("Unexpected Exception {0}", E); - return false; - } - } - - private static bool RunTests() - { - // positive - Eval("Test101", LoadType("Test001PlusT", true)); - Eval("Test102", LoadType("Test002PlusT", true)); - Eval("Test103", LoadType("Test001MinusT", true)); - - if (iErrorCount > 0) - { - Console.WriteLine("Total test cases: " + iTestCount + " Failed test cases: " + iErrorCount); - return false; - } - else - { - Console.WriteLine("Total test cases: " + iTestCount); - return true; - } - } - - public static int Main(String[] args) - { - - if (RunTests()) - { - iExitCode = 100; - Console.WriteLine("All test cases passed"); - } - else - { - iExitCode = 101; - Console.WriteLine("Test failed"); - } - return iExitCode; - } - -} diff --git a/src/coreclr/tests/src/Loader/classloader/generics/regressions/109968/test.il b/src/coreclr/tests/src/Loader/classloader/generics/regressions/109968/test.il deleted file mode 100644 index b2f5f1a5dac0..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/generics/regressions/109968/test.il +++ /dev/null @@ -1,172 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } - -.assembly extern mscorlib {} -.assembly test {} -.module test.exe - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class interface public abstract auto ansi InterfaceConstraint -{ - .method public hidebysig newslot abstract virtual - instance void Meth() cil managed - { - } // end of method InterfaceConstraint::Meth - -} // end of class InterfaceConstraint - -.class public auto ansi beforefieldinit Base - extends [mscorlib]System.Object -{ - .method public hidebysig newslot virtual - instance void GenericMethod<([mscorlib]System.Object) T>(!!0 t) cil managed - { - // Code size 1 (0x1) - .maxstack 8 - ret - } // end of method Base::GenericMethod - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret - } // end of method Base::.ctor - -} // end of class Base - -.class public auto ansi beforefieldinit Derived - extends Base -{ - .method public hidebysig virtual instance void - GenericMethod<(InterfaceConstraint) T>(!!0 t) cil managed - { - // Code size 12 (0xc) - .maxstack 8 - ldarg.1 - box !!0 - callvirt instance void InterfaceConstraint::Meth() - ret - } // end of method Derived::GenericMethod - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - ldarg.0 - call instance void Base::.ctor() - ret - } // end of method Derived::.ctor - -} // end of class Derived - -.class public auto ansi beforefieldinit C1 - extends [mscorlib]System.Object - implements InterfaceConstraint -{ - .method public hidebysig newslot virtual final - instance void Meth() cil managed - { - // Code size 1 (0x1) - .maxstack 8 - ret - } // end of method C1::Meth - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret - } // end of method C1::.ctor - -} // end of class C1 - -.class public auto ansi beforefieldinit Test - extends [mscorlib]System.Object -{ - .method public hidebysig static void Eval() cil managed - { - // Code size 20 (0x14) - .maxstack 2 - .locals init (class Base V_0, - class InterfaceConstraint V_1) - newobj instance void Derived::.ctor() - stloc.0 - newobj instance void C1::.ctor() - stloc.1 - ldloc.0 - ldloc.1 - callvirt instance void Base::GenericMethod(!!0) - ret - } // end of method Test::Eval - - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - // Code size 60 (0x3c) - .maxstack 3 - .locals init (class [mscorlib]System.TypeLoadException V_0, - class [mscorlib]System.Exception V_1, - int32 V_2) - .try - { - call void Test::Eval() - ldstr "Test did not throw expected System.TypeLoadException" - call void [System.Console]System.Console::WriteLine(string) - ldstr "Test failed" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.s 101 - stloc.2 - leave.s IL_003a - - } // end .try - catch [mscorlib]System.TypeLoadException - { - ldstr "Test Passed" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.s 100 - stloc.2 - leave.s IL_003a - - } // end handler - catch [mscorlib]System.Exception - { - stloc.1 - ldstr "Test caught unexpected Exception" - call void [System.Console]System.Console::WriteLine(string) - ldstr "Test failed" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.s 101 - stloc.2 - leave.s IL_003a - - } // end handler - - IL_003a: ldloc.2 - ret - } // end of method Test::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret - } // end of method Test::.ctor - -} // end of class Test - diff --git a/src/coreclr/tests/src/Loader/classloader/generics/regressions/237932/repro237932.cs b/src/coreclr/tests/src/Loader/classloader/generics/regressions/237932/repro237932.cs deleted file mode 100644 index bd0723fb6cc4..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/generics/regressions/237932/repro237932.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// This is regression test for VSWhidbey 237932 -// The issue here was that the ThreadStatic field was previously shared for all C1 types -// and so when we created C1 and C1 the ThreadStatic -// field got incremented to 2, which is wrong. - - - -using System; -using System.Threading; - - -public class Test -{ - public static int Main() - { - C1 cOverflow = new C1(); - C1 cCast = new C1(); - - - if (C1.x == 1 && C1.x == 1) - { - Console.WriteLine("PASS"); - return 100; - } - else - { - Console.WriteLine("FAIL: Expected ThreadStatic field of both objects to be 1"); - return 101; - } - - } -} - -public class C1 -{ - [ThreadStatic] - public static int x; - - public C1() - { - x +=1; - Console.WriteLine(x); - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/generics/regressions/341477/Test.cs b/src/coreclr/tests/src/Loader/classloader/generics/regressions/341477/Test.cs deleted file mode 100644 index fdca872fe976..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/generics/regressions/341477/Test.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// This is regression test for VSW 341477 -// we were getting an assert failure due to using non-ASCII characters. - -using System; - -class Test -{ - - static int Main(string[] args) - { - Hello mystr = new Hello("PASS"); - - mystr.InstanceMethod(); - - return 100; - - } -} - -public class A -{ - public A() {} -} - -public class Hello -{ - public liıİ a; - public Hello (liıİ t) - { - a = t; - Console.WriteLine (a.ToString ()); - } - - public один InstanceMethod<один> () where один : new() - { - return new один(); - - } -} - diff --git a/src/coreclr/tests/src/Loader/classloader/generics/regressions/395780/testExplicitOverride2.il b/src/coreclr/tests/src/Loader/classloader/generics/regressions/395780/testExplicitOverride2.il deleted file mode 100644 index 0c6c2b4fca06..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/generics/regressions/395780/testExplicitOverride2.il +++ /dev/null @@ -1,171 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } -// this test is also regression test for VSW 395780. The difference is that -// .overrride directive in this case is in the class scope, whereas in testExplicitOverride -// .override directive is in method scope. - -// Microsoft (R) .NET Framework IL Disassembler. Version 2.0.41122.00 -// Copyright (C) Microsoft Corporation. All rights reserved. - - - -// Metadata version: v2.0.41122 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 2:0:0:0 -} -.assembly testExplicitOverride2 -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module testExplicitOverride2.exe -// MVID: {8B3E6954-BAFA-445B-A5E1-CECA62B7DCE6} -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x03090000 - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class interface public abstract auto ansi I`1 -{ - .method public hidebysig newslot abstract virtual - instance int32 M(!0 t) cil managed - { - } // end of method I`1::M - -} // end of class I`1 - -.class public auto ansi beforefieldinit C - extends [mscorlib]System.Object - implements class I`1 -{ - - .override method instance int32 class I`1::M(!0) with method instance int32 class C::MInC(string) - - .method public hidebysig newslot virtual final - instance int32 MInC(string t) cil managed - { - // Code size 7 (0x7) - .maxstack 1 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldc.i4.3 - IL_0002: stloc.0 - IL_0003: br.s IL_0005 - - IL_0005: ldloc.0 - IL_0006: ret - } // end of method C::MInC - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method C::.ctor - -} // end of class C - -.class public auto ansi beforefieldinit Test - extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - // Code size 105 (0x69) - .maxstack 2 - .locals init (class I`1 V_0, - int32 V_1, - class [mscorlib]System.Exception V_2, - int32 V_3, - bool V_4) - IL_0000: nop - .try - { - IL_0001: nop - IL_0002: newobj instance void C::.ctor() - IL_0007: stloc.0 - IL_0008: ldloc.0 - IL_0009: ldstr "Hello" - IL_000e: callvirt instance int32 class I`1::M(!0) - IL_0013: stloc.1 - IL_0014: ldloc.1 - IL_0015: ldc.i4.3 - IL_0016: ceq - IL_0018: ldc.i4.0 - IL_0019: ceq - IL_001b: stloc.s V_4 - IL_001d: ldloc.s V_4 - IL_001f: brtrue.s IL_0032 - - IL_0021: nop - IL_0022: ldstr "PASS" - IL_0027: call void [System.Console]System.Console::WriteLine(string) - IL_002c: nop - IL_002d: ldc.i4.s 100 - IL_002f: stloc.3 - IL_0030: leave.s IL_0066 - - IL_0032: nop - IL_0033: ldstr "FAIL: Incorrect method was invoked. Ret =" - IL_0038: ldloc.1 - IL_0039: box [mscorlib]System.Int32 - IL_003e: call string [mscorlib]System.String::Concat(object, - object) - IL_0043: call void [System.Console]System.Console::WriteLine(string) - IL_0048: nop - IL_0049: ldc.i4.s 101 - IL_004b: stloc.3 - IL_004c: leave.s IL_0066 - - } // end .try - catch [mscorlib]System.Exception - { - IL_004e: stloc.2 - IL_004f: nop - IL_0050: ldstr "FAIL: Caugh unexpected exception: " - IL_0055: ldloc.2 - IL_0056: call string [mscorlib]System.String::Concat(object, - object) - IL_005b: call void [System.Console]System.Console::WriteLine(string) - IL_0060: nop - IL_0061: ldc.i4.s 101 - IL_0063: stloc.3 - IL_0064: leave.s IL_0066 - - } // end handler - IL_0066: nop - IL_0067: ldloc.3 - IL_0068: ret - } // end of method Test::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method Test::.ctor - -} // end of class Test - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file test2.res diff --git a/src/coreclr/tests/src/Loader/classloader/generics/regressions/448208/b448208.cs b/src/coreclr/tests/src/Loader/classloader/generics/regressions/448208/b448208.cs deleted file mode 100644 index 990b50e1adeb..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/generics/regressions/448208/b448208.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// this test is regression test for VSW 448208 -// A program AVed if there was a readonly static in a generic type - - -using System; - -public class GenType1 -{ - static readonly int s_i = 0; - - public static bool foo() - { - return s_i == 0; - } - -} - -public class Test -{ - public static int Main() - { - GenType1.foo(); - Console.WriteLine("PASS"); - return 100; - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/generics/regressions/DD117522/Test.cs b/src/coreclr/tests/src/Loader/classloader/generics/regressions/DD117522/Test.cs deleted file mode 100644 index 948a5e6f83c3..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/generics/regressions/DD117522/Test.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; - -public class A -{ - public class B : A - { - public class C : B - { } - } -} - -public class Program -{ - public static int Main() - { - try - { - M(); - } - catch(TypeLoadException ex) - { - Console.WriteLine("Caught expected TypeLoadException. \nThe exception message is : {0}", ex.Message); - Console.WriteLine("PASS"); - return 100; - } - catch(Exception ex) - { - Console.WriteLine("Caught unexpected exception: {0}", ex.Message); - Console.WriteLine("FAIL"); - return 99; - } - - Console.WriteLine("Did not catch TypeLoadException, FAIL"); - return 99; - } - - [MethodImpl(MethodImplOptions.NoInlining)] - private static void M() - { - new A.B(); - } -} - diff --git a/src/coreclr/tests/src/Loader/classloader/generics/regressions/vsw237932/repro237932.cs b/src/coreclr/tests/src/Loader/classloader/generics/regressions/vsw237932/repro237932.cs deleted file mode 100644 index fa3b5139f2ff..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/generics/regressions/vsw237932/repro237932.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// This is regression test for VSWhidbey 237932 -// The issue here was that the ThreadStatic field was previously shared for all C1 types -// and so when we created C1 and C1 the ThreadStatic -// field got incremented to 2, which is wrong. - - - -using System; -using System.Threading; - - -public class Test -{ - public static int Main() - { - C1 cOverflow = new C1(); - C1 cCast = new C1(); - - - if (C1.x == 1 && C1.x == 1) - { - Console.WriteLine("PASS"); - return 100; - } - else - { - Console.WriteLine("FAIL: Excpected ThreadStatic field of both objects to be 1"); - return 101; - } - - } -} - -public class C1 -{ - public static int x; - - public C1() - { - x +=1; - Console.WriteLine(x); - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/generics/regressions/vsw395780/testExplicitOverride2.il b/src/coreclr/tests/src/Loader/classloader/generics/regressions/vsw395780/testExplicitOverride2.il deleted file mode 100644 index 0c6c2b4fca06..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/generics/regressions/vsw395780/testExplicitOverride2.il +++ /dev/null @@ -1,171 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } -// this test is also regression test for VSW 395780. The difference is that -// .overrride directive in this case is in the class scope, whereas in testExplicitOverride -// .override directive is in method scope. - -// Microsoft (R) .NET Framework IL Disassembler. Version 2.0.41122.00 -// Copyright (C) Microsoft Corporation. All rights reserved. - - - -// Metadata version: v2.0.41122 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 2:0:0:0 -} -.assembly testExplicitOverride2 -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module testExplicitOverride2.exe -// MVID: {8B3E6954-BAFA-445B-A5E1-CECA62B7DCE6} -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x03090000 - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class interface public abstract auto ansi I`1 -{ - .method public hidebysig newslot abstract virtual - instance int32 M(!0 t) cil managed - { - } // end of method I`1::M - -} // end of class I`1 - -.class public auto ansi beforefieldinit C - extends [mscorlib]System.Object - implements class I`1 -{ - - .override method instance int32 class I`1::M(!0) with method instance int32 class C::MInC(string) - - .method public hidebysig newslot virtual final - instance int32 MInC(string t) cil managed - { - // Code size 7 (0x7) - .maxstack 1 - .locals init (int32 V_0) - IL_0000: nop - IL_0001: ldc.i4.3 - IL_0002: stloc.0 - IL_0003: br.s IL_0005 - - IL_0005: ldloc.0 - IL_0006: ret - } // end of method C::MInC - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method C::.ctor - -} // end of class C - -.class public auto ansi beforefieldinit Test - extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - // Code size 105 (0x69) - .maxstack 2 - .locals init (class I`1 V_0, - int32 V_1, - class [mscorlib]System.Exception V_2, - int32 V_3, - bool V_4) - IL_0000: nop - .try - { - IL_0001: nop - IL_0002: newobj instance void C::.ctor() - IL_0007: stloc.0 - IL_0008: ldloc.0 - IL_0009: ldstr "Hello" - IL_000e: callvirt instance int32 class I`1::M(!0) - IL_0013: stloc.1 - IL_0014: ldloc.1 - IL_0015: ldc.i4.3 - IL_0016: ceq - IL_0018: ldc.i4.0 - IL_0019: ceq - IL_001b: stloc.s V_4 - IL_001d: ldloc.s V_4 - IL_001f: brtrue.s IL_0032 - - IL_0021: nop - IL_0022: ldstr "PASS" - IL_0027: call void [System.Console]System.Console::WriteLine(string) - IL_002c: nop - IL_002d: ldc.i4.s 100 - IL_002f: stloc.3 - IL_0030: leave.s IL_0066 - - IL_0032: nop - IL_0033: ldstr "FAIL: Incorrect method was invoked. Ret =" - IL_0038: ldloc.1 - IL_0039: box [mscorlib]System.Int32 - IL_003e: call string [mscorlib]System.String::Concat(object, - object) - IL_0043: call void [System.Console]System.Console::WriteLine(string) - IL_0048: nop - IL_0049: ldc.i4.s 101 - IL_004b: stloc.3 - IL_004c: leave.s IL_0066 - - } // end .try - catch [mscorlib]System.Exception - { - IL_004e: stloc.2 - IL_004f: nop - IL_0050: ldstr "FAIL: Caugh unexpected exception: " - IL_0055: ldloc.2 - IL_0056: call string [mscorlib]System.String::Concat(object, - object) - IL_005b: call void [System.Console]System.Console::WriteLine(string) - IL_0060: nop - IL_0061: ldc.i4.s 101 - IL_0063: stloc.3 - IL_0064: leave.s IL_0066 - - } // end handler - IL_0066: nop - IL_0067: ldloc.3 - IL_0068: ret - } // end of method Test::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method Test::.ctor - -} // end of class Test - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file test2.res diff --git a/src/coreclr/tests/src/Loader/classloader/methodoverriding/regressions/576621/test.il b/src/coreclr/tests/src/Loader/classloader/methodoverriding/regressions/576621/test.il deleted file mode 100644 index ef1214248b40..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/methodoverriding/regressions/576621/test.il +++ /dev/null @@ -1,64 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } -.assembly test {} -.assembly extern mscorlib {} - -.class public C1 -extends [mscorlib]System.Object -{ - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret - } - .method public virtual instance int32 M1() - { - ldc.i4 1 - ret - } - .method public virtual instance int32 M2() - { - ldc.i4 2 - ret - } - .method public virtual instance int32 M3() - { - ldc.i4 3 - ret - } -} - -.class public C2 -extends C1 -{ - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - ldarg.0 - call instance void C1::.ctor() - ret - } - .method public virtual instance int32 M3() - { - .override C1::M2 - ldc.i4 4 - ret - } - .method public virtual instance int32 M4() - { - .override C1::M1 - ldc.i4 5 - ret - } - .method public virtual instance int32 M1() - { - .override C1::M3 - ldc.i4 6 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/methodoverriding/regressions/592026/test.il b/src/coreclr/tests/src/Loader/classloader/methodoverriding/regressions/592026/test.il deleted file mode 100644 index ff1995b27fc2..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/methodoverriding/regressions/592026/test.il +++ /dev/null @@ -1,180 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } -// running peverify on this assembly we were getting an Assert Failure -// The issue was that we were caling GetDescFromMemberDefOrRefThrowing() -// and this method depends on a fully-loaded type, including parent types, which is not -// always guaranteed (as was in this case). -// see comments in PlaceMembers (sd changelist 1442334) - - -.assembly test {} -.assembly extern mscorlib {} - -.class public C1 -extends [mscorlib]System.Object -{ - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret - } - .method public virtual instance int32 M0() - { - ldc.i4 0 - ret - } - .method public virtual instance int32 M1() - { - ldc.i4 1 - ret - } - .method public virtual instance int32 M2() - { - ldc.i4 2 - ret - } - .method public virtual instance int32 M3() - { - ldc.i4 3 - ret - } -} -.class public C2 -extends class C1 -{ - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - ldarg.0 - call instance void class C1::.ctor() - ret - } - .method public virtual instance int32 M1() - { - .override class C1::M2 - ldc.i4 4 - ret - } - .method public virtual instance int32 M5() - { - ldc.i4 5 - ret - } - .method public newslot virtual instance int32 M2() - { - ldc.i4 6 - ret - } - .method public virtual instance int32 M6() - { - .override class C1::M1 - ldc.i4 7 - ret - } -} -.class public C3 -extends class C2 -{ - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - ldarg.0 - call instance void class C2::.ctor() - ret - } - .method public virtual instance int32 M0() - { - .override class C2::M5 - ldc.i4 8 - ret - } - .method public virtual instance int32 M5() - { - ldc.i4 9 - ret - } - .method public newslot virtual instance int32 M6() - { - .override class C2::M2 - ldc.i4 10 - ret - } - .method public virtual instance int32 M2() - { - .override class C2::M1 - ldc.i4 11 - ret - } -} -.class public C4 -extends class C3 -{ - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - ldarg.0 - call instance void class C3::.ctor() - ret - } - .method public virtual instance int32 M0() - { - .override class C3::M5 - ldc.i4 12 - ret - } - .method public newslot virtual instance int32 M5() - { - .override class C3::M0 - ldc.i4 13 - ret - } - .method public virtual instance int32 M6() - { - ldc.i4 14 - ret - } - .method public newslot virtual instance int32 M7() - { - .override class C3::M6 - ldc.i4 15 - ret - } -} -.class public C5 -extends C4 -{ - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - ldarg.0 - call instance void C4::.ctor() - ret - } - .method public virtual instance int32 M0() - { - ldc.i4 16 - ret - } - .method public virtual instance int32 M7() - { - .override C4::M0 - ldc.i4 17 - ret - } - .method public virtual instance int32 M8() - { - ldc.i4 18 - ret - } - .method public virtual instance int32 M9() - { - .override C4::M5 - ldc.i4 19 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/nesting/Regressions/dev10_602978/Library.cs b/src/coreclr/tests/src/Loader/classloader/nesting/Regressions/dev10_602978/Library.cs deleted file mode 100644 index db1dd79fbbf4..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/nesting/Regressions/dev10_602978/Library.cs +++ /dev/null @@ -1,9 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -public class RemoteBase_InSeparateAssembly -{ - protected interface IProtected_InSeparateAssembly { string Touch(); } - protected static string UseIProtected(IProtected_InSeparateAssembly intrf) { return intrf.Touch(); } -} diff --git a/src/coreclr/tests/src/Loader/classloader/nesting/Tests/nesting4.il b/src/coreclr/tests/src/Loader/classloader/nesting/Tests/nesting4.il deleted file mode 100644 index a5ee7e9bf2d0..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/nesting/Tests/nesting4.il +++ /dev/null @@ -1,126 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } -// model revision #2 -// To compile: ilasm nesting4.il - -.assembly extern mscorlib {} -.assembly nesting4{} - -// Nesting module: PureManaged -// Nesting location: MainModule - -// enclosing type -// kind: Class -// flag: None -// visibility: private -// generics: Nongeneric -// depends on nested: InstanceField - -.class private EnclType -{ - // nested type - // kind: Interface - // flag: abstract - // visibility: public - // generics: Nongeneric - // depends on enclosing: StaticField - - .class interface abstract nested public NestedType - { - // nested depends on enclosing: StaticField - // nested member visibility: public - .field public static class EnclType sEnclType - } - - // enclosing depends on nested: InstanceField - // enclosing member visibility: famorassem - .field famorassem class EnclType/NestedType sNestClass - - // entry point location: EnclosingType - - .method public static int32 Main() - { - .entrypoint - .locals init (class [mscorlib]System.Exception V_0, - int32 V_1) - - .try - { - newobj instance void class Client::.ctor() - call instance void Client::method1() - ldstr "PASS" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.s 100 - stloc.1 - leave.s end - } - catch [mscorlib]System.Exception - { - stloc.0 - ldstr "{0}Caught unexpected exception." - ldloc.0 - call void [System.Console]System.Console::WriteLine(string,object) - ldstr "FAIL" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.s 101 - stloc.1 - leave.s end - } - end: ldloc.1 - ret - } - - .method public specialname instance void .ctor() cil managed - { - .maxstack 8 - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret - } -} - - -// Client module: PureManaged -// Client location: MainModule -// Client interaction: None - -.class public Client -{ - - .method public specialname instance void .ctor() cil managed - { - .maxstack 8 - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret - } - .method public instance void method1() - { - - // load enclosing and nested types - - newobj instance void class EnclType::.ctor() - stsfld class EnclType class EnclType/NestedType::sEnclType - ldsfld class EnclType class EnclType/NestedType::sEnclType - - // Helper1 implements EnclType/NestedType - - newobj instance void class Helper1::.ctor() - stfld class EnclType/NestedType class EnclType::sNestClass - ret - } -} - -.class public Helper1 implements EnclType/NestedType -{ - .method public specialname instance void .ctor() cil managed - { - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret - } - -} diff --git a/src/coreclr/tests/src/Loader/classloader/nesting/coreclr/nesting4.il b/src/coreclr/tests/src/Loader/classloader/nesting/coreclr/nesting4.il deleted file mode 100644 index a5ee7e9bf2d0..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/nesting/coreclr/nesting4.il +++ /dev/null @@ -1,126 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } -// model revision #2 -// To compile: ilasm nesting4.il - -.assembly extern mscorlib {} -.assembly nesting4{} - -// Nesting module: PureManaged -// Nesting location: MainModule - -// enclosing type -// kind: Class -// flag: None -// visibility: private -// generics: Nongeneric -// depends on nested: InstanceField - -.class private EnclType -{ - // nested type - // kind: Interface - // flag: abstract - // visibility: public - // generics: Nongeneric - // depends on enclosing: StaticField - - .class interface abstract nested public NestedType - { - // nested depends on enclosing: StaticField - // nested member visibility: public - .field public static class EnclType sEnclType - } - - // enclosing depends on nested: InstanceField - // enclosing member visibility: famorassem - .field famorassem class EnclType/NestedType sNestClass - - // entry point location: EnclosingType - - .method public static int32 Main() - { - .entrypoint - .locals init (class [mscorlib]System.Exception V_0, - int32 V_1) - - .try - { - newobj instance void class Client::.ctor() - call instance void Client::method1() - ldstr "PASS" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.s 100 - stloc.1 - leave.s end - } - catch [mscorlib]System.Exception - { - stloc.0 - ldstr "{0}Caught unexpected exception." - ldloc.0 - call void [System.Console]System.Console::WriteLine(string,object) - ldstr "FAIL" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.s 101 - stloc.1 - leave.s end - } - end: ldloc.1 - ret - } - - .method public specialname instance void .ctor() cil managed - { - .maxstack 8 - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret - } -} - - -// Client module: PureManaged -// Client location: MainModule -// Client interaction: None - -.class public Client -{ - - .method public specialname instance void .ctor() cil managed - { - .maxstack 8 - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret - } - .method public instance void method1() - { - - // load enclosing and nested types - - newobj instance void class EnclType::.ctor() - stsfld class EnclType class EnclType/NestedType::sEnclType - ldsfld class EnclType class EnclType/NestedType::sEnclType - - // Helper1 implements EnclType/NestedType - - newobj instance void class Helper1::.ctor() - stfld class EnclType/NestedType class EnclType::sNestClass - ret - } -} - -.class public Helper1 implements EnclType/NestedType -{ - .method public specialname instance void .ctor() cil managed - { - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret - } - -} diff --git a/src/coreclr/tests/src/Loader/classloader/regressions/101682/lib.cs b/src/coreclr/tests/src/Loader/classloader/regressions/101682/lib.cs deleted file mode 100644 index 1260a01e6b13..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/regressions/101682/lib.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -public class Foo -{ - public virtual void FV(B x) { - Console.WriteLine("Foo<{0}>.FV<{1}>({2})", typeof(A), typeof(B), x); - } - public virtual void FV(B x) { - Console.WriteLine("Foo<{0}>.FV<{1},{2}>({3})", typeof(A), typeof(B), typeof(C), x); - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/regressions/101904/test.cs b/src/coreclr/tests/src/Loader/classloader/regressions/101904/test.cs deleted file mode 100644 index 0748e53f14cb..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/regressions/101904/test.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// This test should be run with verification on: e.g. caspol -m -cg 1.1 Everything -// In this test, we have MyType implementing IFoo twice, first indirectly through MyBaseType -// as IFoo, and second directly as IFoo. -// In the end, a MyType should be assignable to an IFoo or an IFoo. -using System; - -public interface IFoo{ -} - -public class MyBaseType : IFoo{ -} - -public class MyType : MyBaseType, IFoo{ -} - -public class CMain{ - public static int Main(){ - MyType mt = new MyType(); - IFoo f = mt; - Console.WriteLine("PASS"); // if we make this far, we passed. - return 100; - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/regressions/106647/lib.cs b/src/coreclr/tests/src/Loader/classloader/regressions/106647/lib.cs deleted file mode 100644 index d0597939a6c3..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/regressions/106647/lib.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -public class Base -{ - public virtual void FV(ref MethodsFired pMF) { - pMF |= MethodsFired.Base; - } -} - -public class BaseNonGen -{ - public virtual void FV(ref MethodsFired pMF) { - pMF |= MethodsFired.Base; - } -} - -[Flags] -public enum MethodsFired{ - None = 0x0000, - Leaf = 0x0001, - Interior = 0x0002, - Base = 0x0004, - All = Leaf | Interior | Base -} diff --git a/src/coreclr/tests/src/Loader/classloader/regressions/111021/main.cs b/src/coreclr/tests/src/Loader/classloader/regressions/111021/main.cs deleted file mode 100644 index 7a107d7f003e..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/regressions/111021/main.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -public class CMain{ - public static int Count = 0; - public static int Main(String[] args){ - String s; - s = Gen.x; - // we expect the Gen.cctor to fire only once! - if(1 == Count){ - Console.WriteLine("PASS"); - return 100; - } - else{ - Console.WriteLine("FAIL"); - return 101; - } - } -} - -public class Gen{ - - public static T x; - static Gen(){ - CMain.Count++; - Console.WriteLine("cctor. Type: {0}",typeof(T).ToString()); - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/regressions/123413/lib.cs b/src/coreclr/tests/src/Loader/classloader/regressions/123413/lib.cs deleted file mode 100644 index 95c7435d0444..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/regressions/123413/lib.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -public class Base -{ - public virtual void FV(ref MethodsFired pMF) { - pMF |= MethodsFired.Base; - } -} - -[Flags] -public enum MethodsFired{ - None = 0x0000, - Leaf = 0x0001, - Interior = 0x0002, - Base = 0x0004, - All = Leaf | Interior | Base -} diff --git a/src/coreclr/tests/src/Loader/classloader/regressions/139056/Foo.il b/src/coreclr/tests/src/Loader/classloader/regressions/139056/Foo.il deleted file mode 100644 index a2bc3bba76ea..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/regressions/139056/Foo.il +++ /dev/null @@ -1,163 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } - -// Microsoft (R) .NET Framework IL Disassembler. Version 1.2.30612.00 -// Copyright (C) Microsoft Corporation 1998-2003. All rights reserved. - - - -// Metadata version: v1.2.30612 -.assembly extern legacy library mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .hash = (81 51 4F DD 43 6C 78 C8 8C 87 6B 7F 41 A9 D8 DA // .QO.Clx...k.A... - FA 84 09 19 ) - .ver 1:2:3400:0 -} -.assembly legacy library Foo -{ - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(bool, - // bool) = ( 01 00 00 01 00 00 ) - - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module Foo.exe -// MVID: {E2294DFD-8443-4AA7-9104-BC680C3B8133} -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x04130000 - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class public auto ansi beforefieldinit Foo - extends [mscorlib]System.Object -{ - .method public hidebysig newslot virtual - instance void DoFoo() cil managed - { - // Code size 11 (0xb) - .maxstack 8 - IL_0000: ldstr "Running Foo.DoFoo" - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: ret - } // end of method Foo::DoFoo - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method Foo::.ctor - -} // end of class Foo - -.class public auto ansi beforefieldinit Bar - extends Foo -{ - .method public hidebysig newslot virtual - instance void NotDoFoo1() cil managed - { - .override Foo::DoFoo - - // Code size 11 (0xb) - .maxstack 8 - IL_0000: ldstr "Running Bar.NotDoFoo1" - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: ret - } // end of method Bar::NotDoFoo1 - - .method public hidebysig virtual instance void - DoFoo() cil managed - { - // Code size 11 (0xb) - .maxstack 8 - IL_0000: ldstr "Running Bar.DoFoo" - IL_0005: call void [System.Console]System.Console::WriteLine(string) - IL_000a: ret - } // end of method Bar::DoFoo - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void Foo::.ctor() - IL_0006: ret - } // end of method Bar::.ctor - -} // end of class Bar - -.class public auto ansi beforefieldinit Test - extends [mscorlib]System.Object -{ - - .method public static int32 Main() - { - .entrypoint - .locals init (class Bar V_0, - class Foo V_1, - class [mscorlib]System.Exception V_2, - int32 V_3) - - .try - { - newobj instance void Bar::.ctor() - stloc.0 - ldloc.0 - stloc.1 - - ldstr "PASS" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.s 100 - stloc.3 - leave.s end - } - catch [mscorlib]System.Exception - { - stloc.2 - ldstr "Caught unepxected exception: {0}" - ldloc.2 - callvirt instance string [mscorlib]System.Exception::get_Message() - call void [System.Console]System.Console::WriteLine(string, - object) - ldstr "FAIL" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4.s 101 - stloc.3 - leave.s end - } - end: ldloc.3 - ret - } - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method Test::.ctor - -} // end of class Test - - -// ============================================================= - -//*********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file Foo.res diff --git a/src/coreclr/tests/src/Loader/classloader/regressions/208900/bug.cs b/src/coreclr/tests/src/Loader/classloader/regressions/208900/bug.cs deleted file mode 100644 index 7c0d7c57ea6d..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/regressions/208900/bug.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// Regression test for bug VSWhidbey 208900 -// "Corrupt OBJECTREF when calling a virtual generic method instantiated at a struct which returns that struct" - -#pragma warning disable 0414 -using System; - -struct MyStruct -{ - public MyStruct(object _f1, int _f2) { f1 = _f1; f2 = _f2; } - object f1; - int f2; -} - - -class M -{ - public virtual U GenericMethod(U x1) { return x1; } -} - -class Test -{ - - static int Main() - { - M obj = new M(); - MyStruct myStruct = new MyStruct("obj", 787980); - if(obj.GenericMethod(myStruct).Equals(myStruct)){ - Console.WriteLine("PASS"); - return 100; - } - else{ - Console.WriteLine("FAIL"); - return 101; - } - } - -} - - diff --git a/src/coreclr/tests/src/Loader/classloader/regressions/226741/test3.il b/src/coreclr/tests/src/Loader/classloader/regressions/226741/test3.il deleted file mode 100644 index 479f7386204b..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/regressions/226741/test3.il +++ /dev/null @@ -1,24 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } -.assembly test3{} -.assembly extern mscorlib{} - -.class public CMain{ - .method public static int32 Main(){ - .entrypoint - call int32 IFoo::Foo() - ret - } -} - -.class public interface IFoo{ - .method public static int32 Foo(){ - ldstr "PASS: In IFoo::Foo" - call void [System.Console]System.Console::WriteLine(string) - ldc.i4 100 - ret - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/regressions/307137/vsw307137.cs b/src/coreclr/tests/src/Loader/classloader/regressions/307137/vsw307137.cs deleted file mode 100644 index bdd05d03d9df..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/regressions/307137/vsw307137.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// this is regression test for VSW 307137 - -/* -The bug description has a good summary of the issue (from AtsushiK): - -A summary of the whole sordid affair. - - -In V1 and Everett, sequential classes only affected unmanaged layout and the .size metadata was used to add padding to the -unmanaged layout (IJW used this to implement their unmanaged structures. That's the only reason the .size metadata exists. -Somewhere along the line, C# started using the .size metadata to implemented fixed buffer arrays inside managed structures. -They'd declare just one field of the array element type and use the .size metadata to allocate space for the other elements. -Problem was, the .size metadata was never defined to expand the managed layout. This feature should never have worked. - -So how did it work for them? Plain dumb luck. In the CLR, if your structure consists of just one scalar-type field, the CLR -classifies it internally as a "blittable" structure. That is, it makes the managed layout match the unmanaged layout byte for -byte so that interop can optimize the marshaling of this structure to a bit-copy. Thus, because of this accidental reliance on -this internal optimization by the CLR, fixed buffers "worked" for plain old integer/float/double types. -There was two cases where it wouldn't work: chars and booleans. That's because these datatypes don't translate byte for -byte (different sizes, bools need normalizing.) So the blitting optimization doesn't kick in in those cases. - -Someone found out that the was case for chars and opened VSW:147145. A couple months later, I unwittingly"fixed" this bug -when I implemented the managed sequential layout feature. This feature now causes the .size metadata to expand out the -managed layout too (whether this was a good idea is debatable but it got VSW:147145 off the CLR team's back even though -they didn't understand how it got fixed..) - -Now we have the boolean case. Booleans are also non-blittable (they have to be normalized so they aren't blittable even if you -use a FieldMarshal override to force the native size to 1.) But because both the unmanaged size and managed size impose a -minimum value on the .size metadata, the .size metadata can't go below 4 (sizeof(BOOL) in Win32 native). - -CLR now overrides the .size metadata if it is less than the minimum size needed to hold the fields. - -*/ - -using System; - -unsafe struct S -{ - fixed bool b[3]; -} - -public class Test -{ - public static int Main() - { - try - { - #pragma warning disable 219 - S s = new S(); - #pragma warning restore 219 - - Console.WriteLine("PASS"); - return 100; - } - catch (Exception e) - { - Console.WriteLine("Caught unexpected excpetion: " + e); - return 101; - } - } - -} diff --git a/src/coreclr/tests/src/Loader/classloader/regressions/348842/A.cs b/src/coreclr/tests/src/Loader/classloader/regressions/348842/A.cs deleted file mode 100644 index e3762d456e14..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/regressions/348842/A.cs +++ /dev/null @@ -1,8 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace A -{ - public interface IPlugin { } -} diff --git a/src/coreclr/tests/src/Loader/classloader/regressions/421439/Test.il b/src/coreclr/tests/src/Loader/classloader/regressions/421439/Test.il deleted file mode 100644 index 93c0c6f37909..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/regressions/421439/Test.il +++ /dev/null @@ -1,65 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } -.assembly extern mscorlib {} -.assembly extern RefX1 {} -.assembly extern ValX1 {} - -.assembly Test {} - -.class public sequential ansi sealed beforefieldinit Gen - extends [mscorlib]System.ValueType -{ - .field public !T Fld1 - .method public hidebysig specialname rtspecialname - instance void .ctor(!T fld1) cil managed - { - .maxstack 8 - nop - ldarg.0 - ldarg.1 - stfld !0 valuetype Gen::Fld1 - ret - } -} - - -// the below lines cause an AV -// new Gen[][][]>(new ValX1[1][][]); -// new Gen>>>(new RefX1>>()); - -.class public auto ansi beforefieldinit Test - extends [mscorlib]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - .maxstack 8 - nop - ldc.i4.1 - newarr valuetype [ValX1]ValX1[][] - newobj instance void valuetype Gen[][][]>::.ctor(!0) - pop - newobj instance void class [RefX1]RefX1>>::.ctor() - newobj instance void valuetype Gen>>>::.ctor(!0) - pop - - ldstr "PASS" - call void [System.Console]System.Console::WriteLine(string) - - ldc.i4 100 - ret - } - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - .maxstack 8 - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret - } - -} diff --git a/src/coreclr/tests/src/Loader/classloader/regressions/440935/Foo.il b/src/coreclr/tests/src/Loader/classloader/regressions/440935/Foo.il deleted file mode 100644 index c987e47435a5..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/regressions/440935/Foo.il +++ /dev/null @@ -1,72 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } - -// Microsoft (R) .NET Framework IL Disassembler. Version 2.0.50117.00 -// Copyright (C) Microsoft Corporation. All rights reserved. - - - -// Metadata version: v2.0.50117 -.assembly extern retargetable mscorlib -{ - .publickeytoken = (96 9D B8 05 3D 33 22 AC ) // ....=3". - .ver 0:0:0:0 -} -.assembly extern mscorlib as mscorlib_1 -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 2:0:0:0 -} -.assembly extern Bar -{ - .ver 0:0:0:0 -} -.assembly Foo -{ - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module M -// MVID: {01EC94B1-004D-0000-A745-0383B194EC41} -.imagebase 0x034f0000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x03090000 - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class public auto ansi beforefieldinit Foo - extends [mscorlib_1]System.Object -{ - .method public hidebysig static void Meth() cil managed - { - // Code size 8 (0x8) - .maxstack 8 - IL_0000: nop - IL_0001: call void class [Bar]Bar::BarMeth() - IL_0006: nop - IL_0007: ret - } // end of method Foo::Meth - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib_1]System.Object::.ctor() - IL_0006: ret - } // end of method Foo::.ctor - -} // end of class Foo - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/src/coreclr/tests/src/Loader/classloader/regressions/440935/Test.il b/src/coreclr/tests/src/Loader/classloader/regressions/440935/Test.il deleted file mode 100644 index be376a5da8f0..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/regressions/440935/Test.il +++ /dev/null @@ -1,75 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } - -// Microsoft (R) .NET Framework IL Disassembler. Version 2.0.50117.00 -// Copyright (C) Microsoft Corporation. All rights reserved. - - - -// Metadata version: v2.0.50117 -.assembly extern retargetable mscorlib -{ - .publickeytoken = (96 9D B8 05 3D 33 22 AC ) // ....=3". - .ver 0:0:0:0 -} -.assembly extern mscorlib as mscorlib_1 -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 2:0:0:0 -} -.assembly extern Foo -{ - .ver 0:0:0:0 -} -.assembly Test -{ - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module M -// MVID: {01EC94B1-004D-0000-A745-0383B194EC41} -.imagebase 0x034f0000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x03090000 - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class public auto ansi beforefieldinit Test - extends [mscorlib_1]System.Object -{ - .method public hidebysig static int32 Main() cil managed - { - .entrypoint - // Code size 8 (0x8) - .maxstack 8 - IL_0000: nop - IL_0001: call void [Foo]Foo::Meth() - IL_0006: nop - - ldc.i4 100 - IL_0007: ret - } // end of method Test::Main - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib_1]System.Object::.ctor() - IL_0006: ret - } // end of method Test::.ctor - -} // end of class Test - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/src/coreclr/tests/src/Loader/classloader/regressions/529206/moduleCctorThrow.il b/src/coreclr/tests/src/Loader/classloader/regressions/529206/moduleCctorThrow.il deleted file mode 100644 index 02341b48baf0..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/regressions/529206/moduleCctorThrow.il +++ /dev/null @@ -1,53 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 2:0:0:0 -} - -.assembly moduleCctorThrow {} - - - .method private hidebysig specialname rtspecialname static - void .cctor() cil managed - { - .maxstack 8 - nop - ldstr "Inside module .cctor" - call void [System.Console]System.Console::WriteLine(string) - - newobj instance void [mscorlib]System.Exception::.ctor() - throw - - ret - } // end of method Foo::.cctor - - - -.class public auto ansi TriggerModuleCctorClass - extends [mscorlib]System.Object -{ - .field public static int32 intStatic - - .method public static void CheckInit() noinlining - { - ret - } - - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - - .maxstack 8 - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret - } // end of method Test1::.ctor - -} - diff --git a/src/coreclr/tests/src/Loader/classloader/regressions/529206/vsw529206ModuleCctor.cs b/src/coreclr/tests/src/Loader/classloader/regressions/529206/vsw529206ModuleCctor.cs deleted file mode 100644 index 9bc966a1da45..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/regressions/529206/vsw529206ModuleCctor.cs +++ /dev/null @@ -1,93 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// regression test for VSWhidbey 529206 for throwing TypeInitialization inside module .cctor -// We were appending every time the callstack and using the same exception object. -// Now we still use the same object, but callstack is cleared every time. - - -using System; -using System.Runtime.CompilerServices; - -class Test -{ - public static bool pass; - - [MethodImpl(MethodImplOptions.NoInlining)] - public static void RunTest() - { - // TRIGGER: static field access, ref type - TriggerModuleCctorClass.intStatic = 5; - } - - - [MethodImpl(MethodImplOptions.NoInlining)] - public static void RunTest2() - { - // TRIGGER: static field access, ref type - TriggerModuleCctorClass.intStatic = 5; - } - - public static int Main() - { - pass = true; - - try - { - RunTest(); - - Console.WriteLine("Did not catch expected TypeInitializationException exception"); - pass = false; - } - catch (TypeInitializationException e) - { - Console.WriteLine("Caught expected exception 1st time\n" + e); - - } - catch (Exception e) - { - Console.WriteLine("Caught unexpected exception 1st time: " + e); - pass = false; - } - - - try - { - RunTest2(); - - Console.WriteLine("Did not catch expected TypeInitializationException exception"); - pass = false; - } - catch (TypeInitializationException e ) - { - Console.WriteLine("Caught expected exception 2nd time\n" + e); - - // if this string is found in the callstack it means we're appending callstack - // instead of having a new one each time. - if (e.StackTrace.IndexOf("at Test.RunTest()") != -1) - { - Console.WriteLine("2nd time: Incorrect stack trace"); - pass = false; - } - - } - catch (Exception e) - { - Console.WriteLine("Caught unexpected exception 2nd time: " + e); - pass = false; - - } - - if (pass) - { - Console.WriteLine("PASS"); - return 100; - } - else - { - Console.WriteLine("FAIL"); - return 101; - } - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/regressions/asurt150271/test23.il b/src/coreclr/tests/src/Loader/classloader/regressions/asurt150271/test23.il deleted file mode 100644 index fe0d3fe23d03..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/regressions/asurt150271/test23.il +++ /dev/null @@ -1,67 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } -// non-blittable by objref field, large offset, large field size, -// one field is a valuetype that has an objref member field -// (this is to hit EEClass::CheckValueClassLayout()) -.assembly test23{} -.assembly extern mscorlib{} - -.class public explicit sealed LargeClass extends [mscorlib]System.ValueType{ - .field [0] public object o1 - .size 0x200004 -} - -.class public explicit Class1 extends [mscorlib]System.Object{ - .field [0] public int32 i1 - .field [8] public object o1 - .field [16] public int32 i2 - .field [24] public valuetype LargeClass lc - - - .method public specialname rtspecialname void .ctor(){ - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret - } - -} - -.method public static int32 Main(){ - .entrypoint - - .locals init(class Class1 c1) - - newobj instance void Class1::.ctor() - stloc.0 - - - - ldstr "hello" - call void [System.Console]System.Console::WriteLine(string) - - ldloc.0 - ldc.i4.1 - stfld int32 Class1::i1 - - - ldloc.0 - ldc.i4.2 - stfld int32 Class1::i2 - - - ldstr "field i1: {0}, i2: {1}\n\nPASS" - ldloc.0 - ldfld int32 Class1::i1 - box int32 - ldloc.0 - ldfld int32 Class1::i2 - box int32 - call void [System.Console]System.Console::WriteLine(string,object,object) - - ldc.i4 100 - ret - -} diff --git a/src/coreclr/tests/src/Loader/classloader/regressions/asurt150271/test3.il b/src/coreclr/tests/src/Loader/classloader/regressions/asurt150271/test3.il deleted file mode 100644 index bacccfd1f44e..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/regressions/asurt150271/test3.il +++ /dev/null @@ -1,95 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } -// blittable, absurdly large field offset, expect TypeLoadException -.assembly test3{} -.assembly extern mscorlib{} - -.class public explicit Class1 extends [mscorlib]System.Object{ - .field [0] public int32 i1 - .field [1073741824] public int32 i2 // offset: 1024*1024*1024 - - .method public specialname rtspecialname void .ctor(){ - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret - } - -} - - -.method public static int32 Main(){ - .entrypoint - - .locals init (class [mscorlib]System.Exception e2) - - .try{ - call void Go() - ldstr "FAIL: expected TypeLoadException, but no exception was caught" - call void [System.Console]System.Console::WriteLine(string) - leave NOT_CAUGHT - } - catch [mscorlib]System.TypeLoadException{ - pop // throw away the exception object - ldstr "PASS" - call void [System.Console]System.Console::WriteLine(string) - leave CAUGHT_EXPECTED - } - catch [mscorlib]System.Exception{ - stloc e2 - ldstr "FAIL: expected TypeLoadException, but instead caught the following:\n{0}" - ldloc e2 - call void [System.Console]System.Console::WriteLine(string,object) - leave CAUGHT_UNEXPECTED - } - - NOT_CAUGHT: - ldc.i4 101 - br END - - CAUGHT_EXPECTED: - ldc.i4 100 - br END - - CAUGHT_UNEXPECTED: - ldc.i4 102 - br END - - END: - ret -} - -.method public static void Go(){ - .locals init(class Class1 c1) - - newobj instance void Class1::.ctor() - stloc.0 - - - - ldstr "hello" - call void [System.Console]System.Console::WriteLine(string) - - ldloc.0 - ldc.i4.1 - stfld int32 Class1::i1 - - - ldloc.0 - ldc.i4.2 - stfld int32 Class1::i2 - - - ldstr "field i1: {0}, i2: {1}\n\nPASS" - ldloc.0 - ldfld int32 Class1::i1 - box int32 - ldloc.0 - ldfld int32 Class1::i2 - box int32 - call void [System.Console]System.Console::WriteLine(string,object,object) - - ret -} diff --git a/src/coreclr/tests/src/Loader/classloader/regressions/dd52/test.il b/src/coreclr/tests/src/Loader/classloader/regressions/dd52/test.il deleted file mode 100644 index 57a41c0ad3c7..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/regressions/dd52/test.il +++ /dev/null @@ -1,70 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } -.assembly test {} -.assembly extern mscorlib {} - - - -.class public C27 -extends [mscorlib]System.Object -{ - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret - } - - .method public newslot virtual instance int32 M3() - { - ldc.i4 53 - ret - } -} - -.class public C28 -extends class C27 -{ - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - ldarg.0 - call instance void class C27::.ctor() - ret - } - .method public newslot virtual instance int32 M28() - { - .override class C27::M3 - ldc.i4 54 - ret - } - .method public virtual instance int32 M3() - { - ldc.i4 55 - ret - } -} - -.class public C29 -extends class C28 -{ - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - ldarg.0 - call instance void class C28::.ctor() - ret - } - .method public virtual instance int32 M28() - { - .override class C28::M3 - ldc.i4 56 - ret - } - -} - diff --git a/src/coreclr/tests/src/Loader/classloader/regressions/dev10_398410/utility.cs b/src/coreclr/tests/src/Loader/classloader/regressions/dev10_398410/utility.cs deleted file mode 100644 index 9f8b19d4ad0a..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/regressions/dev10_398410/utility.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -public interface I -{ - string Print(); -} - -public class MyBase -{ - public virtual string Print() { return "MyBase.Print<" + typeof(T) + "> called"; } -} diff --git a/src/coreclr/tests/src/Loader/classloader/regressions/dev10_897464/Test.il b/src/coreclr/tests/src/Loader/classloader/regressions/dev10_897464/Test.il deleted file mode 100644 index 7177f3a225cb..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/regressions/dev10_897464/Test.il +++ /dev/null @@ -1,38 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } -.assembly extern mscorlib -{ -} - -.assembly Test -{ - .hash algorithm 0x00008004 - .ver 1:0:0:0 -} - -.module Test.dll -.imagebase 0x00400000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - -.field public static literal valuetype Test.MyEnum LiteralValue = int32(0x00000001) - -.class public auto ansi sealed Test.MyEnum - extends [mscorlib]System.Enum -{ - .field public specialname rtspecialname int32 value__ - .field public static literal valuetype Test.MyEnum Zero = int32(0x00000000) - .field public static literal valuetype Test.MyEnum One = int32(0x00000001) -} - - -// Just here so we can reference something -/*.class interface public abstract auto ansi Test.IEmpty -{ -} -*/ diff --git a/src/coreclr/tests/src/Loader/classloader/regressions/dev11_256384/Library.cs b/src/coreclr/tests/src/Loader/classloader/regressions/dev11_256384/Library.cs deleted file mode 100644 index 5673cc4066f6..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/regressions/dev11_256384/Library.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -public interface I -{ - void M(); -} - -public class A : I -{ - public virtual void M() {} -} - -public class B_JIT : A -{ - // Just to make sure that we do not have shared VTable indirection with parent - public virtual void M2() {} -} diff --git a/src/coreclr/tests/src/Loader/classloader/regressions/vsw111021/main.cs b/src/coreclr/tests/src/Loader/classloader/regressions/vsw111021/main.cs deleted file mode 100644 index 7a107d7f003e..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/regressions/vsw111021/main.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -public class CMain{ - public static int Count = 0; - public static int Main(String[] args){ - String s; - s = Gen.x; - // we expect the Gen.cctor to fire only once! - if(1 == Count){ - Console.WriteLine("PASS"); - return 100; - } - else{ - Console.WriteLine("FAIL"); - return 101; - } - } -} - -public class Gen{ - - public static T x; - static Gen(){ - CMain.Count++; - Console.WriteLine("cctor. Type: {0}",typeof(T).ToString()); - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/regressions/vsw307137/vsw307137.cs b/src/coreclr/tests/src/Loader/classloader/regressions/vsw307137/vsw307137.cs deleted file mode 100644 index bdd05d03d9df..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/regressions/vsw307137/vsw307137.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// this is regression test for VSW 307137 - -/* -The bug description has a good summary of the issue (from AtsushiK): - -A summary of the whole sordid affair. - - -In V1 and Everett, sequential classes only affected unmanaged layout and the .size metadata was used to add padding to the -unmanaged layout (IJW used this to implement their unmanaged structures. That's the only reason the .size metadata exists. -Somewhere along the line, C# started using the .size metadata to implemented fixed buffer arrays inside managed structures. -They'd declare just one field of the array element type and use the .size metadata to allocate space for the other elements. -Problem was, the .size metadata was never defined to expand the managed layout. This feature should never have worked. - -So how did it work for them? Plain dumb luck. In the CLR, if your structure consists of just one scalar-type field, the CLR -classifies it internally as a "blittable" structure. That is, it makes the managed layout match the unmanaged layout byte for -byte so that interop can optimize the marshaling of this structure to a bit-copy. Thus, because of this accidental reliance on -this internal optimization by the CLR, fixed buffers "worked" for plain old integer/float/double types. -There was two cases where it wouldn't work: chars and booleans. That's because these datatypes don't translate byte for -byte (different sizes, bools need normalizing.) So the blitting optimization doesn't kick in in those cases. - -Someone found out that the was case for chars and opened VSW:147145. A couple months later, I unwittingly"fixed" this bug -when I implemented the managed sequential layout feature. This feature now causes the .size metadata to expand out the -managed layout too (whether this was a good idea is debatable but it got VSW:147145 off the CLR team's back even though -they didn't understand how it got fixed..) - -Now we have the boolean case. Booleans are also non-blittable (they have to be normalized so they aren't blittable even if you -use a FieldMarshal override to force the native size to 1.) But because both the unmanaged size and managed size impose a -minimum value on the .size metadata, the .size metadata can't go below 4 (sizeof(BOOL) in Win32 native). - -CLR now overrides the .size metadata if it is less than the minimum size needed to hold the fields. - -*/ - -using System; - -unsafe struct S -{ - fixed bool b[3]; -} - -public class Test -{ - public static int Main() - { - try - { - #pragma warning disable 219 - S s = new S(); - #pragma warning restore 219 - - Console.WriteLine("PASS"); - return 100; - } - catch (Exception e) - { - Console.WriteLine("Caught unexpected excpetion: " + e); - return 101; - } - } - -} diff --git a/src/coreclr/tests/src/Loader/classloader/regressions/vsw529206/moduleCctorThrow.il b/src/coreclr/tests/src/Loader/classloader/regressions/vsw529206/moduleCctorThrow.il deleted file mode 100644 index 02341b48baf0..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/regressions/vsw529206/moduleCctorThrow.il +++ /dev/null @@ -1,53 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Console { } -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 2:0:0:0 -} - -.assembly moduleCctorThrow {} - - - .method private hidebysig specialname rtspecialname static - void .cctor() cil managed - { - .maxstack 8 - nop - ldstr "Inside module .cctor" - call void [System.Console]System.Console::WriteLine(string) - - newobj instance void [mscorlib]System.Exception::.ctor() - throw - - ret - } // end of method Foo::.cctor - - - -.class public auto ansi TriggerModuleCctorClass - extends [mscorlib]System.Object -{ - .field public static int32 intStatic - - .method public static void CheckInit() noinlining - { - ret - } - - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - - .maxstack 8 - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret - } // end of method Test1::.ctor - -} - diff --git a/src/coreclr/tests/src/Loader/classloader/regressions/vsw529206/vsw529206ModuleCctor.cs b/src/coreclr/tests/src/Loader/classloader/regressions/vsw529206/vsw529206ModuleCctor.cs deleted file mode 100644 index 9bc966a1da45..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/regressions/vsw529206/vsw529206ModuleCctor.cs +++ /dev/null @@ -1,93 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// regression test for VSWhidbey 529206 for throwing TypeInitialization inside module .cctor -// We were appending every time the callstack and using the same exception object. -// Now we still use the same object, but callstack is cleared every time. - - -using System; -using System.Runtime.CompilerServices; - -class Test -{ - public static bool pass; - - [MethodImpl(MethodImplOptions.NoInlining)] - public static void RunTest() - { - // TRIGGER: static field access, ref type - TriggerModuleCctorClass.intStatic = 5; - } - - - [MethodImpl(MethodImplOptions.NoInlining)] - public static void RunTest2() - { - // TRIGGER: static field access, ref type - TriggerModuleCctorClass.intStatic = 5; - } - - public static int Main() - { - pass = true; - - try - { - RunTest(); - - Console.WriteLine("Did not catch expected TypeInitializationException exception"); - pass = false; - } - catch (TypeInitializationException e) - { - Console.WriteLine("Caught expected exception 1st time\n" + e); - - } - catch (Exception e) - { - Console.WriteLine("Caught unexpected exception 1st time: " + e); - pass = false; - } - - - try - { - RunTest2(); - - Console.WriteLine("Did not catch expected TypeInitializationException exception"); - pass = false; - } - catch (TypeInitializationException e ) - { - Console.WriteLine("Caught expected exception 2nd time\n" + e); - - // if this string is found in the callstack it means we're appending callstack - // instead of having a new one each time. - if (e.StackTrace.IndexOf("at Test.RunTest()") != -1) - { - Console.WriteLine("2nd time: Incorrect stack trace"); - pass = false; - } - - } - catch (Exception e) - { - Console.WriteLine("Caught unexpected exception 2nd time: " + e); - pass = false; - - } - - if (pass) - { - Console.WriteLine("PASS"); - return 100; - } - else - { - Console.WriteLine("FAIL"); - return 101; - } - } -} diff --git a/src/coreclr/tests/src/Loader/classloader/regressions/vsw531159/repro.cs b/src/coreclr/tests/src/Loader/classloader/regressions/vsw531159/repro.cs deleted file mode 100644 index 768bd8bfa0d4..000000000000 --- a/src/coreclr/tests/src/Loader/classloader/regressions/vsw531159/repro.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -public class Gen -{ - public void Meth(T t) where T : struct, U {} -} - -public class Test -{ - public static int Main() - { - try - { - Gen g1 = new Gen(); - g1.Meth(1); - Console.WriteLine("PASS"); - return 100; - } - catch(Exception e) - { - Console.WriteLine("cuaght unexpected exception \n {0}", e); - return 99; - } - } -} - diff --git a/src/coreclr/tests/src/Loader/regressions/GitHub_15544/main.cs b/src/coreclr/tests/src/Loader/regressions/GitHub_15544/main.cs deleted file mode 100644 index 25e7d79e41aa..000000000000 --- a/src/coreclr/tests/src/Loader/regressions/GitHub_15544/main.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.IO; -using System.Reflection; - -public class CMain{ - public static int Main(String[] args) { - string tempFileName = Path.GetTempFileName(); - - bool isThrown = false; - - try - { - AssemblyName.GetAssemblyName(tempFileName); - } - catch (BadImageFormatException) - { - isThrown = true; - } - - File.Delete(tempFileName); - - if (isThrown) { - Console.WriteLine("PASS"); - - return 100; - } else { - Console.WriteLine("FAIL"); - - return 101; - } - } -} diff --git a/src/coreclr/tests/src/Loader/regressions/classloader/main.cs b/src/coreclr/tests/src/Loader/regressions/classloader/main.cs deleted file mode 100644 index dc6c51c346eb..000000000000 --- a/src/coreclr/tests/src/Loader/regressions/classloader/main.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -public class CMain{ - public static int Count = 0; - public static int Main(String[] args){ - String s; - s = Gen.x; - // we expect the Gen.cctor to fire only once! - if(1 == Count){ - Console.WriteLine("PASS"); - return 100; - } - else{ - Console.WriteLine("FAIL"); - return 101; - } - } -} - -public class Gen{ - - public static T x; - static Gen(){ - CMain.Count++; - Console.WriteLine("cctor. Type: {0}",typeof(T).ToString()); - } -} diff --git a/src/coreclr/tests/src/Loader/regressions/classloader/vsw307137.cs b/src/coreclr/tests/src/Loader/regressions/classloader/vsw307137.cs deleted file mode 100644 index c29bb5b7b30c..000000000000 --- a/src/coreclr/tests/src/Loader/regressions/classloader/vsw307137.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - - -/* - -A summary - -In V1 and Everett, sequential classes only affected unmanaged layout and the .size metadata was used to add padding to the -unmanaged layout (IJW used this to implement their unmanaged structures. That's the only reason the .size metadata exists. -Somewhere along the line, C# started using the .size metadata to implemented fixed buffer arrays inside managed structures. -They'd declare just one field of the array element type and use the .size metadata to allocate space for the other elements. -Problem was, the .size metadata was never defined to expand the managed layout. This feature should never have worked. - -So how did it work for them? Plain luck. In the CLR, if your structure consists of just one scalar-type field, the CLR -classifies it internally as a "blittable" structure. That is, it makes the managed layout match the unmanaged layout byte for -byte so that interop can optimize the marshaling of this structure to a bit-copy. Thus, because of this accidental reliance on -this internal optimization by the CLR, fixed buffers "worked" for plain old integer/float/double types. -There was two cases where it wouldn't work: chars and booleans. That's because these datatypes don't translate byte for -byte (different sizes, bools need normalizing.) So the blitting optimization doesn't kick in in those cases. - -Someone found out that the was case for chars and opened VSW:147145. A couple months later, I unwittingly"fixed" this bug -when I implemented the managed sequential layout feature. This feature now causes the .size metadata to expand out the -managed layout too (whether this was a good idea is debatable but it got VSW:147145 off the CLR team's back even though -they didn't understand how it got fixed..) - -Now we have the boolean case. Booleans are also non-blittable (they have to be normalized so they aren't blittable even if you -use a FieldMarshal override to force the native size to 1.) But because both the unmanaged size and managed size impose a -minimum value on the .size metadata, the .size metadata can't go below 4 (sizeof(BOOL) in Win32 native). - -CLR now overrides the .size metadata if it is less than the minimum size needed to hold the fields. - -*/ - -using System; - -unsafe struct S -{ - fixed bool b[3]; -} - -public class Test -{ - public static int Main() - { - try - { - #pragma warning disable 219 - S s = new S(); - #pragma warning restore 219 - - Console.WriteLine("PASS"); - return 100; - } - catch (Exception e) - { - Console.WriteLine("Caught unexpected excpetion: " + e); - return 101; - } - } - -} diff --git a/src/coreclr/tests/src/Regressions/coreclr/0041/body_double.cs b/src/coreclr/tests/src/Regressions/coreclr/0041/body_double.cs deleted file mode 100644 index d2719abf0811..000000000000 --- a/src/coreclr/tests/src/Regressions/coreclr/0041/body_double.cs +++ /dev/null @@ -1,740 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Security; - -[SecuritySafeCritical] -class TestApp { - //***** TEST CODE ***** - static double test_0_0(double num, AA init, AA zero) { - return init.q; - } - static double test_0_1(double num, AA init, AA zero) { - zero.q=num; - return zero.q; - } - static double test_0_2(double num, AA init, AA zero) { - return init.q+zero.q; - } - static double test_0_3(double num, AA init, AA zero) { - return checked(init.q-zero.q); - } - static double test_0_4(double num, AA init, AA zero) { - zero.q+=num; return zero.q; - - } - static double test_0_5(double num, AA init, AA zero) { - zero.q+=init.q; return zero.q; - - } - static double test_0_6(double num, AA init, AA zero) { - if (init.q==num) - return 100; - else - return zero.q; - - } - static double test_0_7(double num, AA init, AA zero) { - return init.qzero.q?1:0)+99; - - } - static double test_0_9(double num, AA init, AA zero) { - object bb=init.q; - return (double)bb; - } - static double test_0_10(double num, AA init, AA zero) { - double dbl=init.q; - return (double)dbl; - } - static double test_0_11(double num, AA init, AA zero) { - return AA.call_target(init.q); - } - static double test_0_12(double num, AA init, AA zero) { - return AA.call_target_ref(ref init.q); - } - static double test_1_0(double num, ref AA r_init, ref AA r_zero) { - return r_init.q; - } - static double test_1_1(double num, ref AA r_init, ref AA r_zero) { - r_zero.q=num; - return r_zero.q; - } - static double test_1_2(double num, ref AA r_init, ref AA r_zero) { - return r_init.q+r_zero.q; - } - static double test_1_3(double num, ref AA r_init, ref AA r_zero) { - return checked(r_init.q-r_zero.q); - } - static double test_1_4(double num, ref AA r_init, ref AA r_zero) { - r_zero.q+=num; return r_zero.q; - - } - static double test_1_5(double num, ref AA r_init, ref AA r_zero) { - r_zero.q+=r_init.q; return r_zero.q; - - } - static double test_1_6(double num, ref AA r_init, ref AA r_zero) { - if (r_init.q==num) - return 100; - else - return r_zero.q; - - } - static double test_1_7(double num, ref AA r_init, ref AA r_zero) { - return r_init.qr_zero.q?1:0)+99; - - } - static double test_1_9(double num, ref AA r_init, ref AA r_zero) { - object bb=r_init.q; - return (double)bb; - } - static double test_1_10(double num, ref AA r_init, ref AA r_zero) { - double dbl=r_init.q; - return (double)dbl; - } - static double test_1_11(double num, ref AA r_init, ref AA r_zero) { - return AA.call_target(r_init.q); - } - static double test_1_12(double num, ref AA r_init, ref AA r_zero) { - return AA.call_target_ref(ref r_init.q); - } - static double test_2_0(double num) { - return AA.a_init[(int)num].q; - } - static double test_2_1(double num) { - AA.a_zero[(int)num].q=num; - return AA.a_zero[(int)num].q; - } - static double test_2_2(double num) { - return AA.a_init[(int)num].q+AA.a_zero[(int)num].q; - } - static double test_2_3(double num) { - return checked(AA.a_init[(int)num].q-AA.a_zero[(int)num].q); - } - static double test_2_4(double num) { - AA.a_zero[(int)num].q+=num; return AA.a_zero[(int)num].q; - - } - static double test_2_5(double num) { - AA.a_zero[(int)num].q+=AA.a_init[(int)num].q; return AA.a_zero[(int)num].q; - - } - static double test_2_6(double num) { - if (AA.a_init[(int)num].q==num) - return 100; - else - return AA.a_zero[(int)num].q; - - } - static double test_2_7(double num) { - return AA.a_init[(int)num].qAA.a_zero[(int)num].q?1:0)+99; - - } - static double test_2_9(double num) { - object bb=AA.a_init[(int)num].q; - return (double)bb; - } - static double test_2_10(double num) { - double dbl=AA.a_init[(int)num].q; - return (double)dbl; - } - static double test_2_11(double num) { - return AA.call_target(AA.a_init[(int)num].q); - } - static double test_2_12(double num) { - return AA.call_target_ref(ref AA.a_init[(int)num].q); - } - static double test_3_0(double num) { - return AA.aa_init[0,(int)num-1,(int)num/100].q; - } - static double test_3_1(double num) { - AA.aa_zero[0,(int)num-1,(int)num/100].q=num; - return AA.aa_zero[0,(int)num-1,(int)num/100].q; - } - static double test_3_2(double num) { - return AA.aa_init[0,(int)num-1,(int)num/100].q+AA.aa_zero[0,(int)num-1,(int)num/100].q; - } - static double test_3_3(double num) { - return checked(AA.aa_init[0,(int)num-1,(int)num/100].q-AA.aa_zero[0,(int)num-1,(int)num/100].q); - } - static double test_3_4(double num) { - AA.aa_zero[0,(int)num-1,(int)num/100].q+=num; return AA.aa_zero[0,(int)num-1,(int)num/100].q; - - } - static double test_3_5(double num) { - AA.aa_zero[0,(int)num-1,(int)num/100].q+=AA.aa_init[0,(int)num-1,(int)num/100].q; return AA.aa_zero[0,(int)num-1,(int)num/100].q; - - } - static double test_3_6(double num) { - if (AA.aa_init[0,(int)num-1,(int)num/100].q==num) - return 100; - else - return AA.aa_zero[0,(int)num-1,(int)num/100].q; - - } - static double test_3_7(double num) { - return AA.aa_init[0,(int)num-1,(int)num/100].qAA.aa_zero[0,(int)num-1,(int)num/100].q?1:0)+99; - - } - static double test_3_9(double num) { - object bb=AA.aa_init[0,(int)num-1,(int)num/100].q; - return (double)bb; - } - static double test_3_10(double num) { - double dbl=AA.aa_init[0,(int)num-1,(int)num/100].q; - return (double)dbl; - } - static double test_3_11(double num) { - return AA.call_target(AA.aa_init[0,(int)num-1,(int)num/100].q); - } - static double test_3_12(double num) { - return AA.call_target_ref(ref AA.aa_init[0,(int)num-1,(int)num/100].q); - } - static double test_4_0(double num) { - return BB.f_init.q; - } - static double test_4_1(double num) { - BB.f_zero.q=num; - return BB.f_zero.q; - } - static double test_4_2(double num) { - return BB.f_init.q+BB.f_zero.q; - } - static double test_4_3(double num) { - return checked(BB.f_init.q-BB.f_zero.q); - } - static double test_4_4(double num) { - BB.f_zero.q+=num; return BB.f_zero.q; - - } - static double test_4_5(double num) { - BB.f_zero.q+=BB.f_init.q; return BB.f_zero.q; - - } - static double test_4_6(double num) { - if (BB.f_init.q==num) - return 100; - else - return BB.f_zero.q; - - } - static double test_4_7(double num) { - return BB.f_init.qBB.f_zero.q?1:0)+99; - - } - static double test_4_9(double num) { - object bb=BB.f_init.q; - return (double)bb; - } - static double test_4_10(double num) { - double dbl=BB.f_init.q; - return (double)dbl; - } - static double test_4_11(double num) { - return AA.call_target(BB.f_init.q); - } - static double test_4_12(double num) { - return AA.call_target_ref(ref BB.f_init.q); - } - static double test_5_0(double num) { - return ((AA)AA.b_init).q; - } - static unsafe double test_7_0(double num, void *ptr_init, void *ptr_zero) { - return (*((AA*)ptr_init)).q; - } - static unsafe double test_7_1(double num, void *ptr_init, void *ptr_zero) { - (*((AA*)ptr_zero)).q=num; - return (*((AA*)ptr_zero)).q; - } - static unsafe double test_7_2(double num, void *ptr_init, void *ptr_zero) { - return (*((AA*)ptr_init)).q+(*((AA*)ptr_zero)).q; - } - static unsafe double test_7_3(double num, void *ptr_init, void *ptr_zero) { - return checked((*((AA*)ptr_init)).q-(*((AA*)ptr_zero)).q); - } - static unsafe double test_7_4(double num, void *ptr_init, void *ptr_zero) { - (*((AA*)ptr_zero)).q+=num; return (*((AA*)ptr_zero)).q; - - } - static unsafe double test_7_5(double num, void *ptr_init, void *ptr_zero) { - (*((AA*)ptr_zero)).q+=(*((AA*)ptr_init)).q; return (*((AA*)ptr_zero)).q; - - } - static unsafe double test_7_6(double num, void *ptr_init, void *ptr_zero) { - if ((*((AA*)ptr_init)).q==num) - return 100; - else - return (*((AA*)ptr_zero)).q; - - } - static unsafe double test_7_7(double num, void *ptr_init, void *ptr_zero) { - return (*((AA*)ptr_init)).q(*((AA*)ptr_zero)).q?1:0)+99; - - } - static unsafe double test_7_9(double num, void *ptr_init, void *ptr_zero) { - object bb=(*((AA*)ptr_init)).q; - return (double)bb; - } - static unsafe double test_7_10(double num, void *ptr_init, void *ptr_zero) { - double dbl=(*((AA*)ptr_init)).q; - return (double)dbl; - } - static unsafe double test_7_11(double num, void *ptr_init, void *ptr_zero) { - return AA.call_target((*((AA*)ptr_init)).q); - } - static unsafe double test_7_12(double num, void *ptr_init, void *ptr_zero) { - return AA.call_target_ref(ref (*((AA*)ptr_init)).q); - } - - //***** MAIN CODE ***** - static unsafe int Main() { - AA.reset(); - if (test_0_0(100, new AA(100), new AA(0)) != 100) { - Console.WriteLine("test_0_0() failed."); - return 101; - } - AA.verify_all(); AA.reset(); - if (test_0_1(100, new AA(100), new AA(0)) != 100) { - Console.WriteLine("test_0_1() failed."); - return 102; - } - AA.verify_all(); AA.reset(); - if (test_0_2(100, new AA(100), new AA(0)) != 100) { - Console.WriteLine("test_0_2() failed."); - return 103; - } - AA.verify_all(); AA.reset(); - if (test_0_3(100, new AA(100), new AA(0)) != 100) { - Console.WriteLine("test_0_3() failed."); - return 104; - } - AA.verify_all(); AA.reset(); - if (test_0_4(100, new AA(100), new AA(0)) != 100) { - Console.WriteLine("test_0_4() failed."); - return 105; - } - AA.verify_all(); AA.reset(); - if (test_0_5(100, new AA(100), new AA(0)) != 100) { - Console.WriteLine("test_0_5() failed."); - return 106; - } - AA.verify_all(); AA.reset(); - if (test_0_6(100, new AA(100), new AA(0)) != 100) { - Console.WriteLine("test_0_6() failed."); - return 107; - } - AA.verify_all(); AA.reset(); - if (test_0_7(100, new AA(100), new AA(0)) != 100) { - Console.WriteLine("test_0_7() failed."); - return 108; - } - AA.verify_all(); AA.reset(); - if (test_0_8(100, new AA(100), new AA(0)) != 100) { - Console.WriteLine("test_0_8() failed."); - return 109; - } - AA.verify_all(); AA.reset(); - if (test_0_9(100, new AA(100), new AA(0)) != 100) { - Console.WriteLine("test_0_9() failed."); - return 110; - } - AA.verify_all(); AA.reset(); - if (test_0_10(100, new AA(100), new AA(0)) != 100) { - Console.WriteLine("test_0_10() failed."); - return 111; - } - AA.verify_all(); AA.reset(); - if (test_0_11(100, new AA(100), new AA(0)) != 100) { - Console.WriteLine("test_0_11() failed."); - return 112; - } - AA.verify_all(); AA.reset(); - if (test_0_12(100, new AA(100), new AA(0)) != 100) { - Console.WriteLine("test_0_12() failed."); - return 113; - } - AA.verify_all(); AA.reset(); - if (test_1_0(100, ref AA._init, ref AA._zero) != 100) { - Console.WriteLine("test_1_0() failed."); - return 114; - } - AA.verify_all(); AA.reset(); - if (test_1_1(100, ref AA._init, ref AA._zero) != 100) { - Console.WriteLine("test_1_1() failed."); - return 115; - } - AA.verify_all(); AA.reset(); - if (test_1_2(100, ref AA._init, ref AA._zero) != 100) { - Console.WriteLine("test_1_2() failed."); - return 116; - } - AA.verify_all(); AA.reset(); - if (test_1_3(100, ref AA._init, ref AA._zero) != 100) { - Console.WriteLine("test_1_3() failed."); - return 117; - } - AA.verify_all(); AA.reset(); - if (test_1_4(100, ref AA._init, ref AA._zero) != 100) { - Console.WriteLine("test_1_4() failed."); - return 118; - } - AA.verify_all(); AA.reset(); - if (test_1_5(100, ref AA._init, ref AA._zero) != 100) { - Console.WriteLine("test_1_5() failed."); - return 119; - } - AA.verify_all(); AA.reset(); - if (test_1_6(100, ref AA._init, ref AA._zero) != 100) { - Console.WriteLine("test_1_6() failed."); - return 120; - } - AA.verify_all(); AA.reset(); - if (test_1_7(100, ref AA._init, ref AA._zero) != 100) { - Console.WriteLine("test_1_7() failed."); - return 121; - } - AA.verify_all(); AA.reset(); - if (test_1_8(100, ref AA._init, ref AA._zero) != 100) { - Console.WriteLine("test_1_8() failed."); - return 122; - } - AA.verify_all(); AA.reset(); - if (test_1_9(100, ref AA._init, ref AA._zero) != 100) { - Console.WriteLine("test_1_9() failed."); - return 123; - } - AA.verify_all(); AA.reset(); - if (test_1_10(100, ref AA._init, ref AA._zero) != 100) { - Console.WriteLine("test_1_10() failed."); - return 124; - } - AA.verify_all(); AA.reset(); - if (test_1_11(100, ref AA._init, ref AA._zero) != 100) { - Console.WriteLine("test_1_11() failed."); - return 125; - } - AA.verify_all(); AA.reset(); - if (test_1_12(100, ref AA._init, ref AA._zero) != 100) { - Console.WriteLine("test_1_12() failed."); - return 126; - } - AA.verify_all(); AA.reset(); - if (test_2_0(100) != 100) { - Console.WriteLine("test_2_0() failed."); - return 127; - } - AA.verify_all(); AA.reset(); - if (test_2_1(100) != 100) { - Console.WriteLine("test_2_1() failed."); - return 128; - } - AA.verify_all(); AA.reset(); - if (test_2_2(100) != 100) { - Console.WriteLine("test_2_2() failed."); - return 129; - } - AA.verify_all(); AA.reset(); - if (test_2_3(100) != 100) { - Console.WriteLine("test_2_3() failed."); - return 130; - } - AA.verify_all(); AA.reset(); - if (test_2_4(100) != 100) { - Console.WriteLine("test_2_4() failed."); - return 131; - } - AA.verify_all(); AA.reset(); - if (test_2_5(100) != 100) { - Console.WriteLine("test_2_5() failed."); - return 132; - } - AA.verify_all(); AA.reset(); - if (test_2_6(100) != 100) { - Console.WriteLine("test_2_6() failed."); - return 133; - } - AA.verify_all(); AA.reset(); - if (test_2_7(100) != 100) { - Console.WriteLine("test_2_7() failed."); - return 134; - } - AA.verify_all(); AA.reset(); - if (test_2_8(100) != 100) { - Console.WriteLine("test_2_8() failed."); - return 135; - } - AA.verify_all(); AA.reset(); - if (test_2_9(100) != 100) { - Console.WriteLine("test_2_9() failed."); - return 136; - } - AA.verify_all(); AA.reset(); - if (test_2_10(100) != 100) { - Console.WriteLine("test_2_10() failed."); - return 137; - } - AA.verify_all(); AA.reset(); - if (test_2_11(100) != 100) { - Console.WriteLine("test_2_11() failed."); - return 138; - } - AA.verify_all(); AA.reset(); - if (test_2_12(100) != 100) { - Console.WriteLine("test_2_12() failed."); - return 139; - } - AA.verify_all(); AA.reset(); - if (test_3_0(100) != 100) { - Console.WriteLine("test_3_0() failed."); - return 140; - } - AA.verify_all(); AA.reset(); - if (test_3_1(100) != 100) { - Console.WriteLine("test_3_1() failed."); - return 141; - } - AA.verify_all(); AA.reset(); - if (test_3_2(100) != 100) { - Console.WriteLine("test_3_2() failed."); - return 142; - } - AA.verify_all(); AA.reset(); - if (test_3_3(100) != 100) { - Console.WriteLine("test_3_3() failed."); - return 143; - } - AA.verify_all(); AA.reset(); - if (test_3_4(100) != 100) { - Console.WriteLine("test_3_4() failed."); - return 144; - } - AA.verify_all(); AA.reset(); - if (test_3_5(100) != 100) { - Console.WriteLine("test_3_5() failed."); - return 145; - } - AA.verify_all(); AA.reset(); - if (test_3_6(100) != 100) { - Console.WriteLine("test_3_6() failed."); - return 146; - } - AA.verify_all(); AA.reset(); - if (test_3_7(100) != 100) { - Console.WriteLine("test_3_7() failed."); - return 147; - } - AA.verify_all(); AA.reset(); - if (test_3_8(100) != 100) { - Console.WriteLine("test_3_8() failed."); - return 148; - } - AA.verify_all(); AA.reset(); - if (test_3_9(100) != 100) { - Console.WriteLine("test_3_9() failed."); - return 149; - } - AA.verify_all(); AA.reset(); - if (test_3_10(100) != 100) { - Console.WriteLine("test_3_10() failed."); - return 150; - } - AA.verify_all(); AA.reset(); - if (test_3_11(100) != 100) { - Console.WriteLine("test_3_11() failed."); - return 151; - } - AA.verify_all(); AA.reset(); - if (test_3_12(100) != 100) { - Console.WriteLine("test_3_12() failed."); - return 152; - } - AA.verify_all(); AA.reset(); - if (test_4_0(100) != 100) { - Console.WriteLine("test_4_0() failed."); - return 153; - } - AA.verify_all(); AA.reset(); - if (test_4_1(100) != 100) { - Console.WriteLine("test_4_1() failed."); - return 154; - } - AA.verify_all(); AA.reset(); - if (test_4_2(100) != 100) { - Console.WriteLine("test_4_2() failed."); - return 155; - } - AA.verify_all(); AA.reset(); - if (test_4_3(100) != 100) { - Console.WriteLine("test_4_3() failed."); - return 156; - } - AA.verify_all(); AA.reset(); - if (test_4_4(100) != 100) { - Console.WriteLine("test_4_4() failed."); - return 157; - } - AA.verify_all(); AA.reset(); - if (test_4_5(100) != 100) { - Console.WriteLine("test_4_5() failed."); - return 158; - } - AA.verify_all(); AA.reset(); - if (test_4_6(100) != 100) { - Console.WriteLine("test_4_6() failed."); - return 159; - } - AA.verify_all(); AA.reset(); - if (test_4_7(100) != 100) { - Console.WriteLine("test_4_7() failed."); - return 160; - } - AA.verify_all(); AA.reset(); - if (test_4_8(100) != 100) { - Console.WriteLine("test_4_8() failed."); - return 161; - } - AA.verify_all(); AA.reset(); - if (test_4_9(100) != 100) { - Console.WriteLine("test_4_9() failed."); - return 162; - } - AA.verify_all(); AA.reset(); - if (test_4_10(100) != 100) { - Console.WriteLine("test_4_10() failed."); - return 163; - } - AA.verify_all(); AA.reset(); - if (test_4_11(100) != 100) { - Console.WriteLine("test_4_11() failed."); - return 164; - } - AA.verify_all(); AA.reset(); - if (test_4_12(100) != 100) { - Console.WriteLine("test_4_12() failed."); - return 165; - } - AA.verify_all(); AA.reset(); - if (test_5_0(100) != 100) { - Console.WriteLine("test_5_0() failed."); - return 166; - } - AA.verify_all(); AA.reset(); - fixed (void *p_init = &AA._init, p_zero = &AA._zero) { - if (test_7_0(100, p_init, p_zero) != 100) { - Console.WriteLine("test_7_0() failed."); - return 168; - } - } - AA.verify_all(); AA.reset(); - fixed (void *p_init = &AA._init, p_zero = &AA._zero) { - if (test_7_1(100, p_init, p_zero) != 100) { - Console.WriteLine("test_7_1() failed."); - return 169; - } - } - AA.verify_all(); AA.reset(); - fixed (void *p_init = &AA._init, p_zero = &AA._zero) { - if (test_7_2(100, p_init, p_zero) != 100) { - Console.WriteLine("test_7_2() failed."); - return 170; - } - } - AA.verify_all(); AA.reset(); - fixed (void *p_init = &AA._init, p_zero = &AA._zero) { - if (test_7_3(100, p_init, p_zero) != 100) { - Console.WriteLine("test_7_3() failed."); - return 171; - } - } - AA.verify_all(); AA.reset(); - fixed (void *p_init = &AA._init, p_zero = &AA._zero) { - if (test_7_4(100, p_init, p_zero) != 100) { - Console.WriteLine("test_7_4() failed."); - return 172; - } - } - AA.verify_all(); AA.reset(); - fixed (void *p_init = &AA._init, p_zero = &AA._zero) { - if (test_7_5(100, p_init, p_zero) != 100) { - Console.WriteLine("test_7_5() failed."); - return 173; - } - } - AA.verify_all(); AA.reset(); - fixed (void *p_init = &AA._init, p_zero = &AA._zero) { - if (test_7_6(100, p_init, p_zero) != 100) { - Console.WriteLine("test_7_6() failed."); - return 174; - } - } - AA.verify_all(); AA.reset(); - fixed (void *p_init = &AA._init, p_zero = &AA._zero) { - if (test_7_7(100, p_init, p_zero) != 100) { - Console.WriteLine("test_7_7() failed."); - return 175; - } - } - AA.verify_all(); AA.reset(); - fixed (void *p_init = &AA._init, p_zero = &AA._zero) { - if (test_7_8(100, p_init, p_zero) != 100) { - Console.WriteLine("test_7_8() failed."); - return 176; - } - } - AA.verify_all(); AA.reset(); - fixed (void *p_init = &AA._init, p_zero = &AA._zero) { - if (test_7_9(100, p_init, p_zero) != 100) { - Console.WriteLine("test_7_9() failed."); - return 177; - } - } - AA.verify_all(); AA.reset(); - fixed (void *p_init = &AA._init, p_zero = &AA._zero) { - if (test_7_10(100, p_init, p_zero) != 100) { - Console.WriteLine("test_7_10() failed."); - return 178; - } - } - AA.verify_all(); AA.reset(); - fixed (void *p_init = &AA._init, p_zero = &AA._zero) { - if (test_7_11(100, p_init, p_zero) != 100) { - Console.WriteLine("test_7_11() failed."); - return 179; - } - } - AA.verify_all(); AA.reset(); - fixed (void *p_init = &AA._init, p_zero = &AA._zero) { - if (test_7_12(100, p_init, p_zero) != 100) { - Console.WriteLine("test_7_12() failed."); - return 180; - } - } - AA.verify_all(); Console.WriteLine("All tests passed."); - return 100; - } -} diff --git a/src/coreclr/tests/src/Regressions/coreclr/0041/expl_double_1.cs b/src/coreclr/tests/src/Regressions/coreclr/0041/expl_double_1.cs deleted file mode 100644 index 056e3d925306..000000000000 --- a/src/coreclr/tests/src/Regressions/coreclr/0041/expl_double_1.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Runtime.InteropServices; - -[StructLayout(LayoutKind.Explicit)] struct AA { - [FieldOffset(4)] public byte tmp1; - - //this field is the testing subject - [FieldOffset(8)] - public double q; - - [FieldOffset(50)] public short tmp2; - - public AA(double qq) { - tmp1 = 0; - tmp2 = 0; - q = qq; - } - - public static AA[] a_init = new AA[101]; - public static AA[] a_zero = new AA[101]; - public static AA[,,] aa_init = new AA[1,101,2]; - public static AA[,,] aa_zero = new AA[1,101,2]; - public static object b_init = new AA(100); - public static AA _init, _zero; - - public static double call_target(double arg) { return arg; } - public static double call_target_ref(ref double arg) { return arg; } - - public void verify() { - } - - public static void verify_all() { - a_init[100].verify(); - a_zero[100].verify(); - aa_init[0,99,1].verify(); - aa_zero[0,99,1].verify(); - _init.verify(); - _zero.verify(); - BB.f_init.verify(); - BB.f_zero.verify(); - } - - public static void reset() { - a_init[100] = new AA(100); - a_zero[100] = new AA(0); - aa_init[0,99,1] = new AA(100); - aa_zero[0,99,1] = new AA(0); - _init = new AA(100); - _zero = new AA(0); - BB.f_init = new AA(100); - BB.f_zero = new AA(0); - } -} - -struct BB { - public static AA f_init, f_zero; -} diff --git a/src/coreclr/tests/src/Regressions/coreclr/0075/largearraytest.cs b/src/coreclr/tests/src/Regressions/coreclr/0075/largearraytest.cs deleted file mode 100644 index d907edd36575..000000000000 --- a/src/coreclr/tests/src/Regressions/coreclr/0075/largearraytest.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -/* NAME: LargeArrayTest - * SDET: clyon - * DATE: 2004-03-02 - * DESCRIPTION: creates arrays of size Int32.MaxValue through Int32.MaxValue-100 inclusive - * PURPOSE: regression test for VSWhidbey 244717 - */ - -using System; - -public class LargeArrayTest -{ - - public static int Main(string[] args) - { - int lowerBound = 100; - - if (!TestLibrary.Utilities.IsWindows) lowerBound = 35; - - TestLibrary.TestFramework.BeginTestCase("Large array test"); - - TestLibrary.TestFramework.BeginScenario("Allocate arrays of values Int32.MaxValue to Int32.MaxValue-" + lowerBound); - - for (int i=0; i<= lowerBound; i++) - { - try - { - TestLibrary.Logging.Write("now try Int32.MaxValue-"+i+": "); - Array a = Array.CreateInstance((new byte().GetType()), Int32.MaxValue-i); - TestLibrary.Logging.WriteLine("" + a.GetLength(0)); - a = null; // need to null a, or we hit VSWhidbey 135712 - } - catch (OutOfMemoryException e) - { - TestLibrary.TestFramework.LogInformation(""); - TestLibrary.TestFramework.LogInformation("" + e.Message); - } - catch (Exception e) - { - TestLibrary.TestFramework.LogError("000", ""); - TestLibrary.TestFramework.LogError("000", "Unexpected Exception!"); - TestLibrary.TestFramework.LogError("000", "" + e); - - TestLibrary.TestFramework.EndTestCase(); - - TestLibrary.TestFramework.LogError("000", "Test Failed!"); - return 0; - } - } - - TestLibrary.TestFramework.EndTestCase(); - TestLibrary.TestFramework.LogInformation("Test Passed!"); - return 100; - } - -} diff --git a/src/coreclr/tests/src/Regressions/coreclr/0080/delete_next_card_table.cs b/src/coreclr/tests/src/Regressions/coreclr/0080/delete_next_card_table.cs deleted file mode 100644 index 0ac3a5e20842..000000000000 --- a/src/coreclr/tests/src/Regressions/coreclr/0080/delete_next_card_table.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -/* TEST: delete_next_card_table - * SDET: clyon - * DESCRIPTION: gains 14 blocks in gc.cpp - mscorwks!WKS::delete_next_card_table: (7 blocks, 11 arcs) - mscorwks!SVR::delete_next_card_table: (7 blocks, 11 arcs) - */ - -using System; -using System.Collections; -using System.Collections.Generic; - -public class delete_next_card_table -{ - public static int Main() - { - new delete_next_card_table().DoMemoryChurn(); - return 100; - } - - // this function attempts to allocate & free large amounts - // of memory to ensure our objects remain pinned, don't get - // relocated, etc... - void DoMemoryChurn() - { - - Random r = new Random(); - for (int j=0; j<10; j++) - { - Console.Write("Churn loop {0}", j); - - try - { - // arraylist keeps everything rooted until we run out of memory - List al = new List(); - int len = 1; - - for (int i = 0; i < 32; i++) // todo: this should be based upon size of IntPtr (32 bits on 32 bit platforms, 64 on 64 bit platforms) - { - Console.Write("."); - - if (i < 30) - { - // Random.Next cannot handle negative (0x80000000) numbers - len *= 2; - } - al.Add(new Guid[len + r.Next(len)]); - } - } - catch (OutOfMemoryException) - { - Console.WriteLine("OOM while Churning"); - GC.Collect(); - } - - Console.WriteLine(); - } - } -} - diff --git a/src/coreclr/tests/src/Regressions/coreclr/0211/genrecur.cs b/src/coreclr/tests/src/Regressions/coreclr/0211/genrecur.cs deleted file mode 100644 index b8d04d2a8e07..000000000000 --- a/src/coreclr/tests/src/Regressions/coreclr/0211/genrecur.cs +++ /dev/null @@ -1,975 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; - -// Some generally-useful stuff -public class List { } - -public class Utils { - public static int failures = 0; - public static void Check(Type expected, Type actual) { - if (expected != actual) { - failures++; - Console.WriteLine("Expected " + expected + " but got " + actual); - } - } -} - -// Recursion through an instantiated superclass for a non-generic class -class Test1 { - class C - { - public virtual void m(Type expected) - { - Utils.Check(expected, typeof(T)); - } - } - - class D : C - { - } - - public static void Test() - { - D d = new D(); - C cd = new C(); - cd.m(typeof(D)); - d.m(typeof(D)); - } -} - -// Recursion through an instantiated interface for a non-generic class -class Test2 -{ - interface I - { - void m(T x); - } - - class D : I - { - public void m(D x) - { - object obj = this; - if (!(obj is I)) { - Utils.failures++; - Console.WriteLine("Test2.Test failed"); - } - } - } - - public static void Test() - { - D d = new D(); - I id = d; - id.m(d); - } -} - -// Mutual recursion through an instantiated superclass for a non-generic class -class Test3 -{ - class C - { - public void mymeth(Type expected) - { - Utils.Check(expected, typeof(T)); - } - } - - class D : C - { - } - - class E : C - { - } - - public static void Test() - { - D d = new D(); - E e = new E(); - C cd = new C(); - C ce = new C(); - d.mymeth(typeof(E)); - e.mymeth(typeof(D)); - cd.mymeth(typeof(D)); - ce.mymeth(typeof(E)); - } -} - -// Recursion through an instantiated superclass for a generic class -class Test4 -{ - class C - { - public virtual void m(Type expected) - { - Utils.Check(expected, typeof(T)); - } - } - - class D : C > - { - } - - public static void Test() - { - D di = new D(); - D ds = new D(); - D d = new D(); - di.m(typeof(D)); - ds.m(typeof(D)); - d.m(typeof(D)); - } -} - -// Mutual recursion through an instantiated superclass for a generic class -class Test5 -{ - class C - { - public virtual void m(Type expected) - { - Utils.Check(expected, typeof(T)); - } - } - - class D : C< E > - { - } - - class E : C< D > - { - } - - public static void Test() - { - D di = new D(); - D ds = new D(); - D d = new D(); - E ei = new E(); - E es = new E(); - E e = new E(); - di.m(typeof(E)); - ds.m(typeof(E)); - d.m(typeof(E)); - ei.m(typeof(D)); - es.m(typeof(D)); - e.m(typeof(D)); - } -} - -// Recursion through an instantiated interface for a generic class -class Test6 -{ - interface I - { - void m(T x); - } - - class D : I< D > - { - public void m(D x) - { - object obj = this; - if (!(obj is I< D >)) { - Utils.failures++; - Console.WriteLine("Test6 failed"); - } - } - } - - public static void Test() - { - D di = new D(); - D ds = new D(); - D d = new D(); - I< D > idi = di; - I< D > ids = ds; - I< D > id = d; - idi.m(di); - ids.m(ds); - id.m(d); - } -} - -// Use of instantiated generic structs inside other structures -// In particular, recursive reference to defining class in a struct field -class Test7 -{ - struct Pair - { - public A fst; - public B snd; - public Pair(A a, B b) { fst = a; snd = b; } - } - - struct Triple - { - public A fst; - public Pair snd; - public Triple(A a, B b, C c) { fst = a; snd = new Pair(b,c); } - } - - class P - { - public Triple fld; - public P(int x, P y, long z) { fld = new Triple(x, y, z); } - } - - public static void Test() - { - P p = new P(5, null, 12345678987654321); - p.fld.snd.fst = p; - if (p.fld.snd.snd != 12345678987654321) { - Console.WriteLine("Test7 failed"); - Utils.failures++; - } - } -} - -// Polymorphic recursion through classes and fields -class Test8 -{ - class Recursive2 - { - public Recursive2 f1; - public Recursive2(Recursive2 a1) { f1 = a1; } - } - - class Mixed2 - { - public Mixed2 f1; - public Mixed2 f2; - public Mixed2 f3; - public Mixed2(Mixed2 a1, Mixed2 a2, Mixed2 a3) { f1 = a1; f2 = a2; f3=a3; } - } - - class NonRecursive2 - { - public NonRecursive2 f2; - public NonRecursive2(NonRecursive2 a2) { f2 = a2; } - } - - class Expansive2 - { - public Expansive2, B > f1; - public Expansive2(Expansive2, B> a1) { f1 = a1; } - } - - public static void Test() - { - object x1 = new Recursive2(null); - object x2 = new Mixed2(null, null, null); - object x3 = new NonRecursive2(null); - object x4 = new Expansive2(null); - - object y1 = new Recursive2(null); - object y2 = new Mixed2(null, null, null); - object y3 = new NonRecursive2(null); - object y4 = new Expansive2(null); - } -} - -// Mutual polymorphic recursion through classes, structs and fields, where structs have two fields -class Test9 -{ - #pragma warning disable 649 - class RecursiveClass2 - { - public RecursiveStruct2 f2; //TODO: Assign to default value after compile supports T.default - public RecursiveClass2() { } - } - - struct RecursiveStruct2 - { - public RecursiveClass2 f1; //TODO: Assign to default value after compile supports T.default - public RecursiveClass2 f2; //TODO: Assign to default value after compile supports T.default - public RecursiveStruct2(int x) { f1 = null; f2 = null; } - } - - class NonRecursiveClass2 - { - public NonRecursiveStruct2 f2; - public NonRecursiveClass2() { } - } - - struct NonRecursiveStruct2 - { - public NonRecursiveClass2 f1; - public NonRecursiveClass2 f2; - public NonRecursiveStruct2(int x) { f1 = null; f2 = null; } - } - - class ExpansiveClass2 - { - public ExpansiveStruct2 > f2; //TODO: Assign to default value after compile supports T.default - public ExpansiveClass2() { } - } - - struct ExpansiveStruct2 - { - public ExpansiveClass2 > f1; //TODO: Assign to default value after compile supports T.default - public ExpansiveClass2 > f2; //TODO: Assign to default value after compile supports T.default - public ExpansiveStruct2(int x) { f1 = null; f2 = null; } - } - #pragma warning restore 649 - - public static void Test() - { - object x1 = new RecursiveClass2(); - object x2 = new RecursiveStruct2(3); - object x3 = new NonRecursiveClass2(); - object x4 = new NonRecursiveStruct2(3); - object x5 = new ExpansiveClass2(); - object x6 = new ExpansiveStruct2(3); - - object y1 = new RecursiveClass2(); - object y2 = new RecursiveStruct2(3); - object y3 = new NonRecursiveClass2(); - object y4 = new NonRecursiveStruct2(3); - object y5 = new ExpansiveClass2(); - object y6 = new ExpansiveStruct2(3); - - } -} - -// Mutual polymorphic recursion through classes, structs and fields, where structs have one field (these are optimized) -class Test10 -{ - #pragma warning disable 649 - class RecursiveClass1 - { - public RecursiveStruct1 f1; - public RecursiveClass1() { } - } - - struct RecursiveStruct1 - { - public RecursiveClass1 f1; - public RecursiveStruct1(int x) { f1 = null; } - } - - class NonRecursiveClass1 - { - public NonRecursiveStruct1 f1; - public NonRecursiveClass1() { } - } - - struct NonRecursiveStruct1 - { - public NonRecursiveClass1 f1; - public NonRecursiveStruct1(int x) { f1 = null; } - } - - class ExpansiveClass1 - { - public ExpansiveStruct1 > f1; - public ExpansiveClass1() { } - } - - struct ExpansiveStruct1 - { - public ExpansiveClass1 > f1; - public ExpansiveStruct1(int x) { f1 = null; } - } - #pragma warning restore 649 - public static void Test() - { - object x1 = new RecursiveClass1(); - object x2 = new RecursiveStruct1(3); - object x3 = new NonRecursiveClass1(); - object x4 = new NonRecursiveStruct1(3); - object x5 = new ExpansiveClass1(); - object x6 = new ExpansiveStruct1(3); - - object y1 = new RecursiveClass1(); - object y2 = new RecursiveStruct1(3); - object y3 = new NonRecursiveClass1(); - object y4 = new NonRecursiveStruct1(3); - object y5 = new ExpansiveClass1(); - object y6 = new ExpansiveStruct1(3); - - } -} - - -// Recursion through base class instantiation at derived class -class Test11 { - class G - { - public virtual void m(Type expected) - { - Utils.Check(expected, typeof(T)); - } - } - - class C : G{} - - class D : C {} - - public static void Test() - { - D d = new D(); - C c = new C(); - G gd = new G(); - gd.m(typeof(D)); - d.m(typeof(D)); - } -} - - -// Recursion through base class instantiation at derived class (more complex) -class Test12 { - class G - { - public virtual void m(Type expected) - { - Utils.Check(expected, typeof(T)); - } - } - - class C : G{} - - class D : C {} - - class E : D{} - - public static void Test() - { - E> egd = new E>(); - D d = new D(); - C c = new C(); - G gd = new G(); - gd.m(typeof(D)); - d.m(typeof(D)); - egd.m(typeof(D)); - } -} - - -// Recursion through base class instantiation at derived class (more complex) -class Test13 { - class G - { - public virtual void m(Type expected) - { - Utils.Check(expected, typeof(T)); - } - } - - class C : G>{} - - class D : C {} - - class E : D{} - - public static void Test() - { - E e = new E(); - D d = new D(); - C c = new C(); - G> gd = new G>(); - gd.m(typeof(D)); - d.m(typeof(D)); - e.m(typeof(D)); - } -} - - -// Mutual recursion for classes through interface instantiation -class Test14 -{ - interface I - { - void m(T x); - } - - class C : I - { - public void m(D x) - { - object obj = this; - if (!(obj is I< D >)) { - Utils.failures++; - Console.WriteLine("Test14 failed"); - } - } - } - - class D : I - { - public void m(C x) - { - object obj = this; - if (!(obj is I< C >)) { - Utils.failures++; - Console.WriteLine("Test14 failed"); - } - } - } - - - public static void Test() - { - D d = new D(); - C c = new C(); - - I< C > id = d; - I< D > ic = c; - - id.m(c); - ic.m(d); - } -} - - -// Mutual recursion through interface instantiation for generic classes -class Test15 -{ - interface I - { - void m(T x); - } - - class C : I> - { - public void m(D x) - { - object obj = this; - if (!(obj is I< D >)) { - Utils.failures++; - Console.WriteLine("Test15 failed"); - } - } - } - - class D : I> - { - public void m(C x) - { - object obj = this; - if (!(obj is I< C >)) { - Utils.failures++; - Console.WriteLine("Test15 failed"); - } - } - } - - public static void Test() - { - D di = new D(); - D ds = new D(); - D d = new D(); - - C ci = new C(); - C cs = new C(); - C c = new C(); - - - I< D > idi = ci; - I< D > ids = cs; - I< D > id = c; - - idi.m(di); - ids.m(ds); - id.m(d); - - I< C > ici = di; - I< C > ics = ds; - I< C > ic = d; - - ici.m(ci); - ics.m(cs); - ic.m(c); - - - } -} - - - -// Interface instantiation is a derived class -class Test16 -{ - interface I - { - void m(T x); - } - - class C : I - { - public void m(D x) - { - object obj = this; - if (!(obj is I< D >)) { - Utils.failures++; - Console.WriteLine("Test16 failed"); - } - } - } - - class D : C - { - } - - public static void Test() - { - D d = new D(); - C c = new C(); - - I id = c; - id.m(d); - } -} - - - // Interface instantiation is a derived generic class -class Test17 -{ - interface I - { - void m(T x); - } - - class C : I> - { - public void m(D x) - { - object obj = this; - if (!(obj is I< D >)) { - Utils.failures++; - Console.WriteLine("Test17 failed"); - } - } - } - - class D : C - { - } - - public static void Test() - { - D di = new D(); - D ds = new D(); - D d = new D(); - - D> ddi = new D>(); - - C ci = new C(); - C cs = new C(); - C co = new C(); - - C> cci = new C>(); - - I> idi = ci; - I> ids = cs; - I> ido = co; - - I>> idci = cci; - - idi.m(di); - ids.m(ds); - ido.m(d); - - idci.m(ddi); - - } -} - - -// Direct recursion through interface instantiation, for struct -class Test18 -{ - interface I - { - void m(T x); - } - - struct S : I - { - public void m(S x) - { - object obj = this; - if (!(obj is I< S >)) { - Utils.failures++; - Console.WriteLine("Test18 failed"); - } - } - } - - struct S2 : I> - { - public void m(S2 x) - { - object obj = this; - if (!(obj is I< S2 >)) { - Utils.failures++; - Console.WriteLine("Test18 failed"); - } - } - } - - public static void Test() - { - S s = new S(); - I iofs = s; - iofs.m(s); - - S2 si = new S2(); - I> isi = si; - isi.m(si); - } -} - -// Recursion through instance field types of classes -class Test19 { - #pragma warning disable 649 - class C - { - public int i; - public D d; - } - - class D - { - public double d; - public C c; - } - #pragma warning restore 649 - public static void Test() - { - C c = new C(); - D d = new D(); - - } -} - - -// Recursion through instance field types of structs and classes -class Test20 { - #pragma warning disable 649 - class C - { - public int i; - public S s; - } - - struct S - { - public double d; - public C c; - } - #pragma warning restore 649 - public static void Test() - { - C c = new C(); - - #pragma warning disable 219 - S s = new S(); - #pragma warning restore 219 - - } -} - - -// Recursion through instance field types of structs and classes -// and static struct/class field which is also recursive -class Test21 { - #pragma warning disable 649 - class C - { - public int i; - public S s; - public static C c = new C(); - public static S st = new S(); - } - - struct S - { - public double d; - public C c; - public static S s = new S(); - public static C ct = new C(); - } - #pragma warning restore 649 - public static void Test() - { - C c = new C(); - - #pragma warning disable 219 - S s = new S(); - #pragma warning restore 219 - - } -} - -// Mutual recursion for structs through interface instantiation -class Test22 -{ - interface I - { - void m(T x); - } - - struct S1 : I - { - public void m(S2 x) - { - object obj = this; - if (!(obj is I< S2 >)) { - Utils.failures++; - Console.WriteLine("Test22 failed"); - } - } - } - - struct S2 : I - { - public void m(S1 x) - { - object obj = this; - if (!(obj is I< S1 >)) { - Utils.failures++; - Console.WriteLine("Test22 failed"); - } - } - } - - - public static void Test() - { - S2 s2 = new S2(); - S1 s1 = new S1(); - - I< S1 > is2 = s2; - I< S2 > is1 = s1; - - is2.m(s1); - is1.m(s2); - } -} - - -// Mutual recursion through interface instantiation for generic structs -class Test23 -{ - interface I - { - void m(T x); - } - - struct S1 : I> - { - public void m(S2 x) - { - object obj = this; - if (!(obj is I< S2 >)) { - Utils.failures++; - Console.WriteLine("Test25 failed"); - } - } - } - - struct S2 : I> - { - public void m(S1 x) - { - object obj = this; - if (!(obj is I< S1 >)) { - Utils.failures++; - Console.WriteLine("Test25 failed"); - } - } - } - - public static void Test() - { - S2 di = new S2(); - S2 ds = new S2(); - S2 d = new S2(); - - S1 s1i = new S1(); - S1 s1s = new S1(); - S1 s1 = new S1(); - - - I< S2 > is2i = s1i; - I< S2 > is2s = s1s; - I< S2 > is2 = s1; - - is2i.m(di); - is2s.m(ds); - is2.m(d); - - I< S1 > is1i = di; - I< S1 > is1s = ds; - I< S1 > is1 = d; - - is1i.m(s1i); - is1s.m(s1s); - is1.m(s1); - - - } -} - - -public class M { - public static int Main() { - Test1.Test(); - if (Utils.failures == 0) Console.WriteLine("Test1 OK"); - Test2.Test(); - if (Utils.failures == 0) Console.WriteLine("Test2 OK"); - Test3.Test(); - if (Utils.failures == 0) Console.WriteLine("Test3 OK"); - Test4.Test(); - if (Utils.failures == 0) Console.WriteLine("Test4 OK"); - Test5.Test(); - if (Utils.failures == 0) Console.WriteLine("Test5 OK"); - Test6.Test(); - if (Utils.failures == 0) Console.WriteLine("Test6 OK"); - Test7.Test(); - if (Utils.failures == 0) Console.WriteLine("Test7 OK"); - Test8.Test(); - if (Utils.failures == 0) Console.WriteLine("Test8 OK"); - Test9.Test(); - if (Utils.failures == 0) Console.WriteLine("Test9 OK"); - Test10.Test(); - if (Utils.failures == 0) Console.WriteLine("Test10 OK"); - Test11.Test(); - if (Utils.failures == 0) Console.WriteLine("Test11 OK"); - Test12.Test(); - if (Utils.failures == 0) Console.WriteLine("Test12 OK"); - Test13.Test(); - if (Utils.failures == 0) Console.WriteLine("Test13 OK"); - Test14.Test(); - if (Utils.failures == 0) Console.WriteLine("Test14 OK"); - Test15.Test(); - if (Utils.failures == 0) Console.WriteLine("Test15 OK"); - Test16.Test(); - if (Utils.failures == 0) Console.WriteLine("Test16 OK"); - Test17.Test(); - if (Utils.failures == 0) Console.WriteLine("Test17 OK"); - Test18.Test(); - if (Utils.failures == 0) Console.WriteLine("Test18 OK"); - Test19.Test(); - if (Utils.failures == 0) Console.WriteLine("Test19 OK"); - Test20.Test(); - if (Utils.failures == 0) Console.WriteLine("Test20 OK"); - Test21.Test(); - if (Utils.failures == 0) Console.WriteLine("Test21 OK"); - Test22.Test(); - if (Utils.failures == 0) Console.WriteLine("Test22 OK"); - Test23.Test(); - if (Utils.failures == 0) Console.WriteLine("Test23 OK"); - if (Utils.failures > 0) return 101; - else - { - Console.WriteLine("PASS"); - return 100; - } - } -} diff --git a/src/coreclr/tests/src/Regressions/coreclr/0487/test.cs b/src/coreclr/tests/src/Regressions/coreclr/0487/test.cs deleted file mode 100644 index 8a2b667b42da..000000000000 --- a/src/coreclr/tests/src/Regressions/coreclr/0487/test.cs +++ /dev/null @@ -1,83 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// This is a regression test for VSWhidbey 139763 -// Static Constructor introduces bad side effects for generic type instantiated -// to reference type in async static event case. - -using System; -using System.Threading; - -public delegate T D(T t); - -public class Gen -{ - public static void Init() - { - Ev+=new D(Gen.OnEv); - } - - static Gen() - { - Console.WriteLine("Call to CCTor has bad side effects"); - } - - private static D FldEv; - - public static event D Ev - { - add - { - FldEv+=value; - } - remove - { - FldEv-=value; - } - } - - public static T OnEv(T t) { return t; } - - public static void AsyncFireEv(T t) - { - Console.WriteLine("AsyncFireEv"); - try - { - IAsyncResult ar = FldEv.BeginInvoke(t,null,null); - ar.AsyncWaitHandle.WaitOne(); - Test.Eval(t.Equals(FldEv.EndInvoke(ar))); - } - catch (NotSupportedException) - { - // expected - Test.Eval(true); - } - } - -} - -public class Test -{ - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - } - - public static int Main() - { - - Gen.Init(); - Gen.AsyncFireEv("X"); - - Console.WriteLine("PASS"); - - return 100; - } -} diff --git a/src/coreclr/tests/src/Regressions/coreclr/0582/csgen.1.cs b/src/coreclr/tests/src/Regressions/coreclr/0582/csgen.1.cs deleted file mode 100644 index 309b6bc69ae9..000000000000 --- a/src/coreclr/tests/src/Regressions/coreclr/0582/csgen.1.cs +++ /dev/null @@ -1,462 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Runtime.InteropServices; - -#pragma warning disable 1717 -#pragma warning disable 0219 - -public enum TestEnum -{ - red = 1, - green = 2, - blue = 4, -} - -public class AA where TA: IComparable -{ - public TB m_agboGeneric1; - public static void Static1(Array param1, ref TB param2, ulong[,,] param3, ref - byte param4) - { - if (App.m_bFwd1) - goto label1; - label1: - while (App.m_bFwd1) - { - TestEnum[,] local1 = (new TestEnum[28u, 111u]); - long local2 = App.m_lFwd2; - if (App.m_bFwd1) - param3 = param3; - else - { - uint local3 = 51u; - TestEnum[,,][,][] local4 = (new TestEnum[116u, 1u, 102u][,][]); - do - { - throw new NullReferenceException(); - } - while(App.m_bFwd1); - param1 = param1; - local2 -= local2; - if (App.m_bFwd1) - try - { - Array[,][,][,,][][,][,][][] local5 = (new Array[83u, 103u] - [,][,,][][,][,][][]); - Array[,,] local6 = (new Array[30u, 6u, 41u]); - param3[34, 110, 27] = App.m_ulFwd3; - param1 = param1; - local6[80, 2, 50] = param1; - local1[63, 60] = TestEnum.red; - } - catch (NullReferenceException) - { - bool local7 = true; - if (local7) - continue; - } - else - if (App.m_bFwd1) - if (App.m_bFwd1) - local3 = local3; - else - local2 -= local2; - } - param2 = param2; - try - { - char[,,][,,,,,] local8 = (new char[35u, 100u, 38u][,,,,,]); - char[,] local9 = (new char[97u, 33u]); - ulong local10 = App.m_ulFwd3; - param4 = param4; - param3 = (new ulong[63u, 9u, 18u]); - if (App.m_bFwd1) - do - { - param4 = param4; - local9 = (new char[125u, 118u]); - try - { - while (App.m_bFwd1) - { - do - { - TestEnum local11 = 0; - BB[] local12 = new BB[]{new BB() }; - object[][] local13 = (new object[33u][]); - } - while(App.m_bFwd1); - continue; - } - try - { - BB[,,][,,][][] local14 = (new BB[76u, 111u, 60u][,,][][]); - } - finally - { - } - while (App.m_bFwd1) - { - } - } - catch (Exception) - { - } - if (App.m_bFwd1) - do - { - } - while(App.m_bFwd1); - } - while(App.m_bFwd1); - return; - } - catch (InvalidOperationException) - { - } - try - { - } - catch (Exception) - { - } - } - do - { - } - while(App.m_bFwd1); - ; - } - public static bool[,,,] Static2(bool[,][,,] param1, ref ulong[] param2, TA - param3, TB param4, TA param5, TB param6) - { - ulong local15 = App.m_ulFwd3; - param3 = param5; - local15 = local15; - for (App.m_byFwd4-=App.m_byFwd4; App.m_bFwd1; App.m_iFwd5++) - { - BB[][,,][,,,] local16 = new BB[][,,][,,,]{(new BB[115u, 22u, 97u][,,,]), - (new BB[71u, 101u, 72u][,,,]), (new BB[94u, 124u, 8u][,,,]) }; - TestEnum[,,,,] local17 = (new TestEnum[62u, 63u, 7u, 49u, 79u]); - for (App.m_fFwd6=50.0f; App.m_bFwd1; App.m_iFwd5*=121) - { - sbyte local18 = App.m_sbyFwd7; - ushort local19 = App.m_ushFwd8; - for (App.m_lFwd2=App.m_lFwd2; App.m_bFwd1; App.m_chFwd9-='\x09') - { - continue; - } - } - do - { - BB[,][][][,,][] local20 = (new BB[90u, 91u][][][,,][]); - for (App.m_iFwd5--; App.m_bFwd1; App.m_byFwd4++) - { - BB[,] local21 = (new BB[124u, 91u]); - long[,][,][][,] local22 = (new long[115u, 83u][,][][,]); - for (App.m_shFwd10=App.m_shFwd10; App.m_bFwd1; App.m_ushFwd8++) - { - char[][][,,] local23 = new char[][][,,]{ }; - TestEnum[,,][,][,,,][] local24 = (new TestEnum[29u, 90u, 44u][,][,,,][]); - object[][] local25 = new object[][]{(new object[92u]), new object[]{null, - null, null, null } }; - try - { - ulong local26 = App.m_ulFwd3; - while (App.m_bFwd1) - { - ushort[,] local27 = (new ushort[35u, 110u]); - long[,] local28 = (new long[73u, 43u]); - param4 = param4; - throw new IndexOutOfRangeException(); - } - if (App.m_bFwd1) - for (App.m_fFwd6+=7.0f; App.m_bFwd1; App.m_byFwd4++) - { - throw new DivideByZeroException(); - } - } - catch (DivideByZeroException) - { - do - { - try - { - local21[123, 75].m_axField1[73] = new Array[][,,,]{(new Array[102u, 56u - , 82u, 63u]) }; - } - finally - { - } - local22 = local22; - try - { - } - catch (DivideByZeroException) - { - } - try - { - } - catch (IndexOutOfRangeException) - { - } - } - while(App.m_bFwd1); - throw new NullReferenceException(); - } - while (App.m_bFwd1) - { - } - } - do - { - } - while(App.m_bFwd1); - do - { - } - while(App.m_bFwd1); - local15 = local15; - } - while (App.m_bFwd1) - { - } - while (App.m_bFwd1) - { - } - throw new InvalidOperationException(); - } - while(App.m_bFwd1); - } - param5 = param5; - return (new bool[38u, 121u, 77u, 3u]); - } - public static sbyte Static3(uint param1, ref short param2) - { - BB local29 = new BB(); - try - { - param1 -= 33u; - } - catch (NullReferenceException) - { - ulong[] local30 = (new ulong[122u]); - byte local31 = App.m_byFwd4; - for (App.m_lFwd2++; App.m_bFwd1; App.m_chFwd9-='\x6c') - { - TestEnum[,,][][] local32 = (new TestEnum[109u, 121u, 75u][][]); - ushort[,,,,][][][] local33 = (new ushort[44u, 28u, 97u, 45u, 88u][][][]); - throw new Exception(); - } - goto label2; - } - label2: - return App.m_sbyFwd7; - } - public static int Static4(TB param1, ref Array[][,,][,,] param2, ref TB param3 - , char param4) - { - ushort[,,][,][][] local34 = (new ushort[18u, 54u, 39u][,][][]); - short local35 = App.m_shFwd10; - return 80; - } -} - -public struct BB -{ - public Array[][][,,,] m_axField1; - public static void Static1(double[][,,] param1, ref bool param2, TestEnum - param3, ref float param4) - { - if (param2) - param2 = param2; - else - { - for (App.m_ushFwd8+=App.m_ushFwd8; param2; App.m_ushFwd8++) - { - sbyte[][] local36 = new sbyte[][]{(new sbyte[14u]) }; - ushort[,,] local37 = (new ushort[113u, 103u, 65u]); - String local38 = "108"; - param2 = param2; - } - while (param2) - { - while (param2) - { - ushort local39 = App.m_ushFwd8; - if (param2) - try - { - BB local40 = new BB(); - ushort local41 = App.m_ushFwd8; - local41 += local41; - do - { - for (App.m_byFwd4++; param2; App.m_lFwd2*=App.m_lFwd2) - { - ulong[,][][] local42 = (new ulong[60u, 24u][][]); - Array local43 = App.m_xFwd11; - try - { - Array[] local44 = (new Array[100u]); - int local45 = 17; - BB[][,][,][][,][] local46 = new BB[][,][,][][,][]{ }; - local43 = local43; - } - catch (Exception) - { - String[,,,,] local47 = (new String[91u, 102u, 91u, 75u, 88u]); - Array[,][] local48 = (new Array[125u, 114u][]); - object local49 = null; - for (App.m_chFwd9+='\x2b'; param2; App.m_chFwd9++) - { - param2 = true; - local39 += local39; - try - { - param2 = param2; - } - finally - { - } - } - while (param2) - { - } - } - local40 = new BB(); - while (param2) - { - } - while (param2) - { - } - } - try - { - } - catch (Exception) - { - } - return; - } - while(param2); - local40.m_axField1[10][53][56, 118, 114, 54] = App.m_xFwd11; - } - catch (InvalidOperationException) - { - } - else - throw new Exception(); - do - { - } - while(param2); - } - if (param2) - try - { - } - catch (Exception) - { - } - try - { - } - catch (Exception) - { - } - } - param3 = 0; - } - while (param2) - { - } - if (param2) - throw new DivideByZeroException(); - param4 /= param4; - ; - } -} - -public class App -{ - public static int Main() - { - try - { - AA.Static1( - App.m_xFwd11, - ref App.m_agboFwd12, - (new ulong[50u, 40u, 98u]), - ref App.m_byFwd4 ); - } - catch (Exception) - { - } - try - { - AA.Static2( - (new bool[72u, 126u][,,]), - ref App.m_aulFwd13, - App.m_gcFwd14, - App.m_agboFwd12, - App.m_gcFwd14, - App.m_agboFwd12 ); - } - catch (Exception) - { - } - try - { - AA.Static3( - 34u, - ref App.m_shFwd10 ); - } - catch (Exception) - { - } - try - { - AA.Static4( - App.m_agboFwd12, - ref App.m_axFwd15, - ref App.m_agboFwd12, - '\x50' ); - } - catch (Exception) - { - } - try - { - BB.Static1( - (new double[101u][,,]), - ref App.m_bFwd1, - TestEnum.red, - ref App.m_fFwd6 ); - } - catch (Exception) - { - } - return 100; - } - public static bool m_bFwd1; - public static long m_lFwd2; - public static ulong m_ulFwd3; - public static byte m_byFwd4; - public static int m_iFwd5; - public static float m_fFwd6; - public static sbyte m_sbyFwd7; - public static ushort m_ushFwd8; - public static char m_chFwd9; - public static short m_shFwd10; - public static Array m_xFwd11; - public static bool m_agboFwd12; - public static ulong[] m_aulFwd13; - public static char m_gcFwd14; - public static Array[][,,][,,] m_axFwd15; -} diff --git a/src/coreclr/tests/src/Regressions/coreclr/16064/methodimpl.il b/src/coreclr/tests/src/Regressions/coreclr/16064/methodimpl.il deleted file mode 100644 index 289f8ad91ead..000000000000 --- a/src/coreclr/tests/src/Regressions/coreclr/16064/methodimpl.il +++ /dev/null @@ -1,63 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Runtime { } - -.assembly methodimpl { } - -.class interface private abstract auto ansi IFoo -{ - .method public hidebysig newslot virtual abstract instance int32 Frob() cil managed - { - } - - .method public hidebysig newslot virtual abstract instance int32 Unrelated() cil managed - { - } -} - -.class interface private abstract auto ansi IBar - implements IFoo -{ - .method public hidebysig newslot virtual final instance int32 Frob() cil managed - { - .override IFoo::Frob - .override IFoo::Unrelated - ldc.i4 50 - ret - } -} - -.class private auto ansi beforefieldinit Fooer - extends [System.Runtime]System.Object - implements IBar -{ - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - ldarg.0 - call instance void [System.Runtime]System.Object::.ctor() - ret - } -} - -.method public hidebysig static int32 Main() cil managed -{ - .entrypoint - ldstr "DefaultImplementationsOfInterfaces" - call bool [System.Runtime]System.Runtime.CompilerServices.RuntimeFeature::IsSupported(string) - - // If default interfaces are not supported, consider the test successful. - brtrue DoRunTest - ldc.i4 100 - ret - -DoRunTest: - newobj instance void Fooer::.ctor() - callvirt instance int32 IFoo::Frob() - newobj instance void Fooer::.ctor() - callvirt instance int32 IFoo::Unrelated() - add - ret -} diff --git a/src/coreclr/tests/src/Regressions/coreclr/22021/provider.il b/src/coreclr/tests/src/Regressions/coreclr/22021/provider.il deleted file mode 100644 index 4f0445ed2e5f..000000000000 --- a/src/coreclr/tests/src/Regressions/coreclr/22021/provider.il +++ /dev/null @@ -1,66 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern System.Runtime { } - -.assembly provider { } - -.class interface public abstract auto ansi I2 -{ - .method public hidebysig newslot abstract virtual instance int32 M1() - { - } -} - -.class interface public abstract auto ansi I4 -{ - .method public hidebysig newslot abstract virtual instance int32 M1() - { - } -} - -.class interface public abstract auto ansi I1 - implements I2, - I4 -{ - .method private hidebysig virtual final instance int32 I2.M1() - { - .override I2::M1 - ldc.i4.1 - ret - } - - .method private hidebysig virtual final instance int32 I4.M1() - { - .override I4::M1 - ldc.i4.2 - ret - } -} - -.class interface public abstract auto ansi IGen2`1 -{ - .method public hidebysig newslot abstract virtual instance int32 M1() - { - } -} - -.class interface public abstract auto ansi IGen1`1 - implements class IGen2`1, - class IGen2`1 -{ - .method private hidebysig virtual final instance int32 Foo() - { - .override class IGen2`1::M1 - ldc.i4.3 - ret - } - - .method private hidebysig virtual final instance int32 Bar() - { - .override class IGen2`1::M1 - ldc.i4.4 - ret - } -} diff --git a/src/coreclr/tests/src/baseservices/TieredCompilation/BasicTest.cs b/src/coreclr/tests/src/baseservices/TieredCompilation/BasicTest.cs deleted file mode 100644 index 64392f7e122c..000000000000 --- a/src/coreclr/tests/src/baseservices/TieredCompilation/BasicTest.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Runtime.CompilerServices; -using System.Threading; - -public static class BasicTest -{ - private static int Main() - { - const int Pass = 100; - - PromoteToTier1(Foo); - Foo(); - - return Pass; - } - - [MethodImpl(MethodImplOptions.NoInlining)] - private static void Foo() - { - Foo2(); - } - - private static void Foo2() - { - } - - [MethodImpl(MethodImplOptions.NoInlining)] - private static void PromoteToTier1(Action action) - { - // Call the method once to register a call for call counting - action(); - - // Allow time for call counting to begin - Thread.Sleep(500); - - // Call the method enough times to trigger tier 1 promotion - for (int i = 0; i < 100; i++) - { - action(); - } - - // Allow time for the method to be jitted at tier 1 - Thread.Sleep(500); - } -} diff --git a/src/coreclr/tests/src/baseservices/compilerservices/dynamicobjectproperties/helper.cs b/src/coreclr/tests/src/baseservices/compilerservices/dynamicobjectproperties/helper.cs deleted file mode 100644 index 287ccfd9629a..000000000000 --- a/src/coreclr/tests/src/baseservices/compilerservices/dynamicobjectproperties/helper.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Runtime.CompilerServices; - -public class RefX1 -{ - T _val; - public RefX1(T t) { _val = t; } - - public override bool Equals(object obj) - { - RefX1 b = obj as RefX1; - if (b == null) - { - return false; - } - return this._val.Equals(b._val); - } - - public override int GetHashCode() - { - return this._val.GetHashCode(); - } - -} - -public class Test -{ - public static bool result = true; - public static bool Eval(bool exp) - { - return Eval(exp, null); - } - public static bool Eval(bool exp, String errorMsg) - { - if (!exp) - { - //This would never be reset, since we start with true and only set it to false if the Eval fails - result = exp; - String err = errorMsg; - if (err == null) - err = "Test Failed"; - Console.WriteLine(err); - } - - return exp; - } - - public static bool Eval(bool exp, String format, params object[] arg) - { - if (!exp) - { - return Eval(exp, String.Format(format, arg)); - } - - return true; - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/baseservices/exceptions/regressions/V1/SEH/COOL/finally.cs b/src/coreclr/tests/src/baseservices/exceptions/regressions/V1/SEH/COOL/finally.cs deleted file mode 100644 index 1e13b966ba14..000000000000 --- a/src/coreclr/tests/src/baseservices/exceptions/regressions/V1/SEH/COOL/finally.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Threading; -public class Foo -{ - private static int n=0; - - public static void Bar(){ - int i = 0; - try { - i = i/n ; - } - catch(DivideByZeroException) - {} - finally { n++; - Console.WriteLine("In finally " + i); - } - } - - public static int Main(String[] args) - { - String s = "Done"; - Thread t = new Thread(new ThreadStart(Foo.Bar)); - t.Start(); - //Thread MainThread = Thread.CurrentThread; - Thread.Sleep(1000); - if (n == 2){ - Console.WriteLine("Finally Test failed"); - return 1; - } - else { - Console.WriteLine("Test Passed"); - Console.WriteLine(s); - return 100; - } - } -} diff --git a/src/coreclr/tests/src/baseservices/exceptions/simple/fault.il b/src/coreclr/tests/src/baseservices/exceptions/simple/fault.il deleted file mode 100644 index 7938f1c3d221..000000000000 --- a/src/coreclr/tests/src/baseservices/exceptions/simple/fault.il +++ /dev/null @@ -1,92 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly extern legacy library mscorlib {} -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - -.assembly 'fault' {} - -.class auto ansi Fault -{ - .method public static int32 Main(class [mscorlib]System.String[] args) il managed - { - .entrypoint - .locals init (int32 V_0) - ldc.i4 3 - stloc.0 - - try_begin: - ldstr "message" - newobj instance void [mscorlib]System.Exception::.ctor(class [mscorlib]System.String) - throw - leave.s try_end - - fault_begin: - ldstr "in fault block." - call void [System.Console]System.Console::WriteLine(class [mscorlib]System.String) - ldloc.0 - ldc.i4 1 - sub - stloc.0 - endfinally - - filter_begin: - pop - ldstr "in filter." - call void [System.Console]System.Console::WriteLine(class [mscorlib]System.String) - ldloc.0 - ldc.i4 1 - sub - stloc.0 - ldc.i4 1 - endfilter - - except_begin: - call void [mscorlib]System.GC::Collect() - castclass [mscorlib]System.Exception - callvirt instance class [mscorlib]System.String [mscorlib]System.Exception::get_Message() - call void [System.Console]System.Console::WriteLine(class [mscorlib]System.String) - - ldstr "in except block." - call void [System.Console]System.Console::WriteLine(class [mscorlib]System.String) - ldloc.0 - ldc.i4 1 - sub - stloc.0 - leave.s try_end - - try_end: - ldloc.0 - ldc.i4.0 - bne.un.s FAIL - - ldstr "test passed." - call void [System.Console]System.Console::WriteLine(class [mscorlib]System.String) - ldc.i4 0x64 - ret - - FAIL: - ldstr "test failed." - call void [System.Console]System.Console::WriteLine(class [mscorlib]System.String) - - ldloc.0 - ret - - .try try_begin to fault_begin fault handler fault_begin to filter_begin - .try try_begin to filter_begin filter filter_begin handler except_begin to try_end - } - - .method public specialname rtspecialname instance void .ctor() il managed - { - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret - } - -} - diff --git a/src/coreclr/tests/src/baseservices/exceptions/simple/finally.cs b/src/coreclr/tests/src/baseservices/exceptions/simple/finally.cs deleted file mode 100644 index d8d72c89330f..000000000000 --- a/src/coreclr/tests/src/baseservices/exceptions/simple/finally.cs +++ /dev/null @@ -1,188 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -public class Finally -{ - public static int Main() - { - Finally f = new Finally(); - - TestLibrary.TestFramework.BeginTestCase("Finally blocks"); - - if (f.RunTests()) - { - TestLibrary.TestFramework.EndTestCase(); - TestLibrary.TestFramework.LogInformation("PASS"); - return 100; - } - else - { - TestLibrary.TestFramework.EndTestCase(); - TestLibrary.TestFramework.LogInformation("FAIL"); - return 0; - } - } - - public bool RunTests() - { - bool retVal = true; - - TestLibrary.TestFramework.LogInformation("[Postive]"); - retVal = PosTest1() && retVal; - retVal = PosTest2() && retVal; - retVal = PosTest3() && retVal; - - return retVal; - } - - public bool PosTest1() - { - bool retVal = true; - int stage = 0; - - TestLibrary.TestFramework.LogInformation("PosTest1: Outer finally"); - - try - { - stage++; //1 - try - { - stage++; //2 - throw new ArgumentException(); - } - catch (ArgumentException) - { - if (2 != stage) - { - TestLibrary.TestFramework.LogError("000", "Catch block executed in wrong order: Expected(2) Actual("+stage+")"); - retVal = false; - } - stage++; //3 - } - } - finally - { - if (3 != stage) - { - TestLibrary.TestFramework.LogError("000", "Finally block executed in wrong order: Expected(3) Actual("+stage+")"); - retVal = false; - } - stage++; //4 - } - - if (4 != stage) - { - TestLibrary.TestFramework.LogError("000", "Finally/Catch block executed too many times: Expected(4) Actual("+stage+")"); - retVal = false; - } - - return retVal; - } - - public bool PosTest2() - { - bool retVal = true; - int stage = 0; - - TestLibrary.TestFramework.LogInformation("PosTest2: Cascade finally"); - - try - { - stage++; //1 - throw new ArgumentException(); - } - catch (ArgumentException) - { - if (1 != stage) - { - TestLibrary.TestFramework.LogError("000", "Catch block executed in wrong order: Expected(1) Actual("+stage+")"); - retVal = false; - } - stage++; //2 - } - finally - { - if (2 != stage) - { - TestLibrary.TestFramework.LogError("000", "Finally block executed in wrong order: Expected(2) Actual("+stage+")"); - retVal = false; - } - stage++; //3 - } - - if (3 != stage) - { - TestLibrary.TestFramework.LogError("000", "Finally/Catch block executed too many times: Expected(3) Actual("+stage+")"); - retVal = false; - } - - return retVal; - } - - public bool PosTest3() - { - bool retVal = true; - int stage = 0; - - TestLibrary.TestFramework.LogInformation("PosTest2: Nested finally"); - - try - { - stage++; //1 - throw new ArgumentException(); - } - catch (ArgumentException) - { - if (1 != stage) - { - TestLibrary.TestFramework.LogError("000", "Catch block executed in wrong order: Expected(1) Actual("+stage+")"); - retVal = false; - } - stage++; //2 - - try - { - stage++; //3 - throw new ArgumentException(); - } - catch (ArgumentException) - { - if (3 != stage) - { - TestLibrary.TestFramework.LogError("000", "Catch block executed in wrong order: Expected(3) Actual("+stage+")"); - retVal = false; - } - stage++; //4 - } - finally - { - if (4 != stage) - { - TestLibrary.TestFramework.LogError("000", "Finally block executed in wrong order: Expected(4) Actual("+stage+")"); - retVal = false; - } - stage++; //5 - } - } - finally - { - if (5 != stage) - { - TestLibrary.TestFramework.LogError("000", "Finally block executed in wrong order: Expected(5) Actual("+stage+")"); - retVal = false; - } - stage++; //6 - } - - if (6 != stage) - { - TestLibrary.TestFramework.LogError("000", "Finally/Catch block executed too many times: Expected(6) Actual("+stage+")"); - retVal = false; - } - - return retVal; - } -} diff --git a/src/coreclr/tests/src/baseservices/exceptions/unittests/throwincatch.cs b/src/coreclr/tests/src/baseservices/exceptions/unittests/throwincatch.cs deleted file mode 100644 index f253bdebcab9..000000000000 --- a/src/coreclr/tests/src/baseservices/exceptions/unittests/throwincatch.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.IO; - -// -// main -// - -public class TestSet -{ - static void CountResults(int testReturnValue, ref int nSuccesses, ref int nFailures) - { - if (100 == testReturnValue) - { - nSuccesses++; - } - else - { - nFailures++; - } - } - - public static int Main() - { - int nSuccesses = 0; - int nFailures = 0; - - CountResults(new ThrowInCatchTest().Run(), ref nSuccesses, ref nFailures); - - if (0 == nFailures) - { - Console.WriteLine("OVERALL PASS: " + nSuccesses + " tests"); - return 100; - } - else - { - Console.WriteLine("OVERALL FAIL: " + nFailures + " tests failed"); - return 999; - } - } -} - -class ThrowInCatchTest -{ - Trace _trace; - - public int Run() - { - _trace = new Trace("ThrowInCatchTest", "0123456"); - _trace.Write("0"); - try - { - _trace.Write("1"); - try - { - _trace.Write("2"); - throw new Exception("....."); - } - catch(Exception e) - { - Console.WriteLine(e); - _trace.Write("3"); - throw new Exception("5"); - } - } - catch(Exception e) - { - Console.WriteLine(e); - _trace.Write("4"); - _trace.Write(e.Message); - } - _trace.Write("6"); - return _trace.Match(); - } -} - - diff --git a/src/coreclr/tests/src/baseservices/exceptions/unittests/throwinfinally.cs b/src/coreclr/tests/src/baseservices/exceptions/unittests/throwinfinally.cs deleted file mode 100644 index ef12db83ebc1..000000000000 --- a/src/coreclr/tests/src/baseservices/exceptions/unittests/throwinfinally.cs +++ /dev/null @@ -1,101 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.IO; - -// -// main -// - -public class TestSet -{ - static void CountResults(int testReturnValue, ref int nSuccesses, ref int nFailures) - { - if (100 == testReturnValue) - { - nSuccesses++; - } - else - { - nFailures++; - } - } - - public static int Main() - { - int nSuccesses = 0; - int nFailures = 0; - - CountResults(new ThrowInFinallyTest().Run(), ref nSuccesses, ref nFailures); - - if (0 == nFailures) - { - Console.WriteLine("OVERALL PASS: " + nSuccesses + " tests"); - return 100; - } - else - { - Console.WriteLine("OVERALL FAIL: " + nFailures + " tests failed"); - return 999; - } - } -} - - -class ThrowInFinallyTest -{ - Trace _trace; - - void Dumb() - { - _trace.Write("2"); - try - { - _trace.Write("3"); - try - { - _trace.Write("4"); - try - { - _trace.Write("5"); - throw new Exception("A"); - } - finally - { - _trace.Write("6"); - throw new Exception("B"); - } - } - finally - { - _trace.Write("7"); - throw new Exception("C"); - } - } - finally - { - _trace.Write("8"); - } - } - - public int Run() - { - _trace = new Trace("ThrowInFinallyTest", "0123456789Ca"); - - _trace.Write("0"); - try - { - _trace.Write("1"); - Dumb(); - } - catch(Exception e) - { - Console.WriteLine(e); - _trace.Write("9"); - _trace.Write(e.Message); - } - _trace.Write("a"); - return _trace.Match(); - } -} diff --git a/src/coreclr/tests/src/baseservices/threading/events/AutoResetEvent/ConstructFalse.cs b/src/coreclr/tests/src/baseservices/threading/events/AutoResetEvent/ConstructFalse.cs deleted file mode 100644 index 7901f9018c85..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/events/AutoResetEvent/ConstructFalse.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; -using System.Diagnostics; - -public class ARETestClass -{ - - public static int Main() - { - ARETestClass testAutoReset = new ARETestClass(); - int ret = testAutoReset.Run(); - Console.WriteLine(ret == 100 ? "Test Passed":"Test Failed"); - return ret; - } - - public int Run() - { - Stopwatch sw = new Stopwatch(); - AutoResetEvent are = new AutoResetEvent(false); - sw.Start(); - bool ret = are.WaitOne(1000);//,false); - sw.Stop(); - //We should never get signaled - if(ret) - { - Console.WriteLine("AutoResetEvent should never be signalled."); - return -1; - } - - if(sw.ElapsedMilliseconds < 900) - { - Console.WriteLine("It should take at least 900 milliseconds to call bool ret = are.WaitOne(1000,false);."); - Console.WriteLine("sw.ElapsedMilliseconds = " + sw.ElapsedMilliseconds); - return -2; - } - - are.Set(); - if(!are.WaitOne(0))//,false)) - { - Console.WriteLine("Signalled event should always return true on call to !are.WaitOne(0,false)."); - return -3; - } - - sw.Reset(); - sw.Start(); - ret = are.WaitOne(1000);//,false); - sw.Stop(); - //We should never get signaled - if(ret) - { - Console.WriteLine("AutoResetEvent should never be signalled after is is AutoReset."); - return -4; - } - - if(sw.ElapsedMilliseconds < 900) - { - Console.WriteLine("It should take at least 900 milliseconds to call bool ret = are.WaitOne(1000,false);."); - Console.WriteLine("sw.ElapsedMilliseconds = " + sw.ElapsedMilliseconds); - return -5; - } - - return 100; - - } -} diff --git a/src/coreclr/tests/src/baseservices/threading/events/AutoResetEvent/ConstructTrue.cs b/src/coreclr/tests/src/baseservices/threading/events/AutoResetEvent/ConstructTrue.cs deleted file mode 100644 index 161bc352ceb3..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/events/AutoResetEvent/ConstructTrue.cs +++ /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. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; -using System.Diagnostics; - -public class ARETestClass -{ - - public static int Main() - { - ARETestClass testAutoReset = new ARETestClass(); - - int ret = testAutoReset.Run(); - Console.WriteLine(ret == 100 ? "Test Passed":"Test Failed"); - return ret; - } - - public int Run() - { - AutoResetEvent are = new AutoResetEvent(true); - Stopwatch sw = new Stopwatch(); - - if(!are.WaitOne(0))//,false)) -{ - Console.WriteLine("Signalled event should always return true on call to !are.WaitOne(0,false)."); - return -3; - } - - sw.Start(); - bool ret = are.WaitOne(1000);//,false); - sw.Stop(); - //We should never get signaled - if(ret) - { - Console.WriteLine("AutoResetEvent should never be signalled."); - return -1; - } - - if(sw.ElapsedMilliseconds < 900) - { - Console.WriteLine("It should take at least 900 milliseconds to call bool ret = are.WaitOne(1000,false);."); - Console.WriteLine("sw.ElapsedMilliseconds = " + sw.ElapsedMilliseconds); - return -2; - } - return 100; - - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/baseservices/threading/events/ManualResetEvent/ConstructFalse.cs b/src/coreclr/tests/src/baseservices/threading/events/ManualResetEvent/ConstructFalse.cs deleted file mode 100644 index ac4572799fcf..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/events/ManualResetEvent/ConstructFalse.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; -using System.Diagnostics; - -public class MRETestClass -{ - - public static int Main() - { - MRETestClass testManualReset = new MRETestClass(); - int ret = testManualReset.Run(); - Console.WriteLine(ret == 100 ? "Test Passed":"Test Failed"); - return ret; - } - - public int Run() - { - Stopwatch sw = new Stopwatch(); - ManualResetEvent mre = new ManualResetEvent(false); - sw.Start(); - bool ret = mre.WaitOne(1000);//,false); - sw.Stop(); - //We should never get signaled - Console.WriteLine("Expect WaitOne to return False and time-out after 1000 milliseconds waiting for signal."); - Console.WriteLine("Actual return is: " + ret.ToString()); - Console.WriteLine("Expect Stopwatch to use entire 1000 milliseconds."); - Console.WriteLine("Actual time taken is: " + sw.ElapsedMilliseconds.ToString()); - Console.WriteLine(); - if(ret || sw.ElapsedMilliseconds < 900) - return -1; - Console.WriteLine("Manual Reset Event signalled."); - mre.Set(); - ret = mre.WaitOne(0);//,false); - Console.WriteLine("Expect WaitOne to return True and time-out after 1000 milliseconds waiting for signal."); - Console.WriteLine("Actual return is: " + ret.ToString()); - Console.WriteLine(); - if(!ret) - return -3; - mre.Reset(); - sw.Reset(); - sw.Start(); - ret = mre.WaitOne(1000);//,false); - sw.Stop(); - //We should never get signaled - Console.WriteLine("Expect WaitOne to return false and time-out after 1000 milliseconds waiting for signal."); - Console.WriteLine("Actual return is: " + ret.ToString()); - Console.WriteLine("Expect Stopwatch to use entire 1000 milliseconds."); - Console.WriteLine("Actual time taken is: " + sw.ElapsedMilliseconds.ToString()); - if(ret || sw.ElapsedMilliseconds < 900) - return -1; - - return 100; - - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/baseservices/threading/events/ManualResetEvent/ConstructTrue.cs b/src/coreclr/tests/src/baseservices/threading/events/ManualResetEvent/ConstructTrue.cs deleted file mode 100644 index ab2b09a5fa2d..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/events/ManualResetEvent/ConstructTrue.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -public class MRETestClass -{ - - public static int Main() - { - MRETestClass testManualReset = new MRETestClass(); - - int ret = testManualReset.Run(); - Console.WriteLine(ret == 100 ? "Test Passed":"Test Failed"); - return ret; - } - - public int Run() - { - ManualResetEvent mre = new ManualResetEvent(true); - - if(!mre.WaitOne(0))//,false)) //are.WaitOne returns true if signaled - return -1; - mre.Reset(); - if(mre.WaitOne(1000))//,false)) - return -3; - mre.Set(); - if(mre.WaitOne(0))//,false)) - return 100; - - Console.WriteLine("ManualResetEvent Broken"); - return -3; - - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread01.cs b/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread01.cs deleted file mode 100644 index ec88c8b39478..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread01.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - Gen obj = new Gen(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int delay = 0; // was long - public static int period = 2; // was long - public static int nThreads = 5; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread02.cs b/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread02.cs deleted file mode 100644 index 0b6319ba6f40..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread02.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public virtual void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - Gen obj = new Gen(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int delay = 0; - public static int period = 2; - public static int nThreads = 5; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread03.cs b/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread03.cs deleted file mode 100644 index 2eeeae433893..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread03.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - Gen obj = new Gen(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int delay = 0; - public static int period = 2; - public static int nThreads = 5; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread04.cs b/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread04.cs deleted file mode 100644 index a1fc2a49b3a0..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread04.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public virtual void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - Gen obj = new Gen(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int delay = 0; - public static int period = 2; - public static int nThreads = 5; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread05.cs b/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread05.cs deleted file mode 100644 index 21fa1f72f3f5..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread05.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - Gen obj = new Gen(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int delay = 0; - public static int period = 2; - public static int nThreads = 5; - public static int Xcounter = 0; - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread06.cs b/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread06.cs deleted file mode 100644 index 58b8b74c959a..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread06.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public virtual void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - Gen obj = new Gen(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int delay = 0; - public static int period = 2; - public static int nThreads = 5; - public static int Xcounter = 0; - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread07.cs b/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread07.cs deleted file mode 100644 index 399f9f565d80..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread07.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -struct Gen -{ - public void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - Gen obj = new Gen(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int delay = 0; - public static int period = 2; - public static int nThreads = 5; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread08.cs b/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread08.cs deleted file mode 100644 index 641e901bb144..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread08.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -struct Gen -{ - public void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - Gen obj = new Gen(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int delay = 0; - public static int period = 2; - public static int nThreads = 5; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread09.cs b/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread09.cs deleted file mode 100644 index 8af00c59d441..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread09.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -struct Gen -{ - public void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - Gen obj = new Gen(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int delay = 0; - public static int period = 2; - public static int nThreads = 5; - public static int Xcounter = 0; - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread10.cs b/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread10.cs deleted file mode 100644 index 2a9de822aefd..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread10.cs +++ /dev/null @@ -1,93 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - - -interface IGen -{ - void Target(object p); - T Dummy(T t); -} - -class Gen : IGen -{ - public T Dummy(T t) { return t; } - - public void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new Gen(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int delay = 0; - public static int period = 2; - public static int nThreads = 5; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread11.cs b/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread11.cs deleted file mode 100644 index e2668ab778e8..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread11.cs +++ /dev/null @@ -1,93 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - - -interface IGen -{ - void Target(object p); - T Dummy(T t); -} - -struct Gen : IGen -{ - public T Dummy(T t) { return t; } - - public void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new Gen(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int delay = 0; - public static int period = 2; - public static int nThreads = 5; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread12.cs b/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread12.cs deleted file mode 100644 index a47ec6377380..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread12.cs +++ /dev/null @@ -1,93 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - - -interface IGen -{ - void Target(object p); - T Dummy(T t); -} - -class Gen : IGen -{ - public T Dummy(T t) { return t; } - - public virtual void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new Gen(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int delay = 0; - public static int period = 2; - public static int nThreads = 5; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread13.cs b/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread13.cs deleted file mode 100644 index 5b10a323bf06..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread13.cs +++ /dev/null @@ -1,219 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -interface IGen -{ - void Target(object p); - T Dummy(T t); -} - -class GenInt : IGen -{ - public int Dummy(int t) { return t; } - - public void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new GenInt(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenDouble : IGen -{ - public double Dummy(double t) { return t; } - - public void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new GenDouble(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenString : IGen -{ - public string Dummy(string t) { return t; } - - public void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new GenString(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenObject : IGen -{ - public object Dummy(object t) { return t; } - - public void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new GenObject(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenGuid : IGen -{ - public Guid Dummy(Guid t) { return t; } - - public void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new GenGuid(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int delay = 0; - public static int period = 2; - public static int nThreads = 5; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread14.cs b/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread14.cs deleted file mode 100644 index 0f784fe964d0..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread14.cs +++ /dev/null @@ -1,219 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -interface IGen -{ - void Target(object p); - T Dummy(T t); -} - -struct GenInt : IGen -{ - public int Dummy(int t) { return t; } - - public void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new GenInt(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -struct GenDouble : IGen -{ - public double Dummy(double t) { return t; } - - public void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new GenDouble(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -struct GenString : IGen -{ - public string Dummy(string t) { return t; } - - public void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new GenString(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -struct GenObject : IGen -{ - public object Dummy(object t) { return t; } - - public void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new GenObject(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -struct GenGuid : IGen -{ - public Guid Dummy(Guid t) { return t; } - - public void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new GenGuid(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int delay = 0; - public static int period = 2; - public static int nThreads = 5; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread15.cs b/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread15.cs deleted file mode 100644 index 1af5326a7c16..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread15.cs +++ /dev/null @@ -1,219 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -interface IGen -{ - void Target(object p); - T Dummy(T t); -} - -class GenInt : IGen -{ - public int Dummy(int t) { return t; } - - public virtual void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new GenInt(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenDouble : IGen -{ - public double Dummy(double t) { return t; } - - public virtual void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new GenDouble(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenString : IGen -{ - public string Dummy(string t) { return t; } - - public virtual void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new GenString(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenObject : IGen -{ - public object Dummy(object t) { return t; } - - public virtual void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new GenObject(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenGuid : IGen -{ - public Guid Dummy(Guid t) { return t; } - - public virtual void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new GenGuid(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int delay = 0; - public static int period = 2; - public static int nThreads = 5; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread16.cs b/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread16.cs deleted file mode 100644 index 192227c641d3..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread16.cs +++ /dev/null @@ -1,85 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -interface IGen -{ - void Target(object p); -} - -class Gen : IGen -{ - public void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new Gen(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int delay = 0; - public static int period = 2; - public static int nThreads = 5; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread17.cs b/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread17.cs deleted file mode 100644 index c5797b2434c2..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread17.cs +++ /dev/null @@ -1,85 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -interface IGen -{ - void Target(object p); -} - -struct Gen : IGen -{ - public void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new Gen(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int delay = 0; - public static int period = 2; - public static int nThreads = 5; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread18.cs b/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread18.cs deleted file mode 100644 index 6e1db0802a1f..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread18.cs +++ /dev/null @@ -1,85 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -interface IGen -{ - void Target(object p); -} - -class Gen : IGen -{ - public virtual void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new Gen(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int delay = 0; - public static int period = 2; - public static int nThreads = 5; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread19.cs b/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread19.cs deleted file mode 100644 index 039914a792b9..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread19.cs +++ /dev/null @@ -1,89 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - - -interface IGen -{ - void Target(object p); - T Dummy(T t); -} - -class Gen : IGen -{ - public T Dummy(T t) { return t; } - - public void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new Gen(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int delay = 0; - public static int period = 2; - public static int nThreads = 5; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread20.cs b/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread20.cs deleted file mode 100644 index de828c39de21..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread20.cs +++ /dev/null @@ -1,89 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - - -interface IGen -{ - void Target(object p); - T Dummy(T t); -} - -struct Gen : IGen -{ - public T Dummy(T t) { return t; } - - public void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new Gen(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int delay = 0; - public static int period = 2; - public static int nThreads = 5; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread21.cs b/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread21.cs deleted file mode 100644 index a62088d4447a..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread21.cs +++ /dev/null @@ -1,89 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - - -interface IGen -{ - void Target(object p); - T Dummy(T t); -} - -class Gen : IGen -{ - public T Dummy(T t) { return t; } - - public virtual void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new Gen(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int delay = 0; - public static int period = 2; - public static int nThreads = 5; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread22.cs b/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread22.cs deleted file mode 100644 index e5bbf61fc873..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread22.cs +++ /dev/null @@ -1,243 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -interface IGen -{ - void Target(object p); - T Dummy(T t); -} - -class GenInt : IGen -{ - public int Dummy(int t) { return t; } - - public void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new GenInt(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenDouble : IGen -{ - public double Dummy(double t) { return t; } - - public void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new GenDouble(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenString : IGen -{ - public string Dummy(string t) { return t; } - - public void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new GenString(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenObject : IGen -{ - public object Dummy(object t) { return t; } - - public void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new GenObject(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenGuid : IGen -{ - public Guid Dummy(Guid t) { return t; } - - public void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new GenGuid(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int delay = 0; - public static int period = 2; - public static int nThreads = 5; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread23.cs b/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread23.cs deleted file mode 100644 index e4871316122b..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread23.cs +++ /dev/null @@ -1,243 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -interface IGen -{ - void Target(object p); - T Dummy(T t); -} - -struct GenInt : IGen -{ - public int Dummy(int t) { return t; } - - public void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new GenInt(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -struct GenDouble : IGen -{ - public double Dummy(double t) { return t; } - - public void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new GenDouble(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -struct GenString : IGen -{ - public string Dummy(string t) { return t; } - - public void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new GenString(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -struct GenObject : IGen -{ - public object Dummy(object t) { return t; } - - public void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new GenObject(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -struct GenGuid : IGen -{ - public Guid Dummy(Guid t) { return t; } - - public void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new GenGuid(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int delay = 0; - public static int period = 2; - public static int nThreads = 5; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread24.cs b/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread24.cs deleted file mode 100644 index 86fd7a090f93..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread24.cs +++ /dev/null @@ -1,243 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -interface IGen -{ - void Target(object p); - T Dummy(T t); -} - -class GenInt : IGen -{ - public int Dummy(int t) { return t; } - - public virtual void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new GenInt(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenDouble : IGen -{ - public double Dummy(double t) { return t; } - - public virtual void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new GenDouble(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenString : IGen -{ - public string Dummy(string t) { return t; } - - public virtual void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new GenString(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenObject : IGen -{ - public object Dummy(object t) { return t; } - - public virtual void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new GenObject(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenGuid : IGen -{ - public Guid Dummy(Guid t) { return t; } - - public virtual void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - IGen obj = new GenGuid(); - - TimerCallback tcb = new TimerCallback(obj.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int delay = 0; - public static int period = 2; - public static int nThreads = 5; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread25.cs b/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread25.cs deleted file mode 100644 index 77a242e97f7a..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread25.cs +++ /dev/null @@ -1,82 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public static void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - TimerCallback tcb = new TimerCallback(Gen.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int delay = 0; - public static int period = 2; - public static int nThreads = 5; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread26.cs b/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread26.cs deleted file mode 100644 index 2caf79a4ba40..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread26.cs +++ /dev/null @@ -1,82 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -struct Gen -{ - public static void Target(object p) - { - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - TimerCallback tcb = new TimerCallback(Gen.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int delay = 0; - public static int period = 2; - public static int nThreads = 5; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread27.cs b/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread27.cs deleted file mode 100644 index b9e422f628fc..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread27.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public static void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - TimerCallback tcb = new TimerCallback(Gen.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int delay = 0; - public static int period = 2; - public static int nThreads = 5; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread28.cs b/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread28.cs deleted file mode 100644 index 77e0d6e21a5e..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread28.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -struct Gen -{ - public static void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - TimerCallback tcb = new TimerCallback(Gen.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int delay = 0; - public static int period = 2; - public static int nThreads = 5; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread29.cs b/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread29.cs deleted file mode 100644 index 0286f4bb1701..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread29.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public static void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - TimerCallback tcb = new TimerCallback(Gen.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int delay = 0; - public static int period = 2; - public static int nThreads = 5; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread30.cs b/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread30.cs deleted file mode 100644 index 56676fb7b1ee..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/TimerCallback/thread30.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -struct Gen -{ - public static void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - if (Test.Xcounter>=Test.nThreads) - { - ManualResetEvent evt = (ManualResetEvent) p; - evt.Set(); - } - else - { - Interlocked.Increment(ref Test.Xcounter); - } - } - - public static void ThreadPoolTest() - { - ManualResetEvent evt = new ManualResetEvent(false); - - TimerCallback tcb = new TimerCallback(Gen.Target); - Timer timer = new Timer(tcb,evt,Test.delay,Test.period); - - evt.WaitOne(); - timer.Dispose(); - Test.Eval(Test.Xcounter>=Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int delay = 0; - public static int period = 2; - public static int nThreads = 5; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread01.cs b/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread01.cs deleted file mode 100644 index f253494a3d5d..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread01.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public void Target(object p) - { - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new Gen(); - - for (int i = 0; i < Test.nThreads; i++) - { - WaitCallback cb = new WaitCallback(obj.Target); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads = 50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread02.cs b/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread02.cs deleted file mode 100644 index 14e58e834abf..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread02.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public virtual void Target(object p) - { - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new Gen(); - - for (int i = 0; i < Test.nThreads; i++) - { - WaitCallback cb = new WaitCallback(obj.Target); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread03.cs b/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread03.cs deleted file mode 100644 index 2ca4aa49b57b..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread03.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread04.cs b/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread04.cs deleted file mode 100644 index de952fe2bb31..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread04.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public virtual void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread05.cs b/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread05.cs deleted file mode 100644 index 504ec78a100e..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread05.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new Gen(); - - for (int i = 0; i < Test.nThreads; i++) - { - WaitCallback cb = new WaitCallback(obj.Target); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread06.cs b/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread06.cs deleted file mode 100644 index d5b71c33f064..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread06.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public virtual void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new Gen(); - - for (int i = 0; i < Test.nThreads; i++) - { - WaitCallback cb = new WaitCallback(obj.Target); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread07.cs b/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread07.cs deleted file mode 100644 index 28f2e3864f4b..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread07.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -struct Gen -{ - public void Target(object p) - { - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new Gen(); - - for (int i = 0; i < Test.nThreads; i++) - { - WaitCallback cb = new WaitCallback(obj.Target); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread08.cs b/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread08.cs deleted file mode 100644 index 95712b22f0bb..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread08.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -struct Gen -{ - public void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread09.cs b/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread09.cs deleted file mode 100644 index 6f2d737d5eb8..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread09.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -struct Gen -{ - public void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new Gen(); - - for (int i = 0; i < Test.nThreads; i++) - { - WaitCallback cb = new WaitCallback(obj.Target); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread10.cs b/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread10.cs deleted file mode 100644 index bd0f595ca9af..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread10.cs +++ /dev/null @@ -1,94 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - - -interface IGen -{ - void Target(object p); - T Dummy(T t); -} - -class Gen : IGen -{ - public T Dummy(T t) { return t; } - - public void Target(object p) - { - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new Gen(); - - for (int i = 0; i .ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread11.cs b/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread11.cs deleted file mode 100644 index d835dfc7db22..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread11.cs +++ /dev/null @@ -1,94 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - - -interface IGen -{ - void Target(object p); - T Dummy(T t); -} - -struct Gen : IGen -{ - public T Dummy(T t) { return t; } - - public void Target(object p) - { - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new Gen(); - - for (int i = 0; i .ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread12.cs b/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread12.cs deleted file mode 100644 index 82be6836ea3b..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread12.cs +++ /dev/null @@ -1,94 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - - -interface IGen -{ - void Target(object p); - T Dummy(T t); -} - -class Gen : IGen -{ - public T Dummy(T t) { return t; } - - public virtual void Target(object p) - { - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new Gen(); - - for (int i = 0; i .ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread13.cs b/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread13.cs deleted file mode 100644 index e13a83d20ed3..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread13.cs +++ /dev/null @@ -1,236 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -interface IGen -{ - void Target(object p); - T Dummy(T t); -} - -class GenInt : IGen -{ - public int Dummy(int t) { return t; } - - public void Target(object p) - { - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new GenInt(); - - for (int i = 0; i -{ - public double Dummy(double t) { return t; } - - public void Target(object p) - { - ManualResetEvent evt = (ManualResetEvent) p; - - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new GenDouble(); - - for (int i = 0; i -{ - public string Dummy(string t) { return t; } - - public void Target(object p) - { - ManualResetEvent evt = (ManualResetEvent) p; - - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new GenString(); - - for (int i = 0; i -{ - public object Dummy(object t) { return t; } - - public void Target(object p) - { - ManualResetEvent evt = (ManualResetEvent) p; - - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new GenObject(); - - for (int i = 0; i -{ - public Guid Dummy(Guid t) { return t; } - - public void Target(object p) - { - ManualResetEvent evt = (ManualResetEvent) p; - - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new GenGuid(); - - for (int i = 0; i -{ - void Target(object p); - T Dummy(T t); -} - -struct GenInt : IGen -{ - public int Dummy(int t) { return t; } - - public void Target(object p) - { - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new GenInt(); - - for (int i = 0; i -{ - public double Dummy(double t) { return t; } - - public void Target(object p) - { - ManualResetEvent evt = (ManualResetEvent) p; - - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new GenDouble(); - - for (int i = 0; i -{ - public string Dummy(string t) { return t; } - - public void Target(object p) - { - ManualResetEvent evt = (ManualResetEvent) p; - - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new GenString(); - - for (int i = 0; i -{ - public object Dummy(object t) { return t; } - - public void Target(object p) - { - ManualResetEvent evt = (ManualResetEvent) p; - - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new GenObject(); - - for (int i = 0; i -{ - public Guid Dummy(Guid t) { return t; } - - public void Target(object p) - { - ManualResetEvent evt = (ManualResetEvent) p; - - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new GenGuid(); - - for (int i = 0; i -{ - void Target(object p); - T Dummy(T t); -} - -class GenInt : IGen -{ - public int Dummy(int t) { return t; } - - public virtual void Target(object p) - { - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new GenInt(); - - for (int i = 0; i -{ - public double Dummy(double t) { return t; } - - public virtual void Target(object p) - { - ManualResetEvent evt = (ManualResetEvent) p; - - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new GenDouble(); - - for (int i = 0; i -{ - public string Dummy(string t) { return t; } - - public virtual void Target(object p) - { - ManualResetEvent evt = (ManualResetEvent) p; - - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new GenString(); - - for (int i = 0; i -{ - public object Dummy(object t) { return t; } - - public virtual void Target(object p) - { - ManualResetEvent evt = (ManualResetEvent) p; - - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new GenObject(); - - for (int i = 0; i -{ - public Guid Dummy(Guid t) { return t; } - - public virtual void Target(object p) - { - ManualResetEvent evt = (ManualResetEvent) p; - - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new GenGuid(); - - for (int i = 0; i (object p); -} - -class Gen : IGen -{ - public void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread17.cs b/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread17.cs deleted file mode 100644 index b51bd2762770..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread17.cs +++ /dev/null @@ -1,85 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -interface IGen -{ - void Target(object p); -} - -struct Gen : IGen -{ - public void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread18.cs b/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread18.cs deleted file mode 100644 index e8f989609adb..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread18.cs +++ /dev/null @@ -1,85 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -interface IGen -{ - void Target(object p); -} - -class Gen : IGen -{ - public virtual void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread19.cs b/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread19.cs deleted file mode 100644 index 9a295c0fca8f..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread19.cs +++ /dev/null @@ -1,89 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - - -interface IGen -{ - void Target(object p); - T Dummy(T t); -} - -class Gen : IGen -{ - public T Dummy(T t) {return t;} - - public void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new Gen(); - - for (int i = 0; i < Test.nThreads; i++) - { - WaitCallback cb = new WaitCallback(obj.Target); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread20.cs b/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread20.cs deleted file mode 100644 index c6a19a14d00c..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread20.cs +++ /dev/null @@ -1,89 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - - -interface IGen -{ - void Target(object p); - T Dummy(T t); -} - -struct Gen : IGen -{ - public T Dummy(T t) {return t;} - - public void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new Gen(); - - for (int i = 0; i < Test.nThreads; i++) - { - WaitCallback cb = new WaitCallback(obj.Target); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread21.cs b/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread21.cs deleted file mode 100644 index e6c0f6dbe49c..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread21.cs +++ /dev/null @@ -1,89 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - - -interface IGen -{ - void Target(object p); - T Dummy(T t); -} - -class Gen : IGen -{ - public T Dummy(T t) {return t;} - - public virtual void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new Gen(); - - for (int i = 0; i < Test.nThreads; i++) - { - WaitCallback cb = new WaitCallback(obj.Target); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread22.cs b/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread22.cs deleted file mode 100644 index ef2c656de2c2..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread22.cs +++ /dev/null @@ -1,271 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -interface IGen -{ - void Target(object p); - T Dummy(T t); -} - -class GenInt : IGen -{ - public int Dummy(int t) { return t; } - - public void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new GenInt(); - - for (int i = 0; i ); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenDouble : IGen -{ - public double Dummy(double t) { return t; } - - public void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - ManualResetEvent evt = (ManualResetEvent) p; - - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new GenDouble(); - - for (int i = 0; i ); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - - -class GenString : IGen -{ - public string Dummy(string t) { return t; } - - public void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - ManualResetEvent evt = (ManualResetEvent) p; - - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new GenString(); - - for (int i = 0; i ); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenObject : IGen -{ - public object Dummy(object t) { return t; } - - public void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - ManualResetEvent evt = (ManualResetEvent) p; - - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new GenObject(); - - for (int i = 0; i ); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenGuid : IGen -{ - public Guid Dummy(Guid t) { return t; } - - public void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - ManualResetEvent evt = (ManualResetEvent) p; - - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new GenGuid(); - - for (int i = 0; i ); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread23.cs b/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread23.cs deleted file mode 100644 index 7df7392a64c7..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread23.cs +++ /dev/null @@ -1,269 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -interface IGen -{ - void Target(object p); - T Dummy(T t); -} - -struct GenInt : IGen -{ - public int Dummy(int t) { return t; } - - public void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new GenInt(); - - for (int i = 0; i ); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -struct GenDouble : IGen -{ - public double Dummy(double t) { return t; } - - public void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new GenDouble(); - - for (int i = 0; i ); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - - -struct GenString : IGen -{ - public string Dummy(string t) { return t; } - - public void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new GenString(); - - for (int i = 0; i ); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -struct GenObject : IGen -{ - public object Dummy(object t) { return t; } - - public void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - ManualResetEvent evt = (ManualResetEvent) p; - - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new GenObject(); - - for (int i = 0; i ); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -struct GenGuid : IGen -{ - public Guid Dummy(Guid t) { return t; } - - public void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - ManualResetEvent evt = (ManualResetEvent) p; - - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new GenGuid(); - - for (int i = 0; i ); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread24.cs b/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread24.cs deleted file mode 100644 index ca6bfc33fd3c..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread24.cs +++ /dev/null @@ -1,267 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -interface IGen -{ - void Target(object p); - T Dummy(T t); -} - -class GenInt : IGen -{ - public int Dummy(int t) { return t; } - - public virtual void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new GenInt(); - - for (int i = 0; i ); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenDouble : IGen -{ - public double Dummy(double t) { return t; } - - public virtual void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new GenDouble(); - - for (int i = 0; i ); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - - -class GenString : IGen -{ - public string Dummy(string t) { return t; } - - public virtual void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new GenString(); - - for (int i = 0; i ); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenObject : IGen -{ - public object Dummy(object t) { return t; } - - public virtual void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new GenObject(); - - for (int i = 0; i ); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenGuid : IGen -{ - public Guid Dummy(Guid t) { return t; } - - public virtual void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new GenGuid(); - - for (int i = 0; i ); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread25.cs b/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread25.cs deleted file mode 100644 index 973231f41b81..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread25.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public static void Target(object p) - { - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new Gen(); - - for (int i = 0; i < Test.nThreads; i++) - { - WaitCallback cb = new WaitCallback(Gen.Target); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads = 50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread26.cs b/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread26.cs deleted file mode 100644 index 7cc3dce2829a..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread26.cs +++ /dev/null @@ -1,86 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -struct Gen -{ - public static void Target(object p) - { - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new Gen(); -#pragma warning restore - - for (int i = 0; i < Test.nThreads; i++) - { - WaitCallback cb = new WaitCallback(Gen.Target); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads = 50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread27.cs b/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread27.cs deleted file mode 100644 index bbe99f4cdf87..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread27.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public static void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new Gen(); - - for (int i = 0; i < Test.nThreads; i++) - { - WaitCallback cb = new WaitCallback(Gen.Target); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread28.cs b/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread28.cs deleted file mode 100644 index ac48e97abf70..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread28.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -struct Gen -{ - public static void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i obj = new Gen(); -#pragma warning restore - for (int i = 0; i < Test.nThreads; i++) - { - WaitCallback cb = new WaitCallback(Gen.Target); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread29.cs b/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread29.cs deleted file mode 100644 index 69637281643e..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread29.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public static void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread30.cs b/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread30.cs deleted file mode 100644 index ef14e682edfe..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/WaitCallback/thread30.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -struct Gen -{ - public static void Target(object p) - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=p.GetType()); - ManualResetEvent evt = (ManualResetEvent) p; - Interlocked.Increment(ref Test.Xcounter); - evt.Set(); - } - public static void ThreadPoolTest() - { - ManualResetEvent[] evts = new ManualResetEvent[Test.nThreads]; - WaitHandle[] hdls = new WaitHandle[Test.nThreads]; - - for (int i=0; i); - ThreadPool.QueueUserWorkItem(cb,evts[i]); - } - - WaitHandle.WaitAll(hdls); - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread01.cs b/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread01.cs deleted file mode 100644 index b407d93f2fba..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread01.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - public static void DelegateTest() - { - ThreadStart d = new ThreadStart(new Gen().Target); - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads = 50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread02.cs b/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread02.cs deleted file mode 100644 index 3e2525eb05ce..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread02.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public virtual void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - public static void DelegateTest() - { - ThreadStart d = new ThreadStart(new Gen().Target); - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads = 50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread03.cs b/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread03.cs deleted file mode 100644 index 25cf299b2138..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread03.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - public static void DelegateTest() - { - ThreadStart d = new ThreadStart(new Gen().Target); - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread04.cs b/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread04.cs deleted file mode 100644 index 28fbf550546b..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread04.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public virtual void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - public static void DelegateTest() - { - ThreadStart d = new ThreadStart(new Gen().Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread05.cs b/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread05.cs deleted file mode 100644 index 8f88334cdbb8..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread05.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - public static void DelegateTest() - { - ThreadStart d = new ThreadStart(new Gen().Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread06.cs b/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread06.cs deleted file mode 100644 index 1554faf560c7..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread06.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public virtual void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - public static void DelegateTest() - { - ThreadStart d = new ThreadStart(new Gen().Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread07.cs b/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread07.cs deleted file mode 100644 index d0c0319b6084..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread07.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -struct Gen -{ - public void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - public static void DelegateTest() - { - ThreadStart d = new ThreadStart(new Gen().Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads = 50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread08.cs b/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread08.cs deleted file mode 100644 index b133e3133719..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread08.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -struct Gen -{ - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - public static void DelegateTest() - { - ThreadStart d = new ThreadStart(new Gen().Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread09.cs b/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread09.cs deleted file mode 100644 index c91e538f470a..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread09.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -struct Gen -{ - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - public static void DelegateTest() - { - ThreadStart d = new ThreadStart(new Gen().Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread10.cs b/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread10.cs deleted file mode 100644 index 1a09ce56ed85..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread10.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - - -interface IGen -{ - void Target(); - T Dummy(T t); -} - -class Gen : IGen -{ - public T Dummy(T t) { return t; } - - public void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void DelegateTest() - { - IGen obj = new Gen(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread11.cs b/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread11.cs deleted file mode 100644 index 3001b72cc68c..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread11.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - - -interface IGen -{ - void Target(); - T Dummy(T t); -} - -struct Gen : IGen -{ - public T Dummy(T t) { return t; } - - public void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void DelegateTest() - { - IGen obj = new Gen(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread12.cs b/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread12.cs deleted file mode 100644 index 8adcb5e9b88b..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread12.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - - -interface IGen -{ - void Target(); - T Dummy(T t); -} - -class Gen : IGen -{ - public T Dummy(T t) { return t; } - - public virtual void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void DelegateTest() - { - IGen obj = new Gen(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread13.cs b/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread13.cs deleted file mode 100644 index 96d26ebb1c22..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread13.cs +++ /dev/null @@ -1,156 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -interface IGen -{ - void Target(); - T Dummy(T t); -} - -class GenInt : IGen -{ - public int Dummy(int t) { return t; } - - public void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void DelegateTest() - { - IGen obj = new GenInt(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -class GenDouble : IGen -{ - public double Dummy(double t) { return t; } - - public void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void DelegateTest() - { - IGen obj = new GenDouble(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -class GenString : IGen -{ - public string Dummy(string t) { return t; } - - public void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void DelegateTest() - { - IGen obj = new GenString(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -class GenObject : IGen -{ - public object Dummy(object t) { return t; } - - public void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void DelegateTest() - { - IGen obj = new GenObject(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -class GenGuid : IGen -{ - public Guid Dummy(Guid t) { return t; } - - public void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void DelegateTest() - { - IGen obj = new GenGuid(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - GenInt.DelegateTest(); - GenDouble.DelegateTest(); - GenString.DelegateTest(); - GenObject.DelegateTest(); - GenGuid.DelegateTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread14.cs b/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread14.cs deleted file mode 100644 index b8b4d73e8b28..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread14.cs +++ /dev/null @@ -1,156 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -interface IGen -{ - void Target(); - T Dummy(T t); -} - -struct GenInt : IGen -{ - public int Dummy(int t) { return t; } - - public void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void DelegateTest() - { - IGen obj = new GenInt(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -struct GenDouble : IGen -{ - public double Dummy(double t) { return t; } - - public void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void DelegateTest() - { - IGen obj = new GenDouble(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -struct GenString : IGen -{ - public string Dummy(string t) { return t; } - - public void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void DelegateTest() - { - IGen obj = new GenString(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -struct GenObject : IGen -{ - public object Dummy(object t) { return t; } - - public void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void DelegateTest() - { - IGen obj = new GenObject(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -struct GenGuid : IGen -{ - public Guid Dummy(Guid t) { return t; } - - public void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void DelegateTest() - { - IGen obj = new GenGuid(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - GenInt.DelegateTest(); - GenDouble.DelegateTest(); - GenString.DelegateTest(); - GenObject.DelegateTest(); - GenGuid.DelegateTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread15.cs b/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread15.cs deleted file mode 100644 index f5fa9098336a..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread15.cs +++ /dev/null @@ -1,156 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -interface IGen -{ - void Target(); - T Dummy(T t); -} - -class GenInt : IGen -{ - public int Dummy(int t) { return t; } - - public virtual void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void DelegateTest() - { - IGen obj = new GenInt(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -class GenDouble : IGen -{ - public double Dummy(double t) { return t; } - - public virtual void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void DelegateTest() - { - IGen obj = new GenDouble(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -class GenString : IGen -{ - public string Dummy(string t) { return t; } - - public virtual void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void DelegateTest() - { - IGen obj = new GenString(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -class GenObject : IGen -{ - public object Dummy(object t) { return t; } - - public virtual void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void DelegateTest() - { - IGen obj = new GenObject(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -class GenGuid : IGen -{ - public Guid Dummy(Guid t) { return t; } - - public virtual void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void DelegateTest() - { - IGen obj = new GenGuid(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - GenInt.DelegateTest(); - GenDouble.DelegateTest(); - GenString.DelegateTest(); - GenObject.DelegateTest(); - GenGuid.DelegateTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread16.cs b/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread16.cs deleted file mode 100644 index 0a74641bcf7e..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread16.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -interface IGen -{ - void Target(); -} - -class Gen : IGen -{ - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - public static void DelegateTest() - { - IGen obj = new Gen(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread17.cs b/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread17.cs deleted file mode 100644 index 5f9c1c0943f1..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread17.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -interface IGen -{ - void Target(); -} - -struct Gen : IGen -{ - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - public static void DelegateTest() - { - IGen obj = new Gen(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread18.cs b/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread18.cs deleted file mode 100644 index 10650c06cb54..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread18.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -interface IGen -{ - void Target(); -} - -class Gen : IGen -{ - public virtual void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - public static void DelegateTest() - { - IGen obj = new Gen(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread19.cs b/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread19.cs deleted file mode 100644 index 616886504e92..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread19.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - - -interface IGen -{ - void Target(); - T Dummy(T t); -} - -class Gen : IGen -{ - public T Dummy(T t) {return t;} - - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - public static void DelegateTest() - { - IGen obj = new Gen(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread20.cs b/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread20.cs deleted file mode 100644 index 5b73e877b863..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread20.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - - -interface IGen -{ - void Target(); - T Dummy(T t); -} - -struct Gen : IGen -{ - public T Dummy(T t) {return t;} - - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - public static void DelegateTest() - { - IGen obj = new Gen(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread21.cs b/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread21.cs deleted file mode 100644 index 07413138c3b8..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread21.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - - -interface IGen -{ - void Target(); - T Dummy(T t); -} - -class Gen : IGen -{ - public T Dummy(T t) {return t;} - - public virtual void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - public static void DelegateTest() - { - IGen obj = new Gen(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread22.cs b/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread22.cs deleted file mode 100644 index 59683e79eb01..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread22.cs +++ /dev/null @@ -1,193 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -interface IGen -{ - void Target(); - T Dummy(T t); -} - - -class GenInt : IGen -{ - public int Dummy(int t) { return t; } - - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - - public static void DelegateTest() - { - IGen obj = new GenInt(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -class GenDouble : IGen -{ - public double Dummy(double t) { return t; } - - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - - public static void DelegateTest() - { - IGen obj = new GenDouble(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -class GenString : IGen -{ - public string Dummy(string t) { return t; } - - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - - public static void DelegateTest() - { - IGen obj = new GenString(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -class GenObject : IGen -{ - public object Dummy(object t) { return t; } - - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - - public static void DelegateTest() - { - IGen obj = new GenObject(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -class GenGuid : IGen -{ - public Guid Dummy(Guid t) { return t; } - - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - - public static void DelegateTest() - { - IGen obj = new GenGuid(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - GenInt.DelegateTest(); - GenDouble.DelegateTest(); - GenString.DelegateTest(); - GenObject.DelegateTest(); - GenGuid.DelegateTest(); - - GenInt.DelegateTest(); - GenDouble.DelegateTest(); - GenString.DelegateTest(); - GenObject.DelegateTest(); - GenGuid.DelegateTest(); - - GenInt.DelegateTest(); - GenDouble.DelegateTest(); - GenString.DelegateTest(); - GenObject.DelegateTest(); - GenGuid.DelegateTest(); - - GenInt.DelegateTest(); - GenDouble.DelegateTest(); - GenString.DelegateTest(); - GenObject.DelegateTest(); - GenGuid.DelegateTest(); - - GenInt.DelegateTest(); - GenDouble.DelegateTest(); - GenString.DelegateTest(); - GenObject.DelegateTest(); - GenGuid.DelegateTest(); - - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread23.cs b/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread23.cs deleted file mode 100644 index 93f639f18792..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread23.cs +++ /dev/null @@ -1,193 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -interface IGen -{ - void Target(); - T Dummy(T t); -} - - -struct GenInt : IGen -{ - public int Dummy(int t) { return t; } - - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - - public static void DelegateTest() - { - IGen obj = new GenInt(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -struct GenDouble : IGen -{ - public double Dummy(double t) { return t; } - - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - - public static void DelegateTest() - { - IGen obj = new GenDouble(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -struct GenString : IGen -{ - public string Dummy(string t) { return t; } - - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - - public static void DelegateTest() - { - IGen obj = new GenString(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -struct GenObject : IGen -{ - public object Dummy(object t) { return t; } - - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - - public static void DelegateTest() - { - IGen obj = new GenObject(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -struct GenGuid : IGen -{ - public Guid Dummy(Guid t) { return t; } - - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - - public static void DelegateTest() - { - IGen obj = new GenGuid(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - GenInt.DelegateTest(); - GenDouble.DelegateTest(); - GenString.DelegateTest(); - GenObject.DelegateTest(); - GenGuid.DelegateTest(); - - GenInt.DelegateTest(); - GenDouble.DelegateTest(); - GenString.DelegateTest(); - GenObject.DelegateTest(); - GenGuid.DelegateTest(); - - GenInt.DelegateTest(); - GenDouble.DelegateTest(); - GenString.DelegateTest(); - GenObject.DelegateTest(); - GenGuid.DelegateTest(); - - GenInt.DelegateTest(); - GenDouble.DelegateTest(); - GenString.DelegateTest(); - GenObject.DelegateTest(); - GenGuid.DelegateTest(); - - GenInt.DelegateTest(); - GenDouble.DelegateTest(); - GenString.DelegateTest(); - GenObject.DelegateTest(); - GenGuid.DelegateTest(); - - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread24.cs b/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread24.cs deleted file mode 100644 index 24d0ccc5251e..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread24.cs +++ /dev/null @@ -1,193 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -interface IGen -{ - void Target(); - T Dummy(T t); -} - - -class GenInt : IGen -{ - public int Dummy(int t) { return t; } - - public virtual void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - - public static void DelegateTest() - { - IGen obj = new GenInt(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -class GenDouble : IGen -{ - public double Dummy(double t) { return t; } - - public virtual void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - - public static void DelegateTest() - { - IGen obj = new GenDouble(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -class GenString : IGen -{ - public string Dummy(string t) { return t; } - - public virtual void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - - public static void DelegateTest() - { - IGen obj = new GenString(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -class GenObject : IGen -{ - public object Dummy(object t) { return t; } - - public virtual void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - - public static void DelegateTest() - { - IGen obj = new GenObject(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -class GenGuid : IGen -{ - public Guid Dummy(Guid t) { return t; } - - public virtual void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - - public static void DelegateTest() - { - IGen obj = new GenGuid(); - ThreadStart d = new ThreadStart(obj.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - GenInt.DelegateTest(); - GenDouble.DelegateTest(); - GenString.DelegateTest(); - GenObject.DelegateTest(); - GenGuid.DelegateTest(); - - GenInt.DelegateTest(); - GenDouble.DelegateTest(); - GenString.DelegateTest(); - GenObject.DelegateTest(); - GenGuid.DelegateTest(); - - GenInt.DelegateTest(); - GenDouble.DelegateTest(); - GenString.DelegateTest(); - GenObject.DelegateTest(); - GenGuid.DelegateTest(); - - GenInt.DelegateTest(); - GenDouble.DelegateTest(); - GenString.DelegateTest(); - GenObject.DelegateTest(); - GenGuid.DelegateTest(); - - GenInt.DelegateTest(); - GenDouble.DelegateTest(); - GenString.DelegateTest(); - GenObject.DelegateTest(); - GenGuid.DelegateTest(); - - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread25.cs b/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread25.cs deleted file mode 100644 index d98a49b1de79..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread25.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public static void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - public static void DelegateTest() - { - ThreadStart d = new ThreadStart(Gen.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads = 50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread26.cs b/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread26.cs deleted file mode 100644 index d131be9fba5e..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread26.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -struct Gen -{ - public static void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - public static void DelegateTest() - { - ThreadStart d = new ThreadStart(Gen.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads = 50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread27.cs b/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread27.cs deleted file mode 100644 index a56c39677865..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread27.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public static void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - public static void DelegateTest() - { - ThreadStart d = new ThreadStart(Gen.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread28.cs b/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread28.cs deleted file mode 100644 index 4f1e755a2961..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread28.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -struct Gen -{ - public static void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - public static void DelegateTest() - { - ThreadStart d = new ThreadStart(Gen.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread29.cs b/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread29.cs deleted file mode 100644 index c1550050c60f..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread29.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public static void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - public static void DelegateTest() - { - ThreadStart d = new ThreadStart(Gen.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread30.cs b/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread30.cs deleted file mode 100644 index b1800971709b..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/syncdelegate/thread30.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -struct Gen -{ - public static void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - public static void DelegateTest() - { - ThreadStart d = new ThreadStart(Gen.Target); - - - d(); - Test.Eval(Test.Xcounter==1); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - Gen.DelegateTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread01.cs b/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread01.cs deleted file mode 100644 index 4ab65e013338..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread01.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - Gen obj = new Gen(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads = 50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread02.cs b/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread02.cs deleted file mode 100644 index 45669ab6f690..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread02.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public virtual void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - Gen obj = new Gen(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads = 50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread03.cs b/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread03.cs deleted file mode 100644 index 725dd669b886..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread03.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - Gen obj = new Gen(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread04.cs b/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread04.cs deleted file mode 100644 index 4f8622b5a5c8..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread04.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public virtual void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - Gen obj = new Gen(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread05.cs b/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread05.cs deleted file mode 100644 index 97497d6d390a..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread05.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - Gen obj = new Gen(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread06.cs b/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread06.cs deleted file mode 100644 index db704d1cc305..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread06.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public virtual void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - Gen obj = new Gen(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread07.cs b/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread07.cs deleted file mode 100644 index 13ae54cce7e3..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread07.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -struct Gen -{ - public void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - Gen obj = new Gen(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads = 50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread08.cs b/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread08.cs deleted file mode 100644 index cb75a1912fc6..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread08.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -struct Gen -{ - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - Gen obj = new Gen(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread09.cs b/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread09.cs deleted file mode 100644 index be4ac8296ab0..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread09.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -struct Gen -{ - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - Gen obj = new Gen(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread10.cs b/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread10.cs deleted file mode 100644 index 1798e326de78..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread10.cs +++ /dev/null @@ -1,88 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - - -interface IGen -{ - void Target(); - T Dummy(T t); -} - -class Gen : IGen -{ - public T Dummy(T t) { return t; } - - public void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new Gen(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread11.cs b/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread11.cs deleted file mode 100644 index 1e5d7b5bbb3a..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread11.cs +++ /dev/null @@ -1,88 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - - -interface IGen -{ - void Target(); - T Dummy(T t); -} - -struct Gen : IGen -{ - public T Dummy(T t) { return t; } - - public void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new Gen(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread12.cs b/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread12.cs deleted file mode 100644 index 4b216991f3ca..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread12.cs +++ /dev/null @@ -1,88 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - - -interface IGen -{ - void Target(); - T Dummy(T t); -} - -class Gen : IGen -{ - public T Dummy(T t) { return t; } - - public virtual void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new Gen(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread13.cs b/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread13.cs deleted file mode 100644 index 8d58f151979f..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread13.cs +++ /dev/null @@ -1,201 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -interface IGen -{ - void Target(); - T Dummy(T t); -} - -class GenInt : IGen -{ - public int Dummy(int t) { return t; } - - public void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new GenInt(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenDouble : IGen -{ - public double Dummy(double t) { return t; } - - public void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new GenDouble(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenString : IGen -{ - public string Dummy(string t) { return t; } - - public void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new GenString(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenObject : IGen -{ - public object Dummy(object t) { return t; } - - public void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new GenObject(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenGuid : IGen -{ - public Guid Dummy(Guid t) { return t; } - - public void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new GenGuid(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread14.cs b/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread14.cs deleted file mode 100644 index 7369b2dbdea5..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread14.cs +++ /dev/null @@ -1,201 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -interface IGen -{ - void Target(); - T Dummy(T t); -} - -struct GenInt : IGen -{ - public int Dummy(int t) { return t; } - - public void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new GenInt(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -struct GenDouble : IGen -{ - public double Dummy(double t) { return t; } - - public void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new GenDouble(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -struct GenString : IGen -{ - public string Dummy(string t) { return t; } - - public void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new GenString(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -struct GenObject : IGen -{ - public object Dummy(object t) { return t; } - - public void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new GenObject(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -struct GenGuid : IGen -{ - public Guid Dummy(Guid t) { return t; } - - public void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new GenGuid(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread15.cs b/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread15.cs deleted file mode 100644 index 5ae8a67de349..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread15.cs +++ /dev/null @@ -1,201 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -interface IGen -{ - void Target(); - T Dummy(T t); -} - -class GenInt : IGen -{ - public int Dummy(int t) { return t; } - - public virtual void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new GenInt(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenDouble : IGen -{ - public double Dummy(double t) { return t; } - - public virtual void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new GenDouble(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenString : IGen -{ - public string Dummy(string t) { return t; } - - public virtual void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new GenString(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenObject : IGen -{ - public object Dummy(object t) { return t; } - - public virtual void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new GenObject(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenGuid : IGen -{ - public Guid Dummy(Guid t) { return t; } - - public virtual void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new GenGuid(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result &= exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread16.cs b/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread16.cs deleted file mode 100644 index c798fe727ef7..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread16.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -interface IGen -{ - void Target(); -} - -class Gen : IGen -{ - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new Gen(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread17.cs b/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread17.cs deleted file mode 100644 index b9852de9e8c6..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread17.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -interface IGen -{ - void Target(); -} - -struct Gen : IGen -{ - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new Gen(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread18.cs b/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread18.cs deleted file mode 100644 index 7eabb433a459..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread18.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -interface IGen -{ - void Target(); -} - -class Gen : IGen -{ - public virtual void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new Gen(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread19.cs b/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread19.cs deleted file mode 100644 index e302bf0e57d3..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread19.cs +++ /dev/null @@ -1,83 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - - -interface IGen -{ - void Target(); - T Dummy(T t); -} - -class Gen : IGen -{ - public T Dummy(T t) {return t;} - - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new Gen(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread20.cs b/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread20.cs deleted file mode 100644 index d862f325819b..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread20.cs +++ /dev/null @@ -1,83 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - - -interface IGen -{ - void Target(); - T Dummy(T t); -} - -struct Gen : IGen -{ - public T Dummy(T t) {return t;} - - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new Gen(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread21.cs b/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread21.cs deleted file mode 100644 index b75a7d399a64..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread21.cs +++ /dev/null @@ -1,83 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - - -interface IGen -{ - void Target(); - T Dummy(T t); -} - -class Gen : IGen -{ - public T Dummy(T t) {return t;} - - public virtual void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new Gen(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread22.cs b/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread22.cs deleted file mode 100644 index 4ca3606b6757..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread22.cs +++ /dev/null @@ -1,238 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -interface IGen -{ - void Target(); - T Dummy(T t); -} - - -class GenInt : IGen -{ - public int Dummy(int t) { return t; } - - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new GenInt(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenDouble : IGen -{ - public double Dummy(double t) { return t; } - - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new GenDouble(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenString : IGen -{ - public string Dummy(string t) { return t; } - - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new GenString(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenObject : IGen -{ - public object Dummy(object t) { return t; } - - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new GenObject(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenGuid : IGen -{ - public Guid Dummy(Guid t) { return t; } - - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new GenGuid(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread23.cs b/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread23.cs deleted file mode 100644 index d776b4b004d4..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread23.cs +++ /dev/null @@ -1,238 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -interface IGen -{ - void Target(); - T Dummy(T t); -} - - -struct GenInt : IGen -{ - public int Dummy(int t) { return t; } - - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new GenInt(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -struct GenDouble : IGen -{ - public double Dummy(double t) { return t; } - - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new GenDouble(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -struct GenString : IGen -{ - public string Dummy(string t) { return t; } - - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new GenString(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -struct GenObject : IGen -{ - public object Dummy(object t) { return t; } - - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new GenObject(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -struct GenGuid : IGen -{ - public Guid Dummy(Guid t) { return t; } - - public void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new GenGuid(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread24.cs b/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread24.cs deleted file mode 100644 index 86c6bd98cc68..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread24.cs +++ /dev/null @@ -1,238 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -interface IGen -{ - void Target(); - T Dummy(T t); -} - - -class GenInt : IGen -{ - public int Dummy(int t) { return t; } - - public virtual void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new GenInt(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenDouble : IGen -{ - public double Dummy(double t) { return t; } - - public virtual void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new GenDouble(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenString : IGen -{ - public string Dummy(string t) { return t; } - - public virtual void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new GenString(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenObject : IGen -{ - public object Dummy(object t) { return t; } - - public virtual void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new GenObject(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -class GenGuid : IGen -{ - public Guid Dummy(Guid t) { return t; } - - public virtual void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - IGen obj = new GenGuid(); - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(obj.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - GenInt.ThreadPoolTest(); - GenDouble.ThreadPoolTest(); - GenString.ThreadPoolTest(); - GenObject.ThreadPoolTest(); - GenGuid.ThreadPoolTest(); - - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread25.cs b/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread25.cs deleted file mode 100644 index b14e5df356bc..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread25.cs +++ /dev/null @@ -1,77 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public static void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(Gen.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads = 50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread26.cs b/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread26.cs deleted file mode 100644 index c3036a90b530..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread26.cs +++ /dev/null @@ -1,77 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -struct Gen -{ - public static void Target() - { - Interlocked.Increment(ref Test.Xcounter); - } - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(Gen.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads = 50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread27.cs b/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread27.cs deleted file mode 100644 index db223c445a4d..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread27.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public static void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(Gen.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread28.cs b/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread28.cs deleted file mode 100644 index 5d3959ea718c..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread28.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -struct Gen -{ - public static void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(Gen.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread29.cs b/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread29.cs deleted file mode 100644 index 07e2c557d37f..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread29.cs +++ /dev/null @@ -1,73 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -class Gen -{ - public static void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(Gen.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread30.cs b/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread30.cs deleted file mode 100644 index eba2dbfed9c6..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/generics/threadstart/thread30.cs +++ /dev/null @@ -1,73 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Threading; - -struct Gen -{ - public static void Target() - { - //dummy line to avoid warnings - Test.Eval(typeof(U)!=null); - Interlocked.Increment(ref Test.Xcounter); - } - public static void ThreadPoolTest() - { - Thread[] threads = new Thread[Test.nThreads]; - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i] = new Thread(new ThreadStart(Gen.Target)); - threads[i].Start(); - } - - for (int i = 0; i < Test.nThreads; i++) - { - threads[i].Join(); - } - - Test.Eval(Test.Xcounter==Test.nThreads); - Test.Xcounter = 0; - } -} - -public class Test -{ - public static int nThreads =50; - public static int counter = 0; - public static int Xcounter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - - } - - public static int Main() - { - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - Gen.ThreadPoolTest(); - - if (result) - { - Console.WriteLine("Test Passed"); - return 100; - } - else - { - Console.WriteLine("Test Failed"); - return 1; - } - } -} - - diff --git a/src/coreclr/tests/src/baseservices/threading/interlocked/ctorchk/ctorchk.cs b/src/coreclr/tests/src/baseservices/threading/interlocked/ctorchk/ctorchk.cs deleted file mode 100644 index 6163bd50fe40..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/interlocked/ctorchk/ctorchk.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Threading; -using System.Reflection; - -class TestMonitor -{ - public static int Main() - { - // This will look for any private constructor. - // There shouldn't be one in Whidbey. - ConstructorInfo[] m = typeof(Interlocked).GetConstructors( - BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public); - Console.WriteLine(m.Length); - - if(m.Length > 0) - { - Console.WriteLine("Test FAILED!"); - return 1; - } - else - { - Console.WriteLine("Test PASSED!"); - return 100; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/baseservices/threading/monitor/ctorchk/ctorchk.cs b/src/coreclr/tests/src/baseservices/threading/monitor/ctorchk/ctorchk.cs deleted file mode 100644 index f6e9674ff90e..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/monitor/ctorchk/ctorchk.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Threading; -using System.Reflection; - -class TestMonitor -{ - public static int Main() - { - // This will look for any private constructor. - // There shouldn't be one in Whidbey. - ConstructorInfo[] m = typeof(Monitor).GetConstructors( - BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public); - Console.WriteLine(m.Length); - - if(m.Length > 0) - { - Console.WriteLine("Test FAILED!"); - return 1; - } - else - { - Console.WriteLine("Test PASSED!"); - return 100; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/baseservices/threading/regressions/13662/simple.cs b/src/coreclr/tests/src/baseservices/threading/regressions/13662/simple.cs deleted file mode 100644 index 230c63951f2a..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/regressions/13662/simple.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Threading; - - -public class Test { - - public static int Main(){ - - int rValue = 100; - Timer[] tArray = new Timer[100]; - int val = 0; - while(val < 10){ - Interlocked.Increment(ref val); - Console.WriteLine("Loop {0}",val); - for(int i = 0;i - - Exe - - true - 1 - - - - - diff --git a/src/coreclr/tests/src/baseservices/threading/threadpool/ctorchk/ctorchk.cs b/src/coreclr/tests/src/baseservices/threading/threadpool/ctorchk/ctorchk.cs deleted file mode 100644 index 957fe734708c..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/threadpool/ctorchk/ctorchk.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Threading; -using System.Reflection; - -class TestMonitor -{ - public static int Main() - { - // This will look for any private constructor. - // There shouldn't be one in Whidbey. - ConstructorInfo[] m = typeof(ThreadPool).GetConstructors( - BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public ); - Console.WriteLine(m.Length); - - if(m.Length > 0) - { - Console.WriteLine("Test FAILED!"); - return 1; - } - else - { - Console.WriteLine("Test PASSED!"); - return 100; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/baseservices/threading/threadpool/unregister/regression_749068.csproj b/src/coreclr/tests/src/baseservices/threading/threadpool/unregister/regression_749068.csproj deleted file mode 100644 index f639a63d1e02..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/threadpool/unregister/regression_749068.csproj +++ /dev/null @@ -1,9 +0,0 @@ - - - Exe - 1 - - - - - diff --git a/src/coreclr/tests/src/baseservices/threading/waithandle/waitall/emptyarray.cs b/src/coreclr/tests/src/baseservices/threading/waithandle/waitall/emptyarray.cs deleted file mode 100644 index 47f6bdfa8574..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/waithandle/waitall/emptyarray.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Threading; -//Regression for DevDiv Bugs 1142 -class Duplicates -{ - static int Main() - { - int retCode = 99; - - WaitHandle[] waitHandles = {}; - - // Can't catch exception in v2.0. Should be fixed in Post-Orcas. VSWhidbey 543816 - try - { - Console.WriteLine("Before WaitAll"); - WaitHandle.WaitAll(waitHandles, 5000); - Console.WriteLine("After WaitAll"); - } - catch (ArgumentException) - { - retCode = 100; - } - catch (Exception ex) - { - Console.WriteLine("WaitAll threw unexpected Exception."); - Console.WriteLine("WaitAll: {0}", ex); - retCode = 98; - } - - if (retCode ==100) - Console.WriteLine("Test Passed"); - else - Console.WriteLine("Test Failed"); - - return retCode; - } -} diff --git a/src/coreclr/tests/src/baseservices/threading/waithandle/waitall/nullarray.cs b/src/coreclr/tests/src/baseservices/threading/waithandle/waitall/nullarray.cs deleted file mode 100644 index c29c9042de51..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/waithandle/waitall/nullarray.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Threading; -//Regression for DevDiv Bugs 1142 -class Duplicates -{ - static int Main() - { - int retCode = 99; - - // Console.WriteLine(Thread.CurrentThread.GetApartmentState()); - - // Not supported (https://github.com/dotnet/coreclr/issues/2999) - // AppDomain.CurrentDomain.UnhandledException += Unhandled; - - WaitHandle[] waitHandles = null; - - // Can't catch exception in v2.0. Should be fixed in Post-Orcas. VSWhidbey 543816 - try - { - Console.WriteLine("Before WaitAll"); - WaitHandle.WaitAll(waitHandles, 5000);//, false); - Console.WriteLine("After WaitAll"); - } - catch (ArgumentNullException) - { - retCode = 100; - } - catch (Exception ex) - { - Console.WriteLine("WaitAll threw unexpected Exception."); - Console.WriteLine("WaitAll: {0}", ex); - retCode = 98; - } - - if (retCode ==100) - Console.WriteLine("Test Passed"); - else - Console.WriteLine("Test Failed"); - - return retCode; - } - - // private static void Unhandled(object sender, UnhandledExceptionEventArgs args) - // { - // Exception e = (Exception) args.ExceptionObject; - // Console.WriteLine("Unhandled reports: {0}", e); - // } -} diff --git a/src/coreclr/tests/src/baseservices/threading/waithandle/waitall/nullarraymember.cs b/src/coreclr/tests/src/baseservices/threading/waithandle/waitall/nullarraymember.cs deleted file mode 100644 index 61b1e9e9f2b6..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/waithandle/waitall/nullarraymember.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Threading; - -class Duplicates -{ - static int Main() - { - int retCode = 99; - - WaitHandle[] waitHandles = { new Mutex(), new Mutex(), null, new Mutex() }; - - // Can't catch exception in v2.0. Should be fixed in Post-Orcas. VSWhidbey 543816 - try - { - Console.WriteLine("Before WaitAll"); - WaitHandle.WaitAll(waitHandles, 5000); - Console.WriteLine("After WaitAll"); - } - catch (ArgumentNullException) - { - retCode = 100; - } - catch (Exception ex) - { - Console.WriteLine("WaitAll threw unexpected Exception."); - Console.WriteLine("WaitAll: {0}", ex); - retCode = 98; - } - - if (retCode ==100) - Console.WriteLine("Test Passed"); - else - Console.WriteLine("Test Failed"); - - return retCode; - } -} diff --git a/src/coreclr/tests/src/baseservices/threading/waithandle/waitany/emptyarray.cs b/src/coreclr/tests/src/baseservices/threading/waithandle/waitany/emptyarray.cs deleted file mode 100644 index ef15894d79d7..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/waithandle/waitany/emptyarray.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Threading; -//Regression for DevDiv Bugs 1142 -class Duplicates -{ - static int Main() - { - int retCode = 99; - - WaitHandle[] waitHandles = {}; - - // Can't catch exception in v2.0. Should be fixed in Post-Orcas. VSWhidbey 543816 - try - { - Console.WriteLine("Before WaitAny"); - WaitHandle.WaitAny(waitHandles, 5000); - Console.WriteLine("After WaitAny"); - } - catch (ArgumentException) - { - retCode = 100; - } - catch (Exception ex) - { - Console.WriteLine("WaitAny threw unexpected Exception."); - Console.WriteLine("WaitAny: {0}", ex); - retCode = 98; - } - - if (retCode ==100) - Console.WriteLine("Test Passed"); - else - Console.WriteLine("Test Failed"); - - return retCode; - } -} diff --git a/src/coreclr/tests/src/baseservices/threading/waithandle/waitany/nullarray.cs b/src/coreclr/tests/src/baseservices/threading/waithandle/waitany/nullarray.cs deleted file mode 100644 index 7d4cb18d5a32..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/waithandle/waitany/nullarray.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Threading; -//Regression for DevDiv Bugs 1142 -class Duplicates -{ - static int Main() - { - int retCode = 99; - - WaitHandle[] waitHandles = null; - - // Can't catch exception in v2.0. Should be fixed in Post-Orcas. VSWhidbey 543816 - try - { - Console.WriteLine("Before WaitAny"); - WaitHandle.WaitAny(waitHandles, 5000); - Console.WriteLine("After WaitAny"); - } - catch (ArgumentNullException) - { - retCode = 100; - } - catch (Exception ex) - { - Console.WriteLine("WaitAny threw unexpected Exception."); - Console.WriteLine("WaitAny: {0}", ex); - retCode = 98; - } - - if (retCode ==100) - Console.WriteLine("Test Passed"); - else - Console.WriteLine("Test Failed"); - - return retCode; - } -} diff --git a/src/coreclr/tests/src/baseservices/threading/waithandle/waitany/nullarraymember.cs b/src/coreclr/tests/src/baseservices/threading/waithandle/waitany/nullarraymember.cs deleted file mode 100644 index 8b24b45942d4..000000000000 --- a/src/coreclr/tests/src/baseservices/threading/waithandle/waitany/nullarraymember.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Threading; - -class Duplicates -{ - static int Main() - { - int retCode = 99; - - WaitHandle[] waitHandles = { new Mutex(), new Mutex(), null, new Mutex() }; - - // Can't catch exception in v2.0. Should be fixed in Post-Orcas. VSWhidbey 543816 - try - { - Console.WriteLine("Before WaitAny"); - WaitHandle.WaitAny(waitHandles, 5000); - Console.WriteLine("After WaitAny"); - } - catch (ArgumentNullException) - { - retCode = 100; - } - catch (Exception ex) - { - Console.WriteLine("WaitAny threw unexpected Exception."); - Console.WriteLine("WaitAny: {0}", ex); - retCode = 98; - } - - if (retCode ==100) - Console.WriteLine("Test Passed"); - else - Console.WriteLine("Test Failed"); - - return retCode; - } -} diff --git a/src/coreclr/tests/src/baseservices/typeequivalence/contracts/Types.cs b/src/coreclr/tests/src/baseservices/typeequivalence/contracts/Types.cs deleted file mode 100644 index 6e29e7a43863..000000000000 --- a/src/coreclr/tests/src/baseservices/typeequivalence/contracts/Types.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Runtime.InteropServices; - -[assembly:ImportedFromTypeLib("TypeEquivalenceTest")] // Required to support embeddable types -[assembly:Guid("3B491C47-B176-4CF3-8748-F19E303F1714")] - -namespace TypeEquivalenceTypes -{ - [ComImport] - [Guid("F34D4DE8-B891-4D73-B177-C8F1139A9A67")] - public interface IEmptyType - { - } - - [ComImport] - [Guid("729E8A0A-ECAB-46F3-A151-EB494B92D40D")] - public interface IMethodTestType - { - /// - /// Multiply the input value by the implementation's scale - /// e.g. scale = 6, i = 3, result = 18 - /// - int ScaleInt(int i); - - /// - /// Duplicate the input string by the implementation's scale - /// e.g. scale = 3, s = "ab", result = "ababab" - /// - string ScaleString(string s); - } - - /// - /// Interface used for validating sparse embedded types - /// - [ComImport] - [Guid("8220DE7C-79FF-40C5-9075-0031514C6930")] - public interface ISparseType - { - int MultiplyBy1(int a); - int MultiplyBy2(int a); - int MultiplyBy3(int a); - int MultiplyBy4(int a); - int MultiplyBy5(int a); - int MultiplyBy6(int a); - int MultiplyBy7(int a); - int MultiplyBy8(int a); - int MultiplyBy9(int a); - int MultiplyBy10(int a); - int MultiplyBy11(int a); - int MultiplyBy12(int a); - int MultiplyBy13(int a); - int MultiplyBy14(int a); - int MultiplyBy15(int a); - int MultiplyBy16(int a); - int MultiplyBy17(int a); - int MultiplyBy18(int a); - int MultiplyBy19(int a); - int MultiplyBy20(int a); - } -} diff --git a/src/coreclr/tests/src/dirs.proj b/src/coreclr/tests/src/dirs.proj index 107e1f4cf295..253aea50cb91 100644 --- a/src/coreclr/tests/src/dirs.proj +++ b/src/coreclr/tests/src/dirs.proj @@ -2,25 +2,29 @@ + + $(RepoRoot)src\tests\ + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - + + - <_GroupStartsWith Include="JIT\Methodical\Boxing\callconv\_relinstance_il.ilproj"> + <_GroupStartsWith Include="$(TestRoot)JIT\Methodical\Boxing\callconv\_relinstance_il.ilproj"> 2 - <_GroupStartsWith Include="JIT\Regression\CLR-x86-JIT\V1-M12-Beta2\b35351\b35351.ilproj"> + <_GroupStartsWith Include="$(TestRoot)JIT\Regression\CLR-x86-JIT\V1-M12-Beta2\b35351\b35351.ilproj"> 3 @@ -53,39 +57,39 @@ 1 --> - <_GroupStartsWith Include="JIT\CodeGenBringUpTests\DblNeg_ro.csproj"> + <_GroupStartsWith Include="$(TestRoot)JIT\CodeGenBringUpTests\DblNeg_ro.csproj"> 2 - <_GroupStartsWith Include="JIT\Directed\shift\uint32_d.csproj"> + <_GroupStartsWith Include="$(TestRoot)JIT\Directed\shift\uint32_d.csproj"> 3 - <_GroupStartsWith Include="JIT\Methodical\AsgOp\r8\r8flat_cs_r.csproj"> + <_GroupStartsWith Include="$(TestRoot)JIT\Methodical\AsgOp\r8\r8flat_cs_r.csproj"> 4 - <_GroupStartsWith Include="JIT\Methodical\eh\finallyexec\tryCatchFinallyThrow_nonlocalexit4_ro.csproj"> + <_GroupStartsWith Include="$(TestRoot)JIT\Methodical\eh\finallyexec\tryCatchFinallyThrow_nonlocalexit4_ro.csproj"> 5 - <_GroupStartsWith Include="JIT\Regression\CLR-x86-JIT\V1-M09.5-PDC\b25701\b25701.ilproj"> + <_GroupStartsWith Include="$(TestRoot)JIT\Regression\CLR-x86-JIT\V1-M09.5-PDC\b25701\b25701.ilproj"> 6 - <_GroupStartsWith Include="JIT\Regression\JitBlue\GitHub_19171\GitHub_19171.csproj"> + <_GroupStartsWith Include="$(TestRoot)JIT\Regression\JitBlue\GitHub_19171\GitHub_19171.csproj"> 7 - <_GroupStartsWith Include="JIT\jit64\valuetypes\nullable\box-unbox\value\box-unbox-value030.csproj"> + <_GroupStartsWith Include="$(TestRoot)JIT\jit64\valuetypes\nullable\box-unbox\value\box-unbox-value030.csproj"> 8 - <_GroupStartsWith Include="Loader\classloader\TypeGeneratorTests\TypeGeneratorTest225\Generated225.ilproj"> + <_GroupStartsWith Include="$(TestRoot)Loader\classloader\TypeGeneratorTests\TypeGeneratorTest225\Generated225.ilproj"> 9 - <_GroupStartsWith Include="Loader\classloader\generics\VSD\Class2_ImplicitOverrideVirtualNewslot.csproj"> + <_GroupStartsWith Include="$(TestRoot)Loader\classloader\generics\VSD\Class2_ImplicitOverrideVirtualNewslot.csproj"> 10 diff --git a/src/coreclr/tests/src/hosting/coreclr/activation/sxshost/usercode.cs b/src/coreclr/tests/src/hosting/coreclr/activation/sxshost/usercode.cs deleted file mode 100644 index 58dd288e6f76..000000000000 --- a/src/coreclr/tests/src/hosting/coreclr/activation/sxshost/usercode.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Reflection; - -#if _NONENGLISHCULTURE_ -[assembly:AssemblyCultureAttribute("ja-jp")] -#endif - -[assembly: AssemblyVersion("5.6.7.8")] -public class EventSink -{ - static public int Click(int x, int y) - { - return (x+y); - } - - public int Click2(int x, int y) - { - return (x+y); - } - - - public static int Main() - { - return 100; - } -} - diff --git a/src/coreclr/tests/src/hosting/samples/hosting/usercode/usercode.cs b/src/coreclr/tests/src/hosting/samples/hosting/usercode/usercode.cs deleted file mode 100644 index 6fc4da2ebdfa..000000000000 --- a/src/coreclr/tests/src/hosting/samples/hosting/usercode/usercode.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Reflection; - -public class EventSink -{ - static public void Click(int x, int y) - { - Console.WriteLine("[User Event Handler] Event called with " + x + ":" + y); - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/hosting/stress/testset1/csgen.1.cs b/src/coreclr/tests/src/hosting/stress/testset1/csgen.1.cs deleted file mode 100644 index 309b6bc69ae9..000000000000 --- a/src/coreclr/tests/src/hosting/stress/testset1/csgen.1.cs +++ /dev/null @@ -1,462 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Runtime.InteropServices; - -#pragma warning disable 1717 -#pragma warning disable 0219 - -public enum TestEnum -{ - red = 1, - green = 2, - blue = 4, -} - -public class AA where TA: IComparable -{ - public TB m_agboGeneric1; - public static void Static1(Array param1, ref TB param2, ulong[,,] param3, ref - byte param4) - { - if (App.m_bFwd1) - goto label1; - label1: - while (App.m_bFwd1) - { - TestEnum[,] local1 = (new TestEnum[28u, 111u]); - long local2 = App.m_lFwd2; - if (App.m_bFwd1) - param3 = param3; - else - { - uint local3 = 51u; - TestEnum[,,][,][] local4 = (new TestEnum[116u, 1u, 102u][,][]); - do - { - throw new NullReferenceException(); - } - while(App.m_bFwd1); - param1 = param1; - local2 -= local2; - if (App.m_bFwd1) - try - { - Array[,][,][,,][][,][,][][] local5 = (new Array[83u, 103u] - [,][,,][][,][,][][]); - Array[,,] local6 = (new Array[30u, 6u, 41u]); - param3[34, 110, 27] = App.m_ulFwd3; - param1 = param1; - local6[80, 2, 50] = param1; - local1[63, 60] = TestEnum.red; - } - catch (NullReferenceException) - { - bool local7 = true; - if (local7) - continue; - } - else - if (App.m_bFwd1) - if (App.m_bFwd1) - local3 = local3; - else - local2 -= local2; - } - param2 = param2; - try - { - char[,,][,,,,,] local8 = (new char[35u, 100u, 38u][,,,,,]); - char[,] local9 = (new char[97u, 33u]); - ulong local10 = App.m_ulFwd3; - param4 = param4; - param3 = (new ulong[63u, 9u, 18u]); - if (App.m_bFwd1) - do - { - param4 = param4; - local9 = (new char[125u, 118u]); - try - { - while (App.m_bFwd1) - { - do - { - TestEnum local11 = 0; - BB[] local12 = new BB[]{new BB() }; - object[][] local13 = (new object[33u][]); - } - while(App.m_bFwd1); - continue; - } - try - { - BB[,,][,,][][] local14 = (new BB[76u, 111u, 60u][,,][][]); - } - finally - { - } - while (App.m_bFwd1) - { - } - } - catch (Exception) - { - } - if (App.m_bFwd1) - do - { - } - while(App.m_bFwd1); - } - while(App.m_bFwd1); - return; - } - catch (InvalidOperationException) - { - } - try - { - } - catch (Exception) - { - } - } - do - { - } - while(App.m_bFwd1); - ; - } - public static bool[,,,] Static2(bool[,][,,] param1, ref ulong[] param2, TA - param3, TB param4, TA param5, TB param6) - { - ulong local15 = App.m_ulFwd3; - param3 = param5; - local15 = local15; - for (App.m_byFwd4-=App.m_byFwd4; App.m_bFwd1; App.m_iFwd5++) - { - BB[][,,][,,,] local16 = new BB[][,,][,,,]{(new BB[115u, 22u, 97u][,,,]), - (new BB[71u, 101u, 72u][,,,]), (new BB[94u, 124u, 8u][,,,]) }; - TestEnum[,,,,] local17 = (new TestEnum[62u, 63u, 7u, 49u, 79u]); - for (App.m_fFwd6=50.0f; App.m_bFwd1; App.m_iFwd5*=121) - { - sbyte local18 = App.m_sbyFwd7; - ushort local19 = App.m_ushFwd8; - for (App.m_lFwd2=App.m_lFwd2; App.m_bFwd1; App.m_chFwd9-='\x09') - { - continue; - } - } - do - { - BB[,][][][,,][] local20 = (new BB[90u, 91u][][][,,][]); - for (App.m_iFwd5--; App.m_bFwd1; App.m_byFwd4++) - { - BB[,] local21 = (new BB[124u, 91u]); - long[,][,][][,] local22 = (new long[115u, 83u][,][][,]); - for (App.m_shFwd10=App.m_shFwd10; App.m_bFwd1; App.m_ushFwd8++) - { - char[][][,,] local23 = new char[][][,,]{ }; - TestEnum[,,][,][,,,][] local24 = (new TestEnum[29u, 90u, 44u][,][,,,][]); - object[][] local25 = new object[][]{(new object[92u]), new object[]{null, - null, null, null } }; - try - { - ulong local26 = App.m_ulFwd3; - while (App.m_bFwd1) - { - ushort[,] local27 = (new ushort[35u, 110u]); - long[,] local28 = (new long[73u, 43u]); - param4 = param4; - throw new IndexOutOfRangeException(); - } - if (App.m_bFwd1) - for (App.m_fFwd6+=7.0f; App.m_bFwd1; App.m_byFwd4++) - { - throw new DivideByZeroException(); - } - } - catch (DivideByZeroException) - { - do - { - try - { - local21[123, 75].m_axField1[73] = new Array[][,,,]{(new Array[102u, 56u - , 82u, 63u]) }; - } - finally - { - } - local22 = local22; - try - { - } - catch (DivideByZeroException) - { - } - try - { - } - catch (IndexOutOfRangeException) - { - } - } - while(App.m_bFwd1); - throw new NullReferenceException(); - } - while (App.m_bFwd1) - { - } - } - do - { - } - while(App.m_bFwd1); - do - { - } - while(App.m_bFwd1); - local15 = local15; - } - while (App.m_bFwd1) - { - } - while (App.m_bFwd1) - { - } - throw new InvalidOperationException(); - } - while(App.m_bFwd1); - } - param5 = param5; - return (new bool[38u, 121u, 77u, 3u]); - } - public static sbyte Static3(uint param1, ref short param2) - { - BB local29 = new BB(); - try - { - param1 -= 33u; - } - catch (NullReferenceException) - { - ulong[] local30 = (new ulong[122u]); - byte local31 = App.m_byFwd4; - for (App.m_lFwd2++; App.m_bFwd1; App.m_chFwd9-='\x6c') - { - TestEnum[,,][][] local32 = (new TestEnum[109u, 121u, 75u][][]); - ushort[,,,,][][][] local33 = (new ushort[44u, 28u, 97u, 45u, 88u][][][]); - throw new Exception(); - } - goto label2; - } - label2: - return App.m_sbyFwd7; - } - public static int Static4(TB param1, ref Array[][,,][,,] param2, ref TB param3 - , char param4) - { - ushort[,,][,][][] local34 = (new ushort[18u, 54u, 39u][,][][]); - short local35 = App.m_shFwd10; - return 80; - } -} - -public struct BB -{ - public Array[][][,,,] m_axField1; - public static void Static1(double[][,,] param1, ref bool param2, TestEnum - param3, ref float param4) - { - if (param2) - param2 = param2; - else - { - for (App.m_ushFwd8+=App.m_ushFwd8; param2; App.m_ushFwd8++) - { - sbyte[][] local36 = new sbyte[][]{(new sbyte[14u]) }; - ushort[,,] local37 = (new ushort[113u, 103u, 65u]); - String local38 = "108"; - param2 = param2; - } - while (param2) - { - while (param2) - { - ushort local39 = App.m_ushFwd8; - if (param2) - try - { - BB local40 = new BB(); - ushort local41 = App.m_ushFwd8; - local41 += local41; - do - { - for (App.m_byFwd4++; param2; App.m_lFwd2*=App.m_lFwd2) - { - ulong[,][][] local42 = (new ulong[60u, 24u][][]); - Array local43 = App.m_xFwd11; - try - { - Array[] local44 = (new Array[100u]); - int local45 = 17; - BB[][,][,][][,][] local46 = new BB[][,][,][][,][]{ }; - local43 = local43; - } - catch (Exception) - { - String[,,,,] local47 = (new String[91u, 102u, 91u, 75u, 88u]); - Array[,][] local48 = (new Array[125u, 114u][]); - object local49 = null; - for (App.m_chFwd9+='\x2b'; param2; App.m_chFwd9++) - { - param2 = true; - local39 += local39; - try - { - param2 = param2; - } - finally - { - } - } - while (param2) - { - } - } - local40 = new BB(); - while (param2) - { - } - while (param2) - { - } - } - try - { - } - catch (Exception) - { - } - return; - } - while(param2); - local40.m_axField1[10][53][56, 118, 114, 54] = App.m_xFwd11; - } - catch (InvalidOperationException) - { - } - else - throw new Exception(); - do - { - } - while(param2); - } - if (param2) - try - { - } - catch (Exception) - { - } - try - { - } - catch (Exception) - { - } - } - param3 = 0; - } - while (param2) - { - } - if (param2) - throw new DivideByZeroException(); - param4 /= param4; - ; - } -} - -public class App -{ - public static int Main() - { - try - { - AA.Static1( - App.m_xFwd11, - ref App.m_agboFwd12, - (new ulong[50u, 40u, 98u]), - ref App.m_byFwd4 ); - } - catch (Exception) - { - } - try - { - AA.Static2( - (new bool[72u, 126u][,,]), - ref App.m_aulFwd13, - App.m_gcFwd14, - App.m_agboFwd12, - App.m_gcFwd14, - App.m_agboFwd12 ); - } - catch (Exception) - { - } - try - { - AA.Static3( - 34u, - ref App.m_shFwd10 ); - } - catch (Exception) - { - } - try - { - AA.Static4( - App.m_agboFwd12, - ref App.m_axFwd15, - ref App.m_agboFwd12, - '\x50' ); - } - catch (Exception) - { - } - try - { - BB.Static1( - (new double[101u][,,]), - ref App.m_bFwd1, - TestEnum.red, - ref App.m_fFwd6 ); - } - catch (Exception) - { - } - return 100; - } - public static bool m_bFwd1; - public static long m_lFwd2; - public static ulong m_ulFwd3; - public static byte m_byFwd4; - public static int m_iFwd5; - public static float m_fFwd6; - public static sbyte m_sbyFwd7; - public static ushort m_ushFwd8; - public static char m_chFwd9; - public static short m_shFwd10; - public static Array m_xFwd11; - public static bool m_agboFwd12; - public static ulong[] m_aulFwd13; - public static char m_gcFwd14; - public static Array[][,,][,,] m_axFwd15; -} diff --git a/src/coreclr/tests/src/hosting/stress/testset1/simple1.cs b/src/coreclr/tests/src/hosting/stress/testset1/simple1.cs deleted file mode 100644 index cb182d1e714a..000000000000 --- a/src/coreclr/tests/src/hosting/stress/testset1/simple1.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; - -// Do a simple 5 dimensional Jagged array. - -class Simple_Array_Test -{ - public static int Main( String[] args ) - { - Console.WriteLine("Starting..."); - int SIZE = 10; - - //Create an array that is jagged. - // in last 2d, the array looks like: - // Int32 - // Int32 Int32 - // Int32 Int32 Int32 - // Int32 Int32 Int32 Int32 - // Int32 Int32 Int32 Int32 Int32 - // - - Int32 [][][][][] foo = new Int32[SIZE][][][][]; - int i,j,k,l,m; - Int64 sum=0; - - for(i=0;i 2) - { - Console.WriteLine("usage: LargeObjectAlloc runtest "); - return 1; - } - else if(args.Length == 2) - { - Threads = Int64.Parse(args[1]); - } - - Console.WriteLine("LargeObjectAlloc started with {0} threads. Control-C to exit", - Threads.ToString()); - - Thread myThread = null; - for(long i = 0; i < Threads; i++) - { - myThread = new Thread(new ThreadStart(DoWork)); - myThread.Name = i.ToString(); - myThread.Start(); - } - - Console.WriteLine("All threads started"); - myThread.Join(); - - Console.WriteLine("Test Passed"); - return 100; - } - - public static int Main(string[] args) - { - if (args.Length > 0 && args[0].Equals("RunTest", StringComparison.OrdinalIgnoreCase)) - { - return RunTest(args); - } - - return ProfilerTestRunner.Run(profileePath: System.Reflection.Assembly.GetExecutingAssembly().Location, - testName: "GCCallbacksBasic", - profilerClsid: GcBasicEventsProfilerGuid); - } - } -} diff --git a/src/coreclr/tests/src/profiler/native/CMakeLists.txt b/src/coreclr/tests/src/profiler/native/CMakeLists.txt deleted file mode 100644 index cd5182062c18..000000000000 --- a/src/coreclr/tests/src/profiler/native/CMakeLists.txt +++ /dev/null @@ -1,41 +0,0 @@ -cmake_minimum_required(VERSION 3.14.5) - -project(Profiler) - -set(GCBASIC_SOURCES gcbasicprofiler/gcbasicprofiler.cpp) -set(REJIT_SOURCES rejitprofiler/rejitprofiler.cpp rejitprofiler/ilrewriter.cpp rejitprofiler/sigparse.cpp) -set(EVENTPIPE_SOURCES eventpipeprofiler/eventpipeprofiler.cpp) -set(METADATAGETDISPENSER_SOURCES metadatagetdispenser/metadatagetdispenser.cpp) -set(GETAPPDOMAINSTATICADDRESS_SOURCES getappdomainstaticaddress/getappdomainstaticaddress.cpp) - -set(SOURCES ${GCBASIC_SOURCES} ${REJIT_SOURCES} ${EVENTPIPE_SOURCES} ${METADATAGETDISPENSER_SOURCES} ${GETAPPDOMAINSTATICADDRESS_SOURCES} profiler.def profiler.cpp classfactory.cpp dllmain.cpp guids.cpp) - -include_directories(../../../../src/pal/prebuilt/inc) - -if(NOT WIN32) - include_directories(../../../../src/pal/inc/rt ../../../../src/pal/inc ../../../../src/inc) - add_compile_options(-DPAL_STDCPP_COMPAT) - if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") - add_compile_options(-Wno-null-arithmetic) - else(CMAKE_CXX_COMPILER_ID MATCHES "Clang") - add_compile_options(-Wno-conversion-null -Wno-pointer-arith) - endif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") -endif(NOT WIN32) - -# add the executable -add_library(Profiler SHARED ${SOURCES}) - -if(WIN32) - set(DEPENDENCIES Advapi32.lib oleaut32.lib Ole32.lib) -else(WIN32) - set(DEPENDENCIES pthread dl) -endif(WIN32) - -target_link_libraries(Profiler PUBLIC ${DEPENDENCIES}) - -# add the install targets -install(TARGETS Profiler DESTINATION bin) - -if(WIN32) - install(FILES $ DESTINATION bin OPTIONAL) -endif(WIN32) diff --git a/src/coreclr/tests/src/profiler/native/dllmain.cpp b/src/coreclr/tests/src/profiler/native/dllmain.cpp deleted file mode 100644 index 310fbbf51860..000000000000 --- a/src/coreclr/tests/src/profiler/native/dllmain.cpp +++ /dev/null @@ -1,45 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -#include "classfactory.h" -#include - -// const IID IID_IUnknown = { 0x00000000, 0x0000, 0x0000, { 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 } }; - -// const IID IID_IClassFactory = { 0x00000001, 0x0000, 0x0000, { 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 } }; - -#if WIN32 -#define EXPORT -#else // WIN32 -#define EXPORT __attribute__ ((visibility ("default"))) -#endif // WIN32 - -EXPORT BOOL STDMETHODCALLTYPE DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) -{ - return TRUE; -} - -extern "C" EXPORT HRESULT STDMETHODCALLTYPE DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) -{ - printf("Profiler.dll!DllGetClassObject\n"); - fflush(stdout); - - if (ppv == nullptr) - { - return E_FAIL; - } - - auto factory = new ClassFactory(rclsid); - if (factory == nullptr) - { - return E_FAIL; - } - - return factory->QueryInterface(riid, ppv); -} - -extern "C" EXPORT HRESULT STDMETHODCALLTYPE DllCanUnloadNow() -{ - return S_OK; -} \ No newline at end of file diff --git a/src/coreclr/tests/src/profiler/native/eventpipeprofiler/eventpipeprofiler.cpp b/src/coreclr/tests/src/profiler/native/eventpipeprofiler/eventpipeprofiler.cpp deleted file mode 100644 index c4b7bb89aa9e..000000000000 --- a/src/coreclr/tests/src/profiler/native/eventpipeprofiler/eventpipeprofiler.cpp +++ /dev/null @@ -1,342 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -#include "eventpipeprofiler.h" - -GUID EventPipeProfiler::GetClsid() -{ - // {2726B5B4-3F88-462D-AEC0-4EFDC8D7B921} - GUID clsid = { 0x2726B5B4, 0x3F88, 0x462D,{ 0xAE, 0xC0, 0x4E, 0xFD, 0xC8, 0xD7, 0xB9, 0x21 } }; - return clsid; -} - -HRESULT EventPipeProfiler::Initialize(IUnknown* pICorProfilerInfoUnk) -{ - Profiler::Initialize(pICorProfilerInfoUnk); - - HRESULT hr = S_OK; - if (FAILED(hr = pCorProfilerInfo->QueryInterface(__uuidof(ICorProfilerInfo12), (void **)&_pCorProfilerInfo12))) - { - printf("FAIL: failed to QI for ICorProfilerInfo12.\n"); - _failures++; - return hr; - } - - // No event mask, just calling the EventPipe APIs. - if (FAILED(hr = _pCorProfilerInfo12->SetEventMask2(COR_PRF_MONITOR_JIT_COMPILATION | COR_PRF_MONITOR_CACHE_SEARCHES, 0))) - { - _failures++; - printf("FAIL: ICorProfilerInfo::SetEventMask2() failed hr=0x%x\n", hr); - return hr; - } - - if (FAILED(hr = _pCorProfilerInfo12->EventPipeCreateProvider(WCHAR("MySuperAwesomeEventPipeProvider"), &_provider))) - { - _failures++; - printf("FAIL: could not create EventPipe provider hr=0x%x\n", hr); - return hr; - } - - // Create a param descriptor for every type - COR_PRF_EVENTPIPE_PARAM_DESC allTypesParams[] = { - { COR_PRF_EVENTPIPE_BOOLEAN, 0, WCHAR("Boolean") }, - { COR_PRF_EVENTPIPE_CHAR, 0, WCHAR("Char") }, - { COR_PRF_EVENTPIPE_SBYTE, 0, WCHAR("SByte") }, - { COR_PRF_EVENTPIPE_BYTE, 0, WCHAR("Byte") }, - { COR_PRF_EVENTPIPE_INT16, 0, WCHAR("Int16") }, - { COR_PRF_EVENTPIPE_UINT16, 0, WCHAR("UInt16") }, - { COR_PRF_EVENTPIPE_INT32, 0, WCHAR("Int32") }, - { COR_PRF_EVENTPIPE_UINT32, 0, WCHAR("UInt32") }, - { COR_PRF_EVENTPIPE_INT64, 0, WCHAR("Int64") }, - { COR_PRF_EVENTPIPE_UINT64, 0, WCHAR("UInt64") }, - { COR_PRF_EVENTPIPE_SINGLE, 0, WCHAR("Single") }, - { COR_PRF_EVENTPIPE_DOUBLE, 0, WCHAR("Double") }, - { COR_PRF_EVENTPIPE_GUID, 0, WCHAR("Guid") }, - { COR_PRF_EVENTPIPE_STRING, 0, WCHAR("String") }, - { COR_PRF_EVENTPIPE_DATETIME, 0, WCHAR("DateTime") } - }; - - const size_t allTypesParamsCount = sizeof(allTypesParams) / sizeof(allTypesParams[0]); - hr = _pCorProfilerInfo12->EventPipeDefineEvent( - _provider, // Provider - WCHAR("AllTypesEvent"), // Name - 1, // ID - 0, // Keywords - 1, // Version - COR_PRF_EVENTPIPE_LOGALWAYS, // Level - 12, // opcode - true, // Needs stack - allTypesParamsCount, // size of params - allTypesParams, // Param descriptors - &_allTypesEvent // [OUT] event ID - ); - if (FAILED(hr)) - { - _failures++; - printf("FAIL: could not create EventPipe event with all types hr=0x%x\n", hr); - return hr; - } - - COR_PRF_EVENTPIPE_PARAM_DESC arrayTypeParams[] = { - { COR_PRF_EVENTPIPE_ARRAY, COR_PRF_EVENTPIPE_INT32, WCHAR("IntArray")}, - }; - const size_t arrayTypeParamsCount = sizeof(arrayTypeParams) / sizeof(arrayTypeParams[0]); - hr = _pCorProfilerInfo12->EventPipeDefineEvent( - _provider, // Provider - WCHAR("ArrayTypeEvent"), // Name - 3, // ID - 0, // Keywords - 1, // Version - COR_PRF_EVENTPIPE_LOGALWAYS, // Level - 0, // opcode - true, // Needs stack - arrayTypeParamsCount, // size of params - arrayTypeParams, // Param descriptors - &_arrayTypeEvent // [OUT] event ID - ); - if (FAILED(hr)) - { - _failures++; - printf("FAIL: could not create array type EventPipe event with hr=0x%x\n", hr); - return hr; - } - - // EVENTPIPE_EVENT _emptyEvent; - hr = _pCorProfilerInfo12->EventPipeDefineEvent( - _provider, // Provider - WCHAR("EmptyEvent"), // Name - 2032, // ID - 0, // Keywords - 1, // Version - COR_PRF_EVENTPIPE_INFORMATIONAL,// Level - 0, // opcode - false, // Needs stack - 0, // size of params - NULL, // Param descriptors - &_emptyEvent // [OUT] event ID - ); - if (FAILED(hr)) - { - _failures++; - printf("FAIL: could not create EventPipe event with no types hr=0x%x\n", hr); - return hr; - } - - COR_PRF_EVENTPIPE_PARAM_DESC simpleParams[] = { - { COR_PRF_EVENTPIPE_INT32, 0, WCHAR("Int32") } - }; - - const size_t simpleParamsCount = sizeof(simpleParams) / sizeof(simpleParams[0]); - // EVENTPIPE_EVENT _simpleEvent; - hr = _pCorProfilerInfo12->EventPipeDefineEvent( - _provider, // Provider - WCHAR("SimpleEvent"), // Name - 2, // ID - 0, // Keywords - 1, // Version - COR_PRF_EVENTPIPE_VERBOSE, // Level - 0, // opcode - true, // Needs stack - simpleParamsCount, // size of params - simpleParams, // Param descriptors - &_simpleEvent // [OUT] event ID - ); - if (FAILED(hr)) - { - _failures++; - printf("FAIL: could not create EventPipe event with simple types hr=0x%x\n", hr); - return hr; - } - - return S_OK; -} - -HRESULT EventPipeProfiler::Shutdown() -{ - Profiler::Shutdown(); - - if(_failures == 0) - { - printf("PROFILER TEST PASSES\n"); - } - else - { - // failures were printed earlier when _failures was incremented - printf("EventPipe profiler test failed, check log for more info.\n"); - } - fflush(stdout); - - return S_OK; -} - -HRESULT EventPipeProfiler::JITCompilationStarted(FunctionID functionId, BOOL fIsSafeToBlock) -{ - return FunctionSeen(functionId); -} - -HRESULT STDMETHODCALLTYPE EventPipeProfiler::JITCachedFunctionSearchFinished(FunctionID functionId, COR_PRF_JIT_CACHE result) -{ - if (result == COR_PRF_CACHED_FUNCTION_FOUND) - { - return FunctionSeen(functionId); - } - - return S_OK; -} - - -HRESULT EventPipeProfiler::FunctionSeen(FunctionID functionID) -{ - String functionName = GetFunctionIDName(functionID); - if (functionName == WCHAR("TriggerMethod")) - { - printf("TriggerMethod found! Sending event...\n"); - - COR_PRF_EVENT_DATA eventData[15]; - - // { COR_PRF_EVENTPIPE_BOOLEAN, WCHAR("Boolean") } - BOOL b = TRUE; - eventData[0].ptr = reinterpret_cast(&b); - eventData[0].size = sizeof(BOOL); - // { COR_PRF_EVENTPIPE_CHAR, WCHAR("Char") } - WCHAR ch = 'A'; - eventData[1].ptr = reinterpret_cast(&ch); - eventData[1].size = sizeof(WCHAR); - // { COR_PRF_EVENTPIPE_SBYTE, WCHAR("SByte") } - int8_t i8t = -124; - eventData[2].ptr = reinterpret_cast(&i8t); - eventData[2].size = sizeof(int8_t); - // { COR_PRF_EVENTPIPE_BYTE, WCHAR("Byte") } - uint8_t ui8t = 125; - eventData[3].ptr = reinterpret_cast(&ui8t); - eventData[3].size = sizeof(uint8_t); - // { COR_PRF_EVENTPIPE_INT16, WCHAR("Int16") } - int16_t i16t = -35; - eventData[4].ptr = reinterpret_cast(&i16t); - eventData[4].size = sizeof(int16_t); - // { COR_PRF_EVENTPIPE_UINT16, WCHAR("UInt16") } - uint16_t u16t = 98; - eventData[5].ptr = reinterpret_cast(&u16t); - eventData[5].size = sizeof(uint16_t); - // { COR_PRF_EVENTPIPE_INT32, WCHAR("Int32") } - int32_t i32t = -560; - eventData[6].ptr = reinterpret_cast(&i32t); - eventData[6].size = sizeof(int32_t); - // { COR_PRF_EVENTPIPE_UINT32, WCHAR("UInt32") } - uint32_t ui32t = 561; - eventData[7].ptr = reinterpret_cast(&ui32t); - eventData[7].size = sizeof(uint32_t); - // { COR_PRF_EVENTPIPE_INT64, WCHAR("Int64") } - int64_t i64t = 2147483648LL; - eventData[8].ptr = reinterpret_cast(&i64t); - eventData[8].size = sizeof(int64_t); - // { COR_PRF_EVENTPIPE_UINT64, WCHAR("UInt64") } - uint64_t ui64t = 2147483649ULL; - eventData[9].ptr = reinterpret_cast(&ui64t); - eventData[9].size = sizeof(uint64_t); - // { COR_PRF_EVENTPIPE_SINGLE, WCHAR("Single") } - float f = 3.0f; - eventData[10].ptr = reinterpret_cast(&f); - eventData[10].size = sizeof(float); - // { COR_PRF_EVENTPIPE_DOUBLE, WCHAR("Double") } - double d = 3.023; - eventData[11].ptr = reinterpret_cast(&d); - eventData[11].size = sizeof(double); - // { COR_PRF_EVENTPIPE_GUID, WCHAR("Guid") } - GUID guid = { 0x176FBED1,0xA55C,0x4796, { 0x98,0xCA,0xA9,0xDA,0x0E,0xF8,0x83,0xE7 }}; - eventData[12].ptr = reinterpret_cast(&guid); - eventData[12].size = sizeof(GUID); - // { COR_PRF_EVENTPIPE_STRING, WCHAR("String") } - LPCWCH str = WCHAR("Hello, this is a string!"); - eventData[13].ptr = reinterpret_cast(str); - eventData[13].size = static_cast(wcslen(str) + 1 /*include null char*/) * sizeof(WCHAR); - // { COR_PRF_EVENTPIPE_DATETIME, WCHAR("DateTime") } - // TraceEvent uses DateTime.FromFileTime() to parse - uint64_t dateTime = 132243707160000000ULL; - eventData[14].ptr = reinterpret_cast(&dateTime); - eventData[14].size = sizeof(uint64_t); - - HRESULT hr = _pCorProfilerInfo12->EventPipeWriteEvent( - _allTypesEvent, - sizeof(eventData)/sizeof(eventData[0]), - eventData, - NULL, - NULL); - if (FAILED(hr)) - { - printf("FAIL: EventPipeWriteEvent failed for AllTypesEvent with hr=0x%x\n", hr); - _failures++; - return hr; - } - - // Array types are not supported in the version of TraceEvent we consume in the - // tests, but we can at least make sure nothing asserts in the runtime. - // Once TraceEvent has a new version out with the array type support - // we can update and it will work. - // { COR_PRF_EVENTPIPE_FLAG_ARRAY_TYPE, COR_PRF_EVENTPIPE_INT32, WCHAR("IntArray")} - COR_PRF_EVENT_DATA arrayTypeEventData[1]; - constexpr INT32 arraySize = 2 + (100 * sizeof(INT32)); - BYTE dataSource[arraySize]; - size_t offset = 0; - WriteToBuffer(dataSource, arraySize, &offset, 100); - - for (int i = 0; i < 100; ++i) - { - WriteToBuffer(dataSource, arraySize, &offset, 100 - i); - } - - arrayTypeEventData[0].ptr = reinterpret_cast(&dataSource[0]); - arrayTypeEventData[0].size = arraySize; - hr = _pCorProfilerInfo12->EventPipeWriteEvent( - _arrayTypeEvent, - sizeof(arrayTypeEventData) / sizeof(arrayTypeEventData[0]), - arrayTypeEventData, - NULL, - NULL); - if (FAILED(hr)) - { - printf("FAIL: EventPipeWriteEvent failed for ArrayTypeEvent with hr=0x%x\n", hr); - _failures++; - return hr; - } - - for (int i= 0; i < 10; ++i) - { - hr = _pCorProfilerInfo12->EventPipeWriteEvent( - _emptyEvent, - NULL, - 0, - NULL, - NULL); - if (FAILED(hr)) - { - printf("FAIL: EventPipeWriteEvent failed for EmptyEvent with hr=0x%x\n", hr); - _failures++; - return hr; - } - } - - for (int32_t i32 = 0; i32 < 10000; ++i32) - { - COR_PRF_EVENT_DATA simpleEventData[1]; - simpleEventData[0].ptr = reinterpret_cast(&i32); - simpleEventData[0].size = sizeof(int32_t); - - hr = _pCorProfilerInfo12->EventPipeWriteEvent( - _simpleEvent, - sizeof(simpleEventData) / sizeof(simpleEventData[0]), - simpleEventData, - NULL, - NULL); - if (FAILED(hr)) - { - printf("FAIL: EventPipeWriteEvent failed for SimpleEvent with hr=0x%x\n", hr); - _failures++; - return hr; - } - } - } - - return S_OK; -} diff --git a/src/coreclr/tests/src/profiler/native/eventpipeprofiler/eventpipeprofiler.h b/src/coreclr/tests/src/profiler/native/eventpipeprofiler/eventpipeprofiler.h deleted file mode 100644 index 6a1ade6dc683..000000000000 --- a/src/coreclr/tests/src/profiler/native/eventpipeprofiler/eventpipeprofiler.h +++ /dev/null @@ -1,46 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -#pragma once - -#include "../profiler.h" - -class EventPipeProfiler : public Profiler -{ -public: - EventPipeProfiler() : Profiler(), - _failures(0), - _provider(0), - _allTypesEvent(0), - _arrayTypeEvent(0), - _emptyEvent(0), - _simpleEvent(0) - {} - - virtual GUID GetClsid(); - virtual HRESULT STDMETHODCALLTYPE Initialize(IUnknown* pICorProfilerInfoUnk); - virtual HRESULT STDMETHODCALLTYPE Shutdown(); - virtual HRESULT STDMETHODCALLTYPE JITCompilationStarted(FunctionID functionId, BOOL fIsSafeToBlock); - virtual HRESULT STDMETHODCALLTYPE JITCachedFunctionSearchFinished(FunctionID functionId, COR_PRF_JIT_CACHE result); - -private: - std::atomic _failures; - ICorProfilerInfo12 *_pCorProfilerInfo12; - EVENTPIPE_PROVIDER _provider; - EVENTPIPE_EVENT _allTypesEvent; - EVENTPIPE_EVENT _arrayTypeEvent; - EVENTPIPE_EVENT _emptyEvent; - EVENTPIPE_EVENT _simpleEvent; - - HRESULT FunctionSeen(FunctionID functionId); - - template - static void WriteToBuffer(BYTE *pBuffer, size_t bufferLength, size_t *pOffset, T value) - { - _ASSERTE(bufferLength >= (*pOffset + sizeof(T))); - - *(T*)(pBuffer + *pOffset) = value; - *pOffset += sizeof(T); - } -}; \ No newline at end of file diff --git a/src/coreclr/tests/src/profiler/native/guids.cpp b/src/coreclr/tests/src/profiler/native/guids.cpp deleted file mode 100644 index 690129fbf046..000000000000 --- a/src/coreclr/tests/src/profiler/native/guids.cpp +++ /dev/null @@ -1,52 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -#include -#include - -#ifndef EXTERN_C -#define EXTERN_C extern "C" -#endif//EXTERN_C - -#ifdef DEFINE_GUID -#undef DEFINE_GUID -#endif - -#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ - EXTERN_C const GUID name \ - = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } - -DEFINE_GUID(GUID_NULL, 0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00); -DEFINE_GUID(IID_IUnknown, 0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46); -DEFINE_GUID(IID_IClassFactory, 0x00000001, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46); - -DEFINE_GUID(IID_ICorProfilerCallback, 0x176FBED1,0xA55C,0x4796,0x98,0xCA,0xA9,0xDA,0x0E,0xF8,0x83,0xE7); -DEFINE_GUID(IID_ICorProfilerCallback2, 0x8A8CC829,0xCCF2,0x49fe,0xBB,0xAE,0x0F,0x02,0x22,0x28,0x07,0x1A); -DEFINE_GUID(IID_ICorProfilerCallback3, 0x4FD2ED52,0x7731,0x4b8d,0x94,0x69,0x03,0xD2,0xCC,0x30,0x86,0xC5); -DEFINE_GUID(IID_ICorProfilerCallback4, 0x7B63B2E3,0x107D,0x4d48,0xB2,0xF6,0xF6,0x1E,0x22,0x94,0x70,0xD2); -DEFINE_GUID(IID_ICorProfilerCallback5, 0x8DFBA405,0x8C9F,0x45F8,0xBF,0xFA,0x83,0xB1,0x4C,0xEF,0x78,0xB5); -DEFINE_GUID(IID_ICorProfilerCallback6, 0xFC13DF4B,0x4448,0x4F4F,0x95,0x0C,0xBA,0x8D,0x19,0xD0,0x0C,0x36); -DEFINE_GUID(IID_ICorProfilerCallback7, 0xF76A2DBA,0x1D52,0x4539,0x86,0x6C,0x2A,0xA5,0x18,0xF9,0xEF,0xC3); -DEFINE_GUID(IID_ICorProfilerCallback8, 0x5BED9B15,0xC079,0x4D47,0xBF,0xE2,0x21,0x5A,0x14,0x0C,0x07,0xE0); -DEFINE_GUID(IID_ICorProfilerCallback9,0x27583EC3,0xC8F5,0x482F,0x80,0x52,0x19,0x4B,0x8C,0xE4,0x70,0x5A); -DEFINE_GUID(IID_ICorProfilerInfo, 0x28B5557D,0x3F3F,0x48b4,0x90,0xB2,0x5F,0x9E,0xEA,0x2F,0x6C,0x48); -DEFINE_GUID(IID_ICorProfilerInfo2, 0xCC0935CD,0xA518,0x487d,0xB0,0xBB,0xA9,0x32,0x14,0xE6,0x54,0x78); -DEFINE_GUID(IID_ICorProfilerInfo3, 0xB555ED4F,0x452A,0x4E54,0x8B,0x39,0xB5,0x36,0x0B,0xAD,0x32,0xA0); -DEFINE_GUID(IID_ICorProfilerObjectEnum, 0x2C6269BD,0x2D13,0x4321,0xAE,0x12,0x66,0x86,0x36,0x5F,0xD6,0xAF); -DEFINE_GUID(IID_ICorProfilerFunctionEnum, 0xFF71301A,0xB994,0x429D,0xA1,0x0B,0xB3,0x45,0xA6,0x52,0x80,0xEF); -DEFINE_GUID(IID_ICorProfilerModuleEnum, 0xb0266d75,0x2081,0x4493,0xaf,0x7f,0x02,0x8b,0xa3,0x4d,0xb8,0x91); -DEFINE_GUID(IID_IMethodMalloc, 0xA0EFB28B,0x6EE2,0x4d7b,0xB9,0x83,0xA7,0x5E,0xF7,0xBE,0xED,0xB8); -DEFINE_GUID(IID_ICorProfilerFunctionControl, 0xF0963021,0xE1EA,0x4732,0x85,0x81,0xE0,0x1B,0x0B,0xD3,0xC0,0xC6); -DEFINE_GUID(IID_ICorProfilerInfo4, 0x0d8fdcaa,0x6257,0x47bf,0xb1,0xbf,0x94,0xda,0xc8,0x84,0x66,0xee); -DEFINE_GUID(IID_ICorProfilerInfo5, 0x07602928,0xCE38,0x4B83,0x81,0xE7,0x74,0xAD,0xAF,0x78,0x12,0x14); -DEFINE_GUID(IID_ICorProfilerInfo6, 0xF30A070D,0xBFFB,0x46A7,0xB1,0xD8,0x87,0x81,0xEF,0x7B,0x69,0x8A); -DEFINE_GUID(IID_ICorProfilerInfo7, 0x9AEECC0D,0x63E0,0x4187,0x8C,0x00,0xE3,0x12,0xF5,0x03,0xF6,0x63); -DEFINE_GUID(IID_ICorProfilerInfo8, 0xC5AC80A6,0x782E,0x4716,0x80,0x44,0x39,0x59,0x8C,0x60,0xCF,0xBF); -DEFINE_GUID(IID_ICorProfilerInfo9, 0X008170DB,0XF8CC,0X4796,0X9A,0X51,0XDC,0X8A,0XA0,0XB4,0X70,0x12); -DEFINE_GUID(IID_ICorProfilerInfo10,0X2F1B5152,0XC869,0X40C9,0XAA,0X5F,0X3A,0XBE,0X02,0X6B,0XD7,0X20); -DEFINE_GUID(IID_ICorProfilerInfo11,0x06398876,0x8987,0x4154,0xB6,0x21,0x40,0xA0,0x0D,0x6E,0x4D,0x04); -DEFINE_GUID(IID_ICorProfilerInfo12,0x27b24ccd,0x1cb1,0x47c5,0x96,0xee,0x98,0x19,0x0d,0xc3,0x09,0x59); -DEFINE_GUID(IID_ICorProfilerMethodEnum, 0xFCCEE788,0x0088,0x454B,0xA8,0x11,0xC9,0x9F,0x29,0x8D,0x19,0x42); -DEFINE_GUID(IID_ICorProfilerThreadEnum, 0x571194f7,0x25ed,0x419f,0xaa,0x8b,0x70,0x16,0xb3,0x15,0x97,0x01); -DEFINE_GUID(IID_ICorProfilerAssemblyReferenceProvider, 0x66A78C24,0x2EEF,0x4F65,0xB4,0x5F,0xDD,0x1D,0x80,0x38,0xBF,0x3C); \ No newline at end of file diff --git a/src/coreclr/tests/src/readytorun/coreroot_determinism/Program.cs b/src/coreclr/tests/src/readytorun/coreroot_determinism/Program.cs deleted file mode 100644 index 2492c145c6a7..000000000000 --- a/src/coreclr/tests/src/readytorun/coreroot_determinism/Program.cs +++ /dev/null @@ -1,118 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices; - -internal class Program -{ - public static int CompareDLLs(string folder1, string folder2) - { - int result = 100; - - string superIlcFolder1 = Directory.GetDirectories(folder1, "CPAOT*").First(); - string superIlcFolder2 = Directory.GetDirectories(folder2, "CPAOT*").First(); - - // Check for files that failed compilation with one of the seeds but not the other - HashSet uniqueFilenames = new HashSet(Directory.GetFiles(superIlcFolder1, "*.dll").Select(Path.GetFileName)); - uniqueFilenames.SymmetricExceptWith(Directory.GetFiles(superIlcFolder2, "*.dll").Select(Path.GetFileName)); - foreach (string uniqueFilename in uniqueFilenames) - { - Console.WriteLine($"{uniqueFilename} was found in only one of the output folders."); - result = 1; - } - - foreach (string filename in Directory.GetFiles(superIlcFolder1, "*.dll").Select(Path.GetFileName)) - { - if (uniqueFilenames.Contains(filename)) - continue; - - byte[] file1 = File.ReadAllBytes(Path.Combine(superIlcFolder1, Path.GetFileName(filename))); - byte[] file2 = File.ReadAllBytes(Path.Combine(superIlcFolder2, Path.GetFileName(filename))); - - if (file1.Length != file2.Length) - { - Console.WriteLine(filename); - Console.WriteLine($"Expected ReadyToRun'd files to be identical but they have different sizes ({file1.Length} and {file2.Length})"); - result = 1; - continue; - } - - int byteDifferentCount = 0; - for (int i = 0; i < file1.Length; ++i) - { - if (file1[i] != file2[i]) - { - ++byteDifferentCount; - } - } - - if (byteDifferentCount > 0) - { - result = 1; - Console.WriteLine($"Error: Found {byteDifferentCount} different bytes in {filename}"); - continue; - } - - Console.WriteLine($"Files of length {file1.Length} were identical."); - } - return result; - } - - public static string OSExeSuffix(string path) => (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? path + ".exe" : path); - - private static void PrepareCompilationInputFolder(string coreRootFolder, string compilationInputFolder) - { - if (Directory.Exists(compilationInputFolder)) - { - Directory.Delete(compilationInputFolder, true); - } - Directory.CreateDirectory(compilationInputFolder); - - CopyDeterminismTestAssembly(coreRootFolder, compilationInputFolder, "System.Private.CoreLib.dll"); - } - - private static void CopyDeterminismTestAssembly(string coreRootFolder, string compilationInputFolder, string fileName) - { - File.Copy(Path.Combine(coreRootFolder, fileName), Path.Combine(compilationInputFolder, fileName)); - } - - public static bool CompileWithSeed(int seed, string coreRootPath, string compilationInputFolder, string outDir) - { - string superIlcPath = Path.Combine(coreRootPath, "R2RTest", "R2RTest.dll"); - string coreRunPath = Path.Combine(coreRootPath, OSExeSuffix("corerun")); - - Console.WriteLine($"================================== Compiling with seed {seed} =================================="); - Environment.SetEnvironmentVariable("CoreRT_DeterminismSeed", seed.ToString()); - if (Directory.Exists(outDir)) - { - Directory.Delete(outDir, true); - } - Directory.CreateDirectory(outDir); - ProcessStartInfo processStartInfo = new ProcessStartInfo(coreRunPath, $"{superIlcPath} compile-directory -cr {coreRootPath} -in {compilationInputFolder} --nojit --noexe --large-bubble --release --nocleanup -out {outDir}"); - var process = Process.Start(processStartInfo); - process.WaitForExit(); - if (process.ExitCode != 0) - { - Console.WriteLine($"Compilation failed. {processStartInfo.FileName} {processStartInfo.Arguments} failed with exit code {process.ExitCode}"); - } - return 0 == process.ExitCode; - } - - public static int Main() - { - string coreRootPath = Environment.GetEnvironmentVariable("CORE_ROOT"); - string compilationInputFolder = "TestAssemblies"; - PrepareCompilationInputFolder(coreRootPath, compilationInputFolder); - if (!CompileWithSeed(1, coreRootPath, compilationInputFolder, "seed1")) - return 1; - if (!CompileWithSeed(2, coreRootPath, compilationInputFolder, "seed2")) - return 1; - return CompareDLLs("seed1", "seed2"); - } -} diff --git a/src/coreclr/tests/src/readytorun/crossboundarylayout/crossboundarytest/c1.cs b/src/coreclr/tests/src/readytorun/crossboundarylayout/crossboundarytest/c1.cs deleted file mode 100644 index 859a20aa5a68..000000000000 --- a/src/coreclr/tests/src/readytorun/crossboundarylayout/crossboundarytest/c1.cs +++ /dev/null @@ -1,378 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -namespace CrossBoundaryLayout -{ - public class A1BoringGeneric - { - public byte _aVal; - } - - public class B1_A : A - { - public byte _bVal; - } - - public class B1_A_byte : AGeneric - { - public byte _bVal; - } - - public class B1_A_D : AGeneric - { - public byte _bVal; - } - - public class B1_A_Generic : A - { - public T _bVal; - } - - public class B1_A_byte_Generic : AGeneric - { - public T _bVal; - } - - public class B1_A_D_Generic : AGeneric - { - public T _bVal; - } - - public class B1_ABoring_byte : ABoringGeneric - { - public byte _bVal; - } - - public class B1_ABoring_D : ABoringGeneric - { - public byte _bVal; - } - - public class B1_A1Boring_byte : A1BoringGeneric - { - public byte _bVal; - } - - public class B1_A1Boring_D : A1BoringGeneric - { - public byte _bVal; - } - - class C1_B_A : B1_A - { - public byte _cVal; - } - - class C1_B_A_byte : B1_A_byte - { - public byte _cVal; - } - - class C1_B_A_D : B1_A_D - { - public byte _cVal; - } - - class C1_B_A_Generic_byte : B1_A_Generic - { - public byte _cVal; - } - - class C1_B_A_Generic_D : B1_A_Generic - { - public byte _cVal; - } - - class C1_B_A_byte_Generic_byte : B1_A_byte_Generic - { - public byte _cVal; - } - - class C1_B_A_byte_Generic_D : B1_A_byte_Generic - { - public byte _cVal; - } - - class C1_B_A_D_Generic_byte : B1_A_D_Generic - { - public byte _cVal; - } - - class C1_B_A_D_Generic_D : B1_A_D_Generic - { - public byte _cVal; - } - - public class C1Test - { - public static int Test() - { - int failure = 0; - { - var a = (A)Activator.CreateInstance(typeof(A)); - a._aVal = 1; - if (1 != (byte)typeof(A).GetField("_aVal").GetValue(a)) - { - ATest.ReportTestFailure("C1 a_aVal", a, ref failure); - } - } - - { - var a2 = (AGeneric)Activator.CreateInstance(typeof(AGeneric)); - a2._aVal = 1; - if (1 != (byte)typeof(AGeneric).GetField("_aVal").GetValue(a2)) - { - ATest.ReportTestFailure("C1 a2_aVal", a2, ref failure); - } - } - - { - var a3 = (AGeneric)Activator.CreateInstance(typeof(AGeneric)); - a3._aVal._dVal = 1; - if (1 != ((ByteStruct)typeof(AGeneric).GetField("_aVal").GetValue(a3))._dVal) - { - ATest.ReportTestFailure("C1 a3_aVal", a3, ref failure); - } - } - - { - var a4 = (ABoringGeneric)Activator.CreateInstance(typeof(ABoringGeneric)); - a4._aVal = 1; - if (1 != (byte)typeof(ABoringGeneric).GetField("_aVal").GetValue(a4)) - { - ATest.ReportTestFailure("C1 a4_aVal", a4, ref failure); - } - } - - { - var a5 = (ABoringGeneric)Activator.CreateInstance(typeof(ABoringGeneric)); - a5._aVal = 1; - if (1 != (byte)typeof(ABoringGeneric).GetField("_aVal").GetValue(a5)) - { - ATest.ReportTestFailure("C1 a5_aVal", a5, ref failure); - } - } - - { - var a6 = (A1BoringGeneric)Activator.CreateInstance(typeof(A1BoringGeneric)); - a6._aVal = 1; - if (1 != (byte)typeof(A1BoringGeneric).GetField("_aVal").GetValue(a6)) - { - ATest.ReportTestFailure("C1 a6_aVal", a6, ref failure); - } - } - - { - var a7 = (A1BoringGeneric)Activator.CreateInstance(typeof(A1BoringGeneric)); - a7._aVal = 1; - if (1 != (byte)typeof(A1BoringGeneric).GetField("_aVal").GetValue(a7)) - { - ATest.ReportTestFailure("C1 a7_aVal", a7, ref failure); - } - } - - { - var b = (B1_A)Activator.CreateInstance(typeof(B1_A)); - b._bVal = 1; - if (1 != (byte)typeof(B1_A).GetField("_bVal").GetValue(b)) - { - ATest.ReportTestFailure("C1 b_bVal", b, ref failure); - } - } - - { - var b2 = (B1_A_byte)Activator.CreateInstance(typeof(B1_A_byte)); - b2._bVal = 1; - if (1 != (byte)typeof(B1_A_byte).GetField("_bVal").GetValue(b2)) - { - ATest.ReportTestFailure("C1 b2_bVal", b2, ref failure); - } - } - - { - var b3 = (B1_A_D)Activator.CreateInstance(typeof(B1_A_D)); - b3._bVal = 1; - if (1 != (byte)typeof(B1_A_D).GetField("_bVal").GetValue(b3)) - { - ATest.ReportTestFailure("C1 b3_bVal", b3, ref failure); - } - } - - { - var b4 = (B1_A_Generic)Activator.CreateInstance(typeof(B1_A_Generic)); - b4._bVal = 1; - if (1 != (byte)typeof(B1_A_Generic).GetField("_bVal").GetValue(b4)) - { - ATest.ReportTestFailure("C1 b4_bVal", b4, ref failure); - } - } - - { - var b5 = (B1_A_byte_Generic)Activator.CreateInstance(typeof(B1_A_byte_Generic)); - b5._bVal = 1; - if (1 != (byte)typeof(B1_A_byte_Generic).GetField("_bVal").GetValue(b5)) - { - ATest.ReportTestFailure("C1 b5_bVal", b5, ref failure); - } - } - - { - var b6 = (B1_A_D_Generic)Activator.CreateInstance(typeof(B1_A_D_Generic)); - b6._bVal = 1; - if (1 != (byte)typeof(B1_A_D_Generic).GetField("_bVal").GetValue(b6)) - { - ATest.ReportTestFailure("C1 b6_bVal", b6, ref failure); - } - } - - { - var b7 = (B1_A_Generic)Activator.CreateInstance(typeof(B1_A_Generic)); - b7._bVal._dVal = 1; - if (1 != ((ByteStruct)typeof(B1_A_Generic).GetField("_bVal").GetValue(b7))._dVal) - { - ATest.ReportTestFailure("C1 b7_bVal", b7, ref failure); - } - } - - { - var b8 = (B1_A_byte_Generic)Activator.CreateInstance(typeof(B1_A_byte_Generic)); - b8._bVal._dVal = 1; - if (1 != ((ByteStruct)typeof(B1_A_byte_Generic).GetField("_bVal").GetValue(b8))._dVal) - { - ATest.ReportTestFailure("C1 b8_bVal", b8, ref failure); - } - } - - { - var b9 = (B1_A_D_Generic)Activator.CreateInstance(typeof(B1_A_D_Generic)); - b9._bVal._dVal = 1; - if (1 != ((ByteStruct)typeof(B1_A_D_Generic).GetField("_bVal").GetValue(b9))._dVal) - { - ATest.ReportTestFailure("C1 b9_bVal", b9, ref failure); - } - } - - { - var b10 = (B1_ABoring_byte)Activator.CreateInstance(typeof(B1_ABoring_byte)); - b10._bVal = 1; - if (1 != (byte)typeof(B1_ABoring_byte).GetField("_bVal").GetValue(b10)) - { - ATest.ReportTestFailure("C1 b10_bVal", b10, ref failure); - } - } - - { - var b11 = (B1_ABoring_D)Activator.CreateInstance(typeof(B1_ABoring_D)); - b11._bVal = 1; - if (1 != (byte)typeof(B1_ABoring_D).GetField("_bVal").GetValue(b11)) - { - ATest.ReportTestFailure("C1 b11_bVal", b11, ref failure); - } - } - - { - var b12 = (B1_A1Boring_byte)Activator.CreateInstance(typeof(B1_A1Boring_byte)); - b12._bVal = 1; - if (1 != (byte)typeof(B1_A1Boring_byte).GetField("_bVal").GetValue(b12)) - { - ATest.ReportTestFailure("C1 b12_bVal", b12, ref failure); - } - } - - { - var b13 = (B1_A1Boring_D)Activator.CreateInstance(typeof(B1_A1Boring_D)); - b13._bVal = 1; - if (1 != (byte)typeof(B1_A1Boring_D).GetField("_bVal").GetValue(b13)) - { - ATest.ReportTestFailure("C1 b13_bVal", b13, ref failure); - } - } - - { - var c = (C1_B_A)Activator.CreateInstance(typeof(C1_B_A)); - c._cVal = 1; - if (1 != (byte)typeof(C1_B_A).GetField("_cVal").GetValue(c)) - { - ATest.ReportTestFailure("C1 c_bVal", c, ref failure); - } - } - - { - var c2 = (C1_B_A_byte)Activator.CreateInstance(typeof(C1_B_A_byte)); - c2._cVal = 1; - if (1 != (byte)typeof(C1_B_A_byte).GetField("_cVal").GetValue(c2)) - { - ATest.ReportTestFailure("C1 c2_bVal", c2, ref failure); - } - } - - { - var c3 = (C1_B_A_D)Activator.CreateInstance(typeof(C1_B_A_D)); - c3._cVal = 1; - if (1 != (byte)typeof(C1_B_A_D).GetField("_cVal").GetValue(c3)) - { - ATest.ReportTestFailure("C1 c3_bVal", c3, ref failure); - } - } - - { - var c4 = (C1_B_A_Generic_byte)Activator.CreateInstance(typeof(C1_B_A_Generic_byte)); - c4._cVal = 1; - if (1 != (byte)typeof(C1_B_A_Generic_byte).GetField("_cVal").GetValue(c4)) - { - ATest.ReportTestFailure("C1 c4_bVal", c4, ref failure); - } - } - - { - var c5 = (C1_B_A_byte_Generic_byte)Activator.CreateInstance(typeof(C1_B_A_byte_Generic_byte)); - c5._cVal = 1; - if (1 != (byte)typeof(C1_B_A_byte_Generic_byte).GetField("_cVal").GetValue(c5)) - { - ATest.ReportTestFailure("C1 c5_bVal", c5, ref failure); - } - } - - { - var c6 = (C1_B_A_D_Generic_byte)Activator.CreateInstance(typeof(C1_B_A_D_Generic_byte)); - c6._cVal = 1; - if (1 != (byte)typeof(C1_B_A_D_Generic_byte).GetField("_cVal").GetValue(c6)) - { - ATest.ReportTestFailure("C1 c6_bVal", c6, ref failure); - } - } - - { - var c7 = (C1_B_A_Generic_D)Activator.CreateInstance(typeof(C1_B_A_Generic_D)); - c7._cVal = 1; - if (1 != (byte)typeof(C1_B_A_Generic_D).GetField("_cVal").GetValue(c7)) - { - ATest.ReportTestFailure("C1 c7_bVal", c7, ref failure); - } - } - - { - var c8 = (C1_B_A_byte_Generic_D)Activator.CreateInstance(typeof(C1_B_A_byte_Generic_D)); - c8._cVal = 1; - if (1 != (byte)typeof(C1_B_A_byte_Generic_D).GetField("_cVal").GetValue(c8)) - { - ATest.ReportTestFailure("C1 c8_bVal", c8, ref failure); - } - } - - { - var c9 = (C1_B_A_D_Generic_D)Activator.CreateInstance(typeof(C1_B_A_D_Generic_D)); - c9._cVal = 1; - if (1 != (byte)typeof(C1_B_A_D_Generic_D).GetField("_cVal").GetValue(c9)) - { - ATest.ReportTestFailure("C1 c9_bVal", c9, ref failure); - } - } - - return failure; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/readytorun/crossboundarylayout/crossboundarytest/main.cs b/src/coreclr/tests/src/readytorun/crossboundarylayout/crossboundarytest/main.cs deleted file mode 100644 index 8b757a7bfa20..000000000000 --- a/src/coreclr/tests/src/readytorun/crossboundarylayout/crossboundarytest/main.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -namespace CrossBoundaryLayout -{ - class Program - { - public static int Main(string[] args) - { - int failure = ATest.Test(); - failure += BTest.Test(); - failure += CTest.Test(); - failure += C1Test.Test(); - - return 100 + failure; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/readytorun/crossboundarylayout/d/d.cs b/src/coreclr/tests/src/readytorun/crossboundarylayout/d/d.cs deleted file mode 100644 index 9d6b8bd8ab16..000000000000 --- a/src/coreclr/tests/src/readytorun/crossboundarylayout/d/d.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -namespace CrossBoundaryLayout -{ - public struct ByteStruct - { - public byte _dVal; - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/readytorun/crossgen2/Program.cs b/src/coreclr/tests/src/readytorun/crossgen2/Program.cs deleted file mode 100644 index c9b8e6c21386..000000000000 --- a/src/coreclr/tests/src/readytorun/crossgen2/Program.cs +++ /dev/null @@ -1,1335 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq.Expressions; -using System.Numerics; -using System.Reflection; -using System.Reflection.Metadata; -using System.Reflection.PortableExecutable; -using System.Runtime.InteropServices; -using System.Runtime.CompilerServices; -using System.Text; - -internal class ClassWithStatic -{ - public const int StaticValue = 0x666; - - [ThreadStatic] - public static int Static = StaticValue; -} - -internal class Program -{ - const int LineCountInitialValue = 0x12345678; - - [ThreadStatic] - private static string TextFileName; - - [ThreadStatic] - private static int LineCount = LineCountInitialValue; - - private static volatile List _passedTests; - - private static List _failedTests; - - private static bool NewString() - { - string s = new string('x', 10); - return s.Length == 10; - } - - private static bool WriteLine() - { - Console.WriteLine("Hello CoreRT R2R running on CoreCLR!"); - return true; - } - - private static bool IsInstanceOf() - { - object obj = TextFileName; - if (obj is string str) - { - Console.WriteLine($@"Object is string: {str}"); - return true; - } - else - { - Console.Error.WriteLine($@"Object is not a string: {obj}"); - return false; - } - } - - private static bool IsInstanceOfValueType() - { - object obj = LineCount; - if (obj is int i) - { - Console.WriteLine($@"Object {obj:X8} is int: {i:X8}"); - return true; - } - else - { - Console.Error.WriteLine($@"Object is not an int: {obj}"); - return false; - } - } - - private unsafe static bool CheckNonGCThreadLocalStatic() - { - fixed (int *lineCountPtr = &LineCount) - { - Console.WriteLine($@"LineCount: 0x{LineCount:X8}, @ = 0x{(ulong)lineCountPtr:X8}"); - } - fixed (int *staticPtr = &ClassWithStatic.Static) - { - Console.WriteLine($@"ClassWithStatic.Static: 0x{ClassWithStatic.Static:X8}, @ = 0x{(ulong)staticPtr:X8}"); - } - fixed (int *lineCountPtr = &LineCount) - { - Console.WriteLine($@"LineCount: 0x{LineCount:X8}, @ = 0x{(ulong)lineCountPtr:X8}"); - } - return LineCount == LineCountInitialValue && - ClassWithStatic.Static == ClassWithStatic.StaticValue; - } - - private static bool ChkCast() - { - object obj = TextFileName; - string objString = (string)obj; - Console.WriteLine($@"String: {objString}"); - return objString == TextFileName; - } - - private static bool ChkCastValueType() - { - object obj = LineCount; - int objInt = (int)obj; - Console.WriteLine($@"Int: {objInt:X8}"); - return objInt == LineCount; - } - - private static bool BoxUnbox() - { - bool success = true; - object intAsObject = LineCount; - int unboxedInt = (int)intAsObject; - if (unboxedInt == LineCount) - { - Console.WriteLine($@"unbox == box: original {LineCount}, boxed {intAsObject:X8}, unboxed {unboxedInt:X8}"); - } - else - { - Console.Error.WriteLine($@"unbox != box: original {LineCount}, boxed {intAsObject:X8}, unboxed {unboxedInt:X8}"); - success = false; - } - int? nullableInt = LineCount; - object nullableIntAsObject = nullableInt; - int? unboxedNullable = (int?)nullableIntAsObject; - if (unboxedNullable == nullableInt) - { - Console.WriteLine($@"unbox_nullable == box_nullable: original {nullableInt:X8}, boxed {nullableIntAsObject:X8}, unboxed {unboxedNullable:X8}"); - } - else - { - Console.Error.WriteLine($@"unbox_nullable != box_nullable: original {nullableInt:X8}, boxed {nullableIntAsObject:X8}, unboxed {unboxedNullable:X8}"); - success = false; - } - return success; - } - - [StructLayout(LayoutKind.Explicit)] - private struct ExplicitFieldOffsetStruct - { - [FieldOffset(0)] - public int Field00; - [FieldOffset(0x0f)] - public int Field15; - } - - private static ExplicitFieldOffsetStruct HelperCreateExplicitLayoutStruct() - { - ExplicitFieldOffsetStruct epl = new ExplicitFieldOffsetStruct(); - epl.Field00 = 40; - epl.Field15 = 15; - return epl; - } - - private static bool HelperCompare(ExplicitFieldOffsetStruct val, ExplicitFieldOffsetStruct val1) - { - bool match = true; - if (val.Field00 != val1.Field00) - { - match = false; - Console.WriteLine("ExplicitLayout: val.Field00 = {0}, val1.Field00 = {1}", val.Field00, val1.Field00); - } - if (val.Field15 != val1.Field15) - { - match = false; - Console.WriteLine("ExplicitLayout: val.Field15 = {0}, val1.Field15 = {1}", val.Field15, val1.Field15); - } - return match; - } - - private static bool HelperCompare(ExplicitFieldOffsetStruct? val, ExplicitFieldOffsetStruct val1) - { - return val == null ? false : HelperCompare(val.Value, val1); - } - - private static bool BoxUnboxToQ2(ExplicitFieldOffsetStruct? val) - { - return HelperCompare(val, HelperCreateExplicitLayoutStruct()); - } - - private static bool BoxUnboxToQ1(ValueType vt) - { - return BoxUnboxToQ2((ExplicitFieldOffsetStruct?)vt); - } - - private static bool BoxUnboxToQ(object o) - { - return BoxUnboxToQ1((ValueType)o); - } - - private static bool NullableWithExplicitLayoutTest() - { - ExplicitFieldOffsetStruct? s = HelperCreateExplicitLayoutStruct(); - return BoxUnboxToQ(s); - } - - private static char HelperCreateChar() - { - return 'c'; - } - - private static bool HelperCompare(char val, char val1) - { - if (val == val1) - { - return true; - } - Console.Error.WriteLine("val = {0} = 0x{1:x2}, val1 = {2} = 0x{3:x2}", val, (int)val, val1, (int)val1); - return false; - } - - private static bool BoxUnboxToNQ2(char c) - { - return HelperCompare(c, HelperCreateChar()); - } - - private static bool BoxUnboxToNQ1(ValueType vt) - { - Console.WriteLine("BoxUnboxToNQ1: {0}", vt); - return BoxUnboxToNQ2((char)vt); - } - - private static bool BoxUnboxToNQ(object o) - { - Console.WriteLine("BoxUnboxToNQ: {0}", o); - return BoxUnboxToNQ1((ValueType)o); - } - - private static bool CastClassWithCharTest() - { - char? s = HelperCreateChar(); - return BoxUnboxToNQ(s); - } - - private static bool TypeHandle() - { - Console.WriteLine(TextFileName.GetType().ToString()); - Console.WriteLine(LineCount.GetType().ToString()); - return true; - } - - private static bool RuntimeTypeHandle() - { - Console.WriteLine(typeof(string).ToString()); - return true; - } - - private static MethodInfo GetMethodInfo(Expression expr) - { - return ((MethodCallExpression)expr.Body).Method; - } - - private static bool RuntimeMethodHandle() - { - { - MethodInfo mi = GetMethodInfo>((object p1, int p2) => RuntimeMethodHandleMethods.StaticMethod(p1, p2)); - if (mi.Name != "StaticMethod") - { - Console.WriteLine($"Expected to find runtime method handle for StaticMethod but got {mi.Name}"); - return false; - } - } - - var testClass = new RuntimeMethodHandleMethods(); - { - MethodInfo mi = GetMethodInfo>((object p1, string p2) => testClass.InstanceMethod(p1, p2)); - if (mi.Name != "InstanceMethod") - { - Console.WriteLine($"Expected to find runtime method handle for InstanceMethod but got {mi.Name}"); - return false; - } - } - - - { - MethodInfo mi = GetMethodInfo>((string p1, object p2) => testClass.GenericMethod(p1, p2)); - if (mi.Name != "GenericMethod") - { - Console.WriteLine($"Expected to find runtime method handle for GenericMethod but got {mi.Name}"); - return false; - } - } - - { - MethodInfo mi = GetMethodInfo>((object p1, object p2) => GenericRuntimeMethodHandleMethods.StaticMethod(p1, p2)); - if (mi.Name != "StaticMethod") - { - Console.WriteLine($"Expected to find runtime method handle for StaticMethod but got {mi.Name}"); - return false; - } - } - - { - var genericTestClass = new GenericRuntimeMethodHandleMethods(); - MethodInfo mi = GetMethodInfo>((Program p1, string p2) => genericTestClass.InstanceMethod(p1, p2)); - if (mi.Name != "InstanceMethod") - { - Console.WriteLine($"Expected to find runtime method handle for InstanceMethod but got {mi.Name}"); - return false; - } - } - - { - var genericTestClass = new GenericRuntimeMethodHandleMethods(); - MethodInfo mi = GetMethodInfo>((string p1, string p2) => genericTestClass.GenericMethod(p1, p2)); - if (mi.Name != "GenericMethod") - { - Console.WriteLine($"Expected to find runtime method handle for GenericMethod but got {mi.Name}"); - return false; - } - } - return true; - } - - class RuntimeMethodHandleMethods - { - public static object StaticMethod(object p1, int p2) - { - return new object(); - } - - public object InstanceMethod(object p1, string p2) - { - return p2; - } - - public object GenericMethod(T p1, object p2) - { - return p2; - } - } - - class GenericRuntimeMethodHandleMethods - { - public static object StaticMethod(T p1, object p2) - { - return p2; - } - - public object InstanceMethod(T p1, string p2) - { - return p2; - } - - public object GenericMethod(T p1, U p2) - { - return p2; - } - } - - private static bool ReadAllText() - { - Console.WriteLine($@"Dumping file: {TextFileName}"); - string textFile = File.ReadAllText(TextFileName); - if (textFile.Length > 100) - { - textFile = textFile.Substring(0, 100) + "..."; - } - Console.WriteLine(textFile); - - return textFile.Length > 0; - } - - private static bool StreamReaderReadLine() - { - Console.WriteLine($@"Dumping file: {TextFileName}"); - using (StreamReader reader = new StreamReader(TextFileName, System.Text.Encoding.UTF8)) - { - Console.WriteLine("StreamReader created ..."); - string line1 = reader.ReadLine(); - Console.WriteLine($@"Line 1: {line1}"); - string line2 = reader.ReadLine(); - Console.WriteLine($@"Line 2: {line2}"); - return line2 != null; - } - } - - private static bool ConstructListOfInt() - { - List listOfInt = new List(); - if (listOfInt.Count == 0) - { - Console.WriteLine("Successfully constructed empty List!"); - return true; - } - else - { - Console.WriteLine($@"Invalid element count in List: {listOfInt.Count}"); - return false; - } - } - - private static bool ManipulateListOfInt() - { - List listOfInt = new List(); - const int ItemCount = 100; - for (int index = ItemCount; index > 0; index--) - { - listOfInt.Add(index); - } - listOfInt.Sort(); - for (int index = 0; index < listOfInt.Count; index++) - { - Console.Write($@"{listOfInt[index]} "); - if (index > 0 && listOfInt[index] <= listOfInt[index - 1]) - { - // The list should be monotonically increasing now - return false; - } - } - Console.WriteLine(); - return listOfInt.Count == ItemCount; - } - - private static bool ConstructListOfString() - { - List listOfString = new List(); - return listOfString.Count == 0; - } - - private static bool ManipulateListOfString() - { - List listOfString = new List(); - const int ItemCount = 100; - for (int index = ItemCount; index > 0; index--) - { - listOfString.Add(index.ToString()); - } - listOfString.Sort(); - for (int index = 0; index < listOfString.Count; index++) - { - Console.Write($@"{listOfString[index]} "); - if (index > 0 && listOfString[index].CompareTo(listOfString[index - 1]) <= 0) - { - // The list should be monotonically increasing now - return false; - } - } - Console.WriteLine(); - return listOfString.Count == ItemCount; - } - - private delegate char CharFilterDelegate(char inputChar); - - private static bool SimpleDelegateTest() - { - CharFilterDelegate filterDelegate = CharFilterUpperCase; - char lower = 'x'; - char upper = filterDelegate(lower); - Console.WriteLine($@"lower = '{lower}', upper = '{upper}'"); - return upper == Char.ToUpper(lower); - } - - private static bool CharFilterDelegateTest() - { - string transformedString = TransformStringUsingCharFilter(TextFileName, CharFilterUpperCase); - Console.WriteLine(transformedString); - return transformedString.Length == TextFileName.Length; - } - - private static string TransformStringUsingCharFilter(string inputString, CharFilterDelegate charFilter) - { - StringBuilder outputBuilder = new StringBuilder(inputString.Length); - foreach (char c in inputString) - { - char filteredChar = charFilter(c); - if (filteredChar != '\0') - { - outputBuilder.Append(filteredChar); - } - } - return outputBuilder.ToString(); - } - - private static char CharFilterUpperCase(char c) - { - return Char.ToUpperInvariant(c); - } - - static bool s_sampleActionFlag; - - private static bool ActionTest() - { - s_sampleActionFlag = false; - Action action = SampleAction; - action(); - return s_sampleActionFlag; - } - - private static void SampleAction() - { - Console.WriteLine("SampleAction() called!"); - s_sampleActionFlag = true; - } - - private static bool FuncCharCharTest() - { - Func charFunc = CharFilterUpperCase; - - StringBuilder builder = new StringBuilder(); - foreach (char c in TextFileName) - { - builder.Append(charFunc(c)); - } - - Console.WriteLine($@"Func string: {builder}"); - - return builder.ToString() == TextFileName.ToUpperInvariant(); - } - - class DisposeClass : IDisposable - { - public static bool DisposedFlag = false; - - public DisposeClass() - { - Console.WriteLine("DisposeClass created!"); - } - - public void Dispose() - { - Console.WriteLine("DisposeClass disposed!"); - DisposedFlag = true; - } - } - - struct DisposeStruct : IDisposable - { - public static bool DisposedFlag = false; - - public void Dispose() - { - Console.WriteLine("DisposeStruct disposed!"); - DisposedFlag = true; - } - } - - private static bool DisposeStructTest() - { - using (var disposeStruct = new DisposeStruct()) - { - Console.WriteLine($@"DisposeStruct test: {disposeStruct}"); - } - return DisposeStruct.DisposedFlag; - } - - private static bool DisposeClassTest() - { - using (var disposeClass = new DisposeClass()) - { - Console.WriteLine($@"DisposeClass test: {disposeClass}"); - } - return DisposeClass.DisposedFlag; - } - - private static bool DisposeEnumeratorTest() - { - List listOfString = new List(); - using (var enumerator = listOfString.GetEnumerator()) - { - Console.WriteLine($@"DisposeEnumeratorTest: {enumerator}"); - } - return true; - } - - private static bool DisposeEnumeratorTestWithConstrainedCall() - { - string thisAssembly = Assembly.GetExecutingAssembly().Location; - - using (var fs = new FileStream(thisAssembly, FileMode.Open, FileAccess.Read)) - { - using (var pereader = new PEReader(fs)) - { - var reader = pereader.GetMetadataReader(); - var methodDefinitionHandleCollection = reader.MethodDefinitions; - foreach (var methodDefinitionHandle in methodDefinitionHandleCollection) - { - break; - } - } - } - return true; - } - - private static bool EmptyArrayOfInt() - { - int[] emptyIntArray = Array.Empty(); - Console.WriteLine("Successfully constructed Array.Empty!"); - return emptyIntArray.Length == 0; - } - - private static bool EnumerateEmptyArrayOfInt() - { - foreach (int element in Array.Empty()) - { - Console.Error.WriteLine($@"Error: Array.Empty has an element: {element}"); - return false; - } - Console.WriteLine("Array.Empty enumeration passed"); - return true; - } - - private static bool EmptyArrayOfString() - { - string[] emptyStringArray = Array.Empty(); - Console.WriteLine("Successfully constructed Array.Empty!"); - return emptyStringArray.Length == 0; - } - - private static bool EnumerateEmptyArrayOfString() - { - foreach (string element in Array.Empty()) - { - Console.Error.WriteLine($@"Error: Array.Empty has an element: {element}"); - return false; - } - Console.WriteLine("Array.Empty enumeration passed"); - return true; - } - - private static bool CreateLocalClassInstance() - { - var testClass = new TestClass(1234); - Console.WriteLine("Successfully constructed TestClass"); - return testClass.A == 1234; - } - - private class TestClass - { - private int _a; - - public TestClass(int a) - { - _a = a; - } - - public int A => _a; - } - - private static bool TryCatch() - { - try - { - throw new Exception("Test exception!"); - } - catch (Exception ex) - { - Console.WriteLine($@"Expected exception: {ex.ToString()}"); - return true; - } - } - - private class GenException : Exception {} - - private static bool GenericTryCatch() - { - Exception thrown = new GenException(); - try - { - throw thrown; - } - catch (GenException) - { - return true; - } - catch (Exception ex) - { - Console.WriteLine("Caught {0} (expected {1})", ex.GetType(), thrown.GetType()); - return false; - } - } - - private class RefX1 {} - private class RefX2 {} - private struct ValX1 {} - private struct ValX2 {} - private struct ValX3{} - - private static bool GenericTryCatchTest() - { - bool success = true; - success = GenericTryCatch() && success; - success = GenericTryCatch() && success; - success = GenericTryCatch() && success; - success = GenericTryCatch() && success; - - success = GenericTryCatch() && success; - success = GenericTryCatch() && success; - success = GenericTryCatch() && success; - success = GenericTryCatch() && success; - success = GenericTryCatch() && success; - - success = GenericTryCatch[]>() && success; - success = GenericTryCatch[,]>() && success; - success = GenericTryCatch[][][]>() && success; - success = GenericTryCatch[,,,]>() && success; - success = GenericTryCatch[][,,,][]>() && success; - success = GenericTryCatch[]>() && success; - success = GenericTryCatch[,]>() && success; - success = GenericTryCatch[][][]>() && success; - success = GenericTryCatch[,,,]>() && success; - success = GenericTryCatch[][,,,][]>() && success; - success = GenericTryCatch[]>() && success; - success = GenericTryCatch[,]>() && success; - success = GenericTryCatch[][][]>() && success; - success = GenericTryCatch[,,,]>() && success; - success = GenericTryCatch[][,,,][]>() && success; - - success = GenericTryCatch[]>() && success; - success = GenericTryCatch[,]>() && success; - success = GenericTryCatch[][][]>() && success; - success = GenericTryCatch[,,,]>() && success; - success = GenericTryCatch[][,,,][]>() && success; - - success = GenericTryCatch>() && success; - success = GenericTryCatch>>() && success; - success = GenericTryCatch>() && success; - success = GenericTryCatch>() && success; - - success = GenericTryCatch>>() && success; - success = GenericTryCatch>>>() && success; - success = GenericTryCatch>>>>() && success; - - success = GenericTryCatch>>() && success; - success = GenericTryCatch,ValX3>>>,ValX2,ValX3>>>>>() && success; - success = GenericTryCatch,ValX2,ValX3>>(); - - return success; - } - - private static bool FileStreamNullRefTryCatch() - { - try - { - FileStream fileStream = new FileStream(null, FileMode.Open, FileAccess.Read); - Console.Error.WriteLine("Why haven't we thrown an exception?"); - return false; - } - catch (Exception ex) - { - Console.WriteLine($@"Expected exception: {ex.ToString()}"); - return true; - } - } - - class InstanceMethodCaller where T : IComparable - { - public static int Compare(T t, object o) - { - if ((o is Int32 && 123.CompareTo(o) == 0) || - (o is string && "hello".CompareTo(o) == 0)) - { - return -42; - } - - return t.CompareTo(o); - } - } - - private static bool InstanceMethodTest() - { - int intResult = InstanceMethodCaller.Compare(122, 123); - const int ExpectedIntResult = -42; - Console.WriteLine("Int result: {0}, expected: {1}", intResult, ExpectedIntResult); - - int stringResult = InstanceMethodCaller.Compare("hello", "world"); - const int ExpectedStringResult = -1; - Console.WriteLine("String result: {0}, expected: {1}", stringResult, ExpectedStringResult); - - return intResult == ExpectedIntResult && stringResult == ExpectedStringResult; - } - - private static string GetTypeName() - { - return typeof(T).ToString(); - } - - private static bool CompareArgName(string actual, string expected) - { - if (actual == expected) - { - Console.WriteLine("Arg type match: {0}", actual); - return true; - } - else - { - Console.WriteLine("Arg type mismatch: actual = {0}, expected = {1}", actual, expected); - return false; - } - } - - class GenericLookup - { - public static bool CheckStaticTypeArg(string typeArgName) - { - return CompareArgName(GetTypeName(), typeArgName); - } - - public bool CheckInstanceTypeArg(string typeArgName) - { - return CompareArgName(GetTypeName(), typeArgName); - } - - public static bool CheckStaticTypeArg(string tName, string uName) - { - return CompareArgName(GetTypeName(), tName) && CompareArgName(GetTypeName(), uName); - } - - public bool CheckInstanceTypeArg(string tName, string uName) - { - return CompareArgName(GetTypeName(), tName) && CompareArgName(GetTypeName(), uName); - } - } - - struct GenericStruct - { - public T FieldOfT; - - public GenericStruct(T fieldOfT) - { - FieldOfT = fieldOfT; - } - } - - class GenericClass - { - public T FieldOfT; - - public GenericClass(T fieldOfT) - { - FieldOfT = fieldOfT; - } - } - - private static bool ThisObjGenericLookupTest() - { - Console.WriteLine("ThisObjGenericLookup:"); - bool result = true; - result &= (new GenericLookup()).CheckInstanceTypeArg("System.Object"); - result &= (new GenericLookup()).CheckInstanceTypeArg("System.String"); - result &= (new GenericLookup()).CheckInstanceTypeArg("System.Int32"); - result &= (new GenericLookup>()).CheckInstanceTypeArg("Program+GenericStruct`1[System.Object]"); - result &= (new GenericLookup>()).CheckInstanceTypeArg("Program+GenericStruct`1[System.String]"); - result &= (new GenericLookup>()).CheckInstanceTypeArg("Program+GenericStruct`1[System.Int32]"); - result &= (new GenericLookup>()).CheckInstanceTypeArg("Program+GenericClass`1[System.Object]"); - result &= (new GenericLookup>()).CheckInstanceTypeArg("Program+GenericClass`1[System.String]"); - result &= (new GenericLookup>()).CheckInstanceTypeArg("Program+GenericClass`1[System.Int32]"); - return result; - } - - private static bool ClassParamGenericLookupTest() - { - Console.WriteLine("ClassParamGenericLookup:"); - bool result = true; - result &= GenericLookup.CheckStaticTypeArg("System.Object"); - result &= GenericLookup.CheckStaticTypeArg("System.String"); - result &= GenericLookup.CheckStaticTypeArg("System.Int32"); - result &= GenericLookup>.CheckStaticTypeArg("Program+GenericStruct`1[System.Object]"); - result &= GenericLookup>.CheckStaticTypeArg("Program+GenericStruct`1[System.String]"); - result &= GenericLookup>.CheckStaticTypeArg("Program+GenericStruct`1[System.Int32]"); - result &= GenericLookup>.CheckStaticTypeArg("Program+GenericClass`1[System.Object]"); - result &= GenericLookup>.CheckStaticTypeArg("Program+GenericClass`1[System.String]"); - result &= GenericLookup>.CheckStaticTypeArg("Program+GenericClass`1[System.Int32]"); - return result; - } - - private static bool MethodParamGenericLookupTest() - { - Console.WriteLine("MethodParamGenericLookup:"); - bool result = true; - - result &= GenericLookup.CheckStaticTypeArg("System.Object", "System.Int32"); - result &= GenericLookup.CheckStaticTypeArg("System.String", "System.Object"); - result &= GenericLookup.CheckStaticTypeArg("System.Int32", "System.String"); - - result &= GenericLookup>.CheckStaticTypeArg>( - "Program+GenericStruct`1[System.Object]", "Program+GenericStruct`1[System.Int32]"); - result &= GenericLookup>.CheckStaticTypeArg>( - "Program+GenericStruct`1[System.String]", "Program+GenericStruct`1[System.Object]"); - result &= GenericLookup>.CheckStaticTypeArg>( - "Program+GenericStruct`1[System.Int32]", "Program+GenericStruct`1[System.String]"); - - result &= GenericLookup>.CheckStaticTypeArg>( - "Program+GenericClass`1[System.Object]", "Program+GenericClass`1[System.Int32]"); - result &= GenericLookup>.CheckStaticTypeArg>( - "Program+GenericClass`1[System.String]", "Program+GenericClass`1[System.Object]"); - result &= GenericLookup>.CheckStaticTypeArg>( - "Program+GenericClass`1[System.Int32]", "Program+GenericClass`1[System.String]"); - - result &= GenericLookup>.CheckStaticTypeArg>( - "Program+GenericClass`1[System.Object]", "Program+GenericStruct`1[System.Int32]"); - result &= GenericLookup>.CheckStaticTypeArg>( - "Program+GenericClass`1[System.String]", "Program+GenericStruct`1[System.Object]"); - result &= GenericLookup>.CheckStaticTypeArg>( - "Program+GenericClass`1[System.Int32]", "Program+GenericStruct`1[System.String]"); - - result &= GenericLookup>.CheckStaticTypeArg>( - "Program+GenericStruct`1[System.Object]", "Program+GenericClass`1[System.Int32]"); - result &= GenericLookup>.CheckStaticTypeArg>( - "Program+GenericStruct`1[System.String]", "Program+GenericClass`1[System.Object]"); - result &= GenericLookup>.CheckStaticTypeArg>( - "Program+GenericStruct`1[System.Int32]", "Program+GenericClass`1[System.String]"); - - result &= (new GenericLookup()).CheckInstanceTypeArg>( - "System.Object", "Program+GenericStruct`1[System.Int32]"); - result &= (new GenericLookup()).CheckInstanceTypeArg>( - "System.String", "Program+GenericStruct`1[System.Object]"); - result &= (new GenericLookup()).CheckInstanceTypeArg>( - "System.Int32", "Program+GenericStruct`1[System.String]"); - result &= (new GenericLookup>()).CheckInstanceTypeArg( - "Program+GenericStruct`1[System.Object]", "System.Int32"); - result &= (new GenericLookup>()).CheckInstanceTypeArg( - "Program+GenericStruct`1[System.String]", "System.Object"); - result &= (new GenericLookup>()).CheckInstanceTypeArg( - "Program+GenericStruct`1[System.Int32]", "System.String"); - - result &= (new GenericLookup()).CheckInstanceTypeArg>( - "System.Object", "Program+GenericClass`1[System.Int32]"); - result &= (new GenericLookup()).CheckInstanceTypeArg>( - "System.String", "Program+GenericClass`1[System.Object]"); - result &= (new GenericLookup()).CheckInstanceTypeArg>( - "System.Int32", "Program+GenericClass`1[System.String]"); - result &= (new GenericLookup>()).CheckInstanceTypeArg( - "Program+GenericClass`1[System.Object]", "System.Int32"); - result &= (new GenericLookup>()).CheckInstanceTypeArg( - "Program+GenericClass`1[System.String]", "System.Object"); - result &= (new GenericLookup>()).CheckInstanceTypeArg( - "Program+GenericClass`1[System.Int32]", "System.String"); - - return result; - } - - private static bool VectorTestOf(T value1, T value2, T sum) - where T : struct - { - Console.WriteLine("Constructing vector of {0}", value1); - Vector vector1 = new Vector(value1); - Console.WriteLine("Vector[0] = {0}", vector1[0]); - Vector vector2 = new Vector(value2); - Vector vectorSum = vector1 + vector2; - Console.WriteLine("Vector sum = {0}, {1} expected", vectorSum[0], sum); - return vectorSum[0].Equals(sum); - } - - private static bool VectorTest() - { - bool success = true; - success &= VectorTestOf(10, 20, 30); - success &= VectorTestOf(15.0f, 30.0f, 45.0f); - success &= VectorTestOf(50.0, 100.0, 150.0); - return success; - } - - private enum ByteEnum : byte - { - Value0, - Value1, - Value2, - Value3, - } - - private enum IntEnum : int - { - Value0, - Value1, - Value2, - Value3, - } - - private static bool EnumHashValueTest() - { - Console.WriteLine("ByteEnum.Value1.GetHashCode: ", ByteEnum.Value1.GetHashCode()); - Console.WriteLine("IntEnum.Value3.GetHashCode: ", IntEnum.Value3.GetHashCode()); - - ByteEnum[] byteEnumValues = { ByteEnum.Value3, ByteEnum.Value1, ByteEnum.Value0, ByteEnum.Value2, }; - foreach (ByteEnum enumValue in byteEnumValues) - { - Console.WriteLine("{0}.GetHashCode: {1}", enumValue, enumValue.GetHashCode()); - if (enumValue.GetHashCode() != (int)enumValue) - { - return false; - } - } - - IntEnum[] intEnumValues = { IntEnum.Value2, IntEnum.Value0, IntEnum.Value1, IntEnum.Value3, }; - foreach (IntEnum enumValue in intEnumValues) - { - Console.WriteLine("{0}.GetHashCode: {1}", enumValue, enumValue.GetHashCode()); - if (enumValue.GetHashCode() != (int)enumValue) - { - return false; - } - } - - return true; - } - - class MyGen - { - public static string GcValue; - public static int NonGcValue; - [ThreadStatic] - public static string TlsGcValue; - [ThreadStatic] - public static int TlsNonGcValue; - } - - private static void SetGenericGcStatic(string uValue, string vValue) - { - MyGen.GcValue = uValue; - MyGen.GcValue = vValue; - } - - private static void SetGenericNonGcStatic(int uValue, int vValue) - { - MyGen.NonGcValue = uValue; - MyGen.NonGcValue = vValue; - } - - private static void SetGenericTlsGcStatic(string uValue, string vValue) - { - MyGen.TlsGcValue = uValue; - MyGen.TlsGcValue = vValue; - } - - private static void SetGenericTlsNonGcStatic(int uValue, int vValue) - { - MyGen.TlsNonGcValue = uValue; - MyGen.TlsNonGcValue = vValue; - } - - private static bool SharedGenericGcStaticTest() - { - string objectValue = "Hello"; - string stringValue = "World"; - SetGenericGcStatic(objectValue, stringValue); - Console.WriteLine("Object GC value: {0}, expected {1}", MyGen.GcValue, objectValue); - Console.WriteLine("String GC value: {0}, expected {1}", MyGen.GcValue, stringValue); - return MyGen.GcValue == objectValue && MyGen.GcValue == stringValue; - } - - private static bool SharedGenericNonGcStaticTest() - { - int objectValue = 42; - int stringValue = 666; - SetGenericNonGcStatic(objectValue, stringValue); - Console.WriteLine("Object non-GC value: {0}, expected {1}", MyGen.NonGcValue, objectValue); - Console.WriteLine("String non-GC value: {0}, expected {1}", MyGen.NonGcValue, stringValue); - return MyGen.NonGcValue == objectValue && MyGen.NonGcValue == stringValue; - } - - private static bool SharedGenericTlsGcStaticTest() - { - string objectValue = "Cpaot"; - string stringValue = "Rules"; - SetGenericTlsGcStatic(objectValue, stringValue); - Console.WriteLine("Object TLS GC value: {0}, expected {1}", MyGen.TlsGcValue, objectValue); - Console.WriteLine("String TLS GC value: {0}, expected {1}", MyGen.TlsGcValue, stringValue); - return MyGen.TlsGcValue == objectValue && MyGen.TlsGcValue == stringValue; - } - - private static bool SharedGenericTlsNonGcStaticTest() - { - int objectValue = 1234; - int stringValue = 5678; - SetGenericTlsNonGcStatic(objectValue, stringValue); - Console.WriteLine("Object TLS non-GC value: {0}, expected {1}", MyGen.TlsNonGcValue, objectValue); - Console.WriteLine("String TLS non-GC value: {0}, expected {1}", MyGen.TlsNonGcValue, stringValue); - return MyGen.TlsNonGcValue == objectValue && MyGen.TlsNonGcValue == stringValue; - } - - static bool RVAFieldTest() - { - ReadOnlySpan value = new byte[] { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; - bool match = true; - for (byte i = 0; i < value.Length; i++) - { - if (value[i] != (byte)(9 - i)) - { - match = false; - Console.WriteLine( - "Mismatch at offset {0}: value[{0}] = {1}, should be {2}", - i, - value[i], - 9 - i); - } - } - return match; - } - - internal class ClassWithVirtual - { - public bool VirtualCalledFlag = false; - - public virtual void Virtual() - { - Console.WriteLine("Virtual called"); - VirtualCalledFlag = true; - } - } - - public class BaseClass - { - public virtual int MyGvm() - { - Console.WriteLine("MyGvm returning 100"); - return 100; - } - } - - // Test that ldvirtftn can load a virtual instance delegate method - public static bool VirtualDelegateLoadTest() - { - bool success = true; - - var classWithVirtual = new ClassWithVirtual(); - - Action virtualMethod = classWithVirtual.Virtual; - virtualMethod(); - - success &= classWithVirtual.VirtualCalledFlag; - - - var bc = new BaseClass(); - success &= (bc.MyGvm() == 100); - - return success; - } - - class ClassWithGVM - { - public virtual bool GVM(string expectedTypeName) - { - string typeName = GetTypeName(); - Console.WriteLine("GVM<{0}> called ({1} expected)", typeName, expectedTypeName); - return typeName == expectedTypeName; - } - } - - private static void GVMTestCase(Func gvm, string expectedTypeName, ref bool success) - { - if (!gvm(expectedTypeName)) - { - success = false; - } - } - - private static bool GVMTest() - { - ClassWithGVM gvmInstance = new ClassWithGVM(); - bool success = true; - GVMTestCase(gvmInstance.GVM, "System.Int32", ref success); - GVMTestCase(gvmInstance.GVM, "System.Object", ref success); - GVMTestCase(gvmInstance.GVM, "System.String", ref success); - return success; - } - - [MethodImpl(MethodImplOptions.NoInlining)] - private static object ObjectGetTypeOnGenericParamTestWorker(T t) - { - return t.GetType(); - } - - private static bool ObjectGetTypeOnGenericParamTest() - { - object returnedObject = ObjectGetTypeOnGenericParamTestWorker(42); - if (returnedObject == null) return false; - if (!(returnedObject is Type)) return false; - if (!Object.ReferenceEquals(returnedObject, typeof(int))) return false; - return true; - } - - [MethodImpl(MethodImplOptions.NoInlining)] - private static string ObjectToStringOnGenericParamTestWorker(ref T t) - { - return t.ToString(); - } - - struct LocallyDefinedStructWithToString - { - public object StoredValue; - public override string ToString() - { - StoredValue = new object(); - return "LocallyDefined"; - } - } - - private static bool ObjectToStringOnGenericParamTestSByte() - { - sbyte intVal = 42; - string returnedString = ObjectToStringOnGenericParamTestWorker(ref intVal); - if (returnedString != "42") return false; - return true; - } - - private static bool ObjectToStringOnGenericParamTestVersionBubbleLocalStruct() - { - LocallyDefinedStructWithToString versionBubbleLocalStruct = new LocallyDefinedStructWithToString(); - string returnedString = ObjectToStringOnGenericParamTestWorker(ref versionBubbleLocalStruct); - if (returnedString != "LocallyDefined") return false; - if (versionBubbleLocalStruct.StoredValue == null) return false; // ToString method should update struct in place. - - return true; - } - - enum TestEnum - { - A, - B - } - - private static bool EnumValuesToStringTest() - { - string buffer = ""; - foreach (TestEnum val in Enum.GetValues(typeof(TestEnum))) - { - buffer += val.ToString(); - } - - if (buffer != "AB") - return false; - - return true; - } - - private static string EmitTextFileForTesting() - { - string file = Path.GetTempFileName(); - File.WriteAllText(file, "Input for a test\nA small cog in the machine\nTurning endlessly\n"); - return file; - } - - public static int Main(string[] args) - { - _passedTests = new List(); - _failedTests = new List(); - - TextFileName = EmitTextFileForTesting(); - - RunTest("NewString", NewString()); - RunTest("WriteLine", WriteLine()); - RunTest("IsInstanceOf", IsInstanceOf()); - RunTest("IsInstanceOfValueType", IsInstanceOfValueType()); - RunTest("CheckNonGCThreadLocalStatic", CheckNonGCThreadLocalStatic()); - RunTest("ChkCast", ChkCast()); - RunTest("ChkCastValueType", ChkCastValueType()); - RunTest("BoxUnbox", BoxUnbox()); - RunTest("NullableWithExplicitLayoutTest", NullableWithExplicitLayoutTest()); - RunTest("CastClassWithCharTest", CastClassWithCharTest()); - RunTest("TypeHandle", TypeHandle()); - RunTest("RuntimeTypeHandle", RuntimeTypeHandle()); - RunTest("ReadAllText", ReadAllText()); - RunTest("StreamReaderReadLine", StreamReaderReadLine()); - RunTest("SimpleDelegateTest", SimpleDelegateTest()); - RunTest("CharFilterDelegateTest", CharFilterDelegateTest()); - RunTest("ActionTest", ActionTest()); - RunTest("FuncCharCharTest", FuncCharCharTest()); - RunTest("ConstructListOfInt", ConstructListOfInt()); - RunTest("ManipulateListOfInt", ManipulateListOfInt()); - RunTest("ConstructListOfString", ConstructListOfString()); - RunTest("ManipulateListOfString", ManipulateListOfString()); - RunTest("CreateLocalClassInstance", CreateLocalClassInstance()); - RunTest("DisposeStructTest", DisposeStructTest()); - RunTest("DisposeClassTest", DisposeClassTest()); - RunTest("DisposeEnumeratorTest", DisposeEnumeratorTest()); - RunTest("DisposeEnumeratorTestWithConstrainedCall", DisposeEnumeratorTestWithConstrainedCall()); - RunTest("EmptyArrayOfInt", EmptyArrayOfInt()); - RunTest("EnumerateEmptyArrayOfInt", EnumerateEmptyArrayOfInt()); - RunTest("EmptyArrayOfString", EmptyArrayOfString()); - RunTest("EnumerateEmptyArrayOfString", EnumerateEmptyArrayOfString()); - RunTest("TryCatch", TryCatch()); - RunTest("GenericTryCatchTest", GenericTryCatchTest()); - RunTest("FileStreamNullRefTryCatch", FileStreamNullRefTryCatch()); - RunTest("InstanceMethodTest", InstanceMethodTest()); - RunTest("ThisObjGenericLookupTest", ThisObjGenericLookupTest()); - RunTest("ClassParamGenericLookupTest", ClassParamGenericLookupTest()); - RunTest("MethodParamGenericLookupTest", MethodParamGenericLookupTest()); - RunTest("VectorTest", VectorTest()); - RunTest("EnumHashValueTest", EnumHashValueTest()); - RunTest("RVAFieldTest", RVAFieldTest()); - RunTest("SharedGenericGcStaticTest", SharedGenericGcStaticTest()); - RunTest("SharedGenericNonGcStaticTest", SharedGenericNonGcStaticTest()); - RunTest("SharedGenericTlsGcStaticTest", SharedGenericTlsGcStaticTest()); - RunTest("SharedGenericTlsNonGcStaticTest", SharedGenericTlsNonGcStaticTest()); - RunTest("VirtualDelegateLoadTest", VirtualDelegateLoadTest()); - RunTest("GVMTest", GVMTest()); - RunTest("RuntimeMethodHandle", RuntimeMethodHandle()); - RunTest("ObjectGetTypeOnGenericParamTest", ObjectGetTypeOnGenericParamTest()); - RunTest("ObjectToStringOnGenericParamTestSByte", ObjectToStringOnGenericParamTestSByte()); - RunTest("ObjectToStringOnGenericParamTestVersionBubbleLocalStruct", ObjectToStringOnGenericParamTestVersionBubbleLocalStruct()); - RunTest("EnumValuesToStringTest", EnumValuesToStringTest()); - - File.Delete(TextFileName); - - Console.WriteLine($@"{_passedTests.Count} tests pass:"); - foreach (string testName in _passedTests) - { - Console.WriteLine($@" {testName}"); - } - - if (_failedTests.Count == 0) - { - Console.WriteLine($@"All {_passedTests.Count} tests pass!"); - return 100; - } - else - { - Console.Error.WriteLine($@"{_failedTests.Count} test failed:"); - foreach (string testName in _failedTests) - { - Console.Error.WriteLine($@" {testName}"); - } - return 1; - } - } - - private static void RunTest(string name, bool result) - { - if (result) - { - _passedTests.Add(name); - } - else - { - _failedTests.Add(name); - } - } -} diff --git a/src/coreclr/tests/src/readytorun/crossgen2/crossgen2smoke.csproj b/src/coreclr/tests/src/readytorun/crossgen2/crossgen2smoke.csproj deleted file mode 100644 index ef9870bea941..000000000000 --- a/src/coreclr/tests/src/readytorun/crossgen2/crossgen2smoke.csproj +++ /dev/null @@ -1,30 +0,0 @@ - - - exe - BuildAndRun - true - 0 - - - true - - - .ildll - - - false - - - - - - - - - diff --git a/src/coreclr/tests/src/readytorun/determinism/Program.cs b/src/coreclr/tests/src/readytorun/determinism/Program.cs deleted file mode 100644 index 40d8bf6da204..000000000000 --- a/src/coreclr/tests/src/readytorun/determinism/Program.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.IO; - -internal class Program -{ - public static int Main() - { - byte[] file1 = File.ReadAllBytes("crossgen2smoke1.ildll"); - byte[] file2 = File.ReadAllBytes("crossgen2smoke2.ildll"); - if (file1.Length != file2.Length) - { - Console.WriteLine("Expected R2R'd files to be identical but they have different sizes."); - return 1; - } - - for (int i = 0; i < file1.Length; ++i) - { - if (file1[i] != file2[i]) - { - Console.WriteLine($"Difference at byte {i}"); - return 1; - } - } - - Console.WriteLine($"Files of length {file1.Length} were identical."); - return 100; - } -} diff --git a/src/coreclr/tests/src/readytorun/determinism/crossgen2determinism.csproj b/src/coreclr/tests/src/readytorun/determinism/crossgen2determinism.csproj deleted file mode 100644 index e4256dd7e19e..000000000000 --- a/src/coreclr/tests/src/readytorun/determinism/crossgen2determinism.csproj +++ /dev/null @@ -1,33 +0,0 @@ - - - exe - BuildAndRun - 0 - - true - - true - - false - 2.0 - - - - - - - - - diff --git a/src/coreclr/tests/src/readytorun/r2rdump/files/HelloWorld.cs b/src/coreclr/tests/src/readytorun/r2rdump/files/HelloWorld.cs deleted file mode 100644 index 17c7c02b6dcb..000000000000 --- a/src/coreclr/tests/src/readytorun/r2rdump/files/HelloWorld.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -namespace HelloWorld -{ - class HelloWorld - { - static void Main(string[] args) - { - Console.WriteLine("Hello World!"); - } - } -} diff --git a/src/coreclr/tests/src/readytorun/tests/generics.cs b/src/coreclr/tests/src/readytorun/tests/generics.cs deleted file mode 100644 index 53e5e7ae8515..000000000000 --- a/src/coreclr/tests/src/readytorun/tests/generics.cs +++ /dev/null @@ -1,3088 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Reflection; -using System.Collections.Generic; -using System.Globalization; -using System.Runtime.CompilerServices; -using System.Text; -using System.Threading; - -class Program -{ - static int Main() - { - // Run all tests 3x times to exercise both slow and fast paths work - for (int i = 0; i < 3; i++) - RunAllTests(); - - Console.WriteLine(Assert.HasAssertFired ? "FAILED" : "PASSED"); - return Assert.HasAssertFired ? 1 : 100; - } - - static void RunAllTests() - { - RunTest1(); - RunTest2(); - RunTest3(); - RunTest4(); - RunTest5(); - RunTest6(); - RunTest7(); - TestDictionaryDependencyTracking.Run(); - TestStaticBaseLookups.Run(); - TestInitThisClass.Run(); - TestDelegateFatFunctionPointers.Run(); - TestDelegateToCanonMethods.Run(); - TestVirtualMethodUseTracking.Run(); - TestSlotsInHierarchy.Run(); - TestDelegateVirtualMethod.Run(); - TestDelegateInterfaceMethod.Run(); - TestThreadStaticFieldAccess.Run(); - TestConstrainedMethodCalls.Run(); - TestInstantiatingUnboxingStubs.Run(); - TestNameManglingCollisionRegression.Run(); - TestSimpleGVMScenarios.Run(); - TestGvmDelegates.Run(); - TestGvmDependencies.Run(); - TestInterfaceVTableTracking.Run(); - TestClassVTableTracking.Run(); - TestReflectionInvoke.Run(); - TestFieldAccess.Run(); - TestDevirtualization.Run(); - TestGenericInlining.Run(); - TestNullableCasting.Run(); - TestVariantCasting.Run(); - TestMDArrayAddressMethod.Run(); - TestNativeLayoutGeneration.Run(); - TestByRefLikeVTables.Run(); - } - - static void RunTest1() - { - var originalCultureInfo = CultureInfo.CurrentCulture; - - try - { - CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; - - DateTime dt = new DateTime(1776, 7, 4); - string dtString = dt.ToString(); - Assert.AreEqual(new GenClass1c(dt).ToStringEx(7), dtString + " 7"); - Assert.AreEqual(new GenClass1c(1).ToStringEx(7), "1 7"); - Assert.AreEqual(new GenClass1c(2).ToStringEx(7), "2 7"); - Assert.AreEqual(new GenClass1c(3.14f).ToStringEx(7), "3.14 7"); - Assert.AreEqual(new GenClass1c(4.13).ToStringEx(7), "4.13 7"); - Assert.AreEqual(new GenClass1c(9).ToString(), "9"); - - Assert.AreEqual(new GenClass2(dt, 3.1416).ToString(), dtString + " 3.1416"); - Assert.AreEqual(new GenClass2(dt, 3.1416).ToStringEx(7, 8), dtString + " 3.1416 7 8"); - Assert.AreEqual(new GenClass2(new object(), "3.1416").ToString(), "System.Object 3.1416"); - Assert.AreEqual(new GenClass2(new object(), "3.1416").ToStringEx(7L, 8L), "System.Object 3.1416 7 8"); - Assert.AreEqual(GetString(7.0, 8.0), "7 8"); - - var gen1a = new GenClass1a(); - Assert.AreEqual(gen1a.CreateGenClass1b(), "GenClass1b`1[System.Object]"); - Assert.AreEqual(gen1a.CreateGenClass1bArray(), "GenClass1b`1[System.Object][]"); - - var gen1aInt = new GenClass1a(); - var gen1bInt = new GenClass1b(); - var gen1bLong = new GenClass1b(); - Assert.AreEqual(gen1bInt.IsGenClass1a(gen1aInt).ToString(), "True"); - Assert.AreEqual(gen1bLong.IsGenClass1a(gen1aInt).ToString(), "False"); - Assert.AreEqual(gen1bInt.AsGenClass1a(gen1aInt)?.ToString() ?? "null", gen1aInt.ToString()); - Assert.AreEqual(gen1bLong.AsGenClass1a(gen1aInt)?.ToString() ?? "null", "null"); - - var gen1aString = new GenClass1a(); - var gen1b = new GenClass1b(); - Assert.AreEqual(gen1b.IsGenClass1a(gen1aString).ToString(), "True"); - Assert.AreEqual(gen1b.AsGenClass1a(gen1aString)?.ToString() ?? "null", gen1aString.ToString()); - Assert.AreEqual(GenClass1a.CallVirtual(gen1b), "GenClass1b`1[System.String].VirtualMethod"); - Assert.AreEqual(GenClass1a.CallInterface(gen1b), "GenClass1b`1[System.String].InterfaceMethod1"); - Assert.AreEqual(GenClass1a.CallInterface(gen1b, "Test").ToString(), "GenClass1b`1[System.String]"); - - NormalClass n = new NormalClass(); - Assert.AreEqual(CallGenVirtMethod(n).ToString(), "GenClass1a`1[System.Int32]"); - Assert.AreEqual(CallGenVirtMethod(n, 42).ToString(), "System.Int32[]"); - Assert.AreEqual(CallGenVirtMethod(n).ToString(), "GenClass1a`1[System.String]"); - Assert.AreEqual(CallGenVirtMethod(n, "forty-two").ToString(), "System.String[]"); - } - finally - { - CultureInfo.CurrentCulture = originalCultureInfo; - } - } - - static void RunTest2() - { - var mi = new GenBase(); - var ol = new GenBase(); - - // LDTOKEN OF TYPE PARAMETERS TEST - Assert.AreEqual(mi.GetT(), "MyClass0"); - Assert.AreEqual(mi.GetU(), "System.Int32"); - Assert.AreEqual(ol.GetT(), "System.Object"); - Assert.AreEqual(ol.GetU(), "System.Int64"); - Assert.AreEqual(mi.GetT(), "MyClass0"); - Assert.AreEqual(mi.GetU(), "System.Int32"); - - Assert.AreEqual(mi.GetTArray(), "MyClass0[]"); - Assert.AreEqual(ol.GetTArray(), "System.Object[]"); - Assert.AreEqual(mi.GetTArray(), "MyClass0[]"); - Assert.AreEqual(mi.GetTBasedInst(), "MyGenClass2`1[MyGenClass1`1[MyClass0]]"); - Assert.AreEqual(ol.GetTBasedInst(), "MyGenClass2`1[MyGenClass1`1[System.Object]]"); - Assert.AreEqual(mi.GetTBasedInst(), "MyGenClass2`1[MyGenClass1`1[MyClass0]]"); - } - - static void RunTest3() - { - var mi = new GenBase(); - var ol = new GenBase(); - - // GENERIC INTERFACE CALL AND CASTING TEST - Assert.AreEqual(mi.IFaceCallTest(mi), "IFaceCallTest = IFooFunc - GenBase`2[MyClass0,System.Int32]"); - Assert.AreEqual(ol.IFaceCallTest(ol), "IFaceCallTest = IFooFunc - GenBase`2[System.Object,System.Int64]"); - Assert.AreEqual(mi.IFaceCallTest(mi), "IFaceCallTest = IFooFunc - GenBase`2[MyClass0,System.Int32]"); - - // LDTOKEN TEST - Assert.AreEqual(mi.LdTokenTest(), "LdTokenTest - System.Collections.Generic.Dictionary`2[MyClass0,System.Int32]"); - Assert.AreEqual(ol.LdTokenTest(), "LdTokenTest - System.Collections.Generic.Dictionary`2[System.Object,System.Int64]"); - Assert.AreEqual(mi.LdTokenTest(), "LdTokenTest - System.Collections.Generic.Dictionary`2[MyClass0,System.Int32]"); - - // DICTIONARY ACCESS FROM STATIC METHOD - Assert.AreEqual(GenBase.StaticNonGenMethod(), "StaticNonGenMethod - System.Collections.Generic.List`1[MyClass0]"); - Assert.AreEqual(GenBase.StaticNonGenMethod(), "StaticNonGenMethod - System.Collections.Generic.List`1[System.Object]"); - Assert.AreEqual(GenBase.StaticNonGenMethod(), "StaticNonGenMethod - System.Collections.Generic.List`1[MyClass0]"); - Assert.AreEqual(GenBase.StaticGenMethod(), "StaticGenMethod - System.Collections.Generic.Dictionary`2[System.Type,MyClass0]"); - Assert.AreEqual(GenBase.StaticGenMethod(), "StaticGenMethod - System.Collections.Generic.Dictionary`2[System.Type,System.Object]"); - Assert.AreEqual(GenBase.StaticGenMethod(), "StaticGenMethod - System.Collections.Generic.Dictionary`2[System.Type,MyClass0]"); - - // NEW TEST - Assert.AreEqual(mi.NewTest(), "NewTest - MyClass0 - MyGenClass1`1[MyClass0] - MyClass0[] - MyClass0[,] - MyGenClass3`1[MyClass0][] - MyGenClass3`1[MyClass0][,]"); - Assert.AreEqual(ol.NewTest(), "NewTest - System.Object - MyGenClass1`1[System.Object] - System.Object[] - System.Object[,] - MyGenClass3`1[System.Object][] - MyGenClass3`1[System.Object][,]"); - Assert.AreEqual(mi.NewTest(), "NewTest - MyClass0 - MyGenClass1`1[MyClass0] - MyClass0[] - MyClass0[,] - MyGenClass3`1[MyClass0][] - MyGenClass3`1[MyClass0][,]"); - } - - static void RunTest4() - { - // FIELDS TEST - var fobj1 = new GenBase(); - var fobj2 = new GenBase(); - GenBase.SetFieldsTest(fobj1, new MyIdClass0("1"), new MyIdClass0("2"), new MyIdClass0("3"), 1, 2, 3); - GenBase.SetFieldsTest(fobj2, new MyIdClass1("1"), new MyIdClass1("2"), new MyIdClass1("3"), 1, 2, 3); - - GenBase.GetFieldsTest(fobj1, "MyIdClass0=1", "MyIdClass0=2", "MyIdClass0=3", 1, 2, 3); - GenBase.GetFieldsTest(fobj2, "MyIdClass1=1", "MyIdClass1=2", "MyIdClass1=3", 1, 2, 3); - - Thread t = new Thread(new ThreadStart(() => - { - GenBase.SetFieldsTest(fobj1, new MyIdClass0("11"), new MyIdClass0("22"), new MyIdClass0("33"), 11, 22, 33); - GenBase.SetFieldsTest(fobj2, new MyIdClass1("11"), new MyIdClass1("22"), new MyIdClass1("33"), 11, 22, 33); - - GenBase.GetFieldsTest(fobj1, "MyIdClass0=11", "MyIdClass0=22", "MyIdClass0=33", 11, 22, 33); - GenBase.GetFieldsTest(fobj2, "MyIdClass1=11", "MyIdClass1=22", "MyIdClass1=33", 11, 22, 33); - })); - t.Start(); - t.Join(); - - GenBase.GetFieldsTest(fobj1, "MyIdClass0=11", "MyIdClass0=22", "MyIdClass0=3", 11, 22, 3); - GenBase.GetFieldsTest(fobj2, "MyIdClass1=11", "MyIdClass1=22", "MyIdClass1=3", 11, 22, 3); - } - - static void RunTest5() - { - // DELEGATES TEST - var fobj1 = new GenBase(); - var fobj2 = new GenBase(); - - Func[] del1 = fobj1.GetDelegateTest(); - Func[] del2 = fobj2.GetDelegateTest(); - Assert.AreEqual(del1[0](new MyIdClass0("1"), 1), "InstanceDelMethod(GenBase`2[MyIdClass0,System.Int32] - MyIdClass0=1 - 1)"); - Assert.AreEqual(del1[1](new MyIdClass0("2"), 2), "StaticDelMethod(MyIdClass0=2 - 2)"); - Assert.AreEqual(del2[0](new MyIdClass1("3"), 3), "InstanceDelMethod(GenBase`2[MyIdClass1,System.Int32] - MyIdClass1=3 - 3)"); - Assert.AreEqual(del2[1](new MyIdClass1("4"), 4), "StaticDelMethod(MyIdClass1=4 - 4)"); - Assert.AreEqual(del1[0](new MyIdClass0("5"), 5), "InstanceDelMethod(GenBase`2[MyIdClass0,System.Int32] - MyIdClass0=5 - 5)"); - Assert.AreEqual(del1[1](new MyIdClass0("6"), 6), "StaticDelMethod(MyIdClass0=6 - 6)"); - } - - static void RunTest6() - { - // BOXING AND NULLABLE TEST - var mi = new GenBase(); - var ol = new GenBase(); - - Assert.AreEqual(mi.BoxingAndNullableTest( - new MyGenClass1>(), - new MyGenStruct1>(), - new MyGenStruct1>()), - "BoxingAndNullableTest - GenBase`2[MyClass0,System.Int32]::(MyGenClass1`1[System.Collections.Generic.KeyValuePair`2[MyClass0,System.Int32]] - MyGenStruct1`1[System.Collections.Generic.Dictionary`2[MyClass0,System.Int32]] - MyGenStruct1`1[System.Collections.Generic.Dictionary`2[MyClass0,System.Int32]])"); - Assert.AreEqual(ol.BoxingAndNullableTest( - new MyGenClass1>(), - new MyGenStruct1>(), - new MyGenStruct1>()), - "BoxingAndNullableTest - GenBase`2[System.Object,System.Int64]::(MyGenClass1`1[System.Collections.Generic.KeyValuePair`2[System.Object,System.Int64]] - MyGenStruct1`1[System.Collections.Generic.Dictionary`2[System.Object,System.Int64]] - MyGenStruct1`1[System.Collections.Generic.Dictionary`2[System.Object,System.Int64]])"); - } - - static void RunTest7() - { - // GENERIC METHOD TEST - - Base b = new Base(); - var obj1 = new GenBase(); - var obj2 = new GenBase(); - - // LDTOKEN OF TYPE PARAMETERS TEST - Assert.AreEqual(b.GetT().ToString(), "System.String"); - Assert.AreEqual(b.GetT().ToString(), "System.Object"); - Assert.AreEqual(b.GetTArray().ToString(), "System.String[]"); - Assert.AreEqual(b.GetTArray().ToString(), "System.Object[]"); - Assert.AreEqual(b.GetTBasedInst().ToString(), "MyGenClass2`1[MyGenClass1`1[System.String]]"); - Assert.AreEqual(b.GetTBasedInst().ToString(), "MyGenClass2`1[MyGenClass1`1[System.Object]]"); - - Assert.AreEqual(b.GetT(), "MyClass1"); - Assert.AreEqual(b.GetU(), "System.Int32"); - Assert.AreEqual(b.GetT(), "MyClass2"); - Assert.AreEqual(b.GetU(), "System.Int64"); - - // GENERIC INTERFACE CALL AND CASTING TEST - Assert.AreEqual(b.IFaceCallTest(obj1), "IFaceCallTest = IFooFunc - GenBase`2[MyClass1,System.Int32]"); - Assert.AreEqual(b.IFaceCallTest(obj2), "IFaceCallTest = IFooFunc - GenBase`2[MyClass2,System.Int64]"); - - // LDTOKEN TEST - Assert.AreEqual(b.LdTokenTest(), "System.Collections.Generic.Dictionary`2[MyClass1,System.Int32]"); - Assert.AreEqual(b.LdTokenTest(), "System.Collections.Generic.Dictionary`2[MyClass2,System.Int64]"); - - // DICTIONARY ACCESS FROM STATIC METHOD - Assert.AreEqual(Base.StaticGenMethod(), "StaticGenMethod - System.Collections.Generic.Dictionary`2[MyClass1,System.Single]"); - Assert.AreEqual(Base.StaticGenMethod(), "StaticGenMethod - System.Collections.Generic.Dictionary`2[MyClass2,System.Single]"); - - // NEW TEST - Assert.AreEqual(b.NewTest(), - "NewTest - MyClass1 - MyGenClass1`1[MyClass1] - MyClass1[] - MyClass1[,] - MyGenClass2`1[MyClass1][] - MyGenClass2`1[MyClass1][,]"); - Assert.AreEqual(b.NewTest(), - "NewTest - MyClass2 - MyGenClass1`1[MyClass2] - MyClass2[] - MyClass2[,] - MyGenClass2`1[MyClass2][] - MyGenClass2`1[MyClass2][,]"); - - // BOXING AND NULLABLE TEST - Assert.AreEqual(b.BoxingAndNullableTest( - new MyGenClass1>(), - new MyGenStruct1>(), - new MyGenStruct1>()), - "BoxingAndNullableTest - Base::(MyGenClass1`1[System.Collections.Generic.KeyValuePair`2[MyClass0,System.Int32]] - MyGenStruct1`1[System.Collections.Generic.Dictionary`2[MyClass0,System.Int32]] - MyGenStruct1`1[System.Collections.Generic.Dictionary`2[MyClass0,System.Int32]])"); - Assert.AreEqual(b.BoxingAndNullableTest( - new MyGenClass1>(), - new MyGenStruct1>(), - new MyGenStruct1>()), - "BoxingAndNullableTest - Base::(MyGenClass1`1[System.Collections.Generic.KeyValuePair`2[System.Object,System.Int32]] - MyGenStruct1`1[System.Collections.Generic.Dictionary`2[System.Object,System.Int32]] - MyGenStruct1`1[System.Collections.Generic.Dictionary`2[System.Object,System.Int32]])"); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - static string GetString(X x, Y y) - { - return string.Join(" ", x, y); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - static GenClass1a CallGenVirtMethod(NormalClass n) - { - return n.GetGenClass1a(); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - static IEnumerable CallGenVirtMethod(NormalClass n, object o) - { - return n.GetEnumerable(o); - } - - /// - /// Tests that we properly track dictionary dependencies of generic methods. - /// (Getting this wrong is a linker failure.) - /// - class TestDictionaryDependencyTracking - { - static object Gen1() - { - return MakeArray>(); - } - - static object MakeArray() - { - return new T[0]; - } - - class Gen - { - public object Frob() - { - return new ValueGen(); - } - - public object Futz() - { - return Gen1>(); - } - } - - struct ValueGen - { - } - - class ClassGen - { - } - - public static void Run() - { - new Gen().Frob(); - new Gen().Futz(); - } - } - - /// - /// Tests static base access. - /// - class TestStaticBaseLookups - { - class C1 { } - class C2 { } - class C3 { } - - class GenHolder - { - public static int IntField; - public static string StringField; - } - - class GenAccessor - { - public static string Read() - { - return GenHolder.IntField.ToString() + GenHolder.StringField; - } - - public static void SetSimple(int i, string s) - { - GenHolder.IntField = i; - GenHolder.StringField = s; - } - - public static void SetComplex(int i, string s) - { - GenHolder.IntField = i; - GenHolder.StringField = s; - GenHolder.IntField = i + 1; - GenHolder.StringField = s + "`"; - } - } - - public static void Run() - { - GenAccessor.SetComplex(42, "Hello"); - GenAccessor.SetSimple(85, "World"); - - if (GenAccessor.Read() != "42Hello") - throw new Exception(); - - if (GenHolder.IntField != 43 || GenHolder.StringField != "Hello`") - throw new Exception(); - - if (GenAccessor.Read() != "85World") - throw new Exception(); - } - } - - /// - /// Tests that we can use a delegate that points to a generic method. - /// - class TestDelegateFatFunctionPointers - { - struct SmallStruct - { - public int X; - } - - struct MediumStruct - { - public int X, Y, Z, W; - } - - unsafe struct BigStruct - { - public const int Length = 128; - public fixed byte Bytes[Length]; - } - - T Generic(object o) where T : class - { - Func f = OtherGeneric; - return f(o); - } - - T OtherGeneric(object o) where T : class - { - return o as T; - } - - delegate void VoidGenericDelegate(ref T x, T val); - void VoidGeneric(ref T x, T val) - { - x = val; - } - - SmallStruct SmallStructGeneric(SmallStruct x) - { - return x; - } - - MediumStruct MediumStructGeneric(MediumStruct x) - { - return x; - } - - BigStruct BigStructGeneric(BigStruct x) - { - return x; - } - - public static void Run() - { - var o = new TestDelegateFatFunctionPointers(); - - string hw = "Hello World"; - string roundtrip = o.Generic(hw); - if (roundtrip != hw) - throw new Exception(); - - { - VoidGenericDelegate f = o.VoidGeneric; - object obj = new object(); - object location = null; - f(ref location, obj); - if (location != obj) - throw new Exception(); - } - - { - Func f = o.SmallStructGeneric; - SmallStruct x = new SmallStruct { X = 12345 }; - SmallStruct result = f(x); - if (result.X != x.X) - throw new Exception(); - } - - { - Func f = o.MediumStructGeneric; - MediumStruct x = new MediumStruct { X = 12, Y = 34, Z = 56, W = 78 }; - MediumStruct result = f(x); - if (result.X != x.X || result.Y != x.Y || result.Z != x.Z || result.W != x.W) - throw new Exception(); - } - - unsafe - { - Func f = o.BigStructGeneric; - BigStruct x = new BigStruct(); - for (int i = 0; i < BigStruct.Length; i++) - x.Bytes[i] = (byte)(i * 2); - - BigStruct result = f(x); - - for (int i = 0; i < BigStruct.Length; i++) - if (x.Bytes[i] != result.Bytes[i]) - throw new Exception(); - } - } - } - - class TestDelegateToCanonMethods - { - class Foo - { - public readonly int Value; - public Foo(int value) - { - Value = value; - } - - public override string ToString() - { - return Value.ToString(); - } - } - - class Bar - { - public readonly int Value; - public Bar(int value) - { - Value = value; - } - - public override string ToString() - { - return Value.ToString(); - } - } - - class FooShared - { - public readonly int Value; - public FooShared(int value) - { - Value = value; - } - - public override string ToString() - { - return Value.ToString(); - } - } - - class BarShared - { - public readonly int Value; - public BarShared(int value) - { - Value = value; - } - - public override string ToString() - { - return Value.ToString(); - } - } - - class GenClass - { - public readonly T X; - - public GenClass(T x) - { - X = x; - } - - public string MakeString() - { - // Use a constructed type that is not used elsewhere - return typeof(T[,]).GetElementType().Name + ": " + X.ToString(); - } - - public string MakeGenString() - { - // Use a constructed type that is not used elsewhere - return typeof(T[,,]).GetElementType().Name + ", " + - typeof(U[,,,]).GetElementType().Name + ": " + X.ToString(); - } - } - - struct GenStruct - { - public readonly T X; - - public GenStruct(T x) - { - X = x; - } - - public string MakeString() - { - // Use a constructed type that is not used elsewhere - return typeof(T[,]).GetElementType().Name + ": " + X.ToString(); - } - - public string MakeGenString() - { - // Use a constructed type that is not used elsewhere - return typeof(T[,,]).GetElementType().Name + ", " + - typeof(U[,,,]).GetElementType().Name + ": " + X.ToString(); - } - } - - private static void RunReferenceTypeShared(T value) - { - // Delegate to a shared nongeneric reference type instance method - { - GenClass g = new GenClass(value); - Func f = g.MakeString; - if (f() != "FooShared: 42") - throw new Exception(); - } - - // Delegate to a shared generic reference type instance method - { - GenClass g = new GenClass(value); - Func f = g.MakeGenString; - if (f() != "FooShared, FooShared: 42") - throw new Exception(); - } - } - - private static void RunValueTypeShared(T value) - { - // Delegate to a shared nongeneric value type instance method - { - GenStruct g = new GenStruct(value); - Func f = g.MakeString; - if (f() != "BarShared: 42") - throw new Exception(); - } - - // Delegate to a shared generic value type instance method - { - GenStruct g = new GenStruct(value); - Func f = g.MakeGenString; - if (f() != "BarShared, BarShared: 42") - throw new Exception(); - } - } - - public static void Run() - { - // Delegate to a shared nongeneric reference type instance method - { - GenClass g = new GenClass(new Foo(42)); - Func f = g.MakeString; - if (f() != "Foo: 42") - throw new Exception(); - } - - // Delegate to a unshared nongeneric reference type instance method - { - GenClass g = new GenClass(85); - Func f = g.MakeString; - if (f() != "Int32: 85") - throw new Exception(); - } - - // Delegate to a shared generic reference type instance method - { - GenClass g = new GenClass(new Foo(42)); - Func f = g.MakeGenString; - if (f() != "Foo, Foo: 42") - throw new Exception(); - } - - // Delegate to a unshared generic reference type instance method - { - GenClass g = new GenClass(85); - Func f = g.MakeGenString; - if (f() != "Int32, Int32: 85") - throw new Exception(); - } - - // Delegate to a shared nongeneric value type instance method - { - GenStruct g = new GenStruct(new Bar(42)); - Func f = g.MakeString; - if (f() != "Bar: 42") - throw new Exception(); - } - - // Delegate to a unshared nongeneric value type instance method - { - GenStruct g = new GenStruct(85); - Func f = g.MakeString; - if (f() != "Int32: 85") - throw new Exception(); - } - - // Delegate to a shared generic value type instance method - { - GenStruct g = new GenStruct(new Bar(42)); - Func f = g.MakeGenString; - if (f() != "Bar, Bar: 42") - throw new Exception(); - } - - // Delegate to a unshared generic value type instance method - { - GenStruct g = new GenStruct(85); - Func f = g.MakeGenString; - if (f() != "Int32, Int32: 85") - throw new Exception(); - } - - // Now the same from shared code - RunReferenceTypeShared(new FooShared(42)); - RunValueTypeShared(new BarShared(42)); - } - } - - class TestDelegateVirtualMethod - { - static void Generic() - { - Base o = new Derived(); - Func f = o.Do; - if (f() != "Derived") - throw new Exception(); - - o = new Base(); - f = o.Do; - if (f() != "Base") - throw new Exception(); - } - - public static void Run() - { - Generic(); - } - - class Base - { - public virtual string Do() => "Base"; - } - - class Derived : Base - { - public override string Do() => "Derived"; - } - } - - class TestDelegateInterfaceMethod - { - static void Generic() - { - IFoo o = new Foo(); - Func f = o.Do; - if (f() != "Foo") - throw new Exception(); - } - - public static void Run() - { - Generic(); - } - - interface IFoo - { - string Do(); - } - - class Foo : IFoo - { - public string Do() => "Foo"; - } - } - - /// - /// Tests RyuJIT's initThisClass. - /// - class TestInitThisClass - { - class Gen1 where T : class - { - static string s_str1; - static string s_str2; - - static Gen1() - { - s_str1 = ("Hello" as T) as string; - s_str2 = ("World" as T) as string; - } - - public static string Get1() - { - return (s_str1 as T) as string; - } - - public static string Get2() - { - return (s_str2 as T) as string; - } - } - - class Gen2 where T : class - { - public static string GetFromClassParam() - { - return (Gen1.Get1() as T) as string; - } - - public static string GetFromMethodParam() - { - return (Gen1.Get2() as T) as string; - } - } - - class NonGeneric - { - public static readonly string Message; - - static NonGeneric() - { - Message = "Hi there"; - } - - public static string Get(object o) - { - if (o is T[]) - return Message; - return null; - } - } - - public static void Run() - { - if (Gen2.GetFromClassParam() != "Hello") - throw new Exception(); - - if (Gen2.GetFromMethodParam() != "World") - throw new Exception(); - - if (NonGeneric.Get(new object[0]) != "Hi there") - throw new Exception(); - } - } - - /// - /// Tests that lazily built vtables for canonically equivalent types have the same shape. - /// - class TestVirtualMethodUseTracking - { - class C1 { } - class C2 { } - - class Base1 where T : class - { - public virtual T As(object o) - { - return o as T; - } - } - - class Derived1 : Base1 where T : class - { - public T AsToo(object o) - { - return o as T; - } - } - - class Base2 - { - public virtual string Method1() => "Base2.Method1"; - public virtual string Method2() => "Base2.Method2"; - } - - class Derived2 : Base2 - { - public override string Method1() => "Derived2.Method1"; - public override string Method2() => "Derived2.Method2"; - } - - [MethodImpl(MethodImplOptions.NoInlining)] - private static string TestMethod1FromSharedCode(Base2 o) => o.Method1(); - - [MethodImpl(MethodImplOptions.NoInlining)] - private static string TestMethod2FromSharedCode(Base2 o) => o.Method2(); - - public static void Run() - { - C1 c1 = new C1(); - if (new Derived1().As(c1) != c1) - throw new Exception(); - - C2 c2 = new C2(); - if (new Derived1().AsToo(c2) != c2) - throw new Exception(); - - // Also test the stability of the vtables. - Base2 b1 = new Derived2(); - if (b1.Method1() != "Derived2.Method1") - throw new Exception(); - Base2 b2 = new Derived2(); - if (b2.Method2() != "Derived2.Method2") - throw new Exception(); - if (TestMethod1FromSharedCode(b2) != "Derived2.Method1") - throw new Exception(); - if (TestMethod1FromSharedCode(b1) != "Derived2.Method1") - throw new Exception(); - if (TestMethod2FromSharedCode(b2) != "Derived2.Method2") - throw new Exception(); - if (TestMethod2FromSharedCode(b1) != "Derived2.Method2") - throw new Exception(); - } - } - - /// - /// Makes sure that during the base slot computation for types such as - /// Derived<__Canon> (where the base type ends up being Base<__Canon, string>), - /// the lazy vtable slot computation works. - /// - class TestSlotsInHierarchy - { - class Base - { - public virtual int Do() - { - return 42; - } - } - - class Derived : Base where T : class - { - public T Cast(object v) - { - return v as T; - } - } - - public static void Run() - { - var derived = new Derived(); - var derivedAsBase = (Base)derived; - - if (derivedAsBase.Do() != 42) - throw new Exception(); - - if (derived.Cast("Hello") != "Hello") - throw new Exception(); - } - } - - class TestReflectionInvoke - { - static int s_NumErrors = 0; - - struct Foo - { - public int Value; - - [MethodImpl(MethodImplOptions.NoInlining)] - public bool SetAndCheck(int value, U check) - { - Value = value; - return check != null && typeof(T) == typeof(U); - } - } - - public interface IFace - { - string IFaceMethod1(T t); - string IFaceGVMethod1(T t, U u); - } - - public class BaseClass : IFace - { - public virtual string Method1(T t) { return "BaseClass.Method1"; } - public virtual string Method2(T t) { return "BaseClass.Method2"; } - public virtual string Method3(T t) { return "BaseClass.Method3"; } - public virtual string Method4(T t) { return "BaseClass.Method4"; } - public virtual string GVMethod1(T t, U u) { return "BaseClass.GVMethod1"; } - public virtual string GVMethod2(T t, U u) { return "BaseClass.GVMethod2"; } - public virtual string GVMethod3(T t, U u) { return "BaseClass.GVMethod3"; } - public virtual string GVMethod4(T t, U u) { return "BaseClass.GVMethod4"; } - - public virtual string IFaceMethod1(T t) { return "BaseClass.IFaceMethod1"; } - public virtual string IFaceGVMethod1(T t, U u) { return "BaseClass.IFaceGVMethod1"; } - - [MethodImpl(MethodImplOptions.NoInlining)] - public virtual string VirtualButNotUsedVirtuallyMethod(T t) { return "BaseClass.VirtualButNotUsedVirtuallyMethod"; } - } - - public class DerivedClass1 : BaseClass, IFace - { - public override sealed string Method1(T t) { return "DerivedClass1.Method1"; } - public override string Method2(T t) { return "DerivedClass1.Method2"; } - public new virtual string Method3(T t) { return "DerivedClass1.Method3"; } - public override sealed string GVMethod1(T t, U u) { return "DerivedClass1.GVMethod1"; } - public override string GVMethod2(T t, U u) { return "DerivedClass1.GVMethod2"; } - public new virtual string GVMethod3(T t, U u) { return "DerivedClass1.GVMethod3"; } - - public override string IFaceMethod1(T t) { return "DerivedClass1.IFaceMethod1"; } - - public string UseVirtualButNotUsedVirtuallyMethod(T t) - { - // Calling through base produces a `call` instead of `callvirt` instruction. - return base.VirtualButNotUsedVirtuallyMethod(t); - } - } - - public class DerivedClass2 : DerivedClass1, IFace - { - public override string Method3(T t) { return "DerivedClass2.Method3"; } - public override string Method4(T t) { return "DerivedClass2.Method4"; } - public override string GVMethod3(T t, U u) { return "DerivedClass2.GVMethod3"; } - public override string GVMethod4(T t, U u) { return "DerivedClass2.GVMethod4"; } - - string IFace.IFaceMethod1(T t) { return "DerivedClass2.IFaceMethod1"; } - public override string IFaceGVMethod1(T t, U u) { return "DerivedClass2.IFaceGVMethod1"; } - } - - private static void Verify(T expected, T actual) - { - if (!actual.Equals(expected)) - { - Console.WriteLine("ACTUAL : " + actual); - Console.WriteLine("EXPECTED : " + expected); - s_NumErrors++; - } - } - - public static void Run() - { - if (String.Empty.Length > 0) - { - // Make sure we compile this method body. - var tmp = new Foo(); - tmp.SetAndCheck(0, null); - } - - object o = new Foo(); - - { - MethodInfo mi = typeof(Foo).GetMethod("SetAndCheck").MakeGenericMethod(typeof(string)); - if (!(bool)mi.Invoke(o, new object[] { 123, "hello" })) - s_NumErrors++; - - var foo = (Foo)o; - if (foo.Value != 123) - s_NumErrors++; - - if ((bool)mi.Invoke(o, new object[] { 123, null })) - s_NumErrors++; - } - - // Uncomment when we have the type loader to buld invoke stub dictionaries. - { - MethodInfo mi = typeof(Foo).GetMethod("SetAndCheck").MakeGenericMethod(typeof(object)); - if ((bool)mi.Invoke(o, new object[] { 123, new object() })) - s_NumErrors++; - } - - // VirtualInvokeMap testing - { - // Rooting some methods to make them reflectable - new BaseClass().Method1("string"); - new BaseClass().Method2("string"); - new BaseClass().Method3("string"); - new BaseClass().Method4("string"); - new BaseClass().GVMethod1("string", "string2"); - new BaseClass().GVMethod2("string", "string2"); - new BaseClass().GVMethod3("string", "string2"); - new BaseClass().GVMethod4("string", "string2"); - new DerivedClass1().Method1("string"); - new DerivedClass1().Method2("string"); - new DerivedClass1().Method3("string"); - new DerivedClass1().Method4("string"); - new DerivedClass1().GVMethod1("string", "string2"); - new DerivedClass1().GVMethod2("string", "string2"); - new DerivedClass1().GVMethod3("string", "string2"); - new DerivedClass1().GVMethod4("string", "string2"); - new DerivedClass1().UseVirtualButNotUsedVirtuallyMethod("string"); - new DerivedClass2().Method1("string"); - new DerivedClass2().Method2("string"); - new DerivedClass2().Method3("string"); - new DerivedClass2().Method4("string"); - new DerivedClass2().GVMethod1("string", "string2"); - new DerivedClass2().GVMethod2("string", "string2"); - new DerivedClass2().GVMethod3("string", "string2"); - new DerivedClass2().GVMethod4("string", "string2"); - Func> f = () => new BaseClass(); // Hack to prevent devirtualization - f().IFaceMethod1("string"); - ((IFace)new BaseClass()).IFaceGVMethod1("string1", "string2"); - - MethodInfo m1 = typeof(BaseClass).GetMethod("Method1"); - MethodInfo m2 = typeof(BaseClass).GetMethod("Method2"); - MethodInfo m3 = typeof(BaseClass).GetMethod("Method3"); - MethodInfo m4 = typeof(BaseClass).GetMethod("Method4"); - MethodInfo unusedMethod = typeof(BaseClass).GetMethod("VirtualButNotUsedVirtuallyMethod"); - MethodInfo gvm1 = typeof(BaseClass).GetMethod("GVMethod1").MakeGenericMethod(typeof(string)); - MethodInfo gvm2 = typeof(BaseClass).GetMethod("GVMethod2").MakeGenericMethod(typeof(string)); - MethodInfo gvm3 = typeof(BaseClass).GetMethod("GVMethod3").MakeGenericMethod(typeof(string)); - MethodInfo gvm4 = typeof(BaseClass).GetMethod("GVMethod4").MakeGenericMethod(typeof(string)); - Verify("BaseClass.Method1", m1.Invoke(new BaseClass(), new[] { "" })); - Verify("BaseClass.Method2", m2.Invoke(new BaseClass(), new[] { "" })); - Verify("BaseClass.Method3", m3.Invoke(new BaseClass(), new[] { "" })); - Verify("BaseClass.Method4", m4.Invoke(new BaseClass(), new[] { "" })); - Verify("BaseClass.VirtualButNotUsedVirtuallyMethod", unusedMethod.Invoke(new BaseClass(), new[] { "" })); - Verify("DerivedClass1.Method1", m1.Invoke(new DerivedClass1(), new[] { "" })); - Verify("DerivedClass1.Method2", m2.Invoke(new DerivedClass1(), new[] { "" })); - Verify("BaseClass.Method3", m3.Invoke(new DerivedClass1(), new[] { "" })); - Verify("BaseClass.Method4", m4.Invoke(new DerivedClass1(), new[] { "" })); - Verify("DerivedClass1.Method1", m1.Invoke(new DerivedClass2(), new[] { "" })); - Verify("DerivedClass1.Method2", m2.Invoke(new DerivedClass2(), new[] { "" })); - Verify("BaseClass.Method3", m3.Invoke(new DerivedClass2(), new[] { "" })); - Verify("DerivedClass2.Method4", m4.Invoke(new DerivedClass2(), new[] { "" })); - Verify("BaseClass.GVMethod1", gvm1.Invoke(new BaseClass(), new[] { "", "" })); - Verify("BaseClass.GVMethod2", gvm2.Invoke(new BaseClass(), new[] { "", "" })); - Verify("BaseClass.GVMethod3", gvm3.Invoke(new BaseClass(), new[] { "", "" })); - Verify("BaseClass.GVMethod4", gvm4.Invoke(new BaseClass(), new[] { "", "" })); - Verify("DerivedClass1.GVMethod1", gvm1.Invoke(new DerivedClass1(), new[] { "", "" })); - Verify("DerivedClass1.GVMethod2", gvm2.Invoke(new DerivedClass1(), new[] { "", "" })); - Verify("BaseClass.GVMethod3", gvm3.Invoke(new DerivedClass1(), new[] { "", "" })); - Verify("BaseClass.GVMethod4", gvm4.Invoke(new DerivedClass1(), new[] { "", "" })); - Verify("DerivedClass1.GVMethod1", gvm1.Invoke(new DerivedClass2(), new[] { "", "" })); - Verify("DerivedClass1.GVMethod2", gvm2.Invoke(new DerivedClass2(), new[] { "", "" })); - Verify("BaseClass.GVMethod3", gvm3.Invoke(new DerivedClass2(), new[] { "", "" })); - Verify("DerivedClass2.GVMethod4", gvm4.Invoke(new DerivedClass2(), new[] { "", "" })); - - m1 = typeof(DerivedClass1).GetMethod("Method1"); - m2 = typeof(DerivedClass1).GetMethod("Method2"); - m3 = typeof(DerivedClass1).GetMethod("Method3"); - gvm1 = typeof(DerivedClass1).GetMethod("GVMethod1").MakeGenericMethod(typeof(string)); - gvm2 = typeof(DerivedClass1).GetMethod("GVMethod2").MakeGenericMethod(typeof(string)); - gvm3 = typeof(DerivedClass1).GetMethod("GVMethod3", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.DeclaredOnly).MakeGenericMethod(typeof(string)); - Verify("DerivedClass1.Method1", m1.Invoke(new DerivedClass1(), new[] { "" })); - Verify("DerivedClass1.Method2", m2.Invoke(new DerivedClass1(), new[] { "" })); - Verify("DerivedClass1.Method3", m3.Invoke(new DerivedClass1(), new[] { "" })); - Verify("DerivedClass1.Method1", m1.Invoke(new DerivedClass2(), new[] { "" })); - Verify("DerivedClass1.Method2", m2.Invoke(new DerivedClass2(), new[] { "" })); - Verify("DerivedClass2.Method3", m3.Invoke(new DerivedClass2(), new[] { "" })); - Verify("DerivedClass1.GVMethod1", gvm1.Invoke(new DerivedClass1(), new[] { "", "" })); - Verify("DerivedClass1.GVMethod2", gvm2.Invoke(new DerivedClass1(), new[] { "", "" })); - Verify("DerivedClass1.GVMethod3", gvm3.Invoke(new DerivedClass1(), new[] { "", "" })); - Verify("DerivedClass1.GVMethod1", gvm1.Invoke(new DerivedClass2(), new[] { "", "" })); - Verify("DerivedClass1.GVMethod2", gvm2.Invoke(new DerivedClass2(), new[] { "", "" })); - Verify("DerivedClass2.GVMethod3", gvm3.Invoke(new DerivedClass2(), new[] { "", "" })); - - m3 = typeof(DerivedClass2).GetMethod("Method3"); - m4 = typeof(DerivedClass2).GetMethod("Method4"); - gvm3 = typeof(DerivedClass2).GetMethod("GVMethod3", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.DeclaredOnly).MakeGenericMethod(typeof(string)); - gvm4 = typeof(DerivedClass2).GetMethod("GVMethod4", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.DeclaredOnly).MakeGenericMethod(typeof(string)); - Verify("DerivedClass2.Method3", m3.Invoke(new DerivedClass2(), new[] { "" })); - Verify("DerivedClass2.Method4", m4.Invoke(new DerivedClass2(), new[] { "" })); - Verify("DerivedClass2.GVMethod3", gvm3.Invoke(new DerivedClass2(), new[] { "", "" })); - Verify("DerivedClass2.GVMethod4", gvm4.Invoke(new DerivedClass2(), new[] { "", "" })); - - // BaseClass.Method1 has the same slot as BaseClass.Method3 on CoreRT, because vtable entries - // get populated on demand (the first type won't get a Method3 entry, and the latter won't get a Method1 entry) - // On ProjectN, both types will get vtable entries for both methods. - new BaseClass().Method1(1); - m1 = typeof(BaseClass).GetMethod("Method1"); - Verify("BaseClass.Method1", m1.Invoke(new BaseClass(), new object[] { (int)1 })); - Verify("DerivedClass1.Method1", m1.Invoke(new DerivedClass1(), new object[] { (int)1 })); - Verify("DerivedClass1.Method1", m1.Invoke(new DerivedClass2(), new object[] { (int)1 })); - - new BaseClass().Method3(1); - m3 = typeof(BaseClass).GetMethod("Method3"); - Verify("BaseClass.Method3", m3.Invoke(new BaseClass(), new object[] { 1.1f })); - Verify("BaseClass.Method3", m3.Invoke(new DerivedClass1(), new object[] { 1.1f })); - Verify("BaseClass.Method3", m3.Invoke(new DerivedClass2(), new object[] { 1.1f })); - - m1 = typeof(IFace).GetMethod("IFaceMethod1"); - gvm1 = typeof(IFace).GetMethod("IFaceGVMethod1").MakeGenericMethod(typeof(string)); - Verify("BaseClass.IFaceMethod1", m1.Invoke(new BaseClass(), new[] { "" })); - Verify("BaseClass.IFaceGVMethod1", gvm1.Invoke(new BaseClass(), new[] { "", "" })); - Verify("DerivedClass1.IFaceMethod1", m1.Invoke(new DerivedClass1(), new[] { "" })); - Verify("BaseClass.IFaceGVMethod1", gvm1.Invoke(new DerivedClass1(), new[] { "", "" })); - Verify("DerivedClass2.IFaceMethod1", m1.Invoke(new DerivedClass2(), new[] { "" })); - Verify("DerivedClass2.IFaceGVMethod1", gvm1.Invoke(new DerivedClass2(), new[] { "", "" })); - } - - if (s_NumErrors != 0) - throw new Exception(); - } - } - - class TestThreadStaticFieldAccess - { - class TypeWithThreadStaticField - { - [ThreadStatic] - public static int X; - - [MethodImpl(MethodImplOptions.NoInlining)] - public static int Read() - { - return X; - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public static void Write(int x) - { - X = x; - } - } - - class BeforeFieldInitType - { - [ThreadStatic] - public static int X = 1985; - } - - [MethodImpl(MethodImplOptions.NoInlining)] - private static int ReadFromBeforeFieldInitType() - { - return BeforeFieldInitType.X; - } - - public static void Run() - { - // This will set the field to a value from non-shared code - TypeWithThreadStaticField.X = 42; - - // Now read the value from shared code - if (TypeWithThreadStaticField.Read() != 42) - throw new Exception(); - - // Set the value from shared code - TypeWithThreadStaticField.Write(112); - - // Now read the value from non-shared code - if (TypeWithThreadStaticField.X != 112) - throw new Exception(); - - // Check that the storage locations for string and object instantiations differ - if (TypeWithThreadStaticField.Read() != 42) - throw new Exception(); - - // Make sure we run the cctor - if (ReadFromBeforeFieldInitType() != 1985) - throw new Exception(); - } - } - - class TestConstrainedMethodCalls - { - class Atom1 { } - class Atom2 { } - - interface IFoo - { - bool Frob(object o); - } - - struct Foo : IFoo - { - public int FrobbedValue; - - public bool Frob(object o) - { - FrobbedValue = 12345; - return o is T[,,]; - } - } - - [MethodImpl(MethodImplOptions.NoInlining)] - static bool DoFrob(ref T t, object o) where T : IFoo - { - // Perform a constrained interface call from shared code. - // This should have been resolved to a direct call at compile time. - return t.Frob(o); - } - - public static void Run() - { - var foo1 = new Foo(); - bool result = DoFrob, Atom1>(ref foo1, new Atom1[0, 0, 0]); - - // If the FrobbedValue doesn't change when we frob, we must have done box+interface call. - if (foo1.FrobbedValue != 12345) - throw new Exception(); - - // Also check we passed the right generic context to Foo.Frob - if (!result) - throw new Exception(); - - // Also check dependency analysis: - // EEType for Atom2[,,] that we'll check for was never allocated. - var foo2 = new Foo(); - if (DoFrob, Atom2>(ref foo2, new object())) - throw new Exception(); - } - } - - class TestInstantiatingUnboxingStubs - { - static volatile IFoo s_foo; - - interface IFoo - { - bool IsInst(object o); - - void Set(int value); - } - - struct Foo : IFoo - { - public int Value; - - public bool IsInst(object o) - { - return o is T; - } - - public void Set(int value) - { - Value = value; - } - } - - public static void Run() - { - s_foo = new Foo(); - - // Make sure the instantiation argument is properly passed - if (!s_foo.IsInst("ab")) - throw new Exception(); - - if (s_foo.IsInst(new object())) - throw new Exception(); - - // Make sure the byref to 'this' is properly passed - s_foo.Set(42); - - var foo = (Foo)s_foo; - if (foo.Value != 42) - throw new Exception(); - } - } - - class TestMDArrayAddressMethod - { - [MethodImpl(MethodImplOptions.NoInlining)] - private static void PassByRef(ref object x) - { - x = new Object(); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - private static void DoGen(object[,] arr) - { - // Here, the array type is known statically at the time of compilation - PassByRef(ref arr[0, 0]); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - private static void PassByRef2(ref T x) - { - x = default(T); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - private static void DoGen2(T[,] arr) - { - // Here, the array type needs to be looked up from the dictionary - PassByRef2(ref arr[0, 0]); - } - - public static void Run() - { - int exceptionsSeen = 0; - - try - { - DoGen(new string[1, 1]); - } - catch (ArrayTypeMismatchException) - { - exceptionsSeen++; - } - - DoGen(new object[1, 1]); - - try - { - DoGen2(new string[1, 1]); - } - catch (ArrayTypeMismatchException) - { - exceptionsSeen++; - } - - DoGen2(new object[1, 1]); - - if (exceptionsSeen != 2) - throw new Exception(); - } - } - - // - // Regression test for issue https://github.com/dotnet/corert/issues/1964 - // - class TestNameManglingCollisionRegression - { - class Gen1 - { - public Gen1(T t) { } - } - - public static void Run() - { - Gen1[] g1 = new Gen1[1]; - g1[0] = new Gen1(new object[] { new object[1] }); - - Gen1 g2 = new Gen1(new object[1][]); - } - } - - class TestSimpleGVMScenarios - { - interface IFoo - { - string IMethod1(T t1, T t2); - } - - interface ICovariant - { - string ICovariantGVM(); - } - - public interface IBar - { - U IBarGVMethod(Func arg); - } - - public interface IFace - { - string IFaceGVMethod1(T t, U u); - } - - class Base : IFoo, IFoo - { - public virtual string GMethod1(T t1, T t2) { return "Base.GMethod1<" + typeof(T) + ">(" + t1 + "," + t2 + ")"; } - public virtual string IMethod1(T t1, T t2) { return "Base.IMethod1<" + typeof(T) + ">(" + t1 + "," + t2 + ")"; } - } - class Derived : Base, IFoo, IFoo - { - public override string GMethod1(T t1, T t2) { return "Derived.GMethod1<" + typeof(T) + ">(" + t1 + "," + t2 + ")"; } - string IFoo.IMethod1(T t1, T t2) { return "Derived.IFoo.IMethod1<" + typeof(T) + ">(" + t1 + "," + t2 + ")"; } - } - class SuperDerived : Derived, IFoo, IFoo - { - string IFoo.IMethod1(T t1, T t2) { return "SuperDerived.IFoo.IMethod1<" + typeof(T) + ">(" + t1 + "," + t2 + ")"; } - } - - - class GenBase : IFoo, IFoo - { - public virtual string GMethod1(T t1, T t2) { return "GenBase<" + typeof(A) + ">.GMethod1<" + typeof(T) + ">(" + t1 + "," + t2 + ")"; } - public virtual string IMethod1(T t1, T t2) { return "GenBase<" + typeof(A) + ">.IMethod1<" + typeof(T) + ">(" + t1 + "," + t2 + ")"; } - } - class GenDerived : GenBase, IFoo, IFoo - { - public override string GMethod1(T t1, T t2) { return "GenDerived<" + typeof(A) + ">.GMethod1<" + typeof(T) + ">(" + t1 + "," + t2 + ")"; } - string IFoo.IMethod1(T t1, T t2) { return "GenDerived<" + typeof(A) + ">.IFoo.IMethod1<" + typeof(T) + ">(" + t1 + "," + t2 + ")"; } - } - class GenSuperDerived : GenDerived, IFoo, IFoo - { - string IFoo.IMethod1(T t1, T t2) { return "GenSuperDerived<" + typeof(A) + ">.IFoo.IMethod1<" + typeof(T) + ">(" + t1 + "," + t2 + ")"; } - } - - struct MyStruct1 : IFoo, IFoo - { - string IFoo.IMethod1(T t1, T t2) { return "MyStruct1.IFoo.IMethod1<" + typeof(T) + ">(" + t1 + "," + t2 + ")"; } - string IFoo.IMethod1(T t1, T t2) { return "MyStruct1.IFoo.IMethod1<" + typeof(T) + ">(" + t1 + "," + t2 + ")"; } - } - struct MyStruct2 : IFoo, IFoo - { - string IFoo.IMethod1(T t1, T t2) { return "MyStruct2.IFoo.IMethod1<" + typeof(T) + ">(" + t1 + "," + t2 + ")"; } - public string IMethod1(T t1, T t2) { return "MyStruct2.IMethod1<" + typeof(T) + ">(" + t1 + "," + t2 + ")"; } - } - struct MyStruct3 : IFoo, IFoo - { - string IFoo.IMethod1(T t1, T t2) { return "MyStruct3.IFoo.IMethod1<" + typeof(T) + ">(" + t1 + "," + t2 + ")"; } - public string IMethod1(T t1, T t2) { return "MyStruct3.IMethod1<" + typeof(T) + ">(" + t1 + "," + t2 + ")"; } - } - - public class AnotherBaseClass - { - public virtual string IFaceMethod1(T t) { return "AnotherBaseClass.IFaceMethod1"; } - public virtual string IFaceGVMethod1(T t, U u) { return "AnotherBaseClass.IFaceGVMethod1"; } - } - - public class AnotherDerivedClass : AnotherBaseClass, IFace - { - } - - public class BarImplementor : IBar - { - public virtual U IBarGVMethod(Func arg) { return arg(123); } - } - - public class Yahoo - { - public virtual U YahooGVM(Func arg) { return default(U); } - } - - public class YahooDerived : Yahoo - { - public override U YahooGVM(Func arg) { return arg(456); } - } - - public class Covariant : ICovariant - { - public string ICovariantGVM() { return String.Format("Covariant<{0}>.ICovariantGVM<{1}>", typeof(T).Name, typeof(U).Name); } - } - - static string s_GMethod1; - static string s_IFooString; - static string s_IFooObject; - static string s_IFooInt; - - static int s_NumErrors = 0; - - private static void TestWithStruct(IFoo ifooStr, IFoo ifooObj, IFoo ifooInt) - { - var res = ifooStr.IMethod1(1, 2); - WriteLineWithVerification(res, s_IFooString); - - res = ifooObj.IMethod1(3, 4); - WriteLineWithVerification(res, s_IFooObject); - - res = ifooInt.IMethod1(5, 6); - WriteLineWithVerification(res, s_IFooInt); - } - - private static void TestWithClass(object o) - { - Base b = o as Base; - var res = b.GMethod1(1, 2); - WriteLineWithVerification(res, s_GMethod1); - - IFoo ifoo1 = o as IFoo; - res = ifoo1.IMethod1(3, 4); - WriteLineWithVerification(res, s_IFooString); - - IFoo ifoo2 = o as IFoo; - res = ifoo2.IMethod1(5, 6); - WriteLineWithVerification(res, s_IFooObject); - - IFoo ifoo3 = o as IFoo; - res = ifoo3.IMethod1(7, 8); - WriteLineWithVerification(res, s_IFooInt); - } - - private static void TestWithGenClass(object o) - { - GenBase b = o as GenBase; - var res = b.GMethod1(1, 2); - WriteLineWithVerification(res, s_GMethod1); - - IFoo ifoo1 = o as IFoo; - res = ifoo1.IMethod1(3, 4); - WriteLineWithVerification(res, s_IFooString); - - IFoo ifoo2 = o as IFoo; - res = ifoo2.IMethod1(5, 6); - WriteLineWithVerification(res, s_IFooObject); - - IFoo ifoo3 = o as IFoo; - res = ifoo3.IMethod1(7, 8); - WriteLineWithVerification(res, s_IFooInt); - } - - private static void WriteLineWithVerification(string actual, string expected) - { - if (actual != expected) - { - Console.WriteLine("ACTUAL : " + actual); - Console.WriteLine("EXPECTED : " + expected); - s_NumErrors++; - } - else - { - Console.WriteLine(actual); - } - } - - public static void Run() - { - { - s_GMethod1 = "Base.GMethod1(1,2)"; - s_IFooString = "Base.IMethod1(3,4)"; - s_IFooObject = "Base.IMethod1(5,6)"; - s_IFooInt = "Base.IMethod1(7,8)"; - TestWithClass(new Base()); - Console.WriteLine("===================="); - - - s_GMethod1 = "Derived.GMethod1(1,2)"; - s_IFooString = "Derived.IFoo.IMethod1(3,4)"; - s_IFooObject = "Derived.IFoo.IMethod1(5,6)"; - s_IFooInt = "Base.IMethod1(7,8)"; - TestWithClass(new Derived()); - Console.WriteLine("===================="); - - - s_GMethod1 = "Derived.GMethod1(1,2)"; - s_IFooString = "Derived.IFoo.IMethod1(3,4)"; - s_IFooObject = "Derived.IFoo.IMethod1(5,6)"; - s_IFooInt = "SuperDerived.IFoo.IMethod1(7,8)"; - TestWithClass(new SuperDerived()); - Console.WriteLine("===================="); - } - - { - s_GMethod1 = "GenBase.GMethod1(1,2)"; - s_IFooString = "GenBase.IMethod1(3,4)"; - s_IFooObject = "GenBase.IMethod1(5,6)"; - s_IFooInt = "GenBase.IMethod1(7,8)"; - TestWithGenClass(new GenBase()); - Console.WriteLine("===================="); - - - s_GMethod1 = "GenDerived.GMethod1(1,2)"; - s_IFooString = "GenDerived.IFoo.IMethod1(3,4)"; - s_IFooObject = "GenDerived.IFoo.IMethod1(5,6)"; - s_IFooInt = "GenBase.IMethod1(7,8)"; - TestWithGenClass(new GenDerived()); - Console.WriteLine("===================="); - - - s_GMethod1 = "GenDerived.GMethod1(1,2)"; - s_IFooString = "GenDerived.IFoo.IMethod1(3,4)"; - s_IFooObject = "GenDerived.IFoo.IMethod1(5,6)"; - s_IFooInt = "GenBase.IMethod1(7,8)"; - TestWithGenClass(new GenDerived()); - Console.WriteLine("===================="); - - - s_GMethod1 = "GenDerived.GMethod1(1,2)"; - s_IFooString = "GenDerived.IFoo.IMethod1(3,4)"; - s_IFooObject = "GenDerived.IFoo.IMethod1(5,6)"; - s_IFooInt = "GenSuperDerived.IFoo.IMethod1(7,8)"; - TestWithGenClass(new GenSuperDerived()); - Console.WriteLine("===================="); - } - - { - s_IFooString = "MyStruct1.IFoo.IMethod1(1,2)"; - s_IFooObject = "MyStruct1.IFoo.IMethod1(3,4)"; - s_IFooInt = "MyStruct1.IFoo.IMethod1(5,6)"; - TestWithStruct(new MyStruct1(), new MyStruct1(), new MyStruct1()); - Console.WriteLine("===================="); - - - s_IFooString = "MyStruct2.IFoo.IMethod1(1,2)"; - s_IFooObject = "MyStruct2.IFoo.IMethod1(3,4)"; - s_IFooInt = "MyStruct2.IMethod1(5,6)"; - TestWithStruct(new MyStruct2(), new MyStruct2(), new MyStruct2()); - Console.WriteLine("===================="); - - - s_IFooString = "MyStruct3.IMethod1(1,2)"; - s_IFooObject = "MyStruct3.IMethod1(3,4)"; - s_IFooInt = "MyStruct3.IFoo.IMethod1(5,6)"; - TestWithStruct(new MyStruct3(), new MyStruct3(), new MyStruct3()); - Console.WriteLine("===================="); - } - - { - string res = ((IFace)new AnotherDerivedClass()).IFaceGVMethod1("string1", "string2"); - WriteLineWithVerification("AnotherBaseClass.IFaceGVMethod1", res); - - res = ((IBar)new BarImplementor()).IBarGVMethod((i) => "BarImplementor:" + i.ToString()); - WriteLineWithVerification("BarImplementor:123", res); - - Yahoo y = new YahooDerived(); - WriteLineWithVerification("YahooDerived:456", y.YahooGVM((i) => "YahooDerived:" + i.ToString())); - - ICovariant cov = new Covariant(); - WriteLineWithVerification("Covariant.ICovariantGVM", cov.ICovariantGVM()); - } - - if (s_NumErrors != 0) - throw new Exception(); - } - } - - class TestGvmDelegates - { - class Atom { } - - interface IFoo - { - string Frob(int arg); - } - - class FooUnshared : IFoo - { - public string Frob(int arg) - { - return typeof(T[,]).GetElementType().Name + arg.ToString(); - } - } - - class FooShared : IFoo - { - public string Frob(int arg) - { - return typeof(T[,,]).GetElementType().Name + arg.ToString(); - } - } - - class Base - { - public virtual string Frob(string s) - { - return typeof(T).Name + ": Base: " + s; - } - } - - class Derived : Base - { - public override string Frob(string s) - { - return typeof(T).Name + ": Derived: " + s; - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public void ValidateShared(string s) - { - Func f = Frob; - if (f(s) != typeof(T).Name + ": Derived: " + s) - throw new Exception(); - - f = base.Frob; - if (f(s) != typeof(T).Name + ": Base: " + s) - throw new Exception(); - } - - public void Validate(string s) - { - Func f = Frob; - if (f(s) != typeof(string).Name + ": Derived: " + s) - throw new Exception(); - - f = base.Frob; - if (f(s) != typeof(string).Name + ": Base: " + s) - throw new Exception(); - } - } - - [MethodImpl(MethodImplOptions.NoInlining)] - static void RunShared(IFoo foo) - { - Func a = foo.Frob; - if (a(456) != "Atom456") - throw new Exception(); - } - - public static void Run() - { - IFoo foo = new FooUnshared(); - Func a = foo.Frob; - if (a(123) != "Atom123") - throw new Exception(); - - RunShared(new FooShared()); - - new Derived().Validate("hello"); - new Derived().ValidateShared("ola"); - } - } - - class TestGvmDependencies - { - class Atom { } - - class Foo - { - public virtual object Frob() - { - return new T[0, 0]; - } - } - - class Bar : Foo - { - public override object Frob() - { - return new T[0, 0, 0]; - } - } - - public static void Run() - { - { - Foo x = new Foo(); - x.Frob(); - } - - { - Foo x = new Bar(); - x.Frob(); - } - } - } - - class TestFieldAccess - { - class ClassType { } - class ClassType2 { } - struct StructType { } - - class Foo - { - static Foo() - { - Console.WriteLine("Foo<" + typeof(T).Name + "> cctor"); - - if (typeof(T) == typeof(ClassType)) - TestFieldAccess.s_FooClassTypeCctorCount++; - else if (typeof(T) == typeof(StructType)) - TestFieldAccess.s_FooStructTypeCctorCount++; - } - - public static int s_intField; - public static float s_floatField; - public static string s_stringField; - public static object s_objectField; - public static long s_longField1; - public static long s_longField2; - public static long s_longField3; - public static KeyValuePair s_kvp; - - public int m_intField; - public float m_floatField; - public string m_stringField; - public object m_objectField; - } - - class Bar - { - static Bar() - { - Console.WriteLine("Bar cctor"); - TestFieldAccess.s_BarCctorCount++; - } - - public static int s_intField; - public static float s_floatField; - public static string s_stringField; - public static object s_objectField; - public static long s_longField1; - public static long s_longField2; - public static long s_longField3; - public static KeyValuePair s_kvp; - - public int m_intField; - public float m_floatField; - public string m_stringField; - public object m_objectField; - } - - public class DynamicBase - { - public T _t; - - [MethodImpl(MethodImplOptions.NoInlining)] - public DynamicBase() { } - - [MethodImpl(MethodImplOptions.NoInlining)] - public int SimpleMethod() - { - return 123; - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public int MethodWithTInSig(T t) - { - _t = t; - return 234; - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public virtual string VirtualMethod(T t) - { - _t = t; - return "DynamicBase.VirtualMethod"; - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public string GenericMethod(T t, U u) - { - _t = t; - return typeof(U).ToString() + u.ToString(); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public virtual string GenericVirtualMethod(T t, U u) - { - _t = t; - return "DynamicBase" + typeof(U).ToString() + u.ToString(); - } - } - - public class DynamicDerived : DynamicBase - { - [MethodImpl(MethodImplOptions.NoInlining)] - public DynamicDerived() { } - - [MethodImpl(MethodImplOptions.NoInlining)] - public override string VirtualMethod(T t) - { - _t = t; - return "DynamicDerived.VirtualMethod"; - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public override string GenericVirtualMethod(T t, U u) - { - _t = t; - return "DynamicDerived" + typeof(U).ToString() + u.ToString(); - } - } - - class UnconstructedTypeWithGCStatics - { -#pragma warning disable 169 - static string s_gcField; -#pragma warning restore - } - - class UnconstructedTypeWithNonGCStatics - { -#pragma warning disable 169 - static float s_nonGcField; -#pragma warning restore - } - - class UnconstructedTypeInstantiator { } - - public static int s_FooClassTypeCctorCount = 0; - public static int s_FooStructTypeCctorCount = 0; - public static int s_BarCctorCount = 0; - public static int s_NumErrors = 0; - - private static void Verify(T expected, T actual) - { - if (!actual.Equals(expected)) - { - Console.WriteLine("ACTUAL : " + actual); - Console.WriteLine("EXPECTED : " + expected); - s_NumErrors++; - } - } - - private static void TestDynamicStaticFields() - { - Foo.s_intField = 1234; - Foo.s_floatField = 12.34f; - Foo.s_longField1 = 0x1111; - - var fooDynamicOfClassType = typeof(Foo<>).MakeGenericType(typeof(ClassType)); - var fooDynamicOfClassType2 = typeof(Foo<>).MakeGenericType(typeof(ClassType2)); - - FieldInfo fi = fooDynamicOfClassType.GetField("s_intField"); - FieldInfo fi2 = fooDynamicOfClassType2.GetField("s_intField"); - fi.SetValue(null, 1111); - fi2.SetValue(null, 2222); - Verify(1111, (int)fi.GetValue(null)); - Verify(2222, (int)fi2.GetValue(null)); - - fi = fooDynamicOfClassType.GetField("s_floatField"); - fi2 = fooDynamicOfClassType2.GetField("s_floatField"); - fi.SetValue(null, 1.1f); - fi2.SetValue(null, 2.2f); - Verify(1.1f, (float)fi.GetValue(null)); - Verify(2.2f, (float)fi2.GetValue(null)); - - fi = fooDynamicOfClassType.GetField("s_longField1"); - fi2 = fooDynamicOfClassType2.GetField("s_longField1"); - fi.SetValue(null, 0x11111111); - fi2.SetValue(null, 0x22222222); - Verify(0x11111111, (long)fi.GetValue(null)); - Verify(0x22222222, (long)fi2.GetValue(null)); - - fi = fooDynamicOfClassType.GetField("s_stringField"); - fi2 = fooDynamicOfClassType2.GetField("s_stringField"); - fi.SetValue(null, "abc123"); - fi2.SetValue(null, "omgroflpwn"); - Verify("abc123", (string)fi.GetValue(null)); - Verify("omgroflpwn", (string)fi2.GetValue(null)); - - fi = fooDynamicOfClassType.GetField("s_objectField"); - fi2 = fooDynamicOfClassType2.GetField("s_objectField"); - fi.SetValue(null, "qwerty"); - fi2.SetValue(null, "ytrewq"); - Verify("qwerty", (string)fi.GetValue(null)); - Verify("ytrewq", (string)fi2.GetValue(null)); - } - - private static void TestDynamicInvokeStubs() - { - Console.WriteLine("Testing dynamic invoke stubs..."); - // Root required methods / types statically instantiated over some unrelated type - DynamicBase heh = new DynamicBase(); - heh.MethodWithTInSig(new Program()); - heh.SimpleMethod(); - heh.VirtualMethod(new Program()); - heh.GenericMethod(new Program(), "hello"); - heh.GenericVirtualMethod(new Program(), "hello"); - - DynamicDerived heh2 = new DynamicDerived(); - heh2.VirtualMethod(new Program()); - heh2.GenericVirtualMethod(new Program(), "ayy"); - - // Simple method invocation - var dynamicBaseOfString = typeof(DynamicBase<>).MakeGenericType(typeof(string)); - object obj = Activator.CreateInstance(dynamicBaseOfString); - { - var simpleMethod = dynamicBaseOfString.GetMethod("SimpleMethod"); - int result = (int)simpleMethod.Invoke(obj, null); - Verify((int)123, result); - } - - // Method with T in the signature - { - var methodWithTInSig = dynamicBaseOfString.GetMethod("MethodWithTInSig"); - int result = (int)methodWithTInSig.Invoke(obj, new[] { "fad" }); - Verify((int)234, result); - } - - // Test virtual method invocation - { - var virtualMethodDynamicBase = dynamicBaseOfString.GetMethod("VirtualMethod"); - string result = (string)virtualMethodDynamicBase.Invoke(obj, new[] { "fad" }); - Verify("DynamicBase.VirtualMethod", result); - } - - { - var dynamicDerivedOfString = typeof(DynamicDerived<>).MakeGenericType(typeof(string)); - object dynamicDerivedObj = Activator.CreateInstance(dynamicDerivedOfString); - var virtualMethodDynamicDerived = dynamicDerivedOfString.GetMethod("VirtualMethod"); - string result = (string)virtualMethodDynamicDerived.Invoke(dynamicDerivedObj, new[] { "fad" }); - Verify("DynamicDerived.VirtualMethod", result); - } - - // Test generic method invocation - { - var genericMethod = dynamicBaseOfString.GetMethod("GenericMethod").MakeGenericMethod(new[] { typeof(string) }); - string result = (string)genericMethod.Invoke(obj, new[] { "hey", "hello" }); - - Verify("System.Stringhello", result); - } - - // Test GVM invocation - { - var genericMethod = dynamicBaseOfString.GetMethod("GenericVirtualMethod"); - genericMethod = genericMethod.MakeGenericMethod(new[] { typeof(string) }); - string result = (string)genericMethod.Invoke(obj, new[] { "hey", "hello" }); - Verify("DynamicBaseSystem.Stringhello", result); - } - - { - var dynamicDerivedOfString = typeof(DynamicDerived<>).MakeGenericType(typeof(string)); - object dynamicDerivedObj = Activator.CreateInstance(dynamicDerivedOfString); - var virtualMethodDynamicDerived = dynamicDerivedOfString.GetMethod("GenericVirtualMethod").MakeGenericMethod(new[] { typeof(string) }); - string result = (string)virtualMethodDynamicDerived.Invoke(dynamicDerivedObj, new[] { "hey", "fad" }); - Verify("DynamicDerivedSystem.Stringfad", result); - } - } - - private static void TestStaticFields() - { - Foo.s_intField = 11223344; - Foo.s_stringField = "abcd"; - Foo.s_floatField = 12.34f; - Foo.s_objectField = "123"; - Foo.s_kvp = new KeyValuePair("1122", "3344"); - - Foo.s_intField = 44332211; - Foo.s_stringField = "dcba"; - Foo.s_floatField = 43.21f; - Foo.s_objectField = "321"; - Foo.s_kvp = new KeyValuePair("4433", "2211"); - - - Bar.s_intField = 778899; - Bar.s_stringField = "xxyyzz"; - Bar.s_floatField = 88.99f; - Bar.s_objectField = "890"; - Bar.s_kvp = new KeyValuePair("7788", "8899"); - - // Testing correctness of cctor context - { - Foo.s_longField1 = 0xff00; - Foo.s_longField2 = 0xff00; - Foo.s_longField3 = 0xff00; - if (TestFieldAccess.s_FooClassTypeCctorCount != 1) - s_NumErrors++; - - Foo.s_longField1 = 0xff00; - Foo.s_longField2 = 0xff00; - Foo.s_longField3 = 0xff00; - if (TestFieldAccess.s_FooStructTypeCctorCount != 1) - s_NumErrors++; - - Bar.s_longField1 = 0xff00; - Bar.s_longField2 = 0xff00; - Bar.s_longField3 = 0xff00; - if (TestFieldAccess.s_BarCctorCount != 1) - s_NumErrors++; - } - - Console.WriteLine("Testing static fields on type Foo ..."); - { - FieldInfo fi = typeof(Foo).GetField("s_intField"); - Verify((int)11223344, (int)fi.GetValue(null)); - - fi = typeof(Foo).GetField("s_stringField"); - Verify("abcd", (string)fi.GetValue(null)); - - fi = typeof(Foo).GetField("s_floatField"); - Verify(12.34f, (float)fi.GetValue(null)); - - fi = typeof(Foo).GetField("s_objectField"); - Verify("123", fi.GetValue(null)); - - fi = typeof(Foo).GetField("s_kvp"); - var result = (KeyValuePair)fi.GetValue(null); - Verify("1122", result.Key); - Verify("3344", result.Value); - - typeof(Foo).GetField("s_stringField").SetValue(null, "ThisIsAString1"); - typeof(Foo).GetField("s_objectField").SetValue(null, "ThisIsAString2"); - typeof(Foo).GetField("s_kvp").SetValue(null, new KeyValuePair("ThisIs", "AString")); - Verify("ThisIsAString1", (string)Foo.s_stringField); - Verify("ThisIsAString2", (string)Foo.s_objectField); - Verify("ThisIs", (string)Foo.s_kvp.Key); - Verify("AString", (string)Foo.s_kvp.Value); - } - - Console.WriteLine("Testing static fields on type Foo ..."); - { - FieldInfo fi = typeof(Foo).GetField("s_intField"); - Verify(44332211, (int)fi.GetValue(null)); - - fi = typeof(Foo).GetField("s_stringField"); - Verify("dcba", (string)fi.GetValue(null)); - - fi = typeof(Foo).GetField("s_floatField"); - Verify(43.21f, (float)fi.GetValue(null)); - - fi = typeof(Foo).GetField("s_objectField"); - Verify("321", fi.GetValue(null)); - - fi = typeof(Foo).GetField("s_kvp"); - var result = (KeyValuePair)fi.GetValue(null); - Verify("4433", result.Key); - Verify("2211", result.Value); - - typeof(Foo).GetField("s_stringField").SetValue(null, "ThisIsAString3"); - typeof(Foo).GetField("s_objectField").SetValue(null, "ThisIsAString4"); - typeof(Foo).GetField("s_kvp").SetValue(null, new KeyValuePair("ThisIs1", "AString1")); - Verify("ThisIsAString3", (string)Foo.s_stringField); - Verify("ThisIsAString4", (string)Foo.s_objectField); - Verify("ThisIs1", (string)Foo.s_kvp.Key); - Verify("AString1", (string)Foo.s_kvp.Value); - } - - Console.WriteLine("Testing static fields on type Bar ..."); - { - FieldInfo fi = typeof(Bar).GetField("s_intField"); - Verify(778899, (int)fi.GetValue(null)); - - fi = typeof(Bar).GetField("s_stringField"); - Verify("xxyyzz", (string)fi.GetValue(null)); - - fi = typeof(Bar).GetField("s_floatField"); - Verify(88.99f, (float)fi.GetValue(null)); - - fi = typeof(Bar).GetField("s_objectField"); - Verify("890", fi.GetValue(null)); - - fi = typeof(Bar).GetField("s_kvp"); - var result = (KeyValuePair)fi.GetValue(null); - Verify("7788", result.Key); - Verify("8899", result.Value); - - typeof(Bar).GetField("s_stringField").SetValue(null, "ThisIsAString5"); - typeof(Bar).GetField("s_objectField").SetValue(null, "ThisIsAString6"); - typeof(Bar).GetField("s_kvp").SetValue(null, new KeyValuePair("ThisIs2", "AString2")); - Verify("ThisIsAString5", (string)Bar.s_stringField); - Verify("ThisIsAString6", (string)Bar.s_objectField); - Verify("ThisIs2", (string)Bar.s_kvp.Key); - Verify("AString2", (string)Bar.s_kvp.Value); - } - } - - private static void TestInstanceFields() - { - Foo fooClassType = new Foo - { - m_intField = 1212, - m_stringField = "2323", - m_floatField = 34.34f, - m_objectField = "4545", - }; - - Foo fooStructType = new Foo - { - m_intField = 2323, - m_stringField = "3434", - m_floatField = 45.45f, - m_objectField = "5656", - }; - - Bar bar = new Bar - { - m_intField = 3434, - m_stringField = "4545", - m_floatField = 56.56f, - m_objectField = "6767", - }; - - Console.WriteLine("Testing instance fields on type Foo ..."); - { - FieldInfo fi = typeof(Foo).GetField("m_intField"); - Verify(1212, (int)fi.GetValue(fooClassType)); - - fi = typeof(Foo).GetField("m_stringField"); - Verify("2323", (string)fi.GetValue(fooClassType)); - - fi = typeof(Foo).GetField("m_floatField"); - Verify(34.34f, (float)fi.GetValue(fooClassType)); - - fi = typeof(Foo).GetField("m_objectField"); - Verify("4545", fi.GetValue(fooClassType)); - - typeof(Foo).GetField("m_stringField").SetValue(fooClassType, "ThisIsAString7"); - typeof(Foo).GetField("m_objectField").SetValue(fooClassType, "ThisIsAString8"); - Verify("ThisIsAString7", (string)fooClassType.m_stringField); - Verify("ThisIsAString8", (string)fooClassType.m_objectField); - } - - Console.WriteLine("Testing instance fields on type Foo ..."); - { - FieldInfo fi = typeof(Foo).GetField("m_intField"); - Verify(2323, (int)fi.GetValue(fooStructType)); - - fi = typeof(Foo).GetField("m_stringField"); - Verify("3434", (string)fi.GetValue(fooStructType)); - - fi = typeof(Foo).GetField("m_floatField"); - Verify(45.45f, (float)fi.GetValue(fooStructType)); - - fi = typeof(Foo).GetField("m_objectField"); - Verify("5656", fi.GetValue(fooStructType)); - - typeof(Foo).GetField("m_stringField").SetValue(fooStructType, "ThisIsAString9"); - typeof(Foo).GetField("m_objectField").SetValue(fooStructType, "ThisIsAString10"); - Verify("ThisIsAString9", (string)fooStructType.m_stringField); - Verify("ThisIsAString10", (string)fooStructType.m_objectField); - } - - Console.WriteLine("Testing instance fields on type Bar ..."); - { - FieldInfo fi = typeof(Bar).GetField("m_intField"); - Verify(3434, (int)fi.GetValue(bar)); - - fi = typeof(Bar).GetField("m_stringField"); - Verify("4545", (string)fi.GetValue(bar)); - - fi = typeof(Bar).GetField("m_floatField"); - Verify(56.56f, (float)fi.GetValue(bar)); - - fi = typeof(Bar).GetField("m_objectField"); - Verify("6767", fi.GetValue(bar)); - - typeof(Bar).GetField("m_stringField").SetValue(bar, "ThisIsAString11"); - typeof(Bar).GetField("m_objectField").SetValue(bar, "ThisIsAString12"); - Verify("ThisIsAString11", (string)bar.m_stringField); - Verify("ThisIsAString12", (string)bar.m_objectField); - } - } - - private static void TestUnconstructedTypes() - { - // Testing for compilation failures due to references to unused static bases - // See: https://github.com/dotnet/corert/issues/3211 - var a = typeof(UnconstructedTypeInstantiator).ToString(); - var b = typeof(UnconstructedTypeInstantiator).ToString(); - } - - public static void Run() - { - TestStaticFields(); - TestInstanceFields(); - TestDynamicStaticFields(); - TestDynamicInvokeStubs(); - TestUnconstructedTypes(); - - if (s_NumErrors != 0) - throw new Exception(s_NumErrors + " errors!"); - } - } - - // Regression test for https://github.com/dotnet/corert/issues/3659 - class TestNativeLayoutGeneration - { -#pragma warning disable 649 // s_ref was never assigned - private static object s_ref; -#pragma warning restore 649 - - class Used - { - [MethodImpl(MethodImplOptions.NoInlining)] - public virtual string DoStuff() - { - return "Used"; - } - } - - class Unused : Used - { - [MethodImpl(MethodImplOptions.NoInlining)] - public override string DoStuff() - { - return "Unused " + typeof(T).ToString(); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public void Blagh() - { - } - } - - public static void Run() - { - new Used().DoStuff(); - - try - { - // Call an instance method on something we never allocated, but overrides a used virtual. - // This asserted the compiler when trying to build a template for Unused<__Canon>. - ((Unused)s_ref).Blagh(); - } - catch (NullReferenceException) - { - return; - } - - throw new Exception(); - } - } - - class TestInterfaceVTableTracking - { - class Gen { } - - interface IFoo - { - Array Frob(); - } - - class GenericBase : IFoo - { - public Array Frob() - { - return new Gen[1, 1]; - } - } - - class Derived : GenericBase> - { - } - - static volatile IFoo> s_foo; - - public static void Run() - { - // This only really tests whether we can compile this. - s_foo = new Derived(); - Array arr = s_foo.Frob(); - arr.SetValue(new Gen>(), new int[] { 0, 0 }); - } - } - - class TestClassVTableTracking - { - class Unit { } - - class Gen - { - public virtual int Test() - { - return 42; - } - } - - static int Call() - { - return new Gen().Test(); - } - - public static void Run() - { - // This only really tests whether we can compile this. - Call(); - } - } - - class TestNullableCasting - { - struct Mine { } - - [MethodImpl(MethodImplOptions.NoInlining)] - static bool CallWithNullable(object m) - { - return m is T; - } - - [MethodImpl(MethodImplOptions.NoInlining)] - static bool CallWithReferenceType(object m) - { - return m is Nullable>; - } - - public static void Run() - { - if (!CallWithNullable>>(new Mine())) - throw new Exception(); - - if (CallWithNullable>>(new Mine())) - throw new Exception(); - - if (!CallWithReferenceType(new Mine())) - throw new Exception(); - - if (CallWithReferenceType(new Mine())) - throw new Exception(); - - if (!(((object)new Mine()) is Nullable>)) - throw new Exception(); - } - } - - class TestVariantCasting - { - private delegate T GenericDelegate(); - - class Base { } - class Derived : Base { } - - [MethodImpl(MethodImplOptions.NoInlining)] - static bool IsInstanceOfGenericDelegateOf(object o) - { - return o is GenericDelegate; - } - - public static void Run() - { - GenericDelegate del = () => null; - if (!IsInstanceOfGenericDelegateOf(del)) - throw new Exception(); - } - } - - class TestByRefLikeVTables - { - class Atom { } - - ref struct RefStruct - { - public override bool Equals(object o) => o is Atom; - public override int GetHashCode() => 0; - - public override string ToString() - { - return typeof(T).ToString(); - } - } - - public static void Run() - { - // This is a regression test making sure we can build a vtable for the byref-like type. - // The vtable is necessary for a generic dictionary lookup in the ToString method. - // Method bodies of Equals and GetHashCode become reachable through the magical - // "unboxing" thunks we generate for byref-like types, and only through them. - RefStruct r = default; - if (r.ToString() != "System.String") - throw new Exception(); - } - } - - class TestDevirtualization - { - interface IDevirt - { - int GetAndSet(int x); - } - - struct Devirt : IDevirt - { - public int X; - - public int GetAndSet(int x) - { - int result = X; - X = x; - return result; - } - } - - interface IGenericDevirt - { - int GetAndSet(int x); - Type GetTheType(); - } - - struct GenericDevirt : IGenericDevirt - { - public int X; - - public int GetAndSet(int x) - { - int result = X; - X = x; - return result; - } - - public Type GetTheType() - { - return typeof(T); - } - } - - static void DoSimpleDevirt() - { - // This will potentially transform to a direct call - int result = ((IDevirt)new Devirt { X = 123 }).GetAndSet(456); - if (result != 123) - throw new Exception(); - } - - static void DoSimpleDevirtBoxed() - { - object o = new Devirt { X = 123 }; - - // Force o to be boxed no matter what - o.ToString(); - - // This will potentially transform to a direct call - int result = ((IDevirt)o).GetAndSet(456); - if (result != 123) - throw new Exception(); - - if (((Devirt)o).X != 456) - throw new Exception(); - } - - static void DoGenericDevirt() - { - // This will potentially transform to a direct call - int result1 = ((IGenericDevirt)new GenericDevirt { X = 123 }).GetAndSet(456); - if (result1 != 123) - throw new Exception(); - - // This will potentially transform to a direct call - Type result2 = ((IGenericDevirt)new GenericDevirt()).GetTheType(); - if (result2 != typeof(string)) - throw new Exception(); - } - - static void DoGenericDevirtBoxed() - { - object o1 = new GenericDevirt { X = 123 }; - - // Force o1 to be boxed no matter what - o1.ToString(); - - // This will potentially transform to a direct call - int result1 = ((IGenericDevirt)o1).GetAndSet(456); - if (result1 != 123) - throw new Exception(); - - if (((GenericDevirt)o1).X != 456) - throw new Exception(); - - object o2 = new GenericDevirt { X = 123 }; - - // Force o2 to be boxed no matter what - o2.ToString(); - - // This will potentially transform to a direct call - Type result2 = ((IGenericDevirt)o2).GetTheType(); - if (result2 != typeof(string)) - throw new Exception(); - } - - static void DoGenericDevirtShared() - { - // This will potentially transform to a direct call - int result1 = ((IGenericDevirt)new GenericDevirt { X = 123 }).GetAndSet(456); - if (result1 != 123) - throw new Exception(); - - // This will potentially transform to a direct call - Type result2 = ((IGenericDevirt)new GenericDevirt()).GetTheType(); - if (result2 != typeof(T[])) - throw new Exception(); - } - - static void DoGenericDevirtBoxedShared() - { - object o1 = new GenericDevirt { X = 123 }; - - // Force o1 to be boxed no matter what - o1.ToString(); - - // This will potentially transform to a direct call - int result1 = ((IGenericDevirt)o1).GetAndSet(456); - if (result1 != 123) - throw new Exception(); - - if (((GenericDevirt)o1).X != 456) - throw new Exception(); - - object o2 = new GenericDevirt { X = 123 }; - - // Force o2 to be boxed no matter what - o2.ToString(); - - // This will potentially transform to a direct call - Type result2 = ((IGenericDevirt)o2).GetTheType(); - if (result2 != typeof(T[])) - throw new Exception(); - } - - public static void Run() - { - DoSimpleDevirt(); - DoSimpleDevirtBoxed(); - DoGenericDevirt(); - DoGenericDevirtBoxed(); - DoGenericDevirtShared(); - DoGenericDevirtBoxedShared(); - } - } - - class TestGenericInlining - { - class NeverSeenInstantiated { } - - class AnotherNeverSeenInstantiated { } - - class NeverAllocatedIndirection - { - public string GetString() => new AnotherNeverSeenInstantiated().ToString(); - } - - class NeverAllocated - { - static NeverAllocatedIndirection s_indirection = null; - - public string GetString() => new NeverSeenInstantiated().ToString(); - public string GetStringIndirect() => s_indirection.GetString(); - } - - class Dummy { } - - static NeverAllocated s_neverAllocated = null; - - class GenericInline - { - public GenericInline() - { - _arr = (T)(object)new string[1] { "ohai" }; - } - T _arr; - public T GetArr() => _arr; - } - - [MethodImpl(MethodImplOptions.NoInlining)] - static object InnerTest(object o, object dummy) => o; - - static object OtherTest() => null; - - [MethodImpl(MethodImplOptions.NoInlining)] - static object Test(GenericInline t) - { - return InnerTest(t.GetArr()[0], OtherTest()); - } - - public static void Run() - { - // We're just making sure the compiler doesn't crash. - // Both of the calls below are expected to get inlined by an optimized codegen, - // triggering interesting behaviors in the dependency analysis of the scanner - // that runs before compilation. - if (s_neverAllocated != null) - { - Console.WriteLine(s_neverAllocated.GetString()); - Console.WriteLine(s_neverAllocated.GetStringIndirect()); - } - - // Regression test for https://github.com/dotnet/corert/issues/7625 - if ((string)Test(new GenericInline()) != "ohai") - throw new Exception(); - } - } -} - -interface IGenInterface -{ - string InterfaceMethod1(); - IGenInterface InterfaceMethod2(U u); -} - -class GenClass1a -{ - [MethodImpl(MethodImplOptions.NoInlining)] - public string CreateGenClass1b() - { - var x = new GenClass1b(); - return x.ToString(); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public string CreateGenClass1bArray() - { - var x = new GenClass1b[3]; - return x.ToString(); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public static string CallVirtual(GenClass1b x) - { - return x.VirtualMethod(); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public static string CallInterface(IGenInterface x) - { - return x.InterfaceMethod1(); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public static IGenInterface CallInterface(IGenInterface x, V v) - { - return x.InterfaceMethod2(v); - } -} - -class GenClass1b : IGenInterface -{ - [MethodImpl(MethodImplOptions.NoInlining)] - public virtual string VirtualMethod() - { - return ToString() + ".VirtualMethod"; - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public virtual string InterfaceMethod1() - { - return ToString() + ".InterfaceMethod1"; - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public virtual IGenInterface InterfaceMethod2(U u) - { - return this; - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public bool IsGenClass1a(object o) - { - return o is GenClass1a; - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public GenClass1a AsGenClass1a(object o) - { - return o as GenClass1a; - } -} - -class GenClass1c where T : new() -{ - public T t; - - [MethodImpl(MethodImplOptions.NoInlining)] - public GenClass1c() - { - t = new T(); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public GenClass1c(T _t) - { - t = _t; - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public void SetT(object x) - { - t = (T)x; - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public override string ToString() - { - return t.ToString(); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public string ToStringEx(X x) - { - return string.Join(" ", t, x); - } -} - -class GenClass2 -{ - T t; - U u; - - [MethodImpl(MethodImplOptions.NoInlining)] - public GenClass2(T t, U u) - { - this.t = t; - this.u = u; - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public override string ToString() - { - return t.ToString() + " " + u.ToString(); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public string ToStringEx(X x, Y y) - { - return string.Join(" ", t, u, x, y); - } -} - -class NormalClass -{ - [MethodImpl(MethodImplOptions.NoInlining)] - public virtual GenClass1a GetGenClass1a() - { - return new GenClass1a(); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public virtual IEnumerable GetEnumerable(object o) - { - T[] array = new T[1]; - array[0] = (T)o; - return array; - } -} - -public interface IFoo { string IFooFunc(); } -public class MyClass0 { } -public class MyClass1 { } -public class MyClass2 { } -public class MyGenClass1 { public override string ToString() { return this.GetType().ToString(); } } -public class MyGenClass2 { public override string ToString() { return this.GetType().ToString(); } } -public class MyGenClass3 { public override string ToString() { return this.GetType().ToString(); } } -public struct MyGenStruct1 { public override string ToString() { return this.GetType().ToString(); } } -public class MyIdClass0 { string _id; public MyIdClass0() { } public MyIdClass0(string id) { _id = id; } public override string ToString() { return "MyIdClass0=" + _id; } } -public class MyIdClass1 { string _id; public MyIdClass1() { } public MyIdClass1(string id) { _id = id; } public override string ToString() { return "MyIdClass1=" + _id; } } - -public class GenBase : IFoo where T : new() -{ - public T m_fieldT; - public U m_fieldU; - public static T s_fieldT; - public static U s_fieldU; - [ThreadStatic] - public static T st_fieldT; - [ThreadStatic] - public static U st_fieldU; - - [MethodImpl(MethodImplOptions.NoInlining)] - public static void SetFieldsTest(GenBase obj, T t1, T t2, T t3, U u1, U u2, U u3) - { - obj.m_fieldT = t1; - GenBase.s_fieldT = t2; - GenBase.st_fieldT = t3; - - obj.m_fieldU = u1; - GenBase.s_fieldU = u2; - GenBase.st_fieldU = u3; - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public static void GetFieldsTest(GenBase obj, string s1, string s2, string s3, U u1, U u2, U u3) - { - Assert.AreEqual(obj.m_fieldT.ToString(), s1); - Assert.AreEqual(GenBase.s_fieldT.ToString(), s2); - Assert.AreEqual(GenBase.st_fieldT.ToString(), s3); - - Assert.AreEqual(obj.m_fieldU, u1); - Assert.AreEqual(GenBase.s_fieldU, u2); - Assert.AreEqual(GenBase.st_fieldU, u3); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - // BUG BUG BUG: bad codegen when method is private - public string InstanceDelMethod(T t, U u) - { - return "InstanceDelMethod(" + this + " - " + t + " - " + u + ")"; - } - - [MethodImpl(MethodImplOptions.NoInlining)] - // BUG BUG BUG: bad codegen when method is private - public static string StaticDelMethod(T t, U u) - { - return "StaticDelMethod(" + t + " - " + u + ")"; - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public Func[] GetDelegateTest() - { - Func del1 = this.InstanceDelMethod; - Func del2 = StaticDelMethod; - return new Func[] { del1, del2 }; - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public string IFooFunc() - { - return "IFooFunc - " + this.ToString(); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public string IFaceCallTest(object ifoo) - { - IFoo i = (IFoo)ifoo; - return "IFaceCallTest = " + i.IFooFunc(); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public string GetT() - { - return typeof(T).ToString(); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public string GetU() - { - return typeof(U).ToString(); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public string GetTArray() - { - return typeof(T[]).ToString(); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public string GetTBasedInst() - { - return typeof(MyGenClass2>).ToString(); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public string LdTokenTest() - { - return "LdTokenTest - " + typeof(Dictionary).ToString(); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public static string StaticNonGenMethod() - { - return "StaticNonGenMethod - " + typeof(List).ToString(); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public static string StaticGenMethod() - { - return "StaticGenMethod - " + typeof(Dictionary).ToString(); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public string NewTest() - { - var a = new T(); - var b = new MyGenClass1(); - var c = new T[10]; - var d = new T[30,30]; - var e = new MyGenClass3[5]; - var f = new MyGenClass3[5,13]; - return "NewTest - " + a + " - " + b + " - " + c + " - " + d + " - " + e + " - " + f; - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public string BoxingAndNullableTest(MyGenClass1> t, MyGenStruct1> u, MyGenStruct1>? u2) - { - return "BoxingAndNullableTest - " + this + "::(" + t + " - " + u + " - " + u2 + ")"; - } -} - -public class Base -{ - [MethodImpl(MethodImplOptions.NoInlining)] - public string GetT() - { - return typeof(T).ToString(); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public string GetT() - { - return typeof(T).ToString(); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public string GetU() - { - return typeof(U).ToString(); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public string GetTArray() - { - return typeof(T[]).ToString(); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public string GetTBasedInst() - { - return typeof(MyGenClass2>).ToString(); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public string IFaceCallTest(object ifoo) - { - IFoo i = (IFoo)ifoo; - return "IFaceCallTest = " + i.IFooFunc(); - } - - - [MethodImpl(MethodImplOptions.NoInlining)] - public string LdTokenTest() - { - return typeof(Dictionary).ToString(); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public static string StaticGenMethod() - { - return "StaticGenMethod - " + typeof(Dictionary).ToString(); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public string NewTest() where T : new() - { - var a = new T(); - var b = new MyGenClass1(); - var c = new T[10]; - var d = new T[30, 30]; - var e = new MyGenClass2[5]; - var f = new MyGenClass2[5, 13]; - return "NewTest - " + a + " - " + b + " - " + c + " - " + d + " - " + e + " - " + f; - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public string BoxingAndNullableTest(MyGenClass1> t, MyGenStruct1> u, MyGenStruct1>? u2) - { - return "BoxingAndNullableTest - " + this + "::(" + t + " - " + u + " - " + u2 + ")"; - } -} - -public static class Assert -{ - public static bool HasAssertFired; - - public static void AreEqual(Object actual, Object expected) - { - if (!(actual == null && expected == null) && !actual.Equals(expected)) - { - Console.WriteLine("Not equal!"); - Console.WriteLine("actual = " + actual.ToString()); - Console.WriteLine("expected = " + expected.ToString()); - HasAssertFired = true; - } - } -} diff --git a/src/coreclr/tests/src/readytorun/tests/main.cs b/src/coreclr/tests/src/readytorun/tests/main.cs deleted file mode 100644 index 2270e9c5b686..000000000000 --- a/src/coreclr/tests/src/readytorun/tests/main.cs +++ /dev/null @@ -1,493 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using System.Runtime.InteropServices; -using System.Runtime.CompilerServices; -using System.Runtime.Loader; -using System.Reflection; -using System.IO; - -class InstanceFieldTest : MyClass -{ - public int Value; -} - -class InstanceFieldTest2 : InstanceFieldTest -{ - public int Value2; -} - -[StructLayout(LayoutKind.Sequential)] -class InstanceFieldTestWithLayout : MyClassWithLayout -{ - public int Value; -} - -class GrowingBase -{ - MyGrowingStruct s; -} - -class InheritingFromGrowingBase : GrowingBase -{ - public int x; -} - - -static class OpenClosedDelegateExtension -{ - public static string OpenClosedDelegateTarget(this string x, string foo) - { - return x + ", " + foo; - } -} - -class Program -{ - static void TestVirtualMethodCalls() - { - var o = new MyClass(); - Assert.AreEqual(o.VirtualMethod(), "Virtual method result"); - - var iface = (IMyInterface)o; - Assert.AreEqual(iface.InterfaceMethod(" "), "Interface result"); - Assert.AreEqual(MyClass.TestInterfaceMethod(iface, "+"), "Interface+result"); - - // V2 adds override of ToString - if (typeof(MyStructWithVirtuals).GetMethod("ToString").DeclaringType == typeof(MyStructWithVirtuals)) - { - // Make sure the constrained call to ToString doesn't box - var mystruct = new MyStructWithVirtuals(); - mystruct.ToString(); - Assert.AreEqual(mystruct.X, "Overriden"); - } - } - - static void TestMovedVirtualMethods() - { - var o = new MyChildClass(); - - Assert.AreEqual(o.MovedToBaseClass(), "MovedToBaseClass"); - Assert.AreEqual(o.ChangedToVirtual(), "ChangedToVirtual"); - - o = null; - - try - { - o.MovedToBaseClass(); - } - catch (NullReferenceException) - { - try - { - o.ChangedToVirtual(); - } - catch (NullReferenceException) - { - return; - } - } - - Assert.AreEqual("NullReferenceException", "thrown"); - } - - - static void TestConstrainedMethodCalls() - { - using (MyStruct s = new MyStruct()) - { - ((Object)s).ToString(); - } - - // Enum.GetHashCode optimization requires special treatment - // in native signature encoding - MyEnum e = MyEnum.Apple; - e.GetHashCode(); - } - - static void TestConstrainedMethodCalls_Unsupported() - { - MyStruct s = new MyStruct(); - s.ToString(); - } - - static void TestInterop() - { - MyClass.NativeMethod(); - - MyClass.TestInterop(); - } - - static void TestStaticFields() - { - MyClass.StaticObjectField = 894; - MyClass.StaticLongField = 4392854; - MyClass.StaticNullableGuidField = new Guid("0D7E505F-E767-4FEF-AEEC-3243A3005673"); - MyClass.ThreadStaticStringField = "Hello"; - MyClass.ThreadStaticIntField = 735; - MyClass.ThreadStaticDateTimeField = new DateTime(2011, 1, 1); - - MyClass.TestStaticFields(); - -#if false // TODO: Enable once LDFTN is supported - Task.Run(() => { - MyClass.ThreadStaticStringField = "Garbage"; - MyClass.ThreadStaticIntField = 0xBAAD; - MyClass.ThreadStaticDateTimeField = DateTime.Now; - }).Wait(); -#endif - - Assert.AreEqual(MyClass.StaticObjectField, 894 + 12345678 /* + 1234 */); - Assert.AreEqual(MyClass.StaticLongField, (long)(4392854 * 456 /* * 45 */)); - Assert.AreEqual(MyClass.StaticNullableGuidField, null); - Assert.AreEqual(MyClass.ThreadStaticStringField, "HelloWorld"); - Assert.AreEqual(MyClass.ThreadStaticIntField, 735/78); - Assert.AreEqual(MyClass.ThreadStaticDateTimeField, new DateTime(2011, 1, 1) + new TimeSpan(123)); - } - - static void TestPreInitializedArray() - { - var a = new int[] { 1, 2, 4, 8, 16, 32, 64, 128, 256, 512 }; - - int sum = 0; - foreach (var e in a) sum += e; - Assert.AreEqual(sum, 1023); - } - - static void TestMultiDimmArray() - { - var a = new int[2,3,4]; - a[0,1,2] = a[0,0,0] + a[1,1,1]; - a.ToString(); - } - - static void TestGenericVirtualMethod() - { - var o = new MyGeneric(); - Assert.AreEqual(o.GenericVirtualMethod>(), - "System.StringSystem.ObjectProgramSystem.Collections.Generic.IEnumerable`1[System.String]"); - } - - static void TestMovedGenericVirtualMethod() - { - var o = new MyChildGeneric(); - - Assert.AreEqual(o.MovedToBaseClass(), typeof(List).ToString()); - Assert.AreEqual(o.ChangedToVirtual(), typeof(List).ToString()); - - o = null; - - try - { - o.MovedToBaseClass(); - } - catch (NullReferenceException) - { - try - { - o.ChangedToVirtual(); - } - catch (NullReferenceException) - { - return; - } - } - - Assert.AreEqual("NullReferenceException", "thrown"); - } - - [MethodImplAttribute(MethodImplOptions.NoInlining)] - static void TestGenericNonVirtualMethod() - { - var c = new MyChildGeneric(); - Assert.AreEqual(CallGeneric(c), "MyGeneric.NonVirtualMethod"); - } - - [MethodImplAttribute(MethodImplOptions.NoInlining)] - static string CallGeneric(MyGeneric g) - { - return g.NonVirtualMethod(); - } - - static void TestGenericOverStruct() - { - var o1 = new MyGeneric(); - Assert.AreEqual(o1.GenericVirtualMethod < MyChangingStruct, IEnumerable>(), - "System.StringMyGrowingStructMyChangingStructSystem.Collections.Generic.IEnumerable`1[Program]"); - - var o2 = new MyChildGeneric(); - Assert.AreEqual(o2.MovedToBaseClass(), typeof(List).ToString()); - Assert.AreEqual(o2.ChangedToVirtual(), typeof(List).ToString()); - } - - static void TestInstanceFields() - { - var t = new InstanceFieldTest2(); - t.Value = 123; - t.Value2 = 234; - t.InstanceField = 345; - - Assert.AreEqual(typeof(InstanceFieldTest).GetRuntimeField("Value").GetValue(t), 123); - Assert.AreEqual(typeof(InstanceFieldTest2).GetRuntimeField("Value2").GetValue(t), 234); - Assert.AreEqual(typeof(MyClass).GetRuntimeField("InstanceField").GetValue(t), 345); - } - - static void TestInstanceFieldsWithLayout() - { - var t = new InstanceFieldTestWithLayout(); - t.Value = 123; - - Assert.AreEqual(typeof(InstanceFieldTestWithLayout).GetRuntimeField("Value").GetValue(t), 123); - } - - static void TestInheritingFromGrowingBase() - { - var o = new InheritingFromGrowingBase(); - o.x = 6780; - Assert.AreEqual(typeof(InheritingFromGrowingBase).GetRuntimeField("x").GetValue(o), 6780); - } - - [MethodImplAttribute(MethodImplOptions.NoInlining)] - static void TestGrowingStruct() - { - MyGrowingStruct s = MyGrowingStruct.Construct(); - MyGrowingStruct.Check(ref s); - } - - [MethodImplAttribute(MethodImplOptions.NoInlining)] - static void TestChangingStruct() - { - MyChangingStruct s = MyChangingStruct.Construct(); - s.x++; - MyChangingStruct.Check(ref s); - } - - [MethodImplAttribute(MethodImplOptions.NoInlining)] - static void TestChangingHFAStruct() - { - MyChangingHFAStruct s = MyChangingHFAStruct.Construct(); - MyChangingHFAStruct.Check(s); - } - - [MethodImplAttribute(MethodImplOptions.NoInlining)] - static void TestGetType() - { - new MyClass().GetType().ToString(); - } - - [MethodImplAttribute(MethodImplOptions.NoInlining)] - static void TestStaticBaseCSE() - { - // There should be just one call to CORINFO_HELP_READYTORUN_STATIC_BASE - // in the generated code. - s++; - s++; - Assert.AreEqual(s, 2); - s = 0; - } - - [MethodImplAttribute(MethodImplOptions.NoInlining)] - static void TestIsInstCSE() - { - // There should be just one call to CORINFO_HELP_READYTORUN_ISINSTANCEOF - // in the generated code. - object o1 = (s < 1) ? (object)"foo" : (object)1; - Assert.AreEqual(o1 is string, true); - Assert.AreEqual(o1 is string, true); - } - - [MethodImplAttribute(MethodImplOptions.NoInlining)] - static void TestCastClassCSE() - { - // There should be just one call to CORINFO_HELP_READYTORUN_CHKCAST - // in the generated code. - object o1 = (s < 1) ? (object)"foo" : (object)1; - string str1 = (string)o1; - string str2 = (string)o1; - Assert.AreEqual(str1, str2); - } - - [MethodImplAttribute(MethodImplOptions.NoInlining)] - static void TestRangeCheckElimination() - { - // Range checks for array accesses should be eliminated by the compiler. - int[] array = new int[5]; - array[2] = 2; - Assert.AreEqual(array[2], 2); - } - - class MyLoadContext : AssemblyLoadContext - { - // If running in a collectible context, make the MyLoadContext collectible too so that it doesn't prevent - // unloading. - public MyLoadContext() : base(AssemblyLoadContext.GetLoadContext(Assembly.GetExecutingAssembly()).IsCollectible) - { - } - - public void TestMultipleLoads() - { - Assembly a = LoadFromAssemblyPath(Path.Combine(Directory.GetCurrentDirectory(), "test.ni.dll")); - Assert.AreEqual(AssemblyLoadContext.GetLoadContext(a), this); - } - - protected override Assembly Load(AssemblyName an) - { - throw new NotImplementedException(); - } - } - - static void TestMultipleLoads() - { - // Runtime should be able to load the same R2R image in another load context, - // even though it will be treated as an IL-only image. - new MyLoadContext().TestMultipleLoads(); - } - - static void TestFieldLayoutNGenMixAndMatch() - { - // This test is verifying consistent field layout when ReadyToRun images are combined with NGen images - // "ngen install /nodependencies main.exe" to exercise the interesting case - var o = new ByteChildClass(67); - Assert.AreEqual(o.ChildByte, (byte)67); - } - - static void TestOpenClosedDelegate() - { - // This test is verifying the the fixups for open vs. closed delegate created against the same target - // method are encoded correctly. - - Func idOpen = OpenClosedDelegateExtension.OpenClosedDelegateTarget; - Assert.AreEqual(idOpen("World", "foo"), "World, foo"); - - Func idClosed = "World".OpenClosedDelegateTarget; - Assert.AreEqual(idClosed("hey"), "World, hey"); - } - - static void GenericLdtokenFieldsTest() - { - Func FieldFullName = (fi) => fi.FieldType + " " + fi.DeclaringType.ToString() + "::" + fi.Name; - - IFieldGetter getter1 = new FieldGetter(); - IFieldGetter getter2 = new FieldGetter(); - IFieldGetter getter3 = new FieldGetter(); - - foreach (var instArg in new Type[]{typeof(String), typeof(object), typeof(int)}) - { - IFieldGetter getter = (IFieldGetter)Activator.CreateInstance(typeof(FieldGetter<>).MakeGenericType(instArg)); - - string expectedField1 = "System.Int32 Gen`1[???]::m_Field1".Replace("???", instArg.ToString()); - string expectedField2 = "System.String Gen`1[???]::m_Field2".Replace("???", instArg.ToString()); - string expectedField3 = "??? Gen`1[???]::m_Field3".Replace("???", instArg.ToString()); - string expectedField4 = "System.Collections.Generic.List`1[???] Gen`1[???]::m_Field4".Replace("???", instArg.ToString()); - string expectedField5 = "System.Collections.Generic.KeyValuePair`2[???,System.Int32] Gen`1[???]::m_Field5".Replace("???", instArg.ToString()); - - string expectedDllField1 = "System.String MyGeneric`2[???,???]::m_Field1".Replace("???", instArg.ToString()); - string expectedDllField2 = "??? MyGeneric`2[???,???]::m_Field2".Replace("???", instArg.ToString()); - string expectedDllField3 = "System.Collections.Generic.List`1[???] MyGeneric`2[???,???]::m_Field3".Replace("???", instArg.ToString()); - string expectedDllField4 = "System.Collections.Generic.KeyValuePair`2[???,System.Int32] MyGeneric`2[???,???]::m_Field4".Replace("???", instArg.ToString()); - string expectedDllField5 = "System.Int32 MyGeneric`2[???,???]::m_Field5".Replace("???", instArg.ToString()); - - Assert.AreEqual(expectedField1, FieldFullName(getter.GetGenT_Field1())); - Assert.AreEqual(expectedField2, FieldFullName(getter.GetGenT_Field2())); - Assert.AreEqual(expectedField3, FieldFullName(getter.GetGenT_Field3())); - Assert.AreEqual(expectedField4, FieldFullName(getter.GetGenT_Field4())); - Assert.AreEqual(expectedField5, FieldFullName(getter.GetGenT_Field5())); - - Assert.AreEqual(expectedDllField1, FieldFullName(getter.GetGenDllT_Field1())); - Assert.AreEqual(expectedDllField2, FieldFullName(getter.GetGenDllT_Field2())); - Assert.AreEqual(expectedDllField3, FieldFullName(getter.GetGenDllT_Field3())); - Assert.AreEqual(expectedDllField4, FieldFullName(getter.GetGenDllT_Field4())); - Assert.AreEqual(expectedDllField5, FieldFullName(getter.GetGenDllT_Field5())); - } - } - - static void RVAFieldTest() - { - ReadOnlySpan value = new byte[] { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; - for (byte i = 0; i < value.Length; i++) - Assert.AreEqual(value[i], (byte)(9 - i)); - } - - static void TestLoadR2RImageFromByteArray() - { - Assembly assembly1 = typeof(Program).Assembly; - - byte[] array = File.ReadAllBytes(assembly1.Location); - Assembly assembly2 = Assembly.Load(array); - - Assert.AreEqual(assembly2.FullName, assembly1.FullName); - } - - static void RunAllTests() - { - TestVirtualMethodCalls(); - TestMovedVirtualMethods(); - - TestConstrainedMethodCalls(); - - TestConstrainedMethodCalls_Unsupported(); - - TestInterop(); - - TestStaticFields(); - - TestPreInitializedArray(); - - TestMultiDimmArray(); - - TestGenericVirtualMethod(); - TestMovedGenericVirtualMethod(); - TestGenericNonVirtualMethod(); - - TestGenericOverStruct(); - - TestInstanceFields(); - - TestInstanceFieldsWithLayout(); - - TestInheritingFromGrowingBase(); - - TestGrowingStruct(); - TestChangingStruct(); - TestChangingHFAStruct(); - - TestGetType(); - - TestMultipleLoads(); - - TestFieldLayoutNGenMixAndMatch(); - - TestStaticBaseCSE(); - - TestIsInstCSE(); - - TestCastClassCSE(); - - TestRangeCheckElimination(); - - TestOpenClosedDelegate(); - - GenericLdtokenFieldsTest(); - - RVAFieldTest(); - - TestLoadR2RImageFromByteArray(); - } - - static int Main() - { - // Run all tests 3x times to exercise both slow and fast paths work - for (int i = 0; i < 3; i++) - RunAllTests(); - - Console.WriteLine("PASSED"); - return Assert.HasAssertFired ? 1 : 100; - } - - static int s; -} diff --git a/src/coreclr/tests/src/readytorun/tests/test.cs b/src/coreclr/tests/src/readytorun/tests/test.cs deleted file mode 100644 index 585c30e057c3..000000000000 --- a/src/coreclr/tests/src/readytorun/tests/test.cs +++ /dev/null @@ -1,415 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using System; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using System.Collections.Generic; -using System.Runtime.CompilerServices; - -public static class Assert -{ - public static bool HasAssertFired; - - public static void AreEqual(Object actual, Object expected) - { - if (!(actual == null && expected == null) && !actual.Equals(expected)) - { - Console.WriteLine("Not equal!"); - Console.WriteLine("actual = " + actual.ToString()); - Console.WriteLine("expected = " + expected.ToString()); - HasAssertFired = true; - } - } -} - -public interface IMyInterface -{ -#if V2 - // Adding new methods to interfaces is incompatible change, but we will make sure that it works anyway - void NewInterfaceMethod(); -#endif - - string InterfaceMethod(string s); -} - -public class MyClass : IMyInterface -{ -#if V2 - public int _field1; - public int _field2; - public int _field3; -#endif - public int InstanceField; - -#if V2 - public static Object StaticObjectField2; - - [ThreadStatic] public static String ThreadStaticStringField2; - - [ThreadStatic] public static int ThreadStaticIntField; - - public static Nullable StaticNullableGuidField; - - public static Object StaticObjectField; - - [ThreadStatic] public static int ThreadStaticIntField2; - - public static long StaticLongField; - - [ThreadStatic] public static DateTime ThreadStaticDateTimeField2; - - public static long StaticLongField2; - - [ThreadStatic] public static DateTime ThreadStaticDateTimeField; - - public static Nullable StaticNullableGuidField2; - - [ThreadStatic] public static String ThreadStaticStringField; -#else - public static Object StaticObjectField; - - public static long StaticLongField; - - public static Nullable StaticNullableGuidField; - - [ThreadStatic] public static String ThreadStaticStringField; - - [ThreadStatic] public static int ThreadStaticIntField; - - [ThreadStatic] public static DateTime ThreadStaticDateTimeField; -#endif - - public MyClass() - { - } - -#if V2 - public virtual void NewVirtualMethod() - { - } - - public virtual void NewInterfaceMethod() - { - throw new Exception(); - } -#endif - - public virtual string VirtualMethod() - { - return "Virtual method result"; - } - - public virtual string InterfaceMethod(string s) - { - return "Interface" + s + "result"; - } - - public static string TestInterfaceMethod(IMyInterface i, string s) - { - return i.InterfaceMethod(s); - } - - public static void TestStaticFields() - { - StaticObjectField = (int)StaticObjectField + 12345678; - - StaticLongField *= 456; - - Assert.AreEqual(StaticNullableGuidField, new Guid("0D7E505F-E767-4FEF-AEEC-3243A3005673")); - StaticNullableGuidField = null; - - ThreadStaticStringField += "World"; - - ThreadStaticIntField /= 78; - - ThreadStaticDateTimeField = ThreadStaticDateTimeField + new TimeSpan(123); - - MyGeneric.ThreadStatic = new Object(); - -#if false // TODO: Enable once LDFTN is supported - // Do some operations on static fields on a different thread to verify that we are not mixing thread-static and non-static - Task.Run(() => { - - StaticObjectField = (int)StaticObjectField + 1234; - - StaticLongField *= 45; - - ThreadStaticStringField = "Garbage"; - - ThreadStaticIntField = 0xBAAD; - - ThreadStaticDateTimeField = DateTime.Now; - - }).Wait(); -#endif - } - - [DllImport("nativelibrary")] - public extern static int NativeMethod(); - - static public void TestInterop() - { - NativeMethod(); - } - -#if V2 - public string MovedToBaseClass() - { - return "MovedToBaseClass"; - } -#endif - -#if V2 - public virtual string ChangedToVirtual() - { - return null; - } -#else - public string ChangedToVirtual() - { - return "ChangedToVirtual"; - } -#endif - -} - -public class MyChildClass : MyClass -{ - public MyChildClass() - { - } - -#if !V2 - public string MovedToBaseClass() - { - return "MovedToBaseClass"; - } -#endif - -#if V2 - public override string ChangedToVirtual() - { - return "ChangedToVirtual"; - } -#endif -} - - -public struct MyStruct : IDisposable -{ - int x; - -#if V2 - void IDisposable.Dispose() - { - } -#else - public void Dispose() - { - } -#endif -} - -public class MyGeneric -{ -#if V2 - public object m_unused1; - public string m_Field1; - - public object m_unused2; - public T m_Field2; - - public object m_unused3; - public List m_Field3; - - static public object m_unused4; - static public KeyValuePair m_Field4; - - static public object m_unused5; - static public int m_Field5; - - public object m_unused6; - static public object m_unused7; -#else - public string m_Field1; - public T m_Field2; - public List m_Field3; - static public KeyValuePair m_Field4; - static public int m_Field5; -#endif - - [ThreadStatic] public static Object ThreadStatic; - - public MyGeneric() - { - } - - public virtual string GenericVirtualMethod() - { - return typeof(T).ToString() + typeof(U).ToString() + typeof(V).ToString() + typeof(W).ToString(); - } - -#if V2 - public string MovedToBaseClass() - { - typeof(Dictionary).ToString(); - return typeof(List).ToString(); - } -#endif - -#if V2 - public virtual string ChangedToVirtual() - { - return null; - } -#else - public string ChangedToVirtual() - { - return typeof(List).ToString(); - } -#endif - - public string NonVirtualMethod() - { - return "MyGeneric.NonVirtualMethod"; - } -} - -public class MyChildGeneric : MyGeneric -{ - public MyChildGeneric() - { - } - -#if !V2 - public string MovedToBaseClass() - { - return typeof(List).ToString(); - } -#endif - -#if V2 - public override string ChangedToVirtual() - { - typeof(Dictionary).ToString(); - return typeof(List).ToString(); - } -#endif -} - -[StructLayout(LayoutKind.Sequential)] -public class MyClassWithLayout -{ -#if V2 - public int _field1; - public int _field2; - public int _field3; -#endif -} - -public struct MyGrowingStruct -{ - int x; - int y; -#if V2 - Object o1; - Object o2; -#endif - - static public MyGrowingStruct Construct() - { - return new MyGrowingStruct() { x = 111, y = 222 }; - } - - public static void Check(ref MyGrowingStruct s) - { - Assert.AreEqual(s.x, 111); - Assert.AreEqual(s.y, 222); - } -} - -public struct MyChangingStruct -{ -#if V2 - public int y; - public int x; -#else - public int x; - public int y; -#endif - - static public MyChangingStruct Construct() - { - return new MyChangingStruct() { x = 111, y = 222 }; - } - - public static void Check(ref MyChangingStruct s) - { - Assert.AreEqual(s.x, 112); - Assert.AreEqual(s.y, 222); - } -} - -public struct MyChangingHFAStruct -{ -#if V2 - float x; - float y; -#else - int x; - int y; -#endif - static public MyChangingHFAStruct Construct() - { - return new MyChangingHFAStruct() { x = 12, y = 23 }; - } - - public static void Check(MyChangingHFAStruct s) - { -#if V2 - Assert.AreEqual(s.x, 12.0f); - Assert.AreEqual(s.y, 23.0f); -#else - Assert.AreEqual(s.x, 12); - Assert.AreEqual(s.y, 23); -#endif - } -} - -public struct MyStructWithVirtuals -{ - public string X; - -#if V2 - public override string ToString() - { - X = "Overriden"; - return base.ToString(); - } -#endif -} - -public class ByteBaseClass : List -{ - public byte BaseByte; -} -public class ByteChildClass : ByteBaseClass -{ - public byte ChildByte; - - [MethodImplAttribute(MethodImplOptions.NoInlining)] - public ByteChildClass(byte value) - { - ChildByte = 67; - } -} - -public enum MyEnum -{ - Apple = 1, - Banana = 2, - Orange = 3 -} diff --git a/src/coreclr/tests/src/reflection/StaticInterfaceMembers/provider.il b/src/coreclr/tests/src/reflection/StaticInterfaceMembers/provider.il deleted file mode 100644 index 8ce9d85ed892..000000000000 --- a/src/coreclr/tests/src/reflection/StaticInterfaceMembers/provider.il +++ /dev/null @@ -1,34 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -.assembly provider { } - -.assembly extern mscorlib { } - -.class interface public IFoo -{ - .field public static class [mscorlib]System.Type O - - .method public static specialname rtspecialname void .cctor() - { - ldtoken !T[] - call class [mscorlib]System.Type class [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) - stsfld class [mscorlib]System.Type class IFoo::O - ret - } - - .method public static class [mscorlib]System.Type GimmeT() - { - ldtoken !T - call class [mscorlib]System.Type class [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) - ret - } - - .method public static class [mscorlib]System.Type GimmeU() - { - ldtoken !!U - call class [mscorlib]System.Type class [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) - ret - } -} diff --git a/src/coreclr/tests/src/reflection/regression/reflectionrepromasterforsl/helper.cs b/src/coreclr/tests/src/reflection/regression/reflectionrepromasterforsl/helper.cs deleted file mode 100644 index a55940f7056d..000000000000 --- a/src/coreclr/tests/src/reflection/regression/reflectionrepromasterforsl/helper.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; -using System.Security; - -public class Helper -{ - [SecurityCritical] - public Helper(string s) - { - Console.WriteLine("FAIL: Public Helper..ctor(string) is called!"); - } - - [SecurityCritical] - internal Helper() - { - Console.WriteLine("FAIL: Internal Helper..ctor() is called!"); - } - - [SecurityCritical] - public static void PublicSecurityCriticalMethod() - { - Console.WriteLine("FAIL: Helper.PublicSecurityCriticalMethod is called!"); - } - - [SecurityCritical] - internal static void InternalSecurityCriticalMethod() - { - Console.WriteLine("FAIL: Helper.InternalSecurityCriticalMethod is called!"); - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/runtest.proj b/src/coreclr/tests/src/runtest.proj index b6615b50e8ef..adc7433ebd98 100644 --- a/src/coreclr/tests/src/runtest.proj +++ b/src/coreclr/tests/src/runtest.proj @@ -109,7 +109,7 @@ $(_XunitEpilog) - + diff --git a/src/coreclr/tests/src/tracing/common/TraceControl.cs b/src/coreclr/tests/src/tracing/common/TraceControl.cs deleted file mode 100644 index 434a90d898d1..000000000000 --- a/src/coreclr/tests/src/tracing/common/TraceControl.cs +++ /dev/null @@ -1,118 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Reflection; - -namespace Tracing.Tests.Common -{ - public static class TraceControl - { - private static MethodInfo m_enableMethod; - private static MethodInfo m_disableMethod; - - public static void EnableDefault() - { - EnableDefault(TimeSpan.FromMilliseconds(1)); - } - - public static void EnableDefault(string outputFile) - { - EnableDefault(TimeSpan.FromMilliseconds(1), outputFile); - } - - public static void EnableDefault(TimeSpan profSampleDelay, string outputFile="default.netperf") - { - // Setup the configuration values. - uint circularBufferMB = 1024; // 1 GB - uint level = 5; // Verbose - - // Create a new instance of EventPipeConfiguration. - TraceConfiguration config = new TraceConfiguration(outputFile, circularBufferMB); - // Setup the provider values. - // Public provider. - string providerName = "Microsoft-Windows-DotNETRuntime"; - UInt64 keywords = 0x4c14fccbd; - - // Enable the provider. - config.EnableProvider(providerName, keywords, level); - - // Private provider. - providerName = "Microsoft-Windows-DotNETRuntimePrivate"; - keywords = 0x4002000b; - - // Enable the provider. - config.EnableProvider(providerName, keywords, level); - - // Sample profiler. - providerName = "Microsoft-DotNETCore-SampleProfiler"; - keywords = 0x0; - - // Enable the provider. - config.EnableProvider(providerName, keywords, level); - - // Set the sampling rate. - config.SetSamplingRate(profSampleDelay); - - // Enable tracing. - Enable(config); - } - - public static void Enable(TraceConfiguration traceConfig) - { - m_enableMethod.Invoke( - null, - new object[] - { - traceConfig.ConfigurationObject - }); - } - - public static void Disable() - { - m_disableMethod.Invoke( - null, - null); - } - - static TraceControl() - { - if(!Initialize()) - { - throw new InvalidOperationException("Reflection failed."); - } - } - - private static bool Initialize() - { - Assembly SPC = typeof(System.Diagnostics.Tracing.EventSource).Assembly; - if(SPC == null) - { - Console.WriteLine("System.Private.CoreLib assembly == null"); - return false; - } - Type eventPipeType = SPC.GetType("System.Diagnostics.Tracing.EventPipe"); - if(eventPipeType == null) - { - Console.WriteLine("System.Diagnostics.Tracing.EventPipe type == null"); - return false; - } - m_enableMethod = eventPipeType.GetMethod("Enable", BindingFlags.NonPublic | BindingFlags.Static); - if(m_enableMethod == null) - { - Console.WriteLine("EventPipe.Enable method == null"); - return false; - } - m_disableMethod = eventPipeType.GetMethod("Disable", BindingFlags.NonPublic | BindingFlags.Static); - if(m_disableMethod == null) - { - Console.WriteLine("EventPipe.Disable method == null"); - return false; - } - - return true; - } - - } -} diff --git a/src/coreclr/tests/src/tracing/eventpipe/gcdump/gcdump.cs b/src/coreclr/tests/src/tracing/eventpipe/gcdump/gcdump.cs new file mode 100644 index 000000000000..1ee96f83781c --- /dev/null +++ b/src/coreclr/tests/src/tracing/eventpipe/gcdump/gcdump.cs @@ -0,0 +1,111 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Diagnostics.Tracing; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Microsoft.Diagnostics.NETCore.Client; +using Microsoft.Diagnostics.Tools.RuntimeClient; +using Microsoft.Diagnostics.Tracing; +using Microsoft.Diagnostics.Tracing.Parsers; +using Tracing.Tests.Common; +using Microsoft.Diagnostics.Tracing.Parsers.Clr; + +namespace Tracing.Tests.EventSourceError +{ + // Regression test for https://github.com/dotnet/runtime/issues/38639 + public class GCDumpTest + { + private static int _bulkTypeCount = 0; + private static int _bulkNodeCount = 0; + private static int _bulkEdgeCount = 0; + private static int _bulkRootEdgeCount = 0; + private static int _bulkRootStaticVarCount = 0; + + private static readonly ulong GC_HeapDump_Keyword = 0x100000UL; + + public static int Main(string[] args) + { + // This test validates that if an EventSource generates an error + // during construction it gets emitted over EventPipe + + List providers = new List + { + new Provider("Microsoft-Windows-DotNETRuntime", eventLevel: EventLevel.Verbose, keywords: (ulong)ClrTraceEventParser.Keywords.GCHeapSnapshot) + }; + + var configuration = new SessionConfiguration(circularBufferSizeMB: 1024, format: EventPipeSerializationFormat.NetTrace, providers: providers); + return IpcTraceTest.RunAndValidateEventCounts(_expectedEventCounts, _eventGeneratingAction, configuration, _DoesRundownContainMethodEvents); + } + + private static Dictionary _expectedEventCounts = new Dictionary() + { + // This space intentionally left blank + }; + + private static Action _eventGeneratingAction = () => + { + // This space intentionally left blank + }; + + private static Func> _DoesRundownContainMethodEvents = (source) => + { + source.Clr.TypeBulkType += (GCBulkTypeTraceData data) => + { + _bulkTypeCount += data.Count; + }; + + source.Clr.GCBulkNode += delegate (GCBulkNodeTraceData data) + { + _bulkNodeCount += data.Count; + }; + + source.Clr.GCBulkEdge += (GCBulkEdgeTraceData data) => + { + _bulkEdgeCount += data.Count; + }; + + source.Clr.GCBulkRootEdge += (GCBulkRootEdgeTraceData data) => + { + _bulkRootEdgeCount += data.Count; + }; + + source.Clr.GCBulkRootStaticVar += (GCBulkRootStaticVarTraceData data) => + { + _bulkRootStaticVarCount += data.Count; + }; + + return () => + { + // These values are ~80% (rounded to nice whole numbers) of the values + // I saw when writing the test. The idea is that I want to catch + // any real deviation in the number of types, but don't want to have + // to maintain this test as the number of types varies. (And they will vary due to + // framework code changes). If this test needs any sort of ongoing maintenance + // just change all these values to a low number like 10 and move on. + if (_bulkTypeCount > 125 + && _bulkNodeCount > 600 + && _bulkEdgeCount > 850 + && _bulkRootEdgeCount > 250 + && _bulkRootStaticVarCount > 70) + { + return 100; + } + + + Console.WriteLine($"Test failed due to missing GC heap events."); + Console.WriteLine($"_bulkTypeCount = {_bulkTypeCount}"); + Console.WriteLine($"_bulkNodeCount = {_bulkNodeCount}"); + Console.WriteLine($"_bulkEdgeCount = {_bulkEdgeCount}"); + Console.WriteLine($"_bulkRootEdgeCount = {_bulkRootEdgeCount}"); + Console.WriteLine($"_bulkRootStaticVarCount = {_bulkRootStaticVarCount}"); + return -1; + }; + }; + } +} \ No newline at end of file diff --git a/src/coreclr/tests/src/tracing/eventpipe/eventsourceerror/eventsourceerror.csproj b/src/coreclr/tests/src/tracing/eventpipe/gcdump/gcdump.csproj similarity index 100% rename from src/coreclr/tests/src/tracing/eventpipe/eventsourceerror/eventsourceerror.csproj rename to src/coreclr/tests/src/tracing/eventpipe/gcdump/gcdump.csproj diff --git a/src/coreclr/tests/src/tracing/eventpipe/reverse/reverse.cs b/src/coreclr/tests/src/tracing/eventpipe/reverse/reverse.cs deleted file mode 100644 index c100df09d148..000000000000 --- a/src/coreclr/tests/src/tracing/eventpipe/reverse/reverse.cs +++ /dev/null @@ -1,345 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Diagnostics.Tracing; -using System.Diagnostics; -using System.Linq; -using System.Threading.Tasks; -using System.Collections.Generic; -using System.Reflection; -using Microsoft.Diagnostics.Tools.RuntimeClient; -using Tracing.Tests.Common; -using System.Text; -using System.Threading; -using System.IO; -using Microsoft.Diagnostics.Tracing; - -namespace Tracing.Tests.ReverseValidation -{ - public class ReverseValidation - { - // The runtime will do an exponential falloff by a factor of 1.25 starting at 10ms with a max of 500ms - // We can time tests out after waiting 30s which should have sufficient attempts - private static int _maxPollTimeMS = 30_000; - - public static async Task TEST_RuntimeIsResilientToServerClosing() - { - bool fSuccess = true; - string serverName = ReverseServer.MakeServerAddress(); - Logger.logger.Log($"Server name is '{serverName}'"); - Task subprocessTask = Utils.RunSubprocess( - currentAssembly: Assembly.GetExecutingAssembly(), - environment: new Dictionary - { - { Utils.DiagnosticsMonitorAddressEnvKey, serverName }, - { Utils.DiagnosticsMonitorPauseOnStartEnvKey, "0" } - }, - duringExecution: async (_) => - { - var ad1 = await Utils.WaitTillTimeout(ReverseServer.CreateServerAndReceiveAdvertisement(serverName), TimeSpan.FromMilliseconds(_maxPollTimeMS)); - Logger.logger.Log(ad1.ToString()); - var ad2 = await Utils.WaitTillTimeout(ReverseServer.CreateServerAndReceiveAdvertisement(serverName), TimeSpan.FromMilliseconds(_maxPollTimeMS)); - Logger.logger.Log(ad2.ToString()); - var ad3 = await Utils.WaitTillTimeout(ReverseServer.CreateServerAndReceiveAdvertisement(serverName), TimeSpan.FromMilliseconds(_maxPollTimeMS)); - Logger.logger.Log(ad3.ToString()); - var ad4 = await Utils.WaitTillTimeout(ReverseServer.CreateServerAndReceiveAdvertisement(serverName), TimeSpan.FromMilliseconds(_maxPollTimeMS)); - Logger.logger.Log(ad4.ToString()); - } - ); - - fSuccess &= await Utils.WaitTillTimeout(subprocessTask, TimeSpan.FromMinutes(1)); - - return fSuccess; - } - - public static async Task TEST_RuntimeConnectsToExistingServer() - { - bool fSuccess = true; - string serverName = ReverseServer.MakeServerAddress(); - Task advertiseTask = ReverseServer.CreateServerAndReceiveAdvertisement(serverName); - Logger.logger.Log($"Server name is `{serverName}`"); - Task subprocessTask = Utils.RunSubprocess( - currentAssembly: Assembly.GetExecutingAssembly(), - environment: new Dictionary - { - { Utils.DiagnosticsMonitorAddressEnvKey, serverName }, - { Utils.DiagnosticsMonitorPauseOnStartEnvKey, "0" } - }, - duringExecution: async (_) => - { - IpcAdvertise advertise = await Utils.WaitTillTimeout(advertiseTask, TimeSpan.FromMilliseconds(_maxPollTimeMS)); - Logger.logger.Log(advertise.ToString()); - } - ); - - fSuccess &= await Utils.WaitTillTimeout(subprocessTask, TimeSpan.FromMinutes(1)); - - return fSuccess; - } - - - public static async Task TEST_CanConnectServerAndClientAtSameTime() - { - bool fSuccess = true; - string serverName = ReverseServer.MakeServerAddress(); - Logger.logger.Log($"Server name is '{serverName}'"); - var server = new ReverseServer(serverName); - Task subprocessTask = Utils.RunSubprocess( - currentAssembly: Assembly.GetExecutingAssembly(), - environment: new Dictionary - { - { Utils.DiagnosticsMonitorAddressEnvKey, serverName }, - { Utils.DiagnosticsMonitorPauseOnStartEnvKey, "0" } - }, - duringExecution: async (int pid) => - { - Task reverseTask = Task.Run(async () => - { - Logger.logger.Log($"Waiting for reverse connection"); - Stream reverseStream = await server.AcceptAsync(); - Logger.logger.Log("Got reverse connection"); - IpcAdvertise advertise = IpcAdvertise.Parse(reverseStream); - Logger.logger.Log(advertise.ToString()); - }); - - Task regularTask = Task.Run(async () => - { - var config = new SessionConfiguration( - circularBufferSizeMB: 1000, - format: EventPipeSerializationFormat.NetTrace, - providers: new List { - new Provider("Microsoft-DotNETCore-SampleProfiler") - }); - Logger.logger.Log("Starting EventPipeSession over standard connection"); - using Stream stream = EventPipeClient.CollectTracing(pid, config, out var sessionId); - Logger.logger.Log($"Started EventPipeSession over standard connection with session id: 0x{sessionId:x}"); - using var source = new EventPipeEventSource(stream); - Task readerTask = Task.Run(() => source.Process()); - await Task.Delay(500); - Logger.logger.Log("Stopping EventPipeSession over standard connection"); - EventPipeClient.StopTracing(pid, sessionId); - await readerTask; - Logger.logger.Log("Stopped EventPipeSession over standard connection"); - }); - - await Task.WhenAll(reverseTask, regularTask); - } - ); - - fSuccess &= await Utils.WaitTillTimeout(subprocessTask, TimeSpan.FromMinutes(1)); - server.Shutdown(); - - return fSuccess; - } - - public static async Task TEST_ServerWorksIfClientDoesntAccept() - { - bool fSuccess = true; - string serverName = ReverseServer.MakeServerAddress(); - Logger.logger.Log($"Server name is '{serverName}'"); - var server = new ReverseServer(serverName); - Task subprocessTask = Utils.RunSubprocess( - currentAssembly: Assembly.GetExecutingAssembly(), - environment: new Dictionary - { - { Utils.DiagnosticsMonitorAddressEnvKey, serverName }, - { Utils.DiagnosticsMonitorPauseOnStartEnvKey, "0" } - }, - duringExecution: async (int pid) => - { - var config = new SessionConfiguration( - circularBufferSizeMB: 10, - format: EventPipeSerializationFormat.NetTrace, - providers: new List { - new Provider("Microsoft-DotNETCore-SampleProfiler") - }); - Logger.logger.Log("Starting EventPipeSession over standard connection"); - using Stream stream = EventPipeClient.CollectTracing(pid, config, out var sessionId); - Logger.logger.Log($"Started EventPipeSession over standard connection with session id: 0x{sessionId:x}"); - using var source = new EventPipeEventSource(stream); - Task readerTask = Task.Run(() => source.Process()); - await Task.Delay(500); - Logger.logger.Log("Stopping EventPipeSession over standard connection"); - EventPipeClient.StopTracing(pid, sessionId); - await readerTask; - Logger.logger.Log("Stopped EventPipeSession over standard connection"); - } - ); - - fSuccess &= await Utils.WaitTillTimeout(subprocessTask, TimeSpan.FromMinutes(1)); - server.Shutdown(); - - return true; - } - - public static async Task TEST_ServerIsResilientToNoBufferAgent() - { - bool fSuccess = true; - // N.B. - this test is only testing behavior on Windows since Unix Domain Sockets get their buffer size from the - // system configuration and isn't set here. Tests passing on Windows should indicate it would pass on Unix systems as well. - string serverName = ReverseServer.MakeServerAddress(); - Logger.logger.Log($"Server name is '{serverName}'"); - var server = new ReverseServer(serverName, 0); - Task subprocessTask = Utils.RunSubprocess( - currentAssembly: Assembly.GetExecutingAssembly(), - environment: new Dictionary - { - { Utils.DiagnosticsMonitorAddressEnvKey, serverName }, - { Utils.DiagnosticsMonitorPauseOnStartEnvKey, "0" } - }, - duringExecution: async (int pid) => - { - var config = new SessionConfiguration( - circularBufferSizeMB: 10, - format: EventPipeSerializationFormat.NetTrace, - providers: new List { - new Provider("Microsoft-DotNETCore-SampleProfiler") - }); - Logger.logger.Log("Starting EventPipeSession over standard connection"); - using Stream stream = EventPipeClient.CollectTracing(pid, config, out var sessionId); - Logger.logger.Log($"Started EventPipeSession over standard connection with session id: 0x{sessionId:x}"); - using var source = new EventPipeEventSource(stream); - Task readerTask = Task.Run(() => source.Process()); - await Task.Delay(500); - Logger.logger.Log("Stopping EventPipeSession over standard connection"); - EventPipeClient.StopTracing(pid, sessionId); - await readerTask; - Logger.logger.Log("Stopped EventPipeSession over standard connection"); - } - ); - - fSuccess &= await Utils.WaitTillTimeout(subprocessTask, TimeSpan.FromMinutes(1)); - server.Shutdown(); - - return fSuccess; - } - - public static async Task TEST_ReverseConnectionCanRecycleWhileTracing() - { - bool fSuccess = true; - string serverName = ReverseServer.MakeServerAddress(); - Logger.logger.Log($"Server name is '{serverName}'"); - Task subprocessTask = Utils.RunSubprocess( - currentAssembly: Assembly.GetExecutingAssembly(), - environment: new Dictionary - { - { Utils.DiagnosticsMonitorAddressEnvKey, serverName }, - { Utils.DiagnosticsMonitorPauseOnStartEnvKey, "0" } - }, - duringExecution: async (int pid) => - { - Task regularTask = Task.Run(async () => - { - var config = new SessionConfiguration( - circularBufferSizeMB: 1000, - format: EventPipeSerializationFormat.NetTrace, - providers: new List { - new Provider("Microsoft-DotNETCore-SampleProfiler") - }); - Logger.logger.Log("Starting EventPipeSession over standard connection"); - using Stream stream = EventPipeClient.CollectTracing(pid, config, out var sessionId); - Logger.logger.Log($"Started EventPipeSession over standard connection with session id: 0x{sessionId:x}"); - using var source = new EventPipeEventSource(stream); - Task readerTask = Task.Run(() => source.Process()); - await Task.Delay(500); - Logger.logger.Log("Stopping EventPipeSession over standard connection"); - EventPipeClient.StopTracing(pid, sessionId); - await readerTask; - Logger.logger.Log("Stopped EventPipeSession over standard connection"); - }); - - Task reverseTask = Task.Run(async () => - { - var ad1 = await Utils.WaitTillTimeout(ReverseServer.CreateServerAndReceiveAdvertisement(serverName), TimeSpan.FromMilliseconds(_maxPollTimeMS)); - Logger.logger.Log(ad1.ToString()); - var ad2 = await Utils.WaitTillTimeout(ReverseServer.CreateServerAndReceiveAdvertisement(serverName), TimeSpan.FromMilliseconds(_maxPollTimeMS)); - Logger.logger.Log(ad2.ToString()); - var ad3 = await Utils.WaitTillTimeout(ReverseServer.CreateServerAndReceiveAdvertisement(serverName), TimeSpan.FromMilliseconds(_maxPollTimeMS)); - Logger.logger.Log(ad3.ToString()); - var ad4 = await Utils.WaitTillTimeout(ReverseServer.CreateServerAndReceiveAdvertisement(serverName), TimeSpan.FromMilliseconds(_maxPollTimeMS)); - Logger.logger.Log(ad4.ToString()); - }); - - await Task.WhenAll(reverseTask, regularTask); - } - ); - - fSuccess &= await Utils.WaitTillTimeout(subprocessTask, TimeSpan.FromMinutes(1)); - - return fSuccess; - } - - public static async Task TEST_StandardConnectionStillWorksIfReverseConnectionIsBroken() - { - bool fSuccess = true; - string serverName = ReverseServer.MakeServerAddress(); - Logger.logger.Log($"Server name is '{serverName}'"); - Task subprocessTask = Utils.RunSubprocess( - currentAssembly: Assembly.GetExecutingAssembly(), - environment: new Dictionary - { - { Utils.DiagnosticsMonitorAddressEnvKey, serverName }, - { Utils.DiagnosticsMonitorPauseOnStartEnvKey, "0" } - }, - duringExecution: async (int pid) => - { - var config = new SessionConfiguration( - circularBufferSizeMB: 1000, - format: EventPipeSerializationFormat.NetTrace, - providers: new List { - new Provider("Microsoft-DotNETCore-SampleProfiler") - }); - Logger.logger.Log("Starting EventPipeSession over standard connection"); - using Stream stream = EventPipeClient.CollectTracing(pid, config, out var sessionId); - Logger.logger.Log($"Started EventPipeSession over standard connection with session id: 0x{sessionId:x}"); - using var source = new EventPipeEventSource(stream); - Task readerTask = Task.Run(() => source.Process()); - await Task.Delay(500); - Logger.logger.Log("Stopping EventPipeSession over standard connection"); - EventPipeClient.StopTracing(pid, sessionId); - await readerTask; - Logger.logger.Log("Stopped EventPipeSession over standard connection"); - } - ); - - fSuccess &= await Utils.WaitTillTimeout(subprocessTask, TimeSpan.FromMinutes(1)); - - return fSuccess; - } - - public static async Task Main(string[] args) - { - if (args.Length >= 1) - { - Console.Out.WriteLine("Subprocess started! Waiting for input..."); - var input = Console.In.ReadLine(); // will block until data is sent across stdin - Console.Out.WriteLine($"Received '{input}'. Exiting..."); - return 0; - } - - bool fSuccess = true; - IEnumerable tests = typeof(ReverseValidation).GetMethods().Where(mi => mi.Name.StartsWith("TEST_")); - foreach (var test in tests) - { - Logger.logger.Log($"::== Running test: {test.Name}"); - bool result = true; - try - { - result = await (Task)test.Invoke(null, new object[] {}); - } - catch (Exception e) - { - result = false; - Logger.logger.Log(e.ToString()); - } - fSuccess &= result; - Logger.logger.Log($"Test passed: {result}"); - Logger.logger.Log($""); - - } - return fSuccess ? 100 : -1; - } - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/tracing/eventpipe/reverse/reverse.csproj b/src/coreclr/tests/src/tracing/eventpipe/reverse/reverse.csproj deleted file mode 100644 index 2c10c6ed4653..000000000000 --- a/src/coreclr/tests/src/tracing/eventpipe/reverse/reverse.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - .NETCoreApp - exe - BuildAndRun - true - 0 - true - true - - - - - - \ No newline at end of file diff --git a/src/coreclr/tests/src/tracing/tracecontrol/TraceControl.cs b/src/coreclr/tests/src/tracing/tracecontrol/TraceControl.cs deleted file mode 100644 index 99e552ac4ea1..000000000000 --- a/src/coreclr/tests/src/tracing/tracecontrol/TraceControl.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Diagnostics.Tracing; -using System.IO; -using System.Reflection; -using System.Threading; -using System.Threading.Tasks; -using Tracing.Tests.Common; - -using Microsoft.Diagnostics.Tracing; -using Microsoft.Diagnostics.Tracing.Parsers.Clr; - -namespace Tracing.Tests -{ - public static class TraceControlTest - { - public static int Main(string[] args) - { - return new TraceControlTraceTest().Execute(); - } - } - - public class TraceControlTraceTest : AbstractTraceTest - { - private bool pass; - - private static string ConfigFileContents = @" -OutputPath=. -CircularMB=2048 -Providers=*:0xFFFFFFFFFFFFFFFF:5: -"; - protected override string GetConfigFileContents() - { - return ConfigFileContents; - } - - protected override void InstallValidationCallbacks(TraceEventDispatcher trace) - { - string gcReasonInduced = GCReason.Induced.ToString(); - trace.Clr.GCTriggered += delegate (GCTriggeredTraceData data) - { - if (gcReasonInduced.Equals(data.Reason.ToString())) - { - Console.WriteLine("Detected an induced GC"); - pass = true; - } - }; - } - - protected override bool Pass() - { - return this.pass; - } - } -} diff --git a/src/coreclr/tests/testenvironment.proj b/src/coreclr/tests/testenvironment.proj index 199382c46df9..fcb722769e9e 100644 --- a/src/coreclr/tests/testenvironment.proj +++ b/src/coreclr/tests/testenvironment.proj @@ -7,6 +7,10 @@ + COMPlus_TieredCompilation; @@ -48,7 +52,8 @@ COMPlus_TieredPGO; COMPlus_JitEnableGuardedDevirtualization; COMPlus_EnableEHWriteThru; - COMPlus_JitObjectStackAllocation + COMPlus_JitObjectStackAllocation; + RunningIlasmRoundTrip @@ -140,6 +145,8 @@ + + <_TestEnvFileLine Include="set MONO_ENV_OPTIONS=--interpreter" Condition="'$(Scenario)' == 'interpreter'" /> + + + <_TestEnvFileLine Condition="'$(Scenario)' == 'clrinterpreter'" Include="set COMPlus_Interpret=%2A" /> + <_TestEnvFileLine Condition="'$(Scenario)' == 'clrinterpreter'" Include="set COMPlus_InterpreterHWIntrinsicsIsSupportedFalse=1" /> + <_TestEnvFileLine Condition="'$(Scenario)' == 'clrinterpreter'" Include="set COMPlus_InterpreterJITThreshold=0x1000" /> + <_TestEnvFileLine Condition="'$(Scenario)' == 'clrinterpreter'" Include="set COMPlus_TC_CallCountThreshold=0x1000" /> + <_TestEnvFileLine Condition="'$(Scenario)' == 'clrinterpreter'" Include="set COMPlus_InterpreterDoLoopMethods=1" /> <_TestEnvFileLine Include="#!/usr/bin/env bash" /> <_TestEnvFileLine Include="@(_COMPlusVariable->'export %(Identity)=%(Value)')" /> + + <_TestEnvFileLine Include="export MONO_ENV_OPTIONS=--interpreter" Condition="'$(Scenario)' == 'interpreter'" /> + + + <_TestEnvFileLine Condition="'$(Scenario)' == 'clrinterpreter'" Include="export COMPlus_Interpret=%2A" /> + <_TestEnvFileLine Condition="'$(Scenario)' == 'clrinterpreter'" Include="export COMPlus_InterpreterHWIntrinsicsIsSupportedFalse=1" /> + <_TestEnvFileLine Condition="'$(Scenario)' == 'clrinterpreter'" Include="export COMPlus_InterpreterJITThreshold=0x1000" /> + <_TestEnvFileLine Condition="'$(Scenario)' == 'clrinterpreter'" Include="export COMPlus_TC_CallCountThreshold=0x1000" /> + <_TestEnvFileLine Condition="'$(Scenario)' == 'clrinterpreter'" Include="export COMPlus_InterpreterDoLoopMethods=1" /> diff --git a/src/coreclr/tryrun.cmake b/src/coreclr/tryrun.cmake index 5fdc28a4f204..a70a7b6936ba 100644 --- a/src/coreclr/tryrun.cmake +++ b/src/coreclr/tryrun.cmake @@ -6,22 +6,21 @@ macro(set_cache_value) set(${ARGV0}__TRYRUN_OUTPUT "dummy output" CACHE STRING "Output from TRY_RUN" FORCE) endmacro() -if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/armv6-alpine-linux-musleabihf OR +if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/armv7-alpine-linux-musleabihf OR + EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/armv6-alpine-linux-musleabihf OR EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/aarch64-alpine-linux-musl) - - SET(ALPINE_LINUX 1) -else() - SET(ALPINE_LINUX 0) - if(EXISTS ${CROSS_ROOTFS}/bin/freebsd-version) - set(FREEBSD 1) - set(CMAKE_SYSTEM_NAME FreeBSD) - set(CLR_CMAKE_TARGET_OS FreeBSD) - else() - SET(FREEBSD 0) - endif() + + set(ALPINE_LINUX 1) +elseif(EXISTS ${CROSS_ROOTFS}/bin/freebsd-version) + set(FREEBSD 1) + set(CMAKE_SYSTEM_NAME FreeBSD) + set(CLR_CMAKE_TARGET_OS FreeBSD) +elseif(EXISTS ${CROSS_ROOTFS}/usr/platform/i86pc) + set(ILLUMOS 1) + set(CLR_CMAKE_TARGET_OS SunOS) endif() -if(TARGET_ARCH_NAME MATCHES "^(armel|arm|arm64|x86)$" OR FREEBSD) +if(TARGET_ARCH_NAME MATCHES "^(armel|arm|arm64|x86)$" OR FREEBSD OR ILLUMOS) set_cache_value(FILE_OPS_CHECK_FERROR_OF_PREVIOUS_CALL_EXITCODE 1) set_cache_value(GETPWUID_R_SETS_ERRNO_EXITCODE 0) set_cache_value(HAS_POSIX_SEMAPHORES_EXITCODE 0) @@ -68,11 +67,29 @@ if(TARGET_ARCH_NAME MATCHES "^(armel|arm|arm64|x86)$" OR FREEBSD) set_cache_value(HAVE_BROKEN_FIFO_KEVENT_EXITCODE 1) set_cache_value(HAVE_PROCFS_MAPS 0) set_cache_value(HAVE_PROCFS_STAT 0) - set_cache_value(HAVE_PROCFS_STATUS 0) + set_cache_value(HAVE_PROCFS_STATUS_EXITCODE 1) set_cache_value(GETPWUID_R_SETS_ERRNO 0) set_cache_value(UNGETC_NOT_RETURN_EOF 0) set_cache_value(HAVE_COMPATIBLE_ILOGBNAN 1) set_cache_value(HAVE_FUNCTIONAL_PTHREAD_ROBUST_MUTEXES_EXITCODE 0) + elseif(ILLUMOS) + set_cache_value(GETPWUID_R_SETS_ERRNO_EXITCODE 1) + set_cache_value(HAVE_COMPATIBLE_ACOS_EXITCODE 1) + set_cache_value(HAVE_COMPATIBLE_ASIN_EXITCODE 1) + set_cache_value(HAVE_COMPATIBLE_ATAN2_EXITCODE 1) + set_cache_value(HAVE_COMPATIBLE_POW_EXITCODE 1) + set_cache_value(HAVE_COMPATIBLE_ILOGBNAN_EXITCODE 0) + set_cache_value(HAVE_COMPATIBLE_LOG10_EXITCODE 1) + set_cache_value(HAVE_COMPATIBLE_LOG_EXITCODE 1) + set_cache_value(HAVE_LARGE_SNPRINTF_SUPPORT_EXITCODE 1) + set_cache_value(HAVE_PROCFS_CTL_EXITCODE 0) + set_cache_value(SSCANF_CANNOT_HANDLE_MISSING_EXPONENT_EXITCODE 1) + set_cache_value(SSCANF_SUPPORT_ll_EXITCODE 1) + set_cache_value(UNGETC_NOT_RETURN_EOF_EXITCODE 0) + set_cache_value(COMPILER_SUPPORTS_W_CLASS_MEMACCESS 1) + set_cache_value(HAVE_SET_MAX_VARIABLE 1) + set_cache_value(HAVE_FULLY_FEATURED_PTHREAD_MUTEXES 1) + set_cache_value(HAVE_FUNCTIONAL_PTHREAD_ROBUST_MUTEXES_EXITCODE 0) endif() else() message(FATAL_ERROR "Arch is ${TARGET_ARCH_NAME}. Only armel, arm, arm64 and x86 are supported!") diff --git a/src/installer/Directory.Build.props b/src/installer/Directory.Build.props index dcd3615ded3e..9c82b3bc21f3 100644 --- a/src/installer/Directory.Build.props +++ b/src/installer/Directory.Build.props @@ -213,7 +213,6 @@ true - true true diff --git a/src/installer/corehost/CMakeLists.txt b/src/installer/corehost/CMakeLists.txt index 2343e3a74188..651a63be0cac 100644 --- a/src/installer/corehost/CMakeLists.txt +++ b/src/installer/corehost/CMakeLists.txt @@ -12,7 +12,7 @@ if(MSVC) elseif (CMAKE_CXX_COMPILER_ID MATCHES GNU) # Prevents libc from calling pthread_cond_destroy on static objects in # dlopen()'ed library which we dlclose() in pal::unload_library. - add_compile_options(-fno-use-cxa-atexit) + add_compile_options($<$:-fno-use-cxa-atexit>) endif() add_subdirectory(cli) diff --git a/src/installer/corehost/build.cmd b/src/installer/corehost/build.cmd index 6aa58a49495f..f49451656913 100644 --- a/src/installer/corehost/build.cmd +++ b/src/installer/corehost/build.cmd @@ -38,6 +38,8 @@ if /i [%1] == [commit] (set __CommitSha=%2&&shift&&shift&goto Arg_Loop) if /i [%1] == [incremental-native-build] ( set __IncrementalNativeBuild=1&&shift&goto Arg_Loop) if /i [%1] == [rootDir] ( set __rootDir=%2&&shift&&shift&goto Arg_Loop) +if /i [%1] == [coreclrartifacts] (set __CoreClrArtifacts=%2&&shift&&shift&goto Arg_Loop) + shift goto :Arg_Loop @@ -64,9 +66,9 @@ if "%VisualStudioVersion%"=="16.0" ( ) :MissingVersion -:: Can't find VS 2017, 2019 -echo Error: Visual Studio 2017 or 2019 required -echo Please see https://github.com/dotnet/runtime/tree/master/docs/installer/building/windows-instructions.md for build instructions. +:: Can't find required VS install +echo Error: Visual Studio 2019 required +echo Please see https://github.com/dotnet/runtime/blob/master/docs/workflow/requirements/windows-requirements.md for build requirements. exit /b 1 :VS2019 diff --git a/src/installer/corehost/build.proj b/src/installer/corehost/build.proj index 4a475a45589d..6a3f561209e1 100644 --- a/src/installer/corehost/build.proj +++ b/src/installer/corehost/build.proj @@ -33,6 +33,7 @@ $(BuildArgs) -cross $(BuildArgs) $(Compiler) $(BuildArgs) $(CMakeArgs) + $(BuildArgs) -coreclrartifacts $(CoreCLRArtifactsPath) + + + + + true + + + true diff --git a/src/installer/pkg/projects/Microsoft.NETCore.DotNetAppHost/Microsoft.NETCore.DotNetAppHost.props b/src/installer/pkg/projects/Microsoft.NETCore.DotNetAppHost/Microsoft.NETCore.DotNetAppHost.props index 5508f949fc49..abf841cbd26e 100644 --- a/src/installer/pkg/projects/Microsoft.NETCore.DotNetAppHost/Microsoft.NETCore.DotNetAppHost.props +++ b/src/installer/pkg/projects/Microsoft.NETCore.DotNetAppHost/Microsoft.NETCore.DotNetAppHost.props @@ -14,7 +14,11 @@ + + diff --git a/src/installer/pkg/projects/netcoreapp/pkg/Directory.Build.props b/src/installer/pkg/projects/netcoreapp/pkg/Directory.Build.props index b7dddda9db12..39b2cdc97461 100644 --- a/src/installer/pkg/projects/netcoreapp/pkg/Directory.Build.props +++ b/src/installer/pkg/projects/netcoreapp/pkg/Directory.Build.props @@ -18,8 +18,6 @@ - - @@ -27,8 +25,6 @@ - - diff --git a/src/installer/pkg/projects/netcoreapp/pkg/Microsoft.NETCore.App.Crossgen2.pkgproj b/src/installer/pkg/projects/netcoreapp/pkg/Microsoft.NETCore.App.Crossgen2.pkgproj index 93a1cbd56df0..08933b133652 100644 --- a/src/installer/pkg/projects/netcoreapp/pkg/Microsoft.NETCore.App.Crossgen2.pkgproj +++ b/src/installer/pkg/projects/netcoreapp/pkg/Microsoft.NETCore.App.Crossgen2.pkgproj @@ -57,9 +57,9 @@ - + - + diff --git a/src/installer/pkg/projects/netcoreapp/src/netcoreapp.depproj b/src/installer/pkg/projects/netcoreapp/src/netcoreapp.depproj index f49103041893..a28bc4994418 100644 --- a/src/installer/pkg/projects/netcoreapp/src/netcoreapp.depproj +++ b/src/installer/pkg/projects/netcoreapp/src/netcoreapp.depproj @@ -100,7 +100,7 @@ - + diff --git a/src/installer/tests/Assets/TestProjects/AppWithCustomEntryPoints/Program.cs b/src/installer/tests/Assets/TestProjects/AppWithCustomEntryPoints/Program.cs index 8b46ce6523ac..a65e6a99dbec 100644 --- a/src/installer/tests/Assets/TestProjects/AppWithCustomEntryPoints/Program.cs +++ b/src/installer/tests/Assets/TestProjects/AppWithCustomEntryPoints/Program.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/installer/tests/Assets/TestProjects/AppWithSubDirs/Program.cs b/src/installer/tests/Assets/TestProjects/AppWithSubDirs/Program.cs index 5b51c37991b7..c1a31dec9866 100644 --- a/src/installer/tests/Assets/TestProjects/AppWithSubDirs/Program.cs +++ b/src/installer/tests/Assets/TestProjects/AppWithSubDirs/Program.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/installer/tests/Assets/TestProjects/AppWithWait/Program.cs b/src/installer/tests/Assets/TestProjects/AppWithWait/Program.cs index 3c1c12a34695..9a2c22c60d49 100644 --- a/src/installer/tests/Assets/TestProjects/AppWithWait/Program.cs +++ b/src/installer/tests/Assets/TestProjects/AppWithWait/Program.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/installer/tests/Assets/TestProjects/BundleProbeTester/Program.cs b/src/installer/tests/Assets/TestProjects/BundleProbeTester/Program.cs index bd98ffe8a7f4..187e5d4c6fce 100644 --- a/src/installer/tests/Assets/TestProjects/BundleProbeTester/Program.cs +++ b/src/installer/tests/Assets/TestProjects/BundleProbeTester/Program.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/installer/tests/Assets/TestProjects/ComLibrary/ComLibrary.cs b/src/installer/tests/Assets/TestProjects/ComLibrary/ComLibrary.cs index addff5056d01..d5eb1adadae2 100644 --- a/src/installer/tests/Assets/TestProjects/ComLibrary/ComLibrary.cs +++ b/src/installer/tests/Assets/TestProjects/ComLibrary/ComLibrary.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; @@ -65,4 +64,4 @@ public class ComVisibleCustomProgId public class ExplicitNoProgId { } -} \ No newline at end of file +} diff --git a/src/installer/tests/Assets/TestProjects/ComLibraryConflictingGuid/ComLibraryConflictingGuid.cs b/src/installer/tests/Assets/TestProjects/ComLibraryConflictingGuid/ComLibraryConflictingGuid.cs index 82faeb1a3423..f0e20c3de2b9 100644 --- a/src/installer/tests/Assets/TestProjects/ComLibraryConflictingGuid/ComLibraryConflictingGuid.cs +++ b/src/installer/tests/Assets/TestProjects/ComLibraryConflictingGuid/ComLibraryConflictingGuid.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; @@ -28,4 +27,4 @@ public Server2() Console.WriteLine($"New instance of {nameof(Server2)} created"); } } -} \ No newline at end of file +} diff --git a/src/installer/tests/Assets/TestProjects/ComLibraryMissingGuid/ComLibraryMissingGuid.cs b/src/installer/tests/Assets/TestProjects/ComLibraryMissingGuid/ComLibraryMissingGuid.cs index fd813da88cc5..80b1160eab03 100644 --- a/src/installer/tests/Assets/TestProjects/ComLibraryMissingGuid/ComLibraryMissingGuid.cs +++ b/src/installer/tests/Assets/TestProjects/ComLibraryMissingGuid/ComLibraryMissingGuid.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; @@ -15,4 +14,4 @@ public Server() Console.WriteLine($"New instance of {nameof(Server)} created"); } } -} \ No newline at end of file +} diff --git a/src/installer/tests/Assets/TestProjects/ComponentWithNoDependencies/Component.cs b/src/installer/tests/Assets/TestProjects/ComponentWithNoDependencies/Component.cs index 19a160630dc3..56d41cd31129 100644 --- a/src/installer/tests/Assets/TestProjects/ComponentWithNoDependencies/Component.cs +++ b/src/installer/tests/Assets/TestProjects/ComponentWithNoDependencies/Component.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; @@ -51,4 +50,4 @@ public static int UnmanagedComponentEntryPoint1(IntPtr arg, int size) return unmanagedEntryPoint1CallCount; } } -} \ No newline at end of file +} diff --git a/src/installer/tests/Assets/TestProjects/HostApiInvokerApp/HostFXR.cs b/src/installer/tests/Assets/TestProjects/HostApiInvokerApp/HostFXR.cs index bcbe6b178e3b..6e67f50e8836 100644 --- a/src/installer/tests/Assets/TestProjects/HostApiInvokerApp/HostFXR.cs +++ b/src/installer/tests/Assets/TestProjects/HostApiInvokerApp/HostFXR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/installer/tests/Assets/TestProjects/HostApiInvokerApp/HostPolicy.cs b/src/installer/tests/Assets/TestProjects/HostApiInvokerApp/HostPolicy.cs index 5826fa1245c9..291f9e9cad4d 100644 --- a/src/installer/tests/Assets/TestProjects/HostApiInvokerApp/HostPolicy.cs +++ b/src/installer/tests/Assets/TestProjects/HostApiInvokerApp/HostPolicy.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -78,4 +77,4 @@ public static bool RunTest(string apiToTest, string[] args) return true; } } -} \ No newline at end of file +} diff --git a/src/installer/tests/Assets/TestProjects/HostApiInvokerApp/Program.cs b/src/installer/tests/Assets/TestProjects/HostApiInvokerApp/Program.cs index ffe5db339ff8..1455a80a358d 100644 --- a/src/installer/tests/Assets/TestProjects/HostApiInvokerApp/Program.cs +++ b/src/installer/tests/Assets/TestProjects/HostApiInvokerApp/Program.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/installer/tests/Assets/TestProjects/HostApiInvokerApp/Utils.cs b/src/installer/tests/Assets/TestProjects/HostApiInvokerApp/Utils.cs index 6b69d3737c3e..c907ce3fd765 100644 --- a/src/installer/tests/Assets/TestProjects/HostApiInvokerApp/Utils.cs +++ b/src/installer/tests/Assets/TestProjects/HostApiInvokerApp/Utils.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/installer/tests/Assets/TestProjects/LightupClient/Program.cs b/src/installer/tests/Assets/TestProjects/LightupClient/Program.cs index 864cff0935f8..131198bd890d 100644 --- a/src/installer/tests/Assets/TestProjects/LightupClient/Program.cs +++ b/src/installer/tests/Assets/TestProjects/LightupClient/Program.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/installer/tests/Assets/TestProjects/LightupLib/Program.cs b/src/installer/tests/Assets/TestProjects/LightupLib/Program.cs index fbd89fe4c004..2b70d4fea43b 100644 --- a/src/installer/tests/Assets/TestProjects/LightupLib/Program.cs +++ b/src/installer/tests/Assets/TestProjects/LightupLib/Program.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Reflection; diff --git a/src/installer/tests/Assets/TestProjects/LocalizedApp/Hello.Designer.cs b/src/installer/tests/Assets/TestProjects/LocalizedApp/Hello.Designer.cs index cbf8d0e5c553..298b82590123 100644 --- a/src/installer/tests/Assets/TestProjects/LocalizedApp/Hello.Designer.cs +++ b/src/installer/tests/Assets/TestProjects/LocalizedApp/Hello.Designer.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //------------------------------------------------------------------------------ // diff --git a/src/installer/tests/Assets/TestProjects/LocalizedApp/Program.cs b/src/installer/tests/Assets/TestProjects/LocalizedApp/Program.cs index 1999cc46f181..790181d3cc4a 100644 --- a/src/installer/tests/Assets/TestProjects/LocalizedApp/Program.cs +++ b/src/installer/tests/Assets/TestProjects/LocalizedApp/Program.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information.using System; using System; using System.Threading; diff --git a/src/installer/tests/Assets/TestProjects/PortableApp/Program.cs b/src/installer/tests/Assets/TestProjects/PortableApp/Program.cs index 5df7e2952f8f..c05e2d89d0b1 100644 --- a/src/installer/tests/Assets/TestProjects/PortableApp/Program.cs +++ b/src/installer/tests/Assets/TestProjects/PortableApp/Program.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/installer/tests/Assets/TestProjects/PortableAppWithException/Program.cs b/src/installer/tests/Assets/TestProjects/PortableAppWithException/Program.cs index ba28d518730c..636decae1113 100644 --- a/src/installer/tests/Assets/TestProjects/PortableAppWithException/Program.cs +++ b/src/installer/tests/Assets/TestProjects/PortableAppWithException/Program.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/installer/tests/Assets/TestProjects/PortableAppWithLongPath/Program.cs b/src/installer/tests/Assets/TestProjects/PortableAppWithLongPath/Program.cs index ec62b4984f91..8f9d62897c6d 100644 --- a/src/installer/tests/Assets/TestProjects/PortableAppWithLongPath/Program.cs +++ b/src/installer/tests/Assets/TestProjects/PortableAppWithLongPath/Program.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/installer/tests/Assets/TestProjects/PortableAppWithMissingRef/Program.cs b/src/installer/tests/Assets/TestProjects/PortableAppWithMissingRef/Program.cs index 84bf48564c46..249ff017708a 100644 --- a/src/installer/tests/Assets/TestProjects/PortableAppWithMissingRef/Program.cs +++ b/src/installer/tests/Assets/TestProjects/PortableAppWithMissingRef/Program.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using SharedLibrary; diff --git a/src/installer/tests/Assets/TestProjects/PortableAppWithMissingRef/SharedLibrary/SharedLibrary.cs b/src/installer/tests/Assets/TestProjects/PortableAppWithMissingRef/SharedLibrary/SharedLibrary.cs index 4d0f6a92de27..b13fad58d26b 100644 --- a/src/installer/tests/Assets/TestProjects/PortableAppWithMissingRef/SharedLibrary/SharedLibrary.cs +++ b/src/installer/tests/Assets/TestProjects/PortableAppWithMissingRef/SharedLibrary/SharedLibrary.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/installer/tests/Assets/TestProjects/PortableTestApp/Program.cs b/src/installer/tests/Assets/TestProjects/PortableTestApp/Program.cs index ab1b403e43a0..561893aff021 100644 --- a/src/installer/tests/Assets/TestProjects/PortableTestApp/Program.cs +++ b/src/installer/tests/Assets/TestProjects/PortableTestApp/Program.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Xunit; diff --git a/src/installer/tests/Assets/TestProjects/ResourceLookup/Program.cs b/src/installer/tests/Assets/TestProjects/ResourceLookup/Program.cs index 2ff9021b602c..86b343f3e48e 100644 --- a/src/installer/tests/Assets/TestProjects/ResourceLookup/Program.cs +++ b/src/installer/tests/Assets/TestProjects/ResourceLookup/Program.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/installer/tests/Assets/TestProjects/RuntimeProperties/Program.cs b/src/installer/tests/Assets/TestProjects/RuntimeProperties/Program.cs index d34be002d782..d22677aa617d 100644 --- a/src/installer/tests/Assets/TestProjects/RuntimeProperties/Program.cs +++ b/src/installer/tests/Assets/TestProjects/RuntimeProperties/Program.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/installer/tests/Assets/TestProjects/SharedFxLookupPortableApp/Program.cs b/src/installer/tests/Assets/TestProjects/SharedFxLookupPortableApp/Program.cs index b4d2e65cb6ae..f0cb7b3209a8 100644 --- a/src/installer/tests/Assets/TestProjects/SharedFxLookupPortableApp/Program.cs +++ b/src/installer/tests/Assets/TestProjects/SharedFxLookupPortableApp/Program.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/installer/tests/Assets/TestProjects/StandaloneApp/Program.cs b/src/installer/tests/Assets/TestProjects/StandaloneApp/Program.cs index 9e65e3b0c84f..a9168ae00ac0 100644 --- a/src/installer/tests/Assets/TestProjects/StandaloneApp/Program.cs +++ b/src/installer/tests/Assets/TestProjects/StandaloneApp/Program.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/installer/tests/Assets/TestProjects/StandaloneApp20/Program.cs b/src/installer/tests/Assets/TestProjects/StandaloneApp20/Program.cs index 787bc61f9511..4972c0162f19 100644 --- a/src/installer/tests/Assets/TestProjects/StandaloneApp20/Program.cs +++ b/src/installer/tests/Assets/TestProjects/StandaloneApp20/Program.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/installer/tests/Assets/TestProjects/StandaloneApp21/Program.cs b/src/installer/tests/Assets/TestProjects/StandaloneApp21/Program.cs index 787bc61f9511..4972c0162f19 100644 --- a/src/installer/tests/Assets/TestProjects/StandaloneApp21/Program.cs +++ b/src/installer/tests/Assets/TestProjects/StandaloneApp21/Program.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/installer/tests/Assets/TestProjects/StandaloneApp3x/Program.cs b/src/installer/tests/Assets/TestProjects/StandaloneApp3x/Program.cs index 061228b65e92..2bb065a6e980 100644 --- a/src/installer/tests/Assets/TestProjects/StandaloneApp3x/Program.cs +++ b/src/installer/tests/Assets/TestProjects/StandaloneApp3x/Program.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/installer/tests/Assets/TestProjects/StandaloneTestApp/Program.cs b/src/installer/tests/Assets/TestProjects/StandaloneTestApp/Program.cs index a933fff02082..570c419372c9 100644 --- a/src/installer/tests/Assets/TestProjects/StandaloneTestApp/Program.cs +++ b/src/installer/tests/Assets/TestProjects/StandaloneTestApp/Program.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Xunit; diff --git a/src/installer/tests/Assets/TestProjects/StartupHook/StartupHook.cs b/src/installer/tests/Assets/TestProjects/StartupHook/StartupHook.cs index 7a044f590a38..69fe6b5372c3 100644 --- a/src/installer/tests/Assets/TestProjects/StartupHook/StartupHook.cs +++ b/src/installer/tests/Assets/TestProjects/StartupHook/StartupHook.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/installer/tests/Assets/TestProjects/StartupHookWithAssemblyResolver/SharedLibrary/SharedLibrary.cs b/src/installer/tests/Assets/TestProjects/StartupHookWithAssemblyResolver/SharedLibrary/SharedLibrary.cs index fc5d74070059..3f5fc40dc17a 100644 --- a/src/installer/tests/Assets/TestProjects/StartupHookWithAssemblyResolver/SharedLibrary/SharedLibrary.cs +++ b/src/installer/tests/Assets/TestProjects/StartupHookWithAssemblyResolver/SharedLibrary/SharedLibrary.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace SharedLibrary { diff --git a/src/installer/tests/Assets/TestProjects/StartupHookWithAssemblyResolver/StartupHookWithAssemblyResolver.cs b/src/installer/tests/Assets/TestProjects/StartupHookWithAssemblyResolver/StartupHookWithAssemblyResolver.cs index 2dfb194d48bc..78dd0a004968 100644 --- a/src/installer/tests/Assets/TestProjects/StartupHookWithAssemblyResolver/StartupHookWithAssemblyResolver.cs +++ b/src/installer/tests/Assets/TestProjects/StartupHookWithAssemblyResolver/StartupHookWithAssemblyResolver.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/installer/tests/Assets/TestProjects/StartupHookWithDependency/StartupHookWithDependency.cs b/src/installer/tests/Assets/TestProjects/StartupHookWithDependency/StartupHookWithDependency.cs index 455b1e8d684c..9178e26b84e4 100644 --- a/src/installer/tests/Assets/TestProjects/StartupHookWithDependency/StartupHookWithDependency.cs +++ b/src/installer/tests/Assets/TestProjects/StartupHookWithDependency/StartupHookWithDependency.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/installer/tests/Assets/TestProjects/StartupHookWithInstanceMethod/StartupHookWithInstanceMethod.cs b/src/installer/tests/Assets/TestProjects/StartupHookWithInstanceMethod/StartupHookWithInstanceMethod.cs index c9a9d3440ae5..cb39d711013c 100644 --- a/src/installer/tests/Assets/TestProjects/StartupHookWithInstanceMethod/StartupHookWithInstanceMethod.cs +++ b/src/installer/tests/Assets/TestProjects/StartupHookWithInstanceMethod/StartupHookWithInstanceMethod.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/installer/tests/Assets/TestProjects/StartupHookWithMultipleIncorrectSignatures/StartupHookWithMultipleIncorrectSignatures.cs b/src/installer/tests/Assets/TestProjects/StartupHookWithMultipleIncorrectSignatures/StartupHookWithMultipleIncorrectSignatures.cs index 11272044a484..1fd00c0979cf 100644 --- a/src/installer/tests/Assets/TestProjects/StartupHookWithMultipleIncorrectSignatures/StartupHookWithMultipleIncorrectSignatures.cs +++ b/src/installer/tests/Assets/TestProjects/StartupHookWithMultipleIncorrectSignatures/StartupHookWithMultipleIncorrectSignatures.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/installer/tests/Assets/TestProjects/StartupHookWithNonPublicMethod/StartupHookWithNonPublicMethod.cs b/src/installer/tests/Assets/TestProjects/StartupHookWithNonPublicMethod/StartupHookWithNonPublicMethod.cs index 121e6bae27c7..e5b3df4bbc37 100644 --- a/src/installer/tests/Assets/TestProjects/StartupHookWithNonPublicMethod/StartupHookWithNonPublicMethod.cs +++ b/src/installer/tests/Assets/TestProjects/StartupHookWithNonPublicMethod/StartupHookWithNonPublicMethod.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/installer/tests/Assets/TestProjects/StartupHookWithOverload/StartupHookWithOverload.cs b/src/installer/tests/Assets/TestProjects/StartupHookWithOverload/StartupHookWithOverload.cs index 9253012e89af..69ca75498486 100644 --- a/src/installer/tests/Assets/TestProjects/StartupHookWithOverload/StartupHookWithOverload.cs +++ b/src/installer/tests/Assets/TestProjects/StartupHookWithOverload/StartupHookWithOverload.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/installer/tests/Assets/TestProjects/StartupHookWithParameter/StartupHookWithParameter.cs b/src/installer/tests/Assets/TestProjects/StartupHookWithParameter/StartupHookWithParameter.cs index 920b9bcf7640..76fa2a4a54c9 100644 --- a/src/installer/tests/Assets/TestProjects/StartupHookWithParameter/StartupHookWithParameter.cs +++ b/src/installer/tests/Assets/TestProjects/StartupHookWithParameter/StartupHookWithParameter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/installer/tests/Assets/TestProjects/StartupHookWithReturnType/StartupHookWithReturnType.cs b/src/installer/tests/Assets/TestProjects/StartupHookWithReturnType/StartupHookWithReturnType.cs index ae0f553355de..e1e5172ef104 100644 --- a/src/installer/tests/Assets/TestProjects/StartupHookWithReturnType/StartupHookWithReturnType.cs +++ b/src/installer/tests/Assets/TestProjects/StartupHookWithReturnType/StartupHookWithReturnType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/installer/tests/Assets/TestProjects/StartupHookWithoutInitializeMethod/StartupHookWithoutInitializeMethod.cs b/src/installer/tests/Assets/TestProjects/StartupHookWithoutInitializeMethod/StartupHookWithoutInitializeMethod.cs index b90adf9f6515..f19b469dac71 100644 --- a/src/installer/tests/Assets/TestProjects/StartupHookWithoutInitializeMethod/StartupHookWithoutInitializeMethod.cs +++ b/src/installer/tests/Assets/TestProjects/StartupHookWithoutInitializeMethod/StartupHookWithoutInitializeMethod.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/installer/tests/Assets/TestProjects/StartupHookWithoutStartupHookType/StartupHookWithoutStartupHookType.cs b/src/installer/tests/Assets/TestProjects/StartupHookWithoutStartupHookType/StartupHookWithoutStartupHookType.cs index 29e3ecd5559d..547b1d6bd6da 100644 --- a/src/installer/tests/Assets/TestProjects/StartupHookWithoutStartupHookType/StartupHookWithoutStartupHookType.cs +++ b/src/installer/tests/Assets/TestProjects/StartupHookWithoutStartupHookType/StartupHookWithoutStartupHookType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/installer/tests/Assets/TestProjects/StaticHostApp/Program.cs b/src/installer/tests/Assets/TestProjects/StaticHostApp/Program.cs deleted file mode 100644 index c631d81d5404..000000000000 --- a/src/installer/tests/Assets/TestProjects/StaticHostApp/Program.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -namespace StaticHostApp -{ - public static class Program - { - public static void Main(string[] args) - { - Console.WriteLine("Hello World!"); - } - } -} diff --git a/src/installer/tests/Assets/TestProjects/StaticHostApp/StaticHostApp.csproj b/src/installer/tests/Assets/TestProjects/StaticHostApp/StaticHostApp.csproj deleted file mode 100644 index eff31e8532b4..000000000000 --- a/src/installer/tests/Assets/TestProjects/StaticHostApp/StaticHostApp.csproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - $(NETCoreAppFramework) - Exe - $(TestTargetRid) - $(MNAVersion) - - - - - - diff --git a/src/installer/tests/Assets/TestProjects/TestWindowsOsShimsApp/Program.cs b/src/installer/tests/Assets/TestProjects/TestWindowsOsShimsApp/Program.cs index bc065abc49d7..c3bc3dbadbca 100644 --- a/src/installer/tests/Assets/TestProjects/TestWindowsOsShimsApp/Program.cs +++ b/src/installer/tests/Assets/TestProjects/TestWindowsOsShimsApp/Program.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/installer/tests/HostActivation.Tests/CommandExtensions.cs b/src/installer/tests/HostActivation.Tests/CommandExtensions.cs index edff69a88f36..054e6c39d143 100644 --- a/src/installer/tests/HostActivation.Tests/CommandExtensions.cs +++ b/src/installer/tests/HostActivation.Tests/CommandExtensions.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.Cli.Build.Framework; using System; diff --git a/src/installer/tests/HostActivation.Tests/Constants.cs b/src/installer/tests/HostActivation.Tests/Constants.cs index 4382f35c533c..f7e743aa99aa 100644 --- a/src/installer/tests/HostActivation.Tests/Constants.cs +++ b/src/installer/tests/HostActivation.Tests/Constants.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.DotNet.CoreSetup.Test.HostActivation { diff --git a/src/installer/tests/HostActivation.Tests/DependencyResolution/ComponentDependencyResolutionBase.cs b/src/installer/tests/HostActivation.Tests/DependencyResolution/ComponentDependencyResolutionBase.cs index 983a07a1597b..c87c28ac4a98 100644 --- a/src/installer/tests/HostActivation.Tests/DependencyResolution/ComponentDependencyResolutionBase.cs +++ b/src/installer/tests/HostActivation.Tests/DependencyResolution/ComponentDependencyResolutionBase.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.Cli.Build; using Microsoft.DotNet.Cli.Build.Framework; diff --git a/src/installer/tests/HostActivation.Tests/DependencyResolution/DependencyResolutionBase.cs b/src/installer/tests/HostActivation.Tests/DependencyResolution/DependencyResolutionBase.cs index 65a48950817a..5823e3a6229f 100644 --- a/src/installer/tests/HostActivation.Tests/DependencyResolution/DependencyResolutionBase.cs +++ b/src/installer/tests/HostActivation.Tests/DependencyResolution/DependencyResolutionBase.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/installer/tests/HostActivation.Tests/DependencyResolution/DependencyResolutionCommandResultExtensions.cs b/src/installer/tests/HostActivation.Tests/DependencyResolution/DependencyResolutionCommandResultExtensions.cs index 8bc8b7b2d396..adf7145c2a12 100644 --- a/src/installer/tests/HostActivation.Tests/DependencyResolution/DependencyResolutionCommandResultExtensions.cs +++ b/src/installer/tests/HostActivation.Tests/DependencyResolution/DependencyResolutionCommandResultExtensions.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using FluentAssertions; using FluentAssertions.Execution; diff --git a/src/installer/tests/HostActivation.Tests/DependencyResolution/PerAssemblyVersionResolution.cs b/src/installer/tests/HostActivation.Tests/DependencyResolution/PerAssemblyVersionResolution.cs index 8f78af9d81fb..ea21df856ee6 100644 --- a/src/installer/tests/HostActivation.Tests/DependencyResolution/PerAssemblyVersionResolution.cs +++ b/src/installer/tests/HostActivation.Tests/DependencyResolution/PerAssemblyVersionResolution.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/installer/tests/HostActivation.Tests/DependencyResolution/ResolveComponentDependencies.cs b/src/installer/tests/HostActivation.Tests/DependencyResolution/ResolveComponentDependencies.cs index eb96cf6794df..d1979438af48 100644 --- a/src/installer/tests/HostActivation.Tests/DependencyResolution/ResolveComponentDependencies.cs +++ b/src/installer/tests/HostActivation.Tests/DependencyResolution/ResolveComponentDependencies.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; @@ -338,4 +337,4 @@ public TestApp CreateComponentWithResources(Action customizer } } } -} \ No newline at end of file +} diff --git a/src/installer/tests/HostActivation.Tests/DependencyResolution/RidAssetResolution.cs b/src/installer/tests/HostActivation.Tests/DependencyResolution/RidAssetResolution.cs index ed9062ec0164..ac7ec1ccdbdc 100644 --- a/src/installer/tests/HostActivation.Tests/DependencyResolution/RidAssetResolution.cs +++ b/src/installer/tests/HostActivation.Tests/DependencyResolution/RidAssetResolution.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Xunit; diff --git a/src/installer/tests/HostActivation.Tests/DotNetBuilder.cs b/src/installer/tests/HostActivation.Tests/DotNetBuilder.cs index d084ea78145d..2a99ab5681f7 100644 --- a/src/installer/tests/HostActivation.Tests/DotNetBuilder.cs +++ b/src/installer/tests/HostActivation.Tests/DotNetBuilder.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.Cli.Build; using System; diff --git a/src/installer/tests/HostActivation.Tests/DotnetArgValidation.cs b/src/installer/tests/HostActivation.Tests/DotnetArgValidation.cs index 3fee435b7104..bffa811215b6 100644 --- a/src/installer/tests/HostActivation.Tests/DotnetArgValidation.cs +++ b/src/installer/tests/HostActivation.Tests/DotnetArgValidation.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.Cli.Build; using System; diff --git a/src/installer/tests/HostActivation.Tests/DotnetTestXunit.cs b/src/installer/tests/HostActivation.Tests/DotnetTestXunit.cs index 8adaf8860735..18f187ee4237 100644 --- a/src/installer/tests/HostActivation.Tests/DotnetTestXunit.cs +++ b/src/installer/tests/HostActivation.Tests/DotnetTestXunit.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.CoreSetup.Test; using System; diff --git a/src/installer/tests/HostActivation.Tests/FrameworkResolution/ApplyPatchesSettings.cs b/src/installer/tests/HostActivation.Tests/FrameworkResolution/ApplyPatchesSettings.cs index 51bf7b4e4529..d747ee016f47 100644 --- a/src/installer/tests/HostActivation.Tests/FrameworkResolution/ApplyPatchesSettings.cs +++ b/src/installer/tests/HostActivation.Tests/FrameworkResolution/ApplyPatchesSettings.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.Cli.Build; using Microsoft.DotNet.Cli.Build.Framework; diff --git a/src/installer/tests/HostActivation.Tests/FrameworkResolution/DotNetCliExtensions.cs b/src/installer/tests/HostActivation.Tests/FrameworkResolution/DotNetCliExtensions.cs index 5e8d555777f2..5a8830556f54 100644 --- a/src/installer/tests/HostActivation.Tests/FrameworkResolution/DotNetCliExtensions.cs +++ b/src/installer/tests/HostActivation.Tests/FrameworkResolution/DotNetCliExtensions.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.Cli.Build; using System; diff --git a/src/installer/tests/HostActivation.Tests/FrameworkResolution/FrameworkResolutionBase.Settings.cs b/src/installer/tests/HostActivation.Tests/FrameworkResolution/FrameworkResolutionBase.Settings.cs index feec180f100d..81f2e14a35f5 100644 --- a/src/installer/tests/HostActivation.Tests/FrameworkResolution/FrameworkResolutionBase.Settings.cs +++ b/src/installer/tests/HostActivation.Tests/FrameworkResolution/FrameworkResolutionBase.Settings.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/installer/tests/HostActivation.Tests/FrameworkResolution/FrameworkResolutionBase.cs b/src/installer/tests/HostActivation.Tests/FrameworkResolution/FrameworkResolutionBase.cs index 6a7a527b97d8..c36d0c0c8102 100644 --- a/src/installer/tests/HostActivation.Tests/FrameworkResolution/FrameworkResolutionBase.cs +++ b/src/installer/tests/HostActivation.Tests/FrameworkResolution/FrameworkResolutionBase.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.Cli.Build; using Microsoft.DotNet.Cli.Build.Framework; diff --git a/src/installer/tests/HostActivation.Tests/FrameworkResolution/FrameworkResolutionCommandResultExtensions.cs b/src/installer/tests/HostActivation.Tests/FrameworkResolution/FrameworkResolutionCommandResultExtensions.cs index 899c198f5c23..a0b6feda9577 100644 --- a/src/installer/tests/HostActivation.Tests/FrameworkResolution/FrameworkResolutionCommandResultExtensions.cs +++ b/src/installer/tests/HostActivation.Tests/FrameworkResolution/FrameworkResolutionCommandResultExtensions.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using FluentAssertions; using Microsoft.DotNet.Cli.Build.Framework; diff --git a/src/installer/tests/HostActivation.Tests/FrameworkResolution/FxVersionCLI.cs b/src/installer/tests/HostActivation.Tests/FrameworkResolution/FxVersionCLI.cs index e07ffbbdbf1e..10057216bc36 100644 --- a/src/installer/tests/HostActivation.Tests/FrameworkResolution/FxVersionCLI.cs +++ b/src/installer/tests/HostActivation.Tests/FrameworkResolution/FxVersionCLI.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.Cli.Build; using Microsoft.DotNet.Cli.Build.Framework; diff --git a/src/installer/tests/HostActivation.Tests/FrameworkResolution/IncludedFrameworksSettings.cs b/src/installer/tests/HostActivation.Tests/FrameworkResolution/IncludedFrameworksSettings.cs index 60d5f2d982fa..af8aa1dc3b59 100644 --- a/src/installer/tests/HostActivation.Tests/FrameworkResolution/IncludedFrameworksSettings.cs +++ b/src/installer/tests/HostActivation.Tests/FrameworkResolution/IncludedFrameworksSettings.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.Cli.Build; using Microsoft.DotNet.Cli.Build.Framework; diff --git a/src/installer/tests/HostActivation.Tests/FrameworkResolution/MultipleHives.cs b/src/installer/tests/HostActivation.Tests/FrameworkResolution/MultipleHives.cs index f15ed565cd9c..4c2ebdac7384 100644 --- a/src/installer/tests/HostActivation.Tests/FrameworkResolution/MultipleHives.cs +++ b/src/installer/tests/HostActivation.Tests/FrameworkResolution/MultipleHives.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.Cli.Build; using Microsoft.DotNet.Cli.Build.Framework; diff --git a/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardMultipleFrameworks.cs b/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardMultipleFrameworks.cs index b6829195731f..5a2f278de38b 100644 --- a/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardMultipleFrameworks.cs +++ b/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardMultipleFrameworks.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.Cli.Build; using Microsoft.DotNet.Cli.Build.Framework; diff --git a/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardOnNoCandidateFx.cs b/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardOnNoCandidateFx.cs index ad006d635ffd..935d4122fa7d 100644 --- a/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardOnNoCandidateFx.cs +++ b/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardOnNoCandidateFx.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.Cli.Build; using Microsoft.DotNet.Cli.Build.Framework; diff --git a/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardOnNoCandidateFxMultipleFrameworks.cs b/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardOnNoCandidateFxMultipleFrameworks.cs index a99d8447dd77..8db6771f6c04 100644 --- a/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardOnNoCandidateFxMultipleFrameworks.cs +++ b/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardOnNoCandidateFxMultipleFrameworks.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.Cli.Build; using Microsoft.DotNet.Cli.Build.Framework; diff --git a/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardOnNoCandidateFxSettings.cs b/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardOnNoCandidateFxSettings.cs index 6540bcf91797..3258653cdf40 100644 --- a/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardOnNoCandidateFxSettings.cs +++ b/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardOnNoCandidateFxSettings.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.Cli.Build; using Microsoft.DotNet.Cli.Build.Framework; diff --git a/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardPreReleaseOnly.cs b/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardPreReleaseOnly.cs index 21c45e3ec1e6..b3b6cf8a9353 100644 --- a/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardPreReleaseOnly.cs +++ b/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardPreReleaseOnly.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.Cli.Build; using Microsoft.DotNet.Cli.Build.Framework; @@ -311,4 +310,4 @@ private CommandResult RunTest( .With(RollForwardSetting(SettingLocation.CommandLine, rollForward))); } } -} \ No newline at end of file +} diff --git a/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardReleaseAndPreRelease.cs b/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardReleaseAndPreRelease.cs index 38031d461303..1289292602ad 100644 --- a/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardReleaseAndPreRelease.cs +++ b/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardReleaseAndPreRelease.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.Cli.Build; using Microsoft.DotNet.Cli.Build.Framework; diff --git a/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardReleaseOnly.cs b/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardReleaseOnly.cs index 605bc567faa3..1f438a9d96d5 100644 --- a/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardReleaseOnly.cs +++ b/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardReleaseOnly.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.Cli.Build; using Microsoft.DotNet.Cli.Build.Framework; @@ -224,4 +223,4 @@ private CommandResult RunTest( .With(RollForwardSetting(SettingLocation.CommandLine, rollForward))); } } -} \ No newline at end of file +} diff --git a/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardSettings.cs b/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardSettings.cs index e7a91d0b829e..a9db947c53a8 100644 --- a/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardSettings.cs +++ b/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardSettings.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.Cli.Build; using Microsoft.DotNet.Cli.Build.Framework; diff --git a/src/installer/tests/HostActivation.Tests/HostVersionCompatibility.cs b/src/installer/tests/HostActivation.Tests/HostVersionCompatibility.cs index afb0862fecde..96ac25101e3f 100644 --- a/src/installer/tests/HostActivation.Tests/HostVersionCompatibility.cs +++ b/src/installer/tests/HostActivation.Tests/HostVersionCompatibility.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.Cli.Build.Framework; using System; diff --git a/src/installer/tests/HostActivation.Tests/LightupAppActivation.cs b/src/installer/tests/HostActivation.Tests/LightupAppActivation.cs index e3dd30e8a798..82988c597f2e 100644 --- a/src/installer/tests/HostActivation.Tests/LightupAppActivation.cs +++ b/src/installer/tests/HostActivation.Tests/LightupAppActivation.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Newtonsoft.Json.Linq; using System; diff --git a/src/installer/tests/HostActivation.Tests/MockCoreClrSanity.cs b/src/installer/tests/HostActivation.Tests/MockCoreClrSanity.cs index 3890c2049c74..4111a2e26035 100644 --- a/src/installer/tests/HostActivation.Tests/MockCoreClrSanity.cs +++ b/src/installer/tests/HostActivation.Tests/MockCoreClrSanity.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.Cli.Build; using System; diff --git a/src/installer/tests/HostActivation.Tests/MultilevelSDKLookup.cs b/src/installer/tests/HostActivation.Tests/MultilevelSDKLookup.cs index afdfaa61e351..d3ddfa2553d7 100644 --- a/src/installer/tests/HostActivation.Tests/MultilevelSDKLookup.cs +++ b/src/installer/tests/HostActivation.Tests/MultilevelSDKLookup.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.Cli.Build; using System; diff --git a/src/installer/tests/HostActivation.Tests/MultilevelSharedFxLookup.DepsVersion.cs b/src/installer/tests/HostActivation.Tests/MultilevelSharedFxLookup.DepsVersion.cs index 7cd1e573f268..65b5ff237230 100644 --- a/src/installer/tests/HostActivation.Tests/MultilevelSharedFxLookup.DepsVersion.cs +++ b/src/installer/tests/HostActivation.Tests/MultilevelSharedFxLookup.DepsVersion.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Newtonsoft.Json.Linq; using System.IO; diff --git a/src/installer/tests/HostActivation.Tests/MultilevelSharedFxLookup.cs b/src/installer/tests/HostActivation.Tests/MultilevelSharedFxLookup.cs index 2b05a3ebcf86..a35ac3ef0b37 100644 --- a/src/installer/tests/HostActivation.Tests/MultilevelSharedFxLookup.cs +++ b/src/installer/tests/HostActivation.Tests/MultilevelSharedFxLookup.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/installer/tests/HostActivation.Tests/NativeHostApis.cs b/src/installer/tests/HostActivation.Tests/NativeHostApis.cs index 8621e1e4b399..83ceacbc52a8 100644 --- a/src/installer/tests/HostActivation.Tests/NativeHostApis.cs +++ b/src/installer/tests/HostActivation.Tests/NativeHostApis.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.Cli.Build; using System; diff --git a/src/installer/tests/HostActivation.Tests/NativeHosting/ApplicationExecution.cs b/src/installer/tests/HostActivation.Tests/NativeHosting/ApplicationExecution.cs index d5e6cf060249..f7053dbc57eb 100644 --- a/src/installer/tests/HostActivation.Tests/NativeHosting/ApplicationExecution.cs +++ b/src/installer/tests/HostActivation.Tests/NativeHosting/ApplicationExecution.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.Cli.Build.Framework; using System.Collections.Generic; diff --git a/src/installer/tests/HostActivation.Tests/NativeHosting/Comhost.cs b/src/installer/tests/HostActivation.Tests/NativeHosting/Comhost.cs index 115fc428aa73..ddf80fe20a29 100644 --- a/src/installer/tests/HostActivation.Tests/NativeHosting/Comhost.cs +++ b/src/installer/tests/HostActivation.Tests/NativeHosting/Comhost.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.Cli.Build.Framework; using Newtonsoft.Json.Linq; diff --git a/src/installer/tests/HostActivation.Tests/NativeHosting/GetFunctionPointer.cs b/src/installer/tests/HostActivation.Tests/NativeHosting/GetFunctionPointer.cs index d73c085afbaf..150943d5cf12 100644 --- a/src/installer/tests/HostActivation.Tests/NativeHosting/GetFunctionPointer.cs +++ b/src/installer/tests/HostActivation.Tests/NativeHosting/GetFunctionPointer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.Cli.Build.Framework; using System.Collections.Generic; diff --git a/src/installer/tests/HostActivation.Tests/NativeHosting/GetNativeSearchDirectories.cs b/src/installer/tests/HostActivation.Tests/NativeHosting/GetNativeSearchDirectories.cs index 323b71090479..7f09c70943ba 100644 --- a/src/installer/tests/HostActivation.Tests/NativeHosting/GetNativeSearchDirectories.cs +++ b/src/installer/tests/HostActivation.Tests/NativeHosting/GetNativeSearchDirectories.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; using System.Runtime.InteropServices; diff --git a/src/installer/tests/HostActivation.Tests/NativeHosting/HostContext.PropertyCompatibilityTestData.cs b/src/installer/tests/HostActivation.Tests/NativeHosting/HostContext.PropertyCompatibilityTestData.cs index b710ddc41d9b..1b7f3976799e 100644 --- a/src/installer/tests/HostActivation.Tests/NativeHosting/HostContext.PropertyCompatibilityTestData.cs +++ b/src/installer/tests/HostActivation.Tests/NativeHosting/HostContext.PropertyCompatibilityTestData.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/installer/tests/HostActivation.Tests/NativeHosting/HostContext.cs b/src/installer/tests/HostActivation.Tests/NativeHosting/HostContext.cs index 6ba24c40bdfe..3e8c603e4981 100644 --- a/src/installer/tests/HostActivation.Tests/NativeHosting/HostContext.cs +++ b/src/installer/tests/HostActivation.Tests/NativeHosting/HostContext.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.Cli.Build; using Microsoft.DotNet.Cli.Build.Framework; diff --git a/src/installer/tests/HostActivation.Tests/NativeHosting/HostContextResultExtensions.cs b/src/installer/tests/HostActivation.Tests/NativeHosting/HostContextResultExtensions.cs index 7aed2c710322..eaef5fa95910 100644 --- a/src/installer/tests/HostActivation.Tests/NativeHosting/HostContextResultExtensions.cs +++ b/src/installer/tests/HostActivation.Tests/NativeHosting/HostContextResultExtensions.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using FluentAssertions; diff --git a/src/installer/tests/HostActivation.Tests/NativeHosting/LoadAssemblyAndGetFunctionPointer.cs b/src/installer/tests/HostActivation.Tests/NativeHosting/LoadAssemblyAndGetFunctionPointer.cs index 784e3b9caf44..4b70a8858772 100644 --- a/src/installer/tests/HostActivation.Tests/NativeHosting/LoadAssemblyAndGetFunctionPointer.cs +++ b/src/installer/tests/HostActivation.Tests/NativeHosting/LoadAssemblyAndGetFunctionPointer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.Cli.Build.Framework; using System.Collections.Generic; diff --git a/src/installer/tests/HostActivation.Tests/NativeHosting/Nethost.cs b/src/installer/tests/HostActivation.Tests/NativeHosting/Nethost.cs index 6ae704359155..abcddd239481 100644 --- a/src/installer/tests/HostActivation.Tests/NativeHosting/Nethost.cs +++ b/src/installer/tests/HostActivation.Tests/NativeHosting/Nethost.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.Cli.Build.Framework; using System.IO; diff --git a/src/installer/tests/HostActivation.Tests/NativeHosting/SharedTestStateBase.cs b/src/installer/tests/HostActivation.Tests/NativeHosting/SharedTestStateBase.cs index 8821583cd07b..85ac9b19d43a 100644 --- a/src/installer/tests/HostActivation.Tests/NativeHosting/SharedTestStateBase.cs +++ b/src/installer/tests/HostActivation.Tests/NativeHosting/SharedTestStateBase.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.Cli.Build.Framework; using System; diff --git a/src/installer/tests/HostActivation.Tests/NetCoreAppBuilder.cs b/src/installer/tests/HostActivation.Tests/NetCoreAppBuilder.cs index 3f470b000171..ba5e101558c2 100644 --- a/src/installer/tests/HostActivation.Tests/NetCoreAppBuilder.cs +++ b/src/installer/tests/HostActivation.Tests/NetCoreAppBuilder.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.DependencyModel; using System; @@ -406,4 +405,4 @@ public TestApp Build(TestApp testApp) return testApp; } } -} \ No newline at end of file +} diff --git a/src/installer/tests/HostActivation.Tests/PortableAppActivation.cs b/src/installer/tests/HostActivation.Tests/PortableAppActivation.cs index 0835af7398e8..9b4648b0182a 100644 --- a/src/installer/tests/HostActivation.Tests/PortableAppActivation.cs +++ b/src/installer/tests/HostActivation.Tests/PortableAppActivation.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.Cli.Build; using Microsoft.DotNet.Cli.Build.Framework; diff --git a/src/installer/tests/HostActivation.Tests/RegisteredInstallLocationOverride.cs b/src/installer/tests/HostActivation.Tests/RegisteredInstallLocationOverride.cs index 1d6168785b07..33ce9f81c3e9 100644 --- a/src/installer/tests/HostActivation.Tests/RegisteredInstallLocationOverride.cs +++ b/src/installer/tests/HostActivation.Tests/RegisteredInstallLocationOverride.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.Cli.Build.Framework; using Microsoft.Win32; diff --git a/src/installer/tests/HostActivation.Tests/ResourceLookup.cs b/src/installer/tests/HostActivation.Tests/ResourceLookup.cs index b3d06755cbd7..e5f02cb7826b 100644 --- a/src/installer/tests/HostActivation.Tests/ResourceLookup.cs +++ b/src/installer/tests/HostActivation.Tests/ResourceLookup.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Xunit; diff --git a/src/installer/tests/HostActivation.Tests/RuntimeConfig.cs b/src/installer/tests/HostActivation.Tests/RuntimeConfig.cs index fc5ee6d981b9..6e810dc5d7cd 100644 --- a/src/installer/tests/HostActivation.Tests/RuntimeConfig.cs +++ b/src/installer/tests/HostActivation.Tests/RuntimeConfig.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Newtonsoft.Json; using Newtonsoft.Json.Linq; diff --git a/src/installer/tests/HostActivation.Tests/RuntimeProperties.cs b/src/installer/tests/HostActivation.Tests/RuntimeProperties.cs index fd9edf710619..3ba796d8c237 100644 --- a/src/installer/tests/HostActivation.Tests/RuntimeProperties.cs +++ b/src/installer/tests/HostActivation.Tests/RuntimeProperties.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/installer/tests/HostActivation.Tests/SDKLookup.cs b/src/installer/tests/HostActivation.Tests/SDKLookup.cs index 8fbd4cc90371..b587a019edab 100644 --- a/src/installer/tests/HostActivation.Tests/SDKLookup.cs +++ b/src/installer/tests/HostActivation.Tests/SDKLookup.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.Cli.Build; using System; diff --git a/src/installer/tests/HostActivation.Tests/SharedFramework.cs b/src/installer/tests/HostActivation.Tests/SharedFramework.cs index f25c3f80ed68..a887b2bf6516 100644 --- a/src/installer/tests/HostActivation.Tests/SharedFramework.cs +++ b/src/installer/tests/HostActivation.Tests/SharedFramework.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Newtonsoft.Json.Linq; using System.IO; diff --git a/src/installer/tests/HostActivation.Tests/SharedFxLookup.cs b/src/installer/tests/HostActivation.Tests/SharedFxLookup.cs index 0139077f16bf..a33195e54174 100644 --- a/src/installer/tests/HostActivation.Tests/SharedFxLookup.cs +++ b/src/installer/tests/HostActivation.Tests/SharedFxLookup.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Newtonsoft.Json.Linq; using System; diff --git a/src/installer/tests/HostActivation.Tests/StandaloneAppActivation.cs b/src/installer/tests/HostActivation.Tests/StandaloneAppActivation.cs index dac93e29407b..1eebe7ff0acc 100644 --- a/src/installer/tests/HostActivation.Tests/StandaloneAppActivation.cs +++ b/src/installer/tests/HostActivation.Tests/StandaloneAppActivation.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using FluentAssertions; using Microsoft.DotNet.Cli.Build.Framework; diff --git a/src/installer/tests/HostActivation.Tests/StartupHooks.cs b/src/installer/tests/HostActivation.Tests/StartupHooks.cs index 49dc578d73d5..12d9e23fc84a 100644 --- a/src/installer/tests/HostActivation.Tests/StartupHooks.cs +++ b/src/installer/tests/HostActivation.Tests/StartupHooks.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/installer/tests/HostActivation.Tests/TestOnlyProductBehavior.cs b/src/installer/tests/HostActivation.Tests/TestOnlyProductBehavior.cs index a5a1f99111e7..36702882a069 100644 --- a/src/installer/tests/HostActivation.Tests/TestOnlyProductBehavior.cs +++ b/src/installer/tests/HostActivation.Tests/TestOnlyProductBehavior.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.NET.HostModel.AppHost; using System; diff --git a/src/installer/tests/HostActivation.Tests/Tracing.cs b/src/installer/tests/HostActivation.Tests/Tracing.cs index 524192bfd24e..fef9ee33fbad 100644 --- a/src/installer/tests/HostActivation.Tests/Tracing.cs +++ b/src/installer/tests/HostActivation.Tests/Tracing.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Xunit; diff --git a/src/installer/tests/HostActivation.Tests/WindowsSpecificBehavior.cs b/src/installer/tests/HostActivation.Tests/WindowsSpecificBehavior.cs index caa0b8b91667..5959073b7a8d 100644 --- a/src/installer/tests/HostActivation.Tests/WindowsSpecificBehavior.cs +++ b/src/installer/tests/HostActivation.Tests/WindowsSpecificBehavior.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32; using System; diff --git a/src/installer/tests/HostActivation.Tests/XunitAssemblyAttributes.cs b/src/installer/tests/HostActivation.Tests/XunitAssemblyAttributes.cs index 5e441a317c6e..e31efc5df9fb 100644 --- a/src/installer/tests/HostActivation.Tests/XunitAssemblyAttributes.cs +++ b/src/installer/tests/HostActivation.Tests/XunitAssemblyAttributes.cs @@ -1,9 +1,8 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; // Test cases in this assembly cannot be run in parallel. // Some test cases modify global state and will interfere with others running at the same time. -[assembly: CollectionBehavior(DisableTestParallelization = true)] \ No newline at end of file +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/installer/tests/Microsoft.DotNet.CoreSetup.Packaging.Tests/NETCoreTests.cs b/src/installer/tests/Microsoft.DotNet.CoreSetup.Packaging.Tests/NETCoreTests.cs index c4d5f7ae8117..65d19d7983c4 100644 --- a/src/installer/tests/Microsoft.DotNet.CoreSetup.Packaging.Tests/NETCoreTests.cs +++ b/src/installer/tests/Microsoft.DotNet.CoreSetup.Packaging.Tests/NETCoreTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.CoreSetup.Test; using Xunit; diff --git a/src/installer/tests/Microsoft.DotNet.CoreSetup.Packaging.Tests/NETStandardTests.cs b/src/installer/tests/Microsoft.DotNet.CoreSetup.Packaging.Tests/NETStandardTests.cs index 435ce8fc30a2..0c5c4a29b97e 100644 --- a/src/installer/tests/Microsoft.DotNet.CoreSetup.Packaging.Tests/NETStandardTests.cs +++ b/src/installer/tests/Microsoft.DotNet.CoreSetup.Packaging.Tests/NETStandardTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.CoreSetup.Test; using Xunit; diff --git a/src/installer/tests/Microsoft.DotNet.CoreSetup.Packaging.Tests/NuGetArtifactTester.cs b/src/installer/tests/Microsoft.DotNet.CoreSetup.Packaging.Tests/NuGetArtifactTester.cs index b46b78150f17..d5d1aa12a8af 100644 --- a/src/installer/tests/Microsoft.DotNet.CoreSetup.Packaging.Tests/NuGetArtifactTester.cs +++ b/src/installer/tests/Microsoft.DotNet.CoreSetup.Packaging.Tests/NuGetArtifactTester.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.CoreSetup.Test; using NuGet.Packaging; diff --git a/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundleExtractToSpecificPath.cs b/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundleExtractToSpecificPath.cs index 8f9e97415285..4599b381d4d2 100644 --- a/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundleExtractToSpecificPath.cs +++ b/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundleExtractToSpecificPath.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using BundleTests.Helpers; using Microsoft.DotNet.Cli.Build.Framework; diff --git a/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundleLocalizedApp.cs b/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundleLocalizedApp.cs index cadcbf8032b0..e713e6f7d8c3 100644 --- a/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundleLocalizedApp.cs +++ b/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundleLocalizedApp.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using BundleTests.Helpers; using Microsoft.DotNet.Cli.Build.Framework; diff --git a/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundleProbe.cs b/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundleProbe.cs index b178e0ee36e6..f9d0d04e8b8e 100644 --- a/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundleProbe.cs +++ b/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundleProbe.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundleRename.cs b/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundleRename.cs index 3a0ed2c7f33e..006df6e3dc51 100644 --- a/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundleRename.cs +++ b/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundleRename.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundledAppWithSubDirs.cs b/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundledAppWithSubDirs.cs index ff15ee6fb80f..e336de81dd5f 100644 --- a/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundledAppWithSubDirs.cs +++ b/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundledAppWithSubDirs.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using BundleTests.Helpers; using Microsoft.DotNet.Cli.Build.Framework; diff --git a/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/StaticHost.cs b/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/StaticHost.cs index 78b5c9449fe1..b1111e9c9b02 100644 --- a/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/StaticHost.cs +++ b/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/StaticHost.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using BundleTests.Helpers; using Microsoft.DotNet.Cli.Build.Framework; @@ -82,7 +81,7 @@ public class SharedTestState : IDisposable public SharedTestState() { RepoDirectories = new RepoDirectoriesProvider(); - TestFixture = new TestProjectFixture("StaticHostApp", RepoDirectories); + TestFixture = new TestProjectFixture("StandaloneApp", RepoDirectories); TestFixture .EnsureRestoredForRid(TestFixture.CurrentRid, RepoDirectories.CorehostPackages) .PublishProject(runtime: TestFixture.CurrentRid, diff --git a/src/installer/tests/Microsoft.NET.HostModel.Tests/Helpers/BundleHelper.cs b/src/installer/tests/Microsoft.NET.HostModel.Tests/Helpers/BundleHelper.cs index def3a4695639..e147a8351b03 100644 --- a/src/installer/tests/Microsoft.NET.HostModel.Tests/Helpers/BundleHelper.cs +++ b/src/installer/tests/Microsoft.NET.HostModel.Tests/Helpers/BundleHelper.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.CoreSetup.Test; using Microsoft.NET.HostModel.Bundle; diff --git a/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.AppHost.Tests/AppHostUpdateTests.cs b/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.AppHost.Tests/AppHostUpdateTests.cs index a48ea5393195..5d4466de963d 100644 --- a/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.AppHost.Tests/AppHostUpdateTests.cs +++ b/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.AppHost.Tests/AppHostUpdateTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.Bundle.Tests/BundleAndRun.cs b/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.Bundle.Tests/BundleAndRun.cs index bf9ff14cf5b0..1c8af4b561c3 100644 --- a/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.Bundle.Tests/BundleAndRun.cs +++ b/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.Bundle.Tests/BundleAndRun.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.Bundle.Tests/BundleLegacy.cs b/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.Bundle.Tests/BundleLegacy.cs index 1690be766e33..10cf437ccb3a 100644 --- a/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.Bundle.Tests/BundleLegacy.cs +++ b/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.Bundle.Tests/BundleLegacy.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Xunit; diff --git a/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.Bundle.Tests/BundlerConsistencyTests.cs b/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.Bundle.Tests/BundlerConsistencyTests.cs index 07fc882dc61f..3cf9d355cbd5 100644 --- a/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.Bundle.Tests/BundlerConsistencyTests.cs +++ b/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.Bundle.Tests/BundlerConsistencyTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using BundleTests.Helpers; using FluentAssertions; diff --git a/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.ComHost.Tests/ClsidMapTests.cs b/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.ComHost.Tests/ClsidMapTests.cs index 0097e029486a..f35038860ecf 100644 --- a/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.ComHost.Tests/ClsidMapTests.cs +++ b/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.ComHost.Tests/ClsidMapTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.CoreSetup.Test; using Newtonsoft.Json; diff --git a/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.ComHost.Tests/RegFreeComManifestTests.cs b/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.ComHost.Tests/RegFreeComManifestTests.cs index 49aa5293260a..9a4f47e79b72 100644 --- a/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.ComHost.Tests/RegFreeComManifestTests.cs +++ b/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.ComHost.Tests/RegFreeComManifestTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Newtonsoft.Json; using Newtonsoft.Json.Linq; diff --git a/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.ComHost.Tests/TestDirectory.cs b/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.ComHost.Tests/TestDirectory.cs index 84532fac8cef..e4dac9750cc2 100644 --- a/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.ComHost.Tests/TestDirectory.cs +++ b/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.ComHost.Tests/TestDirectory.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/installer/tests/TestUtils/AnsiColorExtensions.cs b/src/installer/tests/TestUtils/AnsiColorExtensions.cs index 941a68c7dd7b..97c104516c67 100644 --- a/src/installer/tests/TestUtils/AnsiColorExtensions.cs +++ b/src/installer/tests/TestUtils/AnsiColorExtensions.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.DotNet.Cli.Build.Framework { diff --git a/src/installer/tests/TestUtils/AnsiConsole.cs b/src/installer/tests/TestUtils/AnsiConsole.cs index 68f5c50d3342..2a8d6f3ad5a7 100644 --- a/src/installer/tests/TestUtils/AnsiConsole.cs +++ b/src/installer/tests/TestUtils/AnsiConsole.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/installer/tests/TestUtils/AppHostExtensions.cs b/src/installer/tests/TestUtils/AppHostExtensions.cs index dac15f75e567..50ef2ef22e05 100644 --- a/src/installer/tests/TestUtils/AppHostExtensions.cs +++ b/src/installer/tests/TestUtils/AppHostExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.NET.HostModel.AppHost; using System; diff --git a/src/installer/tests/TestUtils/ArgumentEscaper.cs b/src/installer/tests/TestUtils/ArgumentEscaper.cs index 574fc450aec7..5986e3f6e0d2 100644 --- a/src/installer/tests/TestUtils/ArgumentEscaper.cs +++ b/src/installer/tests/TestUtils/ArgumentEscaper.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/installer/tests/TestUtils/Assertions/CommandResultAssertions.cs b/src/installer/tests/TestUtils/Assertions/CommandResultAssertions.cs index d84b0280fb8a..a127b4c22806 100644 --- a/src/installer/tests/TestUtils/Assertions/CommandResultAssertions.cs +++ b/src/installer/tests/TestUtils/Assertions/CommandResultAssertions.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Text.RegularExpressions; diff --git a/src/installer/tests/TestUtils/Assertions/CommandResultExtensions.cs b/src/installer/tests/TestUtils/Assertions/CommandResultExtensions.cs index a5911e704104..5430b1d905f2 100644 --- a/src/installer/tests/TestUtils/Assertions/CommandResultExtensions.cs +++ b/src/installer/tests/TestUtils/Assertions/CommandResultExtensions.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using FluentAssertions; using Microsoft.DotNet.Cli.Build.Framework; diff --git a/src/installer/tests/TestUtils/Assertions/DirectoryInfoAssertions.cs b/src/installer/tests/TestUtils/Assertions/DirectoryInfoAssertions.cs index b70636f35643..5b35d12e5881 100644 --- a/src/installer/tests/TestUtils/Assertions/DirectoryInfoAssertions.cs +++ b/src/installer/tests/TestUtils/Assertions/DirectoryInfoAssertions.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using FluentAssertions; using FluentAssertions.Execution; diff --git a/src/installer/tests/TestUtils/Assertions/DirectoryInfoExtensions.cs b/src/installer/tests/TestUtils/Assertions/DirectoryInfoExtensions.cs index ac4d59a8e490..16471d542dd4 100644 --- a/src/installer/tests/TestUtils/Assertions/DirectoryInfoExtensions.cs +++ b/src/installer/tests/TestUtils/Assertions/DirectoryInfoExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; diff --git a/src/installer/tests/TestUtils/BuildFailureException.cs b/src/installer/tests/TestUtils/BuildFailureException.cs index 622a3da8a0bc..f23406cce10a 100644 --- a/src/installer/tests/TestUtils/BuildFailureException.cs +++ b/src/installer/tests/TestUtils/BuildFailureException.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -20,4 +19,4 @@ public BuildFailureException(string message, Exception innerException) : base(me { } } -} \ No newline at end of file +} diff --git a/src/installer/tests/TestUtils/BuildReporter.cs b/src/installer/tests/TestUtils/BuildReporter.cs index 63e134f39e6c..e87987074ec9 100644 --- a/src/installer/tests/TestUtils/BuildReporter.cs +++ b/src/installer/tests/TestUtils/BuildReporter.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/installer/tests/TestUtils/Command.cs b/src/installer/tests/TestUtils/Command.cs index 47ef88d77ebb..1e300d6077ba 100644 --- a/src/installer/tests/TestUtils/Command.cs +++ b/src/installer/tests/TestUtils/Command.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/installer/tests/TestUtils/CommandResult.cs b/src/installer/tests/TestUtils/CommandResult.cs index 76e31485ea7b..de7961be7043 100644 --- a/src/installer/tests/TestUtils/CommandResult.cs +++ b/src/installer/tests/TestUtils/CommandResult.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Text; diff --git a/src/installer/tests/TestUtils/DotNetCli.cs b/src/installer/tests/TestUtils/DotNetCli.cs index 5f2730da0e6d..900a5f4e1a4a 100644 --- a/src/installer/tests/TestUtils/DotNetCli.cs +++ b/src/installer/tests/TestUtils/DotNetCli.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; using System.Linq; diff --git a/src/installer/tests/TestUtils/EnvVars.cs b/src/installer/tests/TestUtils/EnvVars.cs index 23542e49a726..99585be1565c 100644 --- a/src/installer/tests/TestUtils/EnvVars.cs +++ b/src/installer/tests/TestUtils/EnvVars.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/installer/tests/TestUtils/FileUtils.cs b/src/installer/tests/TestUtils/FileUtils.cs index bf2a79dc54cc..f606fe3812db 100644 --- a/src/installer/tests/TestUtils/FileUtils.cs +++ b/src/installer/tests/TestUtils/FileUtils.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/installer/tests/TestUtils/Reporter.cs b/src/installer/tests/TestUtils/Reporter.cs index 1bf31b25d2c1..c32353027b6a 100644 --- a/src/installer/tests/TestUtils/Reporter.cs +++ b/src/installer/tests/TestUtils/Reporter.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.DotNet.Cli.Build.Framework { diff --git a/src/installer/tests/TestUtils/RuntimeInformationExtensions.cs b/src/installer/tests/TestUtils/RuntimeInformationExtensions.cs index ed9ab6f3f166..798ec9464548 100644 --- a/src/installer/tests/TestUtils/RuntimeInformationExtensions.cs +++ b/src/installer/tests/TestUtils/RuntimeInformationExtensions.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/installer/tests/TestUtils/TestApp.cs b/src/installer/tests/TestUtils/TestApp.cs index a1ff67d95c82..69c29d0e78a7 100644 --- a/src/installer/tests/TestUtils/TestApp.cs +++ b/src/installer/tests/TestUtils/TestApp.cs @@ -1,8 +1,6 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using Microsoft.DotNet.CoreSetup.Test.HostActivation; using System.IO; namespace Microsoft.DotNet.CoreSetup.Test @@ -37,8 +35,6 @@ public TestApp(TestApp source) public static TestApp CreateEmpty(string name) { string location = GetNewTestArtifactPath(name); - FileUtils.EnsureDirectoryExists(location); - return new TestApp(location); } diff --git a/src/installer/tests/TestUtils/TestArtifact.cs b/src/installer/tests/TestUtils/TestArtifact.cs index d989a37e8f9f..517c2f23bbe9 100644 --- a/src/installer/tests/TestUtils/TestArtifact.cs +++ b/src/installer/tests/TestUtils/TestArtifact.cs @@ -1,10 +1,11 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. +using Microsoft.DotNet.CoreSetup.Test.HostActivation; using System; using System.Collections.Generic; using System.IO; +using System.Threading; namespace Microsoft.DotNet.CoreSetup.Test { @@ -67,25 +68,26 @@ public virtual void Dispose() _copies.Clear(); } + private static readonly object _pathCountLock = new object(); protected static string GetNewTestArtifactPath(string artifactName) { int projectCount = 0; - string projectDirectory = Path.Combine(TestArtifactsPath, projectCount.ToString(), artifactName); + string projectCountDir() => Path.Combine(TestArtifactsPath, projectCount.ToString(), artifactName); - while (Directory.Exists(projectDirectory)) + for (; Directory.Exists(projectCountDir()); projectCount++); + + lock (_pathCountLock) { - projectDirectory = Path.Combine(TestArtifactsPath, (++projectCount).ToString(), artifactName); + string projectDirectory; + for (; Directory.Exists(projectDirectory = projectCountDir()); projectCount++); + FileUtils.EnsureDirectoryExists(projectDirectory); + return projectDirectory; } - - return projectDirectory; } protected static void CopyRecursive(string sourceDirectory, string destinationDirectory, bool overwrite = false) { - if (!Directory.Exists(destinationDirectory)) - { - Directory.CreateDirectory(destinationDirectory); - } + FileUtils.EnsureDirectoryExists(destinationDirectory); foreach (var dir in Directory.EnumerateDirectories(sourceDirectory)) { diff --git a/src/installer/tests/TestUtils/TestFileBackup.cs b/src/installer/tests/TestUtils/TestFileBackup.cs index ea00778a4086..b9f50d9ea97d 100644 --- a/src/installer/tests/TestUtils/TestFileBackup.cs +++ b/src/installer/tests/TestUtils/TestFileBackup.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/installer/tests/TestUtils/TestProject.cs b/src/installer/tests/TestUtils/TestProject.cs index b512f4c1e6bc..967c58e69d97 100644 --- a/src/installer/tests/TestUtils/TestProject.cs +++ b/src/installer/tests/TestUtils/TestProject.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; diff --git a/src/installer/tests/TestUtils/TestProjectFixture.cs b/src/installer/tests/TestUtils/TestProjectFixture.cs index 5ab37de8f80f..2b03d2b69776 100644 --- a/src/installer/tests/TestUtils/TestProjectFixture.cs +++ b/src/installer/tests/TestUtils/TestProjectFixture.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.DotNet.Cli.Build; using System; diff --git a/src/libraries/Common/src/Extensions/ActivatorUtilities/ActivatorUtilities.cs b/src/libraries/Common/src/Extensions/ActivatorUtilities/ActivatorUtilities.cs index 2c397dcd0752..7f5b6c3aa0a5 100644 --- a/src/libraries/Common/src/Extensions/ActivatorUtilities/ActivatorUtilities.cs +++ b/src/libraries/Common/src/Extensions/ActivatorUtilities/ActivatorUtilities.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; @@ -44,21 +43,21 @@ static class ActivatorUtilities public static object CreateInstance(IServiceProvider provider, Type instanceType, params object[] parameters) { int bestLength = -1; - var seenPreferred = false; + bool seenPreferred = false; ConstructorMatcher bestMatcher = default; if (!instanceType.GetTypeInfo().IsAbstract) { - foreach (var constructor in instanceType + foreach (ConstructorInfo? constructor in instanceType .GetTypeInfo() .DeclaredConstructors) { if (!constructor.IsStatic && constructor.IsPublic) { var matcher = new ConstructorMatcher(constructor); - var isPreferred = constructor.IsDefined(typeof(ActivatorUtilitiesConstructorAttribute), false); - var length = matcher.Match(parameters); + bool isPreferred = constructor.IsDefined(typeof(ActivatorUtilitiesConstructorAttribute), false); + int length = matcher.Match(parameters); if (isPreferred) { @@ -86,7 +85,7 @@ public static object CreateInstance(IServiceProvider provider, Type instanceType if (bestLength == -1) { - var message = $"A suitable constructor for type '{instanceType}' could not be located. Ensure the type is concrete and services are registered for all parameters of a public constructor."; + string? message = $"A suitable constructor for type '{instanceType}' could not be located. Ensure the type is concrete and services are registered for all parameters of a public constructor."; throw new InvalidOperationException(message); } @@ -109,14 +108,14 @@ public static ObjectFactory CreateFactory(Type instanceType, Type[] argumentType { FindApplicableConstructor(instanceType, argumentTypes, out ConstructorInfo? constructor, out int?[]? parameterMap); - var provider = Expression.Parameter(typeof(IServiceProvider), "provider"); - var argumentArray = Expression.Parameter(typeof(object[]), "argumentArray"); - var factoryExpressionBody = BuildFactoryExpression(constructor, parameterMap, provider, argumentArray); + ParameterExpression? provider = Expression.Parameter(typeof(IServiceProvider), "provider"); + ParameterExpression? argumentArray = Expression.Parameter(typeof(object[]), "argumentArray"); + Expression? factoryExpressionBody = BuildFactoryExpression(constructor, parameterMap, provider, argumentArray); var factoryLambda = Expression.Lambda>( factoryExpressionBody, provider, argumentArray); - var result = factoryLambda.Compile(); + Func? result = factoryLambda.Compile(); return result.Invoke; } @@ -163,10 +162,10 @@ private static MethodInfo GetMethodInfo(Expression expr) private static object? GetService(IServiceProvider sp, Type type, Type requiredBy, bool isDefaultParameterRequired) { - var service = sp.GetService(type); + object? service = sp.GetService(type); if (service == null && !isDefaultParameterRequired) { - var message = $"Unable to resolve service for type '{type}' while attempting to activate '{requiredBy}'."; + string? message = $"Unable to resolve service for type '{type}' while attempting to activate '{requiredBy}'."; throw new InvalidOperationException(message); } return service; @@ -178,14 +177,14 @@ private static Expression BuildFactoryExpression( Expression serviceProvider, Expression factoryArgumentArray) { - var constructorParameters = constructor.GetParameters(); + ParameterInfo[]? constructorParameters = constructor.GetParameters(); var constructorArguments = new Expression[constructorParameters.Length]; - for (var i = 0; i < constructorParameters.Length; i++) + for (int i = 0; i < constructorParameters.Length; i++) { - var constructorParameter = constructorParameters[i]; - var parameterType = constructorParameter.ParameterType; - var hasDefaultValue = ParameterDefaultValue.TryGetDefaultValue(constructorParameter, out var defaultValue); + ParameterInfo? constructorParameter = constructorParameters[i]; + Type? parameterType = constructorParameter.ParameterType; + bool hasDefaultValue = ParameterDefaultValue.TryGetDefaultValue(constructorParameter, out object? defaultValue); if (parameterMap[i] != null) { @@ -204,7 +203,7 @@ private static Expression BuildFactoryExpression( // when the argument would otherwise be null. if (hasDefaultValue) { - var defaultValueExpression = Expression.Constant(defaultValue); + ConstantExpression? defaultValueExpression = Expression.Constant(defaultValue); constructorArguments[i] = Expression.Coalesce(constructorArguments[i], defaultValueExpression); } @@ -226,7 +225,7 @@ private static void FindApplicableConstructor( if (!TryFindPreferredConstructor(instanceType, argumentTypes, ref constructorInfo, ref parameterMap) && !TryFindMatchingConstructor(instanceType, argumentTypes, ref constructorInfo, ref parameterMap)) { - var message = $"A suitable constructor for type '{instanceType}' could not be located. Ensure the type is concrete and services are registered for all parameters of a public constructor."; + string? message = $"A suitable constructor for type '{instanceType}' could not be located. Ensure the type is concrete and services are registered for all parameters of a public constructor."; throw new InvalidOperationException(message); } @@ -241,7 +240,7 @@ private static bool TryFindMatchingConstructor( [NotNullWhen(true)] ref ConstructorInfo? matchingConstructor, [NotNullWhen(true)] ref int?[]? parameterMap) { - foreach (var constructor in instanceType.GetTypeInfo().DeclaredConstructors) + foreach (ConstructorInfo? constructor in instanceType.GetTypeInfo().DeclaredConstructors) { if (constructor.IsStatic || !constructor.IsPublic) { @@ -276,8 +275,8 @@ private static bool TryFindPreferredConstructor( [NotNullWhen(true)] ref ConstructorInfo? matchingConstructor, [NotNullWhen(true)] ref int?[]? parameterMap) { - var seenPreferred = false; - foreach (var constructor in instanceType.GetTypeInfo().DeclaredConstructors) + bool seenPreferred = false; + foreach (ConstructorInfo? constructor in instanceType.GetTypeInfo().DeclaredConstructors) { if (constructor.IsStatic || !constructor.IsPublic) { @@ -317,12 +316,12 @@ private static bool TryCreateParameterMap(ParameterInfo[] constructorParameters, { parameterMap = new int?[constructorParameters.Length]; - for (var i = 0; i < argumentTypes.Length; i++) + for (int i = 0; i < argumentTypes.Length; i++) { - var foundMatch = false; - var givenParameter = argumentTypes[i].GetTypeInfo(); + bool foundMatch = false; + TypeInfo? givenParameter = argumentTypes[i].GetTypeInfo(); - for (var j = 0; j < constructorParameters.Length; j++) + for (int j = 0; j < constructorParameters.Length; j++) { if (parameterMap[j] != null) { @@ -362,14 +361,14 @@ public ConstructorMatcher(ConstructorInfo constructor) public int Match(object[] givenParameters) { - var applyIndexStart = 0; - var applyExactLength = 0; - for (var givenIndex = 0; givenIndex != givenParameters.Length; givenIndex++) + int applyIndexStart = 0; + int applyExactLength = 0; + for (int givenIndex = 0; givenIndex != givenParameters.Length; givenIndex++) { - var givenType = givenParameters[givenIndex]?.GetType().GetTypeInfo(); - var givenMatched = false; + TypeInfo? givenType = givenParameters[givenIndex]?.GetType().GetTypeInfo(); + bool givenMatched = false; - for (var applyIndex = applyIndexStart; givenMatched == false && applyIndex != _parameters.Length; ++applyIndex) + for (int applyIndex = applyIndexStart; givenMatched == false && applyIndex != _parameters.Length; ++applyIndex) { if (_parameterValues[applyIndex] == null && _parameters[applyIndex].ParameterType.GetTypeInfo().IsAssignableFrom(givenType)) @@ -397,14 +396,14 @@ public int Match(object[] givenParameters) public object CreateInstance(IServiceProvider provider) { - for (var index = 0; index != _parameters.Length; index++) + for (int index = 0; index != _parameters.Length; index++) { if (_parameterValues[index] == null) { - var value = provider.GetService(_parameters[index].ParameterType); + object? value = provider.GetService(_parameters[index].ParameterType); if (value == null) { - if (!ParameterDefaultValue.TryGetDefaultValue(_parameters[index], out var defaultValue)) + if (!ParameterDefaultValue.TryGetDefaultValue(_parameters[index], out object? defaultValue)) { throw new InvalidOperationException($"Unable to resolve service for type '{_parameters[index].ParameterType}' while attempting to activate '{_constructor.DeclaringType}'."); } diff --git a/src/libraries/Common/src/Extensions/ActivatorUtilities/ActivatorUtilitiesConstructorAttribute.cs b/src/libraries/Common/src/Extensions/ActivatorUtilities/ActivatorUtilitiesConstructorAttribute.cs index add0af95c855..ae15d027aaab 100644 --- a/src/libraries/Common/src/Extensions/ActivatorUtilities/ActivatorUtilitiesConstructorAttribute.cs +++ b/src/libraries/Common/src/Extensions/ActivatorUtilities/ActivatorUtilitiesConstructorAttribute.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -14,6 +13,7 @@ namespace Microsoft.Extensions.Internal /// Marks the constructor to be used when activating type using . /// + [AttributeUsage(AttributeTargets.All)] #if ActivatorUtilities_In_DependencyInjection public #else diff --git a/src/libraries/Common/src/Extensions/ActivatorUtilities/ObjectFactory.cs b/src/libraries/Common/src/Extensions/ActivatorUtilities/ObjectFactory.cs index 4788769b093c..45020991ab07 100644 --- a/src/libraries/Common/src/Extensions/ActivatorUtilities/ObjectFactory.cs +++ b/src/libraries/Common/src/Extensions/ActivatorUtilities/ObjectFactory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -22,5 +21,5 @@ namespace Microsoft.Extensions.Internal #else internal #endif - delegate object ObjectFactory(IServiceProvider serviceProvider, object[] arguments); -} \ No newline at end of file + delegate object ObjectFactory(IServiceProvider serviceProvider, object?[]? arguments); +} diff --git a/src/libraries/Common/src/Extensions/BenchmarkRunner/AspNetCoreBenchmarkAttribute.cs b/src/libraries/Common/src/Extensions/BenchmarkRunner/AspNetCoreBenchmarkAttribute.cs index 0f23867de1d8..22ad0fb3e51b 100644 --- a/src/libraries/Common/src/Extensions/BenchmarkRunner/AspNetCoreBenchmarkAttribute.cs +++ b/src/libraries/Common/src/Extensions/BenchmarkRunner/AspNetCoreBenchmarkAttribute.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/src/Extensions/BenchmarkRunner/DefaultCoreConfig.cs b/src/libraries/Common/src/Extensions/BenchmarkRunner/DefaultCoreConfig.cs index 3504acbc2d70..5c4b4bd5cd29 100644 --- a/src/libraries/Common/src/Extensions/BenchmarkRunner/DefaultCoreConfig.cs +++ b/src/libraries/Common/src/Extensions/BenchmarkRunner/DefaultCoreConfig.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using BenchmarkDotNet.Columns; using BenchmarkDotNet.Configs; diff --git a/src/libraries/Common/src/Extensions/BenchmarkRunner/DefaultCoreDebugConfig.cs b/src/libraries/Common/src/Extensions/BenchmarkRunner/DefaultCoreDebugConfig.cs index f399c712bfc8..0f477c450a7e 100644 --- a/src/libraries/Common/src/Extensions/BenchmarkRunner/DefaultCoreDebugConfig.cs +++ b/src/libraries/Common/src/Extensions/BenchmarkRunner/DefaultCoreDebugConfig.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using BenchmarkDotNet.Configs; using BenchmarkDotNet.Engines; diff --git a/src/libraries/Common/src/Extensions/BenchmarkRunner/DefaultCorePerfLabConfig.cs b/src/libraries/Common/src/Extensions/BenchmarkRunner/DefaultCorePerfLabConfig.cs index d8fe46385c5e..25b150c33001 100644 --- a/src/libraries/Common/src/Extensions/BenchmarkRunner/DefaultCorePerfLabConfig.cs +++ b/src/libraries/Common/src/Extensions/BenchmarkRunner/DefaultCorePerfLabConfig.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using BenchmarkDotNet.Columns; using BenchmarkDotNet.Configs; diff --git a/src/libraries/Common/src/Extensions/BenchmarkRunner/DefaultCoreProfileConfig.cs b/src/libraries/Common/src/Extensions/BenchmarkRunner/DefaultCoreProfileConfig.cs index 395f425e2457..474757020daf 100644 --- a/src/libraries/Common/src/Extensions/BenchmarkRunner/DefaultCoreProfileConfig.cs +++ b/src/libraries/Common/src/Extensions/BenchmarkRunner/DefaultCoreProfileConfig.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using BenchmarkDotNet.Columns; using BenchmarkDotNet.Configs; diff --git a/src/libraries/Common/src/Extensions/BenchmarkRunner/DefaultCoreValidationConfig.cs b/src/libraries/Common/src/Extensions/BenchmarkRunner/DefaultCoreValidationConfig.cs index adc887a61404..d6937ba7fba2 100644 --- a/src/libraries/Common/src/Extensions/BenchmarkRunner/DefaultCoreValidationConfig.cs +++ b/src/libraries/Common/src/Extensions/BenchmarkRunner/DefaultCoreValidationConfig.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using BenchmarkDotNet.Configs; using BenchmarkDotNet.Jobs; diff --git a/src/libraries/Common/src/Extensions/BenchmarkRunner/ParameterizedJobConfigAttribute.cs b/src/libraries/Common/src/Extensions/BenchmarkRunner/ParameterizedJobConfigAttribute.cs index 5ce0816f4a8b..0f84bd04a768 100644 --- a/src/libraries/Common/src/Extensions/BenchmarkRunner/ParameterizedJobConfigAttribute.cs +++ b/src/libraries/Common/src/Extensions/BenchmarkRunner/ParameterizedJobConfigAttribute.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/src/Extensions/BenchmarkRunner/ParamsDisplayInfoColumn.cs b/src/libraries/Common/src/Extensions/BenchmarkRunner/ParamsDisplayInfoColumn.cs index 2ce4f6ad2f70..08ff5fc9351c 100644 --- a/src/libraries/Common/src/Extensions/BenchmarkRunner/ParamsDisplayInfoColumn.cs +++ b/src/libraries/Common/src/Extensions/BenchmarkRunner/ParamsDisplayInfoColumn.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using BenchmarkDotNet.Columns; using BenchmarkDotNet.Reports; @@ -24,4 +23,4 @@ public class ParamsSummaryColumn : IColumn public string GetValue(Summary summary, Benchmark benchmark, ISummaryStyle style) => GetValue(summary, benchmark); public string Legend => $"Summary of all parameter values"; } -} \ No newline at end of file +} diff --git a/src/libraries/Common/src/Extensions/BenchmarkRunner/Program.cs b/src/libraries/Common/src/Extensions/BenchmarkRunner/Program.cs index 135dc173ac04..9fec28e44c07 100644 --- a/src/libraries/Common/src/Extensions/BenchmarkRunner/Program.cs +++ b/src/libraries/Common/src/Extensions/BenchmarkRunner/Program.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Extensions/CommandLineUtils/CommandLine/AnsiConsole.cs b/src/libraries/Common/src/Extensions/CommandLineUtils/CommandLine/AnsiConsole.cs index eb89c68e2a75..63d671187796 100644 --- a/src/libraries/Common/src/Extensions/CommandLineUtils/CommandLine/AnsiConsole.cs +++ b/src/libraries/Common/src/Extensions/CommandLineUtils/CommandLine/AnsiConsole.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Common/src/Extensions/CommandLineUtils/CommandLine/CommandArgument.cs b/src/libraries/Common/src/Extensions/CommandLineUtils/CommandLine/CommandArgument.cs index c9e4271d6bc8..562f14f652d7 100644 --- a/src/libraries/Common/src/Extensions/CommandLineUtils/CommandLine/CommandArgument.cs +++ b/src/libraries/Common/src/Extensions/CommandLineUtils/CommandLine/CommandArgument.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Linq; diff --git a/src/libraries/Common/src/Extensions/CommandLineUtils/CommandLine/CommandLineApplication.cs b/src/libraries/Common/src/Extensions/CommandLineUtils/CommandLine/CommandLineApplication.cs index be477e5011d8..9d7f5a73d120 100644 --- a/src/libraries/Common/src/Extensions/CommandLineUtils/CommandLine/CommandLineApplication.cs +++ b/src/libraries/Common/src/Extensions/CommandLineUtils/CommandLine/CommandLineApplication.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections; diff --git a/src/libraries/Common/src/Extensions/CommandLineUtils/CommandLine/CommandOption.cs b/src/libraries/Common/src/Extensions/CommandLineUtils/CommandLine/CommandOption.cs index 7f018e102ebd..843dd094725b 100644 --- a/src/libraries/Common/src/Extensions/CommandLineUtils/CommandLine/CommandOption.cs +++ b/src/libraries/Common/src/Extensions/CommandLineUtils/CommandLine/CommandOption.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/src/Extensions/CommandLineUtils/CommandLine/CommandOptionType.cs b/src/libraries/Common/src/Extensions/CommandLineUtils/CommandLine/CommandOptionType.cs index 0c07d2a00d6d..8f65a5ac460d 100644 --- a/src/libraries/Common/src/Extensions/CommandLineUtils/CommandLine/CommandOptionType.cs +++ b/src/libraries/Common/src/Extensions/CommandLineUtils/CommandLine/CommandOptionType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.CommandLineUtils diff --git a/src/libraries/Common/src/Extensions/CommandLineUtils/CommandLine/CommandParsingException.cs b/src/libraries/Common/src/Extensions/CommandLineUtils/CommandLine/CommandParsingException.cs index 32d93752ca8a..047d714fd2c8 100644 --- a/src/libraries/Common/src/Extensions/CommandLineUtils/CommandLine/CommandParsingException.cs +++ b/src/libraries/Common/src/Extensions/CommandLineUtils/CommandLine/CommandParsingException.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/src/Extensions/CommandLineUtils/Utilities/ArgumentEscaper.cs b/src/libraries/Common/src/Extensions/CommandLineUtils/Utilities/ArgumentEscaper.cs index 0f561a1ba907..f64ad0b5ccc5 100644 --- a/src/libraries/Common/src/Extensions/CommandLineUtils/Utilities/ArgumentEscaper.cs +++ b/src/libraries/Common/src/Extensions/CommandLineUtils/Utilities/ArgumentEscaper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Linq; diff --git a/src/libraries/Common/src/Extensions/CommandLineUtils/Utilities/DotNetMuxer.cs b/src/libraries/Common/src/Extensions/CommandLineUtils/Utilities/DotNetMuxer.cs index 2b1e03cdbe1a..1d13ec2d3ed2 100644 --- a/src/libraries/Common/src/Extensions/CommandLineUtils/Utilities/DotNetMuxer.cs +++ b/src/libraries/Common/src/Extensions/CommandLineUtils/Utilities/DotNetMuxer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // System.AppContext.GetData is not available in these frameworks #if !NET451 && !NET452 && !NET46 && !NET461 diff --git a/src/libraries/Common/src/Extensions/EmptyDisposable.cs b/src/libraries/Common/src/Extensions/EmptyDisposable.cs index d2a643a1ef7f..322df0fea85f 100644 --- a/src/libraries/Common/src/Extensions/EmptyDisposable.cs +++ b/src/libraries/Common/src/Extensions/EmptyDisposable.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/src/Extensions/HashCodeCombiner/HashCodeCombiner.cs b/src/libraries/Common/src/Extensions/HashCodeCombiner/HashCodeCombiner.cs index ccff4df83407..a23c69902531 100644 --- a/src/libraries/Common/src/Extensions/HashCodeCombiner/HashCodeCombiner.cs +++ b/src/libraries/Common/src/Extensions/HashCodeCombiner/HashCodeCombiner.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections; using System.Collections.Generic; @@ -17,7 +16,7 @@ public int CombinedHash [MethodImpl(MethodImplOptions.AggressiveInlining)] get { return _combinedHash64.GetHashCode(); } } - + [MethodImpl(MethodImplOptions.AggressiveInlining)] private HashCodeCombiner(long seed) { @@ -33,7 +32,7 @@ public void Add(IEnumerable e) } else { - var count = 0; + int count = 0; foreach (object o in e) { Add(o); @@ -58,21 +57,21 @@ public void Add(int i) [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Add(string s) { - var hashCode = (s != null) ? s.GetHashCode() : 0; + int hashCode = (s != null) ? s.GetHashCode() : 0; Add(hashCode); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Add(object o) { - var hashCode = (o != null) ? o.GetHashCode() : 0; + int hashCode = (o != null) ? o.GetHashCode() : 0; Add(hashCode); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Add(TValue value, IEqualityComparer comparer) { - var hashCode = value != null ? comparer.GetHashCode(value) : 0; + int hashCode = value != null ? comparer.GetHashCode(value) : 0; Add(hashCode); } diff --git a/src/libraries/Common/src/Extensions/Logging/NullExternalScopeProvider.cs b/src/libraries/Common/src/Extensions/Logging/NullExternalScopeProvider.cs index eebc9d94c59b..17936083a934 100644 --- a/src/libraries/Common/src/Extensions/Logging/NullExternalScopeProvider.cs +++ b/src/libraries/Common/src/Extensions/Logging/NullExternalScopeProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/src/Extensions/Logging/NullScope.cs b/src/libraries/Common/src/Extensions/Logging/NullScope.cs index fb84d8de8f5d..14f92fbe72ae 100644 --- a/src/libraries/Common/src/Extensions/Logging/NullScope.cs +++ b/src/libraries/Common/src/Extensions/Logging/NullScope.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/src/Extensions/NonCapturingTimer/NonCapturingTimer.cs b/src/libraries/Common/src/Extensions/NonCapturingTimer/NonCapturingTimer.cs index 7b37db3db7fd..e07d90ca3221 100644 --- a/src/libraries/Common/src/Extensions/NonCapturingTimer/NonCapturingTimer.cs +++ b/src/libraries/Common/src/Extensions/NonCapturingTimer/NonCapturingTimer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Threading; diff --git a/src/libraries/Common/src/Extensions/ParameterDefaultValue/ParameterDefaultValue.cs b/src/libraries/Common/src/Extensions/ParameterDefaultValue/ParameterDefaultValue.cs index abcbf454dcfa..03f1b26ec0e2 100644 --- a/src/libraries/Common/src/Extensions/ParameterDefaultValue/ParameterDefaultValue.cs +++ b/src/libraries/Common/src/Extensions/ParameterDefaultValue/ParameterDefaultValue.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable @@ -16,7 +15,7 @@ internal class ParameterDefaultValue public static bool TryGetDefaultValue(ParameterInfo parameter, out object? defaultValue) { bool hasDefaultValue; - var tryToGetDefaultValue = true; + bool tryToGetDefaultValue = true; defaultValue = null; try @@ -51,7 +50,7 @@ public static bool TryGetDefaultValue(ParameterInfo parameter, out object? defau parameter.ParameterType.GetGenericTypeDefinition() == _nullable ) { - var underlyingType = Nullable.GetUnderlyingType(parameter.ParameterType); + Type? underlyingType = Nullable.GetUnderlyingType(parameter.ParameterType); if (underlyingType != null && underlyingType.IsEnum) { defaultValue = Enum.ToObject(underlyingType, defaultValue); diff --git a/src/libraries/Common/src/Extensions/ProviderAliasUtilities/ProviderAliasUtilities.cs b/src/libraries/Common/src/Extensions/ProviderAliasUtilities/ProviderAliasUtilities.cs index ee925c664125..4fb6f86ba23e 100644 --- a/src/libraries/Common/src/Extensions/ProviderAliasUtilities/ProviderAliasUtilities.cs +++ b/src/libraries/Common/src/Extensions/ProviderAliasUtilities/ProviderAliasUtilities.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Reflection; @@ -14,11 +13,11 @@ internal static class ProviderAliasUtilities internal static string GetAlias(Type providerType) { - foreach (var attribute in providerType.GetTypeInfo().GetCustomAttributes(inherit: false)) + foreach (object attribute in providerType.GetTypeInfo().GetCustomAttributes(inherit: false)) { if (attribute.GetType().FullName == AliasAttibuteTypeFullName) { - var valueProperty = attribute + PropertyInfo valueProperty = attribute .GetType() .GetProperty(AliasAttibuteAliasProperty, BindingFlags.Public | BindingFlags.Instance); @@ -32,4 +31,4 @@ internal static string GetAlias(Type providerType) return null; } } -} \ No newline at end of file +} diff --git a/src/libraries/Common/src/Extensions/ReferenceAssemblyInfo.cs b/src/libraries/Common/src/Extensions/ReferenceAssemblyInfo.cs index 360ef465e60b..5e55aebff743 100644 --- a/src/libraries/Common/src/Extensions/ReferenceAssemblyInfo.cs +++ b/src/libraries/Common/src/Extensions/ReferenceAssemblyInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // Reference assemblies should have the ReferenceAssemblyAttribute. [assembly:System.Runtime.CompilerServices.ReferenceAssembly] diff --git a/src/libraries/Common/src/Extensions/TypeNameHelper/TypeNameHelper.cs b/src/libraries/Common/src/Extensions/TypeNameHelper/TypeNameHelper.cs index 31b7d8a79185..66d767c3fdf8 100644 --- a/src/libraries/Common/src/Extensions/TypeNameHelper/TypeNameHelper.cs +++ b/src/libraries/Common/src/Extensions/TypeNameHelper/TypeNameHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Text; @@ -57,14 +56,14 @@ private static void ProcessType(StringBuilder builder, Type type, in DisplayName { if (type.IsGenericType) { - var genericArguments = type.GetGenericArguments(); + Type[] genericArguments = type.GetGenericArguments(); ProcessGenericType(builder, type, genericArguments, genericArguments.Length, options); } else if (type.IsArray) { ProcessArrayType(builder, type, options); } - else if (_builtInTypeNames.TryGetValue(type, out var builtInName)) + else if (_builtInTypeNames.TryGetValue(type, out string builtInName)) { builder.Append(builtInName); } @@ -77,7 +76,7 @@ private static void ProcessType(StringBuilder builder, Type type, in DisplayName } else { - var name = options.FullName ? type.FullName : type.Name; + string name = options.FullName ? type.FullName : type.Name; builder.Append(name); if (options.NestedTypeDelimiter != DefaultNestedTypeDelimiter) @@ -89,7 +88,7 @@ private static void ProcessType(StringBuilder builder, Type type, in DisplayName private static void ProcessArrayType(StringBuilder builder, Type type, in DisplayNameOptions options) { - var innerType = type; + Type innerType = type; while (innerType.IsArray) { innerType = innerType.GetElementType(); @@ -108,7 +107,7 @@ private static void ProcessArrayType(StringBuilder builder, Type type, in Displa private static void ProcessGenericType(StringBuilder builder, Type type, Type[] genericArguments, int length, in DisplayNameOptions options) { - var offset = 0; + int offset = 0; if (type.IsNested) { offset = type.DeclaringType.GetGenericArguments().Length; @@ -128,7 +127,7 @@ private static void ProcessGenericType(StringBuilder builder, Type type, Type[] } } - var genericPartIndex = type.Name.IndexOf('`'); + int genericPartIndex = type.Name.IndexOf('`'); if (genericPartIndex <= 0) { builder.Append(type.Name); @@ -140,7 +139,7 @@ private static void ProcessGenericType(StringBuilder builder, Type type, Type[] if (options.IncludeGenericParameters) { builder.Append('<'); - for (var i = offset; i < length; i++) + for (int i = offset; i < length; i++) { ProcessType(builder, genericArguments[i], options); if (i + 1 == length) diff --git a/src/libraries/Common/src/Extensions/ValueStopwatch/ValueStopwatch.cs b/src/libraries/Common/src/Extensions/ValueStopwatch/ValueStopwatch.cs index d3ef21ad97fb..fd29b3257a0b 100644 --- a/src/libraries/Common/src/Extensions/ValueStopwatch/ValueStopwatch.cs +++ b/src/libraries/Common/src/Extensions/ValueStopwatch/ValueStopwatch.cs @@ -1,11 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; -namespace Microsoft.Extensions.Internal +namespace Microsoft.Extensions.Internal { internal struct ValueStopwatch { @@ -31,9 +30,9 @@ public TimeSpan GetElapsedTime() throw new InvalidOperationException("An uninitialized, or 'default', ValueStopwatch cannot be used to get elapsed time."); } - var end = Stopwatch.GetTimestamp(); - var timestampDelta = end - _startTimestamp; - var ticks = (long)(TimestampToTicks * timestampDelta); + long end = Stopwatch.GetTimestamp(); + long timestampDelta = end - _startTimestamp; + long ticks = (long)(TimestampToTicks * timestampDelta); return new TimeSpan(ticks); } } diff --git a/src/libraries/Common/src/Internal/Cryptography/AsymmetricAlgorithmHelpers.Der.cs b/src/libraries/Common/src/Internal/Cryptography/AsymmetricAlgorithmHelpers.Der.cs index aef49d207dcb..b750a2de5e9d 100644 --- a/src/libraries/Common/src/Internal/Cryptography/AsymmetricAlgorithmHelpers.Der.cs +++ b/src/libraries/Common/src/Internal/Cryptography/AsymmetricAlgorithmHelpers.Der.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Internal/Cryptography/AsymmetricAlgorithmHelpers.Hash.cs b/src/libraries/Common/src/Internal/Cryptography/AsymmetricAlgorithmHelpers.Hash.cs index 881fb4e8a19b..7a7ca492ee3e 100644 --- a/src/libraries/Common/src/Internal/Cryptography/AsymmetricAlgorithmHelpers.Hash.cs +++ b/src/libraries/Common/src/Internal/Cryptography/AsymmetricAlgorithmHelpers.Hash.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Internal/Cryptography/BasicSymmetricCipher.cs b/src/libraries/Common/src/Internal/Cryptography/BasicSymmetricCipher.cs index 59bf4af55abf..df3ae1f7af96 100644 --- a/src/libraries/Common/src/Internal/Cryptography/BasicSymmetricCipher.cs +++ b/src/libraries/Common/src/Internal/Cryptography/BasicSymmetricCipher.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; @@ -29,9 +28,9 @@ protected BasicSymmetricCipher(byte[]? iv, int blockSizeInBytes) BlockSizeInBytes = blockSizeInBytes; } - public abstract int Transform(byte[] input, int inputOffset, int count, byte[] output, int outputOffset); + public abstract int Transform(ReadOnlySpan input, Span output); - public abstract byte[] TransformFinal(byte[] input, int inputOffset, int count); + public abstract int TransformFinal(ReadOnlySpan input, Span output); public int BlockSizeInBytes { get; private set; } diff --git a/src/libraries/Common/src/Internal/Cryptography/BasicSymmetricCipherBCrypt.cs b/src/libraries/Common/src/Internal/Cryptography/BasicSymmetricCipherBCrypt.cs index e8ee331c6a7e..2deb97cbd5b1 100644 --- a/src/libraries/Common/src/Internal/Cryptography/BasicSymmetricCipherBCrypt.cs +++ b/src/libraries/Common/src/Internal/Cryptography/BasicSymmetricCipherBCrypt.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; @@ -61,28 +60,23 @@ protected override void Dispose(bool disposing) base.Dispose(disposing); } - public override int Transform(byte[] input, int inputOffset, int count, byte[] output, int outputOffset) + public override int Transform(ReadOnlySpan input, Span output) { - Debug.Assert(input != null); - Debug.Assert(inputOffset >= 0); - Debug.Assert(count > 0); - Debug.Assert((count % BlockSizeInBytes) == 0); - Debug.Assert(input.Length - inputOffset >= count); - Debug.Assert(output != null); - Debug.Assert(outputOffset >= 0); - Debug.Assert(output.Length - outputOffset >= count); + Debug.Assert(input.Length > 0); + Debug.Assert((input.Length % BlockSizeInBytes) == 0); int numBytesWritten; + if (_encrypting) { - numBytesWritten = Interop.BCrypt.BCryptEncrypt(_hKey, input, inputOffset, count, _currentIv, output, outputOffset, output.Length - outputOffset); + numBytesWritten = Interop.BCrypt.BCryptEncrypt(_hKey, input, _currentIv, output); } else { - numBytesWritten = Interop.BCrypt.BCryptDecrypt(_hKey, input, inputOffset, count, _currentIv, output, outputOffset, output.Length - outputOffset); + numBytesWritten = Interop.BCrypt.BCryptDecrypt(_hKey, input, _currentIv, output); } - if (numBytesWritten != count) + if (numBytesWritten != input.Length) { // CNG gives us no way to tell BCryptDecrypt() that we're decrypting the final block, nor is it performing any // padding /depadding for us. So there's no excuse for a provider to hold back output for "future calls." Though @@ -93,23 +87,20 @@ public override int Transform(byte[] input, int inputOffset, int count, byte[] o return numBytesWritten; } - public override byte[] TransformFinal(byte[] input, int inputOffset, int count) + public override int TransformFinal(ReadOnlySpan input, Span output) { - Debug.Assert(input != null); - Debug.Assert(inputOffset >= 0); - Debug.Assert(count >= 0); - Debug.Assert((count % BlockSizeInBytes) == 0); - Debug.Assert(input.Length - inputOffset >= count); - - byte[] output = new byte[count]; - if (count != 0) + Debug.Assert((input.Length % BlockSizeInBytes) == 0); + + int numBytesWritten = 0; + + if (input.Length != 0) { - int numBytesWritten = Transform(input, inputOffset, count, output, 0); - Debug.Assert(numBytesWritten == count); // Our implementation of Transform() guarantees this. See comment above. + numBytesWritten = Transform(input, output); + Debug.Assert(numBytesWritten == input.Length); // Our implementation of Transform() guarantees this. See comment above. } Reset(); - return output; + return numBytesWritten; } private void Reset() diff --git a/src/libraries/Common/src/Internal/Cryptography/CngCommon.Hash.cs b/src/libraries/Common/src/Internal/Cryptography/CngCommon.Hash.cs index 8240a018879f..75d9b8e997eb 100644 --- a/src/libraries/Common/src/Internal/Cryptography/CngCommon.Hash.cs +++ b/src/libraries/Common/src/Internal/Cryptography/CngCommon.Hash.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Internal/Cryptography/CngCommon.SignVerify.cs b/src/libraries/Common/src/Internal/Cryptography/CngCommon.SignVerify.cs index c3da1393e4f4..b1cc2e569a60 100644 --- a/src/libraries/Common/src/Internal/Cryptography/CngCommon.SignVerify.cs +++ b/src/libraries/Common/src/Internal/Cryptography/CngCommon.SignVerify.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Internal/Cryptography/HashProvider.cs b/src/libraries/Common/src/Internal/Cryptography/HashProvider.cs index 27702c36e25d..e77355e5a163 100644 --- a/src/libraries/Common/src/Internal/Cryptography/HashProvider.cs +++ b/src/libraries/Common/src/Internal/Cryptography/HashProvider.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; +using System.Diagnostics; namespace Internal.Cryptography { @@ -34,9 +34,31 @@ public void AppendHashData(byte[] data, int offset, int count) public abstract void AppendHashData(ReadOnlySpan data); // Compute the hash based on the appended data and resets the HashProvider for more hashing. - public abstract byte[] FinalizeHashAndReset(); + public abstract int FinalizeHashAndReset(Span destination); - public abstract bool TryFinalizeHashAndReset(Span destination, out int bytesWritten); + public abstract int GetCurrentHash(Span destination); + + public byte[] FinalizeHashAndReset() + { + byte[] ret = new byte[HashSizeInBytes]; + + int written = FinalizeHashAndReset(ret); + Debug.Assert(written == HashSizeInBytes); + + return ret; + } + + public bool TryFinalizeHashAndReset(Span destination, out int bytesWritten) + { + if (destination.Length < HashSizeInBytes) + { + bytesWritten = 0; + return false; + } + + bytesWritten = FinalizeHashAndReset(destination); + return true; + } // Returns the length of the byte array returned by FinalizeHashAndReset. public abstract int HashSizeInBytes { get; } diff --git a/src/libraries/Common/src/Internal/Cryptography/HashProviderCng.cs b/src/libraries/Common/src/Internal/Cryptography/HashProviderCng.cs index 30e975e39b0a..8df69d9439d1 100644 --- a/src/libraries/Common/src/Internal/Cryptography/HashProviderCng.cs +++ b/src/libraries/Common/src/Internal/Cryptography/HashProviderCng.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; @@ -81,22 +80,9 @@ public sealed override unsafe void AppendHashData(ReadOnlySpan source) } } - public sealed override byte[] FinalizeHashAndReset() + public override int FinalizeHashAndReset(Span destination) { - var hash = new byte[_hashSize]; - bool success = TryFinalizeHashAndReset(hash, out int bytesWritten); - Debug.Assert(success); - Debug.Assert(hash.Length == bytesWritten); - return hash; - } - - public override bool TryFinalizeHashAndReset(Span destination, out int bytesWritten) - { - if (destination.Length < _hashSize) - { - bytesWritten = 0; - return false; - } + Debug.Assert(destination.Length >= _hashSize); Debug.Assert(_hHash != null); NTSTATUS ntStatus = Interop.BCrypt.BCryptFinishHash(_hHash, destination, _hashSize, 0); @@ -105,9 +91,27 @@ public override bool TryFinalizeHashAndReset(Span destination, out int byt throw Interop.BCrypt.CreateCryptographicException(ntStatus); } - bytesWritten = _hashSize; ResetHashObject(); - return true; + return _hashSize; + } + + public override int GetCurrentHash(Span destination) + { + Debug.Assert(destination.Length >= _hashSize); + + Debug.Assert(_hHash != null); + + using (SafeBCryptHashHandle tmpHash = Interop.BCrypt.BCryptDuplicateHash(_hHash)) + { + NTSTATUS ntStatus = Interop.BCrypt.BCryptFinishHash(tmpHash, destination, _hashSize, 0); + + if (ntStatus != NTSTATUS.STATUS_SUCCESS) + { + throw Interop.BCrypt.CreateCryptographicException(ntStatus); + } + + return _hashSize; + } } public sealed override void Dispose(bool disposing) diff --git a/src/libraries/Common/src/Internal/Cryptography/Helpers.cs b/src/libraries/Common/src/Internal/Cryptography/Helpers.cs index 6e274fe3f8ce..d33c9c232a7e 100644 --- a/src/libraries/Common/src/Internal/Cryptography/Helpers.cs +++ b/src/libraries/Common/src/Internal/Cryptography/Helpers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Internal/Cryptography/PemEnumerator.cs b/src/libraries/Common/src/Internal/Cryptography/PemEnumerator.cs new file mode 100644 index 000000000000..1deb9fdc592e --- /dev/null +++ b/src/libraries/Common/src/Internal/Cryptography/PemEnumerator.cs @@ -0,0 +1,59 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Diagnostics; +using System.Security.Cryptography; + +namespace Internal.Cryptography +{ + internal readonly ref struct PemEnumerator + { + private readonly ReadOnlySpan _contents; + + public PemEnumerator(ReadOnlySpan contents) + { + _contents = contents; + } + + public Enumerator GetEnumerator() => new Enumerator(_contents); + + internal ref struct Enumerator + { + private ReadOnlySpan _contents; + private PemFields _pemFields; + + public Enumerator(ReadOnlySpan contents) + { + _contents = contents; + _pemFields = default; + } + + public PemFieldItem Current => new PemFieldItem(_contents, _pemFields); + + public bool MoveNext() + { + _contents = _contents[_pemFields.Location.End..]; + return PemEncoding.TryFind(_contents, out _pemFields); + } + + internal readonly ref struct PemFieldItem + { + private readonly ReadOnlySpan _contents; + private readonly PemFields _pemFields; + + public PemFieldItem(ReadOnlySpan contents, PemFields pemFields) + { + _contents = contents; + _pemFields = pemFields; + } + + public void Deconstruct(out ReadOnlySpan contents, out PemFields pemFields) + { + contents = _contents; + pemFields = _pemFields; + } + } + } + } +} diff --git a/src/libraries/Common/src/Internal/Cryptography/PemKeyImportHelpers.cs b/src/libraries/Common/src/Internal/Cryptography/PemKeyImportHelpers.cs index 4a6c1ea13ced..72326e96364f 100644 --- a/src/libraries/Common/src/Internal/Cryptography/PemKeyImportHelpers.cs +++ b/src/libraries/Common/src/Internal/Cryptography/PemKeyImportHelpers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Internal/Cryptography/UniversalCryptoDecryptor.cs b/src/libraries/Common/src/Internal/Cryptography/UniversalCryptoDecryptor.cs index c7cdc14b2463..754dbc08eb21 100644 --- a/src/libraries/Common/src/Internal/Cryptography/UniversalCryptoDecryptor.cs +++ b/src/libraries/Common/src/Internal/Cryptography/UniversalCryptoDecryptor.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; @@ -24,7 +23,7 @@ public UniversalCryptoDecryptor(PaddingMode paddingMode, BasicSymmetricCipher ba { } - protected sealed override int UncheckedTransformBlock(byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset) + protected override int UncheckedTransformBlock(ReadOnlySpan inputBuffer, Span outputBuffer) { // // If we're decrypting, it's possible to be called with the last blocks of the data, and then @@ -42,8 +41,8 @@ protected sealed override int UncheckedTransformBlock(byte[] inputBuffer, int in // If we have data saved from a previous call, decrypt that into the output first if (_heldoverCipher != null) { - int depadDecryptLength = BasicSymmetricCipher.Transform(_heldoverCipher, 0, _heldoverCipher.Length, outputBuffer, outputOffset); - outputOffset += depadDecryptLength; + int depadDecryptLength = BasicSymmetricCipher.Transform(_heldoverCipher, outputBuffer); + outputBuffer = outputBuffer.Slice(depadDecryptLength); decryptedBytes += depadDecryptLength; } else @@ -52,25 +51,24 @@ protected sealed override int UncheckedTransformBlock(byte[] inputBuffer, int in } // Postpone the last block to the next round. - Debug.Assert(inputCount >= _heldoverCipher.Length, "inputCount >= _heldoverCipher.Length"); - int startOfLastBlock = inputOffset + inputCount - _heldoverCipher.Length; - Buffer.BlockCopy(inputBuffer, startOfLastBlock, _heldoverCipher, 0, _heldoverCipher.Length); - inputCount -= _heldoverCipher.Length; - Debug.Assert(inputCount % InputBlockSize == 0, "Did not remove whole blocks for depadding"); + Debug.Assert(inputBuffer.Length >= _heldoverCipher.Length, "inputBuffer.Length >= _heldoverCipher.Length"); + inputBuffer.Slice(inputBuffer.Length - _heldoverCipher.Length).CopyTo(_heldoverCipher); + inputBuffer = inputBuffer.Slice(0, inputBuffer.Length - _heldoverCipher.Length); + Debug.Assert(inputBuffer.Length % InputBlockSize == 0, "Did not remove whole blocks for depadding"); } - if (inputCount > 0) + if (inputBuffer.Length > 0) { - decryptedBytes += BasicSymmetricCipher.Transform(inputBuffer, inputOffset, inputCount, outputBuffer, outputOffset); + decryptedBytes += BasicSymmetricCipher.Transform(inputBuffer, outputBuffer); } return decryptedBytes; } - protected sealed override byte[] UncheckedTransformFinalBlock(byte[] inputBuffer, int inputOffset, int inputCount) + protected override unsafe int UncheckedTransformFinalBlock(ReadOnlySpan inputBuffer, Span outputBuffer) { // We can't complete decryption on a partial block - if (inputCount % InputBlockSize != 0) + if (inputBuffer.Length % InputBlockSize != 0) throw new CryptographicException(SR.Cryptography_PartialBlock); // @@ -78,46 +76,91 @@ protected sealed override byte[] UncheckedTransformFinalBlock(byte[] inputBuffer // Otherwise the decryption buffer is just the input data. // - byte[]? ciphertext = null; + ReadOnlySpan inputCiphertext; + Span ciphertext; + byte[]? rentedCiphertext = null; + int rentedCiphertextSize = 0; - if (_heldoverCipher == null) + try { - ciphertext = new byte[inputCount]; - Buffer.BlockCopy(inputBuffer, inputOffset, ciphertext, 0, inputCount); + if (_heldoverCipher == null) + { + rentedCiphertextSize = inputBuffer.Length; + rentedCiphertext = CryptoPool.Rent(inputBuffer.Length); + ciphertext = rentedCiphertext.AsSpan(0, inputBuffer.Length); + inputCiphertext = inputBuffer; + } + else + { + rentedCiphertextSize = _heldoverCipher.Length + inputBuffer.Length; + rentedCiphertext = CryptoPool.Rent(rentedCiphertextSize); + ciphertext = rentedCiphertext.AsSpan(0, rentedCiphertextSize); + _heldoverCipher.AsSpan().CopyTo(ciphertext); + inputBuffer.CopyTo(ciphertext.Slice(_heldoverCipher.Length)); + + // Decrypt in-place + inputCiphertext = ciphertext; + } + + int unpaddedLength = 0; + + fixed (byte* pCiphertext = ciphertext) + { + // Decrypt the data, then strip the padding to get the final decrypted data. Note that even if the cipherText length is 0, we must + // invoke TransformFinal() so that the cipher object knows to reset for the next cipher operation. + int decryptWritten = BasicSymmetricCipher.TransformFinal(inputCiphertext, ciphertext); + Span decryptedBytes = ciphertext.Slice(0, decryptWritten); + + if (decryptedBytes.Length > 0) + { + unpaddedLength = GetPaddingLength(decryptedBytes); + decryptedBytes.Slice(0, unpaddedLength).CopyTo(outputBuffer); + } + } + + Reset(); + return unpaddedLength; } - else + finally { - ciphertext = new byte[_heldoverCipher.Length + inputCount]; - Buffer.BlockCopy(_heldoverCipher, 0, ciphertext, 0, _heldoverCipher.Length); - Buffer.BlockCopy(inputBuffer, inputOffset, ciphertext, _heldoverCipher.Length, inputCount); + if (rentedCiphertext != null) + { + CryptoPool.Return(rentedCiphertext, clearSize: rentedCiphertextSize); + } } + } - // Decrypt the data, then strip the padding to get the final decrypted data. Note that even if the cipherText length is 0, we must - // invoke TransformFinal() so that the cipher object knows to reset for the next cipher operation. - byte[] decryptedBytes = BasicSymmetricCipher.TransformFinal(ciphertext, 0, ciphertext.Length); - byte[] outputData; - if (ciphertext.Length > 0) + protected override unsafe byte[] UncheckedTransformFinalBlock(byte[] inputBuffer, int inputOffset, int inputCount) + { + if (DepaddingRequired) { - unsafe + byte[] rented = CryptoPool.Rent(inputCount + InputBlockSize); + int written = 0; + + fixed (byte* pRented = rented) { - fixed (byte* decryptedBytesPtr = decryptedBytes) + try { - outputData = DepadBlock(decryptedBytes, 0, decryptedBytes.Length); - - if (outputData != decryptedBytes) - { - CryptographicOperations.ZeroMemory(decryptedBytes); - } + written = UncheckedTransformFinalBlock(inputBuffer.AsSpan(inputOffset, inputCount), rented); + return rented.AsSpan(0, written).ToArray(); + } + finally + { + CryptoPool.Return(rented, clearSize: written); } } } else { - outputData = Array.Empty(); +#if NETSTANDARD || NETFRAMEWORK || NETCOREAPP3_0 + byte[] buffer = new byte[inputCount]; +#else + byte[] buffer = GC.AllocateUninitializedArray(inputCount); +#endif + int written = UncheckedTransformFinalBlock(inputBuffer.AsSpan(inputOffset, inputCount), buffer); + Debug.Assert(written == buffer.Length); + return buffer; } - - Reset(); - return outputData; } protected sealed override void Dispose(bool disposing) @@ -166,21 +209,18 @@ private bool DepaddingRequired } /// - /// Remove the padding from the last blocks being decrypted + /// Gets the length of the padding applied to the block, and validates + /// the padding, if possible. /// - private byte[] DepadBlock(byte[] block, int offset, int count) + private int GetPaddingLength(ReadOnlySpan block) { - Debug.Assert(block != null && count >= block.Length - offset); - Debug.Assert(0 <= offset); - Debug.Assert(0 <= count); - int padBytes = 0; // See PadBlock for a description of the padding modes. switch (PaddingMode) { case PaddingMode.ANSIX923: - padBytes = block[offset + count - 1]; + padBytes = block[^1]; // Verify the amount of padding is reasonable if (padBytes <= 0 || padBytes > InputBlockSize) @@ -189,7 +229,7 @@ private byte[] DepadBlock(byte[] block, int offset, int count) } // Verify that all the padding bytes are 0s - for (int i = offset + count - padBytes; i < offset + count - 1; i++) + for (int i = block.Length - padBytes; i < block.Length - 1; i++) { if (block[i] != 0) { @@ -200,7 +240,7 @@ private byte[] DepadBlock(byte[] block, int offset, int count) break; case PaddingMode.ISO10126: - padBytes = block[offset + count - 1]; + padBytes = block[^1]; // Verify the amount of padding is reasonable if (padBytes <= 0 || padBytes > InputBlockSize) @@ -212,14 +252,14 @@ private byte[] DepadBlock(byte[] block, int offset, int count) break; case PaddingMode.PKCS7: - padBytes = block[offset + count - 1]; + padBytes = block[^1]; // Verify the amount of padding is reasonable if (padBytes <= 0 || padBytes > InputBlockSize) throw new CryptographicException(SR.Cryptography_InvalidPadding); // Verify all the padding bytes match the amount of padding - for (int i = offset + count - padBytes; i < offset + count; i++) + for (int i = block.Length - padBytes; i < block.Length - 1; i++) { if (block[i] != padBytes) throw new CryptographicException(SR.Cryptography_InvalidPadding); @@ -238,10 +278,7 @@ private byte[] DepadBlock(byte[] block, int offset, int count) throw new CryptographicException(SR.Cryptography_UnknownPaddingMode); } - // Copy everything but the padding to the output - byte[] depadded = new byte[count - padBytes]; - Buffer.BlockCopy(block, offset, depadded, 0, depadded.Length); - return depadded; + return block.Length - padBytes; } // diff --git a/src/libraries/Common/src/Internal/Cryptography/UniversalCryptoEncryptor.cs b/src/libraries/Common/src/Internal/Cryptography/UniversalCryptoEncryptor.cs index 872c790da520..2bf431a7c0de 100644 --- a/src/libraries/Common/src/Internal/Cryptography/UniversalCryptoEncryptor.cs +++ b/src/libraries/Common/src/Internal/Cryptography/UniversalCryptoEncryptor.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; @@ -23,81 +22,134 @@ public UniversalCryptoEncryptor(PaddingMode paddingMode, BasicSymmetricCipher ba { } - protected sealed override int UncheckedTransformBlock(byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset) + protected override int UncheckedTransformBlock(ReadOnlySpan inputBuffer, Span outputBuffer) { - return BasicSymmetricCipher.Transform(inputBuffer, inputOffset, inputCount, outputBuffer, outputOffset); + return BasicSymmetricCipher.Transform(inputBuffer, outputBuffer); } - protected sealed override unsafe byte[] UncheckedTransformFinalBlock(byte[] inputBuffer, int inputOffset, int inputCount) + protected override int UncheckedTransformFinalBlock(ReadOnlySpan inputBuffer, Span outputBuffer) { - byte[] paddedBlock = PadBlock(inputBuffer, inputOffset, inputCount); + // The only caller of this method is the array-allocating overload, outputBuffer is + // always new memory, not a user-provided buffer. + Debug.Assert(!inputBuffer.Overlaps(outputBuffer)); - fixed (byte* paddedBlockPtr = paddedBlock) - { - byte[] output = BasicSymmetricCipher.TransformFinal(paddedBlock, 0, paddedBlock.Length); + int padWritten = PadBlock(inputBuffer, outputBuffer); + int transformWritten = BasicSymmetricCipher.TransformFinal(outputBuffer.Slice(0, padWritten), outputBuffer); + + // After padding, we should have an even number of blocks, and the same applies + // to the transform. + Debug.Assert(padWritten == transformWritten); + + return transformWritten; + } + + protected override byte[] UncheckedTransformFinalBlock(byte[] inputBuffer, int inputOffset, int inputCount) + { + byte[] buffer; +#if NETSTANDARD || NETFRAMEWORK || NETCOREAPP3_0 + buffer = new byte[GetCiphertextLength(inputCount)]; +#else + buffer = GC.AllocateUninitializedArray(GetCiphertextLength(inputCount)); +#endif + int written = UncheckedTransformFinalBlock(inputBuffer.AsSpan(inputOffset, inputCount), buffer); + Debug.Assert(written == buffer.Length); + return buffer; + } + + private int GetCiphertextLength(int plaintextLength) + { + Debug.Assert(plaintextLength >= 0); - if (paddedBlock != inputBuffer) - { - CryptographicOperations.ZeroMemory(paddedBlock); - } + //divisor and factor are same and won't overflow. + int wholeBlocks = Math.DivRem(plaintextLength, InputBlockSize, out int remainder) * InputBlockSize; - return output; + switch (PaddingMode) + { + case PaddingMode.None when (remainder != 0): + throw new CryptographicException(SR.Cryptography_PartialBlock); + case PaddingMode.None: + case PaddingMode.Zeros when (remainder == 0): + return plaintextLength; + case PaddingMode.Zeros: + case PaddingMode.PKCS7: + case PaddingMode.ANSIX923: + case PaddingMode.ISO10126: + return checked(wholeBlocks + InputBlockSize); + default: + Debug.Fail($"Unknown padding mode {PaddingMode}."); + throw new CryptographicException(SR.Cryptography_UnknownPaddingMode); } } - private byte[] PadBlock(byte[] block, int offset, int count) + private int PadBlock(ReadOnlySpan block, Span destination) { - byte[] result; - int padBytes = InputBlockSize - (count % InputBlockSize); + int count = block.Length; + int paddingRemainder = count % InputBlockSize; + int padBytes = InputBlockSize - paddingRemainder; switch (PaddingMode) { + case PaddingMode.None when (paddingRemainder != 0): + throw new CryptographicException(SR.Cryptography_PartialBlock); + case PaddingMode.None: - if (count % InputBlockSize != 0) - throw new CryptographicException(SR.Cryptography_PartialBlock); + if (destination.Length < count) + { + throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); + } - result = new byte[count]; - Buffer.BlockCopy(block, offset, result, 0, result.Length); - break; + block.CopyTo(destination); + return count; // ANSI padding fills the blocks with zeros and adds the total number of padding bytes as // the last pad byte, adding an extra block if the last block is complete. // - // x 00 00 00 00 00 00 07 + // xx 00 00 00 00 00 00 07 case PaddingMode.ANSIX923: - result = new byte[count + padBytes]; + int ansiSize = count + padBytes; - Buffer.BlockCopy(block, offset, result, 0, count); - result[result.Length - 1] = (byte)padBytes; + if (destination.Length < ansiSize) + { + throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); + } - break; + block.CopyTo(destination); + destination.Slice(count, padBytes - 1).Clear(); + destination[count + padBytes - 1] = (byte)padBytes; + return ansiSize; // ISO padding fills the blocks up with random bytes and adds the total number of padding // bytes as the last pad byte, adding an extra block if the last block is complete. // // xx rr rr rr rr rr rr 07 case PaddingMode.ISO10126: - result = new byte[count + padBytes]; + int isoSize = count + padBytes; - Buffer.BlockCopy(block, offset, result, 0, count); - RandomNumberGenerator.Fill(result.AsSpan(count + 1, padBytes - 1)); - result[result.Length - 1] = (byte)padBytes; + if (destination.Length < isoSize) + { + throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); + } - break; + block.CopyTo(destination); + RandomNumberGenerator.Fill(destination.Slice(count, padBytes - 1)); + destination[count + padBytes - 1] = (byte)padBytes; + return isoSize; // PKCS padding fills the blocks up with bytes containing the total number of padding bytes // used, adding an extra block if the last block is complete. // // xx xx 06 06 06 06 06 06 case PaddingMode.PKCS7: - result = new byte[count + padBytes]; - Buffer.BlockCopy(block, offset, result, 0, count); + int pkcsSize = count + padBytes; - for (int i = count; i < result.Length; i++) + if (destination.Length < pkcsSize) { - result[i] = (byte)padBytes; + throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); } - break; + + block.CopyTo(destination); + destination.Slice(count, padBytes).Fill((byte)padBytes); + return pkcsSize; // Zeros padding fills the last partial block with zeros, and does not add a new block to // the end if the last block is already complete. @@ -109,15 +161,20 @@ private byte[] PadBlock(byte[] block, int offset, int count) padBytes = 0; } - result = new byte[count + padBytes]; - Buffer.BlockCopy(block, offset, result, 0, count); - break; + int zeroSize = count + padBytes; + + if (destination.Length < zeroSize) + { + throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); + } + + destination.Slice(0, zeroSize).Clear(); + block.CopyTo(destination); + return zeroSize; default: throw new CryptographicException(SR.Cryptography_UnknownPaddingMode); } - - return result; } } } diff --git a/src/libraries/Common/src/Internal/Cryptography/UniversalCryptoTransform.cs b/src/libraries/Common/src/Internal/Cryptography/UniversalCryptoTransform.cs index b70cc5ee7b7b..b4406e502cf1 100644 --- a/src/libraries/Common/src/Internal/Cryptography/UniversalCryptoTransform.cs +++ b/src/libraries/Common/src/Internal/Cryptography/UniversalCryptoTransform.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; @@ -109,8 +108,17 @@ protected virtual void Dispose(bool disposing) } } - protected abstract int UncheckedTransformBlock(byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset); + protected int UncheckedTransformBlock(byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset) + { + return UncheckedTransformBlock(inputBuffer.AsSpan(inputOffset, inputCount), outputBuffer.AsSpan(outputOffset)); + } + + protected abstract int UncheckedTransformBlock(ReadOnlySpan inputBuffer, Span outputBuffer); + + // For final block, encryption and decryption can give better context for the returning byte size, so we + // don't provide an implementation here. protected abstract byte[] UncheckedTransformFinalBlock(byte[] inputBuffer, int inputOffset, int inputCount); + protected abstract int UncheckedTransformFinalBlock(ReadOnlySpan inputBuffer, Span outputBuffer); protected PaddingMode PaddingMode { get; private set; } protected BasicSymmetricCipher BasicSymmetricCipher { get; private set; } diff --git a/src/libraries/Common/src/Internal/Cryptography/Windows/CryptoThrowHelper.cs b/src/libraries/Common/src/Internal/Cryptography/Windows/CryptoThrowHelper.cs index b495820ea816..2fba282d49fa 100644 --- a/src/libraries/Common/src/Internal/Cryptography/Windows/CryptoThrowHelper.cs +++ b/src/libraries/Common/src/Internal/Cryptography/Windows/CryptoThrowHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Internal/Cryptography/Windows/ErrorCodeHelper.cs b/src/libraries/Common/src/Internal/Cryptography/Windows/ErrorCodeHelper.cs index 89f9af2e6276..d4d2cbd78079 100644 --- a/src/libraries/Common/src/Internal/Cryptography/Windows/ErrorCodeHelper.cs +++ b/src/libraries/Common/src/Internal/Cryptography/Windows/ErrorCodeHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Security.Cryptography; diff --git a/src/libraries/Common/src/Internal/Padding.cs b/src/libraries/Common/src/Internal/Padding.cs index 38bccfb68658..46280fac6318 100644 --- a/src/libraries/Common/src/Internal/Padding.cs +++ b/src/libraries/Common/src/Internal/Padding.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Android/Interop.Libraries.cs b/src/libraries/Common/src/Interop/Android/Interop.Libraries.cs index c17d473ec503..5aaa93dbd2f2 100644 --- a/src/libraries/Common/src/Interop/Android/Interop.Libraries.cs +++ b/src/libraries/Common/src/Interop/Android/Interop.Libraries.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Android/Interop.Logcat.cs b/src/libraries/Common/src/Interop/Android/Interop.Logcat.cs index 1942beebca6d..fe35fd18da63 100644 --- a/src/libraries/Common/src/Interop/Android/Interop.Logcat.cs +++ b/src/libraries/Common/src/Interop/Android/Interop.Logcat.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/BSD/System.Native/Interop.ProtocolStatistics.cs b/src/libraries/Common/src/Interop/BSD/System.Native/Interop.ProtocolStatistics.cs index 08a2ded8dce5..be9716f486a1 100644 --- a/src/libraries/Common/src/Interop/BSD/System.Native/Interop.ProtocolStatistics.cs +++ b/src/libraries/Common/src/Interop/BSD/System.Native/Interop.ProtocolStatistics.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/BSD/System.Native/Interop.Sysctl.cs b/src/libraries/Common/src/Interop/BSD/System.Native/Interop.Sysctl.cs index 98b16f23491a..cb180fa36991 100644 --- a/src/libraries/Common/src/Interop/BSD/System.Native/Interop.Sysctl.cs +++ b/src/libraries/Common/src/Interop/BSD/System.Native/Interop.Sysctl.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/BSD/System.Native/Interop.TcpConnectionInfo.cs b/src/libraries/Common/src/Interop/BSD/System.Native/Interop.TcpConnectionInfo.cs index 04a5a61e333d..02bcff8dfa72 100644 --- a/src/libraries/Common/src/Interop/BSD/System.Native/Interop.TcpConnectionInfo.cs +++ b/src/libraries/Common/src/Interop/BSD/System.Native/Interop.TcpConnectionInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Net.NetworkInformation; diff --git a/src/libraries/Common/src/Interop/Browser/Interop.Runtime.cs b/src/libraries/Common/src/Interop/Browser/Interop.Runtime.cs index 2ca3660b3cba..af3a12fa05b3 100644 --- a/src/libraries/Common/src/Interop/Browser/Interop.Runtime.cs +++ b/src/libraries/Common/src/Interop/Browser/Interop.Runtime.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/src/Interop/FreeBSD/Interop.Libraries.cs b/src/libraries/Common/src/Interop/FreeBSD/Interop.Libraries.cs index 25f0ce0a445e..5f7687f057d8 100644 --- a/src/libraries/Common/src/Interop/FreeBSD/Interop.Libraries.cs +++ b/src/libraries/Common/src/Interop/FreeBSD/Interop.Libraries.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/FreeBSD/Interop.Process.cs b/src/libraries/Common/src/Interop/FreeBSD/Interop.Process.cs index efb7567745ec..ddaae3879cc7 100644 --- a/src/libraries/Common/src/Interop/FreeBSD/Interop.Process.cs +++ b/src/libraries/Common/src/Interop/FreeBSD/Interop.Process.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -8,7 +7,7 @@ using System.Diagnostics; using System.Runtime.InteropServices; -#pragma warning disable CA1823 // analyzer incorrectly flags fixed buffer length const (https://github.com/dotnet/roslyn-analyzers/issues/2724) +#pragma warning disable CA1823 // analyzer incorrectly flags fixed buffer length const (https://github.com/dotnet/roslyn/issues/37593) internal static partial class Interop { @@ -278,6 +277,8 @@ internal static unsafe int[] ListAllPids() /// Gets information about process or thread(s) /// /// The PID of the process. If PID is 0, this will return all processes + /// Whether to include thread information. + /// The number of kinfo_proc entries returned. public static unsafe kinfo_proc* GetProcInfo(int pid, bool threads, out int count) { Span sysctlName = stackalloc int[4]; diff --git a/src/libraries/Common/src/Interop/Interop.Brotli.cs b/src/libraries/Common/src/Interop/Interop.Brotli.cs index e10d9a6b481b..c65c359e9dae 100644 --- a/src/libraries/Common/src/Interop/Interop.Brotli.cs +++ b/src/libraries/Common/src/Interop/Interop.Brotli.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Interop.Calendar.cs b/src/libraries/Common/src/Interop/Interop.Calendar.cs index 0b9e2c283f0f..494648f1b1ce 100644 --- a/src/libraries/Common/src/Interop/Interop.Calendar.cs +++ b/src/libraries/Common/src/Interop/Interop.Calendar.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Globalization; diff --git a/src/libraries/Common/src/Interop/Interop.Casing.cs b/src/libraries/Common/src/Interop/Interop.Casing.cs index 499f9445d89c..5e9ca3abddb8 100644 --- a/src/libraries/Common/src/Interop/Interop.Casing.cs +++ b/src/libraries/Common/src/Interop/Interop.Casing.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Interop.CheckedAccess.cs b/src/libraries/Common/src/Interop/Interop.CheckedAccess.cs index fa54d5b9a9cb..8268f2384738 100644 --- a/src/libraries/Common/src/Interop/Interop.CheckedAccess.cs +++ b/src/libraries/Common/src/Interop/Interop.CheckedAccess.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/src/Interop/Interop.Collation.cs b/src/libraries/Common/src/Interop/Interop.Collation.cs index 07cf42b5ad75..e352149d27e0 100644 --- a/src/libraries/Common/src/Interop/Interop.Collation.cs +++ b/src/libraries/Common/src/Interop/Interop.Collation.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Globalization; diff --git a/src/libraries/Common/src/Interop/Interop.HostPolicy.cs b/src/libraries/Common/src/Interop/Interop.HostPolicy.cs index b57f75ad46c0..c7f62047f5b0 100644 --- a/src/libraries/Common/src/Interop/Interop.HostPolicy.cs +++ b/src/libraries/Common/src/Interop/Interop.HostPolicy.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; @@ -16,15 +15,11 @@ internal delegate void corehost_resolve_component_dependencies_result_fn(string [UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Auto)] internal delegate void corehost_error_writer_fn(string message); -#pragma warning disable BCL0015 // Disable Pinvoke analyzer errors. - [DllImport(Libraries.HostPolicy, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)] internal static extern int corehost_resolve_component_dependencies(string componentMainAssemblyPath, corehost_resolve_component_dependencies_result_fn result); [DllImport(Libraries.HostPolicy, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)] internal static extern IntPtr corehost_set_error_writer(IntPtr errorWriter); - -#pragma warning restore } } diff --git a/src/libraries/Common/src/Interop/Interop.ICU.cs b/src/libraries/Common/src/Interop/Interop.ICU.cs index fb8b56e41d35..957b201aa222 100644 --- a/src/libraries/Common/src/Interop/Interop.ICU.cs +++ b/src/libraries/Common/src/Interop/Interop.ICU.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Interop.Idna.cs b/src/libraries/Common/src/Interop/Interop.Idna.cs index e9014da1e5d9..0bc9b41dfd8c 100644 --- a/src/libraries/Common/src/Interop/Interop.Idna.cs +++ b/src/libraries/Common/src/Interop/Interop.Idna.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Interop.Ldap.cs b/src/libraries/Common/src/Interop/Interop.Ldap.cs index 1c312dca820e..ff0e0ccba7cc 100644 --- a/src/libraries/Common/src/Interop/Interop.Ldap.cs +++ b/src/libraries/Common/src/Interop/Interop.Ldap.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; @@ -119,7 +118,7 @@ internal sealed class LDAP_TIMEVAL [StructLayout(LayoutKind.Sequential)] internal sealed class berval { - public int bv_len = 0; + public int bv_len; public IntPtr bv_val = IntPtr.Zero; public berval() { } @@ -129,8 +128,8 @@ public berval() { } internal sealed class LdapControl { public IntPtr ldctl_oid = IntPtr.Zero; - public berval ldctl_value = null; - public bool ldctl_iscritical = false; + public berval ldctl_value; + public bool ldctl_iscritical; public LdapControl() { } } @@ -161,7 +160,7 @@ internal struct SecPkgContext_IssuerListInfoEx [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] internal sealed class LdapMod { - public int type = 0; + public int type; public IntPtr attribute = IntPtr.Zero; public IntPtr values = IntPtr.Zero; diff --git a/src/libraries/Common/src/Interop/Interop.Libraries.cs b/src/libraries/Common/src/Interop/Interop.Libraries.cs index d58d6a2126a4..217852751c32 100644 --- a/src/libraries/Common/src/Interop/Interop.Libraries.cs +++ b/src/libraries/Common/src/Interop/Interop.Libraries.cs @@ -1,15 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { internal static partial class Libraries { -#if MONO - internal const string GlobalizationNative = "__Internal"; -#else internal const string GlobalizationNative = "QCall"; -#endif } } diff --git a/src/libraries/Common/src/Interop/Interop.Locale.cs b/src/libraries/Common/src/Interop/Interop.Locale.cs index a6517185ce06..81ce1c133eed 100644 --- a/src/libraries/Common/src/Interop/Interop.Locale.cs +++ b/src/libraries/Common/src/Interop/Interop.Locale.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Interop.Normalization.cs b/src/libraries/Common/src/Interop/Interop.Normalization.cs index f981eac6405d..420e68c0e75a 100644 --- a/src/libraries/Common/src/Interop/Interop.Normalization.cs +++ b/src/libraries/Common/src/Interop/Interop.Normalization.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Text; diff --git a/src/libraries/Common/src/Interop/Interop.Odbc.cs b/src/libraries/Common/src/Interop/Interop.Odbc.cs index 848dd10ae7ce..591ce1cadeb3 100644 --- a/src/libraries/Common/src/Interop/Interop.Odbc.cs +++ b/src/libraries/Common/src/Interop/Interop.Odbc.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Data.Odbc; diff --git a/src/libraries/Common/src/Interop/Interop.ResultCode.cs b/src/libraries/Common/src/Interop/Interop.ResultCode.cs index 4a9933f9291f..e96db22f26e9 100644 --- a/src/libraries/Common/src/Interop/Interop.ResultCode.cs +++ b/src/libraries/Common/src/Interop/Interop.ResultCode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Interop.TimeZoneInfo.cs b/src/libraries/Common/src/Interop/Interop.TimeZoneInfo.cs index f60b81f0da8c..5d848e11ed46 100644 --- a/src/libraries/Common/src/Interop/Interop.TimeZoneInfo.cs +++ b/src/libraries/Common/src/Interop/Interop.TimeZoneInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Interop.Utils.cs b/src/libraries/Common/src/Interop/Interop.Utils.cs index 11534cbdee75..0cb54f3c9212 100644 --- a/src/libraries/Common/src/Interop/Interop.Utils.cs +++ b/src/libraries/Common/src/Interop/Interop.Utils.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Buffers; diff --git a/src/libraries/Common/src/Interop/Interop.zlib.cs b/src/libraries/Common/src/Interop/Interop.zlib.cs index 871f6c3a65ff..280c5558667e 100644 --- a/src/libraries/Common/src/Interop/Interop.zlib.cs +++ b/src/libraries/Common/src/Interop/Interop.zlib.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO.Compression; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Linux/Interop.Libraries.cs b/src/libraries/Common/src/Interop/Linux/Interop.Libraries.cs index e7bc0d31f0d8..57946baca564 100644 --- a/src/libraries/Common/src/Interop/Linux/Interop.Libraries.cs +++ b/src/libraries/Common/src/Interop/Linux/Interop.Libraries.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Linux/Interop.LinuxNetDeviceFlags.cs b/src/libraries/Common/src/Interop/Linux/Interop.LinuxNetDeviceFlags.cs index 94b412b162f0..cda5b1806915 100644 --- a/src/libraries/Common/src/Interop/Linux/Interop.LinuxNetDeviceFlags.cs +++ b/src/libraries/Common/src/Interop/Linux/Interop.LinuxNetDeviceFlags.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/src/Interop/Linux/OpenLdap/Interop.Ber.cs b/src/libraries/Common/src/Interop/Linux/OpenLdap/Interop.Ber.cs index 4a059e35dacd..cca048adab68 100644 --- a/src/libraries/Common/src/Interop/Linux/OpenLdap/Interop.Ber.cs +++ b/src/libraries/Common/src/Interop/Linux/OpenLdap/Interop.Ber.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Linux/OpenLdap/Interop.Ldap.cs b/src/libraries/Common/src/Interop/Linux/OpenLdap/Interop.Ldap.cs index 02fea9754b9c..15f9285dcb91 100644 --- a/src/libraries/Common/src/Interop/Linux/OpenLdap/Interop.Ldap.cs +++ b/src/libraries/Common/src/Interop/Linux/OpenLdap/Interop.Ldap.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Linux/System.Native/Interop.INotify.cs b/src/libraries/Common/src/Interop/Linux/System.Native/Interop.INotify.cs index b20ae4b2b396..6ff843ec8990 100644 --- a/src/libraries/Common/src/Interop/Linux/System.Native/Interop.INotify.cs +++ b/src/libraries/Common/src/Interop/Linux/System.Native/Interop.INotify.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Linux/cgroups/Interop.cgroups.cs b/src/libraries/Common/src/Interop/Linux/cgroups/Interop.cgroups.cs index f2417e20881b..76dee6c749c6 100644 --- a/src/libraries/Common/src/Interop/Linux/cgroups/Interop.cgroups.cs +++ b/src/libraries/Common/src/Interop/Linux/cgroups/Interop.cgroups.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; @@ -306,6 +305,7 @@ private static bool TryFindCGroupPathForSubsystem(CGroupVersion cgroupVersion, s /// Find the cgroup relative path for the specified subsystem. /// The cgroup version currently in use on the system. + /// Path to cgroup directory in procfs for the current process. /// The subsystem, e.g. "memory". /// The found path, or null if it couldn't be found. /// true if a cgroup path for the subsystem is found. diff --git a/src/libraries/Common/src/Interop/Linux/procfs/Interop.ProcFsStat.cs b/src/libraries/Common/src/Interop/Linux/procfs/Interop.ProcFsStat.cs index b61ad75b723a..1b58498bb6cc 100644 --- a/src/libraries/Common/src/Interop/Linux/procfs/Interop.ProcFsStat.cs +++ b/src/libraries/Common/src/Interop/Linux/procfs/Interop.ProcFsStat.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFArray.cs b/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFArray.cs index dc6080646700..9ec3cf2c9618 100644 --- a/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFArray.cs +++ b/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFArray.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFData.cs b/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFData.cs index 2d5713c740b2..c703e23a9e0a 100644 --- a/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFData.cs +++ b/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFData.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFDate.cs b/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFDate.cs index 5b2dfdc1ca2f..fae8dfeefe30 100644 --- a/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFDate.cs +++ b/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFDate.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFDictionary.cs b/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFDictionary.cs index 79c2979732de..c85d65db50fd 100644 --- a/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFDictionary.cs +++ b/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFDictionary.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFError.cs b/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFError.cs index 216b350fa58a..db3d995f23b2 100644 --- a/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFError.cs +++ b/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFError.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFNumber.cs b/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFNumber.cs index c2bffd316dc9..9addf8e12ca1 100644 --- a/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFNumber.cs +++ b/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFNumber.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFProxy.cs b/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFProxy.cs index 580a3d87a40a..1b1e3e8f168c 100644 --- a/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFProxy.cs +++ b/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFProxy.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFString.cs b/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFString.cs index 98010faa6fa6..9bb891394e6a 100644 --- a/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFString.cs +++ b/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFString.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFUrl.cs b/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFUrl.cs index 88c2bbd0ac5b..28e3d2d5b807 100644 --- a/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFUrl.cs +++ b/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.CFUrl.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.cs b/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.cs index 254e54eee6b6..20fdcfd69731 100644 --- a/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.cs +++ b/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/OSX/Interop.EventStream.cs b/src/libraries/Common/src/Interop/OSX/Interop.EventStream.cs index 4e511429d1bd..f49d43a8b74c 100644 --- a/src/libraries/Common/src/Interop/OSX/Interop.EventStream.cs +++ b/src/libraries/Common/src/Interop/OSX/Interop.EventStream.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/OSX/Interop.Libraries.cs b/src/libraries/Common/src/Interop/OSX/Interop.Libraries.cs index 9ba6608df121..63e497aaa39b 100644 --- a/src/libraries/Common/src/Interop/OSX/Interop.Libraries.cs +++ b/src/libraries/Common/src/Interop/OSX/Interop.Libraries.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/OSX/Interop.RunLoop.cs b/src/libraries/Common/src/Interop/OSX/Interop.RunLoop.cs index de1692919f3e..3d3a74cf9473 100644 --- a/src/libraries/Common/src/Interop/OSX/Interop.RunLoop.cs +++ b/src/libraries/Common/src/Interop/OSX/Interop.RunLoop.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/OSX/Interop.SystemConfiguration.cs b/src/libraries/Common/src/Interop/OSX/Interop.SystemConfiguration.cs index 7fc727c441f9..3356a7570557 100644 --- a/src/libraries/Common/src/Interop/OSX/Interop.SystemConfiguration.cs +++ b/src/libraries/Common/src/Interop/OSX/Interop.SystemConfiguration.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/OSX/Interop.libobjc.cs b/src/libraries/Common/src/Interop/OSX/Interop.libobjc.cs index d76c59bac334..9234767340f8 100644 --- a/src/libraries/Common/src/Interop/OSX/Interop.libobjc.cs +++ b/src/libraries/Common/src/Interop/OSX/Interop.libobjc.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable diff --git a/src/libraries/Common/src/Interop/OSX/Interop.libproc.cs b/src/libraries/Common/src/Interop/OSX/Interop.libproc.cs index 07d9a427a825..41403a3233a4 100644 --- a/src/libraries/Common/src/Interop/OSX/Interop.libproc.cs +++ b/src/libraries/Common/src/Interop/OSX/Interop.libproc.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable @@ -10,7 +9,7 @@ using System.Diagnostics; using System.Runtime.InteropServices; -#pragma warning disable CA1823 // analyzer incorrectly flags fixed buffer length const (https://github.com/dotnet/roslyn-analyzers/issues/2724) +#pragma warning disable CA1823 // analyzer incorrectly flags fixed buffer length const (https://github.com/dotnet/roslyn/issues/37593) internal static partial class Interop { @@ -328,6 +327,7 @@ private static extern unsafe int proc_pidinfo( /// /// Gets the thread information for the given thread /// + /// The process id. /// The ID of the thread to query for information /// /// Returns a valid proc_threadinfo struct for valid threads that the caller diff --git a/src/libraries/Common/src/Interop/OSX/System.Native/Interop.Log.cs b/src/libraries/Common/src/Interop/OSX/System.Native/Interop.Log.cs index f6674b988d70..32d20336d3b1 100644 --- a/src/libraries/Common/src/Interop/OSX/System.Native/Interop.Log.cs +++ b/src/libraries/Common/src/Interop/OSX/System.Native/Interop.Log.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/OSX/System.Native/Interop.SearchPath.cs b/src/libraries/Common/src/Interop/OSX/System.Native/Interop.SearchPath.cs index af3e6110c9ba..d00689794365 100644 --- a/src/libraries/Common/src/Interop/OSX/System.Native/Interop.SearchPath.cs +++ b/src/libraries/Common/src/Interop/OSX/System.Native/Interop.SearchPath.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Digest.cs b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Digest.cs index 9135ee7e62bb..799a5d629635 100644 --- a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Digest.cs +++ b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Digest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; @@ -16,17 +15,23 @@ internal static partial class AppleCrypto [DllImport(Libraries.AppleCryptoNative, EntryPoint = "AppleCryptoNative_DigestCreate")] internal static extern SafeDigestCtxHandle DigestCreate(PAL_HashAlgorithm algorithm, out int cbDigest); - internal static int DigestUpdate(SafeDigestCtxHandle ctx, ReadOnlySpan pbData, int cbData) => - DigestUpdate(ctx, ref MemoryMarshal.GetReference(pbData), cbData); + internal static int DigestUpdate(SafeDigestCtxHandle ctx, ReadOnlySpan data) => + DigestUpdate(ctx, ref MemoryMarshal.GetReference(data), data.Length); [DllImport(Libraries.AppleCryptoNative, EntryPoint = "AppleCryptoNative_DigestUpdate")] private static extern int DigestUpdate(SafeDigestCtxHandle ctx, ref byte pbData, int cbData); - internal static int DigestFinal(SafeDigestCtxHandle ctx, Span pbOutput, int cbOutput) => - DigestFinal(ctx, ref MemoryMarshal.GetReference(pbOutput), cbOutput); + internal static int DigestFinal(SafeDigestCtxHandle ctx, Span output) => + DigestFinal(ctx, ref MemoryMarshal.GetReference(output), output.Length); [DllImport(Libraries.AppleCryptoNative, EntryPoint = "AppleCryptoNative_DigestFinal")] private static extern int DigestFinal(SafeDigestCtxHandle ctx, ref byte pbOutput, int cbOutput); + + internal static int DigestCurrent(SafeDigestCtxHandle ctx, Span output) => + DigestCurrent(ctx, ref MemoryMarshal.GetReference(output), output.Length); + + [DllImport(Libraries.AppleCryptoNative, EntryPoint = "AppleCryptoNative_DigestCurrent")] + private static extern int DigestCurrent(SafeDigestCtxHandle ctx, ref byte pbOutput, int cbOutput); } } diff --git a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Ecc.cs b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Ecc.cs index 313a1a4deb5f..57e77b46f5a8 100644 --- a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Ecc.cs +++ b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Ecc.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Err.cs b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Err.cs index b33c9f41bf35..084a5cf96bed 100644 --- a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Err.cs +++ b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Err.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Hmac.cs b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Hmac.cs index 1120aca17734..65b6e412fbf6 100644 --- a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Hmac.cs +++ b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Hmac.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; @@ -19,17 +18,23 @@ internal static partial class AppleCrypto [DllImport(Libraries.AppleCryptoNative, EntryPoint = "AppleCryptoNative_HmacInit")] internal static extern unsafe int HmacInit(SafeHmacHandle ctx, [In] byte[] pbKey, int cbKey); - internal static int HmacUpdate(SafeHmacHandle ctx, ReadOnlySpan pbData, int cbData) => - HmacUpdate(ctx, ref MemoryMarshal.GetReference(pbData), cbData); + internal static int HmacUpdate(SafeHmacHandle ctx, ReadOnlySpan data) => + HmacUpdate(ctx, ref MemoryMarshal.GetReference(data), data.Length); [DllImport(Libraries.AppleCryptoNative, EntryPoint = "AppleCryptoNative_HmacUpdate")] private static extern int HmacUpdate(SafeHmacHandle ctx, ref byte pbData, int cbData); - internal static int HmacFinal(SafeHmacHandle ctx, ReadOnlySpan pbOutput, int cbOutput) => - HmacFinal(ctx, ref MemoryMarshal.GetReference(pbOutput), cbOutput); + internal static int HmacFinal(SafeHmacHandle ctx, ReadOnlySpan output) => + HmacFinal(ctx, ref MemoryMarshal.GetReference(output), output.Length); [DllImport(Libraries.AppleCryptoNative, EntryPoint = "AppleCryptoNative_HmacFinal")] - private static extern unsafe int HmacFinal(SafeHmacHandle ctx, ref byte pbOutput, int cbOutput); + private static extern int HmacFinal(SafeHmacHandle ctx, ref byte pbOutput, int cbOutput); + + internal static int HmacCurrent(SafeHmacHandle ctx, ReadOnlySpan output) => + HmacCurrent(ctx, ref MemoryMarshal.GetReference(output), output.Length); + + [DllImport(Libraries.AppleCryptoNative, EntryPoint = "AppleCryptoNative_HmacCurrent")] + private static extern int HmacCurrent(SafeHmacHandle ctx, ref byte pbOutput, int cbOutput); } } diff --git a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.KeyAgree.cs b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.KeyAgree.cs index f585b8210ac2..91fd4bb84958 100644 --- a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.KeyAgree.cs +++ b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.KeyAgree.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Keychain.cs b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Keychain.cs index 7ed270aed3ef..73e18d8d4aab 100644 --- a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Keychain.cs +++ b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Keychain.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.PAL_HashAlgorithm.cs b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.PAL_HashAlgorithm.cs index 5931e3b63a20..8a09c06c2e52 100644 --- a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.PAL_HashAlgorithm.cs +++ b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.PAL_HashAlgorithm.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.RSA.cs b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.RSA.cs index 17349f0cad36..0c4f1a7a7e3b 100644 --- a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.RSA.cs +++ b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.RSA.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Random.cs b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Random.cs index d35e529bb07b..adde4ad37824 100644 --- a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Random.cs +++ b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Random.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.SecErr.cs b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.SecErr.cs index 0c6bb80ab7a0..0a2d4b14b619 100644 --- a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.SecErr.cs +++ b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.SecErr.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.SecErrMessage.cs b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.SecErrMessage.cs index 16d5beda4d90..cd17859c61c6 100644 --- a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.SecErrMessage.cs +++ b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.SecErrMessage.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.SecKeyRef.Export.cs b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.SecKeyRef.Export.cs index 1a8b00c3e4b7..e0f99e874749 100644 --- a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.SecKeyRef.Export.cs +++ b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.SecKeyRef.Export.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.SecKeyRef.cs b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.SecKeyRef.cs index 5b7ad2f8074e..7fbdc9ee79af 100644 --- a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.SecKeyRef.cs +++ b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.SecKeyRef.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Ssl.cs b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Ssl.cs index 7484ad270655..4401dec463c5 100644 --- a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Ssl.cs +++ b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Ssl.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; @@ -400,7 +399,7 @@ public static bool SslCheckHostnameMatch(SafeSslHandle handle, string hostName, case 1: return true; default: - if (NetEventSource.IsEnabled) + if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(null, $"AppleCryptoNative_SslIsHostnameMatch returned '{result}' for '{hostName}'"); Debug.Fail($"AppleCryptoNative_SslIsHostnameMatch returned {result}"); throw new SslException(); diff --git a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.SslErr.cs b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.SslErr.cs index 5e2eed52ce93..f09ff418290c 100644 --- a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.SslErr.cs +++ b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.SslErr.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Symmetric.cs b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Symmetric.cs index 0ee7b00c70bb..c32ba1dd2da2 100644 --- a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Symmetric.cs +++ b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Symmetric.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Trust.cs b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Trust.cs index 6e594374f0c4..1121a62553b0 100644 --- a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Trust.cs +++ b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Trust.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.X509.cs b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.X509.cs index ee662e621b6e..87eb51a3512a 100644 --- a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.X509.cs +++ b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.X509.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; @@ -19,9 +18,31 @@ internal static partial class AppleCrypto private static readonly SafeCreateHandle s_emptyExportString = CoreFoundation.CFStringCreateWithCString(""); + private static int AppleCryptoNative_X509ImportCertificate( + ReadOnlySpan keyBlob, + X509ContentType contentType, + SafeCreateHandle cfPfxPassphrase, + SafeKeychainHandle tmpKeychain, + int exportable, + out SafeSecCertificateHandle pCertOut, + out SafeSecIdentityHandle pPrivateKeyOut, + out int pOSStatus) + { + return AppleCryptoNative_X509ImportCertificate( + ref MemoryMarshal.GetReference(keyBlob), + keyBlob.Length, + contentType, + cfPfxPassphrase, + tmpKeychain, + exportable, + out pCertOut, + out pPrivateKeyOut, + out pOSStatus); + } + [DllImport(Libraries.AppleCryptoNative)] private static extern int AppleCryptoNative_X509ImportCertificate( - byte[] pbKeyBlob, + ref byte pbKeyBlob, int cbKeyBlob, X509ContentType contentType, SafeCreateHandle cfPfxPassphrase, @@ -33,7 +54,7 @@ private static extern int AppleCryptoNative_X509ImportCertificate( [DllImport(Libraries.AppleCryptoNative)] private static extern int AppleCryptoNative_X509ImportCollection( - byte[] pbKeyBlob, + ref byte pbKeyBlob, int cbKeyBlob, X509ContentType contentType, SafeCreateHandle cfPfxPassphrase, @@ -51,8 +72,11 @@ private static extern int AppleCryptoNative_X509GetRawData( [DllImport(Libraries.AppleCryptoNative)] private static extern int AppleCryptoNative_X509GetPublicKey(SafeSecCertificateHandle cert, out SafeSecKeyRefHandle publicKey, out int pOSStatus); + internal static X509ContentType X509GetContentType(ReadOnlySpan data) + => X509GetContentType(ref MemoryMarshal.GetReference(data), data.Length); + [DllImport(Libraries.AppleCryptoNative, EntryPoint = "AppleCryptoNative_X509GetContentType")] - internal static extern X509ContentType X509GetContentType(byte[] pbData, int cbData); + private static extern X509ContentType X509GetContentType(ref byte pbData, int cbData); [DllImport(Libraries.AppleCryptoNative)] private static extern int AppleCryptoNative_X509CopyCertFromIdentity( @@ -119,7 +143,7 @@ internal static byte[] X509GetRawData(SafeSecCertificateHandle cert) } internal static SafeSecCertificateHandle X509ImportCertificate( - byte[] bytes, + ReadOnlySpan bytes, X509ContentType contentType, SafePasswordHandle importPassword, SafeKeychainHandle keychain, @@ -156,8 +180,8 @@ internal static SafeSecCertificateHandle X509ImportCertificate( } } - internal static SafeSecCertificateHandle X509ImportCertificate( - byte[] bytes, + private static SafeSecCertificateHandle X509ImportCertificate( + ReadOnlySpan bytes, X509ContentType contentType, SafeCreateHandle? importPassword, SafeKeychainHandle keychain, @@ -171,7 +195,6 @@ internal static SafeSecCertificateHandle X509ImportCertificate( int ret = AppleCryptoNative_X509ImportCertificate( bytes, - bytes.Length, contentType, cfPassphrase, keychain, @@ -209,7 +232,7 @@ internal static SafeSecCertificateHandle X509ImportCertificate( } internal static SafeCFArrayHandle X509ImportCollection( - byte[] bytes, + ReadOnlySpan bytes, X509ContentType contentType, SafePasswordHandle importPassword, SafeKeychainHandle keychain, @@ -236,7 +259,7 @@ internal static SafeCFArrayHandle X509ImportCollection( } ret = AppleCryptoNative_X509ImportCollection( - bytes, + ref MemoryMarshal.GetReference(bytes), bytes.Length, contentType, cfPassphrase, diff --git a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.X509Chain.cs b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.X509Chain.cs index 17cb2c064328..5e456410616c 100644 --- a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.X509Chain.cs +++ b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.X509Chain.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.X509Store.cs b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.X509Store.cs index 1cb7b32edb85..80b8dcd7c344 100644 --- a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.X509Store.cs +++ b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.X509Store.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Unix/Interop.Errors.cs b/src/libraries/Common/src/Interop/Unix/Interop.Errors.cs index e6de6c91723c..6b855f2de21b 100644 --- a/src/libraries/Common/src/Interop/Unix/Interop.Errors.cs +++ b/src/libraries/Common/src/Interop/Unix/Interop.Errors.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; @@ -103,6 +102,7 @@ internal enum Error // Custom Error codes to track errors beyond kernel interface. EHOSTNOTFOUND = 0x20001, // Name lookup failed + ESOCKETERROR = 0x20002, // Unspecified socket error // POSIX permits these to have the same value and we make them always equal so // that we do not introduce a dependency on distinguishing between them that diff --git a/src/libraries/Common/src/Interop/Unix/Interop.IOErrors.cs b/src/libraries/Common/src/Interop/Unix/Interop.IOErrors.cs index fe3c34a34071..3bf2866fc878 100644 --- a/src/libraries/Common/src/Interop/Unix/Interop.IOErrors.cs +++ b/src/libraries/Common/src/Interop/Unix/Interop.IOErrors.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/Unix/Interop.Libraries.cs b/src/libraries/Common/src/Interop/Unix/Interop.Libraries.cs index f51194829488..6a624e1ced4c 100644 --- a/src/libraries/Common/src/Interop/Unix/Interop.Libraries.cs +++ b/src/libraries/Common/src/Interop/Unix/Interop.Libraries.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Unix/Interop.Poll.Structs.cs b/src/libraries/Common/src/Interop/Unix/Interop.Poll.Structs.cs index 34ca249bcdc9..f2f8efbff92a 100644 --- a/src/libraries/Common/src/Interop/Unix/Interop.Poll.Structs.cs +++ b/src/libraries/Common/src/Interop/Unix/Interop.Poll.Structs.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Accept.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Accept.cs index b37883a35841..a36936b5db03 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Accept.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Accept.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Access.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Access.cs index b9750fa10833..bfeb1cf9e8a1 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Access.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Access.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Bind.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Bind.cs index 03f68de856fc..b7e56d09d9d4 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Bind.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Bind.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net.Sockets; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ChDir.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ChDir.cs index 8979d10f4cd8..ca0e4e089b2c 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ChDir.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ChDir.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ChMod.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ChMod.cs index 51381e2c2d6a..c3a09ec513e2 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ChMod.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ChMod.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Close.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Close.cs index 8d192398a036..6dfec617396a 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Close.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Close.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ConfigureTerminalForChildProcess.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ConfigureTerminalForChildProcess.cs index 75c116d4b8c1..73112e7c2e83 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ConfigureTerminalForChildProcess.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ConfigureTerminalForChildProcess.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Connect.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Connect.cs index 151b51e2f6a3..8e1fb3cc791d 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Connect.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Connect.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.CopyFile.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.CopyFile.cs index fb97106635b4..d332a85b19ab 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.CopyFile.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.CopyFile.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Disconnect.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Disconnect.cs index 88650be65162..815238d06a76 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Disconnect.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Disconnect.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Dup.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Dup.cs index 8ca2ad760dd7..37df5702161d 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Dup.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Dup.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.EnumerateInterfaceAddresses.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.EnumerateInterfaceAddresses.cs index 7ad346a9a272..93d7ef92de91 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.EnumerateInterfaceAddresses.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.EnumerateInterfaceAddresses.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.FChMod.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.FChMod.cs index 161ac71d81e3..765ba23c3e6a 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.FChMod.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.FChMod.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.FLock.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.FLock.cs index 22934a3e77d5..4e6e36b8f94d 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.FLock.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.FLock.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.FSync.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.FSync.cs index e3ab97093135..773f867f37fe 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.FSync.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.FSync.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.FTruncate.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.FTruncate.cs index 5dad650362d0..f7a726f90420 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.FTruncate.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.FTruncate.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Fcntl.Pipe.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Fcntl.Pipe.cs index 96c7caf165c9..47827f9e1673 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Fcntl.Pipe.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Fcntl.Pipe.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Fcntl.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Fcntl.cs index 0877ca707c57..231621f2fa30 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Fcntl.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Fcntl.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.FileDescriptors.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.FileDescriptors.cs index 82abc8bffa75..614c77c58275 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.FileDescriptors.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.FileDescriptors.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ForkAndExecProcess.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ForkAndExecProcess.cs index 2c835e95fc18..3dd90d9fe200 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ForkAndExecProcess.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ForkAndExecProcess.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetBytesAvailable.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetBytesAvailable.cs index ee42a483d3c5..741e132631ea 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetBytesAvailable.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetBytesAvailable.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetControlCharacters.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetControlCharacters.cs index f33a5544b945..7f8bb04babe3 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetControlCharacters.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetControlCharacters.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetCpuUtilization.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetCpuUtilization.cs index 509fef8272df..f87f6a97bd7b 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetCpuUtilization.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetCpuUtilization.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetCwd.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetCwd.cs index b339ab2f5961..1faef8cc0be8 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetCwd.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetCwd.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Buffers; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetDomainName.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetDomainName.cs index a0f849400583..31f7c07c10c4 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetDomainName.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetDomainName.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetDomainSocketSizes.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetDomainSocketSizes.cs index bb0f48c72195..55020265184e 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetDomainSocketSizes.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetDomainSocketSizes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetEGid.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetEGid.cs index 6530b2303a87..87aede1e85ec 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetEGid.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetEGid.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetEUid.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetEUid.cs index c964dec144e1..1b8aa005b15f 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetEUid.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetEUid.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetGroupList.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetGroupList.cs index 0d85e12e7c8f..e240583da640 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetGroupList.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetGroupList.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetHostName.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetHostName.cs index f2555b0fc827..985edb4cadc2 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetHostName.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetHostName.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetLine.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetLine.cs index f6a6c7e3aed0..8033720f2a90 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetLine.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetLine.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetMaximumAddressSize.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetMaximumAddressSize.cs index 9c106cbf4691..f6ae1a0c3049 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetMaximumAddressSize.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetMaximumAddressSize.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetNameInfo.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetNameInfo.cs index 5270af77e2df..e22ade3a0776 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetNameInfo.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetNameInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetNodeName.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetNodeName.cs index 26a3344c1054..be1801280ca3 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetNodeName.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetNodeName.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetOSArchitecture.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetOSArchitecture.cs index 70f614ebcfa8..e98e6fe3d3b6 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetOSArchitecture.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetOSArchitecture.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetPeerID.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetPeerID.cs index 9ebb48ec3912..ad8cc50dbe58 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetPeerID.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetPeerID.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetPeerName.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetPeerName.cs index 3635b92d29f5..e400ae9a6f92 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetPeerName.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetPeerName.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetPeerUserName.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetPeerUserName.cs index 8effc8883e11..cae12e50dca5 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetPeerUserName.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetPeerUserName.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetPid.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetPid.cs index b93f0895360e..bbd99dfb5ecb 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetPid.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetPid.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetProcessArchitecture.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetProcessArchitecture.cs index be23a335b749..c5b23b691d1c 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetProcessArchitecture.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetProcessArchitecture.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetPwUid.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetPwUid.cs index 5a9a23f87e06..08cb7a408598 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetPwUid.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetPwUid.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetRandomBytes.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetRandomBytes.cs index 571763239c11..e79f86576b33 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetRandomBytes.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetRandomBytes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetSetPriority.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetSetPriority.cs index fc1002be97d0..87eb5d0ac7a2 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetSetPriority.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetSetPriority.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetSid.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetSid.cs index d13108bfb063..6137740fc0f1 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetSid.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetSid.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetSockName.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetSockName.cs index f46297943edf..fb1aa6b735bb 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetSockName.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetSockName.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetSockOpt.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetSockOpt.cs index 4fd722fd2088..71f69d69ab76 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetSockOpt.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetSockOpt.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net.Sockets; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetSocketErrorOption.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetSocketErrorOption.cs index 070171d63de5..1fb0dcecc207 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetSocketErrorOption.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetSocketErrorOption.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net.Sockets; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetSocketType.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetSocketType.cs index 044764e27e25..a97336d2cc8f 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetSocketType.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetSocketType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Net.Sockets; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetSystemTimeAsTicks.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetSystemTimeAsTicks.cs index f02ecac13b91..62c83123c86d 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetSystemTimeAsTicks.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetSystemTimeAsTicks.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetTimestamp.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetTimestamp.cs index 53acdbc3cc3b..cd18a3a385dc 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetTimestamp.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetTimestamp.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetUid.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetUid.cs index 45622a49549e..0d1bec671eaf 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetUid.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetUid.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetUnixName.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetUnixName.cs index fb925b9dca92..8d5063ead9be 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetUnixName.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetUnixName.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetUnixRelease.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetUnixRelease.cs index 5e41ae98046e..22ae8691fcf4 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetUnixRelease.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetUnixRelease.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetUnixVersion.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetUnixVersion.cs index 40ebf8c0b51a..75854552fa3d 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetUnixVersion.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetUnixVersion.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetWindowWidth.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetWindowWidth.cs index 290857d74231..151b6a65ed52 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetWindowWidth.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetWindowWidth.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.HostEntry.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.HostEntry.cs index 4f36e43edb17..7578452daa58 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.HostEntry.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.HostEntry.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.IPAddress.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.IPAddress.cs index dc9b25f75899..567f97df901c 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.IPAddress.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.IPAddress.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.IPPacketInformation.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.IPPacketInformation.cs index 307e704d9cf6..6156c3e96521 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.IPPacketInformation.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.IPPacketInformation.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.InitializeTerminalAndSignalHandling.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.InitializeTerminalAndSignalHandling.cs index c6ca6982a6d0..66e18a03def0 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.InitializeTerminalAndSignalHandling.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.InitializeTerminalAndSignalHandling.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.InterfaceNameToIndex.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.InterfaceNameToIndex.cs index 36f8686c23ea..8cb18bfb3002 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.InterfaceNameToIndex.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.InterfaceNameToIndex.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.IsATty.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.IsATty.cs index c68e8c7cdb10..a7e144519d00 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.IsATty.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.IsATty.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Kill.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Kill.cs index be3abafb4fe1..80cfb59e173d 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Kill.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Kill.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.LChflags.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.LChflags.cs index 1d21cf742cd8..a19526c8b925 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.LChflags.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.LChflags.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.LSeek.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.LSeek.cs index 7f8df7c6bf9f..95574358639f 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.LSeek.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.LSeek.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.LingerOption.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.LingerOption.cs index e1d659f350f7..312222f042d5 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.LingerOption.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.LingerOption.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Link.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Link.cs index 714649f5b2a8..64d1a32d27ba 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Link.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Link.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Listen.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Listen.cs index 03b95ed00f7e..b6196a3de564 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Listen.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Listen.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.LockFileRegion.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.LockFileRegion.cs index 5f92357e8f81..42da9643d9cc 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.LockFileRegion.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.LockFileRegion.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MAdvise.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MAdvise.cs index b46a50698694..539e27a04e3c 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MAdvise.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MAdvise.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MMap.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MMap.cs index e58311b75911..f75065210307 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MMap.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MMap.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MSync.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MSync.cs index 9326c6400440..d486c36811c6 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MSync.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MSync.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MUnmap.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MUnmap.cs index 1bfc1bae6562..fffd3fb941fd 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MUnmap.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MUnmap.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MapTcpState.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MapTcpState.cs index f0ac9d98a9b6..05926e86f699 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MapTcpState.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MapTcpState.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Net.NetworkInformation; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MemSet.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MemSet.cs index 431d17029bcb..46449d375648 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MemSet.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MemSet.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MessageHeader.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MessageHeader.cs index 0748eb9213e6..5e327a647936 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MessageHeader.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MessageHeader.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net.Sockets; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MkDir.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MkDir.cs index 3e4105cf4396..8779967fd5d6 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MkDir.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MkDir.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MksTemps.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MksTemps.cs index 14c2d989130a..f40937907b8f 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MksTemps.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MksTemps.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MountPoints.FormatInfo.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MountPoints.FormatInfo.cs index e02afa58e91a..44db77808f85 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MountPoints.FormatInfo.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MountPoints.FormatInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MountPoints.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MountPoints.cs index 52b2ca2ce19e..716725a3b194 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MountPoints.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MountPoints.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MulticastOption.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MulticastOption.cs index 9a58d27bf216..aa4445573a4b 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MulticastOption.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MulticastOption.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.NetworkChange.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.NetworkChange.cs index 5e0222e3bbf7..a3ba07bea950 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.NetworkChange.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.NetworkChange.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Open.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Open.cs index a9a994c78c01..a4ec5f57b120 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Open.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Open.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.OpenFlags.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.OpenFlags.cs index f9e54c3cbcf9..ce1b5aa6562f 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.OpenFlags.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.OpenFlags.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.POpen.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.POpen.cs index 06854f0a457a..efa67b813cf8 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.POpen.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.POpen.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.PathConf.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.PathConf.cs index e2c127772020..5a9f27b7db06 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.PathConf.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.PathConf.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Permissions.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Permissions.cs index f1d13787d257..cbc54d4072c4 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Permissions.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Permissions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Pipe.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Pipe.cs index 191a8fb63aea..ca4fc28b2c61 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Pipe.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Pipe.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.PlatformSocketSupport.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.PlatformSocketSupport.cs index a148f64c0c96..1e67ff7ee9d3 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.PlatformSocketSupport.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.PlatformSocketSupport.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Poll.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Poll.cs index 895ce720e31a..c20d5f9a7cbf 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Poll.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Poll.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.PosixFAdvise.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.PosixFAdvise.cs index ad8b73aed211..ed9ee769ac8b 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.PosixFAdvise.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.PosixFAdvise.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.PrintF.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.PrintF.cs index 465c34e4bb76..22198d42a84b 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.PrintF.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.PrintF.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ProcessorArchitecture.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ProcessorArchitecture.cs index 9535f392f1dd..d18a153ae0f1 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ProcessorArchitecture.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ProcessorArchitecture.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Read.Pipe.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Read.Pipe.cs index f41f6eefab12..09d21bc9aa96 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Read.Pipe.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Read.Pipe.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Read.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Read.cs index e37a2ae6c1d7..51038fc099d9 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Read.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Read.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ReadDir.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ReadDir.cs index cacb3664db07..01de4fc1bcb3 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ReadDir.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ReadDir.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ReadLink.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ReadLink.cs index b945bc982c59..9735b0ff776f 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ReadLink.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ReadLink.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ReadStdinUnbuffered.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ReadStdinUnbuffered.cs index 1b3b0ac7ea51..f5dbb4299593 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ReadStdinUnbuffered.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ReadStdinUnbuffered.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; @@ -13,7 +12,7 @@ internal static partial class Sys internal static extern unsafe int ReadStdin(byte* buffer, int bufferSize); [DllImport(Libraries.SystemNative, EntryPoint = "SystemNative_InitializeConsoleBeforeRead")] - internal static extern unsafe void InitializeConsoleBeforeRead(byte minChars = 1, byte decisecondsTimeout = 0); + internal static extern unsafe void InitializeConsoleBeforeRead(bool convertCrToNl = false, byte minChars = 1, byte decisecondsTimeout = 0); [DllImport(Libraries.SystemNative, EntryPoint = "SystemNative_UninitializeConsoleAfterRead")] internal static extern unsafe void UninitializeConsoleAfterRead(); diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.RealPath.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.RealPath.cs index aabb54cc7c52..8daa79cd3e69 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.RealPath.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.RealPath.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Receive.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Receive.cs index 8f3cdbf9db07..a30f4c5e43a4 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Receive.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Receive.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net.Sockets; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ReceiveMessage.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ReceiveMessage.cs index b603318247a6..643e2acc39dc 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ReceiveMessage.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ReceiveMessage.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net.Sockets; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.RegisterForCtrlC.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.RegisterForCtrlC.cs index 603d8fa68b8f..f3c5b60e40c9 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.RegisterForCtrlC.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.RegisterForCtrlC.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.RegisterForSigChld.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.RegisterForSigChld.cs index 9c374cee10e9..d7db817eb5a5 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.RegisterForSigChld.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.RegisterForSigChld.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Rename.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Rename.cs index a82d913a15b2..be81942392d6 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Rename.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Rename.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ResourceLimits.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ResourceLimits.cs index bf8bf0070092..e3a10b7d1368 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ResourceLimits.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ResourceLimits.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.RestoreAndHandleCtrl.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.RestoreAndHandleCtrl.cs index 0f7b1a1e12bc..609a9997388b 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.RestoreAndHandleCtrl.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.RestoreAndHandleCtrl.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.RmDir.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.RmDir.cs index ddc0c3ad3424..5f178a33f7e4 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.RmDir.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.RmDir.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SNPrintF.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SNPrintF.cs index 05299100bb78..8755c7e0a698 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SNPrintF.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SNPrintF.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SchedGetSetAffinity.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SchedGetSetAffinity.cs index 881223aeff29..0a39741df9e5 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SchedGetSetAffinity.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SchedGetSetAffinity.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Send.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Send.cs index b4a7e1c9bc83..b22723d266c1 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Send.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Send.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net.Sockets; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SendFile.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SendFile.cs index b253a59b0dae..1566cdc75ca6 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SendFile.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SendFile.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SendMessage.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SendMessage.cs index 4d728be10549..7d1474896f63 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SendMessage.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SendMessage.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net.Sockets; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SetEUid.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SetEUid.cs index 8f537f8b46a9..ad3a2fcd9031 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SetEUid.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SetEUid.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SetReceiveTimeout.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SetReceiveTimeout.cs index b1bf252f2548..36926851e079 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SetReceiveTimeout.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SetReceiveTimeout.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net.Sockets; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SetSendTimeout.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SetSendTimeout.cs index 89a3bfbbf61d..db2a3632c10c 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SetSendTimeout.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SetSendTimeout.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net.Sockets; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SetSignalForBreak.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SetSignalForBreak.cs index 40eacccd5a37..37c892bb370a 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SetSignalForBreak.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SetSignalForBreak.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SetSockOpt.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SetSockOpt.cs index e958c9fcc3ba..6172c266a61e 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SetSockOpt.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SetSockOpt.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net.Sockets; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SetTerminalInvalidationHandler.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SetTerminalInvalidationHandler.cs index b372e36aa08c..a4ccb94186b7 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SetTerminalInvalidationHandler.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SetTerminalInvalidationHandler.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ShmOpen.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ShmOpen.cs index 8481c61dd1ca..f4749b8a5f7b 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ShmOpen.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ShmOpen.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Shutdown.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Shutdown.cs index 7e6e4405c9a8..6bbb8d70da67 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Shutdown.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Shutdown.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net.Sockets; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Socket.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Socket.cs index e69171690c63..e5b18a8b0694 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Socket.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Socket.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SocketAddress.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SocketAddress.cs index 86a83fdf8cb0..7c1dffc241ff 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SocketAddress.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SocketAddress.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SocketEvent.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SocketEvent.cs index 7752f309aa51..af9fcd32739b 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SocketEvent.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SocketEvent.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Stat.Pipe.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Stat.Pipe.cs index b52f565127e4..1852f983470f 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Stat.Pipe.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Stat.Pipe.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Stat.Span.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Stat.Span.cs index d3efec14c173..278dbeb1de4d 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Stat.Span.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Stat.Span.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Stat.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Stat.cs index 628bd9c70ce4..c143ab1828b8 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Stat.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Stat.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.StdinReady.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.StdinReady.cs index 7a19512c668f..51104f30af36 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.StdinReady.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.StdinReady.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Sync.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Sync.cs index babb2d6740ed..e51680db7508 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Sync.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Sync.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SysConf.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SysConf.cs index be0c0dee7bb6..022584ab95f4 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SysConf.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SysConf.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SysLog.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SysLog.cs index 8933e9c3d39a..e8809b136966 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SysLog.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.SysLog.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.UTimensat.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.UTimensat.cs index 5d7f4188e1bd..3477c6ae6fc9 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.UTimensat.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.UTimensat.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Unlink.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Unlink.cs index 9395428de02a..c71ffe645edd 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Unlink.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Unlink.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.WaitId.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.WaitId.cs index 1724f3d75b35..ec9c19ad6776 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.WaitId.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.WaitId.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.WaitPid.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.WaitPid.cs index 8292971d48e8..766d47faeb79 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.WaitPid.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.WaitPid.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Write.Pipe.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Write.Pipe.cs index 89bf8c3383f0..2543be83046a 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Write.Pipe.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Write.Pipe.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Write.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Write.cs index 9c4e0aa2a4e9..6b322ee72a88 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Write.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.Write.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Net.Security.Native/Interop.GssApiException.cs b/src/libraries/Common/src/Interop/Unix/System.Net.Security.Native/Interop.GssApiException.cs index 520a81a8fc91..9e2bee566a0f 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Net.Security.Native/Interop.GssApiException.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Net.Security.Native/Interop.GssApiException.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/Unix/System.Net.Security.Native/Interop.GssBuffer.cs b/src/libraries/Common/src/Interop/Unix/System.Net.Security.Native/Interop.GssBuffer.cs index 7f2bbbe4cf0a..a2c6255541e2 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Net.Security.Native/Interop.GssBuffer.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Net.Security.Native/Interop.GssBuffer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Unix/System.Net.Security.Native/Interop.Initialization.cs b/src/libraries/Common/src/Interop/Unix/System.Net.Security.Native/Interop.Initialization.cs index 44ae8a66eeb9..39a0d67f2021 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Net.Security.Native/Interop.Initialization.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Net.Security.Native/Interop.Initialization.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Unix/System.Net.Security.Native/Interop.NetSecurityNative.IsNtlmInstalled.cs b/src/libraries/Common/src/Interop/Unix/System.Net.Security.Native/Interop.NetSecurityNative.IsNtlmInstalled.cs index 91d2d4fe46e8..79edbf6adad4 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Net.Security.Native/Interop.NetSecurityNative.IsNtlmInstalled.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Net.Security.Native/Interop.NetSecurityNative.IsNtlmInstalled.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Net.Security.Native/Interop.NetSecurityNative.cs b/src/libraries/Common/src/Interop/Unix/System.Net.Security.Native/Interop.NetSecurityNative.cs index b86d5caaeb35..13da6a0102cf 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Net.Security.Native/Interop.NetSecurityNative.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Net.Security.Native/Interop.NetSecurityNative.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.ASN1.GetIntegerBytes.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.ASN1.GetIntegerBytes.cs index d7606b1aa0b7..c5b94de3d20a 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.ASN1.GetIntegerBytes.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.ASN1.GetIntegerBytes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.ASN1.Nid.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.ASN1.Nid.cs index 008fcfc4b138..a0f7ef27de21 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.ASN1.Nid.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.ASN1.Nid.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Concurrent; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.ASN1.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.ASN1.cs index 828b2be31fdd..a4bfc8d96215 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.ASN1.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.ASN1.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.BIO.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.BIO.cs index 71b10d457158..bc5349745a84 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.BIO.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.BIO.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; @@ -29,6 +28,12 @@ internal static partial class Crypto [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_BioWrite")] internal static extern int BioWrite(SafeBioHandle b, byte[] data, int len); + internal static int BioWrite(SafeBioHandle b, ReadOnlySpan data) => + BioWrite(b, ref MemoryMarshal.GetReference(data), data.Length); + + [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_BioWrite")] + private static extern int BioWrite(SafeBioHandle b, ref byte data, int len); + [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_GetMemoryBioSize")] internal static extern int GetMemoryBioSize(SafeBioHandle bio); diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Bignum.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Bignum.cs index d1f955bf759b..61f098c64b11 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Bignum.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Bignum.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Crypto.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Crypto.cs index 4be7dcb9aba3..c9e1a0cdbec9 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Crypto.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Crypto.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Dsa.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Dsa.cs index 0949efff4491..c3f8eabdd96c 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Dsa.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Dsa.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.ERR.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.ERR.cs index a98241ca5417..4bf86068be1d 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.ERR.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.ERR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EVP.Cipher.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EVP.Cipher.cs index 6aaadfa58bd8..637311663c1a 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EVP.Cipher.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EVP.Cipher.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EVP.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EVP.cs index 653a72045a0c..e1dc2e0cd58c 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EVP.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EVP.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; @@ -28,10 +27,12 @@ internal static int EvpDigestUpdate(SafeEvpMdCtxHandle ctx, ReadOnlySpan d [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_EvpDigestFinalEx")] internal static extern int EvpDigestFinalEx(SafeEvpMdCtxHandle ctx, ref byte md, ref uint s); + [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_EvpDigestCurrent")] + internal static extern int EvpDigestCurrent(SafeEvpMdCtxHandle ctx, ref byte md, ref uint s); + [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_EvpMdSize")] internal static extern int EvpMdSize(IntPtr md); - [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_EvpMd5")] internal static extern IntPtr EvpMd5(); diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EcDsa.ImportExport.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EcDsa.ImportExport.cs index e059d1d6e815..c0bde546835a 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EcDsa.ImportExport.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EcDsa.ImportExport.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EcDsa.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EcDsa.cs index 24cab8dbd09f..9fa5f14055a3 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EcDsa.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EcDsa.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EcKey.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EcKey.cs index bf78e9c7cd22..52224090eccd 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EcKey.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EcKey.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Encode.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Encode.cs index 1132a34e2b7d..68b5776869e8 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Encode.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Encode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EvpPkey.Dsa.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EvpPkey.Dsa.cs index 6c1d3cddc12e..820f300b0641 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EvpPkey.Dsa.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EvpPkey.Dsa.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Security.Cryptography; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EvpPkey.EcKey.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EvpPkey.EcKey.cs index 70dfa425d56a..54790cbf1728 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EvpPkey.EcKey.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EvpPkey.EcKey.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Security.Cryptography; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EvpPkey.Ecdh.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EvpPkey.Ecdh.cs index 74967f61047d..6e87f4e27e78 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EvpPkey.Ecdh.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EvpPkey.Ecdh.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EvpPkey.Rsa.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EvpPkey.Rsa.cs index 1f61a826a9c1..1509e5196286 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EvpPkey.Rsa.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EvpPkey.Rsa.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Security.Cryptography; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EvpPkey.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EvpPkey.cs index 2eff6bfcd19d..fc948ea59560 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EvpPkey.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EvpPkey.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Hmac.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Hmac.cs index e7c65ab5a12d..5638d20ae9d6 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Hmac.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Hmac.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; @@ -27,5 +26,8 @@ internal static int HmacUpdate(SafeHmacCtxHandle ctx, ReadOnlySpan data, i [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_HmacFinal")] internal static extern int HmacFinal(SafeHmacCtxHandle ctx, ref byte data, ref int len); + + [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_HmacCurrent")] + internal static extern int HmacCurrent(SafeHmacCtxHandle ctx, ref byte data, ref int len); } } diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Initialization.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Initialization.cs index a9a7309b5e08..1167c72e1764 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Initialization.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Initialization.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.LookupFriendlyNameByOid.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.LookupFriendlyNameByOid.cs index 37c1dd40e6ad..f4cdbae5401f 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.LookupFriendlyNameByOid.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.LookupFriendlyNameByOid.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OCSP.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OCSP.cs index 8774f8285f51..5ca56e527be2 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OCSP.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OCSP.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSsl.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSsl.cs index e522e7ee6dff..35f2309c3496 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSsl.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSsl.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; @@ -199,42 +198,11 @@ internal static SafeSslHandle AllocateSslContext(SslProtocols protocols, SafeX50 } } - if (hasCertificateAndKey) + if (sslAuthenticationOptions.CertificateContext != null && sslAuthenticationOptions.CertificateContext.IntermediateCertificates.Length > 0) { - bool hasCertReference = false; - try + if (!Ssl.AddExtraChainCertificates(context, sslAuthenticationOptions.CertificateContext!.IntermediateCertificates)) { - certHandle!.DangerousAddRef(ref hasCertReference); - using (X509Certificate2 cert = new X509Certificate2(certHandle.DangerousGetHandle())) - { - X509Chain? chain = null; - try - { - chain = TLSCertificateExtensions.BuildNewChain(cert, includeClientApplicationPolicy: false); - if (chain != null && !Ssl.AddExtraChainCertificates(context, chain)) - { - throw CreateSslException(SR.net_ssl_use_cert_failed); - } - } - finally - { - if (chain != null) - { - int elementsCount = chain.ChainElements.Count; - for (int i = 0; i < elementsCount; i++) - { - chain.ChainElements[i].Certificate!.Dispose(); - } - - chain.Dispose(); - } - } - } - } - finally - { - if (hasCertReference) - certHandle!.DangerousRelease(); + throw CreateSslException(SR.net_ssl_use_cert_failed); } } diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSslVersion.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSslVersion.cs index 8b311d40592a..7b89a34b0e00 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSslVersion.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSslVersion.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Pkcs12.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Pkcs12.cs index 1be561006fe6..c52d2c53c9c8 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Pkcs12.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Pkcs12.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Pkcs7.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Pkcs7.cs index 7c0e6dac26e4..3f9dbf1f8e1f 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Pkcs7.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Pkcs7.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; @@ -13,8 +12,11 @@ internal static partial class Crypto [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_PemReadBioPkcs7")] internal static extern SafePkcs7Handle PemReadBioPkcs7(SafeBioHandle bp); + internal static SafePkcs7Handle DecodePkcs7(ReadOnlySpan buf) => + DecodePkcs7(ref MemoryMarshal.GetReference(buf), buf.Length); + [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_DecodePkcs7")] - internal static extern SafePkcs7Handle DecodePkcs7(byte[] buf, int len); + private static extern SafePkcs7Handle DecodePkcs7(ref byte buf, int len); [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_D2IPkcs7Bio")] internal static extern SafePkcs7Handle D2IPkcs7Bio(SafeBioHandle bp); diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.PooledCrypto.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.PooledCrypto.cs index ddcba2dc19ad..3d7c192659d3 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.PooledCrypto.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.PooledCrypto.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Security.Cryptography; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.RAND.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.RAND.cs index eecdac802cbe..fc7f8956c4e4 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.RAND.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.RAND.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Rsa.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Rsa.cs index 425a493d8eaf..c2e774410e78 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Rsa.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Rsa.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.SetProtocolOptions.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.SetProtocolOptions.cs index e4db3ca18354..d75ab5c5cc55 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.SetProtocolOptions.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.SetProtocolOptions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Ssl.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Ssl.cs index b7edaf391968..4ea3397f6be4 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Ssl.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Ssl.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; @@ -193,6 +192,25 @@ internal static bool AddExtraChainCertificates(SafeSslHandle sslContext, X509Cha return true; } + internal static bool AddExtraChainCertificates(SafeSslHandle sslContext, X509Certificate2[] chain) + { + // send pre-computed list of intermediates. + for (int i = 0; i < chain.Length; i++) + { + SafeX509Handle dupCertHandle = Crypto.X509UpRef(chain[i].Handle); + Crypto.CheckValidOpenSslHandle(dupCertHandle); + if (!SslAddExtraChainCert(sslContext, dupCertHandle)) + { + Crypto.ErrClearError(); + dupCertHandle.Dispose(); // we still own the safe handle; clean it up + return false; + } + dupCertHandle.SetHandleAsInvalid(); // ownership has been transferred to sslHandle; do not free via this safe handle + } + + return true; + } + internal static class SslMethods { internal static readonly IntPtr SSLv23_method = SslV2_3Method(); @@ -223,7 +241,7 @@ internal sealed class SafeSslHandle : SafeHandle private SafeBioHandle? _readBio; private SafeBioHandle? _writeBio; private bool _isServer; - private bool _handshakeCompleted = false; + private bool _handshakeCompleted; public GCHandle AlpnHandle; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.SslCtx.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.SslCtx.cs index ddaf44ab0e8f..8df7733f0671 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.SslCtx.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.SslCtx.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.SslCtxOptions.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.SslCtxOptions.cs index 712a776c853f..d5f5bce10078 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.SslCtxOptions.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.SslCtxOptions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Net.Security; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509.cs index 059293581ddf..f1ebc6560d6b 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509Ext.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509Ext.cs index c57d75d99d1b..b3374cdf934c 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509Ext.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509Ext.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509Name.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509Name.cs index 799b453e969c..929440435d4b 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509Name.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509Name.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509Stack.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509Stack.cs index 8687ff070082..ce84ac229d5b 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509Stack.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509Stack.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509StoreCtx.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509StoreCtx.cs index e3b7bb6088da..38d8a3ae26bd 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509StoreCtx.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509StoreCtx.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ActivityControl.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ActivityControl.cs index 093755659de4..6b32fc69f56e 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ActivityControl.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ActivityControl.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.AdjustTokenPrivileges.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.AdjustTokenPrivileges.cs index 44a24dbe53ab..609e3cd33147 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.AdjustTokenPrivileges.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.AdjustTokenPrivileges.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.AllocateLocallyUniqueId.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.AllocateLocallyUniqueId.cs index b18bb99d7fb6..035db9fcbccf 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.AllocateLocallyUniqueId.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.AllocateLocallyUniqueId.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ChangeServiceConfig2.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ChangeServiceConfig2.cs index 42891bac1e08..d52882ea3275 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ChangeServiceConfig2.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ChangeServiceConfig2.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CheckTokenMembership.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CheckTokenMembership.cs index 02a6349f024f..1af4dba20107 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CheckTokenMembership.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CheckTokenMembership.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ClaimSecurityAttributes.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ClaimSecurityAttributes.cs index e8cbf16a86e2..37692663b0de 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ClaimSecurityAttributes.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ClaimSecurityAttributes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ClearEventLog.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ClearEventLog.cs index 28ad900f23bf..530ed7b66439 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ClearEventLog.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ClearEventLog.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CloseEventLog.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CloseEventLog.cs index 19c03dbeb410..6ee970066f50 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CloseEventLog.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CloseEventLog.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CloseServiceHandle.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CloseServiceHandle.cs index 1522c10f61fa..19373640faf4 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CloseServiceHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CloseServiceHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ControlService.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ControlService.cs index 34ea402f0c36..addda32e5d34 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ControlService.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ControlService.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ConvertSdToStringSd.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ConvertSdToStringSd.cs index 69dd6711c7a3..6240d410105e 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ConvertSdToStringSd.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ConvertSdToStringSd.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ConvertStringSdToSd.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ConvertStringSdToSd.cs index a64f7bac36bf..5eb7023aad82 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ConvertStringSdToSd.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ConvertStringSdToSd.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ConvertStringSecurityDescriptorToSecurityDescriptor.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ConvertStringSecurityDescriptorToSecurityDescriptor.cs index e6b67d6b7e8e..ab5b3ab8e121 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ConvertStringSecurityDescriptorToSecurityDescriptor.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ConvertStringSecurityDescriptorToSecurityDescriptor.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ConvertStringSidToSid.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ConvertStringSidToSid.cs index 48b72ae2b7c5..39a9559f4f4a 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ConvertStringSidToSid.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ConvertStringSidToSid.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CreateProcessWithLogon.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CreateProcessWithLogon.cs index fdf8eb66182f..7d4fc64ff1aa 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CreateProcessWithLogon.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CreateProcessWithLogon.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CreateService.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CreateService.cs index 40d5ed3974c2..c9a4249741a0 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CreateService.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CreateService.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CreateWellKnownSid.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CreateWellKnownSid.cs index 52b13aaa85ce..132f4a3e5846 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CreateWellKnownSid.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CreateWellKnownSid.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptAcquireContext.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptAcquireContext.cs index 0b512e2c719f..4291e9c7d5bd 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptAcquireContext.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptAcquireContext.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptCreateHash.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptCreateHash.cs index ffea2593630d..a49519557eea 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptCreateHash.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptCreateHash.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptDecrypt.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptDecrypt.cs index 1ea3182cb9e0..ae1b5c3c379e 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptDecrypt.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptDecrypt.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Security.Cryptography; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptDeriveKey.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptDeriveKey.cs index 86601f275df1..b2c6ca2e980b 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptDeriveKey.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptDeriveKey.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Security.Cryptography; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptDestroyHash.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptDestroyHash.cs index bcd3782d6935..6dbe44b67204 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptDestroyHash.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptDestroyHash.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptDestroyKey.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptDestroyKey.cs index 89e09f522e33..6a4a841e47dd 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptDestroyKey.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptDestroyKey.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptEncrypt.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptEncrypt.cs index bd46df10e440..933f5a75931d 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptEncrypt.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptEncrypt.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Security.Cryptography; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptExportKey.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptExportKey.cs index e6e3985ce6ee..f29b7b1585ee 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptExportKey.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptExportKey.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Security.Cryptography; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptGenKey.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptGenKey.cs index 43cf0cfc82fa..26a615ff116f 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptGenKey.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptGenKey.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Security.Cryptography; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptGetDefaultProvider.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptGetDefaultProvider.cs index c09bc9088c32..8b3a702d23aa 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptGetDefaultProvider.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptGetDefaultProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptGetHashParam.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptGetHashParam.cs index 32b22c251bf2..e503a7575ef4 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptGetHashParam.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptGetHashParam.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Security.Cryptography; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptGetKeyParam.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptGetKeyParam.cs index 13fefca5f12d..b7e64bca26c4 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptGetKeyParam.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptGetKeyParam.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Security.Cryptography; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptGetProvParam.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptGetProvParam.cs index 87a4b145b50e..63553bcee99a 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptGetProvParam.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptGetProvParam.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptGetUserKey.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptGetUserKey.cs index 7b91d1ebc27a..b35ee72d6e13 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptGetUserKey.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptGetUserKey.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Security.Cryptography; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptHashData.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptHashData.cs index f08802914e6c..1670380fb6f2 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptHashData.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptHashData.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Security.Cryptography; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptImportKey.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptImportKey.cs index d6d1e3b1b13a..242e97141ca5 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptImportKey.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptImportKey.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Security.Cryptography; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptReleaseContext.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptReleaseContext.cs index 14c404cbfe29..0a021497f303 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptReleaseContext.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptReleaseContext.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptSetKeyParam.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptSetKeyParam.cs index c8beb51ef90f..f1ee9ed2bda8 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptSetKeyParam.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptSetKeyParam.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Security.Cryptography; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptSignHash.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptSignHash.cs index 46533d016ccc..70e366f6fefc 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptSignHash.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptSignHash.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.DeleteService.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.DeleteService.cs index 05d379694732..a6c4cfa507e6 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.DeleteService.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.DeleteService.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.DeregisterEventSource.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.DeregisterEventSource.cs index 48ffcd8a2fa2..e377137c8c8e 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.DeregisterEventSource.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.DeregisterEventSource.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.DuplicateTokenEx.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.DuplicateTokenEx.cs index ce0ab0feeb0d..e0fd150bce01 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.DuplicateTokenEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.DuplicateTokenEx.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.DuplicateTokenEx_SafeTokenHandle.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.DuplicateTokenEx_SafeTokenHandle.cs index d55ccbecbeb3..7f3af0e0c08a 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.DuplicateTokenEx_SafeTokenHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.DuplicateTokenEx_SafeTokenHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ENUM_SERVICE_STATUS.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ENUM_SERVICE_STATUS.cs index 09f11603b6ed..00d0c20eca89 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ENUM_SERVICE_STATUS.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ENUM_SERVICE_STATUS.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; @@ -11,15 +10,15 @@ internal partial class Advapi32 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] internal class ENUM_SERVICE_STATUS { - internal string? serviceName = null; - internal string? displayName = null; - internal int serviceType = 0; - internal int currentState = 0; - internal int controlsAccepted = 0; - internal int win32ExitCode = 0; - internal int serviceSpecificExitCode = 0; - internal int checkPoint = 0; - internal int waitHint = 0; + internal string? serviceName; + internal string? displayName; + internal int serviceType; + internal int currentState; + internal int controlsAccepted; + internal int win32ExitCode; + internal int serviceSpecificExitCode; + internal int checkPoint; + internal int waitHint; } } } diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ENUM_SERVICE_STATUS_PROCESS.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ENUM_SERVICE_STATUS_PROCESS.cs index 98b68242fc3e..8fcd89df9a1c 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ENUM_SERVICE_STATUS_PROCESS.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ENUM_SERVICE_STATUS_PROCESS.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; @@ -11,17 +10,17 @@ internal partial class Advapi32 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] internal class ENUM_SERVICE_STATUS_PROCESS { - internal string? serviceName = null; - internal string? displayName = null; - internal int serviceType = 0; - internal int currentState = 0; - internal int controlsAccepted = 0; - internal int win32ExitCode = 0; - internal int serviceSpecificExitCode = 0; - internal int checkPoint = 0; - internal int waitHint = 0; - internal int processID = 0; - internal int serviceFlags = 0; + internal string? serviceName; + internal string? displayName; + internal int serviceType; + internal int currentState; + internal int controlsAccepted; + internal int win32ExitCode; + internal int serviceSpecificExitCode; + internal int checkPoint; + internal int waitHint; + internal int processID; + internal int serviceFlags; } } } diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EVENT_INFO_CLASS.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EVENT_INFO_CLASS.cs index fae4d2e5c303..ee060efb21b2 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EVENT_INFO_CLASS.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EVENT_INFO_CLASS.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EncryptDecrypt.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EncryptDecrypt.cs index db4149d14bac..705af9477cdf 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EncryptDecrypt.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EncryptDecrypt.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EnumDependentServices.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EnumDependentServices.cs index dc6260aa0976..bb54095e2437 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EnumDependentServices.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EnumDependentServices.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EnumServicesStatusEx.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EnumServicesStatusEx.cs index a58c7dddf1a3..32d23d96d485 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EnumServicesStatusEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EnumServicesStatusEx.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EtwEnableCallback.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EtwEnableCallback.cs index 33f6ae631d91..07cfaf95a3df 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EtwEnableCallback.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EtwEnableCallback.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventActivityIdControl.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventActivityIdControl.cs index 2d73e3e50a7a..c1c129b6a4db 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventActivityIdControl.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventActivityIdControl.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventRegister.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventRegister.cs index 1c1af36bfc06..8369b5c0f7f5 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventRegister.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventRegister.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventSetInformation.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventSetInformation.cs index b3a8851428cd..d7270765157a 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventSetInformation.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventSetInformation.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventTraceGuidsEx.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventTraceGuidsEx.cs index d85b2e5ba5f9..c0fef912e99c 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventTraceGuidsEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventTraceGuidsEx.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventUnregister.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventUnregister.cs index 1943cb314e4c..e0d0c6b501e9 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventUnregister.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventUnregister.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventWriteString.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventWriteString.cs index 9c60558e129d..0513daeacf00 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventWriteString.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventWriteString.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventWriteTransfer.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventWriteTransfer.cs index 1bc116fdd66a..3cb95ffc699b 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventWriteTransfer.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventWriteTransfer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetNumberOfEventLogRecords.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetNumberOfEventLogRecords.cs index 9315e118b5ed..cd1abb0f117d 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetNumberOfEventLogRecords.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetNumberOfEventLogRecords.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetOldestEventLogRecord.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetOldestEventLogRecord.cs index fe743854f604..b71998067fb2 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetOldestEventLogRecord.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetOldestEventLogRecord.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetSecurityDescriptorLength.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetSecurityDescriptorLength.cs index e78fa8938b5d..8b89d14a13c8 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetSecurityDescriptorLength.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetSecurityDescriptorLength.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetSecurityInfoByHandle.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetSecurityInfoByHandle.cs index 24f03efbe42d..933d8079521a 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetSecurityInfoByHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetSecurityInfoByHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetSecurityInfoByName.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetSecurityInfoByName.cs index 2c1945624a08..5146002941d2 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetSecurityInfoByName.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetSecurityInfoByName.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetServiceDisplayName.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetServiceDisplayName.cs index 7f4d3a5850aa..4800e11530f3 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetServiceDisplayName.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetServiceDisplayName.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetServiceKeyName.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetServiceKeyName.cs index 293f3c50f849..85251b354ae0 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetServiceKeyName.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetServiceKeyName.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetTokenInformation.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetTokenInformation.cs index 40da1dacefb4..5423812f21ed 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetTokenInformation.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetTokenInformation.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetTokenInformation_void.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetTokenInformation_void.cs index 4261dffa8034..4da5322be87b 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetTokenInformation_void.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetTokenInformation_void.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetWindowsAccountDomainSid.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetWindowsAccountDomainSid.cs index 31c83371f0c1..9792f1f730c5 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetWindowsAccountDomainSid.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetWindowsAccountDomainSid.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ImpersonateLoggedOnUser.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ImpersonateLoggedOnUser.cs index 085640b7b0fb..cf9ff0bfe15f 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ImpersonateLoggedOnUser.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ImpersonateLoggedOnUser.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ImpersonateNamedPipeClient.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ImpersonateNamedPipeClient.cs index 992f6e10711e..2b72ecd6572d 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ImpersonateNamedPipeClient.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ImpersonateNamedPipeClient.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.IsEqualDomainSid.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.IsEqualDomainSid.cs index 606a500196a3..501ab7a07e3d 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.IsEqualDomainSid.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.IsEqualDomainSid.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.IsWellKnownSid.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.IsWellKnownSid.cs index 830d471a3f86..db3741800307 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.IsWellKnownSid.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.IsWellKnownSid.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LSA_STRING.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LSA_STRING.cs index 7cd34c1f3f83..3af18d2e6158 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LSA_STRING.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LSA_STRING.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LUID.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LUID.cs index 7e5ce47325e6..cb1228ab2e61 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LUID.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LUID.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LUID_AND_ATTRIBUTES.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LUID_AND_ATTRIBUTES.cs index debedf5765ae..69f3f10d86df 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LUID_AND_ATTRIBUTES.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LUID_AND_ATTRIBUTES.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LookupAccountNameW.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LookupAccountNameW.cs index a254e694af5c..168e80cd6146 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LookupAccountNameW.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LookupAccountNameW.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LookupAccountSid.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LookupAccountSid.cs index 44495844ae0e..4af533270804 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LookupAccountSid.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LookupAccountSid.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Text; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LookupPrivilegeValue.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LookupPrivilegeValue.cs index 644e02308655..1e6e7fc51467 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LookupPrivilegeValue.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LookupPrivilegeValue.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LsaClose.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LsaClose.cs index cce89d7ae920..bc29d83ab829 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LsaClose.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LsaClose.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LsaFreeMemory.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LsaFreeMemory.cs index ffe77a5ec5b5..5193363331ec 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LsaFreeMemory.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LsaFreeMemory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LsaLookupNames2.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LsaLookupNames2.cs index 5d44fb41db5c..5b9092c7f888 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LsaLookupNames2.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LsaLookupNames2.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LsaLookupSids.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LsaLookupSids.cs index b28132a7ad9b..9986e358ca18 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LsaLookupSids.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LsaLookupSids.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LsaNtStatusToWinError.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LsaNtStatusToWinError.cs index 25880f96d61c..524600d62ce8 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LsaNtStatusToWinError.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LsaNtStatusToWinError.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LsaOpenPolicy.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LsaOpenPolicy.cs index 343a4885029d..910e6ff0015e 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LsaOpenPolicy.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LsaOpenPolicy.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.NotifyChangeEventLog.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.NotifyChangeEventLog.cs index 72b9abb5125f..542f614b7d18 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.NotifyChangeEventLog.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.NotifyChangeEventLog.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenEventLog.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenEventLog.cs index 95b3037eca79..72b5138b904e 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenEventLog.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenEventLog.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenProcessToken.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenProcessToken.cs index d74fe4227562..2fd2afbe08cc 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenProcessToken.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenProcessToken.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenProcessToken_IntPtr.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenProcessToken_IntPtr.cs index d93e162dfb03..4283336a9ad5 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenProcessToken_IntPtr.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenProcessToken_IntPtr.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenProcessToken_SafeAccessTokenHandle.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenProcessToken_SafeAccessTokenHandle.cs index 3bf14f03e777..b0560ba54dd0 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenProcessToken_SafeAccessTokenHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenProcessToken_SafeAccessTokenHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenSCManager.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenSCManager.cs index 6498736251eb..a4b64cee8873 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenSCManager.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenSCManager.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenService.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenService.cs index 5415fbbf297b..591355a9b9c6 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenService.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenService.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenThreadToken.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenThreadToken.cs index 8b3c87c2c0f6..8bce8337b215 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenThreadToken.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenThreadToken.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenThreadToken_SafeTokenHandle.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenThreadToken_SafeTokenHandle.cs index 40e3354498b0..7f038c1afdea 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenThreadToken_SafeTokenHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenThreadToken_SafeTokenHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.PERF_INFO.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.PERF_INFO.cs index 4ff59587b039..2d65e77e2a21 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.PERF_INFO.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.PERF_INFO.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Globalization; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ProcessOptions.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ProcessOptions.cs index a03e41a04be2..8fd9e6071cb4 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ProcessOptions.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ProcessOptions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.QUERY_SERVICE_CONFIG.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.QUERY_SERVICE_CONFIG.cs index bf2d9b09d832..1cc8c26d6513 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.QUERY_SERVICE_CONFIG.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.QUERY_SERVICE_CONFIG.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.QueryServiceConfig.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.QueryServiceConfig.cs index 1c6e0fbe1f8a..6aeaf40d2388 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.QueryServiceConfig.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.QueryServiceConfig.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.QueryServiceStatus.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.QueryServiceStatus.cs index 6badc4cf1651..7591a0740e56 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.QueryServiceStatus.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.QueryServiceStatus.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ReadEventLog.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ReadEventLog.cs index 26b2d49dd579..10da56b3dd95 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ReadEventLog.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ReadEventLog.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegCloseKey.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegCloseKey.cs index c4a69448e03b..5d27b90afa96 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegCloseKey.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegCloseKey.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegConnectRegistry.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegConnectRegistry.cs index 44bc38c60134..6e31334405ed 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegConnectRegistry.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegConnectRegistry.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegCreateKeyEx.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegCreateKeyEx.cs index 3caac3041f92..4c6b07be87b2 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegCreateKeyEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegCreateKeyEx.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable #if REGISTRY_ASSEMBLY diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegDeleteKeyEx.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegDeleteKeyEx.cs index 2fff3b1ed516..64b5cc4f27e8 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegDeleteKeyEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegDeleteKeyEx.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #if REGISTRY_ASSEMBLY using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegDeleteValue.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegDeleteValue.cs index 7bb376930fa7..fe960497e4d2 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegDeleteValue.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegDeleteValue.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable #if REGISTRY_ASSEMBLY diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegEnumKeyEx.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegEnumKeyEx.cs index d618b50cd1cd..6be8c154dbb0 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegEnumKeyEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegEnumKeyEx.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable #if REGISTRY_ASSEMBLY diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegEnumValue.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegEnumValue.cs index 02a7ad969284..d8d2cbe86095 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegEnumValue.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegEnumValue.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable #if REGISTRY_ASSEMBLY diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegFlushKey.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegFlushKey.cs index ccbecb608973..2f3d3ed1a756 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegFlushKey.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegFlushKey.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #if REGISTRY_ASSEMBLY using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegOpenKeyEx.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegOpenKeyEx.cs index 0bc2cdce3c83..7b04e61fbd80 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegOpenKeyEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegOpenKeyEx.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable #if REGISTRY_ASSEMBLY diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegQueryInfoKey.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegQueryInfoKey.cs index c2bb82fab567..8560be836dea 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegQueryInfoKey.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegQueryInfoKey.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable #if REGISTRY_ASSEMBLY diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegQueryValueEx.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegQueryValueEx.cs index bde703ad1863..f05122613da0 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegQueryValueEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegQueryValueEx.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable #if REGISTRY_ASSEMBLY diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegSetValueEx.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegSetValueEx.cs index 72cee21e1a17..7d8632662fc8 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegSetValueEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegSetValueEx.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable #if REGISTRY_ASSEMBLY diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegisterEventSource.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegisterEventSource.cs index cfa1e617a612..95763ba4f5e5 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegisterEventSource.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegisterEventSource.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegisterServiceCtrlHandlerEx.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegisterServiceCtrlHandlerEx.cs index 9912f71796a7..716e9f534dfc 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegisterServiceCtrlHandlerEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegisterServiceCtrlHandlerEx.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegistryConstants.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegistryConstants.cs index 48ea1f27c52a..c6d3d97cc741 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegistryConstants.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegistryConstants.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ReportEvent.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ReportEvent.cs index e61c4b1e2d97..6da0f1117b6e 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ReportEvent.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ReportEvent.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RevertToSelf.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RevertToSelf.cs index 3c84e5312d10..e18e63f04b55 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RevertToSelf.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RevertToSelf.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SERVICE_DELAYED_AUTOSTART_INFO.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SERVICE_DELAYED_AUTOSTART_INFO.cs index 249230d7ddcb..6b7ec4935f5b 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SERVICE_DELAYED_AUTOSTART_INFO.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SERVICE_DELAYED_AUTOSTART_INFO.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SERVICE_DESCRIPTION.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SERVICE_DESCRIPTION.cs index 53f1bfd4b8ca..71581abc32ff 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SERVICE_DESCRIPTION.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SERVICE_DESCRIPTION.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SERVICE_STATUS.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SERVICE_STATUS.cs index 028c4f59e6f8..2038ee7b4289 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SERVICE_STATUS.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SERVICE_STATUS.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SERVICE_TABLE_ENTRY.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SERVICE_TABLE_ENTRY.cs index 32b0b5f80a53..69d34ea23bce 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SERVICE_TABLE_ENTRY.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SERVICE_TABLE_ENTRY.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SecurityImpersonationLevel.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SecurityImpersonationLevel.cs index 2ec6cbb007cb..4325a767afb9 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SecurityImpersonationLevel.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SecurityImpersonationLevel.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ServiceProcessOptions.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ServiceProcessOptions.cs index 26d8ca11fd6f..53c9b1b2543c 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ServiceProcessOptions.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ServiceProcessOptions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SetSecurityInfoByHandle.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SetSecurityInfoByHandle.cs index 70054a9ff80c..d39173b12130 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SetSecurityInfoByHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SetSecurityInfoByHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SetSecurityInfoByName.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SetSecurityInfoByName.cs index eac729f326c0..1156e585cbcb 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SetSecurityInfoByName.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SetSecurityInfoByName.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SetServiceStatus.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SetServiceStatus.cs index ebd0161b3934..b64c87c9f2df 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SetServiceStatus.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SetServiceStatus.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SetThreadToken.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SetThreadToken.cs index eb528c062ac1..a9bb4a95d929 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SetThreadToken.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SetThreadToken.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.StartService.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.StartService.cs index 75b7537af974..a1af7cdeb465 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.StartService.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.StartService.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.StartServiceCtrlDispatcher.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.StartServiceCtrlDispatcher.cs index 9476242ad737..32935b86b1d3 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.StartServiceCtrlDispatcher.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.StartServiceCtrlDispatcher.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.TOKEN_ELEVATION.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.TOKEN_ELEVATION.cs index 55b49c9df396..43af0fe9d5f2 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.TOKEN_ELEVATION.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.TOKEN_ELEVATION.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.TOKEN_INFORMATION_CLASS.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.TOKEN_INFORMATION_CLASS.cs index 89c36b694a7c..a28693761751 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.TOKEN_INFORMATION_CLASS.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.TOKEN_INFORMATION_CLASS.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.TOKEN_PRIVILEGE.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.TOKEN_PRIVILEGE.cs index f4c071d5cd51..ec5790ea806b 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.TOKEN_PRIVILEGE.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.TOKEN_PRIVILEGE.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.WTSSESSION_NOTIFICATION.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.WTSSESSION_NOTIFICATION.cs index 86503af47ab6..a788481eaa37 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.WTSSESSION_NOTIFICATION.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.WTSSESSION_NOTIFICATION.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/SafeHashHandle.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/SafeHashHandle.cs index cc792233a5bb..860e33716029 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/SafeHashHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/SafeHashHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/SafeKeyHandle.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/SafeKeyHandle.cs index 261cd116527f..c41a5432a47e 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/SafeKeyHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/SafeKeyHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/SafeProvHandle.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/SafeProvHandle.cs index e4e16ee7c292..317d3a6c38b2 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/SafeProvHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/SafeProvHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/AesBCryptModes.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/AesBCryptModes.cs index 17b768c9ca16..96da1670201b 100644 --- a/src/libraries/Common/src/Interop/Windows/BCrypt/AesBCryptModes.cs +++ b/src/libraries/Common/src/Interop/Windows/BCrypt/AesBCryptModes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Security.Cryptography; diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/BCryptAlgorithmCache.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/BCryptAlgorithmCache.cs index 30e40b2950ed..d7524e23f8f0 100644 --- a/src/libraries/Common/src/Interop/Windows/BCrypt/BCryptAlgorithmCache.cs +++ b/src/libraries/Common/src/Interop/Windows/BCrypt/BCryptAlgorithmCache.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Cng.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Cng.cs index bcb5bae2a13e..a0cf90596e0a 100644 --- a/src/libraries/Common/src/Interop/Windows/BCrypt/Cng.cs +++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Cng.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; @@ -140,7 +139,7 @@ protected sealed override bool ReleaseHandle() internal sealed class SafeKeyHandle : SafeBCryptHandle { - private SafeAlgorithmHandle? _parentHandle = null; + private SafeAlgorithmHandle? _parentHandle; public void SetParentHandle(SafeAlgorithmHandle parentHandle) { diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/DESBCryptModes.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/DESBCryptModes.cs index b4f71a17dbed..f4fd13e6c778 100644 --- a/src/libraries/Common/src/Interop/Windows/BCrypt/DESBCryptModes.cs +++ b/src/libraries/Common/src/Interop/Windows/BCrypt/DESBCryptModes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Security.Cryptography; diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.AsymmetricEncryption.Types.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.AsymmetricEncryption.Types.cs index d82b3d7f9b05..83b338bb56df 100644 --- a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.AsymmetricEncryption.Types.cs +++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.AsymmetricEncryption.Types.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptChainingModes.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptChainingModes.cs index a1e98a2ddfa8..a5448570c5ce 100644 --- a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptChainingModes.cs +++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptChainingModes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptCloseAlgorithmProvider.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptCloseAlgorithmProvider.cs index e6205e26b0aa..0276b1887c3d 100644 --- a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptCloseAlgorithmProvider.cs +++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptCloseAlgorithmProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptCreateHash.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptCreateHash.cs index 6a2fc0d9a2e7..b4f6f02b8a26 100644 --- a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptCreateHash.cs +++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptCreateHash.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptDestroyHash.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptDestroyHash.cs index c3d7071214d7..b7753d110c44 100644 --- a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptDestroyHash.cs +++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptDestroyHash.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptDestroyKey.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptDestroyKey.cs index b29c33f88b9a..2ee52a0ac42f 100644 --- a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptDestroyKey.cs +++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptDestroyKey.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptDuplicateHash.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptDuplicateHash.cs new file mode 100644 index 000000000000..e3a6c604a1be --- /dev/null +++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptDuplicateHash.cs @@ -0,0 +1,34 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; + +internal partial class Interop +{ + internal partial class BCrypt + { + internal static SafeBCryptHashHandle BCryptDuplicateHash(SafeBCryptHashHandle hHash) + { + SafeBCryptHashHandle newHash; + NTSTATUS status = BCryptDuplicateHash(hHash, out newHash, IntPtr.Zero, 0, 0); + + if (status != NTSTATUS.STATUS_SUCCESS) + { + newHash.Dispose(); + throw CreateCryptographicException(status); + } + + return newHash; + } + + [DllImport(Libraries.BCrypt, CharSet = CharSet.Unicode)] + private static extern NTSTATUS BCryptDuplicateHash( + SafeBCryptHashHandle hHash, + out SafeBCryptHashHandle phNewHash, + IntPtr pbHashObject, + int cbHashObject, + int dwFlags); + } +} diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptEncryptDecrypt.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptEncryptDecrypt.cs index b377d1f8cb9a..d365f4e39ca2 100644 --- a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptEncryptDecrypt.cs +++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptEncryptDecrypt.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; @@ -14,57 +13,43 @@ internal static partial class Interop internal static partial class BCrypt { // Note: input and output are allowed to be the same buffer. BCryptEncrypt will correctly do the encryption in place according to CNG documentation. - internal static int BCryptEncrypt(SafeKeyHandle hKey, byte[] input, int inputOffset, int inputCount, byte[]? iv, byte[] output, int outputOffset, int outputCount) + internal static int BCryptEncrypt(SafeKeyHandle hKey, ReadOnlySpan input, byte[]? iv, Span output) { - Debug.Assert(input != null); - Debug.Assert(inputOffset >= 0); - Debug.Assert(inputCount >= 0); - Debug.Assert(inputCount <= input.Length - inputOffset); - Debug.Assert(output != null); - Debug.Assert(outputOffset >= 0); - Debug.Assert(outputCount >= 0); - Debug.Assert(outputCount <= output.Length - outputOffset); - unsafe { fixed (byte* pbInput = input) + fixed (byte* pbOutput = output) { - fixed (byte* pbOutput = output) + int cbResult; + NTSTATUS ntStatus = BCryptEncrypt(hKey, pbInput, input.Length, IntPtr.Zero, iv, iv == null ? 0 : iv.Length, pbOutput, output.Length, out cbResult, 0); + + if (ntStatus != NTSTATUS.STATUS_SUCCESS) { - int cbResult; - NTSTATUS ntStatus = BCryptEncrypt(hKey, pbInput + inputOffset, inputCount, IntPtr.Zero, iv, iv == null ? 0 : iv.Length, pbOutput + outputOffset, outputCount, out cbResult, 0); - if (ntStatus != NTSTATUS.STATUS_SUCCESS) - throw CreateCryptographicException(ntStatus); - return cbResult; + throw CreateCryptographicException(ntStatus); } + + return cbResult; } } } // Note: input and output are allowed to be the same buffer. BCryptDecrypt will correctly do the decryption in place according to CNG documentation. - internal static int BCryptDecrypt(SafeKeyHandle hKey, byte[] input, int inputOffset, int inputCount, byte[]? iv, byte[] output, int outputOffset, int outputCount) + internal static int BCryptDecrypt(SafeKeyHandle hKey, ReadOnlySpan input, byte[]? iv, Span output) { - Debug.Assert(input != null); - Debug.Assert(inputOffset >= 0); - Debug.Assert(inputCount >= 0); - Debug.Assert(inputCount <= input.Length - inputOffset); - Debug.Assert(output != null); - Debug.Assert(outputOffset >= 0); - Debug.Assert(outputCount >= 0); - Debug.Assert(outputCount <= output.Length - outputOffset); - unsafe { fixed (byte* pbInput = input) + fixed (byte* pbOutput = output) { - fixed (byte* pbOutput = output) + int cbResult; + NTSTATUS ntStatus = BCryptDecrypt(hKey, pbInput, input.Length, IntPtr.Zero, iv, iv == null ? 0 : iv.Length, pbOutput, output.Length, out cbResult, 0); + + if (ntStatus != NTSTATUS.STATUS_SUCCESS) { - int cbResult; - NTSTATUS ntStatus = BCryptDecrypt(hKey, pbInput + inputOffset, inputCount, IntPtr.Zero, iv, iv == null ? 0 : iv.Length, pbOutput + outputOffset, outputCount, out cbResult, 0); - if (ntStatus != NTSTATUS.STATUS_SUCCESS) - throw CreateCryptographicException(ntStatus); - return cbResult; + throw CreateCryptographicException(ntStatus); } + + return cbResult; } } } diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptExportKey.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptExportKey.cs index 6772d914923c..d7af5eafeb57 100644 --- a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptExportKey.cs +++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptExportKey.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptFinishHash.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptFinishHash.cs index 7ffda6ca6c03..4351bdf1cc0d 100644 --- a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptFinishHash.cs +++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptFinishHash.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptGenRandom.GetRandomBytes.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptGenRandom.GetRandomBytes.cs index 42824c7eb736..99834f2737a7 100644 --- a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptGenRandom.GetRandomBytes.cs +++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptGenRandom.GetRandomBytes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptGenRandom.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptGenRandom.cs index 1e6452f8fa9c..22d7be39e5af 100644 --- a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptGenRandom.cs +++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptGenRandom.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptGetProperty.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptGetProperty.cs index 8c0cd2ad2650..dafa5d27cc42 100644 --- a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptGetProperty.cs +++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptGetProperty.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptHashData.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptHashData.cs index 2832c7b68c44..73dc23d639da 100644 --- a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptHashData.cs +++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptHashData.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptImportKey.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptImportKey.cs index a03de6bbd9cb..c5015bf25878 100644 --- a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptImportKey.cs +++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptImportKey.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptKeyDataBlob.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptKeyDataBlob.cs index 32d9f0598fd9..68aaee607d1c 100644 --- a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptKeyDataBlob.cs +++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptKeyDataBlob.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptOpenAlgorithmProvider.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptOpenAlgorithmProvider.cs index 1d1372be1b4a..6107105e7214 100644 --- a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptOpenAlgorithmProvider.cs +++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptOpenAlgorithmProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptPropertyStrings.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptPropertyStrings.cs index 66e368fa0800..bcba9b2a2913 100644 --- a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptPropertyStrings.cs +++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptPropertyStrings.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.Blobs.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.Blobs.cs index dc688b098c62..8caf36e8a179 100644 --- a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.Blobs.cs +++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.Blobs.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.CreateCryptographicException.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.CreateCryptographicException.cs index 77ff030f9fa0..0d94e695ffc6 100644 --- a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.CreateCryptographicException.cs +++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.CreateCryptographicException.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Internal.Cryptography; diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.NTSTATUS.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.NTSTATUS.cs index af646aea9854..051f21938984 100644 --- a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.NTSTATUS.cs +++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.NTSTATUS.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/RC2BCryptModes.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/RC2BCryptModes.cs index a03d820def66..7c7503b8b9cb 100644 --- a/src/libraries/Common/src/Interop/Windows/BCrypt/RC2BCryptModes.cs +++ b/src/libraries/Common/src/Interop/Windows/BCrypt/RC2BCryptModes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Security.Cryptography; diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/TripleDesBCryptModes.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/TripleDesBCryptModes.cs index 7164b2e8ee3f..dcffc3b7d5d4 100644 --- a/src/libraries/Common/src/Interop/Windows/BCrypt/TripleDesBCryptModes.cs +++ b/src/libraries/Common/src/Interop/Windows/BCrypt/TripleDesBCryptModes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Security.Cryptography; @@ -10,9 +9,9 @@ namespace Internal.Cryptography { internal static class TripleDesBCryptModes { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA5350")] // We are providing the implementation for 3DES not consuming it + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA5350", Justification = "We are providing the implementation for TripleDES, not consuming it")] private static readonly SafeAlgorithmHandle s_hAlgCbc = Open3DesAlgorithm(Cng.BCRYPT_CHAIN_MODE_CBC); - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA5350")] // We are providing the implementation for 3DES not consuming it + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA5350", Justification = "We are providing the implementation for TripleDES, not consuming it")] private static readonly SafeAlgorithmHandle s_hAlgEcb = Open3DesAlgorithm(Cng.BCRYPT_CHAIN_MODE_ECB); internal static SafeAlgorithmHandle GetSharedHandle(CipherMode cipherMode) => diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.Alg.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.Alg.cs index 230f3a388466..6138fee0928d 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.Alg.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.Alg.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CERT_CONTEXT.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CERT_CONTEXT.cs index daeb8c317a80..d0fb738b4cf3 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CERT_CONTEXT.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CERT_CONTEXT.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CERT_ID.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CERT_ID.cs index 11a3203d5334..53a5282699f0 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CERT_ID.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CERT_ID.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CERT_INFO.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CERT_INFO.cs index 14761d085d5b..26efa43871aa 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CERT_INFO.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CERT_INFO.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CERT_ISSUER_SERIAL_NUMBER.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CERT_ISSUER_SERIAL_NUMBER.cs index ea6ace3e71fa..a5d39b9a0ef4 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CERT_ISSUER_SERIAL_NUMBER.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CERT_ISSUER_SERIAL_NUMBER.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CERT_PUBLIC_KEY_INFO.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CERT_PUBLIC_KEY_INFO.cs index 0736337e1e28..23807458e322 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CERT_PUBLIC_KEY_INFO.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CERT_PUBLIC_KEY_INFO.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_CMS_RECIPIENT_INFO.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_CMS_RECIPIENT_INFO.cs index 666ef699f299..c81aad358ed3 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_CMS_RECIPIENT_INFO.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_CMS_RECIPIENT_INFO.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_CTRL_DECRYPT_PARA.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_CTRL_DECRYPT_PARA.cs index 94122b0ac9dd..99c920e611ba 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_CTRL_DECRYPT_PARA.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_CTRL_DECRYPT_PARA.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_CTRL_KEY_AGREE_DECRYPT_PARA.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_CTRL_KEY_AGREE_DECRYPT_PARA.cs index 6ddd4135cd8b..99a60f60786e 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_CTRL_KEY_AGREE_DECRYPT_PARA.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_CTRL_KEY_AGREE_DECRYPT_PARA.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_ENVELOPED_ENCODE_INFO.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_ENVELOPED_ENCODE_INFO.cs index 9c92c610875e..141e13d6a2f4 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_ENVELOPED_ENCODE_INFO.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_ENVELOPED_ENCODE_INFO.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO.cs index 99c581ac5aa8..f9bb3861d8a8 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_KEY_AGREE_RECIPIENT_INFO.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_KEY_AGREE_RECIPIENT_INFO.cs index c7dce6da6a05..736499d763a8 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_KEY_AGREE_RECIPIENT_INFO.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_KEY_AGREE_RECIPIENT_INFO.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO.cs index 387c0c8ff68e..615cc0c7b2dd 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_KEY_TRANS_RECIPIENT_INFO.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_KEY_TRANS_RECIPIENT_INFO.cs index e637e85225ad..81615ea60f27 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_KEY_TRANS_RECIPIENT_INFO.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_KEY_TRANS_RECIPIENT_INFO.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_RC2_AUX_INFO.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_RC2_AUX_INFO.cs index 9d04b7d75d37..47acd7dbd172 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_RC2_AUX_INFO.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_RC2_AUX_INFO.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_RECIPIENT_ENCODE_INFO.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_RECIPIENT_ENCODE_INFO.cs index 6f06c6a620d0..2aba73f29f8a 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_RECIPIENT_ENCODE_INFO.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_RECIPIENT_ENCODE_INFO.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO.cs index 2047b019ee85..ed9cd67a0f25 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Runtime.InteropServices.ComTypes; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_RECIPIENT_ENCRYPTED_KEY_INFO.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_RECIPIENT_ENCRYPTED_KEY_INFO.cs index c24e28575e97..39d00e4dc664 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_RECIPIENT_ENCRYPTED_KEY_INFO.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMSG_RECIPIENT_ENCRYPTED_KEY_INFO.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Runtime.InteropServices.ComTypes; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMsgCmsRecipientChoice.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMsgCmsRecipientChoice.cs index a852539b61c0..5eccd1080229 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMsgCmsRecipientChoice.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMsgCmsRecipientChoice.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMsgKeyAgreeOriginatorChoice.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMsgKeyAgreeOriginatorChoice.cs index f30bcc3bd6da..39da4064f50e 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMsgKeyAgreeOriginatorChoice.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CMsgKeyAgreeOriginatorChoice.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CRYPT_ALGORITHM_IDENTIFIER.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CRYPT_ALGORITHM_IDENTIFIER.cs index 738027c7848f..d0a47190e880 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CRYPT_ALGORITHM_IDENTIFIER.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CRYPT_ALGORITHM_IDENTIFIER.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CRYPT_ATTRIBUTE.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CRYPT_ATTRIBUTE.cs index 39bc1a3c1021..f13e3b91502a 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CRYPT_ATTRIBUTE.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CRYPT_ATTRIBUTE.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CRYPT_ATTRIBUTES.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CRYPT_ATTRIBUTES.cs index 0fba380f5109..dc0f703f1336 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CRYPT_ATTRIBUTES.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CRYPT_ATTRIBUTES.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CRYPT_ATTRIBUTE_TYPE_VALUE.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CRYPT_ATTRIBUTE_TYPE_VALUE.cs index 3e790a244ee2..b1817d910875 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CRYPT_ATTRIBUTE_TYPE_VALUE.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CRYPT_ATTRIBUTE_TYPE_VALUE.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CRYPT_BIT_BLOB.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CRYPT_BIT_BLOB.cs index 153ced3c2286..77620c7734bb 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CRYPT_BIT_BLOB.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CRYPT_BIT_BLOB.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CRYPT_KEY_PROV_INFO.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CRYPT_KEY_PROV_INFO.cs index 1032c32b4fba..0829770f2c61 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CRYPT_KEY_PROV_INFO.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CRYPT_KEY_PROV_INFO.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CRYPT_RC2_CBC_PARAMETERS.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CRYPT_RC2_CBC_PARAMETERS.cs index 493df54d0670..315488b33c5a 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CRYPT_RC2_CBC_PARAMETERS.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CRYPT_RC2_CBC_PARAMETERS.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertAddCertificateLinkToStore.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertAddCertificateLinkToStore.cs index 296d4201a26d..2c907a327f8f 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertAddCertificateLinkToStore.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertAddCertificateLinkToStore.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Security.Cryptography.X509Certificates; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertCloseStore.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertCloseStore.cs index a8922968c140..8248d470d76c 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertCloseStore.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertCloseStore.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertContextPropId.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertContextPropId.cs index b6e2643c8689..f0635f64b353 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertContextPropId.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertContextPropId.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertCreateCertificateContext.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertCreateCertificateContext.cs index d8bcc1e4d58c..ece64b3abd65 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertCreateCertificateContext.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertCreateCertificateContext.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertDuplicateCertificateContext.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertDuplicateCertificateContext.cs index aaace4e9176e..0ed42d59e5d4 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertDuplicateCertificateContext.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertDuplicateCertificateContext.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertEnumCertificatesInStore.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertEnumCertificatesInStore.cs index 87d20c0160e3..1004313f9cb0 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertEnumCertificatesInStore.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertEnumCertificatesInStore.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertEnumCertificatesInStore_IntPtr.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertEnumCertificatesInStore_IntPtr.cs index 95bb71d26246..79b24c8f07a4 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertEnumCertificatesInStore_IntPtr.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertEnumCertificatesInStore_IntPtr.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertFreeCertificateContext.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertFreeCertificateContext.cs index f94a3a04f74a..577283c94dca 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertFreeCertificateContext.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertFreeCertificateContext.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertGetCertificateContextProperty.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertGetCertificateContextProperty.cs index bd3b3b0ddc6a..5aec204a88c3 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertGetCertificateContextProperty.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertGetCertificateContextProperty.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertGetPublicKeyLength.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertGetPublicKeyLength.cs index 12549f0d0c65..2bafe99799b3 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertGetPublicKeyLength.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertGetPublicKeyLength.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertIdChoice.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertIdChoice.cs index 6c21e3922c5b..70b991181ebb 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertIdChoice.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertIdChoice.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertNameStrTypeAndFlags.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertNameStrTypeAndFlags.cs index c8f354538ca1..6a82b97531f1 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertNameStrTypeAndFlags.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertNameStrTypeAndFlags.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertNameToStr.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertNameToStr.cs index 17520a895d8f..30d5379eb682 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertNameToStr.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertNameToStr.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertOpenStore.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertOpenStore.cs index 8907be3e1252..a0f85dc39f76 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertOpenStore.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertOpenStore.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CmsKeyAgreeKeyChoice.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CmsKeyAgreeKeyChoice.cs index 7f4086bea661..9157eda3d7d5 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CmsKeyAgreeKeyChoice.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CmsKeyAgreeKeyChoice.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptAcquireCertificatePrivateKey.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptAcquireCertificatePrivateKey.cs index 8a6fd2b8d483..12e8dd949e22 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptAcquireCertificatePrivateKey.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptAcquireCertificatePrivateKey.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptAcquireCertificatePrivateKeyFlags.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptAcquireCertificatePrivateKeyFlags.cs index 85eb19546b54..23e0aab56767 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptAcquireCertificatePrivateKeyFlags.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptAcquireCertificatePrivateKeyFlags.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptDecodeObject.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptDecodeObject.cs index 191d62b30d81..a2975e2a82b4 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptDecodeObject.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptDecodeObject.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptDecodeObjectStructType.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptDecodeObjectStructType.cs index 139dd47f0bdb..2d8e69d5cc05 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptDecodeObjectStructType.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptDecodeObjectStructType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptEncodeDecodeWrappers.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptEncodeDecodeWrappers.cs index c7e6bb2df11f..e5f2c2af3d0e 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptEncodeDecodeWrappers.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptEncodeDecodeWrappers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptEncodeObject.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptEncodeObject.cs index f8b9cc7e027e..454355a75a7b 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptEncodeObject.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptEncodeObject.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptFormatObject.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptFormatObject.cs index aa442138fdc3..4e5f747211b0 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptFormatObject.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptFormatObject.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptKeySpec.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptKeySpec.cs index c621aa24b7e5..0838157f64e2 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptKeySpec.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptKeySpec.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptMsgClose.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptMsgClose.cs index a0b8fb6c3535..08dd13648b85 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptMsgClose.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptMsgClose.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptMsgControl.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptMsgControl.cs index cd373eece2b0..6bc536407a9f 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptMsgControl.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptMsgControl.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptMsgGetParam.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptMsgGetParam.cs index 10dca5ab4e98..e769cadb452a 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptMsgGetParam.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptMsgGetParam.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptMsgOpenToDecode.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptMsgOpenToDecode.cs index e059ba190c2e..eeab2204e157 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptMsgOpenToDecode.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptMsgOpenToDecode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptMsgOpenToEncode.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptMsgOpenToEncode.cs index 158e7bf43bd0..c3ef57575996 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptMsgOpenToEncode.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptMsgOpenToEncode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptMsgParamType.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptMsgParamType.cs index aead73c0bc06..e9cfe79f6ece 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptMsgParamType.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptMsgParamType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptMsgType.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptMsgType.cs index 7e86d3408028..4de4382a263a 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptMsgType.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptMsgType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptMsgUpdate.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptMsgUpdate.cs index ba1e1319e7e4..cfa26203da76 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptMsgUpdate.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptMsgUpdate.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; @@ -15,5 +14,8 @@ internal static partial class Crypt32 [DllImport(Libraries.Crypt32, CharSet = CharSet.Unicode, SetLastError = true)] internal static extern bool CryptMsgUpdate(SafeCryptMsgHandle hCryptMsg, IntPtr pbData, int cbData, bool fFinal); + + [DllImport(Libraries.Crypt32, CharSet = CharSet.Unicode, SetLastError = true)] + internal static extern bool CryptMsgUpdate(SafeCryptMsgHandle hCryptMsg, ref byte pbData, int cbData, bool fFinal); } } diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptProtectData.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptProtectData.cs index ef6ae9a519f5..d5fb606cfe48 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptProtectData.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptProtectData.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptProtectDataFlags.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptProtectDataFlags.cs index faa8656f3c4b..906cb654be3d 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptProtectDataFlags.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptProtectDataFlags.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptProtectMemory.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptProtectMemory.cs index 54fdd425e31e..644d4e62191b 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptProtectMemory.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptProtectMemory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptRc2Version.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptRc2Version.cs index aa07950007a1..b1de38377955 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptRc2Version.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptRc2Version.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptUnprotectData.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptUnprotectData.cs index 7bf83b1ad1bd..87a7919dc8a3 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptUnprotectData.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptUnprotectData.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.DATA_BLOB.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.DATA_BLOB.cs index 24243506824e..bb28fd4beda4 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.DATA_BLOB.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.DATA_BLOB.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.ErrorCode.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.ErrorCode.cs index 5659b4191d10..2ec0fb6bfcc0 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.ErrorCode.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.ErrorCode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.FindOidInfo.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.FindOidInfo.cs index dfe83069002a..5cebcfa40c51 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.FindOidInfo.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.FindOidInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.HashIdAlg.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.HashIdAlg.cs index 995042e668e0..27f6e8b70049 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.HashIdAlg.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.HashIdAlg.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.MsgControlType.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.MsgControlType.cs index 544e82fa5892..00835f36d0d4 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.MsgControlType.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.MsgControlType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.MsgEncodingType.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.MsgEncodingType.cs index 4ac54090c60d..945573b7511f 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.MsgEncodingType.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.MsgEncodingType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.certificates.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.certificates.cs index 2fb8e48a1d58..c177c76cfb2b 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.certificates.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.certificates.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.certificates_types.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.certificates_types.cs index cbf5c3309e6f..3a5d9d31baf8 100644 --- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.certificates_types.cs +++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.certificates_types.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/CryptUI/Interop.CryptUIDlgCertificate.cs b/src/libraries/Common/src/Interop/Windows/CryptUI/Interop.CryptUIDlgCertificate.cs index d5c2943ccf63..6c9b8748919f 100644 --- a/src/libraries/Common/src/Interop/Windows/CryptUI/Interop.CryptUIDlgCertificate.cs +++ b/src/libraries/Common/src/Interop/Windows/CryptUI/Interop.CryptUIDlgCertificate.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.BitBlt.cs b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.BitBlt.cs index ce941a9b78c2..19b89ff505e9 100644 --- a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.BitBlt.cs +++ b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.BitBlt.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.CombineRgn.cs b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.CombineRgn.cs index 5b0145643cef..e417aa029bb5 100644 --- a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.CombineRgn.cs +++ b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.CombineRgn.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.CreateCompatibleDC.cs b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.CreateCompatibleDC.cs index 424471d66f99..634773c518b1 100644 --- a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.CreateCompatibleDC.cs +++ b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.CreateCompatibleDC.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.CreateDC.cs b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.CreateDC.cs index f2431db8a6fd..c8e9e774c4d2 100644 --- a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.CreateDC.cs +++ b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.CreateDC.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.CreateFontIndirect.cs b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.CreateFontIndirect.cs index 03890f868d99..cd46252f7c2f 100644 --- a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.CreateFontIndirect.cs +++ b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.CreateFontIndirect.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.CreateIC.cs b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.CreateIC.cs index 1c1d8310167f..0318454a93f2 100644 --- a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.CreateIC.cs +++ b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.CreateIC.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.CreateRectRgn.cs b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.CreateRectRgn.cs index f318043d7b53..da77bde404de 100644 --- a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.CreateRectRgn.cs +++ b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.CreateRectRgn.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.DeleteDC.cs b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.DeleteDC.cs index 89adffc20880..cda012b91693 100644 --- a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.DeleteDC.cs +++ b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.DeleteDC.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.DeleteObject.cs b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.DeleteObject.cs index 0b36993adef5..504442c78087 100644 --- a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.DeleteObject.cs +++ b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.DeleteObject.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.GetClipRgn.cs b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.GetClipRgn.cs index 7923411bf25b..0a71afab6379 100644 --- a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.GetClipRgn.cs +++ b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.GetClipRgn.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.GetCurrentObject.cs b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.GetCurrentObject.cs index 025c83603b9c..8a011badecb9 100644 --- a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.GetCurrentObject.cs +++ b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.GetCurrentObject.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.GetDeviceCaps.cs b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.GetDeviceCaps.cs index 51847352cff9..a9f29a1b8fb5 100644 --- a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.GetDeviceCaps.cs +++ b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.GetDeviceCaps.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.GetObjectType.cs b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.GetObjectType.cs index 6511173244ee..dcf21c3045a2 100644 --- a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.GetObjectType.cs +++ b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.GetObjectType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.GetRgnBox.cs b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.GetRgnBox.cs index aef9f59545fe..8bd9b20a6dbd 100644 --- a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.GetRgnBox.cs +++ b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.GetRgnBox.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.GetStockObject.cs b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.GetStockObject.cs index 50b0c520dc29..9d65eeca0403 100644 --- a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.GetStockObject.cs +++ b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.GetStockObject.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.ObjectType.cs b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.ObjectType.cs index e890ba7c3033..c0aa0cffcf65 100644 --- a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.ObjectType.cs +++ b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.ObjectType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.OffsetViewportOrgEx.cs b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.OffsetViewportOrgEx.cs index 57f304b02aac..724992c9ba4e 100644 --- a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.OffsetViewportOrgEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.OffsetViewportOrgEx.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Drawing; diff --git a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.RECT.cs b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.RECT.cs index 058d264c0cf3..fdd5de32a0e5 100644 --- a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.RECT.cs +++ b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.RECT.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Drawing; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.RasterOp.cs b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.RasterOp.cs index 4f65b7d91142..6fd2456d296c 100644 --- a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.RasterOp.cs +++ b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.RasterOp.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.RegionType.cs b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.RegionType.cs index eff32acb3f47..6039a732fcb5 100644 --- a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.RegionType.cs +++ b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.RegionType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.RestoreDC.cs b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.RestoreDC.cs index 6461e85115e1..b37ffdbdeba0 100644 --- a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.RestoreDC.cs +++ b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.RestoreDC.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.SaveDC.cs b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.SaveDC.cs index ca27682f0074..3c598c1793c4 100644 --- a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.SaveDC.cs +++ b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.SaveDC.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.SelectClipRgn.cs b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.SelectClipRgn.cs index 280514fdbb8f..38d84e967185 100644 --- a/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.SelectClipRgn.cs +++ b/src/libraries/Common/src/Interop/Windows/Gdi32/Interop.SelectClipRgn.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/HttpApi/Interop.ErrorCodes.cs b/src/libraries/Common/src/Interop/Windows/HttpApi/Interop.ErrorCodes.cs index 899e09e28af5..4e2115724563 100644 --- a/src/libraries/Common/src/Interop/Windows/HttpApi/Interop.ErrorCodes.cs +++ b/src/libraries/Common/src/Interop/Windows/HttpApi/Interop.ErrorCodes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/HttpApi/Interop.HttpApi.cs b/src/libraries/Common/src/Interop/Windows/HttpApi/Interop.HttpApi.cs index 5120a4e83553..ed6e282d0e6c 100644 --- a/src/libraries/Common/src/Interop/Windows/HttpApi/Interop.HttpApi.cs +++ b/src/libraries/Common/src/Interop/Windows/HttpApi/Interop.HttpApi.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; @@ -664,13 +663,11 @@ internal static int IndexOfKnownHeader(string headerName) private static unsafe string GetKnownHeader(HTTP_REQUEST* request, long fixup, int headerIndex) { - if (NetEventSource.IsEnabled) { NetEventSource.Enter(null); } - string header = null; HTTP_KNOWN_HEADER* pKnownHeader = (&request->Headers.KnownHeaders) + headerIndex; - if (NetEventSource.IsEnabled) + if (NetEventSource.Log.IsEnabled()) { NetEventSource.Info(null, $"HttpApi::GetKnownHeader() pKnownHeader:0x{(IntPtr)pKnownHeader}"); NetEventSource.Info(null, $"HttpApi::GetKnownHeader() pRawValue:0x{(IntPtr)pKnownHeader->pRawValue} RawValueLength:{pKnownHeader->RawValueLength}"); @@ -683,7 +680,6 @@ private static unsafe string GetKnownHeader(HTTP_REQUEST* request, long fixup, i header = new string(pKnownHeader->pRawValue + fixup, 0, pKnownHeader->RawValueLength); } - if (NetEventSource.IsEnabled) { NetEventSource.Exit(null, $"HttpApi::GetKnownHeader() return:{header}"); } return header; } @@ -722,8 +718,6 @@ internal static unsafe string GetVerb(IntPtr memoryBlob, IntPtr originalAddress) internal static unsafe WebHeaderCollection GetHeaders(IntPtr memoryBlob, IntPtr originalAddress) { - NetEventSource.Enter(null); - // Return value. WebHeaderCollection headerCollection = new WebHeaderCollection(); byte* pMemoryBlob = (byte*)memoryBlob; @@ -771,17 +765,11 @@ internal static unsafe WebHeaderCollection GetHeaders(IntPtr memoryBlob, IntPtr pKnownHeader++; } - NetEventSource.Exit(null); return headerCollection; } internal static unsafe uint GetChunks(IntPtr memoryBlob, IntPtr originalAddress, ref int dataChunkIndex, ref uint dataChunkOffset, byte[] buffer, int offset, int size) { - if (NetEventSource.IsEnabled) - { - NetEventSource.Enter(null, $"HttpApi::GetChunks() memoryBlob:{memoryBlob}"); - } - // Return value. uint dataRead = 0; byte* pMemoryBlob = (byte*)memoryBlob; @@ -829,17 +817,11 @@ internal static unsafe uint GetChunks(IntPtr memoryBlob, IntPtr originalAddress, dataChunkIndex = -1; } - if (NetEventSource.IsEnabled) - { - NetEventSource.Exit(null); - } return dataRead; } internal static unsafe HTTP_VERB GetKnownVerb(IntPtr memoryBlob, IntPtr originalAddress) { - NetEventSource.Enter(null); - // Return value. HTTP_VERB verb = HTTP_VERB.HttpVerbUnknown; @@ -849,14 +831,11 @@ internal static unsafe HTTP_VERB GetKnownVerb(IntPtr memoryBlob, IntPtr original verb = request->Verb; } - NetEventSource.Exit(null); return verb; } internal static unsafe IPEndPoint GetRemoteEndPoint(IntPtr memoryBlob, IntPtr originalAddress) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(null); - SocketAddress v4address = new SocketAddress(AddressFamily.InterNetwork, IPv4AddressSize); SocketAddress v6address = new SocketAddress(AddressFamily.InterNetworkV6, IPv6AddressSize); @@ -875,14 +854,11 @@ internal static unsafe IPEndPoint GetRemoteEndPoint(IntPtr memoryBlob, IntPtr or endpoint = new IPEndPoint(IPAddress.IPv6Any, IPEndPoint.MinPort).Create(v6address) as IPEndPoint; } - if (NetEventSource.IsEnabled) NetEventSource.Exit(null); return endpoint; } internal static unsafe IPEndPoint GetLocalEndPoint(IntPtr memoryBlob, IntPtr originalAddress) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(null); - SocketAddress v4address = new SocketAddress(AddressFamily.InterNetwork, IPv4AddressSize); SocketAddress v6address = new SocketAddress(AddressFamily.InterNetworkV6, IPv6AddressSize); @@ -901,7 +877,6 @@ internal static unsafe IPEndPoint GetLocalEndPoint(IntPtr memoryBlob, IntPtr ori endpoint = s_ipv6Any.Create(v6address) as IPEndPoint; } - if (NetEventSource.IsEnabled) NetEventSource.Exit(null); return endpoint; } diff --git a/src/libraries/Common/src/Interop/Windows/Interop.BOOL.cs b/src/libraries/Common/src/Interop/Windows/Interop.BOOL.cs index b79d90fbe9f2..619a726a75da 100644 --- a/src/libraries/Common/src/Interop/Windows/Interop.BOOL.cs +++ b/src/libraries/Common/src/Interop/Windows/Interop.BOOL.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Interop.BOOLEAN.cs b/src/libraries/Common/src/Interop/Windows/Interop.BOOLEAN.cs index 8158ffabde5f..2a233633658d 100644 --- a/src/libraries/Common/src/Interop/Windows/Interop.BOOLEAN.cs +++ b/src/libraries/Common/src/Interop/Windows/Interop.BOOLEAN.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Interop.Errors.cs b/src/libraries/Common/src/Interop/Windows/Interop.Errors.cs index 75c8eb5908ea..2186d54dfb32 100644 --- a/src/libraries/Common/src/Interop/Windows/Interop.Errors.cs +++ b/src/libraries/Common/src/Interop/Windows/Interop.Errors.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Interop.HRESULT.cs b/src/libraries/Common/src/Interop/Windows/Interop.HRESULT.cs index 639c80a86bad..be0cff44adb5 100644 --- a/src/libraries/Common/src/Interop/Windows/Interop.HRESULT.cs +++ b/src/libraries/Common/src/Interop/Windows/Interop.HRESULT.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Interop.HRESULT_FROM_WIN32.cs b/src/libraries/Common/src/Interop/Windows/Interop.HRESULT_FROM_WIN32.cs index d17a44d839a4..dd476004399c 100644 --- a/src/libraries/Common/src/Interop/Windows/Interop.HRESULT_FROM_WIN32.cs +++ b/src/libraries/Common/src/Interop/Windows/Interop.HRESULT_FROM_WIN32.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; diff --git a/src/libraries/Common/src/Interop/Windows/Interop.Libraries.cs b/src/libraries/Common/src/Interop/Windows/Interop.Libraries.cs index 2672c4cc489e..692cdd783f2f 100644 --- a/src/libraries/Common/src/Interop/Windows/Interop.Libraries.cs +++ b/src/libraries/Common/src/Interop/Windows/Interop.Libraries.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Interop.LongFileTime.cs b/src/libraries/Common/src/Interop/Windows/Interop.LongFileTime.cs index 5c8de320bf08..e1be498ffe69 100644 --- a/src/libraries/Common/src/Interop/Windows/Interop.LongFileTime.cs +++ b/src/libraries/Common/src/Interop/Windows/Interop.LongFileTime.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/src/Interop/Windows/Interop.OBJECT_ATTRIBUTES.cs b/src/libraries/Common/src/Interop/Windows/Interop.OBJECT_ATTRIBUTES.cs index fde17e85693f..f89fb97c9fdc 100644 --- a/src/libraries/Common/src/Interop/Windows/Interop.OBJECT_ATTRIBUTES.cs +++ b/src/libraries/Common/src/Interop/Windows/Interop.OBJECT_ATTRIBUTES.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Interop.UNICODE_STRING.cs b/src/libraries/Common/src/Interop/Windows/Interop.UNICODE_STRING.cs index 0b99ee5472ca..50c990501f93 100644 --- a/src/libraries/Common/src/Interop/Windows/Interop.UNICODE_STRING.cs +++ b/src/libraries/Common/src/Interop/Windows/Interop.UNICODE_STRING.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.ErrorCodes.cs b/src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.ErrorCodes.cs index 91128c738074..1c2bef41c424 100644 --- a/src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.ErrorCodes.cs +++ b/src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.ErrorCodes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.FIXED_INFO.cs b/src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.FIXED_INFO.cs index 773fdab5ec5d..50903914e37a 100644 --- a/src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.FIXED_INFO.cs +++ b/src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.FIXED_INFO.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.GetNetworkParams.cs b/src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.GetNetworkParams.cs index c428ca25b694..d6760bfc17ba 100644 --- a/src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.GetNetworkParams.cs +++ b/src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.GetNetworkParams.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.ICMP.cs b/src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.ICMP.cs index 220ac34a823f..915e26af070d 100644 --- a/src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.ICMP.cs +++ b/src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.ICMP.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.IP_ADDR_STRING.cs b/src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.IP_ADDR_STRING.cs index 8fc1fd2cd07f..8f24e28dba95 100644 --- a/src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.IP_ADDR_STRING.cs +++ b/src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.IP_ADDR_STRING.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.NetworkInformation.cs b/src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.NetworkInformation.cs index bbdb77924128..22be77c52fd4 100644 --- a/src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.NetworkInformation.cs +++ b/src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.NetworkInformation.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.if_nametoindex.cs b/src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.if_nametoindex.cs index 2b10b406e502..d544a94747f5 100644 --- a/src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.if_nametoindex.cs +++ b/src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.if_nametoindex.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Beep.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Beep.cs index 779af543414f..ef22a059ba49 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Beep.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Beep.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.COMMPROP.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.COMMPROP.cs index 597d2d000f4b..4d2ba229763a 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.COMMPROP.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.COMMPROP.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; @@ -38,4 +37,4 @@ internal struct COMMPROP } } -} \ No newline at end of file +} diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.COMMTIMEOUTS.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.COMMTIMEOUTS.cs index e19560ae646e..4c0faae9fb5c 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.COMMTIMEOUTS.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.COMMTIMEOUTS.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; @@ -25,4 +24,4 @@ internal struct COMMTIMEOUTS public int WriteTotalTimeoutConstant; } } -} \ No newline at end of file +} diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.COMSTAT.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.COMSTAT.cs index 7efa5cd51a6f..44b76ebe571f 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.COMSTAT.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.COMSTAT.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; @@ -21,4 +20,4 @@ internal struct COMSTAT public uint cbOutQue; } } -} \ No newline at end of file +} diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CREATEFILE2_EXTENDED_PARAMETERS.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CREATEFILE2_EXTENDED_PARAMETERS.cs index d7c5af958fbc..9564f264b66b 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CREATEFILE2_EXTENDED_PARAMETERS.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CREATEFILE2_EXTENDED_PARAMETERS.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CTL_CODE.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CTL_CODE.cs deleted file mode 100644 index 2c43c82e4d5d..000000000000 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CTL_CODE.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Runtime.InteropServices; -using System.Data.Common; - -internal partial class Interop -{ - internal partial class Kernel32 - { - /// CTL_CODE method. - /// Identifies the device type. This value must match the value that is set in the DeviceType member of the driver's DEVICE_OBJECT structure. - /// Identifies the function to be performed by the driver. Values of less than 0x800 are reserved for Microsoft. Values of 0x800 and higher can be used by vendors. - /// Indicates how the system will pass data between the caller of DeviceIoControl (or IoBuildDeviceIoControlRequest) and the driver that handles the IRP. - /// Indicates the type of access that a caller must request when opening the file object that represents the device (see IRP_MJ_CREATE). - internal static unsafe uint CTL_CODE( - ushort deviceType, - ushort function, - byte method, - byte access) - { - // MaxFunctionCode specifies the maximum value of the FunctionCode field in the FSCTLs (or IOCTLs for IOCTL tests). The maximum possible value is 4095. - // See https://docs.microsoft.com/en-us/windows-hardware/drivers/develop/how-to-select-and-configure-the-device-fundamental-tests - if (function > 4095) - throw ADP.ArgumentOutOfRange("function"); - - return (uint)((deviceType << 16) | (access << 14) | (function << 2) | method); - } - } -} diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CancelIoEx.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CancelIoEx.cs index 057ebb924f49..124578deb49b 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CancelIoEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CancelIoEx.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CheckTokenMembershipEx.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CheckTokenMembershipEx.cs index 2a3d3820fc9f..590d8651fae4 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CheckTokenMembershipEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CheckTokenMembershipEx.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ClearCommBreak.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ClearCommBreak.cs index 4b7b730700c4..c21f399b0f5f 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ClearCommBreak.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ClearCommBreak.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; @@ -13,4 +12,4 @@ internal partial class Kernel32 internal static extern bool ClearCommBreak( SafeFileHandle hFile); } -} \ No newline at end of file +} diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ClearCommError.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ClearCommError.cs index 0b5aa5412f8c..65a35f2c298e 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ClearCommError.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ClearCommError.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; @@ -22,4 +21,4 @@ internal static extern bool ClearCommError( ref int lpErrors, IntPtr lpStat); } -} \ No newline at end of file +} diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CloseHandle.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CloseHandle.cs index c43859971858..bf767ece3d2d 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CloseHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CloseHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CompareStringOrdinal.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CompareStringOrdinal.cs index 6c06debed8d4..5bc410bcca1e 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CompareStringOrdinal.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CompareStringOrdinal.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CompletionPort.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CompletionPort.cs index 326f0e9df005..cc60031f8606 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CompletionPort.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CompletionPort.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ConnectNamedPipe.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ConnectNamedPipe.cs index 0a0b7d0df3af..0c72318aac21 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ConnectNamedPipe.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ConnectNamedPipe.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ConsoleCursorInfo.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ConsoleCursorInfo.cs index 51a0c5369f88..c5ab22ca8193 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ConsoleCursorInfo.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ConsoleCursorInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ConsoleScreenBufferInfo.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ConsoleScreenBufferInfo.cs index 1c50be4fd371..71cfa523d44b 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ConsoleScreenBufferInfo.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ConsoleScreenBufferInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Constants.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Constants.cs index fe213a9e586b..9a376d2f101a 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Constants.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Constants.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CopyFile.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CopyFile.cs index 3f90795dfb93..73ceb6b8c349 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CopyFile.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CopyFile.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CopyFileEx.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CopyFileEx.cs index 46efbc61bc08..440278ab11eb 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CopyFileEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CopyFileEx.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateDirectory.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateDirectory.cs index 97232a88496d..ad57bf0e4caa 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateDirectory.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateDirectory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.IO; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateFile.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateFile.cs index 402b75f72911..ce5bfd9fd532 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateFile.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateFile.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateFileMapping.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateFileMapping.cs index 39156643e4bb..4b60571ba561 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateFileMapping.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateFileMapping.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateFileMappingFromApp.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateFileMappingFromApp.cs index 19cc1920d48b..c402e918052e 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateFileMappingFromApp.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateFileMappingFromApp.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateFile_IntPtr.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateFile_IntPtr.cs index 13ac93defef8..de8ec49722c5 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateFile_IntPtr.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateFile_IntPtr.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateNamedPipe.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateNamedPipe.cs index ee3bb6f3f616..b40e76f71aeb 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateNamedPipe.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateNamedPipe.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateNamedPipeClient.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateNamedPipeClient.cs index 05042ec870a0..219a70165991 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateNamedPipeClient.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateNamedPipeClient.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreatePipe_SafeFileHandle.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreatePipe_SafeFileHandle.cs index 947d2fd0b50a..fdf4aad05e1f 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreatePipe_SafeFileHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreatePipe_SafeFileHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreatePipe_SafePipeHandle.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreatePipe_SafePipeHandle.cs index e8941bb746c4..740256b40b66 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreatePipe_SafePipeHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreatePipe_SafePipeHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateProcess.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateProcess.cs index c90bdbf49816..104bfe0e0e16 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateProcess.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateProcess.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DCB.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DCB.cs index c2df705835f2..d1b1ee1ff0a9 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DCB.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DCB.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; @@ -79,4 +78,4 @@ internal struct DCB public ushort wReserved1; } } -} \ No newline at end of file +} diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DeleteFile.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DeleteFile.cs index dbcae6ee3183..da77fea95df6 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DeleteFile.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DeleteFile.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.IO; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DeleteVolumeMountPoint.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DeleteVolumeMountPoint.cs index 49b9bfc92393..1a6aaecf1cb0 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DeleteVolumeMountPoint.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DeleteVolumeMountPoint.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.IO; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DeviceIoControl.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DeviceIoControl.cs deleted file mode 100644 index 7520040a50a9..000000000000 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DeviceIoControl.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Microsoft.Win32.SafeHandles; -using System; -using System.Runtime.InteropServices; - -internal partial class Interop -{ - internal partial class Kernel32 - { - [DllImport(Libraries.Kernel32, CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern bool DeviceIoControl - ( - SafeFileHandle fileHandle, - uint ioControlCode, - IntPtr inBuffer, - uint cbInBuffer, - IntPtr outBuffer, - uint cbOutBuffer, - out uint cbBytesReturned, - IntPtr overlapped - ); - } -} diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DisconnectNamedPipe.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DisconnectNamedPipe.cs index 248045864eb3..5ea6bc0069c5 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DisconnectNamedPipe.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DisconnectNamedPipe.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DuplicateHandle.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DuplicateHandle.cs index 3fca3c827022..9233ed61517b 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DuplicateHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DuplicateHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DuplicateHandle_IntPtr.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DuplicateHandle_IntPtr.cs index 52f5be6c5e86..19a596f6d980 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DuplicateHandle_IntPtr.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DuplicateHandle_IntPtr.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DuplicateHandle_SafeProcessHandle.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DuplicateHandle_SafeProcessHandle.cs index 4c615dc2ae71..7bf1c06ef731 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DuplicateHandle_SafeProcessHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DuplicateHandle_SafeProcessHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.EnumProcessModules.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.EnumProcessModules.cs index 581188f8fe34..15df45563e8c 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.EnumProcessModules.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.EnumProcessModules.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.EnumProcesses.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.EnumProcesses.cs index 60a5e1947b0c..ed5fdac363a3 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.EnumProcesses.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.EnumProcesses.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.EscapeCommFunction.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.EscapeCommFunction.cs index 866f85cd75bd..459a68b3748c 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.EscapeCommFunction.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.EscapeCommFunction.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; @@ -22,4 +21,4 @@ internal static extern bool EscapeCommFunction( SafeFileHandle hFile, int dwFunc); } -} \ No newline at end of file +} diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.EventWaitHandle.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.EventWaitHandle.cs index e4b0904b76ba..00f474576c8c 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.EventWaitHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.EventWaitHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ExpandEnvironmentStrings.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ExpandEnvironmentStrings.cs index 94a3714644e1..6d47dbb5c607 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ExpandEnvironmentStrings.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ExpandEnvironmentStrings.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FILE_BASIC_INFO.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FILE_BASIC_INFO.cs index c06d8c5f07d9..5b0a7d0937fa 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FILE_BASIC_INFO.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FILE_BASIC_INFO.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FILE_STANDARD_INFO.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FILE_STANDARD_INFO.cs index 802558c07505..9e1251b288d3 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FILE_STANDARD_INFO.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FILE_STANDARD_INFO.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FILE_TIME.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FILE_TIME.cs index 6a6464c4c8e1..19044dc62501 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FILE_TIME.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FILE_TIME.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FileAttributes.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FileAttributes.cs index 2cf4e287d3ce..f9cdf4e3aa08 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FileAttributes.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FileAttributes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FileOperations.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FileOperations.cs index b55028e5640e..8a2724dc2edd 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FileOperations.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FileOperations.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FileTimeToSystemTime.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FileTimeToSystemTime.cs index 676e344a51d1..95b98e47d3b0 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FileTimeToSystemTime.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FileTimeToSystemTime.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FileTypes.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FileTypes.cs index a23ba1a3a0b1..6649e1644e72 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FileTypes.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FileTypes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FillConsoleOutputAttribute.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FillConsoleOutputAttribute.cs index e4c2e2196281..023ae150381e 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FillConsoleOutputAttribute.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FillConsoleOutputAttribute.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FillConsoleOutputCharacter.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FillConsoleOutputCharacter.cs index 736319237cda..89254f98d3f4 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FillConsoleOutputCharacter.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FillConsoleOutputCharacter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FindClose.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FindClose.cs index 4bd534933d63..9999d8b94186 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FindClose.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FindClose.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FindFirstFileEx.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FindFirstFileEx.cs index a7cd35262d50..eb92e71f4a50 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FindFirstFileEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FindFirstFileEx.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FindNextFile.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FindNextFile.cs index a5abab3652b9..bd01c1d2895e 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FindNextFile.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FindNextFile.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FlushFileBuffers.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FlushFileBuffers.cs index 2b145d3d7dd5..094ef6134db7 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FlushFileBuffers.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FlushFileBuffers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FlushViewOfFile.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FlushViewOfFile.cs index 7d26dd8e0b98..7842cf6d984b 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FlushViewOfFile.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FlushViewOfFile.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FormatMessage.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FormatMessage.cs index 14ba39b044b9..17cfbeb441ea 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FormatMessage.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FormatMessage.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FormatMessage_SafeLibraryHandle.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FormatMessage_SafeLibraryHandle.cs index 13abc6ffe8db..a0a9ed7c9fed 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FormatMessage_SafeLibraryHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FormatMessage_SafeLibraryHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FreeEnvironmentStrings.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FreeEnvironmentStrings.cs index f325c281df8c..f9765e66d4d0 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FreeEnvironmentStrings.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FreeEnvironmentStrings.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FreeLibrary.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FreeLibrary.cs index 2033686fd8c6..7863e2417e00 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FreeLibrary.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FreeLibrary.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GET_FILEEX_INFO_LEVELS.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GET_FILEEX_INFO_LEVELS.cs index 4ee864203224..bc4cdcae0418 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GET_FILEEX_INFO_LEVELS.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GET_FILEEX_INFO_LEVELS.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GenericOperations.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GenericOperations.cs index e203dc366a9a..933a85f8d9c7 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GenericOperations.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GenericOperations.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCPInfo.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCPInfo.cs index b22a149b1239..990a43c827b6 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCPInfo.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCPInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCPInfoEx.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCPInfoEx.cs index e7078e31b1c7..b44a63e5c185 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCPInfoEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCPInfoEx.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCommModemStatus.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCommModemStatus.cs index a089cd3762f0..cc293b346c12 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCommModemStatus.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCommModemStatus.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; @@ -21,4 +20,4 @@ internal static extern bool GetCommModemStatus( SafeFileHandle hFile, ref int lpModemStat); } -} \ No newline at end of file +} diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCommProperties.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCommProperties.cs index 830f7de047b2..b8b590c75f57 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCommProperties.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCommProperties.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; @@ -14,4 +13,4 @@ internal static extern bool GetCommProperties( SafeFileHandle hFile, ref COMMPROP lpCommProp); } -} \ No newline at end of file +} diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCommState.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCommState.cs index c57333945081..2e94d4b7c42b 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCommState.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCommState.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; @@ -14,4 +13,4 @@ internal static extern bool GetCommState( SafeFileHandle hFile, ref DCB lpDCB); } -} \ No newline at end of file +} diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetComputerName.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetComputerName.cs index 92cfb955a4cb..f267d51b65fb 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetComputerName.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetComputerName.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetConsoleCP.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetConsoleCP.cs index f3e64294177d..900c649067c7 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetConsoleCP.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetConsoleCP.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetConsoleMode.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetConsoleMode.cs index 90edc119bb99..f081fec91943 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetConsoleMode.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetConsoleMode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetConsoleOutputCP.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetConsoleOutputCP.cs index f2506e2d69d2..3e4eaf7a324c 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetConsoleOutputCP.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetConsoleOutputCP.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetConsoleScreenBufferInfo.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetConsoleScreenBufferInfo.cs index f55d9e9e1c96..bf79276ff5b0 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetConsoleScreenBufferInfo.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetConsoleScreenBufferInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetConsoleTitle.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetConsoleTitle.cs index dbdb548098d5..1424039131ec 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetConsoleTitle.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetConsoleTitle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCurrentDirectory.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCurrentDirectory.cs index bf283df9c404..a8b30eb06d7f 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCurrentDirectory.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCurrentDirectory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCurrentProcessId.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCurrentProcessId.cs index 8164fd3f722d..ff50d0d470bc 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCurrentProcessId.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCurrentProcessId.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCurrentProcess_IntPtr.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCurrentProcess_IntPtr.cs index a763735651a2..3f7482f5385a 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCurrentProcess_IntPtr.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCurrentProcess_IntPtr.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCurrentProcess_SafeProcessHandle.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCurrentProcess_SafeProcessHandle.cs index e0f3ec32ce4d..36cb3da28c41 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCurrentProcess_SafeProcessHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCurrentProcess_SafeProcessHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCurrentThread.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCurrentThread.cs index d8832fda22a9..cefb82cbd3fb 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCurrentThread.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCurrentThread.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCurrentThreadId.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCurrentThreadId.cs index 775ddabfb6ac..e7a0ce9678a7 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCurrentThreadId.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCurrentThreadId.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetDiskFreeSpaceEx.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetDiskFreeSpaceEx.cs index 7b81411173e2..bf86ee4ec9c9 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetDiskFreeSpaceEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetDiskFreeSpaceEx.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetDriveType.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetDriveType.cs index 3a47f493f9f4..9c97329450af 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetDriveType.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetDriveType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetEnvironmentStrings.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetEnvironmentStrings.cs index cdbd01ca5020..4fcdbe0c2e76 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetEnvironmentStrings.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetEnvironmentStrings.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetEnvironmentVariable.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetEnvironmentVariable.cs index 0c14b3dd4039..069b7dd6a017 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetEnvironmentVariable.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetEnvironmentVariable.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetExitCodeProcess.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetExitCodeProcess.cs index d6da68b6f3fe..c4f5cbf8f8da 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetExitCodeProcess.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetExitCodeProcess.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetFileAttributesEx.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetFileAttributesEx.cs index 84cd7326b39f..d732cbe79b82 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetFileAttributesEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetFileAttributesEx.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.IO; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetFileInformationByHandleEx.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetFileInformationByHandleEx.cs index 53e412472229..f91af06bb7a8 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetFileInformationByHandleEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetFileInformationByHandleEx.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetFileType_IntPtr.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetFileType_IntPtr.cs index 495d72a5e279..4420e492689e 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetFileType_IntPtr.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetFileType_IntPtr.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetFileType_SafeHandle.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetFileType_SafeHandle.cs index cdde2f0e4d96..557866dbf55b 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetFileType_SafeHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetFileType_SafeHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetFullPathNameW.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetFullPathNameW.cs index 1bb63e7ed1d5..0c69a28cc79e 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetFullPathNameW.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetFullPathNameW.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetLargestConsoleWindowSize.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetLargestConsoleWindowSize.cs index 445c10c83d1d..84d3e81deedc 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetLargestConsoleWindowSize.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetLargestConsoleWindowSize.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetLogicalDrives.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetLogicalDrives.cs index 2400eb3aac4f..557c019e6a64 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetLogicalDrives.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetLogicalDrives.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetLongPathNameW.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetLongPathNameW.cs index 189c8e8cfe3e..616edc72c61b 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetLongPathNameW.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetLongPathNameW.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetModuleBaseName.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetModuleBaseName.cs index 5ad2961c618a..746b6a2d5b63 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetModuleBaseName.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetModuleBaseName.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetModuleFileNameEx.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetModuleFileNameEx.cs index d4e94f47d4b9..eab0ce8b33fd 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetModuleFileNameEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetModuleFileNameEx.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetModuleHandle.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetModuleHandle.cs index d30358d037f7..0c747a7664fa 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetModuleHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetModuleHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetModuleInformation.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetModuleInformation.cs index 98d4e30df28e..ed336f916525 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetModuleInformation.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetModuleInformation.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetNamedPipeHandleState.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetNamedPipeHandleState.cs index e8160fa860c0..3a26645cc372 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetNamedPipeHandleState.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetNamedPipeHandleState.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetNamedPipeInfo.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetNamedPipeInfo.cs index cb7c1c8c9aa6..0e7fef19a9ce 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetNamedPipeInfo.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetNamedPipeInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetNativeSystemInfo.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetNativeSystemInfo.cs index 82f42f53ea0f..dfc4c3091105 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetNativeSystemInfo.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetNativeSystemInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetOverlappedResult.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetOverlappedResult.cs index b31b6f6c9999..ad44065a5b6a 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetOverlappedResult.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetOverlappedResult.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetPriorityClass.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetPriorityClass.cs index 74dcd6242294..fae6838a00ba 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetPriorityClass.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetPriorityClass.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcAddress.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcAddress.cs index 4178eba4e79b..797ef5549b73 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcAddress.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcAddress.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessAffinityMask.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessAffinityMask.cs index 52aaf37d6362..4529b864d7b4 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessAffinityMask.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessAffinityMask.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessId.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessId.cs index c7317fb14b2c..69317d64557d 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessId.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessId.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessMemoryInfo.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessMemoryInfo.cs index 1d004bb8e913..cc15f5d13818 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessMemoryInfo.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessMemoryInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessPriorityBoost.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessPriorityBoost.cs index 03ba05b2215c..decb2f8f893d 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessPriorityBoost.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessPriorityBoost.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessTimes.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessTimes.cs index a39d3413cbe4..4c392697c8c7 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessTimes.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessTimes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessTimes_IntPtr.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessTimes_IntPtr.cs index 451394539c63..89489a513a7e 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessTimes_IntPtr.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessTimes_IntPtr.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessWorkingSetSizeEx.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessWorkingSetSizeEx.cs index 489a796501d4..b398ad5e3498 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessWorkingSetSizeEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessWorkingSetSizeEx.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetStdHandle.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetStdHandle.cs index c73c86e935e9..1bd75631ba1e 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetStdHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetStdHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetSystemDirectoryW.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetSystemDirectoryW.cs index b247a509c40d..bf835ab71f83 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetSystemDirectoryW.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetSystemDirectoryW.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetSystemInfo.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetSystemInfo.cs index 9e5b21c6b7f8..48e4b23dfcc3 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetSystemInfo.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetSystemInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetSystemTime.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetSystemTime.cs index ed0aa1474546..78ab4e93c2fa 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetSystemTime.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetSystemTime.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetSystemTimeAsFileTime.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetSystemTimeAsFileTime.cs index fc8b030a4c17..cae4594d9a35 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetSystemTimeAsFileTime.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetSystemTimeAsFileTime.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetSystemTimePreciseAsFileTime.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetSystemTimePreciseAsFileTime.cs index 0067d90a8081..0f79e0152902 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetSystemTimePreciseAsFileTime.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetSystemTimePreciseAsFileTime.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetSystemTimes.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetSystemTimes.cs index 34f8ad7b6df1..7c1cc6232ed3 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetSystemTimes.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetSystemTimes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetTempFileNameW.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetTempFileNameW.cs index 5c3140b82ea6..79807ff32b51 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetTempFileNameW.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetTempFileNameW.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetTempPathW.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetTempPathW.cs index 654a3b57011c..5d555df58cd2 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetTempPathW.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetTempPathW.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetThreadPriority.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetThreadPriority.cs index ac539c5097df..51cbfec2e033 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetThreadPriority.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetThreadPriority.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetThreadPriorityBoost.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetThreadPriorityBoost.cs index 0cd072690a50..4e051331bebf 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetThreadPriorityBoost.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetThreadPriorityBoost.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetThreadTimes.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetThreadTimes.cs index 94246827f80c..78d286c1fb19 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetThreadTimes.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetThreadTimes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetVolumeInformation.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetVolumeInformation.cs index 9d1e0beb5d60..c047379bc88b 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetVolumeInformation.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetVolumeInformation.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Text; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GlobalFree.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GlobalFree.cs index 676b3a06eacc..6241ed484918 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GlobalFree.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GlobalFree.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GlobalLock.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GlobalLock.cs index 4deccdd19615..e2f189d09dcf 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GlobalLock.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GlobalLock.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GlobalMemoryStatusEx.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GlobalMemoryStatusEx.cs index 2c2a17e9531d..a000b95a9a31 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GlobalMemoryStatusEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GlobalMemoryStatusEx.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Globalization.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Globalization.cs index 2aa2d6a1787d..78ba717b2306 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Globalization.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Globalization.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.HandleInformation.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.HandleInformation.cs index 5a6290c454da..fdc12144d35a 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.HandleInformation.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.HandleInformation.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.HandleOptions.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.HandleOptions.cs index 48bd84d5c076..2f24130f62f2 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.HandleOptions.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.HandleOptions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.HandleTypes.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.HandleTypes.cs index a5a42af560ea..0878edb7bba5 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.HandleTypes.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.HandleTypes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Heap.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Heap.cs index 580c45050164..f91a3e77d271 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Heap.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Heap.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.IoControlCodeAccess.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.IoControlCodeAccess.cs index 8653e7930fd0..7ab38e741587 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.IoControlCodeAccess.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.IoControlCodeAccess.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.IoControlTransferType.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.IoControlTransferType.cs deleted file mode 100644 index 0a3619862ab0..000000000000 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.IoControlTransferType.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Runtime.InteropServices; - -internal partial class Interop -{ - internal partial class Kernel32 - { - /// - /// TransferType. - /// Indicates how the system will pass data between the caller of DeviceIoControl (or IoBuildDeviceIoControlRequest) and the driver that handles the IRP. - /// - public enum IoControlTransferType - { - /// - /// Specifies the buffered I/O method, which is typically used for transferring small amounts of data per request. - /// Most I/O control codes for device and intermediate drivers use this TransferType value. - /// - METHOD_BUFFERED, - - /// - /// Specifies the direct I/O method, which is typically used for reading or writing large amounts of data, using DMA or PIO, that must be transferred quickly. - /// Specify METHOD_IN_DIRECT if the caller of DeviceIoControl or IoBuildDeviceIoControlRequest will pass data to the driver. - /// - METHOD_IN_DIRECT, - - /// - /// Specifies the direct I/O method, which is typically used for reading or writing large amounts of data, using DMA or PIO, that must be transferred quickly. - /// Specify METHOD_OUT_DIRECT if the caller of DeviceIoControl or IoBuildDeviceIoControlRequest will receive data from the driver. - /// - METHOD_OUT_DIRECT, - - /// - /// Specifies neither buffered nor direct I/O. The I/O manager does not provide any system buffers or MDLs. The IRP supplies the user-mode virtual addresses - /// of the input and output buffers that were specified to DeviceIoControl or IoBuildDeviceIoControlRequest, without validating or mapping them. - /// - METHOD_NEITHER - } - } -} diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.IsWow64Process_IntPtr.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.IsWow64Process_IntPtr.cs index 43936ab3fae4..60ddd4225b2a 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.IsWow64Process_IntPtr.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.IsWow64Process_IntPtr.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.IsWow64Process_SafeProcessHandle.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.IsWow64Process_SafeProcessHandle.cs index dc8626a0a879..6f786db47b7d 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.IsWow64Process_SafeProcessHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.IsWow64Process_SafeProcessHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.LoadLibrary.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.LoadLibrary.cs index 610d6265addf..efd2242d0550 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.LoadLibrary.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.LoadLibrary.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.LoadLibraryEx.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.LoadLibraryEx.cs index d24d4d3c6a88..7e912185e58a 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.LoadLibraryEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.LoadLibraryEx.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.LoadLibraryEx_IntPtr.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.LoadLibraryEx_IntPtr.cs index 3e3d1d34a81a..f5fdb6ca97fa 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.LoadLibraryEx_IntPtr.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.LoadLibraryEx_IntPtr.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.LocalAlloc.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.LocalAlloc.cs index 14486c2b5336..e21cb05caef8 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.LocalAlloc.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.LocalAlloc.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.LockFile.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.LockFile.cs index 82c7e4998b84..b00cb73b4128 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.LockFile.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.LockFile.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MAX_PATH.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MAX_PATH.cs index 9de12c940417..d380850cb5bf 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MAX_PATH.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MAX_PATH.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MEMORYSTATUSEX.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MEMORYSTATUSEX.cs index 3cb51c874675..515b3e4ad848 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MEMORYSTATUSEX.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MEMORYSTATUSEX.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MEMORY_BASIC_INFO.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MEMORY_BASIC_INFO.cs index 0744d53f66c5..84785156db9d 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MEMORY_BASIC_INFO.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MEMORY_BASIC_INFO.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MEMORY_BASIC_INFORMATION.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MEMORY_BASIC_INFORMATION.cs index ce49fb581795..58e7a6b113cc 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MEMORY_BASIC_INFORMATION.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MEMORY_BASIC_INFORMATION.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MUI.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MUI.cs index 12867a8527b1..89f310abbd2f 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MUI.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MUI.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MapViewOfFile.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MapViewOfFile.cs index db5a73066eb1..4fa3ff3ceae0 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MapViewOfFile.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MapViewOfFile.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MapViewOfFileFromApp.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MapViewOfFileFromApp.cs index 131ec88e7bb7..7426428f65bb 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MapViewOfFileFromApp.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MapViewOfFileFromApp.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MaxLengths.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MaxLengths.cs index 4f7b588b5846..56844bdab7a8 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MaxLengths.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MaxLengths.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MemOptions.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MemOptions.cs index 8ddd44769403..2cab5c659883 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MemOptions.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MemOptions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MoveFileEx.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MoveFileEx.cs index 63529ece7ea9..46b9b721989e 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MoveFileEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MoveFileEx.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.IO; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MultiByteToWideChar.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MultiByteToWideChar.cs index d369cb49c7c5..2cd6f2b58d91 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MultiByteToWideChar.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MultiByteToWideChar.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Mutex.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Mutex.cs index ad1d649fe9da..31b11d34c812 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Mutex.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Mutex.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OSVERSIONINFOEX.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OSVERSIONINFOEX.cs index 0f6e2e6b3339..11d705cfdaa0 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OSVERSIONINFOEX.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OSVERSIONINFOEX.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OpenFileMapping.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OpenFileMapping.cs index ceab698f923a..7dba1f9ff218 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OpenFileMapping.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OpenFileMapping.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OpenProcess.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OpenProcess.cs index 804ffc7db2bf..22011c59a09e 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OpenProcess.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OpenProcess.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OpenThread.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OpenThread.cs index 47ee908baeca..817a5a62a396 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OpenThread.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OpenThread.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OutputDebugString.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OutputDebugString.cs index 3ad3edde73d8..4d1f88983dd3 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OutputDebugString.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OutputDebugString.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.PeekConsoleInput.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.PeekConsoleInput.cs index ba63f0adc769..7a0764831e83 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.PeekConsoleInput.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.PeekConsoleInput.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.PerformanceCounterOptions.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.PerformanceCounterOptions.cs index 8a46375c4279..2d9e1dea66ce 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.PerformanceCounterOptions.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.PerformanceCounterOptions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.PipeOptions.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.PipeOptions.cs index 84a07b6a982a..67e5fa95e2ca 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.PipeOptions.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.PipeOptions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ProcessWaitHandle.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ProcessWaitHandle.cs index 94c996c89131..d6f0827735f7 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ProcessWaitHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ProcessWaitHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.PurgeComm.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.PurgeComm.cs index 1cad74c96c86..350f89f10252 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.PurgeComm.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.PurgeComm.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; @@ -22,4 +21,4 @@ internal static extern bool PurgeComm( SafeFileHandle hFile, uint dwFlags); } -} \ No newline at end of file +} diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.QueryPerformanceCounter.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.QueryPerformanceCounter.cs index 63f68473234e..9f396d046af8 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.QueryPerformanceCounter.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.QueryPerformanceCounter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.QueryPerformanceFrequency.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.QueryPerformanceFrequency.cs index 641451b671fc..cf5f9753bd64 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.QueryPerformanceFrequency.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.QueryPerformanceFrequency.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.QueryUnbiasedInterruptTime.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.QueryUnbiasedInterruptTime.cs index f7264d4dc8c9..a93dcecd1e1e 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.QueryUnbiasedInterruptTime.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.QueryUnbiasedInterruptTime.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReadConsole.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReadConsole.cs index 7a2f6232cdcf..947e4f9c02b5 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReadConsole.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReadConsole.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReadConsoleInput.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReadConsoleInput.cs index 03f3924e976a..44c2d297f7c0 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReadConsoleInput.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReadConsoleInput.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReadConsoleOutput.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReadConsoleOutput.cs index e81ed75f260b..d7be05a6b96d 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReadConsoleOutput.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReadConsoleOutput.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReadDirectoryChangesW.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReadDirectoryChangesW.cs index 9cb3111400f9..3790ca3c10ef 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReadDirectoryChangesW.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReadDirectoryChangesW.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReadFile_IntPtr.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReadFile_IntPtr.cs index a018551262b5..e5f3c2190d75 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReadFile_IntPtr.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReadFile_IntPtr.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReadFile_SafeHandle_IntPtr.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReadFile_SafeHandle_IntPtr.cs index b9f1c9584d87..d2ab765d448b 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReadFile_SafeHandle_IntPtr.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReadFile_SafeHandle_IntPtr.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReadFile_SafeHandle_NativeOverlapped.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReadFile_SafeHandle_NativeOverlapped.cs index a3c72547f963..841993224929 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReadFile_SafeHandle_NativeOverlapped.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReadFile_SafeHandle_NativeOverlapped.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.RemoveDirectory.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.RemoveDirectory.cs index dd8e321ec74f..d29a6267673f 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.RemoveDirectory.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.RemoveDirectory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.IO; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReplaceFile.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReplaceFile.cs index 8ab349f92170..7cf65125756c 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReplaceFile.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReplaceFile.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ResolveLocaleName.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ResolveLocaleName.cs index c349129d5151..5e0d8dfcd45a 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ResolveLocaleName.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ResolveLocaleName.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SECURITY_ATTRIBUTES.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SECURITY_ATTRIBUTES.cs index f2f32fd2775a..3849f88d8588 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SECURITY_ATTRIBUTES.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SECURITY_ATTRIBUTES.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SYSTEM_INFO.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SYSTEM_INFO.cs index 0ebeeff19330..097c8a397ea6 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SYSTEM_INFO.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SYSTEM_INFO.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SecurityOptions.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SecurityOptions.cs index bc9f58067712..0078ba94e626 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SecurityOptions.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SecurityOptions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Semaphore.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Semaphore.cs index c83db1f934c0..7c37649d5d73 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Semaphore.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Semaphore.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommBreak.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommBreak.cs index e57d3e0c7cbf..40db4741e169 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommBreak.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommBreak.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; @@ -13,4 +12,4 @@ internal partial class Kernel32 internal static extern bool SetCommBreak( SafeFileHandle hFile); } -} \ No newline at end of file +} diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommMask.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommMask.cs index 9231129ae8b4..8570f44b565b 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommMask.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommMask.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; @@ -22,4 +21,4 @@ internal static extern bool SetCommMask( int dwEvtMask ); } -} \ No newline at end of file +} diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommState.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommState.cs index d1a82ea39934..d5cffb8cb2dd 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommState.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommState.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; @@ -14,4 +13,4 @@ internal static extern bool SetCommState( SafeFileHandle hFile, ref DCB lpDCB); } -} \ No newline at end of file +} diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommTimeouts.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommTimeouts.cs index 31097041a3d5..fdb5c578fb9e 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommTimeouts.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommTimeouts.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; @@ -16,4 +15,4 @@ internal static extern bool SetCommTimeouts( SafeFileHandle hFile, ref COMMTIMEOUTS lpCommTimeouts); } -} \ No newline at end of file +} diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleCP.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleCP.cs index b5a87f8d73e8..7cb6628c6e4a 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleCP.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleCP.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleCtrlHandler.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleCtrlHandler.cs index c88eab81dc5e..7594b62f8c5e 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleCtrlHandler.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleCtrlHandler.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleCursorPosition.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleCursorPosition.cs index 9725c836cee9..c0ac0f0f6a7c 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleCursorPosition.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleCursorPosition.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleOutputCP.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleOutputCP.cs index 9a4f68035774..855022dcfc56 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleOutputCP.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleOutputCP.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleScreenBufferSize.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleScreenBufferSize.cs index bb4bd9e62904..a6e2252e8298 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleScreenBufferSize.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleScreenBufferSize.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleTextAttribute.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleTextAttribute.cs index 21b819a2bbc1..bc45dafaabfd 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleTextAttribute.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleTextAttribute.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleTitle.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleTitle.cs index 221a45c0b0d2..13e4e11115a4 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleTitle.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleTitle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleWindowInfo.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleWindowInfo.cs index 17bb3008bf93..ac9ee2fea765 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleWindowInfo.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleWindowInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCurrentDirectory.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCurrentDirectory.cs index 17360399a7c0..51cc5da3b7b8 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCurrentDirectory.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCurrentDirectory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetEndOfFile.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetEndOfFile.cs index 6d93e151cf6a..7ba5014d62fe 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetEndOfFile.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetEndOfFile.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetEnvironmentVariable.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetEnvironmentVariable.cs index ab3a6d34cd42..9c7d2ebd0724 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetEnvironmentVariable.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetEnvironmentVariable.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetFileAttributes.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetFileAttributes.cs index 9f956dc5d215..bfb36e0955a6 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetFileAttributes.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetFileAttributes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetFileCompletionNotificationModes.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetFileCompletionNotificationModes.cs index ea05865619dd..084cf297c2bf 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetFileCompletionNotificationModes.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetFileCompletionNotificationModes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetFileInformationByHandle.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetFileInformationByHandle.cs index 688d51fd4260..1bc903dc9ec3 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetFileInformationByHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetFileInformationByHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetFilePointerEx.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetFilePointerEx.cs index e83806697f15..7f8b47235994 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetFilePointerEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetFilePointerEx.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetNamedPipeHandleState.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetNamedPipeHandleState.cs index 6a35f5930e66..9448c6739d83 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetNamedPipeHandleState.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetNamedPipeHandleState.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetPriorityClass.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetPriorityClass.cs index 0b7a1e3f295d..ebafa0d84401 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetPriorityClass.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetPriorityClass.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetProcessAffinityMask.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetProcessAffinityMask.cs index 69b46eb71556..9818faca98ec 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetProcessAffinityMask.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetProcessAffinityMask.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetProcessPriorityBoost.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetProcessPriorityBoost.cs index 2e82208a7ed9..868e4aee2f20 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetProcessPriorityBoost.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetProcessPriorityBoost.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetProcessWorkingSetSizeEx.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetProcessWorkingSetSizeEx.cs index 49ab99ce6d4b..2f9cd37b0d3a 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetProcessWorkingSetSizeEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetProcessWorkingSetSizeEx.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadAffinityMask.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadAffinityMask.cs index dc47f57360f4..4fb3243e84fb 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadAffinityMask.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadAffinityMask.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadErrorMode.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadErrorMode.cs index f582c20c58e8..ebf30875b1c6 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadErrorMode.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadErrorMode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadIdealProcessor.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadIdealProcessor.cs index bfefd450a670..ab1e50f8ac29 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadIdealProcessor.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadIdealProcessor.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadPriority.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadPriority.cs index deecafcb83d4..e9ca6f043bf5 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadPriority.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadPriority.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadPriorityBoost.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadPriorityBoost.cs index f6ac12c522b2..d16f9e12b4dc 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadPriorityBoost.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadPriorityBoost.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetVolumeLabel.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetVolumeLabel.cs index d23c7f33b8a0..95119d4f772b 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetVolumeLabel.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetVolumeLabel.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetupComm.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetupComm.cs index 1e56f8edc983..089080137967 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetupComm.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetupComm.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; @@ -15,4 +14,4 @@ internal static extern bool SetupComm( int dwInQueue, int dwOutQueue); } -} \ No newline at end of file +} diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SystemTimeToFileTime.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SystemTimeToFileTime.cs index c347eeae7f89..852053b6c5f3 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SystemTimeToFileTime.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SystemTimeToFileTime.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.TerminateProcess.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.TerminateProcess.cs index 2b09a079c456..88420d0afe63 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.TerminateProcess.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.TerminateProcess.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ThreadOptions.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ThreadOptions.cs index 00ac551b7479..31adedb43b00 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ThreadOptions.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ThreadOptions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.TimeZone.Registry.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.TimeZone.Registry.cs index 14993bcca62a..d53313df3c3d 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.TimeZone.Registry.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.TimeZone.Registry.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.TimeZone.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.TimeZone.cs index 7be40ca8f4ca..3ed47085af6c 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.TimeZone.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.TimeZone.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.TzSpecificLocalTimeToSystemTime.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.TzSpecificLocalTimeToSystemTime.cs index 5cea7e071cff..2e5e264b0a71 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.TzSpecificLocalTimeToSystemTime.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.TzSpecificLocalTimeToSystemTime.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.UnmapViewOfFile.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.UnmapViewOfFile.cs index 6a4fa84199c7..853d15f50e69 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.UnmapViewOfFile.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.UnmapViewOfFile.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.VerLanguageName.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.VerLanguageName.cs index fd467f96ac54..2b1272342dd2 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.VerLanguageName.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.VerLanguageName.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.VerSetConditionMask.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.VerSetConditionMask.cs index 96e6172bc63a..e2aba5eea77d 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.VerSetConditionMask.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.VerSetConditionMask.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.VerifyVersionExW.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.VerifyVersionExW.cs index f8bd85a2a71b..3af8fa7eadbc 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.VerifyVersionExW.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.VerifyVersionExW.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.VirtualAlloc.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.VirtualAlloc.cs index 65462727e11e..19f93d2791dd 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.VirtualAlloc.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.VirtualAlloc.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.VirtualAlloc_Ptr.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.VirtualAlloc_Ptr.cs index efae71f0029c..6f3797218f3e 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.VirtualAlloc_Ptr.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.VirtualAlloc_Ptr.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.VirtualFree.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.VirtualFree.cs index 3c73609361e2..3ff002e0cd7d 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.VirtualFree.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.VirtualFree.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.VirtualQuery.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.VirtualQuery.cs index 26a7485411c1..0bf18455edfb 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.VirtualQuery.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.VirtualQuery.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.VirtualQuery_Ptr.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.VirtualQuery_Ptr.cs index a7fae35c4958..59622e85319a 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.VirtualQuery_Ptr.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.VirtualQuery_Ptr.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WIN32_FILE_ATTRIBUTE_DATA.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WIN32_FILE_ATTRIBUTE_DATA.cs index 05607443da4c..b7d2e4baace4 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WIN32_FILE_ATTRIBUTE_DATA.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WIN32_FILE_ATTRIBUTE_DATA.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WIN32_FIND_DATA.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WIN32_FIND_DATA.cs index f1ed25f83b42..b6c0ffa232d4 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WIN32_FIND_DATA.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WIN32_FIND_DATA.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WaitCommEvent.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WaitCommEvent.cs index 69ac18b3a50c..6013e7aad8d5 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WaitCommEvent.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WaitCommEvent.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WaitForSingleObject.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WaitForSingleObject.cs index 8bf2705d5286..bc0c9f72b917 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WaitForSingleObject.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WaitForSingleObject.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WaitNamedPipe.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WaitNamedPipe.cs index a4c7b0b2a3b7..11cbbe9027dc 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WaitNamedPipe.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WaitNamedPipe.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WideCharToMultiByte.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WideCharToMultiByte.cs index 1925a8c57854..ce255b45a1fc 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WideCharToMultiByte.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WideCharToMultiByte.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WriteConsole.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WriteConsole.cs index 1b3beadcc5a8..238f623cdb3a 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WriteConsole.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WriteConsole.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WriteConsoleOutput.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WriteConsoleOutput.cs index 5e777bb52c9d..741813811a83 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WriteConsoleOutput.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WriteConsoleOutput.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WriteFile_IntPtr.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WriteFile_IntPtr.cs index 2e18dc3ba270..750f89d5bd44 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WriteFile_IntPtr.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WriteFile_IntPtr.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WriteFile_SafeHandle_IntPtr.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WriteFile_SafeHandle_IntPtr.cs index e25d205259d5..9101041ab4f0 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WriteFile_SafeHandle_IntPtr.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WriteFile_SafeHandle_IntPtr.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WriteFile_SafeHandle_NativeOverlapped.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WriteFile_SafeHandle_NativeOverlapped.cs index 9c01f0a5fb7b..cca93e0b3ac8 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WriteFile_SafeHandle_NativeOverlapped.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WriteFile_SafeHandle_NativeOverlapped.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Mincore/Interop.GetCommPorts.cs b/src/libraries/Common/src/Interop/Windows/Mincore/Interop.GetCommPorts.cs index 9c02ded2223b..1ed2e964b7d4 100644 --- a/src/libraries/Common/src/Interop/Windows/Mincore/Interop.GetCommPorts.cs +++ b/src/libraries/Common/src/Interop/Windows/Mincore/Interop.GetCommPorts.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Mincore/Interop.GetRestrictedErrorInfo.cs b/src/libraries/Common/src/Interop/Windows/Mincore/Interop.GetRestrictedErrorInfo.cs index 9900c5061f35..8bfeebb4f3a3 100644 --- a/src/libraries/Common/src/Interop/Windows/Mincore/Interop.GetRestrictedErrorInfo.cs +++ b/src/libraries/Common/src/Interop/Windows/Mincore/Interop.GetRestrictedErrorInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Mincore/Interop.OpenCommPort.cs b/src/libraries/Common/src/Interop/Windows/Mincore/Interop.OpenCommPort.cs index faf37cfd5083..60a3408b3631 100644 --- a/src/libraries/Common/src/Interop/Windows/Mincore/Interop.OpenCommPort.cs +++ b/src/libraries/Common/src/Interop/Windows/Mincore/Interop.OpenCommPort.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Mincore/Interop.OpenFileMappingFromApp.cs b/src/libraries/Common/src/Interop/Windows/Mincore/Interop.OpenFileMappingFromApp.cs index 073a4ebbc0e7..01448ecf2853 100644 --- a/src/libraries/Common/src/Interop/Windows/Mincore/Interop.OpenFileMappingFromApp.cs +++ b/src/libraries/Common/src/Interop/Windows/Mincore/Interop.OpenFileMappingFromApp.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Mincore/Interop.RoGetActivationFactory.cs b/src/libraries/Common/src/Interop/Windows/Mincore/Interop.RoGetActivationFactory.cs index f3aff7d7c9a7..a8c9a93d5920 100644 --- a/src/libraries/Common/src/Interop/Windows/Mincore/Interop.RoGetActivationFactory.cs +++ b/src/libraries/Common/src/Interop/Windows/Mincore/Interop.RoGetActivationFactory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/Mincore/Interop.RoGetBufferMarshaler.cs b/src/libraries/Common/src/Interop/Windows/Mincore/Interop.RoGetBufferMarshaler.cs index c7503394cfd3..08ba54063873 100644 --- a/src/libraries/Common/src/Interop/Windows/Mincore/Interop.RoGetBufferMarshaler.cs +++ b/src/libraries/Common/src/Interop/Windows/Mincore/Interop.RoGetBufferMarshaler.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/src/Interop/Windows/Mincore/Interop.VirtualAllocFromApp.cs b/src/libraries/Common/src/Interop/Windows/Mincore/Interop.VirtualAllocFromApp.cs index 79c05b1b9bf3..179e6263ab25 100644 --- a/src/libraries/Common/src/Interop/Windows/Mincore/Interop.VirtualAllocFromApp.cs +++ b/src/libraries/Common/src/Interop/Windows/Mincore/Interop.VirtualAllocFromApp.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.AsymmetricPaddingMode.cs b/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.AsymmetricPaddingMode.cs index 5d730b9e294e..ab0ffe4df464 100644 --- a/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.AsymmetricPaddingMode.cs +++ b/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.AsymmetricPaddingMode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.EncryptDecrypt.cs b/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.EncryptDecrypt.cs index d9d9a397c7c2..5382193fcd0c 100644 --- a/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.EncryptDecrypt.cs +++ b/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.EncryptDecrypt.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.ErrorCode.cs b/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.ErrorCode.cs index 14bdb60234e2..21edfbf5063d 100644 --- a/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.ErrorCode.cs +++ b/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.ErrorCode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.Keys.cs b/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.Keys.cs index 212bfdef5f23..1c8b39892eb2 100644 --- a/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.Keys.cs +++ b/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.Keys.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptAlgorithms.cs b/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptAlgorithms.cs index 6dd5a380f006..22ca92d254c5 100644 --- a/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptAlgorithms.cs +++ b/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptAlgorithms.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptBuffer.cs b/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptBuffer.cs index 81583e078e1e..ca5a7fd8a940 100644 --- a/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptBuffer.cs +++ b/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptBuffer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptCipherKeyBlob.cs b/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptCipherKeyBlob.cs index 78be596a7a62..68c1561bae60 100644 --- a/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptCipherKeyBlob.cs +++ b/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptCipherKeyBlob.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptDeriveKeyMaterial.cs b/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptDeriveKeyMaterial.cs index c8468d5849b4..8e8509310ae3 100644 --- a/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptDeriveKeyMaterial.cs +++ b/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptDeriveKeyMaterial.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptDeriveSecretAgreement.cs b/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptDeriveSecretAgreement.cs index 5fd4f1d9da6a..422f9537ff36 100644 --- a/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptDeriveSecretAgreement.cs +++ b/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptDeriveSecretAgreement.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptFreeObject.cs b/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptFreeObject.cs index 32096f19e3bb..3e5b6ef36743 100644 --- a/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptFreeObject.cs +++ b/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptFreeObject.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptOpenStorageProvider.cs b/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptOpenStorageProvider.cs index e1e43a54cb7c..90e4a2e93338 100644 --- a/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptOpenStorageProvider.cs +++ b/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptOpenStorageProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptPropertyNames.cs b/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptPropertyNames.cs index 046987a43c69..1c20f7365130 100644 --- a/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptPropertyNames.cs +++ b/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptPropertyNames.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.Properties.cs b/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.Properties.cs index fc870d50de08..79ac4f59950d 100644 --- a/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.Properties.cs +++ b/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.Properties.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Security.Cryptography; diff --git a/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.SignVerify.cs b/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.SignVerify.cs index 9626e0ba2e43..e6a23b5bac4d 100644 --- a/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.SignVerify.cs +++ b/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.SignVerify.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.UiPolicy.cs b/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.UiPolicy.cs index 7f2a934a3557..052faa004366 100644 --- a/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.UiPolicy.cs +++ b/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.UiPolicy.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Normaliz/Interop.Idna.cs b/src/libraries/Common/src/Interop/Windows/Normaliz/Interop.Idna.cs index 039e34b5157d..9bc7631ad81d 100644 --- a/src/libraries/Common/src/Interop/Windows/Normaliz/Interop.Idna.cs +++ b/src/libraries/Common/src/Interop/Windows/Normaliz/Interop.Idna.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Normaliz/Interop.Normalization.cs b/src/libraries/Common/src/Interop/Windows/Normaliz/Interop.Normalization.cs index 362b7ffb4eef..dee9a1783428 100644 --- a/src/libraries/Common/src/Interop/Windows/Normaliz/Interop.Normalization.cs +++ b/src/libraries/Common/src/Interop/Windows/Normaliz/Interop.Normalization.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Text; diff --git a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.FILE_FULL_DIR_INFORMATION.cs b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.FILE_FULL_DIR_INFORMATION.cs index bf0329704b7b..697c317376e2 100644 --- a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.FILE_FULL_DIR_INFORMATION.cs +++ b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.FILE_FULL_DIR_INFORMATION.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.FILE_FULL_EA_INFORMATION.cs b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.FILE_FULL_EA_INFORMATION.cs index aaa4f5a9bd28..05b0335b988b 100644 --- a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.FILE_FULL_EA_INFORMATION.cs +++ b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.FILE_FULL_EA_INFORMATION.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.FILE_INFORMATION_CLASS.cs b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.FILE_INFORMATION_CLASS.cs index ec856e61afda..f6b3b48dde92 100644 --- a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.FILE_INFORMATION_CLASS.cs +++ b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.FILE_INFORMATION_CLASS.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.IO_STATUS_BLOCK.cs b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.IO_STATUS_BLOCK.cs index f372a56c60c9..2895f2c00193 100644 --- a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.IO_STATUS_BLOCK.cs +++ b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.IO_STATUS_BLOCK.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtCreateFile.cs b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtCreateFile.cs index 7cc8fca5a1e9..0bb009b06505 100644 --- a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtCreateFile.cs +++ b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtCreateFile.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtQueryDirectoryFile.cs b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtQueryDirectoryFile.cs index d854e26f98d6..3a1f2ab2603f 100644 --- a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtQueryDirectoryFile.cs +++ b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtQueryDirectoryFile.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtQueryInformationFile.cs b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtQueryInformationFile.cs index 3ca47ca43ccf..ccec236d394e 100644 --- a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtQueryInformationFile.cs +++ b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtQueryInformationFile.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtQueryInformationProcess.cs b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtQueryInformationProcess.cs index e56718eb0293..6f4c394de7a4 100644 --- a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtQueryInformationProcess.cs +++ b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtQueryInformationProcess.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtQuerySystemInformation.cs b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtQuerySystemInformation.cs index b3425e6411c9..3c556031418b 100644 --- a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtQuerySystemInformation.cs +++ b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtQuerySystemInformation.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtStatus.cs b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtStatus.cs index 413efdfbf690..5540270597c7 100644 --- a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtStatus.cs +++ b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtStatus.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.PROCESS_BASIC_INFORMATION.cs b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.PROCESS_BASIC_INFORMATION.cs index 642e9ecc6c20..0610e12ef661 100644 --- a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.PROCESS_BASIC_INFORMATION.cs +++ b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.PROCESS_BASIC_INFORMATION.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.RtlGetVersion.cs b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.RtlGetVersion.cs index d01a65913e86..5592714f6735 100644 --- a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.RtlGetVersion.cs +++ b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.RtlGetVersion.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.RtlNtStatusToDosError.cs b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.RtlNtStatusToDosError.cs index b6904e4a271c..d3834cd20cab 100644 --- a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.RtlNtStatusToDosError.cs +++ b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.RtlNtStatusToDosError.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.SYSTEM_LEAP_SECOND_INFORMATION.cs b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.SYSTEM_LEAP_SECOND_INFORMATION.cs index d1c4a905f120..1a3be36d1607 100644 --- a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.SYSTEM_LEAP_SECOND_INFORMATION.cs +++ b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.SYSTEM_LEAP_SECOND_INFORMATION.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.SYSTEM_PROCESS_INFORMATION.cs b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.SYSTEM_PROCESS_INFORMATION.cs index c8796518cf7c..428f2c2f829e 100644 --- a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.SYSTEM_PROCESS_INFORMATION.cs +++ b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.SYSTEM_PROCESS_INFORMATION.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoCreateGuid.cs b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoCreateGuid.cs index 57accbe7c008..7f3cd37b36bd 100644 --- a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoCreateGuid.cs +++ b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoCreateGuid.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoGetObjectContext.cs b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoGetObjectContext.cs index 11415f8afe8f..432632703438 100644 --- a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoGetObjectContext.cs +++ b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoGetObjectContext.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoGetStandardMarshal.cs b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoGetStandardMarshal.cs index 237bd29b96d8..cc958e694432 100644 --- a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoGetStandardMarshal.cs +++ b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoGetStandardMarshal.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoMarshalInterface.cs b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoMarshalInterface.cs index db3129dee9ca..114f291d4cd5 100644 --- a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoMarshalInterface.cs +++ b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoMarshalInterface.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoTaskMemAlloc.cs b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoTaskMemAlloc.cs index e51dc99550c6..9246fd3d7a06 100644 --- a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoTaskMemAlloc.cs +++ b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoTaskMemAlloc.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoUnmarshalInterface.cs b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoUnmarshalInterface.cs index 292b6129acf3..5e0ebd9210ca 100644 --- a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoUnmarshalInterface.cs +++ b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoUnmarshalInterface.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CreateStreamOnHGlobal.cs b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CreateStreamOnHGlobal.cs index b42587a161f4..1b153d786dfb 100644 --- a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CreateStreamOnHGlobal.cs +++ b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CreateStreamOnHGlobal.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.GetHGlobalFromStream.cs b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.GetHGlobalFromStream.cs index d719d3bb0644..fe17f6bebfd3 100644 --- a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.GetHGlobalFromStream.cs +++ b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.GetHGlobalFromStream.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.IStream.cs b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.IStream.cs index 63593b66823f..4687aa075040 100644 --- a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.IStream.cs +++ b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.IStream.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.STATFLAG.cs b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.STATFLAG.cs index b993c263feae..0847f1075983 100644 --- a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.STATFLAG.cs +++ b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.STATFLAG.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.STATSTG.cs b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.STATSTG.cs index dc9ceadd8451..c737f96ee744 100644 --- a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.STATSTG.cs +++ b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.STATSTG.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.STGM.cs b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.STGM.cs index e6cf479a0369..a946ed209d42 100644 --- a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.STGM.cs +++ b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.STGM.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.STGTY.cs b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.STGTY.cs index 243b0d92fd63..17be0418785a 100644 --- a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.STGTY.cs +++ b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.STGTY.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/OleAut32/Interop.SysAllocStringByteLen.cs b/src/libraries/Common/src/Interop/Windows/OleAut32/Interop.SysAllocStringByteLen.cs index 7c97ecdca7ad..9869497d7172 100644 --- a/src/libraries/Common/src/Interop/Windows/OleAut32/Interop.SysAllocStringByteLen.cs +++ b/src/libraries/Common/src/Interop/Windows/OleAut32/Interop.SysAllocStringByteLen.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/OleAut32/Interop.SysAllocStringLen.cs b/src/libraries/Common/src/Interop/Windows/OleAut32/Interop.SysAllocStringLen.cs index d33ecfe3e89e..43e1c633c9e1 100644 --- a/src/libraries/Common/src/Interop/Windows/OleAut32/Interop.SysAllocStringLen.cs +++ b/src/libraries/Common/src/Interop/Windows/OleAut32/Interop.SysAllocStringLen.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/OleAut32/Interop.SysFreeString.cs b/src/libraries/Common/src/Interop/Windows/OleAut32/Interop.SysFreeString.cs index fea22df406a4..8c02bcfa4f83 100644 --- a/src/libraries/Common/src/Interop/Windows/OleAut32/Interop.SysFreeString.cs +++ b/src/libraries/Common/src/Interop/Windows/OleAut32/Interop.SysFreeString.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/OleAut32/Interop.VariantClear.cs b/src/libraries/Common/src/Interop/Windows/OleAut32/Interop.VariantClear.cs index d409ea645dc3..ce046b72ce1a 100644 --- a/src/libraries/Common/src/Interop/Windows/OleAut32/Interop.VariantClear.cs +++ b/src/libraries/Common/src/Interop/Windows/OleAut32/Interop.VariantClear.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/PerfCounter/Interop.FormatFromRawValue.cs b/src/libraries/Common/src/Interop/Windows/PerfCounter/Interop.FormatFromRawValue.cs index dcac3a7ec2c4..f20fc3d32921 100644 --- a/src/libraries/Common/src/Interop/Windows/PerfCounter/Interop.FormatFromRawValue.cs +++ b/src/libraries/Common/src/Interop/Windows/PerfCounter/Interop.FormatFromRawValue.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/PerfCounter/Interop.PerformanceData.cs b/src/libraries/Common/src/Interop/Windows/PerfCounter/Interop.PerformanceData.cs index e54e677bab8c..cf6e20f9b149 100644 --- a/src/libraries/Common/src/Interop/Windows/PerfCounter/Interop.PerformanceData.cs +++ b/src/libraries/Common/src/Interop/Windows/PerfCounter/Interop.PerformanceData.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/SChannel/Interop.Alerts.cs b/src/libraries/Common/src/Interop/Windows/SChannel/Interop.Alerts.cs index f96108898def..e0caca208c3a 100644 --- a/src/libraries/Common/src/Interop/Windows/SChannel/Interop.Alerts.cs +++ b/src/libraries/Common/src/Interop/Windows/SChannel/Interop.Alerts.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/SChannel/Interop.SECURITY_STATUS.cs b/src/libraries/Common/src/Interop/Windows/SChannel/Interop.SECURITY_STATUS.cs index 5860bfa98b6f..05b201c77fac 100644 --- a/src/libraries/Common/src/Interop/Windows/SChannel/Interop.SECURITY_STATUS.cs +++ b/src/libraries/Common/src/Interop/Windows/SChannel/Interop.SECURITY_STATUS.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { @@ -52,310 +51,4 @@ internal enum SECURITY_STATUS DowngradeDetected = unchecked((int)0x80090350), ApplicationProtocolMismatch = unchecked((int)0x80090367), } - -#if TRACE_VERBOSE - internal static string MapSecurityStatus(uint statusCode) - { - switch (statusCode) - { - case 0: return "0"; - case 0x80090001: return "NTE_BAD_UID"; - case 0x80090002: return "NTE_BAD_HASH"; - case 0x80090003: return "NTE_BAD_KEY"; - case 0x80090004: return "NTE_BAD_LEN"; - case 0x80090005: return "NTE_BAD_DATA"; - case 0x80090006: return "NTE_BAD_SIGNATURE"; - case 0x80090007: return "NTE_BAD_VER"; - case 0x80090008: return "NTE_BAD_ALGID"; - case 0x80090009: return "NTE_BAD_FLAGS"; - case 0x8009000A: return "NTE_BAD_TYPE"; - case 0x8009000B: return "NTE_BAD_KEY_STATE"; - case 0x8009000C: return "NTE_BAD_HASH_STATE"; - case 0x8009000D: return "NTE_NO_KEY"; - case 0x8009000E: return "NTE_NO_MEMORY"; - case 0x8009000F: return "NTE_EXISTS"; - case 0x80090010: return "NTE_PERM"; - case 0x80090011: return "NTE_NOT_FOUND"; - case 0x80090012: return "NTE_DOUBLE_ENCRYPT"; - case 0x80090013: return "NTE_BAD_PROVIDER"; - case 0x80090014: return "NTE_BAD_PROV_TYPE"; - case 0x80090015: return "NTE_BAD_PUBLIC_KEY"; - case 0x80090016: return "NTE_BAD_KEYSET"; - case 0x80090017: return "NTE_PROV_TYPE_NOT_DEF"; - case 0x80090018: return "NTE_PROV_TYPE_ENTRY_BAD"; - case 0x80090019: return "NTE_KEYSET_NOT_DEF"; - case 0x8009001A: return "NTE_KEYSET_ENTRY_BAD"; - case 0x8009001B: return "NTE_PROV_TYPE_NO_MATCH"; - case 0x8009001C: return "NTE_SIGNATURE_FILE_BAD"; - case 0x8009001D: return "NTE_PROVIDER_DLL_FAIL"; - case 0x8009001E: return "NTE_PROV_DLL_NOT_FOUND"; - case 0x8009001F: return "NTE_BAD_KEYSET_PARAM"; - case 0x80090020: return "NTE_FAIL"; - case 0x80090021: return "NTE_SYS_ERR"; - case 0x80090022: return "NTE_SILENT_CONTEXT"; - case 0x80090023: return "NTE_TOKEN_KEYSET_STORAGE_FULL"; - case 0x80090024: return "NTE_TEMPORARY_PROFILE"; - case 0x80090025: return "NTE_FIXEDPARAMETER"; - case 0x80090300: return "SEC_E_INSUFFICIENT_MEMORY"; - case 0x80090301: return "SEC_E_INVALID_HANDLE"; - case 0x80090302: return "SEC_E_UNSUPPORTED_FUNCTION"; - case 0x80090303: return "SEC_E_TARGET_UNKNOWN"; - case 0x80090304: return "SEC_E_INTERNAL_ERROR"; - case 0x80090305: return "SEC_E_SECPKG_NOT_FOUND"; - case 0x80090306: return "SEC_E_NOT_OWNER"; - case 0x80090307: return "SEC_E_CANNOT_INSTALL"; - case 0x80090308: return "SEC_E_INVALID_TOKEN"; - case 0x80090309: return "SEC_E_CANNOT_PACK"; - case 0x8009030A: return "SEC_E_QOP_NOT_SUPPORTED"; - case 0x8009030B: return "SEC_E_NO_IMPERSONATION"; - case 0x8009030C: return "SEC_E_LOGON_DENIED"; - case 0x8009030D: return "SEC_E_UNKNOWN_CREDENTIALS"; - case 0x8009030E: return "SEC_E_NO_CREDENTIALS"; - case 0x8009030F: return "SEC_E_MESSAGE_ALTERED"; - case 0x80090310: return "SEC_E_OUT_OF_SEQUENCE"; - case 0x80090311: return "SEC_E_NO_AUTHENTICATING_AUTHORITY"; - case 0x00090312: return "SEC_I_CONTINUE_NEEDED"; - case 0x00090313: return "SEC_I_COMPLETE_NEEDED"; - case 0x00090314: return "SEC_I_COMPLETE_AND_CONTINUE"; - case 0x00090315: return "SEC_I_LOCAL_LOGON"; - case 0x80090316: return "SEC_E_BAD_PKGID"; - case 0x80090317: return "SEC_E_CONTEXT_EXPIRED"; - case 0x00090317: return "SEC_I_CONTEXT_EXPIRED"; - case 0x80090318: return "SEC_E_INCOMPLETE_MESSAGE"; - case 0x80090320: return "SEC_E_INCOMPLETE_CREDENTIALS"; - case 0x80090321: return "SEC_E_BUFFER_TOO_SMALL"; - case 0x00090320: return "SEC_I_INCOMPLETE_CREDENTIALS"; - case 0x00090321: return "SEC_I_RENEGOTIATE"; - case 0x80090322: return "SEC_E_WRONG_PRINCIPAL"; - case 0x00090323: return "SEC_I_NO_LSA_CONTEXT"; - case 0x80090324: return "SEC_E_TIME_SKEW"; - case 0x80090325: return "SEC_E_UNTRUSTED_ROOT"; - case 0x80090326: return "SEC_E_ILLEGAL_MESSAGE"; - case 0x80090327: return "SEC_E_CERT_UNKNOWN"; - case 0x80090328: return "SEC_E_CERT_EXPIRED"; - case 0x80090329: return "SEC_E_ENCRYPT_FAILURE"; - case 0x80090330: return "SEC_E_DECRYPT_FAILURE"; - case 0x80090331: return "SEC_E_ALGORITHM_MISMATCH"; - case 0x80090332: return "SEC_E_SECURITY_QOS_FAILED"; - case 0x80090333: return "SEC_E_UNFINISHED_CONTEXT_DELETED"; - case 0x80090334: return "SEC_E_NO_TGT_REPLY"; - case 0x80090335: return "SEC_E_NO_IP_ADDRESSES"; - case 0x80090336: return "SEC_E_WRONG_CREDENTIAL_HANDLE"; - case 0x80090337: return "SEC_E_CRYPTO_SYSTEM_INVALID"; - case 0x80090338: return "SEC_E_MAX_REFERRALS_EXCEEDED"; - case 0x80090339: return "SEC_E_MUST_BE_KDC"; - case 0x8009033A: return "SEC_E_STRONG_CRYPTO_NOT_SUPPORTED"; - case 0x8009033B: return "SEC_E_TOO_MANY_PRINCIPALS"; - case 0x8009033C: return "SEC_E_NO_PA_DATA"; - case 0x8009033D: return "SEC_E_PKINIT_NAME_MISMATCH"; - case 0x8009033E: return "SEC_E_SMARTCARD_LOGON_REQUIRED"; - case 0x8009033F: return "SEC_E_SHUTDOWN_IN_PROGRESS"; - case 0x80090340: return "SEC_E_KDC_INVALID_REQUEST"; - case 0x80090341: return "SEC_E_KDC_UNABLE_TO_REFER"; - case 0x80090342: return "SEC_E_KDC_UNKNOWN_ETYPE"; - case 0x80090343: return "SEC_E_UNSUPPORTED_PREAUTH"; - case 0x80090345: return "SEC_E_DELEGATION_REQUIRED"; - case 0x80090346: return "SEC_E_BAD_BINDINGS"; - case 0x80090347: return "SEC_E_MULTIPLE_ACCOUNTS"; - case 0x80090348: return "SEC_E_NO_KERB_KEY"; - case 0x80090350: return "SEC_E_DOWNGRADE_DETECTED"; - case 0x80091001: return "CRYPT_E_MSG_ERROR"; - case 0x80091002: return "CRYPT_E_UNKNOWN_ALGO"; - case 0x80091003: return "CRYPT_E_OID_FORMAT"; - case 0x80091004: return "CRYPT_E_INVALID_MSG_TYPE"; - case 0x80091005: return "CRYPT_E_UNEXPECTED_ENCODING"; - case 0x80091006: return "CRYPT_E_AUTH_ATTR_MISSING"; - case 0x80091007: return "CRYPT_E_HASH_VALUE"; - case 0x80091008: return "CRYPT_E_INVALID_INDEX"; - case 0x80091009: return "CRYPT_E_ALREADY_DECRYPTED"; - case 0x8009100A: return "CRYPT_E_NOT_DECRYPTED"; - case 0x8009100B: return "CRYPT_E_RECIPIENT_NOT_FOUND"; - case 0x8009100C: return "CRYPT_E_CONTROL_TYPE"; - case 0x8009100D: return "CRYPT_E_ISSUER_SERIALNUMBER"; - case 0x8009100E: return "CRYPT_E_SIGNER_NOT_FOUND"; - case 0x8009100F: return "CRYPT_E_ATTRIBUTES_MISSING"; - case 0x80091010: return "CRYPT_E_STREAM_MSG_NOT_READY"; - case 0x80091011: return "CRYPT_E_STREAM_INSUFFICIENT_DATA"; - case 0x00091012: return "CRYPT_I_NEW_PROTECTION_REQUIRED"; - case 0x80092001: return "CRYPT_E_BAD_LEN"; - case 0x80092002: return "CRYPT_E_BAD_ENCODE"; - case 0x80092003: return "CRYPT_E_FILE_ERROR"; - case 0x80092004: return "CRYPT_E_NOT_FOUND"; - case 0x80092005: return "CRYPT_E_EXISTS"; - case 0x80092006: return "CRYPT_E_NO_PROVIDER"; - case 0x80092007: return "CRYPT_E_SELF_SIGNED"; - case 0x80092008: return "CRYPT_E_DELETED_PREV"; - case 0x80092009: return "CRYPT_E_NO_MATCH"; - case 0x8009200A: return "CRYPT_E_UNEXPECTED_MSG_TYPE"; - case 0x8009200B: return "CRYPT_E_NO_KEY_PROPERTY"; - case 0x8009200C: return "CRYPT_E_NO_DECRYPT_CERT"; - case 0x8009200D: return "CRYPT_E_BAD_MSG"; - case 0x8009200E: return "CRYPT_E_NO_SIGNER"; - case 0x8009200F: return "CRYPT_E_PENDING_CLOSE"; - case 0x80092010: return "CRYPT_E_REVOKED"; - case 0x80092011: return "CRYPT_E_NO_REVOCATION_DLL"; - case 0x80092012: return "CRYPT_E_NO_REVOCATION_CHECK"; - case 0x80092013: return "CRYPT_E_REVOCATION_OFFLINE"; - case 0x80092014: return "CRYPT_E_NOT_IN_REVOCATION_DATABASE"; - case 0x80092020: return "CRYPT_E_INVALID_NUMERIC_STRING"; - case 0x80092021: return "CRYPT_E_INVALID_PRINTABLE_STRING"; - case 0x80092022: return "CRYPT_E_INVALID_IA5_STRING"; - case 0x80092023: return "CRYPT_E_INVALID_X500_STRING"; - case 0x80092024: return "CRYPT_E_NOT_CHAR_STRING"; - case 0x80092025: return "CRYPT_E_FILERESIZED"; - case 0x80092026: return "CRYPT_E_SECURITY_SETTINGS"; - case 0x80092027: return "CRYPT_E_NO_VERIFY_USAGE_DLL"; - case 0x80092028: return "CRYPT_E_NO_VERIFY_USAGE_CHECK"; - case 0x80092029: return "CRYPT_E_VERIFY_USAGE_OFFLINE"; - case 0x8009202A: return "CRYPT_E_NOT_IN_CTL"; - case 0x8009202B: return "CRYPT_E_NO_TRUSTED_SIGNER"; - case 0x8009202C: return "CRYPT_E_MISSING_PUBKEY_PARA"; - case 0x80093000: return "CRYPT_E_OSS_ERROR"; - case 0x80093001: return "OSS_MORE_BUF"; - case 0x80093002: return "OSS_NEGATIVE_UINTEGER"; - case 0x80093003: return "OSS_PDU_RANGE"; - case 0x80093004: return "OSS_MORE_INPUT"; - case 0x80093005: return "OSS_DATA_ERROR"; - case 0x80093006: return "OSS_BAD_ARG"; - case 0x80093007: return "OSS_BAD_VERSION"; - case 0x80093008: return "OSS_OUT_MEMORY"; - case 0x80093009: return "OSS_PDU_MISMATCH"; - case 0x8009300A: return "OSS_LIMITED"; - case 0x8009300B: return "OSS_BAD_PTR"; - case 0x8009300C: return "OSS_BAD_TIME"; - case 0x8009300D: return "OSS_INDEFINITE_NOT_SUPPORTED"; - case 0x8009300E: return "OSS_MEM_ERROR"; - case 0x8009300F: return "OSS_BAD_TABLE"; - case 0x80093010: return "OSS_TOO_LONG"; - case 0x80093011: return "OSS_CONSTRAINT_VIOLATED"; - case 0x80093012: return "OSS_FATAL_ERROR"; - case 0x80093013: return "OSS_ACCESS_SERIALIZATION_ERROR"; - case 0x80093014: return "OSS_NULL_TBL"; - case 0x80093015: return "OSS_NULL_FCN"; - case 0x80093016: return "OSS_BAD_ENCRULES"; - case 0x80093017: return "OSS_UNAVAIL_ENCRULES"; - case 0x80093018: return "OSS_CANT_OPEN_TRACE_WINDOW"; - case 0x80093019: return "OSS_UNIMPLEMENTED"; - case 0x8009301A: return "OSS_OID_DLL_NOT_LINKED"; - case 0x8009301B: return "OSS_CANT_OPEN_TRACE_FILE"; - case 0x8009301C: return "OSS_TRACE_FILE_ALREADY_OPEN"; - case 0x8009301D: return "OSS_TABLE_MISMATCH"; - case 0x8009301E: return "OSS_TYPE_NOT_SUPPORTED"; - case 0x8009301F: return "OSS_REAL_DLL_NOT_LINKED"; - case 0x80093020: return "OSS_REAL_CODE_NOT_LINKED"; - case 0x80093021: return "OSS_OUT_OF_RANGE"; - case 0x80093022: return "OSS_COPIER_DLL_NOT_LINKED"; - case 0x80093023: return "OSS_CONSTRAINT_DLL_NOT_LINKED"; - case 0x80093024: return "OSS_COMPARATOR_DLL_NOT_LINKED"; - case 0x80093025: return "OSS_COMPARATOR_CODE_NOT_LINKED"; - case 0x80093026: return "OSS_MEM_MGR_DLL_NOT_LINKED"; - case 0x80093027: return "OSS_PDV_DLL_NOT_LINKED"; - case 0x80093028: return "OSS_PDV_CODE_NOT_LINKED"; - case 0x80093029: return "OSS_API_DLL_NOT_LINKED"; - case 0x8009302A: return "OSS_BERDER_DLL_NOT_LINKED"; - case 0x8009302B: return "OSS_PER_DLL_NOT_LINKED"; - case 0x8009302C: return "OSS_OPEN_TYPE_ERROR"; - case 0x8009302D: return "OSS_MUTEX_NOT_CREATED"; - case 0x8009302E: return "OSS_CANT_CLOSE_TRACE_FILE"; - case 0x80093100: return "CRYPT_E_ASN1_ERROR"; - case 0x80093101: return "CRYPT_E_ASN1_INTERNAL"; - case 0x80093102: return "CRYPT_E_ASN1_EOD"; - case 0x80093103: return "CRYPT_E_ASN1_CORRUPT"; - case 0x80093104: return "CRYPT_E_ASN1_LARGE"; - case 0x80093105: return "CRYPT_E_ASN1_CONSTRAINT"; - case 0x80093106: return "CRYPT_E_ASN1_MEMORY"; - case 0x80093107: return "CRYPT_E_ASN1_OVERFLOW"; - case 0x80093108: return "CRYPT_E_ASN1_BADPDU"; - case 0x80093109: return "CRYPT_E_ASN1_BADARGS"; - case 0x8009310A: return "CRYPT_E_ASN1_BADREAL"; - case 0x8009310B: return "CRYPT_E_ASN1_BADTAG"; - case 0x8009310C: return "CRYPT_E_ASN1_CHOICE"; - case 0x8009310D: return "CRYPT_E_ASN1_RULE"; - case 0x8009310E: return "CRYPT_E_ASN1_UTF8"; - case 0x80093133: return "CRYPT_E_ASN1_PDU_TYPE"; - case 0x80093134: return "CRYPT_E_ASN1_NYI"; - case 0x80093201: return "CRYPT_E_ASN1_EXTENDED"; - case 0x80093202: return "CRYPT_E_ASN1_NOEOD"; - case 0x80094001: return "CERTSRV_E_BAD_REQUESTSUBJECT"; - case 0x80094002: return "CERTSRV_E_NO_REQUEST"; - case 0x80094003: return "CERTSRV_E_BAD_REQUESTSTATUS"; - case 0x80094004: return "CERTSRV_E_PROPERTY_EMPTY"; - case 0x80094005: return "CERTSRV_E_INVALID_CA_CERTIFICATE"; - case 0x80094006: return "CERTSRV_E_SERVER_SUSPENDED"; - case 0x80094007: return "CERTSRV_E_ENCODING_LENGTH"; - case 0x80094008: return "CERTSRV_E_ROLECONFLICT"; - case 0x80094009: return "CERTSRV_E_RESTRICTEDOFFICER"; - case 0x8009400A: return "CERTSRV_E_KEY_ARCHIVAL_NOT_CONFIGURED"; - case 0x8009400B: return "CERTSRV_E_NO_VALID_KRA"; - case 0x8009400C: return "CERTSRV_E_BAD_REQUEST_KEY_ARCHIVAL"; - case 0x80094800: return "CERTSRV_E_UNSUPPORTED_CERT_TYPE"; - case 0x80094801: return "CERTSRV_E_NO_CERT_TYPE"; - case 0x80094802: return "CERTSRV_E_TEMPLATE_CONFLICT"; - case 0x80096001: return "TRUST_E_SYSTEM_ERROR"; - case 0x80096002: return "TRUST_E_NO_SIGNER_CERT"; - case 0x80096003: return "TRUST_E_COUNTER_SIGNER"; - case 0x80096004: return "TRUST_E_CERT_SIGNATURE"; - case 0x80096005: return "TRUST_E_TIME_STAMP"; - case 0x80096010: return "TRUST_E_BAD_DIGEST"; - case 0x80096019: return "TRUST_E_BASIC_CONSTRAINTS"; - case 0x8009601E: return "TRUST_E_FINANCIAL_CRITERIA"; - case 0x80097001: return "MSSIPOTF_E_OUTOFMEMRANGE"; - case 0x80097002: return "MSSIPOTF_E_CANTGETOBJECT"; - case 0x80097003: return "MSSIPOTF_E_NOHEADTABLE"; - case 0x80097004: return "MSSIPOTF_E_BAD_MAGICNUMBER"; - case 0x80097005: return "MSSIPOTF_E_BAD_OFFSET_TABLE"; - case 0x80097006: return "MSSIPOTF_E_TABLE_TAGORDER"; - case 0x80097007: return "MSSIPOTF_E_TABLE_LONGWORD"; - case 0x80097008: return "MSSIPOTF_E_BAD_FIRST_TABLE_PLACEMENT"; - case 0x80097009: return "MSSIPOTF_E_TABLES_OVERLAP"; - case 0x8009700A: return "MSSIPOTF_E_TABLE_PADBYTES"; - case 0x8009700B: return "MSSIPOTF_E_FILETOOSMALL"; - case 0x8009700C: return "MSSIPOTF_E_TABLE_CHECKSUM"; - case 0x8009700D: return "MSSIPOTF_E_FILE_CHECKSUM"; - case 0x80097010: return "MSSIPOTF_E_FAILED_POLICY"; - case 0x80097011: return "MSSIPOTF_E_FAILED_HINTS_CHECK"; - case 0x80097012: return "MSSIPOTF_E_NOT_OPENTYPE"; - case 0x80097013: return "MSSIPOTF_E_FILE"; - case 0x80097014: return "MSSIPOTF_E_CRYPT"; - case 0x80097015: return "MSSIPOTF_E_BADVERSION"; - case 0x80097016: return "MSSIPOTF_E_DSIG_STRUCTURE"; - case 0x80097017: return "MSSIPOTF_E_PCONST_CHECK"; - case 0x80097018: return "MSSIPOTF_E_STRUCTURE"; - case 0x800B0001: return "TRUST_E_PROVIDER_UNKNOWN"; - case 0x800B0002: return "TRUST_E_ACTION_UNKNOWN"; - case 0x800B0003: return "TRUST_E_SUBJECT_FORM_UNKNOWN"; - case 0x800B0004: return "TRUST_E_SUBJECT_NOT_TRUSTED"; - case 0x800B0005: return "DIGSIG_E_ENCODE"; - case 0x800B0006: return "DIGSIG_E_DECODE"; - case 0x800B0007: return "DIGSIG_E_EXTENSIBILITY"; - case 0x800B0008: return "DIGSIG_E_CRYPTO"; - case 0x800B0009: return "PERSIST_E_SIZEDEFINITE"; - case 0x800B000A: return "PERSIST_E_SIZEINDEFINITE"; - case 0x800B000B: return "PERSIST_E_NOTSELFSIZING"; - case 0x800B0100: return "TRUST_E_NOSIGNATURE"; - case 0x800B0101: return "CERT_E_EXPIRED"; - case 0x800B0102: return "CERT_E_VALIDITYPERIODNESTING"; - case 0x800B0103: return "CERT_E_ROLE"; - case 0x800B0104: return "CERT_E_PATHLENCONST"; - case 0x800B0105: return "CERT_E_CRITICAL"; - case 0x800B0106: return "CERT_E_PURPOSE"; - case 0x800B0107: return "CERT_E_ISSUERCHAINING"; - case 0x800B0108: return "CERT_E_MALFORMED"; - case 0x800B0109: return "CERT_E_UNTRUSTEDROOT"; - case 0x800B010A: return "CERT_E_CHAINING"; - case 0x800B010B: return "TRUST_E_FAIL"; - case 0x800B010C: return "CERT_E_REVOKED"; - case 0x800B010D: return "CERT_E_UNTRUSTEDTESTROOT"; - case 0x800B010E: return "CERT_E_REVOCATION_FAILURE"; - case 0x800B010F: return "CERT_E_CN_NO_MATCH"; - case 0x800B0110: return "CERT_E_WRONG_USAGE"; - case 0x800B0111: return "TRUST_E_EXPLICIT_DISTRUST"; - case 0x800B0112: return "CERT_E_UNTRUSTEDCA"; - case 0x800B0113: return "CERT_E_INVALID_POLICY"; - case 0x800B0114: return "CERT_E_INVALID_NAME"; - } - - return string.Format("0x{0:x} [{1}]", statusCode, statusCode); - } -#endif // TRACE_VERBOSE } diff --git a/src/libraries/Common/src/Interop/Windows/SChannel/Interop.SchProtocols.cs b/src/libraries/Common/src/Interop/Windows/SChannel/Interop.SchProtocols.cs index ad699216b800..e6251827ed64 100644 --- a/src/libraries/Common/src/Interop/Windows/SChannel/Interop.SchProtocols.cs +++ b/src/libraries/Common/src/Interop/Windows/SChannel/Interop.SchProtocols.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/SChannel/Interop.SecPkgContext_ApplicationProtocol.cs b/src/libraries/Common/src/Interop/Windows/SChannel/Interop.SecPkgContext_ApplicationProtocol.cs index 4f68e3dee2fb..532872489fe4 100644 --- a/src/libraries/Common/src/Interop/Windows/SChannel/Interop.SecPkgContext_ApplicationProtocol.cs +++ b/src/libraries/Common/src/Interop/Windows/SChannel/Interop.SecPkgContext_ApplicationProtocol.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/SChannel/Interop.Sec_Application_Protocols.cs b/src/libraries/Common/src/Interop/Windows/SChannel/Interop.Sec_Application_Protocols.cs index 08407d652bc5..32f799d31210 100644 --- a/src/libraries/Common/src/Interop/Windows/SChannel/Interop.Sec_Application_Protocols.cs +++ b/src/libraries/Common/src/Interop/Windows/SChannel/Interop.Sec_Application_Protocols.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/src/Interop/Windows/SChannel/SecPkgContext_CipherInfo.cs b/src/libraries/Common/src/Interop/Windows/SChannel/SecPkgContext_CipherInfo.cs index 6dd020ffc5b6..d8c8a52b77d2 100644 --- a/src/libraries/Common/src/Interop/Windows/SChannel/SecPkgContext_CipherInfo.cs +++ b/src/libraries/Common/src/Interop/Windows/SChannel/SecPkgContext_CipherInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/SChannel/SecPkgContext_ConnectionInfo.cs b/src/libraries/Common/src/Interop/Windows/SChannel/SecPkgContext_ConnectionInfo.cs index 5e4b8815ba31..96e9d091760b 100644 --- a/src/libraries/Common/src/Interop/Windows/SChannel/SecPkgContext_ConnectionInfo.cs +++ b/src/libraries/Common/src/Interop/Windows/SChannel/SecPkgContext_ConnectionInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/SChannel/UnmanagedCertificateContext.IntPtr.cs b/src/libraries/Common/src/Interop/Windows/SChannel/UnmanagedCertificateContext.IntPtr.cs index 9168258279c0..5d937acaf039 100644 --- a/src/libraries/Common/src/Interop/Windows/SChannel/UnmanagedCertificateContext.IntPtr.cs +++ b/src/libraries/Common/src/Interop/Windows/SChannel/UnmanagedCertificateContext.IntPtr.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Net.Security; @@ -41,7 +40,7 @@ internal static X509Certificate2Collection GetRemoteCertificatesFromStoreContext } var cert = new X509Certificate2(new IntPtr(next)); - if (NetEventSource.IsEnabled) NetEventSource.Info(certContext, $"Adding remote certificate:{cert}"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(certContext, $"Adding remote certificate:{cert}"); result.Add(cert); last = next; diff --git a/src/libraries/Common/src/Interop/Windows/SChannel/UnmanagedCertificateContext.cs b/src/libraries/Common/src/Interop/Windows/SChannel/UnmanagedCertificateContext.cs index 73b856ff2188..cfac8ca34716 100644 --- a/src/libraries/Common/src/Interop/Windows/SChannel/UnmanagedCertificateContext.cs +++ b/src/libraries/Common/src/Interop/Windows/SChannel/UnmanagedCertificateContext.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Net.Security; diff --git a/src/libraries/Common/src/Interop/Windows/Secur32/Interop.GetUserNameExW.cs b/src/libraries/Common/src/Interop/Windows/Secur32/Interop.GetUserNameExW.cs index 7001cd6df09e..c0ac51596ca5 100644 --- a/src/libraries/Common/src/Interop/Windows/Secur32/Interop.GetUserNameExW.cs +++ b/src/libraries/Common/src/Interop/Windows/Secur32/Interop.GetUserNameExW.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Shell32/Interop.SHGetKnownFolderPath.cs b/src/libraries/Common/src/Interop/Windows/Shell32/Interop.SHGetKnownFolderPath.cs index 3e72b01e1f67..d224d2821f2f 100644 --- a/src/libraries/Common/src/Interop/Windows/Shell32/Interop.SHGetKnownFolderPath.cs +++ b/src/libraries/Common/src/Interop/Windows/Shell32/Interop.SHGetKnownFolderPath.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Shell32/Interop.ShellExecuteExW.cs b/src/libraries/Common/src/Interop/Windows/Shell32/Interop.ShellExecuteExW.cs index 0a32a1cd4f3d..3acd2cb7dbb5 100644 --- a/src/libraries/Common/src/Interop/Windows/Shell32/Interop.ShellExecuteExW.cs +++ b/src/libraries/Common/src/Interop/Windows/Shell32/Interop.ShellExecuteExW.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/GlobalSSPI.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/GlobalSSPI.cs index 4ae2a3e0e67e..66d3fb7db803 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/GlobalSSPI.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/GlobalSSPI.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net { diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/ISSPIInterface.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/ISSPIInterface.cs index ee81875cee83..b1d82a736d58 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/ISSPIInterface.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/ISSPIInterface.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Net.Security; diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.AuthenticationPackageNames.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.AuthenticationPackageNames.cs index 39882241cfc7..db30fa63fca9 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.AuthenticationPackageNames.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.AuthenticationPackageNames.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.KerbLogonSubmitType.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.KerbLogonSubmitType.cs index fd355467a2cd..ba0090f523f0 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.KerbLogonSubmitType.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.KerbLogonSubmitType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.KerbS4uLogin.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.KerbS4uLogin.cs index 2e9dd978554b..02f94e1e12dc 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.KerbS4uLogin.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.KerbS4uLogin.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LSAStructs.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LSAStructs.cs index ad871b2366c2..724443efa019 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LSAStructs.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LSAStructs.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; using System; diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LsaConnectUntrusted.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LsaConnectUntrusted.cs index 5355060c71a8..d2c486ed1129 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LsaConnectUntrusted.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LsaConnectUntrusted.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LsaDeregisterLogonProcess.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LsaDeregisterLogonProcess.cs index 34a7f9d8e482..aef62f926e24 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LsaDeregisterLogonProcess.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LsaDeregisterLogonProcess.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LsaFreeReturnBuffer.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LsaFreeReturnBuffer.cs index 4cb13e7396fb..1b0349ec02d8 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LsaFreeReturnBuffer.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LsaFreeReturnBuffer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LsaGetLogonSessionData.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LsaGetLogonSessionData.cs index 67d630a48864..f002e37cdc43 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LsaGetLogonSessionData.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LsaGetLogonSessionData.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LsaLogonUser.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LsaLogonUser.cs index 268688c42de4..0fe7d4300284 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LsaLogonUser.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LsaLogonUser.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LsaLookupAuthenticationPackage.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LsaLookupAuthenticationPackage.cs index 60802408a28f..cc394dde97f8 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LsaLookupAuthenticationPackage.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LsaLookupAuthenticationPackage.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.QuotaLimits.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.QuotaLimits.cs index 7e8f6b0bafd9..6e0b89654d47 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.QuotaLimits.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.QuotaLimits.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.SECURITY_LOGON_SESSION_DATA.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.SECURITY_LOGON_SESSION_DATA.cs index f8f368bafa57..30fb45a01d4c 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.SECURITY_LOGON_SESSION_DATA.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.SECURITY_LOGON_SESSION_DATA.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.SSPI.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.SSPI.cs index 61ca04f896cd..9db80f3ae965 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.SSPI.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.SSPI.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.SecurityLogonType.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.SecurityLogonType.cs index 8c27d02b7044..f07e493ea11c 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.SecurityLogonType.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.SecurityLogonType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.TOKENS.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.TOKENS.cs index cfdc3a835d17..00a32bfb5ef0 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.TOKENS.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.TOKENS.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.TokenSource.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.TokenSource.cs index 278e18ae202f..330362a7ce06 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.TokenSource.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.TokenSource.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.Winnt.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.Winnt.cs index e94ce911f099..325b749980fd 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.Winnt.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.Winnt.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/NegotiationInfoClass.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/NegotiationInfoClass.cs index 6cce8e0c31e9..957c1f69d0a6 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/NegotiationInfoClass.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/NegotiationInfoClass.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Runtime.InteropServices; @@ -15,7 +14,7 @@ internal static partial class NegotiationInfoClass { if (safeHandle.IsInvalid) { - if (NetEventSource.IsEnabled) NetEventSource.Info(null, $"Invalid handle:{safeHandle}"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(null, $"Invalid handle:{safeHandle}"); return null; } @@ -24,7 +23,7 @@ internal static partial class NegotiationInfoClass { safeHandle.DangerousAddRef(ref gotRef); IntPtr packageInfo = safeHandle.DangerousGetHandle(); - if (NetEventSource.IsEnabled) NetEventSource.Info(null, $"packageInfo:{packageInfo} negotiationState:{negotiationState:x}"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(null, $"packageInfo:{packageInfo} negotiationState:{negotiationState:x}"); if (negotiationState == Interop.SspiCli.SECPKG_NEGOTIATION_COMPLETE || negotiationState == Interop.SspiCli.SECPKG_NEGOTIATION_OPTIMISTIC) @@ -35,7 +34,7 @@ internal static partial class NegotiationInfoClass name = Marshal.PtrToStringUni(((SecurityPackageInfo*)packageInfo)->Name); } - if (NetEventSource.IsEnabled) NetEventSource.Info(null, $"packageInfo:{packageInfo} negotiationState:{negotiationState:x} name:{name}"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(null, $"packageInfo:{packageInfo} negotiationState:{negotiationState:x} name:{name}"); // An optimization for future string comparisons. return diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/SSPIAuthType.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/SSPIAuthType.cs index f5a06cc9b65f..a29658dd67c4 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/SSPIAuthType.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/SSPIAuthType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Net.Security; @@ -27,7 +26,7 @@ public SecurityPackageInfoClass[]? SecurityPackages public int EnumerateSecurityPackages(out int pkgnum, out SafeFreeContextBuffer pkgArray) { - if (NetEventSource.IsEnabled) NetEventSource.Info(this); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this); return SafeFreeContextBuffer.EnumeratePackages(out pkgnum, out pkgArray); } diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/SSPISecureChannelType.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/SSPISecureChannelType.cs index ff73238161ba..0e9bc6275aa9 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/SSPISecureChannelType.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/SSPISecureChannelType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Net.Security; @@ -27,7 +26,7 @@ public SecurityPackageInfoClass[]? SecurityPackages public int EnumerateSecurityPackages(out int pkgnum, out SafeFreeContextBuffer pkgArray) { - if (NetEventSource.IsEnabled) NetEventSource.Info(this); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this); return SafeFreeContextBuffer.EnumeratePackages(out pkgnum, out pkgArray); } diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/SSPIWrapper.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/SSPIWrapper.cs index a0d73e1a4bc4..74772416a15c 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/SSPIWrapper.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/SSPIWrapper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.ComponentModel; @@ -15,8 +14,6 @@ internal static class SSPIWrapper { internal static SecurityPackageInfoClass[] EnumerateSecurityPackages(ISSPIInterface secModule) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(null); - if (secModule.SecurityPackages == null) { lock (secModule) @@ -28,7 +25,7 @@ internal static SecurityPackageInfoClass[] EnumerateSecurityPackages(ISSPIInterf try { int errorCode = secModule.EnumerateSecurityPackages(out moduleCount, out arrayBaseHandle); - if (NetEventSource.IsEnabled) NetEventSource.Info(null, $"arrayBase: {arrayBaseHandle}"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(null, $"arrayBase: {arrayBaseHandle}"); if (errorCode != 0) { throw new Win32Exception(errorCode); @@ -40,7 +37,7 @@ internal static SecurityPackageInfoClass[] EnumerateSecurityPackages(ISSPIInterf for (i = 0; i < moduleCount; i++) { securityPackages[i] = new SecurityPackageInfoClass(arrayBaseHandle, i); - if (NetEventSource.IsEnabled) NetEventSource.Log.EnumerateSecurityPackages(securityPackages[i].Name); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Log.EnumerateSecurityPackages(securityPackages[i].Name); } secModule.SecurityPackages = securityPackages; @@ -53,7 +50,6 @@ internal static SecurityPackageInfoClass[] EnumerateSecurityPackages(ISSPIInterf } } - if (NetEventSource.IsEnabled) NetEventSource.Exit(null); return secModule.SecurityPackages; } @@ -71,7 +67,7 @@ internal static SecurityPackageInfoClass[] EnumerateSecurityPackages(ISSPIInterf } } - if (NetEventSource.IsEnabled) NetEventSource.Log.SspiPackageNotFound(packageName); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Log.SspiPackageNotFound(packageName); if (throwIfMissing) { @@ -83,18 +79,14 @@ internal static SecurityPackageInfoClass[] EnumerateSecurityPackages(ISSPIInterf public static SafeFreeCredentials AcquireDefaultCredential(ISSPIInterface secModule, string package, Interop.SspiCli.CredentialUse intent) { - if (NetEventSource.IsEnabled) - { - NetEventSource.Enter(null, package); - NetEventSource.Log.AcquireDefaultCredential(package, intent); - } + if (NetEventSource.Log.IsEnabled()) NetEventSource.Log.AcquireDefaultCredential(package, intent); SafeFreeCredentials? outCredential = null; int errorCode = secModule.AcquireDefaultCredential(package, intent, out outCredential); if (errorCode != 0) { - if (NetEventSource.IsEnabled) NetEventSource.Error(null, SR.Format(SR.net_log_operation_failed_with_error, nameof(AcquireDefaultCredential), $"0x{errorCode:X}")); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(null, SR.Format(SR.net_log_operation_failed_with_error, nameof(AcquireDefaultCredential), $"0x{errorCode:X}")); throw new Win32Exception(errorCode); } return outCredential; @@ -102,14 +94,14 @@ public static SafeFreeCredentials AcquireDefaultCredential(ISSPIInterface secMod public static SafeFreeCredentials AcquireCredentialsHandle(ISSPIInterface secModule, string package, Interop.SspiCli.CredentialUse intent, ref SafeSspiAuthDataHandle authdata) { - if (NetEventSource.IsEnabled) NetEventSource.Log.AcquireCredentialsHandle(package, intent, authdata); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Log.AcquireCredentialsHandle(package, intent, authdata); SafeFreeCredentials? credentialsHandle = null; int errorCode = secModule.AcquireCredentialsHandle(package, intent, ref authdata, out credentialsHandle); if (errorCode != 0) { - if (NetEventSource.IsEnabled) NetEventSource.Error(null, SR.Format(SR.net_log_operation_failed_with_error, nameof(AcquireCredentialsHandle), $"0x{errorCode:X}")); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(null, SR.Format(SR.net_log_operation_failed_with_error, nameof(AcquireCredentialsHandle), $"0x{errorCode:X}")); throw new Win32Exception(errorCode); } @@ -118,11 +110,7 @@ public static SafeFreeCredentials AcquireCredentialsHandle(ISSPIInterface secMod public static SafeFreeCredentials AcquireCredentialsHandle(ISSPIInterface secModule, string package, Interop.SspiCli.CredentialUse intent, Interop.SspiCli.SCHANNEL_CRED scc) { - if (NetEventSource.IsEnabled) - { - NetEventSource.Enter(null, package); - NetEventSource.Log.AcquireCredentialsHandle(package, intent, scc); - } + if (NetEventSource.Log.IsEnabled()) NetEventSource.Log.AcquireCredentialsHandle(package, intent, scc); SafeFreeCredentials? outCredential = null; int errorCode = secModule.AcquireCredentialsHandle( @@ -133,32 +121,31 @@ public static SafeFreeCredentials AcquireCredentialsHandle(ISSPIInterface secMod if (errorCode != 0) { - if (NetEventSource.IsEnabled) NetEventSource.Error(null, SR.Format(SR.net_log_operation_failed_with_error, nameof(AcquireCredentialsHandle), $"0x{errorCode:X}")); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(null, SR.Format(SR.net_log_operation_failed_with_error, nameof(AcquireCredentialsHandle), $"0x{errorCode:X}")); throw new Win32Exception(errorCode); } - if (NetEventSource.IsEnabled) NetEventSource.Exit(null, outCredential); return outCredential; } internal static int InitializeSecurityContext(ISSPIInterface secModule, ref SafeFreeCredentials? credential, ref SafeDeleteSslContext? context, string? targetName, Interop.SspiCli.ContextFlags inFlags, Interop.SspiCli.Endianness datarep, InputSecurityBuffers inputBuffers, ref SecurityBuffer outputBuffer, ref Interop.SspiCli.ContextFlags outFlags) { - if (NetEventSource.IsEnabled) NetEventSource.Log.InitializeSecurityContext(credential, context, targetName, inFlags); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Log.InitializeSecurityContext(credential, context, targetName, inFlags); int errorCode = secModule.InitializeSecurityContext(ref credential, ref context, targetName, inFlags, datarep, inputBuffers, ref outputBuffer, ref outFlags); - if (NetEventSource.IsEnabled) NetEventSource.Log.SecurityContextInputBuffers(nameof(InitializeSecurityContext), inputBuffers.Count, outputBuffer.size, (Interop.SECURITY_STATUS)errorCode); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Log.SecurityContextInputBuffers(nameof(InitializeSecurityContext), inputBuffers.Count, outputBuffer.size, (Interop.SECURITY_STATUS)errorCode); return errorCode; } internal static int AcceptSecurityContext(ISSPIInterface secModule, SafeFreeCredentials? credential, ref SafeDeleteSslContext? context, Interop.SspiCli.ContextFlags inFlags, Interop.SspiCli.Endianness datarep, InputSecurityBuffers inputBuffers, ref SecurityBuffer outputBuffer, ref Interop.SspiCli.ContextFlags outFlags) { - if (NetEventSource.IsEnabled) NetEventSource.Log.AcceptSecurityContext(credential, context, inFlags); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Log.AcceptSecurityContext(credential, context, inFlags); int errorCode = secModule.AcceptSecurityContext(credential, ref context, inputBuffers, inFlags, datarep, ref outputBuffer, ref outFlags); - if (NetEventSource.IsEnabled) NetEventSource.Log.SecurityContextInputBuffers(nameof(AcceptSecurityContext), inputBuffers.Count, outputBuffer.size, (Interop.SECURITY_STATUS)errorCode); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Log.SecurityContextInputBuffers(nameof(AcceptSecurityContext), inputBuffers.Count, outputBuffer.size, (Interop.SECURITY_STATUS)errorCode); return errorCode; } @@ -167,7 +154,7 @@ internal static int CompleteAuthToken(ISSPIInterface secModule, ref SafeDeleteSs { int errorCode = secModule.CompleteAuthToken(ref context, in inputBuffer); - if (NetEventSource.IsEnabled) NetEventSource.Log.OperationReturnedSomething(nameof(CompleteAuthToken), (Interop.SECURITY_STATUS)errorCode); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Log.OperationReturnedSomething(nameof(CompleteAuthToken), (Interop.SECURITY_STATUS)errorCode); return errorCode; } @@ -176,7 +163,7 @@ internal static int ApplyControlToken(ISSPIInterface secModule, ref SafeDeleteCo { int errorCode = secModule.ApplyControlToken(ref context, in inputBuffer); - if (NetEventSource.IsEnabled) NetEventSource.Log.OperationReturnedSomething(nameof(ApplyControlToken), (Interop.SECURITY_STATUS)errorCode); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Log.OperationReturnedSomething(nameof(ApplyControlToken), (Interop.SECURITY_STATUS)errorCode); return errorCode; } @@ -338,7 +325,7 @@ private static unsafe int EncryptDecryptHelper(OP op, ISSPIInterface secModule, } } - if (NetEventSource.IsEnabled && errorCode != 0) + if (NetEventSource.Log.IsEnabled() && errorCode != 0) { if (errorCode == Interop.SspiCli.SEC_I_RENEGOTIATE) { @@ -356,24 +343,19 @@ private static unsafe int EncryptDecryptHelper(OP op, ISSPIInterface secModule, public static SafeFreeContextBufferChannelBinding? QueryContextChannelBinding(ISSPIInterface secModule, SafeDeleteContext securityContext, Interop.SspiCli.ContextAttribute contextAttribute) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(null, contextAttribute); - SafeFreeContextBufferChannelBinding result; int errorCode = secModule.QueryContextChannelBinding(securityContext, contextAttribute, out result); if (errorCode != 0) { - if (NetEventSource.IsEnabled) NetEventSource.Exit(null, $"ERROR = {ErrorDescription(errorCode)}"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(null, $"ERROR = {ErrorDescription(errorCode)}"); return null; } - if (NetEventSource.IsEnabled) NetEventSource.Exit(null, result); return result; } public static bool QueryBlittableContextAttributes(ISSPIInterface secModule, SafeDeleteContext securityContext, Interop.SspiCli.ContextAttribute contextAttribute, ref T attribute) where T : unmanaged { - if (NetEventSource.IsEnabled) NetEventSource.Enter(null, contextAttribute); - Span span = #if NETSTANDARD2_0 stackalloc T[1] { attribute }; @@ -393,19 +375,16 @@ public static bool QueryBlittableContextAttributes(ISSPIInterface secModule, { if (errorCode != 0) { - if (NetEventSource.IsEnabled) NetEventSource.Exit(null, $"ERROR = {ErrorDescription(errorCode)}"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(null, $"ERROR = {ErrorDescription(errorCode)}"); return false; } - if (NetEventSource.IsEnabled) NetEventSource.Exit(null, attribute); return true; } } public static bool QueryBlittableContextAttributes(ISSPIInterface secModule, SafeDeleteContext securityContext, Interop.SspiCli.ContextAttribute contextAttribute, Type safeHandleType, out SafeHandle? sspiHandle, ref T attribute) where T : unmanaged { - if (NetEventSource.IsEnabled) NetEventSource.Enter(null, contextAttribute); - Span span = #if NETSTANDARD2_0 stackalloc T[1] { attribute }; @@ -423,11 +402,10 @@ public static bool QueryBlittableContextAttributes(ISSPIInterface secModule, if (errorCode != 0) { - if (NetEventSource.IsEnabled) NetEventSource.Exit(null, $"ERROR = {ErrorDescription(errorCode)}"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(null, $"ERROR = {ErrorDescription(errorCode)}"); return false; } - if (NetEventSource.IsEnabled) NetEventSource.Exit(null, attribute); return true; } @@ -437,7 +415,6 @@ public static bool QueryBlittableContextAttributes(ISSPIInterface secModule, contextAttribute == Interop.SspiCli.ContextAttribute.SECPKG_ATTR_NAMES || contextAttribute == Interop.SspiCli.ContextAttribute.SECPKG_ATTR_CLIENT_SPECIFIED_TARGET); - if (NetEventSource.IsEnabled) NetEventSource.Enter(null, contextAttribute); Span buffer = stackalloc IntPtr[1]; int errorCode = secModule.QueryContextAttributes( @@ -453,20 +430,18 @@ public static bool QueryBlittableContextAttributes(ISSPIInterface secModule, { if (errorCode != 0) { - if (NetEventSource.IsEnabled) NetEventSource.Exit(null, $"ERROR = {ErrorDescription(errorCode)}"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(null, $"ERROR = {ErrorDescription(errorCode)}"); return null; } string? result = Marshal.PtrToStringUni(sspiHandle.DangerousGetHandle()); - if (NetEventSource.IsEnabled) NetEventSource.Exit(null, result); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(null, result); return result; } } public static SafeFreeCertContext? QueryContextAttributes_SECPKG_ATTR_REMOTE_CERT_CONTEXT(ISSPIInterface secModule, SafeDeleteContext securityContext) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(null); - Span buffer = stackalloc IntPtr[1]; int errorCode = secModule.QueryContextAttributes( securityContext, @@ -478,19 +453,16 @@ public static bool QueryBlittableContextAttributes(ISSPIInterface secModule, if (errorCode != 0) { sspiHandle?.Dispose(); - if (NetEventSource.IsEnabled) NetEventSource.Exit(null, $"ERROR = {ErrorDescription(errorCode)}"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(null, $"ERROR = {ErrorDescription(errorCode)}"); return null; } var result = (SafeFreeCertContext)sspiHandle!; - if (NetEventSource.IsEnabled) NetEventSource.Exit(null, result); return result; } public static bool QueryContextAttributes_SECPKG_ATTR_ISSUER_LIST_EX(ISSPIInterface secModule, SafeDeleteContext securityContext, ref Interop.SspiCli.SecPkgContext_IssuerListInfoEx ctx, out SafeHandle? sspiHandle) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(null); - Span buffer = #if NETSTANDARD2_0 stackalloc Interop.SspiCli.SecPkgContext_IssuerListInfoEx[1] { ctx }; @@ -509,11 +481,10 @@ public static bool QueryContextAttributes_SECPKG_ATTR_ISSUER_LIST_EX(ISSPIInterf if (errorCode != 0) { - if (NetEventSource.IsEnabled) NetEventSource.Exit(null, $"ERROR = {ErrorDescription(errorCode)}"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(null, $"ERROR = {ErrorDescription(errorCode)}"); return false; } - if (NetEventSource.IsEnabled) NetEventSource.Exit(null, ctx); return true; } diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/SafeDeleteContext.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/SafeDeleteContext.cs index ab509c453068..769c781176b0 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/SafeDeleteContext.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/SafeDeleteContext.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/SecPkgContext_Bindings.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/SecPkgContext_Bindings.cs index eb31544de178..c3fef030bd55 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/SecPkgContext_Bindings.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/SecPkgContext_Bindings.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/SecPkgContext_NegotiationInfoW.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/SecPkgContext_NegotiationInfoW.cs index 4dc03b53a692..ae2d8868a8e5 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/SecPkgContext_NegotiationInfoW.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/SecPkgContext_NegotiationInfoW.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/SecPkgContext_Sizes.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/SecPkgContext_Sizes.cs index 9dfaeb4113d6..97a1d0cb9ffc 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/SecPkgContext_Sizes.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/SecPkgContext_Sizes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/SecPkgContext_StreamSizes.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/SecPkgContext_StreamSizes.cs index cf315dee8820..d43fc753fb01 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/SecPkgContext_StreamSizes.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/SecPkgContext_StreamSizes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/SecurityPackageInfo.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/SecurityPackageInfo.cs index 3ec3c7fda66e..3326c149ab03 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/SecurityPackageInfo.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/SecurityPackageInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/SecurityPackageInfoClass.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/SecurityPackageInfoClass.cs index e60c216b9b9f..dc74d309a210 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/SecurityPackageInfoClass.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/SecurityPackageInfoClass.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Globalization; @@ -11,12 +10,12 @@ namespace System.Net // _SecPkgInfoW in sspi.h. internal class SecurityPackageInfoClass { - internal int Capabilities = 0; - internal short Version = 0; - internal short RPCID = 0; - internal int MaxToken = 0; - internal string? Name = null; - internal string? Comment = null; + internal int Capabilities; + internal short Version; + internal short RPCID; + internal int MaxToken; + internal string? Name; + internal string? Comment; /* This is to support SSL with no client cert. @@ -28,12 +27,12 @@ internal unsafe SecurityPackageInfoClass(SafeHandle safeHandle, int index) { if (safeHandle.IsInvalid) { - if (NetEventSource.IsEnabled) NetEventSource.Info(this, $"Invalid handle: {safeHandle}"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, $"Invalid handle: {safeHandle}"); return; } IntPtr unmanagedAddress = safeHandle.DangerousGetHandle() + (sizeof(SecurityPackageInfo) * index); - if (NetEventSource.IsEnabled) NetEventSource.Info(this, $"unmanagedAddress: {unmanagedAddress}"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, $"unmanagedAddress: {unmanagedAddress}"); SecurityPackageInfo* pSecurityPackageInfo = (SecurityPackageInfo*)unmanagedAddress; @@ -48,17 +47,17 @@ internal unsafe SecurityPackageInfoClass(SafeHandle safeHandle, int index) if (unmanagedString != IntPtr.Zero) { Name = Marshal.PtrToStringUni(unmanagedString); - if (NetEventSource.IsEnabled) NetEventSource.Info(this, $"Name: {Name}"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, $"Name: {Name}"); } unmanagedString = pSecurityPackageInfo->Comment; if (unmanagedString != IntPtr.Zero) { Comment = Marshal.PtrToStringUni(unmanagedString); - if (NetEventSource.IsEnabled) NetEventSource.Info(this, $"Comment: {Comment}"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, $"Comment: {Comment}"); } - if (NetEventSource.IsEnabled) NetEventSource.Info(this, this.ToString()); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, this.ToString()); } public override string ToString() diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/SecuritySafeHandles.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/SecuritySafeHandles.cs index a8d91d1d8752..b4f3eb526723 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/SecuritySafeHandles.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/SecuritySafeHandles.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics; @@ -182,13 +181,6 @@ protected SafeFreeCredentials() : base(IntPtr.Zero, true) _handle = default; } -#if TRACE_VERBOSE - public override string ToString() - { - return "0x" + _handle.ToString(); - } -#endif - public override bool IsInvalid { get { return IsClosed || _handle.IsZero; } @@ -207,8 +199,6 @@ public static unsafe int AcquireDefaultCredential( Interop.SspiCli.CredentialUse intent, out SafeFreeCredentials outCredential) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(null, package, intent); - int errorCode = -1; long timeStamp; @@ -225,7 +215,7 @@ public static unsafe int AcquireDefaultCredential( ref outCredential._handle, out timeStamp); - if (NetEventSource.IsEnabled) NetEventSource.Verbose(null, $"{nameof(Interop.SspiCli.AcquireCredentialsHandleW)} returns 0x{errorCode:x}, handle = {outCredential}"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Verbose(null, $"{nameof(Interop.SspiCli.AcquireCredentialsHandleW)} returns 0x{errorCode:x}, handle = {outCredential}"); if (errorCode != 0) { @@ -270,12 +260,9 @@ public static unsafe int AcquireCredentialsHandle( ref Interop.SspiCli.SCHANNEL_CRED authdata, out SafeFreeCredentials outCredential) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(null, package, intent, authdata); - int errorCode = -1; long timeStamp; - // If there is a certificate, wrap it into an array. // Not threadsafe. IntPtr copiedPtr = authdata.paCred; @@ -305,7 +292,7 @@ public static unsafe int AcquireCredentialsHandle( authdata.paCred = copiedPtr; } - if (NetEventSource.IsEnabled) NetEventSource.Verbose(null, $"{nameof(Interop.SspiCli.AcquireCredentialsHandleW)} returns 0x{errorCode:x}, handle = {outCredential}"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Verbose(null, $"{nameof(Interop.SspiCli.AcquireCredentialsHandleW)} returns 0x{errorCode:x}, handle = {outCredential}"); if (errorCode != 0) { @@ -397,8 +384,6 @@ internal static unsafe int InitializeSecurityContext( ref SecurityBuffer outSecBuffer, ref Interop.SspiCli.ContextFlags outFlags) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(null, $"credential:{inCredentials}, crefContext:{refContext}, targetName:{targetName}, inFlags:{inFlags}, endianness:{endianness}"); - if (inCredentials == null) { throw new ArgumentNullException(nameof(inCredentials)); @@ -506,7 +491,7 @@ internal static unsafe int InitializeSecurityContext( outFreeContextBuffer); } - if (NetEventSource.IsEnabled) NetEventSource.Info(null, "Marshalling OUT buffer"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(null, "Marshalling OUT buffer"); // Get unmanaged buffer with index 0 as the only one passed into PInvoke. outSecBuffer.size = outUnmanagedBuffer.cbBuffer; @@ -522,7 +507,6 @@ internal static unsafe int InitializeSecurityContext( outFreeContextBuffer?.Dispose(); } - if (NetEventSource.IsEnabled) NetEventSource.Exit(null, $"errorCode:0x{errorCode:x8}, refContext:{refContext}"); return errorCode; } @@ -629,8 +613,6 @@ internal static unsafe int AcceptSecurityContext( ref SecurityBuffer outSecBuffer, ref Interop.SspiCli.ContextFlags outFlags) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(null, $"credential={inCredentials}, refContext={refContext}, inFlags={inFlags}"); - if (inCredentials == null) { throw new ArgumentNullException(nameof(inCredentials)); @@ -735,7 +717,7 @@ internal static unsafe int AcceptSecurityContext( ref outFlags, outFreeContextBuffer); - if (NetEventSource.IsEnabled) NetEventSource.Info(null, "Marshaling OUT buffer"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(null, "Marshaling OUT buffer"); // No data written out but there is Alert if (outUnmanagedBuffer[0].cbBuffer == 0 && outUnmanagedBuffer[1].cbBuffer > 0) @@ -764,7 +746,6 @@ internal static unsafe int AcceptSecurityContext( } } - if (NetEventSource.IsEnabled) NetEventSource.Exit(null, $"errorCode:0x{errorCode:x8}, refContext:{refContext}"); return errorCode; } @@ -862,12 +843,7 @@ internal static unsafe int CompleteAuthToken( ref SafeDeleteSslContext? refContext, in SecurityBuffer inSecBuffer) { - if (NetEventSource.IsEnabled) - { - NetEventSource.Enter(null, "SafeDeleteContext::CompleteAuthToken"); - NetEventSource.Info(null, $" refContext = {refContext}"); - NetEventSource.Info(null, $" inSecBuffer = {inSecBuffer}"); - } + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(null, $"refContext = {refContext}, inSecBuffer = {inSecBuffer}"); var inSecurityBufferDescriptor = new Interop.SspiCli.SecBufferDesc(1); int errorCode = (int)Interop.SECURITY_STATUS.InvalidHandle; @@ -914,7 +890,6 @@ internal static unsafe int CompleteAuthToken( } } - if (NetEventSource.IsEnabled) NetEventSource.Exit(null, $"unmanaged CompleteAuthToken() errorCode:0x{errorCode:x8} refContext:{refContext}"); return errorCode; } @@ -922,12 +897,7 @@ internal static unsafe int ApplyControlToken( ref SafeDeleteContext? refContext, in SecurityBuffer inSecBuffer) { - if (NetEventSource.IsEnabled) - { - NetEventSource.Enter(null); - NetEventSource.Info(null, $" refContext = {refContext}"); - NetEventSource.Info(null, $" inSecBuffer = {inSecBuffer}"); - } + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(null, $"refContext = {refContext}, inSecBuffer = {inSecBuffer}"); int errorCode = (int)Interop.SECURITY_STATUS.InvalidHandle; @@ -976,7 +946,6 @@ internal static unsafe int ApplyControlToken( } } - if (NetEventSource.IsEnabled) NetEventSource.Exit(null, $"unmanaged ApplyControlToken() errorCode:0x{errorCode:x8} refContext: {refContext}"); return errorCode; } } diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.Constants.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.Constants.cs index 5566ba2b2802..b67a64920510 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.Constants.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.Constants.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.CreateWindowEx.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.CreateWindowEx.cs index ffb80e7236b3..f5d8d62616db 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.CreateWindowEx.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.CreateWindowEx.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.DefWindowProc.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.DefWindowProc.cs index f513e3dc7408..11e28f760ac8 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.DefWindowProc.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.DefWindowProc.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.DestroyWindow.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.DestroyWindow.cs index d9bc51ae857b..5b5e0f5c464f 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.DestroyWindow.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.DestroyWindow.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.DispatchMessage.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.DispatchMessage.cs index 07b448c3fb31..8ccb7d6b48a3 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.DispatchMessage.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.DispatchMessage.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.EnumWindows.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.EnumWindows.cs index 6657e07ff4d3..3573db73cd60 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.EnumWindows.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.EnumWindows.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.FindWindow.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.FindWindow.cs index 809beafc7330..915231ecb942 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.FindWindow.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.FindWindow.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.GetClassInfo.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.GetClassInfo.cs index 7fe4dc09a28c..b39b83f4bb4d 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.GetClassInfo.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.GetClassInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.GetDC.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.GetDC.cs index 19c63e4153ce..fdcff52f711c 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.GetDC.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.GetDC.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.GetKeyState.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.GetKeyState.cs index 9dc9da30c332..0067f201ba14 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.GetKeyState.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.GetKeyState.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; @@ -11,4 +10,4 @@ internal partial class User32 [DllImport(Libraries.User32)] internal static extern short GetKeyState(int virtualKeyCode); } -} \ No newline at end of file +} diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.GetProcessWindowStation.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.GetProcessWindowStation.cs index 10a3ed9e7441..3da6347bc849 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.GetProcessWindowStation.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.GetProcessWindowStation.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.GetSysColor.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.GetSysColor.cs index 42a06660df7f..0ef34d7901e2 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.GetSysColor.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.GetSysColor.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.GetUserObjectInformation.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.GetUserObjectInformation.cs index 3144de671e30..54243aa792ae 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.GetUserObjectInformation.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.GetUserObjectInformation.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.GetWindow.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.GetWindow.cs index 3ee644cd595f..afbc6b5dca41 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.GetWindow.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.GetWindow.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.GetWindowLong.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.GetWindowLong.cs index 9b2363e37e77..acc8aa8e2c57 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.GetWindowLong.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.GetWindowLong.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.GetWindowTextLengthW.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.GetWindowTextLengthW.cs index 951cec38b50e..1077b4877e2b 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.GetWindowTextLengthW.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.GetWindowTextLengthW.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.GetWindowTextW.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.GetWindowTextW.cs index 2fc1951b99be..3a56b7c5ff64 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.GetWindowTextW.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.GetWindowTextW.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.GetWindowThreadProcessId.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.GetWindowThreadProcessId.cs index 9f69b32ef224..76dca36f42e1 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.GetWindowThreadProcessId.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.GetWindowThreadProcessId.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.IsWindow.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.IsWindow.cs index be4c2f75b5e4..4f545b9cbb35 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.IsWindow.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.IsWindow.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.IsWindowVisible.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.IsWindowVisible.cs index 3d399ab5437c..8e17970f708e 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.IsWindowVisible.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.IsWindowVisible.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.KillTimer.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.KillTimer.cs index 76a49229a6d8..603e2b919ea9 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.KillTimer.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.KillTimer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.LOGFONT.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.LOGFONT.cs index 2b26ce6e78f8..8c9b333eb238 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.LOGFONT.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.LOGFONT.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.LoadString.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.LoadString.cs index 8824f7c3dfa0..de9d9601696f 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.LoadString.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.LoadString.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.MSG.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.MSG.cs index cc424da5240f..eb87fa953efa 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.MSG.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.MSG.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.MessageBeep.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.MessageBeep.cs index b1f2095f3b35..ab8402daac3d 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.MessageBeep.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.MessageBeep.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.MsgWaitForMultipleObjectsEx.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.MsgWaitForMultipleObjectsEx.cs index 6d3a58a27b92..ccea1d673be2 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.MsgWaitForMultipleObjectsEx.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.MsgWaitForMultipleObjectsEx.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.NONCLIENTMETRICS.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.NONCLIENTMETRICS.cs index 88872ca29e26..4bd7bbfd8093 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.NONCLIENTMETRICS.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.NONCLIENTMETRICS.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Drawing; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.PeekMessage.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.PeekMessage.cs index 5b00c16585a4..3ae4a801d792 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.PeekMessage.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.PeekMessage.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.PostMessage.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.PostMessage.cs index 81e95be39921..f06edc40bfa4 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.PostMessage.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.PostMessage.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.RegisterClass.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.RegisterClass.cs index 65d7af15cf03..8dece9608272 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.RegisterClass.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.RegisterClass.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.RegisterWindowMessage.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.RegisterWindowMessage.cs index a843030a3cac..4349e5f21ac9 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.RegisterWindowMessage.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.RegisterWindowMessage.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.ReleaseDC.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.ReleaseDC.cs index 383c09ef2489..eebf7f1f536a 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.ReleaseDC.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.ReleaseDC.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.SendMessage.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.SendMessage.cs index 1541d7482647..c7500295ec8c 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.SendMessage.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.SendMessage.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.SendMessageTimeout.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.SendMessageTimeout.cs index 35879f9e976d..49f95350ece5 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.SendMessageTimeout.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.SendMessageTimeout.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.SetClassLong.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.SetClassLong.cs index ef56107e88f7..903f3679efc7 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.SetClassLong.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.SetClassLong.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.SetClassLongPtr.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.SetClassLongPtr.cs index fe875d0ce604..44f2f75ccb76 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.SetClassLongPtr.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.SetClassLongPtr.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.SetTimer.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.SetTimer.cs index b5fdb6b7000e..b19b64d4ada6 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.SetTimer.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.SetTimer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.SetWindowLong.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.SetWindowLong.cs index b536f7766855..c5ea5235bd76 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.SetWindowLong.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.SetWindowLong.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.SetWindowLongPtr.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.SetWindowLongPtr.cs index 3dfb27173c19..ee08388d8ab3 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.SetWindowLongPtr.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.SetWindowLongPtr.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.SystemParametersInfo.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.SystemParametersInfo.cs index 510d106ad9b1..81f2c9f953e3 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.SystemParametersInfo.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.SystemParametersInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.TranslateMessage.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.TranslateMessage.cs index 2fef33e6c1ad..c8a2bfdb83c7 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.TranslateMessage.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.TranslateMessage.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.USEROBJECTFLAGS.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.USEROBJECTFLAGS.cs index f33a5beabf24..e743c36c28fb 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.USEROBJECTFLAGS.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.USEROBJECTFLAGS.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.UnregisterClass.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.UnregisterClass.cs index af4bcb357cea..eb0e108dc77f 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.UnregisterClass.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.UnregisterClass.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.WNDCLASS.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.WNDCLASS.cs index 9f23c7618694..4bbf3045889d 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.WNDCLASS.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.WNDCLASS.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.WaitForInputIdle.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.WaitForInputIdle.cs index 031cd3caeceb..aa4136349ebc 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.WaitForInputIdle.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.WaitForInputIdle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.Win32SystemColors.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.Win32SystemColors.cs index 6094c65a967b..a8187192bbf1 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.Win32SystemColors.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.Win32SystemColors.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.WindowFromDC.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.WindowFromDC.cs index 0a68a0399c13..75dc7497768e 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.WindowFromDC.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.WindowFromDC.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/User32/Interop.WndProc.cs b/src/libraries/Common/src/Interop/Windows/User32/Interop.WndProc.cs index d4a9cda3a3cb..105cc2764cdb 100644 --- a/src/libraries/Common/src/Interop/Windows/User32/Interop.WndProc.cs +++ b/src/libraries/Common/src/Interop/Windows/User32/Interop.WndProc.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/src/Interop/Windows/Version/Interop.FileVersionInfo.cs b/src/libraries/Common/src/Interop/Windows/Version/Interop.FileVersionInfo.cs index 6418fd4d06fa..f37615a20324 100644 --- a/src/libraries/Common/src/Interop/Windows/Version/Interop.FileVersionInfo.cs +++ b/src/libraries/Common/src/Interop/Windows/Version/Interop.FileVersionInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Version/Interop.FileVersionInfoType.cs b/src/libraries/Common/src/Interop/Windows/Version/Interop.FileVersionInfoType.cs index 0d50ebf53af5..7463c5277a6f 100644 --- a/src/libraries/Common/src/Interop/Windows/Version/Interop.FileVersionInfoType.cs +++ b/src/libraries/Common/src/Interop/Windows/Version/Interop.FileVersionInfoType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Version/Interop.GetFileVersionInfoEx.cs b/src/libraries/Common/src/Interop/Windows/Version/Interop.GetFileVersionInfoEx.cs index baf85a35fac9..dde98554145c 100644 --- a/src/libraries/Common/src/Interop/Windows/Version/Interop.GetFileVersionInfoEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Version/Interop.GetFileVersionInfoEx.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Version/Interop.GetFileVersionInfoSizeEx.cs b/src/libraries/Common/src/Interop/Windows/Version/Interop.GetFileVersionInfoSizeEx.cs index 5b7298502dc3..1c36bdd1dffe 100644 --- a/src/libraries/Common/src/Interop/Windows/Version/Interop.GetFileVersionInfoSizeEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Version/Interop.GetFileVersionInfoSizeEx.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Version/Interop.VSFixedFileInfo.cs b/src/libraries/Common/src/Interop/Windows/Version/Interop.VSFixedFileInfo.cs index 147473efcd6b..f7afa2008548 100644 --- a/src/libraries/Common/src/Interop/Windows/Version/Interop.VSFixedFileInfo.cs +++ b/src/libraries/Common/src/Interop/Windows/Version/Interop.VSFixedFileInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Version/Interop.VerQueryValue.cs b/src/libraries/Common/src/Interop/Windows/Version/Interop.VerQueryValue.cs index e83f1caccc54..ee71fa8d64c9 100644 --- a/src/libraries/Common/src/Interop/Windows/Version/Interop.VerQueryValue.cs +++ b/src/libraries/Common/src/Interop/Windows/Version/Interop.VerQueryValue.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.Structs.cs b/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.Structs.cs index 678d4a4f8c39..aff7ee11a381 100644 --- a/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.Structs.cs +++ b/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.Structs.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net.WebSockets; diff --git a/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketAbortHandle.cs b/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketAbortHandle.cs index 3026749ae9d4..eadda76c81cb 100644 --- a/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketAbortHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketAbortHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Security; diff --git a/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketBeginClientHandshake.cs b/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketBeginClientHandshake.cs index 1c3224491c7d..5d49f4d7eab7 100644 --- a/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketBeginClientHandshake.cs +++ b/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketBeginClientHandshake.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketBeginServerHandshake.cs b/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketBeginServerHandshake.cs index 4d8d26dc0d4c..019a75a7c671 100644 --- a/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketBeginServerHandshake.cs +++ b/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketBeginServerHandshake.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketCompleteAction.cs b/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketCompleteAction.cs index fa098569fa56..b082e8d1a154 100644 --- a/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketCompleteAction.cs +++ b/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketCompleteAction.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketCreateClientHandle.cs b/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketCreateClientHandle.cs index 44bbf682044d..6aeb2d145522 100644 --- a/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketCreateClientHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketCreateClientHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net.WebSockets; diff --git a/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketCreateServerHandle.cs b/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketCreateServerHandle.cs index 995e9462e336..672336c11fa8 100644 --- a/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketCreateServerHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketCreateServerHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Net.WebSockets; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketDeleteHandle.cs b/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketDeleteHandle.cs index 6f57d9ebdce4..c596dd22505a 100644 --- a/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketDeleteHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketDeleteHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketEndServerHandshake.cs b/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketEndServerHandshake.cs index 3323039a5ab7..f56255fbb232 100644 --- a/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketEndServerHandshake.cs +++ b/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketEndServerHandshake.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketGetAction.cs b/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketGetAction.cs index 114574a2db67..7cacdd427067 100644 --- a/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketGetAction.cs +++ b/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketGetAction.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketReceive.cs b/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketReceive.cs index e29dedb4b700..41b917b76701 100644 --- a/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketReceive.cs +++ b/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketReceive.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketSend.cs b/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketSend.cs index d3ecc8ff1b9d..993709ec19c8 100644 --- a/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketSend.cs +++ b/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketSend.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/WinHttp/Interop.SafeWinHttpHandle.cs b/src/libraries/Common/src/Interop/Windows/WinHttp/Interop.SafeWinHttpHandle.cs index a2b2e720d3b2..5a3472cc52fe 100644 --- a/src/libraries/Common/src/Interop/Windows/WinHttp/Interop.SafeWinHttpHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/WinHttp/Interop.SafeWinHttpHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; @@ -15,7 +14,7 @@ internal partial class WinHttp { internal class SafeWinHttpHandle : SafeHandleZeroOrMinusOneIsInvalid { - private SafeWinHttpHandle? _parentHandle = null; + private SafeWinHttpHandle? _parentHandle; public SafeWinHttpHandle() : base(true) { diff --git a/src/libraries/Common/src/Interop/Windows/WinHttp/Interop.winhttp.cs b/src/libraries/Common/src/Interop/Windows/WinHttp/Interop.winhttp.cs index 3b5429bb9de3..c56d91b3a0a4 100644 --- a/src/libraries/Common/src/Interop/Windows/WinHttp/Interop.winhttp.cs +++ b/src/libraries/Common/src/Interop/Windows/WinHttp/Interop.winhttp.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/Windows/WinHttp/Interop.winhttp_types.cs b/src/libraries/Common/src/Interop/Windows/WinHttp/Interop.winhttp_types.cs index 3948b540f617..9dd0d81b56cf 100644 --- a/src/libraries/Common/src/Interop/Windows/WinHttp/Interop.winhttp_types.cs +++ b/src/libraries/Common/src/Interop/Windows/WinHttp/Interop.winhttp_types.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; @@ -154,6 +153,7 @@ internal partial class WinHttp public const uint WINHTTP_OPTION_HTTP_PROTOCOL_USED = 134; public const uint WINHTTP_PROTOCOL_FLAG_HTTP2 = 0x1; public const uint WINHTTP_HTTP2_PLUS_CLIENT_CERT_FLAG = 0x1; + public const uint WINHTTP_OPTION_DISABLE_STREAM_QUEUE = 139; public const uint WINHTTP_OPTION_UPGRADE_TO_WEB_SOCKET = 114; public const uint WINHTTP_OPTION_WEB_SOCKET_CLOSE_TIMEOUT = 115; diff --git a/src/libraries/Common/src/Interop/Windows/WinInet/Interop.wininet_errors.cs b/src/libraries/Common/src/Interop/Windows/WinInet/Interop.wininet_errors.cs index 193a03f5b53a..131159afde03 100644 --- a/src/libraries/Common/src/Interop/Windows/WinInet/Interop.wininet_errors.cs +++ b/src/libraries/Common/src/Interop/Windows/WinInet/Interop.wininet_errors.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net { diff --git a/src/libraries/Common/src/Interop/Windows/WinMm/Interop.MMCKINFO.cs b/src/libraries/Common/src/Interop/Windows/WinMm/Interop.MMCKINFO.cs index 63ef27e0e715..f97f85224fda 100644 --- a/src/libraries/Common/src/Interop/Windows/WinMm/Interop.MMCKINFO.cs +++ b/src/libraries/Common/src/Interop/Windows/WinMm/Interop.MMCKINFO.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/WinMm/Interop.PlaySound.cs b/src/libraries/Common/src/Interop/Windows/WinMm/Interop.PlaySound.cs index 7e8f8be4909e..771fa9d1b2fd 100644 --- a/src/libraries/Common/src/Interop/Windows/WinMm/Interop.PlaySound.cs +++ b/src/libraries/Common/src/Interop/Windows/WinMm/Interop.PlaySound.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/WinMm/Interop.mmioAscend.cs b/src/libraries/Common/src/Interop/Windows/WinMm/Interop.mmioAscend.cs index 6567e6cf8f01..69c35b762890 100644 --- a/src/libraries/Common/src/Interop/Windows/WinMm/Interop.mmioAscend.cs +++ b/src/libraries/Common/src/Interop/Windows/WinMm/Interop.mmioAscend.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/WinMm/Interop.mmioClose.cs b/src/libraries/Common/src/Interop/Windows/WinMm/Interop.mmioClose.cs index e61dea0371af..0948ba5b44b6 100644 --- a/src/libraries/Common/src/Interop/Windows/WinMm/Interop.mmioClose.cs +++ b/src/libraries/Common/src/Interop/Windows/WinMm/Interop.mmioClose.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/WinMm/Interop.mmioDescend.cs b/src/libraries/Common/src/Interop/Windows/WinMm/Interop.mmioDescend.cs index 931d984eb4fe..ede50147bd43 100644 --- a/src/libraries/Common/src/Interop/Windows/WinMm/Interop.mmioDescend.cs +++ b/src/libraries/Common/src/Interop/Windows/WinMm/Interop.mmioDescend.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/WinMm/Interop.mmioOpen.cs b/src/libraries/Common/src/Interop/Windows/WinMm/Interop.mmioOpen.cs index 653ae73db06c..bdff1f1cd7ff 100644 --- a/src/libraries/Common/src/Interop/Windows/WinMm/Interop.mmioOpen.cs +++ b/src/libraries/Common/src/Interop/Windows/WinMm/Interop.mmioOpen.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/WinMm/Interop.mmioRead.cs b/src/libraries/Common/src/Interop/Windows/WinMm/Interop.mmioRead.cs index 1ddf4db207b5..38b257ae3a1d 100644 --- a/src/libraries/Common/src/Interop/Windows/WinMm/Interop.mmioRead.cs +++ b/src/libraries/Common/src/Interop/Windows/WinMm/Interop.mmioRead.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/AddressInfoHints.cs b/src/libraries/Common/src/Interop/Windows/WinSock/AddressInfoHints.cs index 232d4eceab20..e97a0124556b 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/AddressInfoHints.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/AddressInfoHints.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.Sockets { diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.ErrorCodes.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.ErrorCodes.cs index 2967ff75c055..02b396a61a27 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.ErrorCodes.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.ErrorCodes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.GetAddrInfoExW.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.GetAddrInfoExW.cs index 430bd89e22fa..7610f6d12746 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.GetAddrInfoExW.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.GetAddrInfoExW.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.GetAddrInfoW.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.GetAddrInfoW.cs index 06eded1f265b..275714c347ef 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.GetAddrInfoW.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.GetAddrInfoW.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.GetNameInfoW.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.GetNameInfoW.cs index 87678f3a0e1c..13673f2adff7 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.GetNameInfoW.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.GetNameInfoW.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net.Sockets; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.SocketConstructorFlags.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.SocketConstructorFlags.cs index 4a2e892e188a..a7e07d8c7c94 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.SocketConstructorFlags.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.SocketConstructorFlags.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.TransmitFile.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.TransmitFile.cs index d11bdfb2db17..d097205cde4c 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.TransmitFile.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.TransmitFile.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAConnect.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAConnect.cs index b6bf67156643..a15a0d67f046 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAConnect.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAConnect.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSADuplicateSocket.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSADuplicateSocket.cs index d079c1c25098..a394ebb519fe 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSADuplicateSocket.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSADuplicateSocket.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Net.Sockets; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAEventSelect.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAEventSelect.cs index 964f94a23a86..9318345ec938 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAEventSelect.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAEventSelect.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net.Sockets; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAGetOverlappedResult.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAGetOverlappedResult.cs index 4c2432e20d68..51517a2e3c62 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAGetOverlappedResult.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAGetOverlappedResult.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Net.Sockets; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAIoctl.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAIoctl.cs index 634091a06405..438a61f16032 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAIoctl.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAIoctl.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAPROTOCOL_INFOW.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAPROTOCOL_INFOW.cs index 502b28466fbd..036b8a004c0e 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAPROTOCOL_INFOW.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAPROTOCOL_INFOW.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSARecv.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSARecv.cs index a11948fc877b..3a07fab5ce1d 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSARecv.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSARecv.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSARecvFrom.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSARecvFrom.cs index 56c2007925e1..da2667e0bbe6 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSARecvFrom.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSARecvFrom.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSASend.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSASend.cs index b402b4101734..f5af2516948c 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSASend.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSASend.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSASendTo.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSASendTo.cs index c748baf423ea..b98509b1ca27 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSASendTo.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSASendTo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSASocketW.SafeCloseSocket.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSASocketW.SafeCloseSocket.cs index 03e228b6318b..2fca0e1aa269 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSASocketW.SafeCloseSocket.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSASocketW.SafeCloseSocket.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net.Sockets; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSASocketW.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSASocketW.cs index 820a345426ba..db6e3bda33e6 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSASocketW.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSASocketW.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net.Sockets; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAStartup.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAStartup.cs index 3904383cb1b2..0c119cea5a38 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAStartup.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAStartup.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Net.Sockets; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WinsockAsync.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WinsockAsync.cs index 95e0791c6171..76c34bd12f32 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WinsockAsync.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WinsockAsync.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net.Sockets; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WinsockBSD.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WinsockBSD.cs index 704f357b5606..72dc40f2aa45 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WinsockBSD.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WinsockBSD.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.accept.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.accept.cs index 20deebb708af..0e0ae44df5f0 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.accept.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.accept.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net.Sockets; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.bind.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.bind.cs index 7c5744fdb9fa..e407f134dadb 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.bind.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.bind.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Net.Sockets; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.closesocket.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.closesocket.cs index 09bda207a93a..1a1f6406e290 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.closesocket.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.closesocket.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net.Sockets; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.gethostname.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.gethostname.cs index 8b92cf286bc3..292b73230406 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.gethostname.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.gethostname.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Net.Sockets; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.getpeername.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.getpeername.cs index 72f816834e45..a2ce5be9b4a1 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.getpeername.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.getpeername.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.getsockname.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.getsockname.cs index 5471f62dcb7f..f457ea17c40c 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.getsockname.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.getsockname.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Net.Sockets; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.getsockopt.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.getsockopt.cs index da91ceb725bc..78deae877c63 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.getsockopt.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.getsockopt.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Net.Sockets; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.ioctlsocket.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.ioctlsocket.cs index 2c18d612ca3e..f9ed61b46e11 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.ioctlsocket.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.ioctlsocket.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net.Sockets; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.listen.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.listen.cs index 4e5386865560..3afb3b4fe28b 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.listen.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.listen.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Net.Sockets; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.recv.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.recv.cs index e6bdcb76e3e1..a4fd9b41ed2e 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.recv.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.recv.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.recvfrom.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.recvfrom.cs index 19656b6ebc25..95d1dee327f7 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.recvfrom.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.recvfrom.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.select.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.select.cs index 31b7d93a7d48..f6a2670643f2 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.select.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.select.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.send.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.send.cs index 79f42d92d4b2..4c1e02d5112c 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.send.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.send.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.sendto.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.sendto.cs index c710e83331bc..66dd58f82b5d 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.sendto.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.sendto.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.setsockopt.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.setsockopt.cs index 9d5025048124..55a19cbfb6e4 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.setsockopt.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.setsockopt.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.shutdown.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.shutdown.cs index 0ca760ab5a0d..99086e04fee2 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.shutdown.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.shutdown.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Net.Sockets; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/SafeNativeOverlapped.cs b/src/libraries/Common/src/Interop/Windows/WinSock/SafeNativeOverlapped.cs index b1bf965d44b5..ef51b07b44d6 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/SafeNativeOverlapped.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/SafeNativeOverlapped.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics; @@ -18,7 +17,7 @@ internal sealed class SafeNativeOverlapped : SafeHandle private SafeNativeOverlapped() : this(IntPtr.Zero) { - if (NetEventSource.IsEnabled) NetEventSource.Info(this); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this); } private SafeNativeOverlapped(IntPtr handle) @@ -32,7 +31,7 @@ public unsafe SafeNativeOverlapped(SafeSocketHandle socketHandle, NativeOverlapp { _socketHandle = socketHandle; - if (NetEventSource.IsEnabled) NetEventSource.Info(this, $"socketHandle:{socketHandle}"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, $"socketHandle:{socketHandle}"); } public override bool IsInvalid @@ -42,7 +41,7 @@ public override bool IsInvalid protected override bool ReleaseHandle() { - if (NetEventSource.IsEnabled) NetEventSource.Info(this); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this); FreeNativeOverlapped(); diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/WSABuffer.cs b/src/libraries/Common/src/Interop/Windows/WinSock/WSABuffer.cs index bfc55070f2af..7ec797a7a8df 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/WSABuffer.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/WSABuffer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/hostent.cs b/src/libraries/Common/src/Interop/Windows/WinSock/hostent.cs index 68e48aba5c05..0a9c13d5e4ca 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/hostent.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/hostent.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/Wldap32/Interop.Ber.cs b/src/libraries/Common/src/Interop/Windows/Wldap32/Interop.Ber.cs index 5f87ea57938b..25d8f0365384 100644 --- a/src/libraries/Common/src/Interop/Windows/Wldap32/Interop.Ber.cs +++ b/src/libraries/Common/src/Interop/Windows/Wldap32/Interop.Ber.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.DirectoryServices.Protocols; diff --git a/src/libraries/Common/src/Interop/Windows/Wldap32/Interop.Ldap.cs b/src/libraries/Common/src/Interop/Windows/Wldap32/Interop.Ldap.cs index a73cd89996e2..d096741e166d 100644 --- a/src/libraries/Common/src/Interop/Windows/Wldap32/Interop.Ldap.cs +++ b/src/libraries/Common/src/Interop/Windows/Wldap32/Interop.Ldap.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.DirectoryServices.Protocols; diff --git a/src/libraries/Common/src/Interop/Windows/WtsApi32/Interop.Constants.cs b/src/libraries/Common/src/Interop/Windows/WtsApi32/Interop.Constants.cs index 91bf9a3aadd0..520cd343e10b 100644 --- a/src/libraries/Common/src/Interop/Windows/WtsApi32/Interop.Constants.cs +++ b/src/libraries/Common/src/Interop/Windows/WtsApi32/Interop.Constants.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/WtsApi32/Interop.WTSRegisterSessionNotification.cs b/src/libraries/Common/src/Interop/Windows/WtsApi32/Interop.WTSRegisterSessionNotification.cs index 2fe4d593c228..b2c97359facb 100644 --- a/src/libraries/Common/src/Interop/Windows/WtsApi32/Interop.WTSRegisterSessionNotification.cs +++ b/src/libraries/Common/src/Interop/Windows/WtsApi32/Interop.WTSRegisterSessionNotification.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Interop/Windows/WtsApi32/Interop.WTSUnRegisterSessionNotification.cs b/src/libraries/Common/src/Interop/Windows/WtsApi32/Interop.WTSUnRegisterSessionNotification.cs index c1d6b384f9d0..ecdac58d4760 100644 --- a/src/libraries/Common/src/Interop/Windows/WtsApi32/Interop.WTSUnRegisterSessionNotification.cs +++ b/src/libraries/Common/src/Interop/Windows/WtsApi32/Interop.WTSUnRegisterSessionNotification.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/Asn1SafeHandles.Unix.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/Asn1SafeHandles.Unix.cs index 72487162b33d..7a5667ec8e64 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/Asn1SafeHandles.Unix.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/Asn1SafeHandles.Unix.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/GssSafeHandles.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/GssSafeHandles.cs index 8e8dd178b902..79283d19ecb5 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/GssSafeHandles.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/GssSafeHandles.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeBCryptAlgorithmHandle.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeBCryptAlgorithmHandle.cs index c82626d1ef67..d9192108d605 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeBCryptAlgorithmHandle.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeBCryptAlgorithmHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeBCryptHandle.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeBCryptHandle.cs index 74ea9e5a4c33..d5d1a41c4c34 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeBCryptHandle.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeBCryptHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeBCryptHashHandle.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeBCryptHashHandle.cs index b0775360359c..e3d899c8e217 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeBCryptHashHandle.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeBCryptHashHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeBCryptKeyHandle.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeBCryptKeyHandle.cs index da7761c61ab1..e7962332f219 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeBCryptKeyHandle.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeBCryptKeyHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeBignumHandle.Unix.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeBignumHandle.Unix.cs index f7afbff51260..311f24ca0863 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeBignumHandle.Unix.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeBignumHandle.Unix.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeBioHandle.Unix.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeBioHandle.Unix.cs index 190c6afd972e..ee59dcd0eb72 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeBioHandle.Unix.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeBioHandle.Unix.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Security; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeBrotliHandle.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeBrotliHandle.cs index 5907901f844e..41bf926e038b 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeBrotliHandle.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeBrotliHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeCreateHandle.OSX.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeCreateHandle.OSX.cs index d1ceac0694c3..63df101a9ba0 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeCreateHandle.OSX.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeCreateHandle.OSX.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeDsaHandle.Unix.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeDsaHandle.Unix.cs index 627cc7518130..7d177ea60f04 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeDsaHandle.Unix.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeDsaHandle.Unix.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEcKeyHandle.Unix.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEcKeyHandle.Unix.cs index 1f470a97972f..ef001881ee32 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEcKeyHandle.Unix.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEcKeyHandle.Unix.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEventStreamHandle.OSX.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEventStreamHandle.OSX.cs index e6e8e1aa7549..622689b3e572 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEventStreamHandle.OSX.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEventStreamHandle.OSX.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEvpCipherCtxHandle.Unix.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEvpCipherCtxHandle.Unix.cs index fd5a537aee07..bc965e7cf16e 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEvpCipherCtxHandle.Unix.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEvpCipherCtxHandle.Unix.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Security; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEvpMdCtxHandle.Unix.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEvpMdCtxHandle.Unix.cs index c006e6ee624d..a15f0644d1ba 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEvpMdCtxHandle.Unix.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEvpMdCtxHandle.Unix.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Security; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEvpPKeyHandle.Unix.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEvpPKeyHandle.Unix.cs index cea5d512ecbc..99d699ea81a7 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEvpPKeyHandle.Unix.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEvpPKeyHandle.Unix.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEvpPkeyCtxHandle.Unix.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEvpPkeyCtxHandle.Unix.cs index f6b0ef2777a0..2845f9907328 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEvpPkeyCtxHandle.Unix.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEvpPkeyCtxHandle.Unix.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeFileHandleHelper.Unix.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeFileHandleHelper.Unix.cs index 50d9d9e74a26..b04fcad0c2eb 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeFileHandleHelper.Unix.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeFileHandleHelper.Unix.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeFindHandle.Windows.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeFindHandle.Windows.cs index cc17181559e6..5d90bfff06c6 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeFindHandle.Windows.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeFindHandle.Windows.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeHandleCache.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeHandleCache.cs index 14edf5a9a945..ef1a2369af32 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeHandleCache.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeHandleCache.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeHmacCtxHandle.Unix.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeHmacCtxHandle.Unix.cs index a74dc2682e7b..f4284aa54299 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeHmacCtxHandle.Unix.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeHmacCtxHandle.Unix.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeInteriorHandle.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeInteriorHandle.cs index dcc03dcc262b..d7ff2b538ef3 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeInteriorHandle.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeInteriorHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeLibraryHandle.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeLibraryHandle.cs index dce7834389b2..4197d6834be2 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeLibraryHandle.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeLibraryHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Win32.SafeHandles { diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeLocalAllocHandle.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeLocalAllocHandle.cs index 65ca127215cb..96a93bfe9b8e 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeLocalAllocHandle.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeLocalAllocHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeLsaHandle.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeLsaHandle.cs index 40764313bc20..86a89a616ea8 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeLsaHandle.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeLsaHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeLsaMemoryHandle.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeLsaMemoryHandle.cs index a0a026033402..b744a4b46b70 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeLsaMemoryHandle.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeLsaMemoryHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeLsaPolicyHandle.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeLsaPolicyHandle.cs index e45b2feecdd9..33263626622c 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeLsaPolicyHandle.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeLsaPolicyHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeLsaReturnBufferHandle.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeLsaReturnBufferHandle.cs index 3671c13e86c8..b8ebb893c9ae 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeLsaReturnBufferHandle.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeLsaReturnBufferHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafePerfProviderHandle.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafePerfProviderHandle.cs index 5e30f4a4ce02..4632fa14a93e 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafePerfProviderHandle.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafePerfProviderHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafePkcs12Handle.Unix.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafePkcs12Handle.Unix.cs index 24aeb48d78db..0a4cdcfcc91e 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafePkcs12Handle.Unix.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafePkcs12Handle.Unix.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafePkcs7Handle.Unix.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafePkcs7Handle.Unix.cs index 58464d657baa..328db92c4f9c 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafePkcs7Handle.Unix.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafePkcs7Handle.Unix.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeRsaHandle.Unix.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeRsaHandle.Unix.cs index 6e413d623698..a379fed2e407 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeRsaHandle.Unix.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeRsaHandle.Unix.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeTokenHandle.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeTokenHandle.cs index e4f574c52631..ce97df473c69 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeTokenHandle.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeTokenHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.CompilerServices; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeUnicodeStringHandle.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeUnicodeStringHandle.cs index 8cb5df14657b..e58bfd19695e 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeUnicodeStringHandle.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeUnicodeStringHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeX509Handles.Unix.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeX509Handles.Unix.cs index 265765452e66..137c9d47aa38 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeX509Handles.Unix.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeX509Handles.Unix.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/X509ExtensionSafeHandles.Unix.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/X509ExtensionSafeHandles.Unix.cs index 42a1a318b4d4..0bad8f098921 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/X509ExtensionSafeHandles.Unix.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/X509ExtensionSafeHandles.Unix.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/SkipLocalsInit.cs b/src/libraries/Common/src/SkipLocalsInit.cs index 3ddba38173ae..b462975c356d 100644 --- a/src/libraries/Common/src/SkipLocalsInit.cs +++ b/src/libraries/Common/src/SkipLocalsInit.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // Used to indicate to the compiler that the .locals init flag should not be set in method headers. [module: System.Runtime.CompilerServices.SkipLocalsInit] diff --git a/src/libraries/Common/src/System/Buffers/ArrayBufferWriter.cs b/src/libraries/Common/src/System/Buffers/ArrayBufferWriter.cs index a7b047119d5d..b6271ba17e09 100644 --- a/src/libraries/Common/src/System/Buffers/ArrayBufferWriter.cs +++ b/src/libraries/Common/src/System/Buffers/ArrayBufferWriter.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Common/src/System/CSharpHelpers.cs b/src/libraries/Common/src/System/CSharpHelpers.cs index b52d13c2a431..ac1be4170c4e 100644 --- a/src/libraries/Common/src/System/CSharpHelpers.cs +++ b/src/libraries/Common/src/System/CSharpHelpers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Globalization; diff --git a/src/libraries/Common/src/System/CharArrayHelpers.cs b/src/libraries/Common/src/System/CharArrayHelpers.cs index 22310be729ac..371754c4386a 100644 --- a/src/libraries/Common/src/System/CharArrayHelpers.cs +++ b/src/libraries/Common/src/System/CharArrayHelpers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Common/src/System/CodeDom/CodeObject.cs b/src/libraries/Common/src/System/CodeDom/CodeObject.cs index 841955ce9b36..c20871af3d6f 100644 --- a/src/libraries/Common/src/System/CodeDom/CodeObject.cs +++ b/src/libraries/Common/src/System/CodeDom/CodeObject.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections; using System.Collections.Specialized; @@ -17,7 +16,7 @@ public class CodeObject internal class CodeObject #endif { - private IDictionary _userData = null; + private IDictionary _userData; public CodeObject() { } diff --git a/src/libraries/Common/src/System/CodeDom/CodeTypeReference.cs b/src/libraries/Common/src/System/CodeDom/CodeTypeReference.cs index 2ff20b4033a9..7a5f3e7790ad 100644 --- a/src/libraries/Common/src/System/CodeDom/CodeTypeReference.cs +++ b/src/libraries/Common/src/System/CodeDom/CodeTypeReference.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics; @@ -32,7 +31,7 @@ internal class CodeTypeReference : CodeObject private string _baseType; private readonly bool _isInterface; private CodeTypeReferenceCollection _typeArguments; - private bool _needsFixup = false; + private bool _needsFixup; public CodeTypeReference() { diff --git a/src/libraries/Common/src/System/CodeDom/CodeTypeReferenceCollection.cs b/src/libraries/Common/src/System/CodeDom/CodeTypeReferenceCollection.cs index 1b550702c26b..819fa06b26ae 100644 --- a/src/libraries/Common/src/System/CodeDom/CodeTypeReferenceCollection.cs +++ b/src/libraries/Common/src/System/CodeDom/CodeTypeReferenceCollection.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections; diff --git a/src/libraries/Common/src/System/Collections/Concurrent/SingleProducerConsumerQueue.cs b/src/libraries/Common/src/System/Collections/Concurrent/SingleProducerConsumerQueue.cs index a019a8b742f9..f6e15ae5eb7a 100644 --- a/src/libraries/Common/src/System/Collections/Concurrent/SingleProducerConsumerQueue.cs +++ b/src/libraries/Common/src/System/Collections/Concurrent/SingleProducerConsumerQueue.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Collections/Generic/ArrayBuilder.cs b/src/libraries/Common/src/System/Collections/Generic/ArrayBuilder.cs index 952dcef800c5..8bed99f99b84 100644 --- a/src/libraries/Common/src/System/Collections/Generic/ArrayBuilder.cs +++ b/src/libraries/Common/src/System/Collections/Generic/ArrayBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Collections/Generic/BidirectionalDictionary.cs b/src/libraries/Common/src/System/Collections/Generic/BidirectionalDictionary.cs index 5e3dec7e8268..e63bf0983b32 100644 --- a/src/libraries/Common/src/System/Collections/Generic/BidirectionalDictionary.cs +++ b/src/libraries/Common/src/System/Collections/Generic/BidirectionalDictionary.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Collections/Generic/BitHelper.cs b/src/libraries/Common/src/System/Collections/Generic/BitHelper.cs index cfdb5a649ee1..01f0c1cd6862 100644 --- a/src/libraries/Common/src/System/Collections/Generic/BitHelper.cs +++ b/src/libraries/Common/src/System/Collections/Generic/BitHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Collections.Generic { diff --git a/src/libraries/Common/src/System/Collections/Generic/EnumerableExtensions.cs b/src/libraries/Common/src/System/Collections/Generic/EnumerableExtensions.cs index b3f975b24194..9e8fb9790b3b 100644 --- a/src/libraries/Common/src/System/Collections/Generic/EnumerableExtensions.cs +++ b/src/libraries/Common/src/System/Collections/Generic/EnumerableExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Collections/Generic/EnumerableHelpers.Linq.cs b/src/libraries/Common/src/System/Collections/Generic/EnumerableHelpers.Linq.cs index ea39f90da410..7efd10dab97a 100644 --- a/src/libraries/Common/src/System/Collections/Generic/EnumerableHelpers.Linq.cs +++ b/src/libraries/Common/src/System/Collections/Generic/EnumerableHelpers.Linq.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Linq; diff --git a/src/libraries/Common/src/System/Collections/Generic/EnumerableHelpers.cs b/src/libraries/Common/src/System/Collections/Generic/EnumerableHelpers.cs index 0211e567b551..ce90e1999765 100644 --- a/src/libraries/Common/src/System/Collections/Generic/EnumerableHelpers.cs +++ b/src/libraries/Common/src/System/Collections/Generic/EnumerableHelpers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable namespace System.Collections.Generic diff --git a/src/libraries/Common/src/System/Collections/Generic/LargeArrayBuilder.SizeOpt.cs b/src/libraries/Common/src/System/Collections/Generic/LargeArrayBuilder.SizeOpt.cs index c0e685adc5d8..4ec34a701d52 100644 --- a/src/libraries/Common/src/System/Collections/Generic/LargeArrayBuilder.SizeOpt.cs +++ b/src/libraries/Common/src/System/Collections/Generic/LargeArrayBuilder.SizeOpt.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Collections/Generic/LargeArrayBuilder.SpeedOpt.cs b/src/libraries/Common/src/System/Collections/Generic/LargeArrayBuilder.SpeedOpt.cs index 107b7eb7a9e4..66473bff54a2 100644 --- a/src/libraries/Common/src/System/Collections/Generic/LargeArrayBuilder.SpeedOpt.cs +++ b/src/libraries/Common/src/System/Collections/Generic/LargeArrayBuilder.SpeedOpt.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/libraries/Common/src/System/Collections/Generic/LargeArrayBuilder.cs b/src/libraries/Common/src/System/Collections/Generic/LargeArrayBuilder.cs index fb00b3c9f7e9..bf28fb607b23 100644 --- a/src/libraries/Common/src/System/Collections/Generic/LargeArrayBuilder.cs +++ b/src/libraries/Common/src/System/Collections/Generic/LargeArrayBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Collections/Generic/ReferenceEqualityComparer.cs b/src/libraries/Common/src/System/Collections/Generic/ReferenceEqualityComparer.cs index 5502a9889090..b6f39dcc82cf 100644 --- a/src/libraries/Common/src/System/Collections/Generic/ReferenceEqualityComparer.cs +++ b/src/libraries/Common/src/System/Collections/Generic/ReferenceEqualityComparer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable diff --git a/src/libraries/Common/src/System/Collections/Generic/SparseArrayBuilder.cs b/src/libraries/Common/src/System/Collections/Generic/SparseArrayBuilder.cs index 1a8d2e7787dd..72bffe264cb1 100644 --- a/src/libraries/Common/src/System/Collections/Generic/SparseArrayBuilder.cs +++ b/src/libraries/Common/src/System/Collections/Generic/SparseArrayBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Composition/Diagnostics/CompositionTrace.cs b/src/libraries/Common/src/System/Composition/Diagnostics/CompositionTrace.cs index 8b77fa8f489e..53dd2bd7650b 100644 --- a/src/libraries/Common/src/System/Composition/Diagnostics/CompositionTrace.cs +++ b/src/libraries/Common/src/System/Composition/Diagnostics/CompositionTrace.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Reflection; diff --git a/src/libraries/Common/src/System/Composition/Diagnostics/CompositionTraceId.cs b/src/libraries/Common/src/System/Composition/Diagnostics/CompositionTraceId.cs index bb4fc6edba77..ebd578d78950 100644 --- a/src/libraries/Common/src/System/Composition/Diagnostics/CompositionTraceId.cs +++ b/src/libraries/Common/src/System/Composition/Diagnostics/CompositionTraceId.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Composition.Diagnostics { diff --git a/src/libraries/Common/src/System/Composition/Diagnostics/CompositionTraceSource.cs b/src/libraries/Common/src/System/Composition/Diagnostics/CompositionTraceSource.cs index 384c3e121688..d8f88e04ff51 100644 --- a/src/libraries/Common/src/System/Composition/Diagnostics/CompositionTraceSource.cs +++ b/src/libraries/Common/src/System/Composition/Diagnostics/CompositionTraceSource.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Composition.Diagnostics { diff --git a/src/libraries/Common/src/System/Composition/Diagnostics/DebuggerTraceWriter.cs b/src/libraries/Common/src/System/Composition/Diagnostics/DebuggerTraceWriter.cs index 5584f56dac84..8630d366a866 100644 --- a/src/libraries/Common/src/System/Composition/Diagnostics/DebuggerTraceWriter.cs +++ b/src/libraries/Common/src/System/Composition/Diagnostics/DebuggerTraceWriter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Globalization; diff --git a/src/libraries/Common/src/System/Composition/Diagnostics/TraceWriter.cs b/src/libraries/Common/src/System/Composition/Diagnostics/TraceWriter.cs index 997bdb840b7c..68249059e14f 100644 --- a/src/libraries/Common/src/System/Composition/Diagnostics/TraceWriter.cs +++ b/src/libraries/Common/src/System/Composition/Diagnostics/TraceWriter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Composition.Diagnostics { diff --git a/src/libraries/Common/src/System/Data/Common/AdapterUtil.Drivers.cs b/src/libraries/Common/src/System/Data/Common/AdapterUtil.Drivers.cs index 72806d619b4d..509aa984661e 100644 --- a/src/libraries/Common/src/System/Data/Common/AdapterUtil.Drivers.cs +++ b/src/libraries/Common/src/System/Data/Common/AdapterUtil.Drivers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Threading; diff --git a/src/libraries/Common/src/System/Data/Common/AdapterUtil.cs b/src/libraries/Common/src/System/Data/Common/AdapterUtil.cs index 8070af7548e3..c61589b75e5b 100644 --- a/src/libraries/Common/src/System/Data/Common/AdapterUtil.cs +++ b/src/libraries/Common/src/System/Data/Common/AdapterUtil.cs @@ -1,6 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. + +// TODO: Enable nullability as part of annotation System.Data.{Odbc,OleDb} +#nullable disable +#pragma warning disable CS8632 using System.Collections; using System.Data.SqlTypes; @@ -472,7 +475,7 @@ internal static Exception InvalidDataLength(long length) return IndexOutOfRange(SR.Format(SR.SQL_InvalidDataLength, length.ToString(CultureInfo.InvariantCulture))); } - internal static bool CompareInsensitiveInvariant(string strvalue, string strconst) => + internal static bool CompareInsensitiveInvariant(string? strvalue, string? strconst) => 0 == CultureInfo.InvariantCulture.CompareInfo.Compare(strvalue, strconst, CompareOptions.IgnoreCase); internal static int DstCompare(string strA, string strB) => CultureInfo.CurrentCulture.CompareInfo.Compare(strA, strB, ADP.DefaultCompareOptions); diff --git a/src/libraries/Common/src/System/Data/Common/BasicFieldNameLookup.cs b/src/libraries/Common/src/System/Data/Common/BasicFieldNameLookup.cs index 7465aae90d8d..4415ef3b8212 100644 --- a/src/libraries/Common/src/System/Data/Common/BasicFieldNameLookup.cs +++ b/src/libraries/Common/src/System/Data/Common/BasicFieldNameLookup.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/libraries/Common/src/System/Data/Common/DbConnectionOptions.Common.cs b/src/libraries/Common/src/System/Data/Common/DbConnectionOptions.Common.cs index b409b907c14f..83f6b892b689 100644 --- a/src/libraries/Common/src/System/Data/Common/DbConnectionOptions.Common.cs +++ b/src/libraries/Common/src/System/Data/Common/DbConnectionOptions.Common.cs @@ -1,9 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. + +// TODO: Remove this after System.Data.{Odbc,OleDb} are null-annotated +#nullable disable +#pragma warning disable CS8632 using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Text; using System.Text.RegularExpressions; @@ -91,8 +95,8 @@ private static class SYNONYM } private readonly string _usersConnectionString; - private readonly Dictionary _parsetable; - internal readonly NameValuePair _keyChain; + private readonly Dictionary _parsetable; + internal readonly NameValuePair? _keyChain; internal readonly bool _hasPasswordKeyword; public string UsersConnectionString(bool hidePassword) => @@ -114,9 +118,10 @@ private string UsersConnectionString(bool hidePassword, bool forceHidePassword) public bool ConvertValueToBoolean(string keyName, bool defaultValue) { - string value; + string? value; + // TODO: Is it possible for _parsetable to contain a null value here? If so there's a bug here, investigate. return _parsetable.TryGetValue(keyName, out value) ? - ConvertValueToBooleanInternal(keyName, value) : + ConvertValueToBooleanInternal(keyName, value!) : defaultValue; } @@ -144,7 +149,7 @@ private static bool CompareInsensitiveInvariant(string strvalue, string strconst (0 == StringComparer.OrdinalIgnoreCase.Compare(strvalue, strconst)); [System.Diagnostics.Conditional("DEBUG")] - static partial void DebugTraceKeyValuePair(string keyname, string keyvalue, Dictionary synonyms); + static partial void DebugTraceKeyValuePair(string keyname, string? keyvalue, Dictionary? synonyms); private static string GetKeyName(StringBuilder buffer) { @@ -192,7 +197,7 @@ private enum ParserState NullTermination, }; - internal static int GetKeyValuePair(string connectionString, int currentPosition, StringBuilder buffer, bool useOdbcRules, out string keyname, out string keyvalue) + internal static int GetKeyValuePair(string connectionString, int currentPosition, StringBuilder buffer, bool useOdbcRules, out string? keyname, out string? keyvalue) { int startposition = currentPosition; @@ -396,7 +401,8 @@ internal static int GetKeyValuePair(string connectionString, int currentPosition return currentPosition; } - private static bool IsValueValidInternal(string keyvalue) +#pragma warning disable CA2249 // Consider using 'string.Contains' instead of 'string.IndexOf'. This file is built into libraries that don't have string.Contains(char). + private static bool IsValueValidInternal(string? keyvalue) { if (null != keyvalue) { @@ -410,7 +416,8 @@ private static bool IsValueValidInternal(string keyvalue) return true; } - private static bool IsKeyNameValid(string keyname) + // TODO: Annotate with [NotNullWhen(true)] when annotating System.Data.{Odbc,OleDb} + private static bool IsKeyNameValid(string? keyname) { if (null != keyname) { @@ -423,9 +430,10 @@ private static bool IsKeyNameValid(string keyname) } return false; } +#pragma warning restore CA2249 // Consider using 'string.Contains' instead of 'string.IndexOf' #if DEBUG - private static Dictionary SplitConnectionString(string connectionString, Dictionary synonyms, bool firstKey) + private static Dictionary SplitConnectionString(string connectionString, Dictionary? synonyms, bool firstKey) { var parsetable = new Dictionary(); Regex parser = (firstKey ? s_connectionStringRegexOdbc : s_connectionStringRegex); @@ -446,7 +454,7 @@ private static Dictionary SplitConnectionString(string connectio foreach (Capture keypair in match.Groups[KeyIndex].Captures) { string keyname = (firstKey ? keypair.Value : keypair.Value.Replace("==", "=")).ToLowerInvariant(); - string keyvalue = keyvalues[indexValue++].Value; + string? keyvalue = keyvalues[indexValue++].Value; if (0 < keyvalue.Length) { if (!firstKey) @@ -469,8 +477,8 @@ private static Dictionary SplitConnectionString(string connectio keyvalue = null; } DebugTraceKeyValuePair(keyname, keyvalue, synonyms); - string synonym; - string realkeyname = null != synonyms ? + string? synonym; + string? realkeyname = null != synonyms ? (synonyms.TryGetValue(keyname, out synonym) ? synonym : null) : keyname; if (!IsKeyNameValid(realkeyname)) @@ -479,14 +487,14 @@ private static Dictionary SplitConnectionString(string connectio } if (!firstKey || !parsetable.ContainsKey(realkeyname)) { - parsetable[realkeyname] = keyvalue; // last key-value pair wins (or first) + parsetable[realkeyname] = keyvalue!; // last key-value pair wins (or first) } } } return parsetable; } - private static void ParseComparison(Dictionary parsetable, string connectionString, Dictionary synonyms, bool firstKey, Exception e) + private static void ParseComparison(Dictionary parsetable, string connectionString, Dictionary? synonyms, bool firstKey, Exception? e) { try { @@ -495,7 +503,7 @@ private static void ParseComparison(Dictionary parsetable, strin { string keyname = entry.Key; string value1 = entry.Value; - string value2; + string? value2; bool parsetableContainsKey = parsetable.TryGetValue(keyname, out value2); Debug.Assert(parsetableContainsKey, $"{nameof(ParseInternal)} code vs. regex mismatch keyname <{keyname}>"); Debug.Assert(value1 == value2, $"{nameof(ParseInternal)} code vs. regex mismatch keyvalue <{value1}> <{value2}>"); @@ -538,11 +546,11 @@ private static void ParseComparison(Dictionary parsetable, strin } #endif - private static NameValuePair ParseInternal(Dictionary parsetable, string connectionString, bool buildChain, Dictionary synonyms, bool firstKey) + private static NameValuePair? ParseInternal(Dictionary parsetable, string connectionString, bool buildChain, Dictionary? synonyms, bool firstKey) { Debug.Assert(null != connectionString, "null connectionstring"); StringBuilder buffer = new StringBuilder(); - NameValuePair localKeychain = null, keychain = null; + NameValuePair? localKeychain = null, keychain = null; #if DEBUG try { @@ -553,7 +561,7 @@ private static NameValuePair ParseInternal(Dictionary parsetable { int startPosition = nextStartPosition; - string keyname, keyvalue; + string? keyname, keyvalue; nextStartPosition = GetKeyValuePair(connectionString, startPosition, buffer, firstKey, out keyname, out keyvalue); if (string.IsNullOrEmpty(keyname)) { @@ -565,8 +573,8 @@ private static NameValuePair ParseInternal(Dictionary parsetable Debug.Assert(IsKeyNameValid(keyname), "ParseFailure, invalid keyname"); Debug.Assert(IsValueValidInternal(keyvalue), "parse failure, invalid keyvalue"); #endif - string synonym; - string realkeyname = null != synonyms ? + string? synonym; + string? realkeyname = null != synonyms ? (synonyms.TryGetValue(keyname, out synonym) ? synonym : null) : keyname; @@ -601,13 +609,13 @@ private static NameValuePair ParseInternal(Dictionary parsetable return keychain; } - internal NameValuePair ReplacePasswordPwd(out string constr, bool fakePassword) + internal NameValuePair? ReplacePasswordPwd(out string constr, bool fakePassword) { bool expanded = false; int copyPosition = 0; - NameValuePair head = null, tail = null, next = null; + NameValuePair? head = null, tail = null, next = null; StringBuilder builder = new StringBuilder(_usersConnectionString.Length); - for (NameValuePair current = _keyChain; null != current; current = current.Next) + for (NameValuePair? current = _keyChain; null != current; current = current.Next) { if ((KEY.Password != current.Name) && (SYNONYM.Pwd != current.Name)) { diff --git a/src/libraries/Common/src/System/Data/Common/DbConnectionPoolKey.cs b/src/libraries/Common/src/System/Data/Common/DbConnectionPoolKey.cs index a7b61cc5ebf1..a2cd4661611b 100644 --- a/src/libraries/Common/src/System/Data/Common/DbConnectionPoolKey.cs +++ b/src/libraries/Common/src/System/Data/Common/DbConnectionPoolKey.cs @@ -1,6 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. + +// TODO: Remove this after System.Data.{Odbc,OleDb} are null-annotated +#pragma warning disable CS8632 namespace System.Data.Common { @@ -38,14 +40,14 @@ internal virtual string ConnectionString } } - public override bool Equals(object obj) + public override bool Equals(object? obj) { if (obj == null || obj.GetType() != typeof(DbConnectionPoolKey)) { return false; } - DbConnectionPoolKey key = obj as DbConnectionPoolKey; + DbConnectionPoolKey? key = obj as DbConnectionPoolKey; return (key != null && _connectionString == key._connectionString); } diff --git a/src/libraries/Common/src/System/Data/Common/FieldNameLookup.cs b/src/libraries/Common/src/System/Data/Common/FieldNameLookup.cs index eff3f869304c..8e66d67458d6 100644 --- a/src/libraries/Common/src/System/Data/Common/FieldNameLookup.cs +++ b/src/libraries/Common/src/System/Data/Common/FieldNameLookup.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/libraries/Common/src/System/Data/Common/MultipartIdentifier.cs b/src/libraries/Common/src/System/Data/Common/MultipartIdentifier.cs index bafc5e6caf5c..3338928bda1f 100644 --- a/src/libraries/Common/src/System/Data/Common/MultipartIdentifier.cs +++ b/src/libraries/Common/src/System/Data/Common/MultipartIdentifier.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - +// TODO: Remove this after System.Data.{Odbc,OleDb} are null-annotated +#pragma warning disable CS8632 //------------------------------------------------------------------------------ using System.Text; @@ -25,7 +24,7 @@ would set a or b as a starting quote character. If a is the starting quote char then c would be the ending quote char otherwise if b is the starting quote char then d would be the ending quote character. */ - internal static string[] ParseMultipartIdentifier(string name, string leftQuote, string rightQuote, string property, bool ThrowOnEmptyMultipartName) + internal static string?[] ParseMultipartIdentifier(string name, string leftQuote, string rightQuote, string property, bool ThrowOnEmptyMultipartName) { return ParseMultipartIdentifier(name, leftQuote, rightQuote, '.', MaxParts, true, property, ThrowOnEmptyMultipartName); } @@ -48,7 +47,7 @@ private enum MPIState * limit: number of names to parse out * removequote:to remove the quotes on the returned string */ - private static void IncrementStringCount(string name, string[] ary, ref int position, string property) + private static void IncrementStringCount(string name, string?[] ary, ref int position, string property) { ++position; int limit = ary.Length; @@ -64,7 +63,7 @@ private static bool IsWhitespace(char ch) return char.IsWhiteSpace(ch); } - internal static string[] ParseMultipartIdentifier(string name, string leftQuote, string rightQuote, char separator, int limit, bool removequotes, string property, bool ThrowOnEmptyMultipartName) + internal static string?[] ParseMultipartIdentifier(string name, string leftQuote, string rightQuote, char separator, int limit, bool removequotes, string property, bool ThrowOnEmptyMultipartName) { if (limit <= 0) { @@ -76,13 +75,13 @@ internal static string[] ParseMultipartIdentifier(string name, string leftQuote, throw ADP.InvalidMultipartNameIncorrectUsageOfQuotes(property, name); } - string[] parsedNames = new string[limit]; // return string array + string?[] parsedNames = new string?[limit]; // return string array int stringCount = 0; // index of current string in the buffer MPIState state = MPIState.MPI_Value; // Initialize the starting state StringBuilder sb = new StringBuilder(name.Length); // String buffer to hold the string being currently built, init the string builder so it will never be resized - StringBuilder whitespaceSB = null; // String buffer to hold whitespace used when parsing nonquoted strings 'a b . c d' = 'a b' and 'c d' - char rightQuoteChar = ' '; // Right quote character to use given the left quote character found. + StringBuilder? whitespaceSB = null; // String buffer to hold whitespace used when parsing nonquoted strings 'a b . c d' = 'a b' and 'c d' + char rightQuoteChar = ' '; // Right quote character to use given the left quote character found. for (int index = 0; index < name.Length; ++index) { char testchar = name[index]; @@ -183,7 +182,7 @@ internal static string[] ParseMultipartIdentifier(string name, string leftQuote, } else { - whitespaceSB.Append(testchar); + whitespaceSB!.Append(testchar); } break; } diff --git a/src/libraries/Common/src/System/Data/Common/NameValuePair.cs b/src/libraries/Common/src/System/Data/Common/NameValuePair.cs index 72556924ee3e..435b998ef33b 100644 --- a/src/libraries/Common/src/System/Data/Common/NameValuePair.cs +++ b/src/libraries/Common/src/System/Data/Common/NameValuePair.cs @@ -1,6 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. + +// TODO: Remove this after System.Data.{Odbc,OleDb} are null-annotated +#pragma warning disable CS8632 using System.Diagnostics; @@ -9,11 +11,11 @@ namespace System.Data.Common internal sealed class NameValuePair { private readonly string _name; - private readonly string _value; + private readonly string? _value; private readonly int _length; - private NameValuePair _next; + private NameValuePair? _next; - internal NameValuePair(string name, string value, int length) + internal NameValuePair(string name, string? value, int length) { Debug.Assert(!string.IsNullOrEmpty(name), "empty keyname"); _name = name; @@ -31,9 +33,9 @@ internal int Length } internal string Name => _name; - internal string Value => _value; + internal string? Value => _value; - internal NameValuePair Next + internal NameValuePair? Next { get { return _next; } set diff --git a/src/libraries/Common/src/System/Data/Common/SQLResource.cs b/src/libraries/Common/src/System/Data/Common/SQLResource.cs index d4df9b4a49f1..c41cf9eed497 100644 --- a/src/libraries/Common/src/System/Data/Common/SQLResource.cs +++ b/src/libraries/Common/src/System/Data/Common/SQLResource.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/libraries/Common/src/System/Data/ProviderBase/DbConnectionClosed.cs b/src/libraries/Common/src/System/Data/ProviderBase/DbConnectionClosed.cs index e0f1caa300b4..11cc51501e28 100644 --- a/src/libraries/Common/src/System/Data/ProviderBase/DbConnectionClosed.cs +++ b/src/libraries/Common/src/System/Data/ProviderBase/DbConnectionClosed.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Data.Common; using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Data/ProviderBase/DbConnectionFactory.cs b/src/libraries/Common/src/System/Data/ProviderBase/DbConnectionFactory.cs index 197465b388e2..832006da95ca 100644 --- a/src/libraries/Common/src/System/Data/ProviderBase/DbConnectionFactory.cs +++ b/src/libraries/Common/src/System/Data/ProviderBase/DbConnectionFactory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics; @@ -22,7 +21,7 @@ internal abstract partial class DbConnectionFactory // s_pendingOpenNonPooled is an array of tasks used to throttle creation of non-pooled connections to // a maximum of Environment.ProcessorCount at a time. - private static uint s_pendingOpenNonPooledNext = 0; + private static uint s_pendingOpenNonPooledNext; private static readonly Task[] s_pendingOpenNonPooled = new Task[Environment.ProcessorCount]; private static Task s_completedTask; diff --git a/src/libraries/Common/src/System/Data/ProviderBase/DbConnectionInternal.cs b/src/libraries/Common/src/System/Data/ProviderBase/DbConnectionInternal.cs index e2bab7e348a5..4afa5d32351d 100644 --- a/src/libraries/Common/src/System/Data/ProviderBase/DbConnectionInternal.cs +++ b/src/libraries/Common/src/System/Data/ProviderBase/DbConnectionInternal.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Data.Common; using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Data/ProviderBase/DbConnectionPoolGroup.cs b/src/libraries/Common/src/System/Data/ProviderBase/DbConnectionPoolGroup.cs index 88716ce86f98..eb0f8ed4f154 100644 --- a/src/libraries/Common/src/System/Data/ProviderBase/DbConnectionPoolGroup.cs +++ b/src/libraries/Common/src/System/Data/ProviderBase/DbConnectionPoolGroup.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Concurrent; diff --git a/src/libraries/Common/src/System/Data/ProviderBase/DbMetaDataFactory.cs b/src/libraries/Common/src/System/Data/ProviderBase/DbMetaDataFactory.cs index bd12a2de3c90..614b11c7710d 100644 --- a/src/libraries/Common/src/System/Data/ProviderBase/DbMetaDataFactory.cs +++ b/src/libraries/Common/src/System/Data/ProviderBase/DbMetaDataFactory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Data.Common; using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Data/ProviderBase/DbReferenceCollection.cs b/src/libraries/Common/src/System/Data/ProviderBase/DbReferenceCollection.cs index 4062dd0ba709..b13b20ca26e7 100644 --- a/src/libraries/Common/src/System/Data/ProviderBase/DbReferenceCollection.cs +++ b/src/libraries/Common/src/System/Data/ProviderBase/DbReferenceCollection.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. diff --git a/src/libraries/Common/src/System/Data/ProviderBase/TimeoutTimer.cs b/src/libraries/Common/src/System/Data/ProviderBase/TimeoutTimer.cs index 50d7b96aab8d..6f41bf428942 100644 --- a/src/libraries/Common/src/System/Data/ProviderBase/TimeoutTimer.cs +++ b/src/libraries/Common/src/System/Data/ProviderBase/TimeoutTimer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // // Class used to manage timeouts in complex system operations. diff --git a/src/libraries/Common/src/System/Diagnostics/CodeAnalysis/ExcludeFromCodeCoverageAttribute.cs b/src/libraries/Common/src/System/Diagnostics/CodeAnalysis/ExcludeFromCodeCoverageAttribute.cs index 4d5b5890358b..7104270c2c5f 100644 --- a/src/libraries/Common/src/System/Diagnostics/CodeAnalysis/ExcludeFromCodeCoverageAttribute.cs +++ b/src/libraries/Common/src/System/Diagnostics/CodeAnalysis/ExcludeFromCodeCoverageAttribute.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Diagnostics.CodeAnalysis { @@ -12,7 +11,9 @@ namespace System.Diagnostics.CodeAnalysis #endif sealed class ExcludeFromCodeCoverageAttribute : Attribute { - public ExcludeFromCodeCoverageAttribute() - { } + public ExcludeFromCodeCoverageAttribute() { } + + /// Gets or sets the justification for excluding the member from code coverage. + public string? Justification { get; set; } } } diff --git a/src/libraries/Common/src/System/Diagnostics/NetFrameworkUtils.cs b/src/libraries/Common/src/System/Diagnostics/NetFrameworkUtils.cs index de9f756c18cc..1c86656b12c7 100644 --- a/src/libraries/Common/src/System/Diagnostics/NetFrameworkUtils.cs +++ b/src/libraries/Common/src/System/Diagnostics/NetFrameworkUtils.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Threading; using System.Text; diff --git a/src/libraries/Common/src/System/Diagnostics/TraceListenerHelpers.Unix.cs b/src/libraries/Common/src/System/Diagnostics/TraceListenerHelpers.Unix.cs deleted file mode 100644 index a9ba7b996354..000000000000 --- a/src/libraries/Common/src/System/Diagnostics/TraceListenerHelpers.Unix.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace System.Diagnostics -{ - internal static partial class TraceListenerHelpers - { - internal static int GetProcessId() - { - // Whereas the Win32 implementation caches the GetProcessId result, the Unix - // implementation doesn't so as to avoid problems with fork'd child processes - // ending up returning the same id as the parent. - return Interop.Sys.GetPid(); - } - - internal static string GetProcessName() - { - if (s_processName == null) - { - using (var process = Process.GetCurrentProcess()) - { - s_processName = process.ProcessName; - } - } - - return s_processName; - } - } -} diff --git a/src/libraries/Common/src/System/Diagnostics/TraceListenerHelpers.Windows.cs b/src/libraries/Common/src/System/Diagnostics/TraceListenerHelpers.Windows.cs deleted file mode 100644 index 6c2e1ac645c5..000000000000 --- a/src/libraries/Common/src/System/Diagnostics/TraceListenerHelpers.Windows.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace System.Diagnostics -{ - internal static partial class TraceListenerHelpers - { - private static volatile bool s_hasProcessId; - private static volatile int s_processId; - - internal static int GetProcessId() - { - if (!s_hasProcessId) - { - s_processId = (int)Interop.Kernel32.GetCurrentProcessId(); - s_hasProcessId = true; - } - - return s_processId; - } - - internal static string GetProcessName() - { - - if (s_processName == null) - { - using (var process = Process.GetCurrentProcess()) - { - s_processName = process.ProcessName; - } - } - - return s_processName; - } - } -} diff --git a/src/libraries/Common/src/System/Diagnostics/TraceListenerHelpers.cs b/src/libraries/Common/src/System/Diagnostics/TraceListenerHelpers.cs deleted file mode 100644 index 4ffd680598a1..000000000000 --- a/src/libraries/Common/src/System/Diagnostics/TraceListenerHelpers.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -#nullable enable -namespace System.Diagnostics -{ - internal static partial class TraceListenerHelpers - { - private static volatile string? s_processName; - - internal static int GetThreadId() - { - return Environment.CurrentManagedThreadId; - } - } -} diff --git a/src/libraries/Common/src/System/Drawing/ColorConverterCommon.cs b/src/libraries/Common/src/System/Drawing/ColorConverterCommon.cs index a184d3f9b8b1..e6f7cd3f2adb 100644 --- a/src/libraries/Common/src/System/Drawing/ColorConverterCommon.cs +++ b/src/libraries/Common/src/System/Drawing/ColorConverterCommon.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Drawing/ColorTable.cs b/src/libraries/Common/src/System/Drawing/ColorTable.cs index 9dc9edc7722e..3d96a69722d5 100644 --- a/src/libraries/Common/src/System/Drawing/ColorTable.cs +++ b/src/libraries/Common/src/System/Drawing/ColorTable.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Collections.Generic; diff --git a/src/libraries/Common/src/System/Drawing/ColorTranslator.cs b/src/libraries/Common/src/System/Drawing/ColorTranslator.cs index 92d475656595..d1caed09be28 100644 --- a/src/libraries/Common/src/System/Drawing/ColorTranslator.cs +++ b/src/libraries/Common/src/System/Drawing/ColorTranslator.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections; using System.Collections.Generic; diff --git a/src/libraries/Common/src/System/Drawing/KnownColor.cs b/src/libraries/Common/src/System/Drawing/KnownColor.cs index 8f4694c5421e..cf15dbe09405 100644 --- a/src/libraries/Common/src/System/Drawing/KnownColor.cs +++ b/src/libraries/Common/src/System/Drawing/KnownColor.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; diff --git a/src/libraries/Common/src/System/Drawing/KnownColorTable.cs b/src/libraries/Common/src/System/Drawing/KnownColorTable.cs index b1b97794b2ea..ca342e5b75a7 100644 --- a/src/libraries/Common/src/System/Drawing/KnownColorTable.cs +++ b/src/libraries/Common/src/System/Drawing/KnownColorTable.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Drawing/SystemColors.cs b/src/libraries/Common/src/System/Drawing/SystemColors.cs index 3583e4f9408e..3549c8073593 100644 --- a/src/libraries/Common/src/System/Drawing/SystemColors.cs +++ b/src/libraries/Common/src/System/Drawing/SystemColors.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Drawing { diff --git a/src/libraries/Common/src/System/Globalization/FormatProvider.Number.cs b/src/libraries/Common/src/System/Globalization/FormatProvider.Number.cs index 9b7120fb19ce..817756627f93 100644 --- a/src/libraries/Common/src/System/Globalization/FormatProvider.Number.cs +++ b/src/libraries/Common/src/System/Globalization/FormatProvider.Number.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/System/HResults.cs b/src/libraries/Common/src/System/HResults.cs index 984f43b0d41a..22127a48ef37 100644 --- a/src/libraries/Common/src/System/HResults.cs +++ b/src/libraries/Common/src/System/HResults.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. //============================================================================= // diff --git a/src/libraries/Common/src/System/HexConverter.cs b/src/libraries/Common/src/System/HexConverter.cs index a1d76cca2773..b06ce4b8796e 100644 --- a/src/libraries/Common/src/System/HexConverter.cs +++ b/src/libraries/Common/src/System/HexConverter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; diff --git a/src/libraries/Common/src/System/IO/ChunkedMemoryStream.cs b/src/libraries/Common/src/System/IO/ChunkedMemoryStream.cs index ceb003f86bae..98f0bacc1832 100644 --- a/src/libraries/Common/src/System/IO/ChunkedMemoryStream.cs +++ b/src/libraries/Common/src/System/IO/ChunkedMemoryStream.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics; diff --git a/src/libraries/Common/src/System/IO/DelegatingStream.cs b/src/libraries/Common/src/System/IO/DelegatingStream.cs index cbb3075a1d33..4f59c05b1c0d 100644 --- a/src/libraries/Common/src/System/IO/DelegatingStream.cs +++ b/src/libraries/Common/src/System/IO/DelegatingStream.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics; diff --git a/src/libraries/Common/src/System/IO/FileSystem.Attributes.Windows.cs b/src/libraries/Common/src/System/IO/FileSystem.Attributes.Windows.cs index 274f049f5847..a01b3a55215e 100644 --- a/src/libraries/Common/src/System/IO/FileSystem.Attributes.Windows.cs +++ b/src/libraries/Common/src/System/IO/FileSystem.Attributes.Windows.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/System/IO/FileSystem.DirectoryCreation.Windows.cs b/src/libraries/Common/src/System/IO/FileSystem.DirectoryCreation.Windows.cs index c97ec9f41b1e..aca89ead66e3 100644 --- a/src/libraries/Common/src/System/IO/FileSystem.DirectoryCreation.Windows.cs +++ b/src/libraries/Common/src/System/IO/FileSystem.DirectoryCreation.Windows.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/System/IO/PathInternal.CaseSensitivity.cs b/src/libraries/Common/src/System/IO/PathInternal.CaseSensitivity.cs index e5e97847ddd8..d66e3aa569d8 100644 --- a/src/libraries/Common/src/System/IO/PathInternal.CaseSensitivity.cs +++ b/src/libraries/Common/src/System/IO/PathInternal.CaseSensitivity.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Common/src/System/IO/PathInternal.Unix.cs b/src/libraries/Common/src/System/IO/PathInternal.Unix.cs index 8aff492708f3..cc1c9bc15f94 100644 --- a/src/libraries/Common/src/System/IO/PathInternal.Unix.cs +++ b/src/libraries/Common/src/System/IO/PathInternal.Unix.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/System/IO/PathInternal.Windows.cs b/src/libraries/Common/src/System/IO/PathInternal.Windows.cs index c7fcd25bb078..5d7242739cc2 100644 --- a/src/libraries/Common/src/System/IO/PathInternal.Windows.cs +++ b/src/libraries/Common/src/System/IO/PathInternal.Windows.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics.CodeAnalysis; diff --git a/src/libraries/Common/src/System/IO/ReadOnlyMemoryStream.cs b/src/libraries/Common/src/System/IO/ReadOnlyMemoryStream.cs index cb05a0e3e104..a400188ac0d8 100644 --- a/src/libraries/Common/src/System/IO/ReadOnlyMemoryStream.cs +++ b/src/libraries/Common/src/System/IO/ReadOnlyMemoryStream.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Threading; using System.Threading.Tasks; diff --git a/src/libraries/Common/src/System/IO/RowConfigReader.cs b/src/libraries/Common/src/System/IO/RowConfigReader.cs index b59fe765b5a3..1379fbbd5dee 100644 --- a/src/libraries/Common/src/System/IO/RowConfigReader.cs +++ b/src/libraries/Common/src/System/IO/RowConfigReader.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics; diff --git a/src/libraries/Common/src/System/IO/StreamHelpers.CopyValidation.cs b/src/libraries/Common/src/System/IO/StreamHelpers.CopyValidation.cs index 45bbd816df01..980ba1f5f96d 100644 --- a/src/libraries/Common/src/System/IO/StreamHelpers.CopyValidation.cs +++ b/src/libraries/Common/src/System/IO/StreamHelpers.CopyValidation.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.IO { diff --git a/src/libraries/Common/src/System/IO/StringParser.cs b/src/libraries/Common/src/System/IO/StringParser.cs index f6a2951ed30a..81210a5aac2d 100644 --- a/src/libraries/Common/src/System/IO/StringParser.cs +++ b/src/libraries/Common/src/System/IO/StringParser.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Common/src/System/IO/TempFileCollection.cs b/src/libraries/Common/src/System/IO/TempFileCollection.cs index 9f08f69d961b..4c29dc0e70c3 100644 --- a/src/libraries/Common/src/System/IO/TempFileCollection.cs +++ b/src/libraries/Common/src/System/IO/TempFileCollection.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections; using System.IO; diff --git a/src/libraries/Common/src/System/IO/Win32Marshal.cs b/src/libraries/Common/src/System/IO/Win32Marshal.cs index 35f7d2eefe9a..eccaee0f9b61 100644 --- a/src/libraries/Common/src/System/IO/Win32Marshal.cs +++ b/src/libraries/Common/src/System/IO/Win32Marshal.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics; diff --git a/src/libraries/System.Private.CoreLib/src/System/LocalAppContextSwitches.Common.cs b/src/libraries/Common/src/System/LocalAppContextSwitches.Common.cs similarity index 87% rename from src/libraries/System.Private.CoreLib/src/System/LocalAppContextSwitches.Common.cs rename to src/libraries/Common/src/System/LocalAppContextSwitches.Common.cs index a892b2162331..4457c0820d01 100644 --- a/src/libraries/System.Private.CoreLib/src/System/LocalAppContextSwitches.Common.cs +++ b/src/libraries/Common/src/System/LocalAppContextSwitches.Common.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Runtime.CompilerServices; @@ -11,6 +10,11 @@ namespace System // every framework assembly that implements any compatibility quirks. internal static partial class LocalAppContextSwitches { + // Returns value of given switch using provided cache. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static bool GetSwitchValue(string switchName, ref bool switchValue) => + AppContext.TryGetSwitch(switchName, out switchValue); + // Returns value of given switch using provided cache. [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static bool GetCachedSwitchValue(string switchName, ref int cachedSwitchValue) @@ -24,7 +28,6 @@ internal static bool GetCachedSwitchValue(string switchName, ref int cachedSwitc private static bool GetCachedSwitchValueInternal(string switchName, ref int cachedSwitchValue) { - bool hasSwitch = AppContext.TryGetSwitch(switchName, out bool isSwitchEnabled); if (!hasSwitch) { diff --git a/src/libraries/Common/src/System/Marvin.cs b/src/libraries/Common/src/System/Marvin.cs index 611fc5d51c2a..e8a907d2dff6 100644 --- a/src/libraries/Common/src/System/Marvin.cs +++ b/src/libraries/Common/src/System/Marvin.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/libraries/Common/src/System/Memory/FixedBufferExtensions.cs b/src/libraries/Common/src/System/Memory/FixedBufferExtensions.cs index bdb69bfc8f19..7db8d2e2f376 100644 --- a/src/libraries/Common/src/System/Memory/FixedBufferExtensions.cs +++ b/src/libraries/Common/src/System/Memory/FixedBufferExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/System/Memory/PointerMemoryManager.cs b/src/libraries/Common/src/System/Memory/PointerMemoryManager.cs index 892cbbb1a1a0..7f55f6b68120 100644 --- a/src/libraries/Common/src/System/Memory/PointerMemoryManager.cs +++ b/src/libraries/Common/src/System/Memory/PointerMemoryManager.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Buffers { diff --git a/src/libraries/Common/src/System/MutableDecimal.cs b/src/libraries/Common/src/System/MutableDecimal.cs index 4cb9a5632de9..ab40e9d4c158 100644 --- a/src/libraries/Common/src/System/MutableDecimal.cs +++ b/src/libraries/Common/src/System/MutableDecimal.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/System/Net/ArrayBuffer.cs b/src/libraries/Common/src/System/Net/ArrayBuffer.cs index 6c536d03267a..15ef10a501e4 100644 --- a/src/libraries/Common/src/System/Net/ArrayBuffer.cs +++ b/src/libraries/Common/src/System/Net/ArrayBuffer.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Buffers; diff --git a/src/libraries/Common/src/System/Net/ByteOrder.cs b/src/libraries/Common/src/System/Net/ByteOrder.cs index 5bf33658ffb1..58ec5ed8d0be 100644 --- a/src/libraries/Common/src/System/Net/ByteOrder.cs +++ b/src/libraries/Common/src/System/Net/ByteOrder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net { diff --git a/src/libraries/Common/src/System/Net/CaseInsensitiveAscii.cs b/src/libraries/Common/src/System/Net/CaseInsensitiveAscii.cs index 540b79ee7d44..3b83c8fab930 100644 --- a/src/libraries/Common/src/System/Net/CaseInsensitiveAscii.cs +++ b/src/libraries/Common/src/System/Net/CaseInsensitiveAscii.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Collections; diff --git a/src/libraries/Common/src/System/Net/CompletionPortHelper.Windows.cs b/src/libraries/Common/src/System/Net/CompletionPortHelper.Windows.cs index 1a4ea844ff17..281bdb81bdad 100644 --- a/src/libraries/Common/src/System/Net/CompletionPortHelper.Windows.cs +++ b/src/libraries/Common/src/System/Net/CompletionPortHelper.Windows.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/System/Net/ContextAwareResult.Unix.cs b/src/libraries/Common/src/System/Net/ContextAwareResult.Unix.cs index af384a439af5..3cfce3b37709 100644 --- a/src/libraries/Common/src/System/Net/ContextAwareResult.Unix.cs +++ b/src/libraries/Common/src/System/Net/ContextAwareResult.Unix.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net { diff --git a/src/libraries/Common/src/System/Net/ContextAwareResult.Windows.cs b/src/libraries/Common/src/System/Net/ContextAwareResult.Windows.cs index 2dc2c656b1c6..e7c57f9df35c 100644 --- a/src/libraries/Common/src/System/Net/ContextAwareResult.Windows.cs +++ b/src/libraries/Common/src/System/Net/ContextAwareResult.Windows.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Security.Principal; diff --git a/src/libraries/Common/src/System/Net/ContextAwareResult.cs b/src/libraries/Common/src/System/Net/ContextAwareResult.cs index b6391b829dcd..3e794116d8d7 100644 --- a/src/libraries/Common/src/System/Net/ContextAwareResult.cs +++ b/src/libraries/Common/src/System/Net/ContextAwareResult.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Threading; @@ -275,7 +274,7 @@ internal bool FinishPostingAsyncOp(ref CallbackClosure? closure) protected override void Cleanup() { base.Cleanup(); - if (NetEventSource.IsEnabled) NetEventSource.Info(this); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this); CleanupInternal(); } @@ -299,7 +298,7 @@ private bool CaptureOrComplete(ref ExecutionContext? cachedContext, bool returnC // capturing the context won't be sufficient. if ((_flags & StateFlags.CaptureIdentity) != 0 && !InternalPeekCompleted && (!capturingContext)) { - if (NetEventSource.IsEnabled) NetEventSource.Info(this, "starting identity capture"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, "starting identity capture"); SafeCaptureIdentity(); } @@ -307,7 +306,7 @@ private bool CaptureOrComplete(ref ExecutionContext? cachedContext, bool returnC // Note that Capture() can return null, for example if SuppressFlow() is in effect. if (capturingContext && !InternalPeekCompleted) { - if (NetEventSource.IsEnabled) NetEventSource.Info(this, "starting capture"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, "starting capture"); if (cachedContext == null) { @@ -327,12 +326,12 @@ private bool CaptureOrComplete(ref ExecutionContext? cachedContext, bool returnC } } - if (NetEventSource.IsEnabled) NetEventSource.Info(this, $"_context:{_context}"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, $"_context:{_context}"); } else { // Otherwise we have to have completed synchronously, or not needed the context. - if (NetEventSource.IsEnabled) NetEventSource.Info(this, "Skipping capture"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, "Skipping capture"); cachedContext = null; if (AsyncCallback != null && !CompletedSynchronously) @@ -348,7 +347,7 @@ private bool CaptureOrComplete(ref ExecutionContext? cachedContext, bool returnC DebugProtectState(false); if (CompletedSynchronously) { - if (NetEventSource.IsEnabled) NetEventSource.Info(this, "Completing synchronously"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, "Completing synchronously"); base.Complete(IntPtr.Zero); return true; } @@ -359,7 +358,7 @@ private bool CaptureOrComplete(ref ExecutionContext? cachedContext, bool returnC // This method is guaranteed to be called only once. If called with a non-zero userToken, the context is not flowed. protected override void Complete(IntPtr userToken) { - if (NetEventSource.IsEnabled) NetEventSource.Info(this, $"_context(set):{_context != null} userToken:{userToken}"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, $"_context(set):{_context != null} userToken:{userToken}"); // If no flowing, just complete regularly. if ((_flags & StateFlags.PostBlockStarted) == 0) @@ -391,7 +390,7 @@ protected override void Complete(IntPtr userToken) private void CompleteCallback() { - if (NetEventSource.IsEnabled) NetEventSource.Info(this, "Context set, calling callback."); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, "Context set, calling callback."); base.Complete(IntPtr.Zero); } diff --git a/src/libraries/Common/src/System/Net/ContextFlagsAdapterPal.Unix.cs b/src/libraries/Common/src/System/Net/ContextFlagsAdapterPal.Unix.cs index 77be48941301..6ded2dcc321f 100644 --- a/src/libraries/Common/src/System/Net/ContextFlagsAdapterPal.Unix.cs +++ b/src/libraries/Common/src/System/Net/ContextFlagsAdapterPal.Unix.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/src/System/Net/ContextFlagsAdapterPal.Windows.cs b/src/libraries/Common/src/System/Net/ContextFlagsAdapterPal.Windows.cs index 5ed6e347d801..5ce5bf0410d7 100644 --- a/src/libraries/Common/src/System/Net/ContextFlagsAdapterPal.Windows.cs +++ b/src/libraries/Common/src/System/Net/ContextFlagsAdapterPal.Windows.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/src/System/Net/ContextFlagsPal.cs b/src/libraries/Common/src/System/Net/ContextFlagsPal.cs index d4df40b5974c..6dad121c1535 100644 --- a/src/libraries/Common/src/System/Net/ContextFlagsPal.cs +++ b/src/libraries/Common/src/System/Net/ContextFlagsPal.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/src/System/Net/CookieComparer.cs b/src/libraries/Common/src/System/Net/CookieComparer.cs index 711f3e9080bd..7d511ace0a9a 100644 --- a/src/libraries/Common/src/System/Net/CookieComparer.cs +++ b/src/libraries/Common/src/System/Net/CookieComparer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net { diff --git a/src/libraries/Common/src/System/Net/CookieFields.cs b/src/libraries/Common/src/System/Net/CookieFields.cs index 032be3b25d1e..49cfb6c05804 100644 --- a/src/libraries/Common/src/System/Net/CookieFields.cs +++ b/src/libraries/Common/src/System/Net/CookieFields.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net { diff --git a/src/libraries/Common/src/System/Net/CookieParser.cs b/src/libraries/Common/src/System/Net/CookieParser.cs index c16c3fd39a51..c50ac6d02ccc 100644 --- a/src/libraries/Common/src/System/Net/CookieParser.cs +++ b/src/libraries/Common/src/System/Net/CookieParser.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics; @@ -525,7 +524,7 @@ private static bool InternalSetNameMethod(Cookie cookie, string? value) return cookie.InternalSetName(value); } #else - private static Func? s_internalSetNameMethod = null; + private static Func? s_internalSetNameMethod; private static Func InternalSetNameMethod { get @@ -546,7 +545,7 @@ private static bool InternalSetNameMethod(Cookie cookie, string? value) } #endif - private static FieldInfo? s_isQuotedDomainField = null; + private static FieldInfo? s_isQuotedDomainField; private static FieldInfo IsQuotedDomainField { get diff --git a/src/libraries/Common/src/System/Net/DebugCriticalHandleMinusOneIsInvalid.cs b/src/libraries/Common/src/System/Net/DebugCriticalHandleMinusOneIsInvalid.cs index 254c15c44c0f..9d6a144e98a0 100644 --- a/src/libraries/Common/src/System/Net/DebugCriticalHandleMinusOneIsInvalid.cs +++ b/src/libraries/Common/src/System/Net/DebugCriticalHandleMinusOneIsInvalid.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using Microsoft.Win32.SafeHandles; @@ -19,15 +18,12 @@ internal abstract class DebugCriticalHandleMinusOneIsInvalid : CriticalHandleMin protected DebugCriticalHandleMinusOneIsInvalid() : base() { _trace = "WARNING! GC-ed >>" + this.GetType().FullName + "<< (should be explicitly closed) \r\n"; - if (NetEventSource.IsEnabled) NetEventSource.Info(this, "Creating SafeHandle"); -#if TRACE_VERBOSE - _trace += Environment.StackTrace; -#endif //TRACE_VERBOSE + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, "Creating SafeHandle"); } ~DebugCriticalHandleMinusOneIsInvalid() { - if (NetEventSource.IsEnabled) NetEventSource.Info(this, _trace); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, _trace); } } #endif // DEBUG diff --git a/src/libraries/Common/src/System/Net/DebugCriticalHandleZeroOrMinusOneIsInvalid.cs b/src/libraries/Common/src/System/Net/DebugCriticalHandleZeroOrMinusOneIsInvalid.cs index fe594f12edd2..a21398c09ab2 100644 --- a/src/libraries/Common/src/System/Net/DebugCriticalHandleZeroOrMinusOneIsInvalid.cs +++ b/src/libraries/Common/src/System/Net/DebugCriticalHandleZeroOrMinusOneIsInvalid.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using Microsoft.Win32.SafeHandles; @@ -19,15 +18,12 @@ internal abstract class DebugCriticalHandleZeroOrMinusOneIsInvalid : CriticalHan protected DebugCriticalHandleZeroOrMinusOneIsInvalid() : base() { _trace = "WARNING! GC-ed >>" + this.GetType().FullName + "<< (should be explicitly closed) \r\n"; - if (NetEventSource.IsEnabled) NetEventSource.Info(this, "Creating SafeHandle"); -#if TRACE_VERBOSE - _trace += Environment.StackTrace; -#endif //TRACE_VERBOSE + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, "Creating SafeHandle"); } ~DebugCriticalHandleZeroOrMinusOneIsInvalid() { - if (NetEventSource.IsEnabled) NetEventSource.Info(this, _trace); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, _trace); } } #endif // DEBUG diff --git a/src/libraries/Common/src/System/Net/DebugSafeHandle.cs b/src/libraries/Common/src/System/Net/DebugSafeHandle.cs index 8cbe492a886c..96032902719e 100644 --- a/src/libraries/Common/src/System/Net/DebugSafeHandle.cs +++ b/src/libraries/Common/src/System/Net/DebugSafeHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using Microsoft.Win32.SafeHandles; @@ -30,14 +29,11 @@ protected DebugSafeHandle(IntPtr invalidValue, bool ownsHandle) : base(ownsHandl private void Trace() { _trace = "WARNING! GC-ed >>" + this.GetType().ToString() + "<< (should be explicitly closed) \r\n"; -#if TRACE_VERBOSE - _trace += Environment.StackTrace; -#endif } ~DebugSafeHandle() { - if (NetEventSource.IsEnabled) NetEventSource.Info(this, _trace); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, _trace); } } #endif // DEBUG diff --git a/src/libraries/Common/src/System/Net/DebugSafeHandleMinusOneIsInvalid.cs b/src/libraries/Common/src/System/Net/DebugSafeHandleMinusOneIsInvalid.cs index 633ea98f90b2..eb0de438b504 100644 --- a/src/libraries/Common/src/System/Net/DebugSafeHandleMinusOneIsInvalid.cs +++ b/src/libraries/Common/src/System/Net/DebugSafeHandleMinusOneIsInvalid.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using Microsoft.Win32.SafeHandles; @@ -19,15 +18,12 @@ internal abstract class DebugSafeHandleMinusOneIsInvalid : SafeHandleMinusOneIsI protected DebugSafeHandleMinusOneIsInvalid(bool ownsHandle) : base(ownsHandle) { _trace = "WARNING! GC-ed >>" + this.GetType().FullName + "<< (should be explicitly closed) \r\n"; - if (NetEventSource.IsEnabled) NetEventSource.Info(this, "Creating SafeHandle"); -#if TRACE_VERBOSE - _trace += Environment.StackTrace; -#endif //TRACE_VERBOSE + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, "Creating SafeHandle"); } ~DebugSafeHandleMinusOneIsInvalid() { - if (NetEventSource.IsEnabled) NetEventSource.Info(this, _trace); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, _trace); } } #endif // DEBUG diff --git a/src/libraries/Common/src/System/Net/ExceptionCheck.cs b/src/libraries/Common/src/System/Net/ExceptionCheck.cs index fa9f363c5718..e934ac0dd83d 100644 --- a/src/libraries/Common/src/System/Net/ExceptionCheck.cs +++ b/src/libraries/Common/src/System/Net/ExceptionCheck.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net { diff --git a/src/libraries/Common/src/System/Net/Http/HttpHandlerDefaults.cs b/src/libraries/Common/src/System/Net/Http/HttpHandlerDefaults.cs index b32f4d7d81d9..d42462f6f856 100644 --- a/src/libraries/Common/src/System/Net/Http/HttpHandlerDefaults.cs +++ b/src/libraries/Common/src/System/Net/Http/HttpHandlerDefaults.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Threading; diff --git a/src/libraries/Common/src/System/Net/Http/TlsCertificateExtensions.cs b/src/libraries/Common/src/System/Net/Http/TlsCertificateExtensions.cs index 16d9a077802c..0bdc3056ebe8 100644 --- a/src/libraries/Common/src/System/Net/Http/TlsCertificateExtensions.cs +++ b/src/libraries/Common/src/System/Net/Http/TlsCertificateExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/System/Net/Http/WinInetProxyHelper.cs b/src/libraries/Common/src/System/Net/Http/WinInetProxyHelper.cs index f597c7d30e08..f19964af9eca 100644 --- a/src/libraries/Common/src/System/Net/Http/WinInetProxyHelper.cs +++ b/src/libraries/Common/src/System/Net/Http/WinInetProxyHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; @@ -17,7 +16,7 @@ internal class WinInetProxyHelper private const int RecentAutoDetectionInterval = 120_000; // 2 minutes in milliseconds. private readonly string? _autoConfigUrl, _proxy, _proxyBypass; private readonly bool _autoDetect; - private readonly bool _useProxy = false; + private readonly bool _useProxy; private bool _autoDetectionFailed; private int _lastTimeAutoDetectionFailed; // Environment.TickCount units (milliseconds). @@ -34,7 +33,7 @@ public WinInetProxyHelper() _proxy = Marshal.PtrToStringUni(proxyConfig.Proxy)!; _proxyBypass = Marshal.PtrToStringUni(proxyConfig.ProxyBypass)!; - if (NetEventSource.IsEnabled) + if (NetEventSource.Log.IsEnabled()) { NetEventSource.Info(this, $"AutoConfigUrl={AutoConfigUrl}, AutoDetect={AutoDetect}, Proxy={Proxy}, ProxyBypass={ProxyBypass}"); } @@ -45,10 +44,10 @@ public WinInetProxyHelper() { // We match behavior of WINHTTP_ACCESS_TYPE_AUTOMATIC_PROXY and ignore errors. int lastError = Marshal.GetLastWin32Error(); - if (NetEventSource.IsEnabled) NetEventSource.Error(this, $"error={lastError}"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(this, $"error={lastError}"); } - if (NetEventSource.IsEnabled) NetEventSource.Info(this, $"_useProxy={_useProxy}"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, $"_useProxy={_useProxy}"); } finally @@ -129,7 +128,7 @@ public bool GetProxyForUrl( ref autoProxyOptions, out proxyInfo)) { - if (NetEventSource.IsEnabled) NetEventSource.Info(this, "Using autoconfig proxy settings"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, "Using autoconfig proxy settings"); useProxy = true; break; @@ -137,7 +136,7 @@ public bool GetProxyForUrl( else { var lastError = Marshal.GetLastWin32Error(); - if (NetEventSource.IsEnabled) NetEventSource.Error(this, $"error={lastError}"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(this, $"error={lastError}"); if (lastError == Interop.WinHttp.ERROR_WINHTTP_LOGIN_FAILURE) { @@ -173,11 +172,11 @@ public bool GetProxyForUrl( proxyInfo.ProxyBypass = string.IsNullOrEmpty(ProxyBypass) ? IntPtr.Zero : Marshal.StringToHGlobalUni(ProxyBypass); - if (NetEventSource.IsEnabled) NetEventSource.Info(this, $"Fallback to Proxy={Proxy}, ProxyBypass={ProxyBypass}"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, $"Fallback to Proxy={Proxy}, ProxyBypass={ProxyBypass}"); useProxy = true; } - if (NetEventSource.IsEnabled) NetEventSource.Info(this, $"useProxy={useProxy}"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, $"useProxy={useProxy}"); return useProxy; } diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/DynamicTable.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/DynamicTable.cs index 5a8fdf170f0d..cb6a76350e2d 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/DynamicTable.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/DynamicTable.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.Http.HPack { @@ -25,7 +24,7 @@ public DynamicTable(int maxSize) public int MaxSize => _maxSize; - public HeaderField this[int index] + public ref readonly HeaderField this[int index] { get { @@ -42,7 +41,7 @@ public HeaderField this[int index] index += _buffer.Length; } - return _buffer[index]; + return ref _buffer[index]; } } diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/H2StaticTable.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/H2StaticTable.cs index 7f3b77558248..9324c502ee0e 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/H2StaticTable.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/H2StaticTable.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Text; @@ -9,23 +8,22 @@ namespace System.Net.Http.HPack { internal static class H2StaticTable { - // Index of status code into s_staticDecoderTable - private static readonly Dictionary s_statusIndex = new Dictionary - { - [200] = 8, - [204] = 9, - [206] = 10, - [304] = 11, - [400] = 12, - [404] = 13, - [500] = 14, - }; - public static int Count => s_staticDecoderTable.Length; - public static HeaderField Get(int index) => s_staticDecoderTable[index]; + public static ref readonly HeaderField Get(int index) => ref s_staticDecoderTable[index]; - public static IReadOnlyDictionary StatusIndex => s_statusIndex; + public static int GetStatusIndex(int status) => + status switch + { + 200 => 8, + 204 => 9, + 206 => 10, + 304 => 11, + 400 => 12, + 404 => 13, + 500 => 14, + _ => throw new ArgumentOutOfRangeException() + }; private static readonly HeaderField[] s_staticDecoderTable = new HeaderField[] { diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HPackDecoder.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HPackDecoder.cs index 3fe3c86243d3..bb9b988e8968 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HPackDecoder.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HPackDecoder.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Buffers; using System.Diagnostics; +using System.Numerics; #if KESTREL using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http; #endif @@ -37,7 +37,6 @@ private enum State : byte // | 1 | Index (7+) | // +---+---------------------------+ private const byte IndexedHeaderFieldMask = 0x80; - private const byte IndexedHeaderFieldRepresentation = 0x80; // http://httpwg.org/specs/rfc7541.html#rfc.section.6.2.1 // 0 1 2 3 4 5 6 7 @@ -45,7 +44,6 @@ private enum State : byte // | 0 | 1 | Index (6+) | // +---+---+-----------------------+ private const byte LiteralHeaderFieldWithIncrementalIndexingMask = 0xc0; - private const byte LiteralHeaderFieldWithIncrementalIndexingRepresentation = 0x40; // http://httpwg.org/specs/rfc7541.html#rfc.section.6.2.2 // 0 1 2 3 4 5 6 7 @@ -53,7 +51,6 @@ private enum State : byte // | 0 | 0 | 0 | 0 | Index (4+) | // +---+---+-----------------------+ private const byte LiteralHeaderFieldWithoutIndexingMask = 0xf0; - private const byte LiteralHeaderFieldWithoutIndexingRepresentation = 0x00; // http://httpwg.org/specs/rfc7541.html#rfc.section.6.2.3 // 0 1 2 3 4 5 6 7 @@ -61,7 +58,6 @@ private enum State : byte // | 0 | 0 | 0 | 1 | Index (4+) | // +---+---+-----------------------+ private const byte LiteralHeaderFieldNeverIndexedMask = 0xf0; - private const byte LiteralHeaderFieldNeverIndexedRepresentation = 0x10; // http://httpwg.org/specs/rfc7541.html#rfc.section.6.3 // 0 1 2 3 4 5 6 7 @@ -69,7 +65,6 @@ private enum State : byte // | 0 | 0 | 1 | Max size (5+) | // +---+---------------------------+ private const byte DynamicTableSizeUpdateMask = 0xe0; - private const byte DynamicTableSizeUpdateRepresentation = 0x20; // http://httpwg.org/specs/rfc7541.html#rfc.section.5.2 // 0 1 2 3 4 5 6 7 @@ -92,6 +87,8 @@ private enum State : byte private byte[] _stringOctets; private byte[] _headerNameOctets; private byte[] _headerValueOctets; + private (int start, int length)? _headerNameRange; + private (int start, int length)? _headerValueRange; private State _state = State.Ready; private byte[]? _headerName; @@ -124,107 +121,247 @@ public void Decode(in ReadOnlySequence data, bool endHeaders, IHttpHeaders { foreach (ReadOnlyMemory segment in data) { - DecodeInternal(segment.Span, endHeaders, handler); + DecodeInternal(segment.Span, handler); } CheckIncompleteHeaderBlock(endHeaders); } - public void Decode(ReadOnlySpan data, bool endHeaders, IHttpHeadersHandler? handler) + public void Decode(ReadOnlySpan data, bool endHeaders, IHttpHeadersHandler handler) { - DecodeInternal(data, endHeaders, handler); + DecodeInternal(data, handler); CheckIncompleteHeaderBlock(endHeaders); } - private void DecodeInternal(ReadOnlySpan data, bool endHeaders, IHttpHeadersHandler? handler) + private void DecodeInternal(ReadOnlySpan data, IHttpHeadersHandler handler) { - int intResult; + int currentIndex = 0; - for (int i = 0; i < data.Length; i++) + do { - byte b = data[i]; switch (_state) { case State.Ready: - // TODO: Instead of masking and comparing each prefix value, - // consider doing a 16-way switch on the first four bits (which is the max prefix size). - // Look at this once we have more concrete perf data. - if ((b & IndexedHeaderFieldMask) == IndexedHeaderFieldRepresentation) - { - _headersObserved = true; + Parse(data, ref currentIndex, handler); + break; + case State.HeaderFieldIndex: + ParseHeaderFieldIndex(data, ref currentIndex, handler); + break; + case State.HeaderNameIndex: + ParseHeaderNameIndex(data, ref currentIndex, handler); + break; + case State.HeaderNameLength: + ParseHeaderNameLength(data, ref currentIndex, handler); + break; + case State.HeaderNameLengthContinue: + ParseHeaderNameLengthContinue(data, ref currentIndex, handler); + break; + case State.HeaderName: + ParseHeaderName(data, ref currentIndex, handler); + break; + case State.HeaderValueLength: + ParseHeaderValueLength(data, ref currentIndex, handler); + break; + case State.HeaderValueLengthContinue: + ParseHeaderValueLengthContinue(data, ref currentIndex, handler); + break; + case State.HeaderValue: + ParseHeaderValue(data, ref currentIndex, handler); + break; + case State.DynamicTableSizeUpdate: + ParseDynamicTableSizeUpdate(data, ref currentIndex); + break; + default: + // Can't happen + Debug.Fail("HPACK decoder reach an invalid state"); + throw new NotImplementedException(_state.ToString()); + } + } + // Parse methods each check the length. This check is to see whether there is still data available + // and to continue parsing. + while (currentIndex < data.Length); + + // If a header range was set, but the value was not in the data, then copy the range + // to the name buffer. Must copy because because the data will be replaced and the range + // will no longer be valid. + if (_headerNameRange != null) + { + EnsureStringCapacity(ref _headerNameOctets); + _headerName = _headerNameOctets; - int val = b & ~IndexedHeaderFieldMask; + ReadOnlySpan headerBytes = data.Slice(_headerNameRange.GetValueOrDefault().start, _headerNameRange.GetValueOrDefault().length); + headerBytes.CopyTo(_headerName); + _headerNameLength = headerBytes.Length; + _headerNameRange = null; + } + } - if (_integerDecoder.BeginTryDecode((byte)val, IndexedHeaderFieldPrefix, out intResult)) - { - OnIndexedHeaderField(intResult, handler); - } - else - { - _state = State.HeaderFieldIndex; - } - } - else if ((b & LiteralHeaderFieldWithIncrementalIndexingMask) == LiteralHeaderFieldWithIncrementalIndexingRepresentation) - { - _headersObserved = true; + private void ParseDynamicTableSizeUpdate(ReadOnlySpan data, ref int currentIndex) + { + if (TryDecodeInteger(data, ref currentIndex, out int intResult)) + { + SetDynamicHeaderTableSize(intResult); + _state = State.Ready; + } + } - _index = true; - int val = b & ~LiteralHeaderFieldWithIncrementalIndexingMask; + private void ParseHeaderValueLength(ReadOnlySpan data, ref int currentIndex, IHttpHeadersHandler handler) + { + if (currentIndex < data.Length) + { + byte b = data[currentIndex++]; - if (val == 0) - { - _state = State.HeaderNameLength; - } - else if (_integerDecoder.BeginTryDecode((byte)val, LiteralHeaderFieldWithIncrementalIndexingPrefix, out intResult)) - { - OnIndexedHeaderName(intResult); - } - else - { - _state = State.HeaderNameIndex; - } - } - else if ((b & LiteralHeaderFieldWithoutIndexingMask) == LiteralHeaderFieldWithoutIndexingRepresentation) - { - _headersObserved = true; + _huffman = IsHuffmanEncoded(b); + + if (_integerDecoder.BeginTryDecode((byte)(b & ~HuffmanMask), StringLengthPrefix, out int intResult)) + { + OnStringLength(intResult, nextState: State.HeaderValue); - _index = false; - int val = b & ~LiteralHeaderFieldWithoutIndexingMask; + if (intResult == 0) + { + OnString(nextState: State.Ready); + ProcessHeaderValue(data, handler); + } + else + { + ParseHeaderValue(data, ref currentIndex, handler); + } + } + else + { + _state = State.HeaderValueLengthContinue; + ParseHeaderValueLengthContinue(data, ref currentIndex, handler); + } + } + } - if (val == 0) - { - _state = State.HeaderNameLength; - } - else if (_integerDecoder.BeginTryDecode((byte)val, LiteralHeaderFieldWithoutIndexingPrefix, out intResult)) - { - OnIndexedHeaderName(intResult); - } - else - { - _state = State.HeaderNameIndex; - } - } - else if ((b & LiteralHeaderFieldNeverIndexedMask) == LiteralHeaderFieldNeverIndexedRepresentation) + private void ParseHeaderNameLengthContinue(ReadOnlySpan data, ref int currentIndex, IHttpHeadersHandler handler) + { + if (TryDecodeInteger(data, ref currentIndex, out int intResult)) + { + // IntegerDecoder disallows overlong encodings, where an integer is encoded with more bytes than is strictly required. + // 0 should always be represented by a single byte, so we shouldn't need to check for it in the continuation case. + Debug.Assert(intResult != 0, "A header name length of 0 should never be encoded with a continuation byte."); + + OnStringLength(intResult, nextState: State.HeaderName); + ParseHeaderName(data, ref currentIndex, handler); + } + } + + private void ParseHeaderValueLengthContinue(ReadOnlySpan data, ref int currentIndex, IHttpHeadersHandler handler) + { + if (TryDecodeInteger(data, ref currentIndex, out int intResult)) + { + // 0 should always be represented by a single byte, so we shouldn't need to check for it in the continuation case. + Debug.Assert(intResult != 0, "A header value length of 0 should never be encoded with a continuation byte."); + + OnStringLength(intResult, nextState: State.HeaderValue); + ParseHeaderValue(data, ref currentIndex, handler); + } + } + + private void ParseHeaderFieldIndex(ReadOnlySpan data, ref int currentIndex, IHttpHeadersHandler handler) + { + if (TryDecodeInteger(data, ref currentIndex, out int intResult)) + { + OnIndexedHeaderField(intResult, handler); + } + } + + private void ParseHeaderNameIndex(ReadOnlySpan data, ref int currentIndex, IHttpHeadersHandler handler) + { + if (TryDecodeInteger(data, ref currentIndex, out int intResult)) + { + OnIndexedHeaderName(intResult); + ParseHeaderValueLength(data, ref currentIndex, handler); + } + } + + private void ParseHeaderNameLength(ReadOnlySpan data, ref int currentIndex, IHttpHeadersHandler handler) + { + if (currentIndex < data.Length) + { + byte b = data[currentIndex++]; + + _huffman = IsHuffmanEncoded(b); + + if (_integerDecoder.BeginTryDecode((byte)(b & ~HuffmanMask), StringLengthPrefix, out int intResult)) + { + if (intResult == 0) + { + throw new HPackDecodingException(SR.Format(SR.net_http_invalid_header_name, "")); + } + + OnStringLength(intResult, nextState: State.HeaderName); + ParseHeaderName(data, ref currentIndex, handler); + } + else + { + _state = State.HeaderNameLengthContinue; + ParseHeaderNameLengthContinue(data, ref currentIndex, handler); + } + } + } + + private void Parse(ReadOnlySpan data, ref int currentIndex, IHttpHeadersHandler handler) + { + if (currentIndex < data.Length) + { + Debug.Assert(_state == State.Ready, "Should be ready to parse a new header."); + + byte b = data[currentIndex++]; + + switch (BitOperations.LeadingZeroCount(b) - 24) // byte 'b' is extended to uint, so will have 24 extra 0s. + { + case 0: // Indexed Header Field { _headersObserved = true; - _index = false; - int val = b & ~LiteralHeaderFieldNeverIndexedMask; + int val = b & ~IndexedHeaderFieldMask; - if (val == 0) + if (_integerDecoder.BeginTryDecode((byte)val, IndexedHeaderFieldPrefix, out int intResult)) { - _state = State.HeaderNameLength; - } - else if (_integerDecoder.BeginTryDecode((byte)val, LiteralHeaderFieldNeverIndexedPrefix, out intResult)) - { - OnIndexedHeaderName(intResult); + OnIndexedHeaderField(intResult, handler); } else { - _state = State.HeaderNameIndex; + _state = State.HeaderFieldIndex; + ParseHeaderFieldIndex(data, ref currentIndex, handler); } + break; } - else if ((b & DynamicTableSizeUpdateMask) == DynamicTableSizeUpdateRepresentation) + case 1: // Literal Header Field with Incremental Indexing + ParseLiteralHeaderField( + data, + ref currentIndex, + b, + LiteralHeaderFieldWithIncrementalIndexingMask, + LiteralHeaderFieldWithIncrementalIndexingPrefix, + index: true, + handler); + break; + case 4: + default: // Literal Header Field without Indexing + ParseLiteralHeaderField( + data, + ref currentIndex, + b, + LiteralHeaderFieldWithoutIndexingMask, + LiteralHeaderFieldWithoutIndexingPrefix, + index: false, + handler); + break; + case 3: // Literal Header Field Never Indexed + ParseLiteralHeaderField( + data, + ref currentIndex, + b, + LiteralHeaderFieldNeverIndexedMask, + LiteralHeaderFieldNeverIndexedPrefix, + index: false, + handler); + break; + case 2: // Dynamic Table Size Update { // https://tools.ietf.org/html/rfc7541#section-4.2 // This dynamic table size @@ -235,125 +372,107 @@ private void DecodeInternal(ReadOnlySpan data, bool endHeaders, IHttpHeade throw new HPackDecodingException(SR.net_http_hpack_late_dynamic_table_size_update); } - if (_integerDecoder.BeginTryDecode((byte)(b & ~DynamicTableSizeUpdateMask), DynamicTableSizeUpdatePrefix, out intResult)) + if (_integerDecoder.BeginTryDecode((byte)(b & ~DynamicTableSizeUpdateMask), DynamicTableSizeUpdatePrefix, out int intResult)) { SetDynamicHeaderTableSize(intResult); } else { _state = State.DynamicTableSizeUpdate; + ParseDynamicTableSizeUpdate(data, ref currentIndex); } + break; } - else - { - // Can't happen - Debug.Fail("Unreachable code"); - throw new InvalidOperationException("Unreachable code."); - } - - break; - case State.HeaderFieldIndex: - if (_integerDecoder.TryDecode(b, out intResult)) - { - OnIndexedHeaderField(intResult, handler); - } - - break; - case State.HeaderNameIndex: - if (_integerDecoder.TryDecode(b, out intResult)) - { - OnIndexedHeaderName(intResult); - } - - break; - case State.HeaderNameLength: - _huffman = (b & HuffmanMask) != 0; - - if (_integerDecoder.BeginTryDecode((byte)(b & ~HuffmanMask), StringLengthPrefix, out intResult)) - { - if (intResult == 0) - { - throw new HPackDecodingException(SR.Format(SR.net_http_invalid_header_name, "")); - } - - OnStringLength(intResult, nextState: State.HeaderName); - } - else - { - _state = State.HeaderNameLengthContinue; - } - - break; - case State.HeaderNameLengthContinue: - if (_integerDecoder.TryDecode(b, out intResult)) - { - // IntegerDecoder disallows overlong encodings, where an integer is encoded with more bytes than is strictly required. - // 0 should always be represented by a single byte, so we shouldn't need to check for it in the continuation case. - Debug.Assert(intResult != 0, "A header name length of 0 should never be encoded with a continuation byte."); - - OnStringLength(intResult, nextState: State.HeaderName); - } + } + } + } - break; - case State.HeaderName: - _stringOctets[_stringIndex++] = b; + private void ParseLiteralHeaderField(ReadOnlySpan data, ref int currentIndex, byte b, byte mask, byte indexPrefix, bool index, IHttpHeadersHandler handler) + { + _headersObserved = true; - if (_stringIndex == _stringLength) - { - OnString(nextState: State.HeaderValueLength); - } + _index = index; + int val = b & ~mask; - break; - case State.HeaderValueLength: - _huffman = (b & HuffmanMask) != 0; + if (val == 0) + { + _state = State.HeaderNameLength; + ParseHeaderNameLength(data, ref currentIndex, handler); + } + else + { + if (_integerDecoder.BeginTryDecode((byte)val, indexPrefix, out int intResult)) + { + OnIndexedHeaderName(intResult); + ParseHeaderValueLength(data, ref currentIndex, handler); + } + else + { + _state = State.HeaderNameIndex; + ParseHeaderNameIndex(data, ref currentIndex, handler); + } + } + } - if (_integerDecoder.BeginTryDecode((byte)(b & ~HuffmanMask), StringLengthPrefix, out intResult)) - { - OnStringLength(intResult, nextState: State.HeaderValue); + private void ParseHeaderName(ReadOnlySpan data, ref int currentIndex, IHttpHeadersHandler handler) + { + // Read remaining chars, up to the length of the current data + int count = Math.Min(_stringLength - _stringIndex, data.Length - currentIndex); - if (intResult == 0) - { - ProcessHeaderValue(handler); - } - } - else - { - _state = State.HeaderValueLengthContinue; - } + // Check whether the whole string is available in the data and no decompression required. + // If string is good then mark its range. + // NOTE: it may need to be copied to buffer later the if value is not current data. + if (count == _stringLength && !_huffman) + { + // Fast path. Store the range rather than copying. + _headerNameRange = (start: currentIndex, count); + currentIndex += count; - break; - case State.HeaderValueLengthContinue: - if (_integerDecoder.TryDecode(b, out intResult)) - { - // IntegerDecoder disallows overlong encodings where an integer is encoded with more bytes than is strictly required. - // 0 should always be represented by a single byte, so we shouldn't need to check for it in the continuation case. - Debug.Assert(intResult != 0, "A header value length of 0 should never be encoded with a continuation byte."); + _state = State.HeaderValueLength; + } + else + { + // Copy string to temporary buffer. + // _stringOctets was already + data.Slice(currentIndex, count).CopyTo(_stringOctets.AsSpan(_stringIndex)); + _stringIndex += count; + currentIndex += count; - OnStringLength(intResult, nextState: State.HeaderValue); - } + if (_stringIndex == _stringLength) + { + OnString(nextState: State.HeaderValueLength); + ParseHeaderValueLength(data, ref currentIndex, handler); + } + } + } - break; - case State.HeaderValue: - _stringOctets[_stringIndex++] = b; + private void ParseHeaderValue(ReadOnlySpan data, ref int currentIndex, IHttpHeadersHandler handler) + { + // Read remaining chars, up to the length of the current data + int count = Math.Min(_stringLength - _stringIndex, data.Length - currentIndex); - if (_stringIndex == _stringLength) - { - ProcessHeaderValue(handler); - } + // Check whether the whole string is available in the data and no decompressed required. + // If string is good then mark its range. + if (count == _stringLength && !_huffman) + { + // Fast path. Store the range rather than copying. + _headerValueRange = (start: currentIndex, count); + currentIndex += count; - break; - case State.DynamicTableSizeUpdate: - if (_integerDecoder.TryDecode(b, out intResult)) - { - SetDynamicHeaderTableSize(intResult); - _state = State.Ready; - } + _state = State.Ready; + ProcessHeaderValue(data, handler); + } + else + { + // Copy string to temporary buffer. + data.Slice(currentIndex, count).CopyTo(_stringOctets.AsSpan(_stringIndex)); + _stringIndex += count; + currentIndex += count; - break; - default: - // Can't happen - Debug.Fail("HPACK decoder reach an invalid state"); - throw new NotImplementedException(_state.ToString()); + if (_stringIndex == _stringLength) + { + OnString(nextState: State.Ready); + ProcessHeaderValue(data, handler); } } } @@ -371,14 +490,20 @@ private void CheckIncompleteHeaderBlock(bool endHeaders) } } - private void ProcessHeaderValue(IHttpHeadersHandler? handler) + private void ProcessHeaderValue(ReadOnlySpan data, IHttpHeadersHandler handler) { - OnString(nextState: State.Ready); + ReadOnlySpan headerNameSpan = _headerNameRange == null + ? new Span(_headerName, 0, _headerNameLength) + : data.Slice(_headerNameRange.GetValueOrDefault().start, _headerNameRange.GetValueOrDefault().length); + + ReadOnlySpan headerValueSpan = _headerValueRange == null + ? new Span(_headerValueOctets, 0, _headerValueLength) + : data.Slice(_headerValueRange.GetValueOrDefault().start, _headerValueRange.GetValueOrDefault().length); - var headerNameSpan = new Span(_headerName, 0, _headerNameLength); - var headerValueSpan = new Span(_headerValueOctets, 0, _headerValueLength); + handler.OnHeader(headerNameSpan, headerValueSpan); - handler?.OnHeader(headerNameSpan, headerValueSpan); + _headerNameRange = null; + _headerValueRange = null; if (_index) { @@ -395,18 +520,17 @@ public void CompleteDecode() } } - private void OnIndexedHeaderField(int index, IHttpHeadersHandler? handler) + private void OnIndexedHeaderField(int index, IHttpHeadersHandler handler) { - HeaderField header = GetHeader(index); - handler?.OnHeader(header.Name, header.Value); + ref readonly HeaderField header = ref GetHeader(index); + handler.OnHeader(header.Name, header.Value); _state = State.Ready; } private void OnIndexedHeaderName(int index) { - HeaderField header = GetHeader(index); - _headerName = header.Name; - _headerNameLength = header.Name.Length; + _headerName = GetHeader(index).Name; + _headerNameLength = _headerName.Length; _state = State.HeaderValueLength; } @@ -437,11 +561,7 @@ int Decode(ref byte[] dst) } else { - if (dst.Length < _stringLength) - { - dst = new byte[Math.Max(_stringLength, dst.Length * 2)]; - } - + EnsureStringCapacity(ref dst); Buffer.BlockCopy(_stringOctets, 0, dst, 0, _stringLength); return _stringLength; } @@ -467,13 +587,41 @@ int Decode(ref byte[] dst) _state = nextState; } - private HeaderField GetHeader(int index) + private void EnsureStringCapacity(ref byte[] dst) + { + if (dst.Length < _stringLength) + { + dst = new byte[Math.Max(_stringLength, dst.Length * 2)]; + } + } + + private bool TryDecodeInteger(ReadOnlySpan data, ref int currentIndex, out int result) + { + for (; currentIndex < data.Length; currentIndex++) + { + if (_integerDecoder.TryDecode(data[currentIndex], out result)) + { + currentIndex++; + return true; + } + } + + result = default; + return false; + } + + private static bool IsHuffmanEncoded(byte b) + { + return (b & HuffmanMask) != 0; + } + + private ref readonly HeaderField GetHeader(int index) { try { - return index <= H2StaticTable.Count - ? H2StaticTable.Get(index - 1) - : _dynamicTable[index - H2StaticTable.Count - 1]; + return ref index <= H2StaticTable.Count + ? ref H2StaticTable.Get(index - 1) + : ref _dynamicTable[index - H2StaticTable.Count - 1]; } catch (IndexOutOfRangeException) { diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HPackDecodingException.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HPackDecodingException.cs index b30eba72b976..605cac1c0fe4 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HPackDecodingException.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HPackDecodingException.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.Serialization; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HPackEncoder.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HPackEncoder.cs index 97cdea1c50f7..d2fbc52232a9 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HPackEncoder.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HPackEncoder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Collections.Generic; @@ -54,7 +53,7 @@ public static bool EncodeStatusHeader(int statusCode, Span destination, ou case 404: case 500: // Status codes which exist in the HTTP/2 StaticTable. - return EncodeIndexedHeaderField(H2StaticTable.StatusIndex[statusCode], destination, out bytesWritten); + return EncodeIndexedHeaderField(H2StaticTable.GetStatusIndex(statusCode), destination, out bytesWritten); default: // If the status code doesn't have a static index then we need to include the full value. // Write a status index and then the number bytes as a string literal. diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HPackEncodingException.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HPackEncodingException.cs index 792c871837a5..38ca5724a92a 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HPackEncodingException.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HPackEncodingException.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.Http.HPack { diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HeaderField.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HeaderField.cs index 2384c71983b6..5127e6fb9538 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HeaderField.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HeaderField.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Text; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/Huffman.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/Huffman.cs index c534e0c17386..847e8296ae4a 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/Huffman.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/Huffman.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HuffmanDecodingException.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HuffmanDecodingException.cs index 2442f02da0d5..7199e3666809 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HuffmanDecodingException.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HuffmanDecodingException.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.Serialization; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/IntegerDecoder.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/IntegerDecoder.cs index 0841d69bf28b..f98fdf7b241a 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/IntegerDecoder.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/IntegerDecoder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Numerics; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/IntegerEncoder.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/IntegerEncoder.cs index 227fbf0a447f..b25b218522ba 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/IntegerEncoder.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/IntegerEncoder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/StatusCodes.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/StatusCodes.cs index 01c42abbc524..c09236f841a7 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/StatusCodes.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/StatusCodes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Globalization; using System.Text; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/Frames/Http3ErrorCode.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/Frames/Http3ErrorCode.cs index 785eab75bd82..11e39e5f7848 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/Frames/Http3ErrorCode.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/Frames/Http3ErrorCode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.Http { @@ -13,7 +12,7 @@ internal enum Http3ErrorCode : long NoError = 0x100, /// /// H3_GENERAL_PROTOCOL_ERROR (0x101): - /// Peer violated protocol requirements in a way which doesn’t match a more specific error code, + /// Peer violated protocol requirements in a way which doesn't match a more specific error code, /// or endpoint declines to use the more specific error code. /// ProtocolError = 0x101, @@ -75,7 +74,7 @@ internal enum Http3ErrorCode : long RequestCancelled = 0x10c, /// /// H3_REQUEST_INCOMPLETE (0x10E): - /// The client’s stream terminated without containing a fully-formed request. + /// The client?s stream terminated without containing a fully-formed request. /// RequestIncomplete = 0x10d, /// diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/Frames/Http3Frame.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/Frames/Http3Frame.cs index f7ed1b96a5fd..36ff90bba3dd 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/Frames/Http3Frame.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/Frames/Http3Frame.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/Frames/Http3FrameType.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/Frames/Http3FrameType.cs index 252d6b76b64b..492b4acf64e2 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/Frames/Http3FrameType.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/Frames/Http3FrameType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.Http { diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/Helpers/VariableLengthIntegerHelper.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/Helpers/VariableLengthIntegerHelper.cs index 010d2372faee..1f2dd4e64043 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/Helpers/VariableLengthIntegerHelper.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/Helpers/VariableLengthIntegerHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Buffers; using System.Buffers.Binary; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/Http3SettingType.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/Http3SettingType.cs index 760446fa5cc8..2c675ed59732 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/Http3SettingType.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/Http3SettingType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.Http { diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/Http3StreamType.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/Http3StreamType.cs index c3402f255053..b386125463c1 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/Http3StreamType.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/Http3StreamType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.Http { diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/H3StaticTable.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/H3StaticTable.cs index c4ca224742b1..ae605971da65 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/H3StaticTable.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/H3StaticTable.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Text; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/HeaderField.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/HeaderField.cs index 12594381bd18..e299c3cb3334 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/HeaderField.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/HeaderField.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.Http.QPack { diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/QPackDecoder.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/QPackDecoder.cs index 0ac27cda1cb2..2d50916977b1 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/QPackDecoder.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/QPackDecoder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Buffers; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/QPackDecodingException.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/QPackDecodingException.cs index bbdba5d773ab..760403267f45 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/QPackDecodingException.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/QPackDecodingException.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.Serialization; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/QPackEncoder.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/QPackEncoder.cs index 49cfd8463366..be43dc3bc716 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/QPackEncoder.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/QPackEncoder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Collections.Generic; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/QPackEncodingException.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/QPackEncodingException.cs index 9c5907a3a99a..6b5647e18e2e 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/QPackEncodingException.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/QPackEncodingException.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.Serialization; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/IHttpHeadersHandler.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/IHttpHeadersHandler.cs index 11a7e3473e23..824889cf79da 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/IHttpHeadersHandler.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/IHttpHeadersHandler.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // Don't ever change this unless we are explicitly trying to remove IHttpHeadersHandler as public API. #if KESTREL diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/NetEventSource.Common.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/NetEventSource.Common.cs index 46cd2ee685c8..c7c062c0750e 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/NetEventSource.Common.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/NetEventSource.Common.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #if DEBUG // Uncomment to enable runtime checks to help validate that NetEventSource isn't being misused @@ -30,14 +29,9 @@ namespace System.Net // Usage: // - Operations that may allocate (e.g. boxing a value type, using string interpolation, etc.) or that may have computations // at call sites should guard access like: - // if (NetEventSource.IsEnabled) NetEventSource.Enter(this, refArg1, valueTypeArg2); // entering an instance method with a value type arg - // if (NetEventSource.IsEnabled) NetEventSource.Info(null, $"Found certificate: {cert}"); // info logging with a formattable string + // if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(null, $"Found certificate: {cert}"); // info logging with a formattable string // - Operations that have zero allocations / measurable computations at call sites can use a simpler pattern, calling methods like: - // NetEventSource.Enter(this); // entering an instance method // NetEventSource.Info(this, "literal string"); // arbitrary message with a literal string - // NetEventSource.Enter(this, refArg1, regArg2); // entering an instance method with two reference type arguments - // NetEventSource.Enter(null); // entering a static method - // NetEventSource.Enter(null, refArg1); // entering a static method with one reference type argument // Debug.Asserts inside the logging methods will help to flag some misuse if the DEBUG_NETEVENTSOURCE_MISUSE compilation constant is defined. // However, because it can be difficult by observation to understand all of the costs involved, guarding can be done everywhere. // - NetEventSource.Fail calls typically do not need to be prefixed with an IsEnabled check, even if they allocate, as FailMessage diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/Mock/MockConnection.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/Mock/MockConnection.cs index ae4040621033..361474bcb1c8 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/Mock/MockConnection.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/Mock/MockConnection.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Buffers.Binary; @@ -14,13 +13,13 @@ namespace System.Net.Quic.Implementations.Mock internal sealed class MockConnection : QuicConnectionProvider { private readonly bool _isClient; - private bool _disposed = false; + private bool _disposed; private IPEndPoint? _remoteEndPoint; private IPEndPoint? _localEndPoint; private object _syncObject = new object(); - private Socket? _socket = null; - private IPEndPoint? _peerListenEndPoint = null; - private TcpListener? _inboundListener = null; + private Socket? _socket; + private IPEndPoint? _peerListenEndPoint; + private TcpListener? _inboundListener; private long _nextOutboundBidirectionalStream; private long _nextOutboundUnidirectionalStream; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/Mock/MockImplementationProvider.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/Mock/MockImplementationProvider.cs index 56a5a1167963..bff304319f7a 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/Mock/MockImplementationProvider.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/Mock/MockImplementationProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Net.Security; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/Mock/MockListener.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/Mock/MockListener.cs index 88297bdfdd51..f4c0cfdf2c2f 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/Mock/MockListener.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/Mock/MockListener.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Net.Sockets; @@ -13,7 +12,7 @@ namespace System.Net.Quic.Implementations.Mock { internal sealed class MockListener : QuicListenerProvider { - private bool _disposed = false; + private bool _disposed; private SslServerAuthenticationOptions? _sslOptions; private IPEndPoint _listenEndPoint; private TcpListener _tcpListener; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/Mock/MockStream.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/Mock/MockStream.cs index f367d981bd10..32820caaa4f3 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/Mock/MockStream.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/Mock/MockStream.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Buffers; @@ -13,14 +12,14 @@ namespace System.Net.Quic.Implementations.Mock { internal sealed class MockStream : QuicStreamProvider { - private bool _disposed = false; + private bool _disposed; private readonly long _streamId; private bool _canRead; private bool _canWrite; private MockConnection? _connection; - private Socket? _socket = null; + private Socket? _socket; // Constructor for outbound streams internal MockStream(MockConnection connection, long streamId, bool bidirectional) diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/MsQuicAddressHelpers.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/MsQuicAddressHelpers.cs index 2ecf0eb21065..38eb74b06acc 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/MsQuicAddressHelpers.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/MsQuicAddressHelpers.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Net.Sockets; using static System.Net.Quic.Implementations.MsQuic.Internal.MsQuicNativeMethods; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/MsQuicApi.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/MsQuicApi.cs index 29fa4f871b38..73c3e551ab4c 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/MsQuicApi.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/MsQuicApi.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.IO; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/MsQuicParameterHelpers.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/MsQuicParameterHelpers.cs index 757bb0da0545..afeb151a0436 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/MsQuicParameterHelpers.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/MsQuicParameterHelpers.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using static System.Net.Quic.Implementations.MsQuic.Internal.MsQuicNativeMethods; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/MsQuicSecurityConfig.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/MsQuicSecurityConfig.cs index 58fc811f7cf4..68b1432028b6 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/MsQuicSecurityConfig.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/MsQuicSecurityConfig.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.Quic.Implementations.MsQuic.Internal { diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/MsQuicSession.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/MsQuicSession.cs index 0f19506b81a2..e35493a7745c 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/MsQuicSession.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/MsQuicSession.cs @@ -1,12 +1,11 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.Quic.Implementations.MsQuic.Internal { internal sealed class MsQuicSession : IDisposable { - private bool _disposed = false; + private bool _disposed; private IntPtr _nativeObjPtr; private bool _opened; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/QuicExceptionHelpers.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/QuicExceptionHelpers.cs index bca44c017d70..a68cbbe93947 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/QuicExceptionHelpers.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/QuicExceptionHelpers.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable namespace System.Net.Quic.Implementations.MsQuic.Internal diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/ResettableCompletionSource.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/ResettableCompletionSource.cs index 4164663df942..2ef7cb81c6e8 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/ResettableCompletionSource.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/ResettableCompletionSource.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Threading.Tasks; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/MsQuicConnection.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/MsQuicConnection.cs index b7bd07d901da..0046c56abb0d 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/MsQuicConnection.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/MsQuicConnection.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.IO; @@ -52,21 +51,17 @@ internal sealed class MsQuicConnection : QuicConnectionProvider // constructor for inbound connections public MsQuicConnection(IPEndPoint localEndPoint, IPEndPoint remoteEndPoint, IntPtr nativeObjPtr) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(this); _localEndPoint = localEndPoint; _remoteEndPoint = remoteEndPoint; _ptr = nativeObjPtr; SetCallbackHandler(); SetIdleTimeout(TimeSpan.FromSeconds(120)); - if (NetEventSource.IsEnabled) NetEventSource.Exit(this); } // constructor for outbound connections public MsQuicConnection(QuicClientConnectionOptions options) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(this); - // TODO need to figure out if/how we want to expose sessions // Creating a session per connection isn't ideal. _session = new MsQuicSession(); @@ -75,8 +70,6 @@ public MsQuicConnection(QuicClientConnectionOptions options) SetCallbackHandler(); SetIdleTimeout(options.IdleTimeout); - - if (NetEventSource.IsEnabled) NetEventSource.Exit(this); } internal override IPEndPoint LocalEndPoint @@ -169,8 +162,6 @@ internal uint HandleEvent(ref ConnectionEvent connectionEvent) private uint HandleEventConnected(ConnectionEvent connectionEvent) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(this); - SOCKADDR_INET inetAddress = MsQuicParameterHelpers.GetINetParam(MsQuicApi.Api, _ptr, (uint)QUIC_PARAM_LEVEL.CONNECTION, (uint)QUIC_PARAM_CONN.LOCAL_ADDRESS); _localEndPoint = MsQuicAddressHelpers.INetToIPEndPoint(inetAddress); @@ -180,14 +171,11 @@ private uint HandleEventConnected(ConnectionEvent connectionEvent) // handle event shutdown initiated by transport _connectTcs.Complete(MsQuicStatusCodes.Success); - if (NetEventSource.IsEnabled) NetEventSource.Exit(this); return MsQuicStatusCodes.Success; } private uint HandleEventShutdownInitiatedByTransport(ConnectionEvent connectionEvent) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(this); - if (!_connected) { _connectTcs.CompleteException(new IOException("Connection has been shutdown.")); @@ -195,7 +183,6 @@ private uint HandleEventShutdownInitiatedByTransport(ConnectionEvent connectionE _acceptQueue.Writer.Complete(); - if (NetEventSource.IsEnabled) NetEventSource.Exit(this); return MsQuicStatusCodes.Success; } @@ -209,23 +196,14 @@ private uint HandleEventShutdownInitiatedByPeer(ConnectionEvent connectionEvent) private uint HandleEventShutdownComplete(ConnectionEvent connectionEvent) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(this); - _shutdownTcs.Complete(MsQuicStatusCodes.Success); - - if (NetEventSource.IsEnabled) NetEventSource.Exit(this); return MsQuicStatusCodes.Success; } private uint HandleEventNewStream(ConnectionEvent connectionEvent) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(this); - MsQuicStream msQuicStream = new MsQuicStream(this, connectionEvent.StreamFlags, connectionEvent.Data.NewStream.Stream, inbound: true); - _acceptQueue.Writer.TryWrite(msQuicStream); - if (NetEventSource.IsEnabled) NetEventSource.Exit(this); - return MsQuicStatusCodes.Success; } @@ -236,8 +214,6 @@ private uint HandleEventStreamsAvailable(ConnectionEvent connectionEvent) internal override async ValueTask AcceptStreamAsync(CancellationToken cancellationToken = default) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(this); - ThrowIfDisposed(); MsQuicStream stream; @@ -255,7 +231,6 @@ internal override async ValueTask AcceptStreamAsync(Cancella }; } - if (NetEventSource.IsEnabled) NetEventSource.Exit(this); return stream; } @@ -306,8 +281,6 @@ internal override ValueTask ConnectAsync(CancellationToken cancellationToken = d private MsQuicStream StreamOpen( QUIC_STREAM_OPEN_FLAG flags) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(this); - IntPtr streamPtr = IntPtr.Zero; QuicExceptionHelpers.ThrowIfFailed( MsQuicApi.Api.StreamOpenDelegate( @@ -318,10 +291,7 @@ private MsQuicStream StreamOpen( out streamPtr), "Failed to open stream to peer."); - MsQuicStream stream = new MsQuicStream(this, flags, streamPtr, inbound: false); - - if (NetEventSource.IsEnabled) NetEventSource.Exit(this); - return stream; + return new MsQuicStream(this, flags, streamPtr, inbound: false); } private void SetCallbackHandler() @@ -338,15 +308,12 @@ private ValueTask ShutdownAsync( QUIC_CONNECTION_SHUTDOWN_FLAG Flags, long ErrorCode) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(this); - uint status = MsQuicApi.Api.ConnectionShutdownDelegate( _ptr, (uint)Flags, ErrorCode); QuicExceptionHelpers.ThrowIfFailed(status, "Failed to shutdown connection."); - if (NetEventSource.IsEnabled) NetEventSource.Exit(this); return _shutdownTcs.GetTypelessValueTask(); } @@ -378,8 +345,6 @@ private void Dispose(bool disposing) return; } - if (NetEventSource.IsEnabled) NetEventSource.Enter(this); - if (_ptr != IntPtr.Zero) { MsQuicApi.Api.ConnectionCloseDelegate?.Invoke(_ptr); @@ -395,8 +360,6 @@ private void Dispose(bool disposing) } _disposed = true; - - if (NetEventSource.IsEnabled) NetEventSource.Exit(this); } internal override ValueTask CloseAsync(long errorCode, CancellationToken cancellationToken = default) diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/MsQuicImplementationProvider.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/MsQuicImplementationProvider.cs index 55c5e524ec57..6e7bc7504242 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/MsQuicImplementationProvider.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/MsQuicImplementationProvider.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Net.Quic.Implementations.MsQuic.Internal; using System.Net.Security; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/MsQuicListener.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/MsQuicListener.cs index 2418a71ed6bf..c8d338832398 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/MsQuicListener.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/MsQuicListener.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Net.Quic.Implementations.MsQuic.Internal; @@ -63,8 +62,6 @@ internal override IPEndPoint ListenEndPoint internal override async ValueTask AcceptConnectionAsync(CancellationToken cancellationToken = default) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(this); - ThrowIfDisposed(); MsQuicConnection connection; @@ -82,7 +79,6 @@ await connection.SetSecurityConfigForConnection(_sslOptions.ServerCertificate!, _options.CertificateFilePath, _options.PrivateKeyFilePath).ConfigureAwait(false); - if (NetEventSource.IsEnabled) NetEventSource.Exit(this); return connection; } diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/MsQuicStream.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/MsQuicStream.cs index 6eed08f02de8..6b8e9ce362d9 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/MsQuicStream.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/MsQuicStream.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Buffers; @@ -61,7 +60,7 @@ internal sealed class MsQuicStream : QuicStreamProvider // Used by the class to indicate that the stream is writable. private readonly bool _canWrite; - private volatile bool _disposed = false; + private volatile bool _disposed; private List _receiveQuicBuffers = new List(); @@ -125,8 +124,6 @@ internal override ValueTask WriteAsync(ReadOnlySequence buffers, Cancellat internal override async ValueTask WriteAsync(ReadOnlySequence buffers, bool endStream, CancellationToken cancellationToken = default) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(this); - ThrowIfDisposed(); using CancellationTokenRegistration registration = await HandleWriteStartState(cancellationToken).ConfigureAwait(false); @@ -134,8 +131,6 @@ internal override async ValueTask WriteAsync(ReadOnlySequence buffers, boo await SendReadOnlySequenceAsync(buffers, endStream ? QUIC_SEND_FLAG.FIN : QUIC_SEND_FLAG.NONE).ConfigureAwait(false); HandleWriteCompletedState(); - - if (NetEventSource.IsEnabled) NetEventSource.Exit(this); } internal override ValueTask WriteAsync(ReadOnlyMemory> buffers, CancellationToken cancellationToken = default) @@ -145,8 +140,6 @@ internal override ValueTask WriteAsync(ReadOnlyMemory> buff internal override async ValueTask WriteAsync(ReadOnlyMemory> buffers, bool endStream, CancellationToken cancellationToken = default) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(this); - ThrowIfDisposed(); using CancellationTokenRegistration registration = await HandleWriteStartState(cancellationToken).ConfigureAwait(false); @@ -154,14 +147,10 @@ internal override async ValueTask WriteAsync(ReadOnlyMemory await SendReadOnlyMemoryListAsync(buffers, endStream ? QUIC_SEND_FLAG.FIN : QUIC_SEND_FLAG.NONE).ConfigureAwait(false); HandleWriteCompletedState(); - - if (NetEventSource.IsEnabled) NetEventSource.Exit(this); } internal override async ValueTask WriteAsync(ReadOnlyMemory buffer, bool endStream, CancellationToken cancellationToken = default) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(this); - ThrowIfDisposed(); using CancellationTokenRegistration registration = await HandleWriteStartState(cancellationToken).ConfigureAwait(false); @@ -169,8 +158,6 @@ internal override async ValueTask WriteAsync(ReadOnlyMemory buffer, bool e await SendReadOnlyMemoryAsync(buffer, endStream ? QUIC_SEND_FLAG.FIN : QUIC_SEND_FLAG.NONE).ConfigureAwait(false); HandleWriteCompletedState(); - - if (NetEventSource.IsEnabled) NetEventSource.Exit(this); } private async ValueTask HandleWriteStartState(CancellationToken cancellationToken) @@ -229,8 +216,6 @@ private void HandleWriteCompletedState() internal override async ValueTask ReadAsync(Memory destination, CancellationToken cancellationToken = default) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(this); - ThrowIfDisposed(); if (!_canRead) @@ -242,7 +227,6 @@ internal override async ValueTask ReadAsync(Memory destination, Cance { if (_readState == ReadState.ReadsCompleted) { - if (NetEventSource.IsEnabled) NetEventSource.Exit(this); return 0; } else if (_readState == ReadState.Aborted) @@ -311,8 +295,6 @@ static unsafe void CopyToBuffer(Span destinationBuffer, List s } } - if (NetEventSource.IsEnabled) NetEventSource.Exit(this); - return actual; } @@ -320,8 +302,6 @@ static unsafe void CopyToBuffer(Span destinationBuffer, List s // If so, we need to complete the read here as well. internal override void AbortRead(long errorCode) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(this); - ThrowIfDisposed(); lock (_sync) @@ -331,13 +311,10 @@ internal override void AbortRead(long errorCode) MsQuicApi.Api.StreamShutdownDelegate(_ptr, (uint)QUIC_STREAM_SHUTDOWN_FLAG.ABORT_RECV, errorCode); - if (NetEventSource.IsEnabled) NetEventSource.Exit(this); } internal override void AbortWrite(long errorCode) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(this); - ThrowIfDisposed(); bool shouldComplete = false; @@ -357,14 +334,10 @@ internal override void AbortWrite(long errorCode) } MsQuicApi.Api.StreamShutdownDelegate(_ptr, (uint)QUIC_STREAM_SHUTDOWN_FLAG.ABORT_SEND, errorCode); - - if (NetEventSource.IsEnabled) NetEventSource.Exit(this); } internal override ValueTask ShutdownWriteCompleted(CancellationToken cancellationToken = default) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(this); - ThrowIfDisposed(); // TODO do anything to stop writes? @@ -386,8 +359,6 @@ internal override ValueTask ShutdownWriteCompleted(CancellationToken cancellatio } }); - if (NetEventSource.IsEnabled) NetEventSource.Exit(this); - return _shutdownWriteResettableCompletionSource.GetTypelessValueTask(); } @@ -435,8 +406,6 @@ public override ValueTask DisposeAsync() return default; } - if (NetEventSource.IsEnabled) NetEventSource.Enter(this); - CleanupSendState(); if (_ptr != IntPtr.Zero) @@ -449,7 +418,6 @@ public override ValueTask DisposeAsync() _handle.Free(); _disposed = true; - if (NetEventSource.IsEnabled) NetEventSource.Exit(this); return default; } @@ -472,8 +440,6 @@ private void Dispose(bool disposing) return; } - if (NetEventSource.IsEnabled) NetEventSource.Enter(this); - CleanupSendState(); if (_ptr != IntPtr.Zero) @@ -485,8 +451,6 @@ private void Dispose(bool disposing) _handle.Free(); - if (NetEventSource.IsEnabled) NetEventSource.Exit(this); - _disposed = true; } @@ -578,8 +542,6 @@ private uint HandleEvent(ref StreamEvent evt) private unsafe uint HandleEventRecv(ref MsQuicNativeMethods.StreamEvent evt) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(this); - StreamEventDataRecv receieveEvent = evt.Data.Recv; for (int i = 0; i < receieveEvent.BufferCount; i++) { @@ -601,15 +563,11 @@ private unsafe uint HandleEventRecv(ref MsQuicNativeMethods.StreamEvent evt) _receiveResettableCompletionSource.Complete((uint)receieveEvent.TotalBufferLength); } - if (NetEventSource.IsEnabled) NetEventSource.Exit(this); - return MsQuicStatusCodes.Pending; } private uint HandleEventPeerRecvAborted(ref StreamEvent evt) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(this); - bool shouldComplete = false; lock (_sync) { @@ -626,15 +584,11 @@ private uint HandleEventPeerRecvAborted(ref StreamEvent evt) _sendResettableCompletionSource.CompleteException(new QuicStreamAbortedException(_sendErrorCode)); } - if (NetEventSource.IsEnabled) NetEventSource.Exit(this); - return MsQuicStatusCodes.Success; } private uint HandleStartComplete() { - if (NetEventSource.IsEnabled) NetEventSource.Enter(this); - bool shouldComplete = false; lock (_sync) { @@ -650,14 +604,11 @@ private uint HandleStartComplete() _sendResettableCompletionSource.Complete(MsQuicStatusCodes.Success); } - if (NetEventSource.IsEnabled) NetEventSource.Exit(this); - return MsQuicStatusCodes.Success; } private uint HandleEventSendShutdownComplete(ref MsQuicNativeMethods.StreamEvent evt) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(this); bool shouldComplete = false; lock (_sync) { @@ -673,22 +624,18 @@ private uint HandleEventSendShutdownComplete(ref MsQuicNativeMethods.StreamEvent _shutdownWriteResettableCompletionSource.Complete(MsQuicStatusCodes.Success); } - if (NetEventSource.IsEnabled) NetEventSource.Exit(this); - return MsQuicStatusCodes.Success; } private uint HandleEventShutdownComplete() { - if (NetEventSource.IsEnabled) NetEventSource.Enter(this); - bool shouldReadComplete = false; bool shouldShutdownWriteComplete = false; lock (_sync) { // This event won't occur within the middle of a receive. - if (NetEventSource.IsEnabled) NetEventSource.Info("Completing resettable event source."); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info("Completing resettable event source."); if (_readState == ReadState.None) { @@ -714,15 +661,11 @@ private uint HandleEventShutdownComplete() _shutdownWriteResettableCompletionSource.Complete(MsQuicStatusCodes.Success); } - if (NetEventSource.IsEnabled) NetEventSource.Exit(this); - return MsQuicStatusCodes.Success; } private uint HandleEventPeerSendAborted(ref StreamEvent evt) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(this); - bool shouldComplete = false; lock (_sync) { @@ -739,21 +682,17 @@ private uint HandleEventPeerSendAborted(ref StreamEvent evt) _receiveResettableCompletionSource.CompleteException(new QuicStreamAbortedException(_readErrorCode)); } - if (NetEventSource.IsEnabled) NetEventSource.Exit(this); - return MsQuicStatusCodes.Success; } private uint HandleEventPeerSendShutdown() { - if (NetEventSource.IsEnabled) NetEventSource.Enter(this); - bool shouldComplete = false; lock (_sync) { // This event won't occur within the middle of a receive. - if (NetEventSource.IsEnabled) NetEventSource.Info("Completing resettable event source."); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info("Completing resettable event source."); if (_readState == ReadState.None) { @@ -768,15 +707,11 @@ private uint HandleEventPeerSendShutdown() _receiveResettableCompletionSource.Complete(0); } - if (NetEventSource.IsEnabled) NetEventSource.Exit(this); - return MsQuicStatusCodes.Success; } private uint HandleEventSendComplete(ref StreamEvent evt) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(this); - CleanupSendState(); // TODO throw if a write was canceled. @@ -797,8 +732,6 @@ private uint HandleEventSendComplete(ref StreamEvent evt) _sendResettableCompletionSource.Complete(MsQuicStatusCodes.Success); } - if (NetEventSource.IsEnabled) NetEventSource.Exit(this); - return MsQuicStatusCodes.Success; } diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/QuicConnectionProvider.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/QuicConnectionProvider.cs index d77bf1df76fb..da511640f2b4 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/QuicConnectionProvider.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/QuicConnectionProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Threading; using System.Threading.Tasks; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/QuicImplementationProvider.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/QuicImplementationProvider.cs index 906f4562667c..510e94d78af3 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/QuicImplementationProvider.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/QuicImplementationProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Net.Security; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/QuicListenerProvider.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/QuicListenerProvider.cs index f533a8bb3818..f5591472d9f1 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/QuicListenerProvider.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/QuicListenerProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Threading; using System.Threading.Tasks; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/QuicStreamProvider.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/QuicStreamProvider.cs index 1e96e1597acf..a1de86a00347 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/QuicStreamProvider.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/QuicStreamProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Buffers; using System.Threading; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Interop/Interop.MsQuic.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Interop/Interop.MsQuic.cs index 25a5e5775511..ab68320c1f77 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Interop/Interop.MsQuic.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Interop/Interop.MsQuic.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net.Quic.Implementations.MsQuic.Internal; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Interop/MsQuicEnums.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Interop/MsQuicEnums.cs index 3d294bce9c80..62f8fab346c6 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Interop/MsQuicEnums.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Interop/MsQuicEnums.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.Quic.Implementations.MsQuic.Internal { diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Interop/MsQuicNativeMethods.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Interop/MsQuicNativeMethods.cs index 31ab416fbd39..644787ea232b 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Interop/MsQuicNativeMethods.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Interop/MsQuicNativeMethods.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Net.Sockets; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Interop/MsQuicStatusCodes.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Interop/MsQuicStatusCodes.cs index 72c35687ebe5..face87e41f91 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Interop/MsQuicStatusCodes.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Interop/MsQuicStatusCodes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Interop/MsQuicStatusHelper.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Interop/MsQuicStatusHelper.cs index f08eb861d2e6..726a548c59e8 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Interop/MsQuicStatusHelper.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Interop/MsQuicStatusHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/NetEventSource.Quic.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/NetEventSource.Quic.cs index 921808829dcb..d86d7c6fc771 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/NetEventSource.Quic.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/NetEventSource.Quic.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics.Tracing; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicClientConnectionOptions.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicClientConnectionOptions.cs index 3e7d10a199a5..c4ad3447cb4b 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicClientConnectionOptions.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicClientConnectionOptions.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Net.Security; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicConnection.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicConnection.cs index c2bbceb43cdd..999ce7aaddc7 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicConnection.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicConnection.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Net.Quic.Implementations; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicConnectionAbortedException.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicConnectionAbortedException.cs index 41f4b329983e..23e8cf692ab6 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicConnectionAbortedException.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicConnectionAbortedException.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.Quic { diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicException.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicException.cs index 843c2f75924c..16a26d8afce6 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicException.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicException.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.Quic { diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicImplementationProviders.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicImplementationProviders.cs index 66a7e0d6dfb7..33fabcf86121 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicImplementationProviders.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicImplementationProviders.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.Quic { diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicListener.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicListener.cs index 8fb0c1e33756..3659d97cda04 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicListener.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicListener.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Net.Quic.Implementations; using System.Net.Security; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicListenerOptions.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicListenerOptions.cs index 934c7a8e244e..bdc212185915 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicListenerOptions.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicListenerOptions.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Net.Security; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicOperationAbortedException.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicOperationAbortedException.cs index 25cd145ee65e..0d035ffd43fa 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicOperationAbortedException.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicOperationAbortedException.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.Quic { diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicStream.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicStream.cs index 4e1af6dff60b..1ed1204ad331 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicStream.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicStream.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Buffers; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicStreamAbortedException.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicStreamAbortedException.cs index 6e25335f9992..551fb78df0ea 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicStreamAbortedException.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicStreamAbortedException.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.Quic { diff --git a/src/libraries/Common/src/System/Net/HttpDateParser.cs b/src/libraries/Common/src/System/Net/HttpDateParser.cs index a644d496e309..c1d21cff3ed8 100644 --- a/src/libraries/Common/src/System/Net/HttpDateParser.cs +++ b/src/libraries/Common/src/System/Net/HttpDateParser.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Globalization; diff --git a/src/libraries/Common/src/System/Net/HttpKnownHeaderNames.TryGetHeaderName.cs b/src/libraries/Common/src/System/Net/HttpKnownHeaderNames.TryGetHeaderName.cs index b96dbd0a0065..05871eae320f 100644 --- a/src/libraries/Common/src/System/Net/HttpKnownHeaderNames.TryGetHeaderName.cs +++ b/src/libraries/Common/src/System/Net/HttpKnownHeaderNames.TryGetHeaderName.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Net/HttpKnownHeaderNames.cs b/src/libraries/Common/src/System/Net/HttpKnownHeaderNames.cs index 874c8d06951c..c88ba19b8125 100644 --- a/src/libraries/Common/src/System/Net/HttpKnownHeaderNames.cs +++ b/src/libraries/Common/src/System/Net/HttpKnownHeaderNames.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net { diff --git a/src/libraries/Common/src/System/Net/HttpStatusDescription.cs b/src/libraries/Common/src/System/Net/HttpStatusDescription.cs index 809cffd33ad3..f08cc5879919 100644 --- a/src/libraries/Common/src/System/Net/HttpStatusDescription.cs +++ b/src/libraries/Common/src/System/Net/HttpStatusDescription.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable namespace System.Net diff --git a/src/libraries/Common/src/System/Net/HttpValidationHelpers.cs b/src/libraries/Common/src/System/Net/HttpValidationHelpers.cs index d31041f0f5fa..4da89e515ffb 100644 --- a/src/libraries/Common/src/System/Net/HttpValidationHelpers.cs +++ b/src/libraries/Common/src/System/Net/HttpValidationHelpers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable namespace System.Net diff --git a/src/libraries/Common/src/System/Net/IPAddressParserStatics.cs b/src/libraries/Common/src/System/Net/IPAddressParserStatics.cs index fefc1e588347..4b27a6b576fd 100644 --- a/src/libraries/Common/src/System/Net/IPAddressParserStatics.cs +++ b/src/libraries/Common/src/System/Net/IPAddressParserStatics.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net { diff --git a/src/libraries/Common/src/System/Net/IPEndPointStatics.cs b/src/libraries/Common/src/System/Net/IPEndPointStatics.cs index e8aa2bae74ad..e7a335980a9e 100644 --- a/src/libraries/Common/src/System/Net/IPEndPointStatics.cs +++ b/src/libraries/Common/src/System/Net/IPEndPointStatics.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net { diff --git a/src/libraries/Common/src/System/Net/IPv4AddressHelper.Common.cs b/src/libraries/Common/src/System/Net/IPv4AddressHelper.Common.cs index fc390e5ffeb4..a02d6e8c66bc 100644 --- a/src/libraries/Common/src/System/Net/IPv4AddressHelper.Common.cs +++ b/src/libraries/Common/src/System/Net/IPv4AddressHelper.Common.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System { diff --git a/src/libraries/Common/src/System/Net/IPv6AddressHelper.Common.cs b/src/libraries/Common/src/System/Net/IPv6AddressHelper.Common.cs index d8c1965b6a2f..b9e4a0b91711 100644 --- a/src/libraries/Common/src/System/Net/IPv6AddressHelper.Common.cs +++ b/src/libraries/Common/src/System/Net/IPv6AddressHelper.Common.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Net/InternalException.cs b/src/libraries/Common/src/System/Net/InternalException.cs index 676da377c9a7..d1cbb26845ef 100644 --- a/src/libraries/Common/src/System/Net/InternalException.cs +++ b/src/libraries/Common/src/System/Net/InternalException.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable namespace System.Net @@ -17,7 +16,7 @@ internal InternalException() internal InternalException(object unexpectedValue) { _unexpectedValue = unexpectedValue; - if (NetEventSource.IsEnabled) + if (NetEventSource.Log.IsEnabled()) { NetEventSource.Fail(this, $"InternalException thrown for unexpected value: {unexpectedValue}"); } diff --git a/src/libraries/Common/src/System/Net/Internals/IPAddressExtensions.cs b/src/libraries/Common/src/System/Net/Internals/IPAddressExtensions.cs index 81c20c7eba02..acd2aaed82d6 100644 --- a/src/libraries/Common/src/System/Net/Internals/IPAddressExtensions.cs +++ b/src/libraries/Common/src/System/Net/Internals/IPAddressExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Net/Internals/IPEndPointExtensions.cs b/src/libraries/Common/src/System/Net/Internals/IPEndPointExtensions.cs index 2e261809bff3..427144404260 100644 --- a/src/libraries/Common/src/System/Net/Internals/IPEndPointExtensions.cs +++ b/src/libraries/Common/src/System/Net/Internals/IPEndPointExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Net/Internals/SocketExceptionFactory.Unix.cs b/src/libraries/Common/src/System/Net/Internals/SocketExceptionFactory.Unix.cs index 81c376afb5f8..88e5af18ba21 100644 --- a/src/libraries/Common/src/System/Net/Internals/SocketExceptionFactory.Unix.cs +++ b/src/libraries/Common/src/System/Net/Internals/SocketExceptionFactory.Unix.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Net.Sockets; diff --git a/src/libraries/Common/src/System/Net/Internals/SocketExceptionFactory.Windows.cs b/src/libraries/Common/src/System/Net/Internals/SocketExceptionFactory.Windows.cs index 05e7d61e11e2..705157bcdd8b 100644 --- a/src/libraries/Common/src/System/Net/Internals/SocketExceptionFactory.Windows.cs +++ b/src/libraries/Common/src/System/Net/Internals/SocketExceptionFactory.Windows.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Net.Sockets; diff --git a/src/libraries/Common/src/System/Net/Internals/SocketExceptionFactory.cs b/src/libraries/Common/src/System/Net/Internals/SocketExceptionFactory.cs index fab19ade261f..ae6fd0e9b453 100644 --- a/src/libraries/Common/src/System/Net/Internals/SocketExceptionFactory.cs +++ b/src/libraries/Common/src/System/Net/Internals/SocketExceptionFactory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Net.Sockets; diff --git a/src/libraries/Common/src/System/Net/InteropIPAddressExtensions.Unix.cs b/src/libraries/Common/src/System/Net/InteropIPAddressExtensions.Unix.cs index db8c07071f9e..056d7962daa1 100644 --- a/src/libraries/Common/src/System/Net/InteropIPAddressExtensions.Unix.cs +++ b/src/libraries/Common/src/System/Net/InteropIPAddressExtensions.Unix.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Net.Sockets; diff --git a/src/libraries/Common/src/System/Net/LazyAsyncResult.cs b/src/libraries/Common/src/System/Net/LazyAsyncResult.cs index 5c2ceb3c4ea8..b31e99542b5a 100644 --- a/src/libraries/Common/src/System/Net/LazyAsyncResult.cs +++ b/src/libraries/Common/src/System/Net/LazyAsyncResult.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics; @@ -41,7 +40,6 @@ private class ThreadContext } #if DEBUG - internal object? _debugAsyncChain = null; // Optionally used to track chains of async calls. private bool _protectState; // Used by ContextAwareResult to prevent some calls. #endif @@ -64,7 +62,7 @@ internal LazyAsyncResult(object? myObject, object? myState, AsyncCallback? myCal _asyncState = myState; _asyncCallback = myCallBack; _result = DBNull.Value; - if (NetEventSource.IsEnabled) NetEventSource.Info(this); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this); } // Interface method to return the original async object. @@ -108,8 +106,6 @@ public WaitHandle AsyncWaitHandle { get { - if (NetEventSource.IsEnabled) NetEventSource.Enter(this); - #if DEBUG // Can't be called when state is protected. if (_protectState) @@ -137,7 +133,6 @@ public WaitHandle AsyncWaitHandle LazilyCreateEvent(out asyncEvent); } - if (NetEventSource.IsEnabled) NetEventSource.Exit(this, asyncEvent); return asyncEvent; } } @@ -193,8 +188,6 @@ public bool CompletedSynchronously { get { - if (NetEventSource.IsEnabled) NetEventSource.Enter(this); - #if DEBUG // Can't be called when state is protected. if (_protectState) @@ -210,7 +203,6 @@ public bool CompletedSynchronously result = Interlocked.CompareExchange(ref _intCompleted, HighBit, 0); } - if (NetEventSource.IsEnabled) NetEventSource.Exit(this, result > 0); return result > 0; } } @@ -220,8 +212,6 @@ public bool IsCompleted { get { - if (NetEventSource.IsEnabled) NetEventSource.Enter(this); - #if DEBUG // Can't be called when state is protected. if (_protectState) @@ -311,8 +301,6 @@ internal int ErrorCode // the equivalent of InvokeCallback(). protected void ProtectedInvokeCallback(object? result, IntPtr userToken) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(this, result, userToken); - // Critical to disallow DBNull here - it could result in a stuck spinlock in WaitForCompletion. if (result == DBNull.Value) { @@ -376,11 +364,11 @@ protected virtual void Complete(IntPtr userToken) ++threadContext._nestedIOCount; if (_asyncCallback != null) { - if (NetEventSource.IsEnabled) NetEventSource.Info(this, "Invoking callback"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, "Invoking callback"); if (threadContext._nestedIOCount >= ForceAsyncCount) { - if (NetEventSource.IsEnabled) NetEventSource.Info(this, "*** OFFLOADED the user callback ****"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, "*** OFFLOADED the user callback ****"); Task.Factory.StartNew( s => WorkerThreadComplete(s!), @@ -398,7 +386,7 @@ protected virtual void Complete(IntPtr userToken) } else { - if (NetEventSource.IsEnabled) NetEventSource.Info(this, "No callback to invoke"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, "No callback to invoke"); } } finally @@ -461,7 +449,7 @@ protected virtual void Cleanup() { try { - if (NetEventSource.IsEnabled) NetEventSource.Info(this, $"Waiting for completion event {waitHandle}"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, $"Waiting for completion event {waitHandle}"); waitHandle.WaitOne(Timeout.Infinite); } catch (ObjectDisposedException) @@ -496,7 +484,6 @@ protected virtual void Cleanup() sw.SpinOnce(); } - if (NetEventSource.IsEnabled) NetEventSource.Exit(this, _result); return _result; } diff --git a/src/libraries/Common/src/System/Net/Logging/NetEventSource.Common.cs b/src/libraries/Common/src/System/Net/Logging/NetEventSource.Common.cs index e7bc2b38612a..f55fedcf04ae 100644 --- a/src/libraries/Common/src/System/Net/Logging/NetEventSource.Common.cs +++ b/src/libraries/Common/src/System/Net/Logging/NetEventSource.Common.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #if DEBUG // Uncomment to enable runtime checks to help validate that NetEventSource isn't being misused @@ -31,14 +30,9 @@ namespace System.Net // Usage: // - Operations that may allocate (e.g. boxing a value type, using string interpolation, etc.) or that may have computations // at call sites should guard access like: - // if (NetEventSource.IsEnabled) NetEventSource.Enter(this, refArg1, valueTypeArg2); // entering an instance method with a value type arg - // if (NetEventSource.IsEnabled) NetEventSource.Info(null, $"Found certificate: {cert}"); // info logging with a formattable string + // if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(null, $"Found certificate: {cert}"); // info logging with a formattable string // - Operations that have zero allocations / measurable computations at call sites can use a simpler pattern, calling methods like: - // NetEventSource.Enter(this); // entering an instance method // NetEventSource.Info(this, "literal string"); // arbitrary message with a literal string - // NetEventSource.Enter(this, refArg1, regArg2); // entering an instance method with two reference type arguments - // NetEventSource.Enter(null); // entering a static method - // NetEventSource.Enter(null, refArg1); // entering a static method with one reference type argument // Debug.Asserts inside the logging methods will help to flag some misuse if the DEBUG_NETEVENTSOURCE_MISUSE compilation constant is defined. // However, because it can be difficult by observation to understand all of the costs involved, guarding can be done everywhere. // - NetEventSource.Fail calls typically do not need to be prefixed with an IsEnabled check, even if they allocate, as FailMessage @@ -62,7 +56,9 @@ public class Keywords { public const EventKeywords Default = (EventKeywords)0x0001; public const EventKeywords Debug = (EventKeywords)0x0002; - public const EventKeywords EnterExit = (EventKeywords)0x0004; + + // No longer used: + // EnterExit = (EventKeywords)0x0004; } private const string MissingMember = "(?)"; @@ -71,8 +67,10 @@ public class Keywords private const string NoParameters = ""; private const int MaxDumpSize = 1024; - private const int EnterEventId = 1; - private const int ExitEventId = 2; + // No longer used: + // EnterEventId = 1; + // ExitEventId = 2; + private const int AssociateEventId = 3; private const int InfoEventId = 4; private const int ErrorEventId = 5; @@ -95,110 +93,6 @@ public class Keywords #endregion #region Events - #region Enter - /// Logs entrance to a method. - /// `this`, or another object that serves to provide context for the operation. - /// A description of the entrance, including any arguments to the call. - /// The calling member. - [NonEvent] - public static void Enter(object? thisOrContextObject, FormattableString? formattableString = null, [CallerMemberName] string? memberName = null) - { - DebugValidateArg(thisOrContextObject); - DebugValidateArg(formattableString); - if (IsEnabled) Log.Enter(IdOf(thisOrContextObject), memberName, formattableString != null ? Format(formattableString) : NoParameters); - } - - /// Logs entrance to a method. - /// `this`, or another object that serves to provide context for the operation. - /// The object to log. - /// The calling member. - [NonEvent] - public static void Enter(object? thisOrContextObject, object? arg0, [CallerMemberName] string? memberName = null) - { - DebugValidateArg(thisOrContextObject); - DebugValidateArg(arg0); - if (IsEnabled) Log.Enter(IdOf(thisOrContextObject), memberName, $"({Format(arg0)})"); - } - - /// Logs entrance to a method. - /// `this`, or another object that serves to provide context for the operation. - /// The first object to log. - /// The second object to log. - /// The calling member. - [NonEvent] - public static void Enter(object? thisOrContextObject, object? arg0, object? arg1, [CallerMemberName] string? memberName = null) - { - DebugValidateArg(thisOrContextObject); - DebugValidateArg(arg0); - DebugValidateArg(arg1); - if (IsEnabled) Log.Enter(IdOf(thisOrContextObject), memberName, $"({Format(arg0)}, {Format(arg1)})"); - } - - /// Logs entrance to a method. - /// `this`, or another object that serves to provide context for the operation. - /// The first object to log. - /// The second object to log. - /// The third object to log. - /// The calling member. - [NonEvent] - public static void Enter(object? thisOrContextObject, object? arg0, object? arg1, object? arg2, [CallerMemberName] string? memberName = null) - { - DebugValidateArg(thisOrContextObject); - DebugValidateArg(arg0); - DebugValidateArg(arg1); - DebugValidateArg(arg2); - if (IsEnabled) Log.Enter(IdOf(thisOrContextObject), memberName, $"({Format(arg0)}, {Format(arg1)}, {Format(arg2)})"); - } - - [Event(EnterEventId, Level = EventLevel.Informational, Keywords = Keywords.EnterExit)] - private void Enter(string thisOrContextObject, string? memberName, string parameters) => - WriteEvent(EnterEventId, thisOrContextObject, memberName ?? MissingMember, parameters); - #endregion - - #region Exit - /// Logs exit from a method. - /// `this`, or another object that serves to provide context for the operation. - /// A description of the exit operation, including any return values. - /// The calling member. - [NonEvent] - public static void Exit(object? thisOrContextObject, FormattableString? formattableString = null, [CallerMemberName] string? memberName = null) - { - DebugValidateArg(thisOrContextObject); - DebugValidateArg(formattableString); - if (IsEnabled) Log.Exit(IdOf(thisOrContextObject), memberName, formattableString != null ? Format(formattableString) : NoParameters); - } - - /// Logs exit from a method. - /// `this`, or another object that serves to provide context for the operation. - /// A return value from the member. - /// The calling member. - [NonEvent] - public static void Exit(object? thisOrContextObject, object? arg0, [CallerMemberName] string? memberName = null) - { - DebugValidateArg(thisOrContextObject); - DebugValidateArg(arg0); - if (IsEnabled) Log.Exit(IdOf(thisOrContextObject), memberName, Format(arg0).ToString()); - } - - /// Logs exit from a method. - /// `this`, or another object that serves to provide context for the operation. - /// A return value from the member. - /// A second return value from the member. - /// The calling member. - [NonEvent] - public static void Exit(object? thisOrContextObject, object? arg0, object? arg1, [CallerMemberName] string? memberName = null) - { - DebugValidateArg(thisOrContextObject); - DebugValidateArg(arg0); - DebugValidateArg(arg1); - if (IsEnabled) Log.Exit(IdOf(thisOrContextObject), memberName, $"{Format(arg0)}, {Format(arg1)}"); - } - - [Event(ExitEventId, Level = EventLevel.Informational, Keywords = Keywords.EnterExit)] - private void Exit(string thisOrContextObject, string? memberName, string? result) => - WriteEvent(ExitEventId, thisOrContextObject, memberName ?? MissingMember, result); - #endregion - #region Info /// Logs an information message. /// `this`, or another object that serves to provide context for the operation. diff --git a/src/libraries/Common/src/System/Net/Mail/DomainLiteralReader.cs b/src/libraries/Common/src/System/Net/Mail/DomainLiteralReader.cs index edd014b05a3a..29a31a1fc4cb 100644 --- a/src/libraries/Common/src/System/Net/Mail/DomainLiteralReader.cs +++ b/src/libraries/Common/src/System/Net/Mail/DomainLiteralReader.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Net.Mime; diff --git a/src/libraries/Common/src/System/Net/Mail/DotAtomReader.cs b/src/libraries/Common/src/System/Net/Mail/DotAtomReader.cs index ac0962568d25..f3a1da7361bc 100644 --- a/src/libraries/Common/src/System/Net/Mail/DotAtomReader.cs +++ b/src/libraries/Common/src/System/Net/Mail/DotAtomReader.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Net.Mime; diff --git a/src/libraries/Common/src/System/Net/Mail/MailAddress.cs b/src/libraries/Common/src/System/Net/Mail/MailAddress.cs index c2a943022e9f..4c400b649c02 100644 --- a/src/libraries/Common/src/System/Net/Mail/MailAddress.cs +++ b/src/libraries/Common/src/System/Net/Mail/MailAddress.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Text; diff --git a/src/libraries/Common/src/System/Net/Mail/MailAddressParser.cs b/src/libraries/Common/src/System/Net/Mail/MailAddressParser.cs index 896cb0312b94..99c98b0ce713 100644 --- a/src/libraries/Common/src/System/Net/Mail/MailAddressParser.cs +++ b/src/libraries/Common/src/System/Net/Mail/MailAddressParser.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Collections.Generic; diff --git a/src/libraries/Common/src/System/Net/Mail/MailBnfHelper.cs b/src/libraries/Common/src/System/Net/Mail/MailBnfHelper.cs index 494eaea415eb..0b9292f6856d 100644 --- a/src/libraries/Common/src/System/Net/Mail/MailBnfHelper.cs +++ b/src/libraries/Common/src/System/Net/Mail/MailBnfHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Net/Mail/QuotedPairReader.cs b/src/libraries/Common/src/System/Net/Mail/QuotedPairReader.cs index 183fba2405dc..e98a031e77ca 100644 --- a/src/libraries/Common/src/System/Net/Mail/QuotedPairReader.cs +++ b/src/libraries/Common/src/System/Net/Mail/QuotedPairReader.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Net.Mime; diff --git a/src/libraries/Common/src/System/Net/Mail/QuotedStringFormatReader.cs b/src/libraries/Common/src/System/Net/Mail/QuotedStringFormatReader.cs index ce0cdf753cab..c62b7f83500f 100644 --- a/src/libraries/Common/src/System/Net/Mail/QuotedStringFormatReader.cs +++ b/src/libraries/Common/src/System/Net/Mail/QuotedStringFormatReader.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Net.Mime; diff --git a/src/libraries/Common/src/System/Net/Mail/WhitespaceReader.cs b/src/libraries/Common/src/System/Net/Mail/WhitespaceReader.cs index c8f22e435c45..f8b4c0a27d5c 100644 --- a/src/libraries/Common/src/System/Net/Mail/WhitespaceReader.cs +++ b/src/libraries/Common/src/System/Net/Mail/WhitespaceReader.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Net.Mime; diff --git a/src/libraries/Common/src/System/Net/NTAuthentication.Common.cs b/src/libraries/Common/src/System/Net/NTAuthentication.Common.cs index 0149545a9ff2..5e58089eb688 100644 --- a/src/libraries/Common/src/System/Net/NTAuthentication.Common.cs +++ b/src/libraries/Common/src/System/Net/NTAuthentication.Common.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics; @@ -29,7 +28,7 @@ internal partial class NTAuthentication private string? _protocolName; private string? _clientSpecifiedSpn; - private ChannelBinding? _channelBinding = null; + private ChannelBinding? _channelBinding; // If set, no more calls should be made. internal bool IsCompleted => _isCompleted; @@ -101,7 +100,7 @@ internal NTAuthentication(bool isServer, string package, NetworkCredential crede [MemberNotNull(nameof(_package))] private void Initialize(bool isServer, string package, NetworkCredential credential, string? spn, ContextFlagsPal requestedContextFlags, ChannelBinding? channelBinding) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(this, package, spn, requestedContextFlags); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, $"package={package}, spn={spn}, requestedContextFlags={requestedContextFlags}"); _tokenSize = NegotiateStreamPal.QueryMaxTokenSize(package); _isServer = isServer; @@ -111,7 +110,7 @@ private void Initialize(bool isServer, string package, NetworkCredential credent _package = package; _channelBinding = channelBinding; - if (NetEventSource.IsEnabled) NetEventSource.Info(this, $"Peer SPN-> '{_spn}'"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, $"Peer SPN-> '{_spn}'"); // // Check if we're using DefaultCredentials. @@ -120,7 +119,7 @@ private void Initialize(bool isServer, string package, NetworkCredential credent Debug.Assert(CredentialCache.DefaultCredentials == CredentialCache.DefaultNetworkCredentials); if (credential == CredentialCache.DefaultCredentials) { - if (NetEventSource.IsEnabled) NetEventSource.Info(this, "using DefaultCredentials"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, "using DefaultCredentials"); _credentialsHandle = NegotiateStreamPal.AcquireDefaultCredential(package, _isServer); } else @@ -213,8 +212,6 @@ internal int MakeSignature(byte[] buffer, int offset, int count, [AllowNull] ref // Accepts an incoming binary security blob and returns an outgoing binary security blob. internal byte[]? GetOutgoingBlob(byte[]? incomingBlob, bool throwOnError, out SecurityStatusPal statusCode) { - if (NetEventSource.IsEnabled) NetEventSource.Enter(this, incomingBlob); - byte[]? result = new byte[_tokenSize]; bool firstTime = _securityContext == null; @@ -233,13 +230,13 @@ internal int MakeSignature(byte[] buffer, int offset, int count, [AllowNull] ref ref result, ref _contextFlags); - if (NetEventSource.IsEnabled) NetEventSource.Info(this, $"SSPIWrapper.InitializeSecurityContext() returns statusCode:0x{((int)statusCode.ErrorCode):x8} ({statusCode})"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, $"SSPIWrapper.InitializeSecurityContext() returns statusCode:0x{((int)statusCode.ErrorCode):x8} ({statusCode})"); if (statusCode.ErrorCode == SecurityStatusPalErrorCode.CompleteNeeded) { statusCode = NegotiateStreamPal.CompleteAuthToken(ref _securityContext, result); - if (NetEventSource.IsEnabled) NetEventSource.Info(this, $"SSPIWrapper.CompleteAuthToken() returns statusCode:0x{((int)statusCode.ErrorCode):x8} ({statusCode})"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, $"SSPIWrapper.CompleteAuthToken() returns statusCode:0x{((int)statusCode.ErrorCode):x8} ({statusCode})"); result = null; } @@ -256,7 +253,7 @@ internal int MakeSignature(byte[] buffer, int offset, int count, [AllowNull] ref ref result, ref _contextFlags); - if (NetEventSource.IsEnabled) NetEventSource.Info(this, $"SSPIWrapper.AcceptSecurityContext() returns statusCode:0x{((int)statusCode.ErrorCode):x8} ({statusCode})"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, $"SSPIWrapper.AcceptSecurityContext() returns statusCode:0x{((int)statusCode.ErrorCode):x8} ({statusCode})"); } } finally @@ -280,12 +277,9 @@ internal int MakeSignature(byte[] buffer, int offset, int count, [AllowNull] ref _isCompleted = true; if (throwOnError) { - Exception exception = NegotiateStreamPal.CreateExceptionFromError(statusCode); - if (NetEventSource.IsEnabled) NetEventSource.Exit(this, exception); - throw exception; + throw NegotiateStreamPal.CreateExceptionFromError(statusCode); } - if (NetEventSource.IsEnabled) NetEventSource.Exit(this, $"null statusCode:0x{((int)statusCode.ErrorCode):x8} ({statusCode})"); return null; } else if (firstTime && _credentialsHandle != null) @@ -301,15 +295,10 @@ internal int MakeSignature(byte[] buffer, int offset, int count, [AllowNull] ref // Success. _isCompleted = true; } - else if (NetEventSource.IsEnabled) + else { // We need to continue. - if (NetEventSource.IsEnabled) NetEventSource.Info(this, $"need continue statusCode:0x{((int)statusCode.ErrorCode):x8} ({statusCode}) _securityContext:{_securityContext}"); - } - - if (NetEventSource.IsEnabled) - { - if (NetEventSource.IsEnabled) NetEventSource.Exit(this, $"IsCompleted: {IsCompleted}"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, $"need continue statusCode:0x{((int)statusCode.ErrorCode):x8} ({statusCode}) _securityContext:{_securityContext}"); } return result; @@ -324,7 +313,7 @@ internal int MakeSignature(byte[] buffer, int offset, int count, [AllowNull] ref string? spn = NegotiateStreamPal.QueryContextClientSpecifiedSpn(_securityContext!); - if (NetEventSource.IsEnabled) NetEventSource.Info(this, $"The client specified SPN is [{spn}]"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, $"The client specified SPN is [{spn}]"); return spn; } diff --git a/src/libraries/Common/src/System/Net/NegotiationInfoClass.cs b/src/libraries/Common/src/System/Net/NegotiationInfoClass.cs index 1e9fcaa48d9b..f49af9ad9969 100644 --- a/src/libraries/Common/src/System/Net/NegotiationInfoClass.cs +++ b/src/libraries/Common/src/System/Net/NegotiationInfoClass.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net { diff --git a/src/libraries/Common/src/System/Net/NetworkInformation/HostInformation.cs b/src/libraries/Common/src/System/Net/NetworkInformation/HostInformation.cs index f4c2ff9bd872..e60de472ede5 100644 --- a/src/libraries/Common/src/System/Net/NetworkInformation/HostInformation.cs +++ b/src/libraries/Common/src/System/Net/NetworkInformation/HostInformation.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.NetworkInformation { diff --git a/src/libraries/Common/src/System/Net/NetworkInformation/HostInformationPal.Unix.cs b/src/libraries/Common/src/System/Net/NetworkInformation/HostInformationPal.Unix.cs index 5813126d725b..f3bdb8997f5b 100644 --- a/src/libraries/Common/src/System/Net/NetworkInformation/HostInformationPal.Unix.cs +++ b/src/libraries/Common/src/System/Net/NetworkInformation/HostInformationPal.Unix.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.NetworkInformation { diff --git a/src/libraries/Common/src/System/Net/NetworkInformation/HostInformationPal.Windows.cs b/src/libraries/Common/src/System/Net/NetworkInformation/HostInformationPal.Windows.cs index ff00fdfe1a19..27f6ba5d1937 100644 --- a/src/libraries/Common/src/System/Net/NetworkInformation/HostInformationPal.Windows.cs +++ b/src/libraries/Common/src/System/Net/NetworkInformation/HostInformationPal.Windows.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.ComponentModel; diff --git a/src/libraries/Common/src/System/Net/NetworkInformation/InterfaceInfoPal.Unix.cs b/src/libraries/Common/src/System/Net/NetworkInformation/InterfaceInfoPal.Unix.cs index 8e9b2fc77c44..fc537f3add67 100644 --- a/src/libraries/Common/src/System/Net/NetworkInformation/InterfaceInfoPal.Unix.cs +++ b/src/libraries/Common/src/System/Net/NetworkInformation/InterfaceInfoPal.Unix.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.NetworkInformation { @@ -11,4 +10,4 @@ public static uint InterfaceNameToIndex(string interfaceName) return Interop.Sys.InterfaceNameToIndex(interfaceName); } } -} \ No newline at end of file +} diff --git a/src/libraries/Common/src/System/Net/NetworkInformation/InterfaceInfoPal.Windows.cs b/src/libraries/Common/src/System/Net/NetworkInformation/InterfaceInfoPal.Windows.cs index 3ea7c72f5037..4912d17029d1 100644 --- a/src/libraries/Common/src/System/Net/NetworkInformation/InterfaceInfoPal.Windows.cs +++ b/src/libraries/Common/src/System/Net/NetworkInformation/InterfaceInfoPal.Windows.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.NetworkInformation { @@ -11,4 +10,4 @@ public static uint InterfaceNameToIndex(string interfaceName) return Interop.IpHlpApi.if_nametoindex(interfaceName); } } -} \ No newline at end of file +} diff --git a/src/libraries/Common/src/System/Net/NetworkInformation/NetworkInformationException.cs b/src/libraries/Common/src/System/Net/NetworkInformation/NetworkInformationException.cs index 4644134f8cc5..91fb17c95c33 100644 --- a/src/libraries/Common/src/System/Net/NetworkInformation/NetworkInformationException.cs +++ b/src/libraries/Common/src/System/Net/NetworkInformation/NetworkInformationException.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.ComponentModel; using System.Net.Sockets; diff --git a/src/libraries/Common/src/System/Net/NetworkInformation/StartIPOptions.cs b/src/libraries/Common/src/System/Net/NetworkInformation/StartIPOptions.cs index 7b4671500851..10504236e295 100644 --- a/src/libraries/Common/src/System/Net/NetworkInformation/StartIPOptions.cs +++ b/src/libraries/Common/src/System/Net/NetworkInformation/StartIPOptions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.NetworkInformation { diff --git a/src/libraries/Common/src/System/Net/NetworkInformation/UnixCommandLinePing.cs b/src/libraries/Common/src/System/Net/NetworkInformation/UnixCommandLinePing.cs index a4d3143a83cf..24063dccb005 100644 --- a/src/libraries/Common/src/System/Net/NetworkInformation/UnixCommandLinePing.cs +++ b/src/libraries/Common/src/System/Net/NetworkInformation/UnixCommandLinePing.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Globalization; @@ -75,6 +74,9 @@ public enum PingFragmentOptions { Default, Do, Dont }; /// The packet size to use in the ping. Exact packet payload cannot be specified. /// The timeout to use in the ping, in milliseconds. /// A string representation of the IP address to ping. + /// true for ipv4; false for ipv6. + /// The time to live. + /// Fragmentation options. /// The constructed command line arguments, which can be passed to ping or ping6. public static string ConstructCommandLine(int packetSize, int timeout, string address, bool ipv4, int ttl = 0, PingFragmentOptions fragmentOption = PingFragmentOptions.Default) { diff --git a/src/libraries/Common/src/System/Net/RangeValidationHelpers.cs b/src/libraries/Common/src/System/Net/RangeValidationHelpers.cs index f7479611cb54..98322b1d0df3 100644 --- a/src/libraries/Common/src/System/Net/RangeValidationHelpers.cs +++ b/src/libraries/Common/src/System/Net/RangeValidationHelpers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net { diff --git a/src/libraries/Common/src/System/Net/RawSocketPermissions.cs b/src/libraries/Common/src/System/Net/RawSocketPermissions.cs index 599a4b7df949..2c27a979814e 100644 --- a/src/libraries/Common/src/System/Net/RawSocketPermissions.cs +++ b/src/libraries/Common/src/System/Net/RawSocketPermissions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Net.Sockets; diff --git a/src/libraries/Common/src/System/Net/Security/CertificateHelper.Unix.cs b/src/libraries/Common/src/System/Net/Security/CertificateHelper.Unix.cs index d69563e36883..551cfa340e05 100644 --- a/src/libraries/Common/src/System/Net/Security/CertificateHelper.Unix.cs +++ b/src/libraries/Common/src/System/Net/Security/CertificateHelper.Unix.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Security.Cryptography.X509Certificates; diff --git a/src/libraries/Common/src/System/Net/Security/CertificateHelper.Windows.cs b/src/libraries/Common/src/System/Net/Security/CertificateHelper.Windows.cs index fcb49a04b3fa..be47fcce20ce 100644 --- a/src/libraries/Common/src/System/Net/Security/CertificateHelper.Windows.cs +++ b/src/libraries/Common/src/System/Net/Security/CertificateHelper.Windows.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Security.Cryptography.X509Certificates; diff --git a/src/libraries/Common/src/System/Net/Security/CertificateHelper.cs b/src/libraries/Common/src/System/Net/Security/CertificateHelper.cs index 30c8f9330a33..b2956fdf44ff 100644 --- a/src/libraries/Common/src/System/Net/Security/CertificateHelper.cs +++ b/src/libraries/Common/src/System/Net/Security/CertificateHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using Microsoft.Win32.SafeHandles; @@ -39,7 +38,7 @@ internal static partial class CertificateHelper { if (!cert.HasPrivateKey) { - if (NetEventSource.IsEnabled) + if (NetEventSource.Log.IsEnabled()) { NetEventSource.Info(candidateCerts, $"Skipping current X509Certificate2 {cert.GetHashCode()} since it doesn't have private key. Certificate Subject: {cert.Subject}, Thumbprint: {cert.Thumbprint}."); } @@ -48,7 +47,7 @@ internal static partial class CertificateHelper if (IsValidClientCertificate(cert)) { - if (NetEventSource.IsEnabled) + if (NetEventSource.Log.IsEnabled()) { NetEventSource.Info(candidateCerts, $"Choosing X509Certificate2 {cert.GetHashCode()} as the Client Certificate. Certificate Subject: {cert.Subject}, Thumbprint: {cert.Thumbprint}."); } @@ -56,7 +55,7 @@ internal static partial class CertificateHelper } } - if (NetEventSource.IsEnabled) + if (NetEventSource.Log.IsEnabled()) { NetEventSource.Info(candidateCerts, "No eligible client certificate found."); } @@ -69,7 +68,7 @@ private static bool IsValidClientCertificate(X509Certificate2 cert) { if ((extension is X509EnhancedKeyUsageExtension eku) && !IsValidForClientAuthenticationEKU(eku)) { - if (NetEventSource.IsEnabled) + if (NetEventSource.Log.IsEnabled()) { NetEventSource.Info(cert, $"For Certificate {cert.GetHashCode()} - current X509EnhancedKeyUsageExtension {eku.GetHashCode()} is not valid for Client Authentication."); } @@ -77,7 +76,7 @@ private static bool IsValidClientCertificate(X509Certificate2 cert) } else if ((extension is X509KeyUsageExtension ku) && !IsValidForDigitalSignatureUsage(ku)) { - if (NetEventSource.IsEnabled) + if (NetEventSource.Log.IsEnabled()) { NetEventSource.Info(cert, $"For Certificate {cert.GetHashCode()} - current X509KeyUsageExtension {ku.GetHashCode()} is not valid for Digital Signature."); } diff --git a/src/libraries/Common/src/System/Net/Security/CertificateValidation.Unix.cs b/src/libraries/Common/src/System/Net/Security/CertificateValidation.Unix.cs index ba00467c14f3..797d736c07b6 100644 --- a/src/libraries/Common/src/System/Net/Security/CertificateValidation.Unix.cs +++ b/src/libraries/Common/src/System/Net/Security/CertificateValidation.Unix.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/System/Net/Security/NegotiateStreamPal.Unix.cs b/src/libraries/Common/src/System/Net/Security/NegotiateStreamPal.Unix.cs index 8ba6978f874b..775647853b8f 100644 --- a/src/libraries/Common/src/System/Net/Security/NegotiateStreamPal.Unix.cs +++ b/src/libraries/Common/src/System/Net/Security/NegotiateStreamPal.Unix.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.IO; @@ -285,7 +284,7 @@ private static SecurityStatusPal EstablishSecurityContext( if (context == null) { - if (NetEventSource.IsEnabled) + if (NetEventSource.Log.IsEnabled()) { string protocol = isNtlmOnly ? "NTLM" : "SPNEGO"; NetEventSource.Info(context, $"requested protocol = {protocol}, target = {targetName}"); @@ -316,7 +315,7 @@ private static SecurityStatusPal EstablishSecurityContext( if (done) { - if (NetEventSource.IsEnabled) + if (NetEventSource.Log.IsEnabled()) { string protocol = isNtlmOnly ? "NTLM" : isNtlmUsed ? "SPNEGO-NTLM" : "SPNEGO-Kerberos"; NetEventSource.Info(context, $"actual protocol = {protocol}"); @@ -345,7 +344,7 @@ private static SecurityStatusPal EstablishSecurityContext( } catch (Exception ex) { - if (NetEventSource.IsEnabled) NetEventSource.Error(null, ex); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(null, ex); return new SecurityStatusPal(SecurityStatusPalErrorCode.InternalError, ex); } } @@ -432,7 +431,7 @@ internal static SecurityStatusPal AcceptSecurityContext( SecurityStatusPalErrorCode errorCode; if (done) { - if (NetEventSource.IsEnabled) + if (NetEventSource.Log.IsEnabled()) { string protocol = isNtlmUsed ? "SPNEGO-NTLM" : "SPNEGO-Kerberos"; NetEventSource.Info(securityContext, $"AcceptSecurityContext: actual protocol = {protocol}"); @@ -450,12 +449,12 @@ internal static SecurityStatusPal AcceptSecurityContext( } catch (Interop.NetSecurityNative.GssApiException gex) { - if (NetEventSource.IsEnabled) NetEventSource.Error(null, gex); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(null, gex); return new SecurityStatusPal(GetErrorCode(gex), gex); } catch (Exception ex) { - if (NetEventSource.IsEnabled) NetEventSource.Error(null, ex); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(null, ex); return new SecurityStatusPal(SecurityStatusPalErrorCode.InternalError, ex); } } @@ -496,7 +495,7 @@ private static string GetUser( } catch (Exception ex) { - if (NetEventSource.IsEnabled) NetEventSource.Error(null, ex); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(null, ex); throw; } } diff --git a/src/libraries/Common/src/System/Net/Security/NegotiateStreamPal.Windows.cs b/src/libraries/Common/src/System/Net/Security/NegotiateStreamPal.Windows.cs index 617f3242a602..5e095ce96fd8 100644 --- a/src/libraries/Common/src/System/Net/Security/NegotiateStreamPal.Windows.cs +++ b/src/libraries/Common/src/System/Net/Security/NegotiateStreamPal.Windows.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.ComponentModel; @@ -44,7 +43,7 @@ internal static unsafe SafeFreeCredentials AcquireCredentialsHandle(string packa if (result != Interop.SECURITY_STATUS.OK) { - if (NetEventSource.IsEnabled) NetEventSource.Error(null, SR.Format(SR.net_log_operation_failed_with_error, nameof(Interop.SspiCli.SspiEncodeStringsAsAuthIdentity), $"0x{(int)result:X}")); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(null, SR.Format(SR.net_log_operation_failed_with_error, nameof(Interop.SspiCli.SspiEncodeStringsAsAuthIdentity), $"0x{(int)result:X}")); throw new Win32Exception((int)result); } diff --git a/src/libraries/Common/src/System/Net/Security/NetEventSource.Security.Windows.cs b/src/libraries/Common/src/System/Net/Security/NetEventSource.Security.Windows.cs index 5ceb41cb71c3..6a6676da17dd 100644 --- a/src/libraries/Common/src/System/Net/Security/NetEventSource.Security.Windows.cs +++ b/src/libraries/Common/src/System/Net/Security/NetEventSource.Security.Windows.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics.Tracing; diff --git a/src/libraries/Common/src/System/Net/Security/NetEventSource.Security.cs b/src/libraries/Common/src/System/Net/Security/NetEventSource.Security.cs index d91badee89fa..b3be3ba0baf1 100644 --- a/src/libraries/Common/src/System/Net/Security/NetEventSource.Security.cs +++ b/src/libraries/Common/src/System/Net/Security/NetEventSource.Security.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics.Tracing; diff --git a/src/libraries/Common/src/System/Net/Security/SSPIHandleCache.cs b/src/libraries/Common/src/System/Net/Security/SSPIHandleCache.cs index 90e1dc85f95c..e6b7cbd01175 100644 --- a/src/libraries/Common/src/System/Net/Security/SSPIHandleCache.cs +++ b/src/libraries/Common/src/System/Net/Security/SSPIHandleCache.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Threading; @@ -40,7 +39,7 @@ internal static void CacheCredential(SafeFreeCredentials newHandle) { if (!ExceptionCheck.IsFatal(e)) { - if (NetEventSource.IsEnabled) NetEventSource.Fail(null, $"Attempted to throw: {e}"); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Fail(null, $"Attempted to throw: {e}"); } } } diff --git a/src/libraries/Common/src/System/Net/Security/SecurityBuffer.Windows.cs b/src/libraries/Common/src/System/Net/Security/SecurityBuffer.Windows.cs index 48589338e62c..240761616c89 100644 --- a/src/libraries/Common/src/System/Net/Security/SecurityBuffer.Windows.cs +++ b/src/libraries/Common/src/System/Net/Security/SecurityBuffer.Windows.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Net/Security/SecurityBufferType.Windows.cs b/src/libraries/Common/src/System/Net/Security/SecurityBufferType.Windows.cs index 51174938a18f..1ccea88a31ab 100644 --- a/src/libraries/Common/src/System/Net/Security/SecurityBufferType.Windows.cs +++ b/src/libraries/Common/src/System/Net/Security/SecurityBufferType.Windows.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.Security { diff --git a/src/libraries/Common/src/System/Net/Security/SecurityContextTokenHandle.cs b/src/libraries/Common/src/System/Net/Security/SecurityContextTokenHandle.cs index 00e5b3ac60cc..8e889f852afc 100644 --- a/src/libraries/Common/src/System/Net/Security/SecurityContextTokenHandle.cs +++ b/src/libraries/Common/src/System/Net/Security/SecurityContextTokenHandle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/System/Net/Security/SslClientAuthenticationOptionsExtensions.cs b/src/libraries/Common/src/System/Net/Security/SslClientAuthenticationOptionsExtensions.cs index fcc2fb94e59a..b2823bc09956 100644 --- a/src/libraries/Common/src/System/Net/Security/SslClientAuthenticationOptionsExtensions.cs +++ b/src/libraries/Common/src/System/Net/Security/SslClientAuthenticationOptionsExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; #if DEBUG diff --git a/src/libraries/Common/src/System/Net/Security/Unix/SafeDeleteContext.cs b/src/libraries/Common/src/System/Net/Security/Unix/SafeDeleteContext.cs index 3ced4e156f3b..eab627c6afd9 100644 --- a/src/libraries/Common/src/System/Net/Security/Unix/SafeDeleteContext.cs +++ b/src/libraries/Common/src/System/Net/Security/Unix/SafeDeleteContext.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/System/Net/Security/Unix/SafeDeleteNegoContext.cs b/src/libraries/Common/src/System/Net/Security/Unix/SafeDeleteNegoContext.cs index 0e4add100f76..d7fe7d5a81a0 100644 --- a/src/libraries/Common/src/System/Net/Security/Unix/SafeDeleteNegoContext.cs +++ b/src/libraries/Common/src/System/Net/Security/Unix/SafeDeleteNegoContext.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/System/Net/Security/Unix/SafeDeleteSslContext.cs b/src/libraries/Common/src/System/Net/Security/Unix/SafeDeleteSslContext.cs index 52ef417ad3ba..51a140a727de 100644 --- a/src/libraries/Common/src/System/Net/Security/Unix/SafeDeleteSslContext.cs +++ b/src/libraries/Common/src/System/Net/Security/Unix/SafeDeleteSslContext.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/System/Net/Security/Unix/SafeFreeCertContext.cs b/src/libraries/Common/src/System/Net/Security/Unix/SafeFreeCertContext.cs index df78077e4d64..a9e87d98f22c 100644 --- a/src/libraries/Common/src/System/Net/Security/Unix/SafeFreeCertContext.cs +++ b/src/libraries/Common/src/System/Net/Security/Unix/SafeFreeCertContext.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/System/Net/Security/Unix/SafeFreeCredentials.cs b/src/libraries/Common/src/System/Net/Security/Unix/SafeFreeCredentials.cs index 236e0e61484d..e28a85ba606e 100644 --- a/src/libraries/Common/src/System/Net/Security/Unix/SafeFreeCredentials.cs +++ b/src/libraries/Common/src/System/Net/Security/Unix/SafeFreeCredentials.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Net/Security/Unix/SafeFreeNegoCredentials.cs b/src/libraries/Common/src/System/Net/Security/Unix/SafeFreeNegoCredentials.cs index b36c1394330a..2ab108c96f7f 100644 --- a/src/libraries/Common/src/System/Net/Security/Unix/SafeFreeNegoCredentials.cs +++ b/src/libraries/Common/src/System/Net/Security/Unix/SafeFreeNegoCredentials.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/System/Net/Security/Unix/SafeFreeSslCredentials.cs b/src/libraries/Common/src/System/Net/Security/Unix/SafeFreeSslCredentials.cs index 90ee4654cebf..0f80c7117c84 100644 --- a/src/libraries/Common/src/System/Net/Security/Unix/SafeFreeSslCredentials.cs +++ b/src/libraries/Common/src/System/Net/Security/Unix/SafeFreeSslCredentials.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using Microsoft.Win32.SafeHandles; @@ -20,7 +19,7 @@ internal sealed class SafeFreeSslCredentials : SafeFreeCredentials private SafeEvpPKeyHandle? _certKeyHandle; private SslProtocols _protocols = SslProtocols.None; private EncryptionPolicy _policy; - private bool _isInvalid = false; + private bool _isInvalid; internal SafeX509Handle? CertHandle { diff --git a/src/libraries/Common/src/System/Net/Security/Unix/SecChannelBindings.cs b/src/libraries/Common/src/System/Net/Security/Unix/SecChannelBindings.cs index 884350428f92..ec8c69bb3dd2 100644 --- a/src/libraries/Common/src/System/Net/Security/Unix/SecChannelBindings.cs +++ b/src/libraries/Common/src/System/Net/Security/Unix/SecChannelBindings.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/System/Net/SecurityProtocol.cs b/src/libraries/Common/src/System/Net/SecurityProtocol.cs index 04e4285cb458..f6de449ef3b8 100644 --- a/src/libraries/Common/src/System/Net/SecurityProtocol.cs +++ b/src/libraries/Common/src/System/Net/SecurityProtocol.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Security.Authentication; diff --git a/src/libraries/Common/src/System/Net/SecurityStatusAdapterPal.Windows.cs b/src/libraries/Common/src/System/Net/SecurityStatusAdapterPal.Windows.cs index 24242b57795b..3b01a15c6a3e 100644 --- a/src/libraries/Common/src/System/Net/SecurityStatusAdapterPal.Windows.cs +++ b/src/libraries/Common/src/System/Net/SecurityStatusAdapterPal.Windows.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.ComponentModel; diff --git a/src/libraries/Common/src/System/Net/SecurityStatusPal.cs b/src/libraries/Common/src/System/Net/SecurityStatusPal.cs index d0f7b26c038d..3003dc42cbdc 100644 --- a/src/libraries/Common/src/System/Net/SecurityStatusPal.cs +++ b/src/libraries/Common/src/System/Net/SecurityStatusPal.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable diff --git a/src/libraries/Common/src/System/Net/SocketAddress.cs b/src/libraries/Common/src/System/Net/SocketAddress.cs index b02d4a799d36..b3e58c222ca4 100644 --- a/src/libraries/Common/src/System/Net/SocketAddress.cs +++ b/src/libraries/Common/src/System/Net/SocketAddress.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Net/SocketAddressPal.Unix.cs b/src/libraries/Common/src/System/Net/SocketAddressPal.Unix.cs index f3e198f50312..3aa6d95337c5 100644 --- a/src/libraries/Common/src/System/Net/SocketAddressPal.Unix.cs +++ b/src/libraries/Common/src/System/Net/SocketAddressPal.Unix.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Net/SocketAddressPal.Windows.cs b/src/libraries/Common/src/System/Net/SocketAddressPal.Windows.cs index 82f0a6d6bbde..bc54cea438af 100644 --- a/src/libraries/Common/src/System/Net/SocketAddressPal.Windows.cs +++ b/src/libraries/Common/src/System/Net/SocketAddressPal.Windows.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Net.Sockets; diff --git a/src/libraries/Common/src/System/Net/SocketProtocolSupportPal.Unix.cs b/src/libraries/Common/src/System/Net/SocketProtocolSupportPal.Unix.cs index 1483ec2951f0..916b5cb07cd6 100644 --- a/src/libraries/Common/src/System/Net/SocketProtocolSupportPal.Unix.cs +++ b/src/libraries/Common/src/System/Net/SocketProtocolSupportPal.Unix.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Net.Internals; using System.Net.Sockets; diff --git a/src/libraries/Common/src/System/Net/SocketProtocolSupportPal.Windows.cs b/src/libraries/Common/src/System/Net/SocketProtocolSupportPal.Windows.cs index c01b81c63e3b..ab388ab53da5 100644 --- a/src/libraries/Common/src/System/Net/SocketProtocolSupportPal.Windows.cs +++ b/src/libraries/Common/src/System/Net/SocketProtocolSupportPal.Windows.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Net.Sockets; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/System/Net/Sockets/ProtocolFamily.cs b/src/libraries/Common/src/System/Net/Sockets/ProtocolFamily.cs index 6594880eb3a1..b5a19da5ced4 100644 --- a/src/libraries/Common/src/System/Net/Sockets/ProtocolFamily.cs +++ b/src/libraries/Common/src/System/Net/Sockets/ProtocolFamily.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #if SYSTEM_NET_SOCKETS_DLL namespace System.Net.Sockets diff --git a/src/libraries/Common/src/System/Net/Sockets/ProtocolType.cs b/src/libraries/Common/src/System/Net/Sockets/ProtocolType.cs index f74ae1e9f48e..eadb23bee4bb 100644 --- a/src/libraries/Common/src/System/Net/Sockets/ProtocolType.cs +++ b/src/libraries/Common/src/System/Net/Sockets/ProtocolType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #if SYSTEM_NET_SOCKETS_DLL namespace System.Net.Sockets diff --git a/src/libraries/Common/src/System/Net/Sockets/SocketErrorPal.Unix.cs b/src/libraries/Common/src/System/Net/Sockets/SocketErrorPal.Unix.cs index 9381197e0469..7d3191e6d5d3 100644 --- a/src/libraries/Common/src/System/Net/Sockets/SocketErrorPal.Unix.cs +++ b/src/libraries/Common/src/System/Net/Sockets/SocketErrorPal.Unix.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics; @@ -21,7 +20,7 @@ static SocketErrorPal() #endif private const int NativeErrorToSocketErrorCount = 42; - private const int SocketErrorToNativeErrorCount = 40; + private const int SocketErrorToNativeErrorCount = 41; // No Interop.Errors are included for the following SocketErrors, as there's no good mapping: // - SocketError.NoRecovery @@ -126,6 +125,7 @@ static SocketErrorPal() { SocketError.TooManyOpenSockets, Interop.Error.ENFILE }, // could also have been EMFILE { SocketError.TryAgain, Interop.Error.EAGAIN }, // not a perfect mapping, but better than nothing { SocketError.WouldBlock, Interop.Error.EAGAIN }, + { SocketError.SocketError, Interop.Error.ESOCKETERROR }, }; internal static SocketError GetSocketErrorForNativeError(Interop.Error errno) diff --git a/src/libraries/Common/src/System/Net/Sockets/SocketType.cs b/src/libraries/Common/src/System/Net/Sockets/SocketType.cs index 89fbf0e01538..58dc09a4fe73 100644 --- a/src/libraries/Common/src/System/Net/Sockets/SocketType.cs +++ b/src/libraries/Common/src/System/Net/Sockets/SocketType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #if SYSTEM_NET_SOCKETS_DLL namespace System.Net.Sockets diff --git a/src/libraries/Common/src/System/Net/TcpValidationHelpers.cs b/src/libraries/Common/src/System/Net/TcpValidationHelpers.cs index 3bc5b8e67a62..3e87d9b03937 100644 --- a/src/libraries/Common/src/System/Net/TcpValidationHelpers.cs +++ b/src/libraries/Common/src/System/Net/TcpValidationHelpers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net { diff --git a/src/libraries/Common/src/System/Net/TlsStream.cs b/src/libraries/Common/src/System/Net/TlsStream.cs index 456fbea0797c..c1fe330f78f1 100644 --- a/src/libraries/Common/src/System/Net/TlsStream.cs +++ b/src/libraries/Common/src/System/Net/TlsStream.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Net.Security; diff --git a/src/libraries/Common/src/System/Net/UriScheme.cs b/src/libraries/Common/src/System/Net/UriScheme.cs index fc17947e8e8a..538320d76326 100644 --- a/src/libraries/Common/src/System/Net/UriScheme.cs +++ b/src/libraries/Common/src/System/Net/UriScheme.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net { diff --git a/src/libraries/Common/src/System/Net/WebHeaderEncoding.cs b/src/libraries/Common/src/System/Net/WebHeaderEncoding.cs index 967c5a78b2dc..2115d60df39e 100644 --- a/src/libraries/Common/src/System/Net/WebHeaderEncoding.cs +++ b/src/libraries/Common/src/System/Net/WebHeaderEncoding.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Text; diff --git a/src/libraries/Common/src/System/Net/WebSockets/ManagedWebSocket.cs b/src/libraries/Common/src/System/Net/WebSockets/ManagedWebSocket.cs index 8a2d42523241..e44b306e35b8 100644 --- a/src/libraries/Common/src/System/Net/WebSockets/ManagedWebSocket.cs +++ b/src/libraries/Common/src/System/Net/WebSockets/ManagedWebSocket.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Buffers; using System.Diagnostics; @@ -72,7 +71,7 @@ public static ManagedWebSocket CreateFromConnectedStream( /// expect to always receive unmasked payloads, whereas servers always send /// unmasked payloads and expect to always receive masked payloads. /// - private readonly bool _isServer = false; + private readonly bool _isServer; /// The agreed upon subprotocol with the server. private readonly string? _subprotocol; /// Timer used to send periodic pings to the server, at the interval specified @@ -104,9 +103,9 @@ public static ManagedWebSocket CreateFromConnectedStream( /// Whether we've ever received a close frame. private bool _receivedCloseFrame; /// The reason for the close, as sent by the server, or null if not yet closed. - private WebSocketCloseStatus? _closeStatus = null; + private WebSocketCloseStatus? _closeStatus; /// A description of the close reason as sent by the server, or null if not yet closed. - private string? _closeStatusDescription = null; + private string? _closeStatusDescription; /// /// The last header received in a ReceiveAsync. If ReceiveAsync got a header but then @@ -118,15 +117,15 @@ public static ManagedWebSocket CreateFromConnectedStream( /// private MessageHeader _lastReceiveHeader = new MessageHeader { Opcode = MessageOpcode.Text, Fin = true }; /// The offset of the next available byte in the _receiveBuffer. - private int _receiveBufferOffset = 0; + private int _receiveBufferOffset; /// The number of bytes available in the _receiveBuffer. - private int _receiveBufferCount = 0; + private int _receiveBufferCount; /// /// When dealing with partially read fragments of binary/text messages, a mask previously received may still /// apply, and the first new byte received may not correspond to the 0th position in the mask. This value is /// the next offset into the mask that should be applied. /// - private int _receivedMaskOffsetOffset = 0; + private int _receivedMaskOffsetOffset; /// /// Temporary send buffer. This should be released back to the ArrayPool once it's /// no longer needed for the current send operation. It is stored as an instance @@ -385,7 +384,7 @@ private ValueTask SendFrameLockAcquiredNonCancelableAsync(MessageOpcode opcode, // If we get here, the cancellation token is not cancelable so we don't have to worry about it, // and we own the semaphore, so we don't need to asynchronously wait for it. ValueTask writeTask = default; - bool releaseSemaphoreAndSendBuffer = true; + bool releaseSendBufferAndSemaphore = true; try { // Write the payload synchronously to the buffer, then write that buffer out to the network. @@ -403,7 +402,7 @@ private ValueTask SendFrameLockAcquiredNonCancelableAsync(MessageOpcode opcode, // Up until this point, if an exception occurred (such as when accessing _stream or when // calling GetResult), we want to release the semaphore and the send buffer. After this point, // both need to be held until writeTask completes. - releaseSemaphoreAndSendBuffer = false; + releaseSendBufferAndSemaphore = false; } catch (Exception exc) { @@ -414,10 +413,10 @@ private ValueTask SendFrameLockAcquiredNonCancelableAsync(MessageOpcode opcode, } finally { - if (releaseSemaphoreAndSendBuffer) + if (releaseSendBufferAndSemaphore) { - _sendFrameAsyncLock.Release(); ReleaseSendBuffer(); + _sendFrameAsyncLock.Release(); } } @@ -438,8 +437,8 @@ private async ValueTask WaitForWriteTaskAsync(ValueTask writeTask) } finally { - _sendFrameAsyncLock.Release(); ReleaseSendBuffer(); + _sendFrameAsyncLock.Release(); } } @@ -462,8 +461,8 @@ private async ValueTask SendFrameFallbackAsync(MessageOpcode opcode, bool endOfM } finally { - _sendFrameAsyncLock.Release(); ReleaseSendBuffer(); + _sendFrameAsyncLock.Release(); } } @@ -789,6 +788,7 @@ private async ValueTask ReceiveAsyncPrivateProcesses a received close message. /// The message header. + /// The CancellationToken used to cancel the websocket operation. /// The received result message. private async ValueTask HandleReceivedCloseAsync(MessageHeader header, CancellationToken cancellationToken) { @@ -884,6 +884,7 @@ private async ValueTask WaitForServerToCloseConnectionAsync(CancellationToken ca /// Processes a received ping or pong message. /// The message header. + /// The CancellationToken used to cancel the websocket operation. private async ValueTask HandleReceivedPingPongAsync(MessageHeader header, CancellationToken cancellationToken) { // Consume any (optional) payload associated with the ping/pong. @@ -1276,6 +1277,8 @@ private void AllocateSendBuffer(int minLength) /// Releases the send buffer to the pool. private void ReleaseSendBuffer() { + Debug.Assert(_sendFrameAsyncLock.CurrentCount == 0, "Caller should hold the _sendFrameAsyncLock"); + byte[]? old = _sendBuffer; if (old != null) { diff --git a/src/libraries/Common/src/System/Net/WebSockets/WebSocketValidate.cs b/src/libraries/Common/src/System/Net/WebSockets/WebSocketValidate.cs index aabc25ccb78c..729f82602da7 100644 --- a/src/libraries/Common/src/System/Net/WebSockets/WebSocketValidate.cs +++ b/src/libraries/Common/src/System/Net/WebSockets/WebSocketValidate.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Globalization; @@ -64,7 +63,9 @@ internal static void ValidateSubprotocol(string subProtocol) } if (!char.IsLetterOrDigit(ch) && +#pragma warning disable CA2249 // Consider using 'string.Contains' instead of 'string.IndexOf'. This file is built into a project that doesn't have string.Contains(char). Separators.IndexOf(ch) >= 0) +#pragma warning restore CA2249 { invalidChar = ch.ToString(); break; diff --git a/src/libraries/Common/src/System/NotImplemented.cs b/src/libraries/Common/src/System/NotImplemented.cs index 2d88aac78565..7322574940d3 100644 --- a/src/libraries/Common/src/System/NotImplemented.cs +++ b/src/libraries/Common/src/System/NotImplemented.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System { diff --git a/src/libraries/Common/src/System/Reflection/AssemblyMetadataAttribute.cs b/src/libraries/Common/src/System/Reflection/AssemblyMetadataAttribute.cs index 6f6eff5cd063..b0948b0c4aa8 100644 --- a/src/libraries/Common/src/System/Reflection/AssemblyMetadataAttribute.cs +++ b/src/libraries/Common/src/System/Reflection/AssemblyMetadataAttribute.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Reflection { diff --git a/src/libraries/Common/src/System/Reflection/Emit/IgnoreAccessChecksToAttributeBuilder.cs b/src/libraries/Common/src/System/Reflection/Emit/IgnoreAccessChecksToAttributeBuilder.cs index 1e90f6061baa..3b6d2b5a8bc2 100644 --- a/src/libraries/Common/src/System/Reflection/Emit/IgnoreAccessChecksToAttributeBuilder.cs +++ b/src/libraries/Common/src/System/Reflection/Emit/IgnoreAccessChecksToAttributeBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Linq; diff --git a/src/libraries/Common/src/System/Resources/ResourceWriter.cs b/src/libraries/Common/src/System/Resources/ResourceWriter.cs index cde3d16d89e9..0b97699b9a69 100644 --- a/src/libraries/Common/src/System/Resources/ResourceWriter.cs +++ b/src/libraries/Common/src/System/Resources/ResourceWriter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable diff --git a/src/libraries/Common/src/System/Runtime/ExceptionServices/ExceptionStackTrace.cs b/src/libraries/Common/src/System/Runtime/ExceptionServices/ExceptionStackTrace.cs index 57647f3ab15a..57aa55a61260 100644 --- a/src/libraries/Common/src/System/Runtime/ExceptionServices/ExceptionStackTrace.cs +++ b/src/libraries/Common/src/System/Runtime/ExceptionServices/ExceptionStackTrace.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Runtime/InteropServices/ComEventsMethod.cs b/src/libraries/Common/src/System/Runtime/InteropServices/ComEventsMethod.cs index 30ad0d22d418..d30c4114f6a6 100644 --- a/src/libraries/Common/src/System/Runtime/InteropServices/ComEventsMethod.cs +++ b/src/libraries/Common/src/System/Runtime/InteropServices/ComEventsMethod.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable @@ -27,7 +26,7 @@ internal class ComEventsMethod /// public class DelegateWrapper { - private bool _once = false; + private bool _once; private int _expectedParamsCount; private Type?[]? _cachedTargetTypes; diff --git a/src/libraries/Common/src/System/Runtime/InteropServices/ComEventsSink.cs b/src/libraries/Common/src/System/Runtime/InteropServices/ComEventsSink.cs index 7e9dbca72146..e9b6cd0370f6 100644 --- a/src/libraries/Common/src/System/Runtime/InteropServices/ComEventsSink.cs +++ b/src/libraries/Common/src/System/Runtime/InteropServices/ComEventsSink.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable diff --git a/src/libraries/Common/src/System/Runtime/InteropServices/IDispatch.cs b/src/libraries/Common/src/System/Runtime/InteropServices/IDispatch.cs index fe57a781cb99..34263ecac831 100644 --- a/src/libraries/Common/src/System/Runtime/InteropServices/IDispatch.cs +++ b/src/libraries/Common/src/System/Runtime/InteropServices/IDispatch.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Runtime.InteropServices { diff --git a/src/libraries/Common/src/System/Runtime/InteropServices/SuppressGCTransitionAttribute.internal.cs b/src/libraries/Common/src/System/Runtime/InteropServices/SuppressGCTransitionAttribute.internal.cs index 116ab09cff0d..e9fbb73111d2 100644 --- a/src/libraries/Common/src/System/Runtime/InteropServices/SuppressGCTransitionAttribute.internal.cs +++ b/src/libraries/Common/src/System/Runtime/InteropServices/SuppressGCTransitionAttribute.internal.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // Internal copy of SuppressGCTransitionAttribute used only to enable files // that use this to compile. On any platforms that support this attribute, diff --git a/src/libraries/Common/src/System/Runtime/InteropServices/Variant.cs b/src/libraries/Common/src/System/Runtime/InteropServices/Variant.cs index 1757e72cc7dd..f845179c5106 100644 --- a/src/libraries/Common/src/System/Runtime/InteropServices/Variant.cs +++ b/src/libraries/Common/src/System/Runtime/InteropServices/Variant.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable diff --git a/src/libraries/Common/src/System/Runtime/InteropServices/WindowsRuntime/IRestrictedErrorInfo.cs b/src/libraries/Common/src/System/Runtime/InteropServices/WindowsRuntime/IRestrictedErrorInfo.cs index 90b63c28c651..1cf4566c7616 100644 --- a/src/libraries/Common/src/System/Runtime/InteropServices/WindowsRuntime/IRestrictedErrorInfo.cs +++ b/src/libraries/Common/src/System/Runtime/InteropServices/WindowsRuntime/IRestrictedErrorInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/src/System/Runtime/InteropServices/WindowsRuntime/WindowsRuntimeImportAttribute.cs b/src/libraries/Common/src/System/Runtime/InteropServices/WindowsRuntime/WindowsRuntimeImportAttribute.cs index 4118488947c3..64ec4467df14 100644 --- a/src/libraries/Common/src/System/Runtime/InteropServices/WindowsRuntime/WindowsRuntimeImportAttribute.cs +++ b/src/libraries/Common/src/System/Runtime/InteropServices/WindowsRuntime/WindowsRuntimeImportAttribute.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Runtime.InteropServices.WindowsRuntime { diff --git a/src/libraries/Common/src/System/Runtime/Serialization/SerializationGuard.cs b/src/libraries/Common/src/System/Runtime/Serialization/SerializationGuard.cs index 35614ed28577..467ba639e799 100644 --- a/src/libraries/Common/src/System/Runtime/Serialization/SerializationGuard.cs +++ b/src/libraries/Common/src/System/Runtime/Serialization/SerializationGuard.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Reflection; diff --git a/src/libraries/Common/src/System/Runtime/Versioning/NonVersionableAttribute.cs b/src/libraries/Common/src/System/Runtime/Versioning/NonVersionableAttribute.cs index cb9533f2c3b2..5a875af8c9d2 100644 --- a/src/libraries/Common/src/System/Runtime/Versioning/NonVersionableAttribute.cs +++ b/src/libraries/Common/src/System/Runtime/Versioning/NonVersionableAttribute.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /*============================================================ ** diff --git a/src/libraries/Common/src/System/SR.cs b/src/libraries/Common/src/System/SR.cs index 69a233ed668e..4eed64c2bf64 100644 --- a/src/libraries/Common/src/System/SR.cs +++ b/src/libraries/Common/src/System/SR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Resources; @@ -10,14 +9,20 @@ namespace System { internal partial class SR { +#if (!NETSTANDARD1_0 && !NETSTANDARD1_1 && !NET45) // AppContext is not supported on < NetStandard1.3 or < .NET Framework 4.5 + private static readonly bool s_usingResourceKeys = AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false; +#endif + // This method is used to decide if we need to append the exception message parameters to the message when calling SR.Format. - // by default it returns false. + // by default it returns the value of System.Resources.UseSystemResourceKeys AppContext switch or false if not specified. // Native code generators can replace the value this returns based on user input at the time of native code generation. - // Marked as NoInlining because if this is used in an AoT compiled app that is not compiled into a single file, the user - // could compile each module with a different setting for this. We want to make sure there's a consistent behavior - // that doesn't depend on which native module this method got inlined into. - [MethodImpl(MethodImplOptions.NoInlining)] - private static bool UsingResourceKeys() => false; + // The Linker is also capable of replacing the value of this method when the application is being trimmed. + private static bool UsingResourceKeys() => +#if (!NETSTANDARD1_0 && !NETSTANDARD1_1 && !NET45) // AppContext is not supported on < NetStandard1.3 or < .NET Framework 4.5 + s_usingResourceKeys; +#else + false; +#endif internal static string GetResourceString(string resourceKey, string? defaultString = null) { diff --git a/src/libraries/Common/src/System/SR.vb b/src/libraries/Common/src/System/SR.vb index 16659f9bcf9c..0d2638aef63e 100644 --- a/src/libraries/Common/src/System/SR.vb +++ b/src/libraries/Common/src/System/SR.vb @@ -1,7 +1,5 @@ ' Licensed to the .NET Foundation under one or more agreements. ' The .NET Foundation licenses this file to you under the MIT license. -' See the LICENSE file in the project root for more information. - ' ' SR.vb ' diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/AlgorithmIdentifierAsn.manual.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/AlgorithmIdentifierAsn.manual.cs index 7235166ab5be..c7a4c5784ab9 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/AlgorithmIdentifierAsn.manual.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/AlgorithmIdentifierAsn.manual.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/AlgorithmIdentifierAsn.xml.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/AlgorithmIdentifierAsn.xml.cs index 6d907ad7c57d..35d0b39b1c0b 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/AlgorithmIdentifierAsn.xml.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/AlgorithmIdentifierAsn.xml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/AttributeAsn.manual.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/AttributeAsn.manual.cs index 2c361266651c..d678a965861b 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/AttributeAsn.manual.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/AttributeAsn.manual.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/AttributeAsn.xml.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/AttributeAsn.xml.cs index 4e4ab3960bb4..6fa2a5d44232 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/AttributeAsn.xml.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/AttributeAsn.xml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/CurveAsn.xml.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/CurveAsn.xml.cs index eb2983a2b558..f666c9990919 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/CurveAsn.xml.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/CurveAsn.xml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/DigestInfoAsn.xml.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/DigestInfoAsn.xml.cs index e242ec278305..b03078af5ce4 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/DigestInfoAsn.xml.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/DigestInfoAsn.xml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/DirectoryStringAsn.xml.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/DirectoryStringAsn.xml.cs index abc27ba7f7ce..ea1acfb882d6 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/DirectoryStringAsn.xml.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/DirectoryStringAsn.xml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/DssParms.xml.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/DssParms.xml.cs index 8839e6457cb9..73277ef154f9 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/DssParms.xml.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/DssParms.xml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/ECDomainParameters.xml.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/ECDomainParameters.xml.cs index 5d481c43b1a8..3070d197aa6a 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/ECDomainParameters.xml.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/ECDomainParameters.xml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/ECPrivateKey.xml.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/ECPrivateKey.xml.cs index c416a841c7ae..22afdff7b036 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/ECPrivateKey.xml.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/ECPrivateKey.xml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/EdiPartyNameAsn.xml.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/EdiPartyNameAsn.xml.cs index 3d70d7a4edbf..bcddaa006a27 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/EdiPartyNameAsn.xml.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/EdiPartyNameAsn.xml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/EncryptedPrivateKeyInfoAsn.xml.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/EncryptedPrivateKeyInfoAsn.xml.cs index 598aafcb76ad..bf38e78e4920 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/EncryptedPrivateKeyInfoAsn.xml.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/EncryptedPrivateKeyInfoAsn.xml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/FieldID.xml.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/FieldID.xml.cs index 6344dc69933d..2430555f445a 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/FieldID.xml.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/FieldID.xml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/GeneralNameAsn.xml.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/GeneralNameAsn.xml.cs index 1a26d9f65a2c..573db4c8a291 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/GeneralNameAsn.xml.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/GeneralNameAsn.xml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/OaepParamsAsn.xml.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/OaepParamsAsn.xml.cs index b81ec3a20120..1c002c73ab3c 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/OaepParamsAsn.xml.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/OaepParamsAsn.xml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/OtherNameAsn.xml.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/OtherNameAsn.xml.cs index 42a4147f7b99..165c728c3be1 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/OtherNameAsn.xml.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/OtherNameAsn.xml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/PBEParameter.xml.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/PBEParameter.xml.cs index 0d55b3d37568..029546126a6e 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/PBEParameter.xml.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/PBEParameter.xml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/PBES2Params.xml.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/PBES2Params.xml.cs index a7b6f9e70f7a..d21b758af285 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/PBES2Params.xml.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/PBES2Params.xml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pbkdf2Params.xml.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pbkdf2Params.xml.cs index ca7f36c49d67..c65f58c26afc 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pbkdf2Params.xml.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pbkdf2Params.xml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pbkdf2SaltChoice.xml.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pbkdf2SaltChoice.xml.cs index 7c2f02619275..c315b25fc3cf 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pbkdf2SaltChoice.xml.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pbkdf2SaltChoice.xml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs12/CertBagAsn.xml.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs12/CertBagAsn.xml.cs index 38fef15a46c7..5494d0f288d0 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs12/CertBagAsn.xml.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs12/CertBagAsn.xml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs12/MacData.xml.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs12/MacData.xml.cs index c7b0ae0696dd..e0e0be6db9f4 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs12/MacData.xml.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs12/MacData.xml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs12/PfxAsn.manual.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs12/PfxAsn.manual.cs index e9004e5a4bc4..56de18195471 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs12/PfxAsn.manual.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs12/PfxAsn.manual.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs12/PfxAsn.xml.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs12/PfxAsn.xml.cs index 56dfa3caa319..165aab84ee27 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs12/PfxAsn.xml.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs12/PfxAsn.xml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs12/SafeBagAsn.xml.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs12/SafeBagAsn.xml.cs index dd548c6a4aa4..995517b395f3 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs12/SafeBagAsn.xml.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs12/SafeBagAsn.xml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs7/ContentInfoAsn.xml.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs7/ContentInfoAsn.xml.cs index ed94ab299ae7..d2fd60d5747e 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs7/ContentInfoAsn.xml.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs7/ContentInfoAsn.xml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs7/EncryptedContentInfoAsn.xml.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs7/EncryptedContentInfoAsn.xml.cs index 2b9466abe65a..29fbd88bb97c 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs7/EncryptedContentInfoAsn.xml.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs7/EncryptedContentInfoAsn.xml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs7/EncryptedDataAsn.xml.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs7/EncryptedDataAsn.xml.cs index 2342c2bd0c25..85f028c2347f 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs7/EncryptedDataAsn.xml.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs7/EncryptedDataAsn.xml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/PrivateKeyInfoAsn.xml.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/PrivateKeyInfoAsn.xml.cs index f8cece5ea15e..b9627986bcbf 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/PrivateKeyInfoAsn.xml.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/PrivateKeyInfoAsn.xml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/PssParamsAsn.xml.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/PssParamsAsn.xml.cs index 3aa81006fb35..f46eb215ede8 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/PssParamsAsn.xml.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/PssParamsAsn.xml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/RSAPrivateKeyAsn.xml.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/RSAPrivateKeyAsn.xml.cs index 476b201ee9a7..2b187e7265ef 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/RSAPrivateKeyAsn.xml.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/RSAPrivateKeyAsn.xml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/RSAPublicKeyAsn.xml.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/RSAPublicKeyAsn.xml.cs index 5fb986a0cc08..608d86cd7491 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/RSAPublicKeyAsn.xml.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/RSAPublicKeyAsn.xml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/Rc2CbcParameters.manual.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/Rc2CbcParameters.manual.cs index ed1f1ca79d43..8ab8093c29e6 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/Rc2CbcParameters.manual.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/Rc2CbcParameters.manual.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Security.Cryptography.Asn1 { diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/Rc2CbcParameters.xml.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/Rc2CbcParameters.xml.cs index e31fc76318e6..c2f470c8998a 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/Rc2CbcParameters.xml.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/Rc2CbcParameters.xml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/SpecifiedECDomain.xml.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/SpecifiedECDomain.xml.cs index ae447d0e3c1b..0605d94124b6 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/SpecifiedECDomain.xml.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/SpecifiedECDomain.xml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/SubjectPublicKeyInfoAsn.xml.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/SubjectPublicKeyInfoAsn.xml.cs index bb2fbdd5b6d8..1b3e3b729f24 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/SubjectPublicKeyInfoAsn.xml.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/SubjectPublicKeyInfoAsn.xml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/X509ExtensionAsn.manual.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/X509ExtensionAsn.manual.cs index 6b9ab9f31702..77789901f347 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/X509ExtensionAsn.manual.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/X509ExtensionAsn.manual.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Security.Cryptography.X509Certificates; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/X509ExtensionAsn.xml.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/X509ExtensionAsn.xml.cs index 6652878c8871..893992fc2eb3 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/X509ExtensionAsn.xml.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/X509ExtensionAsn.xml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/asn.xslt b/src/libraries/Common/src/System/Security/Cryptography/Asn1/asn.xslt index 12f7ebfc328f..8198a2b551ae 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/asn.xslt +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/asn.xslt @@ -49,7 +49,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; @@ -143,7 +142,6 @@ namespace // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable SA1028 // ignore whitespace warnings for generated code using System; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1Reader/AsnValueReader.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1Reader/AsnValueReader.cs index 23b3292f817c..06ac95d7f733 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1Reader/AsnValueReader.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1Reader/AsnValueReader.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Numerics; using System.Security.Cryptography; diff --git a/src/libraries/Common/src/System/Security/Cryptography/CngPkcs8.cs b/src/libraries/Common/src/System/Security/Cryptography/CngPkcs8.cs index 22e592573c10..f4dff789d619 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/CngPkcs8.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/CngPkcs8.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Buffers; diff --git a/src/libraries/Common/src/System/Security/Cryptography/CryptoPool.cs b/src/libraries/Common/src/System/Security/Cryptography/CryptoPool.cs index 73d1a70125e6..a310667e968d 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/CryptoPool.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/CryptoPool.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Buffers; using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Security/Cryptography/DSACng.ImportExport.cs b/src/libraries/Common/src/System/Security/Cryptography/DSACng.ImportExport.cs index ded87debde3a..57e626126613 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/DSACng.ImportExport.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/DSACng.ImportExport.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using Internal.Cryptography; @@ -431,6 +430,7 @@ private static int FromBigEndian(byte[] b) /// /// This function checks the magic value in the key blob header /// + /// The expected magic number. /// Private blob if true else public key blob private static void CheckMagicValueOfKey(KeyBlobMagicNumber magic, bool includePrivateParameters) { diff --git a/src/libraries/Common/src/System/Security/Cryptography/DSACng.SignVerify.cs b/src/libraries/Common/src/System/Security/Cryptography/DSACng.SignVerify.cs index 406d2878fdbe..7971a35a2adf 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/DSACng.SignVerify.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/DSACng.SignVerify.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using Internal.Cryptography; diff --git a/src/libraries/Common/src/System/Security/Cryptography/DSACng.cs b/src/libraries/Common/src/System/Security/Cryptography/DSACng.cs index b92deb1c26b7..07a03107249d 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/DSACng.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/DSACng.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using Internal.Cryptography; diff --git a/src/libraries/Common/src/System/Security/Cryptography/DSAKeyFormatHelper.cs b/src/libraries/Common/src/System/Security/Cryptography/DSAKeyFormatHelper.cs index 60e5d30d1cd3..16941a863b26 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/DSAKeyFormatHelper.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/DSAKeyFormatHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Security/Cryptography/DSAOpenSsl.cs b/src/libraries/Common/src/System/Security/Cryptography/DSAOpenSsl.cs index 9a6f96fe6695..8c3b74b4ab82 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/DSAOpenSsl.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/DSAOpenSsl.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Security/Cryptography/DSASecurityTransforms.cs b/src/libraries/Common/src/System/Security/Cryptography/DSASecurityTransforms.cs index 857cca00d6fb..31c05b54e909 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/DSASecurityTransforms.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/DSASecurityTransforms.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Buffers; diff --git a/src/libraries/Common/src/System/Security/Cryptography/ECCng.HashAlgorithm.cs b/src/libraries/Common/src/System/Security/Cryptography/ECCng.HashAlgorithm.cs index 799cc0bde54e..fcea0742fc83 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/ECCng.HashAlgorithm.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/ECCng.HashAlgorithm.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Security/Cryptography/ECCng.ImportExport.cs b/src/libraries/Common/src/System/Security/Cryptography/ECCng.ImportExport.cs index 482f598cf00b..d26b894234a0 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/ECCng.ImportExport.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/ECCng.ImportExport.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using Internal.Cryptography; @@ -326,6 +325,7 @@ internal static byte[] GetPrimeCurveParameterBlob(ref ECCurve curve) /// /// This function checks the magic value in the key blob header /// + /// The expected magic number. /// Private blob if true else public key blob private static void CheckMagicValueOfKey(KeyBlobMagicNumber magic, bool includePrivateParameters) { diff --git a/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanCng.ImportExport.cs b/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanCng.ImportExport.cs index 8ffb7b1321e8..2f3b482709d6 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanCng.ImportExport.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanCng.ImportExport.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using Internal.NativeCrypto; diff --git a/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanCng.cs b/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanCng.cs index 20cef4317011..b05861d1db9d 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanCng.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanCng.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanDerivation.cs b/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanDerivation.cs index afa34b6cba69..f1329c25c85e 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanDerivation.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanDerivation.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanOpenSsl.Derive.cs b/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanOpenSsl.Derive.cs index 877d7367e580..8caa18617f6c 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanOpenSsl.Derive.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanOpenSsl.Derive.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanOpenSsl.cs b/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanOpenSsl.cs index ffb24db56d42..61e4678db3e5 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanOpenSsl.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanOpenSsl.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanOpenSslPublicKey.cs b/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanOpenSslPublicKey.cs index 397742140205..00dde9c3b1bf 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanOpenSslPublicKey.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanOpenSslPublicKey.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanSecurityTransforms.cs b/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanSecurityTransforms.cs index 6c02379fd19b..a134cae4271d 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanSecurityTransforms.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanSecurityTransforms.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Security.Cryptography.Apple; diff --git a/src/libraries/Common/src/System/Security/Cryptography/ECDsaCng.HashData.cs b/src/libraries/Common/src/System/Security/Cryptography/ECDsaCng.HashData.cs index 1fec4fe28315..773342895839 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/ECDsaCng.HashData.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/ECDsaCng.HashData.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Security/Cryptography/ECDsaCng.ImportExport.cs b/src/libraries/Common/src/System/Security/Cryptography/ECDsaCng.ImportExport.cs index 6e34e4cb4628..99786e2dc51e 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/ECDsaCng.ImportExport.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/ECDsaCng.ImportExport.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using Internal.NativeCrypto; diff --git a/src/libraries/Common/src/System/Security/Cryptography/ECDsaCng.SignVerify.cs b/src/libraries/Common/src/System/Security/Cryptography/ECDsaCng.SignVerify.cs index 277198b44852..0d121937d965 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/ECDsaCng.SignVerify.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/ECDsaCng.SignVerify.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Security/Cryptography/ECDsaCng.cs b/src/libraries/Common/src/System/Security/Cryptography/ECDsaCng.cs index a6da8c2755c3..4a6c655fb82e 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/ECDsaCng.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/ECDsaCng.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using static Internal.NativeCrypto.BCryptNative; diff --git a/src/libraries/Common/src/System/Security/Cryptography/ECDsaOpenSsl.cs b/src/libraries/Common/src/System/Security/Cryptography/ECDsaOpenSsl.cs index e6f2f21ae7a4..7c9d0cc2dc02 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/ECDsaOpenSsl.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/ECDsaOpenSsl.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.IO; diff --git a/src/libraries/Common/src/System/Security/Cryptography/ECDsaSecurityTransforms.cs b/src/libraries/Common/src/System/Security/Cryptography/ECDsaSecurityTransforms.cs index da68d61d336c..81a54abd1a10 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/ECDsaSecurityTransforms.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/ECDsaSecurityTransforms.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; using System.Security.Cryptography.Apple; diff --git a/src/libraries/Common/src/System/Security/Cryptography/ECOpenSsl.ImportExport.cs b/src/libraries/Common/src/System/Security/Cryptography/ECOpenSsl.ImportExport.cs index 5d9d497c0e66..1defeccf90a4 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/ECOpenSsl.ImportExport.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/ECOpenSsl.ImportExport.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/System/Security/Cryptography/ECOpenSsl.cs b/src/libraries/Common/src/System/Security/Cryptography/ECOpenSsl.cs index d41b8016e71a..6ad2c6eece72 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/ECOpenSsl.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/ECOpenSsl.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Security/Cryptography/EccKeyFormatHelper.cs b/src/libraries/Common/src/System/Security/Cryptography/EccKeyFormatHelper.cs index fe9a95677689..d6f2ddf77e6b 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/EccKeyFormatHelper.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/EccKeyFormatHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Buffers; @@ -269,23 +268,12 @@ private static ECCurve GetCurve(ECDomainParameters domainParameters) throw new CryptographicException(SR.Cryptography_ECC_NamedCurvesOnly); } - Oid curveOid; - - switch (domainParameters.Named) - { - case Oids.secp256r1: - curveOid = new Oid(Oids.secp256r1, nameof(ECCurve.NamedCurves.nistP256)); - break; - case Oids.secp384r1: - curveOid = new Oid(Oids.secp384r1, nameof(ECCurve.NamedCurves.nistP384)); - break; - case Oids.secp521r1: - curveOid = new Oid(Oids.secp521r1, nameof(ECCurve.NamedCurves.nistP521)); - break; - default: - curveOid = new Oid(domainParameters.Named); - break; - } + Oid curveOid = domainParameters.Named switch { + Oids.secp256r1 => Oids.secp256r1Oid, + Oids.secp384r1 => Oids.secp384r1Oid, + Oids.secp521r1 => Oids.secp521r1Oid, + _ => new Oid(domainParameters.Named, null) + }; return ECCurve.CreateFromOid(curveOid); } diff --git a/src/libraries/Common/src/System/Security/Cryptography/EccSecurityTransforms.cs b/src/libraries/Common/src/System/Security/Cryptography/EccSecurityTransforms.cs index 3eba157bdeb4..71d8ce8a71f3 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/EccSecurityTransforms.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/EccSecurityTransforms.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Buffers; diff --git a/src/libraries/Common/src/System/Security/Cryptography/KeyBlobHelpers.cs b/src/libraries/Common/src/System/Security/Cryptography/KeyBlobHelpers.cs index 1df65b605729..40d07a69e249 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/KeyBlobHelpers.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/KeyBlobHelpers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Formats.Asn1; diff --git a/src/libraries/Common/src/System/Security/Cryptography/KeyFormatHelper.cs b/src/libraries/Common/src/System/Security/Cryptography/KeyFormatHelper.cs index 69d930081bb8..8caddc96624c 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/KeyFormatHelper.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/KeyFormatHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Buffers; diff --git a/src/libraries/Common/src/System/Security/Cryptography/KeySizeHelpers.cs b/src/libraries/Common/src/System/Security/Cryptography/KeySizeHelpers.cs index 2717e7f33c11..bea8b1a54ae9 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/KeySizeHelpers.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/KeySizeHelpers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Oids.Shared.cs b/src/libraries/Common/src/System/Security/Cryptography/Oids.Shared.cs new file mode 100644 index 000000000000..2fc427610475 --- /dev/null +++ b/src/libraries/Common/src/System/Security/Cryptography/Oids.Shared.cs @@ -0,0 +1,69 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Diagnostics; +using System.Security.Cryptography; + +namespace System.Security.Cryptography +{ + internal static partial class Oids + { + private static volatile Oid? _rsaOid; + private static volatile Oid? _ecPublicKeyOid; + private static volatile Oid? _tripleDesCbcOid; + private static volatile Oid? _aes256CbcOid; + private static volatile Oid? _secp256r1Oid; + private static volatile Oid? _secp384r1Oid; + private static volatile Oid? _secp521r1Oid; + private static volatile Oid? _sha256Oid; + private static volatile Oid? _pkcs7DataOid; + private static volatile Oid? _contentTypeOid; + private static volatile Oid? _documentDescriptionOid; + private static volatile Oid? _documentNameOid; + private static volatile Oid? _localKeyIdOid; + private static volatile Oid? _messageDigestOid; + private static volatile Oid? _signingTimeOid; + private static volatile Oid? _pkcs9ExtensionRequestOid; + private static volatile Oid? _basicConstraints2Oid; + private static volatile Oid? _enhancedKeyUsageOid; + private static volatile Oid? _keyUsageOid; + private static volatile Oid? _subjectKeyIdentifierOid; + + internal static Oid RsaOid => _rsaOid ??= InitializeOid(Rsa); + internal static Oid EcPublicKeyOid => _ecPublicKeyOid ??= InitializeOid(EcPublicKey); + internal static Oid TripleDesCbcOid => _tripleDesCbcOid ??= InitializeOid(TripleDesCbc); + internal static Oid Aes256CbcOid => _aes256CbcOid ??= InitializeOid(Aes256Cbc); + internal static Oid secp256r1Oid => _secp256r1Oid ??= new Oid(secp256r1, nameof(ECCurve.NamedCurves.nistP256)); + internal static Oid secp384r1Oid => _secp384r1Oid ??= new Oid(secp384r1, nameof(ECCurve.NamedCurves.nistP384)); + internal static Oid secp521r1Oid => _secp521r1Oid ??= new Oid(secp521r1, nameof(ECCurve.NamedCurves.nistP521)); + internal static Oid Sha256Oid => _sha256Oid ??= InitializeOid(Sha256); + + internal static Oid Pkcs7DataOid => _pkcs7DataOid ??= InitializeOid(Pkcs7Data); + internal static Oid ContentTypeOid => _contentTypeOid ??= InitializeOid(ContentType); + internal static Oid DocumentDescriptionOid => _documentDescriptionOid ??= InitializeOid(DocumentDescription); + internal static Oid DocumentNameOid => _documentNameOid ??= InitializeOid(DocumentName); + internal static Oid LocalKeyIdOid => _localKeyIdOid ??= InitializeOid(LocalKeyId); + internal static Oid MessageDigestOid => _messageDigestOid ??= InitializeOid(MessageDigest); + internal static Oid SigningTimeOid => _signingTimeOid ??= InitializeOid(SigningTime); + internal static Oid Pkcs9ExtensionRequestOid => _pkcs9ExtensionRequestOid ??= InitializeOid(Pkcs9ExtensionRequest); + + internal static Oid BasicConstraints2Oid => _basicConstraints2Oid ??= InitializeOid(BasicConstraints2); + internal static Oid EnhancedKeyUsageOid => _enhancedKeyUsageOid ??= InitializeOid(EnhancedKeyUsage); + internal static Oid KeyUsageOid => _keyUsageOid ??= InitializeOid(KeyUsage); + internal static Oid SubjectKeyIdentifierOid => _subjectKeyIdentifierOid ??= InitializeOid(SubjectKeyIdentifier); + + private static Oid InitializeOid(string oidValue) + { + Debug.Assert(oidValue != null); + Oid oid = new Oid(oidValue, null); + + // Do not remove - the FriendlyName property get has side effects. + // On read, it initializes the friendly name based on the value and + // locks it to prevent any further changes. + _ = oid.FriendlyName; + + return oid; + } + + } +} diff --git a/src/libraries/Common/src/System/Security/Cryptography/Oids.cs b/src/libraries/Common/src/System/Security/Cryptography/Oids.cs index 6717704fcc6d..2562b15501de 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Oids.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Oids.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Security.Cryptography { diff --git a/src/libraries/Common/src/System/Security/Cryptography/PasswordBasedEncryption.cs b/src/libraries/Common/src/System/Security/Cryptography/PasswordBasedEncryption.cs index f250a06cacc3..aad2de80b86f 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/PasswordBasedEncryption.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/PasswordBasedEncryption.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics; @@ -290,6 +289,7 @@ internal static void InitiateEncryption( Debug.Assert(hmacOid == Oids.HmacWithSha1 || !isPkcs12); } + [SuppressMessage("Microsoft.Security", "CA5379", Justification = "SHA1 used if specified by argument")] internal static unsafe int Encrypt( ReadOnlySpan password, ReadOnlySpan passwordBytes, @@ -698,6 +698,7 @@ private static void ReadIvParameter( } } + [SuppressMessage("Microsoft.Security", "CA5379", Justification = "SHA1 used if specified by argument")] private static unsafe Rfc2898DeriveBytes OpenPbkdf2( ReadOnlySpan password, ReadOnlyMemory? parameters, diff --git a/src/libraries/Common/src/System/Security/Cryptography/PemLabels.cs b/src/libraries/Common/src/System/Security/Cryptography/PemLabels.cs index 5adf4ab5d83d..ef4faf884f16 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/PemLabels.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/PemLabels.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Security.Cryptography { @@ -12,5 +11,6 @@ internal static class PemLabels internal const string RsaPublicKey = "RSA PUBLIC KEY"; internal const string RsaPrivateKey = "RSA PRIVATE KEY"; internal const string EcPrivateKey = "EC PRIVATE KEY"; + internal const string X509Certificate = "CERTIFICATE"; } } diff --git a/src/libraries/Common/src/System/Security/Cryptography/Pkcs12Kdf.cs b/src/libraries/Common/src/System/Security/Cryptography/Pkcs12Kdf.cs index c2c6188c1cac..0b8841f0fcac 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Pkcs12Kdf.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Pkcs12Kdf.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Collections.Generic; diff --git a/src/libraries/Common/src/System/Security/Cryptography/RSACng.EncryptDecrypt.cs b/src/libraries/Common/src/System/Security/Cryptography/RSACng.EncryptDecrypt.cs index 30f92d4e0e0e..cb2b302f9a20 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/RSACng.EncryptDecrypt.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/RSACng.EncryptDecrypt.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/System/Security/Cryptography/RSACng.ImportExport.cs b/src/libraries/Common/src/System/Security/Cryptography/RSACng.ImportExport.cs index 1e577f7437b8..b428fa2a6273 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/RSACng.ImportExport.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/RSACng.ImportExport.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics; @@ -353,6 +352,7 @@ private static void ExportParameters(ref RSAParameters rsaParams, byte[] rsaBlob /// /// This function checks the magic value in the key blob header /// + /// The expected magic number. /// Private blob if true else public key blob private static void CheckMagicValueOfKey(KeyBlobMagicNumber magic, bool includePrivateParameters) { diff --git a/src/libraries/Common/src/System/Security/Cryptography/RSACng.SignVerify.cs b/src/libraries/Common/src/System/Security/Cryptography/RSACng.SignVerify.cs index 1c73ed5f3433..e5626c7b6866 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/RSACng.SignVerify.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/RSACng.SignVerify.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Collections.Concurrent; diff --git a/src/libraries/Common/src/System/Security/Cryptography/RSACng.cs b/src/libraries/Common/src/System/Security/Cryptography/RSACng.cs index f7edcd67466c..fbbdeb813c95 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/RSACng.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/RSACng.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; using Internal.Cryptography; diff --git a/src/libraries/Common/src/System/Security/Cryptography/RSAKeyFormatHelper.cs b/src/libraries/Common/src/System/Security/Cryptography/RSAKeyFormatHelper.cs index 0319e2c3b3c6..70635b38efc9 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/RSAKeyFormatHelper.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/RSAKeyFormatHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Formats.Asn1; diff --git a/src/libraries/Common/src/System/Security/Cryptography/RSAOpenSsl.cs b/src/libraries/Common/src/System/Security/Cryptography/RSAOpenSsl.cs index 4d062eda485b..a65a88c77478 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/RSAOpenSsl.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/RSAOpenSsl.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Buffers; diff --git a/src/libraries/Common/src/System/Security/Cryptography/RSASecurityTransforms.cs b/src/libraries/Common/src/System/Security/Cryptography/RSASecurityTransforms.cs index eb26d14bdc36..ce73b15310a5 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/RSASecurityTransforms.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/RSASecurityTransforms.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Buffers; diff --git a/src/libraries/Common/src/System/Security/Cryptography/RsaPaddingProcessor.cs b/src/libraries/Common/src/System/Security/Cryptography/RsaPaddingProcessor.cs index c180a77b99e4..54d2705b4278 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/RsaPaddingProcessor.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/RsaPaddingProcessor.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Buffers.Binary; diff --git a/src/libraries/Common/src/System/Security/Cryptography/SecKeyPair.cs b/src/libraries/Common/src/System/Security/Cryptography/SecKeyPair.cs index 219a03ec4ee7..3ea6851e0990 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/SecKeyPair.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/SecKeyPair.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Security.Cryptography.Apple; diff --git a/src/libraries/Common/src/System/Security/IdentityHelper.cs b/src/libraries/Common/src/System/Security/IdentityHelper.cs index 9f77861890f1..62fdc8705161 100644 --- a/src/libraries/Common/src/System/Security/IdentityHelper.cs +++ b/src/libraries/Common/src/System/Security/IdentityHelper.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics; diff --git a/src/libraries/Common/src/System/SerializableAttribute.cs b/src/libraries/Common/src/System/SerializableAttribute.cs index f7e172cd1b18..bf4a6f73af92 100644 --- a/src/libraries/Common/src/System/SerializableAttribute.cs +++ b/src/libraries/Common/src/System/SerializableAttribute.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System { diff --git a/src/libraries/Common/src/System/StringExtensions.cs b/src/libraries/Common/src/System/StringExtensions.cs index 5733a4a1d07a..2d35db2295f1 100644 --- a/src/libraries/Common/src/System/StringExtensions.cs +++ b/src/libraries/Common/src/System/StringExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Common/src/System/StrongToWeakReference.cs b/src/libraries/Common/src/System/StrongToWeakReference.cs index 83dfd05dc994..24c37a62eee9 100644 --- a/src/libraries/Common/src/System/StrongToWeakReference.cs +++ b/src/libraries/Common/src/System/StrongToWeakReference.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Text/ConsoleEncoding.cs b/src/libraries/Common/src/System/Text/ConsoleEncoding.cs index 8c03f781626a..8ba1aeded44e 100644 --- a/src/libraries/Common/src/System/Text/ConsoleEncoding.cs +++ b/src/libraries/Common/src/System/Text/ConsoleEncoding.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Text { diff --git a/src/libraries/Common/src/System/Text/DBCSDecoder.cs b/src/libraries/Common/src/System/Text/DBCSDecoder.cs index 01268b84a55f..3379f5fd8844 100644 --- a/src/libraries/Common/src/System/Text/DBCSDecoder.cs +++ b/src/libraries/Common/src/System/Text/DBCSDecoder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Text; diff --git a/src/libraries/Common/src/System/Text/EncodingHelper.Unix.cs b/src/libraries/Common/src/System/Text/EncodingHelper.Unix.cs index 111f1610bded..b2e9e222fdf9 100644 --- a/src/libraries/Common/src/System/Text/EncodingHelper.Unix.cs +++ b/src/libraries/Common/src/System/Text/EncodingHelper.Unix.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Text { diff --git a/src/libraries/Common/src/System/Text/EncodingHelper.Windows.cs b/src/libraries/Common/src/System/Text/EncodingHelper.Windows.cs index 0a50ea281265..acd04824ee87 100644 --- a/src/libraries/Common/src/System/Text/EncodingHelper.Windows.cs +++ b/src/libraries/Common/src/System/Text/EncodingHelper.Windows.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Text; diff --git a/src/libraries/Common/src/System/Text/OSEncoder.cs b/src/libraries/Common/src/System/Text/OSEncoder.cs index 4a56ccb07817..162cfdb3e551 100644 --- a/src/libraries/Common/src/System/Text/OSEncoder.cs +++ b/src/libraries/Common/src/System/Text/OSEncoder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Text; diff --git a/src/libraries/Common/src/System/Text/OSEncoding.Windows.cs b/src/libraries/Common/src/System/Text/OSEncoding.Windows.cs index 82ad53b1dcb6..52dce0d9ba4a 100644 --- a/src/libraries/Common/src/System/Text/OSEncoding.Windows.cs +++ b/src/libraries/Common/src/System/Text/OSEncoding.Windows.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System; diff --git a/src/libraries/Common/src/System/Text/ReusableTextReader.cs b/src/libraries/Common/src/System/Text/ReusableTextReader.cs index 0cb7030b7be4..9fb30f38f490 100644 --- a/src/libraries/Common/src/System/Text/ReusableTextReader.cs +++ b/src/libraries/Common/src/System/Text/ReusableTextReader.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; diff --git a/src/libraries/Common/src/System/Text/SimpleRegex.cs b/src/libraries/Common/src/System/Text/SimpleRegex.cs index 7ce45d623cff..c7f28e957ab3 100644 --- a/src/libraries/Common/src/System/Text/SimpleRegex.cs +++ b/src/libraries/Common/src/System/Text/SimpleRegex.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Text/StringBuilderCache.cs b/src/libraries/Common/src/System/Text/StringBuilderCache.cs index 4d96cb301e9e..5e0ca8c6bfb7 100644 --- a/src/libraries/Common/src/System/Text/StringBuilderCache.cs +++ b/src/libraries/Common/src/System/Text/StringBuilderCache.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable namespace System.Text diff --git a/src/libraries/Common/src/System/Text/StringOrCharArray.cs b/src/libraries/Common/src/System/Text/StringOrCharArray.cs index c9d54e29703f..9277b395fdc1 100644 --- a/src/libraries/Common/src/System/Text/StringOrCharArray.cs +++ b/src/libraries/Common/src/System/Text/StringOrCharArray.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Text/ValueStringBuilder.cs b/src/libraries/Common/src/System/Text/ValueStringBuilder.cs index c7563cb62f4d..fbd8950a6cab 100644 --- a/src/libraries/Common/src/System/Text/ValueStringBuilder.cs +++ b/src/libraries/Common/src/System/Text/ValueStringBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Buffers; diff --git a/src/libraries/Common/src/System/Text/ValueUtf8Converter.cs b/src/libraries/Common/src/System/Text/ValueUtf8Converter.cs index 7d8aaae592b4..23d735c18359 100644 --- a/src/libraries/Common/src/System/Text/ValueUtf8Converter.cs +++ b/src/libraries/Common/src/System/Text/ValueUtf8Converter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Buffers; diff --git a/src/libraries/Common/src/System/Threading/Tasks/BeginEndAwaitableAdapter.cs b/src/libraries/Common/src/System/Threading/Tasks/BeginEndAwaitableAdapter.cs index ee54cd4c6ac5..1748e9425bbf 100644 --- a/src/libraries/Common/src/System/Threading/Tasks/BeginEndAwaitableAdapter.cs +++ b/src/libraries/Common/src/System/Threading/Tasks/BeginEndAwaitableAdapter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Threading/Tasks/ForceAsyncAwaiter.cs b/src/libraries/Common/src/System/Threading/Tasks/ForceAsyncAwaiter.cs index 1e8fc4c52ba1..9b5d88f5b993 100644 --- a/src/libraries/Common/src/System/Threading/Tasks/ForceAsyncAwaiter.cs +++ b/src/libraries/Common/src/System/Threading/Tasks/ForceAsyncAwaiter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; diff --git a/src/libraries/Common/src/System/Threading/Tasks/RendezvousAwaitable.cs b/src/libraries/Common/src/System/Threading/Tasks/RendezvousAwaitable.cs index 890c1ab75461..5c8cbc55cbea 100644 --- a/src/libraries/Common/src/System/Threading/Tasks/RendezvousAwaitable.cs +++ b/src/libraries/Common/src/System/Threading/Tasks/RendezvousAwaitable.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Diagnostics; diff --git a/src/libraries/Common/src/System/Threading/Tasks/TaskCompletionSourceWithCancellation.cs b/src/libraries/Common/src/System/Threading/Tasks/TaskCompletionSourceWithCancellation.cs index c19e22fabe02..56cea3860428 100644 --- a/src/libraries/Common/src/System/Threading/Tasks/TaskCompletionSourceWithCancellation.cs +++ b/src/libraries/Common/src/System/Threading/Tasks/TaskCompletionSourceWithCancellation.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable namespace System.Threading.Tasks diff --git a/src/libraries/Common/src/System/Threading/Tasks/TaskToApm.cs b/src/libraries/Common/src/System/Threading/Tasks/TaskToApm.cs index 7be4563cddec..dc2bb32676de 100644 --- a/src/libraries/Common/src/System/Threading/Tasks/TaskToApm.cs +++ b/src/libraries/Common/src/System/Threading/Tasks/TaskToApm.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // Helper methods for using Tasks to implement the APM pattern. // diff --git a/src/libraries/Common/tests/AndroidTestRunner/AndroidTestRunner.cs b/src/libraries/Common/tests/AndroidTestRunner/AndroidTestRunner.cs index f099fcf02059..092c33aa32b9 100644 --- a/src/libraries/Common/tests/AndroidTestRunner/AndroidTestRunner.cs +++ b/src/libraries/Common/tests/AndroidTestRunner/AndroidTestRunner.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Linq; diff --git a/src/libraries/Common/tests/AppleTestRunner/AppleTestRunner.cs b/src/libraries/Common/tests/AppleTestRunner/AppleTestRunner.cs index 9fbfbf458ba6..62d01c6df836 100644 --- a/src/libraries/Common/tests/AppleTestRunner/AppleTestRunner.cs +++ b/src/libraries/Common/tests/AppleTestRunner/AppleTestRunner.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Linq; diff --git a/src/libraries/Common/tests/Common.Tests.csproj b/src/libraries/Common/tests/Common.Tests.csproj index 313fb9f76de7..476385843ba0 100644 --- a/src/libraries/Common/tests/Common.Tests.csproj +++ b/src/libraries/Common/tests/Common.Tests.csproj @@ -2,7 +2,7 @@ true true - $(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent)-OSX + $(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent)-Browser;$(NetCoreAppCurrent)-OSX annotations @@ -195,7 +195,7 @@ - + @@ -207,7 +207,7 @@ Link="System\PasteArguments.Unix.cs" /> - + diff --git a/src/libraries/Common/tests/Extensions/ArgumentEscaperTests.cs b/src/libraries/Common/tests/Extensions/ArgumentEscaperTests.cs index e4329babf25e..5fc54a21708f 100644 --- a/src/libraries/Common/tests/Extensions/ArgumentEscaperTests.cs +++ b/src/libraries/Common/tests/Extensions/ArgumentEscaperTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; diff --git a/src/libraries/Common/tests/Extensions/CommandLineApplicationTests.cs b/src/libraries/Common/tests/Extensions/CommandLineApplicationTests.cs index 191f5d564281..c7069b108da5 100644 --- a/src/libraries/Common/tests/Extensions/CommandLineApplicationTests.cs +++ b/src/libraries/Common/tests/Extensions/CommandLineApplicationTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; @@ -1101,15 +1100,10 @@ public void HelpAndVersionOptionStopProcessing(string[] input, string expectedOu Assert.False(optFlag.HasValue()); } - // disable inaccurate analyzer error https://github.com/xunit/xunit/issues/1274 -#pragma warning disable xUnit1010 -#pragma warning disable xUnit1011 [Theory] [InlineData("-f:File1", "-f:File2")] [InlineData("--file:File1", "--file:File2")] [InlineData("--file", "File1", "--file", "File2")] -#pragma warning restore xUnit1010 -#pragma warning restore xUnit1011 public void ThrowsExceptionOnSingleValueOptionHavingTwoValues(params string[] inputOptions) { var app = new CommandLineApplication(); diff --git a/src/libraries/Common/tests/Extensions/DotNetMuxerTests.cs b/src/libraries/Common/tests/Extensions/DotNetMuxerTests.cs index 005f3fcabada..fe189225801f 100644 --- a/src/libraries/Common/tests/Extensions/DotNetMuxerTests.cs +++ b/src/libraries/Common/tests/Extensions/DotNetMuxerTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #if NETCOREAPP using System.IO; diff --git a/src/libraries/Common/tests/Extensions/HashCodeCombinerTest.cs b/src/libraries/Common/tests/Extensions/HashCodeCombinerTest.cs index 7cda97795835..68ec1c5108d3 100644 --- a/src/libraries/Common/tests/Extensions/HashCodeCombinerTest.cs +++ b/src/libraries/Common/tests/Extensions/HashCodeCombinerTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; diff --git a/src/libraries/Common/tests/Extensions/NonCapturingTimerTest.cs b/src/libraries/Common/tests/Extensions/NonCapturingTimerTest.cs index 7feaa42be7ec..7841cafa3d9f 100644 --- a/src/libraries/Common/tests/Extensions/NonCapturingTimerTest.cs +++ b/src/libraries/Common/tests/Extensions/NonCapturingTimerTest.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Threading; diff --git a/src/libraries/Common/tests/Extensions/SingleThreadedSynchronizationContext.cs b/src/libraries/Common/tests/Extensions/SingleThreadedSynchronizationContext.cs index d6e43807a15a..d16149255609 100644 --- a/src/libraries/Common/tests/Extensions/SingleThreadedSynchronizationContext.cs +++ b/src/libraries/Common/tests/Extensions/SingleThreadedSynchronizationContext.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Concurrent; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/CultureReplacer.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/CultureReplacer.cs index 84725a3bdb6f..85122f66f43e 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/CultureReplacer.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/CultureReplacer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Globalization; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/ExceptionAssertions.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/ExceptionAssertions.cs index e34d24f1be7b..10bc34142f86 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/ExceptionAssertions.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/ExceptionAssertions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Reflection; @@ -269,4 +268,4 @@ private static void VerifyExceptionMessage(Exception exception, string expectedM } } } -} \ No newline at end of file +} diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/FlakyOn.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/FlakyOn.cs index 0fff53cc2aa8..45b72e32926f 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/FlakyOn.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/FlakyOn.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/HelixQueues.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/HelixQueues.cs index e3e0a35fbc36..19b9fde028ae 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/HelixQueues.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/HelixQueues.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.AspNetCore.Testing { diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/HttpClientSlim.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/HttpClientSlim.cs index c403ca33b1c6..3ef092e3a392 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/HttpClientSlim.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/HttpClientSlim.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Globalization; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/ITestMethodLifecycle.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/ITestMethodLifecycle.cs index 0c73f6c3a8fd..7ea0bbf88cda 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/ITestMethodLifecycle.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/ITestMethodLifecycle.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Threading; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/RepeatAttribute.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/RepeatAttribute.cs index 7094cbc08217..ca8c85c6a8df 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/RepeatAttribute.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/RepeatAttribute.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.ComponentModel; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/RepeatContext.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/RepeatContext.cs index 9831bd71e5b1..91aa921e07e3 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/RepeatContext.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/RepeatContext.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Threading; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/ReplaceCulture.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/ReplaceCulture.cs index 8292d3c7fcd1..2c2fb51d5141 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/ReplaceCulture.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/ReplaceCulture.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Globalization; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/ShortClassNameAttribute.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/ShortClassNameAttribute.cs index c475a84a00bc..ab4f0e17f9ac 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/ShortClassNameAttribute.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/ShortClassNameAttribute.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/TaskExtensions.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/TaskExtensions.cs index 35bba2f2d2b4..9cde37ec2847 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/TaskExtensions.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/TaskExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/TestContext.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/TestContext.cs index 4393a5251be5..ead7052b70da 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/TestContext.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/TestContext.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Reflection; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/TestFileOutputContext.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/TestFileOutputContext.cs index 82bd7905e5a4..91e9a1b378c7 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/TestFileOutputContext.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/TestFileOutputContext.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/TestOutputDirectoryAttribute.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/TestOutputDirectoryAttribute.cs index b4cafeb027a4..1a80126300ec 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/TestOutputDirectoryAttribute.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/TestOutputDirectoryAttribute.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/TestPathUtilities.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/TestPathUtilities.cs index 04fbc3bb79de..b1711ce7a956 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/TestPathUtilities.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/TestPathUtilities.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/TestPlatformHelper.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/TestPlatformHelper.cs index a3027ca04c59..4d85c00d652d 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/TestPlatformHelper.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/TestPlatformHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/Tracing/CollectingEventListener.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/Tracing/CollectingEventListener.cs index 4564388b35ae..b9d392fde8d7 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/Tracing/CollectingEventListener.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/Tracing/CollectingEventListener.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Concurrent; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/Tracing/EventAssert.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/Tracing/EventAssert.cs index df78522e8984..d8601cf121be 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/Tracing/EventAssert.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/Tracing/EventAssert.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/Tracing/EventSourceTestBase.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/Tracing/EventSourceTestBase.cs index bcddcf8c5b96..012f4d5cbd03 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/Tracing/EventSourceTestBase.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/Tracing/EventSourceTestBase.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/contentFiles/cs/netstandard2.0/EventSourceTestCollection.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/contentFiles/cs/netstandard2.0/EventSourceTestCollection.cs index 32d7fbbf6898..407efc8388a4 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/contentFiles/cs/netstandard2.0/EventSourceTestCollection.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/contentFiles/cs/netstandard2.0/EventSourceTestCollection.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.AspNetCore.Testing.Tracing { diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestAssemblyRunner.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestAssemblyRunner.cs index bf8552bc4d23..fa954c2b97e4 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestAssemblyRunner.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestAssemblyRunner.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestCaseRunner.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestCaseRunner.cs index 6953f0c82856..9fa8595d217e 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestCaseRunner.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestCaseRunner.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestClassRunner.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestClassRunner.cs index 68163159f099..faddd9fe1bf7 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestClassRunner.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestClassRunner.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestCollectionRunner.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestCollectionRunner.cs index 613f77603861..24c2cd16ddcb 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestCollectionRunner.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestCollectionRunner.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestFramework.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestFramework.cs index 243fd7a16123..369dece7b125 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestFramework.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestFramework.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Reflection; using Xunit.Abstractions; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestFrameworkExecutor.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestFrameworkExecutor.cs index b9b4da44a03e..ffbab11f559e 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestFrameworkExecutor.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestFrameworkExecutor.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Reflection; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestInvoker.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestInvoker.cs index 16f438b65cf2..118c0bdecb2d 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestInvoker.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestInvoker.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestMethodRunner.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestMethodRunner.cs index 8deb230384c7..35f5e09de3e9 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestMethodRunner.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestMethodRunner.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Threading; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestRunner.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestRunner.cs index a57ccc8281a3..f1f07947fac9 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestRunner.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTestRunner.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTheoryTestCaseRunner.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTheoryTestCaseRunner.cs index 40434d0616a0..f9d5810f99c6 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTheoryTestCaseRunner.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AspNetTheoryTestCaseRunner.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AssemblyFixtureAttribute.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AssemblyFixtureAttribute.cs index 3dedbb39298f..428eb0215730 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AssemblyFixtureAttribute.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/AssemblyFixtureAttribute.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/ConditionalFactAttribute.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/ConditionalFactAttribute.cs index 80a2d971fbff..8f128fdb1e2d 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/ConditionalFactAttribute.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/ConditionalFactAttribute.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Xunit; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/ConditionalFactDiscoverer.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/ConditionalFactDiscoverer.cs index a6acdb973b18..339ee1d92025 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/ConditionalFactDiscoverer.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/ConditionalFactDiscoverer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit.Abstractions; using Xunit.Sdk; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/ConditionalTheoryAttribute.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/ConditionalTheoryAttribute.cs index c6e3df6c4573..6030392df694 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/ConditionalTheoryAttribute.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/ConditionalTheoryAttribute.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Xunit; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/ConditionalTheoryDiscoverer.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/ConditionalTheoryDiscoverer.cs index 2629b1fd7e13..2fbff9bf2e7f 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/ConditionalTheoryDiscoverer.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/ConditionalTheoryDiscoverer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/DockerOnlyAttribute.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/DockerOnlyAttribute.cs index b20ff24468c8..0536a9dc5928 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/DockerOnlyAttribute.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/DockerOnlyAttribute.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/EnvironmentVariableSkipConditionAttribute.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/EnvironmentVariableSkipConditionAttribute.cs index 0c4f93a05534..b7dbed476b2e 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/EnvironmentVariableSkipConditionAttribute.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/EnvironmentVariableSkipConditionAttribute.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Linq; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/FlakyAttribute.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/FlakyAttribute.cs index 8c1cd13030fb..a08dac81b125 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/FlakyAttribute.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/FlakyAttribute.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/FlakyTraitDiscoverer.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/FlakyTraitDiscoverer.cs index 9db04ff4507f..1964f20ddae2 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/FlakyTraitDiscoverer.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/FlakyTraitDiscoverer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/FrameworkSkipConditionAttribute.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/FrameworkSkipConditionAttribute.cs index 92895f512234..906f0c4d4604 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/FrameworkSkipConditionAttribute.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/FrameworkSkipConditionAttribute.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -55,4 +54,4 @@ private static bool CanRunOnThisFramework(RuntimeFrameworks excludedFrameworks) return true; } } -} \ No newline at end of file +} diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/IEnvironmentVariable.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/IEnvironmentVariable.cs index e649b506502e..1fbe0320fa72 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/IEnvironmentVariable.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/IEnvironmentVariable.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.AspNetCore.Testing { diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/ITestCondition.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/ITestCondition.cs index ee8434250401..d15a78a48882 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/ITestCondition.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/ITestCondition.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.AspNetCore.Testing { @@ -10,4 +9,4 @@ public interface ITestCondition string SkipReason { get; } } -} \ No newline at end of file +} diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/MaximumOSVersionAttribute.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/MaximumOSVersionAttribute.cs index b92456392331..29b89212d3a6 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/MaximumOSVersionAttribute.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/MaximumOSVersionAttribute.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/MinimumOsVersionAttribute.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/MinimumOsVersionAttribute.cs index f965061c2ba4..bf37323fe453 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/MinimumOsVersionAttribute.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/MinimumOsVersionAttribute.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/OSSkipConditionAttribute.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/OSSkipConditionAttribute.cs index 3574f0ea4923..2a804e309865 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/OSSkipConditionAttribute.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/OSSkipConditionAttribute.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/OperatingSystems.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/OperatingSystems.cs index cc62ac3e9b0d..7f04934ba65f 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/OperatingSystems.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/OperatingSystems.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -13,4 +12,4 @@ public enum OperatingSystems MacOSX = 2, Windows = 4, } -} \ No newline at end of file +} diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/RuntimeFrameworks.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/RuntimeFrameworks.cs index 2d556fe9c48e..274ea1357350 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/RuntimeFrameworks.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/RuntimeFrameworks.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -14,4 +13,4 @@ public enum RuntimeFrameworks CLR = 1 << 1, CoreCLR = 1 << 2 } -} \ No newline at end of file +} diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/SkipOnCIAttribute.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/SkipOnCIAttribute.cs index 6736b63f409c..c89001ee9f99 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/SkipOnCIAttribute.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/SkipOnCIAttribute.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/SkipOnHelixAttribute.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/SkipOnHelixAttribute.cs index 7e3ca8603bab..f0aa92be054c 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/SkipOnHelixAttribute.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/SkipOnHelixAttribute.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Linq; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/SkippedTestCase.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/SkippedTestCase.cs index c50a20106d96..890bb35b967a 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/SkippedTestCase.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/SkippedTestCase.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Threading; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/TestMethodExtensions.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/TestMethodExtensions.cs index a956bfae23a2..36b29195cb8b 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/TestMethodExtensions.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/TestMethodExtensions.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Linq; using Xunit.Abstractions; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/WORKAROUND_SkippedDataRowTestCase.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/WORKAROUND_SkippedDataRowTestCase.cs index 28446b51be9d..22dea010c215 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/WORKAROUND_SkippedDataRowTestCase.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/WORKAROUND_SkippedDataRowTestCase.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.ComponentModel; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/WindowsVersions.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/WindowsVersions.cs index 711b85328813..093904689850 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/WindowsVersions.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/WindowsVersions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/AlphabeticalOrderer.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/AlphabeticalOrderer.cs index bd95ce19ebb2..34eef71dffab 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/AlphabeticalOrderer.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/AlphabeticalOrderer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/AssemblyFixtureTest.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/AssemblyFixtureTest.cs index 3f9e481a7516..15673ce89634 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/AssemblyFixtureTest.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/AssemblyFixtureTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/CollectingEventListenerTest.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/CollectingEventListenerTest.cs index 596bc9708de1..466a14ecdd14 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/CollectingEventListenerTest.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/CollectingEventListenerTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics.Tracing; using System.Threading.Tasks; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/ConditionalFactTest.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/ConditionalFactTest.cs index 13a40e4e4421..da0f988066e4 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/ConditionalFactTest.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/ConditionalFactTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Xunit; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/ConditionalTheoryTest.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/ConditionalTheoryTest.cs index 67e9ff0b64c3..a5fbb8ecc317 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/ConditionalTheoryTest.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/ConditionalTheoryTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Xunit; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/DockerTests.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/DockerTests.cs index d56c2f93fae9..eb61e7cfe058 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/DockerTests.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/DockerTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/EnvironmentVariableSkipConditionTest.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/EnvironmentVariableSkipConditionTest.cs index e9d0c141d29c..e85552780c19 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/EnvironmentVariableSkipConditionTest.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/EnvironmentVariableSkipConditionTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/ExceptionAssertTest.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/ExceptionAssertTest.cs index 8926fc1a0b49..52455b0694ee 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/ExceptionAssertTest.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/ExceptionAssertTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Xunit; @@ -37,4 +36,4 @@ public void AssertArgumentOutOfRangeException_WorksInNonEnglishCultures() ExceptionAssert.ThrowsArgumentOutOfRange(action, "foo", "exception message.", 10); } } -} \ No newline at end of file +} diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/FlakyAttributeTest.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/FlakyAttributeTest.cs index d377e98d5b40..db342c12b862 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/FlakyAttributeTest.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/FlakyAttributeTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/HttpClientSlimTest.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/HttpClientSlimTest.cs index c499dc39ca1c..10ae3f7a5ab8 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/HttpClientSlimTest.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/HttpClientSlimTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/MaximumOSVersionAttributeTest.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/MaximumOSVersionAttributeTest.cs index 3c5924f1283a..1cc772ce4e36 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/MaximumOSVersionAttributeTest.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/MaximumOSVersionAttributeTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Xunit; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/MaximumOSVersionTest.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/MaximumOSVersionTest.cs index 3cafb037d070..1b0586aeb99f 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/MaximumOSVersionTest.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/MaximumOSVersionTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/MinimumOSVersionAttributeTest.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/MinimumOSVersionAttributeTest.cs index 553ab84e678d..c4e1120bc854 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/MinimumOSVersionAttributeTest.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/MinimumOSVersionAttributeTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Xunit; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/MinimumOSVersionTest.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/MinimumOSVersionTest.cs index 94a66f7b40d5..ba45f1c4306d 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/MinimumOSVersionTest.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/MinimumOSVersionTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/OSSkipConditionAttributeTest.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/OSSkipConditionAttributeTest.cs index 2715edcd517f..53e2ed774ff3 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/OSSkipConditionAttributeTest.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/OSSkipConditionAttributeTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/OSSkipConditionTest.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/OSSkipConditionTest.cs index eab134778dc9..a058ade7c728 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/OSSkipConditionTest.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/OSSkipConditionTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using Xunit; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/Properties/AssemblyInfo.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/Properties/AssemblyInfo.cs index 5c3508f7d230..0f8d3c8a9cfb 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/Properties/AssemblyInfo.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/Properties/AssemblyInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.AspNetCore.Testing; using Xunit; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/RepeatTest.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/RepeatTest.cs index effd1e2b25c2..e5e1d5d6d05c 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/RepeatTest.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/RepeatTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/ReplaceCultureAttributeTest.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/ReplaceCultureAttributeTest.cs index 88f7318957a8..ff6740b80d9a 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/ReplaceCultureAttributeTest.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/ReplaceCultureAttributeTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Globalization; using Xunit; @@ -64,4 +63,4 @@ public void BeforeAndAfterTest_ReplacesCulture() Assert.Equal(originalUICulture, CultureInfo.CurrentUICulture); } } -} \ No newline at end of file +} diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/SkipOnCITests.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/SkipOnCITests.cs index 4c3601f84604..ee511c2bd596 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/SkipOnCITests.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/SkipOnCITests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.AspNetCore.Testing; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/TaskExtensionsTest.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/TaskExtensionsTest.cs index 9552f61515a2..d9f4bbe2b62a 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/TaskExtensionsTest.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/TaskExtensionsTest.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Threading.Tasks; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/TestAssemblyFixture.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/TestAssemblyFixture.cs index 70bec096b6b2..75dddd23674b 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/TestAssemblyFixture.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/TestAssemblyFixture.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.AspNetCore.Testing { diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/TestCollectionFixture.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/TestCollectionFixture.cs index 9afa8d9ff52e..7fed04272adf 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/TestCollectionFixture.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/TestCollectionFixture.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.AspNetCore.Testing { diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/TestContextTest.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/TestContextTest.cs index 7460fb728f53..7a81f37dcac5 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/TestContextTest.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/TestContextTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Threading; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/TestPathUtilitiesTest.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/TestPathUtilitiesTest.cs index 0f6644411f86..9810db94a410 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/TestPathUtilitiesTest.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/TestPathUtilitiesTest.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/TestPlatformHelperTest.cs b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/TestPlatformHelperTest.cs index 74e5036ad539..dcecc6b32529 100644 --- a/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/TestPlatformHelperTest.cs +++ b/src/libraries/Common/tests/Extensions/TestingUtils/Microsoft.AspNetCore.Testing/test/TestPlatformHelperTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.AspNetCore.Testing; using Xunit; diff --git a/src/libraries/Common/tests/Extensions/TypeNameHelperTest.cs b/src/libraries/Common/tests/Extensions/TypeNameHelperTest.cs index 963be9579f9c..a187cfd4888a 100644 --- a/src/libraries/Common/tests/Extensions/TypeNameHelperTest.cs +++ b/src/libraries/Common/tests/Extensions/TypeNameHelperTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/tests/Extensions/ValueStopwatchTest.cs b/src/libraries/Common/tests/Extensions/ValueStopwatchTest.cs index ab478470509d..c0063203cb35 100644 --- a/src/libraries/Common/tests/Extensions/ValueStopwatchTest.cs +++ b/src/libraries/Common/tests/Extensions/ValueStopwatchTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Threading.Tasks; diff --git a/src/libraries/Common/tests/Microsoft/Win32/TempRegistryKey.cs b/src/libraries/Common/tests/Microsoft/Win32/TempRegistryKey.cs index e8796da99e4b..1bc916400cfc 100644 --- a/src/libraries/Common/tests/Microsoft/Win32/TempRegistryKey.cs +++ b/src/libraries/Common/tests/Microsoft/Win32/TempRegistryKey.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/tests/Scripts/Tools/ParallelTestExecution.ps1 b/src/libraries/Common/tests/Scripts/Tools/ParallelTestExecution.ps1 index 4e276c49843f..df8b8b3b5c0f 100644 --- a/src/libraries/Common/tests/Scripts/Tools/ParallelTestExecution.ps1 +++ b/src/libraries/Common/tests/Scripts/Tools/ParallelTestExecution.ps1 @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. # Usage: # diff --git a/src/libraries/Common/tests/StaticTestGenerator/Program.cs b/src/libraries/Common/tests/StaticTestGenerator/Program.cs index f852d47aa2af..453a117bd172 100644 --- a/src/libraries/Common/tests/StaticTestGenerator/Program.cs +++ b/src/libraries/Common/tests/StaticTestGenerator/Program.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/tests/System/Buffers/NativeMemoryManager.cs b/src/libraries/Common/tests/System/Buffers/NativeMemoryManager.cs index d53a7a348206..3b4c188ede79 100644 --- a/src/libraries/Common/tests/System/Buffers/NativeMemoryManager.cs +++ b/src/libraries/Common/tests/System/Buffers/NativeMemoryManager.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/tests/System/Collections/CollectionAsserts.cs b/src/libraries/Common/tests/System/Collections/CollectionAsserts.cs index 92aaface7964..2de26be1737f 100644 --- a/src/libraries/Common/tests/System/Collections/CollectionAsserts.cs +++ b/src/libraries/Common/tests/System/Collections/CollectionAsserts.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Linq; diff --git a/src/libraries/Common/tests/System/Collections/DebugView.Tests.cs b/src/libraries/Common/tests/System/Collections/DebugView.Tests.cs index d5f29be2420f..35e6b16b6541 100644 --- a/src/libraries/Common/tests/System/Collections/DebugView.Tests.cs +++ b/src/libraries/Common/tests/System/Collections/DebugView.Tests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics; diff --git a/src/libraries/Common/tests/System/Collections/DelegateEqualityComparer.cs b/src/libraries/Common/tests/System/Collections/DelegateEqualityComparer.cs index c22ed45883be..cc7fc00ddddb 100644 --- a/src/libraries/Common/tests/System/Collections/DelegateEqualityComparer.cs +++ b/src/libraries/Common/tests/System/Collections/DelegateEqualityComparer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/libraries/Common/tests/System/Collections/DictionaryExtensions.cs b/src/libraries/Common/tests/System/Collections/DictionaryExtensions.cs index 8840a7ed2273..a8cc9b4198fa 100644 --- a/src/libraries/Common/tests/System/Collections/DictionaryExtensions.cs +++ b/src/libraries/Common/tests/System/Collections/DictionaryExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Collections.Generic { diff --git a/src/libraries/Common/tests/System/Collections/ICollection.Generic.Tests.cs b/src/libraries/Common/tests/System/Collections/ICollection.Generic.Tests.cs index 59d542e44689..bd70ca57a9f9 100644 --- a/src/libraries/Common/tests/System/Collections/ICollection.Generic.Tests.cs +++ b/src/libraries/Common/tests/System/Collections/ICollection.Generic.Tests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Linq; diff --git a/src/libraries/Common/tests/System/Collections/ICollection.NonGeneric.Tests.cs b/src/libraries/Common/tests/System/Collections/ICollection.NonGeneric.Tests.cs index 1154cc147db7..815e4c6b0838 100644 --- a/src/libraries/Common/tests/System/Collections/ICollection.NonGeneric.Tests.cs +++ b/src/libraries/Common/tests/System/Collections/ICollection.NonGeneric.Tests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Text; diff --git a/src/libraries/Common/tests/System/Collections/ICollectionTest.cs b/src/libraries/Common/tests/System/Collections/ICollectionTest.cs index 91ad62b92ff4..b0d304745f12 100644 --- a/src/libraries/Common/tests/System/Collections/ICollectionTest.cs +++ b/src/libraries/Common/tests/System/Collections/ICollectionTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections; diff --git a/src/libraries/Common/tests/System/Collections/IDictionary.Generic.Tests.cs b/src/libraries/Common/tests/System/Collections/IDictionary.Generic.Tests.cs index fb57c1c7e706..7d59dae9fcf9 100644 --- a/src/libraries/Common/tests/System/Collections/IDictionary.Generic.Tests.cs +++ b/src/libraries/Common/tests/System/Collections/IDictionary.Generic.Tests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Linq; diff --git a/src/libraries/Common/tests/System/Collections/IDictionary.Generic.Tests.netcoreapp.cs b/src/libraries/Common/tests/System/Collections/IDictionary.Generic.Tests.netcoreapp.cs index cc015899c78c..a5973aa400f8 100644 --- a/src/libraries/Common/tests/System/Collections/IDictionary.Generic.Tests.netcoreapp.cs +++ b/src/libraries/Common/tests/System/Collections/IDictionary.Generic.Tests.netcoreapp.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using Xunit; diff --git a/src/libraries/Common/tests/System/Collections/IDictionary.NonGeneric.Tests.cs b/src/libraries/Common/tests/System/Collections/IDictionary.NonGeneric.Tests.cs index b4fead53e33a..f70229b28db3 100644 --- a/src/libraries/Common/tests/System/Collections/IDictionary.NonGeneric.Tests.cs +++ b/src/libraries/Common/tests/System/Collections/IDictionary.NonGeneric.Tests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Linq; diff --git a/src/libraries/Common/tests/System/Collections/IDictionary.NonGeneric.Tests.netcoreapp.cs b/src/libraries/Common/tests/System/Collections/IDictionary.NonGeneric.Tests.netcoreapp.cs index 1b930808307e..d935b97b129b 100644 --- a/src/libraries/Common/tests/System/Collections/IDictionary.NonGeneric.Tests.netcoreapp.cs +++ b/src/libraries/Common/tests/System/Collections/IDictionary.NonGeneric.Tests.netcoreapp.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; diff --git a/src/libraries/Common/tests/System/Collections/IDictionaryTest.cs b/src/libraries/Common/tests/System/Collections/IDictionaryTest.cs index 10d6b2ddc54a..23ef2e7f4cb7 100644 --- a/src/libraries/Common/tests/System/Collections/IDictionaryTest.cs +++ b/src/libraries/Common/tests/System/Collections/IDictionaryTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections; diff --git a/src/libraries/Common/tests/System/Collections/IEnumerable.Generic.Serialization.Tests.cs b/src/libraries/Common/tests/System/Collections/IEnumerable.Generic.Serialization.Tests.cs index 55545aab907e..aa20a9a68547 100644 --- a/src/libraries/Common/tests/System/Collections/IEnumerable.Generic.Serialization.Tests.cs +++ b/src/libraries/Common/tests/System/Collections/IEnumerable.Generic.Serialization.Tests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Runtime.Serialization.Formatters.Tests; diff --git a/src/libraries/Common/tests/System/Collections/IEnumerable.Generic.Tests.cs b/src/libraries/Common/tests/System/Collections/IEnumerable.Generic.Tests.cs index 2152db7de161..624feb798a39 100644 --- a/src/libraries/Common/tests/System/Collections/IEnumerable.Generic.Tests.cs +++ b/src/libraries/Common/tests/System/Collections/IEnumerable.Generic.Tests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.IO; diff --git a/src/libraries/Common/tests/System/Collections/IEnumerable.NonGeneric.Serialization.Tests.cs b/src/libraries/Common/tests/System/Collections/IEnumerable.NonGeneric.Serialization.Tests.cs index 77b9dbaa1806..8fbdfd9cbe1b 100644 --- a/src/libraries/Common/tests/System/Collections/IEnumerable.NonGeneric.Serialization.Tests.cs +++ b/src/libraries/Common/tests/System/Collections/IEnumerable.NonGeneric.Serialization.Tests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Linq; diff --git a/src/libraries/Common/tests/System/Collections/IEnumerable.NonGeneric.Tests.cs b/src/libraries/Common/tests/System/Collections/IEnumerable.NonGeneric.Tests.cs index 933230c61f27..e121a34b3eaf 100644 --- a/src/libraries/Common/tests/System/Collections/IEnumerable.NonGeneric.Tests.cs +++ b/src/libraries/Common/tests/System/Collections/IEnumerable.NonGeneric.Tests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using Xunit; diff --git a/src/libraries/Common/tests/System/Collections/IEnumerableTest.cs b/src/libraries/Common/tests/System/Collections/IEnumerableTest.cs index eb6f8434d01b..a52bae97e4ec 100644 --- a/src/libraries/Common/tests/System/Collections/IEnumerableTest.cs +++ b/src/libraries/Common/tests/System/Collections/IEnumerableTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections; diff --git a/src/libraries/Common/tests/System/Collections/IGenericSharedAPI.Tests.cs b/src/libraries/Common/tests/System/Collections/IGenericSharedAPI.Tests.cs index 1e0a5e980692..df89d266e6e6 100644 --- a/src/libraries/Common/tests/System/Collections/IGenericSharedAPI.Tests.cs +++ b/src/libraries/Common/tests/System/Collections/IGenericSharedAPI.Tests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Linq; diff --git a/src/libraries/Common/tests/System/Collections/IList.Generic.Tests.cs b/src/libraries/Common/tests/System/Collections/IList.Generic.Tests.cs index 02a34510f292..efe5790f8ea6 100644 --- a/src/libraries/Common/tests/System/Collections/IList.Generic.Tests.cs +++ b/src/libraries/Common/tests/System/Collections/IList.Generic.Tests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Linq; diff --git a/src/libraries/Common/tests/System/Collections/IList.NonGeneric.Tests.cs b/src/libraries/Common/tests/System/Collections/IList.NonGeneric.Tests.cs index 77dd0ea90791..f954330ec03e 100644 --- a/src/libraries/Common/tests/System/Collections/IList.NonGeneric.Tests.cs +++ b/src/libraries/Common/tests/System/Collections/IList.NonGeneric.Tests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Linq; diff --git a/src/libraries/Common/tests/System/Collections/IListTest.cs b/src/libraries/Common/tests/System/Collections/IListTest.cs index 60e6d74a7f90..24fbbf221251 100644 --- a/src/libraries/Common/tests/System/Collections/IListTest.cs +++ b/src/libraries/Common/tests/System/Collections/IListTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections; diff --git a/src/libraries/Common/tests/System/Collections/ISet.Generic.Tests.cs b/src/libraries/Common/tests/System/Collections/ISet.Generic.Tests.cs index d5aaeacc8423..1cc12e98dd40 100644 --- a/src/libraries/Common/tests/System/Collections/ISet.Generic.Tests.cs +++ b/src/libraries/Common/tests/System/Collections/ISet.Generic.Tests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics; diff --git a/src/libraries/Common/tests/System/Collections/TestBase.Generic.cs b/src/libraries/Common/tests/System/Collections/TestBase.Generic.cs index de77894bdd6c..44c272dbd933 100644 --- a/src/libraries/Common/tests/System/Collections/TestBase.Generic.cs +++ b/src/libraries/Common/tests/System/Collections/TestBase.Generic.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics; diff --git a/src/libraries/Common/tests/System/Collections/TestBase.NonGeneric.cs b/src/libraries/Common/tests/System/Collections/TestBase.NonGeneric.cs index 352d9bf84164..71df62f7d5c6 100644 --- a/src/libraries/Common/tests/System/Collections/TestBase.NonGeneric.cs +++ b/src/libraries/Common/tests/System/Collections/TestBase.NonGeneric.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/libraries/Common/tests/System/Collections/TestingTypes.cs b/src/libraries/Common/tests/System/Collections/TestingTypes.cs index 9f66fb472a59..fdff16a18373 100644 --- a/src/libraries/Common/tests/System/Collections/TestingTypes.cs +++ b/src/libraries/Common/tests/System/Collections/TestingTypes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/libraries/Common/tests/System/Collections/Utils.cs b/src/libraries/Common/tests/System/Collections/Utils.cs index d205145fb6bc..6072ec252e21 100644 --- a/src/libraries/Common/tests/System/Collections/Utils.cs +++ b/src/libraries/Common/tests/System/Collections/Utils.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/tests/System/Diagnostics/DebuggerAttributes.cs b/src/libraries/Common/tests/System/Diagnostics/DebuggerAttributes.cs index 392dda878528..3a1d3f8f84e8 100644 --- a/src/libraries/Common/tests/System/Diagnostics/DebuggerAttributes.cs +++ b/src/libraries/Common/tests/System/Diagnostics/DebuggerAttributes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics; diff --git a/src/libraries/Common/tests/System/Diagnostics/Tracing/ConsoleEventListener.cs b/src/libraries/Common/tests/System/Diagnostics/Tracing/ConsoleEventListener.cs index 7b6ac68b27aa..457b8e1660b2 100644 --- a/src/libraries/Common/tests/System/Diagnostics/Tracing/ConsoleEventListener.cs +++ b/src/libraries/Common/tests/System/Diagnostics/Tracing/ConsoleEventListener.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/libraries/Common/tests/System/Diagnostics/Tracing/TestEventListener.cs b/src/libraries/Common/tests/System/Diagnostics/Tracing/TestEventListener.cs index 6815bbd2763a..bc210b2b83b5 100644 --- a/src/libraries/Common/tests/System/Diagnostics/Tracing/TestEventListener.cs +++ b/src/libraries/Common/tests/System/Diagnostics/Tracing/TestEventListener.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Threading.Tasks; diff --git a/src/libraries/Common/tests/System/DirectoryServices/LdapConfiguration.cs b/src/libraries/Common/tests/System/DirectoryServices/LdapConfiguration.cs index 7258c30aca3b..66e813f262e9 100644 --- a/src/libraries/Common/tests/System/DirectoryServices/LdapConfiguration.cs +++ b/src/libraries/Common/tests/System/DirectoryServices/LdapConfiguration.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; using System.Xml.Linq; @@ -153,4 +152,4 @@ internal static LdapConfiguration GetConfiguration(string configFile) return ldapConfig; } } -} \ No newline at end of file +} diff --git a/src/libraries/Common/tests/System/Drawing/Helpers.cs b/src/libraries/Common/tests/System/Drawing/Helpers.cs index 897501f22927..bf154135a8c0 100644 --- a/src/libraries/Common/tests/System/Drawing/Helpers.cs +++ b/src/libraries/Common/tests/System/Drawing/Helpers.cs @@ -1,5 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. -// See the LICENSE file in the project root for more information. +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. using System.Drawing.Printing; using System.IO; diff --git a/src/libraries/Common/tests/System/EnumTypes.cs b/src/libraries/Common/tests/System/EnumTypes.cs index ff37c5e04a68..f68807f2f069 100644 --- a/src/libraries/Common/tests/System/EnumTypes.cs +++ b/src/libraries/Common/tests/System/EnumTypes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System { diff --git a/src/libraries/Common/tests/System/IO/CallTrackingStream.cs b/src/libraries/Common/tests/System/IO/CallTrackingStream.cs index ae78f9d787f3..5450c1f79dcf 100644 --- a/src/libraries/Common/tests/System/IO/CallTrackingStream.cs +++ b/src/libraries/Common/tests/System/IO/CallTrackingStream.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics; diff --git a/src/libraries/Common/tests/System/IO/Compression/CRC.cs b/src/libraries/Common/tests/System/IO/Compression/CRC.cs index 1e753685b066..f004095f2498 100644 --- a/src/libraries/Common/tests/System/IO/Compression/CRC.cs +++ b/src/libraries/Common/tests/System/IO/Compression/CRC.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/tests/System/IO/Compression/CompressionStreamTestBase.cs b/src/libraries/Common/tests/System/IO/Compression/CompressionStreamTestBase.cs index 8e057be262ec..e9ec7cd3ad36 100644 --- a/src/libraries/Common/tests/System/IO/Compression/CompressionStreamTestBase.cs +++ b/src/libraries/Common/tests/System/IO/Compression/CompressionStreamTestBase.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/libraries/Common/tests/System/IO/Compression/CompressionStreamUnitTestBase.cs b/src/libraries/Common/tests/System/IO/Compression/CompressionStreamUnitTestBase.cs index 32d73a61447f..e8aeadb85765 100644 --- a/src/libraries/Common/tests/System/IO/Compression/CompressionStreamUnitTestBase.cs +++ b/src/libraries/Common/tests/System/IO/Compression/CompressionStreamUnitTestBase.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Linq; @@ -155,7 +154,7 @@ public virtual void WriteAsync_DuringWriteAsync() } } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [Fact] public async Task ReadAsync_DuringReadAsync() { byte[] buffer = new byte[32]; diff --git a/src/libraries/Common/tests/System/IO/Compression/FileData.cs b/src/libraries/Common/tests/System/IO/Compression/FileData.cs index 97d892c72d5b..cd78f55d1587 100644 --- a/src/libraries/Common/tests/System/IO/Compression/FileData.cs +++ b/src/libraries/Common/tests/System/IO/Compression/FileData.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/tests/System/IO/Compression/LocalMemoryStream.cs b/src/libraries/Common/tests/System/IO/Compression/LocalMemoryStream.cs index 9cc077fc3d4e..549dafa7ef6d 100644 --- a/src/libraries/Common/tests/System/IO/Compression/LocalMemoryStream.cs +++ b/src/libraries/Common/tests/System/IO/Compression/LocalMemoryStream.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; using System.Threading.Tasks; diff --git a/src/libraries/Common/tests/System/IO/Compression/StreamHelpers.cs b/src/libraries/Common/tests/System/IO/Compression/StreamHelpers.cs index ad4de613ba9a..474de992235e 100644 --- a/src/libraries/Common/tests/System/IO/Compression/StreamHelpers.cs +++ b/src/libraries/Common/tests/System/IO/Compression/StreamHelpers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Common/tests/System/IO/Compression/ZipTestHelper.cs b/src/libraries/Common/tests/System/IO/Compression/ZipTestHelper.cs index 3a8828ae451f..e8a0c08c3df2 100644 --- a/src/libraries/Common/tests/System/IO/Compression/ZipTestHelper.cs +++ b/src/libraries/Common/tests/System/IO/Compression/ZipTestHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics; diff --git a/src/libraries/Common/tests/System/IO/DelegateStream.cs b/src/libraries/Common/tests/System/IO/DelegateStream.cs index 4325a00ecc87..e40df0085ab0 100644 --- a/src/libraries/Common/tests/System/IO/DelegateStream.cs +++ b/src/libraries/Common/tests/System/IO/DelegateStream.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Threading; using System.Threading.Tasks; @@ -54,14 +53,14 @@ public DelegateStream( _positionSetFunc = positionSetFunc ?? (_ => { throw new NotSupportedException(); }); _positionGetFunc = positionGetFunc ?? (() => { throw new NotSupportedException(); }); - _readFunc = readFunc; _readAsyncFunc = readAsyncFunc ?? ((buffer, offset, count, token) => base.ReadAsync(buffer, offset, count, token)); + _readFunc = readFunc ?? ((buffer, offset, count) => readAsyncFunc(buffer, offset, count, default).GetAwaiter().GetResult()); _seekFunc = seekFunc ?? ((_, __) => { throw new NotSupportedException(); }); _setLengthFunc = setLengthFunc ?? (_ => { throw new NotSupportedException(); }); - _writeFunc = writeFunc; _writeAsyncFunc = writeAsyncFunc ?? ((buffer, offset, count, token) => base.WriteAsync(buffer, offset, count, token)); + _writeFunc = writeFunc ?? ((buffer, offset, count) => writeAsyncFunc(buffer, offset, count, default).GetAwaiter().GetResult()); _disposeFunc = disposeFunc; } diff --git a/src/libraries/Common/tests/System/IO/InterceptStreamWriter.cs b/src/libraries/Common/tests/System/IO/InterceptStreamWriter.cs index b504e9f5a210..1113229ec5f1 100644 --- a/src/libraries/Common/tests/System/IO/InterceptStreamWriter.cs +++ b/src/libraries/Common/tests/System/IO/InterceptStreamWriter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Common/tests/System/IO/PathFeatures.cs b/src/libraries/Common/tests/System/IO/PathFeatures.cs index 7062d9ee1a51..08c615b6dc97 100644 --- a/src/libraries/Common/tests/System/IO/PathFeatures.cs +++ b/src/libraries/Common/tests/System/IO/PathFeatures.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Reflection; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/tests/System/IO/PositionValueStream.cs b/src/libraries/Common/tests/System/IO/PositionValueStream.cs index e1e644b0eafc..33da3949966e 100644 --- a/src/libraries/Common/tests/System/IO/PositionValueStream.cs +++ b/src/libraries/Common/tests/System/IO/PositionValueStream.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Common/tests/System/IO/StreamSpanExtensions.netstandard.cs b/src/libraries/Common/tests/System/IO/StreamSpanExtensions.netstandard.cs index f7520a3611b4..e20f0947feec 100644 --- a/src/libraries/Common/tests/System/IO/StreamSpanExtensions.netstandard.cs +++ b/src/libraries/Common/tests/System/IO/StreamSpanExtensions.netstandard.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Common/tests/System/IO/TempDirectory.cs b/src/libraries/Common/tests/System/IO/TempDirectory.cs index a4ae3c6004ee..c3afec45efb9 100644 --- a/src/libraries/Common/tests/System/IO/TempDirectory.cs +++ b/src/libraries/Common/tests/System/IO/TempDirectory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Text; diff --git a/src/libraries/Common/tests/System/IO/TempFile.cs b/src/libraries/Common/tests/System/IO/TempFile.cs index 87de1ca320f0..c26131d0c307 100644 --- a/src/libraries/Common/tests/System/IO/TempFile.cs +++ b/src/libraries/Common/tests/System/IO/TempFile.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; using Xunit; diff --git a/src/libraries/Common/tests/System/IO/WrappedMemoryStream.cs b/src/libraries/Common/tests/System/IO/WrappedMemoryStream.cs index 567373247dcb..63969eea2133 100644 --- a/src/libraries/Common/tests/System/IO/WrappedMemoryStream.cs +++ b/src/libraries/Common/tests/System/IO/WrappedMemoryStream.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.IO.Tests { diff --git a/src/libraries/Common/tests/System/Linq/SkipTakeData.cs b/src/libraries/Common/tests/System/Linq/SkipTakeData.cs index b930eff7e3ff..b5e6386786a7 100644 --- a/src/libraries/Common/tests/System/Linq/SkipTakeData.cs +++ b/src/libraries/Common/tests/System/Linq/SkipTakeData.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/libraries/Common/tests/System/MockType.cs b/src/libraries/Common/tests/System/MockType.cs index 56070d7abf75..9ccc29bf948e 100644 --- a/src/libraries/Common/tests/System/MockType.cs +++ b/src/libraries/Common/tests/System/MockType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Globalization; diff --git a/src/libraries/Common/tests/System/Net/Capability.RawSocketPermissions.cs b/src/libraries/Common/tests/System/Net/Capability.RawSocketPermissions.cs index 4dbacc68cc9f..5f7db880de7b 100644 --- a/src/libraries/Common/tests/System/Net/Capability.RawSocketPermissions.cs +++ b/src/libraries/Common/tests/System/Net/Capability.RawSocketPermissions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Net.Sockets; diff --git a/src/libraries/Common/tests/System/Net/Capability.Security.Unix.cs b/src/libraries/Common/tests/System/Net/Capability.Security.Unix.cs index 3198bc22e9fa..d2b303ac8107 100644 --- a/src/libraries/Common/tests/System/Net/Capability.Security.Unix.cs +++ b/src/libraries/Common/tests/System/Net/Capability.Security.Unix.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.Test.Common { diff --git a/src/libraries/Common/tests/System/Net/Capability.Security.Windows.cs b/src/libraries/Common/tests/System/Net/Capability.Security.Windows.cs index 41a0ebfef9cc..df67823c3c39 100644 --- a/src/libraries/Common/tests/System/Net/Capability.Security.Windows.cs +++ b/src/libraries/Common/tests/System/Net/Capability.Security.Windows.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.Test.Common { diff --git a/src/libraries/Common/tests/System/Net/Capability.Security.cs b/src/libraries/Common/tests/System/Net/Capability.Security.cs index fe78e01da7d2..6e8cd3bb0b12 100644 --- a/src/libraries/Common/tests/System/Net/Capability.Security.cs +++ b/src/libraries/Common/tests/System/Net/Capability.Security.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Security.Cryptography.X509Certificates; using System.Threading; diff --git a/src/libraries/Common/tests/System/Net/Capability.Sockets.cs b/src/libraries/Common/tests/System/Net/Capability.Sockets.cs index 74bd9971395b..efef8f64046e 100644 --- a/src/libraries/Common/tests/System/Net/Capability.Sockets.cs +++ b/src/libraries/Common/tests/System/Net/Capability.Sockets.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Net.Sockets; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/tests/System/Net/Configuration.Certificates.cs b/src/libraries/Common/tests/System/Net/Configuration.Certificates.cs index 02462be7c6e6..c0f114a82d35 100644 --- a/src/libraries/Common/tests/System/Net/Configuration.Certificates.cs +++ b/src/libraries/Common/tests/System/Net/Configuration.Certificates.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.IO; diff --git a/src/libraries/Common/tests/System/Net/Configuration.Http.cs b/src/libraries/Common/tests/System/Net/Configuration.Http.cs index 0c30c8a01517..69e109412877 100644 --- a/src/libraries/Common/tests/System/Net/Configuration.Http.cs +++ b/src/libraries/Common/tests/System/Net/Configuration.Http.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Linq; diff --git a/src/libraries/Common/tests/System/Net/Configuration.Ping.cs b/src/libraries/Common/tests/System/Net/Configuration.Ping.cs index 1571f92333d1..c543c57b9116 100644 --- a/src/libraries/Common/tests/System/Net/Configuration.Ping.cs +++ b/src/libraries/Common/tests/System/Net/Configuration.Ping.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.Test.Common { diff --git a/src/libraries/Common/tests/System/Net/Configuration.Security.cs b/src/libraries/Common/tests/System/Net/Configuration.Security.cs index a2d77adc8cb0..cfa1a7300d34 100644 --- a/src/libraries/Common/tests/System/Net/Configuration.Security.cs +++ b/src/libraries/Common/tests/System/Net/Configuration.Security.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.Test.Common { diff --git a/src/libraries/Common/tests/System/Net/Configuration.Sockets.cs b/src/libraries/Common/tests/System/Net/Configuration.Sockets.cs index 05a91d57b93e..0e70009e544c 100644 --- a/src/libraries/Common/tests/System/Net/Configuration.Sockets.cs +++ b/src/libraries/Common/tests/System/Net/Configuration.Sockets.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.Test.Common { diff --git a/src/libraries/Common/tests/System/Net/Configuration.WebSockets.cs b/src/libraries/Common/tests/System/Net/Configuration.WebSockets.cs index d3eaf85942c1..a24512ce3b4a 100644 --- a/src/libraries/Common/tests/System/Net/Configuration.WebSockets.cs +++ b/src/libraries/Common/tests/System/Net/Configuration.WebSockets.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.Test.Common { diff --git a/src/libraries/Common/tests/System/Net/Configuration.cs b/src/libraries/Common/tests/System/Net/Configuration.cs index 5587d1fd2817..62e860b2efec 100644 --- a/src/libraries/Common/tests/System/Net/Configuration.cs +++ b/src/libraries/Common/tests/System/Net/Configuration.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.Test.Common { diff --git a/src/libraries/Common/tests/System/Net/EnterpriseTests/EnterpriseTestConfiguration.cs b/src/libraries/Common/tests/System/Net/EnterpriseTests/EnterpriseTestConfiguration.cs index adb8d5cebbfa..c2fc5eddb1ec 100644 --- a/src/libraries/Common/tests/System/Net/EnterpriseTests/EnterpriseTestConfiguration.cs +++ b/src/libraries/Common/tests/System/Net/EnterpriseTests/EnterpriseTestConfiguration.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.Test.Common { diff --git a/src/libraries/Common/tests/System/Net/EventSourceTestLogging.cs b/src/libraries/Common/tests/System/Net/EventSourceTestLogging.cs index c1d4a076027a..c7c2c5b79a2e 100644 --- a/src/libraries/Common/tests/System/Net/EventSourceTestLogging.cs +++ b/src/libraries/Common/tests/System/Net/EventSourceTestLogging.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics.Tracing; diff --git a/src/libraries/Common/tests/System/Net/Http/ByteAtATimeContent.cs b/src/libraries/Common/tests/System/Net/Http/ByteAtATimeContent.cs index 67a95370cbde..d1b54ece613d 100644 --- a/src/libraries/Common/tests/System/Net/Http/ByteAtATimeContent.cs +++ b/src/libraries/Common/tests/System/Net/Http/ByteAtATimeContent.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; +using System.Threading; using System.Threading.Tasks; namespace System.Net.Http.Functional.Tests @@ -24,6 +24,11 @@ public ByteAtATimeContent(int length, Task waitToSend, TaskCompletionSource + SerializeToStreamAsync(stream, context).GetAwaiter().GetResult(); +#endif + protected override async Task SerializeToStreamAsync(Stream stream, TransportContext context) { await _waitToSend; diff --git a/src/libraries/Common/tests/System/Net/Http/ChannelBindingAwareContent.cs b/src/libraries/Common/tests/System/Net/Http/ChannelBindingAwareContent.cs index ee0a31bf2a0a..af6b4c11b2c9 100644 --- a/src/libraries/Common/tests/System/Net/Http/ChannelBindingAwareContent.cs +++ b/src/libraries/Common/tests/System/Net/Http/ChannelBindingAwareContent.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; using System.Security.Authentication.ExtendedProtection; diff --git a/src/libraries/Common/tests/System/Net/Http/CustomContent.cs b/src/libraries/Common/tests/System/Net/Http/CustomContent.cs index 8df9aa29ef33..7c446498ec08 100644 --- a/src/libraries/Common/tests/System/Net/Http/CustomContent.cs +++ b/src/libraries/Common/tests/System/Net/Http/CustomContent.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; using System.Threading.Tasks; diff --git a/src/libraries/Common/tests/System/Net/Http/DefaultCredentialsTest.cs b/src/libraries/Common/tests/System/Net/Http/DefaultCredentialsTest.cs index d5b9e4fb940c..71f9b59a21f3 100644 --- a/src/libraries/Common/tests/System/Net/Http/DefaultCredentialsTest.cs +++ b/src/libraries/Common/tests/System/Net/Http/DefaultCredentialsTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Security.Principal; diff --git a/src/libraries/Common/tests/System/Net/Http/DribbleStream.cs b/src/libraries/Common/tests/System/Net/Http/DribbleStream.cs index 39e85c875a3e..ed8a938d41ab 100644 --- a/src/libraries/Common/tests/System/Net/Http/DribbleStream.cs +++ b/src/libraries/Common/tests/System/Net/Http/DribbleStream.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; using System.Threading; diff --git a/src/libraries/Common/tests/System/Net/Http/GenericLoopbackServer.cs b/src/libraries/Common/tests/System/Net/Http/GenericLoopbackServer.cs index 779055b921e4..fd12e239e5d3 100644 --- a/src/libraries/Common/tests/System/Net/Http/GenericLoopbackServer.cs +++ b/src/libraries/Common/tests/System/Net/Http/GenericLoopbackServer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Linq; @@ -126,6 +125,36 @@ public HttpRequestData() Headers = new List(); } + public static async Task FromHttpRequestMessageAsync(System.Net.Http.HttpRequestMessage request) + { + var result = new HttpRequestData(); + result.Method = request.Method.ToString(); + result.Path = request.RequestUri?.AbsolutePath; + + foreach (var header in request.Headers) + { + foreach (var value in header.Value) + { + result.Headers.Add(new HttpHeaderData(header.Key, value)); + } + } + + if (request.Content != null) + { + result.Body = await request.Content.ReadAsByteArrayAsync().ConfigureAwait(false); + + foreach (var header in request.Content.Headers) + { + foreach (var value in header.Value) + { + result.Headers.Add(new HttpHeaderData(header.Key, value)); + } + } + } + + return result; + } + public string[] GetHeaderValues(string headerName) { return Headers.Where(h => h.Name.Equals(headerName, StringComparison.OrdinalIgnoreCase)) diff --git a/src/libraries/Common/tests/System/Net/Http/HPackEncoder.cs b/src/libraries/Common/tests/System/Net/Http/HPackEncoder.cs index 650776e67e4b..bbdf89f223c2 100644 --- a/src/libraries/Common/tests/System/Net/Http/HPackEncoder.cs +++ b/src/libraries/Common/tests/System/Net/Http/HPackEncoder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Text; diff --git a/src/libraries/Common/tests/System/Net/Http/Http2Frames.cs b/src/libraries/Common/tests/System/Net/Http/Http2Frames.cs index af0f245b1b82..3195e239438b 100644 --- a/src/libraries/Common/tests/System/Net/Http/Http2Frames.cs +++ b/src/libraries/Common/tests/System/Net/Http/Http2Frames.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Buffers.Binary; using System.Collections.Generic; diff --git a/src/libraries/Common/tests/System/Net/Http/Http2LoopbackConnection.cs b/src/libraries/Common/tests/System/Net/Http/Http2LoopbackConnection.cs index 86e0cfdf6ea0..3750a36d15be 100644 --- a/src/libraries/Common/tests/System/Net/Http/Http2LoopbackConnection.cs +++ b/src/libraries/Common/tests/System/Net/Http/Http2LoopbackConnection.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.IO; diff --git a/src/libraries/Common/tests/System/Net/Http/Http2LoopbackServer.cs b/src/libraries/Common/tests/System/Net/Http/Http2LoopbackServer.cs index 4d3486c3a80c..a3ff123657a6 100644 --- a/src/libraries/Common/tests/System/Net/Http/Http2LoopbackServer.cs +++ b/src/libraries/Common/tests/System/Net/Http/Http2LoopbackServer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.IO; diff --git a/src/libraries/Common/tests/System/Net/Http/Http3LoopbackConnection.cs b/src/libraries/Common/tests/System/Net/Http/Http3LoopbackConnection.cs index ca8b78d9ca42..5d6f3e70fe2d 100644 --- a/src/libraries/Common/tests/System/Net/Http/Http3LoopbackConnection.cs +++ b/src/libraries/Common/tests/System/Net/Http/Http3LoopbackConnection.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics; diff --git a/src/libraries/Common/tests/System/Net/Http/Http3LoopbackServer.cs b/src/libraries/Common/tests/System/Net/Http/Http3LoopbackServer.cs index 59d43d484131..411557089b3d 100644 --- a/src/libraries/Common/tests/System/Net/Http/Http3LoopbackServer.cs +++ b/src/libraries/Common/tests/System/Net/Http/Http3LoopbackServer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics; diff --git a/src/libraries/Common/tests/System/Net/Http/Http3LoopbackStream.cs b/src/libraries/Common/tests/System/Net/Http/Http3LoopbackStream.cs index e9cc4489424d..f13cbd6d958a 100644 --- a/src/libraries/Common/tests/System/Net/Http/Http3LoopbackStream.cs +++ b/src/libraries/Common/tests/System/Net/Http/Http3LoopbackStream.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Buffers; using System.Buffers.Binary; diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClient.SelectedSitesTest.cs b/src/libraries/Common/tests/System/Net/Http/HttpClient.SelectedSitesTest.cs index 64399ff41666..ad8e1f8f3608 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClient.SelectedSitesTest.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClient.SelectedSitesTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.IO; diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientEKUTest.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientEKUTest.cs index c57b6f718b41..654faf26ce6c 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientEKUTest.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientEKUTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Net.Security; using System.Net.Test.Common; diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.AcceptAllCerts.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.AcceptAllCerts.cs index 44be4aac41f9..e11fb9a6a15e 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.AcceptAllCerts.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.AcceptAllCerts.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Net.Security; using System.Net.Test.Common; diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Asynchrony.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Asynchrony.cs index 614232e00887..44c4a39f8077 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Asynchrony.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Asynchrony.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.IO; diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Authentication.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Authentication.cs index 9c2c1e2c74e5..a5a6ea002efe 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Authentication.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Authentication.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Linq; @@ -44,6 +43,59 @@ private async Task CreateAndValidateRequest(HttpClientHandler handler, Uri url, public HttpClientHandler_Authentication_Test(ITestOutputHelper output) : base(output) { } + [Theory] + [MemberData(nameof(Authentication_SocketsHttpHandler_TestData))] + public async Task SocketsHttpHandler_Authentication_Succeeds(string authenticateHeader, bool result) + { + await HttpClientHandler_Authentication_Succeeds(authenticateHeader, result); + } + + public static IEnumerable Authentication_SocketsHttpHandler_TestData() + { + // These test cases successfully authenticate on SocketsHttpHandler but fail on the other handlers. + // These are legal as per the RFC, so authenticating is the expected behavior. + // See https://github.com/dotnet/runtime/issues/25643 for details. + if (!IsWinHttpHandler) + { + // Unauthorized on WinHttpHandler + yield return new object[] {"Basic realm=\"testrealm1\" basic realm=\"testrealm1\"", true}; + yield return new object[] {"Basic something digest something", true}; + } + yield return new object[] { "Digest realm=\"api@example.org\", qop=\"auth\", algorithm=MD5-sess, nonce=\"5TsQWLVdgBdmrQ0XsxbDODV+57QdFR34I9HAbC/RVvkK\", " + + "opaque=\"HRPCssKJSGjCrkzDg8OhwpzCiGPChXYjwrI2QmXDnsOS\", charset=UTF-8, userhash=true", true }; + yield return new object[] { "dIgEsT realm=\"api@example.org\", qop=\"auth\", algorithm=MD5-sess, nonce=\"5TsQWLVdgBdmrQ0XsxbDODV+57QdFR34I9HAbC/RVvkK\", " + + "opaque=\"HRPCssKJSGjCrkzDg8OhwpzCiGPChXYjwrI2QmXDnsOS\", charset=UTF-8, userhash=true", true }; + + // These cases fail on WinHttpHandler because of a behavior in WinHttp that causes requests to be duplicated + // when the digest header has certain parameters. See https://github.com/dotnet/runtime/issues/25644 for details. + if (!IsWinHttpHandler) + { + // Timeouts on WinHttpHandler + yield return new object[] { "Digest ", false }; + yield return new object[] { "Digest realm=\"testrealm\", nonce=\"testnonce\", algorithm=\"myown\"", false }; + } + + // These cases fail to authenticate on SocketsHttpHandler, but succeed on the other handlers. + // they are all invalid as per the RFC, so failing is the expected behavior. See https://github.com/dotnet/runtime/issues/25645 for details. + if (!IsWinHttpHandler) + { + // Timeouts on WinHttpHandler + yield return new object[] {"Digest realm=withoutquotes, nonce=withoutquotes", false}; + } + yield return new object[] { "Digest realm=\"testrealm\" nonce=\"testnonce\"", false }; + yield return new object[] { "Digest realm=\"testrealm1\", nonce=\"testnonce1\" Digest realm=\"testrealm2\", nonce=\"testnonce2\"", false }; + + // These tests check that the algorithm parameter is treated in case insensitive way. + // WinHTTP only supports plain MD5, so other algorithms are included here. + yield return new object[] { $"Digest realm=\"testrealm\", algorithm=md5-Sess, nonce=\"testnonce\", qop=\"auth\"", true }; + if (!IsWinHttpHandler) + { + // Unauthorized on WinHttpHandler + yield return new object[] { $"Digest realm=\"testrealm\", algorithm=sha-256, nonce=\"testnonce\"", true }; + yield return new object[] { $"Digest realm=\"testrealm\", algorithm=sha-256-SESS, nonce=\"testnonce\", qop=\"auth\"", true }; + } + } + [Theory] [MemberData(nameof(Authentication_TestData))] public async Task HttpClientHandler_Authentication_Succeeds(string authenticateHeader, bool result) @@ -568,7 +620,7 @@ public async Task Credentials_DomainJoinedServerUsesKerberos_UseIpAddressAndHost _output.WriteLine(request.RequestUri.AbsoluteUri.ToString()); _output.WriteLine($"Host: {request.Headers.Host}"); - using (HttpResponseMessage response = await client.SendAsync(request)) + using (HttpResponseMessage response = await client.SendAsync(TestAsync, request)) { Assert.Equal(HttpStatusCode.OK, response.StatusCode); string body = await response.Content.ReadAsStringAsync(); @@ -602,12 +654,11 @@ public async Task Credentials_ServerUsesWindowsAuthentication_Success(string ser [InlineData("Negotiate")] public async Task Credentials_ServerChallengesWithWindowsAuth_ClientSendsWindowsAuthHeader(string authScheme) { -#if WINHTTPHANDLER_TEST - if (UseVersion > HttpVersion.Version11) + if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) { - throw new SkipTestException($"Test doesn't support {UseVersion} protocol."); + return; } -#endif + await LoopbackServerFactory.CreateClientAndServerAsync( async uri => { diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.AutoRedirect.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.AutoRedirect.cs index 54c620cf0bb5..ee41dbb716ad 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.AutoRedirect.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.AutoRedirect.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Net.Http.Headers; @@ -40,32 +39,15 @@ public static IEnumerable RemoteServersAndRedirectStatusCodes() } } - public static readonly object[][] RedirectStatusCodesOldMethodsNewMethods = { - new object[] { 300, "GET", "GET" }, - new object[] { 300, "POST", "GET" }, - new object[] { 300, "HEAD", "HEAD" }, - - new object[] { 301, "GET", "GET" }, - new object[] { 301, "POST", "GET" }, - new object[] { 301, "HEAD", "HEAD" }, - - new object[] { 302, "GET", "GET" }, - new object[] { 302, "POST", "GET" }, - new object[] { 302, "HEAD", "HEAD" }, - - new object[] { 303, "GET", "GET" }, - new object[] { 303, "POST", "GET" }, - new object[] { 303, "HEAD", "HEAD" }, - - new object[] { 307, "GET", "GET" }, - new object[] { 307, "POST", "POST" }, - new object[] { 307, "HEAD", "HEAD" }, - - new object[] { 308, "GET", "GET" }, - new object[] { 308, "POST", "POST" }, - new object[] { 308, "HEAD", "HEAD" }, - }; - + public static IEnumerable RedirectStatusCodesOldMethodsNewMethods() + { + foreach (int statusCode in new[] { 300, 301, 302, 303, 307, 308 }) + { + yield return new object[] { statusCode, "GET", "GET" }; + yield return new object[] { statusCode, "POST", statusCode <= 303 ? "GET" : "POST" }; + yield return new object[] { statusCode, "HEAD", "HEAD" }; + } + } public HttpClientHandlerTest_AutoRedirect(ITestOutputHelper output) : base(output) { } [OuterLoop("Uses external server")] @@ -112,7 +94,7 @@ await LoopbackServer.CreateServerAsync(async (origServer, origUrl) => { var request = new HttpRequestMessage(new HttpMethod(oldMethod), origUrl) { Version = UseVersion }; - Task getResponseTask = client.SendAsync(request); + Task getResponseTask = client.SendAsync(TestAsync, request); await LoopbackServer.CreateServerAsync(async (redirServer, redirUrl) => { @@ -157,7 +139,7 @@ await LoopbackServer.CreateServerAsync(async (origServer, origUrl) => request.Content = new StringContent(ExpectedContent); request.Headers.TransferEncodingChunked = true; - Task getResponseTask = client.SendAsync(request); + Task getResponseTask = client.SendAsync(TestAsync, request); await LoopbackServer.CreateServerAsync(async (redirServer, redirUrl) => { diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Cancellation.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Cancellation.cs index 453aa8d7b98e..601364247f70 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Cancellation.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Cancellation.cs @@ -1,14 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics; -using System.DirectoryServices.Protocols; using System.IO; using System.Linq; using System.Net.Test.Common; -using System.Reflection; using System.Runtime.CompilerServices; using System.Threading; using System.Threading.Tasks; @@ -28,7 +25,7 @@ public abstract class HttpClientHandler_Cancellation_Test : HttpClientHandlerTes { public HttpClientHandler_Cancellation_Test(ITestOutputHelper output) : base(output) { } - [ConditionalTheory] + [Theory] [InlineData(false, CancellationMode.Token)] [InlineData(true, CancellationMode.Token)] public async Task PostAsync_CancelDuringRequestContentSend_TaskCanceledQuickly(bool chunkedTransfer, CancellationMode mode) @@ -39,12 +36,10 @@ public async Task PostAsync_CancelDuringRequestContentSend_TaskCanceledQuickly(b return; } -#if WINHTTPHANDLER_TEST - if (UseVersion >= HttpVersion20.Value) + if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) { - throw new SkipTestException($"Test doesn't support {UseVersion} protocol."); + return; } -#endif var serverRelease = new TaskCompletionSource(); await LoopbackServerFactory.CreateClientAndServerAsync(async uri => @@ -62,10 +57,13 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => req.Content = new ByteAtATimeContent(int.MaxValue, waitToSend.Task, contentSending, millisecondDelayBetweenBytes: 1); req.Headers.TransferEncodingChunked = chunkedTransfer; - Task resp = client.SendAsync(req, HttpCompletionOption.ResponseHeadersRead, cts.Token); + Task resp = client.SendAsync(TestAsync, req, HttpCompletionOption.ResponseHeadersRead, cts.Token); waitToSend.SetResult(true); - await contentSending.Task; - Cancel(mode, client, cts); + await Task.WhenAny(contentSending.Task, resp); + if (!resp.IsCompleted) + { + Cancel(mode, client, cts); + } await ValidateClientCancellationAsync(() => resp); } } @@ -83,7 +81,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => }); } - [ConditionalTheory] + [Theory] [MemberData(nameof(OneBoolAndCancellationMode))] public async Task GetAsync_CancelDuringResponseHeadersReceived_TaskCanceledQuickly(bool connectionClose, CancellationMode mode) { @@ -93,12 +91,10 @@ public async Task GetAsync_CancelDuringResponseHeadersReceived_TaskCanceledQuick return; } -#if WINHTTPHANDLER_TEST - if (UseVersion >= HttpVersion20.Value) + if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) { - throw new SkipTestException($"Test doesn't support {UseVersion} protocol."); + return; } -#endif using (HttpClient client = CreateHttpClient()) { @@ -124,7 +120,7 @@ await ValidateClientCancellationAsync(async () => var req = new HttpRequestMessage(HttpMethod.Get, url) { Version = UseVersion }; req.Headers.ConnectionClose = connectionClose; - Task getResponse = client.SendAsync(req, HttpCompletionOption.ResponseHeadersRead, cts.Token); + Task getResponse = client.SendAsync(TestAsync, req, HttpCompletionOption.ResponseHeadersRead, cts.Token); await partialResponseHeadersSent.Task; Cancel(mode, client, cts); await getResponse; @@ -180,7 +176,7 @@ await ValidateClientCancellationAsync(async () => var req = new HttpRequestMessage(HttpMethod.Get, url) { Version = UseVersion }; req.Headers.ConnectionClose = connectionClose; - Task getResponse = client.SendAsync(req, HttpCompletionOption.ResponseContentRead, cts.Token); + Task getResponse = client.SendAsync(TestAsync, req, HttpCompletionOption.ResponseContentRead, cts.Token); await responseHeadersSent.Task; await Task.Delay(1); // make it more likely that client will have started processing response body Cancel(mode, client, cts); @@ -196,7 +192,7 @@ await ValidateClientCancellationAsync(async () => } } - [ConditionalTheory] + [Theory] [MemberData(nameof(ThreeBools))] public async Task GetAsync_CancelDuringResponseBodyReceived_Unbuffered_TaskCanceledQuickly(bool chunkedTransfer, bool connectionClose, bool readOrCopyToAsync) { @@ -205,13 +201,11 @@ public async Task GetAsync_CancelDuringResponseBodyReceived_Unbuffered_TaskCance // There is no chunked encoding or connection header in HTTP/2 and later return; } - -#if WINHTTPHANDLER_TEST - if (UseVersion >= HttpVersion20.Value) + + if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) { - throw new SkipTestException($"Test doesn't support {UseVersion} protocol."); + return; } -#endif using (HttpClient client = CreateHttpClient()) { @@ -238,11 +232,11 @@ await LoopbackServerFactory.CreateServerAsync(async (server, url) => var req = new HttpRequestMessage(HttpMethod.Get, url) { Version = UseVersion }; req.Headers.ConnectionClose = connectionClose; - Task getResponse = client.SendAsync(req, HttpCompletionOption.ResponseHeadersRead, cts.Token); + Task getResponse = client.SendAsync(TestAsync, req, HttpCompletionOption.ResponseHeadersRead, cts.Token); await ValidateClientCancellationAsync(async () => { HttpResponseMessage resp = await getResponse; - Stream respStream = await resp.Content.ReadAsStreamAsync(); + Stream respStream = await resp.Content.ReadAsStreamAsync(TestAsync); Task readTask = readOrCopyToAsync ? respStream.ReadAsync(new byte[1], 0, 1, cts.Token) : respStream.CopyToAsync(Stream.Null, 10, cts.Token); @@ -258,19 +252,18 @@ await ValidateClientCancellationAsync(async () => }); } } - [ConditionalTheory] + [Theory] [InlineData(CancellationMode.CancelPendingRequests, false)] [InlineData(CancellationMode.DisposeHttpClient, false)] [InlineData(CancellationMode.CancelPendingRequests, true)] [InlineData(CancellationMode.DisposeHttpClient, true)] public async Task GetAsync_CancelPendingRequests_DoesntCancelReadAsyncOnResponseStream(CancellationMode mode, bool copyToAsync) { -#if WINHTTPHANDLER_TEST - if (UseVersion >= HttpVersion20.Value) + if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) { - throw new SkipTestException($"Test doesn't support {UseVersion} protocol."); + return; } -#endif + using (HttpClient client = CreateHttpClient()) { client.Timeout = Timeout.InfiniteTimeSpan; @@ -302,7 +295,7 @@ await LoopbackServerFactory.CreateServerAsync(async (server, url) => using (HttpResponseMessage resp = await client.GetAsync(url, HttpCompletionOption.ResponseHeadersRead)) - using (Stream respStream = await resp.Content.ReadAsStreamAsync()) + using (Stream respStream = await resp.Content.ReadAsStreamAsync(TestAsync)) { var result = new MemoryStream(); int b = respStream.ReadByte(); @@ -335,7 +328,7 @@ await LoopbackServerFactory.CreateServerAsync(async (server, url) => } } - [ConditionalFact] + [Fact] public async Task MaxConnectionsPerServer_WaitingConnectionsAreCancelable() { if (LoopbackServerFactory.Version >= HttpVersion20.Value) @@ -536,7 +529,7 @@ public static IEnumerable PostAsync_Cancel_CancellationTokenPassedToCo #if !NETFRAMEWORK [OuterLoop("Uses Task.Delay")] - [ConditionalTheory] + [Theory] [MemberData(nameof(PostAsync_Cancel_CancellationTokenPassedToContent_MemberData))] public async Task PostAsync_Cancel_CancellationTokenPassedToContent(HttpContent content, CancellationTokenSource cancellationTokenSource) { @@ -544,6 +537,12 @@ public async Task PostAsync_Cancel_CancellationTokenPassedToContent(HttpContent { return; } + // Skipping test for a sync scenario becasue DelegateStream drops the original cancellationToken when it calls Read/Write methods. + // As a result, ReadAsyncFunc receives default in cancellationToken, which will never get signaled through the cancellationTokenSource. + if (!TestAsync) + { + return; + } await LoopbackServerFactory.CreateClientAndServerAsync( async uri => @@ -552,7 +551,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync( using (var req = new HttpRequestMessage(HttpMethod.Post, uri) { Content = content, Version = UseVersion }) try { - using (HttpResponseMessage resp = await invoker.SendAsync(req, cancellationTokenSource.Token)) + using (HttpResponseMessage resp = await invoker.SendAsync(TestAsync, req, cancellationTokenSource.Token)) { Assert.Equal("Hello World", await resp.Content.ReadAsStringAsync()); } @@ -611,23 +610,21 @@ public enum CancellationMode DisposeHttpClient = 0x4 } - private static readonly bool[] s_bools = new[] { true, false }; - public static IEnumerable OneBoolAndCancellationMode() => - from first in s_bools + from first in BoolValues from mode in new[] { CancellationMode.Token, CancellationMode.CancelPendingRequests, CancellationMode.DisposeHttpClient, CancellationMode.Token | CancellationMode.CancelPendingRequests } select new object[] { first, mode }; public static IEnumerable TwoBoolsAndCancellationMode() => - from first in s_bools - from second in s_bools + from first in BoolValues + from second in BoolValues from mode in new[] { CancellationMode.Token, CancellationMode.CancelPendingRequests, CancellationMode.DisposeHttpClient, CancellationMode.Token | CancellationMode.CancelPendingRequests } select new object[] { first, second, mode }; public static IEnumerable ThreeBools() => - from first in s_bools - from second in s_bools - from third in s_bools + from first in BoolValues + from second in BoolValues + from third in BoolValues select new object[] { first, second, third }; } } diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ClientCertificates.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ClientCertificates.cs index a17334e247f3..69685b9f40bb 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ClientCertificates.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ClientCertificates.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Net.Security; diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Cookies.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Cookies.cs index 3fa53fe5a9be..0efb77153765 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Cookies.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Cookies.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics; @@ -137,7 +136,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync( var requestMessage = new HttpRequestMessage(HttpMethod.Get, uri) { Version = UseVersion }; requestMessage.Headers.Add("Cookie", s_customCookieHeaderValue); - await client.SendAsync(requestMessage); + await client.SendAsync(TestAsync, requestMessage); } }, async server => @@ -160,7 +159,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync( requestMessage.Headers.Add("Cookie", "B=2"); requestMessage.Headers.Add("Cookie", "C=3"); - await client.SendAsync(requestMessage); + await client.SendAsync(TestAsync, requestMessage); } }, async server => @@ -211,7 +210,7 @@ private string GetCookieValue(HttpRequestData request) return cookieHeaderValue; } - [ConditionalFact] + [Fact] public async Task GetAsync_SetCookieContainerAndCookieHeader_BothCookiesSent() { await LoopbackServerFactory.CreateServerAsync(async (server, url) => @@ -224,7 +223,7 @@ await LoopbackServerFactory.CreateServerAsync(async (server, url) => var requestMessage = new HttpRequestMessage(HttpMethod.Get, url) { Version = UseVersion }; requestMessage.Headers.Add("Cookie", s_customCookieHeaderValue); - Task getResponseTask = client.SendAsync(requestMessage); + Task getResponseTask = client.SendAsync(TestAsync, requestMessage); Task serverTask = server.HandleRequestAsync(); await TestHelper.WhenAllCompletedOrAnyFailed(getResponseTask, serverTask); @@ -238,7 +237,7 @@ await LoopbackServerFactory.CreateServerAsync(async (server, url) => }); } - [ConditionalFact] + [Fact] public async Task GetAsync_SetCookieContainerAndMultipleCookieHeaders_BothCookiesSent() { await LoopbackServerFactory.CreateServerAsync(async (server, url) => @@ -252,7 +251,7 @@ await LoopbackServerFactory.CreateServerAsync(async (server, url) => requestMessage.Headers.Add("Cookie", "A=1"); requestMessage.Headers.Add("Cookie", "B=2"); - Task getResponseTask = client.SendAsync(requestMessage); + Task getResponseTask = client.SendAsync(TestAsync, requestMessage); Task serverTask = server.HandleRequestAsync(); await TestHelper.WhenAllCompletedOrAnyFailed(getResponseTask, serverTask); @@ -602,7 +601,7 @@ private static string GenerateCookie(string name, char repeat, int overallHeader public static IEnumerable CookieNamesValuesAndUseCookies() { - foreach (bool useCookies in new[] { true, false }) + foreach (bool useCookies in BoolValues) { yield return new object[] { "ABC", "123", useCookies }; yield return new object[] { "Hello", "World", useCookies }; diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Decompression.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Decompression.cs index fa0b630594b7..7ffddeadb45f 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Decompression.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Decompression.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.IO; @@ -65,6 +64,9 @@ public static IEnumerable DecompressedResponse_MethodSpecified_Decompr } } + private HttpRequestMessage CreateRequest(HttpMethod method, Uri uri, Version version) => + new HttpRequestMessage(method, uri) { Version = version }; + [Theory] [MemberData(nameof(DecompressedResponse_MethodSpecified_DecompressedContentReturned_MemberData))] public async Task DecompressedResponse_MethodSpecified_DecompressedContentReturned( @@ -163,11 +165,17 @@ await server.AcceptConnectionAsync(async connection => [Theory, MemberData(nameof(RemoteServersAndCompressionUris))] public async Task GetAsync_SetAutomaticDecompression_ContentDecompressed(Configuration.Http.RemoteServer remoteServer, Uri uri) { + // Sync API supported only up to HTTP/1.1 + if (!TestAsync && remoteServer.HttpVersion.Major >= 2) + { + return; + } + HttpClientHandler handler = CreateHttpClientHandler(); handler.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate; using (HttpClient client = CreateHttpClientForRemoteServer(remoteServer, handler)) { - using (HttpResponseMessage response = await client.GetAsync(uri)) + using (HttpResponseMessage response = await client.SendAsync(TestAsync, CreateRequest(HttpMethod.Get, uri, remoteServer.HttpVersion))) { Assert.Equal(HttpStatusCode.OK, response.StatusCode); string responseContent = await response.Content.ReadAsStringAsync(); @@ -185,10 +193,16 @@ public async Task GetAsync_SetAutomaticDecompression_ContentDecompressed(Configu [Theory, MemberData(nameof(RemoteServersAndCompressionUris))] public async Task GetAsync_SetAutomaticDecompression_HeadersRemoved(Configuration.Http.RemoteServer remoteServer, Uri uri) { + // Sync API supported only up to HTTP/1.1 + if (!TestAsync && remoteServer.HttpVersion.Major >= 2) + { + return; + } + HttpClientHandler handler = CreateHttpClientHandler(); handler.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate; using (HttpClient client = CreateHttpClientForRemoteServer(remoteServer, handler)) - using (HttpResponseMessage response = await client.GetAsync(uri, HttpCompletionOption.ResponseHeadersRead)) + using (HttpResponseMessage response = await client.SendAsync(TestAsync, CreateRequest(HttpMethod.Get, uri, remoteServer.HttpVersion), HttpCompletionOption.ResponseHeadersRead)) { Assert.Equal(HttpStatusCode.OK, response.StatusCode); @@ -198,7 +212,7 @@ public async Task GetAsync_SetAutomaticDecompression_HeadersRemoved(Configuratio } [Theory] -#if NETCORE +#if NETCOREAPP [InlineData(DecompressionMethods.Brotli, "br", "")] [InlineData(DecompressionMethods.Brotli, "br", "br")] [InlineData(DecompressionMethods.Brotli, "br", "gzip")] @@ -237,7 +251,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) => client.DefaultRequestHeaders.Add("Accept-Encoding", manualAcceptEncodingHeaderValues); } - Task clientTask = client.GetAsync(url); + Task clientTask = client.SendAsync(TestAsync, CreateRequest(HttpMethod.Get, url, UseVersion)); Task> serverTask = server.AcceptConnectionSendResponseAndCloseAsync(); await TaskTimeoutExtensions.WhenAllOrAnyFailed(new Task[] { clientTask, serverTask }); diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.DefaultProxyCredentials.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.DefaultProxyCredentials.cs index ccd32f66a6ad..5db0b7b25b81 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.DefaultProxyCredentials.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.DefaultProxyCredentials.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics; diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxConnectionsPerServer.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxConnectionsPerServer.cs index 8549d38943c1..5cf44f8689e1 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxConnectionsPerServer.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxConnectionsPerServer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Linq; using System.Net.Test.Common; diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs index dd6daf3e3595..3117f52782a0 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Net.Test.Common; @@ -47,15 +46,14 @@ public void ValidValue_SetGet_Roundtrips(int validValue) } } - [ConditionalFact] + [Fact] public async Task SetAfterUse_Throws() { -#if WINHTTPHANDLER_TEST - if (UseVersion >= HttpVersion20.Value) + if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) { - throw new SkipTestException($"Test doesn't support {UseVersion} protocol."); + return; } -#endif + await LoopbackServerFactory.CreateClientAndServerAsync(async uri => { using HttpClientHandler handler = CreateHttpClientHandler(); diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Proxy.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Proxy.cs index 83443ae607a4..ca4c5ce5562a 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Proxy.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Proxy.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Net.Sockets; @@ -26,15 +25,14 @@ public abstract class HttpClientHandler_Proxy_Test : HttpClientHandlerTestBase { public HttpClientHandler_Proxy_Test(ITestOutputHelper output) : base(output) { } - [ConditionalFact] + [Fact] public async Task Dispose_HandlerWithProxy_ProxyNotDisposed() { -#if WINHTTPHANDLER_TEST - if (UseVersion >= HttpVersion20.Value) + if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) { - throw new SkipTestException($"Test doesn't support {UseVersion} protocol."); + return; } -#endif + var proxy = new TrackDisposalProxy(); await LoopbackServerFactory.CreateClientAndServerAsync(async uri => @@ -386,7 +384,7 @@ public static IEnumerable BypassedProxies() public static IEnumerable CredentialsForProxy() { yield return new object[] { null, false }; - foreach (bool wrapCredsInCache in new[] { true, false }) + foreach (bool wrapCredsInCache in BoolValues) { yield return new object[] { new NetworkCredential("username", "password"), wrapCredsInCache }; yield return new object[] { new NetworkCredential("username", "password", "domain"), wrapCredsInCache }; diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ServerCertificates.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ServerCertificates.cs index 85e33a997675..dba69f304dd6 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ServerCertificates.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ServerCertificates.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics; @@ -31,15 +30,14 @@ public abstract partial class HttpClientHandler_ServerCertificates_Test : HttpCl public HttpClientHandler_ServerCertificates_Test(ITestOutputHelper output) : base(output) { } - [ConditionalFact] + [Fact] public void Ctor_ExpectedDefaultValues() { -#if WINHTTPHANDLER_TEST - if (UseVersion > HttpVersion.Version11) + if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) { - throw new SkipTestException($"Test doesn't support {UseVersion} protocol."); + return; } -#endif + using (HttpClientHandler handler = CreateHttpClientHandler()) { Assert.Null(handler.ServerCertificateCustomValidationCallback); @@ -47,15 +45,13 @@ public void Ctor_ExpectedDefaultValues() } } - [ConditionalFact] + [Fact] public void ServerCertificateCustomValidationCallback_SetGet_Roundtrips() { -#if WINHTTPHANDLER_TEST - if (UseVersion > HttpVersion.Version11) + if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) { - throw new SkipTestException($"Test doesn't support {UseVersion} protocol."); + return; } -#endif using (HttpClientHandler handler = CreateHttpClientHandler()) { @@ -182,7 +178,7 @@ public static IEnumerable UseCallback_ValidCertificate_ExpectedValuesD { if (remoteServer.IsSecure) { - foreach (bool checkRevocation in new[] { true, false }) + foreach (bool checkRevocation in BoolValues) { yield return new object[] { remoteServer, diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.SslProtocols.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.SslProtocols.cs index 735642702cde..92845c1a4747 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.SslProtocols.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.SslProtocols.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.IO; diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs index 3852af097f94..e243987445c9 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -223,15 +222,14 @@ public async Task SendAsync_SimpleGet_Success(Configuration.Http.RemoteServer re } } - [ConditionalFact] + [Fact] public async Task GetAsync_IPv6LinkLocalAddressUri_Success() { -#if WINHTTPHANDLER_TEST - if (UseVersion >= HttpVersion20.Value) + if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) { - throw new SkipTestException($"Test doesn't support {UseVersion} protocol."); + return; } -#endif + using (HttpClient client = CreateHttpClient()) { var options = new GenericLoopbackOptions { Address = TestHelper.GetIPv6LinkLocalAddress() }; @@ -250,16 +248,15 @@ await TestHelper.WhenAllCompletedOrAnyFailed( } } - [ConditionalTheory] + [Theory] [MemberData(nameof(GetAsync_IPBasedUri_Success_MemberData))] public async Task GetAsync_IPBasedUri_Success(IPAddress address) { -#if WINHTTPHANDLER_TEST - if (UseVersion >= HttpVersion20.Value) + if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) { - throw new SkipTestException($"Test doesn't support {UseVersion} protocol."); + return; } -#endif + using (HttpClient client = CreateHttpClient()) { var options = new GenericLoopbackOptions { Address = address }; @@ -484,10 +481,10 @@ await LoopbackServer.CreateClientAndServerAsync(async proxyUri => public static IEnumerable SecureAndNonSecure_IPBasedUri_MemberData() => from address in new[] { IPAddress.Loopback, IPAddress.IPv6Loopback } - from useSsl in new[] { true, false } + from useSsl in BoolValues select new object[] { address, useSsl }; - [ConditionalTheory] + [Theory] [MemberData(nameof(SecureAndNonSecure_IPBasedUri_MemberData))] public async Task GetAsync_SecureAndNonSecureIPBasedUri_CorrectlyFormatted(IPAddress address, bool useSsl) { @@ -569,17 +566,16 @@ public async Task GetAsync_ServerNeedsAuthAndNoCredential_StatusCodeUnauthorized } } - [ConditionalTheory] + [Theory] [InlineData("WWW-Authenticate", "CustomAuth")] [InlineData("", "")] // RFC7235 requires servers to send this header with 401 but some servers don't. public async Task GetAsync_ServerNeedsNonStandardAuthAndSetCredential_StatusCodeUnauthorized(string authHeadrName, string authHeaderValue) { -#if WINHTTPHANDLER_TEST - if (UseVersion >= HttpVersion20.Value) + if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) { - throw new SkipTestException($"Test doesn't support {UseVersion} protocol."); + return; } -#endif + await LoopbackServerFactory.CreateServerAsync(async (server, url) => { HttpClientHandler handler = CreateHttpClientHandler(); @@ -754,15 +750,14 @@ await LoopbackServer.CreateClientAndServerAsync(async uri => server.AcceptConnectionSendCustomResponseAndCloseAsync("HTTP/1.1 200 OK\r\nContent-Length: 5\r\n\r\nhe")); } - [ConditionalFact] + [Fact] public async Task PostAsync_ManyDifferentRequestHeaders_SentCorrectly() { -#if WINHTTPHANDLER_TEST - if (UseVersion > HttpVersion.Version11) + if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) { - throw new SkipTestException($"Test doesn't support {UseVersion} protocol."); + return; } -#endif + const string content = "hello world"; // Using examples from https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Request_fields @@ -839,7 +834,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => request.Headers.Add("X-Underscore_Name", "X-Underscore_Name"); request.Headers.Add("X-End", "End"); - (await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead)).Dispose(); + (await client.SendAsync(TestAsync, request, HttpCompletionOption.ResponseHeadersRead)).Dispose(); } }, async server => { @@ -925,7 +920,7 @@ public static IEnumerable GetAsync_ManyDifferentResponseHeaders_Parsed from dribble in new[] { false, true } select new object[] { newline, fold, dribble }; - [ConditionalTheory] + [Theory] [MemberData(nameof(GetAsync_ManyDifferentResponseHeaders_ParsedCorrectly_MemberData))] public async Task GetAsync_ManyDifferentResponseHeaders_ParsedCorrectly(string newline, string fold, bool dribble) { @@ -1059,7 +1054,7 @@ await LoopbackServer.CreateClientAndServerAsync(async uri => dribble ? new LoopbackServer.Options { StreamWrapper = s => new DribbleStream(s) } : null); } - [ConditionalFact] + [Fact] public async Task GetAsync_NonTraditionalChunkSizes_Accepted() { if (LoopbackServerFactory.Version >= HttpVersion20.Value) @@ -1198,7 +1193,7 @@ public async Task SendAsync_TransferEncodingSetButNoRequestContent_Throws() req.Headers.TransferEncodingChunked = true; using (HttpClient c = CreateHttpClient()) { - HttpRequestException error = await Assert.ThrowsAsync(() => c.SendAsync(req)); + HttpRequestException error = await Assert.ThrowsAsync(() => c.SendAsync(TestAsync, req)); Assert.IsType(error.InnerException); } } @@ -1232,10 +1227,16 @@ public async Task GetAsync_ResponseHeadersRead_ReadFromEachIterativelyDoesntDead [Theory, MemberData(nameof(RemoteServersMemberData))] public async Task SendAsync_HttpRequestMsgResponseHeadersRead_StatusCodeOK(Configuration.Http.RemoteServer remoteServer) { + // Sync API supported only up to HTTP/1.1 + if (!TestAsync && remoteServer.HttpVersion.Major >= 2) + { + return; + } + HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, remoteServer.EchoUri) { Version = remoteServer.HttpVersion }; using (HttpClient client = CreateHttpClientForRemoteServer(remoteServer)) { - using (HttpResponseMessage response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead)) + using (HttpResponseMessage response = await client.SendAsync(TestAsync, request, HttpCompletionOption.ResponseHeadersRead)) { string responseContent = await response.Content.ReadAsStringAsync(); _output.WriteLine(responseContent); @@ -1270,7 +1271,7 @@ await connection.ReadRequestHeaderAndSendCustomResponseAsync( using (HttpResponseMessage response = await getResponse) { var buffer = new byte[8000]; - using (Stream clientStream = await response.Content.ReadAsStreamAsync()) + using (Stream clientStream = await response.Content.ReadAsStreamAsync(TestAsync)) { int bytesRead = await clientStream.ReadAsync(buffer, 0, buffer.Length); _output.WriteLine($"Bytes read from stream: {bytesRead}"); @@ -1282,18 +1283,17 @@ await connection.ReadRequestHeaderAndSendCustomResponseAsync( }); } - [ConditionalTheory] + [Theory] [InlineData(true)] [InlineData(false)] [InlineData(null)] public async Task ReadAsStreamAsync_HandlerProducesWellBehavedResponseStream(bool? chunked) { -#if WINHTTPHANDLER_TEST - if (UseVersion >= HttpVersion20.Value) + if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) { - throw new SkipTestException($"Test doesn't support {UseVersion} protocol."); + return; } -#endif + if (LoopbackServerFactory.Version >= HttpVersion20.Value && chunked == true) { // Chunking is not supported on HTTP/2 and later. @@ -1304,11 +1304,11 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => { var request = new HttpRequestMessage(HttpMethod.Get, uri) { Version = UseVersion }; using (var client = new HttpMessageInvoker(CreateHttpClientHandler())) - using (HttpResponseMessage response = await client.SendAsync(request, CancellationToken.None)) + using (HttpResponseMessage response = await client.SendAsync(TestAsync, request, CancellationToken.None)) { - using (Stream responseStream = await response.Content.ReadAsStreamAsync()) + using (Stream responseStream = await response.Content.ReadAsStreamAsync(TestAsync)) { - Assert.Same(responseStream, await response.Content.ReadAsStreamAsync()); + Assert.Same(responseStream, await response.Content.ReadAsStreamAsync(TestAsync)); // Boolean properties returning correct values Assert.True(responseStream.CanRead); @@ -1445,23 +1445,22 @@ await server.AcceptConnectionAsync(async connection => }); } - [ConditionalFact] + [Fact] public async Task ReadAsStreamAsync_EmptyResponseBody_HandlerProducesWellBehavedResponseStream() { -#if WINHTTPHANDLER_TEST - if (UseVersion >= HttpVersion20.Value) + if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) { - throw new SkipTestException($"Test doesn't support {UseVersion} protocol."); + return; } -#endif + await LoopbackServerFactory.CreateClientAndServerAsync(async uri => { using (var client = new HttpMessageInvoker(CreateHttpClientHandler())) { var request = new HttpRequestMessage(HttpMethod.Get, uri) { Version = UseVersion }; - using (HttpResponseMessage response = await client.SendAsync(request, CancellationToken.None)) - using (Stream responseStream = await response.Content.ReadAsStreamAsync()) + using (HttpResponseMessage response = await client.SendAsync(TestAsync, request, CancellationToken.None)) + using (Stream responseStream = await response.Content.ReadAsStreamAsync(TestAsync)) { // Boolean properties returning correct values Assert.True(responseStream.CanRead); @@ -1536,15 +1535,15 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => }, server => server.AcceptConnectionSendResponseAndCloseAsync()); } - [ConditionalFact] + + [Fact] public async Task Dispose_DisposingHandlerCancelsActiveOperationsWithoutResponses() { -#if WINHTTPHANDLER_TEST - if (UseVersion >= HttpVersion20.Value) + if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) { - throw new SkipTestException($"Test doesn't support {UseVersion} protocol."); + return; } -#endif + await LoopbackServerFactory.CreateServerAsync(async (server1, url1) => { await LoopbackServerFactory.CreateServerAsync(async (server2, url2) => @@ -1734,7 +1733,7 @@ public static IEnumerable VerifyUploadServersStreamsAndExpectedData get { foreach (Configuration.Http.RemoteServer remoteServer in Configuration.Http.RemoteServers) // target server - foreach (bool syncCopy in new[] { true, false }) // force the content copy to happen via Read/Write or ReadAsync/WriteAsync + foreach (bool syncCopy in BoolValues) // force the content copy to happen via Read/Write or ReadAsync/WriteAsync { byte[] data = new byte[1234]; new Random(42).NextBytes(data); @@ -1866,36 +1865,42 @@ public async Task PostAsync_CallMethod_EmptyContent(Configuration.Http.RemoteSer } } + public static IEnumerable ExpectContinueVersion() + { + return + from expect in new bool?[] {true, false, null} + from version in new Version[] {new Version(1, 0), new Version(1, 1), new Version(2, 0)} + select new object[] {expect, version}; + } + [OuterLoop("Uses external server")] [Theory] - [InlineData(false, "1.0")] - [InlineData(true, "1.0")] - [InlineData(null, "1.0")] - [InlineData(false, "1.1")] - [InlineData(true, "1.1")] - [InlineData(null, "1.1")] - [InlineData(false, "2.0")] - [InlineData(true, "2.0")] - [InlineData(null, "2.0")] - public async Task PostAsync_ExpectContinue_Success(bool? expectContinue, string version) + [MemberData(nameof(ExpectContinueVersion))] + public async Task PostAsync_ExpectContinue_Success(bool? expectContinue, Version version) { + // Sync API supported only up to HTTP/1.1 + if (!TestAsync && version.Major >= 2) + { + return; + } + using (HttpClient client = CreateHttpClient()) { - var req = new HttpRequestMessage(HttpMethod.Post, version == "2.0" ? Configuration.Http.Http2RemoteEchoServer : Configuration.Http.RemoteEchoServer) + var req = new HttpRequestMessage(HttpMethod.Post, version.Major == 2 ? Configuration.Http.Http2RemoteEchoServer : Configuration.Http.RemoteEchoServer) { Content = new StringContent("Test String", Encoding.UTF8), - Version = new Version(version) + Version = version }; req.Headers.ExpectContinue = expectContinue; - using (HttpResponseMessage response = await client.SendAsync(req)) + using (HttpResponseMessage response = await client.SendAsync(TestAsync, req)) { Assert.Equal(HttpStatusCode.OK, response.StatusCode); if (!IsWinHttpHandler) { const string ExpectedReqHeader = "\"Expect\": \"100-continue\""; - if (expectContinue == true && (version == "1.1" || version == "2.0")) + if (expectContinue == true && (version >= new Version(1, 1))) { Assert.Contains(ExpectedReqHeader, await response.Content.ReadAsStringAsync()); } @@ -1908,15 +1913,14 @@ public async Task PostAsync_ExpectContinue_Success(bool? expectContinue, string } } - [ConditionalFact] + [Fact] public async Task GetAsync_ExpectContinueTrue_NoContent_StillSendsHeader() { -#if WINHTTPHANDLER_TEST - if (UseVersion >= HttpVersion20.Value) + if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) { - throw new SkipTestException($"Test doesn't support {UseVersion} protocol."); + return; } -#endif + const string ExpectedContent = "Hello, expecting and continuing world."; var clientCompleted = new TaskCompletionSource(); await LoopbackServerFactory.CreateClientAndServerAsync(async uri => @@ -1953,16 +1957,15 @@ public static IEnumerable Interim1xxStatusCode() yield return new object[] { (HttpStatusCode) 199 }; } - [ConditionalTheory] + [Theory] [MemberData(nameof(Interim1xxStatusCode))] public async Task SendAsync_1xxResponsesWithHeaders_InterimResponsesHeadersIgnored(HttpStatusCode responseStatusCode) { -#if WINHTTPHANDLER_TEST - if (UseVersion >= HttpVersion20.Value) + if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) { - throw new SkipTestException($"Test doesn't support {UseVersion} protocol."); + return; } -#endif + var clientFinished = new TaskCompletionSource(); const string TestString = "test"; const string CookieHeaderExpected = "yummy_cookie=choco"; @@ -1980,7 +1983,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => HttpRequestMessage initialMessage = new HttpRequestMessage(HttpMethod.Post, uri) { Version = UseVersion }; initialMessage.Content = new StringContent(TestString); initialMessage.Headers.ExpectContinue = true; - HttpResponseMessage response = await client.SendAsync(initialMessage); + HttpResponseMessage response = await client.SendAsync(TestAsync, initialMessage); // Verify status code. Assert.Equal(HttpStatusCode.OK, response.StatusCode); @@ -2023,16 +2026,15 @@ await server.AcceptConnectionAsync(async connection => }); } - [ConditionalTheory] + [Theory] [MemberData(nameof(Interim1xxStatusCode))] public async Task SendAsync_Unexpected1xxResponses_DropAllInterimResponses(HttpStatusCode responseStatusCode) { -#if WINHTTPHANDLER_TEST - if (UseVersion >= HttpVersion20.Value) + if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) { - throw new SkipTestException($"Test doesn't support {UseVersion} protocol."); + return; } -#endif + var clientFinished = new TaskCompletionSource(); const string TestString = "test"; @@ -2044,7 +2046,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => initialMessage.Content = new StringContent(TestString); // No ExpectContinue header. initialMessage.Headers.ExpectContinue = false; - HttpResponseMessage response = await client.SendAsync(initialMessage); + HttpResponseMessage response = await client.SendAsync(TestAsync, initialMessage); Assert.Equal(HttpStatusCode.OK, response.StatusCode); clientFinished.SetResult(true); @@ -2069,15 +2071,14 @@ await server.AcceptConnectionAsync(async connection => }); } - [ConditionalFact] + [Fact] public async Task SendAsync_MultipleExpected100Responses_ReceivesCorrectResponse() { -#if WINHTTPHANDLER_TEST - if (UseVersion >= HttpVersion20.Value) + if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) { - throw new SkipTestException($"Test doesn't support {UseVersion} protocol."); + return; } -#endif + var clientFinished = new TaskCompletionSource(); const string TestString = "test"; @@ -2088,7 +2089,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => HttpRequestMessage initialMessage = new HttpRequestMessage(HttpMethod.Post, uri) { Version = UseVersion }; initialMessage.Content = new StringContent(TestString); initialMessage.Headers.ExpectContinue = true; - HttpResponseMessage response = await client.SendAsync(initialMessage); + HttpResponseMessage response = await client.SendAsync(TestAsync, initialMessage); Assert.Equal(HttpStatusCode.OK, response.StatusCode); clientFinished.SetResult(true); @@ -2114,15 +2115,14 @@ await server.AcceptConnectionAsync(async connection => }); } - [ConditionalFact] + [Fact] public async Task SendAsync_No100ContinueReceived_RequestBodySentEventually() { -#if WINHTTPHANDLER_TEST - if (UseVersion >= HttpVersion20.Value) + if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) { - throw new SkipTestException($"Test doesn't support {UseVersion} protocol."); + return; } -#endif + var clientFinished = new TaskCompletionSource(); const string RequestString = "request"; const string ResponseString = "response"; @@ -2134,7 +2134,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => HttpRequestMessage initialMessage = new HttpRequestMessage(HttpMethod.Post, uri) { Version = UseVersion }; initialMessage.Content = new StringContent(RequestString); initialMessage.Headers.ExpectContinue = true; - using (HttpResponseMessage response = await client.SendAsync(initialMessage)) + using (HttpResponseMessage response = await client.SendAsync(TestAsync, initialMessage)) { Assert.Equal(HttpStatusCode.OK, response.StatusCode); Assert.Equal(ResponseString, await response.Content.ReadAsStringAsync()); @@ -2160,7 +2160,7 @@ await server.AcceptConnectionAsync(async connection => }); } - [ConditionalFact] + [Fact] public async Task SendAsync_101SwitchingProtocolsResponse_Success() { // WinHttpHandler and CurlHandler will hang, waiting for additional response. @@ -2377,7 +2377,7 @@ public async Task SendAsync_SendRequestUsingMethodToEchoServerWithNoContent_Meth new HttpMethod(method), serverUri) { Version = UseVersion }; - using (HttpResponseMessage response = await client.SendAsync(request)) + using (HttpResponseMessage response = await client.SendAsync(TestAsync, request)) { Assert.Equal(HttpStatusCode.OK, response.StatusCode); TestHelper.VerifyRequestMethod(response, method); @@ -2397,7 +2397,7 @@ public async Task SendAsync_SendRequestUsingMethodToEchoServerWithContent_Succes new HttpMethod(method), serverUri) { Version = UseVersion }; request.Content = new StringContent(ExpectedContent); - using (HttpResponseMessage response = await client.SendAsync(request)) + using (HttpResponseMessage response = await client.SendAsync(TestAsync, request)) { Assert.Equal(HttpStatusCode.OK, response.StatusCode); TestHelper.VerifyRequestMethod(response, method); @@ -2430,7 +2430,7 @@ public async Task SendAsync_SendSameRequestMultipleTimesDirectlyOnHandler_Succes for (int iter = 0; iter < 2; iter++) { - using (HttpResponseMessage response = await handler.SendAsync(request, CancellationToken.None)) + using (HttpResponseMessage response = await handler.SendAsync(TestAsync, request, CancellationToken.None)) { Assert.Equal(HttpStatusCode.OK, response.StatusCode); @@ -2464,7 +2464,7 @@ public async Task SendAsync_SendRequestUsingNoBodyMethodToEchoServerWithContent_ Version = UseVersion }; - using (HttpResponseMessage response = await client.SendAsync(request)) + using (HttpResponseMessage response = await client.SendAsync(TestAsync, request)) { if (method == "TRACE") { @@ -2491,7 +2491,7 @@ public async Task SendAsync_SendRequestUsingNoBodyMethodToEchoServerWithContent_ public async Task SendAsync_RequestVersion10_ServerReceivesVersion10Request() { // Test is not supported for WinHttpHandler and HTTP/2 - if(IsWinHttpHandler && UseVersion >= HttpVersion20.Value) + if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) { return; } @@ -2529,6 +2529,12 @@ public async Task SendAsync_RequestVersionNotSpecified_ServerReceivesVersion11Re [MemberData(nameof(Http2Servers))] public async Task SendAsync_RequestVersion20_ResponseVersion20IfHttp2Supported(Uri server) { + // Sync API supported only up to HTTP/1.1 + if (!TestAsync) + { + return; + } + // We don't currently have a good way to test whether HTTP/2 is supported without // using the same mechanism we're trying to test, so for now we allow both 2.0 and 1.1 responses. var request = new HttpRequestMessage(HttpMethod.Get, server); @@ -2539,7 +2545,7 @@ public async Task SendAsync_RequestVersion20_ResponseVersion20IfHttp2Supported(U // It is generally expected that the test hosts will be trusted, so we don't register a validation // callback in the usual case. - using (HttpResponseMessage response = await client.SendAsync(request)) + using (HttpResponseMessage response = await client.SendAsync(TestAsync, request)) { Assert.Equal(HttpStatusCode.OK, response.StatusCode); Assert.True( @@ -2550,20 +2556,25 @@ public async Task SendAsync_RequestVersion20_ResponseVersion20IfHttp2Supported(U } } - [ConditionalFact] + [Fact] public async Task SendAsync_RequestVersion20_HttpNotHttps_NoUpgradeRequest() { -#if WINHTTPHANDLER_TEST - if (UseVersion >= HttpVersion20.Value) + if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) { - throw new SkipTestException($"Test doesn't support {UseVersion} protocol."); + return; } -#endif + + // Sync API supported only up to HTTP/1.1 + if (!TestAsync) + { + return; + } + await LoopbackServerFactory.CreateClientAndServerAsync(async uri => { using (HttpClient client = CreateHttpClient()) { - (await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, uri) { Version = new Version(2, 0) })).Dispose(); + (await client.SendAsync(TestAsync, new HttpRequestMessage(HttpMethod.Get, uri) { Version = new Version(2, 0) })).Dispose(); } }, async server => { @@ -2576,13 +2587,19 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => [ConditionalTheory(nameof(IsWindows10Version1607OrGreater)), MemberData(nameof(Http2NoPushServers))] public async Task SendAsync_RequestVersion20_ResponseVersion20(Uri server) { + // Sync API supported only up to HTTP/1.1 + if (!TestAsync) + { + return; + } + _output.WriteLine(server.AbsoluteUri.ToString()); var request = new HttpRequestMessage(HttpMethod.Get, server); request.Version = new Version(2, 0); using (HttpClient client = CreateHttpClient()) { - using (HttpResponseMessage response = await client.SendAsync(request)) + using (HttpResponseMessage response = await client.SendAsync(TestAsync, request)) { Assert.Equal(HttpStatusCode.OK, response.StatusCode); Assert.Equal(new Version(2, 0), response.Version); @@ -2601,7 +2618,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) => using (HttpClient client = CreateHttpClient()) { - Task getResponse = client.SendAsync(request); + Task getResponse = client.SendAsync(TestAsync, request); Task> serverTask = server.AcceptConnectionSendResponseAndCloseAsync(); await TestHelper.WhenAllCompletedOrAnyFailed(getResponse, serverTask); @@ -2624,7 +2641,6 @@ await LoopbackServer.CreateServerAsync(async (server, url) => { Assert.True(false, "Invalid HTTP request version"); } - } }); @@ -2633,15 +2649,14 @@ await LoopbackServer.CreateServerAsync(async (server, url) => #endregion #region Uri wire transmission encoding tests - [ConditionalFact] + [Fact] public async Task SendRequest_UriPathHasReservedChars_ServerReceivedExpectedPath() { -#if WINHTTPHANDLER_TEST - if (UseVersion >= HttpVersion20.Value) + if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) { - throw new SkipTestException($"Test doesn't support {UseVersion} protocol."); + return; } -#endif + await LoopbackServerFactory.CreateServerAsync(async (server, rootUrl) => { var uri = new Uri($"{rootUrl.Scheme}://{rootUrl.Host}:{rootUrl.Port}/test[]"); diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTestBase.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTestBase.cs index 003e344d7404..9d0e62ea4f44 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTestBase.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTestBase.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; +using System.Diagnostics; using System.IO; using System.Net.Test.Common; using System.Threading; @@ -24,6 +24,8 @@ public abstract partial class HttpClientHandlerTestBase : FileCleanupTestBase protected virtual Version UseVersion => HttpVersion.Version11; + protected virtual bool TestAsync => true; + public HttpClientHandlerTestBase(ITestOutputHelper output) { _output = output; @@ -69,8 +71,9 @@ protected static LoopbackServerFactory GetFactoryForVersion(Version useVersion) }; } - // For use by remote server tests + public static readonly bool[] BoolValues = new[] { true, false }; + // For use by remote server tests public static readonly IEnumerable RemoteServersMemberData = Configuration.Http.RemoteServersMemberData; protected HttpClient CreateHttpClientForRemoteServer(Configuration.Http.RemoteServer remoteServer) @@ -106,6 +109,25 @@ public VersionCheckerHttpHandler(HttpMessageHandler innerHandler, Version expect _expectedVersion = expectedVersion; } +#if NETCOREAPP + protected override HttpResponseMessage Send(HttpRequestMessage request, CancellationToken cancellationToken) + { + if (request.Version != _expectedVersion) + { + throw new Exception($"Unexpected request version: expected {_expectedVersion}, saw {request.Version}"); + } + + HttpResponseMessage response = base.Send(request, cancellationToken); + + if (response.Version != _expectedVersion) + { + throw new Exception($"Unexpected response version: expected {_expectedVersion}, saw {response.Version}"); + } + + return response; + } +#endif + protected override async Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) { if (request.Version != _expectedVersion) @@ -124,4 +146,74 @@ protected override async Task SendAsync(HttpRequestMessage } } } + + public static class HttpClientExtensions + { + public static Task SendAsync(this HttpClient client, bool async, HttpRequestMessage request, HttpCompletionOption completionOption = default, CancellationToken cancellationToken = default) + { + if (async) + { + return client.SendAsync(request, completionOption, cancellationToken); + } + else + { +#if NETCOREAPP + // Note that the sync call must be done on a different thread because it blocks until the server replies. + // However, the server-side of the request handling is in many cases invoked after the client, thus deadlocking the test. + return Task.Run(() => client.Send(request, completionOption, cancellationToken)); +#else + // Framework won't ever have the sync API. + // This shouldn't be called due to AsyncBoolValues returning only true on Framework. + Debug.Fail("Framework doesn't have Sync API and it shouldn't be attempted to be tested."); + throw new Exception("Shouldn't be reachable"); +#endif + } + } + + public static Task SendAsync(this HttpMessageInvoker invoker, bool async, HttpRequestMessage request, CancellationToken cancellationToken = default) + { + if (async) + { + return invoker.SendAsync(request, cancellationToken); + } + else + { +#if NETCOREAPP + // Note that the sync call must be done on a different thread because it blocks until the server replies. + // However, the server-side of the request handling is in many cases invoked after the client, thus deadlocking the test. + return Task.Run(() => invoker.Send(request, cancellationToken)); +#else + // Framework won't ever have the sync API. + // This shouldn't be called due to AsyncBoolValues returning only true on Framework. + Debug.Fail("Framework doesn't have Sync API and it shouldn't be attempted to be tested."); + throw new Exception("Shouldn't be reachable"); +#endif + } + } + + public static Task ReadAsStreamAsync(this HttpContent content, bool async, CancellationToken cancellationToken = default) + { + if (async) + { +#if NETCOREAPP + // No CancellationToken accepting overload on NETFX. + return content.ReadAsStreamAsync(cancellationToken); +#else + return content.ReadAsStreamAsync(); +#endif + + } + else + { +#if NETCOREAPP + return Task.FromResult(content.ReadAsStream(cancellationToken)); +#else + // Framework won't ever have the sync API. + // This shouldn't be called due to AsyncBoolValues returning only true on Framework. + Debug.Fail("Framework doesn't have Sync API and it shouldn't be attempted to be tested."); + throw new Exception("Shouldn't be reachable"); +#endif + } + } + } } diff --git a/src/libraries/Common/tests/System/Net/Http/HttpMessageHandlerLoopbackServer.cs b/src/libraries/Common/tests/System/Net/Http/HttpMessageHandlerLoopbackServer.cs new file mode 100644 index 000000000000..5379ad2c3c54 --- /dev/null +++ b/src/libraries/Common/tests/System/Net/Http/HttpMessageHandlerLoopbackServer.cs @@ -0,0 +1,102 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Collections.Generic; +using System.IO; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Xunit; + +namespace System.Net.Test.Common +{ + public class HttpMessageHandlerLoopbackServer : GenericLoopbackServer + { + HttpRequestMessage _request; + public HttpStatusCode ResponseStatusCode; + public IList ResponseHeaders; + public string ReponseContentString; + public byte[] ReponseContentBytes; + + private HttpMessageHandlerLoopbackServer(HttpRequestMessage request) + { + _request = request; + } + + public static async Task CreateClientAndServerAsync(Func clientFunc, Func serverFunc) + { + await clientFunc(new LoopbackServerHttpMessageHandler(serverFunc), new Uri("http://example.com")).ConfigureAwait(false); + } + + public async override Task HandleRequestAsync(HttpStatusCode statusCode = HttpStatusCode.OK, IList headers = null, string content = "") + { + ResponseStatusCode = statusCode; + ResponseHeaders = headers; + ReponseContentString = content; + return await HttpRequestData.FromHttpRequestMessageAsync(_request).ConfigureAwait(false); + } + + public async Task HandleRequestAsync(HttpStatusCode statusCode, IList headers, byte[] bytes) + { + ResponseStatusCode = statusCode; + ResponseHeaders = headers; + ReponseContentBytes = bytes; + return await HttpRequestData.FromHttpRequestMessageAsync(_request).ConfigureAwait(false); + } + + public override Task AcceptConnectionAsync(Func funcAsync) => throw new NotImplementedException(); + + public override Task EstablishGenericConnectionAsync() => throw new NotImplementedException(); + + public override void Dispose() { } + + class LoopbackServerHttpMessageHandler : HttpMessageHandler + { + Func _serverFunc; + + public LoopbackServerHttpMessageHandler(Func serverFunc) + { + _serverFunc = serverFunc; + } + +#if NETCOREAPP + protected override HttpResponseMessage Send(HttpRequestMessage request, CancellationToken cancellationToken) + { + return SendAsync(request, cancellationToken).GetAwaiter().GetResult(); + } +#endif + + protected override async Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) + { + var server = new HttpMessageHandlerLoopbackServer(request); + await _serverFunc(server).ConfigureAwait(false); + + var response = new HttpResponseMessage(server.ResponseStatusCode); + if (server.ReponseContentString != null) + { + response.Content = new StringContent(server.ReponseContentString); + } + else + { + response.Content = new ByteArrayContent(server.ReponseContentBytes); + } + + foreach (var header in server.ResponseHeaders ?? Array.Empty()) + { + if (String.Equals(header.Name, "Content-Type", StringComparison.InvariantCultureIgnoreCase)) + { + response.Content.Headers.Remove("Content-Type"); + response.Content.Headers.TryAddWithoutValidation("Content-Type", header.Value); + } + else + { + response.Headers.Add(header.Name, header.Value); + } + } + + return response; + } + } + } +} diff --git a/src/libraries/Common/tests/System/Net/Http/HttpProtocolTests.cs b/src/libraries/Common/tests/System/Net/Http/HttpProtocolTests.cs index 635cb2bed65c..0baba0fe43b8 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpProtocolTests.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpProtocolTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.IO; @@ -20,15 +19,14 @@ public abstract class HttpProtocolTests : HttpClientHandlerTestBase public HttpProtocolTests(ITestOutputHelper output) : base(output) { } - [ConditionalFact] + [Fact] public async Task GetAsync_RequestVersion10_Success() { -#if WINHTTPHANDLER_TEST - if (UseVersion > HttpVersion.Version11) + if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) { - throw new SkipTestException($"Test doesn't support {UseVersion} protocol."); + return; } -#endif + await LoopbackServer.CreateServerAsync(async (server, url) => { using (HttpClient client = CreateHttpClient()) @@ -36,7 +34,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) => HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, url); request.Version = HttpVersion.Version10; - Task getResponseTask = client.SendAsync(request); + Task getResponseTask = client.SendAsync(TestAsync, request); Task> serverTask = server.AcceptConnectionSendResponseAndCloseAsync(); await TestHelper.WhenAllCompletedOrAnyFailed(getResponseTask, serverTask); @@ -57,7 +55,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) => HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, url); request.Version = HttpVersion.Version11; - Task getResponseTask = client.SendAsync(request); + Task getResponseTask = client.SendAsync(TestAsync, request); Task> serverTask = server.AcceptConnectionSendResponseAndCloseAsync(); await TestHelper.WhenAllCompletedOrAnyFailed(getResponseTask, serverTask); @@ -81,7 +79,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) => HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, url); request.Version = new Version(0, minorVersion); - Task getResponseTask = client.SendAsync(request); + Task getResponseTask = client.SendAsync(TestAsync, request); Task> serverTask = server.AcceptConnectionSendResponseAndCloseAsync(); if (IsWinHttpHandler) @@ -92,7 +90,8 @@ await LoopbackServer.CreateServerAsync(async (server, url) => } else { - await Assert.ThrowsAsync(() => TestHelper.WhenAllCompletedOrAnyFailed(getResponseTask, serverTask)); + // Await only client side that will throw. Nothing will get to the server side due to this exception thus do not await it at all. + await Assert.ThrowsAsync(() => getResponseTask); } } }, new LoopbackServer.Options { StreamWrapper = GetStream_ClientDisconnectOk}); @@ -108,6 +107,12 @@ await LoopbackServer.CreateServerAsync(async (server, url) => [InlineData(4, 2)] public async Task GetAsync_UnknownRequestVersion_ThrowsOrDegradesTo11(int majorVersion, int minorVersion) { + // Sync API supported only up to HTTP/1.1 + if (!TestAsync && majorVersion >= 2) + { + return; + } + Type exceptionType = null; await LoopbackServer.CreateServerAsync(async (server, url) => @@ -117,7 +122,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) => HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, url); request.Version = new Version(majorVersion, minorVersion); - Task getResponseTask = client.SendAsync(request); + Task getResponseTask = client.SendAsync(TestAsync, request); Task> serverTask = server.AcceptConnectionSendResponseAndCloseAsync(); if (exceptionType == null) @@ -146,7 +151,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) => HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, url); request.Version = HttpVersion.Version11; - Task getResponseTask = client.SendAsync(request); + Task getResponseTask = client.SendAsync(TestAsync, request); Task> serverTask = server.AcceptConnectionSendCustomResponseAndCloseAsync( $"HTTP/1.{responseMinorVersion} 200 OK\r\nConnection: close\r\nDate: {DateTimeOffset.UtcNow:R}\r\nContent-Length: 0\r\n\r\n"); @@ -174,7 +179,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) => HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, url); request.Version = HttpVersion.Version11; - Task getResponseTask = client.SendAsync(request); + Task getResponseTask = client.SendAsync(TestAsync, request); Task> serverTask = server.AcceptConnectionSendCustomResponseAndCloseAsync( $"HTTP/1.{responseMinorVersion} 200 OK\r\nConnection: close\r\nDate: {DateTimeOffset.UtcNow:R}\r\nContent-Length: 0\r\n\r\n"); @@ -213,7 +218,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) => HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, url); request.Version = HttpVersion.Version11; - Task getResponseTask = client.SendAsync(request); + Task getResponseTask = client.SendAsync(TestAsync, request); Task> serverTask = server.AcceptConnectionSendCustomResponseAndCloseAsync( $"HTTP/0.{responseMinorVersion} 200 OK\r\nConnection: close\r\nDate: {DateTimeOffset.UtcNow:R}\r\nContent-Length: 0\r\n\r\n"); @@ -250,7 +255,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) => HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, url); request.Version = HttpVersion.Version11; - Task getResponseTask = client.SendAsync(request); + Task getResponseTask = client.SendAsync(TestAsync, request); Task> serverTask = server.AcceptConnectionSendCustomResponseAndCloseAsync( $"HTTP/{responseMajorVersion}.{responseMinorVersion} 200 OK\r\nConnection: close\r\nDate: {DateTimeOffset.UtcNow:R}\r\nContent-Length: 0\r\n\r\n"); @@ -460,8 +465,8 @@ public async Task GetAsync_Chunked_VaryingSizeChunks_ReceivedCorrectly(int maxCh await LoopbackServer.CreateClientAndServerAsync(async uri => { using (HttpMessageInvoker client = new HttpMessageInvoker(CreateHttpClientHandler())) - using (HttpResponseMessage resp = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, uri) { Version = base.UseVersion }, CancellationToken.None)) - using (Stream respStream = await resp.Content.ReadAsStreamAsync()) + using (HttpResponseMessage resp = await client.SendAsync(TestAsync, new HttpRequestMessage(HttpMethod.Get, uri) { Version = base.UseVersion }, CancellationToken.None)) + using (Stream respStream = await resp.Content.ReadAsStreamAsync(TestAsync)) { var actualData = new MemoryStream(); @@ -512,6 +517,12 @@ await server.AcceptConnectionAsync(async connection => [InlineData("head", "HEAD")] [InlineData("post", "POST")] [InlineData("put", "PUT")] + [InlineData("delete", "DELETE")] + [InlineData("options", "OPTIONS")] + [InlineData("trace", "TRACE")] +#if !WINHTTPHANDLER_TEST + [InlineData("patch", "PATCH")] +#endif [InlineData("other", "other")] [InlineData("SometHING", "SometHING")] public async Task CustomMethod_SentUppercasedIfKnown(string specifiedMethod, string expectedMethod) @@ -521,7 +532,7 @@ await LoopbackServer.CreateClientAndServerAsync(async uri => using (HttpClient client = CreateHttpClient()) { var m = new HttpRequestMessage(new HttpMethod(specifiedMethod), uri) { Version = UseVersion }; - (await client.SendAsync(m)).Dispose(); + (await client.SendAsync(TestAsync, m)).Dispose(); } }, async server => { diff --git a/src/libraries/Common/tests/System/Net/Http/HttpRetryProtocolTests.cs b/src/libraries/Common/tests/System/Net/Http/HttpRetryProtocolTests.cs index 8f6808e17da1..61a291ef0467 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpRetryProtocolTests.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpRetryProtocolTests.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.IO; using System.Net.Sockets; using System.Net.Test.Common; using System.Text; +using System.Threading; using System.Threading.Tasks; using Xunit; using Xunit.Abstractions; @@ -89,7 +89,7 @@ await LoopbackServer.CreateClientAndServerAsync(async url => var request = new HttpRequestMessage(HttpMethod.Post, url) { Version = UseVersion }; request.Headers.ExpectContinue = true; request.Content = new SynchronizedSendContent(contentSending, connectionClosed.Task); - await Assert.ThrowsAsync(() => client.SendAsync(request)); + await Assert.ThrowsAsync(() => client.SendAsync(TestAsync, request)); } }, async server => @@ -126,6 +126,11 @@ public SynchronizedSendContent(TaskCompletionSource sendingContent, Task c _sendingContent = sendingContent; } +#if NETCOREAPP + protected override void SerializeToStream(Stream stream, TransportContext context, CancellationToken cancellationToken) => + SerializeToStreamAsync(stream, context).GetAwaiter().GetResult(); +#endif + protected override async Task SerializeToStreamAsync(Stream stream, TransportContext context) { _sendingContent.SetResult(true); diff --git a/src/libraries/Common/tests/System/Net/Http/HuffmanDecoder.cs b/src/libraries/Common/tests/System/Net/Http/HuffmanDecoder.cs index eff310273c4e..100b839ee367 100644 --- a/src/libraries/Common/tests/System/Net/Http/HuffmanDecoder.cs +++ b/src/libraries/Common/tests/System/Net/Http/HuffmanDecoder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.Test.Common { diff --git a/src/libraries/Common/tests/System/Net/Http/HuffmanEncoder.cs b/src/libraries/Common/tests/System/Net/Http/HuffmanEncoder.cs index 6c6bbe1eb7d9..9b14070f4737 100644 --- a/src/libraries/Common/tests/System/Net/Http/HuffmanEncoder.cs +++ b/src/libraries/Common/tests/System/Net/Http/HuffmanEncoder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.Test.Common { diff --git a/src/libraries/Common/tests/System/Net/Http/IdnaProtocolTests.cs b/src/libraries/Common/tests/System/Net/Http/IdnaProtocolTests.cs index 0d4167f7d7ce..d3889a769de0 100644 --- a/src/libraries/Common/tests/System/Net/Http/IdnaProtocolTests.cs +++ b/src/libraries/Common/tests/System/Net/Http/IdnaProtocolTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Net.Test.Common; @@ -74,7 +73,7 @@ await LoopbackServer.CreateServerAsync(async (server, serverUrl) => var request = new HttpRequestMessage(HttpMethod.Get, serverUrl) { Version = UseVersion }; request.Headers.Host = hostname; request.Headers.Referrer = uri; - Task getResponseTask = client.SendAsync(request); + Task getResponseTask = client.SendAsync(TestAsync, request); Task> serverTask = server.AcceptConnectionSendResponseAndCloseAsync(); await TestHelper.WhenAllCompletedOrAnyFailed(getResponseTask, serverTask); diff --git a/src/libraries/Common/tests/System/Net/Http/LoopbackProxyServer.cs b/src/libraries/Common/tests/System/Net/Http/LoopbackProxyServer.cs index 690a98c32696..2429e0302d9f 100644 --- a/src/libraries/Common/tests/System/Net/Http/LoopbackProxyServer.cs +++ b/src/libraries/Common/tests/System/Net/Http/LoopbackProxyServer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Concurrent; diff --git a/src/libraries/Common/tests/System/Net/Http/LoopbackServer.AuthenticationHelpers.cs b/src/libraries/Common/tests/System/Net/Http/LoopbackServer.AuthenticationHelpers.cs index 426412137e83..bfb2ccb46be1 100644 --- a/src/libraries/Common/tests/System/Net/Http/LoopbackServer.AuthenticationHelpers.cs +++ b/src/libraries/Common/tests/System/Net/Http/LoopbackServer.AuthenticationHelpers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics; diff --git a/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs b/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs index 97a93b34af28..208f9d7f29fa 100644 --- a/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs +++ b/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.IO; @@ -94,7 +93,12 @@ public async Task EstablishConnectionAsync() Socket s = await _listenSocket.AcceptAsync().ConfigureAwait(false); try { - s.NoDelay = true; + try + { + s.NoDelay = true; + } + // OSX can throw if socket is in weird state during close or cancellation + catch (SocketException ex) when (ex.SocketErrorCode == SocketError.InvalidArgument && PlatformDetection.IsOSXLike) { } Stream stream = new NetworkStream(s, ownsSocket: false); if (_options.UseSsl) diff --git a/src/libraries/Common/tests/System/Net/Http/PostScenarioTest.cs b/src/libraries/Common/tests/System/Net/Http/PostScenarioTest.cs index 34de8fffac58..f547766ed5d2 100644 --- a/src/libraries/Common/tests/System/Net/Http/PostScenarioTest.cs +++ b/src/libraries/Common/tests/System/Net/Http/PostScenarioTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.IO; @@ -181,6 +180,12 @@ public async Task PostRewindableContentUsingAuth_NoPreAuthenticate_Success(Confi [Theory, MemberData(nameof(RemoteServersMemberData))] public async Task PostNonRewindableContentUsingAuth_NoPreAuthenticate_ThrowsHttpRequestException(Configuration.Http.RemoteServer remoteServer) { + // Sync API supported only up to HTTP/1.1 + if (!TestAsync && remoteServer.HttpVersion.Major >= 2) + { + return; + } + HttpContent content = new StreamContent(new CustomContent.CustomStream(Encoding.UTF8.GetBytes(ExpectedContent), false)); var credential = new NetworkCredential(UserName, Password); await Assert.ThrowsAsync(() => @@ -191,6 +196,12 @@ await Assert.ThrowsAsync(() => [Theory, MemberData(nameof(RemoteServersMemberData))] public async Task PostNonRewindableContentUsingAuth_PreAuthenticate_Success(Configuration.Http.RemoteServer remoteServer) { + // Sync API supported only up to HTTP/1.1 + if (!TestAsync && remoteServer.HttpVersion.Major >= 2) + { + return; + } + HttpContent content = new StreamContent(new CustomContent.CustomStream(Encoding.UTF8.GetBytes(ExpectedContent), false)); var credential = new NetworkCredential(UserName, Password); await PostUsingAuthHelper(remoteServer, ExpectedContent, content, credential, preAuthenticate: true); @@ -265,7 +276,7 @@ private async Task PostUsingAuthHelper( // Send HEAD request to help bypass the 401 auth challenge for the latter POST assuming // that the authentication will be cached and re-used later when PreAuthenticate is true. var request = new HttpRequestMessage(HttpMethod.Head, serverUri) { Version = remoteServer.HttpVersion }; - using (HttpResponseMessage response = await client.SendAsync(request)) + using (HttpResponseMessage response = await client.SendAsync(TestAsync, request)) { Assert.Equal(HttpStatusCode.OK, response.StatusCode); } @@ -276,7 +287,7 @@ private async Task PostUsingAuthHelper( requestContent.Headers.ContentLength = null; request.Headers.TransferEncodingChunked = true; - using (HttpResponseMessage response = await client.SendAsync(request)) + using (HttpResponseMessage response = await client.SendAsync(TestAsync, request)) { Assert.Equal(HttpStatusCode.OK, response.StatusCode); string responseContent = await response.Content.ReadAsStringAsync(); diff --git a/src/libraries/Common/tests/System/Net/Http/QPackTestDecoder.cs b/src/libraries/Common/tests/System/Net/Http/QPackTestDecoder.cs index 432b868b3352..feda8109688c 100644 --- a/src/libraries/Common/tests/System/Net/Http/QPackTestDecoder.cs +++ b/src/libraries/Common/tests/System/Net/Http/QPackTestDecoder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Linq; using System.Numerics; diff --git a/src/libraries/Common/tests/System/Net/Http/QPackTestEncoder.cs b/src/libraries/Common/tests/System/Net/Http/QPackTestEncoder.cs index a05ce29eb0c0..3df439e4dfa5 100644 --- a/src/libraries/Common/tests/System/Net/Http/QPackTestEncoder.cs +++ b/src/libraries/Common/tests/System/Net/Http/QPackTestEncoder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Text; diff --git a/src/libraries/Common/tests/System/Net/Http/RepeatedFlushContent.cs b/src/libraries/Common/tests/System/Net/Http/RepeatedFlushContent.cs index 61cbcbe10b6e..06b5776f6c4b 100644 --- a/src/libraries/Common/tests/System/Net/Http/RepeatedFlushContent.cs +++ b/src/libraries/Common/tests/System/Net/Http/RepeatedFlushContent.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Common/tests/System/Net/Http/ResponseStreamTest.cs b/src/libraries/Common/tests/System/Net/Http/ResponseStreamTest.cs index 67812f9cb73f..ffd81ba80bc6 100644 --- a/src/libraries/Common/tests/System/Net/Http/ResponseStreamTest.cs +++ b/src/libraries/Common/tests/System/Net/Http/ResponseStreamTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.IO; @@ -193,7 +192,7 @@ public async Task ReadAsStreamAsync_Cancel_TaskIsCanceled(Configuration.Http.Rem using (HttpClient client = CreateHttpClientForRemoteServer(remoteServer)) using (HttpResponseMessage response = await client.GetAsync(remoteServer.EchoUri, HttpCompletionOption.ResponseHeadersRead)) - using (Stream stream = await response.Content.ReadAsStreamAsync()) + using (Stream stream = await response.Content.ReadAsStreamAsync(TestAsync)) { var buffer = new byte[2048]; Task task = stream.ReadAsync(buffer, 0, buffer.Length, cts.Token); @@ -336,7 +335,7 @@ private async Task ReadAsStreamHelper(Uri serverUri) using (var response = await client.GetAsync( serverUri, HttpCompletionOption.ResponseHeadersRead)) - using (var stream = await response.Content.ReadAsStreamAsync()) + using (var stream = await response.Content.ReadAsStreamAsync(TestAsync)) { var buffer = new byte[1]; while (await stream.ReadAsync(buffer, 0, 1) > 0) ; diff --git a/src/libraries/Common/tests/System/Net/Http/SchSendAuxRecordHttpTest.cs b/src/libraries/Common/tests/System/Net/Http/SchSendAuxRecordHttpTest.cs index b0e3dd596616..0348db4d357b 100644 --- a/src/libraries/Common/tests/System/Net/Http/SchSendAuxRecordHttpTest.cs +++ b/src/libraries/Common/tests/System/Net/Http/SchSendAuxRecordHttpTest.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Net.Test.Common; using System.Security.Authentication; diff --git a/src/libraries/Common/tests/System/Net/Http/SyncBlockingContent.cs b/src/libraries/Common/tests/System/Net/Http/SyncBlockingContent.cs index c39ec0fa1a35..85fef8c2600e 100644 --- a/src/libraries/Common/tests/System/Net/Http/SyncBlockingContent.cs +++ b/src/libraries/Common/tests/System/Net/Http/SyncBlockingContent.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Common/tests/System/Net/Http/TestHelper.cs b/src/libraries/Common/tests/System/Net/Http/TestHelper.cs index 3c88a4289089..9cca3a6466d2 100644 --- a/src/libraries/Common/tests/System/Net/Http/TestHelper.cs +++ b/src/libraries/Common/tests/System/Net/Http/TestHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Linq; diff --git a/src/libraries/Common/tests/System/Net/HttpsTestClient.cs b/src/libraries/Common/tests/System/Net/HttpsTestClient.cs index df9b0575f97a..7cc475b1fec6 100644 --- a/src/libraries/Common/tests/System/Net/HttpsTestClient.cs +++ b/src/libraries/Common/tests/System/Net/HttpsTestClient.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Net.Security; using System.Net.Security.Tests; diff --git a/src/libraries/Common/tests/System/Net/HttpsTestServer.cs b/src/libraries/Common/tests/System/Net/HttpsTestServer.cs index bb3a5eee476b..7ea5ad3e5f8e 100644 --- a/src/libraries/Common/tests/System/Net/HttpsTestServer.cs +++ b/src/libraries/Common/tests/System/Net/HttpsTestServer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; using System.Net.Security; diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/config.ps1 b/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/config.ps1 index 14dac932e09d..6a07fe355a53 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/config.ps1 +++ b/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/config.ps1 @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. # # Libraries - Net configuration diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/setup.ps1 b/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/setup.ps1 index 44f06b08f9b7..26544c6ba0ae 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/setup.ps1 +++ b/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/setup.ps1 @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. #Requires -RunAsAdministrator diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/setup_activedirectory_client.ps1 b/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/setup_activedirectory_client.ps1 index f0d7d339d5c0..7a7df93b1851 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/setup_activedirectory_client.ps1 +++ b/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/setup_activedirectory_client.ps1 @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. #Requires -RunAsAdministrator diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/setup_activedirectory_domaincontroller.ps1 b/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/setup_activedirectory_domaincontroller.ps1 index ceeeb363ef15..2687ea5fb27b 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/setup_activedirectory_domaincontroller.ps1 +++ b/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/setup_activedirectory_domaincontroller.ps1 @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. #Requires -RunAsAdministrator diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/setup_certificates.ps1 b/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/setup_certificates.ps1 index c5d1012f4d82..a41139dff18a 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/setup_certificates.ps1 +++ b/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/setup_certificates.ps1 @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. #Requires -RunAsAdministrator diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/setup_client.ps1 b/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/setup_client.ps1 index 621ee06b8845..d605ca59ab28 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/setup_client.ps1 +++ b/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/setup_client.ps1 @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. Param ( [switch] $uninstall=$false diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/setup_common.ps1 b/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/setup_common.ps1 index 746424159702..995b93158156 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/setup_common.ps1 +++ b/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/setup_common.ps1 @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. . .\config.ps1 diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/setup_firewall.ps1 b/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/setup_firewall.ps1 index a9a01820d276..c277f8d47a28 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/setup_firewall.ps1 +++ b/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/setup_firewall.ps1 @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. #Requires -RunAsAdministrator diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/setup_iisserver.ps1 b/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/setup_iisserver.ps1 index e845faab716b..07a4dcbb4011 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/setup_iisserver.ps1 +++ b/src/libraries/Common/tests/System/Net/Prerequisites/Deployment/setup_iisserver.ps1 @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. #Requires -RunAsAdministrator diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/AuthenticationHelper.cs b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/AuthenticationHelper.cs index 248a5b4ee875..e6ce64cbebb3 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/AuthenticationHelper.cs +++ b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/AuthenticationHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/ContentHelper.cs b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/ContentHelper.cs index f17542822135..ba64f862628f 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/ContentHelper.cs +++ b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/ContentHelper.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; @@ -51,4 +50,4 @@ public static byte[] ComputeMD5Hash(byte[] data) } } } -} \ No newline at end of file +} diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/Deflate.ashx.cs b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/Deflate.ashx.cs index 889241ab5d6a..ec90095d7bfe 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/Deflate.ashx.cs +++ b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/Deflate.ashx.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Web; @@ -33,4 +32,4 @@ public bool IsReusable } } } -} \ No newline at end of file +} diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/Echo.ashx.cs b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/Echo.ashx.cs index d0296669b3b0..406193a506f5 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/Echo.ashx.cs +++ b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/Echo.ashx.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Security.Cryptography; diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/EmptyContent.ashx.cs b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/EmptyContent.ashx.cs index fae32f600fff..66c09205cd57 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/EmptyContent.ashx.cs +++ b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/EmptyContent.ashx.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/GZip.ashx.cs b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/GZip.ashx.cs index 157d2f482de2..64b334b32655 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/GZip.ashx.cs +++ b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/GZip.ashx.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Web; @@ -33,4 +32,4 @@ public bool IsReusable } } } -} \ No newline at end of file +} diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/NameValueCollectionConverter.cs b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/NameValueCollectionConverter.cs index 98c70e244e28..d0d78a366bdd 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/NameValueCollectionConverter.cs +++ b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/NameValueCollectionConverter.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Specialized; diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/Properties/AssemblyInfo.cs b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/Properties/AssemblyInfo.cs index f28664733ac0..a32dd585a9ff 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/Properties/AssemblyInfo.cs +++ b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/Properties/AssemblyInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Reflection; using System.Runtime.CompilerServices; diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/Redirect.ashx.cs b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/Redirect.ashx.cs index e1e05544790b..4c6ca5c342d1 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/Redirect.ashx.cs +++ b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/Redirect.ashx.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Web; diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/RequestHelper.cs b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/RequestHelper.cs index a470212651e3..39d5d3cf967e 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/RequestHelper.cs +++ b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/RequestHelper.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net; diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/RequestInformation.cs b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/RequestInformation.cs index b923bef163ec..795f1a18e352 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/RequestInformation.cs +++ b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/RequestInformation.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Specialized; diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/StatusCode.ashx.cs b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/StatusCode.ashx.cs index e491755b71be..02e3165759bf 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/StatusCode.ashx.cs +++ b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/StatusCode.ashx.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Web; diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/Test.ashx.cs b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/Test.ashx.cs index a26c34b53422..ad698047e5d9 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/Test.ashx.cs +++ b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/Test.ashx.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/VerifyUpload.ashx.cs b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/VerifyUpload.ashx.cs index 5d9f5076ed26..67fd31989d83 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/VerifyUpload.ashx.cs +++ b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/VerifyUpload.ashx.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/WebRole.cs b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/WebRole.cs index 8cfd7ac48f9d..faf1a3d4e147 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/WebRole.cs +++ b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/WebRole.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/WebSocket/EchoWebSocket.ashx.cs b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/WebSocket/EchoWebSocket.ashx.cs index 15694ac9e79d..95ea6119f16a 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/WebSocket/EchoWebSocket.ashx.cs +++ b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/WebSocket/EchoWebSocket.ashx.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net.WebSockets; diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/WebSocket/EchoWebSocketHeaders.ashx.cs b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/WebSocket/EchoWebSocketHeaders.ashx.cs index af86d73f56ee..28abef11fbdd 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/WebSocket/EchoWebSocketHeaders.ashx.cs +++ b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/CoreFxNetCloudService/WebServer/WebSocket/EchoWebSocketHeaders.ashx.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Web; diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/buildAndPackage.ps1 b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/buildAndPackage.ps1 index b40c900eb520..bb3828e44833 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/Servers/buildAndPackage.ps1 +++ b/src/libraries/Common/tests/System/Net/Prerequisites/Servers/buildAndPackage.ps1 @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. # Requires Visual Studio Command Prompt # Requires Azure SDK and .NET Framework SDK installed on the build machine. diff --git a/src/libraries/Common/tests/System/Net/RemoteServerQuery.cs b/src/libraries/Common/tests/System/Net/RemoteServerQuery.cs index 6adb6351b9b3..a89fbe8d5413 100644 --- a/src/libraries/Common/tests/System/Net/RemoteServerQuery.cs +++ b/src/libraries/Common/tests/System/Net/RemoteServerQuery.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Threading.Tasks; using Xunit; diff --git a/src/libraries/Common/tests/System/Net/Sockets/Fletcher32.cs b/src/libraries/Common/tests/System/Net/Sockets/Fletcher32.cs index 8183f7da3179..15451b849640 100644 --- a/src/libraries/Common/tests/System/Net/Sockets/Fletcher32.cs +++ b/src/libraries/Common/tests/System/Net/Sockets/Fletcher32.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.Sockets.Tests { diff --git a/src/libraries/Common/tests/System/Net/Sockets/SocketImplementationType.cs b/src/libraries/Common/tests/System/Net/Sockets/SocketImplementationType.cs index 17e40f19be92..e958202a18a1 100644 --- a/src/libraries/Common/tests/System/Net/Sockets/SocketImplementationType.cs +++ b/src/libraries/Common/tests/System/Net/Sockets/SocketImplementationType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.Sockets.Tests { diff --git a/src/libraries/Common/tests/System/Net/Sockets/SocketTestExtensions.cs b/src/libraries/Common/tests/System/Net/Sockets/SocketTestExtensions.cs index f386473f06f8..5d2ef3ee1f09 100644 --- a/src/libraries/Common/tests/System/Net/Sockets/SocketTestExtensions.cs +++ b/src/libraries/Common/tests/System/Net/Sockets/SocketTestExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Threading; diff --git a/src/libraries/Common/tests/System/Net/Sockets/SocketTestServer.cs b/src/libraries/Common/tests/System/Net/Sockets/SocketTestServer.cs index 45632a1c2d94..9950c7de9643 100644 --- a/src/libraries/Common/tests/System/Net/Sockets/SocketTestServer.cs +++ b/src/libraries/Common/tests/System/Net/Sockets/SocketTestServer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.Sockets.Tests { diff --git a/src/libraries/Common/tests/System/Net/Sockets/SocketTestServerAPM.cs b/src/libraries/Common/tests/System/Net/Sockets/SocketTestServerAPM.cs index ee179a224e6a..d8d484f47a7a 100644 --- a/src/libraries/Common/tests/System/Net/Sockets/SocketTestServerAPM.cs +++ b/src/libraries/Common/tests/System/Net/Sockets/SocketTestServerAPM.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Net.Test.Common; diff --git a/src/libraries/Common/tests/System/Net/Sockets/SocketTestServerAsync.cs b/src/libraries/Common/tests/System/Net/Sockets/SocketTestServerAsync.cs index 11d10c6967e1..5db3fa0edd29 100644 --- a/src/libraries/Common/tests/System/Net/Sockets/SocketTestServerAsync.cs +++ b/src/libraries/Common/tests/System/Net/Sockets/SocketTestServerAsync.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Net.Test.Common; diff --git a/src/libraries/Common/tests/System/Net/Sockets/TestSettings.cs b/src/libraries/Common/tests/System/Net/Sockets/TestSettings.cs index 2e51577417e1..fc126133d2c8 100644 --- a/src/libraries/Common/tests/System/Net/Sockets/TestSettings.cs +++ b/src/libraries/Common/tests/System/Net/Sockets/TestSettings.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Threading.Tasks; diff --git a/src/libraries/Common/tests/System/Net/SslProtocolSupport.cs b/src/libraries/Common/tests/System/Net/SslProtocolSupport.cs index de8cf6d6d71d..de9f3818e11e 100644 --- a/src/libraries/Common/tests/System/Net/SslProtocolSupport.cs +++ b/src/libraries/Common/tests/System/Net/SslProtocolSupport.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections; using System.Collections.Generic; diff --git a/src/libraries/Common/tests/System/Net/SslStreamCertificatePolicy.cs b/src/libraries/Common/tests/System/Net/SslStreamCertificatePolicy.cs index 060f86435810..75e65063f49a 100644 --- a/src/libraries/Common/tests/System/Net/SslStreamCertificatePolicy.cs +++ b/src/libraries/Common/tests/System/Net/SslStreamCertificatePolicy.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Security.Cryptography.X509Certificates; diff --git a/src/libraries/Common/tests/System/Net/StreamArrayExtensions.cs b/src/libraries/Common/tests/System/Net/StreamArrayExtensions.cs index 0d21fd2cab84..1a8d1bcf61f2 100644 --- a/src/libraries/Common/tests/System/Net/StreamArrayExtensions.cs +++ b/src/libraries/Common/tests/System/Net/StreamArrayExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/tests/System/Net/TestLogging.cs b/src/libraries/Common/tests/System/Net/TestLogging.cs index 7106ee1cb353..b13a169d50b9 100644 --- a/src/libraries/Common/tests/System/Net/TestLogging.cs +++ b/src/libraries/Common/tests/System/Net/TestLogging.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit.Abstractions; diff --git a/src/libraries/Common/tests/System/Net/TestWebProxies.cs b/src/libraries/Common/tests/System/Net/TestWebProxies.cs index d9c911820720..2bbc05bcc80c 100644 --- a/src/libraries/Common/tests/System/Net/TestWebProxies.cs +++ b/src/libraries/Common/tests/System/Net/TestWebProxies.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Net.Test.Common { diff --git a/src/libraries/Common/tests/System/Net/VerboseTestLogging.cs b/src/libraries/Common/tests/System/Net/VerboseTestLogging.cs index 86047ba30397..45d184724d64 100644 --- a/src/libraries/Common/tests/System/Net/VerboseTestLogging.cs +++ b/src/libraries/Common/tests/System/Net/VerboseTestLogging.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using Xunit.Abstractions; diff --git a/src/libraries/Common/tests/System/Net/VirtualNetwork/VirtualNetwork.cs b/src/libraries/Common/tests/System/Net/VirtualNetwork/VirtualNetwork.cs index 92426c045245..77a4695d0364 100644 --- a/src/libraries/Common/tests/System/Net/VirtualNetwork/VirtualNetwork.cs +++ b/src/libraries/Common/tests/System/Net/VirtualNetwork/VirtualNetwork.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Concurrent; using System.Threading; diff --git a/src/libraries/Common/tests/System/Net/VirtualNetwork/VirtualNetworkStream.cs b/src/libraries/Common/tests/System/Net/VirtualNetwork/VirtualNetworkStream.cs index 9d1e5d16fad0..57705531ec2b 100644 --- a/src/libraries/Common/tests/System/Net/VirtualNetwork/VirtualNetworkStream.cs +++ b/src/libraries/Common/tests/System/Net/VirtualNetwork/VirtualNetworkStream.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; using System.Threading; diff --git a/src/libraries/Common/tests/System/Net/WebSockets/WebSocketCreateTest.cs b/src/libraries/Common/tests/System/Net/WebSockets/WebSocketCreateTest.cs index c5a8f6167683..b48bfb0c183c 100644 --- a/src/libraries/Common/tests/System/Net/WebSockets/WebSocketCreateTest.cs +++ b/src/libraries/Common/tests/System/Net/WebSockets/WebSocketCreateTest.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.IO; diff --git a/src/libraries/Common/tests/System/NonRuntimeType.cs b/src/libraries/Common/tests/System/NonRuntimeType.cs index bb012708a89a..c05394e91fcb 100644 --- a/src/libraries/Common/tests/System/NonRuntimeType.cs +++ b/src/libraries/Common/tests/System/NonRuntimeType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Globalization; using System.Reflection; @@ -46,4 +45,4 @@ public class NonRuntimeType : Type protected override bool IsPointerImpl() => false; protected override bool IsPrimitiveImpl() => false; } -} \ No newline at end of file +} diff --git a/src/libraries/Common/tests/System/ObjectCloner.cs b/src/libraries/Common/tests/System/ObjectCloner.cs index 1aa1f2f4fa0e..c7797a11d933 100644 --- a/src/libraries/Common/tests/System/ObjectCloner.cs +++ b/src/libraries/Common/tests/System/ObjectCloner.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Reflection; diff --git a/src/libraries/Common/tests/System/RandomDataGenerator.cs b/src/libraries/Common/tests/System/RandomDataGenerator.cs index d1322854ff7e..0e8da0b2af1d 100644 --- a/src/libraries/Common/tests/System/RandomDataGenerator.cs +++ b/src/libraries/Common/tests/System/RandomDataGenerator.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Text; diff --git a/src/libraries/Common/tests/System/RandomExtensions.cs b/src/libraries/Common/tests/System/RandomExtensions.cs index 8acd35be5d7a..7c04ad36ab36 100644 --- a/src/libraries/Common/tests/System/RandomExtensions.cs +++ b/src/libraries/Common/tests/System/RandomExtensions.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/tests/System/RealFormatterTestsBase.cs b/src/libraries/Common/tests/System/RealFormatterTestsBase.cs index 179c07dbd862..015188e81f79 100644 --- a/src/libraries/Common/tests/System/RealFormatterTestsBase.cs +++ b/src/libraries/Common/tests/System/RealFormatterTestsBase.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Linq; diff --git a/src/libraries/Common/tests/System/RealParserTestsBase.cs b/src/libraries/Common/tests/System/RealParserTestsBase.cs index fde2b25a4288..12ebf61f7cb5 100644 --- a/src/libraries/Common/tests/System/RealParserTestsBase.cs +++ b/src/libraries/Common/tests/System/RealParserTestsBase.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics; diff --git a/src/libraries/Common/tests/System/Reflection/MockParameterInfo.cs b/src/libraries/Common/tests/System/Reflection/MockParameterInfo.cs index 3eadad22136a..3335507a67f8 100644 --- a/src/libraries/Common/tests/System/Reflection/MockParameterInfo.cs +++ b/src/libraries/Common/tests/System/Reflection/MockParameterInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/libraries/Common/tests/System/Runtime/Serialization/DataContractSerializerHelper.cs b/src/libraries/Common/tests/System/Runtime/Serialization/DataContractSerializerHelper.cs index 2eab9653fe87..164015006109 100644 --- a/src/libraries/Common/tests/System/Runtime/Serialization/DataContractSerializerHelper.cs +++ b/src/libraries/Common/tests/System/Runtime/Serialization/DataContractSerializerHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; using System.Reflection; @@ -46,4 +45,4 @@ internal static T SerializeAndDeserialize(T value, string baseline, DataContr } } -} \ No newline at end of file +} diff --git a/src/libraries/Common/tests/System/Runtime/Serialization/Formatters/BinaryFormatterHelpers.cs b/src/libraries/Common/tests/System/Runtime/Serialization/Formatters/BinaryFormatterHelpers.cs index 0f245d65d33e..c5d92de32d53 100644 --- a/src/libraries/Common/tests/System/Runtime/Serialization/Formatters/BinaryFormatterHelpers.cs +++ b/src/libraries/Common/tests/System/Runtime/Serialization/Formatters/BinaryFormatterHelpers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; using System.Reflection; diff --git a/src/libraries/Common/tests/System/Runtime/Serialization/Utils.cs b/src/libraries/Common/tests/System/Runtime/Serialization/Utils.cs index 282951b9f4f6..ca01381a6dff 100644 --- a/src/libraries/Common/tests/System/Runtime/Serialization/Utils.cs +++ b/src/libraries/Common/tests/System/Runtime/Serialization/Utils.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Concurrent; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesCipherTests.Data.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesCipherTests.Data.cs index 14fe46edcc9d..7f5d931b6304 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesCipherTests.Data.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesCipherTests.Data.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Text; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesCipherTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesCipherTests.cs index 6f23c58b7be6..9d7d3e2439d9 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesCipherTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesCipherTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.IO; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesContractTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesContractTests.cs index 82aa0fc75c9b..2cab256ad661 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesContractTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesContractTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesCornerTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesCornerTests.cs index 2e3aa763098d..ffbbac78c65b 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesCornerTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesCornerTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesFactory.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesFactory.cs index 194a501fdbfc..9d34557bc651 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesFactory.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesFactory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Security.Cryptography.Encryption.Aes.Tests { diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesModeTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesModeTests.cs index 5b98e923953d..34fa904e58f0 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesModeTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesModeTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/DecryptorReusability.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/DecryptorReusability.cs index 03c2c4ac4e03..8daa947dd0cd 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/DecryptorReusability.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/DecryptorReusability.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DES/DESCipherTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DES/DESCipherTests.cs index 7a3d02c92c87..dcfd8ddcd64d 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DES/DESCipherTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DES/DESCipherTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Text; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DES/DESFactory.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DES/DESFactory.cs index 23466ae5d541..5b191ca5ea05 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DES/DESFactory.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DES/DESFactory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Security.Cryptography.Encryption.Des.Tests { diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DES/DesTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DES/DesTests.cs index 9108cea39a32..1600d132b912 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DES/DesTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DES/DesTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Test.Cryptography; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAFactory.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAFactory.cs index 76bea19325a6..9d2b09070dd1 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAFactory.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAFactory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Security.Cryptography.Dsa.Tests { diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAImportExport.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAImportExport.cs index 46e99d052d09..d797d5aafe7e 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAImportExport.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAImportExport.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAKeyFileTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAKeyFileTests.cs index 51b426aaf65d..18f8aed713c8 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAKeyFileTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAKeyFileTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Text; using Test.Cryptography; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAKeyGeneration.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAKeyGeneration.cs index f10e1cd5a04b..8749c0293a44 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAKeyGeneration.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAKeyGeneration.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; @@ -119,4 +118,4 @@ private static int GetSecondMin(KeySizes[] keySizes) return secondMin; } } -} \ No newline at end of file +} diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAKeyPemTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAKeyPemTests.cs index 6029383756ca..53edb8235ff2 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAKeyPemTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAKeyPemTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Text; using Test.Cryptography; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSASignVerify.NistValidation.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSASignVerify.NistValidation.cs index 8adbf8cf18b9..be7c7a8e59c2 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSASignVerify.NistValidation.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSASignVerify.NistValidation.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Test.Cryptography; using Xunit; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSASignVerify.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSASignVerify.cs index 37c6438fa5eb..10c2fd5cbb63 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSASignVerify.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSASignVerify.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; using Test.Cryptography; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSASignatureFormatTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSASignatureFormatTests.cs index ef3c4ce0b2b5..601a743bcdb8 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSASignatureFormatTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSASignatureFormatTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Linq; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSASignatureFormatter.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSASignatureFormatter.cs index e1ce32f1cb33..ccfba9448b2d 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSASignatureFormatter.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSASignatureFormatter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Security.Cryptography.Tests; using Xunit; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSATestData.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSATestData.cs index 9767ed2e3b3a..93871baa3f22 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSATestData.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSATestData.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Text; using Test.Cryptography; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAXml.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAXml.cs index d53ae1de9a2a..438856b6a1f4 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAXml.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAXml.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Xml.Linq; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DsaFamilySignatureFormatTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DsaFamilySignatureFormatTests.cs index d062f7e6e587..e14ed38e2513 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DsaFamilySignatureFormatTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DsaFamilySignatureFormatTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Linq; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/CurveDef.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/CurveDef.cs index 628b175f2c0b..f115632af87b 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/CurveDef.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/CurveDef.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Security.Cryptography.Tests { diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/ECKeyFileTests.LimitedPrivate.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/ECKeyFileTests.LimitedPrivate.cs index ee534fd9cc40..ee8355669526 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/ECKeyFileTests.LimitedPrivate.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/ECKeyFileTests.LimitedPrivate.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Text; using Test.Cryptography; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/ECKeyFileTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/ECKeyFileTests.cs index 80b0d5adab4e..4fd534e937a1 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/ECKeyFileTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/ECKeyFileTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Text; using Test.Cryptography; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/ECKeyPemTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/ECKeyPemTests.cs index b07c29c6b454..79d99867576e 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/ECKeyPemTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/ECKeyPemTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Text; using Test.Cryptography; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/EccTestBase.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/EccTestBase.cs index b13d0e9138ec..16a8cefd8410 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/EccTestBase.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/EccTestBase.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Linq; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/EccTestData.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/EccTestData.cs index 8d3afe1f3c9d..c0e83ba9b8f7 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/EccTestData.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/EccTestData.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Test.Cryptography; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDhKeyFileTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDhKeyFileTests.cs index cc34d55de223..b46c54621328 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDhKeyFileTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDhKeyFileTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Security.Cryptography.Tests; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanFactory.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanFactory.cs index 41718a92a784..f9b19c388fb7 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanFactory.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanFactory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Security.Cryptography.EcDiffieHellman.Tests { diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanKeyPemTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanKeyPemTests.cs index 2e6985a220f8..da1ecb5691fc 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanKeyPemTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanKeyPemTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Security.Cryptography.Tests; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.Hash.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.Hash.cs index 798b95afbe0f..dfca203f4fa1 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.Hash.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.Hash.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using Test.Cryptography; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.Hmac.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.Hmac.cs index 3f2504b7460f..b8ba791ddd78 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.Hmac.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.Hmac.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.ImportExport.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.ImportExport.cs index 10ca45860429..8bf26097f592 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.ImportExport.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.ImportExport.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Security.Cryptography.Tests; using Test.Cryptography; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.NistValidation.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.NistValidation.cs index a245bf41d578..46b2187f7fa8 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.NistValidation.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.NistValidation.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; using System.Security.Cryptography.Tests; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.Tls.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.Tls.cs index d62bb7c63cfc..4bffb87b2dd1 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.Tls.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.Tls.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Text; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.Xml.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.Xml.cs index b16d3fdd98de..edf63c229526 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.Xml.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.Xml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; @@ -18,4 +17,4 @@ public static void TestNotImplementedException() } } } -} \ No newline at end of file +} diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.cs index 15964b3da3d3..98cc21c6250f 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Security.Cryptography.Tests; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaFactory.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaFactory.cs index 221ad59486b2..59d45d3de99c 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaFactory.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaFactory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Security.Cryptography.EcDsa.Tests { diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaImportExport.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaImportExport.cs index 7cecc275506f..0efb211ce9b8 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaImportExport.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaImportExport.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System.Security.Cryptography.Tests; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaKeyFileTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaKeyFileTests.cs index 4a81e807f44a..598ee1405a83 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaKeyFileTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaKeyFileTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Security.Cryptography.Tests; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaKeyPemTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaKeyPemTests.cs index 8358edca90ac..8ab0314eb373 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaKeyPemTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaKeyPemTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Security.Cryptography.Tests; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaSignatureFormatTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaSignatureFormatTests.cs index de3da3f8b141..5d44d03cdced 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaSignatureFormatTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaSignatureFormatTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Linq; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaStub.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaStub.cs index 963ca978113f..b40f4e721a49 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaStub.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaStub.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaTests.NistValidation.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaTests.NistValidation.cs index 13ad91501ca6..3ac4b424cfdc 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaTests.NistValidation.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaTests.NistValidation.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Security.Cryptography.Tests; using Test.Cryptography; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaTests.cs index 0f230c93c50c..4017294f3130 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaTests.netcoreapp.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaTests.netcoreapp.cs index 6b6093a2022e..1b1079914c44 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaTests.netcoreapp.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaTests.netcoreapp.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Security.Cryptography.Tests; using Xunit; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaTestsBase.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaTestsBase.cs index 2211cf0a2357..649d58abd213 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaTestsBase.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaTestsBase.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Linq; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaXml.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaXml.cs index 85d16af79d5b..ac4ad570e866 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaXml.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaXml.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RC2/RC2CipherTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RC2/RC2CipherTests.cs index 082fa40a5bea..5e62fc945b8c 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RC2/RC2CipherTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RC2/RC2CipherTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Text; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RC2/RC2Factory.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RC2/RC2Factory.cs index 22464fb35735..258996773c5e 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RC2/RC2Factory.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RC2/RC2Factory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Security.Cryptography.Encryption.RC2.Tests { diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RC2/RC2Tests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RC2/RC2Tests.cs index 48a6e0ef0bb7..5d1ecd9d0dc3 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RC2/RC2Tests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RC2/RC2Tests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/EncryptDecrypt.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/EncryptDecrypt.cs index db1c1bf7ac52..85bdd124d8a6 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/EncryptDecrypt.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/EncryptDecrypt.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Test.Cryptography; using Xunit; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/EncryptDecrypt.netcoreapp.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/EncryptDecrypt.netcoreapp.cs index 18cf61018c44..e9489c3feac3 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/EncryptDecrypt.netcoreapp.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/EncryptDecrypt.netcoreapp.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Linq; using Xunit; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/ImportExport.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/ImportExport.cs index 7c8d9509397c..3e04ba6cfeae 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/ImportExport.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/ImportExport.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Linq; using System.Numerics; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/KeyGeneration.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/KeyGeneration.cs index 30fc3ff5f366..3f8e2fb43793 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/KeyGeneration.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/KeyGeneration.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAFactory.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAFactory.cs index 6886eaf33fb9..56d4978f756d 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAFactory.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAFactory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Security.Cryptography.Rsa.Tests { diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAKeyExchangeFormatter.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAKeyExchangeFormatter.cs index bc73bde32955..cb71cd9de7bf 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAKeyExchangeFormatter.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAKeyExchangeFormatter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Linq; using Test.Cryptography; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAKeyFileTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAKeyFileTests.cs index 7e73ce658193..35b50774b156 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAKeyFileTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAKeyFileTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Text; using Test.Cryptography; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAKeyPemTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAKeyPemTests.cs index 37c90271b66a..35d082065ae5 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAKeyPemTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAKeyPemTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Text; using Test.Cryptography; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSASignatureFormatter.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSASignatureFormatter.cs index f774bc8e279b..6965efd05b43 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSASignatureFormatter.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSASignatureFormatter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Security.Cryptography.Tests; using Test.Cryptography; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAXml.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAXml.cs index 37ad05997f06..7fe107987f97 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAXml.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAXml.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Xml.Linq; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/SignVerify.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/SignVerify.cs index 7615f3f5d08b..61b15e29a530 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/SignVerify.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/SignVerify.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.IO; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/SignVerify.netcoreapp.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/SignVerify.netcoreapp.cs index 21e080e873bc..3b7c247068cb 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/SignVerify.netcoreapp.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/SignVerify.netcoreapp.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Security.Cryptography.Rsa.Tests { diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/TestData.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/TestData.cs index 6f62cfd9a0b2..c5bbd6bed7c5 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/TestData.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/TestData.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Text; using Test.Cryptography; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/TripleDES/TripleDESCipherTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/TripleDES/TripleDESCipherTests.cs index 438f2576d081..520a991af7de 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/TripleDES/TripleDESCipherTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/TripleDES/TripleDESCipherTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Text; using Test.Cryptography; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/TripleDES/TripleDESFactory.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/TripleDES/TripleDESFactory.cs index b5bd5faf31c8..f90790f1d994 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/TripleDES/TripleDESFactory.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/TripleDES/TripleDESFactory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; using Xunit; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/TripleDES/TripleDESReusabilityTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/TripleDES/TripleDESReusabilityTests.cs index b1ee09643e95..8a441559de1f 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/TripleDES/TripleDESReusabilityTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/TripleDES/TripleDESReusabilityTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Test.Cryptography; using Xunit; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AsymmetricSignatureFormatter.cs b/src/libraries/Common/tests/System/Security/Cryptography/AsymmetricSignatureFormatter.cs index 35a9194ad22c..4ad038ad2103 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AsymmetricSignatureFormatter.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AsymmetricSignatureFormatter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Text; using Xunit; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/ByteUtils.cs b/src/libraries/Common/tests/System/Security/Cryptography/ByteUtils.cs index be8a1d5f9b34..997b09af0cbf 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/ByteUtils.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/ByteUtils.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Globalization; diff --git a/src/libraries/Common/tests/System/Security/Cryptography/CryptoUtils.cs b/src/libraries/Common/tests/System/Security/Cryptography/CryptoUtils.cs index 6c80094ee4f3..bd29ba2e00b9 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/CryptoUtils.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/CryptoUtils.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/System.Security.Cryptography.X509Certificates/tests/RevocationTests/CertificateAuthority.cs b/src/libraries/Common/tests/System/Security/Cryptography/X509Certificates/CertificateAuthority.cs similarity index 77% rename from src/libraries/System.Security.Cryptography.X509Certificates/tests/RevocationTests/CertificateAuthority.cs rename to src/libraries/Common/tests/System/Security/Cryptography/X509Certificates/CertificateAuthority.cs index 2f2666ebeeb8..f619379b0f81 100644 --- a/src/libraries/System.Security.Cryptography.X509Certificates/tests/RevocationTests/CertificateAuthority.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/X509Certificates/CertificateAuthority.cs @@ -1,13 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Formats.Asn1; using System.Linq; using Xunit; -namespace System.Security.Cryptography.X509Certificates.Tests.RevocationTests +namespace System.Security.Cryptography.X509Certificates.Tests.Common { // This class represents only a portion of what is required to be a proper Certificate Authority. // @@ -15,6 +14,29 @@ namespace System.Security.Cryptography.X509Certificates.Tests.RevocationTests // without understanding all of the portions of proper CA management that you're skipping. // // At minimum, read the current baseline requirements of the CA/Browser Forum. + + [Flags] + public enum PkiOptions + { + None = 0, + + IssuerRevocationViaCrl = 1 << 0, + IssuerRevocationViaOcsp = 1 << 1, + EndEntityRevocationViaCrl = 1 << 2, + EndEntityRevocationViaOcsp = 1 << 3, + + CrlEverywhere = IssuerRevocationViaCrl | EndEntityRevocationViaCrl, + OcspEverywhere = IssuerRevocationViaOcsp | EndEntityRevocationViaOcsp, + AllIssuerRevocation = IssuerRevocationViaCrl | IssuerRevocationViaOcsp, + AllEndEntityRevocation = EndEntityRevocationViaCrl | EndEntityRevocationViaOcsp, + AllRevocation = CrlEverywhere | OcspEverywhere, + + IssuerAuthorityHasDesignatedOcspResponder = 1 << 16, + RootAuthorityHasDesignatedOcspResponder = 1 << 17, + NoIssuerCertDistributionUri = 1 << 18, + NoRootCertDistributionUri = 1 << 18, + } + internal sealed class CertificateAuthority : IDisposable { private static readonly Asn1Tag s_context0 = new Asn1Tag(TagClass.ContextSpecific, 0); @@ -35,7 +57,7 @@ internal sealed class CertificateAuthority : IDisposable private static readonly X509KeyUsageExtension s_eeKeyUsage = new X509KeyUsageExtension( - X509KeyUsageFlags.DigitalSignature, + X509KeyUsageFlags.DigitalSignature | X509KeyUsageFlags.KeyEncipherment | X509KeyUsageFlags.DataEncipherment, critical: false); private static readonly X509EnhancedKeyUsageExtension s_ocspResponderEku = @@ -75,6 +97,11 @@ internal sealed class CertificateAuthority : IDisposable internal DateTimeOffset? RevocationExpiration { get; set; } internal bool CorruptRevocationIssuerName { get; set; } + // All keys created in this method are smaller than recommended, + // but they only live for a few seconds (at most), + // and never communicate out of process. + const int DefaultKeySize = 1024; + internal CertificateAuthority( X509Certificate2 cert, string aiaHttpUrl, @@ -128,24 +155,22 @@ internal X509Certificate2 CreateSubordinateCA( subject, publicKey, TimeSpan.FromMinutes(1), - new X509BasicConstraintsExtension( - certificateAuthority: true, - depthLimit.HasValue, - depthLimit.GetValueOrDefault(), - critical: true), - s_caKeyUsage, - ekuExtension: null); + new X509ExtensionCollection() { + new X509BasicConstraintsExtension( + certificateAuthority: true, + depthLimit.HasValue, + depthLimit.GetValueOrDefault(), + critical: true), + s_caKeyUsage }); } - internal X509Certificate2 CreateEndEntity(string subject, RSA publicKey) + internal X509Certificate2 CreateEndEntity(string subject, RSA publicKey, X509ExtensionCollection extensions) { return CreateCertificate( subject, publicKey, TimeSpan.FromSeconds(2), - s_eeConstraints, - s_eeKeyUsage, - s_tlsClientEku); + extensions); } internal X509Certificate2 CreateOcspSigner(string subject, RSA publicKey) @@ -154,9 +179,7 @@ internal X509Certificate2 CreateOcspSigner(string subject, RSA publicKey) subject, publicKey, TimeSpan.FromSeconds(1), - s_eeConstraints, - s_eeKeyUsage, - s_ocspResponderEku, + new X509ExtensionCollection() { s_eeConstraints, s_eeKeyUsage, s_ocspResponderEku}, ocspResponder: true); } @@ -216,9 +239,7 @@ private X509Certificate2 CreateCertificate( string subject, RSA publicKey, TimeSpan nestingBuffer, - X509BasicConstraintsExtension basicConstraints, - X509KeyUsageExtension keyUsage, - X509EnhancedKeyUsageExtension ekuExtension, + X509ExtensionCollection extensions, bool ocspResponder = false) { if (_cdpExtension == null && CdpUri != null) @@ -242,8 +263,10 @@ private X509Certificate2 CreateCertificate( HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1); - request.CertificateExtensions.Add(basicConstraints); - request.CertificateExtensions.Add(keyUsage); + foreach (X509Extension extension in extensions) + { + request.CertificateExtensions.Add(extension); + } // Windows does not accept OCSP Responder certificates which have // a CDP extension, or an AIA extension with an OCSP endpoint. @@ -257,11 +280,6 @@ private X509Certificate2 CreateCertificate( request.CertificateExtensions.Add( new X509SubjectKeyIdentifierExtension(request.PublicKey, false)); - if (ekuExtension != null) - { - request.CertificateExtensions.Add(ekuExtension); - } - byte[] serial = new byte[sizeof(long)]; RandomNumberGenerator.Fill(serial); @@ -793,5 +811,125 @@ private enum CertStatus OK, Revoked, } + + internal static void BuildPrivatePki( + PkiOptions pkiOptions, + out RevocationResponder responder, + out CertificateAuthority rootAuthority, + out CertificateAuthority intermediateAuthority, + out X509Certificate2 endEntityCert, + string testName = null, + bool registerAuthorities = true, + bool pkiOptionsInSubject = false, + string subjectName = null, + int keySize = DefaultKeySize, + X509ExtensionCollection extensions = null) + { + bool rootDistributionViaHttp = !pkiOptions.HasFlag(PkiOptions.NoRootCertDistributionUri); + bool issuerRevocationViaCrl = pkiOptions.HasFlag(PkiOptions.IssuerRevocationViaCrl); + bool issuerRevocationViaOcsp = pkiOptions.HasFlag(PkiOptions.IssuerRevocationViaOcsp); + bool issuerDistributionViaHttp = !pkiOptions.HasFlag(PkiOptions.NoIssuerCertDistributionUri); + bool endEntityRevocationViaCrl = pkiOptions.HasFlag(PkiOptions.EndEntityRevocationViaCrl); + bool endEntityRevocationViaOcsp = pkiOptions.HasFlag(PkiOptions.EndEntityRevocationViaOcsp); + + Assert.True( + issuerRevocationViaCrl || issuerRevocationViaOcsp || + endEntityRevocationViaCrl || endEntityRevocationViaOcsp, + "At least one revocation mode is enabled"); + + if (extensions == null) + { + // default to client + extensions = new X509ExtensionCollection() { s_eeConstraints, s_eeKeyUsage, s_tlsClientEku }; + } + + using (RSA rootKey = RSA.Create(keySize)) + using (RSA intermedKey = RSA.Create(keySize)) + using (RSA eeKey = RSA.Create(keySize)) + { + var rootReq = new CertificateRequest( + BuildSubject("A Revocation Test Root", testName, pkiOptions, pkiOptionsInSubject), + rootKey, + HashAlgorithmName.SHA256, + RSASignaturePadding.Pkcs1); + + X509BasicConstraintsExtension caConstraints = + new X509BasicConstraintsExtension(true, false, 0, true); + + rootReq.CertificateExtensions.Add(caConstraints); + var rootSkid = new X509SubjectKeyIdentifierExtension(rootReq.PublicKey, false); + rootReq.CertificateExtensions.Add( + rootSkid); + + DateTimeOffset start = DateTimeOffset.UtcNow; + DateTimeOffset end = start.AddMonths(3); + + // Don't dispose this, it's being transferred to the CertificateAuthority + X509Certificate2 rootCert = rootReq.CreateSelfSigned(start.AddDays(-2), end.AddDays(2)); + responder = RevocationResponder.CreateAndListen(); + + string certUrl = $"{responder.UriPrefix}cert/{rootSkid.SubjectKeyIdentifier}.cer"; + string cdpUrl = $"{responder.UriPrefix}crl/{rootSkid.SubjectKeyIdentifier}.crl"; + string ocspUrl = $"{responder.UriPrefix}ocsp/{rootSkid.SubjectKeyIdentifier}"; + + rootAuthority = new CertificateAuthority( + rootCert, + rootDistributionViaHttp ? certUrl : null, + issuerRevocationViaCrl ? cdpUrl : null, + issuerRevocationViaOcsp ? ocspUrl : null); + + // Don't dispose this, it's being transferred to the CertificateAuthority + X509Certificate2 intermedCert; + + { + X509Certificate2 intermedPub = rootAuthority.CreateSubordinateCA( + BuildSubject("A Revocation Test CA", testName, pkiOptions, pkiOptionsInSubject), + intermedKey); + + intermedCert = intermedPub.CopyWithPrivateKey(intermedKey); + intermedPub.Dispose(); + } + + X509SubjectKeyIdentifierExtension intermedSkid = + intermedCert.Extensions.OfType().Single(); + + certUrl = $"{responder.UriPrefix}cert/{intermedSkid.SubjectKeyIdentifier}.cer"; + cdpUrl = $"{responder.UriPrefix}crl/{intermedSkid.SubjectKeyIdentifier}.crl"; + ocspUrl = $"{responder.UriPrefix}ocsp/{intermedSkid.SubjectKeyIdentifier}"; + + intermediateAuthority = new CertificateAuthority( + intermedCert, + issuerDistributionViaHttp ? certUrl : null, + endEntityRevocationViaCrl ? cdpUrl : null, + endEntityRevocationViaOcsp ? ocspUrl : null); + + endEntityCert = intermediateAuthority.CreateEndEntity( + BuildSubject(subjectName ?? "A Revocation Test Cert", testName, pkiOptions, pkiOptionsInSubject), + eeKey, + extensions); + + endEntityCert = endEntityCert.CopyWithPrivateKey(eeKey); + } + + if (registerAuthorities) + { + responder.AddCertificateAuthority(rootAuthority); + responder.AddCertificateAuthority(intermediateAuthority); + } + } + + private static string BuildSubject( + string cn, + string testName, + PkiOptions pkiOptions, + bool includePkiOptions) + { + if (includePkiOptions) + { + return $"CN=\"{cn}\", O=\"{testName}\", OU=\"{pkiOptions}\""; + } + + return $"CN=\"{cn}\", O=\"{testName}\""; + } } } diff --git a/src/libraries/System.Security.Cryptography.X509Certificates/tests/RevocationTests/RevocationResponder.cs b/src/libraries/Common/tests/System/Security/Cryptography/X509Certificates/RevocationResponder.cs similarity index 95% rename from src/libraries/System.Security.Cryptography.X509Certificates/tests/RevocationTests/RevocationResponder.cs rename to src/libraries/Common/tests/System/Security/Cryptography/X509Certificates/RevocationResponder.cs index e3de12320d79..aa3df4cf8e27 100644 --- a/src/libraries/System.Security.Cryptography.X509Certificates/tests/RevocationTests/RevocationResponder.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/X509Certificates/RevocationResponder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Formats.Asn1; @@ -9,7 +8,7 @@ using System.Threading.Tasks; using System.Web; -namespace System.Security.Cryptography.X509Certificates.Tests.RevocationTests +namespace System.Security.Cryptography.X509Certificates.Tests.Common { internal sealed class RevocationResponder : IDisposable { @@ -29,6 +28,8 @@ private readonly Dictionary _crlPaths public string UriPrefix { get; } + public bool RespondEmpty { get; set; } + private RevocationResponder(HttpListener listener, string uriPrefix) { _listener = listener; @@ -133,7 +134,7 @@ internal void HandleRequest(HttpListenerContext context) catch (Exception) { } - + return; } @@ -159,7 +160,7 @@ private void HandleRequest(HttpListenerContext context, ref bool responded) if (_aiaPaths.TryGetValue(url, out authority)) { - byte[] certData = authority.GetCertData(); + byte[] certData = RespondEmpty ? Array.Empty() : authority.GetCertData(); responded = true; context.Response.StatusCode = 200; @@ -171,7 +172,7 @@ private void HandleRequest(HttpListenerContext context, ref bool responded) if (_crlPaths.TryGetValue(url, out authority)) { - byte[] crl = authority.GetCrl(); + byte[] crl = RespondEmpty ? Array.Empty() : authority.GetCrl(); responded = true; context.Response.StatusCode = 200; @@ -208,7 +209,7 @@ private void HandleRequest(HttpListenerContext context, ref bool responded) return; } - byte[] ocspResponse = authority.BuildOcspResponse(certId, nonce); + byte[] ocspResponse = RespondEmpty ? Array.Empty() : authority.BuildOcspResponse(certId, nonce); responded = true; context.Response.StatusCode = 200; @@ -234,7 +235,7 @@ private void HandleRequest(HttpListenerContext context, ref bool responded) internal static RevocationResponder CreateAndListen() { HttpListener listener = OpenListener(out string uriPrefix); - + RevocationResponder responder = new RevocationResponder(listener, uriPrefix); responder.HandleRequests(); return responder; @@ -292,7 +293,7 @@ private static void DecodeOcspRequest( if (!versionReader.TryReadInt32(out int version) || version != 0) { - throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); + throw new CryptographicException("ASN1 corrupted data"); } versionReader.ThrowIfNotEmpty(); diff --git a/src/libraries/Common/tests/System/ShouldNotBeInvokedException.cs b/src/libraries/Common/tests/System/ShouldNotBeInvokedException.cs index fe67ce453b5f..46cc800cde9e 100644 --- a/src/libraries/Common/tests/System/ShouldNotBeInvokedException.cs +++ b/src/libraries/Common/tests/System/ShouldNotBeInvokedException.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System { diff --git a/src/libraries/Common/tests/System/Threading/Tasks/GetStateMachineData.cs b/src/libraries/Common/tests/System/Threading/Tasks/GetStateMachineData.cs index 6b72251e9ff4..21f83967fb8b 100644 --- a/src/libraries/Common/tests/System/Threading/Tasks/GetStateMachineData.cs +++ b/src/libraries/Common/tests/System/Threading/Tasks/GetStateMachineData.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Linq; diff --git a/src/libraries/Common/tests/System/Threading/Tasks/Sources/ManualResetValueTaskSource.cs b/src/libraries/Common/tests/System/Threading/Tasks/Sources/ManualResetValueTaskSource.cs index bb028c923dc8..8c51c444a20d 100644 --- a/src/libraries/Common/tests/System/Threading/Tasks/Sources/ManualResetValueTaskSource.cs +++ b/src/libraries/Common/tests/System/Threading/Tasks/Sources/ManualResetValueTaskSource.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Threading.Tasks.Sources { diff --git a/src/libraries/Common/tests/System/Threading/Tasks/Sources/ManualResetValueTaskSourceFactory.cs b/src/libraries/Common/tests/System/Threading/Tasks/Sources/ManualResetValueTaskSourceFactory.cs index 3289c399813a..508fba6cf9d9 100644 --- a/src/libraries/Common/tests/System/Threading/Tasks/Sources/ManualResetValueTaskSourceFactory.cs +++ b/src/libraries/Common/tests/System/Threading/Tasks/Sources/ManualResetValueTaskSourceFactory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.ExceptionServices; diff --git a/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs b/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs index cf0129be3adf..033cdd77029e 100644 --- a/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs +++ b/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics; diff --git a/src/libraries/Common/tests/System/Threading/ThreadPoolHelpers.cs b/src/libraries/Common/tests/System/Threading/ThreadPoolHelpers.cs index 02c0a07ba229..8f68873a549f 100644 --- a/src/libraries/Common/tests/System/Threading/ThreadPoolHelpers.cs +++ b/src/libraries/Common/tests/System/Threading/ThreadPoolHelpers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Threading { diff --git a/src/libraries/Common/tests/System/Threading/ThreadTestHelpers.cs b/src/libraries/Common/tests/System/Threading/ThreadTestHelpers.cs index 4ebcdcb298b6..38ef355695ca 100644 --- a/src/libraries/Common/tests/System/Threading/ThreadTestHelpers.cs +++ b/src/libraries/Common/tests/System/Threading/ThreadTestHelpers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Threading.Tasks; diff --git a/src/libraries/Common/tests/System/Threading/TrackingSynchronizationContext.cs b/src/libraries/Common/tests/System/Threading/TrackingSynchronizationContext.cs index 740aec5be31c..7c1b83fa8121 100644 --- a/src/libraries/Common/tests/System/Threading/TrackingSynchronizationContext.cs +++ b/src/libraries/Common/tests/System/Threading/TrackingSynchronizationContext.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Collections.Generic; diff --git a/src/libraries/Common/tests/System/Xml/BaseLibManaged/Globalization.cs b/src/libraries/Common/tests/System/Xml/BaseLibManaged/Globalization.cs index 2c27401f7ca6..22082a835e33 100644 --- a/src/libraries/Common/tests/System/Xml/BaseLibManaged/Globalization.cs +++ b/src/libraries/Common/tests/System/Xml/BaseLibManaged/Globalization.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/tests/System/Xml/DisableParallelization.cs b/src/libraries/Common/tests/System/Xml/DisableParallelization.cs index 5814b2acedff..e6fb8acae3b2 100644 --- a/src/libraries/Common/tests/System/Xml/DisableParallelization.cs +++ b/src/libraries/Common/tests/System/Xml/DisableParallelization.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // Tests are old and depend on the static state [assembly: Xunit.CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/libraries/Common/tests/System/Xml/ModuleCore/XunitRunner.cs b/src/libraries/Common/tests/System/Xml/ModuleCore/XunitRunner.cs index 62526d2e0eb3..79d210d9e134 100644 --- a/src/libraries/Common/tests/System/Xml/ModuleCore/XunitRunner.cs +++ b/src/libraries/Common/tests/System/Xml/ModuleCore/XunitRunner.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/tests/System/Xml/ModuleCore/XunitTestCase.cs b/src/libraries/Common/tests/System/Xml/ModuleCore/XunitTestCase.cs index eb47786eb7a8..8436ae0f2034 100644 --- a/src/libraries/Common/tests/System/Xml/ModuleCore/XunitTestCase.cs +++ b/src/libraries/Common/tests/System/Xml/ModuleCore/XunitTestCase.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/tests/System/Xml/ModuleCore/cattrbase.cs b/src/libraries/Common/tests/System/Xml/ModuleCore/cattrbase.cs index 5edd400890b2..f5d92398a98a 100644 --- a/src/libraries/Common/tests/System/Xml/ModuleCore/cattrbase.cs +++ b/src/libraries/Common/tests/System/Xml/ModuleCore/cattrbase.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/tests/System/Xml/ModuleCore/ccommon.cs b/src/libraries/Common/tests/System/Xml/ModuleCore/ccommon.cs index dcd0b19231dd..79bd1a7cf972 100644 --- a/src/libraries/Common/tests/System/Xml/ModuleCore/ccommon.cs +++ b/src/libraries/Common/tests/System/Xml/ModuleCore/ccommon.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/tests/System/Xml/ModuleCore/cerror.cs b/src/libraries/Common/tests/System/Xml/ModuleCore/cerror.cs index d93ea80138d5..ca2d52c259fe 100644 --- a/src/libraries/Common/tests/System/Xml/ModuleCore/cerror.cs +++ b/src/libraries/Common/tests/System/Xml/ModuleCore/cerror.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/tests/System/Xml/ModuleCore/cltmconsole.cs b/src/libraries/Common/tests/System/Xml/ModuleCore/cltmconsole.cs index b58ca30d534a..6f431d8e5969 100644 --- a/src/libraries/Common/tests/System/Xml/ModuleCore/cltmconsole.cs +++ b/src/libraries/Common/tests/System/Xml/ModuleCore/cltmconsole.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Common/tests/System/Xml/ModuleCore/cmodinfo.cs b/src/libraries/Common/tests/System/Xml/ModuleCore/cmodinfo.cs index 275ad7c736d8..1d117cfcb669 100644 --- a/src/libraries/Common/tests/System/Xml/ModuleCore/cmodinfo.cs +++ b/src/libraries/Common/tests/System/Xml/ModuleCore/cmodinfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Text; diff --git a/src/libraries/Common/tests/System/Xml/ModuleCore/cparser.cs b/src/libraries/Common/tests/System/Xml/ModuleCore/cparser.cs index 1d6221d5d141..fb306a7bdcae 100644 --- a/src/libraries/Common/tests/System/Xml/ModuleCore/cparser.cs +++ b/src/libraries/Common/tests/System/Xml/ModuleCore/cparser.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Text; diff --git a/src/libraries/Common/tests/System/Xml/ModuleCore/ctestbase.cs b/src/libraries/Common/tests/System/Xml/ModuleCore/ctestbase.cs index 96f2f9f0a715..1accc9d13ac4 100644 --- a/src/libraries/Common/tests/System/Xml/ModuleCore/ctestbase.cs +++ b/src/libraries/Common/tests/System/Xml/ModuleCore/ctestbase.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/tests/System/Xml/ModuleCore/ctestcase.cs b/src/libraries/Common/tests/System/Xml/ModuleCore/ctestcase.cs index 2067271d135d..5ec7ab85e451 100644 --- a/src/libraries/Common/tests/System/Xml/ModuleCore/ctestcase.cs +++ b/src/libraries/Common/tests/System/Xml/ModuleCore/ctestcase.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/tests/System/Xml/ModuleCore/ctestexception.cs b/src/libraries/Common/tests/System/Xml/ModuleCore/ctestexception.cs index 36cfcfc0aa44..60a033f7853f 100644 --- a/src/libraries/Common/tests/System/Xml/ModuleCore/ctestexception.cs +++ b/src/libraries/Common/tests/System/Xml/ModuleCore/ctestexception.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Text; diff --git a/src/libraries/Common/tests/System/Xml/ModuleCore/ctestmodule.cs b/src/libraries/Common/tests/System/Xml/ModuleCore/ctestmodule.cs index f8f83dc6d7b7..4b7a4ef04755 100644 --- a/src/libraries/Common/tests/System/Xml/ModuleCore/ctestmodule.cs +++ b/src/libraries/Common/tests/System/Xml/ModuleCore/ctestmodule.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Common/tests/System/Xml/ModuleCore/cvariation.cs b/src/libraries/Common/tests/System/Xml/ModuleCore/cvariation.cs index 634cfc33fbe8..1a46946e9744 100644 --- a/src/libraries/Common/tests/System/Xml/ModuleCore/cvariation.cs +++ b/src/libraries/Common/tests/System/Xml/ModuleCore/cvariation.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Common/tests/System/Xml/ModuleCore/interop.cs b/src/libraries/Common/tests/System/Xml/ModuleCore/interop.cs index 1b96f22ec8a9..1ee092f4d4b0 100644 --- a/src/libraries/Common/tests/System/Xml/ModuleCore/interop.cs +++ b/src/libraries/Common/tests/System/Xml/ModuleCore/interop.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/tests/System/Xml/XPath/Common/FileHelper.cs b/src/libraries/Common/tests/System/Xml/XPath/Common/FileHelper.cs index 15f14ae55bf3..219a79671548 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/Common/FileHelper.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/Common/FileHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Common/tests/System/Xml/XPath/Common/ICreateNavigator.cs b/src/libraries/Common/tests/System/Xml/XPath/Common/ICreateNavigator.cs index fcc2368bc9f7..65b6a38b2019 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/Common/ICreateNavigator.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/Common/ICreateNavigator.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Xml.XPath; diff --git a/src/libraries/Common/tests/System/Xml/XPath/Common/Utils.cs b/src/libraries/Common/tests/System/Xml/XPath/Common/Utils.cs index f9c76ce6a0b8..c35067311e47 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/Common/Utils.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/Common/Utils.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/Common/XPathResult.cs b/src/libraries/Common/tests/System/Xml/XPath/Common/XPathResult.cs index 8f4b3afc03c9..a0eb6cc58fad 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/Common/XPathResult.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/Common/XPathResult.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace XPathTests.Common { diff --git a/src/libraries/Common/tests/System/Xml/XPath/Common/XPathResultToken.cs b/src/libraries/Common/tests/System/Xml/XPath/Common/XPathResultToken.cs index d48f81aad49a..707c1fc68477 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/Common/XPathResultToken.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/Common/XPathResultToken.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Xml.XPath; diff --git a/src/libraries/Common/tests/System/Xml/XPath/CoreFunctionLibrary/BooleanFunctionsTests.cs b/src/libraries/Common/tests/System/Xml/XPath/CoreFunctionLibrary/BooleanFunctionsTests.cs index e7fe00f268e7..81d6ed825808 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/CoreFunctionLibrary/BooleanFunctionsTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/CoreFunctionLibrary/BooleanFunctionsTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/CoreFunctionLibrary/ComplexExpressionsTests.cs b/src/libraries/Common/tests/System/Xml/XPath/CoreFunctionLibrary/ComplexExpressionsTests.cs index bb8307b5c2fd..eb808a8155f3 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/CoreFunctionLibrary/ComplexExpressionsTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/CoreFunctionLibrary/ComplexExpressionsTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/CoreFunctionLibrary/NodeSetFunctionsTests.cs b/src/libraries/Common/tests/System/Xml/XPath/CoreFunctionLibrary/NodeSetFunctionsTests.cs index 954106115e53..c49d05ecfb4d 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/CoreFunctionLibrary/NodeSetFunctionsTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/CoreFunctionLibrary/NodeSetFunctionsTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/CoreFunctionLibrary/NodeSetMatchesTests.cs b/src/libraries/Common/tests/System/Xml/XPath/CoreFunctionLibrary/NodeSetMatchesTests.cs index a07adbf41a00..f13e166a2543 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/CoreFunctionLibrary/NodeSetMatchesTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/CoreFunctionLibrary/NodeSetMatchesTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/CoreFunctionLibrary/NumberFunctionsTests.cs b/src/libraries/Common/tests/System/Xml/XPath/CoreFunctionLibrary/NumberFunctionsTests.cs index ab7405a62c5f..9f5401a695d8 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/CoreFunctionLibrary/NumberFunctionsTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/CoreFunctionLibrary/NumberFunctionsTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/CoreFunctionLibrary/ParameterTypeCoercionTests.cs b/src/libraries/Common/tests/System/Xml/XPath/CoreFunctionLibrary/ParameterTypeCoercionTests.cs index 131b6b4e0b11..4e35880ce064 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/CoreFunctionLibrary/ParameterTypeCoercionTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/CoreFunctionLibrary/ParameterTypeCoercionTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/CoreFunctionLibrary/StringFunctionsTests.cs b/src/libraries/Common/tests/System/Xml/XPath/CoreFunctionLibrary/StringFunctionsTests.cs index d558c0eec903..afa4e34d9eb7 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/CoreFunctionLibrary/StringFunctionsTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/CoreFunctionLibrary/StringFunctionsTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/CustomerScenarios/CustomerScenariosTests.cs b/src/libraries/Common/tests/System/Xml/XPath/CustomerScenarios/CustomerScenariosTests.cs index 5115a096d42c..30bce226ea38 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/CustomerScenarios/CustomerScenariosTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/CustomerScenarios/CustomerScenariosTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/CustomerScenarios/MatchesTests.cs b/src/libraries/Common/tests/System/Xml/XPath/CustomerScenarios/MatchesTests.cs index da4e75cf962e..00e04ffc5d5b 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/CustomerScenarios/MatchesTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/CustomerScenarios/MatchesTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/FuncExpressions/BasicMatchesTests.cs b/src/libraries/Common/tests/System/Xml/XPath/FuncExpressions/BasicMatchesTests.cs index 8a7444d0b2db..2fa1d943b294 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/FuncExpressions/BasicMatchesTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/FuncExpressions/BasicMatchesTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/FuncExpressions/BasicsTests.cs b/src/libraries/Common/tests/System/Xml/XPath/FuncExpressions/BasicsTests.cs index 8664c8f87b97..0aa7649ea89b 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/FuncExpressions/BasicsTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/FuncExpressions/BasicsTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/FuncExpressions/BooleansTests.cs b/src/libraries/Common/tests/System/Xml/XPath/FuncExpressions/BooleansTests.cs index 44dac5740402..36cc5184f2df 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/FuncExpressions/BooleansTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/FuncExpressions/BooleansTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/FuncExpressions/NodeSetsMatchesTests.cs b/src/libraries/Common/tests/System/Xml/XPath/FuncExpressions/NodeSetsMatchesTests.cs index 96f1ae62e78d..080038f2f23e 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/FuncExpressions/NodeSetsMatchesTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/FuncExpressions/NodeSetsMatchesTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/FuncExpressions/NodeSetsTests.cs b/src/libraries/Common/tests/System/Xml/XPath/FuncExpressions/NodeSetsTests.cs index 18ad96476709..716bf3b5e417 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/FuncExpressions/NodeSetsTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/FuncExpressions/NodeSetsTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/FuncExpressions/NumbersTests.cs b/src/libraries/Common/tests/System/Xml/XPath/FuncExpressions/NumbersTests.cs index d01736d75069..1a934f2018d0 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/FuncExpressions/NumbersTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/FuncExpressions/NumbersTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/FuncExpressions/SetContextFunctionalTests.cs b/src/libraries/Common/tests/System/Xml/XPath/FuncExpressions/SetContextFunctionalTests.cs index 5a3627d1a676..2de07361fc51 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/FuncExpressions/SetContextFunctionalTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/FuncExpressions/SetContextFunctionalTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/FuncExpressions/SetContextMatchesTests.cs b/src/libraries/Common/tests/System/Xml/XPath/FuncExpressions/SetContextMatchesTests.cs index ac6bdaba7047..6b48954d71f3 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/FuncExpressions/SetContextMatchesTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/FuncExpressions/SetContextMatchesTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathAbbreviatedSyntaxMatchesTests.cs b/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathAbbreviatedSyntaxMatchesTests.cs index 240c4f89120e..2f8531d79c2e 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathAbbreviatedSyntaxMatchesTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathAbbreviatedSyntaxMatchesTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathAbbreviatedSyntaxTests.cs b/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathAbbreviatedSyntaxTests.cs index 9893fe66acd2..cde443fb72cb 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathAbbreviatedSyntaxTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathAbbreviatedSyntaxTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathAxeCombinationsTests.cs b/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathAxeCombinationsTests.cs index eb8b4d85775c..8d4b3db1a7c4 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathAxeCombinationsTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathAxeCombinationsTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathAxeComplexExprMatchesTests.cs b/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathAxeComplexExprMatchesTests.cs index 1dde75d76303..157ab2cb0e58 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathAxeComplexExprMatchesTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathAxeComplexExprMatchesTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathAxeComplexExprTests.cs b/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathAxeComplexExprTests.cs index 984f0789f610..b921914c08c7 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathAxeComplexExprTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathAxeComplexExprTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathAxeMatchesTests.cs b/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathAxeMatchesTests.cs index ceb979033973..199a26950485 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathAxeMatchesTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathAxeMatchesTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathAxesTests.cs b/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathAxesTests.cs index dc9306f86101..697938f3c5de 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathAxesTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathAxesTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathNodeMatchesTests.cs b/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathNodeMatchesTests.cs index 61b4e7a2cd4f..7aa64fd48666 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathNodeMatchesTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathNodeMatchesTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathNodeTests.cs b/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathNodeTests.cs index 99ace64b79d3..7cfeefc07a4b 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathNodeTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathNodeTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathPredicateComplexExprTests.cs b/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathPredicateComplexExprTests.cs index 84186269940d..a4cd3fe78acd 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathPredicateComplexExprTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathPredicateComplexExprTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathPredicateMatchesTests.cs b/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathPredicateMatchesTests.cs index d3217efe983d..fcc199cd409c 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathPredicateMatchesTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathPredicateMatchesTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathPredicatePositionTests.cs b/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathPredicatePositionTests.cs index 0477106e856a..78af0cee23d7 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathPredicatePositionTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathPredicatePositionTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathPredicatesTests.cs b/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathPredicatesTests.cs index 53bf8eeececa..11ec81cd264c 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathPredicatesTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/PathPredicatesTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/StepMatchesTests.cs b/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/StepMatchesTests.cs index 8efe053bf914..08bd4f93801c 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/StepMatchesTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/StepMatchesTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/StepsTests.cs b/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/StepsTests.cs index 8783d1ba960a..f195f7e2a19c 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/StepsTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/FuncLocation/StepsTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/MiscellaneousCases/GlobalizationTests.cs b/src/libraries/Common/tests/System/Xml/XPath/MiscellaneousCases/GlobalizationTests.cs index ec9caf153169..70a61b7de12b 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/MiscellaneousCases/GlobalizationTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/MiscellaneousCases/GlobalizationTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/MiscellaneousCases/LexicalStructureTests.cs b/src/libraries/Common/tests/System/Xml/XPath/MiscellaneousCases/LexicalStructureTests.cs index 9d68c8a34c3c..74fc7949bc00 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/MiscellaneousCases/LexicalStructureTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/MiscellaneousCases/LexicalStructureTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/MiscellaneousCases/MatchesTests.cs b/src/libraries/Common/tests/System/Xml/XPath/MiscellaneousCases/MatchesTests.cs index 76b1f9e17a40..60bf21516a41 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/MiscellaneousCases/MatchesTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/MiscellaneousCases/MatchesTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/MiscellaneousCases/MiscellaneousCasesTests.cs b/src/libraries/Common/tests/System/Xml/XPath/MiscellaneousCases/MiscellaneousCasesTests.cs index a59c79cce80f..5a60bd82b901 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/MiscellaneousCases/MiscellaneousCasesTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/MiscellaneousCases/MiscellaneousCasesTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/MiscellaneousCases/NodeSetsTests.cs b/src/libraries/Common/tests/System/Xml/XPath/MiscellaneousCases/NodeSetsTests.cs index c34beeac8cca..f1f293764a73 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/MiscellaneousCases/NodeSetsTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/MiscellaneousCases/NodeSetsTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/MiscellaneousCases/RegressionTestsTests.cs b/src/libraries/Common/tests/System/Xml/XPath/MiscellaneousCases/RegressionTestsTests.cs index 899413159fda..f35896643d26 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/MiscellaneousCases/RegressionTestsTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/MiscellaneousCases/RegressionTestsTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/TestsWithEncoding/MiscWithEncodings.cs b/src/libraries/Common/tests/System/Xml/XPath/TestsWithEncoding/MiscWithEncodings.cs index 8df571d86126..6e0c142f74cb 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/TestsWithEncoding/MiscWithEncodings.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/TestsWithEncoding/MiscWithEncodings.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System; diff --git a/src/libraries/Common/tests/System/Xml/XPath/XPathExpressionTests/CompileTests.cs b/src/libraries/Common/tests/System/Xml/XPath/XPathExpressionTests/CompileTests.cs index 9788fb89e1d1..efa402f0d58a 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/XPathExpressionTests/CompileTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/XPathExpressionTests/CompileTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Xml.XPath; diff --git a/src/libraries/Common/tests/System/Xml/XPath/XPathExpressionTests/EvaluateTests.cs b/src/libraries/Common/tests/System/Xml/XPath/XPathExpressionTests/EvaluateTests.cs index 062e9d856129..2f59ca3fec14 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/XPathExpressionTests/EvaluateTests.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/XPathExpressionTests/EvaluateTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections; diff --git a/src/libraries/Common/tests/System/Xml/XPath/XmlDocument/CreateNavigatorFromXmlDocument.cs b/src/libraries/Common/tests/System/Xml/XPath/XmlDocument/CreateNavigatorFromXmlDocument.cs index 91af4498cfa3..79ef33f1939a 100644 --- a/src/libraries/Common/tests/System/Xml/XPath/XmlDocument/CreateNavigatorFromXmlDocument.cs +++ b/src/libraries/Common/tests/System/Xml/XPath/XmlDocument/CreateNavigatorFromXmlDocument.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; using System.Xml; diff --git a/src/libraries/Common/tests/System/Xml/XmlCoreTest/AsyncUtil.cs b/src/libraries/Common/tests/System/Xml/XmlCoreTest/AsyncUtil.cs index 87d17628824d..80b751518501 100644 --- a/src/libraries/Common/tests/System/Xml/XmlCoreTest/AsyncUtil.cs +++ b/src/libraries/Common/tests/System/Xml/XmlCoreTest/AsyncUtil.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Xml; diff --git a/src/libraries/Common/tests/System/Xml/XmlCoreTest/CustomWriter.cs b/src/libraries/Common/tests/System/Xml/XmlCoreTest/CustomWriter.cs index d42bd7215b26..7ead330b9f6d 100644 --- a/src/libraries/Common/tests/System/Xml/XmlCoreTest/CustomWriter.cs +++ b/src/libraries/Common/tests/System/Xml/XmlCoreTest/CustomWriter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Common/tests/System/Xml/XmlCoreTest/FilePathUtil.cs b/src/libraries/Common/tests/System/Xml/XmlCoreTest/FilePathUtil.cs index b3a45e800261..982dedfede9d 100644 --- a/src/libraries/Common/tests/System/Xml/XmlCoreTest/FilePathUtil.cs +++ b/src/libraries/Common/tests/System/Xml/XmlCoreTest/FilePathUtil.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Text; diff --git a/src/libraries/Common/tests/System/Xml/XmlCoreTest/ManagedNodeWriter.cs b/src/libraries/Common/tests/System/Xml/XmlCoreTest/ManagedNodeWriter.cs index acc4af0d8ad6..a96b25090b70 100644 --- a/src/libraries/Common/tests/System/Xml/XmlCoreTest/ManagedNodeWriter.cs +++ b/src/libraries/Common/tests/System/Xml/XmlCoreTest/ManagedNodeWriter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Common/tests/System/Xml/XmlCoreTest/MiscUtil.cs b/src/libraries/Common/tests/System/Xml/XmlCoreTest/MiscUtil.cs index b4bb9d9b9223..323e76e5659a 100644 --- a/src/libraries/Common/tests/System/Xml/XmlCoreTest/MiscUtil.cs +++ b/src/libraries/Common/tests/System/Xml/XmlCoreTest/MiscUtil.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Common/tests/System/Xml/XmlCoreTest/ReaderCreateUtil.cs b/src/libraries/Common/tests/System/Xml/XmlCoreTest/ReaderCreateUtil.cs index 456a709eba41..a60831712551 100644 --- a/src/libraries/Common/tests/System/Xml/XmlCoreTest/ReaderCreateUtil.cs +++ b/src/libraries/Common/tests/System/Xml/XmlCoreTest/ReaderCreateUtil.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /// This class is primarily used to test buffer boundary integrity of readers. /// This class constructs a memory stream from the given buffer boundary length such that diff --git a/src/libraries/Common/tests/System/Xml/XmlCoreTest/ReaderUtil.cs b/src/libraries/Common/tests/System/Xml/XmlCoreTest/ReaderUtil.cs index 289f509ac722..b4c3ca05c28a 100644 --- a/src/libraries/Common/tests/System/Xml/XmlCoreTest/ReaderUtil.cs +++ b/src/libraries/Common/tests/System/Xml/XmlCoreTest/ReaderUtil.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. /// This class is primarily used to test buffer boundary integrity of readers. /// This class constructs a memory stream from the given buffer boundary length such that diff --git a/src/libraries/Common/tests/System/Xml/XmlCoreTest/TestData.g.cs b/src/libraries/Common/tests/System/Xml/XmlCoreTest/TestData.g.cs index 797944b7673a..2e5b46d66f4a 100644 --- a/src/libraries/Common/tests/System/Xml/XmlCoreTest/TestData.g.cs +++ b/src/libraries/Common/tests/System/Xml/XmlCoreTest/TestData.g.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Common/tests/System/Xml/XmlCoreTest/UnicodeCharHelper.cs b/src/libraries/Common/tests/System/Xml/XmlCoreTest/UnicodeCharHelper.cs index b76c60399f57..2503894a08f4 100644 --- a/src/libraries/Common/tests/System/Xml/XmlCoreTest/UnicodeCharHelper.cs +++ b/src/libraries/Common/tests/System/Xml/XmlCoreTest/UnicodeCharHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Text; diff --git a/src/libraries/Common/tests/System/Xml/XmlCoreTest/WriterFactory.cs b/src/libraries/Common/tests/System/Xml/XmlCoreTest/WriterFactory.cs index df333a50e2f4..da853e3ed720 100644 --- a/src/libraries/Common/tests/System/Xml/XmlCoreTest/WriterFactory.cs +++ b/src/libraries/Common/tests/System/Xml/XmlCoreTest/WriterFactory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Common/tests/System/Xml/XmlDiff/XmlDiff.cs b/src/libraries/Common/tests/System/Xml/XmlDiff/XmlDiff.cs index 76be55197864..a0cfd1fe8ee0 100644 --- a/src/libraries/Common/tests/System/Xml/XmlDiff/XmlDiff.cs +++ b/src/libraries/Common/tests/System/Xml/XmlDiff/XmlDiff.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Text; using System.IO; diff --git a/src/libraries/Common/tests/System/Xml/XmlDiff/XmlDiffDocument.cs b/src/libraries/Common/tests/System/Xml/XmlDiff/XmlDiffDocument.cs index 0d48fa968009..c765bf4a589a 100644 --- a/src/libraries/Common/tests/System/Xml/XmlDiff/XmlDiffDocument.cs +++ b/src/libraries/Common/tests/System/Xml/XmlDiff/XmlDiffDocument.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Xml; diff --git a/src/libraries/Common/tests/System/Xml/XmlDiff/XmlDiffOption.cs b/src/libraries/Common/tests/System/Xml/XmlDiff/XmlDiffOption.cs index ee077d66e8e6..de239db41496 100644 --- a/src/libraries/Common/tests/System/Xml/XmlDiff/XmlDiffOption.cs +++ b/src/libraries/Common/tests/System/Xml/XmlDiff/XmlDiffOption.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Xml.XmlDiff { diff --git a/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/BidiClass.cs b/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/BidiClass.cs index 07d389813dcb..2a646baefc28 100644 --- a/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/BidiClass.cs +++ b/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/BidiClass.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Text.Unicode { diff --git a/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/CodePoint.cs b/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/CodePoint.cs index 6f8300a594f2..a77acf6eaaa2 100644 --- a/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/CodePoint.cs +++ b/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/CodePoint.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Globalization; using Xunit; diff --git a/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/CodePointFlags.cs b/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/CodePointFlags.cs index 63d0a27846b2..b4d5a8b81bae 100644 --- a/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/CodePointFlags.cs +++ b/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/CodePointFlags.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Text.Unicode { diff --git a/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/GraphemeClusterBreakProperty.cs b/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/GraphemeClusterBreakProperty.cs index 5ebcbde0fb9b..be8fe8d51ec0 100644 --- a/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/GraphemeClusterBreakProperty.cs +++ b/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/GraphemeClusterBreakProperty.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Text.Unicode { diff --git a/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/ParsedUnicodeData.cs b/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/ParsedUnicodeData.cs index 12991652135a..6496568c75bc 100644 --- a/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/ParsedUnicodeData.cs +++ b/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/ParsedUnicodeData.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Globalization; diff --git a/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/PropsFileEntry.cs b/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/PropsFileEntry.cs index ac56ffbe8ca7..0302aa542766 100644 --- a/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/PropsFileEntry.cs +++ b/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/PropsFileEntry.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Globalization; using System.Security.Policy; diff --git a/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/Resources.cs b/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/Resources.cs index af473c7a3ddf..b9c1b96c8ae2 100644 --- a/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/Resources.cs +++ b/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/Resources.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; diff --git a/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/UnicodeData.cs b/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/UnicodeData.cs index 583e73e2bbf9..176eff826e89 100644 --- a/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/UnicodeData.cs +++ b/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/UnicodeData.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Globalization; using System.Threading; diff --git a/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/UnicodeDataFileEntry.cs b/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/UnicodeDataFileEntry.cs index 0659769159b0..5fd7667737ba 100644 --- a/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/UnicodeDataFileEntry.cs +++ b/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/UnicodeDataFileEntry.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Globalization; diff --git a/src/libraries/Common/tests/TestUtilities/Interop/Interop.Libraries.cs b/src/libraries/Common/tests/TestUtilities/Interop/Interop.Libraries.cs index e1501f9a79e0..c8839380369d 100644 --- a/src/libraries/Common/tests/TestUtilities/Interop/Interop.Libraries.cs +++ b/src/libraries/Common/tests/TestUtilities/Interop/Interop.Libraries.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. internal static partial class Interop { diff --git a/src/libraries/Common/tests/TestUtilities/System/AdminHelpers.cs b/src/libraries/Common/tests/TestUtilities/System/AdminHelpers.cs index b3f99076cedc..e60459e69434 100644 --- a/src/libraries/Common/tests/TestUtilities/System/AdminHelpers.cs +++ b/src/libraries/Common/tests/TestUtilities/System/AdminHelpers.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.ComponentModel; using System.Diagnostics; diff --git a/src/libraries/Common/tests/TestUtilities/System/AssertExtensions.cs b/src/libraries/Common/tests/TestUtilities/System/AssertExtensions.cs index 45f0d5933366..dea97ee6c706 100644 --- a/src/libraries/Common/tests/TestUtilities/System/AssertExtensions.cs +++ b/src/libraries/Common/tests/TestUtilities/System/AssertExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/tests/TestUtilities/System/Buffers/BoundedMemory.Creation.cs b/src/libraries/Common/tests/TestUtilities/System/Buffers/BoundedMemory.Creation.cs index a31af0e82e43..572c808069b4 100644 --- a/src/libraries/Common/tests/TestUtilities/System/Buffers/BoundedMemory.Creation.cs +++ b/src/libraries/Common/tests/TestUtilities/System/Buffers/BoundedMemory.Creation.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; diff --git a/src/libraries/Common/tests/TestUtilities/System/Buffers/BoundedMemory.Unix.cs b/src/libraries/Common/tests/TestUtilities/System/Buffers/BoundedMemory.Unix.cs index 11049e88ebf0..8718608152a3 100644 --- a/src/libraries/Common/tests/TestUtilities/System/Buffers/BoundedMemory.Unix.cs +++ b/src/libraries/Common/tests/TestUtilities/System/Buffers/BoundedMemory.Unix.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Buffers { diff --git a/src/libraries/Common/tests/TestUtilities/System/Buffers/BoundedMemory.Windows.cs b/src/libraries/Common/tests/TestUtilities/System/Buffers/BoundedMemory.Windows.cs index 5de8ebe55432..6b405a974a35 100644 --- a/src/libraries/Common/tests/TestUtilities/System/Buffers/BoundedMemory.Windows.cs +++ b/src/libraries/Common/tests/TestUtilities/System/Buffers/BoundedMemory.Windows.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Buffers; using System.Runtime.ConstrainedExecution; diff --git a/src/libraries/Common/tests/TestUtilities/System/Buffers/BoundedMemory.cs b/src/libraries/Common/tests/TestUtilities/System/Buffers/BoundedMemory.cs index cc39ff3cd804..d70b30721fdb 100644 --- a/src/libraries/Common/tests/TestUtilities/System/Buffers/BoundedMemory.cs +++ b/src/libraries/Common/tests/TestUtilities/System/Buffers/BoundedMemory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Buffers { @@ -46,4 +45,4 @@ public abstract class BoundedMemory : IDisposable where T : unmanaged /// public abstract void MakeWriteable(); } -} \ No newline at end of file +} diff --git a/src/libraries/Common/tests/TestUtilities/System/Buffers/PoisonPagePlacement.cs b/src/libraries/Common/tests/TestUtilities/System/Buffers/PoisonPagePlacement.cs index ea2caa3136b5..6850abcae30a 100644 --- a/src/libraries/Common/tests/TestUtilities/System/Buffers/PoisonPagePlacement.cs +++ b/src/libraries/Common/tests/TestUtilities/System/Buffers/PoisonPagePlacement.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System.Buffers { @@ -23,4 +22,4 @@ public enum PoisonPagePlacement /// Before, } -} \ No newline at end of file +} diff --git a/src/libraries/Common/tests/TestUtilities/System/IO/FileCleanupTestBase.cs b/src/libraries/Common/tests/TestUtilities/System/IO/FileCleanupTestBase.cs index 8aa81f084928..4e1528200ac0 100644 --- a/src/libraries/Common/tests/TestUtilities/System/IO/FileCleanupTestBase.cs +++ b/src/libraries/Common/tests/TestUtilities/System/IO/FileCleanupTestBase.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; using System.Diagnostics; diff --git a/src/libraries/Common/tests/TestUtilities/System/IO/StreamExtensions.cs b/src/libraries/Common/tests/TestUtilities/System/IO/StreamExtensions.cs index 30ed13c80a25..c26175c5b4af 100644 --- a/src/libraries/Common/tests/TestUtilities/System/IO/StreamExtensions.cs +++ b/src/libraries/Common/tests/TestUtilities/System/IO/StreamExtensions.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Threading; using System.Threading.Tasks; diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Unix.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Unix.cs index 4916e3a3556a..a4a74cdc9ee4 100644 --- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Unix.cs +++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Unix.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Windows.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Windows.cs index 9e94c640a1d8..3a77946a24fe 100644 --- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Windows.cs +++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Windows.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; using System.Runtime.InteropServices; diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs index ba7f5fc6e354..68d07741e57a 100644 --- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs +++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; using System.Security; @@ -22,7 +21,6 @@ public static partial class PlatformDetection public static bool IsNetCore => Environment.Version.Major >= 5 || RuntimeInformation.FrameworkDescription.StartsWith(".NET Core", StringComparison.OrdinalIgnoreCase); public static bool IsMonoRuntime => Type.GetType("Mono.RuntimeStructs") != null; public static bool IsMonoInterpreter => GetIsRunningOnMonoInterpreter(); - public static bool IsNotMonoInterpreter => !IsMonoInterpreter; public static bool IsFreeBSD => RuntimeInformation.IsOSPlatform(OSPlatform.Create("FREEBSD")); public static bool IsNetBSD => RuntimeInformation.IsOSPlatform(OSPlatform.Create("NETBSD")); public static bool IsiOS => RuntimeInformation.IsOSPlatform(OSPlatform.Create("IOS")); @@ -30,6 +28,7 @@ public static partial class PlatformDetection public static bool IsIllumos => RuntimeInformation.IsOSPlatform(OSPlatform.Create("ILLUMOS")); public static bool IsSolaris => RuntimeInformation.IsOSPlatform(OSPlatform.Create("SOLARIS")); public static bool IsBrowser => RuntimeInformation.IsOSPlatform(OSPlatform.Create("BROWSER")); + public static bool IsNotBrowser => !IsBrowser; public static bool IsArmProcess => RuntimeInformation.ProcessArchitecture == Architecture.Arm; public static bool IsNotArmProcess => !IsArmProcess; @@ -43,6 +42,8 @@ public static partial class PlatformDetection public static bool IsNotWindows => !IsWindows; public static bool IsThreadingSupported => !IsBrowser; + public static bool IsBinaryFormatterSupported => !IsBrowser; + // Please make sure that you have the libgdiplus dependency installed. // For details, see https://docs.microsoft.com/dotnet/core/install/dependencies?pivots=os-macos&tabs=netcore31#libgdiplus public static bool IsDrawingSupported @@ -73,9 +74,9 @@ public static bool IsDrawingSupported public static bool SupportsSsl2 => IsWindows && !PlatformDetection.IsWindows10Version1607OrGreater; #if NETCOREAPP - public static bool IsReflectionEmitSupported = RuntimeFeature.IsDynamicCodeSupported; + public static bool IsReflectionEmitSupported => RuntimeFeature.IsDynamicCodeSupported; #else - public static bool IsReflectionEmitSupported = true; + public static bool IsReflectionEmitSupported => true; #endif public static bool IsInvokingStaticConstructorsSupported => true; @@ -161,11 +162,30 @@ public static string GetDistroVersionString() } } - private static Lazy m_icuVersion = new Lazy(GetICUVersion); + private static readonly Lazy m_isInvariant = new Lazy(GetIsInvariantGlobalization); + + private static bool GetIsInvariantGlobalization() + { + Type globalizationMode = Type.GetType("System.Globalization.GlobalizationMode"); + if (globalizationMode != null) + { + MethodInfo methodInfo = globalizationMode.GetProperty("Invariant", BindingFlags.NonPublic | BindingFlags.Static)?.GetMethod; + if (methodInfo != null) + { + return (bool)methodInfo.Invoke(null, null); + } + } + + return false; + } + + private static readonly Lazy m_icuVersion = new Lazy(GetICUVersion); public static Version ICUVersion => m_icuVersion.Value; + public static bool IsInvariantGlobalization => m_isInvariant.Value; + public static bool IsNotInvariantGlobalization => !IsInvariantGlobalization; public static bool IsIcuGlobalization => ICUVersion > new Version(0,0,0,0); - public static bool IsNlsGlobalization => !IsIcuGlobalization; + public static bool IsNlsGlobalization => IsNotInvariantGlobalization && !IsIcuGlobalization; private static Version GetICUVersion() { @@ -286,6 +306,10 @@ private static bool GetTls13Support() private static bool GetIsRunningOnMonoInterpreter() { + // Browser is always using interpreter right now + if (IsBrowser) + return true; + // This is a temporary solution because mono does not support interpreter detection // within the runtime. var val = Environment.GetEnvironmentVariable("MONO_ENV_OPTIONS"); diff --git a/src/libraries/Common/tests/TestUtilities/System/RetryHelper.cs b/src/libraries/Common/tests/TestUtilities/System/RetryHelper.cs index 92244c86c0e9..cd5221e2b41e 100644 --- a/src/libraries/Common/tests/TestUtilities/System/RetryHelper.cs +++ b/src/libraries/Common/tests/TestUtilities/System/RetryHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Threading; @@ -88,4 +87,4 @@ public static async Task ExecuteAsync(Func test, int maxAttempts = 5, Func } } } -} \ No newline at end of file +} diff --git a/src/libraries/Common/tests/TestUtilities/System/TestEnvironment.cs b/src/libraries/Common/tests/TestUtilities/System/TestEnvironment.cs index 0729b8d25789..64209653f14c 100644 --- a/src/libraries/Common/tests/TestUtilities/System/TestEnvironment.cs +++ b/src/libraries/Common/tests/TestUtilities/System/TestEnvironment.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace System { diff --git a/src/libraries/Common/tests/TestUtilities/System/ThreadCultureChange.cs b/src/libraries/Common/tests/TestUtilities/System/ThreadCultureChange.cs index ee799eb87f85..0e223c5180db 100644 --- a/src/libraries/Common/tests/TestUtilities/System/ThreadCultureChange.cs +++ b/src/libraries/Common/tests/TestUtilities/System/ThreadCultureChange.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #nullable enable using System.Globalization; diff --git a/src/libraries/Common/tests/TestUtilities/TestUtilities.csproj b/src/libraries/Common/tests/TestUtilities/TestUtilities.csproj index b9207224c870..cc22d6724e6a 100644 --- a/src/libraries/Common/tests/TestUtilities/TestUtilities.csproj +++ b/src/libraries/Common/tests/TestUtilities/TestUtilities.csproj @@ -1,7 +1,6 @@ true - $(NoWarn);CS1573 - $(NoWarn);SA1129;SA1028;SA1027;SA1121;CA1200;SA1000;CA1507;CA1802;CA1825;CA1018;SA1648;CA2007;SA1001;SA1026;CA1810;SA1206 - $(NoWarn);CS0618 @@ -20,7 +17,7 @@ $(LibrariesProjectRoot)OSGroups.json $(NetCoreAppCurrent) false - $(AdditionalBuildTargetFrameworks);$(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent)-NetBSD;$(NetCoreAppCurrent)-FreeBSD;$(NetCoreAppCurrent)-illumos;$(NetCoreAppCurrent)-Solaris + $(AdditionalBuildTargetFrameworks);$(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-Browser;$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS;$(NetCoreAppCurrent)-Android;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent)-NetBSD;$(NetCoreAppCurrent)-FreeBSD;$(NetCoreAppCurrent)-illumos;$(NetCoreAppCurrent)-Solaris $(RepositoryEngineeringDir)LicenseHeader.txt @@ -256,6 +253,10 @@ $([MSBuild]::NormalizeDirectory('$(RefRootPath)', 'netstandard2.1')) $([MSBuild]::NormalizeDirectory('$(RefRootPath)', '$(NetFrameworkCurrent)')) + + $([MSBuild]::NormalizePath('$(CoreClrProjectRoot)', 'src', 'System.Private.CoreLib', 'System.Private.CoreLib.csproj')) + $([MSBuild]::NormalizePath('$(MonoProjectRoot)', 'netcore', 'System.Private.CoreLib', 'System.Private.CoreLib.csproj')) + $(TargetOS).$(Platform).$(Configuration) AnyOS.AnyCPU.$(Configuration) diff --git a/src/libraries/Directory.Build.targets b/src/libraries/Directory.Build.targets index 520de08894f7..48dc86d6086b 100644 --- a/src/libraries/Directory.Build.targets +++ b/src/libraries/Directory.Build.targets @@ -1,4 +1,4 @@ - + $([MSBuild]::NormalizeDirectory('$(RefRootPath)', '$(TargetFramework)')) @@ -7,6 +7,7 @@ $(NoWarn);nullable + $(NoWarn);nullable @@ -100,12 +101,6 @@ $(MicrosoftNetCoreAppRuntimePackNativeDir) $(MicrosoftNetCoreAppRuntimePackRidLibTfmDir) - - - $(NETCoreAppTestSharedFrameworkPath) - TestHostBinPlaceItem - @@ -165,7 +160,7 @@ $(GenAPIAdditionalParameters) --exclude-api-list "$(_ExcludeAPIList)" $(GenAPIAdditionalParameters) --header-file "$(_LicenseHeaderTxtPath)" $(GenAPIAdditionalParameters) --lang-version "$(LangVersion)" - $(GenAPIAdditionalParameters) --follow-type-forwards + $(GenAPIAdditionalParameters) --follow-type-forwards @@ -184,11 +179,18 @@ - + true + + $(UndefineProperties);TargetFramework + Configuration=$(CoreCLRConfiguration) + Configuration=$(MonoConfiguration) + @@ -217,6 +219,10 @@ + + $(DefineConstants),USE_INTERNAL_ACCESSIBILITY + + diff --git a/src/libraries/GenerateLibrariesSln.ps1 b/src/libraries/GenerateLibrariesSln.ps1 index 387d971593ad..e3e8531edb2d 100644 --- a/src/libraries/GenerateLibrariesSln.ps1 +++ b/src/libraries/GenerateLibrariesSln.ps1 @@ -1,6 +1,5 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. # Creates a .sln that includes all of the library src, ref, or tests projects. diff --git a/src/libraries/Microsoft.CSharp/ref/Microsoft.CSharp.cs b/src/libraries/Microsoft.CSharp/ref/Microsoft.CSharp.cs index e40f70fa301d..720a654cdd55 100644 --- a/src/libraries/Microsoft.CSharp/ref/Microsoft.CSharp.cs +++ b/src/libraries/Microsoft.CSharp/ref/Microsoft.CSharp.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ------------------------------------------------------------------------------ // Changes to this file must follow the https://aka.ms/api-review process. // ------------------------------------------------------------------------------ @@ -10,23 +9,23 @@ namespace Microsoft.CSharp.RuntimeBinder [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static partial class Binder { - public static System.Runtime.CompilerServices.CallSiteBinder BinaryOperation(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, System.Linq.Expressions.ExpressionType operation, System.Type context, System.Collections.Generic.IEnumerable argumentInfo) { throw null; } - public static System.Runtime.CompilerServices.CallSiteBinder Convert(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, System.Type type, System.Type context) { throw null; } - public static System.Runtime.CompilerServices.CallSiteBinder GetIndex(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, System.Type context, System.Collections.Generic.IEnumerable argumentInfo) { throw null; } - public static System.Runtime.CompilerServices.CallSiteBinder GetMember(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, string name, System.Type context, System.Collections.Generic.IEnumerable argumentInfo) { throw null; } - public static System.Runtime.CompilerServices.CallSiteBinder Invoke(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, System.Type context, System.Collections.Generic.IEnumerable argumentInfo) { throw null; } - public static System.Runtime.CompilerServices.CallSiteBinder InvokeConstructor(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, System.Type context, System.Collections.Generic.IEnumerable argumentInfo) { throw null; } - public static System.Runtime.CompilerServices.CallSiteBinder InvokeMember(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, string name, System.Collections.Generic.IEnumerable typeArguments, System.Type context, System.Collections.Generic.IEnumerable argumentInfo) { throw null; } - public static System.Runtime.CompilerServices.CallSiteBinder IsEvent(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, string name, System.Type context) { throw null; } - public static System.Runtime.CompilerServices.CallSiteBinder SetIndex(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, System.Type context, System.Collections.Generic.IEnumerable argumentInfo) { throw null; } - public static System.Runtime.CompilerServices.CallSiteBinder SetMember(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, string name, System.Type context, System.Collections.Generic.IEnumerable argumentInfo) { throw null; } - public static System.Runtime.CompilerServices.CallSiteBinder UnaryOperation(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, System.Linq.Expressions.ExpressionType operation, System.Type context, System.Collections.Generic.IEnumerable argumentInfo) { throw null; } + public static System.Runtime.CompilerServices.CallSiteBinder BinaryOperation(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, System.Linq.Expressions.ExpressionType operation, System.Type? context, System.Collections.Generic.IEnumerable? argumentInfo) { throw null; } + public static System.Runtime.CompilerServices.CallSiteBinder Convert(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, System.Type type, System.Type? context) { throw null; } + public static System.Runtime.CompilerServices.CallSiteBinder GetIndex(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, System.Type? context, System.Collections.Generic.IEnumerable? argumentInfo) { throw null; } + public static System.Runtime.CompilerServices.CallSiteBinder GetMember(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, string name, System.Type? context, System.Collections.Generic.IEnumerable? argumentInfo) { throw null; } + public static System.Runtime.CompilerServices.CallSiteBinder Invoke(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, System.Type? context, System.Collections.Generic.IEnumerable? argumentInfo) { throw null; } + public static System.Runtime.CompilerServices.CallSiteBinder InvokeConstructor(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, System.Type? context, System.Collections.Generic.IEnumerable? argumentInfo) { throw null; } + public static System.Runtime.CompilerServices.CallSiteBinder InvokeMember(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, string name, System.Collections.Generic.IEnumerable? typeArguments, System.Type? context, System.Collections.Generic.IEnumerable? argumentInfo) { throw null; } + public static System.Runtime.CompilerServices.CallSiteBinder IsEvent(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, string name, System.Type? context) { throw null; } + public static System.Runtime.CompilerServices.CallSiteBinder SetIndex(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, System.Type? context, System.Collections.Generic.IEnumerable? argumentInfo) { throw null; } + public static System.Runtime.CompilerServices.CallSiteBinder SetMember(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, string name, System.Type? context, System.Collections.Generic.IEnumerable? argumentInfo) { throw null; } + public static System.Runtime.CompilerServices.CallSiteBinder UnaryOperation(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, System.Linq.Expressions.ExpressionType operation, System.Type? context, System.Collections.Generic.IEnumerable? argumentInfo) { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public sealed partial class CSharpArgumentInfo { internal CSharpArgumentInfo() { } - public static Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags flags, string name) { throw null; } + public static Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags flags, string? name) { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.FlagsAttribute] @@ -59,14 +58,14 @@ public partial class RuntimeBinderException : System.Exception { public RuntimeBinderException() { } protected RuntimeBinderException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } - public RuntimeBinderException(string message) { } - public RuntimeBinderException(string message, System.Exception innerException) { } + public RuntimeBinderException(string? message) { } + public RuntimeBinderException(string? message, System.Exception? innerException) { } } public partial class RuntimeBinderInternalCompilerException : System.Exception { public RuntimeBinderInternalCompilerException() { } protected RuntimeBinderInternalCompilerException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } - public RuntimeBinderInternalCompilerException(string message) { } - public RuntimeBinderInternalCompilerException(string message, System.Exception innerException) { } + public RuntimeBinderInternalCompilerException(string? message) { } + public RuntimeBinderInternalCompilerException(string? message, System.Exception? innerException) { } } } diff --git a/src/libraries/Microsoft.CSharp/ref/Microsoft.CSharp.csproj b/src/libraries/Microsoft.CSharp/ref/Microsoft.CSharp.csproj index 3cedd9251b07..739cd0edbbe8 100644 --- a/src/libraries/Microsoft.CSharp/ref/Microsoft.CSharp.csproj +++ b/src/libraries/Microsoft.CSharp/ref/Microsoft.CSharp.csproj @@ -1,6 +1,7 @@ $(NetCoreAppCurrent) + enable diff --git a/src/libraries/Microsoft.CSharp/src/ILLinkTrim.xml b/src/libraries/Microsoft.CSharp/src/ILLinkTrim.xml index 4260df005ff0..25a8429f396d 100644 --- a/src/libraries/Microsoft.CSharp/src/ILLinkTrim.xml +++ b/src/libraries/Microsoft.CSharp/src/ILLinkTrim.xml @@ -1,10 +1,13 @@ + + + + + - - - \ No newline at end of file + diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft.CSharp.csproj b/src/libraries/Microsoft.CSharp/src/Microsoft.CSharp.csproj index dfa421a3900b..0a85130f66d8 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft.CSharp.csproj +++ b/src/libraries/Microsoft.CSharp/src/Microsoft.CSharp.csproj @@ -3,6 +3,8 @@ Microsoft.CSharp Microsoft.CSharp $(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent) + enable + $(NoWarn);nullable true diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ArgumentObject.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ArgumentObject.cs index 63f2fe97cce8..27a526ed7de1 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ArgumentObject.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ArgumentObject.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Binder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Binder.cs index f6d034daf580..0f51633431f5 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Binder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Binder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -29,8 +28,8 @@ public static class Binder public static CallSiteBinder BinaryOperation( CSharpBinderFlags flags, ExpressionType operation, - Type context, - IEnumerable argumentInfo) + Type? context, + IEnumerable? argumentInfo) { bool isChecked = (flags & CSharpBinderFlags.CheckedContext) != 0; bool isLogical = (flags & CSharpBinderFlags.BinaryOperationLogical) != 0; @@ -56,7 +55,7 @@ public static CallSiteBinder BinaryOperation( public static CallSiteBinder Convert( CSharpBinderFlags flags, Type type, - Type context) + Type? context) { CSharpConversionKind conversionKind = ((flags & CSharpBinderFlags.ConvertExplicit) != 0) ? @@ -81,8 +80,8 @@ public static CallSiteBinder Convert( /// Returns a new CSharp get index binder. public static CallSiteBinder GetIndex( CSharpBinderFlags flags, - Type context, - IEnumerable argumentInfo) + Type? context, + IEnumerable? argumentInfo) { return new CSharpGetIndexBinder(context, argumentInfo).TryGetExisting(); } @@ -100,8 +99,8 @@ public static CallSiteBinder GetIndex( public static CallSiteBinder GetMember( CSharpBinderFlags flags, string name, - Type context, - IEnumerable argumentInfo) + Type? context, + IEnumerable? argumentInfo) { bool allowCallables = (flags & CSharpBinderFlags.ResultIndexed) != 0; return new CSharpGetMemberBinder(name, allowCallables, context, argumentInfo).TryGetExisting(); @@ -118,8 +117,8 @@ public static CallSiteBinder GetMember( /// Returns a new CSharp invoke binder. public static CallSiteBinder Invoke( CSharpBinderFlags flags, - Type context, - IEnumerable argumentInfo) + Type? context, + IEnumerable? argumentInfo) { bool resultDiscarded = (flags & CSharpBinderFlags.ResultDiscarded) != 0; @@ -146,9 +145,9 @@ public static CallSiteBinder Invoke( public static CallSiteBinder InvokeMember( CSharpBinderFlags flags, string name, - IEnumerable typeArguments, - Type context, - IEnumerable argumentInfo) + IEnumerable? typeArguments, + Type? context, + IEnumerable? argumentInfo) { bool invokeSimpleName = (flags & CSharpBinderFlags.InvokeSimpleName) != 0; bool invokeSpecialName = (flags & CSharpBinderFlags.InvokeSpecialName) != 0; @@ -182,8 +181,8 @@ public static CallSiteBinder InvokeMember( /// Returns a new CSharp invoke constructor binder. public static CallSiteBinder InvokeConstructor( CSharpBinderFlags flags, - Type context, - IEnumerable argumentInfo) + Type? context, + IEnumerable? argumentInfo) { return new CSharpInvokeConstructorBinder(CSharpCallFlags.None, context, argumentInfo).TryGetExisting(); } @@ -200,7 +199,7 @@ public static CallSiteBinder InvokeConstructor( public static CallSiteBinder IsEvent( CSharpBinderFlags flags, string name, - Type context) + Type? context) { return new CSharpIsEventBinder(name, context).TryGetExisting(); } @@ -216,8 +215,8 @@ public static CallSiteBinder IsEvent( /// Returns a new CSharp set index binder. public static CallSiteBinder SetIndex( CSharpBinderFlags flags, - Type context, - IEnumerable argumentInfo) + Type? context, + IEnumerable? argumentInfo) { bool isCompoundAssignment = (flags & CSharpBinderFlags.ValueFromCompoundAssignment) != 0; bool isChecked = (flags & CSharpBinderFlags.CheckedContext) != 0; @@ -237,8 +236,8 @@ public static CallSiteBinder SetIndex( public static CallSiteBinder SetMember( CSharpBinderFlags flags, string name, - Type context, - IEnumerable argumentInfo) + Type? context, + IEnumerable? argumentInfo) { bool isCompoundAssignment = (flags & CSharpBinderFlags.ValueFromCompoundAssignment) != 0; bool isChecked = (flags & CSharpBinderFlags.CheckedContext) != 0; @@ -258,8 +257,8 @@ public static CallSiteBinder SetMember( public static CallSiteBinder UnaryOperation( CSharpBinderFlags flags, ExpressionType operation, - Type context, - IEnumerable argumentInfo) + Type? context, + IEnumerable? argumentInfo) { bool isChecked = (flags & CSharpBinderFlags.CheckedContext) != 0; return new CSharpUnaryOperationBinder(operation, isChecked, context, argumentInfo).TryGetExisting(); diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/BinderEquivalence.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/BinderEquivalence.cs index 3ea5f16f0a87..d9dabd2e838e 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/BinderEquivalence.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/BinderEquivalence.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Concurrent; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/BinderHelper.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/BinderHelper.cs index 688e3f1f677d..60b1c044f208 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/BinderHelper.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/BinderHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpArgumentInfo.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpArgumentInfo.cs index a6dd399b86d6..f49b5877b474 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpArgumentInfo.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpArgumentInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.ComponentModel; using System.Numerics.Hashing; @@ -38,7 +37,7 @@ private CSharpArgumentInfo(CSharpArgumentInfoFlags flags, string name) /// /// The flags for the argument. /// The name of the argument, if named; otherwise null. - public static CSharpArgumentInfo Create(CSharpArgumentInfoFlags flags, string name) + public static CSharpArgumentInfo Create(CSharpArgumentInfoFlags flags, string? name) { return new CSharpArgumentInfo(flags, name); } diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpArgumentInfoFlags.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpArgumentInfoFlags.cs index 7f1e1fa6d1c5..dce1c78a74a0 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpArgumentInfoFlags.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpArgumentInfoFlags.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.ComponentModel; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpBinaryOperationBinder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpBinaryOperationBinder.cs index 1fa962518682..91104f1c0240 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpBinaryOperationBinder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpBinaryOperationBinder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -19,7 +18,7 @@ namespace Microsoft.CSharp.RuntimeBinder /// internal sealed class CSharpBinaryOperationBinder : BinaryOperationBinder, ICSharpBinder { - [ExcludeFromCodeCoverage] + [ExcludeFromCodeCoverage(Justification = "Name should not be called for this binder")] public string Name { get diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpBinaryOperationFlags.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpBinaryOperationFlags.cs index 867dde5ba015..4a00605b27b6 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpBinaryOperationFlags.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpBinaryOperationFlags.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpBinderFlags.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpBinderFlags.cs index 9013fd9b4cf7..33e229406074 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpBinderFlags.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpBinderFlags.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.ComponentModel; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpCallFlags.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpCallFlags.cs index bd89be534879..de256f3c0502 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpCallFlags.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpCallFlags.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpConversionKind.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpConversionKind.cs index e7b6c19ffc10..d3e154c58fb3 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpConversionKind.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpConversionKind.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpConvertBinder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpConvertBinder.cs index 21b405bd8b8e..f69364fd2602 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpConvertBinder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpConvertBinder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; @@ -18,7 +17,7 @@ namespace Microsoft.CSharp.RuntimeBinder /// internal sealed class CSharpConvertBinder : ConvertBinder, ICSharpBinder { - [ExcludeFromCodeCoverage] + [ExcludeFromCodeCoverage(Justification = "Name should not be called for this binder")] public string Name { get diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpGetIndexBinder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpGetIndexBinder.cs index eed44278033d..b2b793afd797 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpGetIndexBinder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpGetIndexBinder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpGetMemberBinder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpGetMemberBinder.cs index 9518fb9e995f..a0a59d1046bd 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpGetMemberBinder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpGetMemberBinder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpInvokeBinder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpInvokeBinder.cs index 91dd98aa6c8d..b4314c6c6c59 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpInvokeBinder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpInvokeBinder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpInvokeConstructorBinder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpInvokeConstructorBinder.cs index d509649a55c3..3f991ba9d839 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpInvokeConstructorBinder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpInvokeConstructorBinder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpInvokeMemberBinder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpInvokeMemberBinder.cs index a696b83df88e..839be81cd450 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpInvokeMemberBinder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpInvokeMemberBinder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpIsEventBinder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpIsEventBinder.cs index 643e2614c2ee..3faaa5323667 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpIsEventBinder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpIsEventBinder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Dynamic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpSetIndexBinder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpSetIndexBinder.cs index 75693962c22d..5c6d3dc98b72 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpSetIndexBinder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpSetIndexBinder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpSetMemberBinder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpSetMemberBinder.cs index a3b894e2ced1..3ae5888c9e0c 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpSetMemberBinder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpSetMemberBinder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpUnaryOperationBinder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpUnaryOperationBinder.cs index c2c2bfae3a18..04c6918d2211 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpUnaryOperationBinder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpUnaryOperationBinder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -19,7 +18,7 @@ namespace Microsoft.CSharp.RuntimeBinder /// internal sealed class CSharpUnaryOperationBinder : UnaryOperationBinder, ICSharpBinder { - [ExcludeFromCodeCoverage] + [ExcludeFromCodeCoverage(Justification = "Name should not be called for this binder")] public string Name { get diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ArgBuilder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ArgBuilder.cs index 3304457b8a2a..cffbc296e524 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ArgBuilder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ArgBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Linq.Expressions; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/BoolArgBuilder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/BoolArgBuilder.cs index 2073beb5e776..f217f47e4f67 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/BoolArgBuilder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/BoolArgBuilder.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/BoundDispEvent.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/BoundDispEvent.cs index 7b0dbff4c4b6..8333155e8000 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/BoundDispEvent.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/BoundDispEvent.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Dynamic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/CollectionExtensions.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/CollectionExtensions.cs index 624a986d88ac..4766b997552d 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/CollectionExtensions.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/CollectionExtensions.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComBinder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComBinder.cs index 54047565da3b..72cb67757002 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComBinder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComBinder.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Dynamic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComBinderHelpers.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComBinderHelpers.cs index a8f271326800..1ce21e788fb0 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComBinderHelpers.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComBinderHelpers.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable 618 // CurrencyWrapper is obsolete diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComClassMetaObject.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComClassMetaObject.cs index e4af1a9bb3a3..45075a2cc175 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComClassMetaObject.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComClassMetaObject.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Dynamic; using System.Linq.Expressions; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComEventDesc.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComEventDesc.cs index 9c2e66a22216..bf728a6e7ec1 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComEventDesc.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComEventDesc.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComEventSinksContainer.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComEventSinksContainer.cs index bee08133eb14..2b9a068b3cc1 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComEventSinksContainer.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComEventSinksContainer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComEventsSink.Extended.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComEventsSink.Extended.cs index dfa67fecc43c..48347611f408 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComEventsSink.Extended.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComEventsSink.Extended.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComFallbackMetaObject.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComFallbackMetaObject.cs index f290dc195db6..f7934b493f0a 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComFallbackMetaObject.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComFallbackMetaObject.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Dynamic; using System.Linq.Expressions; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComHresults.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComHresults.cs index 0018d78c3199..991f408857a3 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComHresults.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComHresults.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.ComInterop { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComInterop.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComInterop.cs index 09c2e613ba97..275a6d505386 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComInterop.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComInterop.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComInvokeAction.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComInvokeAction.cs index 2ec7ebb81004..62f2685e5a2d 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComInvokeAction.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComInvokeAction.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.ObjectModel; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComInvokeBinder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComInvokeBinder.cs index 54bb33074819..1c7737801ecb 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComInvokeBinder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComInvokeBinder.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComMetaObject.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComMetaObject.cs index 8c227ca44e92..47e8f42414b2 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComMetaObject.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComMetaObject.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Dynamic; using System.Linq.Expressions; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComMethodDesc.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComMethodDesc.cs index 9f7a9228d9b4..5a700071697e 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComMethodDesc.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComMethodDesc.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Runtime.InteropServices.ComTypes; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComObject.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComObject.cs index dce845fcfb36..b4724ca2fccd 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComObject.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComObject.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComRuntimeHelpers.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComRuntimeHelpers.cs index 11bfce9b08dc..01bc32bf59ae 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComRuntimeHelpers.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComRuntimeHelpers.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComTypeClassDesc.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComTypeClassDesc.cs index ba49679eab3d..1c33aff3b435 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComTypeClassDesc.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComTypeClassDesc.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComTypeDesc.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComTypeDesc.cs index bd5ef8122b88..0abdd7e0d87a 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComTypeDesc.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComTypeDesc.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComTypeEnumDesc.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComTypeEnumDesc.cs index 0e5c699a3542..470f55e59a00 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComTypeEnumDesc.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComTypeEnumDesc.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Dynamic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComTypeLibDesc.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComTypeLibDesc.cs index cd662aa0e8a3..a65ba460a3bd 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComTypeLibDesc.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComTypeLibDesc.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ConversionArgBuilder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ConversionArgBuilder.cs index 56ec65fdb3b3..dccd3ab0768e 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ConversionArgBuilder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ConversionArgBuilder.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Linq.Expressions; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ConvertArgBuilder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ConvertArgBuilder.cs index 1daafde14401..122ad62a83e7 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ConvertArgBuilder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ConvertArgBuilder.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Linq.Expressions; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ConvertibleArgBuilder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ConvertibleArgBuilder.cs index b7db917a4500..b9dd4b1a3c8c 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ConvertibleArgBuilder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ConvertibleArgBuilder.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Linq.Expressions; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/CurrencyArgBuilder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/CurrencyArgBuilder.cs index a28e0732a1fb..9422fee88eec 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/CurrencyArgBuilder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/CurrencyArgBuilder.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable 618 // CurrencyWrapper is obsolete diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/DateTimeArgBuilder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/DateTimeArgBuilder.cs index 5ba3103cdbad..124ba097e83a 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/DateTimeArgBuilder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/DateTimeArgBuilder.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/DispCallable.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/DispCallable.cs index 4afbcaafd3bf..53f9d453a6c7 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/DispCallable.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/DispCallable.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Dynamic; using System.Globalization; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/DispCallableMetaObject.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/DispCallableMetaObject.cs index 9d85626f4385..b3a2afcf098d 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/DispCallableMetaObject.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/DispCallableMetaObject.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Dynamic; using System.Linq.Expressions; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/DispatchArgBuilder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/DispatchArgBuilder.cs index 9b89f8495260..2c0c9d05af98 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/DispatchArgBuilder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/DispatchArgBuilder.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Linq.Expressions; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ErrorArgBuilder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ErrorArgBuilder.cs index 9981f7c12bdf..ce82891bddc3 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ErrorArgBuilder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ErrorArgBuilder.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/Errors.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/Errors.cs index 212d6f1ba402..2baec1e76e6e 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/Errors.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/Errors.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ExcepInfo.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ExcepInfo.cs index 98866b131862..9f9276291ad4 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ExcepInfo.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ExcepInfo.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/Helpers.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/Helpers.cs index be82aa4a53b0..f55b2edd1122 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/Helpers.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/Helpers.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Linq.Expressions; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/IDispatchComObject.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/IDispatchComObject.cs index 1b60e02dce01..4ce86951f1aa 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/IDispatchComObject.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/IDispatchComObject.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections; @@ -271,7 +270,6 @@ internal override IList GetMemberNames(bool dataOnly) return ComTypeDesc.GetMemberNames(dataOnly); } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] internal override IList> GetMembers(IEnumerable names) { if (names == null) @@ -321,7 +319,6 @@ DynamicMetaObject IDynamicMetaObjectProvider.GetMetaObject(Expression parameter) return new IDispatchMetaObject(parameter, this); } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2201:DoNotRaiseReservedExceptionTypes")] private static void GetFuncDescForDescIndex(ComTypes.ITypeInfo typeInfo, int funcIndex, out ComTypes.FUNCDESC funcDesc, out IntPtr funcDescHandle) { IntPtr pFuncDesc; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/IDispatchMetaObject.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/IDispatchMetaObject.cs index 881e1e389485..d3287b07eca8 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/IDispatchMetaObject.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/IDispatchMetaObject.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Dynamic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/IPseudoComObject.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/IPseudoComObject.cs index e5e585a34b87..43c3f98bbd82 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/IPseudoComObject.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/IPseudoComObject.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Dynamic; using System.Linq.Expressions; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/NullArgBuilder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/NullArgBuilder.cs index a2482c2fc514..5f8ae5fc7edb 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/NullArgBuilder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/NullArgBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Linq.Expressions; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/SimpleArgBuilder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/SimpleArgBuilder.cs index a92b53a65af0..2b4cdb798ce9 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/SimpleArgBuilder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/SimpleArgBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/SplatCallSite.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/SplatCallSite.cs index 9b290568c285..557803d83d6e 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/SplatCallSite.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/SplatCallSite.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/StringArgBuilder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/StringArgBuilder.cs index e087bf58eae8..be07da742295 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/StringArgBuilder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/StringArgBuilder.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/TypeEnumMetaObject.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/TypeEnumMetaObject.cs index 5223ba60d45a..b2b55a25b260 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/TypeEnumMetaObject.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/TypeEnumMetaObject.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/TypeLibMetaObject.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/TypeLibMetaObject.cs index eb4ca13aa3bb..ffc383536673 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/TypeLibMetaObject.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/TypeLibMetaObject.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Dynamic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/TypeUtils.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/TypeUtils.cs index 4c176f8588c7..c5221aa6d36c 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/TypeUtils.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/TypeUtils.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Reflection; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/UnknownArgBuilder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/UnknownArgBuilder.cs index 0d620727c6e3..dfe0f46bf34f 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/UnknownArgBuilder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/UnknownArgBuilder.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Linq.Expressions; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/VarEnumSelector.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/VarEnumSelector.cs index d82c8bcfddfb..0397e0c22816 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/VarEnumSelector.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/VarEnumSelector.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #pragma warning disable 618 // The *Wrapper classes for COM are obsolete diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/Variant.Extended.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/Variant.Extended.cs index 9da8718f8392..5736b36a4d02 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/Variant.Extended.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/Variant.Extended.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Globalization; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/VariantArgBuilder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/VariantArgBuilder.cs index cd243020c640..f6cd5dc34d3c 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/VariantArgBuilder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/VariantArgBuilder.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Linq.Expressions; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/VariantArray.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/VariantArray.cs index 86760148f14f..620cc299c083 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/VariantArray.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/VariantArray.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/VariantBuilder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/VariantBuilder.cs index cf726ac64045..c09e2aa4e1c4 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/VariantBuilder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/VariantBuilder.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Linq.Expressions; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/DynamicDebuggerProxy.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/DynamicDebuggerProxy.cs index 61f013fa154b..c859eb5326ba 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/DynamicDebuggerProxy.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/DynamicDebuggerProxy.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Error.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Error.cs index b9968e57e262..2034570068fa 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Error.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Error.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/ErrorCode.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/ErrorCode.cs index a386666274f6..bb0fbcacf97e 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/ErrorCode.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/ErrorCode.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.Errors { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/ErrorFacts.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/ErrorFacts.cs index ad0f121301ca..b579bc05f199 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/ErrorFacts.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/ErrorFacts.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/ErrorFmt.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/ErrorFmt.cs index 92f89f9fcd6b..2aa1150207d2 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/ErrorFmt.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/ErrorFmt.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/ErrorHandling.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/ErrorHandling.cs index e06cbc4a0585..fcd9aeeb33f4 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/ErrorHandling.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/ErrorHandling.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/MessageID.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/MessageID.cs index 20e9410cc506..e600cd76d05c 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/MessageID.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/MessageID.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.Errors { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/UserStringBuilder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/UserStringBuilder.cs index ebb8dd8f603e..a30b08e4f51d 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/UserStringBuilder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/UserStringBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Globalization; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ExpressionTreeCallRewriter.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ExpressionTreeCallRewriter.cs index 2e110c73af12..380d9d1e4053 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ExpressionTreeCallRewriter.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ExpressionTreeCallRewriter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ICSharpBinder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ICSharpBinder.cs index d1b2d8c58725..dd08d83583fa 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ICSharpBinder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ICSharpBinder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.CSharp.RuntimeBinder.Semantics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ICSharpInvokeOrInvokeMemberBinder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ICSharpInvokeOrInvokeMemberBinder.cs index fb8751e4804a..febaf763e55e 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ICSharpInvokeOrInvokeMemberBinder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ICSharpInvokeOrInvokeMemberBinder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinder.cs index 5b76e78bd664..5ddca8566931 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinderException.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinderException.cs index 4fafc4157d4b..4f5604848561 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinderException.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinderException.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.Serialization; @@ -26,7 +25,7 @@ public RuntimeBinderException() /// Initializes a new instance of the class with a specified error message. /// /// The error message that explains the reason for the exception. - public RuntimeBinderException(string message) + public RuntimeBinderException(string? message) : base(message) { } @@ -37,7 +36,7 @@ public RuntimeBinderException(string message) /// /// The error message that explains the reason for the exception. /// The exception that is the cause of the current exception, or a null reference if no inner exception is specified. - public RuntimeBinderException(string message, Exception innerException) + public RuntimeBinderException(string? message, Exception? innerException) : base(message, innerException) { } diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinderExtensions.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinderExtensions.cs index 3cc1e52fb30b..3e3307c99834 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinderExtensions.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinderExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinderInternalCompilerException.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinderInternalCompilerException.cs index 436dde70f478..babe0e5e4c28 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinderInternalCompilerException.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinderInternalCompilerException.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.Serialization; @@ -26,7 +25,7 @@ public RuntimeBinderInternalCompilerException() /// Initializes a new instance of the class with a specified error message. /// /// The error message that explains the reason for the exception. - public RuntimeBinderInternalCompilerException(string message) + public RuntimeBinderInternalCompilerException(string? message) : base(message) { } @@ -37,7 +36,7 @@ public RuntimeBinderInternalCompilerException(string message) /// /// The error message that explains the reason for the exception. /// The exception that is the cause of the current exception, or a null reference if no inner exception is specified. - public RuntimeBinderInternalCompilerException(string message, Exception innerException) + public RuntimeBinderInternalCompilerException(string? message, Exception? innerException) : base(message, innerException) { } diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/BinOpArgInfo.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/BinOpArgInfo.cs index ce1b8586167a..92c5441e8ff2 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/BinOpArgInfo.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/BinOpArgInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using Microsoft.CSharp.RuntimeBinder.Syntax; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/BinOpKind.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/BinOpKind.cs index 9465fb86fffb..8a941dbba495 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/BinOpKind.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/BinOpKind.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/BinOpSig.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/BinOpSig.cs index b24b6096b0ac..9874eaef5647 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/BinOpSig.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/BinOpSig.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using Microsoft.CSharp.RuntimeBinder.Syntax; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/Better.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/Better.cs index ca2cf71ef989..22e754f4e00c 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/Better.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/Better.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/BindingContext.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/BindingContext.cs index cfbdee42ae29..2a195e067b6c 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/BindingContext.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/BindingContext.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.Semantics { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/BindingFlag.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/BindingFlag.cs index c000b62e1eb1..4c53c24c8116 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/BindingFlag.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/BindingFlag.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/COperators.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/COperators.cs index 0a658ce7c1bd..25aa4ee6feb2 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/COperators.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/COperators.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using Microsoft.CSharp.RuntimeBinder.Syntax; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/CandidateFunctionMember.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/CandidateFunctionMember.cs index 66b9a85d89e9..839ec110ff30 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/CandidateFunctionMember.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/CandidateFunctionMember.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.Semantics { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ConstVal.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ConstVal.cs index 50b1144803eb..a9f81d3c5b6d 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ConstVal.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ConstVal.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Globalization; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Conversion.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Conversion.cs index 3817e0bd226f..cdee4bc4154f 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Conversion.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Conversion.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -208,7 +207,7 @@ private static bool isUserDefinedConversion(PredefinedType ptSrc, PredefinedType new byte[] /* OBJECT */ { right, right, right, right, right, right, right, right, right, right, right, right, right, right, right, same } }; #if DEBUG - private static volatile bool s_fCheckedBetter = false; + private static volatile bool s_fCheckedBetter; private void CheckBetterTable() { if (s_fCheckedBetter) diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Conversions.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Conversions.cs index b696e966e6b0..670bda77d40f 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Conversions.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Conversions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using Microsoft.CSharp.RuntimeBinder.Syntax; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/EXPRExtensions.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/EXPRExtensions.cs index 5cc75809b257..72edae295973 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/EXPRExtensions.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/EXPRExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/EXPRFLAG.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/EXPRFLAG.cs index 9d1e9a69be9b..61eac0d6de69 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/EXPRFLAG.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/EXPRFLAG.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExplicitConversion.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExplicitConversion.cs index d9740166c28e..f51d12b4e9a5 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExplicitConversion.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExplicitConversion.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using Microsoft.CSharp.RuntimeBinder.Syntax; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExprFactory.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExprFactory.cs index f134123c9aa5..1d83a5c20147 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExprFactory.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExprFactory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExpressionBinder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExpressionBinder.cs index 6fe2274602ce..b9966f1ce36e 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExpressionBinder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExpressionBinder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExpressionKind.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExpressionKind.cs index cac3b3a87e40..93de00fbeb41 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExpressionKind.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExpressionKind.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.Semantics { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/FundamentalTypes.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/FundamentalTypes.cs index 5494b421473b..b06912411547 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/FundamentalTypes.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/FundamentalTypes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.Semantics { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/GroupToArgsBinder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/GroupToArgsBinder.cs index fa24d717c1ce..71412c94c569 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/GroupToArgsBinder.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/GroupToArgsBinder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/GroupToArgsBinderResult.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/GroupToArgsBinderResult.cs index 09618fc6cc29..7298e3c7f388 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/GroupToArgsBinderResult.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/GroupToArgsBinderResult.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.Semantics diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ImplicitConversion.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ImplicitConversion.cs index 5ca7ed7c588a..d6746409ebfb 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ImplicitConversion.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ImplicitConversion.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using Microsoft.CSharp.RuntimeBinder.Syntax; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/MemberLookup.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/MemberLookup.cs index 4634d69328bd..ba90b4d88a42 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/MemberLookup.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/MemberLookup.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/MemberLookupResults.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/MemberLookupResults.cs index 7c21f1487d01..15e85f43dfae 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/MemberLookupResults.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/MemberLookupResults.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using Microsoft.CSharp.RuntimeBinder.Syntax; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/MethodIterator.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/MethodIterator.cs index ef5b8fcf43e9..a27bc633f07d 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/MethodIterator.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/MethodIterator.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/MethodKind.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/MethodKind.cs index f78e221cd7cb..8d6f78b4c7f2 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/MethodKind.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/MethodKind.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.Semantics { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/MethodTypeInferrer.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/MethodTypeInferrer.cs index b11441e10de5..ce8902226a54 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/MethodTypeInferrer.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/MethodTypeInferrer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Nullable.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Nullable.cs index 425e9102c41b..39c1ddfcec47 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Nullable.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Nullable.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/NullableLift.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/NullableLift.cs index c0121415313c..c8639f704d21 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/NullableLift.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/NullableLift.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.Semantics { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Operators.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Operators.cs index dc8763885bd7..6aad1a081dae 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Operators.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Operators.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/PredefinedMembers.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/PredefinedMembers.cs index 6555da7eea8b..ee501afe1ac0 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/PredefinedMembers.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/PredefinedMembers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using Microsoft.CSharp.RuntimeBinder.Syntax; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/SemanticChecker.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/SemanticChecker.cs index 1daef0bcb78e..e90e98f880e5 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/SemanticChecker.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/SemanticChecker.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using Microsoft.CSharp.RuntimeBinder.Errors; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/SubstitutionContext.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/SubstitutionContext.cs index 6422e9599e11..ba4f4d245b30 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/SubstitutionContext.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/SubstitutionContext.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/AggregateSymbol.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/AggregateSymbol.cs index 780687b785f2..9d9c3b6d3037 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/AggregateSymbol.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/AggregateSymbol.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/EventSymbol.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/EventSymbol.cs index d01d707b7531..474e37479f90 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/EventSymbol.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/EventSymbol.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Reflection; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/FieldSymbol.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/FieldSymbol.cs index 996a1cc8d7fa..8e9bb895a21d 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/FieldSymbol.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/FieldSymbol.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Reflection; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/IndexerSymbol.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/IndexerSymbol.cs index c4b22b4f9593..340eb5122400 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/IndexerSymbol.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/IndexerSymbol.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.Semantics { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/LocalVariableSymbol.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/LocalVariableSymbol.cs index 54e659dacf27..3913da74f011 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/LocalVariableSymbol.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/LocalVariableSymbol.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.Semantics { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/MethodOrPropertySymbol.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/MethodOrPropertySymbol.cs index 52d93d254e1c..44b95bebf9bf 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/MethodOrPropertySymbol.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/MethodOrPropertySymbol.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/MethodSymbol.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/MethodSymbol.cs index 700af7af9f14..64f05caed889 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/MethodSymbol.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/MethodSymbol.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Reflection; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/NamespaceOrAggregateSymbol.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/NamespaceOrAggregateSymbol.cs index d1d235fc4d3a..5b200d6a73c4 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/NamespaceOrAggregateSymbol.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/NamespaceOrAggregateSymbol.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/NamespaceSymbol.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/NamespaceSymbol.cs index 95fd2a4195e1..a47953691bbb 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/NamespaceSymbol.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/NamespaceSymbol.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/ParentSymbol.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/ParentSymbol.cs index b60146045a94..6e9ad2d7c06a 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/ParentSymbol.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/ParentSymbol.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/PropertySymbol.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/PropertySymbol.cs index b0c9089b0acb..09972ae56125 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/PropertySymbol.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/PropertySymbol.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Reflection; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/Scope.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/Scope.cs index 10086defa16f..fe7e99a85906 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/Scope.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/Scope.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.Semantics { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/SymFactory.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/SymFactory.cs index a59b513efe8e..98b8b18a2973 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/SymFactory.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/SymFactory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using Microsoft.CSharp.RuntimeBinder.Syntax; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/Symbol.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/Symbol.cs index 9c7d6da6b911..d00a64dbb782 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/Symbol.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/Symbol.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/SymbolKind.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/SymbolKind.cs index 57bc0708858e..4b3604fafc23 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/SymbolKind.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/SymbolKind.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.Semantics { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/SymbolLoader.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/SymbolLoader.cs index 2ada4e37b0f0..3fa95f2ba339 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/SymbolLoader.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/SymbolLoader.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using Microsoft.CSharp.RuntimeBinder.Syntax; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/SymbolMask.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/SymbolMask.cs index b8b74eedf207..73b3ec2eb633 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/SymbolMask.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/SymbolMask.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/SymbolStore.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/SymbolStore.cs index 96f019ec3cfa..24a1786c1519 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/SymbolStore.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/SymbolStore.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -90,7 +89,7 @@ public Key(Name name, ParentSymbol parent) public bool Equals(Key other) => _name == other._name && _parent == other._parent; #if DEBUG - [ExcludeFromCodeCoverage] // Typed overload should always be the method called. + [ExcludeFromCodeCoverage(Justification = "Typed overload should always be the method called")] #endif public override bool Equals(object obj) { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/TypeParameterSymbol.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/TypeParameterSymbol.cs index 6ee988889924..3314a8bf63b7 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/TypeParameterSymbol.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/TypeParameterSymbol.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/VariableSymbol.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/VariableSymbol.cs index e4bbeced5047..28773f9005a6 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/VariableSymbol.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/VariableSymbol.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.Semantics { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ArrayIndex.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ArrayIndex.cs index 19a478120e6a..c0c39807e45e 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ArrayIndex.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ArrayIndex.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.Semantics { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ArrayInitialization.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ArrayInitialization.cs index d21366f345f9..93599888c65e 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ArrayInitialization.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ArrayInitialization.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.Semantics { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Assignment.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Assignment.cs index b7c39acc8f6d..5ef87dc8a5f6 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Assignment.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Assignment.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.Semantics { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/BinaryOperator.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/BinaryOperator.cs index 82afe7bf0e9c..84489b5e935b 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/BinaryOperator.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/BinaryOperator.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/BoundAnonymousFunction.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/BoundAnonymousFunction.cs index 5fdaac504e01..e1d9fc677b79 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/BoundAnonymousFunction.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/BoundAnonymousFunction.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Call.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Call.cs index 5b148ff09c03..b77cc49373d5 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Call.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Call.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Cast.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Cast.cs index fc4c67f40b1a..5270033d5ef0 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Cast.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Cast.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Class.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Class.cs index 4975d4c62aea..faae431cba48 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Class.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Class.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/CompoundOperator.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/CompoundOperator.cs index af3ccd3cd0bd..909d1e02895d 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/CompoundOperator.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/CompoundOperator.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Concatenate.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Concatenate.cs index 4a379a9e9503..18b8cfb8b0ee 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Concatenate.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Concatenate.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using Microsoft.CSharp.RuntimeBinder.Syntax; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Constant.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Constant.cs index 59e920292dfb..20d33816622c 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Constant.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Constant.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/EXPR.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/EXPR.cs index f1ef38f58b83..4f4de917eb46 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/EXPR.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/EXPR.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Diagnostics.CodeAnalysis; @@ -39,7 +38,7 @@ public CType Type protected set { _type = value; } } - [ExcludeFromCodeCoverage] // Should only be called through override. + [ExcludeFromCodeCoverage(Justification = "Should only be called through override")] public virtual object Object { get diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ExprOperator.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ExprOperator.cs index 6ebb848f7916..5ea9c3753224 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ExprOperator.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ExprOperator.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ExprWithArgs.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ExprWithArgs.cs index a91db12b2405..83faa1b35c1b 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ExprWithArgs.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ExprWithArgs.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.Semantics { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ExprWithType.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ExprWithType.cs index cdc7871d79b5..b655ae6427d3 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ExprWithType.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ExprWithType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ExpressionIterator.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ExpressionIterator.cs index eb1bb3a8b9a8..3c13744067b1 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ExpressionIterator.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ExpressionIterator.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.Semantics { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Field.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Field.cs index 057ac3a4e0ae..9d0fb483ebd2 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Field.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Field.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.Semantics { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/FieldInfo.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/FieldInfo.cs index ce272b32b6aa..0d3b35862dc4 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/FieldInfo.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/FieldInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/List.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/List.cs index 4be6e5625c15..848f29a33ca1 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/List.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/List.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.Semantics { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/LocalVariable.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/LocalVariable.cs index 05bc26d64f5f..5a50a3fb8924 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/LocalVariable.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/LocalVariable.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/MemberGroup.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/MemberGroup.cs index cd95c0c7141c..6fc42dddc7ad 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/MemberGroup.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/MemberGroup.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using Microsoft.CSharp.RuntimeBinder.Syntax; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/MethodInfo.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/MethodInfo.cs index 4db466a6341f..600a4dde3eb6 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/MethodInfo.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/MethodInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/NamedArgumentSpecification.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/NamedArgumentSpecification.cs index bf9b399fe487..15a0379e362b 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/NamedArgumentSpecification.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/NamedArgumentSpecification.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.CSharp.RuntimeBinder.Syntax; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Property.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Property.cs index 0328e8516053..1a892493eb5e 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Property.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Property.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.Semantics { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/PropertyInfo.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/PropertyInfo.cs index e0a6165167ab..8d0b33c178eb 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/PropertyInfo.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/PropertyInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Temporary.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Temporary.cs index 47ba4c38bb22..97d77ecc15b1 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Temporary.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Temporary.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.Semantics { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/TypeOf.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/TypeOf.cs index 2ab3e131c654..537c510750da 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/TypeOf.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/TypeOf.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.Semantics { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/UnaryOperator.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/UnaryOperator.cs index 31fd21bf605b..2e4078a26651 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/UnaryOperator.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/UnaryOperator.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/UserDefinedConversion.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/UserDefinedConversion.cs index 8dc4208bf50c..8602f8c3b407 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/UserDefinedConversion.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/UserDefinedConversion.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/UserDefinedLogicalOperator.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/UserDefinedLogicalOperator.cs index d29ec4866399..b91bfd774266 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/UserDefinedLogicalOperator.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/UserDefinedLogicalOperator.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Visitors/ExprVisitorBase.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Visitors/ExprVisitorBase.cs index 7562d35d55d0..c722ffa2be79 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Visitors/ExprVisitorBase.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Visitors/ExprVisitorBase.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Visitors/ExpressionTreeRewriter.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Visitors/ExpressionTreeRewriter.cs index 3b9f6c1da9fb..de14ce440bed 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Visitors/ExpressionTreeRewriter.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Visitors/ExpressionTreeRewriter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using Microsoft.CSharp.RuntimeBinder.Syntax; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ZeroInitialize.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ZeroInitialize.cs index 4bff9bdeb6db..1201a30fe38b 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ZeroInitialize.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ZeroInitialize.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/TypeBind.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/TypeBind.cs index b8764e724dca..b46d45fb1992 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/TypeBind.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/TypeBind.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/AggregateType.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/AggregateType.cs index 58d64219d029..87d4bd745df5 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/AggregateType.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/AggregateType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/ArgumentListType.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/ArgumentListType.cs index 7c176163f9cb..42495c7e5860 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/ArgumentListType.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/ArgumentListType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.Semantics { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/ArrayType.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/ArrayType.cs index 75ba3ac07ef6..ddd5b04e06d8 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/ArrayType.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/ArrayType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.CSharp.RuntimeBinder.Syntax; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/MethodGroupType.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/MethodGroupType.cs index 96faf071bb4d..719dfc048f21 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/MethodGroupType.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/MethodGroupType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.Semantics { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/NullType.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/NullType.cs index 35e1215cbb74..78154d93f1c5 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/NullType.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/NullType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.Semantics { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/NullableType.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/NullableType.cs index d0fab063dfe3..749ea49018d1 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/NullableType.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/NullableType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; @@ -51,7 +50,7 @@ public override CType StripNubs(out bool wasNullable) public override FUNDTYPE FundamentalType => FUNDTYPE.FT_STRUCT; - [ExcludeFromCodeCoverage] // Should be unreachable. Overload exists just to catch it being hit during debug. + [ExcludeFromCodeCoverage(Justification = "Should be unreachable. Overload exists just to catch it being hit during debug.")] public override ConstValKind ConstValKind { get diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/ParameterModifierType.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/ParameterModifierType.cs index cac1fcf372f5..655efd160abc 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/ParameterModifierType.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/ParameterModifierType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/PointerType.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/PointerType.cs index 529804860333..a216a85f2529 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/PointerType.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/PointerType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; @@ -26,7 +25,7 @@ public PointerType(CType referentType) public override FUNDTYPE FundamentalType => FUNDTYPE.FT_PTR; - [ExcludeFromCodeCoverage] // Technically correct, but we can't have constant pointers in dynamically dispatched code. + [ExcludeFromCodeCoverage(Justification = "Dynamic code can't contain constant pointers")] public override ConstValKind ConstValKind { get diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/PredefinedTypes.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/PredefinedTypes.cs index 1b69d5c216a8..d8e0b2fc1d92 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/PredefinedTypes.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/PredefinedTypes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/Type.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/Type.cs index eb64d0b049a7..6023fd80ab19 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/Type.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/Type.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; @@ -17,7 +16,7 @@ private protected CType(TypeKind kind) TypeKind = kind; } - [ExcludeFromCodeCoverage] // Should only be called through override. + [ExcludeFromCodeCoverage(Justification = "Should only be called through override")] public virtual Type AssociatedSystemType => throw Error.InternalCompilerError(); public TypeKind TypeKind { get; } @@ -99,7 +98,7 @@ public virtual CType StripNubs(out bool wasNullable) public virtual bool IsClassType => false; - [ExcludeFromCodeCoverage] // Should only be called through override. + [ExcludeFromCodeCoverage(Justification = "Should only be called through override")] public virtual AggregateType UnderlyingEnumType => throw Error.InternalCompilerError(); // Pointer types (or arrays of them) are the only unsafe types. @@ -110,7 +109,7 @@ public virtual CType StripNubs(out bool wasNullable) public virtual bool IsPredefined => false; - [ExcludeFromCodeCoverage] // Should only be called through override. + [ExcludeFromCodeCoverage(Justification = "Should only be called through override")] public virtual PredefinedType PredefinedType => throw Error.InternalCompilerError(); public virtual bool IsStaticClass => false; @@ -122,7 +121,7 @@ public virtual CType StripNubs(out bool wasNullable) public virtual bool IsReferenceType => false; - [ExcludeFromCodeCoverage] // Should only be called through override. + [ExcludeFromCodeCoverage(Justification = "Should only be called through override")] public virtual AggregateType GetAts() { Debug.Fail("Bad type for AsAggregateType"); diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/TypeArray.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/TypeArray.cs index 7717069fa290..6b8c80317e48 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/TypeArray.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/TypeArray.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -68,7 +67,7 @@ public bool Equals(TypeArrayKey other) return true; } - [ExcludeFromCodeCoverage] // Typed overload should always be the method called. + [ExcludeFromCodeCoverage(Justification = "Typed overload should always be the method called")] public override bool Equals(object obj) { Debug.Fail("Sub-optimal overload called. Check if this can be avoided."); diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/TypeKind.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/TypeKind.cs index 03e3b4fa7a17..ac909683cd58 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/TypeKind.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/TypeKind.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.Semantics { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/TypeManager.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/TypeManager.cs index 643a4798b865..d77a6e12d9dc 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/TypeManager.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/TypeManager.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/TypeParameterType.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/TypeParameterType.cs index aabc64e2ffcd..51c71edee567 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/TypeParameterType.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/TypeParameterType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/TypeTable.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/TypeTable.cs index d9d78e9a7648..b88d4e1e98d8 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/TypeTable.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/TypeTable.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -27,7 +26,7 @@ public bool Equals(KeyPair other) => && EqualityComparer.Default.Equals(_pKey2, other._pKey2); #if DEBUG - [ExcludeFromCodeCoverage] // Typed overload should always be the method called. + [ExcludeFromCodeCoverage(Justification = "Typed overload should always be the method called")] #endif public override bool Equals(object obj) { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/VoidType.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/VoidType.cs index 9c57aa190430..a65aaf069c89 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/VoidType.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/VoidType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.CSharp.RuntimeBinder.Syntax; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/UnaOpSig.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/UnaOpSig.cs index 9e5567538a58..ea31650cb3eb 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/UnaOpSig.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/UnaOpSig.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using Microsoft.CSharp.RuntimeBinder.Syntax; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/WithType.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/WithType.cs index e691ba0f6223..11fff28791c7 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/WithType.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/WithType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; using System.Diagnostics.CodeAnalysis; @@ -77,7 +76,7 @@ public Symbol Sym public static bool operator !=(SymWithType swt1, SymWithType swt2) => !(swt1 == swt2); - [ExcludeFromCodeCoverage] // == overload should always be the method called. + [ExcludeFromCodeCoverage(Justification = "== overload should always be the method called")] public override bool Equals(object obj) { Debug.Fail("Sub-optimal equality called. Check if this is correct."); @@ -86,7 +85,7 @@ public override bool Equals(object obj) return Sym == other.Sym && Ats == other.Ats; } - [ExcludeFromCodeCoverage] // Never used as a key. + [ExcludeFromCodeCoverage(Justification = "Never used as a key")] public override int GetHashCode() { Debug.Fail("If using this as a key, implement IEquatable"); diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/SpecialNames.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/SpecialNames.cs index d56b95ab29f5..109b8dfa6c9f 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/SpecialNames.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/SpecialNames.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/SymbolTable.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/SymbolTable.cs index c99beab72634..a742cc7740ff 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/SymbolTable.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/SymbolTable.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -35,7 +34,7 @@ public NameHashKey(Type type, string name) public bool Equals(NameHashKey other) => Type.Equals(other.Type) && Name.Equals(other.Name); #if DEBUG - [ExcludeFromCodeCoverage] // Typed overload should always be the method called. + [ExcludeFromCodeCoverage(Justification = "Typed overload should always be the method called")] #endif public override bool Equals(object obj) { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/NameManager.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/NameManager.cs index 95433c6fca3a..4d0299abe341 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/NameManager.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/NameManager.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/NameTable.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/NameTable.cs index 0d088f543593..ad03545cc2b3 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/NameTable.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/NameTable.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/Names.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/Names.cs index 046ca5938c06..cf613609cca1 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/Names.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/Names.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.Syntax { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/Operators.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/Operators.cs index c6ae3c91e694..8c9b02f48e45 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/Operators.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/Operators.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.Syntax { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/PredefinedName.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/PredefinedName.cs index f5eb28820bc5..d5c986c79a8e 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/PredefinedName.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/PredefinedName.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.Syntax { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/PredefinedType.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/PredefinedType.cs index e4e3299c2155..71a4926ef99b 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/PredefinedType.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/PredefinedType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.Syntax { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/TokenFacts.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/TokenFacts.cs index 179ec138e6cd..640b7fb440e2 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/TokenFacts.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/TokenFacts.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.Syntax { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/TokenKind.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/TokenKind.cs index 0b1ce300abd6..47863f764631 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/TokenKind.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/TokenKind.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.CSharp.RuntimeBinder.Syntax { diff --git a/src/libraries/Microsoft.CSharp/tests/AccessTests.cs b/src/libraries/Microsoft.CSharp/tests/AccessTests.cs index e2a6914556ba..e7a21c720545 100644 --- a/src/libraries/Microsoft.CSharp/tests/AccessTests.cs +++ b/src/libraries/Microsoft.CSharp/tests/AccessTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/tests/AccessTests.netcoreapp.cs b/src/libraries/Microsoft.CSharp/tests/AccessTests.netcoreapp.cs index 9e62a92c45b3..73f10a6b5849 100644 --- a/src/libraries/Microsoft.CSharp/tests/AccessTests.netcoreapp.cs +++ b/src/libraries/Microsoft.CSharp/tests/AccessTests.netcoreapp.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Reflection; diff --git a/src/libraries/Microsoft.CSharp/tests/ArrayHandling.cs b/src/libraries/Microsoft.CSharp/tests/ArrayHandling.cs index 2470a76f11c7..7ee63f4d5d2d 100644 --- a/src/libraries/Microsoft.CSharp/tests/ArrayHandling.cs +++ b/src/libraries/Microsoft.CSharp/tests/ArrayHandling.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/tests/AssignmentTests.cs b/src/libraries/Microsoft.CSharp/tests/AssignmentTests.cs index d83e43d35055..8a54b9a5b794 100644 --- a/src/libraries/Microsoft.CSharp/tests/AssignmentTests.cs +++ b/src/libraries/Microsoft.CSharp/tests/AssignmentTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/tests/BindingErrors.cs b/src/libraries/Microsoft.CSharp/tests/BindingErrors.cs index 19f8cda2e481..e680a261ed43 100644 --- a/src/libraries/Microsoft.CSharp/tests/BindingErrors.cs +++ b/src/libraries/Microsoft.CSharp/tests/BindingErrors.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. #define TEST_DEFINITION diff --git a/src/libraries/Microsoft.CSharp/tests/CSharpArgumentInfoTests.cs b/src/libraries/Microsoft.CSharp/tests/CSharpArgumentInfoTests.cs index 4b4f8f12f752..68b75a94d2f1 100644 --- a/src/libraries/Microsoft.CSharp/tests/CSharpArgumentInfoTests.cs +++ b/src/libraries/Microsoft.CSharp/tests/CSharpArgumentInfoTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/tests/DefaultParameterTests.cs b/src/libraries/Microsoft.CSharp/tests/DefaultParameterTests.cs index 6d9ed5bb8ddd..e6b7d359bd7e 100644 --- a/src/libraries/Microsoft.CSharp/tests/DefaultParameterTests.cs +++ b/src/libraries/Microsoft.CSharp/tests/DefaultParameterTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/tests/DelegateInDynamicTests.cs b/src/libraries/Microsoft.CSharp/tests/DelegateInDynamicTests.cs index 17fd9c3a099a..11f351d04621 100644 --- a/src/libraries/Microsoft.CSharp/tests/DelegateInDynamicTests.cs +++ b/src/libraries/Microsoft.CSharp/tests/DelegateInDynamicTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Xunit; diff --git a/src/libraries/Microsoft.CSharp/tests/DynamicDebuggerProxyTests.cs b/src/libraries/Microsoft.CSharp/tests/DynamicDebuggerProxyTests.cs index a30e612b6e06..acf3276b26be 100644 --- a/src/libraries/Microsoft.CSharp/tests/DynamicDebuggerProxyTests.cs +++ b/src/libraries/Microsoft.CSharp/tests/DynamicDebuggerProxyTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/tests/EnumArithmeticTests.cs b/src/libraries/Microsoft.CSharp/tests/EnumArithmeticTests.cs index d87ae69d3787..883f73a26d59 100644 --- a/src/libraries/Microsoft.CSharp/tests/EnumArithmeticTests.cs +++ b/src/libraries/Microsoft.CSharp/tests/EnumArithmeticTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/tests/EnumUnaryOperationTests.cs b/src/libraries/Microsoft.CSharp/tests/EnumUnaryOperationTests.cs index f9f9a3342468..ec35658deec0 100644 --- a/src/libraries/Microsoft.CSharp/tests/EnumUnaryOperationTests.cs +++ b/src/libraries/Microsoft.CSharp/tests/EnumUnaryOperationTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/tests/ExplicitConversionTests.cs b/src/libraries/Microsoft.CSharp/tests/ExplicitConversionTests.cs index 62f459efb98b..7e1d6f2b2e48 100644 --- a/src/libraries/Microsoft.CSharp/tests/ExplicitConversionTests.cs +++ b/src/libraries/Microsoft.CSharp/tests/ExplicitConversionTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/tests/Helpers.cs b/src/libraries/Microsoft.CSharp/tests/Helpers.cs index 617d4576c2be..96d6f966a49f 100644 --- a/src/libraries/Microsoft.CSharp/tests/Helpers.cs +++ b/src/libraries/Microsoft.CSharp/tests/Helpers.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Microsoft.CSharp/tests/ImplicitConversionTests.cs b/src/libraries/Microsoft.CSharp/tests/ImplicitConversionTests.cs index d0fe6217fc78..22635a563f59 100644 --- a/src/libraries/Microsoft.CSharp/tests/ImplicitConversionTests.cs +++ b/src/libraries/Microsoft.CSharp/tests/ImplicitConversionTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections; diff --git a/src/libraries/Microsoft.CSharp/tests/IndexingTests.cs b/src/libraries/Microsoft.CSharp/tests/IndexingTests.cs index c990893d567c..9527f442004b 100644 --- a/src/libraries/Microsoft.CSharp/tests/IndexingTests.cs +++ b/src/libraries/Microsoft.CSharp/tests/IndexingTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections; diff --git a/src/libraries/Microsoft.CSharp/tests/IntegerBinaryOperationTests.cs b/src/libraries/Microsoft.CSharp/tests/IntegerBinaryOperationTests.cs index b872fb282695..8888f6ce0672 100644 --- a/src/libraries/Microsoft.CSharp/tests/IntegerBinaryOperationTests.cs +++ b/src/libraries/Microsoft.CSharp/tests/IntegerBinaryOperationTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/tests/IntegerUnaryOperationTests.cs b/src/libraries/Microsoft.CSharp/tests/IntegerUnaryOperationTests.cs index 7409cb0cc1a1..0e637bafab5a 100644 --- a/src/libraries/Microsoft.CSharp/tests/IntegerUnaryOperationTests.cs +++ b/src/libraries/Microsoft.CSharp/tests/IntegerUnaryOperationTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/tests/IsEventTests.cs b/src/libraries/Microsoft.CSharp/tests/IsEventTests.cs index f426e35d2930..a3e673301039 100644 --- a/src/libraries/Microsoft.CSharp/tests/IsEventTests.cs +++ b/src/libraries/Microsoft.CSharp/tests/IsEventTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.CompilerServices; diff --git a/src/libraries/Microsoft.CSharp/tests/NamedArgumentTests.cs b/src/libraries/Microsoft.CSharp/tests/NamedArgumentTests.cs index 7c3e039e6d6f..5226a37538f4 100644 --- a/src/libraries/Microsoft.CSharp/tests/NamedArgumentTests.cs +++ b/src/libraries/Microsoft.CSharp/tests/NamedArgumentTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Microsoft.CSharp/tests/NullableEnumUnaryOperationTest.cs b/src/libraries/Microsoft.CSharp/tests/NullableEnumUnaryOperationTest.cs index 2a5164c93415..cab161258f19 100644 --- a/src/libraries/Microsoft.CSharp/tests/NullableEnumUnaryOperationTest.cs +++ b/src/libraries/Microsoft.CSharp/tests/NullableEnumUnaryOperationTest.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.CSharp/tests/RuntimeBinderExceptionTests.cs b/src/libraries/Microsoft.CSharp/tests/RuntimeBinderExceptionTests.cs index 55bddd059b3e..d4fddedacc67 100644 --- a/src/libraries/Microsoft.CSharp/tests/RuntimeBinderExceptionTests.cs +++ b/src/libraries/Microsoft.CSharp/tests/RuntimeBinderExceptionTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.CompilerServices; diff --git a/src/libraries/Microsoft.CSharp/tests/RuntimeBinderInternalCompilerExceptionTests.cs b/src/libraries/Microsoft.CSharp/tests/RuntimeBinderInternalCompilerExceptionTests.cs index 7fbac74f4776..ea417267ca98 100644 --- a/src/libraries/Microsoft.CSharp/tests/RuntimeBinderInternalCompilerExceptionTests.cs +++ b/src/libraries/Microsoft.CSharp/tests/RuntimeBinderInternalCompilerExceptionTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Xunit; diff --git a/src/libraries/Microsoft.CSharp/tests/RuntimeBinderTests.cs b/src/libraries/Microsoft.CSharp/tests/RuntimeBinderTests.cs index 7c0622b9344d..28c8cc6f7f46 100644 --- a/src/libraries/Microsoft.CSharp/tests/RuntimeBinderTests.cs +++ b/src/libraries/Microsoft.CSharp/tests/RuntimeBinderTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections; diff --git a/src/libraries/Microsoft.CSharp/tests/UserDefinedShortCircuitOperators.cs b/src/libraries/Microsoft.CSharp/tests/UserDefinedShortCircuitOperators.cs index 084ce5f36c8a..fa2e6db8dd14 100644 --- a/src/libraries/Microsoft.CSharp/tests/UserDefinedShortCircuitOperators.cs +++ b/src/libraries/Microsoft.CSharp/tests/UserDefinedShortCircuitOperators.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; diff --git a/src/libraries/Microsoft.CSharp/tests/VarArgsTests.cs b/src/libraries/Microsoft.CSharp/tests/VarArgsTests.cs index 98aa55d99661..30eb87d43ed7 100644 --- a/src/libraries/Microsoft.CSharp/tests/VarArgsTests.cs +++ b/src/libraries/Microsoft.CSharp/tests/VarArgsTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Security.Cryptography.X509Certificates; using Xunit; diff --git a/src/libraries/Microsoft.Diagnostics.Tracing.EventSource.Redist/src/Microsoft.Diagnostics.Tracing.EventSource.Redist.csproj b/src/libraries/Microsoft.Diagnostics.Tracing.EventSource.Redist/src/Microsoft.Diagnostics.Tracing.EventSource.Redist.csproj index ae5cb393505d..9acca8dfc992 100644 --- a/src/libraries/Microsoft.Diagnostics.Tracing.EventSource.Redist/src/Microsoft.Diagnostics.Tracing.EventSource.Redist.csproj +++ b/src/libraries/Microsoft.Diagnostics.Tracing.EventSource.Redist/src/Microsoft.Diagnostics.Tracing.EventSource.Redist.csproj @@ -1,7 +1,6 @@ Microsoft.Diagnostics.Tracing.EventSource - $(NoWarn);CS1573 $(DefineConstants);NO_EVENTCOMMANDEXECUTED_SUPPORT;ES_BUILD_STANDALONE;FEATURE_MANAGED_ETW;TARGET_WINDOWS $(NetFrameworkCurrent)-Windows_NT;net461-Windows_NT true @@ -75,4 +74,4 @@ - \ No newline at end of file + diff --git a/src/libraries/Microsoft.Extensions.Caching.Abstractions/ref/Microsoft.Extensions.Caching.Abstractions.cs b/src/libraries/Microsoft.Extensions.Caching.Abstractions/ref/Microsoft.Extensions.Caching.Abstractions.cs index 8e4779f1e987..055c97089a7c 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Abstractions/ref/Microsoft.Extensions.Caching.Abstractions.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Abstractions/ref/Microsoft.Extensions.Caching.Abstractions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ------------------------------------------------------------------------------ // Changes to this file must follow the https://aka.ms/api-review process. // ------------------------------------------------------------------------------ diff --git a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/CacheEntryExtensions.cs b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/CacheEntryExtensions.cs index 85fb29066762..1adf580d2b71 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/CacheEntryExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/CacheEntryExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.Primitives; @@ -180,12 +179,12 @@ public static ICacheEntry SetOptions(this ICacheEntry entry, MemoryCacheEntryOpt entry.Priority = options.Priority; entry.Size = options.Size; - foreach (var expirationToken in options.ExpirationTokens) + foreach (IChangeToken expirationToken in options.ExpirationTokens) { entry.AddExpirationToken(expirationToken); } - foreach (var postEvictionCallback in options.PostEvictionCallbacks) + foreach (PostEvictionCallbackRegistration postEvictionCallback in options.PostEvictionCallbacks) { entry.RegisterPostEvictionCallback(postEvictionCallback.EvictionCallback, postEvictionCallback.State); } diff --git a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/CacheItemPriority.cs b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/CacheItemPriority.cs index 09890622d872..d1246e894716 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/CacheItemPriority.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/CacheItemPriority.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.Caching.Memory { @@ -15,4 +14,4 @@ public enum CacheItemPriority High, NeverRemove, } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/DistributedCacheEntryExtensions.cs b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/DistributedCacheEntryExtensions.cs index 7a897ab783b0..e9ddf9ca1261 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/DistributedCacheEntryExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/DistributedCacheEntryExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/DistributedCacheEntryOptions.cs b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/DistributedCacheEntryOptions.cs index 7b650f056c82..a1b5b9ae39a6 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/DistributedCacheEntryOptions.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/DistributedCacheEntryOptions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/DistributedCacheExtensions.cs b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/DistributedCacheExtensions.cs index 67f16ff48174..621321ce975d 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/DistributedCacheExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/DistributedCacheExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Text; @@ -136,7 +135,7 @@ public static void SetString(this IDistributedCache cache, string key, string va /// The string value from the stored cache key. public static string GetString(this IDistributedCache cache, string key) { - var data = cache.Get(key); + byte[] data = cache.Get(key); if (data == null) { return null; @@ -153,7 +152,7 @@ public static string GetString(this IDistributedCache cache, string key) /// A task that gets the string value from the stored cache key. public static async Task GetStringAsync(this IDistributedCache cache, string key, CancellationToken token = default(CancellationToken)) { - var data = await cache.GetAsync(key, token).ConfigureAwait(false); + byte[] data = await cache.GetAsync(key, token).ConfigureAwait(false); if (data == null) { return null; diff --git a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/EvictionReason.cs b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/EvictionReason.cs index 7d0fc70d487a..43f7362675e1 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/EvictionReason.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/EvictionReason.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.Caching.Memory { @@ -33,4 +32,4 @@ public enum EvictionReason /// Capacity, } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/ICacheEntry.cs b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/ICacheEntry.cs index 4326d9801e0b..be1cf5ccc0d3 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/ICacheEntry.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/ICacheEntry.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -60,4 +59,4 @@ public interface ICacheEntry : IDisposable /// long? Size { get; set; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/IDistributedCache.cs b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/IDistributedCache.cs index 6954eadce9fd..6b38f4665100 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/IDistributedCache.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/IDistributedCache.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Threading; using System.Threading.Tasks; @@ -73,4 +72,4 @@ public interface IDistributedCache /// The that represents the asynchronous operation. Task RemoveAsync(string key, CancellationToken token = default(CancellationToken)); } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/IMemoryCache.cs b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/IMemoryCache.cs index 24e16a9c50ed..10379bc4cc7a 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/IMemoryCache.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/IMemoryCache.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -32,4 +31,4 @@ public interface IMemoryCache : IDisposable /// An object identifying the entry. void Remove(object key); } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/Internal/ISystemClock.cs b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/Internal/ISystemClock.cs index 22629e0838e2..5a674c90f35f 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/Internal/ISystemClock.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/Internal/ISystemClock.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/Internal/SystemClock.cs b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/Internal/SystemClock.cs index 2d4cb4548beb..185615ac2046 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/Internal/SystemClock.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/Internal/SystemClock.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/MemoryCacheEntryExtensions.cs b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/MemoryCacheEntryExtensions.cs index 84a6b1f30aa0..a66d4a519cc4 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/MemoryCacheEntryExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/MemoryCacheEntryExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.Primitives; diff --git a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/MemoryCacheEntryOptions.cs b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/MemoryCacheEntryOptions.cs index 082b18122109..62396c1be60f 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/MemoryCacheEntryOptions.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/MemoryCacheEntryOptions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -113,4 +112,4 @@ public long? Size } } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/MemoryCacheExtensions.cs b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/MemoryCacheExtensions.cs index b64a2d584c83..c3f91ae917b8 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/MemoryCacheExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/MemoryCacheExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Threading.Tasks; @@ -44,7 +43,7 @@ public static bool TryGetValue(this IMemoryCache cache, object key, out T public static TItem Set(this IMemoryCache cache, object key, TItem value) { - var entry = cache.CreateEntry(key); + ICacheEntry entry = cache.CreateEntry(key); entry.Value = value; entry.Dispose(); @@ -53,7 +52,7 @@ public static TItem Set(this IMemoryCache cache, object key, TItem value) public static TItem Set(this IMemoryCache cache, object key, TItem value, DateTimeOffset absoluteExpiration) { - var entry = cache.CreateEntry(key); + ICacheEntry entry = cache.CreateEntry(key); entry.AbsoluteExpiration = absoluteExpiration; entry.Value = value; entry.Dispose(); @@ -63,7 +62,7 @@ public static TItem Set(this IMemoryCache cache, object key, TItem value, public static TItem Set(this IMemoryCache cache, object key, TItem value, TimeSpan absoluteExpirationRelativeToNow) { - var entry = cache.CreateEntry(key); + ICacheEntry entry = cache.CreateEntry(key); entry.AbsoluteExpirationRelativeToNow = absoluteExpirationRelativeToNow; entry.Value = value; entry.Dispose(); @@ -73,7 +72,7 @@ public static TItem Set(this IMemoryCache cache, object key, TItem value, public static TItem Set(this IMemoryCache cache, object key, TItem value, IChangeToken expirationToken) { - var entry = cache.CreateEntry(key); + ICacheEntry entry = cache.CreateEntry(key); entry.AddExpirationToken(expirationToken); entry.Value = value; entry.Dispose(); @@ -83,7 +82,7 @@ public static TItem Set(this IMemoryCache cache, object key, TItem value, public static TItem Set(this IMemoryCache cache, object key, TItem value, MemoryCacheEntryOptions options) { - using (var entry = cache.CreateEntry(key)) + using (ICacheEntry entry = cache.CreateEntry(key)) { if (options != null) { @@ -100,7 +99,7 @@ public static TItem GetOrCreate(this IMemoryCache cache, object key, Func { if (!cache.TryGetValue(key, out object result)) { - var entry = cache.CreateEntry(key); + ICacheEntry entry = cache.CreateEntry(key); result = factory(entry); entry.SetValue(result); // need to manually call dispose instead of having a using @@ -116,7 +115,7 @@ public static async Task GetOrCreateAsync(this IMemoryCache cache, { if (!cache.TryGetValue(key, out object result)) { - var entry = cache.CreateEntry(key); + ICacheEntry entry = cache.CreateEntry(key); result = await factory(entry).ConfigureAwait(false); entry.SetValue(result); // need to manually call dispose instead of having a using diff --git a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/Microsoft.Extensions.Caching.Abstractions.csproj b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/Microsoft.Extensions.Caching.Abstractions.csproj index 911f1f0a34a5..236c28690464 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/Microsoft.Extensions.Caching.Abstractions.csproj +++ b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/Microsoft.Extensions.Caching.Abstractions.csproj @@ -2,7 +2,6 @@ netstandard2.0 - $(NoWarn);CS1591 true diff --git a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/PostEvictionCallbackRegistration.cs b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/PostEvictionCallbackRegistration.cs index 99397cd2d555..532ffa2385ad 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/PostEvictionCallbackRegistration.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/PostEvictionCallbackRegistration.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.Caching.Memory { diff --git a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/PostEvictionDelegate.cs b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/PostEvictionDelegate.cs index 627ad52239b3..edc209fe450b 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/PostEvictionDelegate.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/PostEvictionDelegate.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.Caching.Memory { diff --git a/src/libraries/Microsoft.Extensions.Caching.Memory/ref/Microsoft.Extensions.Caching.Memory.cs b/src/libraries/Microsoft.Extensions.Caching.Memory/ref/Microsoft.Extensions.Caching.Memory.cs index 231e0ece2670..dcdce63cb52b 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Memory/ref/Microsoft.Extensions.Caching.Memory.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Memory/ref/Microsoft.Extensions.Caching.Memory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ------------------------------------------------------------------------------ // Changes to this file must follow the https://aka.ms/api-review process. // ------------------------------------------------------------------------------ diff --git a/src/libraries/Microsoft.Extensions.Caching.Memory/src/CacheEntry.cs b/src/libraries/Microsoft.Extensions.Caching.Memory/src/CacheEntry.cs index 0776cceaa1e1..96c1ffa772d2 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Memory/src/CacheEntry.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Memory/src/CacheEntry.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -12,7 +11,7 @@ namespace Microsoft.Extensions.Caching.Memory { internal class CacheEntry : ICacheEntry { - private bool _added = false; + private bool _added; private static readonly Action ExpirationCallback = ExpirationTokensExpired; private readonly Action _notifyCacheOfExpiration; private readonly Action _notifyCacheEntryDisposed; @@ -230,7 +229,7 @@ internal bool CheckForExpiredTokens() { for (int i = 0; i < _expirationTokens.Count; i++) { - var expiredToken = _expirationTokens[i]; + IChangeToken expiredToken = _expirationTokens[i]; if (expiredToken.HasChanged) { SetExpired(EvictionReason.TokenExpired); @@ -249,14 +248,14 @@ internal void AttachTokens() { for (int i = 0; i < _expirationTokens.Count; i++) { - var expirationToken = _expirationTokens[i]; + IChangeToken expirationToken = _expirationTokens[i]; if (expirationToken.ActiveChangeCallbacks) { if (_expirationTokenRegistrations == null) { _expirationTokenRegistrations = new List(1); } - var registration = expirationToken.RegisterChangeCallback(ExpirationCallback, this); + IDisposable registration = expirationToken.RegisterChangeCallback(ExpirationCallback, this); _expirationTokenRegistrations.Add(registration); } } @@ -277,15 +276,15 @@ private static void ExpirationTokensExpired(object obj) private void DetachTokens() { - lock(_lock) + lock (_lock) { - var registrations = _expirationTokenRegistrations; + IList registrations = _expirationTokenRegistrations; if (registrations != null) { _expirationTokenRegistrations = null; for (int i = 0; i < registrations.Count; i++) { - var registration = registrations[i]; + IDisposable registration = registrations[i]; registration.Dispose(); } } @@ -303,7 +302,7 @@ internal void InvokeEvictionCallbacks() private static void InvokeCallbacks(CacheEntry entry) { - var callbackRegistrations = Interlocked.Exchange(ref entry._postEvictionCallbacks, null); + IList callbackRegistrations = Interlocked.Exchange(ref entry._postEvictionCallbacks, null); if (callbackRegistrations == null) { @@ -312,7 +311,7 @@ private static void InvokeCallbacks(CacheEntry entry) for (int i = 0; i < callbackRegistrations.Count; i++) { - var registration = callbackRegistrations[i]; + PostEvictionCallbackRegistration registration = callbackRegistrations[i]; try { @@ -341,7 +340,7 @@ internal void PropagateOptions(CacheEntry parent) { lock (parent._lock) { - foreach (var expirationToken in _expirationTokens) + foreach (IChangeToken expirationToken in _expirationTokens) { parent.AddExpirationToken(expirationToken); } diff --git a/src/libraries/Microsoft.Extensions.Caching.Memory/src/CacheEntryHelper.cs b/src/libraries/Microsoft.Extensions.Caching.Memory/src/CacheEntryHelper.cs index f79341984008..f7cc3a8d735e 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Memory/src/CacheEntryHelper.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Memory/src/CacheEntryHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Threading; @@ -21,14 +20,14 @@ internal static CacheEntry Current { get { - var scopes = GetOrCreateScopes(); + CacheEntryStack scopes = GetOrCreateScopes(); return scopes.Peek(); } } internal static IDisposable EnterScope(CacheEntry entry) { - var scopes = GetOrCreateScopes(); + CacheEntryStack scopes = GetOrCreateScopes(); var scopeLease = new ScopeLease(scopes); Scopes = scopes.Push(entry); @@ -38,7 +37,7 @@ internal static IDisposable EnterScope(CacheEntry entry) private static CacheEntryStack GetOrCreateScopes() { - var scopes = Scopes; + CacheEntryStack scopes = Scopes; if (scopes == null) { scopes = CacheEntryStack.Empty; @@ -63,4 +62,4 @@ public void Dispose() } } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Caching.Memory/src/CacheEntryStack.cs b/src/libraries/Microsoft.Extensions.Caching.Memory/src/CacheEntryStack.cs index 04737c1bae05..9b6a9b71abf4 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Memory/src/CacheEntryStack.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Memory/src/CacheEntryStack.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.Caching.Memory/src/MemoryCache.cs b/src/libraries/Microsoft.Extensions.Caching.Memory/src/MemoryCache.cs index bcce0ebb80e5..6b4e81f0dcc3 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Memory/src/MemoryCache.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Memory/src/MemoryCache.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Concurrent; @@ -22,9 +21,9 @@ namespace Microsoft.Extensions.Caching.Memory public class MemoryCache : IMemoryCache { private readonly ConcurrentDictionary _entries; - private long _cacheSize = 0; + private long _cacheSize; private bool _disposed; - private ILogger _logger; + private readonly ILogger _logger; // We store the delegates locally to prevent allocations // every time a new CacheEntry is created. @@ -121,7 +120,7 @@ private void SetEntry(CacheEntry entry) throw new InvalidOperationException($"Cache entry must specify a value for {nameof(entry.Size)} when {nameof(_options.SizeLimit)} is set."); } - var utcNow = _options.Clock.UtcNow; + DateTimeOffset utcNow = _options.Clock.UtcNow; DateTimeOffset? absoluteExpiration = null; if (entry._absoluteExpirationRelativeToNow.HasValue) @@ -152,11 +151,11 @@ private void SetEntry(CacheEntry entry) priorEntry.SetExpired(EvictionReason.Replaced); } - var exceedsCapacity = UpdateCacheSizeExceedsCapacity(entry); + bool exceedsCapacity = UpdateCacheSizeExceedsCapacity(entry); if (!entry.CheckExpired(utcNow) && !exceedsCapacity) { - var entryAdded = false; + bool entryAdded = false; if (priorEntry == null) { @@ -222,7 +221,7 @@ private void SetEntry(CacheEntry entry) } } - StartScanForExpiredItems(); + StartScanForExpiredItems(utcNow); } /// @@ -233,8 +232,8 @@ public bool TryGetValue(object key, out object result) CheckDisposed(); result = null; - var utcNow = _options.Clock.UtcNow; - var found = false; + DateTimeOffset utcNow = _options.Clock.UtcNow; + bool found = false; if (_entries.TryGetValue(key, out CacheEntry entry)) { @@ -257,7 +256,7 @@ public bool TryGetValue(object key, out object result) } } - StartScanForExpiredItems(); + StartScanForExpiredItems(utcNow); return found; } @@ -306,9 +305,10 @@ private void EntryExpired(CacheEntry entry) // Called by multiple actions to see how long it's been since we last checked for expired items. // If sufficient time has elapsed then a scan is initiated on a background task. - private void StartScanForExpiredItems() + private void StartScanForExpiredItems(DateTimeOffset? utcNow = null) { - var now = _options.Clock.UtcNow; + // Since fetching time is expensive, minimize it in the hot paths + DateTimeOffset now = utcNow ?? _options.Clock.UtcNow; if (_options.ExpirationScanFrequency < now - _lastExpirationScan) { _lastExpirationScan = now; @@ -319,8 +319,8 @@ private void StartScanForExpiredItems() private static void ScanForExpiredItems(MemoryCache cache) { - var now = cache._options.Clock.UtcNow; - foreach (var entry in cache._entries.Values) + DateTimeOffset now = cache._options.Clock.UtcNow; + foreach (CacheEntry entry in cache._entries.Values) { if (entry.CheckExpired(now)) { @@ -336,10 +336,10 @@ private bool UpdateCacheSizeExceedsCapacity(CacheEntry entry) return false; } - var newSize = 0L; - for (var i = 0; i < 100; i++) + long newSize = 0L; + for (int i = 0; i < 100; i++) { - var sizeRead = Interlocked.Read(ref _cacheSize); + long sizeRead = Interlocked.Read(ref _cacheSize); newSize = sizeRead + entry.Size.Value; if (newSize < 0 || newSize > _options.SizeLimit) @@ -367,11 +367,11 @@ private void TriggerOvercapacityCompaction() private static void OvercapacityCompaction(MemoryCache cache) { - var currentSize = Interlocked.Read(ref cache._cacheSize); + long currentSize = Interlocked.Read(ref cache._cacheSize); cache._logger.LogDebug($"Overcapacity compaction executing. Current size {currentSize}"); - var lowWatermark = cache._options.SizeLimit * (1 - cache._options.CompactionPercentage); + double? lowWatermark = cache._options.SizeLimit * (1 - cache._options.CompactionPercentage); if (currentSize > lowWatermark) { cache.Compact(currentSize - (long)lowWatermark, entry => entry.Size.Value); @@ -402,8 +402,8 @@ private void Compact(long removalSizeTarget, Func computeEntry long removedSize = 0; // Sort items by expired & priority status - var now = _options.Clock.UtcNow; - foreach (var entry in _entries.Values) + DateTimeOffset now = _options.Clock.UtcNow; + foreach (CacheEntry entry in _entries.Values) { if (entry.CheckExpired(now)) { @@ -435,7 +435,7 @@ private void Compact(long removalSizeTarget, Func computeEntry ExpirePriorityBucket(ref removedSize, removalSizeTarget, computeEntrySize, entriesToRemove, normalPriEntries); ExpirePriorityBucket(ref removedSize, removalSizeTarget, computeEntrySize, entriesToRemove, highPriEntries); - foreach (var entry in entriesToRemove) + foreach (CacheEntry entry in entriesToRemove) { RemoveEntry(entry); } @@ -459,7 +459,7 @@ private void ExpirePriorityBucket(ref long removedSize, long removalSizeTarget, // TODO: Refine policy // LRU - foreach (var entry in priorityEntries.OrderBy(entry => entry.LastAccessed)) + foreach (CacheEntry entry in priorityEntries.OrderBy(entry => entry.LastAccessed)) { entry.SetExpired(EvictionReason.Capacity); entriesToRemove.Add(entry); diff --git a/src/libraries/Microsoft.Extensions.Caching.Memory/src/MemoryCacheOptions.cs b/src/libraries/Microsoft.Extensions.Caching.Memory/src/MemoryCacheOptions.cs index 59b0a539eaee..bea7aa9cffe4 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Memory/src/MemoryCacheOptions.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Memory/src/MemoryCacheOptions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.Internal; diff --git a/src/libraries/Microsoft.Extensions.Caching.Memory/src/MemoryCacheServiceCollectionExtensions.cs b/src/libraries/Microsoft.Extensions.Caching.Memory/src/MemoryCacheServiceCollectionExtensions.cs index d36117542fa4..7fd0295cc679 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Memory/src/MemoryCacheServiceCollectionExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Memory/src/MemoryCacheServiceCollectionExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.Caching.Distributed; diff --git a/src/libraries/Microsoft.Extensions.Caching.Memory/src/MemoryDistributedCache.cs b/src/libraries/Microsoft.Extensions.Caching.Memory/src/MemoryDistributedCache.cs index 7fb0b18b38ad..e867c7ecec0f 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Memory/src/MemoryDistributedCache.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Memory/src/MemoryDistributedCache.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Threading; diff --git a/src/libraries/Microsoft.Extensions.Caching.Memory/src/MemoryDistributedCacheOptions.cs b/src/libraries/Microsoft.Extensions.Caching.Memory/src/MemoryDistributedCacheOptions.cs index 6c88373041cc..c90f612b0ba6 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Memory/src/MemoryDistributedCacheOptions.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Memory/src/MemoryDistributedCacheOptions.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.Caching.Memory { @@ -13,4 +12,4 @@ public MemoryDistributedCacheOptions() SizeLimit = 200 * 1024 * 1024; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Caching.Memory/src/Microsoft.Extensions.Caching.Memory.csproj b/src/libraries/Microsoft.Extensions.Caching.Memory/src/Microsoft.Extensions.Caching.Memory.csproj index f1fc6de9692c..6ffc70073433 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Memory/src/Microsoft.Extensions.Caching.Memory.csproj +++ b/src/libraries/Microsoft.Extensions.Caching.Memory/src/Microsoft.Extensions.Caching.Memory.csproj @@ -2,7 +2,6 @@ netstandard2.0 - $(NoWarn);CS1591 true diff --git a/src/libraries/Microsoft.Extensions.Caching.Memory/src/Properties/InternalsVisibleTo.cs b/src/libraries/Microsoft.Extensions.Caching.Memory/src/Properties/InternalsVisibleTo.cs index cd5d9cf52b19..0cd02ec025b7 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Memory/src/Properties/InternalsVisibleTo.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Memory/src/Properties/InternalsVisibleTo.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("Microsoft.Extensions.Caching.Memory.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.Extensions.Caching.Memory.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/src/libraries/Microsoft.Extensions.Caching.Memory/tests/AssemblyAttributes.cs b/src/libraries/Microsoft.Extensions.Caching.Memory/tests/AssemblyAttributes.cs index 82c60ec93e30..167b80352f52 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Memory/tests/AssemblyAttributes.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Memory/tests/AssemblyAttributes.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; diff --git a/src/libraries/Microsoft.Extensions.Caching.Memory/tests/CacheEntryScopeExpirationTests.cs b/src/libraries/Microsoft.Extensions.Caching.Memory/tests/CacheEntryScopeExpirationTests.cs index dc4f06c5c22c..2451e8b19b3a 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Memory/tests/CacheEntryScopeExpirationTests.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Memory/tests/CacheEntryScopeExpirationTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Linq; diff --git a/src/libraries/Microsoft.Extensions.Caching.Memory/tests/CacheServiceExtensionsTests.cs b/src/libraries/Microsoft.Extensions.Caching.Memory/tests/CacheServiceExtensionsTests.cs index 2355ddebc468..8b6790362d0b 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Memory/tests/CacheServiceExtensionsTests.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Memory/tests/CacheServiceExtensionsTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Microsoft.Extensions.Caching.Memory/tests/CapacityTests.cs b/src/libraries/Microsoft.Extensions.Caching.Memory/tests/CapacityTests.cs index 86cfc4939a77..069d4ff12f15 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Memory/tests/CapacityTests.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Memory/tests/CapacityTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Threading; diff --git a/src/libraries/Microsoft.Extensions.Caching.Memory/tests/CompactTests.cs b/src/libraries/Microsoft.Extensions.Caching.Memory/tests/CompactTests.cs index 2dd83cac62c2..3d9c2625b19e 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Memory/tests/CompactTests.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Memory/tests/CompactTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.Internal; @@ -84,4 +83,4 @@ public void CompactPrioritizesLRU() Assert.Equal("value4", cache.Get("key4")); } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Caching.Memory/tests/Infrastructure/TestClock.cs b/src/libraries/Microsoft.Extensions.Caching.Memory/tests/Infrastructure/TestClock.cs index 2a1389511f59..eddf58a66bd6 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Memory/tests/Infrastructure/TestClock.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Memory/tests/Infrastructure/TestClock.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.Caching.Memory/tests/Infrastructure/TestExpirationToken.cs b/src/libraries/Microsoft.Extensions.Caching.Memory/tests/Infrastructure/TestExpirationToken.cs index 7b57f5634533..9e4d3b93cfa8 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Memory/tests/Infrastructure/TestExpirationToken.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Memory/tests/Infrastructure/TestExpirationToken.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.Primitives; @@ -63,4 +62,4 @@ public void Fire() } } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Caching.Memory/tests/Infrastructure/TokenCallbackRegistration.cs b/src/libraries/Microsoft.Extensions.Caching.Memory/tests/Infrastructure/TokenCallbackRegistration.cs index fc647e8300a8..d4a5864059a3 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Memory/tests/Infrastructure/TokenCallbackRegistration.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Memory/tests/Infrastructure/TokenCallbackRegistration.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -19,4 +18,4 @@ public void Dispose() Disposed = true; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Caching.Memory/tests/MemoryCacheSetAndRemoveTests.cs b/src/libraries/Microsoft.Extensions.Caching.Memory/tests/MemoryCacheSetAndRemoveTests.cs index a1fe3ad360a5..76a5eba3a8e4 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Memory/tests/MemoryCacheSetAndRemoveTests.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Memory/tests/MemoryCacheSetAndRemoveTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Threading; diff --git a/src/libraries/Microsoft.Extensions.Caching.Memory/tests/TimeExpirationTests.cs b/src/libraries/Microsoft.Extensions.Caching.Memory/tests/TimeExpirationTests.cs index 1c5f49385130..b35d42c92618 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Memory/tests/TimeExpirationTests.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Memory/tests/TimeExpirationTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Threading; @@ -264,4 +263,4 @@ public void SlidingExpirationRenewedByAccessUntilAbsoluteExpiration() Assert.Null(result); } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Caching.Memory/tests/TokenExpirationTests.cs b/src/libraries/Microsoft.Extensions.Caching.Memory/tests/TokenExpirationTests.cs index cc0bc3c0152a..3da2515de878 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Memory/tests/TokenExpirationTests.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Memory/tests/TokenExpirationTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Threading; diff --git a/src/libraries/Microsoft.Extensions.Configuration.Abstractions/ref/Microsoft.Extensions.Configuration.Abstractions.cs b/src/libraries/Microsoft.Extensions.Configuration.Abstractions/ref/Microsoft.Extensions.Configuration.Abstractions.cs index 4c2c27406edd..74cdd5589db9 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Abstractions/ref/Microsoft.Extensions.Configuration.Abstractions.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Abstractions/ref/Microsoft.Extensions.Configuration.Abstractions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ------------------------------------------------------------------------------ // Changes to this file must follow the https://aka.ms/api-review process. // ------------------------------------------------------------------------------ diff --git a/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/ConfigurationExtensions.cs b/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/ConfigurationExtensions.cs index 618fcacc9956..ae620c77c2dd 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/ConfigurationExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/ConfigurationExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -55,16 +54,16 @@ public static IEnumerable> AsEnumerable(this IConfi var stack = new Stack(); stack.Push(configuration); var rootSection = configuration as IConfigurationSection; - var prefixLength = (makePathsRelative && rootSection != null) ? rootSection.Path.Length + 1 : 0; + int prefixLength = (makePathsRelative && rootSection != null) ? rootSection.Path.Length + 1 : 0; while (stack.Count > 0) { - var config = stack.Pop(); + IConfiguration config = stack.Pop(); // Don't include the sections value if we are removing paths, since it will be an empty key if (config is IConfigurationSection section && (!makePathsRelative || config != configuration)) { yield return new KeyValuePair(section.Path.Substring(prefixLength), section.Value); } - foreach (var child in config.GetChildren()) + foreach (IConfigurationSection child in config.GetChildren()) { stack.Push(child); } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/ConfigurationPath.cs b/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/ConfigurationPath.cs index 8de31a5fdb1f..2ad9e073d4f4 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/ConfigurationPath.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/ConfigurationPath.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -57,7 +56,7 @@ public static string GetSectionKey(string path) return path; } - var lastDelimiterIndex = path.LastIndexOf(KeyDelimiter, StringComparison.OrdinalIgnoreCase); + int lastDelimiterIndex = path.LastIndexOf(KeyDelimiter, StringComparison.OrdinalIgnoreCase); return lastDelimiterIndex == -1 ? path : path.Substring(lastDelimiterIndex + 1); } @@ -73,7 +72,7 @@ public static string GetParentPath(string path) return null; } - var lastDelimiterIndex = path.LastIndexOf(KeyDelimiter, StringComparison.OrdinalIgnoreCase); + int lastDelimiterIndex = path.LastIndexOf(KeyDelimiter, StringComparison.OrdinalIgnoreCase); return lastDelimiterIndex == -1 ? null : path.Substring(0, lastDelimiterIndex); } } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/ConfigurationRootExtensions.cs b/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/ConfigurationRootExtensions.cs index 8baf09c34261..b6976a734cfa 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/ConfigurationRootExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/ConfigurationRootExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Linq; @@ -24,9 +23,9 @@ void RecurseChildren( IEnumerable children, string indent) { - foreach (var child in children) + foreach (IConfigurationSection child in children) { - var valueAndProvider = GetValueAndProvider(root, child.Path); + (string Value, IConfigurationProvider Provider) valueAndProvider = GetValueAndProvider(root, child.Path); if (valueAndProvider.Provider != null) { @@ -62,9 +61,9 @@ private static (string Value, IConfigurationProvider Provider) GetValueAndProvid IConfigurationRoot root, string key) { - foreach (var provider in root.Providers.Reverse()) + foreach (IConfigurationProvider provider in root.Providers.Reverse()) { - if (provider.TryGet(key, out var value)) + if (provider.TryGet(key, out string value)) { return (value, provider); } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/IConfiguration.cs b/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/IConfiguration.cs index eec095ca621e..ce6b52b6601f 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/IConfiguration.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/IConfiguration.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using Microsoft.Extensions.Primitives; diff --git a/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/IConfigurationBuilder.cs b/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/IConfigurationBuilder.cs index 51d331f9565d..eb46b7d59b38 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/IConfigurationBuilder.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/IConfigurationBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/IConfigurationProvider.cs b/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/IConfigurationProvider.cs index 961d78224ce4..14d7940d41f0 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/IConfigurationProvider.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/IConfigurationProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using Microsoft.Extensions.Primitives; diff --git a/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/IConfigurationRoot.cs b/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/IConfigurationRoot.cs index e9b954123afa..dabdcc5da66b 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/IConfigurationRoot.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/IConfigurationRoot.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/IConfigurationSection.cs b/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/IConfigurationSection.cs index 023f5defbbf0..4e47e7cca87b 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/IConfigurationSection.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/IConfigurationSection.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.Configuration { diff --git a/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/IConfigurationSource.cs b/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/IConfigurationSource.cs index 202bf47aadd9..098521d9a685 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/IConfigurationSource.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/IConfigurationSource.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; @@ -18,4 +17,4 @@ public interface IConfigurationSource /// An IConfigurationProvider Build(IConfigurationBuilder builder); } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/ref/Microsoft.Extensions.Configuration.Binder.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/ref/Microsoft.Extensions.Configuration.Binder.cs index 041d0e62dfc3..4d3c63896503 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/ref/Microsoft.Extensions.Configuration.Binder.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/ref/Microsoft.Extensions.Configuration.Binder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ------------------------------------------------------------------------------ // Changes to this file must follow the https://aka.ms/api-review process. // ------------------------------------------------------------------------------ diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/src/BinderOptions.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/src/BinderOptions.cs index e705b7f3f48a..56c3ce55e21b 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/src/BinderOptions.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/src/BinderOptions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.Configuration { @@ -15,4 +14,4 @@ public class BinderOptions /// public bool BindNonPublicProperties { get; set; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/src/ConfigurationBinder.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/src/ConfigurationBinder.cs index a7bd00f188fc..199096a2b275 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/src/ConfigurationBinder.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/src/ConfigurationBinder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -42,7 +41,7 @@ public static T Get(this IConfiguration configuration, Action throw new ArgumentNullException(nameof(configuration)); } - var result = configuration.Get(typeof(T), configureOptions); + object result = configuration.Get(typeof(T), configureOptions); if (result == null) { return default(T); @@ -167,8 +166,8 @@ public static object GetValue(this IConfiguration configuration, Type type, stri /// The converted value. public static object GetValue(this IConfiguration configuration, Type type, string key, object defaultValue) { - var section = configuration.GetSection(key); - var value = section.Value; + IConfigurationSection section = configuration.GetSection(key); + string value = section.Value; if (value != null) { return ConvertValue(type, value, section.Path); @@ -180,7 +179,7 @@ private static void BindNonScalar(this IConfiguration configuration, object inst { if (instance != null) { - foreach (var property in GetAllProperties(instance.GetType().GetTypeInfo())) + foreach (PropertyInfo property in GetAllProperties(instance.GetType().GetTypeInfo())) { BindProperty(property, instance, configuration, options); } @@ -197,8 +196,8 @@ private static void BindProperty(PropertyInfo property, object instance, IConfig return; } - var propertyValue = property.GetValue(instance); - var hasSetter = property.SetMethod != null && (property.SetMethod.IsPublic || options.BindNonPublicProperties); + object propertyValue = property.GetValue(instance); + bool hasSetter = property.SetMethod != null && (property.SetMethod.IsPublic || options.BindNonPublicProperties); if (propertyValue == null && !hasSetter) { @@ -217,8 +216,8 @@ private static void BindProperty(PropertyInfo property, object instance, IConfig private static object BindToCollection(TypeInfo typeInfo, IConfiguration config, BinderOptions options) { - var type = typeof(List<>).MakeGenericType(typeInfo.GenericTypeArguments[0]); - var instance = Activator.CreateInstance(type); + Type type = typeof(List<>).MakeGenericType(typeInfo.GenericTypeArguments[0]); + object instance = Activator.CreateInstance(type); BindCollection(instance, type, config, options); return instance; } @@ -226,14 +225,14 @@ private static object BindToCollection(TypeInfo typeInfo, IConfiguration config, // Try to create an array/dictionary instance to back various collection interfaces private static object AttemptBindToCollectionInterfaces(Type type, IConfiguration config, BinderOptions options) { - var typeInfo = type.GetTypeInfo(); + TypeInfo typeInfo = type.GetTypeInfo(); if (!typeInfo.IsInterface) { return null; } - var collectionInterface = FindOpenGenericInterface(typeof(IReadOnlyList<>), type); + Type collectionInterface = FindOpenGenericInterface(typeof(IReadOnlyList<>), type); if (collectionInterface != null) { // IEnumerable is guaranteed to have exactly one parameter @@ -243,8 +242,8 @@ private static object AttemptBindToCollectionInterfaces(Type type, IConfiguratio collectionInterface = FindOpenGenericInterface(typeof(IReadOnlyDictionary<,>), type); if (collectionInterface != null) { - var dictionaryType = typeof(Dictionary<,>).MakeGenericType(typeInfo.GenericTypeArguments[0], typeInfo.GenericTypeArguments[1]); - var instance = Activator.CreateInstance(dictionaryType); + Type dictionaryType = typeof(Dictionary<,>).MakeGenericType(typeInfo.GenericTypeArguments[0], typeInfo.GenericTypeArguments[1]); + object instance = Activator.CreateInstance(dictionaryType); BindDictionary(instance, dictionaryType, config, options); return instance; } @@ -252,7 +251,7 @@ private static object AttemptBindToCollectionInterfaces(Type type, IConfiguratio collectionInterface = FindOpenGenericInterface(typeof(IDictionary<,>), type); if (collectionInterface != null) { - var instance = Activator.CreateInstance(typeof(Dictionary<,>).MakeGenericType(typeInfo.GenericTypeArguments[0], typeInfo.GenericTypeArguments[1])); + object instance = Activator.CreateInstance(typeof(Dictionary<,>).MakeGenericType(typeInfo.GenericTypeArguments[0], typeInfo.GenericTypeArguments[1])); BindDictionary(instance, collectionInterface, config, options); return instance; } @@ -290,7 +289,7 @@ private static object BindInstance(Type type, object instance, IConfiguration co } var section = config as IConfigurationSection; - var configValue = section?.Value; + string configValue = section?.Value; object convertedValue; Exception error; if (configValue != null && TryConvertValue(type, configValue, section.Path, out convertedValue, out error)) @@ -320,7 +319,7 @@ private static object BindInstance(Type type, object instance, IConfiguration co } // See if its a Dictionary - var collectionInterface = FindOpenGenericInterface(typeof(IDictionary<,>), type); + Type collectionInterface = FindOpenGenericInterface(typeof(IDictionary<,>), type); if (collectionInterface != null) { BindDictionary(instance, collectionInterface, config, options); @@ -350,7 +349,7 @@ private static object BindInstance(Type type, object instance, IConfiguration co private static object CreateInstance(Type type) { - var typeInfo = type.GetTypeInfo(); + TypeInfo typeInfo = type.GetTypeInfo(); if (typeInfo.IsInterface || typeInfo.IsAbstract) { @@ -367,10 +366,13 @@ private static object CreateInstance(Type type) return Array.CreateInstance(typeInfo.GetElementType(), 0); } - var hasDefaultConstructor = typeInfo.DeclaredConstructors.Any(ctor => ctor.IsPublic && ctor.GetParameters().Length == 0); - if (!hasDefaultConstructor) + if (!typeInfo.IsValueType) { - throw new InvalidOperationException(SR.Format(SR.Error_MissingParameterlessConstructor, type)); + bool hasDefaultConstructor = typeInfo.DeclaredConstructors.Any(ctor => ctor.IsPublic && ctor.GetParameters().Length == 0); + if (!hasDefaultConstructor) + { + throw new InvalidOperationException(SR.Format(SR.Error_MissingParameterlessConstructor, type)); + } } try @@ -385,12 +387,12 @@ private static object CreateInstance(Type type) private static void BindDictionary(object dictionary, Type dictionaryType, IConfiguration config, BinderOptions options) { - var typeInfo = dictionaryType.GetTypeInfo(); + TypeInfo typeInfo = dictionaryType.GetTypeInfo(); // IDictionary is guaranteed to have exactly two parameters - var keyType = typeInfo.GenericTypeArguments[0]; - var valueType = typeInfo.GenericTypeArguments[1]; - var keyTypeIsEnum = keyType.GetTypeInfo().IsEnum; + Type keyType = typeInfo.GenericTypeArguments[0]; + Type valueType = typeInfo.GenericTypeArguments[1]; + bool keyTypeIsEnum = keyType.GetTypeInfo().IsEnum; if (keyType != typeof(string) && !keyTypeIsEnum) { @@ -398,10 +400,10 @@ private static void BindDictionary(object dictionary, Type dictionaryType, IConf return; } - var setter = typeInfo.GetDeclaredProperty("Item"); - foreach (var child in config.GetChildren()) + PropertyInfo setter = typeInfo.GetDeclaredProperty("Item"); + foreach (IConfigurationSection child in config.GetChildren()) { - var item = BindInstance( + object item = BindInstance( type: valueType, instance: null, config: child, @@ -410,12 +412,12 @@ private static void BindDictionary(object dictionary, Type dictionaryType, IConf { if (keyType == typeof(string)) { - var key = child.Key; + string key = child.Key; setter.SetValue(dictionary, item, new object[] { key }); } else if (keyTypeIsEnum) { - var key = Enum.Parse(keyType, child.Key); + object key = Enum.Parse(keyType, child.Key); setter.SetValue(dictionary, item, new object[] { key }); } } @@ -424,17 +426,17 @@ private static void BindDictionary(object dictionary, Type dictionaryType, IConf private static void BindCollection(object collection, Type collectionType, IConfiguration config, BinderOptions options) { - var typeInfo = collectionType.GetTypeInfo(); + TypeInfo typeInfo = collectionType.GetTypeInfo(); // ICollection is guaranteed to have exactly one parameter - var itemType = typeInfo.GenericTypeArguments[0]; - var addMethod = typeInfo.GetDeclaredMethod("Add"); + Type itemType = typeInfo.GenericTypeArguments[0]; + MethodInfo addMethod = typeInfo.GetDeclaredMethod("Add"); - foreach (var section in config.GetChildren()) + foreach (IConfigurationSection section in config.GetChildren()) { try { - var item = BindInstance( + object item = BindInstance( type: itemType, instance: null, config: section, @@ -452,9 +454,9 @@ private static void BindCollection(object collection, Type collectionType, IConf private static Array BindArray(Array source, IConfiguration config, BinderOptions options) { - var children = config.GetChildren().ToArray(); - var arrayLength = source.Length; - var elementType = source.GetType().GetElementType(); + IConfigurationSection[] children = config.GetChildren().ToArray(); + int arrayLength = source.Length; + Type elementType = source.GetType().GetElementType(); var newArray = Array.CreateInstance(elementType, arrayLength + children.Length); // binding to array has to preserve already initialized arrays with values @@ -467,7 +469,7 @@ private static Array BindArray(Array source, IConfiguration config, BinderOption { try { - var item = BindInstance( + object item = BindInstance( type: elementType, instance: null, config: children[i], @@ -504,7 +506,7 @@ private static bool TryConvertValue(Type type, string value, string path, out ob return TryConvertValue(Nullable.GetUnderlyingType(type), value, path, out result, out error); } - var converter = TypeDescriptor.GetConverter(type); + TypeConverter converter = TypeDescriptor.GetConverter(type); if (converter.CanConvertFrom(typeof(string))) { try @@ -535,15 +537,15 @@ private static object ConvertValue(Type type, string value, string path) private static Type FindOpenGenericInterface(Type expected, Type actual) { - var actualTypeInfo = actual.GetTypeInfo(); - if(actualTypeInfo.IsGenericType && + TypeInfo actualTypeInfo = actual.GetTypeInfo(); + if (actualTypeInfo.IsGenericType && actual.GetGenericTypeDefinition() == expected) { return actual; } - var interfaces = actualTypeInfo.ImplementedInterfaces; - foreach (var interfaceType in interfaces) + IEnumerable interfaces = actualTypeInfo.ImplementedInterfaces; + foreach (Type interfaceType in interfaces) { if (interfaceType.GetTypeInfo().IsGenericType && interfaceType.GetGenericTypeDefinition() == expected) diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/src/Properties/InternalsVisibleTo.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/src/Properties/InternalsVisibleTo.cs index 536c6d936d24..86944dd2d869 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/src/Properties/InternalsVisibleTo.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/src/Properties/InternalsVisibleTo.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("Microsoft.Extensions.Configuration.Binder.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.Extensions.Configuration.Binder.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/ConfigurationBinderTests.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/ConfigurationBinderTests.cs index 6de2c01dd31b..d8fb3cfd38b8 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/ConfigurationBinderTests.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/ConfigurationBinderTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -104,6 +103,12 @@ public class DerivedOptionsWithIConfigurationSection : DerivedOptions public IConfigurationSection DerivedSection { get; set; } } + public struct ValueTypeOptions + { + public int MyInt32 { get; set; } + public string MyString { get; set; } + } + [Fact] public void CanBindIConfigurationSection() { @@ -790,6 +795,23 @@ public void ExceptionIncludesKeyOfFailedBinding() exception.Message); } + [Fact] + public void CanBindValueTypeOptions() + { + var dic = new Dictionary + { + {"MyInt32", "42"}, + {"MyString", "hello world"}, + }; + var configurationBuilder = new ConfigurationBuilder(); + configurationBuilder.AddInMemoryCollection(dic); + var config = configurationBuilder.Build(); + + var options = config.Get(); + Assert.Equal(42, options.MyInt32); + Assert.Equal("hello world", options.MyString); + } + private interface ISomeInterface { } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/ConfigurationCollectionBindingTests.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/ConfigurationCollectionBindingTests.cs index 71752590f6c4..140aedc7eee3 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/ConfigurationCollectionBindingTests.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/ConfigurationCollectionBindingTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.Configuration.CommandLine/ref/Microsoft.Extensions.Configuration.CommandLine.cs b/src/libraries/Microsoft.Extensions.Configuration.CommandLine/ref/Microsoft.Extensions.Configuration.CommandLine.cs index 68dca57765d1..0e629f4f1156 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.CommandLine/ref/Microsoft.Extensions.Configuration.CommandLine.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.CommandLine/ref/Microsoft.Extensions.Configuration.CommandLine.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ------------------------------------------------------------------------------ // Changes to this file must follow the https://aka.ms/api-review process. // ------------------------------------------------------------------------------ diff --git a/src/libraries/Microsoft.Extensions.Configuration.CommandLine/src/CommandLineConfigurationExtensions.cs b/src/libraries/Microsoft.Extensions.Configuration.CommandLine/src/CommandLineConfigurationExtensions.cs index 5e5e11bf4a71..c5e7ee43326f 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.CommandLine/src/CommandLineConfigurationExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.CommandLine/src/CommandLineConfigurationExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -14,7 +13,7 @@ namespace Microsoft.Extensions.Configuration public static class CommandLineConfigurationExtensions { /// - /// Adds a + /// Adds a /// that reads configuration values from the command line. /// /// The to add to. @@ -23,26 +22,26 @@ public static class CommandLineConfigurationExtensions /// /// /// The values passed on the command line, in the args string array, should be a set - /// of keys prefixed with two dashes ("--") and then values, separate by either the + /// of keys prefixed with two dashes ("--") and then values, separate by either the /// equals sign ("=") or a space (" "). /// /// /// A forward slash ("/") can be used as an alternative prefix, with either equals or space, and when using - /// an equals sign the prefix can be left out altogether. + /// an equals sign the prefix can be left out altogether. /// /// - /// There are five basic alternative formats for arguments: + /// There are five basic alternative formats for arguments: /// key1=value1 --key2=value2 /key3=value3 --key4 value4 /key5 value5. /// /// /// - /// A simple console application that has five values. + /// A simple console application that has five values. /// /// // dotnet run key1=value1 --key2=value2 /key3=value3 --key4 value4 /key5 value5 - /// + /// /// using Microsoft.Extensions.Configuration; /// using System; - /// + /// /// namespace CommandLineSample /// { /// public class Program @@ -51,9 +50,9 @@ public static class CommandLineConfigurationExtensions /// { /// var builder = new ConfigurationBuilder(); /// builder.AddCommandLine(args); - /// + /// /// var config = builder.Build(); - /// + /// /// Console.WriteLine($"Key1: '{config["Key1"]}'"); /// Console.WriteLine($"Key2: '{config["Key2"]}'"); /// Console.WriteLine($"Key3: '{config["Key3"]}'"); @@ -76,13 +75,13 @@ public static IConfigurationBuilder AddCommandLine(this IConfigurationBuilder co /// The to add to. /// The command line args. /// - /// The switch mappings. A dictionary of short (with prefix "-") and + /// The switch mappings. A dictionary of short (with prefix "-") and /// alias keys (with prefix "--"), mapped to the configuration key (no prefix). /// /// The . /// /// - /// The switchMappings allows additional formats for alternative short and alias keys + /// The switchMappings allows additional formats for alternative short and alias keys /// to be used from the command line. Also see the basic version of AddCommandLine for /// the standard formats supported. /// @@ -97,28 +96,28 @@ public static IConfigurationBuilder AddCommandLine(this IConfigurationBuilder co /// cause as FormatException. /// /// - /// There are two formats for short arguments: + /// There are two formats for short arguments: /// -k1=value1 -k2 value2. /// /// /// Alias key definitions start with two dashes ("--") and are mapped to the main key name (without - /// prefix), and can be used in place of the normal key. They also work when a forward slash prefix + /// prefix), and can be used in place of the normal key. They also work when a forward slash prefix /// is used in the command line (but not with the no prefix equals format). /// /// - /// There are only four formats for aliased arguments: + /// There are only four formats for aliased arguments: /// --alt3=value3 /alt4=value4 --alt5 value5 /alt6 value6. /// /// /// - /// A simple console application that has two short and four alias switch mappings defined. + /// A simple console application that has two short and four alias switch mappings defined. /// /// // dotnet run -k1=value1 -k2 value2 --alt3=value2 /alt4=value3 --alt5 value5 /alt6 value6 - /// + /// /// using Microsoft.Extensions.Configuration; /// using System; /// using System.Collections.Generic; - /// + /// /// namespace CommandLineSample /// { /// public class Program @@ -136,9 +135,9 @@ public static IConfigurationBuilder AddCommandLine(this IConfigurationBuilder co /// }; /// var builder = new ConfigurationBuilder(); /// builder.AddCommandLine(args, switchMappings); - /// + /// /// var config = builder.Build(); - /// + /// /// Console.WriteLine($"Key1: '{config["Key1"]}'"); /// Console.WriteLine($"Key2: '{config["Key2"]}'"); /// Console.WriteLine($"Key3: '{config["Key3"]}'"); diff --git a/src/libraries/Microsoft.Extensions.Configuration.CommandLine/src/CommandLineConfigurationProvider.cs b/src/libraries/Microsoft.Extensions.Configuration.CommandLine/src/CommandLineConfigurationProvider.cs index c3a3ac9546d9..7c4098b20e72 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.CommandLine/src/CommandLineConfigurationProvider.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.CommandLine/src/CommandLineConfigurationProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -42,12 +41,12 @@ public override void Load() var data = new Dictionary(StringComparer.OrdinalIgnoreCase); string key, value; - using (var enumerator = Args.GetEnumerator()) + using (IEnumerator enumerator = Args.GetEnumerator()) { while (enumerator.MoveNext()) { - var currentArg = enumerator.Current; - var keyStartIndex = 0; + string currentArg = enumerator.Current; + int keyStartIndex = 0; if (currentArg.StartsWith("--")) { @@ -65,7 +64,7 @@ public override void Load() keyStartIndex = 2; } - var separator = currentArg.IndexOf('='); + int separator = currentArg.IndexOf('='); if (separator < 0) { @@ -77,7 +76,7 @@ public override void Load() } // If the switch is a key in given switch mappings, interpret it - if (_switchMappings != null && _switchMappings.TryGetValue(currentArg, out var mappedKey)) + if (_switchMappings != null && _switchMappings.TryGetValue(currentArg, out string mappedKey)) { key = mappedKey; } @@ -92,7 +91,7 @@ public override void Load() key = currentArg.Substring(keyStartIndex); } - var previousKey = enumerator.Current; + string previousKey = enumerator.Current; if (!enumerator.MoveNext()) { // ignore missing values @@ -103,10 +102,10 @@ public override void Load() } else { - var keySegment = currentArg.Substring(0, separator); + string keySegment = currentArg.Substring(0, separator); // If the switch is a key in given switch mappings, interpret it - if (_switchMappings != null && _switchMappings.TryGetValue(keySegment, out var mappedKeySegment)) + if (_switchMappings != null && _switchMappings.TryGetValue(keySegment, out string mappedKeySegment)) { key = mappedKeySegment; } @@ -138,7 +137,7 @@ private Dictionary GetValidatedSwitchMappingsCopy(IDictionary(switchMappings.Count, StringComparer.OrdinalIgnoreCase); - foreach (var mapping in switchMappings) + foreach (KeyValuePair mapping in switchMappings) { // Only keys start with "--" or "-" are acceptable if (!mapping.Key.StartsWith("-") && !mapping.Key.StartsWith("--")) diff --git a/src/libraries/Microsoft.Extensions.Configuration.CommandLine/src/CommandLineConfigurationSource.cs b/src/libraries/Microsoft.Extensions.Configuration.CommandLine/src/CommandLineConfigurationSource.cs index abfd2b17eb44..36a665e360a4 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.CommandLine/src/CommandLineConfigurationSource.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.CommandLine/src/CommandLineConfigurationSource.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.Configuration.CommandLine/src/Properties/InternalsVisibleTo.cs b/src/libraries/Microsoft.Extensions.Configuration.CommandLine/src/Properties/InternalsVisibleTo.cs index e096e7daaf79..1b73d58567c4 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.CommandLine/src/Properties/InternalsVisibleTo.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.CommandLine/src/Properties/InternalsVisibleTo.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("Microsoft.Extensions.Configuration.CommandLine.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.Extensions.Configuration.CommandLine.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/src/libraries/Microsoft.Extensions.Configuration.CommandLine/tests/CommandLineTest.cs b/src/libraries/Microsoft.Extensions.Configuration.CommandLine/tests/CommandLineTest.cs index dfcdc44a5907..8e4a985ff90a 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.CommandLine/tests/CommandLineTest.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.CommandLine/tests/CommandLineTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.Configuration.CommandLine/tests/ConfigurationProviderCommandLineTest.cs b/src/libraries/Microsoft.Extensions.Configuration.CommandLine/tests/ConfigurationProviderCommandLineTest.cs index fc957b4d5705..965cbc0377e2 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.CommandLine/tests/ConfigurationProviderCommandLineTest.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.CommandLine/tests/ConfigurationProviderCommandLineTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/ref/Microsoft.Extensions.Configuration.EnvironmentVariables.cs b/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/ref/Microsoft.Extensions.Configuration.EnvironmentVariables.cs index 388cccc820f1..d6e4271e68b9 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/ref/Microsoft.Extensions.Configuration.EnvironmentVariables.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/ref/Microsoft.Extensions.Configuration.EnvironmentVariables.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ------------------------------------------------------------------------------ // Changes to this file must follow the https://aka.ms/api-review process. // ------------------------------------------------------------------------------ diff --git a/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/src/EnvironmentVariablesConfigurationProvider.cs b/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/src/EnvironmentVariablesConfigurationProvider.cs index 27a101630d19..604e544a8ba4 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/src/EnvironmentVariablesConfigurationProvider.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/src/EnvironmentVariablesConfigurationProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections; @@ -51,14 +50,14 @@ internal void Load(IDictionary envVariables) { var data = new Dictionary(StringComparer.OrdinalIgnoreCase); - var filteredEnvVariables = envVariables + IEnumerable filteredEnvVariables = envVariables .Cast() .SelectMany(AzureEnvToAppEnv) .Where(entry => ((string)entry.Key).StartsWith(_prefix, StringComparison.OrdinalIgnoreCase)); - foreach (var envVariable in filteredEnvVariables) + foreach (DictionaryEntry envVariable in filteredEnvVariables) { - var key = ((string)envVariable.Key).Substring(_prefix.Length); + string key = ((string)envVariable.Key).Substring(_prefix.Length); data[key] = (string)envVariable.Value; } @@ -72,9 +71,9 @@ private static string NormalizeKey(string key) private static IEnumerable AzureEnvToAppEnv(DictionaryEntry entry) { - var key = (string)entry.Key; - var prefix = string.Empty; - var provider = string.Empty; + string key = (string)entry.Key; + string prefix = string.Empty; + string provider = string.Empty; if (key.StartsWith(MySqlServerPrefix, StringComparison.OrdinalIgnoreCase)) { diff --git a/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/src/EnvironmentVariablesConfigurationSource.cs b/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/src/EnvironmentVariablesConfigurationSource.cs index 86f9e332a710..f5ac7b87a4a4 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/src/EnvironmentVariablesConfigurationSource.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/src/EnvironmentVariablesConfigurationSource.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.Configuration.EnvironmentVariables { diff --git a/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/src/EnvironmentVariablesExtensions.cs b/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/src/EnvironmentVariablesExtensions.cs index efdcc14a1892..b43127513186 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/src/EnvironmentVariablesExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/src/EnvironmentVariablesExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.Configuration.EnvironmentVariables; diff --git a/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/src/Properties/InternalsVisibleTo.cs b/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/src/Properties/InternalsVisibleTo.cs index 1ac10256268c..a6bf0af62b99 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/src/Properties/InternalsVisibleTo.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/src/Properties/InternalsVisibleTo.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("Microsoft.Extensions.Configuration.EnvironmentVariables.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.Extensions.Configuration.EnvironmentVariables.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/tests/ConfigurationProviderEnvironmentVariablesTest.cs b/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/tests/ConfigurationProviderEnvironmentVariablesTest.cs index cbafeada2576..0ba7023c826f 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/tests/ConfigurationProviderEnvironmentVariablesTest.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/tests/ConfigurationProviderEnvironmentVariablesTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections; diff --git a/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/tests/EnvironmentVariablesTest.cs b/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/tests/EnvironmentVariablesTest.cs index fcb0a19920cc..533a93fa83b5 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/tests/EnvironmentVariablesTest.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/tests/EnvironmentVariablesTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections; diff --git a/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/ref/Microsoft.Extensions.Configuration.FileExtensions.cs b/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/ref/Microsoft.Extensions.Configuration.FileExtensions.cs index 73515ac5be73..9314e23ef311 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/ref/Microsoft.Extensions.Configuration.FileExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/ref/Microsoft.Extensions.Configuration.FileExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ------------------------------------------------------------------------------ // Changes to this file must follow the https://aka.ms/api-review process. // ------------------------------------------------------------------------------ diff --git a/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/src/FileConfigurationExtensions.cs b/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/src/FileConfigurationExtensions.cs index 8dadfc6fea8c..4ce12bd020ca 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/src/FileConfigurationExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/src/FileConfigurationExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.FileProviders; diff --git a/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/src/FileConfigurationProvider.cs b/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/src/FileConfigurationProvider.cs index f8b62b348c74..05508ceb2821 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/src/FileConfigurationProvider.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/src/FileConfigurationProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -58,7 +57,7 @@ public override string ToString() private void Load(bool reload) { - var file = Source.FileProvider?.GetFileInfo(Source.Path); + IFileInfo file = Source.FileProvider?.GetFileInfo(Source.Path); if (file == null || !file.Exists) { if (Source.Optional || reload) // Always optional on reload diff --git a/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/src/FileConfigurationSource.cs b/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/src/FileConfigurationSource.cs index 076140c8009f..1122e6f17155 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/src/FileConfigurationSource.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/src/FileConfigurationSource.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; @@ -62,17 +61,17 @@ public void EnsureDefaults(IConfigurationBuilder builder) } /// - /// If no file provider has been set, for absolute Path, this will creates a physical file provider + /// If no file provider has been set, for absolute Path, this will creates a physical file provider /// for the nearest existing directory. /// public void ResolveFileProvider() { - if (FileProvider == null && + if (FileProvider == null && !string.IsNullOrEmpty(Path) && System.IO.Path.IsPathRooted(Path)) { - var directory = System.IO.Path.GetDirectoryName(Path); - var pathToFile = System.IO.Path.GetFileName(Path); + string directory = System.IO.Path.GetDirectoryName(Path); + string pathToFile = System.IO.Path.GetFileName(Path); while (!string.IsNullOrEmpty(directory) && !Directory.Exists(directory)) { pathToFile = System.IO.Path.Combine(System.IO.Path.GetFileName(directory), pathToFile); @@ -87,4 +86,4 @@ public void ResolveFileProvider() } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/src/FileLoadExceptionContext.cs b/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/src/FileLoadExceptionContext.cs index 42f324deae77..a87c82339f58 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/src/FileLoadExceptionContext.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/src/FileLoadExceptionContext.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -26,4 +25,4 @@ public class FileLoadExceptionContext /// public bool Ignore { get; set; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/src/Properties/InternalsVisibleTo.cs b/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/src/Properties/InternalsVisibleTo.cs index ecf40ff0f89e..83cca464b417 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/src/Properties/InternalsVisibleTo.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/src/Properties/InternalsVisibleTo.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("Microsoft.Extensions.Configuration.FileExtensions.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.Extensions.Configuration.FileExtensions.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/tests/FileConfigurationBuilderExtensionsTest.cs b/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/tests/FileConfigurationBuilderExtensionsTest.cs index 0c17b9c39fd4..a0ff27214d5d 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/tests/FileConfigurationBuilderExtensionsTest.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/tests/FileConfigurationBuilderExtensionsTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/tests/FileConfigurationProviderTest.cs b/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/tests/FileConfigurationProviderTest.cs index 6f952461630f..3d476cca72a8 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/tests/FileConfigurationProviderTest.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/tests/FileConfigurationProviderTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.Configuration.Ini/ref/Microsoft.Extensions.Configuration.Ini.cs b/src/libraries/Microsoft.Extensions.Configuration.Ini/ref/Microsoft.Extensions.Configuration.Ini.cs index 6e1970781dc9..9a73882b9e3a 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Ini/ref/Microsoft.Extensions.Configuration.Ini.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Ini/ref/Microsoft.Extensions.Configuration.Ini.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ------------------------------------------------------------------------------ // Changes to this file must follow the https://aka.ms/api-review process. // ------------------------------------------------------------------------------ diff --git a/src/libraries/Microsoft.Extensions.Configuration.Ini/src/IniConfigurationExtensions.cs b/src/libraries/Microsoft.Extensions.Configuration.Ini/src/IniConfigurationExtensions.cs index 93e39ff27ac3..259417495a1d 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Ini/src/IniConfigurationExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Ini/src/IniConfigurationExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; @@ -30,7 +29,7 @@ public static IConfigurationBuilder AddIniFile(this IConfigurationBuilder builde /// Adds the INI configuration provider at to . /// /// The to add to. - /// Path relative to the base path stored in + /// Path relative to the base path stored in /// of . /// Whether the file is optional. /// The . @@ -43,7 +42,7 @@ public static IConfigurationBuilder AddIniFile(this IConfigurationBuilder builde /// Adds the INI configuration provider at to . /// /// The to add to. - /// Path relative to the base path stored in + /// Path relative to the base path stored in /// of . /// Whether the file is optional. /// Whether the configuration should be reloaded if the file changes. @@ -58,7 +57,7 @@ public static IConfigurationBuilder AddIniFile(this IConfigurationBuilder builde /// /// The to add to. /// The to use to access the file. - /// Path relative to the base path stored in + /// Path relative to the base path stored in /// of . /// Whether the file is optional. /// Whether the configuration should be reloaded if the file changes. diff --git a/src/libraries/Microsoft.Extensions.Configuration.Ini/src/IniConfigurationProvider.cs b/src/libraries/Microsoft.Extensions.Configuration.Ini/src/IniConfigurationProvider.cs index c04dad1b62ac..3d601510a7f4 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Ini/src/IniConfigurationProvider.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Ini/src/IniConfigurationProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; diff --git a/src/libraries/Microsoft.Extensions.Configuration.Ini/src/IniConfigurationSource.cs b/src/libraries/Microsoft.Extensions.Configuration.Ini/src/IniConfigurationSource.cs index a7a125b3b9df..b107e84f2f35 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Ini/src/IniConfigurationSource.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Ini/src/IniConfigurationSource.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.Configuration.Ini { diff --git a/src/libraries/Microsoft.Extensions.Configuration.Ini/src/IniStreamConfigurationProvider.cs b/src/libraries/Microsoft.Extensions.Configuration.Ini/src/IniStreamConfigurationProvider.cs index f748ff8b1e26..adf1de0ac4cc 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Ini/src/IniStreamConfigurationProvider.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Ini/src/IniStreamConfigurationProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -29,12 +28,12 @@ public static IDictionary Read(Stream stream) var data = new Dictionary(StringComparer.OrdinalIgnoreCase); using (var reader = new StreamReader(stream)) { - var sectionPrefix = string.Empty; + string sectionPrefix = string.Empty; while (reader.Peek() != -1) { - var rawLine = reader.ReadLine(); - var line = rawLine.Trim(); + string rawLine = reader.ReadLine(); + string line = rawLine.Trim(); // Ignore blank lines if (string.IsNullOrWhiteSpace(line)) diff --git a/src/libraries/Microsoft.Extensions.Configuration.Ini/src/IniStreamConfigurationSource.cs b/src/libraries/Microsoft.Extensions.Configuration.Ini/src/IniStreamConfigurationSource.cs index 17c4887d3eb5..01f594d91ce8 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Ini/src/IniStreamConfigurationSource.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Ini/src/IniStreamConfigurationSource.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.Configuration.Ini { diff --git a/src/libraries/Microsoft.Extensions.Configuration.Ini/src/Properties/InternalsVisibleTo.cs b/src/libraries/Microsoft.Extensions.Configuration.Ini/src/Properties/InternalsVisibleTo.cs index 0e4ec9db9830..44e639934b72 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Ini/src/Properties/InternalsVisibleTo.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Ini/src/Properties/InternalsVisibleTo.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("Microsoft.Extensions.Configuration.Ini.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.Extensions.Configuration.Ini.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/src/libraries/Microsoft.Extensions.Configuration.Ini/tests/ConfigurationProviderIniTest.cs b/src/libraries/Microsoft.Extensions.Configuration.Ini/tests/ConfigurationProviderIniTest.cs index 274659b31eca..a914adc3a7d2 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Ini/tests/ConfigurationProviderIniTest.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Ini/tests/ConfigurationProviderIniTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Linq; diff --git a/src/libraries/Microsoft.Extensions.Configuration.Ini/tests/IniConfigurationExtensionsTest.cs b/src/libraries/Microsoft.Extensions.Configuration.Ini/tests/IniConfigurationExtensionsTest.cs index 6a3c0b22d536..e727772736ad 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Ini/tests/IniConfigurationExtensionsTest.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Ini/tests/IniConfigurationExtensionsTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Microsoft.Extensions.Configuration.Ini/tests/IniConfigurationTest.cs b/src/libraries/Microsoft.Extensions.Configuration.Ini/tests/IniConfigurationTest.cs index bfb25815790a..a2b3f852497b 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Ini/tests/IniConfigurationTest.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Ini/tests/IniConfigurationTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Microsoft.Extensions.Configuration.Json/ref/Microsoft.Extensions.Configuration.Json.cs b/src/libraries/Microsoft.Extensions.Configuration.Json/ref/Microsoft.Extensions.Configuration.Json.cs index 1ddda5486f3d..b844fec6f2f7 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Json/ref/Microsoft.Extensions.Configuration.Json.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Json/ref/Microsoft.Extensions.Configuration.Json.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ------------------------------------------------------------------------------ // Changes to this file must follow the https://aka.ms/api-review process. // ------------------------------------------------------------------------------ diff --git a/src/libraries/Microsoft.Extensions.Configuration.Json/src/JsonConfigurationExtensions.cs b/src/libraries/Microsoft.Extensions.Configuration.Json/src/JsonConfigurationExtensions.cs index a71e48ba7f14..e5cc31af1289 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Json/src/JsonConfigurationExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Json/src/JsonConfigurationExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; @@ -18,7 +17,7 @@ public static class JsonConfigurationExtensions /// Adds the JSON configuration provider at to . /// /// The to add to. - /// Path relative to the base path stored in + /// Path relative to the base path stored in /// of . /// The . public static IConfigurationBuilder AddJsonFile(this IConfigurationBuilder builder, string path) @@ -30,7 +29,7 @@ public static IConfigurationBuilder AddJsonFile(this IConfigurationBuilder build /// Adds the JSON configuration provider at to . /// /// The to add to. - /// Path relative to the base path stored in + /// Path relative to the base path stored in /// of . /// Whether the file is optional. /// The . @@ -43,7 +42,7 @@ public static IConfigurationBuilder AddJsonFile(this IConfigurationBuilder build /// Adds the JSON configuration provider at to . /// /// The to add to. - /// Path relative to the base path stored in + /// Path relative to the base path stored in /// of . /// Whether the file is optional. /// Whether the configuration should be reloaded if the file changes. @@ -58,7 +57,7 @@ public static IConfigurationBuilder AddJsonFile(this IConfigurationBuilder build /// /// The to add to. /// The to use to access the file. - /// Path relative to the base path stored in + /// Path relative to the base path stored in /// of . /// Whether the file is optional. /// Whether the configuration should be reloaded if the file changes. diff --git a/src/libraries/Microsoft.Extensions.Configuration.Json/src/JsonConfigurationFileParser.cs b/src/libraries/Microsoft.Extensions.Configuration.Json/src/JsonConfigurationFileParser.cs index 18736057edfe..354b94c6e2bb 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Json/src/JsonConfigurationFileParser.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Json/src/JsonConfigurationFileParser.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -45,7 +44,7 @@ private IDictionary ParseStream(Stream input) } private void VisitElement(JsonElement element) { - foreach (var property in element.EnumerateObject()) + foreach (JsonProperty property in element.EnumerateObject()) { EnterContext(property.Name); VisitValue(property.Value); @@ -61,8 +60,8 @@ private void VisitValue(JsonElement value) break; case JsonValueKind.Array: - var index = 0; - foreach (var arrayElement in value.EnumerateArray()) { + int index = 0; + foreach (JsonElement arrayElement in value.EnumerateArray()) { EnterContext(index.ToString()); VisitValue(arrayElement); ExitContext(); @@ -75,7 +74,7 @@ private void VisitValue(JsonElement value) case JsonValueKind.True: case JsonValueKind.False: case JsonValueKind.Null: - var key = _currentPath; + string key = _currentPath; if (_data.ContainsKey(key)) { throw new FormatException(SR.Format(SR.Error_KeyIsDuplicated, key)); diff --git a/src/libraries/Microsoft.Extensions.Configuration.Json/src/JsonConfigurationProvider.cs b/src/libraries/Microsoft.Extensions.Configuration.Json/src/JsonConfigurationProvider.cs index f179001f1032..c2c1ef898a08 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Json/src/JsonConfigurationProvider.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Json/src/JsonConfigurationProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.Configuration.Json/src/JsonConfigurationSource.cs b/src/libraries/Microsoft.Extensions.Configuration.Json/src/JsonConfigurationSource.cs index 428c3eb2858e..da5eaf736b22 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Json/src/JsonConfigurationSource.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Json/src/JsonConfigurationSource.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -22,4 +21,4 @@ public override IConfigurationProvider Build(IConfigurationBuilder builder) return new JsonConfigurationProvider(this); } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Configuration.Json/src/JsonStreamConfigurationProvider.cs b/src/libraries/Microsoft.Extensions.Configuration.Json/src/JsonStreamConfigurationProvider.cs index 4e144d1db138..2ed6ad119102 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Json/src/JsonStreamConfigurationProvider.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Json/src/JsonStreamConfigurationProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; diff --git a/src/libraries/Microsoft.Extensions.Configuration.Json/src/JsonStreamConfigurationSource.cs b/src/libraries/Microsoft.Extensions.Configuration.Json/src/JsonStreamConfigurationSource.cs index d90f7f14602f..0e38670010db 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Json/src/JsonStreamConfigurationSource.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Json/src/JsonStreamConfigurationSource.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.Configuration.Json { diff --git a/src/libraries/Microsoft.Extensions.Configuration.Json/src/Microsoft.Extensions.Configuration.Json.csproj b/src/libraries/Microsoft.Extensions.Configuration.Json/src/Microsoft.Extensions.Configuration.Json.csproj index edd848567a5c..f26210a6e991 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Json/src/Microsoft.Extensions.Configuration.Json.csproj +++ b/src/libraries/Microsoft.Extensions.Configuration.Json/src/Microsoft.Extensions.Configuration.Json.csproj @@ -3,7 +3,6 @@ $(NetCoreAppCurrent);netstandard2.0 true - $(NoWarn);3021 true diff --git a/src/libraries/Microsoft.Extensions.Configuration.Json/src/Properties/InternalsVisibleTo.cs b/src/libraries/Microsoft.Extensions.Configuration.Json/src/Properties/InternalsVisibleTo.cs index ee118a2ed190..9ccc39f219cc 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Json/src/Properties/InternalsVisibleTo.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Json/src/Properties/InternalsVisibleTo.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("Microsoft.Extensions.Configuration.Json.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.Extensions.Configuration.Json.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/src/libraries/Microsoft.Extensions.Configuration.Json/tests/ArrayTest.cs b/src/libraries/Microsoft.Extensions.Configuration.Json/tests/ArrayTest.cs index 0b2bbdaee016..f1db0f5fdb0f 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Json/tests/ArrayTest.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Json/tests/ArrayTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Linq; using Microsoft.Extensions.Configuration.Test; diff --git a/src/libraries/Microsoft.Extensions.Configuration.Json/tests/ConfigurationProviderJsonTest.cs b/src/libraries/Microsoft.Extensions.Configuration.Json/tests/ConfigurationProviderJsonTest.cs index 8c0f2157c9a3..033f9a753a7e 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Json/tests/ConfigurationProviderJsonTest.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Json/tests/ConfigurationProviderJsonTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Linq; diff --git a/src/libraries/Microsoft.Extensions.Configuration.Json/tests/JsonConfigurationExtensionsTest.cs b/src/libraries/Microsoft.Extensions.Configuration.Json/tests/JsonConfigurationExtensionsTest.cs index 46994b5b993d..353e6425425f 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Json/tests/JsonConfigurationExtensionsTest.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Json/tests/JsonConfigurationExtensionsTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Microsoft.Extensions.Configuration.Json/tests/JsonConfigurationTest.cs b/src/libraries/Microsoft.Extensions.Configuration.Json/tests/JsonConfigurationTest.cs index c45f0ade6f0e..b21f56fef7cd 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Json/tests/JsonConfigurationTest.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Json/tests/JsonConfigurationTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Globalization; diff --git a/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/ref/Microsoft.Extensions.Configuration.UserSecrets.cs b/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/ref/Microsoft.Extensions.Configuration.UserSecrets.cs index f2ac335f3d8f..5432080d0446 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/ref/Microsoft.Extensions.Configuration.UserSecrets.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/ref/Microsoft.Extensions.Configuration.UserSecrets.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ------------------------------------------------------------------------------ // Changes to this file must follow the https://aka.ms/api-review process. // ------------------------------------------------------------------------------ diff --git a/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/src/PathHelper.cs b/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/src/PathHelper.cs index 03ea1ffd75e2..edcd5f3c72f7 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/src/PathHelper.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/src/PathHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; @@ -31,7 +30,7 @@ public static string GetSecretsPathFromSecretsId(string userSecretsId) throw new ArgumentException(SR.Common_StringNullOrEmpty, nameof(userSecretsId)); } - var badCharIndex = userSecretsId.IndexOfAny(Path.GetInvalidFileNameChars()); + int badCharIndex = userSecretsId.IndexOfAny(Path.GetInvalidFileNameChars()); if (badCharIndex != -1) { throw new InvalidOperationException( @@ -44,10 +43,10 @@ public static string GetSecretsPathFromSecretsId(string userSecretsId) const string userSecretsFallbackDir = "DOTNET_USER_SECRETS_FALLBACK_DIR"; // For backwards compat, this checks env vars first before using Env.GetFolderPath - var appData = Environment.GetEnvironmentVariable("APPDATA"); - var root = appData // On Windows it goes to %APPDATA%\Microsoft\UserSecrets\ + string appData = Environment.GetEnvironmentVariable("APPDATA"); + string root = appData // On Windows it goes to %APPDATA%\Microsoft\UserSecrets\ ?? Environment.GetEnvironmentVariable("HOME") // On Mac/Linux it goes to ~/.microsoft/usersecrets/ - ?? Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + ?? Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) ?? Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) ?? Environment.GetEnvironmentVariable(userSecretsFallbackDir); // this fallback is an escape hatch if everything else fails diff --git a/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/src/Properties/InternalsVisibleTo.cs b/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/src/Properties/InternalsVisibleTo.cs index 1d00d8b01e20..69fbc57df1a8 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/src/Properties/InternalsVisibleTo.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/src/Properties/InternalsVisibleTo.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("Microsoft.Extensions.Configuration.UserSecrets.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.Extensions.Configuration.UserSecrets.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/src/UserSecretsConfigurationExtensions.cs b/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/src/UserSecretsConfigurationExtensions.cs index 9e6833a0a3d5..0da3963fe2aa 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/src/UserSecretsConfigurationExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/src/UserSecretsConfigurationExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; @@ -129,7 +128,7 @@ public static IConfigurationBuilder AddUserSecrets(this IConfigurationBuilder co throw new ArgumentNullException(nameof(assembly)); } - var attribute = assembly.GetCustomAttribute(); + UserSecretsIdAttribute attribute = assembly.GetCustomAttribute(); if (attribute != null) { return AddUserSecrets(configuration, attribute.UserSecretsId, reloadOnChange); @@ -186,8 +185,8 @@ public static IConfigurationBuilder AddUserSecrets(this IConfigurationBuilder co private static IConfigurationBuilder AddSecretsFile(IConfigurationBuilder configuration, string secretPath, bool reloadOnChange) { - var directoryPath = Path.GetDirectoryName(secretPath); - var fileProvider = Directory.Exists(directoryPath) + string directoryPath = Path.GetDirectoryName(secretPath); + PhysicalFileProvider fileProvider = Directory.Exists(directoryPath) ? new PhysicalFileProvider(directoryPath) : null; return configuration.AddJsonFile(fileProvider, PathHelper.SecretsFileName, optional: true, reloadOnChange); diff --git a/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/src/UserSecretsIdAttribute.cs b/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/src/UserSecretsIdAttribute.cs index b24c82a10477..e49752055e47 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/src/UserSecretsIdAttribute.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/src/UserSecretsIdAttribute.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -11,7 +10,7 @@ namespace Microsoft.Extensions.Configuration.UserSecrets /// Represents the user secrets ID. /// /// - /// In most cases, this attribute is automatically generated during compilation by MSBuild targets + /// In most cases, this attribute is automatically generated during compilation by MSBuild targets /// included in the UserSecrets NuGet package. These targets use the MSBuild property 'UserSecretsId' /// to set the value for . /// diff --git a/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/tests/ConfigurationExtensionTest.cs b/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/tests/ConfigurationExtensionTest.cs index 7b7c1407e1b5..6f59604a79e1 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/tests/ConfigurationExtensionTest.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/tests/ConfigurationExtensionTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -52,7 +51,7 @@ private void SetSecret(string id, string key, string value) File.WriteAllText(secretsFilePath, contents.ToString(), Encoding.UTF8); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/34580", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] public void AddUserSecrets_FindsAssemblyAttribute() { @@ -67,7 +66,7 @@ public void AddUserSecrets_FindsAssemblyAttribute() Assert.Equal(randValue, config[configKey]); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/34580", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] public void AddUserSecrets_FindsAssemblyAttributeFromType() { @@ -108,7 +107,7 @@ public void AddUserSecrets_DoesNotThrowsIfOptional() Assert.Empty(config.AsEnumerable()); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/34580", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] public void AddUserSecrets_With_SecretsId_Passed_Explicitly() { diff --git a/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/tests/MsBuildTargetTest.cs b/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/tests/MsBuildTargetTest.cs index ee5aa2ca3502..a7838756ede7 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/tests/MsBuildTargetTest.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/tests/MsBuildTargetTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/tests/PathHelperTest.cs b/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/tests/PathHelperTest.cs index fca90cb412b5..687bd03d0a1f 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/tests/PathHelperTest.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/tests/PathHelperTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Microsoft.Extensions.Configuration.Xml/ref/Microsoft.Extensions.Configuration.Xml.cs b/src/libraries/Microsoft.Extensions.Configuration.Xml/ref/Microsoft.Extensions.Configuration.Xml.cs index 1eb156048a39..8ae007b92108 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Xml/ref/Microsoft.Extensions.Configuration.Xml.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Xml/ref/Microsoft.Extensions.Configuration.Xml.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ------------------------------------------------------------------------------ // Changes to this file must follow the https://aka.ms/api-review process. // ------------------------------------------------------------------------------ diff --git a/src/libraries/Microsoft.Extensions.Configuration.Xml/src/Properties/InternalsVisibleTo.cs b/src/libraries/Microsoft.Extensions.Configuration.Xml/src/Properties/InternalsVisibleTo.cs index 5105250b98c1..0710f58d0e09 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Xml/src/Properties/InternalsVisibleTo.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Xml/src/Properties/InternalsVisibleTo.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("Microsoft.Extensions.Configuration.Xml.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.Extensions.Configuration.Xml.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/src/libraries/Microsoft.Extensions.Configuration.Xml/src/XmlConfigurationExtensions.cs b/src/libraries/Microsoft.Extensions.Configuration.Xml/src/XmlConfigurationExtensions.cs index 15f2afa8cee2..8e6a9096efcf 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Xml/src/XmlConfigurationExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Xml/src/XmlConfigurationExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; @@ -18,7 +17,7 @@ public static class XmlConfigurationExtensions /// Adds the XML configuration provider at to . /// /// The to add to. - /// Path relative to the base path stored in + /// Path relative to the base path stored in /// of . /// The . public static IConfigurationBuilder AddXmlFile(this IConfigurationBuilder builder, string path) @@ -30,7 +29,7 @@ public static IConfigurationBuilder AddXmlFile(this IConfigurationBuilder builde /// Adds the XML configuration provider at to . /// /// The to add to. - /// Path relative to the base path stored in + /// Path relative to the base path stored in /// of . /// Whether the file is optional. /// The . @@ -43,7 +42,7 @@ public static IConfigurationBuilder AddXmlFile(this IConfigurationBuilder builde /// Adds the XML configuration provider at to . /// /// The to add to. - /// Path relative to the base path stored in + /// Path relative to the base path stored in /// of . /// Whether the file is optional. /// Whether the configuration should be reloaded if the file changes. @@ -58,7 +57,7 @@ public static IConfigurationBuilder AddXmlFile(this IConfigurationBuilder builde /// /// The to add to. /// The to use to access the file. - /// Path relative to the base path stored in + /// Path relative to the base path stored in /// of . /// Whether the file is optional. /// Whether the configuration should be reloaded if the file changes. diff --git a/src/libraries/Microsoft.Extensions.Configuration.Xml/src/XmlConfigurationProvider.cs b/src/libraries/Microsoft.Extensions.Configuration.Xml/src/XmlConfigurationProvider.cs index 967348abef45..bbfa7a32651f 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Xml/src/XmlConfigurationProvider.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Xml/src/XmlConfigurationProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; diff --git a/src/libraries/Microsoft.Extensions.Configuration.Xml/src/XmlConfigurationSource.cs b/src/libraries/Microsoft.Extensions.Configuration.Xml/src/XmlConfigurationSource.cs index f9c1428bc937..02b01971e111 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Xml/src/XmlConfigurationSource.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Xml/src/XmlConfigurationSource.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.Configuration.Xml { @@ -20,4 +19,4 @@ public override IConfigurationProvider Build(IConfigurationBuilder builder) return new XmlConfigurationProvider(this); } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Configuration.Xml/src/XmlDocumentDecryptor.cs b/src/libraries/Microsoft.Extensions.Configuration.Xml/src/XmlDocumentDecryptor.cs index f0feb6a721aa..a9292197c58a 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Xml/src/XmlDocumentDecryptor.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Xml/src/XmlDocumentDecryptor.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; @@ -86,7 +85,7 @@ public XmlReader CreateDecryptingXmlReader(Stream input, XmlReaderSettings setti protected virtual XmlReader DecryptDocumentAndCreateXmlReader(XmlDocument document) { // Perform the actual decryption step, updating the XmlDocument in-place. - var encryptedXml = _encryptedXmlFactory(document); + EncryptedXml encryptedXml = _encryptedXmlFactory(document); encryptedXml.DecryptDocument(); // Finally, return the new XmlReader from the updated XmlDocument. diff --git a/src/libraries/Microsoft.Extensions.Configuration.Xml/src/XmlStreamConfigurationProvider.cs b/src/libraries/Microsoft.Extensions.Configuration.Xml/src/XmlStreamConfigurationProvider.cs index 3d718e87768b..bd01128ab681 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Xml/src/XmlStreamConfigurationProvider.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Xml/src/XmlStreamConfigurationProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -24,9 +23,9 @@ public class XmlStreamConfigurationProvider : StreamConfigurationProvider public XmlStreamConfigurationProvider(XmlStreamConfigurationSource source) : base(source) { } /// - /// Read a stream of INI values into a key/value dictionary. + /// Read a stream of XML values into a key/value dictionary. /// - /// The stream of INI data. + /// The stream of XML data. /// The to use to decrypt. /// The which was read from the stream. public static IDictionary Read(Stream stream, XmlDocumentDecryptor decryptor) @@ -41,7 +40,7 @@ public static IDictionary Read(Stream stream, XmlDocumentDecrypt IgnoreWhitespace = true }; - using (var reader = decryptor.CreateDecryptingXmlReader(stream, readerSettings)) + using (XmlReader reader = decryptor.CreateDecryptingXmlReader(stream, readerSettings)) { var prefixStack = new Stack(); @@ -51,7 +50,7 @@ public static IDictionary Read(Stream stream, XmlDocumentDecrypt ProcessAttributes(reader, prefixStack, data, AddNamePrefix); ProcessAttributes(reader, prefixStack, data, AddAttributePair); - var preNodeType = reader.NodeType; + XmlNodeType preNodeType = reader.NodeType; while (reader.Read()) { switch (reader.NodeType) @@ -75,7 +74,7 @@ public static IDictionary Read(Stream stream, XmlDocumentDecrypt // it means there is no text/CDATA node in current element if (preNodeType == XmlNodeType.Element) { - var key = ConfigurationPath.Combine(prefixStack.Reverse()); + string key = ConfigurationPath.Combine(prefixStack.Reverse()); data[key] = string.Empty; } @@ -86,7 +85,7 @@ public static IDictionary Read(Stream stream, XmlDocumentDecrypt case XmlNodeType.CDATA: case XmlNodeType.Text: { - var key = ConfigurationPath.Combine(prefixStack.Reverse()); + string key = ConfigurationPath.Combine(prefixStack.Reverse()); if (data.ContainsKey(key)) { throw new FormatException(SR.Format(SR.Error_KeyIsDuplicated, key, @@ -182,7 +181,7 @@ private static void AddNamePrefix(XmlReader reader, Stack prefixStack, // If current element is not root element if (prefixStack.Any()) { - var lastPrefix = prefixStack.Pop(); + string lastPrefix = prefixStack.Pop(); prefixStack.Push(ConfigurationPath.Combine(lastPrefix, reader.Value)); } else @@ -197,7 +196,7 @@ private static void AddAttributePair(XmlReader reader, Stack prefixStack IDictionary data, XmlWriter writer) { prefixStack.Push(reader.LocalName); - var key = ConfigurationPath.Combine(prefixStack.Reverse()); + string key = ConfigurationPath.Combine(prefixStack.Reverse()); if (data.ContainsKey(key)) { throw new FormatException(SR.Format(SR.Error_KeyIsDuplicated, key, GetLineInfo(reader))); diff --git a/src/libraries/Microsoft.Extensions.Configuration.Xml/src/XmlStreamConfigurationSource.cs b/src/libraries/Microsoft.Extensions.Configuration.Xml/src/XmlStreamConfigurationSource.cs index b937479afcfb..f28672fbd3d9 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Xml/src/XmlStreamConfigurationSource.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Xml/src/XmlStreamConfigurationSource.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.Configuration.Xml { diff --git a/src/libraries/Microsoft.Extensions.Configuration.Xml/tests/ConfigurationProviderXmlTest.cs b/src/libraries/Microsoft.Extensions.Configuration.Xml/tests/ConfigurationProviderXmlTest.cs index 637003967fa1..270a20f858ed 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Xml/tests/ConfigurationProviderXmlTest.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Xml/tests/ConfigurationProviderXmlTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Linq; diff --git a/src/libraries/Microsoft.Extensions.Configuration.Xml/tests/XmlConfigurationExtensionsTest.cs b/src/libraries/Microsoft.Extensions.Configuration.Xml/tests/XmlConfigurationExtensionsTest.cs index 5bc59bf5fb8b..7a896b328117 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Xml/tests/XmlConfigurationExtensionsTest.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Xml/tests/XmlConfigurationExtensionsTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Microsoft.Extensions.Configuration.Xml/tests/XmlConfigurationTest.cs b/src/libraries/Microsoft.Extensions.Configuration.Xml/tests/XmlConfigurationTest.cs index 5e34cdc0ad4d..cfff1fe2dec8 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Xml/tests/XmlConfigurationTest.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Xml/tests/XmlConfigurationTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; @@ -432,7 +431,8 @@ public void XmlConfiguration_Does_Not_Throw_On_Optional_Configuration() var config = new ConfigurationBuilder().AddXmlFile("NotExistingConfig.xml", optional: true).Build(); } - [ConditionalFact] + [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/37669", TestPlatforms.Browser)] [FrameworkSkipCondition(RuntimeFrameworks.Mono)] public void LoadKeyValuePairsFromValidEncryptedXml() { diff --git a/src/libraries/Microsoft.Extensions.Configuration/ref/Microsoft.Extensions.Configuration.cs b/src/libraries/Microsoft.Extensions.Configuration/ref/Microsoft.Extensions.Configuration.cs index b77e4887c8ed..c3cc43f7eff5 100644 --- a/src/libraries/Microsoft.Extensions.Configuration/ref/Microsoft.Extensions.Configuration.cs +++ b/src/libraries/Microsoft.Extensions.Configuration/ref/Microsoft.Extensions.Configuration.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ------------------------------------------------------------------------------ // Changes to this file must follow the https://aka.ms/api-review process. // ------------------------------------------------------------------------------ diff --git a/src/libraries/Microsoft.Extensions.Configuration/src/ChainedBuilderExtensions.cs b/src/libraries/Microsoft.Extensions.Configuration/src/ChainedBuilderExtensions.cs index d51608e87225..77d0a50a93b8 100644 --- a/src/libraries/Microsoft.Extensions.Configuration/src/ChainedBuilderExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Configuration/src/ChainedBuilderExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.Configuration/src/ChainedConfigurationProvider.cs b/src/libraries/Microsoft.Extensions.Configuration/src/ChainedConfigurationProvider.cs index 56802e813c79..44605958a6fa 100644 --- a/src/libraries/Microsoft.Extensions.Configuration/src/ChainedConfigurationProvider.cs +++ b/src/libraries/Microsoft.Extensions.Configuration/src/ChainedConfigurationProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -78,8 +77,8 @@ public IEnumerable GetChildKeys( IEnumerable earlierKeys, string parentPath) { - var section = parentPath == null ? _config : _config.GetSection(parentPath); - var children = section.GetChildren(); + IConfiguration section = parentPath == null ? _config : _config.GetSection(parentPath); + IEnumerable children = section.GetChildren(); var keys = new List(); keys.AddRange(children.Select(c => c.Key)); return keys.Concat(earlierKeys) diff --git a/src/libraries/Microsoft.Extensions.Configuration/src/ChainedConfigurationSource.cs b/src/libraries/Microsoft.Extensions.Configuration/src/ChainedConfigurationSource.cs index 6cde13289783..27391aead76f 100644 --- a/src/libraries/Microsoft.Extensions.Configuration/src/ChainedConfigurationSource.cs +++ b/src/libraries/Microsoft.Extensions.Configuration/src/ChainedConfigurationSource.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.Configuration { diff --git a/src/libraries/Microsoft.Extensions.Configuration/src/ConfigurationBuilder.cs b/src/libraries/Microsoft.Extensions.Configuration/src/ConfigurationBuilder.cs index 1f18b1848608..d0ac712e6a09 100644 --- a/src/libraries/Microsoft.Extensions.Configuration/src/ConfigurationBuilder.cs +++ b/src/libraries/Microsoft.Extensions.Configuration/src/ConfigurationBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -47,9 +46,9 @@ public IConfigurationBuilder Add(IConfigurationSource source) public IConfigurationRoot Build() { var providers = new List(); - foreach (var source in Sources) + foreach (IConfigurationSource source in Sources) { - var provider = source.Build(this); + IConfigurationProvider provider = source.Build(this); providers.Add(provider); } return new ConfigurationRoot(providers); diff --git a/src/libraries/Microsoft.Extensions.Configuration/src/ConfigurationKeyComparer.cs b/src/libraries/Microsoft.Extensions.Configuration/src/ConfigurationKeyComparer.cs index fe71cb13f71d..b0abce12d36c 100644 --- a/src/libraries/Microsoft.Extensions.Configuration/src/ConfigurationKeyComparer.cs +++ b/src/libraries/Microsoft.Extensions.Configuration/src/ConfigurationKeyComparer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -27,8 +26,8 @@ public class ConfigurationKeyComparer : IComparer /// Less than 0 if x is less than y, 0 if x is equal to y and greater than 0 if x is greater than y. public int Compare(string x, string y) { - var xParts = x?.Split(_keyDelimiterArray, StringSplitOptions.RemoveEmptyEntries) ?? Array.Empty(); - var yParts = y?.Split(_keyDelimiterArray, StringSplitOptions.RemoveEmptyEntries) ?? Array.Empty(); + string[] xParts = x?.Split(_keyDelimiterArray, StringSplitOptions.RemoveEmptyEntries) ?? Array.Empty(); + string[] yParts = y?.Split(_keyDelimiterArray, StringSplitOptions.RemoveEmptyEntries) ?? Array.Empty(); // Compare each part until we get two parts that are not equal for (int i = 0; i < Math.Min(xParts.Length, yParts.Length); i++) @@ -36,11 +35,11 @@ public int Compare(string x, string y) x = xParts[i]; y = yParts[i]; - var value1 = 0; - var value2 = 0; + int value1 = 0; + int value2 = 0; - var xIsInt = x != null && int.TryParse(x, out value1); - var yIsInt = y != null && int.TryParse(y, out value2); + bool xIsInt = x != null && int.TryParse(x, out value1); + bool yIsInt = y != null && int.TryParse(y, out value2); int result; diff --git a/src/libraries/Microsoft.Extensions.Configuration/src/ConfigurationProvider.cs b/src/libraries/Microsoft.Extensions.Configuration/src/ConfigurationProvider.cs index ce768ab8e8a3..15927fedce25 100644 --- a/src/libraries/Microsoft.Extensions.Configuration/src/ConfigurationProvider.cs +++ b/src/libraries/Microsoft.Extensions.Configuration/src/ConfigurationProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -63,7 +62,7 @@ public virtual IEnumerable GetChildKeys( IEnumerable earlierKeys, string parentPath) { - var prefix = parentPath == null ? string.Empty : parentPath + ConfigurationPath.KeyDelimiter; + string prefix = parentPath == null ? string.Empty : parentPath + ConfigurationPath.KeyDelimiter; return Data .Where(kv => kv.Key.StartsWith(prefix, StringComparison.OrdinalIgnoreCase)) @@ -74,7 +73,7 @@ public virtual IEnumerable GetChildKeys( private static string Segment(string key, int prefixLength) { - var indexOf = key.IndexOf(ConfigurationPath.KeyDelimiter, prefixLength, StringComparison.OrdinalIgnoreCase); + int indexOf = key.IndexOf(ConfigurationPath.KeyDelimiter, prefixLength, StringComparison.OrdinalIgnoreCase); return indexOf < 0 ? key.Substring(prefixLength) : key.Substring(prefixLength, indexOf - prefixLength); } @@ -92,7 +91,7 @@ public IChangeToken GetReloadToken() /// protected void OnReload() { - var previousToken = Interlocked.Exchange(ref _reloadToken, new ConfigurationReloadToken()); + ConfigurationReloadToken previousToken = Interlocked.Exchange(ref _reloadToken, new ConfigurationReloadToken()); previousToken.OnReload(); } diff --git a/src/libraries/Microsoft.Extensions.Configuration/src/ConfigurationReloadToken.cs b/src/libraries/Microsoft.Extensions.Configuration/src/ConfigurationReloadToken.cs index f0092ba1d234..fad07ebfdacb 100644 --- a/src/libraries/Microsoft.Extensions.Configuration/src/ConfigurationReloadToken.cs +++ b/src/libraries/Microsoft.Extensions.Configuration/src/ConfigurationReloadToken.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Threading; diff --git a/src/libraries/Microsoft.Extensions.Configuration/src/ConfigurationRoot.cs b/src/libraries/Microsoft.Extensions.Configuration/src/ConfigurationRoot.cs index c211a74438b8..bff21d5eb068 100644 --- a/src/libraries/Microsoft.Extensions.Configuration/src/ConfigurationRoot.cs +++ b/src/libraries/Microsoft.Extensions.Configuration/src/ConfigurationRoot.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -32,7 +31,7 @@ public ConfigurationRoot(IList providers) _providers = providers; _changeTokenRegistrations = new List(providers.Count); - foreach (var p in providers) + foreach (IConfigurationProvider p in providers) { p.Load(); _changeTokenRegistrations.Add(ChangeToken.OnChange(() => p.GetReloadToken(), () => RaiseChanged())); @@ -53,11 +52,11 @@ public string this[string key] { get { - for (var i = _providers.Count - 1; i >= 0; i--) + for (int i = _providers.Count - 1; i >= 0; i--) { - var provider = _providers[i]; + IConfigurationProvider provider = _providers[i]; - if (provider.TryGet(key, out var value)) + if (provider.TryGet(key, out string value)) { return value; } @@ -72,7 +71,7 @@ public string this[string key] throw new InvalidOperationException(SR.Error_NoSources); } - foreach (var provider in _providers) + foreach (IConfigurationProvider provider in _providers) { provider.Set(key, value); } @@ -108,7 +107,7 @@ public IConfigurationSection GetSection(string key) /// public void Reload() { - foreach (var provider in _providers) + foreach (IConfigurationProvider provider in _providers) { provider.Load(); } @@ -117,7 +116,7 @@ public void Reload() private void RaiseChanged() { - var previousToken = Interlocked.Exchange(ref _changeToken, new ConfigurationReloadToken()); + ConfigurationReloadToken previousToken = Interlocked.Exchange(ref _changeToken, new ConfigurationReloadToken()); previousToken.OnReload(); } @@ -125,13 +124,13 @@ private void RaiseChanged() public void Dispose() { // dispose change token registrations - foreach (var registration in _changeTokenRegistrations) + foreach (IDisposable registration in _changeTokenRegistrations) { registration.Dispose(); } // dispose providers - foreach (var provider in _providers) + foreach (IConfigurationProvider provider in _providers) { (provider as IDisposable)?.Dispose(); } diff --git a/src/libraries/Microsoft.Extensions.Configuration/src/ConfigurationSection.cs b/src/libraries/Microsoft.Extensions.Configuration/src/ConfigurationSection.cs index 092130e8dba4..da3fbb733a3a 100644 --- a/src/libraries/Microsoft.Extensions.Configuration/src/ConfigurationSection.cs +++ b/src/libraries/Microsoft.Extensions.Configuration/src/ConfigurationSection.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.Configuration/src/InternalConfigurationRootExtensions.cs b/src/libraries/Microsoft.Extensions.Configuration/src/InternalConfigurationRootExtensions.cs index 835dba7d5807..bff5c5271040 100644 --- a/src/libraries/Microsoft.Extensions.Configuration/src/InternalConfigurationRootExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Configuration/src/InternalConfigurationRootExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.Configuration/src/MemoryConfigurationBuilderExtensions.cs b/src/libraries/Microsoft.Extensions.Configuration/src/MemoryConfigurationBuilderExtensions.cs index 787814943c09..996f8a876b9c 100644 --- a/src/libraries/Microsoft.Extensions.Configuration/src/MemoryConfigurationBuilderExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Configuration/src/MemoryConfigurationBuilderExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -48,4 +47,4 @@ public static IConfigurationBuilder AddInMemoryCollection( return configurationBuilder; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Configuration/src/MemoryConfigurationProvider.cs b/src/libraries/Microsoft.Extensions.Configuration/src/MemoryConfigurationProvider.cs index bab094d75f9f..84a0b142e0fb 100644 --- a/src/libraries/Microsoft.Extensions.Configuration/src/MemoryConfigurationProvider.cs +++ b/src/libraries/Microsoft.Extensions.Configuration/src/MemoryConfigurationProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections; @@ -30,7 +29,7 @@ public MemoryConfigurationProvider(MemoryConfigurationSource source) if (_source.InitialData != null) { - foreach (var pair in _source.InitialData) + foreach (KeyValuePair pair in _source.InitialData) { Data.Add(pair.Key, pair.Value); } diff --git a/src/libraries/Microsoft.Extensions.Configuration/src/MemoryConfigurationSource.cs b/src/libraries/Microsoft.Extensions.Configuration/src/MemoryConfigurationSource.cs index 4e83276be31c..e11891595e41 100644 --- a/src/libraries/Microsoft.Extensions.Configuration/src/MemoryConfigurationSource.cs +++ b/src/libraries/Microsoft.Extensions.Configuration/src/MemoryConfigurationSource.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.Configuration/src/Properties/InternalsVisibleTo.cs b/src/libraries/Microsoft.Extensions.Configuration/src/Properties/InternalsVisibleTo.cs index a4aa86573e69..738d9e7475a4 100644 --- a/src/libraries/Microsoft.Extensions.Configuration/src/Properties/InternalsVisibleTo.cs +++ b/src/libraries/Microsoft.Extensions.Configuration/src/Properties/InternalsVisibleTo.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("Microsoft.Extensions.Configuration.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.Extensions.Configuration.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/src/libraries/Microsoft.Extensions.Configuration/src/StreamConfigurationProvider.cs b/src/libraries/Microsoft.Extensions.Configuration/src/StreamConfigurationProvider.cs index 88e60df6c138..38ba04fda17a 100644 --- a/src/libraries/Microsoft.Extensions.Configuration/src/StreamConfigurationProvider.cs +++ b/src/libraries/Microsoft.Extensions.Configuration/src/StreamConfigurationProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Microsoft.Extensions.Configuration/src/StreamConfigurationSource.cs b/src/libraries/Microsoft.Extensions.Configuration/src/StreamConfigurationSource.cs index 969f8892337f..3fdf74144350 100644 --- a/src/libraries/Microsoft.Extensions.Configuration/src/StreamConfigurationSource.cs +++ b/src/libraries/Microsoft.Extensions.Configuration/src/StreamConfigurationSource.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; diff --git a/src/libraries/Microsoft.Extensions.Configuration/tests/Common/ConfigurationProviderExtensions.cs b/src/libraries/Microsoft.Extensions.Configuration/tests/Common/ConfigurationProviderExtensions.cs index 8a99a577ab2c..a06ca86e438f 100644 --- a/src/libraries/Microsoft.Extensions.Configuration/tests/Common/ConfigurationProviderExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Configuration/tests/Common/ConfigurationProviderExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -20,4 +19,4 @@ public static string Get(this IConfigurationProvider provider, string key) return value; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Configuration/tests/Common/TestStreamHelpers.cs b/src/libraries/Microsoft.Extensions.Configuration/tests/Common/TestStreamHelpers.cs index 28eca52826f3..facb079982a8 100644 --- a/src/libraries/Microsoft.Extensions.Configuration/tests/Common/TestStreamHelpers.cs +++ b/src/libraries/Microsoft.Extensions.Configuration/tests/Common/TestStreamHelpers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Microsoft.Extensions.Configuration/tests/ConfigurationPathComparerTest.cs b/src/libraries/Microsoft.Extensions.Configuration/tests/ConfigurationPathComparerTest.cs index 1fbdcd807243..159ba1d4a75c 100644 --- a/src/libraries/Microsoft.Extensions.Configuration/tests/ConfigurationPathComparerTest.cs +++ b/src/libraries/Microsoft.Extensions.Configuration/tests/ConfigurationPathComparerTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Xunit; diff --git a/src/libraries/Microsoft.Extensions.Configuration/tests/ConfigurationPathTest.cs b/src/libraries/Microsoft.Extensions.Configuration/tests/ConfigurationPathTest.cs index 3333be33ffcf..f0c6dc029321 100644 --- a/src/libraries/Microsoft.Extensions.Configuration/tests/ConfigurationPathTest.cs +++ b/src/libraries/Microsoft.Extensions.Configuration/tests/ConfigurationPathTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Xunit; diff --git a/src/libraries/Microsoft.Extensions.Configuration/tests/ConfigurationProviderMemoryTest.cs b/src/libraries/Microsoft.Extensions.Configuration/tests/ConfigurationProviderMemoryTest.cs index c5161534af8f..6f10dda7f03c 100644 --- a/src/libraries/Microsoft.Extensions.Configuration/tests/ConfigurationProviderMemoryTest.cs +++ b/src/libraries/Microsoft.Extensions.Configuration/tests/ConfigurationProviderMemoryTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.Configuration/tests/ConfigurationProviderTestBase.cs b/src/libraries/Microsoft.Extensions.Configuration/tests/ConfigurationProviderTestBase.cs index 8841ab5691cd..c684a89f645b 100644 --- a/src/libraries/Microsoft.Extensions.Configuration/tests/ConfigurationProviderTestBase.cs +++ b/src/libraries/Microsoft.Extensions.Configuration/tests/ConfigurationProviderTestBase.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.Configuration/tests/ConfigurationRootTest.cs b/src/libraries/Microsoft.Extensions.Configuration/tests/ConfigurationRootTest.cs index df626cbad0ac..d61144d0e431 100644 --- a/src/libraries/Microsoft.Extensions.Configuration/tests/ConfigurationRootTest.cs +++ b/src/libraries/Microsoft.Extensions.Configuration/tests/ConfigurationRootTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.Configuration/tests/ConfigurationTest.cs b/src/libraries/Microsoft.Extensions.Configuration/tests/ConfigurationTest.cs index 3e5af7d129f1..45bafb48853c 100644 --- a/src/libraries/Microsoft.Extensions.Configuration/tests/ConfigurationTest.cs +++ b/src/libraries/Microsoft.Extensions.Configuration/tests/ConfigurationTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.Configuration/tests/FunctionalTests/ArrayTests.cs b/src/libraries/Microsoft.Extensions.Configuration/tests/FunctionalTests/ArrayTests.cs index 2a241a7cc070..8836d7a8f65a 100644 --- a/src/libraries/Microsoft.Extensions.Configuration/tests/FunctionalTests/ArrayTests.cs +++ b/src/libraries/Microsoft.Extensions.Configuration/tests/FunctionalTests/ArrayTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; @@ -124,4 +123,4 @@ public void Dispose() File.Delete(_json2ConfigFilePath); } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Configuration/tests/FunctionalTests/ConfigurationTests.cs b/src/libraries/Microsoft.Extensions.Configuration/tests/FunctionalTests/ConfigurationTests.cs index f53975fe2d12..87e2c9e51274 100644 --- a/src/libraries/Microsoft.Extensions.Configuration/tests/FunctionalTests/ConfigurationTests.cs +++ b/src/libraries/Microsoft.Extensions.Configuration/tests/FunctionalTests/ConfigurationTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -207,7 +206,7 @@ public void MissingFileDoesNotIncludesAbsolutePathIfWithNoPhysicalPath() Assert.False(error.Message.Contains(_basePath), error.Message); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/34580", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] public void LoadAndCombineKeyValuePairsFromDifferentConfigurationProviders() { @@ -247,7 +246,7 @@ public void LoadAndCombineKeyValuePairsFromDifferentConfigurationProviders() Assert.Equal("MemValue6", config["CommonKey1:CommonKey2:CommonKey3:CommonKey4"]); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/34580", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] public void LoadAndCombineKeyValuePairsFromDifferentConfigurationProvidersWithAbsolutePath() { @@ -288,7 +287,7 @@ public void LoadAndCombineKeyValuePairsFromDifferentConfigurationProvidersWithAb Assert.Equal("MemValue6", config["CommonKey1:CommonKey2:CommonKey3:CommonKey4"]); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/34580", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] public void CanOverrideValuesWithNewConfigurationProvider() { @@ -418,7 +417,7 @@ public void OnLoadErrorWillBeCalledOnXmlParseError() Assert.NotNull(provider); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/34580", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] public void OnLoadErrorWillBeCalledOnIniLoadError() { @@ -819,7 +818,7 @@ await WaitForChange( Assert.True(createAgainToken.HasChanged); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/34580", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] public void LoadIncorrectJsonFile_ThrowException() { @@ -836,7 +835,7 @@ public void LoadIncorrectJsonFile_ThrowException() Assert.Contains("Could not parse the JSON file.", exception.Message); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/34580", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] public void SetBasePathCalledMultipleTimesForEachSourceLastOneWins() { @@ -902,6 +901,7 @@ public void GetDefaultBasePathForSources() [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/34580", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] + [SkipOnMono("System.IO.FileSystem.Watcher is not supported on wasm", TestPlatforms.Browser)] public void CanEnumerateProviders() { var config = CreateBuilder() diff --git a/src/libraries/Microsoft.Extensions.Configuration/tests/FunctionalTests/DisposableFileSystem.cs b/src/libraries/Microsoft.Extensions.Configuration/tests/FunctionalTests/DisposableFileSystem.cs index 42ccba2c5c30..73f131afb3fa 100644 --- a/src/libraries/Microsoft.Extensions.Configuration/tests/FunctionalTests/DisposableFileSystem.cs +++ b/src/libraries/Microsoft.Extensions.Configuration/tests/FunctionalTests/DisposableFileSystem.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Threading; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/ref/Microsoft.Extensions.DependencyInjection.Abstractions.cs b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/ref/Microsoft.Extensions.DependencyInjection.Abstractions.cs index aac4f5d2c027..fa3699e2218f 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/ref/Microsoft.Extensions.DependencyInjection.Abstractions.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/ref/Microsoft.Extensions.DependencyInjection.Abstractions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ------------------------------------------------------------------------------ // Changes to this file must follow the https://aka.ms/api-review process. // ------------------------------------------------------------------------------ @@ -39,7 +38,7 @@ public partial interface ISupportRequiredService { object GetRequiredService(System.Type serviceType); } - public delegate object ObjectFactory(System.IServiceProvider serviceProvider, object[] arguments); + public delegate object ObjectFactory(System.IServiceProvider serviceProvider, object?[]? arguments); public static partial class ServiceCollectionServiceExtensions { public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddScoped(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Type serviceType) { throw null; } diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/Extensions/ServiceCollectionDescriptorExtensions.cs b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/Extensions/ServiceCollectionDescriptorExtensions.cs index ece382a735a9..ad5be9396bf9 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/Extensions/ServiceCollectionDescriptorExtensions.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/Extensions/ServiceCollectionDescriptorExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -57,7 +56,7 @@ public static IServiceCollection Add( throw new ArgumentNullException(nameof(descriptors)); } - foreach (var descriptor in descriptors) + foreach (ServiceDescriptor? descriptor in descriptors) { collection.Add(descriptor); } @@ -111,7 +110,7 @@ public static void TryAdd( throw new ArgumentNullException(nameof(descriptors)); } - foreach (var d in descriptors) + foreach (ServiceDescriptor? d in descriptors) { collection.TryAdd(d); } @@ -596,7 +595,7 @@ public static void TryAddEnumerable( throw new ArgumentNullException(nameof(descriptor)); } - var implementationType = descriptor.GetImplementationType(); + Type? implementationType = descriptor.GetImplementationType(); if (implementationType == typeof(object) || implementationType == descriptor.ServiceType) @@ -647,7 +646,7 @@ public static void TryAddEnumerable( throw new ArgumentNullException(nameof(descriptors)); } - foreach (var d in descriptors) + foreach (ServiceDescriptor? d in descriptors) { services.TryAddEnumerable(d); } @@ -674,7 +673,7 @@ public static IServiceCollection Replace( throw new ArgumentNullException(nameof(descriptor)); } - var registeredServiceDescriptor = collection.FirstOrDefault(s => s.ServiceType == descriptor.ServiceType); + ServiceDescriptor? registeredServiceDescriptor = collection.FirstOrDefault(s => s.ServiceType == descriptor.ServiceType); if (registeredServiceDescriptor != null) { collection.Remove(registeredServiceDescriptor); @@ -707,9 +706,9 @@ public static IServiceCollection RemoveAll(this IServiceCollection collection, T throw new ArgumentNullException(nameof(serviceType)); } - for (var i = collection.Count - 1; i >= 0; i--) + for (int i = collection.Count - 1; i >= 0; i--) { - var descriptor = collection[i]; + ServiceDescriptor? descriptor = collection[i]; if (descriptor.ServiceType == serviceType) { collection.RemoveAt(i); diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/IServiceCollection.cs b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/IServiceCollection.cs index 30bc873a8b76..cdc6a473dd31 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/IServiceCollection.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/IServiceCollection.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/IServiceProviderFactory.cs b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/IServiceProviderFactory.cs index a8b71bce3db7..35854cc836bf 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/IServiceProviderFactory.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/IServiceProviderFactory.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/IServiceScope.cs b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/IServiceScope.cs index 3065e1cde6d7..e83a33dde923 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/IServiceScope.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/IServiceScope.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/IServiceScopeFactory.cs b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/IServiceScopeFactory.cs index 6e542c0c1147..9d9aede9003e 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/IServiceScopeFactory.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/IServiceScopeFactory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection { diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ISupportRequiredService.cs b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ISupportRequiredService.cs index 2f89aaf3c60e..ea4a03ce9c7d 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ISupportRequiredService.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ISupportRequiredService.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/Properties/InternalsVisibleTo.cs b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/Properties/InternalsVisibleTo.cs index 74de5189a7a8..35077c290a31 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/Properties/InternalsVisibleTo.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/Properties/InternalsVisibleTo.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("Microsoft.Extensions.DependencyInjection.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.Extensions.DependencyInjection.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ServiceCollectionServiceExtensions.cs b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ServiceCollectionServiceExtensions.cs index c04f8d9b542a..23cf01a1272d 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ServiceCollectionServiceExtensions.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ServiceCollectionServiceExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ServiceDescriptor.cs b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ServiceDescriptor.cs index 409aa6da34af..d5fed233c6b5 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ServiceDescriptor.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ServiceDescriptor.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; @@ -93,25 +92,20 @@ private ServiceDescriptor(Type serviceType, ServiceLifetime lifetime) ServiceType = serviceType; } - /// public ServiceLifetime Lifetime { get; } - /// public Type ServiceType { get; } - /// public Type? ImplementationType { get; } - /// public object? ImplementationInstance { get; } - /// public Func? ImplementationFactory { get; } /// public override string ToString() { - var lifetime = $"{nameof(ServiceType)}: {ServiceType} {nameof(Lifetime)}: {Lifetime} "; + string? lifetime = $"{nameof(ServiceType)}: {ServiceType} {nameof(Lifetime)}: {Lifetime} "; if (ImplementationType != null) { @@ -138,7 +132,7 @@ internal Type GetImplementationType() } else if (ImplementationFactory != null) { - var typeArguments = ImplementationFactory.GetType().GenericTypeArguments; + Type[]? typeArguments = ImplementationFactory.GetType().GenericTypeArguments; Debug.Assert(typeArguments.Length == 2); diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ServiceLifetime.cs b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ServiceLifetime.cs index e1357aa73c38..4398f7a5413d 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ServiceLifetime.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ServiceLifetime.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection { @@ -25,4 +24,4 @@ public enum ServiceLifetime /// Transient } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ServiceProviderServiceExtensions.cs b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ServiceProviderServiceExtensions.cs index 830009056e57..e35fc6546142 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ServiceProviderServiceExtensions.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ServiceProviderServiceExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -55,7 +54,7 @@ public static object GetRequiredService(this IServiceProvider provider, Type ser return requiredServiceSupportingProvider.GetRequiredService(serviceType); } - var service = provider.GetService(serviceType); + object? service = provider.GetService(serviceType); if (service == null) { throw new InvalidOperationException(SR.Format(SR.NoServiceRegistered, serviceType)); @@ -115,7 +114,7 @@ public static IEnumerable GetServices(this IServiceProvider provider) throw new ArgumentNullException(nameof(serviceType)); } - var genericEnumerable = typeof(IEnumerable<>).MakeGenericType(serviceType); + Type? genericEnumerable = typeof(IEnumerable<>).MakeGenericType(serviceType); return (IEnumerable)provider.GetRequiredService(genericEnumerable); } diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/Microsoft.Extensions.DependencyInjection.sln b/src/libraries/Microsoft.Extensions.DependencyInjection/Microsoft.Extensions.DependencyInjection.sln index 84191f744afa..b7273ab06c8c 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/Microsoft.Extensions.DependencyInjection.sln +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/Microsoft.Extensions.DependencyInjection.sln @@ -13,9 +13,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Depend EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyInjection", "src\Microsoft.Extensions.DependencyInjection.csproj", "{0BD0C911-A456-40DA-B5B7-D51887777BF9}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyInjection.Tests", "tests\Microsoft.Extensions.DependencyInjection.Tests.csproj", "{85D59394-C2FA-42D0-B04A-B1F8E244E619}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyInjection.Tests", "tests\DI.Tests\Microsoft.Extensions.DependencyInjection.Tests.csproj", "{85D59394-C2FA-42D0-B04A-B1F8E244E619}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{62FF9AD2-6603-4F9C-AB56-FCACEE3B6723}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{62FF9AD2-6603-4F9C-AB56-FCACEE3B6723}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyInjection.ExternalContainers.Tests", "tests\DI.External.Tests\Microsoft.Extensions.DependencyInjection.ExternalContainers.Tests.csproj", "{01D2CC74-63FC-4091-B278-8BD264C325E3}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -39,6 +41,10 @@ Global {62FF9AD2-6603-4F9C-AB56-FCACEE3B6723}.Debug|Any CPU.Build.0 = Debug|Any CPU {62FF9AD2-6603-4F9C-AB56-FCACEE3B6723}.Release|Any CPU.ActiveCfg = Release|Any CPU {62FF9AD2-6603-4F9C-AB56-FCACEE3B6723}.Release|Any CPU.Build.0 = Release|Any CPU + {01D2CC74-63FC-4091-B278-8BD264C325E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {01D2CC74-63FC-4091-B278-8BD264C325E3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {01D2CC74-63FC-4091-B278-8BD264C325E3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {01D2CC74-63FC-4091-B278-8BD264C325E3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -48,6 +54,7 @@ Global {0BD0C911-A456-40DA-B5B7-D51887777BF9} = {BF719C68-E106-47F7-AD0D-F996739BA266} {85D59394-C2FA-42D0-B04A-B1F8E244E619} = {615C17D7-1F66-4409-A982-73C31C517388} {62FF9AD2-6603-4F9C-AB56-FCACEE3B6723} = {615C17D7-1F66-4409-A982-73C31C517388} + {01D2CC74-63FC-4091-B278-8BD264C325E3} = {615C17D7-1F66-4409-A982-73C31C517388} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {91C254CC-F9EE-4916-8A19-F816C708AE3C} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/ref/Microsoft.Extensions.DependencyInjection.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/ref/Microsoft.Extensions.DependencyInjection.cs index 2a13d6968e4d..3b0c8c0af2b3 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/ref/Microsoft.Extensions.DependencyInjection.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/ref/Microsoft.Extensions.DependencyInjection.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ------------------------------------------------------------------------------ // Changes to this file must follow the https://aka.ms/api-review process. // ------------------------------------------------------------------------------ diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/CallSiteJsonFormatter.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/CallSiteJsonFormatter.cs index bd8a17f56163..bf39993860f1 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/CallSiteJsonFormatter.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/CallSiteJsonFormatter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Text; @@ -34,8 +33,8 @@ protected override object VisitConstructor(ConstructorCallSite constructorCallSi { argument.StartProperty("arguments"); - var childContext = argument.StartArray(); - foreach (var parameter in constructorCallSite.ParameterCallSites) + CallSiteFormatterContext childContext = argument.StartArray(); + foreach (ServiceCallSite parameter in constructorCallSite.ParameterCallSites) { childContext.StartArrayItem(); VisitCallSite(parameter, childContext); @@ -50,7 +49,7 @@ protected override object VisitCallSiteMain(ServiceCallSite callSite, CallSiteFo { if (argument.ShouldFormat(callSite)) { - var childContext = argument.StartObject(); + CallSiteFormatterContext childContext = argument.StartObject(); childContext.WriteProperty("serviceType", callSite.ServiceType); childContext.WriteProperty("kind", callSite.Kind); @@ -62,7 +61,7 @@ protected override object VisitCallSiteMain(ServiceCallSite callSite, CallSiteFo } else { - var childContext = argument.StartObject(); + CallSiteFormatterContext childContext = argument.StartObject(); childContext.WriteProperty("ref", callSite.ServiceType); argument.EndObject(); } @@ -96,8 +95,8 @@ protected override object VisitIEnumerable(IEnumerableCallSite enumerableCallSit { argument.StartProperty("items"); - var childContext = argument.StartArray(); - foreach (var item in enumerableCallSite.ServiceCallSites) + CallSiteFormatterContext childContext = argument.StartArray(); + foreach (ServiceCallSite item in enumerableCallSite.ServiceCallSites) { childContext.StartArrayItem(); VisitCallSite(item, childContext); diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/DefaultServiceProviderFactory.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/DefaultServiceProviderFactory.cs index e4d011e4746e..ac35609032f6 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/DefaultServiceProviderFactory.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/DefaultServiceProviderFactory.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/DependencyInjectionEventSource.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/DependencyInjectionEventSource.cs index c62374ab82cf..a017bfdd900a 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/DependencyInjectionEventSource.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/DependencyInjectionEventSource.cs @@ -1,11 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics.Tracing; using System.Linq.Expressions; -using System.Runtime.CompilerServices; using Microsoft.Extensions.DependencyInjection.ServiceLookup; namespace Microsoft.Extensions.DependencyInjection @@ -69,8 +67,8 @@ public void CallSiteBuilt(Type serviceType, ServiceCallSite callSite) { if (IsEnabled(EventLevel.Verbose, EventKeywords.All)) { - var format = CallSiteJsonFormatter.Instance.Format(callSite); - var chunkCount = format.Length / MaxChunkSize + (format.Length % MaxChunkSize > 0 ? 1 : 0); + string format = CallSiteJsonFormatter.Instance.Format(callSite); + int chunkCount = format.Length / MaxChunkSize + (format.Length % MaxChunkSize > 0 ? 1 : 0); for (int i = 0; i < chunkCount; i++) { @@ -82,22 +80,27 @@ public void CallSiteBuilt(Type serviceType, ServiceCallSite callSite) } [NonEvent] - public void ExpressionTreeGenerated(Type serviceType, Expression expression) + public void DynamicMethodBuilt(Type serviceType, int methodSize) { if (IsEnabled(EventLevel.Verbose, EventKeywords.All)) { - var visitor = new NodeCountingVisitor(); - visitor.Visit(expression); - ExpressionTreeGenerated(serviceType.ToString(), visitor.NodeCount); + DynamicMethodBuilt(serviceType.ToString(), methodSize); } } + } - [NonEvent] - public void DynamicMethodBuilt(Type serviceType, int methodSize) + internal static class DependencyInjectionEventSourceExtensions + { + // This is an extension method because this assembly is trimmed at a "type granular" level in Blazor, + // and the whole DependencyInjectionEventSource type can't be trimmed. So extracting this to a separate + // type allows for the System.Linq.Expressions usage to be trimmed by the ILLinker. + public static void ExpressionTreeGenerated(this DependencyInjectionEventSource source, Type serviceType, Expression expression) { - if (IsEnabled(EventLevel.Verbose, EventKeywords.All)) + if (source.IsEnabled(EventLevel.Verbose, EventKeywords.All)) { - DynamicMethodBuilt(serviceType.ToString(), methodSize); + var visitor = new NodeCountingVisitor(); + visitor.Visit(expression); + source.ExpressionTreeGenerated(serviceType.ToString(), visitor.NodeCount); } } diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/Properties/InternalsVisibleTo.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/Properties/InternalsVisibleTo.cs index 1eaafc64ba74..f1926da6fbd7 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/Properties/InternalsVisibleTo.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/Properties/InternalsVisibleTo.cs @@ -1,8 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("Microsoft.Extensions.DependencyInjection.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] -[assembly: InternalsVisibleTo("MicroBenchmarks, PublicKey=00240000048000009400000006020000002400005253413100040000010001004b86c4cb78549b34bab61a3b1800e23bfeb5b3ec390074041536a7e3cbd97f5f04cf0f857155a8928eaa29ebfd11cfbbad3ba70efea7bda3226c6a8d370a4cd303f714486b6ebc225985a638471e6ef571cc92a4613c00b8fa65d61ccee0cbe5f36330c9a01f4183559f1bef24cc2917c6d913e3a541333a1d05d9bed22b38cb")] \ No newline at end of file +[assembly: InternalsVisibleTo("MicroBenchmarks, PublicKey=00240000048000009400000006020000002400005253413100040000010001004b86c4cb78549b34bab61a3b1800e23bfeb5b3ec390074041536a7e3cbd97f5f04cf0f857155a8928eaa29ebfd11cfbbad3ba70efea7bda3226c6a8d370a4cd303f714486b6ebc225985a638471e6ef571cc92a4613c00b8fa65d61ccee0cbe5f36330c9a01f4183559f1bef24cc2917c6d913e3a541333a1d05d9bed22b38cb")] diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceCollection.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceCollection.cs index c2459f53a9fe..63830809a85d 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceCollection.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceCollection.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceCollectionContainerBuilderExtensions.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceCollectionContainerBuilderExtensions.cs index 6d178721ab0b..ed5bab7796a2 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceCollectionContainerBuilderExtensions.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceCollectionContainerBuilderExtensions.cs @@ -1,8 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; +using System.Runtime.CompilerServices; +using Microsoft.Extensions.DependencyInjection.ServiceLookup; namespace Microsoft.Extensions.DependencyInjection { @@ -57,7 +58,23 @@ public static ServiceProvider BuildServiceProvider(this IServiceCollection servi throw new ArgumentNullException(nameof(options)); } - return new ServiceProvider(services, options); + IServiceProviderEngine engine; + +#if !NETCOREAPP + engine = new DynamicServiceProviderEngine(services); +#else + if (RuntimeFeature.IsDynamicCodeCompiled) + { + engine = new DynamicServiceProviderEngine(services); + } + else + { + // Don't try to compile Expressions/IL if they are going to get interpreted + engine = new RuntimeServiceProviderEngine(services); + } +#endif + + return new ServiceProvider(services, engine, options); } } } diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CallSiteChain.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CallSiteChain.cs index e81e90110b25..04ef76557411 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CallSiteChain.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CallSiteChain.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -12,7 +11,7 @@ namespace Microsoft.Extensions.DependencyInjection.ServiceLookup { internal class CallSiteChain { - private readonly Dictionary _callSiteChain; + private readonly Dictionary _callSiteChain; public CallSiteChain() { @@ -50,10 +49,10 @@ private string CreateCircularDependencyExceptionMessage(Type type) private void AppendResolutionPath(StringBuilder builder, Type currentlyResolving = null) { - foreach (var pair in _callSiteChain.OrderBy(p => p.Value.Order)) + foreach (KeyValuePair pair in _callSiteChain.OrderBy(p => p.Value.Order)) { - var serviceType = pair.Key; - var implementationType = pair.Value.ImplementationType; + Type serviceType = pair.Key; + Type implementationType = pair.Value.ImplementationType; if (implementationType == null || serviceType == implementationType) { builder.Append(TypeNameHelper.GetTypeDisplayName(serviceType)); diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CallSiteFactory.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CallSiteFactory.cs index 13f93b99bfba..2bf5ee16fc8e 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CallSiteFactory.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CallSiteFactory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Concurrent; @@ -30,12 +29,12 @@ public CallSiteFactory(IEnumerable descriptors) private void Populate() { - foreach (var descriptor in _descriptors) + foreach (ServiceDescriptor descriptor in _descriptors) { - var serviceTypeInfo = descriptor.ServiceType.GetTypeInfo(); + TypeInfo serviceTypeInfo = descriptor.ServiceType.GetTypeInfo(); if (serviceTypeInfo.IsGenericTypeDefinition) { - var implementationTypeInfo = descriptor.ImplementationType?.GetTypeInfo(); + TypeInfo implementationTypeInfo = descriptor.ImplementationType?.GetTypeInfo(); if (implementationTypeInfo == null || !implementationTypeInfo.IsGenericTypeDefinition) { @@ -53,7 +52,7 @@ private void Populate() else if (descriptor.ImplementationInstance == null && descriptor.ImplementationFactory == null) { Debug.Assert(descriptor.ImplementationType != null); - var implementationTypeInfo = descriptor.ImplementationType.GetTypeInfo(); + TypeInfo implementationTypeInfo = descriptor.ImplementationType.GetTypeInfo(); if (implementationTypeInfo.IsGenericTypeDefinition || implementationTypeInfo.IsAbstract || @@ -64,8 +63,8 @@ private void Populate() } } - var cacheKey = descriptor.ServiceType; - _descriptorLookup.TryGetValue(cacheKey, out var cacheItem); + Type cacheKey = descriptor.ServiceType; + _descriptorLookup.TryGetValue(cacheKey, out ServiceDescriptorCacheItem cacheItem); _descriptorLookup[cacheKey] = cacheItem.Add(descriptor); } } @@ -77,7 +76,7 @@ internal ServiceCallSite GetCallSite(Type serviceType, CallSiteChain callSiteCha internal ServiceCallSite GetCallSite(ServiceDescriptor serviceDescriptor, CallSiteChain callSiteChain) { - if (_descriptorLookup.TryGetValue(serviceDescriptor.ServiceType, out var descriptor)) + if (_descriptorLookup.TryGetValue(serviceDescriptor.ServiceType, out ServiceDescriptorCacheItem descriptor)) { return TryCreateExact(serviceDescriptor, serviceDescriptor.ServiceType, callSiteChain, descriptor.GetSlot(serviceDescriptor)); } @@ -95,7 +94,7 @@ private ServiceCallSite CreateCallSite(Type serviceType, CallSiteChain callSiteC callSiteChain.CheckCircularDependency(serviceType); - var callSite = TryCreateExact(serviceType, callSiteChain) ?? + ServiceCallSite callSite = TryCreateExact(serviceType, callSiteChain) ?? TryCreateOpenGeneric(serviceType, callSiteChain) ?? TryCreateEnumerable(serviceType, callSiteChain); @@ -106,7 +105,7 @@ private ServiceCallSite CreateCallSite(Type serviceType, CallSiteChain callSiteC private ServiceCallSite TryCreateExact(Type serviceType, CallSiteChain callSiteChain) { - if (_descriptorLookup.TryGetValue(serviceType, out var descriptor)) + if (_descriptorLookup.TryGetValue(serviceType, out ServiceDescriptorCacheItem descriptor)) { return TryCreateExact(descriptor.Last, serviceType, callSiteChain, DefaultSlot); } @@ -117,7 +116,7 @@ private ServiceCallSite TryCreateExact(Type serviceType, CallSiteChain callSiteC private ServiceCallSite TryCreateOpenGeneric(Type serviceType, CallSiteChain callSiteChain) { if (serviceType.IsConstructedGenericType - && _descriptorLookup.TryGetValue(serviceType.GetGenericTypeDefinition(), out var descriptor)) + && _descriptorLookup.TryGetValue(serviceType.GetGenericTypeDefinition(), out ServiceDescriptorCacheItem descriptor)) { return TryCreateOpenGeneric(descriptor.Last, serviceType, callSiteChain, DefaultSlot); } @@ -134,23 +133,23 @@ private ServiceCallSite TryCreateEnumerable(Type serviceType, CallSiteChain call if (serviceType.IsConstructedGenericType && serviceType.GetGenericTypeDefinition() == typeof(IEnumerable<>)) { - var itemType = serviceType.GenericTypeArguments[0]; - var cacheLocation = CallSiteResultCacheLocation.Root; + Type itemType = serviceType.GenericTypeArguments[0]; + CallSiteResultCacheLocation cacheLocation = CallSiteResultCacheLocation.Root; var callSites = new List(); // If item type is not generic we can safely use descriptor cache if (!itemType.IsConstructedGenericType && - _descriptorLookup.TryGetValue(itemType, out var descriptors)) + _descriptorLookup.TryGetValue(itemType, out ServiceDescriptorCacheItem descriptors)) { for (int i = 0; i < descriptors.Count; i++) { - var descriptor = descriptors[i]; + ServiceDescriptor descriptor = descriptors[i]; // Last service should get slot 0 - var slot = descriptors.Count - i - 1; + int slot = descriptors.Count - i - 1; // There may not be any open generics here - var callSite = TryCreateExact(descriptor, itemType, callSiteChain, slot); + ServiceCallSite callSite = TryCreateExact(descriptor, itemType, callSiteChain, slot); Debug.Assert(callSite != null); cacheLocation = GetCommonCacheLocation(cacheLocation, callSite.Cache.Location); @@ -159,12 +158,12 @@ private ServiceCallSite TryCreateEnumerable(Type serviceType, CallSiteChain call } else { - var slot = 0; + int slot = 0; // We are going in reverse so the last service in descriptor list gets slot 0 - for (var i = _descriptors.Count - 1; i >= 0; i--) + for (int i = _descriptors.Count - 1; i >= 0; i--) { - var descriptor = _descriptors[i]; - var callSite = TryCreateExact(descriptor, itemType, callSiteChain, slot) ?? + ServiceDescriptor descriptor = _descriptors[i]; + ServiceCallSite callSite = TryCreateExact(descriptor, itemType, callSiteChain, slot) ?? TryCreateOpenGeneric(descriptor, itemType, callSiteChain, slot); if (callSite != null) @@ -180,7 +179,7 @@ private ServiceCallSite TryCreateEnumerable(Type serviceType, CallSiteChain call } - var resultCache = ResultCache.None; + ResultCache resultCache = ResultCache.None; if (cacheLocation == CallSiteResultCacheLocation.Scope || cacheLocation == CallSiteResultCacheLocation.Root) { resultCache = new ResultCache(cacheLocation, new ServiceCacheKey(serviceType, DefaultSlot)); @@ -238,7 +237,7 @@ private ServiceCallSite TryCreateOpenGeneric(ServiceDescriptor descriptor, Type { Debug.Assert(descriptor.ImplementationType != null, "descriptor.ImplementationType != null"); var lifetime = new ResultCache(descriptor.Lifetime, serviceType, slot); - var closedType = descriptor.ImplementationType.MakeGenericType(serviceType.GenericTypeArguments); + Type closedType = descriptor.ImplementationType.MakeGenericType(serviceType.GenericTypeArguments); return CreateConstructorCallSite(lifetime, serviceType, closedType, callSiteChain); } @@ -251,7 +250,7 @@ private ServiceCallSite CreateConstructorCallSite(ResultCache lifetime, Type ser try { callSiteChain.Add(serviceType, implementationType); - var constructors = implementationType.GetTypeInfo() + ConstructorInfo[] constructors = implementationType.GetTypeInfo() .DeclaredConstructors .Where(constructor => constructor.IsPublic) .ToArray(); @@ -264,8 +263,8 @@ private ServiceCallSite CreateConstructorCallSite(ResultCache lifetime, Type ser } else if (constructors.Length == 1) { - var constructor = constructors[0]; - var parameters = constructor.GetParameters(); + ConstructorInfo constructor = constructors[0]; + ParameterInfo[] parameters = constructor.GetParameters(); if (parameters.Length == 0) { return new ConstructorCallSite(lifetime, serviceType, constructor); @@ -286,11 +285,11 @@ private ServiceCallSite CreateConstructorCallSite(ResultCache lifetime, Type ser ConstructorInfo bestConstructor = null; HashSet bestConstructorParameterTypes = null; - for (var i = 0; i < constructors.Length; i++) + for (int i = 0; i < constructors.Length; i++) { - var parameters = constructors[i].GetParameters(); + ParameterInfo[] parameters = constructors[i].GetParameters(); - var currentParameterCallSites = CreateArgumentCallSites( + ServiceCallSite[] currentParameterCallSites = CreateArgumentCallSites( serviceType, implementationType, callSiteChain, @@ -318,7 +317,7 @@ private ServiceCallSite CreateConstructorCallSite(ResultCache lifetime, Type ser if (!bestConstructorParameterTypes.IsSupersetOf(parameters.Select(p => p.ParameterType))) { // Ambiguous match exception - var message = string.Join( + string message = string.Join( Environment.NewLine, SR.Format(SR.AmbiguousConstructorException, implementationType), bestConstructor, @@ -354,12 +353,12 @@ private ServiceCallSite[] CreateArgumentCallSites( bool throwIfCallSiteNotFound) { var parameterCallSites = new ServiceCallSite[parameters.Length]; - for (var index = 0; index < parameters.Length; index++) + for (int index = 0; index < parameters.Length; index++) { - var parameterType = parameters[index].ParameterType; - var callSite = GetCallSite(parameterType, callSiteChain); + Type parameterType = parameters[index].ParameterType; + ServiceCallSite callSite = GetCallSite(parameterType, callSiteChain); - if (callSite == null && ParameterDefaultValue.TryGetDefaultValue(parameters[index], out var defaultValue)) + if (callSite == null && ParameterDefaultValue.TryGetDefaultValue(parameters[index], out object defaultValue)) { callSite = new ConstantCallSite(parameterType, defaultValue); } @@ -449,7 +448,7 @@ public int GetSlot(ServiceDescriptor descriptor) if (_items != null) { - var index = _items.IndexOf(descriptor); + int index = _items.IndexOf(descriptor); if (index != -1) { return index + 1; @@ -461,7 +460,7 @@ public int GetSlot(ServiceDescriptor descriptor) public ServiceDescriptorCacheItem Add(ServiceDescriptor descriptor) { - var newCacheItem = new ServiceDescriptorCacheItem(); + var newCacheItem = default(ServiceDescriptorCacheItem); if (_item == null) { Debug.Assert(_items == null); diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CallSiteKind.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CallSiteKind.cs index 4d0c75e293f8..83ba197ad888 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CallSiteKind.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CallSiteKind.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.ServiceLookup { @@ -26,4 +25,4 @@ internal enum CallSiteKind Singleton } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CallSiteResultCacheLocation.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CallSiteResultCacheLocation.cs index 4eb2ea67d090..c38c70491d09 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CallSiteResultCacheLocation.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CallSiteResultCacheLocation.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.ServiceLookup { @@ -11,4 +10,4 @@ internal enum CallSiteResultCacheLocation Dispose, None } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CallSiteRuntimeResolver.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CallSiteRuntimeResolver.cs index 2bffbbbca63e..67484a6af18d 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CallSiteRuntimeResolver.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CallSiteRuntimeResolver.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Reflection; @@ -34,7 +33,7 @@ protected override object VisitConstructor(ConstructorCallSite constructorCallSi else { parameterValues = new object[constructorCallSite.ParameterCallSites.Length]; - for (var index = 0; index < parameterValues.Length; index++) + for (int index = 0; index < parameterValues.Length; index++) { parameterValues[index] = VisitCallSite(constructorCallSite.ParameterCallSites[index], context); } @@ -65,7 +64,7 @@ protected override object VisitScopeCache(ServiceCallSite singletonCallSite, Run { // Check if we are in the situation where scoped service was promoted to singleton // and we need to lock the root - var requiredScope = context.Scope == context.Scope.Engine.Root ? + RuntimeResolverLock requiredScope = context.Scope == context.Scope.Engine.Root ? RuntimeResolverLock.Root : RuntimeResolverLock.Scope; @@ -75,7 +74,7 @@ protected override object VisitScopeCache(ServiceCallSite singletonCallSite, Run private object VisitCache(ServiceCallSite callSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEngine, RuntimeResolverLock lockType) { bool lockTaken = false; - var resolvedServices = serviceProviderEngine.ResolvedServices; + System.Collections.Generic.Dictionary resolvedServices = serviceProviderEngine.ResolvedServices; // Taking locks only once allows us to fork resolution process // on another thread without causing the deadlock because we @@ -88,7 +87,7 @@ private object VisitCache(ServiceCallSite callSite, RuntimeResolverContext conte try { - if (!resolvedServices.TryGetValue(callSite.Cache.Key, out var resolved)) + if (!resolvedServices.TryGetValue(callSite.Cache.Key, out object resolved)) { resolved = VisitCallSiteMain(callSite, new RuntimeResolverContext { @@ -132,9 +131,9 @@ protected override object VisitIEnumerable(IEnumerableCallSite enumerableCallSit enumerableCallSite.ItemType, enumerableCallSite.ServiceCallSites.Length); - for (var index = 0; index < enumerableCallSite.ServiceCallSites.Length; index++) + for (int index = 0; index < enumerableCallSite.ServiceCallSites.Length; index++) { - var value = VisitCallSite(enumerableCallSite.ServiceCallSites[index], context); + object value = VisitCallSite(enumerableCallSite.ServiceCallSites[index], context); array.SetValue(value, index); } return array; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CallSiteValidator.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CallSiteValidator.cs index 72b94ce4e1a5..243cf1c638c7 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CallSiteValidator.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CallSiteValidator.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Concurrent; @@ -14,7 +13,7 @@ internal class CallSiteValidator: CallSiteVisitor serviceDescriptors, IServiceProviderEngineCallback callback) : base(serviceDescriptors, callback) + public CompiledServiceProviderEngine(IEnumerable serviceDescriptors) + : base(serviceDescriptors) { #if IL_EMIT ResolverBuilder = new ILEmitResolverBuilder(RuntimeResolver, this, Root); @@ -26,7 +26,7 @@ public CompiledServiceProviderEngine(IEnumerable serviceDescr protected override Func RealizeService(ServiceCallSite callSite) { - var realizedService = ResolverBuilder.Build(callSite); + Func realizedService = ResolverBuilder.Build(callSite); RealizedServices[callSite.ServiceType] = realizedService; return realizedService; } diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ConstantCallSite.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ConstantCallSite.cs index b4ff7c075a62..acc1d967f738 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ConstantCallSite.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ConstantCallSite.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ConstructorCallSite.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ConstructorCallSite.cs index 08e6147b5a05..d25bec5bdd8e 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ConstructorCallSite.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ConstructorCallSite.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Reflection; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CreateInstanceCallSite.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CreateInstanceCallSite.cs index 4ed060fbe741..6532a5a7728c 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CreateInstanceCallSite.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CreateInstanceCallSite.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.ExceptionServices; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/DynamicServiceProviderEngine.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/DynamicServiceProviderEngine.cs index 13dd6e8c6c54..d232285fd037 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/DynamicServiceProviderEngine.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/DynamicServiceProviderEngine.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -11,13 +10,14 @@ namespace Microsoft.Extensions.DependencyInjection.ServiceLookup { internal class DynamicServiceProviderEngine : CompiledServiceProviderEngine { - public DynamicServiceProviderEngine(IEnumerable serviceDescriptors, IServiceProviderEngineCallback callback) : base(serviceDescriptors, callback) + public DynamicServiceProviderEngine(IEnumerable serviceDescriptors) + : base(serviceDescriptors) { } protected override Func RealizeService(ServiceCallSite callSite) { - var callCount = 0; + int callCount = 0; return scope => { if (Interlocked.Increment(ref callCount) == 2) @@ -28,4 +28,4 @@ protected override Func RealizeService(Servi }; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/Expressions/ExpressionResolverBuilder.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/Expressions/ExpressionResolverBuilder.cs index df82807fb1a5..c60ff37721cf 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/Expressions/ExpressionResolverBuilder.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/Expressions/ExpressionResolverBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Concurrent; @@ -65,7 +64,7 @@ public Func Build(ServiceCallSite callSite) // Optimize singleton case if (callSite.Cache.Location == CallSiteResultCacheLocation.Root) { - var value = _runtimeResolver.Resolve(callSite, _rootScope); + object value = _runtimeResolver.Resolve(callSite, _rootScope); return scope => value; } @@ -84,7 +83,7 @@ public Func Build(ServiceCallSite callSite) public Func BuildNoCache(ServiceCallSite callSite) { - var expression = BuildExpression(callSite); + Expression> expression = BuildExpression(callSite); DependencyInjectionEventSource.Log.ExpressionTreeGenerated(callSite.ServiceType, expression); return expression.Compile(); } @@ -95,7 +94,7 @@ private Expression> BuildExpression(Ser { return Expression.Lambda>( Expression.Block( - new [] { ResolvedServices }, + new[] { ResolvedServices }, ResolvedServicesVariableAssignment, BuildScopedExpression(callSite)), ScopeParameter); @@ -167,7 +166,7 @@ private Expression TryCaptureDisposable(ServiceCallSite callSite, ParameterExpre protected override Expression VisitConstructor(ConstructorCallSite callSite, object context) { - var parameters = callSite.ConstructorInfo.GetParameters(); + ParameterInfo[] parameters = callSite.ConstructorInfo.GetParameters(); Expression[] parameterExpressions; if (callSite.ParameterCallSites.Length == 0) { @@ -197,7 +196,7 @@ private static Expression Convert(Expression expression, Type type) protected override Expression VisitScopeCache(ServiceCallSite callSite, object context) { - var lambda = Build(callSite); + Func lambda = Build(callSite); return Expression.Invoke(Expression.Constant(lambda), ScopeParameter); } @@ -205,33 +204,33 @@ protected override Expression VisitScopeCache(ServiceCallSite callSite, object c private Expression BuildScopedExpression(ServiceCallSite callSite) { - var keyExpression = Expression.Constant( + ConstantExpression keyExpression = Expression.Constant( callSite.Cache.Key, typeof(ServiceCacheKey)); - var resolvedVariable = Expression.Variable(typeof(object), "resolved"); + ParameterExpression resolvedVariable = Expression.Variable(typeof(object), "resolved"); - var resolvedServices = ResolvedServices; + ParameterExpression resolvedServices = ResolvedServices; - var tryGetValueExpression = Expression.Call( + MethodCallExpression tryGetValueExpression = Expression.Call( resolvedServices, TryGetValueMethodInfo, keyExpression, resolvedVariable); - var captureDisposible = TryCaptureDisposable(callSite, ScopeParameter, VisitCallSiteMain(callSite, null)); + Expression captureDisposible = TryCaptureDisposable(callSite, ScopeParameter, VisitCallSiteMain(callSite, null)); - var assignExpression = Expression.Assign( + BinaryExpression assignExpression = Expression.Assign( resolvedVariable, captureDisposible); - var addValueExpression = Expression.Call( + MethodCallExpression addValueExpression = Expression.Call( resolvedServices, AddMethodInfo, keyExpression, resolvedVariable); - var blockExpression = Expression.Block( + BlockExpression blockExpression = Expression.Block( typeof(object), new[] { @@ -247,13 +246,13 @@ private Expression BuildScopedExpression(ServiceCallSite callSite) // The C# compiler would copy the lock object to guard against mutation. // We don't, since we know the lock object is readonly. - var lockWasTaken = Expression.Variable(typeof(bool), "lockWasTaken"); + ParameterExpression lockWasTaken = Expression.Variable(typeof(bool), "lockWasTaken"); - var monitorEnter = Expression.Call(MonitorEnterMethodInfo, resolvedServices, lockWasTaken); - var monitorExit = Expression.Call(MonitorExitMethodInfo, resolvedServices); + MethodCallExpression monitorEnter = Expression.Call(MonitorEnterMethodInfo, resolvedServices, lockWasTaken); + MethodCallExpression monitorExit = Expression.Call(MonitorExitMethodInfo, resolvedServices); - var tryBody = Expression.Block(monitorEnter, blockExpression); - var finallyBody = Expression.IfThen(lockWasTaken, monitorExit); + BlockExpression tryBody = Expression.Block(monitorEnter, blockExpression); + ConditionalExpression finallyBody = Expression.IfThen(lockWasTaken, monitorExit); return Expression.Block( typeof(object), diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/Expressions/ExpressionsServiceProviderEngine.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/Expressions/ExpressionsServiceProviderEngine.cs index b397e0ce49bf..7a81fa7f59b3 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/Expressions/ExpressionsServiceProviderEngine.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/Expressions/ExpressionsServiceProviderEngine.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -10,16 +9,16 @@ namespace Microsoft.Extensions.DependencyInjection.ServiceLookup internal class ExpressionsServiceProviderEngine : ServiceProviderEngine { private readonly ExpressionResolverBuilder _expressionResolverBuilder; - public ExpressionsServiceProviderEngine(IEnumerable serviceDescriptors, IServiceProviderEngineCallback callback) : base(serviceDescriptors, callback) + public ExpressionsServiceProviderEngine(IEnumerable serviceDescriptors) : base(serviceDescriptors) { _expressionResolverBuilder = new ExpressionResolverBuilder(RuntimeResolver, this, Root); } protected override Func RealizeService(ServiceCallSite callSite) { - var realizedService = _expressionResolverBuilder.Build(callSite); + Func realizedService = _expressionResolverBuilder.Build(callSite); RealizedServices[callSite.ServiceType] = realizedService; return realizedService; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/FactoryCallSite.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/FactoryCallSite.cs index 96b1a63a5008..cd88c4b405f8 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/FactoryCallSite.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/FactoryCallSite.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/IEnumerableCallSite.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/IEnumerableCallSite.cs index 85ccaaba7437..89be68108056 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/IEnumerableCallSite.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/IEnumerableCallSite.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ILEmit/ILEmitCallSiteAnalysisResult.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ILEmit/ILEmitCallSiteAnalysisResult.cs index 492527c06664..0e747ce0289d 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ILEmit/ILEmitCallSiteAnalysisResult.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ILEmit/ILEmitCallSiteAnalysisResult.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.ServiceLookup { @@ -24,4 +23,4 @@ public ILEmitCallSiteAnalysisResult(int size, bool hasScope) public ILEmitCallSiteAnalysisResult Add(in ILEmitCallSiteAnalysisResult other) => new ILEmitCallSiteAnalysisResult(Size + other.Size, HasScope | other.HasScope); } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ILEmit/ILEmitCallSiteAnalyzer.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ILEmit/ILEmitCallSiteAnalyzer.cs index 25e123a61f3f..a793bd80cb5d 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ILEmit/ILEmitCallSiteAnalyzer.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ILEmit/ILEmitCallSiteAnalyzer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.ServiceLookup { @@ -26,7 +25,7 @@ internal sealed class ILEmitCallSiteAnalyzer : CallSiteVisitor VisitCallSite(callSite, null); } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ILEmit/ILEmitResolverBuilder.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ILEmit/ILEmitResolverBuilder.cs index d3b1ecd93471..06288b46704d 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ILEmit/ILEmitResolverBuilder.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ILEmit/ILEmitResolverBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Concurrent; @@ -67,7 +66,7 @@ public Func Build(ServiceCallSite callSite) // Optimize singleton case if (callSite.Cache.Location == CallSiteResultCacheLocation.Root) { - var value = _runtimeResolver.Resolve(callSite, _rootScope); + object value = _runtimeResolver.Resolve(callSite, _rootScope); return scope => value; } @@ -100,9 +99,9 @@ private GeneratedMethod BuildTypeNoCache(ServiceCallSite callSite) owner: GetType(), skipVisibility: true); - var info = ILEmitCallSiteAnalyzer.Instance.CollectGenerationInfo(callSite); - var ilGenerator = dynamicMethod.GetILGenerator(info.Size); - var runtimeContext = GenerateMethodBody(callSite, ilGenerator); + ILEmitCallSiteAnalysisResult info = ILEmitCallSiteAnalyzer.Instance.CollectGenerationInfo(callSite); + ILGenerator ilGenerator = dynamicMethod.GetILGenerator(info.Size); + ILEmitResolverBuilderRuntimeContext runtimeContext = GenerateMethodBody(callSite, ilGenerator); #if SAVE_ASSEMBLIES var assemblyName = "Test" + DateTime.Now.Ticks; @@ -149,7 +148,7 @@ protected override object VisitDisposeCache(ServiceCallSite transientCallSite, I protected override object VisitConstructor(ConstructorCallSite constructorCallSite, ILEmitResolverBuilderContext argument) { // new T([create arguments]) - foreach (var parameterCallSite in constructorCallSite.ParameterCallSites) + foreach (ServiceCallSite parameterCallSite in constructorCallSite.ParameterCallSites) { VisitCallSite(parameterCallSite, argument); } @@ -165,7 +164,7 @@ protected override object VisitRootCache(ServiceCallSite callSite, ILEmitResolve protected override object VisitScopeCache(ServiceCallSite scopedCallSite, ILEmitResolverBuilderContext argument) { - var generatedMethod = BuildType(scopedCallSite); + GeneratedMethod generatedMethod = BuildType(scopedCallSite); // Type builder doesn't support invoking dynamic methods, replace them with delegate.Invoke calls #if SAVE_ASSEMBLIES @@ -316,13 +315,13 @@ private ILEmitResolverBuilderRuntimeContext GenerateMethodBody(ServiceCallSite c if (callSite.Cache.Location == CallSiteResultCacheLocation.Scope) { - var cacheKeyLocal = context.Generator.DeclareLocal(typeof(ServiceCacheKey)); - var resolvedServicesLocal = context.Generator.DeclareLocal(typeof(IDictionary)); - var lockTakenLocal = context.Generator.DeclareLocal(typeof(bool)); - var resultLocal = context.Generator.DeclareLocal(typeof(object)); + LocalBuilder cacheKeyLocal = context.Generator.DeclareLocal(typeof(ServiceCacheKey)); + LocalBuilder resolvedServicesLocal = context.Generator.DeclareLocal(typeof(IDictionary)); + LocalBuilder lockTakenLocal = context.Generator.DeclareLocal(typeof(bool)); + LocalBuilder resultLocal = context.Generator.DeclareLocal(typeof(object)); - var skipCreationLabel = context.Generator.DefineLabel(); - var returnLabel = context.Generator.DefineLabel(); + Label skipCreationLabel = context.Generator.DefineLabel(); + Label returnLabel = context.Generator.DefineLabel(); // Generate cache key AddCacheKey(context, callSite.Cache.Key); diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ILEmit/ILEmitResolverBuilderContext.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ILEmit/ILEmitResolverBuilderContext.cs index 81ba0d1cfbee..def3457fe82b 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ILEmit/ILEmitResolverBuilderContext.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ILEmit/ILEmitResolverBuilderContext.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -14,4 +13,4 @@ internal class ILEmitResolverBuilderContext public List Constants { get; set; } public List> Factories { get; set; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ILEmit/ILEmitServiceProviderEngine.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ILEmit/ILEmitServiceProviderEngine.cs index be36a5be4e44..da854208dfdf 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ILEmit/ILEmitServiceProviderEngine.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ILEmit/ILEmitServiceProviderEngine.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -10,16 +9,16 @@ namespace Microsoft.Extensions.DependencyInjection.ServiceLookup internal class ILEmitServiceProviderEngine : ServiceProviderEngine { private readonly ILEmitResolverBuilder _expressionResolverBuilder; - public ILEmitServiceProviderEngine(IEnumerable serviceDescriptors, IServiceProviderEngineCallback callback) : base(serviceDescriptors, callback) + public ILEmitServiceProviderEngine(IEnumerable serviceDescriptors) : base(serviceDescriptors) { _expressionResolverBuilder = new ILEmitResolverBuilder(RuntimeResolver, this, Root); } protected override Func RealizeService(ServiceCallSite callSite) { - var realizedService = _expressionResolverBuilder.Build(callSite); + Func realizedService = _expressionResolverBuilder.Build(callSite); RealizedServices[callSite.ServiceType] = realizedService; return realizedService; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/IServiceProviderEngine.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/IServiceProviderEngine.cs index 409c1e8d06dc..1400c7990dbf 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/IServiceProviderEngine.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/IServiceProviderEngine.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -9,6 +8,7 @@ namespace Microsoft.Extensions.DependencyInjection.ServiceLookup internal interface IServiceProviderEngine : IServiceProvider, IDisposable, IAsyncDisposable { IServiceScope RootScope { get; } + void InitializeCallback(IServiceProviderEngineCallback callback); void ValidateService(ServiceDescriptor descriptor); } } diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/IServiceProviderEngineCallback.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/IServiceProviderEngineCallback.cs index b20ab6ecbc86..0b0eee170fba 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/IServiceProviderEngineCallback.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/IServiceProviderEngineCallback.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -11,4 +10,4 @@ internal interface IServiceProviderEngineCallback void OnCreate(ServiceCallSite callSite); void OnResolve(Type serviceType, IServiceScope scope); } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ResultCache.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ResultCache.cs index 9aba0b4a2a23..4a87b7be3675 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ResultCache.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ResultCache.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; @@ -43,4 +42,4 @@ public ResultCache(ServiceLifetime lifetime, Type type, int slot) public ServiceCacheKey Key { get; set; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/RuntimeServiceProviderEngine.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/RuntimeServiceProviderEngine.cs index e7ed8d1b9c70..83d762739ca5 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/RuntimeServiceProviderEngine.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/RuntimeServiceProviderEngine.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -9,7 +8,7 @@ namespace Microsoft.Extensions.DependencyInjection.ServiceLookup { internal class RuntimeServiceProviderEngine : ServiceProviderEngine { - public RuntimeServiceProviderEngine(IEnumerable serviceDescriptors, IServiceProviderEngineCallback callback) : base(serviceDescriptors, callback) + public RuntimeServiceProviderEngine(IEnumerable serviceDescriptors) : base(serviceDescriptors) { } @@ -24,4 +23,4 @@ protected override Func RealizeService(Servi }; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ServiceCacheKey.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ServiceCacheKey.cs index cb3d5df2358f..b8b5dde5dba0 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ServiceCacheKey.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ServiceCacheKey.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -47,4 +46,4 @@ public override int GetHashCode() } } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ServiceCallSite.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ServiceCallSite.cs index 154049a2f422..f63f4c438356 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ServiceCallSite.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ServiceCallSite.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ServiceProviderCallSite.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ServiceProviderCallSite.cs index 120447ac1e02..8339c64ecc31 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ServiceProviderCallSite.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ServiceProviderCallSite.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ServiceProviderEngine.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ServiceProviderEngine.cs index 53cc5e31ace6..ca3343928417 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ServiceProviderEngine.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ServiceProviderEngine.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Concurrent; @@ -11,16 +10,15 @@ namespace Microsoft.Extensions.DependencyInjection.ServiceLookup { internal abstract class ServiceProviderEngine : IServiceProviderEngine, IServiceScopeFactory { - private readonly IServiceProviderEngineCallback _callback; + private IServiceProviderEngineCallback _callback; private readonly Func> _createServiceAccessor; private bool _disposed; - protected ServiceProviderEngine(IEnumerable serviceDescriptors, IServiceProviderEngineCallback callback) + protected ServiceProviderEngine(IEnumerable serviceDescriptors) { _createServiceAccessor = CreateServiceAccessor; - _callback = callback; Root = new ServiceProviderEngineScope(this); RuntimeResolver = new CallSiteRuntimeResolver(); CallSiteFactory = new CallSiteFactory(serviceDescriptors); @@ -39,6 +37,11 @@ protected ServiceProviderEngine(IEnumerable serviceDescriptor public IServiceScope RootScope => Root; + void IServiceProviderEngine.InitializeCallback(IServiceProviderEngineCallback callback) + { + _callback = callback; + } + public void ValidateService(ServiceDescriptor descriptor) { if (descriptor.ServiceType.IsGenericType && !descriptor.ServiceType.IsConstructedGenericType) @@ -48,7 +51,7 @@ public void ValidateService(ServiceDescriptor descriptor) try { - var callSite = CallSiteFactory.GetCallSite(descriptor, new CallSiteChain()); + ServiceCallSite callSite = CallSiteFactory.GetCallSite(descriptor, new CallSiteChain()); if (callSite != null) { _callback?.OnCreate(callSite); @@ -83,7 +86,7 @@ internal object GetService(Type serviceType, ServiceProviderEngineScope serviceP ThrowHelper.ThrowObjectDisposedException(); } - var realizedService = RealizedServices.GetOrAdd(serviceType, _createServiceAccessor); + Func realizedService = RealizedServices.GetOrAdd(serviceType, _createServiceAccessor); _callback?.OnResolve(serviceType, serviceProviderEngineScope); DependencyInjectionEventSource.Log.ServiceResolved(serviceType); return realizedService.Invoke(serviceProviderEngineScope); @@ -101,7 +104,7 @@ public IServiceScope CreateScope() private Func CreateServiceAccessor(Type serviceType) { - var callSite = CallSiteFactory.GetCallSite(serviceType, new CallSiteChain()); + ServiceCallSite callSite = CallSiteFactory.GetCallSite(serviceType, new CallSiteChain()); if (callSite != null) { DependencyInjectionEventSource.Log.CallSiteBuilt(serviceType, callSite); diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ServiceProviderEngineScope.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ServiceProviderEngineScope.cs index a60bfbad4bc1..cbfefdba05a8 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ServiceProviderEngineScope.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ServiceProviderEngineScope.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -65,11 +64,11 @@ internal object CaptureDisposable(object service) public void Dispose() { - var toDispose = BeginDispose(); + List toDispose = BeginDispose(); if (toDispose != null) { - for (var i = toDispose.Count - 1; i >= 0; i--) + for (int i = toDispose.Count - 1; i >= 0; i--) { if (toDispose[i] is IDisposable disposable) { @@ -85,18 +84,18 @@ public void Dispose() public ValueTask DisposeAsync() { - var toDispose = BeginDispose(); + List toDispose = BeginDispose(); if (toDispose != null) { try { - for (var i = toDispose.Count - 1; i >= 0; i--) + for (int i = toDispose.Count - 1; i >= 0; i--) { - var disposable = toDispose[i]; + object disposable = toDispose[i]; if (disposable is IAsyncDisposable asyncDisposable) { - var vt = asyncDisposable.DisposeAsync(); + ValueTask vt = asyncDisposable.DisposeAsync(); if (!vt.IsCompletedSuccessfully) { return Await(i, vt, toDispose); @@ -122,14 +121,14 @@ public ValueTask DisposeAsync() static async ValueTask Await(int i, ValueTask vt, List toDispose) { - await vt; + await vt.ConfigureAwait(false); for (; i >= 0; i--) { - var disposable = toDispose[i]; + object disposable = toDispose[i]; if (disposable is IAsyncDisposable asyncDisposable) { - await asyncDisposable.DisposeAsync(); + await asyncDisposable.DisposeAsync().ConfigureAwait(false); } else { @@ -154,7 +153,7 @@ private List BeginDispose() _disposables = null; // Not clearing ResolvedServices here because there might be a compilation running in background - // trying to get a cached singleton service instance and if it won't find + // trying to get a cached singleton service instance and if it won't find // it it will try to create a new one tripping the Debug.Assert in CaptureDisposable // and leaking a Disposable object in Release mode } diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ServiceScopeFactoryCallSite.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ServiceScopeFactoryCallSite.cs index d540ea0aeac9..ffa0bc869213 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ServiceScopeFactoryCallSite.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ServiceScopeFactoryCallSite.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/SingletonCallSite.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/SingletonCallSite.cs index 65980dbe6a67..3134c23c5d13 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/SingletonCallSite.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/SingletonCallSite.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.ServiceLookup { -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/StackGuard.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/StackGuard.cs index 55820ed07171..b87c77e0d36d 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/StackGuard.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/StackGuard.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.CompilerServices; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ThrowHelper.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ThrowHelper.cs index 36e16a218875..2f9edafbaa04 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ThrowHelper.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ThrowHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Runtime.CompilerServices; @@ -15,4 +14,4 @@ internal static void ThrowObjectDisposedException() throw new ObjectDisposedException(nameof(IServiceProvider)); } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceProvider.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceProvider.cs index 2fbd8740280e..39f19a503753 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceProvider.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceProvider.cs @@ -1,10 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; -using System.Runtime.CompilerServices; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection.ServiceLookup; @@ -19,54 +17,20 @@ public sealed class ServiceProvider : IServiceProvider, IDisposable, IServicePro private readonly CallSiteValidator _callSiteValidator; - internal ServiceProvider(IEnumerable serviceDescriptors, ServiceProviderOptions options) + internal ServiceProvider(IEnumerable serviceDescriptors, IServiceProviderEngine engine, ServiceProviderOptions options) { - IServiceProviderEngineCallback callback = null; + _engine = engine; + if (options.ValidateScopes) { - callback = this; + _engine.InitializeCallback(this); _callSiteValidator = new CallSiteValidator(); } - switch (options.Mode) - { - case ServiceProviderMode.Default: -#if !NETCOREAPP - _engine = new DynamicServiceProviderEngine(serviceDescriptors, callback); -#else - if (RuntimeFeature.IsSupported("IsDynamicCodeCompiled")) - { - _engine = new DynamicServiceProviderEngine(serviceDescriptors, callback); - } - else - { - // Don't try to compile Expressions/IL if they are going to get interpreted - _engine = new RuntimeServiceProviderEngine(serviceDescriptors, callback); - } -#endif - break; - case ServiceProviderMode.Dynamic: - _engine = new DynamicServiceProviderEngine(serviceDescriptors, callback); - break; - case ServiceProviderMode.Runtime: - _engine = new RuntimeServiceProviderEngine(serviceDescriptors, callback); - break; -#if IL_EMIT - case ServiceProviderMode.ILEmit: - _engine = new ILEmitServiceProviderEngine(serviceDescriptors, callback); - break; -#endif - case ServiceProviderMode.Expressions: - _engine = new ExpressionsServiceProviderEngine(serviceDescriptors, callback); - break; - default: - throw new NotSupportedException(nameof(options.Mode)); - } - if (options.ValidateOnBuild) { List exceptions = null; - foreach (var serviceDescriptor in serviceDescriptors) + foreach (ServiceDescriptor serviceDescriptor in serviceDescriptors) { try { diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceProviderMode.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceProviderMode.cs deleted file mode 100644 index cc8a9eff2329..000000000000 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceProviderMode.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace Microsoft.Extensions.DependencyInjection -{ - internal enum ServiceProviderMode - { - Default, - Dynamic, - Runtime, - Expressions, - ILEmit - } -} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceProviderOptions.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceProviderOptions.cs index 02633520a227..4cb165bf9c41 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceProviderOptions.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceProviderOptions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -24,7 +23,5 @@ public class ServiceProviderOptions /// NOTE: this check doesn't verify open generics services. /// public bool ValidateOnBuild { get; set; } - - internal ServiceProviderMode Mode { get; set; } = ServiceProviderMode.Default; } } diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/Autofac.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/Autofac.cs index 68fc0f2eaef3..15295982782f 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/Autofac.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/Autofac.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Autofac; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/DryIoc.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/DryIoc.cs index ca6238278cc9..3de5ef16d0b5 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/DryIoc.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/DryIoc.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using DryIoc; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/Grace.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/Grace.cs index 5cfe355fabef..165997400bc4 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/Grace.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/Grace.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Grace.DependencyInjection; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/Lamar.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/Lamar.cs index 7e591e1e0971..fecf0e4d8403 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/Lamar.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/Lamar.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/LightInject.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/LightInject.cs index 65ab5a605d90..d586884b3bb3 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/LightInject.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/LightInject.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Autofac; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/Microsoft.Extensions.DependencyInjection.ExternalContainers.Tests.csproj b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/Microsoft.Extensions.DependencyInjection.ExternalContainers.Tests.csproj index 9aaa52f4e27c..bf641d02f32f 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/Microsoft.Extensions.DependencyInjection.ExternalContainers.Tests.csproj +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/Microsoft.Extensions.DependencyInjection.ExternalContainers.Tests.csproj @@ -1,4 +1,4 @@ - + $(NetCoreAppCurrent);$(NetFrameworkCurrent) diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/SkippableDependencyInjectionSpecificationTests.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/SkippableDependencyInjectionSpecificationTests.cs index 321493bfb16d..d0d019107120 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/SkippableDependencyInjectionSpecificationTests.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/SkippableDependencyInjectionSpecificationTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/StashBox.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/StashBox.cs index b9f469a528e5..28a27f028af5 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/StashBox.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/StashBox.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/StructureMap.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/StructureMap.cs index 66803d35c869..74e13fd0a818 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/StructureMap.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/StructureMap.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using StructureMap; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/Unity.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/Unity.cs index eb101bc20961..ab41baf4510c 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/Unity.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/Unity.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/ActivatorUtilitiesTests.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/ActivatorUtilitiesTests.cs index df19b86bfe9c..8ef93a5179ba 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/ActivatorUtilitiesTests.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/ActivatorUtilitiesTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/DependencyInjectionSpecificationTests.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/DependencyInjectionSpecificationTests.cs index a8f9bba56bfb..e50d9ca8b649 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/DependencyInjectionSpecificationTests.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/DependencyInjectionSpecificationTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/AnotherClass.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/AnotherClass.cs index 40a92237bfbe..c4deeb576d42 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/AnotherClass.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/AnotherClass.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Specification.Fakes { diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/AnotherClassAcceptingData.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/AnotherClassAcceptingData.cs index 4f9dcda0ae30..0a6771b77e56 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/AnotherClassAcceptingData.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/AnotherClassAcceptingData.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Specification.Fakes { @@ -19,4 +18,4 @@ public AnotherClassAcceptingData(IFakeService fakeService, string one, string tw public string Two { get; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithAmbiguousCtors.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithAmbiguousCtors.cs index 55ec934be20b..c2223b763881 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithAmbiguousCtors.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithAmbiguousCtors.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Specification.Fakes { @@ -37,4 +36,4 @@ public ClassWithAmbiguousCtors(IFakeService service, string data1, int data2) public int Data2 { get; } public string CtorUsed { get; set; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithAmbiguousCtorsAndAttribute.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithAmbiguousCtorsAndAttribute.cs index b0e7d2284cde..57d10a688c28 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithAmbiguousCtorsAndAttribute.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithAmbiguousCtorsAndAttribute.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Specification.Fakes { @@ -24,4 +23,4 @@ public ClassWithAmbiguousCtorsAndAttribute(IFakeService service, IFakeOuterServi public string CtorUsed { get; set; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithInternalConstructor.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithInternalConstructor.cs index 220d3e86d39b..56313b6ffc7c 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithInternalConstructor.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithInternalConstructor.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection { diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithMultipleMarkedCtors.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithMultipleMarkedCtors.cs index 9cb04aafd63a..a97a88aca184 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithMultipleMarkedCtors.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithMultipleMarkedCtors.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Specification.Fakes { @@ -16,4 +15,4 @@ public ClassWithMultipleMarkedCtors(IFakeService service, string data) { } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithNestedReferencesToProvider.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithNestedReferencesToProvider.cs index 1813db134fa9..d7d74a1e629f 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithNestedReferencesToProvider.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithNestedReferencesToProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -32,4 +31,4 @@ public void Dispose() (_serviceProvider as IDisposable)?.Dispose(); } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithOptionalArgsCtor.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithOptionalArgsCtor.cs index 810804bafccc..bc9e220ae0db 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithOptionalArgsCtor.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithOptionalArgsCtor.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Specification { diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithOptionalArgsCtorWithStructs.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithOptionalArgsCtorWithStructs.cs index d0b2588211e4..7e9e4dcede70 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithOptionalArgsCtorWithStructs.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithOptionalArgsCtorWithStructs.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithPrivateCtor.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithPrivateCtor.cs index f0ef2a678c73..bd743aa58d74 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithPrivateCtor.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithPrivateCtor.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Specification.Fakes { @@ -10,4 +9,4 @@ private ClassWithPrivateCtor() { } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithProtectedConstructor.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithProtectedConstructor.cs index d3098dcd09b6..0dba6d7761c0 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithProtectedConstructor.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithProtectedConstructor.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Specification.Fakes { diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithServiceProvider.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithServiceProvider.cs index 1003e9976580..222b0ca130c3 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithServiceProvider.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithServiceProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithStaticCtor.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithStaticCtor.cs index ebd631b17e9d..85fa63f6dda7 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithStaticCtor.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithStaticCtor.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Specification.Fakes { diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithThrowingCtor.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithThrowingCtor.cs index 575d18117113..ce6f1d965c46 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithThrowingCtor.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithThrowingCtor.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -13,4 +12,4 @@ public ClassWithThrowingCtor(IFakeService service) throw new Exception(nameof(ClassWithThrowingCtor)); } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithThrowingEmptyCtor.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithThrowingEmptyCtor.cs index 9ecc4b233244..414382409dfb 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithThrowingEmptyCtor.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ClassWithThrowingEmptyCtor.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -13,4 +12,4 @@ public ClassWithThrowingEmptyCtor() throw new Exception(nameof(ClassWithThrowingEmptyCtor)); } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/CreationCountFakeService.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/CreationCountFakeService.cs index 8c9a21912b05..8a85c7d87008 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/CreationCountFakeService.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/CreationCountFakeService.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Specification.Fakes { @@ -18,4 +17,4 @@ public CreationCountFakeService(IFakeService dependency) public int InstanceId { get; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeDisposableCallbackInnerService.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeDisposableCallbackInnerService.cs index 2acc22045915..152028f95764 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeDisposableCallbackInnerService.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeDisposableCallbackInnerService.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Specification.Fakes { @@ -10,4 +9,4 @@ public FakeDisposableCallbackInnerService(FakeDisposeCallback callback) : base(c { } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeDisposableCallbackOuterService.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeDisposableCallbackOuterService.cs index 7ef95a854b05..bc00b305a06f 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeDisposableCallbackOuterService.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeDisposableCallbackOuterService.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Linq; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeDisposableCallbackService.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeDisposableCallbackService.cs index 5f29aa01ed1c..19b17661e8dc 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeDisposableCallbackService.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeDisposableCallbackService.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -28,4 +27,4 @@ public override string ToString() return _id.ToString(); } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeDisposeCallback.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeDisposeCallback.cs index 8d0ca9f446f6..d6955fbaf457 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeDisposeCallback.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeDisposeCallback.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; @@ -10,4 +9,4 @@ public class FakeDisposeCallback { public List Disposed { get; } = new List(); } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeOneMultipleService.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeOneMultipleService.cs index a5d3cd1451c2..7e2718cdeeed 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeOneMultipleService.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeOneMultipleService.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Specification.Fakes { diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeOpenGenericService.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeOpenGenericService.cs index c2be6bc4c1b4..a6fe03d5c758 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeOpenGenericService.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeOpenGenericService.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Specification.Fakes { diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeOuterService.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeOuterService.cs index 667f911557e8..624fd4222dcb 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeOuterService.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeOuterService.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; @@ -20,4 +19,4 @@ public FakeOuterService( public IEnumerable MultipleServices { get; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeService.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeService.cs index 3fccf3de00b3..135edf6f9de9 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeService.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeService.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeTwoMultipleService.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeTwoMultipleService.cs index 89fcab701084..30f6d8bfe58d 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeTwoMultipleService.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/FakeTwoMultipleService.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Specification.Fakes { diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFactoryService.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFactoryService.cs index ddbc44f20fb7..fc65eefd0ee4 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFactoryService.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFactoryService.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Specification.Fakes { @@ -10,4 +9,4 @@ public interface IFactoryService int Value { get; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFakeEveryService.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFakeEveryService.cs index 9e24521a65ab..b422c070d1a5 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFakeEveryService.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFakeEveryService.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Specification.Fakes { diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFakeMultipleService.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFakeMultipleService.cs index a38394c665f8..4bdecb89f1d9 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFakeMultipleService.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFakeMultipleService.cs @@ -1,10 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Specification.Fakes { public interface IFakeMultipleService : IFakeService { } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFakeOpenGenericService.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFakeOpenGenericService.cs index 12dc71425573..71870357fd9d 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFakeOpenGenericService.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFakeOpenGenericService.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Specification.Fakes { diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFakeOuterService.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFakeOuterService.cs index f4bd3e3a2dae..f1c3dc7a7ffa 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFakeOuterService.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFakeOuterService.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; @@ -12,4 +11,4 @@ public interface IFakeOuterService IEnumerable MultipleServices { get; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFakeScopedService.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFakeScopedService.cs index 9f3f4f000df1..52f32bbdb2a9 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFakeScopedService.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFakeScopedService.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Specification.Fakes { diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFakeService.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFakeService.cs index 391bf2edf3d4..f60d89ed22fd 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFakeService.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFakeService.cs @@ -1,10 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Specification.Fakes { public interface IFakeService { } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFakeServiceInstance.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFakeServiceInstance.cs index e6ed4019e37b..8563331e64fe 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFakeServiceInstance.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFakeServiceInstance.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Specification.Fakes { diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFakeSingletonService.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFakeSingletonService.cs index 3f341ce204de..74e6f0b8c348 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFakeSingletonService.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/IFakeSingletonService.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Specification.Fakes { diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/INonexistentService.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/INonexistentService.cs index 54661e3cd970..6b1fc2cf2f54 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/INonexistentService.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/INonexistentService.cs @@ -1,10 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Specification.Fakes { public interface INonexistentService { } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/PocoClass.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/PocoClass.cs index 75bd28ae9f74..dfc46bcc1896 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/PocoClass.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/PocoClass.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Specification.Fakes { diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ScopedFactoryService.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ScopedFactoryService.cs index 298ad076c1ad..1decf4aa71ae 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ScopedFactoryService.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ScopedFactoryService.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Specification.Fakes { @@ -8,4 +7,4 @@ public class ScopedFactoryService { public IFakeService FakeService { get; set; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ServiceAcceptingFactoryService.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ServiceAcceptingFactoryService.cs index c016eaeeca7c..eba638d62cb7 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ServiceAcceptingFactoryService.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/ServiceAcceptingFactoryService.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Specification.Fakes { @@ -18,4 +17,4 @@ public ServiceAcceptingFactoryService( public IFactoryService TransientService { get; private set; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/TransientFactoryService.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/TransientFactoryService.cs index 1915f3fda0a3..5ed4d680dfd6 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/TransientFactoryService.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/TransientFactoryService.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Specification.Fakes { @@ -10,4 +9,4 @@ public class TransientFactoryService : IFactoryService public int Value { get; set; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/TypeWithSupersetConstructors.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/TypeWithSupersetConstructors.cs index c37888370154..5efdbed59756 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/TypeWithSupersetConstructors.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Fakes/TypeWithSupersetConstructors.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Specification.Fakes { diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/ServiceCollection.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/ServiceCollection.cs index b4501e76319e..4f7e6e1f2c27 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/ServiceCollection.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/ServiceCollection.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/CallSiteTests.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/CallSiteTests.cs index edab657c4c4a..3dc3cec6c647 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/CallSiteTests.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/CallSiteTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections; @@ -82,7 +81,7 @@ public static IEnumerable TestServiceDescriptors(ServiceLifetime lifet public void BuiltExpressionWillReturnResolvedServiceWhenAppropriate( ServiceDescriptor[] descriptors, Type serviceType, Func compare) { - var provider = new DynamicServiceProviderEngine(descriptors, null); + var provider = new DynamicServiceProviderEngine(descriptors); var callSite = provider.CallSiteFactory.GetCallSite(serviceType, new CallSiteChain()); var collectionCallSite = provider.CallSiteFactory.GetCallSite(typeof(IEnumerable<>).MakeGenericType(serviceType), new CallSiteChain()); @@ -111,7 +110,7 @@ public void BuiltExpressionCanResolveNestedScopedService() descriptors.AddScoped(); descriptors.AddScoped(); - var provider = new DynamicServiceProviderEngine(descriptors, null); + var provider = new DynamicServiceProviderEngine(descriptors); var callSite = provider.CallSiteFactory.GetCallSite(typeof(ServiceC), new CallSiteChain()); var compiledCallSite = CompileCallSite(callSite, provider); @@ -133,7 +132,7 @@ public void BuildExpressionAddsDisposableCaptureForDisposableServices(ServiceLif descriptors.Add(ServiceDescriptor.Describe(typeof(ServiceC), typeof(DisposableServiceC), lifetime)); var disposables = new List(); - var provider = new DynamicServiceProviderEngine(descriptors, null); + var provider = new DynamicServiceProviderEngine(descriptors); provider.Root._captureDisposableCallback = obj => { disposables.Add(obj); @@ -159,7 +158,7 @@ public void BuildExpressionAddsDisposableCaptureForDisposableFactoryServices(Ser typeof(ServiceC), p => new DisposableServiceC(p.GetService()), lifetime)); var disposables = new List(); - var provider = new DynamicServiceProviderEngine(descriptors, null); + var provider = new DynamicServiceProviderEngine(descriptors); provider.Root._captureDisposableCallback = obj => { disposables.Add(obj); @@ -188,7 +187,7 @@ public void BuildExpressionElidesDisposableCaptureForNonDisposableServices(Servi descriptors.AddTransient(); var disposables = new List(); - var provider = new DynamicServiceProviderEngine(descriptors, null); + var provider = new DynamicServiceProviderEngine(descriptors); provider.Root._captureDisposableCallback = obj => { disposables.Add(obj); @@ -213,7 +212,7 @@ public void BuildExpressionElidesDisposableCaptureForEnumerableServices(ServiceL descriptors.Add(ServiceDescriptor.Describe(typeof(ServiceD), typeof(ServiceD), lifetime)); var disposables = new List(); - var provider = new DynamicServiceProviderEngine(descriptors, null); + var provider = new DynamicServiceProviderEngine(descriptors); provider.Root._captureDisposableCallback = obj => { disposables.Add(obj); @@ -234,7 +233,7 @@ public void BuiltExpressionRethrowsOriginalExceptionFromConstructor() descriptors.AddTransient(); descriptors.AddTransient(); - var provider = new DynamicServiceProviderEngine(descriptors, null); + var provider = new DynamicServiceProviderEngine(descriptors); var callSite1 = provider.CallSiteFactory.GetCallSite(typeof(ClassWithThrowingEmptyCtor), new CallSiteChain()); var compiledCallSite1 = CompileCallSite(callSite1, provider); @@ -257,7 +256,7 @@ public void DoesNotThrowWhenServiceIsUsedAsEnumerableAndNotInOneCallSite() descriptors.AddTransient(); descriptors.AddTransient(); - var provider = new DynamicServiceProviderEngine(descriptors, null); + var provider = new DynamicServiceProviderEngine(descriptors); var callSite1 = provider.CallSiteFactory.GetCallSite(typeof(ServiceE), new CallSiteChain()); var compileCallSite = CompileCallSite(callSite1, provider); diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/CircularDependencyTests.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/CircularDependencyTests.cs index 22beb3664f6b..4a13b98da733 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/CircularDependencyTests.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/CircularDependencyTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -206,4 +205,4 @@ public void DependencyOnCircularDependency() Assert.Equal(expectedMessage, exception.Message); } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/DependencyInjectionEventSourceTests.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/DependencyInjectionEventSourceTests.cs index ddbde7bc46d9..4813d5943e52 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/DependencyInjectionEventSourceTests.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/DependencyInjectionEventSourceTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Concurrent; @@ -11,7 +10,7 @@ using Newtonsoft.Json.Linq; using Xunit; -namespace Microsoft.Extensions.DependencyInjection +namespace Microsoft.Extensions.DependencyInjection.Tests { [CollectionDefinition(nameof(EventSourceTests), DisableParallelization = true)] public class EventSourceTests : ICollectionFixture @@ -181,7 +180,7 @@ public void EmitsExpressionTreeBuiltEvent() var serviceCollection = new ServiceCollection(); serviceCollection.AddTransient(); - var serviceProvider = serviceCollection.BuildServiceProvider(new ServiceProviderOptions { Mode = ServiceProviderMode.Expressions }); + var serviceProvider = serviceCollection.BuildServiceProvider(ServiceProviderMode.Expressions); serviceProvider.GetService(); @@ -200,7 +199,7 @@ public void EmitsDynamicMethodBuiltEvent() var serviceCollection = new ServiceCollection(); serviceCollection.AddTransient(); - var serviceProvider = serviceCollection.BuildServiceProvider(new ServiceProviderOptions { Mode = ServiceProviderMode.ILEmit }); + var serviceProvider = serviceCollection.BuildServiceProvider(ServiceProviderMode.ILEmit); serviceProvider.GetService(); diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/AbstractClass.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/AbstractClass.cs index 40c45ab9e1be..b2d1cff2734b 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/AbstractClass.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/AbstractClass.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Tests.Fakes { diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/DependencyOnCircularDependency.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/DependencyOnCircularDependency.cs index 282073a2bd84..60775d61ebee 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/DependencyOnCircularDependency.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/DependencyOnCircularDependency.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Tests.Fakes { @@ -11,4 +10,4 @@ public DependencyOnCircularDependency(DirectCircularDependencyA a) } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/DirectCircularDependencyA.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/DirectCircularDependencyA.cs index e1b7000f58a5..d306077a022f 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/DirectCircularDependencyA.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/DirectCircularDependencyA.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Tests.Fakes { @@ -11,4 +10,4 @@ public DirectCircularDependencyA(DirectCircularDependencyB b) } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/DirectCircularDependencyB.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/DirectCircularDependencyB.cs index d1e7ed300697..60bfb01da7db 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/DirectCircularDependencyB.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/DirectCircularDependencyB.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Tests.Fakes { @@ -11,4 +10,4 @@ public DirectCircularDependencyB(DirectCircularDependencyA a) } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/ISelfCircularDependencyWithInterface.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/ISelfCircularDependencyWithInterface.cs index ed39e1521254..44213e895fbe 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/ISelfCircularDependencyWithInterface.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/ISelfCircularDependencyWithInterface.cs @@ -1,10 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Tests.Fakes { public interface ISelfCircularDependencyWithInterface { } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/IndirectCircularDependencyA.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/IndirectCircularDependencyA.cs index f75410c5e761..c7e5c22c878d 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/IndirectCircularDependencyA.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/IndirectCircularDependencyA.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Tests.Fakes { @@ -11,4 +10,4 @@ public IndirectCircularDependencyA(IndirectCircularDependencyB b) } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/IndirectCircularDependencyB.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/IndirectCircularDependencyB.cs index 09d9636e830a..1119e4d95927 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/IndirectCircularDependencyB.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/IndirectCircularDependencyB.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Tests.Fakes { @@ -11,4 +10,4 @@ public IndirectCircularDependencyB(IndirectCircularDependencyC c) } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/IndirectCircularDependencyC.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/IndirectCircularDependencyC.cs index ef9469a32ec0..a0575a28fb67 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/IndirectCircularDependencyC.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/IndirectCircularDependencyC.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Tests.Fakes { @@ -11,4 +10,4 @@ public IndirectCircularDependencyC(IndirectCircularDependencyA a) } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/NoCircularDependencySameTypeMultipleTimesA.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/NoCircularDependencySameTypeMultipleTimesA.cs index 50360c062b0b..ba007f03e5e6 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/NoCircularDependencySameTypeMultipleTimesA.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/NoCircularDependencySameTypeMultipleTimesA.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Tests.Fakes { @@ -19,4 +18,4 @@ public NoCircularDependencySameTypeMultipleTimesA( } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/NoCircularDependencySameTypeMultipleTimesB.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/NoCircularDependencySameTypeMultipleTimesB.cs index a6753a590734..9026638614d4 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/NoCircularDependencySameTypeMultipleTimesB.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/NoCircularDependencySameTypeMultipleTimesB.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Tests.Fakes { @@ -11,4 +10,4 @@ public NoCircularDependencySameTypeMultipleTimesB(NoCircularDependencySameTypeMu } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/NoCircularDependencySameTypeMultipleTimesC.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/NoCircularDependencySameTypeMultipleTimesC.cs index a3e65e3cbc20..ae4067c16715 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/NoCircularDependencySameTypeMultipleTimesC.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/NoCircularDependencySameTypeMultipleTimesC.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Tests.Fakes { @@ -11,4 +10,4 @@ public NoCircularDependencySameTypeMultipleTimesC() } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/SelfCircularDependency.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/SelfCircularDependency.cs index 6ef7c1981d0a..a17d45460379 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/SelfCircularDependency.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/SelfCircularDependency.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Tests.Fakes { @@ -11,4 +10,4 @@ public SelfCircularDependency(SelfCircularDependency self) } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/SelfCircularDependencyGeneric.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/SelfCircularDependencyGeneric.cs index 9dd53ebdf079..a137536fa9a5 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/SelfCircularDependencyGeneric.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/SelfCircularDependencyGeneric.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Tests.Fakes { @@ -16,4 +15,4 @@ public SelfCircularDependencyGeneric() } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/SelfCircularDependencyWithInterface.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/SelfCircularDependencyWithInterface.cs index 90e738ff6329..af87dccd4f87 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/SelfCircularDependencyWithInterface.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/CircularReferences/SelfCircularDependencyWithInterface.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Tests.Fakes { @@ -11,4 +10,4 @@ public SelfCircularDependencyWithInterface(ISelfCircularDependencyWithInterface } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/ClassDependsOnPrivateConstructorClass.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/ClassDependsOnPrivateConstructorClass.cs index af3552d8a5ed..5f6ed362dc56 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/ClassDependsOnPrivateConstructorClass.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/ClassDependsOnPrivateConstructorClass.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.DependencyInjection.Specification.Fakes; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/ClassWithNestedReferencesToProvider.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/ClassWithNestedReferencesToProvider.cs index 543b92a8f42d..c017324a0479 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/ClassWithNestedReferencesToProvider.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/ClassWithNestedReferencesToProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -32,4 +31,4 @@ public void Dispose() (_serviceProvider as IDisposable)?.Dispose(); } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/ClassWithOptionalArgsCtorWithStructs.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/ClassWithOptionalArgsCtorWithStructs.cs index 1952c5e7ec28..68bbc17cdb9b 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/ClassWithOptionalArgsCtorWithStructs.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/ClassWithOptionalArgsCtorWithStructs.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.DependencyInjection.Specification.Fakes; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/DependOnNonexistentService.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/DependOnNonexistentService.cs index c5df21e47934..e5fa4470551b 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/DependOnNonexistentService.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/DependOnNonexistentService.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.DependencyInjection.Specification.Fakes; @@ -12,4 +11,4 @@ public DependOnNonexistentService(IFakeService nonExistentService) { } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/StructFakeMultipleService.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/StructFakeMultipleService.cs index 5361da98fc6c..85b56135c5df 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/StructFakeMultipleService.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/StructFakeMultipleService.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.DependencyInjection.Specification.Fakes; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/StructFakeService.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/StructFakeService.cs index 75fd3ef8c58b..c40ee954790f 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/StructFakeService.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/StructFakeService.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.DependencyInjection.Specification.Fakes; @@ -13,4 +12,4 @@ public StructFakeService(IServiceProvider serviceProvider) { } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/StructService.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/StructService.cs index f7b5d8d32c75..d4fdc5ce3dde 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/StructService.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Fakes/StructService.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Fakes { @@ -10,4 +9,4 @@ public StructService(IServiceScopeFactory scopeFactory) { } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceCollectionContainerBuilderTestExtensions.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceCollectionContainerBuilderTestExtensions.cs new file mode 100644 index 000000000000..ec90be1378e5 --- /dev/null +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceCollectionContainerBuilderTestExtensions.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; +using Microsoft.Extensions.DependencyInjection.ServiceLookup; + +namespace Microsoft.Extensions.DependencyInjection.Tests +{ + internal static class ServiceCollectionContainerBuilderTestExtensions + { + public static ServiceProvider BuildServiceProvider(this IServiceCollection services, ServiceProviderMode mode) + { + if (mode == ServiceProviderMode.Default) + { + return services.BuildServiceProvider(); + } + + IServiceProviderEngine engine = mode switch + { + ServiceProviderMode.Dynamic => new DynamicServiceProviderEngine(services), + ServiceProviderMode.Runtime => new RuntimeServiceProviderEngine(services), + ServiceProviderMode.Expressions => new ExpressionsServiceProviderEngine(services), + ServiceProviderMode.ILEmit => new ILEmitServiceProviderEngine(services), + _ => throw new NotSupportedException() + }; + + return new ServiceProvider(services, engine, ServiceProviderOptions.Default); + } + } +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceCollectionDescriptorExtensionsTests.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceCollectionDescriptorExtensionsTests.cs index 2583786b8967..9a3588bf6a19 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceCollectionDescriptorExtensionsTests.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceCollectionDescriptorExtensionsTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.DependencyInjection.Extensions; @@ -114,4 +113,4 @@ public override string ToString() } } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceCollectionServiceExtensionsTest.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceCollectionServiceExtensionsTest.cs index 8c7f3570f59c..2ceeab1ac0b5 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceCollectionServiceExtensionsTest.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceCollectionServiceExtensionsTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. extern alias DIAbstractions; using System; @@ -423,4 +422,4 @@ public void RemoveAll_RemovesAllServicesWithMatchingServiceType() Assert.Equal(new[] { descriptor }, collection); } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/CallSiteFactoryTest.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/CallSiteFactoryTest.cs index edb64427689c..bc0988f06d64 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/CallSiteFactoryTest.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/CallSiteFactoryTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithDefaultConstructorParameters.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithDefaultConstructorParameters.cs index 7640a6e6e9c1..ed3d7df22b4e 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithDefaultConstructorParameters.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithDefaultConstructorParameters.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.DependencyInjection.Specification.Fakes; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithEnumerableConstructors.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithEnumerableConstructors.cs index ea32cfd2dcf5..952734475cb8 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithEnumerableConstructors.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithEnumerableConstructors.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using Microsoft.Extensions.DependencyInjection.Specification.Fakes; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithGenericServices.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithGenericServices.cs index f47da3b58375..1fd53e755345 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithGenericServices.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithGenericServices.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.DependencyInjection.Specification.Fakes; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithMultipleParameterizedConstructors.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithMultipleParameterizedConstructors.cs index 4649708a6375..96575086a233 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithMultipleParameterizedConstructors.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithMultipleParameterizedConstructors.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.DependencyInjection.Specification.Fakes; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithNoConstructors.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithNoConstructors.cs index db731b6c5caa..742b6bec2e01 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithNoConstructors.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithNoConstructors.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.ServiceLookup { diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithNoPublicConstructors.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithNoPublicConstructors.cs index d0635fc851f6..5e6a75c323e2 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithNoPublicConstructors.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithNoPublicConstructors.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.ServiceLookup { diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithNonOverlappedConstructors.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithNonOverlappedConstructors.cs index db66b13fbaf0..0b21ce03460c 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithNonOverlappedConstructors.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithNonOverlappedConstructors.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.DependencyInjection.Specification.Fakes; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithParameterizedAndNullaryConstructor.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithParameterizedAndNullaryConstructor.cs index c69850c76d1b..90f11b579e4b 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithParameterizedAndNullaryConstructor.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithParameterizedAndNullaryConstructor.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.DependencyInjection.Specification.Fakes; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithParameterizedConstructor.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithParameterizedConstructor.cs index 556d7e31dfb8..c0a4d43c2880 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithParameterizedConstructor.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithParameterizedConstructor.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.DependencyInjection.Specification.Fakes; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithParameterlessConstructor.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithParameterlessConstructor.cs index 0082f13eb51d..fb3a46b267cb 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithParameterlessConstructor.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithParameterlessConstructor.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.ServiceLookup { diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithParameterlessPublicConstructor.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithParameterlessPublicConstructor.cs index 00bedd1132e7..71a2b6404252 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithParameterlessPublicConstructor.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithParameterlessPublicConstructor.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.ServiceLookup { diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithUnresolvableEnumerableConstructors.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithUnresolvableEnumerableConstructors.cs index 9ee5cea211fe..69703c38b023 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithUnresolvableEnumerableConstructors.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceLookup/Types/TypeWithUnresolvableEnumerableConstructors.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using Microsoft.Extensions.DependencyInjection.Specification.Fakes; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderCompilationTest.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderCompilationTest.cs index 69c597848e0c..5c6853e1b1c1 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderCompilationTest.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderCompilationTest.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Threading; @@ -24,7 +23,7 @@ private async Task CompilesInLimitedStackSpace(ServiceProviderMode mode, Type se var stackSize = 256 * 1024; var serviceCollection = new ServiceCollection(); CompilationTestDataProvider.Register(serviceCollection); - var serviceProvider = serviceCollection.BuildServiceProvider(new ServiceProviderOptions { Mode = mode }); + var serviceProvider = serviceCollection.BuildServiceProvider(mode); // Act + Assert diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderCompilationTestData.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderCompilationTestData.cs index 6fcbef5e75b2..0f74f3757ed0 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderCompilationTestData.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderCompilationTestData.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection.Tests { diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderContainerTests.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderContainerTests.cs index 31c33ede0270..c1ecbcebc4e0 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderContainerTests.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderContainerTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderDefaultContainerTests.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderDefaultContainerTests.cs index 538f17f1ec55..ea40b2b2d231 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderDefaultContainerTests.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderDefaultContainerTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -9,6 +8,6 @@ namespace Microsoft.Extensions.DependencyInjection.Tests public class ServiceProviderDefaultContainerTests : ServiceProviderContainerTests { protected override IServiceProvider CreateServiceProvider(IServiceCollection collection) => - collection.BuildServiceProvider(new ServiceProviderOptions { Mode = ServiceProviderMode.Default }); + collection.BuildServiceProvider(ServiceProviderMode.Default); } } diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderDynamicContainerTests.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderDynamicContainerTests.cs index 30a35c04be1c..76c7bce5cc2a 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderDynamicContainerTests.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderDynamicContainerTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -11,4 +10,4 @@ public class ServiceProviderDynamicContainerTests : ServiceProviderContainerTest protected override IServiceProvider CreateServiceProvider(IServiceCollection collection) => collection.BuildServiceProvider(); } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderEngineScopeTests.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderEngineScopeTests.cs index f379bd79f440..a4fe5b6b5afd 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderEngineScopeTests.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderEngineScopeTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.DependencyInjection.Specification.Fakes; using Xunit; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderExpressionsContainerTests.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderExpressionsContainerTests.cs index ad6889042307..e2a3c7f0b3e1 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderExpressionsContainerTests.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderExpressionsContainerTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -9,6 +8,6 @@ namespace Microsoft.Extensions.DependencyInjection.Tests public class ServiceProviderExpressionsContainerTests : ServiceProviderContainerTests { protected override IServiceProvider CreateServiceProvider(IServiceCollection collection) => - collection.BuildServiceProvider(new ServiceProviderOptions { Mode = ServiceProviderMode.Expressions }); + collection.BuildServiceProvider(ServiceProviderMode.Expressions); } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderILEmitContainerTests.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderILEmitContainerTests.cs index 93ecdfd45d5e..816431406852 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderILEmitContainerTests.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderILEmitContainerTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -9,6 +8,6 @@ namespace Microsoft.Extensions.DependencyInjection.Tests public class ServiceProviderILEmitContainerTests : ServiceProviderContainerTests { protected override IServiceProvider CreateServiceProvider(IServiceCollection collection) => - collection.BuildServiceProvider(new ServiceProviderOptions() { Mode = ServiceProviderMode.ILEmit}); + collection.BuildServiceProvider(ServiceProviderMode.ILEmit); } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderMode.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderMode.cs new file mode 100644 index 000000000000..4817b3140a82 --- /dev/null +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderMode.cs @@ -0,0 +1,14 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +namespace Microsoft.Extensions.DependencyInjection.Tests +{ + internal enum ServiceProviderMode + { + Default, + Dynamic, + Runtime, + Expressions, + ILEmit + } +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderServiceExtensionsTest.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderServiceExtensionsTest.cs index f3ad1000a238..015350ecad2f 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderServiceExtensionsTest.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderServiceExtensionsTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderValidationTests.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderValidationTests.cs index 9856b7a958ca..c26e8d65fbfc 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderValidationTests.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderValidationTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.DependencyInjection.Specification.Fakes; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceTableTest.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceTableTest.cs index 4412c239b771..198308d4254d 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceTableTest.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceTableTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Utils/MultiServiceHelpers.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Utils/MultiServiceHelpers.cs index ab44b14269be..2a7b22ba10d4 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Utils/MultiServiceHelpers.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Utils/MultiServiceHelpers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections; diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/ref/Microsoft.Extensions.DependencyModel.cs b/src/libraries/Microsoft.Extensions.DependencyModel/ref/Microsoft.Extensions.DependencyModel.cs index e11309ff537a..93477fdf17ec 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/ref/Microsoft.Extensions.DependencyModel.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/ref/Microsoft.Extensions.DependencyModel.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ------------------------------------------------------------------------------ // Changes to this file must follow the https://aka.ms/api-review process. // ------------------------------------------------------------------------------ diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/ApplicationEnvironment.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/ApplicationEnvironment.cs index cc518a11a612..c803d9ff99dc 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/ApplicationEnvironment.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/ApplicationEnvironment.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/ArrayBufferWriter.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/ArrayBufferWriter.cs index 9b7fab4c89d0..66229de0a1e5 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/ArrayBufferWriter.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/ArrayBufferWriter.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Buffers; diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/CollectionExtensions.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/CollectionExtensions.cs index 38b961a78ca4..a3ad8264a754 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/CollectionExtensions.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/CollectionExtensions.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.DependencyModel; using System.Linq; @@ -12,7 +11,7 @@ public static class CollectionExtensions public static RuntimeAssetGroup GetDefaultGroup(this IEnumerable self) => GetGroup(self, string.Empty); public static RuntimeAssetGroup GetRuntimeGroup(this IEnumerable self, string runtime) { - if(string.IsNullOrEmpty(runtime)) + if (string.IsNullOrEmpty(runtime)) { throw new ArgumentNullException(nameof(runtime)); } @@ -27,7 +26,7 @@ private static RuntimeAssetGroup GetGroup(IEnumerable groups, public static IEnumerable GetDefaultAssets(this IEnumerable self) => GetAssets(self, string.Empty); public static IEnumerable GetRuntimeAssets(this IEnumerable self, string runtime) { - if(string.IsNullOrEmpty(runtime)) + if (string.IsNullOrEmpty(runtime)) { throw new ArgumentNullException(nameof(runtime)); } diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/CompilationLibrary.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/CompilationLibrary.cs index 0bd49fb97130..a735fce99152 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/CompilationLibrary.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/CompilationLibrary.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -62,7 +61,7 @@ public IEnumerable ResolveReferencePaths(params ICompilationAssemblyReso if (customResolvers?.Length > 0) { - foreach (var resolver in customResolvers) + foreach (ICompilationAssemblyResolver resolver in customResolvers) { if (resolver.TryResolveAssemblyPaths(this, assemblies)) { diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/CompilationOptions.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/CompilationOptions.cs index 5d0b3236e9c0..8c2b2af5b5f7 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/CompilationOptions.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/CompilationOptions.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/Dependency.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/Dependency.cs index 6c26416a9359..e7e70c944df9 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/Dependency.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/Dependency.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Numerics.Hashing; diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContext.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContext.cs index 979dc8ad03be..18f6af8cacaf 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContext.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContext.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextExtensions.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextExtensions.cs index c87702a74317..762a3ea17390 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextExtensions.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextExtensions.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -164,7 +163,7 @@ public static IEnumerable GetRuntimeAssemblyNames(this RuntimeLibr private static AssemblyName GetAssemblyName(string assetPath) { - var name = Path.GetFileNameWithoutExtension(assetPath); + string name = Path.GetFileNameWithoutExtension(assetPath); if (name == null) { throw new ArgumentException($"Provided path has empty file name '{assetPath}'", nameof(assetPath)); @@ -179,12 +178,12 @@ private static AssemblyName GetAssemblyName(string assetPath) } private static IEnumerable ResolveAssets( - DependencyContext context, - string runtimeIdentifier, + DependencyContext context, + string runtimeIdentifier, IEnumerable assets) { - var fallbacks = context.RuntimeGraph.FirstOrDefault(f => f.Runtime == runtimeIdentifier); - var rids = Enumerable.Concat(new[] { runtimeIdentifier }, fallbacks?.Fallbacks ?? Enumerable.Empty()); + RuntimeFallbacks fallbacks = context.RuntimeGraph.FirstOrDefault(f => f.Runtime == runtimeIdentifier); + IEnumerable rids = Enumerable.Concat(new[] { runtimeIdentifier }, fallbacks?.Fallbacks ?? Enumerable.Empty()); return SelectAssets(rids, assets); } @@ -193,16 +192,16 @@ private static IEnumerable ResolveRuntimeFiles( string runtimeIdentifier, IEnumerable assets) { - var fallbacks = context.RuntimeGraph.FirstOrDefault(f => f.Runtime == runtimeIdentifier); - var rids = Enumerable.Concat(new[] { runtimeIdentifier }, fallbacks?.Fallbacks ?? Enumerable.Empty()); + RuntimeFallbacks fallbacks = context.RuntimeGraph.FirstOrDefault(f => f.Runtime == runtimeIdentifier); + IEnumerable rids = Enumerable.Concat(new[] { runtimeIdentifier }, fallbacks?.Fallbacks ?? Enumerable.Empty()); return SelectRuntimeFiles(rids, assets); } private static IEnumerable SelectAssets(IEnumerable rids, IEnumerable groups) { - foreach (var rid in rids) + foreach (string rid in rids) { - var group = groups.FirstOrDefault(g => g.Runtime == rid); + RuntimeAssetGroup group = groups.FirstOrDefault(g => g.Runtime == rid); if (group != null) { return group.AssetPaths; @@ -215,9 +214,9 @@ private static IEnumerable SelectAssets(IEnumerable rids, IEnume private static IEnumerable SelectRuntimeFiles(IEnumerable rids, IEnumerable groups) { - foreach (var rid in rids) + foreach (string rid in rids) { - var group = groups.FirstOrDefault(g => g.Runtime == rid); + RuntimeAssetGroup group = groups.FirstOrDefault(g => g.Runtime == rid); if (group != null) { return group.RuntimeFiles; diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextJsonReader.Utf8JsonReader.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextJsonReader.Utf8JsonReader.cs index eb016c09d3cc..554e4e9bdfdf 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextJsonReader.Utf8JsonReader.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextJsonReader.Utf8JsonReader.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Buffers; diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextJsonReader.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextJsonReader.cs index 1c1dc4b517da..da6cbedab385 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextJsonReader.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextJsonReader.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextLoader.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextLoader.cs index cf6abd4ab383..fc94a2cac6ae 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextLoader.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextLoader.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -59,7 +58,7 @@ public DependencyContext Load(Assembly assembly) } DependencyContext context = null; - using (var reader = _jsonReaderFactory()) + using (IDependencyContextReader reader = _jsonReaderFactory()) { if (IsEntryAssembly(assembly)) { @@ -73,9 +72,9 @@ public DependencyContext Load(Assembly assembly) if (context != null) { - foreach (var extraPath in _nonEntryPointDepsPaths) + foreach (string extraPath in _nonEntryPointDepsPaths) { - var extraContext = LoadContext(reader, extraPath); + DependencyContext extraContext = LoadContext(reader, extraPath); if (extraContext != null) { context = context.Merge(extraContext); @@ -96,7 +95,7 @@ private DependencyContext LoadContext(IDependencyContextReader reader, string lo if (!string.IsNullOrEmpty(location)) { Debug.Assert(_fileSystem.File.Exists(location)); - using (var stream = _fileSystem.File.OpenRead(location)) + using (Stream stream = _fileSystem.File.OpenRead(location)) { return reader.Read(stream); } @@ -106,7 +105,7 @@ private DependencyContext LoadContext(IDependencyContextReader reader, string lo private DependencyContext LoadAssemblyContext(Assembly assembly, IDependencyContextReader reader) { - using (var stream = GetResourceStream(assembly, assembly.GetName().Name + DepsJsonExtension)) + using (Stream stream = GetResourceStream(assembly, assembly.GetName().Name + DepsJsonExtension)) { if (stream != null) { @@ -114,10 +113,10 @@ private DependencyContext LoadAssemblyContext(Assembly assembly, IDependencyCont } } - var depsJsonFile = GetDepsJsonPath(assembly); + string depsJsonFile = GetDepsJsonPath(assembly); if (!string.IsNullOrEmpty(depsJsonFile)) { - using (var stream = _fileSystem.File.OpenRead(depsJsonFile)) + using (Stream stream = _fileSystem.File.OpenRead(depsJsonFile)) { return reader.Read(stream); } @@ -133,7 +132,7 @@ private string GetDepsJsonPath(Assembly assembly) if (!depsJsonFileExists) { - // in some cases (like .NET Framework shadow copy) the Assembly Location + // in some cases (like .NET Framework shadow copy) the Assembly Location // and CodeBase will be different, so also try the CodeBase string assemblyCodeBase = GetNormalizedCodeBasePath(assembly); if (!string.IsNullOrEmpty(assemblyCodeBase) && diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextPaths.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextPaths.cs index 70f9b16d0d66..0f77f3f4b7b3 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextPaths.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextPaths.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -10,8 +9,8 @@ namespace Microsoft.Extensions.DependencyModel { internal class DependencyContextPaths { - private static readonly string DepsFilesProperty = "APP_CONTEXT_DEPS_FILES"; - private static readonly string FxDepsFileProperty = "FX_DEPS_FILE"; + private const string DepsFilesProperty = "APP_CONTEXT_DEPS_FILES"; + private const string FxDepsFileProperty = "FX_DEPS_FILE"; public static DependencyContextPaths Current { get; } = GetCurrent(); @@ -33,18 +32,18 @@ public DependencyContextPaths( private static DependencyContextPaths GetCurrent() { - var deps = AppDomain.CurrentDomain.GetData(DepsFilesProperty); - var fxDeps = AppDomain.CurrentDomain.GetData(FxDepsFileProperty); + object deps = AppDomain.CurrentDomain.GetData(DepsFilesProperty); + object fxDeps = AppDomain.CurrentDomain.GetData(FxDepsFileProperty); return Create(deps as string, fxDeps as string); } internal static DependencyContextPaths Create(string depsFiles, string sharedRuntime) { - var files = depsFiles?.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries); - var application = files != null && files.Length > 0 ? files[0] : null; + string[] files = depsFiles?.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries); + string application = files != null && files.Length > 0 ? files[0] : null; - var nonApplicationPaths = files? + string[] nonApplicationPaths = files? .Skip(1) // the application path .ToArray(); diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextStrings.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextStrings.cs index c07d3d8769b3..a97bbcd38bc6 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextStrings.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextStrings.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyModel { @@ -88,4 +87,4 @@ internal class DependencyContextStrings internal const string FileVersionPropertyName = "fileVersion"; } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextWriter.Utf8JsonWriter.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextWriter.Utf8JsonWriter.cs index 86088a3e5c0d..6ffa81b92587 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextWriter.Utf8JsonWriter.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextWriter.Utf8JsonWriter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; @@ -25,7 +24,7 @@ public void Write(DependencyContext context, Stream stream) { // Custom encoder is required to fix https://github.com/dotnet/core-setup/issues/7137 // Since the JSON is only written to a file that is read by the SDK (and not transmitted over the wire), - // it is safe to skip escaping certain characters in this scenario + // it is safe to skip escaping certain characters in this scenario // (that would otherwise be escaped, by default, as part of defense-in-depth, such as +). var options = new JsonWriterOptions { Indented = true, Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping }; var jsonWriter = new Utf8JsonWriter(bufferWriter, options); diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextWriter.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextWriter.cs index cd65e67880af..5d62d3dbcd98 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextWriter.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextWriter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -308,7 +307,7 @@ private bool AddRuntimeSpecificAssetGroups(string assetType, IEnumerable(TValue value, IEqualityComparer comparer) { - var hashCode = value != null ? comparer.GetHashCode(value) : 0; + int hashCode = value != null ? comparer.GetHashCode(value) : 0; Add(hashCode); } diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/IDependencyContextReader.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/IDependencyContextReader.cs index e9c643030931..63bfbae3bd43 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/IDependencyContextReader.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/IDependencyContextReader.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/IDirectory.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/IDirectory.cs index 05c12d719de2..0bbb0db224a0 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/IDirectory.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/IDirectory.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyModel { @@ -8,4 +7,4 @@ internal interface IDirectory { bool Exists(string path); } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/IEnvironment.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/IEnvironment.cs index 2dc54ed69596..e35568fb8cf0 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/IEnvironment.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/IEnvironment.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyModel { diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/IFile.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/IFile.cs index 08ff24b4bfc6..a909ba427471 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/IFile.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/IFile.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; @@ -24,4 +23,4 @@ Stream OpenFile( void CreateEmptyFile(string path); } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/IFileSystem.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/IFileSystem.cs index 26d195cf96be..ec6721b8f459 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/IFileSystem.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/IFileSystem.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyModel { diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/Library.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/Library.cs index eb64ac5fc95d..722e28abe99e 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/Library.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/Library.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Linq; diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/AppBaseCompilationAssemblyResolver.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/AppBaseCompilationAssemblyResolver.cs index 41358bd214e7..198584542a94 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/AppBaseCompilationAssemblyResolver.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/AppBaseCompilationAssemblyResolver.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -39,11 +38,11 @@ internal AppBaseCompilationAssemblyResolver(IFileSystem fileSystem, string baseP public bool TryResolveAssemblyPaths(CompilationLibrary library, List assemblies) { - var isProject = string.Equals(library.Type, "project", StringComparison.OrdinalIgnoreCase) || + bool isProject = string.Equals(library.Type, "project", StringComparison.OrdinalIgnoreCase) || string.Equals(library.Type, "msbuildproject", StringComparison.OrdinalIgnoreCase); - var isPackage = string.Equals(library.Type, "package", StringComparison.OrdinalIgnoreCase); - var isReferenceAssembly = string.Equals(library.Type, "referenceassembly", StringComparison.OrdinalIgnoreCase); + bool isPackage = string.Equals(library.Type, "package", StringComparison.OrdinalIgnoreCase); + bool isReferenceAssembly = string.Equals(library.Type, "referenceassembly", StringComparison.OrdinalIgnoreCase); if (!isProject && !isPackage && !isReferenceAssembly && @@ -52,8 +51,8 @@ public bool TryResolveAssemblyPaths(CompilationLibrary library, List ass return false; } - var refsPath = Path.Combine(_basePath, RefsDirectoryName); - var isPublished = _fileSystem.Directory.Exists(refsPath); + string refsPath = Path.Combine(_basePath, RefsDirectoryName); + bool isPublished = _fileSystem.Directory.Exists(refsPath); // Resolving reference assemblies requires refs folder to exist if (isReferenceAssembly && !isPublished) @@ -72,11 +71,11 @@ public bool TryResolveAssemblyPaths(CompilationLibrary library, List ass } // Only packages can come from shared runtime - var sharedPath = _dependencyContextPaths.SharedRuntime; + string sharedPath = _dependencyContextPaths.SharedRuntime; if (isPublished && isPackage && !string.IsNullOrEmpty(sharedPath)) { - var sharedDirectory = Path.GetDirectoryName(sharedPath); - var sharedRefs = Path.Combine(sharedDirectory, RefsDirectoryName); + string sharedDirectory = Path.GetDirectoryName(sharedPath); + string sharedRefs = Path.Combine(sharedDirectory, RefsDirectoryName); if (_fileSystem.Directory.Exists(sharedRefs)) { directories.Add(sharedRefs); @@ -86,11 +85,11 @@ public bool TryResolveAssemblyPaths(CompilationLibrary library, List ass var paths = new List(); - foreach (var assembly in library.Assemblies) + foreach (string assembly in library.Assemblies) { bool resolved = false; - var assemblyFile = Path.GetFileName(assembly); - foreach (var directory in directories) + string assemblyFile = Path.GetFileName(assembly); + foreach (string directory in directories) { string fullName; if (ResolverUtils.TryResolveAssemblyFile(_fileSystem, directory, assemblyFile, out fullName)) diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/CompositeCompilationAssemblyResolver.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/CompositeCompilationAssemblyResolver.cs index 6e200fd58def..aeeef0cdfc36 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/CompositeCompilationAssemblyResolver.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/CompositeCompilationAssemblyResolver.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; @@ -17,7 +16,7 @@ public CompositeCompilationAssemblyResolver(ICompilationAssemblyResolver[] resol public bool TryResolveAssemblyPaths(CompilationLibrary library, List assemblies) { - foreach (var resolver in _resolvers) + foreach (ICompilationAssemblyResolver resolver in _resolvers) { if (resolver.TryResolveAssemblyPaths(library, assemblies)) { @@ -27,4 +26,4 @@ public bool TryResolveAssemblyPaths(CompilationLibrary library, List ass return false; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/DotNetReferenceAssembliesPathResolver.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/DotNetReferenceAssembliesPathResolver.cs index df0771d55b3e..1e5df0769801 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/DotNetReferenceAssembliesPathResolver.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/DotNetReferenceAssembliesPathResolver.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; @@ -12,7 +11,7 @@ public class DotNetReferenceAssembliesPathResolver internal static string Resolve(IEnvironment environment, IFileSystem fileSystem) { - var path = environment.GetEnvironmentVariable(DotNetReferenceAssembliesPathEnv); + string path = environment.GetEnvironmentVariable(DotNetReferenceAssembliesPathEnv); if (!string.IsNullOrEmpty(path)) { return path; diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/ICompilationAssemblyResolver.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/ICompilationAssemblyResolver.cs index 522daf259906..13ec7f71befc 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/ICompilationAssemblyResolver.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/ICompilationAssemblyResolver.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; @@ -10,4 +9,4 @@ public interface ICompilationAssemblyResolver { bool TryResolveAssemblyPaths(CompilationLibrary library, List assemblies); } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/PackageCompilationAssemblyResolver.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/PackageCompilationAssemblyResolver.cs index 892e7cddb0d5..c4e3290cdedd 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/PackageCompilationAssemblyResolver.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/PackageCompilationAssemblyResolver.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -37,16 +36,16 @@ internal PackageCompilationAssemblyResolver(IFileSystem fileSystem, string[] nug internal static string[] GetDefaultProbeDirectories(IEnvironment environment) { - var probeDirectories = environment.GetAppContextData("PROBING_DIRECTORIES"); + object probeDirectories = environment.GetAppContextData("PROBING_DIRECTORIES"); - var listOfDirectories = probeDirectories as string; + string listOfDirectories = probeDirectories as string; if (!string.IsNullOrEmpty(listOfDirectories)) { return listOfDirectories.Split(new char[] { Path.PathSeparator }, StringSplitOptions.RemoveEmptyEntries); } - var packageDirectory = environment.GetEnvironmentVariable("NUGET_PACKAGES"); + string packageDirectory = environment.GetEnvironmentVariable("NUGET_PACKAGES"); if (!string.IsNullOrEmpty(packageDirectory)) { @@ -79,7 +78,7 @@ public bool TryResolveAssemblyPaths(CompilationLibrary library, List ass return false; } - foreach (var directory in _nugetPackageDirectories) + foreach (string directory in _nugetPackageDirectories) { string packagePath; @@ -100,13 +99,13 @@ private static bool TryResolveFromPackagePath(IFileSystem fileSystem, Compilatio { var paths = new List(); - foreach (var assembly in library.Assemblies) + foreach (string assembly in library.Assemblies) { string fullName; if (!ResolverUtils.TryResolveAssemblyFile(fileSystem, basePath, assembly, out fullName)) { // if one of the files can't be found, skip this package path completely. - // there are package paths that don't include all of the "ref" assemblies + // there are package paths that don't include all of the "ref" assemblies // (ex. ones created by 'dotnet store') results = null; return false; diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/ReferenceAssemblyPathResolver.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/ReferenceAssemblyPathResolver.cs index d8649cce855c..380ded64a34e 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/ReferenceAssemblyPathResolver.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/ReferenceAssemblyPathResolver.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -44,7 +43,7 @@ public bool TryResolveAssemblyPaths(CompilationLibrary library, List ass { return false; } - foreach (var assembly in library.Assemblies) + foreach (string assembly in library.Assemblies) { string fullName; if (!TryResolveReferenceAssembly(assembly, out fullName)) @@ -62,7 +61,7 @@ private bool TryResolveReferenceAssembly(string path, out string fullPath) if (_defaultReferenceAssembliesPath != null) { - var relativeToReferenceAssemblies = Path.Combine(_defaultReferenceAssembliesPath, path); + string relativeToReferenceAssemblies = Path.Combine(_defaultReferenceAssembliesPath, path); if (_fileSystem.File.Exists(relativeToReferenceAssemblies)) { fullPath = relativeToReferenceAssemblies; @@ -70,10 +69,11 @@ private bool TryResolveReferenceAssembly(string path, out string fullPath) } } - var name = Path.GetFileName(path); - foreach (var fallbackPath in _fallbackSearchPaths) + string name = Path.GetFileName(path); + + foreach (string fallbackPath in _fallbackSearchPaths) { - var fallbackFile = Path.Combine(fallbackPath, name); + string fallbackFile = Path.Combine(fallbackPath, name); if (_fileSystem.File.Exists(fallbackFile)) { fullPath = fallbackFile; @@ -88,14 +88,14 @@ internal static string[] GetFallbackSearchPaths(IFileSystem fileSystem, IEnviron { if (!environment.IsWindows()) { - return new string[0]; + return Array.Empty(); } - var net20Dir = Path.Combine(environment.GetEnvironmentVariable("WINDIR"), "Microsoft.NET", "Framework", "v2.0.50727"); + string net20Dir = Path.Combine(environment.GetEnvironmentVariable("WINDIR"), "Microsoft.NET", "Framework", "v2.0.50727"); if (!fileSystem.Directory.Exists(net20Dir)) { - return new string[0]; + return Array.Empty(); } return new[] { net20Dir }; } @@ -103,7 +103,7 @@ internal static string[] GetFallbackSearchPaths(IFileSystem fileSystem, IEnviron internal static string GetDefaultReferenceAssembliesPath(IFileSystem fileSystem, IEnvironment environment) { // Allow setting the reference assemblies path via an environment variable - var referenceAssembliesPath = DotNetReferenceAssembliesPathResolver.Resolve(environment, fileSystem); + string referenceAssembliesPath = DotNetReferenceAssembliesPathResolver.Resolve(environment, fileSystem); if (!string.IsNullOrEmpty(referenceAssembliesPath)) { return referenceAssembliesPath; @@ -118,7 +118,7 @@ internal static string GetDefaultReferenceAssembliesPath(IFileSystem fileSystem, // References assemblies are in %ProgramFiles(x86)% on // 64 bit machines - var programFiles = environment.GetEnvironmentVariable("ProgramFiles(x86)"); + string programFiles = environment.GetEnvironmentVariable("ProgramFiles(x86)"); if (string.IsNullOrEmpty(programFiles)) { @@ -137,4 +137,4 @@ internal static string GetDefaultReferenceAssembliesPath(IFileSystem fileSystem, "Reference Assemblies", "Microsoft", "Framework"); } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/ResolverUtils.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/ResolverUtils.cs index b729fcf9422a..1726e7755a70 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/ResolverUtils.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/ResolverUtils.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; @@ -10,7 +9,7 @@ internal static class ResolverUtils { internal static bool TryResolvePackagePath(IFileSystem fileSystem, CompilationLibrary library, string basePath, out string packagePath) { - var path = library.Path; + string path = library.Path; if (string.IsNullOrEmpty(path)) { path = Path.Combine(library.Name, library.Version); @@ -35,4 +34,4 @@ internal static bool TryResolveAssemblyFile(IFileSystem fileSystem, string baseP return false; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/ResourceAssembly.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/ResourceAssembly.cs index 4e754367b779..04d480837c8a 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/ResourceAssembly.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/ResourceAssembly.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/RuntimeAssembly.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/RuntimeAssembly.cs index edf908e9766c..80497ab89000 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/RuntimeAssembly.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/RuntimeAssembly.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Reflection; @@ -32,7 +31,7 @@ public RuntimeAssembly(string assemblyName, string path) public static RuntimeAssembly Create(string path) { - var assemblyName = System.IO.Path.GetFileNameWithoutExtension(path); + string assemblyName = System.IO.Path.GetFileNameWithoutExtension(path); if (assemblyName == null) { throw new ArgumentException($"Provided path has empty file name '{path}'", nameof(path)); diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/RuntimeAssetGroup.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/RuntimeAssetGroup.cs index 38bf828562f3..06a931373a35 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/RuntimeAssetGroup.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/RuntimeAssetGroup.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Linq; using System.Collections.Generic; @@ -63,4 +62,4 @@ public IReadOnlyList RuntimeFiles } } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/RuntimeFallbacks.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/RuntimeFallbacks.cs index 9ce186d557b6..3e80e4e7720a 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/RuntimeFallbacks.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/RuntimeFallbacks.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/RuntimeFile.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/RuntimeFile.cs index 5777a34dfa2c..2247ac1b815c 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/RuntimeFile.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/RuntimeFile.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/RuntimeLibrary.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/RuntimeLibrary.cs index 47b7ea2a0f0d..336a57b9ed54 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/RuntimeLibrary.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/RuntimeLibrary.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -104,4 +103,4 @@ public RuntimeLibrary(string type, public IReadOnlyList ResourceAssemblies { get; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/TargetInfo.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/TargetInfo.cs index 485ff58d3eb2..9b175c66cc98 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/TargetInfo.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/TargetInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; namespace Microsoft.Extensions.DependencyModel diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/UnifiedJsonReader.Utf8JsonReader.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/UnifiedJsonReader.Utf8JsonReader.cs index 0c3e3ef3ce5d..be196eb2411d 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/UnifiedJsonReader.Utf8JsonReader.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/UnifiedJsonReader.Utf8JsonReader.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/UnifiedJsonWriter.Utf8JsonWriter.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/UnifiedJsonWriter.Utf8JsonWriter.cs index 1e377e90ec5a..a6dc716d8ef0 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/UnifiedJsonWriter.Utf8JsonWriter.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/UnifiedJsonWriter.Utf8JsonWriter.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Text.Json; diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/tests/AppBaseResolverTests.cs b/src/libraries/Microsoft.Extensions.DependencyModel/tests/AppBaseResolverTests.cs index f8a6283f3399..3616bf9cbcc1 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/tests/AppBaseResolverTests.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/tests/AppBaseResolverTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/tests/AssemblyInfo.cs b/src/libraries/Microsoft.Extensions.DependencyModel/tests/AssemblyInfo.cs new file mode 100644 index 000000000000..3a74f33d7aa3 --- /dev/null +++ b/src/libraries/Microsoft.Extensions.DependencyModel/tests/AssemblyInfo.cs @@ -0,0 +1,7 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using Xunit; + +[assembly: ActiveIssue("https://github.com/dotnet/runtime/issues/37669", TestPlatforms.Browser)] diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/tests/CompilationLibraryTests.cs b/src/libraries/Microsoft.Extensions.DependencyModel/tests/CompilationLibraryTests.cs index f6d317af9e4b..a3f2d8acc9e9 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/tests/CompilationLibraryTests.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/tests/CompilationLibraryTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using FluentAssertions; using Microsoft.Extensions.DependencyModel.Resolution; diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/tests/CompositeResolverTests.cs b/src/libraries/Microsoft.Extensions.DependencyModel/tests/CompositeResolverTests.cs index 8caf6f86426b..99fb51405af9 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/tests/CompositeResolverTests.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/tests/CompositeResolverTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/tests/DependencyContextBuilderTests.cs b/src/libraries/Microsoft.Extensions.DependencyModel/tests/DependencyContextBuilderTests.cs index d18e0949ba44..b6f64911bcf5 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/tests/DependencyContextBuilderTests.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/tests/DependencyContextBuilderTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/tests/DependencyContextJsonReaderTest.cs b/src/libraries/Microsoft.Extensions.DependencyModel/tests/DependencyContextJsonReaderTest.cs index 7962cf124bca..cf3b27e965b7 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/tests/DependencyContextJsonReaderTest.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/tests/DependencyContextJsonReaderTest.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/tests/DependencyContextJsonWriterTests.cs b/src/libraries/Microsoft.Extensions.DependencyModel/tests/DependencyContextJsonWriterTests.cs index 8a45b4337e5f..0762b3ef3db2 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/tests/DependencyContextJsonWriterTests.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/tests/DependencyContextJsonWriterTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.IO; diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/tests/DependencyContextLoaderTests.cs b/src/libraries/Microsoft.Extensions.DependencyModel/tests/DependencyContextLoaderTests.cs index 85724f08d326..fe4dc14c93d4 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/tests/DependencyContextLoaderTests.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/tests/DependencyContextLoaderTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using FluentAssertions; using System.Reflection; diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/tests/DependencyContextPathsTests.cs b/src/libraries/Microsoft.Extensions.DependencyModel/tests/DependencyContextPathsTests.cs index 4adaea3cc054..02fa095f1905 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/tests/DependencyContextPathsTests.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/tests/DependencyContextPathsTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using FluentAssertions; using Xunit; diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/tests/DependencyContextTests.cs b/src/libraries/Microsoft.Extensions.DependencyModel/tests/DependencyContextTests.cs index 25dc1c3856ca..0c570d6a441f 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/tests/DependencyContextTests.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/tests/DependencyContextTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using FluentAssertions; using System.IO; diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/tests/EnvironmentMockBuilder.cs b/src/libraries/Microsoft.Extensions.DependencyModel/tests/EnvironmentMockBuilder.cs index c03434620474..fe371a0254b9 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/tests/EnvironmentMockBuilder.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/tests/EnvironmentMockBuilder.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/tests/JsonAssetions.cs b/src/libraries/Microsoft.Extensions.DependencyModel/tests/JsonAssetions.cs index 8ce460063df5..e0d80bc3b3bc 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/tests/JsonAssetions.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/tests/JsonAssetions.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/tests/PackageResolverTest.cs b/src/libraries/Microsoft.Extensions.DependencyModel/tests/PackageResolverTest.cs index f031344ee0d9..62f810600d08 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/tests/PackageResolverTest.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/tests/PackageResolverTest.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.IO; diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/tests/ReferenceAssemblyResolverTests.cs b/src/libraries/Microsoft.Extensions.DependencyModel/tests/ReferenceAssemblyResolverTests.cs index a165d17eaccc..035051b95159 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/tests/ReferenceAssemblyResolverTests.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/tests/ReferenceAssemblyResolverTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/tests/TestLibraryFactory.cs b/src/libraries/Microsoft.Extensions.DependencyModel/tests/TestLibraryFactory.cs index a8d70d394eb3..a1ecdbf1a2fe 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/tests/TestLibraryFactory.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/tests/TestLibraryFactory.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/tests/mocks/FileSystemMockBuilder.cs b/src/libraries/Microsoft.Extensions.DependencyModel/tests/mocks/FileSystemMockBuilder.cs index 87dadb670225..4e1bf41521f3 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/tests/mocks/FileSystemMockBuilder.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/tests/mocks/FileSystemMockBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/ref/Microsoft.Extensions.FileProviders.Abstractions.cs b/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/ref/Microsoft.Extensions.FileProviders.Abstractions.cs index 515ed3b87ad3..3982a62c75ce 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/ref/Microsoft.Extensions.FileProviders.Abstractions.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/ref/Microsoft.Extensions.FileProviders.Abstractions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ------------------------------------------------------------------------------ // Changes to this file must follow the https://aka.ms/api-review process. // ------------------------------------------------------------------------------ diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/src/IDirectoryContents.cs b/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/src/IDirectoryContents.cs index de8cbc60749d..34f9000108ac 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/src/IDirectoryContents.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/src/IDirectoryContents.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; @@ -16,4 +15,4 @@ public interface IDirectoryContents : IEnumerable /// bool Exists { get; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/src/IFileInfo.cs b/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/src/IFileInfo.cs index daf4dd94d9fd..d1f620c211a9 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/src/IFileInfo.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/src/IFileInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; @@ -48,4 +47,4 @@ public interface IFileInfo /// The file stream Stream CreateReadStream(); } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/src/IFileProvider.cs b/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/src/IFileProvider.cs index 0bb5b6bd0347..bce6d2d81f65 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/src/IFileProvider.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/src/IFileProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.Primitives; @@ -32,4 +31,4 @@ public interface IFileProvider /// An that is notified when a file matching is added, modified or deleted. IChangeToken Watch(string filter); } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/src/NotFoundDirectoryContents.cs b/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/src/NotFoundDirectoryContents.cs index a38e83b59408..8f4feb94eaf6 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/src/NotFoundDirectoryContents.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/src/NotFoundDirectoryContents.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections; using System.Collections.Generic; @@ -14,7 +13,7 @@ namespace Microsoft.Extensions.FileProviders public class NotFoundDirectoryContents : IDirectoryContents { /// - /// A shared instance of + /// A shared instance of /// public static NotFoundDirectoryContents Singleton { get; } = new NotFoundDirectoryContents(); @@ -30,4 +29,4 @@ public class NotFoundDirectoryContents : IDirectoryContents /// IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/src/NotFoundFileInfo.cs b/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/src/NotFoundFileInfo.cs index d0e301c310a1..aa045e16923d 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/src/NotFoundFileInfo.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/src/NotFoundFileInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; @@ -59,4 +58,4 @@ public Stream CreateReadStream() throw new FileNotFoundException($"The file {Name} does not exist."); } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/src/NullChangeToken.cs b/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/src/NullChangeToken.cs index aeddefec91d5..19a730355556 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/src/NullChangeToken.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/src/NullChangeToken.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.Primitives; @@ -42,4 +41,4 @@ public IDisposable RegisterChangeCallback(Action callback, object state) return EmptyDisposable.Instance; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/src/NullFileProvider.cs b/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/src/NullFileProvider.cs index 9ca5ec2c9e28..17c87efff85e 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/src/NullFileProvider.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/src/NullFileProvider.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.Primitives; diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Composite/ref/Microsoft.Extensions.FileProviders.Composite.cs b/src/libraries/Microsoft.Extensions.FileProviders.Composite/ref/Microsoft.Extensions.FileProviders.Composite.cs index 2531b2c556a6..4a5123dde810 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Composite/ref/Microsoft.Extensions.FileProviders.Composite.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Composite/ref/Microsoft.Extensions.FileProviders.Composite.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ------------------------------------------------------------------------------ // Changes to this file must follow the https://aka.ms/api-review process. // ------------------------------------------------------------------------------ diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Composite/src/CompositeDirectoryContents.cs b/src/libraries/Microsoft.Extensions.FileProviders.Composite/src/CompositeDirectoryContents.cs index ec5a0f763d79..3d7b73f3e334 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Composite/src/CompositeDirectoryContents.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Composite/src/CompositeDirectoryContents.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections; @@ -41,9 +40,9 @@ private void EnsureDirectoriesAreInitialized() if (_directories == null) { _directories = new List(); - foreach (var fileProvider in _fileProviders) + foreach (IFileProvider fileProvider in _fileProviders) { - var directoryContents = fileProvider.GetDirectoryContents(_subPath); + IDirectoryContents directoryContents = fileProvider.GetDirectoryContents(_subPath); if (directoryContents != null && directoryContents.Exists) { _exists = true; @@ -60,10 +59,10 @@ private void EnsureFilesAreInitialized() { _files = new List(); var names = new HashSet(); - for (var i = 0; i < _directories.Count; i++) + for (int i = 0; i < _directories.Count; i++) { - var directoryContents = _directories[i]; - foreach (var file in directoryContents) + IDirectoryContents directoryContents = _directories[i]; + foreach (IFileInfo file in directoryContents) { if (names.Add(file.Name)) { @@ -103,4 +102,4 @@ public bool Exists } } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Composite/src/CompositeFileProvider.cs b/src/libraries/Microsoft.Extensions.FileProviders.Composite/src/CompositeFileProvider.cs index 490cf09bd7b5..4f2ef8f406d0 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Composite/src/CompositeFileProvider.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Composite/src/CompositeFileProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -46,9 +45,9 @@ public CompositeFileProvider(IEnumerable fileProviders) /// The file information. Caller must check Exists property. This will be the first existing returned by the provided or a not found if no existing files is found. public IFileInfo GetFileInfo(string subpath) { - foreach (var fileProvider in _fileProviders) + foreach (IFileProvider fileProvider in _fileProviders) { - var fileInfo = fileProvider.GetFileInfo(subpath); + IFileInfo fileInfo = fileProvider.GetFileInfo(subpath); if (fileInfo != null && fileInfo.Exists) { return fileInfo; @@ -80,9 +79,9 @@ public IChangeToken Watch(string pattern) { // Watch all file providers var changeTokens = new List(); - foreach (var fileProvider in _fileProviders) + foreach (IFileProvider fileProvider in _fileProviders) { - var changeToken = fileProvider.Watch(pattern); + IChangeToken changeToken = fileProvider.Watch(pattern); if (changeToken != null) { changeTokens.Add(changeToken); @@ -94,7 +93,7 @@ public IChangeToken Watch(string pattern) { return NullChangeToken.Singleton; } - + return new CompositeChangeToken(changeTokens); } diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Composite/tests/CompositeFileProviderTests.cs b/src/libraries/Microsoft.Extensions.FileProviders.Composite/tests/CompositeFileProviderTests.cs index f1b1619c37b9..da09149c1adb 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Composite/tests/CompositeFileProviderTests.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Composite/tests/CompositeFileProviderTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -257,4 +256,4 @@ public void Watch_CompositeChangeToken_RegisterChangeCallbackCorrectlyTransmitsA Assert.NotNull(result); } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Composite/tests/MockChangeToken.cs b/src/libraries/Microsoft.Extensions.FileProviders.Composite/tests/MockChangeToken.cs index ce8ef778a05c..8da6dfe82528 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Composite/tests/MockChangeToken.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Composite/tests/MockChangeToken.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.Primitives; using System; diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Composite/tests/MockDisposable.cs b/src/libraries/Microsoft.Extensions.FileProviders.Composite/tests/MockDisposable.cs index bdeee1bb8843..5f95eeab7dbd 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Composite/tests/MockDisposable.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Composite/tests/MockDisposable.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -15,4 +14,4 @@ public void Dispose() Disposed = true; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Composite/tests/MockFileInfo.cs b/src/libraries/Microsoft.Extensions.FileProviders.Composite/tests/MockFileInfo.cs index b9a7edc6e392..999e41b72403 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Composite/tests/MockFileInfo.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Composite/tests/MockFileInfo.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; @@ -34,4 +33,4 @@ public Stream CreateReadStream() throw new NotImplementedException(); } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Composite/tests/MockFileProvider.cs b/src/libraries/Microsoft.Extensions.FileProviders.Composite/tests/MockFileProvider.cs index 5d4e60882d9c..9a020321a9e6 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Composite/tests/MockFileProvider.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Composite/tests/MockFileProvider.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Physical/ref/Microsoft.Extensions.FileProviders.Physical.cs b/src/libraries/Microsoft.Extensions.FileProviders.Physical/ref/Microsoft.Extensions.FileProviders.Physical.cs index 9634c4f0d38c..658a47bbeb6f 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Physical/ref/Microsoft.Extensions.FileProviders.Physical.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Physical/ref/Microsoft.Extensions.FileProviders.Physical.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ------------------------------------------------------------------------------ // Changes to this file must follow the https://aka.ms/api-review process. // ------------------------------------------------------------------------------ diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/ExclusionFilters.cs b/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/ExclusionFilters.cs index 568a167fa702..004b9e536aba 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/ExclusionFilters.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/ExclusionFilters.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/IPollingChangeToken.cs b/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/IPollingChangeToken.cs index 9d1c678a3831..8806586c2974 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/IPollingChangeToken.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/IPollingChangeToken.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Threading; using Microsoft.Extensions.Primitives; diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/Internal/Clock.cs b/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/Internal/Clock.cs index 8fb4ed0ab261..67371f56e74e 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/Internal/Clock.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/Internal/Clock.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/Internal/FileSystemInfoHelper.cs b/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/Internal/FileSystemInfoHelper.cs index c8736f3bb398..067a1545860e 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/Internal/FileSystemInfoHelper.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/Internal/FileSystemInfoHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/Internal/IClock.cs b/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/Internal/IClock.cs index f4a7511fbe54..cc9d19bced37 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/Internal/IClock.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/Internal/IClock.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/Internal/PathUtils.cs b/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/Internal/PathUtils.cs index 7cc1eae0bfae..2e8cd78618f3 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/Internal/PathUtils.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/Internal/PathUtils.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; using System.Linq; @@ -43,9 +42,9 @@ internal static string EnsureTrailingSlash(string path) internal static bool PathNavigatesAboveRoot(string path) { var tokenizer = new StringTokenizer(path, _pathSeparators); - var depth = 0; + int depth = 0; - foreach (var segment in tokenizer) + foreach (StringSegment segment in tokenizer) { if (segment.Equals(".") || segment.Equals("")) { diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/Internal/PhysicalDirectoryContents.cs b/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/Internal/PhysicalDirectoryContents.cs index a2da74262913..74516662b2fe 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/Internal/PhysicalDirectoryContents.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/Internal/PhysicalDirectoryContents.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections; diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PhysicalDirectoryInfo.cs b/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PhysicalDirectoryInfo.cs index d4093ec1821a..1a8757e285ac 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PhysicalDirectoryInfo.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PhysicalDirectoryInfo.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PhysicalFileInfo.cs b/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PhysicalFileInfo.cs index 7afc2763c8a3..26ff178dc533 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PhysicalFileInfo.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PhysicalFileInfo.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; @@ -48,7 +47,7 @@ public Stream CreateReadStream() { // We are setting buffer size to 1 to prevent FileStream from allocating it's internal buffer // 0 causes constructor to throw - var bufferSize = 1; + int bufferSize = 1; return new FileStream( PhysicalPath, FileMode.Open, diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PhysicalFileProvider.cs b/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PhysicalFileProvider.cs index 6581cfd864d0..e2f3d74151b3 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PhysicalFileProvider.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PhysicalFileProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; @@ -57,7 +56,7 @@ public PhysicalFileProvider(string root, ExclusionFilters filters) throw new ArgumentException("The path must be absolute.", nameof(root)); } - var fullRoot = Path.GetFullPath(root); + string fullRoot = Path.GetFullPath(root); // When we do matches in GetFullPath, we want to only match full directory names. Root = PathUtils.EnsureTrailingSlash(fullRoot); if (!Directory.Exists(Root)) @@ -158,7 +157,7 @@ internal PhysicalFilesWatcher FileWatcher internal PhysicalFilesWatcher CreateFileWatcher() { - var root = PathUtils.EnsureTrailingSlash(Path.GetFullPath(Root)); + string root = PathUtils.EnsureTrailingSlash(Path.GetFullPath(Root)); return new PhysicalFilesWatcher(root, new FileSystemWatcher(root), UsePollingFileWatcher, _filters) { UseActivePolling = UseActivePolling, @@ -167,8 +166,8 @@ internal PhysicalFilesWatcher CreateFileWatcher() private void ReadPollingEnvironmentVariables() { - var environmentValue = Environment.GetEnvironmentVariable(PollingEnvironmentKey); - var pollForChanges = string.Equals(environmentValue, "1", StringComparison.Ordinal) || + string environmentValue = Environment.GetEnvironmentVariable(PollingEnvironmentKey); + bool pollForChanges = string.Equals(environmentValue, "1", StringComparison.Ordinal) || string.Equals(environmentValue, "true", StringComparison.OrdinalIgnoreCase); _usePollingFileWatcher = pollForChanges; @@ -250,7 +249,7 @@ public IFileInfo GetFileInfo(string subpath) return new NotFoundFileInfo(subpath); } - var fullPath = GetFullPath(subpath); + string fullPath = GetFullPath(subpath); if (fullPath == null) { return new NotFoundFileInfo(subpath); @@ -292,7 +291,7 @@ public IDirectoryContents GetDirectoryContents(string subpath) return NotFoundDirectoryContents.Singleton; } - var fullPath = GetFullPath(subpath); + string fullPath = GetFullPath(subpath); if (fullPath == null || !Directory.Exists(fullPath)) { return NotFoundDirectoryContents.Singleton; diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PhysicalFilesWatcher.cs b/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PhysicalFilesWatcher.cs index 71c10e9e8a65..94aad3653aac 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PhysicalFilesWatcher.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PhysicalFilesWatcher.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Concurrent; @@ -130,7 +129,7 @@ public IChangeToken CreateFileChangeToken(string filter) return NullChangeToken.Singleton; } - var changeToken = GetOrAddChangeToken(filter); + IChangeToken changeToken = GetOrAddChangeToken(filter); TryEnableFileSystemWatcher(); return changeToken; @@ -144,7 +143,7 @@ private IChangeToken GetOrAddChangeToken(string pattern) } IChangeToken changeToken; - var isWildCard = pattern.IndexOf('*') != -1; + bool isWildCard = pattern.IndexOf('*') != -1; if (isWildCard || IsDirectoryPath(pattern)) { changeToken = GetOrAddWildcardChangeToken(pattern); @@ -159,7 +158,7 @@ private IChangeToken GetOrAddChangeToken(string pattern) internal IChangeToken GetOrAddFilePathChangeToken(string filePath) { - if (!_filePathTokenLookup.TryGetValue(filePath, out var tokenInfo)) + if (!_filePathTokenLookup.TryGetValue(filePath, out ChangeTokenInfo tokenInfo)) { var cancellationTokenSource = new CancellationTokenSource(); var cancellationChangeToken = new CancellationChangeToken(cancellationTokenSource.Token); @@ -194,7 +193,7 @@ internal IChangeToken GetOrAddFilePathChangeToken(string filePath) internal IChangeToken GetOrAddWildcardChangeToken(string pattern) { - if (!_wildcardTokenLookup.TryGetValue(pattern, out var tokenInfo)) + if (!_wildcardTokenLookup.TryGetValue(pattern, out ChangeTokenInfo tokenInfo)) { var cancellationTokenSource = new CancellationTokenSource(); var cancellationChangeToken = new CancellationChangeToken(cancellationTokenSource.Token); @@ -261,11 +260,11 @@ private void OnRenamed(object sender, RenamedEventArgs e) { // If the renamed entity is a directory then notify tokens for every sub item. foreach ( - var newLocation in + string newLocation in Directory.EnumerateFileSystemEntries(e.FullPath, "*", SearchOption.AllDirectories)) { // Calculated previous path of this moved item. - var oldLocation = Path.Combine(e.OldFullPath, newLocation.Substring(e.FullPath.Length + 1)); + string oldLocation = Path.Combine(e.OldFullPath, newLocation.Substring(e.FullPath.Length + 1)); OnFileSystemEntryChange(oldLocation); OnFileSystemEntryChange(newLocation); } @@ -289,7 +288,7 @@ private void OnChanged(object sender, FileSystemEventArgs e) private void OnError(object sender, ErrorEventArgs e) { // Notify all cache entries on error. - foreach (var path in _filePathTokenLookup.Keys) + foreach (string path in _filePathTokenLookup.Keys) { ReportChangeForMatchedEntries(path); } @@ -305,7 +304,7 @@ private void OnFileSystemEntryChange(string fullPath) return; } - var relativePath = fullPath.Substring(_root.Length); + string relativePath = fullPath.Substring(_root.Length); ReportChangeForMatchedEntries(relativePath); } catch (Exception ex) when ( @@ -329,16 +328,16 @@ private void ReportChangeForMatchedEntries(string path) path = NormalizePath(path); - var matched = false; - if (_filePathTokenLookup.TryRemove(path, out var matchInfo)) + bool matched = false; + if (_filePathTokenLookup.TryRemove(path, out ChangeTokenInfo matchInfo)) { CancelToken(matchInfo); matched = true; } - foreach (var wildCardEntry in _wildcardTokenLookup) + foreach (System.Collections.Generic.KeyValuePair wildCardEntry in _wildcardTokenLookup) { - var matchResult = wildCardEntry.Value.Matcher.Match(path); + PatternMatchingResult matchResult = wildCardEntry.Value.Matcher.Match(path); if (matchResult.HasMatches && _wildcardTokenLookup.TryRemove(wildCardEntry.Key, out matchInfo)) { @@ -409,9 +408,9 @@ internal static void RaiseChangeEvents(object state) // Iterating over a concurrent bag gives us a point in time snapshot making it safe // to remove items from it. var changeTokens = (ConcurrentDictionary)state; - foreach (var item in changeTokens) + foreach (System.Collections.Generic.KeyValuePair item in changeTokens) { - var token = item.Key; + IPollingChangeToken token = item.Key; if (!token.HasChanged) { diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PollingFileChangeToken.cs b/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PollingFileChangeToken.cs index 0461f1942313..23d8c8d306c7 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PollingFileChangeToken.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PollingFileChangeToken.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; @@ -87,13 +86,13 @@ public bool HasChanged return _hasChanged; } - var currentTime = DateTime.UtcNow; + DateTime currentTime = DateTime.UtcNow; if (currentTime - _lastCheckedTimeUtc < PollingInterval) { return _hasChanged; } - var lastWriteTimeUtc = GetLastWriteTimeUtc(); + DateTime lastWriteTimeUtc = GetLastWriteTimeUtc(); if (_previousWriteTimeUtc != lastWriteTimeUtc) { _previousWriteTimeUtc = lastWriteTimeUtc; @@ -121,4 +120,4 @@ public IDisposable RegisterChangeCallback(Action callback, object state) return _changeToken.RegisterChangeCallback(callback, state); } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PollingWildCardChangeToken.cs b/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PollingWildCardChangeToken.cs index 2324bdf3c121..998aaa29772f 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PollingWildCardChangeToken.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PollingWildCardChangeToken.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; @@ -106,14 +105,14 @@ public bool HasChanged private bool CalculateChanges() { - var result = _matcher.Execute(_directoryInfo); + PatternMatchingResult result = _matcher.Execute(_directoryInfo); - var files = result.Files.OrderBy(f => f.Path, StringComparer.Ordinal); + IOrderedEnumerable files = result.Files.OrderBy(f => f.Path, StringComparer.Ordinal); using (var sha256 = IncrementalHash.CreateHash(HashAlgorithmName.SHA256)) { - foreach (var file in files) + foreach (FilePatternMatch file in files) { - var lastWriteTimeUtc = GetLastWriteUtc(file.Path); + DateTime lastWriteTimeUtc = GetLastWriteUtc(file.Path); if (_lastScanTimeUtc != null && _lastScanTimeUtc < lastWriteTimeUtc) { // _lastScanTimeUtc is the greatest timestamp that any last writes could have been. @@ -124,7 +123,7 @@ private bool CalculateChanges() ComputeHash(sha256, file.Path, lastWriteTimeUtc); } - var currentHash = sha256.GetHashAndReset(); + byte[] currentHash = sha256.GetHashAndReset(); if (!ArrayEquals(_previousHash, currentHash)) { return true; @@ -156,7 +155,7 @@ private static bool ArrayEquals(byte[] previousHash, byte[] currentHash) } Debug.Assert(previousHash.Length == currentHash.Length); - for (var i = 0; i < previousHash.Length; i++) + for (int i = 0; i < previousHash.Length; i++) { if (previousHash[i] != currentHash[i]) { @@ -169,13 +168,13 @@ private static bool ArrayEquals(byte[] previousHash, byte[] currentHash) private void ComputeHash(IncrementalHash sha256, string path, DateTime lastChangedUtc) { - var byteCount = Encoding.Unicode.GetByteCount(path); + int byteCount = Encoding.Unicode.GetByteCount(path); if (_byteBuffer == null || byteCount > _byteBuffer.Length) { _byteBuffer = new byte[Math.Max(byteCount, 256)]; } - var length = Encoding.Unicode.GetBytes(path, 0, path.Length, _byteBuffer, 0); + int length = Encoding.Unicode.GetBytes(path, 0, path.Length, _byteBuffer, 0); sha256.AppendData(_byteBuffer, 0, length); sha256.AppendData(Separator, 0, Separator.Length); diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/Properties/InternalsVisibleTo.cs b/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/Properties/InternalsVisibleTo.cs index f81616c7ff15..6b1d421d50f3 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/Properties/InternalsVisibleTo.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/Properties/InternalsVisibleTo.cs @@ -1,8 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("Microsoft.Extensions.FileProviders.Physical.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.Extensions.FileProviders.Physical.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/AssemblyInfo.cs b/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/AssemblyInfo.cs new file mode 100644 index 000000000000..99de9b16c5df --- /dev/null +++ b/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/AssemblyInfo.cs @@ -0,0 +1,7 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using Xunit; + +[assembly: SkipOnMono("Microsoft.Extensions.FileProviders.Physical is not supported on wasm", TestPlatforms.Browser)] diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/DisposableFileSystem.cs b/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/DisposableFileSystem.cs index 43b134e5c079..9c46d134351a 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/DisposableFileSystem.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/DisposableFileSystem.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; @@ -76,4 +75,4 @@ public void Dispose() } } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/ExclusionFilterTests.cs b/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/ExclusionFilterTests.cs index 98e6972445f7..f270cb5f7e0a 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/ExclusionFilterTests.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/ExclusionFilterTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/MockFileSystemWatcher.cs b/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/MockFileSystemWatcher.cs index 7d833ed22f18..9aef7c5015da 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/MockFileSystemWatcher.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/MockFileSystemWatcher.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/PhysicalFileProviderTests.cs b/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/PhysicalFileProviderTests.cs index 01952da747f7..819a30a392c8 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/PhysicalFileProviderTests.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/PhysicalFileProviderTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/PhysicalFilesWatcherTests.cs b/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/PhysicalFilesWatcherTests.cs index e512dd9ee6ae..3644f63223ee 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/PhysicalFilesWatcherTests.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/PhysicalFilesWatcherTests.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Concurrent; diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/PollingWildCardChangeTokenTest.cs b/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/PollingWildCardChangeTokenTest.cs index 9d48780f76a7..e1994076af94 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/PollingWildCardChangeTokenTest.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/PollingWildCardChangeTokenTest.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/TestClock.cs b/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/TestClock.cs index 165915e09b17..9be3f1c9f8fd 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/TestClock.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/TestClock.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/ref/Microsoft.Extensions.FileSystemGlobbing.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/ref/Microsoft.Extensions.FileSystemGlobbing.cs index abe125e2e38b..3ff755ae723e 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/ref/Microsoft.Extensions.FileSystemGlobbing.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/ref/Microsoft.Extensions.FileSystemGlobbing.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ------------------------------------------------------------------------------ // Changes to this file must follow the https://aka.ms/api-review process. // ------------------------------------------------------------------------------ diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Abstractions/DirectoryInfoBase.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Abstractions/DirectoryInfoBase.cs index 6d6aff481b1b..f520c2a62765 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Abstractions/DirectoryInfoBase.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Abstractions/DirectoryInfoBase.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; @@ -31,4 +30,4 @@ public abstract class DirectoryInfoBase : FileSystemInfoBase /// Instance of even if file does not exist public abstract FileInfoBase GetFile(string path); } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Abstractions/DirectoryInfoWrapper.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Abstractions/DirectoryInfoWrapper.cs index 228f9062eff5..26ee196cbc12 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Abstractions/DirectoryInfoWrapper.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Abstractions/DirectoryInfoWrapper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -36,7 +35,7 @@ public override IEnumerable EnumerateFileSystemInfos() { if (_directoryInfo.Exists) { - foreach (var fileSystemInfo in _directoryInfo.EnumerateFileSystemInfos("*", SearchOption.TopDirectoryOnly)) + foreach (FileSystemInfo fileSystemInfo in _directoryInfo.EnumerateFileSystemInfos("*", SearchOption.TopDirectoryOnly)) { var directoryInfo = fileSystemInfo as DirectoryInfo; if (directoryInfo != null) @@ -61,7 +60,7 @@ public override IEnumerable EnumerateFileSystemInfos() /// The directory public override DirectoryInfoBase GetDirectory(string name) { - var isParentPath = string.Equals(name, "..", StringComparison.Ordinal); + bool isParentPath = string.Equals(name, "..", StringComparison.Ordinal); if (isParentPath) { @@ -71,7 +70,7 @@ public override DirectoryInfoBase GetDirectory(string name) } else { - var dirs = _directoryInfo.GetDirectories(name); + DirectoryInfo[] dirs = _directoryInfo.GetDirectories(name); if (dirs.Length == 1) { diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Abstractions/FileInfoBase.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Abstractions/FileInfoBase.cs index f01c788e0bfa..07510e8c6947 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Abstractions/FileInfoBase.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Abstractions/FileInfoBase.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.FileSystemGlobbing.Abstractions { @@ -10,4 +9,4 @@ namespace Microsoft.Extensions.FileSystemGlobbing.Abstractions public abstract class FileInfoBase : FileSystemInfoBase { } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Abstractions/FileInfoWrapper.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Abstractions/FileInfoWrapper.cs index c6c7de7cbb19..9ef3a911a0e1 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Abstractions/FileInfoWrapper.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Abstractions/FileInfoWrapper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; @@ -46,4 +45,4 @@ public FileInfoWrapper(FileInfo fileInfo) /// public override DirectoryInfoBase ParentDirectory => new DirectoryInfoWrapper(_fileInfo.Directory); } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Abstractions/FileSystemInfoBase.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Abstractions/FileSystemInfoBase.cs index 78940914c800..fc50849ad00e 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Abstractions/FileSystemInfoBase.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Abstractions/FileSystemInfoBase.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.FileSystemGlobbing.Abstractions { @@ -24,4 +23,4 @@ public abstract class FileSystemInfoBase /// public abstract DirectoryInfoBase ParentDirectory { get; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/FilePatternMatch.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/FilePatternMatch.cs index 13550320a950..cf424bed27be 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/FilePatternMatch.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/FilePatternMatch.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.Internal; @@ -76,4 +75,4 @@ public override int GetHashCode() return hashCodeCombiner; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/InMemoryDirectoryInfo.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/InMemoryDirectoryInfo.cs index 420ab01ccb59..d94f1982e1ea 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/InMemoryDirectoryInfo.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/InMemoryDirectoryInfo.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -52,7 +51,7 @@ private InMemoryDirectoryInfo(string rootDir, IEnumerable files, bool no var fileList = new List(files.Count()); // normalize - foreach (var file in files) + foreach (string file in files) { fileList.Add(Path.GetFullPath(file.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar))); } @@ -82,16 +81,16 @@ public override DirectoryInfoBase ParentDirectory public override IEnumerable EnumerateFileSystemInfos() { var dict = new Dictionary>(); - foreach (var file in _files) + foreach (string file in _files) { if (!IsRootDirectory(FullName, file)) { continue; } - var endPath = file.Length; - var beginSegment = FullName.Length + 1; - var endSegment = file.IndexOfAny(DirectorySeparators, beginSegment, endPath - beginSegment); + int endPath = file.Length; + int beginSegment = FullName.Length + 1; + int endSegment = file.IndexOfAny(DirectorySeparators, beginSegment, endPath - beginSegment); if (endSegment == -1) { @@ -99,7 +98,7 @@ public override IEnumerable EnumerateFileSystemInfos() } else { - var name = file.Substring(0, endSegment); + string name = file.Substring(0, endSegment); List list; if (!dict.TryGetValue(name, out list)) { @@ -112,7 +111,7 @@ public override IEnumerable EnumerateFileSystemInfos() } } - foreach (var item in dict) + foreach (KeyValuePair> item in dict) { yield return new InMemoryDirectoryInfo(item.Key, item.Value, true); } @@ -138,7 +137,7 @@ public override DirectoryInfoBase GetDirectory(string path) } else { - var normPath = Path.GetFullPath(path.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar)); + string normPath = Path.GetFullPath(path.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar)); return new InMemoryDirectoryInfo(normPath, _files, true); } } @@ -150,8 +149,8 @@ public override DirectoryInfoBase GetDirectory(string path) /// Instance of if the file exists, null otherwise. public override FileInfoBase GetFile(string path) { - var normPath = Path.GetFullPath(path.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar)); - foreach (var file in _files) + string normPath = Path.GetFullPath(path.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar)); + foreach (string file in _files) { if (string.Equals(file, normPath)) { diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/ILinearPattern.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/ILinearPattern.cs index 9758851462c0..f2adfb8e7b37 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/ILinearPattern.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/ILinearPattern.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/IPathSegment.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/IPathSegment.cs index 65e4d841fd5e..5d1cd8eaeb9e 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/IPathSegment.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/IPathSegment.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.FileSystemGlobbing.Internal { diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/IPattern.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/IPattern.cs index 9fcf109096cb..5989deb047b5 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/IPattern.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/IPattern.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.FileSystemGlobbing.Internal { diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/IPatternContext.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/IPatternContext.cs index 0357c30f3254..01dee87ca10f 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/IPatternContext.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/IPatternContext.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.FileSystemGlobbing.Abstractions; diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/IRaggedPattern.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/IRaggedPattern.cs index 8d7386c4252d..142003f0e594 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/IRaggedPattern.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/IRaggedPattern.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/InMemoryFileInfo.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/InMemoryFileInfo.cs index 54e026d394e8..c5b40ecf76a8 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/InMemoryFileInfo.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/InMemoryFileInfo.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; using Microsoft.Extensions.FileSystemGlobbing.Abstractions; diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/MatcherContext.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/MatcherContext.cs index 0e9aecb6e260..c4c45691b8c7 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/MatcherContext.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/MatcherContext.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -69,8 +68,8 @@ private void Match(DirectoryInfoBase directory, string parentRelativePath) } else { - var candidates = directory.EnumerateFileSystemInfos().OfType(); - foreach (var candidate in candidates) + IEnumerable candidates = directory.EnumerateFileSystemInfos().OfType(); + foreach (DirectoryInfoBase candidate in candidates) { if (_declaredLiteralFolderSegmentInString.Contains(candidate.Name)) { @@ -86,12 +85,12 @@ private void Match(DirectoryInfoBase directory, string parentRelativePath) // collect files and sub directories var subDirectories = new List(); - foreach (var entity in entities) + foreach (FileSystemInfoBase entity in entities) { var fileInfo = entity as FileInfoBase; if (fileInfo != null) { - var result = MatchPatternContexts(fileInfo, (pattern, file) => pattern.Test(file)); + PatternTestResult result = MatchPatternContexts(fileInfo, (pattern, file) => pattern.Test(file)); if (result.IsSuccessful) { _files.Add(new FilePatternMatch( @@ -115,9 +114,9 @@ private void Match(DirectoryInfoBase directory, string parentRelativePath) } // Matches the sub directories recursively - foreach (var subDir in subDirectories) + foreach (DirectoryInfoBase subDir in subDirectories) { - var relativePath = CombinePath(parentRelativePath, subDir.Name); + string relativePath = CombinePath(parentRelativePath, subDir.Name); Match(subDir, relativePath); } @@ -133,7 +132,7 @@ private void Declare() _declaredParentPathSegment = false; _declaredWildcardPathSegment = false; - foreach (var include in _includePatternContexts) + foreach (IPatternContext include in _includePatternContexts) { include.Declare(DeclareInclude); } @@ -196,12 +195,12 @@ private bool MatchPatternContexts(TFileInfoBase fileinfo, Func(TFileInfoBase fileinfo, Func test) { - var result = PatternTestResult.Failed; + PatternTestResult result = PatternTestResult.Failed; // If the given file/directory matches any including pattern, continues to next step. - foreach (var context in _includePatternContexts) + foreach (IPatternContext context in _includePatternContexts) { - var localResult = test(context, fileinfo); + PatternTestResult localResult = test(context, fileinfo); if (localResult.IsSuccessful) { result = localResult; @@ -216,7 +215,7 @@ private PatternTestResult MatchPatternContexts(TFileInfoBase file } // If the given file/directory matches any excluding pattern, returns false. - foreach (var context in _excludePatternContexts) + foreach (IPatternContext context in _excludePatternContexts) { if (test(context, fileinfo).IsSuccessful) { @@ -229,12 +228,12 @@ private PatternTestResult MatchPatternContexts(TFileInfoBase file private void PopDirectory() { - foreach (var context in _excludePatternContexts) + foreach (IPatternContext context in _excludePatternContexts) { context.PopDirectory(); } - foreach (var context in _includePatternContexts) + foreach (IPatternContext context in _includePatternContexts) { context.PopDirectory(); } @@ -242,12 +241,12 @@ private void PopDirectory() private void PushDirectory(DirectoryInfoBase directory) { - foreach (var context in _includePatternContexts) + foreach (IPatternContext context in _includePatternContexts) { context.PushDirectory(directory); } - foreach (var context in _excludePatternContexts) + foreach (IPatternContext context in _excludePatternContexts) { context.PushDirectory(directory); } diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PathSegments/CurrentPathSegment.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PathSegments/CurrentPathSegment.cs index 2c77f26b9873..b5f1ab15eac0 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PathSegments/CurrentPathSegment.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PathSegments/CurrentPathSegment.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -15,4 +14,4 @@ public bool Match(string value) return false; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PathSegments/LiteralPathSegment.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PathSegments/LiteralPathSegment.cs index d9d0f6a5d5c1..7b58c3c03a2e 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PathSegments/LiteralPathSegment.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PathSegments/LiteralPathSegment.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.FileSystemGlobbing.Util; @@ -46,4 +45,4 @@ public override int GetHashCode() return StringComparisonHelper.GetStringComparer(_comparisonType).GetHashCode(Value); } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PathSegments/ParentPathSegment.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PathSegments/ParentPathSegment.cs index 7798a4fa2d03..ce66a8c77c28 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PathSegments/ParentPathSegment.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PathSegments/ParentPathSegment.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -8,7 +7,7 @@ namespace Microsoft.Extensions.FileSystemGlobbing.Internal.PathSegments { public class ParentPathSegment : IPathSegment { - private static readonly string LiteralParent = ".."; + private const string LiteralParent = ".."; public bool CanProduceStem { get { return false; } } @@ -17,4 +16,4 @@ public bool Match(string value) return string.Equals(LiteralParent, value, StringComparison.Ordinal); } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PathSegments/RecursiveWildcardSegment.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PathSegments/RecursiveWildcardSegment.cs index 9d508dcc37a1..6573228c38a7 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PathSegments/RecursiveWildcardSegment.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PathSegments/RecursiveWildcardSegment.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -15,4 +14,4 @@ public bool Match(string value) return false; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PathSegments/WildcardPathSegment.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PathSegments/WildcardPathSegment.cs index 17a1946b017a..dec7476f0fd0 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PathSegments/WildcardPathSegment.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PathSegments/WildcardPathSegment.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -9,7 +8,7 @@ namespace Microsoft.Extensions.FileSystemGlobbing.Internal.PathSegments { public class WildcardPathSegment : IPathSegment { - // It doesn't matter which StringComparison type is used in this MatchAll segment because + // It doesn't matter which StringComparison type is used in this MatchAll segment because // all comparing are skipped since there is no content in the segment. public static readonly WildcardPathSegment MatchAll = new WildcardPathSegment( string.Empty, new List(), string.Empty, StringComparison.OrdinalIgnoreCase); @@ -34,7 +33,7 @@ public WildcardPathSegment(string beginsWith, List contains, string ends public bool Match(string value) { - var wildcard = this; + WildcardPathSegment wildcard = this; if (value.Length < wildcard.BeginsWith.Length + wildcard.EndsWith.Length) { @@ -51,12 +50,12 @@ public bool Match(string value) return false; } - var beginRemaining = wildcard.BeginsWith.Length; - var endRemaining = value.Length - wildcard.EndsWith.Length; - for (var containsIndex = 0; containsIndex != wildcard.Contains.Count; ++containsIndex) + int beginRemaining = wildcard.BeginsWith.Length; + int endRemaining = value.Length - wildcard.EndsWith.Length; + for (int containsIndex = 0; containsIndex != wildcard.Contains.Count; ++containsIndex) { - var containsValue = wildcard.Contains[containsIndex]; - var indexOf = value.IndexOf( + string containsValue = wildcard.Contains[containsIndex]; + int indexOf = value.IndexOf( value: containsValue, startIndex: beginRemaining, count: endRemaining - beginRemaining, @@ -72,4 +71,4 @@ public bool Match(string value) return true; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PatternContexts/PatternContext.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PatternContexts/PatternContext.cs index b73341ebd982..7e62c8203803 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PatternContexts/PatternContext.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PatternContexts/PatternContext.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -37,4 +36,4 @@ protected bool IsStackEmpty() return _stack.Count == 0; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PatternContexts/PatternContextLinear.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PatternContexts/PatternContextLinear.cs index 02fcfa9ccf21..354ae4485c16 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PatternContexts/PatternContextLinear.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PatternContexts/PatternContextLinear.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -23,7 +22,7 @@ public override PatternTestResult Test(FileInfoBase file) throw new InvalidOperationException("Can't test file before entering a directory."); } - if(!Frame.IsNotApplicable && IsLastSegment() && TestMatchingSegment(file.Name)) + if (!Frame.IsNotApplicable && IsLastSegment() && TestMatchingSegment(file.Name)) { return PatternTestResult.Success(CalculateStem(file)); } @@ -34,7 +33,7 @@ public override PatternTestResult Test(FileInfoBase file) public override void PushDirectory(DirectoryInfoBase directory) { // copy the current frame - var frame = Frame; + FrameData frame = Frame; if (IsStackEmpty() || Frame.IsNotApplicable) { @@ -49,7 +48,7 @@ public override void PushDirectory(DirectoryInfoBase directory) else { // Determine this frame's contribution to the stem (if any) - var segment = Pattern.Segments[Frame.SegmentIndex]; + IPathSegment segment = Pattern.Segments[Frame.SegmentIndex]; if (frame.InStem || segment.CanProduceStem) { frame.InStem = true; diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PatternContexts/PatternContextLinearExclude.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PatternContexts/PatternContextLinearExclude.cs index 5d9272f3d361..ee727af04567 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PatternContexts/PatternContextLinearExclude.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PatternContexts/PatternContextLinearExclude.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.FileSystemGlobbing.Abstractions; diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PatternContexts/PatternContextLinearInclude.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PatternContexts/PatternContextLinearInclude.cs index 6648055d4a59..70e4affe8b42 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PatternContexts/PatternContextLinearInclude.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PatternContexts/PatternContextLinearInclude.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.FileSystemGlobbing.Abstractions; diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PatternContexts/PatternContextRagged.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PatternContexts/PatternContextRagged.cs index 3d3609df9ec1..9fb5b1d68712 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PatternContexts/PatternContextRagged.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PatternContexts/PatternContextRagged.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -22,7 +21,7 @@ public override PatternTestResult Test(FileInfoBase file) throw new InvalidOperationException("Can't test file before entering a directory."); } - if(!Frame.IsNotApplicable && IsEndingGroup() && TestMatchingGroup(file)) + if (!Frame.IsNotApplicable && IsEndingGroup() && TestMatchingGroup(file)) { return PatternTestResult.Success(CalculateStem(file)); } @@ -32,7 +31,7 @@ public override PatternTestResult Test(FileInfoBase file) public sealed override void PushDirectory(DirectoryInfoBase directory) { // copy the current frame - var frame = Frame; + FrameData frame = Frame; if (IsStackEmpty()) { @@ -159,17 +158,17 @@ protected bool TestMatchingSegment(string value) protected bool TestMatchingGroup(FileSystemInfoBase value) { - var groupLength = Frame.SegmentGroup.Count; - var backtrackLength = Frame.BacktrackAvailable + 1; + int groupLength = Frame.SegmentGroup.Count; + int backtrackLength = Frame.BacktrackAvailable + 1; if (backtrackLength < groupLength) { return false; } - var scan = value; + FileSystemInfoBase scan = value; for (int index = 0; index != groupLength; ++index) { - var segment = Frame.SegmentGroup[groupLength - index - 1]; + IPathSegment segment = Frame.SegmentGroup[groupLength - index - 1]; if (!segment.Match(scan.Name)) { return false; diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PatternContexts/PatternContextRaggedExclude.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PatternContexts/PatternContextRaggedExclude.cs index eb376676cc84..358f1ec1fe2f 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PatternContexts/PatternContextRaggedExclude.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PatternContexts/PatternContextRaggedExclude.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.FileSystemGlobbing.Abstractions; diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PatternContexts/PatternContextRaggedInclude.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PatternContexts/PatternContextRaggedInclude.cs index 7d2647270bd3..6ed13a90b510 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PatternContexts/PatternContextRaggedInclude.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PatternContexts/PatternContextRaggedInclude.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.FileSystemGlobbing.Abstractions; diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PatternTestResult.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PatternTestResult.cs index d2c1aa9f63f8..d8e2bf8879c7 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PatternTestResult.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/PatternTestResult.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.FileSystemGlobbing.Internal { diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/Patterns/PatternBuilder.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/Patterns/PatternBuilder.cs index b8a03809e2db..f750c4142e01 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/Patterns/PatternBuilder.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Internal/Patterns/PatternBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -30,7 +29,7 @@ public IPattern Build(string pattern) { if (pattern == null) { - throw new ArgumentNullException("pattern"); + throw new ArgumentNullException(nameof(pattern)); } pattern = pattern.TrimStart(_slashes); @@ -43,17 +42,17 @@ public IPattern Build(string pattern) } var allSegments = new List(); - var isParentSegmentLegal = true; + bool isParentSegmentLegal = true; IList segmentsPatternStartsWith = null; IList> segmentsPatternContains = null; IList segmentsPatternEndsWith = null; - var endPattern = pattern.Length; + int endPattern = pattern.Length; for (int scanPattern = 0; scanPattern < endPattern;) { - var beginSegment = scanPattern; - var endSegment = NextIndex(pattern, _slashes, scanPattern, endPattern); + int beginSegment = scanPattern; + int endSegment = NextIndex(pattern, _slashes, scanPattern, endPattern); IPathSegment segment = null; @@ -105,7 +104,7 @@ public IPattern Build(string pattern) pattern[beginSegment + 2] == '.') { // recognize **. - // swallow the first *, add the recursive path segment and + // swallow the first *, add the recursive path segment and // the remaining part will be treat as wild card in next loop. segment = new RecursiveWildcardSegment(); endSegment = beginSegment; @@ -114,14 +113,14 @@ public IPattern Build(string pattern) if (segment == null) { - var beginsWith = string.Empty; + string beginsWith = string.Empty; var contains = new List(); - var endsWith = string.Empty; + string endsWith = string.Empty; for (int scanSegment = beginSegment; scanSegment < endSegment;) { - var beginLiteral = scanSegment; - var endLiteral = NextIndex(pattern, _star, scanSegment, endSegment); + int beginLiteral = scanSegment; + int endLiteral = NextIndex(pattern, _star, scanSegment, endSegment); if (beginLiteral == beginSegment) { @@ -212,7 +211,7 @@ public IPattern Build(string pattern) private static int NextIndex(string pattern, char[] anyOf, int beginIndex, int endIndex) { - var index = pattern.IndexOfAny(anyOf, beginIndex, endIndex - beginIndex); + int index = pattern.IndexOfAny(anyOf, beginIndex, endIndex - beginIndex); return index == -1 ? endIndex : index; } @@ -270,4 +269,4 @@ public IPatternContext CreatePatternContextForExclude() } } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Matcher.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Matcher.cs index a36a2bf77180..f6ef47bb061b 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Matcher.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Matcher.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -167,4 +166,4 @@ public virtual PatternMatchingResult Execute(DirectoryInfoBase directoryInfo) return context.Execute(); } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/MatcherExtensions.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/MatcherExtensions.cs index 3d6c51179304..d6c68347c3be 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/MatcherExtensions.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/MatcherExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -19,9 +18,9 @@ public static class MatcherExtensions /// A list of globbing patterns public static void AddExcludePatterns(this Matcher matcher, params IEnumerable[] excludePatternsGroups) { - foreach (var group in excludePatternsGroups) + foreach (IEnumerable group in excludePatternsGroups) { - foreach (var pattern in group) + foreach (string pattern in group) { matcher.AddExclude(pattern); } @@ -35,9 +34,9 @@ public static void AddExcludePatterns(this Matcher matcher, params IEnumerableA list of globbing patterns public static void AddIncludePatterns(this Matcher matcher, params IEnumerable[] includePatternsGroups) { - foreach (var group in includePatternsGroups) + foreach (IEnumerable group in includePatternsGroups) { - foreach (var pattern in group) + foreach (string pattern in group) { matcher.AddInclude(pattern); } @@ -52,8 +51,8 @@ public static void AddIncludePatterns(this Matcher matcher, params IEnumerableAbsolute file paths of all files matched. Empty enumerable if no files matched given patterns. public static IEnumerable GetResultsInFullPath(this Matcher matcher, string directoryPath) { - var matches = matcher.Execute(new DirectoryInfoWrapper(new DirectoryInfo(directoryPath))).Files; - var result = matches.Select(match => Path.GetFullPath(Path.Combine(directoryPath, match.Path))).ToArray(); + IEnumerable matches = matcher.Execute(new DirectoryInfoWrapper(new DirectoryInfo(directoryPath))).Files; + string[] result = matches.Select(match => Path.GetFullPath(Path.Combine(directoryPath, match.Path))).ToArray(); return result; } @@ -109,4 +108,4 @@ public static PatternMatchingResult Match(this Matcher matcher, string rootDir, return matcher.Execute(new InMemoryDirectoryInfo(rootDir, files)); } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Microsoft.Extensions.FileSystemGlobbing.csproj b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Microsoft.Extensions.FileSystemGlobbing.csproj index 8fef4c6ac7af..4bb4e62e3d33 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Microsoft.Extensions.FileSystemGlobbing.csproj +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Microsoft.Extensions.FileSystemGlobbing.csproj @@ -2,7 +2,6 @@ netstandard2.0 - $(NoWarn);CS1591 true diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/PatternMatchingResult.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/PatternMatchingResult.cs index c9a3126c49ef..4642e8aa45f1 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/PatternMatchingResult.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/PatternMatchingResult.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Linq; @@ -43,4 +42,4 @@ public PatternMatchingResult(IEnumerable files, bool hasMatche /// public bool HasMatches { get; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Properties/InternalsVisibleTo.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Properties/InternalsVisibleTo.cs index 903fc7c6e32e..f34050f17490 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Properties/InternalsVisibleTo.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Properties/InternalsVisibleTo.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("Microsoft.Extensions.FileSystemGlobbing.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.Extensions.FileSystemGlobbing.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Util/StringComparisonHelper.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Util/StringComparisonHelper.cs index a748ad283c31..2297aeffd461 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Util/StringComparisonHelper.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Util/StringComparisonHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/FileAbstractionsTests.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/FileAbstractionsTests.cs index 3aead4c53b6c..3b64e7d41b48 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/FileAbstractionsTests.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/FileAbstractionsTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; using System.Linq; @@ -98,4 +97,4 @@ public void GetDirectoryCanTakeDotDot() } } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/FunctionalTests.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/FunctionalTests.cs index 0a9a7b526750..fb919aaa943e 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/FunctionalTests.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/FunctionalTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/PatternContexts/PatternContextLinearTests.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/PatternContexts/PatternContextLinearTests.cs index 7da66dd06307..1d67c8217753 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/PatternContexts/PatternContextLinearTests.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/PatternContexts/PatternContextLinearTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -166,4 +165,4 @@ public FakeFileInfo(string name) public override DirectoryInfoBase ParentDirectory { get { throw new NotImplementedException(); } } } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/PatternContexts/PatternContextRaggedTests.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/PatternContexts/PatternContextRaggedTests.cs index 1cd2c941d795..7909d3bf8527 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/PatternContexts/PatternContextRaggedTests.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/PatternContexts/PatternContextRaggedTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.FileSystemGlobbing.Internal; diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/PatternMatchingTests.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/PatternMatchingTests.cs index d17805a8f50b..7b2929316ef6 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/PatternMatchingTests.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/PatternMatchingTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Linq; using Microsoft.Extensions.FileSystemGlobbing.Tests.TestUtility; diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/PatternSegments/CurrentPathSegmentTests.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/PatternSegments/CurrentPathSegmentTests.cs index 1a259e8bfe3f..c01416171275 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/PatternSegments/CurrentPathSegmentTests.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/PatternSegments/CurrentPathSegmentTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.FileSystemGlobbing.Internal.PathSegments; using Xunit; @@ -19,4 +18,4 @@ public void Match(string testSample) Assert.False(pathSegment.Match(testSample)); } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/PatternSegments/LiteralPathSegmentTests.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/PatternSegments/LiteralPathSegmentTests.cs index d26f0245180d..865e618dce77 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/PatternSegments/LiteralPathSegmentTests.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/PatternSegments/LiteralPathSegmentTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.FileSystemGlobbing.Internal.PathSegments; @@ -40,4 +39,4 @@ public void Match(string initialValue, string testSample, StringComparison compa Assert.Equal(expectation, pathSegment.Match(testSample)); } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/PatternSegments/ParentPathSegmentTests.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/PatternSegments/ParentPathSegmentTests.cs index c91f130716ad..4b3063949feb 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/PatternSegments/ParentPathSegmentTests.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/PatternSegments/ParentPathSegmentTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.FileSystemGlobbing.Internal.PathSegments; using Xunit; @@ -19,4 +18,4 @@ public void Match(string testSample, bool expectation) Assert.Equal(expectation, pathSegment.Match(testSample)); } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/PatternSegments/RecursiveWildcardSegmentTests.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/PatternSegments/RecursiveWildcardSegmentTests.cs index 152838ab0a75..245df32138ac 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/PatternSegments/RecursiveWildcardSegmentTests.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/PatternSegments/RecursiveWildcardSegmentTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.FileSystemGlobbing.Internal.PathSegments; using Xunit; @@ -16,4 +15,4 @@ public void Match() Assert.False(pathSegment.Match("Anything")); } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/PatternSegments/WildcardPathSegmentTests.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/PatternSegments/WildcardPathSegmentTests.cs index e60a6c283623..44e08fb2b904 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/PatternSegments/WildcardPathSegmentTests.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/PatternSegments/WildcardPathSegmentTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/Patterns/PatternTests.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/Patterns/PatternTests.cs index 7d3acb053c04..450030c0c458 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/Patterns/PatternTests.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/Patterns/PatternTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.FileSystemGlobbing.Internal; @@ -137,4 +136,4 @@ public void ThrowExceptionForNull() }); } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/DisposableFileSystem.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/DisposableFileSystem.cs index 0c8c840ead26..86baaa0b14a6 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/DisposableFileSystem.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/DisposableFileSystem.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; @@ -59,4 +58,4 @@ public void Dispose() } } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/FileSystemGlobbingTestContext.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/FileSystemGlobbingTestContext.cs index bcea2399b2c2..842c3af6c448 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/FileSystemGlobbingTestContext.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/FileSystemGlobbingTestContext.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Linq; using Xunit; diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/FileSystemOperationRecorder.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/FileSystemOperationRecorder.cs index 04c08e10ef45..c3c7781d5c77 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/FileSystemOperationRecorder.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/FileSystemOperationRecorder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Reflection; diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/MockDirectoryInfo.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/MockDirectoryInfo.cs index b822c87240a0..039e236bf89e 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/MockDirectoryInfo.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/MockDirectoryInfo.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/MockFileInfoStub.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/MockFileInfoStub.cs index b5bd9c9282c0..5e4e3e12b89a 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/MockFileInfoStub.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/MockFileInfoStub.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.FileSystemGlobbing.Abstractions; @@ -27,4 +26,4 @@ public MockFileInfo( public override string Name { get; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/MockLinearPatternBuilder.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/MockLinearPatternBuilder.cs index fb894967b9fd..aed777862fe8 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/MockLinearPatternBuilder.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/MockLinearPatternBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -62,4 +61,4 @@ public IPatternContext CreatePatternContextForInclude() } } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/MockNonRecursivePathSegment.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/MockNonRecursivePathSegment.cs index 2dc140d2efca..bbc50d80f9ae 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/MockNonRecursivePathSegment.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/MockNonRecursivePathSegment.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.FileSystemGlobbing.Internal; @@ -30,4 +29,4 @@ public bool Match(string value) return string.Compare(Value, value, _comparisonType) == 0; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/MockRaggedPatternBuilder.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/MockRaggedPatternBuilder.cs index c09ad0c1ad2a..cadd7132d74e 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/MockRaggedPatternBuilder.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/MockRaggedPatternBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -102,4 +101,4 @@ public IPatternContext CreatePatternContextForInclude() } } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/MockRecursivePathSegment.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/MockRecursivePathSegment.cs index 9a70d9507a64..a2db896ac827 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/MockRecursivePathSegment.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/MockRecursivePathSegment.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.FileSystemGlobbing.Internal; @@ -16,4 +15,4 @@ public bool Match(string value) return false; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/PatternContextHelper.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/PatternContextHelper.cs index 4e6d6ad79fc1..8aadcbbae93b 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/PatternContextHelper.cs +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/PatternContextHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.FileSystemGlobbing.Internal; @@ -17,4 +16,4 @@ public static void PushDirectory(IPatternContext context, params string[] direct } } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.HostFactoryResolver/src/HostFactoryResolver.cs b/src/libraries/Microsoft.Extensions.HostFactoryResolver/src/HostFactoryResolver.cs index 71829d4dd4b2..f70dc1a72b14 100644 --- a/src/libraries/Microsoft.Extensions.HostFactoryResolver/src/HostFactoryResolver.cs +++ b/src/libraries/Microsoft.Extensions.HostFactoryResolver/src/HostFactoryResolver.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Reflection; diff --git a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/BuildWebHostInvalidSignature/Program.cs b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/BuildWebHostInvalidSignature/Program.cs index 2de3ff84f1af..770260155b7c 100644 --- a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/BuildWebHostInvalidSignature/Program.cs +++ b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/BuildWebHostInvalidSignature/Program.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using MockHostTypes; diff --git a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/BuildWebHostPatternTestSite/Program.cs b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/BuildWebHostPatternTestSite/Program.cs index 0263907c00a2..7c252194c7ee 100644 --- a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/BuildWebHostPatternTestSite/Program.cs +++ b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/BuildWebHostPatternTestSite/Program.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using MockHostTypes; diff --git a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/CreateHostBuilderInvalidSignature/Program.cs b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/CreateHostBuilderInvalidSignature/Program.cs index ec374f92b668..b1b233eb95d5 100644 --- a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/CreateHostBuilderInvalidSignature/Program.cs +++ b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/CreateHostBuilderInvalidSignature/Program.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using MockHostTypes; diff --git a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/CreateHostBuilderPatternTestSite/Program.cs b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/CreateHostBuilderPatternTestSite/Program.cs index 283881513482..515615731fa0 100644 --- a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/CreateHostBuilderPatternTestSite/Program.cs +++ b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/CreateHostBuilderPatternTestSite/Program.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using MockHostTypes; diff --git a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/CreateWebHostBuilderInvalidSignature/Program.cs b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/CreateWebHostBuilderInvalidSignature/Program.cs index 7e5aadcbb1ce..6f068f319de0 100644 --- a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/CreateWebHostBuilderInvalidSignature/Program.cs +++ b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/CreateWebHostBuilderInvalidSignature/Program.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using MockHostTypes; diff --git a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/CreateWebHostBuilderPatternTestSite/Program.cs b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/CreateWebHostBuilderPatternTestSite/Program.cs index 000f58d442ec..cf379acb01a9 100644 --- a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/CreateWebHostBuilderPatternTestSite/Program.cs +++ b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/CreateWebHostBuilderPatternTestSite/Program.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using MockHostTypes; diff --git a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/HostFactoryResolverTests.cs b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/HostFactoryResolverTests.cs index add47ced07bc..90b1de1bb80f 100644 --- a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/HostFactoryResolverTests.cs +++ b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/HostFactoryResolverTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using MockHostTypes; using System; diff --git a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/Host.cs b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/Host.cs index 145f2ddc6a74..31e4aa91efb7 100644 --- a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/Host.cs +++ b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/Host.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/HostBuilder.cs b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/HostBuilder.cs index 91e914167cde..92b7f9b290fb 100644 --- a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/HostBuilder.cs +++ b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/HostBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace MockHostTypes { diff --git a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/IHost.cs b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/IHost.cs index ee7892a917cb..410e44c2dc28 100644 --- a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/IHost.cs +++ b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/IHost.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/IHostBuilder.cs b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/IHostBuilder.cs index 98cfd67da1fd..ef73665296d7 100644 --- a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/IHostBuilder.cs +++ b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/IHostBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace MockHostTypes { diff --git a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/IWebHost.cs b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/IWebHost.cs index bede6764de83..80b786590bea 100644 --- a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/IWebHost.cs +++ b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/IWebHost.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/IWebHostBuilder.cs b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/IWebHostBuilder.cs index 27e5b6ff4a4d..bea77802bd62 100644 --- a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/IWebHostBuilder.cs +++ b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/IWebHostBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace MockHostTypes { diff --git a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/ServiceProvider.cs b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/ServiceProvider.cs index b70ab7c6a537..db738932f863 100644 --- a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/ServiceProvider.cs +++ b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/ServiceProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/WebHost.cs b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/WebHost.cs index e16fa2a00401..5c7c62815020 100644 --- a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/WebHost.cs +++ b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/WebHost.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/WebHostBuilder.cs b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/WebHostBuilder.cs index b8a78aac6975..fc428e4e989a 100644 --- a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/WebHostBuilder.cs +++ b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/MockHostTypes/WebHostBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace MockHostTypes { diff --git a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/ref/Microsoft.Extensions.Hosting.Abstractions.cs b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/ref/Microsoft.Extensions.Hosting.Abstractions.cs index 0f26a6bf6de0..2d573c554e98 100644 --- a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/ref/Microsoft.Extensions.Hosting.Abstractions.cs +++ b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/ref/Microsoft.Extensions.Hosting.Abstractions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ------------------------------------------------------------------------------ // Changes to this file must follow the https://aka.ms/api-review process. // ------------------------------------------------------------------------------ diff --git a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/ref/Microsoft.Extensions.Hosting.Abstractions.csproj b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/ref/Microsoft.Extensions.Hosting.Abstractions.csproj index 3220cd20db6e..cd10bfb2b381 100644 --- a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/ref/Microsoft.Extensions.Hosting.Abstractions.csproj +++ b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/ref/Microsoft.Extensions.Hosting.Abstractions.csproj @@ -1,6 +1,7 @@ netstandard2.0;netstandard2.1 + $(NoWarn);CS0618 diff --git a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/BackgroundService.cs b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/BackgroundService.cs index f1d9b32fa0bf..9dc19d2ce737 100644 --- a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/BackgroundService.cs +++ b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/BackgroundService.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Threading; @@ -66,7 +65,7 @@ public virtual async Task StopAsync(CancellationToken cancellationToken) finally { // Wait until the task completes or the stop token triggers - await Task.WhenAny(_executingTask, Task.Delay(Timeout.Infinite, cancellationToken)); + await Task.WhenAny(_executingTask, Task.Delay(Timeout.Infinite, cancellationToken)).ConfigureAwait(false); } } diff --git a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/EnvironmentName.cs b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/EnvironmentName.cs index 105c10a8b8d4..5dc6f52f4ab6 100644 --- a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/EnvironmentName.cs +++ b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/EnvironmentName.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.Hosting { diff --git a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/Environments.cs b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/Environments.cs index 71c44e9c35e3..93b762e12c9a 100644 --- a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/Environments.cs +++ b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/Environments.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.Hosting { diff --git a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/HostBuilderContext.cs b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/HostBuilderContext.cs index 3d77e0b2521f..4caa38a5dc1e 100644 --- a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/HostBuilderContext.cs +++ b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/HostBuilderContext.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using Microsoft.Extensions.Configuration; @@ -26,7 +25,7 @@ public HostBuilderContext(IDictionary properties) /// The containing the merged configuration of the application and the . /// public IConfiguration Configuration { get; set; } - + /// /// A central location for sharing state between components during the host building process. /// diff --git a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/HostDefaults.cs b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/HostDefaults.cs index 3a4e1847bd24..98935a92347e 100644 --- a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/HostDefaults.cs +++ b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/HostDefaults.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.Hosting { diff --git a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/HostEnvironmentEnvExtensions.cs b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/HostEnvironmentEnvExtensions.cs index 5958f78fb650..f51299ad1541 100644 --- a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/HostEnvironmentEnvExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/HostEnvironmentEnvExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/HostingAbstractionsHostBuilderExtensions.cs b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/HostingAbstractionsHostBuilderExtensions.cs index b830013c5ee9..5e7f334993e7 100644 --- a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/HostingAbstractionsHostBuilderExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/HostingAbstractionsHostBuilderExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Threading; using System.Threading.Tasks; @@ -27,8 +26,8 @@ public static IHost Start(this IHostBuilder hostBuilder) /// The started . public static async Task StartAsync(this IHostBuilder hostBuilder, CancellationToken cancellationToken = default) { - var host = hostBuilder.Build(); - await host.StartAsync(cancellationToken); + IHost host = hostBuilder.Build(); + await host.StartAsync(cancellationToken).ConfigureAwait(false); return host; } } diff --git a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/HostingAbstractionsHostExtensions.cs b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/HostingAbstractionsHostExtensions.cs index 8128daf1e07b..ac0368b913c0 100644 --- a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/HostingAbstractionsHostExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/HostingAbstractionsHostExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Threading; @@ -60,15 +59,15 @@ public static async Task RunAsync(this IHost host, CancellationToken token = def { try { - await host.StartAsync(token); + await host.StartAsync(token).ConfigureAwait(false); - await host.WaitForShutdownAsync(token); + await host.WaitForShutdownAsync(token).ConfigureAwait(false); } finally { if (host is IAsyncDisposable asyncDisposable) { - await asyncDisposable.DisposeAsync(); + await asyncDisposable.DisposeAsync().ConfigureAwait(false); } else { @@ -86,7 +85,7 @@ public static async Task RunAsync(this IHost host, CancellationToken token = def /// The that represents the asynchronous operation. public static async Task WaitForShutdownAsync(this IHost host, CancellationToken token = default) { - var applicationLifetime = host.Services.GetService(); + IHostApplicationLifetime applicationLifetime = host.Services.GetService(); token.Register(state => { @@ -101,10 +100,10 @@ public static async Task WaitForShutdownAsync(this IHost host, CancellationToken tcs.TrySetResult(null); }, waitForStop); - await waitForStop.Task; + await waitForStop.Task.ConfigureAwait(false); // Host will use its default ShutdownTimeout if none is specified. - await host.StopAsync(); + await host.StopAsync().ConfigureAwait(false); } } } diff --git a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/HostingEnvironmentExtensions.cs b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/HostingEnvironmentExtensions.cs index d727d0518377..e34f2b140ef3 100644 --- a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/HostingEnvironmentExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/HostingEnvironmentExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IApplicationLifetime.cs b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IApplicationLifetime.cs index b24339493a54..b324bbd36eba 100644 --- a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IApplicationLifetime.cs +++ b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IApplicationLifetime.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Threading; diff --git a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IHost.cs b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IHost.cs index 1d01b554bd42..b0f2d86546d8 100644 --- a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IHost.cs +++ b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IHost.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Threading; diff --git a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IHostApplicationLifetime.cs b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IHostApplicationLifetime.cs index e76d57ffd949..0df79989ca49 100644 --- a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IHostApplicationLifetime.cs +++ b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IHostApplicationLifetime.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Threading; diff --git a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IHostBuilder.cs b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IHostBuilder.cs index 491d8f9e89f0..09bb738f4676 100644 --- a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IHostBuilder.cs +++ b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IHostBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IHostEnvironment.cs b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IHostEnvironment.cs index 06d2f1f8e863..9d9936d73780 100644 --- a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IHostEnvironment.cs +++ b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IHostEnvironment.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.FileProviders; diff --git a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IHostLifetime.cs b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IHostLifetime.cs index 13dd1067f964..5820904fc095 100644 --- a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IHostLifetime.cs +++ b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IHostLifetime.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Threading; using System.Threading.Tasks; diff --git a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IHostedService.cs b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IHostedService.cs index cffb2aacfbdf..97a947b72513 100644 --- a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IHostedService.cs +++ b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IHostedService.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Threading; using System.Threading.Tasks; diff --git a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IHostingEnvironment.cs b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IHostingEnvironment.cs index ab5f152d9700..ab45f1fc702d 100644 --- a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IHostingEnvironment.cs +++ b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IHostingEnvironment.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.FileProviders; diff --git a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/Microsoft.Extensions.Hosting.Abstractions.csproj b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/Microsoft.Extensions.Hosting.Abstractions.csproj index 2194698876f8..04ca6e349f2e 100644 --- a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/Microsoft.Extensions.Hosting.Abstractions.csproj +++ b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/Microsoft.Extensions.Hosting.Abstractions.csproj @@ -2,7 +2,6 @@ $(NetCoreAppCurrent);netstandard2.0 - $(NoWarn);CS1591 Microsoft.Extensions.Hosting true diff --git a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/ServiceCollectionHostedServiceExtensions.cs b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/ServiceCollectionHostedServiceExtensions.cs index d74580ac4c70..f1c39b352794 100644 --- a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/ServiceCollectionHostedServiceExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/ServiceCollectionHostedServiceExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.DependencyInjection.Extensions; diff --git a/src/libraries/Microsoft.Extensions.Hosting/ref/Microsoft.Extensions.Hosting.cs b/src/libraries/Microsoft.Extensions.Hosting/ref/Microsoft.Extensions.Hosting.cs index b91b323fd3ac..5921645e3aca 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/ref/Microsoft.Extensions.Hosting.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/ref/Microsoft.Extensions.Hosting.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ------------------------------------------------------------------------------ // Changes to this file must follow the https://aka.ms/api-review process. // ------------------------------------------------------------------------------ diff --git a/src/libraries/Microsoft.Extensions.Hosting/ref/Microsoft.Extensions.Hosting.csproj b/src/libraries/Microsoft.Extensions.Hosting/ref/Microsoft.Extensions.Hosting.csproj index b6d0d8eeabe2..8f69092efa8b 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/ref/Microsoft.Extensions.Hosting.csproj +++ b/src/libraries/Microsoft.Extensions.Hosting/ref/Microsoft.Extensions.Hosting.csproj @@ -1,6 +1,7 @@ netstandard2.0 + $(NoWarn);CS0618 diff --git a/src/libraries/Microsoft.Extensions.Hosting/src/ConsoleLifetimeOptions.cs b/src/libraries/Microsoft.Extensions.Hosting/src/ConsoleLifetimeOptions.cs index c0fb739cd6c5..0475bb8c93b7 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/src/ConsoleLifetimeOptions.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/src/ConsoleLifetimeOptions.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.Hosting { diff --git a/src/libraries/Microsoft.Extensions.Hosting/src/Host.cs b/src/libraries/Microsoft.Extensions.Hosting/src/Host.cs index f8d67e56d982..f1d095ab0c7e 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/src/Host.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/src/Host.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; using System.Reflection; @@ -70,9 +69,9 @@ public static IHostBuilder CreateDefaultBuilder(string[] args) builder.ConfigureAppConfiguration((hostingContext, config) => { - var env = hostingContext.HostingEnvironment; - - var reloadOnChange = hostingContext.Configuration.GetValue("hostBuilder:reloadConfigOnChange", defaultValue: true); + IHostEnvironment env = hostingContext.HostingEnvironment; + + bool reloadOnChange = hostingContext.Configuration.GetValue("hostBuilder:reloadConfigOnChange", defaultValue: true); config.AddJsonFile("appsettings.json", optional: true, reloadOnChange: reloadOnChange) .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true, reloadOnChange: reloadOnChange); @@ -95,7 +94,7 @@ public static IHostBuilder CreateDefaultBuilder(string[] args) }) .ConfigureLogging((hostingContext, logging) => { - var isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows); + bool isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows); // IMPORTANT: This needs to be added *before* configuration is loaded, this lets // the defaults be overridden by the configuration. @@ -115,10 +114,18 @@ public static IHostBuilder CreateDefaultBuilder(string[] args) // Add the EventLogLoggerProvider on windows machines logging.AddEventLog(); } + + logging.Configure(options => + { + options.ActivityTrackingOptions = ActivityTrackingOptions.SpanId + | ActivityTrackingOptions.TraceId + | ActivityTrackingOptions.ParentId; + }); + }) .UseDefaultServiceProvider((context, options) => { - var isDevelopment = context.HostingEnvironment.IsDevelopment(); + bool isDevelopment = context.HostingEnvironment.IsDevelopment(); options.ValidateScopes = isDevelopment; options.ValidateOnBuild = isDevelopment; }); diff --git a/src/libraries/Microsoft.Extensions.Hosting/src/HostBuilder.cs b/src/libraries/Microsoft.Extensions.Hosting/src/HostBuilder.cs index bf49a270e2d1..a36a69858e4c 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/src/HostBuilder.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/src/HostBuilder.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -136,10 +135,10 @@ public IHost Build() private void BuildHostConfiguration() { - var configBuilder = new ConfigurationBuilder() + IConfigurationBuilder configBuilder = new ConfigurationBuilder() .AddInMemoryCollection(); // Make sure there's some default storage since there are no default providers - foreach (var buildAction in _configureHostConfigActions) + foreach (Action buildAction in _configureHostConfigActions) { buildAction(configBuilder); } @@ -188,11 +187,11 @@ private void CreateHostBuilderContext() private void BuildAppConfiguration() { - var configBuilder = new ConfigurationBuilder() + IConfigurationBuilder configBuilder = new ConfigurationBuilder() .SetBasePath(_hostingEnvironment.ContentRootPath) .AddConfiguration(_hostConfiguration, shouldDisposeConfiguration: true); - foreach (var buildAction in _configureAppConfigActions) + foreach (Action buildAction in _configureAppConfigActions) { buildAction(_hostBuilderContext, configBuilder); } @@ -219,14 +218,14 @@ private void CreateServiceProvider() services.AddOptions(); services.AddLogging(); - foreach (var configureServicesAction in _configureServicesActions) + foreach (Action configureServicesAction in _configureServicesActions) { configureServicesAction(_hostBuilderContext, services); } - var containerBuilder = _serviceProviderFactory.CreateBuilder(services); + object containerBuilder = _serviceProviderFactory.CreateBuilder(services); - foreach (var containerAction in _configureContainerActions) + foreach (IConfigureContainerAdapter containerAction in _configureContainerActions) { containerAction.ConfigureContainer(_hostBuilderContext, containerBuilder); } diff --git a/src/libraries/Microsoft.Extensions.Hosting/src/HostOptions.cs b/src/libraries/Microsoft.Extensions.Hosting/src/HostOptions.cs index fc3874d0d63a..a83e132ea39a 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/src/HostOptions.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/src/HostOptions.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -16,4 +15,4 @@ public class HostOptions /// public TimeSpan ShutdownTimeout { get; set; } = TimeSpan.FromSeconds(5); } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Hosting/src/HostingHostBuilderExtensions.cs b/src/libraries/Microsoft.Extensions.Hosting/src/HostingHostBuilderExtensions.cs index ddfb1feeb450..ca7e84abff8a 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/src/HostingHostBuilderExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/src/HostingHostBuilderExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.Hosting/src/Internal/ApplicationLifetime.cs b/src/libraries/Microsoft.Extensions.Hosting/src/Internal/ApplicationLifetime.cs index 7cb5f1122351..2f527097be4a 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/src/Internal/ApplicationLifetime.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/src/Internal/ApplicationLifetime.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Threading; @@ -49,8 +48,8 @@ public ApplicationLifetime(ILogger logger) /// public void StopApplication() { - // Lock on CTS to synchronize multiple calls to StopApplication. This guarantees that the first call - // to StopApplication and its callbacks run to completion before subsequent calls to StopApplication, + // Lock on CTS to synchronize multiple calls to StopApplication. This guarantees that the first call + // to StopApplication and its callbacks run to completion before subsequent calls to StopApplication, // which will no-op since the first call already requested cancellation, get a chance to execute. lock (_stoppingSource) { diff --git a/src/libraries/Microsoft.Extensions.Hosting/src/Internal/ConfigureContainerAdapter.cs b/src/libraries/Microsoft.Extensions.Hosting/src/Internal/ConfigureContainerAdapter.cs index f920e0e54b1b..ae974a0538f3 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/src/Internal/ConfigureContainerAdapter.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/src/Internal/ConfigureContainerAdapter.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -20,4 +19,4 @@ public void ConfigureContainer(HostBuilderContext hostContext, object containerB _action(hostContext, (TContainerBuilder)containerBuilder); } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Hosting/src/Internal/ConsoleLifetime.cs b/src/libraries/Microsoft.Extensions.Hosting/src/Internal/ConsoleLifetime.cs index c77ef17074b7..1e616588bbbc 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/src/Internal/ConsoleLifetime.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/src/Internal/ConsoleLifetime.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Threading; @@ -80,7 +79,7 @@ private void OnApplicationStopping() private void OnProcessExit(object sender, EventArgs e) { ApplicationLifetime.StopApplication(); - if(!_shutdownBlock.WaitOne(HostOptions.ShutdownTimeout)) + if (!_shutdownBlock.WaitOne(HostOptions.ShutdownTimeout)) { Logger.LogInformation("Waiting for the host to be disposed. Ensure all 'IHost' instances are wrapped in 'using' blocks."); } diff --git a/src/libraries/Microsoft.Extensions.Hosting/src/Internal/Host.cs b/src/libraries/Microsoft.Extensions.Hosting/src/Internal/Host.cs index fe50833d4d93..026727948c0c 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/src/Internal/Host.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/src/Internal/Host.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -42,14 +41,14 @@ public async Task StartAsync(CancellationToken cancellationToken = default) _logger.Starting(); using var combinedCancellationTokenSource = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, _applicationLifetime.ApplicationStopping); - var combinedCancellationToken = combinedCancellationTokenSource.Token; + CancellationToken combinedCancellationToken = combinedCancellationTokenSource.Token; - await _hostLifetime.WaitForStartAsync(combinedCancellationToken); + await _hostLifetime.WaitForStartAsync(combinedCancellationToken).ConfigureAwait(false); combinedCancellationToken.ThrowIfCancellationRequested(); _hostedServices = Services.GetService>(); - foreach (var hostedService in _hostedServices) + foreach (IHostedService hostedService in _hostedServices) { // Fire IHostedService.Start await hostedService.StartAsync(combinedCancellationToken).ConfigureAwait(false); @@ -68,14 +67,14 @@ public async Task StopAsync(CancellationToken cancellationToken = default) using (var cts = new CancellationTokenSource(_options.ShutdownTimeout)) using (var linkedCts = CancellationTokenSource.CreateLinkedTokenSource(cts.Token, cancellationToken)) { - var token = linkedCts.Token; + CancellationToken token = linkedCts.Token; // Trigger IHostApplicationLifetime.ApplicationStopping _applicationLifetime.StopApplication(); IList exceptions = new List(); if (_hostedServices != null) // Started? { - foreach (var hostedService in _hostedServices.Reverse()) + foreach (IHostedService hostedService in _hostedServices.Reverse()) { token.ThrowIfCancellationRequested(); try @@ -90,7 +89,7 @@ public async Task StopAsync(CancellationToken cancellationToken = default) } token.ThrowIfCancellationRequested(); - await _hostLifetime.StopAsync(token); + await _hostLifetime.StopAsync(token).ConfigureAwait(false); // Fire IHostApplicationLifetime.Stopped _applicationLifetime.NotifyStopped(); @@ -113,7 +112,7 @@ public async ValueTask DisposeAsync() switch (Services) { case IAsyncDisposable asyncDisposable: - await asyncDisposable.DisposeAsync(); + await asyncDisposable.DisposeAsync().ConfigureAwait(false); break; case IDisposable disposable: disposable.Dispose(); diff --git a/src/libraries/Microsoft.Extensions.Hosting/src/Internal/HostingEnvironment.cs b/src/libraries/Microsoft.Extensions.Hosting/src/Internal/HostingEnvironment.cs index c075cf03a593..5e47c013f590 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/src/Internal/HostingEnvironment.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/src/Internal/HostingEnvironment.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.FileProviders; diff --git a/src/libraries/Microsoft.Extensions.Hosting/src/Internal/HostingLoggerExtensions.cs b/src/libraries/Microsoft.Extensions.Hosting/src/Internal/HostingLoggerExtensions.cs index 17fec42e266f..820e834276cb 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/src/Internal/HostingLoggerExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/src/Internal/HostingLoggerExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections; @@ -18,7 +17,7 @@ public static void ApplicationError(this ILogger logger, EventId eventId, string var reflectionTypeLoadException = exception as ReflectionTypeLoadException; if (reflectionTypeLoadException != null) { - foreach (var ex in reflectionTypeLoadException.LoaderExceptions) + foreach (Exception ex in reflectionTypeLoadException.LoaderExceptions) { message = message + Environment.NewLine + ex.Message; } diff --git a/src/libraries/Microsoft.Extensions.Hosting/src/Internal/IConfigureContainerAdapter.cs b/src/libraries/Microsoft.Extensions.Hosting/src/Internal/IConfigureContainerAdapter.cs index c3c5e99746b6..84488a10111d 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/src/Internal/IConfigureContainerAdapter.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/src/Internal/IConfigureContainerAdapter.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.Hosting.Internal { @@ -8,4 +7,4 @@ internal interface IConfigureContainerAdapter { void ConfigureContainer(HostBuilderContext hostContext, object containerBuilder); } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Hosting/src/Internal/IServiceFactoryAdapter.cs b/src/libraries/Microsoft.Extensions.Hosting/src/Internal/IServiceFactoryAdapter.cs index 3d7bec0d4d6b..3bab590e69a8 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/src/Internal/IServiceFactoryAdapter.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/src/Internal/IServiceFactoryAdapter.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.DependencyInjection; @@ -13,4 +12,4 @@ internal interface IServiceFactoryAdapter IServiceProvider CreateServiceProvider(object containerBuilder); } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Hosting/src/Internal/LoggerEventIds.cs b/src/libraries/Microsoft.Extensions.Hosting/src/Internal/LoggerEventIds.cs index 8107d7a7f2ae..64ac8caf3a0f 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/src/Internal/LoggerEventIds.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/src/Internal/LoggerEventIds.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.Logging; diff --git a/src/libraries/Microsoft.Extensions.Hosting/src/Internal/ServiceFactoryAdapter.cs b/src/libraries/Microsoft.Extensions.Hosting/src/Internal/ServiceFactoryAdapter.cs index e52d3db5aaf3..8759216daf23 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/src/Internal/ServiceFactoryAdapter.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/src/Internal/ServiceFactoryAdapter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.DependencyInjection; diff --git a/src/libraries/Microsoft.Extensions.Hosting/src/Microsoft.Extensions.Hosting.csproj b/src/libraries/Microsoft.Extensions.Hosting/src/Microsoft.Extensions.Hosting.csproj index 7dc68b6e5919..86257a71d216 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/src/Microsoft.Extensions.Hosting.csproj +++ b/src/libraries/Microsoft.Extensions.Hosting/src/Microsoft.Extensions.Hosting.csproj @@ -2,7 +2,6 @@ $(NetCoreAppCurrent);netstandard2.0;netstandard2.1 - $(NoWarn);CS1591 true diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/ApplicationPublisher.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/ApplicationPublisher.cs index 64c2387fe1e6..0e29d12a1c0e 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/ApplicationPublisher.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/ApplicationPublisher.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/ApplicationType.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/ApplicationType.cs index c9bb522d4a89..f11413cba1eb 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/ApplicationType.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/ApplicationType.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.Hosting.IntegrationTesting { diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/DeploymentParameters.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/DeploymentParameters.cs index 106c13f23179..ead11048e45e 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/DeploymentParameters.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/DeploymentParameters.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/DeploymentResult.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/DeploymentResult.cs index 9bcf45d433d8..5b7d13bf0376 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/DeploymentResult.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/DeploymentResult.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net.Http; diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/DotNetCommands.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/DotNetCommands.cs index 8afaceddf2f6..7282154c3349 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/DotNetCommands.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/DotNetCommands.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/ProcessLoggingExtensions.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/ProcessLoggingExtensions.cs index c4f5807fed71..27f3292cf2d5 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/ProcessLoggingExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/ProcessLoggingExtensions.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.Logging; diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/RetryHelper.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/RetryHelper.cs index 622e1450ff8d..7cb231763122 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/RetryHelper.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/RetryHelper.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net; diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/RuntimeArchitecture.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/RuntimeArchitecture.cs index 7cfcc48ba1ba..bca055e7bdf4 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/RuntimeArchitecture.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/RuntimeArchitecture.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.Hosting.IntegrationTesting { diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/RuntimeFlavor.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/RuntimeFlavor.cs index 998cfc51e706..9229e0cde714 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/RuntimeFlavor.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/RuntimeFlavor.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.Hosting.IntegrationTesting { diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/Tfm.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/Tfm.cs index fd74831782cd..90d1b7d9d74a 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/Tfm.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Common/Tfm.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Deployers/ApplicationDeployer.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Deployers/ApplicationDeployer.cs index b24741011bdc..99364b076f56 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Deployers/ApplicationDeployer.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Deployers/ApplicationDeployer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Deployers/SelfHostDeployer.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Deployers/SelfHostDeployer.cs index 19f9c63a23ba..b609679863a6 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Deployers/SelfHostDeployer.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/Deployers/SelfHostDeployer.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/ProcessExtensions.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/ProcessExtensions.cs index bdccff910a96..b718fc0b3ab4 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/ProcessExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/ProcessExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/ProcessHelpers.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/ProcessHelpers.cs index 65c21f9a415d..6631585c58a0 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/ProcessHelpers.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/ProcessHelpers.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics; @@ -34,4 +33,4 @@ public static void SetEnvironmentVariable(IDictionary environmen } } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/PublishedApplication.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/PublishedApplication.cs index a972e2cea7ef..b9d54d370fb9 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/PublishedApplication.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/PublishedApplication.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.IO; @@ -29,4 +28,4 @@ public void Dispose() retryDelayMilliseconds: 100); } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/TestVariant.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/TestVariant.cs index dc560b31735a..bb6a07357fbe 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/TestVariant.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/IntegrationTesting/src/TestVariant.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit.Abstractions; diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/Properties/AssemblyInfo.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/Properties/AssemblyInfo.cs index 155ec1cfc86e..cc0c22363d45 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/Properties/AssemblyInfo.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/Properties/AssemblyInfo.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Xunit; diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/ShutdownTests.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/ShutdownTests.cs index 4b530263de87..50dfdad150e9 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/ShutdownTests.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/FunctionalTests/ShutdownTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/TestApp/Program.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/TestApp/Program.cs index 17d2b71e8023..e9eb7dfc74ff 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/TestApp/Program.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/TestApp/Program.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.Hosting; diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/AssemblyInfo.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/AssemblyInfo.cs new file mode 100644 index 000000000000..3a74f33d7aa3 --- /dev/null +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/AssemblyInfo.cs @@ -0,0 +1,7 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using Xunit; + +[assembly: ActiveIssue("https://github.com/dotnet/runtime/issues/37669", TestPlatforms.Browser)] diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/BackgroundHostedServiceTests.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/BackgroundHostedServiceTests.cs index 172e5cdefe32..8ec98f9121ec 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/BackgroundHostedServiceTests.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/BackgroundHostedServiceTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/FakeHostLifetime.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/FakeHostLifetime.cs index e84574072b7f..ebe187a07be0 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/FakeHostLifetime.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/FakeHostLifetime.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Threading; diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/FakeHostedService.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/FakeHostedService.cs index d0bd5bc512e8..1298a3d1384b 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/FakeHostedService.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/FakeHostedService.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Threading; diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/FakeOptions.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/FakeOptions.cs index 1b1330ddf681..7a7236c30f83 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/FakeOptions.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/FakeOptions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.Hosting.Fakes { @@ -10,4 +9,4 @@ public class FakeOptions public string Environment { get; set; } public string Message { get; set; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/FakeService.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/FakeService.cs index a32b35c07030..b651bf8026b1 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/FakeService.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/FakeService.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -15,4 +14,4 @@ public void Dispose() Disposed = true; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/FakeServiceCollection.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/FakeServiceCollection.cs index 3053820d4b53..1467f4d049fc 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/FakeServiceCollection.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/FakeServiceCollection.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.DependencyInjection; diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/FakeServiceProviderFactory.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/FakeServiceProviderFactory.cs index 1e566ad0217e..38d371d9c817 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/FakeServiceProviderFactory.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/FakeServiceProviderFactory.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.DependencyInjection; diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/IFakeEveryService.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/IFakeEveryService.cs index ab1add2ec603..4a9b5212e1ab 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/IFakeEveryService.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/IFakeEveryService.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.Hosting.Fakes { diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/IFakeScopedService.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/IFakeScopedService.cs index 70b9f3a05e4e..f6a23a2c2add 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/IFakeScopedService.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/IFakeScopedService.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.Hosting.Fakes { diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/IFakeService.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/IFakeService.cs index 3200999e1f36..27560b8e5754 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/IFakeService.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/IFakeService.cs @@ -1,8 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.Hosting.Fakes { public interface IFakeService { } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/IFakeServiceInstance.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/IFakeServiceInstance.cs index 119b395f981a..9937964e0bc3 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/IFakeServiceInstance.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/IFakeServiceInstance.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.Hosting.Fakes { diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/IFakeSingletonService.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/IFakeSingletonService.cs index 8e1192b8c337..e841a8e28c46 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/IFakeSingletonService.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Fakes/IFakeSingletonService.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.Hosting.Fakes { diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/HostBuilderTests.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/HostBuilderTests.cs index 6209f2841537..07e9c021a57a 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/HostBuilderTests.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/HostBuilderTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/HostTests.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/HostTests.cs index 5d403428540b..8d9dfa0fe6b6 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/HostTests.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/HostTests.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Concurrent; using System.Collections.Generic; +using System.Diagnostics; using System.Diagnostics.Tracing; using System.IO; using System.Linq; @@ -60,6 +60,45 @@ public void CreateDefaultBuilder_RegistersEventSourceLogger() args.Payload.OfType().Any(p => p.Contains("Request starting"))); } + [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/34580", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] + public void CreateDefaultBuilder_EnablesActivityTracking() + { + var parentActivity = new Activity("ParentActivity"); + parentActivity.Start(); + var activity = new Activity("ChildActivity"); + activity.Start(); + var id = activity.Id; + var logger = new ScopeDelegateLogger((scopeObjectList) => + { + Assert.Equal(1, scopeObjectList.Count); + var activityDictionary = (scopeObjectList.FirstOrDefault() as IEnumerable>) + .ToDictionary(x => x.Key, x => x.Value); + switch (activity.IdFormat) + { + case ActivityIdFormat.Hierarchical: + Assert.Equal(activity.Id, activityDictionary["SpanId"]); + Assert.Equal(activity.RootId, activityDictionary["TraceId"]); + Assert.Equal(activity.ParentId, activityDictionary["ParentId"]); + break; + case ActivityIdFormat.W3C: + Assert.Equal(activity.SpanId.ToHexString(), activityDictionary["SpanId"]); + Assert.Equal(activity.TraceId.ToHexString(), activityDictionary["TraceId"]); + Assert.Equal(activity.ParentSpanId.ToHexString(), activityDictionary["ParentId"]); + break; + } + }); + var loggerProvider = new ScopeDelegateLoggerProvider(logger); + var host = Host.CreateDefaultBuilder() + .ConfigureLogging(logging => + { + logging.AddProvider(loggerProvider); + }) + .Build(); + + logger.LogInformation("Dummy log"); + } + [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/34580", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] public void CreateDefaultBuilder_EnablesScopeValidation() @@ -178,6 +217,65 @@ public ServiceB(ServiceC c) internal class ServiceC { } + private class ScopeDelegateLoggerProvider : ILoggerProvider, ISupportExternalScope + { + private ScopeDelegateLogger _logger; + private IExternalScopeProvider _scopeProvider; + public ScopeDelegateLoggerProvider(ScopeDelegateLogger logger) + { + _logger = logger; + } + public ILogger CreateLogger(string categoryName) + { + _logger.ScopeProvider = _scopeProvider; + return _logger; + } + + public void Dispose() + { + } + + public void SetScopeProvider(IExternalScopeProvider scopeProvider) + { + _scopeProvider = scopeProvider; + } + } + + private class ScopeDelegateLogger : ILogger + { + private Action> _logDelegate; + internal IExternalScopeProvider ScopeProvider { get; set; } + public ScopeDelegateLogger(Action> logDelegate) + { + _logDelegate = logDelegate; + } + public IDisposable BeginScope(TState state) + { + Scopes.Add(state); + return new Scope(); + } + + public List Scopes { get; set; } = new List(); + + public bool IsEnabled(LogLevel logLevel) => true; + + public void Log(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func formatter) + { + ScopeProvider.ForEachScope((scopeObject, state) => + { + Scopes.Add(scopeObject); + }, 0); + _logDelegate(Scopes); + } + + private class Scope : IDisposable + { + public void Dispose() + { + } + } + } + private class TestEventListener : EventListener { private volatile bool _disposed; diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Internal/HostTests.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Internal/HostTests.cs index 115282f091b2..092ac4fe8b2c 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Internal/HostTests.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Internal/HostTests.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.Http/ref/Microsoft.Extensions.Http.cs b/src/libraries/Microsoft.Extensions.Http/ref/Microsoft.Extensions.Http.cs index 3348637e8fd8..d7230602169a 100644 --- a/src/libraries/Microsoft.Extensions.Http/ref/Microsoft.Extensions.Http.cs +++ b/src/libraries/Microsoft.Extensions.Http/ref/Microsoft.Extensions.Http.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection { diff --git a/src/libraries/Microsoft.Extensions.Http/src/ActiveHandlerTrackingEntry.cs b/src/libraries/Microsoft.Extensions.Http/src/ActiveHandlerTrackingEntry.cs index 7ca2938efdf2..c99ee1f2250c 100644 --- a/src/libraries/Microsoft.Extensions.Http/src/ActiveHandlerTrackingEntry.cs +++ b/src/libraries/Microsoft.Extensions.Http/src/ActiveHandlerTrackingEntry.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; diff --git a/src/libraries/Microsoft.Extensions.Http/src/DefaultHttpClientFactory.cs b/src/libraries/Microsoft.Extensions.Http/src/DefaultHttpClientFactory.cs index 328793b13b64..d3ad266e2486 100644 --- a/src/libraries/Microsoft.Extensions.Http/src/DefaultHttpClientFactory.cs +++ b/src/libraries/Microsoft.Extensions.Http/src/DefaultHttpClientFactory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Concurrent; @@ -33,7 +32,7 @@ internal class DefaultHttpClientFactory : IHttpClientFactory, IHttpMessageHandle // This seems frequent enough. We also rely on GC occurring to actually trigger disposal. private readonly TimeSpan DefaultCleanupInterval = TimeSpan.FromSeconds(10); - // We use a new timer for each regular cleanup cycle, protected with a lock. Note that this scheme + // We use a new timer for each regular cleanup cycle, protected with a lock. Note that this scheme // doesn't give us anything to dispose, as the timer is started/stopped as needed. // // There's no need for the factory itself to be disposable. If you stop using it, eventually everything will @@ -44,7 +43,7 @@ internal class DefaultHttpClientFactory : IHttpClientFactory, IHttpMessageHandle // Collection of 'active' handlers. // - // Using lazy for synchronization to ensure that only one instance of HttpMessageHandler is created + // Using lazy for synchronization to ensure that only one instance of HttpMessageHandler is created // for each name. // // internal for tests @@ -122,11 +121,11 @@ public HttpClient CreateClient(string name) throw new ArgumentNullException(nameof(name)); } - var handler = CreateHandler(name); + HttpMessageHandler handler = CreateHandler(name); var client = new HttpClient(handler, disposeHandler: false); - var options = _optionsMonitor.Get(name); - for (var i = 0; i < options.HttpClientActions.Count; i++) + HttpClientFactoryOptions options = _optionsMonitor.Get(name); + for (int i = 0; i < options.HttpClientActions.Count; i++) { options.HttpClientActions[i](client); } @@ -141,7 +140,7 @@ public HttpMessageHandler CreateHandler(string name) throw new ArgumentNullException(nameof(name)); } - var entry = _activeHandlers.GetOrAdd(name, _entryFactory).Value; + ActiveHandlerTrackingEntry entry = _activeHandlers.GetOrAdd(name, _entryFactory).Value; StartHandlerEntryTimer(entry); @@ -151,10 +150,10 @@ public HttpMessageHandler CreateHandler(string name) // Internal for tests internal ActiveHandlerTrackingEntry CreateHandlerEntry(string name) { - var services = _services; + IServiceProvider services = _services; var scope = (IServiceScope)null; - var options = _optionsMonitor.Get(name); + HttpClientFactoryOptions options = _optionsMonitor.Get(name); if (!options.SuppressHandlerScope) { scope = _scopeFactory.CreateScope(); @@ -163,13 +162,13 @@ internal ActiveHandlerTrackingEntry CreateHandlerEntry(string name) try { - var builder = services.GetRequiredService(); + HttpMessageHandlerBuilder builder = services.GetRequiredService(); builder.Name = name; // This is similar to the initialization pattern in: // https://github.com/aspnet/Hosting/blob/e892ed8bbdcd25a0dafc1850033398dc57f65fe1/src/Microsoft.AspNetCore.Hosting/Internal/WebHost.cs#L188 Action configure = Configure; - for (var i = _filters.Length - 1; i >= 0; i--) + for (int i = _filters.Length - 1; i >= 0; i--) { configure = _filters[i].Configure(configure); } @@ -182,7 +181,7 @@ internal ActiveHandlerTrackingEntry CreateHandlerEntry(string name) // Note that we can't start the timer here. That would introduce a very very subtle race condition // with very short expiry times. We need to wait until we've actually handed out the handler once // to start the timer. - // + // // Otherwise it would be possible that we start the timer here, immediately expire it (very short // timer) and then dispose it without ever creating a client. That would be bad. It's unlikely // this would happen, but we want to be sure. @@ -190,7 +189,7 @@ internal ActiveHandlerTrackingEntry CreateHandlerEntry(string name) void Configure(HttpMessageHandlerBuilder b) { - for (var i = 0; i < options.HttpMessageHandlerBuilderActions.Count; i++) + for (int i = 0; i < options.HttpMessageHandlerBuilderActions.Count; i++) { options.HttpMessageHandlerBuilderActions[i](b); } @@ -211,7 +210,7 @@ internal void ExpiryTimer_Tick(object state) // The timer callback should be the only one removing from the active collection. If we can't find // our entry in the collection, then this is a bug. - var removed = _activeHandlers.TryRemove(active.Name, out var found); + bool removed = _activeHandlers.TryRemove(active.Name, out Lazy found); Debug.Assert(removed, "Entry not found. We should always be able to remove the entry"); Debug.Assert(object.ReferenceEquals(active, found.Value), "Different entry found. The entry should not have been replaced"); @@ -264,7 +263,7 @@ internal void CleanupTimer_Tick() // // With the scheme we're using it's possible we could end up with some redundant cleanup operations. // This is expected and fine. - // + // // An alternative would be to take a lock during the whole cleanup process. This isn't ideal because it // would result in threads executing ExpiryTimer_Tick as they would need to block on cleanup to figure out // whether we need to start the timer. @@ -284,16 +283,16 @@ internal void CleanupTimer_Tick() try { - var initialCount = _expiredHandlers.Count; + int initialCount = _expiredHandlers.Count; Log.CleanupCycleStart(_logger, initialCount); var stopwatch = ValueStopwatch.StartNew(); - var disposedCount = 0; - for (var i = 0; i < initialCount; i++) + int disposedCount = 0; + for (int i = 0; i < initialCount; i++) { // Since we're the only one removing from _expired, TryDequeue must always succeed. - _expiredHandlers.TryDequeue(out var entry); + _expiredHandlers.TryDequeue(out ExpiredHandlerTrackingEntry entry); Debug.Assert(entry != null, "Entry was null, we should always get an entry back from TryDequeue"); if (entry.CanDispose) @@ -311,7 +310,7 @@ internal void CleanupTimer_Tick() } else { - // If the entry is still live, put it back in the queue so we can process it + // If the entry is still live, put it back in the queue so we can process it // during the next cleanup cycle. _expiredHandlers.Enqueue(entry); } diff --git a/src/libraries/Microsoft.Extensions.Http/src/DefaultHttpMessageHandlerBuilder.cs b/src/libraries/Microsoft.Extensions.Http/src/DefaultHttpMessageHandlerBuilder.cs index fbe1a133ba57..c15bce2ba57b 100644 --- a/src/libraries/Microsoft.Extensions.Http/src/DefaultHttpMessageHandlerBuilder.cs +++ b/src/libraries/Microsoft.Extensions.Http/src/DefaultHttpMessageHandlerBuilder.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -41,10 +40,10 @@ public override HttpMessageHandler Build() { if (PrimaryHandler == null) { - var message = SR.Format(SR.HttpMessageHandlerBuilder_PrimaryHandlerIsNull, nameof(PrimaryHandler)); + string message = SR.Format(SR.HttpMessageHandlerBuilder_PrimaryHandlerIsNull, nameof(PrimaryHandler)); throw new InvalidOperationException(message); } - + return CreateHandlerPipeline(PrimaryHandler, AdditionalHandlers); } } diff --git a/src/libraries/Microsoft.Extensions.Http/src/DefaultTypedHttpClientFactory.cs b/src/libraries/Microsoft.Extensions.Http/src/DefaultTypedHttpClientFactory.cs index 7b73e5cc214e..b5d75b0d9ca4 100644 --- a/src/libraries/Microsoft.Extensions.Http/src/DefaultTypedHttpClientFactory.cs +++ b/src/libraries/Microsoft.Extensions.Http/src/DefaultTypedHttpClientFactory.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net.Http; @@ -45,16 +44,16 @@ public TClient CreateClient(HttpClient httpClient) // as a transient, so that it doesn't close over the application root service provider. public class Cache { - private readonly static Func _createActivator = () => ActivatorUtilities.CreateFactory(typeof(TClient), new Type[] { typeof(HttpClient), }); + private static readonly Func _createActivator = () => ActivatorUtilities.CreateFactory(typeof(TClient), new Type[] { typeof(HttpClient), }); private ObjectFactory _activator; private bool _initialized; private object _lock; public ObjectFactory Activator => LazyInitializer.EnsureInitialized( - ref _activator, - ref _initialized, - ref _lock, + ref _activator, + ref _initialized, + ref _lock, _createActivator); } } diff --git a/src/libraries/Microsoft.Extensions.Http/src/DependencyInjection/DefaultHttpClientBuilder.cs b/src/libraries/Microsoft.Extensions.Http/src/DependencyInjection/DefaultHttpClientBuilder.cs index a17faf315279..9fb05bf99b40 100644 --- a/src/libraries/Microsoft.Extensions.Http/src/DependencyInjection/DefaultHttpClientBuilder.cs +++ b/src/libraries/Microsoft.Extensions.Http/src/DependencyInjection/DefaultHttpClientBuilder.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.DependencyInjection { @@ -9,7 +8,7 @@ internal class DefaultHttpClientBuilder : IHttpClientBuilder public DefaultHttpClientBuilder(IServiceCollection services, string name) { Services = services; - Name = name; + Name = name; } public string Name { get; } diff --git a/src/libraries/Microsoft.Extensions.Http/src/DependencyInjection/HttpClientBuilderExtensions.cs b/src/libraries/Microsoft.Extensions.Http/src/DependencyInjection/HttpClientBuilderExtensions.cs index 67973c50408f..f1509da93d16 100644 --- a/src/libraries/Microsoft.Extensions.Http/src/DependencyInjection/HttpClientBuilderExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Http/src/DependencyInjection/HttpClientBuilderExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -335,10 +334,10 @@ internal static IHttpClientBuilder AddTypedClientCore(this IHttpClientB builder.Services.AddTransient(s => { - var httpClientFactory = s.GetRequiredService(); - var httpClient = httpClientFactory.CreateClient(builder.Name); + IHttpClientFactory httpClientFactory = s.GetRequiredService(); + HttpClient httpClient = httpClientFactory.CreateClient(builder.Name); - var typedClientFactory = s.GetRequiredService>(); + ITypedHttpClientFactory typedClientFactory = s.GetRequiredService>(); return typedClientFactory.CreateClient(httpClient); }); @@ -396,10 +395,10 @@ internal static IHttpClientBuilder AddTypedClientCore( builder.Services.AddTransient(s => { - var httpClientFactory = s.GetRequiredService(); - var httpClient = httpClientFactory.CreateClient(builder.Name); + IHttpClientFactory httpClientFactory = s.GetRequiredService(); + HttpClient httpClient = httpClientFactory.CreateClient(builder.Name); - var typedClientFactory = s.GetRequiredService>(); + ITypedHttpClientFactory typedClientFactory = s.GetRequiredService>(); return typedClientFactory.CreateClient(httpClient); }); @@ -450,8 +449,8 @@ internal static IHttpClientBuilder AddTypedClientCore(this IHttpClientB builder.Services.AddTransient(s => { - var httpClientFactory = s.GetRequiredService(); - var httpClient = httpClientFactory.CreateClient(builder.Name); + IHttpClientFactory httpClientFactory = s.GetRequiredService(); + HttpClient httpClient = httpClientFactory.CreateClient(builder.Name); return factory(httpClient); }); @@ -513,8 +512,8 @@ internal static IHttpClientBuilder AddTypedClientCore(this IHttpClientB builder.Services.AddTransient(s => { - var httpClientFactory = s.GetRequiredService(); - var httpClient = httpClientFactory.CreateClient(builder.Name); + IHttpClientFactory httpClientFactory = s.GetRequiredService(); + HttpClient httpClient = httpClientFactory.CreateClient(builder.Name); return factory(httpClient, s); }); @@ -625,7 +624,7 @@ private static void ReserveClient(IHttpClientBuilder builder, Type type, string Debug.Assert(registry != null); // Check for same name registered to two types. This won't work because we rely on named options for the configuration. - if (registry.NamedClientRegistrations.TryGetValue(name, out var otherType) && + if (registry.NamedClientRegistrations.TryGetValue(name, out Type otherType) && // Allow using the same name with multiple types in some cases (see callers). validateSingleType && @@ -633,7 +632,7 @@ private static void ReserveClient(IHttpClientBuilder builder, Type type, string // Allow registering the same name twice to the same type. type != otherType) { - var message = + string message = $"The HttpClient factory already has a registered client with the name '{name}', bound to the type '{otherType.FullName}'. " + $"Client names are computed based on the type name without considering the namespace ('{otherType.Name}'). " + $"Use an overload of AddHttpClient that accepts a string and provide a unique name to resolve the conflict."; diff --git a/src/libraries/Microsoft.Extensions.Http/src/DependencyInjection/HttpClientFactoryServiceCollectionExtensions.cs b/src/libraries/Microsoft.Extensions.Http/src/DependencyInjection/HttpClientFactoryServiceCollectionExtensions.cs index 56143d83b761..d0f90cf3e1ca 100644 --- a/src/libraries/Microsoft.Extensions.Http/src/DependencyInjection/HttpClientFactoryServiceCollectionExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Http/src/DependencyInjection/HttpClientFactoryServiceCollectionExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net.Http; @@ -71,7 +70,7 @@ public static IServiceCollection AddHttpClient(this IServiceCollection services) /// An that can be used to configure the client. /// /// - /// instances that apply the provided configuration can be retrieved using + /// instances that apply the provided configuration can be retrieved using /// and providing the matching name. /// /// @@ -105,7 +104,7 @@ public static IHttpClientBuilder AddHttpClient(this IServiceCollection services, /// An that can be used to configure the client. /// /// - /// instances that apply the provided configuration can be retrieved using + /// instances that apply the provided configuration can be retrieved using /// and providing the matching name. /// /// @@ -146,7 +145,7 @@ public static IHttpClientBuilder AddHttpClient(this IServiceCollection services, /// An that can be used to configure the client. /// /// - /// instances that apply the provided configuration can be retrieved using + /// instances that apply the provided configuration can be retrieved using /// and providing the matching name. /// /// @@ -190,13 +189,13 @@ public static IHttpClientBuilder AddHttpClient(this IServiceCollection services, /// An that can be used to configure the client. /// /// - /// instances that apply the provided configuration can be retrieved using + /// instances that apply the provided configuration can be retrieved using /// and providing the matching name. /// /// /// instances constructed with the appropriate /// can be retrieved from (and related methods) by providing - /// as the service type. + /// as the service type. /// /// public static IHttpClientBuilder AddHttpClient(this IServiceCollection services) @@ -209,7 +208,7 @@ public static IHttpClientBuilder AddHttpClient(this IServiceCollection AddHttpClient(services); - var name = TypeNameHelper.GetTypeDisplayName(typeof(TClient), fullName: false); + string name = TypeNameHelper.GetTypeDisplayName(typeof(TClient), fullName: false); var builder = new DefaultHttpClientBuilder(services, name); builder.AddTypedClientCore(validateSingleType: true); return builder; @@ -232,13 +231,13 @@ public static IHttpClientBuilder AddHttpClient(this IServiceCollection /// An that can be used to configure the client. /// /// - /// instances that apply the provided configuration can be retrieved using + /// instances that apply the provided configuration can be retrieved using /// and providing the matching name. /// /// /// instances constructed with the appropriate /// can be retrieved from (and related methods) by providing - /// as the service type. + /// as the service type. /// /// public static IHttpClientBuilder AddHttpClient(this IServiceCollection services) @@ -252,7 +251,7 @@ public static IHttpClientBuilder AddHttpClient(this IS AddHttpClient(services); - var name = TypeNameHelper.GetTypeDisplayName(typeof(TClient), fullName: false); + string name = TypeNameHelper.GetTypeDisplayName(typeof(TClient), fullName: false); var builder = new DefaultHttpClientBuilder(services, name); builder.AddTypedClientCore(validateSingleType: true); return builder; @@ -271,13 +270,13 @@ public static IHttpClientBuilder AddHttpClient(this IS /// An that can be used to configure the client. /// /// - /// instances that apply the provided configuration can be retrieved using + /// instances that apply the provided configuration can be retrieved using /// and providing the matching name. /// /// /// instances constructed with the appropriate /// can be retrieved from (and related methods) by providing - /// as the service type. + /// as the service type. /// /// /// Use as the name to configure the default client. @@ -321,13 +320,13 @@ public static IHttpClientBuilder AddHttpClient(this IServiceCollection /// An that can be used to configure the client. /// /// - /// instances that apply the provided configuration can be retrieved using + /// instances that apply the provided configuration can be retrieved using /// and providing the matching name. /// /// /// instances constructed with the appropriate /// can be retrieved from (and related methods) by providing - /// as the service type. + /// as the service type. /// /// /// Use as the name to configure the default client. @@ -368,13 +367,13 @@ public static IHttpClientBuilder AddHttpClient(this IS /// An that can be used to configure the client. /// /// - /// instances that apply the provided configuration can be retrieved using + /// instances that apply the provided configuration can be retrieved using /// and providing the matching name. /// /// /// instances constructed with the appropriate /// can be retrieved from (and related methods) by providing - /// as the service type. + /// as the service type. /// /// public static IHttpClientBuilder AddHttpClient(this IServiceCollection services, Action configureClient) @@ -392,7 +391,7 @@ public static IHttpClientBuilder AddHttpClient(this IServiceCollection AddHttpClient(services); - var name = TypeNameHelper.GetTypeDisplayName(typeof(TClient), fullName: false); + string name = TypeNameHelper.GetTypeDisplayName(typeof(TClient), fullName: false); var builder = new DefaultHttpClientBuilder(services, name); builder.ConfigureHttpClient(configureClient); builder.AddTypedClientCore(validateSingleType: true); @@ -413,13 +412,13 @@ public static IHttpClientBuilder AddHttpClient(this IServiceCollection /// An that can be used to configure the client. /// /// - /// instances that apply the provided configuration can be retrieved using + /// instances that apply the provided configuration can be retrieved using /// and providing the matching name. /// /// /// instances constructed with the appropriate /// can be retrieved from (and related methods) by providing - /// as the service type. + /// as the service type. /// /// public static IHttpClientBuilder AddHttpClient(this IServiceCollection services, Action configureClient) @@ -437,7 +436,7 @@ public static IHttpClientBuilder AddHttpClient(this IServiceCollection AddHttpClient(services); - var name = TypeNameHelper.GetTypeDisplayName(typeof(TClient), fullName: false); + string name = TypeNameHelper.GetTypeDisplayName(typeof(TClient), fullName: false); var builder = new DefaultHttpClientBuilder(services, name); builder.ConfigureHttpClient(configureClient); builder.AddTypedClientCore(validateSingleType: true); @@ -462,13 +461,13 @@ public static IHttpClientBuilder AddHttpClient(this IServiceCollection /// An that can be used to configure the client. /// /// - /// instances that apply the provided configuration can be retrieved using + /// instances that apply the provided configuration can be retrieved using /// and providing the matching name. /// /// /// instances constructed with the appropriate /// can be retrieved from (and related methods) by providing - /// as the service type. + /// as the service type. /// /// public static IHttpClientBuilder AddHttpClient(this IServiceCollection services, Action configureClient) @@ -487,7 +486,7 @@ public static IHttpClientBuilder AddHttpClient(this IS AddHttpClient(services); - var name = TypeNameHelper.GetTypeDisplayName(typeof(TClient), fullName: false); + string name = TypeNameHelper.GetTypeDisplayName(typeof(TClient), fullName: false); var builder = new DefaultHttpClientBuilder(services, name); builder.ConfigureHttpClient(configureClient); builder.AddTypedClientCore(validateSingleType: true); @@ -512,13 +511,13 @@ public static IHttpClientBuilder AddHttpClient(this IS /// An that can be used to configure the client. /// /// - /// instances that apply the provided configuration can be retrieved using + /// instances that apply the provided configuration can be retrieved using /// and providing the matching name. /// /// /// instances constructed with the appropriate /// can be retrieved from (and related methods) by providing - /// as the service type. + /// as the service type. /// /// public static IHttpClientBuilder AddHttpClient(this IServiceCollection services, Action configureClient) @@ -537,7 +536,7 @@ public static IHttpClientBuilder AddHttpClient(this IS AddHttpClient(services); - var name = TypeNameHelper.GetTypeDisplayName(typeof(TClient), fullName: false); + string name = TypeNameHelper.GetTypeDisplayName(typeof(TClient), fullName: false); var builder = new DefaultHttpClientBuilder(services, name); builder.ConfigureHttpClient(configureClient); builder.AddTypedClientCore(validateSingleType: true); @@ -558,13 +557,13 @@ public static IHttpClientBuilder AddHttpClient(this IS /// An that can be used to configure the client. /// /// - /// instances that apply the provided configuration can be retrieved using + /// instances that apply the provided configuration can be retrieved using /// and providing the matching name. /// /// /// instances constructed with the appropriate /// can be retrieved from (and related methods) by providing - /// as the service type. + /// as the service type. /// /// /// Use as the name to configure the default client. @@ -610,13 +609,13 @@ public static IHttpClientBuilder AddHttpClient(this IServiceCollection /// An that can be used to configure the client. /// /// - /// instances that apply the provided configuration can be retrieved using + /// instances that apply the provided configuration can be retrieved using /// and providing the matching name. /// /// /// instances constructed with the appropriate /// can be retrieved from (and related methods) by providing - /// as the service type. + /// as the service type. /// /// /// Use as the name to configure the default client. @@ -666,13 +665,13 @@ public static IHttpClientBuilder AddHttpClient(this IServiceCollection /// An that can be used to configure the client. /// /// - /// instances that apply the provided configuration can be retrieved using + /// instances that apply the provided configuration can be retrieved using /// and providing the matching name. /// /// /// instances constructed with the appropriate /// can be retrieved from (and related methods) by providing - /// as the service type. + /// as the service type. /// /// /// Use as the name to configure the default client. @@ -723,13 +722,13 @@ public static IHttpClientBuilder AddHttpClient(this IS /// An that can be used to configure the client. /// /// - /// instances that apply the provided configuration can be retrieved using + /// instances that apply the provided configuration can be retrieved using /// and providing the matching name. /// /// /// instances constructed with the appropriate /// can be retrieved from (and related methods) by providing - /// as the service type. + /// as the service type. /// /// /// Use as the name to configure the default client. @@ -778,13 +777,13 @@ public static IHttpClientBuilder AddHttpClient(this IS /// An that can be used to configure the client. /// /// - /// instances that apply the provided configuration can be retrieved using + /// instances that apply the provided configuration can be retrieved using /// and providing the matching name. /// /// /// instances constructed with the appropriate /// can be retrieved from (and related methods) by providing - /// as the service type. + /// as the service type. /// /// public static IHttpClientBuilder AddHttpClient(this IServiceCollection services, Func factory) @@ -801,7 +800,7 @@ public static IHttpClientBuilder AddHttpClient(this IS throw new ArgumentNullException(nameof(factory)); } - var name = TypeNameHelper.GetTypeDisplayName(typeof(TClient), fullName: false); + string name = TypeNameHelper.GetTypeDisplayName(typeof(TClient), fullName: false); return AddHttpClient(services, name, factory); } @@ -822,13 +821,13 @@ public static IHttpClientBuilder AddHttpClient(this IS /// An that can be used to configure the client. /// /// - /// instances that apply the provided configuration can be retrieved using + /// instances that apply the provided configuration can be retrieved using /// and providing the matching name. /// /// /// instances constructed with the appropriate /// can be retrieved from (and related methods) by providing - /// as the service type. + /// as the service type. /// /// /// @@ -875,13 +874,13 @@ public static IHttpClientBuilder AddHttpClient(this IS /// An that can be used to configure the client. /// /// - /// instances that apply the provided configuration can be retrieved using + /// instances that apply the provided configuration can be retrieved using /// and providing the matching name. /// /// /// instances constructed with the appropriate /// can be retrieved from (and related methods) by providing - /// as the service type. + /// as the service type. /// /// public static IHttpClientBuilder AddHttpClient(this IServiceCollection services, Func factory) @@ -898,7 +897,7 @@ public static IHttpClientBuilder AddHttpClient(this IS throw new ArgumentNullException(nameof(factory)); } - var name = TypeNameHelper.GetTypeDisplayName(typeof(TClient), fullName: false); + string name = TypeNameHelper.GetTypeDisplayName(typeof(TClient), fullName: false); return AddHttpClient(services, name, factory); } @@ -919,13 +918,13 @@ public static IHttpClientBuilder AddHttpClient(this IS /// An that can be used to configure the client. /// /// - /// instances that apply the provided configuration can be retrieved using + /// instances that apply the provided configuration can be retrieved using /// and providing the matching name. /// /// /// instances constructed with the appropriate /// can be retrieved from (and related methods) by providing - /// as the service type. + /// as the service type. /// /// public static IHttpClientBuilder AddHttpClient(this IServiceCollection services, string name, Func factory) diff --git a/src/libraries/Microsoft.Extensions.Http/src/DependencyInjection/HttpClientMappingRegistry.cs b/src/libraries/Microsoft.Extensions.Http/src/DependencyInjection/HttpClientMappingRegistry.cs index 5e69cdca9892..3737fd996eb8 100644 --- a/src/libraries/Microsoft.Extensions.Http/src/DependencyInjection/HttpClientMappingRegistry.cs +++ b/src/libraries/Microsoft.Extensions.Http/src/DependencyInjection/HttpClientMappingRegistry.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.Http/src/DependencyInjection/IHttpClientBuilder.cs b/src/libraries/Microsoft.Extensions.Http/src/DependencyInjection/IHttpClientBuilder.cs index 79c6d8198863..96318e1aa336 100644 --- a/src/libraries/Microsoft.Extensions.Http/src/DependencyInjection/IHttpClientBuilder.cs +++ b/src/libraries/Microsoft.Extensions.Http/src/DependencyInjection/IHttpClientBuilder.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Net.Http; diff --git a/src/libraries/Microsoft.Extensions.Http/src/ExpiredHandlerTrackingEntry.cs b/src/libraries/Microsoft.Extensions.Http/src/ExpiredHandlerTrackingEntry.cs index af85b8d68963..65537b0f96b7 100644 --- a/src/libraries/Microsoft.Extensions.Http/src/ExpiredHandlerTrackingEntry.cs +++ b/src/libraries/Microsoft.Extensions.Http/src/ExpiredHandlerTrackingEntry.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net.Http; diff --git a/src/libraries/Microsoft.Extensions.Http/src/HttpClientFactoryExtensions.cs b/src/libraries/Microsoft.Extensions.Http/src/HttpClientFactoryExtensions.cs index edef0ae89317..876618f7a63d 100644 --- a/src/libraries/Microsoft.Extensions.Http/src/HttpClientFactoryExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Http/src/HttpClientFactoryExtensions.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.Options; diff --git a/src/libraries/Microsoft.Extensions.Http/src/HttpClientFactoryOptions.cs b/src/libraries/Microsoft.Extensions.Http/src/HttpClientFactoryOptions.cs index 93f43f412723..12ee8585ac0e 100644 --- a/src/libraries/Microsoft.Extensions.Http/src/HttpClientFactoryOptions.cs +++ b/src/libraries/Microsoft.Extensions.Http/src/HttpClientFactoryOptions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -18,7 +17,7 @@ public class HttpClientFactoryOptions // Establishing a minimum lifetime helps us avoid some possible destructive cases. // // IMPORTANT: This is used in a resource string. Update the resource if this changes. - internal readonly static TimeSpan MinimumHandlerLifetime = TimeSpan.FromSeconds(1); + internal static readonly TimeSpan MinimumHandlerLifetime = TimeSpan.FromSeconds(1); private TimeSpan _handlerLifetime = TimeSpan.FromMinutes(2); @@ -33,7 +32,7 @@ public class HttpClientFactoryOptions public IList> HttpClientActions { get; } = new List>(); /// - /// Gets or sets the length of time that a instance can be reused. Each named + /// Gets or sets the length of time that a instance can be reused. Each named /// client can have its own configured handler lifetime value. The default value of this property is two minutes. /// Set the lifetime to to disable handler expiry. /// @@ -50,7 +49,7 @@ public class HttpClientFactoryOptions /// chosen with an understanding of the application's requirement to respond to changes in the network environment. /// /// - /// Expiry of a handler will not immediately dispose the handler. An expired handler is placed in a separate pool + /// Expiry of a handler will not immediately dispose the handler. An expired handler is placed in a separate pool /// which is processed at intervals to dispose handlers only when they become unreachable. Using long-lived /// instances will prevent the underlying from being /// disposed until all references are garbage-collected. @@ -94,9 +93,9 @@ public TimeSpan HandlerLifetime /// /// /// When operations that are part of are executed - /// they will be provided with the scoped via + /// they will be provided with the scoped via /// . This includes retrieving a message handler - /// from dependency injection, such as one registered using + /// from dependency injection, such as one registered using /// . /// /// diff --git a/src/libraries/Microsoft.Extensions.Http/src/HttpMessageHandlerBuilder.cs b/src/libraries/Microsoft.Extensions.Http/src/HttpMessageHandlerBuilder.cs index 07a6d5c77739..0c84e573e805 100644 --- a/src/libraries/Microsoft.Extensions.Http/src/HttpMessageHandlerBuilder.cs +++ b/src/libraries/Microsoft.Extensions.Http/src/HttpMessageHandlerBuilder.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -45,7 +44,7 @@ public abstract class HttpMessageHandlerBuilder /// from the dependency injection container. /// /// - /// This property is sensitive to the value of + /// This property is sensitive to the value of /// . If true this /// property will be a reference to the application's root service provider. If false /// (default) this will be a reference to a scoped service provider that has the same @@ -77,15 +76,15 @@ protected internal static HttpMessageHandler CreateHandlerPipeline(HttpMessageHa throw new ArgumentNullException(nameof(additionalHandlers)); } - var additionalHandlersList = additionalHandlers as IReadOnlyList ?? additionalHandlers.ToArray(); + IReadOnlyList additionalHandlersList = additionalHandlers as IReadOnlyList ?? additionalHandlers.ToArray(); - var next = primaryHandler; - for (var i = additionalHandlersList.Count - 1; i >= 0; i--) + HttpMessageHandler next = primaryHandler; + for (int i = additionalHandlersList.Count - 1; i >= 0; i--) { - var handler = additionalHandlersList[i]; + DelegatingHandler handler = additionalHandlersList[i]; if (handler == null) { - var message = SR.Format(SR.HttpMessageHandlerBuilder_AdditionalHandlerIsNull, nameof(additionalHandlers)); + string message = SR.Format(SR.HttpMessageHandlerBuilder_AdditionalHandlerIsNull, nameof(additionalHandlers)); throw new InvalidOperationException(message); } @@ -93,7 +92,7 @@ protected internal static HttpMessageHandler CreateHandlerPipeline(HttpMessageHa // work the way you want and it can be tricky for callers to figure out. if (handler.InnerHandler != null) { - var message = SR.Format(SR.HttpMessageHandlerBuilder_AdditionHandlerIsInvalid, + string message = SR.Format(SR.HttpMessageHandlerBuilder_AdditionHandlerIsInvalid, nameof(DelegatingHandler.InnerHandler), nameof(DelegatingHandler), nameof(HttpMessageHandlerBuilder), diff --git a/src/libraries/Microsoft.Extensions.Http/src/HttpMessageHandlerFactoryExtensions.cs b/src/libraries/Microsoft.Extensions.Http/src/HttpMessageHandlerFactoryExtensions.cs index 5d1a631d3f89..d69c459d5b3b 100644 --- a/src/libraries/Microsoft.Extensions.Http/src/HttpMessageHandlerFactoryExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Http/src/HttpMessageHandlerFactoryExtensions.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.Options; diff --git a/src/libraries/Microsoft.Extensions.Http/src/IHttpClientFactory.cs b/src/libraries/Microsoft.Extensions.Http/src/IHttpClientFactory.cs index b8cef5d7d3a2..932256900291 100644 --- a/src/libraries/Microsoft.Extensions.Http/src/IHttpClientFactory.cs +++ b/src/libraries/Microsoft.Extensions.Http/src/IHttpClientFactory.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.DependencyInjection; diff --git a/src/libraries/Microsoft.Extensions.Http/src/IHttpMessageHandlerBuilderFilter.cs b/src/libraries/Microsoft.Extensions.Http/src/IHttpMessageHandlerBuilderFilter.cs index 51c0f35684f1..8009e046acaa 100644 --- a/src/libraries/Microsoft.Extensions.Http/src/IHttpMessageHandlerBuilderFilter.cs +++ b/src/libraries/Microsoft.Extensions.Http/src/IHttpMessageHandlerBuilderFilter.cs @@ -1,13 +1,12 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; namespace Microsoft.Extensions.Http { /// - /// Used by the to apply additional initialization to the configure the + /// Used by the to apply additional initialization to the configure the /// immediately before /// is called. /// diff --git a/src/libraries/Microsoft.Extensions.Http/src/IHttpMessageHandlerFactory.cs b/src/libraries/Microsoft.Extensions.Http/src/IHttpMessageHandlerFactory.cs index ff21a3e9eb34..df05c4be7331 100644 --- a/src/libraries/Microsoft.Extensions.Http/src/IHttpMessageHandlerFactory.cs +++ b/src/libraries/Microsoft.Extensions.Http/src/IHttpMessageHandlerFactory.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.DependencyInjection; diff --git a/src/libraries/Microsoft.Extensions.Http/src/ITypedHttpClientFactory.cs b/src/libraries/Microsoft.Extensions.Http/src/ITypedHttpClientFactory.cs index e986467e4f41..67ac64c23012 100644 --- a/src/libraries/Microsoft.Extensions.Http/src/ITypedHttpClientFactory.cs +++ b/src/libraries/Microsoft.Extensions.Http/src/ITypedHttpClientFactory.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net.Http; @@ -29,7 +28,7 @@ namespace Microsoft.Extensions.Http /// /// /// The default uses type activation to create typed client instances. Typed - /// client types are not retrieved directly from the . See + /// client types are not retrieved directly from the . See /// for details. /// /// @@ -45,7 +44,7 @@ namespace Microsoft.Extensions.Http /// public ExampleClient(HttpClient httpClient, ILogger<ExampleClient> logger) /// { /// _httpClient = httpClient; - /// _logger = logger; + /// _logger = logger; /// } /// /// // typed clients can expose the HttpClient for application code to call directly diff --git a/src/libraries/Microsoft.Extensions.Http/src/LifetimeTrackingHttpMessageHandler.cs b/src/libraries/Microsoft.Extensions.Http/src/LifetimeTrackingHttpMessageHandler.cs index de09e391ed35..d591e59347b1 100644 --- a/src/libraries/Microsoft.Extensions.Http/src/LifetimeTrackingHttpMessageHandler.cs +++ b/src/libraries/Microsoft.Extensions.Http/src/LifetimeTrackingHttpMessageHandler.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Net.Http; diff --git a/src/libraries/Microsoft.Extensions.Http/src/Logging/HttpHeadersLogValue.cs b/src/libraries/Microsoft.Extensions.Http/src/Logging/HttpHeadersLogValue.cs index cb7213f2f619..54f917943e37 100644 --- a/src/libraries/Microsoft.Extensions.Http/src/Logging/HttpHeadersLogValue.cs +++ b/src/libraries/Microsoft.Extensions.Http/src/Logging/HttpHeadersLogValue.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections; @@ -39,14 +38,14 @@ private List> Values { var values = new List>(); - foreach (var kvp in Headers) + foreach (KeyValuePair> kvp in Headers) { values.Add(new KeyValuePair(kvp.Key, kvp.Value)); } if (ContentHeaders != null) { - foreach (var kvp in ContentHeaders) + foreach (KeyValuePair> kvp in ContentHeaders) { values.Add(new KeyValuePair(kvp.Key, kvp.Value)); } @@ -91,9 +90,9 @@ public override string ToString() var builder = new StringBuilder(); builder.AppendLine(_kind == Kind.Request ? "Request Headers:" : "Response Headers:"); - for (var i = 0; i < Values.Count; i++) + for (int i = 0; i < Values.Count; i++) { - var kvp = Values[i]; + KeyValuePair kvp = Values[i]; builder.Append(kvp.Key); builder.Append(": "); @@ -108,7 +107,7 @@ public override string ToString() builder.AppendJoin(", ", (IEnumerable)kvp.Value); builder.AppendLine(); #else - foreach (var value in (IEnumerable)kvp.Value) + foreach (object value in (IEnumerable)kvp.Value) { builder.Append(value); builder.Append(", "); diff --git a/src/libraries/Microsoft.Extensions.Http/src/Logging/LoggingHttpMessageHandler.cs b/src/libraries/Microsoft.Extensions.Http/src/Logging/LoggingHttpMessageHandler.cs index 5738b4e35886..0920af47d8e7 100644 --- a/src/libraries/Microsoft.Extensions.Http/src/Logging/LoggingHttpMessageHandler.cs +++ b/src/libraries/Microsoft.Extensions.Http/src/Logging/LoggingHttpMessageHandler.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net.Http; @@ -53,12 +52,12 @@ protected async override Task SendAsync(HttpRequestMessage var stopwatch = ValueStopwatch.StartNew(); - var shouldRedactHeaderValue = _options?.ShouldRedactHeaderValue ?? _shouldNotRedactHeaderValue; + Func shouldRedactHeaderValue = _options?.ShouldRedactHeaderValue ?? _shouldNotRedactHeaderValue; // Not using a scope here because we always expect this to be at the end of the pipeline, thus there's // not really anything to surround. Log.RequestStart(_logger, request, shouldRedactHeaderValue); - var response = await base.SendAsync(request, cancellationToken).ConfigureAwait(false); + HttpResponseMessage response = await base.SendAsync(request, cancellationToken).ConfigureAwait(false); Log.RequestEnd(_logger, response, stopwatch.GetElapsedTime(), shouldRedactHeaderValue); return response; diff --git a/src/libraries/Microsoft.Extensions.Http/src/Logging/LoggingHttpMessageHandlerBuilderFilter.cs b/src/libraries/Microsoft.Extensions.Http/src/Logging/LoggingHttpMessageHandlerBuilderFilter.cs index b24767bc7e38..1fcbd29f128b 100644 --- a/src/libraries/Microsoft.Extensions.Http/src/Logging/LoggingHttpMessageHandlerBuilderFilter.cs +++ b/src/libraries/Microsoft.Extensions.Http/src/Logging/LoggingHttpMessageHandlerBuilderFilter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.Http.Logging; @@ -43,14 +42,14 @@ public Action Configure(Action SendAsync(HttpRequestMessage var stopwatch = ValueStopwatch.StartNew(); - var shouldRedactHeaderValue = _options?.ShouldRedactHeaderValue ?? _shouldNotRedactHeaderValue; + Func shouldRedactHeaderValue = _options?.ShouldRedactHeaderValue ?? _shouldNotRedactHeaderValue; using (Log.BeginRequestPipelineScope(_logger, request)) { Log.RequestPipelineStart(_logger, request, shouldRedactHeaderValue); - var response = await base.SendAsync(request, cancellationToken).ConfigureAwait(false); + HttpResponseMessage response = await base.SendAsync(request, cancellationToken).ConfigureAwait(false); Log.RequestPipelineEnd(_logger, response, stopwatch.GetElapsedTime(), shouldRedactHeaderValue); return response; diff --git a/src/libraries/Microsoft.Extensions.Http/src/Microsoft.Extensions.Http.csproj b/src/libraries/Microsoft.Extensions.Http/src/Microsoft.Extensions.Http.csproj index f059690d68b4..5fb5c618016b 100644 --- a/src/libraries/Microsoft.Extensions.Http/src/Microsoft.Extensions.Http.csproj +++ b/src/libraries/Microsoft.Extensions.Http/src/Microsoft.Extensions.Http.csproj @@ -2,7 +2,6 @@ netstandard2.0 - $(NoWarn);CS1591 true diff --git a/src/libraries/Microsoft.Extensions.Http/src/Properties/InternalsVisibleTo.cs b/src/libraries/Microsoft.Extensions.Http/src/Properties/InternalsVisibleTo.cs index 2c1d0695ab00..b5e2ddad44d3 100644 --- a/src/libraries/Microsoft.Extensions.Http/src/Properties/InternalsVisibleTo.cs +++ b/src/libraries/Microsoft.Extensions.Http/src/Properties/InternalsVisibleTo.cs @@ -1,8 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("Microsoft.Extensions.Http.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.Extensions.Http.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] diff --git a/src/libraries/Microsoft.Extensions.Http/tests/DefaultHttpClientFactoryTest.cs b/src/libraries/Microsoft.Extensions.Http/tests/DefaultHttpClientFactoryTest.cs index 0a3916592f29..a4cc8dee05cc 100644 --- a/src/libraries/Microsoft.Extensions.Http/tests/DefaultHttpClientFactoryTest.cs +++ b/src/libraries/Microsoft.Extensions.Http/tests/DefaultHttpClientFactoryTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -250,7 +249,7 @@ public void Factory_CreateClient_FiltersCanDecorateBuilder() Assert.Same(expected[7], handler); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] public async Task Factory_CreateClient_WithExpiry_CanExpire() { // Arrange @@ -293,7 +292,7 @@ public async Task Factory_CreateClient_WithExpiry_CanExpire() Assert.NotSame(activeEntry1.Handler, activeEntry2.Handler); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] public async Task Factory_CreateClient_WithExpiry_HandlerCanBeReusedBeforeExpiry() { // Arrange diff --git a/src/libraries/Microsoft.Extensions.Http/tests/DefaultHttpMessageHandlerBuilderTest.cs b/src/libraries/Microsoft.Extensions.Http/tests/DefaultHttpMessageHandlerBuilderTest.cs index 10097fd4ea6e..f8aed566210d 100644 --- a/src/libraries/Microsoft.Extensions.Http/tests/DefaultHttpMessageHandlerBuilderTest.cs +++ b/src/libraries/Microsoft.Extensions.Http/tests/DefaultHttpMessageHandlerBuilderTest.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net.Http; @@ -128,4 +127,4 @@ public void Build_AdditionalHandlerHasNonNullInnerHandler_ThrowsException() exception.Message); } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Http/tests/DependencyInjection/HttpClientFactoryServiceCollectionExtensionsTest.cs b/src/libraries/Microsoft.Extensions.Http/tests/DependencyInjection/HttpClientFactoryServiceCollectionExtensionsTest.cs index 6a06adac8f50..6e526dbdad57 100644 --- a/src/libraries/Microsoft.Extensions.Http/tests/DependencyInjection/HttpClientFactoryServiceCollectionExtensionsTest.cs +++ b/src/libraries/Microsoft.Extensions.Http/tests/DependencyInjection/HttpClientFactoryServiceCollectionExtensionsTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Concurrent; diff --git a/src/libraries/Microsoft.Extensions.Http/tests/DependencyInjection/OtherTestOptions.cs b/src/libraries/Microsoft.Extensions.Http/tests/DependencyInjection/OtherTestOptions.cs index 1c4835922107..7cc69b59a6c1 100644 --- a/src/libraries/Microsoft.Extensions.Http/tests/DependencyInjection/OtherTestOptions.cs +++ b/src/libraries/Microsoft.Extensions.Http/tests/DependencyInjection/OtherTestOptions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -10,4 +9,4 @@ public class OtherTestOptions { public string BaseAddress { get; set; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Http/tests/HttpMessageHandlerBuilderTest.cs b/src/libraries/Microsoft.Extensions.Http/tests/HttpMessageHandlerBuilderTest.cs index 15b685d72da3..8220430e11b1 100644 --- a/src/libraries/Microsoft.Extensions.Http/tests/HttpMessageHandlerBuilderTest.cs +++ b/src/libraries/Microsoft.Extensions.Http/tests/HttpMessageHandlerBuilderTest.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Net.Http; diff --git a/src/libraries/Microsoft.Extensions.Http/tests/ITestTypedClient.cs b/src/libraries/Microsoft.Extensions.Http/tests/ITestTypedClient.cs index 2de8eb590aeb..c7fa245cbc41 100644 --- a/src/libraries/Microsoft.Extensions.Http/tests/ITestTypedClient.cs +++ b/src/libraries/Microsoft.Extensions.Http/tests/ITestTypedClient.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Net.Http; @@ -11,4 +10,4 @@ public interface ITestTypedClient { HttpClient HttpClient { get; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Http/tests/Logging/HttpHeadersLogValueTest.cs b/src/libraries/Microsoft.Extensions.Http/tests/Logging/HttpHeadersLogValueTest.cs index 09d9d5b2bb89..81120214152c 100644 --- a/src/libraries/Microsoft.Extensions.Http/tests/Logging/HttpHeadersLogValueTest.cs +++ b/src/libraries/Microsoft.Extensions.Http/tests/Logging/HttpHeadersLogValueTest.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; diff --git a/src/libraries/Microsoft.Extensions.Http/tests/Logging/RedactedLogValueIntegrationTest.cs b/src/libraries/Microsoft.Extensions.Http/tests/Logging/RedactedLogValueIntegrationTest.cs index 09d10fa38afd..7128daa50459 100644 --- a/src/libraries/Microsoft.Extensions.Http/tests/Logging/RedactedLogValueIntegrationTest.cs +++ b/src/libraries/Microsoft.Extensions.Http/tests/Logging/RedactedLogValueIntegrationTest.cs @@ -1,8 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -using System; using System.Linq; using System.Net.Http; using System.Net.Http.Headers; @@ -17,7 +15,7 @@ namespace Microsoft.Extensions.Http.Logging { public class RedactedLogValueIntegrationTest { - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [Fact] public async Task RedactHeaderValueWithHeaderList_ValueIsRedactedBeforeLogging() { // Arrange @@ -95,7 +93,7 @@ public async Task RedactHeaderValueWithHeaderList_ValueIsRedactedBeforeLogging() ", message.Message); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [Fact] public async Task RedactHeaderValueWithPredicate_ValueIsRedactedBeforeLogging() { // Arrange diff --git a/src/libraries/Microsoft.Extensions.Http/tests/TestTypedClient.cs b/src/libraries/Microsoft.Extensions.Http/tests/TestTypedClient.cs index e9012d197896..e2cdda93ee20 100644 --- a/src/libraries/Microsoft.Extensions.Http/tests/TestTypedClient.cs +++ b/src/libraries/Microsoft.Extensions.Http/tests/TestTypedClient.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Net.Http; @@ -16,4 +15,4 @@ public TestTypedClient(HttpClient httpClient) public HttpClient HttpClient { get; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/ref/Microsoft.Extensions.Logging.Abstractions.cs b/src/libraries/Microsoft.Extensions.Logging.Abstractions/ref/Microsoft.Extensions.Logging.Abstractions.cs index 878f0c4cba03..aa32585b1a76 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/ref/Microsoft.Extensions.Logging.Abstractions.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/ref/Microsoft.Extensions.Logging.Abstractions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ------------------------------------------------------------------------------ // Changes to this file must follow the https://aka.ms/api-review process. // ------------------------------------------------------------------------------ diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/EventId.cs b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/EventId.cs index 9a76fb1ab18b..a2230c29cab6 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/EventId.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/EventId.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.Logging { diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/FormattedLogValues.cs b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/FormattedLogValues.cs index afe43b76ee1f..ad0bde9b6fb9 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/FormattedLogValues.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/FormattedLogValues.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections; @@ -11,7 +10,7 @@ namespace Microsoft.Extensions.Logging { /// - /// LogValues to enable formatting options supported by . + /// LogValues to enable formatting options supported by . /// This also enables using {NamedformatItem} in the format string. /// internal readonly struct FormattedLogValues : IReadOnlyList> diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/IExternalScopeProvider.cs b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/IExternalScopeProvider.cs index 2dbe19526131..85e8d9cf29a8 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/IExternalScopeProvider.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/IExternalScopeProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/ILogger.cs b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/ILogger.cs index 481c1b5283c6..d7164852b483 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/ILogger.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/ILogger.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/ILoggerFactory.cs b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/ILoggerFactory.cs index 965425b8ab2c..6f94e223b8e1 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/ILoggerFactory.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/ILoggerFactory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -25,4 +24,4 @@ public interface ILoggerFactory : IDisposable /// The . void AddProvider(ILoggerProvider provider); } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/ILoggerProvider.cs b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/ILoggerProvider.cs index dc67c3442342..cbabeaa2c9b8 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/ILoggerProvider.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/ILoggerProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/ILoggerT.cs b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/ILoggerT.cs index 9b36a42d56d6..0fc7f01cd92e 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/ILoggerT.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/ILoggerT.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.Logging { @@ -12,6 +11,6 @@ namespace Microsoft.Extensions.Logging /// The type whose name is used for the logger category name. public interface ILogger : ILogger { - + } } diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/ISupportExternalScope.cs b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/ISupportExternalScope.cs index a4193eb9d23b..02ddc67e44ca 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/ISupportExternalScope.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/ISupportExternalScope.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.Logging { diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/LogLevel.cs b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/LogLevel.cs index 1739f1a7cfb9..c3689b296a03 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/LogLevel.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/LogLevel.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.Logging { diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/LogValuesFormatter.cs b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/LogValuesFormatter.cs index e971d866bbc0..598554dbcf72 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/LogValuesFormatter.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/LogValuesFormatter.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections; @@ -12,12 +11,11 @@ namespace Microsoft.Extensions.Logging { /// - /// Formatter to convert the named format items like {NamedformatItem} to format. + /// Formatter to convert the named format items like {NamedformatItem} to format. /// internal class LogValuesFormatter { private const string NullValue = "(null)"; - private static readonly object[] EmptyArray = new object[0]; private static readonly char[] FormatDelimiters = {',', ':'}; private readonly string _format; private readonly List _valueNames = new List(); @@ -27,13 +25,13 @@ public LogValuesFormatter(string format) OriginalFormat = format; var sb = new StringBuilder(); - var scanIndex = 0; - var endIndex = format.Length; + int scanIndex = 0; + int endIndex = format.Length; while (scanIndex < endIndex) { - var openBraceIndex = FindBraceIndex(format, '{', scanIndex, endIndex); - var closeBraceIndex = FindBraceIndex(format, '}', openBraceIndex, endIndex); + int openBraceIndex = FindBraceIndex(format, '{', scanIndex, endIndex); + int closeBraceIndex = FindBraceIndex(format, '}', openBraceIndex, endIndex); if (closeBraceIndex == endIndex) { @@ -43,7 +41,7 @@ public LogValuesFormatter(string format) else { // Format item syntax : { index[,alignment][ :formatString] }. - var formatDelimiterIndex = FindIndexOfAny(format, FormatDelimiters, openBraceIndex, closeBraceIndex); + int formatDelimiterIndex = FindIndexOfAny(format, FormatDelimiters, openBraceIndex, closeBraceIndex); sb.Append(format, scanIndex, openBraceIndex - scanIndex + 1); sb.Append(_valueNames.Count.ToString(CultureInfo.InvariantCulture)); @@ -63,9 +61,9 @@ public LogValuesFormatter(string format) private static int FindBraceIndex(string format, char brace, int startIndex, int endIndex) { // Example: {{prefix{{{Argument}}}suffix}}. - var braceIndex = endIndex; - var scanIndex = startIndex; - var braceOccurrenceCount = 0; + int braceIndex = endIndex; + int scanIndex = startIndex; + int braceOccurrenceCount = 0; while (scanIndex < endIndex) { @@ -110,7 +108,7 @@ private static int FindBraceIndex(string format, char brace, int startIndex, int private static int FindIndexOfAny(string format, char[] chars, int startIndex, int endIndex) { - var findIndex = format.IndexOfAny(chars, startIndex, endIndex - startIndex); + int findIndex = format.IndexOfAny(chars, startIndex, endIndex - startIndex); return findIndex == -1 ? endIndex : findIndex; } @@ -124,7 +122,7 @@ public string Format(object[] values) } } - return string.Format(CultureInfo.InvariantCulture, _format, values ?? EmptyArray); + return string.Format(CultureInfo.InvariantCulture, _format, values ?? Array.Empty()); } internal string Format() @@ -165,7 +163,7 @@ public KeyValuePair GetValue(object[] values, int index) public IEnumerable> GetValues(object[] values) { var valueArray = new KeyValuePair[values.Length + 1]; - for (var index = 0; index != _valueNames.Count; ++index) + for (int index = 0; index != _valueNames.Count; ++index) { valueArray[index] = new KeyValuePair(_valueNames[index], values[index]); } diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/LoggerExtensions.cs b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/LoggerExtensions.cs index 1f60492290a9..6f742843a549 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/LoggerExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/LoggerExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/LoggerExternalScopeProvider.cs b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/LoggerExternalScopeProvider.cs index 304e2e87753a..bd6980a963b1 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/LoggerExternalScopeProvider.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/LoggerExternalScopeProvider.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Threading; @@ -38,7 +37,7 @@ void Report(Scope current) /// public IDisposable Push(object state) { - var parent = _currentScope.Value; + Scope parent = _currentScope.Value; var newScope = new Scope(this, state, parent); _currentScope.Value = newScope; diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/LoggerFactoryExtensions.cs b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/LoggerFactoryExtensions.cs index 0c87d4504511..96b02320918f 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/LoggerFactoryExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/LoggerFactoryExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.Internal; diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/LoggerMessage.cs b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/LoggerMessage.cs index 05caaa4ad698..dab0062fc60d 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/LoggerMessage.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/LoggerMessage.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections; @@ -21,7 +20,7 @@ public static class LoggerMessage /// A delegate which when invoked creates a log scope. public static Func DefineScope(string formatString) { - var formatter = CreateLogValuesFormatter(formatString, expectedNamedParameterCount: 0); + LogValuesFormatter formatter = CreateLogValuesFormatter(formatString, expectedNamedParameterCount: 0); var logValues = new LogValues(formatter); @@ -36,7 +35,7 @@ public static Func DefineScope(string formatString) /// A delegate which when invoked creates a log scope. public static Func DefineScope(string formatString) { - var formatter = CreateLogValuesFormatter(formatString, expectedNamedParameterCount: 1); + LogValuesFormatter formatter = CreateLogValuesFormatter(formatString, expectedNamedParameterCount: 1); return (logger, arg1) => logger.BeginScope(new LogValues(formatter, arg1)); } @@ -50,7 +49,7 @@ public static Func DefineScope(string formatString /// A delegate which when invoked creates a log scope. public static Func DefineScope(string formatString) { - var formatter = CreateLogValuesFormatter(formatString, expectedNamedParameterCount: 2); + LogValuesFormatter formatter = CreateLogValuesFormatter(formatString, expectedNamedParameterCount: 2); return (logger, arg1, arg2) => logger.BeginScope(new LogValues(formatter, arg1, arg2)); } @@ -65,7 +64,7 @@ public static Func DefineScope(string form /// A delegate which when invoked creates a log scope. public static Func DefineScope(string formatString) { - var formatter = CreateLogValuesFormatter(formatString, expectedNamedParameterCount: 3); + LogValuesFormatter formatter = CreateLogValuesFormatter(formatString, expectedNamedParameterCount: 3); return (logger, arg1, arg2, arg3) => logger.BeginScope(new LogValues(formatter, arg1, arg2, arg3)); } @@ -79,7 +78,7 @@ public static Func DefineScope(str /// A delegate which when invoked creates a log message. public static Action Define(LogLevel logLevel, EventId eventId, string formatString) { - var formatter = CreateLogValuesFormatter(formatString, expectedNamedParameterCount: 0); + LogValuesFormatter formatter = CreateLogValuesFormatter(formatString, expectedNamedParameterCount: 0); return (logger, exception) => { @@ -100,7 +99,7 @@ public static Action Define(LogLevel logLevel, EventId event /// A delegate which when invoked creates a log message. public static Action Define(LogLevel logLevel, EventId eventId, string formatString) { - var formatter = CreateLogValuesFormatter(formatString, expectedNamedParameterCount: 1); + LogValuesFormatter formatter = CreateLogValuesFormatter(formatString, expectedNamedParameterCount: 1); void Log(ILogger logger, T1 arg1, Exception exception) { @@ -127,7 +126,7 @@ void Log(ILogger logger, T1 arg1, Exception exception) /// A delegate which when invoked creates a log message. public static Action Define(LogLevel logLevel, EventId eventId, string formatString) { - var formatter = CreateLogValuesFormatter(formatString, expectedNamedParameterCount: 2); + LogValuesFormatter formatter = CreateLogValuesFormatter(formatString, expectedNamedParameterCount: 2); void Log(ILogger logger, T1 arg1, T2 arg2, Exception exception) { @@ -155,7 +154,7 @@ void Log(ILogger logger, T1 arg1, T2 arg2, Exception exception) /// A delegate which when invoked creates a log message. public static Action Define(LogLevel logLevel, EventId eventId, string formatString) { - var formatter = CreateLogValuesFormatter(formatString, expectedNamedParameterCount: 3); + LogValuesFormatter formatter = CreateLogValuesFormatter(formatString, expectedNamedParameterCount: 3); void Log(ILogger logger, T1 arg1, T2 arg2, T3 arg3, Exception exception) { @@ -184,7 +183,7 @@ void Log(ILogger logger, T1 arg1, T2 arg2, T3 arg3, Exception exception) /// A delegate which when invoked creates a log message. public static Action Define(LogLevel logLevel, EventId eventId, string formatString) { - var formatter = CreateLogValuesFormatter(formatString, expectedNamedParameterCount: 4); + LogValuesFormatter formatter = CreateLogValuesFormatter(formatString, expectedNamedParameterCount: 4); void Log(ILogger logger, T1 arg1, T2 arg2, T3 arg3, T4 arg4, Exception exception) { @@ -214,7 +213,7 @@ void Log(ILogger logger, T1 arg1, T2 arg2, T3 arg3, T4 arg4, Exception exception /// A delegate which when invoked creates a log message. public static Action Define(LogLevel logLevel, EventId eventId, string formatString) { - var formatter = CreateLogValuesFormatter(formatString, expectedNamedParameterCount: 5); + LogValuesFormatter formatter = CreateLogValuesFormatter(formatString, expectedNamedParameterCount: 5); return (logger, arg1, arg2, arg3, arg4, arg5, exception) => { @@ -240,7 +239,7 @@ public static Action DefineA delegate which when invoked creates a log message. public static Action Define(LogLevel logLevel, EventId eventId, string formatString) { - var formatter = CreateLogValuesFormatter(formatString, expectedNamedParameterCount: 6); + LogValuesFormatter formatter = CreateLogValuesFormatter(formatString, expectedNamedParameterCount: 6); return (logger, arg1, arg2, arg3, arg4, arg5, arg6, exception) => { @@ -255,7 +254,7 @@ private static LogValuesFormatter CreateLogValuesFormatter(string formatString, { var logValuesFormatter = new LogValuesFormatter(formatString); - var actualCount = logValuesFormatter.ValueNames.Count; + int actualCount = logValuesFormatter.ValueNames.Count; if (actualCount != expectedNamedParameterCount) { throw new ArgumentException( diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/LoggerT.cs b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/LoggerT.cs index 5b7a760be4b3..59f2f043cd18 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/LoggerT.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/LoggerT.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.Internal; diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/Microsoft.Extensions.Logging.Abstractions.csproj b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/Microsoft.Extensions.Logging.Abstractions.csproj index b50b22598e56..5896926dec8d 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/Microsoft.Extensions.Logging.Abstractions.csproj +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/Microsoft.Extensions.Logging.Abstractions.csproj @@ -2,7 +2,6 @@ netstandard2.0 - $(NoWarn);CS1591 true diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/NullLogger.cs b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/NullLogger.cs index d1acfddac8fc..f8bdacdc112d 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/NullLogger.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/NullLogger.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/NullLoggerFactory.cs b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/NullLoggerFactory.cs index dc479c004e68..2f76fd94d65e 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/NullLoggerFactory.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/NullLoggerFactory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.Logging.Abstractions { diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/NullLoggerProvider.cs b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/NullLoggerProvider.cs index c3af8b521ad5..98c862429710 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/NullLoggerProvider.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/NullLoggerProvider.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. namespace Microsoft.Extensions.Logging.Abstractions { diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/NullLoggerT.cs b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/NullLoggerT.cs index e0c5cf0f3fe5..8e3a118575f3 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/NullLoggerT.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/NullLoggerT.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; @@ -20,7 +19,7 @@ public class NullLogger : ILogger /// public IDisposable BeginScope(TState state) { - return NullDisposable.Instance; + return NullScope.Instance; } /// @@ -41,15 +40,5 @@ public bool IsEnabled(LogLevel logLevel) { return false; } - - private class NullDisposable : IDisposable - { - public static readonly NullDisposable Instance = new NullDisposable(); - - public void Dispose() - { - // intentionally does nothing - } - } } } diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/Properties/InternalsVisibleTo.cs b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/Properties/InternalsVisibleTo.cs index 8bb3d3065c2c..c9d3b5185197 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/Properties/InternalsVisibleTo.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/Properties/InternalsVisibleTo.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("Microsoft.Extensions.Logging.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.Extensions.Logging.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/src/libraries/Microsoft.Extensions.Logging.Configuration/ref/Microsoft.Extensions.Logging.Configuration.cs b/src/libraries/Microsoft.Extensions.Logging.Configuration/ref/Microsoft.Extensions.Logging.Configuration.cs index 1cd6c905b25b..a152a0a71c8e 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Configuration/ref/Microsoft.Extensions.Logging.Configuration.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Configuration/ref/Microsoft.Extensions.Logging.Configuration.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ------------------------------------------------------------------------------ // Changes to this file must follow the https://aka.ms/api-review process. // ------------------------------------------------------------------------------ diff --git a/src/libraries/Microsoft.Extensions.Logging.Configuration/src/ILoggerProviderConfiguration.cs b/src/libraries/Microsoft.Extensions.Logging.Configuration/src/ILoggerProviderConfiguration.cs index da745eb4323b..c9dbe5005f5a 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Configuration/src/ILoggerProviderConfiguration.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Configuration/src/ILoggerProviderConfiguration.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.Configuration; diff --git a/src/libraries/Microsoft.Extensions.Logging.Configuration/src/ILoggerProviderConfigurationFactory.cs b/src/libraries/Microsoft.Extensions.Logging.Configuration/src/ILoggerProviderConfigurationFactory.cs index 61cb948c0c50..b74d208b09b9 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Configuration/src/ILoggerProviderConfigurationFactory.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Configuration/src/ILoggerProviderConfigurationFactory.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.Configuration; diff --git a/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggerFilterConfigureOptions.cs b/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggerFilterConfigureOptions.cs index 6462f29efa40..9bc78cc05ba3 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggerFilterConfigureOptions.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggerFilterConfigureOptions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using Microsoft.Extensions.Configuration; @@ -33,7 +32,7 @@ private void LoadDefaultConfigValues(LoggerFilterOptions options) options.CaptureScopes = _configuration.GetValue(nameof(options.CaptureScopes), options.CaptureScopes); - foreach (var configurationSection in _configuration.GetChildren()) + foreach (IConfigurationSection configurationSection in _configuration.GetChildren()) { if (configurationSection.Key.Equals(LogLevelKey, StringComparison.OrdinalIgnoreCase)) { @@ -42,11 +41,11 @@ private void LoadDefaultConfigValues(LoggerFilterOptions options) } else { - var logLevelSection = configurationSection.GetSection(LogLevelKey); + IConfigurationSection logLevelSection = configurationSection.GetSection(LogLevelKey); if (logLevelSection != null) { // Load logger specific rules - var logger = configurationSection.Key; + string logger = configurationSection.Key; LoadRules(options, logLevelSection, logger); } } @@ -55,11 +54,11 @@ private void LoadDefaultConfigValues(LoggerFilterOptions options) private void LoadRules(LoggerFilterOptions options, IConfigurationSection configurationSection, string logger) { - foreach (var section in configurationSection.AsEnumerable(true)) + foreach (System.Collections.Generic.KeyValuePair section in configurationSection.AsEnumerable(true)) { - if (TryGetSwitch(section.Value, out var level)) + if (TryGetSwitch(section.Value, out LogLevel level)) { - var category = section.Key; + string category = section.Key; if (category.Equals(DefaultCategory, StringComparison.OrdinalIgnoreCase)) { category = null; diff --git a/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggerProviderConfiguration.cs b/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggerProviderConfiguration.cs index e405241a8e71..e4ffdb82d5c7 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggerProviderConfiguration.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggerProviderConfiguration.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.Configuration; @@ -15,4 +14,4 @@ public LoggerProviderConfiguration(ILoggerProviderConfigurationFactory providerC public IConfiguration Configuration { get; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggerProviderConfigurationExtensions.cs b/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggerProviderConfigurationExtensions.cs index 30c4a671f672..f8673b861591 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggerProviderConfigurationExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggerProviderConfigurationExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; diff --git a/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggerProviderConfigurationFactory.cs b/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggerProviderConfigurationFactory.cs index 42b61c61b04e..25a1c9fc1baa 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggerProviderConfigurationFactory.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggerProviderConfigurationFactory.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; @@ -24,17 +23,17 @@ public IConfiguration GetConfiguration(Type providerType) throw new ArgumentNullException(nameof(providerType)); } - var fullName = providerType.FullName; - var alias = ProviderAliasUtilities.GetAlias(providerType); + string fullName = providerType.FullName; + string alias = ProviderAliasUtilities.GetAlias(providerType); var configurationBuilder = new ConfigurationBuilder(); - foreach (var configuration in _configurations) + foreach (LoggingConfiguration configuration in _configurations) { - var sectionFromFullName = configuration.Configuration.GetSection(fullName); + IConfigurationSection sectionFromFullName = configuration.Configuration.GetSection(fullName); configurationBuilder.AddConfiguration(sectionFromFullName); if (!string.IsNullOrWhiteSpace(alias)) { - var sectionFromAlias = configuration.Configuration.GetSection(alias); + IConfigurationSection sectionFromAlias = configuration.Configuration.GetSection(alias); configurationBuilder.AddConfiguration(sectionFromAlias); } } diff --git a/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggerProviderConfigureOptions.cs b/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggerProviderConfigureOptions.cs index a22f5bb22247..bb6e00d25e75 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggerProviderConfigureOptions.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggerProviderConfigureOptions.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.Options; @@ -16,4 +15,4 @@ public LoggerProviderConfigureOptions(ILoggerProviderConfiguration pr { } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggerProviderOptionsChangeTokenSource.cs b/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggerProviderOptionsChangeTokenSource.cs index ec1087233ba6..4026b8ce7581 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggerProviderOptionsChangeTokenSource.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggerProviderOptionsChangeTokenSource.cs @@ -1,6 +1,5 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.Options; @@ -9,9 +8,8 @@ namespace Microsoft.Extensions.Logging.Configuration /// public class LoggerProviderOptionsChangeTokenSource : ConfigurationChangeTokenSource { - /// public LoggerProviderOptionsChangeTokenSource(ILoggerProviderConfiguration providerConfiguration) : base(providerConfiguration.Configuration) { } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggingBuilderConfigurationExtensions.cs b/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggingBuilderConfigurationExtensions.cs index 0b58d9465f2e..3b60220f4ca2 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggingBuilderConfigurationExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggingBuilderConfigurationExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.DependencyInjection.Extensions; diff --git a/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggingBuilderExtensions.cs b/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggingBuilderExtensions.cs index 1bb25e26656f..301bb689711d 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggingBuilderExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggingBuilderExtensions.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; diff --git a/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggingConfiguration.cs b/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggingConfiguration.cs index b831744b5e41..d4e66315af9f 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggingConfiguration.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Configuration/src/LoggingConfiguration.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using Microsoft.Extensions.Configuration; @@ -15,4 +14,4 @@ public LoggingConfiguration(IConfiguration configuration) Configuration = configuration; } } -} \ No newline at end of file +} diff --git a/src/libraries/Microsoft.Extensions.Logging.Console/ref/Microsoft.Extensions.Logging.Console.cs b/src/libraries/Microsoft.Extensions.Logging.Console/ref/Microsoft.Extensions.Logging.Console.cs index 3012421b0901..105b55c70d0d 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Console/ref/Microsoft.Extensions.Logging.Console.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Console/ref/Microsoft.Extensions.Logging.Console.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. // ------------------------------------------------------------------------------ // Changes to this file must follow the https://aka.ms/api-review process. // ------------------------------------------------------------------------------ diff --git a/src/libraries/Microsoft.Extensions.Logging.Console/src/AnsiLogConsole.cs b/src/libraries/Microsoft.Extensions.Logging.Console/src/AnsiLogConsole.cs index 5d12fd4ad24c..a2413615e551 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Console/src/AnsiLogConsole.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Console/src/AnsiLogConsole.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Text; diff --git a/src/libraries/Microsoft.Extensions.Logging.Console/src/AnsiSystemConsole.cs b/src/libraries/Microsoft.Extensions.Logging.Console/src/AnsiSystemConsole.cs index ac83bc3e8e47..a44af3e2bf1e 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Console/src/AnsiSystemConsole.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Console/src/AnsiSystemConsole.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.IO; @@ -10,7 +9,6 @@ internal class AnsiSystemConsole : IAnsiSystemConsole { private readonly TextWriter _textWriter; - /// public AnsiSystemConsole(bool stdErr = false) { _textWriter = stdErr ? System.Console.Error : System.Console.Out; diff --git a/src/libraries/Microsoft.Extensions.Logging.Console/src/ConsoleLogger.cs b/src/libraries/Microsoft.Extensions.Logging.Console/src/ConsoleLogger.cs index 46271360b19f..e790eeb1c053 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Console/src/ConsoleLogger.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Console/src/ConsoleLogger.cs @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System; using System.Diagnostics; @@ -10,12 +9,9 @@ namespace Microsoft.Extensions.Logging.Console { internal class ConsoleLogger : ILogger { - private static readonly string _loglevelPadding = ": "; - private static readonly string _messagePadding; - private static readonly string _newLineWithMessagePadding; - - // ConsoleColor does not have a value to specify the 'Default' color - private readonly ConsoleColor? DefaultConsoleColor = null; + private const string LoglevelPadding = ": "; + private static readonly string _messagePadding = new string(' ', GetLogLevelString(LogLevel.Information).Length + LoglevelPadding.Length); + private static readonly string _newLineWithMessagePadding = Environment.NewLine + _messagePadding; private readonly string _name; private readonly ConsoleLoggerProcessor _queueProcessor; @@ -23,13 +19,6 @@ internal class ConsoleLogger : ILogger [ThreadStatic] private static StringBuilder _logBuilder; - static ConsoleLogger() - { - var logLevelString = GetLogLevelString(LogLevel.Information); - _messagePadding = new string(' ', logLevelString.Length + _loglevelPadding.Length); - _newLineWithMessagePadding = Environment.NewLine + _messagePadding; - } - internal ConsoleLogger(string name, ConsoleLoggerProcessor loggerProcessor) { if (name == null) @@ -57,7 +46,7 @@ public void Log(LogLevel logLevel, EventId eventId, TState state, Except throw new ArgumentNullException(nameof(formatter)); } - var message = formatter(state, exception); + string message = formatter(state, exception); if (!string.IsNullOrEmpty(message) || exception != null) { @@ -67,10 +56,10 @@ public void Log(LogLevel logLevel, EventId eventId, TState state, Except public virtual void WriteMessage(LogLevel logLevel, string logName, int eventId, string message, Exception exception) { - var format = Options.Format; + ConsoleLoggerFormat format = Options.Format; Debug.Assert(format >= ConsoleLoggerFormat.Default && format <= ConsoleLoggerFormat.Systemd); - var logBuilder = _logBuilder; + StringBuilder logBuilder = _logBuilder; _logBuilder = null; if (logBuilder == null) @@ -104,13 +93,13 @@ public virtual void WriteMessage(LogLevel logLevel, string logName, int eventId, private LogMessageEntry CreateDefaultLogMessage(StringBuilder logBuilder, LogLevel logLevel, string logName, int eventId, string message, Exception exception) { // Example: - // INFO: ConsoleApp.Program[10] + // info: ConsoleApp.Program[10] // Request received - var logLevelColors = GetLogLevelConsoleColors(logLevel); - var logLevelString = GetLogLevelString(logLevel); + ConsoleColors logLevelColors = GetLogLevelConsoleColors(logLevel); + string logLevelString = GetLogLevelString(logLevel); // category and event id - logBuilder.Append(_loglevelPadding); + logBuilder.Append(LoglevelPadding); logBuilder.Append(logName); logBuilder.Append('['); logBuilder.Append(eventId); @@ -124,7 +113,7 @@ private LogMessageEntry CreateDefaultLogMessage(StringBuilder logBuilder, LogLev // message logBuilder.Append(_messagePadding); - var len = logBuilder.Length; + int len = logBuilder.Length; logBuilder.AppendLine(message); logBuilder.Replace(Environment.NewLine, _newLineWithMessagePadding, len, message.Length); } @@ -139,10 +128,10 @@ private LogMessageEntry CreateDefaultLogMessage(StringBuilder logBuilder, LogLev } string timestamp = null; - var timestampFormat = Options.TimestampFormat; + string timestampFormat = Options.TimestampFormat; if (timestampFormat != null) { - var dateTime = GetCurrentDateTime(); + DateTime dateTime = GetCurrentDateTime(); timestamp = dateTime.ToString(timestampFormat); } @@ -152,7 +141,7 @@ private LogMessageEntry CreateDefaultLogMessage(StringBuilder logBuilder, LogLev levelString: logLevelString, levelBackground: logLevelColors.Background, levelForeground: logLevelColors.Foreground, - messageColor: DefaultConsoleColor, + messageColor: null, logAsError: logLevel >= Options.LogToStandardErrorThreshold ); } @@ -166,14 +155,14 @@ private LogMessageEntry CreateSystemdLogMessage(StringBuilder logBuilder, LogLev // <6>ConsoleApp.Program[10] Request received // loglevel - var logLevelString = GetSyslogSeverityString(logLevel); + string logLevelString = GetSyslogSeverityString(logLevel); logBuilder.Append(logLevelString); // timestamp - var timestampFormat = Options.TimestampFormat; + string timestampFormat = Options.TimestampFormat; if (timestampFormat != null) { - var dateTime = GetCurrentDateTime(); + DateTime dateTime = GetCurrentDateTime(); logBuilder.Append(dateTime.ToString(timestampFormat)); } @@ -212,7 +201,7 @@ private LogMessageEntry CreateSystemdLogMessage(StringBuilder logBuilder, LogLev static void AppendAndReplaceNewLine(StringBuilder sb, string message) { - var len = sb.Length; + int len = sb.Length; sb.Append(message); sb.Replace(Environment.NewLine, " ", len, message.Length); } @@ -274,43 +263,41 @@ private static string GetSyslogSeverityString(LogLevel logLevel) private ConsoleColors GetLogLevelConsoleColors(LogLevel logLevel) { - if (Options.DisableColors) + if (!Options.DisableColors) { - return new ConsoleColors(null, null); + // We must explicitly set the background color if we are setting the foreground color, + // since just setting one can look bad on the users console. + switch (logLevel) + { + case LogLevel.Critical: + return new ConsoleColors(ConsoleColor.White, ConsoleColor.Red); + case LogLevel.Error: + return new ConsoleColors(ConsoleColor.Black, ConsoleColor.Red); + case LogLevel.Warning: + return new ConsoleColors(ConsoleColor.Yellow, ConsoleColor.Black); + case LogLevel.Information: + return new ConsoleColors(ConsoleColor.DarkGreen, ConsoleColor.Black); + case LogLevel.Debug: + return new ConsoleColors(ConsoleColor.Gray, ConsoleColor.Black); + case LogLevel.Trace: + return new ConsoleColors(ConsoleColor.Gray, ConsoleColor.Black); + } } - // We must explicitly set the background color if we are setting the foreground color, - // since just setting one can{"code":"internal","msg":"git-diff-tree: context deadline exceeded","meta":{"cause":"*fmt.wrapError"}}